diff --git a/.gitattributes b/.gitattributes index 4b0ed3d14b5..de9ce3303a9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,26 +11,31 @@ *.htm text eol=lf *.html text eol=lf *.js text eol=lf +*.json text eol=lf *.css text eol=lf *.lang text eol=lf *.txt text eol=lf *.md text eol=lf *.pp text eol=lf *.sh text eol=lf +*.yml text eol=lf *.yaml text eol=lf +*.conf text eol=lf .bash_aliases text eol=lf # Denote all files that are truly binary and should not be modified. *.bmp binary -*.ico binary -*.png binary -*.jpg binary -*.odt binary -*.odf binary *.frm binary +*.ico binary +*.jpeg binary +*.jpg binary *.MYD binary *.MYI binary +*.odf binary +*.odt binary +*.png binary + # Export ignores to generate clean production tarballs /build export-ignore diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 9a84fdbbda0..1c46e8e2d50 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -77,8 +77,8 @@ contact@dolibarr.org ## 10. License and attribution -This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). +This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/). -Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). +Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](https://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). -Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/) +Retrieved on November 22, 2016 from [https://citizencodeofconduct.org/](http://citizencodeofconduct.org/) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b57ceda24aa..d17347a0ad7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,15 +4,17 @@ How to contribute to Dolibarr Bug reports and feature requests -------------------------------- -*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages. +*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages. Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues). -Default language here is english. So please prepare your contributions in english. +Default **language here is english**. So please prepare your contributions in english. 1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem. 2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request. -4. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version) -3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible). +3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version) +4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible). +5. Delete unnecessary submissions. +6. **Check your Message at Preview before sending.** diff --git a/.travis.yml b/.travis.yml index 7b8fa4546b2..22d4b2b0827 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ # This script is used by Travis CI to run automatically Continuous test integration # from Dolibarr GitHub repository. -# For syntax, see http://about.travis-ci.org/docs/user/languages/php/ +# For syntax, see https://docs.travis-ci.com/user/languages/php/ # We use dist: xenial to have php 5.6+ available os: linux @@ -38,8 +38,8 @@ env: jobs: fast_finish: true - allow_failures: - - php: nightly + #allow_failures: + #- php: nightly include: - if: type = push php: '5.6' @@ -50,7 +50,7 @@ jobs: - if: type = push AND branch = develop php: nightly env: DB=mysql - - if: type = push AND branch = 13.0 + - if: type = push AND branch = 14.0 php: nightly env: DB=mysql @@ -73,13 +73,6 @@ before_install: phpenv config-rm xdebug.ini echo -- | - if [ "$DB" = 'postgresql' ]; then - echo "Check pgloader version" - pgloader --version - echo - fi - install: - | echo "Updating Composer" @@ -178,6 +171,10 @@ before_script: mysql --version | head - mysql -e "SELECT VERSION();" | head - psql --version + if [ "$DB" = 'postgresql' ]; then + echo "Check pgloader version" + pgloader --version + fi echo - | @@ -401,6 +398,9 @@ script: 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 + php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log + php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log + php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log # Enable modules not enabled into original dump php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE > $TRAVIS_BUILD_DIR/enablemodule.log diff --git a/COPYING b/COPYING index 2a000655e93..e60008693e0 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/COPYRIGHT b/COPYRIGHT index 4f4bc3dff6d..9704c857ed3 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -23,7 +23,7 @@ PEAR Mail_MIME 1.8.9 BSD Yes ParseDown 1.6 MIT License Yes Markdown parser PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers -PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files +PHPSpreadSheet 1.8.2 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 PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests @@ -32,7 +32,7 @@ PSR/simple-cache ? Library for cache (used by PHPSp Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Sabre 3.2.2 BSD Yes DAV support Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP -Stripe 6.43.1 MIT licence Yes Library for Stripe module +Stripe 7.67.0 MIT licence Yes Library for Stripe module TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement @@ -54,7 +54,7 @@ jQuery TableDnD 0.6 GPL and MIT License Yes jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports) JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone -SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer +SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer Image libraries: Octicons 8.1 MIT Yes diff --git a/ChangeLog b/ChangeLog index e685669f01d..4734605b7d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,33 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 14.0.0 compared to 13.0.0 ***** + +For users: +---------- +NEW: Several security issues after a second private bug bounty campaign. + + + +For developers: +--------------- +* start new module EventOrganization + + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup. +* API /setup/shipment_methods has been replaced with API /setup/shipping_methods +* Field "total" renamed into to "total_ht" for table llx_facture, llx_facture_rec for better field name consistency +* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency +* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency +* If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT) +* If your database is MySql or MariaDB, you need at least version 5.1 +* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules + + ***** ChangeLog for 13.0.2 compared to 13.0.1 ***** FIX: 11.0 - $this->socid injected in query without checking for empty value @@ -24,21 +51,21 @@ FIX: #16533 FIX: #16629 FIX: #16671 Can not generate zip file of documents in backup tool FIX: Add "Now" link on social charges creation card -FIX: avoid undefined url and missing token +FIX: avoid undefined URL and missing token FIX: Bad project filter in ticket list FIX: Buttons to disable bindings not working FIX: class not found when creating recuring invoice from invoice+discount -FIX: File attachment on lots +FIX: File attachment on lots/batches FIX: handling $heightforinfotot when he's superior to a page height on Supplier Invoice FIX: hourglass and hide button to pay -FIX: massaction validate invoice do not regenerate pdf +FIX: massaction validate invoice do not regenerate PDF FIX: missing mp4 video mime FIX: picto on shipment to reset qty to 0. Some quantities were not reset. FIX: Protection to avoid #16504 FIX: rounding amount on card updating -FIX: Rounding amount on social charges card updating +FIX: rounding amount on social charges card updating FIX: select list dependencies now work for ModuleBuilder sellist field -FIX: Status in popup of member in widget +FIX: status in popup of member in widget FIX: status on tooltip on widgets FIX: Timezone management for datetime on list of events FIX: Timezone management for datetime with modulebuilder and extrafields @@ -69,9 +96,9 @@ FIX: #16135 FIX: #16143 FIX: #16156 FIX: #16160 -FIX: #16165 Create customer discount without vat +FIX: #16165 Create customer discount without VAT FIX: #16185 -FIX: #16189, fix download/see check deposit PDF +FIX: #16189 fix download/see check deposit PDF FIX: #16215 FIX: Accountancy - label_operation is used instead of label_compte FIX: Add critical price patch @@ -81,7 +108,7 @@ FIX: cash fence for takepos with multientity FIX: CSRF errors on margin forms FIX: encoding status in graph of vendor proposals FIX: Fix detect dispached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES) -FIX: Hide/Unhide external ICSS calendars +FIX: hide/unhide external ICS calendars FIX: link to create event when task is in a project with a thirdparty FIX: Localtax must be converted with price2num FIX: manage price min for PRODUIT_CUSTOMER_PRICES @@ -102,7 +129,7 @@ FIX: warning when adding a line if $remise_percent is an empty string FIX: status late on purchase orders FIX: ODT generation very slow FIX: amount in summary of report -FIX: vat value when code contains number +FIX: VAT value when code contains number FIX: payment term label on PDF FIX: date selector when using reduced year (like on smartphone) @@ -111,7 +138,8 @@ FIX: date selector when using reduced year (like on smartphone) For users: ---------- -NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files. +NEW: Module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files. +NEW: Module Intracomm report NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable. NEW: Module Recruitment to manage Job position and applications. NEW: Several security issues after a private bug bounty campaign. @@ -120,13 +148,12 @@ NEW: Accountancy - add options to disable binding on sales, purchases & expense NEW: Accountancy balance - add a menu entry to show subtotal by group NEW: Accountancy - change menu disposition NEW: Accountancy - on transfers, select the periodicity by default -NEW: Accountancy - Add export for Gestinum (v3 & v5) #15180 +NEW: Accountancy - add export for Gestinum (v3 & v5) #15180 NEW: new currency rate editor NEW: Solve blocking feature. Can increase stock of a Kit without changing subproduct stock. NEW: add a widget to show the customers with outstanding limits reached NEW: add 2 rules for emailcollector: Message send/not sent from Dolibarr NEW: add a counter of number of words for pages in website module -NEW: add alert before changing thirdparty in TakePOS NEW: add a page to list Stock at a given date in the past NEW: add a start date to begin binding in accountancy NEW: add a statistics page to list popularity of products on invoices @@ -138,12 +165,12 @@ NEW: add column vat rate in page to define accounting account on product/service NEW: add costprice in fields of products list NEW: add an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE NEW: add employee link in expense report binding page -NEW: add EORI No. as ProfID5 +NEW: add EORI No. as ProfID5 #15382 NEW: add export for various payments NEW: add Extrafields labels and values in mail on create ticket NEW: add Extrafields support on ECM module NEW: add filter rules "is answer" and "is not answer" in email collector -NEW: add focus when editing on product/stock/product.php Close #14548 +NEW: add focus when editing on product/stock/product.php -> close #14548 NEW: add free text on each terminal of cash desk NEW: add global search for customer payments and vendor payments NEW: add global search for miscellaneous payments @@ -161,7 +188,6 @@ NEW: add option TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT NEW: add option to define a default warehouse at user level NEW: add option to include products without alert in replenish NEW: add order by lastname and firstname by default in get sales representatives -NEW: add param to not show links when output tags NEW: add PDF document templates for warehouses (list of stock) NEW: add a prospect status for the contact with managment of custom icon NEW: add public note on products ; this also partially fix the #14342 @@ -172,7 +198,6 @@ NEW: add search param for close date on order list NEW: add show preview for mail attachement on form mail NEW: add State/Province origin for products NEW: add the workflow interaction close intervention on closing ticket -NEW: add third order printer to TakePOS NEW: add tracking number in list and search_all items NEW: add vcard for adherent and user NEW: add week number for month view in agenda @@ -180,11 +205,10 @@ NEW: Algeria data (VAT and forme_juridique) NEW: allow click on all header numbers on commerce area NEW: allow to reopen interventions (green button) NEW: allow zero quantity on supplier/vendor order line -NEW: appearance tab in TakePOS with more visual parameters NEW: better currency rate editor NEW: can build vendor invoice from vendor orders NEW: can change a product in lines of a recurring invoice or contract -NEW: can change size of logo on PDF documents +NEW: can set the size of the logo on PDF documents NEW: can change VAT rate of all lines of a draft object in one step NEW: can define date range of validity of a login during creation NEW: can disable, from edit page, the whole web site @@ -193,21 +217,16 @@ NEW: can edit the list of sending email profiles NEW: can enable/disable users in bulk actions NEW: can filter on accounting system ref in export of chart of account NEW: can filter on container type, language and tags in the list of web pages -NEW: can hide eatby, sellby dates with option PRODUCT_DISABLE_SELLBY and PRODUCT_DISABLE_EATBY +NEW: can hide eatby, sellby dates with option PRODUCT_DISABLE_EATBY and PRODUCT_DISABLE_SELLBY NEW: can import proposals, sales orders, supplier invoices NEW: can set a dedicated SMTP config for sending email from public ticket interface NEW: can set tags/categories to website pages NEW: can set type of price without tax per default for new sale price creation NEW: can use desired stock of a given warehouse for replenishment -NEW: change thirdparty with barcode scan in TakePOS NEW: common behavior for monthly leave list view NEW: convert all subscription in datetime -NEW: can create a thirdparty customer from TakePOS NEW: date shipment from order accepts hours NEW: price level compatibility for variant -NEW: delayed payment in TakePOS -NEW: display date range if exist in TakePOS -NEW: display resiliate status in TakePOS for member NEW: display stat for BOM on "object referent"/linked Object product tab NEW: Email configuration - allow auto signed certificate when smtp ssl activated NEW: enable free emails input with select2 @@ -229,29 +248,24 @@ NEW: link on balance to the ledger NEW: MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const in email collector NEW: manage errors on update extra fields in ticket card NEW: mass-actions for the event list view -NEW: Module Intracomm report NEW: more filter for "View change logs" -NEW: multicurrency total in TakePOS NEW: multiselect type and date to date filter -NEW: Nature of product is now a dictionay NEW: new line template: hidden conf to fill service dates from the last service line NEW: PDF model storm for delivery NEW: possibilty to group payments by mode and show their subtotal -NEW: Print payment method and change in TakePOS NEW: Priority and transparency from external calendar events +NEW: Products - Nature of product is now a dictionary #13287 NEW: Products Import/Export 'default warehouse' and 'use batch number' fields NEW: Purchase price table: added filterable table columns NEW: rate editor for multicurrency NEW: ref_ext field for Commande lines, order lines, Attributes and Combinations, Invoice lines, payments, order lines NEW: remove new lines in mail on add ticket message -NEW: restrict thirdparty to customer in TakePOS NEW: Rule "email to" accept wildcard * -NEW: Save filter of the project homepage +NEW: save filter of the project homepage NEW: select-able columns on customer and supplier invoice paymnet list NEW: select-able columns on miscellaneous payments + more data columns NEW: select-able columns on social taxes list NEW: send context and remove new lines on create ticket -NEW: show available stock in TakePOS NEW: show category filter on lists only when user have rights to read categories NEW: show header number and make it clickable in warehouse area, payment area, shipment area NEW: show image of user in the combo select of users @@ -264,15 +278,27 @@ NEW: show tags and status in search list of website pages NEW: show user on external calender events (when found) NEW: subject title with company name instead of application title in ticket message NEW: Support for Samba4 AD +NEW: TakePOS appearance tab with more visual parameters +NEW: TakePOS add alert before changing thirdparty +NEW: TakePOS add third order printer +NEW: TakePOS can change thirdparty with barcode scan +NEW: TakePOS can create a thirdparty customer from TakePOS frontend NEW: TakePOS connector compatibility with RECEIPT PRINTERS module +NEW: TakePOS add delayed payment +NEW: TakePOS display date range if exist +NEW: TakePOS display resiliate status for members NEW: TakePOS Gift Receipt -NEW: TakePOS Multicurrency compatibility +NEW: TakePOS multicurrency compatibility +NEW: TakePOS multicurrency total +NEW: TakePOS print payment method and change +NEW: TakePOS restrict thirdparty to customer +NEW: TakePOS show available stock NEW: TakePOS Weighing Scale compatibility with TakePOS connector #14725 -NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms +NEW: Thirdparty Import new fields: mother company,outstanding debt limit,bank account,incoterms NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late -NEW: ticket classification on create from email collector +NEW: Ticket classification on create from email collector NEW: Ticket message notifications when edited from public interface -NEW: translate classification labels in ticket +NEW: Ticket translate classification labels in ticket NEW: VAT rate for Angola #15606 NEW: VAT and juridical status for Algeria NEW: VAT report - Invert constant to show by default zero VAT in reports @@ -289,30 +315,30 @@ For developers: NEW: add __MEMBER_TYPE__ and __TYPE__ substitution key NEW: add function dolButtonToOpenUrlInDialogPopup() to be able to open page into a popup NEW: show line number on intervention card (via MAIN_VIEW_LINE_NUMBER) -NEW: Add some fields to link website page to an other object +NEW: add some fields to link website page to an other object NEW: fill ECM src object fields in dol_add_file_process NEW: conf to allow to show the full tree in warehouse popup -NEW: can use THEME_DARKMODEENABLED=2 for a preview of theme in dark mode +NEW: can use parameter ?THEME_DARKMODEENABLED=2 for a preview of theme in dark mode NEW: can force the antivirus from conf file or autoprepend ini setup NEW: can add event to log into blockedlog module with a constant NEW: add property cssview when declaring fields of an object -NEW: Can use dynamic code into the 'enabled' property of DAO fields -NEW: allow to edit "demand reason" field though API +NEW: can use dynamic code into the 'enabled' property of DAO fields NEW: field ref_ext in llx_commandedet NEW: fields ref_ext for Attributes and Combinations NEW: OAuth SCOPE for Admin SDK NEW: standardizes API thirdparties by email like other object NEW: Triggers Attributes and Attributes values -NEW: added incoterms data into the substitution array +NEW: add incoterms data into the substitution array NEW: add send context for ticket NEW: add a message in error_log after detection of SQL or script injection NEW: add validation of MX domain for emails NEW: calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') ) NEW: Graphics can be horizontal bars +NEW: add param to not show links when output tags APIs NEW: API get contacts list of a given order -NEW: API endpoint getContacts and Clean results +NEW: API endpoint getContacts and clean results NEW: API can update a payment NEW: API get member by thirdparty NEW: API get thirdparty by barcode @@ -325,7 +351,7 @@ NEW: Thirdparty REST API: endpoint to set price level NEW: use new category API for project list view HOOKs -NEW: Hook on propal card +NEW: add hook on propal card NEW: add hooks on newpayment page to allow external payment modules NEW: add hooks on stats pages NEW: add formConfirm hook on product page diff --git a/DCO b/DCO new file mode 100644 index 00000000000..d54f007a8c5 --- /dev/null +++ b/DCO @@ -0,0 +1,34 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2002 - Today, The Dolibarr team and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/README.md b/README.md index ad4971f50db..0a3aeecb9f4 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) ### Main application/modules (all optional) - Customers, Prospects (Leads) and/or Suppliers directory + Contacts -- Members management +- Members/Membership management - Products and/or Services catalog - Commercial proposals management - Customer & Supplier Orders management @@ -112,6 +112,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Shared calendar/agenda (with ical and vcal export for third party tools integration) - Opportunities or Leads management - Projects & Tasks management +- Ticket System - Contracts management - Interventions management - Employee's leave requests management @@ -160,7 +161,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Canadian double taxes (federal/province) and other countries using cumulative VAT - Tunisian tax stamp - Argentina invoice numbering using A,B,C... - - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) + - Compatible with [European directives] (https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with European GDPR rules - ... - Flexible PDF & ODT generation for invoices, proposals, orders... diff --git a/SECURITY.md b/SECURITY.md index 08ca64e4a4c..7d65b7e98e4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,7 +12,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM ## Reporting a Vulnerability -To report a vulnerability, please use GitHub security advisory (alternatively send an email to security@dolibarr.org) +To report a vulnerability, please use GitHub security advisory at https://github.com/Dolibarr/dolibarr/security/advisories/new (if you have permissions) or alternatively send an email to security@dolibarr.org (for everybody) ## Hunting vulnerabilities on Dolibarr @@ -55,7 +55,7 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us * $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 set to 1 soon by default) -* The module DebugBar and ModuleBuilder must NOT be enabled (by default, this module is not enabled. This is a developer tool) +* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools) * ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities). * 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. @@ -65,12 +65,12 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us Scope is the web application (back office) and the APIs. -## Qualifying vulnerabilities for Bug bounty programs +## Qualifying vulnerabilities for reporting * 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 Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose or into module "Web site" when permission to edit website content is allowed). * Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users) * Open redirect * Broken authentication & session management @@ -82,7 +82,7 @@ Scope is the web application (back office) and the APIs. * Stack traces or path disclosure (for non admin users only) -## Non-qualifying vulnerabilities for Bug bounty programs, but qualified for reporting +## Non-qualifying vulnerabilities for reporting * "Self" XSS * SSL/TLS best practices diff --git a/build/README b/build/README index 14f2b92ae39..626953f9376 100644 --- a/build/README +++ b/build/README @@ -7,6 +7,9 @@ Building packages ################################################## All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages. +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. + There are several tools: @@ -17,8 +20,7 @@ There are several tools: -------------------------------------------------------------------------------------------------- -Prerequisites to build tgz, debian, rpm package: - +Prerequisites to build tgz, debian and rpm packages: > apt-get install tar dpkg dpatch p7zip-full rpm zip @@ -58,10 +60,6 @@ Prerequisites to build autoexe DoliWamp package: -------------------------------------------------------------------------------------------------- -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. - You can find in "build", following sub-directories: diff --git a/build/debian/control b/build/debian/control index eed54669555..059325eecb9 100755 --- a/build/debian/control +++ b/build/debian/control @@ -33,7 +33,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | Recommends: apache2 | lighttpd | httpd, mariadb-server | virtual-mysql-server, # Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8 - php-xml, php-mbstring + php-xml, php-mbstring, php-intl Suggests: www-browser, php5-geoip Description: Web based software to manage a company or foundation Dolibarr ERP & CRM is an easy to use open source/free software package for diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html index 235797bb6c9..f60f4829d76 100644 --- a/build/doxygen/doxygen_header.html +++ b/build/doxygen/doxygen_header.html @@ -2,7 +2,7 @@ -$title +Dolibarr source code documentation $tmp) { - foreach ($tmp as $constname => $constvalue) { - print $constname.'='.$constvalue." "; - } + foreach ($tmp as $constname => $constvalue) { + print $constname.'='.$constvalue." "; + } } print "\n"; @@ -135,13 +141,13 @@ fputs($fp, ''."\n"); fputs($fp, ''."\n"); foreach ($includeconstants as $countrycode => $tmp) { - fputs($fp, ''."\n"); - foreach ($tmp as $constname => $constvalue) { - $valueforchecksum=(empty($constvalue)?'0':$constvalue); - $checksumconcat[]=$valueforchecksum; - fputs($fp, ' '.$valueforchecksum.''."\n"); - } - fputs($fp, ''."\n"); + fputs($fp, ''."\n"); + foreach ($tmp as $constname => $constvalue) { + $valueforchecksum=(empty($constvalue)?'0':$constvalue); + $checksumconcat[]=$valueforchecksum; + fputs($fp, ' '.$valueforchecksum.''."\n"); + } + fputs($fp, ''."\n"); } fputs($fp, ''."\n"); @@ -158,22 +164,22 @@ $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoex $dir=''; $needtoclose=0; foreach ($files as $filetmp) { - $file = $filetmp['fullname']; - //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); - $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); - if ($newdir!=$dir) { - if ($needtoclose) { - fputs($fp, ' '."\n"); - } - fputs($fp, ' '."\n"); - $dir = $newdir; - $needtoclose=1; - } - if (filetype($file)=="file") { - $md5=md5_file($file); - $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); - } + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + if ($newdir!=$dir) { + if ($needtoclose) { + fputs($fp, ' '."\n"); + } + fputs($fp, ' '."\n"); + $dir = $newdir; + $needtoclose=1; + } + if (filetype($file)=="file") { + $md5=md5_file($file); + $checksumconcat[]=$md5; + fputs($fp, ' '.$md5.''."\n"); + } } fputs($fp, ' '."\n"); fputs($fp, ''."\n"); @@ -201,22 +207,23 @@ $files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoincl $dir=''; $needtoclose=0; foreach ($files as $filetmp) { - $file = $filetmp['fullname']; - //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); - $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); - $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); - if ($newdir!=$dir) { - if ($needtoclose) - fputs($fp, ' '."\n"); - fputs($fp, ' '."\n"); - $dir = $newdir; - $needtoclose=1; - } - if (filetype($file)=="file") { - $md5=md5_file($file); - $checksumconcat[]=$md5; - fputs($fp, ' '.$md5.''."\n"); - } + $file = $filetmp['fullname']; + //$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); + $newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file)); + $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file)); + if ($newdir!=$dir) { + if ($needtoclose) { + fputs($fp, ' '."\n"); + } + fputs($fp, ' '."\n"); + $dir = $newdir; + $needtoclose=1; + } + if (filetype($file)=="file") { + $md5=md5_file($file); + $checksumconcat[]=$md5; + fputs($fp, ' '.$md5.''."\n"); + } } fputs($fp, ' '."\n"); fputs($fp, ''."\n"); diff --git a/build/pdf/htmldoc_en.book b/build/pdf/htmldoc_en.book index f6c407f1bd2..5757128c7f5 100644 --- a/build/pdf/htmldoc_en.book +++ b/build/pdf/htmldoc_en.book @@ -1,4 +1,4 @@ #HTMLDOC 1.8.27 -t pdf14 -f "../../doc/dolibarr_en.pdf" --webpage --no-title --logoimage "../../doc/images/dolibarr_256x256.png" --linkcolor #2200c0 --linkstyle plain --size Universal --left 0.30in --right 0.30in --top 0.40in --bottom 0.30in --header ... --header1 ... --footer c/d --nup 1 --tocheader ... --tocfooter ... --portrait --color --no-pscommands --no-xrxcomments --compression=9 --jpeg=50 --fontsize 10.0 --fontspacing 1.0 --headingfont Helvetica --bodyfont Helvetica --headfootsize 9.0 --headfootfont Helvetica --charset iso-8859-1 --links --no-embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password "" --user-password "" --browserwidth 680 --no-strict --no-overflow -http://wiki.dolibarr.org/index.php/Main_Page -http://wiki.dolibarr.org/index.php/What_Dolibarr_Do +https://wiki.dolibarr.org/index.php/Home +https://wiki.dolibarr.org/index.php/What_Dolibarr_Does diff --git a/build/sitemap/README b/build/sitemap/README index b98b5cc48d8..a06bd58f259 100644 --- a/build/sitemap/README +++ b/build/sitemap/README @@ -1,5 +1,5 @@ # Format of sitemap file is available at -# http://www.sitemaps.org/protocol.html +# https://www.sitemaps.org/protocol.html # To build a sitemap from urllist-bing.txt, run # google-sitemapgen --config=config-bing.xml --testing diff --git a/composer.json b/composer.json index f9d06530c9a..130fda34945 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "2.2", "mobiledetect/mobiledetectlib" : "2.8.34", + "phpoffice/phpexcel" : "1.8.2", "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "6.3.2", "nnnick/chartjs" : "^2.9", diff --git a/composer.lock b/composer.lock index c588bc7783f..3e867f8f186 100644 --- a/composer.lock +++ b/composer.lock @@ -328,6 +328,63 @@ }, "time": "2020-03-23T09:12:05+00:00" }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/1441011fb7ecdd8cc689878f54f8b58a6805f870", + "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": "^5.2|^7.0" + }, + "require-dev": { + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "autoload": { + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Franck Lefevre", + "homepage": "http://rootslabs.net" + }, + { + "name": "Mark Baker", + "homepage": "http://markbakeruk.net" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PHPExcel", + "keywords": [ + "OpenXML", + "excel", + "xlsx" + ], + "abandoned": "phpoffice/phpspreadsheet", + "time": "2018-11-22T23:07:24+00:00" + }, { "name": "restler/framework", "version": "3.0.0-RC6", diff --git a/dev/README b/dev/README index 337928507fc..78666d77f3a 100644 --- a/dev/README +++ b/dev/README @@ -1,13 +1,14 @@ README (English) -------------------------------- -This directory contains sub-directories to provide tools or -documentation for developers. -Note: All files in this directory are in VCS only and are not -provided with a standard release. +This directory contains sub-directories to provide tools or documentation for developers. + +Note: All files in this directory are in the source repository only and are not provided with a standard release. They are useless to make Dolibarr working. + +You may find a more complete documentation on Dolibarr on the wiki: -There is also some documentation on Dolibarr Wiki: https://wiki.dolibarr.org/ -and -https://doxygen.dolibarr.org/ +and on + +https://doxygen.dolibarr.org/ diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index f3374c43234..9ea62de9048 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -133,17 +133,15 @@ with } } elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) { - -* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace +* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace if (strpos($filename, '://') === false) { with - if (strpos($filename, '//') === 0) - { + if (strpos($filename, '//') === 0) { // Share folder on a (windows) server // e.g.: "//[MyServerName]/[MySharedFolder]/" // @@ -175,17 +173,17 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php TCPDI: ------ -Add fpdf_tpl.php 1.2 +Add file fpdf_tpl.php 1.2 -Add tcpdi.php +Add file tcpdi.php -Add tcpdi_parser.php and replace: -require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); +Add file tcpdi_parser.php and replace: + require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); with: -require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php'); + require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php'); -* Fix by replacing +* Fix syntax error by replacing } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) { with } elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) { @@ -195,23 +193,23 @@ with JSGANTT: -------- * Replace in function JSGantt.taskLink -var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth); + var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth); with -// LDR To open in same window -//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth); -window.location.href=pRef + // LDR To open in same window + //var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth); + window.location.href=pRef * Replace -vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource()); + vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource()); with -var vTmpNode=this.newNode(vTmpCell, 'div', null, ''); -vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']); -vTmpNode.setAttribute('href',vTaskList[i].getLink()); + var vTmpNode=this.newNode(vTmpCell, 'div', null, ''); + vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']); + vTmpNode.setAttribute('href',vTaskList[i].getLink()); * Replace '% Comp.' to have a smaller text column header -'comp':'% Comp.' + 'comp':'% Comp.' with -'comp':'%' + 'comp':'%' @@ -227,9 +225,6 @@ JQUERYFILETREE: RESTLER: -------- -Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html - -+With swagger 2: * Add line into Util.php to complete function @@ -251,6 +246,13 @@ Change content of file htdocs/includes/restler/framework/Luracast/Restler/explor if (!is_string($haystack)) return false; ++With swagger 2 provided into /explorer: +---------------------------------------- + +Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html + + + PARSEDOWN --------- diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index 1acf181a4ba..1d231a7fd7a 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Global variables @@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (! $result > 0) { dol_print_error('', $user->error); exit; } +if (! $result > 0) { + dol_print_error('', $user->error); + exit; +} $user->getrights(); @@ -82,12 +85,12 @@ $obj->lines[]=$line1; // Create invoice $idobject=$obj->create($user); -if ($idobject > 0) -{ +if ($idobject > 0) { // Change status to validated $result=$obj->validate($user); - if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else { + if ($result > 0) { + print "OK Object created with id ".$idobject."\n"; + } else { $error++; dol_print_error($db, $obj->error); } @@ -99,8 +102,7 @@ if ($idobject > 0) // -------------------- END OF YOUR CODE -------------------- -if (! $error) -{ +if (! $error) { $db->commit(); print '--- end ok'."\n"; } else { diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index 7fe1a82251a..a851ac3cbc5 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Global variables @@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (! $result > 0) { dol_print_error('', $user->error); exit; } +if (! $result > 0) { + dol_print_error('', $user->error); + exit; +} $user->getrights(); @@ -80,12 +83,12 @@ $com->lines[]=$orderline1; // Create order $idobject=$com->create($user); -if ($idobject > 0) -{ +if ($idobject > 0) { // Change status to validated $result=$com->valid($user); - if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else { + if ($result > 0) { + print "OK Object created with id ".$idobject."\n"; + } else { $error++; dol_print_error($db, $com->error); } @@ -97,8 +100,7 @@ if ($idobject > 0) // -------------------- END OF YOUR CODE -------------------- -if (! $error) -{ +if (! $error) { $db->commit(); print '--- end ok'."\n"; } else { diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 20b898a92aa..8f742065f2f 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Global variables @@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (! $result > 0) { dol_print_error('', $user->error); exit; } +if (! $result > 0) { + dol_print_error('', $user->error); + exit; +} $user->getrights(); @@ -79,8 +82,7 @@ $myproduct->weight_units = 0; // Create product in database $idobject = $myproduct->create($user); -if ($idobject > 0) -{ +if ($idobject > 0) { print "OK Object created with id ".$idobject."\n"; } else { $error++; @@ -89,8 +91,7 @@ if ($idobject > 0) // -------------------- END OF YOUR CODE -------------------- -if (! $error) -{ +if (! $error) { $db->commit(); print '--- end ok'."\n"; } else { diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index d585b490a9c..e374fec531d 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Global variables @@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (! $result > 0) { dol_print_error('', $user->error); exit; } +if (! $result > 0) { + dol_print_error('', $user->error); + exit; +} $user->getrights(); @@ -69,18 +72,17 @@ $obj->nom = 'ABCDEF'; // Create user $idobject=$obj->create($user); -if ($idobject > 0) -{ +if ($idobject > 0) { // Change status to validated $result=$obj->setStatut(1); - if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else { + if ($result > 0) { + print "OK Object created with id ".$idobject."\n"; + } else { $error++; dol_print_error($db, $obj->error); } -} elseif ($obj->error == 'ErrorLoginAlreadyExists') -{ - print "User with login ".$obj->login." already exists\n"; +} elseif ($obj->error == 'ErrorLoginAlreadyExists') { + print "User with login ".$obj->login." already exists\n"; } else { $error++; dol_print_error($db, $obj->error); @@ -89,8 +91,7 @@ if ($idobject > 0) // -------------------- END OF YOUR CODE -------------------- -if (! $error) -{ +if (! $error) { $db->commit(); print '--- end ok'."\n"; } else { diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php index aec246e9480..40bee133d11 100755 --- a/dev/examples/code/get_contracts.php +++ b/dev/examples/code/get_contracts.php @@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Global variables @@ -49,14 +49,17 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (! $result > 0) { dol_print_error('', $user->error); exit; } +if (! $result > 0) { + dol_print_error('', $user->error); + exit; +} $user->getrights(); print "***** ".$script_file." (".$version.") *****\n"; if (! isset($argv[1])) { // Check parameters - print "Usage: ".$script_file." id_thirdparty ...\n"; - exit; + print "Usage: ".$script_file." id_thirdparty ...\n"; + exit; } print '--- start'."\n"; print 'Argument id_thirdparty='.$argv[1]."\n"; diff --git a/dev/examples/zapier/README.md b/dev/examples/zapier/README.md index 453a5224993..e452cc2aa6b 100644 --- a/dev/examples/zapier/README.md +++ b/dev/examples/zapier/README.md @@ -1,68 +1,6 @@ # HOW TO BUILD +Take a look at the dolibarr wiki page of Zapier module: -## ENABLE MODULE ZAPIER ON DOLIBARR - -This should also enable the module API (required for authentication by Zapier service and to execute action in Dolibarr by Zapier). - -Create the Dolibarr login that will be used by Zapier to call APIs. Give the login the permissions on the action you plan to automate. - - -## CREATE A ZAPIER DEVELOPPER ACCOUNT - -At first, you need to have a Zapier developper acoount, create it here [Zapier Platform](https://developer.zapier.com/) - - -## INSTALL ZAPIER COMMAND LINE TOOLS WITH LINK TO ZAPIER ONLINE ACCOUNT - -### Install Node.js - -An easy option to get set up with Node.js is to visit [https://nodejs.org/en/download/](https://nodejs.org/en/download/) and download the official installer for your OS. If you're installing with a package manager it's even easier. - -After installation, confirm that Node.js is ready to use: - `node --version` - -### Install the Zapier CLI - -Next let's install the Zapier CLI tools. The CLI will allow you to build your app, deploy it to the Zapier platform, do local testing, manage users and testers, view remote logs, collaborate with your team, and more: - - `cd dev/examples/zapier` - - `npm install -g zapier-platform-cli` to install the CLI globally - - `zapier --version` to return version of the CLI - -### Run Zapier Login - -Let's configure authentication between your dev environment and the Zapier platform. You'll use the email address and password you use to log in to the Zapier application. - - `zapier login` - -This command will set up a .zapierrc file in your home directory. - -### Install the Project - -In zapier example directory, run: - - `cd dev/examples/zapier` - - `npm install` - -### Deploying your App - -Let's deploy it! When you're ready to try your code out on the Zapier platform use the push command. Only you will be able to see the app until you invite testers. - - `zapier register` (the first time, choose name for example "Dolibarr") - - `zapier push` - -After a push, the Application, with the name you defined during the register step, is available when creating a Zap. - -You will find original tutorial here : [https://zapier.com/developer/start/introduction](https://zapier.com/developer/start/introduction) - - -### Create a Zap - -Create a ZAP that use the application you registered. -For authentication, you must enter the login / pass of account used by Zapier to call APIs. +https://wiki.dolibarr.org/index.php?title=Module_Zapier diff --git a/dev/initdata/dbf/import-dbf.php b/dev/initdata/dbf/import-dbf.php index 0718a472cd6..ba1da9722d6 100644 --- a/dev/initdata/dbf/import-dbf.php +++ b/dev/initdata/dbf/import-dbf.php @@ -30,8 +30,8 @@ $script_file = basename(__FILE__); $path = dirname(__FILE__) . '/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -62,40 +62,40 @@ $startlinenb = empty($argv[3]) ? 1 : (int) $argv[3]; $endlinenb = empty($argv[4]) ? 0 : (int) $argv[4]; if (empty($filepath)) { - print "Usage: php $script_file myfilepath.dbf [removeChatColumnName] [startlinenb] [endlinenb]\n"; - print "Example: php $script_file myfilepath.dbf 0 2 1002\n"; - print "\n"; - exit(-1); + print "Usage: php $script_file myfilepath.dbf [removeChatColumnName] [startlinenb] [endlinenb]\n"; + print "Example: php $script_file myfilepath.dbf 0 2 1002\n"; + print "\n"; + exit(-1); } if (!file_exists($filepath)) { - print "Error: File " . $filepath . " not found.\n"; - print "\n"; - exit(-1); + print "Error: File " . $filepath . " not found.\n"; + print "\n"; + exit(-1); } $ret = $user->fetch('', 'admin'); if (!$ret > 0) { - print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; - exit; + print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; + exit; } $user->getrights(); // Ask confirmation if (!$confirmed) { - print "Hit Enter to continue or CTRL+C to stop...\n"; - $input = trim(fgets(STDIN)); + print "Hit Enter to continue or CTRL+C to stop...\n"; + $input = trim(fgets(STDIN)); } // Open input and output files $fhandle = dbase_open($filepath, 0); if (!$fhandle) { - print 'Error: Failed to open file ' . $filepath . "\n"; - exit(1); + print 'Error: Failed to open file ' . $filepath . "\n"; + exit(1); } $fhandleerr = fopen($filepatherr, 'w'); if (!$fhandleerr) { - print 'Error: Failed to open file ' . $filepatherr . "\n"; - exit(1); + print 'Error: Failed to open file ' . $filepatherr . "\n"; + exit(1); } $langs->setDefaultLang($defaultlang); @@ -105,23 +105,23 @@ $table_name = substr(basename($filepath), 0, strpos(basename($filepath), '.')); print 'Info: ' . $record_numbers . " lines in file \n"; $header = dbase_get_header_info($fhandle); if ($deleteTable) { - $db->query("DROP TABLE IF EXISTS `$table_name`"); + $db->query("DROP TABLE IF EXISTS `$table_name`"); } $sqlCreate = "CREATE TABLE IF NOT EXISTS `$table_name` ( `id` INT(11) NOT NULL AUTO_INCREMENT "; $fieldArray = array("`id`"); foreach ($header as $value) { - $fieldName = substr(str_replace('_', '', $value['name']), $startchar); - $fieldArray[] = "`$fieldName`"; - $sqlCreate .= ", `" . $fieldName . "` VARCHAR({$value['length']}) NULL DEFAULT NULL "; + $fieldName = substr(str_replace('_', '', $value['name']), $startchar); + $fieldArray[] = "`$fieldName`"; + $sqlCreate .= ", `" . $fieldName . "` VARCHAR({$value['length']}) NULL DEFAULT NULL "; } $sqlCreate .= ", PRIMARY KEY (`id`)) ENGINE = InnoDB"; $resql = $db->query($sqlCreate); if ($resql !== false) { - print "Table $table_name created\n"; + print "Table $table_name created\n"; } else { - var_dump($db->errno()); - print "Impossible : " . $sqlCreate . "\n"; - die(); + var_dump($db->errno()); + print "Impossible : " . $sqlCreate . "\n"; + die(); } $i = 0; @@ -131,30 +131,33 @@ $fields = implode(',', $fieldArray); //var_dump($fieldArray);die(); $maxLength = 0; for ($i = 1; $i <= $record_numbers; $i++) { - if ($startlinenb && $i < $startlinenb) - continue; - if ($endlinenb && $i > $endlinenb) - continue; - $row = dbase_get_record_with_names($fhandle, $i); - if ($row === false || (isset($row["deleted"]) && $row["deleted"] == '1')) - continue; - $sqlInsert = "INSERT INTO `$table_name`($fields) VALUES (null,"; - array_shift($row); // remove delete column - foreach ($row as $value) { - $sqlInsert .= "'" . $db->escape(utf8_encode($value)) . "', "; - } - replaceable_echo(implode("\t", $row)); - $sqlInsert = rtrim($sqlInsert, ', '); - $sqlInsert .= ")"; - $resql = $db->query($sqlInsert); - if ($resql === false) { - print "Impossible : " . $sqlInsert . "\n"; - var_dump($row, $db->errno()); - die(); - } + if ($startlinenb && $i < $startlinenb) { + continue; + } + if ($endlinenb && $i > $endlinenb) { + continue; + } + $row = dbase_get_record_with_names($fhandle, $i); + if ($row === false || (isset($row["deleted"]) && $row["deleted"] == '1')) { + continue; + } + $sqlInsert = "INSERT INTO `$table_name`($fields) VALUES (null,"; + array_shift($row); // remove delete column + foreach ($row as $value) { + $sqlInsert .= "'" . $db->escape(utf8_encode($value)) . "', "; + } + replaceable_echo(implode("\t", $row)); + $sqlInsert = rtrim($sqlInsert, ', '); + $sqlInsert .= ")"; + $resql = $db->query($sqlInsert); + if ($resql === false) { + print "Impossible : " . $sqlInsert . "\n"; + var_dump($row, $db->errno()); + die(); + } // $fields = (object) $row; // var_dump($fields); - continue; + continue; } die(); @@ -166,11 +169,11 @@ die(); print "Nb of lines qualified: " . $nboflines . "\n"; print "Nb of errors: " . $error . "\n"; if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { - print "Rollback any changes.\n"; - $db->rollback(); + print "Rollback any changes.\n"; + $db->rollback(); } else { - print "Commit all changes.\n"; - $db->commit(); + print "Commit all changes.\n"; + $db->commit(); } $db->close(); @@ -189,43 +192,43 @@ exit($error); */ function replaceable_echo($message, $force_clear_lines = null) { - static $last_lines = 0; + static $last_lines = 0; - if (!is_null($force_clear_lines)) { - $last_lines = $force_clear_lines; - } + if (!is_null($force_clear_lines)) { + $last_lines = $force_clear_lines; + } - $toss = array(); - $status = 0; - $term_width = exec('tput cols', $toss, $status); - if ($status) { - $term_width = 64; // Arbitrary fall-back term width. - } + $toss = array(); + $status = 0; + $term_width = exec('tput cols', $toss, $status); + if ($status) { + $term_width = 64; // Arbitrary fall-back term width. + } - $line_count = 0; - foreach (explode("\n", $message) as $line) { - $line_count += count(str_split($line, $term_width)); - } + $line_count = 0; + foreach (explode("\n", $message) as $line) { + $line_count += count(str_split($line, $term_width)); + } - // Erasure MAGIC: Clear as many lines as the last output had. - for ($i = 0; $i < $last_lines; $i++) { - // Return to the beginning of the line - echo "\r"; - // Erase to the end of the line - echo "\033[K"; - // Move cursor Up a line - echo "\033[1A"; - // Return to the beginning of the line - echo "\r"; - // Erase to the end of the line - echo "\033[K"; - // Return to the beginning of the line - echo "\r"; - // Can be consolodated into - // echo "\r\033[K\033[1A\r\033[K\r"; - } + // Erasure MAGIC: Clear as many lines as the last output had. + for ($i = 0; $i < $last_lines; $i++) { + // Return to the beginning of the line + echo "\r"; + // Erase to the end of the line + echo "\033[K"; + // Move cursor Up a line + echo "\033[1A"; + // Return to the beginning of the line + echo "\r"; + // Erase to the end of the line + echo "\033[K"; + // Return to the beginning of the line + echo "\r"; + // Can be consolodated into + // echo "\r\033[K\033[1A\r\033[K\r"; + } - $last_lines = $line_count; + $last_lines = $line_count; - echo $message . "\n"; + echo $message . "\n"; } diff --git a/dev/initdata/dbf/importdb-products.php b/dev/initdata/dbf/importdb-products.php index 2c06c07e103..6da24faee4e 100644 --- a/dev/initdata/dbf/importdb-products.php +++ b/dev/initdata/dbf/importdb-products.php @@ -29,8 +29,8 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path = dirname(__FILE__) . '/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -50,18 +50,18 @@ $confirmed = 1; $error = 0; $tvas = [ - '1' => "20.00", - '2' => "5.50", - '3' => "0.00", - '4' => "20.60", - '5' => "19.60", + '1' => "20.00", + '2' => "5.50", + '3' => "0.00", + '4' => "20.60", + '5' => "19.60", ]; $tvasD = [ - '1' => "20", - '2' => "5.5", - '3' => "0", - '4' => "20", - '5' => "20", + '1' => "20", + '2' => "5.5", + '3' => "0", + '4' => "20", + '5' => "20", ]; /* @@ -75,159 +75,167 @@ dol_syslog($script_file . " launched with arg " . implode(',', $argv)); $table = $argv[1]; if (empty($argv[1])) { - print "Error: Which table ?\n"; - print "\n"; - exit(-1); + print "Error: Which table ?\n"; + print "\n"; + exit(-1); } $ret = $user->fetch('', 'admin'); if (!$ret > 0) { - print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; - exit; + print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; + exit; } $sql = "SELECT * FROM `$table` WHERE 1"; $resql = $db->query($sql); -if ($resql) -while ($fields = $db->fetch_array($resql)) { - $errorrecord = 0; - if ($fields === false) - continue; - $nboflines++; - - $produit = new Product($db); - $produit->type = 0; - $produit->status = 1; - $produit->ref = trim($fields['REF']); - if ($produit->ref == '') - continue; - print "Process line nb " . $j . ", ref " . $produit->ref; - $produit->label = trim($fields['LIBELLE']); - if ($produit->label == '') - $produit->label = $produit->ref; - if (empty($produit->label)) - continue; - //$produit->description = trim($fields[4] . "\n" . ($fields[5] ? $fields[5] . ' x ' . $fields[6] . ' x ' . $fields[7] : '')); - // $produit->volume = price2num($fields[8]); - // $produit->volume_unit = 0; - $produit->weight = price2num($fields['MASSE']); - $produit->weight_units = 0; // -3 = g - //$produit->customcode = $fields[10]; - $produit->barcode = str_pad($fields['CODE'], 12, "0", STR_PAD_LEFT); - $produit->barcode_type = '2'; - $produit->import_key = $fields['CODE']; - - $produit->status = 1; - $produit->status_buy = 1; - - $produit->finished = 1; - - // $produit->multiprices[0] = price2num($fields['TARIF0']); - // $produit->multiprices[1] = price2num($fields['TARIF1']); - // $produit->multiprices[2] = price2num($fields['TARIF2']); - // $produit->multiprices[3] = price2num($fields['TARIF3']); - // $produit->multiprices[4] = price2num($fields['TARIF4']); - // $produit->multiprices[5] = price2num($fields['TARIF5']); - // $produit->multiprices[6] = price2num($fields['TARIF6']); - // $produit->multiprices[7] = price2num($fields['TARIF7']); - // $produit->multiprices[8] = price2num($fields['TARIF8']); - // $produit->multiprices[9] = price2num($fields['TARIF9']); - // $produit->price_min = null; - // $produit->price_min_ttc = null; - // $produit->price = price2num($fields[11]); - // $produit->price_ttc = price2num($fields[12]); - // $produit->price_base_type = 'TTC'; - // $produit->tva_tx = price2num($fields[13]); - $produit->tva_tx = (int) ($tvas[$fields['CODTVA']]); - $produit->tva_npr = 0; - // $produit->cost_price = price2num($fields[16]); - //compta - - $produit->accountancy_code_buy = trim($fields['COMACH']); - $produit->accountancy_code_sell = trim($fields['COMVEN']); - // $produit->accountancy_code_sell_intra=trim($fields['COMVEN']); - // $produit->accountancy_code_sell_export=trim($fields['COMVEN']); - // Extrafields - // $produit->array_options['options_ecotaxdeee'] = price2num($fields[17]); - - $produit->seuil_stock_alerte = $fields['STALERTE']; - $ret = $produit->create($user, 0); - if ($ret < 0) { - print " - Error in create result code = " . $ret . " - " . $produit->errorsToString(); - $errorrecord++; - } else { - print " - Creation OK with ref " . $produit->ref . " - id = " . $ret; - } - - dol_syslog("Add prices"); - - // If we use price level, insert price for each level - if (!$errorrecord && 1) { - //$ret1 = $produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array()); - $ret1 = false; - for ($i = 0; $i < 10; $i++) { - if ($fields['TARIF' . ($i)] == 0) - continue; - $ret1 = $ret1 || $produit->updatePrice(price2num($fields['TARIF' . ($i)]), 'HT', $user, $produit->tva_tx, $produit->price_min, $i + 1, $produit->tva_npr, 0, 0, array()) < 0; +if ($resql) { + while ($fields = $db->fetch_array($resql)) { + $errorrecord = 0; + if ($fields === false) { + continue; } - if ($ret1) { - print " - Error in updatePrice result " . $produit->errorsToString(); + $nboflines++; + + $produit = new Product($db); + $produit->type = 0; + $produit->status = 1; + $produit->ref = trim($fields['REF']); + if ($produit->ref == '') { + continue; + } + print "Process line nb " . $j . ", ref " . $produit->ref; + $produit->label = trim($fields['LIBELLE']); + if ($produit->label == '') { + $produit->label = $produit->ref; + } + if (empty($produit->label)) { + continue; + } + //$produit->description = trim($fields[4] . "\n" . ($fields[5] ? $fields[5] . ' x ' . $fields[6] . ' x ' . $fields[7] : '')); + // $produit->volume = price2num($fields[8]); + // $produit->volume_unit = 0; + $produit->weight = price2num($fields['MASSE']); + $produit->weight_units = 0; // -3 = g + //$produit->customcode = $fields[10]; + $produit->barcode = str_pad($fields['CODE'], 12, "0", STR_PAD_LEFT); + $produit->barcode_type = '2'; + $produit->import_key = $fields['CODE']; + + $produit->status = 1; + $produit->status_buy = 1; + + $produit->finished = 1; + + // $produit->multiprices[0] = price2num($fields['TARIF0']); + // $produit->multiprices[1] = price2num($fields['TARIF1']); + // $produit->multiprices[2] = price2num($fields['TARIF2']); + // $produit->multiprices[3] = price2num($fields['TARIF3']); + // $produit->multiprices[4] = price2num($fields['TARIF4']); + // $produit->multiprices[5] = price2num($fields['TARIF5']); + // $produit->multiprices[6] = price2num($fields['TARIF6']); + // $produit->multiprices[7] = price2num($fields['TARIF7']); + // $produit->multiprices[8] = price2num($fields['TARIF8']); + // $produit->multiprices[9] = price2num($fields['TARIF9']); + // $produit->price_min = null; + // $produit->price_min_ttc = null; + // $produit->price = price2num($fields[11]); + // $produit->price_ttc = price2num($fields[12]); + // $produit->price_base_type = 'TTC'; + // $produit->tva_tx = price2num($fields[13]); + $produit->tva_tx = (int) ($tvas[$fields['CODTVA']]); + $produit->tva_npr = 0; + // $produit->cost_price = price2num($fields[16]); + //compta + + $produit->accountancy_code_buy = trim($fields['COMACH']); + $produit->accountancy_code_sell = trim($fields['COMVEN']); + // $produit->accountancy_code_sell_intra=trim($fields['COMVEN']); + // $produit->accountancy_code_sell_export=trim($fields['COMVEN']); + // Extrafields + // $produit->array_options['options_ecotaxdeee'] = price2num($fields[17]); + + $produit->seuil_stock_alerte = $fields['STALERTE']; + $ret = $produit->create($user, 0); + if ($ret < 0) { + print " - Error in create result code = " . $ret . " - " . $produit->errorsToString(); $errorrecord++; } else { - print " - updatePrice OK"; + print " - Creation OK with ref " . $produit->ref . " - id = " . $ret; } - } + dol_syslog("Add prices"); - // dol_syslog("Add multilangs"); - // Add alternative languages - // if (!$errorrecord && 1) { - // $produit->multilangs['fr_FR'] = array('label' => $produit->label, 'description' => $produit->description, 'note' => $produit->note_private); - // $produit->multilangs['en_US'] = array('label' => $fields[3], 'description' => $produit->description, 'note' => $produit->note_private); - // - // $ret = $produit->setMultiLangs($user); - // if ($ret < 0) { - // print " - Error in setMultiLangs result code = " . $ret . " - " . $produit->errorsToString(); - // $errorrecord++; - // } else { - // print " - setMultiLangs OK"; - // } - // } - - - dol_syslog("Add stocks"); - // stocks - if (!$errorrecord && $fields['STOCK'] != 0) { - $rets = $produit->correct_stock($user, 1, $fields['STOCK'], 0, 'Stock importé'); - if ($rets < 0) { - print " - Error in correct_stock result " . $produit->errorsToString(); - $errorrecord++; - } else { - print " - correct_stock OK"; + // If we use price level, insert price for each level + if (!$errorrecord && 1) { + //$ret1 = $produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array()); + $ret1 = false; + for ($i = 0; $i < 10; $i++) { + if ($fields['TARIF' . ($i)] == 0) { + continue; + } + $ret1 = $ret1 || $produit->updatePrice(price2num($fields['TARIF' . ($i)]), 'HT', $user, $produit->tva_tx, $produit->price_min, $i + 1, $produit->tva_npr, 0, 0, array()) < 0; + } + if ($ret1) { + print " - Error in updatePrice result " . $produit->errorsToString(); + $errorrecord++; + } else { + print " - updatePrice OK"; + } } - } - //update date créa - if (!$errorrecord) { - $date = substr($fields['DATCREA'], 0, 4) . '-' . substr($fields['DATCREA'], 4, 2) . '-' . substr($fields['DATCREA'], 6, 2); - $retd = $db->query("UPDATE `llx_product` SET `datec` = '$date 00:00:00' WHERE `llx_product`.`rowid` = $produit->id"); - if ($retd < 1) { - print " - Error in update date créa result " . $produit->errorsToString(); - $errorrecord++; - } else { - print " - update date créa OK"; + + // dol_syslog("Add multilangs"); + // Add alternative languages + // if (!$errorrecord && 1) { + // $produit->multilangs['fr_FR'] = array('label' => $produit->label, 'description' => $produit->description, 'note' => $produit->note_private); + // $produit->multilangs['en_US'] = array('label' => $fields[3], 'description' => $produit->description, 'note' => $produit->note_private); + // + // $ret = $produit->setMultiLangs($user); + // if ($ret < 0) { + // print " - Error in setMultiLangs result code = " . $ret . " - " . $produit->errorsToString(); + // $errorrecord++; + // } else { + // print " - setMultiLangs OK"; + // } + // } + + + dol_syslog("Add stocks"); + // stocks + if (!$errorrecord && $fields['STOCK'] != 0) { + $rets = $produit->correct_stock($user, 1, $fields['STOCK'], 0, 'Stock importé'); + if ($rets < 0) { + print " - Error in correct_stock result " . $produit->errorsToString(); + $errorrecord++; + } else { + print " - correct_stock OK"; + } } - } - print "\n"; - if ($errorrecord) { - print( 'Error on record nb ' . $i . " - " . $produit->errorsToString() . "\n"); - var_dump($db); - die(); - $error++; // $errorrecord will be reset + //update date créa + if (!$errorrecord) { + $date = substr($fields['DATCREA'], 0, 4) . '-' . substr($fields['DATCREA'], 4, 2) . '-' . substr($fields['DATCREA'], 6, 2); + $retd = $db->query("UPDATE `llx_product` SET `datec` = '$date 00:00:00' WHERE `llx_product`.`rowid` = $produit->id"); + if ($retd < 1) { + print " - Error in update date créa result " . $produit->errorsToString(); + $errorrecord++; + } else { + print " - update date créa OK"; + } + } + print "\n"; + + if ($errorrecord) { + print( 'Error on record nb ' . $i . " - " . $produit->errorsToString() . "\n"); + var_dump($db); + die(); + $error++; // $errorrecord will be reset + } + $j++; } - $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 a6b2697eed8..ecb1820fad1 100644 --- a/dev/initdata/dbf/importdb-thirdparties.php +++ b/dev/initdata/dbf/importdb-thirdparties.php @@ -29,8 +29,8 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path = dirname(__FILE__) . '/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -50,73 +50,73 @@ $confirmed = 1; $error = 0; $civilPrivate = array("MLLE", - "MM", - "MM/MADAME", - "MME", - "MME.", - "MME²", - "MMONSIEUR", - "MMR", - "MOBNSIEUR", - "MOMSIEUR", - "MON SIEUR", - "MONDIAL", - "MONIEUR", - "MONJSIEUR", - "MONNSIEUR", - "MONRIEUR", - "MONS", - "MONSIEÕR", - "MONSIER", - "MONSIERU", - "MONSIEU", - "monsieue", - "MONSIEUR", - "Monsieur     \"", - "MONSIEUR    \"", - "MONSIEUR   E", - "MONSIEUR  DENIS", - "MONSIEUR ET MME", - "MONSIEUR!", - "MONSIEUR.", - "MONSIEUR.MADAME", - "MONSIEUR3", - "MONSIEURN", - "MONSIEURT", - "MONSIEUR£", - "MONSIEYR", - "Monsigur", - "MONSIIEUR", - "MONSIUER", - "MONSIZEUR", - "MOPNSIEUR", - "MOSIEUR", - "MR", - "Mr  Mme", - "Mr - MME", - "MR BLANC", - "MR ET MME", - "mr mm", - "MR OU MME", - "Mr.", - "MR/MME", - "MRME", - "MRR", - "Mrs", - "Mademoiselle", - "MADAOME", - "madamme", - "MADAME", - "M0NSIEUR", - "M.et Madame", - "M. ET MR", - "M.", - "M%", - "M MME", - "M ET MME", - "M", - "M CROCE", - "M DIEVART", + "MM", + "MM/MADAME", + "MME", + "MME.", + "MME²", + "MMONSIEUR", + "MMR", + "MOBNSIEUR", + "MOMSIEUR", + "MON SIEUR", + "MONDIAL", + "MONIEUR", + "MONJSIEUR", + "MONNSIEUR", + "MONRIEUR", + "MONS", + "MONSIEÕR", + "MONSIER", + "MONSIERU", + "MONSIEU", + "monsieue", + "MONSIEUR", + "Monsieur     \"", + "MONSIEUR    \"", + "MONSIEUR   E", + "MONSIEUR  DENIS", + "MONSIEUR ET MME", + "MONSIEUR!", + "MONSIEUR.", + "MONSIEUR.MADAME", + "MONSIEUR3", + "MONSIEURN", + "MONSIEURT", + "MONSIEUR£", + "MONSIEYR", + "Monsigur", + "MONSIIEUR", + "MONSIUER", + "MONSIZEUR", + "MOPNSIEUR", + "MOSIEUR", + "MR", + "Mr  Mme", + "Mr - MME", + "MR BLANC", + "MR ET MME", + "mr mm", + "MR OU MME", + "Mr.", + "MR/MME", + "MRME", + "MRR", + "Mrs", + "Mademoiselle", + "MADAOME", + "madamme", + "MADAME", + "M0NSIEUR", + "M.et Madame", + "M. ET MR", + "M.", + "M%", + "M MME", + "M ET MME", + "M", + "M CROCE", + "M DIEVART", ); /* @@ -130,128 +130,134 @@ dol_syslog($script_file . " launched with arg " . implode(',', $argv)); $table = $argv[1]; if (empty($argv[1])) { - print "Error: Quelle table ?\n"; - print "\n"; - exit(-1); + print "Error: Quelle table ?\n"; + print "\n"; + exit(-1); } $ret = $user->fetch('', 'admin'); if (!$ret > 0) { - print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; - exit; + print 'A user with login "admin" and all permissions must be created to use this script.' . "\n"; + exit; } $sql = "SELECT * FROM `$table` WHERE 1 "; //ORDER BY REMISE DESC,`LCIVIL` DESC"; $resql = $db->query($sql); //$db->begin(); -if ($resql) -while ($fields = $db->fetch_array($resql)) { - $i++; - $errorrecord = 0; +if ($resql) { + while ($fields = $db->fetch_array($resql)) { + $i++; + $errorrecord = 0; - if ($startlinenb && $i < $startlinenb) - continue; - if ($endlinenb && $i > $endlinenb) - continue; - - $nboflines++; - - $object = new Societe($db); - $object->import_key = $fields['CODE']; - $object->state = 1; - $object->client = 3; - $object->fournisseur = 0; - - $object->name = $fields['FCIVIL'] . ' ' . $fields['FNOM']; - //$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : ''; - - $date = $fields['DATCREA'] ? $fields['DATCREA'] : ($fields['DATMOD'] ? $fields['DATMOD'] : '20200101'); - $object->code_client = 'CU' . substr($date, 2, 2) . substr($date, 4, 2) . '-' . str_pad(substr($fields['CODE'], 0, 5), 5, "0", STR_PAD_LEFT); - - - $object->address = trim($fields['FADR1']); - if ($fields['FADR2']) - $object->address .= "\n" . trim($fields['FADR2']); - if ($fields['FADR3']) - $object->address .= "\n" . trim($fields['FADR3']); - - $object->zip = trim($fields['FPOSTE']); - $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; - $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']); - $object->fax = substr($object->fax, 0, 20); - $object->email = trim($fields['FMAIL']); - // $object->idprof2 = trim($fields[29]); - $object->tva_intra = str_replace(['.', ' '], '', $fields['TVAINTRA']); - $object->tva_intra = substr($object->tva_intra, 0, 20); - $object->default_lang = 'fr_FR'; - - $object->cond_reglement_id = dol_getIdFromCode($db, 'PT_ORDER', 'c_payment_term', 'code', 'rowid', 1); - $object->multicurrency_code = 'EUR'; - - if ($fields['REMISE'] != '0.00') { - $object->remise_percent = abs($fields['REMISE']); - } - - // $object->code_client = $fields[9]; - // $object->code_fournisseur = $fields[10]; - - - if ($fields['FCIVIL']) { - $labeltype = in_array($fields['FCIVIL'], $civilPrivate) ? 'TE_PRIVATE' : 'TE_SMALL'; - $object->typent_id = dol_getIdFromCode($db, $labeltype, 'c_typent', 'code'); - } - - // Set price level - $object->price_level = $fields['TARIF'] + 1; - // if ($labeltype == 'Revendeur') - // $object->price_level = 2; - - print "Process line nb " . $i . ", code " . $fields['CODE'] . ", name " . $object->name; - - - // Extrafields - $object->array_options['options_banque'] = $fields['BANQUE']; - $object->array_options['options_banque2'] = $fields['BANQUE2']; - $object->array_options['options_banquevalid'] = $fields['VALID']; - - if (!$errorrecord) { - $ret = $object->create($user); - if ($ret < 0) { - print " - Error in create result code = " . $ret . " - " . $object->errorsToString(); - $errorrecord++; - var_dump($object->code_client, $db); - die(); - } else { - print " - Creation OK with name " . $object->name . " - id = " . $ret; + if ($startlinenb && $i < $startlinenb) { + continue; + } + if ($endlinenb && $i > $endlinenb) { + continue; } - } - if (!$errorrecord) { - dol_syslog("Set price level"); - $object->set_price_level($object->price_level, $user); - } - if (!$errorrecord && @$object->remise_percent) { - dol_syslog("Set remise client"); - $object->set_remise_client($object->remise_percent, 'Importé', $user); - } + $nboflines++; - dol_syslog("Add contact"); - // Insert an invoice contact if there is an invoice email != standard email - if (!$errorrecord && ($fields['LCIVIL'] || $fields['LNOM'])) { - $madame = array("MADAME", + $object = new Societe($db); + $object->import_key = $fields['CODE']; + $object->state = 1; + $object->client = 3; + $object->fournisseur = 0; + + $object->name = $fields['FCIVIL'] . ' ' . $fields['FNOM']; + //$object->name_alias = $fields[0] != $fields[13] ? trim($fields[0]) : ''; + + $date = $fields['DATCREA'] ? $fields['DATCREA'] : ($fields['DATMOD'] ? $fields['DATMOD'] : '20200101'); + $object->code_client = 'CU' . substr($date, 2, 2) . substr($date, 4, 2) . '-' . str_pad(substr($fields['CODE'], 0, 5), 5, "0", STR_PAD_LEFT); + + + $object->address = trim($fields['FADR1']); + if ($fields['FADR2']) { + $object->address .= "\n" . trim($fields['FADR2']); + } + if ($fields['FADR3']) { + $object->address .= "\n" . trim($fields['FADR3']); + } + + $object->zip = trim($fields['FPOSTE']); + $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; + } + $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']); + $object->fax = substr($object->fax, 0, 20); + $object->email = trim($fields['FMAIL']); + // $object->idprof2 = trim($fields[29]); + $object->tva_intra = str_replace(['.', ' '], '', $fields['TVAINTRA']); + $object->tva_intra = substr($object->tva_intra, 0, 20); + $object->default_lang = 'fr_FR'; + + $object->cond_reglement_id = dol_getIdFromCode($db, 'PT_ORDER', 'c_payment_term', 'code', 'rowid', 1); + $object->multicurrency_code = 'EUR'; + + if ($fields['REMISE'] != '0.00') { + $object->remise_percent = abs($fields['REMISE']); + } + + // $object->code_client = $fields[9]; + // $object->code_fournisseur = $fields[10]; + + + if ($fields['FCIVIL']) { + $labeltype = in_array($fields['FCIVIL'], $civilPrivate) ? 'TE_PRIVATE' : 'TE_SMALL'; + $object->typent_id = dol_getIdFromCode($db, $labeltype, 'c_typent', 'code'); + } + + // Set price level + $object->price_level = $fields['TARIF'] + 1; + // if ($labeltype == 'Revendeur') + // $object->price_level = 2; + + print "Process line nb " . $i . ", code " . $fields['CODE'] . ", name " . $object->name; + + + // Extrafields + $object->array_options['options_banque'] = $fields['BANQUE']; + $object->array_options['options_banque2'] = $fields['BANQUE2']; + $object->array_options['options_banquevalid'] = $fields['VALID']; + + if (!$errorrecord) { + $ret = $object->create($user); + if ($ret < 0) { + print " - Error in create result code = " . $ret . " - " . $object->errorsToString(); + $errorrecord++; + var_dump($object->code_client, $db); + die(); + } else { + print " - Creation OK with name " . $object->name . " - id = " . $ret; + } + } + + if (!$errorrecord) { + dol_syslog("Set price level"); + $object->set_price_level($object->price_level, $user); + } + if (!$errorrecord && @$object->remise_percent) { + dol_syslog("Set remise client"); + $object->set_remise_client($object->remise_percent, 'Importé', $user); + } + + dol_syslog("Add contact"); + // Insert an invoice contact if there is an invoice email != standard email + if (!$errorrecord && ($fields['LCIVIL'] || $fields['LNOM'])) { + $madame = array("MADAME", "MADEMOISELLE", "MELLE", "MLLE", "MM", "Mme", "MNE", - ); - $monsieur = array("M", + ); + $monsieur = array("M", "M ET MME", "M MME", "M.", @@ -268,77 +274,84 @@ while ($fields = $db->fetch_array($resql)) { "MONSIUER", "MONSKIEUR", "MR", - ); - $ret1 = $ret2 = 0; + ); + $ret1 = $ret2 = 0; - $contact = new Contact($db); - if (in_array($fields['LCIVIL'], $madame)) { - // une dame - $contact->civility_id = 'MME'; - $contact->lastname = $fields['LNOM']; - } elseif (in_array($fields['LCIVIL'], $monsieur)) { - // un monsieur - $contact->civility_id = 'MR'; - $contact->lastname = $fields['LNOM']; - } elseif (in_array($fields['LCIVIL'], ['DOCTEUR'])) { - // un monsieur - $contact->civility_id = 'DR'; - $contact->lastname = $fields['LNOM']; - } else { - // un a rattraper - $contact->lastname = $fields['LCIVIL'] . " " . $fields['LNOM']; - } - $contact->address = trim($fields['LADR1']); - if ($fields['LADR2']) - $contact->address .= "\n" . trim($fields['LADR2']); - if ($fields['LADR3']) - $contact->address .= "\n" . trim($fields['LADR3']); + $contact = new Contact($db); + if (in_array($fields['LCIVIL'], $madame)) { + // une dame + $contact->civility_id = 'MME'; + $contact->lastname = $fields['LNOM']; + } elseif (in_array($fields['LCIVIL'], $monsieur)) { + // un monsieur + $contact->civility_id = 'MR'; + $contact->lastname = $fields['LNOM']; + } elseif (in_array($fields['LCIVIL'], ['DOCTEUR'])) { + // un monsieur + $contact->civility_id = 'DR'; + $contact->lastname = $fields['LNOM']; + } else { + // un a rattraper + $contact->lastname = $fields['LCIVIL'] . " " . $fields['LNOM']; + } + $contact->address = trim($fields['LADR1']); + if ($fields['LADR2']) { + $contact->address .= "\n" . trim($fields['LADR2']); + } + if ($fields['LADR3']) { + $contact->address .= "\n" . trim($fields['LADR3']); + } - $contact->zip = trim($fields['LPOSTE']); - $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; - $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']); - $contact->socid = $object->id; + $contact->zip = trim($fields['LPOSTE']); + $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; + } + $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']); + $contact->socid = $object->id; - $ret1 = $contact->create($user); - if ($ret1 > 0) { - //$ret2=$contact->add_contact($object->id, 'BILLING'); + $ret1 = $contact->create($user); + if ($ret1 > 0) { + //$ret2=$contact->add_contact($object->id, 'BILLING'); + } + if ($ret1 < 0 || $ret2 < 0) { + print " - Error in create contact result code = " . $ret1 . " " . $ret2 . " - " . $contact->errorsToString(); + $errorrecord++; + } else { + print " - create contact OK"; + } } - if ($ret1 < 0 || $ret2 < 0) { - print " - Error in create contact result code = " . $ret1 . " " . $ret2 . " - " . $contact->errorsToString(); - $errorrecord++; - } else { - print " - create contact OK"; + + + //update date créa + if (!$errorrecord) { + $datec = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2); + $retd = $db->query("UPDATE `llx_societe` SET `datec` = '$datec 00:00:00' WHERE `rowid` = $object->id"); + if ($retd < 1) { + print " - Error in update date créa result " . $object->errorsToString(); + $errorrecord++; + } else { + print " - update date créa OK"; + } } + print "\n"; + + if ($errorrecord) { + print( 'Error on record nb ' . $i . " - " . $object->errorsToString() . "\n"); + var_dump($db, $object, $contact); + // $db->rollback(); + die(); + $error++; // $errorrecord will be reset + } + $j++; } - - - //update date créa - if (!$errorrecord) { - $datec = substr($date, 0, 4) . '-' . substr($date, 4, 2) . '-' . substr($date, 6, 2); - $retd = $db->query("UPDATE `llx_societe` SET `datec` = '$datec 00:00:00' WHERE `rowid` = $object->id"); - if ($retd < 1) { - print " - Error in update date créa result " . $object->errorsToString(); - $errorrecord++; - } else { - print " - update date créa OK"; - } - } - print "\n"; - - if ($errorrecord) { - print( 'Error on record nb ' . $i . " - " . $object->errorsToString() . "\n"); - var_dump($db, $object, $contact); - // $db->rollback(); - die(); - $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 e70f18087c4..a225d67cde9 100644 --- a/dev/initdata/dbf/includes/dbase.class.php +++ b/dev/initdata/dbf/includes/dbase.class.php @@ -18,382 +18,582 @@ define('DBASE_TYPE_FOXPRO', 1); */ class DBase { - private $fd; - private $headerLength = 0; - private $fields = array(); - private $fieldCount = 0; - private $recordLength = 0; - private $recordCount = 0; + private $fd; + private $headerLength = 0; + private $fields = array(); + private $fieldCount = 0; + private $recordLength = 0; + private $recordCount = 0; - //resource dbase_open ( string $filename , int $mode ) - public static function open($filename, $mode) + /** + * resource dbase_open + * @param string $filename filename + * @param int $mode mode + * @return DBase + */ + public static function open($filename, $mode) { - if (!file_exists($filename)) - return false; - $modes = array('r', 'w', 'r+'); - $mode = $modes[$mode]; - $fd = fopen($filename, $mode); - if (!$fd) - return false; - return new DBase($fd); - } + if (!file_exists($filename)) { + return false; + } + $modes = array('r', 'w', 'r+'); + $mode = $modes[$mode]; + $fd = fopen($filename, $mode); + if (!$fd) { + return false; + } + return new DBase($fd); + } - //resource dbase_create ( string $filename , array $fields [, int $type = DBASE_TYPE_DBASE ] ) - public static function create($filename, $fields, $type = DBASE_TYPE_DBASE) + /** + * resource dbase_create + * @param string $filename filename + * @param array $fields fields + * @param int $type DBASE_TYPE_DBASE + * @return DBase + */ + public static function create($filename, $fields, $type = DBASE_TYPE_DBASE) { - if (file_exists($filename)) - return false; - $fd = fopen($filename, 'c+'); - if (!$fd) - return false; - // Byte 0 (1 byte): Valid dBASE for DOS file; bits 0-2 indicate version number, bit 3 - // indicates the presence of a dBASE for DOS memo file, bits 4-6 indicate the - // presence of a SQL table, bit 7 indicates the presence of any memo file - // (either dBASE m PLUS or dBASE for DOS) - self::putChar8($fd, 5); - // Byte 1-3 (3 bytes): Date of last update; formatted as YYMMDD - self::putChar8($fd, date('Y') - 1900); - self::putChar8($fd, date('m')); - self::putChar8($fd, date('d')); - // Byte 4-7 (32-bit number): Number of records in the database file. Currently 0 - self::putInt32($fd, 0); - // Byte 8-9 (16-bit number): Number of bytes in the header. - self::putInt16($fd, 32 + (32 * count($fields)) + 1); - // Byte 10-11 (16-bit number): Number of bytes in record. - // Make sure the include the byte for deleted flag - $len = 1; - foreach ($fields as &$field) - $len += self::length($field); - self::putInt16($fd, $len); - // Byte 12-13 (2 bytes): Reserved, 0 filled. - self::putInt16($fd, 0); - // Byte 14 (1 byte): Flag indicating incomplete transaction - // The ISMARKEDO function checks this flag. BEGIN TRANSACTION sets it to 1, END TRANSACTION and ROLLBACK reset it to 0. - self::putChar8($fd, 0); - // Byte 15 (1 byte): Encryption flag. If this flag is set to 1, the message Database encrypted appears. Changing this flag to 0 removes the message, but does not decrypt the file. - self::putChar8($fd, 0); - // Byte 16-27 (12 bytes): Reserved for dBASE for DOS in a multi-user environment - self::putInt32($fd, 0); - self::putInt32($fd, 0); - self::putInt32($fd, 0); - // Byte 28 (1 byte): Production .mdx file flag; 0x01 if there is a production .mdx file, 0x00 if not - self::putChar8($fd, 0); - // Byte 29 (1 byte): Language driver ID - // (no clue what this is) - self::putChar8($fd, 0); - // Byte 30-31 (2 bytes): Reserved, 0 filled. - self::putInt16($fd, 0); - // Byte 32 - n (32 bytes each): Field descriptor array - foreach ($fields as &$field) { - self::putString($fd, $field[0], 11); // Byte 0 - 10 (11 bytes): Field name in ASCII (zero-filled) - self::putString($fd, $field[1], 1); // Byte 11 (1 byte): Field type in ASCII (C, D, F, L, M, or N) - self::putInt32($fd, 0); // Byte 12 - 15 (4 bytes): Reserved - self::putChar8($fd, self::length($field)); // Byte 16 (1 byte): Field length in binary. The maximum length of a field is 254 (0xFE). - self::putChar8($fd, $field[3]); // Byte 17 (1 byte): Field decimal count in binary - self::putInt16($fd, 0); // Byte 18 - 19 (2 bytes): Work area ID - self::putChar8($fd, 0); // Byte 20 (1 byte): Example (??) - self::putInt32($fd, 0); // Byte 21 - 30 (10 bytes): Reserved - self::putInt32($fd, 0); - self::putInt16($fd, 0); - self::putChar8($fd, 0); // Byte 31 (1 byte): Production MDX field flag; 1 if field has an index tag in the production MDX file, 0 if not - } - // Byte n + 1 (1 byte): 0x0D as the field descriptor array terminator - self::putChar8($fd, 0x0D); - return new DBase($fd); - } + if (file_exists($filename)) { + return false; + } + $fd = fopen($filename, 'c+'); + if (!$fd) { + return false; + } + // Byte 0 (1 byte): Valid dBASE for DOS file; bits 0-2 indicate version number, bit 3 + // indicates the presence of a dBASE for DOS memo file, bits 4-6 indicate the + // presence of a SQL table, bit 7 indicates the presence of any memo file + // (either dBASE m PLUS or dBASE for DOS) + self::putChar8($fd, 5); + // Byte 1-3 (3 bytes): Date of last update; formatted as YYMMDD + self::putChar8($fd, date('Y') - 1900); + self::putChar8($fd, date('m')); + self::putChar8($fd, date('d')); + // Byte 4-7 (32-bit number): Number of records in the database file. Currently 0 + self::putInt32($fd, 0); + // Byte 8-9 (16-bit number): Number of bytes in the header. + self::putInt16($fd, 32 + (32 * count($fields)) + 1); + // Byte 10-11 (16-bit number): Number of bytes in record. + // Make sure the include the byte for deleted flag + $len = 1; + foreach ($fields as &$field) { + $len += self::length($field); + } + self::putInt16($fd, $len); + // Byte 12-13 (2 bytes): Reserved, 0 filled. + self::putInt16($fd, 0); + // Byte 14 (1 byte): Flag indicating incomplete transaction + // The ISMARKEDO function checks this flag. BEGIN TRANSACTION sets it to 1, END TRANSACTION and ROLLBACK reset it to 0. + self::putChar8($fd, 0); + // Byte 15 (1 byte): Encryption flag. If this flag is set to 1, the message Database encrypted appears. Changing this flag to 0 removes the message, but does not decrypt the file. + self::putChar8($fd, 0); + // Byte 16-27 (12 bytes): Reserved for dBASE for DOS in a multi-user environment + self::putInt32($fd, 0); + self::putInt32($fd, 0); + self::putInt32($fd, 0); + // Byte 28 (1 byte): Production .mdx file flag; 0x01 if there is a production .mdx file, 0x00 if not + self::putChar8($fd, 0); + // Byte 29 (1 byte): Language driver ID + // (no clue what this is) + self::putChar8($fd, 0); + // Byte 30-31 (2 bytes): Reserved, 0 filled. + self::putInt16($fd, 0); + // Byte 32 - n (32 bytes each): Field descriptor array + foreach ($fields as &$field) { + self::putString($fd, $field[0], 11); // Byte 0 - 10 (11 bytes): Field name in ASCII (zero-filled) + self::putString($fd, $field[1], 1); // Byte 11 (1 byte): Field type in ASCII (C, D, F, L, M, or N) + self::putInt32($fd, 0); // Byte 12 - 15 (4 bytes): Reserved + self::putChar8($fd, self::length($field)); // Byte 16 (1 byte): Field length in binary. The maximum length of a field is 254 (0xFE). + self::putChar8($fd, $field[3]); // Byte 17 (1 byte): Field decimal count in binary + self::putInt16($fd, 0); // Byte 18 - 19 (2 bytes): Work area ID + self::putChar8($fd, 0); // Byte 20 (1 byte): Example (??) + self::putInt32($fd, 0); // Byte 21 - 30 (10 bytes): Reserved + self::putInt32($fd, 0); + self::putInt16($fd, 0); + self::putChar8($fd, 0); // Byte 31 (1 byte): Production MDX field flag; 1 if field has an index tag in the production MDX file, 0 if not + } + // Byte n + 1 (1 byte): 0x0D as the field descriptor array terminator + self::putChar8($fd, 0x0D); + return new DBase($fd); + } - // Create DBase instance - private function __construct($fd) + /** + * Create DBase instance + * @param mixed $fd file descriptor + * @return void + */ + private function __construct($fd) { - $this->fd = $fd; - // Byte 4-7 (32-bit number): Number of records in the database file. Currently 0 - fseek($this->fd, 4, SEEK_SET); - $this->recordCount = self::getInt32($fd); - // Byte 8-9 (16-bit number): Number of bytes in the header. - fseek($this->fd, 8, SEEK_SET); - $this->headerLength = self::getInt16($fd); - // Number of fields is (headerLength - 33) / 32) - $this->fieldCount = ($this->headerLength - 33) / 32; - // Byte 10-11 (16-bit number): Number of bytes in record. - fseek($this->fd, 10, SEEK_SET); - $this->recordLength = self::getInt16($fd); - // Byte 32 - n (32 bytes each): Field descriptor array - fseek($fd, 32, SEEK_SET); - for ($i = 0; $i < $this->fieldCount; $i++) { - $data = fread($this->fd, 32); - $field = array_map('trim', unpack('a11name/a1type/c4/c1length/c1precision/s1workid/c1example/c10/c1production', $data)); - $this->fields[] = $field; - } - } + $this->fd = $fd; + // Byte 4-7 (32-bit number): Number of records in the database file. Currently 0 + fseek($this->fd, 4, SEEK_SET); + $this->recordCount = self::getInt32($fd); + // Byte 8-9 (16-bit number): Number of bytes in the header. + fseek($this->fd, 8, SEEK_SET); + $this->headerLength = self::getInt16($fd); + // Number of fields is (headerLength - 33) / 32) + $this->fieldCount = ($this->headerLength - 33) / 32; + // Byte 10-11 (16-bit number): Number of bytes in record. + fseek($this->fd, 10, SEEK_SET); + $this->recordLength = self::getInt16($fd); + // Byte 32 - n (32 bytes each): Field descriptor array + fseek($fd, 32, SEEK_SET); + for ($i = 0; $i < $this->fieldCount; $i++) { + $data = fread($this->fd, 32); + $field = array_map('trim', unpack('a11name/a1type/c4/c1length/c1precision/s1workid/c1example/c10/c1production', $data)); + $this->fields[] = $field; + } + } - //bool dbase_close ( resource $dbase_identifier ) - public function close() + /** + * dbase_close + * @return void + */ + public function close() { - fclose($this->fd); - } + fclose($this->fd); + } - //array dbase_get_header_info ( resource $dbase_identifier ) - public function get_header_info() + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_get_header_info + * @return array + */ + public function get_header_info() { - return $this->fields; - } + // phpcs:disable + return $this->fields; + } - //int dbase_numfields ( resource $dbase_identifier ) - public function numfields() + /** + * dbase_numfields + * @return int + */ + public function numfields() { - return $this->fieldCount; - } + return $this->fieldCount; + } - //int dbase_numrecords ( resource $dbase_identifier ) - public function numrecords() + /** + * dbase_numrecords + * @return int + */ + public function numrecords() { - return $this->recordCount; - } + return $this->recordCount; + } - //bool dbase_add_record ( resource $dbase_identifier , array $record ) - public function add_record($record) + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_add_record + * @param array $record record + * @return bool + */ + public function add_record($record) { - if (count($record) != $this->fieldCount) - return false; - // Seek to end of file, minus the end of file marker - fseek($this->fd, 0, SEEK_END); - // Put the deleted flag - self::putChar8($this->fd, 0x20); - // Put the record - if (!$this->putRecord($record)) - return false; - // Update the record count - fseek($this->fd, 4); - self::putInt32($this->fd, ++$this->recordCount); - return true; - } + // phpcs:enable + if (count($record) != $this->fieldCount) { + return false; + } + // Seek to end of file, minus the end of file marker + fseek($this->fd, 0, SEEK_END); + // Put the deleted flag + self::putChar8($this->fd, 0x20); + // Put the record + if (!$this->putRecord($record)) { + return false; + } + // Update the record count + fseek($this->fd, 4); + self::putInt32($this->fd, ++$this->recordCount); + return true; + } - //bool dbase_replace_record ( resource $dbase_identifier , array $record , int $record_number ) - public function replace_record($record, $record_number) + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_replace_record + * @param array $record record + * @param int $record_number record number + * @return bool + */ + public function replace_record($record, $record_number) { - if (count($record) != $this->fieldCount) - return false; - if ($record_number < 1 || $record_number > $this->recordCount) - return false; - // Skip to the record location, plus the 1 byte for the deleted flag - fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1)) + 1); - return $this->putRecord($record); - } + // phpcs:enable + if (count($record) != $this->fieldCount) { + return false; + } + if ($record_number < 1 || $record_number > $this->recordCount) { + return false; + } + // Skip to the record location, plus the 1 byte for the deleted flag + fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1)) + 1); + return $this->putRecord($record); + } - //bool dbase_delete_record ( resource $dbase_identifier , int $record_number ) - public function delete_record($record_number) + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_delete_record + * @param int $record_number record number + * @return bool + */ + public function delete_record($record_number) { - if ($record_number < 1 || $record_number > $this->recordCount) - return false; - fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1))); - self::putChar8($this->fd, 0x2A); - return true; - } + // phpcs:enable + if ($record_number < 1 || $record_number > $this->recordCount) { + return false; + } + fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1))); + self::putChar8($this->fd, 0x2A); + return true; + } - //array dbase_get_record ( resource $dbase_identifier , int $record_number ) - public function get_record($record_number) + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_get_record + * @param int $record_number record number + * @return array + */ + public function get_record($record_number) { - if ($record_number < 1 || $record_number > $this->recordCount) - return false; - fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1))); - $record = array( - 'deleted' => self::getChar8($this->fd) == 0x2A ? 1 : 0 - ); - foreach ($this->fields as $i => &$field) { - $value = trim(fread($this->fd, $field['length'])); - if ($field['type'] == 'L') { - $value = strtolower($value); - if ($value == 't' || $value == 'y') - $value = true; - elseif ($value == 'f' || $value == 'n') - $value = false; - else $value = null; - } - $record[$i] = $value; - } - return $record; - } + // phpcs:enable + if ($record_number < 1 || $record_number > $this->recordCount) { + return false; + } + fseek($this->fd, $this->headerLength + ($this->recordLength * ($record_number - 1))); + $record = array( + 'deleted' => self::getChar8($this->fd) == 0x2A ? 1 : 0 + ); + foreach ($this->fields as $i => &$field) { + $value = trim(fread($this->fd, $field['length'])); + if ($field['type'] == 'L') { + $value = strtolower($value); + if ($value == 't' || $value == 'y') { + $value = true; + } elseif ($value == 'f' || $value == 'n') { + $value = false; + } else { + $value = null; + } + } + $record[$i] = $value; + } + return $record; + } - //array dbase_get_record_with_names ( resource $dbase_identifier , int $record_number ) - public function get_record_with_names($record_number) + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * dbase_get_record_with_names + * @param int $record_number record number + * @return array + */ + public function get_record_with_names($record_number) { - if ($record_number < 1 || $record_number > $this->recordCount) - return false; - $record = $this->get_record($record_number); - foreach ($this->fields as $i => &$field) { - $record[$field['name']] = $record[$i]; - unset($record[$i]); - } - return $record; - } + // phpcs:enable + if ($record_number < 1 || $record_number > $this->recordCount) { + return false; + } + $record = $this->get_record($record_number); + foreach ($this->fields as $i => &$field) { + $record[$field['name']] = $record[$i]; + unset($record[$i]); + } + return $record; + } - //bool dbase_pack ( resource $dbase_identifier ) - public function pack() + /** + * dbase_pack + * @return void + */ + public function pack() { - $in_offset = $out_offset = $this->headerLength; - $new_count = 0; - $rec_count = $this->recordCount; - while ($rec_count > 0) { - fseek($this->fd, $in_offset, SEEK_SET); - $record = fread($this->fd, $this->recordLength); - $deleted = substr($record, 0, 1); - if ($deleted != '*') { - fseek($this->fd, $out_offset, SEEK_SET); - fwrite($this->fd, $record); - $out_offset += $this->recordLength; - $new_count++; - } - $in_offset += $this->recordLength; - $rec_count--; - } - ftruncate($this->fd, $out_offset); - // Update the record count - fseek($this->fd, 4); - self::putInt32($this->fd, $new_count); - } + $in_offset = $out_offset = $this->headerLength; + $new_count = 0; + $rec_count = $this->recordCount; + while ($rec_count > 0) { + fseek($this->fd, $in_offset, SEEK_SET); + $record = fread($this->fd, $this->recordLength); + $deleted = substr($record, 0, 1); + if ($deleted != '*') { + fseek($this->fd, $out_offset, SEEK_SET); + fwrite($this->fd, $record); + $out_offset += $this->recordLength; + $new_count++; + } + $in_offset += $this->recordLength; + $rec_count--; + } + ftruncate($this->fd, $out_offset); + // Update the record count + fseek($this->fd, 4); + self::putInt32($this->fd, $new_count); + } - /* - * A few utilitiy functions - */ + /* + * A few utilitiy functions + */ - private static function length($field) + /** + * @param string $field field + * @return int + */ + private static function length($field) { - switch ($field[1]) { - case 'D': // Date: Numbers and a character to separate month, day, and year (stored internally as 8 digits in YYYYMMDD format) - return 8; - case 'T': // DateTime (YYYYMMDDhhmmss.uuu) (FoxPro) - return 18; - case 'M': // Memo (ignored): All ASCII characters (stored internally as 10 digits representing a .dbt block number, right justified, padded with whitespaces) - case 'N': // Number: -.0123456789 (right justified, padded with whitespaces) - case 'F': // Float: -.0123456789 (right justified, padded with whitespaces) - case 'C': // String: All ASCII characters (padded with whitespaces up to the field's length) - return $field[2]; - case 'L': // Boolean: YyNnTtFf? (? when not initialized) - return 1; - } - return 0; - } + switch ($field[1]) { + case 'D': // Date: Numbers and a character to separate month, day, and year (stored internally as 8 digits in YYYYMMDD format) + return 8; + case 'T': // DateTime (YYYYMMDDhhmmss.uuu) (FoxPro) + return 18; + case 'M': // Memo (ignored): All ASCII characters (stored internally as 10 digits representing a .dbt block number, right justified, padded with whitespaces) + case 'N': // Number: -.0123456789 (right justified, padded with whitespaces) + case 'F': // Float: -.0123456789 (right justified, padded with whitespaces) + case 'C': // String: All ASCII characters (padded with whitespaces up to the field's length) + return $field[2]; + case 'L': // Boolean: YyNnTtFf? (? when not initialized) + return 1; + } + return 0; + } - /* - * Functions for reading and writing bytes - */ + /* + * Functions for reading and writing bytes + */ - private static function getChar8($fd) + /** + * getChar8 + * @param mixed $fd file descriptor + * @return int + */ + private static function getChar8($fd) { - return ord(fread($fd, 1)); - } + return ord(fread($fd, 1)); + } - private static function putChar8($fd, $value) + /** + * putChar8 + * @param mixed $fd file descriptor + * @param mixed $value value + * @return bool + */ + private static function putChar8($fd, $value) { - return fwrite($fd, chr($value)); - } + return fwrite($fd, chr($value)); + } - private static function getInt16($fd, $n = 1) + /** + * getInt16 + * @param mixed $fd file descriptor + * @param int $n n + * @return bool + */ + private static function getInt16($fd, $n = 1) { - $data = fread($fd, 2 * $n); - $i = unpack("S$n", $data); - if ($n == 1) - return (int) $i[1]; - else return array_merge($i); - } + $data = fread($fd, 2 * $n); + $i = unpack("S$n", $data); + if ($n == 1) { + return (int) $i[1]; + } else { + return array_merge($i); + } + } - private static function putInt16($fd, $value) + /** + * putInt16 + * @param mixed $fd file descriptor + * @param mixed $value value + * @return bool + */ + private static function putInt16($fd, $value) { - return fwrite($fd, pack('S', $value)); - } + return fwrite($fd, pack('S', $value)); + } - private static function getInt32($fd, $n = 1) + /** + * getInt32 + * @param mixed $fd file descriptor + * @param int $n n + * @return bool + */ + private static function getInt32($fd, $n = 1) { - $data = fread($fd, 4 * $n); - $i = unpack("L$n", $data); - if ($n == 1) - return (int) $i[1]; - else return array_merge($i); - } + $data = fread($fd, 4 * $n); + $i = unpack("L$n", $data); + if ($n == 1) { + return (int) $i[1]; + } else { + return array_merge($i); + } + } - private static function putInt32($fd, $value) + /** + * putint32 + * @param mixed $fd file descriptor + * @param mixed $value value + * @return bool + */ + private static function putInt32($fd, $value) { - return fwrite($fd, pack('L', $value)); - } + return fwrite($fd, pack('L', $value)); + } - private static function putString($fd, $value, $length = 254) + /** + * putString + * @param mixed $fd file descriptor + * @param mixed $value value + * @param int $length length + * @return bool + */ + private static function putString($fd, $value, $length = 254) { - $ret = fwrite($fd, pack('A' . $length, $value)); - } + $ret = fwrite($fd, pack('A' . $length, $value)); + } - private function putRecord($record) + /** + * putRecord + * @param mixed $record record + * @return bool + */ + private function putRecord($record) { - foreach ($this->fields as $i => &$field) { - $value = $record[$i]; - // Number types are right aligned with spaces - if ($field['type'] == 'N' || $field['type'] == 'F' && strlen($value) < $field['length']) { - $value = str_repeat(' ', $field['length'] - strlen($value)) . $value; - } - self::putString($this->fd, $value, $field['length']); - } - return true; - } + foreach ($this->fields as $i => &$field) { + $value = $record[$i]; + // Number types are right aligned with spaces + if ($field['type'] == 'N' || $field['type'] == 'F' && strlen($value) < $field['length']) { + $value = str_repeat(' ', $field['length'] - strlen($value)) . $value; + } + self::putString($this->fd, $value, $field['length']); + } + return true; + } } if (!function_exists('dbase_open')) { - - function dbase_open($filename, $mode) + /** + * dbase_open + * @param string $filename filename + * @param int $mode mode + * @return DBase + */ + function dbase_open($filename, $mode) { - return DBase::open($filename, $mode); - } + return DBase::open($filename, $mode); + } - function dbase_create($filename, $fields, $type = DBASE_TYPE_DBASE) + /** + * dbase_create + * @param string $filename filename + * @param array $fields fields + * @param int $type type + * @return DBase + */ + function dbase_create($filename, $fields, $type = DBASE_TYPE_DBASE) { - return DBase::create($filename, $fields, $type); - } + return DBase::create($filename, $fields, $type); + } - function dbase_close($dbase_identifier) + /** + * dbase_close + * @param Resource $dbase_identifier dbase identifier + * @return bool + */ + function dbase_close($dbase_identifier) { - return $dbase_identifier->close(); - } + return $dbase_identifier->close(); + } - function dbase_get_header_info($dbase_identifier) + /** + * dbase_get_header_info + * @param Resource $dbase_identifier dbase identifier + * @return string + */ + function dbase_get_header_info($dbase_identifier) { - return $dbase_identifier->get_header_info(); - } + return $dbase_identifier->get_header_info(); + } - function dbase_numfields($dbase_identifier) + /** + * dbase_numfields + * @param Resource $dbase_identifier dbase identifier + * @return int + */ + function dbase_numfields($dbase_identifier) { - $dbase_identifier->numfields(); - } + $dbase_identifier->numfields(); + } - function dbase_numrecords($dbase_identifier) + /** + * dbase_numrecords + * @param Resource $dbase_identifier dbase identifier + * @return int + */ + function dbase_numrecords($dbase_identifier) { - return $dbase_identifier->numrecords(); - } + return $dbase_identifier->numrecords(); + } - function dbase_add_record($dbase_identifier, $record) + /** + * dbase_add_record + * @param Resource $dbase_identifier dbase identifier + * @param array $record record + * @return bool + */ + function dbase_add_record($dbase_identifier, $record) { - return $dbase_identifier->add_record($record); - } + return $dbase_identifier->add_record($record); + } - function dbase_delete_record($dbase_identifier, $record_number) + /** + * dbase_delete_record + * @param Resource $dbase_identifier dbase identifier + * @param int $record_number record number + * @return bool + */ + function dbase_delete_record($dbase_identifier, $record_number) { - return $dbase_identifier->delete_record($record_number); - } + return $dbase_identifier->delete_record($record_number); + } - function dbase_replace_record($dbase_identifier, $record, $record_number) + /** + * dbase_replace_record + * @param Resource $dbase_identifier dbase identifier + * @param array $record record + * @param int $record_number record number + * @return bool + */ + function dbase_replace_record($dbase_identifier, $record, $record_number) { - return $dbase_identifier->replace_record($record, $record_number); - } + return $dbase_identifier->replace_record($record, $record_number); + } - function dbase_get_record($dbase_identifier, $record_number) + /** + * dbase_get_record + * @param Resource $dbase_identifier dbase identifier + * @param int $record_number record number + * @return bool + */ + function dbase_get_record($dbase_identifier, $record_number) { - return $dbase_identifier->get_record($record_number); - } + return $dbase_identifier->get_record($record_number); + } - function dbase_get_record_with_names($dbase_identifier, $record_number) + /** + * dbase_get_record_with_names + * @param Resource $dbase_identifier dbase identifier + * @param int $record_number record number + * @return bool + */ + function dbase_get_record_with_names($dbase_identifier, $record_number) { - return $dbase_identifier->get_record_with_names($record_number); - } + return $dbase_identifier->get_record_with_names($record_number); + } - function dbase_pack($dbase_identifier) + /** + * dbase_pack + * @param Resource $dbase_identifier dbase identifier + * @return bool + */ + function dbase_pack($dbase_identifier) { - return $dbase_identifier->pack(); - } + return $dbase_identifier->pack(); + } } diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index c35fe2440ef..4837e5352c7 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -48,60 +48,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"; define(GEN_NUMBER_FACTURE, 1); $year = 2016; $dates = array (mktime(12, 0, 0, 1, 3, $year), - mktime(12, 0, 0, 1, 9, $year), - mktime(12, 0, 0, 2, 13, $year), - mktime(12, 0, 0, 2, 23, $year), - mktime(12, 0, 0, 3, 30, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 5, 9, $year), - mktime(12, 0, 0, 5, 1, $year), - mktime(12, 0, 0, 5, 13, $year), - mktime(12, 0, 0, 5, 19, $year), - mktime(12, 0, 0, 5, 23, $year), - mktime(12, 0, 0, 6, 3, $year), - mktime(12, 0, 0, 6, 19, $year), - mktime(12, 0, 0, 6, 24, $year), - mktime(12, 0, 0, 7, 3, $year), - mktime(12, 0, 0, 7, 9, $year), - mktime(12, 0, 0, 7, 23, $year), - mktime(12, 0, 0, 7, 30, $year), - mktime(12, 0, 0, 8, 9, $year), - mktime(12, 0, 0, 9, 23, $year), - mktime(12, 0, 0, 10, 3, $year), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 1, 3, ($year - 1)), - mktime(12, 0, 0, 1, 9, ($year - 1)), - mktime(12, 0, 0, 2, 13, ($year - 1)), - mktime(12, 0, 0, 2, 23, ($year - 1)), - mktime(12, 0, 0, 3, 30, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 5, 9, ($year - 1)), - mktime(12, 0, 0, 5, 1, ($year - 1)), - mktime(12, 0, 0, 5, 13, ($year - 1)), - mktime(12, 0, 0, 5, 19, ($year - 1)), - mktime(12, 0, 0, 5, 23, ($year - 1)), - mktime(12, 0, 0, 6, 3, ($year - 1)), - mktime(12, 0, 0, 6, 19, ($year - 1)), - mktime(12, 0, 0, 6, 24, ($year - 1)), - mktime(12, 0, 0, 7, 3, ($year - 1)), - mktime(12, 0, 0, 7, 9, ($year - 1)), - mktime(12, 0, 0, 7, 23, ($year - 1)), - mktime(12, 0, 0, 7, 30, ($year - 1)), - mktime(12, 0, 0, 8, 9, ($year - 1)), - mktime(12, 0, 0, 9, 23, ($year - 1)), - mktime(12, 0, 0, 10, 3, ($year - 1)), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 12, 12, $year), - mktime(12, 0, 0, 12, 13, $year), + mktime(12, 0, 0, 1, 9, $year), + mktime(12, 0, 0, 2, 13, $year), + mktime(12, 0, 0, 2, 23, $year), + mktime(12, 0, 0, 3, 30, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 5, 9, $year), + mktime(12, 0, 0, 5, 1, $year), + mktime(12, 0, 0, 5, 13, $year), + mktime(12, 0, 0, 5, 19, $year), + mktime(12, 0, 0, 5, 23, $year), + mktime(12, 0, 0, 6, 3, $year), + mktime(12, 0, 0, 6, 19, $year), + mktime(12, 0, 0, 6, 24, $year), + mktime(12, 0, 0, 7, 3, $year), + mktime(12, 0, 0, 7, 9, $year), + mktime(12, 0, 0, 7, 23, $year), + mktime(12, 0, 0, 7, 30, $year), + mktime(12, 0, 0, 8, 9, $year), + mktime(12, 0, 0, 9, 23, $year), + mktime(12, 0, 0, 10, 3, $year), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 1, 3, ($year - 1)), + mktime(12, 0, 0, 1, 9, ($year - 1)), + mktime(12, 0, 0, 2, 13, ($year - 1)), + mktime(12, 0, 0, 2, 23, ($year - 1)), + mktime(12, 0, 0, 3, 30, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 5, 9, ($year - 1)), + mktime(12, 0, 0, 5, 1, ($year - 1)), + mktime(12, 0, 0, 5, 13, ($year - 1)), + mktime(12, 0, 0, 5, 19, ($year - 1)), + mktime(12, 0, 0, 5, 23, ($year - 1)), + mktime(12, 0, 0, 6, 3, ($year - 1)), + mktime(12, 0, 0, 6, 19, ($year - 1)), + mktime(12, 0, 0, 6, 24, ($year - 1)), + mktime(12, 0, 0, 7, 3, ($year - 1)), + mktime(12, 0, 0, 7, 9, ($year - 1)), + mktime(12, 0, 0, 7, 23, ($year - 1)), + mktime(12, 0, 0, 7, 30, ($year - 1)), + mktime(12, 0, 0, 8, 9, ($year - 1)), + mktime(12, 0, 0, 9, 23, ($year - 1)), + mktime(12, 0, 0, 10, 3, ($year - 1)), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 12, 12, $year), + mktime(12, 0, 0, 12, 13, $year), ); $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } @@ -111,12 +110,10 @@ $user->getrights(); $socids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1, 3)"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num_thirdparties = $db->num_rows($resql); $i = 0; - while ($i < $num_thirdparties) - { + while ($i < $num_thirdparties) { $i++; $row = $db->fetch_row($resql); $socids[$i] = $row[0]; @@ -126,12 +123,10 @@ if ($resql) $prodids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num_prods = $db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -140,8 +135,7 @@ if ($resql) $i=0; $result=0; -while ($i < GEN_NUMBER_FACTURE && $result >= 0) -{ +while ($i < GEN_NUMBER_FACTURE && $result >= 0) { $i++; $socid = mt_rand(1, $num_thirdparties); @@ -153,31 +147,27 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) $object->cond_reglement_id = 3; $object->mode_reglement_id = 3; - $fuser = new User($db); - $fuser->fetch(mt_rand(1, 2)); - $fuser->getRights(); + $fuser = new User($db); + $fuser->fetch(mt_rand(1, 2)); + $fuser->getRights(); $result=$object->create($fuser); - if ($result >= 0) - { + if ($result >= 0) { $nbp = mt_rand(2, 5); $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $prodid = mt_rand(1, $num_prods); $product=new Product($db); $result=$product->fetch($prodids[$prodid]); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type); - if ($result < 0) - { - dol_print_error($db, $propal->error); - } - $xnbp++; + if ($result < 0) { + dol_print_error($db, $propal->error); + } + $xnbp++; } - $result=$object->validate($fuser); - if ($result) - { + $result=$object->validate($fuser); + if ($result) { print " OK with ref ".$object->ref."\n";; } else { dol_print_error($db, $object->error); diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index c421e39ffe3..2c939f8e1d2 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -31,8 +31,8 @@ $path=dirname(__FILE__).'/'; // Test si mode batch $sapi_type = php_sapi_name(); if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -54,62 +54,61 @@ require_once DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"; define(GEN_NUMBER_COMMANDE, 10); $year = 2016; $dates = array (mktime(12, 0, 0, 1, 3, $year), - mktime(12, 0, 0, 1, 9, $year), - mktime(12, 0, 0, 2, 13, $year), - mktime(12, 0, 0, 2, 23, $year), - mktime(12, 0, 0, 3, 30, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 5, 9, $year), - mktime(12, 0, 0, 5, 1, $year), - mktime(12, 0, 0, 5, 13, $year), - mktime(12, 0, 0, 5, 19, $year), - mktime(12, 0, 0, 5, 23, $year), - mktime(12, 0, 0, 6, 3, $year), - mktime(12, 0, 0, 6, 19, $year), - mktime(12, 0, 0, 6, 24, $year), - mktime(12, 0, 0, 7, 3, $year), - mktime(12, 0, 0, 7, 9, $year), - mktime(12, 0, 0, 7, 23, $year), - mktime(12, 0, 0, 7, 30, $year), - mktime(12, 0, 0, 8, 9, $year), - mktime(12, 0, 0, 9, 23, $year), - mktime(12, 0, 0, 10, 3, $year), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 1, 3, ($year - 1)), - mktime(12, 0, 0, 1, 9, ($year - 1)), - mktime(12, 0, 0, 2, 13, ($year - 1)), - mktime(12, 0, 0, 2, 23, ($year - 1)), - mktime(12, 0, 0, 3, 30, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 5, 9, ($year - 1)), - mktime(12, 0, 0, 5, 1, ($year - 1)), - mktime(12, 0, 0, 5, 13, ($year - 1)), - mktime(12, 0, 0, 5, 19, ($year - 1)), - mktime(12, 0, 0, 5, 23, ($year - 1)), - mktime(12, 0, 0, 6, 3, ($year - 1)), - mktime(12, 0, 0, 6, 19, ($year - 1)), - mktime(12, 0, 0, 6, 24, ($year - 1)), - mktime(12, 0, 0, 7, 3, ($year - 1)), - mktime(12, 0, 0, 7, 9, ($year - 1)), - mktime(12, 0, 0, 7, 23, ($year - 1)), - mktime(12, 0, 0, 7, 30, ($year - 1)), - mktime(12, 0, 0, 8, 9, ($year - 1)), - mktime(12, 0, 0, 9, 23, ($year - 1)), - mktime(12, 0, 0, 10, 3, ($year - 1)), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 12, 12, $year), - mktime(12, 0, 0, 12, 13, $year), + mktime(12, 0, 0, 1, 9, $year), + mktime(12, 0, 0, 2, 13, $year), + mktime(12, 0, 0, 2, 23, $year), + mktime(12, 0, 0, 3, 30, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 5, 9, $year), + mktime(12, 0, 0, 5, 1, $year), + mktime(12, 0, 0, 5, 13, $year), + mktime(12, 0, 0, 5, 19, $year), + mktime(12, 0, 0, 5, 23, $year), + mktime(12, 0, 0, 6, 3, $year), + mktime(12, 0, 0, 6, 19, $year), + mktime(12, 0, 0, 6, 24, $year), + mktime(12, 0, 0, 7, 3, $year), + mktime(12, 0, 0, 7, 9, $year), + mktime(12, 0, 0, 7, 23, $year), + mktime(12, 0, 0, 7, 30, $year), + mktime(12, 0, 0, 8, 9, $year), + mktime(12, 0, 0, 9, 23, $year), + mktime(12, 0, 0, 10, 3, $year), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 1, 3, ($year - 1)), + mktime(12, 0, 0, 1, 9, ($year - 1)), + mktime(12, 0, 0, 2, 13, ($year - 1)), + mktime(12, 0, 0, 2, 23, ($year - 1)), + mktime(12, 0, 0, 3, 30, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 5, 9, ($year - 1)), + mktime(12, 0, 0, 5, 1, ($year - 1)), + mktime(12, 0, 0, 5, 13, ($year - 1)), + mktime(12, 0, 0, 5, 19, ($year - 1)), + mktime(12, 0, 0, 5, 23, ($year - 1)), + mktime(12, 0, 0, 6, 3, ($year - 1)), + mktime(12, 0, 0, 6, 19, ($year - 1)), + mktime(12, 0, 0, 6, 24, ($year - 1)), + mktime(12, 0, 0, 7, 3, ($year - 1)), + mktime(12, 0, 0, 7, 9, ($year - 1)), + mktime(12, 0, 0, 7, 23, ($year - 1)), + mktime(12, 0, 0, 7, 30, ($year - 1)), + mktime(12, 0, 0, 8, 9, ($year - 1)), + mktime(12, 0, 0, 9, 23, ($year - 1)), + mktime(12, 0, 0, 10, 3, ($year - 1)), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 12, 12, $year), + mktime(12, 0, 0, 12, 13, $year), ); $ret=$user->fetch('', 'admin'); -if ($ret <= 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; +if ($ret <= 0) { + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; } $user->getrights(); @@ -117,101 +116,100 @@ $societesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe where client in (1, 3)"; $resql=$db->query($sql); if ($resql) { - $num_thirdparties = $db->num_rows($resql); - $i = 0; - while ($i < $num_thirdparties) { - $i++; - $row = $db->fetch_row($resql); - $societesid[$i] = $row[0]; - } -} else { print "err"; } + $num_thirdparties = $db->num_rows($resql); + $i = 0; + while ($i < $num_thirdparties) { + $i++; + $row = $db->fetch_row($resql); + $societesid[$i] = $row[0]; + } +} else { + print "err"; +} $commandesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) { - $i++; - $row = $db->fetch_row($resql); - $commandesid[$i] = $row[0]; - } -} else { print "err"; } + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $i++; + $row = $db->fetch_row($resql); + $commandesid[$i] = $row[0]; + } +} else { + print "err"; +} $prodids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $resql = $db->query($sql); if ($resql) { - $num_prods = $db->num_rows($resql); - $i = 0; - while ($i < $num_prods) { - $i++; + $num_prods = $db->num_rows($resql); + $i = 0; + while ($i < $num_prods) { + $i++; - $row = $db->fetch_row($resql); - $prodids[$i] = $row[0]; - } + $row = $db->fetch_row($resql); + $prodids[$i] = $row[0]; + } } print "Build ".GEN_NUMBER_COMMANDE." orders\n"; -for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) -{ - print "Process order ".$s."\n"; +for ($s = 0; $s < GEN_NUMBER_COMMANDE; $s++) { + print "Process order ".$s."\n"; - $object = new Commande($db); + $object = new Commande($db); - $object->socid = $societesid[mt_rand(1, $num_thirdparties)]; - $object->date_commande = $dates[mt_rand(1, count($dates)-1)]; - $object->note = 'My small comment about this order. Hum. Nothing.'; - $object->source = 1; - $object->fk_project = 0; - $object->remise_percent = 0; - $object->shipping_method_id = mt_rand(1, 2); - $object->cond_reglement_id = mt_rand(0, 2); - $object->more_reglement_id = mt_rand(0, 7); - $object->availability_id = mt_rand(0, 1); + $object->socid = $societesid[mt_rand(1, $num_thirdparties)]; + $object->date_commande = $dates[mt_rand(1, count($dates)-1)]; + $object->note = 'My small comment about this order. Hum. Nothing.'; + $object->source = 1; + $object->fk_project = 0; + $object->remise_percent = 0; + $object->shipping_method_id = mt_rand(1, 2); + $object->cond_reglement_id = mt_rand(0, 2); + $object->more_reglement_id = mt_rand(0, 7); + $object->availability_id = mt_rand(0, 1); - $listofuserid=array(12,13,16); + $listofuserid=array(12,13,16); - $fuser = new User($db); - $fuser->fetch($listofuserid[mt_rand(0, 2)]); - $fuser->getRights(); + $fuser = new User($db); + $fuser->fetch($listofuserid[mt_rand(0, 2)]); + $fuser->getRights(); - $db->begin(); + $db->begin(); - $result=$object->create($fuser); - if ($result >= 0) - { - $nbp = mt_rand(2, 5); - $xnbp = 0; - while ($xnbp < $nbp) - { - $prodid = mt_rand(1, $num_prods); - $product=new Product($db); - $result=$product->fetch($prodids[$prodid]); - $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); - if ($result <= 0) - { - dol_print_error($db, $object->error); - } - $xnbp++; - } + $result=$object->create($fuser); + if ($result >= 0) { + $nbp = mt_rand(2, 5); + $xnbp = 0; + while ($xnbp < $nbp) { + $prodid = mt_rand(1, $num_prods); + $product=new Product($db); + $result=$product->fetch($prodids[$prodid]); + $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); + if ($result <= 0) { + dol_print_error($db, $object->error); + } + $xnbp++; + } - $result=$object->valid($fuser); - if ($result > 0) - { - $db->commit(); - print " OK with ref ".$object->ref."\n"; - } else { - print " KO\n"; - $db->rollback(); - dol_print_error($db, $object->error); - } - } else { - print " KO\n"; - $db->rollback(); - dol_print_error($db, $object->error); - } + $result=$object->valid($fuser); + if ($result > 0) { + $db->commit(); + print " OK with ref ".$object->ref."\n"; + } else { + print " KO\n"; + $db->rollback(); + dol_print_error($db, $object->error); + } + } else { + print " KO\n"; + $db->rollback(); + dol_print_error($db, $object->error); + } } diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php index a82c0262360..ea40710824c 100755 --- a/dev/initdata/generate-product.php +++ b/dev/initdata/generate-product.php @@ -31,8 +31,8 @@ $path=dirname(__FILE__).'/'; // Test si mode batch $sapi_type = php_sapi_name(); if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -54,8 +54,7 @@ define(GEN_NUMBER_PRODUIT, 100000); $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } @@ -65,38 +64,50 @@ $user->getrights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { + $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; + } } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } -} else { print "err"; } + while ($i < $num) { + $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; + } +} else { + print "err"; +} $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } -} else { print "err"; } + while ($i < $num) { + $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; + } +} else { + print "err"; +} print "Generates ".GEN_NUMBER_PRODUIT." products\n"; -for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++) -{ - print "Product ".$s; - $produit = new Product($db); - $produit->type = mt_rand(0, 1); - $produit->status = 1; - $produit->ref = ($produit->type?'S':'P').time().$s; - $produit->label = 'Label '.time().$s; - $produit->description = 'Description '.time().$s; - $produit->price = mt_rand(1, 1000); - $produit->tva_tx = "19.6"; - $ret=$produit->create($user); - if ($ret < 0) print "Error $ret - ".$produit->error."\n"; - else print " OK with ref ".$produit->ref."\n"; +for ($s = 0; $s < GEN_NUMBER_PRODUIT; $s++) { + print "Product ".$s; + $produit = new Product($db); + $produit->type = mt_rand(0, 1); + $produit->status = 1; + $produit->ref = ($produit->type?'S':'P').time().$s; + $produit->label = 'Label '.time().$s; + $produit->description = 'Description '.time().$s; + $produit->price = mt_rand(1, 999.99); + $produit->tva_tx = "20.0"; + $ret=$produit->create($user); + if ($ret < 0) { + print "Error $ret - ".$produit->error."\n"; + } else { + print " OK with ref ".$produit->ref."\n"; + } } diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 42c0c4098f2..0b1c24dc139 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -50,60 +50,59 @@ require_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"; define(GEN_NUMBER_PROPAL, 10); $year = 2016; $dates = array (mktime(12, 0, 0, 1, 3, $year), - mktime(12, 0, 0, 1, 9, $year), - mktime(12, 0, 0, 2, 13, $year), - mktime(12, 0, 0, 2, 23, $year), - mktime(12, 0, 0, 3, 30, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 4, 3, $year), - mktime(12, 0, 0, 5, 9, $year), - mktime(12, 0, 0, 5, 1, $year), - mktime(12, 0, 0, 5, 13, $year), - mktime(12, 0, 0, 5, 19, $year), - mktime(12, 0, 0, 5, 23, $year), - mktime(12, 0, 0, 6, 3, $year), - mktime(12, 0, 0, 6, 19, $year), - mktime(12, 0, 0, 6, 24, $year), - mktime(12, 0, 0, 7, 3, $year), - mktime(12, 0, 0, 7, 9, $year), - mktime(12, 0, 0, 7, 23, $year), - mktime(12, 0, 0, 7, 30, $year), - mktime(12, 0, 0, 8, 9, $year), - mktime(12, 0, 0, 9, 23, $year), - mktime(12, 0, 0, 10, 3, $year), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 1, 3, ($year - 1)), - mktime(12, 0, 0, 1, 9, ($year - 1)), - mktime(12, 0, 0, 2, 13, ($year - 1)), - mktime(12, 0, 0, 2, 23, ($year - 1)), - mktime(12, 0, 0, 3, 30, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 4, 3, ($year - 1)), - mktime(12, 0, 0, 5, 9, ($year - 1)), - mktime(12, 0, 0, 5, 1, ($year - 1)), - mktime(12, 0, 0, 5, 13, ($year - 1)), - mktime(12, 0, 0, 5, 19, ($year - 1)), - mktime(12, 0, 0, 5, 23, ($year - 1)), - mktime(12, 0, 0, 6, 3, ($year - 1)), - mktime(12, 0, 0, 6, 19, ($year - 1)), - mktime(12, 0, 0, 6, 24, ($year - 1)), - mktime(12, 0, 0, 7, 3, ($year - 1)), - mktime(12, 0, 0, 7, 9, ($year - 1)), - mktime(12, 0, 0, 7, 23, ($year - 1)), - mktime(12, 0, 0, 7, 30, ($year - 1)), - mktime(12, 0, 0, 8, 9, ($year - 1)), - mktime(12, 0, 0, 9, 23, ($year - 1)), - mktime(12, 0, 0, 10, 3, ($year - 1)), - mktime(12, 0, 0, 11, 12, $year), - mktime(12, 0, 0, 11, 13, $year), - mktime(12, 0, 0, 12, 12, $year), - mktime(12, 0, 0, 12, 13, $year), + mktime(12, 0, 0, 1, 9, $year), + mktime(12, 0, 0, 2, 13, $year), + mktime(12, 0, 0, 2, 23, $year), + mktime(12, 0, 0, 3, 30, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 4, 3, $year), + mktime(12, 0, 0, 5, 9, $year), + mktime(12, 0, 0, 5, 1, $year), + mktime(12, 0, 0, 5, 13, $year), + mktime(12, 0, 0, 5, 19, $year), + mktime(12, 0, 0, 5, 23, $year), + mktime(12, 0, 0, 6, 3, $year), + mktime(12, 0, 0, 6, 19, $year), + mktime(12, 0, 0, 6, 24, $year), + mktime(12, 0, 0, 7, 3, $year), + mktime(12, 0, 0, 7, 9, $year), + mktime(12, 0, 0, 7, 23, $year), + mktime(12, 0, 0, 7, 30, $year), + mktime(12, 0, 0, 8, 9, $year), + mktime(12, 0, 0, 9, 23, $year), + mktime(12, 0, 0, 10, 3, $year), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 1, 3, ($year - 1)), + mktime(12, 0, 0, 1, 9, ($year - 1)), + mktime(12, 0, 0, 2, 13, ($year - 1)), + mktime(12, 0, 0, 2, 23, ($year - 1)), + mktime(12, 0, 0, 3, 30, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 4, 3, ($year - 1)), + mktime(12, 0, 0, 5, 9, ($year - 1)), + mktime(12, 0, 0, 5, 1, ($year - 1)), + mktime(12, 0, 0, 5, 13, ($year - 1)), + mktime(12, 0, 0, 5, 19, ($year - 1)), + mktime(12, 0, 0, 5, 23, ($year - 1)), + mktime(12, 0, 0, 6, 3, ($year - 1)), + mktime(12, 0, 0, 6, 19, ($year - 1)), + mktime(12, 0, 0, 6, 24, ($year - 1)), + mktime(12, 0, 0, 7, 3, ($year - 1)), + mktime(12, 0, 0, 7, 9, ($year - 1)), + mktime(12, 0, 0, 7, 23, ($year - 1)), + mktime(12, 0, 0, 7, 30, ($year - 1)), + mktime(12, 0, 0, 8, 9, ($year - 1)), + mktime(12, 0, 0, 9, 23, ($year - 1)), + mktime(12, 0, 0, 10, 3, ($year - 1)), + mktime(12, 0, 0, 11, 12, $year), + mktime(12, 0, 0, 11, 13, $year), + mktime(12, 0, 0, 12, 12, $year), + mktime(12, 0, 0, 12, 13, $year), ); $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } @@ -113,12 +112,10 @@ $user->getrights(); $socids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client in (1,3)"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num_thirdparties = $db->num_rows($resql); $i = 0; - while ($i < $num_thirdparties) - { + while ($i < $num_thirdparties) { $i++; $row = $db->fetch_row($resql); $socids[$i] = $row[0]; @@ -128,12 +125,10 @@ if ($resql) $contids = array(); $sql = "SELECT rowid, fk_soc FROM ".MAIN_DB_PREFIX."socpeople"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num_conts = $db->num_rows($resql); $i = 0; - while ($i < $num_conts) - { + while ($i < $num_conts) { $i++; $row = $db->fetch_row($resql); $contids[$row[1]][0] = $row[0]; // A ameliorer @@ -143,12 +138,10 @@ if ($resql) $prodids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num_prods = $db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -159,15 +152,13 @@ $user->rights->propal->creer=1; $user->rights->propal->propal_advance->validate=1; -if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) -{ +if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"; } $i=0; $result=0; -while ($i < GEN_NUMBER_PROPAL && $result >= 0) -{ +while ($i < GEN_NUMBER_PROPAL && $result >= 0) { $i++; $socid = mt_rand(1, $num_thirdparties); print "Proposal ".$i." for socid ".$socid; @@ -177,9 +168,9 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) $object = new Propal($db); - $fuser = new User($db); - $fuser->fetch(mt_rand(1, 2)); - $fuser->getRights(); + $fuser = new User($db); + $fuser->fetch(mt_rand(1, 2)); + $fuser->getRights(); $object->contactid = $contids[$socids[$socid]][0]; $object->socid = $socids[$socid]; @@ -188,32 +179,28 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) $object->mode_reglement_id = 3; $result=$object->create($fuser); - if ($result >= 0) - { + if ($result >= 0) { $nbp = mt_rand(2, 5); $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $prodid = mt_rand(1, $num_prods); $product=new Product($db); $result=$product->fetch($prodids[$prodid]); $result=$object->addline($product->description, $product->price, mt_rand(1, 5), 0, 0, 0, $prodids[$prodid], 0); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db, $object->error); } $xnbp++; } $result=$object->valid($fuser); - if ($result > 0) - { - $db->commit(); - print " OK with ref ".$object->ref."\n"; + if ($result > 0) { + $db->commit(); + print " OK with ref ".$object->ref."\n"; } else { - print " KO\n"; - $db->rollback(); - dol_print_error($db, $object->error); + print " KO\n"; + $db->rollback(); + dol_print_error($db, $object->error); } } else { dol_print_error($db, $object->error); diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index a13e2351e9c..f60f34ac168 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -31,8 +31,8 @@ $path=dirname(__FILE__).'/'; // Test si mode batch $sapi_type = php_sapi_name(); if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -57,8 +57,7 @@ define(GEN_NUMBER_SOCIETE, 10); $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } @@ -68,8 +67,8 @@ $user->getrights(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; @@ -80,63 +79,65 @@ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { + while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } -} else { print "err"; } +} else { + print "err"; +} $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); $resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { + while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } -} else { print "err"; } +} else { + print "err"; +} print "Generates ".GEN_NUMBER_SOCIETE." companies\n"; -for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) -{ - print "Company $s\n"; - $soc = new Societe($db); - $soc->name = "Company num ".time()."$s"; - $soc->town = $listoftown[mt_rand(0, count($listoftown)-1)]; - $soc->client = mt_rand(1, 2); // Une societe sur 2 est prospect, l'autre client - $soc->fournisseur = mt_rand(0, 1); // Une societe sur 2 est fournisseur - $soc->code_client='CU'.time()."$s"; - $soc->code_fournisseur='SU'.time()."$s"; - $soc->tva_assuj=1; - $soc->country_id=1; - $soc->country_code='FR'; +for ($s = 0; $s < GEN_NUMBER_SOCIETE; $s++) { + print "Company $s\n"; + $soc = new Societe($db); + $soc->name = "Company num ".time()."$s"; + $soc->town = $listoftown[mt_rand(0, count($listoftown)-1)]; + $soc->client = mt_rand(1, 2); // Une societe sur 2 est prospect, l'autre client + $soc->fournisseur = mt_rand(0, 1); // Une societe sur 2 est fournisseur + $soc->code_client='CU'.time()."$s"; + $soc->code_fournisseur='SU'.time()."$s"; + $soc->tva_assuj=1; + $soc->country_id=1; + $soc->country_code='FR'; // Un client sur 3 a une remise de 5% - $user_remise=mt_rand(1, 3); if ($user_remise==3) $soc->remise_percent=5; + $user_remise=mt_rand(1, 3); if ($user_remise==3) { + $soc->remise_percent=5; + } print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n"; - $soc->note_private = 'Company created by the script generate-societe.php'; - $socid = $soc->create(); + $soc->note_private = 'Company created by the script generate-societe.php'; + $socid = $soc->create(); - if ($socid >= 0) - { - $rand = mt_rand(1, 4); - print "> Generates $rand contact(s)\n"; - for ($c = 0 ; $c < $rand ; $c++) - { - $contact = new Contact($db); - $contact->socid = $soc->id; - $contact->lastname = "Lastname".$c; - $contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)]; - if ( $contact->create($user) ) - { - } - } + if ($socid >= 0) { + $rand = mt_rand(1, 4); + print "> Generates $rand contact(s)\n"; + for ($c = 0; $c < $rand; $c++) { + $contact = new Contact($db); + $contact->socid = $soc->id; + $contact->lastname = "Lastname".$c; + $contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)]; + if ($contact->create($user)) { + } + } - print "Company ".$s." created nom=".$soc->name."\n"; - } else { - print "Error: ".$soc->error."\n"; - } + print "Company ".$s." created nom=".$soc->name."\n"; + } else { + print "Error: ".$soc->error."\n"; + } } diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index fb07143f972..d4e06302d56 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -30,8 +30,8 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -67,44 +67,40 @@ $startlinenb = empty($argv[4])?1:$argv[4]; $endlinenb = empty($argv[5])?0:$argv[5]; if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) { - print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n"; - print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n"; - print "\n"; - exit(-1); + print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n"; + print "Usage: $script_file test myfilepath.csv fr_FR 2 1002\n"; + print "\n"; + exit(-1); } if (! file_exists($filepath)) { - print "Error: File ".$filepath." not found.\n"; - print "\n"; - exit(-1); + print "Error: File ".$filepath." not found.\n"; + print "\n"; + exit(-1); } $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } $user->getrights(); // Ask confirmation -if (! $confirmed) -{ - print "Hit Enter to continue or CTRL+C to stop...\n"; - $input = trim(fgets(STDIN)); +if (! $confirmed) { + print "Hit Enter to continue or CTRL+C to stop...\n"; + $input = trim(fgets(STDIN)); } // Open input and output files $fhandle = fopen($filepath, 'r'); -if (! $fhandle) -{ - print 'Error: Failed to open file '.$filepath."\n"; - exit(1); +if (! $fhandle) { + print 'Error: Failed to open file '.$filepath."\n"; + exit(1); } $fhandleerr = fopen($filepatherr, 'w'); -if (! $fhandleerr) -{ - print 'Error: Failed to open file '.$filepatherr."\n"; - exit(1); +if (! $fhandleerr) { + print 'Error: Failed to open file '.$filepatherr."\n"; + exit(1); } $langs->setDefaultLang($defaultlang); @@ -114,99 +110,96 @@ $db->begin(); $i=0; $nboflines++; -while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) -{ - $i++; - $errorrecord=0; +while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { + $i++; + $errorrecord=0; - if ($startlinenb && $i < $startlinenb) continue; - if ($endlinenb && $i > $endlinenb) continue; + if ($startlinenb && $i < $startlinenb) { + continue; + } + if ($endlinenb && $i > $endlinenb) { + continue; + } - $nboflines++; + $nboflines++; - $produit = new Product($db); - $produit->type = 0; - $produit->status = 1; - $produit->ref = trim($fields[0]); + $produit = new Product($db); + $produit->type = 0; + $produit->status = 1; + $produit->ref = trim($fields[0]); - print "Process line nb ".$i.", ref ".$produit->ref; - $produit->label = trim($fields[2]); - $produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : '')); - $produit->volume = price2num($fields[8]); - $produit->volume_unit = 0; - $produit->weight = price2num($fields[9]); - $produit->weight_units = 0; // -3 = g + print "Process line nb ".$i.", ref ".$produit->ref; + $produit->label = trim($fields[2]); + $produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : '')); + $produit->volume = price2num($fields[8]); + $produit->volume_unit = 0; + $produit->weight = price2num($fields[9]); + $produit->weight_units = 0; // -3 = g - $produit->customcode = $fields[10]; - $produit->barcode = $fields[1]; + $produit->customcode = $fields[10]; + $produit->barcode = $fields[1]; - $produit->status = 1; - $produit->status_buy = 1; + $produit->status = 1; + $produit->status_buy = 1; - $produit->finished = 1; + $produit->finished = 1; - $produit->price_min = null; - $produit->price_min_ttc = null; - $produit->price = price2num($fields[11]); - $produit->price_ttc = price2num($fields[12]); - $produit->price_base_type = 'TTC'; - $produit->tva_tx = price2num($fields[13]); - $produit->tva_npr = 0; + $produit->price_min = null; + $produit->price_min_ttc = null; + $produit->price = price2num($fields[11]); + $produit->price_ttc = price2num($fields[12]); + $produit->price_base_type = 'TTC'; + $produit->tva_tx = price2num($fields[13]); + $produit->tva_npr = 0; - $produit->cost_price = price2num($fields[16]); + $produit->cost_price = price2num($fields[16]); - // Extrafields - $produit->array_options['options_ecotaxdeee']=price2num($fields[17]); + // Extrafields + $produit->array_options['options_ecotaxdeee']=price2num($fields[17]); - $ret=$produit->create($user); - if ($ret < 0) - { - print " - Error in create result code = ".$ret." - ".$produit->errorsToString(); - $errorrecord++; - } else { - print " - Creation OK with ref ".$produit->ref." - id = ".$ret; + $ret=$produit->create($user); + if ($ret < 0) { + print " - Error in create result code = ".$ret." - ".$produit->errorsToString(); + $errorrecord++; + } else { + print " - Creation OK with ref ".$produit->ref." - id = ".$ret; } dol_syslog("Add prices"); - // If we use price level, insert price for each level - if (! $errorrecord && 1) - { - $ret1=$produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array()); - $ret2=$produit->updatePrice(price2num($fields[14]), 'HT', $user, $produit->tva_tx, $produit->price_min, 2, $produit->tva_npr, 0, 0, array()); - if ($ret1 < 0 || $ret2 < 0) - { - print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString(); - $errorrecord++; - } else { - print " - updatePrice OK"; - } + // If we use price level, insert price for each level + if (! $errorrecord && 1) { + $ret1=$produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array()); + $ret2=$produit->updatePrice(price2num($fields[14]), 'HT', $user, $produit->tva_tx, $produit->price_min, 2, $produit->tva_npr, 0, 0, array()); + if ($ret1 < 0 || $ret2 < 0) { + print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString(); + $errorrecord++; + } else { + print " - updatePrice OK"; + } } dol_syslog("Add multilangs"); // Add alternative languages - if (! $errorrecord && 1) - { - $produit->multilangs['fr_FR']=array('label'=>$produit->label, 'description'=>$produit->description, 'note'=>$produit->note_private); - $produit->multilangs['en_US']=array('label'=>$fields[3], 'description'=>$produit->description, 'note'=>$produit->note_private); + if (! $errorrecord && 1) { + $produit->multilangs['fr_FR']=array('label'=>$produit->label, 'description'=>$produit->description, 'note'=>$produit->note_private); + $produit->multilangs['en_US']=array('label'=>$fields[3], 'description'=>$produit->description, 'note'=>$produit->note_private); - $ret=$produit->setMultiLangs($user); - if ($ret < 0) - { - print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString(); - $errorrecord++; - } else { - print " - setMultiLangs OK"; - } + $ret=$produit->setMultiLangs($user); + if ($ret < 0) { + print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString(); + $errorrecord++; + } else { + print " - setMultiLangs OK"; + } } print "\n"; - if ($errorrecord) - { - fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n"); - $error++; // $errorrecord will be reset + if ($errorrecord) { + fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n"); + $error++; // $errorrecord will be reset } } @@ -217,13 +210,12 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) // commit or rollback print "Nb of lines qualified: ".$nboflines."\n"; print "Nb of errors: ".$error."\n"; -if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) -{ - print "Rollback any changes.\n"; - $db->rollback(); +if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { + print "Rollback any changes.\n"; + $db->rollback(); } else { - print "Commit all changes.\n"; - $db->commit(); + print "Commit all changes.\n"; + $db->commit(); } $db->close(); diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index a0ddaac7674..91f28f11769 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -30,8 +30,8 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -67,44 +67,40 @@ $startlinenb = empty($argv[3])?1:$argv[3]; $endlinenb = empty($argv[4])?0:$argv[4]; if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) { - print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; - print "Usage: $script_file test myfilepath.csv 2 1002\n"; - print "\n"; - exit(-1); + print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; + print "Usage: $script_file test myfilepath.csv 2 1002\n"; + print "\n"; + exit(-1); } if (! file_exists($filepath)) { - print "Error: File ".$filepath." not found.\n"; - print "\n"; - exit(-1); + print "Error: File ".$filepath." not found.\n"; + print "\n"; + exit(-1); } $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } $user->getrights(); // Ask confirmation -if (! $confirmed) -{ - print "Hit Enter to continue or CTRL+C to stop...\n"; - $input = trim(fgets(STDIN)); +if (! $confirmed) { + print "Hit Enter to continue or CTRL+C to stop...\n"; + $input = trim(fgets(STDIN)); } // Open input and output files $fhandle = fopen($filepath, 'r'); -if (! $fhandle) -{ - print 'Error: Failed to open file '.$filepath."\n"; - exit(1); +if (! $fhandle) { + print 'Error: Failed to open file '.$filepath."\n"; + exit(1); } $fhandleerr = fopen($filepatherr, 'w'); -if (! $fhandleerr) -{ - print 'Error: Failed to open file '.$filepatherr."\n"; - exit(1); +if (! $fhandleerr) { + print 'Error: Failed to open file '.$filepatherr."\n"; + exit(1); } //$langs->setDefaultLang($defaultlang); @@ -114,175 +110,173 @@ $db->begin(); $i=0; $nboflines=0; -while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) -{ - $i++; - $errorrecord=0; +while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { + $i++; + $errorrecord=0; - if ($startlinenb && $i < $startlinenb) continue; - if ($endlinenb && $i > $endlinenb) continue; + if ($startlinenb && $i < $startlinenb) { + continue; + } + if ($endlinenb && $i > $endlinenb) { + continue; + } - $nboflines++; + $nboflines++; - $object = new Societe($db); - $object->state = $fields[6]; - $object->client = $fields[7]; - $object->fournisseur = $fields[8]; + $object = new Societe($db); + $object->state = $fields[6]; + $object->client = $fields[7]; + $object->fournisseur = $fields[8]; - $object->name = $fields[13]?trim($fields[13]):$fields[0]; - $object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):''; + $object->name = $fields[13]?trim($fields[13]):$fields[0]; + $object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):''; - $object->address = trim($fields[14]); - $object->zip = trim($fields[15]); - $object->town = trim($fields[16]); - $object->country_id = dol_getIdFromCode($db, trim($fields[21]), 'c_country', 'code', 'rowid'); - $object->phone = trim($fields[22]); - $object->fax = trim($fields[23]); - $object->email = trim($fields[26]); - $object->idprof2 = trim($fields[29]); - $object->tva_intra = trim($fields[34]); - $object->default_lang = trim($fields[43]); + $object->address = trim($fields[14]); + $object->zip = trim($fields[15]); + $object->town = trim($fields[16]); + $object->country_id = dol_getIdFromCode($db, trim($fields[21]), 'c_country', 'code', 'rowid'); + $object->phone = trim($fields[22]); + $object->fax = trim($fields[23]); + $object->email = trim($fields[26]); + $object->idprof2 = trim($fields[29]); + $object->tva_intra = trim($fields[34]); + $object->default_lang = trim($fields[43]); - //$condpayment = dol_string_unaccent(trim($fields[36])); - if ($fields[36]) - { - $condpayment = trim($fields[36]); - if ($condpayment == 'A la commande') $condpayment = 'A réception de commande'; - if ($condpayment == 'A reception facture') $condpayment = 'Réception de facture'; - $object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1); - if (empty($object->cond_reglement_id)) - { - print " - Error cant find payment mode for ".$condpayment."\n"; - $errorrecord++; - } - } + //$condpayment = dol_string_unaccent(trim($fields[36])); + if ($fields[36]) { + $condpayment = trim($fields[36]); + if ($condpayment == 'A la commande') { + $condpayment = 'A réception de commande'; + } + if ($condpayment == 'A reception facture') { + $condpayment = 'Réception de facture'; + } + $object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1); + if (empty($object->cond_reglement_id)) { + print " - Error cant find payment mode for ".$condpayment."\n"; + $errorrecord++; + } + } - $object->code_client = $fields[9]; - $object->code_fournisseur = $fields[10]; + $object->code_client = $fields[9]; + $object->code_fournisseur = $fields[10]; - $labeltype = trim($fields[1]); - $object->typent_id = dol_getIdFromCode($db, $labeltype, 'c_typent', 'libelle'); + $labeltype = trim($fields[1]); + $object->typent_id = dol_getIdFromCode($db, $labeltype, 'c_typent', 'libelle'); - // Set price level - $object->price_level = 1; - if ($labeltype == 'Revendeur') $object->price_level = 2; + // Set price level + $object->price_level = 1; + if ($labeltype == 'Revendeur') { + $object->price_level = 2; + } - print "Process line nb ".$i.", name ".$object->name; + print "Process line nb ".$i.", name ".$object->name; - // Extrafields - $object->array_options['options_anastate']=price2num($fields[20]); - $object->array_options['options_anaregion']=price2num($fields[17]); + // Extrafields + $object->array_options['options_anastate']=price2num($fields[20]); + $object->array_options['options_anaregion']=price2num($fields[17]); - if (! $errorrecord) - { - $ret=$object->create($user); - if ($ret < 0) - { - print " - Error in create result code = ".$ret." - ".$object->errorsToString(); - $errorrecord++; - } else { - print " - Creation OK with name ".$object->name." - id = ".$ret; - } - } + if (! $errorrecord) { + $ret=$object->create($user); + if ($ret < 0) { + print " - Error in create result code = ".$ret." - ".$object->errorsToString(); + $errorrecord++; + } else { + print " - Creation OK with name ".$object->name." - id = ".$ret; + } + } - if (! $errorrecord) - { - dol_syslog("Set price level"); - $object->set_price_level($object->price_level, $user); - } + if (! $errorrecord) { + dol_syslog("Set price level"); + $object->set_price_level($object->price_level, $user); + } // Assign sales representative - if (! $errorrecord && $fields[3]) - { - $salesrep=new User($db); + if (! $errorrecord && $fields[3]) { + $salesrep=new User($db); - $tmp=explode(' ', $fields[3], 2); - $salesrep->firstname = trim($tmp[0]); - $salesrep->lastname = trim($tmp[1]); - if ($salesrep->lastname) $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0)); - else $salesrep->login=strtolower($salesrep->firstname); - $salesrep->login=preg_replace('/ /', '', $salesrep->login); - $salesrep->fetch(0, $salesrep->login); + $tmp=explode(' ', $fields[3], 2); + $salesrep->firstname = trim($tmp[0]); + $salesrep->lastname = trim($tmp[1]); + if ($salesrep->lastname) { + $salesrep->login = strtolower(substr($salesrep->firstname, 0, 1)) . strtolower(substr($salesrep->lastname, 0)); + } else { + $salesrep->login=strtolower($salesrep->firstname); + } + $salesrep->login=preg_replace('/ /', '', $salesrep->login); + $salesrep->fetch(0, $salesrep->login); - $result = $object->add_commercial($user, $salesrep->id); - if ($result < 0) - { - print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString(); - $errorrecord++; - } else { - print " - create link sale representative OK"; - } + $result = $object->add_commercial($user, $salesrep->id); + if ($result < 0) { + print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString(); + $errorrecord++; + } else { + print " - create link sale representative OK"; + } } dol_syslog("Add invoice contacts"); // Insert an invoice contact if there is an invoice email != standard email - if (! $errorrecord && $fields[27] && $fields[26] != $fields[27]) - { - $ret1=$ret2=0; + if (! $errorrecord && $fields[27] && $fields[26] != $fields[27]) { + $ret1=$ret2=0; - $contact = new Contact($db); - $contact->lastname = $object->name; - $contact->address=$object->address; - $contact->zip=$object->zip; - $contact->town=$object->town; - $contact->country_id=$object->country_id; - $contact->email=$fields[27]; - $contact->socid=$object->id; + $contact = new Contact($db); + $contact->lastname = $object->name; + $contact->address=$object->address; + $contact->zip=$object->zip; + $contact->town=$object->town; + $contact->country_id=$object->country_id; + $contact->email=$fields[27]; + $contact->socid=$object->id; - $ret1=$contact->create($user); - if ($ret1 > 0) - { - //$ret2=$contact->add_contact($object->id, 'BILLING'); - } - if ($ret1 < 0 || $ret2 < 0) - { - print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); - $errorrecord++; - } else { - print " - create contact OK"; - } + $ret1=$contact->create($user); + if ($ret1 > 0) { + //$ret2=$contact->add_contact($object->id, 'BILLING'); + } + if ($ret1 < 0 || $ret2 < 0) { + print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); + $errorrecord++; + } else { + print " - create contact OK"; + } } dol_syslog("Add delivery contacts"); // Insert a delivery contact - if (! $errorrecord && $fields[47]) - { - $ret1=$ret2=0; + if (! $errorrecord && $fields[47]) { + $ret1=$ret2=0; - $contact2 = new Contact($db); - $contact2->lastname = 'Service livraison - '.$fields[47]; - $contact2->address = $fields[48]; - $contact2->zip = $fields[50]; - $contact2->town = $fields[51]; - $contact2->country_id=dol_getIdFromCode($db, trim($fields[52]), 'c_country', 'code', 'rowid'); - $contact2->note_public=$fields[54]; - $contact2->socid=$object->id; + $contact2 = new Contact($db); + $contact2->lastname = 'Service livraison - '.$fields[47]; + $contact2->address = $fields[48]; + $contact2->zip = $fields[50]; + $contact2->town = $fields[51]; + $contact2->country_id=dol_getIdFromCode($db, trim($fields[52]), 'c_country', 'code', 'rowid'); + $contact2->note_public=$fields[54]; + $contact2->socid=$object->id; - // Extrafields - $contact2->array_options['options_anazoneliv']=price2num($fields[53]); + // Extrafields + $contact2->array_options['options_anazoneliv']=price2num($fields[53]); - $ret1=$contact2->create($user); - if ($ret1 > 0) - { - //$ret2=$contact2->add_contact($object->id, 'SHIPPING'); - } - if ($ret1 < 0 || $ret2 < 0) - { - print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); - $errorrecord++; - } else { - print " - create contact OK"; - } + $ret1=$contact2->create($user); + if ($ret1 > 0) { + //$ret2=$contact2->add_contact($object->id, 'SHIPPING'); + } + if ($ret1 < 0 || $ret2 < 0) { + print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); + $errorrecord++; + } else { + print " - create contact OK"; + } } print "\n"; - if ($errorrecord) - { - fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n"); - $error++; // $errorrecord will be reset + if ($errorrecord) { + fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n"); + $error++; // $errorrecord will be reset } } @@ -293,13 +287,12 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) // commit or rollback print "Nb of lines qualified: ".$nboflines."\n"; print "Nb of errors: ".$error."\n"; -if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) -{ - print "Rollback any changes.\n"; - $db->rollback(); +if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { + print "Rollback any changes.\n"; + $db->rollback(); } else { - print "Commit all changes.\n"; - $db->commit(); + print "Commit all changes.\n"; + $db->commit(); } $db->close(); diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index 8e4878577a1..3c28493c106 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -30,8 +30,8 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Recupere root dolibarr @@ -67,44 +67,40 @@ $startlinenb = empty($argv[3])?1:$argv[3]; $endlinenb = empty($argv[4])?0:$argv[4]; if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) { - print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; - print "Usage: $script_file test myfilepath.csv 2 1002\n"; - print "\n"; - exit(-1); + print "Usage: $script_file (test|confirm|confirmforced) filepath.csv [startlinenb] [endlinenb]\n"; + print "Usage: $script_file test myfilepath.csv 2 1002\n"; + print "\n"; + exit(-1); } if (! file_exists($filepath)) { - print "Error: File ".$filepath." not found.\n"; - print "\n"; - exit(-1); + print "Error: File ".$filepath." not found.\n"; + print "\n"; + exit(-1); } $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; exit; } $user->getrights(); // Ask confirmation -if (! $confirmed) -{ - print "Hit Enter to continue or CTRL+C to stop...\n"; - $input = trim(fgets(STDIN)); +if (! $confirmed) { + print "Hit Enter to continue or CTRL+C to stop...\n"; + $input = trim(fgets(STDIN)); } // Open input and output files $fhandle = fopen($filepath, 'r'); -if (! $fhandle) -{ - print 'Error: Failed to open file '.$filepath."\n"; - exit(1); +if (! $fhandle) { + print 'Error: Failed to open file '.$filepath."\n"; + exit(1); } $fhandleerr = fopen($filepatherr, 'w'); -if (! $fhandleerr) -{ - print 'Error: Failed to open file '.$filepatherr."\n"; - exit(1); +if (! $fhandleerr) { + print 'Error: Failed to open file '.$filepatherr."\n"; + exit(1); } //$langs->setDefaultLang($defaultlang); @@ -114,44 +110,48 @@ $db->begin(); $i=0; $nboflines=0; -while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) -{ - $i++; - $errorrecord=0; +while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { + $i++; + $errorrecord=0; - if ($startlinenb && $i < $startlinenb) continue; - if ($endlinenb && $i > $endlinenb) continue; + if ($startlinenb && $i < $startlinenb) { + continue; + } + if ($endlinenb && $i > $endlinenb) { + continue; + } - $nboflines++; + $nboflines++; - $object = new User($db); - $object->statut = 1; + $object = new User($db); + $object->statut = 1; - $tmp=explode(' ', $fields[3], 2); - $object->firstname = trim($tmp[0]); - $object->lastname = trim($tmp[1]); - if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0)); - else $object->login=strtolower($object->firstname); - $object->login=preg_replace('/ /', '', $object->login); - $object->password = 'init'; + $tmp=explode(' ', $fields[3], 2); + $object->firstname = trim($tmp[0]); + $object->lastname = trim($tmp[1]); + if ($object->lastname) { + $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0)); + } else { + $object->login=strtolower($object->firstname); + } + $object->login=preg_replace('/ /', '', $object->login); + $object->password = 'init'; - print "Process line nb ".$i.", login ".$object->login; + print "Process line nb ".$i.", login ".$object->login; - $ret=$object->create($user); - if ($ret < 0) - { - print " - Error in create result code = ".$ret." - ".$object->errorsToString(); - $errorrecord++; - } else { - print " - Creation OK with login ".$object->login." - id = ".$ret; + $ret=$object->create($user); + if ($ret < 0) { + print " - Error in create result code = ".$ret." - ".$object->errorsToString(); + $errorrecord++; + } else { + print " - Creation OK with login ".$object->login." - id = ".$ret; } print "\n"; - if ($errorrecord) - { - fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n"); - $error++; // $errorrecord will be reset + if ($errorrecord) { + fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n"); + $error++; // $errorrecord will be reset } } @@ -162,13 +162,12 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) // commit or rollback print "Nb of lines qualified: ".$nboflines."\n"; print "Nb of errors: ".$error."\n"; -if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) -{ - print "Rollback any changes.\n"; - $db->rollback(); +if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { + print "Rollback any changes.\n"; + $db->rollback(); } else { - print "Commit all changes.\n"; - $db->commit(); + print "Commit all changes.\n"; + $db->commit(); } $db->close(); diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index 18256c33766..9214f34d810 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -30,8 +30,8 @@ $path=__DIR__.'/'; // Test si mode batch if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit(-1); + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit(-1); } // Recupere root dolibarr @@ -52,121 +52,121 @@ $error=0; // List of sql to execute $sqls=array( - 'user'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin') AND fk_user IN (select rowid FROM ".MAIN_DB_PREFIX."user where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin' AND datec < '__DATE__'", - ), - 'event'=>array( - //"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE datec < '__DATE__'", - ), - 'payment'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."paiement_facture where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."paiement where rowid NOT IN (SELECT fk_paiement FROM ".MAIN_DB_PREFIX."paiement_facture)", - ), - 'supplier_payment'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn where fk_facturefourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn where rowid NOT IN (SELECT fk_paiementfourn FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn)", - ), - 'bank'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__'", - ), - 'bankaccount'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."bank_account WHERE datec < '__DATE__'", - ), - 'invoice'=>array( - '@payment', - "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_source IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_line IN (select rowid FROM ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.fk_facture IN (select rowid from ".MAIN_DB_PREFIX."facture where datec < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."facture_rec where datec < '__DATE__'", - "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", - "UPDATE ".MAIN_DB_PREFIX."facture SET fk_facture_source = NULL WHERE fk_facture_source IN (select f2.rowid FROM (select * from ".MAIN_DB_PREFIX."facture) as f2 where f2.datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__'", - ), - 'accounting'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."accounting_bookkeeping where doc_date < '__DATE__'", - ), - 'proposal'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE datec < '__DATE__'", - ), - "supplier_proposal"=>array( - "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal where datec < '__DATE__'", - ), - 'order'=>array( - '@shipment', - "DELETE FROM ".MAIN_DB_PREFIX."commandedet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__'", - ), - 'supplier_order'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__'", - ), + 'user'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."user_rights WHERE fk_user IN (SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin') AND fk_user IN (select rowid FROM ".MAIN_DB_PREFIX."user where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."user WHERE admin = 0 and login != 'admin' AND datec < '__DATE__'", + ), + 'event'=>array( + //"DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE datec < '__DATE__'", + ), + 'payment'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."paiement_facture where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."paiement where rowid NOT IN (SELECT fk_paiement FROM ".MAIN_DB_PREFIX."paiement_facture)", + ), + 'supplier_payment'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn where fk_facturefourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn where rowid NOT IN (SELECT fk_paiementfourn FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn)", + ), + 'bank'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank IN (SELECT rowid FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE datec < '__DATE__'", + ), + 'bankaccount'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."bank_account WHERE datec < '__DATE__'", + ), + 'invoice'=>array( + '@payment', + "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_source IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except where fk_facture_line IN (select rowid FROM ".MAIN_DB_PREFIX."facturedet as fd WHERE fd.fk_facture IN (select rowid from ".MAIN_DB_PREFIX."facture where datec < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."facture_rec where datec < '__DATE__'", + "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE fk_facture IN (select rowid FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__')", + "UPDATE ".MAIN_DB_PREFIX."facture SET fk_facture_source = NULL WHERE fk_facture_source IN (select f2.rowid FROM (select * from ".MAIN_DB_PREFIX."facture) as f2 where f2.datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."facture where datec < '__DATE__'", + ), + 'accounting'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."accounting_bookkeeping where doc_date < '__DATE__'", + ), + 'proposal'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE datec < '__DATE__'", + ), + "supplier_proposal"=>array( + "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal IN (select rowid FROM ".MAIN_DB_PREFIX."propal where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal where datec < '__DATE__'", + ), + 'order'=>array( + '@shipment', + "DELETE FROM ".MAIN_DB_PREFIX."commandedet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."commande where date_creation < '__DATE__'", + ), + 'supplier_order'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande IN (select rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where date_creation < '__DATE__'", + ), 'supplier_invoice'=>array( '@supplier_payment', - "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det WHERE fk_facture_fourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__'", - ), - 'shipment'=>array( - '@delivery', - "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch WHERE fk_expeditiondet IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."expedition_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'", - ), - 'delivery'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."deliverydet WHERE fk_delivery IN (select rowid FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__'", - ), - 'contract'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."contrat_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."contrat WHERE datec < '__DATE__'", - ), - 'intervention'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE fk_fichinter IN (select rowid FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__'", - ), - 'stock'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."stock_mouvement WHERE datem < '__DATE__'", - ), - 'product'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product_lang WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty WHERE fk_product_price IN (select rowid FROM ".MAIN_DB_PREFIX."product_price where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."product_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE fk_product_stock IN (select rowid FROM ".MAIN_DB_PREFIX."product_stock where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product_lot WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'", - ), - 'project'=>array( - // TODO set fk_project to null on object that refer to project - "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_task IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))", - "DELETE FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'", - ), - 'contact'=>array( - "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople IN (select rowid FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__'", - ), - 'thirdparty'=>array( - '@contact', - "DELETE FROM ".MAIN_DB_PREFIX."cabinetmed_cons WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = NULL WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."categorie_fournisseur WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", - "DELETE FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__'", - ) + "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det WHERE fk_facture_fourn IN (select rowid FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn where datec < '__DATE__'", + ), + 'shipment'=>array( + '@delivery', + "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch WHERE fk_expeditiondet IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."expedition_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'", + ), + 'delivery'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."deliverydet WHERE fk_delivery IN (select rowid FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__'", + ), + 'contract'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."contrat_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."contrat WHERE datec < '__DATE__'", + ), + 'intervention'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE fk_fichinter IN (select rowid FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."fichinter where datec < '__DATE__'", + ), + 'stock'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."stock_mouvement WHERE datem < '__DATE__'", + ), + 'product'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product_lang WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty WHERE fk_product_price IN (select rowid FROM ".MAIN_DB_PREFIX."product_price where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."product_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE fk_product_stock IN (select rowid FROM ".MAIN_DB_PREFIX."product_stock where fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product_lot WHERE fk_product IN (select rowid FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."product where datec < '__DATE__'", + ), + 'project'=>array( + // TODO set fk_project to null on object that refer to project + "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time WHERE fk_task IN (select rowid FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'))", + "DELETE FROM ".MAIN_DB_PREFIX."projet_task WHERE fk_projet IN (select rowid FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."projet where datec < '__DATE__'", + ), + 'contact'=>array( + "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople IN (select rowid FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."socpeople where datec < '__DATE__'", + ), + 'thirdparty'=>array( + '@contact', + "DELETE FROM ".MAIN_DB_PREFIX."cabinetmed_cons WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = NULL WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."categorie_fournisseur WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE fk_soc IN (select rowid FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__')", + "DELETE FROM ".MAIN_DB_PREFIX."societe where datec < '__DATE__'", + ) ); @@ -183,44 +183,42 @@ $option = $argv[2]; $date = $argv[3]; if (empty($mode) || ! in_array($mode, array('test','confirm'))) { - print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; - print "\n"; - print "option can be ".implode(',', array_keys($sqls))."\n"; - exit(-1); + print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; + print "\n"; + print "option can be ".implode(',', array_keys($sqls))."\n"; + exit(-1); } -if (empty($option)) -{ - print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; - print "\n"; - print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n"; - exit(-1); +if (empty($option)) { + print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; + print "\n"; + print "option must be defined with a value in list ".implode(',', array_keys($sqls))."\n"; + exit(-1); } -if ($option != 'all') -{ - $listofoptions=explode(',', $option); - 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"; - print "\n"; - print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n"; - exit(-1); - } - } +if ($option != 'all') { + $listofoptions=explode(',', $option); + 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"; + print "\n"; + print "option '".$cursoroption."' must be in list ".implode(',', array_keys($sqls))."\n"; + exit(-1); + } + } } if (empty($date) || (! preg_match('/\d\d\d\d\-\d\d\-\d\d$/', $date) && $date != 'all')) { - print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; - print "\n"; - print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n"; - exit(-1); + print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; + print "\n"; + print "date can be 'all' or 'YYYY-MM-DD' to delete record before YYYY-MM-DD\n"; + exit(-1); } -if ($date == 'all') $date = '2199-01-01'; +if ($date == 'all') { + $date = '2199-01-01'; +} // Replace database handler -if (! empty($argv[4])) -{ +if (! empty($argv[4])) { $db->close(); unset($db); $db=getDoliDBInstance($argv[4], $argv[5], $argv[6], $argv[7], $argv[8], $argv[9]); @@ -229,8 +227,7 @@ if (! empty($argv[4])) //var_dump($user->db->database_name); $ret=$user->fetch('', 'admin'); -if (! $ret > 0) -{ +if (! $ret > 0) { print 'An admin user with login "admin" must exists to use this script.'."\n"; exit; } @@ -245,10 +242,9 @@ print "Database port = ".$db->database_port."\n"; print "User = ".$db->database_user."\n"; print "\n"; -if (! $confirmed) -{ - print "Hit Enter to continue or CTRL+C to stop...\n"; - $input = trim(fgets(STDIN)); +if (! $confirmed) { + print "Hit Enter to continue or CTRL+C to stop...\n"; + $input = trim(fgets(STDIN)); } @@ -261,73 +257,71 @@ if (! $confirmed) */ function processfamily($family, $date) { - global $db, $sqls; + global $db, $sqls; - $error=0; - foreach ($sqls[$family] as $sql) - { - if (preg_match('/^@/', $sql)) - { - $newfamily=preg_replace('/@/', '', $sql); - processfamily($newfamily, $date); - continue; - } + $error=0; + foreach ($sqls[$family] as $sql) { + if (preg_match('/^@/', $sql)) { + $newfamily=preg_replace('/@/', '', $sql); + processfamily($newfamily, $date); + continue; + } - $sql = preg_replace('/__DATE__/', $date, $sql); + $sql = preg_replace('/__DATE__/', $date, $sql); - print "Run sql: ".$sql."\n"; + print "Run sql: ".$sql."\n"; - $resql=$db->query($sql); - if (! $resql) - { - if ($db->errno() != 'DB_ERROR_NOSUCHTABLE') - { - $error++; - } - } + $resql=$db->query($sql); + if (! $resql) { + if ($db->errno() != 'DB_ERROR_NOSUCHTABLE') { + $error++; + } + } - if ($error) - { - print $db->lasterror(); - $error++; - break; - } - } + if ($error) { + print $db->lasterror(); + $error++; + break; + } + } - if ($error) return -1; - else return 1; + if ($error) { + return -1; + } else { + return 1; + } } $db->begin(); $listofoptions=explode(',', $option); -foreach ($listofoptions as $cursoroption) -{ - $oldfamily=''; - foreach ($sqls as $family => $familysql) - { - if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue; +foreach ($listofoptions as $cursoroption) { + $oldfamily=''; + foreach ($sqls as $family => $familysql) { + if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) { + continue; + } - if ($family != $oldfamily) print "Process action for family ".$family."\n"; - $oldfamily = $family; + if ($family != $oldfamily) { + print "Process action for family ".$family."\n"; + } + $oldfamily = $family; - $result=processfamily($family, $date); - if ($result < 0) - { - $error++; - break; - } - } + $result=processfamily($family, $date); + if ($result < 0) { + $error++; + break; + } + } } -if ($error || $mode != 'confirm') -{ - print "\nRollback any changes.\n"; - $db->rollback(); +if ($error || $mode != 'confirm') { + print "\nRollback any changes.\n"; + $db->rollback(); } else { - print "Commit all changes.\n"; - $db->commit(); + print "Commit all changes.\n"; + $db->commit(); } $db->close(); diff --git a/dev/initdemo/documents_demo/mycompany/logos/background_dolibarr.jpg b/dev/initdemo/documents_demo/mycompany/logos/background_dolibarr.jpg new file mode 100644 index 00000000000..6c4cc11460d Binary files /dev/null and b/dev/initdemo/documents_demo/mycompany/logos/background_dolibarr.jpg differ diff --git a/dev/initdemo/documents_demo/mycompany/logos/mybigcompany_squarred.png b/dev/initdemo/documents_demo/mycompany/logos/mybigcompany_squarred.png new file mode 100644 index 00000000000..38b88fb9278 Binary files /dev/null and b/dev/initdemo/documents_demo/mycompany/logos/mybigcompany_squarred.png differ diff --git a/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_mini.png b/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_mini.png new file mode 100644 index 00000000000..dbfb4af4e7f Binary files /dev/null and b/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_mini.png differ diff --git a/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_small.png b/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_small.png new file mode 100644 index 00000000000..a9769e0cdf8 Binary files /dev/null and b/dev/initdemo/documents_demo/mycompany/logos/thumbs/mybigcompany_squarred_small.png differ diff --git a/dev/initdemo/initdemopassword.sh b/dev/initdemo/initdemopassword.sh index d3527151c64..a42e5d23b56 100755 --- a/dev/initdemo/initdemopassword.sh +++ b/dev/initdemo/initdemopassword.sh @@ -39,7 +39,7 @@ if [ "x$confirm" != "xconfirm" ] then echo "----- $0 -----" echo "Usage: initdemopassword.sh confirm [base port login pass password_hash_algo]" - echo "password_hash_algo can be md5 of password_hash" + echo "password_hash_algo can be md5 or password_hash" exit fi @@ -149,15 +149,19 @@ then 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" -if [ "x$demopasshash" != "xpassword_hash" ] +if [ "x${demopasshash}" != "xpassword_hash" ] then - newpass=`echo '' | php` + echo '' > /tmp/tmp.php + newpass=`php -f /tmp/tmp.php` + rm /tmp/tmp.php else - newpass=`echo '' | php` + echo '' > /tmp/tmp.php + newpass=`php -f /tmp/tmp.php` + rm /tmp/tmp.php fi +echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql -P$port $base" echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql -P$port $base export res=$? diff --git a/dev/initdemo/mysqldump_dolibarr_13.0.0.sql b/dev/initdemo/mysqldump_dolibarr_14.0.0.sql similarity index 85% rename from dev/initdemo/mysqldump_dolibarr_13.0.0.sql rename to dev/initdemo/mysqldump_dolibarr_14.0.0.sql index 69c6eeb73c3..60a951dc679 100644 --- a/dev/initdemo/mysqldump_dolibarr_13.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_14.0.0.sql @@ -1,6 +1,6 @@ -- MySQL dump 10.17 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) -- --- Host: localhost Database: dolibarr_dev +-- Host: localhost Database: dolibarr_14 -- ------------------------------------------------------ -- Server version 10.3.25-MariaDB-0ubuntu0.20.04.1 @@ -112,7 +112,7 @@ CREATE TABLE `llx_accounting_bookkeeping` ( LOCK TABLES `llx_accounting_bookkeeping` WRITE; /*!40000 ALTER TABLE `llx_accounting_bookkeeping` DISABLE KEYS */; -INSERT INTO `llx_accounting_bookkeeping` VALUES (2,'2017-02-19','','',0,0,NULL,'1','ttt',NULL,5.00000000,0.00000000,5.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','1',NULL,NULL,NULL,NULL),(4,'2017-02-19','','',0,0,NULL,'10','',NULL,0.00000000,5.00000000,5.00000000,'C',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','10',NULL,NULL,NULL,NULL),(6,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,2,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','NotDefined',NULL,NULL,NULL,NULL),(9,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,3,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','NotDefined',NULL,NULL,NULL,NULL),(10,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','401','Fournisseurs','Indian SAS - FR70813 - Subledger account',0.00000000,991.48000000,991.48000000,'C',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','6050','Indian SAS',NULL,NULL,NULL),(11,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','104','Primes liées au capital social','Indian SAS - FR70813 - Primes liées au capital social',415.00000000,0.00000000,415.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(12,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','101','Capital','Indian SAS - FR70813 - Capital',414.00000000,0.00000000,414.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(13,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','10','Capital','Indian SAS - FR70813 - Sales tax 19.6 %',162.48000000,0.00000000,162.48000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(21,'2020-01-10','bank','BankId 49 - Miscellaneous payment 4',49,49,'','50','Valeurs mobilières de placement','Miscellaneous payment - Bank LUXBAC',0.00000000,10.01000000,10.01000000,'C',NULL,NULL,NULL,NULL,12,NULL,'BQ','Bank journal',5,NULL,'2020-01-17 14:43:44',1,NULL,'2020-01-10 05:18:05','2020-01-17 13:43:44','','',NULL,NULL,NULL),(22,'2020-01-10','bank','BankId 49 - Miscellaneous payment 4',49,49,'','105','Ecarts de réévaluation','Miscellaneous payment',10.01000000,0.00000000,10.01000000,'D',NULL,NULL,NULL,NULL,12,NULL,'BQ','Bank journal',5,NULL,'2020-01-17 14:43:44',1,NULL,'2020-01-10 05:18:05','2020-01-17 13:43:44','556','',NULL,NULL,NULL); +INSERT INTO `llx_accounting_bookkeeping` VALUES (2,'2017-02-19','','',0,0,NULL,'1','ttt',NULL,5.00000000,0.00000000,5.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','1',NULL,NULL,NULL,NULL),(4,'2017-02-19','','',0,0,NULL,'10','',NULL,0.00000000,5.00000000,5.00000000,'C',NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,1,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','10',NULL,NULL,NULL,NULL),(6,'2017-02-19','','',0,0,NULL,'NotDefined','',NULL,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,NULL,12,NULL,'VTE',NULL,2,NULL,'2020-01-17 14:43:44',1,NULL,'2017-08-27 15:29:05','2020-01-17 13:43:44','NotDefined',NULL,NULL,NULL,NULL),(10,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','401','Fournisseurs','Indian SAS - FR70813 - Subledger account',0.00000000,991.48000000,991.48000000,'C',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','6050','Indian SAS',NULL,NULL,NULL),(11,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','104','Primes liées au capital social','Indian SAS - FR70813 - Primes liées au capital social',415.00000000,0.00000000,415.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(12,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','101','Capital','Indian SAS - FR70813 - Capital',414.00000000,0.00000000,414.00000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(13,'2003-04-11','supplier_invoice','SI1601-0001',16,0,'SU1212-0005','10','Capital','Indian SAS - FR70813 - Sales tax 19.6 %',162.48000000,0.00000000,162.48000000,'D',NULL,NULL,NULL,NULL,12,NULL,'AC','Purchase journal',4,NULL,'2020-01-17 14:43:44',1,NULL,'2019-10-04 10:18:07','2020-01-17 13:43:44','','',NULL,NULL,NULL),(21,'2020-01-10','bank','BankId 49 - Miscellaneous payment 4',49,49,'','50','Valeurs mobilières de placement','Miscellaneous payment - Bank LUXBAC',0.00000000,10.01000000,10.01000000,'C',NULL,NULL,NULL,NULL,12,NULL,'BQ','Bank journal',5,NULL,'2020-01-17 14:43:44',1,NULL,'2020-01-10 05:18:05','2020-01-17 13:43:44','','',NULL,NULL,NULL),(22,'2020-01-10','bank','BankId 49 - Miscellaneous payment 4',49,49,'','105','Ecarts de réévaluation','Miscellaneous payment',10.01000000,0.00000000,10.01000000,'D',NULL,NULL,NULL,NULL,12,NULL,'BQ','Bank journal',5,NULL,'2020-01-17 14:43:44',1,NULL,'2020-01-10 05:18:05','2020-01-17 13:43:44','556','',NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_accounting_bookkeeping` ENABLE KEYS */; UNLOCK TABLES; @@ -205,6 +205,30 @@ LOCK TABLES `llx_accounting_fiscalyear` WRITE; /*!40000 ALTER TABLE `llx_accounting_fiscalyear` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_accounting_groups_account` +-- + +DROP TABLE IF EXISTS `llx_accounting_groups_account`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_accounting_groups_account` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_accounting_account` int(11) NOT NULL, + `fk_c_accounting_category` int(11) NOT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_accounting_groups_account` +-- + +LOCK TABLES `llx_accounting_groups_account` WRITE; +/*!40000 ALTER TABLE `llx_accounting_groups_account` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_accounting_groups_account` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_accounting_journal` -- @@ -271,6 +295,7 @@ DROP TABLE IF EXISTS `llx_actioncomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_actioncomm` ( `id` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `ref_ext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `datep` datetime DEFAULT NULL, @@ -314,7 +339,11 @@ CREATE TABLE `llx_actioncomm` ( `calling_duration` int(11) DEFAULT NULL, `visibility` varchar(12) COLLATE utf8_unicode_ci DEFAULT 'default', `reply_to` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `num_vote` int(11) DEFAULT NULL, + `event_paid` smallint(6) NOT NULL DEFAULT 0, + `status` smallint(6) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + UNIQUE KEY `uk_actioncomm_ref` (`ref`,`entity`), KEY `idx_actioncomm_fk_soc` (`fk_soc`), KEY `idx_actioncomm_fk_contact` (`fk_contact`), KEY `idx_actioncomm_fk_element` (`fk_element`), @@ -325,7 +354,7 @@ CREATE TABLE `llx_actioncomm` ( KEY `idx_actioncomm_datep2` (`datep2`), KEY `idx_actioncomm_recurid` (`recurid`), KEY `idx_actioncomm_ref_ext` (`ref_ext`) -) ENGINE=InnoDB AUTO_INCREMENT=605 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=607 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -334,7 +363,7 @@ CREATE TABLE `llx_actioncomm` ( LOCK TABLES `llx_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(2,NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(3,NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2016-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(4,NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(5,NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2016-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(6,NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2016-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(7,NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(8,NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2016-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(9,NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(10,NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(11,NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(12,NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(13,NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(14,NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2012-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(15,NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(16,NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2016-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(17,NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(18,NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2012-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(19,NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(20,NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2016-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(21,NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(22,NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2016-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(23,NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(24,NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2013-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(25,NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2016-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(26,NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2016-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(27,NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(28,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(29,NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(30,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(31,NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2016-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(38,NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(40,NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(41,NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(42,NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(43,NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(44,NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(45,NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(46,NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(47,NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2016-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(48,NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(49,NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2016-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(50,NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(51,NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(52,NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(53,NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(54,NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(55,NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(56,NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(121,NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2014-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(122,NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2016-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(123,NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(124,NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(125,NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2016-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(127,NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(128,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(129,NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(130,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(131,NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(132,NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(133,NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2016-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(134,NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2015-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(135,NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2016-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(136,NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(137,NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(138,NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(139,NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(140,NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(141,NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(142,NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2016-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(143,NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(144,NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2015-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(145,NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2015-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(146,NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(147,NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(148,NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(149,NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(150,NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(151,NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2016-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(152,NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2016-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(203,NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(204,NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2016-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(205,NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(206,NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2016-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(207,NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(208,NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2016-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(209,NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(210,NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(211,NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2016-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(212,NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(213,NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2016-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(214,NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2016-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(215,NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2016-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(216,NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2016-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(217,NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2016-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(218,NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2016-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(219,NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2016-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(220,NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2016-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(221,NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(222,NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2016-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(223,NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2016-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(224,NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2016-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(225,NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(226,NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2016-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(227,NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(228,NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(229,NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(230,NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(231,NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2016-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(232,NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2018-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(233,NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2018-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(234,NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2018-07-31 14:19:48',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(235,NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2018-07-31 14:20:36',12,NULL,4,NULL,2,0,12,1,NULL,0,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(236,NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2018-07-31 14:21:04',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(237,NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2018-07-31 14:22:04',12,NULL,6,4,NULL,0,13,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(238,NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2018-07-31 21:15:50',12,NULL,8,10,10,0,12,1,NULL,0,0,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(239,NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2017-01-29 17:49:33',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(240,NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2017-01-31 16:52:25',12,12,6,NULL,NULL,0,12,1,NULL,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(242,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(243,NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2017-02-01 14:52:04',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(245,NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2017-02-01 14:52:32',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(249,NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2017-02-01 14:54:01',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(250,NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2017-02-01 14:54:42',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(251,NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2017-02-01 15:02:21',12,NULL,5,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(252,NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2017-02-12 19:17:04',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(253,NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2017-02-12 19:18:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(254,NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2017-02-15 22:28:41',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(255,NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2017-02-15 22:28:56',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(256,NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2017-02-15 22:34:33',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(257,NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2017-02-15 22:35:03',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(263,NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2017-02-15 22:50:34',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(264,NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2017-02-15 22:51:23',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(265,NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2017-02-15 22:54:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(266,NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2017-02-15 22:55:52',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(267,NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2017-02-15 23:03:44',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(268,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(269,NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2017-02-15 23:05:01',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(270,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(271,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(272,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(273,NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2017-02-15 23:05:11',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(274,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(275,NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2017-02-15 23:05:26',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(277,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(278,NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2017-02-15 23:05:35',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(279,NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2017-02-15 23:05:36',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(281,NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2017-02-15 23:05:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(282,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(283,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(284,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(285,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(286,NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2017-02-15 23:05:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(287,NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2017-02-15 23:05:56',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(288,NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2017-02-15 23:06:01',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(294,NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2017-02-15 23:53:04',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(295,NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2017-02-15 23:58:08',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(296,NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2017-02-16 00:12:29',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(297,NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2017-02-16 00:14:20',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(298,NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2017-02-16 00:44:58',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(299,NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2017-02-16 00:45:44',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(300,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(301,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(302,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(303,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(304,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(305,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(306,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(307,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(308,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(309,NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2017-02-16 00:46:15',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(310,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(311,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(312,NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2017-02-16 00:46:17',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(313,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(314,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(315,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(316,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(317,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(318,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(319,NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2017-02-16 00:46:18',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(320,NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2017-02-16 00:46:31',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(321,NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2017-02-16 00:46:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(322,NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2017-02-16 00:46:42',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(323,NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2017-02-16 00:47:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(324,NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2017-02-16 00:47:25',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(325,NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2017-02-16 00:47:29',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(326,NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2017-02-17 12:07:18',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(327,NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2017-05-12 09:53:44',12,NULL,NULL,11,12,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(328,NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2017-08-29 18:39:09',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(329,NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2019-09-26 11:38:11',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(330,NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2019-09-26 11:49:21',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(331,NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2019-09-26 15:33:37',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(333,NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,4,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(335,NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2019-09-27 15:08:59',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(337,NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2019-09-27 15:13:13',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(338,NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2019-09-27 15:53:31',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(339,NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2019-09-27 16:15:00',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(340,NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2019-09-27 16:40:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(341,NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2019-09-27 17:16:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(342,NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2019-09-27 17:18:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(343,NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2019-09-27 17:31:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(344,NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2019-09-27 17:32:12',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(345,NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2019-09-27 17:38:30',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(346,NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2019-09-27 17:38:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(347,NULL,1,'2019-09-30 15:49:52',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(348,NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2019-10-01 11:48:36',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(349,NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2019-10-04 08:10:25',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(350,NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2019-10-04 08:10:47',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(351,NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2019-10-04 08:26:49',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(352,NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2019-10-04 08:27:00',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(353,NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2019-10-04 08:28:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(354,NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2019-10-04 08:29:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(355,NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2019-10-04 08:29:41',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(356,NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2019-10-04 08:31:30',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(357,NULL,1,'2019-10-04 16:56:21',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(358,NULL,1,'2019-10-04 17:08:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(359,NULL,1,'2019-10-04 17:25:05',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(360,NULL,1,'2019-10-04 17:26:14',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(361,NULL,1,'2019-10-04 17:30:10',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(362,NULL,1,'2019-10-04 17:51:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(363,NULL,1,'2019-10-04 17:52:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(364,NULL,1,'2019-10-04 17:52:17',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(365,NULL,1,'2019-10-04 17:52:39',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(366,NULL,1,'2019-10-04 17:52:53',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(367,NULL,1,'2019-10-04 17:53:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(368,NULL,1,'2019-10-04 17:53:26',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(369,NULL,1,'2019-10-04 17:53:48',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(370,NULL,1,'2019-10-04 17:54:09',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(371,NULL,1,'2019-10-04 17:54:28',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(372,NULL,1,'2019-10-04 17:55:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(373,NULL,1,'2019-10-04 17:56:01',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(374,NULL,1,'2019-10-04 18:00:32',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(375,NULL,1,'2019-10-04 18:00:58',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(376,NULL,1,'2019-10-04 18:11:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(377,NULL,1,'2019-10-04 18:12:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(378,NULL,1,'2019-10-04 18:49:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(379,NULL,1,'2019-10-04 19:00:22',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(380,NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2019-10-04 17:24:20',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(381,NULL,1,'2019-10-04 19:30:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(382,NULL,1,'2019-10-04 19:32:55',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(383,NULL,1,'2019-10-04 19:37:16',NULL,50,'TICKET_MSG','','2019-10-04 19:37:16','2020-06-12 17:12:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(384,NULL,1,'2019-10-04 19:39:07',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(385,NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2019-10-07 10:17:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(386,NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2019-10-07 10:17:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(387,NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2019-10-08 17:21:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(388,NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2019-10-08 19:01:07',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(389,NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2019-10-08 19:01:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(390,NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2019-10-08 19:01:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(391,NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2019-10-08 19:02:18',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(392,NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2019-11-28 11:54:47',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(393,NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2019-11-28 12:33:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(394,NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2019-11-28 12:34:08',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(395,NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2019-11-28 12:34:33',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(396,NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2019-11-28 12:34:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(397,NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2019-11-28 12:36:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(398,NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2019-11-28 12:37:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(399,NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2019-11-28 12:37:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(400,NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2019-11-28 12:38:44',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(401,NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2019-11-28 12:39:21',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(402,NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2019-11-28 12:39:58',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(403,NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2019-11-28 13:00:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(404,NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2019-11-28 13:00:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(405,NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2019-11-28 13:01:57',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(406,NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2019-11-28 13:03:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(407,NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2019-11-28 13:04:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(408,NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2019-11-28 13:09:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(409,NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2019-11-28 13:09:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(410,NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2019-11-28 14:46:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(411,NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2019-11-28 14:59:29',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(412,NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2019-11-28 15:02:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(413,NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2019-11-28 15:09:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(414,NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2019-11-28 15:12:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(415,NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2019-11-29 08:46:29',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(416,NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2019-11-29 08:46:34',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(417,NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2019-11-29 08:46:47',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(418,NULL,1,'2019-11-29 12:47:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(419,NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2019-11-29 08:50:45',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(420,NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2019-11-29 08:52:32',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(421,NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2019-11-29 08:52:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(422,NULL,1,'2019-11-29 12:54:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(423,NULL,1,'2019-11-29 12:54:46',NULL,50,'TICKET_MSG','','2019-11-29 12:54:46','2020-06-12 17:12:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(424,NULL,1,'2019-11-29 12:55:42',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2020-06-12 17:12:24',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(425,NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2019-11-29 08:55:48',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(426,NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2019-11-29 08:56:47',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(427,NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2019-11-29 08:57:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(428,NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2019-12-20 12:40:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(429,NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2019-12-20 13:00:43',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(430,NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2019-12-20 13:00:56',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(431,NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2019-12-20 16:00:03',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(432,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(433,NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2019-12-20 16:22:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(434,NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2019-12-20 16:22:20',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(435,NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2019-12-20 16:27:07',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(436,NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2019-12-20 16:42:42',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(437,NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2019-12-20 16:46:25',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(438,NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2019-12-20 16:46:45',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(439,NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2019-12-20 16:47:02',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(440,NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2019-12-20 16:47:44',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(441,NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2019-12-20 16:47:53',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(442,NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2019-12-20 16:48:05',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(443,NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2019-12-20 16:48:45',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(444,NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2019-12-20 16:48:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(445,NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2019-12-20 16:49:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(446,NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2019-12-20 16:49:54',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(447,NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2019-12-20 16:50:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(448,NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2019-12-20 16:50:23',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(449,NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2019-12-21 13:18:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(450,NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2019-12-21 13:18:38',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(451,NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2019-12-21 15:46:33',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(452,NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2019-12-21 15:47:03',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(453,NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2019-12-21 15:47:24',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(454,NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2019-12-21 15:47:52',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(455,NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2019-12-21 15:48:06',12,NULL,10,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(456,NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2019-12-21 15:49:28',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(457,NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2019-12-21 15:52:12',12,NULL,12,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(458,NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2019-12-21 15:53:21',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(459,NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2019-12-21 15:53:42',12,NULL,13,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(460,NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2019-12-21 15:55:23',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(461,NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2019-12-21 16:10:21',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(462,NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2019-12-21 16:29:32',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(463,NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2019-12-21 16:30:11',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(464,NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2019-12-23 10:16:59',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(465,NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2019-12-23 10:17:18',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(466,NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2019-12-23 13:25:14',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(467,NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2020-01-01 10:35:47',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(468,NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2020-01-01 10:50:59',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(469,NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2020-01-01 11:00:16',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(470,NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2020-01-01 11:08:20',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(471,NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2020-01-01 11:27:24',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(472,NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2020-01-01 11:36:29',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(473,NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2020-01-01 11:44:25',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(478,NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2020-01-01 12:52:32',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(483,NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2020-01-01 13:49:05',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(484,NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2020-01-01 13:50:41',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(485,NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2020-01-01 13:50:44',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(486,NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2020-01-01 13:51:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(487,NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2020-01-01 16:17:00',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(488,NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2020-01-01 16:17:46',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(489,NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2020-01-01 16:17:51',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(490,NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2020-01-01 16:20:22',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(491,NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2020-01-01 16:20:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(492,NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2020-01-01 16:21:35',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(493,NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2020-01-01 16:21:42',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(494,NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2020-01-01 16:21:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(495,NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2020-01-01 16:23:02',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(496,NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2020-01-01 16:23:17',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(497,NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2020-01-01 16:25:36',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(498,NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2020-01-01 16:51:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(499,NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2020-01-01 16:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(500,NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2020-01-01 17:02:39',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(501,NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2020-01-01 17:03:01',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(502,NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2020-01-01 17:11:10',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(503,NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2020-01-01 17:20:07',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(504,NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2020-01-01 17:21:28',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(505,NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2020-01-01 18:06:31',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(506,NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2020-01-01 19:54:16',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(507,NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2020-01-02 16:49:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(508,NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2020-01-02 19:02:35',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(509,NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2020-01-02 19:45:01',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(511,NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2020-01-02 19:57:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(512,NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2020-01-03 09:33:54',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(513,NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2020-01-03 09:34:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(514,NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2020-01-03 09:35:45',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(515,NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2020-01-03 10:10:41',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(516,NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2020-01-05 20:39:58',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(517,NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2020-01-05 20:49:06',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(518,NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(519,NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2020-01-06 16:52:28',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(520,NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(521,NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2020-01-07 17:12:37',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(522,NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2020-01-07 17:13:00',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(523,NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2020-01-07 17:13:49',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(524,NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2020-01-07 17:46:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(525,NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2020-01-07 17:52:34',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(526,NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2020-01-07 17:53:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(527,NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2020-01-07 17:53:58',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(528,NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2020-01-07 17:54:12',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(529,NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(530,NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(531,NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(532,NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2020-01-07 19:39:09',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(533,NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2020-01-07 19:43:06',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(534,NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2020-01-07 19:50:40',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(535,NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2020-01-07 19:51:27',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(536,NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2020-01-07 20:25:23',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(537,NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2020-01-07 20:25:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(538,NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2020-01-07 20:29:24',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(539,NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2020-01-07 20:29:43',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(540,NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2020-01-07 21:09:15',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(541,NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2020-01-07 21:15:02',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(542,NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2020-01-07 21:17:16',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(543,NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2020-01-08 01:31:44',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(544,NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2020-01-08 01:39:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(545,NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2020-01-08 01:39:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(546,NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2020-01-08 02:06:50',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(547,NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2020-01-08 15:34:53',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(548,NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2020-01-08 15:40:27',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(549,NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2020-01-08 15:40:46',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(550,NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2020-01-08 15:40:59',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(551,NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2020-01-08 15:41:11',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(552,NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2020-01-08 15:41:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(553,NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2020-01-08 16:12:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(554,NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2020-01-08 16:21:22',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(555,NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2020-01-08 16:41:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(556,NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2020-01-08 18:25:19',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(557,NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2020-01-13 11:11:07',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(558,NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2020-01-13 11:11:54',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(559,NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2020-01-13 11:13:19',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(560,NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2020-01-13 11:14:15',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(561,NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2020-01-13 11:29:30',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(562,NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2020-01-13 13:19:24',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(563,NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2020-01-15 12:27:15',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(564,NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2020-01-15 12:40:50',12,NULL,3,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(565,NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2020-01-16 01:22:16',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(566,NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2020-01-16 01:22:24',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(567,NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2020-01-16 01:33:27',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(568,NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2020-01-16 01:36:48',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(569,NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2020-01-16 01:42:12',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(570,NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2020-01-16 01:42:17',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(571,NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2020-01-16 01:42:56',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(572,NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2020-01-16 17:05:43',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(573,NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2020-01-17 13:54:18',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(574,NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2020-01-17 14:22:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(575,NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2020-01-19 13:22:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(576,NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2020-01-19 13:22:34',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(577,NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2020-01-19 13:24:22',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(578,NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2020-01-19 13:24:27',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(579,NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2020-01-19 13:51:43',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(580,NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2020-01-19 13:51:48',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(581,NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2020-01-19 14:01:26',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(582,NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2020-01-19 14:04:37',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(583,NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2020-01-19 14:04:53',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(584,NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2020-01-19 14:09:14',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(585,NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2020-01-19 14:13:07',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(586,NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2020-01-20 11:20:11',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(588,NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2020-01-21 00:02:14',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(589,NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2020-01-21 09:22:37',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(590,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(591,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(592,NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2020-01-21 09:23:17',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(593,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(594,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(595,NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2020-01-21 09:23:28',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(596,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(597,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(598,NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2020-01-21 09:23:49',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(599,NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2020-01-21 09:30:27',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(600,NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2020-01-21 09:30:36',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(601,NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2020-01-21 09:30:42',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(602,NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2020-01-21 09:30:57',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(603,NULL,1,'2020-06-12 10:00:00','2020-06-12 11:30:00',5,'AC_RDV','Meetings','2020-06-12 19:26:44','2020-06-12 17:26:44',12,NULL,3,NULL,NULL,0,12,1,NULL,0,0,-1,'Room 24',5400,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL),(604,NULL,1,'2020-06-01 10:00:00','2020-06-01 10:27:00',1,'AC_TEL','Called Mr X','2020-06-12 19:28:13','2020-06-12 17:28:25',12,12,3,NULL,NULL,0,12,1,NULL,0,0,100,NULL,1620,NULL,'Customer ask another call.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL); +INSERT INTO `llx_actioncomm` VALUES (1,'1',NULL,1,'2012-07-08 14:21:44','2012-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2012-07-08 14:21:44','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(2,'2',NULL,1,'2012-07-08 14:23:48','2012-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2012-07-08 14:23:48','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(3,'3',NULL,1,'2012-07-08 22:42:12','2012-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2012-07-08 22:42:12','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(4,'4',NULL,1,'2012-07-08 22:48:18','2012-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2012-07-08 22:48:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(5,'5',NULL,1,'2012-07-08 23:22:57','2012-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2012-07-08 23:22:57','2021-04-15 10:22:55',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(6,'6',NULL,1,'2012-07-09 00:15:09','2012-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2012-07-09 00:15:09','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(7,'7',NULL,1,'2012-07-09 01:24:26','2012-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2012-07-09 01:24:26','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(8,'8',NULL,1,'2012-07-10 14:54:27','2012-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2012-07-10 14:54:27','2021-04-15 10:22:55',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(9,'9',NULL,1,'2012-07-10 14:54:44','2012-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2012-07-10 14:54:44','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(10,'10',NULL,1,'2012-07-10 14:56:10','2012-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:56:10','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(11,'11',NULL,1,'2012-07-10 14:58:53','2012-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2012-07-10 14:58:53','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(12,'12',NULL,1,'2012-07-10 15:00:55','2012-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2012-07-10 15:00:55','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(13,'13',NULL,1,'2012-07-10 15:13:08','2012-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2012-07-10 15:13:08','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(14,'14',NULL,1,'2012-07-10 15:21:00','2012-07-10 16:21:00',5,NULL,'RDV avec mon chef','2012-07-10 15:21:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(15,'15',NULL,1,'2012-07-10 18:18:16','2012-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2012-07-10 18:18:16','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(16,'16',NULL,1,'2012-07-10 18:35:57','2012-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2012-07-10 18:35:57','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(17,'17',NULL,1,'2012-07-11 16:18:08','2012-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2012-07-11 16:18:08','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(18,'18',NULL,1,'2012-07-11 17:11:00','2012-07-11 17:17:00',5,NULL,'Rendez-vous','2012-07-11 17:11:22','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(19,'19',NULL,1,'2012-07-11 17:13:20','2012-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2012-07-11 17:13:20','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(20,'20',NULL,1,'2012-07-11 17:15:42','2012-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2012-07-11 17:15:42','2021-04-15 10:22:55',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(21,'21',NULL,1,'2012-07-11 18:47:33','2012-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2012-07-11 18:47:33','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(22,'22',NULL,1,'2012-07-18 11:36:18','2012-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2012-07-18 11:36:18','2021-04-15 10:22:55',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(23,'23',NULL,1,'2013-07-18 20:49:58','2013-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2013-07-18 20:49:58','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(24,'24',NULL,1,'2013-07-28 01:37:00',NULL,1,NULL,'Phone call','2013-07-28 01:37:48','2021-04-15 10:22:55',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(25,'25',NULL,1,'2013-08-01 02:31:24','2013-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2013-08-01 02:31:24','2021-04-15 10:22:55',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(26,'26',NULL,1,'2013-08-01 02:31:43','2013-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2013-08-01 02:31:43','2021-04-15 10:22:55',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(27,'27',NULL,1,'2013-08-01 02:41:26','2013-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2013-08-01 02:41:26','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(28,'28',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(29,'29',NULL,1,'2013-08-01 03:34:11','2013-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2013-08-01 03:34:11','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(30,'30',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(31,'31',NULL,1,'2013-08-06 20:33:54','2013-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2013-08-06 20:33:54','2021-04-15 10:22:55',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(38,'38',NULL,1,'2013-08-08 02:41:55','2013-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2013-08-08 02:41:55','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(40,'40',NULL,1,'2013-08-08 02:53:40','2013-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2013-08-08 02:53:40','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(41,'41',NULL,1,'2013-08-08 02:54:05','2013-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2013-08-08 02:54:05','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(42,'42',NULL,1,'2013-08-08 02:55:04','2013-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2013-08-08 02:55:04','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(43,'43',NULL,1,'2013-08-08 02:55:26','2013-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2013-08-08 02:55:26','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(44,'44',NULL,1,'2013-08-08 02:55:58','2013-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2013-08-08 02:55:58','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(45,'45',NULL,1,'2013-08-08 03:04:22','2013-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2013-08-08 03:04:22','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(46,'46',NULL,1,'2013-08-08 13:59:09','2013-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2013-08-08 13:59:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(47,'47',NULL,1,'2013-08-08 14:24:18','2013-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2013-08-08 14:24:18','2021-04-15 10:22:55',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(48,'48',NULL,1,'2013-08-08 14:24:24','2013-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2013-08-08 14:24:24','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(49,'49',NULL,1,'2013-08-08 15:04:37','2013-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2013-08-08 15:04:37','2021-04-15 10:22:55',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(50,'50',NULL,1,'2014-12-08 17:56:47','2014-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:56:47','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(51,'51',NULL,1,'2014-12-08 17:57:11','2014-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2014-12-08 17:57:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(52,'52',NULL,1,'2014-12-08 17:58:27','2014-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2014-12-08 17:58:27','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(53,'53',NULL,1,'2014-12-08 18:20:49','2014-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2014-12-08 18:20:49','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(54,'54',NULL,1,'2014-12-09 18:35:07','2014-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2014-12-09 18:35:07','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(55,'55',NULL,1,'2014-12-09 20:14:42','2014-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2014-12-09 20:14:42','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(56,'56',NULL,1,'2014-12-12 18:54:19','2014-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2014-12-12 18:54:19','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(121,'121',NULL,1,'2014-12-06 10:00:00',NULL,50,NULL,'aaab','2014-12-21 17:48:08','2021-04-15 10:22:55',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(122,'122',NULL,1,'2014-12-21 18:09:52','2014-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2014-12-21 18:09:52','2021-04-15 10:22:55',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@mycompany.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(123,'123',NULL,1,'2015-01-06 13:13:57','2015-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2015-01-06 13:13:57','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(124,'124',NULL,1,'2015-01-12 12:23:05','2015-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2015-01-12 12:23:05','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(125,'125',NULL,1,'2015-01-12 12:52:20','2015-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2015-01-12 12:52:20','2021-04-15 10:22:55',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(127,'127',NULL,1,'2015-01-19 18:22:48','2015-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2015-01-19 18:22:48','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(128,'128',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(129,'129',NULL,1,'2015-01-19 18:31:10','2015-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2015-01-19 18:31:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(130,'130',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(131,'131',NULL,1,'2015-01-19 18:31:58','2015-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2015-01-19 18:31:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(132,'132',NULL,1,'2015-01-23 15:07:54','2015-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2015-01-23 15:07:54','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(133,'133',NULL,1,'2015-01-23 16:56:58','2015-01-23 16:56:58',40,NULL,'Patient pa ajouté','2015-01-23 16:56:58','2021-04-15 10:22:55',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(134,'134',NULL,1,'2015-01-23 17:34:00',NULL,50,NULL,'bbcv','2015-01-23 17:35:21','2021-04-15 10:22:55',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(135,'135',NULL,1,'2015-02-12 15:54:00','2015-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2015-02-12 15:54:37','2021-04-15 10:22:55',1,1,NULL,7,NULL,0,1,NULL,1,0,0,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(136,'136',NULL,1,'2015-02-12 17:06:51','2015-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2015-02-12 17:06:51','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(137,'137',NULL,1,'2015-02-17 16:22:10','2015-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2015-02-17 16:22:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(138,'138',NULL,1,'2015-02-17 16:27:00','2015-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2015-02-17 16:27:00','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(139,'139',NULL,1,'2015-02-17 16:27:29','2015-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2015-02-17 16:27:29','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(140,'140',NULL,1,'2015-02-17 18:27:56','2015-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2015-02-17 18:27:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(141,'141',NULL,1,'2015-02-17 18:38:14','2015-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2015-02-17 18:38:14','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(142,'142',NULL,1,'2015-02-26 22:57:50','2015-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2015-02-26 22:57:50','2021-04-15 10:22:55',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(143,'143',NULL,1,'2015-02-26 22:58:13','2015-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2015-02-26 22:58:13','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(144,'144',NULL,1,'2015-02-27 10:00:00','2015-02-27 19:20:00',5,NULL,'Rendez-vous','2015-02-27 19:20:53','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(145,'145',NULL,1,'2015-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2015-02-27 19:28:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(146,'146',NULL,1,'2015-03-06 10:05:07','2015-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2015-03-06 10:05:07','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(147,'147',NULL,1,'2015-03-06 16:43:37','2015-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2015-03-06 16:43:37','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(148,'148',NULL,1,'2015-03-06 16:44:12','2015-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2015-03-06 16:44:12','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(149,'149',NULL,1,'2015-03-06 16:47:48','2015-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2015-03-06 16:47:48','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(150,'150',NULL,1,'2015-03-06 16:48:16','2015-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2015-03-06 16:48:16','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(151,'151',NULL,1,'2015-03-06 17:13:59','2015-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2015-03-06 17:13:59','2021-04-15 10:22:55',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(152,'152',NULL,1,'2015-03-08 10:02:22','2015-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2015-03-08 10:02:22','2021-04-15 10:22:55',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(203,'203',NULL,1,'2015-03-09 19:39:27','2015-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2015-03-09 19:39:27','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(204,'204',NULL,1,'2015-03-10 15:47:37','2015-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2015-03-10 15:47:37','2021-04-15 10:22:55',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(205,'205',NULL,1,'2015-03-10 15:57:32','2015-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2015-03-10 15:57:32','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(206,'206',NULL,1,'2015-03-10 15:58:28','2015-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2015-03-10 15:58:28','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(207,'207',NULL,1,'2015-03-19 09:38:10','2015-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2015-03-19 09:38:10','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(208,'208',NULL,1,'2015-03-20 14:30:11','2015-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2015-03-20 14:30:11','2021-04-15 10:22:55',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(209,'209',NULL,1,'2015-03-22 09:40:25','2015-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-22 09:40:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(210,'210',NULL,1,'2015-03-23 17:16:25','2015-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2015-03-23 17:16:25','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(211,'211',NULL,1,'2015-03-23 18:08:27','2015-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2015-03-23 18:08:27','2021-04-15 10:22:55',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(212,'212',NULL,1,'2015-03-24 15:54:00','2015-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2015-03-24 15:54:00','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(213,'213',NULL,1,'2015-11-07 01:02:39','2015-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:02:39','2021-04-15 10:22:55',1,NULL,NULL,27,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(214,'214',NULL,1,'2015-11-07 01:05:22','2015-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:05:22','2021-04-15 10:22:55',1,NULL,NULL,28,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(215,'215',NULL,1,'2015-11-07 01:07:07','2015-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:07','2021-04-15 10:22:55',1,NULL,NULL,29,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(216,'216',NULL,1,'2015-11-07 01:07:58','2015-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:07:58','2021-04-15 10:22:55',1,NULL,NULL,30,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(217,'217',NULL,1,'2015-11-07 01:10:09','2015-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:10:09','2021-04-15 10:22:55',1,NULL,NULL,31,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(218,'218',NULL,1,'2015-11-07 01:15:57','2015-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:15:57','2021-04-15 10:22:55',1,NULL,NULL,32,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(219,'219',NULL,1,'2015-11-07 01:16:51','2015-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2015-11-07 01:16:51','2021-04-15 10:22:55',1,NULL,NULL,33,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(220,'220',NULL,1,'2016-03-02 17:24:04','2016-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2016-03-02 17:24:04','2021-04-15 10:22:55',1,NULL,NULL,18,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(221,'221',NULL,1,'2016-03-02 17:24:28','2016-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 17:24:28','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(222,'222',NULL,1,'2016-03-05 10:00:00','2016-03-05 10:00:00',5,NULL,'RDV John','2016-03-02 19:54:48','2021-04-15 10:22:55',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(223,'223',NULL,1,'2016-03-13 10:00:00','2016-03-17 00:00:00',50,NULL,'Congress','2016-03-02 19:55:11','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(224,'224',NULL,1,'2016-03-14 10:00:00',NULL,1,NULL,'Call john','2016-03-02 19:55:56','2021-04-15 10:22:55',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(225,'225',NULL,1,'2016-03-02 20:11:31','2016-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2016-03-02 20:11:31','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(226,'226',NULL,1,'2016-03-02 20:13:39','2016-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2016-03-02 20:13:39','2021-04-15 10:22:55',1,NULL,NULL,19,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(227,'227',NULL,1,'2016-03-03 19:20:10','2016-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2016-03-03 19:20:10','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(228,'228',NULL,1,'2016-03-03 19:20:25','2016-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2016-03-03 19:20:25','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(229,'229',NULL,1,'2016-03-03 19:20:56','2016-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2016-03-03 19:20:56','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(230,'230',NULL,1,'2016-03-03 19:21:29','2016-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2016-03-03 19:21:29','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(231,'231',NULL,1,'2016-03-03 19:22:16','2016-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2016-03-03 19:22:16','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,1,0,0,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(232,'232',NULL,1,'2018-01-22 18:54:39','2018-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:39','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(233,'233',NULL,1,'2018-01-22 18:54:46','2018-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2018-01-22 18:54:46','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(234,'234',NULL,1,'2018-07-05 10:00:00','2018-07-05 11:19:00',5,'AC_RDV','Meeting with my boss','2018-07-31 18:19:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',4740,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(235,'235',NULL,1,'2018-07-13 00:00:00','2018-07-14 23:59:59',50,'AC_OTH','Trip at Las Vegas','2018-07-31 18:20:36','2021-04-15 10:22:55',12,NULL,4,NULL,2,0,12,1,NULL,0,1,-1,'',172799,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(236,'236',NULL,1,'2018-07-29 10:00:00',NULL,4,'AC_EMAIL','Remind to send an email','2018-07-31 18:21:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,4,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(237,'237',NULL,1,'2018-07-01 10:00:00',NULL,1,'AC_TEL','Phone call with Mr Vaalen','2018-07-31 18:22:04','2021-04-15 10:22:55',12,NULL,6,4,NULL,0,13,0,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(238,'238',NULL,1,'2018-08-02 10:00:00','2018-08-02 12:00:00',5,'AC_RDV','Meeting on radium','2018-08-01 01:15:50','2021-04-15 10:22:55',12,NULL,8,10,10,0,12,1,NULL,0,0,-1,'',7200,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(239,'239',NULL,1,'2017-01-29 21:49:33','2017-01-29 21:49:33',40,'AC_OTH_AUTO','Proposal PR1302-0007 validated','2017-01-29 21:49:33','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1302-0007 validated\nAuthor: admin',7,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(240,'240',NULL,1,'2017-01-31 20:52:00',NULL,1,'AC_TEL','Call the boss','2017-01-31 20:52:10','2021-04-15 10:22:55',12,12,6,NULL,NULL,0,12,1,NULL,0,0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(242,'242',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 validated','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 validated\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(243,'243',NULL,1,'2017-02-01 18:52:04','2017-02-01 18:52:04',40,'AC_OTH_AUTO','Order CF1007-0001 approved','2017-02-01 18:52:04','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CF1007-0001 approved\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(245,'245',NULL,1,'2017-02-01 18:52:32','2017-02-01 18:52:32',40,'AC_OTH_AUTO','Supplier order CF1007-0001 submited','2017-02-01 18:52:32','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 submited\nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(249,'249',NULL,1,'2017-02-01 18:54:01','2017-02-01 18:54:01',40,'AC_OTH_AUTO','Supplier order CF1007-0001 received','2017-02-01 18:54:01','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Supplier order CF1007-0001 received \nAuthor: admin',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(250,'250',NULL,1,'2017-02-01 18:54:42','2017-02-01 18:54:42',40,'AC_OTH_AUTO','Email sent by MyBigCompany To mycustomer@example.com','2017-02-01 18:54:42','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): mycustomer@example.com
\nEMail topic: Submission of order CF1007-0001
\nEmail body:
\nYou will find here our order CF1007-0001
\r\n
\r\nSincerely
\n
\nAttached files and documents: CF1007-0001.pdf',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(251,'251',NULL,1,'2017-02-01 19:02:21','2017-02-01 19:02:21',40,'AC_OTH_AUTO','Invoice SI1702-0001 validated','2017-02-01 19:02:21','2021-04-15 10:22:55',12,NULL,5,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice SI1702-0001 validated\nAuthor: admin',20,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(252,'252',NULL,1,'2017-02-12 23:17:04','2017-02-12 23:17:04',40,'AC_OTH_AUTO','Patient créé','2017-02-12 23:17:04','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Patient créé\nAuthor: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(253,'253',NULL,1,'2017-02-12 23:18:33','2017-02-12 23:18:33',40,'AC_OTH_AUTO','Consultation 2 recorded (aaa)','2017-02-12 23:18:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (aaa)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(254,'254',NULL,1,'2017-02-15 23:28:41','2017-02-15 23:28:41',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:28:41','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(255,'255',NULL,1,'2017-02-15 23:28:56','2017-02-15 23:28:56',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:28:56','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',8,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(256,'256',NULL,1,'2017-02-15 23:34:33','2017-02-15 23:34:33',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:34:33','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',9,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(257,'257',NULL,1,'2017-02-15 23:35:03','2017-02-15 23:35:03',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-15 23:35:03','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',10,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(263,'263',NULL,1,'2017-02-15 23:50:34','2017-02-15 23:50:34',40,'AC_OTH_AUTO','Order CO7001-0005 validated','2017-02-15 23:50:34','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0005 validated\nAuthor: admin',17,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(264,'264',NULL,1,'2017-02-15 23:51:23','2017-02-15 23:51:23',40,'AC_OTH_AUTO','Order CO7001-0006 validated','2017-02-15 23:51:23','2021-04-15 10:22:55',12,NULL,NULL,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0006 validated\nAuthor: admin',18,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(265,'265',NULL,1,'2017-02-15 23:54:51','2017-02-15 23:54:51',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:54:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',19,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(266,'266',NULL,1,'2017-02-15 23:55:52','2017-02-15 23:55:52',40,'AC_OTH_AUTO','Order CO7001-0007 validated','2017-02-15 23:55:52','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0007 validated\nAuthor: admin',20,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(267,'267',NULL,1,'2017-02-16 00:03:44','2017-02-16 00:03:44',40,'AC_OTH_AUTO','Order CO7001-0008 validated','2017-02-16 00:03:44','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0008 validated\nAuthor: admin',29,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(268,'268',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0009 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0009 validated\nAuthor: admin',34,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(269,'269',NULL,1,'2017-02-16 00:05:01','2017-02-16 00:05:01',40,'AC_OTH_AUTO','Order CO7001-0010 validated','2017-02-16 00:05:01','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0010 validated\nAuthor: admin',38,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(270,'270',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0011 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0011 validated\nAuthor: admin',40,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(271,'271',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0012 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0012 validated\nAuthor: admin',43,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(272,'272',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0013 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0013 validated\nAuthor: admin',47,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(273,'273',NULL,1,'2017-02-16 00:05:11','2017-02-16 00:05:11',40,'AC_OTH_AUTO','Order CO7001-0014 validated','2017-02-16 00:05:11','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0014 validated\nAuthor: admin',48,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(274,'274',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0015 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0015 validated\nAuthor: admin',50,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(275,'275',NULL,1,'2017-02-16 00:05:26','2017-02-16 00:05:26',40,'AC_OTH_AUTO','Order CO7001-0016 validated','2017-02-16 00:05:26','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0016 validated\nAuthor: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(277,'277',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0018 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0018 validated\nAuthor: admin',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(278,'278',NULL,1,'2017-02-16 00:05:35','2017-02-16 00:05:35',40,'AC_OTH_AUTO','Order CO7001-0019 validated','2017-02-16 00:05:35','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0019 validated\nAuthor: admin',68,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(279,'279',NULL,1,'2017-02-16 00:05:36','2017-02-16 00:05:36',40,'AC_OTH_AUTO','Order CO7001-0020 validated','2017-02-16 00:05:36','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0020 validated\nAuthor: admin',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(281,'281',NULL,1,'2017-02-16 00:05:37','2017-02-16 00:05:37',40,'AC_OTH_AUTO','Order CO7001-0022 validated','2017-02-16 00:05:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0022 validated\nAuthor: admin',78,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(282,'282',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0023 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,11,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0023 validated\nAuthor: admin',81,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(283,'283',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0024 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0024 validated\nAuthor: admin',83,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(284,'284',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0025 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,2,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0025 validated\nAuthor: admin',84,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(285,'285',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0026 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0026 validated\nAuthor: admin',85,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(286,'286',NULL,1,'2017-02-16 00:05:38','2017-02-16 00:05:38',40,'AC_OTH_AUTO','Order CO7001-0027 validated','2017-02-16 00:05:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Order CO7001-0027 validated\nAuthor: admin',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(287,'287',NULL,1,'2017-02-16 03:05:56','2017-02-16 03:05:56',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Livrée','2017-02-16 03:05:56','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Livrée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(288,'288',NULL,1,'2017-02-16 03:06:01','2017-02-16 03:06:01',40,'AC_OTH_AUTO','Commande CO7001-0016 classée Facturée','2017-02-16 03:06:01','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0016 classée Facturée\nAuteur: admin',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(294,'294',NULL,1,'2017-02-16 03:53:04','2017-02-16 03:53:04',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 03:53:04','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(295,'295',NULL,1,'2017-02-16 03:58:08','2017-02-16 03:58:08',40,'AC_OTH_AUTO','Expédition SH1702-0002 validée','2017-02-16 03:58:08','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Expédition SH1702-0002 validée\nAuteur: admin',3,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(296,'296',NULL,1,'2017-02-16 04:12:29','2017-02-16 04:12:29',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:12:29','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(297,'297',NULL,1,'2017-02-16 04:14:20','2017-02-16 04:14:20',40,'AC_OTH_AUTO','Commande CO7001-0021 validée','2017-02-16 04:14:20','2021-04-15 10:22:55',12,NULL,NULL,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Commande CO7001-0021 validée\nAuteur: admin',75,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(298,'298',NULL,1,'2017-02-16 01:44:58','2017-02-16 01:44:58',40,'AC_OTH_AUTO','Proposal PR1702-0009 validated','2017-02-16 01:44:58','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0009 validated\nAuthor: aeinstein',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(299,'299',NULL,1,'2017-02-16 01:45:44','2017-02-16 01:45:44',40,'AC_OTH_AUTO','Proposal PR1702-0010 validated','2017-02-16 01:45:44','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0010 validated\nAuthor: demo',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(300,'300',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0011 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0011 validated\nAuthor: aeinstein',13,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(301,'301',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0012 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,3,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0012 validated\nAuthor: demo',14,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(302,'302',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0013 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0013 validated\nAuthor: demo',15,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(303,'303',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0014 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0014 validated\nAuthor: demo',16,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(304,'304',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0015 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0015 validated\nAuthor: aeinstein',17,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(305,'305',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0016 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,26,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0016 validated\nAuthor: demo',18,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(306,'306',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0017 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0017 validated\nAuthor: demo',19,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(307,'307',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0018 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0018 validated\nAuthor: aeinstein',20,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(308,'308',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0019 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,1,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0019 validated\nAuthor: aeinstein',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(309,'309',NULL,1,'2017-02-16 01:46:15','2017-02-16 01:46:15',40,'AC_OTH_AUTO','Proposal PR1702-0020 validated','2017-02-16 01:46:15','2021-04-15 10:22:55',1,NULL,NULL,26,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0020 validated\nAuthor: aeinstein',22,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(310,'310',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0021 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,12,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0021 validated\nAuthor: demo',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(311,'311',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0022 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',2,NULL,NULL,7,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0022 validated\nAuthor: demo',24,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(312,'312',NULL,1,'2017-02-16 01:46:17','2017-02-16 01:46:17',40,'AC_OTH_AUTO','Proposal PR1702-0023 validated','2017-02-16 01:46:17','2021-04-15 10:22:55',1,NULL,NULL,3,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0023 validated\nAuthor: aeinstein',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(313,'313',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0024 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0024 validated\nAuthor: demo',26,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(314,'314',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0025 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,6,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0025 validated\nAuthor: aeinstein',27,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(315,'315',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0026 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0026 validated\nAuthor: demo',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(316,'316',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0027 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0027 validated\nAuthor: demo',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(317,'317',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0028 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,1,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0028 validated\nAuthor: demo',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(318,'318',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0029 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',1,NULL,NULL,11,NULL,0,1,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0029 validated\nAuthor: aeinstein',31,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(319,'319',NULL,1,'2017-02-16 01:46:18','2017-02-16 01:46:18',40,'AC_OTH_AUTO','Proposal PR1702-0030 validated','2017-02-16 01:46:18','2021-04-15 10:22:55',2,NULL,NULL,19,NULL,0,2,0,NULL,0,0,-1,'',NULL,NULL,'Proposal PR1702-0030 validated\nAuthor: demo',32,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(320,'320',NULL,1,'2017-02-16 04:46:31','2017-02-16 04:46:31',40,'AC_OTH_AUTO','Proposition PR1702-0026 signée','2017-02-16 04:46:31','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0026 signée\nAuteur: admin',28,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(321,'321',NULL,1,'2017-02-16 04:46:37','2017-02-16 04:46:37',40,'AC_OTH_AUTO','Proposition PR1702-0027 signée','2017-02-16 04:46:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0027 signée\nAuteur: admin',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(322,'322',NULL,1,'2017-02-16 04:46:42','2017-02-16 04:46:42',40,'AC_OTH_AUTO','Proposition PR1702-0028 refusée','2017-02-16 04:46:42','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0028 refusée\nAuteur: admin',30,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(323,'323',NULL,1,'2017-02-16 04:47:09','2017-02-16 04:47:09',40,'AC_OTH_AUTO','Proposition PR1702-0019 validée','2017-02-16 04:47:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0019 validée\nAuteur: admin',21,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(324,'324',NULL,1,'2017-02-16 04:47:25','2017-02-16 04:47:25',40,'AC_OTH_AUTO','Proposition PR1702-0023 signée','2017-02-16 04:47:25','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 signée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(325,'325',NULL,1,'2017-02-16 04:47:29','2017-02-16 04:47:29',40,'AC_OTH_AUTO','Proposition PR1702-0023 classée payée','2017-02-16 04:47:29','2021-04-15 10:22:55',12,NULL,NULL,3,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0023 classée payée\nAuteur: admin',25,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(326,'326',NULL,1,'2017-02-17 16:07:18','2017-02-17 16:07:18',40,'AC_OTH_AUTO','Proposition PR1702-0021 validée','2017-02-17 16:07:18','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Proposition PR1702-0021 validée\nAuteur: admin',23,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(327,'327',NULL,1,'2017-05-12 13:53:44','2017-05-12 13:53:44',40,'AC_OTH_AUTO','Email sent by MyBigCompany To Einstein','2017-05-12 13:53:44','2021-04-15 10:22:55',12,NULL,NULL,11,12,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Sender: MyBigCompany <myemail@mybigcompany.com>
\nReceiver(s): Einstein <genius@example.com>
\nBcc: Einstein <genius@example.com>
\nEMail topic: Test
\nEmail body:
\nTest\nAuthor: admin',11,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(328,'328',NULL,1,'2017-08-29 22:39:09','2017-08-29 22:39:09',40,'AC_OTH_AUTO','Invoice FA1601-0024 validated','2017-08-29 22:39:09','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Invoice FA1601-0024 validated\nAuthor: admin',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(329,'329',NULL,1,'2019-09-26 13:38:11','2019-09-26 13:38:11',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:38:11','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(330,'330',NULL,1,'2019-09-26 13:49:21','2019-09-26 13:49:21',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-09-26 13:49:21','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(331,'331',NULL,1,'2019-09-26 17:33:37','2019-09-26 17:33:37',40,'AC_BILL_VALIDATE','Invoice FA1909-0025 validated','2019-09-26 17:33:37','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1909-0025 validated',218,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(333,'333',NULL,1,'2019-09-27 16:54:30','2019-09-27 16:54:30',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0031 validated','2019-09-27 16:54:30','2021-04-15 10:22:55',12,NULL,4,7,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0031 validated',10,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(335,'335',NULL,1,'2019-09-27 17:08:59','2019-09-27 17:08:59',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0032 validated','2019-09-27 17:08:59','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0032 validated',33,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(337,'337',NULL,1,'2019-09-27 17:13:13','2019-09-27 17:13:13',40,'AC_PROPAL_VALIDATE','Proposal PR1909-0033 validated','2019-09-27 17:13:13','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 validated',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(338,'338',NULL,1,'2019-09-27 17:53:31','2019-09-27 17:53:31',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 17:53:31','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(339,'339',NULL,1,'2019-09-27 18:15:00','2019-09-27 18:15:00',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:15:00','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(340,'340',NULL,1,'2019-09-27 18:40:32','2019-09-27 18:40:32',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 18:40:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(341,'341',NULL,1,'2019-09-27 19:16:07','2019-09-27 19:16:07',40,'AC_PRODUCT_CREATE','Product ppp created','2019-09-27 19:16:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp created',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(342,'342',NULL,1,'2019-09-27 19:18:01','2019-09-27 19:18:01',40,'AC_PRODUCT_MODIFY','Product ppp modified','2019-09-27 19:18:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp modified',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(343,'343',NULL,1,'2019-09-27 19:31:45','2019-09-27 19:31:45',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:31:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(344,'344',NULL,1,'2019-09-27 19:32:12','2019-09-27 19:32:12',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:32:12','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(345,'345',NULL,1,'2019-09-27 19:38:30','2019-09-27 19:38:30',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(346,'346',NULL,1,'2019-09-27 19:38:37','2019-09-27 19:38:37',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-09-27 19:38:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(347,'347',NULL,1,'2019-09-30 15:49:52',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #15ff11cay39skiaa] New message','2019-09-30 15:49:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'dfsdfds',2,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(348,'348',NULL,1,'2019-10-01 13:48:36','2019-10-01 13:48:36',40,'AC_PROJECT_MODIFY','Project PJ1607-0001 modified','2019-10-01 13:48:36','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1607-0001 modified\nTask: PJ1607-0001',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(349,'349',NULL,1,'2019-10-04 10:10:25','2019-10-04 10:10:25',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:10:25','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(350,'350',NULL,1,'2019-10-04 10:10:47','2019-10-04 10:10:47',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:10:47','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(351,'351',NULL,1,'2019-10-04 10:26:49','2019-10-04 10:26:49',40,'AC_BILL_UNVALIDATE','Invoice FA6801-0010 go back to draft status','2019-10-04 10:26:49','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 go back to draft status',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(352,'352',NULL,1,'2019-10-04 10:27:00','2019-10-04 10:27:00',40,'AC_BILL_VALIDATE','Invoice FA6801-0010 validated','2019-10-04 10:27:00','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 validated',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(353,'353',NULL,1,'2019-10-04 10:28:14','2019-10-04 10:28:14',40,'AC_BILL_PAYED','Invoice FA6801-0010 changed to paid','2019-10-04 10:28:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA6801-0010 changed to paid',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(354,'354',NULL,1,'2019-10-04 10:29:22','2019-10-04 10:29:22',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI1601-0002 changed to paid','2019-10-04 10:29:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 changed to paid',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(355,'355',NULL,1,'2019-10-04 10:29:41','2019-10-04 10:29:41',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI1601-0002 go back to draft status','2019-10-04 10:29:41','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 go back to draft status',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(356,'356',NULL,1,'2019-10-04 10:31:30','2019-10-04 10:31:30',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1601-0002 validated','2019-10-04 10:31:30','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1601-0002 validated',17,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(357,'357',NULL,1,'2019-10-04 16:56:21',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 16:56:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(358,'358',NULL,1,'2019-10-04 17:08:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:08:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'ddddd',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(359,'359',NULL,1,'2019-10-04 17:25:05',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:25:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(360,'360',NULL,1,'2019-10-04 17:26:14',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:26:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(361,'361',NULL,1,'2019-10-04 17:30:10',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:30:10','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(362,'362',NULL,1,'2019-10-04 17:51:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:51:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(363,'363',NULL,1,'2019-10-04 17:52:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(364,'364',NULL,1,'2019-10-04 17:52:17',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(365,'365',NULL,1,'2019-10-04 17:52:39',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:39','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(366,'366',NULL,1,'2019-10-04 17:52:53',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(367,'367',NULL,1,'2019-10-04 17:53:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(368,'368',NULL,1,'2019-10-04 17:53:26',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:26','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(369,'369',NULL,1,'2019-10-04 17:53:48',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:53:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(370,'370',NULL,1,'2019-10-04 17:54:09',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:09','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(371,'371',NULL,1,'2019-10-04 17:54:28',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:54:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(372,'372',NULL,1,'2019-10-04 17:55:43',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:55:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(373,'373',NULL,1,'2019-10-04 17:56:01',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 17:56:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(374,'374',NULL,1,'2019-10-04 18:00:32',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(375,'375',NULL,1,'2019-10-04 18:00:58',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:00:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(376,'376',NULL,1,'2019-10-04 18:11:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:11:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fdsfs',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(377,'377',NULL,1,'2019-10-04 18:12:02',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:12:02','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fffffff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(378,'378',NULL,1,'2019-10-04 18:49:30',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 18:49:30','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaa',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(379,'379',NULL,1,'2019-10-04 19:00:22',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:00:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'fff',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(380,'380',NULL,1,'2019-10-04 19:24:20','2019-10-04 19:24:20',40,'AC_PROPAL_SENTBYMAIL','Email sent by Alice Adminson To NLTechno','2019-10-04 19:24:20','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSender: Alice Adminson <aadminson@example.com>
\nReceiver(s): NLTechno <notanemail@nltechno.com>
\nEmail topic: Envoi de la proposition commerciale PR1909-0032
\nEmail body:
\nHello
\r\n
\r\nVeuillez trouver, ci-joint, la proposition commerciale PR1909-0032
\r\n
\r\n
\r\nSincerely
\r\n
\r\nAlice - 123
\n
\nAttached files and documents: PR1909-0032.pdf',33,'propal',NULL,'Envoi de la proposition commerciale PR1909-0032','Alice Adminson ',NULL,'NLTechno ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(381,'381',NULL,1,'2019-10-04 19:30:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:30:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(382,'382',NULL,1,'2019-10-04 19:32:55',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:32:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'uuuuuu\n\nAttached files and documents: Array',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(383,'383',NULL,1,'2019-10-04 19:37:16',NULL,50,'TICKET_MSG','','2019-10-04 19:37:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'f\n\nFichiers et documents joints: dolihelp.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(384,'384',NULL,1,'2019-10-04 19:39:07',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #9d85cko5qmmo7qxs] New message','2019-10-04 19:39:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'aaafff\n\nAttached files and documents: dolibarr.gif;doliadmin.ico',5,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(385,'385',NULL,1,'2019-10-07 12:17:07','2019-10-07 12:17:07',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',17,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(386,'386',NULL,1,'2019-10-07 12:17:32','2019-10-07 12:17:32',40,'AC_PRODUCT_DELETE','Product PREF123456 deleted','2019-10-07 12:17:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PREF123456 deleted',18,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(387,'387',NULL,1,'2019-10-08 19:21:07','2019-10-08 19:21:07',40,'AC_PRODUCT_MODIFY','Product ROLLUPABC modified','2019-10-08 19:21:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ROLLUPABC modified',11,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(388,'388',NULL,1,'2019-10-08 21:01:07','2019-10-08 21:01:07',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2019-10-08 21:01:07','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(389,'389',NULL,1,'2019-10-08 21:01:22','2019-10-08 21:01:22',40,'AC_MEMBER_MODIFY','Member doe john modified','2019-10-08 21:01:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(390,'390',NULL,1,'2019-10-08 21:01:45','2019-10-08 21:01:45',40,'AC_MEMBER_MODIFY','Member smith smith modified','2019-10-08 21:01:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(391,'391',NULL,1,'2019-10-08 21:02:18','2019-10-08 21:02:18',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2019-10-08 21:02:18','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(392,'392',NULL,1,'2019-11-28 15:54:46','2019-11-28 15:54:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI1911-0005 validated','2019-11-28 15:54:47','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI1911-0005 validated',21,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(393,'393',NULL,1,'2019-11-28 16:33:35','2019-11-28 16:33:35',40,'AC_PRODUCT_CREATE','Product FR-CAR created','2019-11-28 16:33:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR created',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(394,'394',NULL,1,'2019-11-28 16:34:08','2019-11-28 16:34:08',40,'AC_PRODUCT_DELETE','Product ppp deleted','2019-11-28 16:34:08','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct ppp deleted',14,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(395,'395',NULL,1,'2019-11-28 16:34:33','2019-11-28 16:34:33',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:33','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(396,'396',NULL,1,'2019-11-28 16:34:46','2019-11-28 16:34:46',40,'AC_PRODUCT_MODIFY','Product FR-CAR modified','2019-11-28 16:34:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct FR-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(397,'397',NULL,1,'2019-11-28 16:36:56','2019-11-28 16:36:56',40,'AC_PRODUCT_MODIFY','Product POS-CAR modified','2019-11-28 16:36:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CAR modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(398,'398',NULL,1,'2019-11-28 16:37:36','2019-11-28 16:37:36',40,'AC_PRODUCT_CREATE','Product POS-APPLE created','2019-11-28 16:37:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE created',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(399,'399',NULL,1,'2019-11-28 16:37:58','2019-11-28 16:37:58',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 16:37:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(400,'400',NULL,1,'2019-11-28 16:38:44','2019-11-28 16:38:44',40,'AC_PRODUCT_CREATE','Product POS-KIWI created','2019-11-28 16:38:44','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-KIWI created',26,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(401,'401',NULL,1,'2019-11-28 16:39:21','2019-11-28 16:39:21',40,'AC_PRODUCT_CREATE','Product POS-PEACH created','2019-11-28 16:39:21','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-PEACH created',27,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(402,'402',NULL,1,'2019-11-28 16:39:58','2019-11-28 16:39:58',40,'AC_PRODUCT_CREATE','Product POS-ORANGE created','2019-11-28 16:39:58','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-ORANGE created',28,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(403,'403',NULL,1,'2019-11-28 17:00:28','2019-11-28 17:00:28',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2019-11-28 17:00:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(404,'404',NULL,1,'2019-11-28 17:00:46','2019-11-28 17:00:46',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 17:00:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(405,'405',NULL,1,'2019-11-28 17:01:57','2019-11-28 17:01:57',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 17:01:57','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(406,'406',NULL,1,'2019-11-28 17:03:14','2019-11-28 17:03:14',40,'AC_PRODUCT_CREATE','Product POS-Eggs created','2019-11-28 17:03:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs created',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(407,'407',NULL,1,'2019-11-28 17:04:17','2019-11-28 17:04:17',40,'AC_PRODUCT_MODIFY','Product POS-Eggs modified','2019-11-28 17:04:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Eggs modified',29,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(408,'408',NULL,1,'2019-11-28 17:09:14','2019-11-28 17:09:14',40,'AC_PRODUCT_CREATE','Product POS-Chips created','2019-11-28 17:09:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips created',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(409,'409',NULL,1,'2019-11-28 17:09:54','2019-11-28 17:09:54',40,'AC_PRODUCT_MODIFY','Product POS-Chips modified','2019-11-28 17:09:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-Chips modified',30,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(410,'410',NULL,1,'2019-11-28 18:46:20','2019-11-28 18:46:20',40,'AC_PRODUCT_MODIFY','Product POS-APPLE modified','2019-11-28 18:46:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-APPLE modified',25,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(411,'411',NULL,1,'2019-11-28 18:59:29','2019-11-28 18:59:29',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 18:59:29','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(412,'412',NULL,1,'2019-11-28 19:02:01','2019-11-28 19:02:01',40,'AC_PRODUCT_MODIFY','Product POS-CARROT modified','2019-11-28 19:02:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct POS-CARROT modified',24,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(413,'413',NULL,1,'2019-11-28 19:09:50','2019-11-28 19:09:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:09:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(414,'414',NULL,1,'2019-11-28 19:12:50','2019-11-28 19:12:50',40,'AC_PRODUCT_MODIFY','Product PEARPIE modified','2019-11-28 19:12:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PEARPIE modified',2,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(415,'415',NULL,1,'2019-11-29 12:46:29','2019-11-29 12:46:29',40,'AC_TICKET_CREATE','Ticket TS1911-0004 created','2019-11-29 12:46:29','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 created',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(416,'416',NULL,1,'2019-11-29 12:46:34','2019-11-29 12:46:34',40,'AC_TICKET_MODIFY','Ticket TS1911-0004 read by Alice Adminson','2019-11-29 12:46:34','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 read by Alice Adminson',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(417,'417',NULL,1,'2019-11-29 12:46:47','2019-11-29 12:46:47',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0004 assigned','2019-11-29 12:46:47','2021-04-15 10:22:55',12,NULL,4,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0004 assigned\nOld user: None\nNew user: Commerson Charle1',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(418,'418',NULL,1,'2019-11-29 12:47:13',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #5gvo9bsjri55zef9] New message','2019-11-29 12:47:13','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Where do you want to install Dolibarr ?
\r\nOn-Premise or on the Cloud ?',6,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(419,'419',NULL,1,'2019-11-29 12:50:45','2019-11-29 12:50:45',40,'AC_TICKET_CREATE','Ticket TS1911-0005 créé','2019-11-29 12:50:45','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nTicket TS1911-0005 créé',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(420,'420',NULL,1,'2019-11-29 12:52:32','2019-11-29 12:52:32',40,'AC_TICKET_MODIFY','Ticket TS1911-0005 read by Alice Adminson','2019-11-29 12:52:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 read by Alice Adminson',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(421,'421',NULL,1,'2019-11-29 12:52:53','2019-11-29 12:52:53',40,'AC_TICKET_ASSIGNED','Ticket TS1911-0005 assigned','2019-11-29 12:52:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 assigned\nOld user: None\nNew user: Commerson Charle1',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(422,'422',NULL,1,'2019-11-29 12:54:04',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:54:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'Hi.
\r\nThanks for your interest in using Dolibarr ERP CRM.
\r\nI need more information to give you the correct answer : Where do you want to install Dolibarr. On premise or on Cloud',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(423,'423',NULL,1,'2019-11-29 12:54:46',NULL,50,'TICKET_MSG','','2019-11-29 12:54:46','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,100,'',NULL,NULL,'I need it On-Premise.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(424,'424',NULL,1,'2019-11-29 12:55:42',NULL,50,'TICKET_MSG','[MyBigCompany - ticket #d51wjy4nym7wltg7] New message','2019-11-29 12:55:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,100,'',NULL,NULL,'When used on-premise, you can download and install Dolibarr yourself from ou web portal: https://www.dolibarr.org
\r\nIt is completely free.',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(425,'425',NULL,1,'2019-11-29 12:55:48','2019-11-29 12:55:48',40,'AC_TICKET_CLOSE','Ticket TS1911-0005 closed','2019-11-29 12:55:48','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nTicket TS1911-0005 closed',7,'ticket',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(426,'426',NULL,1,'2019-11-29 12:56:47','2019-11-29 12:56:47',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2019-11-29 12:56:47','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(427,'427',NULL,1,'2019-11-29 12:57:14','2019-11-29 12:57:14',40,'AC_BOM_VALIDATE','BOM validated','2019-11-29 12:57:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(428,'428',NULL,1,'2019-12-20 16:40:14','2019-12-20 16:40:14',40,'AC_MO_DELETE','MO deleted','2019-12-20 16:40:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',3,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(429,'429',NULL,1,'2019-12-20 17:00:43','2019-12-20 17:00:43',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:43','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',7,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(430,'430',NULL,1,'2019-12-20 17:00:56','2019-12-20 17:00:56',40,'AC_MO_DELETE','MO deleted','2019-12-20 17:00:56','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',6,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(431,'431',NULL,1,'2019-12-20 20:00:03','2019-12-20 20:00:03',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:00:03','2021-04-15 10:22:55',12,NULL,6,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',1,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(432,'432',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',10,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(433,'433',NULL,1,'2019-12-20 20:22:11','2019-12-20 20:22:11',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',12,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(434,'434',NULL,1,'2019-12-20 20:22:20','2019-12-20 20:22:20',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:22:20','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',9,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(435,'435',NULL,1,'2019-12-20 20:27:07','2019-12-20 20:27:07',40,'AC_MO_DELETE','MO deleted','2019-12-20 20:27:07','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO deleted',13,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(436,'436',NULL,1,'2019-12-20 20:42:42','2019-12-20 20:42:42',40,'AC_ORDER_VALIDATE','Order CO7001-0027 validated','2019-12-20 20:42:42','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0027 validated',88,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(437,'437',NULL,1,'2019-12-20 20:46:25','2019-12-20 20:46:25',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:46:25','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(438,'438',NULL,1,'2019-12-20 20:46:45','2019-12-20 20:46:45',40,'AC_ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase Order CF1007-0001 set billed','2019-12-20 20:46:45','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 set billed',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(439,'439',NULL,1,'2019-12-20 20:47:02','2019-12-20 20:47:02',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:02','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(440,'440',NULL,1,'2019-12-20 20:47:44','2019-12-20 20:47:44',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:44','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(441,'441',NULL,1,'2019-12-20 20:47:53','2019-12-20 20:47:53',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:47:53','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(442,'442',NULL,1,'2019-12-20 20:48:05','2019-12-20 20:48:05',40,'AC_ORDER_SUPPLIER_RECEIVE','Purchase Order CF1007-0001 received','2019-12-20 20:48:05','2021-04-15 10:22:55',12,NULL,NULL,13,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPurchase Order CF1007-0001 received ',1,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(443,'443',NULL,1,'2019-12-20 20:48:45','2019-12-20 20:48:45',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0016 classified billed','2019-12-20 20:48:45','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0016 classified billed',54,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(444,'444',NULL,1,'2019-12-20 20:48:55','2019-12-20 20:48:55',40,'AC_ORDER_CLOSE','Order CO7001-0018 classified delivered','2019-12-20 20:48:55','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0018 classified delivered',62,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(445,'445',NULL,1,'2019-12-20 20:49:43','2019-12-20 20:49:43',40,'AC_PROPAL_CLASSIFY_BILLED','Proposal PR1702-0027 classified billed','2019-12-20 20:49:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 classified billed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(446,'446',NULL,1,'2019-12-20 20:49:54','2019-12-20 20:49:54',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:49:54','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(447,'447',NULL,1,'2019-12-20 20:50:14','2019-12-20 20:50:14',40,'AC_PROPAL_CLOSE_REFUSED','Proposal PR1702-0027 refused','2019-12-20 20:50:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 refused',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(448,'448',NULL,1,'2019-12-20 20:50:23','2019-12-20 20:50:23',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1702-0027 signed','2019-12-20 20:50:23','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1702-0027 signed',29,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(449,'449',NULL,1,'2019-12-21 17:18:22','2019-12-21 17:18:22',40,'AC_BOM_CLOSE','BOM disabled','2019-12-21 17:18:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(450,'450',NULL,1,'2019-12-21 17:18:38','2019-12-21 17:18:38',40,'AC_MEMBER_RESILIATE','Member Vick Smith terminated','2019-12-21 17:18:38','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith terminated\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(451,'451',NULL,1,'2019-12-21 19:46:33','2019-12-21 19:46:33',40,'AC_PROJECT_CREATE','Project PJ1912-0005 created','2019-12-21 19:46:33','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 created\nProject: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(452,'452',NULL,1,'2019-12-21 19:47:03','2019-12-21 19:47:03',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:03','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(453,'453',NULL,1,'2019-12-21 19:47:24','2019-12-21 19:47:24',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:24','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(454,'454',NULL,1,'2019-12-21 19:47:52','2019-12-21 19:47:52',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:47:52','2021-04-15 10:22:55',12,NULL,10,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(455,'455',NULL,1,'2019-12-21 19:48:06','2019-12-21 19:48:06',40,'AC_PROJECT_MODIFY','Project PJ1912-0005 modified','2019-12-21 19:48:06','2021-04-15 10:22:55',12,NULL,10,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0005 modified\nTask: PJ1912-0005',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(456,'456',NULL,1,'2019-12-21 19:49:28','2019-12-21 19:49:28',40,'AC_PROJECT_CREATE','Project PJ1912-0006 created','2019-12-21 19:49:28','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 created\nProject: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(457,'457',NULL,1,'2019-12-21 19:52:12','2019-12-21 19:52:12',40,'AC_PROJECT_CREATE','Project PJ1912-0007 created','2019-12-21 19:52:12','2021-04-15 10:22:55',12,NULL,12,4,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0007 created\nProject: PJ1912-0007',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(458,'458',NULL,1,'2019-12-21 19:53:21','2019-12-21 19:53:21',40,'AC_PROJECT_CREATE','Project PJ1912-0008 created','2019-12-21 19:53:21','2021-04-15 10:22:55',12,NULL,13,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 created\nProject: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(459,'459',NULL,1,'2019-12-21 19:53:42','2019-12-21 19:53:42',40,'AC_PROJECT_MODIFY','Project PJ1912-0008 modified','2019-12-21 19:53:42','2021-04-15 10:22:55',12,NULL,13,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0008 modified\nTask: PJ1912-0008',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(460,'460',NULL,1,'2019-12-21 19:55:23','2019-12-21 19:55:23',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 19:55:23','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(461,'461',NULL,1,'2019-12-21 20:10:21','2019-12-21 20:10:21',40,'AC_PROJECT_MODIFY','Project PJ1912-0006 modified','2019-12-21 20:10:21','2021-04-15 10:22:55',12,NULL,11,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PJ1912-0006 modified\nTask: PJ1912-0006',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(462,'462',NULL,1,'2019-12-11 10:00:00','2019-12-11 10:00:00',5,'AC_RDV','Meeting with all employees','2019-12-21 20:29:32','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(463,'463',NULL,1,'2019-12-06 00:00:00',NULL,11,'AC_INT','Intervention on customer site','2019-12-21 20:30:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(464,'464',NULL,1,'2019-12-23 14:16:59','2019-12-23 14:16:59',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:16:59','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(465,'465',NULL,1,'2019-12-23 14:17:18','2019-12-23 14:17:18',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2019-12-23 14:17:18','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(466,'466',NULL,1,'2019-11-23 14:25:00',NULL,50,'AC_OTH','Test','2019-12-23 17:25:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,-1,'',NULL,NULL,'18/11 17h06 : Message laissé. Me rappeler pour m'en dire plus. 
\r\n
\r\n20/11 10h17 "A rappeler suite au msg laissé le 14/11, dit que c'est urgent"
\r\n12h22 : message laissé. Je lui envoie un sms
\r\n
\r\n"Déclaration de sinistre originale" : constat de ce qui s'est passé.
\r\nElle envoie le chèque de solde dès demain.
\r\n
\r\n3/12 : Elle préfère avoir plus d'infos sur le sinistre pour l'assurance.
\r\nCourrier envoyé le 4/12/19 par mail et par courrier postal
\r\n
\r\n6/12 15h02 : ont obtenu le feu vert de l'assurance.
\r\nOn bloque 16/12 PM à partir de 14h30. ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(467,'467',NULL,1,'2020-01-01 14:35:47','2020-01-01 14:35:47',40,'AC_MEMBER_VALIDATE','Adhérent aze aze validé','2020-01-01 14:35:47','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent aze aze validé\nAdhérent: aze aze\nType: Board members',5,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(468,'468',NULL,1,'2020-01-01 14:50:59','2020-01-01 14:50:59',40,'AC_MEMBER_VALIDATE','Adhérent azr azr validé','2020-01-01 14:50:59','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azr azr validé\nAdhérent: azr azr\nType: Board members',6,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(469,'469',NULL,1,'2020-01-01 15:00:16','2020-01-01 15:00:16',40,'AC_MEMBER_VALIDATE','Adhérent azt azt validé','2020-01-01 15:00:16','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azt azt validé\nAdhérent: azt azt\nType: Board members',7,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(470,'470',NULL,1,'2020-01-01 15:08:20','2020-01-01 15:08:20',40,'AC_MEMBER_VALIDATE','Adhérent azu azu validé','2020-01-01 15:08:20','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azu azu validé\nAdhérent: azu azu\nType: Board members',8,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(471,'471',NULL,1,'2020-01-01 15:27:24','2020-01-01 15:27:24',40,'AC_MEMBER_VALIDATE','Adhérent azi azi validé','2020-01-01 15:27:24','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azi azi validé\nAdhérent: azi azi\nType: Board members',9,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(472,'472',NULL,1,'2020-01-01 15:36:29','2020-01-01 15:36:29',40,'AC_MEMBER_VALIDATE','Adhérent azo azo validé','2020-01-01 15:36:29','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azo azo validé\nAdhérent: azo azo\nType: Board members',10,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(473,'473',NULL,1,'2020-01-01 15:44:25','2020-01-01 15:44:25',40,'AC_MEMBER_VALIDATE','Adhérent azp azp validé','2020-01-01 15:44:25','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azp azp validé\nAdhérent: azp azp\nType: Board members',11,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(478,'478',NULL,1,'2020-01-01 16:52:32','2020-01-01 16:52:32',40,'AC_MEMBER_VALIDATE','Adhérent azq azq validé','2020-01-01 16:52:32','2021-04-15 10:22:55',NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0,-1,'',NULL,NULL,'Auteur: \nAdhérent azq azq validé\nAdhérent: azq azq\nType: Board members',12,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(483,'483',NULL,1,'2020-01-01 17:49:05','2020-01-01 17:49:05',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 17:49:05','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(484,'484',NULL,1,'2020-01-01 17:50:41','2020-01-01 17:50:41',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 17:50:41','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(485,'485',NULL,1,'2020-01-01 17:50:44','2020-01-01 17:50:44',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 17:50:44','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',23,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(486,'486',NULL,1,'2020-01-01 17:51:22','2020-01-01 17:51:22',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 17:51:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(487,'487',NULL,1,'2020-01-01 20:17:00','2020-01-01 20:17:00',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:17:00','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(488,'488',NULL,1,'2020-01-01 20:17:46','2020-01-01 20:17:46',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:17:46','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(489,'489',NULL,1,'2020-01-01 20:17:51','2020-01-01 20:17:51',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:17:51','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',24,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(490,'490',NULL,1,'2020-01-01 20:20:22','2020-01-01 20:20:22',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:20:22','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(491,'491',NULL,1,'2020-01-01 20:20:31','2020-01-01 20:20:31',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:20:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',26,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(492,'492',NULL,1,'2020-01-01 20:21:35','2020-01-01 20:21:35',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-01 20:21:35','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(493,'493',NULL,1,'2020-01-01 20:21:42','2020-01-01 20:21:42',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-01 20:21:42','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(494,'494',NULL,1,'2020-01-01 20:21:55','2020-01-01 20:21:55',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0001 validated','2020-01-01 20:21:55','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 validated',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(495,'495',NULL,1,'2020-01-01 20:23:02','2020-01-01 20:23:02',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0007 validated','2020-01-01 20:23:02','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 validated',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(496,'496',NULL,1,'2020-01-01 20:23:17','2020-01-01 20:23:17',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 20:23:17','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(497,'497',NULL,1,'2020-01-01 20:25:36','2020-01-01 20:25:36',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 20:25:36','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(498,'498',NULL,1,'2020-01-01 20:51:37','2020-01-01 20:51:37',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SA2001-0002 validated','2020-01-01 20:51:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 validated',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(499,'499',NULL,1,'2020-01-01 20:51:48','2020-01-01 20:51:48',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0002 changed to paid','2020-01-01 20:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0002 changed to paid',30,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(500,'500',NULL,1,'2020-01-01 21:02:39','2020-01-01 21:02:39',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:02:39','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(501,'501',NULL,1,'2020-01-01 21:03:01','2020-01-01 21:03:01',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:03:01','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(502,'502',NULL,1,'2020-01-01 21:11:10','2020-01-01 21:11:10',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:11:10','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(503,'503',NULL,1,'2020-01-01 21:20:07','2020-01-01 21:20:07',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 21:20:07','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(504,'504',NULL,1,'2020-01-01 21:21:28','2020-01-01 21:21:28',40,'AC_BILL_SUPPLIER_PAYED','Invoice SI2001-0007 changed to paid','2020-01-01 21:21:28','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0007 changed to paid',28,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(505,'505',NULL,1,'2020-01-01 22:06:30','2020-01-01 22:06:30',40,'AC_BILL_SUPPLIER_PAYED','Invoice SA2001-0001 changed to paid','2020-01-01 22:06:31','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SA2001-0001 changed to paid',27,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(506,'506',NULL,1,'2020-01-01 23:54:16','2020-01-01 23:54:16',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-01 23:54:16','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(507,'507',NULL,1,'2020-01-02 20:49:34','2020-01-02 20:49:34',40,'AC_BILL_PAYED','Invoice FA1601-0024 changed to paid','2020-01-02 20:49:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1601-0024 changed to paid',149,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(508,'508',NULL,1,'2020-01-02 23:02:35','2020-01-02 23:02:35',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-02 23:02:35','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(509,'509',NULL,1,'2020-01-02 23:45:01','2020-01-02 23:45:01',40,'AC_BOM_REOPEN','BOM reopen','2020-01-02 23:45:01','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(511,'511',NULL,1,'2020-01-02 23:57:42','2020-01-02 23:57:42',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-02 23:57:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(512,'512',NULL,1,'2020-01-03 13:33:54','2020-01-03 13:33:54',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-03 13:33:54','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(513,'513',NULL,1,'2020-01-03 13:34:11','2020-01-03 13:34:11',40,'AC_BOM_VALIDATE','BOM validated','2020-01-03 13:34:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(514,'514',NULL,1,'2020-01-03 13:35:45','2020-01-03 13:35:45',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 13:35:45','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(515,'515',NULL,1,'2020-01-03 14:10:41','2020-01-03 14:10:41',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-03 14:10:41','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',18,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(516,'516',NULL,1,'2020-01-06 00:39:58','2020-01-06 00:39:58',40,'AC_COMPANY_CREATE','Patient créé','2020-01-06 00:39:58','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nPatient créé',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(517,'517',NULL,1,'2020-01-06 00:49:06','2020-01-06 00:49:06',40,'AC_BILL_SUPPLIER_UNVALIDATE','Invoice SI2001-0006 go back to draft status','2020-01-06 00:49:06','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 go back to draft status',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(518,'518',NULL,1,'2020-01-06 06:50:05','2020-01-06 06:50:05',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-06 06:50:05','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(519,'519',NULL,1,'2020-01-06 20:52:28','2020-01-06 20:52:28',40,'AC_OTH_AUTO','Consultation 2 recorded (Patient)','2020-01-06 20:52:28','2021-04-15 10:22:55',12,NULL,NULL,29,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Consultation 2 recorded (Patient)\nAuthor: admin',2,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(520,'520',NULL,1,'2020-01-07 20:25:02','2020-01-07 20:25:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 20:25:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(521,'521',NULL,1,'2020-01-07 21:12:37','2020-01-07 21:12:37',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:12:37','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(522,'522',NULL,1,'2020-01-07 21:13:00','2020-01-07 21:13:00',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:00','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(523,'523',NULL,1,'2020-01-07 21:13:49','2020-01-07 21:13:49',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:13:49','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(524,'524',NULL,1,'2020-01-07 21:46:58','2020-01-07 21:46:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:46:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(525,'525',NULL,1,'2020-01-07 21:52:34','2020-01-07 21:52:34',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:52:34','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(526,'526',NULL,1,'2020-01-07 21:53:44','2020-01-07 21:53:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(527,'527',NULL,1,'2020-01-07 21:53:58','2020-01-07 21:53:58',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:53:58','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(528,'528',NULL,1,'2020-01-07 21:54:12','2020-01-07 21:54:12',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 21:54:12','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(529,'529',NULL,1,'2020-01-07 22:00:55','2020-01-07 22:00:55',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:00:55','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(530,'530',NULL,1,'2020-01-07 22:39:52','2020-01-07 22:39:52',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 22:39:52','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(531,'531',NULL,1,'2020-01-07 23:09:04','2020-01-07 23:09:04',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:09:04','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(532,'532',NULL,1,'2020-01-07 23:39:09','2020-01-07 23:39:09',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:39:09','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(533,'533',NULL,1,'2020-01-07 23:43:06','2020-01-07 23:43:06',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR1909-0033 signed','2020-01-07 23:43:06','2021-04-15 10:22:55',12,NULL,6,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR1909-0033 signed',34,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(534,'534',NULL,1,'2020-01-07 23:50:40','2020-01-07 23:50:40',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:50:40','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(535,'535',NULL,1,'2020-01-07 23:51:27','2020-01-07 23:51:27',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-07 23:51:27','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(536,'536',NULL,1,'2020-01-08 00:25:23','2020-01-08 00:25:23',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:23','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(537,'537',NULL,1,'2020-01-08 00:25:43','2020-01-08 00:25:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:25:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(538,'538',NULL,1,'2020-01-08 00:29:24','2020-01-08 00:29:24',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:24','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(539,'539',NULL,1,'2020-01-08 00:29:43','2020-01-08 00:29:43',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 00:29:43','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(540,'540',NULL,1,'2020-01-08 01:09:15','2020-01-08 01:09:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:09:15','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(541,'541',NULL,1,'2020-01-08 01:15:02','2020-01-08 01:15:02',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:15:02','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(542,'542',NULL,1,'2020-01-08 01:17:16','2020-01-08 01:17:16',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 01:17:16','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(543,'543',NULL,1,'2020-01-08 05:31:44','2020-01-08 05:31:44',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 05:31:44','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(544,'544',NULL,1,'2020-01-08 05:39:46','2020-01-08 05:39:46',40,'AC_BOM_CLOSE','BOM disabled','2020-01-08 05:39:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM disabled',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(545,'545',NULL,1,'2020-01-08 05:39:50','2020-01-08 05:39:50',40,'AC_BOM_REOPEN','BOM reopen','2020-01-08 05:39:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM reopen',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(546,'546',NULL,1,'2020-01-08 06:06:50','2020-01-08 06:06:50',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 06:06:50','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',14,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(547,'547',NULL,1,'2020-01-08 19:34:53','2020-01-08 19:34:53',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:34:53','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(548,'548',NULL,1,'2020-01-08 19:40:27','2020-01-08 19:40:27',40,'AC_PRODUCT_MODIFY','Product APPLEPIE modified','2020-01-08 19:40:27','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct APPLEPIE modified',4,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(549,'549',NULL,1,'2020-01-08 19:40:46','2020-01-08 19:40:46',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-08 19:40:46','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(550,'550',NULL,1,'2020-01-08 19:40:59','2020-01-08 19:40:59',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:40:59','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(551,'551',NULL,1,'2020-01-08 19:41:11','2020-01-08 19:41:11',40,'AC_BOM_UNVALIDATE','BOM unvalidated','2020-01-08 19:41:11','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM unvalidated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(552,'552',NULL,1,'2020-01-08 19:41:49','2020-01-08 19:41:49',40,'AC_BOM_VALIDATE','BOM validated','2020-01-08 19:41:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM validated',6,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(553,'553',NULL,1,'2020-01-08 20:12:55','2020-01-08 20:12:55',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-08 20:12:55','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(554,'554',NULL,1,'2020-01-08 20:21:22','2020-01-08 20:21:22',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:21:22','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(555,'555',NULL,1,'2020-01-08 20:41:19','2020-01-08 20:41:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-08 20:41:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',28,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(556,'556',NULL,1,'2020-01-08 22:25:19','2020-01-08 22:25:19',40,'AC_BOM_DELETE','BOM deleted','2020-01-08 22:25:19','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nBOM deleted',7,'bom',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(557,'557',NULL,1,'2020-01-13 15:11:07','2020-01-13 15:11:07',40,'AC_MO_DELETE','MO_DELETEInDolibarr','2020-01-13 15:11:07','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO_DELETEInDolibarr',25,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(558,'558',NULL,1,'2020-01-13 15:11:54','2020-01-13 15:11:54',40,'AC_MRP_MO_VALIDATE','MO validated','2020-01-13 15:11:54','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO validated',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(559,'559',NULL,1,'2020-01-13 15:13:19','2020-01-13 15:13:19',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:13:19','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(560,'560',NULL,1,'2020-01-13 15:14:15','2020-01-13 15:14:15',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:14:15','2021-04-15 10:22:55',12,NULL,6,26,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',24,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(561,'561',NULL,1,'2020-01-13 15:29:30','2020-01-13 15:29:30',40,'AC_MRP_MO_PRODUCED','MO produced','2020-01-13 15:29:30','2021-04-15 10:22:55',12,NULL,7,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMO produced',5,'mo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(562,'562',NULL,1,'2020-01-13 17:19:24','2020-01-13 17:19:24',40,'AC_COMPANY_CREATE','Third party Italo created','2020-01-13 17:19:24','2021-04-15 10:22:55',12,NULL,NULL,30,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nThird party Italo created',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(563,'563',NULL,1,'2020-01-15 16:27:15','2020-01-15 16:27:15',40,'AC_PROJECT_MODIFY','Project RMLL modified','2020-01-15 16:27:15','2021-04-15 10:22:55',12,NULL,5,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject RMLL modified\nTask: RMLL',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(564,'564',NULL,1,'2020-01-15 16:40:50','2020-01-15 16:40:50',40,'AC_PROJECT_MODIFY','Project PROJINDIAN modified','2020-01-15 16:40:50','2021-04-15 10:22:55',12,NULL,3,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProject PROJINDIAN modified\nTask: PROJINDIAN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(565,'565',NULL,1,'2020-01-16 02:22:16','2020-01-16 02:22:16',40,'AC_BILL_VALIDATE','Invoice AC2001-0001 validated','2020-01-16 02:22:16','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 validated',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(566,'566',NULL,1,'2020-01-16 02:22:24','2020-01-16 02:22:24',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0001 go back to draft status','2020-01-16 02:22:24','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0001 go back to draft status',221,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(567,'567',NULL,1,'2020-01-16 02:33:27','2020-01-16 02:33:27',40,'AC_BILL_VALIDATE','Invoice AC2001-0002 validated','2020-01-16 02:33:27','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 validated',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(568,'568',NULL,1,'2020-01-16 02:36:48','2020-01-16 02:36:48',40,'AC_BILL_PAYED','Invoice AC2001-0002 changed to paid','2020-01-16 02:36:48','2021-04-15 10:22:55',12,NULL,NULL,19,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0002 changed to paid',224,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(569,'569',NULL,1,'2020-01-16 02:42:12','2020-01-16 02:42:12',40,'AC_ORDER_CLASSIFY_BILLED','Order CO7001-0020 classified billed','2020-01-16 02:42:12','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified billed',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(570,'570',NULL,1,'2020-01-16 02:42:17','2020-01-16 02:42:17',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:17','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(571,'571',NULL,1,'2020-01-16 02:42:56','2020-01-16 02:42:56',40,'AC_ORDER_CLOSE','Order CO7001-0020 classified delivered','2020-01-16 02:42:56','2021-04-15 10:22:55',12,NULL,NULL,6,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder CO7001-0020 classified delivered',72,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(572,'572',NULL,1,'2020-01-16 18:05:43','2020-01-16 18:05:43',40,'AC_BILL_SUPPLIER_VALIDATE','Invoice SI2001-0006 validated','2020-01-16 18:05:43','2021-04-15 10:22:55',12,NULL,NULL,17,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice SI2001-0006 validated',22,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(573,'573',NULL,1,'2020-01-17 14:54:18','2020-01-17 14:54:18',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 14:54:18','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(574,'574',NULL,1,'2020-01-17 15:22:28','2020-01-17 15:22:28',40,'AC_PRODUCT_MODIFY','Product PINKDRESS modified','2020-01-17 15:22:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PINKDRESS modified',1,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(575,'575',NULL,1,'2020-01-19 14:22:27','2020-01-19 14:22:27',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:22:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(576,'576',NULL,1,'2020-01-19 14:22:34','2020-01-19 14:22:34',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:22:34','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(577,'577',NULL,1,'2020-01-19 14:24:22','2020-01-19 14:24:22',40,'AC_PROPAL_VALIDATE','Proposal PR2001-0034 validated','2020-01-19 14:24:22','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 validated',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(578,'578',NULL,1,'2020-01-19 14:24:27','2020-01-19 14:24:27',40,'AC_PROPAL_CLOSE_SIGNED','Proposal PR2001-0034 signed','2020-01-19 14:24:27','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProposal PR2001-0034 signed',36,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(579,'579',NULL,1,'2020-01-19 14:51:43','2020-01-19 14:51:43',40,'AC_BILL_VALIDATE','Invoice AC2001-0003 validated','2020-01-19 14:51:43','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 validated',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(580,'580',NULL,1,'2020-01-19 14:51:48','2020-01-19 14:51:48',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0003 go back to draft status','2020-01-19 14:51:48','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0003 go back to draft status',227,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(581,'581',NULL,1,'2020-01-19 15:01:26','2020-01-19 15:01:26',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:01:26','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(582,'582',NULL,1,'2020-01-19 15:04:37','2020-01-19 15:04:37',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:04:37','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(583,'583',NULL,1,'2020-01-19 15:04:53','2020-01-19 15:04:53',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:04:53','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(584,'584',NULL,1,'2020-01-19 15:09:14','2020-01-19 15:09:14',40,'AC_BILL_UNVALIDATE','Invoice AC2001-0004 go back to draft status','2020-01-19 15:09:14','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 go back to draft status',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(585,'585',NULL,1,'2020-01-19 15:13:07','2020-01-19 15:13:07',40,'AC_BILL_VALIDATE','Invoice AC2001-0004 validated','2020-01-19 15:13:07','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice AC2001-0004 validated',228,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(586,'586',NULL,1,'2020-01-20 12:20:11','2020-01-20 12:20:11',40,'AC_ORDER_SUPPLIER_CREATE','Order (PROV14) created','2020-01-20 12:20:11','2021-04-15 10:22:55',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nOrder (PROV14) created',14,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(588,'588',NULL,1,'2020-01-21 01:02:14','2020-01-21 01:02:14',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 2 for member Vick Smith added','2020-01-21 01:02:14','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 2 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2013 - 07/17/2014',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(589,'589',NULL,1,'2020-01-21 10:22:37','2020-01-21 10:22:37',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 3 for member Vick Smith added','2020-01-21 10:22:37','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 3 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(590,'590',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 4 for member Vick Smith added','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 4 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2017 - 07/17/2018',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(591,'591',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_VALIDATE','Invoice FA1707-0026 validated','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 validated',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(592,'592',NULL,1,'2020-01-21 10:23:17','2020-01-21 10:23:17',40,'AC_BILL_PAYED','Invoice FA1707-0026 changed to paid','2020-01-21 10:23:17','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1707-0026 changed to paid',229,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(593,'593',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 5 for member Vick Smith added','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 5 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2018 - 07/17/2019',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(594,'594',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_VALIDATE','Invoice FA1807-0027 validated','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 validated',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(595,'595',NULL,1,'2020-01-21 10:23:28','2020-01-21 10:23:28',40,'AC_BILL_PAYED','Invoice FA1807-0027 changed to paid','2020-01-21 10:23:28','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1807-0027 changed to paid',230,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(596,'596',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_MEMBER_SUBSCRIPTION_CREATE','Subscription 6 for member Vick Smith added','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nSubscription 6 for member Vick Smith added\nMember: Vick Smith\nType: 2\nAmount: 50\nPeriod: 07/18/2019 - 07/17/2020',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(597,'597',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_VALIDATE','Invoice FA1907-0028 validated','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 validated',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(598,'598',NULL,1,'2020-01-21 10:23:49','2020-01-21 10:23:49',40,'AC_BILL_PAYED','Invoice FA1907-0028 changed to paid','2020-01-21 10:23:49','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nInvoice FA1907-0028 changed to paid',231,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(599,'599',NULL,1,'2020-01-21 10:30:27','2020-01-21 10:30:27',40,'AC_MEMBER_MODIFY','Member Pierre Curie modified','2020-01-21 10:30:27','2021-04-15 10:22:55',12,NULL,NULL,12,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Pierre Curie modified\nMember: Pierre Curie\nType: Standard members',2,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(600,'600',NULL,1,'2020-01-21 10:30:36','2020-01-21 10:30:36',40,'AC_MEMBER_MODIFY','Member doe john modified','2020-01-21 10:30:36','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember doe john modified\nMember: doe john\nType: Standard members',3,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(601,'601',NULL,1,'2020-01-21 10:30:42','2020-01-21 10:30:42',40,'AC_MEMBER_MODIFY','Member smith smith modified','2020-01-21 10:30:42','2021-04-15 10:22:55',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember smith smith modified\nMember: smith smith\nType: Standard members',4,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(602,'602',NULL,1,'2020-01-21 10:30:57','2020-01-21 10:30:57',40,'AC_MEMBER_MODIFY','Member Vick Smith modified','2020-01-21 10:30:57','2021-04-15 10:22:55',12,NULL,NULL,10,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nMember Vick Smith modified\nMember: Vick Smith\nType: Standard members',1,'member',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(603,'603',NULL,1,'2020-06-12 10:00:00','2020-06-12 11:30:00',5,'AC_RDV','Meetings','2020-06-12 19:26:44','2021-04-15 10:22:55',12,NULL,3,NULL,NULL,0,12,1,NULL,0,0,-1,'Room 24',5400,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(604,'604',NULL,1,'2020-06-01 10:00:00','2020-06-01 10:27:00',1,'AC_TEL','Called Mr X','2020-06-12 19:28:13','2021-04-15 10:22:55',12,12,3,NULL,NULL,0,12,1,NULL,0,0,100,NULL,1620,NULL,'Customer ask another call.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(605,'605',NULL,1,'2020-04-15 05:00:00','2020-04-15 06:00:00',5,'AC_RDV','Meet A2','2021-04-15 07:36:31','2021-04-15 10:36:31',12,NULL,NULL,NULL,NULL,0,12,1,NULL,0,0,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0),(606,'606',NULL,1,'2021-04-15 08:38:02','2021-04-15 08:38:02',40,'AC_PRODUCT_CREATE','Product PRODSER created','2021-04-15 08:38:02','2021-04-15 11:38:02',12,NULL,NULL,NULL,NULL,0,12,0,NULL,0,0,-1,'',NULL,NULL,'Author: admin\nProduct PRODSER created',31,'product',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'default',NULL,NULL,0,0); /*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -419,7 +448,7 @@ CREATE TABLE `llx_actioncomm_resources` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_resources` (`fk_actioncomm`,`element_type`,`fk_element`), KEY `idx_actioncomm_resources_fk_element` (`fk_element`) -) ENGINE=InnoDB AUTO_INCREMENT=485 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=487 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -428,7 +457,7 @@ CREATE TABLE `llx_actioncomm_resources` ( LOCK TABLES `llx_actioncomm_resources` WRITE; /*!40000 ALTER TABLE `llx_actioncomm_resources` DISABLE KEYS */; -INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0),(218,331,'user',12,'0',0,0),(220,333,'user',12,'0',0,0),(222,335,'user',12,'0',0,0),(224,337,'user',12,'0',0,0),(225,338,'user',12,'0',0,0),(226,339,'user',12,'0',0,0),(227,340,'user',12,'0',0,0),(228,341,'user',12,'0',0,0),(229,342,'user',12,'0',0,0),(230,343,'user',12,'0',0,0),(231,344,'user',12,'0',0,0),(232,345,'user',12,'0',0,0),(233,346,'user',12,'0',0,0),(234,347,'user',12,'0',0,0),(235,348,'user',12,'0',0,0),(236,349,'user',12,'0',0,0),(237,350,'user',12,'0',0,0),(238,351,'user',12,'0',0,0),(239,352,'user',12,'0',0,0),(240,353,'user',12,'0',0,0),(241,354,'user',12,'0',0,0),(242,355,'user',12,'0',0,0),(243,356,'user',12,'0',0,0),(244,357,'user',12,'0',0,0),(245,358,'user',12,'0',0,0),(246,359,'user',12,'0',0,0),(247,360,'user',12,'0',0,0),(248,361,'user',12,'0',0,0),(249,362,'user',12,'0',0,0),(250,363,'user',12,'0',0,0),(251,364,'user',12,'0',0,0),(252,365,'user',12,'0',0,0),(253,366,'user',12,'0',0,0),(254,367,'user',12,'0',0,0),(255,368,'user',12,'0',0,0),(256,369,'user',12,'0',0,0),(257,370,'user',12,'0',0,0),(258,371,'user',12,'0',0,0),(259,372,'user',12,'0',0,0),(260,373,'user',12,'0',0,0),(261,374,'user',12,'0',0,0),(262,375,'user',12,'0',0,0),(263,376,'user',12,'0',0,0),(264,377,'user',12,'0',0,0),(265,378,'user',12,'0',0,0),(266,379,'user',12,'0',0,0),(267,380,'user',12,'0',0,0),(268,381,'user',12,'0',0,0),(269,382,'user',12,'0',0,0),(270,383,'user',0,'0',0,0),(271,384,'user',12,'0',0,0),(272,385,'user',12,'0',0,0),(273,386,'user',12,'0',0,0),(274,387,'user',12,'0',0,0),(275,388,'user',12,'0',0,0),(276,389,'user',12,'0',0,0),(277,390,'user',12,'0',0,0),(278,391,'user',12,'0',0,0),(279,392,'user',12,'0',0,0),(280,393,'user',12,'0',0,0),(281,394,'user',12,'0',0,0),(282,395,'user',12,'0',0,0),(283,396,'user',12,'0',0,0),(284,397,'user',12,'0',0,0),(285,398,'user',12,'0',0,0),(286,399,'user',12,'0',0,0),(287,400,'user',12,'0',0,0),(288,401,'user',12,'0',0,0),(289,402,'user',12,'0',0,0),(290,403,'user',12,'0',0,0),(291,404,'user',12,'0',0,0),(292,405,'user',12,'0',0,0),(293,406,'user',12,'0',0,0),(294,407,'user',12,'0',0,0),(295,408,'user',12,'0',0,0),(296,409,'user',12,'0',0,0),(297,410,'user',12,'0',0,0),(298,411,'user',12,'0',0,0),(299,412,'user',12,'0',0,0),(300,413,'user',12,'0',0,0),(301,414,'user',12,'0',0,0),(302,415,'user',12,'0',0,0),(303,416,'user',12,'0',0,0),(304,417,'user',12,'0',0,0),(305,418,'user',12,'0',0,0),(306,419,'user',0,'0',0,0),(307,420,'user',12,'0',0,0),(308,421,'user',12,'0',0,0),(309,422,'user',12,'0',0,0),(310,423,'user',0,'0',0,0),(311,424,'user',12,'0',0,0),(312,425,'user',12,'0',0,0),(313,426,'user',12,'0',0,0),(314,427,'user',12,'0',0,0),(315,428,'user',12,'0',0,0),(316,429,'user',12,'0',0,0),(317,430,'user',12,'0',0,0),(318,431,'user',12,'0',0,0),(319,432,'user',12,'0',0,0),(320,433,'user',12,'0',0,0),(321,434,'user',12,'0',0,0),(322,435,'user',12,'0',0,0),(323,436,'user',12,'0',0,0),(324,437,'user',12,'0',0,0),(325,438,'user',12,'0',0,0),(326,439,'user',12,'0',0,0),(327,440,'user',12,'0',0,0),(328,441,'user',12,'0',0,0),(329,442,'user',12,'0',0,0),(330,443,'user',12,'0',0,0),(331,444,'user',12,'0',0,0),(332,445,'user',12,'0',0,0),(333,446,'user',12,'0',0,0),(334,447,'user',12,'0',0,0),(335,448,'user',12,'0',0,0),(336,449,'user',12,'0',0,0),(337,450,'user',12,'0',0,0),(338,451,'user',12,'0',0,0),(339,452,'user',12,'0',0,0),(340,453,'user',12,'0',0,0),(341,454,'user',12,'0',0,0),(342,455,'user',12,'0',0,0),(343,456,'user',12,'0',0,0),(344,457,'user',12,'0',0,0),(345,458,'user',12,'0',0,0),(346,459,'user',12,'0',0,0),(347,460,'user',12,'0',0,0),(348,461,'user',12,'0',0,0),(349,462,'user',12,'0',0,1),(350,463,'user',12,'0',0,1),(351,463,'user',4,'0',0,1),(352,463,'user',13,'0',0,1),(353,463,'user',2,'0',0,1),(354,464,'user',12,'0',0,0),(355,465,'user',12,'0',0,0),(356,466,'user',12,'0',0,1),(357,467,'user',0,'0',0,0),(358,468,'user',0,'0',0,0),(359,469,'user',0,'0',0,0),(360,470,'user',0,'0',0,0),(361,471,'user',0,'0',0,0),(362,483,'user',12,'0',0,0),(363,484,'user',12,'0',0,0),(364,485,'user',12,'0',0,0),(365,486,'user',12,'0',0,0),(366,487,'user',12,'0',0,0),(367,488,'user',12,'0',0,0),(368,489,'user',12,'0',0,0),(369,490,'user',12,'0',0,0),(370,491,'user',12,'0',0,0),(371,492,'user',12,'0',0,0),(372,493,'user',12,'0',0,0),(373,494,'user',12,'0',0,0),(374,495,'user',12,'0',0,0),(375,496,'user',12,'0',0,0),(376,497,'user',12,'0',0,0),(377,498,'user',12,'0',0,0),(378,499,'user',12,'0',0,0),(379,500,'user',12,'0',0,0),(380,501,'user',12,'0',0,0),(381,502,'user',12,'0',0,0),(382,503,'user',12,'0',0,0),(383,504,'user',12,'0',0,0),(384,505,'user',12,'0',0,0),(385,506,'user',12,'0',0,0),(386,507,'user',12,'0',0,0),(387,508,'user',12,'0',0,0),(388,509,'user',12,'0',0,0),(390,511,'user',12,'0',0,0),(391,512,'user',12,'0',0,0),(392,513,'user',12,'0',0,0),(393,514,'user',12,'0',0,0),(394,515,'user',12,'0',0,0),(395,516,'user',12,'0',0,0),(396,517,'user',12,'0',0,0),(397,518,'user',12,'0',0,0),(398,519,'user',12,'0',0,0),(399,520,'user',12,'0',0,0),(400,521,'user',12,'0',0,0),(401,522,'user',12,'0',0,0),(402,523,'user',12,'0',0,0),(403,524,'user',12,'0',0,0),(404,525,'user',12,'0',0,0),(405,526,'user',12,'0',0,0),(406,527,'user',12,'0',0,0),(407,528,'user',12,'0',0,0),(408,529,'user',12,'0',0,0),(409,530,'user',12,'0',0,0),(410,531,'user',12,'0',0,0),(411,532,'user',12,'0',0,0),(412,533,'user',12,'0',0,0),(413,534,'user',12,'0',0,0),(414,535,'user',12,'0',0,0),(415,536,'user',12,'0',0,0),(416,537,'user',12,'0',0,0),(417,538,'user',12,'0',0,0),(418,539,'user',12,'0',0,0),(419,540,'user',12,'0',0,0),(420,541,'user',12,'0',0,0),(421,542,'user',12,'0',0,0),(422,543,'user',12,'0',0,0),(423,544,'user',12,'0',0,0),(424,545,'user',12,'0',0,0),(425,546,'user',12,'0',0,0),(426,547,'user',12,'0',0,0),(427,548,'user',12,'0',0,0),(428,549,'user',12,'0',0,0),(429,550,'user',12,'0',0,0),(430,551,'user',12,'0',0,0),(431,552,'user',12,'0',0,0),(432,553,'user',12,'0',0,0),(433,554,'user',12,'0',0,0),(434,555,'user',12,'0',0,0),(435,556,'user',12,'0',0,0),(436,557,'user',12,'0',0,0),(437,558,'user',12,'0',0,0),(438,559,'user',12,'0',0,0),(439,560,'user',12,'0',0,0),(440,561,'user',12,'0',0,0),(441,562,'user',12,'0',0,0),(442,563,'user',12,'0',0,0),(443,564,'user',12,'0',0,0),(444,565,'user',12,'0',0,0),(445,566,'user',12,'0',0,0),(446,567,'user',12,'0',0,0),(447,568,'user',12,'0',0,0),(448,569,'user',12,'0',0,0),(449,570,'user',12,'0',0,0),(450,571,'user',12,'0',0,0),(451,572,'user',12,'0',0,0),(452,573,'user',12,'0',0,0),(453,574,'user',12,'0',0,0),(454,575,'user',12,'0',0,0),(455,576,'user',12,'0',0,0),(456,577,'user',12,'0',0,0),(457,578,'user',12,'0',0,0),(458,579,'user',12,'0',0,0),(459,580,'user',12,'0',0,0),(460,581,'user',12,'0',0,0),(461,582,'user',12,'0',0,0),(462,583,'user',12,'0',0,0),(463,584,'user',12,'0',0,0),(464,585,'user',12,'0',0,0),(465,586,'user',12,'0',0,0),(467,588,'user',12,'0',0,0),(468,589,'user',12,'0',0,0),(469,590,'user',12,'0',0,0),(470,591,'user',12,'0',0,0),(471,592,'user',12,'0',0,0),(472,593,'user',12,'0',0,0),(473,594,'user',12,'0',0,0),(474,595,'user',12,'0',0,0),(475,596,'user',12,'0',0,0),(476,597,'user',12,'0',0,0),(477,598,'user',12,'0',0,0),(478,599,'user',12,'0',0,0),(479,600,'user',12,'0',0,0),(480,601,'user',12,'0',0,0),(481,602,'user',12,'0',0,0),(482,603,'user',12,'0',0,1),(484,604,'user',12,'0',0,1); +INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0),(112,234,'user',12,'0',0,1),(113,235,'user',12,'0',0,1),(114,236,'user',4,'0',0,0),(115,237,'user',13,'0',0,0),(116,237,'user',16,'0',0,0),(117,237,'user',18,'0',0,0),(118,238,'user',12,'0',0,1),(119,238,'user',3,'0',0,1),(120,238,'user',10,'0',0,1),(121,239,'user',12,'0',0,0),(123,240,'user',12,'0',0,1),(125,242,'user',12,'0',0,0),(126,243,'user',12,'0',0,0),(128,245,'user',12,'0',0,0),(132,249,'user',12,'0',0,0),(133,250,'user',12,'0',0,0),(134,251,'user',12,'0',0,0),(135,252,'user',12,'0',0,0),(136,253,'user',12,'0',0,0),(137,254,'user',12,'0',0,0),(138,255,'user',12,'0',0,0),(139,256,'user',12,'0',0,0),(140,257,'user',12,'0',0,0),(146,263,'user',12,'0',0,0),(147,264,'user',12,'0',0,0),(148,265,'user',12,'0',0,0),(149,266,'user',12,'0',0,0),(150,267,'user',12,'0',0,0),(151,268,'user',12,'0',0,0),(152,269,'user',12,'0',0,0),(153,270,'user',12,'0',0,0),(154,271,'user',12,'0',0,0),(155,272,'user',12,'0',0,0),(156,273,'user',12,'0',0,0),(157,274,'user',12,'0',0,0),(158,275,'user',12,'0',0,0),(160,277,'user',12,'0',0,0),(161,278,'user',12,'0',0,0),(162,279,'user',12,'0',0,0),(164,281,'user',12,'0',0,0),(165,282,'user',12,'0',0,0),(166,283,'user',12,'0',0,0),(167,284,'user',12,'0',0,0),(168,285,'user',12,'0',0,0),(169,286,'user',12,'0',0,0),(170,287,'user',12,'0',0,0),(171,288,'user',12,'0',0,0),(177,294,'user',12,'0',0,0),(178,295,'user',12,'0',0,0),(179,296,'user',12,'0',0,0),(180,297,'user',12,'0',0,0),(181,298,'user',1,'0',0,0),(182,299,'user',2,'0',0,0),(183,300,'user',1,'0',0,0),(184,301,'user',2,'0',0,0),(185,302,'user',2,'0',0,0),(186,303,'user',2,'0',0,0),(187,304,'user',1,'0',0,0),(188,305,'user',2,'0',0,0),(189,306,'user',2,'0',0,0),(190,307,'user',1,'0',0,0),(191,308,'user',1,'0',0,0),(192,309,'user',1,'0',0,0),(193,310,'user',2,'0',0,0),(194,311,'user',2,'0',0,0),(195,312,'user',1,'0',0,0),(196,313,'user',2,'0',0,0),(197,314,'user',1,'0',0,0),(198,315,'user',2,'0',0,0),(199,316,'user',2,'0',0,0),(200,317,'user',2,'0',0,0),(201,318,'user',1,'0',0,0),(202,319,'user',2,'0',0,0),(203,320,'user',12,'0',0,0),(204,321,'user',12,'0',0,0),(205,322,'user',12,'0',0,0),(206,323,'user',12,'0',0,0),(207,324,'user',12,'0',0,0),(208,325,'user',12,'0',0,0),(209,326,'user',12,'0',0,0),(210,327,'user',12,'0',0,0),(211,328,'user',12,'0',0,0),(212,24,'socpeople',2,NULL,NULL,1),(213,235,'socpeople',2,NULL,NULL,1),(214,238,'socpeople',10,NULL,NULL,1),(215,327,'socpeople',12,NULL,NULL,1),(216,329,'user',12,'0',0,0),(217,330,'user',12,'0',0,0),(218,331,'user',12,'0',0,0),(220,333,'user',12,'0',0,0),(222,335,'user',12,'0',0,0),(224,337,'user',12,'0',0,0),(225,338,'user',12,'0',0,0),(226,339,'user',12,'0',0,0),(227,340,'user',12,'0',0,0),(228,341,'user',12,'0',0,0),(229,342,'user',12,'0',0,0),(230,343,'user',12,'0',0,0),(231,344,'user',12,'0',0,0),(232,345,'user',12,'0',0,0),(233,346,'user',12,'0',0,0),(234,347,'user',12,'0',0,0),(235,348,'user',12,'0',0,0),(236,349,'user',12,'0',0,0),(237,350,'user',12,'0',0,0),(238,351,'user',12,'0',0,0),(239,352,'user',12,'0',0,0),(240,353,'user',12,'0',0,0),(241,354,'user',12,'0',0,0),(242,355,'user',12,'0',0,0),(243,356,'user',12,'0',0,0),(244,357,'user',12,'0',0,0),(245,358,'user',12,'0',0,0),(246,359,'user',12,'0',0,0),(247,360,'user',12,'0',0,0),(248,361,'user',12,'0',0,0),(249,362,'user',12,'0',0,0),(250,363,'user',12,'0',0,0),(251,364,'user',12,'0',0,0),(252,365,'user',12,'0',0,0),(253,366,'user',12,'0',0,0),(254,367,'user',12,'0',0,0),(255,368,'user',12,'0',0,0),(256,369,'user',12,'0',0,0),(257,370,'user',12,'0',0,0),(258,371,'user',12,'0',0,0),(259,372,'user',12,'0',0,0),(260,373,'user',12,'0',0,0),(261,374,'user',12,'0',0,0),(262,375,'user',12,'0',0,0),(263,376,'user',12,'0',0,0),(264,377,'user',12,'0',0,0),(265,378,'user',12,'0',0,0),(266,379,'user',12,'0',0,0),(267,380,'user',12,'0',0,0),(268,381,'user',12,'0',0,0),(269,382,'user',12,'0',0,0),(270,383,'user',0,'0',0,0),(271,384,'user',12,'0',0,0),(272,385,'user',12,'0',0,0),(273,386,'user',12,'0',0,0),(274,387,'user',12,'0',0,0),(275,388,'user',12,'0',0,0),(276,389,'user',12,'0',0,0),(277,390,'user',12,'0',0,0),(278,391,'user',12,'0',0,0),(279,392,'user',12,'0',0,0),(280,393,'user',12,'0',0,0),(281,394,'user',12,'0',0,0),(282,395,'user',12,'0',0,0),(283,396,'user',12,'0',0,0),(284,397,'user',12,'0',0,0),(285,398,'user',12,'0',0,0),(286,399,'user',12,'0',0,0),(287,400,'user',12,'0',0,0),(288,401,'user',12,'0',0,0),(289,402,'user',12,'0',0,0),(290,403,'user',12,'0',0,0),(291,404,'user',12,'0',0,0),(292,405,'user',12,'0',0,0),(293,406,'user',12,'0',0,0),(294,407,'user',12,'0',0,0),(295,408,'user',12,'0',0,0),(296,409,'user',12,'0',0,0),(297,410,'user',12,'0',0,0),(298,411,'user',12,'0',0,0),(299,412,'user',12,'0',0,0),(300,413,'user',12,'0',0,0),(301,414,'user',12,'0',0,0),(302,415,'user',12,'0',0,0),(303,416,'user',12,'0',0,0),(304,417,'user',12,'0',0,0),(305,418,'user',12,'0',0,0),(306,419,'user',0,'0',0,0),(307,420,'user',12,'0',0,0),(308,421,'user',12,'0',0,0),(309,422,'user',12,'0',0,0),(310,423,'user',0,'0',0,0),(311,424,'user',12,'0',0,0),(312,425,'user',12,'0',0,0),(313,426,'user',12,'0',0,0),(314,427,'user',12,'0',0,0),(315,428,'user',12,'0',0,0),(316,429,'user',12,'0',0,0),(317,430,'user',12,'0',0,0),(318,431,'user',12,'0',0,0),(319,432,'user',12,'0',0,0),(320,433,'user',12,'0',0,0),(321,434,'user',12,'0',0,0),(322,435,'user',12,'0',0,0),(323,436,'user',12,'0',0,0),(324,437,'user',12,'0',0,0),(325,438,'user',12,'0',0,0),(326,439,'user',12,'0',0,0),(327,440,'user',12,'0',0,0),(328,441,'user',12,'0',0,0),(329,442,'user',12,'0',0,0),(330,443,'user',12,'0',0,0),(331,444,'user',12,'0',0,0),(332,445,'user',12,'0',0,0),(333,446,'user',12,'0',0,0),(334,447,'user',12,'0',0,0),(335,448,'user',12,'0',0,0),(336,449,'user',12,'0',0,0),(337,450,'user',12,'0',0,0),(338,451,'user',12,'0',0,0),(339,452,'user',12,'0',0,0),(340,453,'user',12,'0',0,0),(341,454,'user',12,'0',0,0),(342,455,'user',12,'0',0,0),(343,456,'user',12,'0',0,0),(344,457,'user',12,'0',0,0),(345,458,'user',12,'0',0,0),(346,459,'user',12,'0',0,0),(347,460,'user',12,'0',0,0),(348,461,'user',12,'0',0,0),(349,462,'user',12,'0',0,1),(350,463,'user',12,'0',0,1),(351,463,'user',4,'0',0,1),(352,463,'user',13,'0',0,1),(353,463,'user',2,'0',0,1),(354,464,'user',12,'0',0,0),(355,465,'user',12,'0',0,0),(356,466,'user',12,'0',0,1),(357,467,'user',0,'0',0,0),(358,468,'user',0,'0',0,0),(359,469,'user',0,'0',0,0),(360,470,'user',0,'0',0,0),(361,471,'user',0,'0',0,0),(362,483,'user',12,'0',0,0),(363,484,'user',12,'0',0,0),(364,485,'user',12,'0',0,0),(365,486,'user',12,'0',0,0),(366,487,'user',12,'0',0,0),(367,488,'user',12,'0',0,0),(368,489,'user',12,'0',0,0),(369,490,'user',12,'0',0,0),(370,491,'user',12,'0',0,0),(371,492,'user',12,'0',0,0),(372,493,'user',12,'0',0,0),(373,494,'user',12,'0',0,0),(374,495,'user',12,'0',0,0),(375,496,'user',12,'0',0,0),(376,497,'user',12,'0',0,0),(377,498,'user',12,'0',0,0),(378,499,'user',12,'0',0,0),(379,500,'user',12,'0',0,0),(380,501,'user',12,'0',0,0),(381,502,'user',12,'0',0,0),(382,503,'user',12,'0',0,0),(383,504,'user',12,'0',0,0),(384,505,'user',12,'0',0,0),(385,506,'user',12,'0',0,0),(386,507,'user',12,'0',0,0),(387,508,'user',12,'0',0,0),(388,509,'user',12,'0',0,0),(390,511,'user',12,'0',0,0),(391,512,'user',12,'0',0,0),(392,513,'user',12,'0',0,0),(393,514,'user',12,'0',0,0),(394,515,'user',12,'0',0,0),(395,516,'user',12,'0',0,0),(396,517,'user',12,'0',0,0),(397,518,'user',12,'0',0,0),(398,519,'user',12,'0',0,0),(399,520,'user',12,'0',0,0),(400,521,'user',12,'0',0,0),(401,522,'user',12,'0',0,0),(402,523,'user',12,'0',0,0),(403,524,'user',12,'0',0,0),(404,525,'user',12,'0',0,0),(405,526,'user',12,'0',0,0),(406,527,'user',12,'0',0,0),(407,528,'user',12,'0',0,0),(408,529,'user',12,'0',0,0),(409,530,'user',12,'0',0,0),(410,531,'user',12,'0',0,0),(411,532,'user',12,'0',0,0),(412,533,'user',12,'0',0,0),(413,534,'user',12,'0',0,0),(414,535,'user',12,'0',0,0),(415,536,'user',12,'0',0,0),(416,537,'user',12,'0',0,0),(417,538,'user',12,'0',0,0),(418,539,'user',12,'0',0,0),(419,540,'user',12,'0',0,0),(420,541,'user',12,'0',0,0),(421,542,'user',12,'0',0,0),(422,543,'user',12,'0',0,0),(423,544,'user',12,'0',0,0),(424,545,'user',12,'0',0,0),(425,546,'user',12,'0',0,0),(426,547,'user',12,'0',0,0),(427,548,'user',12,'0',0,0),(428,549,'user',12,'0',0,0),(429,550,'user',12,'0',0,0),(430,551,'user',12,'0',0,0),(431,552,'user',12,'0',0,0),(432,553,'user',12,'0',0,0),(433,554,'user',12,'0',0,0),(434,555,'user',12,'0',0,0),(435,556,'user',12,'0',0,0),(436,557,'user',12,'0',0,0),(437,558,'user',12,'0',0,0),(438,559,'user',12,'0',0,0),(439,560,'user',12,'0',0,0),(440,561,'user',12,'0',0,0),(441,562,'user',12,'0',0,0),(442,563,'user',12,'0',0,0),(443,564,'user',12,'0',0,0),(444,565,'user',12,'0',0,0),(445,566,'user',12,'0',0,0),(446,567,'user',12,'0',0,0),(447,568,'user',12,'0',0,0),(448,569,'user',12,'0',0,0),(449,570,'user',12,'0',0,0),(450,571,'user',12,'0',0,0),(451,572,'user',12,'0',0,0),(452,573,'user',12,'0',0,0),(453,574,'user',12,'0',0,0),(454,575,'user',12,'0',0,0),(455,576,'user',12,'0',0,0),(456,577,'user',12,'0',0,0),(457,578,'user',12,'0',0,0),(458,579,'user',12,'0',0,0),(459,580,'user',12,'0',0,0),(460,581,'user',12,'0',0,0),(461,582,'user',12,'0',0,0),(462,583,'user',12,'0',0,0),(463,584,'user',12,'0',0,0),(464,585,'user',12,'0',0,0),(465,586,'user',12,'0',0,0),(467,588,'user',12,'0',0,0),(468,589,'user',12,'0',0,0),(469,590,'user',12,'0',0,0),(470,591,'user',12,'0',0,0),(471,592,'user',12,'0',0,0),(472,593,'user',12,'0',0,0),(473,594,'user',12,'0',0,0),(474,595,'user',12,'0',0,0),(475,596,'user',12,'0',0,0),(476,597,'user',12,'0',0,0),(477,598,'user',12,'0',0,0),(478,599,'user',12,'0',0,0),(479,600,'user',12,'0',0,0),(480,601,'user',12,'0',0,0),(481,602,'user',12,'0',0,0),(482,603,'user',12,'0',0,1),(484,604,'user',12,'0',0,1),(485,605,'user',12,'0',0,1),(486,606,'user',12,'0',0,0); /*!40000 ALTER TABLE `llx_actioncomm_resources` ENABLE KEYS */; UNLOCK TABLES; @@ -441,6 +470,7 @@ DROP TABLE IF EXISTS `llx_adherent`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_adherent` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `ref_ext` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `civility` varchar(6) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -490,6 +520,7 @@ CREATE TABLE `llx_adherent` ( `linkedin` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `gender` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_adherent_ref` (`ref`,`entity`), UNIQUE KEY `uk_adherent_login` (`login`,`entity`), UNIQUE KEY `uk_adherent_fk_soc` (`fk_soc`), KEY `idx_adherent_fk_adherent_type` (`fk_adherent_type`), @@ -504,7 +535,7 @@ CREATE TABLE `llx_adherent` ( LOCK TABLES `llx_adherent` WRITE; /*!40000 ALTER TABLE `llx_adherent` DISABLE KEYS */; -INSERT INTO `llx_adherent` VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com','[]',NULL,NULL,NULL,NULL,'1960-07-07','person5.jpeg',0,0,'2014-07-09 00:00:00',NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2019-12-21 13:18:38',1,12,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'woman'),(2,1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com','[]',NULL,NULL,NULL,NULL,NULL,'pierrecurie.jpg',1,1,'2020-07-17 00:00:00',NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2020-01-21 09:23:49',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com','[]',NULL,NULL,NULL,NULL,NULL,'person9.jpeg',1,0,'2014-07-17 00:00:00',NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2020-01-21 00:02:14',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com','[]',NULL,NULL,NULL,NULL,NULL,'person2.jpeg',1,0,'2018-07-17 00:00:00',NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2020-01-21 09:22:37',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_adherent` VALUES (1,'1',1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',NULL,2,'phy',NULL,10,NULL,NULL,NULL,NULL,102,'vsmith@email.com','[]',NULL,NULL,NULL,NULL,'1960-07-07','person5.jpeg',0,0,'2014-07-09 00:00:00',NULL,NULL,'2012-07-10 15:12:56','2012-07-08 23:50:00','2021-04-15 10:22:54',1,12,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'woman'),(2,'2',1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',NULL,2,'phy',NULL,12,NULL,NULL,NULL,NULL,NULL,'pcurie@example.com','[]',NULL,NULL,NULL,NULL,NULL,'pierrecurie.jpg',1,1,'2020-07-17 00:00:00',NULL,NULL,'2012-07-10 15:03:32','2012-07-10 15:03:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'3',1,NULL,NULL,'john','doe','john','8bs6gty5',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,1,'johndoe@email.com','[]',NULL,NULL,NULL,NULL,NULL,'person9.jpeg',1,0,'2014-07-17 00:00:00',NULL,NULL,'2013-07-18 21:28:00','2013-07-18 21:10:09','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'4',1,NULL,NULL,'smith','smith','Smith','s6hjp10f',NULL,2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,11,'smith@email.com','[]',NULL,NULL,NULL,NULL,NULL,'person2.jpeg',1,0,'2018-07-17 00:00:00',NULL,NULL,'2013-07-18 21:27:52','2013-07-18 21:27:44','2021-04-15 10:22:54',1,12,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_adherent` ENABLE KEYS */; UNLOCK TABLES; @@ -630,124 +661,6 @@ INSERT INTO `llx_adherent_type_lang` VALUES (1,2,'en_US','Standard members','',N /*!40000 ALTER TABLE `llx_adherent_type_lang` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_advanceddiscount_actions` --- - -DROP TABLE IF EXISTS `llx_advanceddiscount_actions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanceddiscount_actions` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_advanceddiscount` int(11) DEFAULT NULL, - `type_action` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `value_action` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_advanceddiscount_actions_fk_advanceddiscount` (`fk_advanceddiscount`), - CONSTRAINT `llx_advanceddiscount_actions_fk_advanceddiscount` FOREIGN KEY (`fk_advanceddiscount`) REFERENCES `llx_advanceddiscount_advanceddiscount` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanceddiscount_actions` --- - -LOCK TABLES `llx_advanceddiscount_actions` WRITE; -/*!40000 ALTER TABLE `llx_advanceddiscount_actions` DISABLE KEYS */; -INSERT INTO `llx_advanceddiscount_actions` VALUES (3,1,'itempercentagediscount','50'); -/*!40000 ALTER TABLE `llx_advanceddiscount_actions` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_advanceddiscount_advanceddiscount` --- - -DROP TABLE IF EXISTS `llx_advanceddiscount_advanceddiscount`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanceddiscount_advanceddiscount` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci DEFAULT NULL, - `date_start` date DEFAULT NULL, - `date_end` date DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_advanceddiscount_advanceddiscount_rowid` (`rowid`), - KEY `idx_advanceddiscount_advanceddiscount_ref` (`ref`), - KEY `idx_advanceddiscount_advanceddiscount_entity` (`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanceddiscount_advanceddiscount` --- - -LOCK TABLES `llx_advanceddiscount_advanceddiscount` WRITE; -/*!40000 ALTER TABLE `llx_advanceddiscount_advanceddiscount` DISABLE KEYS */; -INSERT INTO `llx_advanceddiscount_advanceddiscount` VALUES (1,'aa',1,'aaaa',NULL,NULL,NULL,'2019-05-04 11:22:14','2019-05-04 09:22:14',12,NULL,NULL); -/*!40000 ALTER TABLE `llx_advanceddiscount_advanceddiscount` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_advanceddiscount_advanceddiscount_extrafields` --- - -DROP TABLE IF EXISTS `llx_advanceddiscount_advanceddiscount_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanceddiscount_advanceddiscount_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanceddiscount_advanceddiscount_extrafields` --- - -LOCK TABLES `llx_advanceddiscount_advanceddiscount_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_advanceddiscount_advanceddiscount_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_advanceddiscount_advanceddiscount_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_advanceddiscount_rules` --- - -DROP TABLE IF EXISTS `llx_advanceddiscount_rules`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanceddiscount_rules` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_advanceddiscount` int(11) DEFAULT NULL, - `type_rule` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - `value_rule` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_advanceddiscount_rules_fk_advanceddiscount` (`fk_advanceddiscount`), - CONSTRAINT `llx_advanceddiscount_rules_fk_advanceddiscount` FOREIGN KEY (`fk_advanceddiscount`) REFERENCES `llx_advanceddiscount_advanceddiscount` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanceddiscount_rules` --- - -LOCK TABLES `llx_advanceddiscount_rules` WRITE; -/*!40000 ALTER TABLE `llx_advanceddiscount_rules` DISABLE KEYS */; -INSERT INTO `llx_advanceddiscount_rules` VALUES (2,1,'totalgreaterorequal','1'); -/*!40000 ALTER TABLE `llx_advanceddiscount_rules` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_advtargetemailing` -- @@ -792,7 +705,7 @@ CREATE TABLE `llx_asset` ( `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `entity` int(11) NOT NULL DEFAULT 1, `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `amount` double(24,8) DEFAULT NULL, + `amount_ht` double(24,8) DEFAULT NULL, `fk_asset_type` int(11) NOT NULL, `fk_soc` int(11) DEFAULT NULL, `description` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, @@ -804,6 +717,7 @@ CREATE TABLE `llx_asset` ( `fk_user_modif` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL, + `amount_vat` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_asset_rowid` (`rowid`), KEY `idx_asset_ref` (`ref`), @@ -835,7 +749,8 @@ CREATE TABLE `llx_asset_extrafields` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) + PRIMARY KEY (`rowid`), + KEY `idx_asset_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -904,232 +819,6 @@ LOCK TABLES `llx_asset_type_extrafields` WRITE; /*!40000 ALTER TABLE `llx_asset_type_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_assetatm` --- - -DROP TABLE IF EXISTS `llx_assetatm`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatm` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_soc` int(11) NOT NULL DEFAULT 0, - `fk_product` int(11) NOT NULL DEFAULT 0, - `fk_societe_localisation` int(11) NOT NULL DEFAULT 0, - `entity` int(11) NOT NULL DEFAULT 0, - `fk_asset_type` int(11) NOT NULL DEFAULT 0, - `valeur` double NOT NULL DEFAULT 0, - `contenancereel_value` double NOT NULL DEFAULT 0, - `contenance_value` double NOT NULL DEFAULT 0, - `point_chute` double NOT NULL DEFAULT 0, - `contenance_units` int(11) NOT NULL DEFAULT 0, - `contenancereel_units` int(11) NOT NULL DEFAULT 0, - `fk_entrepot` int(11) NOT NULL DEFAULT 0, - `commentaire` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `lot_number` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `gestion_stock` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `reutilisable` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `status` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `dluo` datetime DEFAULT NULL, - `import_key` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `serial_number` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_soc` (`fk_soc`), - KEY `fk_product` (`fk_product`), - KEY `fk_societe_localisation` (`fk_societe_localisation`), - KEY `entity` (`entity`), - KEY `fk_asset_type` (`fk_asset_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatm` --- - -LOCK TABLES `llx_assetatm` WRITE; -/*!40000 ALTER TABLE `llx_assetatm` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatm` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_assetatm_field` --- - -DROP TABLE IF EXISTS `llx_assetatm_field`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatm_field` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `code` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `libelle` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `type` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `obligatoire` int(11) NOT NULL DEFAULT 0, - `ordre` int(11) NOT NULL DEFAULT 0, - `options` longtext CHARACTER SET latin1 DEFAULT NULL, - `supprimable` int(11) NOT NULL DEFAULT 0, - `inliste` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `inlibelle` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `fk_asset_type` int(11) NOT NULL DEFAULT 0, - `entity` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `ordre` (`ordre`), - KEY `fk_asset_type` (`fk_asset_type`), - KEY `entity` (`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatm_field` --- - -LOCK TABLES `llx_assetatm_field` WRITE; -/*!40000 ALTER TABLE `llx_assetatm_field` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatm_field` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_assetatm_link` --- - -DROP TABLE IF EXISTS `llx_assetatm_link`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatm_link` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_asset` int(11) NOT NULL DEFAULT 0, - `fk_document` int(11) NOT NULL DEFAULT 0, - `type_document` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatm_link` --- - -LOCK TABLES `llx_assetatm_link` WRITE; -/*!40000 ALTER TABLE `llx_assetatm_link` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatm_link` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_assetatm_stock` --- - -DROP TABLE IF EXISTS `llx_assetatm_stock`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatm_stock` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_asset` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `qty` double NOT NULL DEFAULT 0, - `date_mvt` datetime DEFAULT NULL, - `type` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `lot` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `source` int(11) NOT NULL DEFAULT 0, - `user` int(11) NOT NULL DEFAULT 0, - `weight_units` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_asset` (`fk_asset`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatm_stock` --- - -LOCK TABLES `llx_assetatm_stock` WRITE; -/*!40000 ALTER TABLE `llx_assetatm_stock` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatm_stock` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_assetatm_type` --- - -DROP TABLE IF EXISTS `llx_assetatm_type`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatm_type` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `libelle` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `code` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `reutilisable` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `masque` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `gestion_stock` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `measuring_units` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT 0, - `contenance_value` double NOT NULL DEFAULT 0, - `contenancereel_value` double NOT NULL DEFAULT 0, - `point_chute` double NOT NULL DEFAULT 0, - `contenance_units` int(11) NOT NULL DEFAULT 0, - `contenancereel_units` int(11) NOT NULL DEFAULT 0, - `cumulate` int(11) NOT NULL DEFAULT 0, - `perishable` int(11) NOT NULL DEFAULT 0, - `supprimable` int(11) NOT NULL DEFAULT 0, - `default_dluo` varchar(20) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `entity` (`entity`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatm_type` --- - -LOCK TABLES `llx_assetatm_type` WRITE; -/*!40000 ALTER TABLE `llx_assetatm_type` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatm_type` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_assetatmlot` --- - -DROP TABLE IF EXISTS `llx_assetatmlot`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_assetatmlot` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT 0, - `lot_number` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_assetatmlot` --- - -LOCK TABLES `llx_assetatmlot` WRITE; -/*!40000 ALTER TABLE `llx_assetatmlot` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_assetatmlot` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_bank` -- @@ -1176,7 +865,7 @@ CREATE TABLE `llx_bank` ( LOCK TABLES `llx_bank` WRITE; /*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; -INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2020-12-10 12:24:23','2020-07-08','2020-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2020-12-10 12:24:23','2020-07-09','2020-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2020-12-10 12:24:23','2020-07-10','2020-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2020-12-10 12:24:23','2020-07-08','2020-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2020-12-10 12:24:23','2020-07-08','2020-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2020-12-10 12:24:23','2020-08-15','2020-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2020-12-10 12:24:23','2020-08-12','2020-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2020-12-10 12:24:23','2020-08-06','2020-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2020-12-10 12:24:23','2020-08-08','2020-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2020-12-10 12:24:23','2020-08-08','2020-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2020-12-10 12:24:23','2020-12-09','2020-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2020-12-10 12:24:23','2020-12-09','2020-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2020-06-12 17:12:08','2019-12-12','2019-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2020-06-12 17:12:09','2020-03-06','2020-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2020-06-12 17:12:09','2020-03-20','2020-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2020-12-10 12:24:23','2020-07-09','2020-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL,NULL,NULL,NULL),(26,'2016-03-02 20:01:39','2020-06-12 17:12:09','2020-03-19','2020-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2020-06-12 17:12:09','2020-03-21','2020-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL,NULL,NULL,NULL),(28,'2016-03-03 19:22:32','2020-12-10 12:24:23','2020-10-03','2020-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2020-06-12 17:12:09','2020-03-10','2020-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2020-06-12 17:12:09','2020-01-22','2020-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2020-12-10 12:24:23','2020-07-30','2020-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2020-06-12 17:12:08','2020-02-01','2020-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2020-06-12 17:12:09','2020-03-22','2020-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL,NULL,NULL,NULL),(34,'2017-02-06 08:10:50','2020-06-12 17:12:09','2020-03-25','2020-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,'2017-02-16 02:22:09','2020-06-12 17:12:08','2020-02-16','2020-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2020-06-12 17:12:08','2020-02-21','2020-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2020-12-10 12:24:23','2020-09-06','2020-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(39,'2018-03-16 13:59:31','2020-06-12 17:12:09','2020-03-16','2020-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,'',NULL,NULL,NULL),(41,'2019-10-04 10:28:14','2020-06-12 17:12:09','2020-01-19','2020-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(42,'2019-10-08 13:18:50','2020-12-10 12:24:23','2020-10-08','2020-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(43,'2019-12-26 01:48:30','2019-12-25 21:48:30','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(44,'2019-12-26 01:48:46','2019-12-25 21:48:46','2019-12-25','2019-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(47,'2020-01-01 20:28:49','2020-01-01 16:28:49','2020-01-01','2020-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(48,'2020-01-06 20:52:28','2020-01-06 16:52:28','2020-01-06','2020-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,'',NULL,NULL,NULL),(49,'2020-01-10 04:42:47','2020-01-10 00:42:47','2020-01-10','2020-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(50,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16','2020-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,'',NULL,NULL,NULL),(51,'2020-01-21 01:02:14','2020-12-10 12:24:23','2020-07-18','2020-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,'',NULL,NULL,NULL),(52,'2020-01-21 10:22:37','2020-01-21 09:22:37','2020-01-21','2020-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,'',NULL,NULL,NULL),(53,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL),(54,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL),(55,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21','2020-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL); +INSERT INTO `llx_bank` VALUES (1,'2012-07-08 23:56:14','2020-12-10 12:24:23','2020-07-08','2020-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:00:24','2020-12-10 12:24:23','2020-07-09','2020-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-10 13:33:42','2020-12-10 12:24:23','2020-07-10','2020-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-18 20:50:24','2020-12-10 12:24:23','2020-07-08','2020-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2013-07-18 20:50:47','2020-12-10 12:24:23','2020-07-08','2020-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'2013-08-01 03:34:11','2020-12-10 12:24:23','2020-08-15','2020-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2013-08-05 23:11:37','2020-12-10 12:24:23','2020-08-12','2020-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2013-08-06 20:33:54','2020-12-10 12:24:23','2020-08-06','2020-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2013-08-08 02:53:40','2020-12-10 12:24:23','2020-08-08','2020-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,'2013-08-08 02:55:58','2020-12-10 12:24:23','2020-08-08','2020-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2014-12-09 15:28:44','2020-12-10 12:24:23','2020-12-09','2020-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2014-12-09 15:28:53','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2014-12-09 17:35:55','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2014-12-09 17:37:02','2020-12-10 12:24:23','2020-12-09','2020-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,'2014-12-09 18:35:07','2020-12-10 12:24:23','2020-12-09','2020-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,'2014-12-12 18:54:33','2021-04-15 10:22:31','2020-12-12','2020-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,'2015-03-06 16:48:16','2021-04-15 10:22:31','2021-03-06','2021-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2015-03-20 14:30:11','2021-04-15 10:22:31','2021-03-20','2021-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,'2016-03-02 19:57:58','2020-12-10 12:24:23','2020-07-09','2020-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL,NULL,NULL,NULL,NULL),(26,'2016-03-02 20:01:39','2021-04-15 10:22:31','2021-03-19','2021-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2016-03-02 20:02:06','2021-04-15 10:22:31','2021-03-21','2021-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL,NULL,NULL,NULL,NULL),(28,'2016-03-03 19:22:32','2020-12-10 12:24:23','2020-10-03','2020-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2016-03-03 19:23:16','2021-04-15 10:22:31','2021-03-10','2021-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2018-01-22 18:56:34','2021-04-15 10:22:31','2021-01-22','2021-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,'2018-07-30 22:42:14','2020-12-10 12:24:23','2020-07-30','2020-07-30',0.00000000,'(Initial balance)',4,0,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,'2017-02-01 19:02:44','2021-04-15 10:22:31','2021-02-01','2021-02-01',-200.00000000,'(SupplierInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,'2017-02-06 08:10:24','2021-04-15 10:22:31','2021-03-22','2021-03-22',150.00000000,'(CustomerInvoicePayment)',1,12,NULL,'CHQ',NULL,NULL,0,NULL,2,NULL,'Magic Food Store',NULL,NULL,NULL,NULL,NULL),(34,'2017-02-06 08:10:50','2021-04-15 10:22:31','2021-03-25','2021-03-25',140.00000000,'(CustomerInvoicePayment)',1,12,NULL,'PRE',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,'2017-02-16 02:22:09','2021-04-15 10:22:31','2021-02-16','2021-02-16',-1.00000000,'(ExpenseReportPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,'2017-02-21 16:07:43','2021-04-15 10:22:31','2021-02-21','2021-02-21',50.00000000,'(WithdrawalPayment)',1,12,NULL,'PRE',NULL,'T170201',0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,'2017-09-06 20:08:36','2020-12-10 12:24:23','2020-09-06','2020-09-06',10.00000000,'(DonationPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(39,'2018-03-16 13:59:31','2021-04-15 10:22:31','2021-03-16','2021-03-16',10.00000000,'(CustomerInvoicePayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Indian SAS',NULL,'',NULL,NULL,NULL),(41,'2019-10-04 10:28:14','2021-04-15 10:22:31','2021-01-19','2021-01-19',5.63000000,'(CustomerInvoicePayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(42,'2019-10-08 13:18:50','2020-12-10 12:24:23','2020-10-08','2020-10-08',-1000.00000000,'Salary payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(43,'2019-12-26 01:48:30','2021-04-15 10:22:31','2020-12-25','2020-12-25',-5.00000000,'(SocialContributionPayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(44,'2019-12-26 01:48:46','2021-04-15 10:22:31','2020-12-25','2020-12-25',-5.00000000,'(SocialContributionPayment)',3,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(47,'2020-01-01 20:28:49','2021-04-15 10:22:31','2021-01-01','2021-01-01',304.69000000,'(SupplierInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(48,'2020-01-06 20:52:28','2021-04-15 10:22:31','2021-01-06','2021-01-06',10.00000000,'Patient payment',1,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,'Patient',NULL,'',NULL,NULL,NULL),(49,'2020-01-10 04:42:47','2021-04-15 10:22:31','2021-01-10','2021-01-10',-10.00000000,'Miscellaneous payment',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL),(50,'2020-01-16 02:36:48','2021-04-15 10:22:31','2021-01-16','2021-01-16',20.50000000,'(CustomerInvoicePayment)',4,12,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'Magic Food Store',NULL,'',NULL,NULL,NULL),(51,'2020-01-21 01:02:14','2020-12-10 12:24:23','2020-07-18','2020-07-18',50.00000000,'Subscription 2013',4,12,NULL,'CB',NULL,'12345',0,NULL,0,'Bank CBN',NULL,NULL,'',NULL,NULL,NULL),(52,'2020-01-21 10:22:37','2021-04-15 10:22:31','2021-01-21','2021-01-21',50.00000000,'Subscription 2017',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'smith smith',NULL,'',NULL,NULL,NULL),(53,'2020-01-21 10:23:17','2021-04-15 10:22:31','2021-01-21','2021-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL),(54,'2020-01-21 10:23:28','2021-04-15 10:22:31','2021-01-21','2021-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CHQ',NULL,NULL,0,NULL,0,NULL,'Pierre Curie',NULL,'',NULL,NULL,NULL),(55,'2020-01-21 10:23:49','2021-04-15 10:22:31','2021-01-21','2021-01-21',50.00000000,'(SubscriptionPayment)',4,12,NULL,'CB',NULL,NULL,0,NULL,0,NULL,NULL,NULL,'',NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -1225,6 +914,8 @@ CREATE TABLE `llx_bank_account` ( `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_accountancy_journal` int(11) DEFAULT NULL, + `ics` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `ics_transfer` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_account_label` (`label`,`entity`), KEY `idx_fk_accountancy_journal` (`fk_accountancy_journal`), @@ -1238,7 +929,7 @@ CREATE TABLE `llx_bank_account` ( LOCK TABLES `llx_bank_account` WRITE; /*!40000 ALTER TABLE `llx_bank_account` DISABLE KEYS */; -INSERT INTO `llx_bank_account` VALUES (1,'2012-07-08 23:56:14','2020-01-10 00:44:44','SWIBAC','Swiss bank account',1,'Switz Gold Bank','','','123456789','','','NL39RABO0314043352',NULL,NULL,'21 jum street',NULL,6,'Mac Golder','11 big road,\r\nZurich',1,0,1,NULL,'502','','EUR',1500,1500,'',NULL,NULL,NULL,NULL,NULL,NULL,3),(2,'2012-07-09 00:00:24','2020-01-10 00:44:53','SWIBAC2','Swiss bank account old',1,'Switz Silver Bank','','','','','','NL07SNSB0908534915',NULL,NULL,'Road bankrupt\r\nZurich',NULL,6,'','',1,1,1,NULL,'503','','EUR',200,400,'',NULL,NULL,NULL,NULL,NULL,NULL,3),(3,'2012-07-10 13:33:42','2020-01-10 00:44:32','ACCOUNTCASH','Account for cash',1,'','','','','','','',NULL,NULL,'',3,1,'','',2,0,1,NULL,'501','OD','EUR',0,0,'',NULL,NULL,NULL,NULL,NULL,NULL,3),(4,'2018-07-30 18:42:14','2020-01-10 00:43:48','LUXBAC','Luxemburg Bank Account',1,'Lux Platinuium Bank','','','','','','NL46INGB0687674581',NULL,NULL,'',NULL,140,'','',1,0,1,NULL,'50','','EUR',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,3); +INSERT INTO `llx_bank_account` VALUES (1,'2012-07-08 23:56:14','2020-01-10 00:44:44','SWIBAC','Swiss bank account',1,'Switz Gold Bank','','','123456789','','','NL39RABO0314043352',NULL,NULL,'21 jum street',NULL,6,'Mac Golder','11 big road,\r\nZurich',1,0,1,NULL,'502','','EUR',1500,1500,'',NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL),(2,'2012-07-09 00:00:24','2020-01-10 00:44:53','SWIBAC2','Swiss bank account old',1,'Switz Silver Bank','','','','','','NL07SNSB0908534915',NULL,NULL,'Road bankrupt\r\nZurich',NULL,6,'','',1,1,1,NULL,'503','','EUR',200,400,'',NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL),(3,'2012-07-10 13:33:42','2020-01-10 00:44:32','ACCOUNTCASH','Account for cash',1,'','','','','','','',NULL,NULL,'',3,1,'','',2,0,1,NULL,'501','OD','EUR',0,0,'',NULL,NULL,NULL,NULL,NULL,NULL,3,NULL,NULL),(4,'2018-07-30 18:42:14','2021-04-15 13:27:05','LUXBAC','Luxemburg Bank Account',1,'Lux Platinuium Bank','','','','','','NL46INGB0687674581',NULL,NULL,'',NULL,140,'','',1,0,1,NULL,'50','','EUR',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,3,'',''); /*!40000 ALTER TABLE `llx_bank_account` ENABLE KEYS */; UNLOCK TABLES; @@ -1644,7 +1335,7 @@ CREATE TABLE `llx_boxes` ( KEY `idx_boxes_boxid` (`box_id`), KEY `idx_boxes_fk_user` (`fk_user`), CONSTRAINT `fk_boxes_box_id` FOREIGN KEY (`box_id`) REFERENCES `llx_boxes_def` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=1419 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1453 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1653,7 +1344,7 @@ CREATE TABLE `llx_boxes` ( LOCK TABLES `llx_boxes` WRITE; /*!40000 ALTER TABLE `llx_boxes` DISABLE KEYS */; -INSERT INTO `llx_boxes` VALUES (253,2,323,0,'0',0,NULL,NULL),(304,2,324,0,'0',0,NULL,NULL),(305,2,325,0,'0',0,NULL,NULL),(306,2,326,0,'0',0,NULL,NULL),(307,2,327,0,'0',0,NULL,NULL),(308,2,328,0,'0',0,NULL,NULL),(309,2,329,0,'0',0,NULL,NULL),(310,2,330,0,'0',0,NULL,NULL),(311,2,331,0,'0',0,NULL,NULL),(312,2,332,0,'0',0,NULL,NULL),(313,2,333,0,'0',0,NULL,NULL),(314,1,347,0,'B12',0,NULL,NULL),(315,1,348,0,'A33',0,NULL,NULL),(316,1,349,0,'A13',0,NULL,NULL),(317,1,350,0,'A29',0,NULL,NULL),(344,1,374,0,'A09',0,NULL,NULL),(347,1,377,0,'A25',0,NULL,NULL),(348,1,378,0,'A05',0,NULL,NULL),(358,1,388,0,'B36',0,NULL,NULL),(359,1,389,0,'A19',0,NULL,NULL),(360,1,390,0,'B32',0,NULL,NULL),(362,1,392,0,'B28',0,NULL,NULL),(363,1,393,0,'A15',0,NULL,NULL),(366,1,396,0,'A17',0,NULL,NULL),(387,1,403,0,'A37',0,NULL,NULL),(392,1,409,0,'A23',0,NULL,NULL),(393,1,410,0,'B24',0,NULL,NULL),(394,1,411,0,'B08',0,NULL,NULL),(395,1,412,0,'B18',0,NULL,NULL),(396,1,413,0,'B04',0,NULL,NULL),(397,1,414,0,'B14',0,NULL,NULL),(398,1,415,0,'A35',0,NULL,NULL),(399,1,416,0,'B10',0,NULL,NULL),(400,1,417,0,'A31',0,NULL,NULL),(401,1,418,0,'B06',0,NULL,NULL),(501,1,419,0,'A27',0,NULL,NULL),(1019,1,392,0,'A01',2,NULL,NULL),(1021,1,412,0,'A03',2,NULL,NULL),(1022,1,347,0,'A04',2,NULL,NULL),(1023,1,393,0,'A05',2,NULL,NULL),(1025,1,389,0,'A07',2,NULL,NULL),(1026,1,416,0,'A08',2,NULL,NULL),(1027,1,396,0,'B01',2,NULL,NULL),(1028,1,377,0,'B02',2,NULL,NULL),(1031,1,419,0,'B05',2,NULL,NULL),(1036,1,424,0,'B16',0,NULL,NULL),(1037,1,425,0,'B22',0,NULL,NULL),(1038,1,426,0,'B26',0,NULL,NULL),(1039,1,427,0,'B30',0,NULL,NULL),(1150,1,430,0,'B34',0,NULL,NULL),(1151,1,431,0,'A03',0,NULL,NULL),(1152,1,429,0,'A01',1,NULL,NULL),(1153,1,429,0,'B01',2,NULL,NULL),(1154,1,429,0,'A01',11,NULL,NULL),(1156,1,429,0,'A07',0,NULL,NULL),(1183,1,433,0,'A11',0,NULL,NULL),(1184,1,434,0,'A21',0,NULL,NULL),(1234,1,439,0,'B02',0,NULL,NULL),(1235,1,404,0,'B01',1,NULL,NULL),(1236,1,404,0,'B01',2,NULL,NULL),(1237,1,404,0,'B01',11,NULL,NULL),(1239,1,404,0,'B20',0,NULL,NULL),(1396,1,432,27,'A01',0,NULL,NULL),(1407,1,412,0,'A01',12,NULL,NULL),(1408,1,378,0,'A02',12,NULL,NULL),(1409,1,404,0,'A03',12,NULL,NULL),(1410,1,377,0,'A04',12,NULL,NULL),(1411,1,392,0,'B01',12,NULL,NULL),(1412,1,429,0,'B02',12,NULL,NULL),(1413,1,427,0,'B03',12,NULL,NULL),(1414,1,414,0,'B04',12,NULL,NULL),(1415,1,413,0,'B05',12,NULL,NULL),(1416,1,426,0,'B06',12,NULL,NULL),(1418,1,445,0,'0',0,NULL,NULL); +INSERT INTO `llx_boxes` VALUES (253,2,323,0,'0',0,NULL,NULL),(304,2,324,0,'0',0,NULL,NULL),(305,2,325,0,'0',0,NULL,NULL),(306,2,326,0,'0',0,NULL,NULL),(307,2,327,0,'0',0,NULL,NULL),(308,2,328,0,'0',0,NULL,NULL),(309,2,329,0,'0',0,NULL,NULL),(310,2,330,0,'0',0,NULL,NULL),(311,2,331,0,'0',0,NULL,NULL),(312,2,332,0,'0',0,NULL,NULL),(313,2,333,0,'0',0,NULL,NULL),(314,1,347,0,'A27',0,NULL,NULL),(315,1,348,0,'B20',0,NULL,NULL),(316,1,349,0,'B10',0,NULL,NULL),(317,1,350,0,'B18',0,NULL,NULL),(344,1,374,0,'B08',0,NULL,NULL),(347,1,377,0,'B16',0,NULL,NULL),(348,1,378,0,'B06',0,NULL,NULL),(358,1,388,0,'B38',0,NULL,NULL),(359,1,389,0,'A13',0,NULL,NULL),(360,1,390,0,'B36',0,NULL,NULL),(362,1,392,0,'A35',0,NULL,NULL),(363,1,393,0,'A11',0,NULL,NULL),(366,1,396,0,'B12',0,NULL,NULL),(387,1,403,0,'B22',0,NULL,NULL),(392,1,409,0,'A15',0,NULL,NULL),(393,1,410,0,'A33',0,NULL,NULL),(394,1,411,0,'A25',0,NULL,NULL),(395,1,412,0,'B30',0,NULL,NULL),(396,1,413,0,'A23',0,NULL,NULL),(397,1,414,0,'B28',0,NULL,NULL),(398,1,415,0,'A21',0,NULL,NULL),(399,1,416,0,'B26',0,NULL,NULL),(400,1,417,0,'A19',0,NULL,NULL),(401,1,418,0,'B24',0,NULL,NULL),(501,1,419,0,'A17',0,NULL,NULL),(1019,1,392,0,'A01',2,NULL,NULL),(1021,1,412,0,'A03',2,NULL,NULL),(1022,1,347,0,'A04',2,NULL,NULL),(1023,1,393,0,'A05',2,NULL,NULL),(1025,1,389,0,'A07',2,NULL,NULL),(1026,1,416,0,'A08',2,NULL,NULL),(1027,1,396,0,'B01',2,NULL,NULL),(1028,1,377,0,'B02',2,NULL,NULL),(1031,1,419,0,'B05',2,NULL,NULL),(1036,1,424,0,'A29',0,NULL,NULL),(1037,1,425,0,'B32',0,NULL,NULL),(1038,1,426,0,'B34',0,NULL,NULL),(1150,1,430,0,'A37',0,NULL,NULL),(1151,1,431,0,'A05',0,NULL,NULL),(1152,1,429,0,'A01',1,NULL,NULL),(1153,1,429,0,'B01',2,NULL,NULL),(1154,1,429,0,'A01',11,NULL,NULL),(1156,1,429,0,'A07',0,NULL,NULL),(1183,1,433,0,'A09',0,NULL,NULL),(1184,1,434,0,'B14',0,NULL,NULL),(1235,1,404,0,'B01',1,NULL,NULL),(1236,1,404,0,'B01',2,NULL,NULL),(1237,1,404,0,'B01',11,NULL,NULL),(1239,1,404,0,'A31',0,NULL,NULL),(1407,1,412,0,'A01',12,NULL,NULL),(1408,1,378,0,'A02',12,NULL,NULL),(1409,1,404,0,'A03',12,NULL,NULL),(1410,1,377,0,'A04',12,NULL,NULL),(1411,1,392,0,'B01',12,NULL,NULL),(1412,1,429,0,'B02',12,NULL,NULL),(1414,1,414,0,'B04',12,NULL,NULL),(1415,1,413,0,'B05',12,NULL,NULL),(1416,1,426,0,'B06',12,NULL,NULL),(1418,1,445,0,'B02',0,NULL,NULL),(1419,1,458,0,'A03',0,NULL,NULL),(1420,1,459,0,'B04',0,NULL,NULL),(1421,1,460,0,'A01',0,NULL,NULL),(1426,1,450,2,'A01',0,NULL,NULL),(1427,1,451,2,'B01',0,NULL,NULL),(1428,1,452,2,'A01',0,NULL,NULL),(1429,1,453,2,'B01',0,NULL,NULL),(1430,1,454,11,'A01',0,NULL,NULL),(1431,1,455,11,'B01',0,NULL,NULL),(1432,1,456,11,'A01',0,NULL,NULL),(1433,1,457,11,'B01',0,NULL,NULL),(1434,1,461,11,'A01',0,NULL,NULL),(1435,1,462,11,'B01',0,NULL,NULL),(1436,1,448,0,'A01',1,NULL,NULL),(1437,1,448,0,'B01',2,NULL,NULL),(1438,1,448,0,'A01',11,NULL,NULL),(1439,1,448,0,'A01',12,NULL,NULL),(1440,1,448,0,'A01',0,NULL,NULL),(1441,1,449,0,'B01',1,NULL,NULL),(1442,1,449,0,'A01',2,NULL,NULL),(1443,1,449,0,'B01',11,NULL,NULL),(1444,1,449,0,'A01',12,NULL,NULL),(1445,1,449,0,'B01',0,NULL,NULL),(1449,1,452,2,'A01',12,NULL,NULL),(1450,1,451,2,'B01',12,NULL,NULL),(1451,1,450,2,'B02',12,NULL,NULL),(1452,1,453,2,'B03',12,NULL,NULL); /*!40000 ALTER TABLE `llx_boxes` ENABLE KEYS */; UNLOCK TABLES; @@ -1672,7 +1363,7 @@ CREATE TABLE `llx_boxes_def` ( `note` varchar(130) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) -) ENGINE=InnoDB AUTO_INCREMENT=448 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=467 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1681,7 +1372,7 @@ CREATE TABLE `llx_boxes_def` ( LOCK TABLES `llx_boxes_def` WRITE; /*!40000 ALTER TABLE `llx_boxes_def` DISABLE KEYS */; -INSERT INTO `llx_boxes_def` VALUES (323,'box_actions.php',2,'2015-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)'),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)'),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)'),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL),(427,'box_comptes.php',1,'2017-02-07 18:56:12',NULL),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL),(431,'box_members.php',1,'2018-01-19 11:27:56',NULL),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL),(434,'box_last_modified_ticket',1,'2019-06-05 09:15:29',NULL),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL),(439,'box_mos.php',1,'2019-11-29 08:57:42',NULL),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL),(446,'box_funnel_of_prospection.php',1,'2020-12-10 12:24:40',NULL),(447,'box_customers_outstanding_bill_reached.php',1,'2020-12-10 12:24:40',NULL); +INSERT INTO `llx_boxes_def` VALUES (323,'box_actions.php',2,'2015-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2015-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2015-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2015-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2015-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2015-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2015-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2015-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2015-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2015-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2015-03-13 20:33:09',NULL),(347,'box_clients.php',1,'2017-11-15 22:05:57',NULL),(348,'box_prospect.php',1,'2017-11-15 22:05:57',NULL),(349,'box_contacts.php',1,'2017-11-15 22:05:57',NULL),(350,'box_activity.php',1,'2017-11-15 22:05:57','(WarningUsingThisBoxSlowDown)'),(374,'box_services_contracts.php',1,'2017-11-15 22:38:37',NULL),(377,'box_project.php',1,'2017-11-15 22:38:44',NULL),(378,'box_task.php',1,'2017-11-15 22:38:44',NULL),(388,'box_contracts.php',1,'2017-11-15 22:39:52',NULL),(389,'box_services_expired.php',1,'2017-11-15 22:39:52',NULL),(390,'box_ficheinter.php',1,'2017-11-15 22:39:56',NULL),(392,'box_graph_propales_permonth.php',1,'2017-11-15 22:41:47',NULL),(393,'box_propales.php',1,'2017-11-15 22:41:47',NULL),(396,'box_graph_product_distribution.php',1,'2017-11-15 22:41:47',NULL),(403,'box_goodcustomers.php',1,'2018-07-30 11:13:20','(WarningUsingThisBoxSlowDown)'),(404,'box_external_rss.php',1,'2018-07-30 11:15:25','1 (Dolibarr.org News)'),(409,'box_produits.php',1,'2018-07-30 13:38:11',NULL),(410,'box_produits_alerte_stock.php',1,'2018-07-30 13:38:11',NULL),(411,'box_commandes.php',1,'2018-07-30 13:38:11',NULL),(412,'box_graph_orders_permonth.php',1,'2018-07-30 13:38:11',NULL),(413,'box_graph_invoices_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(414,'box_graph_orders_supplier_permonth.php',1,'2018-07-30 13:38:11',NULL),(415,'box_fournisseurs.php',1,'2018-07-30 13:38:11',NULL),(416,'box_factures_fourn_imp.php',1,'2018-07-30 13:38:11',NULL),(417,'box_factures_fourn.php',1,'2018-07-30 13:38:11',NULL),(418,'box_supplier_orders.php',1,'2018-07-30 13:38:11',NULL),(419,'box_actions.php',1,'2018-07-30 15:42:32',NULL),(424,'box_factures_imp.php',1,'2017-02-07 18:56:12',NULL),(425,'box_factures.php',1,'2017-02-07 18:56:12',NULL),(426,'box_graph_invoices_permonth.php',1,'2017-02-07 18:56:12',NULL),(429,'box_lastlogin.php',1,'2017-08-27 13:29:14',NULL),(430,'box_bookmarks.php',1,'2018-01-19 11:27:34',NULL),(431,'box_members.php',1,'2018-01-19 11:27:56',NULL),(432,'box_birthdays.php',1,'2019-06-05 08:45:40',NULL),(433,'box_last_ticket',1,'2019-06-05 09:15:29',NULL),(434,'box_last_modified_ticket',1,'2019-06-05 09:15:29',NULL),(436,'box_accountancy_last_manual_entries.php',1,'2019-11-28 11:52:58',NULL),(437,'box_accountancy_suspense_account.php',1,'2019-11-28 11:52:58',NULL),(438,'box_supplier_orders_awaiting_reception.php',1,'2019-11-28 11:52:59',NULL),(445,'box_shipments.php',1,'2020-01-13 14:38:20',NULL),(446,'box_funnel_of_prospection.php',1,'2020-12-10 12:24:40',NULL),(447,'box_customers_outstanding_bill_reached.php',1,'2020-12-10 12:24:40',NULL),(448,'box_scheduled_jobs.php',1,'2021-04-15 10:22:49',NULL),(449,'box_dolibarr_state_board.php',1,'2021-04-15 10:22:54',NULL),(450,'box_members_last_modified.php',1,'2021-04-15 10:22:54',NULL),(451,'box_members_last_subscriptions.php',1,'2021-04-15 10:22:54',NULL),(452,'box_members_subscriptions_by_year.php',1,'2021-04-15 10:22:54',NULL),(453,'box_members_by_type.php',1,'2021-04-15 10:22:54',NULL),(454,'box_graph_ticket_by_severity.php',1,'2021-04-15 10:22:55',NULL),(455,'box_graph_nb_ticket_last_x_days.php',1,'2021-04-15 10:22:55',NULL),(456,'box_graph_nb_tickets_type.php',1,'2021-04-15 10:22:55',NULL),(457,'box_graph_new_vs_close_ticket.php',1,'2021-04-15 10:22:55',NULL),(458,'box_boms.php',1,'2021-04-15 10:22:58',NULL),(459,'box_comptes.php',1,'2021-04-15 10:22:58',NULL),(460,'box_mos.php',1,'2021-04-15 10:23:00',NULL),(461,'box_last_ticket.php',1,'2021-04-15 10:23:01',NULL),(462,'box_last_modified_ticket.php',1,'2021-04-15 10:23:01',NULL),(463,'box_ticket_by_severity.php',1,'2021-04-15 10:23:01',NULL),(464,'box_nb_ticket_last_x_days.php',1,'2021-04-15 10:23:01',NULL),(465,'box_nb_tickets_type.php',1,'2021-04-15 10:23:01',NULL),(466,'box_new_vs_close_ticket.php',1,'2021-04-15 10:23:01',NULL); /*!40000 ALTER TABLE `llx_boxes_def` ENABLE KEYS */; UNLOCK TABLES; @@ -1801,7 +1492,7 @@ CREATE TABLE `llx_c_action_trigger` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_action_trigger_code` (`code`), KEY `idx_action_trigger_rang` (`rang`) -) ENGINE=InnoDB AUTO_INCREMENT=376 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=392 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1810,7 +1501,7 @@ CREATE TABLE `llx_c_action_trigger` ( LOCK TABLES `llx_c_action_trigger` WRITE; /*!40000 ALTER TABLE `llx_c_action_trigger` DISABLE KEYS */; -INSERT INTO `llx_c_action_trigger` VALUES (131,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1),(132,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1),(133,'PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2),(134,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3),(135,'ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4),(136,'ORDER_CLOSE','Customer order classify delivered','Executed when a customer order is set delivered','commande',5),(137,'ORDER_CLASSIFY_BILLED','Customer order classify billed','Executed when a customer order is set to billed','commande',5),(138,'ORDER_CANCEL','Customer order canceled','Executed when a customer order is canceled','commande',5),(139,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5),(140,'BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6),(141,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7),(142,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8),(143,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9),(144,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10),(145,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(146,'ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',12),(147,'ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13),(148,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14),(149,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15),(150,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16),(151,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17),(152,'BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17),(153,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18),(154,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20),(155,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21),(156,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22),(158,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',24),(159,'MEMBER_MODIFY','Member modified','Executed when a member is modified','member',24),(160,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',25),(161,'FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',19),(162,'FICHINTER_CLASSIFY_BILLED','Intervention set billed','Executed when a intervention is set to billed (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(163,'FICHINTER_CLASSIFY_UNBILLED','Intervention set unbilled','Executed when a intervention is set to unbilled (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(164,'FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19),(165,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',19),(166,'PROJECT_CREATE','Project creation','Executed when a project is created','project',140),(167,'PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',2),(168,'PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',2),(169,'PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2),(170,'TASK_CREATE','Task created','Executed when a project task is created','project',35),(171,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36),(172,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37),(173,'BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15),(174,'PROJECT_MODIFY','Project modified','Executed when a project is modified','project',141),(175,'PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',142),(176,'ORDER_SUPPLIER_CREATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(177,'ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',12),(178,'ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',12),(179,'ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14),(180,'PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30),(181,'PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30),(182,'PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30),(183,'EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expense_report',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expense_report',203),(187,'EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expense_report',204),(192,'HOLIDAY_CREATE','Leave request created','Executed when a leave request is created','holiday',221),(193,'HOLIDAY_VALIDATE','Leave request validated','Executed when a leave request is validated','holiday',222),(194,'HOLIDAY_APPROVE','Leave request approved','Executed when a leave request is approved','holiday',223),(210,'MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23),(211,'CONTRACT_SENTBYMAIL','Contract sent by mail','Executed when a contract is sent by mail','contrat',18),(212,'PROPOSAL_SUPPLIER_VALIDATE','Price request validated','Executed when a commercial proposal is validated','proposal_supplier',10),(213,'PROPOSAL_SUPPLIER_SENTBYMAIL','Price request sent by mail','Executed when a commercial proposal is sent by mail','proposal_supplier',10),(214,'PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10),(215,'PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10),(216,'MEMBER_SUBSCRIPTION_CREATE','Member subscribtion recorded','Executed when a member subscribtion is deleted','member',24),(217,'MEMBER_SUBSCRIPTION_MODIFY','Member subscribtion modified','Executed when a member subscribtion is modified','member',24),(218,'MEMBER_SUBSCRIPTION_DELETE','Member subscribtion deleted','Executed when a member subscribtion is deleted','member',24),(225,'COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1),(226,'PROPAL_DELETE','Customer proposal deleted','Executed when a customer proposal is deleted','propal',2),(227,'ORDER_DELETE','Customer order deleted','Executed when a customer order is deleted','commande',5),(228,'BILL_DELETE','Customer invoice deleted','Executed when a customer invoice is deleted','facture',9),(229,'PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10),(230,'ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14),(231,'BILL_SUPPLIER_DELETE','Supplier invoice deleted','Executed when a supplier invoice is deleted','invoice_supplier',17),(232,'CONTRACT_DELETE','Contract deleted','Executed when a contract is deleted','contrat',18),(233,'FICHINTER_DELETE','Intervention is deleted','Executed when a intervention is deleted','ficheinter',35),(234,'EXPENSE_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',204),(249,'TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161),(250,'TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163),(251,'TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is assigned to another user','ticket',164),(252,'TICKET_CLOSE','Ticket closed','Executed when a ticket is closed','ticket',165),(253,'TICKET_SENTBYMAIL','Ticket message sent by email','Executed when a message is sent from the ticket record','ticket',166),(254,'TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',167),(261,'USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300),(262,'BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',650),(263,'BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',651),(264,'BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652),(265,'BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653),(266,'BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654),(351,'MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660),(352,'MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661),(353,'MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662),(354,'MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663),(365,'CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50),(366,'CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51),(367,'CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52),(368,'RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500),(369,'RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502),(370,'RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504),(371,'RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506),(372,'RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510),(373,'RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512),(374,'RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514),(375,'RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516); +INSERT INTO `llx_c_action_trigger` VALUES (131,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1),(132,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1),(133,'PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2),(134,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3),(135,'ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4),(136,'ORDER_CLOSE','Customer order classify delivered','Executed when a customer order is set delivered','commande',5),(137,'ORDER_CLASSIFY_BILLED','Customer order classify billed','Executed when a customer order is set to billed','commande',5),(138,'ORDER_CANCEL','Customer order canceled','Executed when a customer order is canceled','commande',5),(139,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5),(140,'BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6),(141,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7),(142,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8),(143,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9),(144,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10),(145,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(146,'ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',12),(147,'ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13),(148,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14),(149,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15),(150,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16),(151,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17),(152,'BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17),(153,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18),(154,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20),(155,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21),(156,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22),(158,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',24),(159,'MEMBER_MODIFY','Member modified','Executed when a member is modified','member',24),(160,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',25),(161,'FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',19),(162,'FICHINTER_CLASSIFY_BILLED','Intervention set billed','Executed when a intervention is set to billed (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(163,'FICHINTER_CLASSIFY_UNBILLED','Intervention set unbilled','Executed when a intervention is set to unbilled (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(164,'FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19),(165,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',19),(166,'PROJECT_CREATE','Project creation','Executed when a project is created','project',140),(167,'PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',2),(168,'PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',2),(169,'PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2),(170,'TASK_CREATE','Task created','Executed when a project task is created','project',35),(171,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36),(172,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37),(173,'BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15),(174,'PROJECT_MODIFY','Project modified','Executed when a project is modified','project',141),(175,'PROJECT_DELETE','Project deleted','Executed when a project is deleted','project',142),(176,'ORDER_SUPPLIER_CREATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(177,'ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',12),(178,'ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',12),(179,'ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14),(180,'PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30),(181,'PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30),(182,'PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30),(183,'EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201),(185,'EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202),(186,'EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203),(187,'EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204),(192,'HOLIDAY_CREATE','Leave request created','Executed when a leave request is created','holiday',221),(193,'HOLIDAY_VALIDATE','Leave request validated','Executed when a leave request is validated','holiday',222),(194,'HOLIDAY_APPROVE','Leave request approved','Executed when a leave request is approved','holiday',223),(210,'MEMBER_SENTBYMAIL','Mails sent from member card','Executed when you send email from member card','member',23),(211,'CONTRACT_SENTBYMAIL','Contract sent by mail','Executed when a contract is sent by mail','contrat',18),(212,'PROPOSAL_SUPPLIER_VALIDATE','Price request validated','Executed when a commercial proposal is validated','proposal_supplier',10),(213,'PROPOSAL_SUPPLIER_SENTBYMAIL','Price request sent by mail','Executed when a commercial proposal is sent by mail','proposal_supplier',10),(214,'PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10),(215,'PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10),(216,'MEMBER_SUBSCRIPTION_CREATE','Member subscribtion recorded','Executed when a member subscribtion is deleted','member',24),(217,'MEMBER_SUBSCRIPTION_MODIFY','Member subscribtion modified','Executed when a member subscribtion is modified','member',24),(218,'MEMBER_SUBSCRIPTION_DELETE','Member subscribtion deleted','Executed when a member subscribtion is deleted','member',24),(225,'COMPANY_DELETE','Third party deleted','Executed when you delete third party','societe',1),(226,'PROPAL_DELETE','Customer proposal deleted','Executed when a customer proposal is deleted','propal',2),(227,'ORDER_DELETE','Customer order deleted','Executed when a customer order is deleted','commande',5),(228,'BILL_DELETE','Customer invoice deleted','Executed when a customer invoice is deleted','facture',9),(229,'PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10),(230,'ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14),(231,'BILL_SUPPLIER_DELETE','Supplier invoice deleted','Executed when a supplier invoice is deleted','invoice_supplier',17),(232,'CONTRACT_DELETE','Contract deleted','Executed when a contract is deleted','contrat',18),(233,'FICHINTER_DELETE','Intervention is deleted','Executed when a intervention is deleted','ficheinter',35),(234,'EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',204),(249,'TICKET_CREATE','Ticket created','Executed when a ticket is created','ticket',161),(250,'TICKET_MODIFY','Ticket modified','Executed when a ticket is modified','ticket',163),(251,'TICKET_ASSIGNED','Ticket assigned','Executed when a ticket is assigned to another user','ticket',164),(252,'TICKET_CLOSE','Ticket closed','Executed when a ticket is closed','ticket',165),(253,'TICKET_SENTBYMAIL','Ticket message sent by email','Executed when a message is sent from the ticket record','ticket',166),(254,'TICKET_DELETE','Ticket deleted','Executed when a ticket is deleted','ticket',167),(261,'USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300),(262,'BOM_VALIDATE','BOM validated','Executed when a BOM is validated','bom',650),(263,'BOM_UNVALIDATE','BOM unvalidated','Executed when a BOM is unvalidated','bom',651),(264,'BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652),(265,'BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653),(266,'BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654),(351,'MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660),(352,'MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661),(353,'MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662),(354,'MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663),(365,'CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50),(366,'CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51),(367,'CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52),(368,'RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500),(369,'RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502),(370,'RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504),(371,'RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506),(372,'RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510),(373,'RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512),(374,'RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514),(375,'RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516); /*!40000 ALTER TABLE `llx_c_action_trigger` ENABLE KEYS */; UNLOCK TABLES; @@ -1823,10 +1514,10 @@ DROP TABLE IF EXISTS `llx_c_actioncomm`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_actioncomm` ( `id` int(11) NOT NULL, - `code` varchar(12) COLLATE utf8_unicode_ci NOT NULL, + `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'system', `libelle` varchar(48) COLLATE utf8_unicode_ci NOT NULL, - `module` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, + `module` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, `todo` tinyint(4) DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, @@ -1843,39 +1534,10 @@ CREATE TABLE `llx_c_actioncomm` ( LOCK TABLES `llx_c_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_c_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_c_actioncomm` VALUES (1,'AC_TEL','system','Phone call',NULL,1,NULL,2,NULL,NULL),(2,'AC_FAX','system','Send Fax',NULL,1,NULL,3,NULL,NULL),(3,'AC_PROP','systemauto','Send commercial proposal by email','propal',1,NULL,10,NULL,NULL),(4,'AC_EMAIL','system','Send Email',NULL,1,NULL,4,NULL,NULL),(5,'AC_RDV','system','Rendez-vous',NULL,1,NULL,1,NULL,NULL),(8,'AC_COM','systemauto','Send customer order by email','order',1,NULL,8,NULL,NULL),(9,'AC_FAC','systemauto','Send customer invoice by email','invoice',1,NULL,6,NULL,NULL),(10,'AC_SHIP','systemauto','Send shipping by email','shipping',1,NULL,11,NULL,NULL),(11,'AC_INT','system','Intervention on site',NULL,1,NULL,4,NULL,NULL),(30,'AC_SUP_ORD','systemauto','Send supplier order by email','order_supplier',1,NULL,9,NULL,NULL),(31,'AC_SUP_INV','systemauto','Send supplier invoice by email','invoice_supplier',1,NULL,7,NULL,NULL),(40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL,1,NULL,20,NULL,NULL),(50,'AC_OTH','system','Other (manually inserted events)',NULL,1,NULL,5,NULL,NULL),(100700,'AC_CABMED','module','Send document by email','cabinetmed',0,NULL,100,NULL,NULL); +INSERT INTO `llx_c_actioncomm` VALUES (1,'AC_TEL','system','Phone call',NULL,1,NULL,2,NULL,NULL),(2,'AC_FAX','system','Send Fax',NULL,1,NULL,3,NULL,NULL),(3,'AC_PROP','systemauto','Send commercial proposal by email','propal',1,NULL,10,NULL,NULL),(4,'AC_EMAIL','system','Send Email',NULL,1,NULL,4,NULL,NULL),(5,'AC_RDV','system','Rendez-vous',NULL,1,NULL,1,NULL,NULL),(6,'AC_EMAIL_IN','system','reception Email',NULL,1,NULL,4,NULL,NULL),(8,'AC_COM','systemauto','Send customer order by email','order',1,NULL,8,NULL,NULL),(9,'AC_FAC','systemauto','Send customer invoice by email','invoice',1,NULL,6,NULL,NULL),(10,'AC_SHIP','systemauto','Send shipping by email','shipping',1,NULL,11,NULL,NULL),(11,'AC_INT','system','Intervention on site',NULL,1,NULL,4,NULL,NULL),(30,'AC_SUP_ORD','systemauto','Send supplier order by email','order_supplier',1,NULL,9,NULL,NULL),(31,'AC_SUP_INV','systemauto','Send supplier invoice by email','invoice_supplier',1,NULL,7,NULL,NULL),(40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL,1,NULL,20,NULL,NULL),(50,'AC_OTH','system','Other (manually inserted events)',NULL,1,NULL,5,NULL,NULL),(60,'AC_EO_ONLINECONF','module','Online/Virtual conference','conference@eventorganization',1,NULL,60,NULL,NULL),(61,'AC_EO_INDOORCONF','module','Indoor conference','conference@eventorganization',1,NULL,61,NULL,NULL),(62,'AC_EO_ONLINEBOOTH','module','Online/Virtual booth','booth@eventorganization',1,NULL,62,NULL,NULL),(63,'AC_EO_INDOORBOOTH','module','Indoor booth','booth@eventorganization',1,NULL,63,NULL,NULL),(100700,'AC_CABMED','module','Send document by email','cabinetmed',0,NULL,100,NULL,NULL); /*!40000 ALTER TABLE `llx_c_actioncomm` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_c_agefodd_session_calendrier_type` --- - -DROP TABLE IF EXISTS `llx_c_agefodd_session_calendrier_type`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_c_agefodd_session_calendrier_type` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL, - `label` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) DEFAULT 1, - `active` tinyint(4) NOT NULL DEFAULT 1, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_c_agefodd_session_calendrier_type` (`code`,`entity`), - KEY `ik_c_agefodd_session_calendrier_type` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_c_agefodd_session_calendrier_type` --- - -LOCK TABLES `llx_c_agefodd_session_calendrier_type` WRITE; -/*!40000 ALTER TABLE `llx_c_agefodd_session_calendrier_type` DISABLE KEYS */; -INSERT INTO `llx_c_agefodd_session_calendrier_type` VALUES (1,'AGF_TYPE_F2F','Individuel face à face',1,1),(2,'AGF_TYPE_GRP','Groupe',1,1),(3,'AGF_TYPE_PHONE','Téléphone',1,1),(4,'AGF_TYPE_PLATF','Plateforme',1,1),(5,'AGF_TYPE_CRT','Certification',1,1); -/*!40000 ALTER TABLE `llx_c_agefodd_session_calendrier_type` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_c_availability` -- @@ -1888,6 +1550,7 @@ CREATE TABLE `llx_c_availability` ( `code` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `label` varchar(60) COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, + `position` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_availability` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1899,7 +1562,7 @@ CREATE TABLE `llx_c_availability` ( LOCK TABLES `llx_c_availability` WRITE; /*!40000 ALTER TABLE `llx_c_availability` DISABLE KEYS */; -INSERT INTO `llx_c_availability` VALUES (1,'AV_NOW','Immediate',1),(2,'AV_1W','1 week',1),(3,'AV_2W','2 weeks',1),(4,'AV_3W','3 weeks',1); +INSERT INTO `llx_c_availability` VALUES (1,'AV_NOW','Immediate',1,0),(2,'AV_1W','1 week',1,0),(3,'AV_2W','2 weeks',1,0),(4,'AV_3W','3 weeks',1,0); /*!40000 ALTER TABLE `llx_c_availability` ENABLE KEYS */; UNLOCK TABLES; @@ -1919,7 +1582,7 @@ CREATE TABLE `llx_c_barcode_type` ( `example` varchar(16) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_barcode_type` (`code`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2201,7 +1864,7 @@ CREATE TABLE `llx_c_email_templates` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_email_templates` (`entity`,`label`,`lang`), KEY `idx_type` (`type_template`) -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2210,7 +1873,7 @@ CREATE TABLE `llx_c_email_templates` ( LOCK TABLES `llx_c_email_templates` WRITE; /*!40000 ALTER TABLE `llx_c_email_templates` DISABLE KEYS */; -INSERT INTO `llx_c_email_templates` VALUES (1,1,NULL,'propal_send','',1,NULL,NULL,'2018-01-19 11:17:48','My Private email template for proposals',1,1,'Hello __FIRSTNAME__','We wish you a happy new year
__USER_SIGNATURE__',NULL,'1','1'),(2,0,'adherent','member','',0,NULL,NULL,'2018-01-19 11:17:48','(SendAnEMailToMember)',1,1,'__(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,'1','1'),(3,0,'banque','thirdparty','',0,NULL,NULL,'2018-01-19 11:17:48','(YourSEPAMandate)',1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',NULL,'1','1'),(6,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnAutoSubscription)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(7,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnMemberValidation)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(8,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnNewSubscription)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1'),(9,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingReminderForExpiredSubscription)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(10,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnCancelation)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(11,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingAnEMailToMember)',60,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,'1','0'),(12,0,'recruitment','recruitmentcandidature_send','',0,NULL,NULL,'2020-12-10 12:24:39','(AnswerCandidature)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__','__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswer)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'$conf->recruitment->enabled','0'); +INSERT INTO `llx_c_email_templates` VALUES (1,1,NULL,'propal_send','',1,NULL,NULL,'2018-01-19 11:17:48','My Private email template for proposals',1,1,'Hello __FIRSTNAME__','We wish you a happy new year
__USER_SIGNATURE__',NULL,'1','1'),(2,0,'adherent','member','',0,NULL,NULL,'2018-01-19 11:17:48','(SendAnEMailToMember)',1,1,'__(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,'1','1'),(3,0,'banque','thirdparty','',0,NULL,NULL,'2018-01-19 11:17:48','(YourSEPAMandate)',1,0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',NULL,'1','1'),(6,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnAutoSubscription)',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(7,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnMemberValidation)',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(8,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnNewSubscription)',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','1'),(9,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingReminderForExpiredSubscription)',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(10,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingEmailOnCancelation)',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'1','0'),(11,0,'adherent','member','',0,NULL,NULL,'2018-11-23 11:56:08','(SendingAnEMailToMember)',60,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,'1','0'),(12,0,'recruitment','recruitmentcandidature_send','',0,NULL,NULL,'2020-12-10 12:24:39','(AnswerCandidature)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__','__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswer)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',NULL,'$conf->recruitment->enabled','0'),(14,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskConf',10,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(15,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailAskBooth',20,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(16,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsBooth',30,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(17,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationEmailSubsEvent',40,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(18,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailAttendees',50,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(19,0,'','eventorganization_send','',0,NULL,NULL,'2021-02-14 13:42:41','EventOrganizationMassEmailSpeakers',60,1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__','__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__',NULL,'1',NULL),(20,0,'partnership','member',NULL,0,NULL,NULL,'2021-04-15 10:22:55','(AlertStatusPartnershipExpiration)',100,1,'[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourMembershipWillSoonExpireTopic)__','\n

Dear __MEMBER_FULLNAME__,

\n__(YourMembershipWillSoonExpireContent)__

\n
\n\n __(Sincerely)__
\n __[PARTNERSHIP_SOCIETE_NOM]__
\n \n',NULL,'1','0'); /*!40000 ALTER TABLE `llx_c_email_templates` ENABLE KEYS */; UNLOCK TABLES; @@ -2907,8 +2570,8 @@ CREATE TABLE `llx_c_product_nature` ( `label` varchar(100) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_c_product_nature` (`code`,`active`) -) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4; + UNIQUE KEY `uk_c_product_nature` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3164,7 +2827,7 @@ CREATE TABLE `llx_c_socialnetworks` ( `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`), UNIQUE KEY `idx_c_socialnetworks_code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3173,7 +2836,7 @@ CREATE TABLE `llx_c_socialnetworks` ( LOCK TABLES `llx_c_socialnetworks` WRITE; /*!40000 ALTER TABLE `llx_c_socialnetworks` DISABLE KEYS */; -INSERT INTO `llx_c_socialnetworks` VALUES (1,1,'facebook','Facebook','https://www.facebook.com/{socialid}','fa-facebook',0),(2,1,'skype','Skype','https://www.skype.com/{socialid}','fa-skype',1),(3,1,'twitter','Twitter','https://www.twitter.com/{socialid}','fa-twitter',1),(4,1,'linkedin','LinkedIn','https://www.linkedin.com/{socialid}','fa-linkedin',1),(5,1,'instagram','Instagram','https://www.instagram.com/{socialid}','fa-instagram',0),(6,1,'snapchat','Snapchat','{socialid}','fa-snapchat',0),(7,1,'googleplus','GooglePlus','https://www.googleplus.com/{socialid}','fa-google-plus-g',0),(8,1,'youtube','Youtube','https://www.youtube.com/{socialid}','fa-youtube',0),(9,1,'whatsapp','Whatsapp','{socialid}','fa-whatsapp',0),(10,1,'tumblr','Tumblr','https://www.tumblr.com/{socialid}','fa-tumblr',0),(11,1,'vero','Vero','https://vero.co/{socialid}','',0),(12,1,'viadeo','Viadeo','https://fr.viadeo.com/fr/{socialid}','fa-viadeo',0),(13,1,'slack','Slack','{socialid}','fa-slack',0),(14,1,'xing','Xing','{socialid}','fa-xing',0),(15,1,'meetup','Meetup','{socialid}','fa-meetup',0),(16,1,'pinterest','Pinterest','{socialid}','fa-pinterest',0),(17,1,'flickr','Flickr','{socialid}','fa-flickr',0),(18,1,'500px','500px','{socialid}','fa-500px',0),(19,1,'giphy','Giphy','{socialid}','',0),(20,1,'gifycat','Gificat','{socialid}','',0),(21,1,'dailymotion','Dailymotion','{socialid}','',0),(22,1,'vimeo','Vimeo','{socialid}','',0),(23,1,'periscope','Periscope','{socialid}','',0),(24,1,'twitch','Twitch','{socialid}','',0),(25,1,'discord','Discord','{socialid}','fa-discord',0),(26,1,'wikipedia','Wikipedia','{socialid}','',0),(27,1,'reddit','Reddit','{socialid}','fa-reddit',0),(28,1,'quora','Quora','{socialid}','',0),(29,1,'tripadvisor','Tripadvisor','{socialid}','',0),(30,1,'mastodon','Mastodon','{socialid}','',0),(31,1,'diaspora','Diaspora','{socialid}','',0),(32,1,'viber','Viber','{socialid}','',0); +INSERT INTO `llx_c_socialnetworks` VALUES (1,1,'facebook','Facebook','https://www.facebook.com/{socialid}','fa-facebook',0),(2,1,'skype','Skype','https://www.skype.com/{socialid}','fa-skype',1),(3,1,'twitter','Twitter','https://www.twitter.com/{socialid}','fa-twitter',1),(4,1,'linkedin','LinkedIn','https://www.linkedin.com/{socialid}','fa-linkedin',1),(5,1,'instagram','Instagram','https://www.instagram.com/{socialid}','fa-instagram',0),(6,1,'snapchat','Snapchat','{socialid}','fa-snapchat',0),(7,1,'googleplus','GooglePlus','https://www.googleplus.com/{socialid}','fa-google-plus-g',0),(8,1,'youtube','Youtube','https://www.youtube.com/{socialid}','fa-youtube',0),(9,1,'whatsapp','Whatsapp','{socialid}','fa-whatsapp',0),(10,1,'tumblr','Tumblr','https://www.tumblr.com/{socialid}','fa-tumblr',0),(11,1,'vero','Vero','https://vero.co/{socialid}','',0),(12,1,'viadeo','Viadeo','https://fr.viadeo.com/fr/{socialid}','fa-viadeo',0),(13,1,'slack','Slack','{socialid}','fa-slack',0),(14,1,'xing','Xing','{socialid}','fa-xing',0),(15,1,'meetup','Meetup','{socialid}','fa-meetup',0),(16,1,'pinterest','Pinterest','{socialid}','fa-pinterest',0),(17,1,'flickr','Flickr','{socialid}','fa-flickr',0),(18,1,'500px','500px','{socialid}','fa-500px',0),(19,1,'giphy','Giphy','{socialid}','',0),(20,1,'gifycat','Gificat','{socialid}','',0),(21,1,'dailymotion','Dailymotion','{socialid}','',0),(22,1,'vimeo','Vimeo','{socialid}','',0),(23,1,'periscope','Periscope','{socialid}','',0),(24,1,'twitch','Twitch','{socialid}','',0),(25,1,'discord','Discord','{socialid}','fa-discord',0),(26,1,'wikipedia','Wikipedia','{socialid}','',0),(27,1,'reddit','Reddit','{socialid}','fa-reddit',0),(28,1,'quora','Quora','{socialid}','',0),(29,1,'tripadvisor','Tripadvisor','{socialid}','',0),(30,1,'mastodon','Mastodon','{socialid}','',0),(31,1,'diaspora','Diaspora','{socialid}','',0),(32,1,'viber','Viber','{socialid}','',0),(65,1,'github','Github','https://github.com/{socialid}','fa-github',1); /*!40000 ALTER TABLE `llx_c_socialnetworks` ENABLE KEYS */; UNLOCK TABLES; @@ -3270,13 +2933,14 @@ CREATE TABLE `llx_c_ticket_category` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `entity` int(11) DEFAULT 1, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, - `pos` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + `pos` int(11) NOT NULL DEFAULT 0, `label` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `active` int(11) DEFAULT 1, `use_default` int(11) DEFAULT 1, `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_parent` int(11) NOT NULL DEFAULT 0, `force_severity` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `public` int(11) DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_code` (`code`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -3288,7 +2952,7 @@ CREATE TABLE `llx_c_ticket_category` ( LOCK TABLES `llx_c_ticket_category` WRITE; /*!40000 ALTER TABLE `llx_c_ticket_category` DISABLE KEYS */; -INSERT INTO `llx_c_ticket_category` VALUES (1,1,'OTHER','10','Other',1,1,NULL,0,NULL); +INSERT INTO `llx_c_ticket_category` VALUES (1,1,'OTHER',10,'Other',1,1,NULL,0,NULL,0); /*!40000 ALTER TABLE `llx_c_ticket_category` ENABLE KEYS */; UNLOCK TABLES; @@ -3400,7 +3064,7 @@ CREATE TABLE `llx_c_transport_mode` ( `label` varchar(255) NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 1, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=313 DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB AUTO_INCREMENT=321 DEFAULT CHARSET=utf8mb4; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3409,7 +3073,7 @@ CREATE TABLE `llx_c_transport_mode` ( LOCK TABLES `llx_c_transport_mode` WRITE; /*!40000 ALTER TABLE `llx_c_transport_mode` DISABLE KEYS */; -INSERT INTO `llx_c_transport_mode` VALUES (1,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(2,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(3,1,'ROU','Transport par route',1),(4,1,'AIR','Transport par air',1),(5,1,'POS','Envois postaux',1),(6,1,'OLE','Installations de transport fixe (oléoduc)',1),(7,1,'NAV','Transport par navigation intérieure',1),(8,1,'PRO','Propulsion propre',1),(9,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(10,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(11,1,'ROU','Transport par route',1),(12,1,'AIR','Transport par air',1),(13,1,'POS','Envois postaux',1),(14,1,'OLE','Installations de transport fixe (oléoduc)',1),(15,1,'NAV','Transport par navigation intérieure',1),(16,1,'PRO','Propulsion propre',1),(17,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(18,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(19,1,'ROU','Transport par route',1),(20,1,'AIR','Transport par air',1),(21,1,'POS','Envois postaux',1),(22,1,'OLE','Installations de transport fixe (oléoduc)',1),(23,1,'NAV','Transport par navigation intérieure',1),(24,1,'PRO','Propulsion propre',1),(25,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(26,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(27,1,'ROU','Transport par route',1),(28,1,'AIR','Transport par air',1),(29,1,'POS','Envois postaux',1),(30,1,'OLE','Installations de transport fixe (oléoduc)',1),(31,1,'NAV','Transport par navigation intérieure',1),(32,1,'PRO','Propulsion propre',1),(33,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(34,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(35,1,'ROU','Transport par route',1),(36,1,'AIR','Transport par air',1),(37,1,'POS','Envois postaux',1),(38,1,'OLE','Installations de transport fixe (oléoduc)',1),(39,1,'NAV','Transport par navigation intérieure',1),(40,1,'PRO','Propulsion propre',1),(41,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(42,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(43,1,'ROU','Transport par route',1),(44,1,'AIR','Transport par air',1),(45,1,'POS','Envois postaux',1),(46,1,'OLE','Installations de transport fixe (oléoduc)',1),(47,1,'NAV','Transport par navigation intérieure',1),(48,1,'PRO','Propulsion propre',1),(49,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(50,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(51,1,'ROU','Transport par route',1),(52,1,'AIR','Transport par air',1),(53,1,'POS','Envois postaux',1),(54,1,'OLE','Installations de transport fixe (oléoduc)',1),(55,1,'NAV','Transport par navigation intérieure',1),(56,1,'PRO','Propulsion propre',1),(57,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(58,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(59,1,'ROU','Transport par route',1),(60,1,'AIR','Transport par air',1),(61,1,'POS','Envois postaux',1),(62,1,'OLE','Installations de transport fixe (oléoduc)',1),(63,1,'NAV','Transport par navigation intérieure',1),(64,1,'PRO','Propulsion propre',1),(65,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(66,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(67,1,'ROU','Transport par route',1),(68,1,'AIR','Transport par air',1),(69,1,'POS','Envois postaux',1),(70,1,'OLE','Installations de transport fixe (oléoduc)',1),(71,1,'NAV','Transport par navigation intérieure',1),(72,1,'PRO','Propulsion propre',1),(73,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(74,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(75,1,'ROU','Transport par route',1),(76,1,'AIR','Transport par air',1),(77,1,'POS','Envois postaux',1),(78,1,'OLE','Installations de transport fixe (oléoduc)',1),(79,1,'NAV','Transport par navigation intérieure',1),(80,1,'PRO','Propulsion propre',1),(81,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(82,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(83,1,'ROU','Transport par route',1),(84,1,'AIR','Transport par air',1),(85,1,'POS','Envois postaux',1),(86,1,'OLE','Installations de transport fixe (oléoduc)',1),(87,1,'NAV','Transport par navigation intérieure',1),(88,1,'PRO','Propulsion propre',1),(89,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(90,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(91,1,'ROU','Transport par route',1),(92,1,'AIR','Transport par air',1),(93,1,'POS','Envois postaux',1),(94,1,'OLE','Installations de transport fixe (oléoduc)',1),(95,1,'NAV','Transport par navigation intérieure',1),(96,1,'PRO','Propulsion propre',1),(97,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(98,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(99,1,'ROU','Transport par route',1),(100,1,'AIR','Transport par air',1),(101,1,'POS','Envois postaux',1),(102,1,'OLE','Installations de transport fixe (oléoduc)',1),(103,1,'NAV','Transport par navigation intérieure',1),(104,1,'PRO','Propulsion propre',1),(105,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(106,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(107,1,'ROU','Transport par route',1),(108,1,'AIR','Transport par air',1),(109,1,'POS','Envois postaux',1),(110,1,'OLE','Installations de transport fixe (oléoduc)',1),(111,1,'NAV','Transport par navigation intérieure',1),(112,1,'PRO','Propulsion propre',1),(113,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(114,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(115,1,'ROU','Transport par route',1),(116,1,'AIR','Transport par air',1),(117,1,'POS','Envois postaux',1),(118,1,'OLE','Installations de transport fixe (oléoduc)',1),(119,1,'NAV','Transport par navigation intérieure',1),(120,1,'PRO','Propulsion propre',1),(121,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(122,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(123,1,'ROU','Transport par route',1),(124,1,'AIR','Transport par air',1),(125,1,'POS','Envois postaux',1),(126,1,'OLE','Installations de transport fixe (oléoduc)',1),(127,1,'NAV','Transport par navigation intérieure',1),(128,1,'PRO','Propulsion propre',1),(129,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(130,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(131,1,'ROU','Transport par route',1),(132,1,'AIR','Transport par air',1),(133,1,'POS','Envois postaux',1),(134,1,'OLE','Installations de transport fixe (oléoduc)',1),(135,1,'NAV','Transport par navigation intérieure',1),(136,1,'PRO','Propulsion propre',1),(137,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(138,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(139,1,'ROU','Transport par route',1),(140,1,'AIR','Transport par air',1),(141,1,'POS','Envois postaux',1),(142,1,'OLE','Installations de transport fixe (oléoduc)',1),(143,1,'NAV','Transport par navigation intérieure',1),(144,1,'PRO','Propulsion propre',1),(145,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(146,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(147,1,'ROU','Transport par route',1),(148,1,'AIR','Transport par air',1),(149,1,'POS','Envois postaux',1),(150,1,'OLE','Installations de transport fixe (oléoduc)',1),(151,1,'NAV','Transport par navigation intérieure',1),(152,1,'PRO','Propulsion propre',1),(153,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(154,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(155,1,'ROU','Transport par route',1),(156,1,'AIR','Transport par air',1),(157,1,'POS','Envois postaux',1),(158,1,'OLE','Installations de transport fixe (oléoduc)',1),(159,1,'NAV','Transport par navigation intérieure',1),(160,1,'PRO','Propulsion propre',1),(161,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(162,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(163,1,'ROU','Transport par route',1),(164,1,'AIR','Transport par air',1),(165,1,'POS','Envois postaux',1),(166,1,'OLE','Installations de transport fixe (oléoduc)',1),(167,1,'NAV','Transport par navigation intérieure',1),(168,1,'PRO','Propulsion propre',1),(169,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(170,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(171,1,'ROU','Transport par route',1),(172,1,'AIR','Transport par air',1),(173,1,'POS','Envois postaux',1),(174,1,'OLE','Installations de transport fixe (oléoduc)',1),(175,1,'NAV','Transport par navigation intérieure',1),(176,1,'PRO','Propulsion propre',1),(177,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(178,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(179,1,'ROU','Transport par route',1),(180,1,'AIR','Transport par air',1),(181,1,'POS','Envois postaux',1),(182,1,'OLE','Installations de transport fixe (oléoduc)',1),(183,1,'NAV','Transport par navigation intérieure',1),(184,1,'PRO','Propulsion propre',1),(185,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(186,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(187,1,'ROU','Transport par route',1),(188,1,'AIR','Transport par air',1),(189,1,'POS','Envois postaux',1),(190,1,'OLE','Installations de transport fixe (oléoduc)',1),(191,1,'NAV','Transport par navigation intérieure',1),(192,1,'PRO','Propulsion propre',1),(193,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(194,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(195,1,'ROU','Transport par route',1),(196,1,'AIR','Transport par air',1),(197,1,'POS','Envois postaux',1),(198,1,'OLE','Installations de transport fixe (oléoduc)',1),(199,1,'NAV','Transport par navigation intérieure',1),(200,1,'PRO','Propulsion propre',1),(201,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(202,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(203,1,'ROU','Transport par route',1),(204,1,'AIR','Transport par air',1),(205,1,'POS','Envois postaux',1),(206,1,'OLE','Installations de transport fixe (oléoduc)',1),(207,1,'NAV','Transport par navigation intérieure',1),(208,1,'PRO','Propulsion propre',1),(209,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(210,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(211,1,'ROU','Transport par route',1),(212,1,'AIR','Transport par air',1),(213,1,'POS','Envois postaux',1),(214,1,'OLE','Installations de transport fixe (oléoduc)',1),(215,1,'NAV','Transport par navigation intérieure',1),(216,1,'PRO','Propulsion propre',1),(217,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(218,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(219,1,'ROU','Transport par route',1),(220,1,'AIR','Transport par air',1),(221,1,'POS','Envois postaux',1),(222,1,'OLE','Installations de transport fixe (oléoduc)',1),(223,1,'NAV','Transport par navigation intérieure',1),(224,1,'PRO','Propulsion propre',1),(225,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(226,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(227,1,'ROU','Transport par route',1),(228,1,'AIR','Transport par air',1),(229,1,'POS','Envois postaux',1),(230,1,'OLE','Installations de transport fixe (oléoduc)',1),(231,1,'NAV','Transport par navigation intérieure',1),(232,1,'PRO','Propulsion propre',1),(233,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(234,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(235,1,'ROU','Transport par route',1),(236,1,'AIR','Transport par air',1),(237,1,'POS','Envois postaux',1),(238,1,'OLE','Installations de transport fixe (oléoduc)',1),(239,1,'NAV','Transport par navigation intérieure',1),(240,1,'PRO','Propulsion propre',1),(241,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(242,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(243,1,'ROU','Transport par route',1),(244,1,'AIR','Transport par air',1),(245,1,'POS','Envois postaux',1),(246,1,'OLE','Installations de transport fixe (oléoduc)',1),(247,1,'NAV','Transport par navigation intérieure',1),(248,1,'PRO','Propulsion propre',1),(249,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(250,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(251,1,'ROU','Transport par route',1),(252,1,'AIR','Transport par air',1),(253,1,'POS','Envois postaux',1),(254,1,'OLE','Installations de transport fixe (oléoduc)',1),(255,1,'NAV','Transport par navigation intérieure',1),(256,1,'PRO','Propulsion propre',1),(257,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(258,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(259,1,'ROU','Transport par route',1),(260,1,'AIR','Transport par air',1),(261,1,'POS','Envois postaux',1),(262,1,'OLE','Installations de transport fixe (oléoduc)',1),(263,1,'NAV','Transport par navigation intérieure',1),(264,1,'PRO','Propulsion propre',1),(265,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(266,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(267,1,'ROU','Transport par route',1),(268,1,'AIR','Transport par air',1),(269,1,'POS','Envois postaux',1),(270,1,'OLE','Installations de transport fixe (oléoduc)',1),(271,1,'NAV','Transport par navigation intérieure',1),(272,1,'PRO','Propulsion propre',1),(273,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(274,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(275,1,'ROU','Transport par route',1),(276,1,'AIR','Transport par air',1),(277,1,'POS','Envois postaux',1),(278,1,'OLE','Installations de transport fixe (oléoduc)',1),(279,1,'NAV','Transport par navigation intérieure',1),(280,1,'PRO','Propulsion propre',1),(281,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(282,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(283,1,'ROU','Transport par route',1),(284,1,'AIR','Transport par air',1),(285,1,'POS','Envois postaux',1),(286,1,'OLE','Installations de transport fixe (oléoduc)',1),(287,1,'NAV','Transport par navigation intérieure',1),(288,1,'PRO','Propulsion propre',1),(289,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(290,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(291,1,'ROU','Transport par route',1),(292,1,'AIR','Transport par air',1),(293,1,'POS','Envois postaux',1),(294,1,'OLE','Installations de transport fixe (oléoduc)',1),(295,1,'NAV','Transport par navigation intérieure',1),(296,1,'PRO','Propulsion propre',1),(297,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(298,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(299,1,'ROU','Transport par route',1),(300,1,'AIR','Transport par air',1),(301,1,'POS','Envois postaux',1),(302,1,'OLE','Installations de transport fixe (oléoduc)',1),(303,1,'NAV','Transport par navigation intérieure',1),(304,1,'PRO','Propulsion propre',1),(305,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(306,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(307,1,'ROU','Transport par route',1),(308,1,'AIR','Transport par air',1),(309,1,'POS','Envois postaux',1),(310,1,'OLE','Installations de transport fixe (oléoduc)',1),(311,1,'NAV','Transport par navigation intérieure',1),(312,1,'PRO','Propulsion propre',1); +INSERT INTO `llx_c_transport_mode` VALUES (1,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(2,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(3,1,'ROU','Transport par route',1),(4,1,'AIR','Transport par air',1),(5,1,'POS','Envois postaux',1),(6,1,'OLE','Installations de transport fixe (oléoduc)',1),(7,1,'NAV','Transport par navigation intérieure',1),(8,1,'PRO','Propulsion propre',1),(9,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(10,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(11,1,'ROU','Transport par route',1),(12,1,'AIR','Transport par air',1),(13,1,'POS','Envois postaux',1),(14,1,'OLE','Installations de transport fixe (oléoduc)',1),(15,1,'NAV','Transport par navigation intérieure',1),(16,1,'PRO','Propulsion propre',1),(17,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(18,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(19,1,'ROU','Transport par route',1),(20,1,'AIR','Transport par air',1),(21,1,'POS','Envois postaux',1),(22,1,'OLE','Installations de transport fixe (oléoduc)',1),(23,1,'NAV','Transport par navigation intérieure',1),(24,1,'PRO','Propulsion propre',1),(25,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(26,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(27,1,'ROU','Transport par route',1),(28,1,'AIR','Transport par air',1),(29,1,'POS','Envois postaux',1),(30,1,'OLE','Installations de transport fixe (oléoduc)',1),(31,1,'NAV','Transport par navigation intérieure',1),(32,1,'PRO','Propulsion propre',1),(33,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(34,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(35,1,'ROU','Transport par route',1),(36,1,'AIR','Transport par air',1),(37,1,'POS','Envois postaux',1),(38,1,'OLE','Installations de transport fixe (oléoduc)',1),(39,1,'NAV','Transport par navigation intérieure',1),(40,1,'PRO','Propulsion propre',1),(41,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(42,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(43,1,'ROU','Transport par route',1),(44,1,'AIR','Transport par air',1),(45,1,'POS','Envois postaux',1),(46,1,'OLE','Installations de transport fixe (oléoduc)',1),(47,1,'NAV','Transport par navigation intérieure',1),(48,1,'PRO','Propulsion propre',1),(49,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(50,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(51,1,'ROU','Transport par route',1),(52,1,'AIR','Transport par air',1),(53,1,'POS','Envois postaux',1),(54,1,'OLE','Installations de transport fixe (oléoduc)',1),(55,1,'NAV','Transport par navigation intérieure',1),(56,1,'PRO','Propulsion propre',1),(57,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(58,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(59,1,'ROU','Transport par route',1),(60,1,'AIR','Transport par air',1),(61,1,'POS','Envois postaux',1),(62,1,'OLE','Installations de transport fixe (oléoduc)',1),(63,1,'NAV','Transport par navigation intérieure',1),(64,1,'PRO','Propulsion propre',1),(65,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(66,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(67,1,'ROU','Transport par route',1),(68,1,'AIR','Transport par air',1),(69,1,'POS','Envois postaux',1),(70,1,'OLE','Installations de transport fixe (oléoduc)',1),(71,1,'NAV','Transport par navigation intérieure',1),(72,1,'PRO','Propulsion propre',1),(73,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(74,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(75,1,'ROU','Transport par route',1),(76,1,'AIR','Transport par air',1),(77,1,'POS','Envois postaux',1),(78,1,'OLE','Installations de transport fixe (oléoduc)',1),(79,1,'NAV','Transport par navigation intérieure',1),(80,1,'PRO','Propulsion propre',1),(81,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(82,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(83,1,'ROU','Transport par route',1),(84,1,'AIR','Transport par air',1),(85,1,'POS','Envois postaux',1),(86,1,'OLE','Installations de transport fixe (oléoduc)',1),(87,1,'NAV','Transport par navigation intérieure',1),(88,1,'PRO','Propulsion propre',1),(89,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(90,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(91,1,'ROU','Transport par route',1),(92,1,'AIR','Transport par air',1),(93,1,'POS','Envois postaux',1),(94,1,'OLE','Installations de transport fixe (oléoduc)',1),(95,1,'NAV','Transport par navigation intérieure',1),(96,1,'PRO','Propulsion propre',1),(97,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(98,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(99,1,'ROU','Transport par route',1),(100,1,'AIR','Transport par air',1),(101,1,'POS','Envois postaux',1),(102,1,'OLE','Installations de transport fixe (oléoduc)',1),(103,1,'NAV','Transport par navigation intérieure',1),(104,1,'PRO','Propulsion propre',1),(105,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(106,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(107,1,'ROU','Transport par route',1),(108,1,'AIR','Transport par air',1),(109,1,'POS','Envois postaux',1),(110,1,'OLE','Installations de transport fixe (oléoduc)',1),(111,1,'NAV','Transport par navigation intérieure',1),(112,1,'PRO','Propulsion propre',1),(113,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(114,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(115,1,'ROU','Transport par route',1),(116,1,'AIR','Transport par air',1),(117,1,'POS','Envois postaux',1),(118,1,'OLE','Installations de transport fixe (oléoduc)',1),(119,1,'NAV','Transport par navigation intérieure',1),(120,1,'PRO','Propulsion propre',1),(121,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(122,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(123,1,'ROU','Transport par route',1),(124,1,'AIR','Transport par air',1),(125,1,'POS','Envois postaux',1),(126,1,'OLE','Installations de transport fixe (oléoduc)',1),(127,1,'NAV','Transport par navigation intérieure',1),(128,1,'PRO','Propulsion propre',1),(129,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(130,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(131,1,'ROU','Transport par route',1),(132,1,'AIR','Transport par air',1),(133,1,'POS','Envois postaux',1),(134,1,'OLE','Installations de transport fixe (oléoduc)',1),(135,1,'NAV','Transport par navigation intérieure',1),(136,1,'PRO','Propulsion propre',1),(137,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(138,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(139,1,'ROU','Transport par route',1),(140,1,'AIR','Transport par air',1),(141,1,'POS','Envois postaux',1),(142,1,'OLE','Installations de transport fixe (oléoduc)',1),(143,1,'NAV','Transport par navigation intérieure',1),(144,1,'PRO','Propulsion propre',1),(145,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(146,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(147,1,'ROU','Transport par route',1),(148,1,'AIR','Transport par air',1),(149,1,'POS','Envois postaux',1),(150,1,'OLE','Installations de transport fixe (oléoduc)',1),(151,1,'NAV','Transport par navigation intérieure',1),(152,1,'PRO','Propulsion propre',1),(153,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(154,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(155,1,'ROU','Transport par route',1),(156,1,'AIR','Transport par air',1),(157,1,'POS','Envois postaux',1),(158,1,'OLE','Installations de transport fixe (oléoduc)',1),(159,1,'NAV','Transport par navigation intérieure',1),(160,1,'PRO','Propulsion propre',1),(161,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(162,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(163,1,'ROU','Transport par route',1),(164,1,'AIR','Transport par air',1),(165,1,'POS','Envois postaux',1),(166,1,'OLE','Installations de transport fixe (oléoduc)',1),(167,1,'NAV','Transport par navigation intérieure',1),(168,1,'PRO','Propulsion propre',1),(169,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(170,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(171,1,'ROU','Transport par route',1),(172,1,'AIR','Transport par air',1),(173,1,'POS','Envois postaux',1),(174,1,'OLE','Installations de transport fixe (oléoduc)',1),(175,1,'NAV','Transport par navigation intérieure',1),(176,1,'PRO','Propulsion propre',1),(177,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(178,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(179,1,'ROU','Transport par route',1),(180,1,'AIR','Transport par air',1),(181,1,'POS','Envois postaux',1),(182,1,'OLE','Installations de transport fixe (oléoduc)',1),(183,1,'NAV','Transport par navigation intérieure',1),(184,1,'PRO','Propulsion propre',1),(185,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(186,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(187,1,'ROU','Transport par route',1),(188,1,'AIR','Transport par air',1),(189,1,'POS','Envois postaux',1),(190,1,'OLE','Installations de transport fixe (oléoduc)',1),(191,1,'NAV','Transport par navigation intérieure',1),(192,1,'PRO','Propulsion propre',1),(193,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(194,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(195,1,'ROU','Transport par route',1),(196,1,'AIR','Transport par air',1),(197,1,'POS','Envois postaux',1),(198,1,'OLE','Installations de transport fixe (oléoduc)',1),(199,1,'NAV','Transport par navigation intérieure',1),(200,1,'PRO','Propulsion propre',1),(201,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(202,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(203,1,'ROU','Transport par route',1),(204,1,'AIR','Transport par air',1),(205,1,'POS','Envois postaux',1),(206,1,'OLE','Installations de transport fixe (oléoduc)',1),(207,1,'NAV','Transport par navigation intérieure',1),(208,1,'PRO','Propulsion propre',1),(209,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(210,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(211,1,'ROU','Transport par route',1),(212,1,'AIR','Transport par air',1),(213,1,'POS','Envois postaux',1),(214,1,'OLE','Installations de transport fixe (oléoduc)',1),(215,1,'NAV','Transport par navigation intérieure',1),(216,1,'PRO','Propulsion propre',1),(217,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(218,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(219,1,'ROU','Transport par route',1),(220,1,'AIR','Transport par air',1),(221,1,'POS','Envois postaux',1),(222,1,'OLE','Installations de transport fixe (oléoduc)',1),(223,1,'NAV','Transport par navigation intérieure',1),(224,1,'PRO','Propulsion propre',1),(225,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(226,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(227,1,'ROU','Transport par route',1),(228,1,'AIR','Transport par air',1),(229,1,'POS','Envois postaux',1),(230,1,'OLE','Installations de transport fixe (oléoduc)',1),(231,1,'NAV','Transport par navigation intérieure',1),(232,1,'PRO','Propulsion propre',1),(233,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(234,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(235,1,'ROU','Transport par route',1),(236,1,'AIR','Transport par air',1),(237,1,'POS','Envois postaux',1),(238,1,'OLE','Installations de transport fixe (oléoduc)',1),(239,1,'NAV','Transport par navigation intérieure',1),(240,1,'PRO','Propulsion propre',1),(241,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(242,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(243,1,'ROU','Transport par route',1),(244,1,'AIR','Transport par air',1),(245,1,'POS','Envois postaux',1),(246,1,'OLE','Installations de transport fixe (oléoduc)',1),(247,1,'NAV','Transport par navigation intérieure',1),(248,1,'PRO','Propulsion propre',1),(249,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(250,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(251,1,'ROU','Transport par route',1),(252,1,'AIR','Transport par air',1),(253,1,'POS','Envois postaux',1),(254,1,'OLE','Installations de transport fixe (oléoduc)',1),(255,1,'NAV','Transport par navigation intérieure',1),(256,1,'PRO','Propulsion propre',1),(257,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(258,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(259,1,'ROU','Transport par route',1),(260,1,'AIR','Transport par air',1),(261,1,'POS','Envois postaux',1),(262,1,'OLE','Installations de transport fixe (oléoduc)',1),(263,1,'NAV','Transport par navigation intérieure',1),(264,1,'PRO','Propulsion propre',1),(265,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(266,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(267,1,'ROU','Transport par route',1),(268,1,'AIR','Transport par air',1),(269,1,'POS','Envois postaux',1),(270,1,'OLE','Installations de transport fixe (oléoduc)',1),(271,1,'NAV','Transport par navigation intérieure',1),(272,1,'PRO','Propulsion propre',1),(273,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(274,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(275,1,'ROU','Transport par route',1),(276,1,'AIR','Transport par air',1),(277,1,'POS','Envois postaux',1),(278,1,'OLE','Installations de transport fixe (oléoduc)',1),(279,1,'NAV','Transport par navigation intérieure',1),(280,1,'PRO','Propulsion propre',1),(281,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(282,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(283,1,'ROU','Transport par route',1),(284,1,'AIR','Transport par air',1),(285,1,'POS','Envois postaux',1),(286,1,'OLE','Installations de transport fixe (oléoduc)',1),(287,1,'NAV','Transport par navigation intérieure',1),(288,1,'PRO','Propulsion propre',1),(289,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(290,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(291,1,'ROU','Transport par route',1),(292,1,'AIR','Transport par air',1),(293,1,'POS','Envois postaux',1),(294,1,'OLE','Installations de transport fixe (oléoduc)',1),(295,1,'NAV','Transport par navigation intérieure',1),(296,1,'PRO','Propulsion propre',1),(297,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(298,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(299,1,'ROU','Transport par route',1),(300,1,'AIR','Transport par air',1),(301,1,'POS','Envois postaux',1),(302,1,'OLE','Installations de transport fixe (oléoduc)',1),(303,1,'NAV','Transport par navigation intérieure',1),(304,1,'PRO','Propulsion propre',1),(305,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(306,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(307,1,'ROU','Transport par route',1),(308,1,'AIR','Transport par air',1),(309,1,'POS','Envois postaux',1),(310,1,'OLE','Installations de transport fixe (oléoduc)',1),(311,1,'NAV','Transport par navigation intérieure',1),(312,1,'PRO','Propulsion propre',1),(313,1,'MAR','Transport maritime (y compris camions ou wagons sur bateau)',1),(314,1,'TRA','Transport par chemin de fer (y compris camions sur wagon)',1),(315,1,'ROU','Transport par route',1),(316,1,'AIR','Transport par air',1),(317,1,'POS','Envois postaux',1),(318,1,'OLE','Installations de transport fixe (oléoduc)',1),(319,1,'NAV','Transport par navigation intérieure',1),(320,1,'PRO','Propulsion propre',1); /*!40000 ALTER TABLE `llx_c_transport_mode` ENABLE KEYS */; UNLOCK TABLES; @@ -3476,7 +3140,7 @@ CREATE TABLE `llx_c_type_contact` ( LOCK TABLES `llx_c_type_contact` WRITE; /*!40000 ALTER TABLE `llx_c_type_contact` DISABLE KEYS */; -INSERT INTO `llx_c_type_contact` VALUES (10,'contrat','internal','SALESREPSIGN','Commercial signataire du contrat',1,NULL,0),(11,'contrat','internal','SALESREPFOLL','Commercial suivi du contrat',1,NULL,0),(20,'contrat','external','BILLING','Contact client facturation contrat',1,NULL,0),(21,'contrat','external','CUSTOMER','Contact client suivi contrat',1,NULL,0),(22,'contrat','external','SALESREPSIGN','Contact client signataire contrat',1,NULL,0),(31,'propal','internal','SALESREPFOLL','Commercial à l\'origine de la propale',1,NULL,0),(40,'propal','external','BILLING','Contact client facturation propale',1,NULL,0),(41,'propal','external','CUSTOMER','Contact client suivi propale',1,NULL,0),(42,'propal','external','SHIPPING','Customer contact for delivery',1,NULL,0),(50,'facture','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL,0),(60,'facture','external','BILLING','Contact client facturation',1,NULL,0),(61,'facture','external','SHIPPING','Contact client livraison',1,NULL,0),(62,'facture','external','SERVICE','Contact client prestation',1,NULL,0),(70,'invoice_supplier','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL,0),(71,'invoice_supplier','external','BILLING','Contact fournisseur facturation',1,NULL,0),(72,'invoice_supplier','external','SHIPPING','Contact fournisseur livraison',1,NULL,0),(73,'invoice_supplier','external','SERVICE','Contact fournisseur prestation',1,NULL,0),(80,'agenda','internal','ACTOR','Responsable',1,NULL,0),(81,'agenda','internal','GUEST','Guest',1,NULL,0),(85,'agenda','external','ACTOR','Responsable',1,NULL,0),(86,'agenda','external','GUEST','Guest',1,NULL,0),(91,'commande','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL,0),(100,'commande','external','BILLING','Contact client facturation commande',1,NULL,0),(101,'commande','external','CUSTOMER','Contact client suivi commande',1,NULL,0),(102,'commande','external','SHIPPING','Contact client livraison commande',1,NULL,0),(110,'supplier_proposal','internal','SALESREPFOLL','Responsable suivi de la demande',1,NULL,0),(111,'supplier_proposal','external','BILLING','Contact fournisseur facturation',1,NULL,0),(112,'supplier_proposal','external','SHIPPING','Contact fournisseur livraison',1,NULL,0),(113,'supplier_proposal','external','SERVICE','Contact fournisseur prestation',1,NULL,0),(120,'fichinter','internal','INTERREPFOLL','Responsable suivi de l\'intervention',1,NULL,0),(121,'fichinter','internal','INTERVENING','Intervenant',1,NULL,0),(130,'fichinter','external','BILLING','Contact client facturation intervention',1,NULL,0),(131,'fichinter','external','CUSTOMER','Contact client suivi de l\'intervention',1,NULL,0),(140,'order_supplier','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL,0),(141,'order_supplier','internal','SHIPPING','Responsable réception de la commande',1,NULL,0),(142,'order_supplier','external','BILLING','Contact fournisseur facturation commande',1,NULL,0),(143,'order_supplier','external','CUSTOMER','Contact fournisseur suivi commande',1,NULL,0),(145,'order_supplier','external','SHIPPING','Contact fournisseur livraison commande',1,NULL,0),(150,'dolresource','internal','USERINCHARGE','In charge of resource',1,NULL,0),(151,'dolresource','external','THIRDINCHARGE','In charge of resource',1,NULL,0),(155,'ticket','internal','SUPPORTTEC','Utilisateur contact support',1,NULL,0),(156,'ticket','internal','CONTRIBUTOR','Intervenant',1,NULL,0),(157,'ticket','external','SUPPORTCLI','Contact client suivi incident',1,NULL,0),(158,'ticket','external','CONTRIBUTOR','Intervenant',1,NULL,0),(160,'project','internal','PROJECTLEADER','Chef de Projet',1,NULL,0),(161,'project','internal','PROJECTCONTRIBUTOR','Intervenant',1,NULL,0),(170,'project','external','PROJECTLEADER','Chef de Projet',1,NULL,0),(171,'project','external','PROJECTCONTRIBUTOR','Intervenant',1,NULL,0),(180,'project_task','internal','TASKEXECUTIVE','Responsable',1,NULL,0),(181,'project_task','internal','TASKCONTRIBUTOR','Intervenant',1,NULL,0),(190,'project_task','external','TASKEXECUTIVE','Responsable',1,NULL,0),(191,'project_task','external','TASKCONTRIBUTOR','Intervenant',1,NULL,0),(200,'societe','external','GENERALREF','Généraliste (référent)',0,'cabinetmed',0),(201,'societe','external','GENERALISTE','Généraliste',0,'cabinetmed',0),(210,'societe','external','SPECCHIROR','Chirurgien ortho',0,'cabinetmed',0),(211,'societe','external','SPECCHIROT','Chirurgien autre',0,'cabinetmed',0),(220,'societe','external','SPECDERMA','Dermatologue',0,'cabinetmed',0),(225,'societe','external','SPECENDOC','Endocrinologue',0,'cabinetmed',0),(230,'societe','external','SPECGYNECO','Gynécologue',0,'cabinetmed',0),(240,'societe','external','SPECGASTRO','Gastroantérologue',0,'cabinetmed',0),(245,'societe','external','SPECINTERNE','Interniste',0,'cabinetmed',0),(250,'societe','external','SPECCARDIO','Cardiologue',0,'cabinetmed',0),(260,'societe','external','SPECNEPHRO','Néphrologue',0,'cabinetmed',0),(263,'societe','external','SPECPNEUMO','Pneumologue',0,'cabinetmed',0),(265,'societe','external','SPECNEURO','Neurologue',0,'cabinetmed',0),(270,'societe','external','SPECRHUMATO','Rhumatologue',0,'cabinetmed',0),(280,'societe','external','KINE','Kinésithérapeute',0,'cabinetmed',0); +INSERT INTO `llx_c_type_contact` VALUES (10,'contrat','internal','SALESREPSIGN','Commercial signataire du contrat',1,NULL,0),(11,'contrat','internal','SALESREPFOLL','Commercial suivi du contrat',1,NULL,0),(20,'contrat','external','BILLING','Contact client facturation contrat',1,NULL,0),(21,'contrat','external','CUSTOMER','Contact client suivi contrat',1,NULL,0),(22,'contrat','external','SALESREPSIGN','Contact client signataire contrat',1,NULL,0),(31,'propal','internal','SALESREPFOLL','Commercial à l\'origine de la propale',1,NULL,0),(40,'propal','external','BILLING','Contact client facturation propale',1,NULL,0),(41,'propal','external','CUSTOMER','Contact client suivi propale',1,NULL,0),(42,'propal','external','SHIPPING','Customer contact for delivery',1,NULL,0),(50,'facture','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL,0),(60,'facture','external','BILLING','Contact client facturation',1,NULL,0),(61,'facture','external','SHIPPING','Contact client livraison',1,NULL,0),(62,'facture','external','SERVICE','Contact client prestation',1,NULL,0),(70,'invoice_supplier','internal','SALESREPFOLL','Responsable suivi du paiement',1,NULL,0),(71,'invoice_supplier','external','BILLING','Contact fournisseur facturation',1,NULL,0),(72,'invoice_supplier','external','SHIPPING','Contact fournisseur livraison',1,NULL,0),(73,'invoice_supplier','external','SERVICE','Contact fournisseur prestation',1,NULL,0),(80,'agenda','internal','ACTOR','Responsable',1,NULL,0),(81,'agenda','internal','GUEST','Guest',1,NULL,0),(85,'agenda','external','ACTOR','Responsable',1,NULL,0),(86,'agenda','external','GUEST','Guest',1,NULL,0),(91,'commande','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL,0),(100,'commande','external','BILLING','Contact client facturation commande',1,NULL,0),(101,'commande','external','CUSTOMER','Contact client suivi commande',1,NULL,0),(102,'commande','external','SHIPPING','Contact client livraison commande',1,NULL,0),(110,'supplier_proposal','internal','SALESREPFOLL','Responsable suivi de la demande',1,NULL,0),(111,'supplier_proposal','external','BILLING','Contact fournisseur facturation',1,NULL,0),(112,'supplier_proposal','external','SHIPPING','Contact fournisseur livraison',1,NULL,0),(113,'supplier_proposal','external','SERVICE','Contact fournisseur prestation',1,NULL,0),(120,'fichinter','internal','INTERREPFOLL','Responsable suivi de l\'intervention',1,NULL,0),(121,'fichinter','internal','INTERVENING','Intervenant',1,NULL,0),(130,'fichinter','external','BILLING','Contact client facturation intervention',1,NULL,0),(131,'fichinter','external','CUSTOMER','Contact client suivi de l\'intervention',1,NULL,0),(140,'order_supplier','internal','SALESREPFOLL','Responsable suivi de la commande',1,NULL,0),(141,'order_supplier','internal','SHIPPING','Responsable réception de la commande',1,NULL,0),(142,'order_supplier','external','BILLING','Contact fournisseur facturation commande',1,NULL,0),(143,'order_supplier','external','CUSTOMER','Contact fournisseur suivi commande',1,NULL,0),(145,'order_supplier','external','SHIPPING','Contact fournisseur livraison commande',1,NULL,0),(150,'dolresource','internal','USERINCHARGE','In charge of resource',1,NULL,0),(151,'dolresource','external','THIRDINCHARGE','In charge of resource',1,NULL,0),(155,'ticket','internal','SUPPORTTEC','Utilisateur contact support',1,NULL,0),(156,'ticket','internal','CONTRIBUTOR','Intervenant',1,NULL,0),(157,'ticket','external','SUPPORTCLI','Contact client suivi incident',1,NULL,0),(158,'ticket','external','CONTRIBUTOR','Intervenant',1,NULL,0),(160,'project','internal','PROJECTLEADER','Chef de Projet',1,NULL,0),(161,'project','internal','PROJECTCONTRIBUTOR','Intervenant',1,NULL,0),(170,'project','external','PROJECTLEADER','Chef de Projet',1,NULL,0),(171,'project','external','PROJECTCONTRIBUTOR','Intervenant',1,NULL,0),(180,'project_task','internal','TASKEXECUTIVE','Responsable',1,NULL,0),(181,'project_task','internal','TASKCONTRIBUTOR','Intervenant',1,NULL,0),(190,'project_task','external','TASKEXECUTIVE','Responsable',1,NULL,0),(191,'project_task','external','TASKCONTRIBUTOR','Intervenant',1,NULL,0),(200,'societe','external','GENERALREF','Généraliste (référent)',0,'cabinetmed',0),(201,'societe','external','GENERALISTE','Généraliste',0,'cabinetmed',0),(210,'societe','external','SPECCHIROR','Chirurgien ortho',0,'cabinetmed',0),(211,'societe','external','SPECCHIROT','Chirurgien autre',0,'cabinetmed',0),(212,'conferenceorbooth','external','RESPONSIBLE','Booth responsible',1,NULL,0),(220,'societe','external','SPECDERMA','Dermatologue',0,'cabinetmed',0),(225,'societe','external','SPECENDOC','Endocrinologue',0,'cabinetmed',0),(230,'societe','external','SPECGYNECO','Gynécologue',0,'cabinetmed',0),(240,'societe','external','SPECGASTRO','Gastroantérologue',0,'cabinetmed',0),(245,'societe','external','SPECINTERNE','Interniste',0,'cabinetmed',0),(250,'societe','external','SPECCARDIO','Cardiologue',0,'cabinetmed',0),(260,'societe','external','SPECNEPHRO','Néphrologue',0,'cabinetmed',0),(263,'societe','external','SPECPNEUMO','Pneumologue',0,'cabinetmed',0),(265,'societe','external','SPECNEURO','Neurologue',0,'cabinetmed',0),(270,'societe','external','SPECRHUMATO','Rhumatologue',0,'cabinetmed',0),(280,'societe','external','KINE','Kinésithérapeute',0,'cabinetmed',0); /*!40000 ALTER TABLE `llx_c_type_contact` ENABLE KEYS */; UNLOCK TABLES; @@ -3593,7 +3257,7 @@ CREATE TABLE `llx_c_typent` ( LOCK TABLES `llx_c_typent` WRITE; /*!40000 ALTER TABLE `llx_c_typent` DISABLE KEYS */; -INSERT INTO `llx_c_typent` VALUES (0,'TE_UNKNOWN','-',NULL,1,NULL,0),(1,'TE_STARTUP','Start-up',NULL,1,NULL,0),(2,'TE_GROUP','Grand groupe',NULL,1,NULL,0),(3,'TE_MEDIUM','PME/PMI',NULL,1,NULL,0),(4,'TE_SMALL','TPE',NULL,1,NULL,0),(5,'TE_ADMIN','Administration',NULL,1,NULL,0),(6,'TE_WHOLE','Grossiste',NULL,1,NULL,0),(7,'TE_RETAIL','Revendeur',NULL,1,NULL,0),(8,'TE_PRIVATE','Particulier',NULL,1,NULL,0),(100,'TE_OTHER','Autres',NULL,1,NULL,0),(101,'TE_HOMME','Homme',NULL,0,'cabinetmed',0),(102,'TE_FEMME','Femme',NULL,0,'cabinetmed',0),(231,'TE_A_RI','Responsable Inscripto',23,1,NULL,0),(232,'TE_B_RNI','Responsable No Inscripto',23,1,NULL,0),(233,'TE_C_FE','Consumidor Final/Exento',23,1,NULL,0); +INSERT INTO `llx_c_typent` VALUES (1,'TE_STARTUP','Start-up',NULL,1,NULL,0),(2,'TE_GROUP','Grand groupe',NULL,1,NULL,0),(3,'TE_MEDIUM','PME/PMI',NULL,1,NULL,0),(4,'TE_SMALL','TPE',NULL,1,NULL,0),(5,'TE_ADMIN','Administration',NULL,1,NULL,0),(6,'TE_WHOLE','Grossiste',NULL,1,NULL,0),(7,'TE_RETAIL','Revendeur',NULL,1,NULL,0),(8,'TE_PRIVATE','Particulier',NULL,1,NULL,0),(100,'TE_OTHER','Autres',NULL,1,NULL,0),(101,'TE_HOMME','Homme',NULL,0,'cabinetmed',0),(102,'TE_FEMME','Femme',NULL,0,'cabinetmed',0),(231,'TE_A_RI','Responsable Inscripto',23,1,NULL,0),(232,'TE_B_RNI','Responsable No Inscripto',23,1,NULL,0),(233,'TE_C_FE','Consumidor Final/Exento',23,1,NULL,0); /*!40000 ALTER TABLE `llx_c_typent` ENABLE KEYS */; UNLOCK TABLES; @@ -4201,7 +3865,7 @@ CREATE TABLE `llx_categorie` ( UNIQUE KEY `uk_categorie_ref` (`entity`,`fk_parent`,`label`,`type`), KEY `idx_categorie_type` (`type`), KEY `idx_categorie_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4210,7 +3874,7 @@ CREATE TABLE `llx_categorie` ( LOCK TABLES `llx_categorie` WRITE; /*!40000 ALTER TABLE `llx_categorie` DISABLE KEYS */; -INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f','',NULL,'2020-06-12 17:12:24',NULL,NULL),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00','',NULL,'2020-06-12 17:12:24',NULL,NULL),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(38,0,'Main center',9,1,'',NULL,0,NULL,'bf5f00',NULL,'2020-06-12 19:17:30','2020-06-12 17:17:30',12,NULL),(39,0,'Center B',9,1,'Center B',NULL,0,NULL,'ff7f00',NULL,'2020-06-12 19:17:55','2020-06-12 17:17:55',12,NULL); +INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL,'005fbf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(4,0,'Merchant',1,1,'Category dedicated to merchant third parties',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL,'7f7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL,'7f0000',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL,'bf5f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL,'7f007f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL,'5fbf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL,'bf00bf',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(18,0,'Met during meeting',4,1,'',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL,'bf005f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL,'ff7f00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL,NULL,NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(26,28,'Friends',4,1,'Category of friends contact',NULL,0,NULL,'00bf00',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(27,28,'Family',4,1,'Category of family contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(28,0,'Personal contacts',4,1,'For personal contacts',NULL,0,NULL,'007f3f',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(29,0,'Online only merchant',1,1,'',NULL,0,NULL,'aaaaff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(30,0,'Important',6,1,'Tag for important project',NULL,0,NULL,'7f003f','',NULL,'2020-06-12 17:12:24',NULL,NULL),(31,0,'POS Products',0,1,'All products available in store (POS)',NULL,0,NULL,'5f00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(32,31,'Fruits',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(33,31,'Vegetables',0,1,'',NULL,0,NULL,'aa56ff','',NULL,'2020-06-12 17:12:24',NULL,NULL),(34,31,'Pies',0,1,'Categories for Pies available on POS',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(35,31,'Other',0,1,'',NULL,0,NULL,'aa56ff',NULL,NULL,'2020-06-12 17:12:24',NULL,NULL),(36,0,'VIP',3,1,'VIP member',NULL,0,NULL,'007f00','',NULL,'2020-06-12 17:12:24',NULL,NULL),(37,0,'Board members',3,1,'',NULL,0,NULL,'bf00bf','',NULL,'2020-06-12 17:12:24',NULL,NULL),(38,0,'Main center',9,1,'',NULL,0,NULL,'bf5f00',NULL,'2020-06-12 19:17:30','2020-06-12 17:17:30',12,NULL),(39,0,'Center B',9,1,'Center B',NULL,0,NULL,'ff7f00',NULL,'2020-06-12 19:17:55','2020-06-12 17:17:55',12,NULL),(40,0,'Bank foreign',5,1,'',NULL,0,NULL,'00bfbf',NULL,'2021-04-15 10:26:42','2021-04-15 13:26:42',12,NULL),(41,0,'Bank old company',5,1,'',NULL,0,NULL,'7f7f00',NULL,'2021-04-15 10:26:52','2021-04-15 13:26:52',12,NULL),(42,0,'Event Urgent',10,1,'',NULL,0,NULL,'7f003f',NULL,'2021-04-15 10:42:53','2021-04-15 13:42:53',12,NULL),(43,0,'Event hidden',10,1,'',NULL,0,NULL,'cccccc',NULL,'2021-04-15 10:43:06','2021-04-15 13:43:06',12,NULL),(44,0,'Event Managers',10,1,'',NULL,0,NULL,'007f7f',NULL,'2021-04-15 10:43:34','2021-04-15 13:43:34',12,NULL); /*!40000 ALTER TABLE `llx_categorie` ENABLE KEYS */; UNLOCK TABLES; @@ -4239,6 +3903,7 @@ CREATE TABLE `llx_categorie_account` ( LOCK TABLES `llx_categorie_account` WRITE; /*!40000 ALTER TABLE `llx_categorie_account` DISABLE KEYS */; +INSERT INTO `llx_categorie_account` VALUES (41,4,NULL); /*!40000 ALTER TABLE `llx_categorie_account` ENABLE KEYS */; UNLOCK TABLES; @@ -4637,6 +4302,7 @@ CREATE TABLE `llx_chargesociales` ( `fk_user_valid` int(11) DEFAULT NULL, `ref` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, + `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -4647,7 +4313,7 @@ CREATE TABLE `llx_chargesociales` ( LOCK TABLES `llx_chargesociales` WRITE; /*!40000 ALTER TABLE `llx_chargesociales` DISABLE KEYS */; -INSERT INTO `llx_chargesociales` VALUES (4,'2013-08-09 00:00:00','fff',1,60,NULL,NULL,10.00000000,1,'2013-08-01','2019-09-26 11:33:19','2014-12-08 14:11:10',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2019-12-10 00:00:00','gdfgdf',1,60,NULL,NULL,10.00000000,0,'2019-12-10','2019-12-25 21:46:17','2019-12-26 01:46:17',NULL,NULL,12,NULL,NULL,NULL,NULL),(6,'2019-12-10 00:00:00','gdfgdf',1,60,NULL,NULL,10.00000000,1,'2019-12-10','2019-12-25 21:48:46','2019-12-26 01:48:12',NULL,NULL,12,NULL,NULL,NULL,NULL); +INSERT INTO `llx_chargesociales` VALUES (4,'2013-08-09 00:00:00','fff',1,60,NULL,NULL,10.00000000,1,'2013-08-01','2019-09-26 11:33:19','2014-12-08 14:11:10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2019-12-10 00:00:00','gdfgdf',1,60,NULL,NULL,10.00000000,0,'2019-12-10','2019-12-25 21:46:17','2019-12-26 01:46:17',NULL,NULL,12,NULL,NULL,NULL,NULL,NULL),(6,'2019-12-10 00:00:00','gdfgdf',1,60,NULL,NULL,10.00000000,1,'2019-12-10','2019-12-25 21:48:46','2019-12-26 01:48:12',NULL,NULL,12,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_chargesociales` ENABLE KEYS */; UNLOCK TABLES; @@ -4682,7 +4348,7 @@ CREATE TABLE `llx_commande` ( `remise_percent` double DEFAULT 0, `remise_absolue` double DEFAULT 0, `remise` double DEFAULT 0, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, `total_ht` double(24,8) DEFAULT 0.00000000, @@ -4737,7 +4403,7 @@ CREATE TABLE `llx_commande` ( LOCK TABLES `llx_commande` WRITE; /*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; -INSERT INTO `llx_commande` VALUES (1,'2020-12-10 12:24:22',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2020-08-08 13:59:09',NULL,'2020-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2020-12-10 12:24:22',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2020-02-12 17:06:51',NULL,'2020-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2020-12-10 12:24:22',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2020-02-17 18:27:56',NULL,'2020-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2020-12-10 12:24:22',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2020-08-08 03:04:21',NULL,'2020-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2020-06-12 17:12:08',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2020-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2020-06-12 17:12:08',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2019-02-15 23:50:34',NULL,'2020-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2020-06-12 17:12:08',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2020-02-15 23:51:23',NULL,'2020-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2020-06-12 17:12:08',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2019-02-15 23:55:52',NULL,'2020-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2020-06-12 17:12:08',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2020-02-16 00:03:44',NULL,'2020-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2020-06-12 17:12:08',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2020-02-16 00:05:01',NULL,'2020-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2020-06-12 17:12:08',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2020-02-16 00:05:01',NULL,'2020-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2020-06-12 17:12:08',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2020-02-16 00:05:11',NULL,'2020-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2020-06-12 17:12:08',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2020-12-10 12:24:22',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2020-12-10 12:24:22',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2020-06-12 17:12:08',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2020-02-16 00:05:26',NULL,'2019-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2020-06-12 17:12:08',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2019-02-16 00:05:26','2019-02-16 03:05:56','2020-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2020-12-10 12:24:22',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2020-02-16 00:05:26',NULL,'2020-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2020-06-12 17:12:08',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2019-02-16 00:05:35','2020-12-20 20:48:55','2020-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2020-06-12 17:12:08',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2019-02-16 00:05:35',NULL,'2020-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2020-12-10 12:24:22',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2020-02-16 00:05:36','2021-01-16 02:42:56','2020-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2020-06-12 17:12:08',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2019-02-16 04:14:20',NULL,'2020-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2020-12-10 12:24:22',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2020-02-16 00:05:37',NULL,'2020-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2020-12-10 12:24:22',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2020-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2020-06-12 17:12:08',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2020-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2020-12-10 12:24:22',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2020-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2020-06-12 17:12:08',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-02-16 00:05:38',NULL,'2020-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2020-01-15 18:41:17',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2019-12-20 20:42:42',NULL,'2019-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2020-06-12 17:12:08',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2020-06-12 17:12:08',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2020-06-12 17:12:08',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2020-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2020-12-10 12:24:22',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2020-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2019-12-20 16:49:54',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2019-12-20 16:50:23',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2019-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2020-01-07 19:39:09',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2020-01-07 19:43:06',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2020-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2020-01-19 13:22:34',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2020-01-19 13:24:27',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2020-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); +INSERT INTO `llx_commande` VALUES (1,'2020-12-10 12:24:22',1,NULL,'CO1107-0002',1,NULL,NULL,'','2013-07-20 15:23:12','2020-08-08 13:59:09',NULL,'2020-07-20',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'2020-12-10 12:24:22',1,NULL,'CO1107-0003',1,NULL,NULL,'','2013-07-20 23:20:12','2020-02-12 17:06:51',NULL,'2020-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'2020-12-10 12:24:22',1,NULL,'CO1107-0004',1,NULL,NULL,'','2013-07-20 23:22:53','2020-02-17 18:27:56',NULL,'2020-07-21',1,NULL,1,NULL,NULL,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(5,'2020-12-10 12:24:22',1,NULL,'CO1108-0001',1,NULL,NULL,'','2013-08-08 03:04:11','2020-08-08 03:04:21',NULL,'2020-08-08',1,NULL,1,NULL,NULL,2,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(6,'2021-04-15 10:22:31',19,NULL,'(PROV6)',1,NULL,NULL,'','2015-02-17 16:22:14',NULL,NULL,'2021-02-17',1,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV6)/(PROV6).pdf',NULL,NULL),(17,'2020-06-12 17:12:08',4,NULL,'CO7001-0005',1,NULL,NULL,NULL,'2017-02-15 23:50:34','2019-02-15 23:50:34',NULL,'2020-05-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,509.00000000,509.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,509.00000000,0.00000000,509.00000000,NULL,NULL,NULL),(18,'2021-04-15 10:22:31',7,4,'CO7001-0006',1,NULL,NULL,NULL,'2017-02-15 23:51:23','2021-02-15 23:51:23',NULL,'2021-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,900.00000000,900.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL,NULL,NULL),(20,'2021-04-15 10:22:31',4,NULL,'CO7001-0007',1,NULL,NULL,NULL,'2017-02-15 23:55:52','2020-02-15 23:55:52',NULL,'2021-04-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,330.00000000,330.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,330.00000000,0.00000000,330.00000000,NULL,NULL,NULL),(29,'2021-04-15 10:22:31',4,NULL,'CO7001-0008',1,NULL,NULL,NULL,'2017-02-16 00:03:44','2021-02-16 00:03:44',NULL,'2021-02-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,457.00000000,457.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,457.00000000,0.00000000,457.00000000,NULL,NULL,NULL),(34,'2021-04-15 10:22:31',11,NULL,'CO7001-0009',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2021-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,124.00000000,124.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,124.00000000,0.00000000,124.00000000,NULL,NULL,NULL),(38,'2021-04-15 10:22:31',3,NULL,'CO7001-0010',1,NULL,NULL,NULL,'2017-02-16 00:05:01','2021-02-16 00:05:01',NULL,'2021-02-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL,NULL,NULL),(40,'2021-04-15 10:22:31',11,NULL,'CO7001-0011',1,NULL,NULL,NULL,'2017-02-16 00:05:10','2021-02-16 00:05:11',NULL,'2021-01-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1210.00000000,1210.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1210.00000000,0.00000000,1210.00000000,NULL,NULL,NULL),(43,'2021-04-15 10:22:31',10,NULL,'CO7001-0012',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2021-02-16 00:05:11',NULL,'2021-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,478.00000000,478.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,478.00000000,0.00000000,478.00000000,NULL,NULL,NULL),(47,'2020-12-10 12:24:22',1,NULL,'CO7001-0013',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-11-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,55.00000000,55.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,55.00000000,0.00000000,55.00000000,NULL,NULL,NULL),(48,'2020-12-10 12:24:22',4,NULL,'CO7001-0014',1,NULL,NULL,NULL,'2017-02-16 00:05:11','2020-02-16 00:05:11',NULL,'2020-07-30',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,540.00000000,540.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,540.00000000,0.00000000,540.00000000,NULL,NULL,NULL),(50,'2021-04-15 10:22:31',1,NULL,'CO7001-0015',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2021-02-16 00:05:26',NULL,'2020-12-12',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,118.00000000,118.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,118.00000000,0.00000000,118.00000000,NULL,NULL,NULL),(54,'2020-06-12 17:12:08',12,NULL,'CO7001-0016',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2019-02-16 00:05:26','2019-02-16 03:05:56','2020-06-03',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,220.00000000,220.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,220.00000000,0.00000000,220.00000000,NULL,NULL,NULL),(58,'2020-12-10 12:24:22',1,NULL,'CO7001-0017',1,NULL,NULL,NULL,'2017-02-16 00:05:26','2020-02-16 00:05:26',NULL,'2020-07-23',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,436.00000000,436.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,436.00000000,0.00000000,436.00000000,NULL,NULL,NULL),(62,'2021-04-15 10:22:31',19,NULL,'CO7001-0018',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2020-02-16 00:05:35','2020-12-20 20:48:55','2021-02-23',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL),(68,'2020-06-12 17:12:08',3,NULL,'CO7001-0019',1,NULL,NULL,NULL,'2017-02-16 00:05:35','2019-02-16 00:05:35',NULL,'2020-05-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,45.00000000,45.00000000,'','','',0,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,45.00000000,0.00000000,45.00000000,NULL,NULL,NULL),(72,'2020-12-10 12:24:22',6,NULL,'CO7001-0020',1,NULL,NULL,NULL,'2017-02-16 00:05:36','2020-02-16 00:05:36','2021-01-16 02:42:56','2020-11-13',12,NULL,12,12,1,3,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,610.00000000,610.00000000,'','','',1,NULL,NULL,NULL,NULL,NULL,2,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,610.00000000,0.00000000,610.00000000,NULL,NULL,NULL),(75,'2021-04-15 10:22:31',4,NULL,'CO7001-0021',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2020-02-16 04:14:20',NULL,'2021-02-13',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,25.00000000,49.88000000,0.00000000,1200.00000000,1274.88000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,25.00000000,1274.88000000,NULL,NULL,NULL),(78,'2020-12-10 12:24:22',12,NULL,'CO7001-0022',1,NULL,NULL,NULL,'2017-02-16 00:05:37','2020-02-16 00:05:37',NULL,'2020-10-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,928.00000000,928.00000000,'','','',0,NULL,NULL,2,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,928.00000000,0.00000000,928.00000000,NULL,NULL,NULL),(81,'2020-12-10 12:24:22',11,NULL,'CO7001-0023',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2020-07-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,725.00000000,725.00000000,'','','',0,NULL,NULL,2,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,725.00000000,0.00000000,725.00000000,NULL,NULL,NULL),(83,'2021-04-15 10:22:31',26,NULL,'CO7001-0024',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2021-04-03',12,NULL,12,NULL,1,-1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,105.00000000,105.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,1,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,105.00000000,0.00000000,105.00000000,NULL,NULL,NULL),(84,'2020-12-10 12:24:22',2,NULL,'CO7001-0025',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2020-06-19',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,510.00000000,510.00000000,'','','',0,NULL,NULL,1,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,510.00000000,0.00000000,510.00000000,NULL,NULL,NULL),(85,'2021-04-15 10:22:31',1,NULL,'CO7001-0026',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-02-16 00:05:38',NULL,'2021-01-03',12,NULL,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,47.00000000,47.00000000,'','','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,47.00000000,0.00000000,47.00000000,NULL,NULL,NULL),(88,'2021-04-15 10:22:31',10,NULL,'CO7001-0027',1,NULL,NULL,NULL,'2017-02-16 00:05:38','2020-12-20 20:42:42',NULL,'2020-12-23',12,12,12,NULL,1,1,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,'This is a private note','This is a public note','',0,NULL,NULL,1,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,'commande/CO7001-0027/CO7001-0027.pdf',NULL,NULL),(90,'2021-04-15 10:22:31',19,NULL,'(PROV90)',1,NULL,NULL,NULL,'2017-02-16 04:46:31',NULL,NULL,'2021-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,440.00000000,440.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL,NULL,NULL),(91,'2021-04-15 10:22:31',1,NULL,'(PROV91)',1,NULL,NULL,NULL,'2017-02-16 04:46:37',NULL,NULL,'2021-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(92,'2021-04-15 10:22:31',3,NULL,'(PROV92)',1,NULL,NULL,NULL,'2017-02-16 04:47:25',NULL,NULL,'2021-02-16',12,NULL,NULL,NULL,NULL,0,0.00000000,0,NULL,0,0.00000000,0.00000000,0.00000000,1018.00000000,1018.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL,NULL,NULL),(93,'2020-12-10 12:24:22',10,NULL,'(PROV93)',1,NULL,NULL,NULL,'2019-09-27 19:32:53',NULL,NULL,'2020-09-27',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'commande/(PROV93)/(PROV93).pdf',NULL,NULL),(94,'2021-04-15 10:22:31',1,NULL,'(PROV94)',1,NULL,NULL,NULL,'2019-12-20 20:49:54',NULL,NULL,'2020-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(95,'2021-04-15 10:22:31',1,NULL,'(PROV95)',1,NULL,NULL,NULL,'2019-12-20 20:50:23',NULL,NULL,'2020-12-20',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,1000.00000000,1000.00000000,'','','',0,NULL,NULL,3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,NULL,NULL,NULL),(96,'2021-04-15 10:22:31',10,6,'(PROV96)',1,NULL,NULL,NULL,'2020-01-07 23:39:09',NULL,NULL,'2021-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(97,'2021-04-15 10:22:31',10,6,'(PROV97)',1,NULL,NULL,NULL,'2020-01-07 23:43:06',NULL,NULL,'2021-01-07',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'aaa','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,NULL,NULL,NULL),(98,'2021-04-15 10:22:31',1,NULL,'(PROV98)',1,NULL,NULL,NULL,'2020-01-19 14:22:34',NULL,NULL,'2021-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.00000000,0.45000000,0.45000000,3.00000000,3.90000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,3.00000000,0.00000000,3.90000000,NULL,NULL,NULL),(99,'2021-04-15 10:22:31',1,NULL,'(PROV99)',1,NULL,NULL,NULL,'2020-01-19 14:24:27',NULL,NULL,'2021-01-19',12,NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,0.24000000,0.00000000,0.00000000,4.00000000,4.24000000,'','','',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'',0,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; UNLOCK TABLES; @@ -4800,7 +4466,7 @@ CREATE TABLE `llx_commande_fournisseur` ( `amount_ht` double(24,8) DEFAULT NULL, `remise_percent` double DEFAULT 0, `remise` double DEFAULT 0, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, `total_ht` double(24,8) DEFAULT 0.00000000, @@ -4838,7 +4504,7 @@ CREATE TABLE `llx_commande_fournisseur` ( LOCK TABLES `llx_commande_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseur` VALUES (1,'2020-06-12 17:12:08',13,'CF1007-0001',1,NULL,NULL,NULL,'2020-07-11 17:13:40','2020-02-01 18:51:42','2020-02-01 18:52:04',NULL,'2020-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2020-12-10 12:24:23',1,'CF1007-0002',1,NULL,NULL,NULL,'2020-07-11 18:46:28','2020-07-11 18:47:33',NULL,NULL,'2020-07-11',1,NULL,1,NULL,NULL,0,3,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2020-06-12 17:12:09',1,'CF1303-0004',1,NULL,NULL,NULL,'2020-03-09 19:39:18','2020-03-09 19:39:27','2020-03-09 19:39:32',NULL,'2020-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); +INSERT INTO `llx_commande_fournisseur` VALUES (1,'2021-04-15 10:22:31',13,'CF1007-0001',1,NULL,NULL,NULL,'2020-07-11 17:13:40','2021-02-01 18:51:42','2021-02-01 18:52:04',NULL,'2021-02-01',1,NULL,12,12,NULL,0,5,0,0.00000000,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,'2021-04-15 11:40:18',1,'CF1007-0002',1,NULL,NULL,NULL,'2020-07-11 18:46:28','2020-07-11 18:47:33',NULL,NULL,'2020-07-11',1,NULL,1,NULL,NULL,0,4,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,'2020-01-20 11:22:53',17,'(PROV3)',1,NULL,NULL,NULL,'2013-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,1079.17000000,1079.17000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',1.20000000,1295.00000000,0.00000000,1295.00000000,NULL),(4,'2020-01-20 11:19:49',17,'(PROV4)',1,NULL,NULL,NULL,'2013-08-04 23:19:32',NULL,NULL,NULL,NULL,1,12,NULL,NULL,NULL,0,0,0,0.00000000,0,0,11.88000000,0.00000000,0.00000000,174.17000000,186.05000000,'Private note','Public note','muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'EUR',1.00000000,174.17000000,11.88000000,186.05000000,NULL),(13,'2021-04-15 10:22:31',1,'CF1303-0004',1,NULL,NULL,NULL,'2021-03-09 19:39:18','2021-03-09 19:39:27','2021-03-09 19:39:32',NULL,'2021-03-09',1,NULL,1,1,NULL,0,2,0,0.00000000,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(14,'2020-01-20 11:20:11',1,'(PROV14)',1,NULL,'',NULL,'2020-01-20 12:20:11',NULL,NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,0,NULL,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'','','muscadet',0,1,NULL,NULL,NULL,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL); /*!40000 ALTER TABLE `llx_commande_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -4868,7 +4534,7 @@ CREATE TABLE `llx_commande_fournisseur_dispatch` ( `fk_reception` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_commande_fournisseur_dispatch_fk_commande` (`fk_commande`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4877,6 +4543,7 @@ CREATE TABLE `llx_commande_fournisseur_dispatch` ( LOCK TABLES `llx_commande_fournisseur_dispatch` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseur_dispatch` DISABLE KEYS */; +INSERT INTO `llx_commande_fournisseur_dispatch` VALUES (1,2,4,2,1,20,12,'2021-04-15 08:40:04','',1,'2021-04-15 11:40:04','Lot 2021-02',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_commande_fournisseur_dispatch` ENABLE KEYS */; UNLOCK TABLES; @@ -5271,7 +4938,7 @@ CREATE TABLE `llx_const` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=8646 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=8878 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5280,7 +4947,7 @@ CREATE TABLE `llx_const` ( LOCK TABLES `llx_const` WRITE; /*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; -INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','html',0,'Mail de validation','2018-11-23 11:56:07'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2012-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'DELIVERY_ADDON_NUMBER',1,'mod_delivery_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2020-12-10 12:24:40'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-07-08 11:28:53'),(249,'DON_FORM',1,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.mydomain.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'ABCDEFWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2015-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2018-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5963,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6054,'SYSLOG_LEVEL',0,'7','chaine',0,'','2017-02-15 22:37:21'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6569,'MAIN_MODULE_STRIPE',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:28:17'),(6632,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:15:29'),(6635,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'8;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7032,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:49:41'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'),(7122,'BOM_ADDON_PDF',1,'generic_bom_odt','chaine',0,'','2019-11-28 14:00:58'),(7195,'MAIN_AGENDA_ACTIONAUTO_MO_VALIDATE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7196,'MAIN_AGENDA_ACTIONAUTO_MO_PRODUCED',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7197,'MAIN_AGENDA_ACTIONAUTO_MO_DELETE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7198,'MAIN_AGENDA_ACTIONAUTO_MO_CANCEL',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7201,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'MyBigCompany public interface for Ticket','chaine',0,'','2019-11-29 08:49:36'),(7202,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-11-29 08:49:36'),(7203,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-11-29 08:49:36'),(7204,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-11-29 08:49:36'),(7209,'MAIN_MODULE_MRP',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-11-29 08:57:42'),(7210,'MAIN_MODULE_MRP_TRIGGERS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7211,'MAIN_MODULE_MRP_LOGIN',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7212,'MAIN_MODULE_MRP_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7213,'MAIN_MODULE_MRP_MENUS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7214,'MAIN_MODULE_MRP_TPL',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7215,'MAIN_MODULE_MRP_BARCODE',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7216,'MAIN_MODULE_MRP_MODELS',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7217,'MAIN_MODULE_MRP_THEME',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7218,'MAIN_MODULE_MRP_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2019-11-29 08:57:42'),(7220,'MRP_MO_ADDON',1,'mod_mo_standard','chaine',0,'Name of numbering rules of MO','2019-11-29 08:57:42'),(7221,'MRP_MO_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/mrps','chaine',0,NULL,'2019-11-29 08:57:42'),(7222,'MRP_MO_ADDON_PDF',1,'generic_mo_odt','chaine',0,'','2019-11-29 08:57:47'),(7254,'MAIN_INFO_OPENINGHOURS_MONDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7255,'MAIN_INFO_OPENINGHOURS_TUESDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7256,'MAIN_INFO_OPENINGHOURS_WEDNESDAY',1,'8-13','chaine',0,'','2019-12-19 11:14:21'),(7257,'MAIN_INFO_OPENINGHOURS_THURSDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7258,'MAIN_INFO_OPENINGHOURS_FRIDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7264,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookkeeper','chaine',0,'','2019-12-19 11:14:54'),(7265,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-12-19 11:14:54'),(7266,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-12-19 11:14:54'),(7267,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-12-19 11:14:54'),(7268,'MAIN_INFO_ACCOUNTANT_MAIL',1,'mybookkeeper@example.com','chaine',0,'','2019-12-19 11:14:54'),(7313,'MODULEBUILDER_ASCIIDOCTOR',1,'asciidoctor','chaine',0,'','2019-12-20 10:57:21'),(7314,'MODULEBUILDER_ASCIIDOCTORPDF',1,'asciidoctor-pdf','chaine',0,'','2019-12-20 10:57:21'),(7337,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2019-12-20 12:10:38'),(7338,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2019-12-20 12:10:38'),(7339,'EXPENSEREPORT_ADDON',1,'mod_expensereport_jade','chaine',0,'','2019-12-20 16:33:46'),(7378,'COMPANY_USE_SEARCH_TO_SELECT',1,'0','chaine',0,'','2019-12-21 15:54:22'),(7420,'CASHDESK_SERVICES',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7421,'TAKEPOS_ROOT_CATEGORY_ID',1,'31','chaine',0,'','2019-12-23 12:15:06'),(7422,'TAKEPOSCONNECTOR',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7423,'TAKEPOS_BAR_RESTAURANT',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7424,'TAKEPOS_TICKET_VAT_GROUPPED',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7425,'TAKEPOS_AUTO_PRINT_TICKETS',1,'0','int',0,'','2019-12-23 12:15:06'),(7426,'TAKEPOS_NUMPAD',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7427,'TAKEPOS_NUM_TERMINALS',1,'1','chaine',0,'','2019-12-23 12:15:06'),(7428,'TAKEPOS_DIRECT_PAYMENT',1,'0','int',0,'','2019-12-23 12:15:06'),(7429,'TAKEPOS_CUSTOM_RECEIPT',1,'0','int',0,'','2019-12-23 12:15:06'),(7430,'TAKEPOS_EMAIL_TEMPLATE_INVOICE',1,'-1','chaine',0,'','2019-12-23 12:15:06'),(7452,'MEMBER_ENABLE_PUBLIC',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7453,'MEMBER_NEWFORM_AMOUNT',1,'20','chaine',0,'','2020-01-01 10:31:46'),(7454,'MEMBER_NEWFORM_EDITAMOUNT',1,'0','chaine',0,'','2020-01-01 10:31:46'),(7455,'MEMBER_NEWFORM_PAYONLINE',1,'all','chaine',0,'','2020-01-01 10:31:46'),(7456,'MEMBER_NEWFORM_FORCETYPE',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7470,'STRIPE_TEST_PUBLISHABLE_KEY',1,'pk_test_123456789','chaine',0,'','2020-01-01 11:43:44'),(7471,'STRIPE_TEST_SECRET_KEY',1,'sk_test_123456','chaine',0,'','2020-01-01 11:43:44'),(7472,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2020-01-01 11:43:44'),(7473,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'1','chaine',0,'','2020-01-01 11:43:44'),(7489,'CAPTURESERVER_SECURITY_KEY',1,'securitykey123','chaine',0,'','2020-01-01 12:00:49'),(7720,'SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED',1,'1','chaine',1,'','2020-01-01 17:19:12'),(8063,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8064,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8065,'MAIN_AGENDA_ACTIONAUTO_COMPANY_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8066,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8067,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8068,'MAIN_AGENDA_ACTIONAUTO_PROPAL_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8069,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8070,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8071,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8072,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8073,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8074,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8075,'MAIN_AGENDA_ACTIONAUTO_ORDER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8076,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8077,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8078,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8079,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8080,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8081,'MAIN_AGENDA_ACTIONAUTO_BILL_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8082,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8083,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8084,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8085,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8086,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_SIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8087,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_REFUSED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8088,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8089,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8090,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8091,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8092,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8093,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8094,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8095,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8096,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8097,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8098,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8099,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8100,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8101,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8102,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8103,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8104,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8105,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8106,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8107,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8108,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8109,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8110,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8111,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8112,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8113,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8114,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8115,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8116,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8117,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8118,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8119,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8120,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8121,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8122,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8123,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8124,'MAIN_AGENDA_ACTIONAUTO_TASK_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8125,'MAIN_AGENDA_ACTIONAUTO_TASK_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8126,'MAIN_AGENDA_ACTIONAUTO_TASK_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8127,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8128,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8129,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8130,'MAIN_AGENDA_ACTIONAUTO_TICKET_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8131,'MAIN_AGENDA_ACTIONAUTO_TICKET_MODIFY',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8132,'MAIN_AGENDA_ACTIONAUTO_TICKET_ASSIGNED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8133,'MAIN_AGENDA_ACTIONAUTO_TICKET_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8134,'MAIN_AGENDA_ACTIONAUTO_TICKET_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8135,'MAIN_AGENDA_ACTIONAUTO_TICKET_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8136,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8137,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8138,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8139,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8140,'MAIN_AGENDA_ACTIONAUTO_USER_SENTBYMAIL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8141,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8142,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8143,'MAIN_AGENDA_ACTIONAUTO_BOM_CLOSE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8144,'MAIN_AGENDA_ACTIONAUTO_BOM_REOPEN',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8145,'MAIN_AGENDA_ACTIONAUTO_BOM_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8146,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_VALIDATE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8147,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_PRODUCED',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8148,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8149,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_CANCEL',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8169,'CABINETMED_DELAY_TO_LOCK_RECORD',1,'0','chaine',1,'Number of days before locking edit of consultation','2020-01-05 20:37:19'),(8190,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL_EXPORT','chaine',0,'','2020-01-06 01:23:30'),(8191,'MAIN_ENABLE_DEFAULT_VALUES',1,'1','chaine',0,'','2020-01-06 16:09:52'),(8210,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2020-01-06 16:51:43'),(8213,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2020-01-06 16:51:43'),(8214,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2020-01-06 16:51:43'),(8215,'DIAGNOSTIC_IS_NOT_MANDATORY',1,'1','texte',0,'','2020-01-06 16:51:43'),(8216,'USER_ADDON_PDF_ODT',1,'generic_user_odt','chaine',0,'','2020-01-07 13:45:19'),(8217,'USERGROUP_ADDON_PDF_ODT',1,'generic_usergroup_odt','chaine',0,'','2020-01-07 13:45:23'),(8230,'MAIN_MODULE_EMAILCOLLECTOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-12 20:13:55'),(8232,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:37:09'),(8233,'MAIN_MODULE_EXPEDITION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:38:20'),(8252,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2020-01-15 15:42:41'),(8259,'ACCOUNTING_REEXPORT',1,'1','yesno',0,'','2020-01-17 13:42:56'),(8291,'PRODUIT_MULTIPRICES_LIMIT',1,'5','chaine',0,'','2020-01-17 14:21:46'),(8293,'PRODUIT_CUSTOMER_PRICES_BY_QTY',1,'0','chaine',0,'','2020-01-17 14:21:46'),(8303,'PRODUCT_PRICE_UNIQ',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8304,'PRODUIT_MULTIPRICES',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8305,'PRODUIT_CUSTOMER_PRICES',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8306,'PRODUIT_SOUSPRODUITS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8307,'PRODUIT_DESC_IN_FORM',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8308,'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8309,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8310,'PRODUIT_FOURN_TEXTS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8313,'MAIN_MODULE_FCKEDITOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-18 17:13:27'),(8314,'FCKEDITOR_ENABLE_TICKET',1,'1','chaine',0,'','2020-01-18 19:39:54'),(8321,'FCKEDITOR_SKIN',1,'moono-lisa','chaine',0,'','2020-01-18 19:41:15'),(8322,'FCKEDITOR_TEST',1,'Test < aaa
\r\n
\r\n\"\"','chaine',0,'','2020-01-18 19:41:15'),(8484,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2020-01-21 09:40:00'),(8485,'MAIN_IHM_PARAMS_REV',1,'11','chaine',0,'','2020-01-21 09:40:00'),(8486,'MAIN_MULTILANGS',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8487,'MAIN_THEME',1,'eldy','chaine',0,'','2020-01-21 09:40:00'),(8488,'THEME_ELDY_USE_HOVER',1,'237,244,251','chaine',0,'','2020-01-21 09:40:00'),(8489,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2020-01-21 09:40:00'),(8490,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2020-01-21 09:40:00'),(8491,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8492,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8493,'MAIN_START_WEEK',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8494,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2020-01-21 09:40:00'),(8495,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2020-01-21 09:40:00'),(8496,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8497,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8498,'MAIN_HELPCENTER_DISABLELINK',0,'0','chaine',0,'','2020-01-21 09:40:00'),(8499,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2020-01-21 09:40:00'),(8501,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8542,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2020-06-12 17:24:42'),(8543,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2020-06-12 17:24:42'),(8544,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street.','chaine',0,'','2020-06-12 17:24:42'),(8545,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2020-06-12 17:24:42'),(8546,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2020-06-12 17:24:42'),(8547,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2020-06-12 17:24:42'),(8548,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2020-06-12 17:24:42'),(8549,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2020-06-12 17:24:42'),(8550,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2020-06-12 17:24:42'),(8551,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2020-06-12 17:24:42'),(8552,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2020-06-12 17:24:42'),(8553,'MAIN_INFO_SOCIETE_GENCOD',1,'1234567890','chaine',0,'','2020-06-12 17:24:42'),(8554,'MAIN_INFO_SOCIETE_FACEBOOK_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8555,'MAIN_INFO_SOCIETE_TWITTER_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8556,'MAIN_INFO_SOCIETE_LINKEDIN_URL',1,'https://www.linkedin.com/company/9400559/admin/','chaine',0,'','2020-06-12 17:24:42'),(8557,'MAIN_INFO_SOCIETE_INSTAGRAM_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8558,'MAIN_INFO_SOCIETE_YOUTUBE_URL',1,'DolibarrERPCRM','chaine',0,'','2020-06-12 17:24:42'),(8559,'MAIN_INFO_SOCIETE_GITHUB_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8560,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2020-06-12 17:24:42'),(8561,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2020-06-12 17:24:42'),(8562,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2020-06-12 17:24:42'),(8563,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8564,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2020-06-12 17:24:42'),(8565,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2020-06-12 17:24:42'),(8566,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2020-06-12 17:24:42'),(8567,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2020-06-12 17:24:42'),(8568,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2020-06-12 17:24:42'),(8569,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2020-06-12 17:24:42'),(8570,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2020-06-12 17:24:42'),(8571,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2020-06-12 17:24:42'),(8572,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2020-06-12 17:24:42'),(8573,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8574,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8575,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8576,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2020-06-12 17:24:42'),(8577,'PRODUCT_PRICE_BASE_TYPE',0,'HT','string',0,NULL,'2020-12-10 12:24:38'),(8578,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:49'),(8579,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:49'),(8580,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8581,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8582,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8583,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8584,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8585,'MAIN_MODULE_EXPENSEREPORT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:50'),(8586,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8587,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8588,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8589,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8590,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8591,'MAIN_MODULE_RESOURCE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8592,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8593,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:51'),(8594,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:52'),(8595,'TAKEPOS_PRINT_METHOD',1,'browser','chaine',0,'','2020-12-10 12:24:52'),(8596,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:52'),(8597,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8598,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8599,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2020-12-10 12:24:52'),(8600,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8601,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8602,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8603,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8604,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2020-12-10 12:24:52'),(8605,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:52'),(8606,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:52'),(8607,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2020-12-10 12:24:52'),(8608,'MAIN_VERSION_LAST_UPGRADE',0,'13.0.0-beta','chaine',0,'Dolibarr version for last upgrade','2020-12-10 12:24:54'),(8610,'MAIN_FIRST_PING_OK_DATE',1,'20201210122456','chaine',0,'','2020-12-10 12:24:56'),(8611,'MAIN_FIRST_PING_OK_ID',1,'c62ba8fb0a32591892333c3d72593685','chaine',0,'','2020-12-10 12:24:56'),(8612,'MAIN_UPLOAD_DOC',1,'50000','chaine',0,'','2020-12-10 12:26:31'),(8613,'MAIN_UMASK',1,'0664','chaine',0,'','2020-12-10 12:26:31'),(8614,'MAIN_ANTIVIRUS_PARAM',1,'--fdpass','chaine',0,'','2020-12-10 12:26:31'),(8619,'WEBSITE_EDITINLINE',1,'0','chaine',0,'','2020-12-10 12:27:05'),(8620,'WEBSITE_SUBCONTAINERSINLINE',1,'1','chaine',0,'','2020-12-10 12:27:17'),(8622,'MAIN_FEATURES_LEVEL',0,'1','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2020-12-10 12:29:16'),(8623,'MAIN_MODULE_RECRUITMENT',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:29:43'),(8624,'MAIN_MODULE_RECRUITMENT_TRIGGERS',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8625,'MAIN_MODULE_RECRUITMENT_LOGIN',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8626,'MAIN_MODULE_RECRUITMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8627,'MAIN_MODULE_RECRUITMENT_MENUS',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8628,'MAIN_MODULE_RECRUITMENT_TPL',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8629,'MAIN_MODULE_RECRUITMENT_BARCODE',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8630,'MAIN_MODULE_RECRUITMENT_MODELS',1,'1','chaine',0,NULL,'2020-12-10 12:29:43'),(8631,'MAIN_MODULE_RECRUITMENT_THEME',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8632,'MAIN_MODULE_RECRUITMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2020-12-10 12:29:43'),(8633,'MAIN_MODULE_RECEPTION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:13'),(8634,'RECEPTION_ADDON_PDF',1,'squille','chaine',0,'Nom du gestionnaire de generation des bons receptions en PDF','2020-12-10 12:30:13'),(8635,'RECEPTION_ADDON_NUMBER',1,'mod_reception_beryl','chaine',0,'Name for numbering manager for receptions','2020-12-10 12:30:13'),(8636,'RECEPTION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/receptions','chaine',0,NULL,'2020-12-10 12:30:13'),(8637,'MAIN_SUBMODULE_RECEPTION',1,'1','chaine',0,'Enable receptions','2020-12-10 12:30:13'),(8638,'MAIN_MODULE_PAYMENTBYBANKTRANSFER',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:17'),(8639,'MAIN_MODULE_MARGIN',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:20'),(8640,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8641,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8643,'MAIN_MODULE_BLOCKEDLOG',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:17'),(8644,'MAIN_MODULE_INCOTERM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:36'),(8645,'INCOTERM_ACTIVATE',1,'','chaine',0,'Description de INCOTERM_ACTIVATE','2020-12-10 12:31:36'); +INSERT INTO `llx_const` VALUES (8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2012-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2012-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2012-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2012-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2012-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2012-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2012-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2012-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2012-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','html',0,'Mail resiliation','2018-11-23 11:56:07'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','html',0,'Mail de validation','2018-11-23 11:56:07'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','html',0,'Mail de validation de cotisation','2018-11-23 11:56:07'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2012-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2012-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2012-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2012-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2012-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2012-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2012-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2012-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2012-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2012-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2012-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2012-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2012-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2012-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2012-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2012-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2012-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2012-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2012-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2012-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2012-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2012-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2012-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2012-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2012-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2012-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2012-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2012-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2012-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2012-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2012-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2012-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2012-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2012-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2012-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2012-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2012-07-08 11:26:27'),(239,'DELIVERY_ADDON_NUMBER',1,'mod_delivery_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2020-12-10 12:24:40'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2012-07-08 11:28:53'),(249,'DON_FORM',1,'html_cerfafr','chaine',0,'Nom du gestionnaire de formulaire de dons','2017-09-06 16:12:22'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2012-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2012-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2012-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2012-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2012-07-08 11:29:33'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2012-07-08 22:58:07'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2012-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2012-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2012-07-08 23:14:55'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2012-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2012-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2012-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2012-07-08 23:27:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2012-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2012-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2012-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2012-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2012-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2012-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2012-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2012-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2012-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2012-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2012-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2012-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2012-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2012-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2012-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2012-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2012-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2012-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2012-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2012-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2012-07-18 10:25:47'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2013-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2013-07-18 18:02:24'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2013-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2013-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2013-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2013-07-29 20:50:02'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2013-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2013-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2013-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2013-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2014-12-08 13:11:02'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2014-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2014-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2014-12-08 13:22:47'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2014-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2015-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2014-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2015-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2014-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2014-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2014-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2015-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2015-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2014-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2014-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2014-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2014-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2014-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2014-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2014-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2014-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2014-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2014-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2014-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2014-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2014-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2014-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2014-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2014-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2014-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2014-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.mydomain.com','chaine',0,'','2014-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2014-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'ABCDEFWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2014-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2014-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2014-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2014-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2014-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2014-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2014-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2014-12-12 19:58:05'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2015-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2015-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2015-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2015-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2015-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2015-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2015-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2015-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2015-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2015-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2015-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2015-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2015-01-19 17:01:53'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2015-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2015-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2015-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2015-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2015-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2015-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2015-02-12 16:22:55'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2015-02-13 16:20:18'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2015-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2015-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2015-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2015-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2015-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2015-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2015-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2015-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2015-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2015-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2015-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2015-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2015-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2015-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2015-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2015-03-10 15:57:21'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2015-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2015-03-13 15:29:19'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2015-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2015-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2015-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2015-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2015-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2015-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2015-03-13 15:36:29'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2015-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2015-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2015-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2015-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2015-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2015-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2015-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2015-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2015-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2015-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2015-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2015-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2015-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2015-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2015-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2015-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2015-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2015-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2015-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2015-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2015-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2015-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2015-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2015-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2015-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2015-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2015-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2015-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2015-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2015-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2015-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2015-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2015-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2015-03-23 18:06:24'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2015-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2015-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2015-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2015-09-08 23:06:14'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2016-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2016-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2016-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2016-12-21 12:51:28'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2017-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2017-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2017-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2017-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2017-11-04 15:27:46'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2017-11-04 15:41:43'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2017-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2017-11-15 22:38:28'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2017-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2017-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2017-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2017-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2017-11-15 22:39:00'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2017-11-15 22:39:05'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2017-11-15 22:39:08'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','text',0,'Text to print on member address sheets','2018-11-23 11:56:07'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2017-11-15 22:39:33'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2017-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2017-11-15 22:39:56'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2017-11-15 22:41:02'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2017-11-15 22:41:47'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2018-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2018-01-16 15:49:46'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2018-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2018-01-22 17:28:18'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2018-01-22 17:28:42'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2018-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2018-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2018-01-22 17:33:49'),(5614,'MAIN_SIZE_SHORTLISTE_LIMIT',1,'4','chaine',0,'Longueur maximum des listes courtes (fiche client)','2018-03-13 10:54:46'),(5627,'SUPPLIER_PROPOSAL_ADDON_PDF',1,'aurore','chaine',0,'Name of submodule to generate PDF for supplier quotation request','2018-07-30 11:13:20'),(5628,'SUPPLIER_PROPOSAL_ADDON',1,'mod_supplier_proposal_marbre','chaine',0,'Name of submodule to number supplier quotation request','2018-07-30 11:13:20'),(5629,'SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/supplier_proposal','chaine',0,NULL,'2018-07-30 11:13:20'),(5633,'MAIN_MODULE_API',1,'1',NULL,0,NULL,'2018-07-30 11:13:54'),(5634,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2018-07-30 11:13:56'),(5635,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2018-07-30 11:14:04'),(5638,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2018-07-30 11:15:04'),(5642,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_aquarium','chaine',0,'','2018-07-30 11:16:42'),(5707,'CASHDESK_NO_DECREASE_STOCK',1,'1','chaine',0,'','2018-07-30 13:38:11'),(5708,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5710,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5711,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2018-07-30 13:38:11'),(5808,'MARGIN_TYPE',1,'costprice','chaine',0,'','2018-07-30 16:32:18'),(5809,'DISPLAY_MARGIN_RATES',1,'1','chaine',0,'','2018-07-30 16:32:20'),(5833,'ACCOUNTING_EXPORT_SEPARATORCSV',1,',','string',0,NULL,'2017-01-29 15:11:56'),(5840,'CHARTOFACCOUNTS',1,'2','chaine',0,NULL,'2017-01-29 15:11:56'),(5841,'ACCOUNTING_EXPORT_MODELCSV',1,'1','chaine',0,NULL,'2017-01-29 15:11:56'),(5842,'ACCOUNTING_LENGTH_GACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5843,'ACCOUNTING_LENGTH_AACCOUNT',1,'','chaine',0,NULL,'2017-01-29 15:11:56'),(5844,'ACCOUNTING_LIST_SORT_VENTILATION_TODO',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5845,'ACCOUNTING_LIST_SORT_VENTILATION_DONE',1,'1','yesno',0,NULL,'2017-01-29 15:11:56'),(5846,'ACCOUNTING_EXPORT_DATE',1,'%d%m%Y','chaine',0,NULL,'2017-01-29 15:11:56'),(5848,'ACCOUNTING_EXPORT_FORMAT',1,'csv','chaine',0,NULL,'2017-01-29 15:11:56'),(5853,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2017-01-29 15:12:12'),(5854,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2017-01-29 15:12:35'),(5855,'MAIN_MODULE_OAUTH',1,'1',NULL,0,NULL,'2017-01-29 15:12:41'),(5883,'MAILING_LIMIT_SENDBYWEB',0,'15','chaine',1,'Number of targets to defined packet size when sending mass email','2017-01-29 17:36:33'),(5884,'MAIN_MAIL_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5885,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2017-01-29 18:53:02'),(5925,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION',1,'1','chaine',0,'','2017-02-01 14:48:55'),(5931,'DATABASE_PWD_ENCRYPTED',1,'1','chaine',0,'','2017-02-01 15:06:04'),(5932,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2017-02-01 15:09:09'),(5933,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2017-02-01 15:09:09'),(5934,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2017-02-01 15:09:09'),(5935,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2017-02-01 15:09:09'),(5936,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2017-02-01 15:09:09'),(5937,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2017-02-01 15:09:09'),(5938,'MAIN_MAIL_EMAIL_FROM',1,'robot@example.com','chaine',0,'','2017-02-01 15:09:09'),(5939,'MAIN_MAIL_DEFAULT_FROMTYPE',1,'user','chaine',0,'','2017-02-01 15:09:09'),(5940,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5941,'PRELEVEMENT_ICS',1,'ICS123456','chaine',0,'','2017-02-06 04:04:47'),(5942,'PRELEVEMENT_USER',1,'1','chaine',0,'','2017-02-06 04:04:47'),(5943,'BANKADDON_PDF',1,'sepamandate','chaine',0,'','2017-02-06 04:13:52'),(5947,'CHEQUERECEIPTS_THYME_MASK',1,'CHK{yy}{mm}-{0000@1}','chaine',0,'','2017-02-06 04:16:27'),(5948,'MAIN_MODULE_LOAN',1,'1',NULL,0,NULL,'2017-02-06 19:19:05'),(5954,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2017-02-06 23:57:37'),(5964,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2017-02-07 18:56:12'),(6019,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2017-02-15 17:18:22'),(6020,'MAIN_INFO_SOCIETE_NOM',2,'MySecondCompany','chaine',0,'','2017-02-15 17:18:22'),(6021,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2017-02-15 17:18:22'),(6022,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2017-02-15 17:18:22'),(6023,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2017-02-15 17:18:22'),(6032,'MAIN_MODULE_MULTICURRENCY',1,'1',NULL,0,NULL,'2017-02-15 17:29:59'),(6048,'SYSLOG_FACILITY',0,'LOG_USER','chaine',0,'','2017-02-15 22:37:01'),(6049,'SYSLOG_FIREPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/firephp/firephp-core/lib/','chaine',0,'','2017-02-15 22:37:01'),(6050,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2017-02-15 22:37:01'),(6051,'SYSLOG_CHROMEPHP_INCLUDEPATH',0,'/home/ldestailleur/git/dolibarr_5.0/htdocs/includes/ccampbell/chromephp/','chaine',0,'','2017-02-15 22:37:01'),(6052,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'','2017-02-15 22:37:01'),(6092,'MAIN_SIZE_SHORTLIST_LIMIT',0,'3','chaine',0,'Max length for small lists (tabs)','2017-05-12 09:02:38'),(6099,'MAIN_MODULE_SKYPE',1,'1',NULL,0,NULL,'2017-05-12 09:03:51'),(6100,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2017-05-12 09:03:54'),(6102,'PRODUCT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/products','chaine',0,'','2017-08-27 13:29:07'),(6103,'CONTRACT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/contracts','chaine',0,'','2017-08-27 13:29:07'),(6104,'USERGROUP_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/usergroups','chaine',0,'','2017-08-27 13:29:07'),(6105,'USER_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/users','chaine',0,'','2017-08-27 13:29:07'),(6106,'MAIN_ENABLE_OVERWRITE_TRANSLATION',1,'1','chaine',0,'Enable overwrote of translation','2017-08-27 13:29:07'),(6377,'COMMANDE_SAPHIR_MASK',1,'{yy}{mm}{000}{ttt}','chaine',0,'','2017-09-06 07:56:25'),(6518,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2017-09-06 19:43:57'),(6519,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2017-09-06 19:43:57'),(6520,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2017-09-06 19:43:57'),(6521,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2017-09-06 19:43:57'),(6522,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2017-09-06 19:44:12'),(6523,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2017-09-06 19:44:12'),(6524,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6525,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6526,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6527,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2017-09-06 19:44:12'),(6528,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2017-09-06 19:44:12'),(6529,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2017-09-06 19:44:12'),(6543,'MAIN_SMS_DEBUG',0,'1','chaine',1,'This is to enable OVH SMS debug','2017-09-06 19:44:34'),(6562,'BLOCKEDLOG_ENTITY_FINGERPRINT',1,'b63e359ffca54d5c2bab869916eaf23d4a736703028ccbf77ce1167c5f830e7b','chaine',0,'Numeric Unique Fingerprint','2018-01-19 11:27:15'),(6564,'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY',1,'FR','chaine',0,'This is list of country code where the module may be mandatory','2018-01-19 11:27:15'),(6565,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:34'),(6566,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,'{\"authorid\":\"12\",\"ip\":\"82.240.38.230\"}','2018-01-19 11:27:56'),(6567,'ADHERENT_ADDON_PDF',1,'standard','chaine',0,'Name of PDF model of member','2018-01-19 11:27:56'),(6636,'MAIN_MODULE_TICKET_MODELS',1,'1','chaine',0,NULL,'2019-06-05 09:15:29'),(6647,'MAIN_MODULE_SOCIALNETWORKS',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-06-05 09:16:49'),(6795,'TICKET_ADDON',1,'mod_ticket_simple','chaine',0,'','2019-09-26 12:07:59'),(6796,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_elephant','chaine',0,'','2019-09-26 12:59:00'),(6800,'CASHDESK_ID_THIRDPARTY1',1,'7','chaine',0,'','2019-09-26 15:30:09'),(6801,'CASHDESK_ID_BANKACCOUNT_CASH1',1,'3','chaine',0,'','2019-09-26 15:30:09'),(6802,'CASHDESK_ID_BANKACCOUNT_CHEQUE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6803,'CASHDESK_ID_BANKACCOUNT_CB1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6804,'CASHDESK_ID_BANKACCOUNT_PRE1',1,'4','chaine',0,'','2019-09-26 15:30:09'),(6805,'CASHDESK_ID_BANKACCOUNT_VIR1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6806,'CASHDESK_NO_DECREASE_STOCK1',1,'1','chaine',0,'','2019-09-26 15:30:09'),(6811,'FORCEPROJECT_ON_PROPOSAL',1,'1','chaine',0,'','2019-09-27 14:52:57'),(6813,'PROJECT_USE_OPPORTUNITIES',1,'1','chaine',0,'','2019-10-01 11:48:09'),(6814,'PACKTHEMEACTIVATEDTHEME',0,'modOwnTheme','chaine',0,'','2019-10-02 11:41:58'),(6815,'OWNTHEME_COL1',0,'#6a89cc','chaine',0,'','2019-10-02 11:41:58'),(6816,'OWNTHEME_COL2',0,'#60a3bc','chaine',0,'','2019-10-02 11:41:58'),(6817,'DOL_VERSION',0,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:41:58'),(6823,'OWNTHEME_COL_BODY_BCKGRD',0,'#E9E9E9','chaine',0,'','2019-10-02 11:41:58'),(6824,'OWNTHEME_COL_LOGO_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6825,'OWNTHEME_COL_TXT_MENU',0,'#b8c6e5','chaine',0,'','2019-10-02 11:41:58'),(6826,'OWNTHEME_COL_HEADER_BCKGRD',0,'#474c80','chaine',0,'','2019-10-02 11:41:58'),(6827,'OWNTHEME_CUSTOM_CSS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6828,'OWNTHEME_CUSTOM_JS',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6829,'OWNTHEME_FIXED_MENU',0,'0','yesno',0,'','2019-10-02 11:41:58'),(6830,'OWNTHEME_D_HEADER_FONT_SIZE',0,'1.7rem','chaine',0,'','2019-10-02 11:41:58'),(6831,'OWNTHEME_S_HEADER_FONT_SIZE',0,'1.6rem','chaine',0,'','2019-10-02 11:41:58'),(6832,'OWNTHEME_D_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6833,'OWNTHEME_S_VMENU_FONT_SIZE',0,'1.2rem','chaine',0,'','2019-10-02 11:41:58'),(6844,'MAIN_THEME',0,'eldy','chaine',0,'','2019-10-02 11:46:02'),(6845,'MAIN_MENU_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6846,'MAIN_MENUFRONT_STANDARD',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6847,'MAIN_MENU_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6848,'MAIN_MENUFRONT_SMARTPHONE',0,'eldy_menu.php','chaine',0,'','2019-10-02 11:46:02'),(6851,'BECREATIVE_COL1',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6852,'BECREATIVE_COL2',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6853,'DOL_VERSION',1,'10.0.2','chaine',0,'Dolibarr version','2019-10-02 11:47:10'),(6859,'BECREATIVE_COL_BODY_BCKGRD',1,'#e6eaef','chaine',0,'','2019-10-02 11:47:10'),(6860,'BECREATIVE_COL_LOGO_BCKGRD',1,'#1e88e5','chaine',0,'','2019-10-02 11:47:10'),(6861,'BECREATIVE_COL_TXT_MENU',1,'#b8c6e5','chaine',0,'','2019-10-02 11:47:10'),(6862,'BECREATIVE_COL_HEADER_BCKGRD',1,'#26a69a','chaine',0,'','2019-10-02 11:47:10'),(6863,'BECREATIVE_CUSTOM_CSS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6864,'BECREATIVE_CUSTOM_JS',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6865,'BECREATIVE_FIXED_MENU',1,'0','yesno',0,'','2019-10-02 11:47:10'),(6866,'BECREATIVE_D_HEADER_FONT_SIZE',1,'1.7rem','chaine',0,'','2019-10-02 11:47:10'),(6867,'BECREATIVE_S_HEADER_FONT_SIZE',1,'1.6rem','chaine',0,'','2019-10-02 11:47:10'),(6868,'BECREATIVE_D_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6869,'BECREATIVE_S_VMENU_FONT_SIZE',1,'1.2rem','chaine',0,'','2019-10-02 11:47:10'),(6881,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6882,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6883,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6884,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2019-10-02 11:48:49'),(6885,'ACCOUNTING_ACCOUNT_CUSTOMER',1,'411','chaine',0,'','2019-10-04 08:15:44'),(6886,'ACCOUNTING_ACCOUNT_SUPPLIER',1,'401','chaine',0,'','2019-10-04 08:15:44'),(6887,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,'','2019-10-04 08:15:44'),(6888,'ACCOUNTING_PRODUCT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6889,'ACCOUNTING_PRODUCT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6890,'ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6891,'ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6892,'ACCOUNTING_SERVICE_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6893,'ACCOUNTING_SERVICE_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6894,'ACCOUNTING_VAT_BUY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6895,'ACCOUNTING_VAT_SOLD_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6896,'ACCOUNTING_VAT_PAY_ACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6897,'ACCOUNTING_ACCOUNT_SUSPENSE',1,'471','chaine',0,'','2019-10-04 08:15:44'),(6898,'ACCOUNTING_ACCOUNT_TRANSFER_CASH',1,'58','chaine',0,'','2019-10-04 08:15:44'),(6899,'DONATION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6900,'ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6901,'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',1,'164','chaine',0,'','2019-10-04 08:15:44'),(6902,'LOAN_ACCOUNTING_ACCOUNT_INTEREST',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6903,'LOAN_ACCOUNTING_ACCOUNT_INSURANCE',1,'-1','chaine',0,'','2019-10-04 08:15:44'),(6912,'TICKET_ENABLE_PUBLIC_INTERFACE',1,'1','chaine',0,'','2019-10-04 11:44:33'),(6934,'TICKET_NOTIFICATION_EMAIL_FROM',1,'fff','chaine',0,'','2019-10-04 12:03:51'),(6935,'TICKET_NOTIFICATION_EMAIL_TO',1,'ff','chaine',0,'','2019-10-04 12:03:51'),(6936,'TICKET_MESSAGE_MAIL_INTRO',1,'Hello,
\r\nA new response was sent on a ticket that you contact. Here is the message:\"\"','chaine',0,'','2019-10-04 12:03:51'),(6937,'TICKET_MESSAGE_MAIL_SIGNATURE',1,'

Sincerely,

\r\n\r\n

--\"\"

\r\n','chaine',0,'','2019-10-04 12:03:51'),(7027,'USER_PASSWORD_GENERATED',1,'Perso','chaine',0,'','2019-10-07 10:52:46'),(7028,'USER_PASSWORD_PATTERN',1,'12;1;0;1;0;1','chaine',0,'','2019-10-07 10:57:03'),(7034,'BOM_ADDON',1,'mod_bom_standard','chaine',0,'Name of numbering rules of BOM','2019-10-08 18:49:41'),(7035,'BOM_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/boms','chaine',0,NULL,'2019-10-08 18:49:41'),(7036,'MAIN_MODULE_GEOIPMAXMIND',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:51:54'),(7037,'MAIN_MODULE_DAV',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2019-10-08 18:54:07'),(7122,'BOM_ADDON_PDF',1,'generic_bom_odt','chaine',0,'','2019-11-28 14:00:58'),(7195,'MAIN_AGENDA_ACTIONAUTO_MO_VALIDATE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7196,'MAIN_AGENDA_ACTIONAUTO_MO_PRODUCED',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7197,'MAIN_AGENDA_ACTIONAUTO_MO_DELETE',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7198,'MAIN_AGENDA_ACTIONAUTO_MO_CANCEL',1,'1','chaine',0,'','2019-11-29 08:44:37'),(7201,'TICKET_PUBLIC_INTERFACE_TOPIC',1,'MyBigCompany public interface for Ticket','chaine',0,'','2019-11-29 08:49:36'),(7202,'TICKET_PUBLIC_TEXT_HOME',1,'You can create a support ticket or view existing from its identifier tracking ticket.','chaine',0,'','2019-11-29 08:49:36'),(7203,'TICKET_PUBLIC_TEXT_HELP_MESSAGE',1,'Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request.','chaine',0,'','2019-11-29 08:49:36'),(7204,'TICKET_MESSAGE_MAIL_NEW',1,'TicketMessageMailNewText','chaine',0,'','2019-11-29 08:49:36'),(7220,'MRP_MO_ADDON',1,'mod_mo_standard','chaine',0,'Name of numbering rules of MO','2019-11-29 08:57:42'),(7221,'MRP_MO_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/mrps','chaine',0,NULL,'2019-11-29 08:57:42'),(7222,'MRP_MO_ADDON_PDF',1,'generic_mo_odt','chaine',0,'','2019-11-29 08:57:47'),(7254,'MAIN_INFO_OPENINGHOURS_MONDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7255,'MAIN_INFO_OPENINGHOURS_TUESDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7256,'MAIN_INFO_OPENINGHOURS_WEDNESDAY',1,'8-13','chaine',0,'','2019-12-19 11:14:21'),(7257,'MAIN_INFO_OPENINGHOURS_THURSDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7258,'MAIN_INFO_OPENINGHOURS_FRIDAY',1,'8-12 13-18','chaine',0,'','2019-12-19 11:14:21'),(7264,'MAIN_INFO_ACCOUNTANT_NAME',1,'Bob Bookkeeper','chaine',0,'','2019-12-19 11:14:54'),(7265,'MAIN_INFO_ACCOUNTANT_TOWN',1,'Berlin','chaine',0,'','2019-12-19 11:14:54'),(7266,'MAIN_INFO_ACCOUNTANT_STATE',1,'0','chaine',0,'','2019-12-19 11:14:54'),(7267,'MAIN_INFO_ACCOUNTANT_COUNTRY',1,'5','chaine',0,'','2019-12-19 11:14:54'),(7268,'MAIN_INFO_ACCOUNTANT_MAIL',1,'mybookkeeper@example.com','chaine',0,'','2019-12-19 11:14:54'),(7313,'MODULEBUILDER_ASCIIDOCTOR',1,'asciidoctor','chaine',0,'','2019-12-20 10:57:21'),(7314,'MODULEBUILDER_ASCIIDOCTORPDF',1,'asciidoctor-pdf','chaine',0,'','2019-12-20 10:57:21'),(7337,'EXTERNAL_RSS_TITLE_1',1,'Dolibarr.org News','chaine',0,'','2019-12-20 12:10:38'),(7338,'EXTERNAL_RSS_URLRSS_1',1,'https://www.dolibarr.org/rss','chaine',0,'','2019-12-20 12:10:38'),(7339,'EXPENSEREPORT_ADDON',1,'mod_expensereport_jade','chaine',0,'','2019-12-20 16:33:46'),(7378,'COMPANY_USE_SEARCH_TO_SELECT',1,'0','chaine',0,'','2019-12-21 15:54:22'),(7420,'CASHDESK_SERVICES',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7421,'TAKEPOS_ROOT_CATEGORY_ID',1,'31','chaine',0,'','2019-12-23 12:15:06'),(7422,'TAKEPOSCONNECTOR',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7423,'TAKEPOS_BAR_RESTAURANT',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7424,'TAKEPOS_TICKET_VAT_GROUPPED',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7425,'TAKEPOS_AUTO_PRINT_TICKETS',1,'0','int',0,'','2019-12-23 12:15:06'),(7426,'TAKEPOS_NUMPAD',1,'0','chaine',0,'','2019-12-23 12:15:06'),(7427,'TAKEPOS_NUM_TERMINALS',1,'1','chaine',0,'','2019-12-23 12:15:06'),(7428,'TAKEPOS_DIRECT_PAYMENT',1,'0','int',0,'','2019-12-23 12:15:06'),(7429,'TAKEPOS_CUSTOM_RECEIPT',1,'0','int',0,'','2019-12-23 12:15:06'),(7430,'TAKEPOS_EMAIL_TEMPLATE_INVOICE',1,'-1','chaine',0,'','2019-12-23 12:15:06'),(7452,'MEMBER_ENABLE_PUBLIC',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7453,'MEMBER_NEWFORM_AMOUNT',1,'20','chaine',0,'','2020-01-01 10:31:46'),(7454,'MEMBER_NEWFORM_EDITAMOUNT',1,'0','chaine',0,'','2020-01-01 10:31:46'),(7455,'MEMBER_NEWFORM_PAYONLINE',1,'all','chaine',0,'','2020-01-01 10:31:46'),(7456,'MEMBER_NEWFORM_FORCETYPE',1,'1','chaine',0,'','2020-01-01 10:31:46'),(7470,'STRIPE_TEST_PUBLISHABLE_KEY',1,'pk_test_123456789','chaine',0,'','2020-01-01 11:43:44'),(7471,'STRIPE_TEST_SECRET_KEY',1,'sk_test_123456','chaine',0,'','2020-01-01 11:43:44'),(7472,'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS',1,'4','chaine',0,'','2020-01-01 11:43:44'),(7473,'STRIPE_USER_ACCOUNT_FOR_ACTIONS',1,'1','chaine',0,'','2020-01-01 11:43:44'),(7489,'CAPTURESERVER_SECURITY_KEY',1,'securitykey123','chaine',0,'','2020-01-01 12:00:49'),(8136,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_DELETE',1,'1','chaine',0,'','2020-01-02 19:56:28'),(8190,'ACCOUNTING_PRODUCT_MODE',1,'ACCOUNTANCY_SELL_EXPORT','chaine',0,'','2020-01-06 01:23:30'),(8191,'MAIN_ENABLE_DEFAULT_VALUES',1,'1','chaine',0,'','2020-01-06 16:09:52'),(8210,'CABINETMED_RHEUMATOLOGY_ON',1,'0','texte',0,'','2020-01-06 16:51:43'),(8213,'MAIN_SEARCHFORM_SOCIETE',1,'1','texte',0,'','2020-01-06 16:51:43'),(8214,'CABINETMED_BANK_PATIENT_REQUIRED',1,'0','texte',0,'','2020-01-06 16:51:43'),(8215,'DIAGNOSTIC_IS_NOT_MANDATORY',1,'1','texte',0,'','2020-01-06 16:51:43'),(8216,'USER_ADDON_PDF_ODT',1,'generic_user_odt','chaine',0,'','2020-01-07 13:45:19'),(8217,'USERGROUP_ADDON_PDF_ODT',1,'generic_usergroup_odt','chaine',0,'','2020-01-07 13:45:23'),(8230,'MAIN_MODULE_EMAILCOLLECTOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-12 20:13:55'),(8232,'MAIN_MODULE_SUPPLIERPROPOSAL',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:37:09'),(8233,'MAIN_MODULE_EXPEDITION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-13 14:38:20'),(8252,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2020-01-15 15:42:41'),(8259,'ACCOUNTING_REEXPORT',1,'1','yesno',0,'','2020-01-17 13:42:56'),(8291,'PRODUIT_MULTIPRICES_LIMIT',1,'5','chaine',0,'','2020-01-17 14:21:46'),(8293,'PRODUIT_CUSTOMER_PRICES_BY_QTY',1,'0','chaine',0,'','2020-01-17 14:21:46'),(8303,'PRODUCT_PRICE_UNIQ',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8304,'PRODUIT_MULTIPRICES',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8305,'PRODUIT_CUSTOMER_PRICES',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8306,'PRODUIT_SOUSPRODUITS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8307,'PRODUIT_DESC_IN_FORM',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8308,'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8309,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2020-01-17 14:25:30'),(8310,'PRODUIT_FOURN_TEXTS',1,'0','chaine',0,'','2020-01-17 14:25:30'),(8313,'MAIN_MODULE_FCKEDITOR',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-01-18 17:13:27'),(8314,'FCKEDITOR_ENABLE_TICKET',1,'1','chaine',0,'','2020-01-18 19:39:54'),(8321,'FCKEDITOR_SKIN',1,'moono-lisa','chaine',0,'','2020-01-18 19:41:15'),(8322,'FCKEDITOR_TEST',1,'Test < aaa
\r\n
\r\n\"\"','chaine',0,'','2020-01-18 19:41:15'),(8486,'MAIN_MULTILANGS',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8491,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8492,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8496,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2020-01-21 09:40:00'),(8498,'MAIN_HELPCENTER_DISABLELINK',0,'0','chaine',0,'','2020-01-21 09:40:00'),(8501,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2020-01-21 09:40:00'),(8554,'MAIN_INFO_SOCIETE_FACEBOOK_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8555,'MAIN_INFO_SOCIETE_TWITTER_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8556,'MAIN_INFO_SOCIETE_LINKEDIN_URL',1,'https://www.linkedin.com/company/9400559/admin/','chaine',0,'','2020-06-12 17:24:42'),(8557,'MAIN_INFO_SOCIETE_INSTAGRAM_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8558,'MAIN_INFO_SOCIETE_YOUTUBE_URL',1,'DolibarrERPCRM','chaine',0,'','2020-06-12 17:24:42'),(8559,'MAIN_INFO_SOCIETE_GITHUB_URL',1,'dolibarr','chaine',0,'','2020-06-12 17:24:42'),(8577,'PRODUCT_PRICE_BASE_TYPE',0,'HT','string',0,NULL,'2020-12-10 12:24:38'),(8612,'MAIN_UPLOAD_DOC',1,'50000','chaine',0,'','2020-12-10 12:26:31'),(8613,'MAIN_UMASK',1,'0664','chaine',0,'','2020-12-10 12:26:31'),(8614,'MAIN_ANTIVIRUS_PARAM',1,'--fdpass','chaine',0,'','2020-12-10 12:26:31'),(8619,'WEBSITE_EDITINLINE',1,'0','chaine',0,'','2020-12-10 12:27:05'),(8620,'WEBSITE_SUBCONTAINERSINLINE',1,'1','chaine',0,'','2020-12-10 12:27:17'),(8633,'MAIN_MODULE_RECEPTION',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:13'),(8634,'RECEPTION_ADDON_PDF',1,'squille','chaine',0,'Nom du gestionnaire de generation des bons receptions en PDF','2020-12-10 12:30:13'),(8635,'RECEPTION_ADDON_NUMBER',1,'mod_reception_beryl','chaine',0,'Name for numbering manager for receptions','2020-12-10 12:30:13'),(8636,'RECEPTION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/receptions','chaine',0,NULL,'2020-12-10 12:30:13'),(8637,'MAIN_SUBMODULE_RECEPTION',1,'1','chaine',0,'Enable receptions','2020-12-10 12:30:13'),(8638,'MAIN_MODULE_PAYMENTBYBANKTRANSFER',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:30:17'),(8640,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8641,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->socid) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2020-12-10 12:30:20'),(8643,'MAIN_MODULE_BLOCKEDLOG',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:17'),(8644,'MAIN_MODULE_INCOTERM',1,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2020-12-10 12:31:36'),(8645,'INCOTERM_ACTIVATE',1,'','chaine',0,'Description de INCOTERM_ACTIVATE','2020-12-10 12:31:36'),(8649,'MAIN_MODULE_ACCOUNTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:57'),(8650,'MAIN_MODULE_AGENDA',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8651,'MAIN_MODULE_BOM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8652,'MAIN_MODULE_BANQUE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8653,'MAIN_MODULE_BARCODE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8654,'MAIN_MODULE_CRON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8655,'MAIN_MODULE_COMMANDE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8656,'MAIN_MODULE_DON',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:58'),(8657,'MAIN_MODULE_ECM',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:59'),(8658,'MAIN_MODULE_EXPENSEREPORT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:59'),(8659,'MAIN_MODULE_FACTURE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:59'),(8660,'MAIN_MODULE_FOURNISSEUR',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:22:59'),(8661,'MAIN_MODULE_HOLIDAY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8662,'MAIN_MODULE_MARGIN',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8665,'MAIN_MODULE_MRP',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8666,'MAIN_MODULE_MRP_TRIGGERS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8667,'MAIN_MODULE_MRP_LOGIN',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8668,'MAIN_MODULE_MRP_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8669,'MAIN_MODULE_MRP_MENUS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8670,'MAIN_MODULE_MRP_TPL',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8671,'MAIN_MODULE_MRP_BARCODE',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8672,'MAIN_MODULE_MRP_MODELS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8673,'MAIN_MODULE_MRP_THEME',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8674,'MAIN_MODULE_MRP_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8675,'MAIN_MODULE_OPENSURVEY',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8676,'MAIN_MODULE_PRINTING',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8677,'MAIN_MODULE_RECRUITMENT',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8678,'MAIN_MODULE_RECRUITMENT_TRIGGERS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8679,'MAIN_MODULE_RECRUITMENT_LOGIN',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8680,'MAIN_MODULE_RECRUITMENT_SUBSTITUTIONS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8681,'MAIN_MODULE_RECRUITMENT_MENUS',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8682,'MAIN_MODULE_RECRUITMENT_TPL',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8683,'MAIN_MODULE_RECRUITMENT_BARCODE',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8684,'MAIN_MODULE_RECRUITMENT_MODELS',1,'1','chaine',0,NULL,'2021-04-15 10:23:00'),(8685,'MAIN_MODULE_RECRUITMENT_THEME',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8686,'MAIN_MODULE_RECRUITMENT_MODULEFOREXTERNAL',1,'0','chaine',0,NULL,'2021-04-15 10:23:00'),(8687,'MAIN_MODULE_RESOURCE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8688,'MAIN_MODULE_SALARIES',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8689,'MAIN_MODULE_SERVICE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:00'),(8690,'MAIN_MODULE_SOCIETE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8691,'MAIN_MODULE_STRIPE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8692,'MAIN_MODULE_TICKET',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8693,'MAIN_MODULE_TICKET_TABS_0',1,'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__','chaine',0,NULL,'2021-04-15 10:23:01'),(8694,'MAIN_MODULE_TICKET_TABS_1',1,'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__','chaine',0,NULL,'2021-04-15 10:23:01'),(8695,'MAIN_MODULE_TICKET_TRIGGERS',1,'1','chaine',0,NULL,'2021-04-15 10:23:01'),(8696,'TAKEPOS_PRINT_METHOD',1,'browser','chaine',0,'','2021-04-15 10:23:01'),(8697,'MAIN_MODULE_TAKEPOS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8698,'MAIN_MODULE_TAKEPOS_TRIGGERS',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8699,'MAIN_MODULE_TAKEPOS_LOGIN',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8700,'MAIN_MODULE_TAKEPOS_SUBSTITUTIONS',1,'1','chaine',0,NULL,'2021-04-15 10:23:01'),(8701,'MAIN_MODULE_TAKEPOS_MENUS',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8702,'MAIN_MODULE_TAKEPOS_THEME',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8703,'MAIN_MODULE_TAKEPOS_TPL',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8704,'MAIN_MODULE_TAKEPOS_BARCODE',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8705,'MAIN_MODULE_TAKEPOS_MODELS',1,'0','chaine',0,NULL,'2021-04-15 10:23:01'),(8706,'MAIN_MODULE_USER',0,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8707,'MAIN_MODULE_VARIANTS',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:01'),(8708,'MAIN_MODULE_WEBSITE',1,'1','string',0,'{\"authorid\":0,\"ip\":\"127.0.0.1\"}','2021-04-15 10:23:02'),(8709,'MAIN_VERSION_LAST_UPGRADE',0,'14.0.0-alpha','chaine',0,'Dolibarr version for last upgrade','2021-04-15 10:25:08'),(8711,'MAIN_FIRST_PING_OK_DATE',1,'20210415102513','chaine',0,'','2021-04-15 10:25:13'),(8712,'MAIN_FIRST_PING_OK_ID',1,'9646d6c55a34bca208868c98dac4678b','chaine',0,'','2021-04-15 10:25:13'),(8714,'MAIN_MODULE_SYSLOG',0,'1','string',0,'{\"authorid\":\"12\",\"ip\":\"127.0.0.1\"}','2021-04-15 10:34:00'),(8715,'SYSLOG_LEVEL',0,'5','chaine',0,'','2021-04-15 10:34:05'),(8716,'MAIN_SECURITY_HASH_ALGO',1,'password_hash','chaine',1,'','2021-04-15 10:38:33'),(8717,'MAIN_INFO_SOCIETE_COUNTRY',1,'117:IN:India','chaine',0,'','2021-04-15 10:46:30'),(8718,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2021-04-15 10:46:30'),(8719,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street.','chaine',0,'','2021-04-15 10:46:30'),(8720,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2021-04-15 10:46:30'),(8721,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2021-04-15 10:46:30'),(8722,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2021-04-15 10:46:30'),(8723,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2021-04-15 10:46:30'),(8724,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2021-04-15 10:46:30'),(8725,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2021-04-15 10:46:30'),(8726,'MAIN_INFO_SOCIETE_WEB',1,'https://www.dolibarr.org','chaine',0,'','2021-04-15 10:46:30'),(8727,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2021-04-15 10:46:30'),(8728,'MAIN_INFO_SOCIETE_LOGO_SQUARRED',1,'mybigcompany_squarred.png','chaine',0,'','2021-04-15 10:46:30'),(8729,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL',1,'mybigcompany_squarred_small.png','chaine',0,'','2021-04-15 10:46:30'),(8730,'MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI',1,'mybigcompany_squarred_mini.png','chaine',0,'','2021-04-15 10:46:30'),(8731,'MAIN_INFO_SOCIETE_MANAGERS',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8732,'MAIN_INFO_GDPR',1,'Zack Zeceo','chaine',0,'','2021-04-15 10:46:30'),(8733,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2021-04-15 10:46:30'),(8734,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8735,'MAIN_INFO_SIREN',1,'123456','chaine',0,'','2021-04-15 10:46:30'),(8736,'MAIN_INFO_SIRET',1,'ABC-DEF','chaine',0,'','2021-04-15 10:46:30'),(8737,'MAIN_INFO_APE',1,'15E-45-8D','chaine',0,'','2021-04-15 10:46:30'),(8738,'MAIN_INFO_TVAINTRA',1,'FR12345678','chaine',0,'','2021-04-15 10:46:30'),(8739,'MAIN_INFO_SOCIETE_OBJECT',1,'A company demo to show how Dolibarr ERP CRM is wonderfull','chaine',0,'','2021-04-15 10:46:30'),(8740,'SOCIETE_FISCAL_MONTH_START',1,'4','chaine',0,'','2021-04-15 10:46:30'),(8741,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2021-04-15 10:46:30'),(8742,'FACTURE_LOCAL_TAX1_OPTION',1,'localtax1on','chaine',0,'','2021-04-15 10:46:30'),(8743,'FACTURE_LOCAL_TAX2_OPTION',1,'localtax2on','chaine',0,'','2021-04-15 10:46:30'),(8744,'MAIN_INFO_VALUE_LOCALTAX1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8745,'MAIN_INFO_LOCALTAX_CALC1',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8746,'MAIN_INFO_VALUE_LOCALTAX2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8747,'MAIN_INFO_LOCALTAX_CALC2',1,'0','chaine',0,'','2021-04-15 10:46:30'),(8759,'MAIN_LOGIN_BACKGROUND',1,'background_dolibarr.jpg','chaine',0,'','2021-04-15 10:54:37'),(8760,'MAIN_LANG_DEFAULT',1,'auto','chaine',0,'','2021-04-15 10:56:30'),(8761,'MAIN_IHM_PARAMS_REV',1,'13','chaine',0,'','2021-04-15 10:56:30'),(8762,'MAIN_THEME',1,'eldy','chaine',0,'','2021-04-15 10:56:30'),(8763,'THEME_ELDY_USE_HOVER',1,'237,244,251','chaine',0,'','2021-04-15 10:56:30'),(8764,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2021-04-15 10:56:30'),(8765,'MAIN_SIZE_SHORTLIST_LIMIT',1,'3','chaine',0,'','2021-04-15 10:56:30'),(8766,'MAIN_START_WEEK',1,'1','chaine',0,'','2021-04-15 10:56:30'),(8767,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2021-04-15 10:56:30'),(8768,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2021-04-15 10:56:30'),(8769,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2021-04-15 10:56:30'),(8770,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n__(SomeTranslationAreUncomplete)__','chaine',0,'','2021-04-15 10:56:30'),(8771,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2021-04-15 11:46:30'),(8775,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8776,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8777,'MAIN_AGENDA_ACTIONAUTO_COMPANY_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8778,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_REFUSED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8779,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLASSIFY_BILLED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8780,'MAIN_AGENDA_ACTIONAUTO_PROPAL_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8781,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8782,'MAIN_AGENDA_ACTIONAUTO_PROPAL_CLOSE_SIGNED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8783,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8784,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8785,'MAIN_AGENDA_ACTIONAUTO_ORDER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8786,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8787,'MAIN_AGENDA_ACTIONAUTO_ORDER_CANCEL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8788,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLASSIFY_BILLED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8789,'MAIN_AGENDA_ACTIONAUTO_ORDER_CLOSE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8790,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8791,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8792,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8793,'MAIN_AGENDA_ACTIONAUTO_BILL_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8794,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8795,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8796,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8797,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8798,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_SIGNED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8799,'MAIN_AGENDA_ACTIONAUTO_PROPOSAL_SUPPLIER_CLOSE_REFUSED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8800,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8801,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8802,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8803,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_APPROVE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8804,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_RECEIVE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8805,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SUBMIT',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8806,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_REFUSE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8807,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_CLASSIFY_BILLED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8808,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8809,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8810,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8811,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8812,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_PAYED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8813,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8814,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_CANCELED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8815,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8816,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8817,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8818,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8819,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8820,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8821,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_REOPEN',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8822,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8823,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8824,'MAIN_AGENDA_ACTIONAUTO_MEMBER_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8825,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8826,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8827,'MAIN_AGENDA_ACTIONAUTO_MEMBER_RESILIATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8828,'MAIN_AGENDA_ACTIONAUTO_MEMBER_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8829,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8830,'MAIN_AGENDA_ACTIONAUTO_MEMBER_SUBSCRIPTION_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8831,'MAIN_AGENDA_ACTIONAUTO_MEMBER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8832,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8833,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8834,'MAIN_AGENDA_ACTIONAUTO_PRODUCT_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8835,'MAIN_AGENDA_ACTIONAUTO_TASK_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8836,'MAIN_AGENDA_ACTIONAUTO_FICHINTER_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8837,'MAIN_AGENDA_ACTIONAUTO_TASK_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8838,'MAIN_AGENDA_ACTIONAUTO_TASK_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8839,'MAIN_AGENDA_ACTIONAUTO_CONTACT_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8840,'MAIN_AGENDA_ACTIONAUTO_CONTACT_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8841,'MAIN_AGENDA_ACTIONAUTO_CONTACT_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8842,'MAIN_AGENDA_ACTIONAUTO_PROJECT_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8843,'MAIN_AGENDA_ACTIONAUTO_PROJECT_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8844,'MAIN_AGENDA_ACTIONAUTO_PROJECT_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8845,'MAIN_AGENDA_ACTIONAUTO_TICKET_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8846,'MAIN_AGENDA_ACTIONAUTO_TICKET_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8847,'MAIN_AGENDA_ACTIONAUTO_TICKET_ASSIGNED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8848,'MAIN_AGENDA_ACTIONAUTO_TICKET_CLOSE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8849,'MAIN_AGENDA_ACTIONAUTO_TICKET_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8850,'MAIN_AGENDA_ACTIONAUTO_TICKET_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8851,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8852,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8853,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_APPROVE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8854,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8855,'MAIN_AGENDA_ACTIONAUTO_EXPENSE_REPORT_PAID',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8856,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8857,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8858,'MAIN_AGENDA_ACTIONAUTO_HOLIDAY_APPROVE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8859,'MAIN_AGENDA_ACTIONAUTO_USER_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8860,'MAIN_AGENDA_ACTIONAUTO_BOM_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8861,'MAIN_AGENDA_ACTIONAUTO_BOM_UNVALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8862,'MAIN_AGENDA_ACTIONAUTO_BOM_CLOSE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8863,'MAIN_AGENDA_ACTIONAUTO_BOM_REOPEN',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8864,'MAIN_AGENDA_ACTIONAUTO_BOM_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8865,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_VALIDATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8866,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_PRODUCED',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8867,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8868,'MAIN_AGENDA_ACTIONAUTO_MRP_MO_CANCEL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8869,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8870,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8871,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8872,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTJOBPOSITION_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8873,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_CREATE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8874,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_MODIFY',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8875,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_SENTBYMAIL',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8876,'MAIN_AGENDA_ACTIONAUTO_RECRUITMENTCANDIDATURE_DELETE',1,'1','chaine',0,'','2021-04-15 13:32:12'),(8877,'AGENDA_REMINDER_BROWSER',1,'1','chaine',0,'','2021-04-15 13:32:29'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -5539,7 +5206,7 @@ CREATE TABLE `llx_cronjob` ( `test` varchar(255) COLLATE utf8_unicode_ci DEFAULT '1', `processing` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5548,7 +5215,7 @@ CREATE TABLE `llx_cronjob` ( LOCK TABLES `llx_cronjob` WRITE; /*!40000 ALTER TABLE `llx_cronjob` DISABLE KEYS */; -INSERT INTO `llx_cronjob` VALUES (1,'2015-03-23 18:18:39','2015-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2015-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0),(40,'2018-11-23 11:58:15','2018-11-23 12:58:15','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-11-23 12:58:15',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'$conf->agenda->enabled',0),(41,'2018-11-23 11:58:16','2018-11-23 12:58:16','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-11-23 12:58:16',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,0,0,0,NULL,'1',0),(42,'2020-01-15 15:43:12','2018-11-23 12:58:16','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,'2020-01-15 19:43:12','2020-01-17 12:58:16','2018-11-23 12:58:16',NULL,'2020-01-15 19:43:12','-1','Failed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.\nFailed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.','604800',1,2,1,NULL,12,'MakeLocalDatabaseDump',NULL,0,0,0,NULL,'1',0),(43,'2018-11-23 11:58:17','2018-11-23 12:58:17','method','RecurringInvoices',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-11-23 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'$conf->facture->enabled',0),(45,'2020-01-01 12:00:34','2020-01-01 16:00:34','method','MyJob label',NULL,'/captureserver/class/myobject.class.php','MyObject','doScheduledJob',NULL,NULL,'captureserver',0,NULL,NULL,'2020-01-01 16:00:34',NULL,NULL,NULL,NULL,'3600',2,NULL,0,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->captureserver->enabled',0),(46,'2020-01-12 20:13:55','2020-01-13 00:13:55','method','Email collector',NULL,'/emailcollector/class/emailcollector.class.php','EmailCollector','doCollect',NULL,NULL,'emailcollector',50,NULL,NULL,'2020-01-13 00:13:55',NULL,NULL,NULL,NULL,'60',5,NULL,1,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->emailcollector->enabled',0); +INSERT INTO `llx_cronjob` VALUES (1,'2015-03-23 18:18:39','2015-03-23 19:18:39','command','aaa','aaaa','','','','','','',0,NULL,NULL,'2015-03-23 19:18:00',NULL,NULL,NULL,NULL,'3600',3600,0,0,1,1,'',NULL,0,0,0,NULL,'1',0),(40,'2018-11-23 11:58:15','2018-11-23 12:58:15','method','SendEmailsReminders',NULL,'comm/action/class/actioncomm.class.php','ActionComm','sendEmailsReminder',NULL,NULL,'agenda',10,NULL,NULL,'2018-11-23 12:58:15',NULL,NULL,NULL,NULL,'60',10,NULL,1,NULL,NULL,'SendEMailsReminder',NULL,1,0,0,NULL,'$conf->agenda->enabled',0),(41,'2018-11-23 11:58:16','2018-11-23 12:58:16','method','PurgeDeleteTemporaryFilesShort',NULL,'core/class/utils.class.php','Utils','purgeFiles',NULL,NULL,'cron',50,NULL,NULL,'2018-11-23 12:58:16',NULL,NULL,NULL,NULL,'604800',2,NULL,1,NULL,NULL,'PurgeDeleteTemporaryFiles',NULL,0,0,0,NULL,'1',0),(42,'2020-01-15 15:43:12','2018-11-23 12:58:16','method','MakeLocalDatabaseDumpShort',NULL,'core/class/utils.class.php','Utils','dumpDatabase','none,auto,1,auto,10',NULL,'cron',90,'2020-01-15 19:43:12','2020-01-17 12:58:16','2018-11-23 12:58:16',NULL,'2020-01-15 19:43:12','-1','Failed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.\nFailed to run external command. Check it is available and runnable by your PHP server. If PHP Safe Mode is enabled, check that command is inside a directory defined by parameter safe_mode_exec_dir.','604800',1,2,1,NULL,12,'MakeLocalDatabaseDump',NULL,0,0,0,NULL,'1',0),(43,'2018-11-23 11:58:17','2018-11-23 12:58:17','method','RecurringInvoices',NULL,'compta/facture/class/facture-rec.class.php','FactureRec','createRecurringInvoices',NULL,NULL,'facture',50,NULL,NULL,'2018-11-23 23:00:00',NULL,NULL,NULL,NULL,'86400',1,NULL,1,NULL,NULL,'Generate recurring invoices',NULL,1,0,0,NULL,'$conf->facture->enabled',0),(45,'2020-01-01 12:00:34','2020-01-01 16:00:34','method','MyJob label',NULL,'/captureserver/class/myobject.class.php','MyObject','doScheduledJob',NULL,NULL,'captureserver',0,NULL,NULL,'2020-01-01 16:00:34',NULL,NULL,NULL,NULL,'3600',2,NULL,0,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->captureserver->enabled',0),(46,'2020-01-12 20:13:55','2020-01-13 00:13:55','method','Email collector',NULL,'/emailcollector/class/emailcollector.class.php','EmailCollector','doCollect',NULL,NULL,'emailcollector',50,NULL,NULL,'2020-01-13 00:13:55',NULL,NULL,NULL,NULL,'60',5,NULL,1,NULL,NULL,'Comment',NULL,1,0,0,NULL,'$conf->emailcollector->enabled',0),(47,'2021-04-15 10:34:00','2021-04-15 07:34:00','method','CompressSyslogs',NULL,'core/class/utils.class.php','Utils','compressSyslogs',NULL,NULL,'syslog',50,NULL,NULL,'2021-04-15 07:34:00',NULL,NULL,NULL,NULL,'86400',1,NULL,0,NULL,NULL,'Compress and archive log files. The number of versions to keep is defined into the setup of module. Warning: Main application cron script must be run with same account than your web server to avoid to get log files with different owner than required by web server. Another solution is to set web server Operating System group as the group of directory documents and set GROUP permission \"rws\" on this directory so log files will always have the group and permissions of the web server Operating System group.',NULL,1,0,0,NULL,'1',0); /*!40000 ALTER TABLE `llx_cronjob` ENABLE KEYS */; UNLOCK TABLES; @@ -5891,7 +5558,7 @@ CREATE TABLE `llx_document_model` ( `description` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=394 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=402 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5900,7 +5567,7 @@ CREATE TABLE `llx_document_model` ( LOCK TABLES `llx_document_model` WRITE; /*!40000 ALTER TABLE `llx_document_model` DISABLE KEYS */; -INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(386,'einstein',1,'order',NULL,NULL),(387,'html_cerfafr',1,'donation',NULL,NULL),(388,'standard',1,'expensereport',NULL,NULL),(389,'crabe',1,'invoice',NULL,NULL),(390,'muscadet',1,'order_supplier',NULL,NULL),(391,'standard_recruitmentjobposition',1,'recruitmentjobposition',NULL,NULL),(392,'generic_recruitmentjobposition_odt',1,'recruitmentjobposition',NULL,NULL),(393,'squille',1,'reception',NULL,NULL); +INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(250,'baleine',1,'project',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(273,'beluga',1,'project','beluga',NULL),(281,'sepamandate',1,'bankaccount','sepamandate',NULL),(299,'standard',1,'member',NULL,NULL),(319,'generic_bom_odt',1,'bom','ODT templates','BOM_ADDON_PDF_ODT_PATH'),(320,'generic_mo_odt',1,'mrp','ODT templates','MRP_MO_ADDON_PDF_ODT_PATH'),(366,'generic_user_odt',1,'user',NULL,NULL),(367,'generic_usergroup_odt',1,'group',NULL,NULL),(370,'aurore',1,'supplier_proposal',NULL,NULL),(371,'rouget',1,'shipping',NULL,NULL),(372,'typhon',1,'delivery',NULL,NULL),(393,'squille',1,'reception',NULL,NULL),(394,'einstein',1,'order',NULL,NULL),(395,'html_cerfafr',1,'donation',NULL,NULL),(396,'standard',1,'expensereport',NULL,NULL),(397,'crabe',1,'invoice',NULL,NULL),(398,'muscadet',1,'order_supplier',NULL,NULL),(399,'standard_recruitmentjobposition',1,'recruitmentjobposition',NULL,NULL),(400,'generic_recruitmentjobposition_odt',1,'recruitmentjobposition',NULL,NULL),(401,'TICKET_ADDON_PDF_ODT_PATH',1,'ticket',NULL,NULL); /*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; UNLOCK TABLES; @@ -6005,6 +5672,8 @@ CREATE TABLE `llx_ecm_directories` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `acl` text COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_directories` (`label`,`fk_parent`,`entity`), @@ -6021,7 +5690,7 @@ CREATE TABLE `llx_ecm_directories` ( LOCK TABLES `llx_ecm_directories` WRITE; /*!40000 ALTER TABLE `llx_ecm_directories` DISABLE KEYS */; -INSERT INTO `llx_ecm_directories` VALUES (8,'Administrative documents',1,0,'Directory to store administrative contacts',0,NULL,NULL,'2018-07-30 16:54:41','2018-07-30 12:54:41',12,NULL,NULL),(9,'Images',1,0,'',34,NULL,NULL,'2018-07-30 16:55:33','2018-07-30 13:24:41',12,NULL,NULL); +INSERT INTO `llx_ecm_directories` VALUES (8,'Administrative documents',1,0,'Directory to store administrative contacts',0,NULL,NULL,'2018-07-30 16:54:41','2018-07-30 12:54:41',12,NULL,NULL,NULL,NULL),(9,'Images',1,0,'',34,NULL,NULL,'2018-07-30 16:55:33','2018-07-30 13:24:41',12,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_ecm_directories` ENABLE KEYS */; UNLOCK TABLES; @@ -6076,6 +5745,8 @@ CREATE TABLE `llx_ecm_files` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_user_c` int(11) DEFAULT NULL, `fk_user_m` int(11) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `acl` text COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) DEFAULT NULL, `keyword` varchar(750) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6084,7 +5755,7 @@ CREATE TABLE `llx_ecm_files` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_ecm_files` (`filepath`,`filename`,`entity`), KEY `idx_ecm_files_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6093,7 +5764,7 @@ CREATE TABLE `llx_ecm_files` ( LOCK TABLES `llx_ecm_files` WRITE; /*!40000 ALTER TABLE `llx_ecm_files` DISABLE KEYS */; -INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,1,NULL,NULL,NULL),(5,'5fe17a68b2f6a73e6326f77fa7b6586c','a60cad66c6da948eb08d5b939f3516ff',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','','',NULL,NULL,'generated',NULL,'2017-08-30 16:23:01','2018-03-16 09:59:31',12,12,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,1,NULL,NULL,NULL),(19,'ff9fad9b5ea886a0812953907e2b790a','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1909-0002','dolibarr_screenshot1_300x188.png','',NULL,NULL,'uploaded',NULL,'2019-09-26 14:12:04','2019-09-26 12:12:04',12,NULL,NULL,1,NULL,NULL,NULL),(20,'b6a2578c5483bffbead5b290f6ef5286','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'(PROV10)-dolibarr_120x90.png','propale/(PROV10)','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 16:53:51','2019-09-27 14:53:51',12,NULL,NULL,1,NULL,NULL,NULL),(21,'89809c5b1213137736ded43bdd982f71','5f1af043d9fc7a90e8500a6dc5c4f5ae',NULL,1,'(PROV10).pdf','propale/(PROV10)','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:09','2019-09-27 14:54:09',12,NULL,NULL,2,NULL,'propal',10),(22,'8eb026e33ae1c7892c59a2ac6dda31f4','8827be83628b2f5beb67cf95b4c4cff6',NULL,1,'PR1909-0031.pdf','propale/PR1909-0031','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,NULL,1,NULL,'propal',10),(24,'0d4e663b5c128d288a39231433da966e','3d2bd3daecd0de5078774ad58546d1f4',NULL,1,'PR1909-0032-dolibarr_192x192.png','propale/PR1909-0032','dolibarr_192x192.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:08:42','2019-09-27 15:08:59',12,NULL,NULL,1,NULL,NULL,NULL),(25,'44867f8c62f8538da7724c148af2c227','f4208dc9a3dc83f668ea415244016c00',NULL,1,'PR1909-0032.pdf','propale/PR1909-0032','','',NULL,NULL,'generated',NULL,'2019-09-27 17:08:59','2020-01-15 18:37:15',12,12,NULL,2,NULL,'propal',33),(26,'3983de91943fb14f8b137d1929bea5a9','730822c8124123c9c7dcf0d55234e1c6',NULL,1,'PR1909-0033.pdf','propale/PR1909-0033','','',NULL,NULL,'generated',NULL,'2019-09-27 17:11:21','2020-01-18 18:32:33',12,12,NULL,1,NULL,'propal',34),(27,'399734120da8f3027508e0772c25e291','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'PR1909-0033-dolibarr_120x90.png','propale/PR1909-0033','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:13:07','2019-09-27 15:13:13',12,NULL,NULL,2,NULL,NULL,NULL),(28,'c81de886c76ccd2d46fbc5f816047a71','e063b649494c9ededb5710207b8cdb41','kr8LmXlZVAW9Sl0iZ0w8re6Jd23S3X1k',1,'(PROV35).pdf','propale/(PROV35)','','',NULL,NULL,'generated',NULL,'2019-09-27 17:53:44','2020-01-01 19:54:50',12,12,NULL,1,NULL,'propal',35),(29,'34fe1f2546e8d1562b904b7bbe79e01a','6e1acd02fdd344b18e38c0cba729f552',NULL,1,'(PROV6).pdf','commande/(PROV6)','','',NULL,NULL,'generated',NULL,'2019-09-27 18:04:35','2019-09-27 16:04:52',12,12,NULL,1,NULL,'commande',6),(30,'fd2ad5abe709d7870bcd57743d9a1176','b0ae7dd69244e0c0a9d4c5e6d08bffcb',NULL,1,'(PROV93).pdf','commande/(PROV93)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:33:29','2019-09-27 17:40:49',12,12,NULL,1,NULL,'commande',93),(31,'988caa795b4080019180253aac14d729','95b9adcf40828c7e0a164d31e1c84b5c',NULL,1,'(PROV4).pdf','fournisseur/commande/(PROV4)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:46:07','2020-01-20 11:19:49',12,12,NULL,1,NULL,'commande_fournisseur',4),(32,'a046e42fcd8d114312eede243fd1850c','467e542bb565cb9379722c6fdcecc3aa',NULL,1,'PR1702-0020.pdf','propale/PR1702-0020','','',NULL,NULL,'generated',NULL,'2019-09-27 19:47:00','2019-09-27 17:47:00',12,NULL,NULL,1,NULL,'propal',22),(33,'dc99eacf03a78050da53a2601d0f4b49','88c047d94ab183b015526f936a5c8923',NULL,1,'SI1601-0002.pdf','fournisseur/facture/7/1/SI1601-0002','','',NULL,NULL,'generated',NULL,'2019-10-04 10:10:25','2019-10-04 08:31:30',12,12,NULL,1,NULL,'facture_fourn',17),(34,'4ab84fd3e4079aeea831d65dfc2f6891','681578085f18bacd6d40341ef236c0d6',NULL,1,'FA6801-0010.pdf','facture/FA6801-0010','','',NULL,NULL,'generated',NULL,'2019-10-04 10:26:49','2019-10-04 08:28:14',12,12,NULL,1,NULL,'facture',150),(38,'b18da4bbfaf907c1f6706b46ae3add3c','0792f280fd9a114fbd432d5442f7445b',NULL,1,'dolibarr_256x256.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_256x256.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:25:05','2019-10-04 15:25:05',12,NULL,NULL,1,NULL,NULL,NULL),(40,'7205fe0a03a5bd79c7d60a0d05f06e25','df4db8f9cc75b79765e7ca11013fa0bc',NULL,1,'dolibarr_512x512.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_512x512.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:53:13','2019-10-04 16:47:55',12,12,NULL,3,NULL,NULL,NULL),(44,'53f92236476224c177f23ab30e6553aa','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 18:49:30','2019-10-04 16:49:30',12,NULL,NULL,4,NULL,NULL,NULL),(45,'b33ed6e73b386cac4aab51eb62f3af50','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:00:22','2019-10-04 17:00:22',12,NULL,NULL,5,NULL,NULL,NULL),(46,'4573b5a5d66e4598bc98075b33d2470f','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png.20191004190108','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:01:08','2019-10-04 17:01:08',12,NULL,NULL,6,NULL,NULL,NULL),(47,'a9be21b2a984fd57d2ff450bcfb59ef5','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg.20191004193013','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:30:13','2019-10-04 17:30:13',12,NULL,NULL,7,NULL,NULL,NULL),(48,'f598ad9040ed50087ae163d9bef3eb7c','fe0b95bda4dc7823739eadedfab7e823',NULL,1,'dolibarr_screenshot9_1680x1050.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot9_1680x1050.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:32:55','2019-10-04 17:32:55',12,NULL,NULL,8,NULL,NULL,NULL),(49,'95d0d57347686999f3609897cae8ec22','d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/0/temp/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:37:16','2019-10-04 17:37:16',0,NULL,NULL,9,NULL,NULL,NULL),(50,'1a30c5a296fa61f1d76b4f3c27a15701','8ea43be5bd1fb83a287a95cea7688cc4',NULL,1,'dolibarr.gif','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr.gif','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,10,NULL,NULL,NULL),(51,'3ad99f8446832892a610dbadcbd255f0','3dea7d1b511d19f8bd3252683423958a',NULL,1,'doliadmin.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/doliadmin.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,11,NULL,NULL,NULL),(52,'4d147b3a8443635ff19fde49438394d0','ee8eab1acbf409681bcd13b6b210b8a1',NULL,1,'SI1911-0005.pdf','fournisseur/facture/1/2/SI1911-0005','','',NULL,NULL,'generated',NULL,'2019-11-28 15:54:30','2019-11-28 11:54:47',12,12,NULL,1,NULL,'facture_fourn',21),(53,'9324bc1030b77ebaef372d0ae40eb62e','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/FR-CAR','Carrot.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:33:50','2019-11-28 15:33:50',12,NULL,NULL,1,NULL,NULL,NULL),(54,'b1fe7acb0dd8591b04b49ef1cd1743aa','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/POS-CAR','/home/ldestailleur/git/dolibarr_11.0/documents/produit/POS-CAR/FR-CAR-Carrot.jpg','',NULL,NULL,'unknown',NULL,'2019-11-28 16:36:56','2019-11-28 15:36:56',12,NULL,NULL,1,NULL,NULL,NULL),(55,'aba4d9af9dd0b200f44186f2db38b8f0','173299315f304f28081abca75e6ed635',NULL,1,'POS-APPLE-Apple.jpg','produit/POS-APPLE','Apple.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:37:46','2019-11-28 15:37:46',12,NULL,NULL,1,NULL,NULL,NULL),(56,'0a07968edb04e24e4caa7945f9308b5b','f25692272dc2e691d90e785660251dea',NULL,1,'POS-KIWI-Kiwi.jpg','produit/POS-KIWI','Kiwi.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:38:58','2019-11-28 15:38:58',12,NULL,NULL,1,NULL,NULL,NULL),(57,'da49d3ab86b6cb4f8269a3c1106de5bc','46026e1212b5e256a621559db254ce74',NULL,1,'POS-PEACH-Peach.jpg','produit/POS-PEACH','Peach.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:39:29','2019-11-28 15:39:29',12,NULL,NULL,1,NULL,NULL,NULL),(58,'e60f830c84b2808bf05d9751c6f3068c','c6fd1ef0add23afe632d043a9a9174e9',NULL,1,'POS-ORANGE-Orange.jpg','produit/POS-ORANGE','Orange.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:40:06','2019-11-28 15:40:06',12,NULL,NULL,1,NULL,NULL,NULL),(59,'b75a9affa8454aa109032ef11578ff55','8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4548product.jpg','produit/COMP-XP4548','compxp4523product.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:41:23','2019-11-28 12:47:57',12,12,NULL,1,NULL,NULL,NULL),(61,'fb93ad6fc19a4b6cb10ea753706d2f82','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'DOLIDROID-dolidroid_114x114.png','produit/DOLIDROID','dolidroid_114x114.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:49:27','2019-11-28 15:49:27',12,NULL,NULL,4,NULL,NULL,NULL),(64,'90bf4a06479f20d6642d398b60e30d76','1cff6b63ce7bdcd6607f9ccbca942810',NULL,1,'DOLIDROID-dolidroid_180x120_en.png','produit/DOLIDROID','dolidroid_180x120_en.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:50:33','2019-11-28 15:50:33',12,NULL,NULL,5,NULL,NULL,NULL),(65,'7516f3382f24055570c580f3f7a3ca6e','df61e1aca1992b564dc6d80cd6c6ae0b',NULL,1,'DOLIDROID-dolidroid_screenshot_stats_720x1280.png','produit/DOLIDROID','dolidroid_screenshot_stats_720x1280.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:51:58','2019-11-28 15:51:58',12,NULL,NULL,6,NULL,NULL,NULL),(66,'61ec0d999c2460e0a942be9760b7c1fb','8ef12c42fbada32094a633a60f5c84a7',NULL,1,'POS-Eggs-Eggs.jpg','produit/POS-Eggs','Eggs.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 17:04:06','2019-11-28 16:04:06',12,NULL,NULL,1,NULL,NULL,NULL),(67,'abe8d329cfb52c1ba59867dfb2468047','8a0380cc9887f325e220c0f7503835c7',NULL,1,'POS-Chips-Chips.jpg','produit/POS-Chips','Chips.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 17:09:19','2019-11-28 16:09:19',12,NULL,NULL,1,NULL,NULL,NULL),(71,'1008ec7576e1b970f952044d10245f72','653abb50f7c2cc410dac1fd913ad8769',NULL,1,'BOM1911-0001_bom.odt','bom/BOM1911-0001','','',NULL,NULL,'generated',NULL,'2019-11-28 18:20:01','2020-01-08 15:41:49',12,12,NULL,1,NULL,'bom_bom',6),(72,'a0942ded45efc068ca59dd3360cbb0e2','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/POS-CARROT','/home/ldestailleur/git/dolibarr_11.0/documents/produit/POS-CARROT/FR-CAR-Carrot.jpg','',NULL,NULL,'unknown',NULL,'2019-11-28 19:02:01','2019-11-28 18:02:01',12,NULL,NULL,1,NULL,NULL,NULL),(73,'c928f00b0bc1a40061408e63a9c204ee','0221dc3c79e0123b451b5630bf2177b0',NULL,1,'ER1912-0001-IMG_20191219_161331.jpg','expensereport/ER1912-0001','IMG_20191219_161331.jpg','',NULL,NULL,'uploaded',NULL,'2019-12-20 20:04:42','2019-12-20 16:34:05',12,NULL,NULL,1,NULL,NULL,NULL),(74,'4d710f4f262d3caca82b2c7380e0addc','4ff0ba258dc0f8d3b78d919557ee7996',NULL,1,'ER1912-0001.pdf','expensereport/ER1912-0001','','',NULL,NULL,'generated',NULL,'2019-12-20 20:04:46','2019-12-20 16:34:26',12,12,NULL,2,NULL,'expensereport',2),(75,'bcb6930c79f5a3f55f9327561a07daa1','0e81807ac4e0380ddd3d841a20f339c2',NULL,1,'CO7001-0027.pdf','commande/CO7001-0027','','',NULL,NULL,'generated',NULL,'2019-12-20 20:42:23','2020-01-15 18:41:17',12,12,NULL,2,NULL,'commande',88),(76,'eabd0e0a63029bf40288c3394dcb984c','96cd89d2ba43d4f9f0f19b49a6d3754a','1Hlh7n01E5KY5i9rtvhiq1TYL16JMToN',1,'PR1702-0027.pdf','propale/PR1702-0027','','',NULL,NULL,'generated',NULL,'2019-12-20 20:49:43','2019-12-20 16:50:23',12,12,NULL,1,NULL,'propal',29),(77,'69b67f70d71893409d37bbab8af92b70','f8c94ef0d5146049288aa8042ce63892',NULL,1,'FS1301-0001.pdf','facture/FS1301-0001','','',NULL,NULL,'generated',NULL,'2019-12-21 19:40:22','2019-12-21 18:40:22',12,NULL,NULL,1,NULL,'facture',148),(78,'d5a97833baecb8e92c859c755ece9666','e511f26c4964058a24535f8db8324f89',NULL,1,'thirdparty.ods','societe/10','','',NULL,NULL,'generated',NULL,'2019-12-21 20:32:17','2019-12-21 19:32:17',12,NULL,NULL,1,NULL,'societe',10),(81,'87209bfcfd010c1b6ef3c7fec33d5249','a40fb5e1465053cff2bbcaafc25818c5',NULL,1,'SI2001-0006.pdf','fournisseur/facture/2/2/SI2001-0006','','',NULL,NULL,'generated',NULL,'2020-01-01 17:48:01','2020-01-16 17:09:02',12,12,NULL,1,NULL,'facture_fourn',22),(82,'1dabc11d324fded7042876ef648c2fde','e272a4e34acef46c0d7c21dd0100e0d1',NULL,1,'SA2001-0001.pdf','fournisseur/facture/3/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 17:49:33','2020-01-01 13:50:41',12,12,NULL,1,NULL,'facture_fourn',23),(83,'78b31a74494c6e3fb731c291167e5fac','7664e71072c8b51613f12429e5b10b71',NULL,1,'(PROV3).pdf','fournisseur/commande/(PROV3)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:11:15','2020-01-20 11:22:53',12,12,NULL,1,NULL,'commande_fournisseur',3),(84,'dae316f89653eb19b2784c4fb41c9488','3ab1a48c8fcf3c9480243949f4ef685f',NULL,1,'SA2001-0001.pdf','fournisseur/facture/4/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:17:15','2020-01-01 16:17:46',12,12,NULL,1,NULL,'facture_fourn',24),(85,'d0f2428e33e2b6244ac4b72fab4f0f14','45ad94c796cf1918e8888bb906cfea30',NULL,1,'(PROV25).pdf','fournisseur/facture/5/2/(PROV25)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:19:51','2020-01-01 19:19:51',12,NULL,NULL,1,NULL,'facture_fourn',25),(86,'bb7830bd179da2e9f9ef3579ea2f8208','cd5145fa64d57ee69a572f9cbc67b15c',NULL,1,'SA2001-0001.pdf','fournisseur/facture/6/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:20:13','2020-01-01 16:20:22',12,12,NULL,1,NULL,'facture_fourn',26),(87,'66cbad4f05ade84391d4ea3c502fb7a3','872e8072820f9b3014e8250ee7b00f86',NULL,1,'SA2001-0001.pdf','fournisseur/facture/7/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:21:51','2020-01-15 18:23:28',12,12,NULL,1,NULL,'facture_fourn',27),(88,'78dedfa0065ebb065040515c8a4fe0f4','116c1b16fb98a36f5a429ebe674a5036',NULL,1,'SI2001-0007.pdf','fournisseur/facture/8/2/SI2001-0007','','',NULL,NULL,'generated',NULL,'2020-01-01 20:22:48','2020-01-01 17:20:36',12,12,NULL,1,NULL,'facture_fourn',28),(89,'2650611699dbc2cb0d6db2c93cb8ff9d','e6f96dca09e39bfeb3003e38eecd4b84',NULL,1,'(PROV29).pdf','fournisseur/facture/9/2/(PROV29)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:50:57','2020-01-01 19:50:57',12,NULL,NULL,1,NULL,'facture_fourn',29),(90,'d3d6a55beba28be5ce57e806ad037a70','9f3a682f921c24d07722d259574488ed',NULL,1,'SA2001-0002.pdf','fournisseur/facture/0/3/SA2001-0002','','',NULL,NULL,'generated',NULL,'2020-01-01 20:51:32','2020-01-01 16:51:37',12,12,NULL,1,NULL,'facture_fourn',30),(91,'4d9767cf70227675ca1e51996970cca4','707f6a5be123159b4ba3ac5bbc55e12f',NULL,1,'PR2001-0034.pdf','propale/PR2001-0034','','',NULL,NULL,'generated',NULL,'2020-01-01 23:55:35','2020-01-19 13:24:27',12,12,NULL,1,NULL,'propal',36),(92,'c3a7802251274920507482a72761c511','be7b12881c652a68f0256e00e22acfc9',NULL,1,'(PROV37).pdf','propale/(PROV37)','','',NULL,NULL,'generated',NULL,'2020-01-06 00:44:16','2020-01-05 20:46:07',12,12,NULL,1,NULL,'propal',37),(93,'43e9e215d44cbe8854dc64bfe01a7c1a','218b07855dea60994770bf4608757452',NULL,1,'SI1601-0004.pdf','fournisseur/facture/9/1/SI1601-0004','','',NULL,NULL,'generated',NULL,'2020-01-06 00:48:42','2020-01-05 23:48:42',12,NULL,NULL,1,NULL,'facture_fourn',19),(94,'29441461d34abe37158ca6bb35938a3a','6b805071f64924fa1309d51fef1ea839',NULL,1,'courrier_consult.odt','societe/29','','',NULL,NULL,'generated',NULL,'2020-01-06 21:23:24','2020-01-06 17:46:52',12,12,NULL,1,NULL,'societe',29),(95,'e5b8ef885741a002f6129051b85e5e09','6603225670e52fcb3a5e2f25de806668',NULL,1,'(PROV38).pdf','propale/(PROV38)','','',NULL,NULL,'generated',NULL,'2020-01-13 17:25:28','2020-01-13 16:25:28',12,NULL,NULL,1,NULL,'propal',38),(96,'94c2a18a5f7bd023b512e46a1cc1e5c8','1d9edda94d935fe9d75d5478df4f89ac',NULL,1,'(PROV2).pdf','supplier_proposal/(PROV2)','','',NULL,NULL,'generated',NULL,'2020-01-15 22:48:12','2020-01-20 11:19:25',12,12,NULL,1,NULL,'supplier_proposal',2),(97,'72e38084f638adb55e3e621dd3f42ab5','d278e84671f7dc4acc4882f047334846',NULL,1,'AC2001-0001.pdf','facture/AC2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-16 02:22:16','2020-01-16 01:23:11',12,12,NULL,1,NULL,'facture',221),(98,'d9ceb752bbb85ea0fb29c8cb27d22e1e','0719ac0dccd4a4e1b8fbdc3a8e9fa7c1',NULL,1,'AC2001-0002.pdf','facture/AC2001-0002','','',NULL,NULL,'generated',NULL,'2020-01-16 02:33:27','2020-01-16 01:36:48',12,12,NULL,1,NULL,'facture',224),(99,'33d354694658b4697adcd9a50a292113','8abae3ad7ad4a33ad42ab166ddaee54c',NULL,1,'(PROV225).pdf','facture/(PROV225)','','',NULL,NULL,'generated',NULL,'2020-01-16 02:37:55','2020-01-16 01:37:55',12,NULL,NULL,1,NULL,'facture',225),(100,'f4fbae718d9c9bc535d56a6638c1cdc2','df8714b30c43b5766ebb8cf64ef85e16',NULL,1,'(PROV226).pdf','facture/(PROV226)','','',NULL,NULL,'generated',NULL,'2020-01-19 14:21:03','2020-01-19 13:21:21',12,12,NULL,1,NULL,'facture',226),(101,'b51a925a795e1652820d987266a31658','30a1d7094b174bbc67824a65cbec5db3',NULL,1,'AC2001-0003.pdf','facture/AC2001-0003','','',NULL,NULL,'generated',NULL,'2020-01-19 14:23:39','2020-01-19 13:51:48',12,12,NULL,1,NULL,'facture',227),(102,'1b7f8c128060879ec7f78712fa36ecd0','8df02e7604f77bb8dd6cc1ec7d1d3c90',NULL,1,'AC2001-0004.pdf','facture/AC2001-0004','','',NULL,NULL,'generated',NULL,'2020-01-19 14:49:58','2020-01-19 14:13:07',12,12,NULL,1,NULL,'facture',228),(103,'ee00344302cff6530168fb9e08083780','230789608ee4a42a05037f934e706fa5',NULL,1,'(PROV217).pdf','facture/(PROV217)','','',NULL,NULL,'generated',NULL,'2020-01-19 14:53:10','2020-01-20 11:25:41',12,12,NULL,1,NULL,'facture',217),(104,'faf6da4cf7cf49275da5786e36b3173c','50acdf0099c27348ede81656e5b3ddf2',NULL,1,'(PROV3).pdf','supplier_proposal/(PROV3)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:06:40','2020-01-20 11:19:06',12,12,NULL,1,NULL,'supplier_proposal',3),(105,'d82c57a3335bafcc3fb2b35d9573fe47','73d983b4f3018249d27f391bb33ff8f0',NULL,1,'(PROV14).pdf','fournisseur/commande/(PROV14)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:20:17','2020-01-20 11:20:17',12,NULL,NULL,1,NULL,'commande_fournisseur',14),(106,'fbcfde0bfdb8e7184f5e1a72527bc53a','5300dd748dffeb292c4a4fe32f9c2ab6',NULL,1,'(PROV4).pdf','supplier_proposal/(PROV4)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:23:22','2020-01-20 11:24:00',12,12,NULL,1,NULL,'supplier_proposal',4),(109,'e409be44e925329a41079f1ddacaa8f1','801b126a0db67b4ff32f36641f3b63b0',NULL,1,'FA1707-0026.pdf','facture/FA1707-0026','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:17','2020-01-21 09:23:17',12,12,NULL,1,NULL,'facture',229),(110,'36411c7ab830732de1d07fe824ec9e20','63ba10b5868d702a3d09da900efb0df2',NULL,1,'FA1807-0027.pdf','facture/FA1807-0027','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:28','2020-01-21 09:23:28',12,12,NULL,1,NULL,'facture',230),(111,'bfc5abd0ab78849b7e98839d27175fb4','d03351be391a0491047797e13b39e432',NULL,1,'FA1907-0028.pdf','facture/FA1907-0028','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:49','2020-01-21 09:23:49',12,12,NULL,1,NULL,'facture',231); +INSERT INTO `llx_ecm_files` VALUES (1,NULL,'6ff09d1c53ef83fe622b02a320bcfa52',NULL,1,'FA1107-0019.pdf','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019.pdf','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(2,NULL,'a6c8a0f04af73e4dfc059006d7a5f55a',NULL,1,'FA1107-0019_invoice.odt','facture/FA1107-0019','/home/ldestailleur/git/dolibarr_6.0/documents/facture/FA1107-0019/FA1107-0019_invoice.odt','',NULL,NULL,'unknown',NULL,'2017-08-30 15:53:34','2017-08-30 11:53:34',18,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL),(3,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1107-0019-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1107-0019','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 15:54:45','2017-08-30 11:54:45',18,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL),(4,NULL,'91a42a4e2c77e826562c83fa84f6fccd',NULL,1,'CO7001-0027-acces-coopinfo.txt','commande/CO7001-0027','acces-coopinfo.txt','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:02:33','2017-08-30 12:02:33',18,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(5,'5fe17a68b2f6a73e6326f77fa7b6586c','a60cad66c6da948eb08d5b939f3516ff',NULL,1,'FA1601-0024.pdf','facture/FA1601-0024','','',NULL,NULL,'generated',NULL,'2017-08-30 16:23:01','2018-03-16 09:59:31',12,12,NULL,NULL,NULL,1,NULL,NULL,NULL),(6,NULL,'24e96a4a0da25d1ac5049ea46d031d3a',NULL,1,'FA1601-0024-depotFacture-1418-INH-N000289-20170720.pdf','facture/FA1601-0024','depotFacture-1418-INH-N000289-20170720.pdf','',NULL,NULL,'uploaded',NULL,'2017-08-30 16:23:14','2017-08-30 12:23:14',12,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL),(7,NULL,'d41d8cd98f00b204e9800998ecf8427e',NULL,1,'Exxxqqqw','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/Exxxqqqw','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL),(8,NULL,'8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4523product.jpg','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/compxp4523product.jpg','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:04:02',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(9,NULL,'d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','produit/COMP-XP4523','/home/ldestailleur/git/dolibarr_6.0/documents/produit/COMP-XP4523/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2017-08-30 19:03:15','2017-08-30 15:03:15',12,NULL,NULL,NULL,NULL,3,NULL,NULL,NULL),(10,'afef987559622d6334fdc4a9a134c435','ccd46bbf3ab6c78588a0ba775106258f',NULL,1,'rolluproduct.jpg','produit/ROLLUPABC','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/ROLLUPABC/rolluproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(11,'a8bbc6c6daea9a4dd58d6fb37a77a030','2f1f2ea4b1b4eb9f25ba440c7870ffcd',NULL,1,'dolicloud_logo.png','produit/DOLICLOUD','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/DOLICLOUD/dolicloud_logo.png','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(12,'bd0951e23023b22ad1cd21fe33ee46bf','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/CAKECONTRIB','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/CAKECONTRIB/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(13,'e9e029e2d2bbd014162c0b385ab8739a','b7446fb7b54a3085ff7167e2c5b370fd',NULL,1,'pearpieproduct.jpg','produit/PEARPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PEARPIE/pearpieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(14,'14eea962fb99dc6dd8ca4474c519f837','973b1603b5eb01aac97eb2d911f4c341',NULL,1,'pinkdressproduct.jpg','produit/PINKDRESS','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/PINKDRESS/pinkdressproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(18,'1972b3da7908b3e08247e6e23bb7bdc3','03f0be1249e56fd0b3dd02d5545e3675',NULL,1,'applepieproduct.jpg','produit/APPLEPIE','/home/dolibarr/demo.dolibarr.org/dolibarr_documents/produit/APPLEPIE/applepieproduct.jpg','',NULL,NULL,'unknown',NULL,'2018-01-19 11:23:16','2018-01-19 11:23:16',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(19,'ff9fad9b5ea886a0812953907e2b790a','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1909-0002','dolibarr_screenshot1_300x188.png','',NULL,NULL,'uploaded',NULL,'2019-09-26 14:12:04','2019-09-26 12:12:04',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(20,'b6a2578c5483bffbead5b290f6ef5286','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'(PROV10)-dolibarr_120x90.png','propale/(PROV10)','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 16:53:51','2019-09-27 14:53:51',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(21,'89809c5b1213137736ded43bdd982f71','5f1af043d9fc7a90e8500a6dc5c4f5ae',NULL,1,'(PROV10).pdf','propale/(PROV10)','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:09','2019-09-27 14:54:09',12,NULL,NULL,NULL,NULL,2,NULL,'propal',10),(22,'8eb026e33ae1c7892c59a2ac6dda31f4','8827be83628b2f5beb67cf95b4c4cff6',NULL,1,'PR1909-0031.pdf','propale/PR1909-0031','','',NULL,NULL,'generated',NULL,'2019-09-27 16:54:30','2019-09-27 14:54:30',12,NULL,NULL,NULL,NULL,1,NULL,'propal',10),(24,'0d4e663b5c128d288a39231433da966e','3d2bd3daecd0de5078774ad58546d1f4',NULL,1,'PR1909-0032-dolibarr_192x192.png','propale/PR1909-0032','dolibarr_192x192.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:08:42','2019-09-27 15:08:59',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(25,'44867f8c62f8538da7724c148af2c227','f4208dc9a3dc83f668ea415244016c00',NULL,1,'PR1909-0032.pdf','propale/PR1909-0032','','',NULL,NULL,'generated',NULL,'2019-09-27 17:08:59','2020-01-15 18:37:15',12,12,NULL,NULL,NULL,2,NULL,'propal',33),(26,'3983de91943fb14f8b137d1929bea5a9','730822c8124123c9c7dcf0d55234e1c6',NULL,1,'PR1909-0033.pdf','propale/PR1909-0033','','',NULL,NULL,'generated',NULL,'2019-09-27 17:11:21','2020-01-18 18:32:33',12,12,NULL,NULL,NULL,1,NULL,'propal',34),(27,'399734120da8f3027508e0772c25e291','83c8e9b3b692ebae2f6f3e298dd9f5a2',NULL,1,'PR1909-0033-dolibarr_120x90.png','propale/PR1909-0033','dolibarr_120x90.png','',NULL,NULL,'uploaded',NULL,'2019-09-27 17:13:07','2019-09-27 15:13:13',12,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL),(28,'c81de886c76ccd2d46fbc5f816047a71','e063b649494c9ededb5710207b8cdb41','kr8LmXlZVAW9Sl0iZ0w8re6Jd23S3X1k',1,'(PROV35).pdf','propale/(PROV35)','','',NULL,NULL,'generated',NULL,'2019-09-27 17:53:44','2020-01-01 19:54:50',12,12,NULL,NULL,NULL,1,NULL,'propal',35),(29,'34fe1f2546e8d1562b904b7bbe79e01a','6e1acd02fdd344b18e38c0cba729f552',NULL,1,'(PROV6).pdf','commande/(PROV6)','','',NULL,NULL,'generated',NULL,'2019-09-27 18:04:35','2019-09-27 16:04:52',12,12,NULL,NULL,NULL,1,NULL,'commande',6),(30,'fd2ad5abe709d7870bcd57743d9a1176','b0ae7dd69244e0c0a9d4c5e6d08bffcb',NULL,1,'(PROV93).pdf','commande/(PROV93)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:33:29','2019-09-27 17:40:49',12,12,NULL,NULL,NULL,1,NULL,'commande',93),(31,'988caa795b4080019180253aac14d729','95b9adcf40828c7e0a164d31e1c84b5c',NULL,1,'(PROV4).pdf','fournisseur/commande/(PROV4)','','',NULL,NULL,'generated',NULL,'2019-09-27 19:46:07','2020-01-20 11:19:49',12,12,NULL,NULL,NULL,1,NULL,'commande_fournisseur',4),(32,'a046e42fcd8d114312eede243fd1850c','467e542bb565cb9379722c6fdcecc3aa',NULL,1,'PR1702-0020.pdf','propale/PR1702-0020','','',NULL,NULL,'generated',NULL,'2019-09-27 19:47:00','2019-09-27 17:47:00',12,NULL,NULL,NULL,NULL,1,NULL,'propal',22),(33,'dc99eacf03a78050da53a2601d0f4b49','88c047d94ab183b015526f936a5c8923',NULL,1,'SI1601-0002.pdf','fournisseur/facture/7/1/SI1601-0002','','',NULL,NULL,'generated',NULL,'2019-10-04 10:10:25','2019-10-04 08:31:30',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',17),(34,'4ab84fd3e4079aeea831d65dfc2f6891','681578085f18bacd6d40341ef236c0d6',NULL,1,'FA6801-0010.pdf','facture/FA6801-0010','','',NULL,NULL,'generated',NULL,'2019-10-04 10:26:49','2019-10-04 08:28:14',12,12,NULL,NULL,NULL,1,NULL,'facture',150),(38,'b18da4bbfaf907c1f6706b46ae3add3c','0792f280fd9a114fbd432d5442f7445b',NULL,1,'dolibarr_256x256.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_256x256.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:25:05','2019-10-04 15:25:05',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(40,'7205fe0a03a5bd79c7d60a0d05f06e25','df4db8f9cc75b79765e7ca11013fa0bc',NULL,1,'dolibarr_512x512.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_512x512.png','',NULL,NULL,'unknown',NULL,'2019-10-04 17:53:13','2019-10-04 16:47:55',12,12,NULL,NULL,NULL,3,NULL,NULL,NULL),(44,'53f92236476224c177f23ab30e6553aa','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 18:49:30','2019-10-04 16:49:30',12,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL),(45,'b33ed6e73b386cac4aab51eb62f3af50','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:00:22','2019-10-04 17:00:22',12,NULL,NULL,NULL,NULL,5,NULL,NULL,NULL),(46,'4573b5a5d66e4598bc98075b33d2470f','3d14c3c12c58dfe06ef3020e712b2b06',NULL,1,'dolibarr_screenshot1_300x188.png.20191004190108','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot1_300x188.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:01:08','2019-10-04 17:01:08',12,NULL,NULL,NULL,NULL,6,NULL,NULL,NULL),(47,'a9be21b2a984fd57d2ff450bcfb59ef5','1e71c3a5d4c8247935f89971dab4d9cd',NULL,1,'dolibarr_logo.jpg.20191004193013','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_logo.jpg','',NULL,NULL,'unknown',NULL,'2019-10-04 19:30:13','2019-10-04 17:30:13',12,NULL,NULL,NULL,NULL,7,NULL,NULL,NULL),(48,'f598ad9040ed50087ae163d9bef3eb7c','fe0b95bda4dc7823739eadedfab7e823',NULL,1,'dolibarr_screenshot9_1680x1050.png','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr_screenshot9_1680x1050.png','',NULL,NULL,'unknown',NULL,'2019-10-04 19:32:55','2019-10-04 17:32:55',12,NULL,NULL,NULL,NULL,8,NULL,NULL,NULL),(49,'95d0d57347686999f3609897cae8ec22','d32552ee874c82b9f0ccab4f309b4b61',NULL,1,'dolihelp.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/0/temp/dolihelp.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:37:16','2019-10-04 17:37:16',0,NULL,NULL,NULL,NULL,9,NULL,NULL,NULL),(50,'1a30c5a296fa61f1d76b4f3c27a15701','8ea43be5bd1fb83a287a95cea7688cc4',NULL,1,'dolibarr.gif','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/dolibarr.gif','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL),(51,'3ad99f8446832892a610dbadcbd255f0','3dea7d1b511d19f8bd3252683423958a',NULL,1,'doliadmin.ico','ticket/TS1910-0004','/home/ldestailleur/git/dolibarr_10.0/documents/users/12/temp/doliadmin.ico','',NULL,NULL,'unknown',NULL,'2019-10-04 19:39:07','2019-10-04 17:39:07',12,NULL,NULL,NULL,NULL,11,NULL,NULL,NULL),(52,'4d147b3a8443635ff19fde49438394d0','ee8eab1acbf409681bcd13b6b210b8a1',NULL,1,'SI1911-0005.pdf','fournisseur/facture/1/2/SI1911-0005','','',NULL,NULL,'generated',NULL,'2019-11-28 15:54:30','2019-11-28 11:54:47',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',21),(53,'9324bc1030b77ebaef372d0ae40eb62e','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/FR-CAR','Carrot.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:33:50','2019-11-28 15:33:50',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(54,'b1fe7acb0dd8591b04b49ef1cd1743aa','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/POS-CAR','/home/ldestailleur/git/dolibarr_11.0/documents/produit/POS-CAR/FR-CAR-Carrot.jpg','',NULL,NULL,'unknown',NULL,'2019-11-28 16:36:56','2019-11-28 15:36:56',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(55,'aba4d9af9dd0b200f44186f2db38b8f0','173299315f304f28081abca75e6ed635',NULL,1,'POS-APPLE-Apple.jpg','produit/POS-APPLE','Apple.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:37:46','2019-11-28 15:37:46',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(56,'0a07968edb04e24e4caa7945f9308b5b','f25692272dc2e691d90e785660251dea',NULL,1,'POS-KIWI-Kiwi.jpg','produit/POS-KIWI','Kiwi.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:38:58','2019-11-28 15:38:58',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(57,'da49d3ab86b6cb4f8269a3c1106de5bc','46026e1212b5e256a621559db254ce74',NULL,1,'POS-PEACH-Peach.jpg','produit/POS-PEACH','Peach.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:39:29','2019-11-28 15:39:29',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(58,'e60f830c84b2808bf05d9751c6f3068c','c6fd1ef0add23afe632d043a9a9174e9',NULL,1,'POS-ORANGE-Orange.jpg','produit/POS-ORANGE','Orange.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:40:06','2019-11-28 15:40:06',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(59,'b75a9affa8454aa109032ef11578ff55','8245ba8e8e345655f06cd904d7d54f73',NULL,1,'compxp4548product.jpg','produit/COMP-XP4548','compxp4523product.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:41:23','2019-11-28 12:47:57',12,12,NULL,NULL,NULL,1,NULL,NULL,NULL),(61,'fb93ad6fc19a4b6cb10ea753706d2f82','2adadd910fe97a07bd5be0f1f27f2d28',NULL,1,'DOLIDROID-dolidroid_114x114.png','produit/DOLIDROID','dolidroid_114x114.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:49:27','2019-11-28 15:49:27',12,NULL,NULL,NULL,NULL,4,NULL,NULL,NULL),(64,'90bf4a06479f20d6642d398b60e30d76','1cff6b63ce7bdcd6607f9ccbca942810',NULL,1,'DOLIDROID-dolidroid_180x120_en.png','produit/DOLIDROID','dolidroid_180x120_en.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:50:33','2019-11-28 15:50:33',12,NULL,NULL,NULL,NULL,5,NULL,NULL,NULL),(65,'7516f3382f24055570c580f3f7a3ca6e','df61e1aca1992b564dc6d80cd6c6ae0b',NULL,1,'DOLIDROID-dolidroid_screenshot_stats_720x1280.png','produit/DOLIDROID','dolidroid_screenshot_stats_720x1280.png','',NULL,NULL,'uploaded',NULL,'2019-11-28 16:51:58','2019-11-28 15:51:58',12,NULL,NULL,NULL,NULL,6,NULL,NULL,NULL),(66,'61ec0d999c2460e0a942be9760b7c1fb','8ef12c42fbada32094a633a60f5c84a7',NULL,1,'POS-Eggs-Eggs.jpg','produit/POS-Eggs','Eggs.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 17:04:06','2019-11-28 16:04:06',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(67,'abe8d329cfb52c1ba59867dfb2468047','8a0380cc9887f325e220c0f7503835c7',NULL,1,'POS-Chips-Chips.jpg','produit/POS-Chips','Chips.jpg','',NULL,NULL,'uploaded',NULL,'2019-11-28 17:09:19','2019-11-28 16:09:19',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(71,'1008ec7576e1b970f952044d10245f72','653abb50f7c2cc410dac1fd913ad8769',NULL,1,'BOM1911-0001_bom.odt','bom/BOM1911-0001','','',NULL,NULL,'generated',NULL,'2019-11-28 18:20:01','2020-01-08 15:41:49',12,12,NULL,NULL,NULL,1,NULL,'bom_bom',6),(72,'a0942ded45efc068ca59dd3360cbb0e2','db17ee9f430030fb21a6683d433c7457',NULL,1,'FR-CAR-Carrot.jpg','produit/POS-CARROT','/home/ldestailleur/git/dolibarr_11.0/documents/produit/POS-CARROT/FR-CAR-Carrot.jpg','',NULL,NULL,'unknown',NULL,'2019-11-28 19:02:01','2019-11-28 18:02:01',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(73,'c928f00b0bc1a40061408e63a9c204ee','0221dc3c79e0123b451b5630bf2177b0',NULL,1,'ER1912-0001-IMG_20191219_161331.jpg','expensereport/ER1912-0001','IMG_20191219_161331.jpg','',NULL,NULL,'uploaded',NULL,'2019-12-20 20:04:42','2019-12-20 16:34:05',12,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(74,'4d710f4f262d3caca82b2c7380e0addc','4ff0ba258dc0f8d3b78d919557ee7996',NULL,1,'ER1912-0001.pdf','expensereport/ER1912-0001','','',NULL,NULL,'generated',NULL,'2019-12-20 20:04:46','2019-12-20 16:34:26',12,12,NULL,NULL,NULL,2,NULL,'expensereport',2),(75,'bcb6930c79f5a3f55f9327561a07daa1','0e81807ac4e0380ddd3d841a20f339c2',NULL,1,'CO7001-0027.pdf','commande/CO7001-0027','','',NULL,NULL,'generated',NULL,'2019-12-20 20:42:23','2020-01-15 18:41:17',12,12,NULL,NULL,NULL,2,NULL,'commande',88),(76,'eabd0e0a63029bf40288c3394dcb984c','96cd89d2ba43d4f9f0f19b49a6d3754a','1Hlh7n01E5KY5i9rtvhiq1TYL16JMToN',1,'PR1702-0027.pdf','propale/PR1702-0027','','',NULL,NULL,'generated',NULL,'2019-12-20 20:49:43','2019-12-20 16:50:23',12,12,NULL,NULL,NULL,1,NULL,'propal',29),(77,'69b67f70d71893409d37bbab8af92b70','f8c94ef0d5146049288aa8042ce63892',NULL,1,'FS1301-0001.pdf','facture/FS1301-0001','','',NULL,NULL,'generated',NULL,'2019-12-21 19:40:22','2019-12-21 18:40:22',12,NULL,NULL,NULL,NULL,1,NULL,'facture',148),(78,'d5a97833baecb8e92c859c755ece9666','e511f26c4964058a24535f8db8324f89',NULL,1,'thirdparty.ods','societe/10','','',NULL,NULL,'generated',NULL,'2019-12-21 20:32:17','2019-12-21 19:32:17',12,NULL,NULL,NULL,NULL,1,NULL,'societe',10),(81,'87209bfcfd010c1b6ef3c7fec33d5249','a40fb5e1465053cff2bbcaafc25818c5',NULL,1,'SI2001-0006.pdf','fournisseur/facture/2/2/SI2001-0006','','',NULL,NULL,'generated',NULL,'2020-01-01 17:48:01','2020-01-16 17:09:02',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',22),(82,'1dabc11d324fded7042876ef648c2fde','e272a4e34acef46c0d7c21dd0100e0d1',NULL,1,'SA2001-0001.pdf','fournisseur/facture/3/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 17:49:33','2020-01-01 13:50:41',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',23),(83,'78b31a74494c6e3fb731c291167e5fac','7664e71072c8b51613f12429e5b10b71',NULL,1,'(PROV3).pdf','fournisseur/commande/(PROV3)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:11:15','2020-01-20 11:22:53',12,12,NULL,NULL,NULL,1,NULL,'commande_fournisseur',3),(84,'dae316f89653eb19b2784c4fb41c9488','3ab1a48c8fcf3c9480243949f4ef685f',NULL,1,'SA2001-0001.pdf','fournisseur/facture/4/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:17:15','2020-01-01 16:17:46',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',24),(85,'d0f2428e33e2b6244ac4b72fab4f0f14','45ad94c796cf1918e8888bb906cfea30',NULL,1,'(PROV25).pdf','fournisseur/facture/5/2/(PROV25)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:19:51','2020-01-01 19:19:51',12,NULL,NULL,NULL,NULL,1,NULL,'facture_fourn',25),(86,'bb7830bd179da2e9f9ef3579ea2f8208','cd5145fa64d57ee69a572f9cbc67b15c',NULL,1,'SA2001-0001.pdf','fournisseur/facture/6/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:20:13','2020-01-01 16:20:22',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',26),(87,'66cbad4f05ade84391d4ea3c502fb7a3','872e8072820f9b3014e8250ee7b00f86',NULL,1,'SA2001-0001.pdf','fournisseur/facture/7/2/SA2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-01 20:21:51','2020-01-15 18:23:28',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',27),(88,'78dedfa0065ebb065040515c8a4fe0f4','116c1b16fb98a36f5a429ebe674a5036',NULL,1,'SI2001-0007.pdf','fournisseur/facture/8/2/SI2001-0007','','',NULL,NULL,'generated',NULL,'2020-01-01 20:22:48','2020-01-01 17:20:36',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',28),(89,'2650611699dbc2cb0d6db2c93cb8ff9d','e6f96dca09e39bfeb3003e38eecd4b84',NULL,1,'(PROV29).pdf','fournisseur/facture/9/2/(PROV29)','','',NULL,NULL,'generated',NULL,'2020-01-01 20:50:57','2020-01-01 19:50:57',12,NULL,NULL,NULL,NULL,1,NULL,'facture_fourn',29),(90,'d3d6a55beba28be5ce57e806ad037a70','9f3a682f921c24d07722d259574488ed',NULL,1,'SA2001-0002.pdf','fournisseur/facture/0/3/SA2001-0002','','',NULL,NULL,'generated',NULL,'2020-01-01 20:51:32','2020-01-01 16:51:37',12,12,NULL,NULL,NULL,1,NULL,'facture_fourn',30),(91,'4d9767cf70227675ca1e51996970cca4','707f6a5be123159b4ba3ac5bbc55e12f',NULL,1,'PR2001-0034.pdf','propale/PR2001-0034','','',NULL,NULL,'generated',NULL,'2020-01-01 23:55:35','2020-01-19 13:24:27',12,12,NULL,NULL,NULL,1,NULL,'propal',36),(92,'c3a7802251274920507482a72761c511','be7b12881c652a68f0256e00e22acfc9',NULL,1,'(PROV37).pdf','propale/(PROV37)','','',NULL,NULL,'generated',NULL,'2020-01-06 00:44:16','2020-01-05 20:46:07',12,12,NULL,NULL,NULL,1,NULL,'propal',37),(93,'43e9e215d44cbe8854dc64bfe01a7c1a','218b07855dea60994770bf4608757452',NULL,1,'SI1601-0004.pdf','fournisseur/facture/9/1/SI1601-0004','','',NULL,NULL,'generated',NULL,'2020-01-06 00:48:42','2020-01-05 23:48:42',12,NULL,NULL,NULL,NULL,1,NULL,'facture_fourn',19),(94,'29441461d34abe37158ca6bb35938a3a','6b805071f64924fa1309d51fef1ea839',NULL,1,'courrier_consult.odt','societe/29','','',NULL,NULL,'generated',NULL,'2020-01-06 21:23:24','2020-01-06 17:46:52',12,12,NULL,NULL,NULL,1,NULL,'societe',29),(95,'e5b8ef885741a002f6129051b85e5e09','6603225670e52fcb3a5e2f25de806668',NULL,1,'(PROV38).pdf','propale/(PROV38)','','',NULL,NULL,'generated',NULL,'2020-01-13 17:25:28','2020-01-13 16:25:28',12,NULL,NULL,NULL,NULL,1,NULL,'propal',38),(96,'94c2a18a5f7bd023b512e46a1cc1e5c8','1d9edda94d935fe9d75d5478df4f89ac',NULL,1,'(PROV2).pdf','supplier_proposal/(PROV2)','','',NULL,NULL,'generated',NULL,'2020-01-15 22:48:12','2020-01-20 11:19:25',12,12,NULL,NULL,NULL,1,NULL,'supplier_proposal',2),(97,'72e38084f638adb55e3e621dd3f42ab5','d278e84671f7dc4acc4882f047334846',NULL,1,'AC2001-0001.pdf','facture/AC2001-0001','','',NULL,NULL,'generated',NULL,'2020-01-16 02:22:16','2020-01-16 01:23:11',12,12,NULL,NULL,NULL,1,NULL,'facture',221),(98,'d9ceb752bbb85ea0fb29c8cb27d22e1e','0719ac0dccd4a4e1b8fbdc3a8e9fa7c1',NULL,1,'AC2001-0002.pdf','facture/AC2001-0002','','',NULL,NULL,'generated',NULL,'2020-01-16 02:33:27','2020-01-16 01:36:48',12,12,NULL,NULL,NULL,1,NULL,'facture',224),(99,'33d354694658b4697adcd9a50a292113','8abae3ad7ad4a33ad42ab166ddaee54c',NULL,1,'(PROV225).pdf','facture/(PROV225)','','',NULL,NULL,'generated',NULL,'2020-01-16 02:37:55','2020-01-16 01:37:55',12,NULL,NULL,NULL,NULL,1,NULL,'facture',225),(100,'f4fbae718d9c9bc535d56a6638c1cdc2','df8714b30c43b5766ebb8cf64ef85e16',NULL,1,'(PROV226).pdf','facture/(PROV226)','','',NULL,NULL,'generated',NULL,'2020-01-19 14:21:03','2020-01-19 13:21:21',12,12,NULL,NULL,NULL,1,NULL,'facture',226),(101,'b51a925a795e1652820d987266a31658','30a1d7094b174bbc67824a65cbec5db3',NULL,1,'AC2001-0003.pdf','facture/AC2001-0003','','',NULL,NULL,'generated',NULL,'2020-01-19 14:23:39','2020-01-19 13:51:48',12,12,NULL,NULL,NULL,1,NULL,'facture',227),(102,'1b7f8c128060879ec7f78712fa36ecd0','8df02e7604f77bb8dd6cc1ec7d1d3c90',NULL,1,'AC2001-0004.pdf','facture/AC2001-0004','','',NULL,NULL,'generated',NULL,'2020-01-19 14:49:58','2020-01-19 14:13:07',12,12,NULL,NULL,NULL,1,NULL,'facture',228),(103,'ee00344302cff6530168fb9e08083780','230789608ee4a42a05037f934e706fa5',NULL,1,'(PROV217).pdf','facture/(PROV217)','','',NULL,NULL,'generated',NULL,'2020-01-19 14:53:10','2020-01-20 11:25:41',12,12,NULL,NULL,NULL,1,NULL,'facture',217),(104,'faf6da4cf7cf49275da5786e36b3173c','50acdf0099c27348ede81656e5b3ddf2',NULL,1,'(PROV3).pdf','supplier_proposal/(PROV3)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:06:40','2020-01-20 11:19:06',12,12,NULL,NULL,NULL,1,NULL,'supplier_proposal',3),(105,'d82c57a3335bafcc3fb2b35d9573fe47','73d983b4f3018249d27f391bb33ff8f0',NULL,1,'(PROV14).pdf','fournisseur/commande/(PROV14)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:20:17','2020-01-20 11:20:17',12,NULL,NULL,NULL,NULL,1,NULL,'commande_fournisseur',14),(106,'fbcfde0bfdb8e7184f5e1a72527bc53a','5300dd748dffeb292c4a4fe32f9c2ab6',NULL,1,'(PROV4).pdf','supplier_proposal/(PROV4)','','',NULL,NULL,'generated',NULL,'2020-01-20 12:23:22','2020-01-20 11:24:00',12,12,NULL,NULL,NULL,1,NULL,'supplier_proposal',4),(109,'e409be44e925329a41079f1ddacaa8f1','801b126a0db67b4ff32f36641f3b63b0',NULL,1,'FA1707-0026.pdf','facture/FA1707-0026','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:17','2020-01-21 09:23:17',12,12,NULL,NULL,NULL,1,NULL,'facture',229),(110,'36411c7ab830732de1d07fe824ec9e20','63ba10b5868d702a3d09da900efb0df2',NULL,1,'FA1807-0027.pdf','facture/FA1807-0027','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:28','2020-01-21 09:23:28',12,12,NULL,NULL,NULL,1,NULL,'facture',230),(111,'bfc5abd0ab78849b7e98839d27175fb4','d03351be391a0491047797e13b39e432',NULL,1,'FA1907-0028.pdf','facture/FA1907-0028','','',NULL,NULL,'generated',NULL,'2020-01-21 10:23:49','2020-01-21 09:23:49',12,12,NULL,NULL,NULL,1,NULL,'facture',231),(112,'4615aa05f2a0e8cf79ea3cb9c91e6434','6aec33a4925b66eaba4902eef6f95507',NULL,1,'APPLEPIE-home-bg.jpg','produit/APPLEPIE','/home/ldestailleur/git/dolibarr_14.0/documents/produit/APPLEPIE/APPLEPIE-home-bg.jpg','',NULL,NULL,'unknown',NULL,'2021-04-15 07:37:21','2021-04-15 05:37:21',12,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_ecm_files` ENABLE KEYS */; UNLOCK TABLES; @@ -6123,40 +5794,6 @@ LOCK TABLES `llx_ecm_files_extrafields` WRITE; /*!40000 ALTER TABLE `llx_ecm_files_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_ecommerce_category` --- - -DROP TABLE IF EXISTS `llx_ecommerce_category`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_ecommerce_category` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `type` tinyint(4) NOT NULL DEFAULT 1, - `description` text COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_category` int(11) NOT NULL, - `fk_site` int(11) NOT NULL, - `remote_id` int(11) NOT NULL, - `remote_parent_id` int(11) DEFAULT NULL, - `last_update` datetime DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_ecommerce_category_fk_site_fk_category` (`fk_site`,`fk_category`), - KEY `idx_ecommerce_category_fk_category` (`fk_category`), - KEY `idx_ecommerce_category_fk_site` (`fk_site`) -) ENGINE=InnoDB AUTO_INCREMENT=2268 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Table transition remote site - Dolibarr'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_ecommerce_category` --- - -LOCK TABLES `llx_ecommerce_category` WRITE; -/*!40000 ALTER TABLE `llx_ecommerce_category` DISABLE KEYS */; -INSERT INTO `llx_ecommerce_category` VALUES (2260,'Default Category',0,'',35,2,2,1,'2017-09-22 14:46:27'),(2261,'categ1',0,'',36,2,3,2,'2017-09-23 14:53:15'),(2262,'categ1-a',0,'',37,2,6,3,'2018-09-25 15:11:47'),(2263,'categ1-b',0,'',38,2,7,3,'2017-09-23 14:45:50'),(2264,'categ2',0,'',39,2,4,1,'2017-09-23 14:45:54'),(2265,'categxxx',0,'',40,2,8,4,'2017-09-23 16:53:22'),(2266,'root2',0,'',41,2,9,1,'2017-09-23 16:53:31'),(2267,'root2-b',0,'',42,2,10,9,'2017-09-23 16:53:41'); -/*!40000 ALTER TABLE `llx_ecommerce_category` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_element_contact` -- @@ -6205,7 +5842,7 @@ CREATE TABLE `llx_element_element` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_element_element_idx1` (`fk_source`,`sourcetype`,`fk_target`,`targettype`), KEY `idx_element_element_fk_target` (`fk_target`) -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6214,7 +5851,7 @@ CREATE TABLE `llx_element_element` ( LOCK TABLES `llx_element_element` WRITE; /*!40000 ALTER TABLE `llx_element_element` DISABLE KEYS */; -INSERT INTO `llx_element_element` VALUES (4,1,'order_supplier',20,'invoice_supplier'),(12,1,'shipping',217,'facture'),(5,2,'cabinetmed_cabinetmedcons',216,'facture'),(1,2,'contrat',2,'facture'),(2,2,'propal',1,'commande'),(30,4,'subscription',229,'facture'),(3,5,'commande',1,'shipping'),(13,5,'commande',217,'facture'),(31,5,'subscription',230,'facture'),(32,6,'subscription',231,'facture'),(11,25,'propal',92,'commande'),(9,28,'propal',90,'commande'),(10,29,'propal',91,'commande'),(14,29,'propal',94,'commande'),(15,29,'propal',95,'commande'),(18,34,'propal',96,'commande'),(19,34,'propal',97,'commande'),(26,36,'propal',98,'commande'),(28,36,'propal',99,'commande'),(27,36,'propal',227,'facture'),(29,36,'propal',228,'facture'),(20,62,'commande',220,'facture'),(21,62,'commande',221,'facture'),(22,62,'commande',222,'facture'),(23,62,'commande',223,'facture'),(24,62,'commande',224,'facture'),(25,62,'commande',225,'facture'),(6,75,'commande',2,'shipping'); +INSERT INTO `llx_element_element` VALUES (4,1,'order_supplier',20,'invoice_supplier'),(12,1,'shipping',217,'facture'),(5,2,'cabinetmed_cabinetmedcons',216,'facture'),(1,2,'contrat',2,'facture'),(33,2,'order_supplier',1,'reception'),(2,2,'propal',1,'commande'),(30,4,'subscription',229,'facture'),(3,5,'commande',1,'shipping'),(13,5,'commande',217,'facture'),(31,5,'subscription',230,'facture'),(32,6,'subscription',231,'facture'),(11,25,'propal',92,'commande'),(9,28,'propal',90,'commande'),(10,29,'propal',91,'commande'),(14,29,'propal',94,'commande'),(15,29,'propal',95,'commande'),(18,34,'propal',96,'commande'),(19,34,'propal',97,'commande'),(26,36,'propal',98,'commande'),(28,36,'propal',99,'commande'),(27,36,'propal',227,'facture'),(29,36,'propal',228,'facture'),(20,62,'commande',220,'facture'),(21,62,'commande',221,'facture'),(22,62,'commande',222,'facture'),(23,62,'commande',223,'facture'),(24,62,'commande',224,'facture'),(25,62,'commande',225,'facture'),(6,75,'commande',2,'shipping'); /*!40000 ALTER TABLE `llx_element_element` ENABLE KEYS */; UNLOCK TABLES; @@ -6482,6 +6119,7 @@ CREATE TABLE `llx_entrepot` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `ref` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, + `fk_project` int(11) DEFAULT NULL, `description` text COLLATE utf8_unicode_ci DEFAULT NULL, `lieu` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -6507,7 +6145,7 @@ CREATE TABLE `llx_entrepot` ( LOCK TABLES `llx_entrepot` WRITE; /*!40000 ALTER TABLE `llx_entrepot` DISABLE KEYS */; -INSERT INTO `llx_entrepot` VALUES (1,'2012-07-09 00:31:22','2020-06-12 17:18:30','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,1,NULL,NULL,NULL,'',''),(2,'2012-07-09 00:41:03','2020-06-12 17:18:33','WAREHOUSEPARIS',1,'','Warehouse Paris','','75000','Paris',NULL,1,1,1,NULL,NULL,NULL,'',''),(3,'2012-07-11 16:18:59','2020-06-12 17:18:25','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,2,1,1,NULL,NULL,NULL,'',''),(9,'2017-10-03 11:47:41','2017-10-03 09:47:41','Personal stock Marie Curie',1,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,1,NULL,NULL,0,NULL,NULL),(10,'2017-10-05 09:07:52','2018-07-30 13:52:24','Personal stock Alex Theceo',1,'This warehouse represents personal stock of Alex Theceo','','','','',NULL,3,1,1,NULL,NULL,0,NULL,NULL),(12,'2017-10-05 21:29:35','2017-10-05 19:29:35','Personal stock Charly Commery',1,'This warehouse represents personal stock of Charly Commery','','','','',NULL,1,1,11,NULL,NULL,0,NULL,NULL),(13,'2017-10-05 21:33:33','2018-07-30 13:51:38','Personal stock Sam Scientol',1,'This warehouse represents personal stock of Sam Scientol','','','7500','Paris',NULL,1,0,11,NULL,NULL,0,NULL,NULL),(18,'2018-01-22 17:27:02','2020-06-12 17:18:18','Personal stock Laurent Destailleur',1,'This warehouse represents personal stock of Laurent Destailleur','','','','',NULL,1,1,12,NULL,NULL,NULL,'',''),(19,'2018-07-30 16:50:23','2020-06-12 17:18:12','Personal stock Eldy',1,'This warehouse represents personal stock of Eldy','','','','',NULL,14,1,12,NULL,NULL,NULL,'',''),(20,'2017-02-02 03:55:45','2020-06-12 17:18:55','Personal stock Alex Boston',1,'This warehouse represents personal stock of Alex Boston','PSTOCKALEXB','','','',NULL,14,1,12,NULL,NULL,NULL,'',''); +INSERT INTO `llx_entrepot` VALUES (1,'2012-07-09 00:31:22','2020-06-12 17:18:30','WAREHOUSEHOUSTON',1,NULL,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,1,NULL,NULL,NULL,'',''),(2,'2012-07-09 00:41:03','2020-06-12 17:18:33','WAREHOUSEPARIS',1,NULL,'','Warehouse Paris','','75000','Paris',NULL,1,1,1,NULL,NULL,NULL,'',''),(3,'2012-07-11 16:18:59','2020-06-12 17:18:25','Stock personnel Dupont',1,NULL,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,2,1,1,NULL,NULL,NULL,'',''),(9,'2017-10-03 11:47:41','2017-10-03 09:47:41','Personal stock Marie Curie',1,NULL,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,1,NULL,NULL,0,NULL,NULL),(10,'2017-10-05 09:07:52','2018-07-30 13:52:24','Personal stock Alex Theceo',1,NULL,'This warehouse represents personal stock of Alex Theceo','','','','',NULL,3,1,1,NULL,NULL,0,NULL,NULL),(12,'2017-10-05 21:29:35','2017-10-05 19:29:35','Personal stock Charly Commery',1,NULL,'This warehouse represents personal stock of Charly Commery','','','','',NULL,1,1,11,NULL,NULL,0,NULL,NULL),(13,'2017-10-05 21:33:33','2018-07-30 13:51:38','Personal stock Sam Scientol',1,NULL,'This warehouse represents personal stock of Sam Scientol','','','7500','Paris',NULL,1,0,11,NULL,NULL,0,NULL,NULL),(18,'2018-01-22 17:27:02','2020-06-12 17:18:18','Personal stock Laurent Destailleur',1,NULL,'This warehouse represents personal stock of Laurent Destailleur','','','','',NULL,1,1,12,NULL,NULL,NULL,'',''),(19,'2018-07-30 16:50:23','2020-06-12 17:18:12','Personal stock Eldy',1,NULL,'This warehouse represents personal stock of Eldy','','','','',NULL,14,1,12,NULL,NULL,NULL,'',''),(20,'2017-02-02 03:55:45','2020-06-12 17:18:55','Personal stock Alex Boston',1,NULL,'This warehouse represents personal stock of Alex Boston','PSTOCKALEXB','','','',NULL,14,1,12,NULL,NULL,NULL,'',''); /*!40000 ALTER TABLE `llx_entrepot` ENABLE KEYS */; UNLOCK TABLES; @@ -6651,6 +6289,79 @@ LOCK TABLES `llx_event_element` WRITE; /*!40000 ALTER TABLE `llx_event_element` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_eventorganization_conferenceorboothattendee` +-- + +DROP TABLE IF EXISTS `llx_eventorganization_conferenceorboothattendee`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_eventorganization_conferenceorboothattendee` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, + `fk_soc` int(11) DEFAULT NULL, + `fk_actioncomm` int(11) NOT NULL, + `email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `date_subscription` datetime DEFAULT NULL, + `amount` double DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` smallint(6) NOT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_eventorganization_conferenceorboothattendee` (`fk_soc`,`fk_actioncomm`,`email`), + KEY `idx_eventorganization_conferenceorboothattendee_rowid` (`rowid`), + KEY `idx_eventorganization_conferenceorboothattendee_ref` (`ref`), + KEY `idx_eventorganization_conferenceorboothattendee_fk_soc` (`fk_soc`), + KEY `idx_eventorganization_conferenceorboothattendee_fk_actioncomm` (`fk_actioncomm`), + KEY `idx_eventorganization_conferenceorboothattendee_email` (`email`), + KEY `idx_eventorganization_conferenceorboothattendee_status` (`status`), + CONSTRAINT `fx_eventorganization_conferenceorboothattendee_fk_actioncomm` FOREIGN KEY (`fk_actioncomm`) REFERENCES `llx_actioncomm` (`id`), + CONSTRAINT `fx_eventorganization_conferenceorboothattendee_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_eventorganization_conferenceorboothattendee` +-- + +LOCK TABLES `llx_eventorganization_conferenceorboothattendee` WRITE; +/*!40000 ALTER TABLE `llx_eventorganization_conferenceorboothattendee` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_eventorganization_conferenceorboothattendee` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_eventorganization_conferenceorboothattendee_extrafields` +-- + +DROP TABLE IF EXISTS `llx_eventorganization_conferenceorboothattendee_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_eventorganization_conferenceorboothattendee_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_conferenceorboothattendee_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_eventorganization_conferenceorboothattendee_extrafields` +-- + +LOCK TABLES `llx_eventorganization_conferenceorboothattendee_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_eventorganization_conferenceorboothattendee_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_eventorganization_conferenceorboothattendee_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_eventorganizer_attendee` -- @@ -6804,9 +6515,11 @@ CREATE TABLE `llx_events` ( `user_agent` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_object` int(11) DEFAULT NULL, `prefix_session` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `authentication_method` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_oauth_token` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_events_dateevent` (`dateevent`) -) ENGINE=InnoDB AUTO_INCREMENT=1080 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=1095 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6815,7 +6528,7 @@ CREATE TABLE `llx_events` ( LOCK TABLES `llx_events` WRITE; /*!40000 ALTER TABLE `llx_events` DISABLE KEYS */; -INSERT INTO `llx_events` VALUES (30,'2013-07-18 18:23:06','USER_LOGOUT',1,'2013-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(31,'2013-07-18 18:23:12','USER_LOGIN_FAILED',1,'2013-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(32,'2013-07-18 18:23:17','USER_LOGIN',1,'2013-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(33,'2013-07-18 20:10:51','USER_LOGIN_FAILED',1,'2013-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(34,'2013-07-18 20:10:55','USER_LOGIN',1,'2013-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(35,'2013-07-18 21:18:57','USER_LOGIN',1,'2013-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(36,'2013-07-20 10:34:10','USER_LOGIN',1,'2013-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(37,'2013-07-20 12:36:44','USER_LOGIN',1,'2013-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(38,'2013-07-20 13:20:51','USER_LOGIN_FAILED',1,'2013-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(39,'2013-07-20 13:20:54','USER_LOGIN',1,'2013-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(40,'2013-07-20 15:03:46','USER_LOGIN_FAILED',1,'2013-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(41,'2013-07-20 15:03:55','USER_LOGIN',1,'2013-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(42,'2013-07-20 18:05:05','USER_LOGIN_FAILED',1,'2013-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(43,'2013-07-20 18:05:08','USER_LOGIN',1,'2013-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(44,'2013-07-20 21:08:53','USER_LOGIN_FAILED',1,'2013-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(45,'2013-07-20 21:08:56','USER_LOGIN',1,'2013-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(46,'2013-07-21 01:26:12','USER_LOGIN',1,'2013-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(47,'2013-07-21 22:35:45','USER_LOGIN_FAILED',1,'2013-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(48,'2013-07-21 22:35:49','USER_LOGIN',1,'2013-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(49,'2013-07-26 23:09:47','USER_LOGIN_FAILED',1,'2013-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(50,'2013-07-26 23:09:50','USER_LOGIN',1,'2013-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(51,'2013-07-27 17:02:27','USER_LOGIN_FAILED',1,'2013-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(52,'2013-07-27 17:02:32','USER_LOGIN',1,'2013-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(53,'2013-07-27 23:33:37','USER_LOGIN_FAILED',1,'2013-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(54,'2013-07-27 23:33:41','USER_LOGIN',1,'2013-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(55,'2013-07-28 18:20:36','USER_LOGIN_FAILED',1,'2013-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(56,'2013-07-28 18:20:38','USER_LOGIN',1,'2013-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(57,'2013-07-28 20:13:30','USER_LOGIN_FAILED',1,'2013-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(58,'2013-07-28 20:13:34','USER_LOGIN',1,'2013-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(59,'2013-07-28 20:22:51','USER_LOGIN',1,'2013-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(60,'2013-07-28 23:05:06','USER_LOGIN',1,'2013-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(61,'2013-07-29 20:15:50','USER_LOGIN_FAILED',1,'2013-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(62,'2013-07-29 20:15:53','USER_LOGIN',1,'2013-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(68,'2013-07-29 20:51:01','USER_LOGOUT',1,'2013-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(69,'2013-07-29 20:51:05','USER_LOGIN',1,'2013-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(70,'2013-07-30 08:46:20','USER_LOGIN_FAILED',1,'2013-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(71,'2013-07-30 08:46:38','USER_LOGIN_FAILED',1,'2013-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(72,'2013-07-30 08:46:42','USER_LOGIN',1,'2013-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(73,'2013-07-30 10:05:12','USER_LOGIN_FAILED',1,'2013-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(74,'2013-07-30 10:05:15','USER_LOGIN',1,'2013-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(75,'2013-07-30 12:15:46','USER_LOGIN',1,'2013-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(76,'2013-07-31 22:19:30','USER_LOGIN',1,'2013-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(77,'2013-07-31 23:32:52','USER_LOGIN',1,'2013-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(78,'2013-08-01 01:24:50','USER_LOGIN_FAILED',1,'2013-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(79,'2013-08-01 01:24:54','USER_LOGIN',1,'2013-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(80,'2013-08-01 19:31:36','USER_LOGIN_FAILED',1,'2013-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(81,'2013-08-01 19:31:39','USER_LOGIN',1,'2013-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(82,'2013-08-01 20:01:36','USER_LOGIN',1,'2013-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(83,'2013-08-01 20:52:54','USER_LOGIN_FAILED',1,'2013-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(84,'2013-08-01 20:52:58','USER_LOGIN',1,'2013-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(85,'2013-08-01 21:17:28','USER_LOGIN_FAILED',1,'2013-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(86,'2013-08-01 21:17:31','USER_LOGIN',1,'2013-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(87,'2013-08-04 11:55:17','USER_LOGIN',1,'2013-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(88,'2013-08-04 20:19:03','USER_LOGIN_FAILED',1,'2013-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(89,'2013-08-04 20:19:07','USER_LOGIN',1,'2013-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(90,'2013-08-05 17:51:42','USER_LOGIN_FAILED',1,'2013-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(91,'2013-08-05 17:51:47','USER_LOGIN',1,'2013-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(92,'2013-08-05 17:56:03','USER_LOGIN',1,'2013-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(93,'2013-08-05 17:59:10','USER_LOGIN',1,'2013-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL,NULL),(94,'2013-08-05 18:01:58','USER_LOGIN',1,'2013-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL,NULL),(95,'2013-08-05 19:59:56','USER_LOGIN',1,'2013-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(96,'2013-08-06 18:33:22','USER_LOGIN',1,'2013-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(97,'2013-08-07 00:56:59','USER_LOGIN',1,'2013-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(98,'2013-08-07 22:49:14','USER_LOGIN',1,'2013-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(99,'2013-08-07 23:05:18','USER_LOGOUT',1,'2013-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(105,'2013-08-08 00:41:09','USER_LOGIN',1,'2013-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(106,'2013-08-08 11:58:55','USER_LOGIN',1,'2013-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(107,'2013-08-08 14:35:48','USER_LOGIN',1,'2013-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(108,'2013-08-08 14:36:31','USER_LOGOUT',1,'2013-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(109,'2013-08-08 14:38:28','USER_LOGIN',1,'2013-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(110,'2013-08-08 14:39:02','USER_LOGOUT',1,'2013-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(111,'2013-08-08 14:39:10','USER_LOGIN',1,'2013-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(112,'2013-08-08 14:39:28','USER_LOGOUT',1,'2013-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(113,'2013-08-08 14:39:37','USER_LOGIN',1,'2013-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(114,'2013-08-08 14:50:02','USER_LOGOUT',1,'2013-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(115,'2013-08-08 14:51:45','USER_LOGIN_FAILED',1,'2013-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(116,'2013-08-08 14:51:52','USER_LOGIN',1,'2013-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(117,'2013-08-08 15:09:54','USER_LOGOUT',1,'2013-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(118,'2013-08-08 15:10:19','USER_LOGIN_FAILED',1,'2013-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(119,'2013-08-08 15:10:28','USER_LOGIN',1,'2013-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(121,'2013-08-08 15:14:58','USER_LOGOUT',1,'2013-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(122,'2013-08-08 15:15:00','USER_LOGIN_FAILED',1,'2013-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(123,'2013-08-08 15:17:57','USER_LOGIN',1,'2013-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(124,'2013-08-08 15:35:56','USER_LOGOUT',1,'2013-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(125,'2013-08-08 15:36:05','USER_LOGIN',1,'2013-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(126,'2013-08-08 17:32:42','USER_LOGIN',1,'2013-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL),(127,'2014-12-08 13:49:37','USER_LOGOUT',1,'2014-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(128,'2014-12-08 13:49:42','USER_LOGIN',1,'2014-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(129,'2014-12-08 13:50:12','USER_LOGOUT',1,'2014-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(130,'2014-12-08 13:50:14','USER_LOGIN',1,'2014-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(131,'2014-12-08 13:50:17','USER_LOGOUT',1,'2014-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(132,'2014-12-08 13:52:47','USER_LOGIN',1,'2014-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(133,'2014-12-08 13:53:08','USER_MODIFY',1,'2014-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(134,'2014-12-08 14:08:45','USER_LOGOUT',1,'2014-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(135,'2014-12-08 14:09:09','USER_LOGIN',1,'2014-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(136,'2014-12-08 14:11:43','USER_LOGOUT',1,'2014-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(137,'2014-12-08 14:11:45','USER_LOGIN',1,'2014-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(138,'2014-12-08 14:22:53','USER_LOGOUT',1,'2014-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(139,'2014-12-08 14:22:54','USER_LOGIN',1,'2014-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(140,'2014-12-08 14:23:10','USER_LOGOUT',1,'2014-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(141,'2014-12-08 14:23:11','USER_LOGIN',1,'2014-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(142,'2014-12-08 14:23:49','USER_LOGOUT',1,'2014-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(143,'2014-12-08 14:23:50','USER_LOGIN',1,'2014-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(144,'2014-12-08 14:28:08','USER_LOGOUT',1,'2014-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(145,'2014-12-08 14:35:15','USER_LOGIN',1,'2014-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(146,'2014-12-08 14:35:18','USER_LOGOUT',1,'2014-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(147,'2014-12-08 14:36:07','USER_LOGIN',1,'2014-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(148,'2014-12-08 14:36:09','USER_LOGOUT',1,'2014-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(149,'2014-12-08 14:36:41','USER_LOGIN',1,'2014-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(150,'2014-12-08 15:59:13','USER_LOGIN',1,'2014-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(151,'2014-12-09 11:49:52','USER_LOGIN',1,'2014-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(152,'2014-12-09 13:46:31','USER_LOGIN',1,'2014-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(153,'2014-12-09 19:03:14','USER_LOGIN',1,'2014-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(154,'2014-12-10 00:16:31','USER_LOGIN',1,'2014-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(170,'2014-12-11 22:03:31','USER_LOGIN',1,'2014-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(171,'2014-12-12 00:32:39','USER_LOGIN',1,'2014-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(172,'2014-12-12 10:49:59','USER_LOGIN',1,'2014-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(175,'2014-12-12 10:57:40','USER_MODIFY',1,'2014-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(176,'2014-12-12 13:29:15','USER_LOGIN',1,'2014-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(177,'2014-12-12 13:30:15','USER_LOGIN',1,'2014-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(178,'2014-12-12 13:40:08','USER_LOGOUT',1,'2014-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(179,'2014-12-12 13:40:10','USER_LOGIN',1,'2014-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(180,'2014-12-12 13:40:26','USER_MODIFY',1,'2014-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(181,'2014-12-12 13:40:34','USER_LOGOUT',1,'2014-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(182,'2014-12-12 13:42:23','USER_LOGIN',1,'2014-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(183,'2014-12-12 13:43:02','USER_NEW_PASSWORD',1,'2014-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(184,'2014-12-12 13:43:25','USER_LOGOUT',1,'2014-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(185,'2014-12-12 13:43:27','USER_LOGIN_FAILED',1,'2014-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(186,'2014-12-12 13:43:30','USER_LOGIN',1,'2014-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(187,'2014-12-12 14:52:11','USER_LOGIN',1,'2014-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL),(188,'2014-12-12 17:53:00','USER_LOGIN_FAILED',1,'2014-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(189,'2014-12-12 17:53:07','USER_LOGIN_FAILED',1,'2014-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(190,'2014-12-12 17:53:51','USER_NEW_PASSWORD',1,'2014-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(191,'2014-12-12 17:54:00','USER_LOGIN',1,'2014-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(192,'2014-12-12 17:54:10','USER_NEW_PASSWORD',1,'2014-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(193,'2014-12-12 17:54:10','USER_MODIFY',1,'2014-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(194,'2014-12-12 18:57:09','USER_LOGIN',1,'2014-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(195,'2014-12-12 23:04:08','USER_LOGIN',1,'2014-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(196,'2014-12-17 20:03:14','USER_LOGIN',1,'2014-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(197,'2014-12-17 21:18:45','USER_LOGIN',1,'2014-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(198,'2014-12-17 22:30:08','USER_LOGIN',1,'2014-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(199,'2014-12-18 23:32:03','USER_LOGIN',1,'2014-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(200,'2014-12-19 09:38:03','USER_LOGIN',1,'2014-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(201,'2014-12-19 11:23:35','USER_LOGIN',1,'2014-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(202,'2014-12-19 12:46:22','USER_LOGIN',1,'2014-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(214,'2014-12-19 19:11:31','USER_LOGIN',1,'2014-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(215,'2014-12-21 16:36:57','USER_LOGIN',1,'2014-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(216,'2014-12-21 16:38:43','USER_NEW_PASSWORD',1,'2014-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(217,'2014-12-21 16:38:43','USER_MODIFY',1,'2014-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(218,'2014-12-21 16:38:51','USER_LOGOUT',1,'2014-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(219,'2014-12-21 16:38:55','USER_LOGIN',1,'2014-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(220,'2014-12-21 16:48:18','USER_LOGOUT',1,'2014-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(221,'2014-12-21 16:48:20','USER_LOGIN',1,'2014-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(222,'2014-12-26 18:28:18','USER_LOGIN',1,'2014-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(223,'2014-12-26 20:00:24','USER_LOGIN',1,'2014-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(224,'2014-12-27 01:10:27','USER_LOGIN',1,'2014-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(225,'2014-12-28 19:12:08','USER_LOGIN',1,'2014-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(226,'2014-12-28 20:16:58','USER_LOGIN',1,'2014-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(227,'2014-12-29 14:35:46','USER_LOGIN',1,'2014-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(228,'2014-12-29 14:37:59','USER_LOGOUT',1,'2014-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(229,'2014-12-29 14:38:00','USER_LOGIN',1,'2014-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(230,'2014-12-29 17:16:48','USER_LOGIN',1,'2014-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(231,'2014-12-31 12:02:59','USER_LOGIN',1,'2014-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(232,'2015-01-02 20:32:51','USER_LOGIN',1,'2015-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL,NULL),(233,'2015-01-02 20:58:59','USER_LOGIN',1,'2015-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(234,'2015-01-03 09:25:07','USER_LOGIN',1,'2015-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(235,'2015-01-03 19:39:31','USER_LOGIN',1,'2015-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(236,'2015-01-04 22:40:19','USER_LOGIN',1,'2015-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(237,'2015-01-05 12:59:59','USER_LOGIN',1,'2015-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(238,'2015-01-05 15:28:52','USER_LOGIN',1,'2015-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(239,'2015-01-05 17:02:08','USER_LOGIN',1,'2015-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(240,'2015-01-06 12:13:33','USER_LOGIN',1,'2015-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(241,'2015-01-07 01:21:15','USER_LOGIN',1,'2015-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(242,'2015-01-07 01:46:31','USER_LOGOUT',1,'2015-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(243,'2015-01-07 19:54:50','USER_LOGIN',1,'2015-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(244,'2015-01-08 21:55:01','USER_LOGIN',1,'2015-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(245,'2015-01-09 11:13:28','USER_LOGIN',1,'2015-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(246,'2015-01-10 18:30:46','USER_LOGIN',1,'2015-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(247,'2015-01-11 18:03:26','USER_LOGIN',1,'2015-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(248,'2015-01-12 11:15:04','USER_LOGIN',1,'2015-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(249,'2015-01-12 14:42:44','USER_LOGIN',1,'2015-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(250,'2015-01-13 12:07:17','USER_LOGIN',1,'2015-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(251,'2015-01-13 17:37:58','USER_LOGIN',1,'2015-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(252,'2015-01-13 19:24:21','USER_LOGIN',1,'2015-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(253,'2015-01-13 19:29:19','USER_LOGOUT',1,'2015-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(254,'2015-01-13 21:39:39','USER_LOGIN',1,'2015-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(255,'2015-01-14 00:52:21','USER_LOGIN',1,'2015-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL),(256,'2015-01-16 11:34:31','USER_LOGIN',1,'2015-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(257,'2015-01-16 15:36:21','USER_LOGIN',1,'2015-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(258,'2015-01-16 19:17:36','USER_LOGIN',1,'2015-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(259,'2015-01-16 19:48:08','GROUP_CREATE',1,'2015-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(260,'2015-01-16 21:48:53','USER_LOGIN',1,'2015-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(261,'2015-01-17 19:55:53','USER_LOGIN',1,'2015-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(262,'2015-01-18 09:48:01','USER_LOGIN',1,'2015-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(263,'2015-01-18 13:22:36','USER_LOGIN',1,'2015-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(264,'2015-01-18 16:10:23','USER_LOGIN',1,'2015-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(265,'2015-01-18 17:41:40','USER_LOGIN',1,'2015-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(266,'2015-01-19 14:33:48','USER_LOGIN',1,'2015-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(267,'2015-01-19 16:47:43','USER_LOGIN',1,'2015-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(268,'2015-01-19 16:59:43','USER_LOGIN',1,'2015-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(269,'2015-01-19 17:00:22','USER_LOGIN',1,'2015-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(270,'2015-01-19 17:04:16','USER_LOGOUT',1,'2015-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(271,'2015-01-19 17:04:18','USER_LOGIN',1,'2015-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(272,'2015-01-20 00:34:19','USER_LOGIN',1,'2015-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(273,'2015-01-21 11:54:17','USER_LOGIN',1,'2015-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(274,'2015-01-21 13:48:15','USER_LOGIN',1,'2015-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(275,'2015-01-21 14:30:22','USER_LOGIN',1,'2015-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(276,'2015-01-21 15:10:46','USER_LOGIN',1,'2015-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(277,'2015-01-21 17:27:43','USER_LOGIN',1,'2015-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(278,'2015-01-21 21:48:15','USER_LOGIN',1,'2015-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(279,'2015-01-21 21:50:42','USER_LOGIN',1,'2015-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL),(280,'2015-01-23 09:28:26','USER_LOGIN',1,'2015-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(281,'2015-01-23 13:21:57','USER_LOGIN',1,'2015-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(282,'2015-01-23 16:52:00','USER_LOGOUT',1,'2015-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(283,'2015-01-23 16:52:05','USER_LOGIN_FAILED',1,'2015-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(284,'2015-01-23 16:52:09','USER_LOGIN',1,'2015-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(285,'2015-01-23 16:52:27','USER_CREATE',1,'2015-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(286,'2015-01-23 16:52:27','USER_NEW_PASSWORD',1,'2015-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(287,'2015-01-23 16:52:37','USER_CREATE',1,'2015-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(288,'2015-01-23 16:52:37','USER_NEW_PASSWORD',1,'2015-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(289,'2015-01-23 16:53:15','USER_LOGOUT',1,'2015-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(290,'2015-01-23 16:53:20','USER_LOGIN',1,'2015-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(291,'2015-01-23 19:16:58','USER_LOGIN',1,'2015-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(292,'2015-01-26 10:54:07','USER_LOGIN',1,'2015-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(293,'2015-01-29 10:15:36','USER_LOGIN',1,'2015-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(294,'2015-01-30 17:42:50','USER_LOGIN',1,'2015-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL),(295,'2015-02-01 08:49:55','USER_LOGIN',1,'2015-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(296,'2015-02-01 08:51:57','USER_LOGOUT',1,'2015-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(297,'2015-02-01 08:52:39','USER_LOGIN',1,'2015-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(298,'2015-02-01 21:03:01','USER_LOGIN',1,'2015-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(299,'2015-02-10 19:48:39','USER_LOGIN',1,'2015-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(300,'2015-02-10 20:46:48','USER_LOGIN',1,'2015-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(301,'2015-02-10 21:39:23','USER_LOGIN',1,'2015-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(302,'2015-02-11 19:00:13','USER_LOGIN',1,'2015-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(303,'2015-02-11 19:43:44','USER_LOGIN_FAILED',1,'2015-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(304,'2015-02-11 19:44:01','USER_LOGIN',1,'2015-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(305,'2015-02-12 00:27:35','USER_LOGIN',1,'2015-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(306,'2015-02-12 00:27:38','USER_LOGOUT',1,'2015-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(307,'2015-02-12 00:28:07','USER_LOGIN',1,'2015-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(308,'2015-02-12 00:28:09','USER_LOGOUT',1,'2015-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(309,'2015-02-12 00:28:26','USER_LOGIN',1,'2015-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(310,'2015-02-12 00:28:30','USER_LOGOUT',1,'2015-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(311,'2015-02-12 12:42:15','USER_LOGIN',1,'2015-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL),(312,'2015-02-12 13:46:16','USER_LOGIN',1,'2015-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(313,'2015-02-12 14:54:28','USER_LOGIN',1,'2015-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(314,'2015-02-12 16:04:46','USER_LOGIN',1,'2015-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(315,'2015-02-13 14:02:43','USER_LOGIN',1,'2015-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(316,'2015-02-13 14:48:30','USER_LOGIN',1,'2015-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(317,'2015-02-13 17:44:53','USER_LOGIN',1,'2015-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(318,'2015-02-15 08:44:36','USER_LOGIN',1,'2015-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(319,'2015-02-15 08:53:20','USER_LOGIN',1,'2015-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(320,'2015-02-16 19:10:28','USER_LOGIN',1,'2015-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(321,'2015-02-16 19:22:40','USER_CREATE',1,'2015-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(322,'2015-02-16 19:22:40','USER_NEW_PASSWORD',1,'2015-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(323,'2015-02-16 19:48:15','USER_CREATE',1,'2015-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(324,'2015-02-16 19:48:15','USER_NEW_PASSWORD',1,'2015-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(325,'2015-02-16 19:50:08','USER_CREATE',1,'2015-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(326,'2015-02-16 19:50:08','USER_NEW_PASSWORD',1,'2015-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(327,'2015-02-16 21:20:03','USER_LOGIN',1,'2015-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(328,'2015-02-17 14:30:51','USER_LOGIN',1,'2015-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(329,'2015-02-17 17:21:22','USER_LOGIN',1,'2015-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(330,'2015-02-17 17:48:43','USER_MODIFY',1,'2015-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(331,'2015-02-17 17:48:47','USER_MODIFY',1,'2015-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(332,'2015-02-17 17:48:51','USER_MODIFY',1,'2015-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(333,'2015-02-17 17:48:56','USER_MODIFY',1,'2015-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(334,'2015-02-18 22:00:01','USER_LOGIN',1,'2015-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(335,'2015-02-19 08:19:52','USER_LOGIN',1,'2015-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(336,'2015-02-19 22:00:52','USER_LOGIN',1,'2015-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(337,'2015-02-20 09:34:52','USER_LOGIN',1,'2015-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(338,'2015-02-20 13:12:28','USER_LOGIN',1,'2015-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(339,'2015-02-20 17:19:44','USER_LOGIN',1,'2015-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(340,'2015-02-20 19:07:21','USER_MODIFY',1,'2015-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(341,'2015-02-20 19:47:17','USER_LOGIN',1,'2015-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(342,'2015-02-20 19:48:01','USER_MODIFY',1,'2015-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(343,'2015-02-21 08:27:07','USER_LOGIN',1,'2015-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(344,'2015-02-23 13:34:13','USER_LOGIN',1,'2015-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL),(345,'2015-02-24 01:06:41','USER_LOGIN_FAILED',1,'2015-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(346,'2015-02-24 01:06:45','USER_LOGIN_FAILED',1,'2015-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(347,'2015-02-24 01:06:55','USER_LOGIN_FAILED',1,'2015-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(348,'2015-02-24 01:07:03','USER_LOGIN_FAILED',1,'2015-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(349,'2015-02-24 01:07:21','USER_LOGIN_FAILED',1,'2015-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(350,'2015-02-24 01:08:12','USER_LOGIN_FAILED',1,'2015-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(351,'2015-02-24 01:08:42','USER_LOGIN_FAILED',1,'2015-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(352,'2015-02-24 01:08:50','USER_LOGIN_FAILED',1,'2015-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(353,'2015-02-24 01:09:08','USER_LOGIN_FAILED',1,'2015-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(354,'2015-02-24 01:09:42','USER_LOGIN_FAILED',1,'2015-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(355,'2015-02-24 01:09:50','USER_LOGIN_FAILED',1,'2015-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(356,'2015-02-24 01:10:05','USER_LOGIN_FAILED',1,'2015-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(357,'2015-02-24 01:10:22','USER_LOGIN_FAILED',1,'2015-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(358,'2015-02-24 01:10:30','USER_LOGIN_FAILED',1,'2015-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(359,'2015-02-24 01:10:56','USER_LOGIN_FAILED',1,'2015-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(360,'2015-02-24 01:11:26','USER_LOGIN_FAILED',1,'2015-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(361,'2015-02-24 01:12:06','USER_LOGIN_FAILED',1,'2015-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(362,'2015-02-24 01:21:14','USER_LOGIN_FAILED',1,'2015-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(363,'2015-02-24 01:21:25','USER_LOGIN_FAILED',1,'2015-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(364,'2015-02-24 01:21:54','USER_LOGIN_FAILED',1,'2015-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(365,'2015-02-24 01:22:14','USER_LOGIN_FAILED',1,'2015-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(366,'2015-02-24 01:22:37','USER_LOGIN_FAILED',1,'2015-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(367,'2015-02-24 01:23:01','USER_LOGIN_FAILED',1,'2015-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(368,'2015-02-24 01:23:39','USER_LOGIN_FAILED',1,'2015-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(369,'2015-02-24 01:24:04','USER_LOGIN_FAILED',1,'2015-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(370,'2015-02-24 01:24:39','USER_LOGIN_FAILED',1,'2015-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(371,'2015-02-24 01:25:01','USER_LOGIN_FAILED',1,'2015-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(372,'2015-02-24 01:25:12','USER_LOGIN_FAILED',1,'2015-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(373,'2015-02-24 01:27:30','USER_LOGIN_FAILED',1,'2015-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(374,'2015-02-24 01:28:00','USER_LOGIN_FAILED',1,'2015-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(375,'2015-02-24 01:28:35','USER_LOGIN_FAILED',1,'2015-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(376,'2015-02-24 01:29:03','USER_LOGIN_FAILED',1,'2015-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(377,'2015-02-24 01:29:55','USER_LOGIN_FAILED',1,'2015-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(378,'2015-02-24 01:32:40','USER_LOGIN_FAILED',1,'2015-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(379,'2015-02-24 01:39:33','USER_LOGIN_FAILED',1,'2015-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(380,'2015-02-24 01:39:38','USER_LOGIN_FAILED',1,'2015-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(381,'2015-02-24 01:39:47','USER_LOGIN_FAILED',1,'2015-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(382,'2015-02-24 01:40:54','USER_LOGIN_FAILED',1,'2015-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(383,'2015-02-24 01:47:57','USER_LOGIN_FAILED',1,'2015-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(384,'2015-02-24 01:48:05','USER_LOGIN_FAILED',1,'2015-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(385,'2015-02-24 01:48:07','USER_LOGIN_FAILED',1,'2015-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(386,'2015-02-24 01:48:35','USER_LOGIN',1,'2015-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(387,'2015-02-24 01:56:32','USER_LOGIN',1,'2015-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL),(388,'2015-02-24 02:05:55','USER_LOGOUT',1,'2015-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(389,'2015-02-24 02:39:52','USER_LOGIN',1,'2015-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(390,'2015-02-24 02:51:10','USER_LOGOUT',1,'2015-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(391,'2015-02-24 12:46:41','USER_LOGIN',1,'2015-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(392,'2015-02-24 12:46:52','USER_LOGOUT',1,'2015-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(393,'2015-02-24 12:46:56','USER_LOGIN',1,'2015-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(394,'2015-02-24 12:47:56','USER_LOGOUT',1,'2015-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(395,'2015-02-24 12:48:00','USER_LOGIN',1,'2015-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(396,'2015-02-24 12:48:11','USER_LOGOUT',1,'2015-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(397,'2015-02-24 12:48:32','USER_LOGIN',1,'2015-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(398,'2015-02-24 12:52:22','USER_LOGOUT',1,'2015-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(399,'2015-02-24 12:52:27','USER_LOGIN',1,'2015-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(400,'2015-02-24 12:52:54','USER_LOGOUT',1,'2015-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(401,'2015-02-24 12:52:59','USER_LOGIN',1,'2015-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(402,'2015-02-24 12:55:39','USER_LOGOUT',1,'2015-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(403,'2015-02-24 12:55:59','USER_LOGIN',1,'2015-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(404,'2015-02-24 12:56:07','USER_LOGOUT',1,'2015-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(405,'2015-02-24 12:56:23','USER_LOGIN',1,'2015-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(406,'2015-02-24 12:56:46','USER_LOGOUT',1,'2015-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(407,'2015-02-24 12:58:30','USER_LOGIN',1,'2015-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(408,'2015-02-24 12:58:33','USER_LOGOUT',1,'2015-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(409,'2015-02-24 12:58:51','USER_LOGIN',1,'2015-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(410,'2015-02-24 12:58:58','USER_LOGOUT',1,'2015-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(411,'2015-02-24 13:18:53','USER_LOGIN',1,'2015-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(412,'2015-02-24 13:19:52','USER_LOGOUT',1,'2015-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(413,'2015-02-24 15:39:31','USER_LOGIN_FAILED',1,'2015-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL,NULL),(414,'2015-02-24 15:42:07','USER_LOGIN',1,'2015-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL,NULL),(415,'2015-02-24 15:42:52','USER_LOGOUT',1,'2015-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL),(416,'2015-02-24 16:04:21','USER_LOGIN',1,'2015-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL),(417,'2015-02-24 16:11:28','USER_LOGIN_FAILED',1,'2015-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL),(418,'2015-02-24 16:11:37','USER_LOGIN',1,'2015-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL),(419,'2015-02-24 16:36:52','USER_LOGOUT',1,'2015-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL),(420,'2015-02-24 16:40:37','USER_LOGIN',1,'2015-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(421,'2015-02-24 16:57:16','USER_LOGIN',1,'2015-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL),(422,'2015-02-24 17:01:30','USER_LOGOUT',1,'2015-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL),(423,'2015-02-24 17:02:33','USER_LOGIN',1,'2015-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(424,'2015-02-24 17:14:22','USER_LOGOUT',1,'2015-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(425,'2015-02-24 17:15:07','USER_LOGIN_FAILED',1,'2015-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(426,'2015-02-24 17:15:20','USER_LOGIN',1,'2015-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(427,'2015-02-24 17:20:14','USER_LOGIN',1,'2015-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(428,'2015-02-24 17:20:51','USER_LOGIN',1,'2015-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(429,'2015-02-24 17:20:54','USER_LOGOUT',1,'2015-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(430,'2015-02-24 17:21:19','USER_LOGIN',1,'2015-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(431,'2015-02-24 17:32:35','USER_LOGIN',1,'2015-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL),(432,'2015-02-24 18:28:48','USER_LOGIN',1,'2015-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(433,'2015-02-24 18:29:27','USER_LOGOUT',1,'2015-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL),(434,'2015-02-24 18:29:32','USER_LOGIN',1,'2015-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL),(435,'2015-02-24 20:13:13','USER_LOGOUT',1,'2015-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(436,'2015-02-24 20:13:17','USER_LOGIN',1,'2015-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(437,'2015-02-25 08:57:16','USER_LOGIN',1,'2015-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(438,'2015-02-25 08:57:59','USER_LOGOUT',1,'2015-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(439,'2015-02-25 09:15:02','USER_LOGIN',1,'2015-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(440,'2015-02-25 09:15:50','USER_LOGOUT',1,'2015-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(441,'2015-02-25 09:15:57','USER_LOGIN',1,'2015-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(442,'2015-02-25 09:16:12','USER_LOGOUT',1,'2015-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(443,'2015-02-25 09:16:19','USER_LOGIN',1,'2015-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(444,'2015-02-25 09:16:25','USER_LOGOUT',1,'2015-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(445,'2015-02-25 09:16:39','USER_LOGIN_FAILED',1,'2015-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(446,'2015-02-25 09:16:42','USER_LOGIN_FAILED',1,'2015-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(447,'2015-02-25 09:16:54','USER_LOGIN_FAILED',1,'2015-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(448,'2015-02-25 09:17:53','USER_LOGIN',1,'2015-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(449,'2015-02-25 09:18:37','USER_LOGOUT',1,'2015-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(450,'2015-02-25 09:18:41','USER_LOGIN',1,'2015-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(451,'2015-02-25 09:18:47','USER_LOGOUT',1,'2015-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(452,'2015-02-25 10:05:34','USER_LOGIN',1,'2015-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(453,'2015-02-26 21:51:40','USER_LOGIN',1,'2015-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(454,'2015-02-26 23:30:06','USER_LOGIN',1,'2015-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(455,'2015-02-27 14:13:11','USER_LOGIN',1,'2015-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(456,'2015-02-27 18:12:06','USER_LOGIN_FAILED',1,'2015-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(457,'2015-02-27 18:12:10','USER_LOGIN',1,'2015-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(458,'2015-02-27 20:20:08','USER_LOGIN',1,'2015-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(459,'2015-03-01 22:12:03','USER_LOGIN',1,'2015-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(460,'2015-03-02 11:45:50','USER_LOGIN',1,'2015-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(461,'2015-03-02 15:53:51','USER_LOGIN_FAILED',1,'2015-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(462,'2015-03-02 15:53:53','USER_LOGIN',1,'2015-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(463,'2015-03-02 18:32:32','USER_LOGIN',1,'2015-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(464,'2015-03-02 22:59:36','USER_LOGIN',1,'2015-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(465,'2015-03-03 16:26:26','USER_LOGIN',1,'2015-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(466,'2015-03-03 22:50:27','USER_LOGIN',1,'2015-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(467,'2015-03-04 08:29:27','USER_LOGIN',1,'2015-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(468,'2015-03-04 18:27:28','USER_LOGIN',1,'2015-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL,NULL),(469,'2015-03-04 19:27:23','USER_LOGIN',1,'2015-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL,NULL),(470,'2015-03-04 19:35:14','USER_LOGIN',1,'2015-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(471,'2015-03-04 19:55:49','USER_LOGIN',1,'2015-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL,NULL),(472,'2015-03-04 21:16:13','USER_LOGIN',1,'2015-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(473,'2015-03-05 10:17:30','USER_LOGIN',1,'2015-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(474,'2015-03-05 11:02:43','USER_LOGIN',1,'2015-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(475,'2015-03-05 23:14:39','USER_LOGIN',1,'2015-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(476,'2015-03-06 08:58:57','USER_LOGIN',1,'2015-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(477,'2015-03-06 14:29:40','USER_LOGIN',1,'2015-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(478,'2015-03-06 21:53:02','USER_LOGIN',1,'2015-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(479,'2015-03-07 21:14:39','USER_LOGIN',1,'2015-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(480,'2015-03-08 00:06:05','USER_LOGIN',1,'2015-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(481,'2015-03-08 01:38:13','USER_LOGIN',1,'2015-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(482,'2015-03-08 08:59:50','USER_LOGIN',1,'2015-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(483,'2015-03-09 12:08:51','USER_LOGIN',1,'2015-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(484,'2015-03-09 15:19:53','USER_LOGIN',1,'2015-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(495,'2015-03-09 18:06:21','USER_LOGIN',1,'2015-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(496,'2015-03-09 20:01:24','USER_LOGIN',1,'2015-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(497,'2015-03-09 23:36:45','USER_LOGIN',1,'2015-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(498,'2015-03-10 14:37:13','USER_LOGIN',1,'2015-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(499,'2015-03-10 17:54:12','USER_LOGIN',1,'2015-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(500,'2015-03-11 08:57:09','USER_LOGIN',1,'2015-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(501,'2015-03-11 22:05:13','USER_LOGIN',1,'2015-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(502,'2015-03-12 08:34:27','USER_LOGIN',1,'2015-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(503,'2015-03-13 09:11:02','USER_LOGIN',1,'2015-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(504,'2015-03-13 10:02:11','USER_LOGIN',1,'2015-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(505,'2015-03-13 13:20:58','USER_LOGIN',1,'2015-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(506,'2015-03-13 16:19:28','USER_LOGIN',1,'2015-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(507,'2015-03-13 18:34:30','USER_LOGIN',1,'2015-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(508,'2015-03-14 08:25:02','USER_LOGIN',1,'2015-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(509,'2015-03-14 19:15:22','USER_LOGIN',1,'2015-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(510,'2015-03-14 21:58:53','USER_LOGIN',1,'2015-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(511,'2015-03-14 21:58:59','USER_LOGOUT',1,'2015-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(512,'2015-03-14 21:59:07','USER_LOGIN',1,'2015-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(513,'2015-03-14 22:58:22','USER_LOGOUT',1,'2015-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(514,'2015-03-14 23:00:25','USER_LOGIN',1,'2015-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(515,'2015-03-16 12:14:28','USER_LOGIN',1,'2015-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(516,'2015-03-16 16:09:01','USER_LOGIN',1,'2015-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(517,'2015-03-16 16:57:11','USER_LOGIN',1,'2015-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(518,'2015-03-16 19:31:31','USER_LOGIN',1,'2015-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL),(519,'2015-03-17 17:44:39','USER_LOGIN',1,'2015-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(520,'2015-03-17 20:40:57','USER_LOGIN',1,'2015-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(521,'2015-03-17 23:14:05','USER_LOGIN',1,'2015-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(522,'2015-03-17 23:28:47','USER_LOGOUT',1,'2015-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(523,'2015-03-17 23:28:54','USER_LOGIN',1,'2015-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(524,'2015-03-18 17:37:30','USER_LOGIN',1,'2015-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(525,'2015-03-18 18:11:37','USER_LOGIN',1,'2015-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(526,'2015-03-19 08:35:08','USER_LOGIN',1,'2015-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(527,'2015-03-19 09:20:23','USER_LOGIN',1,'2015-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(528,'2015-03-20 13:17:13','USER_LOGIN',1,'2015-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(529,'2015-03-20 14:44:31','USER_LOGIN',1,'2015-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(530,'2015-03-20 18:24:25','USER_LOGIN',1,'2015-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(531,'2015-03-20 19:15:54','USER_LOGIN',1,'2015-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(532,'2015-03-21 18:40:47','USER_LOGIN',1,'2015-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(533,'2015-03-21 21:42:24','USER_LOGIN',1,'2015-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(534,'2015-03-22 08:39:23','USER_LOGIN',1,'2015-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(535,'2015-03-23 13:04:55','USER_LOGIN',1,'2015-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(536,'2015-03-23 15:47:43','USER_LOGIN',1,'2015-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(537,'2015-03-23 22:56:36','USER_LOGIN',1,'2015-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(538,'2015-03-24 01:22:32','USER_LOGIN',1,'2015-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(539,'2015-03-24 14:40:42','USER_LOGIN',1,'2015-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(540,'2015-03-24 15:30:26','USER_LOGOUT',1,'2015-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(541,'2015-03-24 15:30:29','USER_LOGIN',1,'2015-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(542,'2015-03-24 15:49:40','USER_LOGOUT',1,'2015-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(543,'2015-03-24 15:49:48','USER_LOGIN',1,'2015-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(544,'2015-03-24 15:52:35','USER_MODIFY',1,'2015-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(545,'2015-03-24 15:52:52','USER_MODIFY',1,'2015-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(546,'2015-03-24 15:53:09','USER_MODIFY',1,'2015-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(547,'2015-03-24 15:53:23','USER_MODIFY',1,'2015-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(548,'2015-03-24 16:00:04','USER_MODIFY',1,'2015-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(549,'2015-03-24 16:01:50','USER_MODIFY',1,'2015-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(550,'2015-03-24 16:10:14','USER_MODIFY',1,'2015-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(551,'2015-03-24 16:55:13','USER_LOGIN',1,'2015-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(552,'2015-03-24 17:44:29','USER_LOGIN',1,'2015-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL),(553,'2015-09-08 23:06:26','USER_LOGIN',1,'2015-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL,NULL),(554,'2015-10-21 22:32:28','USER_LOGIN',1,'2015-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL,NULL),(555,'2015-10-21 22:32:48','USER_LOGIN',1,'2015-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL,NULL),(556,'2015-11-07 00:01:51','USER_LOGIN',1,'2015-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL,NULL),(557,'2016-03-02 15:21:07','USER_LOGIN',1,'2016-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL),(558,'2016-03-02 15:36:53','USER_LOGIN',1,'2016-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL),(559,'2016-03-02 18:54:23','USER_LOGIN',1,'2016-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL),(560,'2016-03-02 19:11:17','USER_LOGIN',1,'2016-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL),(561,'2016-03-03 18:19:24','USER_LOGIN',1,'2016-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL),(562,'2016-12-21 12:51:38','USER_LOGIN',1,'2016-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL,NULL),(563,'2016-12-21 19:52:09','USER_LOGIN',1,'2016-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL,NULL),(566,'2017-10-03 08:49:43','USER_NEW_PASSWORD',1,'2017-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(567,'2017-10-03 08:49:43','USER_MODIFY',1,'2017-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(568,'2017-10-03 09:03:12','USER_MODIFY',1,'2017-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(569,'2017-10-03 09:03:42','USER_MODIFY',1,'2017-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(570,'2017-10-03 09:07:36','USER_MODIFY',1,'2017-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(571,'2017-10-03 09:08:58','USER_NEW_PASSWORD',1,'2017-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(572,'2017-10-03 09:08:58','USER_MODIFY',1,'2017-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(573,'2017-10-03 09:09:23','USER_MODIFY',1,'2017-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(574,'2017-10-03 09:11:04','USER_NEW_PASSWORD',1,'2017-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(575,'2017-10-03 09:11:04','USER_MODIFY',1,'2017-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(576,'2017-10-03 09:11:53','USER_MODIFY',1,'2017-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(577,'2017-10-03 09:42:12','USER_LOGIN_FAILED',1,'2017-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(578,'2017-10-03 09:42:19','USER_LOGIN_FAILED',1,'2017-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(579,'2017-10-03 09:42:42','USER_LOGIN_FAILED',1,'2017-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(580,'2017-10-03 09:43:50','USER_LOGIN',1,'2017-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(581,'2017-10-03 09:44:44','GROUP_MODIFY',1,'2017-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(582,'2017-10-03 09:46:25','GROUP_CREATE',1,'2017-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(583,'2017-10-03 09:46:46','GROUP_CREATE',1,'2017-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(584,'2017-10-03 09:47:41','USER_CREATE',1,'2017-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(585,'2017-10-03 09:47:41','USER_NEW_PASSWORD',1,'2017-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(586,'2017-10-03 09:47:53','USER_MODIFY',1,'2017-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(587,'2017-10-03 09:48:32','USER_DELETE',1,'2017-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(588,'2017-10-03 09:48:52','USER_MODIFY',1,'2017-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(589,'2017-10-03 10:01:28','USER_MODIFY',1,'2017-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(590,'2017-10-03 10:01:39','USER_MODIFY',1,'2017-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(591,'2017-10-05 06:32:38','USER_LOGIN_FAILED',1,'2017-10-05 08:32:38',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(592,'2017-10-05 06:32:44','USER_LOGIN',1,'2017-10-05 08:32:44',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(593,'2017-10-05 07:07:52','USER_CREATE',1,'2017-10-05 09:07:52',1,'User atheceo created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(594,'2017-10-05 07:07:52','USER_NEW_PASSWORD',1,'2017-10-05 09:07:52',1,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(595,'2017-10-05 07:09:08','USER_NEW_PASSWORD',1,'2017-10-05 09:09:08',1,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(596,'2017-10-05 07:09:08','USER_MODIFY',1,'2017-10-05 09:09:08',1,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(597,'2017-10-05 07:09:46','USER_CREATE',1,'2017-10-05 09:09:46',1,'User admin created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(598,'2017-10-05 07:09:46','USER_NEW_PASSWORD',1,'2017-10-05 09:09:46',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(599,'2017-10-05 07:10:20','USER_MODIFY',1,'2017-10-05 09:10:20',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(600,'2017-10-05 07:10:48','USER_MODIFY',1,'2017-10-05 09:10:48',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(601,'2017-10-05 07:11:22','USER_NEW_PASSWORD',1,'2017-10-05 09:11:22',1,'Password change for bbookkeeper','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(602,'2017-10-05 07:11:22','USER_MODIFY',1,'2017-10-05 09:11:22',1,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(603,'2017-10-05 07:12:37','USER_MODIFY',1,'2017-10-05 09:12:37',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(604,'2017-10-05 07:13:27','USER_MODIFY',1,'2017-10-05 09:13:27',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(605,'2017-10-05 07:13:52','USER_MODIFY',1,'2017-10-05 09:13:52',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(606,'2017-10-05 07:14:35','USER_LOGOUT',1,'2017-10-05 09:14:35',1,'(UserLogoff,aeinstein)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(607,'2017-10-05 07:14:40','USER_LOGIN_FAILED',1,'2017-10-05 09:14:40',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(608,'2017-10-05 07:14:44','USER_LOGIN_FAILED',1,'2017-10-05 09:14:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(609,'2017-10-05 07:14:49','USER_LOGIN',1,'2017-10-05 09:14:49',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(610,'2017-10-05 07:57:18','USER_MODIFY',1,'2017-10-05 09:57:18',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(611,'2017-10-05 08:06:54','USER_LOGOUT',1,'2017-10-05 10:06:54',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(612,'2017-10-05 08:07:03','USER_LOGIN',1,'2017-10-05 10:07:03',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(613,'2017-10-05 19:18:46','USER_LOGIN',1,'2017-10-05 21:18:46',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(614,'2017-10-05 19:29:35','USER_CREATE',1,'2017-10-05 21:29:35',11,'User ccommercy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(615,'2017-10-05 19:29:35','USER_NEW_PASSWORD',1,'2017-10-05 21:29:35',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(616,'2017-10-05 19:30:13','GROUP_CREATE',1,'2017-10-05 21:30:13',11,'Group Commercial created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(617,'2017-10-05 19:31:37','USER_NEW_PASSWORD',1,'2017-10-05 21:31:37',11,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(618,'2017-10-05 19:31:37','USER_MODIFY',1,'2017-10-05 21:31:37',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(619,'2017-10-05 19:32:00','USER_MODIFY',1,'2017-10-05 21:32:00',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(620,'2017-10-05 19:33:33','USER_CREATE',1,'2017-10-05 21:33:33',11,'User sscientol created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(621,'2017-10-05 19:33:33','USER_NEW_PASSWORD',1,'2017-10-05 21:33:33',11,'Password change for sscientol','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(622,'2017-10-05 19:33:47','USER_NEW_PASSWORD',1,'2017-10-05 21:33:47',11,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(623,'2017-10-05 19:33:47','USER_MODIFY',1,'2017-10-05 21:33:47',11,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(624,'2017-10-05 19:34:23','USER_NEW_PASSWORD',1,'2017-10-05 21:34:23',11,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(625,'2017-10-05 19:34:23','USER_MODIFY',1,'2017-10-05 21:34:23',11,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(626,'2017-10-05 19:34:42','USER_MODIFY',1,'2017-10-05 21:34:42',11,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(627,'2017-10-05 19:36:06','USER_NEW_PASSWORD',1,'2017-10-05 21:36:06',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(628,'2017-10-05 19:36:06','USER_MODIFY',1,'2017-10-05 21:36:06',11,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(629,'2017-10-05 19:36:57','USER_NEW_PASSWORD',1,'2017-10-05 21:36:57',11,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(630,'2017-10-05 19:36:57','USER_MODIFY',1,'2017-10-05 21:36:57',11,'User atheceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(631,'2017-10-05 19:37:27','USER_LOGOUT',1,'2017-10-05 21:37:27',11,'(UserLogoff,atheceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(632,'2017-10-05 19:37:35','USER_LOGIN_FAILED',1,'2017-10-05 21:37:35',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(633,'2017-10-05 19:37:39','USER_LOGIN_FAILED',1,'2017-10-05 21:37:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(634,'2017-10-05 19:37:44','USER_LOGIN_FAILED',1,'2017-10-05 21:37:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(635,'2017-10-05 19:37:49','USER_LOGIN_FAILED',1,'2017-10-05 21:37:49',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(636,'2017-10-05 19:38:12','USER_LOGIN_FAILED',1,'2017-10-05 21:38:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(637,'2017-10-05 19:40:48','USER_LOGIN_FAILED',1,'2017-10-05 21:40:48',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(638,'2017-10-05 19:40:55','USER_LOGIN',1,'2017-10-05 21:40:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(639,'2017-10-05 19:43:34','USER_MODIFY',1,'2017-10-05 21:43:34',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(640,'2017-10-05 19:45:43','USER_CREATE',1,'2017-10-05 21:45:43',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(641,'2017-10-05 19:45:43','USER_NEW_PASSWORD',1,'2017-10-05 21:45:43',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(642,'2017-10-05 19:46:18','USER_DELETE',1,'2017-10-05 21:46:18',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(643,'2017-10-05 19:47:09','USER_MODIFY',1,'2017-10-05 21:47:09',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(644,'2017-10-05 19:47:22','USER_MODIFY',1,'2017-10-05 21:47:22',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(645,'2017-10-05 19:52:05','USER_MODIFY',1,'2017-10-05 21:52:05',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(646,'2017-10-05 19:52:23','USER_MODIFY',1,'2017-10-05 21:52:23',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(647,'2017-10-05 19:54:54','USER_NEW_PASSWORD',1,'2017-10-05 21:54:54',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(648,'2017-10-05 19:54:54','USER_MODIFY',1,'2017-10-05 21:54:54',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(649,'2017-10-05 19:57:02','USER_MODIFY',1,'2017-10-05 21:57:02',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(650,'2017-10-05 19:57:57','USER_NEW_PASSWORD',1,'2017-10-05 21:57:57',12,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(651,'2017-10-05 19:57:57','USER_MODIFY',1,'2017-10-05 21:57:57',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(652,'2017-10-05 19:59:42','USER_NEW_PASSWORD',1,'2017-10-05 21:59:42',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(653,'2017-10-05 19:59:42','USER_MODIFY',1,'2017-10-05 21:59:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(654,'2017-10-05 20:00:21','USER_MODIFY',1,'2017-10-05 22:00:21',12,'User adminx modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(655,'2017-10-05 20:05:36','USER_MODIFY',1,'2017-10-05 22:05:36',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(656,'2017-10-05 20:06:25','USER_MODIFY',1,'2017-10-05 22:06:25',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(657,'2017-10-05 20:07:18','USER_MODIFY',1,'2017-10-05 22:07:18',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(658,'2017-10-05 20:07:36','USER_MODIFY',1,'2017-10-05 22:07:36',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(659,'2017-10-05 20:08:34','USER_MODIFY',1,'2017-10-05 22:08:34',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(660,'2017-10-05 20:47:52','USER_CREATE',1,'2017-10-05 22:47:52',12,'User cc1 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(661,'2017-10-05 20:47:52','USER_NEW_PASSWORD',1,'2017-10-05 22:47:52',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(662,'2017-10-05 20:47:55','USER_LOGOUT',1,'2017-10-05 22:47:55',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(663,'2017-10-05 20:48:08','USER_LOGIN',1,'2017-10-05 22:48:08',11,'(UserLogged,zzeceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x434','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(664,'2017-10-05 20:48:39','USER_CREATE',1,'2017-10-05 22:48:39',11,'User cc2 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(665,'2017-10-05 20:48:39','USER_NEW_PASSWORD',1,'2017-10-05 22:48:39',11,'Password change for cc2','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(666,'2017-10-05 20:48:59','USER_NEW_PASSWORD',1,'2017-10-05 22:48:59',11,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(667,'2017-10-05 20:48:59','USER_MODIFY',1,'2017-10-05 22:48:59',11,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(668,'2017-10-05 21:06:36','USER_LOGOUT',1,'2017-10-05 23:06:35',11,'(UserLogoff,zzeceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(669,'2017-10-05 21:06:44','USER_LOGIN_FAILED',1,'2017-10-05 23:06:44',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(670,'2017-10-05 21:07:12','USER_LOGIN_FAILED',1,'2017-10-05 23:07:12',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(671,'2017-10-05 21:07:19','USER_LOGIN_FAILED',1,'2017-10-05 23:07:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(672,'2017-10-05 21:07:27','USER_LOGIN_FAILED',1,'2017-10-05 23:07:27',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(673,'2017-10-05 21:07:32','USER_LOGIN',1,'2017-10-05 23:07:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(674,'2017-10-05 21:12:28','USER_NEW_PASSWORD',1,'2017-10-05 23:12:28',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(675,'2017-10-05 21:12:28','USER_MODIFY',1,'2017-10-05 23:12:28',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(676,'2017-10-05 21:13:00','USER_CREATE',1,'2017-10-05 23:13:00',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(677,'2017-10-05 21:13:00','USER_NEW_PASSWORD',1,'2017-10-05 23:13:00',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(678,'2017-10-05 21:13:40','USER_DELETE',1,'2017-10-05 23:13:40',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(679,'2017-10-05 21:14:47','USER_LOGOUT',1,'2017-10-05 23:14:47',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(680,'2017-10-05 21:14:56','USER_LOGIN',1,'2017-10-05 23:14:56',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(681,'2017-10-05 21:15:56','USER_LOGOUT',1,'2017-10-05 23:15:56',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(682,'2017-10-05 21:16:06','USER_LOGIN',1,'2017-10-05 23:16:06',17,'(UserLogged,cc2) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(683,'2017-10-05 21:37:25','USER_LOGOUT',1,'2017-10-05 23:37:25',17,'(UserLogoff,cc2)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(684,'2017-10-05 21:37:31','USER_LOGIN',1,'2017-10-05 23:37:31',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(685,'2017-10-05 21:43:53','USER_LOGOUT',1,'2017-10-05 23:43:53',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(686,'2017-10-05 21:44:00','USER_LOGIN',1,'2017-10-05 23:44:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(687,'2017-10-05 21:46:17','USER_LOGOUT',1,'2017-10-05 23:46:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(688,'2017-10-05 21:46:24','USER_LOGIN',1,'2017-10-05 23:46:24',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL),(689,'2017-11-04 15:17:06','USER_LOGIN',1,'2017-11-04 16:17:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(690,'2017-11-15 22:04:04','USER_LOGIN',1,'2017-11-15 23:04:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(691,'2017-11-15 22:23:45','USER_MODIFY',1,'2017-11-15 23:23:45',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(692,'2017-11-15 22:24:22','USER_MODIFY',1,'2017-11-15 23:24:22',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(693,'2017-11-15 22:24:53','USER_MODIFY',1,'2017-11-15 23:24:53',12,'User cc2 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(694,'2017-11-15 22:25:17','USER_MODIFY',1,'2017-11-15 23:25:17',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(695,'2017-11-15 22:45:37','USER_LOGOUT',1,'2017-11-15 23:45:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(696,'2017-11-18 13:41:02','USER_LOGIN',1,'2017-11-18 14:41:02',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(697,'2017-11-18 14:23:35','USER_LOGIN',1,'2017-11-18 15:23:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(698,'2017-11-18 15:15:46','USER_LOGOUT',1,'2017-11-18 16:15:46',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(699,'2017-11-18 15:15:51','USER_LOGIN',1,'2017-11-18 16:15:51',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(700,'2017-11-30 17:52:08','USER_LOGIN',1,'2017-11-30 18:52:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(701,'2018-01-10 16:45:43','USER_LOGIN',1,'2018-01-10 17:45:43',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(702,'2018-01-10 16:45:52','USER_LOGOUT',1,'2018-01-10 17:45:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(703,'2018-01-10 16:46:06','USER_LOGIN',1,'2018-01-10 17:46:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(704,'2018-01-16 14:53:47','USER_LOGIN',1,'2018-01-16 15:53:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(705,'2018-01-16 15:04:29','USER_LOGOUT',1,'2018-01-16 16:04:29',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(706,'2018-01-16 15:04:40','USER_LOGIN',1,'2018-01-16 16:04:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(707,'2018-01-22 09:33:26','USER_LOGIN',1,'2018-01-22 10:33:26',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(708,'2018-01-22 09:35:19','USER_LOGOUT',1,'2018-01-22 10:35:19',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(709,'2018-01-22 09:35:29','USER_LOGIN',1,'2018-01-22 10:35:29',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(710,'2018-01-22 10:47:34','USER_CREATE',1,'2018-01-22 11:47:34',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(711,'2018-01-22 10:47:34','USER_NEW_PASSWORD',1,'2018-01-22 11:47:34',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(712,'2018-01-22 12:07:56','USER_LOGIN',1,'2018-01-22 13:07:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(713,'2018-01-22 12:36:25','USER_NEW_PASSWORD',1,'2018-01-22 13:36:25',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(714,'2018-01-22 12:36:25','USER_MODIFY',1,'2018-01-22 13:36:25',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(715,'2018-01-22 12:56:32','USER_MODIFY',1,'2018-01-22 13:56:32',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(716,'2018-01-22 12:58:05','USER_MODIFY',1,'2018-01-22 13:58:05',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(717,'2018-01-22 13:01:02','USER_MODIFY',1,'2018-01-22 14:01:02',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(718,'2018-01-22 13:01:18','USER_MODIFY',1,'2018-01-22 14:01:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(719,'2018-01-22 13:13:42','USER_MODIFY',1,'2018-01-22 14:13:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(720,'2018-01-22 13:15:20','USER_DELETE',1,'2018-01-22 14:15:20',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(721,'2018-01-22 13:19:21','USER_LOGOUT',1,'2018-01-22 14:19:21',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(722,'2018-01-22 13:19:32','USER_LOGIN',1,'2018-01-22 14:19:32',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(723,'2018-01-22 13:19:51','USER_LOGOUT',1,'2018-01-22 14:19:51',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(724,'2018-01-22 13:20:01','USER_LOGIN',1,'2018-01-22 14:20:01',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(725,'2018-01-22 13:28:22','USER_LOGOUT',1,'2018-01-22 14:28:22',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(726,'2018-01-22 13:28:35','USER_LOGIN',1,'2018-01-22 14:28:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(727,'2018-01-22 13:33:54','USER_LOGOUT',1,'2018-01-22 14:33:54',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(728,'2018-01-22 13:34:05','USER_LOGIN',1,'2018-01-22 14:34:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(729,'2018-01-22 13:51:46','USER_MODIFY',1,'2018-01-22 14:51:46',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL),(730,'2018-01-22 16:20:12','USER_LOGIN',1,'2018-01-22 17:20:12',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(731,'2018-01-22 16:20:22','USER_LOGOUT',1,'2018-01-22 17:20:22',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(732,'2018-01-22 16:20:36','USER_LOGIN',1,'2018-01-22 17:20:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(733,'2018-01-22 16:27:02','USER_CREATE',1,'2018-01-22 17:27:02',12,'User ldestailleur created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(734,'2018-01-22 16:27:02','USER_NEW_PASSWORD',1,'2018-01-22 17:27:02',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(735,'2018-01-22 16:28:34','USER_MODIFY',1,'2018-01-22 17:28:34',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(736,'2018-01-22 16:30:01','USER_ENABLEDISABLE',1,'2018-01-22 17:30:01',12,'User cc2 activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(737,'2018-01-22 17:11:06','USER_LOGIN',1,'2018-01-22 18:11:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(738,'2018-01-22 18:00:02','USER_DELETE',1,'2018-01-22 19:00:02',12,'User zzz removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(739,'2018-01-22 18:01:40','USER_DELETE',1,'2018-01-22 19:01:40',12,'User aaab removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(740,'2018-01-22 18:01:52','USER_DELETE',1,'2018-01-22 19:01:52',12,'User zzzg removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL),(741,'2018-03-13 10:54:59','USER_LOGIN',1,'2018-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL,NULL),(742,'2018-07-30 11:13:10','USER_LOGIN',1,'2018-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(743,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(744,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(745,'2018-07-30 12:50:23','USER_NEW_PASSWORD',1,'2018-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(746,'2018-07-30 12:50:38','USER_MODIFY',1,'2018-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(747,'2018-07-30 12:50:54','USER_DELETE',1,'2018-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(748,'2018-07-30 12:51:23','USER_NEW_PASSWORD',1,'2018-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(749,'2018-07-30 12:51:23','USER_MODIFY',1,'2018-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(750,'2018-07-30 18:26:58','USER_LOGIN',1,'2018-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(751,'2018-07-30 18:27:40','USER_LOGOUT',1,'2018-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(752,'2018-07-30 18:27:47','USER_LOGIN',1,'2018-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(753,'2018-07-30 19:00:00','USER_LOGOUT',1,'2018-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(754,'2018-07-30 19:00:04','USER_LOGIN',1,'2018-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(755,'2018-07-30 19:00:14','USER_LOGOUT',1,'2018-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(756,'2018-07-30 19:00:19','USER_LOGIN',1,'2018-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(757,'2018-07-30 19:00:43','USER_LOGOUT',1,'2018-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(758,'2018-07-30 19:00:48','USER_LOGIN',1,'2018-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(759,'2018-07-30 19:03:52','USER_LOGOUT',1,'2018-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(760,'2018-07-30 19:03:57','USER_LOGIN_FAILED',1,'2018-07-30 23:03:57',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(761,'2018-07-30 19:03:59','USER_LOGIN',1,'2018-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(762,'2018-07-30 19:04:13','USER_LOGOUT',1,'2018-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(763,'2018-07-30 19:04:17','USER_LOGIN',1,'2018-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(764,'2018-07-30 19:04:26','USER_LOGOUT',1,'2018-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(765,'2018-07-30 19:04:31','USER_LOGIN',1,'2018-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(766,'2018-07-30 19:10:50','USER_LOGOUT',1,'2018-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(767,'2018-07-30 19:10:54','USER_LOGIN',1,'2018-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(768,'2018-07-31 10:15:52','USER_LOGIN',1,'2018-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL),(769,'2018-07-31 10:16:27','USER_LOGIN',1,'2018-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(770,'2018-07-31 10:32:14','USER_LOGIN',1,'2018-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL),(771,'2018-07-31 10:36:28','USER_LOGIN',1,'2018-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL,NULL),(772,'2018-07-31 10:40:10','USER_LOGIN',1,'2018-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL,NULL),(773,'2018-07-31 10:54:16','USER_LOGIN',1,'2018-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL),(774,'2018-07-31 12:52:52','USER_LOGIN',1,'2018-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(775,'2018-07-31 13:25:33','USER_LOGOUT',1,'2018-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(776,'2018-07-31 13:26:32','USER_LOGIN',1,'2018-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(777,'2018-07-31 14:13:57','USER_LOGOUT',1,'2018-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(778,'2018-07-31 14:14:04','USER_LOGIN',1,'2018-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(779,'2018-07-31 16:04:35','USER_LOGIN',1,'2018-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(780,'2018-07-31 21:14:14','USER_LOGIN',1,'2018-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL,NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL,NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL,NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL,NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL),(877,'2018-03-16 09:54:15','USER_LOGIN_FAILED',1,'2018-03-16 13:54:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL,NULL),(878,'2018-03-16 09:54:23','USER_LOGIN',1,'2018-03-16 13:54:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x936','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL,NULL),(879,'2019-09-26 11:35:07','USER_MODIFY',1,'2019-09-26 13:35:07',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(880,'2019-09-26 11:35:33','USER_MODIFY',1,'2019-09-26 13:35:33',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(881,'2019-09-26 11:36:33','USER_MODIFY',1,'2019-09-26 13:36:33',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(882,'2019-09-26 11:36:56','USER_MODIFY',1,'2019-09-26 13:36:56',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(883,'2019-09-26 11:37:30','USER_MODIFY',1,'2019-09-26 13:37:30',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(884,'2019-09-26 11:37:56','USER_MODIFY',1,'2019-09-26 13:37:56',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(885,'2019-09-26 11:38:11','USER_MODIFY',1,'2019-09-26 13:38:11',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(886,'2019-09-26 11:38:27','USER_MODIFY',1,'2019-09-26 13:38:27',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(887,'2019-09-26 11:38:48','USER_MODIFY',1,'2019-09-26 13:38:48',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(888,'2019-09-26 11:39:35','USER_MODIFY',1,'2019-09-26 13:39:35',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(889,'2019-09-26 11:41:28','USER_MODIFY',1,'2019-09-26 13:41:28',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(890,'2019-09-26 11:43:27','USER_MODIFY',1,'2019-09-26 13:43:27',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(891,'2019-09-26 11:46:44','USER_MODIFY',1,'2019-09-26 13:46:44',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(892,'2019-09-26 11:46:54','USER_MODIFY',1,'2019-09-26 13:46:54',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(893,'2019-09-26 11:47:08','USER_MODIFY',1,'2019-09-26 13:47:08',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(894,'2019-09-26 11:48:04','USER_MODIFY',1,'2019-09-26 13:48:04',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(895,'2019-09-26 11:48:32','USER_MODIFY',1,'2019-09-26 13:48:32',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(896,'2019-09-26 11:48:49','USER_MODIFY',1,'2019-09-26 13:48:49',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(897,'2019-09-26 11:49:12','USER_MODIFY',1,'2019-09-26 13:49:12',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(898,'2019-09-26 11:49:21','USER_MODIFY',1,'2019-09-26 13:49:21',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(899,'2019-09-26 11:49:28','USER_MODIFY',1,'2019-09-26 13:49:28',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(900,'2019-09-26 11:49:37','USER_MODIFY',1,'2019-09-26 13:49:37',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(901,'2019-09-26 11:49:46','USER_MODIFY',1,'2019-09-26 13:49:46',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(902,'2019-09-26 11:49:57','USER_MODIFY',1,'2019-09-26 13:49:57',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(903,'2019-09-26 11:50:17','USER_MODIFY',1,'2019-09-26 13:50:17',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(904,'2019-09-26 11:50:43','USER_MODIFY',1,'2019-09-26 13:50:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(905,'2019-09-26 11:51:10','USER_MODIFY',1,'2019-09-26 13:51:10',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(906,'2019-09-26 11:51:36','USER_MODIFY',1,'2019-09-26 13:51:36',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(907,'2019-09-26 11:52:16','USER_MODIFY',1,'2019-09-26 13:52:16',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(908,'2019-09-26 11:52:35','USER_MODIFY',1,'2019-09-26 13:52:35',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(909,'2019-09-26 11:52:59','USER_MODIFY',1,'2019-09-26 13:52:59',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(910,'2019-09-26 11:53:28','USER_MODIFY',1,'2019-09-26 13:53:28',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(911,'2019-09-26 11:53:50','USER_MODIFY',1,'2019-09-26 13:53:50',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(912,'2019-09-26 11:54:18','USER_MODIFY',1,'2019-09-26 13:54:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(913,'2019-09-26 11:54:43','USER_MODIFY',1,'2019-09-26 13:54:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(914,'2019-09-26 11:55:09','USER_MODIFY',1,'2019-09-26 13:55:09',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(915,'2019-09-26 11:55:23','USER_MODIFY',1,'2019-09-26 13:55:23',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(916,'2019-09-26 11:55:35','USER_MODIFY',1,'2019-09-26 13:55:35',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(917,'2019-09-26 11:55:58','USER_MODIFY',1,'2019-09-26 13:55:58',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(918,'2019-09-26 15:28:46','USER_LOGIN_FAILED',1,'2019-09-26 17:28:46',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(919,'2019-09-26 15:28:51','USER_LOGIN_FAILED',1,'2019-09-26 17:28:51',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(920,'2019-09-26 15:28:55','USER_LOGIN',1,'2019-09-26 17:28:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(921,'2019-09-27 14:51:19','USER_LOGIN_FAILED',1,'2019-09-27 16:51:19',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(922,'2019-09-27 14:51:49','USER_LOGIN_FAILED',1,'2019-09-27 16:51:49',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(923,'2019-09-27 14:51:55','USER_LOGIN_FAILED',1,'2019-09-27 16:51:55',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(924,'2019-09-27 14:52:22','USER_LOGIN_FAILED',1,'2019-09-27 16:52:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(925,'2019-09-27 14:52:41','USER_LOGIN',1,'2019-09-27 16:52:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(926,'2019-09-27 15:47:07','USER_LOGIN_FAILED',1,'2019-09-27 17:47:07',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(927,'2019-09-27 15:47:09','USER_LOGIN_FAILED',1,'2019-09-27 17:47:09',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(928,'2019-09-27 15:47:12','USER_LOGIN',1,'2019-09-27 17:47:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(929,'2019-09-27 16:39:57','USER_LOGIN',1,'2019-09-27 18:39:57',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(930,'2019-09-30 13:49:22','USER_LOGIN_FAILED',1,'2019-09-30 15:49:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(931,'2019-09-30 13:49:27','USER_LOGIN_FAILED',1,'2019-09-30 15:49:27',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(932,'2019-09-30 13:49:30','USER_LOGIN',1,'2019-09-30 15:49:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(933,'2019-09-30 15:49:05','USER_LOGIN_FAILED',1,'2019-09-30 17:49:05',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(934,'2019-09-30 15:49:08','USER_LOGIN',1,'2019-09-30 17:49:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(935,'2019-10-01 11:47:44','USER_LOGIN',1,'2019-10-01 13:47:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(936,'2019-10-01 13:24:03','USER_LOGIN',1,'2019-10-01 15:24:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(937,'2019-10-02 11:41:30','USER_LOGIN_FAILED',1,'2019-10-02 13:41:30',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(938,'2019-10-02 11:41:35','USER_LOGIN',1,'2019-10-02 13:41:35',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(939,'2019-10-02 17:01:42','USER_LOGIN_FAILED',1,'2019-10-02 19:01:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(940,'2019-10-02 17:01:44','USER_LOGIN',1,'2019-10-02 19:01:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(941,'2019-10-04 08:06:36','USER_LOGIN_FAILED',1,'2019-10-04 10:06:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(942,'2019-10-04 08:06:40','USER_LOGIN',1,'2019-10-04 10:06:40',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(943,'2019-10-04 08:06:46','USER_LOGOUT',1,'2019-10-04 10:06:46',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(944,'2019-10-04 08:06:50','USER_LOGIN',1,'2019-10-04 10:06:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(945,'2019-10-04 10:28:53','USER_LOGIN_FAILED',1,'2019-10-04 12:28:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(946,'2019-10-04 10:31:06','USER_LOGIN',1,'2019-10-04 12:31:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(947,'2019-10-04 14:55:58','USER_LOGIN',1,'2019-10-04 16:55:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(948,'2019-10-04 16:45:36','USER_LOGIN_FAILED',1,'2019-10-04 18:45:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(949,'2019-10-04 16:45:40','USER_LOGIN',1,'2019-10-04 18:45:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(950,'2019-10-05 09:10:32','USER_LOGIN',1,'2019-10-05 11:10:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(951,'2019-10-06 09:02:10','USER_LOGIN_FAILED',1,'2019-10-06 11:02:10',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(952,'2019-10-06 09:02:12','USER_LOGIN',1,'2019-10-06 11:02:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x513','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(953,'2019-10-07 09:00:29','USER_LOGIN_FAILED',1,'2019-10-07 11:00:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(954,'2019-10-07 09:00:33','USER_LOGIN',1,'2019-10-07 11:00:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(955,'2019-10-07 15:05:26','USER_LOGIN_FAILED',1,'2019-10-07 17:05:26',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(956,'2019-10-07 15:05:29','USER_LOGIN_FAILED',1,'2019-10-07 17:05:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(957,'2019-10-08 09:57:04','USER_LOGIN_FAILED',1,'2019-10-08 11:57:04',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(958,'2019-10-08 09:57:07','USER_LOGIN',1,'2019-10-08 11:57:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x637','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(959,'2019-10-08 11:18:14','USER_LOGIN_FAILED',1,'2019-10-08 13:18:14',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(960,'2019-10-08 11:18:18','USER_LOGIN',1,'2019-10-08 13:18:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(961,'2019-10-08 13:29:24','USER_LOGIN',1,'2019-10-08 15:29:24',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(962,'2019-10-08 17:04:42','USER_LOGIN_FAILED',1,'2019-10-08 19:04:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(963,'2019-10-08 17:04:46','USER_LOGIN',1,'2019-10-08 19:04:46',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(964,'2019-10-08 18:37:06','USER_LOGIN_FAILED',1,'2019-10-08 20:37:06',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(965,'2019-10-08 18:38:29','USER_LOGIN_FAILED',1,'2019-10-08 20:38:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(966,'2019-10-08 18:38:32','USER_LOGIN',1,'2019-10-08 20:38:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(967,'2019-10-08 19:01:07','USER_MODIFY',1,'2019-10-08 21:01:07',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL),(968,'2019-11-28 15:09:03','USER_LOGOUT',1,'2019-11-28 19:09:03',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(969,'2019-11-28 15:09:18','USER_LOGIN_FAILED',1,'2019-11-28 19:09:18',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(970,'2019-11-28 15:09:22','USER_LOGIN',1,'2019-11-28 19:09:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(971,'2019-11-28 16:25:52','USER_LOGIN_FAILED',1,'2019-11-28 20:25:52',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(972,'2019-11-28 16:25:56','USER_LOGIN',1,'2019-11-28 20:25:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(973,'2019-11-29 08:43:22','USER_LOGIN_FAILED',1,'2019-11-29 12:43:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(974,'2019-11-29 08:43:24','USER_LOGIN',1,'2019-11-29 12:43:24',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(975,'2019-12-19 11:12:30','USER_LOGIN_FAILED',1,'2019-12-19 15:12:30',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(976,'2019-12-19 11:12:33','USER_LOGIN',1,'2019-12-19 15:12:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(977,'2019-12-20 09:38:10','USER_LOGIN_FAILED',1,'2019-12-20 13:38:10',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(978,'2019-12-20 09:38:13','USER_LOGIN',1,'2019-12-20 13:38:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(979,'2019-12-20 15:59:50','USER_LOGIN',1,'2019-12-20 19:59:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(980,'2019-12-21 13:05:49','USER_LOGIN_FAILED',1,'2019-12-21 17:05:49',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(981,'2019-12-21 13:05:52','USER_LOGIN',1,'2019-12-21 17:05:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x552','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(982,'2019-12-21 15:26:25','USER_LOGIN_FAILED',1,'2019-12-21 19:26:25',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(983,'2019-12-21 15:26:28','USER_LOGIN',1,'2019-12-21 19:26:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(984,'2019-12-21 15:27:00','USER_LOGOUT',1,'2019-12-21 19:27:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(985,'2019-12-21 15:27:05','USER_LOGIN',1,'2019-12-21 19:27:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(986,'2019-12-21 15:27:44','USER_LOGOUT',1,'2019-12-21 19:27:44',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(987,'2019-12-21 15:28:04','USER_LOGIN',1,'2019-12-21 19:28:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(988,'2019-12-22 11:59:41','USER_LOGIN',1,'2019-12-22 15:59:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(989,'2019-12-22 15:06:01','USER_LOGIN_FAILED',1,'2019-12-22 19:06:01',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(990,'2019-12-22 15:06:06','USER_LOGIN_FAILED',1,'2019-12-22 19:06:06',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(991,'2019-12-22 15:06:15','USER_LOGIN',1,'2019-12-22 19:06:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(992,'2019-12-22 18:43:21','USER_LOGIN',1,'2019-12-22 22:43:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(993,'2019-12-22 20:16:19','USER_LOGIN',1,'2019-12-23 00:16:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x584','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(994,'2019-12-23 10:05:11','USER_LOGIN_FAILED',1,'2019-12-23 14:05:11',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(995,'2019-12-23 10:05:14','USER_LOGIN',1,'2019-12-23 14:05:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(996,'2019-12-23 13:24:50','USER_LOGIN_FAILED',1,'2019-12-23 17:24:50',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(997,'2019-12-23 13:24:54','USER_LOGIN',1,'2019-12-23 17:24:54',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(998,'2019-12-25 21:37:28','USER_LOGIN_FAILED',1,'2019-12-26 01:37:28',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(999,'2019-12-25 21:37:30','USER_LOGIN',1,'2019-12-26 01:37:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1000,'2020-01-01 10:23:41','USER_LOGIN_FAILED',1,'2020-01-01 14:23:41',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1001,'2020-01-01 10:23:43','USER_LOGIN',1,'2020-01-01 14:23:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1002,'2020-01-01 19:52:00','USER_LOGIN_FAILED',1,'2020-01-01 23:52:00',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1003,'2020-01-01 19:52:07','USER_LOGIN',1,'2020-01-01 23:52:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1004,'2020-01-02 13:46:18','USER_LOGIN',1,'2020-01-02 17:46:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1005,'2020-01-02 14:49:05','USER_LOGIN',1,'2020-01-02 18:49:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x710','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1006,'2020-01-02 16:44:11','USER_LOGIN_FAILED',1,'2020-01-02 20:44:11',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1007,'2020-01-02 16:44:14','USER_LOGIN',1,'2020-01-02 20:44:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1008,'2020-01-02 18:54:45','USER_LOGIN_FAILED',1,'2020-01-02 22:54:45',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1009,'2020-01-02 18:54:48','USER_LOGIN',1,'2020-01-02 22:54:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1010,'2020-01-03 09:22:02','USER_LOGIN_FAILED',1,'2020-01-03 13:22:02',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1011,'2020-01-03 09:22:06','USER_LOGIN',1,'2020-01-03 13:22:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1012,'2020-01-03 11:56:30','USER_LOGIN',1,'2020-01-03 15:56:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1013,'2020-01-04 13:44:25','USER_LOGIN_FAILED',1,'2020-01-04 17:44:25',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1014,'2020-01-04 13:44:28','USER_LOGIN',1,'2020-01-04 17:44:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1015,'2020-01-05 19:36:34','USER_LOGIN_FAILED',1,'2020-01-05 23:36:34',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1016,'2020-01-05 19:36:39','USER_LOGIN',1,'2020-01-05 23:36:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1017,'2020-01-06 01:12:23','USER_LOGIN_FAILED',1,'2020-01-06 05:12:23',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1018,'2020-01-06 01:12:25','USER_LOGIN',1,'2020-01-06 05:12:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1019,'2020-01-06 10:33:33','USER_LOGIN',1,'2020-01-06 14:33:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1020,'2020-01-06 13:59:58','USER_LOGIN',1,'2020-01-06 17:59:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1021,'2020-01-06 16:08:41','USER_LOGIN',1,'2020-01-06 20:08:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1022,'2020-01-07 13:19:13','USER_LOGIN',1,'2020-01-07 17:19:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1023,'2020-01-07 15:06:53','USER_LOGIN_FAILED',1,'2020-01-07 19:06:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1024,'2020-01-07 15:06:59','USER_LOGIN',1,'2020-01-07 19:06:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1025,'2020-01-07 16:21:53','USER_LOGIN_FAILED',1,'2020-01-07 20:21:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1026,'2020-01-07 16:21:56','USER_LOGIN',1,'2020-01-07 20:21:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1027,'2020-01-07 17:46:46','USER_LOGIN',1,'2020-01-07 21:46:46',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1028,'2020-01-08 01:31:40','USER_LOGIN',1,'2020-01-08 05:31:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1029,'2020-01-08 15:32:34','USER_LOGIN_FAILED',1,'2020-01-08 19:32:34',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1030,'2020-01-08 15:32:38','USER_LOGIN',1,'2020-01-08 19:32:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1031,'2020-01-09 15:59:02','USER_LOGIN',1,'2020-01-09 19:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1032,'2020-01-09 21:33:47','USER_LOGIN',1,'2020-01-10 01:33:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1033,'2020-01-10 00:42:07','USER_LOGIN',1,'2020-01-10 04:42:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1034,'2020-01-10 22:18:15','USER_LOGIN',1,'2020-01-11 02:18:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1035,'2020-01-11 13:11:59','USER_LOGIN',1,'2020-01-11 17:11:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1036,'2020-01-12 20:13:37','USER_LOGIN',1,'2020-01-13 00:13:37',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1037,'2020-01-12 20:58:27','USER_LOGIN',1,'2020-01-13 00:58:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1038,'2020-01-13 03:35:56','USER_LOGIN',1,'2020-01-13 07:35:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1039,'2020-01-13 10:37:51','USER_LOGIN_FAILED',1,'2020-01-13 14:37:51',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1040,'2020-01-13 10:37:55','USER_LOGIN',1,'2020-01-13 14:37:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1041,'2020-01-13 14:34:55','USER_LOGIN_FAILED',1,'2020-01-13 18:34:55',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1042,'2020-01-13 14:34:58','USER_LOGIN',1,'2020-01-13 18:34:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1043,'2020-01-15 10:28:04','USER_LOGIN_FAILED',1,'2020-01-15 14:28:04',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1044,'2020-01-15 10:28:07','USER_LOGIN',1,'2020-01-15 14:28:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1045,'2020-01-15 11:49:56','USER_LOGIN_FAILED',1,'2020-01-15 15:49:56',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1046,'2020-01-15 11:49:58','USER_LOGIN',1,'2020-01-15 15:49:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1047,'2020-01-15 13:35:01','USER_LOGIN_FAILED',1,'2020-01-15 17:35:01',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1048,'2020-01-15 13:35:04','USER_LOGIN',1,'2020-01-15 17:35:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1049,'2020-01-15 14:41:15','USER_LOGIN_FAILED',1,'2020-01-15 18:41:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1050,'2020-01-15 14:41:18','USER_LOGIN',1,'2020-01-15 18:41:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1051,'2020-01-15 18:14:40','USER_LOGIN',1,'2020-01-15 22:14:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1052,'2020-01-15 20:03:35','USER_LOGIN',1,'2020-01-16 00:03:35',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1053,'2020-01-15 20:41:56','USER_LOGIN',1,'2020-01-16 00:41:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1054,'2020-01-16 01:01:22','USER_LOGIN',1,'2020-01-16 02:01:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1055,'2020-01-16 15:43:23','USER_LOGIN',1,'2020-01-16 16:43:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1056,'2020-01-16 15:44:42','USER_ENABLEDISABLE',1,'2020-01-16 16:44:42',12,'User aboston activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1057,'2020-01-16 17:01:27','USER_LOGIN',1,'2020-01-16 18:01:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1058,'2020-01-17 09:34:03','USER_LOGIN',1,'2020-01-17 10:34:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1059,'2020-01-18 15:17:00','USER_LOGIN',1,'2020-01-18 16:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1060,'2020-01-18 18:32:21','USER_LOGIN',1,'2020-01-18 19:32:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x672','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1061,'2020-01-19 13:20:27','USER_LOGIN_FAILED',1,'2020-01-19 14:20:27',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1062,'2020-01-19 13:20:30','USER_LOGIN',1,'2020-01-19 14:20:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1063,'2020-01-19 17:05:23','USER_LOGIN',1,'2020-01-19 18:05:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1064,'2020-01-19 19:29:37','USER_LOGIN',1,'2020-01-19 20:29:37',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1065,'2020-01-20 00:19:16','USER_LOGIN_FAILED',1,'2020-01-20 01:19:16',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1066,'2020-01-20 00:19:19','USER_LOGIN',1,'2020-01-20 01:19:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1067,'2020-01-20 10:20:00','USER_LOGIN',1,'2020-01-20 11:20:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1068,'2020-01-20 13:29:21','USER_LOGIN',1,'2020-01-20 14:29:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1069,'2020-01-20 16:20:00','USER_LOGIN',1,'2020-01-20 17:20:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1070,'2020-01-20 22:52:22','USER_LOGIN_FAILED',1,'2020-01-20 23:52:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1071,'2020-01-20 22:52:25','USER_LOGIN',1,'2020-01-20 23:52:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1072,'2020-01-20 23:43:37','USER_LOGIN_FAILED',1,'2020-01-21 00:43:37',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1073,'2020-01-20 23:43:41','USER_LOGIN',1,'2020-01-21 00:43:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x643','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1074,'2020-01-21 09:21:05','USER_LOGIN_FAILED',1,'2020-01-21 10:21:05',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1075,'2020-01-21 09:21:09','USER_LOGIN',1,'2020-01-21 10:21:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x870','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1076,'2020-01-21 09:33:53','USER_LOGOUT',1,'2020-01-21 10:33:53',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1077,'2020-01-21 09:35:27','USER_LOGIN',1,'2020-01-21 10:35:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1078,'2020-01-21 09:35:52','USER_LOGOUT',1,'2020-01-21 10:35:52',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'),(1079,'2020-01-21 09:38:41','USER_LOGIN',1,'2020-01-21 10:38:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b'); +INSERT INTO `llx_events` VALUES (30,'2013-07-18 18:23:06','USER_LOGOUT',1,'2013-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(31,'2013-07-18 18:23:12','USER_LOGIN_FAILED',1,'2013-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(32,'2013-07-18 18:23:17','USER_LOGIN',1,'2013-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(33,'2013-07-18 20:10:51','USER_LOGIN_FAILED',1,'2013-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(34,'2013-07-18 20:10:55','USER_LOGIN',1,'2013-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(35,'2013-07-18 21:18:57','USER_LOGIN',1,'2013-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(36,'2013-07-20 10:34:10','USER_LOGIN',1,'2013-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(37,'2013-07-20 12:36:44','USER_LOGIN',1,'2013-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(38,'2013-07-20 13:20:51','USER_LOGIN_FAILED',1,'2013-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(39,'2013-07-20 13:20:54','USER_LOGIN',1,'2013-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(40,'2013-07-20 15:03:46','USER_LOGIN_FAILED',1,'2013-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(41,'2013-07-20 15:03:55','USER_LOGIN',1,'2013-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(42,'2013-07-20 18:05:05','USER_LOGIN_FAILED',1,'2013-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(43,'2013-07-20 18:05:08','USER_LOGIN',1,'2013-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(44,'2013-07-20 21:08:53','USER_LOGIN_FAILED',1,'2013-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(45,'2013-07-20 21:08:56','USER_LOGIN',1,'2013-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(46,'2013-07-21 01:26:12','USER_LOGIN',1,'2013-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(47,'2013-07-21 22:35:45','USER_LOGIN_FAILED',1,'2013-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(48,'2013-07-21 22:35:49','USER_LOGIN',1,'2013-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(49,'2013-07-26 23:09:47','USER_LOGIN_FAILED',1,'2013-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(50,'2013-07-26 23:09:50','USER_LOGIN',1,'2013-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(51,'2013-07-27 17:02:27','USER_LOGIN_FAILED',1,'2013-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(52,'2013-07-27 17:02:32','USER_LOGIN',1,'2013-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(53,'2013-07-27 23:33:37','USER_LOGIN_FAILED',1,'2013-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(54,'2013-07-27 23:33:41','USER_LOGIN',1,'2013-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(55,'2013-07-28 18:20:36','USER_LOGIN_FAILED',1,'2013-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(56,'2013-07-28 18:20:38','USER_LOGIN',1,'2013-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(57,'2013-07-28 20:13:30','USER_LOGIN_FAILED',1,'2013-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(58,'2013-07-28 20:13:34','USER_LOGIN',1,'2013-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(59,'2013-07-28 20:22:51','USER_LOGIN',1,'2013-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(60,'2013-07-28 23:05:06','USER_LOGIN',1,'2013-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(61,'2013-07-29 20:15:50','USER_LOGIN_FAILED',1,'2013-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(62,'2013-07-29 20:15:53','USER_LOGIN',1,'2013-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(68,'2013-07-29 20:51:01','USER_LOGOUT',1,'2013-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(69,'2013-07-29 20:51:05','USER_LOGIN',1,'2013-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(70,'2013-07-30 08:46:20','USER_LOGIN_FAILED',1,'2013-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(71,'2013-07-30 08:46:38','USER_LOGIN_FAILED',1,'2013-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(72,'2013-07-30 08:46:42','USER_LOGIN',1,'2013-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(73,'2013-07-30 10:05:12','USER_LOGIN_FAILED',1,'2013-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(74,'2013-07-30 10:05:15','USER_LOGIN',1,'2013-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(75,'2013-07-30 12:15:46','USER_LOGIN',1,'2013-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(76,'2013-07-31 22:19:30','USER_LOGIN',1,'2013-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(77,'2013-07-31 23:32:52','USER_LOGIN',1,'2013-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(78,'2013-08-01 01:24:50','USER_LOGIN_FAILED',1,'2013-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(79,'2013-08-01 01:24:54','USER_LOGIN',1,'2013-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(80,'2013-08-01 19:31:36','USER_LOGIN_FAILED',1,'2013-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(81,'2013-08-01 19:31:39','USER_LOGIN',1,'2013-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(82,'2013-08-01 20:01:36','USER_LOGIN',1,'2013-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(83,'2013-08-01 20:52:54','USER_LOGIN_FAILED',1,'2013-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(84,'2013-08-01 20:52:58','USER_LOGIN',1,'2013-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(85,'2013-08-01 21:17:28','USER_LOGIN_FAILED',1,'2013-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(86,'2013-08-01 21:17:31','USER_LOGIN',1,'2013-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(87,'2013-08-04 11:55:17','USER_LOGIN',1,'2013-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(88,'2013-08-04 20:19:03','USER_LOGIN_FAILED',1,'2013-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(89,'2013-08-04 20:19:07','USER_LOGIN',1,'2013-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(90,'2013-08-05 17:51:42','USER_LOGIN_FAILED',1,'2013-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(91,'2013-08-05 17:51:47','USER_LOGIN',1,'2013-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(92,'2013-08-05 17:56:03','USER_LOGIN',1,'2013-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(93,'2013-08-05 17:59:10','USER_LOGIN',1,'2013-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL,NULL,NULL,NULL),(94,'2013-08-05 18:01:58','USER_LOGIN',1,'2013-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL,NULL,NULL,NULL),(95,'2013-08-05 19:59:56','USER_LOGIN',1,'2013-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(96,'2013-08-06 18:33:22','USER_LOGIN',1,'2013-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(97,'2013-08-07 00:56:59','USER_LOGIN',1,'2013-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(98,'2013-08-07 22:49:14','USER_LOGIN',1,'2013-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(99,'2013-08-07 23:05:18','USER_LOGOUT',1,'2013-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(105,'2013-08-08 00:41:09','USER_LOGIN',1,'2013-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(106,'2013-08-08 11:58:55','USER_LOGIN',1,'2013-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(107,'2013-08-08 14:35:48','USER_LOGIN',1,'2013-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(108,'2013-08-08 14:36:31','USER_LOGOUT',1,'2013-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(109,'2013-08-08 14:38:28','USER_LOGIN',1,'2013-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(110,'2013-08-08 14:39:02','USER_LOGOUT',1,'2013-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(111,'2013-08-08 14:39:10','USER_LOGIN',1,'2013-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(112,'2013-08-08 14:39:28','USER_LOGOUT',1,'2013-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(113,'2013-08-08 14:39:37','USER_LOGIN',1,'2013-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(114,'2013-08-08 14:50:02','USER_LOGOUT',1,'2013-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(115,'2013-08-08 14:51:45','USER_LOGIN_FAILED',1,'2013-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(116,'2013-08-08 14:51:52','USER_LOGIN',1,'2013-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(117,'2013-08-08 15:09:54','USER_LOGOUT',1,'2013-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(118,'2013-08-08 15:10:19','USER_LOGIN_FAILED',1,'2013-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(119,'2013-08-08 15:10:28','USER_LOGIN',1,'2013-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(121,'2013-08-08 15:14:58','USER_LOGOUT',1,'2013-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(122,'2013-08-08 15:15:00','USER_LOGIN_FAILED',1,'2013-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(123,'2013-08-08 15:17:57','USER_LOGIN',1,'2013-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(124,'2013-08-08 15:35:56','USER_LOGOUT',1,'2013-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(125,'2013-08-08 15:36:05','USER_LOGIN',1,'2013-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(126,'2013-08-08 17:32:42','USER_LOGIN',1,'2013-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL,NULL,NULL,NULL),(127,'2014-12-08 13:49:37','USER_LOGOUT',1,'2014-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(128,'2014-12-08 13:49:42','USER_LOGIN',1,'2014-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(129,'2014-12-08 13:50:12','USER_LOGOUT',1,'2014-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(130,'2014-12-08 13:50:14','USER_LOGIN',1,'2014-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(131,'2014-12-08 13:50:17','USER_LOGOUT',1,'2014-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(132,'2014-12-08 13:52:47','USER_LOGIN',1,'2014-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(133,'2014-12-08 13:53:08','USER_MODIFY',1,'2014-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(134,'2014-12-08 14:08:45','USER_LOGOUT',1,'2014-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(135,'2014-12-08 14:09:09','USER_LOGIN',1,'2014-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(136,'2014-12-08 14:11:43','USER_LOGOUT',1,'2014-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(137,'2014-12-08 14:11:45','USER_LOGIN',1,'2014-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(138,'2014-12-08 14:22:53','USER_LOGOUT',1,'2014-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(139,'2014-12-08 14:22:54','USER_LOGIN',1,'2014-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(140,'2014-12-08 14:23:10','USER_LOGOUT',1,'2014-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(141,'2014-12-08 14:23:11','USER_LOGIN',1,'2014-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(142,'2014-12-08 14:23:49','USER_LOGOUT',1,'2014-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(143,'2014-12-08 14:23:50','USER_LOGIN',1,'2014-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(144,'2014-12-08 14:28:08','USER_LOGOUT',1,'2014-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(145,'2014-12-08 14:35:15','USER_LOGIN',1,'2014-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(146,'2014-12-08 14:35:18','USER_LOGOUT',1,'2014-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(147,'2014-12-08 14:36:07','USER_LOGIN',1,'2014-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(148,'2014-12-08 14:36:09','USER_LOGOUT',1,'2014-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(149,'2014-12-08 14:36:41','USER_LOGIN',1,'2014-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(150,'2014-12-08 15:59:13','USER_LOGIN',1,'2014-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(151,'2014-12-09 11:49:52','USER_LOGIN',1,'2014-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(152,'2014-12-09 13:46:31','USER_LOGIN',1,'2014-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(153,'2014-12-09 19:03:14','USER_LOGIN',1,'2014-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(154,'2014-12-10 00:16:31','USER_LOGIN',1,'2014-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(170,'2014-12-11 22:03:31','USER_LOGIN',1,'2014-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(171,'2014-12-12 00:32:39','USER_LOGIN',1,'2014-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(172,'2014-12-12 10:49:59','USER_LOGIN',1,'2014-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(175,'2014-12-12 10:57:40','USER_MODIFY',1,'2014-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(176,'2014-12-12 13:29:15','USER_LOGIN',1,'2014-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(177,'2014-12-12 13:30:15','USER_LOGIN',1,'2014-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(178,'2014-12-12 13:40:08','USER_LOGOUT',1,'2014-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(179,'2014-12-12 13:40:10','USER_LOGIN',1,'2014-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(180,'2014-12-12 13:40:26','USER_MODIFY',1,'2014-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(181,'2014-12-12 13:40:34','USER_LOGOUT',1,'2014-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(182,'2014-12-12 13:42:23','USER_LOGIN',1,'2014-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(183,'2014-12-12 13:43:02','USER_NEW_PASSWORD',1,'2014-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(184,'2014-12-12 13:43:25','USER_LOGOUT',1,'2014-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(185,'2014-12-12 13:43:27','USER_LOGIN_FAILED',1,'2014-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(186,'2014-12-12 13:43:30','USER_LOGIN',1,'2014-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(187,'2014-12-12 14:52:11','USER_LOGIN',1,'2014-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL,NULL,NULL,NULL),(188,'2014-12-12 17:53:00','USER_LOGIN_FAILED',1,'2014-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(189,'2014-12-12 17:53:07','USER_LOGIN_FAILED',1,'2014-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(190,'2014-12-12 17:53:51','USER_NEW_PASSWORD',1,'2014-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(191,'2014-12-12 17:54:00','USER_LOGIN',1,'2014-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(192,'2014-12-12 17:54:10','USER_NEW_PASSWORD',1,'2014-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(193,'2014-12-12 17:54:10','USER_MODIFY',1,'2014-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(194,'2014-12-12 18:57:09','USER_LOGIN',1,'2014-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(195,'2014-12-12 23:04:08','USER_LOGIN',1,'2014-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(196,'2014-12-17 20:03:14','USER_LOGIN',1,'2014-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(197,'2014-12-17 21:18:45','USER_LOGIN',1,'2014-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(198,'2014-12-17 22:30:08','USER_LOGIN',1,'2014-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(199,'2014-12-18 23:32:03','USER_LOGIN',1,'2014-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(200,'2014-12-19 09:38:03','USER_LOGIN',1,'2014-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(201,'2014-12-19 11:23:35','USER_LOGIN',1,'2014-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(202,'2014-12-19 12:46:22','USER_LOGIN',1,'2014-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(214,'2014-12-19 19:11:31','USER_LOGIN',1,'2014-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(215,'2014-12-21 16:36:57','USER_LOGIN',1,'2014-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(216,'2014-12-21 16:38:43','USER_NEW_PASSWORD',1,'2014-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(217,'2014-12-21 16:38:43','USER_MODIFY',1,'2014-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(218,'2014-12-21 16:38:51','USER_LOGOUT',1,'2014-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(219,'2014-12-21 16:38:55','USER_LOGIN',1,'2014-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(220,'2014-12-21 16:48:18','USER_LOGOUT',1,'2014-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(221,'2014-12-21 16:48:20','USER_LOGIN',1,'2014-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(222,'2014-12-26 18:28:18','USER_LOGIN',1,'2014-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(223,'2014-12-26 20:00:24','USER_LOGIN',1,'2014-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(224,'2014-12-27 01:10:27','USER_LOGIN',1,'2014-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(225,'2014-12-28 19:12:08','USER_LOGIN',1,'2014-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(226,'2014-12-28 20:16:58','USER_LOGIN',1,'2014-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(227,'2014-12-29 14:35:46','USER_LOGIN',1,'2014-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(228,'2014-12-29 14:37:59','USER_LOGOUT',1,'2014-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(229,'2014-12-29 14:38:00','USER_LOGIN',1,'2014-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(230,'2014-12-29 17:16:48','USER_LOGIN',1,'2014-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(231,'2014-12-31 12:02:59','USER_LOGIN',1,'2014-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(232,'2015-01-02 20:32:51','USER_LOGIN',1,'2015-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL,NULL,NULL,NULL),(233,'2015-01-02 20:58:59','USER_LOGIN',1,'2015-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(234,'2015-01-03 09:25:07','USER_LOGIN',1,'2015-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(235,'2015-01-03 19:39:31','USER_LOGIN',1,'2015-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(236,'2015-01-04 22:40:19','USER_LOGIN',1,'2015-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(237,'2015-01-05 12:59:59','USER_LOGIN',1,'2015-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(238,'2015-01-05 15:28:52','USER_LOGIN',1,'2015-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(239,'2015-01-05 17:02:08','USER_LOGIN',1,'2015-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(240,'2015-01-06 12:13:33','USER_LOGIN',1,'2015-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(241,'2015-01-07 01:21:15','USER_LOGIN',1,'2015-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(242,'2015-01-07 01:46:31','USER_LOGOUT',1,'2015-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(243,'2015-01-07 19:54:50','USER_LOGIN',1,'2015-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(244,'2015-01-08 21:55:01','USER_LOGIN',1,'2015-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(245,'2015-01-09 11:13:28','USER_LOGIN',1,'2015-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(246,'2015-01-10 18:30:46','USER_LOGIN',1,'2015-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(247,'2015-01-11 18:03:26','USER_LOGIN',1,'2015-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(248,'2015-01-12 11:15:04','USER_LOGIN',1,'2015-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(249,'2015-01-12 14:42:44','USER_LOGIN',1,'2015-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(250,'2015-01-13 12:07:17','USER_LOGIN',1,'2015-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(251,'2015-01-13 17:37:58','USER_LOGIN',1,'2015-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(252,'2015-01-13 19:24:21','USER_LOGIN',1,'2015-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(253,'2015-01-13 19:29:19','USER_LOGOUT',1,'2015-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(254,'2015-01-13 21:39:39','USER_LOGIN',1,'2015-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(255,'2015-01-14 00:52:21','USER_LOGIN',1,'2015-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL,NULL,NULL,NULL),(256,'2015-01-16 11:34:31','USER_LOGIN',1,'2015-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(257,'2015-01-16 15:36:21','USER_LOGIN',1,'2015-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(258,'2015-01-16 19:17:36','USER_LOGIN',1,'2015-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(259,'2015-01-16 19:48:08','GROUP_CREATE',1,'2015-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(260,'2015-01-16 21:48:53','USER_LOGIN',1,'2015-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(261,'2015-01-17 19:55:53','USER_LOGIN',1,'2015-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(262,'2015-01-18 09:48:01','USER_LOGIN',1,'2015-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(263,'2015-01-18 13:22:36','USER_LOGIN',1,'2015-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(264,'2015-01-18 16:10:23','USER_LOGIN',1,'2015-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(265,'2015-01-18 17:41:40','USER_LOGIN',1,'2015-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(266,'2015-01-19 14:33:48','USER_LOGIN',1,'2015-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(267,'2015-01-19 16:47:43','USER_LOGIN',1,'2015-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(268,'2015-01-19 16:59:43','USER_LOGIN',1,'2015-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(269,'2015-01-19 17:00:22','USER_LOGIN',1,'2015-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(270,'2015-01-19 17:04:16','USER_LOGOUT',1,'2015-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(271,'2015-01-19 17:04:18','USER_LOGIN',1,'2015-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(272,'2015-01-20 00:34:19','USER_LOGIN',1,'2015-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(273,'2015-01-21 11:54:17','USER_LOGIN',1,'2015-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(274,'2015-01-21 13:48:15','USER_LOGIN',1,'2015-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(275,'2015-01-21 14:30:22','USER_LOGIN',1,'2015-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(276,'2015-01-21 15:10:46','USER_LOGIN',1,'2015-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(277,'2015-01-21 17:27:43','USER_LOGIN',1,'2015-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(278,'2015-01-21 21:48:15','USER_LOGIN',1,'2015-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(279,'2015-01-21 21:50:42','USER_LOGIN',1,'2015-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL,NULL,NULL,NULL),(280,'2015-01-23 09:28:26','USER_LOGIN',1,'2015-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(281,'2015-01-23 13:21:57','USER_LOGIN',1,'2015-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(282,'2015-01-23 16:52:00','USER_LOGOUT',1,'2015-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(283,'2015-01-23 16:52:05','USER_LOGIN_FAILED',1,'2015-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(284,'2015-01-23 16:52:09','USER_LOGIN',1,'2015-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(285,'2015-01-23 16:52:27','USER_CREATE',1,'2015-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(286,'2015-01-23 16:52:27','USER_NEW_PASSWORD',1,'2015-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(287,'2015-01-23 16:52:37','USER_CREATE',1,'2015-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(288,'2015-01-23 16:52:37','USER_NEW_PASSWORD',1,'2015-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(289,'2015-01-23 16:53:15','USER_LOGOUT',1,'2015-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(290,'2015-01-23 16:53:20','USER_LOGIN',1,'2015-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(291,'2015-01-23 19:16:58','USER_LOGIN',1,'2015-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(292,'2015-01-26 10:54:07','USER_LOGIN',1,'2015-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(293,'2015-01-29 10:15:36','USER_LOGIN',1,'2015-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(294,'2015-01-30 17:42:50','USER_LOGIN',1,'2015-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL,NULL,NULL,NULL),(295,'2015-02-01 08:49:55','USER_LOGIN',1,'2015-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(296,'2015-02-01 08:51:57','USER_LOGOUT',1,'2015-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(297,'2015-02-01 08:52:39','USER_LOGIN',1,'2015-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(298,'2015-02-01 21:03:01','USER_LOGIN',1,'2015-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(299,'2015-02-10 19:48:39','USER_LOGIN',1,'2015-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(300,'2015-02-10 20:46:48','USER_LOGIN',1,'2015-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(301,'2015-02-10 21:39:23','USER_LOGIN',1,'2015-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(302,'2015-02-11 19:00:13','USER_LOGIN',1,'2015-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(303,'2015-02-11 19:43:44','USER_LOGIN_FAILED',1,'2015-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(304,'2015-02-11 19:44:01','USER_LOGIN',1,'2015-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(305,'2015-02-12 00:27:35','USER_LOGIN',1,'2015-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(306,'2015-02-12 00:27:38','USER_LOGOUT',1,'2015-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(307,'2015-02-12 00:28:07','USER_LOGIN',1,'2015-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(308,'2015-02-12 00:28:09','USER_LOGOUT',1,'2015-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(309,'2015-02-12 00:28:26','USER_LOGIN',1,'2015-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(310,'2015-02-12 00:28:30','USER_LOGOUT',1,'2015-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(311,'2015-02-12 12:42:15','USER_LOGIN',1,'2015-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL,NULL,NULL,NULL),(312,'2015-02-12 13:46:16','USER_LOGIN',1,'2015-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(313,'2015-02-12 14:54:28','USER_LOGIN',1,'2015-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(314,'2015-02-12 16:04:46','USER_LOGIN',1,'2015-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(315,'2015-02-13 14:02:43','USER_LOGIN',1,'2015-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(316,'2015-02-13 14:48:30','USER_LOGIN',1,'2015-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(317,'2015-02-13 17:44:53','USER_LOGIN',1,'2015-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(318,'2015-02-15 08:44:36','USER_LOGIN',1,'2015-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(319,'2015-02-15 08:53:20','USER_LOGIN',1,'2015-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(320,'2015-02-16 19:10:28','USER_LOGIN',1,'2015-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(321,'2015-02-16 19:22:40','USER_CREATE',1,'2015-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(322,'2015-02-16 19:22:40','USER_NEW_PASSWORD',1,'2015-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(323,'2015-02-16 19:48:15','USER_CREATE',1,'2015-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(324,'2015-02-16 19:48:15','USER_NEW_PASSWORD',1,'2015-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(325,'2015-02-16 19:50:08','USER_CREATE',1,'2015-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(326,'2015-02-16 19:50:08','USER_NEW_PASSWORD',1,'2015-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(327,'2015-02-16 21:20:03','USER_LOGIN',1,'2015-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(328,'2015-02-17 14:30:51','USER_LOGIN',1,'2015-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(329,'2015-02-17 17:21:22','USER_LOGIN',1,'2015-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(330,'2015-02-17 17:48:43','USER_MODIFY',1,'2015-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(331,'2015-02-17 17:48:47','USER_MODIFY',1,'2015-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(332,'2015-02-17 17:48:51','USER_MODIFY',1,'2015-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(333,'2015-02-17 17:48:56','USER_MODIFY',1,'2015-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(334,'2015-02-18 22:00:01','USER_LOGIN',1,'2015-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(335,'2015-02-19 08:19:52','USER_LOGIN',1,'2015-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(336,'2015-02-19 22:00:52','USER_LOGIN',1,'2015-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(337,'2015-02-20 09:34:52','USER_LOGIN',1,'2015-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(338,'2015-02-20 13:12:28','USER_LOGIN',1,'2015-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(339,'2015-02-20 17:19:44','USER_LOGIN',1,'2015-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(340,'2015-02-20 19:07:21','USER_MODIFY',1,'2015-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(341,'2015-02-20 19:47:17','USER_LOGIN',1,'2015-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(342,'2015-02-20 19:48:01','USER_MODIFY',1,'2015-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(343,'2015-02-21 08:27:07','USER_LOGIN',1,'2015-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(344,'2015-02-23 13:34:13','USER_LOGIN',1,'2015-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL,NULL,NULL,NULL),(345,'2015-02-24 01:06:41','USER_LOGIN_FAILED',1,'2015-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(346,'2015-02-24 01:06:45','USER_LOGIN_FAILED',1,'2015-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(347,'2015-02-24 01:06:55','USER_LOGIN_FAILED',1,'2015-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(348,'2015-02-24 01:07:03','USER_LOGIN_FAILED',1,'2015-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(349,'2015-02-24 01:07:21','USER_LOGIN_FAILED',1,'2015-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(350,'2015-02-24 01:08:12','USER_LOGIN_FAILED',1,'2015-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(351,'2015-02-24 01:08:42','USER_LOGIN_FAILED',1,'2015-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(352,'2015-02-24 01:08:50','USER_LOGIN_FAILED',1,'2015-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(353,'2015-02-24 01:09:08','USER_LOGIN_FAILED',1,'2015-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(354,'2015-02-24 01:09:42','USER_LOGIN_FAILED',1,'2015-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(355,'2015-02-24 01:09:50','USER_LOGIN_FAILED',1,'2015-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(356,'2015-02-24 01:10:05','USER_LOGIN_FAILED',1,'2015-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(357,'2015-02-24 01:10:22','USER_LOGIN_FAILED',1,'2015-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(358,'2015-02-24 01:10:30','USER_LOGIN_FAILED',1,'2015-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(359,'2015-02-24 01:10:56','USER_LOGIN_FAILED',1,'2015-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(360,'2015-02-24 01:11:26','USER_LOGIN_FAILED',1,'2015-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(361,'2015-02-24 01:12:06','USER_LOGIN_FAILED',1,'2015-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(362,'2015-02-24 01:21:14','USER_LOGIN_FAILED',1,'2015-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(363,'2015-02-24 01:21:25','USER_LOGIN_FAILED',1,'2015-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(364,'2015-02-24 01:21:54','USER_LOGIN_FAILED',1,'2015-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(365,'2015-02-24 01:22:14','USER_LOGIN_FAILED',1,'2015-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(366,'2015-02-24 01:22:37','USER_LOGIN_FAILED',1,'2015-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(367,'2015-02-24 01:23:01','USER_LOGIN_FAILED',1,'2015-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(368,'2015-02-24 01:23:39','USER_LOGIN_FAILED',1,'2015-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(369,'2015-02-24 01:24:04','USER_LOGIN_FAILED',1,'2015-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(370,'2015-02-24 01:24:39','USER_LOGIN_FAILED',1,'2015-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(371,'2015-02-24 01:25:01','USER_LOGIN_FAILED',1,'2015-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(372,'2015-02-24 01:25:12','USER_LOGIN_FAILED',1,'2015-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(373,'2015-02-24 01:27:30','USER_LOGIN_FAILED',1,'2015-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(374,'2015-02-24 01:28:00','USER_LOGIN_FAILED',1,'2015-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(375,'2015-02-24 01:28:35','USER_LOGIN_FAILED',1,'2015-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(376,'2015-02-24 01:29:03','USER_LOGIN_FAILED',1,'2015-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(377,'2015-02-24 01:29:55','USER_LOGIN_FAILED',1,'2015-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(378,'2015-02-24 01:32:40','USER_LOGIN_FAILED',1,'2015-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(379,'2015-02-24 01:39:33','USER_LOGIN_FAILED',1,'2015-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(380,'2015-02-24 01:39:38','USER_LOGIN_FAILED',1,'2015-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(381,'2015-02-24 01:39:47','USER_LOGIN_FAILED',1,'2015-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(382,'2015-02-24 01:40:54','USER_LOGIN_FAILED',1,'2015-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(383,'2015-02-24 01:47:57','USER_LOGIN_FAILED',1,'2015-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(384,'2015-02-24 01:48:05','USER_LOGIN_FAILED',1,'2015-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(385,'2015-02-24 01:48:07','USER_LOGIN_FAILED',1,'2015-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(386,'2015-02-24 01:48:35','USER_LOGIN',1,'2015-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(387,'2015-02-24 01:56:32','USER_LOGIN',1,'2015-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL,NULL,NULL),(388,'2015-02-24 02:05:55','USER_LOGOUT',1,'2015-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(389,'2015-02-24 02:39:52','USER_LOGIN',1,'2015-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(390,'2015-02-24 02:51:10','USER_LOGOUT',1,'2015-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(391,'2015-02-24 12:46:41','USER_LOGIN',1,'2015-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(392,'2015-02-24 12:46:52','USER_LOGOUT',1,'2015-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(393,'2015-02-24 12:46:56','USER_LOGIN',1,'2015-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(394,'2015-02-24 12:47:56','USER_LOGOUT',1,'2015-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(395,'2015-02-24 12:48:00','USER_LOGIN',1,'2015-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(396,'2015-02-24 12:48:11','USER_LOGOUT',1,'2015-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(397,'2015-02-24 12:48:32','USER_LOGIN',1,'2015-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(398,'2015-02-24 12:52:22','USER_LOGOUT',1,'2015-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(399,'2015-02-24 12:52:27','USER_LOGIN',1,'2015-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(400,'2015-02-24 12:52:54','USER_LOGOUT',1,'2015-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(401,'2015-02-24 12:52:59','USER_LOGIN',1,'2015-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(402,'2015-02-24 12:55:39','USER_LOGOUT',1,'2015-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(403,'2015-02-24 12:55:59','USER_LOGIN',1,'2015-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(404,'2015-02-24 12:56:07','USER_LOGOUT',1,'2015-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(405,'2015-02-24 12:56:23','USER_LOGIN',1,'2015-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(406,'2015-02-24 12:56:46','USER_LOGOUT',1,'2015-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(407,'2015-02-24 12:58:30','USER_LOGIN',1,'2015-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(408,'2015-02-24 12:58:33','USER_LOGOUT',1,'2015-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(409,'2015-02-24 12:58:51','USER_LOGIN',1,'2015-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(410,'2015-02-24 12:58:58','USER_LOGOUT',1,'2015-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(411,'2015-02-24 13:18:53','USER_LOGIN',1,'2015-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(412,'2015-02-24 13:19:52','USER_LOGOUT',1,'2015-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(413,'2015-02-24 15:39:31','USER_LOGIN_FAILED',1,'2015-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL,NULL,NULL,NULL),(414,'2015-02-24 15:42:07','USER_LOGIN',1,'2015-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL,NULL,NULL,NULL),(415,'2015-02-24 15:42:52','USER_LOGOUT',1,'2015-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL,NULL,NULL),(416,'2015-02-24 16:04:21','USER_LOGIN',1,'2015-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL,NULL,NULL),(417,'2015-02-24 16:11:28','USER_LOGIN_FAILED',1,'2015-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL,NULL,NULL),(418,'2015-02-24 16:11:37','USER_LOGIN',1,'2015-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL,NULL,NULL),(419,'2015-02-24 16:36:52','USER_LOGOUT',1,'2015-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL,NULL,NULL,NULL),(420,'2015-02-24 16:40:37','USER_LOGIN',1,'2015-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(421,'2015-02-24 16:57:16','USER_LOGIN',1,'2015-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL,NULL,NULL),(422,'2015-02-24 17:01:30','USER_LOGOUT',1,'2015-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL,NULL,NULL),(423,'2015-02-24 17:02:33','USER_LOGIN',1,'2015-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(424,'2015-02-24 17:14:22','USER_LOGOUT',1,'2015-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(425,'2015-02-24 17:15:07','USER_LOGIN_FAILED',1,'2015-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(426,'2015-02-24 17:15:20','USER_LOGIN',1,'2015-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(427,'2015-02-24 17:20:14','USER_LOGIN',1,'2015-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(428,'2015-02-24 17:20:51','USER_LOGIN',1,'2015-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(429,'2015-02-24 17:20:54','USER_LOGOUT',1,'2015-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(430,'2015-02-24 17:21:19','USER_LOGIN',1,'2015-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(431,'2015-02-24 17:32:35','USER_LOGIN',1,'2015-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL,NULL,NULL,NULL),(432,'2015-02-24 18:28:48','USER_LOGIN',1,'2015-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(433,'2015-02-24 18:29:27','USER_LOGOUT',1,'2015-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL,NULL,NULL),(434,'2015-02-24 18:29:32','USER_LOGIN',1,'2015-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL,NULL,NULL,NULL),(435,'2015-02-24 20:13:13','USER_LOGOUT',1,'2015-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(436,'2015-02-24 20:13:17','USER_LOGIN',1,'2015-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(437,'2015-02-25 08:57:16','USER_LOGIN',1,'2015-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(438,'2015-02-25 08:57:59','USER_LOGOUT',1,'2015-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(439,'2015-02-25 09:15:02','USER_LOGIN',1,'2015-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(440,'2015-02-25 09:15:50','USER_LOGOUT',1,'2015-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(441,'2015-02-25 09:15:57','USER_LOGIN',1,'2015-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(442,'2015-02-25 09:16:12','USER_LOGOUT',1,'2015-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(443,'2015-02-25 09:16:19','USER_LOGIN',1,'2015-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(444,'2015-02-25 09:16:25','USER_LOGOUT',1,'2015-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(445,'2015-02-25 09:16:39','USER_LOGIN_FAILED',1,'2015-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(446,'2015-02-25 09:16:42','USER_LOGIN_FAILED',1,'2015-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(447,'2015-02-25 09:16:54','USER_LOGIN_FAILED',1,'2015-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(448,'2015-02-25 09:17:53','USER_LOGIN',1,'2015-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(449,'2015-02-25 09:18:37','USER_LOGOUT',1,'2015-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(450,'2015-02-25 09:18:41','USER_LOGIN',1,'2015-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(451,'2015-02-25 09:18:47','USER_LOGOUT',1,'2015-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(452,'2015-02-25 10:05:34','USER_LOGIN',1,'2015-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(453,'2015-02-26 21:51:40','USER_LOGIN',1,'2015-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(454,'2015-02-26 23:30:06','USER_LOGIN',1,'2015-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(455,'2015-02-27 14:13:11','USER_LOGIN',1,'2015-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(456,'2015-02-27 18:12:06','USER_LOGIN_FAILED',1,'2015-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(457,'2015-02-27 18:12:10','USER_LOGIN',1,'2015-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(458,'2015-02-27 20:20:08','USER_LOGIN',1,'2015-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(459,'2015-03-01 22:12:03','USER_LOGIN',1,'2015-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(460,'2015-03-02 11:45:50','USER_LOGIN',1,'2015-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(461,'2015-03-02 15:53:51','USER_LOGIN_FAILED',1,'2015-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(462,'2015-03-02 15:53:53','USER_LOGIN',1,'2015-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(463,'2015-03-02 18:32:32','USER_LOGIN',1,'2015-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(464,'2015-03-02 22:59:36','USER_LOGIN',1,'2015-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(465,'2015-03-03 16:26:26','USER_LOGIN',1,'2015-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(466,'2015-03-03 22:50:27','USER_LOGIN',1,'2015-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(467,'2015-03-04 08:29:27','USER_LOGIN',1,'2015-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(468,'2015-03-04 18:27:28','USER_LOGIN',1,'2015-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL,NULL,NULL,NULL),(469,'2015-03-04 19:27:23','USER_LOGIN',1,'2015-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL,NULL,NULL,NULL),(470,'2015-03-04 19:35:14','USER_LOGIN',1,'2015-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(471,'2015-03-04 19:55:49','USER_LOGIN',1,'2015-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL,NULL,NULL,NULL),(472,'2015-03-04 21:16:13','USER_LOGIN',1,'2015-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(473,'2015-03-05 10:17:30','USER_LOGIN',1,'2015-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(474,'2015-03-05 11:02:43','USER_LOGIN',1,'2015-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(475,'2015-03-05 23:14:39','USER_LOGIN',1,'2015-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(476,'2015-03-06 08:58:57','USER_LOGIN',1,'2015-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(477,'2015-03-06 14:29:40','USER_LOGIN',1,'2015-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(478,'2015-03-06 21:53:02','USER_LOGIN',1,'2015-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(479,'2015-03-07 21:14:39','USER_LOGIN',1,'2015-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(480,'2015-03-08 00:06:05','USER_LOGIN',1,'2015-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(481,'2015-03-08 01:38:13','USER_LOGIN',1,'2015-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(482,'2015-03-08 08:59:50','USER_LOGIN',1,'2015-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(483,'2015-03-09 12:08:51','USER_LOGIN',1,'2015-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(484,'2015-03-09 15:19:53','USER_LOGIN',1,'2015-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(495,'2015-03-09 18:06:21','USER_LOGIN',1,'2015-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(496,'2015-03-09 20:01:24','USER_LOGIN',1,'2015-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(497,'2015-03-09 23:36:45','USER_LOGIN',1,'2015-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(498,'2015-03-10 14:37:13','USER_LOGIN',1,'2015-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(499,'2015-03-10 17:54:12','USER_LOGIN',1,'2015-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(500,'2015-03-11 08:57:09','USER_LOGIN',1,'2015-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(501,'2015-03-11 22:05:13','USER_LOGIN',1,'2015-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(502,'2015-03-12 08:34:27','USER_LOGIN',1,'2015-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(503,'2015-03-13 09:11:02','USER_LOGIN',1,'2015-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(504,'2015-03-13 10:02:11','USER_LOGIN',1,'2015-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(505,'2015-03-13 13:20:58','USER_LOGIN',1,'2015-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(506,'2015-03-13 16:19:28','USER_LOGIN',1,'2015-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(507,'2015-03-13 18:34:30','USER_LOGIN',1,'2015-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(508,'2015-03-14 08:25:02','USER_LOGIN',1,'2015-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(509,'2015-03-14 19:15:22','USER_LOGIN',1,'2015-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(510,'2015-03-14 21:58:53','USER_LOGIN',1,'2015-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(511,'2015-03-14 21:58:59','USER_LOGOUT',1,'2015-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(512,'2015-03-14 21:59:07','USER_LOGIN',1,'2015-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(513,'2015-03-14 22:58:22','USER_LOGOUT',1,'2015-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(514,'2015-03-14 23:00:25','USER_LOGIN',1,'2015-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(515,'2015-03-16 12:14:28','USER_LOGIN',1,'2015-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(516,'2015-03-16 16:09:01','USER_LOGIN',1,'2015-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(517,'2015-03-16 16:57:11','USER_LOGIN',1,'2015-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(518,'2015-03-16 19:31:31','USER_LOGIN',1,'2015-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL,NULL,NULL,NULL),(519,'2015-03-17 17:44:39','USER_LOGIN',1,'2015-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(520,'2015-03-17 20:40:57','USER_LOGIN',1,'2015-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(521,'2015-03-17 23:14:05','USER_LOGIN',1,'2015-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(522,'2015-03-17 23:28:47','USER_LOGOUT',1,'2015-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(523,'2015-03-17 23:28:54','USER_LOGIN',1,'2015-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(524,'2015-03-18 17:37:30','USER_LOGIN',1,'2015-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(525,'2015-03-18 18:11:37','USER_LOGIN',1,'2015-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(526,'2015-03-19 08:35:08','USER_LOGIN',1,'2015-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(527,'2015-03-19 09:20:23','USER_LOGIN',1,'2015-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(528,'2015-03-20 13:17:13','USER_LOGIN',1,'2015-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(529,'2015-03-20 14:44:31','USER_LOGIN',1,'2015-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(530,'2015-03-20 18:24:25','USER_LOGIN',1,'2015-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(531,'2015-03-20 19:15:54','USER_LOGIN',1,'2015-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(532,'2015-03-21 18:40:47','USER_LOGIN',1,'2015-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(533,'2015-03-21 21:42:24','USER_LOGIN',1,'2015-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(534,'2015-03-22 08:39:23','USER_LOGIN',1,'2015-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(535,'2015-03-23 13:04:55','USER_LOGIN',1,'2015-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(536,'2015-03-23 15:47:43','USER_LOGIN',1,'2015-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(537,'2015-03-23 22:56:36','USER_LOGIN',1,'2015-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(538,'2015-03-24 01:22:32','USER_LOGIN',1,'2015-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(539,'2015-03-24 14:40:42','USER_LOGIN',1,'2015-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(540,'2015-03-24 15:30:26','USER_LOGOUT',1,'2015-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(541,'2015-03-24 15:30:29','USER_LOGIN',1,'2015-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(542,'2015-03-24 15:49:40','USER_LOGOUT',1,'2015-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(543,'2015-03-24 15:49:48','USER_LOGIN',1,'2015-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(544,'2015-03-24 15:52:35','USER_MODIFY',1,'2015-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(545,'2015-03-24 15:52:52','USER_MODIFY',1,'2015-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(546,'2015-03-24 15:53:09','USER_MODIFY',1,'2015-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(547,'2015-03-24 15:53:23','USER_MODIFY',1,'2015-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(548,'2015-03-24 16:00:04','USER_MODIFY',1,'2015-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(549,'2015-03-24 16:01:50','USER_MODIFY',1,'2015-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(550,'2015-03-24 16:10:14','USER_MODIFY',1,'2015-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(551,'2015-03-24 16:55:13','USER_LOGIN',1,'2015-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(552,'2015-03-24 17:44:29','USER_LOGIN',1,'2015-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL,NULL,NULL,NULL),(553,'2015-09-08 23:06:26','USER_LOGIN',1,'2015-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL,NULL,NULL,NULL),(554,'2015-10-21 22:32:28','USER_LOGIN',1,'2015-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL,NULL,NULL,NULL),(555,'2015-10-21 22:32:48','USER_LOGIN',1,'2015-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL,NULL,NULL,NULL),(556,'2015-11-07 00:01:51','USER_LOGIN',1,'2015-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL,NULL,NULL,NULL),(557,'2016-03-02 15:21:07','USER_LOGIN',1,'2016-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL,NULL,NULL),(558,'2016-03-02 15:36:53','USER_LOGIN',1,'2016-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL,NULL,NULL),(559,'2016-03-02 18:54:23','USER_LOGIN',1,'2016-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL,NULL,NULL),(560,'2016-03-02 19:11:17','USER_LOGIN',1,'2016-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL,NULL,NULL),(561,'2016-03-03 18:19:24','USER_LOGIN',1,'2016-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL,NULL,NULL,NULL),(562,'2016-12-21 12:51:38','USER_LOGIN',1,'2016-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL,NULL,NULL,NULL),(563,'2016-12-21 19:52:09','USER_LOGIN',1,'2016-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL,NULL,NULL,NULL),(566,'2017-10-03 08:49:43','USER_NEW_PASSWORD',1,'2017-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(567,'2017-10-03 08:49:43','USER_MODIFY',1,'2017-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(568,'2017-10-03 09:03:12','USER_MODIFY',1,'2017-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(569,'2017-10-03 09:03:42','USER_MODIFY',1,'2017-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(570,'2017-10-03 09:07:36','USER_MODIFY',1,'2017-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(571,'2017-10-03 09:08:58','USER_NEW_PASSWORD',1,'2017-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(572,'2017-10-03 09:08:58','USER_MODIFY',1,'2017-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(573,'2017-10-03 09:09:23','USER_MODIFY',1,'2017-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(574,'2017-10-03 09:11:04','USER_NEW_PASSWORD',1,'2017-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(575,'2017-10-03 09:11:04','USER_MODIFY',1,'2017-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(576,'2017-10-03 09:11:53','USER_MODIFY',1,'2017-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(577,'2017-10-03 09:42:12','USER_LOGIN_FAILED',1,'2017-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(578,'2017-10-03 09:42:19','USER_LOGIN_FAILED',1,'2017-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(579,'2017-10-03 09:42:42','USER_LOGIN_FAILED',1,'2017-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(580,'2017-10-03 09:43:50','USER_LOGIN',1,'2017-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(581,'2017-10-03 09:44:44','GROUP_MODIFY',1,'2017-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(582,'2017-10-03 09:46:25','GROUP_CREATE',1,'2017-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(583,'2017-10-03 09:46:46','GROUP_CREATE',1,'2017-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(584,'2017-10-03 09:47:41','USER_CREATE',1,'2017-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(585,'2017-10-03 09:47:41','USER_NEW_PASSWORD',1,'2017-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(586,'2017-10-03 09:47:53','USER_MODIFY',1,'2017-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(587,'2017-10-03 09:48:32','USER_DELETE',1,'2017-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(588,'2017-10-03 09:48:52','USER_MODIFY',1,'2017-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(589,'2017-10-03 10:01:28','USER_MODIFY',1,'2017-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(590,'2017-10-03 10:01:39','USER_MODIFY',1,'2017-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(591,'2017-10-05 06:32:38','USER_LOGIN_FAILED',1,'2017-10-05 08:32:38',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(592,'2017-10-05 06:32:44','USER_LOGIN',1,'2017-10-05 08:32:44',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(593,'2017-10-05 07:07:52','USER_CREATE',1,'2017-10-05 09:07:52',1,'User atheceo created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(594,'2017-10-05 07:07:52','USER_NEW_PASSWORD',1,'2017-10-05 09:07:52',1,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(595,'2017-10-05 07:09:08','USER_NEW_PASSWORD',1,'2017-10-05 09:09:08',1,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(596,'2017-10-05 07:09:08','USER_MODIFY',1,'2017-10-05 09:09:08',1,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(597,'2017-10-05 07:09:46','USER_CREATE',1,'2017-10-05 09:09:46',1,'User admin created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(598,'2017-10-05 07:09:46','USER_NEW_PASSWORD',1,'2017-10-05 09:09:46',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(599,'2017-10-05 07:10:20','USER_MODIFY',1,'2017-10-05 09:10:20',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(600,'2017-10-05 07:10:48','USER_MODIFY',1,'2017-10-05 09:10:48',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(601,'2017-10-05 07:11:22','USER_NEW_PASSWORD',1,'2017-10-05 09:11:22',1,'Password change for bbookkeeper','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(602,'2017-10-05 07:11:22','USER_MODIFY',1,'2017-10-05 09:11:22',1,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(603,'2017-10-05 07:12:37','USER_MODIFY',1,'2017-10-05 09:12:37',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(604,'2017-10-05 07:13:27','USER_MODIFY',1,'2017-10-05 09:13:27',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(605,'2017-10-05 07:13:52','USER_MODIFY',1,'2017-10-05 09:13:52',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(606,'2017-10-05 07:14:35','USER_LOGOUT',1,'2017-10-05 09:14:35',1,'(UserLogoff,aeinstein)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(607,'2017-10-05 07:14:40','USER_LOGIN_FAILED',1,'2017-10-05 09:14:40',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(608,'2017-10-05 07:14:44','USER_LOGIN_FAILED',1,'2017-10-05 09:14:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(609,'2017-10-05 07:14:49','USER_LOGIN',1,'2017-10-05 09:14:49',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(610,'2017-10-05 07:57:18','USER_MODIFY',1,'2017-10-05 09:57:18',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(611,'2017-10-05 08:06:54','USER_LOGOUT',1,'2017-10-05 10:06:54',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(612,'2017-10-05 08:07:03','USER_LOGIN',1,'2017-10-05 10:07:03',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(613,'2017-10-05 19:18:46','USER_LOGIN',1,'2017-10-05 21:18:46',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(614,'2017-10-05 19:29:35','USER_CREATE',1,'2017-10-05 21:29:35',11,'User ccommercy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(615,'2017-10-05 19:29:35','USER_NEW_PASSWORD',1,'2017-10-05 21:29:35',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(616,'2017-10-05 19:30:13','GROUP_CREATE',1,'2017-10-05 21:30:13',11,'Group Commercial created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(617,'2017-10-05 19:31:37','USER_NEW_PASSWORD',1,'2017-10-05 21:31:37',11,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(618,'2017-10-05 19:31:37','USER_MODIFY',1,'2017-10-05 21:31:37',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(619,'2017-10-05 19:32:00','USER_MODIFY',1,'2017-10-05 21:32:00',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(620,'2017-10-05 19:33:33','USER_CREATE',1,'2017-10-05 21:33:33',11,'User sscientol created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(621,'2017-10-05 19:33:33','USER_NEW_PASSWORD',1,'2017-10-05 21:33:33',11,'Password change for sscientol','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(622,'2017-10-05 19:33:47','USER_NEW_PASSWORD',1,'2017-10-05 21:33:47',11,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(623,'2017-10-05 19:33:47','USER_MODIFY',1,'2017-10-05 21:33:47',11,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(624,'2017-10-05 19:34:23','USER_NEW_PASSWORD',1,'2017-10-05 21:34:23',11,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(625,'2017-10-05 19:34:23','USER_MODIFY',1,'2017-10-05 21:34:23',11,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(626,'2017-10-05 19:34:42','USER_MODIFY',1,'2017-10-05 21:34:42',11,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(627,'2017-10-05 19:36:06','USER_NEW_PASSWORD',1,'2017-10-05 21:36:06',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(628,'2017-10-05 19:36:06','USER_MODIFY',1,'2017-10-05 21:36:06',11,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(629,'2017-10-05 19:36:57','USER_NEW_PASSWORD',1,'2017-10-05 21:36:57',11,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(630,'2017-10-05 19:36:57','USER_MODIFY',1,'2017-10-05 21:36:57',11,'User atheceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(631,'2017-10-05 19:37:27','USER_LOGOUT',1,'2017-10-05 21:37:27',11,'(UserLogoff,atheceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(632,'2017-10-05 19:37:35','USER_LOGIN_FAILED',1,'2017-10-05 21:37:35',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(633,'2017-10-05 19:37:39','USER_LOGIN_FAILED',1,'2017-10-05 21:37:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(634,'2017-10-05 19:37:44','USER_LOGIN_FAILED',1,'2017-10-05 21:37:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(635,'2017-10-05 19:37:49','USER_LOGIN_FAILED',1,'2017-10-05 21:37:49',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(636,'2017-10-05 19:38:12','USER_LOGIN_FAILED',1,'2017-10-05 21:38:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(637,'2017-10-05 19:40:48','USER_LOGIN_FAILED',1,'2017-10-05 21:40:48',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(638,'2017-10-05 19:40:55','USER_LOGIN',1,'2017-10-05 21:40:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(639,'2017-10-05 19:43:34','USER_MODIFY',1,'2017-10-05 21:43:34',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(640,'2017-10-05 19:45:43','USER_CREATE',1,'2017-10-05 21:45:43',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(641,'2017-10-05 19:45:43','USER_NEW_PASSWORD',1,'2017-10-05 21:45:43',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(642,'2017-10-05 19:46:18','USER_DELETE',1,'2017-10-05 21:46:18',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(643,'2017-10-05 19:47:09','USER_MODIFY',1,'2017-10-05 21:47:09',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(644,'2017-10-05 19:47:22','USER_MODIFY',1,'2017-10-05 21:47:22',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(645,'2017-10-05 19:52:05','USER_MODIFY',1,'2017-10-05 21:52:05',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(646,'2017-10-05 19:52:23','USER_MODIFY',1,'2017-10-05 21:52:23',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(647,'2017-10-05 19:54:54','USER_NEW_PASSWORD',1,'2017-10-05 21:54:54',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(648,'2017-10-05 19:54:54','USER_MODIFY',1,'2017-10-05 21:54:54',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(649,'2017-10-05 19:57:02','USER_MODIFY',1,'2017-10-05 21:57:02',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(650,'2017-10-05 19:57:57','USER_NEW_PASSWORD',1,'2017-10-05 21:57:57',12,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(651,'2017-10-05 19:57:57','USER_MODIFY',1,'2017-10-05 21:57:57',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(652,'2017-10-05 19:59:42','USER_NEW_PASSWORD',1,'2017-10-05 21:59:42',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(653,'2017-10-05 19:59:42','USER_MODIFY',1,'2017-10-05 21:59:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(654,'2017-10-05 20:00:21','USER_MODIFY',1,'2017-10-05 22:00:21',12,'User adminx modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(655,'2017-10-05 20:05:36','USER_MODIFY',1,'2017-10-05 22:05:36',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(656,'2017-10-05 20:06:25','USER_MODIFY',1,'2017-10-05 22:06:25',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(657,'2017-10-05 20:07:18','USER_MODIFY',1,'2017-10-05 22:07:18',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(658,'2017-10-05 20:07:36','USER_MODIFY',1,'2017-10-05 22:07:36',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(659,'2017-10-05 20:08:34','USER_MODIFY',1,'2017-10-05 22:08:34',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(660,'2017-10-05 20:47:52','USER_CREATE',1,'2017-10-05 22:47:52',12,'User cc1 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(661,'2017-10-05 20:47:52','USER_NEW_PASSWORD',1,'2017-10-05 22:47:52',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(662,'2017-10-05 20:47:55','USER_LOGOUT',1,'2017-10-05 22:47:55',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(663,'2017-10-05 20:48:08','USER_LOGIN',1,'2017-10-05 22:48:08',11,'(UserLogged,zzeceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x434','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(664,'2017-10-05 20:48:39','USER_CREATE',1,'2017-10-05 22:48:39',11,'User cc2 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(665,'2017-10-05 20:48:39','USER_NEW_PASSWORD',1,'2017-10-05 22:48:39',11,'Password change for cc2','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(666,'2017-10-05 20:48:59','USER_NEW_PASSWORD',1,'2017-10-05 22:48:59',11,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(667,'2017-10-05 20:48:59','USER_MODIFY',1,'2017-10-05 22:48:59',11,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(668,'2017-10-05 21:06:36','USER_LOGOUT',1,'2017-10-05 23:06:35',11,'(UserLogoff,zzeceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(669,'2017-10-05 21:06:44','USER_LOGIN_FAILED',1,'2017-10-05 23:06:44',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(670,'2017-10-05 21:07:12','USER_LOGIN_FAILED',1,'2017-10-05 23:07:12',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(671,'2017-10-05 21:07:19','USER_LOGIN_FAILED',1,'2017-10-05 23:07:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(672,'2017-10-05 21:07:27','USER_LOGIN_FAILED',1,'2017-10-05 23:07:27',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(673,'2017-10-05 21:07:32','USER_LOGIN',1,'2017-10-05 23:07:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(674,'2017-10-05 21:12:28','USER_NEW_PASSWORD',1,'2017-10-05 23:12:28',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(675,'2017-10-05 21:12:28','USER_MODIFY',1,'2017-10-05 23:12:28',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(676,'2017-10-05 21:13:00','USER_CREATE',1,'2017-10-05 23:13:00',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(677,'2017-10-05 21:13:00','USER_NEW_PASSWORD',1,'2017-10-05 23:13:00',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(678,'2017-10-05 21:13:40','USER_DELETE',1,'2017-10-05 23:13:40',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(679,'2017-10-05 21:14:47','USER_LOGOUT',1,'2017-10-05 23:14:47',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(680,'2017-10-05 21:14:56','USER_LOGIN',1,'2017-10-05 23:14:56',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(681,'2017-10-05 21:15:56','USER_LOGOUT',1,'2017-10-05 23:15:56',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(682,'2017-10-05 21:16:06','USER_LOGIN',1,'2017-10-05 23:16:06',17,'(UserLogged,cc2) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(683,'2017-10-05 21:37:25','USER_LOGOUT',1,'2017-10-05 23:37:25',17,'(UserLogoff,cc2)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(684,'2017-10-05 21:37:31','USER_LOGIN',1,'2017-10-05 23:37:31',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(685,'2017-10-05 21:43:53','USER_LOGOUT',1,'2017-10-05 23:43:53',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(686,'2017-10-05 21:44:00','USER_LOGIN',1,'2017-10-05 23:44:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(687,'2017-10-05 21:46:17','USER_LOGOUT',1,'2017-10-05 23:46:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(688,'2017-10-05 21:46:24','USER_LOGIN',1,'2017-10-05 23:46:24',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL,NULL,NULL,NULL),(689,'2017-11-04 15:17:06','USER_LOGIN',1,'2017-11-04 16:17:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(690,'2017-11-15 22:04:04','USER_LOGIN',1,'2017-11-15 23:04:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(691,'2017-11-15 22:23:45','USER_MODIFY',1,'2017-11-15 23:23:45',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(692,'2017-11-15 22:24:22','USER_MODIFY',1,'2017-11-15 23:24:22',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(693,'2017-11-15 22:24:53','USER_MODIFY',1,'2017-11-15 23:24:53',12,'User cc2 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(694,'2017-11-15 22:25:17','USER_MODIFY',1,'2017-11-15 23:25:17',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(695,'2017-11-15 22:45:37','USER_LOGOUT',1,'2017-11-15 23:45:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(696,'2017-11-18 13:41:02','USER_LOGIN',1,'2017-11-18 14:41:02',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(697,'2017-11-18 14:23:35','USER_LOGIN',1,'2017-11-18 15:23:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(698,'2017-11-18 15:15:46','USER_LOGOUT',1,'2017-11-18 16:15:46',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(699,'2017-11-18 15:15:51','USER_LOGIN',1,'2017-11-18 16:15:51',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(700,'2017-11-30 17:52:08','USER_LOGIN',1,'2017-11-30 18:52:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(701,'2018-01-10 16:45:43','USER_LOGIN',1,'2018-01-10 17:45:43',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(702,'2018-01-10 16:45:52','USER_LOGOUT',1,'2018-01-10 17:45:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(703,'2018-01-10 16:46:06','USER_LOGIN',1,'2018-01-10 17:46:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(704,'2018-01-16 14:53:47','USER_LOGIN',1,'2018-01-16 15:53:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(705,'2018-01-16 15:04:29','USER_LOGOUT',1,'2018-01-16 16:04:29',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(706,'2018-01-16 15:04:40','USER_LOGIN',1,'2018-01-16 16:04:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(707,'2018-01-22 09:33:26','USER_LOGIN',1,'2018-01-22 10:33:26',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(708,'2018-01-22 09:35:19','USER_LOGOUT',1,'2018-01-22 10:35:19',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(709,'2018-01-22 09:35:29','USER_LOGIN',1,'2018-01-22 10:35:29',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(710,'2018-01-22 10:47:34','USER_CREATE',1,'2018-01-22 11:47:34',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(711,'2018-01-22 10:47:34','USER_NEW_PASSWORD',1,'2018-01-22 11:47:34',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(712,'2018-01-22 12:07:56','USER_LOGIN',1,'2018-01-22 13:07:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(713,'2018-01-22 12:36:25','USER_NEW_PASSWORD',1,'2018-01-22 13:36:25',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(714,'2018-01-22 12:36:25','USER_MODIFY',1,'2018-01-22 13:36:25',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(715,'2018-01-22 12:56:32','USER_MODIFY',1,'2018-01-22 13:56:32',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(716,'2018-01-22 12:58:05','USER_MODIFY',1,'2018-01-22 13:58:05',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(717,'2018-01-22 13:01:02','USER_MODIFY',1,'2018-01-22 14:01:02',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(718,'2018-01-22 13:01:18','USER_MODIFY',1,'2018-01-22 14:01:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(719,'2018-01-22 13:13:42','USER_MODIFY',1,'2018-01-22 14:13:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(720,'2018-01-22 13:15:20','USER_DELETE',1,'2018-01-22 14:15:20',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(721,'2018-01-22 13:19:21','USER_LOGOUT',1,'2018-01-22 14:19:21',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(722,'2018-01-22 13:19:32','USER_LOGIN',1,'2018-01-22 14:19:32',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(723,'2018-01-22 13:19:51','USER_LOGOUT',1,'2018-01-22 14:19:51',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(724,'2018-01-22 13:20:01','USER_LOGIN',1,'2018-01-22 14:20:01',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(725,'2018-01-22 13:28:22','USER_LOGOUT',1,'2018-01-22 14:28:22',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(726,'2018-01-22 13:28:35','USER_LOGIN',1,'2018-01-22 14:28:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(727,'2018-01-22 13:33:54','USER_LOGOUT',1,'2018-01-22 14:33:54',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(728,'2018-01-22 13:34:05','USER_LOGIN',1,'2018-01-22 14:34:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(729,'2018-01-22 13:51:46','USER_MODIFY',1,'2018-01-22 14:51:46',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL,NULL,NULL,NULL),(730,'2018-01-22 16:20:12','USER_LOGIN',1,'2018-01-22 17:20:12',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(731,'2018-01-22 16:20:22','USER_LOGOUT',1,'2018-01-22 17:20:22',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(732,'2018-01-22 16:20:36','USER_LOGIN',1,'2018-01-22 17:20:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(733,'2018-01-22 16:27:02','USER_CREATE',1,'2018-01-22 17:27:02',12,'User ldestailleur created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(734,'2018-01-22 16:27:02','USER_NEW_PASSWORD',1,'2018-01-22 17:27:02',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(735,'2018-01-22 16:28:34','USER_MODIFY',1,'2018-01-22 17:28:34',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(736,'2018-01-22 16:30:01','USER_ENABLEDISABLE',1,'2018-01-22 17:30:01',12,'User cc2 activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(737,'2018-01-22 17:11:06','USER_LOGIN',1,'2018-01-22 18:11:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(738,'2018-01-22 18:00:02','USER_DELETE',1,'2018-01-22 19:00:02',12,'User zzz removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(739,'2018-01-22 18:01:40','USER_DELETE',1,'2018-01-22 19:01:40',12,'User aaab removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(740,'2018-01-22 18:01:52','USER_DELETE',1,'2018-01-22 19:01:52',12,'User zzzg removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL,NULL,NULL,NULL),(741,'2018-03-13 10:54:59','USER_LOGIN',1,'2018-03-13 14:54:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x971','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36',NULL,NULL,NULL,NULL),(742,'2018-07-30 11:13:10','USER_LOGIN',1,'2018-07-30 15:13:10',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(743,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(744,'2018-07-30 12:50:23','USER_CREATE',1,'2018-07-30 16:50:23',12,'User eldy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(745,'2018-07-30 12:50:23','USER_NEW_PASSWORD',1,'2018-07-30 16:50:23',12,'Password change for eldy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(746,'2018-07-30 12:50:38','USER_MODIFY',1,'2018-07-30 16:50:38',12,'User eldy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(747,'2018-07-30 12:50:54','USER_DELETE',1,'2018-07-30 16:50:54',12,'User eldy removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(748,'2018-07-30 12:51:23','USER_NEW_PASSWORD',1,'2018-07-30 16:51:23',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(749,'2018-07-30 12:51:23','USER_MODIFY',1,'2018-07-30 16:51:23',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(750,'2018-07-30 18:26:58','USER_LOGIN',1,'2018-07-30 22:26:58',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(751,'2018-07-30 18:27:40','USER_LOGOUT',1,'2018-07-30 22:27:40',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(752,'2018-07-30 18:27:47','USER_LOGIN',1,'2018-07-30 22:27:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(753,'2018-07-30 19:00:00','USER_LOGOUT',1,'2018-07-30 23:00:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(754,'2018-07-30 19:00:04','USER_LOGIN',1,'2018-07-30 23:00:04',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(755,'2018-07-30 19:00:14','USER_LOGOUT',1,'2018-07-30 23:00:14',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(756,'2018-07-30 19:00:19','USER_LOGIN',1,'2018-07-30 23:00:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(757,'2018-07-30 19:00:43','USER_LOGOUT',1,'2018-07-30 23:00:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(758,'2018-07-30 19:00:48','USER_LOGIN',1,'2018-07-30 23:00:48',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(759,'2018-07-30 19:03:52','USER_LOGOUT',1,'2018-07-30 23:03:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(760,'2018-07-30 19:03:57','USER_LOGIN_FAILED',1,'2018-07-30 23:03:57',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(761,'2018-07-30 19:03:59','USER_LOGIN',1,'2018-07-30 23:03:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(762,'2018-07-30 19:04:13','USER_LOGOUT',1,'2018-07-30 23:04:13',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(763,'2018-07-30 19:04:17','USER_LOGIN',1,'2018-07-30 23:04:17',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(764,'2018-07-30 19:04:26','USER_LOGOUT',1,'2018-07-30 23:04:26',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(765,'2018-07-30 19:04:31','USER_LOGIN',1,'2018-07-30 23:04:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(766,'2018-07-30 19:10:50','USER_LOGOUT',1,'2018-07-30 23:10:50',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(767,'2018-07-30 19:10:54','USER_LOGIN',1,'2018-07-30 23:10:54',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(768,'2018-07-31 10:15:52','USER_LOGIN',1,'2018-07-31 14:15:52',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL,NULL,NULL),(769,'2018-07-31 10:16:27','USER_LOGIN',1,'2018-07-31 14:16:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(770,'2018-07-31 10:32:14','USER_LOGIN',1,'2018-07-31 14:32:14',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL,NULL,NULL),(771,'2018-07-31 10:36:28','USER_LOGIN',1,'2018-07-31 14:36:28',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL,NULL,NULL,NULL),(772,'2018-07-31 10:40:10','USER_LOGIN',1,'2018-07-31 14:40:10',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Links (2.8; Linux 3.19.0-46-generic x86_64; GNU C 4.8.2; text)',NULL,NULL,NULL,NULL),(773,'2018-07-31 10:54:16','USER_LOGIN',1,'2018-07-31 14:54:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Lynx/2.8.8pre.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.12.23',NULL,NULL,NULL,NULL),(774,'2018-07-31 12:52:52','USER_LOGIN',1,'2018-07-31 16:52:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x592','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(775,'2018-07-31 13:25:33','USER_LOGOUT',1,'2018-07-31 17:25:33',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(776,'2018-07-31 13:26:32','USER_LOGIN',1,'2018-07-31 17:26:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1280x751','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(777,'2018-07-31 14:13:57','USER_LOGOUT',1,'2018-07-31 18:13:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(778,'2018-07-31 14:14:04','USER_LOGIN',1,'2018-07-31 18:14:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(779,'2018-07-31 16:04:35','USER_LOGIN',1,'2018-07-31 20:04:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(780,'2018-07-31 21:14:14','USER_LOGIN',1,'2018-08-01 01:14:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36',NULL,NULL,NULL,NULL),(781,'2017-01-29 15:14:05','USER_LOGOUT',1,'2017-01-29 19:14:05',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(782,'2017-01-29 15:34:43','USER_LOGIN',1,'2017-01-29 19:34:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(783,'2017-01-29 15:35:04','USER_LOGOUT',1,'2017-01-29 19:35:04',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(784,'2017-01-29 15:35:12','USER_LOGIN',1,'2017-01-29 19:35:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(785,'2017-01-29 15:36:43','USER_LOGOUT',1,'2017-01-29 19:36:43',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(786,'2017-01-29 15:41:21','USER_LOGIN',1,'2017-01-29 19:41:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(787,'2017-01-29 15:41:41','USER_LOGOUT',1,'2017-01-29 19:41:41',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(788,'2017-01-29 15:42:43','USER_LOGIN',1,'2017-01-29 19:42:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(789,'2017-01-29 15:43:18','USER_LOGOUT',1,'2017-01-29 19:43:18',12,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(790,'2017-01-29 15:46:31','USER_LOGIN',1,'2017-01-29 19:46:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x571','192.168.0.254','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(791,'2017-01-29 16:18:56','USER_LOGIN',1,'2017-01-29 20:18:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=360x526','192.168.0.254','Mozilla/5.0 (Linux; Android 6.0; LG-H818 Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 - DoliDroid - Android client pour Dolibarr ERP-CRM',NULL,NULL,NULL,NULL),(792,'2017-01-29 17:20:59','USER_LOGIN',1,'2017-01-29 21:20:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(793,'2017-01-30 11:19:40','USER_LOGIN',1,'2017-01-30 15:19:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(794,'2017-01-31 16:49:39','USER_LOGIN',1,'2017-01-31 20:49:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(795,'2017-02-01 10:55:23','USER_LOGIN',1,'2017-02-01 14:55:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(796,'2017-02-01 13:34:31','USER_LOGIN',1,'2017-02-01 17:34:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(797,'2017-02-01 14:41:26','USER_LOGIN',1,'2017-02-01 18:41:26',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(798,'2017-02-01 23:51:48','USER_LOGIN_FAILED',1,'2017-02-02 03:51:48',NULL,'Bad value for login or password - login=autologin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(799,'2017-02-01 23:52:55','USER_LOGIN',1,'2017-02-02 03:52:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(800,'2017-02-01 23:55:45','USER_CREATE',1,'2017-02-02 03:55:45',12,'User aboston created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(801,'2017-02-01 23:55:45','USER_NEW_PASSWORD',1,'2017-02-02 03:55:45',12,'Password change for aboston','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(802,'2017-02-01 23:56:38','USER_MODIFY',1,'2017-02-02 03:56:38',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(803,'2017-02-01 23:56:50','USER_MODIFY',1,'2017-02-02 03:56:50',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(804,'2017-02-02 01:14:44','USER_LOGIN',1,'2017-02-02 05:14:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',NULL,NULL,NULL,NULL),(805,'2017-02-03 10:27:18','USER_LOGIN',1,'2017-02-03 14:27:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(806,'2017-02-04 10:22:34','USER_LOGIN',1,'2017-02-04 14:22:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x489','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(807,'2017-02-06 04:01:31','USER_LOGIN',1,'2017-02-06 08:01:31',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(808,'2017-02-06 10:21:32','USER_LOGIN',1,'2017-02-06 14:21:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(809,'2017-02-06 19:09:27','USER_LOGIN',1,'2017-02-06 23:09:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(810,'2017-02-06 23:39:17','USER_LOGIN',1,'2017-02-07 03:39:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(811,'2017-02-07 11:36:34','USER_LOGIN',1,'2017-02-07 15:36:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x676','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(812,'2017-02-07 18:51:53','USER_LOGIN',1,'2017-02-07 22:51:53',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(813,'2017-02-07 23:13:40','USER_LOGIN',1,'2017-02-08 03:13:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(814,'2017-02-08 09:29:12','USER_LOGIN',1,'2017-02-08 13:29:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(815,'2017-02-08 17:33:12','USER_LOGIN',1,'2017-02-08 21:33:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(816,'2017-02-09 17:30:34','USER_LOGIN',1,'2017-02-09 21:30:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(817,'2017-02-10 09:30:02','USER_LOGIN',1,'2017-02-10 13:30:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(818,'2017-02-10 16:16:14','USER_LOGIN',1,'2017-02-10 20:16:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(819,'2017-02-10 17:28:15','USER_LOGIN',1,'2017-02-10 21:28:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(820,'2017-02-11 12:54:03','USER_LOGIN',1,'2017-02-11 16:54:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(821,'2017-02-11 17:23:52','USER_LOGIN',1,'2017-02-11 21:23:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(822,'2017-02-12 12:44:03','USER_LOGIN',1,'2017-02-12 16:44:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(823,'2017-02-12 16:42:13','USER_LOGIN',1,'2017-02-12 20:42:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(824,'2017-02-12 19:14:18','USER_LOGIN',1,'2017-02-12 23:14:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(825,'2017-02-15 17:17:00','USER_LOGIN',1,'2017-02-15 21:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(826,'2017-02-15 22:02:40','USER_LOGIN',1,'2017-02-16 02:02:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(827,'2017-02-16 22:13:27','USER_LOGIN',1,'2017-02-17 02:13:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x619','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(828,'2017-02-16 23:54:04','USER_LOGIN',1,'2017-02-17 03:54:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(829,'2017-02-17 09:14:27','USER_LOGIN',1,'2017-02-17 13:14:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(830,'2017-02-17 12:07:05','USER_LOGIN',1,'2017-02-17 16:07:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(831,'2017-02-19 21:22:20','USER_LOGIN',1,'2017-02-20 01:22:20',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(832,'2017-02-20 09:26:47','USER_LOGIN',1,'2017-02-20 13:26:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(833,'2017-02-20 16:39:55','USER_LOGIN',1,'2017-02-20 20:39:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(834,'2017-02-20 16:49:00','USER_MODIFY',1,'2017-02-20 20:49:00',12,'Modification utilisateur ccommerson','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(835,'2017-02-20 17:57:15','USER_LOGIN',1,'2017-02-20 21:57:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(836,'2017-02-20 19:43:48','USER_LOGIN',1,'2017-02-20 23:43:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(837,'2017-02-21 00:04:05','USER_LOGIN',1,'2017-02-21 04:04:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(838,'2017-02-21 10:23:13','USER_LOGIN',1,'2017-02-21 14:23:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(839,'2017-02-21 10:30:17','USER_LOGOUT',1,'2017-02-21 14:30:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(840,'2017-02-21 10:30:22','USER_LOGIN',1,'2017-02-21 14:30:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(841,'2017-02-21 11:44:05','USER_LOGIN',1,'2017-02-21 15:44:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',NULL,NULL,NULL,NULL),(842,'2017-05-12 09:02:48','USER_LOGIN',1,'2017-05-12 13:02:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',NULL,NULL,NULL,NULL),(843,'2017-08-27 13:29:16','USER_LOGIN',1,'2017-08-27 17:29:16',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(844,'2017-08-28 09:11:07','USER_LOGIN',1,'2017-08-28 13:11:07',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(845,'2017-08-28 10:08:58','USER_LOGIN',1,'2017-08-28 14:08:58',12,'(UserLogged,admin) - TZ=;TZString=;Screen=x','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(846,'2017-08-28 10:12:46','USER_MODIFY',1,'2017-08-28 14:12:46',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(847,'2017-08-28 10:28:25','USER_LOGIN',1,'2017-08-28 14:28:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(848,'2017-08-28 10:28:36','USER_LOGOUT',1,'2017-08-28 14:28:36',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(849,'2017-08-28 10:34:50','USER_LOGIN',1,'2017-08-28 14:34:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(850,'2017-08-28 11:59:02','USER_LOGIN',1,'2017-08-28 15:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36',NULL,NULL,NULL,NULL),(851,'2017-08-29 09:57:34','USER_LOGIN',1,'2017-08-29 13:57:34',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(852,'2017-08-29 11:05:51','USER_LOGIN',1,'2017-08-29 15:05:51',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(853,'2017-08-29 14:15:58','USER_LOGIN',1,'2017-08-29 18:15:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(854,'2017-08-29 17:49:28','USER_LOGIN',1,'2017-08-29 21:49:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(855,'2017-08-30 11:53:25','USER_LOGIN',1,'2017-08-30 15:53:25',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(856,'2017-08-30 12:19:31','USER_MODIFY',1,'2017-08-30 16:19:31',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(857,'2017-08-30 12:19:32','USER_MODIFY',1,'2017-08-30 16:19:32',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(858,'2017-08-30 12:19:33','USER_MODIFY',1,'2017-08-30 16:19:33',18,'Modification utilisateur ldestailleur - UserRemovedFromGroup','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(859,'2017-08-30 12:21:42','USER_LOGOUT',1,'2017-08-30 16:21:42',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(860,'2017-08-30 12:21:48','USER_LOGIN',1,'2017-08-30 16:21:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(861,'2017-08-30 15:02:06','USER_LOGIN',1,'2017-08-30 19:02:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(862,'2017-08-31 09:25:42','USER_LOGIN',1,'2017-08-31 13:25:42',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(863,'2017-09-04 07:51:21','USER_LOGIN',1,'2017-09-04 11:51:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x577','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(864,'2017-09-04 09:17:09','USER_LOGIN',1,'2017-09-04 13:17:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(865,'2017-09-04 13:40:28','USER_LOGIN',1,'2017-09-04 17:40:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(866,'2017-09-06 07:55:30','USER_LOGIN',1,'2017-09-06 11:55:30',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(867,'2017-09-06 07:55:33','USER_LOGOUT',1,'2017-09-06 11:55:33',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(868,'2017-09-06 07:55:38','USER_LOGIN',1,'2017-09-06 11:55:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(869,'2017-09-06 16:03:38','USER_LOGIN',1,'2017-09-06 20:03:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(870,'2017-09-06 19:43:07','USER_LOGIN',1,'2017-09-06 23:43:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x937','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',NULL,NULL,NULL,NULL),(871,'2018-01-19 11:18:08','USER_LOGOUT',1,'2018-01-19 11:18:08',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL,NULL,NULL,NULL),(872,'2018-01-19 11:18:47','USER_LOGIN',1,'2018-01-19 11:18:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x965','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',NULL,NULL,NULL,NULL),(873,'2018-01-19 11:21:41','USER_LOGIN',1,'2018-01-19 11:21:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x926','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL,NULL,NULL),(874,'2018-01-19 11:24:18','USER_NEW_PASSWORD',1,'2018-01-19 11:24:18',12,'Password change for admin','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL,NULL,NULL),(875,'2018-01-19 11:24:18','USER_MODIFY',1,'2018-01-19 11:24:18',12,'User admin modified','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL,NULL,NULL),(876,'2018-01-19 11:28:45','USER_LOGOUT',1,'2018-01-19 11:28:45',12,'(UserLogoff,admin)','82.240.38.230','Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0',NULL,NULL,NULL,NULL),(877,'2018-03-16 09:54:15','USER_LOGIN_FAILED',1,'2018-03-16 13:54:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL,NULL,NULL,NULL),(878,'2018-03-16 09:54:23','USER_LOGIN',1,'2018-03-16 13:54:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x936','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36',NULL,NULL,NULL,NULL),(879,'2019-09-26 11:35:07','USER_MODIFY',1,'2019-09-26 13:35:07',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(880,'2019-09-26 11:35:33','USER_MODIFY',1,'2019-09-26 13:35:33',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(881,'2019-09-26 11:36:33','USER_MODIFY',1,'2019-09-26 13:36:33',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(882,'2019-09-26 11:36:56','USER_MODIFY',1,'2019-09-26 13:36:56',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(883,'2019-09-26 11:37:30','USER_MODIFY',1,'2019-09-26 13:37:30',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(884,'2019-09-26 11:37:56','USER_MODIFY',1,'2019-09-26 13:37:56',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(885,'2019-09-26 11:38:11','USER_MODIFY',1,'2019-09-26 13:38:11',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(886,'2019-09-26 11:38:27','USER_MODIFY',1,'2019-09-26 13:38:27',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(887,'2019-09-26 11:38:48','USER_MODIFY',1,'2019-09-26 13:38:48',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(888,'2019-09-26 11:39:35','USER_MODIFY',1,'2019-09-26 13:39:35',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(889,'2019-09-26 11:41:28','USER_MODIFY',1,'2019-09-26 13:41:28',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(890,'2019-09-26 11:43:27','USER_MODIFY',1,'2019-09-26 13:43:27',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(891,'2019-09-26 11:46:44','USER_MODIFY',1,'2019-09-26 13:46:44',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(892,'2019-09-26 11:46:54','USER_MODIFY',1,'2019-09-26 13:46:54',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(893,'2019-09-26 11:47:08','USER_MODIFY',1,'2019-09-26 13:47:08',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(894,'2019-09-26 11:48:04','USER_MODIFY',1,'2019-09-26 13:48:04',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(895,'2019-09-26 11:48:32','USER_MODIFY',1,'2019-09-26 13:48:32',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(896,'2019-09-26 11:48:49','USER_MODIFY',1,'2019-09-26 13:48:49',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(897,'2019-09-26 11:49:12','USER_MODIFY',1,'2019-09-26 13:49:12',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(898,'2019-09-26 11:49:21','USER_MODIFY',1,'2019-09-26 13:49:21',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(899,'2019-09-26 11:49:28','USER_MODIFY',1,'2019-09-26 13:49:28',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(900,'2019-09-26 11:49:37','USER_MODIFY',1,'2019-09-26 13:49:37',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(901,'2019-09-26 11:49:46','USER_MODIFY',1,'2019-09-26 13:49:46',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(902,'2019-09-26 11:49:57','USER_MODIFY',1,'2019-09-26 13:49:57',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(903,'2019-09-26 11:50:17','USER_MODIFY',1,'2019-09-26 13:50:17',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(904,'2019-09-26 11:50:43','USER_MODIFY',1,'2019-09-26 13:50:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(905,'2019-09-26 11:51:10','USER_MODIFY',1,'2019-09-26 13:51:10',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(906,'2019-09-26 11:51:36','USER_MODIFY',1,'2019-09-26 13:51:36',12,'User aboston modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(907,'2019-09-26 11:52:16','USER_MODIFY',1,'2019-09-26 13:52:16',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(908,'2019-09-26 11:52:35','USER_MODIFY',1,'2019-09-26 13:52:35',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(909,'2019-09-26 11:52:59','USER_MODIFY',1,'2019-09-26 13:52:59',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(910,'2019-09-26 11:53:28','USER_MODIFY',1,'2019-09-26 13:53:28',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(911,'2019-09-26 11:53:50','USER_MODIFY',1,'2019-09-26 13:53:50',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(912,'2019-09-26 11:54:18','USER_MODIFY',1,'2019-09-26 13:54:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(913,'2019-09-26 11:54:43','USER_MODIFY',1,'2019-09-26 13:54:43',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(914,'2019-09-26 11:55:09','USER_MODIFY',1,'2019-09-26 13:55:09',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(915,'2019-09-26 11:55:23','USER_MODIFY',1,'2019-09-26 13:55:23',12,'User ccommerson modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(916,'2019-09-26 11:55:35','USER_MODIFY',1,'2019-09-26 13:55:35',12,'User aleerfok modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(917,'2019-09-26 11:55:58','USER_MODIFY',1,'2019-09-26 13:55:58',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(918,'2019-09-26 15:28:46','USER_LOGIN_FAILED',1,'2019-09-26 17:28:46',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(919,'2019-09-26 15:28:51','USER_LOGIN_FAILED',1,'2019-09-26 17:28:51',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(920,'2019-09-26 15:28:55','USER_LOGIN',1,'2019-09-26 17:28:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(921,'2019-09-27 14:51:19','USER_LOGIN_FAILED',1,'2019-09-27 16:51:19',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(922,'2019-09-27 14:51:49','USER_LOGIN_FAILED',1,'2019-09-27 16:51:49',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(923,'2019-09-27 14:51:55','USER_LOGIN_FAILED',1,'2019-09-27 16:51:55',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(924,'2019-09-27 14:52:22','USER_LOGIN_FAILED',1,'2019-09-27 16:52:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(925,'2019-09-27 14:52:41','USER_LOGIN',1,'2019-09-27 16:52:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(926,'2019-09-27 15:47:07','USER_LOGIN_FAILED',1,'2019-09-27 17:47:07',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(927,'2019-09-27 15:47:09','USER_LOGIN_FAILED',1,'2019-09-27 17:47:09',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(928,'2019-09-27 15:47:12','USER_LOGIN',1,'2019-09-27 17:47:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(929,'2019-09-27 16:39:57','USER_LOGIN',1,'2019-09-27 18:39:57',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(930,'2019-09-30 13:49:22','USER_LOGIN_FAILED',1,'2019-09-30 15:49:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(931,'2019-09-30 13:49:27','USER_LOGIN_FAILED',1,'2019-09-30 15:49:27',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(932,'2019-09-30 13:49:30','USER_LOGIN',1,'2019-09-30 15:49:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(933,'2019-09-30 15:49:05','USER_LOGIN_FAILED',1,'2019-09-30 17:49:05',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(934,'2019-09-30 15:49:08','USER_LOGIN',1,'2019-09-30 17:49:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(935,'2019-10-01 11:47:44','USER_LOGIN',1,'2019-10-01 13:47:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(936,'2019-10-01 13:24:03','USER_LOGIN',1,'2019-10-01 15:24:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(937,'2019-10-02 11:41:30','USER_LOGIN_FAILED',1,'2019-10-02 13:41:30',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(938,'2019-10-02 11:41:35','USER_LOGIN',1,'2019-10-02 13:41:35',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(939,'2019-10-02 17:01:42','USER_LOGIN_FAILED',1,'2019-10-02 19:01:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(940,'2019-10-02 17:01:44','USER_LOGIN',1,'2019-10-02 19:01:44',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(941,'2019-10-04 08:06:36','USER_LOGIN_FAILED',1,'2019-10-04 10:06:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(942,'2019-10-04 08:06:40','USER_LOGIN',1,'2019-10-04 10:06:40',18,'(UserLogged,ldestailleur) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(943,'2019-10-04 08:06:46','USER_LOGOUT',1,'2019-10-04 10:06:46',18,'(UserLogoff,ldestailleur)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(944,'2019-10-04 08:06:50','USER_LOGIN',1,'2019-10-04 10:06:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(945,'2019-10-04 10:28:53','USER_LOGIN_FAILED',1,'2019-10-04 12:28:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(946,'2019-10-04 10:31:06','USER_LOGIN',1,'2019-10-04 12:31:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x520','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(947,'2019-10-04 14:55:58','USER_LOGIN',1,'2019-10-04 16:55:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(948,'2019-10-04 16:45:36','USER_LOGIN_FAILED',1,'2019-10-04 18:45:36',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(949,'2019-10-04 16:45:40','USER_LOGIN',1,'2019-10-04 18:45:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(950,'2019-10-05 09:10:32','USER_LOGIN',1,'2019-10-05 11:10:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(951,'2019-10-06 09:02:10','USER_LOGIN_FAILED',1,'2019-10-06 11:02:10',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(952,'2019-10-06 09:02:12','USER_LOGIN',1,'2019-10-06 11:02:12',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x513','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(953,'2019-10-07 09:00:29','USER_LOGIN_FAILED',1,'2019-10-07 11:00:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(954,'2019-10-07 09:00:33','USER_LOGIN',1,'2019-10-07 11:00:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(955,'2019-10-07 15:05:26','USER_LOGIN_FAILED',1,'2019-10-07 17:05:26',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(956,'2019-10-07 15:05:29','USER_LOGIN_FAILED',1,'2019-10-07 17:05:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(957,'2019-10-08 09:57:04','USER_LOGIN_FAILED',1,'2019-10-08 11:57:04',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(958,'2019-10-08 09:57:07','USER_LOGIN',1,'2019-10-08 11:57:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x637','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(959,'2019-10-08 11:18:14','USER_LOGIN_FAILED',1,'2019-10-08 13:18:14',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(960,'2019-10-08 11:18:18','USER_LOGIN',1,'2019-10-08 13:18:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(961,'2019-10-08 13:29:24','USER_LOGIN',1,'2019-10-08 15:29:24',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(962,'2019-10-08 17:04:42','USER_LOGIN_FAILED',1,'2019-10-08 19:04:42',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(963,'2019-10-08 17:04:46','USER_LOGIN',1,'2019-10-08 19:04:46',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(964,'2019-10-08 18:37:06','USER_LOGIN_FAILED',1,'2019-10-08 20:37:06',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(965,'2019-10-08 18:38:29','USER_LOGIN_FAILED',1,'2019-10-08 20:38:29',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(966,'2019-10-08 18:38:32','USER_LOGIN',1,'2019-10-08 20:38:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(967,'2019-10-08 19:01:07','USER_MODIFY',1,'2019-10-08 21:01:07',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,NULL,NULL,NULL),(968,'2019-11-28 15:09:03','USER_LOGOUT',1,'2019-11-28 19:09:03',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(969,'2019-11-28 15:09:18','USER_LOGIN_FAILED',1,'2019-11-28 19:09:18',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(970,'2019-11-28 15:09:22','USER_LOGIN',1,'2019-11-28 19:09:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(971,'2019-11-28 16:25:52','USER_LOGIN_FAILED',1,'2019-11-28 20:25:52',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(972,'2019-11-28 16:25:56','USER_LOGIN',1,'2019-11-28 20:25:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(973,'2019-11-29 08:43:22','USER_LOGIN_FAILED',1,'2019-11-29 12:43:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(974,'2019-11-29 08:43:24','USER_LOGIN',1,'2019-11-29 12:43:24',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(975,'2019-12-19 11:12:30','USER_LOGIN_FAILED',1,'2019-12-19 15:12:30',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(976,'2019-12-19 11:12:33','USER_LOGIN',1,'2019-12-19 15:12:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(977,'2019-12-20 09:38:10','USER_LOGIN_FAILED',1,'2019-12-20 13:38:10',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(978,'2019-12-20 09:38:13','USER_LOGIN',1,'2019-12-20 13:38:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(979,'2019-12-20 15:59:50','USER_LOGIN',1,'2019-12-20 19:59:50',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(980,'2019-12-21 13:05:49','USER_LOGIN_FAILED',1,'2019-12-21 17:05:49',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(981,'2019-12-21 13:05:52','USER_LOGIN',1,'2019-12-21 17:05:52',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x552','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(982,'2019-12-21 15:26:25','USER_LOGIN_FAILED',1,'2019-12-21 19:26:25',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(983,'2019-12-21 15:26:28','USER_LOGIN',1,'2019-12-21 19:26:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(984,'2019-12-21 15:27:00','USER_LOGOUT',1,'2019-12-21 19:27:00',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(985,'2019-12-21 15:27:05','USER_LOGIN',1,'2019-12-21 19:27:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(986,'2019-12-21 15:27:44','USER_LOGOUT',1,'2019-12-21 19:27:44',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(987,'2019-12-21 15:28:04','USER_LOGIN',1,'2019-12-21 19:28:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(988,'2019-12-22 11:59:41','USER_LOGIN',1,'2019-12-22 15:59:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(989,'2019-12-22 15:06:01','USER_LOGIN_FAILED',1,'2019-12-22 19:06:01',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(990,'2019-12-22 15:06:06','USER_LOGIN_FAILED',1,'2019-12-22 19:06:06',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(991,'2019-12-22 15:06:15','USER_LOGIN',1,'2019-12-22 19:06:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(992,'2019-12-22 18:43:21','USER_LOGIN',1,'2019-12-22 22:43:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x980','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(993,'2019-12-22 20:16:19','USER_LOGIN',1,'2019-12-23 00:16:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x584','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(994,'2019-12-23 10:05:11','USER_LOGIN_FAILED',1,'2019-12-23 14:05:11',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(995,'2019-12-23 10:05:14','USER_LOGIN',1,'2019-12-23 14:05:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(996,'2019-12-23 13:24:50','USER_LOGIN_FAILED',1,'2019-12-23 17:24:50',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(997,'2019-12-23 13:24:54','USER_LOGIN',1,'2019-12-23 17:24:54',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(998,'2019-12-25 21:37:28','USER_LOGIN_FAILED',1,'2019-12-26 01:37:28',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(999,'2019-12-25 21:37:30','USER_LOGIN',1,'2019-12-26 01:37:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1000,'2020-01-01 10:23:41','USER_LOGIN_FAILED',1,'2020-01-01 14:23:41',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1001,'2020-01-01 10:23:43','USER_LOGIN',1,'2020-01-01 14:23:43',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1002,'2020-01-01 19:52:00','USER_LOGIN_FAILED',1,'2020-01-01 23:52:00',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1003,'2020-01-01 19:52:07','USER_LOGIN',1,'2020-01-01 23:52:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1004,'2020-01-02 13:46:18','USER_LOGIN',1,'2020-01-02 17:46:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1005,'2020-01-02 14:49:05','USER_LOGIN',1,'2020-01-02 18:49:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x710','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1006,'2020-01-02 16:44:11','USER_LOGIN_FAILED',1,'2020-01-02 20:44:11',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1007,'2020-01-02 16:44:14','USER_LOGIN',1,'2020-01-02 20:44:14',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1008,'2020-01-02 18:54:45','USER_LOGIN_FAILED',1,'2020-01-02 22:54:45',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1009,'2020-01-02 18:54:48','USER_LOGIN',1,'2020-01-02 22:54:48',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1010,'2020-01-03 09:22:02','USER_LOGIN_FAILED',1,'2020-01-03 13:22:02',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1011,'2020-01-03 09:22:06','USER_LOGIN',1,'2020-01-03 13:22:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1012,'2020-01-03 11:56:30','USER_LOGIN',1,'2020-01-03 15:56:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1013,'2020-01-04 13:44:25','USER_LOGIN_FAILED',1,'2020-01-04 17:44:25',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1014,'2020-01-04 13:44:28','USER_LOGIN',1,'2020-01-04 17:44:28',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1015,'2020-01-05 19:36:34','USER_LOGIN_FAILED',1,'2020-01-05 23:36:34',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1016,'2020-01-05 19:36:39','USER_LOGIN',1,'2020-01-05 23:36:39',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1017,'2020-01-06 01:12:23','USER_LOGIN_FAILED',1,'2020-01-06 05:12:23',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1018,'2020-01-06 01:12:25','USER_LOGIN',1,'2020-01-06 05:12:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1019,'2020-01-06 10:33:33','USER_LOGIN',1,'2020-01-06 14:33:33',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1020,'2020-01-06 13:59:58','USER_LOGIN',1,'2020-01-06 17:59:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1021,'2020-01-06 16:08:41','USER_LOGIN',1,'2020-01-06 20:08:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1022,'2020-01-07 13:19:13','USER_LOGIN',1,'2020-01-07 17:19:13',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1023,'2020-01-07 15:06:53','USER_LOGIN_FAILED',1,'2020-01-07 19:06:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1024,'2020-01-07 15:06:59','USER_LOGIN',1,'2020-01-07 19:06:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1025,'2020-01-07 16:21:53','USER_LOGIN_FAILED',1,'2020-01-07 20:21:53',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1026,'2020-01-07 16:21:56','USER_LOGIN',1,'2020-01-07 20:21:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1027,'2020-01-07 17:46:46','USER_LOGIN',1,'2020-01-07 21:46:46',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1028,'2020-01-08 01:31:40','USER_LOGIN',1,'2020-01-08 05:31:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1029,'2020-01-08 15:32:34','USER_LOGIN_FAILED',1,'2020-01-08 19:32:34',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1030,'2020-01-08 15:32:38','USER_LOGIN',1,'2020-01-08 19:32:38',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1031,'2020-01-09 15:59:02','USER_LOGIN',1,'2020-01-09 19:59:02',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1032,'2020-01-09 21:33:47','USER_LOGIN',1,'2020-01-10 01:33:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1033,'2020-01-10 00:42:07','USER_LOGIN',1,'2020-01-10 04:42:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1034,'2020-01-10 22:18:15','USER_LOGIN',1,'2020-01-11 02:18:15',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1035,'2020-01-11 13:11:59','USER_LOGIN',1,'2020-01-11 17:11:59',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1036,'2020-01-12 20:13:37','USER_LOGIN',1,'2020-01-13 00:13:37',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1037,'2020-01-12 20:58:27','USER_LOGIN',1,'2020-01-13 00:58:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1038,'2020-01-13 03:35:56','USER_LOGIN',1,'2020-01-13 07:35:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1039,'2020-01-13 10:37:51','USER_LOGIN_FAILED',1,'2020-01-13 14:37:51',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1040,'2020-01-13 10:37:55','USER_LOGIN',1,'2020-01-13 14:37:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1041,'2020-01-13 14:34:55','USER_LOGIN_FAILED',1,'2020-01-13 18:34:55',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1042,'2020-01-13 14:34:58','USER_LOGIN',1,'2020-01-13 18:34:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1043,'2020-01-15 10:28:04','USER_LOGIN_FAILED',1,'2020-01-15 14:28:04',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1044,'2020-01-15 10:28:07','USER_LOGIN',1,'2020-01-15 14:28:07',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1045,'2020-01-15 11:49:56','USER_LOGIN_FAILED',1,'2020-01-15 15:49:56',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1046,'2020-01-15 11:49:58','USER_LOGIN',1,'2020-01-15 15:49:58',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1047,'2020-01-15 13:35:01','USER_LOGIN_FAILED',1,'2020-01-15 17:35:01',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1048,'2020-01-15 13:35:04','USER_LOGIN',1,'2020-01-15 17:35:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1049,'2020-01-15 14:41:15','USER_LOGIN_FAILED',1,'2020-01-15 18:41:15',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1050,'2020-01-15 14:41:18','USER_LOGIN',1,'2020-01-15 18:41:18',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1051,'2020-01-15 18:14:40','USER_LOGIN',1,'2020-01-15 22:14:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1052,'2020-01-15 20:03:35','USER_LOGIN',1,'2020-01-16 00:03:35',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1053,'2020-01-15 20:41:56','USER_LOGIN',1,'2020-01-16 00:41:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1054,'2020-01-16 01:01:22','USER_LOGIN',1,'2020-01-16 02:01:22',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1055,'2020-01-16 15:43:23','USER_LOGIN',1,'2020-01-16 16:43:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1056,'2020-01-16 15:44:42','USER_ENABLEDISABLE',1,'2020-01-16 16:44:42',12,'User aboston activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1057,'2020-01-16 17:01:27','USER_LOGIN',1,'2020-01-16 18:01:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1058,'2020-01-17 09:34:03','USER_LOGIN',1,'2020-01-17 10:34:03',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1059,'2020-01-18 15:17:00','USER_LOGIN',1,'2020-01-18 16:17:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x899','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1060,'2020-01-18 18:32:21','USER_LOGIN',1,'2020-01-18 19:32:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x672','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1061,'2020-01-19 13:20:27','USER_LOGIN_FAILED',1,'2020-01-19 14:20:27',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1062,'2020-01-19 13:20:30','USER_LOGIN',1,'2020-01-19 14:20:30',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1063,'2020-01-19 17:05:23','USER_LOGIN',1,'2020-01-19 18:05:23',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1064,'2020-01-19 19:29:37','USER_LOGIN',1,'2020-01-19 20:29:37',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1065,'2020-01-20 00:19:16','USER_LOGIN_FAILED',1,'2020-01-20 01:19:16',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1066,'2020-01-20 00:19:19','USER_LOGIN',1,'2020-01-20 01:19:19',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1067,'2020-01-20 10:20:00','USER_LOGIN',1,'2020-01-20 11:20:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1068,'2020-01-20 13:29:21','USER_LOGIN',1,'2020-01-20 14:29:21',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1069,'2020-01-20 16:20:00','USER_LOGIN',1,'2020-01-20 17:20:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1070,'2020-01-20 22:52:22','USER_LOGIN_FAILED',1,'2020-01-20 23:52:22',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1071,'2020-01-20 22:52:25','USER_LOGIN',1,'2020-01-20 23:52:25',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1072,'2020-01-20 23:43:37','USER_LOGIN_FAILED',1,'2020-01-21 00:43:37',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1073,'2020-01-20 23:43:41','USER_LOGIN',1,'2020-01-21 00:43:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1905x643','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1074,'2020-01-21 09:21:05','USER_LOGIN_FAILED',1,'2020-01-21 10:21:05',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1075,'2020-01-21 09:21:09','USER_LOGIN',1,'2020-01-21 10:21:09',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x870','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1076,'2020-01-21 09:33:53','USER_LOGOUT',1,'2020-01-21 10:33:53',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1077,'2020-01-21 09:35:27','USER_LOGIN',1,'2020-01-21 10:35:27',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1078,'2020-01-21 09:35:52','USER_LOGOUT',1,'2020-01-21 10:35:52',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1079,'2020-01-21 09:38:41','USER_LOGIN',1,'2020-01-21 10:38:41',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x919','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',NULL,'8ac86e29343929e21171a305760f9a3b',NULL,NULL),(1080,'2021-04-15 10:38:52','USER_NEW_PASSWORD',1,'2021-04-15 07:38:52',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1081,'2021-04-15 10:38:52','USER_MODIFY',1,'2021-04-15 07:38:52',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1082,'2021-04-15 10:40:22','USER_NEW_PASSWORD',1,'2021-04-15 07:40:22',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1083,'2021-04-15 10:40:22','USER_MODIFY',1,'2021-04-15 07:40:22',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1084,'2021-04-15 10:41:51','USER_NEW_PASSWORD',1,'2021-04-15 07:41:51',12,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1085,'2021-04-15 10:41:51','USER_MODIFY',1,'2021-04-15 07:41:51',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1086,'2021-04-15 10:42:13','USER_NEW_PASSWORD',1,'2021-04-15 07:42:13',12,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1087,'2021-04-15 10:42:13','USER_MODIFY',1,'2021-04-15 07:42:13',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1088,'2021-04-15 10:54:43','USER_LOGOUT',1,'2021-04-15 07:54:43',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1089,'2021-04-15 10:55:32','USER_LOGIN_FAILED',1,'2021-04-15 07:55:32',NULL,'Identifiant ou mot de passe incorrect - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1090,'2021-04-15 10:55:36','USER_LOGIN',1,'2021-04-15 07:55:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1091,'2021-04-15 10:55:57','USER_LOGOUT',1,'2021-04-15 07:55:57',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1092,'2021-04-15 10:56:17','USER_LOGIN',1,'2021-04-15 07:56:17',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1093,'2021-04-15 10:56:37','USER_LOGOUT',1,'2021-04-15 07:56:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL),(1094,'2021-04-15 10:59:04','USER_LOGIN',1,'2021-04-15 07:59:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Paris;Screen=1920x948','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',NULL,'ad25e182a7c96613025098ed58d8c6cb',NULL,NULL); /*!40000 ALTER TABLE `llx_events` ENABLE KEYS */; UNLOCK TABLES; @@ -7172,7 +6885,7 @@ CREATE TABLE `llx_expensereport` ( LOCK TABLES `llx_expensereport` WRITE; /*!40000 ALTER TABLE `llx_expensereport` DISABLE KEYS */; -INSERT INTO `llx_expensereport` VALUES (1,'ADMIN-ER00002-150101',1,2,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2020-01-01','2020-01-03','2020-01-22 19:03:37','2020-01-22 19:06:50','2020-02-16 02:12:40',NULL,NULL,'2020-06-12 17:12:08',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'ER1912-0001',1,NULL,NULL,141.67000000,28.33000000,0.00000000,0.00000000,170.00000000,'2020-02-01','2020-02-28','2020-01-22 19:04:44','2021-12-20 20:34:13','2021-12-20 20:34:19',NULL,'2021-12-21 00:34:26','2020-06-12 17:12:08',12,12,12,12,12,NULL,12,4,NULL,0,'Work on projet X','','','aaaa',NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2020-02-02','2020-02-02','2020-02-02 03:57:03','2020-02-02 00:00:00',NULL,NULL,NULL,'2020-06-12 17:12:08',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL); +INSERT INTO `llx_expensereport` VALUES (1,'ADMIN-ER00002-150101',1,2,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2021-01-01','2021-01-03','2021-01-22 19:03:37','2021-01-22 19:06:50','2021-02-16 02:12:40',NULL,NULL,'2021-04-15 10:22:31',12,NULL,12,12,12,NULL,NULL,5,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(2,'ER1912-0001',1,NULL,NULL,141.67000000,28.33000000,0.00000000,0.00000000,170.00000000,'2021-02-01','2021-02-28','2021-01-22 19:04:44','2021-12-20 20:34:13','2021-12-20 20:34:19',NULL,'2021-12-21 00:34:26','2021-04-15 10:22:31',12,12,12,12,12,NULL,12,4,NULL,0,'Work on projet X','','','aaaa',NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(3,'(PROV3)',1,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,'2021-02-02','2021-02-02','2021-02-02 03:57:03','2021-02-02 00:00:00',NULL,NULL,NULL,'2021-04-15 10:22:31',19,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_expensereport` ENABLE KEYS */; UNLOCK TABLES; @@ -7449,7 +7162,7 @@ CREATE TABLE `llx_facture` ( `fk_soc` int(11) NOT NULL, `datec` datetime DEFAULT NULL, `datef` date DEFAULT NULL, - `date_valid` date DEFAULT NULL, + `date_valid` datetime DEFAULT NULL, `date_closing` datetime DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `paye` smallint(6) NOT NULL DEFAULT 0, @@ -7459,11 +7172,11 @@ CREATE TABLE `llx_facture` ( `remise` double DEFAULT 0, `close_code` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL, `close_note` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, `revenuestamp` double(24,8) DEFAULT 0.00000000, - `total` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_statut` smallint(6) NOT NULL DEFAULT 0, `fk_user_author` int(11) DEFAULT NULL, @@ -7526,7 +7239,7 @@ CREATE TABLE `llx_facture` ( LOCK TABLES `llx_facture` WRITE; /*!40000 ALTER TABLE `llx_facture` DISABLE KEYS */; -INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2020-07-10',NULL,NULL,'2020-12-10 12:24:22',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2020-07-18',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,NULL,1,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2020-08-01',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,6,'2020-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2020-08-06',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,4,'2020-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2020-08-08',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2020-08-08',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2020-12-08','2020-12-08',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2020-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2020-12-08','2020-12-08',NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2020-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2020-12-09','2020-02-12',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2019-12-11','2020-03-24',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2019-12-11','2020-03-03',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2019-12-11','2019-12-12',NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2019-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2020-01-19','2020-01-19',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2020-01-19','2019-08-29','2020-01-02 20:49:34','2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,'other','test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2020-01-19','2020-10-04',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2020-01-19','2020-01-19',NULL,'2020-06-12 17:12:09',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2020-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2020-07-18','2019-03-06',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2020-07-10','2020-03-20',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2020-03-22','2019-03-02',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,3,'2020-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2020-03-03','2019-03-03',NULL,'2020-06-12 17:12:09',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2020-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2020-02-12',NULL,NULL,'2020-06-12 17:12:08',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2020-08-31',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2020-09-26','2020-09-26',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2020-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2020-11-28',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2020-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2020-01-16',NULL,NULL,'2020-01-16 01:03:17',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2020-01-16','2020-01-16',NULL,'2020-01-16 01:22:24',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2020-01-16',NULL,NULL,'2020-01-16 01:21:28',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2020-01-16',NULL,NULL,'2020-01-16 01:32:04',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2020-01-16','2020-01-16','2020-01-16 02:36:48','2020-01-16 01:36:48',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2020-01-16',NULL,NULL,'2020-01-16 01:37:55',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2020-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2020-01-19',NULL,NULL,'2020-01-19 13:21:21',0,0.00000000,NULL,NULL,0,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2020-01-19','2020-01-19',NULL,'2020-01-19 13:51:48',0,0.00000000,NULL,NULL,0,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2020-01-19','2020-01-19',NULL,'2020-01-19 14:13:07',0,0.00000000,NULL,NULL,0,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2020-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2020-07-18','2022-01-21','2020-01-21 10:23:17','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2020-07-18','2021-01-21','2020-01-21 10:23:28','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2020-07-18','2020-01-21','2020-01-21 10:23:49','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2012-07-10 18:20:13','2020-07-10',NULL,NULL,'2020-12-10 12:24:22',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2013-07-18 20:33:35','2020-07-18',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,NULL,1,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2013-08-01 03:34:11','2020-08-01',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,6,'2020-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2013-08-06 20:33:53','2020-08-06',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,4,'2020-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2013-08-08 02:41:44','2020-08-08',NULL,NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2013-08-08 02:55:14','2020-08-08',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 17:45:20','2020-12-08','2020-12-08 00:00:00',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2020-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2014-12-08 18:20:14','2020-12-08','2020-12-08 00:00:00',NULL,'2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,NULL,3,NULL,NULL,NULL,0,0,'2020-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2014-12-09 20:04:19','2020-12-09','2020-02-12 00:00:00',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2020-12-11','2021-03-24 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:34:23','2020-12-11','2021-03-03 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2014-12-11 09:35:51','2020-12-11','2020-12-12 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:22:48','2021-01-19','2021-01-19 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2021-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,'facture/FS1301-0001/FS1301-0001.pdf',NULL,NULL),(149,'FA1601-0024',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:30:05','2021-01-19','2020-08-29 00:00:00','2020-01-02 20:49:34','2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,'other','test',1.80000000,0.90000000,0.90000000,0.00000000,20.00000000,23.60000000,2,1,NULL,12,12,NULL,NULL,NULL,NULL,0,0,'2021-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,20.00000000,1.80000000,23.60000000,NULL,'facture/FA1601-0024/FA1601-0024.pdf',NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:10','2021-01-19','2020-10-04 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,12,NULL,NULL,NULL,NULL,NULL,0,1,'2021-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,5.00000000,0.63000000,5.63000000,NULL,'facture/FA6801-0010/FA6801-0010.pdf',NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2015-01-19 18:31:58','2021-01-19','2021-01-19 00:00:00',NULL,'2021-04-15 10:22:31',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,NULL,0,1,'2021-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2015-03-06 16:47:48','2020-07-18','2019-03-06 00:00:00',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2015-03-20 14:30:11','2020-07-10','2020-03-20 00:00:00',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,0,'2020-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2015-03-22 09:40:10','2021-03-22','2020-03-02 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,NULL,1,3,'2021-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2016-03-03 19:22:03','2021-03-03','2020-03-03 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,NULL,32,NULL,NULL,NULL,0,0,'2021-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(216,'(PROV216)',1,NULL,NULL,0,NULL,NULL,26,'2017-02-12 23:21:27','2021-02-12',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2021-02-12',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(217,'(PROV217)',1,NULL,NULL,0,NULL,NULL,1,'2017-08-31 13:26:17','2020-08-31',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.13000000,0.00000000,0.00000000,0.00000000,21.00000000,22.13000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2020-08-31',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,1,'EUR',1.00000000,21.00000000,1.13000000,22.13000000,NULL,'facture/(PROV217)/(PROV217).pdf',NULL,NULL),(218,'FA1909-0025',1,NULL,NULL,0,NULL,NULL,12,'2019-09-26 17:30:14','2020-09-26','2020-09-26 00:00:00',NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.08000000,0.00000000,0.00000000,0.00000000,42.50000000,43.58000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,0,0,'2020-09-26',NULL,NULL,'',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,0,'',NULL,NULL,0,'EUR',1.00000000,42.50000000,1.08000000,43.58000000,NULL,NULL,'takepos','1'),(219,'(PROV-POS1-0)',1,NULL,NULL,0,NULL,NULL,1,'2019-11-28 19:04:03','2020-11-28',NULL,NULL,'2020-12-10 12:24:22',0,0.00000000,NULL,NULL,0,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,5.00000000,6.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2020-11-28',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,5.00000000,1.00000000,6.00000000,NULL,NULL,'takepos','1'),(220,'(PROV220)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:03:17','2021-01-16',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(221,'AC2001-0001',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:05','2021-01-16','2021-01-16 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,123.00000000,123.00000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,123.00000000,0.00000000,123.00000000,NULL,'facture/AC2001-0001/AC2001-0001.pdf',NULL,NULL),(222,'(PROV222)',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:21:28','2021-01-16',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,100.00000000,100.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,100.00000000,0.00000000,100.00000000,NULL,NULL,NULL,NULL),(223,'(PROV223)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:32:04','2021-01-16',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,410.00000000,410.00000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,410.00000000,0.00000000,410.00000000,NULL,NULL,NULL,NULL),(224,'AC2001-0002',1,NULL,NULL,3,NULL,NULL,19,'2020-01-16 02:33:19','2021-01-16','2021-01-16 00:00:00','2020-01-16 02:36:48','2021-04-15 10:22:31',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,20.50000000,20.50000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2021-01-16',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,20.50000000,0.00000000,20.50000000,NULL,'facture/AC2001-0002/AC2001-0002.pdf',NULL,NULL),(225,'(PROV225)',1,NULL,NULL,0,NULL,NULL,19,'2020-01-16 02:37:48','2021-01-16',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,389.50000000,389.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,0,'2021-02-15',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,389.50000000,0.00000000,389.50000000,NULL,'facture/(PROV225)/(PROV225).pdf',NULL,NULL),(226,'(PROV226)',1,NULL,NULL,3,NULL,NULL,11,'2020-01-19 14:20:54','2021-01-19',NULL,NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,12.50000000,0.00000000,0.00000000,0.00000000,120.00000000,132.50000000,0,12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,120.00000000,12.50000000,132.50000000,NULL,'facture/(PROV226)/(PROV226).pdf',NULL,NULL),(227,'AC2001-0003',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:22:54','2021-01-19','2021-01-19 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,39.20000000,0.00000000,0.00000000,0.00000000,200.00000000,239.20000000,0,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,'facture/AC2001-0003/AC2001-0003.pdf',NULL,NULL),(228,'AC2001-0004',1,NULL,NULL,3,NULL,NULL,1,'2020-01-19 14:24:49','2021-01-19','2021-01-19 00:00:00',NULL,'2021-04-15 10:22:31',0,0.00000000,NULL,NULL,0,NULL,NULL,1.94000000,0.00000000,0.00000000,0.00000000,48.60000000,50.54000000,1,12,NULL,12,NULL,NULL,NULL,NULL,NULL,1,0,'2021-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,1,'EUR',1.00000000,48.60000000,1.94000000,50.54000000,NULL,'facture/AC2001-0004/AC2001-0004.pdf',NULL,NULL),(229,'FA1707-0026',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:17','2020-07-18','2022-01-21 00:00:00','2020-01-21 10:23:17','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1707-0026/FA1707-0026.pdf',NULL,NULL),(230,'FA1807-0027',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:28','2020-07-18','2021-01-21 00:00:00','2020-01-21 10:23:28','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1807-0027/FA1807-0027.pdf',NULL,NULL),(231,'FA1907-0028',1,NULL,NULL,0,NULL,NULL,12,'2020-01-21 10:23:49','2020-07-18','2020-01-21 00:00:00','2020-01-21 10:23:49','2020-12-10 12:24:22',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,50.00000000,50.00000000,2,12,NULL,12,12,NULL,NULL,NULL,NULL,1,0,'2020-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,0,0,NULL,0,0,'',NULL,NULL,0,'EUR',1.00000000,50.00000000,0.00000000,50.00000000,NULL,'facture/FA1907-0028/FA1907-0028.pdf',NULL,NULL); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -7590,6 +7303,7 @@ CREATE TABLE `llx_facture_fourn` ( `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_closing` int(11) DEFAULT NULL, `fk_facture_source` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, @@ -7613,6 +7327,7 @@ CREATE TABLE `llx_facture_fourn` ( `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_pointoftax` date DEFAULT NULL, `date_valid` date DEFAULT NULL, + `date_closing` datetime DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_facture_fourn_ref` (`ref`,`entity`), UNIQUE KEY `uk_facture_fourn_ref_supplier` (`ref_supplier`,`fk_soc`,`entity`), @@ -7634,7 +7349,7 @@ CREATE TABLE `llx_facture_fourn` ( LOCK TABLES `llx_facture_fourn` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2019-10-04 08:31:30','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2019-10-04'),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',NULL,0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL),(21,'SI1911-0005','NL-123',1,NULL,0,10,'2019-11-28 15:54:30','2019-11-28','2019-11-28 11:54:46','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,450.00000000,0.00000000,450.00000000,1,12,NULL,12,NULL,NULL,NULL,1,NULL,'2019-11-28','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,450.00000000,0.00000000,450.00000000,NULL,NULL,'2019-11-28'),(22,'SI2001-0006','INV20200101',1,NULL,0,17,'2020-01-01 17:48:01','2020-01-01','2020-01-16 17:05:43','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,357.00000000,43.75000000,400.75000000,1,12,NULL,12,NULL,NULL,1,1,2,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,357.00000000,43.75000000,400.75000000,NULL,NULL,'2020-01-16'),(27,'SA2001-0001','CN01',1,NULL,2,17,'2020-01-01 20:21:51','2020-01-01','2020-01-15 18:20:50','',1,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-350.00000000,-43.75000000,-393.75000000,2,12,12,12,22,NULL,NULL,1,NULL,NULL,'','ddd',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,350.00000000,43.75000000,393.75000000,NULL,NULL,'2020-01-01'),(28,'SI2001-0007','INV02',1,NULL,0,17,'2020-01-01 20:22:48','2020-01-01','2020-01-01 18:06:02','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,79.17000000,9.89000000,89.06000000,1,12,NULL,12,NULL,NULL,NULL,1,NULL,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,79.17000000,9.89000000,89.06000000,NULL,NULL,'2020-01-01'),(30,'SA2001-0002','555',1,NULL,2,1,'2020-01-01 20:51:32','2020-01-01','2020-01-01 17:15:57','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-26.00000000,-5.10000000,-31.10000000,1,12,NULL,12,17,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2020-01-01'); +INSERT INTO `llx_facture_fourn` VALUES (16,'SI1601-0001','FR70813',1,NULL,0,1,'2014-12-19 15:24:11','2003-04-11','2017-02-06 04:08:22','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(17,'SI1601-0002','FR81385',1,NULL,0,1,'2015-02-13 17:19:35','2003-06-04','2019-10-04 08:31:30','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,1,1,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2019-10-04',NULL),(18,'SI1601-0003','FR81385',1,NULL,0,2,'2015-02-13 17:20:25','2003-06-04','2017-02-06 04:08:35','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(19,'SI1601-0004','FR813852',1,NULL,0,2,'2015-03-16 17:59:02','2015-03-16','2017-02-06 04:08:38','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL),(20,'SI1702-0001','INV-AE56ER08',1,NULL,0,13,'2017-02-01 19:00:31','2017-02-01','2017-02-01 15:05:28','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,200.00000000,39.20000000,239.20000000,1,12,NULL,12,NULL,NULL,5,NULL,1,0,'2017-02-01','The customer has called us the 24th april. He agree us to not pay the remain of invoice due to default.
\r\nLet\'s see with our book keeper, if we must cancel invoice or ask the supplier a credit note...',NULL,'canelle',NULL,NULL,0,'',NULL,0,'EUR',1.00000000,200.00000000,39.20000000,239.20000000,NULL,NULL,NULL,NULL),(21,'SI1911-0005','NL-123',1,NULL,0,10,'2019-11-28 15:54:30','2019-11-28','2019-11-28 11:54:46','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,450.00000000,0.00000000,450.00000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2019-11-28','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,450.00000000,0.00000000,450.00000000,NULL,NULL,'2019-11-28',NULL),(22,'SI2001-0006','INV20200101',1,NULL,0,17,'2020-01-01 17:48:01','2020-01-01','2020-01-16 17:05:43','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,357.00000000,43.75000000,400.75000000,1,12,NULL,12,NULL,NULL,NULL,1,1,2,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,357.00000000,43.75000000,400.75000000,NULL,NULL,'2020-01-16',NULL),(27,'SA2001-0001','CN01',1,NULL,2,17,'2020-01-01 20:21:51','2020-01-01','2020-01-15 18:20:50','',1,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-350.00000000,-43.75000000,-393.75000000,2,12,12,12,NULL,22,NULL,NULL,1,NULL,NULL,'','ddd',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,350.00000000,43.75000000,393.75000000,NULL,NULL,'2020-01-01',NULL),(28,'SI2001-0007','INV02',1,NULL,0,17,'2020-01-01 20:22:48','2020-01-01','2020-01-01 18:06:02','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,79.17000000,9.89000000,89.06000000,1,12,NULL,12,NULL,NULL,NULL,NULL,1,NULL,'2020-01-01','','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,79.17000000,9.89000000,89.06000000,NULL,NULL,'2020-01-01',NULL),(30,'SA2001-0002','555',1,NULL,2,1,'2020-01-01 20:51:32','2020-01-01','2020-01-01 17:15:57','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,-26.00000000,-5.10000000,-31.10000000,1,12,NULL,12,NULL,17,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,0,'',NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'2020-01-01',NULL); /*!40000 ALTER TABLE `llx_facture_fourn` ENABLE KEYS */; UNLOCK TABLES; @@ -7772,10 +7487,10 @@ CREATE TABLE `llx_facture_rec` ( `remise` double DEFAULT 0, `remise_percent` double DEFAULT 0, `remise_absolue` double DEFAULT 0, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, - `total` double(24,8) DEFAULT 0.00000000, + `total_ht` double(24,8) DEFAULT 0.00000000, `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_user_author` int(11) DEFAULT NULL, `fk_projet` int(11) DEFAULT NULL, @@ -8046,60 +7761,6 @@ LOCK TABLES `llx_facturedet_rec_extrafields` WRITE; /*!40000 ALTER TABLE `llx_facturedet_rec_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_facturx_myobject` --- - -DROP TABLE IF EXISTS `llx_facturx_myobject`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_facturx_myobject` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty` int(11) DEFAULT NULL, - `status` int(11) DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_facturx_myobject` --- - -LOCK TABLES `llx_facturx_myobject` WRITE; -/*!40000 ALTER TABLE `llx_facturx_myobject` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_facturx_myobject` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_facturx_myobject_extrafields` --- - -DROP TABLE IF EXISTS `llx_facturx_myobject_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_facturx_myobject_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_facturx_myobject_extrafields` --- - -LOCK TABLES `llx_facturx_myobject_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_facturx_myobject_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_facturx_myobject_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_fichinter` -- @@ -8391,7 +8052,7 @@ CREATE TABLE `llx_holiday` ( LOCK TABLES `llx_holiday` WRITE; /*!40000 ALTER TABLE `llx_holiday` DISABLE KEYS */; -INSERT INTO `llx_holiday` VALUES (1,1,'2020-02-17 19:06:35','gdf','2020-02-10','2020-02-11',0,3,1,'2020-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2020-06-12 17:12:08',1,'1',NULL,NULL,NULL,NULL),(2,12,'2018-01-22 19:10:01','','2019-12-28','2020-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2020-01-15 13:36:45',1,'2',NULL,NULL,NULL,NULL),(3,13,'2020-01-22 19:10:29','','2020-01-11','2020-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2020-06-12 17:12:09',1,'3',NULL,NULL,NULL,NULL); +INSERT INTO `llx_holiday` VALUES (1,1,'2021-02-17 19:06:35','gdf','2021-02-10','2021-02-11',0,3,1,'2021-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,'2021-04-15 10:22:31',1,'1',NULL,NULL,NULL,NULL),(2,12,'2020-01-22 19:10:01','','2020-12-28','2021-01-03',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2021-04-15 10:22:31',1,'2',NULL,NULL,NULL,NULL),(3,13,'2021-01-22 19:10:29','','2021-01-11','2021-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5,'2021-04-15 10:22:31',1,'3',NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_holiday` ENABLE KEYS */; UNLOCK TABLES; @@ -8418,7 +8079,7 @@ CREATE TABLE `llx_holiday_config` ( LOCK TABLES `llx_holiday_config` WRITE; /*!40000 ALTER TABLE `llx_holiday_config` DISABLE KEYS */; -INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20201210132924'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); +INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20210415073001'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); /*!40000 ALTER TABLE `llx_holiday_config` ENABLE KEYS */; UNLOCK TABLES; @@ -8669,77 +8330,6 @@ LOCK TABLES `llx_inventorydet` WRITE; /*!40000 ALTER TABLE `llx_inventorydet` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_justificativedocuments_justificativedocument` --- - -DROP TABLE IF EXISTS `llx_justificativedocuments_justificativedocument`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_justificativedocuments_justificativedocument` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', - `fk_project` int(11) DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, - `date_creation` datetime NOT NULL, - `date_validation` datetime DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user` int(11) NOT NULL, - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `fk_user_valid` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` int(11) NOT NULL, - `fk_type` int(11) NOT NULL, - `amount` double(24,8) DEFAULT NULL, - `date_start` date DEFAULT NULL, - `date_end` date DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_justificativedocuments_justificativedocument_rowid` (`rowid`), - KEY `idx_justificativedocuments_justificativedocument_ref` (`ref`), - KEY `idx_justificativedocuments_justificativedocument_fk_project` (`fk_project`), - KEY `idx_justificativedocuments_justificativedocument_status` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_justificativedocuments_justificativedocument` --- - -LOCK TABLES `llx_justificativedocuments_justificativedocument` WRITE; -/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_justificativedocuments_justificativedocument_extrafields` --- - -DROP TABLE IF EXISTS `llx_justificativedocuments_justificativedocument_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_justificativedocuments_justificativedocument_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_fk_object` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_justificativedocuments_justificativedocument_extrafields` --- - -LOCK TABLES `llx_justificativedocuments_justificativedocument_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_justificativedocuments_justificativedocument_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_links` -- @@ -8950,7 +8540,7 @@ CREATE TABLE `llx_mailing_cibles` ( `firstname` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(160) COLLATE utf8_unicode_ci NOT NULL, `other` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `tag` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `tag` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `statut` smallint(6) NOT NULL DEFAULT 0, `source_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `source_id` int(11) DEFAULT NULL, @@ -8960,7 +8550,8 @@ CREATE TABLE `llx_mailing_cibles` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`), UNIQUE KEY `uk_mailing_cibles` (`fk_mailing`,`email`), - KEY `idx_mailing_cibles_email` (`email`) + KEY `idx_mailing_cibles_email` (`email`), + KEY `idx_mailing_cibles_tag` (`tag`) ) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -9024,6 +8615,7 @@ CREATE TABLE `llx_menu` ( `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `target` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `titre` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `prefix` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `langs` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `level` smallint(6) DEFAULT NULL, `leftmenu` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -9034,7 +8626,7 @@ CREATE TABLE `llx_menu` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_menu_uk_menu` (`menu_handler`,`fk_menu`,`position`,`url`,`entity`), KEY `idx_menu_menuhandler_type` (`menu_handler`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=167038 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=167087 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -9043,322 +8635,10 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(145127,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && $leftmenu==\'admintools\'',0,'2017-01-29 15:12:44'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard','',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck','admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools','admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources','admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange','products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&search_status=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&search_status=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&search_status=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&search_status=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&search_status=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&search_status=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&search_status=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&search_status=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&search_status=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&search_status=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting','bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy','accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation','accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation','accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation','accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched','accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping','accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance','accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings','main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices','main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod','admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup','accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals','accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version','accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts','accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory','accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts','accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts','accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts','accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts','accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts','accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization','main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees','hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee','hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List','hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&search_status=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses','trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New','trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove','trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics','trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166467,'all',1,'variants','left','products',-1,'product','products',100,'/variants/list.php','','VariantAttributes','products',NULL,'product','1','$conf->product->enabled',0,'2018-01-19 11:28:04'),(166541,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166542,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166543,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166544,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2019-06-05 09:15:29'),(166545,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166546,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2019-06-05 09:15:29'),(166923,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','resource',NULL,'resource','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(166924,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2020-01-20 11:46:00'),(166925,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2020-01-20 11:46:00'),(167003,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167004,'all',1,'agenda','left','agenda',167003,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167005,'all',1,'agenda','left','agenda',167004,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167006,'all',1,'agenda','left','agenda',167004,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167007,'all',1,'agenda','left','agenda',167006,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167008,'all',1,'agenda','left','agenda',167006,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167009,'all',1,'agenda','left','agenda',167006,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-12-10 12:24:50'),(167010,'all',1,'agenda','left','agenda',167006,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-12-10 12:24:50'),(167011,'all',1,'agenda','left','agenda',167004,NULL,NULL,110,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167012,'all',1,'agenda','left','agenda',167011,NULL,NULL,111,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167013,'all',1,'agenda','left','agenda',167011,NULL,NULL,112,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167014,'all',1,'agenda','left','agenda',167011,NULL,NULL,113,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-12-10 12:24:50'),(167015,'all',1,'agenda','left','agenda',167011,NULL,NULL,114,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2020-12-10 12:24:50'),(167016,'all',1,'agenda','left','agenda',167004,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2020-12-10 12:24:50'),(167017,'all',1,'agenda','left','agenda',167004,NULL,NULL,170,'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10','','Categories','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->categorie->enabled&&$conf->categorie->enabled',2,'2020-12-10 12:24:50'),(167018,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2020-12-10 12:24:50'),(167019,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2020-12-10 12:24:50'),(167020,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2020-12-10 12:24:50'),(167021,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2020-12-10 12:24:50'),(167022,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-12-10 12:24:50'),(167023,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2020-12-10 12:24:50'),(167024,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2020-12-10 12:24:50'),(167025,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-12-10 12:24:51'),(167026,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2020-12-10 12:24:51'),(167027,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2020-12-10 12:24:51'),(167028,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/index.php','takepos','PointOfSaleShort','cashdesk',NULL,NULL,'$user->rights->takepos->run','$conf->takepos->enabled',2,'2020-12-10 12:24:52'),(167029,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2020-12-10 12:24:52'),(167030,'all',1,'recruitment','left','hrm',-1,NULL,'hrm',1001,'/recruitment/recruitmentindex.php','','Recruitment','recruitment',NULL,'recruitmentjobposition','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2020-12-10 12:29:43'),(167031,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1002,'/recruitment/recruitmentjobposition_card.php?action=create','','NewPositionToBeFilled','recruitment',NULL,'recruitment_recruitmentjobposition_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2020-12-10 12:29:43'),(167032,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1003,'/recruitment/recruitmentjobposition_list.php','','ListOfPositionsToBeFilled','recruitment',NULL,'recruitment_recruitmentjobposition_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2020-12-10 12:29:43'),(167033,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1004,'/recruitment/recruitmentcandidature_card.php?action=create','','NewCandidature','recruitment',NULL,'recruitment_recruitmentcandidature_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2020-12-10 12:29:43'),(167034,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1005,'/recruitment/recruitmentcandidature_list.php','','ListOfCandidatures','recruitment',NULL,'recruitment_recruitmentcandidature_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2020-12-10 12:29:43'),(167035,'all',1,'margins','left','billing',-1,NULL,'billing',100,'/margin/index.php','','Margins','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2020-12-10 12:30:20'),(167037,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2020-12-10 12:31:17'); +INSERT INTO `llx_menu` VALUES (103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction',NULL,'commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings',NULL,'agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-03-13 15:29:19'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys',NULL,'opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey',NULL,'opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey',NULL,'opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List',NULL,'opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-03-13 20:33:42'),(161088,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home',NULL,'',-1,'','','1',2,'2017-08-30 15:14:30'),(161089,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties',NULL,'companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2017-08-30 15:14:30'),(161090,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services',NULL,'products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2017-08-30 15:14:30'),(161092,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial',NULL,'commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(161093,'auguria',1,'comptabilite|accounting|facture|don|tax|salaries|loan','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial',NULL,'compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled',2,'2017-08-30 15:14:30'),(161094,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects',NULL,'projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(161095,'auguria',1,'mailing|export|import|opensurvey|resource','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools',NULL,'other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read || $user->rights->resource->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled || $conf->resource->enabled',2,'2017-08-30 15:14:30'),(161101,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash',NULL,'banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2017-08-30 15:14:30'),(161102,'auguria',1,'hrm|holiday|deplacement|expensereport','top','hrm',0,NULL,NULL,80,'/hrm/index.php?mainmenu=hrm&leftmenu=','','HRM',NULL,'holiday',-1,'','$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(161177,'auguria',1,'','left','home',161088,NULL,NULL,0,'/index.php','','MyDashboard',NULL,'',0,'','','1',2,'2017-08-30 15:14:30'),(161187,'auguria',1,'','left','home',161088,NULL,NULL,1,'/admin/index.php?leftmenu=setup','','Setup',NULL,'admin',0,'setup','','$user->admin',2,'2017-08-30 15:14:30'),(161188,'auguria',1,'','left','home',161187,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161189,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161190,'auguria',1,'','left','home',161187,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161191,'auguria',1,'','left','home',161187,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161192,'auguria',1,'','left','home',161187,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus',NULL,'admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:47'),(161193,'auguria',1,'','left','home',161187,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161194,'auguria',1,'','left','home',161187,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161195,'auguria',1,'','left','home',161187,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security',NULL,'admin',1,'','','$leftmenu==\'setup\'',2,'2017-09-06 08:29:36'),(161196,'auguria',1,'','left','home',161187,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161197,'auguria',1,'','left','home',161187,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161198,'auguria',1,'','left','home',161187,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161199,'auguria',1,'','left','home',161187,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161200,'auguria',1,'','left','home',161187,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161201,'auguria',1,'','left','home',161187,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation',NULL,'admin',1,'','','$leftmenu==\"setup\"',2,'2017-08-30 15:14:30'),(161288,'auguria',1,'','left','home',161387,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161289,'auguria',1,'','left','home',161288,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules',NULL,'admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161290,'auguria',1,'','left','home',161288,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers',NULL,'admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161291,'auguria',1,'','left','home',161288,NULL,NULL,4,'/admin/system/filecheck.php?leftmenu=admintools','','FileCheck',NULL,'admin',2,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161292,'auguria',1,'','left','home',161387,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161293,'auguria',1,'','left','home',161387,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161294,'auguria',1,'','left','home',161387,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161295,'auguria',1,'','left','home',161387,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161297,'auguria',1,'','left','home',161387,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161387,'auguria',1,'','left','home',161088,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','AdminTools',NULL,'admin',0,'admintools','','$user->admin',2,'2017-08-30 15:14:30'),(161388,'auguria',1,'','left','home',161387,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161389,'auguria',1,'','left','home',161387,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161392,'auguria',1,'','left','home',161387,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161393,'auguria',1,'','left','home',161387,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator',NULL,'admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2017-08-30 15:14:30'),(161394,'auguria',1,'','left','home',161387,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161395,'auguria',1,'','left','home',161387,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161396,'auguria',1,'','left','home',161387,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161398,'auguria',1,'','left','home',161387,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','ExternalResources',NULL,'admin',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161407,'auguria',1,'','left','home',161387,NULL,NULL,15,'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools','','ProductVatMassChange',NULL,'products',1,'','','$leftmenu==\"admintools\"',2,'2017-08-30 15:14:30'),(161487,'auguria',1,'','left','home',161088,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups',NULL,'users',0,'users','','1',2,'2017-08-30 15:14:30'),(161488,'auguria',1,'','left','home',161487,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users',NULL,'users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161489,'auguria',1,'','left','home',161488,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser',NULL,'users',2,'','($user->rights->user->user->creer || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161490,'auguria',1,'','left','home',161487,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups',NULL,'users',1,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161491,'auguria',1,'','left','home',161490,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup',NULL,'users',2,'','(($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)','$leftmenu==\"users\"',2,'2017-08-30 15:14:30'),(161587,'auguria',1,'','left','companies',161089,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty',NULL,'companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161588,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/card.php?action=create','','MenuNewThirdParty',NULL,'companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161589,'auguria',1,'','left','companies',161587,NULL,NULL,0,'/societe/list.php?action=create','','List',NULL,'companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161590,'auguria',1,'','left','companies',161587,NULL,NULL,5,'/societe/list.php?type=f&leftmenu=suppliers','','ListSuppliersShort',NULL,'suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161591,'auguria',1,'','left','companies',161590,NULL,NULL,0,'/societe/card.php?leftmenu=supplier&action=create&type=f','','NewSupplier',NULL,'suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161593,'auguria',1,'','left','companies',161587,NULL,NULL,3,'/societe/list.php?type=p&leftmenu=prospects','','ListProspectsShort',NULL,'companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161594,'auguria',1,'','left','companies',161593,NULL,NULL,0,'/societe/card.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect',NULL,'companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161596,'auguria',1,'','left','companies',161587,NULL,NULL,4,'/societe/list.php?type=c&leftmenu=customers','','ListCustomersShort',NULL,'companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161597,'auguria',1,'','left','companies',161596,NULL,NULL,0,'/societe/card.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer',NULL,'companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161687,'auguria',1,'','left','companies',161089,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses',NULL,'companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161688,'auguria',1,'','left','companies',161687,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress',NULL,'companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161689,'auguria',1,'','left','companies',161687,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List',NULL,'companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161691,'auguria',1,'','left','companies',161689,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects',NULL,'companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161692,'auguria',1,'','left','companies',161689,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers',NULL,'companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161693,'auguria',1,'','left','companies',161689,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers',NULL,'companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2017-08-30 15:14:30'),(161694,'auguria',1,'','left','companies',161689,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others',NULL,'companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2017-08-30 15:14:30'),(161737,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161738,'auguria',1,'','left','companies',161737,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161747,'auguria',1,'','left','companies',161089,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161748,'auguria',1,'','left','companies',161747,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161757,'auguria',1,'','left','companies',161089,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(161758,'auguria',1,'','left','companies',161757,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(162187,'auguria',1,'','left','commercial',161092,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop',NULL,'propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162188,'auguria',1,'','left','commercial',162187,NULL,NULL,0,'/comm/propal/card.php?action=create&leftmenu=propals','','NewPropal',NULL,'propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162189,'auguria',1,'','left','commercial',162187,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162190,'auguria',1,'','left','commercial',162189,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&search_status=0','','PropalsDraft',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162191,'auguria',1,'','left','commercial',162189,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&search_status=1','','PropalsOpened',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162192,'auguria',1,'','left','commercial',162189,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&search_status=2','','PropalStatusSigned',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162193,'auguria',1,'','left','commercial',162189,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&search_status=3','','PropalStatusNotSigned',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162194,'auguria',1,'','left','commercial',162189,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&search_status=4','','PropalStatusBilled',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2017-08-30 15:14:30'),(162197,'auguria',1,'','left','commercial',162187,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics',NULL,'propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(162287,'auguria',1,'','left','commercial',161092,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders',NULL,'orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162288,'auguria',1,'','left','commercial',162287,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder',NULL,'orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162289,'auguria',1,'','left','commercial',162287,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162290,'auguria',1,'','left','commercial',162289,NULL,NULL,2,'/commande/list.php?leftmenu=orders&search_status=0','','StatusOrderDraftShort',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162291,'auguria',1,'','left','commercial',162289,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=1','','StatusOrderValidated',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162292,'auguria',1,'','left','commercial',162289,NULL,NULL,4,'/commande/list.php?leftmenu=orders&search_status=2','','StatusOrderOnProcessShort',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162293,'auguria',1,'','left','commercial',162289,NULL,NULL,5,'/commande/list.php?leftmenu=orders&search_status=3','','StatusOrderToBill',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162294,'auguria',1,'','left','commercial',162289,NULL,NULL,6,'/commande/list.php?leftmenu=orders&search_status=4','','StatusOrderProcessed',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162295,'auguria',1,'','left','commercial',162289,NULL,NULL,7,'/commande/list.php?leftmenu=orders&search_status=-1','','StatusOrderCanceledShort',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2017-08-30 15:14:30'),(162296,'auguria',1,'','left','commercial',162287,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics',NULL,'orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2017-08-30 15:14:30'),(162387,'auguria',1,'','left','commercial',161090,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments',NULL,'sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2017-08-30 15:14:30'),(162388,'auguria',1,'','left','commercial',162387,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending',NULL,'sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162389,'auguria',1,'','left','commercial',162387,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List',NULL,'sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162390,'auguria',1,'','left','commercial',162387,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics',NULL,'sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2017-08-30 15:14:30'),(162487,'auguria',1,'','left','commercial',161092,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts',NULL,'contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162488,'auguria',1,'','left','commercial',162487,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract',NULL,'contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162489,'auguria',1,'','left','commercial',162487,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List',NULL,'contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162490,'auguria',1,'','left','commercial',162487,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices',NULL,'contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2017-08-30 15:14:30'),(162491,'auguria',1,'','left','commercial',162490,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices',NULL,'contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162492,'auguria',1,'','left','commercial',162490,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices',NULL,'contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162493,'auguria',1,'','left','commercial',162490,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices',NULL,'contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162494,'auguria',1,'','left','commercial',162490,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices',NULL,'contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled && $leftmenu==\"contracts\"',2,'2017-08-30 15:14:30'),(162587,'auguria',1,'','left','commercial',161092,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions',NULL,'interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162588,'auguria',1,'','left','commercial',162587,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention',NULL,'interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162589,'auguria',1,'','left','commercial',162587,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List',NULL,'interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162590,'auguria',1,'','left','commercial',162587,NULL,NULL,2,'/fichinter/stats/index.php?leftmenu=ficheinter','','Statistics',NULL,'interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2017-08-30 15:14:30'),(162687,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers',NULL,'bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162688,'auguria',1,'','left','accountancy',162687,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill',NULL,'bills',1,'','$user->rights->fournisseur->facture->creer','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162689,'auguria',1,'','left','accountancy',162687,NULL,NULL,1,'/fourn/facture/list.php?leftmenu=suppliers_bills','','List',NULL,'bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162690,'auguria',1,'','left','accountancy',162687,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments',NULL,'bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162691,'auguria',1,'','left','accountancy',162687,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics',NULL,'bills',1,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162692,'auguria',1,'','left','accountancy',162690,NULL,NULL,1,'/fourn/facture/rapport.php?leftmenu=suppliers_bills','','Reporting',NULL,'bills',2,'','$user->rights->fournisseur->facture->lire','$conf->supplier_invoice->enabled',2,'2017-08-30 15:14:30'),(162787,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers',NULL,'bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162788,'auguria',1,'','left','accountancy',162787,NULL,NULL,3,'/compta/facture/card.php?action=create&leftmenu=customers_bills','','NewBill',NULL,'bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162789,'auguria',1,'','left','accountancy',162787,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates',NULL,'bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162791,'auguria',1,'','left','accountancy',162787,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments',NULL,'bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162792,'auguria',1,'','left','accountancy',162787,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List',NULL,'bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162797,'auguria',1,'','left','accountancy',162791,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings',NULL,'bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162798,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits',NULL,'bills',0,'checks','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162799,'auguria',1,'','left','accountancy',162798,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit',NULL,'compta',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162800,'auguria',1,'','left','accountancy',162798,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List',NULL,'bills',1,'','$user->rights->banque->lire','empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))',2,'2017-08-30 15:14:30'),(162801,'auguria',1,'','left','accountancy',162787,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics',NULL,'bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162807,'auguria',1,'','left','accountancy',162792,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft',NULL,'bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162808,'auguria',1,'','left','accountancy',162792,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid',NULL,'bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162809,'auguria',1,'','left','accountancy',162792,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid',NULL,'bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162810,'auguria',1,'','left','accountancy',162792,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled',NULL,'bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2017-08-30 15:14:30'),(162987,'auguria',1,'','left','accountancy',161093,NULL,NULL,3,'/commande/list.php?leftmenu=orders&search_status=3','','MenuOrdersToBill',NULL,'orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2017-08-30 15:14:30'),(163087,'auguria',1,'','left','accountancy',161093,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations',NULL,'donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2017-08-30 15:14:30'),(163088,'auguria',1,'','left','accountancy',163087,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation',NULL,'donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163089,'auguria',1,'','left','accountancy',163087,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List',NULL,'donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2017-08-30 15:14:30'),(163187,'auguria',1,'','left','accountancy',161102,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses',NULL,'trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163188,'auguria',1,'','left','accountancy',163187,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New',NULL,'trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163189,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List',NULL,'trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163190,'auguria',1,'','left','accountancy',163187,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics',NULL,'trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2017-08-30 15:14:30'),(163287,'auguria',1,'','left','accountancy',161093,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses',NULL,'compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163297,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries',NULL,'salaries',1,'tax_sal','$user->rights->salaries->payment->read','$conf->salaries->enabled',0,'2017-08-30 15:14:30'),(163298,'auguria',1,'','left','accountancy',163297,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment',NULL,'companies',2,'','$user->rights->salaries->payment->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163299,'auguria',1,'','left','accountancy',163297,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments',NULL,'companies',2,'','$user->rights->salaries->payment->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2017-08-30 15:14:30'),(163307,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans',NULL,'loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2017-08-30 15:14:30'),(163308,'auguria',1,'','left','accountancy',163307,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan',NULL,'loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2017-08-30 15:14:30'),(163310,'auguria',1,'','left','accountancy',163307,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator',NULL,'companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\" && ! empty($conf->global->LOAN_SHOW_CALCULATOR)',0,'2017-08-30 15:14:30'),(163337,'auguria',1,'','left','accountancy',163287,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions',NULL,'',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2017-08-30 15:14:30'),(163338,'auguria',1,'','left','accountancy',163337,NULL,NULL,2,'/compta/sociales/card.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution',NULL,'',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163339,'auguria',1,'','left','accountancy',163337,NULL,NULL,3,'/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments',NULL,'',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2017-08-30 15:14:30'),(163387,'auguria',1,'','left','accountancy',163287,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT',NULL,'companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2017-08-30 15:14:30'),(163388,'auguria',1,'','left','accountancy',163387,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','New',NULL,'companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163389,'auguria',1,'','left','accountancy',163387,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','List',NULL,'companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163390,'auguria',1,'','left','accountancy',163387,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers',NULL,'companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163391,'auguria',1,'','left','accountancy',163387,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter',NULL,'companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2017-08-30 15:14:30'),(163487,'auguria',1,'','left','accountancy',161093,NULL,NULL,7,'/accountancy/index.php?leftmenu=accountancy','','MenuAccountancy',NULL,'accountancy',0,'accounting','! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163488,'auguria',1,'','left','accountancy',163487,NULL,NULL,2,'/accountancy/customer/index.php?leftmenu=dispatch_customer','','CustomersVentilation',NULL,'accountancy',1,'dispatch_customer','$user->rights->accounting->bind->write','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163489,'auguria',1,'','left','accountancy',163488,NULL,NULL,3,'/accountancy/customer/list.php','','ToDispatch',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163490,'auguria',1,'','left','accountancy',163488,NULL,NULL,4,'/accountancy/customer/lines.php','','Dispatched',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $leftmenu==\"dispatch_customer\"',0,'2017-08-30 15:14:30'),(163497,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/supplier/index.php?leftmenu=dispatch_supplier','','SuppliersVentilation',NULL,'accountancy',1,'ventil_supplier','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2017-08-30 15:14:30'),(163498,'auguria',1,'','left','accountancy',163497,NULL,NULL,6,'/accountancy/supplier/list.php','','ToDispatch',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163499,'auguria',1,'','left','accountancy',163497,NULL,NULL,7,'/accountancy/supplier/lines.php','','Dispatched',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"dispatch_supplier\"',0,'2017-08-30 15:14:30'),(163507,'auguria',1,'','left','accountancy',163487,NULL,NULL,5,'/accountancy/expensereport/index.php?leftmenu=dispatch_expensereport','','ExpenseReportsVentilation',NULL,'accountancy',1,'ventil_expensereport','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(163508,'auguria',1,'','left','accountancy',163507,NULL,NULL,6,'/accountancy/expensereport/list.php','','ToDispatch',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163509,'auguria',1,'','left','accountancy',163507,NULL,NULL,7,'/accountancy/expensereport/lines.php','','Dispatched',NULL,'accountancy',2,'','$user->rights->accounting->bind->write','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"dispatch_expensereport\"',0,'2017-08-30 15:14:30'),(163517,'auguria',1,'','left','accountancy',163487,NULL,NULL,15,'/accountancy/bookkeeping/list.php','','Bookkeeping',NULL,'accountancy',1,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163522,'auguria',1,'','left','accountancy',163487,NULL,NULL,16,'/accountancy/bookkeeping/balance.php','','AccountBalance',NULL,'accountancy',1,'balance','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163527,'auguria',1,'','left','accountancy',163487,NULL,NULL,17,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','Reportings',NULL,'main',1,'report','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163528,'auguria',1,'','left','accountancy',163527,NULL,NULL,19,'/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportInOut',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163529,'auguria',1,'','left','accountancy',163528,NULL,NULL,18,'/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy','','ByAccounts',NULL,'main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163530,'auguria',1,'','left','accountancy',163528,NULL,NULL,20,'/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies',NULL,'main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163531,'auguria',1,'','left','accountancy',163527,NULL,NULL,21,'/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy','','ReportTurnover',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163532,'auguria',1,'','left','accountancy',163531,NULL,NULL,22,'/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy','','ByCompanies',NULL,'main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163533,'auguria',1,'','left','accountancy',163531,NULL,NULL,23,'/compta/stats/cabyuser.php?mainmenu=accountancy&leftmenu=accountancy','','ByUsers',NULL,'main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163534,'auguria',1,'','left','accountancy',163531,NULL,NULL,24,'/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy','','ByProductsAndServices',NULL,'main',3,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled && $leftmenu==\"accountancy\"',0,'2017-08-30 15:14:30'),(163537,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin','','FiscalPeriod',NULL,'admin',1,'accountancy_admin_period','','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\" && $conf->global->MAIN_FEATURES_LEVEL > 0',2,'2017-08-30 15:14:30'),(163538,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'/accountancy/index.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Setup',NULL,'accountancy',1,'accountancy_admin','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163541,'auguria',1,'','left','accountancy',163538,NULL,NULL,10,'/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingJournals',NULL,'accountancy',2,'accountancy_admin_journal','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163542,'auguria',1,'','left','accountancy',163538,NULL,NULL,20,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Pcg_version',NULL,'accountancy',2,'accountancy_admin_chartmodel','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163543,'auguria',1,'','left','accountancy',163538,NULL,NULL,30,'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin','','Chartofaccounts',NULL,'accountancy',2,'accountancy_admin_chart','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163544,'auguria',1,'','left','accountancy',163538,NULL,NULL,40,'/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin','','AccountingCategory',NULL,'accountancy',2,'accountancy_admin_chart_group','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163545,'auguria',1,'','left','accountancy',163538,NULL,NULL,50,'/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuDefaultAccounts',NULL,'accountancy',2,'accountancy_admin_default','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163546,'auguria',1,'','left','accountancy',163538,NULL,NULL,60,'/admin/dict.php?id=10&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuVatAccounts',NULL,'accountancy',2,'accountancy_admin_vat','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163547,'auguria',1,'','left','accountancy',163538,NULL,NULL,70,'/admin/dict.php?id=7&from=accountancy&search_country_id=__MYCOUNTRYID__&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuTaxAccounts',NULL,'accountancy',2,'accountancy_admin_tax','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163548,'auguria',1,'','left','accountancy',163538,NULL,NULL,80,'/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin','','MenuExpenseReportAccounts',NULL,'accountancy',2,'accountancy_admin_expensereport','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163549,'auguria',1,'','left','accountancy',163538,NULL,NULL,90,'/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin','','MenuProductsAccounts',NULL,'accountancy',2,'accountancy_admin_product','$user->rights->accounting->chartofaccount','$conf->accounting->enabled && $leftmenu==\"accountancy_admin\"',0,'2017-08-30 15:14:30'),(163587,'auguria',1,'','left','accountancy',161101,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders',NULL,'withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2017-08-30 15:14:30'),(163589,'auguria',1,'','left','accountancy',163587,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder',NULL,'withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163590,'auguria',1,'','left','accountancy',163587,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts',NULL,'withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163591,'auguria',1,'','left','accountancy',163587,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines',NULL,'withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163593,'auguria',1,'','left','accountancy',163587,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects',NULL,'withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163594,'auguria',1,'','left','accountancy',163587,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics',NULL,'withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2017-08-30 15:14:30'),(163687,'auguria',1,'','left','accountancy',161101,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash',NULL,'banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2017-08-30 15:14:30'),(163688,'auguria',1,'','left','accountancy',163687,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount',NULL,'banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163690,'auguria',1,'','left','accountancy',163687,NULL,NULL,2,'/compta/bank/bankentries.php?leftmenu=bank','','ListTransactions',NULL,'banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163691,'auguria',1,'','left','accountancy',163687,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory',NULL,'banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163693,'auguria',1,'','left','accountancy',163687,NULL,NULL,5,'/compta/bank/transfer.php?leftmenu=bank','','BankTransfers',NULL,'banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2017-08-30 15:14:30'),(163737,'auguria',1,'','left','accountancy',161101,NULL,NULL,4,'/categories/index.php?leftmenu=bank&type=5','','Categories',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163738,'auguria',1,'','left','accountancy',163737,NULL,NULL,0,'/categories/card.php?leftmenu=bank&action=create&type=5','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(163787,'auguria',1,'','left','accountancy',161093,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings',NULL,'main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled',0,'2017-08-30 15:14:30'),(163792,'auguria',1,'','left','accountancy',163487,NULL,NULL,1,'','','Journalization',NULL,'main',1,'','$user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163793,'auguria',1,'','left','accountancy',163792,NULL,NULL,4,'/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1','','SellsJournal',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163794,'auguria',1,'','left','accountancy',163792,NULL,NULL,1,'/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3','','BankJournal',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163795,'auguria',1,'','left','accountancy',163792,NULL,NULL,2,'/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6','','ExpenseReportJournal',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163796,'auguria',1,'','left','accountancy',163792,NULL,NULL,3,'/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2','','PurchasesJournal',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->accounting->enabled',0,'2017-08-30 15:14:30'),(163798,'auguria',1,'','left','accountancy',163787,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut',NULL,'main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163799,'auguria',1,'','left','accountancy',163788,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163800,'auguria',1,'','left','accountancy',163787,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover',NULL,'main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163801,'auguria',1,'','left','accountancy',163790,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163802,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163803,'auguria',1,'','left','accountancy',163790,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices',NULL,'main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2017-08-30 15:14:30'),(163887,'auguria',1,'','left','products',161090,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products',NULL,'products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163888,'auguria',1,'','left','products',163887,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct',NULL,'products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163889,'auguria',1,'','left','products',163887,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List',NULL,'products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163890,'auguria',1,'','left','products',163887,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks',NULL,'products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2017-08-30 15:14:30'),(163891,'auguria',1,'','left','products',163887,NULL,NULL,7,'/product/stats/card.php?id=all&leftmenu=stats&type=0','','Statistics',NULL,'main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(163892,'auguria',1,'','left','products',163887,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial',NULL,'products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163893,'auguria',1,'','left','products',163887,NULL,NULL,6,'/product/stock/productlot_list.php','','LotSerial',NULL,'products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2017-08-30 15:14:30'),(163987,'auguria',1,'','left','products',161090,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services',NULL,'products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163988,'auguria',1,'','left','products',163987,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService',NULL,'products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163989,'auguria',1,'','left','products',163987,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List',NULL,'products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2017-08-30 15:14:30'),(163990,'auguria',1,'','left','products',163987,NULL,NULL,5,'/product/stats/card.php?id=all&leftmenu=stats&type=1','','Statistics',NULL,'main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2017-08-30 15:14:30'),(164187,'auguria',1,'','left','products',161090,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock',NULL,'stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164188,'auguria',1,'','left','products',164187,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse',NULL,'stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164189,'auguria',1,'','left','products',164187,NULL,NULL,1,'/product/stock/list.php','','List',NULL,'stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164191,'auguria',1,'','left','products',164187,NULL,NULL,3,'/product/stock/mouvement.php','','Movements',NULL,'stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164192,'auguria',1,'','left','products',164187,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments',NULL,'stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(164193,'auguria',1,'','left','products',164187,NULL,NULL,5,'/product/stock/massstockmove.php','','MassStockTransferShort',NULL,'stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2017-08-30 15:14:30'),(164287,'auguria',1,'','left','products',161090,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164288,'auguria',1,'','left','products',164287,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164487,'auguria',1,'','left','project',161094,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent',NULL,'projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164687,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects',NULL,'projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164688,'auguria',1,'','left','project',164687,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject',NULL,'projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164689,'auguria',1,'','left','project',164687,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List',NULL,'projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164690,'auguria',1,'','left','project',164687,NULL,NULL,3,'/projet/stats/index.php?leftmenu=projects','','Statistics',NULL,'projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2017-08-30 15:14:30'),(164787,'auguria',1,'','left','project',161094,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities',NULL,'projects',0,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164788,'auguria',1,'','left','project',164787,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask',NULL,'projects',1,'','$user->rights->projet->creer','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164789,'auguria',1,'','left','project',164787,NULL,NULL,2,'/projet/tasks/list.php?leftmenu=projects','','List',NULL,'projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164791,'auguria',1,'','left','project',164787,NULL,NULL,4,'/projet/tasks/stats/index.php?leftmenu=projects','','Statistics',NULL,'projects',1,'','$user->rights->projet->lire','$conf->projet->enabled && $conf->global->PROJECT_USE_TASKS',2,'2017-08-30 15:14:30'),(164891,'auguria',1,'','left','project',161094,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=6','','Categories',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164892,'auguria',1,'','left','project',164891,NULL,NULL,0,'/categories/card.php?action=create&type=6','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2017-08-30 15:14:30'),(164987,'auguria',1,'','left','tools',161095,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings',NULL,'mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164988,'auguria',1,'','left','tools',164987,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing',NULL,'mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(164989,'auguria',1,'','left','tools',164987,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List',NULL,'mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2017-08-30 15:14:30'),(165187,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport',NULL,'exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165188,'auguria',1,'','left','tools',165187,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport',NULL,'exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2017-08-30 15:14:30'),(165217,'auguria',1,'','left','tools',161095,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport',NULL,'exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165218,'auguria',1,'','left','tools',165217,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport',NULL,'exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2017-08-30 15:14:30'),(165287,'auguria',1,'','left','members',161100,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members',NULL,'members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165288,'auguria',1,'','left','members',165287,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember',NULL,'members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165289,'auguria',1,'','left','members',165287,NULL,NULL,1,'/adherents/list.php','','List',NULL,'members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165290,'auguria',1,'','left','members',165289,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate',NULL,'members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165291,'auguria',1,'','left','members',165289,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated',NULL,'members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165292,'auguria',1,'','left','members',165289,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate',NULL,'members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165293,'auguria',1,'','left','members',165289,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate',NULL,'members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165294,'auguria',1,'','left','members',165289,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated',NULL,'members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165295,'auguria',1,'','left','members',165287,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats',NULL,'members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165387,'auguria',1,'','left','members',161100,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions',NULL,'compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165388,'auguria',1,'','left','members',165387,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription',NULL,'compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165389,'auguria',1,'','left','members',165387,NULL,NULL,1,'/adherents/subscription/list.php?leftmenu=members','','List',NULL,'compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165390,'auguria',1,'','left','members',165387,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats',NULL,'members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165589,'auguria',1,'','left','members',165287,NULL,NULL,9,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd',NULL,'members',1,'','$user->rights->adherent->export','! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165590,'auguria',1,'','left','members',165287,NULL,NULL,10,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards',NULL,'members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165687,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/user/index.php?leftmenu=hrm&mode=employee','','Employees',NULL,'hrm',0,'hrm','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165688,'auguria',1,'','left','hrm',165687,NULL,NULL,1,'/user/card.php?action=create&employee=1','','NewEmployee',NULL,'hrm',1,'','$user->rights->hrm->employee->write','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165689,'auguria',1,'','left','hrm',165687,NULL,NULL,2,'/user/index.php?$leftmenu=hrm&mode=employee&contextpage=employeelist','','List',NULL,'hrm',1,'','$user->rights->hrm->employee->read','$conf->hrm->enabled',0,'2017-08-30 15:14:30'),(165787,'auguria',1,'','left','members',161100,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes',NULL,'members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165788,'auguria',1,'','left','members',165787,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New',NULL,'members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(165789,'auguria',1,'','left','members',165787,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List',NULL,'members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2017-08-30 15:14:30'),(166087,'auguria',1,'','left','hrm',161102,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu',NULL,'holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166088,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP',NULL,'holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166089,'auguria',1,'','left','hrm',166087,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List',NULL,'holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166090,'auguria',1,'','left','hrm',166089,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove',NULL,'trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166091,'auguria',1,'','left','hrm',166087,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP',NULL,'holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166092,'auguria',1,'','left','hrm',166087,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP',NULL,'holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2017-08-30 15:14:30'),(166187,'auguria',1,'','left','commercial',161092,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders',NULL,'orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166188,'auguria',1,'','left','commercial',166187,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder',NULL,'orders',1,'','$user->rights->fournisseur->commande->creer','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166189,'auguria',1,'','left','commercial',166187,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&search_status=0','','List',NULL,'orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166195,'auguria',1,'','left','commercial',166187,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics',NULL,'orders',1,'','$user->rights->fournisseur->commande->lire','$conf->supplier_order->enabled',2,'2017-08-30 15:14:30'),(166287,'auguria',1,'','left','members',161100,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort',NULL,'categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166288,'auguria',1,'','left','members',166287,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory',NULL,'categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2017-08-30 15:14:30'),(166387,'auguria',1,'','left','hrm',161102,NULL,NULL,5,'/expensereport/index.php?leftmenu=expensereport','','TripsAndExpenses',NULL,'trips',0,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166388,'auguria',1,'','left','hrm',166387,NULL,NULL,1,'/expensereport/card.php?action=create&leftmenu=expensereport','','New',NULL,'trips',1,'','$user->rights->expensereport->creer','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166389,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/list.php?leftmenu=expensereport','','List',NULL,'trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166390,'auguria',1,'','left','hrm',166389,NULL,NULL,2,'/expensereport/list.php?search_status=2&leftmenu=expensereport','','ListToApprove',NULL,'trips',2,'','$user->rights->expensereport->approve','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(166391,'auguria',1,'','left','hrm',166387,NULL,NULL,2,'/expensereport/stats/index.php?leftmenu=expensereport','','Statistics',NULL,'trips',1,'','$user->rights->expensereport->lire','$conf->expensereport->enabled',0,'2017-08-30 15:14:30'),(167038,'all',1,'agenda','top','agenda',0,NULL,NULL,86,'/comm/action/index.php','','TMenuAgenda','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167039,'all',1,'agenda','left','agenda',167038,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167040,'all',1,'agenda','left','agenda',167039,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167041,'all',1,'agenda','left','agenda',167039,NULL,NULL,140,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda','','Calendar','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167042,'all',1,'agenda','left','agenda',167041,NULL,NULL,141,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167043,'all',1,'agenda','left','agenda',167041,NULL,NULL,142,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167044,'all',1,'agenda','left','agenda',167041,NULL,NULL,143,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2021-04-15 10:22:58'),(167045,'all',1,'agenda','left','agenda',167041,NULL,NULL,144,'/comm/action/index.php?action=default&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2021-04-15 10:22:58'),(167046,'all',1,'agenda','left','agenda',167039,NULL,NULL,110,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda','','List','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167047,'all',1,'agenda','left','agenda',167046,NULL,NULL,111,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167048,'all',1,'agenda','left','agenda',167046,NULL,NULL,112,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167049,'all',1,'agenda','left','agenda',167046,NULL,NULL,113,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1','','MenuToDoActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2021-04-15 10:22:58'),(167050,'all',1,'agenda','left','agenda',167046,NULL,NULL,114,'/comm/action/list.php?action=show_list&mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1','','MenuDoneActions','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2021-04-15 10:22:58'),(167051,'all',1,'agenda','left','agenda',167039,NULL,NULL,160,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2021-04-15 10:22:58'),(167052,'all',1,'agenda','left','agenda',167039,NULL,NULL,170,'/categories/index.php?mainmenu=agenda&leftmenu=agenda&type=10','','Categories','','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->categorie->enabled&&$conf->categorie->enabled',2,'2021-04-15 10:22:58'),(167053,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2021-04-15 10:22:58'),(167054,'all',1,'barcode','left','home',-1,'admintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools','','MassBarcodeInit','','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)',0,'2021-04-15 10:22:58'),(167055,'all',1,'cron','left','home',-1,'admintools','home',200,'/cron/list.php?leftmenu=admintools','','CronList','','cron',NULL,NULL,'$user->rights->cron->read','$conf->cron->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',2,'2021-04-15 10:22:58'),(167056,'all',1,'blockedlog','left','tools',-1,NULL,'tools',200,'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser','','BrowseBlockedLog','','blockedlog',NULL,'blockedlogbrowser','$user->rights->blockedlog->read','$conf->blockedlog->enabled',2,'2021-04-15 10:22:58'),(167057,'all',1,'ecm','top','ecm',0,NULL,NULL,82,'/ecm/index.php','','MenuECM','','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2021-04-15 10:22:59'),(167058,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2021-04-15 10:22:59'),(167059,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2021-04-15 10:22:59'),(167060,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',2,'2021-04-15 10:22:59'),(167061,'all',1,'margins','left','billing',-1,NULL,'billing',100,'/margin/index.php','','Margins','','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2021-04-15 10:23:00'),(167062,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','','opensurvey',NULL,'opensurvey','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2021-04-15 10:23:00'),(167063,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2021-04-15 10:23:00'),(167064,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','','opensurvey',NULL,'opensurvey_list','$user->rights->opensurvey->read','$conf->opensurvey->enabled',0,'2021-04-15 10:23:00'),(167065,'all',1,'printing','left','home',-1,'admintools','home',300,'/printing/index.php?mainmenu=home&leftmenu=admintools','','MenuDirectPrinting','','printing',NULL,NULL,'$user->rights->printing->read','$conf->printing->enabled && preg_match(\'/^(admintools|all)/\', $leftmenu)',0,'2021-04-15 10:23:00'),(167066,'all',1,'recruitment','left','hrm',-1,NULL,'hrm',1001,'/recruitment/recruitmentindex.php','','Recruitment','','recruitment',NULL,'recruitmentjobposition','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2021-04-15 10:23:00'),(167067,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1002,'/recruitment/recruitmentjobposition_card.php?action=create','','NewPositionToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2021-04-15 10:23:00'),(167068,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1003,'/recruitment/recruitmentjobposition_list.php','','ListOfPositionsToBeFilled','','recruitment',NULL,'recruitment_recruitmentjobposition_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2021-04-15 10:23:00'),(167069,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1004,'/recruitment/recruitmentcandidature_card.php?action=create','','NewCandidature','','recruitment',NULL,'recruitment_recruitmentcandidature_new','$user->rights->recruitment->recruitmentjobposition->write','$conf->recruitment->enabled',2,'2021-04-15 10:23:00'),(167070,'all',1,'recruitment','left','hrm',-1,'recruitmentjobposition','hrm',1005,'/recruitment/recruitmentcandidature_list.php','','ListOfCandidatures','','recruitment',NULL,'recruitment_recruitmentcandidature_list','$user->rights->recruitment->recruitmentjobposition->read','$conf->recruitment->enabled',2,'2021-04-15 10:23:00'),(167071,'all',1,'resource','left','tools',-1,NULL,'tools',100,'/resource/list.php','','MenuResourceIndex','','resource',NULL,'resource','$user->rights->resource->read','1',0,'2021-04-15 10:23:00'),(167072,'all',1,'resource','left','tools',-1,'resource','tools',101,'/resource/card.php?action=create','','MenuResourceAdd','','resource',NULL,'resource_add','$user->rights->resource->write','1',0,'2021-04-15 10:23:00'),(167073,'all',1,'resource','left','tools',-1,'resource','tools',102,'/resource/list.php','','List','','resource',NULL,'resource_list','$user->rights->resource->read','1',0,'2021-04-15 10:23:00'),(167074,'all',1,'stripe','left','bank',-1,NULL,'bank',100,'','','StripeAccount','','stripe',NULL,'stripe','$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2021-04-15 10:23:01'),(167075,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/charge.php','','StripeChargeList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2021-04-15 10:23:01'),(167076,'all',1,'stripe','left','bank',-1,'stripe','bank',102,'/stripe/transaction.php','','StripeTransactionList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2021-04-15 10:23:01'),(167077,'all',1,'stripe','left','bank',-1,'stripe','bank',103,'/stripe/payout.php','','StripePayoutList','','stripe',NULL,NULL,'$user->rights->banque->lire','$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1',0,'2021-04-15 10:23:01'),(167078,'all',1,'ticket','top','ticket',0,NULL,NULL,88,'/ticket/index.php','','Ticket','','ticket',NULL,'1','$user->rights->ticket->read','$conf->ticket->enabled',2,'2021-04-15 10:23:01'),(167079,'all',1,'ticket','left','ticket',-1,NULL,'ticket',101,'/ticket/index.php','','Ticket','','ticket',NULL,'ticket','$user->rights->ticket->read','$conf->ticket->enabled',2,'2021-04-15 10:23:01'),(167080,'all',1,'ticket','left','ticket',-1,'ticket','ticket',102,'/ticket/card.php?action=create','','NewTicket','','ticket',NULL,NULL,'$user->rights->ticket->write','$conf->ticket->enabled',2,'2021-04-15 10:23:01'),(167081,'all',1,'ticket','left','ticket',-1,'ticket','ticket',103,'/ticket/list.php?search_fk_status=non_closed','','List','','ticket',NULL,'ticketlist','$user->rights->ticket->read','$conf->ticket->enabled',2,'2021-04-15 10:23:01'),(167082,'all',1,'ticket','left','ticket',-1,'ticket','ticket',105,'/ticket/list.php?mode=mine&search_fk_status=non_closed','','MenuTicketMyAssign','','ticket',NULL,'ticketmy','$user->rights->ticket->read','$conf->ticket->enabled',0,'2021-04-15 10:23:01'),(167083,'all',1,'ticket','left','ticket',-1,'ticket','ticket',107,'/ticket/stats/index.php','','Statistics','','ticket',NULL,NULL,'$user->rights->ticket->read','$conf->ticket->enabled',0,'2021-04-15 10:23:01'),(167084,'all',1,'takepos','top','takepos',0,NULL,NULL,1001,'/takepos/index.php','takepos','PointOfSaleShort','','cashdesk',NULL,NULL,'$user->rights->takepos->run','$conf->takepos->enabled',2,'2021-04-15 10:23:01'),(167085,'all',1,'website','top','website',0,NULL,NULL,100,'/website/index.php','','WebSites','','website',NULL,NULL,'$user->rights->website->read','$conf->website->enabled',2,'2021-04-15 10:23:02'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_monmodule_abcdef_extrafields` --- - -DROP TABLE IF EXISTS `llx_monmodule_abcdef_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_abcdef_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_abcdef_extrafields` --- - -LOCK TABLES `llx_monmodule_abcdef_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_abcdef_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_abcdef_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_actioncommreminder` --- - -DROP TABLE IF EXISTS `llx_monmodule_actioncommreminder`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_actioncommreminder` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `status` int(11) DEFAULT NULL, - `entity` int(11) DEFAULT 1, - `dateremind` datetime NOT NULL, - `typeremind` varchar(32) COLLATE utf8_unicode_ci NOT NULL, - `fk_user` int(11) NOT NULL, - `offsetvalue` int(11) NOT NULL, - `offsetunit` varchar(1) COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_monmodule_actioncommreminder_rowid` (`rowid`), - KEY `idx_monmodule_actioncommreminder_status` (`status`), - KEY `idx_monmodule_actioncommreminder_dateremind` (`dateremind`), - KEY `idx_monmodule_actioncommreminder_fk_user` (`fk_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_actioncommreminder` --- - -LOCK TABLES `llx_monmodule_actioncommreminder` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_actioncommreminder` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_actioncommreminder` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_actioncommreminder_extrafields` --- - -DROP TABLE IF EXISTS `llx_monmodule_actioncommreminder_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_actioncommreminder_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_actioncommreminder_extrafields` --- - -LOCK TABLES `llx_monmodule_actioncommreminder_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_actioncommreminder_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_actioncommreminder_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_eleves` --- - -DROP TABLE IF EXISTS `llx_monmodule_eleves`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_eleves` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL, - `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `amount` double(24,8) DEFAULT NULL, - `fk_soc` int(11) DEFAULT NULL, - `note_public` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_monmodule_eleves_rowid` (`rowid`), - KEY `idx_monmodule_eleves_ref` (`ref`), - KEY `idx_monmodule_eleves_entity` (`entity`), - KEY `idx_monmodule_eleves_fk_soc` (`fk_soc`), - KEY `idx_monmodule_eleves_status` (`status`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_eleves` --- - -LOCK TABLES `llx_monmodule_eleves` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_eleves` DISABLE KEYS */; -INSERT INTO `llx_monmodule_eleves` VALUES (1,'aaa',1,'jjl',NULL,32,NULL,NULL,'2017-11-21 15:02:43','2017-11-21 15:02:43',12,NULL,NULL,1); -/*!40000 ALTER TABLE `llx_monmodule_eleves` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_eleves_extrafields` --- - -DROP TABLE IF EXISTS `llx_monmodule_eleves_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_eleves_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_eleves_extrafields` --- - -LOCK TABLES `llx_monmodule_eleves_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_eleves_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_eleves_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_myobject_extrafields` --- - -DROP TABLE IF EXISTS `llx_monmodule_myobject_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_myobject_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_fk_object` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_myobject_extrafields` --- - -LOCK TABLES `llx_monmodule_myobject_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_myobject_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_myobject_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_test` --- - -DROP TABLE IF EXISTS `llx_monmodule_test`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_test` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `amount` double(24,8) DEFAULT NULL, - `qty` double DEFAULT NULL, - `fk_soc` int(11) DEFAULT NULL, - `fk_project` int(11) DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` int(11) NOT NULL, - `aa` double DEFAULT NULL, - `dd` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_monmodule_test_rowid` (`rowid`), - KEY `idx_monmodule_test_ref` (`ref`), - KEY `idx_monmodule_test_fk_soc` (`fk_soc`), - KEY `idx_monmodule_test_fk_project` (`fk_project`), - KEY `idx_monmodule_test_status` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_test` --- - -LOCK TABLES `llx_monmodule_test` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_test` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_test` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_test2` --- - -DROP TABLE IF EXISTS `llx_monmodule_test2`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_test2` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `amount` double(24,8) DEFAULT NULL, - `qty` double DEFAULT NULL, - `fk_soc` int(11) DEFAULT NULL, - `fk_project` int(11) DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - `status` int(11) NOT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_monmodule_test2_rowid` (`rowid`), - KEY `idx_monmodule_test2_ref` (`ref`), - KEY `idx_monmodule_test2_fk_soc` (`fk_soc`), - KEY `idx_monmodule_test2_fk_project` (`fk_project`), - KEY `idx_monmodule_test2_status` (`status`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_test2` --- - -LOCK TABLES `llx_monmodule_test2` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_test2` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_test2` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monmodule_test2_extrafields` --- - -DROP TABLE IF EXISTS `llx_monmodule_test2_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monmodule_test2_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_fk_object` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monmodule_test2_extrafields` --- - -LOCK TABLES `llx_monmodule_test2_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monmodule_test2_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monmodule_test2_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_monobj_extrafields` --- - -DROP TABLE IF EXISTS `llx_monobj_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monobj_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monobj_extrafields` --- - -LOCK TABLES `llx_monobj_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_monobj_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_monobj_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_mrp_mo` -- @@ -9477,6 +8757,8 @@ DROP TABLE IF EXISTS `llx_mrp_production`; CREATE TABLE `llx_mrp_production` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, `fk_mo` int(11) NOT NULL, + `origin_id` int(11) DEFAULT NULL, + `origin_type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) NOT NULL DEFAULT 0, `fk_product` int(11) NOT NULL, `fk_warehouse` int(11) DEFAULT NULL, @@ -9508,7 +8790,7 @@ CREATE TABLE `llx_mrp_production` ( LOCK TABLES `llx_mrp_production` WRITE; /*!40000 ALTER TABLE `llx_mrp_production` DISABLE KEYS */; -INSERT INTO `llx_mrp_production` VALUES (13,8,1,3,NULL,1,NULL,'toproduce',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,NULL,NULL),(14,8,0,25,NULL,4,NULL,'toconsume',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,0,0),(15,8,0,3,NULL,1,NULL,'toconsume',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,0,1),(49,5,1,4,NULL,3,NULL,'toproduce',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,NULL,NULL),(50,5,0,25,NULL,12,NULL,'toconsume',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,0,0),(51,5,0,3,NULL,3,NULL,'toconsume',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,0,1),(52,14,1,4,NULL,10,NULL,'toproduce',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,NULL,NULL),(53,14,0,25,NULL,40,NULL,'toconsume',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,0,0),(54,14,0,3,NULL,10,NULL,'toconsume',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,0,1),(68,18,1,4,NULL,2,NULL,'toproduce',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,NULL,NULL),(69,18,1,25,NULL,8,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,0,0),(70,18,3,3,NULL,2,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,0,1),(71,18,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,1,0),(93,5,0,25,1,12,'','consumed',50,23,'2020-01-06 05:44:30','2020-01-06 01:44:30',12,NULL,NULL,NULL,NULL),(95,5,0,4,2,3,'','produced',49,24,'2020-01-06 05:44:30','2020-01-06 01:44:30',12,NULL,NULL,NULL,NULL),(96,5,0,25,1,2,'','consumed',50,25,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(97,5,0,3,NULL,2,'','consumed',51,NULL,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(98,5,0,4,2,3,'','produced',49,26,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(99,14,0,25,1,1,'','consumed',53,27,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(100,14,0,3,NULL,10,'','consumed',54,NULL,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(101,14,0,4,1,1,'','produced',52,28,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(102,14,0,25,1,1,'','consumed',53,29,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(103,14,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(104,14,0,4,1,1,'','produced',52,30,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(105,14,0,25,1,1,'','consumed',53,31,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(106,14,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(107,14,0,4,1,1,'','produced',52,32,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(108,14,0,25,1,1,'','consumed',53,33,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(109,14,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(110,14,0,4,1,1,'','produced',52,34,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(111,5,0,25,1,2,'','consumed',50,35,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(112,5,0,3,NULL,1,'','consumed',51,NULL,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(113,5,0,4,2,1,'','produced',49,36,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(132,5,0,25,1,1,'','consumed',50,46,'2020-01-07 21:53:58','2020-01-07 17:53:58',12,NULL,NULL,NULL,NULL),(135,5,0,25,1,1,'','consumed',50,48,'2020-01-07 21:54:12','2020-01-07 17:54:12',12,NULL,NULL,NULL,NULL),(140,5,0,25,1,1,'','consumed',50,51,'2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,NULL,NULL,NULL),(142,5,0,4,1,1,'','produced',49,52,'2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,NULL,NULL,NULL),(143,14,0,25,1,1,'','consumed',53,53,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(144,14,0,3,NULL,1,'','consumed',54,NULL,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(145,14,0,4,1,2,'','produced',52,54,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(146,14,0,25,1,2,'','consumed',53,55,'2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL),(148,14,0,4,1,4,'','produced',52,56,'2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL),(149,5,0,25,1,1,'','consumed',50,57,'2020-01-07 23:50:40','2020-01-07 19:50:40',12,NULL,NULL,NULL,NULL),(152,5,0,25,1,1,'','consumed',50,59,'2020-01-07 23:51:27','2020-01-07 19:51:27',12,NULL,NULL,NULL,NULL),(161,5,0,25,1,1,'','consumed',50,63,'2020-01-08 00:29:24','2020-01-07 20:29:24',12,NULL,NULL,NULL,NULL),(167,5,0,25,1,1,'','consumed',50,66,'2020-01-08 01:09:15','2020-01-07 21:09:15',12,NULL,NULL,NULL,NULL),(170,5,0,25,1,1,'','consumed',50,68,'2020-01-08 01:15:02','2020-01-07 21:15:02',12,NULL,NULL,NULL,NULL),(171,5,0,25,1,1.1,'','consumed',50,69,'2020-01-08 01:17:16','2020-01-07 21:17:16',12,NULL,NULL,NULL,NULL),(172,22,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,NULL,NULL),(173,22,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,0),(174,22,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,1),(175,22,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,1,0),(176,22,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,0),(177,23,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,NULL,NULL),(178,23,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,0),(179,23,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,1),(180,23,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,1,0),(181,23,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,0),(182,24,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,NULL,NULL),(183,24,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,0),(184,24,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,1),(185,24,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,1,0),(186,24,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,0),(192,26,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,NULL,NULL),(193,26,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,0),(194,26,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,1),(195,26,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,1,0),(196,26,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,0),(197,27,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,NULL,NULL),(198,27,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,0),(199,27,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,1),(200,27,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,1,0),(201,27,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,0),(202,28,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,NULL,NULL),(203,28,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,0),(204,28,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,1),(205,28,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,1,0),(206,28,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,0),(207,28,0,25,1,1,'','consumed',203,70,'2020-01-08 20:21:22','2020-01-08 16:21:22',12,NULL,NULL,NULL,NULL),(210,28,0,1,1,1.1,'000000','consumed',206,73,'2020-01-08 20:41:18','2020-01-08 16:41:18',12,NULL,NULL,NULL,NULL),(211,28,0,4,1,1.2,'aaa','produced',202,74,'2020-01-08 20:41:19','2020-01-08 16:41:19',12,NULL,NULL,NULL,NULL),(212,24,0,25,1,1,'','consumed',183,75,'2020-01-13 15:13:19','2020-01-13 11:13:19',12,NULL,NULL,NULL,NULL),(213,24,0,1,1,0.1,'000000','consumed',186,76,'2020-01-13 15:14:15','2020-01-13 11:14:15',12,NULL,NULL,NULL,NULL); +INSERT INTO `llx_mrp_production` VALUES (13,8,NULL,NULL,1,3,NULL,1,NULL,'toproduce',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,NULL,NULL),(14,8,NULL,NULL,0,25,NULL,4,NULL,'toconsume',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,0,0),(15,8,NULL,NULL,0,3,NULL,1,NULL,'toconsume',NULL,NULL,'2019-12-20 17:01:21','2019-12-20 13:01:21',12,NULL,NULL,0,1),(49,5,NULL,NULL,1,4,NULL,3,NULL,'toproduce',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,NULL,NULL),(50,5,NULL,NULL,0,25,NULL,12,NULL,'toconsume',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,0,0),(51,5,NULL,NULL,0,3,NULL,3,NULL,'toconsume',NULL,NULL,'2019-12-20 20:32:00','2019-12-20 16:32:00',12,NULL,NULL,0,1),(52,14,NULL,NULL,1,4,NULL,10,NULL,'toproduce',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,NULL,NULL),(53,14,NULL,NULL,0,25,NULL,40,NULL,'toconsume',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,0,0),(54,14,NULL,NULL,0,3,NULL,10,NULL,'toconsume',NULL,NULL,'2020-01-02 23:46:54','2020-01-02 19:46:54',12,NULL,NULL,0,1),(68,18,NULL,NULL,1,4,NULL,2,NULL,'toproduce',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,NULL,NULL),(69,18,NULL,NULL,1,25,NULL,8,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,0,0),(70,18,NULL,NULL,3,3,NULL,2,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,0,1),(71,18,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-03 14:10:33','2020-01-03 10:10:33',12,NULL,NULL,1,0),(93,5,NULL,NULL,0,25,1,12,'','consumed',50,23,'2020-01-06 05:44:30','2020-01-06 01:44:30',12,NULL,NULL,NULL,NULL),(95,5,NULL,NULL,0,4,2,3,'','produced',49,24,'2020-01-06 05:44:30','2020-01-06 01:44:30',12,NULL,NULL,NULL,NULL),(96,5,NULL,NULL,0,25,1,2,'','consumed',50,25,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(97,5,NULL,NULL,0,3,NULL,2,'','consumed',51,NULL,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(98,5,NULL,NULL,0,4,2,3,'','produced',49,26,'2020-01-06 05:54:05','2020-01-06 01:54:05',12,NULL,NULL,NULL,NULL),(99,14,NULL,NULL,0,25,1,1,'','consumed',53,27,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(100,14,NULL,NULL,0,3,NULL,10,'','consumed',54,NULL,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(101,14,NULL,NULL,0,4,1,1,'','produced',52,28,'2020-01-06 06:44:49','2020-01-06 02:44:49',12,NULL,NULL,NULL,NULL),(102,14,NULL,NULL,0,25,1,1,'','consumed',53,29,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(103,14,NULL,NULL,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(104,14,NULL,NULL,0,4,1,1,'','produced',52,30,'2020-01-06 06:46:03','2020-01-06 02:46:03',12,NULL,NULL,NULL,NULL),(105,14,NULL,NULL,0,25,1,1,'','consumed',53,31,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(106,14,NULL,NULL,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(107,14,NULL,NULL,0,4,1,1,'','produced',52,32,'2020-01-06 06:48:22','2020-01-06 02:48:22',12,NULL,NULL,NULL,NULL),(108,14,NULL,NULL,0,25,1,1,'','consumed',53,33,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(109,14,NULL,NULL,0,3,NULL,1,'','consumed',54,NULL,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(110,14,NULL,NULL,0,4,1,1,'','produced',52,34,'2020-01-06 06:50:05','2020-01-06 02:50:05',12,NULL,NULL,NULL,NULL),(111,5,NULL,NULL,0,25,1,2,'','consumed',50,35,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(112,5,NULL,NULL,0,3,NULL,1,'','consumed',51,NULL,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(113,5,NULL,NULL,0,4,2,1,'','produced',49,36,'2020-01-07 20:25:02','2020-01-07 16:25:02',12,NULL,NULL,NULL,NULL),(132,5,NULL,NULL,0,25,1,1,'','consumed',50,46,'2020-01-07 21:53:58','2020-01-07 17:53:58',12,NULL,NULL,NULL,NULL),(135,5,NULL,NULL,0,25,1,1,'','consumed',50,48,'2020-01-07 21:54:12','2020-01-07 17:54:12',12,NULL,NULL,NULL,NULL),(140,5,NULL,NULL,0,25,1,1,'','consumed',50,51,'2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,NULL,NULL,NULL),(142,5,NULL,NULL,0,4,1,1,'','produced',49,52,'2020-01-07 22:00:55','2020-01-07 18:00:55',12,NULL,NULL,NULL,NULL),(143,14,NULL,NULL,0,25,1,1,'','consumed',53,53,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(144,14,NULL,NULL,0,3,NULL,1,'','consumed',54,NULL,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(145,14,NULL,NULL,0,4,1,2,'','produced',52,54,'2020-01-07 22:39:52','2020-01-07 18:39:52',12,NULL,NULL,NULL,NULL),(146,14,NULL,NULL,0,25,1,2,'','consumed',53,55,'2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL),(148,14,NULL,NULL,0,4,1,4,'','produced',52,56,'2020-01-07 23:09:04','2020-01-07 19:09:04',12,NULL,NULL,NULL,NULL),(149,5,NULL,NULL,0,25,1,1,'','consumed',50,57,'2020-01-07 23:50:40','2020-01-07 19:50:40',12,NULL,NULL,NULL,NULL),(152,5,NULL,NULL,0,25,1,1,'','consumed',50,59,'2020-01-07 23:51:27','2020-01-07 19:51:27',12,NULL,NULL,NULL,NULL),(161,5,NULL,NULL,0,25,1,1,'','consumed',50,63,'2020-01-08 00:29:24','2020-01-07 20:29:24',12,NULL,NULL,NULL,NULL),(167,5,NULL,NULL,0,25,1,1,'','consumed',50,66,'2020-01-08 01:09:15','2020-01-07 21:09:15',12,NULL,NULL,NULL,NULL),(170,5,NULL,NULL,0,25,1,1,'','consumed',50,68,'2020-01-08 01:15:02','2020-01-07 21:15:02',12,NULL,NULL,NULL,NULL),(171,5,NULL,NULL,0,25,1,1.1,'','consumed',50,69,'2020-01-08 01:17:16','2020-01-07 21:17:16',12,NULL,NULL,NULL,NULL),(172,22,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,NULL,NULL),(173,22,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,0),(174,22,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,1),(175,22,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,1,0),(176,22,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:42:15','2020-01-08 15:42:15',12,NULL,NULL,0,0),(177,23,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,NULL,NULL),(178,23,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,0),(179,23,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,1),(180,23,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,1,0),(181,23,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:45:04','2020-01-08 15:45:04',12,NULL,NULL,0,0),(182,24,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,NULL,NULL),(183,24,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,0),(184,24,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,1),(185,24,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,1,0),(186,24,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:46:41','2020-01-08 15:46:41',12,NULL,NULL,0,0),(192,26,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,NULL,NULL),(193,26,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,0),(194,26,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,1),(195,26,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,1,0),(196,26,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:22','2020-01-08 15:49:22',12,NULL,NULL,0,0),(197,27,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,NULL,NULL),(198,27,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,0),(199,27,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,1),(200,27,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,1,0),(201,27,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 19:49:50','2020-01-08 15:49:50',12,NULL,NULL,0,0),(202,28,NULL,NULL,1,4,NULL,1,NULL,'toproduce',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,NULL,NULL),(203,28,NULL,NULL,1,25,NULL,4,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,0),(204,28,NULL,NULL,3,3,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,1),(205,28,NULL,NULL,2,2,NULL,1,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,1,0),(206,28,NULL,NULL,0,1,NULL,3,NULL,'toconsume',NULL,NULL,'2020-01-08 20:09:40','2020-01-08 16:09:40',12,NULL,NULL,0,0),(207,28,NULL,NULL,0,25,1,1,'','consumed',203,70,'2020-01-08 20:21:22','2020-01-08 16:21:22',12,NULL,NULL,NULL,NULL),(210,28,NULL,NULL,0,1,1,1.1,'000000','consumed',206,73,'2020-01-08 20:41:18','2020-01-08 16:41:18',12,NULL,NULL,NULL,NULL),(211,28,NULL,NULL,0,4,1,1.2,'aaa','produced',202,74,'2020-01-08 20:41:19','2020-01-08 16:41:19',12,NULL,NULL,NULL,NULL),(212,24,NULL,NULL,0,25,1,1,'','consumed',183,75,'2020-01-13 15:13:19','2020-01-13 11:13:19',12,NULL,NULL,NULL,NULL),(213,24,NULL,NULL,0,1,1,0.1,'000000','consumed',186,76,'2020-01-13 15:14:15','2020-01-13 11:14:15',12,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_mrp_production` ENABLE KEYS */; UNLOCK TABLES; @@ -9567,291 +8849,6 @@ INSERT INTO `llx_multicurrency_rate` VALUES (1,'2017-02-15 21:17:16',1,1,1),(2,' /*!40000 ALTER TABLE `llx_multicurrency_rate` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_myobject` --- - -DROP TABLE IF EXISTS `llx_myobject`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_myobject` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `fk_othertable` int(11) NOT NULL, - `name` varchar(189) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_fk_othertable` (`fk_othertable`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_myobject` --- - -LOCK TABLES `llx_myobject` WRITE; -/*!40000 ALTER TABLE `llx_myobject` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_myobject` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature` --- - -DROP TABLE IF EXISTS `llx_nomenclature`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_object` int(11) NOT NULL DEFAULT 0, - `fk_nomenclature_parent` int(11) NOT NULL DEFAULT 0, - `is_default` int(11) NOT NULL DEFAULT 0, - `qty_reference` double NOT NULL DEFAULT 0, - `totalPRCMO_PMP` double NOT NULL DEFAULT 0, - `totalPRCMO_OF` double NOT NULL DEFAULT 0, - `totalPRCMO` double NOT NULL DEFAULT 0, - `object_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_object` (`fk_object`), - KEY `fk_nomenclature_parent` (`fk_nomenclature_parent`), - KEY `is_default` (`is_default`), - KEY `qty_reference` (`qty_reference`), - KEY `object_type` (`object_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature` --- - -LOCK TABLES `llx_nomenclature` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature` DISABLE KEYS */; -INSERT INTO `llx_nomenclature` VALUES (1,'2018-11-18 16:22:02','2018-11-18 16:25:48','BOM 1',196,0,0,1,0,0,53.9,'product',''),(2,'2018-11-18 17:18:53','2018-11-18 17:20:45','BOM 2',195,0,0,1,0,0,22,'product',''); -/*!40000 ALTER TABLE `llx_nomenclature` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature_coef` --- - -DROP TABLE IF EXISTS `llx_nomenclature_coef`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature_coef` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tx` double NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `code_type` (`code_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature_coef` --- - -LOCK TABLES `llx_nomenclature_coef` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature_coef` DISABLE KEYS */; -INSERT INTO `llx_nomenclature_coef` VALUES (1,'2018-11-18 15:55:54','2018-11-18 15:55:54','Marge','Coef. de marge','coef_marge',1.1); -/*!40000 ALTER TABLE `llx_nomenclature_coef` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature_coef_object` --- - -DROP TABLE IF EXISTS `llx_nomenclature_coef_object`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature_coef_object` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_object` int(11) NOT NULL DEFAULT 0, - `type_object` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `tx_object` double NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_object` (`fk_object`), - KEY `type_object` (`type_object`), - KEY `code_type` (`code_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature_coef_object` --- - -LOCK TABLES `llx_nomenclature_coef_object` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature_coef_object` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_nomenclature_coef_object` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature_feedback` --- - -DROP TABLE IF EXISTS `llx_nomenclature_feedback`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature_feedback` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_origin` int(11) NOT NULL DEFAULT 0, - `fk_nomenclature` int(11) NOT NULL DEFAULT 0, - `fk_product` int(11) NOT NULL DEFAULT 0, - `fk_warehouse` int(11) NOT NULL DEFAULT 0, - `origin` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `stockAllowed` double NOT NULL DEFAULT 0, - `qtyUsed` double NOT NULL DEFAULT 0, - `note` longtext CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_origin` (`fk_origin`), - KEY `fk_nomenclature` (`fk_nomenclature`), - KEY `fk_product` (`fk_product`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature_feedback` --- - -LOCK TABLES `llx_nomenclature_feedback` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature_feedback` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_nomenclature_feedback` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature_workstation` --- - -DROP TABLE IF EXISTS `llx_nomenclature_workstation`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature_workstation` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_workstation` int(11) NOT NULL DEFAULT 0, - `fk_nomenclature` int(11) NOT NULL DEFAULT 0, - `rang` int(11) NOT NULL DEFAULT 0, - `unifyRang` int(11) NOT NULL DEFAULT 0, - `nb_hour` double NOT NULL DEFAULT 0, - `nb_hour_prepare` double NOT NULL DEFAULT 0, - `nb_hour_manufacture` double NOT NULL DEFAULT 0, - `nb_days_before_beginning` double NOT NULL DEFAULT 0, - `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, - `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_workstation` (`fk_workstation`), - KEY `fk_nomenclature` (`fk_nomenclature`), - KEY `rang` (`rang`), - KEY `unifyRang` (`unifyRang`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature_workstation` --- - -LOCK TABLES `llx_nomenclature_workstation` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature_workstation` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_nomenclature_workstation` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclature_workstation_thm_object` --- - -DROP TABLE IF EXISTS `llx_nomenclature_workstation_thm_object`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclature_workstation_thm_object` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_workstation` int(11) NOT NULL DEFAULT 0, - `fk_object` int(11) NOT NULL DEFAULT 0, - `type_object` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, - `thm_object` double NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_object` (`fk_object`), - KEY `type_object` (`type_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclature_workstation_thm_object` --- - -LOCK TABLES `llx_nomenclature_workstation_thm_object` WRITE; -/*!40000 ALTER TABLE `llx_nomenclature_workstation_thm_object` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_nomenclature_workstation_thm_object` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_nomenclaturedet` --- - -DROP TABLE IF EXISTS `llx_nomenclaturedet`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_nomenclaturedet` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `fk_product` int(11) NOT NULL DEFAULT 0, - `fk_nomenclature` int(11) NOT NULL DEFAULT 0, - `is_imported` int(11) NOT NULL DEFAULT 0, - `rang` int(11) NOT NULL DEFAULT 0, - `unifyRang` int(11) NOT NULL DEFAULT 0, - `code_type` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, - `workstations` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `qty` double NOT NULL DEFAULT 0, - `price` double NOT NULL DEFAULT 0, - `note_private` longtext COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_product` (`fk_product`), - KEY `fk_nomenclature` (`fk_nomenclature`), - KEY `is_imported` (`is_imported`), - KEY `rang` (`rang`), - KEY `unifyRang` (`unifyRang`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_nomenclaturedet` --- - -LOCK TABLES `llx_nomenclaturedet` WRITE; -/*!40000 ALTER TABLE `llx_nomenclaturedet` DISABLE KEYS */; -INSERT INTO `llx_nomenclaturedet` VALUES (1,'2018-11-18 16:22:25','2018-11-18 16:25:48','',192,1,0,0,0,'coef_marge','',2,0,'aaa'),(2,'2018-11-18 16:22:37','2018-11-18 16:25:48','',151,1,0,1,0,'coef_marge','',1,0,'bbb'),(3,'2018-11-18 16:25:42','2018-11-18 16:25:48','',10,1,0,2,0,'coef_marge','',1,0,'ccc'),(4,'2018-11-18 17:19:13','2018-11-18 17:20:45','',190,2,0,0,0,'coef_marge','',2,0,'aaa'),(5,'2018-11-18 17:20:19','2018-11-18 17:20:45','',11,2,0,1,0,'coef_marge','',1,0,'bbb'),(6,'2018-11-18 17:20:40','2018-11-18 17:20:45','',10,2,0,2,0,'coef_marge','',1,0,''); -/*!40000 ALTER TABLE `llx_nomenclaturedet` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_notify` -- @@ -9986,6 +8983,9 @@ CREATE TABLE `llx_oauth_token` ( `fk_adherent` int(11) DEFAULT NULL, `entity` int(11) DEFAULT NULL, `tokenstring` text COLLATE utf8_unicode_ci DEFAULT NULL, + `restricted_ips` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -10317,7 +9317,7 @@ CREATE TABLE `llx_paiement` ( LOCK TABLES `llx_paiement` WRITE; /*!40000 ALTER TABLE `llx_paiement` DISABLE KEYS */; -INSERT INTO `llx_paiement` VALUES (3,'',NULL,1,'2013-07-18 20:50:47','2020-12-10 12:24:22','2020-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(5,'',NULL,1,'2013-08-01 03:34:11','2020-12-10 12:24:22','2020-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(6,'',NULL,1,'2013-08-06 20:33:54','2020-12-10 12:24:22','2020-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(8,'',NULL,1,'2013-08-08 02:53:40','2020-12-10 12:24:22','2020-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(9,'',NULL,1,'2013-08-08 02:55:58','2020-12-10 12:24:23','2020-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(17,'',NULL,1,'2014-12-09 15:28:44','2020-12-10 12:24:23','2020-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(18,'',NULL,1,'2014-12-09 15:28:53','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(19,'',NULL,1,'2014-12-09 17:35:55','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(20,'',NULL,1,'2014-12-09 17:37:02','2020-12-10 12:24:23','2020-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(21,'',NULL,1,'2014-12-09 18:35:07','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(23,'',NULL,1,'2014-12-12 18:54:33','2020-06-12 17:12:08','2019-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(24,'',NULL,1,'2015-03-06 16:48:16','2020-06-12 17:12:09','2020-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(25,'',NULL,1,'2015-03-20 14:30:11','2020-06-12 17:12:09','2020-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(26,'',NULL,1,'2016-03-02 19:57:58','2020-12-10 12:24:23','2020-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(29,'',NULL,1,'2016-03-02 20:01:39','2020-06-12 17:12:09','2020-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(30,'',NULL,1,'2016-03-02 20:02:06','2020-06-12 17:12:09','2020-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(32,'',NULL,1,'2016-03-03 19:22:32','2020-12-10 12:24:23','2020-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(33,'',NULL,1,'2016-03-03 19:23:16','2020-06-12 17:12:09','2020-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(34,'PAY1603-0001',NULL,1,'2017-02-06 08:10:24','2020-06-12 17:12:09','2020-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,0.00000000,150.00000000,NULL,NULL),(35,'PAY1603-0002',NULL,1,'2017-02-06 08:10:50','2020-06-12 17:12:09','2020-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,0.00000000,140.00000000,NULL,NULL),(36,'PAY1702-0003',NULL,1,'2017-02-21 16:07:43','2020-06-12 17:12:08','2020-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(38,'PAY1803-0004',NULL,1,'2018-03-16 13:59:31','2020-06-12 17:12:09','2020-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,0.00000000,10.00000000,NULL,NULL),(39,'PAY1801-0005',NULL,1,'2019-10-04 10:28:14','2020-06-12 17:12:09','2020-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,0.00000000,5.63000000,NULL,NULL),(40,'PAY2001-0006',NULL,1,'2020-01-16 02:36:48','2020-01-16 01:36:48','2020-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,0.00000000,20.50000000,NULL,NULL),(41,'PAY2001-0007',NULL,1,'2020-01-21 10:23:17','2020-01-21 09:23:17','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(42,'PAY2001-0008',NULL,1,'2020-01-21 10:23:28','2020-01-21 09:23:28','2020-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(43,'PAY2001-0009',NULL,1,'2020-01-21 10:23:49','2020-01-21 09:23:49','2020-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL); +INSERT INTO `llx_paiement` VALUES (3,'',NULL,1,'2013-07-18 20:50:47','2020-12-10 12:24:22','2020-07-08 12:00:00',10.00000000,4,'','',6,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(5,'',NULL,1,'2013-08-01 03:34:11','2020-12-10 12:24:22','2020-08-01 03:34:11',5.63000000,6,'','Payment Invoice FA1108-0003',8,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(6,'',NULL,1,'2013-08-06 20:33:54','2020-12-10 12:24:22','2020-08-06 20:33:53',5.98000000,4,'','Payment Invoice FA1108-0004',13,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(8,'',NULL,1,'2013-08-08 02:53:40','2020-12-10 12:24:22','2020-08-08 12:00:00',26.10000000,4,'','',14,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(9,'',NULL,1,'2013-08-08 02:55:58','2020-12-10 12:24:23','2020-08-08 12:00:00',26.96000000,1,'','',15,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(17,'',NULL,1,'2014-12-09 15:28:44','2020-12-10 12:24:23','2020-12-09 12:00:00',2.00000000,4,'','',16,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(18,'',NULL,1,'2014-12-09 15:28:53','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',17,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(19,'',NULL,1,'2014-12-09 17:35:55','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',18,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(20,'',NULL,1,'2014-12-09 17:37:02','2020-12-10 12:24:23','2020-12-09 12:00:00',2.00000000,4,'','',19,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(21,'',NULL,1,'2014-12-09 18:35:07','2020-12-10 12:24:23','2020-12-09 12:00:00',-2.00000000,4,'','',20,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(23,'',NULL,1,'2014-12-12 18:54:33','2021-04-15 10:22:31','2020-12-12 12:00:00',1.00000000,1,'','',21,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(24,'',NULL,1,'2015-03-06 16:48:16','2021-04-15 10:22:31','2021-03-06 00:00:00',20.00000000,4,'','Adhésion/cotisation 2016',22,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(25,'',NULL,1,'2015-03-20 14:30:11','2021-04-15 10:22:31','2021-03-20 00:00:00',10.00000000,2,'','Adhésion/cotisation 2011',23,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(26,'',NULL,1,'2016-03-02 19:57:58','2020-12-10 12:24:23','2020-07-09 12:00:00',605.00000000,2,'','',24,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(29,'',NULL,1,'2016-03-02 20:01:39','2021-04-15 10:22:31','2021-03-19 12:00:00',500.00000000,4,'','',26,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(30,'',NULL,1,'2016-03-02 20:02:06','2021-04-15 10:22:31','2021-03-21 12:00:00',400.00000000,2,'','',27,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(32,'',NULL,1,'2016-03-03 19:22:32','2020-12-10 12:24:23','2020-10-03 12:00:00',-400.00000000,4,'','',28,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(33,'',NULL,1,'2016-03-03 19:23:16','2021-04-15 10:22:31','2021-03-10 12:00:00',-300.00000000,4,'','',29,1,NULL,0,0,0.00000000,0.00000000,NULL,NULL),(34,'PAY1603-0001',NULL,1,'2017-02-06 08:10:24','2021-04-15 10:22:31','2021-03-22 12:00:00',150.00000000,7,'','',33,12,NULL,0,0,0.00000000,150.00000000,NULL,NULL),(35,'PAY1603-0002',NULL,1,'2017-02-06 08:10:50','2021-04-15 10:22:31','2021-03-25 12:00:00',140.00000000,3,'','',34,12,NULL,0,0,0.00000000,140.00000000,NULL,NULL),(36,'PAY1702-0003',NULL,1,'2017-02-21 16:07:43','2021-04-15 10:22:31','2021-02-21 12:00:00',50.00000000,3,'T170201','',37,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(38,'PAY1803-0004',NULL,1,'2018-03-16 13:59:31','2021-04-15 10:22:31','2021-03-16 12:00:00',10.00000000,7,'','',39,12,NULL,0,0,0.00000000,10.00000000,NULL,NULL),(39,'PAY1801-0005',NULL,1,'2019-10-04 10:28:14','2021-04-15 10:22:31','2021-01-19 12:00:00',5.63000000,4,'','',41,12,NULL,0,0,0.00000000,5.63000000,NULL,NULL),(40,'PAY2001-0006',NULL,1,'2020-01-16 02:36:48','2021-04-15 10:22:31','2021-01-16 12:00:00',20.50000000,2,'','',50,12,NULL,0,0,0.00000000,20.50000000,NULL,NULL),(41,'PAY2001-0007',NULL,1,'2020-01-21 10:23:17','2021-04-15 10:22:31','2021-01-21 00:00:00',50.00000000,7,'','Subscription 2017',53,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(42,'PAY2001-0008',NULL,1,'2020-01-21 10:23:28','2021-04-15 10:22:31','2021-01-21 00:00:00',50.00000000,7,'','Subscription 2018',54,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL),(43,'PAY2001-0009',NULL,1,'2020-01-21 10:23:49','2021-04-15 10:22:31','2021-01-21 00:00:00',50.00000000,6,'','Subscription 2019',55,12,NULL,0,0,0.00000000,50.00000000,NULL,NULL); /*!40000 ALTER TABLE `llx_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -10455,6 +9455,79 @@ INSERT INTO `llx_paiementfourn_facturefourn` VALUES (1,1,16,900,0.00000000),(2,2 /*!40000 ALTER TABLE `llx_paiementfourn_facturefourn` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_partnership` +-- + +DROP TABLE IF EXISTS `llx_partnership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_partnership` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', + `status` smallint(6) NOT NULL DEFAULT 0, + `fk_soc` int(11) DEFAULT NULL, + `fk_member` int(11) DEFAULT NULL, + `date_partnership_start` date NOT NULL, + `date_partnership_end` date NOT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `reason_decline_or_cancel` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `fk_user_creat` int(11) NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_modif` int(11) DEFAULT NULL, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `count_last_url_check_error` int(11) DEFAULT 0, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_partnership_rowid` (`rowid`), + KEY `idx_partnership_ref` (`ref`), + KEY `idx_partnership_fk_soc` (`fk_soc`), + KEY `llx_partnership_fk_user_creat` (`fk_user_creat`), + KEY `idx_partnership_status` (`status`), + KEY `idx_partnership_fk_member` (`fk_member`), + CONSTRAINT `llx_partnership_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_partnership` +-- + +LOCK TABLES `llx_partnership` WRITE; +/*!40000 ALTER TABLE `llx_partnership` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_partnership` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_partnership_extrafields` +-- + +DROP TABLE IF EXISTS `llx_partnership_extrafields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_partnership_extrafields` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_object` int(11) NOT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_partnership_fk_object` (`fk_object`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_partnership_extrafields` +-- + +LOCK TABLES `llx_partnership_extrafields` WRITE; +/*!40000 ALTER TABLE `llx_partnership_extrafields` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_partnership_extrafields` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_payment_donation` -- @@ -10571,7 +9644,7 @@ CREATE TABLE `llx_payment_salary` ( `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `datec` datetime DEFAULT NULL, - `fk_user` int(11) NOT NULL, + `fk_user` int(11) DEFAULT NULL, `datep` date DEFAULT NULL, `datev` date DEFAULT NULL, `salary` double(24,8) DEFAULT NULL, @@ -10587,6 +9660,7 @@ CREATE TABLE `llx_payment_salary` ( `fk_bank` int(11) DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, + `fk_salary` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_payment_salary_ref` (`num_payment`), KEY `idx_payment_salary_user` (`fk_user`,`entity`), @@ -10603,7 +9677,7 @@ CREATE TABLE `llx_payment_salary` ( LOCK TABLES `llx_payment_salary` WRITE; /*!40000 ALTER TABLE `llx_payment_salary` DISABLE KEYS */; -INSERT INTO `llx_payment_salary` VALUES (1,NULL,'2019-10-08 11:18:50','2019-10-08 13:18:50',19,'2019-10-08','2019-10-08',2700.00000000,1000.00000000,0,2,'','Salary payment','2019-09-01','2019-09-30',1,NULL,42,12,NULL); +INSERT INTO `llx_payment_salary` VALUES (1,'1','2021-04-15 10:22:55','2019-10-08 13:18:50',19,'2019-10-08','2019-10-08',2700.00000000,1000.00000000,0,2,'','Salary payment','2019-09-01','2019-09-30',1,NULL,42,12,NULL,1); /*!40000 ALTER TABLE `llx_payment_salary` ENABLE KEYS */; UNLOCK TABLES; @@ -10674,6 +9748,39 @@ INSERT INTO `llx_payment_various` VALUES (2,NULL,'2019-12-25 22:14:38','2017-07- /*!40000 ALTER TABLE `llx_payment_various` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_payment_vat` +-- + +DROP TABLE IF EXISTS `llx_payment_vat`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_payment_vat` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_tva` int(11) DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `datep` datetime DEFAULT NULL, + `amount` double(24,8) DEFAULT 0.00000000, + `fk_typepaiement` int(11) NOT NULL, + `num_paiement` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_bank` int(11) NOT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_payment_vat` +-- + +LOCK TABLES `llx_payment_vat` WRITE; +/*!40000 ALTER TABLE `llx_payment_vat` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_payment_vat` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_pointage` -- @@ -10751,39 +9858,6 @@ INSERT INTO `llx_pos_cash_fence` VALUES (1,1,'1',NULL,-324.29000000,400.00000000 /*!40000 ALTER TABLE `llx_pos_cash_fence` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_postes` --- - -DROP TABLE IF EXISTS `llx_postes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_postes` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `status` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `lieu` int(11) DEFAULT NULL, - `email` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `date` date DEFAULT NULL, - `departement` int(11) DEFAULT NULL, - `responsable_recrutement` int(11) DEFAULT NULL, - `nb_nouveauemploye` int(11) DEFAULT NULL, - `description` text CHARACTER SET utf8mb4 DEFAULT NULL, - `responsable_RH` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_postes` --- - -LOCK TABLES `llx_postes` WRITE; -/*!40000 ALTER TABLE `llx_postes` DISABLE KEYS */; -INSERT INTO `llx_postes` VALUES (1,'aaa','Recrutementencours',-1,'aaa','2020-05-29',0,0,1,'',0); -/*!40000 ALTER TABLE `llx_postes` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_prelevement_bons` -- @@ -11176,6 +10250,7 @@ CREATE TABLE `llx_product` ( `net_measure` float DEFAULT NULL, `net_measure_units` tinyint(4) DEFAULT NULL, `fk_state` int(11) DEFAULT NULL, + `batch_mask` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_ref` (`ref`,`entity`), UNIQUE KEY `uk_product_barcode` (`barcode`,`fk_barcode_type`,`entity`), @@ -11195,7 +10270,7 @@ CREATE TABLE `llx_product` ( CONSTRAINT `fk_product_finished` FOREIGN KEY (`finished`) REFERENCES `llx_c_product_nature` (`code`), CONSTRAINT `fk_product_fk_country` FOREIGN KEY (`fk_country`) REFERENCES `llx_c_country` (`rowid`), CONSTRAINT `fk_product_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11204,7 +10279,7 @@ CREATE TABLE `llx_product` ( LOCK TABLES `llx_product` WRITE; /*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; -INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2020-01-18 19:17:03',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,12,1,1,0,1,0,'',NULL,NULL,'123456789066',2,'','','','',NULL,NULL,NULL,670,-3,NULL,0,NULL,0,NULL,0,2.8,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:30:01','2019-11-28 15:09:50',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 14:44:06','2020-01-08 16:41:18',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,0,9.000,'1',9.000,'1',1,12,1,1,0,1,0,'',NULL,NULL,'123456789034',2,'701','','','601',NULL,NULL,NULL,500,-3,NULL,0,NULL,0,NULL,0,1020.2,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,'CGST+SGST',0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,NULL,NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL,NULL,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2019-10-07 00:00:00','2019-11-28 13:51:35',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,NULL,0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL,NULL,NULL,NULL),(24,'2019-11-28 16:33:35','2019-11-28 15:02:01',0,0,'POS-CARROT',1,NULL,'Carrot','','','',NULL,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,'2019-11-28 16:37:36','2020-01-13 11:13:19',0,0,'POS-APPLE',1,NULL,'Apple','','','',NULL,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,15.599999999999994,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,'2019-11-28 16:38:44','2019-11-28 12:38:44',0,0,'POS-KIWI',1,NULL,'Kiwi','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2019-11-28 16:39:21','2019-11-28 14:57:44',0,0,'POS-PEACH',1,NULL,'Peach','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,'2019-11-28 16:39:58','2019-11-28 12:39:58',0,0,'POS-ORANGE',1,NULL,'Orange','','','',NULL,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2019-11-28 17:03:14','2019-11-28 13:03:14',0,0,'POS-Eggs',1,NULL,'Eggs','','','',NULL,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2019-11-28 17:09:14','2019-11-28 13:09:14',0,0,'POS-Chips',1,NULL,'Chips','','','',NULL,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,30,-3,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_product` VALUES (1,'2012-07-08 14:33:17','2020-01-18 19:17:03',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,12,1,1,0,1,0,'',NULL,NULL,'123456789066',2,'','','','',NULL,NULL,NULL,670,-3,NULL,0,NULL,0,NULL,0,2.8,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-09 00:30:01','2019-11-28 15:09:50',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789077',2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-09 00:30:25','2018-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM',NULL,NULL,'601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 14:44:06','2021-04-15 11:40:18',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,0,9.000,'1',9.000,'1',1,12,1,1,0,1,0,'',NULL,NULL,'123456789034',2,'701','','','601',NULL,NULL,NULL,500,-3,NULL,0,NULL,0,NULL,0,1021.2,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL,NULL,'CGST+SGST',0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2013-07-20 23:11:38','2018-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',1,NULL,1,1,0,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701',NULL,NULL,'601',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2011-12-31 00:00:00','2017-02-16 00:12:09',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',NULL,12,1,1,0,1,0,'',150,NULL,'123456789055',2,'701OLDC',NULL,NULL,'601OLDC',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,110,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-13 20:24:42','2019-10-08 17:21:07',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,'0',0.000,'0',1,12,1,1,0,0,0,'',NULL,NULL,'123456789044',2,'','','','',NULL,NULL,NULL,95,-3,NULL,0,2.34,-4,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL,12.00000000,NULL,0,NULL,'',NULL,8,NULL,8,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2018-07-30 17:31:29','2018-07-30 13:35:02',0,0,'DOLICLOUD',1,NULL,'SaaS service of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','','',NULL,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,1,'',NULL,'http://www.dolicloud.com','123456789013',2,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,8.50000000,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-02-16 03:49:00','2017-02-15 23:49:27',0,0,'COMP-XP4548',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,12,1,1,0,1,0,'',150,NULL,NULL,2,'',NULL,NULL,'',NULL,NULL,NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,200,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'2019-10-07 00:00:00','2019-11-28 13:51:35',0,0,'PREF123456',1,NULL,'Product name in default language','Product description in default language','a private note (free text)','customs code',1,100.00000000,110.00000000,100.00000000,110.00000000,'HT',10.000,0,0.000,'0',0.000,'0',12,NULL,0,1,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-3,1,-1,4,-4,5,-3,NULL,0.00000000,NULL,NULL,NULL,0,0,'20191007122224',NULL,NULL,NULL,NULL,NULL,0,'a public note (free text)','',2,-1,3,-1,NULL,NULL,NULL,NULL,NULL,NULL),(24,'2019-11-28 16:33:35','2019-11-28 15:02:01',0,0,'POS-CARROT',1,NULL,'Carrot','','','',NULL,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,'2019-11-28 16:37:36','2020-01-13 11:13:19',0,0,'POS-APPLE',1,NULL,'Apple','','','',NULL,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,15.599999999999994,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,'2019-11-28 16:38:44','2019-11-28 12:38:44',0,0,'POS-KIWI',1,NULL,'Kiwi','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'2019-11-28 16:39:21','2019-11-28 14:57:44',0,0,'POS-PEACH',1,NULL,'Peach','','','',NULL,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,'',0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,'2019-11-28 16:39:58','2019-11-28 12:39:58',0,0,'POS-ORANGE',1,NULL,'Orange','','','',NULL,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,1,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'2019-11-28 17:03:14','2019-11-28 13:03:14',0,0,'POS-Eggs',1,NULL,'Eggs','','','',NULL,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,'2019-11-28 17:09:14','2019-11-28 13:09:14',0,0,'POS-Chips',1,NULL,'Chips','','','',NULL,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,0,0.000,'0',0.000,'0',12,12,1,1,0,0,0,'',NULL,NULL,NULL,2,'','','','',NULL,NULL,NULL,30,-3,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,'2021-04-15 08:38:02','2021-04-15 11:38:02',0,0,'PRODSER',1,NULL,'Product NFC - Unique','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,'0',0.000,'0',12,12,1,1,0,2,0,'',0,NULL,NULL,2,'','','','','','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,0,NULL,'',NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; UNLOCK TABLES; @@ -11385,7 +10460,8 @@ CREATE TABLE `llx_product_attribute_combination_price_level` ( UNIQUE KEY `fk_product_attribute_combinati_45` (`fk_product_attribute_combination`,`fk_price_level`), UNIQUE KEY `fk_product_attribute_combinati_46` (`fk_product_attribute_combination`,`fk_price_level`), UNIQUE KEY `fk_product_attribute_combinati_47` (`fk_product_attribute_combination`,`fk_price_level`), - UNIQUE KEY `fk_product_attribute_combinati_48` (`fk_product_attribute_combination`,`fk_price_level`) + UNIQUE KEY `fk_product_attribute_combinati_48` (`fk_product_attribute_combination`,`fk_price_level`), + UNIQUE KEY `fk_product_attribute_combinati_49` (`fk_product_attribute_combination`,`fk_price_level`) ) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11448,7 +10524,7 @@ CREATE TABLE `llx_product_batch` ( KEY `idx_fk_product_stock` (`fk_product_stock`), KEY `idx_batch` (`batch`), CONSTRAINT `fk_product_batch_fk_product_stock` FOREIGN KEY (`fk_product_stock`) REFERENCES `llx_product_stock` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11457,7 +10533,7 @@ CREATE TABLE `llx_product_batch` ( LOCK TABLES `llx_product_batch` WRITE; /*!40000 ALTER TABLE `llx_product_batch` DISABLE KEYS */; -INSERT INTO `llx_product_batch` VALUES (1,'2018-07-30 13:40:39',8,NULL,NULL,'5599887766452',15,NULL),(2,'2018-07-30 13:40:12',8,NULL,NULL,'4494487766452',60,NULL),(3,'2017-02-16 00:12:09',9,NULL,NULL,'5599887766452',35,NULL),(4,'2020-01-08 15:40:27',4,NULL,NULL,'000000',12,NULL),(5,'2020-01-08 15:40:27',3,NULL,NULL,'000000',1007,NULL),(6,'2020-01-13 11:14:15',5,NULL,NULL,'000000',0.8,NULL),(7,'2020-01-08 16:41:18',4,NULL,NULL,'aaa',1.2,NULL),(8,'2020-01-18 19:17:03',5,NULL,NULL,'string',2,NULL); +INSERT INTO `llx_product_batch` VALUES (1,'2018-07-30 13:40:39',8,NULL,NULL,'5599887766452',15,NULL),(2,'2018-07-30 13:40:12',8,NULL,NULL,'4494487766452',60,NULL),(3,'2017-02-16 00:12:09',9,NULL,NULL,'5599887766452',35,NULL),(4,'2020-01-08 15:40:27',4,NULL,NULL,'000000',12,NULL),(5,'2020-01-08 15:40:27',3,NULL,NULL,'000000',1007,NULL),(6,'2020-01-13 11:14:15',5,NULL,NULL,'000000',0.8,NULL),(7,'2020-01-08 16:41:18',4,NULL,NULL,'aaa',1.2,NULL),(8,'2020-01-18 19:17:03',5,NULL,NULL,'string',2,NULL),(9,'2021-04-15 11:40:18',11,NULL,NULL,'Lot 2021-02',1,NULL); /*!40000 ALTER TABLE `llx_product_batch` ENABLE KEYS */; UNLOCK TABLES; @@ -11489,6 +10565,7 @@ CREATE TABLE `llx_product_customer_price` ( `localtax2_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `fk_user` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_customer_price_fk_product_fk_soc` (`fk_product`,`fk_soc`), KEY `idx_product_customer_price_fk_user` (`fk_user`), @@ -11508,7 +10585,7 @@ CREATE TABLE `llx_product_customer_price` ( LOCK TABLES `llx_product_customer_price` WRITE; /*!40000 ALTER TABLE `llx_product_customer_price` DISABLE KEYS */; -INSERT INTO `llx_product_customer_price` VALUES (1,1,'2020-01-17 15:26:08','2020-01-17 14:26:08',1,30,11.00000000,12.37500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,NULL),(2,1,'2020-01-17 15:26:16','2020-01-17 14:26:16',1,4,12.00000000,13.50000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,NULL); +INSERT INTO `llx_product_customer_price` VALUES (1,1,'2020-01-17 15:26:08','2020-01-17 14:26:08',1,30,11.00000000,12.37500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,NULL,NULL),(2,1,'2020-01-17 15:26:16','2020-01-17 14:26:16',1,4,12.00000000,13.50000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,NULL,NULL); /*!40000 ALTER TABLE `llx_product_customer_price` ENABLE KEYS */; UNLOCK TABLES; @@ -11539,6 +10616,7 @@ CREATE TABLE `llx_product_customer_price_log` ( `fk_user` int(11) DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `default_vat_code` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, + `ref_customer` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -11754,7 +10832,7 @@ CREATE TABLE `llx_product_lang` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lang` (`fk_product`,`lang`), CONSTRAINT `fk_product_lang_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11763,7 +10841,7 @@ CREATE TABLE `llx_product_lang` ( LOCK TABLES `llx_product_lang` WRITE; /*!40000 ALTER TABLE `llx_product_lang` DISABLE KEYS */; -INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress','',NULL),(2,2,'en_US','Pear Pie','','',NULL),(3,3,'en_US','Cake making contribution','','',NULL),(4,4,'fr_FR','Decapsuleur','','',NULL),(5,5,'en_US','DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','',NULL),(9,11,'fr_FR','hfghf','','',NULL),(10,2,'fr_FR','Product P1','','',NULL),(11,4,'en_US','Apple Pie','Nice Bio Apple Pie.
\r\n ','',NULL),(12,11,'en_US','Rollup Dolibarr','A nice rollup','',NULL),(13,10,'en_US','Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.',NULL),(14,12,'en_US','SaaS hosting of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','',NULL),(15,12,'fr_FR','Service SaaS Hébergement Dolibarr ERP CRM','Service SaaS d'hébergement de la solution Dolibarr ERP CRM','',NULL),(16,13,'en_US','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(17,13,'fr_FR','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(19,24,'en_US','Carrot','',NULL,NULL),(20,25,'en_US','Apple','',NULL,NULL),(21,26,'en_US','Kiwi','',NULL,NULL),(22,27,'en_US','Peach','',NULL,NULL),(23,28,'en_US','Orange','',NULL,NULL),(24,29,'en_US','Eggs','',NULL,NULL),(25,30,'en_US','Chips','',NULL,NULL); +INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress','',NULL),(2,2,'en_US','Pear Pie','','',NULL),(3,3,'en_US','Cake making contribution','','',NULL),(4,4,'fr_FR','Decapsuleur','','',NULL),(5,5,'en_US','DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','',NULL),(9,11,'fr_FR','hfghf','','',NULL),(10,2,'fr_FR','Product P1','','',NULL),(11,4,'en_US','Apple Pie','Nice Bio Apple Pie.
\r\n ','',NULL),(12,11,'en_US','Rollup Dolibarr','A nice rollup','',NULL),(13,10,'en_US','Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.',NULL),(14,12,'en_US','SaaS hosting of Dolibarr ERP CRM','Cloud hosting of Dolibarr ERP and CRM software','',NULL),(15,12,'fr_FR','Service SaaS Hébergement Dolibarr ERP CRM','Service SaaS d'hébergement de la solution Dolibarr ERP CRM','',NULL),(16,13,'en_US','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(17,13,'fr_FR','Computer XP4523','A powerfull computer XP4523 ',NULL,NULL),(19,24,'en_US','Carrot','',NULL,NULL),(20,25,'en_US','Apple','',NULL,NULL),(21,26,'en_US','Kiwi','',NULL,NULL),(22,27,'en_US','Peach','',NULL,NULL),(23,28,'en_US','Orange','',NULL,NULL),(24,29,'en_US','Eggs','',NULL,NULL),(25,30,'en_US','Chips','',NULL,NULL),(26,31,'en_US','Product NFC - Unique','',NULL,NULL); /*!40000 ALTER TABLE `llx_product_lang` ENABLE KEYS */; UNLOCK TABLES; @@ -11788,7 +10866,7 @@ CREATE TABLE `llx_product_lot` ( `import_key` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lot` (`fk_product`,`batch`) -) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11797,7 +10875,7 @@ CREATE TABLE `llx_product_lot` ( LOCK TABLES `llx_product_lot` WRITE; /*!40000 ALTER TABLE `llx_product_lot` DISABLE KEYS */; -INSERT INTO `llx_product_lot` VALUES (1,1,2,'123456','2018-07-07',NULL,'2018-07-21 20:55:19','2018-12-12 10:53:58',NULL,NULL,NULL),(2,1,2,'2222','2018-07-08','2018-07-07','2018-07-21 21:00:42','2018-12-12 10:53:58',NULL,NULL,NULL),(3,1,10,'5599887766452',NULL,NULL,'2018-07-30 17:39:31','2018-12-12 10:53:58',NULL,NULL,NULL),(4,1,10,'4494487766452',NULL,NULL,'2018-07-30 17:40:12','2018-12-12 10:53:58',NULL,NULL,NULL),(39,1,1,'000000',NULL,NULL,'2020-01-08 20:41:18','2020-01-08 16:41:18',NULL,NULL,NULL),(40,1,4,'aaa','2020-01-01',NULL,'2020-01-08 20:41:18','2020-01-13 11:28:05',NULL,12,NULL),(46,1,1,'string',NULL,NULL,'2020-01-18 20:16:58','2020-01-18 19:16:58',NULL,NULL,NULL),(47,1,4,'000000',NULL,NULL,'2020-01-08 16:40:27','2020-01-21 10:30:15',1,1,NULL); +INSERT INTO `llx_product_lot` VALUES (1,1,2,'123456','2018-07-07',NULL,'2018-07-21 20:55:19','2018-12-12 10:53:58',NULL,NULL,NULL),(2,1,2,'2222','2018-07-08','2018-07-07','2018-07-21 21:00:42','2018-12-12 10:53:58',NULL,NULL,NULL),(3,1,10,'5599887766452',NULL,NULL,'2018-07-30 17:39:31','2018-12-12 10:53:58',NULL,NULL,NULL),(4,1,10,'4494487766452',NULL,NULL,'2018-07-30 17:40:12','2018-12-12 10:53:58',NULL,NULL,NULL),(39,1,1,'000000',NULL,NULL,'2020-01-08 20:41:18','2020-01-08 16:41:18',NULL,NULL,NULL),(40,1,4,'aaa','2020-01-01',NULL,'2020-01-08 20:41:18','2020-01-13 11:28:05',NULL,12,NULL),(46,1,1,'string',NULL,NULL,'2020-01-18 20:16:58','2020-01-18 19:16:58',NULL,NULL,NULL),(47,1,4,'000000',NULL,NULL,'2020-01-08 16:40:27','2020-01-21 10:30:15',1,1,NULL),(50,1,4,'Lot 2021-02',NULL,NULL,'2021-04-15 08:40:18','2021-04-15 11:40:18',NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_product_lot` ENABLE KEYS */; UNLOCK TABLES; @@ -11827,6 +10905,38 @@ LOCK TABLES `llx_product_lot_extrafields` WRITE; /*!40000 ALTER TABLE `llx_product_lot_extrafields` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_product_perentity` +-- + +DROP TABLE IF EXISTS `llx_product_perentity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_product_perentity` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_product` int(11) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_sell_intra` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_sell_export` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy_intra` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy_export` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_product_perentity` (`fk_product`,`entity`), + KEY `idx_product_perentity_fk_product` (`fk_product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_product_perentity` +-- + +LOCK TABLES `llx_product_perentity` WRITE; +/*!40000 ALTER TABLE `llx_product_perentity` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_product_perentity` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_product_price` -- @@ -11868,7 +10978,7 @@ CREATE TABLE `llx_product_price` ( KEY `idx_product_price_fk_product` (`fk_product`), CONSTRAINT `fk_product_price_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), CONSTRAINT `fk_product_price_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11877,7 +10987,7 @@ CREATE TABLE `llx_product_price` ( LOCK TABLES `llx_product_price` WRITE; /*!40000 ALTER TABLE `llx_product_price` DISABLE KEYS */; -INSERT INTO `llx_product_price` VALUES (1,1,'2012-07-08 12:33:17',1,'2012-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(2,1,'2012-07-08 22:30:01',2,'2012-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(3,1,'2012-07-08 22:30:25',3,'2012-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(4,1,'2012-07-10 12:44:06',4,'2012-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(5,1,'2013-07-20 21:11:38',5,'2013-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(6,1,'2013-07-27 17:02:59',5,'2013-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(10,1,'2013-07-31 22:34:27',4,'2013-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(12,1,'2015-01-13 19:24:59',11,'2015-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(13,1,'2015-03-12 09:30:24',1,'2015-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(14,1,'2018-07-30 13:31:29',12,'2018-07-30 17:31:29',1,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(15,1,'2017-02-15 23:49:00',13,'2017-02-16 03:49:00',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,0,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(16,1,'2017-08-30 15:04:04',10,'2017-08-30 19:04:04',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(18,1,'2019-11-28 12:33:35',24,'2019-11-28 16:33:35',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(19,1,'2019-11-28 12:34:33',24,'2019-11-28 16:34:33',1,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(20,1,'2019-11-28 12:37:36',25,'2019-11-28 16:37:36',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(21,1,'2019-11-28 12:37:58',25,'2019-11-28 16:37:58',1,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(22,1,'2019-11-28 12:38:44',26,'2019-11-28 16:38:44',1,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(23,1,'2019-11-28 12:39:21',27,'2019-11-28 16:39:21',1,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(24,1,'2019-11-28 12:39:58',28,'2019-11-28 16:39:58',1,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(25,1,'2019-11-28 13:03:14',29,'2019-11-28 17:03:14',1,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(26,1,'2019-11-28 13:09:14',30,'2019-11-28 17:09:14',1,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(28,1,'2019-11-28 15:12:50',2,'2019-11-28 19:12:50',1,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(29,1,'2020-01-01 19:54:16',4,'2020-01-01 23:54:16',1,5.00000000,5.00000000,0.00000000,0.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(30,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',1,5.00000000,5.00000000,2.00000000,2.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(31,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',2,6.00000000,6.00000000,3.00000000,3.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(32,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',3,7.00000000,7.00000000,4.00000000,4.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(33,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',4,8.00000000,8.00000000,5.00000000,5.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(34,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',5,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(35,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',1,11.00000000,12.37500000,9.00000000,10.12500000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(36,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',2,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(37,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',3,13.00000000,14.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(38,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',4,14.00000000,15.75000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(39,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',5,15.00000000,16.87500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(40,1,'2020-01-17 14:22:28',1,'2020-01-17 15:22:28',1,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL); +INSERT INTO `llx_product_price` VALUES (1,1,'2012-07-08 12:33:17',1,'2012-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(2,1,'2012-07-08 22:30:01',2,'2012-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(3,1,'2012-07-08 22:30:25',3,'2012-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(4,1,'2012-07-10 12:44:06',4,'2012-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(5,1,'2013-07-20 21:11:38',5,'2013-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(6,1,'2013-07-27 17:02:59',5,'2013-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(10,1,'2013-07-31 22:34:27',4,'2013-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(12,1,'2015-01-13 19:24:59',11,'2015-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(13,1,'2015-03-12 09:30:24',1,'2015-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',1,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(14,1,'2018-07-30 13:31:29',12,'2018-07-30 17:31:29',1,9.00000000,9.00000000,9.00000000,9.00000000,'HT',0.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(15,1,'2017-02-15 23:49:00',13,'2017-02-16 03:49:00',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,0,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(16,1,'2017-08-30 15:04:04',10,'2017-08-30 19:04:04',1,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(18,1,'2019-11-28 12:33:35',24,'2019-11-28 16:33:35',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(19,1,'2019-11-28 12:34:33',24,'2019-11-28 16:34:33',1,0.83333000,1.00000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(20,1,'2019-11-28 12:37:36',25,'2019-11-28 16:37:36',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(21,1,'2019-11-28 12:37:58',25,'2019-11-28 16:37:58',1,1.25000000,1.50000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(22,1,'2019-11-28 12:38:44',26,'2019-11-28 16:38:44',1,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(23,1,'2019-11-28 12:39:21',27,'2019-11-28 16:39:21',1,1.08333000,1.30000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(24,1,'2019-11-28 12:39:58',28,'2019-11-28 16:39:58',1,2.00000000,2.40000000,0.00000000,0.00000000,'HT',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(25,1,'2019-11-28 13:03:14',29,'2019-11-28 17:03:14',1,1.66667000,2.00000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(26,1,'2019-11-28 13:09:14',30,'2019-11-28 17:09:14',1,0.41667000,0.50000000,0.00000000,0.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(28,1,'2019-11-28 15:12:50',2,'2019-11-28 19:12:50',1,10.00000000,12.00000000,8.33333000,10.00000000,'TTC',20.000,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(29,1,'2020-01-01 19:54:16',4,'2020-01-01 23:54:16',1,5.00000000,5.00000000,0.00000000,0.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(30,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',1,5.00000000,5.00000000,2.00000000,2.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(31,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',2,6.00000000,6.00000000,3.00000000,3.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(32,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',3,7.00000000,7.00000000,4.00000000,4.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(33,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',4,8.00000000,8.00000000,5.00000000,5.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(34,1,'2020-01-02 19:02:35',4,'2020-01-02 23:02:35',5,9.00000000,9.00000000,6.00000000,6.00000000,'HT',0.000,'CGST+SGST',0,9.000,'1',9.000,'1',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(35,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',1,11.00000000,12.37500000,9.00000000,10.12500000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(36,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',2,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(37,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',3,13.00000000,14.62500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(38,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',4,14.00000000,15.75000000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(39,1,'2020-01-17 13:54:18',1,'2020-01-17 14:54:18',5,15.00000000,16.87500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(40,1,'2020-01-17 14:22:28',1,'2020-01-17 15:22:28',1,9.00000000,10.12500000,0.00000000,0.00000000,'HT',12.500,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL),(41,1,'2021-04-15 11:38:02',31,'2021-04-15 08:38:02',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,NULL,0,0.000,'0',0.000,'0',12,1,0,NULL,NULL,NULL,NULL,0.00000000,1.00000000,NULL); /*!40000 ALTER TABLE `llx_product_price` ENABLE KEYS */; UNLOCK TABLES; @@ -11969,7 +11079,7 @@ CREATE TABLE `llx_product_stock` ( UNIQUE KEY `uk_product_stock` (`fk_product`,`fk_entrepot`), KEY `idx_product_stock_fk_product` (`fk_product`), KEY `idx_product_stock_fk_entrepot` (`fk_entrepot`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -11978,7 +11088,7 @@ CREATE TABLE `llx_product_stock` ( LOCK TABLES `llx_product_stock` WRITE; /*!40000 ALTER TABLE `llx_product_stock` DISABLE KEYS */; -INSERT INTO `llx_product_stock` VALUES (1,'2012-07-08 22:43:51',2,2,1000,NULL),(3,'2020-01-07 16:25:02',4,2,1007,NULL),(4,'2020-01-08 16:41:18',4,1,13.2,NULL),(5,'2020-01-18 19:17:03',1,1,2.8,NULL),(6,'2015-01-19 17:22:48',11,1,-1,NULL),(7,'2015-01-19 17:31:58',2,1,-2,NULL),(8,'2018-07-30 13:40:39',10,2,75,NULL),(9,'2017-02-16 00:12:09',10,1,35,NULL),(10,'2020-01-13 11:13:19',25,1,15.599999999999994,NULL); +INSERT INTO `llx_product_stock` VALUES (1,'2012-07-08 22:43:51',2,2,1000,NULL),(3,'2020-01-07 16:25:02',4,2,1007,NULL),(4,'2020-01-08 16:41:18',4,1,13.2,NULL),(5,'2020-01-18 19:17:03',1,1,2.8,NULL),(6,'2015-01-19 17:22:48',11,1,-1,NULL),(7,'2015-01-19 17:31:58',2,1,-2,NULL),(8,'2018-07-30 13:40:39',10,2,75,NULL),(9,'2017-02-16 00:12:09',10,1,35,NULL),(10,'2020-01-13 11:13:19',25,1,15.599999999999994,NULL),(11,'2021-04-15 11:40:18',4,20,1,NULL); /*!40000 ALTER TABLE `llx_product_stock` ENABLE KEYS */; UNLOCK TABLES; @@ -12061,6 +11171,7 @@ CREATE TABLE `llx_projet` ( `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `last_main_doc` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `budget_amount` double(24,8) DEFAULT NULL, `date_close` datetime DEFAULT NULL, `fk_user_close` int(11) DEFAULT NULL, @@ -12071,7 +11182,12 @@ CREATE TABLE `llx_projet` ( `usage_opportunity` int(11) DEFAULT 0, `usage_task` int(11) DEFAULT 1, `usage_organize_event` int(11) DEFAULT 0, - `email_msgid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `email_msgid` varchar(175) COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_opp_status_end` int(11) DEFAULT NULL, + `accept_conference_suggestions` int(11) DEFAULT 0, + `accept_booth_suggestions` int(11) DEFAULT 0, + `price_registration` double(24,8) DEFAULT NULL, + `price_booth` double(24,8) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_projet_ref` (`ref`,`entity`), KEY `idx_projet_fk_soc` (`fk_soc`), @@ -12085,7 +11201,7 @@ CREATE TABLE `llx_projet` ( LOCK TABLES `llx_projet` WRITE; /*!40000 ALTER TABLE `llx_projet` DISABLE KEYS */; -INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL),(3,1,'2012-07-09 00:00:00','2020-01-15 12:40:50','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL),(5,NULL,'2012-07-11 00:00:00','2020-01-15 12:27:15','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL),(6,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,12,1,1,1,0,NULL),(7,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0,1,1,0,NULL),(8,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0,1,1,0,NULL),(9,4,'2018-07-31 00:00:00','2019-12-20 16:33:15','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,2,2,27.00,NULL,NULL,NULL,NULL,'2019-12-20 20:33:15',12,4000.00000000,NULL,NULL,0,1,1,0,NULL),(10,1,'2019-12-21 19:46:33','2019-12-21 15:48:06','2019-12-21',NULL,'PJ1912-0005',1,'Contact for a new shop in Delhi','',12,0,1,1,20.00,NULL,NULL,NULL,NULL,NULL,NULL,18000.00000000,NULL,12,0,1,1,0,NULL),(11,10,'2019-12-21 19:49:28','2019-12-21 16:10:21','2019-12-02','2019-12-13','PJ1912-0006',1,'Request for new development of logo','Request to redesign a new logo',12,0,1,4,60.00,NULL,NULL,NULL,NULL,NULL,NULL,6500.00000000,NULL,12,1,1,1,0,NULL),(12,4,'2019-12-21 19:52:12','2019-12-21 15:52:12','2019-12-21',NULL,'PJ1912-0007',1,'Adding new tool for Customer Relationship Management','',12,1,0,1,0.00,NULL,NULL,NULL,NULL,NULL,NULL,16000.00000000,NULL,NULL,1,1,1,0,NULL),(13,26,'2019-12-21 19:53:21','2019-12-21 15:53:59','2019-12-21',NULL,'PJ1912-0008',1,'Cooking 100 apple pie for chrsitmas','',12,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL); +INSERT INTO `llx_projet` VALUES (1,11,'2012-07-09 00:00:00','2017-10-05 20:51:28','2012-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL),(2,13,'2012-07-09 00:00:00','2017-10-05 20:51:51','2012-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL),(3,1,'2012-07-09 00:00:00','2020-01-15 12:40:50','2012-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL),(4,NULL,'2012-07-09 00:00:00','2012-07-08 22:50:49','2012-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,0,NULL,NULL,0,0,NULL,NULL),(5,NULL,'2012-07-11 00:00:00','2020-01-15 12:27:15','2012-07-11','2013-07-14','RMLL',1,'Project management RMLL','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL),(6,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0001',1,'PROJALICE1','The Alice project number 1',12,0,1,2,20.00,NULL,NULL,NULL,NULL,5000.00000000,NULL,NULL,8000.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL),(7,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0002',1,'PROJALICE2','The Alice project number 2',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,'2017-02-01 16:24:31',12,7000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL),(8,10,'2018-07-30 00:00:00','2019-11-28 11:52:54','2018-07-30',NULL,'PJ1607-0003',1,'PROJALICE2','The Alice project number 3',12,0,1,6,100.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3550.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL),(9,4,'2018-07-31 00:00:00','2019-12-20 16:33:15','2018-07-31',NULL,'PJ1607-0004',1,'Project Top X','',12,0,2,2,27.00,NULL,NULL,NULL,NULL,NULL,'2019-12-20 20:33:15',12,4000.00000000,NULL,NULL,0,1,1,0,NULL,NULL,0,0,NULL,NULL),(10,1,'2019-12-21 19:46:33','2019-12-21 15:48:06','2019-12-21',NULL,'PJ1912-0005',1,'Contact for a new shop in Delhi','',12,0,1,1,20.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18000.00000000,NULL,12,0,1,1,0,NULL,NULL,0,0,NULL,NULL),(11,10,'2019-12-21 19:49:28','2019-12-21 16:10:21','2019-12-02','2019-12-13','PJ1912-0006',1,'Request for new development of logo','Request to redesign a new logo',12,0,1,4,60.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6500.00000000,NULL,12,1,1,1,0,NULL,NULL,0,0,NULL,NULL),(12,4,'2019-12-21 19:52:12','2019-12-21 15:52:12','2019-12-21',NULL,'PJ1912-0007',1,'Adding new tool for Customer Relationship Management','',12,1,0,1,0.00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16000.00000000,NULL,NULL,1,1,1,0,NULL,NULL,0,0,NULL,NULL),(13,26,'2019-12-21 19:53:21','2019-12-21 15:53:59','2019-12-21',NULL,'PJ1912-0008',1,'Cooking 100 apple pie for chrsitmas','',12,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,1,0,1,0,NULL,NULL,0,0,NULL,NULL); /*!40000 ALTER TABLE `llx_projet` ENABLE KEYS */; UNLOCK TABLES; @@ -12315,10 +11431,12 @@ CREATE TABLE `llx_propal` ( `datep` date DEFAULT NULL, `fin_validite` datetime DEFAULT NULL, `date_valid` datetime DEFAULT NULL, + `date_signature` datetime DEFAULT NULL, `date_cloture` datetime DEFAULT NULL, `fk_user_author` int(11) DEFAULT NULL, `fk_user_modif` int(11) DEFAULT NULL, `fk_user_valid` int(11) DEFAULT NULL, + `fk_user_signature` int(11) DEFAULT NULL, `fk_user_cloture` int(11) DEFAULT NULL, `fk_statut` smallint(6) NOT NULL DEFAULT 0, `price` double DEFAULT 0, @@ -12326,10 +11444,10 @@ CREATE TABLE `llx_propal` ( `remise_absolue` double DEFAULT 0, `remise` double DEFAULT 0, `total_ht` double(24,8) DEFAULT 0.00000000, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, - `total` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, @@ -12339,6 +11457,7 @@ CREATE TABLE `llx_propal` ( `model_pdf` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_livraison` date DEFAULT NULL, `fk_shipping_method` int(11) DEFAULT NULL, + `fk_warehouse` int(11) DEFAULT NULL, `fk_availability` int(11) DEFAULT NULL, `fk_delivery_address` int(11) DEFAULT NULL, `fk_input_reason` int(11) DEFAULT NULL, @@ -12362,10 +11481,13 @@ CREATE TABLE `llx_propal` ( KEY `idx_propal_fk_projet` (`fk_projet`), KEY `idx_propal_fk_account` (`fk_account`), KEY `idx_propal_fk_currency` (`fk_currency`), + KEY `idx_propal_fk_warehouse` (`fk_warehouse`), + KEY `fk_propal_fk_user_signature` (`fk_user_signature`), CONSTRAINT `fk_propal_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`), CONSTRAINT `fk_propal_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_propal_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), + CONSTRAINT `fk_propal_fk_user_signature` FOREIGN KEY (`fk_user_signature`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) ) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -12376,7 +11498,7 @@ CREATE TABLE `llx_propal` ( LOCK TABLES `llx_propal` WRITE; /*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; -INSERT INTO `llx_propal` VALUES (1,2,NULL,'2020-12-10 12:24:22','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2020-07-09','2020-07-24 12:00:00','2020-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2020-12-10 12:24:22','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2020-07-10','2020-07-25 12:00:00','2020-07-10 02:12:55','2020-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2020-12-10 12:24:22','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2020-07-18','2020-08-02 12:00:00','2020-07-18 11:36:18','2020-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2020-06-12 17:12:08','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2020-02-17','2020-03-04 12:00:00','2019-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2020-06-12 17:12:08','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2020-02-17','2020-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2020-06-12 17:12:08','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2020-02-17','2020-03-04 12:00:00','2019-01-29 21:49:33',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2020-06-12 17:12:08','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2020-02-17','2020-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,4,'2020-12-10 12:24:22','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2020-11-15','2020-11-30 12:00:00','2021-09-27 16:54:30',NULL,12,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf'),(11,1,NULL,'2020-06-12 17:12:08','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:44:58',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2020-12-10 12:24:22','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2020-06-24','2020-07-09 12:00:00','2020-02-16 01:45:44',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2020-06-12 17:12:08','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2020-04-03','2020-04-18 12:00:00','2020-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2020-12-10 12:24:22','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2020-06-19','2020-07-04 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2020-06-12 17:12:08','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2020-06-12 17:12:08','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2020-12-10 12:24:22','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2020-07-23','2020-08-07 12:00:00','2020-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2020-06-12 17:12:08','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2020-02-13','2020-02-28 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2020-06-12 17:12:08','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2020-03-30','2020-04-14 12:00:00','2020-02-16 01:46:15',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2020-12-10 12:24:22','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:15',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2020-12-10 12:24:22','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2020-09-23','2020-10-08 12:00:00','2020-02-16 04:47:09',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2020-12-10 12:24:22','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:15',NULL,1,NULL,1,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf'),(23,12,NULL,'2020-06-12 17:12:08','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2020-04-03','2020-04-18 12:00:00','2019-02-17 16:07:18',NULL,2,NULL,12,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2020-12-10 12:24:22','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:17',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2020-12-10 12:24:22','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2020-07-09','2020-07-24 12:00:00','2020-02-16 01:46:17','2020-02-16 04:47:29',1,NULL,1,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2020-06-12 17:12:08','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2020-04-03','2020-04-18 12:00:00','2019-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2020-12-10 12:24:22','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2020-11-12','2020-11-27 12:00:00','2020-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2020-12-10 12:24:22','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2020-07-30','2020-08-14 12:00:00','2020-02-16 01:46:18','2020-02-16 04:46:31',2,NULL,2,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2020-12-10 12:24:22','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2020-07-23','2020-08-07 12:00:00','2020-02-16 01:46:18','2021-12-20 20:50:23',2,NULL,2,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf'),(30,1,NULL,'2020-06-12 17:12:08','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:18','2019-02-16 04:46:42',2,NULL,2,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2020-12-10 12:24:22','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2020-06-24','2020-07-09 12:00:00','2020-02-16 01:46:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2020-12-10 12:24:22','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2020-11-12','2020-11-27 12:00:00','2020-02-16 01:46:18',NULL,2,NULL,2,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL),(33,10,6,'2020-12-10 12:24:22','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2020-09-27','2020-10-12 12:00:00','2020-09-27 17:08:59',NULL,12,12,12,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf'),(34,10,6,'2020-12-10 12:24:22','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2020-09-27','2020-10-12 12:00:00','2020-09-27 17:13:13','2020-01-07 23:43:06',12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf'),(35,10,NULL,'2020-12-10 12:24:22','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2020-09-27','2020-10-12 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf'),(36,1,NULL,'2020-01-19 13:24:27','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2020-01-01','2020-01-16 12:00:00','2020-01-19 14:24:22','2020-01-19 14:24:27',12,NULL,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf'),(37,10,NULL,'2020-01-05 20:46:07','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2020-01-05','2020-01-20 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf'),(38,30,NULL,'2020-01-13 13:25:28','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2020-01-13','2020-01-28 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf'); +INSERT INTO `llx_propal` VALUES (1,2,NULL,'2020-12-10 12:24:22','PR1007-0001',1,NULL,NULL,'','2012-07-09 01:33:49','2020-07-09','2020-07-24 12:00:00','2020-08-08 14:24:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(2,1,NULL,'2021-04-15 10:22:55','PR1007-0002',1,NULL,NULL,'','2012-07-10 02:11:44','2020-07-10','2020-07-25 12:00:00','2020-07-10 02:12:55','2020-07-20 15:23:12','2020-07-20 15:23:12',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(3,4,NULL,'2021-04-15 10:22:55','PR1007-0003',1,NULL,NULL,'','2012-07-18 11:35:11','2020-07-18','2020-08-02 12:00:00','2020-07-18 11:36:18','2020-07-20 15:21:15','2020-07-20 15:21:15',1,NULL,1,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(5,19,NULL,'2021-04-15 10:22:31','PR1302-0005',1,NULL,NULL,'','2015-02-17 15:39:56','2021-02-17','2021-03-04 12:00:00','2020-11-15 23:27:10',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(6,19,NULL,'2021-04-15 10:22:31','PR1302-0006',1,NULL,NULL,'','2015-02-17 15:40:12','2021-02-17','2021-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(7,19,NULL,'2021-04-15 10:22:31','PR1302-0007',1,NULL,NULL,'','2015-02-17 15:41:15','2021-02-17','2021-03-04 12:00:00','2020-01-29 21:49:33',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,400.00000000,0.00000000,0.00000000,0.00000000,400.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,400.00000000,0.00000000,400.00000000,NULL),(8,19,NULL,'2021-04-15 10:22:31','PR1302-0008',1,NULL,NULL,'','2015-02-17 15:43:39','2021-02-17','2021-03-04 12:00:00',NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1.00000000,0.00000000,0.00000000,0.00000000,NULL),(10,7,4,'2020-12-10 12:24:22','PR1909-0031',1,NULL,NULL,'','2017-11-15 23:37:08','2020-11-15','2020-11-30 12:00:00','2021-09-27 16:54:30',NULL,NULL,12,NULL,12,NULL,NULL,1,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',NULL,NULL,1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0031/PR1909-0031.pdf'),(11,1,NULL,'2020-06-12 17:12:08','PR1702-0009',1,NULL,NULL,'','2017-02-16 01:44:58','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:44:58',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,60.00000000,0.00000000,0.00000000,0.00000000,60.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,60.00000000,0.00000000,60.00000000,NULL),(12,7,NULL,'2020-12-10 12:24:22','PR1702-0010',1,NULL,NULL,'','2017-02-16 01:45:44','2020-06-24','2020-07-09 12:00:00','2020-02-16 01:45:44',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,832.00000000,0.00000000,0.00000000,0.00000000,832.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,832.00000000,0.00000000,832.00000000,NULL),(13,26,NULL,'2021-04-15 10:22:31','PR1702-0011',1,NULL,NULL,'','2017-02-16 01:46:15','2021-04-03','2020-04-18 12:00:00','2021-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,242.00000000,0.00000000,0.00000000,0.00000000,242.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,242.00000000,0.00000000,242.00000000,NULL),(14,3,NULL,'2020-12-10 12:24:22','PR1702-0012',1,NULL,NULL,'','2017-02-16 01:46:15','2020-06-19','2020-07-04 12:00:00','2020-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,245.00000000,0.00000000,0.00000000,0.00000000,245.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,245.00000000,0.00000000,245.00000000,NULL),(15,26,NULL,'2020-06-12 17:12:08','PR1702-0013',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,940.00000000,0.00000000,0.00000000,0.00000000,940.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,940.00000000,0.00000000,940.00000000,NULL),(16,1,NULL,'2020-06-12 17:12:08','PR1702-0014',1,NULL,NULL,'','2017-02-16 01:46:15','2020-05-13','2020-05-28 12:00:00','2020-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,125.00000000,0.00000000,0.00000000,0.00000000,125.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,125.00000000,0.00000000,125.00000000,NULL),(17,1,NULL,'2020-12-10 12:24:22','PR1702-0015',1,NULL,NULL,'','2017-02-16 01:46:15','2020-07-23','2020-08-07 12:00:00','2020-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,163.00000000,0.00000000,0.00000000,0.00000000,163.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,163.00000000,0.00000000,163.00000000,NULL),(18,26,NULL,'2021-04-15 10:22:31','PR1702-0016',1,NULL,NULL,'','2017-02-16 01:46:15','2021-02-13','2021-02-28 12:00:00','2021-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,900.00000000,0.00000000,0.00000000,0.00000000,900.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,900.00000000,0.00000000,900.00000000,NULL),(19,12,NULL,'2021-04-15 10:22:31','PR1702-0017',1,NULL,NULL,'','2017-02-16 01:46:15','2021-03-30','2021-04-14 12:00:00','2021-02-16 01:46:15',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,200.00000000,0.00000000,200.00000000,NULL),(20,26,NULL,'2020-12-10 12:24:22','PR1702-0018',1,NULL,NULL,'','2017-02-16 01:46:15','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,830.00000000,0.00000000,0.00000000,0.00000000,830.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,830.00000000,0.00000000,830.00000000,NULL),(21,1,NULL,'2020-12-10 12:24:22','PR1702-0019',1,NULL,NULL,'','2017-02-16 01:46:15','2020-09-23','2020-10-08 12:00:00','2020-02-16 04:47:09',NULL,NULL,1,NULL,12,NULL,NULL,1,0,NULL,NULL,0,89.00000000,0.00000000,0.00000000,0.00000000,89.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,89.00000000,0.00000000,89.00000000,NULL),(22,26,NULL,'2020-12-10 12:24:22','PR1702-0020',1,NULL,NULL,'','2017-02-16 01:46:15','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:15',NULL,NULL,1,NULL,1,NULL,NULL,0,0,NULL,NULL,0,70.00000000,0.00000000,0.00000000,0.00000000,70.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,70.00000000,0.00000000,70.00000000,'propale/PR1702-0020/PR1702-0020.pdf'),(23,12,NULL,'2021-04-15 10:22:31','PR1702-0021',1,NULL,NULL,'','2017-02-16 01:46:17','2021-04-03','2020-04-18 12:00:00','2020-02-17 16:07:18',NULL,NULL,2,NULL,12,NULL,NULL,1,0,NULL,NULL,0,715.00000000,0.00000000,0.00000000,0.00000000,715.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,715.00000000,0.00000000,715.00000000,NULL),(24,7,NULL,'2020-12-10 12:24:22','PR1702-0022',1,NULL,NULL,'','2017-02-16 01:46:17','2020-11-13','2020-11-28 12:00:00','2020-02-16 01:46:17',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,250.00000000,0.00000000,250.00000000,NULL),(25,3,NULL,'2021-04-15 10:22:55','PR1702-0023',1,NULL,NULL,'','2017-02-16 01:46:17','2020-07-09','2020-07-24 12:00:00','2020-02-16 01:46:17','2020-02-16 04:47:29','2020-02-16 04:47:29',1,NULL,1,12,12,4,0,NULL,NULL,0,1018.00000000,0.00000000,0.00000000,0.00000000,1018.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1018.00000000,0.00000000,1018.00000000,NULL),(26,1,NULL,'2021-04-15 10:22:31','PR1702-0024',1,NULL,NULL,'','2017-02-16 01:46:17','2021-04-03','2020-04-18 12:00:00','2020-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,710.00000000,0.00000000,0.00000000,0.00000000,710.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,710.00000000,0.00000000,710.00000000,NULL),(27,6,NULL,'2020-12-10 12:24:22','PR1702-0025',1,NULL,NULL,'','2017-02-16 01:46:18','2020-11-12','2020-11-27 12:00:00','2020-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,300.00000000,0.00000000,0.00000000,0.00000000,300.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,300.00000000,0.00000000,300.00000000,NULL),(28,19,NULL,'2021-04-15 10:22:55','PR1702-0026',1,NULL,NULL,'','2017-02-16 01:46:18','2020-07-30','2020-08-14 12:00:00','2020-02-16 01:46:18','2020-02-16 04:46:31','2020-02-16 04:46:31',2,NULL,2,12,12,2,0,NULL,NULL,0,440.00000000,0.00000000,0.00000000,0.00000000,440.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,440.00000000,0.00000000,440.00000000,NULL),(29,1,NULL,'2021-04-15 10:22:55','PR1702-0027',1,NULL,NULL,'','2017-02-16 01:46:18','2020-07-23','2020-08-07 12:00:00','2020-02-16 01:46:18','2021-12-20 20:50:23','2021-12-20 20:50:23',2,NULL,2,12,12,2,0,NULL,NULL,0,1000.00000000,0.00000000,0.00000000,0.00000000,1000.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1000.00000000,0.00000000,1000.00000000,'propale/PR1702-0027/PR1702-0027.pdf'),(30,1,NULL,'2021-04-15 10:22:55','PR1702-0028',1,NULL,NULL,'','2017-02-16 01:46:18','2020-05-01','2020-05-16 12:00:00','2019-02-16 01:46:18','2019-02-16 04:46:42','2019-02-16 04:46:42',2,NULL,2,12,12,3,0,NULL,NULL,0,1200.00000000,0.00000000,0.00000000,0.00000000,1200.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,1200.00000000,0.00000000,1200.00000000,NULL),(31,11,NULL,'2020-12-10 12:24:22','PR1702-0029',1,NULL,NULL,'','2017-02-16 01:46:18','2020-06-24','2020-07-09 12:00:00','2020-02-16 01:46:18',NULL,NULL,1,NULL,1,NULL,NULL,1,0,NULL,NULL,0,720.00000000,0.00000000,0.00000000,0.00000000,720.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,720.00000000,0.00000000,720.00000000,NULL),(32,19,NULL,'2020-12-10 12:24:22','PR1702-0030',1,NULL,NULL,'','2017-02-16 01:46:18','2020-11-12','2020-11-27 12:00:00','2020-02-16 01:46:18',NULL,NULL,2,NULL,2,NULL,NULL,1,0,NULL,NULL,0,608.00000000,0.00000000,0.00000000,0.00000000,608.00000000,NULL,NULL,3,3,'','','',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',0,'EUR',1.00000000,608.00000000,0.00000000,608.00000000,NULL),(33,10,6,'2020-12-10 12:24:22','PR1909-0032',1,NULL,NULL,'','2019-09-27 17:07:40','2020-09-27','2020-10-12 12:00:00','2020-09-27 17:08:59',NULL,NULL,12,12,12,NULL,NULL,1,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'This is a private note','This is a public note','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/PR1909-0032/PR1909-0032.pdf'),(34,10,6,'2021-04-15 10:22:55','PR1909-0033',1,NULL,NULL,'','2019-09-27 17:11:21','2020-09-27','2020-10-12 12:00:00','2020-09-27 17:13:13','2020-01-07 23:43:06','2020-01-07 23:43:06',12,12,12,12,12,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,NULL,'a & a
\r\nb < r','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/PR1909-0033/PR1909-0033.pdf'),(35,10,NULL,'2020-12-10 12:24:22','(PROV35)',1,NULL,NULL,'','2019-09-27 17:53:44','2020-09-27','2020-10-12 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,5.00000000,0.00000000,5.00000000,'propale/(PROV35)/(PROV35).pdf'),(36,1,NULL,'2021-04-15 10:22:55','PR2001-0034',1,NULL,NULL,'','2020-01-01 23:55:35','2021-01-01','2021-01-16 12:00:00','2021-01-19 14:24:22','2021-01-19 14:24:27','2021-01-19 14:24:27',12,NULL,12,12,12,2,0,NULL,NULL,0,4.00000000,0.24000000,0.00000000,0.00000000,4.24000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,4.00000000,0.24000000,4.24000000,'propale/PR2001-0034/PR2001-0034.pdf'),(37,10,NULL,'2021-04-15 10:22:31','(PROV37)',1,NULL,NULL,'','2020-01-06 00:44:16','2021-01-05','2021-01-20 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,10.00000000,0.00000000,10.00000000,'propale/(PROV37)/(PROV37).pdf'),(38,30,NULL,'2021-04-15 10:22:31','(PROV38)',1,NULL,NULL,'','2020-01-13 17:25:28','2021-01-13','2021-01-28 12:00:00',NULL,NULL,NULL,12,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','azur',NULL,NULL,NULL,0,NULL,0,NULL,NULL,0,'',1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,'propale/(PROV38)/(PROV38).pdf'); /*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; UNLOCK TABLES; @@ -12527,247 +11649,6 @@ LOCK TABLES `llx_propaldet_extrafields` WRITE; /*!40000 ALTER TABLE `llx_propaldet_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_rec_dossier` --- - -DROP TABLE IF EXISTS `llx_rec_dossier`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_dossier` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT 0, - `fk_soc` int(11) NOT NULL DEFAULT 0, - `fk_user` int(11) NOT NULL DEFAULT 0, - `fk_procedure` int(11) NOT NULL DEFAULT 0, - `fk_etape` int(11) NOT NULL DEFAULT 0, - `ref` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `statut` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `commentaire` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `date_last_etape` datetime DEFAULT NULL, - `date_start` datetime DEFAULT NULL, - `date_end` datetime DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_dossier` --- - -LOCK TABLES `llx_rec_dossier` WRITE; -/*!40000 ALTER TABLE `llx_rec_dossier` DISABLE KEYS */; -INSERT INTO `llx_rec_dossier` VALUES (1,'2019-10-08 17:06:17','2019-10-08 17:15:15',1,404,12,1,1,'REC1910-0001','OPEN','','2019-10-08 17:13:53','2019-10-08 17:06:17',NULL),(2,'2019-10-08 17:06:17','2019-10-08 17:13:44',1,1,12,1,1,'REC1910-0002','OPEN','','2019-10-08 17:13:44','2019-10-08 17:06:17',NULL); -/*!40000 ALTER TABLE `llx_rec_dossier` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_dossier_facture` --- - -DROP TABLE IF EXISTS `llx_rec_dossier_facture`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_dossier_facture` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_dossier` int(11) NOT NULL DEFAULT 0, - `fk_facture` int(11) NOT NULL DEFAULT 0, - `paye` int(11) NOT NULL DEFAULT 0, - `filepath` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_dossier` (`fk_dossier`), - KEY `fk_facture` (`fk_facture`), - KEY `paye` (`paye`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_dossier_facture` --- - -LOCK TABLES `llx_rec_dossier_facture` WRITE; -/*!40000 ALTER TABLE `llx_rec_dossier_facture` DISABLE KEYS */; -INSERT INTO `llx_rec_dossier_facture` VALUES (1,'2019-10-08 17:06:17','2019-10-08 17:15:15',1,780,0,'/home/ldestailleur/git/dolibarr/documents/facture/FA1504-0251/FA1504-0251.pdf'),(2,'2019-10-08 17:06:17','2019-10-08 17:13:44',2,55,0,'/home/ldestailleur/git/dolibarr/documents/facture/FA1212-0009/FA1212-0009.pdf'),(3,'2019-10-08 17:06:39','2019-10-08 17:13:44',2,149,0,'/home/ldestailleur/git/dolibarr/documents/facture/FA1601-0024/FA1601-0024.pdf'); -/*!40000 ALTER TABLE `llx_rec_dossier_facture` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_etape` --- - -DROP TABLE IF EXISTS `llx_rec_etape`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_etape` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_procedure` int(11) NOT NULL DEFAULT 0, - `rang` int(11) NOT NULL DEFAULT 0, - `delais` int(11) NOT NULL DEFAULT 0, - `ref` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `name` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `fk_action` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `titre_mail` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `bcc_mail` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `tpl_doc` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `description` longtext CHARACTER SET latin1 DEFAULT NULL, - `body_mail` longtext CHARACTER SET latin1 DEFAULT NULL, - `fk_service` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_procedure` (`fk_procedure`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_etape` --- - -LOCK TABLES `llx_rec_etape` WRITE; -/*!40000 ALTER TABLE `llx_rec_etape` DISABLE KEYS */; -INSERT INTO `llx_rec_etape` VALUES (1,'2019-10-08 17:00:47','2019-10-08 17:11:23',1,1,0,'','etape 1 a','mail','aaa','','','aaa','aaaaa',0),(2,'2019-10-08 17:01:50','2019-10-08 17:10:56',1,2,2,'','Etape 2','doc','','','2-tpl_lettre (1).odt','','',0); -/*!40000 ALTER TABLE `llx_rec_etape` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_etape_document` --- - -DROP TABLE IF EXISTS `llx_rec_etape_document`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_etape_document` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_etape` int(11) NOT NULL DEFAULT 0, - `fk_document` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_etape` (`fk_etape`), - KEY `fk_document` (`fk_document`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_etape_document` --- - -LOCK TABLES `llx_rec_etape_document` WRITE; -/*!40000 ALTER TABLE `llx_rec_etape_document` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_rec_etape_document` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_etape_history` --- - -DROP TABLE IF EXISTS `llx_rec_etape_history`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_etape_history` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_dossier` int(11) NOT NULL DEFAULT 0, - `fk_etape` int(11) NOT NULL DEFAULT 0, - `fk_commaction` int(11) NOT NULL DEFAULT 0, - `date_etape` datetime DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_dossier` (`fk_dossier`), - KEY `fk_etape` (`fk_etape`), - KEY `fk_commaction` (`fk_commaction`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_etape_history` --- - -LOCK TABLES `llx_rec_etape_history` WRITE; -/*!40000 ALTER TABLE `llx_rec_etape_history` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_rec_etape_history` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_prerelance` --- - -DROP TABLE IF EXISTS `llx_rec_prerelance`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_prerelance` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_model` int(11) NOT NULL DEFAULT 0, - `nb_day` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_model` (`fk_model`), - KEY `nb_day` (`nb_day`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_prerelance` --- - -LOCK TABLES `llx_rec_prerelance` WRITE; -/*!40000 ALTER TABLE `llx_rec_prerelance` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_rec_prerelance` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_rec_procedure` --- - -DROP TABLE IF EXISTS `llx_rec_procedure`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_rec_procedure` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT 0, - `active` int(11) NOT NULL DEFAULT 0, - `name` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `description` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `is_default` int(11) NOT NULL DEFAULT 0, - `allow_free_events` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `entity` (`entity`), - KEY `active` (`active`), - KEY `is_default` (`is_default`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_rec_procedure` --- - -LOCK TABLES `llx_rec_procedure` WRITE; -/*!40000 ALTER TABLE `llx_rec_procedure` DISABLE KEYS */; -INSERT INTO `llx_rec_procedure` VALUES (1,'2019-10-08 17:00:22','2019-10-08 17:01:26',1,0,'Recouvrement standar','aaa',1,0); -/*!40000 ALTER TABLE `llx_rec_procedure` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_reception` -- @@ -12819,7 +11700,7 @@ CREATE TABLE `llx_reception` ( CONSTRAINT `fk_reception_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_reception_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_reception_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12828,6 +11709,7 @@ CREATE TABLE `llx_reception` ( LOCK TABLES `llx_reception` WRITE; /*!40000 ALTER TABLE `llx_reception` DISABLE KEYS */; +INSERT INTO `llx_reception` VALUES (1,'2021-04-15 11:41:05','RCP2104-0001',1,1,10,NULL,NULL,NULL,'2021-04-15 08:40:04',12,NULL,'2021-04-15 08:40:18',12,'2021-04-23 00:00:00',NULL,NULL,'',1,0,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,0,'',NULL,NULL); /*!40000 ALTER TABLE `llx_reception` ENABLE KEYS */; UNLOCK TABLES; @@ -12885,7 +11767,7 @@ CREATE TABLE `llx_recruitment_recruitmentcandidature` ( `remuneration_requested` int(11) DEFAULT NULL, `remuneration_proposed` int(11) DEFAULT NULL, `fk_recruitment_origin` int(11) DEFAULT NULL, - `email_msgid` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, + `email_msgid` varchar(175) CHARACTER SET utf8mb4 DEFAULT NULL, `entity` int(11) NOT NULL DEFAULT 1, `date_birth` date DEFAULT NULL, PRIMARY KEY (`rowid`), @@ -12895,7 +11777,7 @@ CREATE TABLE `llx_recruitment_recruitmentcandidature` ( KEY `llx_recruitment_recruitmentcandidature_fk_user_creat` (`fk_user_creat`), KEY `idx_recruitment_recruitmentcandidature_status` (`status`), CONSTRAINT `llx_recruitment_recruitmentcandidature_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -12904,6 +11786,7 @@ CREATE TABLE `llx_recruitment_recruitmentcandidature` ( LOCK TABLES `llx_recruitment_recruitmentcandidature` WRITE; /*!40000 ALTER TABLE `llx_recruitment_recruitmentcandidature` DISABLE KEYS */; +INSERT INTO `llx_recruitment_recruitmentcandidature` VALUES (118,3,'(PROV118)','',NULL,NULL,'2021-04-15 07:28:32','2021-04-15 10:28:32',12,NULL,NULL,NULL,0,'Stud','Studson','student1@myschool.com','',20000,NULL,NULL,NULL,1,'2005-04-15'),(119,4,'(PROV119)','',NULL,NULL,'2021-04-15 07:29:26','2021-04-15 10:29:26',12,NULL,NULL,NULL,3,'Garfield','Erika','egarfield@example.com','',40000,NULL,NULL,NULL,1,'1990-04-15'); /*!40000 ALTER TABLE `llx_recruitment_recruitmentcandidature` ENABLE KEYS */; UNLOCK TABLES; @@ -13025,152 +11908,6 @@ INSERT INTO `llx_recruitment_recruitmentjobposition_extrafields` VALUES (6,'2020 /*!40000 ALTER TABLE `llx_recruitment_recruitmentjobposition_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_referenceletters` --- - -DROP TABLE IF EXISTS `llx_referenceletters`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_referenceletters` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `title` varchar(100) CHARACTER SET utf8mb4 NOT NULL, - `element_type` varchar(50) CHARACTER SET utf8mb4 NOT NULL, - `use_custom_header` int(11) NOT NULL DEFAULT 0, - `header` text CHARACTER SET utf8mb4 DEFAULT NULL, - `use_custom_footer` int(11) NOT NULL DEFAULT 0, - `footer` text CHARACTER SET utf8mb4 DEFAULT NULL, - `use_landscape_format` int(11) NOT NULL DEFAULT 0, - `status` int(11) NOT NULL DEFAULT 1, - `default_doc` int(11) NOT NULL DEFAULT 0, - `import_key` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `fk_user_author` int(11) NOT NULL, - `datec` datetime NOT NULL, - `fk_user_mod` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_referenceletters` --- - -LOCK TABLES `llx_referenceletters` WRITE; -/*!40000 ALTER TABLE `llx_referenceletters` DISABLE KEYS */; -INSERT INTO `llx_referenceletters` VALUES (1,1,'Exemple de modèle de PROPOSITION','propal',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISEProposition commerciale
\n Réf. : {object_ref}

\n Date : {object_date}
\n Date de fin de validité : {object_date_end}
\n Code client : {cust_company_customercode}
\n {objets_lies}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
\n',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(2,1,'Exemple de modèle de FACTURE','invoice',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISEFacture
\n Réf. : {object_ref}

\n Date facturation : {object_date}
\n Date échéance : {object_date_limit}
\n Code client : {cust_company_customercode}
\n {objets_lies}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(3,1,'Exemple de modèle de COMMANDE','order',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISECommande
\n Réf. : {object_ref}

\n Date de commande : {object_date}
\n {objets_lies}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(4,1,'Exemple de modèle de CONTRAT','contract',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISEFiche contrat
\n Réf. : {object_ref}

\n Date : {object_date_creation}
\n Code client : {cust_company_customercode}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(5,1,'Exemple de modèle de DEMANDE DE PRIX','supplier_proposal',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISEDemande de prix
\n Réf. : {object_ref}

\n Code fournisseur : : {cust_company_suppliercode}
\n {objets_lies}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(6,1,'Exemple de modèle de COMMANDE FOURNISSEUR','order_supplier',1,' 
\n
\n \n\n \n \n \n \n \n \n
MON LOGO ENTREPRISECommande fournisseur {object_ref}
\n Réf. : {objvar_object_ref_supplier}

\n Date prèvue de livraison : {object_date_delivery_planed}
\n Code fournisseur : : {cust_company_suppliercode}
\n {objets_lies}
',1,'

\n{mycompany_juridicalstatus} - SIRET : {mycompany_idprof2}
\nNAF-APE : {mycompany_idprof3} - Num VA : {mycompany_vatnumber}

\n 
\n',0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'); -/*!40000 ALTER TABLE `llx_referenceletters` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_referenceletters_chapters` --- - -DROP TABLE IF EXISTS `llx_referenceletters_chapters`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_referenceletters_chapters` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `fk_referenceletters` int(11) NOT NULL, - `lang` varchar(5) CHARACTER SET utf8mb4 NOT NULL DEFAULT '', - `sort_order` int(11) NOT NULL DEFAULT 1, - `title` varchar(100) CHARACTER SET utf8mb4 NOT NULL, - `content_text` text CHARACTER SET utf8mb4 DEFAULT NULL, - `options_text` text CHARACTER SET utf8mb4 DEFAULT NULL, - `readonly` int(11) NOT NULL DEFAULT 0, - `same_page` int(11) NOT NULL DEFAULT 0, - `status` int(11) NOT NULL DEFAULT 1, - `import_key` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `fk_user_author` int(11) NOT NULL, - `datec` datetime NOT NULL, - `fk_user_mod` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - PRIMARY KEY (`rowid`), - KEY `idx_referenceletters_chapters_fk_referenceletters` (`fk_referenceletters`), - CONSTRAINT `ibfk_referenceletters_chapters_fk_referenceletters` FOREIGN KEY (`fk_referenceletters`) REFERENCES `llx_referenceletters` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_referenceletters_chapters` --- - -LOCK TABLES `llx_referenceletters_chapters` WRITE; -/*!40000 ALTER TABLE `llx_referenceletters_chapters` DISABLE KEYS */; -INSERT INTO `llx_referenceletters_chapters` VALUES (1,1,1,'fr_FR',1,'Header','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(2,1,1,'fr_FR',2,'Lines',' 
 
Montants exprimés en Euros
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DésignationTVAP.U. HTQtéRéduc.Total HT[!-- BEGIN lines --]
{line_fulldesc}{line_vatrate}{line_up_locale}{line_qty}{line_discount_percent}{line_price_ht_locale}[!-- END lines --]
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(3,1,1,'fr_FR',3,'Footer',' 
\n 
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Conditions de règlement : {objvar_object_cond_reglement_doc}
\n Mode de règlement : {objvar_object_mode_reglement}
Total HT{objvar_object_total_ht}
{tva_detail_titres}{tva_detail_montants}
Total TTC{objvar_object_total_ttc}
\n 
\n 
\n \n\n \n \n \n \n \n \n
 
\n Cachet, Date, Signature et mention "Bon pour accord"
\n  \n \n \n \n \n \n \n
 
\n
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(4,1,2,'fr_FR',1,'Header','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(5,1,2,'fr_FR',2,'Lines','
Montants exprimés en Euros
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DésignationTVAP.U. HTQtéRéduc.Total HT[!-- BEGIN lines --]
{line_fulldesc}{line_vatrate}{line_up_locale}{line_qty}{line_discount_percent}{line_price_ht_locale}[!-- END lines --]
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(6,1,2,'fr_FR',3,'Footer',' \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Conditions de règlement : {objvar_object_cond_reglement_doc}
\n Mode de règlement : {objvar_object_mode_reglement}
Total HT{objvar_object_total_ht}
{tva_detail_titres}{tva_detail_montants}
Total TTC{objvar_object_total_ttc}
Payé{deja_paye}
Avoirs{somme_avoirs}
Reste à payer{reste_a_payer}
\n 
\n 
\n\n \n \n \n \n \n \n
  \n \n \n \n \n \n \n
{liste_paiements}
\n
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(7,1,3,'fr_FR',1,'Contenu','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(8,1,3,'fr_FR',2,'Lines','
Montants exprimés en Euros
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DésignationTVAP.U. HTQtéRéduc.Total HT[!-- BEGIN lines --]
{line_fulldesc}{line_vatrate}{line_up_locale}{line_qty}{line_discount_percent}{line_price_ht_locale}[!-- END lines --]
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(9,1,3,'fr_FR',3,'Footer',' \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Conditions de règlement : {objvar_object_cond_reglement_doc}
\n Mode de règlement : {objvar_object_mode_reglement}
Total HT{objvar_object_total_ht}
{tva_detail_titres}{tva_detail_montants}
Total TTC{objvar_object_total_ttc}
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(10,1,4,'fr_FR',1,'Contenu','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(11,1,4,'fr_FR',2,'Lines','\n \n \n \n \n \n
[!-- BEGIN lines --]{line_product_ref} - {line_product_label}
\n Quantité : {line_qty} - Prix unitaire : {line_price_ht_locale}
\n Date début prévue : {date_ouverture_prevue} - Date prévue fin de service : {date_fin_validite}
\n Date début : {date_ouverture}
\n {line_desc}
\n
\n [!-- END lines --]
\n 
\n 
\n
\n
\n
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(12,1,4,'fr_FR',3,'Footer','\n \n \n \n \n \n \n

\n Pour {mycompany_name}, nom et signature :
\n  \n \n \n \n \n \n \n
 
\n

\n Pour {cust_company_name}, nom et signature :
\n  \n \n \n \n \n \n \n
 
\n
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(13,1,5,'fr_FR',1,'Contenu','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(14,1,5,'fr_FR',2,'Lines','
Montants exprimés en Euros
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DésignationTVAP.U. HTQtéTotal HT[!-- BEGIN lines --]
{line_fulldesc}{line_qty}[!-- END lines --]
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(15,1,5,'fr_FR',3,'Footer','\n \n \n \n \n \n
Date prèvue de livraison : {object_date_livraison}
\n Mode de règlement : {objvar_object_mode_reglement}
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(16,1,6,'fr_FR',1,'Contenu','\n \n \n \n \n \n \n
Emetteur :
\n  \n \n \n \n \n \n \n

\n {mycompany_name}
\n {object_contactsale}
\n {mycompany_address}
\n {mycompany_zip} {mycompany_town}
\n
\n Tél. : {mycompany_phone} - Fax : {mycompany_fax}
\n Email : {mycompany_email}
\n Web : {mycompany_web}
\n
Adressé à :
\n  \n \n \n \n \n \n \n

\n {cust_company_name}
\n {cust_contactclient}
\n {cust_contactclientfact}
\n {cust_company_address}
\n {cust_company_zip} {cust_company_town}
\n
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(17,1,6,'fr_FR',2,'Lines','
Montants exprimés en Euros
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
DésignationTVAP.U. HTQtéRéduc.Total HT[!-- BEGIN lines --]
{line_fulldesc}{line_vatrate}{line_up_locale}{line_qty}{line_discount_percent}{line_price_ht_locale}[!-- END lines --]
\n 
\n 
',NULL,0,0,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'),(18,1,6,'fr_FR',3,'Footer',' \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Conditions de règlement : {object_payment_term}
\n Mode de règlement : {object_payment_mode}
Total HT{objvar_object_total_ht}
{tva_detail_titres}{tva_detail_montants}
Total TTC{objvar_object_total_ttc}
',NULL,0,1,0,NULL,12,'2019-10-18 09:59:56',12,'2019-10-18 07:59:56'); -/*!40000 ALTER TABLE `llx_referenceletters_chapters` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_referenceletters_elements` --- - -DROP TABLE IF EXISTS `llx_referenceletters_elements`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_referenceletters_elements` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT 1, - `ref_int` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL, - `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `outputref` int(11) NOT NULL DEFAULT 1, - `fk_referenceletters` int(11) NOT NULL, - `element_type` varchar(50) CHARACTER SET utf8mb4 NOT NULL, - `fk_element` int(11) NOT NULL, - `content_letter` text CHARACTER SET utf8mb4 DEFAULT NULL, - `import_key` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL, - `fk_user_author` int(11) NOT NULL, - `datec` datetime NOT NULL, - `fk_user_mod` int(11) NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `use_custom_header` int(11) NOT NULL DEFAULT 0, - `header` text CHARACTER SET utf8mb4 DEFAULT NULL, - `use_custom_footer` int(11) NOT NULL DEFAULT 0, - `footer` text CHARACTER SET utf8mb4 DEFAULT NULL, - `use_landscape_format` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `idx_referenceletters_elements_fk_referenceletters` (`fk_referenceletters`), - CONSTRAINT `ibfk_referenceletters_elements_fk_referenceletters` FOREIGN KEY (`fk_referenceletters`) REFERENCES `llx_referenceletters` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_referenceletters_elements` --- - -LOCK TABLES `llx_referenceletters_elements` WRITE; -/*!40000 ALTER TABLE `llx_referenceletters_elements` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_referenceletters_elements` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_referenceletters_extrafields` --- - -DROP TABLE IF EXISTS `llx_referenceletters_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_referenceletters_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) CHARACTER SET utf8mb4 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idxreferenceletters_extrafields` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_referenceletters_extrafields` --- - -LOCK TABLES `llx_referenceletters_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_referenceletters_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_referenceletters_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_resource` -- @@ -13269,106 +12006,52 @@ CREATE TABLE `llx_rights_def` ( LOCK TABLES `llx_rights_def` WRITE; /*!40000 ALTER TABLE `llx_rights_def` DISABLE KEYS */; -INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0,0,0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,0,0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,0,0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,0,0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,0,0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,0,0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,0,0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',1,'propal_advance','close','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',2,'propal_advance','close','d',0,22,0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1,14,0),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0),(81,'Read sales orders','commande',1,'lire',NULL,'r',0,0,0),(82,'Creeat/modify sales orders','commande',1,'creer',NULL,'w',0,0,0),(84,'Validate sales orders','commande',1,'order_advance','validate','d',0,0,0),(86,'Send sale orders by email','commande',1,'order_advance','send','d',0,0,0),(87,'Close sale orders','commande',1,'order_advance','close','d',0,0,0),(88,'Cancel sale orders','commande',1,'order_advance','annuler','d',0,0,0),(89,'Delete sales orders','commande',1,'supprimer',NULL,'d',0,0,0),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,0,0),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,0,0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,0,0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,0,0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,0,0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,0,0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',0,51,0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,51,0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,51,0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0),(121,'Read third parties','societe',1,'lire',NULL,'r',0,0,0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,0,0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,0,0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0),(126,'Export third parties','societe',1,'export',NULL,'r',0,0,0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0,0,0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0,0,0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0,0,0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0,0,0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0,0,0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0,0,0),(262,'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,0,0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1,9,0),(281,'Read contacts','societe',1,'contact','lire','r',0,0,0),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0),(282,'Create and update contact','societe',1,'contact','creer','w',0,0,0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,0,0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0),(286,'Export contacts','societe',1,'contact','export','d',0,0,0),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0,0,0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0,0,0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0,0,0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0,0,0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0,0,0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0,0,0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0,0,0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0,0,0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0,0,0),(511,'Read payments of employee salaries (yours and your subordinates)','salaries',1,'read',NULL,'r',0,0,0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,0,0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,0,0),(517,'Read payments of salariests of every employee','salaries',1,'readall',NULL,'r',0,0,0),(519,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,0,0),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0),(531,'Read services','service',1,'lire',NULL,'r',0,0,0),(532,'Create/modify services','service',1,'creer',NULL,'w',0,0,0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,0,0),(538,'Export services','service',1,'export',NULL,'r',0,0,0),(561,'Read bank transfer payment orders','paymentbybanktransfer',1,'read',NULL,'r',0,0,0),(562,'Create/modify a bank transfer payment order','paymentbybanktransfer',1,'create',NULL,'w',0,0,0),(563,'Send/Transmit bank transfer payment order','paymentbybanktransfer',1,'send',NULL,'a',0,0,0),(564,'Record Debits/Rejects of bank transfer payment order','paymentbybanktransfer',1,'debit',NULL,'a',0,0,0),(650,'Read bom of Bom','bom',1,'read',NULL,'w',0,60,0),(651,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,60,0),(652,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,60,0),(660,'Read objects of Mrp','mrp',1,'read',NULL,'w',0,62,0),(661,'Create/Update objects of Mrp','mrp',1,'write',NULL,'w',0,62,0),(662,'Delete objects of Mrp','mrp',1,'delete',NULL,'w',0,62,0),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0),(750,'Read job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','read','w',0,0,0),(751,'Create/Update job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','write','w',0,0,0),(752,'Delete Job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','delete','w',0,0,0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',0,0,0),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,0,0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,0,0),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,0,0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,0,0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',0,0,0),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,0,0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,0,0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0),(1101,'Read delivery receipts','expedition',1,'delivery','lire','r',0,0,0),(1102,'Create/modify delivery receipts','expedition',1,'delivery','creer','w',0,0,0),(1104,'Validate delivery receipts','expedition',1,'delivery_advance','validate','d',0,0,0),(1109,'Delete delivery receipts','expedition',1,'delivery','supprimer','d',0,0,0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,0,0),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,0,0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,0,0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,0,0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,0,0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,0,0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,0,0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,0,0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,0,0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,0,0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,0,0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,0,0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,0,0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,0,0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,0,0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,0,0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,0,0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,0,0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,0,0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,0,0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,0,0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,0,0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,0,0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,0,0),(1421,'Export sales orders and attributes','commande',1,'commande','export','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,0,0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,0,0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,0,0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,0,0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,0,0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,0,0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,0,0),(2501,'Read or download documents','ecm',1,'read',NULL,'r',0,0,0),(2503,'Upload a document','ecm',1,'upload',NULL,'w',0,0,0),(2515,'Administer directories of documents','ecm',1,'setup',NULL,'w',0,0,0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0,0,0),(10001,'Read website content','website',1,'read',NULL,'w',0,0,0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,0,0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,0,0),(10005,'Delete website content','website',1,'delete',NULL,'w',0,0,0),(20001,'Read leave requests (yours and your subordinates)','holiday',1,'read',NULL,'w',0,0,0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0),(20002,'Create/modify leave requests','holiday',1,'write',NULL,'w',0,0,0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,0,0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0),(20004,'Read leave requests for everybody','holiday',1,'readall',NULL,'w',0,0,0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0),(20005,'Create/modify leave requests for everybody','holiday',1,'writeall_advance',NULL,'w',0,0,0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,0,0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,0,0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,0,0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,0,0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,0,0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,0,0),(50151,'Use Point Of Sale','takepos',1,'run',NULL,'a',0,0,0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,0,0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,0,0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,60,0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,60,0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,60,0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,60,0),(56005,'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)','ticket',1,'view','all','r',0,60,0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0),(63001,'Read resources','resource',1,'read',NULL,'w',0,0,0),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,0,0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,0,0),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,0,0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0),(941601,'Lire les receptions','reception',1,'lire',NULL,'r',0,0,0),(941602,'Creer modifier les receptions','reception',1,'creer',NULL,'w',0,0,0),(941603,'Valider les receptions','reception',1,'reception_advance','validate','d',0,0,0),(941604,'Envoyer les receptions aux clients','reception',1,'reception_advance','send','d',0,0,0),(941605,'Exporter les receptions','reception',1,'reception','export','r',0,0,0),(941606,'Supprimer les receptions','reception',1,'supprimer',NULL,'d',0,0,0); +INSERT INTO `llx_rights_def` VALUES (11,'Read invoices','facture',1,'lire',NULL,'a',0,11,0),(11,'Lire les factures','facture',2,'lire',NULL,'a',1,10,0),(12,'Create and update invoices','facture',1,'creer',NULL,'a',0,11,0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0,10,0),(13,'Devalidate invoices','facture',1,'invoice_advance','unvalidate','a',0,11,0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0,10,0),(14,'Validate invoices','facture',1,'invoice_advance','validate','a',0,11,0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0,10,0),(15,'Send invoices by email','facture',1,'invoice_advance','send','a',0,11,0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0,10,0),(16,'Issue payments on invoices','facture',1,'paiement',NULL,'a',0,11,0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0,10,0),(19,'Delete invoices','facture',1,'supprimer',NULL,'a',0,11,0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0,10,0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1,22,0),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1,22,0),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0,22,0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0,22,0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0,22,0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0,22,0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',1,'propal_advance','close','d',0,22,0),(26,'Cloturer les propositions commerciales','propale',2,'propal_advance','close','d',0,22,0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0,22,0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0,22,0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0,22,0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1,25,0),(31,'Lire les produits','produit',2,'lire',NULL,'r',1,25,0),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0,25,0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0,25,0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0,25,0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0,25,0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0,25,0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0,25,0),(39,'Ignore minimum price','produit',1,'ignore_price_min_advance',NULL,'r',0,25,0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1,14,0),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0,14,0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0,14,0),(45,'Export projects','projet',1,'export',NULL,'d',0,14,0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1,41,0),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0,41,0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0,41,0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0,41,0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0,41,0),(69,'Valider les fiches d\'intervention ','ficheinter',1,'ficheinter_advance','validate','a',0,41,0),(70,'Dévalider les fiches d\'intervention','ficheinter',1,'ficheinter_advance','unvalidate','a',0,41,0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',0,55,0),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0,55,0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0,55,0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0,55,0),(76,'Export members','adherent',1,'export',NULL,'r',0,55,0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',0,55,0),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0,55,0),(81,'Read sales orders','commande',1,'lire',NULL,'r',0,11,0),(82,'Creeat/modify sales orders','commande',1,'creer',NULL,'w',0,11,0),(84,'Validate sales orders','commande',1,'order_advance','validate','d',0,11,0),(86,'Send sale orders by email','commande',1,'order_advance','send','d',0,11,0),(87,'Close sale orders','commande',1,'order_advance','close','d',0,11,0),(88,'Cancel sale orders','commande',1,'order_advance','annuler','d',0,11,0),(89,'Delete sales orders','commande',1,'supprimer',NULL,'d',0,11,0),(91,'Lire les charges','tax',1,'charges','lire','r',0,50,0),(91,'Lire les charges','tax',2,'charges','lire','r',1,50,0),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0,50,0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0,50,0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0,50,0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0,50,0),(94,'Exporter les charges','tax',1,'charges','export','r',0,50,0),(94,'Exporter les charges','tax',2,'charges','export','r',0,50,0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',0,40,0),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0,40,0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0,40,0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0,40,0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0,40,0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0,40,0),(111,'Read bank account and transactions','banque',1,'lire',NULL,'r',0,51,0),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0,51,0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0,51,0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0,51,0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0,51,0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0,51,0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0,51,0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0,51,0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0,51,0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0,51,0),(121,'Read third parties','societe',1,'lire',NULL,'r',0,9,0),(121,'Lire les societes','societe',2,'lire',NULL,'r',1,9,0),(122,'Create and update third parties','societe',1,'creer',NULL,'w',0,9,0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0,9,0),(125,'Delete third parties','societe',1,'supprimer',NULL,'d',0,9,0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0,9,0),(126,'Export third parties','societe',1,'export',NULL,'r',0,9,0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0,9,0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0,14,0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0,14,0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0,14,0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1,52,0),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0,52,0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0,52,0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0,52,0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1,35,0),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0,35,0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0,35,0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0,35,0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0,35,0),(167,'Export contracts','contrat',1,'export',NULL,'r',0,35,0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1,11,0),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0,11,0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0,11,0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0,11,0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0,11,0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0,11,0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0,11,0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0,11,0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0,11,0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0,11,0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0,11,0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1,20,0),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0,20,0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0,20,0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0,5,0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0,5,0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0,5,0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0,5,0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0,5,0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0,5,0),(262,'Read all third parties (and their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).','societe',1,'client','voir','r',0,9,0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1,9,0),(281,'Read contacts','societe',1,'contact','lire','r',0,9,0),(281,'Lire les contacts','societe',2,'contact','lire','r',1,9,0),(282,'Create and update contact','societe',1,'contact','creer','w',0,9,0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0,9,0),(283,'Delete contacts','societe',1,'contact','supprimer','d',0,9,0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0,9,0),(286,'Export contacts','societe',1,'contact','export','d',0,9,0),(286,'Exporter les contacts','societe',2,'contact','export','d',0,9,0),(301,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1,0,0),(302,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0,0,0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',0,50,0),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0,50,0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0,50,0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',0,5,0),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',0,5,0),(343,'Modifier son propre mot de passe','user',1,'self','password','w',0,5,0),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',0,5,0),(351,'Consulter les groupes','user',1,'group_advance','read','r',0,5,0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0,5,0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0,5,0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0,5,0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0,5,0),(511,'Read payments of employee salaries (yours and your subordinates)','salaries',1,'read',NULL,'r',0,50,0),(512,'Create/modify payments of empoyee salaries','salaries',1,'write',NULL,'w',0,50,0),(514,'Delete payments of employee salary','salaries',1,'delete',NULL,'d',0,50,0),(517,'Read payments of salariests of every employee','salaries',1,'readall',NULL,'r',0,50,0),(519,'Export payments of employee salaries','salaries',1,'export',NULL,'r',0,50,0),(520,'Read loans','loan',1,'read',NULL,'r',0,50,0),(521,'Read loans','loan',1,'read',NULL,'r',0,50,0),(522,'Create/modify loans','loan',1,'write',NULL,'w',0,50,0),(524,'Delete loans','loan',1,'delete',NULL,'d',0,50,0),(525,'Access loan calculator','loan',1,'calc',NULL,'r',0,50,0),(527,'Export loans','loan',1,'export',NULL,'r',0,50,0),(531,'Read services','service',1,'lire',NULL,'r',0,29,0),(532,'Create/modify services','service',1,'creer',NULL,'w',0,29,0),(534,'Delete les services','service',1,'supprimer',NULL,'d',0,29,0),(538,'Export services','service',1,'export',NULL,'r',0,29,0),(561,'Read bank transfer payment orders','paymentbybanktransfer',1,'read',NULL,'r',0,52,0),(562,'Create/modify a bank transfer payment order','paymentbybanktransfer',1,'create',NULL,'w',0,52,0),(563,'Send/Transmit bank transfer payment order','paymentbybanktransfer',1,'send',NULL,'a',0,52,0),(564,'Record Debits/Rejects of bank transfer payment order','paymentbybanktransfer',1,'debit',NULL,'a',0,52,0),(651,'Read bom of Bom','bom',1,'read',NULL,'w',0,65,0),(652,'Create/Update bom of Bom','bom',1,'write',NULL,'w',0,65,0),(653,'Delete bom of Bom','bom',1,'delete',NULL,'w',0,65,0),(661,'Read Manufacturing Order','mrp',1,'read',NULL,'w',0,66,0),(662,'Create/Update Manufacturing Order','mrp',1,'write',NULL,'w',0,66,0),(663,'Delete Manufacturing Order','mrp',1,'delete',NULL,'w',0,66,0),(701,'Lire les dons','don',1,'lire',NULL,'r',1,50,0),(701,'Lire les dons','don',2,'lire',NULL,'r',1,50,0),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0,50,0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0,50,0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0,50,0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0,50,0),(750,'Read job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','read','w',0,44,0),(751,'Create/Update job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','write','w',0,44,0),(752,'Delete Job positions to fill and candidatures','recruitment',1,'recruitmentjobposition','delete','w',0,44,0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',0,42,0),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0,42,0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0,42,0),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0,42,0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0,42,0),(777,'Read expense reports of everybody','expensereport',1,'readall',NULL,'r',0,42,0),(778,'Create expense reports for everybody','expensereport',1,'writeall_advance',NULL,'w',0,42,0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0,42,0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1,40,0),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0,40,0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0,40,0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1,40,0),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0,40,0),(1101,'Read delivery receipts','expedition',1,'delivery','lire','r',0,40,0),(1102,'Create/modify delivery receipts','expedition',1,'delivery','creer','w',0,40,0),(1104,'Validate delivery receipts','expedition',1,'delivery_advance','validate','d',0,40,0),(1109,'Delete delivery receipts','expedition',1,'delivery','supprimer','d',0,40,0),(1121,'Read supplier proposals','supplier_proposal',1,'lire',NULL,'w',0,35,0),(1122,'Create/modify supplier proposals','supplier_proposal',1,'creer',NULL,'w',0,35,0),(1123,'Validate supplier proposals','supplier_proposal',1,'validate_advance',NULL,'w',0,35,0),(1124,'Envoyer les demandes fournisseurs','supplier_proposal',1,'send_advance',NULL,'w',0,35,0),(1125,'Delete supplier proposals','supplier_proposal',1,'supprimer',NULL,'w',0,35,0),(1126,'Close supplier price requests','supplier_proposal',1,'cloturer',NULL,'w',0,35,0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',0,12,0),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',0,12,0),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0,12,0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0,12,0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0,12,0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0,12,0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0,12,0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0,12,0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0,12,0),(1191,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0,12,0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1,72,0),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0,72,0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',0,12,0),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0,12,0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0,12,0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0,12,0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0,12,0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0,12,0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0,70,0),(1321,'Export customer invoices, attributes and payments','facture',1,'facture','export','r',0,11,0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0,10,0),(1322,'Re-open a fully paid invoice','facture',1,'invoice_advance','reopen','r',0,11,0),(1421,'Export sales orders and attributes','commande',1,'commande','export','r',0,11,0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',0,15,0),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0,15,0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0,15,0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0,15,0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0,15,0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0,15,0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0,15,0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0,15,0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0,15,0),(2501,'Read or download documents','ecm',1,'read',NULL,'r',0,10,0),(2503,'Upload a document','ecm',1,'upload',NULL,'w',0,10,0),(2515,'Administer directories of documents','ecm',1,'setup',NULL,'w',0,10,0),(3200,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0,76,0),(3201,'Read archived events and fingerprints','blockedlog',1,'read',NULL,'w',0,76,0),(10001,'Read website content','website',1,'read',NULL,'w',0,50,0),(10002,'Create/modify website content (html and javascript content)','website',1,'write',NULL,'w',0,50,0),(10003,'Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers.','website',1,'writephp',NULL,'w',0,50,0),(10005,'Delete website content','website',1,'delete',NULL,'w',0,50,0),(10008,'Export website content','website',1,'export',NULL,'w',0,50,0),(20001,'Read leave requests (yours and your subordinates)','holiday',1,'read',NULL,'w',0,42,0),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1,42,0),(20002,'Create/modify leave requests','holiday',1,'write',NULL,'w',0,42,0),(20003,'Delete leave requests','holiday',1,'delete',NULL,'w',0,42,0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0,42,0),(20004,'Read leave requests for everybody','holiday',1,'readall',NULL,'w',0,42,0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0,42,0),(20005,'Create/modify leave requests for everybody','holiday',1,'writeall_advance',NULL,'w',0,42,0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0,42,0),(20006,'Setup leave requests of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0,42,0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0,42,0),(20007,'Approve leave requests','holiday',1,'approve',NULL,'w',0,42,0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',0,50,0),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0,50,0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0,50,0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0,50,0),(50151,'Use Point Of Sale','takepos',1,'run',NULL,'a',0,60,0),(50401,'Bind products and invoices with accounting accounts','accounting',1,'bind','write','r',0,61,0),(50411,'Read operations in General Ledger','accounting',1,'mouvements','lire','r',0,61,0),(50412,'Write/Edit operations in General Ledger','accounting',1,'mouvements','creer','w',0,61,0),(50414,'Delete operations in Ledger','accounting',1,'mouvements','supprimer','d',0,61,0),(50415,'Delete all operations by year and journal in Ledger','accounting',1,'mouvements','supprimer_tous','d',0,61,0),(50418,'Export operations of the Ledger','accounting',1,'mouvements','export','r',0,61,0),(50420,'Report and export reports (turnover, balance, journals, general ledger)','accounting',1,'comptarapport','lire','r',0,61,0),(50430,'Define and close a fiscal year','accounting',1,'fiscalyear','write','r',0,61,0),(50440,'Manage chart of accounts, setup of accountancy','accounting',1,'chartofaccount',NULL,'r',0,61,0),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0,40,0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0,40,0),(56001,'Read ticket','ticket',1,'read',NULL,'r',0,60,0),(56002,'Create les tickets','ticket',1,'write',NULL,'w',0,60,0),(56003,'Delete les tickets','ticket',1,'delete',NULL,'d',0,60,0),(56004,'Manage tickets','ticket',1,'manage',NULL,'w',0,60,0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',0,55,0),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0,55,0),(59003,'Read every user margin','margins',1,'read','all','r',0,55,0),(63001,'Read resources','resource',1,'read',NULL,'w',0,16,0),(63002,'Create/Modify resources','resource',1,'write',NULL,'w',0,16,0),(63003,'Delete resources','resource',1,'delete',NULL,'w',0,16,0),(63004,'Link resources to agenda events','resource',1,'link',NULL,'w',0,16,0),(64001,'DirectPrint','printing',1,'read',NULL,'r',0,52,0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0,40,0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0,40,0),(941601,'Lire les receptions','reception',1,'lire',NULL,'r',0,40,0),(941602,'Creer modifier les receptions','reception',1,'creer',NULL,'w',0,40,0),(941603,'Valider les receptions','reception',1,'reception_advance','validate','d',0,40,0),(941604,'Envoyer les receptions aux clients','reception',1,'reception_advance','send','d',0,40,0),(941605,'Exporter les receptions','reception',1,'reception','export','r',0,40,0),(941606,'Supprimer les receptions','reception',1,'supprimer',NULL,'d',0,40,0); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `llx_routing` +-- Table structure for table `llx_salary` -- -DROP TABLE IF EXISTS `llx_routing`; +DROP TABLE IF EXISTS `llx_salary`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_routing` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `trigger_code` varchar(50) CHARACTER SET latin1 DEFAULT NULL, - `trigger_code_reverse` varchar(50) CHARACTER SET latin1 DEFAULT NULL, - `fk_warehouse_from` int(11) NOT NULL DEFAULT 0, - `fk_warehouse_to` int(11) NOT NULL DEFAULT 0, - `check_old` int(11) NOT NULL DEFAULT 0, - `message_condition` longtext CHARACTER SET latin1 DEFAULT NULL, - `message_code` longtext CHARACTER SET latin1 DEFAULT NULL, - `qty_field` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `fk_product_field` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `lines_field` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - `product_type_field` varchar(255) CHARACTER SET latin1 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `trigger_code` (`trigger_code`), - KEY `trigger_code_reverse` (`trigger_code_reverse`), - KEY `fk_warehouse_from` (`fk_warehouse_from`), - KEY `fk_warehouse_to` (`fk_warehouse_to`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_routing` --- - -LOCK TABLES `llx_routing` WRITE; -/*!40000 ALTER TABLE `llx_routing` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_routing` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_routing_stock` --- - -DROP TABLE IF EXISTS `llx_routing_stock`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_routing_stock` ( - `rowid` int(11) NOT NULL DEFAULT 0, - `date_cre` datetime DEFAULT NULL, - `date_maj` datetime DEFAULT NULL, - `fk_warehouse_from` int(11) NOT NULL DEFAULT 0, - `fk_warehouse_to` int(11) NOT NULL DEFAULT 0, - `fk_soc` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`rowid`), - KEY `date_cre` (`date_cre`), - KEY `date_maj` (`date_maj`), - KEY `fk_warehouse_from` (`fk_warehouse_from`), - KEY `fk_warehouse_to` (`fk_warehouse_to`), - KEY `fk_soc` (`fk_soc`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_routing_stock` --- - -LOCK TABLES `llx_routing_stock` WRITE; -/*!40000 ALTER TABLE `llx_routing_stock` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_routing_stock` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_sellyoursaas_cancellation_extrafields` --- - -DROP TABLE IF EXISTS `llx_sellyoursaas_cancellation_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_sellyoursaas_cancellation_extrafields` ( +CREATE TABLE `llx_salary` ( `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `datec` datetime DEFAULT NULL, + `fk_user` int(11) NOT NULL, + `datep` date DEFAULT NULL, + `datev` date DEFAULT NULL, + `salary` double(24,8) DEFAULT NULL, + `amount` double(24,8) NOT NULL DEFAULT 0.00000000, + `fk_projet` int(11) DEFAULT NULL, + `fk_typepayment` int(11) NOT NULL, + `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `datesp` date DEFAULT NULL, + `dateep` date DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `note` text COLLATE utf8_unicode_ci DEFAULT NULL, + `fk_bank` int(11) DEFAULT NULL, + `paye` smallint(6) NOT NULL DEFAULT 0, + `fk_account` int(11) DEFAULT NULL, + `fk_user_author` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `llx_sellyoursaas_cancellation_extrafields` +-- Dumping data for table `llx_salary` -- -LOCK TABLES `llx_sellyoursaas_cancellation_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_sellyoursaas_cancellation_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_sellyoursaas_cancellation_extrafields` ENABLE KEYS */; +LOCK TABLES `llx_salary` WRITE; +/*!40000 ALTER TABLE `llx_salary` DISABLE KEYS */; +INSERT INTO `llx_salary` VALUES (1,'1','2021-04-15 10:22:55',NULL,19,NULL,NULL,NULL,1000.00000000,0,2,NULL,'Salary payment','2019-09-01','2019-09-30',1,NULL,42,1,NULL,NULL,NULL); +/*!40000 ALTER TABLE `llx_salary` ENABLE KEYS */; UNLOCK TABLES; -- @@ -13439,7 +12122,7 @@ CREATE TABLE `llx_societe` ( `facebook` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `twitter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_effectif` int(11) DEFAULT 0, - `fk_typent` int(11) DEFAULT 0, + `fk_typent` int(11) DEFAULT NULL, `fk_forme_juridique` int(11) DEFAULT 0, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `siren` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13490,6 +12173,8 @@ CREATE TABLE `llx_societe` ( `fk_barcode_type` int(11) DEFAULT 0, `webservices_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `webservices_key` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `name_alias` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_incoterms` int(11) DEFAULT NULL, `location_incoterms` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -13497,7 +12182,7 @@ CREATE TABLE `llx_societe` ( `fk_multicurrency` int(11) DEFAULT NULL, `multicurrency_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_account` int(11) DEFAULT NULL, - `fk_entrepot` int(11) DEFAULT 0, + `fk_warehouse` int(11) DEFAULT NULL, `logo_squarred` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), @@ -13506,7 +12191,8 @@ CREATE TABLE `llx_societe` ( UNIQUE KEY `uk_societe_code_fournisseur` (`code_fournisseur`,`entity`), KEY `idx_societe_user_creat` (`fk_user_creat`), KEY `idx_societe_user_modif` (`fk_user_modif`), - KEY `idx_societe_barcode` (`barcode`) + KEY `idx_societe_barcode` (`barcode`), + KEY `idx_societe_warehouse` (`fk_warehouse`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -13516,7 +12202,7 @@ CREATE TABLE `llx_societe` ( LOCK TABLES `llx_societe` WRITE; /*!40000 ALTER TABLE `llx_societe` DISABLE KEYS */; -INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(10,0,NULL,'2020-01-13 12:57:02','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011','411CU12120005','401SU16010011','',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,'aa < aa
\r\ndddd',NULL,1,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,'The OpenSource company',0,NULL,'generic_odt:/home/ldestailleur/git/dolibarr_11.0/documents/doctemplates/thirdparties/template_thirdparty.ods',0,'',NULL,0,NULL),(11,0,NULL,'2019-11-28 11:52:58','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','{\"skype\":\"corp1\"}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(13,0,NULL,'2019-10-08 09:57:51','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,'CU1910-00021','SU1510-0008','411CU191000021','401SU15100008','',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(17,0,NULL,'2019-11-28 15:02:49','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,'Paris',0,1,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,0,NULL),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(29,0,NULL,'2020-01-13 12:56:22','2020-01-06 00:39:58','Patient',1,NULL,NULL,'CU2001-00022',NULL,'411CU200100022',NULL,'',NULL,NULL,0,117,'01','02',NULL,NULL,'null',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,'','','','','',NULL,0,'aa < ddd',NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.000,NULL,0.000,NULL,NULL,NULL,'patient@cabinetmed',NULL,1,NULL,'','',0,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(30,0,NULL,'2020-01-17 14:21:26','2020-01-13 17:19:24','Italo',1,NULL,NULL,'CU2001-00023',NULL,'411CU200100023',NULL,'12 Alagio','123','Milano',777,3,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,0,0.000,NULL,4,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL); +INSERT INTO `llx_societe` VALUES (1,0,NULL,'2018-01-16 15:21:09','2012-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000.00000000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(2,0,NULL,'2018-07-30 11:45:49','2012-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001','411CU11080001','401SU11080001','',NULL,'Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,4,3,57,'0','123456789','','ACE14','','',400000.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(3,0,NULL,'2017-02-16 00:47:25','2012-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000.00000000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(4,0,NULL,'2018-01-22 17:24:53','2012-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(5,0,NULL,'2017-02-21 11:01:17','2012-07-08 23:22:57','NoCountry GmBh',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(6,0,NULL,'2018-01-16 15:35:56','2012-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,2,601,'0','','','','','',56000.00000000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(7,0,NULL,'2018-01-16 15:38:32','2012-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,8,NULL,'0','','','','','',0.00000000,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(10,0,NULL,'2020-01-13 12:57:02','2012-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011','411CU12120005','401SU16010011','',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000.00000000,0,NULL,'aa < aa
\r\ndddd',NULL,1,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,NULL,NULL,'The OpenSource company',0,NULL,'generic_odt:/home/ldestailleur/git/dolibarr_11.0/documents/doctemplates/thirdparties/template_thirdparty.ods',0,'',NULL,0,NULL),(11,0,NULL,'2019-11-28 11:52:58','2012-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'21 Green Hill street','75500','Los Angeles',0,11,'444123456',NULL,'companycorp1.com','companycorp1@example.com','{\"skype\":\"corp1\"}',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,'0','AB1234567','','','','USABS123',10000.00000000,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(12,0,NULL,'2019-09-26 11:38:11','2012-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,'411CU16010019',NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(13,0,NULL,'2019-10-08 09:57:51','2012-07-11 17:13:20','Company Corp 2',1,NULL,NULL,'CU1910-00021','SU1510-0008','411CU191000021','401SU15100008','',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,3,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(17,0,NULL,'2019-11-28 15:02:49','2013-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,'401SU11080004','The French Company',NULL,'Paris',0,1,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,'',0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(19,0,NULL,'2019-09-26 12:03:13','2015-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','10/10/2010','','',0.00000000,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US',NULL,NULL,1,'magicfoodstore.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,'sepamandate',NULL,NULL,NULL,0,NULL),(25,0,NULL,'2018-01-22 17:21:17','2015-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0','','','','','',0.00000000,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,NULL,NULL,NULL,0,NULL),(26,0,NULL,'2019-09-26 12:06:05','2017-02-12 23:17:04','Calculation Power',1,NULL,NULL,'CU1702-0020',NULL,'411CU17020020',NULL,'',NULL,'Calgary',0,14,NULL,NULL,NULL,'calculationpower@example.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0.000,0,0.000,NULL,NULL,'en_US',NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL),(29,0,NULL,'2020-01-13 12:56:22','2020-01-06 00:39:58','Patient',1,NULL,NULL,'CU2001-00022',NULL,'411CU200100022',NULL,'',NULL,NULL,0,117,'01','02',NULL,NULL,'null',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','','','','',NULL,0,'aa < ddd',NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.000,NULL,0.000,NULL,NULL,NULL,'patient@cabinetmed',NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,0,'',NULL,0,NULL),(30,0,NULL,'2020-01-17 14:21:26','2020-01-13 17:19:24','Italo',1,NULL,NULL,'CU2001-00023',NULL,'411CU200100023',NULL,'12 Alagio','123','Milano',777,3,NULL,NULL,NULL,NULL,'[]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'','','','','',NULL,0,NULL,NULL,NULL,3,0,NULL,'',0,0,0,12,12,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,0.000,0,0.000,NULL,4,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,'',0,NULL,NULL,1,'EUR',NULL,0,NULL); /*!40000 ALTER TABLE `llx_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -13729,6 +12415,34 @@ LOCK TABLES `llx_societe_log` WRITE; /*!40000 ALTER TABLE `llx_societe_log` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_societe_perentity` +-- + +DROP TABLE IF EXISTS `llx_societe_perentity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_societe_perentity` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `fk_soc` int(11) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT 1, + `accountancy_code_sell` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + `accountancy_code_buy` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`rowid`), + UNIQUE KEY `uk_societe_perentity` (`fk_soc`,`entity`), + KEY `idx_societe_perentity_fk_soc` (`fk_soc`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_societe_perentity` +-- + +LOCK TABLES `llx_societe_perentity` WRITE; +/*!40000 ALTER TABLE `llx_societe_perentity` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_societe_perentity` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_societe_prices` -- @@ -13961,7 +12675,7 @@ CREATE TABLE `llx_socpeople` ( `fk_departement` int(11) DEFAULT NULL, `fk_pays` int(11) DEFAULT 0, `birthday` date DEFAULT NULL, - `poste` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, + `poste` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `phone_perso` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `phone_mobile` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, @@ -14097,7 +12811,7 @@ CREATE TABLE `llx_stock_mouvement` ( PRIMARY KEY (`rowid`), KEY `idx_stock_mouvement_fk_product` (`fk_product`), KEY `idx_stock_mouvement_fk_entrepot` (`fk_entrepot`) -) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -14106,119 +12820,10 @@ CREATE TABLE `llx_stock_mouvement` ( LOCK TABLES `llx_stock_mouvement` WRITE; /*!40000 ALTER TABLE `llx_stock_mouvement` DISABLE KEYS */; -INSERT INTO `llx_stock_mouvement` VALUES (1,'2012-07-08 22:43:51','2012-07-09 00:43:51',2,2,1000,0.00000000,0,1,'Correct stock',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-10 22:56:18','2012-07-11 00:56:18',4,2,500,0.00000000,0,1,'Init',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 23:02:20','2012-07-11 01:02:20',4,2,500,0.00000000,0,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(5,'2012-07-11 16:49:44','2012-07-11 18:49:44',4,1,2,10.00000000,3,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(6,'2012-07-11 16:49:44','2012-07-11 18:49:44',1,1,4,0.00000000,3,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(7,'2015-01-19 17:22:48','2015-01-19 18:22:48',11,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(8,'2015-01-19 17:22:48','2015-01-19 18:22:48',4,1,-1,5.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(9,'2015-01-19 17:22:48','2015-01-19 18:22:48',1,1,-2,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(10,'2015-01-19 17:31:10','2015-01-19 18:31:10',2,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-19 17:31:58','2015-01-19 18:31:58',2,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(12,'2018-07-30 13:39:31','2018-07-30 17:39:31',10,2,50,0.00000000,0,12,'Stock correction for product COMP-XP4523',0,'',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(13,'2018-07-30 13:40:12','2018-07-30 17:40:12',10,2,60,0.00000000,0,12,'Stock correction for product COMP-XP4523',0,'',NULL,0,NULL,'4494487766452',NULL,NULL,NULL),(14,'2018-07-30 13:40:39','2018-07-30 17:40:39',10,2,-35,0.00000000,1,12,'Stock transfer of product COMP-XP4523 into another warehouse',0,'',NULL,0,'160730174015','5599887766452',NULL,NULL,NULL),(15,'2018-07-30 13:40:39','2018-07-30 17:40:39',10,1,35,0.00000000,0,12,'Stock transfer of product COMP-XP4523 into another warehouse',0,'',NULL,0,'160730174015','5599887766452',NULL,NULL,NULL),(16,'2017-02-15 23:58:08','2017-02-16 03:58:08',10,1,-1,100.00000000,2,12,'Expédition SH1702-0002 validée',3,'shipping',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(17,'2017-02-16 00:12:09','2017-02-16 04:12:09',10,1,1,0.00000000,3,12,'Expédition SH1702-0002 supprimée',0,'',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(18,'2020-01-02 20:57:29','2020-01-03 00:57:29',25,1,50,0.00000000,0,12,'Stock correction for product POS-APPLE',0,'',NULL,0,'200103005654',NULL,NULL,NULL,NULL),(23,'2020-01-06 01:44:30','2020-01-06 05:44:30',25,1,-12,0.00000000,2,12,'Production MO1912-0002 - 2020-01-06 05:26:49',0,'',NULL,0,'MO1912-0002_20200106052649',NULL,NULL,NULL,NULL),(24,'2020-01-06 01:44:30','2020-01-06 05:44:30',4,2,3,0.00000000,3,12,'Production MO1912-0002 - 2020-01-06 05:26:49',0,'',NULL,0,'MO1912-0002_20200106052649',NULL,'2020-01-06',NULL,NULL),(25,'2020-01-06 01:54:05','2020-01-06 05:54:05',25,1,-2,0.00000000,2,12,'Production MO1912-0002 - 2020-01-06 05:53:52',0,'',NULL,0,'MO1912-0002_20200106055352',NULL,NULL,NULL,NULL),(26,'2020-01-06 01:54:05','2020-01-06 05:54:05',4,2,3,0.00000000,3,12,'Production MO1912-0002 - 2020-01-06 05:53:52',0,'',NULL,0,'MO1912-0002_20200106055352',NULL,'2020-01-06',NULL,NULL),(27,'2020-01-06 02:44:49','2020-01-06 06:44:49',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:44:37',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(28,'2020-01-06 02:44:49','2020-01-06 06:44:49',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:44:37',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(29,'2020-01-06 02:46:03','2020-01-06 06:46:03',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:45:53',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(30,'2020-01-06 02:46:03','2020-01-06 06:46:03',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:45:53',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(31,'2020-01-06 02:48:22','2020-01-06 06:48:22',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:48:11',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(32,'2020-01-06 02:48:22','2020-01-06 06:48:22',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:48:11',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(33,'2020-01-06 02:50:05','2020-01-06 06:50:05',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:49:57',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(34,'2020-01-06 02:50:05','2020-01-06 06:50:05',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:49:57',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(35,'2020-01-07 16:25:02','2020-01-07 20:25:02',25,1,-2,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 20:24:49',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(36,'2020-01-07 16:25:02','2020-01-07 20:25:02',4,2,1,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 20:24:49',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(37,'2020-01-07 17:12:37','2020-01-07 21:12:37',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:26',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(38,'2020-01-07 17:12:37','2020-01-07 21:12:37',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:26',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(39,'2020-01-07 17:13:00','2020-01-07 21:13:00',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(40,'2020-01-07 17:13:00','2020-01-07 21:13:00',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(41,'2020-01-07 17:13:49','2020-01-07 21:13:49',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(42,'2020-01-07 17:13:49','2020-01-07 21:13:49',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(43,'2020-01-07 17:46:58','2020-01-07 21:46:58',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:46:55',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(44,'2020-01-07 17:52:34','2020-01-07 21:52:34',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:52:28',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(45,'2020-01-07 17:53:44','2020-01-07 21:53:44',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:52:37',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(46,'2020-01-07 17:53:58','2020-01-07 21:53:58',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:53:46',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(47,'2020-01-07 17:53:58','2020-01-07 21:53:58',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:53:46',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(48,'2020-01-07 17:54:11','2020-01-07 21:54:11',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:54:00',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(49,'2020-01-07 17:54:12','2020-01-07 21:54:12',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:54:00',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(51,'2020-01-07 18:00:55','2020-01-07 22:00:55',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 22:00:40',5,'mo',NULL,7,'MO1912-0002',NULL,NULL,NULL,NULL),(52,'2020-01-07 18:00:55','2020-01-07 22:00:55',4,1,1,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 22:00:40',5,'mo',NULL,7,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(53,'2020-01-07 18:39:52','2020-01-07 22:39:52',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-07 22:39:38',14,'mo',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(54,'2020-01-07 18:39:52','2020-01-07 22:39:52',4,1,2,0.00000000,3,12,'Production MO2001-0003 - 2020-01-07 22:39:38',14,'mo',NULL,0,'MO2001-0003',NULL,'2020-01-07',NULL,NULL),(55,'2020-01-07 19:09:04','2020-01-07 23:09:04',25,1,-2,0.00000000,2,12,'Production of MO2001-0003',14,'mo',NULL,0,'Production of MO2001-0003',NULL,NULL,NULL,NULL),(56,'2020-01-07 19:09:04','2020-01-07 23:09:04',4,1,4,0.00000000,3,12,'Production of MO2001-0003',14,'mo',NULL,0,'Production of MO2001-0003',NULL,'2020-01-07',NULL,NULL),(57,'2020-01-07 19:50:40','2020-01-07 23:50:40',25,1,-1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(58,'2020-01-07 19:50:40','2020-01-07 23:50:40',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-07',NULL,NULL),(59,'2020-01-07 19:51:27','2020-01-07 23:51:27',25,1,-1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(60,'2020-01-07 19:51:27','2020-01-07 23:51:27',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-07',NULL,NULL),(61,'2020-01-07 20:25:23','2020-01-08 00:25:23',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(62,'2020-01-07 20:25:43','2020-01-08 00:25:43',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(63,'2020-01-07 20:29:24','2020-01-08 00:29:24',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(64,'2020-01-07 20:29:24','2020-01-08 00:29:24',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(65,'2020-01-07 20:29:43','2020-01-08 00:29:43',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(66,'2020-01-07 21:09:15','2020-01-08 01:09:15',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(67,'2020-01-07 21:09:15','2020-01-08 01:09:15',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(68,'2020-01-07 21:15:02','2020-01-08 01:15:02',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(69,'2020-01-07 21:17:16','2020-01-08 01:17:16',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(70,'2020-01-08 16:21:22','2020-01-08 20:21:22',25,1,-1,0.00000000,2,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005',NULL,NULL,NULL,NULL),(73,'2020-01-08 16:41:18','2020-01-08 20:41:18',1,1,-1.1,0.00000000,2,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005','000000',NULL,NULL,NULL),(74,'2020-01-08 16:41:18','2020-01-08 20:41:18',4,1,1.2,0.00000000,3,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005','aaa',NULL,NULL,NULL),(75,'2020-01-13 11:13:19','2020-01-13 15:13:19',25,1,-1,0.00000000,2,12,'Production of MO2001-0006',24,'mo',NULL,6,'Production of MO2001-0006',NULL,NULL,NULL,NULL),(76,'2020-01-13 11:14:15','2020-01-13 15:14:15',1,1,-0.1,0.00000000,2,12,'Production of MO2001-0006',24,'mo',NULL,6,'Production of MO2001-0006','000000',NULL,NULL,NULL),(77,'2020-01-18 19:16:58','2020-01-18 20:16:58',1,1,1,0.00000000,3,12,'string',0,'',NULL,0,'string','string',NULL,NULL,NULL),(78,'2020-01-18 19:17:03','2020-01-18 20:17:03',1,1,1,0.00000000,3,12,'string',0,'',NULL,0,'string','string',NULL,NULL,NULL); +INSERT INTO `llx_stock_mouvement` VALUES (1,'2012-07-08 22:43:51','2012-07-09 00:43:51',2,2,1000,0.00000000,0,1,'Correct stock',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-10 22:56:18','2012-07-11 00:56:18',4,2,500,0.00000000,0,1,'Init',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(4,'2012-07-10 23:02:20','2012-07-11 01:02:20',4,2,500,0.00000000,0,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(5,'2012-07-11 16:49:44','2012-07-11 18:49:44',4,1,2,10.00000000,3,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(6,'2012-07-11 16:49:44','2012-07-11 18:49:44',1,1,4,0.00000000,3,1,'',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(7,'2015-01-19 17:22:48','2015-01-19 18:22:48',11,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(8,'2015-01-19 17:22:48','2015-01-19 18:22:48',4,1,-1,5.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(9,'2015-01-19 17:22:48','2015-01-19 18:22:48',1,1,-2,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(10,'2015-01-19 17:31:10','2015-01-19 18:31:10',2,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(11,'2015-01-19 17:31:58','2015-01-19 18:31:58',2,1,-1,0.00000000,2,1,'Facture créée dans DoliPOS',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(12,'2018-07-30 13:39:31','2018-07-30 17:39:31',10,2,50,0.00000000,0,12,'Stock correction for product COMP-XP4523',0,'',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(13,'2018-07-30 13:40:12','2018-07-30 17:40:12',10,2,60,0.00000000,0,12,'Stock correction for product COMP-XP4523',0,'',NULL,0,NULL,'4494487766452',NULL,NULL,NULL),(14,'2018-07-30 13:40:39','2018-07-30 17:40:39',10,2,-35,0.00000000,1,12,'Stock transfer of product COMP-XP4523 into another warehouse',0,'',NULL,0,'160730174015','5599887766452',NULL,NULL,NULL),(15,'2018-07-30 13:40:39','2018-07-30 17:40:39',10,1,35,0.00000000,0,12,'Stock transfer of product COMP-XP4523 into another warehouse',0,'',NULL,0,'160730174015','5599887766452',NULL,NULL,NULL),(16,'2017-02-15 23:58:08','2017-02-16 03:58:08',10,1,-1,100.00000000,2,12,'Expédition SH1702-0002 validée',3,'shipping',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(17,'2017-02-16 00:12:09','2017-02-16 04:12:09',10,1,1,0.00000000,3,12,'Expédition SH1702-0002 supprimée',0,'',NULL,0,NULL,'5599887766452',NULL,NULL,NULL),(18,'2020-01-02 20:57:29','2020-01-03 00:57:29',25,1,50,0.00000000,0,12,'Stock correction for product POS-APPLE',0,'',NULL,0,'200103005654',NULL,NULL,NULL,NULL),(23,'2020-01-06 01:44:30','2020-01-06 05:44:30',25,1,-12,0.00000000,2,12,'Production MO1912-0002 - 2020-01-06 05:26:49',0,'',NULL,0,'MO1912-0002_20200106052649',NULL,NULL,NULL,NULL),(24,'2020-01-06 01:44:30','2020-01-06 05:44:30',4,2,3,0.00000000,3,12,'Production MO1912-0002 - 2020-01-06 05:26:49',0,'',NULL,0,'MO1912-0002_20200106052649',NULL,'2020-01-06',NULL,NULL),(25,'2020-01-06 01:54:05','2020-01-06 05:54:05',25,1,-2,0.00000000,2,12,'Production MO1912-0002 - 2020-01-06 05:53:52',0,'',NULL,0,'MO1912-0002_20200106055352',NULL,NULL,NULL,NULL),(26,'2020-01-06 01:54:05','2020-01-06 05:54:05',4,2,3,0.00000000,3,12,'Production MO1912-0002 - 2020-01-06 05:53:52',0,'',NULL,0,'MO1912-0002_20200106055352',NULL,'2020-01-06',NULL,NULL),(27,'2020-01-06 02:44:49','2020-01-06 06:44:49',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:44:37',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(28,'2020-01-06 02:44:49','2020-01-06 06:44:49',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:44:37',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(29,'2020-01-06 02:46:03','2020-01-06 06:46:03',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:45:53',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(30,'2020-01-06 02:46:03','2020-01-06 06:46:03',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:45:53',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(31,'2020-01-06 02:48:22','2020-01-06 06:48:22',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:48:11',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(32,'2020-01-06 02:48:22','2020-01-06 06:48:22',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:48:11',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(33,'2020-01-06 02:50:05','2020-01-06 06:50:05',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-06 06:49:57',0,'',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(34,'2020-01-06 02:50:05','2020-01-06 06:50:05',4,1,1,0.00000000,3,12,'Production MO2001-0003 - 2020-01-06 06:49:57',0,'',NULL,0,'MO2001-0003',NULL,'2020-01-06',NULL,NULL),(35,'2020-01-07 16:25:02','2020-01-07 20:25:02',25,1,-2,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 20:24:49',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(36,'2020-01-07 16:25:02','2020-01-07 20:25:02',4,2,1,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 20:24:49',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(37,'2020-01-07 17:12:37','2020-01-07 21:12:37',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:26',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(38,'2020-01-07 17:12:37','2020-01-07 21:12:37',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:26',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(39,'2020-01-07 17:13:00','2020-01-07 21:13:00',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(40,'2020-01-07 17:13:00','2020-01-07 21:13:00',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(41,'2020-01-07 17:13:49','2020-01-07 21:13:49',25,1,0,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(42,'2020-01-07 17:13:49','2020-01-07 21:13:49',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:12:58',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(43,'2020-01-07 17:46:58','2020-01-07 21:46:58',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:46:55',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(44,'2020-01-07 17:52:34','2020-01-07 21:52:34',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:52:28',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(45,'2020-01-07 17:53:44','2020-01-07 21:53:44',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:52:37',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(46,'2020-01-07 17:53:58','2020-01-07 21:53:58',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:53:46',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(47,'2020-01-07 17:53:58','2020-01-07 21:53:58',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:53:46',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(48,'2020-01-07 17:54:11','2020-01-07 21:54:11',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 21:54:00',0,'',NULL,0,'MO1912-0002',NULL,NULL,NULL,NULL),(49,'2020-01-07 17:54:12','2020-01-07 21:54:12',4,2,0,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 21:54:00',0,'',NULL,0,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(51,'2020-01-07 18:00:55','2020-01-07 22:00:55',25,1,-1,0.00000000,2,12,'Production MO1912-0002 - 2020-01-07 22:00:40',5,'mo',NULL,7,'MO1912-0002',NULL,NULL,NULL,NULL),(52,'2020-01-07 18:00:55','2020-01-07 22:00:55',4,1,1,0.00000000,3,12,'Production MO1912-0002 - 2020-01-07 22:00:40',5,'mo',NULL,7,'MO1912-0002',NULL,'2020-01-07',NULL,NULL),(53,'2020-01-07 18:39:52','2020-01-07 22:39:52',25,1,-1,0.00000000,2,12,'Production MO2001-0003 - 2020-01-07 22:39:38',14,'mo',NULL,0,'MO2001-0003',NULL,NULL,NULL,NULL),(54,'2020-01-07 18:39:52','2020-01-07 22:39:52',4,1,2,0.00000000,3,12,'Production MO2001-0003 - 2020-01-07 22:39:38',14,'mo',NULL,0,'MO2001-0003',NULL,'2020-01-07',NULL,NULL),(55,'2020-01-07 19:09:04','2020-01-07 23:09:04',25,1,-2,0.00000000,2,12,'Production of MO2001-0003',14,'mo',NULL,0,'Production of MO2001-0003',NULL,NULL,NULL,NULL),(56,'2020-01-07 19:09:04','2020-01-07 23:09:04',4,1,4,0.00000000,3,12,'Production of MO2001-0003',14,'mo',NULL,0,'Production of MO2001-0003',NULL,'2020-01-07',NULL,NULL),(57,'2020-01-07 19:50:40','2020-01-07 23:50:40',25,1,-1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(58,'2020-01-07 19:50:40','2020-01-07 23:50:40',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-07',NULL,NULL),(59,'2020-01-07 19:51:27','2020-01-07 23:51:27',25,1,-1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(60,'2020-01-07 19:51:27','2020-01-07 23:51:27',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-07',NULL,NULL),(61,'2020-01-07 20:25:23','2020-01-08 00:25:23',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(62,'2020-01-07 20:25:43','2020-01-08 00:25:43',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(63,'2020-01-07 20:29:24','2020-01-08 00:29:24',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(64,'2020-01-07 20:29:24','2020-01-08 00:29:24',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(65,'2020-01-07 20:29:43','2020-01-08 00:29:43',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(66,'2020-01-07 21:09:15','2020-01-08 01:09:15',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(67,'2020-01-07 21:09:15','2020-01-08 01:09:15',4,2,0,0.00000000,3,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,'2020-01-08',NULL,NULL),(68,'2020-01-07 21:15:02','2020-01-08 01:15:02',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(69,'2020-01-07 21:17:16','2020-01-08 01:17:16',25,1,-1.1,0.00000000,2,12,'Production of MO1912-0002',5,'mo',NULL,7,'Production of MO1912-0002',NULL,NULL,NULL,NULL),(70,'2020-01-08 16:21:22','2020-01-08 20:21:22',25,1,-1,0.00000000,2,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005',NULL,NULL,NULL,NULL),(73,'2020-01-08 16:41:18','2020-01-08 20:41:18',1,1,-1.1,0.00000000,2,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005','000000',NULL,NULL,NULL),(74,'2020-01-08 16:41:18','2020-01-08 20:41:18',4,1,1.2,0.00000000,3,12,'Production of MO2001-0005',28,'mo',NULL,0,'Production of MO2001-0005','aaa',NULL,NULL,NULL),(75,'2020-01-13 11:13:19','2020-01-13 15:13:19',25,1,-1,0.00000000,2,12,'Production of MO2001-0006',24,'mo',NULL,6,'Production of MO2001-0006',NULL,NULL,NULL,NULL),(76,'2020-01-13 11:14:15','2020-01-13 15:14:15',1,1,-0.1,0.00000000,2,12,'Production of MO2001-0006',24,'mo',NULL,6,'Production of MO2001-0006','000000',NULL,NULL,NULL),(77,'2020-01-18 19:16:58','2020-01-18 20:16:58',1,1,1,0.00000000,3,12,'string',0,'',NULL,0,'string','string',NULL,NULL,NULL),(78,'2020-01-18 19:17:03','2020-01-18 20:17:03',1,1,1,0.00000000,3,12,'string',0,'',NULL,0,'string','string',NULL,NULL,NULL),(79,'2021-04-15 11:40:18','2021-04-15 08:40:18',4,20,1,10.00000000,3,12,'Reception RCP2104-0001 validated',1,'reception',NULL,0,NULL,'Lot 2021-02',NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_stock_mouvement` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_submitew_message` --- - -DROP TABLE IF EXISTS `llx_submitew_message`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_submitew_message` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `statut` smallint(6) DEFAULT 0, - `label` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `entity` int(11) NOT NULL DEFAULT 1, - `title` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `body_short` text COLLATE utf8_unicode_ci DEFAULT NULL, - `body_long` text COLLATE utf8_unicode_ci DEFAULT NULL, - `url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `cible` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL, - `nbemail` int(11) DEFAULT NULL, - `email_from` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, - `email_replyto` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, - `email_errorsto` varchar(160) COLLATE utf8_unicode_ci DEFAULT NULL, - `tag` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `date_creat` datetime DEFAULT NULL, - `date_valid` datetime DEFAULT NULL, - `date_appro` datetime DEFAULT NULL, - `date_envoi` datetime DEFAULT NULL, - `fk_user_creat` int(11) DEFAULT NULL, - `fk_user_valid` int(11) DEFAULT NULL, - `fk_user_appro` int(11) DEFAULT NULL, - `joined_file1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `joined_file2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `joined_file3` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `joined_file4` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_submitew_message` --- - -LOCK TABLES `llx_submitew_message` WRITE; -/*!40000 ALTER TABLE `llx_submitew_message` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_submitew_message` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_submitew_targets` --- - -DROP TABLE IF EXISTS `llx_submitew_targets`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_submitew_targets` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `label` varchar(64) COLLATE utf8_unicode_ci NOT NULL, - `targetcode` varchar(16) COLLATE utf8_unicode_ci NOT NULL, - `langcode` varchar(5) COLLATE utf8_unicode_ci DEFAULT 'en_US', - `url` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, - `login` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `pass` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, - `comment` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL, - `position` int(11) DEFAULT 0, - `titlelength` int(11) DEFAULT 32, - `descshortlength` int(11) DEFAULT 256, - `desclonglength` int(11) DEFAULT 2000, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_submitewtargets` (`label`,`langcode`) -) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_submitew_targets` --- - -LOCK TABLES `llx_submitew_targets` WRITE; -/*!40000 ALTER TABLE `llx_submitew_targets` DISABLE KEYS */; -INSERT INTO `llx_submitew_targets` VALUES (17,'hhho','email','fr_FR','',NULL,NULL,NULL,0,0,-1,0),(34,'pppp','facebook','fr_FR',NULL,'eldy','ld101010-fk',NULL,0,-1,-1,-1),(35,'hfghfgh','web','de_DE','http://wwww','ffffmmm','null',NULL,0,-1,-1,-1),(37,'llll','linkedin','fr_FR','',NULL,NULL,NULL,0,32,256,2000),(55,'fff','dig','fr_FR',NULL,'hfgh','hfghgf',NULL,0,-1,-1,-1),(56,'aaaaaaa','linkedin','da_DK',NULL,'aa','aaa',NULL,0,32,256,2000),(57,'ddd','dig','en_US',NULL,'dd',NULL,NULL,0,32,256,2000),(59,'dddff','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(68,'dddffe','dig','en_US',NULL,NULL,NULL,NULL,0,32,256,2000),(70,'dddffef','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000),(71,'ffff','dig','en_US','http://www.dig.com',NULL,NULL,NULL,0,32,256,2000); -/*!40000 ALTER TABLE `llx_submitew_targets` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_submitew_targets_params` --- - -DROP TABLE IF EXISTS `llx_submitew_targets_params`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_submitew_targets_params` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_target` int(11) NOT NULL, - `paramkey` varchar(16) COLLATE utf8_unicode_ci NOT NULL, - `paramvalue` varchar(128) COLLATE utf8_unicode_ci DEFAULT '', - PRIMARY KEY (`rowid`), - UNIQUE KEY `idx_submitewtargets_fk_target` (`fk_target`), - UNIQUE KEY `uk_submitewtargets_params` (`fk_target`,`paramkey`,`paramvalue`), - CONSTRAINT `fk_submitewtargets_fk_target` FOREIGN KEY (`fk_target`) REFERENCES `llx_submitew_targets` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_submitew_targets_params` --- - -LOCK TABLES `llx_submitew_targets_params` WRITE; -/*!40000 ALTER TABLE `llx_submitew_targets_params` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_submitew_targets_params` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_subscription` -- @@ -14283,10 +12888,10 @@ CREATE TABLE `llx_supplier_proposal` ( `remise_absolue` double DEFAULT 0, `remise` double DEFAULT 0, `total_ht` double(24,8) DEFAULT 0.00000000, - `tva` double(24,8) DEFAULT 0.00000000, + `total_tva` double(24,8) DEFAULT 0.00000000, `localtax1` double(24,8) DEFAULT 0.00000000, `localtax2` double(24,8) DEFAULT 0.00000000, - `total` double(24,8) DEFAULT 0.00000000, + `total_ttc` double(24,8) DEFAULT 0.00000000, `fk_account` int(11) DEFAULT NULL, `fk_currency` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL, `fk_cond_reglement` int(11) DEFAULT NULL, @@ -14315,7 +12920,7 @@ CREATE TABLE `llx_supplier_proposal` ( LOCK TABLES `llx_supplier_proposal` WRITE; /*!40000 ALTER TABLE `llx_supplier_proposal` DISABLE KEYS */; -INSERT INTO `llx_supplier_proposal` VALUES (2,'(PROV2)',1,NULL,NULL,10,NULL,'2020-06-12 17:12:08','2020-02-17 04:40:14',NULL,NULL,12,12,NULL,NULL,0,0,NULL,NULL,0,290.00000000,0.00000000,0.00000000,0.00000000,290.00000000,NULL,NULL,2,7,'Private note','Public note','aurore','2017-02-17',1,NULL,NULL,1,'EUR',1.00000000,290.00000000,0.00000000,290.00000000,NULL),(3,'(PROV3)',1,NULL,NULL,1,NULL,'2020-01-20 11:06:39','2020-01-20 12:06:39',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL),(4,'(PROV4)',1,NULL,NULL,17,NULL,'2020-01-20 11:23:36','2020-01-20 12:23:22',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,195.00000000,0.00000000,0.00000000,0.00000000,195.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,195.00000000,0.00000000,195.00000000,NULL); +INSERT INTO `llx_supplier_proposal` VALUES (2,'(PROV2)',1,NULL,NULL,10,NULL,'2021-04-15 10:22:31','2021-02-17 04:40:14',NULL,NULL,12,12,NULL,NULL,0,0,NULL,NULL,0,290.00000000,0.00000000,0.00000000,0.00000000,290.00000000,NULL,NULL,2,7,'Private note','Public note','aurore','2017-02-17',1,NULL,NULL,1,'EUR',1.00000000,290.00000000,0.00000000,290.00000000,NULL),(3,'(PROV3)',1,NULL,NULL,1,NULL,'2021-04-15 10:22:31','2021-01-20 12:06:39',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,0.00000000,0.00000000,0.00000000,NULL),(4,'(PROV4)',1,NULL,NULL,17,NULL,'2021-04-15 10:22:31','2021-01-20 12:23:22',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,195.00000000,0.00000000,0.00000000,0.00000000,195.00000000,NULL,NULL,NULL,NULL,'','','aurore',NULL,NULL,NULL,NULL,1,'EUR',1.00000000,195.00000000,0.00000000,195.00000000,NULL); /*!40000 ALTER TABLE `llx_supplier_proposal` ENABLE KEYS */; UNLOCK TABLES; @@ -14331,7 +12936,8 @@ CREATE TABLE `llx_supplier_proposal_extrafields` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) + PRIMARY KEY (`rowid`), + KEY `idx_supplier_proposal_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -14422,7 +13028,8 @@ CREATE TABLE `llx_supplier_proposaldet_extrafields` ( `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `fk_object` int(11) NOT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, - PRIMARY KEY (`rowid`) + PRIMARY KEY (`rowid`), + KEY `idx_supplier_proposaldet_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -14462,104 +13069,6 @@ LOCK TABLES `llx_takepos_floor_tables` WRITE; /*!40000 ALTER TABLE `llx_takepos_floor_tables` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_test` --- - -DROP TABLE IF EXISTS `llx_test`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_test` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `datec` datetime DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_test` --- - -LOCK TABLES `llx_test` WRITE; -/*!40000 ALTER TABLE `llx_test` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_test` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_test_test` --- - -DROP TABLE IF EXISTS `llx_test_test`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_test_test` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '(PROV)', - `entity` int(11) NOT NULL DEFAULT 1, - `label` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `amount` double DEFAULT NULL, - `qty` double DEFAULT NULL, - `fk_soc` int(11) DEFAULT NULL, - `fk_project` int(11) DEFAULT NULL, - `description` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_public` text CHARACTER SET utf8mb4 DEFAULT NULL, - `note_private` text CHARACTER SET utf8mb4 DEFAULT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - `import_key` varchar(14) CHARACTER SET utf8mb4 DEFAULT NULL, - `model_pdf` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, - `status` smallint(6) NOT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_test_test_rowid` (`rowid`), - KEY `idx_test_test_ref` (`ref`), - KEY `idx_test_test_entity` (`entity`), - KEY `idx_test_test_fk_soc` (`fk_soc`), - KEY `idx_test_test_fk_project` (`fk_project`), - KEY `llx_test_test_fk_user_creat` (`fk_user_creat`), - KEY `idx_test_test_status` (`status`), - CONSTRAINT `llx_test_test_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_test_test` --- - -LOCK TABLES `llx_test_test` WRITE; -/*!40000 ALTER TABLE `llx_test_test` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_test_test` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_test_test_extrafields` --- - -DROP TABLE IF EXISTS `llx_test_test_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_test_test_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), - `fk_object` int(11) NOT NULL, - `import_key` varchar(14) CHARACTER SET utf8mb4 DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_fk_object` (`fk_object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_test_test_extrafields` --- - -LOCK TABLES `llx_test_test_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_test_test_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_test_test_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_ticket` -- @@ -14610,7 +13119,7 @@ CREATE TABLE `llx_ticket` ( LOCK TABLES `llx_ticket` WRITE; /*!40000 ALTER TABLE `llx_ticket` DISABLE KEYS */; -INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2019-09-26 14:08:46',NULL,NULL,0,'2019-09-26 12:12:21',NULL,NULL),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,'100',NULL,'ISSUE','OTHER','NORMAL','2019-09-26 14:10:31',NULL,'2019-10-04 13:05:55',0,'2019-11-29 08:45:30',NULL,NULL),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-10-04 12:58:04',NULL,NULL,0,'2019-10-04 10:58:07',NULL,NULL),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,'0',NULL,'COM','OTHER','NORMAL','2019-11-29 12:46:29','2019-11-29 12:46:34',NULL,0,'2019-11-29 08:48:00',NULL,NULL),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,'100',NULL,'COM','OTHER','NORMAL','2019-11-29 12:50:45','2019-11-29 12:52:32','2019-11-29 12:55:48',1,'2019-11-29 08:55:48',NULL,NULL); +INSERT INTO `llx_ticket` VALUES (2,1,'TS1909-0001','15ff11cay39skiaa',NULL,6,NULL,12,12,'Increase memory on server','Pleae increase the memory of server to 164GB',3,NULL,'0',NULL,'REQUEST','OTHER','NORMAL','2020-09-26 14:08:46',NULL,NULL,0,'2021-04-15 10:22:31',NULL,NULL),(3,1,'TS1909-0002','r5ya6gdi9f39dcjt',1,NULL,NULL,12,14,'Problem with customer','Please recontact customer.
\r\nNeed someone speaking chinese...',0,NULL,'100',NULL,'ISSUE','OTHER','NORMAL','2020-09-26 14:10:31',NULL,'2020-10-04 13:05:55',0,'2021-04-15 10:22:31',NULL,NULL),(4,1,'TS1910-0003','fdv9wrzcte7b3c8b',NULL,NULL,NULL,12,NULL,'test','test',2,NULL,'0',NULL,'COM','OTHER','NORMAL','2020-10-04 12:58:04',NULL,NULL,0,'2021-04-15 10:22:31',NULL,NULL),(6,1,'TS1911-0004','5gvo9bsjri55zef9',NULL,4,NULL,12,16,'What is the price for Dolibarr ERP CRM ?','I need to use it for 10 users.',3,NULL,'0',NULL,'COM','OTHER','NORMAL','2020-11-29 12:46:29','2020-11-29 12:46:34',NULL,0,'2021-04-15 10:22:31',NULL,NULL),(7,1,'TS1911-0005','d51wjy4nym7wltg7',NULL,NULL,'customer@customercompany.com',NULL,16,'What is the price for Dolibarr ERP CRM ?','I need it for 10 people...',8,NULL,'100',NULL,'COM','OTHER','NORMAL','2020-11-29 12:50:45','2020-11-29 12:52:32','2020-11-29 12:55:48',1,'2021-04-15 10:22:31',NULL,NULL); /*!40000 ALTER TABLE `llx_ticket` ENABLE KEYS */; UNLOCK TABLES; @@ -14664,6 +13173,8 @@ CREATE TABLE `llx_tva` ( `fk_typepayment` int(11) DEFAULT NULL, `num_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `paye` smallint(6) NOT NULL DEFAULT 0, + `fk_account` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -14677,39 +13188,6 @@ LOCK TABLES `llx_tva` WRITE; /*!40000 ALTER TABLE `llx_tva` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_ultimatepdf_documentmergedpdf` --- - -DROP TABLE IF EXISTS `llx_ultimatepdf_documentmergedpdf`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_ultimatepdf_documentmergedpdf` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT NULL, - `fk_element` int(11) DEFAULT NULL, - `file_name` varchar(255) DEFAULT NULL, - `element_name` varchar(255) NOT NULL, - `date_creation` datetime NOT NULL, - `tms` timestamp NOT NULL DEFAULT current_timestamp(), - `fk_user_creat` int(11) NOT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_ultimatepdf_documentmergedpdf_rowid` (`rowid`), - KEY `llx_ultimatepdf_documentmergedpdf_fk_user_creat` (`fk_user_creat`), - CONSTRAINT `llx_ultimatepdf_documentmergedpdf_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_ultimatepdf_documentmergedpdf` --- - -LOCK TABLES `llx_ultimatepdf_documentmergedpdf` WRITE; -/*!40000 ALTER TABLE `llx_ultimatepdf_documentmergedpdf` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_ultimatepdf_documentmergedpdf` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_user` -- @@ -14814,7 +13292,7 @@ CREATE TABLE `llx_user` ( LOCK TABLES `llx_user` WRITE; /*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; -INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2019-11-28 11:52:58',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,1,0,NULL,'11c9c772d6471aa24c27274bdd8a223b',NULL,NULL,'Einstein','Albert','','123456789','','','','aeinstein@example.com','','[]','',0,'',1,1,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-08 13:54:48','2019-11-28 11:52:58',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','Trainee','09123123','','','','daviddoe@example.com','','[]','',0,'',1,1,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-11 16:18:59','2020-01-21 09:30:27',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'ab335b4eb4c3c99334f656e5db9584c9',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','','[]','',0,'',1,1,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2015-01-23 17:52:27','2019-11-28 11:52:58',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'a7d30b58d647fcf59b7163f9592b1dbb',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','bbookkeeper@example.com','','{\"skype\":\"skypebbookkeeper\"}','',0,'',1,1,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2017-10-03 11:47:41','2019-11-28 11:52:58',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'52cda011808bb282d1d3625ab607a145',NULL,'t3mnkbhs','Curie','Marie','','','','','','mcurie@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2017-10-05 09:07:52','2019-11-28 11:52:58',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,1,0,NULL,'92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','zzeceo@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,'2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2017-10-05 09:09:46','2020-01-07 13:47:17',NULL,NULL,'admin',0,NULL,NULL,NULL,1,0,NULL,'f6fdffe48c908deb0f4c3bd36c032e72',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','aadminson@example.com','','[]','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2020-01-21 10:38:41','2020-01-21 10:35:27',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-10-05 21:29:35','2019-11-28 11:52:58',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,1,0,NULL,'179858e041af35e8f4c81d68c55fe9da',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','ccommercy@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman',NULL,'2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2017-10-05 21:33:33','2019-11-28 11:52:58',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','sscientol@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2017-10-05 22:47:52','2019-11-28 11:52:58',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','ccommerson@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2017-10-05 22:48:39','2019-11-28 11:52:58',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','aleerfok@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2018-01-22 17:27:02','2019-11-28 11:52:58',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'1bb7805145a7a5066df9e6d585b8b645',NULL,'87g06wbx','Destailleur','Laurent','Project leader of Dolibarr ERP CRM','','','','','ldestailleur@example.com','','[]','
Laurent DESTAILLEUR
\r\n\r\n
\r\n
Project Director
\r\nldestailleur@example.com
\r\n\r\n
 
\r\n\r\n\r\n
',0,NULL,1,1,10,10,NULL,'More information on http://www.mydomain.com','2019-10-04 10:06:40','2017-09-06 11:55:30',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2020-01-16 15:44:42',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'a7a77a5aff2d5fc2f75f2f61507c88d4',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','','[]','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',0,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_user` VALUES (1,'2012-07-08 13:20:11','2021-04-15 10:42:13',NULL,NULL,'aeinstein',0,'',NULL,NULL,1,0,NULL,'$2y$10$lIvMb5RJjxqmd6OxnZLqvuLZGOXj3gxIQhZQUqcY8fQTyh0cTtUpa',NULL,NULL,'Einstein','Albert','','123456789','','','','aeinstein@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,'',1,1,NULL,NULL,NULL,'','2017-10-05 08:32:44','2017-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'man','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-07-08 13:54:48','2021-04-15 10:41:35',NULL,NULL,'demo',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Doe','David','Trainee','09123123','','','','daviddoe@example.com','','[]','',0,'',1,1,NULL,NULL,NULL,'','2018-07-30 23:10:54','2018-07-30 23:04:17',NULL,'',1,'person9.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,35.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-07-11 16:18:59','2021-04-15 10:41:35',NULL,NULL,'pcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','','[]','',0,'',1,1,NULL,NULL,2,'','2014-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2015-01-23 17:52:27','2021-04-15 10:41:35',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','bbookkeeper@example.com','','{\"skype\":\"skypebbookkeeper\"}','',0,'',1,1,17,6,NULL,'','2015-02-25 10:18:41','2015-01-23 17:53:20',NULL,'',1,'person8.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,16.00000000,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'2017-10-03 11:47:41','2021-04-15 10:41:35',NULL,NULL,'mcurie',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'t3mnkbhs','Curie','Marie','','','','','','mcurie@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,44.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'2017-10-05 09:07:52','2021-04-15 10:40:22',NULL,NULL,'zzeceo',1,'',NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cq78nf9m','Zeceo','Zack','President - CEO','','','','','zzeceo@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 22:48:08','2017-10-05 21:18:46',NULL,'',1,'person4.jpeg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,NULL,'','2019-06-10 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'2017-10-05 09:09:46','2021-04-15 10:38:52',NULL,NULL,'admin',0,'',NULL,NULL,1,0,NULL,'$2y$10$5qk/U.aOy.7uBSNxpwiqkOfBlCUop9c2wKWuFZ/wZ2hAC9lriGqnG',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','aadminson@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','Alice - 123',1,NULL,1,1,NULL,NULL,NULL,'','2021-04-15 07:59:04','2021-04-15 07:56:17',NULL,'',1,'person6.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2700.00000000,NULL,NULL,39.00000000,'woman','',NULL,NULL,'generic_user_odt','1985-09-15',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2017-10-05 21:29:35','2021-04-15 10:41:51',NULL,NULL,'ccommercy',1,'',NULL,NULL,1,0,NULL,'$2y$10$KTaKE0NyYyJSCogsxtwR.eADst17XYMrOWlsFfVLR60IbjANIVLHK',NULL,'y451ksdv','Commercy','Coraly','Commercial leader','','','','','ccommercy@example.com','','{\"facebook\":\"\",\"skype\":\"\",\"twitter\":\"\",\"linkedin\":\"\",\"instagram\":\"\",\"snapchat\":\"\",\"googleplus\":\"\",\"youtube\":\"\",\"whatsapp\":\"\",\"tumblr\":\"\",\"vero\":\"\",\"viadeo\":\"\",\"slack\":\"\",\"xing\":\"\",\"meetup\":\"\",\"pinterest\":\"\",\"flickr\":\"\",\"500px\":\"\",\"giphy\":\"\",\"gifycat\":\"\",\"dailymotion\":\"\",\"vimeo\":\"\",\"periscope\":\"\",\"twitch\":\"\",\"discord\":\"\",\"wikipedia\":\"\",\"reddit\":\"\",\"quora\":\"\",\"tripadvisor\":\"\",\"mastodon\":\"\",\"diaspora\":\"\",\"viber\":\"\",\"github\":\"\"}','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person7.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,1890.00000000,NULL,NULL,25.00000000,'woman','','2018-09-11 00:00:00',NULL,NULL,'1998-12-08',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'2017-10-05 21:33:33','2021-04-15 10:41:35',NULL,NULL,'sscientol',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','sscientol@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'person3.jpeg',NULL,NULL,11,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,3500.00000000,NULL,NULL,39.00000000,NULL,NULL,'2018-07-03 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'2017-10-05 22:47:52','2021-04-15 10:41:35',NULL,NULL,'ccommerson',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','ccommerson@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:46:24','2017-10-05 23:37:31',NULL,'',1,'person1.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,2900.00000000,NULL,NULL,39.00000000,NULL,NULL,'2019-09-01 00:00:00',NULL,NULL,'1976-02-05',NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'2017-10-05 22:48:39','2021-04-15 10:41:35',NULL,NULL,'aleerfok',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'gw8cb7xj','Leerfok','Amanda','Sale representative','','','','','aleerfok@example.com','','[]','',0,NULL,1,1,NULL,NULL,NULL,'','2017-10-05 23:16:06',NULL,NULL,'',0,'person5.jpeg',NULL,NULL,13,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,39.00000000,'woman',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'2018-01-22 17:27:02','2021-04-15 10:41:35',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,'87g06wbx','Destailleur','Laurent','Project leader of Dolibarr ERP CRM','','','','','ldestailleur@example.com','','[]','
Laurent DESTAILLEUR
\r\n\r\n
\r\n
Project Director
\r\nldestailleur@example.com
\r\n\r\n
 
\r\n\r\n\r\n
',0,NULL,1,1,10,10,NULL,'More information on http://www.mydomain.com','2019-10-04 10:06:40','2017-09-06 11:55:30',NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'2017-02-02 03:55:44','2021-04-15 10:41:35',NULL,NULL,'aboston',1,NULL,NULL,NULL,1,0,NULL,'$2y$10$Hgawd0DFS2bgBiM6rJuAZ.ff250vlm111HVWBJQvRzRq5hNijLxam',NULL,NULL,'Boston','Alex','','','','','','aboston@example.com','','[]','Alex Boston
\r\nAdmin support service - 555 01 02 03 04',0,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',0,'person2.jpeg',NULL,NULL,12,NULL,NULL,25.00000000,'','','',NULL,NULL,'ff00ff','',NULL,0,0,2700.00000000,NULL,NULL,32.00000000,NULL,NULL,'2016-11-04 00:00:00',NULL,NULL,NULL,NULL,NULL,NULL,NULL,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; UNLOCK TABLES; @@ -14958,7 +13436,7 @@ CREATE TABLE `llx_user_param` ( LOCK TABLES `llx_user_param` WRITE; /*!40000 ALTER TABLE `llx_user_param` DISABLE KEYS */; -INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'),(2,1,'MAIN_BOXES_0','1'),(11,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_27','1'),(12,1,'MAIN_LANG_DEFAULT','en_US'),(12,1,'MAIN_SELECTEDFIELDS_/dolibarr_4.0/htdocs/adherents/list.php','d.zip,d.ref,d.lastname,d.firstname,d.company,d.login,d.morphy,t.libelle,d.email,d.datefin,d.statut,'),(12,1,'MAIN_SELECTEDFIELDS_emailsenderprofilelist','t.tms,t.label,t.email,t.private,t.position,t.date_creation,t.active,'),(12,1,'MAIN_SELECTEDFIELDS_inventorylist','t.fk_user_creat,t.ref,t.title,t.fk_warehouse,t.fk_product,t.date_inventory,t.fk_user_modif,t.fk_user_valid,t.status,'),(12,1,'MAIN_SELECTEDFIELDS_poslist','f.ref,f.ref_client,f.date,f.date_lim_reglement,p.ref,s.nom,s.town,s.zip,f.total_ht,f.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_projectlist','p.budget_amount,p.ref,p.title,s.nom,commercial,p.dateo,p.datee,p.public,p.opp_amount,p.fk_opp_status,p.opp_percent,p.fk_statut,ef.priority,'),(12,1,'MAIN_SELECTEDFIELDS_proposallist','p.ref,p.ref_client,s.nom,s.zip,country.code_iso,p.date,p.fin_validite,p.total_ht,u.login,p.datec,p.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_servicelist','p.ref,p.label,p.duration,p.sellprice,p.minbuyprice,p.tosell,p.tobuy,'),(12,1,'MAIN_SELECTEDFIELDS_ticketlist','t.origin_email,t.ref,t.fk_user_create,t.subject,t.type_code,t.severity_code,t.fk_soc,t.datec,t.date_read,t.fk_user_assign,t.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_userlist','u.employee,u.login,u.lastname,u.firstname,u.email,u.fk_soc,u.fk_user,u.datelastlogin,u.statut,'); +INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'),(2,1,'MAIN_BOXES_0','1'),(11,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_2','1'),(12,1,'MAIN_BOXES_27','1'),(12,1,'MAIN_LANG_DEFAULT','en_US'),(12,1,'MAIN_SELECTEDFIELDS_/dolibarr_4.0/htdocs/adherents/list.php','d.zip,d.ref,d.lastname,d.firstname,d.company,d.login,d.morphy,t.libelle,d.email,d.datefin,d.statut,'),(12,1,'MAIN_SELECTEDFIELDS_emailsenderprofilelist','t.tms,t.label,t.email,t.private,t.position,t.date_creation,t.active,'),(12,1,'MAIN_SELECTEDFIELDS_inventorylist','t.fk_user_creat,t.ref,t.title,t.fk_warehouse,t.fk_product,t.date_inventory,t.fk_user_modif,t.fk_user_valid,t.status,'),(12,1,'MAIN_SELECTEDFIELDS_poslist','f.ref,f.ref_client,f.date,f.date_lim_reglement,p.ref,s.nom,s.town,s.zip,f.total_ht,f.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_productlist','p.ref,p.label,p.barcode,p.sellprice,p.minbuyprice,p.desiredstock,p.stock,stock_virtual,p.tobuy,p.tosell,'),(12,1,'MAIN_SELECTEDFIELDS_proposallist','p.ref,p.ref_client,s.nom,s.zip,country.code_iso,p.date,p.fin_validite,p.total_ht,u.login,p.datec,p.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_servicelist','p.ref,p.label,p.duration,p.sellprice,p.minbuyprice,p.tosell,p.tobuy,'),(12,1,'MAIN_SELECTEDFIELDS_ticketlist','t.origin_email,t.ref,t.fk_user_create,t.subject,t.type_code,t.severity_code,t.fk_soc,t.datec,t.date_read,t.fk_user_assign,t.fk_statut,'),(12,1,'MAIN_SELECTEDFIELDS_userlist','u.employee,u.login,u.lastname,u.firstname,u.email,u.fk_soc,u.fk_user,u.datelastlogin,u.statut,'); /*!40000 ALTER TABLE `llx_user_param` ENABLE KEYS */; UNLOCK TABLES; @@ -15015,7 +13493,7 @@ CREATE TABLE `llx_user_rights` ( UNIQUE KEY `uk_user_rights` (`entity`,`fk_user`,`fk_id`), KEY `fk_user_rights_fk_user_user` (`fk_user`), CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=20083 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=20342 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -15024,7 +13502,7 @@ CREATE TABLE `llx_user_rights` ( LOCK TABLES `llx_user_rights` WRITE; /*!40000 ALTER TABLE `llx_user_rights` DISABLE KEYS */; -INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12718,1,11,23001),(12719,1,11,50101),(19936,1,12,11),(19928,1,12,12),(19929,1,12,13),(19930,1,12,14),(19931,1,12,15),(19934,1,12,16),(19937,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(19893,1,12,81),(19888,1,12,82),(19889,1,12,84),(19890,1,12,86),(19891,1,12,87),(19892,1,12,88),(19894,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(15390,1,12,111),(15377,1,12,112),(15380,1,12,113),(15383,1,12,114),(15386,1,12,115),(15389,1,12,116),(15392,1,12,117),(20007,1,12,121),(20002,1,12,122),(20005,1,12,125),(20008,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(20049,1,12,251),(20030,1,12,252),(20032,1,12,253),(20033,1,12,254),(20035,1,12,255),(20037,1,12,256),(20009,1,12,262),(20019,1,12,281),(20014,1,12,282),(20017,1,12,283),(20020,1,12,286),(19877,1,12,300),(19878,1,12,301),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(20038,1,12,341),(20039,1,12,342),(20040,1,12,343),(20041,1,12,344),(20047,1,12,351),(20044,1,12,352),(20046,1,12,353),(20048,1,12,354),(20050,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(19996,1,12,511),(19991,1,12,512),(19993,1,12,514),(19995,1,12,517),(19997,1,12,519),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(20026,1,12,531),(20023,1,12,532),(20025,1,12,534),(20027,1,12,538),(20076,1,12,561),(20073,1,12,562),(20075,1,12,563),(20077,1,12,564),(16932,1,12,650),(16931,1,12,651),(16933,1,12,652),(17124,1,12,660),(17123,1,12,661),(17125,1,12,662),(13358,1,12,700),(19902,1,12,701),(19900,1,12,702),(19903,1,12,703),(20061,1,12,750),(20060,1,12,751),(20062,1,12,752),(19922,1,12,771),(19911,1,12,772),(19913,1,12,773),(15085,1,12,774),(19915,1,12,775),(19917,1,12,776),(19919,1,12,777),(19921,1,12,778),(19923,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(19940,1,12,1181),(19954,1,12,1182),(19943,1,12,1183),(19944,1,12,1184),(19946,1,12,1185),(19948,1,12,1186),(19950,1,12,1187),(19953,1,12,1188),(19951,1,12,1189),(19955,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(19963,1,12,1231),(19958,1,12,1232),(19959,1,12,1233),(19961,1,12,1234),(19962,1,12,1235),(19964,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(19938,1,12,1321),(19939,1,12,1322),(19895,1,12,1421),(19866,1,12,2401),(19864,1,12,2402),(19867,1,12,2403),(19874,1,12,2411),(19872,1,12,2412),(19875,1,12,2413),(19876,1,12,2414),(19907,1,12,2501),(19906,1,12,2503),(19908,1,12,2515),(20082,1,12,3200),(20081,1,12,3301),(15435,1,12,5001),(15436,1,12,5002),(20056,1,12,10001),(20053,1,12,10002),(20055,1,12,10003),(20057,1,12,10005),(19976,1,12,20001),(19967,1,12,20002),(19969,1,12,20003),(19973,1,12,20004),(19975,1,12,20005),(19977,1,12,20006),(19971,1,12,20007),(19884,1,12,23001),(19881,1,12,23002),(19883,1,12,23003),(19885,1,12,23004),(19019,1,12,50101),(20028,1,12,50151),(19848,1,12,50401),(19856,1,12,50411),(19851,1,12,50412),(19853,1,12,50414),(19855,1,12,50415),(19857,1,12,50418),(19858,1,12,50420),(19859,1,12,50430),(19847,1,12,50440),(19979,1,12,55001),(19980,1,12,55002),(16740,1,12,56001),(16737,1,12,56002),(16739,1,12,56003),(16741,1,12,56004),(16742,1,12,56005),(20078,1,12,59001),(20079,1,12,59002),(20080,1,12,59003),(19987,1,12,63001),(19984,1,12,63002),(19986,1,12,63003),(19988,1,12,63004),(19981,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(20069,1,12,941601),(20065,1,12,941602),(20066,1,12,941603),(20067,1,12,941604),(20068,1,12,941605),(20070,1,12,941606),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); +INSERT INTO `llx_user_rights` VALUES (12402,1,1,11),(12380,1,1,12),(12385,1,1,13),(12389,1,1,14),(12393,1,1,15),(12398,1,1,16),(12404,1,1,19),(9726,1,1,21),(9700,1,1,22),(9706,1,1,24),(9711,1,1,25),(9716,1,1,26),(9722,1,1,27),(9728,1,1,28),(9978,1,1,31),(9968,1,1,32),(9974,1,1,34),(1910,1,1,36),(9980,1,1,38),(11573,1,1,41),(11574,1,1,42),(11575,1,1,44),(11576,1,1,45),(7184,1,1,61),(7181,1,1,62),(7183,1,1,64),(7185,1,1,67),(7186,1,1,68),(1678,1,1,71),(1673,1,1,72),(1675,1,1,74),(1679,1,1,75),(1677,1,1,76),(1681,1,1,78),(1682,1,1,79),(12322,1,1,81),(12309,1,1,82),(12312,1,1,84),(12314,1,1,86),(12317,1,1,87),(12320,1,1,88),(12323,1,1,89),(11580,1,1,91),(11581,1,1,92),(11582,1,1,93),(11583,1,1,94),(10097,1,1,95),(10099,1,1,96),(10103,1,1,97),(10104,1,1,98),(7139,1,1,101),(7134,1,1,102),(7136,1,1,104),(7137,1,1,105),(7138,1,1,106),(7140,1,1,109),(10229,1,1,111),(10201,1,1,112),(10207,1,1,113),(10213,1,1,114),(10219,1,1,115),(10225,1,1,116),(10231,1,1,117),(12518,1,1,121),(12508,1,1,122),(12514,1,1,125),(12520,1,1,126),(11577,1,1,141),(11578,1,1,142),(11579,1,1,144),(2307,1,1,151),(2304,1,1,152),(2306,1,1,153),(2308,1,1,154),(10092,1,1,161),(10093,1,1,162),(10094,1,1,163),(10095,1,1,164),(10096,1,1,165),(1585,1,1,170),(12342,1,1,171),(12331,1,1,172),(12335,1,1,173),(12339,1,1,174),(12343,1,1,178),(10000,1,1,221),(9990,1,1,222),(9996,1,1,223),(10002,1,1,229),(10007,1,1,237),(10011,1,1,238),(10015,1,1,239),(1686,1,1,241),(1685,1,1,242),(1687,1,1,243),(12604,1,1,251),(12566,1,1,252),(12569,1,1,253),(12572,1,1,254),(12575,1,1,255),(12579,1,1,256),(1617,1,1,258),(12525,1,1,262),(12544,1,1,281),(12534,1,1,282),(12540,1,1,283),(12546,1,1,286),(12288,1,1,300),(12290,1,1,301),(11591,1,1,302),(1763,1,1,331),(1762,1,1,332),(1764,1,1,333),(12582,1,1,341),(12584,1,1,342),(12586,1,1,343),(12588,1,1,344),(12600,1,1,351),(12593,1,1,352),(12597,1,1,353),(12601,1,1,354),(12605,1,1,358),(12560,1,1,531),(12553,1,1,532),(12557,1,1,534),(1625,1,1,536),(12561,1,1,538),(12358,1,1,700),(12348,1,1,701),(12354,1,1,702),(12360,1,1,703),(1755,1,1,1001),(1754,1,1,1002),(1756,1,1,1003),(1758,1,1,1004),(1759,1,1,1005),(7146,1,1,1101),(7143,1,1,1102),(7145,1,1,1104),(7147,1,1,1109),(12412,1,1,1181),(12458,1,1,1182),(12417,1,1,1183),(12420,1,1,1184),(12423,1,1,1185),(12427,1,1,1186),(12431,1,1,1187),(12437,1,1,1188),(12434,1,1,1189),(1578,1,1,1201),(1579,1,1,1202),(12454,1,1,1231),(12443,1,1,1232),(12446,1,1,1233),(12449,1,1,1234),(12452,1,1,1235),(12455,1,1,1236),(12459,1,1,1237),(1736,1,1,1251),(12409,1,1,1321),(12326,1,1,1421),(8190,1,1,1791),(8187,1,1,1792),(8191,1,1,1793),(12264,1,1,2401),(12260,1,1,2402),(12266,1,1,2403),(12280,1,1,2411),(12276,1,1,2412),(12282,1,1,2413),(12286,1,1,2414),(1618,1,1,2500),(12370,1,1,2501),(12367,1,1,2503),(12371,1,1,2515),(9610,1,1,5001),(9611,1,1,5002),(12490,1,1,20001),(12474,1,1,20003),(12480,1,1,20004),(12486,1,1,20005),(12492,1,1,20006),(12302,1,1,23001),(12295,1,1,23002),(12299,1,1,23003),(12303,1,1,23004),(7701,1,1,50101),(4984,1,1,50401),(4983,1,1,50402),(4985,1,1,50403),(4987,1,1,50411),(4988,1,1,50412),(4989,1,1,50415),(12498,1,1,55001),(12499,1,1,55002),(3564,1,1,100700),(3565,1,1,100701),(9596,1,1,101051),(9598,1,1,101052),(9600,1,1,101053),(9604,1,1,101060),(9605,1,1,101061),(7177,1,1,101201),(7178,1,1,101202),(10353,1,1,101250),(10355,1,1,101251),(8980,1,1,101261),(8981,1,1,101262),(7616,1,1,101331),(10030,1,1,101701),(10031,1,1,101702),(3582,1,1,102000),(3583,1,1,102001),(9819,1,1,400051),(9823,1,1,400052),(9827,1,1,400053),(9831,1,1,400055),(132,1,2,11),(133,1,2,12),(134,1,2,13),(135,1,2,14),(136,1,2,16),(137,1,2,19),(138,1,2,21),(139,1,2,22),(140,1,2,24),(141,1,2,25),(142,1,2,26),(143,1,2,27),(10359,1,2,31),(145,1,2,32),(10361,1,2,34),(146,1,2,36),(147,1,2,41),(148,1,2,42),(149,1,2,44),(150,1,2,61),(151,1,2,62),(152,1,2,64),(153,1,2,71),(154,1,2,72),(155,1,2,74),(156,1,2,75),(157,1,2,78),(158,1,2,79),(159,1,2,81),(160,1,2,82),(161,1,2,84),(162,1,2,86),(163,1,2,87),(164,1,2,88),(165,1,2,89),(166,1,2,91),(167,1,2,92),(168,1,2,93),(2475,1,2,95),(2476,1,2,96),(2477,1,2,97),(2478,1,2,98),(169,1,2,101),(170,1,2,102),(171,1,2,104),(172,1,2,109),(173,1,2,111),(174,1,2,112),(175,1,2,113),(176,1,2,114),(177,1,2,116),(178,1,2,117),(179,1,2,121),(180,1,2,122),(181,1,2,125),(182,1,2,141),(183,1,2,142),(184,1,2,144),(2479,1,2,151),(2480,1,2,152),(2481,1,2,153),(2482,1,2,154),(185,1,2,161),(186,1,2,162),(187,1,2,163),(188,1,2,164),(189,1,2,165),(190,1,2,170),(2471,1,2,171),(192,1,2,172),(2472,1,2,173),(193,1,2,221),(194,1,2,222),(195,1,2,229),(196,1,2,241),(197,1,2,242),(198,1,2,243),(199,1,2,251),(201,1,2,262),(202,1,2,281),(203,1,2,282),(204,1,2,283),(205,1,2,331),(15072,1,2,510),(2483,1,2,531),(207,1,2,532),(2484,1,2,534),(208,1,2,536),(2473,1,2,700),(210,1,2,701),(211,1,2,702),(2474,1,2,703),(15064,1,2,771),(15057,1,2,772),(15059,1,2,773),(15061,1,2,774),(15063,1,2,775),(15065,1,2,776),(212,1,2,1001),(213,1,2,1002),(214,1,2,1003),(215,1,2,1004),(216,1,2,1005),(217,1,2,1101),(218,1,2,1102),(219,1,2,1104),(220,1,2,1109),(15073,1,2,1121),(15074,1,2,1122),(15075,1,2,1123),(15076,1,2,1124),(15077,1,2,1125),(15078,1,2,1126),(221,1,2,1181),(222,1,2,1182),(223,1,2,1183),(224,1,2,1184),(225,1,2,1185),(226,1,2,1186),(227,1,2,1187),(228,1,2,1188),(229,1,2,1201),(230,1,2,1202),(231,1,2,1231),(232,1,2,1232),(233,1,2,1233),(234,1,2,1234),(235,1,2,1421),(236,1,2,2401),(237,1,2,2402),(238,1,2,2403),(239,1,2,2411),(240,1,2,2412),(241,1,2,2413),(242,1,2,2500),(2470,1,2,2501),(243,1,2,2515),(10363,1,2,20001),(10365,1,2,20003),(10366,1,2,20004),(10367,1,2,20005),(10368,1,2,20006),(15054,1,2,23001),(10362,1,2,50101),(15067,1,2,55001),(15066,1,2,59001),(15068,1,2,63001),(15069,1,2,63002),(15070,1,2,63003),(15071,1,2,63004),(10372,1,2,101250),(1807,1,3,11),(1808,1,3,31),(1809,1,3,36),(1810,1,3,41),(1811,1,3,61),(1812,1,3,71),(1813,1,3,72),(1814,1,3,74),(1815,1,3,75),(1816,1,3,78),(1817,1,3,79),(1818,1,3,91),(1819,1,3,95),(1820,1,3,97),(1821,1,3,111),(1822,1,3,121),(1823,1,3,122),(1824,1,3,125),(1825,1,3,161),(1826,1,3,170),(1827,1,3,171),(1828,1,3,172),(1829,1,3,221),(1830,1,3,222),(1831,1,3,229),(1832,1,3,241),(1833,1,3,242),(1834,1,3,243),(1835,1,3,251),(1836,1,3,255),(1837,1,3,256),(1838,1,3,262),(1839,1,3,281),(1840,1,3,282),(1841,1,3,283),(1842,1,3,331),(1843,1,3,531),(1844,1,3,536),(1845,1,3,700),(1846,1,3,1001),(1847,1,3,1002),(1848,1,3,1003),(1849,1,3,1004),(1850,1,3,1005),(1851,1,3,1181),(1852,1,3,1182),(1853,1,3,1201),(1854,1,3,1202),(1855,1,3,1231),(1856,1,3,2401),(1857,1,3,2402),(1858,1,3,2403),(1859,1,3,2411),(1860,1,3,2412),(1861,1,3,2413),(1862,1,3,2500),(1863,1,3,2515),(8026,1,4,11),(8027,1,4,21),(8028,1,4,31),(8029,1,4,41),(8030,1,4,61),(8031,1,4,71),(8032,1,4,72),(8033,1,4,74),(8034,1,4,75),(8035,1,4,78),(8036,1,4,79),(8037,1,4,81),(8038,1,4,91),(8039,1,4,95),(8040,1,4,97),(8041,1,4,101),(8042,1,4,111),(8043,1,4,121),(8044,1,4,151),(8045,1,4,161),(8046,1,4,171),(8047,1,4,221),(8048,1,4,222),(8049,1,4,229),(8050,1,4,241),(8051,1,4,242),(8052,1,4,243),(8146,1,4,251),(8147,1,4,253),(8053,1,4,262),(8054,1,4,281),(8055,1,4,331),(8056,1,4,341),(8057,1,4,342),(8058,1,4,343),(8059,1,4,344),(8060,1,4,531),(8061,1,4,700),(8062,1,4,1001),(8063,1,4,1002),(8064,1,4,1003),(8065,1,4,1004),(8066,1,4,1005),(8067,1,4,1101),(8068,1,4,1181),(8069,1,4,1182),(8070,1,4,1201),(8071,1,4,1202),(8072,1,4,1231),(8073,1,4,2401),(8074,1,4,2501),(8075,1,4,2503),(8076,1,4,2515),(8077,1,4,20001),(8078,1,4,50101),(8079,1,4,101201),(8080,1,4,101261),(8081,1,4,102000),(8082,1,4,400051),(8083,1,4,400052),(8084,1,4,400053),(8085,1,4,400055),(12608,1,10,11),(12609,1,10,21),(12610,1,10,31),(12611,1,10,41),(12612,1,10,61),(12613,1,10,71),(12614,1,10,72),(12615,1,10,74),(12616,1,10,75),(12617,1,10,78),(12618,1,10,79),(12619,1,10,81),(12620,1,10,91),(12621,1,10,95),(12622,1,10,97),(12623,1,10,101),(12624,1,10,111),(12625,1,10,121),(12626,1,10,151),(12627,1,10,161),(12628,1,10,171),(12629,1,10,221),(12630,1,10,222),(12631,1,10,229),(12632,1,10,241),(12633,1,10,242),(12634,1,10,243),(12635,1,10,262),(12636,1,10,281),(12637,1,10,300),(12638,1,10,331),(12639,1,10,341),(12640,1,10,342),(12641,1,10,343),(12642,1,10,344),(12643,1,10,531),(12644,1,10,700),(12645,1,10,1001),(12646,1,10,1002),(12647,1,10,1003),(12648,1,10,1004),(12649,1,10,1005),(12650,1,10,1101),(12651,1,10,1181),(12652,1,10,1182),(12653,1,10,1201),(12654,1,10,1202),(12655,1,10,1231),(12656,1,10,2401),(12657,1,10,2501),(12658,1,10,2503),(12659,1,10,2515),(12660,1,10,20001),(12662,1,10,23001),(12663,1,10,50101),(12664,1,11,11),(12665,1,11,21),(12666,1,11,31),(12667,1,11,41),(12668,1,11,61),(12669,1,11,71),(12670,1,11,72),(12671,1,11,74),(12672,1,11,75),(12673,1,11,78),(12674,1,11,79),(12675,1,11,81),(12676,1,11,91),(12677,1,11,95),(12678,1,11,97),(12679,1,11,101),(12680,1,11,111),(12681,1,11,121),(12682,1,11,151),(12683,1,11,161),(12684,1,11,171),(12685,1,11,221),(12686,1,11,222),(12687,1,11,229),(12688,1,11,241),(12689,1,11,242),(12690,1,11,243),(12691,1,11,262),(12692,1,11,281),(12693,1,11,300),(12694,1,11,331),(12695,1,11,341),(12696,1,11,342),(12697,1,11,343),(12698,1,11,344),(12699,1,11,531),(12700,1,11,700),(12701,1,11,1001),(12702,1,11,1002),(12703,1,11,1003),(12704,1,11,1004),(12705,1,11,1005),(12706,1,11,1101),(12707,1,11,1181),(12708,1,11,1182),(12709,1,11,1201),(12710,1,11,1202),(12711,1,11,1231),(12712,1,11,2401),(12713,1,11,2501),(12714,1,11,2503),(12715,1,11,2515),(12716,1,11,20001),(12718,1,11,23001),(12719,1,11,50101),(20197,1,12,11),(20189,1,12,12),(20190,1,12,13),(20191,1,12,14),(20192,1,12,15),(20195,1,12,16),(20198,1,12,19),(14146,1,12,21),(14135,1,12,22),(14137,1,12,24),(14139,1,12,25),(14142,1,12,26),(14145,1,12,27),(14148,1,12,28),(14930,1,12,31),(14926,1,12,32),(14929,1,12,34),(14932,1,12,38),(13816,1,12,41),(13813,1,12,42),(13815,1,12,44),(13817,1,12,45),(14094,1,12,61),(14091,1,12,62),(14093,1,12,64),(14095,1,12,67),(14096,1,12,68),(16203,1,12,71),(16198,1,12,72),(16200,1,12,74),(16204,1,12,75),(16202,1,12,76),(16206,1,12,78),(16207,1,12,79),(20154,1,12,81),(20149,1,12,82),(20150,1,12,84),(20151,1,12,86),(20152,1,12,87),(20153,1,12,88),(20155,1,12,89),(15401,1,12,91),(15397,1,12,92),(15400,1,12,93),(15403,1,12,94),(13990,1,12,95),(12734,1,12,97),(19241,1,12,101),(19237,1,12,102),(19238,1,12,104),(19239,1,12,105),(19240,1,12,106),(19242,1,12,109),(20136,1,12,111),(20122,1,12,112),(20125,1,12,113),(20128,1,12,114),(20131,1,12,115),(20134,1,12,116),(20137,1,12,117),(20288,1,12,121),(20283,1,12,122),(20286,1,12,125),(20289,1,12,126),(13821,1,12,141),(13820,1,12,142),(13822,1,12,144),(13912,1,12,151),(13909,1,12,152),(13911,1,12,153),(13913,1,12,154),(14063,1,12,161),(14056,1,12,162),(14058,1,12,163),(14060,1,12,164),(14062,1,12,165),(14064,1,12,167),(13350,1,12,171),(13345,1,12,172),(13347,1,12,173),(13349,1,12,174),(13351,1,12,178),(13838,1,12,221),(13834,1,12,222),(13837,1,12,223),(13840,1,12,229),(13842,1,12,237),(13844,1,12,238),(13846,1,12,239),(13516,1,12,241),(13515,1,12,242),(13517,1,12,243),(20330,1,12,251),(20311,1,12,252),(20313,1,12,253),(20314,1,12,254),(20316,1,12,255),(20318,1,12,256),(20290,1,12,262),(20300,1,12,281),(20295,1,12,282),(20298,1,12,283),(20301,1,12,286),(19877,1,12,300),(20138,1,12,301),(20139,1,12,302),(16194,1,12,331),(16193,1,12,332),(16195,1,12,333),(20319,1,12,341),(20320,1,12,342),(20321,1,12,343),(20322,1,12,344),(20328,1,12,351),(20325,1,12,352),(20327,1,12,353),(20329,1,12,354),(20331,1,12,358),(19249,1,12,430),(16384,1,12,501),(16378,1,12,502),(13865,1,12,510),(20270,1,12,511),(20265,1,12,512),(20267,1,12,514),(20269,1,12,517),(20271,1,12,519),(15291,1,12,520),(15286,1,12,522),(15288,1,12,524),(15290,1,12,525),(15292,1,12,527),(20277,1,12,531),(20274,1,12,532),(20276,1,12,534),(20278,1,12,538),(20076,1,12,561),(20073,1,12,562),(20075,1,12,563),(20077,1,12,564),(16932,1,12,650),(20116,1,12,651),(20115,1,12,652),(20117,1,12,653),(17124,1,12,660),(20245,1,12,661),(20244,1,12,662),(20246,1,12,663),(13358,1,12,700),(20163,1,12,701),(20161,1,12,702),(20164,1,12,703),(20254,1,12,750),(20253,1,12,751),(20255,1,12,752),(20183,1,12,771),(20172,1,12,772),(20174,1,12,773),(15085,1,12,774),(20176,1,12,775),(20178,1,12,776),(20180,1,12,777),(20182,1,12,778),(20184,1,12,779),(14917,1,12,1001),(14916,1,12,1002),(14918,1,12,1003),(14920,1,12,1004),(14921,1,12,1005),(19247,1,12,1101),(19245,1,12,1102),(19246,1,12,1104),(19248,1,12,1109),(19233,1,12,1121),(19226,1,12,1122),(19228,1,12,1123),(19230,1,12,1124),(19232,1,12,1125),(19234,1,12,1126),(20201,1,12,1181),(20215,1,12,1182),(20204,1,12,1183),(20205,1,12,1184),(20207,1,12,1185),(20209,1,12,1186),(20211,1,12,1187),(20214,1,12,1188),(20212,1,12,1189),(20216,1,12,1191),(13827,1,12,1201),(13828,1,12,1202),(20224,1,12,1231),(20219,1,12,1232),(20220,1,12,1233),(20222,1,12,1234),(20223,1,12,1235),(20225,1,12,1236),(16302,1,12,1237),(13829,1,12,1251),(20199,1,12,1321),(20200,1,12,1322),(20156,1,12,1421),(20102,1,12,2401),(20100,1,12,2402),(20103,1,12,2403),(20110,1,12,2411),(20108,1,12,2412),(20111,1,12,2413),(20112,1,12,2414),(20168,1,12,2501),(20167,1,12,2503),(20169,1,12,2515),(20082,1,12,3200),(20341,1,12,3301),(15435,1,12,5001),(15436,1,12,5002),(20339,1,12,10001),(20334,1,12,10002),(20336,1,12,10003),(20338,1,12,10005),(20340,1,12,10008),(20237,1,12,20001),(20228,1,12,20002),(20230,1,12,20003),(20234,1,12,20004),(20236,1,12,20005),(20238,1,12,20006),(20232,1,12,20007),(20145,1,12,23001),(20142,1,12,23002),(20144,1,12,23003),(20146,1,12,23004),(19019,1,12,50101),(20309,1,12,50151),(20084,1,12,50401),(20092,1,12,50411),(20087,1,12,50412),(20089,1,12,50414),(20091,1,12,50415),(20093,1,12,50418),(20094,1,12,50420),(20095,1,12,50430),(20083,1,12,50440),(20248,1,12,55001),(20249,1,12,55002),(20307,1,12,56001),(20304,1,12,56002),(20306,1,12,56003),(20308,1,12,56004),(16742,1,12,56005),(20239,1,12,59001),(20240,1,12,59002),(20241,1,12,59003),(20261,1,12,63001),(20258,1,12,63002),(20260,1,12,63003),(20262,1,12,63004),(20250,1,12,64001),(17328,1,12,101130),(17327,1,12,101131),(17329,1,12,101132),(16009,1,12,101331),(16010,1,12,101332),(16011,1,12,101333),(19208,1,12,101701),(19209,1,12,101702),(20069,1,12,941601),(20065,1,12,941602),(20066,1,12,941603),(20067,1,12,941604),(20068,1,12,941605),(20070,1,12,941606),(12776,1,13,11),(12777,1,13,21),(12778,1,13,31),(12779,1,13,41),(12780,1,13,61),(12781,1,13,71),(12782,1,13,72),(12783,1,13,74),(12784,1,13,75),(12785,1,13,78),(12786,1,13,79),(12787,1,13,81),(12788,1,13,91),(12789,1,13,95),(12790,1,13,97),(12791,1,13,101),(12792,1,13,111),(12793,1,13,121),(12794,1,13,151),(12795,1,13,161),(12796,1,13,171),(12797,1,13,221),(12798,1,13,222),(12799,1,13,229),(12800,1,13,241),(12801,1,13,242),(12802,1,13,243),(12803,1,13,262),(12804,1,13,281),(12805,1,13,300),(12806,1,13,331),(12807,1,13,341),(12808,1,13,342),(12809,1,13,343),(12810,1,13,344),(12811,1,13,531),(12812,1,13,700),(12813,1,13,1001),(12814,1,13,1002),(12815,1,13,1003),(12816,1,13,1004),(12817,1,13,1005),(12818,1,13,1101),(12819,1,13,1181),(12820,1,13,1182),(12821,1,13,1201),(12822,1,13,1202),(12823,1,13,1231),(12824,1,13,2401),(12825,1,13,2501),(12826,1,13,2503),(12827,1,13,2515),(12828,1,13,20001),(12830,1,13,23001),(12831,1,13,50101),(12832,1,14,11),(12833,1,14,21),(12834,1,14,31),(12835,1,14,41),(12836,1,14,61),(12837,1,14,71),(12838,1,14,72),(12839,1,14,74),(12840,1,14,75),(12841,1,14,78),(12842,1,14,79),(12843,1,14,81),(12844,1,14,91),(12845,1,14,95),(12846,1,14,97),(12847,1,14,101),(12848,1,14,111),(12849,1,14,121),(12850,1,14,151),(12851,1,14,161),(12852,1,14,171),(12853,1,14,221),(12854,1,14,222),(12855,1,14,229),(12856,1,14,241),(12857,1,14,242),(12858,1,14,243),(12859,1,14,262),(12860,1,14,281),(12861,1,14,300),(12862,1,14,331),(12863,1,14,341),(12864,1,14,342),(12865,1,14,343),(12866,1,14,344),(12867,1,14,531),(12868,1,14,700),(12869,1,14,1001),(12870,1,14,1002),(12871,1,14,1003),(12872,1,14,1004),(12873,1,14,1005),(12874,1,14,1101),(12875,1,14,1181),(12876,1,14,1182),(12877,1,14,1201),(12878,1,14,1202),(12879,1,14,1231),(12880,1,14,2401),(12881,1,14,2501),(12882,1,14,2503),(12883,1,14,2515),(12884,1,14,20001),(12886,1,14,23001),(12887,1,14,50101),(12944,1,16,11),(12945,1,16,21),(12946,1,16,31),(13056,1,16,41),(13057,1,16,42),(13058,1,16,44),(13059,1,16,45),(12948,1,16,61),(12949,1,16,71),(12950,1,16,72),(12951,1,16,74),(12952,1,16,75),(12953,1,16,78),(12954,1,16,79),(12955,1,16,81),(12956,1,16,91),(12957,1,16,95),(12958,1,16,97),(12959,1,16,101),(12960,1,16,111),(12961,1,16,121),(13060,1,16,141),(13061,1,16,142),(13062,1,16,144),(12962,1,16,151),(12963,1,16,161),(12964,1,16,171),(12965,1,16,221),(12966,1,16,222),(12967,1,16,229),(12968,1,16,241),(12969,1,16,242),(12970,1,16,243),(13128,1,16,251),(13064,1,16,262),(12972,1,16,281),(12973,1,16,300),(12974,1,16,331),(12975,1,16,341),(12976,1,16,342),(12977,1,16,343),(12978,1,16,344),(12979,1,16,531),(12980,1,16,700),(12981,1,16,1001),(12982,1,16,1002),(12983,1,16,1003),(12984,1,16,1004),(12985,1,16,1005),(12986,1,16,1101),(12987,1,16,1181),(12988,1,16,1182),(12989,1,16,1201),(12990,1,16,1202),(12991,1,16,1231),(12992,1,16,2401),(12993,1,16,2501),(12994,1,16,2503),(12995,1,16,2515),(12996,1,16,20001),(12998,1,16,23001),(12999,1,16,50101),(13000,1,17,11),(13001,1,17,21),(13002,1,17,31),(13065,1,17,41),(13066,1,17,42),(13067,1,17,44),(13068,1,17,45),(13004,1,17,61),(13005,1,17,71),(13006,1,17,72),(13007,1,17,74),(13008,1,17,75),(13009,1,17,78),(13010,1,17,79),(13011,1,17,81),(13012,1,17,91),(13013,1,17,95),(13014,1,17,97),(13015,1,17,101),(13016,1,17,111),(13017,1,17,121),(13069,1,17,141),(13070,1,17,142),(13071,1,17,144),(13018,1,17,151),(13019,1,17,161),(13020,1,17,171),(13021,1,17,221),(13022,1,17,222),(13023,1,17,229),(13024,1,17,241),(13025,1,17,242),(13026,1,17,243),(13028,1,17,281),(13029,1,17,300),(13030,1,17,331),(13031,1,17,341),(13032,1,17,342),(13033,1,17,343),(13034,1,17,344),(13035,1,17,531),(13036,1,17,700),(13037,1,17,1001),(13038,1,17,1002),(13039,1,17,1003),(13040,1,17,1004),(13041,1,17,1005),(13042,1,17,1101),(13043,1,17,1181),(13044,1,17,1182),(13045,1,17,1201),(13046,1,17,1202),(13047,1,17,1231),(13048,1,17,2401),(13049,1,17,2501),(13050,1,17,2503),(13051,1,17,2515),(13052,1,17,20001),(13054,1,17,23001),(13055,1,17,50101),(14504,1,18,11),(14505,1,18,21),(14506,1,18,31),(14507,1,18,41),(14508,1,18,61),(14509,1,18,71),(14510,1,18,78),(14511,1,18,81),(14512,1,18,91),(14513,1,18,95),(14514,1,18,101),(14515,1,18,111),(14516,1,18,121),(14517,1,18,151),(14518,1,18,161),(14519,1,18,221),(14520,1,18,241),(14521,1,18,262),(14522,1,18,281),(14523,1,18,300),(14524,1,18,331),(14525,1,18,332),(14526,1,18,333),(14527,1,18,341),(14528,1,18,342),(14529,1,18,343),(14530,1,18,344),(14531,1,18,531),(14532,1,18,701),(14533,1,18,771),(14534,1,18,774),(14535,1,18,1001),(14536,1,18,1004),(14537,1,18,1101),(14538,1,18,1181),(14539,1,18,1182),(14540,1,18,1201),(14541,1,18,1231),(14542,1,18,2401),(14543,1,18,2501),(14544,1,18,2503),(14545,1,18,2515),(14546,1,18,20001),(14548,1,18,50101),(14549,1,18,59001),(15242,1,19,21),(15243,1,19,31),(15244,1,19,41),(15245,1,19,61),(15246,1,19,71),(15247,1,19,78),(15248,1,19,81),(15249,1,19,101),(15250,1,19,121),(15251,1,19,151),(15252,1,19,161),(15253,1,19,221),(15254,1,19,241),(15255,1,19,262),(15256,1,19,281),(15257,1,19,300),(15258,1,19,331),(15259,1,19,332),(15260,1,19,341),(15261,1,19,342),(15262,1,19,343),(15263,1,19,344),(15264,1,19,531),(15265,1,19,701),(15266,1,19,771),(15267,1,19,774),(15268,1,19,777),(15269,1,19,1001),(15270,1,19,1004),(15271,1,19,1101),(15272,1,19,1121),(15273,1,19,1181),(15274,1,19,1182),(15275,1,19,1201),(15276,1,19,1231),(15277,1,19,2401),(15278,1,19,2501),(15279,1,19,20001),(15281,1,19,50101),(15282,1,19,59001),(15283,1,19,63001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -15376,6 +13854,9 @@ CREATE TABLE `llx_website` ( `lang` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `otherlang` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `position` int(11) DEFAULT 0, + `lastaccess` datetime DEFAULT NULL, + `pageviews_month` bigint(20) unsigned DEFAULT 0, + `pageviews_total` bigint(20) unsigned DEFAULT 0, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_website_ref` (`ref`,`entity`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -15387,7 +13868,7 @@ CREATE TABLE `llx_website` ( LOCK TABLES `llx_website` WRITE; /*!40000 ALTER TABLE `llx_website` DISABLE KEYS */; -INSERT INTO `llx_website` VALUES (2,1,'mywebsite','My web site',1,4,'','2019-10-08 20:55:48',NULL,'2019-11-28 12:02:46',12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(3,1,'mypersonalsite','My personal web site',1,11,NULL,'2019-10-08 20:57:59',NULL,'2020-01-09 15:59:24',12,12,NULL,NULL,NULL,0,NULL,NULL,0),(4,1,'template-stellar','',1,23,'','2020-12-10 13:25:34',NULL,'2020-12-10 12:27:17',12,NULL,NULL,NULL,NULL,NULL,'en','',0),(5,1,'template-corporate','',1,11,'','2020-12-10 13:25:55',NULL,'2020-12-10 12:26:50',12,NULL,NULL,NULL,NULL,NULL,'en','',0); +INSERT INTO `llx_website` VALUES (2,1,'mywebsite','My web site',1,4,'','2019-10-08 20:55:48',NULL,'2019-11-28 12:02:46',12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,0),(3,1,'mypersonalsite','My personal web site',1,11,NULL,'2019-10-08 20:57:59',NULL,'2020-01-09 15:59:24',12,12,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0),(4,1,'template-stellar','',1,23,'','2020-12-10 13:25:34',NULL,'2020-12-10 12:27:17',12,NULL,NULL,NULL,NULL,NULL,'en','',0,NULL,0,0),(5,1,'template-corporate','',1,11,'','2020-12-10 13:25:55',NULL,'2020-12-10 12:26:50',12,NULL,NULL,NULL,NULL,NULL,'en','',0,NULL,0,0); /*!40000 ALTER TABLE `llx_website` ENABLE KEYS */; UNLOCK TABLES; @@ -15641,6 +14122,98 @@ LOCK TABLES `llx_workstation_schedule` WRITE; /*!40000 ALTER TABLE `llx_workstation_schedule` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `llx_workstation_workstation` +-- + +DROP TABLE IF EXISTS `llx_workstation_workstation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_workstation_workstation` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `ref` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '(PROV)', + `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `type` varchar(7) COLLATE utf8_unicode_ci DEFAULT NULL, + `note_public` text COLLATE utf8_unicode_ci DEFAULT NULL, + `entity` int(11) DEFAULT 1, + `note_private` text COLLATE utf8_unicode_ci DEFAULT NULL, + `date_creation` datetime NOT NULL, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_user_creat` int(11) NOT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + `import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, + `status` smallint(6) NOT NULL, + `nb_operators_required` int(11) DEFAULT NULL, + `thm_operator_estimated` double DEFAULT NULL, + `thm_machine_estimated` double DEFAULT NULL, + PRIMARY KEY (`rowid`), + KEY `idx_workstation_workstation_rowid` (`rowid`), + KEY `idx_workstation_workstation_ref` (`ref`), + KEY `fk_workstation_workstation_fk_user_creat` (`fk_user_creat`), + KEY `idx_workstation_workstation_status` (`status`), + CONSTRAINT `fk_workstation_workstation_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_workstation_workstation` +-- + +LOCK TABLES `llx_workstation_workstation` WRITE; +/*!40000 ALTER TABLE `llx_workstation_workstation` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_workstation_workstation` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_workstation_workstation_resource` +-- + +DROP TABLE IF EXISTS `llx_workstation_workstation_resource`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_workstation_workstation_resource` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_resource` int(11) DEFAULT NULL, + `fk_workstation` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_workstation_workstation_resource` +-- + +LOCK TABLES `llx_workstation_workstation_resource` WRITE; +/*!40000 ALTER TABLE `llx_workstation_workstation_resource` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_workstation_workstation_resource` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `llx_workstation_workstation_usergroup` +-- + +DROP TABLE IF EXISTS `llx_workstation_workstation_usergroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `llx_workstation_workstation_usergroup` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `fk_usergroup` int(11) DEFAULT NULL, + `fk_workstation` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `llx_workstation_workstation_usergroup` +-- + +LOCK TABLES `llx_workstation_workstation_usergroup` WRITE; +/*!40000 ALTER TABLE `llx_workstation_workstation_usergroup` DISABLE KEYS */; +/*!40000 ALTER TABLE `llx_workstation_workstation_usergroup` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `llx_zapier_hook` -- @@ -15836,4 +14409,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-12-10 13:37:32 +-- Dump completed on 2021-04-15 16:01:49 diff --git a/dev/initdemo/savedemo.sh b/dev/initdemo/savedemo.sh index 424fed6c468..7366f5b0bc9 100755 --- a/dev/initdemo/savedemo.sh +++ b/dev/initdemo/savedemo.sh @@ -259,6 +259,7 @@ export list=" --ignore-table=$base.llx_dolireport_plot --ignore-table=$base.llx_dolireport_report --ignore-table=$base.llx_domain + --ignore-table=$base.llx_ecommerce_category --ignore-table=$base.llx_ecommerce_commande --ignore-table=$base.llx_ecommerce_facture --ignore-table=$base.llx_ecommerce_product diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index 4da5ffaad58..7d781fe5b0c 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -41,14 +41,30 @@ $passwordbase=isset($argv[6])?$argv[6]:''; // Include Dolibarr environment $res=0; -if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php"; -if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php"; -if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php"; -if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php"; -if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php"; -if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only -if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only -if (! $res) die("Failed to include master.inc.php file\n"); +if (! $res && file_exists($path."../../master.inc.php")) { + $res=@include $path."../../master.inc.php"; +} +if (! $res && file_exists($path."../../htdocs/master.inc.php")) { + $res=@include $path."../../htdocs/master.inc.php"; +} +if (! $res && file_exists("../master.inc.php")) { + $res=@include "../master.inc.php"; +} +if (! $res && file_exists("../../master.inc.php")) { + $res=@include "../../master.inc.php"; +} +if (! $res && file_exists("../../../master.inc.php")) { + $res=@include "../../../master.inc.php"; +} +if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) { + $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only +} +if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) { + $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only +} +if (! $res) { + die("Failed to include master.inc.php file\n"); +} include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -58,15 +74,13 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $login=''; $server=''; -if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg)) -{ +if (preg_match('/^(.*)@(.*):(.*)$/', $sourceserver, $reg)) { $login=$reg[1]; $server=$reg[2]; $sourcefile=$reg[3]; $targetfile=basename($sourcefile); } -if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) -{ +if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) { print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n"; print "Return code: 0 if success, <>0 if error\n"; print "Warning, this script may take a long time.\n"; @@ -88,14 +102,11 @@ if (! function_exists("ssh2_connect")) { } $connection = ssh2_connect($server, 22); -if ($connection) -{ - if (! @ssh2_auth_password($connection, $login, $password)) - { +if ($connection) { + if (! @ssh2_auth_password($connection, $login, $password)) { 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"; @@ -111,12 +122,10 @@ if ($connection) ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile); $fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; - if (preg_match('/\.bz2$/', $targetfile)) - { + if (preg_match('/\.bz2$/', $targetfile)) { $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } - if (preg_match('/\.gz$/', $targetfile)) - { + if (preg_match('/\.gz$/', $targetfile)) { $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } print "Load dump with ".$fullcommand."\n"; @@ -124,13 +133,14 @@ 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 207cd07488c..4dd98451823 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -36,14 +36,30 @@ $confirm=isset($argv[1])?$argv[1]:''; // Include Dolibarr environment $res=0; -if (! $res && file_exists($path."../../master.inc.php")) $res=@include $path."../../master.inc.php"; -if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include $path."../../htdocs/master.inc.php"; -if (! $res && file_exists("../master.inc.php")) $res=@include "../master.inc.php"; -if (! $res && file_exists("../../master.inc.php")) $res=@include "../../master.inc.php"; -if (! $res && file_exists("../../../master.inc.php")) $res=@include "../../../master.inc.php"; -if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only -if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only -if (! $res) die("Failed to include master.inc.php file\n"); +if (! $res && file_exists($path."../../master.inc.php")) { + $res=@include $path."../../master.inc.php"; +} +if (! $res && file_exists($path."../../htdocs/master.inc.php")) { + $res=@include $path."../../htdocs/master.inc.php"; +} +if (! $res && file_exists("../master.inc.php")) { + $res=@include "../master.inc.php"; +} +if (! $res && file_exists("../../master.inc.php")) { + $res=@include "../../master.inc.php"; +} +if (! $res && file_exists("../../../master.inc.php")) { + $res=@include "../../../master.inc.php"; +} +if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) { + $res=@include $path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only +} +if (! $res && preg_match('/\/nltechno([^\/]*)\//', $_SERVER["PHP_SELF"], $reg)) { + $res=@include "../../../dolibarr".$reg[1]."/htdocs/master.inc.php"; // Used on dev env only +} +if (! $res) { + die("Failed to include master.inc.php file\n"); +} include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -53,8 +69,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; print "***** ".$script_file." *****\n"; print "Update dates to current year for database name = ".$db->database_name."\n"; -if (empty($confirm)) -{ +if (empty($confirm)) { print "Usage: $script_file confirm\n"; print "Return code: 0 if success, <>0 if error\n"; exit(-1); @@ -65,13 +80,13 @@ $tmp=dol_getdate(dol_now()); $tables=array( - 'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'), - 'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'), + 'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'), + 'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'), 'facture'=>array(0=>'datec', 0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'), - 'paiement'=>array(0=>'datep'), - 'bank'=>array(0=>'datev', 1=>'dateo'), - 'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'), - 'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'), + 'paiement'=>array(0=>'datep'), + 'bank'=>array(0=>'datev', 1=>'dateo'), + 'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'), + 'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture'), 'expensereport'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 4=>'date_approve', 5=>'date_refuse', 6=>'date_cancel'), 'holiday'=>array(0=>'date_debut', 1=>'date_fin', 2=>'date_create', 3=>'date_valid', 5=>'date_refuse', 6=>'date_cancel'), 'ticket'=>array(0=>'datec', 1=>'date_read', 2=>'date_close') @@ -79,53 +94,51 @@ $tables=array( $year=2010; $currentyear=$tmp['year']; -while ($year <= $currentyear) -{ - //$year=2021; - $delta1=($currentyear - $year); - $delta2=($currentyear - $year - 1); - //$delta=-1; +while ($year <= $currentyear) { + //$year=2021; + $delta1=($currentyear - $year); + $delta2=($currentyear - $year - 1); + //$delta=-1; - if ($delta1) - { - 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)"; - //$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i=0; - while ($i < $num) - { - $obj=$db->fetch_object($resql); - if ($obj) - { - print "."; - $sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set "; - $j=0; - 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)"); - $j++; - } - $sql2.=" WHERE rowid = ".$obj->rowid; - //print $sql2."\n"; - $resql2 = $db->query($sql2); - if (! $resql2) dol_print_error($db); - } - $i++; - } - } - else dol_print_error($db); - print "\n"; - } - } + if ($delta1) { + 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)"; + //$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()"; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i=0; + while ($i < $num) { + $obj=$db->fetch_object($resql); + if ($obj) { + print "."; + $sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set "; + $j=0; + 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)"); + $j++; + } + $sql2.=" WHERE rowid = ".$obj->rowid; + //print $sql2."\n"; + $resql2 = $db->query($sql2); + if (! $resql2) { + dol_print_error($db); + } + } + $i++; + } + } else { + dol_print_error($db); + } + print "\n"; + } + } - $year++; + $year++; } print "\n"; diff --git a/dev/resources/iso-normes/barcode_EAN13.txt b/dev/resources/iso-normes/barcode_EAN13.txt index 69194625126..f4496327ee4 100644 --- a/dev/resources/iso-normes/barcode_EAN13.txt +++ b/dev/resources/iso-normes/barcode_EAN13.txt @@ -1,3 +1,7 @@ +Barcode EAN 13 + +FR +== Signification des chiffres. - 2 chiffres pour le code pays ou code systeme @@ -9,6 +13,24 @@ Cette regle subit de nombreuses entorses pour ameliorer l'usage des chiffres dis Voici la liste des codes pays ou systeme : + +EN +== +Meaning of the numbers. + +- 2 digits for the country code or system code +- 5 digits for the company identifier +- 5 digits for item identifier +- 1 digit for checksum + +This rule has been twisted many times to improve the use of the available numbers. +Here is the list of country codes or system: + + + +List +==== + 00 � 13 UCC (Etats-Unis et Canada) 20 � 29 Codification interne en magasin 30 � 37 GENCOD-EAN France @@ -104,4 +126,4 @@ Voici la liste des codes pays ou systeme : 978 - 979 Livres (ISBN) 980 Refus de remboursement 981 - 982 Coupons (monnaie courante) -99 Coupons \ No newline at end of file +99 Coupons diff --git a/dev/resources/iso-normes/company_ids.txt b/dev/resources/iso-normes/company_ids.txt index 69c2af1d665..586628a4aac 100644 --- a/dev/resources/iso-normes/company_ids.txt +++ b/dev/resources/iso-normes/company_ids.txt @@ -1,2 +1,2 @@ -Spain https://incwell.eu/en/company-formation-spain/ + France https://www.economie.gouv.fr/entreprises/numeros-identification-entreprise diff --git a/dev/resources/licence/Links on GPL.txt b/dev/resources/licence/Links on GPL.txt index 0fb3b63c851..d8a5f790458 100644 --- a/dev/resources/licence/Links on GPL.txt +++ b/dev/resources/licence/Links on GPL.txt @@ -1,5 +1,6 @@ * Page with license compatibility -https://www.gnu.org/licenses/quick-guide-gplv3.fr.html +[EN] https://www.gnu.org/licenses/quick-guide-gplv3.en.html +[FR] https://www.gnu.org/licenses/quick-guide-gplv3.fr.html * FAQ on GPL license https://www.fsf.org/licensing/licenses/gpl-faq.html diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index db4945a654c..e99b8673981 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -7,7 +7,7 @@ build/html build/aps dev/tools/test/namespacemig - dev/initdata/dbf/includes + documents htdocs/core/class/lessc.class.php htdocs/custom @@ -104,9 +104,9 @@ --> - + @@ -174,8 +174,8 @@ - - + + @@ -214,8 +214,8 @@ - - + + diff --git a/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf b/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf new file mode 100644 index 00000000000..d5922909ba9 --- /dev/null +++ b/dev/setup/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf @@ -0,0 +1,20 @@ +# Fail2Ban configuration file +# +# Regexp to catch known spambots and software alike. Please verify +# that it is your intent to block IPs which were driven by +# above mentioned bots. + + +[Definition] + +# To test, you can inject this example into log +# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log +# +# then +# fail2ban-client status web-dol-bruteforce +# +# To test rule file on a existing log file +# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf + +failregex = ^ [A-Z\s]+ \s+functions_dolibarr::check_user_password_.* Authentication KO +ignoreregex = diff --git a/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf b/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf new file mode 100644 index 00000000000..edc2ca68092 --- /dev/null +++ b/dev/setup/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf @@ -0,0 +1,20 @@ +# Fail2Ban configuration file +# +# Regexp to catch known spambots and software alike. Please verify +# that it is your intent to block IPs which were driven by +# above mentioned bots. + + +[Definition] + +# To test, you can inject this example into log +# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log +# +# then +# fail2ban-client status web-dol-passforgotten +# +# To test rule file on a existing log file +# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf + +failregex = ^ [A-Z\s]+ \s+--- Access to .*/passwordforgotten.php - action=buildnewpassword +ignoreregex = diff --git a/dev/setup/fail2ban/jail.local b/dev/setup/fail2ban/jail.local new file mode 100644 index 00000000000..bd506e20812 --- /dev/null +++ b/dev/setup/fail2ban/jail.local @@ -0,0 +1,28 @@ +# +# Examle of rule you can add to fail2ban to restrict bruteforce attacks. +# + +[web-dol-passforgotten] + +; rule against call of passwordforgottenpage +enabled = true +port = http,https +filter = web-dolibarr-rulespassforgotten +logpath = >> /mypath/documents/documents/dolibarr.log +action = %(action_mw)s +bantime = 4320000 ; 50 days +findtime = 86400 ; 1 day +maxretry = 10 + +[web-dol-bruteforce] + +; rule against bruteforce hacking (login + api) +enabled = true +port = http,https +filter = web-dolibarr-rulesbruteforce +logpath = >> /mypath/documents/documents/dolibarr.log +action = %(action_mw)s +bantime = 86400 ; 1 day +findtime = 3600 ; 1 hour +maxretry = 10 + diff --git a/dev/setup/git/hooks/pre-commit b/dev/setup/git/hooks/pre-commit new file mode 100644 index 00000000000..51b7c5cf4e9 --- /dev/null +++ b/dev/setup/git/hooks/pre-commit @@ -0,0 +1,73 @@ +#!/bin/sh +# To install this precommit file: put this file in your local repo in .git/hooks directory and make it executable. +# You may need to set th DIRPHPCS to the path to your phpcs install. +# If phpcs check fail and AUTOFIX is set to 1, then it run phpcbf to fix automaticaly the syntax, and git commit is canceled. +# If you have a multiprocessor computer, you can add to the option --parallel=xx +# When running git commit, it first execute this file checking only modified files, so it is faster than running on all files +# To run the fix manually: cd ~/git/dolibarr; phpcbf -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 "fileordir" + +PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` +STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` +DIRPHPCS="" +AUTOFIX=1 + +echo "Running precommit hook in .git/hooks/pre-commit" 1>&2; + +# Determine if a file list is passed +if [ "$#" -eq 1 ] +then + oIFS=$IFS + IFS=' + ' + SFILES="$1" + IFS=$oIFS +fi +SFILES=${SFILES:-$STAGED_FILES_CMD} + +echo "Checking PHP Lint with php -l ..." + +for FILE in $SFILES +do + php -l -d display_errors=0 $PROJECT/$FILE + + result1=$? + + if [ "x$result1" != "x0" ] + then + echo "Fix the error before commit." 1>&2; + exit 1 + fi + FILES="$FILES $PROJECT/$FILE" +done + + +if [ "$FILES" != "" ] +then + echo "Running PHPCS Code Sniffer..." + + #~/vendor/bin/phpcs --version + #phpcs --standard=PSR2 --encoding=utf-8 -n -p $FILES + # Check Dolibarr standard + ${DIRPHPCS}phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES + # Check your own standard + #${DIRPHPCS}phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES + + result2=$? + + if [ "x$result2" != "x0" ] + then + # Fix standard errors + if [ "x$AUTOFIX" != "x0" ] + then + ${DIRPHPCS}phpcbf -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 $FILES + #${DIRPHPCS}phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES + echo "Found some errors in syntax rules. An automatic fix has been applied. Check it before commit." 1>&2; + exit 1 + else + echo "Found some errors in syntax rules. Fix the error(s) before commit." 1>&2; + exit 1 + fi + fi +fi + +exit 0 diff --git a/dev/setup/nginx/dolibarr b/dev/setup/nginx/dolibarr index 82b8d2dc7bf..ffda5fae609 100644 --- a/dev/setup/nginx/dolibarr +++ b/dev/setup/nginx/dolibarr @@ -5,13 +5,13 @@ server { root /path/to/your/htdocs; - # Optionnal + # Optional error_log /path/to/your/log/directory/nginx.error.log; access_log /path/to/your/log/directory/nginx.access.log; index index.php index.html index.htm; - # Optionnal + # Optional server_name your-fqdn.tld; location / { @@ -23,6 +23,6 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_read_timeout 600; include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php5-fpm.sock; // /var/run/php/php7.0-fpm.sock } } diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index fd30540c019..1a997ddc63c 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -48,8 +48,9 @@ if (! ($argv[1] && $argv[2])) { echo "Usage: php pg2mysql_cli.php [engine]\n"; exit(); } else { - if (isset($argv[3])) + if (isset($argv[3])) { $config['engine'] = $argv[3]; + } pg2mysql_large($argv[1], $argv[2]); echo <<SetKeywords('TCPDF, PDF, example, test, guide'); $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 016', PDF_HEADER_STRING); // set header and footer fonts -$pdf->setHeaderFont(Array('helvetica', '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array('helvetica', '', PDF_FONT_SIZE_DATA)); +$pdf->setHeaderFont(array('helvetica', '', PDF_FONT_SIZE_MAIN)); +$pdf->setFooterFont(array('helvetica', '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); diff --git a/dev/tools/test/testutf.php b/dev/tools/test/testutf.php index b981257ccb7..9ce8d6a7583 100644 --- a/dev/tools/test/testutf.php +++ b/dev/tools/test/testutf.php @@ -64,8 +64,8 @@ $pdf->SetKeywords('TCPDF, PDF, example, test, guide'); $pdf->SetHeaderData('', PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 038', PDF_HEADER_STRING); // set header and footer fonts -$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); -$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); +$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); +$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index b51515a42cb..956ad95b9b6 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -40,18 +40,18 @@ class autoTranslator const DIR_SEPARATOR = '/'; - /** - * Constructor - * - * @param string $_destlang Destination lang - * @param string $_refLang Ref lang - * @param string $_langDir Dir lang - * @param string $_limittofile Limit to file - * @param string $_apikey Api key - * @return void - */ - public function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey) - { + /** + * Constructor + * + * @param string $_destlang Destination lang + * @param string $_refLang Ref lang + * @param string $_langDir Dir lang + * @param string $_limittofile Limit to file + * @param string $_apikey Api key + * @return void + */ + public function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey) + { // Set enviorment variables $this->_destlang = $_destlang; @@ -59,7 +59,7 @@ class autoTranslator $this->_langDir = $_langDir.self::DIR_SEPARATOR; $this->_time = date('Y-m-d H:i:s'); $this->_limittofile = $_limittofile; - $this->_apikey = $_apikey; + $this->_apikey = $_apikey; // Translate //ini_set('default_charset','UTF-8'); @@ -77,9 +77,10 @@ class autoTranslator $files = $this->getTranslationFilesArray($this->_refLang); $counter = 1; - foreach ($files as $file) - { - if ($this->_limittofile && $this->_limittofile != $file) continue; + foreach ($files as $file) { + if ($this->_limittofile && $this->_limittofile != $file) { + continue; + } $counter++; $fileContent = null; $refPath = $this->_langDir.$this->_refLang.self::DIR_SEPARATOR.$file; @@ -88,54 +89,66 @@ class autoTranslator // Define target dirs $targetlangs=array($this->_destlang); - if ($this->_destlang == 'all') - { + if ($this->_destlang == 'all') { $targetlangs=array(); // If we must process all languages $arraytmp=dol_dir_list($this->_langDir, 'directories', 0); - foreach ($arraytmp as $dirtmp) - { - if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language + foreach ($arraytmp as $dirtmp) { + if ($dirtmp['name'] === $this->_refLang) { + continue; // We discard source language + } $tmppart=explode('_', $dirtmp['name']); - if (preg_match('/^en/i', $dirtmp['name'])) continue; // We discard en_* languages - if (preg_match('/^fr/i', $dirtmp['name'])) continue; // We discard fr_* languages - if (preg_match('/^es/i', $dirtmp['name'])) continue; // We discard es_* languages - if (preg_match('/ca_ES/i', $dirtmp['name'])) continue; // We discard es_CA language - if (preg_match('/pt_BR/i', $dirtmp['name'])) continue; // We discard pt_BR language - if (preg_match('/nl_BE/i', $dirtmp['name'])) continue; // We discard nl_BE language - if (preg_match('/^\./i', $dirtmp['name'])) continue; // We discard files .* - if (preg_match('/^CVS/i', $dirtmp['name'])) continue; // We discard CVS + if (preg_match('/^en/i', $dirtmp['name'])) { + continue; // We discard en_* languages + } + if (preg_match('/^fr/i', $dirtmp['name'])) { + continue; // We discard fr_* languages + } + if (preg_match('/^es/i', $dirtmp['name'])) { + continue; // We discard es_* languages + } + if (preg_match('/ca_ES/i', $dirtmp['name'])) { + continue; // We discard es_CA language + } + if (preg_match('/pt_BR/i', $dirtmp['name'])) { + continue; // We discard pt_BR language + } + if (preg_match('/nl_BE/i', $dirtmp['name'])) { + continue; // We discard nl_BE language + } + if (preg_match('/^\./i', $dirtmp['name'])) { + continue; // We discard files .* + } + if (preg_match('/^CVS/i', $dirtmp['name'])) { + continue; // We discard CVS + } $targetlangs[]=$dirtmp['name']; } //var_dump($targetlangs); } // Process translation of source file for each target languages - foreach ($targetlangs as $my_destlang) - { + foreach ($targetlangs as $my_destlang) { $this->_translatedFiles = array(); $destPath = $this->_langDir.$my_destlang.self::DIR_SEPARATOR.$file; // Check destination file presence - if (! file_exists($destPath)) - { + if (! file_exists($destPath)) { // No file present, we generate file 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) - { + if ($key && $value) { $newlines+=$this->translateFileLine($fileContentDest, $file, $key, $value, $my_destlang); } } @@ -159,8 +172,7 @@ class autoTranslator { $this->_time_end = date('Y-m-d H:i:s'); - if (isset($this->_translatedFiles[$file]) && count($this->_translatedFiles[$file])>0) - { + if (isset($this->_translatedFiles[$file]) && count($this->_translatedFiles[$file])>0) { $fp = fopen($destPath, 'a'); fwrite($fp, "\n"); fwrite($fp, "\n"); @@ -213,27 +225,31 @@ class autoTranslator $destValue = $this->getLineValue($line); // If translated return //print "destKey=".$destKey."\n"; - if ( trim($destKey) == trim($key) ) - { // Found already existing translation (key already exits in dest file) + if (trim($destKey) == trim($key)) { // Found already existing translation (key already exits in dest file) return 0; } } if ($key == 'CHARSET') { - $val=$this->_outputpagecode; - } elseif (preg_match('/^Format/', $key)) { - $val=$value; - } elseif ($value=='-') { - $val=$value; - } else { + $val=$this->_outputpagecode; + } elseif (preg_match('/^Format/', $key)) { + $val=$value; + } elseif ($value=='-') { + $val=$value; + } else { // If not translated then translate - if ($this->_outputpagecode == 'UTF-8') $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)); - else $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2))); + if ($this->_outputpagecode == 'UTF-8') { + $val=$this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2)); + } else { + $val=utf8_decode($this->translateTexts(array($value), substr($this->_refLang, 0, 2), substr($my_destlang, 0, 2))); + } } $val=trim($val); - if (empty($val)) return 0; + if (empty($val)) { + return 0; + } $this->_translatedFiles[$file][] = $key . '=' . $val ; return 1; @@ -293,9 +309,13 @@ class autoTranslator { // We want to be sure that src_lang and dest_lang are using 2 chars only $tmp=explode('_', $src_lang); - if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $src_lang=$tmp[0]; + if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) { + $src_lang=$tmp[0]; + } $tmp=explode('_', $dest_lang); - if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) $dest_lang=$tmp[0]; + if (! empty($tmp[1]) && $tmp[0] == $tmp[1]) { + $dest_lang=$tmp[0]; + } //setting language pair $lang_pair = $src_lang.'|'.$dest_lang; @@ -306,17 +326,16 @@ class autoTranslator // Define GET URL v1 //$url = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=".urlencode($src_text_to_translate)."&langpair=".urlencode($lang_pair); // Example: http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=Setup%20area&langpair=en_US|fr_FR - // Define GET URL v2 + // Define GET URL v2 $url = "https://www.googleapis.com/language/translate/v2?key=".$this->_apikey."&q=".urlencode($src_text_to_translate)."&source=".urlencode($src_lang)."&target=".urlencode($dest_lang); // Example: https://www.googleapis.com/language/translate/v2?key=_apikey&q=Setup%20area&source=en_US&target=fr_FR // Send request //print "Url to translate: ".$url."\n"; - if (! function_exists("curl_init")) - { - print "Error, your PHP does not support curl functions.\n"; - die(); + if (! function_exists("curl_init")) { + print "Error, your PHP does not support curl functions.\n"; + die(); } $ch = curl_init(); @@ -331,9 +350,8 @@ class autoTranslator $json = json_decode($body, true); if ((! empty($json['responseStatus']) && $json['responseStatus'] != 200) - || count($json['data']['translations']) == 0) - { - print "Error: ".$json['responseStatus']." ".$url."\n"; + || count($json['data']['translations']) == 0) { + print "Error: ".$json['responseStatus']." ".$url."\n"; return false; } @@ -345,5 +363,5 @@ class autoTranslator //print "OK ".join('',$src_texts).' => '.$rep."\n"; return $rep; - } + } } diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php index fd02febbdcc..a8f6565b891 100755 --- a/dev/translation/autotranslator.php +++ b/dev/translation/autotranslator.php @@ -32,8 +32,8 @@ $path=dirname(__FILE__).'/'; // Test if batch mode if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; - exit; + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; + exit; } // Include Dolibarr environment @@ -56,10 +56,10 @@ $dir=DOL_DOCUMENT_ROOT."/langs"; // Check parameters if (! isset($argv[3])) { - print "Usage: ".$script_file." lang_code_src lang_code_dest|all APIKEY [langfile.lang]\n"; - print "Example: ".$script_file." en_US pt_PT 123456\n"; - print "Rem: lang_code to use can be found on https://translate.google.com\n"; - exit; + print "Usage: ".$script_file." lang_code_src lang_code_dest|all APIKEY [langfile.lang]\n"; + print "Example: ".$script_file." en_US pt_PT 123456\n"; + print "Rem: lang_code to use can be found on https://translate.google.com\n"; + exit; } // Show parameters @@ -67,21 +67,17 @@ print 'Argument 1='.$argv[1]."\n"; print 'Argument 2='.$argv[2]."\n"; print 'Argument 3='.$argv[3]."\n"; $file=''; -if (isset($argv[4])) -{ +if (isset($argv[4])) { $file=$argv[4]; print 'Argument 4='.$argv[4]."\n"; } print 'Files will be generated/updated in directory '.$dir."\n"; -if ($argv[2] != 'all') -{ - if (! is_dir($dir.'/'.$argv[2])) - { +if ($argv[2] != 'all') { + if (! is_dir($dir.'/'.$argv[2])) { print 'Create directory '.$dir.'/'.$argv[2]."\n"; $result=mkdir($dir.'/'.$argv[2]); - if (! $result) - { + if (! $result) { $db->close(); return -1; } diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index 0268fc94ed8..39db0a55764 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -25,18 +25,16 @@ $path=dirname(__FILE__).'/'; $web=0; // Test if batch mode -if (substr($sapi_type, 0, 3) == 'cgi') -{ - $web=1; +if (substr($sapi_type, 0, 3) == 'cgi') { + $web=1; } -if ($web) -{ - echo ""; - echo ""; +if ($web) { + echo ""; + echo ""; - echo ""; - echo ""; + echo ""; } echo "If you call this with argument \"unused=true\" it searches for the translation strings that exist in en_US but are never used.\n"; -if ($web) print "
"; +if ($web) { + print "
"; +} echo "IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly.\n"; -if ($web) print "
"; +if ($web) { + print "
"; +} @@ -105,8 +107,7 @@ $workdir = $htdocs."langs/en_US/"; $files = scandir($workdir); -if (empty($files)) -{ +if (empty($files)) { echo "Can't scan workdir = ".$workdir; exit; } @@ -115,18 +116,17 @@ $dups=array(); $exludefiles = array('.','..','README'); $files = array_diff($files, $exludefiles); // To force a file: $files=array('myfile.lang'); -if (isset($argv[2])) -{ - $files = array($argv[2]); +if (isset($argv[2])) { + $files = array($argv[2]); } $langstrings_3d = array(); $langstrings_full = array(); -foreach ($files AS $file) { +foreach ($files as $file) { $path_file = pathinfo($file); // we're only interested in .lang files if ($path_file['extension']=='lang') { $content = file($workdir.$file); - foreach ($content AS $line => $row) { + foreach ($content as $line => $row) { // don't want comment lines if (substr($row, 0, 1) !== '#') { // don't want lines without the separator (why should those even be here, anyway...) @@ -142,29 +142,29 @@ foreach ($files AS $file) { } } -foreach ($langstrings_3d AS $filename => $file) -{ - foreach ($file AS $linenum => $value) - { +foreach ($langstrings_3d as $filename => $file) { + foreach ($file as $linenum => $value) { $keys = array_keys($langstrings_full, $value); - if (count($keys)>1) - { - foreach ($keys AS $key) { + if (count($keys)>1) { + foreach ($keys as $key) { $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]); } } } } -if ($web) print "

"; +if ($web) { + print "

"; +} print "Duplicate strings in lang files in $workdir - ".count($dups)." found\n"; -if ($web) print "

"; +if ($web) { + print ""; +} -if ($web) -{ - echo ''."\n"; - echo "\n"; - echo "\n"; +if ($web) { + echo '
#StringFile and lines
'."\n"; + echo "\n"; + echo "\n"; } $sduplicateinsamefile=''; @@ -173,216 +173,419 @@ $sininstallandadmin=''; $sother=''; $count = 0; -foreach ($dups as $string => $pages) -{ +foreach ($dups as $string => $pages) { $count++; $s=''; // Keyword $string - if ($web) $s.=""; - if ($web) $s.=""; - if ($web) $s.=""; + } + if ($web) { + $s.=""; + } + if ($web) { + $s.=""; - if ($web) $s.=""; + } + if ($web) { + $s.=""; } - if ($web) $s.=""; $s.="\n"; - if ($duplicateinsamefile) $sduplicateinsamefile .= $s; - elseif ($inmain) $sinmainandother .= $s; - elseif ($inadmin) $sininstallandadmin .= $s; - else $sother .= $s; + if ($duplicateinsamefile) { + $sduplicateinsamefile .= $s; + } elseif ($inmain) { + $sinmainandother .= $s; + } elseif ($inadmin) { + $sininstallandadmin .= $s; + } else { + $sother .= $s; + } } -if (! $web) print "\n***** Entries duplicated in same file\n"; +if (! $web) { + print "\n***** Entries duplicated in same file\n"; +} print $sduplicateinsamefile; -if (! $web && empty($sduplicateinsamefile)) print "None\n"; -if (! $web) print "\n"; +if (! $web && empty($sduplicateinsamefile)) { + print "None\n"; +} +if (! $web) { + print "\n"; +} -if (! $web) print "***** Entries in main and another (keep only entry in main)\n"; +if (! $web) { + print "***** Entries in main and another (keep only entry in main)\n"; +} print $sinmainandother; -if (! $web && empty($sinmainandother)) print "None\n"; -if (! $web) print "\n"; +if (! $web && empty($sinmainandother)) { + print "None\n"; +} +if (! $web) { + print "\n"; +} -if (! $web) print "***** Entries in admin and another\n"; +if (! $web) { + print "***** Entries in admin and another\n"; +} print $sininstallandadmin; -if (! $web && empty($sininstallandadmin)) print "None\n"; -if (! $web) print "\n"; +if (! $web && empty($sininstallandadmin)) { + print "None\n"; +} +if (! $web) { + print "\n"; +} -if (! $web) print "***** Other\n"; +if (! $web) { + print "***** Other\n"; +} print $sother; -if (! $web && empty($sother)) print "None\n"; -if (! $web) print "\n"; +if (! $web && empty($sother)) { + print "None\n"; +} +if (! $web) { + print "\n"; +} -if ($web) -{ - echo "\n"; - echo "
#StringFile and lines
"; - if ($web) $s.=$count; - if ($web) $s.=""; + if ($web) { + $s.="
"; + } + if ($web) { + $s.=$count; + } + if ($web) { + $s.=""; + } $s.=$string; - if ($web) $s.=""; - if (! $web) $s.= ' : '; + if ($web) { + $s.=""; + } + if (! $web) { + $s.= ' : '; + } // Loop on each files keyword was found - $duplicateinsamefile=0; + $duplicateinsamefile=0; $inmain=0; - $inadmin=0; - foreach ($pages AS $file => $lines) - { - if ($file == 'main.lang') { $inmain=1; $inadmin=0; } - if ($file == 'admin.lang' && ! $inmain) { $inadmin=1; } + $inadmin=0; + foreach ($pages as $file => $lines) { + if ($file == 'main.lang') { + $inmain=1; $inadmin=0; + } + if ($file == 'admin.lang' && ! $inmain) { + $inadmin=1; + } - $s.=$file." "; + $s.=$file." "; - // Loop on each line keword was found into file. - $listoffilesforthisentry=array(); - foreach ($lines as $line => $translatedvalue) - { - if (! empty($listoffilesforthisentry[$file])) $duplicateinsamefile=1; - $listoffilesforthisentry[$file]=1; + // Loop on each line keword was found into file. + $listoffilesforthisentry=array(); + foreach ($lines as $line => $translatedvalue) { + if (! empty($listoffilesforthisentry[$file])) { + $duplicateinsamefile=1; + } + $listoffilesforthisentry[$file]=1; $s.= "(".$line." - ".htmlentities($translatedvalue).") "; } - if ($web) $s.="
"; + if ($web) { + $s.="
"; + } + } + if ($web) { + $s.="
\n"; +if ($web) { + echo "\n"; + echo "\n"; } // STEP 2 - Search key not used -if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) -{ - print "***** Strings in en_US that are never used:\n"; +if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($argv[1]) && $argv[1]=='unused=true')) { + print "***** Strings in en_US that are never used:\n"; - $unused=array(); - foreach ($langstrings_dist AS $value => $line) - { - $qualifiedforclean=1; - // Check if we must keep this key to be into file for removal - if (preg_match('/^Module\d+/', $value)) $qualifiedforclean=0; - if (preg_match('/^Permission\d+/', $value)) $qualifiedforclean=0; - if (preg_match('/^PermissionAdvanced\d+/', $value)) $qualifiedforclean=0; - if (preg_match('/^ProfId\d+/', $value)) $qualifiedforclean=0; - if (preg_match('/^Delays_/', $value)) $qualifiedforclean=0; - if (preg_match('/^BarcodeDesc/', $value)) $qualifiedforclean=0; - if (preg_match('/^Extrafield/', $value)) $qualifiedforclean=0; - if (preg_match('/^LocalTax/', $value)) $qualifiedforclean=0; - if (preg_match('/^Country/', $value)) $qualifiedforclean=0; - if (preg_match('/^Civility/', $value)) $qualifiedforclean=0; - if (preg_match('/^Currency/', $value)) $qualifiedforclean=0; - if (preg_match('/^DemandReasonTypeSRC/', $value)) $qualifiedforclean=0; - if (preg_match('/^PaperFormat/', $value)) $qualifiedforclean=0; - if (preg_match('/^Duration/', $value)) $qualifiedforclean=0; - if (preg_match('/^AmountLT/', $value)) $qualifiedforclean=0; - if (preg_match('/^TotalLT/', $value)) $qualifiedforclean=0; - if (preg_match('/^Month/', $value)) $qualifiedforclean=0; - if (preg_match('/^MonthShort/', $value)) $qualifiedforclean=0; - if (preg_match('/^Day\d/', $value)) $qualifiedforclean=0; - if (preg_match('/^Short/', $value)) $qualifiedforclean=0; - if (preg_match('/^ExportDataset_/', $value)) $qualifiedforclean=0; - if (preg_match('/^ImportDataset_/', $value)) $qualifiedforclean=0; - if (preg_match('/^ActionAC_/', $value)) $qualifiedforclean=0; - if (preg_match('/^TypeLocaltax/', $value)) $qualifiedforclean=0; - if (preg_match('/^StatusProspect/', $value)) $qualifiedforclean=0; - if (preg_match('/^PL_/', $value)) $qualifiedforclean=0; - if (preg_match('/^TE_/', $value)) $qualifiedforclean=0; - if (preg_match('/^JuridicalStatus/', $value)) $qualifiedforclean=0; - if (preg_match('/^CalcMode/', $value)) $qualifiedforclean=0; - if (preg_match('/^newLT/', $value)) $qualifiedforclean=0; - if (preg_match('/^LT[0-9]/', $value)) $qualifiedforclean=0; - if (preg_match('/^TypeContact_contrat_/', $value)) $qualifiedforclean=0; - if (preg_match('/^ErrorPriceExpression/', $value)) $qualifiedforclean=0; - if (preg_match('/^Language_/', $value)) $qualifiedforclean=0; - if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0; - if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0; - if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0; - if (preg_match('/InDolibarr$/', $value)) $qualifiedforclean=0; - // admin.lang - if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) $qualifiedforclean=0; - if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) $qualifiedforclean=0; - // boxes.lang - if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0; - if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0; - // install.lang - if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0; + $unused=array(); + foreach ($langstrings_dist as $value => $line) { + $qualifiedforclean=1; + // Check if we must keep this key to be into file for removal + if (preg_match('/^Module\d+/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Permission\d+/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^PermissionAdvanced\d+/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ProfId\d+/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Delays_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^BarcodeDesc/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Extrafield/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^LocalTax/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Country/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Civility/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Currency/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^DemandReasonTypeSRC/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^PaperFormat/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Duration/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^AmountLT/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^TotalLT/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Month/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^MonthShort/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Day\d/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Short/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ExportDataset_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ImportDataset_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ActionAC_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^TypeLocaltax/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^StatusProspect/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^PL_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^TE_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^JuridicalStatus/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^CalcMode/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^newLT/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^LT[0-9]/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^TypeContact_contrat_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ErrorPriceExpression/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^Language_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^DescADHERENT_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^SubmitTranslation/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^ModuleCompanyCode/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/InDolibarr$/', $value)) { + $qualifiedforclean=0; + } + // admin.lang + if (preg_match('/^DAV_ALLOW_PUBLIC_DIR/i', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^DAV_ALLOW_ECM_DIR/i', $value)) { + $qualifiedforclean=0; + } + // boxes.lang + if (preg_match('/^BoxTitleLast/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^BoxTitleLatest/', $value)) { + $qualifiedforclean=0; + } + // install.lang + if (preg_match('/^KeepDefaultValues/', $value)) { + $qualifiedforclean=0; + } // mail.lang - if (preg_match('/MailingModuleDesc/i', $value)) $qualifiedforclean=0; - // main.lang - if (preg_match('/^Duration/', $value)) $qualifiedforclean=0; - if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0; - if (preg_match('/^DateFormat/', $value)) $qualifiedforclean=0; - if (preg_match('/^.b$/', $value)) $qualifiedforclean=0; - if (preg_match('/^.*Bytes$/', $value)) $qualifiedforclean=0; - if (preg_match('/^NoteSomeFeaturesAreDisabled/', $value)) $qualifiedforclean=0; - if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) $qualifiedforclean=0; + if (preg_match('/MailingModuleDesc/i', $value)) { + $qualifiedforclean=0; + } + // main.lang + if (preg_match('/^Duration/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^FormatDate/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^DateFormat/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^.b$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^.*Bytes$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^NoteSomeFeaturesAreDisabled/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^(DoTest|Under|Limits|Cards|CurrentValue|DateLimit|DateAndHour|NbOfLines|NbOfObjects|NbOfReferes|TotalTTCShort|VATs)/', $value)) { + $qualifiedforclean=0; + } // modulebuilder - if (preg_match('/^ModuleBuilderDesc/', $value)) $qualifiedforclean=0; - // orders - if (preg_match('/^OrderSource/', $value)) $qualifiedforclean=0; - if (preg_match('/^TypeContact_/', $value)) $qualifiedforclean=0; - // other.lang - if (preg_match('/^Notify_/', $value)) $qualifiedforclean=0; - if (preg_match('/^PredefinedMail/', $value)) $qualifiedforclean=0; - if (preg_match('/^DemoCompany/', $value)) $qualifiedforclean=0; - if (preg_match('/^WeightUnit/', $value)) $qualifiedforclean=0; - if (preg_match('/^LengthUnit/', $value)) $qualifiedforclean=0; - if (preg_match('/^SurfaceUnit/', $value)) $qualifiedforclean=0; - if (preg_match('/^VolumeUnit/', $value)) $qualifiedforclean=0; - if (preg_match('/^SizeUnit/', $value)) $qualifiedforclean=0; - if (preg_match('/^EMailText/', $value)) $qualifiedforclean=0; - if (preg_match('/ById$/', $value)) $qualifiedforclean=0; - if (preg_match('/ByLogin$/', $value)) $qualifiedforclean=0; - // printing - if (preg_match('/PrintingDriverDesc$/', $value)) $qualifiedforclean=0; - if (preg_match('/PrintTestDesc$/', $value)) $qualifiedforclean=0; - // products - if (preg_match('/GlobalVariableUpdaterType$/', $value)) $qualifiedforclean=0; - if (preg_match('/GlobalVariableUpdaterHelp$/', $value)) $qualifiedforclean=0; - if (preg_match('/OppStatus/', $value)) $qualifiedforclean=0; - if (preg_match('/AvailabilityType/', $value)) $qualifiedforclean=0; - if (preg_match('/CardProduct/', $value)) $qualifiedforclean=0; + if (preg_match('/^ModuleBuilderDesc/', $value)) { + $qualifiedforclean=0; + } + // orders + if (preg_match('/^OrderSource/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^TypeContact_/', $value)) { + $qualifiedforclean=0; + } + // other.lang + if (preg_match('/^Notify_/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^PredefinedMail/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^DemoCompany/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^WeightUnit/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^LengthUnit/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^SurfaceUnit/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^VolumeUnit/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^SizeUnit/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/^EMailText/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/ById$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/ByLogin$/', $value)) { + $qualifiedforclean=0; + } + // printing + if (preg_match('/PrintingDriverDesc$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/PrintTestDesc$/', $value)) { + $qualifiedforclean=0; + } + // products + if (preg_match('/GlobalVariableUpdaterType$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/GlobalVariableUpdaterHelp$/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/OppStatus/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/AvailabilityType/', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/CardProduct/', $value)) { + $qualifiedforclean=0; + } - if (preg_match('/sms/i', $value)) $qualifiedforclean=0; - if (preg_match('/TF_/i', $value)) $qualifiedforclean=0; - if (preg_match('/WithBankUsing/i', $value)) $qualifiedforclean=0; - if (preg_match('/descWORKFLOW_/i', $value)) $qualifiedforclean=0; + if (preg_match('/sms/i', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/TF_/i', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/WithBankUsing/i', $value)) { + $qualifiedforclean=0; + } + if (preg_match('/descWORKFLOW_/i', $value)) { + $qualifiedforclean=0; + } - if (! $qualifiedforclean) - { - continue; - } + if (! $qualifiedforclean) { + continue; + } - //$search = '\'trans("'.$value.'")\''; - $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"'; + //$search = '\'trans("'.$value.'")\''; + $search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"'; $string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*'; //print $string."
\n"; exec($string, $output); if (empty($output)) { - $unused[$value] = $line; - echo $line; // $trad contains the \n - } - else { - unset($output); - //print 'X'.$output.'Y'; + $unused[$value] = $line; + echo $line; // $trad contains the \n + } else { + unset($output); + //print 'X'.$output.'Y'; } } - if (empty($unused)) print "No string not used found.\n"; - 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)); - print "To remove from original file, run command :\n"; - if (($argv[2]?$argv[2]:"")) print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; "; - print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:""); - if (($argv[2]?$argv[2]:"")) print "; rm ".($argv[2]?$argv[2]:"").".tmp;\n"; + if (empty($unused)) { + print "No string not used found.\n"; + } 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)); + print "To remove from original file, run command :\n"; + if (($argv[2]?$argv[2]:"")) { + print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; "; + } + print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:""); + if (($argv[2]?$argv[2]:"")) { + print "; rm ".($argv[2]?$argv[2]:"").".tmp;\n"; + } } } echo "\n"; -if ($web) -{ - echo "\n"; - echo "\n"; +if ($web) { + echo "\n"; + echo "\n"; } exit; diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index adc5a706d06..f3287db6128 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -63,8 +63,7 @@ $lSecondary = isset($argv[2])?$argv[2]:''; $lEnglish = 'en_US'; $filesToProcess = isset($argv[3])?$argv[3]:''; -if (empty($lPrimary) || empty($lSecondary) || empty($filesToProcess)) -{ +if (empty($lPrimary) || empty($lSecondary) || empty($filesToProcess)) { $rc = 1; $msg = '***** Script to clean language files *****'."\n"; $msg.= 'Usage: ./dev/translation/strip_language_file.php xx_XX xx_YY [file.lang|all]'."\n"; @@ -77,8 +76,7 @@ $aSecondary = array(); $aEnglish = array(); // Define array $filesToProcess -if ($filesToProcess == 'all') -{ +if ($filesToProcess == 'all') { $dir = new DirectoryIterator('htdocs/langs/'.$lPrimary); while ($dir->valid()) { if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { @@ -87,15 +85,15 @@ if ($filesToProcess == 'all') $dir->next(); } $filesToProcess=$files; +} else { + $filesToProcess=explode(',', $filesToProcess); } -else $filesToProcess=explode(',', $filesToProcess); // Arguments should be OK here. // Loop on each file -foreach ($filesToProcess as $fileToProcess) -{ +foreach ($filesToProcess as $fileToProcess) { $lPrimaryFile = 'htdocs/langs/'.$lPrimary.'/'.$fileToProcess; $lSecondaryFile = 'htdocs/langs/'.$lSecondary.'/'.$fileToProcess; $lEnglishFile = 'htdocs/langs/'.$lEnglish.'/'.$fileToProcess; @@ -103,21 +101,21 @@ foreach ($filesToProcess as $fileToProcess) print "---- Process language file ".$lSecondaryFile."\n"; - if ( ! is_readable($lPrimaryFile) ) { + if (! is_readable($lPrimaryFile)) { $rc = 2; $msg = "Cannot read primary language file $lPrimaryFile."; print $msg . " (rc=$rc).\n"; exit($rc); } - if ( ! is_readable($lSecondaryFile) ) { + if (! is_readable($lSecondaryFile)) { $rc = 3; $msg = "Cannot read secondary language file $lSecondaryFile. We discard this file."; print $msg . "\n"; continue; } - if ( ! is_readable($lEnglishFile) ) { + if (! is_readable($lEnglishFile)) { $rc = 3; $msg = "Cannot read english language file $lEnglishFile. We discard this file."; print $msg . "\n"; @@ -126,25 +124,23 @@ foreach ($filesToProcess as $fileToProcess) // Start reading and parsing Secondary - if ( $handle = fopen($lSecondaryFile, 'r') ) - { + if ($handle = fopen($lSecondaryFile, 'r')) { print "Read Secondary File $lSecondaryFile:\n"; $cnt = 0; - while (($line = fgets($handle)) !== false) - { + while (($line = fgets($handle)) !== false) { $cnt++; // strip comments - if ( preg_match("/^\w*#/", $line) ) { + if (preg_match("/^\w*#/", $line)) { continue; } // strip empty lines - if ( preg_match("/^\w*$/", $line) ) { + if (preg_match("/^\w*$/", $line)) { continue; } $a = mb_split('=', trim($line), 2); - if ( count($a) != 2 ) { + if (count($a) != 2) { print "ERROR in file $lSecondaryFile, line $cnt: " . trim($line) . "\n"; continue; } @@ -152,29 +148,27 @@ foreach ($filesToProcess as $fileToProcess) list($key, $value) = $a; // key is redundant - if ( array_key_exists($key, $aSecondary) ) { + if (array_key_exists($key, $aSecondary)) { print "Key $key is redundant in file $lSecondaryFile (line: $cnt).\n"; continue; } // String has no value - if ( $value == '' ) { + if ($value == '') { print "Key $key has no value in file $lSecondaryFile (line: $cnt).\n"; continue; } $aSecondary[$key] = trim($value); } - if ( ! feof($handle) ) - { + if (! feof($handle)) { $rc = 5; $msg = "Unexpected fgets() fail"; print $msg . " (rc=$rc).\n"; exit($rc); } fclose($handle); - } - else { + } else { $rc = 6; $msg = "Cannot open file $lSecondaryFile"; print $msg . " (rc=$rc).\n"; @@ -184,25 +178,23 @@ foreach ($filesToProcess as $fileToProcess) // Start reading and parsing English - if ( $handle = fopen($lEnglishFile, 'r') ) - { + if ($handle = fopen($lEnglishFile, 'r')) { print "Read English File $lEnglishFile:\n"; $cnt = 0; - while (($line = fgets($handle)) !== false) - { + while (($line = fgets($handle)) !== false) { $cnt++; // strip comments - if ( preg_match("/^\w*#/", $line) ) { + if (preg_match("/^\w*#/", $line)) { continue; } // strip empty lines - if ( preg_match("/^\w*$/", $line) ) { + if (preg_match("/^\w*$/", $line)) { continue; } $a = mb_split('=', trim($line), 2); - if ( count($a) != 2 ) { + if (count($a) != 2) { print "ERROR in file $lEnglishFile, line $cnt: " . trim($line) . "\n"; continue; } @@ -210,29 +202,27 @@ foreach ($filesToProcess as $fileToProcess) list($key, $value) = $a; // key is redundant - if ( array_key_exists($key, $aEnglish) ) { + if (array_key_exists($key, $aEnglish)) { print "Key $key is redundant in file $lEnglishFile (line: $cnt).\n"; continue; } // String has no value - if ( $value == '' ) { + if ($value == '') { print "Key $key has no value in file $lEnglishFile (line: $cnt).\n"; continue; } $aEnglish[$key] = trim($value); } - if ( ! feof($handle) ) - { + if (! feof($handle)) { $rc = 5; $msg = "Unexpected fgets() fail"; print $msg . " (rc=$rc).\n"; exit($rc); } fclose($handle); - } - else { + } else { $rc = 6; $msg = "Cannot open file $lEnglishFile"; print $msg . " (rc=$rc).\n"; @@ -246,10 +236,8 @@ foreach ($filesToProcess as $fileToProcess) $arrayofkeytoalwayskeep=array('DIRECTION','FONTFORPDF','FONTSIZEFORPDF','SeparatorDecimal','SeparatorThousand'); - if ( $handle = fopen($lPrimaryFile, 'r') ) - { - if ( ! $oh = fopen($output, 'w') ) - { + if ($handle = fopen($lPrimaryFile, 'r')) { + if (! $oh = fopen($output, 'w')) { print "ERROR in writing to file ".$output."\n"; exit; } @@ -259,21 +247,20 @@ foreach ($filesToProcess as $fileToProcess) fwrite($oh, "# Dolibarr language file - Source file is en_US - ".(preg_replace('/\.lang$/', '', $fileToProcess))."\n"); $cnt = 0; - while (($line = fgets($handle)) !== false) - { + while (($line = fgets($handle)) !== false) { $cnt++; // strip comments - if ( preg_match("/^\w*#/", $line) ) { + if (preg_match("/^\w*#/", $line)) { continue; } // strip empty lines - if ( preg_match("/^\w*$/", $line) ) { + if (preg_match("/^\w*$/", $line)) { continue; } $a = mb_split('=', trim($line), 2); - if ( count($a) != 2 ) { + if (count($a) != 2) { print "ERROR in file $lPrimaryFile, line $cnt: " . trim($line) . "\n"; continue; } @@ -281,17 +268,16 @@ foreach ($filesToProcess as $fileToProcess) list($key, $value) = $a; // key is redundant - if ( array_key_exists($key, $aPrimary) ) { + if (array_key_exists($key, $aPrimary)) { 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; } // String has no value - if ( $value == '' ) { + if ($value == '') { print "Key $key has no value in file $lPrimaryFile (line: $cnt).\n"; continue; } @@ -305,28 +291,23 @@ foreach ($filesToProcess as $fileToProcess) //print "Found primary key = ".$key."\n"; // Key not in other file - if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)) - { + if (in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)) { //print "Key $key is a key we always want to see into secondary file (line: $cnt).\n"; - } - elseif ( ! array_key_exists($key, $aSecondary)) - { + } elseif (! array_key_exists($key, $aSecondary)) { //print "Key $key does NOT exist in secondary language (line: $cnt).\n"; continue; } // String exists in both files and value into alternative language differs from main language but also from english files - if ( - (! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key] - && ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key]) + if ((! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key] + && ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key]) || in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key) - ) - { + ) { //print "Key $key differs (aSecondary=".$aSecondary[$key].", aPrimary=".$aPrimary[$key].", aEnglish=".$aEnglish[$key].") so we add it into new secondary language (line: $cnt).\n"; fwrite($oh, $key."=".(empty($aSecondary[$key])?$aPrimary[$key]:$aSecondary[$key])."\n"); } } - if ( ! feof($handle) ) { + if (! feof($handle)) { $rc = 7; $msg = "Unexpected fgets() fail"; print $msg . " (rc=$rc).\n"; @@ -334,8 +315,7 @@ foreach ($filesToProcess as $fileToProcess) } fclose($oh); fclose($handle); - } - else { + } else { $rc = 8; $msg = "Cannot open file $lPrimaryFile"; print $msg . " (rc=$rc).\n"; diff --git a/doc/images/dolibarr_screenshot12_1920x1080.jpg b/doc/images/dolibarr_screenshot12_1920x1080.jpg new file mode 100644 index 00000000000..72ae74cb00f Binary files /dev/null and b/doc/images/dolibarr_screenshot12_1920x1080.jpg differ diff --git a/doc/index.html b/doc/index.html index 5c655136e3e..333f96099c3 100644 --- a/doc/index.html +++ b/doc/index.html @@ -6,18 +6,15 @@ -This directory contains several subdirectories with entries for -informations on Dolibarr.
-But if you are looking for other resources (downloads, documentation, addons, ...), you can find this -on Internet on web following sites:
-
-* Dolibarr wiki (documentation)
+This directory contains several subdirectories with entries for informations on Dolibarr.
+But if you are looking for other resources (downloads, documentation, addons, ...), you can find this on Internet on web following sites:
+
* Dolibarr portal (official website)

-* Dolibarr demo (online)
+* Dolibarr wiki (documentation)

-* DoliWamp, the Dolibarr for Windows
+* Dolibarr demo (online)

* DoliStore (official addons/plugins market place)
diff --git a/doc/user/README-DE.md b/doc/user/README-DE.md index ea9458f4563..4c7a635a522 100644 --- a/doc/user/README-DE.md +++ b/doc/user/README-DE.md @@ -6,7 +6,10 @@ Benutzeranleitung -------------------------------- Alle Dolibarr-Informationen sind online verfuegbar ueber die Webseiten: -https://www.dolibarr.de -oder -https://www.dolibarr.org -https://wiki.dolibarr.org + + +https://www.dolibarr.de (de) oder https://www.dolibarr.org (intl) + + +https://wiki.dolibarr.org/index.php/Hauptseite (de) + diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index caa443ba589..6f510ad3706 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -45,6 +45,9 @@ $search_label = GETPOST('search_label', 'alpha'); $search_labelshort = GETPOST('search_labelshort', 'alpha'); $search_accountparent = GETPOST('search_accountparent', 'alpha'); $search_pcgtype = GETPOST('search_pcgtype', 'alpha'); +$toselect = GETPOST('toselect', 'array'); +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$confirm = GETPOST('confirm', 'alpha'); $chartofaccounts = GETPOST('chartofaccounts', 'int'); @@ -52,20 +55,30 @@ $permissiontoadd = $user->rights->accounting->chartofaccount; $permissiontodelete = $user->rights->accounting->chartofaccount; // Security check -if ($user->socid > 0) accessforbidden(); -if (!$user->rights->accounting->chartofaccount) accessforbidden(); +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 +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 = "aa.account_number"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "aa.account_number"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $arrayfields = array( 'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1), @@ -77,7 +90,9 @@ $arrayfields = array( 'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1) ); -if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['aa.reconcilable']); +if ($conf->global->MAIN_FEATURES_LEVEL < 2) { + unset($arrayfields['aa.reconcilable']); +} $accounting = new AccountingAccount($db); @@ -86,21 +101,34 @@ $accounting = new AccountingAccount($db); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha')) { $massaction = ''; } +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'); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been monowraponalldified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if (!empty($cancel)) $action = ''; +if (empty($reshook)) { + if (!empty($cancel)) { + $action = ''; + } + $objectclass = 'AccountingAccount'; + $uploaddir = $conf->accounting->multidir_output[$conf->entity]; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + + if ($action == "delete") { + $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 - { + 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_account = ""; $search_label = ""; $search_labelshort = ""; @@ -115,15 +143,15 @@ if (empty($reshook)) $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a'; $sql .= ' WHERE c.rowid = a.fk_country AND a.rowid = '.(int) $chartofaccounts; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $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) - { + if ($country_code) { $sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql'; $offsetforchartofaccount = 0; @@ -132,16 +160,14 @@ if (empty($reshook)) // This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used. $tmp = file_get_contents($sqlfile); $reg = array(); - if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) - { + if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) { $offsetforchartofaccount += $reg[1]; } $offsetforchartofaccount += ($conf->entity * 100000000); $result = run_sql($sqlfile, 1, $conf->entity, 1, '', 'default', 32768, 0, $offsetforchartofaccount); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs'); } else { setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings'); @@ -199,9 +225,12 @@ $sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.a $sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".$conf->entity; -if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; -else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; -$sql .= " WHERE asy.rowid = ".$pcgver; +if ($db->type == 'pgsql') { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; +} else { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; +} +$sql .= " WHERE asy.rowid = ".((int) $pcgver); //print $sql; if (strlen(trim($search_account))) { $lengthpaddingaccount = 0; @@ -225,57 +254,89 @@ if (strlen(trim($search_account))) { $search_account_tmp_clean = $search_account_tmp; $search_account_clean = $search_account; $startchar = '%'; - if (strpos($search_account_tmp, '^') === 0) - { + if (strpos($search_account_tmp, '^') === 0) { $startchar = ''; $search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp); $search_account_clean = preg_replace('/^\^/', '', $search_account); } $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); + } else { + $sql .= natural_search("aa.account_number", $search_account_tmp); + } } } -if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label); -if (strlen(trim($search_labelshort))) $sql .= natural_search("aa.labelshort", $search_labelshort); -if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') $sql .= natural_search("aa.account_parent", $search_accountparent, 2); -if (strlen(trim($search_pcgtype))) $sql .= natural_search("aa.pcg_type", $search_pcgtype); +if (strlen(trim($search_label))) { + $sql .= natural_search("aa.label", $search_label); +} +if (strlen(trim($search_labelshort))) { + $sql .= natural_search("aa.labelshort", $search_labelshort); +} +if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') { + $sql .= natural_search("aa.account_parent", $search_accountparent, 2); +} +if (strlen(trim($search_pcgtype))) { + $sql .= natural_search("aa.pcg_type", $search_pcgtype); +} $sql .= $db->order($sortfield, $sortorder); +//print $sql; // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } } +// List of mass actions available +if ($user->rights->accounting->chartofaccount) { + $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete', 'closed'))) { + $arrayofmassactions = array(); +} + +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); +$arrayofselected = is_array($toselect) ? $toselect : array(); $sql .= $db->plimit($limit + 1, $offset); dol_syslog('accountancy/admin/account.php:: $sql='.$sql); $resql = $db->query($sql); -if ($resql) -{ +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_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='.urlencode($optioncss); + 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='.urlencode($optioncss); + } - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print ' '."\n"; } @@ -796,10 +863,14 @@ if ($rowid > 0) { if ($object->morphy == 'mor') { $companyname = $object->company; - if (!empty($fullname)) $companyalias = $fullname; + if (!empty($fullname)) { + $companyalias = $fullname; + } } else { $companyname = $fullname; - if (!empty($object->company)) $companyalias = $object->company; + if (!empty($object->company)) { + $companyalias = $object->company; + } } // Create a form array @@ -841,9 +912,6 @@ if ($rowid > 0) { print ''; $today = dol_now(); - $datefrom = 0; - $dateto = 0; - $paymentdate = -1; // Date payment if (GETPOST('paymentyear') && GETPOST('paymentmonth') && GETPOST('paymentday')) { @@ -883,7 +951,9 @@ if ($rowid > 0) { // Label print ''.$langs->trans("Label").''; print 'global->MEMBER_NO_DEFAULT_LABEL)) { + print $langs->trans("Subscription").' '.dol_print_date(($datefrom ? $datefrom : time()), "%Y"); + } print '">'; // Complementary action @@ -911,16 +981,21 @@ if ($rowid > 0) { print 'fk_soc)) print ' disabled'; print '> '.$langs->trans("MoreActionInvoiceOnly"); - if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; - else { + if ($object->fk_soc) { + print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; + } else { print ' ('; - if (empty($object->fk_soc)) print img_warning($langs->trans("NoThirdPartyAssociatedToMember")); + if (empty($object->fk_soc)) { + print img_warning($langs->trans("NoThirdPartyAssociatedToMember")); + } print $langs->trans("NoThirdPartyAssociatedToMember"); print ' - '; print $langs->trans("CreateDolibarrThirdParty"); print ')'; } - if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0).''; + if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') { + print '. '.$langs->trans("NoVatOnSubscription", 0).''; + } if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { $prodtmp = new Product($db); $result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS); @@ -936,16 +1011,21 @@ if ($rowid > 0) { print 'fk_soc)) print ' disabled'; print '> '.$langs->trans("MoreActionBankViaInvoice"); - if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; - else { + if ($object->fk_soc) { + print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')'; + } else { print ' ('; - if (empty($object->fk_soc)) print img_warning($langs->trans("NoThirdPartyAssociatedToMember")); + if (empty($object->fk_soc)) { + print img_warning($langs->trans("NoThirdPartyAssociatedToMember")); + } print $langs->trans("NoThirdPartyAssociatedToMember"); print ' - '; print $langs->trans("CreateDolibarrThirdParty"); print ')'; } - if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0).''; + if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') { + print '. '.$langs->trans("NoVatOnSubscription", 0).''; + } if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { $prodtmp = new Product($db); $result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS); @@ -960,6 +1040,7 @@ if ($rowid > 0) { // Bank account print ''.$langs->trans("FinancialAccount").''; + print img_picto('', 'bank_account'); $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2); print "\n"; @@ -1016,7 +1097,9 @@ if ($rowid > 0) { $arraydefaultmessage = null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + } if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 1be08bb5b34..575d6d2301b 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -48,19 +48,27 @@ $note = GETPOST('note', 'alpha'); $typeid = (int) GETPOST('typeid', 'int'); $amount = price2num(GETPOST('amount', 'alpha'), 'MT'); -if (!$user->rights->adherent->cotisation->lire) +if (!$user->rights->adherent->cotisation->lire) { accessforbidden(); +} $permissionnote = $user->rights->adherent->cotisation->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->adherent->cotisation->creer; // Used by the include of actions_dellink.inc.php $permissiontoedit = $user->rights->adherent->cotisation->creer; // Used by the include of actions_lineupdonw.inc.php +$hookmanager->initHooks(array('subscriptioncard', 'globalcard')); + +// Security check +$result = restrictedArea($user, 'subscription', 0); // TODO Check on object id + /* * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} //include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once @@ -117,7 +125,9 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance $errmsg = $object->error; } else { foreach ($object->errors as $error) { - if ($errmsg) $errmsg .= '
'; + if ($errmsg) { + $errmsg .= '
'; + } $errmsg .= $error; } } @@ -148,8 +158,8 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent- $form = new Form($db); - -llxHeader('', $langs->trans("SubscriptionCard"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); +$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; +llxHeader('', $langs->trans("SubscriptionCard"), $help_url); dol_htmloutput_errors($errmsg); @@ -264,7 +274,9 @@ if ($rowid && $action != 'edit') { //$formquestion=array(); //$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").''; $text = $langs->trans("ConfirmDeleteSubscription"); - if (!empty($conf->banque->enabled) && !empty($conf->global->ADHERENT_BANK_USE)) $text .= '
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); + if (!empty($conf->banque->enabled) && !empty($conf->global->ADHERENT_BANK_USE)) { + $text .= '
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord"); + } print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id, $langs->trans("DeleteSubscription"), $text, "confirm_delete", $formquestion, 0, 1); } @@ -337,9 +349,8 @@ if ($rowid && $action != 'edit') { print dol_get_fiche_end(); /* - * Barre d'actions - * - */ + * Action bar + */ print '
'; if ($user->rights->adherent->cotisation->creer) { @@ -361,17 +372,17 @@ if ($rowid && $action != 'edit') { print '
'; print ''; // ancre - // Documents generes + // Generated documents /* - $filename = dol_sanitizeFileName($object->ref); - $filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); - $urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id; - $genallowed = $user->rights->facture->lire; - $delallowed = $user->rights->facture->creer; + $filename = dol_sanitizeFileName($object->ref); + $filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); + $urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id; + $genallowed = $user->rights->facture->lire; + $delallowed = $user->rights->facture->creer; - print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); - $somethingshown = $formfile->numoffiles; - */ + print $formfile->showdocuments('facture', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); + $somethingshown = $formfile->numoffiles; + */ // Show links to link elements //$linktoelem = $form->showLinkToObjectBlock($object, null, array('subscription')); $somethingshown = $form->showLinkedObjectBlock($object, ''); @@ -379,16 +390,16 @@ if ($rowid && $action != 'edit') { // Show links to link elements /*$linktoelem = $form->showLinkToObjectBlock($object,array('order')); if ($linktoelem) print ($somethingshown?'':'
').$linktoelem; - */ + */ print '
'; // List of actions on element /* - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'invoice', $socid, 1); - */ + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'invoice', $socid, 1); + */ print '
'; } diff --git a/htdocs/adherents/subscription/index.html b/htdocs/adherents/subscription/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index a7a4a897505..080e2c0330c 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -31,8 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "members", "bills", "users")); -if (!$user->rights->adherent->lire) +if (!$user->rights->adherent->lire) { accessforbidden(); +} $rowid = GETPOST("rowid", 'int'); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index eeeafea5d6a..55cafade309 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -55,12 +55,18 @@ $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 = "c.dateadh"; } +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "c.dateadh"; +} $object = new Subscription($db); @@ -102,12 +108,18 @@ $result = restrictedArea($user, 'adherent', '', '', 'cotisation'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { // Selection of new fields @@ -157,16 +169,33 @@ if (isset($date_select) && $date_select != '') { $sql .= " AND c.dateadh < '".((int) $date_select + 1)."-01-01 00:00:00'"; } if ($search_ref) { - if (is_numeric($search_ref)) $sql .= " AND (c.rowid = ".$db->escape($search_ref).")"; - else $sql .= " AND 1 = 2"; // Always wrong + if (is_numeric($search_ref)) { + $sql .= " AND c.rowid = ".((int) $search_ref); + } else { + $sql .= " AND 1 = 2"; // Always wrong + } +} +if ($search_type) { + $sql .= natural_search(array('c.fk_type'), $search_type); +} +if ($search_lastname) { + $sql .= natural_search(array('d.lastname', 'd.societe'), $search_lastname); +} +if ($search_firstname) { + $sql .= natural_search(array('d.firstname'), $search_firstname); +} +if ($search_login) { + $sql .= natural_search('d.login', $search_login); +} +if ($search_note) { + $sql .= natural_search('c.note', $search_note); +} +if ($search_account > 0) { + $sql .= " AND b.fk_account = ".((int) $search_account); +} +if ($search_amount) { + $sql .= natural_search('c.subscription', $search_amount, 1); } -if ($search_type) $sql .= natural_search(array('c.fk_type'), $search_type); -if ($search_lastname) $sql .= natural_search(array('d.lastname', 'd.societe'), $search_lastname); -if ($search_firstname) $sql .= natural_search(array('d.firstname'), $search_firstname); -if ($search_login) $sql .= natural_search('d.login', $search_login); -if ($search_note) $sql .= natural_search('c.note', $search_note); -if ($search_account > 0) $sql .= " AND b.fk_account = ".urldecode($search_account); -if ($search_amount) $sql .= natural_search('c.subscription', $search_amount, 1); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -182,8 +211,11 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); - if ($resql) $nbtotalofrecords = $db->num_rows($resql); - else dol_print_error($db); + if ($resql) { + $nbtotalofrecords = $db->num_rows($resql); + } else { + dol_print_error($db); + } if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; @@ -209,34 +241,59 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ exit; } -llxHeader('', $langs->trans("ListOfSubscriptions"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); +$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; +llxHeader('', $langs->trans("ListOfSubscriptions"), $help_url); $i = 0; $title = $langs->trans("ListOfSubscriptions"); -if (!empty($date_select)) $title .= ' ('.$langs->trans("Year").' '.$date_select.')'; +if (!empty($date_select)) { + $title .= ' ('.$langs->trans("Year").' '.$date_select.')'; +} $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -if ($statut != '') $param .= "&statut=".urlencode($statut); -if ($search_type) $param .= "&search_type=".urlencode($search_type); -if ($date_select) $param .= "&date_select=".urlencode($date_select); -if ($search_lastname) $param .= "&search_lastname=".urlencode($search_lastname); -if ($search_login) $param .= "&search_login=".urlencode($search_login); -if ($search_account) $param .= "&search_account=".urlencode($search_account); -if ($search_amount) $param .= "&search_amount=".urlencode($search_amount); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($statut != '') { + $param .= "&statut=".urlencode($statut); +} +if ($search_type) { + $param .= "&search_type=".urlencode($search_type); +} +if ($date_select) { + $param .= "&date_select=".urlencode($date_select); +} +if ($search_lastname) { + $param .= "&search_lastname=".urlencode($search_lastname); +} +if ($search_login) { + $param .= "&search_login=".urlencode($search_login); +} +if ($search_account) { + $param .= "&search_account=".urlencode($search_account); +} +if ($search_amount) { + $param .= "&search_amount=".urlencode($search_amount); +} +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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +//if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; @@ -245,7 +302,9 @@ if ($user->rights->adherent->cotisation->creer) { } print '
'; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -253,7 +312,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $subscription->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "subscription"; @@ -262,7 +321,9 @@ $trackid = 'sub'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($sall) { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
'; } @@ -270,7 +331,9 @@ $moreforfilter = ''; $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); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '
'; print ''."\n"; @@ -365,16 +428,36 @@ print "\n"; print ''; -if (!empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "c.rowid", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['d.fk_type']['checked'])) print_liste_field_titre($arrayfields['d.fk_type']['label'], $_SERVER["PHP_SELF"], "c.fk_type", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['d.lastname']['checked'])) print_liste_field_titre($arrayfields['d.lastname']['label'], $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['d.firstname']['checked'])) print_liste_field_titre($arrayfields['d.firstname']['label'], $_SERVER["PHP_SELF"], "d.firstname", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['d.login']['checked'])) print_liste_field_titre($arrayfields['d.login']['label'], $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['t.libelle']['checked'])) print_liste_field_titre($arrayfields['t.libelle']['label'], $_SERVER["PHP_SELF"], "c.note", $param, "", '', $sortfield, $sortorder); -if (!empty($arrayfields['d.bank']['checked'])) print_liste_field_titre($arrayfields['d.bank']['label'], $_SERVER["PHP_SELF"], "b.fk_account", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['c.dateadh']['checked'])) print_liste_field_titre($arrayfields['c.dateadh']['label'], $_SERVER["PHP_SELF"], "c.dateadh", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); -if (!empty($arrayfields['c.datef']['checked'])) print_liste_field_titre($arrayfields['c.datef']['label'], $_SERVER["PHP_SELF"], "c.datef", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); -if (!empty($arrayfields['d.amount']['checked'])) print_liste_field_titre($arrayfields['d.amount']['label'], $_SERVER["PHP_SELF"], "c.subscription", $param, "", '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['d.ref']['checked'])) { + print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "c.rowid", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['d.fk_type']['checked'])) { + print_liste_field_titre($arrayfields['d.fk_type']['label'], $_SERVER["PHP_SELF"], "c.fk_type", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['d.lastname']['checked'])) { + print_liste_field_titre($arrayfields['d.lastname']['label'], $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['d.firstname']['checked'])) { + print_liste_field_titre($arrayfields['d.firstname']['label'], $_SERVER["PHP_SELF"], "d.firstname", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['d.login']['checked'])) { + print_liste_field_titre($arrayfields['d.login']['label'], $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['t.libelle']['checked'])) { + print_liste_field_titre($arrayfields['t.libelle']['label'], $_SERVER["PHP_SELF"], "c.note", $param, "", '', $sortfield, $sortorder); +} +if (!empty($arrayfields['d.bank']['checked'])) { + print_liste_field_titre($arrayfields['d.bank']['label'], $_SERVER["PHP_SELF"], "b.fk_account", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['c.dateadh']['checked'])) { + print_liste_field_titre($arrayfields['c.dateadh']['label'], $_SERVER["PHP_SELF"], "c.dateadh", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); +} +if (!empty($arrayfields['c.datef']['checked'])) { + print_liste_field_titre($arrayfields['c.datef']['label'], $_SERVER["PHP_SELF"], "c.datef", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); +} +if (!empty($arrayfields['d.amount']['checked'])) { + print_liste_field_titre($arrayfields['d.amount']['label'], $_SERVER["PHP_SELF"], "c.subscription", $param, "", '', $sortfield, $sortorder, 'right '); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -383,8 +466,12 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); -if (!empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); +if (!empty($arrayfields['c.datec']['checked'])) { + print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); +} +if (!empty($arrayfields['c.tms']['checked'])) { + print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; @@ -409,17 +496,22 @@ while ($i < min($num, $limit)) { $adherent->morphy = $obj->morphy; $adherent->email = $obj->email; $adherent->typeid = $obj->type; + $adherent->datefin = $db->jdate($obj->datef); $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid); $adht = new AdherentType($db); $adht->fetch($typeid); + $adherent->need_subscription = $adht->subscription; + print ''; // Ref if (!empty($arrayfields['d.ref']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Type if (!empty($arrayfields['d.fk_type']['checked'])) { @@ -428,32 +520,42 @@ while ($i < min($num, $limit)) { print $adht->getNomUrl(1); } print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Lastname if (!empty($arrayfields['d.lastname']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Firstname if (!empty($arrayfields['d.firstname']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Login if (!empty($arrayfields['d.login']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label if (!empty($arrayfields['t.libelle']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Banque @@ -466,24 +568,34 @@ while ($i < min($num, $limit)) { print $accountstatic->getNomUrl(1); } print "\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date start if (!empty($arrayfields['c.dateadh']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date end if (!empty($arrayfields['c.datef']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Price if (!empty($arrayfields['d.amount']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'd.amount'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'd.amount'; + } $totalarray['val']['d.amount'] += $obj->subscription; } // Extra fields @@ -497,24 +609,32 @@ while ($i < min($num, $limit)) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification if (!empty($arrayfields['c.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; $i++; @@ -527,7 +647,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''; } diff --git a/htdocs/adherents/tpl/index.html b/htdocs/adherents/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index e9e6be408c8..c9b98784142 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -43,21 +43,28 @@ $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $search_lastname = GETPOST('search_lastname', 'alpha'); -$search_login = GETPOST('search_login', 'alpha'); -$search_email = GETPOST('search_email', 'alpha'); +$search_login = GETPOST('search_login', 'alpha'); +$search_email = GETPOST('search_email', 'alpha'); $type = GETPOST('type', 'intcomma'); -$status = GETPOST('status', 'alpha'); +$status = GETPOST('status', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$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 = "d.lastname"; } +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "d.lastname"; +} $label = GETPOST("label", "alpha"); $morphy = GETPOST("morphy", "alpha"); @@ -118,7 +125,9 @@ if ($action == 'add' && $user->rights->adherent->configurer) { // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (empty($object->label)) { $error++; @@ -167,7 +176,9 @@ if ($action == 'update' && $user->rights->adherent->configurer) { // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } $ret = $object->update($user); @@ -203,7 +214,9 @@ if ($action == 'confirm_delete' && $user->rights->adherent->configurer) { $form = new Form($db); $formproduct = new FormProduct($db); -llxHeader('', $langs->trans("MembersTypeSetup"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); +$help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder'; + +llxHeader('', $langs->trans("MembersTypeSetup"), $help_url); // List of members type if (!$rowid && $action != 'create' && $action != 'edit') { @@ -221,8 +234,12 @@ if (!$rowid && $action != 'create' && $action != 'edit') { $i = 0; $param = ''; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } $newcardbutton = ''; if ($user->rights->adherent->configurer) { @@ -230,7 +247,9 @@ if (!$rowid && $action != 'create' && $action != 'edit') { } print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -272,14 +291,20 @@ if (!$rowid && $action != 'create' && $action != 'edit') { print ''; print ''; print ''; print ''; print ''; print ''; - if ($user->rights->adherent->configurer) + if ($user->rights->adherent->configurer) { print ''; - else { + } else { print ''; } print ""; @@ -317,19 +342,19 @@ if ($action == 'create') { print ''; print ''; + print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1); + print ''; // Morphy - $morphys = array(); - $morphys[""] = $langs->trans("MorAndPhy"); - $morphys["phy"] = $langs->trans("Physical"); + $morphys = array(); + $morphys[""] = $langs->trans("MorAndPhy"); + $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); print '"; - print ''; @@ -475,7 +500,7 @@ if ($rowid > 0) { $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql .= " WHERE d.fk_adherent_type = t.rowid "; $sql .= " AND d.entity IN (".getEntity('adherent').")"; - $sql .= " AND t.rowid = ".$object->id; + $sql .= " AND t.rowid = ".((int) $object->id); if ($sall) { $sql .= natural_search(array("f.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall); } @@ -484,8 +509,8 @@ if ($rowid > 0) { } if ($action == 'search') { if (GETPOST('search', 'alpha')) { - $sql .= natural_search(array("d.firstname", "d.lastname"), GETPOST('search', 'alpha')); - } + $sql .= natural_search(array("d.firstname", "d.lastname"), GETPOST('search', 'alpha')); + } } if (!empty($search_lastname)) { $sql .= natural_search(array("d.firstname", "d.lastname"), $search_lastname); @@ -509,8 +534,11 @@ if ($rowid > 0) { $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); - if ($resql) $nbtotalofrecords = $db->num_rows($result); - else dol_print_error($db); + if ($resql) { + $nbtotalofrecords = $db->num_rows($result); + } else { + dol_print_error($db); + } if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; @@ -538,6 +566,8 @@ if ($rowid > 0) { $titre = $langs->trans("MembersListNotUpToDate"); } elseif ($status == '0') { $titre = $langs->trans("MembersListResiliated"); + } elseif ($status == '-2') { + $titre = $langs->trans("MembersListExcluded"); } } elseif ($action == 'search') { $titre = $langs->trans("MembersListQualified"); @@ -550,12 +580,24 @@ if ($rowid > 0) { } $param = "&rowid=".$object->id; - if (!empty($status)) $param .= "&status=".$status; - if (!empty($search_lastname)) $param .= "&search_lastname=".$search_lastname; - if (!empty($search_firstname)) $param .= "&search_firstname=".$search_firstname; - if (!empty($search_login)) $param .= "&search_login=".$search_login; - if (!empty($search_email)) $param .= "&search_email=".$search_email; - if (!empty($filter)) $param .= "&filter=".$filter; + if (!empty($status)) { + $param .= "&status=".$status; + } + if (!empty($search_lastname)) { + $param .= "&search_lastname=".$search_lastname; + } + if (!empty($search_firstname)) { + $param .= "&search_firstname=".$search_firstname; + } + if (!empty($search_login)) { + $param .= "&search_login=".$search_login; + } + if (!empty($search_email)) { + $param .= "&search_email=".$search_email; + } + if (!empty($filter)) { + $param .= "&filter=".$filter; + } if ($sall) { print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; @@ -632,10 +674,10 @@ if ($rowid > 0) { // Type /*print ''; + $membertypestatic->id=$objp->type_id; + $membertypestatic->label=$objp->type; + print $membertypestatic->getNomUrl(1,12); + print ''; */ // Moral/Physique @@ -662,7 +704,9 @@ if ($rowid > 0) { print ''."\n"; +print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>'."\n"; // Address print ''."\n"; +print ''."\n"; print ''."\n"; +print ''."\n"; print ''."\n"; +print ''."\n"; // Country print ''."\n"; print ''."\n"; print ''; +print ''; print ''."\n"; print ''; +print ''; print ''."\n"; print ''; +print ''; print ''."\n"; // Web print ''; +print ''; print ''."\n"; // Code print ''."\n"; +print ''."\n"; // Note print ''; +print ''; print ''; print '
'.$subscription->getNomUrl(1).''.$subscription->getNomUrl(1).''.$adherent->getNomUrl(-1, 0, 'card', 'lastname').''.$adherent->firstname.''.$adherent->login.''; - print dol_trunc($obj->note, 128); + print ''; + print $obj->note; print ''.dol_print_date($db->jdate($obj->dateadh), 'day')."'.dol_print_date($db->jdate($obj->datef), 'day')."'.price($obj->subscription).''.price($obj->subscription).''; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); 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; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
'.$langs->trans("NoRecordFound").'
'.dol_escape_htmltag($objp->label).''; - if ($objp->morphy == 'phy') { print $langs->trans("Physical"); } elseif ($objp->morphy == 'mor') { print $langs->trans("Moral"); } else print $langs->trans("MorAndPhy"); + if ($objp->morphy == 'phy') { + print $langs->trans("Physical"); + } elseif ($objp->morphy == 'mor') { + print $langs->trans("Moral"); + } else { + print $langs->trans("MorAndPhy"); + } print ''.yn($objp->subscription).''.yn($objp->vote).''.$membertype->getLibStatut(5).'rowid.'">'.img_edit().' 
'.$langs->trans("Label").'
'.$langs->trans("Status").''; - print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1); - print '
'.$langs->trans("MembersNature").''; print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy'); print "
'.$langs->trans("SubscriptionRequired").''; + print '
'.$langs->trans("SubscriptionRequired").''; print $form->selectyesno("subscription", 1, 1); print '
'; - $membertypestatic->id=$objp->type_id; - $membertypestatic->label=$objp->type; - print $membertypestatic->getNomUrl(1,12); - print ''; if ($objp->subscription == 'yes') { print $langs->trans("SubscriptionNotReceived"); - if ($objp->status > 0) print " ".img_warning(); + if ($objp->status > 0) { + print " ".img_warning(); + } } else { print ' '; } diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 1d37f337a78..87a952a68b4 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -51,7 +51,9 @@ $hookmanager->initHooks(array('membertypeldapcard', 'globalcard')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'dolibarr2ldap') { @@ -128,7 +130,9 @@ if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == 1) { print "\n"; -if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == 1) print "
\n"; +if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == 1) { + print "
\n"; +} diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index f2c3b785160..84fe883e41f 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -15,8 +15,8 @@ * 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 http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -42,7 +42,9 @@ $ref = GETPOST('ref', 'alphanohtml'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // Security check $result = restrictedArea($user, 'adherent', $id, 'adherent_type'); @@ -140,13 +142,16 @@ $result = $object->fetch($id); */ $title = $langs->trans('MemberTypeCard'); -$helpurl = ''; + +$help_url = ''; + $shortlabel = dol_trunc($object->label, 16); $title = $langs->trans('MemberType')." ".$shortlabel." - ".$langs->trans('Translation'); -$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; -llxHeader('', $title, $helpurl); +$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Mitglieder'; + +llxHeader('', $title, $help_url); $form = new Form($db); $formadmin = new FormAdmin($db); @@ -173,18 +178,17 @@ print dol_get_fiche_end(); -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - +/* + * Action bar + */ 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 ($cnt_trans > 0) { + print ''.$langs->trans("Update").''; + } } } @@ -242,7 +246,9 @@ if ($action == 'edit') { print '
'; } } - if (!$cnt_trans && $action != 'add') print '
'.$langs->trans('NoTranslation').'
'; + if (!$cnt_trans && $action != 'add') { + print '
'.$langs->trans('NoTranslation').'
'; + } } diff --git a/htdocs/adherents/vcard.php b/htdocs/adherents/vcard.php index dbdbbc687ea..902206c7874 100644 --- a/htdocs/adherents/vcard.php +++ b/htdocs/adherents/vcard.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2020 Frédéric France + * Copyright (C) 2020-2021 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 @@ -20,9 +20,9 @@ */ /** - * \file htdocs/adherent/vcard.php + * \file htdocs/adherents/vcard.php * \ingroup societe - * \brief Onglet vcard d'un adherent + * \brief Vcard tab of a member */ require '../main.inc.php'; @@ -30,71 +30,100 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/vcard.class.php'; -$adherent = new adherent($db); - - $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alphanohtml'); + +$object = new adherent($db); + +// Fetch object +if ($id > 0 || !empty($ref)) { + // Load member + $result = $object->fetch($id, $ref); + + // 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) { + // $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)); + $caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password) + || (($user->id != $object->user_id) && $user->rights->user->user->password)); + } +} + +// 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) { + $caneditfieldmember = $user->rights->adherent->creer; +} // Security check -$result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', $objcanvas); +$result = restrictedArea($user, 'adherent', $object->id, '', '', 'socid', 'rowid', 0); -$result = $adherent->fetch($id); -if ($result <= 0) { - dol_print_error($adherent->error); - exit; -} +/* + * Actions + */ -$physicalperson = 1; +// None + + +/* + * View + */ $company = new Societe($db); -if ($adherent->socid) { - $result = $company->fetch($adherent->socid); +if ($object->socid) { + $result = $company->fetch($object->socid); } + + // We create VCard $v = new vCard(); $v->setProdId('Dolibarr '.DOL_VERSION); -$v->setUid('DOLIBARR-ADHERENTID-'.$adherent->id); -$v->setName($adherent->lastname, $adherent->firstname, "", $adherent->civility, ""); -$v->setFormattedName($adherent->getFullName($langs, 1)); +$v->setUid('DOLIBARR-ADHERENTID-'.$object->id); +$v->setName($object->lastname, $object->firstname, "", $object->civility, ""); +$v->setFormattedName($object->getFullName($langs, 1)); -$v->setPhoneNumber($adherent->phone_pro, "TYPE=WORK;VOICE"); -//$v->setPhoneNumber($adherent->phone_perso,"TYPE=HOME;VOICE"); -$v->setPhoneNumber($adherent->phone_mobile, "TYPE=CELL;VOICE"); -$v->setPhoneNumber($adherent->fax, "TYPE=WORK;FAX"); +$v->setPhoneNumber($object->phone_pro, "TYPE=WORK;VOICE"); +//$v->setPhoneNumber($object->phone_perso,"TYPE=HOME;VOICE"); +$v->setPhoneNumber($object->phone_mobile, "TYPE=CELL;VOICE"); +$v->setPhoneNumber($object->fax, "TYPE=WORK;FAX"); -$country = $adherent->country_code ? $adherent->country : ''; +$country = $object->country_code ? $object->country : ''; -$v->setAddress("", "", $adherent->address, $adherent->town, $adherent->state, $adherent->zip, $country, "TYPE=WORK;POSTAL"); -$v->setLabel("", "", $adherent->address, $adherent->town, $adherent->state, $adherent->zip, $country, "TYPE=WORK"); +$v->setAddress("", "", $object->address, $object->town, $object->state, $object->zip, $country, "TYPE=WORK;POSTAL"); +$v->setLabel("", "", $object->address, $object->town, $object->state, $object->zip, $country, "TYPE=WORK"); -$v->setEmail($adherent->email); -$v->setNote($adherent->note_public); -$v->setTitle($adherent->poste); +$v->setEmail($object->email); +$v->setNote($object->note_public); +$v->setTitle($object->poste); // Data from linked company if ($company->id) { $v->setURL($company->url, "TYPE=WORK"); - if (!$adherent->phone_pro) { + if (!$object->phone_pro) { $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); } - if (!$adherent->fax) { + if (!$object->fax) { $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); } - if (!$adherent->zip) { + if (!$object->zip) { $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); } // when company e-mail is empty, use only adherent e-mail if (empty(trim($company->email))) { // was set before, don't set twice - } elseif (empty(trim($adherent->email))) { + } elseif (empty(trim($object->email))) { // when adherent e-mail is empty, use only company e-mail $v->setEmail($company->email); - } elseif (strtolower(end(explode("@", $adherent->email))) == strtolower(end(explode("@", $company->email)))) { + } elseif (strtolower(end(explode("@", $object->email))) == strtolower(end(explode("@", $company->email)))) { // when e-mail domain of adherent and company are the same, use adherent e-mail at first (and company e-mail at second) - $v->setEmail($adherent->email); + $v->setEmail($object->email); // support by Microsoft Outlook (2019 and possible earlier) $v->setEmail($company->email, 'INTERNET'); @@ -103,7 +132,7 @@ if ($company->id) { $v->setEmail($company->email); // support by Microsoft Outlook (2019 and possible earlier) - $v->setEmail($adherent->email, 'INTERNET'); + $v->setEmail($object->email, 'INTERNET'); } // Si adherent lie a un tiers non de type "particulier" @@ -113,9 +142,9 @@ if ($company->id) { } // Personal informations -$v->setPhoneNumber($adherent->phone_perso, "TYPE=HOME;VOICE"); -if ($adherent->birth) { - $v->setBirthday($adherent->birth); +$v->setPhoneNumber($object->phone_perso, "TYPE=HOME;VOICE"); +if ($object->birth) { + $v->setBirthday($object->birth); } $db->close(); diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index dc2a05ef575..56c9605c460 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -17,7 +17,7 @@ /** * \file htdocs/admin/accountant.php - * \ingroup accountant + * \ingroup core * \brief Setup page to configure accountant / auditor */ @@ -34,7 +34,9 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adm // Load translation files required by the page $langs->loadLangs(array('admin', 'companies')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $error = 0; @@ -45,11 +47,12 @@ $error = 0; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (($action == 'update' && !GETPOST("cancel", 'alpha')) -|| ($action == 'updateedit')) -{ +|| ($action == 'updateedit')) { dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'nohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'nohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'nohtml'), 'chaine', 0, '', $conf->entity); @@ -64,8 +67,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'nohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity); - if ($action != 'updateedit' && !$error) - { + if ($action != 'updateedit' && !$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -115,57 +117,59 @@ print '
'.$langs->trans( // Name print '
'; -print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'>
'; -print '
'; -print '
'; -print '
'; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); -print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id'); -if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'country_id'); +if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +} print '
'; -$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id'); +$formcompany->select_departement((GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id'); print '
'; print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright'); -print '
'; print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright'); -print '
'; print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright'); -print '
'; print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright'); -print '
'; -print '
'; -print '
'; diff --git a/htdocs/admin/accounting.php b/htdocs/admin/accounting.php new file mode 100644 index 00000000000..e775f5bd8e3 --- /dev/null +++ b/htdocs/admin/accounting.php @@ -0,0 +1,68 @@ + + * + * 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/accounting.php + * \ingroup accounting + * \brief Setup page to configure accountanting module + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +$action = GETPOST('action', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminaccoutant'; // To manage different context of search + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'companies')); + +if (!$user->admin) { + accessforbidden(); +} + +$error = 0; + + +/* + * Actions + */ + +// Nothing + + +/* + * View + */ + +$help_url = ''; +llxHeader('', $langs->trans("ConfigAccountingExpert"), $help_url); + +$linkback = ''.$langs->trans("BackToModuleList").''; + +print load_fiche_titre($langs->trans("ConfigAccountingExpert"), $linkback, 'title_setup'); + +print "
\n"; +print ''.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Accounting").' - '.$langs->transnoentitiesnoconv("Setup"))."
\n"; +print "
\n"; + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index efdd6213dd5..a3d725bee93 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -28,8 +28,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'agenda')); @@ -45,12 +46,10 @@ $sql = "SELECT a.rowid, a.code, a.label, a.elementtype, a.rang as position"; $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a"; $sql .= " ORDER BY a.rang ASC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $triggers[$i]['rowid'] = $obj->rowid; $triggers[$i]['code'] = $obj->code; @@ -73,36 +72,32 @@ if ($resql) */ // 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 -{ +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_event = ''; $action = ''; } -if (GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) // To avoid the save when we click on search -{ +if (GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) { // To avoid the save when we click on search $action = ''; } -if ($action == "save" && empty($cancel)) -{ +if ($action == "save" && empty($cancel)) { $i = 0; $db->begin(); - foreach ($triggers as $trigger) - { + foreach ($triggers as $trigger) { $keyparam = 'MAIN_AGENDA_ACTIONAUTO_'.$trigger['code']; //print "param=".$param." - ".$_POST[$param]; - if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $keyparam)) - { + if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $keyparam)) { $res = dolibarr_set_const($db, $keyparam, (GETPOST($keyparam, 'alpha') ?GETPOST($keyparam, 'alpha') : ''), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); $db->commit(); } else { @@ -117,8 +112,11 @@ if ($action == "save" && empty($cancel)) * View */ -$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; -llxHeader('', $langs->trans("AgendaSetup"), $wikihelp); +// $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; + +$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; + +llxHeader('', $langs->trans("AgendaSetup"), $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup'); @@ -155,17 +153,27 @@ print ''.$langs->trans("ActionsEvents").''.$langs->trans("All").'/'.$langs->trans("None").''; print ''."\n"; // Show each trigger (list is in c_action_trigger) -if (!empty($triggers)) -{ - foreach ($triggers as $trigger) - { +if (!empty($triggers)) { + foreach ($triggers as $trigger) { $module = $trigger['element']; - if ($module == 'order_supplier' || $module == 'invoice_supplier') $module = 'fournisseur'; - if ($module == 'shipping') $module = 'expedition_bon'; - if ($module == 'member') $module = 'adherent'; - if ($module == 'project') $module = 'projet'; - if ($module == 'proposal_supplier') $module = 'supplier_proposal'; - if ($module == 'contact') $module = 'societe'; + if ($module == 'order_supplier' || $module == 'invoice_supplier') { + $module = 'fournisseur'; + } + if ($module == 'shipping') { + $module = 'expedition_bon'; + } + if ($module == 'member') { + $module = 'adherent'; + } + if ($module == 'project') { + $module = 'projet'; + } + if ($module == 'proposal_supplier') { + $module = 'supplier_proposal'; + } + if ($module == 'contact') { + $module = 'societe'; + } // If 'element' value is myobject@mymodule instead of mymodule $tmparray = explode('@', $module); @@ -174,14 +182,16 @@ if (!empty($triggers)) } //print 'module='.$module.' code='.$trigger['code'].'
'; - if (!empty($conf->$module->enabled)) - { + if (!empty($conf->$module->enabled)) { // Discard special case: If option FICHINTER_CLASSIFY_BILLED is not set, we discard both trigger FICHINTER_CLASSIFY_BILLED and FICHINTER_CLASSIFY_UNBILLED - if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) continue; - if ($trigger['code'] == 'FICHINTER_CLASSIFY_UNBILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) continue; + if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { + continue; + } + if ($trigger['code'] == 'FICHINTER_CLASSIFY_UNBILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { + continue; + } - if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $trigger['code'])) - { + if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $trigger['code'])) { print ''; print ''.$trigger['code'].''; print ''.$trigger['label'].''; diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 36c7bc3edf8..50e4a3e92c7 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -31,8 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'agenda')); @@ -43,13 +44,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'actioncomm'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -82,35 +87,25 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ -if ($action == 'create') -{ +// 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)) -{ + +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index f99c530c7e2..9ce55583d99 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -32,7 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('agenda', 'admin', 'other')); @@ -41,7 +43,9 @@ $def = array(); $actiontest = GETPOST('test', 'alpha'); $actionsave = GETPOST('save', 'alpha'); -if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5; +if (empty($conf->global->AGENDA_EXT_NB)) { + $conf->global->AGENDA_EXT_NB = 5; +} $MAXAGENDA = $conf->global->AGENDA_EXT_NB; // List of available colors @@ -52,8 +56,7 @@ $colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', ' * Actions */ -if ($actionsave) -{ +if ($actionsave) { $db->begin(); $disableext = GETPOST('AGENDA_DISABLE_EXT', 'alpha'); @@ -63,17 +66,17 @@ if ($actionsave) $error = 0; // Save agendas - while ($i <= $MAXAGENDA) - { + while ($i <= $MAXAGENDA) { $name = trim(GETPOST('AGENDA_EXT_NAME'.$i, 'alpha')); $src = trim(GETPOST('AGENDA_EXT_SRC'.$i, 'alpha')); $offsettz = trim(GETPOST('AGENDA_EXT_OFFSETTZ'.$i, 'alpha')); $color = trim(GETPOST('AGENDA_EXT_COLOR'.$i, 'alpha')); - if ($color == '-1') $color = ''; + if ($color == '-1') { + $color = ''; + } $enabled = trim(GETPOST('AGENDA_EXT_ENABLED'.$i, 'alpha')); - if (!empty($src) && !dol_is_url($src)) - { + if (!empty($src) && !dol_is_url($src)) { setEventMessages($langs->trans("ErrorParamMustBeAnUrl"), null, 'errors'); $error++; $errorsaved++; @@ -82,34 +85,48 @@ if ($actionsave) //print '-name='.$name.'-color='.$color; $res = dolibarr_set_const($db, 'AGENDA_EXT_NAME'.$i, $name, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, 'AGENDA_EXT_SRC'.$i, $src, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, 'AGENDA_EXT_OFFSETTZ'.$i, $offsettz, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, 'AGENDA_EXT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, 'AGENDA_EXT_ENABLED'.$i, $enabled, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $i++; } // Save nb of agenda - if (!$error) - { + if (!$error) { $res = dolibarr_set_const($db, 'AGENDA_EXT_NB', trim(GETPOST('AGENDA_EXT_NB', 'int')), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5; + if (!($res > 0)) { + $error++; + } + if (empty($conf->global->AGENDA_EXT_NB)) { + $conf->global->AGENDA_EXT_NB = 5; + } $MAXAGENDA = empty($conf->global->AGENDA_EXT_NB) ? 5 : $conf->global->AGENDA_EXT_NB; } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - if (empty($errorsaved)) setEventMessages($langs->trans("Error"), null, 'errors'); + if (empty($errorsaved)) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } } @@ -143,7 +160,11 @@ print "
\n"; $selectedvalue = $conf->global->AGENDA_DISABLE_EXT; -if ($selectedvalue == 1) $selectedvalue = 0; else $selectedvalue = 1; +if ($selectedvalue == 1) { + $selectedvalue = 0; +} else { + $selectedvalue = 1; +} print ""; @@ -157,12 +178,10 @@ print ""; print ''; print ""; print ''; print ""; $i = 1; -while ($i <= $MAXAGENDA) -{ +while ($i <= $MAXAGENDA) { $key = $i; $name = 'AGENDA_EXT_NAME'.$key; $src = 'AGENDA_EXT_SRC'.$key; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index a072869be8c..54d5158b4ed 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -30,9 +30,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'agenda', 'users')); @@ -52,12 +54,10 @@ $type = 'action'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $reg = array(); -if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; $value = (GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); - if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -65,27 +65,47 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } } -if ($action == 'set') -{ +if ($action == 'set') { $getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE'); $defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter; dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); -} elseif ($action == 'specimen') // For orders -{ + + $defaultValues = new DefaultValues($db); + $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); + if (!is_array($result) && $result<0) { + setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); + } elseif (count($result)>0) { + foreach ($result as $defval) { + $defaultValues->id=$defval->id; + $resultDel = $defaultValues->delete($user); + if ($resultDel<0) { + setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); + } + } + } + $defaultValues->type='createform'; + $defaultValues->entity=$conf->entity; + $defaultValues->user_id=0; + $defaultValues->page='comm/action/card.php'; + $defaultValues->param='complete'; + $defaultValues->value=GETPOST('AGENDA_EVENT_DEFAULT_STATUS'); + $resultCreat=$defaultValues->create($user); + if ($resultCreat<0) { + setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); + } +} elseif ($action == 'specimen') { // For orders $modele = GETPOST('module', 'alpha'); $commande = new CommandeFournisseur($db); @@ -95,25 +115,21 @@ if ($action == 'set') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/action/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db, $commande); - if ($module->write_file($commande, $langs) > 0) - { + if ($module->write_file($commande, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf"); return; } else { @@ -124,27 +140,20 @@ if ($action == 'set') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'setmodel') -{ +} elseif ($action == 'setmodel') { + // Activate a model //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); -} elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->ACTION_EVENT_ADDON_PDF = $value; @@ -152,8 +161,7 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } } @@ -193,12 +201,10 @@ $sql .= " WHERE type = 'action'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -207,8 +213,7 @@ if ($resql) dol_print_error($db); } -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print load_fiche_titre($langs->trans("AgendaModelModule"), '', ''); print '
".$langs->trans("ExtSitesEnableThisTool")."'; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1); } else { - if (empty($conf->global->AGENDA_DISABLE_EXT)) - { + if (empty($conf->global->AGENDA_DISABLE_EXT)) { print ''.img_picto($langs->trans("Enabled"), 'on').''; } else { print ''.img_picto($langs->trans("Disabled"), 'off').''; @@ -194,8 +213,7 @@ print ''.$langs->trans("Color").'
'."\n"; @@ -223,19 +228,14 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) clearstatcache(); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/action/doc"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { $name = substr($file, 4, dol_strlen($file) - 16); $classname = substr($file, 0, dol_strlen($file) - 12); @@ -249,17 +249,17 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print "\n"; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print ''."\n"; print ''."\n"; print ''."\n"; +if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { + print ''; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; +} + // AGENDA_DEFAULT_VIEW print ''."\n"; $htmltext = $langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup")); @@ -342,16 +350,21 @@ $tmplist = array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_mon print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW); print ''."\n"; -if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) -{ - print ''; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; +// AGENDA_EVENT_DEFAULT_STATUS +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; // AGENDA_DEFAULT_FILTER_TYPE print ''."\n"; diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 36f0c572de4..b3a85d1fe4b 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -27,8 +27,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("admin", "other", "agenda")); @@ -47,12 +48,10 @@ $type = 'action'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; $value = (GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1); - if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -60,25 +59,21 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } } -if ($action == 'set') -{ +if ($action == 'set') { dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); -} elseif ($action == 'specimen') // For orders -{ +} elseif ($action == 'specimen') { // For orders $modele = GETPOST('module', 'alpha'); $commande = new CommandeFournisseur($db); @@ -88,25 +83,21 @@ if ($action == 'set') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/action/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db, $commande); - if ($module->write_file($commande, $langs) > 0) - { + if ($module->write_file($commande, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf"); return; } else { @@ -117,27 +108,20 @@ if ($action == 'set') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'setmodel') -{ +} elseif ($action == 'setmodel') { + // Activate a model //print "sssd".$value; $ret = addDocumentModel($value, $type, $label, $scandir); -} elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // The constant that has been read in front of the new set // is therefore passed through a variable to have a coherent display $conf->global->ACTION_EVENT_ADDON_PDF = $value; @@ -145,8 +129,7 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } } @@ -184,7 +167,7 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; print ''."\n"; -print '"; print ''; print '"; print ''; print ""; print ""; @@ -158,19 +160,31 @@ $getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : ""); // Show message $message = ''; + $urlvcal = ''; $urlvcal .= $urlwithroot.'/public/agenda/agendaexport.php?format=vcal'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; -$message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'vcal', $urlvcal); +$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlvcal, ''.$langs->trans("WebCalUrlForVCalExport", 'vcal', '').''); +$message .= ''; $message .= '
'; + $urlical = ''; $urlical .= $urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; -$message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', $urlical); +$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlical, ''.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', '').''); +$message .= ''; $message .= '
'; + $urlrss = ''; $urlrss .= $urlwithroot.'/public/agenda/agendaexport.php?format=rss'.$getentity.'&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : 'KEYNOTDEFINED').''; -$message .= img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'rss', $urlrss); -$message .= '
'; +$message .= img_picto('', 'globe').' '.str_replace('{url}', $urlrss, ''.$langs->trans("WebCalUrlForVCalExport", 'rss', '').''); +$message .= ''; $message .= '
'; + print $message; $message = $langs->trans("AgendaUrlOptions1", $user->login, $user->login).'
'; @@ -183,8 +197,7 @@ $message .= $langs->trans("AgendaUrlOptionsIncludeHolidays", '1', '1').'
'; print info_admin($message); -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".' - trans("OtherSetup"), '', 'title_setup'); @@ -196,8 +191,7 @@ print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, ' print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; -if (!empty($conf->multicompany->enabled) && !$user->entity) -{ +if (!empty($conf->multicompany->enabled) && !$user->entity) { print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; } print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); @@ -219,8 +213,7 @@ print ''; print ''; // Limit to superadmin -if (!empty($conf->multicompany->enabled) && !$user->entity) -{ +if (!empty($conf->multicompany->enabled) && !$user->entity) { print ''; @@ -244,21 +237,24 @@ $sql .= ", note"; $sql .= ", tms"; $sql .= ", entity"; $sql .= " FROM ".MAIN_DB_PREFIX."const"; -$sql .= " WHERE entity IN (".$user->entity.",".$conf->entity.")"; -if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug -elseif (!GETPOST('visible') || GETPOST('visible') != 'all') $sql .= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits -if (GETPOST('name')) $sql .= natural_search("name", GETPOST('name')); +$sql .= " WHERE entity IN (".$db->sanitize($user->entity.",".$conf->entity).")"; +if ((empty($user->entity) || $user->admin) && $debug) { +} elseif (!GETPOST('visible') || GETPOST('visible') != 'all') { + // to force for superadmin to debug + $sql .= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +} +if (GETPOST('name')) { + $sql .= natural_search("name", GETPOST('name')); +} $sql .= $db->order($sortfield, $sortorder); dol_syslog("Const::listConstant", LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); print "\n"; @@ -270,22 +266,21 @@ if ($result) print ''; print ''; print ''; - print ''; + print ''; print ''; // Note print ''; // Date last change - print ''; // Entity limit to superadmin - if (!empty($conf->multicompany->enabled) && !$user->entity) - { + if (!empty($conf->multicompany->enabled) && !$user->entity) { print ''; @@ -295,8 +290,7 @@ if ($result) print ''; } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print ''; } else { print ''.img_delete().''; @@ -313,8 +307,7 @@ if ($result) print '
\n"; require_once $dir.'/'.$file; $module = new $classname($db, $specimenthirdparty); - if (method_exists($module, 'info')) + if (method_exists($module, 'info')) { print $module->info($langs); - else print $module->description; + } else { + print $module->description; + } print "'."\n"; - if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") - { + if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") { print 'scandir.'&label='.urlencode($module->name).'&type=action">'; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; @@ -275,8 +275,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // Default print ''; - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") - { + if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; @@ -324,14 +323,23 @@ print ''.$langs->trans("AGENDA_USE_EVENT_TYPE").' '."\n"; //print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list -if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) -{ +if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } else { print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } print '
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").' '."\n"; + $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1); + print '
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").' '."\n"; - $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1); - print '
'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").' '."\n"; +$defval='na'; +$defaultValues = new DefaultValues($db); +$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity)); +if (!is_array($result) && $result<0) { + setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); +} elseif (count($result)>0) { + $defval=reset($result)->value; } +$formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'maxwidth200'); +print '
'.$langs->trans('AGENDA_REMINDER_BROWSER').' '."\n"; +print ''."\n"; if (empty($conf->global->AGENDA_REMINDER_BROWSER)) { if (!isHTTPS()) { @@ -232,7 +215,7 @@ if (!empty($conf->cron->enabled)) { } print ' '."\n"; +print ''."\n"; if (empty($conf->cron->enabled)) { print ''.$langs->trans("WarningModuleNotActive", $langs->transnoentitiesnoconv("Module2300Name")).''; diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 6d77b9f4416..59dd1bf1ac2 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -29,8 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("admin", "other", "agenda")); @@ -39,8 +40,7 @@ $def = array(); $actionsave = GETPOST('save', 'alpha'); // Sauvegardes parametres -if ($actionsave) -{ +if ($actionsave) { $i = 0; $db->begin(); @@ -50,8 +50,7 @@ if ($actionsave) $i += dolibarr_set_const($db, 'MAIN_AGENDA_EXPORT_CACHE', trim(GETPOST('MAIN_AGENDA_EXPORT_CACHE', 'alpha')), 'chaine', 0, '', $conf->entity); $i += dolibarr_set_const($db, 'AGENDA_EXPORT_FIX_TZ', trim(GETPOST('AGENDA_EXPORT_FIX_TZ', 'alpha')), 'chaine', 0, '', $conf->entity); - if ($i >= 4) - { + if ($i >= 4) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -66,7 +65,9 @@ if ($actionsave) * View */ -if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; +if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) { + $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; +} $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; llxHeader('', $langs->trans("AgendaSetup"), $wikihelp); @@ -97,8 +98,9 @@ print "
'.$langs->trans("PasswordTogetVCalExport")."'; -if (!empty($conf->use_javascript_ajax)) +if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); +} print ' 
'; print ''; print ''; print ''; - print ''; + print ''; print ''; + print ''; print dol_print_date($db->jdate($obj->tms), 'dayhour'); print ''; print ''; print '
'; print '
'; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print '
'; print '
'; print ''; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 05330e92b89..30b77f6db8b 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "errors", "contracts")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -39,8 +41,7 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'contract'; -if (empty($conf->global->CONTRACT_ADDON)) -{ +if (empty($conf->global->CONTRACT_ADDON)) { $conf->global->CONTRACT_ADDON = 'mod_contract_serpis'; } @@ -51,22 +52,23 @@ if (empty($conf->global->CONTRACT_ADDON)) include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconst = GETPOST('maskconstcontract', 'alpha'); $maskvalue = GETPOST('maskcontract', 'alpha'); - if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') // For contract -{ +} elseif ($action == 'specimen') { // For contract $modele = GETPOST('module', 'alpha'); $contract = new Contrat($db); @@ -75,25 +77,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/contract/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($contract, $langs) > 0) - { + if ($module->write_file($contract, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf"); return; } else { @@ -104,26 +102,19 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// 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 ($conf->global->CONTRACT_ADDON_PDF == "$value") dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->CONTRACT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->CONTRACT_ADDON_PDF = $value; @@ -131,18 +122,15 @@ elseif ($action == 'setdoc') // 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 dolibarr_set_const($db, "CONTRACT_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'set_other') -{ +} elseif ($action == 'set_other') { $freetext = GETPOST('CONTRACT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); @@ -152,10 +140,11 @@ elseif ($action == 'setdoc') $value = GETPOST('activate_hideClosedServiceByDefault', 'alpha'); $res3 = dolibarr_set_const($db, "CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT", $value, 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0 || !$res3 > 0) $error++; + if (!$res1 > 0 || !$res2 > 0 || !$res3 > 0) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -197,19 +186,14 @@ print "\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/contract/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.$file.'.php'; @@ -217,11 +201,14 @@ foreach ($dirmodels as $reldir) $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print ''.$module->nom."\n"; print $module->info(); print ''; @@ -232,14 +219,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; print ''."\n"; print ''; - if ($conf->global->CONTRACT_ADDON == "$file") - { + if ($conf->global->CONTRACT_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -258,8 +246,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
'; } else { $htmltooltip .= $langs->trans($module->error).'
'; @@ -294,12 +283,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -321,31 +308,23 @@ print "\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/contract".$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -353,21 +332,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + 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; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print ''."\n"; print '
'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -381,8 +365,7 @@ foreach ($dirmodels as $reldir) // Defaut print ''; - if ($conf->global->CONTRACT_ADDON_PDF == $name) - { + if ($conf->global->CONTRACT_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').''; @@ -392,8 +375,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + 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; @@ -412,8 +394,7 @@ foreach ($dirmodels as $reldir) // Preview print ''; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -452,15 +433,16 @@ print "\n"; $substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
'; +} $htmltext .= '
'; print ''; print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp'); print '
'; $variablename = 'CONTRACT_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 4008a3cd7be..e7983ae4b95 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -28,8 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "other", "agenda")); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -57,8 +58,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; * View */ +$help_url = 'EN:Module_DAV'; -llxHeader('', $langs->trans("DAVSetup"), $wikihelp); +llxHeader('', $langs->trans("DAVSetup"), $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("DAVSetup"), $linkback, 'title_setup'); @@ -71,8 +73,7 @@ $head = dav_admin_prepare_head(); print dol_get_fiche_head($head, 'webdav', '', -1, 'action'); -if ($action == 'edit') -{ +if ($action == 'edit') { print ''; print ''; print ''; @@ -80,9 +81,10 @@ if ($action == 'edit') print ''; print ''; - foreach ($arrayofparameters as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) continue; + foreach ($arrayofparameters as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + continue; + } print ''; print ''; print "\n"; -foreach ($list as $key) -{ +foreach ($list as $key) { print ''; // Param @@ -102,8 +104,7 @@ foreach ($list as $key) // Value print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { // Accountancy_code_asset print ''; print ''; @@ -398,10 +410,8 @@ if ($action == 'create') /* View mode */ /* */ /* ************************************************************************** */ -if ($rowid > 0) -{ - if ($action != 'edit') - { +if ($rowid > 0) { + if ($action != 'edit') { $object = new AssetType($db); $object->fetch($rowid); $object->fetch_optionals(); @@ -409,14 +419,13 @@ if ($rowid > 0) /* * Confirmation suppression */ - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$object->id, $langs->trans("DeleteAnAssetType"), $langs->trans("ConfirmDeleteAssetType", $object->label), "confirm_delete", '', 0, 1); } $head = asset_type_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("AssetType"), -1, 'setup'); + print dol_get_fiche_head($head, 'card', $langs->trans("AssetType"), -1, 'asset'); $linkback = ''.$langs->trans("BackToList").''; @@ -431,14 +440,13 @@ if ($rowid > 0) print '
'; print '
'; - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); @@ -93,11 +95,9 @@ if ($action == 'edit') } print $form->textwithpicto($label, $tooltiphelp); print ''; - if ($key == 'DAV_ALLOW_PRIVATE_DIR') - { + if ($key == 'DAV_ALLOW_PRIVATE_DIR') { print $langs->trans("AlwaysActive"); - } elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') - { + } elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') { print $form->selectyesno($key, $conf->global->$key, 1); } else { print ''; @@ -117,8 +117,7 @@ if ($action == 'edit') print ''; print ''; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/expensereport/doc"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -359,21 +337,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '\n"; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
'; +} $htmltext .= '
'; print ''; @@ -629,24 +619,20 @@ print "\n"; print ''; print ""; print "'; + print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); $label = $langs->trans($key); @@ -128,11 +127,9 @@ if ($action == 'edit') } print $form->textwithpicto($label, $tooltiphelp); print ''; - if ($key == 'DAV_ALLOW_PRIVATE_DIR') - { + if ($key == 'DAV_ALLOW_PRIVATE_DIR') { print $langs->trans("AlwaysActive"); - } elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') - { + } elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR') { print yn($conf->global->$key); } else { print $conf->global->$key; @@ -172,18 +169,32 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai // Show message $message = ''; $url = ''.$urlwithroot.'/dav/fileserver.php'; -$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV', '{url}')); + +$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV', '')); +$message .= ''; +$message .= ajax_autoselect('webdavpublicurl'); + $message .= '
'; -if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) -{ +if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { $urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : ''); $url = ''.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.''; - $message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '{url}')); + + $message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '')); + $message .= ''; + $message .= ajax_autoselect('webdavurl'); $message .= '
'; } print $message; -print '


'; +print '
'; require_once DOL_DOCUMENT_ROOT.'/includes/sabre/autoload.php'; $version = Sabre\DAV\Version::VERSION; diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php index 840157d47e0..19a440520b1 100644 --- a/htdocs/admin/debugbar.php +++ b/htdocs/admin/debugbar.php @@ -29,7 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; global $conf; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("admin", "other")); @@ -43,19 +45,16 @@ $action = GETPOST('action', 'aZ09'); */ // Set modes -if ($action == 'set') -{ +if ($action == 'set') { $db->begin(); $result1 = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0); $result2 = dolibarr_set_const($db, "DEBUGBAR_USE_LOG_FILE", GETPOST('DEBUGBAR_USE_LOG_FILE', 'int'), 'chaine', 0, '', 0); - if ($result1 < 0 || $result2 < 0) - { + if ($result1 < 0 || $result2 < 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -76,8 +75,7 @@ $form = new Form($db); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup'); -if (!function_exists('mb_check_encoding')) -{ +if (!function_exists('mb_check_encoding')) { $langs->load("errors"); print info_admin($langs->trans("ErrorPHPNeedModule", 'mbstring'), 0, 0, 'error'); } diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 789762830e3..dc801059e41 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -30,28 +30,37 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'products', 'admin', 'sms', 'other', 'errors')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $id = GETPOST('rowid', 'int'); $action = GETPOST('action', 'aZ09'); $optioncss = GETPOST('optionscss', 'alphanohtml'); -$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'createform'; // 'createform', 'filters', 'sortorder', 'focus' +$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'createform'; // 'createform', 'filters', 'sortorder', 'focus' $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 (!$sortfield) $sortfield = 'page,param'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 'page,param'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} $defaulturl = GETPOST('defaulturl', 'alphanohtml'); $defaultkey = GETPOST('defaultkey', 'alphanohtml'); @@ -67,22 +76,28 @@ $value = GETPOST('value', 'restricthtml'); $hookmanager->initHooks(array('admindefaultvalues', 'globaladmin')); +$object = new DefaultValues($db); /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && !empty($massaction) && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} -$parameters = array('socid'=>$socid); +$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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 $defaulturl = ''; $defaultkey = ''; $defaultvalue = ''; @@ -90,85 +105,87 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_array_options = array(); } -if ($action == 'setMAIN_ENABLE_DEFAULT_VALUES') -{ - if (GETPOST('value')) dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 1, 'chaine', 0, '', $conf->entity); - else dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 0, 'chaine', 0, '', $conf->entity); +if ($action == 'setMAIN_ENABLE_DEFAULT_VALUES') { + if (GETPOST('value')) { + dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 1, 'chaine', 0, '', $conf->entity); + } else { + dolibarr_set_const($db, 'MAIN_ENABLE_DEFAULT_VALUES', 0, 'chaine', 0, '', $conf->entity); + } } -if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('actionmodify')) -{ +if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('actionmodify')) { $error = 0; - if (($action == 'add' || (GETPOST('add') && $action != 'update'))) - { - if (empty($defaulturl)) - { + if (($action == 'add' || (GETPOST('add') && $action != 'update'))) { + if (empty($defaulturl)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Url")), null, 'errors'); $error++; } - if (empty($defaultkey)) - { + if (empty($defaultkey)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Field")), null, 'errors'); $error++; } } - if (GETPOST('actionmodify')) - { - if (empty($urlpage)) - { + if (GETPOST('actionmodify')) { + if (empty($urlpage)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Url")), null, 'errors'); $error++; } - if (empty($key)) - { + if (empty($key)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Field")), null, 'errors'); $error++; } } - if (!$error) - { - $db->begin(); - - if ($action == 'add' || (GETPOST('add') && $action != 'update')) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."default_values(type, user_id, page, param, value, entity) VALUES ('".$db->escape($mode)."', 0, '".$db->escape($defaulturl)."','".$db->escape($defaultkey)."','".$db->escape($defaultvalue)."', ".$db->escape($conf->entity).")"; + if (!$error) { + if ($action == 'add' || (GETPOST('add') && $action != 'update')) { + $object->type=$mode; + $object->user_id=0; + $object->page=$defaulturl; + $object->param=$defaultkey; + $object->value=$defaultvalue; + $object->entity=$conf->entity; + $result=$object->create($user); + if ($result<0) { + $action = ''; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $action = ""; + $defaulturl = ''; + $defaultkey = ''; + $defaultvalue = ''; + } } - if (GETPOST('actionmodify')) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."default_values SET page = '".$db->escape($urlpage)."', param = '".$db->escape($key)."', value = '".$db->escape($value)."'"; - $sql .= " WHERE rowid = ".$id; - } - - $result = $db->query($sql); - if ($result > 0) - { - $db->commit(); - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - $action = ""; - $defaulturl = ''; - $defaultkey = ''; - $defaultvalue = ''; - } else { - $db->rollback(); - setEventMessages($db->lasterror(), null, 'errors'); - $action = ''; + if (GETPOST('actionmodify')) { + $object->id=$id; + $object->type=$mode; + $object->page=$urlpage; + $object->param=$key; + $object->value=$value; + $object->entity=$conf->entity; + $result=$object->update($user); + if ($result<0) { + $action = ''; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $action = ""; + $defaulturl = ''; + $defaultkey = ''; + $defaultvalue = ''; + } } } } // Delete line from delete picto -if ($action == 'delete') -{ - $sql = "DELETE FROM ".MAIN_DB_PREFIX."default_values WHERE rowid = ".$db->escape($id); - // Delete const - $result = $db->query($sql); - if ($result >= 0) - { - setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - } else { - dol_print_error($db); +if ($action == 'delete') { + $object->id=$id; + $result=$object->delete($user); + if ($result<0) { + $action = ''; + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -186,9 +203,8 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); $param = '&mode='.$mode; -$enabledisablehtml .= $langs->trans("EnableDefaultValues").' '; -if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) -{ +$enabledisablehtml = $langs->trans("EnableDefaultValues").' '; +if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) { // Button off, click to enable $enabledisablehtml .= ''; $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); @@ -205,16 +221,30 @@ print load_fiche_titre($langs->trans("DefaultValues"), $enabledisablehtml, 'titl print ''.$langs->trans("DefaultValuesDesc")."
\n"; print "
\n"; -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 ($defaulturl) $param .= '&defaulturl='.urlencode($defaulturl); -if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey); -if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue); +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 ($defaulturl) { + $param .= '&defaulturl='.urlencode($defaulturl); +} +if ($defaultkey) { + $param .= '&defaultkey='.urlencode($defaultkey); +} +if ($defaultvalue) { + $param .= '&defaultvalue='.urlencode($defaultvalue); +} -print 'entity) && $debug) ? '?debug=1' : '').'" method="POST">'; -if ($optioncss != '') print ''; +print 'entity) && !empty($debug)) ? '?debug=1' : '').'" method="POST">'; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -226,12 +256,10 @@ $head = defaultvalues_prepare_head(); print dol_get_fiche_head($head, $mode, '', -1, ''); -if ($mode == 'sortorder') -{ +if ($mode == 'sortorder') { print info_admin($langs->trans("WarningSettingSortOrder")).'
'; } -if ($mode == 'mandatory') -{ +if ($mode == 'mandatory') { print info_admin($langs->trans("FeatureSupportedOnTextFieldsOnly")).'
'; } @@ -244,15 +272,17 @@ print ''; print ''; // Page $texthelp = $langs->trans("PageUrlForDefaultValues"); -if ($mode == 'createform') $texthelp .= $langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php', 'societe/card.php?abc=val1&def=val2'); -else $texthelp .= $langs->trans("PageUrlForDefaultValuesList", 'societe/list.php', 'societe/list.php?abc=val1&def=val2'); +if ($mode == 'createform') { + $texthelp .= $langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php', 'societe/card.php?abc=val1&def=val2'); +} else { + $texthelp .= $langs->trans("PageUrlForDefaultValuesList", 'societe/list.php', 'societe/list.php?abc=val1&def=val2'); +} $texthelp .= '

'.$langs->trans("AlsoDefaultValuesAreEffectiveForActionCreate"); $texturl = $form->textwithpicto($langs->trans("RelativeURL"), $texthelp); print_liste_field_titre($texturl, $_SERVER["PHP_SELF"], 'page,param', '', $param, '', $sortfield, $sortorder); // Field $texthelp = $langs->trans("TheKeyIsTheNameOfHtmlField"); -if ($mode != 'sortorder') -{ +if ($mode != 'sortorder') { $textkey = $form->textwithpicto($langs->trans("Field"), $texthelp); } else { $texthelp = 'field or alias.field'; @@ -260,15 +290,12 @@ if ($mode != 'sortorder') } print_liste_field_titre($textkey, $_SERVER["PHP_SELF"], 'param', '', $param, '', $sortfield, $sortorder); // Value -if ($mode != 'focus' && $mode != 'mandatory') -{ - if ($mode != 'sortorder') - { +if ($mode != 'focus' && $mode != 'mandatory') { + if ($mode != 'sortorder') { $substitutionarray = getCommonSubstitutionArray($langs, 2, array('object', 'objectamount')); // Must match list into GETPOST unset($substitutionarray['__USER_SIGNATURE__']); $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'
'; - foreach ($substitutionarray as $key => $val) - { + foreach ($substitutionarray as $key => $val) { $texthelp .= $key.' -> '.$val.'
'; } $textvalue = $form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, 'subsitutiontooltip'); @@ -279,8 +306,11 @@ if ($mode != 'focus' && $mode != 'mandatory') print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder); } // Entity -if (!empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,page', '', $param, '', $sortfield, $sortorder); -else print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); +if (!empty($conf->multicompany->enabled) && !$user->entity) { + print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,page', '', $param, '', $sortfield, $sortorder); +} else { + print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); +} // Actions print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); print "\n"; @@ -299,15 +329,13 @@ print ''; // Value -if ($mode != 'focus' && $mode != 'mandatory') -{ +if ($mode != 'focus' && $mode != 'mandatory') { print ''; } // Limit to superadmin -if (!empty($conf->multicompany->enabled) && !$user->entity) -{ +if (!empty($conf->multicompany->enabled) && !$user->entity) { print ''; @@ -318,57 +346,45 @@ if (!empty($conf->multicompany->enabled) && !$user->entity) } print '\n"; print ''; +$result=$object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity))); -// Show constants -$sql = "SELECT rowid, entity, type, page, param, value"; -$sql .= " FROM ".MAIN_DB_PREFIX."default_values"; -$sql .= " WHERE type = '".$db->escape($mode)."'"; -$sql .= " AND entity IN (".$user->entity.",".$conf->entity.")"; -$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; - - while ($i < $num) - { - $obj = $db->fetch_object($result); - +if (!is_array($result) && $result<0) { + setEventMessages($object->error, $object->errors, 'errors'); +} elseif (count($result)>0) { + foreach ($result as $key=>$defaultvalue) { print "\n"; print ''; // Page print ''."\n"; // Field print ''."\n"; // Value - if ($mode != 'focus' && $mode != 'mandatory') - { + if ($mode != 'focus' && $mode != 'mandatory') { print ''; } @@ -376,14 +392,13 @@ if ($result) // Actions print '
'; print ''; print ''; print ''; print ''; print ''; // We see environment, but to change it we must switch on other entity print ''; $disabled = ''; -if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) $disabled = ' disabled="disabled"'; +if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) { + $disabled = ' disabled="disabled"'; +} print ''; print "
'; - if ($action != 'edit' || GETPOST('rowid', 'int') != $obj->rowid) print $obj->page; - else print ''; + if ($action != 'edit' || GETPOST('rowid', 'int') != $defaultvalue->id) print $defaultvalue->page; + else print ''; print ''; - if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->param; - else print ''; + if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print $defaultvalue->param; + else print ''; print ''; /*print ''; - print ''; - print ''; - print ''; - */ - if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print dol_escape_htmltag($obj->value); - else print ''; + print ''; + print ''; + print ''; + */ + if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print dol_escape_htmltag($defaultvalue->value); + else print ''; print ''; - if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) - { - print ''.img_edit().''; - print ''.img_delete().''; + if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) { + print ''.img_edit().''; + print ''.img_delete().''; } else { print ''; print ''; - print '
'; + print '
'; print ''; print ''; } @@ -393,8 +408,6 @@ if ($result) print "\n"; $i++; } -} else { - dol_print_error($db); } print '
'; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index d214a585ab2..00f05152a86 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -30,104 +30,108 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->load("admin"); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); -if (empty($action)) $action = 'edit'; +if (empty($action)) { + $action = 'edit'; +} // Define list of managed delays $modules = array( - 'agenda' => array( - array( - 'code' => 'MAIN_DELAY_ACTIONS_TODO', - 'img' => 'action' - ) + 'agenda' => array( + array( + 'code' => 'MAIN_DELAY_ACTIONS_TODO', + 'img' => 'action' + ) + ), + 'projet' => array( + array( + 'code' => 'MAIN_DELAY_PROJECT_TO_CLOSE', + 'img' => 'project' ), - 'projet' => array( - array( - 'code' => 'MAIN_DELAY_PROJECT_TO_CLOSE', - 'img' => 'project' - ), - array( - 'code' => 'MAIN_DELAY_TASKS_TODO', - 'img' => 'projecttask' - ) + array( + 'code' => 'MAIN_DELAY_TASKS_TODO', + 'img' => 'projecttask' + ) + ), + 'propal' => array( + array( + 'code' => 'MAIN_DELAY_PROPALS_TO_CLOSE', + 'img' => 'propal' ), - 'propal' => array( - array( - 'code' => 'MAIN_DELAY_PROPALS_TO_CLOSE', - 'img' => 'propal' - ), - array( - 'code' => 'MAIN_DELAY_PROPALS_TO_BILL', - 'img' => 'propal' - ) + array( + 'code' => 'MAIN_DELAY_PROPALS_TO_BILL', + 'img' => 'propal' + ) + ), + 'commande' => array( + array( + 'code' => 'MAIN_DELAY_ORDERS_TO_PROCESS', + 'img' => 'order' + ) + ), + 'facture' => array( + array( + 'code' => 'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED', + 'img' => 'bill' + ) + ), + 'fournisseur' => array( + array( + 'code' => 'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS', + 'img' => 'order' ), - 'commande' => array( - array( - 'code' => 'MAIN_DELAY_ORDERS_TO_PROCESS', - 'img' => 'order' - ) + array( + 'code' => 'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY', + 'img' => 'bill' + ) + ), + 'service' => array( + array( + 'code' => 'MAIN_DELAY_NOT_ACTIVATED_SERVICES', + 'img' => 'service' ), - 'facture' => array( - array( - 'code' => 'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED', - 'img' => 'bill' - ) + array( + 'code' => 'MAIN_DELAY_RUNNING_SERVICES', + 'img' => 'service' + ) + ), + 'banque' => array( + array( + 'code' => 'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE', + 'img' => 'account' ), - 'fournisseur' => array( - array( - 'code' => 'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS', - 'img' => 'order' - ), - array( - 'code' => 'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY', - 'img' => 'bill' - ) + array( + 'code' => 'MAIN_DELAY_CHEQUES_TO_DEPOSIT', + 'img' => 'account' + ) + ), + 'adherent' => array( + array( + 'code' => 'MAIN_DELAY_MEMBERS', + 'img' => 'user' + ) + ), + 'expensereport' => array( + array( + 'code' => 'MAIN_DELAY_EXPENSEREPORTS', + 'img' => 'trip' ), - 'service' => array( - array( - 'code' => 'MAIN_DELAY_NOT_ACTIVATED_SERVICES', - 'img' => 'service' - ), - array( - 'code' => 'MAIN_DELAY_RUNNING_SERVICES', - 'img' => 'service' - ) - ), - 'banque' => array( - array( - 'code' => 'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE', - 'img' => 'account' - ), - array( - 'code' => 'MAIN_DELAY_CHEQUES_TO_DEPOSIT', - 'img' => 'account' - ) - ), - 'adherent' => array( - array( - 'code' => 'MAIN_DELAY_MEMBERS', - 'img' => 'user' - ) - ), - 'expensereport' => array( - array( - 'code' => 'MAIN_DELAY_EXPENSEREPORTS', - 'img' => 'trip' - ), - /* TODO Enable this - array( - 'code' => 'MAIN_DELAY_EXPENSEREPORTS_TO_PAY', - 'img' => 'trip' - )*/ - ), - 'holiday' => array( - array( - 'code' => 'MAIN_DELAY_HOLIDAYS', - 'img' => 'holiday' - ), + /* TODO Enable this + array( + 'code' => 'MAIN_DELAY_EXPENSEREPORTS_TO_PAY', + 'img' => 'trip' + )*/ + ), + 'holiday' => array( + array( + 'code' => 'MAIN_DELAY_HOLIDAYS', + 'img' => 'holiday' ), + ), ); $labelmeteo = array(0=>$langs->trans("No"), 1=>$langs->trans("Yes"), 2=>$langs->trans("OnMobileOnly")); @@ -166,31 +170,30 @@ if (!isset($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS)) { * Actions */ -if ($action == 'update') -{ - foreach ($modules as $module => $delays) - { - if (!empty($conf->$module->enabled)) - { - foreach ($delays as $delay) - { - if (GETPOST($delay['code']) != '') - { +if ($action == 'update') { + foreach ($modules as $module => $delays) { + if (!empty($conf->$module->enabled)) { + foreach ($delays as $delay) { + if (GETPOST($delay['code']) != '') { dolibarr_set_const($db, $delay['code'], GETPOST($delay['code']), 'chaine', 0, '', $conf->entity); } } } } - dolibarr_set_const($db, "MAIN_DISABLE_METEO", $_POST["MAIN_DISABLE_METEO"], 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DISABLE_METEO", GETPOST("MAIN_DISABLE_METEO"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_USE_METEO_WITH_PERCENTAGE", GETPOST("MAIN_USE_METEO_WITH_PERCENTAGE"), 'chaine', 0, '', $conf->entity); // For update value with percentage $plus = ''; - if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $plus = '_PERCENTAGE'; + if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + $plus = '_PERCENTAGE'; + } // Update values for ($i = 0; $i < 4; $i++) { - if (GETPOSTISSET('MAIN_METEO'.$plus.'_LEVEL'.$i)) dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_METEO'.$plus.'_LEVEL'.$i)) { + dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'), 'chaine', 0, '', $conf->entity); + } } setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -213,8 +216,7 @@ print ''.$langs->transnoentities("DelaysOfToleranceD print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."
\n"; print "
\n"; -if ($action == 'edit') -{ +if ($action == 'edit') { print ''; print ''; print ''; @@ -222,12 +224,9 @@ if ($action == 'edit') print ''; print ''; - foreach ($modules as $module => $delays) - { - if (!empty($conf->$module->enabled)) - { - foreach ($delays as $delay) - { + foreach ($modules as $module => $delays) { + if (!empty($conf->$module->enabled)) { + foreach ($delays as $delay) { $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); print ''; print ''; @@ -253,18 +252,15 @@ if ($action == 'edit') print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'.img_object('', $delay['img']).'
'; } else { /* - * Show parameters - */ + * Show parameters + */ print ''; print ''; - foreach ($modules as $module => $delays) - { - if (!empty($conf->$module->enabled)) - { - foreach ($delays as $delay) - { + foreach ($modules as $module => $delays) { + if (!empty($conf->$module->enabled)) { + foreach ($delays as $delay) { $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); print ''; print ''; @@ -293,22 +289,28 @@ if ($action == 'edit') print '
'; -if ($conf->global->MAIN_DISABLE_METEO != 1) { +if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO != 1) { // Show logo for weather print ''.$langs->trans("DescWeather").' '; if ($action == 'edit') { $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); - if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std; - else $str_mode_enabled = $str_mode_percentage; + if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + $str_mode_enabled = $str_mode_std; + } else { + $str_mode_enabled = $str_mode_percentage; + } print ''.$str_mode_enabled.''; - print ''; + print ''; print '

'; } else { - if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) print $langs->trans('MeteoStdModEnabled'); - else print $langs->trans('MeteoPercentageModEnabled'); + if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + print $langs->trans('MeteoStdModEnabled'); + } else { + print $langs->trans('MeteoPercentageModEnabled'); + } print '

'; } @@ -316,10 +318,18 @@ if ($conf->global->MAIN_DISABLE_METEO != 1) { $cursor = 10; // By default //if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET; //if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP; - $level0 = $offset; if (!empty($conf->global->MAIN_METEO_LEVEL0)) $level0 = $conf->global->MAIN_METEO_LEVEL0; - $level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) $level1 = $conf->global->MAIN_METEO_LEVEL1; - $level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) $level2 = $conf->global->MAIN_METEO_LEVEL2; - $level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) $level3 = $conf->global->MAIN_METEO_LEVEL3; + $level0 = $offset; if (!empty($conf->global->MAIN_METEO_LEVEL0)) { + $level0 = $conf->global->MAIN_METEO_LEVEL0; + } + $level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) { + $level1 = $conf->global->MAIN_METEO_LEVEL1; + } + $level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) { + $level2 = $conf->global->MAIN_METEO_LEVEL2; + } + $level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) { + $level3 = $conf->global->MAIN_METEO_LEVEL3; + } $text = ''; $options = 'class="valignmiddle" height="60px"'; diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index 9b9060aa054..cbbcafcf975 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -37,7 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "sendings", "deliveries", "other")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); @@ -52,39 +54,40 @@ $type = 'delivery'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstdelivery = GETPOST('maskconstdelivery', 'alpha'); $maskdelivery = GETPOST('maskdelivery', 'alpha'); - if ($maskconstdelivery) $res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity); + if ($maskconstdelivery) { + $res = dolibarr_set_const($db, $maskconstdelivery, $maskdelivery, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } -if ($action == 'set_DELIVERY_FREE_TEXT') -{ +if ($action == 'set_DELIVERY_FREE_TEXT') { $free = GETPOST('DELIVERY_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "DELIVERY_FREE_TEXT", $free, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } -if ($action == 'specimen') -{ +if ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $sending = new Delivery($db); @@ -93,25 +96,21 @@ if ($action == 'specimen') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/delivery/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($sending, $langs) > 0) - { + if ($module->write_file($sending, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=delivery&file=SPECIMEN.pdf"); return; } else { @@ -124,24 +123,21 @@ if ($action == 'specimen') } } -if ($action == 'set') -{ +if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -if ($action == 'del') -{ +if ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->DELIVERY_ADDON_PDF == "$value") dolibarr_del_const($db, 'DELIVERY_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->DELIVERY_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'DELIVERY_ADDON_PDF', $conf->entity); + } } } -if ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "DELIVERY_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +if ($action == 'setdoc') { + if (dolibarr_set_const($db, "DELIVERY_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->DELIVERY_ADDON_PDF = $value; @@ -149,14 +145,12 @@ if ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } } -if ($action == 'setmod') -{ +if ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -197,17 +191,13 @@ print ''."\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/delivery/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { if (preg_match('/^mod_delivery_([a-z0-9_]*)\.php$/', $file)) { $file = substr($file, 0, dol_strlen($file) - 4); @@ -215,11 +205,14 @@ foreach ($dirmodels as $reldir) $module = new $file; - if ($module->isEnabled()) - { + if ($module->isEnabled()) { // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } print ''."\n"; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/delivery/doc/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -349,21 +336,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print "\n"; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
'; +} $htmltext .= '
'; print ''; @@ -439,8 +431,7 @@ print ''; print ''; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') { + foreach ($fieldlist as $field => $value) { + if ($value == 'entity') { $withentity = getEntity($tabname[$id]); continue; } // Define field friendly name from its technical name - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = ucfirst($value); // 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 ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow = $langs->trans("Rate"); - else $valuetoshow = $langs->trans("Amount"); + if ($value == 'pos') { + $valuetoshow = $langs->trans("Position"); $class = 'maxwidth100'; + } + if ($value == 'source') { + $valuetoshow = $langs->trans("Contact"); + } + if ($value == 'price') { + $valuetoshow = $langs->trans("PriceUHT"); + } + if ($value == '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 ($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 ($value == 'localtax1_type') { + $valuetoshow = $langs->trans("UseLocalTax")." 2"; $class = "center"; $sortable = 0; } - if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); $class = 'maxwidth100'; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') - { + if ($value == 'localtax1') { + $valuetoshow = $langs->trans("Rate")." 2"; $class = "center"; + } + if ($value == 'localtax2_type') { + $valuetoshow = $langs->trans("UseLocalTax")." 3"; $class = "center"; $sortable = 0; + } + if ($value == 'localtax2') { + $valuetoshow = $langs->trans("Rate")." 3"; $class = "center"; + } + if ($value == 'organization') { + $valuetoshow = $langs->trans("Organization"); + } + if ($value == 'lang') { + $valuetoshow = $langs->trans("Language"); + } + if ($value == '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 ($value == 'code') { + $valuetoshow = $langs->trans("Code"); $class = 'maxwidth100'; + } + if ($value == 'libelle' || $value == 'label') { $valuetoshow = $form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); } - if ($fieldlist[$field] == 'libelle_facture') { + if ($value == '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 + if ($value == '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"); } - if ($fieldlist[$field] == 'formula') { $valuetoshow = $langs->trans("Formula"); } - if ($fieldlist[$field] == 'paper_size') { $valuetoshow = $langs->trans("PaperSize"); } - if ($fieldlist[$field] == 'orientation') { $valuetoshow = $langs->trans("Orientation"); } - if ($fieldlist[$field] == 'leftmargin') { $valuetoshow = $langs->trans("LeftMargin"); } - if ($fieldlist[$field] == 'topmargin') { $valuetoshow = $langs->trans("TopMargin"); } - if ($fieldlist[$field] == 'spacex') { $valuetoshow = $langs->trans("SpaceX"); } - if ($fieldlist[$field] == 'spacey') { $valuetoshow = $langs->trans("SpaceY"); } - if ($fieldlist[$field] == 'font_size') { $valuetoshow = $langs->trans("FontSize"); } - if ($fieldlist[$field] == 'custom_x') { $valuetoshow = $langs->trans("CustomX"); } - if ($fieldlist[$field] == 'custom_y') { $valuetoshow = $langs->trans("CustomY"); } - if ($fieldlist[$field] == 'percent') { $valuetoshow = $langs->trans("Percentage"); } - if ($fieldlist[$field] == 'affect') { $valuetoshow = $langs->trans("WithCounter"); } - if ($fieldlist[$field] == 'delay') { $valuetoshow = $langs->trans("NoticePeriod"); } - if ($fieldlist[$field] == 'newbymonth') { $valuetoshow = $langs->trans("NewByMonth"); } - if ($fieldlist[$field] == 'fk_tva') { $valuetoshow = $langs->trans("VAT"); } - if ($fieldlist[$field] == 'range_ik') { $valuetoshow = $langs->trans("RangeIk"); } - if ($fieldlist[$field] == 'fk_c_exp_tax_cat') { $valuetoshow = $langs->trans("CarCategory"); } - if ($fieldlist[$field] == 'revenuestamp_type') { $valuetoshow = $langs->trans('TypeOfRevenueStamp'); } - if ($fieldlist[$field] == 'use_default') { $valuetoshow = $langs->trans('Default'); $class = 'center'; } - if ($fieldlist[$field] == 'unit_type') { $valuetoshow = $langs->trans('TypeOfUnit'); } - - 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 ($value == 'recuperableonly') { + $valuetoshow = $langs->trans("NPR"); $class = "center"; + } + if ($value == 'nbjour') { + $valuetoshow = $langs->trans("NbOfDays"); + } + if ($value == 'type_cdr') { + $valuetoshow = $langs->trans("AtEndOfMonth"); $class = "center"; + } + if ($value == 'decalage') { + $valuetoshow = $langs->trans("Offset"); + } + if ($value == 'width' || $value == 'nx') { + $valuetoshow = $langs->trans("Width"); + } + if ($value == 'height' || $value == 'ny') { + $valuetoshow = $langs->trans("Height"); + } + if ($value == 'unit' || $value == 'metric') { + $valuetoshow = $langs->trans("MeasuringUnit"); + } + if ($value == 'region_id' || $value == 'country_id') { + $valuetoshow = ''; + } + if ($value == 'accountancy_code') { + $valuetoshow = $langs->trans("AccountancyCode"); + } + if ($value == 'accountancy_code_sell') { + $valuetoshow = $langs->trans("AccountancyCodeSell"); + } + if ($value == 'accountancy_code_buy') { + $valuetoshow = $langs->trans("AccountancyCodeBuy"); + } + if ($value == 'pcg_version' || $value == 'fk_pcg_version') { + $valuetoshow = $langs->trans("Pcg_version"); + } + if ($value == 'account_parent') { + $valuetoshow = $langs->trans("Accountparent"); + } + if ($value == 'pcg_type') { + $valuetoshow = $langs->trans("Pcg_type"); + } + if ($value == 'pcg_subtype') { + $valuetoshow = $langs->trans("Pcg_subtype"); + } + if ($value == 'sortorder') { + $valuetoshow = $langs->trans("SortOrder"); + } + if ($value == 'short_label') { + $valuetoshow = $langs->trans("ShortLabel"); + } + if ($value == 'range_account') { + $valuetoshow = $langs->trans("Range"); + } + if ($value == 'sens') { + $valuetoshow = $langs->trans("Sens"); + } + if ($value == 'category_type') { + $valuetoshow = $langs->trans("Calculated"); + } + if ($value == 'formula') { + $valuetoshow = $langs->trans("Formula"); + } + if ($value == 'paper_size') { + $valuetoshow = $langs->trans("PaperSize"); + } + if ($value == 'orientation') { + $valuetoshow = $langs->trans("Orientation"); + } + if ($value == 'leftmargin') { + $valuetoshow = $langs->trans("LeftMargin"); + } + if ($value == 'topmargin') { + $valuetoshow = $langs->trans("TopMargin"); + } + if ($value == 'spacex') { + $valuetoshow = $langs->trans("SpaceX"); + } + if ($value == 'spacey') { + $valuetoshow = $langs->trans("SpaceY"); + } + if ($value == 'font_size') { + $valuetoshow = $langs->trans("FontSize"); + } + if ($value == 'custom_x') { + $valuetoshow = $langs->trans("CustomX"); + } + if ($value == 'custom_y') { + $valuetoshow = $langs->trans("CustomY"); + } + if ($value == 'percent') { + $valuetoshow = $langs->trans("Percentage"); + } + if ($value == 'affect') { + $valuetoshow = $langs->trans("WithCounter"); + } + if ($value == 'delay') { + $valuetoshow = $langs->trans("NoticePeriod"); + } + if ($value == 'newbymonth') { + $valuetoshow = $langs->trans("NewByMonth"); + } + if ($value == 'fk_tva') { + $valuetoshow = $langs->trans("VAT"); + } + if ($value == 'range_ik') { + $valuetoshow = $langs->trans("RangeIk"); + } + if ($value == 'fk_c_exp_tax_cat') { + $valuetoshow = $langs->trans("CarCategory"); + } + if ($value == 'revenuestamp_type') { + $valuetoshow = $langs->trans('TypeOfRevenueStamp'); + } + if ($value == 'use_default') { + $valuetoshow = $langs->trans('Default'); $class = 'center'; + } + if ($value == 'unit_type') { + $valuetoshow = $langs->trans('TypeOfUnit'); + } + if ($value == 'public' && $tablib[$id] == 'TicketDictCategory') { + $valuetoshow = $langs->trans('TicketGroupIsPublic'); $class = 'center'; } - if ($valuetoshow != '') - { + if ($id == 2) { // Special case for state page + if ($value == 'region_id') { + $valuetoshow = ' '; $showfield = 1; + } + if ($value == 'region') { + $valuetoshow = $langs->trans("Country").'/'.$langs->trans("Region"); $showfield = 1; + } + } + + if ($valuetoshow != '') { $tdsoffields .= ''; - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) $tdsoffields .= ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - elseif (!empty($tabhelp[$id][$value])) $tdsoffields .= $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); - else $tdsoffields .= $valuetoshow; + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) { + $tdsoffields .= ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + } elseif (!empty($tabhelp[$id][$value])) { + $tdsoffields .= $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); + } else { + $tdsoffields .= $valuetoshow; + } $tdsoffields .= ''; } } - if ($id == 4) $tdsoffields .= ''; + if ($id == 4) { + $tdsoffields .= ''; + } $tdsoffields .= ''; $tdsoffields .= ''; $tdsoffields .= ''; @@ -1239,12 +1442,11 @@ if ($id) $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) != '') + if (GETPOST('actionadd')) { + foreach ($fieldlist as $key => $val) { + if (GETPOST($val) != '') { $obj->$val = GETPOST($val); + } } } @@ -1253,21 +1455,23 @@ if ($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 + } // Line to enter new values print ''; print ''; - if (empty($reshook)) - { - fieldList($fieldlist, $obj, $tabname[$id], 'add'); + if (empty($reshook)) { + fieldList($fieldlist, $obj, $tabname[$id], 'add'); } - if ($id == 4) print ''; + if ($id == 4) { + print ''; + } print ''; @@ -1292,14 +1496,12 @@ if ($id) dol_syslog("htdocs/admin/dict", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; // There is several pages - if ($num > $listlimit || $page) - { + if ($num > $listlimit || $page) { print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); print '
'; } @@ -1310,24 +1512,24 @@ if ($id) // Title line with search input fields print ''; $filterfound = 0; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') continue; + foreach ($fieldlist as $field => $value) { + if ($value == 'entity') { + continue; + } $showfield = 1; // By default - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } + if ($value == 'region_id' || $value == 'country_id') { + $showfield = 0; + } - if ($showfield) - { - if ($value == 'country') - { + if ($showfield) { + if ($value == 'country') { print ''; $filterfound++; - } elseif ($value == 'code') - { + } elseif ($value == 'code') { print ''; @@ -1338,11 +1540,12 @@ if ($id) } } } - if ($id == 4) print ''; + if ($id == 4) { + print ''; + } print ''; print ''; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') continue; + foreach ($fieldlist as $field => $value) { + if ($value == 'entity') { + continue; + } if (in_array($value, array('label', 'libelle', 'libelle_facture')) && empty($tabhelp[$id][$value])) { $tabhelp[$id][$value] = $langs->trans('LabelUsedByDefault'); @@ -1364,100 +1568,218 @@ if ($id) $showfield = 1; // By defaut $cssprefix = ''; $sortable = 1; - $valuetoshow = ucfirst($fieldlist[$field]); // By defaut + $valuetoshow = ucfirst($value); // 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') { - if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow = $langs->trans("Rate"); - else $valuetoshow = $langs->trans("Amount"); + if ($value == 'source') { + $valuetoshow = $langs->trans("Contact"); + } + if ($value == 'price') { + $valuetoshow = $langs->trans("PriceUHT"); + } + if ($value == '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] == 'pos') { $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); } - if ($fieldlist[$field] == 'position') { $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); } - 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] == 'range_account') { $valuetoshow = $langs->trans("Range"); } - if ($fieldlist[$field] == 'sens') { $valuetoshow = $langs->trans("Sens"); } - if ($fieldlist[$field] == 'category_type') { $valuetoshow = $langs->trans("Calculated"); } - if ($fieldlist[$field] == 'formula') { $valuetoshow = $langs->trans("Formula"); } - if ($fieldlist[$field] == 'paper_size') { $valuetoshow = $langs->trans("PaperSize"); } - if ($fieldlist[$field] == 'orientation') { $valuetoshow = $langs->trans("Orientation"); } - if ($fieldlist[$field] == 'leftmargin') { $valuetoshow = $langs->trans("LeftMargin"); } - if ($fieldlist[$field] == 'topmargin') { $valuetoshow = $langs->trans("TopMargin"); } - if ($fieldlist[$field] == 'spacex') { $valuetoshow = $langs->trans("SpaceX"); } - if ($fieldlist[$field] == 'spacey') { $valuetoshow = $langs->trans("SpaceY"); } - if ($fieldlist[$field] == 'font_size') { $valuetoshow = $langs->trans("FontSize"); } - if ($fieldlist[$field] == 'custom_x') { $valuetoshow = $langs->trans("CustomX"); } - if ($fieldlist[$field] == 'custom_y') { $valuetoshow = $langs->trans("CustomY"); } - if ($fieldlist[$field] == 'percent') { $valuetoshow = $langs->trans("Percentage"); } - if ($fieldlist[$field] == 'affect') { $valuetoshow = $langs->trans("WithCounter"); } - if ($fieldlist[$field] == 'delay') { $valuetoshow = $langs->trans("NoticePeriod"); } - if ($fieldlist[$field] == 'newbymonth') { $valuetoshow = $langs->trans("NewByMonth"); } - if ($fieldlist[$field] == 'fk_tva') { $valuetoshow = $langs->trans("VAT"); } - if ($fieldlist[$field] == 'range_ik') { $valuetoshow = $langs->trans("RangeIk"); } - if ($fieldlist[$field] == 'fk_c_exp_tax_cat') { $valuetoshow = $langs->trans("CarCategory"); } - if ($fieldlist[$field] == 'revenuestamp_type') { $valuetoshow = $langs->trans('TypeOfRevenueStamp'); } - if ($fieldlist[$field] == 'use_default') { $valuetoshow = $langs->trans('Default'); $cssprefix = 'center '; } - if ($fieldlist[$field] == 'unit_type') { $valuetoshow = $langs->trans('TypeOfUnit'); } + if ($value == 'localtax1_type') { + $valuetoshow = $langs->trans("UseLocalTax")." 2"; $cssprefix = "center "; $sortable = 0; + } + if ($value == 'localtax1') { + $valuetoshow = $langs->trans("Rate")." 2"; $cssprefix = "center "; $sortable = 0; + } + if ($value == 'localtax2_type') { + $valuetoshow = $langs->trans("UseLocalTax")." 3"; $cssprefix = "center "; $sortable = 0; + } + if ($value == 'localtax2') { + $valuetoshow = $langs->trans("Rate")." 3"; $cssprefix = "center "; $sortable = 0; + } + if ($value == 'organization') { + $valuetoshow = $langs->trans("Organization"); + } + if ($value == 'lang') { + $valuetoshow = $langs->trans("Language"); + } + if ($value == 'type') { + $valuetoshow = $langs->trans("Type"); + } + if ($value == 'code') { + $valuetoshow = $langs->trans("Code"); + } + if ($value == 'pos') { + $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); + } + if ($value == 'position') { + $cssprefix = 'right '; $valuetoshow = $langs->trans("Position"); + } + if ($value == 'libelle' || $value == 'label') { + $valuetoshow = $langs->trans("Label"); + } + if ($value == 'libelle_facture') { + $valuetoshow = $langs->trans("LabelOnDocuments"); + } + if ($value == 'country') { + $valuetoshow = $langs->trans("Country"); + } + if ($value == 'recuperableonly') { + $valuetoshow = $langs->trans("NPR"); $cssprefix = "center "; + } + if ($value == 'nbjour') { + $valuetoshow = $langs->trans("NbOfDays"); + } + if ($value == 'type_cdr') { + $valuetoshow = $langs->trans("AtEndOfMonth"); $cssprefix = "center "; + } + if ($value == 'decalage') { + $valuetoshow = $langs->trans("Offset"); + } + if ($value == 'width' || $value == 'nx') { + $valuetoshow = $langs->trans("Width"); + } + if ($value == 'height' || $value == 'ny') { + $valuetoshow = $langs->trans("Height"); + } + if ($value == 'unit' || $value == 'metric') { + $valuetoshow = $langs->trans("MeasuringUnit"); + } + if ($value == 'accountancy_code') { + $valuetoshow = $langs->trans("AccountancyCode"); + } + if ($value == 'accountancy_code_sell') { + $valuetoshow = $langs->trans("AccountancyCodeSell"); $sortable = 0; + } + if ($value == 'accountancy_code_buy') { + $valuetoshow = $langs->trans("AccountancyCodeBuy"); $sortable = 0; + } + if ($value == 'fk_pcg_version') { + $valuetoshow = $langs->trans("Pcg_version"); + } + if ($value == 'account_parent') { + $valuetoshow = $langs->trans("Accountsparent"); + } + if ($value == 'pcg_type') { + $valuetoshow = $langs->trans("Pcg_type"); + } + if ($value == 'pcg_subtype') { + $valuetoshow = $langs->trans("Pcg_subtype"); + } + if ($value == 'sortorder') { + $valuetoshow = $langs->trans("SortOrder"); + } + if ($value == 'short_label') { + $valuetoshow = $langs->trans("ShortLabel"); + } + if ($value == 'range_account') { + $valuetoshow = $langs->trans("Range"); + } + if ($value == 'sens') { + $valuetoshow = $langs->trans("Sens"); + } + if ($value == 'category_type') { + $valuetoshow = $langs->trans("Calculated"); + } + if ($value == 'formula') { + $valuetoshow = $langs->trans("Formula"); + } + if ($value == 'paper_size') { + $valuetoshow = $langs->trans("PaperSize"); + } + if ($value == 'orientation') { + $valuetoshow = $langs->trans("Orientation"); + } + if ($value == 'leftmargin') { + $valuetoshow = $langs->trans("LeftMargin"); + } + if ($value == 'topmargin') { + $valuetoshow = $langs->trans("TopMargin"); + } + if ($value == 'spacex') { + $valuetoshow = $langs->trans("SpaceX"); + } + if ($value == 'spacey') { + $valuetoshow = $langs->trans("SpaceY"); + } + if ($value == 'font_size') { + $valuetoshow = $langs->trans("FontSize"); + } + if ($value == 'custom_x') { + $valuetoshow = $langs->trans("CustomX"); + } + if ($value == 'custom_y') { + $valuetoshow = $langs->trans("CustomY"); + } + if ($value == 'percent') { + $valuetoshow = $langs->trans("Percentage"); + } + if ($value == 'affect') { + $valuetoshow = $langs->trans("WithCounter"); + } + if ($value == 'delay') { + $valuetoshow = $langs->trans("NoticePeriod"); + } + if ($value == 'newbymonth') { + $valuetoshow = $langs->trans("NewByMonth"); + } + if ($value == 'fk_tva') { + $valuetoshow = $langs->trans("VAT"); + } + if ($value == 'range_ik') { + $valuetoshow = $langs->trans("RangeIk"); + } + if ($value == 'fk_c_exp_tax_cat') { + $valuetoshow = $langs->trans("CarCategory"); + } + if ($value == 'revenuestamp_type') { + $valuetoshow = $langs->trans('TypeOfRevenueStamp'); + } + if ($value == 'use_default') { + $valuetoshow = $langs->trans('Default'); $cssprefix = 'center '; + } + if ($value == 'unit_type') { + $valuetoshow = $langs->trans('TypeOfUnit'); + } + if ($value == 'public' && $tablib[$id] == 'TicketDictCategory') { + $valuetoshow = $langs->trans('TicketGroupIsPublic'); $cssprefix = 'center '; + } - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } + if ($value == 'region_id' || $value == 'country_id') { + $showfield = 0; + } // Show field title - if ($showfield) - { - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) $newvaluetoshow = ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - elseif (!empty($tabhelp[$id][$value])) $newvaluetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); - else $newvaluetoshow = $valuetoshow; + if ($showfield) { + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) { + $newvaluetoshow = ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + } elseif (!empty($tabhelp[$id][$value])) { + $newvaluetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); + } else { + $newvaluetoshow = $valuetoshow; + } - print getTitleFieldOfList($newvaluetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, $cssprefix); + print getTitleFieldOfList($newvaluetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $value : ''), ($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 ''; - if ($num) - { + if ($num) { // Lines with values - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); //print_r($obj); - print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { + 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 @@ -1472,30 +1794,29 @@ if ($id) print '
'; print ''; print ''; - if (!is_null($withentity)) + if (!is_null($withentity)) { print ''; + } print ''; print ''; print ''; } else { - $tmpaction = 'view'; + $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; - if (empty($reshook)) - { + if (empty($reshook)) { $withentity = null; - foreach ($fieldlist as $field => $value) - { + foreach ($fieldlist as $field => $value) { //var_dump($fieldlist); $class = ''; $showfield = 1; - $valuetoshow = $obj->{$fieldlist[$field]}; + $valuetoshow = empty($obj->{$value}) ? '' : $obj->{$value}; - if ($fieldlist[$field] == 'entity') { + if ($value == 'entity') { $withentity = $valuetoshow; continue; } @@ -1506,161 +1827,177 @@ if ($id) $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } elseif ($fieldlist[$field] == 'country') { - if (empty($obj->country_code)) - { + } elseif ($value == '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') { + } elseif ($value == 'recuperableonly' || $value == 'deductible' || $value == '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'); + } elseif ($value == '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])) { + } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { $valuetoshow = price($valuetoshow); } - if ($value == 'private') - { + if ($value == 'private') { $valuetoshow = yn($elementList[$valuetoshow]); - } elseif ($fieldlist[$field] == 'libelle_facture') { + } elseif ($value == '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 = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->{$value}); $valuetoshow = nl2br($valuetoshow); - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif (!empty($obj->code_iso) && $value == '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') { + $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "Civility".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "PaymentType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != "DemandReasonType".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != $obj->code) ? $key : $obj->{$value}; + } elseif ($value == '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') - { + $valuetoshow = ($obj->code && $key != "SendingMethod".strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') - { + $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == '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') { + $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$value}); + } elseif ($value == 'region_id' || $value == 'country_id') { $showfield = 0; - } elseif ($fieldlist[$field] == 'unicode') { + } elseif ($value == 'unicode') { $valuetoshow = $langs->getCurrencySymbol($obj->code, 1); - } elseif ($fieldlist[$field] == 'label' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX.'c_units') { + } elseif ($value == 'label' && $tabname[GETPOST("id", 'int')] == 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') { + $valuetoshow = $langs->trans($obj->{$value}); + } elseif ($value == 'short_label' && $tabname[GETPOST("id", 'int')] == 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')) - { + $valuetoshow = $langs->trans($obj->{$value}); + } elseif (($value == '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') { + $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$value}); + } elseif ($value == 'localtax1' || $value == 'localtax2') { $class = "center"; - } elseif ($fieldlist[$field] == 'localtax1_type') { - if ($obj->localtax1 != 0) + } elseif ($value == 'localtax1_type') { + if ($obj->localtax1 != 0) { $valuetoshow = $localtax_typeList[$valuetoshow]; - else $valuetoshow = ''; + } else { + $valuetoshow = ''; + } $class = "center"; - } elseif ($fieldlist[$field] == 'localtax2_type') { - if ($obj->localtax2 != 0) + } elseif ($value == 'localtax2_type') { + if ($obj->localtax2 != 0) { $valuetoshow = $localtax_typeList[$valuetoshow]; - else $valuetoshow = ''; + } else { + $valuetoshow = ''; + } $class = "center"; - } elseif ($fieldlist[$field] == 'taux') { + } elseif ($value == 'taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); $class = "center"; - } elseif (in_array($fieldlist[$field], array('recuperableonly'))) { + } elseif (in_array($value, array('recuperableonly'))) { $class = "center"; - } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { + } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { $valuetoshow = length_accountg($valuetoshow); - } elseif ($fieldlist[$field] == 'fk_tva') - { - foreach ($form->cache_vatrates as $key => $Tab) - { - if ($form->cache_vatrates[$key]['rowid'] == $valuetoshow) - { + } elseif ($value == 'fk_tva') { + foreach ($form->cache_vatrates as $key => $Tab) { + if ($form->cache_vatrates[$key]['rowid'] == $valuetoshow) { $valuetoshow = $form->cache_vatrates[$key]['libtva']; break; } } - } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') - { + } elseif ($value == '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 ($value == '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) { + $valuetoshow = ($obj->label && $key != strtoupper($obj->label) ? $key : $obj->{$value}); + } elseif ($value == 'code' && $id == 3) { $valuetoshow = $obj->state_code; - } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_product_nature') { + } elseif ($value == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_product_nature') { $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); + $valuetoshow = $langs->trans($obj->{$value}); } $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'; - if ($fieldlist[$field] == 'pos') $class .= ' right'; - if ($fieldlist[$field] == 'use_default') $class .= ' center'; + if ($value == 'note' && $id == 10) { + $class .= ' tdoverflowmax200'; + } + if ($value == 'tracking') { + $class .= ' tdoverflowauto'; + } + if ($value == 'position') { + $class .= ' right'; + } + if ($value == 'localtax1_type') { + $class .= ' nowrap'; + } + if ($value == 'localtax2_type') { + $class .= ' nowrap'; + } + if ($value == 'pos') { + $class .= ' right'; + } + if ($value == 'use_default') { + $class .= ' center'; + } + if ($value == 'public') { + $class .= ' center'; + } // Show value for field - if ($showfield) print ''; + if ($showfield) { + print ''; + } } } @@ -1669,64 +2006,98 @@ if ($id) $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; - if (isset($obj->code) && $id != 10 && $id != 42) - { - 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 (isset($obj->code) && $id != 10 && $id != 42) { + 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'))) - { + 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 (in_array($obj->code, array('banner'))) { + $canbedisabled = 1; + } + } + if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { + $iserasable = 0; + } + if (in_array(empty($obj->code) ? '' : $obj->code, array('AC_OTH', 'AC_OTH_AUTO')) || in_array(empty($obj->type) ? '' : $obj->type, array('systemauto'))) { + $canbedisabled = 0; $canbedisabled = 0; } - 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 (!empty($obj->code) && $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; + 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='.(isset($obj->{$rowidcol}) ? $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 '"; // Modify link - if ($canbemodified) print ''; - else print ''; + if ($canbemodified) { + print ''; + } else { + print ''; + } // Delete link - if ($iserasable) - { + if ($iserasable) { print ''; - } else print ''; + } else { + print ''; + } print "\n"; } @@ -1743,8 +2114,8 @@ if ($id) print ''; } else { /* - * Show list of dictionary to show - */ + * Show list of dictionary to show + */ $lastlineisempty = false; @@ -1756,14 +2127,13 @@ if ($id) print ''; $showemptyline = ''; - foreach ($taborder as $i) - { - if (isset($tabname[$i]) && empty($tabcond[$i])) continue; + foreach ($taborder as $i) { + if (isset($tabname[$i]) && empty($tabcond[$i])) { + continue; + } - if ($i) - { - if ($showemptyline) - { + if ($i) { + if ($showemptyline) { print ''; $showemptyline = 0; } @@ -1771,8 +2141,7 @@ if ($id) $value = $tabname[$i]; print ''; print ''; print ''; $lastlineisempty = false; } else { - if (!$lastlineisempty) - { + if (!$lastlineisempty) { $showemptyline = 1; $lastlineisempty = true; } @@ -1827,24 +2195,20 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $withentity = ''; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') { - $withentity = $obj->{$fieldlist[$field]}; + foreach ($fieldlist as $field => $value) { + if ($value == 'entity') { + $withentity = $obj->{$value}; 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]}:''); + if (in_array($value, array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) { + $hidden = (!empty($obj->{$value}) ? $obj->{$value}:''); print ''; - } elseif ($fieldlist[$field] == 'country') - { - if (in_array('region_id', $fieldlist)) - { + } elseif ($value == 'country') { + if (in_array('region_id', $fieldlist)) { print ''; continue; @@ -1853,104 +2217,94 @@ 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') - { - if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) - { - $country_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0); + } elseif ($value == 'country_id') { + if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate) + $country_id = (!empty($obj->{$value}) ? $obj->{$value} : 0); print ''; } - } elseif ($fieldlist[$field] == 'region') - { + } elseif ($value == 'region') { print ''; - } elseif ($fieldlist[$field] == 'region_id') - { - $region_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:0); + } elseif ($value == 'region_id') { + $region_id = (!empty($obj->{$value}) ? $obj->{$value}:0); print ''; - } elseif ($fieldlist[$field] == 'lang') - { + } elseif ($value == 'lang') { print ''; - } - // The type of the element (for contact types) - elseif ($fieldlist[$field] == 'element') - { + } elseif ($value == 'element') { + // The type of the element (for contact types) print ''; - } - // The source of the element (for contact types) - elseif ($fieldlist[$field] == 'source') - { + } elseif ($value == 'source') { + // The source of the element (for contact types) print ''; - } elseif ($fieldlist[$field] == 'private') - { + } elseif ($value == 'private') { print ''; - } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") - { + } elseif ($value == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") { $type = (!empty($obj->type) ? $obj->type : 'user'); // Check if type is different of 'user' (external module) print ''; - } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') - { + } elseif ($value == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') { print ''; - } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { - if ($fieldlist[$field] == 'type_cdr') print ''; - } elseif (in_array($fieldlist[$field], array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { + } elseif (in_array($value, array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { $class = "left"; - if (in_array($fieldlist[$field], array('taux', 'localtax1', 'localtax2'))) $class = "center"; // Fields aligned on right + if (in_array($value, array('taux', 'localtax1', 'localtax2'))) { + $class = "center"; // Fields aligned on right + } print ''; - } elseif (in_array($fieldlist[$field], array('libelle_facture'))) { + } elseif (in_array($value, array('libelle_facture'))) { print ''; - } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { - print ''; - } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { - print ''; - } elseif ($fieldlist[$field] == 'unit') { + } elseif ($value == 'price' || preg_match('/^amount/i', $value)) { + print ''; + } elseif ($value == 'code' && isset($obj->{$value})) { + print ''; + } elseif ($value == 'unit') { print ''; - } - // Le type de taxe locale - elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') - { + } elseif ($value == 'localtax1_type' || $value == 'localtax2_type') { + // Le type de taxe locale print ''; - } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') - { + } elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') { print ''; - } elseif ($fieldlist[$field] == 'fk_tva') - { + } elseif ($value == 'fk_tva') { print ''; - } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') - { + } elseif ($value == 'fk_c_exp_tax_cat') { print ''; - } elseif ($fieldlist[$field] == 'fk_range') - { + } elseif ($value == 'fk_range') { print ''; } else { - $fieldValue = isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''; + $fieldValue = isset($obj->{$value}) ? $obj->{$value}:''; - if ($fieldlist[$field] == 'sortorder') - { + if ($value == 'sortorder') { $fieldlist[$field] = 'position'; } $classtd = ''; $class = ''; - if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; - if (in_array($fieldlist[$field], array('dayrule', 'day', 'month', 'year', 'pos', 'use_default', 'affect', 'delay', 'position', 'sortorder', 'sens', 'category_type'))) { + if ($fieldlist[$field] == 'code') { + $class = 'maxwidth100'; + } + if (in_array($fieldlist[$field], array('dayrule', 'day', 'month', 'year', 'pos', 'use_default', 'affect', 'delay', 'position', 'public', 'sortorder', 'sens', 'category_type'))) { $class = 'maxwidth50 center'; } - if (in_array($fieldlist[$field], array('use_default'))) { + if (in_array($fieldlist[$field], array('use_default', 'public'))) { $classtd = 'center'; } - if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) $class = 'quatrevingtpercent'; + if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) { + $class = 'quatrevingtpercent'; + } print ''; // do not load if display none //$html .= ''; diff --git a/htdocs/admin/dolistore/index.html b/htdocs/admin/dolistore/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/admin/dolistore/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 33df8a4b6e3..52badf366ca 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -29,17 +29,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->load("admin"); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* * Action */ -if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -47,11 +47,9 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -73,7 +71,7 @@ print '
'; $head = ecm_admin_prepare_head(); -print dol_get_fiche_head($head, 'ecm', $langs->trans("ECM"), -1, 'ecm'); +print dol_get_fiche_head($head, 'ecm', '', -1, ''); print '
'.$langs->trans("DelaysOfToleranceBeforeWarning").''.$langs->trans("Value").'
'.img_object('', $delay['img']).'
'.$module->name."\n"; print $module->info(); @@ -231,13 +224,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '
'; - if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") - { + if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; @@ -254,8 +249,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
'; } else { $htmltooltip .= $langs->trans($module->error).'
'; @@ -294,12 +290,10 @@ $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -320,28 +314,21 @@ print "
'; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '\n"; print 'scandir.'&label='.urlencode($module->name).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -377,8 +369,7 @@ foreach ($dirmodels as $reldir) // Default print ""; - if ($conf->global->DELIVERY_ADDON_PDF == "$name") - { + if ($conf->global->DELIVERY_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').''; @@ -396,8 +387,7 @@ foreach ($dirmodels as $reldir) // Preview print ''; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -430,7 +420,9 @@ print "
'; print $form->textwithpicto($langs->trans("FreeLegalTextOnDeliveryReceipts"), $langs->trans("AddCRIfTooLong").'

'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; $variablename = 'DELIVERY_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/delivery_extrafields.php b/htdocs/admin/delivery_extrafields.php index c0ed636abac..cf712bc6ecf 100644 --- a/htdocs/admin/delivery_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -32,8 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries')); @@ -45,13 +46,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'delivery'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -84,35 +89,23 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/deliverydet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php index 322eff2f968..c74f5235d42 100644 --- a/htdocs/admin/deliverydet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'sendings')); @@ -46,13 +47,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'deliverydet'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -85,35 +90,23 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 6801c9236b0..455c01d0337 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2019 Alexandre Spangaro + * Copyright (C) 2011-2020 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2019-2020 Frédéric France @@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page -$langs->loadLangs(array("errors", "admin", "main", "companies", "resource", "holiday", "accountancy", "hrm", "orders", "contracts", "projects", "propal", "bills", "interventions")); +$langs->loadLangs(array("errors", "admin", "main", "companies", "resource", "holiday", "accountancy", "hrm", "orders", "contracts", "projects", "propal", "bills", "interventions", "ticket")); $action = GETPOST('action', 'alpha') ?GETPOST('action', 'alpha') : 'view'; $confirm = GETPOST('confirm', 'alpha'); @@ -54,16 +54,24 @@ $entity = GETPOST('entity', 'int'); $code = GETPOST('code', 'alpha'); $allowed = $user->admin; -if ($id == 7 && !empty($user->rights->accounting->chartofaccount)) $allowed = 1; // Tax page allowed to manager of chart account -if ($id == 10 && !empty($user->rights->accounting->chartofaccount)) $allowed = 1; // Vat page allowed to manager of chart account -if ($id == 17 && !empty($user->rights->accounting->chartofaccount)) $allowed = 1; // Dictionary with type of expense report and accounting account allowed to manager of chart account -if (!$allowed) accessforbidden(); +if ($id == 7 && !empty($user->rights->accounting->chartofaccount)) { + $allowed = 1; // Tax page allowed to manager of chart account +} +if ($id == 10 && !empty($user->rights->accounting->chartofaccount)) { + $allowed = 1; // Vat page allowed to manager of chart account +} +if ($id == 17 && !empty($user->rights->accounting->chartofaccount)) { + $allowed = 1; // Dictionary with type of expense report and accounting account allowed to manager of chart account +} +if (!$allowed) { + accessforbidden(); +} $acts = array(); $actl = array(); $acts[0] = "activate"; $acts[1] = "disable"; -$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off'); -$actl[1] = img_picto($langs->trans("Activated"), 'switch_on'); +$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"'); +$actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"'); $listoffset = GETPOST('listoffset'); $listlimit = GETPOST('listlimit') > 0 ?GETPOST('listlimit') : 1000; // To avoid too long dictionaries @@ -72,14 +80,15 @@ $active = 1; $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 = $listlimit * $page; $pageprev = $page - 1; $pagenext = $page + 1; $search_country_id = GETPOST('search_country_id', 'int'); -if (!GETPOSTISSET('search_country_id') && $search_country_id == '' && ($id == 2 || $id == 3 || $id == 10)) // Not a so good idea to force on current country for all dictionaries. Some tables have entries that are for all countries, we must be able to see them, so this is done for dedicated dictionaries only. -{ +if (!GETPOSTISSET('search_country_id') && $search_country_id == '' && ($id == 2 || $id == 3 || $id == 10)) { // Not a so good idea to force on current country for all dictionaries. Some tables have entries that are for all countries, we must be able to see them, so this is done for dedicated dictionaries only. $search_country_id = $mysoc->country_id; } $search_code = GETPOST('search_code', 'alpha'); @@ -205,7 +214,7 @@ $tabsql[17] = "SELECT id as rowid, code, label, accountancy_code, active FR $tabsql[18] = "SELECT rowid as rowid, code, libelle, tracking, active FROM ".MAIN_DB_PREFIX."c_shipment_mode"; $tabsql[19] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_effectif"; $tabsql[20] = "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_input_method"; -$tabsql[21] = "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c"; +$tabsql[21] = "SELECT c.rowid as rowid, c.code, c.label, c.active, c.position FROM ".MAIN_DB_PREFIX."c_availability AS c"; $tabsql[22] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason"; $tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as country, c.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; $tabsql[24] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; @@ -250,7 +259,7 @@ $tabsqlsort[17] = "code ASC"; $tabsqlsort[18] = "code ASC, libelle ASC"; $tabsqlsort[19] = "id ASC"; $tabsqlsort[20] = "code ASC, libelle ASC"; -$tabsqlsort[21] = "code ASC, label ASC"; +$tabsqlsort[21] = "code ASC, label ASC, position ASC"; $tabsqlsort[22] = "code ASC, label ASC"; $tabsqlsort[23] = "country ASC, taux ASC"; $tabsqlsort[24] = "code ASC, label ASC"; @@ -295,7 +304,7 @@ $tabfield[17] = "code,label,accountancy_code"; $tabfield[18] = "code,libelle,tracking"; $tabfield[19] = "code,libelle"; $tabfield[20] = "code,libelle"; -$tabfield[21] = "code,label"; +$tabfield[21] = "code,label,position"; $tabfield[22] = "code,label"; $tabfield[23] = "country_id,country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[24] = "code,label"; @@ -340,7 +349,7 @@ $tabfieldvalue[17] = "code,label,accountancy_code"; $tabfieldvalue[18] = "code,libelle,tracking"; $tabfieldvalue[19] = "code,libelle"; $tabfieldvalue[20] = "code,libelle"; -$tabfieldvalue[21] = "code,label"; +$tabfieldvalue[21] = "code,label,position"; $tabfieldvalue[22] = "code,label"; $tabfieldvalue[23] = "country,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[24] = "code,label"; @@ -385,7 +394,7 @@ $tabfieldinsert[17] = "code,label,accountancy_code"; $tabfieldinsert[18] = "code,libelle,tracking"; $tabfieldinsert[19] = "code,libelle"; $tabfieldinsert[20] = "code,libelle"; -$tabfieldinsert[21] = "code,label"; +$tabfieldinsert[21] = "code,label,position"; $tabfieldinsert[22] = "code,label"; $tabfieldinsert[23] = "fk_pays,taux,revenuestamp_type,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[24] = "code,label"; @@ -477,7 +486,7 @@ $tabcond[16] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_ $tabcond[17] = (!empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled)); $tabcond[18] = !empty($conf->expedition->enabled) || !empty($conf->reception->enabled); $tabcond[19] = !empty($conf->societe->enabled); -$tabcond[20] = (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)); +$tabcond[20] = (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled); $tabcond[21] = !empty($conf->propal->enabled); $tabcond[22] = (!empty($conf->commande->enabled) || !empty($conf->propal->enabled)); $tabcond[23] = true; @@ -523,7 +532,7 @@ $tabhelp[17] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[18] = array('code'=>$langs->trans("EnterAnyCode"), 'tracking'=>$langs->trans("UrlTrackingDesc")); $tabhelp[19] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[20] = array('code'=>$langs->trans("EnterAnyCode")); -$tabhelp[21] = array('code'=>$langs->trans("EnterAnyCode")); +$tabhelp[21] = array('code'=>$langs->trans("EnterAnyCode"), 'position'=>$langs->trans("PositionIntoComboList")); $tabhelp[22] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[23] = array('revenuestamp_type'=>'FixedOrPercent'); $tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode")); @@ -596,9 +605,8 @@ complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqls // Defaut sortorder -if (empty($sortfield)) -{ - $tmp1 = explode(',', $tabsqlsort[$id]); +if (empty($sortfield)) { + $tmp1 = explode(',', empty($tabsqlsort[$id]) ? '' : $tabsqlsort[$id]); $tmp2 = explode(' ', $tmp1[0]); $sortfield = preg_replace('/^.*\./', '', $tmp2[0]); } @@ -606,8 +614,7 @@ if (empty($sortfield)) // Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact") $elementList = array(); $sourceList = array(); -if ($id == 11) -{ +if ($id == 11) { $elementList = array( '' => '', 'societe' => $langs->trans('ThirdParty'), @@ -621,7 +628,7 @@ if ($id == 11) // 'contract' => $langs->trans('Contract'), 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), - 'ticket' => $langs->trans('Ticket'), + 'ticket' => $langs->trans('Ticket'), 'agenda' => $langs->trans('Agenda'), 'dolresource' => $langs->trans('Resource'), // old deprecated @@ -631,7 +638,9 @@ if ($id == 11) 'fichinter' => $langs->trans('InterventionCard'), 'contrat' => $langs->trans('Contract'), ); - if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); + if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) { + $elementList["societe"] = $langs->trans('ThirdParty'); + } complete_elementList_with_modules($elementList); @@ -644,8 +653,7 @@ if ($id == 11) // Define localtax_typeList (used for dictionary "llx_c_tva") $localtax_typeList = array(); -if ($id == 10) -{ +if ($id == 10) { $localtax_typeList = array( "0" => $langs->trans("No"), "1" => $langs->trans("Yes").' ('.$langs->trans("Type")." 1)", //$langs->trans("%ageOnAllWithoutVAT"), @@ -663,15 +671,13 @@ if ($id == 10) * Actions */ -if (GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter_x', 'alpha')) -{ +if (GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter_x', 'alpha')) { $search_country_id = ''; $search_code = ''; } // Actions add or modify an entry into a dictionary -if (GETPOST('actionadd') || GETPOST('actionmodify')) -{ +if (GETPOST('actionadd') || GETPOST('actionmodify')) { $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); $listfieldinsert = explode(',', $tabfieldinsert[$id]); $listfieldmodify = explode(',', $tabfieldinsert[$id]); @@ -679,42 +685,89 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) // Check that all fields are filled $ok = 1; - foreach ($listfield as $f => $value) - { + 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', 'DictionaryHolidayTypes', 'DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory + 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', 'DictionaryHolidayTypes', '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 ($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 ((!GETPOSTISSET($value) || GETPOST($value) == '') - && (!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' && $listfield[$f] != 'note')) // Field code and note is not mandatory for dictionary table 10 + && (!in_array($value, array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory + && ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10 ) ) { $ok = 0; - $fieldnamekey = $listfield[$f]; + $fieldnamekey = $value; // 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'; + 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'); } @@ -724,56 +777,58 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok = 0; setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors'); } - if (GETPOSTISSET("code")) - { - if (GETPOST("code") == '0') - { + 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 { + $ok = 0; + $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
'; + }*/ + } + if (GETPOSTISSET("country") && (GETPOST("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 || $id == 42) && !is_numeric($_POST["code"])) { - $ok = 0; - setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric", $langs->transnoentities("Code")), null, 'errors'); + if (($id == 3 || $id == 42) && !is_numeric(GETPOST("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 ($_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 && GETPOSTISSET("code")) // Spaces are not allowed into code for tax dictionary - { + if ((GETPOST("localtax1_type") || (GETPOST('localtax1_type') == '0')) && !GETPOST("localtax1")) { + $_POST["localtax1"] = '0'; // If empty, we force to 0 + } + if ((GETPOST("localtax2_type") || (GETPOST('localtax2_type') == '0')) && !GETPOST("localtax2")) { + $_POST["localtax2"] = '0'; // If empty, we force to 0 + } + if (GETPOST("accountancy_code") <= 0) { + $_POST["accountancy_code"] = ''; // If empty, we force to null + } + if (GETPOST("accountancy_code_sell") <= 0) { + $_POST["accountancy_code_sell"] = ''; // If empty, we force to null + } + if (GETPOST("accountancy_code_buy") <= 0) { + $_POST["accountancy_code_buy"] = ''; // If empty, we force to null + } + if ($id == 10 && GETPOSTISSET("code")) { // Spaces are not allowed into code for tax dictionary $_POST["code"] = preg_replace('/[^a-zA-Z0-9\-\+]/', '', $_POST["code"]); } // If check ok and action add, add the line - if ($ok && GETPOST('actionadd')) - { - if ($tabrowid[$id]) - { + 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) - { + if ($result) { $obj = $db->fetch_object($result); $newid = ($obj->newid + 1); } else { @@ -784,38 +839,41 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) // Add new entry $sql = "INSERT INTO ".$tabname[$id]." ("; // List of fields - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) + 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)) + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) { $sql .= $newid.","; + } $i = 0; - foreach ($listfieldinsert as $f => $value) - { + foreach ($listfieldinsert as $f => $value) { $keycode = $listfieldvalue[$i]; - if (empty($keycode)) $keycode = $value; + if (empty($keycode)) { + $keycode = $value; + } - if ($value == 'price' || preg_match('/^amount/i', $value)) { - $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); - } - elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') { - $_POST[$keycode] = price2num(GETPOST($keycode), 8); - } - elseif ($value == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($value == 'price' || preg_match('/^amount/i', $value)) { + $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); + } elseif ($value == 'taux' || $value == 'localtax1' || $value == 'localtax2') { + $_POST[$keycode] = price2num(GETPOST($keycode), 8); + } 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' - { + 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') { + } 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'); @@ -827,11 +885,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } $sql .= ",1)"; - dol_syslog("actionadd", LOG_DEBUG); - $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs'); + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) { // Add is ok + setEventMessages($langs->transnoentities("RecordCreatedSuccessfully"), null, 'mesgs'); // Clean $_POST array, we keep only id of dictionary if ($id == 10 && GETPOST('country', 'int') > 0) { @@ -848,41 +905,44 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } // If verif ok and action modify, modify the line - if ($ok && GETPOST('actionmodify')) - { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } + 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)) - { + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) { $sql .= $tabrowid[$id]."="; $sql .= "'".$db->escape($rowid)."', "; } $i = 0; - foreach ($listfieldmodify as $field) - { + foreach ($listfieldmodify as $field) { $keycode = $listfieldvalue[$i]; - if (empty($keycode)) $keycode = $field; + if (empty($keycode)) { + $keycode = $field; + } - if ($field == 'price' || preg_match('/^amount/i', $field)) { - $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); - } - elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') { - $_POST[$keycode] = price2num(GETPOST($keycode), 8); - } - elseif ($field == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($field == 'price' || preg_match('/^amount/i', $field)) { + $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); + } elseif ($field == 'taux' || $field == 'localtax1' || $field == 'localtax2') { + $_POST[$keycode] = price2num(GETPOST($keycode), 8); + } elseif ($field == 'entity') { + $_POST[$keycode] = getEntity($tabname[$id]); + } - if ($i) $sql .= ","; + if ($i) { + $sql .= ","; + } $sql .= $field."="; - if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position' - { + 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') { + } 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'); @@ -897,36 +957,37 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } else { $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); } - if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'"; + if (in_array('entity', $listfieldmodify)) { + $sql .= " AND entity = '".getEntity($tabname[$id])."'"; + } dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { setEventMessages($db->error(), null, 'errors'); } } //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } -if (GETPOST('actioncancel')) -{ +if (GETPOST('actioncancel')) { //$_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 ($action == 'confirm_delete' && $confirm == 'yes') { // delete + if ($tabrowid[$id]) { + $rowidcol = $tabrowid[$id]; + } else { + $rowidcol = "rowid"; + } $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') - { + if (!$result) { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); } else { dol_print_error($db); @@ -935,9 +996,12 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete } // activate -if ($action == $acts[0]) -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == $acts[0]) { + 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 : ''); @@ -946,16 +1010,18 @@ if ($action == $acts[0]) } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } // disable -if ($action == $acts[1]) -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == $acts[1]) { + 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 : ''); @@ -964,16 +1030,18 @@ if ($action == $acts[1]) } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } // favorite -if ($action == 'activate_favorite') -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == 'activate_favorite') { + 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 : ''); @@ -982,16 +1050,18 @@ if ($action == 'activate_favorite') } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } // disable favorite -if ($action == 'disable_favorite') -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == 'disable_favorite') { + 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 : ''); @@ -1000,8 +1070,7 @@ if ($action == 'disable_favorite') } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } @@ -1019,27 +1088,23 @@ $title = $langs->trans("DictionarySetup"); llxHeader('', $title); $linkback = ''; -if ($id) -{ +if ($id) { $title .= ' - '.$langs->trans($tablib[$id]); $linkback = ''.$langs->trans("BackToDictionaryList").''; } $titlepicto = 'title_setup'; -if ($id == 10 && GETPOST('from') == 'accountancy') -{ +if ($id == 10 && GETPOST('from') == 'accountancy') { $title = $langs->trans("MenuVatAccounts"); $titlepicto = 'accountancy'; } -if ($id == 7 && GETPOST('from') == 'accountancy') -{ +if ($id == 7 && GETPOST('from') == 'accountancy') { $title = $langs->trans("MenuTaxAccounts"); $titlepicto = 'accountancy'; } print load_fiche_titre($title, $linkback, $titlepicto); -if (empty($id)) -{ +if (empty($id)) { print ''.$langs->trans("DictionaryDesc"); print " ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; print '

'; @@ -1047,43 +1112,66 @@ if (empty($id)) $param = '&id='.urlencode($id); -if ($search_country_id > 0) $param .= '&search_country_id='.urlencode($search_country_id); -if ($search_code != '') $param .= '&search_code='.urlencode($search_country_id); -if ($entity != '') $param .= '&entity='.(int) $entity; +if ($search_country_id > 0) { + $param .= '&search_country_id='.urlencode($search_country_id); +} +if ($search_code != '') { + $param .= '&search_code='.urlencode($search_country_id); +} +if ($entity != '') { + $param .= '&entity='.(int) $entity; +} $paramwithsearch = $param; -if ($sortorder) $paramwithsearch .= '&sortorder='.urlencode($sortorder); -if ($sortfield) $paramwithsearch .= '&sortfield='.urlencode($sortfield); -if (GETPOST('from')) $paramwithsearch .= '&from='.urlencode(GETPOST('from', 'alpha')); +if ($sortorder) { + $paramwithsearch .= '&sortorder='.urlencode($sortorder); +} +if ($sortfield) { + $paramwithsearch .= '&sortfield='.urlencode($sortfield); +} +if (GETPOST('from')) { + $paramwithsearch .= '&from='.urlencode(GETPOST('from', 'alpha')); +} // Confirmation of the deletion of the line -if ($action == 'delete') -{ +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); } //var_dump($elementList); + /* * Show a dictionary */ -if ($id) -{ +if ($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 == 7) $sql .= natural_search("a.code", $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 = ".((int) $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 == 7) { + $sql .= natural_search("a.code", $search_code); + } elseif ($search_code != '' && $id != 9) { + $sql .= natural_search("code", $search_code); + } - if ($sortfield) - { + if ($sortfield) { // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield = 'country_code'; + if ($sortfield == 'country') { + $sortfield = 'country_code'; + } $sql .= $db->order($sortfield, $sortorder); $sql .= ", "; // Clear the required sort criteria for the tabsqlsort to be able to force it with selected value @@ -1096,8 +1184,7 @@ if ($id) $sql .= $db->plimit($listlimit + 1, $offset); //print $sql; - if (empty($tabfield[$id])) - { + if (empty($tabfield[$id])) { dol_print_error($db, 'The table with id '.$id.' has no array tabfield defined'); exit; } @@ -1107,15 +1194,13 @@ if ($id) print ''; print ''; - if ($id == 10 && empty($conf->global->FACTURE_TVAOPTION)) - { + 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]) - { + if ($tabname[$id]) { $withentity = null; $fieldlist = explode(',', $tabfield[$id]); @@ -1125,110 +1210,228 @@ if ($id) // Line for title $tdsoffields = '
  '; $tdsoffields .= ''; - if (!is_null($withentity)) + if (!is_null($withentity)) { $tdsoffields .= ''; + } $tdsoffields .= '
'; - if ($action != 'edit') - { + if ($action != 'edit') { print ''; } print '
'; print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth150 maxwidthonsmartphone'); print ''; print ''; print ''; - if ($filterfound) - { + if ($filterfound) { $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; } @@ -1351,9 +1554,10 @@ if ($id) // Title of lines print '
'.$valuetoshow.''.$valuetoshow.''; - if ($iserasable) print ''.$actl[$obj->favorite].''; - else print $langs->trans("AlwaysActive"); + if ($iserasable) { + print ''.$actl[$obj->favorite].''; + } 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"); + 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().''; + if ($user->admin) { + print ''.img_delete().''; + } //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print '  
   
'; - if (!empty($tabcond[$i])) - { + if (!empty($tabcond[$i])) { print ''.$langs->trans($tablib[$i]).''; } else { print $langs->trans($tablib[$i]); @@ -1780,15 +2149,14 @@ if ($id) print ''; /*if (empty($tabcond[$i])) - { - print info_admin($langs->trans("DictionaryDisabledSinceNoModuleNeedIt"),1); - }*/ + { + print info_admin($langs->trans("DictionaryDisabledSinceNoModuleNeedIt"),1); + }*/ print ''.$tabname[$i].'
'; - print ''; + print ''; print $langs->trans($hidden); print ''; print ''; - print ''; + print ''; print ''; $formcompany->select_region($region_id, 'region'); print ''; - print ''; + print ''; print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; - print $form->selectarray('element', $elementList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray('element', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - print $form->selectarray('source', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray('source', $sourceList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - print $form->selectyesno("private", (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectyesno("private", (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; print $type.''; 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 $form->selectarray($value, $select_list, (!empty($obj->{$value}) ? $obj->{$value}:'2')); 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]}:'')); + } elseif ($value == 'recuperableonly' || $value == 'type_cdr' || $value == 'deductible' || $value == 'category_type') { + if ($value == 'type_cdr') { + print ''; } else { - print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); + print ''; + } + if ($value == 'type_cdr') { + print $form->selectarray($value, array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (!empty($obj->{$value}) ? $obj->{$value}:'')); + } else { + print $form->selectyesno($value, (!empty($obj->{$value}) ? $obj->{$value}:''), 1); } print ''; - print ''; + print ''; print ''; $transfound = 0; $transkey = ''; // Special case for labels - if ($tabname == MAIN_DB_PREFIX.'c_payment_term') - { + if ($tabname == MAIN_DB_PREFIX.'c_payment_term') { $langs->load("bills"); $transkey = "PaymentCondition".strtoupper($obj->code); - if ($langs->trans($transkey) != $transkey) - { + if ($langs->trans($transkey) != $transkey) { $transfound = 1; print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); } } - if (!$transfound) - { - print ''; + if (!$transfound) { + print ''; } else { - print ''; + print ''; } print ''; $units = array( 'mm' => $langs->trans('SizeUnitmm'), @@ -1958,65 +2312,60 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') 'point' => $langs->trans('SizeUnitpoint'), 'inch' => $langs->trans('SizeUnitinch') ); - print $form->selectarray('unit', $units, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 0, 0, 0); + print $form->selectarray('unit', $units, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0); print ''; - print $form->selectarray($fieldlist[$field], $localtax_typeList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); + print $form->selectarray($value, $localtax_typeList, (!empty($obj->{$value}) ? $obj->{$value}:'')); print ''; - if (!empty($conf->accounting->enabled)) - { - $fieldname = $fieldlist[$field]; + if (!empty($conf->accounting->enabled)) { + $fieldname = $value; $accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0); - print $formaccounting->select_account($accountancy_account, '.'.$fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); + print $formaccounting->select_account($accountancy_account, '.'. $value, 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); } else { - $fieldname = $fieldlist[$field]; - print ''; + $fieldname = $value; + print ''; } print ''; print $form->load_tva('fk_tva', $obj->taux, $mysoc, new Societe($db), 0, 0, '', false, -1); print ''; print $form->selectExpenseCategories($obj->fk_c_exp_tax_cat); print ''; print $form->selectExpenseRanges($obj->fk_range); print ''; $transfound = 0; $transkey = ''; - if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label - { + 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); @@ -2025,14 +2374,12 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $langs->load("bills"); $transkey = "PaymentConditionShort".strtoupper($obj->code); } - if ($transkey && $langs->trans($transkey) != $transkey) - { + if ($transkey && $langs->trans($transkey) != $transkey) { $transfound = 1; print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); } } - if (!$transfound) - { + if (!$transfound) { print ''; } else { print ''; diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index e2666eb3312..af844edaa68 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -17,7 +17,9 @@ * or see https://www.gnu.org/ */ -if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1); +if (!defined('REQUIRE_JQUERY_BLOCKUI')) { + define('REQUIRE_JQUERY_BLOCKUI', 1); +} if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', 1); } @@ -47,7 +49,8 @@ try { $url = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/images/products/'.$id_product.'/'.$id_image.'/'.$quality; $api = new PrestaShopWebservice( $conf->global->MAIN_MODULE_DOLISTORE_API_SRV, - $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $dolistore->debug_api + $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, + $dolistore->debug_api ); //echo $url; $request = $api->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET')); @@ -56,7 +59,11 @@ try { } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors $trace = $e->getTrace(); - if ($trace[0]['args'][0] == 404) die('Bad ID'); - elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); - else die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV); + if ($trace[0]['args'][0] == 404) { + die('Bad ID'); + } elseif ($trace[0]['args'][0] == 401) { + die('Bad auth key'); + } else { + die('Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV); + } } diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index 0bd03301389..adaf82d6964 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -7,7 +7,7 @@ * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/osl-3.0.php +* https://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. @@ -16,11 +16,11 @@ * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. +* needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA * @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA * PrestaShop Webservice Library * @package PrestaShopWebservice @@ -71,8 +71,9 @@ class PrestaShopWebservice */ public function __construct($url, $key, $debug = true) { - if (!extension_loaded('curl')) - throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library'); + if (!extension_loaded('curl')) { + throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library'); + } $this->url = $url; $this->key = $key; $this->debug = $debug; @@ -88,8 +89,7 @@ class PrestaShopWebservice protected function checkStatusCode($status_code) { $error_label = 'This call to PrestaShop Web Services failed and returned an HTTP status of %d. That means: %s.'; - switch ($status_code) - { + switch ($status_code) { case 200: case 201: break; @@ -132,25 +132,27 @@ class PrestaShopWebservice $session = curl_init($url); $curl_options = array(); - foreach ($defaultParams as $defkey => $defval) - { - if (isset($curl_params[$defkey])) + foreach ($defaultParams as $defkey => $defval) { + 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])) + foreach ($curl_params as $defkey => $defval) { + if (!isset($curl_options[$defkey])) { $curl_options[$defkey] = $curl_params[$defkey]; + } + } dol_syslog("curl curl_options = ".var_export($curl_options, true)); curl_setopt_array($session, $curl_options); $response = curl_exec($session); $index = strpos($response, "\r\n\r\n"); - if ($index === false && $curl_params[CURLOPT_CUSTOMREQUEST] != 'HEAD') + if ($index === false && $curl_params[CURLOPT_CUSTOMREQUEST] != 'HEAD') { throw new PrestaShopWebserviceException('Bad HTTP response'); + } $header = substr($response, 0, $index); $body = substr($response, $index + 4); @@ -158,39 +160,39 @@ class PrestaShopWebservice $headerArrayTmp = explode("\n", $header); $headerArray = array(); - foreach ($headerArrayTmp as &$headerItem) - { + foreach ($headerArrayTmp as &$headerItem) { $tmp = explode(':', $headerItem); $tmp = array_map('trim', $tmp); - if (count($tmp) == 2) + if (count($tmp) == 2) { $headerArray[$tmp[0]] = $tmp[1]; + } } - if (array_key_exists('PSWS-Version', $headerArray)) - { + if (array_key_exists('PSWS-Version', $headerArray)) { $this->version = $headerArray['PSWS-Version']; - if ( - version_compare(PrestaShopWebservice::PSCOMPATIBLEVERSIONMIN, $headerArray['PSWS-Version']) == 1 || + if (version_compare(PrestaShopWebservice::PSCOMPATIBLEVERSIONMIN, $headerArray['PSWS-Version']) == 1 || version_compare(PrestaShopWebservice::PSCOMPATIBLEVERSIONMAX, $headerArray['PSWS-Version']) == -1 - ) - throw new PrestaShopWebserviceException('This library is not compatible with this version of PrestaShop. Please upgrade/downgrade this library'); + ) { + throw new PrestaShopWebserviceException('This library is not compatible with this version of PrestaShop. Please upgrade/downgrade this library'); + } } - if ($this->debug) - { + if ($this->debug) { $this->printDebug('HTTP REQUEST HEADER', curl_getinfo($session, CURLINFO_HEADER_OUT)); $this->printDebug('HTTP RESPONSE HEADER', $header); } $status_code = curl_getinfo($session, CURLINFO_HTTP_CODE); - if ($status_code === 0) + if ($status_code === 0) { throw new PrestaShopWebserviceException('CURL Error: '.curl_error($session)); + } curl_close($session); - if ($this->debug) - { - if ($curl_params[CURLOPT_CUSTOMREQUEST] == 'PUT' || $curl_params[CURLOPT_CUSTOMREQUEST] == 'POST') + if ($this->debug) { + if ($curl_params[CURLOPT_CUSTOMREQUEST] == 'PUT' || $curl_params[CURLOPT_CUSTOMREQUEST] == 'POST') { $this->printDebug('XML SENT', urldecode($curl_params[CURLOPT_POSTFIELDS])); - if ($curl_params[CURLOPT_CUSTOMREQUEST] != 'DELETE' && $curl_params[CURLOPT_CUSTOMREQUEST] != 'HEAD') + } + if ($curl_params[CURLOPT_CUSTOMREQUEST] != 'DELETE' && $curl_params[CURLOPT_CUSTOMREQUEST] != 'HEAD') { $this->printDebug('RETURN HTTP BODY', $body); + } } return array('status_code' => $status_code, 'response' => $body, 'header' => $header); } @@ -227,13 +229,11 @@ class PrestaShopWebservice */ protected function parseXML($response) { - if ($response != '') - { + if ($response != '') { libxml_clear_errors(); libxml_use_internal_errors(true); $xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA); - if (libxml_get_errors()) - { + if (libxml_get_errors()) { $msg = var_export(libxml_get_errors(), true); libxml_clear_errors(); throw new PrestaShopWebserviceException('HTTP XML response is not parsable: '.$msg); @@ -261,14 +261,15 @@ class PrestaShopWebservice $xml = ''; $url = ''; - if (isset($options['resource'], $options['postXml']) || isset($options['url'], $options['postXml'])) - { + if (isset($options['resource'], $options['postXml']) || isset($options['url'], $options['postXml'])) { $url = (isset($options['resource']) ? $this->url.'/api/'.$options['resource'] : $options['url']); $xml = $options['postXml']; - if (isset($options['id_shop'])) + if (isset($options['id_shop'])) { $url .= '&id_shop='.$options['id_shop']; - if (isset($options['id_group_shop'])) + } + if (isset($options['id_group_shop'])) { $url .= '&id_group_shop='.$options['id_group_shop']; + } } else { throw new PrestaShopWebserviceException('Bad parameters given'); } @@ -310,24 +311,28 @@ class PrestaShopWebservice */ public function get($options) { - if (isset($options['url'])) + if (isset($options['url'])) { $url = $options['url']; - elseif (isset($options['resource'])) - { + } elseif (isset($options['resource'])) { $url = $this->url.'/api/'.$options['resource']; $url_params = array(); - if (isset($options['id'])) + if (isset($options['id'])) { $url .= '/'.$options['id']; + } // @CHANGE LDR //$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop'); $params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date'); - foreach ($params as $p) - foreach ($options as $k => $o) - if (strpos($k, $p) !== false) + foreach ($params as $p) { + foreach ($options as $k => $o) { + if (strpos($k, $p) !== false) { $url_params[$k] = $options[$k]; - if (count($url_params) > 0) + } + } + } + if (count($url_params) > 0) { $url .= '?'.http_build_query($url_params); + } } else { throw new PrestaShopWebserviceException('Bad parameters given '); } @@ -347,22 +352,26 @@ class PrestaShopWebservice */ public function head($options) { - if (isset($options['url'])) + if (isset($options['url'])) { $url = $options['url']; - elseif (isset($options['resource'])) - { + } elseif (isset($options['resource'])) { $url = $this->url.'/api/'.$options['resource']; $url_params = array(); - if (isset($options['id'])) + if (isset($options['id'])) { $url .= '/'.$options['id']; + } $params = array('filter', 'display', 'sort', 'limit'); - foreach ($params as $p) - foreach ($options as $k => $o) - if (strpos($k, $p) !== false) + foreach ($params as $p) { + foreach ($options as $k => $o) { + if (strpos($k, $p) !== false) { $url_params[$k] = $options[$k]; - if (count($url_params) > 0) + } + } + } + if (count($url_params) > 0) { $url .= '?'.http_build_query($url_params); + } } else { throw new PrestaShopWebserviceException('Bad parameters given'); } @@ -386,16 +395,17 @@ class PrestaShopWebservice public function edit($options) { $xml = ''; - if (isset($options['url'])) + if (isset($options['url'])) { $url = $options['url']; - elseif ((isset($options['resource'], $options['id']) || isset($options['url'])) && $options['putXml']) - { + } elseif ((isset($options['resource'], $options['id']) || isset($options['url'])) && $options['putXml']) { $url = (isset($options['url']) ? $options['url'] : $this->url.'/api/'.$options['resource'].'/'.$options['id']); $xml = $options['putXml']; - if (isset($options['id_shop'])) + if (isset($options['id_shop'])) { $url .= '&id_shop='.$options['id_shop']; - if (isset($options['id_group_shop'])) + } + if (isset($options['id_group_shop'])) { $url .= '&id_group_shop='.$options['id_group_shop']; + } } else { throw new PrestaShopWebserviceException('Bad parameters given'); } diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index c20f46b0bd5..9e5a1e8bce1 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -17,8 +17,7 @@ */ include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -if (!class_exists('PrestaShopWebservice')) // We keep this because some modules add this lib too into a different path. This is to avoid "Cannot declare class PrestaShopWebservice" errors. -{ +if (!class_exists('PrestaShopWebservice')) { // We keep this because some modules add this lib too into a different path. This is to avoid "Cannot declare class PrestaShopWebservice" errors. include_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/PSWebServiceLibrary.class.php'; } @@ -67,7 +66,9 @@ class Dolistore $langtmp = explode('_', $langs->defaultlang); $lang = $langtmp[0]; $lang_array = array('en'=>1, 'fr'=>2, 'es'=>3, 'it'=>4, 'de'=>5); // Into table ps_lang of Prestashop - 1 - if (!in_array($lang, array_keys($lang_array))) $lang = 'en'; + if (!in_array($lang, array_keys($lang_array))) { + $lang = 'en'; + } $this->lang = $lang_array[$lang]; } @@ -99,9 +100,11 @@ class Dolistore } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors $trace = $e->getTrace(); - if ($trace[0]['args'][0] == 404) die('Bad ID'); - elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); - else { + if ($trace[0]['args'][0] == 404) { + die('Bad ID'); + } elseif ($trace[0]['args'][0] == 401) { + die('Bad auth key'); + } else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; print $e->getMessage(); } @@ -180,9 +183,11 @@ class Dolistore } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors $trace = $e->getTrace(); - if ($trace[0]['args'][0] == 404) die('Bad ID'); - elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); - else { + if ($trace[0]['args'][0] == 404) { + die('Bad ID'); + } elseif ($trace[0]['args'][0] == 401) { + die('Bad auth key'); + } else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; print $e->getMessage(); } @@ -199,7 +204,9 @@ class Dolistore public function get_categories($parent = 0) { // phpcs:enable - if (!isset($this->categories)) die('not possible'); + if (!isset($this->categories)) { + die('not possible'); + } if ($parent != 0) { $html = '
'.$newapp.$images.'

'.$product->name->language[$this->lang - 1] - .'
'.$version.'

+ .'
'.$version.' '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'

'.$product->description_short->language[$this->lang - 1].'
'; print ''; @@ -91,15 +89,12 @@ print ''; print ''; print ''; print ''; // List filters - foreach ($object->filters as $rulefilter) - { + foreach ($object->filters as $rulefilter) { $rulefilterobj = new EmailCollectorFilter($db); $rulefilterobj->fetch($rulefilter['id']); @@ -579,9 +579,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea 'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")), 'loadandcreatethirdparty'=>$langs->trans('LoadThirdPartyFromNameOrCreate', $langs->transnoentities("ThirdPartyName")), 'recordevent'=>'RecordEvent'); - if ($conf->projet->enabled) $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; - if ($conf->ticket->enabled) $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; - if ($conf->recruitment->enabled) $arrayoftypes['candidature'] = 'CreateCandidature'; + if ($conf->projet->enabled) { + $arrayoftypes['project'] = 'CreateLeadAndThirdParty'; + } + if ($conf->ticket->enabled) { + $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty'; + } + if ($conf->recruitment->enabled) { + $arrayoftypes['candidature'] = 'CreateCandidature'; + } // support hook for add action $parameters = array('arrayoftypes' => $arrayoftypes); @@ -590,7 +596,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($res) { $arrayoftypes = $hookmanager->resArray; } else { - foreach ($hookmanager->resArray as $k=>$desc) { + foreach ($hookmanager->resArray as $k => $desc) { $arrayoftypes[$k] = $desc; } } @@ -610,8 +616,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $table_element_line = 'emailcollector_emailcollectoraction'; $fk_element = 'position'; $i = 0; - foreach ($object->actions as $ruleaction) - { + foreach ($object->actions as $ruleaction) { $ruleactionobj = new EmailcollectorAction($db); $ruleactionobj->fetch($ruleaction['id']); @@ -619,16 +624,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; // Move up/down print '\n"; // Loop on each event type -foreach ($eventstolog as $key => $arr) -{ - if ($arr['id']) - { +foreach ($eventstolog as $key => $arr) { + if ($arr['id']) { print ''; print ''; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/expedition/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { if (preg_match('/^mod_expedition_([a-z0-9_]*)\.php$/', $file)) { $file = substr($file, 0, dol_strlen($file) - 4); @@ -219,11 +198,14 @@ foreach ($dirmodels as $reldir) $module = new $file; - if ($module->isEnabled()) - { + if ($module->isEnabled()) { // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } print '\n"; print ''."\n"; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/expedition".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -357,21 +332,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '"; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
'; +} $htmltext .= '
'; print ''."\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/expensereport/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 18) == 'mod_expensereport_' && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 18) == 'mod_expensereport_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.$file.'.php'; @@ -228,11 +209,14 @@ foreach ($dirmodels as $reldir) $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print ''; @@ -243,13 +227,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print ''."\n"; print '
'.$langs->trans("ECMAutoTree").' '; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ajax_constantonoff('ECM_AUTO_TREE_ENABLED'); } else { - if (empty($conf->global->ECM_AUTO_TREE_ENABLED)) - { + if (empty($conf->global->ECM_AUTO_TREE_ENABLED)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } elseif (!empty($conf->global->USER_MAIL_REQUIRED)) - { + } elseif (!empty($conf->global->USER_MAIL_REQUIRED)) { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } diff --git a/htdocs/admin/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php index 3179c01960c..d913826b245 100644 --- a/htdocs/admin/ecm_directories_extrafields.php +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -33,8 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'ecm')); @@ -80,7 +81,7 @@ print "
\n"; $head = ecm_admin_prepare_head(); -print dol_get_fiche_head($head, 'attributes_ecm_directories', $langs->trans("ECM"), -1, 'ecm'); +print dol_get_fiche_head($head, 'attributes_ecm_directories', '', -1, ''); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; @@ -95,23 +96,14 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// 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 */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php index 9fc297fd37a..b260eff55fa 100644 --- a/htdocs/admin/ecm_files_extrafields.php +++ b/htdocs/admin/ecm_files_extrafields.php @@ -33,8 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'ecm')); @@ -80,7 +81,7 @@ print "
\n"; $head = ecm_admin_prepare_head(); -print dol_get_fiche_head($head, 'attributes_ecm_files', $langs->trans("ECM"), -1, 'ecm'); +print dol_get_fiche_head($head, 'attributes_ecm_files', '', -1, ''); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; @@ -95,23 +96,14 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// 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 */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 9c73199abea..724c4ab6dd4 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -33,8 +33,12 @@ include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectorfilter.class include_once DOL_DOCUMENT_ROOT.'/emailcollector/class/emailcollectoraction.class.php'; include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; -if (!$user->admin) accessforbidden(); -if (empty($conf->emailcollector->enabled)) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} +if (empty($conf->emailcollector->enabled)) { + accessforbidden(); +} // Load traductions files required by page $langs->loadLangs(array("admin", "mails", "other")); @@ -65,11 +69,17 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen $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 (GETPOST('saveoperation2')) $action = 'updateoperation'; -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +if (GETPOST('saveoperation2')) { + $action = 'updateoperation'; +} +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. @@ -93,15 +103,18 @@ $debuginfo = ''; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $permissiontoadd = 1; $permissiontodelete = 1; - if (empty($backtopage)) $backtopage = DOL_URL_ROOT.'/admin/emailcollector_card.php?id='.($id > 0 ? $id : '__ID__'); + if (empty($backtopage)) { + $backtopage = DOL_URL_ROOT.'/admin/emailcollector_card.php?id='.($id > 0 ? $id : '__ID__'); + } $backurlforlist = DOL_URL_ROOT.'/admin/emailcollector_list.php'; // Actions cancel, add, update, delete or clone @@ -114,8 +127,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; } -if (GETPOST('addfilter', 'alpha')) -{ +if (GETPOST('addfilter', 'alpha')) { $emailcollectorfilter = new EmailCollectorFilter($db); $emailcollectorfilter->type = GETPOST('filtertype', 'aZ09'); $emailcollectorfilter->rulevalue = GETPOST('rulevalue', 'alpha'); @@ -123,16 +135,14 @@ if (GETPOST('addfilter', 'alpha')) $emailcollectorfilter->status = 1; $result = $emailcollectorfilter->create($user); - if ($result > 0) - { + if ($result > 0) { $object->fetchFilters(); } else { setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors'); } } -if ($action == 'deletefilter') -{ +if ($action == 'deletefilter') { $emailcollectorfilter = new EmailCollectorFilter($db); $emailcollectorfilter->fetch(GETPOST('filterid', 'int')); if ($emailcollectorfilter->id > 0) { @@ -145,8 +155,7 @@ if ($action == 'deletefilter') } } -if (GETPOST('addoperation', 'alpha')) -{ +if (GETPOST('addoperation', 'alpha')) { $emailcollectoroperation = new EmailCollectorAction($db); $emailcollectoroperation->type = GETPOST('operationtype', 'aZ09'); $emailcollectoroperation->actionparam = GETPOST('operationparam', 'restricthtml'); @@ -158,6 +167,7 @@ if (GETPOST('addoperation', 'alpha')) $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Operation")), null, 'errors'); } + if (in_array($emailcollectoroperation->type, array('loadthirdparty', 'loadandcreatethirdparty')) && empty($emailcollectoroperation->actionparam)) { $error++; @@ -176,8 +186,7 @@ if (GETPOST('addoperation', 'alpha')) } } -if ($action == 'updateoperation') -{ +if ($action == 'updateoperation') { $emailcollectoroperation = new EmailCollectorAction($db); $emailcollectoroperation->fetch(GETPOST('rowidoperation2', 'int')); @@ -192,8 +201,7 @@ if ($action == 'updateoperation') if (!$error) { $result = $emailcollectoroperation->update($user); - if ($result > 0) - { + if ($result > 0) { $object->fetchActions(); } else { $error++; @@ -201,8 +209,7 @@ if ($action == 'updateoperation') } } } -if ($action == 'deleteoperation') -{ +if ($action == 'deleteoperation') { $emailcollectoroperation = new EmailCollectorAction($db); $emailcollectoroperation->fetch(GETPOST('operationid', 'int')); if ($emailcollectoroperation->id > 0) { @@ -215,13 +222,11 @@ if ($action == 'deleteoperation') } } -if ($action == 'confirm_collect') -{ +if ($action == 'confirm_collect') { dol_include_once('/emailcollector/class/emailcollector.class.php'); $res = $object->doCollectOneCollector(); - if ($res > 0) - { + if ($res > 0) { $debuginfo = $object->debuginfo; setEventMessages($object->lastresult, null, 'mesgs'); } else { @@ -281,8 +286,7 @@ if ($action == 'create') { } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("EmailCollector")); print '
'; @@ -313,8 +317,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $object->fetchFilters(); @@ -326,8 +329,7 @@ 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('DeleteEmailCollector'), $langs->trans('ConfirmDeleteEmailCollector'), 'confirm_delete', '', 0, 1); } @@ -349,8 +351,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -369,36 +374,36 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='
'.$langs->trans('Project') . ' '; - if ($user->rights->emailcollector->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->emailcollector->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 .= ''; @@ -413,8 +418,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $connectstringsource = ''; $connectstringtarget = ''; - if (function_exists('imap_open')) - { + if (function_exists('imap_open')) { // Note: $object->host has been loaded by the fetch $usessl = 1; @@ -431,8 +435,7 @@ 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(); } @@ -441,8 +444,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtml .= 'IMAP functions not available on your PHP. '; } - if (!$connection) - { + if (!$connection) { $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; if (function_exists('imap_last_error')) { $morehtml .= '
'.imap_last_error(); @@ -452,8 +454,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtml .= imap_num_msg($connection); } - if ($connection) - { + if ($connection) { imap_close($connection); } @@ -533,7 +534,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea /*$noparam = array(); foreach ($arrayoftypes as $key => $value) { - if ($value['noparam']) $noparam[] = $key; + if ($value['noparam']) $noparam[] = $key; }*/ print '})'; print ''."\n"; @@ -544,8 +545,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print ''; print $langs->trans($arrayoftypes[$ruleaction['type']]); - if (in_array($ruleaction['type'], array('recordevent'))) - { + if (in_array($ruleaction['type'], array('recordevent'))) { print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked')); } elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) { print $form->textwithpicto('', $langs->transnoentitiesnoconv('EmailCollectorLoadThirdPartyHelp')); } print ''; - if ($action == 'editoperation' && $ruleaction['id'] == $operationid) - { + if ($action == 'editoperation' && $ruleaction['id'] == $operationid) { print '
'; print '
'; print ''; @@ -639,8 +642,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; - if ($i > 0) - { + if ($i > 0) { print ''.img_up('default', 0, 'imgupforline').''; } if ($i < count($object->actions) - 1) { @@ -680,10 +682,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea 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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Edit print ''; @@ -702,8 +705,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'."\n"; } - if (!empty($debuginfo)) - { + if (!empty($debuginfo)) { print info_admin($debuginfo); } } diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index e85a9652075..2c6739e96dd 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -51,7 +51,9 @@ $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 < 0 || 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 +if (empty($page) || $page < 0 || 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; @@ -70,13 +72,16 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Security check $socid = 0; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } @@ -85,22 +90,23 @@ if ($user->socid > 0) // Protection if external user // Initialize array of search criterias $search_all = GETPOST("search_all", 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of array of fields for columns $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { $visible = dol_eval($val['visible'], 1); @@ -113,10 +119,8 @@ foreach ($object->fields as $key => $val) } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -138,8 +142,12 @@ $permissiontoread = $user->admin; $permissiontoadd = $user->admin; $permissiontodelete = $user->admin; -if (!$user->admin) accessforbidden(); -if (empty($conf->emailcollector->enabled)) accessforbidden('Module not enabled'); +if (!$user->admin) { + accessforbidden(); +} +if (empty($conf->emailcollector->enabled)) { + accessforbidden('Module not enabled'); +} @@ -147,31 +155,33 @@ if (empty($conf->emailcollector->enabled)) accessforbidden('Module not enabled') * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -197,13 +207,14 @@ $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("EmailCollector") // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -211,20 +222,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; // Add where from hooks @@ -253,26 +276,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -281,8 +302,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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_URL_ROOT.'/emailcollector/emailcollector_card.php?id='.$id); @@ -313,28 +333,44 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '
'; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -363,11 +399,13 @@ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '
'; print $moreforfilter; print '
'; @@ -384,20 +422,26 @@ print ''; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print ''; } } @@ -419,15 +463,18 @@ print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -444,11 +491,11 @@ print ''."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -457,38 +504,51 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + 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) - { + 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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && !in_array($key, array('rowid', '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'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print ''; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -501,14 +561,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ''."\n"; @@ -520,10 +583,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''; } @@ -539,10 +605,11 @@ print ''."\n"; print ''."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/admin/eventorganization.php b/htdocs/admin/eventorganization.php new file mode 100644 index 00000000000..b8b43914824 --- /dev/null +++ b/htdocs/admin/eventorganization.php @@ -0,0 +1,629 @@ + + * + * 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/setup.php + * \ingroup eventorganization + * \brief EventOrganization setup page. + */ + +// Load Dolibarr environment +require '../main.inc.php'; + +global $langs, $user; + +// Libraries +require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; +require_once DOL_DOCUMENT_ROOT.'/core/lib/eventorganization.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + +// Translations +$langs->loadLangs(array("admin", "eventorganization")); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +$value = GETPOST('value', 'alpha'); +$label = GETPOST('label', 'alpha'); +$scandir = GETPOST('scan_dir', 'alpha'); +$type = 'myobject'; + +$arrayofparameters = array( + 'EVENTORGANIZATION_TASK_LABEL'=>array('type'=>'textarea','enabled'=>1), + 'EVENTORGANIZATION_CATEG_THIRDPARTY_CONF'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), + 'EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), + //'EVENTORGANIZATION_FILTERATTENDEES_CAT'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), + //'EVENTORGANIZATION_FILTERATTENDEES_TYPE'=>array('type'=>'thirdparty_type:', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES'=>array('type'=>'emailtemplate:eventorganization_send', 'enabled'=>1), + 'EVENTORGANIZATION_SECUREKEY'=>array('type'=>'securekey', 'enabled'=>1), +); + +$error = 0; +$setupnotempty = 0; + + +/* + * Actions + */ + +if ((float) DOL_VERSION >= 6) { + include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; +} + +if ($action == 'updateMask') { + $maskconstorder = GETPOST('maskconstorder', 'alpha'); + $maskorder = GETPOST('maskorder', 'alpha'); + + if ($maskconstorder) { + $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'specimen') { + $modele = GETPOST('module', 'alpha'); + $tmpobjectkey = GETPOST('object'); + + $tmpobject = new $tmpobjectkey($db); + $tmpobject->initAsSpecimen(); + + // Search template files + $file = ''; $classname = ''; $filefound = 0; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $file = dol_buildpath($reldir."core/modules/eventorganization/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); + if (file_exists($file)) { + $filefound = 1; + $classname = "pdf_".$modele; + break; + } + } + + if ($filefound) { + require_once $file; + + $module = new $classname($db); + + if ($module->write_file($tmpobject, $langs) > 0) { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); + return; + } else { + setEventMessages($module->error, null, 'errors'); + dol_syslog($module->error, LOG_ERR); + } + } else { + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } +} elseif ($action == 'setmod') { + // TODO Check if numbering module chosen can be activated by calling method canBeActivated + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey)."_ADDON"; + dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'set') { + // Activate a model + $ret = addDocumentModel($value, $type, $label, $scandir); +} elseif ($action == 'del') { + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } + } + } +}/* elseif ($action == 'setdoc') { + // Set or unset default model + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { + // The constant that was read before the new set + // We therefore requires a variable to have a coherent view + $conf->global->$constforval = $value; + } + + // We disable/enable the document template (into llx_document_model table) + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $ret = addDocumentModel($value, $type, $label, $scandir); + } + } +} elseif ($action == 'unsetdoc') { + $tmpobjectkey = GETPOST('object'); + if (!empty($tmpobjectkey)) { + $constforval = 'EVENTORGANIZATION_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; + dolibarr_del_const($db, $constforval, $conf->entity); + } +}*/ + + + +/* + * View + */ + +$form = new Form($db); + +//$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + +$page_name = "EventOrganizationSetup"; +llxHeader('', $langs->trans($page_name)); + +// Subheader +$linkback = ''.$langs->trans("BackToModuleList").''; + +print load_fiche_titre($langs->trans($page_name), $linkback, 'eventorganization'); + +// Configuration header +$head = eventorganizationAdminPrepareHead(); +print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, 'eventorganization'); + +// Setup page goes here +echo ''.$langs->trans("EventOrganizationSetupPage").'

'; + + +if ($action == 'edit') { + print '
'; + print ''; + print ''; + + print '
'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } 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 '
'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print ''; } print '
'.$langs->trans("NoRecordFound").'
'; + print ''; + + foreach ($arrayofparameters as $constname => $val) { + if ($val['enabled']==1) { + $setupnotempty++; + print ''; + } + } + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); + print ''.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).''; + print ''; + + if ($val['type'] == 'textarea') { + print '\n"; + } elseif ($val['type']== 'html') { + require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor->Create(); + } elseif ($val['type'] == 'yesno') { + print $form->selectyesno($constname, $conf->global->{$constname}, 1); + } elseif (preg_match('/emailtemplate:/', $val['type'])) { + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + $tmp = explode(':', $val['type']); + $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user, null, 1); // We set lang=null to get in priority record with no lang + //$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, ''); + $arrayofmessagename = array(); + if (is_array($formmail->lines_model)) { + foreach ($formmail->lines_model as $modelmail) { + //var_dump($modelmail); + $moreonlabel = ''; + if (!empty($arrayofmessagename[$modelmail->label])) { + $moreonlabel = ' (' . $langs->trans("SeveralLangugeVariatFound") . ')'; + } + // The 'label' is the key that is unique if we exclude the language + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; + } + } + print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname}, 'None', 0, 0, '', 0, 0, 0, '', '', 1); + } elseif (preg_match('/category:/', $val['type'])) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; + $formother = new FormOther($db); + + $tmp = explode(':', $val['type']); + print img_picto('', 'category', 'class="pictofixedwidth"'); + print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); + } elseif (preg_match('/thirdparty_type/', $val['type'])) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + $formcompany = new FormCompany($db); + print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname); + } elseif ($val['type'] == 'securekey') { + print ''; + if (!empty($conf->use_javascript_ajax)) { + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); + } + if (!empty($conf->use_javascript_ajax)) { + print "\n".''; + } + } else { + print ''; + } + print '
'; + + print '
'; + print ''; + print '
'; + + print ''; + print '
'; +} else { + if (!empty($arrayofparameters)) { + print ''; + print ''; + + foreach ($arrayofparameters as $constname => $val) { + if ($val['enabled']==1) { + $setupnotempty++; + print ''; + } + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); + print $form->textwithpicto($langs->trans($constname), $tooltiphelp); + print ''; + + if ($val['type'] == 'textarea') { + print dol_nl2br($conf->global->{$constname}); + } elseif ($val['type']== 'html') { + print $conf->global->{$constname}; + } elseif ($val['type'] == 'yesno') { + print ajax_constantonoff($constname); + } elseif (preg_match('/emailtemplate:/', $val['type'])) { + if (!empty($conf->global->{$constname})) { + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + $tmp = explode(':', $val['type']); + + $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, $conf->global->{$constname}); + if ($template < 0) { + setEventMessages(null, $formmail->errors, 'errors'); + } + print $langs->trans($template->label); + } + } elseif (preg_match('/category:/', $val['type'])) { + if (!empty($conf->global->{$constname})) { + $c = new Categorie($db); + $result = $c->fetch($conf->global->{$constname}); + if ($result < 0) { + setEventMessages(null, $c->errors, 'errors'); + } + $ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text + $toprint = array(); + foreach ($ways as $way) { + $toprint[] = '
  • color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '
  • '; + } + print '
      ' . implode(' ', $toprint) . '
    '; + } + } elseif (preg_match('/thirdparty_type/', $val['type'])) { + if ($conf->global->{$constname}==2) { + print $langs->trans("Prospect"); + } elseif ($conf->global->{$constname}==3) { + print $langs->trans("ProspectCustomer"); + } elseif ($conf->global->{$constname}==1) { + print $langs->trans("Customer"); + } elseif ($conf->global->{$constname}==0) { + print $langs->trans("NorProspectNorCustomer"); + } + } else { + print $conf->global->{$constname}; + } + print '
    '; + + print '
    '; + print ''.$langs->trans("Modify").''; + print '
    '; + } else { + print '
    '.$langs->trans("NothingToSetup"); + } +} + + +/*$moduledir = 'eventorganization'; +$myTmpObjects = array(); +$myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + + +foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'MyObject') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + $setupnotempty++; + + print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', ''); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''."\n"; + + clearstatcache(); + + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/".$moduledir); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { + $file = substr($file, 0, dol_strlen($file) - 4); + + require_once $dir.'/'.$file.'.php'; + + $module = new $file($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } + + if ($module->isEnabled()) { + dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); + + print ''; + + // Show example of numbering model + print ''."\n"; + + print ''; + + $mytmpinstance = new $myTmpObjectKey($db); + $mytmpinstance->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
    '; + + $nextval = $module->getNextValue($mytmpinstance); + 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 "\n"; + } + } + } + closedir($handle); + } + } + } + print "
    '.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
    '.$module->name."\n"; + print $module->info(); + print ''; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) { + $langs->load("errors"); + print '
    '.$langs->trans($tmp).'
    '; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } + print '
    '; + $constforvar = 'EVENTORGANIZATION_'.strtoupper($myTmpObjectKey).'_ADDON'; + if ($conf->global->$constforvar == $file) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '

    \n"; + } + + if ($myTmpObjectArray['includedocgeneration']) { + + $setupnotempty++; + $type = strtolower($myTmpObjectKey); + + print load_fiche_titre($langs->trans("DocumentModules", $myTmpObjectKey), '', ''); + + // Load array def with activated templates + $def = array(); + $sql = "SELECT nom"; + $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; + $sql .= " WHERE type = '".$db->escape($type)."'"; + $sql .= " AND entity = ".$conf->entity; + $resql = $db->query($sql); + if ($resql) { + $i = 0; + $num_rows = $db->num_rows($resql); + while ($i < $num_rows) { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } + } else { + dol_print_error($db); + } + + print "\n"; + print "\n"; + print ''; + print ''; + print '\n"; + print '\n"; + print ''; + print ''; + print "\n"; + + clearstatcache(); + + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { + $realpath = $reldir."core/modules/".$moduledir.$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); + + 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); + + $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 ''; + + // Active + if (in_array($name, $def)) { + print ''; + } else { + print '"; + } + + // Default + 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; + + $htmltooltip .= '

    '.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
    '.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); + $htmltooltip .= '
    '.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } + } + + print '
    '.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
    '; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "'; + $constforvar = 'EVENTORGANIZATION_'.strtoupper($myTmpObjectKey).'_ADDON'; + if ($conf->global->$constforvar == $name) { + //print img_picto($langs->trans("Default"), 'on'); + // Even if choice is the default value, we allow to disable it. Replace this with previous line if you need to disable unset + print 'scandir.'&label='.urlencode($module->name).'&type='.urlencode($type).'" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; + } else { + print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + if ($module->type == 'pdf') { + print ''.img_object($langs->trans("Preview"), 'pdf').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
    '; + } +} +*/ + +// Page end +print dol_get_fiche_end(); + +llxFooter(); +$db->close(); diff --git a/htdocs/admin/eventorganization_confbooth_extrafields.php b/htdocs/admin/eventorganization_confbooth_extrafields.php new file mode 100644 index 00000000000..4b6f9bdc46a --- /dev/null +++ b/htdocs/admin/eventorganization_confbooth_extrafields.php @@ -0,0 +1,109 @@ + + * + * 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/eventorganization_extrafields.php + * \ingroup bom + * \brief Page to setup extra fields of EventOrganization + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/eventorganization.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('eventorganization', 'admin')); + +$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 = 'actioncomm'; + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + + +llxHeader('', $langs->trans("EventOrganizationSetup")); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("EventOrganizationSetup"), $linkback, 'eventorganization'); + + +$head = eventorganizationAdminPrepareHead(); + +print dol_get_fiche_head($head, 'eventorganization_extrafields', $langs->trans("ExtraFields"), -1, 'eventorganization'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_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/eventorganization_confboothattendee_extrafields.php b/htdocs/admin/eventorganization_confboothattendee_extrafields.php new file mode 100644 index 00000000000..d9dd448bb42 --- /dev/null +++ b/htdocs/admin/eventorganization_confboothattendee_extrafields.php @@ -0,0 +1,113 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2015 Jean-François Ferry + * + * 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 admin/conferenceorboothattendee_extrafields.php + * \ingroup eventorganization + * \brief Page to setup extra fields of conferenceorboothattendee + */ +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/eventorganization.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('eventorganization', 'admin')); + +$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 = 'eventorganization_conferenceorboothattendee'; //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 + */ + + +llxHeader('', $langs->trans("EventOrganizationSetup"), $help_url); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("EventOrganizationSetup"), $linkback, 'title_setup'); + + +$head = eventorganizationAdminPrepareHead(); + +print dol_get_fiche_head($head, 'conferenceorboothattendee_extrafields', $langs->trans("ConferenceOrBoothAttendeeExtraFields"), -1, 'account'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_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/events.php b/htdocs/admin/events.php index 66099eb3a30..6216820166e 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -44,7 +44,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -57,17 +59,18 @@ $eventstolog = $securityevent->eventstolog; * Actions */ -if ($action == "save") -{ +if ($action == "save") { $i = 0; $db->begin(); - foreach ($eventstolog as $key => $arr) - { + foreach ($eventstolog as $key => $arr) { $param = 'MAIN_LOGEVENTS_'.$arr['id']; - if (GETPOST($param, 'alphanohtml')) dolibarr_set_const($db, $param, GETPOST($param, 'alphanohtml'), 'chaine', 0, '', $conf->entity); - else dolibarr_del_const($db, $param, $conf->entity); + if (GETPOST($param, 'alphanohtml')) { + dolibarr_set_const($db, $param, GETPOST($param, 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } else { + dolibarr_del_const($db, $param, $conf->entity); + } } $db->commit(); @@ -110,10 +113,8 @@ print getTitleFieldOfList("LogEvents", 0, $_SERVER["PHP_SELF"], '', '', '', '', print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print "
    '.$arr['id'].''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 9a09c62b818..8be9aeee0bc 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -37,8 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "sendings", "deliveries", "other")); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -46,8 +47,7 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'shipping'; -if (empty($conf->global->EXPEDITION_ADDON_NUMBER)) -{ +if (empty($conf->global->EXPEDITION_ADDON_NUMBER)) { $conf->global->EXPEDITION_ADDON_NUMBER = 'mod_expedition_safor'; } @@ -58,43 +58,39 @@ if (empty($conf->global->EXPEDITION_ADDON_NUMBER)) include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconst = GETPOST('maskconstexpedition', 'alpha'); $maskvalue = GETPOST('maskexpedition', 'alpha'); - if (!empty($maskconst)) + if (!empty($maskconst)) { $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); - - if (isset($res)) - { - if ($res > 0) - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - else setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_param') -{ + + if (isset($res)) { + if ($res > 0) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + } +} elseif ($action == 'set_param') { $freetext = GETPOST('SHIPPING_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($langs->trans("Error"), null, 'errors'); } $draft = GETPOST('SHIPPING_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($langs->trans("Error"), null, 'errors'); } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $exp = new Expedition($db); @@ -103,25 +99,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($exp, $langs) > 0) - { + if ($module->write_file($exp, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expedition&file=SPECIMEN.pdf"); return; } else { @@ -132,26 +124,19 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// 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 ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->EXPEDITION_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->EXPEDITION_ADDON_PDF = $value; @@ -159,12 +144,10 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } -} elseif ($action == 'setmodel') -{ +} elseif ($action == 'setmodel') { dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity); } @@ -201,17 +184,13 @@ print "
    '.$module->name."'; @@ -236,13 +218,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
    '.$langs->trans($tmp).'
    '; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '
    '; - if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") - { + if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print 'scandir.'&label='.urlencode($module->name).'">'; @@ -261,8 +245,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -300,12 +285,10 @@ $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -326,30 +309,22 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -385,8 +365,7 @@ foreach ($dirmodels as $reldir) // Defaut print ''; - if ($conf->global->EXPEDITION_ADDON_PDF == $name) - { + if ($conf->global->EXPEDITION_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').''; @@ -396,8 +375,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
    '.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '
    '.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '

    '.$langs->trans("FeaturesSupported").':'; @@ -413,8 +391,7 @@ foreach ($dirmodels as $reldir) // Preview print '
    '; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -453,14 +430,15 @@ print "
    '; print $form->textwithpicto($langs->trans("FreeLegalTextOnShippings"), $langs->trans("AddCRIfTooLong").'

    '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; $variablename = 'SHIPPING_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 901caf58c00..b76ee35b76c 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -32,8 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries')); @@ -45,13 +46,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'expedition'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -84,35 +89,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 6f917618bf2..4f807ee9da3 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'sendings')); @@ -46,13 +47,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'expeditiondet'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -85,35 +90,23 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 8a76b46049e..ad04e09ffd1 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -37,7 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'trips', 'other')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -52,53 +54,47 @@ $type = 'expensereport'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconst = GETPOST('maskconst', 'alpha'); $maskvalue = GETPOST('maskvalue', 'alpha'); - if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } if (!($res > 0)) { $error++; } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') // For fiche inter -{ +} elseif ($action == 'specimen') { // For fiche expensereport $modele = GETPOST('module', 'alpha'); - $inter = new ExpenseReport($db); - $inter->initAsSpecimen(); - $inter->status = 0; // Force statut draft to show watermark - $inter->fk_statut = 0; // Force statut draft to show watermark + $expensespecimen = new ExpenseReport($db); + $expensespecimen->initAsSpecimen(); + $expensespecimen->status = 0; // Force statut draft to show watermark // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/expensereport/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($inter, $langs) > 0) - { + if ($module->write_file($expensespecimen, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expensereport&file=SPECIMEN.pdf"); return; } else { @@ -109,30 +105,22 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'set') -{ +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); - if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF)) - { + if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF)) { dolibarr_set_const($db, 'EXPENSEREPORT_ADDON_PDF', $value, 'chaine', 0, '', $conf->entity); } -} elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->EXPENSEREPORT_ADDON_PDF = $value; @@ -140,18 +128,15 @@ elseif ($action == 'setdoc') // 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 dolibarr_set_const($db, "EXPENSEREPORT_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'setoptions') -{ +} elseif ($action == 'setoptions') { $db->begin(); $freetext = GETPOST('EXPENSEREPORT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string @@ -160,10 +145,11 @@ elseif ($action == 'setdoc') $draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha'); $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0) $error++; + if (!$res1 > 0 || !$res2 > 0) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -208,19 +194,14 @@ print '
    '.$module->nom."\n"; print $module->info(); print ''; - if ($conf->global->EXPENSEREPORT_ADDON == $file) - { + if ($conf->global->EXPENSEREPORT_ADDON == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -268,8 +254,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -291,7 +278,7 @@ foreach ($dirmodels as $reldir) print "

    \n"; /* - * Documents models for Interventions + * Documents models for ExpenseReport */ print load_fiche_titre($langs->trans("TemplatePDFExpenseReports"), '', ''); @@ -304,12 +291,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -330,28 +315,21 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print 'scandir.'&label='.urlencode($module->name).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -387,8 +370,7 @@ foreach ($dirmodels as $reldir) // Default print ''; - if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") - { + if ($conf->global->EXPENSEREPORT_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').''; @@ -411,8 +393,7 @@ foreach ($dirmodels as $reldir) // Preview print ''; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -453,14 +434,15 @@ print "
    '; print $form->textwithpicto($langs->trans("FreeLegalTextOnExpenseReports"), $langs->trans("AddCRIfTooLong").'

    '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; $variablename = 'EXPENSEREPORT_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index ac88ec78912..25771ef63d0 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -30,8 +30,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'trips', 'other')); @@ -42,13 +43,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'expensereport'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +83,24 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index 968833b764c..bdaaa5845f3 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -33,7 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php' // Load translation files required by the page $langs->loadLangs(array("admin", "trips", "errors", "other", "dict")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $error = 0; @@ -45,13 +47,13 @@ $coef = GETPOST('coef', 'int'); $fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat'); $fk_range = GETPOST('fk_range'); -if ($action == 'updateik') -{ +if ($action == 'updateik') { $expIk = new ExpenseReportIk($db); - if ($id > 0) - { + if ($id > 0) { $result = $expIk->fetch($id); - if ($result < 0) dol_print_error('', $expIk->error, $expIk->errors); + if ($result < 0) { + dol_print_error('', $expIk->error, $expIk->errors); + } } $expIk->setValues($_POST); @@ -64,13 +66,13 @@ if ($action == 'updateik') } else { setEventMessages($expIk->error, $expIk->errors, 'errors'); } -} elseif ($action == 'delete') // TODO add confirm -{ +} elseif ($action == 'delete') { // TODO add confirm $expIk = new ExpenseReportIk($db); - if ($id > 0) - { + if ($id > 0) { $result = $expIk->fetch($id); - if ($result < 0) dol_print_error('', $expIk->error, $expIk->errors); + if ($result < 0) { + dol_print_error('', $expIk->error, $expIk->errors); + } $expIk->delete($user); } @@ -102,8 +104,7 @@ print '

    '; echo '
    '; -if ($action == 'edit') -{ +if ($action == 'edit') { echo ''; echo ''; echo ''; @@ -114,8 +115,7 @@ echo ''; echo ''; -foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) -{ +foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) { $title = ($Tab['active'] == 1) ? $langs->trans($Tab['label']) : $form->textwithpicto($langs->trans($Tab['label']), $langs->trans('expenseReportCatDisabled'), 1, 'help', '', 0, 3); echo ''; echo ''; @@ -125,16 +125,22 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) echo ''; echo ''; - if ($Tab['active'] == 0) continue; + if ($Tab['active'] == 0) { + continue; + } $tranche = 1; - foreach ($Tab['ranges'] as $k => $range) - { - if (isset($Tab['ranges'][$k + 1])) $label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k + 1]->range_ik - 1)); - else $label = $langs->trans('expenseReportRangeMoreThan', $range->range_ik); + foreach ($Tab['ranges'] as $k => $range) { + if (isset($Tab['ranges'][$k + 1])) { + $label = $langs->trans('expenseReportRangeFromTo', $range->range_ik, ($Tab['ranges'][$k + 1]->range_ik - 1)); + } else { + $label = $langs->trans('expenseReportRangeMoreThan', $range->range_ik); + } - if ($range->range_active == 0) $label = $form->textwithpicto($label, $langs->trans('expenseReportRangeDisabled'), 1, 'help', '', 0, 3); + if ($range->range_active == 0) { + $label = $form->textwithpicto($label, $langs->trans('expenseReportRangeDisabled'), 1, 'help', '', 0, 3); + } echo ''; @@ -143,15 +149,19 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) // Offset echo ''; // Coef echo ''; // Total for one @@ -159,15 +169,15 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) // Action echo ''; echo ''; echo ''; -foreach ($rules as $rule) -{ +foreach ($rules as $rule) { echo ''; echo ''; - - - echo ''; echo ''; + + + echo ''; - print ""; - print ""; + print '"; + print ''; print ''."\n"; print ''; print ""; - print ""; + print ''; print ''."\n"; print ''; print ""; print ""; print ''."\n"; // Logo - if ($result > 0 && empty($rss->error)) - { + if ($result > 0 && empty($rss->error)) { print ''; print ""; print ''; print ''."\n"; } @@ -309,7 +311,7 @@ if ($resql) // Active $active = _isInBoxList($idrss, $boxlist) ? 'yes' : 'no'; print ''; - print ''; + print ''; print ''; print ''."\n"; @@ -336,10 +338,8 @@ $db->close(); */ function _isInBoxList($idrss, array $boxlist) { - foreach ($boxlist as $box) - { - if ($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false) - { + foreach ($boxlist as $box) { + if ($box->boxcode === "lastrssinfos" && strpos($box->note, $idrss) !== false) { return true; } } diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index c5b8262c4be..a16df0d7fc4 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -36,7 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'other', 'bills')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -51,8 +53,7 @@ $type = 'invoice'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstinvoice = GETPOST('maskconstinvoice', 'alpha'); $maskconstreplacement = GETPOST('maskconstreplacement', 'alpha'); $maskconstcredit = GETPOST('maskconstcredit', 'alpha'); @@ -61,21 +62,29 @@ if ($action == 'updateMask') $maskreplacement = GETPOST('maskreplacement', 'alpha'); $maskcredit = GETPOST('maskcredit', 'alpha'); $maskdeposit = GETPOST('maskdeposit', 'alpha'); - if ($maskconstinvoice) $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity); - if ($maskconstreplacement) $res = dolibarr_set_const($db, $maskconstreplacement, $maskreplacement, 'chaine', 0, '', $conf->entity); - if ($maskconstcredit) $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity); - if ($maskconstdeposit) $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity); + if ($maskconstinvoice) { + $res = dolibarr_set_const($db, $maskconstinvoice, $maskinvoice, 'chaine', 0, '', $conf->entity); + } + if ($maskconstreplacement) { + $res = dolibarr_set_const($db, $maskconstreplacement, $maskreplacement, 'chaine', 0, '', $conf->entity); + } + if ($maskconstcredit) { + $res = dolibarr_set_const($db, $maskconstcredit, $maskcredit, 'chaine', 0, '', $conf->entity); + } + if ($maskconstdeposit) { + $res = dolibarr_set_const($db, $maskconstdeposit, $maskdeposit, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $facture = new Facture($db); @@ -84,25 +93,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/facture/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($facture, $langs) > 0) - { + if ($module->write_file($facture, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture&file=SPECIMEN.pdf"); return; } else { @@ -113,24 +118,19 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} -// 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 ($conf->global->FACTURE_ADDON_PDF == "$value") dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->FACTURE_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity); + } } -} -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "FACTURE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "FACTURE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->FACTURE_ADDON_PDF = $value; @@ -138,90 +138,86 @@ elseif ($action == 'setdoc') // 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 dolibarr_set_const($db, "FACTURE_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'setribchq') -{ +} elseif ($action == 'setribchq') { $rib = GETPOST('rib', 'alpha'); $chq = GETPOST('chq', 'alpha'); $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_FACTURE_DRAFT_WATERMARK') -{ +} elseif ($action == 'set_FACTURE_DRAFT_WATERMARK') { $draft = GETPOST('FACTURE_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "FACTURE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_INVOICE_FREE_TEXT') -{ +} elseif ($action == 'set_INVOICE_FREE_TEXT') { $freetext = GETPOST('INVOICE_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "INVOICE_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'setforcedate') -{ +} elseif ($action == 'setforcedate') { $forcedate = GETPOST('forcedate', 'alpha'); $res = dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION", $forcedate, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'setDefaultPDFModulesByType') -{ +} elseif ($action == 'setDefaultPDFModulesByType') { $invoicetypemodels = GETPOST('invoicetypemodels'); - if (!empty($invoicetypemodels) && is_array($invoicetypemodels)) - { + if (!empty($invoicetypemodels) && is_array($invoicetypemodels)) { $error = 0; - foreach ($invoicetypemodels as $type => $value) - { + foreach ($invoicetypemodels as $type => $value) { $res = dolibarr_set_const($db, 'FACTURE_ADDON_PDF_'.intval($type), $value, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -264,44 +260,42 @@ print ''."\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/facture/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) { $filebis = $file; $classname = preg_replace('/\.php$/', '', $file); // For compatibility - if (!is_file($dir.$filebis)) - { + if (!is_file($dir.$filebis)) { $filebis = $file."/".$file.".modules.php"; $classname = "mod_facture_".$file; } // Check if there is a filter on country preg_match('/\-(.*)_(.*)$/', $classname, $reg); - if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue; + if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) { + continue; + } $classname = preg_replace('/\-.*$/', '', $classname); - if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php') - { + if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php') { // Charging the numbering class require_once $dir.$filebis; $module = new $classname($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print ''."\n"; print ''; @@ -426,12 +427,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -454,31 +453,23 @@ clearstatcache(); $activatedModels = array(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/facture".$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -486,21 +477,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '
    '.$title.' 
    '; - if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) echo ''; - else { + if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) { + echo ''; + } else { echo $range->ik->ikoffset; } echo ''; - if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) echo ''; - else echo ($range->ik->id > 0 ? $range->ik->coef : $langs->trans('expenseReportCoefUndefined')); + if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) { + echo ''; + } else { + echo ($range->ik->id > 0 ? $range->ik->coef : $langs->trans('expenseReportCoefUndefined')); + } echo ''; - if ($range->range_active == 1) - { - if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) - { + if ($range->range_active == 1) { + if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) { echo ''; echo ''; } else { echo ''.img_edit().''; - if (!empty($range->ik->id)) echo ''.img_delete().''; + if (!empty($range->ik->id)) { + echo ''.img_delete().''; + } // TODO add delete link } } diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 9b56ac5901b..050c2b9455c 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -20,7 +20,7 @@ /** - * \file htdocs/admin/expensereport_ik.php + * \file htdocs/admin/expensereport_rules.php * \ingroup expensereport * \brief Page to display expense tax ik */ @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_rule.class.ph // Load translation files required by the page $langs->loadLangs(array("admin", "other", "trips", "errors", "dict")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} //Init error $error = false; @@ -55,15 +57,15 @@ $amount = GETPOST('amount'); $restrictive = GETPOST('restrictive'); $object = new ExpenseReportRule($db); -if (!empty($id)) -{ +if (!empty($id)) { $result = $object->fetch($id); - if ($result < 0) dol_print_error('', $object->error, $object->errors); + if ($result < 0) { + dol_print_error('', $object->error, $object->errors); + } } // TODO do action -if ($action == 'save') -{ +if ($action == 'save') { $error = 0; // check parameters @@ -92,8 +94,7 @@ if ($action == 'save') setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpenseReportLimitAmount")), null, 'errors'); } - if (empty($error)) - { + if (empty($error)) { $object->setValues($_POST); if ($apply_to == 'U') { @@ -116,18 +117,22 @@ if ($action == 'save') $object->entity = $conf->entity; $res = $object->create($user); - if ($res > 0) setEventMessages($langs->trans('ExpenseReportRuleSave'), null); - else dol_print_error($object->db); + if ($res > 0) { + setEventMessages($langs->trans('ExpenseReportRuleSave'), null); + } else { + dol_print_error($object->db); + } header('Location: '.$_SERVER['PHP_SELF']); exit; } -} elseif ($action == 'delete') -{ +} elseif ($action == 'delete') { // TODO add confirm $res = $object->delete($user); - if ($res < 0) dol_print_error($object->db); + if ($res < 0) { + dol_print_error($object->db); + } header('Location: '.$_SERVER['PHP_SELF']); exit; @@ -135,8 +140,17 @@ if ($action == 'save') $rules = ExpenseReportRule::getAllRule(); -$tab_apply = array('A' => $langs->trans('All'), 'G' => $langs->trans('Group'), 'U' => $langs->trans('User')); -$tab_rules_type = array('EX_DAY' => $langs->trans('Day'), 'EX_MON' => $langs->trans('Month'), 'EX_YEA' => $langs->trans('Year'), 'EX_EXP' => $langs->trans('OnExpense')); +$tab_apply = array( + 'A' => $langs->trans('All'), + 'G' => $langs->trans('Group'), + 'U' => $langs->trans('User') +); +$tab_rules_type = array( + 'EX_DAY' => $langs->trans('Day'), + 'EX_MON' => $langs->trans('Month'), + 'EX_YEA' => $langs->trans('Year'), + 'EX_EXP' => $langs->trans('OnExpense') +); /* @@ -156,8 +170,7 @@ print dol_get_fiche_head($head, 'expenserules', $langs->trans("ExpenseReportsRul echo ''.$langs->trans('ExpenseReportRulesDesc').''; print '

    '; -if ($action != 'edit') -{ +if ($action != 'edit') { echo ''; echo ''; echo ''; @@ -199,8 +212,7 @@ if ($action != 'edit') echo ''; echo ''; -if ($action == 'edit') -{ +if ($action == 'edit') { echo ''; echo ''; } @@ -218,43 +230,47 @@ echo '
    '.$langs->trans('ExpenseReportRestrictive').' 
    '; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { $selected = ($object->is_for_all > 0) ? 'A' : ($object->fk_usergroup > 0 ? 'G' : 'U'); echo '
    '.$form->selectarray('apply_to', $tab_apply, $selected, 0).'
    '; echo '
    '.$form->select_dolusers($object->fk_user, 'fk_user').'
    '; echo '
    '.$form->select_dolgroups($object->fk_usergroup, 'fk_usergroup').'
    '; } else { - if ($rule->is_for_all > 0) echo $tab_apply['A']; - elseif ($rule->fk_usergroup > 0) echo $tab_apply['G'].' ('.$rule->getGroupLabel().')'; - elseif ($rule->fk_user > 0) echo $tab_apply['U'].' ('.$rule->getUserName().')'; - } - echo '
    '; - if ($action == 'edit' && $object->id == $rule->id) - { - echo $form->selectExpense($object->fk_c_type_fees, 'fk_c_type_fees', 0, 1, 1); - } else { - if ($rule->fk_c_type_fees == -1) echo $langs->trans('AllExpenseReport'); - else { - $key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id'); - if ($key != $langs->trans($key)) echo $langs->trans($key); - else echo $langs->trans(getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id')); // TODO check to return trans of 'code' + if ($rule->is_for_all > 0) { + echo $tab_apply['A']; + } elseif ($rule->fk_usergroup > 0) { + echo $tab_apply['G'].' ('.$rule->getGroupLabel().')'; + } elseif ($rule->fk_user > 0) { + echo $tab_apply['U'].' ('.$rule->getUserName().')'; } } echo ''; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { + echo $form->selectExpense($object->fk_c_type_fees, 'fk_c_type_fees', 0, 1, 1); + } else { + if ($rule->fk_c_type_fees == -1) { + echo $langs->trans('AllExpenseReport'); + } else { + $key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id'); + if ($key != $langs->trans($key)) { + echo $langs->trans($key); + } else { + echo $langs->trans(getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id')); // TODO check to return trans of 'code' + } + } + } + echo ''; + if ($action == 'edit' && $object->id == $rule->id) { echo $form->selectarray('code_expense_rules_type', $tab_rules_type, $object->code_expense_rules_type, 0); } else { echo $tab_rules_type[$rule->code_expense_rules_type]; @@ -263,8 +279,7 @@ foreach ($rules as $rule) echo ''; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { print $form->selectDate(strtotime(date('Y-m-d', $object->dates)), 'start', '', '', 0, '', 1, 0); } else { echo dol_print_date($rule->dates, 'day'); @@ -273,8 +288,7 @@ foreach ($rules as $rule) echo ''; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0); } else { echo dol_print_date($rule->datee, 'day'); @@ -283,8 +297,7 @@ foreach ($rules as $rule) echo ''; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { echo ''.$conf->currency; } else { echo price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency); @@ -293,8 +306,7 @@ foreach ($rules as $rule) echo ''; - if ($action == 'edit' && $object->id == $rule->id) - { + if ($action == 'edit' && $object->id == $rule->id) { echo $form->selectyesno('restrictive', $object->restrictive, 1); } else { echo yn($rule->restrictive, 1, 1); @@ -303,8 +315,7 @@ foreach ($rules as $rule) echo ''; - if ($object->id != $rule->id) - { + if ($object->id != $rule->id) { echo ''.img_edit().' '; echo ''.img_delete().''; } else { diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index 5dd541b34b5..b83b15571b8 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'exports', 'other')); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 48db3ee4429..71086096e4f 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -37,9 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; $langs->load("admin"); // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} -$def = array(); $lastexternalrss = 0; $action = GETPOST('action', 'aZ09'); @@ -53,59 +54,61 @@ $sql = "SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const"; $sql .= " WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'"; //print $sql; $result = $db->query($sql); // We can't use SELECT MAX() because EXTERNAL_RSS_URLRSS_10 is lower than EXTERNAL_RSS_URLRSS_9 -if ($result) -{ - while ($obj = $db->fetch_object($result)) - { +if ($result) { + $reg = array(); + while ($obj = $db->fetch_object($result)) { preg_match('/([0-9]+)$/i', $obj->name, $reg); - if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1]; + if ($reg[1] && $reg[1] > $lastexternalrss) { + $lastexternalrss = $reg[1]; + } } } else { dol_print_error($db); } -if ($action == 'add' || GETPOST("modify")) -{ +if ($action == 'add' || GETPOST("modify")) { $external_rss_title = "external_rss_title_".GETPOST("norss", 'int'); $external_rss_urlrss = "external_rss_urlrss_".GETPOST("norss", 'int'); - if (!empty($_POST[$external_rss_urlrss])) - { + if (GETPOST($external_rss_urlrss, 'alpha')) { $boxlabel = '(ExternalRSSInformations)'; - //$external_rss_url = "external_rss_url_" . $_POST["norss"]; + //$external_rss_url = "external_rss_url_" . GETPOST("norss"); $db->begin(); - if ($_POST["modify"]) - { + if (GETPOST("modify")) { // Supprime boite box_external_rss de definition des boites /* $sql = "UPDATE ".MAIN_DB_PREFIX."boxes_def"; $sql.= " SET name = '".$db->escape($boxlabel)."'"; - $sql.= " WHERE file ='box_external_rss.php' AND note like '".$db->escape($_POST["norss"])." %'"; + $sql.= " WHERE file ='box_external_rss.php' AND note like '".$db->escape(GETPOST("norss"))." %'"; $resql=$db->query($sql); if (! $resql) - { + { dol_print_error($db,"sql=$sql"); exit; - } - */ + } + */ } else { // Ajoute boite box_external_rss dans definition des boites $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)"; $sql .= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')"; - if (!$db->query($sql)) - { + if (!$db->query($sql)) { dol_print_error($db); - $err++; + $error++; } + //print $sql;exit; } $result1 = dolibarr_set_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), GETPOST($external_rss_title, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result1) $result2 = dolibarr_set_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), GETPOST($external_rss_urlrss, 'alpha'), 'chaine', 0, '', $conf->entity); + if ($result1) { + $consttosave = "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'); + $urltosave = GETPOST($external_rss_urlrss, 'alpha'); + $result2 = dolibarr_set_const($db, $consttosave, $urltosave, 'chaine', 0, '', $conf->entity); + //var_dump($result2);exit; + } - if ($result1 && $result2) - { + if ($result1 && $result2) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -116,10 +119,8 @@ if ($action == 'add' || GETPOST("modify")) } } -if ($_POST["delete"]) -{ - if (GETPOST("norss", 'int')) - { +if (GETPOST("delete")) { + if (GETPOST("norss", 'int')) { $db->begin(); // Supprime boite box_external_rss de definition des boites @@ -127,25 +128,22 @@ if ($_POST["delete"]) $sql .= " WHERE file = 'box_external_rss.php' AND note LIKE '".$db->escape(GETPOST("norss", 'int'))." %'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes"; $sql .= " WHERE entity = ".$conf->entity; - $sql .= " AND box_id = ".$obj->rowid; + $sql .= " AND box_id = ".((int) $obj->rowid); $resql = $db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; - $sql .= " WHERE rowid = ".$obj->rowid; + $sql .= " WHERE rowid = ".((int) $obj->rowid); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { $db->rollback(); dol_print_error($db, "sql=".$sql); exit; @@ -163,10 +161,11 @@ if ($_POST["delete"]) $result1 = dolibarr_del_const($db, "EXTERNAL_RSS_TITLE_".GETPOST("norss", 'int'), $conf->entity); - if ($result1) $result2 = dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), $conf->entity); + if ($result1) { + $result2 = dolibarr_del_const($db, "EXTERNAL_RSS_URLRSS_".GETPOST("norss", 'int'), $conf->entity); + } - if ($result1 && $result2) - { + if ($result1 && $result2) { $db->commit(); header("Location: external_rss.php"); exit; @@ -228,14 +227,12 @@ $sql .= " ORDER BY note"; dol_syslog("select rss boxes", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $boxlist = InfoBox::listBoxes($db, 'activated', -1, null); $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); preg_match('/^([0-9]+)/i', $obj->note, $reg); @@ -265,43 +262,48 @@ if ($resql) print '
    ".$langs->trans("Title")."global->$keyrsstitle)."\">'.$langs->trans("Title")."
    ".$langs->trans("URL")."global->$keyrssurl)."\">
    ".$langs->trans("Status").""; - if ($result > 0 && empty($rss->error)) - { + if ($result > 0 && empty($rss->error)) { print ''.$langs->trans("Online").''; } else { print ''.$langs->trans("Offline"); $langs->load("errors"); - if ($rssparser->error) print ' - '.$langs->trans($rssparser->error); + if ($rssparser->error) { + print ' - '.$langs->trans($rssparser->error); + } print ''; } print "
    ".$langs->trans("Logo")."'; $imageurl = $rssparser->getImageUrl(); $linkrss = $rssparser->getLink(); - if (!preg_match('/^http/', $imageurl)) $imageurl = $linkrss.$imageurl; - if ($imageurl) print ''; - else print $langs->trans("None"); + if (!preg_match('/^http/', $imageurl)) { + $imageurl = $linkrss.$imageurl; + } + if ($imageurl) { + print ''; + } else { + print $langs->trans("None"); + } print '
    '.$langs->trans('WidgetEnabled').''.$langs->trans('WidgetAvailable').''.yn($active).'
    '; echo preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file))); print "\n"; @@ -316,14 +310,16 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
    '.$langs->trans($tmp).'
    '; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '
    '; //print "> ".$conf->global->FACTURE_ADDON." - ".$file; - if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file) - { + if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; @@ -341,8 +337,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= $langs->trans("NextValueForInvoices").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -354,8 +351,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= $langs->trans("NextValueForReplacements").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -368,8 +366,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= $langs->trans("NextValueForCreditNotes").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -381,8 +380,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= $langs->trans("NextValueForDeposit").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval; } else { $htmltooltip .= $langs->trans($module->error); @@ -392,9 +392,10 @@ foreach ($dirmodels as $reldir) print '
    '; print $form->textwithpicto('', $htmltooltip, 1, 0); - if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors - { - if (!empty($module->error)) dol_htmloutput_mesg($module->error, '', 'error', 1); + if ($conf->global->FACTURE_ADDON.'.php' == $file) { // If module is the one used, we show existing errors + if (!empty($module->error)) { + dol_htmloutput_mesg($module->error, '', 'error', 1); + } } print '
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -514,8 +510,7 @@ foreach ($dirmodels as $reldir) // Defaut print ''; - if ($conf->global->FACTURE_ADDON_PDF == "$name") - { + if ($conf->global->FACTURE_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("SetAsDefault"), 'off').''; @@ -525,8 +520,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
    '.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + 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; @@ -547,8 +541,7 @@ foreach ($dirmodels as $reldir) // Preview print '
    '; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -566,11 +559,10 @@ foreach ($dirmodels as $reldir) } print '
    '; -if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf -{ +if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) { // Hidden conf /* - * Document templates generators - */ + * Document templates generators + */ print '
    '; print load_fiche_titre($langs->trans("BillsPDFModulesAccordindToInvoiceType"), '', ''); print ''; @@ -589,13 +581,11 @@ if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), ); - if (!empty($conf->global->INVOICE_USE_SITUATION)) - { + if (!empty($conf->global->INVOICE_USE_SITUATION)) { $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); } - foreach ($listtype as $type => $trans) - { + foreach ($listtype as $type => $trans) { $thisTypeConfName = 'FACTURE_ADDON_PDF_'.$type; $current = !empty($conf->global->{$thisTypeConfName}) ? $conf->global->{$thisTypeConfName}:$conf->global->FACTURE_ADDON_PDF; print '
    ".$langs->trans("SuggestPaymentByRIBOnAccount").""; -if (!empty($conf->banque->enabled)) -{ +if (!empty($conf->banque->enabled)) { $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql .= " WHERE clos = 0"; $sql .= " AND courant = 1"; $sql .= " AND entity IN (".getEntity('bank_account').")"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { print ''; print '
    '; print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices"), $langs->trans("AddCRIfTooLong").'

    '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; $variablename = 'INVOICE_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 364297712e7..ffe1680c80f 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -36,7 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'other', 'bills')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -60,7 +62,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader( - "", $langs->trans("BillsSetup"), + "", + $langs->trans("BillsSetup"), 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura' ); diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index bc6b0dc33ac..987f435e38f 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -21,7 +21,7 @@ /** * \file htdocs/admin/fckeditor.php * \ingroup fckeditor - * \brief Page d'activation du module FCKeditor dans les autres modules + * \brief Activation page for the FCKeditor module in the other modules */ require '../main.inc.php'; @@ -41,37 +41,45 @@ $action = GETPOST('action', 'aZ09'); // Full (not sure this one is used) $mode = GETPOST('mode') ?GETPOST('mode', 'alpha') : 'dolibarr_notes'; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} -// Constante et traduction de la description du module +// Constant and translation of the module description $modules = array( -'SOCIETE' => 'FCKeditorForCompany', -'PRODUCTDESC' => 'FCKeditorForProduct', -'DETAILS' => 'FCKeditorForProductDetails', -'USERSIGN' => 'FCKeditorForUserSignature', -'MAILING' => 'FCKeditorForMailing', -'MAIL' => 'FCKeditorForMail', -'TICKET' => 'FCKeditorForTicket' + 'SOCIETE' => 'FCKeditorForCompany', + 'PRODUCTDESC' => 'FCKeditorForProduct', + 'DETAILS' => 'FCKeditorForProductDetails', + 'USERSIGN' => 'FCKeditorForUserSignature', + 'MAILING' => 'FCKeditorForMailing', + 'MAIL' => 'FCKeditorForMail', + 'TICKET' => 'FCKeditorForTicket', + 'NOTE_PUBLIC' => 'FCKeditorForNotePublic', + 'NOTE_PRIVATE' => 'FCKeditorForNotePrivate', ); -// Conditions pour que l'option soit proposee +// Conditions for the option to be offered $conditions = array( -'SOCIETE' => 1, -'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)), -'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->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)), -'USERSIGN' => 1, -'MAILING' => !empty($conf->mailing->enabled), -'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)), -'TICKET' => !empty($conf->ticket->enabled) + 'SOCIETE' => 1, + 'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)), + 'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->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)), + 'USERSIGN' => 1, + 'MAILING' => !empty($conf->mailing->enabled), + 'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)), + 'TICKET' => !empty($conf->ticket->enabled), + 'NOTE_PUBLIC' => 1, + 'NOTE_PRIVATE' => 1, ); // Picto $picto = array( -'SOCIETE' => 'generic', -'PRODUCTDESC' => 'product', -'DETAILS' => 'product', -'USERSIGN' => 'user', -'MAILING' => 'email', -'MAIL' => 'email', -'TICKET' => 'ticket' + 'SOCIETE' => 'generic', + 'PRODUCTDESC' => 'product', + 'DETAILS' => 'product', + 'USERSIGN' => 'user', + 'MAILING' => 'email', + 'MAIL' => 'email', + 'TICKET' => 'ticket', + 'NOTE_PUBLIC' => 'generic', + 'NOTE_PRIVATE' => 'generic', ); @@ -80,29 +88,24 @@ $picto = array( * Actions */ -foreach ($modules as $const => $desc) -{ - if ($action == 'activate_'.strtolower($const)) - { +foreach ($modules as $const => $desc) { + if ($action == 'enable_'.strtolower($const)) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1", 'chaine', 0, '', $conf->entity); - // Si fckeditor est active dans la description produit/service, on l'active dans les formulaires - if ($const == 'PRODUCTDESC' && !empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + // If fckeditor is active in the product/service description, it is activated in the forms + if ($const == 'PRODUCTDESC' && !empty($conf->global->PRODUIT_DESC_IN_FORM)) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1", 'chaine', 0, '', $conf->entity); } header("Location: ".$_SERVER["PHP_SELF"]); exit; } - if ($action == 'disable_'.strtolower($const)) - { + if ($action == 'disable_'.strtolower($const)) { dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const, $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); exit; } } -if (GETPOST('save', 'alpha')) -{ +if (GETPOST('save', 'alpha')) { $error = 0; $fckeditor_skin = GETPOST('fckeditor_skin', 'alpha'); @@ -123,8 +126,7 @@ if (GETPOST('save', 'alpha')) $error++; } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -141,8 +143,7 @@ $linkback = ''; -if (empty($conf->use_javascript_ajax)) -{ +if (empty($conf->use_javascript_ajax)) { setEventMessages(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), null, 'errors'); } else { print ''; @@ -152,10 +153,11 @@ if (empty($conf->use_javascript_ajax)) print "\n"; // Modules - foreach ($modules as $const => $desc) - { - // Si condition non remplie, on ne propose pas l'option - if (!$conditions[$const]) continue; + foreach ($modules as $const => $desc) { + // If this condition is not met, the option is not offered + if (!$conditions[$const]) { + continue; + } print ''; print ''; @@ -163,12 +165,10 @@ if (empty($conf->use_javascript_ajax)) print '"; @@ -188,20 +188,24 @@ if (empty($conf->use_javascript_ajax)) $listofmodes = array('dolibarr_mailings', 'dolibarr_notes', 'dolibarr_details', 'dolibarr_readonly', 'Full', 'Full_inline'); $linkstomode = ''; - foreach ($listofmodes as $newmode) - { - if ($linkstomode) $linkstomode .= ' - '; + foreach ($listofmodes as $newmode) { + if ($linkstomode) { + $linkstomode .= ' - '; + } $linkstomode .= ''; - if ($mode == $newmode) $linkstomode .= ''; + if ($mode == $newmode) { + $linkstomode .= ''; + } $linkstomode .= $newmode; - if ($mode == $newmode) $linkstomode .= ''; + if ($mode == $newmode) { + $linkstomode .= ''; + } $linkstomode .= ''; } $linkstomode .= ''; print load_fiche_titre($langs->trans("TestSubmitForm"), $linkstomode, ''); print ''; - if ($mode != 'Full_inline') - { + if ($mode != 'Full_inline') { $uselocalbrowser = true; $readonly = ($mode == 'dolibarr_readonly' ? 1 : 0); $editor = new DolEditor('formtestfield', isset($conf->global->FCKEDITOR_TEST) ? $conf->global->FCKEDITOR_TEST : 'Test', '', 200, $mode, 'In', true, $uselocalbrowser, 1, 120, 8, $readonly); @@ -218,20 +222,20 @@ if (empty($conf->use_javascript_ajax)) // Add env of ckeditor // This is to show how CKEditor detect browser to understand why editor is disabled or not. To help debug. /* - print '
    '; - } - */ + jsdump(CKEDITOR.env, "divforlog"); + '; + } + */ } // End of page diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index afe6bc2239c..b0dcf2f39c4 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -37,7 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'interventions', 'other')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -52,22 +54,23 @@ $type = 'ficheinter'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconst = GETPOST('maskconst', 'alpha'); $maskvalue = GETPOST('maskvalue', 'alpha'); - if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') // For fiche inter -{ +} elseif ($action == 'specimen') { // For fiche inter $modele = GETPOST('module', 'alpha'); $inter = new Fichinter($db); @@ -76,25 +79,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/fichinter/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($inter, $langs) > 0) - { + if ($module->write_file($inter, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf"); return; } else { @@ -105,26 +104,19 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// 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 ($conf->global->FICHEINTER_ADDON_PDF == "$value") dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->FICHEINTER_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->FICHEINTER_ADDON_PDF = $value; @@ -132,51 +124,49 @@ elseif ($action == 'setdoc') // 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 dolibarr_set_const($db, "FICHEINTER_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'set_FICHINTER_FREE_TEXT') -{ +} elseif ($action == 'set_FICHINTER_FREE_TEXT') { $freetext = GETPOST('FICHINTER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK') -{ +} elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK') { $draft = GETPOST('FICHINTER_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS') -{ +} elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS') { $val = GETPOST('FICHINTER_PRINT_PRODUCTS', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -257,19 +247,14 @@ print "\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/fichinter/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { $file = $reg[1]; $classname = substr($file, 4); @@ -277,11 +262,14 @@ foreach ($dirmodels as $reldir) $module = new $file; - if ($module->isEnabled()) - { + if ($module->isEnabled()) { // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } print ''."\n"; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $realpath = $reldir."core/modules/fichinter/doc"; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -411,21 +393,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print "\n"; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
    '; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
    '; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
    '; +} $htmltext .= '
    '; print ''; @@ -509,8 +496,7 @@ print ''; print ''; print ''; print ''; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/holiday/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 12) == 'mod_holiday_' && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 12) == 'mod_holiday_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.$file.'.php'; @@ -217,11 +201,14 @@ foreach ($dirmodels as $reldir) $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print ''; @@ -232,13 +219,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
    '.$langs->trans($tmp).'
    '; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print ''."\n"; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/holiday".$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -365,21 +345,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '\n"; $substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = ''.$langs->trans("AvailableVariables").':
    '; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'
    '; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'
    '; +} $htmltext .= '
    '; print ''; // Show bugtrack link print ''; print ''; print ''; @@ -380,8 +422,7 @@ complete_substitutions_array($substitutionarray, $langs); print ''."\n"; print ''; // Synchro contact active -if (!empty($conf->societe->enabled)) -{ +if (!empty($conf->societe->enabled)) { print ''; // Port print ''; // Pass print ''; print ''; print ''; +// Filter, used to filter search +print ''; +print ''; +print ''; + print '
    '.img_object("", $picto[$const]).''; $constante = 'FCKEDITOR_ENABLE_'.$const; $value = (isset($conf->global->$constante) ? $conf->global->$constante : 0); - if ($value == 0) - { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; - } elseif ($value == 1) - { - print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; + if ($value == 0) { + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + } elseif ($value == 1) { + print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } print "
    '.$module->nom."\n"; @@ -294,13 +282,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
    '.$langs->trans($tmp).'
    '; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '
    '; - if ($conf->global->FICHEINTER_ADDON == $classname) - { + if ($conf->global->FICHEINTER_ADDON == $classname) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; @@ -317,8 +307,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -354,12 +345,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -381,29 +370,22 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '\n"; print 'scandir.'&label='.urlencode($module->name).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -439,8 +426,7 @@ foreach ($dirmodels as $reldir) // Default print ""; - if ($conf->global->FICHEINTER_ADDON_PDF == "$name") - { + if ($conf->global->FICHEINTER_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').''; @@ -465,8 +451,7 @@ foreach ($dirmodels as $reldir) // Preview print ''; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -500,7 +485,9 @@ print "
    '; print $form->textwithpicto($langs->trans("FreeLegalTextOnInterventions"), $langs->trans("AddCRIfTooLong").'

    '.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
    '; $variablename = 'FICHINTER_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -541,8 +527,9 @@ print '' print '
    '; print $langs->trans("PrintProductsOnFichinter").' ('.$langs->trans("PrintProductsOnFichinterDetails").')global->FICHINTER_PRINT_PRODUCTS) +if ($conf->global->FICHINTER_PRINT_PRODUCTS) { print 'checked '; +} print '/>'; print ''; print ''; diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 63d15169da2..109bd6b388d 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -28,8 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php'; // Security check -if (!$user->admin) -accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("admin", "errors")); @@ -41,8 +42,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'set') -{ +if ($action == 'set') { $error = 0; $gimcdf = GETPOST("GEOIPMAXMIND_COUNTRY_DATAFILE"); @@ -52,22 +52,23 @@ if ($action == 'set') $error++; } - if (!$error && $gimcdf && !file_exists($gimcdf)) - { + if (!$error && $gimcdf && !file_exists($gimcdf)) { setEventMessages($langs->trans("ErrorFileNotFound", $gimcdf), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0) $error++; + if (!$res1 > 0) { + $error++; + } $res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity); - if (!$res2 > 0) $error++; + if (!$res2 > 0) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -75,7 +76,9 @@ if ($action == 'set') } } -if (!isset($conf->global->GEOIP_VERSION)) $conf->global->GEOIP_VERSION = '2'; +if (!isset($conf->global->GEOIP_VERSION)) { + $conf->global->GEOIP_VERSION = '2'; +} /* @@ -92,8 +95,7 @@ print '
    '; $version = ''; $geoip = ''; -if (!empty($conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE)) -{ +if (!empty($conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE)) { $geoip = new DolGeoIP('country', $conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE); } @@ -113,11 +115,11 @@ print '
    '.$langs->trans("GeoIPLibVersion").'< print ''; $arrayofvalues = array('php' => 'Native PHP functions', '1' => 'Embedded GeoIP v1', '2' => 'Embedded GeoIP v2'); print $form->selectarray('geoipversion', $arrayofvalues, (isset($conf->global->GEOIP_VERSION) ? $conf->global->GEOIP_VERSION : '2')); -if ($conf->global->GEOIP_VERSION == 'php') -{ - if ($geoip) $version = $geoip->getVersion(); - if ($version) - { +if ($conf->global->GEOIP_VERSION == 'php') { + if ($geoip) { + $version = $geoip->getVersion(); + } + if ($version) { print '
    '.$langs->trans("Version").': '.$version; } } @@ -127,8 +129,7 @@ print '
    '.$langs->trans("PathToGeoIPMaxmindCountryDataFile").''; -if ($conf->global->GEOIP_VERSION == 'php') -{ +if ($conf->global->GEOIP_VERSION == 'php') { print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb
    '; } print ''; @@ -150,22 +151,27 @@ print '
    '; $url2 = 'http://www.maxmind.com/en/city?rId=awstats'; print $langs->trans("YouCanDownloadAdvancedDatFileTo", ''.$url2.''); -if ($geoip) -{ +if ($geoip) { print '

    '; print '
    '.$langs->trans("TestGeoIPResult", $ip).':'; $ip = '24.24.24.24'; print '
    '.$ip.' -> '; $result = dol_print_ip($ip, 1); - if ($result) print $result; - else print $langs->trans("Error"); + if ($result) { + print $result; + } else { + print $langs->trans("Error"); + } $ip = '2a01:e0a:7e:4a60:429a:23ff:f7b8:dc8a'; // should be France print '
    '.$ip.' -> '; $result = dol_print_ip($ip, 1); - if ($result) print $result; - else print $langs->trans("Error"); + if ($result) { + print $result; + } else { + print $langs->trans("Error"); + } /* We disable this test because dol_print_ip need an ip as input @@ -179,17 +185,22 @@ if ($geoip) $ip = getUserRemoteIP(); //$ip='91.161.249.43'; $isip = is_ip($ip); - if ($isip == 1) - { + if ($isip == 1) { print '
    '.$ip.' -> '; $result = dol_print_ip($ip, 1); - if ($result) print $result; - else print $langs->trans("Error"); + if ($result) { + print $result; + } else { + print $langs->trans("Error"); + } } else { print '
    '.$ip.' -> '; $result = dol_print_ip($ip, 1); - if ($result) print $result; - else print $langs->trans("NotAPublicIp"); + if ($result) { + print $result; + } else { + print $langs->trans("NotAPublicIp"); + } } $geoip->close(); diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index d8de2dd847d..28fbeba9063 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -33,7 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "errors", "holiday")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -41,8 +43,7 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); $type = 'contract'; -if (empty($conf->global->HOLIDAY_ADDON)) -{ +if (empty($conf->global->HOLIDAY_ADDON)) { $conf->global->HOLIDAY_ADDON = 'mod_holiday_madonna'; } @@ -53,22 +54,23 @@ if (empty($conf->global->HOLIDAY_ADDON)) include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconst = GETPOST('maskconstholiday', 'alpha'); $maskvalue = GETPOST('maskholiday', 'alpha'); - if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') // For contract -{ +} elseif ($action == 'specimen') { // For contract $modele = GETPOST('module', 'alpha'); $holiday = new Holiday($db); @@ -77,25 +79,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/holiday/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($holiday, $langs) > 0) - { + if ($module->write_file($holiday, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=holiday&file=SPECIMEN.pdf"); return; } else { @@ -106,26 +104,19 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// 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 ($conf->global->HOLIDAY_ADDON_PDF == "$value") dolibarr_del_const($db, 'HOLIDAY_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->HOLIDAY_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'HOLIDAY_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "HOLIDAY_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->HOLIDAY_ADDON_PDF = $value; @@ -133,28 +124,26 @@ elseif ($action == 'setdoc') // 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 dolibarr_set_const($db, "HOLIDAY_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'set_other') -{ +} elseif ($action == 'set_other') { $freetext = GETPOST('HOLIDAY_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res1 = dolibarr_set_const($db, "HOLIDAY_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); $draft = GETPOST('HOLIDAY_DRAFT_WATERMARK', 'alpha'); $res2 = dolibarr_set_const($db, "HOLIDAY_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0) $error++; + if (!$res1 > 0 || !$res2 > 0) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -197,19 +186,14 @@ print "
    '.$module->nom."\n"; print $module->info(); print ''; - if ($conf->global->HOLIDAY_ADDON == "$file") - { + if ($conf->global->HOLIDAY_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -257,8 +246,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'
    '; } else { $htmltooltip .= $langs->trans($module->error).'
    '; @@ -305,12 +295,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -333,31 +321,23 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -393,8 +378,7 @@ foreach ($dirmodels as $reldir) // Default print ''; - if ($conf->global->HOLIDAY_ADDON_PDF == $name) - { + if ($conf->global->HOLIDAY_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').''; @@ -404,8 +388,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
    '.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + 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; @@ -424,8 +407,7 @@ foreach ($dirmodels as $reldir) // Preview print '
    '; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -467,15 +449,16 @@ print "
    '; print $form->textwithpicto($langs->trans("FreeLegalTextOnHolidays"), $langs->trans("AddCRIfTooLong").'

    '.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp'); print '
    '; $variablename = 'HOLIDAY_FREE_TEXT'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/admin/holiday_extrafields.php b/htdocs/admin/holiday_extrafields.php index 077ad08a12a..609187058e3 100644 --- a/htdocs/admin/holiday_extrafields.php +++ b/htdocs/admin/holiday_extrafields.php @@ -30,8 +30,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'holiday', 'other')); @@ -42,13 +43,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'holiday'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +83,24 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ + +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index bebb9f7d0bd..8c504426195 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -36,12 +36,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'projects', 'hrm', 'agenda')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search -if (!defined("MAIN_MOTD")) define("MAIN_MOTD", ""); +if (!defined("MAIN_MOTD")) { + define("MAIN_MOTD", ""); +} @@ -51,22 +55,25 @@ if (!defined("MAIN_MOTD")) define("MAIN_MOTD", ""); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (GETPOST('cancel', 'alpha')) -{ +if (GETPOST('cancel', 'alpha')) { $action = ''; } // Convert action set_XXX and del_XXX to set var (this is used when no javascript on for ajax_constantonoff) $regs = array(); if (preg_match('/^(set|del)_([A-Z_]+)$/', $action, $regs)) { - if ($regs[1] == 'set') dolibarr_set_const($db, $regs[2], 1, 'chaine', 0, '', $conf->entity); - else dolibarr_del_const($db, $regs[2], $conf->entity); + if ($regs[1] == 'set') { + dolibarr_set_const($db, $regs[2], 1, 'chaine', 0, '', $conf->entity); + } else { + dolibarr_del_const($db, $regs[2], $conf->entity); + } } -if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKGROUND)) -{ +if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKGROUND)) { dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -76,21 +83,20 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG $mysoc->logo = ''; /*$logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small; - dol_delete_file($logosmallfile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity); - $mysoc->logo_small=''; + dol_delete_file($logosmallfile); + dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity); + $mysoc->logo_small=''; - $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini; - dol_delete_file($logominifile); - dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity); - $mysoc->logo_mini='';*/ + $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini; + dol_delete_file($logominifile); + dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity); + $mysoc->logo_mini='';*/ } -if ($action == 'update') -{ +if ($action == 'update') { dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); - //dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"], 'chaine', 0, '', $conf->entity); + //dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); @@ -99,58 +105,100 @@ if ($action == 'update') else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/ $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); - else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); + } else { + dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity); - else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity); + } else { + dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity); + } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array())))); - if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity); - else dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity); + if ($val == '') { + dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity); + } else { + dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity); + } dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity); @@ -163,35 +211,30 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity); - //dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST('MAIN_BUGTRACK_ENABLELINK', 'aZ09'), 'chaine', 0, '', $conf->entity); //dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities $varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/'; - if ($_FILES[$varforimage]["tmp_name"]) - { + if ($_FILES[$varforimage]["tmp_name"]) { $reg = array(); - if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) - { + if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) { $original_file = $reg[1]; $isimage = image_format_supported($original_file); - if ($isimage >= 0) - { + if ($isimage >= 0) { dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file); - if (!is_dir($dirforimage)) - { + if (!is_dir($dirforimage)) { dol_mkdir($dirforimage); } $result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']); - if ($result > 0) - { + if ($result > 0) { dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity); - } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) - { + } elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) { $error++; $langs->load("errors"); $tmparray = explode(':', $result); @@ -359,8 +402,7 @@ print '
    '.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).''; -print ajax_constantonoff("MAIN_BUGTRACK_ENABLELINK", array(), $conf->entity, 0, 0, 1, 0); -//print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK', $conf->global->MAIN_BUGTRACK_ENABLELINK, 1); +print ''; print ' 
    '; $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'
    '; -foreach ($substitutionarray as $key => $val) -{ +foreach ($substitutionarray as $key => $val) { $texthelp .= $key.'
    '; } print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday'); @@ -417,8 +458,7 @@ $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'obje complete_substitutions_array($substitutionarray, $langs); print '
    '; $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'
    '; -foreach ($substitutionarray as $key => $val) -{ +foreach ($substitutionarray as $key => $val) { $texthelp .= $key.'
    '; } print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin'); @@ -431,10 +471,11 @@ print '
    '; print '
    '; $disabled = ''; -if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) $disabled = ' disabled="disabled"'; +if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) { + $disabled = ' disabled="disabled"'; +} print ''; -if ($disabled) -{ +if ($disabled) { print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') '; } if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { diff --git a/htdocs/admin/import.php b/htdocs/admin/import.php index e70d8eadbba..38f8ae7554b 100644 --- a/htdocs/admin/import.php +++ b/htdocs/admin/import.php @@ -35,8 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'exports', 'other')); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 44bfd678fb4..a97717412a9 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -27,7 +27,9 @@ require '../main.inc.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'companies')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('homesetup')); @@ -45,16 +47,15 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); print load_fiche_titre($langs->trans("SetupArea"), '', 'tools'); -if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) -{ +if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) { $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('//i', '
    ', $conf->global->MAIN_MOTD_SETUPPAGE); - if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) - { + if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) { $i = 0; - while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) - { + while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) { $tmp = explode('|', $reg[1]); - if (!empty($tmp[1])) $langs->load($tmp[1]); + if (!empty($tmp[1])) { + $langs->load($tmp[1]); + } $conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/__\('.preg_quote($reg[1]).'\)__/i', $langs->trans($tmp[0]), $conf->global->MAIN_MOTD_SETUPPAGE); $i++; } @@ -77,10 +78,11 @@ print ''; print '
    '; // Show info setup company -if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete = 1; -print img_picto('', 'puce').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup")); -if (!empty($setupcompanynotcomplete)) -{ +if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { + $setupcompanynotcomplete = 1; +} +print img_picto('', 'company', 'class="paddingright"').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup")); +if (!empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"'); print '
    '; @@ -90,9 +92,8 @@ print '
    '; print '
    '; // Show info setup module -print img_picto('', 'puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules")); -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 -{ +print img_picto('', 'cog', 'class="paddingright"').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules")); +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 minimal initial modules enabled $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningEnableYourModulesApplications"), 'style="padding-right: 6px;"'); print '
    '; @@ -106,8 +107,7 @@ print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addHomeSetup', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; -if (empty($reshook)) -{ +if (empty($reshook)) { // Show into other print ''.$langs->trans("SetupDescription5")."
    "; print "
    "; diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index b8c207644c6..18399894ad0 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->load("admin"); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -48,32 +49,57 @@ $hookmanager->initHooks(array('adminldap', 'globaladmin')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($action == 'setvalue' && $user->admin) - { +if (empty($reshook)) { + if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -96,8 +122,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -126,15 +151,13 @@ $arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr"); $arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP"); print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE); print '
    '.$langs->trans("LDAPDnSynchroActiveExample"); -if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) -{ +if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) { print '
    '.$langs->trans("LDAPSetupNotComplete").''; } print '
    '.$langs->trans("LDAPDnContactActive").''; $arraylist = array(); $arraylist['0'] = $langs->trans("No"); @@ -144,8 +167,7 @@ if (!empty($conf->societe->enabled)) } // Synchro member active -if (!empty($conf->adherent->enabled)) -{ +if (!empty($conf->adherent->enabled)) { print '
    '.$langs->trans("LDAPDnMemberActive").''; $arraylist = array(); $arraylist['0'] = $langs->trans("No"); @@ -156,8 +178,7 @@ if (!empty($conf->adherent->enabled)) } // Synchro member type active -if (!empty($conf->adherent->enabled)) -{ +if (!empty($conf->adherent->enabled)) { print '
    '.$langs->trans("LDAPDnMemberTypeActive").''; $arraylist = array(); $arraylist['0'] = $langs->trans("No"); @@ -209,8 +230,7 @@ print ''.$langs->trans("LDAPServerExample").'
    '.$langs->trans("LDAPServerPort").''; -if (!empty($conf->global->LDAP_SERVER_PORT)) -{ +if (!empty($conf->global->LDAP_SERVER_PORT)) { print ''; } else { print ''; @@ -241,8 +261,7 @@ print ''.$langs->trans("LDAPAdminDnExample").'
    '.$langs->trans("LDAPPassword").''; -if (!empty($conf->global->LDAP_ADMIN_PASS)) -{ +if (!empty($conf->global->LDAP_ADMIN_PASS)) { print ''; // je le met en visible pour test } else { print ''; @@ -263,29 +282,23 @@ print '
    '; /* * Test de la connexion */ -if (function_exists("ldap_connect")) -{ - if (!empty($conf->global->LDAP_SERVER_HOST)) - { +if (function_exists("ldap_connect")) { + if (!empty($conf->global->LDAP_SERVER_HOST)) { print ''.$langs->trans("LDAPTestConnect").'

    '; } - if ($_GET["action"] == 'test') - { + if ($_GET["action"] == 'test') { $ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { // Test ldap connect and bind print img_picto('', 'info').' '; print ''.$langs->trans("LDAPTCPConnectOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).''; print '
    '; - if ($conf->global->LDAP_ADMIN_DN && !empty($conf->global->LDAP_ADMIN_PASS)) - { - if ($result == 2) - { + if ($conf->global->LDAP_ADMIN_DN && !empty($conf->global->LDAP_ADMIN_PASS)) { + if ($result == 2) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPBindOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).''; print '
    '; @@ -304,8 +317,7 @@ if (function_exists("ldap_connect")) // Test ldap_getversion - if (($ldap->getVersion() == 3)) - { + if (($ldap->getVersion() == 3)) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSetupForVersion3").''; print '
    '; diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index b29fa00e49e..d21c95405a2 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -35,8 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "errors")); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -44,38 +45,72 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_CONTACT_DN', GETPOST("contactdn"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_CONTACT_DN', GETPOST("contactdn"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_HOMEPHONE', GETPOST("fieldhomephone"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_HOMEPHONE', GETPOST("fieldhomephone"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // This one must be after the others $valkey = ''; $key = GETPOST("key"); - if ($key) $valkey = $conf->global->$key; - if (!dolibarr_set_const($db, 'LDAP_KEY_CONTACTS', $valkey, 'chaine', 0, '', $conf->entity)) $error++; + if ($key) { + $valkey = $conf->global->$key; + } + if (!dolibarr_set_const($db, 'LDAP_KEY_CONTACTS', $valkey, 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -100,8 +135,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -265,10 +299,8 @@ $objectclass = $conf->global->LDAP_CONTACT_OBJECT_CLASS; show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); -if (function_exists("ldap_connect")) -{ - if ($_GET["action"] == 'test') - { +if (function_exists("ldap_connect")) { + if ($_GET["action"] == 'test') { // Creation objet $object = new Contact($db); $object->initAsSpecimen(); @@ -277,8 +309,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); @@ -286,8 +317,7 @@ if (function_exists("ldap_connect")) $result2 = $ldap->add($dn, $info, $user); // Now the test $result3 = $ldap->delete($dn); // Clean what we did - if ($result2 > 0) - { + if ($result2 > 0) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSynchroOK").'
    '; } else { diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 61d2e8b69e9..13532474681 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -36,8 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "errors")); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -46,28 +47,44 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_GROUP_DN', GETPOST("group", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_GROUP_OBJECT_CLASS', GETPOST("objectclass", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - - if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_FULLNAME', GETPOST("fieldfullname", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_GROUP_DN', GETPOST("group", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_GROUP_OBJECT_CLASS', GETPOST("objectclass", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_GROUP_FILTER', GETPOST("filter"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_FULLNAME', GETPOST("fieldfullname", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } //if (! dolibarr_set_const($db, 'LDAP_GROUP_FIELD_NAME',GETPOST("fieldname", 'alphanohtml'),'chaine',0,'',$conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_DESCRIPTION', GETPOST("fielddescription", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_GROUPMEMBERS', GETPOST("fieldgroupmembers", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_GROUPID', GETPOST("fieldgroupid", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_DESCRIPTION', GETPOST("fielddescription", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_GROUPMEMBERS', GETPOST("fieldgroupmembers", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_GROUP_FIELD_GROUPID', GETPOST("fieldgroupid", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) { + $error++; + } // This one must be after the others $valkey = ''; $key = GETPOST("key"); - if ($key) $valkey = $conf->global->$key; - if (!dolibarr_set_const($db, 'LDAP_KEY_GROUPS', $valkey, 'chaine', 0, '', $conf->entity)) $error++; + if ($key) { + $valkey = $conf->global->$key; + } + if (!dolibarr_set_const($db, 'LDAP_KEY_GROUPS', $valkey, 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -90,8 +107,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -127,6 +143,13 @@ print '
    '.$langs->trans("LDAPGroupObjectClassListExample").' 
    '.$langs->trans("LDAPFilterConnection").''; +print ''; +print ''.$langs->trans("LDAPGroupFilterExample").'
    '; print '
    '; print ''; @@ -190,21 +213,25 @@ print ''; /* * Test de la connexion */ -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') -{ +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { $butlabel = $langs->trans("LDAPTestSynchroGroup"); $testlabel = 'testgroup'; $key = $conf->global->LDAP_KEY_GROUPS; $dn = $conf->global->LDAP_GROUP_DN; $objectclass = $conf->global->LDAP_GROUP_OBJECT_CLASS; + show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); +} elseif ($conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') { + $butlabel = $langs->trans("LDAPTestSearch"); + $testlabel = 'testsearchgroup'; + $key = $conf->global->LDAP_KEY_GROUPS; + $dn = $conf->global->LDAP_GROUP_DN; + $objectclass = $conf->global->LDAP_GROUP_OBJECT_CLASS; show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); } -if (function_exists("ldap_connect")) -{ - if ($_GET["action"] == 'testgroup') - { +if (function_exists("ldap_connect")) { + if ($action == 'testgroup') { // Creation objet $object = new UserGroup($db); $object->initAsSpecimen(); @@ -213,8 +240,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); @@ -227,8 +253,7 @@ if (function_exists("ldap_connect")) $result2 = $ldap->add($dn, $info, $user); // Now the test $result3 = $ldap->delete($dn); // Clean what we did - if ($result2 > 0) - { + if ($result2 > 0) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSynchroOK").'
    '; } else { @@ -251,6 +276,62 @@ if (function_exists("ldap_connect")) print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'
    '; } } + + if ($action == 'testsearchgroup') { + // TODO Mutualize code following with other ldap_xxxx.php pages + + // Test synchro + $ldap = new Ldap(); + $result = $ldap->connect_bind(); + + if ($result > 0) { + $required_fields = array( + $conf->global->LDAP_KEY_GROUPS, + // $conf->global->LDAP_GROUP_FIELD_NAME, + $conf->global->LDAP_GROUP_FIELD_DESCRIPTION, + $conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS, + $conf->global->LDAP_GROUP_FIELD_GROUPID + ); + + // Remove from required_fields all entries not configured in LDAP (empty) and duplicated + $required_fields = array_unique(array_values(array_filter($required_fields, "dol_validElement"))); + + // Get from LDAP database an array of results + $ldapgroups = $ldap->getRecords('*', $conf->global->LDAP_GROUP_DN, $conf->global->LDAP_KEY_GROUPS, $required_fields, 'group'); + //$ldapgroups = $ldap->getRecords('*', $conf->global->LDAP_GROUP_DN, $conf->global->LDAP_KEY_GROUPS, '', 'group'); + + if (is_array($ldapgroups)) { + $liste = array(); + foreach ($ldapgroups as $key => $ldapgroup) { + // Define the label string for this group + $label = ''; + foreach ($required_fields as $value) { + if ($value) { + $label .= $value."=".$ldapgroup[$value]." "; + } + } + $liste[$key] = $label; + } + } else { + setEventMessages($ldap->error, $ldap->errors, 'errors'); + } + + print "
    \n"; + print "LDAP search for group:
    \n"; + print "search: *
    \n"; + print "userDN: ".$conf->global->LDAP_GROUP_DN."
    \n"; + print "useridentifier: ".$conf->global->LDAP_KEY_GROUPS."
    \n"; + print "required_fields: ".implode(',', $required_fields)."
    \n"; + print "=> ".count($liste)." records
    \n"; + print "\n
    "; + } else { + print img_picto('', 'error').' '; + print ''.$langs->trans("LDAPSynchroKO"); + print ': '.$ldap->error; + print '
    '; + print $langs->trans("ErrorLDAPMakeManualTest", $conf->ldap->dir_temp).'
    '; + } + } } // End of page diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 214a4f2cb9b..d64628516ca 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -36,8 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors')); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -45,54 +46,116 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_MEMBER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FILTER', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_MEMBER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FILTER', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // Members - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO', GETPOST("fieldphoneperso"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NOTE_PUBLIC', GETPOST("fieldnotepublic"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_BIRTHDATE', GETPOST("fieldbirthdate"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS', GETPOST("fieldstatus"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO', GETPOST("fieldphoneperso"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NOTE_PUBLIC', GETPOST("fieldnotepublic"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_BIRTHDATE', GETPOST("fieldbirthdate"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS', GETPOST("fieldstatus"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // Subscriptions - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT', GETPOST("fieldfirstsubscriptionamount"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT', GETPOST("fieldfirstsubscriptionamount"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // This one must be after the others $valkey = ''; $key = GETPOST("key"); - if ($key) $valkey = $conf->global->$key; - if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS', $valkey, 'chaine', 0, '', $conf->entity)) $error++; + if ($key) { + $valkey = $conf->global->$key; + } + if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS', $valkey, 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -117,8 +180,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -377,8 +439,7 @@ print ''; /* * Test de la connexion */ -if (!empty($conf->global->LDAP_MEMBER_ACTIVE)) -{ +if (!empty($conf->global->LDAP_MEMBER_ACTIVE)) { $butlabel = $langs->trans("LDAPTestSynchroMember"); $testlabel = 'testmember'; $key = $conf->global->LDAP_KEY_MEMBERS; @@ -388,10 +449,8 @@ if (!empty($conf->global->LDAP_MEMBER_ACTIVE)) show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); } -if (function_exists("ldap_connect")) -{ - if ($_GET["action"] == 'testmember') - { +if (function_exists("ldap_connect")) { + if ($_GET["action"] == 'testmember') { // Creation objet $object = new Adherent($db); $object->initAsSpecimen(); @@ -400,8 +459,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); @@ -409,8 +467,7 @@ if (function_exists("ldap_connect")) $result2 = $ldap->add($dn, $info, $user); // Now the test $result3 = $ldap->delete($dn); // Clean what we did - if ($result2 > 0) - { + if ($result2 > 0) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSynchroOK").'
    '; } else { diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 489e6047f9b..75ed864ecf0 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -36,8 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors')); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -46,26 +47,38 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_DN', GETPOST("membertype"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_DN', GETPOST("membertype"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS', GETPOST("fieldmembertypemembers"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS', GETPOST("fieldmembertypemembers"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // This one must be after the others $valkey = ''; $key = GETPOST("key"); - if ($key) $valkey = $conf->global->$key; - if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS_TYPES', $valkey, 'chaine', 0, '', $conf->entity)) $error++; + if ($key) { + $valkey = $conf->global->$key; + } + if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS_TYPES', $valkey, 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -88,8 +101,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -172,8 +184,7 @@ print ''; /* * Test de la connexion */ -if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') -{ +if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') { $butlabel = $langs->trans("LDAPTestSynchroMemberType"); $testlabel = 'testmembertype'; $key = $conf->global->LDAP_KEY_MEMBERS_TYPES; @@ -183,10 +194,8 @@ if ($conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1') show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); } -if (function_exists("ldap_connect")) -{ - if ($_GET["action"] == 'testmembertype') - { +if (function_exists("ldap_connect")) { + if ($_GET["action"] == 'testmembertype') { // Creation objet $object = new AdherentType($db); $object->initAsSpecimen(); @@ -195,8 +204,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); @@ -209,8 +217,7 @@ if (function_exists("ldap_connect")) $result2 = $ldap->add($dn, $info, $user); // Now the test $result3 = $ldap->delete($dn); // Clean what we did - if ($result2 > 0) - { + if ($result2 > 0) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSynchroOK").'
    '; } else { diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index efb34cca413..7e53eebc9ce 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -37,8 +37,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors')); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -46,47 +47,103 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $error = 0; $db->begin(); - if (!dolibarr_set_const($db, 'LDAP_USER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_USER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FILTER_CONNECTION', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_SID', GETPOST("fieldsid"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_TITLE', GETPOST("fieldtitle"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_GROUPID', GETPOST("fieldgroupid"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_USERID', GETPOST("fielduserid"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_HOMEDIRECTORY', GETPOST("fieldhomedirectory"), 'chaine', 0, '', $conf->entity)) $error++; - if (!dolibarr_set_const($db, 'LDAP_FIELD_HOMEDIRECTORYPREFIX', GETPOST("fieldhomedirectoryprefix"), 'chaine', 0, '', $conf->entity)) $error++; + if (!dolibarr_set_const($db, 'LDAP_USER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_USER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FILTER_CONNECTION', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_SID', GETPOST("fieldsid"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_TITLE', GETPOST("fieldtitle"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_GROUPID', GETPOST("fieldgroupid"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_USERID', GETPOST("fielduserid"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_HOMEDIRECTORY', GETPOST("fieldhomedirectory"), 'chaine', 0, '', $conf->entity)) { + $error++; + } + if (!dolibarr_set_const($db, 'LDAP_FIELD_HOMEDIRECTORYPREFIX', GETPOST("fieldhomedirectoryprefix"), 'chaine', 0, '', $conf->entity)) { + $error++; + } // This one must be after the others $valkey = ''; $key = GETPOST("key"); - if ($key) $valkey = $conf->global->$key; - if (!dolibarr_set_const($db, 'LDAP_KEY_USERS', $valkey, 'chaine', 0, '', $conf->entity)) $error++; + if ($key) { + $valkey = $conf->global->$key; + } + if (!dolibarr_set_const($db, 'LDAP_KEY_USERS', $valkey, 'chaine', 0, '', $conf->entity)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -111,8 +168,7 @@ print load_fiche_titre($langs->trans("LDAPSetup"), $linkback, 'title_setup'); $head = ldap_prepare_head(); // Test si fonction LDAP actives -if (!function_exists("ldap_connect")) -{ +if (!function_exists("ldap_connect")) { setEventMessages($langs->trans("LDAPFunctionsNotAvailableOnPHP"), null, 'errors'); } @@ -346,8 +402,7 @@ print ''; /* * Test de la connexion */ -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') -{ +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { $butlabel = $langs->trans("LDAPTestSynchroUser"); $testlabel = 'testuser'; $key = $conf->global->LDAP_KEY_USERS; @@ -355,8 +410,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') $objectclass = $conf->global->LDAP_USER_OBJECT_CLASS; show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); -} elseif ($conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') -{ +} elseif ($conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') { $butlabel = $langs->trans("LDAPTestSearch"); $testlabel = 'testsearchuser'; $key = $conf->global->LDAP_KEY_USERS; @@ -365,10 +419,8 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass); } -if (function_exists("ldap_connect")) -{ - if ($action == 'testuser') - { +if (function_exists("ldap_connect")) { + if ($action == 'testuser') { // Creation objet $object = new User($db); $object->initAsSpecimen(); @@ -379,8 +431,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); @@ -388,8 +439,7 @@ if (function_exists("ldap_connect")) $result2 = $ldap->add($dn, $info, $user); // Now the test $result3 = $ldap->delete($dn); // Clean what we did - if ($result2 > 0) - { + if ($result2 > 0) { print img_picto('', 'info').' '; print ''.$langs->trans("LDAPSynchroOK").'
    '; } else { @@ -413,8 +463,7 @@ if (function_exists("ldap_connect")) } } - if ($action == 'testsearchuser') - { + if ($action == 'testsearchuser') { // Creation objet $object = new User($db); $object->initAsSpecimen(); @@ -425,8 +474,7 @@ if (function_exists("ldap_connect")) $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $required_fields = array( $conf->global->LDAP_KEY_USERS, $conf->global->LDAP_FIELD_FULLNAME, @@ -453,17 +501,13 @@ if (function_exists("ldap_connect")) $ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 1); //$ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, '', 1); - if (is_array($ldapusers)) - { + if (is_array($ldapusers)) { $liste = array(); - foreach ($ldapusers as $key => $ldapuser) - { + foreach ($ldapusers as $key => $ldapuser) { // Define the label string for this user $label = ''; - foreach ($required_fields as $value) - { - if ($value) - { + foreach ($required_fields as $value) { + if ($value) { $label .= $value."=".$ldapuser[$value]." "; } } diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 9132cc4b4d1..4a599499053 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -29,7 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'products', 'admin')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $currencycode = GETPOST('currencycode', 'alpha'); @@ -49,39 +51,33 @@ $valmainmaxdecimalstot = GETPOST($mainmaxdecimalstot, 'int'); $valmainmaxdecimalsshown = GETPOST($mainmaxdecimalsshown, 'int'); $valmainroundingruletot = price2num(GETPOST($mainroundingruletot, 'alpha')); -if ($action == 'update') -{ +if ($action == 'update') { $error = 0; $MAXDEC = 8; if ($_POST[$mainmaxdecimalsunit] > $MAXDEC || $_POST[$mainmaxdecimalstot] > $MAXDEC - || $_POST[$mainmaxdecimalsshown] > $MAXDEC) - { + || $_POST[$mainmaxdecimalsshown] > $MAXDEC) { $error++; setEventMessages($langs->trans("ErrorDecimalLargerThanAreForbidden", $MAXDEC), null, 'errors'); } if ($_POST[$mainmaxdecimalsunit].(!empty($currencycode) ? '_'.$currencycode : '') < 0 || $_POST[$mainmaxdecimalstot] < 0 - || $_POST[$mainmaxdecimalsshown] < 0) - { + || $_POST[$mainmaxdecimalsshown] < 0) { $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorNegativeValueNotAllowed"), null, 'errors'); } - if ($valmainroundingruletot) - { - if ($valmainroundingruletot * pow(10, $valmainmaxdecimalstot) < 1) - { + if ($valmainroundingruletot) { + if ($valmainroundingruletot * pow(10, $valmainmaxdecimalstot) < 1) { $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorMAIN_ROUNDING_RULE_TOTCanMAIN_MAX_DECIMALS_TOT"), null, 'errors'); } } - if (!$error) - { + if (!$error) { dolibarr_set_const($db, $mainmaxdecimalsunit, $valmainmaxdecimalsunit, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, $mainmaxdecimalstot, $valmainmaxdecimalstot, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, $mainmaxdecimalsshown, $valmainmaxdecimalsshown, 'chaine', 0, '', $conf->entity); @@ -109,24 +105,20 @@ print load_fiche_titre($title, '', 'title_setup'); $aCurrencies = array($conf->currency); // Default currency always first position -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) -{ +if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; $sql = 'SELECT rowid, code FROM '.MAIN_DB_PREFIX.'multicurrency'; $sql .= ' WHERE entity = '.$conf->entity; $sql .= ' AND code != "'.$conf->currency.'"'; // Default currency always first position $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $aCurrencies[] = $obj->code; } } - if (!empty($aCurrencies) && count($aCurrencies) > 1) - { + if (!empty($aCurrencies) && count($aCurrencies) > 1) { $head = multicurrencyLimitPrepareHead($aCurrencies); print dol_get_fiche_head($head, $currencycode, '', -1, ''); @@ -136,8 +128,7 @@ if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY print ''.$langs->trans("LimitsDesc")."
    \n"; print "
    \n"; -if ($action == 'edit') -{ +if ($action == 'edit') { print ''; print ''; print ''; @@ -163,7 +154,7 @@ if ($action == 'edit') print ''; + print ''; print '
    '; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); - print '
    '; @@ -193,7 +184,7 @@ if ($action == 'edit') print '
    '; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly")); - print ''.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : $conf->global->MAIN_ROUNDING_RULE_TOT).'
    '.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : (!empty($conf->global->MAIN_ROUNDING_RULE_TOT) ? $conf->global->MAIN_ROUNDING_RULE_TOT : '')).'
    '; print ''; @@ -203,16 +194,13 @@ if ($action == 'edit') print ''; } -if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) -{ - if (!empty($aCurrencies) && count($aCurrencies) > 1) - { +if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY_USE_LIMIT_BY_CURRENCY)) { + if (!empty($aCurrencies) && count($aCurrencies) > 1) { print dol_get_fiche_end(); } } -if (empty($mysoc->country_code)) -{ +if (empty($mysoc->country_code)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete")); print '
    '.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").''; @@ -252,26 +240,22 @@ if (empty($mysoc->country_code)) $sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($mysoc->country_code)."' AND (t.taux <> 0 OR t.localtax1 <>0 OR t.localtax2 <>0)"; $sql .= " ORDER BY t.taux ASC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { - for ($i = 0; $i < $num; $i++) - { + if ($num) { + for ($i = 0; $i < $num; $i++) { $obj = $db->fetch_object($resql); $vat_rates[] = array('vat_rate'=>$obj->vat_rate, 'code'=>$obj->vat_code, 'localtax_rate1'=>$obj->localtax_rate1, 'locltax_rate2'=>$obj->localtax_rate2); } } - } else dol_print_error($db); + } else { + dol_print_error($db); + } - if (count($vat_rates)) - { - foreach ($vat_rates as $vatarray) - { + if (count($vat_rates)) { + foreach ($vat_rates as $vatarray) { $vat = $vatarray['vat_rate']; - for ($qty = 1; $qty <= 2; $qty++) - { + for ($qty = 1; $qty <= 2; $qty++) { $vattxt = $vat.($vatarray['code'] ? ' ('.$vatarray['code'].')' : ''); $localtax_array = getLocalTaxesFromRate($vattxt, 0, $mysoc, $mysoc); diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index ee358300ca4..94b0da08d4f 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -26,14 +26,17 @@ require '../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('admin', 'loan')); // Security check -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -48,8 +51,7 @@ $list = array( * Actions */ -if ($action == 'update') -{ +if ($action == 'update') { $error = 0; foreach ($list as $constname) { @@ -60,8 +62,7 @@ if ($action == 'update') } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -75,7 +76,9 @@ if ($action == 'update') llxHeader(); $form = new Form($db); -if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); +if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); +} $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans('ConfigLoan'), $linkback, 'title_setup'); @@ -92,8 +95,7 @@ print '
    '.$langs->trans('Options').'
    '; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); } else { print ''; diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 1bf77419f34..1b0df5843f3 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -30,18 +30,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "mails")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); +$form = new Form($db); /* * Actions */ -if ($action == 'setvalue') -{ +if ($action == 'setvalue') { $db->begin(); $mailfrom = GETPOST('MAILING_EMAIL_FROM', 'alpha'); @@ -49,22 +51,33 @@ if ($action == 'setvalue') $checkread = GETPOST('value', 'alpha'); $checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY', 'alpha'); $mailingdelay = GETPOST('MAILING_DELAY', 'int'); + $contactbulkdefault = GETPOST('MAILING_CONTACT_DEFAULT_BULK_STATUS', 'int'); $res = dolibarr_set_const($db, "MAILING_EMAIL_FROM", $mailfrom, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO", $mailerror, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, "MAILING_DELAY", $mailingdelay, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } $res = dolibarr_set_const($db, "MAILING_CONTACT_DEFAULT_BULK_STATUS", $contactbulkdefault, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } // Create temporary encryption key if nedded $res = dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY", $checkread_key, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -72,7 +85,18 @@ if ($action == 'setvalue') setEventMessages($langs->trans("Error"), null, 'errors'); } } - +if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { + $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); + if (!($res > 0)) { + $error++; + } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} /* * View @@ -83,8 +107,7 @@ llxHeader('', $langs->trans("MailingSetup")); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("MailingSetup"), $linkback, 'title_setup'); -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".''; - $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print ''; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -430,9 +446,10 @@ $objecttmp = new EmailSenderProfile($db); //$trackid = (($action == 'testhtml') ? "testhtml" : "test"); include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($search_all) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; } @@ -443,11 +460,13 @@ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -464,20 +483,26 @@ print ''; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print ''; } } @@ -498,15 +523,18 @@ print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -524,11 +552,11 @@ print ''."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +if (!empty($extrafields->attributes[$object->table_element]['computed']) && 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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -537,37 +565,50 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + 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) - { + 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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if ($key == 'status' || $key == 'active') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status' || $key == 'active') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print ''; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -581,21 +622,32 @@ while ($i < ($limit ? min($num, $limit) : $num)) // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ''."\n"; @@ -607,10 +659,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''; } @@ -626,10 +681,11 @@ print ''."\n"; print ''."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 615dd7041e3..31ccd1f02c8 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -43,9 +43,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; 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")); +$langsArray=array("errors", "admin", "mails", "languages"); + +if (!empty($conf->adherent->enabled)) { + $langsArray[]='members'; +} +if (!empty($conf->eventorganization->enabled)) { + $langsArray[]='eventorganization'; +} + +$langs->loadLangs($langsArray); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; +$massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $id = GETPOST('id', 'int'); @@ -56,14 +66,16 @@ $search_lang = GETPOST('search_lang', 'alpha'); $search_fk_user = GETPOST('search_fk_user', 'intcomma'); $search_topic = GETPOST('search_topic', 'alpha'); -if (!empty($user->socid)) accessforbidden(); +if (!empty($user->socid)) { + accessforbidden(); +} $acts = array(); $actl = array(); $acts[0] = "activate"; $acts[1] = "disable"; -$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off'); -$actl[1] = img_picto($langs->trans("Activated"), 'switch_on'); +$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"'); +$actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"'); $listoffset = GETPOST('listoffset', 'alpha'); $listlimit = GETPOST('listlimit', 'alpha') > 0 ?GETPOST('listlimit', 'alpha') : 1000; @@ -71,13 +83,19 @@ $listlimit = GETPOST('listlimit', 'alpha') > 0 ?GETPOST('listlimit', 'alpha') : $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 = $listlimit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (empty($sortfield)) $sortfield = 'type_template, lang, position, label'; -if (empty($sortorder)) $sortorder = 'ASC'; +if (empty($sortfield)) { + $sortfield = 'type_template, lang, position, label'; +} +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('emailtemplates')); @@ -89,17 +107,23 @@ $tabname[25] = MAIN_DB_PREFIX."c_email_templates"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield = array(); $tabfield[25] = "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; -if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfield[25] .= ',content_lines'; +if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { + $tabfield[25] .= ',content_lines'; +} // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue = array(); $tabfieldvalue[25] = "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; -if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfieldvalue[25] .= ',content_lines'; +if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { + $tabfieldvalue[25] .= ',content_lines'; +} // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert = array(); $tabfieldinsert[25] = "label,lang,type_template,fk_user,private,position,topic,joinfiles,content"; -if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tabfieldinsert[25] .= ',content_lines'; +if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { + $tabfieldinsert[25] .= ',content_lines'; +} $tabfieldinsert[25] .= ',entity'; // Must be at end because not into other arrays // Condition to show dictionary in setup page @@ -110,14 +134,12 @@ $tabcond[25] = true; // Set MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES to allow edit of template for lines 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)) -{ +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) - { + foreach ($tmp as $key => $val) { $helpsubstit .= $key.' -> '.$val.'
    '; $helpsubstitforlines .= $key.' -> '.$val.'
    '; } @@ -126,13 +148,11 @@ if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) $tmp['__(AnyTranslationKey)__'] = 'Translation'; $helpsubstit = $langs->trans("AvailableVariables").':
    '; $helpsubstitforlines = $langs->trans("AvailableVariables").':
    '; - foreach ($tmp as $key => $val) - { + foreach ($tmp as $key => $val) { $helpsubstit .= $key.' -> '.$val.'
    '; } $tmp = FormMail::getAvailableSubstitKey('formemailforlines'); - foreach ($tmp as $key => $val) - { + foreach ($tmp as $key => $val) { $helpsubstitforlines .= $key.' -> '.$val.'
    '; } } @@ -162,54 +182,57 @@ $elementList = array(); $elementList['all'] = '-- '.dol_escape_htmltag($langs->trans("All")).' --'; $elementList['none'] = '-- '.dol_escape_htmltag($langs->trans("None")).' --'; $elementList['user'] = img_picto('', 'user', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToUser')); -if ($conf->adherent->enabled && $user->rights->adherent->lire) { +if (!empty($conf->adherent->enabled) && !empty($user->rights->adherent->lire)) { $elementList['member'] = img_picto('', 'object_member', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToMember')); } -if ($conf->recruitment->enabled && $user->rights->recruitment->recruitmentjobposition->read) { +if (!empty($conf->recruitment->enabled) && !empty($user->rights->recruitment->recruitmentjobposition->read)) { $elementList['recruitmentcandidature_send'] = img_picto('', 'recruitmentcandidature', 'class="paddingright"').dol_escape_htmltag($langs->trans('RecruitmentCandidatures')); } -if ($conf->societe->enabled && $user->rights->societe->lire) { +if (!empty($conf->societe->enabled) && !empty($user->rights->societe->lire)) { $elementList['thirdparty'] = img_picto('', 'company', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToThirdparty')); } -if ($conf->projet->enabled) { +if (!empty($conf->projet->enabled)) { $elementList['project'] = img_picto('', 'project', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToProject')); } -if ($conf->propal->enabled && $user->rights->propal->lire) { +if (!empty($conf->propal->enabled) && !empty($user->rights->propal->lire)) { $elementList['propal_send'] = img_picto('', 'propal', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendProposal')); } -if ($conf->commande->enabled && $user->rights->commande->lire) { +if (!empty($conf->commande->enabled) && !empty($user->rights->commande->lire)) { $elementList['order_send'] = img_picto('', 'order', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendOrder')); } -if ($conf->facture->enabled && $user->rights->facture->lire) { +if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) { $elementList['facture_send'] = img_picto('', 'bill', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendInvoice')); } -if ($conf->expedition->enabled) { +if (!empty($conf->expedition->enabled)) { $elementList['shipping_send'] = img_picto('', 'dolly', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendShipment')); } -if ($conf->reception->enabled) { +if (!empty($conf->reception->enabled)) { $elementList['reception_send'] = img_picto('', 'dolly', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendReception')); } -if ($conf->ficheinter->enabled) { +if (!empty($conf->ficheinter->enabled)) { $elementList['fichinter_send'] = img_picto('', 'intervention', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendIntervention')); } -if ($conf->supplier_proposal->enabled) { +if (!empty($conf->supplier_proposal->enabled)) { $elementList['supplier_proposal_send'] = img_picto('', 'propal', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendSupplierRequestForQuotation')); } -if (($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ($conf->supplier_order->enabled && $user->rights->supplier_order->lire)) { +if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->commande->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire))) { $elementList['order_supplier_send'] = img_picto('', 'order', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendSupplierOrder')); } -if (($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ($conf->supplier_invoice->enabled && $user->rights->supplier_invoice->lire)) { +if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { $elementList['invoice_supplier_send'] = img_picto('', 'bill', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendSupplierInvoice')); } -if ($conf->contrat->enabled && $user->rights->contrat->lire) { +if (!empty($conf->contrat->enabled) && !empty($user->rights->contrat->lire)) { $elementList['contract'] = img_picto('', 'contract', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendContract')); } -if ($conf->ticket->enabled && $user->rights->ticket->read) { +if (!empty($conf->ticket->enabled) && !empty($user->rights->ticket->read)) { $elementList['ticket_send'] = img_picto('', 'ticket', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToTicket')); } -if ($conf->agenda->enabled) { +if (!empty($conf->agenda->enabled)) { $elementList['actioncomm_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventPush')); } +if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) { + $elementList['eventorganization_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization')); +} $parameters = array('elementList'=>$elementList); $reshook = $hookmanager->executeHooks('emailElementlist', $parameters); // Note that $action and $object may have been modified by some hooks @@ -232,7 +255,9 @@ 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 = ''; +} $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -264,34 +289,56 @@ if (empty($reshook)) { $ok = 1; foreach ($listfield as $f => $value) { // Not mandatory fields - if ($value == 'joinfiles') continue; - if ($value == 'content') continue; - if ($value == 'content_lines') continue; + if ($value == 'joinfiles') { + continue; + } + if ($value == 'content') { + continue; + } + if ($value == 'content_lines') { + continue; + } // Rename some POST variables into a generic name - if (GETPOST('actionmodify', 'alpha') && $value == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid]; + if (GETPOST('actionmodify', 'alpha') && $value == 'topic') { + $_POST['topic'] = $_POST['topic-'.$rowid]; + } - if ((!GETPOSTISSET($value) || GETPOST($value) == '' || GETPOST($value) == '-1') && $value != 'lang' && $value != 'fk_user' && $value != 'position') - { + if ((!GETPOSTISSET($value) || GETPOST($value) == '' || GETPOST($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 ($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'); } } // Si verif ok et action add, on ajoute la ligne - if ($ok && GETPOST('actionadd')) - { + if ($ok && GETPOST('actionadd')) { // Add new entry $sql = "INSERT INTO ".$tabname[$id]." ("; // List of fields @@ -301,23 +348,38 @@ if (empty($reshook)) { // List of values $i = 0; - foreach ($listfieldinsert as $f => $value) - { + foreach ($listfieldinsert as $f => $value) { $keycode = $listfieldvalue[$i]; - if ($value == 'lang') $keycode = 'langcode'; - if (empty($keycode)) $keycode = $value; + if ($value == 'lang') { + $keycode = 'langcode'; + } + if (empty($keycode)) { + $keycode = $value; + } // Clean input variables - 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'; + 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 == 'fk_user') { + 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 == 'fk_user') { if (!$user->admin) { // A non admin user can only edit its own template $sql .= " ".((int) $user->id); } else { @@ -336,8 +398,7 @@ if (empty($reshook)) { dol_syslog("actionadd", LOG_DEBUG); $result = $db->query($sql); - if ($result) // Add is ok - { + if ($result) { // Add is ok setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only id } else { @@ -350,34 +411,52 @@ if (empty($reshook)) { } // We modify the line - if ($ok && GETPOST('actionmodify')) - { + if ($ok && GETPOST('actionmodify')) { $rowidcol = "rowid"; // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; // Modifie valeur des champs $i = 0; - foreach ($listfieldmodify as $field) - { + foreach ($listfieldmodify as $field) { $keycode = $listfieldvalue[$i]; - if ($field == 'lang') $keycode = 'langcode'; - if (empty($keycode)) $keycode = $field; + if ($field == 'lang') { + $keycode = 'langcode'; + } + if (empty($keycode)) { + $keycode = $field; + } // Rename some POST variables into a generic name - 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 .= ", "; + 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 == 'fk_user') { + 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 == 'fk_user') { if (!$user->admin) { // A non admin user can only edit its own template $sql .= " ".((int) $user->id); } else { @@ -402,8 +481,7 @@ if (empty($reshook)) { dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); } else { setEventMessages($db->error(), null, 'errors'); @@ -411,8 +489,7 @@ if (empty($reshook)) { } } - if ($action == 'confirm_delete' && $confirm == 'yes') // delete - { + if ($action == 'confirm_delete' && $confirm == 'yes') { // delete $rowidcol = "rowid"; $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."=".((int) $rowid); @@ -421,10 +498,8 @@ if (empty($reshook)) { } dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); - if (!$result) - { - if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') - { + if (!$result) { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); } else { dol_print_error($db); @@ -433,29 +508,25 @@ if (empty($reshook)) { } // activate - if ($action == $acts[0]) - { + if ($action == $acts[0]) { $rowidcol = "rowid"; $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."=".((int) $rowid); $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } // disable - if ($action == $acts[1]) - { + if ($action == $acts[1]) { $rowidcol = "rowid"; $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."=".((int) $rowid); $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } @@ -484,8 +555,7 @@ $head = email_admin_prepare_head(); print dol_get_fiche_head($head, 'templates', '', -1); // Confirmation de la suppression de la ligne -if ($action == 'delete') -{ +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); } @@ -493,22 +563,32 @@ if ($action == 'delete') $sql = "SELECT rowid as rowid, module, label, type_template, lang, fk_user, private, position, topic, joinfiles, content_lines, content, enabled, active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_email_templates"; $sql .= " WHERE entity IN (".getEntity('email_template').")"; -if (!$user->admin) -{ +if (!$user->admin) { $sql .= " AND (private = 0 OR (private = 1 AND fk_user = ".$user->id."))"; // Show only public and private to me $sql .= " AND (active = 1 OR fk_user = ".$user->id.")"; // Show only active or owned by me } -if (empty($conf->global->MAIN_MULTILANGS)) -{ +if (empty($conf->global->MAIN_MULTILANGS)) { $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); -if ($search_lang) $sql .= natural_search('lang', $search_lang); -if ($search_fk_user != '' && $search_fk_user != '-1') $sql .= natural_search('fk_user', $search_fk_user, 2); -if ($search_topic) $sql .= natural_search('topic', $search_topic); +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); +} +if ($search_lang) { + $sql .= natural_search('lang', $search_lang); +} +if ($search_fk_user != '' && $search_fk_user != '-1') { + $sql .= natural_search('fk_user', $search_fk_user, 2); +} +if ($search_topic) { + $sql .= natural_search('topic', $search_topic); +} // If sort order is "country", we use country_code instead -if ($sortfield == 'country') $sortfield = 'country_code'; +if ($sortfield == 'country') { + $sortfield = 'country_code'; +} $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($listlimit + 1, $offset); //print $sql; @@ -526,36 +606,63 @@ if ($action == 'view') { // Line to enter new values (title) print ''; - foreach ($fieldlist as $field => $value) - { + 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"); $align = "center"; } - if ($fieldlist[$field] == 'private') { $align = 'center'; } - if ($fieldlist[$field] == 'position') { $align = 'center'; } + 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"); $align = "center"; + } + 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 ($fieldlist[$field] == 'topic') { + $valuetoshow = ''; + } + if ($fieldlist[$field] == 'joinfiles') { + $valuetoshow = ''; + } + if ($fieldlist[$field] == 'content') { + $valuetoshow = ''; + } + if ($fieldlist[$field] == 'content_lines') { + $valuetoshow = ''; + } - if ($valuetoshow != '') - { + if ($valuetoshow != '') { print ''; } } @@ -566,11 +673,11 @@ if ($action == 'view') { $obj = new stdClass(); // If data was already input, we define them in obj to populate input fields. - if (GETPOST('actionadd')) - { + if (GETPOST('actionadd')) { foreach ($fieldlist as $key => $val) { - if (GETPOST($val) != '') - $obj->$val = GETPOST($val); + if (GETPOST($val) != '') { + $obj->$val = GETPOST($val); + } } } @@ -587,8 +694,7 @@ if ($action == 'view') { // Line to enter new values (input fields) print ''; - if (empty($reshook)) - { + if (empty($reshook)) { if ($action == 'edit') { fieldList($fieldlist, $obj, $tabname[$id], 'hide'); } else { @@ -602,24 +708,25 @@ if ($action == 'view') { // 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) - { + if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { + $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); + } + foreach ($fieldsforcontent as $tmpfieldlist) { print ''."\n"; print ''; // Limit to superadmin /*if (! empty($conf->multicompany->enabled) && !$user->entity) - { - print ''; - print ''; + print ''."\n"; // Value - print ''."\n"; 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) - { + foreach ($recordtoshow as $key => $val) { $i++; - if ($i <= $offset) continue; - if ($i > ($offset + $limit)) break; - print ''; - }*/ + { + print ''; + }*/ print ''."\n"; } @@ -543,8 +581,7 @@ print dol_get_fiche_end(); print "\n"; -if (!empty($langcode)) -{ +if (!empty($langcode)) { dol_set_focus('#transvalue'); } diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index ce7f525e8b3..5ea74205c9c 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -26,7 +26,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; // Load translation files required by the page $langs->load("admin"); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $sortfield = 'file'; $sortorder = 'ASC'; @@ -66,8 +68,7 @@ print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'act print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n"; print ''; -foreach ($triggers as $trigger) -{ +foreach ($triggers as $trigger) { print ''; print ''; print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index ea6cdf2b6f8..0dccf65e5e7 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -35,7 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'members', 'users')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $extrafields = new ExtraFields($db); @@ -54,25 +56,20 @@ $type = 'user'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'set_default') -{ +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) - { - if ($conf->global->USER_ADDON_PDF_ODT == "$value") dolibarr_del_const($db, 'USER_ADDON_PDF_ODT', $conf->entity); + if ($ret > 0) { + if ($conf->global->USER_ADDON_PDF_ODT == "$value") { + dolibarr_del_const($db, 'USER_ADDON_PDF_ODT', $conf->entity); + } } $res = true; -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "USER_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "USER_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->USER_ADDON_PDF_ODT = $value; @@ -80,39 +77,31 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $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) - { + if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } 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) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } -} -//Set hide closed customer into combox or select -elseif ($action == 'sethideinactiveuser') -{ +} elseif ($action == 'sethideinactiveuser') { + //Set hide closed customer into combox or select $status = GETPOST('status', 'alpha'); - if (dolibarr_set_const($db, "USER_HIDE_INACTIVE_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, "USER_HIDE_INACTIVE_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -152,12 +141,10 @@ print ''; print ''; print ''; print ''; print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/user".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -256,21 +231,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/usergroup".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -185,21 +167,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print ''; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print ''; - foreach ($fieldlist as $field => $value) - { + foreach ($fieldlist as $field => $value) { // Determine le nom du champ par rapport aux noms possibles // dans les dictionnaires de donnees $showfield = 1; // Par defaut @@ -523,21 +533,29 @@ if ($id) $sortable = 1; $valuetoshow = ''; /* - $tmparray=getLabelOfField($fieldlist[$field]); - $showfield=$tmp['showfield']; - $valuetoshow=$tmp['valuetoshow']; - $align=$tmp['align']; - $sortable=$tmp['sortable']; + $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"); } + 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] == 'date_creation') { + $valuetoshow = $langs->trans("DateCreation"); + } // Affiche nom du champ - if ($showfield) - { + if ($showfield) { print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), "", "align=".$align, $sortfield, $sortorder); } } @@ -548,46 +566,48 @@ if ($id) print ''; // Lines with values - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); //print_r($obj); print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { + 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'; + $tmpaction = 'view'; $parameters = array('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; - if (empty($reshook)) - { - foreach ($fieldlist as $field => $value) - { + 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 ''; + 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. + 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) : '').'&'; @@ -597,11 +617,14 @@ if ($id) print ""; // Modify link - print ''; + print ''; // Delete link - if ($iserasable) print ''; - else print ''; + if ($iserasable) { + print ''; + } else { + print ''; + } print "\n"; } @@ -643,24 +666,37 @@ function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '') $formadmin = new FormAdmin($db); - foreach ($fieldlist as $field => $value) - { + foreach ($fieldlist as $field => $value) { $fieldname = $fieldlist[$field]; - if ($fieldlist[$field] == 'lang') - { + + if ($fieldlist[$field] == 'lang') { print ''; } elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) { print ''; } else { + if ($fieldlist[$field] == 'date_creation') { + continue; + } + print ''; } diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 8c803defb37..f72235eb8b0 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -40,7 +40,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); $rowid = GETPOST('rowid', 'alpha'); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $status = 1; @@ -49,7 +51,9 @@ $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -97,8 +101,7 @@ $h++; print dol_get_fiche_head($head, 'options', '', -1); -if ($action == 'edit') -{ +if ($action == 'edit') { print ''; print ''; print ''; @@ -106,8 +109,7 @@ if ($action == 'edit') print '
    '; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], empty($search[$key]) ? '' : $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } 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"].'?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); + 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 '   '; 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 - { + 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; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '.$langs->trans("NoRecordFound").'
    '; - 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; + 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 '
    '; // Label - if ($tmpfieldlist == 'topic') - { + if ($tmpfieldlist == 'topic') { print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; } - if ($tmpfieldlist == 'joinfiles') - { + 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') - print $form->textwithpicto($langs->trans("ContentForLines"), $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') { + print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
    '; + } // Input field if ($tmpfieldlist == 'topic') { @@ -629,8 +736,9 @@ if ($action == 'view') { } else { // print ''; $okforextended = true; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) - $okforextended = false; + if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) { + $okforextended = false; + } $doleditor = new DolEditor($tmpfieldlist, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 180, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_4, '90%'); print $doleditor->Create(1); } @@ -662,26 +770,40 @@ print ''; // List of available record in database dol_syslog("htdocs/admin/dict", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $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); + 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')); + 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) - { + if ($num > $listlimit) { print ''; @@ -691,8 +813,7 @@ if ($resql) // Title line with search boxes print ''; - foreach ($fieldlist as $field => $value) - { + foreach ($fieldlist as $field => $value) { if ($value == 'label') { print ''; } elseif ($value == 'lang') { @@ -714,7 +835,9 @@ if ($resql) } } - 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 ''; - foreach ($fieldlist as $field => $value) - { + 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']; + $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"); } - if ($fieldlist[$field] == 'private') { $align = 'center'; } - if ($fieldlist[$field] == 'position') { $align = 'center'; } + 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') { + $align = 'center'; + $valuetoshow = $langs->trans("TypeOfTemplate"); + } + if ($fieldlist[$field] == 'private') { + $align = 'center'; + } + if ($fieldlist[$field] == 'position') { + $align = 'center'; + } - if ($fieldlist[$field] == 'joinfiles') { $valuetoshow = $langs->trans("FilesAttachedToEmail"); $align = 'center'; $forcenowrap = 0; } - if ($fieldlist[$field] == 'content') { $valuetoshow = $langs->trans("Content"); $showfield = 0; } - if ($fieldlist[$field] == 'content_lines') { $valuetoshow = $langs->trans("ContentLines"); $showfield = 0; } + if ($fieldlist[$field] == 'joinfiles') { + $valuetoshow = $langs->trans("FilesAttachedToEmail"); $align = 'center'; $forcenowrap = 0; + } + 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 + 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); } @@ -769,15 +913,12 @@ if ($resql) print getTitleFieldOfList(''); print ''; - if ($num) - { + if ($num) { // Lines with values - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { + if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { print ''; $tmpaction = 'edit'; @@ -786,7 +927,9 @@ if ($resql) $error = $hookmanager->error; $errors = $hookmanager->errors; // Show fields - if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit'); + if (empty($reshook)) { + fieldList($fieldlist, $obj, $tabname[$id], 'edit'); + } print ''; print ''; $fieldsforcontent = array('topic', 'joinfiles', 'content'); - if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) - { + if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); } - foreach ($fieldsforcontent as $tmpfieldlist) - { + foreach ($fieldsforcontent as $tmpfieldlist) { $showfield = 1; $align = "left"; $valuetoshow = $obj->{$tmpfieldlist}; @@ -814,21 +955,20 @@ if ($resql) // Show line for topic, joinfiles and content print ''; print ''; $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $parameters = array('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; - if (empty($reshook)) - { - foreach ($fieldlist as $field => $value) - { - if (in_array($fieldlist[$field], array('content', 'content_lines'))) continue; + if (empty($reshook)) { + foreach ($fieldlist as $field => $value) { + if (in_array($fieldlist[$field], array('content', 'content_lines'))) { + continue; + } $showfield = 1; $align = ""; $class = "tddict"; + $title = ''; $valuetoshow = $obj->{$fieldlist[$field]}; if ($value == 'label' || $value == 'topic') { + if ($langs->trans($valuetoshow) != $valuetoshow) { + $valuetoshow = $langs->trans($valuetoshow); + } $valuetoshow = dol_escape_htmltag($valuetoshow); } if ($value == 'label') { $class .= ' tdoverflowmax100'; } - /*if ($value == 'topic') { - $class .= ' tdoverflowmax300'; - }*/ + if ($value == 'topic') { + $class .= 'tdoverflowmax200 small'; + } if ($value == 'type_template') { $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; $align = "center"; @@ -896,8 +1038,7 @@ if ($resql) $valuetoshow = $valuetoshow.' - '.$langs->trans("Language_".$valuetoshow); } if ($value == 'fk_user') { - if ($valuetoshow > 0) - { + if ($valuetoshow > 0) { $fuser = new User($db); $fuser->fetch($valuetoshow); $valuetoshow = $fuser->getNomUrl(1); @@ -905,83 +1046,101 @@ if ($resql) } if ($value == 'private') { $align = "center"; - if ($valuetoshow) $valuetoshow = yn($valuetoshow); - else $valuetoshow = ''; + if ($valuetoshow) { + $valuetoshow = yn($valuetoshow); + } else { + $valuetoshow = ''; + } } if ($value == 'position') { $align = "center"; } if ($value == 'joinfiles') { $align = "center"; - if ($valuetoshow) $valuetoshow = 1; - else $valuetoshow = ''; + if ($valuetoshow) { + $valuetoshow = 1; + } else { + $valuetoshow = ''; + } + } + if ($align) { + $class .= ' '.$align; } - if ($align) $class .= ' '.$align; // Show value for field if ($showfield) { - print ''; - print ''; + print ''; + print ''; } } } // Can an entry be erased or disabled ? $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default - if (!$user->admin && $obj->fk_user != $user->id) - { + 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 .= '&'; + if ($param) { + $url .= '&'.$param; + } // Status / Active print '"; // Modify link / Delete link print ''; /* - $fieldsforcontent = array('content'); - if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) - { - $fieldsforcontent = array('content', 'content_lines'); - } - foreach ($fieldsforcontent as $tmpfieldlist) - { - $showfield = 1; - $align = "left"; - $valuetoshow = $obj->{$tmpfieldlist}; + $fieldsforcontent = array('content'); + if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) + { + $fieldsforcontent = array('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) { - print ''; - print ''; + print ''; + print ''; - } - }*/ + } + }*/ print "\n"; } @@ -1024,90 +1183,99 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $formadmin = new FormAdmin($db); - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'fk_user') - { + foreach ($fieldlist as $field => $value) { + if ($value == 'fk_user') { print ''; - } elseif ($fieldlist[$field] == 'lang') - { + } elseif ($value == 'lang') { print ''; - } - // Le type de template - elseif ($fieldlist[$field] == 'type_template') - { + } elseif ($value == 'type_template') { + // Le type de template print ''; - } 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 { + } elseif ($context == 'add' && in_array($value, array('topic', 'joinfiles', 'content', 'content_lines'))) { + continue; + } elseif ($context == 'edit' && in_array($value, array('topic', 'joinfiles', 'content', 'content_lines'))) { + continue; + } elseif ($context == 'hide' && in_array($value, array('topic', 'joinfiles', 'content', 'content_lines'))) { + continue; + } else { $size = ''; $class = ''; $classtd = ''; - if ($fieldlist[$field] == 'code') $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'; - if ($fieldlist[$field] == 'topic') $class = 'quatrevingtpercent'; - if ($fieldlist[$field] == 'sortorder' || $fieldlist[$field] == 'sens' || $fieldlist[$field] == 'category_type') $size = 'size="2" '; + if ($value == 'code') { + $class = 'maxwidth100'; + } + if ($value == 'label') { + $class = 'maxwidth200'; + } + if ($value == 'private') { + $class = 'maxwidth50'; $classtd = 'center'; + } + if ($value == 'position') { + $class = 'maxwidth50'; $classtd = 'center'; + } + if ($value == 'libelle') { + $class = 'quatrevingtpercent'; + } + if ($value == 'topic') { + $class = 'quatrevingtpercent'; + } + if ($value == 'sortorder' || $value == 'sens' || $value == 'category_type') { + $size = 'size="2" '; + } print ''; - if ($fieldlist[$field] == 'private') - { - if (empty($user->admin)) - { - print $form->selectyesno($fieldlist[$field], '1', 1); + if ($value == 'private') { + if (empty($user->admin)) { + print $form->selectyesno($value, '1', 1); } else { //print ''; - print $form->selectyesno($fieldlist[$field], (isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); + print $form->selectyesno($value, (isset($obj->{$value}) ? $obj->{$value}:''), 1); } } else { - print ''; + print ''; } print ''; } diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php index 1e1c3db3fad..939273c1da2 100644 --- a/htdocs/admin/mails_ticket.php +++ b/htdocs/admin/mails_ticket.php @@ -31,13 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); $action = GETPOST('action', 'aZ09'); - -if (!$user->admin) accessforbidden(); +$cancel = GETPOST('cancel', 'alpha'); $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') -{ +if ($action == 'test' || $action == 'send') { $usersignature = dol_string_nohtmltag($usersignature); } @@ -52,14 +50,17 @@ $substitutionarrayfortest = array( ); complete_substitutions_array($substitutionarrayfortest, $langs); +// Security check +if (!$user->admin) { + accessforbidden(); +} /* * Actions */ -if ($action == 'update' && empty($_POST["cancel"])) -{ +if ($action == 'update' && !$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); @@ -84,8 +85,12 @@ $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'; +if ($action == 'presend' && GETPOST('trackid') == 'test') { + $action = 'test'; +} +if ($action == 'presend' && GETPOST('trackid') == 'testhtml') { + $action = 'testhtml'; +} @@ -97,14 +102,24 @@ if ($action == 'presend' && GETPOST('trackid') == 'testhtml') $action = 'testh $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 (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'; +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; +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'; +if (!$server) { + $server = '127.0.0.1'; +} $wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails'; @@ -120,13 +135,13 @@ $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 (version_compare(phpversion(), '7.0', '>=')) { + $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; +} -if ($action == 'edit') -{ - if ($conf->use_javascript_ajax) - { +if ($action == 'edit') { + if ($conf->use_javascript_ajax) { print "\n".' @@ -96,23 +101,21 @@ print $langs->trans("RestoreDesc3", $dolibarr_main_db_name).'

    ';
    trans("ImportMethod"); ?> - -
    - /> - -
    - + /> + +
    + -
    - /> - -
    - + /> + + + trans("RestoreDesc3", $dolibarr_main_db_name).'

    ';
    '; print ''.$langs->trans('RestoreMySQL').''; print '
    '; // Parameteres execution $command = $db->getPathOfRestore(); - if (preg_match("/\s/", $command)) $command = $command = escapeshellarg($command); // Use quotes on command + if (preg_match("/\s/", $command)) { + $command = $command = escapeshellarg($command); // Use quotes on command + } $param = $dolibarr_main_db_name; $param .= " -h ".$dolibarr_main_db_host; - if (!empty($dolibarr_main_db_port)) $param .= " -P ".$dolibarr_main_db_port; + if (!empty($dolibarr_main_db_port)) { + $param .= " -P ".$dolibarr_main_db_port; + } $param .= " -u ".$dolibarr_main_db_user; $paramcrypted = $param; $paramclear = $param; - if (!empty($dolibarr_main_db_pass)) - { + if (!empty($dolibarr_main_db_pass)) { $paramcrypted .= " -p".preg_replace('/./i', '*', $dolibarr_main_db_pass); $paramclear .= " -p".$dolibarr_main_db_pass; } @@ -158,26 +163,29 @@ 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'; print '
    '; // Parameteres execution $command = $db->getPathOfRestore(); - if (preg_match("/\s/", $command)) $command = $command = escapeshellarg($command); // Use quotes on command + if (preg_match("/\s/", $command)) { + $command = $command = escapeshellarg($command); // Use quotes on command + } $param = " -d ".$dolibarr_main_db_name; $param .= " -h ".$dolibarr_main_db_host; - if (!empty($dolibarr_main_db_port)) $param .= " -p ".$dolibarr_main_db_port; + if (!empty($dolibarr_main_db_port)) { + $param .= " -p ".$dolibarr_main_db_port; + } $param .= " -U ".$dolibarr_main_db_user; $paramcrypted = $param; $paramclear = $param; /*if (! empty($dolibarr_main_db_pass)) - { - $paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass); - $paramclear.=" -p".$dolibarr_main_db_pass; - }*/ + { + $paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass); + $paramclear.=" -p".$dolibarr_main_db_pass; + }*/ $paramcrypted .= " -W"; $paramclear .= " -W"; // With psql: diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 0c3679c62fa..0fe8be7d50c 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -40,15 +40,22 @@ $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 +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; -if (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "date"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "date"; +} -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} -if ($file && !$what) -{ +if ($file && !$what) { //print DOL_URL_ROOT.'/dolibarr_export.php'; header("Location: ".DOL_URL_ROOT.'/admin/tools/dolibarr_export.php?msg='.urlencode($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportMethod"))).(GETPOST('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : '')); exit; @@ -61,12 +68,14 @@ $errormsg = ''; * Actions */ -if ($action == 'delete') -{ +if ($action == 'delete') { $file = $conf->admin->dir_output.'/'.GETPOST('urlfile'); $ret = dol_delete_file($file, 1); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } $action = ''; } @@ -80,9 +89,8 @@ $_SESSION["commandbackuptorun"] = ''; $_SESSION["commandbackupresult"] = ''; // Increase limit of time. Works only if we are not in safe mode -$ExecTimeLimit = 600; -if (!empty($ExecTimeLimit)) -{ +$ExecTimeLimit = 600; // Set it to 0 to not use a forced time limit +if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors //error_reporting(E_ALL); @@ -90,13 +98,10 @@ if (!empty($ExecTimeLimit)) error_reporting($err); } $MemoryLimit = 0; -if (!empty($MemoryLimit)) -{ +if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } -$form = new Form($db); -$formfile = new FormFile($db); //$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; //llxHeader('','',$help_url); @@ -120,29 +125,24 @@ $utils = new Utils($db); // MYSQL -if ($what == 'mysql') -{ +if ($what == 'mysql') { $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)) - { + if (!empty($dolibarr_main_restrict_os_commands)) { $arrayofallowedcommand = explode(',', $dolibarr_main_restrict_os_commands); dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump); $basenamecmddump = basename($cmddump); - if (!in_array($basenamecmddump, $arrayofallowedcommand)) // the provided command $cmddump must be an allowed command - { + if (!in_array($basenamecmddump, $arrayofallowedcommand)) { // the provided command $cmddump must be an allowed command $errormsg = $langs->trans('CommandIsNotInsideAllowedCommands'); } } - if (!$errormsg && $cmddump) - { + if (!$errormsg && $cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump, 'chaine', 0, '', $conf->entity); } - if (!$errormsg) - { + if (!$errormsg) { $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file); $errormsg = $utils->error; $_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone']; @@ -151,8 +151,7 @@ if ($what == 'mysql') } // MYSQL NO BIN -if ($what == 'mysqlnobin') -{ +if ($what == 'mysqlnobin') { $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file); $errormsg = $utils->error; @@ -161,30 +160,27 @@ if ($what == 'mysqlnobin') } // POSTGRESQL -if ($what == 'postgresql') -{ +if ($what == 'postgresql') { $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 - if (! empty($dolibarr_main_restrict_os_commands)) - { - $arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands); - dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump); - $basenamecmddump=basename($cmddump); - if (! in_array($basenamecmddump, $arrayofallowedcommand)) // the provided command $cmddump must be an allowed command - { - $errormsg=$langs->trans('CommandIsNotInsideAllowedCommands'); - } - } */ - - if (!$errormsg && $cmddump) + if (! empty($dolibarr_main_restrict_os_commands)) { + $arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands); + dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$cmddump); + $basenamecmddump=basename($cmddump); + if (! in_array($basenamecmddump, $arrayofallowedcommand)) // the provided command $cmddump must be an allowed command + { + $errormsg=$langs->trans('CommandIsNotInsideAllowedCommands'); + } + } */ + + if (!$errormsg && $cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump, 'chaine', 0, '', $conf->entity); } - if (!$errormsg) - { + if (!$errormsg) { $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file); $errormsg = $utils->error; $_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone']; @@ -195,8 +191,7 @@ if ($what == 'postgresql') } -if ($errormsg) -{ +if ($errormsg) { setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors'); $resultstring = ''; @@ -204,8 +199,7 @@ if ($errormsg) $_SESSION["commandbackupresult"] = $resultstring; } else { - if ($what) - { + if ($what) { setEventMessages($langs->trans("BackupFileSuccessfullyCreated").'.
    '.$langs->trans("YouCanDownloadBackupFile"), null, 'mesgs'); $resultstring = '
    '; @@ -222,16 +216,7 @@ if ($errormsg) } -/* -$filearray=dol_dir_list($conf->admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); -$result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,($langs->trans("NoBackupFileAvailable").'
    '.$langs->trans("ToBuildBackupFileClickHere",DOL_URL_ROOT.'/admin/tools/dolibarr_export.php')),0,$langs->trans("PreviousDumpFiles")); - -print '
    '; -*/ - // Redirect to backup page header("Location: dolibarr_export.php".(GETPOST('page_y', 'int') ? '?page_y='.GETPOST('page_y', 'int') : '')); -$time_end = time(); - $db->close(); diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 5ec1d5d56f7..34685676320 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -42,13 +42,23 @@ $file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file); $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 (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "date"; +} +if ($page < 0) { + $page = 0; +} elseif (empty($page)) { + $page = 0; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $errormsg = ''; @@ -57,13 +67,15 @@ $errormsg = ''; * Actions */ -if ($action == 'delete') -{ +if ($action == 'delete') { $filerelative = dol_sanitizeFileName(GETPOST('urlfile', 'alpha')); $filepath = $conf->admin->dir_output.'/'.$filerelative; $ret = dol_delete_file($filepath, 1); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filerelative), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filerelative), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", $filerelative), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", $filerelative), null, 'errors'); + } $action = ''; } @@ -74,8 +86,7 @@ if ($action == 'delete') // Increase limit of time. Works only if we are not in safe mode $ExecTimeLimit = 1800; // 30mn -if (!empty($ExecTimeLimit)) -{ +if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors //error_reporting(E_ALL); @@ -83,8 +94,7 @@ if (!empty($ExecTimeLimit)) error_reporting($err); } $MemoryLimit = 0; -if (!empty($MemoryLimit)) -{ +if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } @@ -110,13 +120,11 @@ $result = dol_mkdir($outputdir); $utils = new Utils($db); -if ($compression == 'zip') -{ +if ($compression == 'zip') { $file .= '.zip'; $excludefiles = '/(\.back|\.old|\.log|[\/\\\]temp[\/\\\]|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i'; $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, $excludefiles); - if ($ret < 0) - { + if ($ret < 0) { if ($ret == -2) { $langs->load("errors"); $errormsg = $langs->trans("ErrNoZipEngine"); @@ -125,8 +133,7 @@ if ($compression == 'zip') $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'); $outputfile = $conf->admin->dir_temp.'/export_files.'.$userlogin.'.out'; // File used with popen method @@ -138,34 +145,29 @@ if ($compression == 'zip') $result = $utils->executeCLI($cmd, $outputfile); $retval = $result['error']; - if ($result['result'] || !empty($retval)) - { + if ($result['result'] || !empty($retval)) { $langs->load("errors"); dol_syslog("Documents tar retval after exec=".$retval, LOG_ERR); $errormsg = 'Error tar generation return '.$retval; } else { - if ($compression == 'gz') - { + if ($compression == 'gz') { $cmd = "gzip -f ".$outputdir."/".$file; } - if ($compression == 'bz') - { + if ($compression == 'bz') { $cmd = "bzip2 -f ".$outputdir."/".$file; } $result = $utils->executeCLI($cmd, $outputfile); $retval = $result['error']; - if ($result['result'] || !empty($retval)) - { + if ($result['result'] || !empty($retval)) { $errormsg = 'Error '.$compression.' generation return '.$retval; unlink($outputdir."/".$file); } } } -if ($errormsg) -{ +if ($errormsg) { setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors'); } diff --git a/htdocs/admin/tools/index.php b/htdocs/admin/tools/index.php index 06de5cc285c..4c89ab60989 100644 --- a/htdocs/admin/tools/index.php +++ b/htdocs/admin/tools/index.php @@ -27,8 +27,9 @@ require '../../main.inc.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "admin")); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} /* diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 3cfc3c74db9..935804ada10 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -28,15 +28,15 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -49,12 +49,18 @@ $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 +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 = "dateevent"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "dateevent"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $search_code = GETPOST("search_code", "alpha"); $search_ip = GETPOST("search_ip", "alpha"); @@ -82,15 +88,15 @@ if (!GETPOSTISSET("date_endmonth")) { } // checks:if date_start>date_end then date_end=date_start + 24 hours -if ($date_start > 0 && $date_end > 0 && $date_start > $date_end) $date_end = $date_start + 86400; +if ($date_start > 0 && $date_end > 0 && $date_start > $date_end) { + $date_end = $date_start + 86400; +} -if (empty($date_start)) // We define date_start and date_end -{ +if (empty($date_start)) { // We define date_start and date_end $date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], false); } -if (empty($date_end)) -{ +if (empty($date_end)) { $date_end = dol_mktime(23, 59, 59, $nowarray['mon'], $nowarray['mday'], $nowarray['year']); } // Set $date_startmonth... @@ -103,7 +109,15 @@ $date_endday = $tmp['mday']; $date_endmonth = $tmp['mon']; $date_endyear = $tmp['year']; -$arrayfields = array(); +// Add prefix session +$arrayfields = array( + 'e.prefix_session' => array( + 'label'=>'UserAgent', + 'checked'=>(empty($conf->global->AUDIT_ENABLE_PREFIX_SESSION) ? 0 : 1), + 'enabled'=>(empty($conf->global->AUDIT_ENABLE_PREFIX_SESSION) ? 0 : 1), + 'position'=>110 + ) +); /* * Actions @@ -112,8 +126,7 @@ $arrayfields = array(); $now = dol_now(); // 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 -{ +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 $date_start = -1; $date_end = -1; $search_code = ''; @@ -125,8 +138,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' } // Purge audit events -if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) -{ +if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) { $error = 0; $db->begin(); @@ -138,8 +150,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) dol_syslog("listevents purge", LOG_DEBUG); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; setEventMessages($db->lasterror(), null, 'errors'); } @@ -152,8 +163,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) $securityevent->description = $text; $result = $securityevent->create($user); - if ($result > 0) - { + if ($result > 0) { $db->commit(); dol_syslog($text, LOG_WARNING); } else { @@ -168,7 +178,8 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) * View */ -llxHeader('', $langs->trans("Audit")); +$title = $langs->trans("Audit"); +llxHeader('', $title); $form = new Form($db); @@ -181,57 +192,101 @@ $sql .= " u.login, u.admin, u.entity, u.firstname, u.lastname, u.statut as statu $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').")"; -if ($date_start > 0) $sql .= " AND e.dateevent >= '".$db->idate($date_start)."'"; -if ($date_end > 0) $sql .= " AND e.dateevent <= '".$db->idate($date_end)."'"; -if ($search_code) { $usefilter++; $sql .= natural_search("e.type", $search_code, 0); } -if ($search_ip) { $usefilter++; $sql .= natural_search("e.ip", $search_ip, 0); } -if ($search_user) { $usefilter++; $sql .= natural_search("u.login", $search_user, 0); } -if ($search_desc) { $usefilter++; $sql .= natural_search("e.description", $search_desc, 0); } -if ($search_ua) { $usefilter++; $sql .= natural_search("e.user_agent", $search_ua, 0); } -if ($search_prefix_session) { $usefilter++; $sql .= natural_search("e.prefix_session", $search_prefix_session, 0); } +if ($date_start > 0) { + $sql .= " AND e.dateevent >= '".$db->idate($date_start)."'"; +} +if ($date_end > 0) { + $sql .= " AND e.dateevent <= '".$db->idate($date_end)."'"; +} +if ($search_code) { + $usefilter++; $sql .= natural_search("e.type", $search_code, 0); +} +if ($search_ip) { + $usefilter++; $sql .= natural_search("e.ip", $search_ip, 0); +} +if ($search_user) { + $usefilter++; $sql .= natural_search("u.login", $search_user, 0); +} +if ($search_desc) { + $usefilter++; $sql .= natural_search("e.description", $search_desc, 0); +} +if ($search_ua) { + $usefilter++; $sql .= natural_search("e.user_agent", $search_ua, 0); +} +if ($search_prefix_session) { + $usefilter++; $sql .= natural_search("e.prefix_session", $search_prefix_session, 0); +} $sql .= $db->order($sortfield, $sortorder); // 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 - { - $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($conf->liste_limit + 1, $offset); //print $sql; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $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_code) $param .= '&search_code='.urlencode($search_code); - if ($search_ip) $param .= '&search_ip='.urlencode($search_ip); - if ($search_user) $param .= '&search_user='.urlencode($search_user); - if ($search_desc) $param .= '&search_desc='.urlencode($search_desc); - if ($search_ua) $param .= '&search_ua='.urlencode($search_ua); - if ($search_prefix_session) $param .= '&search_prefix_session='.urlencode($search_prefix_session); - if ($date_startmonth) $param .= "&date_startmonth=".urlencode($date_startmonth); - if ($date_startday) $param .= "&date_startday=".urlencode($date_startday); - if ($date_startyear) $param .= "&date_startyear=".urlencode($date_startyear); - if ($date_endmonth) $param .= "&date_endmonth=".urlencode($date_endmonth); - if ($date_endday) $param .= "&date_endday=".urlencode($date_endday); - if ($date_endyear) $param .= "&date_endyear=".urlencode($date_endyear); + 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_code) { + $param .= '&search_code='.urlencode($search_code); + } + if ($search_ip) { + $param .= '&search_ip='.urlencode($search_ip); + } + if ($search_user) { + $param .= '&search_user='.urlencode($search_user); + } + if ($search_desc) { + $param .= '&search_desc='.urlencode($search_desc); + } + if ($search_ua) { + $param .= '&search_ua='.urlencode($search_ua); + } + if ($search_prefix_session) { + $param .= '&search_prefix_session='.urlencode($search_prefix_session); + } + if ($date_startmonth) { + $param .= "&date_startmonth=".urlencode($date_startmonth); + } + if ($date_startday) { + $param .= "&date_startday=".urlencode($date_startday); + } + if ($date_startyear) { + $param .= "&date_startyear=".urlencode($date_startyear); + } + if ($date_endmonth) { + $param .= "&date_endmonth=".urlencode($date_endmonth); + } + if ($date_endday) { + $param .= "&date_endday=".urlencode($date_endday); + } + if ($date_endyear) { + $param .= "&date_endyear=".urlencode($date_endyear); + } $langs->load('withdrawals'); - if ($num) - { + if ($num) { $center = ''.$langs->trans("Purge").''; } @@ -240,8 +295,7 @@ if ($result) print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit); - if ($action == 'purge') - { + if ($action == 'purge') { $formquestion = array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'), 'confirm_purge', $formquestion, 'no', 1); } @@ -288,15 +342,13 @@ if ($result) //print ''; print ''; - if (!empty($arrayfields['e.user_agent']['checked'])) - { + if (!empty($arrayfields['e.user_agent']['checked'])) { print '
    '; } - if (!empty($arrayfields['e.prefix_session']['checked'])) - { + if (!empty($arrayfields['e.prefix_session']['checked'])) { print ''; @@ -316,19 +368,16 @@ if ($result) print_liste_field_titre("IP", $_SERVER["PHP_SELF"], "e.ip", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("User", $_SERVER["PHP_SELF"], "u.login", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "e.description", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['e.user_agent']['checked'])) - { + if (!empty($arrayfields['e.user_agent']['checked'])) { print_liste_field_titre("UserAgent", $_SERVER["PHP_SELF"], "e.user_agent", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['e.prefix_session']['checked'])) - { + if (!empty($arrayfields['e.prefix_session']['checked'])) { print_liste_field_titre("PrefixSession", $_SERVER["PHP_SELF"], "e.prefix_session", "", $param, '', $sortfield, $sortorder); } print_liste_field_titre(''); print "\n"; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); print ''; @@ -346,8 +395,7 @@ if ($result) // Login print ''; // Description print ''; - if (!empty($arrayfields['e.user_agent']['checked'])) - { + if (!empty($arrayfields['e.user_agent']['checked'])) { // User agent print ''; } - if (!empty($arrayfields['e.prefix_session']['checked'])) - { + if (!empty($arrayfields['e.prefix_session']['checked'])) { // User agent print ''; - else print ''; + if ($num == 0) { + if ($usefilter) { + print ''; + } else { + print ''; + } } print "
    '; print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); print '
    '; @@ -725,41 +848,62 @@ if ($resql) // Title of lines print '
    '; @@ -798,12 +941,10 @@ if ($resql) print '
    '; - if ($tmpfieldlist == 'topic') - { + if ($tmpfieldlist == 'topic') { print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; print ''; } - if ($tmpfieldlist == 'joinfiles') - { + if ($tmpfieldlist == 'joinfiles') { print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; print ''; } - if ($tmpfieldlist == 'content') - { + 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; + 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); } @@ -850,14 +990,12 @@ if ($resql) } $keyforobj = 'type_template'; - if (!in_array($obj->$keyforobj, array_keys($elementList))) - { + 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)) - { + if (!dol_eval($obj->enabled, 1)) { $i++; continue; // Email template not qualified } @@ -865,29 +1003,33 @@ if ($resql) print '
    '.$valuetoshow.''; + print $valuetoshow; + print ''; - if ($canbedisabled) print ''.$actl[$obj->active].''; - else print ''.$actl[$obj->active].''; + if ($canbedisabled) { + print ''.$actl[$obj->active].''; + } else { + print ''.$actl[$obj->active].''; + } print "'; - if ($canbemodified) print ''.img_edit().''; - if ($iserasable) - { - print ''.img_delete().''; + 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 '
    '; // To create an artificial CR for the current tr we are on - $okforextended = true; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) - $okforextended = false; - $doleditor = new DolEditor($tmpfieldlist.'-'.$i, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%', 1); - print $doleditor->Create(1); - print '
    '; // To create an artificial CR for the current tr we are on + $okforextended = true; + if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) + $okforextended = false; + $doleditor = new DolEditor($tmpfieldlist.'-'.$i, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%', 1); + print $doleditor->Create(1); + print '
    '; if ($user->admin) { - print $form->select_dolusers($obj->{$fieldlist[$field]}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth200'); + print $form->select_dolusers(empty($obj->{$value}) ? '' : $obj->{$value}, 'fk_user', 1, null, 0, ($user->admin ? '' : 'hierarchyme'), null, 0, 0, 1, '', 0, '', 'maxwidth200'); } else { - if ($context == 'add') // I am not admin and we show the add form - { + if ($context == 'add') { // I am not admin and we show the add form print $user->getNomUrl(1); // Me $forcedvalue = $user->id; } else { - if ($obj && !empty($obj->{$fieldlist[$field]}) && $obj->{$fieldlist[$field]} > 0) - { + if ($obj && !empty($obj->{$value}) && $obj->{$value} > 0) { $fuser = new User($db); - $fuser->fetch($obj->{$fieldlist[$field]}); + $fuser->fetch($obj->{$value}); print $fuser->getNomUrl(1); $forcedvalue = $fuser->id; } else { - $forcedvalue = $obj->{$fieldlist[$field]}; + $forcedvalue = $obj->{$value}; } } - $keyname = $fieldlist[$field]; + $keyname = $value; print ''; } print ''; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $selectedlang = GETPOSTISSET('langcode') ?GETPOST('langcode', 'aZ09') : $langs->defaultlang; - if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]}; + if ($context == 'edit') { + $selectedlang = $obj->{$value}; + } print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150'); } else { - if (!empty($obj->{$fieldlist[$field]})) - { - print $obj->{$fieldlist[$field]}.' - '.$langs->trans('Language_'.$obj->{$fieldlist[$field]}); + if (!empty($obj->{$value})) { + print $obj->{$value}.' - '.$langs->trans('Language_'.$obj->{$value}); } - $keyname = $fieldlist[$field]; - if ($keyname == 'lang') $keyname = 'langcode'; // Avoid conflict with lang param - print ''; + $keyname = $value; + if ($keyname == 'lang') { + $keyname = 'langcode'; // Avoid conflict with lang param + } + print ''; } print ''; - if ($context == 'edit' && !empty($obj->{$fieldlist[$field]}) && !in_array($obj->{$fieldlist[$field]}, array_keys($elementList))) - { + if ($context == 'edit' && !empty($obj->{$value}) && !in_array($obj->{$value}, array_keys($elementList))) { // Current template type is an unknown type, so we must keep it as it is. - print ''; - print $obj->{$fieldlist[$field]}; + print ''; + print $obj->{$value}; } else { - print $form->selectarray('type_template', $elementList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1, '', 0, 1); + print $form->selectarray('type_template', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1, '', 0, 1); } print ''; print ''; print ''; print ''; print '
    '; - if ($obj->fk_user) - { + if ($obj->fk_user) { $userstatic->id = $obj->fk_user; $userstatic->login = $obj->login; $userstatic->admin = $obj->admin; @@ -355,39 +403,38 @@ if ($result) $userstatic->status = $obj->status; print $userstatic->getLoginUrl(1); - if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) - { + if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) { print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); - } elseif ($userstatic->admin) - { + } elseif ($userstatic->admin) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } - } else print ' '; + } else { + print ' '; + } print ''; $text = $langs->trans($obj->description); $reg = array(); - if (preg_match('/\((.*)\)(.*)/i', $obj->description, $reg)) - { + if (preg_match('/\((.*)\)(.*)/i', $obj->description, $reg)) { $val = explode(',', $reg[1]); $text = $langs->trans($val[0], isset($val[1]) ? $val[1] : '', isset($val[2]) ? $val[2] : '', isset($val[3]) ? $val[3] : '', isset($val[4]) ? $val[4] : ''); - if (!empty($reg[2])) $text .= $reg[2]; + if (!empty($reg[2])) { + $text .= $reg[2]; + } } print dol_escape_htmltag($text); print ''; print $obj->user_agent; print ''; print $obj->prefix_session; @@ -405,10 +452,12 @@ if ($result) $i++; } - if ($num == 0) - { - if ($usefilter) print '
    '.$langs->trans("NoEventFoundWithCriteria").'
    '.$langs->trans("NoEventOrNoAuditSetup").'
    '.$langs->trans("NoEventFoundWithCriteria").'
    '.$langs->trans("NoEventOrNoAuditSetup").'
    "; print ""; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index d8e0a0383a2..61d2b1cea58 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -28,15 +28,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "install", "users", "other")); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -45,12 +45,18 @@ $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 = "dateevent"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "dateevent"; +} /* @@ -58,25 +64,20 @@ if (!$sortfield) $sortfield = "dateevent"; */ // Purge sessions -if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) -{ +if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) { $res = purgeSessions(session_id()); } // Lock new sessions -if ($action == 'confirm_lock' && $confirm == 'yes' && $user->admin) -{ - if (dolibarr_set_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $user->login, 'text', 1, 'Logon is restricted to a particular user', 0) < 0) - { +if ($action == 'confirm_lock' && $confirm == 'yes' && $user->admin) { + if (dolibarr_set_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', $user->login, 'text', 1, 'Logon is restricted to a particular user', 0) < 0) { dol_print_error($db); } } // Unlock new sessions -if ($action == 'confirm_unlock' && $user->admin) -{ - if (dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', -1) < 0) - { +if ($action == 'confirm_unlock' && $user->admin) { + if (dolibarr_del_const($db, 'MAIN_ONLY_LOGIN_ALLOWED', -1) < 0) { dol_print_error($db); } } @@ -107,22 +108,23 @@ $suhosin = empty($phparray['suhosin']["suhosin.session.encrypt"]["local"]) ? '' print ''.$langs->trans("SessionSaveHandler").': '.$savehandler.'
    '; print ''.$langs->trans("SessionSavePath").': '.$savepath.'
    '; -if ($openbasedir) print ''.$langs->trans("OpenBaseDir").': '.$openbasedir.'
    '; -if ($suhosin) print ''.$langs->trans("SuhosinSessionEncrypt").': '.$suhosin.'
    '; +if ($openbasedir) { + print ''.$langs->trans("OpenBaseDir").': '.$openbasedir.'
    '; +} +if ($suhosin) { + print ''.$langs->trans("SuhosinSessionEncrypt").': '.$suhosin.'
    '; +} print '
    '; -if ($action == 'purge') -{ +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); } -if ($savehandler == 'files') -{ +if ($savehandler == 'files') { print ''; print ''; print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "login", "", "", 'align="left"', $sortfield, $sortorder); @@ -134,8 +136,7 @@ if ($savehandler == 'files') print_liste_field_titre(''); print "\n"; - foreach ($listofsessions as $key => $sessionentry) - { + foreach ($listofsessions as $key => $sessionentry) { print ''; // Login @@ -143,8 +144,11 @@ if ($savehandler == 'files') // ID print ''; // Date creation @@ -165,8 +169,7 @@ if ($savehandler == 'files') $i++; } - if (count($listofsessions) == 0) - { + if (count($listofsessions) == 0) { print ''; } print "
    '; - if ("$key" == session_id()) print $form->textwithpicto($key, $langs->trans("YourSession")); - else print $key; + if ("$key" == session_id()) { + print $form->textwithpicto($key, $langs->trans("YourSession")); + } else { + print $key; + } print '
    '.$langs->trans("NoSessionFound", $savepath, $openbasedir).'
    "; @@ -181,17 +184,14 @@ if ($savehandler == 'files') print '
    '; -if (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) -{ +if (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { print ''.$langs->trans("LockNewSessions").''; } else { print ''.$langs->trans("UnlockNewSessions").''; } -if ($savehandler == 'files') -{ - if (count($listofsessions)) - { +if ($savehandler == 'files') { + if (count($listofsessions)) { print ''.$langs->trans("PurgeSessions").''; } } diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index f3266a8c5d0..e20b9c2b13a 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -26,8 +26,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->load("admin"); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -36,8 +37,7 @@ $choice = GETPOST('choice', 'aZ09'); // Define filelog to discard it from purge $filelog = ''; -if (!empty($conf->syslog->enabled)) -{ +if (!empty($conf->syslog->enabled)) { $filelog = $conf->global->SYSLOG_FILE; $filelog = preg_replace('/DOL_DATA_ROOT/i', DOL_DATA_ROOT, $filelog); } @@ -46,12 +46,10 @@ if (!empty($conf->syslog->enabled)) /* * Actions */ -if ($action == 'purge' && !preg_match('/^confirm/i', $choice) && ($choice != 'allfiles' || $confirm == 'yes')) -{ +if ($action == 'purge' && !preg_match('/^confirm/i', $choice) && ($choice != 'allfiles' || $confirm == 'yes')) { // Increase limit of time. Works only if we are not in safe mode $ExecTimeLimit = 600; - if (!empty($ExecTimeLimit)) - { + if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors //error_reporting(E_ALL); diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index f39766818f3..5a6ff94ce57 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -32,7 +32,9 @@ $langs->loadLangs(array("admin", "other")); $action = GETPOST('action', 'aZ09'); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} if (GETPOST('msg', 'alpha')) { setEventMessages(GETPOST('msg', 'alpha'), null, 'errors'); @@ -52,8 +54,7 @@ $version = '0.0'; * Actions */ -if ($action == 'getlastversion') -{ +if ($action == 'getlastversion') { $result = getURLContent('https://sourceforge.net/projects/dolibarr/rss'); //var_dump($result['content']); $sfurl = simplexml_load_string($result['content']); @@ -73,25 +74,22 @@ print '
    '; print $langs->trans("CurrentVersion").' : '.DOL_VERSION.'
    '; -if (function_exists('curl_init')) -{ +if (function_exists('curl_init')) { $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10; - if ($action == 'getlastversion') - { - if ($sfurl) - { + if ($action == 'getlastversion') { + if ($sfurl) { $i = 0; - while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) - { + while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) { $title = $sfurl->channel[0]->item[$i]->title; - if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) - { + if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) { $newversion = $reg[1]; $newversionarray = explode('.', $newversion); $versionarray = explode('.', $version); //var_dump($newversionarray);var_dump($versionarray); - if (versioncompare($newversionarray, $versionarray) > 0) $version = $newversion; + if (versioncompare($newversionarray, $versionarray) > 0) { + $version = $newversion; + } } $i++; } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index c31f1c07093..f5ab2af51e3 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -30,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "products", "admin", "sms", "other", "errors")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $id = GETPOST('rowid', 'int'); $action = GETPOST('action', 'aZ09'); @@ -40,18 +42,24 @@ $transkey = GETPOST('transkey', 'alphanohtml'); $transvalue = GETPOST('transvalue', 'restricthtml'); -$mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'searchkey'; +$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'searchkey'; -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$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 (!$sortfield) $sortfield = 'lang,transkey'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 'lang,transkey'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('admintranslation', 'globaladmin')); @@ -61,45 +69,48 @@ $hookmanager->initHooks(array('admintranslation', 'globaladmin')); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && !empty($massaction) && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} -$parameters = array('socid'=>$socid); +$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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(); } -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 ($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 ($action == 'update') -{ - if ($transvalue == '') - { +if ($action == 'update') { + if ($transvalue == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NewTranslationStringToShow")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".GETPOST('rowid', 'int'); $result = $db->query($sql); - if ($result > 0) - { + if ($result > 0) { $db->commit(); setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action = ""; @@ -107,8 +118,7 @@ if ($action == 'update') $transvalue = ""; } else { $db->rollback(); - if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings'); } else { setEventMessages($db->lasterror(), null, 'errors'); @@ -118,33 +128,27 @@ if ($action == 'update') } } -if ($action == 'add') -{ +if ($action == 'add') { $error = 0; - if (empty($langcode)) - { + if (empty($langcode)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Language")), null, 'errors'); $error++; } - if ($transkey == '') - { + if ($transkey == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Key")), null, 'errors'); $error++; } - if ($transvalue == '') - { + if ($transvalue == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NewTranslationStringToShow")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $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).")"; $result = $db->query($sql); - if ($result > 0) - { + if ($result > 0) { $db->commit(); setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action = ""; @@ -152,8 +156,7 @@ if ($action == 'add') $transvalue = ""; } else { $db->rollback(); - if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings'); } else { setEventMessages($db->lasterror(), null, 'errors'); @@ -164,12 +167,10 @@ if ($action == 'add') } // Delete line from delete picto -if ($action == 'delete') -{ - $sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".$db->escape($id); +if ($action == 'delete') { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".((int) $id); $result = $db->query($sql); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } else { dol_print_error($db); @@ -194,8 +195,7 @@ $param = '&mode='.urlencode($mode); $enabledisablehtml = ''; $enabledisablehtml .= $langs->trans("EnableOverwriteTranslation").' '; -if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) -{ +if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { // Button off, click to enable $enabledisablehtml .= ''; $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); @@ -215,16 +215,30 @@ print $form->textwithpicto(''.$langs->trans("Current print '
    '; -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 ($langcode) $param .= '&langcode='.urlencode($langcode); -if ($transkey) $param .= '&transkey='.urlencode($transkey); -if ($transvalue) $param .= '&transvalue='.urlencode($transvalue); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if (isset($optioncss) && $optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +if ($langcode) { + $param .= '&langcode='.urlencode($langcode); +} +if ($transkey) { + $param .= '&transkey='.urlencode($transkey); +} +if ($transvalue) { + $param .= '&transvalue='.urlencode($transvalue); +} -print '
    entity) && $debug) ? '?debug=1' : '').'" method="POST">'; -if ($optioncss != '') print ''; +print 'entity) && !empty($debug)) ? '?debug=1' : '').'" method="POST">'; +if (isset($optioncss) && $optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -234,14 +248,17 @@ $head = translation_prepare_head(); print dol_get_fiche_head($head, $mode, '', -1, ''); -if ($mode == 'overwrite') -{ +if ($mode == 'overwrite') { print ''; $disabled = ''; - if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disabled = ' disabled="disabled"'; + if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { + $disabled = ' disabled="disabled"'; + } $disablededit = ''; - if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disablededit = ' disabled'; + if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { + $disablededit = ' disabled'; + } print '
    '; print img_info().' '.$langs->trans("SomeTranslationAreUncomplete"); @@ -272,7 +289,7 @@ if ($mode == 'overwrite') print "\n"; print '
    '; - print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidthonsmartphone', 1); + print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidth250', 1); print ''; print ''; @@ -281,14 +298,14 @@ if ($mode == 'overwrite') print ''; - print ''; - print ''; - } - else - {*/ + { + print ''; + print ''; + print ''; + } + else + {*/ print ''; print ''; //} @@ -306,13 +323,11 @@ if ($mode == 'overwrite') dol_syslog("translation::select from table", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); print "\n"; @@ -323,14 +338,13 @@ if ($mode == 'overwrite') print ''.$obj->transkey.''; + print ''; /*print ''; - print ''; - print ''; - print ''; - */ - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) - { + print ''; + print ''; + print ''; + */ + if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) { print ''; } else { print dol_escape_htmltag($obj->transvalue); @@ -360,8 +374,7 @@ if ($mode == 'overwrite') print ''; } -if ($mode == 'searchkey') -{ +if ($mode == 'searchkey') { $langcode = GETPOSTISSET('langcode') ? GETPOST('langcode') : $langs->defaultlang; $newlang = new Translate('', $conf); @@ -378,18 +391,23 @@ if ($mode == 'searchkey') $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++; + 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) - { + foreach ($modulesdir as $keydir => $tmpsearchdir) { $searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/' // Directory of translation files @@ -397,29 +415,36 @@ if ($mode == 'searchkey') $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) - { + foreach ($filearray as $file) { $tmpfile = preg_replace('/.lang/i', '', basename($file['name'])); $moduledirname = (basename(dirname(dirname($dir_lang)))); $langkey = $tmpfile; - if ($i > 0) $langkey .= '@'.$moduledirname; + if ($i > 0) { + $langkey .= '@'.$moduledirname; + } //var_dump($i.' - '.$keydir.' - '.$dir_lang_osencoded.' -> '.$moduledirname . ' / ' . $tmpfile.' -> '.$langkey); $result = $newlang->load($langkey, 0, 0, '', 0); // Load translation files + database overwrite $result = $newlangfileonly->load($langkey, 0, 0, '', 1); // Load translation files only - if ($result < 0) print 'Failed to load language file '.$tmpfile.'
    '."\n"; - else $nbtotaloffiles++; + 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++; } // 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; + 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; } } @@ -428,11 +453,15 @@ if ($mode == 'searchkey') $nbtotalofrecordswithoutfilters = count($newlang->tab_translate); $nbtotalofrecords = count($recordtoshow); $num = $limit + 1; - if (($offset + $num) > $nbtotalofrecords) $num = $limit; + 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").')'; + 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 ''; @@ -453,7 +482,7 @@ if ($mode == 'searchkey') 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 $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidth250', 1); print ''; print ''; @@ -461,35 +490,46 @@ if ($mode == 'searchkey') print ''; // Limit to superadmin /*if (! empty($conf->multicompany->enabled) && !$user->entity) - { - print ''; - print ''; - } - else - {*/ + { + print ''; + print ''; + } + else + {*/ print ''; //} print ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $searchpicto = $form->showFilterAndCheckAddButtons(!empty($massactionbutton) ? 1 : 0, 'checkforselect', 1); print $searchpicto; print '
    '.$langcode.''.$key.''; + if ($i <= $offset) { + continue; + } + if ($i > ($offset + $limit)) { + break; + } + print '
    '.$langcode.''.$key.''; print dol_escape_htmltag($val); print ''; if (!empty($newlangfileonly->tab_translate[$key])) { @@ -501,8 +541,7 @@ if ($mode == 'searchkey') $sql .= " AND entity IN (".getEntity('overwrite_trans').")"; dol_syslog("translation::select from table", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $obj = $db->fetch_object($result); } print ''.img_edit().''; @@ -516,8 +555,7 @@ if ($mode == 'searchkey') print ''.img_edit_add($langs->trans("Overwrite")).''; } - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) - { + 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; @@ -529,9 +567,9 @@ if ($mode == 'searchkey') print $form->textwithpicto('', $htmltext, 1, 'warning'); } /*if (! empty($conf->multicompany->enabled) && !$user->entity) - { - print ''.$val.''.$val.'
    '.$trigger['picto'].''.$trigger['file'].''.$langs->trans("UserMailRequired").' '; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_MAIL_REQUIRED'); } else { - if (empty($conf->global->USER_MAIL_REQUIRED)) - { + if (empty($conf->global->USER_MAIL_REQUIRED)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; @@ -172,12 +159,10 @@ print ''.$langs->trans("UserHideInactive").' '; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX'); } else { - if (empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) - { + if (empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; @@ -198,12 +183,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -226,29 +209,21 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -284,8 +264,7 @@ foreach ($dirmodels as $reldir) // Defaut print ''; - if ($conf->global->USER_ADDON_PDF == $name) - { + 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').''; @@ -295,8 +274,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
    '.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '
    '.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '

    '.$langs->trans("FeaturesSupported").':'; @@ -310,8 +288,7 @@ foreach ($dirmodels as $reldir) // Preview print '
    '; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index 0725cc83f18..b73d3ce4f22 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "members", "users")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $extrafields = new ExtraFields($db); @@ -48,25 +50,20 @@ $type = 'group'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'set_default') -{ +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) - { - if ($conf->global->USERGROUP_ADDON_PDF_ODT == "$value") dolibarr_del_const($db, 'USERGROUP_ADDON_PDF_ODT', $conf->entity); + if ($ret > 0) { + if ($conf->global->USERGROUP_ADDON_PDF_ODT == "$value") { + dolibarr_del_const($db, 'USERGROUP_ADDON_PDF_ODT', $conf->entity); + } } $res = true; -} - -// Set default model -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "USERGROUP_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + // Set default model + if (dolibarr_set_const($db, "USERGROUP_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->USERGROUP_ADDON_PDF_ODT = $value; @@ -74,26 +71,21 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $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) - { + if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } 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) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -127,12 +119,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -155,29 +145,21 @@ print "
    '; print (empty($module->name) ? $name : $module->name); print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print ''."\n"; print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -213,8 +200,7 @@ foreach ($dirmodels as $reldir) // Defaut print ''; - if ($conf->global->USERGROUP_ADDON_PDF == $name) - { + 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').''; @@ -224,8 +210,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '
    '.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '
    '.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '

    '.$langs->trans("FeaturesSupported").':'; @@ -239,8 +224,7 @@ foreach ($dirmodels as $reldir) // Preview print '
    '; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 3ebbd9300bc..864bb39798b 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -42,25 +42,33 @@ $rowid = GETPOST('rowid', 'alpha'); $id = 1; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $acts[0] = "activate"; $acts[1] = "disable"; -$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off'); -$actl[1] = img_picto($langs->trans("Activated"), 'switch_on'); +$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"'); +$actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"'); // 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 +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'; +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')); @@ -75,7 +83,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.position, 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, f.date_creation FROM ".MAIN_DB_PREFIX.'website as f WHERE f.entity IN ('.getEntity('website').')'; // Criteria to sort dictionaries $tabsqlsort = array(); @@ -83,7 +91,7 @@ $tabsqlsort[1] = "ref ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield = array(); -$tabfield[1] = "ref,description,virtualhost,position"; +$tabfield[1] = "ref,description,virtualhost,position,date_creation"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue = array(); @@ -122,8 +130,7 @@ $sourceList = array(); */ // Actions add or modify a website -if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) -{ +if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { $listfield = explode(',', $tabfield[$id]); $listfieldinsert = explode(',', $tabfieldinsert[$id]); $listfieldmodify = explode(',', $tabfieldinsert[$id]); @@ -131,16 +138,13 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Check that all fields are filled $ok = 1; - foreach ($listfield as $f => $value) - { - if ($value == 'ref' && (!GETPOSTISSET($value) || GETPOST($value) == '')) - { + 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])) - { + } elseif ($value == 'ref' && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST($value))) { $ok = 0; $fieldnamekey = $listfield[$f]; setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities($fieldnamekey)), null, 'errors'); @@ -149,22 +153,18 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) } // Clean parameters - if (!empty($_POST['ref'])) - { - $websitekey = strtolower($_POST['ref']); + if (GETPOST('ref')) { + $websitekey = strtolower(GETPOST('ref')); } // Si verif ok et action add, on ajoute la ligne - if ($ok && GETPOST('actionadd', 'alpha')) - { - if ($tabrowid[$id]) - { + 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) - { + if ($result) { $obj = $db->fetch_object($result); $newid = ($obj->newid + 1); } else { @@ -173,43 +173,48 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) } /* $website=new Website($db); - $website->ref= - $website->description= - $website->virtualhost= - $website->create($user); */ + $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)) + 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)) + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) { $sql .= $newid.","; + } $i = 0; - foreach ($listfieldinsert as $f => $value) - { + 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]])."'"; + 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 - { + if ($result) { // Add is ok setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); unset($_POST); // Clean $_POST array, we keep only } else { @@ -222,9 +227,12 @@ 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 ($ok && GETPOST('actionmodify', 'alpha')) { + if ($tabrowid[$id]) { + $rowidcol = $tabrowid[$id]; + } else { + $rowidcol = "rowid"; + } $db->begin(); @@ -235,21 +243,24 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; // Modifie valeur des champs - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) - { + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) { $sql .= $tabrowid[$id]."="; $sql .= "'".$db->escape($rowid)."', "; } $i = 0; - foreach ($listfieldmodify as $field) - { + foreach ($listfieldmodify as $field) { if ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } - if ($i) $sql .= ","; + if ($i) { + $sql .= ","; + } $sql .= $field."="; - if ($_POST[$listfieldvalue[$i]] == '') $sql .= "null"; - else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + if ($_POST[$listfieldvalue[$i]] == '') { + $sql .= "null"; + } else { + $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + } $i++; } $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); @@ -257,16 +268,13 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $newname = dol_sanitizeFileName(GETPOST('ref', 'aZ09')); - if ($newname != $website->ref) - { + if ($newname != $website->ref) { $srcfile = DOL_DATA_ROOT.'/website/'.$website->ref; $destfile = DOL_DATA_ROOT.'/website/'.$newname; - if (dol_is_dir($destfile)) - { + if (dol_is_dir($destfile)) { $error++; setEventMessages($langs->trans('ErrorDirAlreadyExists', $destfile), null, 'errors'); } else { @@ -275,8 +283,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // 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) - { + foreach ($listofilestochange as $key => $value) { dolReplaceInFile($value['fullname'], $arrayreplacement); } } @@ -286,8 +293,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) setEventMessages($db->lasterror(), null, 'errors'); } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -296,20 +302,21 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } -if (GETPOST('actioncancel', 'alpha')) -{ +if (GETPOST('actioncancel', 'alpha')) { //$_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 ($action == 'confirm_delete' && $confirm == 'yes') { // delete + if ($tabrowid[$id]) { + $rowidcol = $tabrowid[$id]; + } else { + $rowidcol = "rowid"; + } $website = new Website($db); $website->fetch($rowid); - if ($website->id > 0) - { + if ($website->id > 0) { $sql = "DELETE from ".MAIN_DB_PREFIX."website_account WHERE fk_website = ".((int) $rowid); $result = $db->query($sql); @@ -321,18 +328,15 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete $sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid = ".((int) $rowid); $result = $db->query($sql); - if (!$result) - { - if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') - { + if (!$result) { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); } else { dol_print_error($db); } } - if ($website->ref) - { + if ($website->ref) { dol_delete_dir_recursive($conf->website->dir_output.'/'.$website->ref); } } else { @@ -341,33 +345,37 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete } // activate -if ($action == $acts[0]) -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == $acts[0]) { + if ($tabrowid[$id]) { + $rowidcol = $tabrowid[$id]; + } else { + $rowidcol = "rowid"; + } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET status = 1 WHERE rowid = ".((int) $rowid); } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } // disable -if ($action == $acts[1]) -{ - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } +if ($action == $acts[1]) { + if ($tabrowid[$id]) { + $rowidcol = $tabrowid[$id]; + } else { + $rowidcol = "rowid"; + } if ($rowid) { $sql = "UPDATE ".$tabname[$id]." SET status = 0 WHERE rowid = ".((int) $rowid); } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } @@ -409,8 +417,7 @@ print "
    \n"; // Confirmation de la suppression de la ligne -if ($action == 'delete') -{ +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, 220); } //var_dump($elementList); @@ -418,8 +425,7 @@ if ($action == 'delete') /* * Show website list */ -if ($id) -{ +if ($id) { // Complete requete recherche valeurs avec critere de tri $sql = $tabsql[$id]; $sql .= $db->order($sortfield, $sortorder); @@ -433,29 +439,37 @@ if ($id) print ''; // Form to add a new line - if ($tabname[$id]) - { + if ($tabname[$id]) { $fieldlist = explode(',', $tabfield[$id]); // Line for title print ''; - foreach ($fieldlist as $field => $value) - { + foreach ($fieldlist as $field => $value) { + if ($fieldlist[$field] == 'date_creation') { + continue; + } + // 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 != '') - { + if ($fieldlist[$field] == 'lang') { + $valuetoshow = $langs->trans("Language"); + } + if ($valuetoshow != '') { print ''; } } @@ -469,26 +483,25 @@ if ($id) $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')) + if (GETPOST('actionadd', 'alpha')) { + foreach ($fieldlist as $key => $val) { + if (GETPOST($val, 'alpha')) { $obj->$val = GETPOST($val); + } } } + if (!isset($obj->position)) { + $obj->position = 1; + } fieldListWebsites($fieldlist, $obj, $tabname[$id], 'add'); print ''; print ""; - - $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; + 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 ($action != 'edit') - { + if ($action != 'edit') { print ''; } print '
    '; @@ -497,12 +510,10 @@ if ($id) // List of websites in database $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { + if ($num) { print '
    '; print '
    '; @@ -514,8 +525,7 @@ if ($id) // Title of lines print '
     '; print ' '.$valuetoshow.''.$valuetoshow.''.img_edit().''.img_edit().''.img_delete().''.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').''.img_delete().''.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').'
    '; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; $size = ''; - if ($fieldlist[$field] == 'code') $size = 'size="8" '; - if ($fieldlist[$field] == 'position') $size = 'size="4" '; - if ($fieldlist[$field] == 'libelle') $size = 'size="32" '; - if ($fieldlist[$field] == 'tracking') $size = 'size="92" '; - if ($fieldlist[$field] == 'sortorder') $size = 'size="2" '; + if ($fieldlist[$field] == 'code') { + $size = 'size="8" '; + } + if ($fieldlist[$field] == 'position') { + $size = 'size="4" '; + } + if ($fieldlist[$field] == 'libelle') { + $size = 'size="32" '; + } + if ($fieldlist[$field] == 'tracking') { + $size = 'size="92" '; + } + if ($fieldlist[$field] == 'sortorder') { + $size = 'size="2" '; + } print ''; print '
    '; print ''; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print ''; @@ -125,8 +127,7 @@ if ($action == 'edit') print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print '
    '; print ''; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print ''; diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 6bd3edca2b8..09156e08588 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2016 Laurent Destailleur + * Copyright (C) 2005-2021 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -28,10 +28,12 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page -$langs->loadLangs(array("admin", "workflow", "propal", "workflow", "orders", "supplier_proposal", "receptions", "errors")); +$langs->loadLangs(array("admin", "workflow", "propal", "workflow", "orders", "supplier_proposal", "receptions", "errors", 'sendings')); $action = GETPOST('action', 'aZ09'); @@ -70,7 +72,7 @@ $workflowcodes = array( 'picto'=>'bill' ), - 'separator1'=>array('family'=>'separator', 'position'=>25), + 'separator1'=>array('family'=>'separator', 'position'=>25, 'title'=>''), // Automatic classification of proposal 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array( @@ -109,8 +111,8 @@ $workflowcodes = array( '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', + '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'=>'supplier_proposal', 'warning'=>'' ), @@ -118,8 +120,8 @@ $workflowcodes = array( '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', + 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)), + 'picto'=>'supplier_order', 'warning'=>'' ), @@ -127,9 +129,17 @@ $workflowcodes = array( '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' + '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'=>'reception' ), + + // Automatic classification shipping + 'WORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE' => array( + 'family' => 'classify_shipping', + 'position' => 66, + 'enabled' => ! empty($conf->expedition->enabled) && ! empty($conf->facture->enabled), + 'picto' => 'shipment' + ) ); if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) { @@ -140,7 +150,8 @@ if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['w // remove not available workflows (based on activated modules and global defined keys) $workflowcodes = array_filter($workflowcodes, function ($var) { - return $var['enabled']; }); + return $var['enabled']; +}); /* * View @@ -175,6 +186,7 @@ foreach ($workflowcodes as $key => $params) { if ($params['family'] == 'separator') { print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print ''.$conf->global->$key.'
    '; print '
    '; + print ''; continue; @@ -185,11 +197,24 @@ foreach ($workflowcodes as $key => $params) { $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'); + 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'); + } + if ($reg[1] == 'shipping') { + $header .= ' - '.$langs->trans('Shipment'); + } } else { $header = $langs->trans("Description"); } @@ -204,7 +229,7 @@ foreach ($workflowcodes as $key => $params) { print ''; print '"; print ''; print ''; $production_mode = (empty($conf->global->API_PRODUCTION_MODE) ?false:true); -if ($production_mode) -{ +if ($production_mode) { print ''; @@ -146,19 +139,25 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai // Show message $message = ''; -$url = $urlwithroot.'/api/index.php/login?login=auserlogin&password=thepassword[&reset=1]'; +//$url = $urlwithroot.'/api/index.php/login?login=auserlogin&password=thepassword[&reset=1]'; +$url = $urlwithroot.'/api/index.php/login?login=auserlogin&password=thepassword[&reset=1]'; $message .= ''.$langs->trans("UrlToGetKeyToUseAPIs").':
    '; -$message .= img_picto('', 'globe').' '.$url; +$message .= ''; print $message; +print ajax_autoselect("urltogettoken"); print '
    '; print '
    '; // Explorer -print ''.$langs->trans("ApiExporerIs").':
    '; -if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/explorer')) -{ +print ''.$langs->trans("ApiExporerIs").':
    '; +if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/explorer')) { $url = DOL_MAIN_URL_ROOT.'/api/index.php/explorer'; - print img_picto('', 'globe').' '.$url."
    \n"; + print '
    \n"; + print '

    '.$langs->trans("SwaggerDescriptionFile").':
    '; + $urlswagger = DOL_MAIN_URL_ROOT.'/api/index.php/explorer/swagger.json?DOLAPIKEY=youruserapikey'; + //$urlswaggerreal = DOL_MAIN_URL_ROOT.'/api/index.php/explorer/swagger.json?DOLAPIKEY='.$user->api_key; + print '
    \n"; + print '
    '; } else { $langs->load("errors"); print info_admin($langs->trans("ErrorNotAvailableWithThisDistribution"), 0, 0, 'error'); diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 89d170feb60..356caa24ec2 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -51,7 +51,9 @@ class DolibarrApi { global $conf, $dolibarr_main_url_root; - if (empty($cachedir)) $cachedir = $conf->api->dir_temp; + if (empty($cachedir)) { + $cachedir = $conf->api->dir_temp; + } Defaults::$cacheDirectory = $cachedir; $this->db = $db; @@ -140,7 +142,7 @@ class DolibarrApi unset($object->labelStatusShort); unset($object->stats_propale); - unset($object->stats_commande); + unset($object->stats_commande); unset($object->stats_contrat); unset($object->stats_facture); unset($object->stats_commande_fournisseur); @@ -191,8 +193,7 @@ class DolibarrApi // If object has lines, remove $db property if (isset($object->lines) && is_array($object->lines) && count($object->lines) > 0) { $nboflines = count($object->lines); - for ($i = 0; $i < $nboflines; $i++) - { + for ($i = 0; $i < $nboflines; $i++) { $this->_cleanObjectDatas($object->lines[$i]); unset($object->lines[$i]->contact); @@ -236,8 +237,6 @@ class DolibarrApi // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Check user access to a resource - * * Check access by user to a given resource * * @param string $resource element to check @@ -284,12 +283,14 @@ class DolibarrApi $ok = 0; $i = 0; $nb = strlen($tmp); $counter = 0; - while ($i < $nb) - { - if ($tmp[$i] == '(') $counter++; - if ($tmp[$i] == ')') $counter--; - if ($counter < 0) - { + while ($i < $nb) { + if ($tmp[$i] == '(') { + $counter++; + } + if ($tmp[$i] == ')') { + $counter--; + } + if ($counter < 0) { $error = "Bad sqlfilters=".$sqlfilters; dol_syslog($error, LOG_WARNING); return false; @@ -313,14 +314,17 @@ class DolibarrApi global $db; //dol_syslog("Convert matches ".$matches[1]); - if (empty($matches[1])) return ''; + if (empty($matches[1])) { + return ''; + } $tmp = explode(':', $matches[1]); - if (count($tmp) < 3) return ''; + if (count($tmp) < 3) { + return ''; + } $tmpescaped = $tmp[2]; $regbis = array(); - if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) - { + if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) { $tmpescaped = "'".$db->escape($regbis[1])."'"; } else { $tmpescaped = $db->escape($tmpescaped); diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 926a51456c7..99582b62047 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -35,7 +35,6 @@ use \Luracast\Restler\Resources; use \Luracast\Restler\Defaults; use \Luracast\Restler\RestException; - /** * Dolibarr API access class * @@ -90,28 +89,24 @@ class DolibarrApiAccess implements iAuthenticate /*foreach ($_SERVER as $key => $val) { - dol_syslog($key.' - '.$val); + dol_syslog($key.' - '.$val); }*/ // api key can be provided in url with parameter api_key=xxx or ni header with header DOLAPIKEY:xxx $api_key = ''; - if (isset($_GET['api_key'])) // For backward compatibility - { + if (isset($_GET['api_key'])) { // For backward compatibility // TODO Add option to disable use of api key on url. Return errors if used. $api_key = $_GET['api_key']; } - if (isset($_GET['DOLAPIKEY'])) - { + if (isset($_GET['DOLAPIKEY'])) { // TODO Add option to disable use of api key on url. Return errors if used. $api_key = $_GET['DOLAPIKEY']; // With GET method } - if (isset($_SERVER['HTTP_DOLAPIKEY'])) // Param DOLAPIKEY in header can be read with HTTP_DOLAPIKEY - { + if (isset($_SERVER['HTTP_DOLAPIKEY'])) { // Param DOLAPIKEY in header can be read with HTTP_DOLAPIKEY $api_key = $_SERVER['HTTP_DOLAPIKEY']; // With header method (recommanded) } - if ($api_key) - { + if ($api_key) { $userentity = 0; $sql = "SELECT u.login, u.datec, u.api_key, "; @@ -121,17 +116,14 @@ class DolibarrApiAccess implements iAuthenticate // TODO Check if 2 users has same API key. $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $login = $obj->login; $stored_key = $obj->api_key; $userentity = $obj->entity; - if (!defined("DOLENTITY") && $conf->entity != ($obj->entity ? $obj->entity : 1)) // If API was not forced with HTTP_DOLENTITY, and user is on another entity, so we reset entity to entity of user - { + if (!defined("DOLENTITY") && $conf->entity != ($obj->entity ? $obj->entity : 1)) { // If API was not forced with HTTP_DOLENTITY, and user is on another entity, so we reset entity to entity of user $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); @@ -147,8 +139,7 @@ class DolibarrApiAccess implements iAuthenticate return false; } - if (!$login) - { + if (!$login) { throw new RestException(503, 'Error when searching login user from api key'); } $fuser = new User($this->db); @@ -173,7 +164,9 @@ class DolibarrApiAccess implements iAuthenticate $userClass::setCacheIdentifier(static::$role); Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess'; $requirefortest = static::$requires; - if (!is_array($requirefortest)) $requirefortest = explode(',', $requirefortest); + if (!is_array($requirefortest)) { + $requirefortest = explode(',', $requirefortest); + } return in_array(static::$role, (array) $requirefortest) || static::$role == 'admin'; } diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index ebeeac5c5b9..00fd1a91a8a 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -20,7 +20,6 @@ use Luracast\Restler\RestException; use Luracast\Restler\Format\UploadFormat; - require_once DOL_DOCUMENT_ROOT.'/main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -36,7 +35,7 @@ class Documents extends DolibarrApi /** * @var array $DOCUMENT_FIELDS Mandatory fields, checked when create and update object */ - static $DOCUMENT_FIELDS = array( + public static $DOCUMENT_FIELDS = array( 'modulepart' ); @@ -106,8 +105,7 @@ class Documents extends DolibarrApi $filename = basename($original_file); $original_file_osencoded = dol_osencode($original_file); // New file name encoded in OS encoding charset - if (!file_exists($original_file_osencoded)) - { + if (!file_exists($original_file_osencoded)) { dol_syslog("Try to download not found file ".$original_file_osencoded, LOG_WARNING); throw new RestException(404, 'File not found'); } @@ -148,8 +146,7 @@ class Documents extends DolibarrApi } $outputlangs = $langs; - if ($langcode && $langs->defaultlang != $langcode) - { + if ($langcode && $langs->defaultlang != $langcode) { $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($langcode); } @@ -187,8 +184,7 @@ class Documents extends DolibarrApi $templateused = ''; - if ($modulepart == 'facture' || $modulepart == 'invoice') - { + if ($modulepart == 'facture' || $modulepart == 'invoice') { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $this->invoice = new Facture($this->db); $result = $this->invoice->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); @@ -201,9 +197,7 @@ class Documents extends DolibarrApi if ($result <= 0) { throw new RestException(500, 'Error generating document'); } - } - elseif ($modulepart == 'commande' || $modulepart == 'order') - { + } elseif ($modulepart == 'commande' || $modulepart == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $this->order = new Commande($this->db); $result = $this->order->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); @@ -215,9 +209,7 @@ class Documents extends DolibarrApi if ($result <= 0) { throw new RestException(500, 'Error generating document'); } - } - elseif ($modulepart == 'propal' || $modulepart == 'proposal') - { + } elseif ($modulepart == 'propal' || $modulepart == 'proposal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $this->propal = new Propal($this->db); $result = $this->propal->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); @@ -236,8 +228,7 @@ class Documents extends DolibarrApi $filename = basename($original_file); $original_file_osencoded = dol_osencode($original_file); // New file name encoded in OS encoding charset - if (!file_exists($original_file_osencoded)) - { + if (!file_exists($original_file_osencoded)) { throw new RestException(404, 'File not found'); } @@ -278,8 +269,7 @@ class Documents extends DolibarrApi $recursive = 0; $type = 'files'; - if ($modulepart == 'societe' || $modulepart == 'thirdparty') - { + if ($modulepart == 'societe' || $modulepart == 'thirdparty') { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; if (!DolibarrApiAccess::$user->rights->societe->lire) { @@ -293,9 +283,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->societe->multidir_output[$object->entity]."/".$object->id; - } - elseif ($modulepart == 'user') - { + } elseif ($modulepart == 'user') { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // Can get doc if has permission to read all user or if it is user itself @@ -310,9 +298,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->user->dir_output.'/'.get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id; - } - elseif ($modulepart == 'adherent' || $modulepart == 'member') - { + } elseif ($modulepart == 'adherent' || $modulepart == 'member') { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; if (!DolibarrApiAccess::$user->rights->adherent->lire) { @@ -326,9 +312,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->adherent->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'member'); - } - elseif ($modulepart == 'propal' || $modulepart == 'proposal') - { + } elseif ($modulepart == 'propal' || $modulepart == 'proposal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; if (!DolibarrApiAccess::$user->rights->propal->lire) { @@ -342,9 +326,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal'); - } - elseif ($modulepart == 'commande' || $modulepart == 'order') - { + } elseif ($modulepart == 'commande' || $modulepart == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; if (!DolibarrApiAccess::$user->rights->commande->lire) { @@ -358,9 +340,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->commande->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'commande'); - } - elseif ($modulepart == 'shipment' || $modulepart == 'expedition') - { + } elseif ($modulepart == 'shipment' || $modulepart == 'expedition') { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; if (!DolibarrApiAccess::$user->rights->expedition->lire) { @@ -374,9 +354,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->expedition->dir_output."/sending/".get_exdir(0, 0, 0, 1, $object, 'shipment'); - } - elseif ($modulepart == 'facture' || $modulepart == 'invoice') - { + } elseif ($modulepart == 'facture' || $modulepart == 'invoice') { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (!DolibarrApiAccess::$user->rights->facture->lire) { @@ -390,9 +368,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->facture->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'invoice'); - } - elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') - { + } elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { $modulepart = 'supplier_invoice'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; @@ -408,9 +384,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->fournisseur->dir_output."/facture/".get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').dol_sanitizeFileName($object->ref); - } - elseif ($modulepart == 'produit' || $modulepart == 'product') - { + } elseif ($modulepart == 'produit' || $modulepart == 'product') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; if (!DolibarrApiAccess::$user->rights->produit->lire) { @@ -426,9 +400,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); - } - elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') - { + } elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; if (!DolibarrApiAccess::$user->rights->agenda->myactions->read && !DolibarrApiAccess::$user->rights->agenda->allactions->read) { @@ -442,9 +414,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); - } - elseif ($modulepart == 'expensereport') - { + } elseif ($modulepart == 'expensereport') { require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; if (!DolibarrApiAccess::$user->rights->expensereport->read && !DolibarrApiAccess::$user->rights->expensereport->read) { @@ -458,9 +428,7 @@ class Documents extends DolibarrApi } $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref); - } - elseif ($modulepart == 'categorie' || $modulepart == 'category') - { + } elseif ($modulepart == 'categorie' || $modulepart == 'category') { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; if (!DolibarrApiAccess::$user->rights->categorie->lire) { @@ -523,9 +491,9 @@ class Documents extends DolibarrApi * @throws RestException */ /* - public function get($id) { - return array('note'=>'xxx'); - }*/ + public function get($id) { + return array('note'=>'xxx'); + }*/ /** @@ -557,12 +525,11 @@ class Documents extends DolibarrApi global $db, $conf; /*var_dump($modulepart); - var_dump($filename); - var_dump($filecontent); - exit;*/ + var_dump($filename); + var_dump($filecontent); + exit;*/ - if (empty($modulepart)) - { + if (empty($modulepart)) { throw new RestException(400, 'Modulepart not provided.'); } @@ -571,41 +538,39 @@ class Documents extends DolibarrApi } $newfilecontent = ''; - if (empty($fileencoding)) $newfilecontent = $filecontent; - if ($fileencoding == 'base64') $newfilecontent = base64_decode($filecontent); + if (empty($fileencoding)) { + $newfilecontent = $filecontent; + } + if ($fileencoding == 'base64') { + $newfilecontent = base64_decode($filecontent); + } $original_file = dol_sanitizeFileName($filename); // Define $uploadir $object = null; $entity = DolibarrApiAccess::$user->entity; - if (empty($entity)) $entity = 1; + if (empty($entity)) { + $entity = 1; + } - if ($ref) - { + if ($ref) { $tmpreldir = ''; - if ($modulepart == 'facture' || $modulepart == 'invoice') - { + if ($modulepart == 'facture' || $modulepart == 'invoice') { $modulepart = 'facture'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object = new Facture($this->db); - } - elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') - { + } elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { $modulepart = 'supplier_invoice'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object = new FactureFournisseur($this->db); - } - elseif ($modulepart == 'project') - { + } elseif ($modulepart == 'project') { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object = new Project($this->db); - } - elseif ($modulepart == 'task' || $modulepart == 'project_task') - { + } elseif ($modulepart == 'task' || $modulepart == 'project_task') { $modulepart = 'project_task'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; @@ -614,36 +579,26 @@ class Documents extends DolibarrApi $task_result = $object->fetch('', $ref); // Fetching the tasks project is required because its out_dir might be a sub-directory of the project - if ($task_result > 0) - { + if ($task_result > 0) { $project_result = $object->fetch_projet(); - if ($project_result >= 0) - { + if ($project_result >= 0) { $tmpreldir = dol_sanitizeFileName($object->project->ref).'/'; } } else { throw new RestException(500, 'Error while fetching Task '.$ref); } - } - elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') - { + } elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $object = new Product($this->db); - } - elseif ($modulepart == 'expensereport') - { + } elseif ($modulepart == 'expensereport') { require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object = new ExpenseReport($this->db); - } - elseif ($modulepart == 'adherent' || $modulepart == 'member') - { + } elseif ($modulepart == 'adherent' || $modulepart == 'member') { $modulepart = 'adherent'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $object = new Adherent($this->db); - } - elseif ($modulepart == 'proposal' || $modulepart == 'propal' || $modulepart == 'propale') - { + } elseif ($modulepart == 'proposal' || $modulepart == 'propal' || $modulepart == 'propale') { $modulepart = 'propale'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object = new Propal($this->db); @@ -652,22 +607,18 @@ class Documents extends DolibarrApi throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); } - if (is_object($object)) - { + if (is_object($object)) { $result = $object->fetch('', $ref); - if ($result == 0) - { + if ($result == 0) { throw new RestException(404, "Object with ref '".$ref."' was not found."); - } - elseif ($result < 0) - { + } elseif ($result < 0) { throw new RestException(500, 'Error while fetching object: '.$object->error); } } if (!($object->id > 0)) { - throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found."); + throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found."); } // Special cases that need to use get_exdir to get real dir of object @@ -681,13 +632,16 @@ class Documents extends DolibarrApi $tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write'); $upload_dir = $tmp['original_file']; // No dirname here, tmp['original_file'] is already the dir because dol_check_secure_access_document was called with param original_file that is only the dir - if (empty($upload_dir) || $upload_dir == '/') - { + if (empty($upload_dir) || $upload_dir == '/') { throw new RestException(500, 'This value of modulepart ('.$modulepart.') does not support yet usage of ref. Check modulepart parameter or try to use subdir parameter instead of ref.'); } } else { - if ($modulepart == 'invoice') $modulepart = 'facture'; - if ($modulepart == 'member') $modulepart = 'adherent'; + if ($modulepart == 'invoice') { + $modulepart = 'facture'; + } + if ($modulepart == 'member') { + $modulepart = 'adherent'; + } $relativefile = $subdir; $tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, '', 'write'); @@ -771,12 +725,12 @@ class Documents extends DolibarrApi // Special cases that need to use get_exdir to get real dir of object // If future, all object should use this to define path of documents. /* - $tmpreldir = ''; - if ($modulepart == 'supplier_invoice') { - $tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier'); - } + $tmpreldir = ''; + if ($modulepart == 'supplier_invoice') { + $tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier'); + } - $relativefile = $tmpreldir.dol_sanitizeFileName($object->ref); */ + $relativefile = $tmpreldir.dol_sanitizeFileName($object->ref); */ $relativefile = $original_file; $check_access = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, '', 'read'); @@ -794,8 +748,7 @@ class Documents extends DolibarrApi $filename = basename($original_file); $original_file_osencoded = dol_osencode($original_file); // New file name encoded in OS encoding charset - if (!file_exists($original_file_osencoded)) - { + if (!file_exists($original_file_osencoded)) { dol_syslog("Try to download not found file ".$original_file_osencoded, LOG_WARNING); throw new RestException(404, 'File not found'); } @@ -825,8 +778,9 @@ class Documents extends DolibarrApi // phpcs:enable $result = array(); foreach (Documents::$DOCUMENT_FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $result[$field] = $data[$field]; } return $result; diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 17d8916b9aa..7afdb74b89d 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -31,8 +31,13 @@ class Login */ public function __construct() { - global $db; + global $conf, $db; $this->db = $db; + + //$conf->global->MAIN_MODULE_API_LOGIN_DISABLED = 1; + if (!empty($conf->global->MAIN_MODULE_API_LOGIN_DISABLED)) { + throw new RestException(403, "Error login APIs are disabled. You must get the token from backoffice to be able to use APIs"); + } } /** @@ -52,23 +57,51 @@ class Login * @throws RestException 500 System error * * @url GET / + */ + public function loginUnsecured($login, $password, $entity = '', $reset = 0) + { + return $this->index($login, $password, $entity, $reset); + } + + /** + * 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 token (DOLAPIKEY) can be found/set on the user page. + * + * @param string $login User login + * @param string $password User password + * @param string $entity Entity (when multicompany module is used). '' means 1=first company. + * @param int $reset Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access) + * @return array Response status and user token + * + * @throws RestException 403 Access denied + * @throws RestException 500 System error + * * @url POST / */ public function index($login, $password, $entity = '', $reset = 0) { global $conf, $dolibarr_main_authentication, $dolibarr_auto_user; - // TODO Remove the API login. The token must be generated from backoffice only. + // Is the login API disabled ? The token must be generated from backoffice only. + if (! empty($conf->global->API_DISABLE_LOGIN_API)) { + dol_syslog("Warning: A try to use the login API has been done while the login API is disabled. You must generate or get the token from the backoffice.", LOG_WARNING); + throw new RestException(403, "Error, the login API has been disabled for security purpose. You must generate or get the token from the backoffice."); + } // Authentication mode - if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'dolibarr'; + if (empty($dolibarr_main_authentication)) { + $dolibarr_main_authentication = 'dolibarr'; + } // Authentication mode: forceuser - if ($dolibarr_main_authentication == 'forceuser') - { - if (empty($dolibarr_auto_user)) $dolibarr_auto_user = 'auto'; - if ($dolibarr_auto_user != $login) - { + if ($dolibarr_main_authentication == 'forceuser') { + if (empty($dolibarr_auto_user)) { + $dolibarr_auto_user = 'auto'; + } + if ($dolibarr_auto_user != $login) { dol_syslog("Warning: your instance is set to use the automatic forced login '".$dolibarr_auto_user."' that is not the requested login. API usage is forbidden in this mode."); throw new RestException(403, "Your instance is set to use the automatic login '".$dolibarr_auto_user."' that is not the requested login. API usage is forbidden in this mode."); } @@ -77,16 +110,16 @@ class Login // Set authmode $authmode = explode(',', $dolibarr_main_authentication); - if ($entity != '' && !is_numeric($entity)) - { + if ($entity != '' && !is_numeric($entity)) { throw new RestException(403, "Bad value for entity, must be the numeric ID of company."); } - if ($entity == '') $entity = 1; + if ($entity == '') { + $entity = 1; + } include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api'); - if (empty($login)) - { + $login = checkLoginPassEntity($login, $password, $entity, $authmode, 'api'); // Check credentials. + if (empty($login)) { throw new RestException(403, 'Access denied'); } @@ -94,17 +127,14 @@ class Login $tmpuser = new User($this->db); $tmpuser->fetch(0, $login, 0, 0, $entity); - if (empty($tmpuser->id)) - { + if (empty($tmpuser->id)) { throw new RestException(500, 'Failed to load user'); } // Renew the hash - if (empty($tmpuser->api_key) || $reset) - { + if (empty($tmpuser->api_key) || $reset) { $tmpuser->getrights(); - if (empty($tmpuser->rights->user->self->creer)) - { + if (empty($tmpuser->rights->user->self->creer)) { throw new RestException(403, 'User need write permission on itself to reset its API token'); } @@ -118,8 +148,7 @@ class Login dol_syslog(get_class($this)."::login", LOG_DEBUG); // No log $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { throw new RestException(500, 'Error when updating api_key for user :'.$this->db->lasterror()); } } else { diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 85a45e9ff45..ceaf5f8f7d8 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2016 Laurent Destailleur * Copyright (C) 2017 Regis Houssin * Copyright (C) 2017 Neil Orley - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2018-2020 Thibault FOUCART * * @@ -73,7 +73,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, libelle as label, module"; $sql .= " FROM ".MAIN_DB_PREFIX."c_input_method as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -136,7 +136,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, label, module"; $sql .= " FROM ".MAIN_DB_PREFIX."c_input_reason as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -310,7 +310,7 @@ class Setup extends DolibarrApi * Get state by ID. * * @param int $id ID of state - * @return array Array of cleaned object properties + * @return array Array of cleaned object properties * * @url GET dictionary/states/{id} * @@ -539,7 +539,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, label"; $sql .= " FROM ".MAIN_DB_PREFIX."c_availability as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -624,63 +624,6 @@ class Setup extends DolibarrApi } } - /** - * 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 as label, 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. @@ -705,7 +648,7 @@ class Setup extends DolibarrApi $sql = "SELECT id, code, type, libelle as label, module"; $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); if ($type) { $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; } @@ -771,7 +714,7 @@ class Setup extends DolibarrApi $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; + $sql .= " WHERE t.active = ".((int) $active); if ($module) { $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; } @@ -835,7 +778,7 @@ class Setup extends DolibarrApi $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; + $sql .= " WHERE t.active = ".((int) $active); if ($type) { $sql .= " AND type LIKE '%".$this->db->escape($type)."%'"; } @@ -900,7 +843,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, label, module"; $sql .= " FROM ".MAIN_DB_PREFIX."c_civility as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); if ($module) { $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; } @@ -968,7 +911,7 @@ class Setup extends DolibarrApi $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; + $sql .= " WHERE t.active = ".((int) $active); if (!empty($multicurrency)) { $sql .= " AND m.entity IN (".getEntity('multicurrency').")"; if (!empty($multicurrency) && $multicurrency != 2) { @@ -1299,7 +1242,7 @@ class Setup extends DolibarrApi //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; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -1422,7 +1365,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, pos, label, use_default, description"; $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as t"; - $sql .= " WHERE t.active = ".$active; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -1480,7 +1423,7 @@ class Setup extends DolibarrApi $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; + $sql .= " WHERE t.active = ".((int) $active); // Add sql filters if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -1688,8 +1631,8 @@ class Setup extends DolibarrApi 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(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK'); + && (empty($conf->global->API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK)) { + throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_INTEGRITY_CHECK'); } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1704,8 +1647,8 @@ class Setup extends DolibarrApi $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; + $xmlshortfile = dol_sanitizeFileName(GETPOST('xmlshortfile', 'alpha') ? GETPOST('xmlshortfile', 'alpha') : 'filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT)); + $xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile; // Remote file to compare to $xmlremote = ($target == 'default' ? '' : $target); if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) { @@ -1718,6 +1661,14 @@ class Setup extends DolibarrApi if (empty($xmlremote)) { $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; } + if ($xmlremote && !preg_match('/^https?:\/\//i', $xmlremote)) { + $langs->load("errors"); + throw new RestException(500, $langs->trans("ErrorURLMustStartWithHttp", $xmlremote)); + } + if ($xmlremote && !preg_match('/\.xml$/', $xmlremote)) { + $langs->load("errors"); + throw new RestException(500, $langs->trans("ErrorURLMustEndWith", $xmlremote, '.xml')); + } if ($target == 'local') { if (dol_is_file($xmlfile)) { @@ -1726,7 +1677,7 @@ class Setup extends DolibarrApi throw new RestException(500, $langs->trans('XmlNotFound').': '.$xmlfile); } } else { - $xmlarray = getURLContent($xmlremote); + $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into filecheck.php. // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') { @@ -1734,7 +1685,7 @@ class Setup extends DolibarrApi //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']; + $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg']; throw new RestException(500, $errormsg); } } @@ -1986,8 +1937,8 @@ class Setup extends DolibarrApi global $conf; if (!DolibarrApiAccess::$user->admin - && (empty($conf->global->API_LOGIN_ALLOWED_FOR_GET_MODULES) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_GET_MODULES)) { - throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGIN_ALLOWED_FOR_GET_MODULES'); + && (empty($conf->global->API_LOGINS_ALLOWED_FOR_GET_MODULES) || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_GET_MODULES)) { + throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_GET_MODULES'); } sort($conf->modules); diff --git a/htdocs/api/class/index.html b/htdocs/api/class/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/api/class/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 2c85533fd11..c494730f795 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Laurent Destailleur * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2021 Alexis LAURIER * * 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,22 +27,48 @@ use Luracast\Restler\Format\UploadFormat; -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test -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("NOSESSION")) define("NOSESSION", '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test +} +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("NOSESSION")) { + define("NOSESSION", '1'); +} // Force entity if a value is provided into HTTP header. Otherwise, will use the entity of user of token used. -if (!empty($_SERVER['HTTP_DOLAPIENTITY'])) define("DOLENTITY", (int) $_SERVER['HTTP_DOLAPIENTITY']); +if (!empty($_SERVER['HTTP_DOLAPIENTITY'])) { + define("DOLENTITY", (int) $_SERVER['HTTP_DOLAPIENTITY']); +} +// When we request url to get the json file, we accept Cross site so we can include the descriptor into an external tool. +if (preg_match('/\/explorer\/swagger\.json/', $_SERVER["PHP_SELF"])) { + header('Access-Control-Allow-Origin: *'); + header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); + header('Access-Control-Allow-Headers: Content-Type, Authorization, api_key, DOLAPIKEY'); +} $res = 0; -if (!$res && file_exists("../main.inc.php")) $res = include '../main.inc.php'; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = include '../main.inc.php'; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; @@ -61,16 +88,14 @@ if (preg_match('/api\/index\.php$/', $url)) { // sometimes $_SERVER['PHP_SELF'] $url = $_SERVER['PHP_SELF'].$_SERVER['PATH_INFO']; } // Fix for some NGINX setups (this should not be required even with NGINX, however setup of NGINX are often mysterious and this may help is such cases) -if (!empty($conf->global->MAIN_NGINX_FIX)) -{ +if (!empty($conf->global->MAIN_NGINX_FIX)) { $url = (isset($_SERVER['SCRIPT_URI']) && $_SERVER["SCRIPT_URI"] !== null) ? $_SERVER["SCRIPT_URI"] : $_SERVER['PHP_SELF']; } // Enable and test if module Api is enabled -if (empty($conf->global->MAIN_MODULE_API)) -{ +if (empty($conf->global->MAIN_MODULE_API)) { $langs->load("admin"); - dol_syslog("Call Dolibarr API interfaces with module REST disabled"); + dol_syslog("Call of Dolibarr API interfaces with module API REST are disabled"); print $langs->trans("WarningModuleNotActive", 'Api').'.

    '; print $langs->trans("ToActivateModule"); //session_destroy(); @@ -78,8 +103,7 @@ if (empty($conf->global->MAIN_MODULE_API)) } // Test if explorer is not disabled -if (preg_match('/api\/index\.php\/explorer/', $url) && !empty($conf->global->API_EXPLORER_DISABLED)) -{ +if (preg_match('/api\/index\.php\/explorer/', $url) && !empty($conf->global->API_EXPLORER_DISABLED)) { $langs->load("admin"); dol_syslog("Call Dolibarr API interfaces with module REST disabled"); print $langs->trans("WarningAPIExplorerDisabled").'.

    '; @@ -112,8 +136,7 @@ preg_match('/index\.php\/([^\/]+)(.*)$/', $url, $reg); // using the explorer. And when we make another call for another API, the API is not into the api/temp/routes.php and a 404 is returned. // So we force refresh to each call. $refreshcache = (empty($conf->global->API_PRODUCTION_DO_NOT_ALWAYS_REFRESH_CACHE) ? true : false); -if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) -{ +if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) { $refreshcache = true; } @@ -132,12 +155,10 @@ UploadFormat::$allowedMimeTypes = array('image/jpeg', 'image/png', 'text/plain', // Restrict API to some IPs -if (!empty($conf->global->API_RESTRICT_ON_IP)) -{ +if (!empty($conf->global->API_RESTRICT_ON_IP)) { $allowedip = explode(' ', $conf->global->API_RESTRICT_ON_IP); $ipremote = getUserRemoteIP(); - if (!in_array($ipremote, $allowedip)) - { + if (!in_array($ipremote, $allowedip)) { dol_syslog('Remote ip is '.$ipremote.', not into list '.$conf->global->API_RESTRICT_ON_IP); print 'APIs are not allowed from the IP '.$ipremote; header('HTTP/1.1 503 API not allowed from your IP '.$ipremote); @@ -148,65 +169,69 @@ if (!empty($conf->global->API_RESTRICT_ON_IP)) // Call Explorer file for all APIs definitions (this part is slow) -if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) -{ +if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $reg[2] == '/swagger.json/root' || $reg[2] == '/resources.json' || $reg[2] == '/resources.json/root')) { // Scan all API files to load them $listofapis = array(); $modulesdir = dolGetModulesDirs(); - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { // Search available module dol_syslog("Scan directory ".$dir." for module descriptor files, then search for API files"); $handle = @opendir(dol_osencode($dir)); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { $regmod = array(); - if (is_readable($dir.$file) && preg_match("/^mod(.*)\.class\.php$/i", $file, $regmod)) - { + if (is_readable($dir.$file) && preg_match("/^mod(.*)\.class\.php$/i", $file, $regmod)) { $module = strtolower($regmod[1]); $moduledirforclass = getModuleDirForApiClass($module); $modulenameforenabled = $module; - if ($module == 'propale') { $modulenameforenabled = 'propal'; } - if ($module == 'supplierproposal') { $modulenameforenabled = 'supplier_proposal'; } - if ($module == 'ficheinter') { $modulenameforenabled = 'ficheinter'; } + if ($module == 'propale') { + $modulenameforenabled = 'propal'; + } + if ($module == 'supplierproposal') { + $modulenameforenabled = 'supplier_proposal'; + } + if ($module == 'ficheinter') { + $modulenameforenabled = 'ficheinter'; + } dol_syslog("Found module file ".$file." - module=".$module." - modulenameforenabled=".$modulenameforenabled." - moduledirforclass=".$moduledirforclass); // Defined if module is enabled $enabled = true; - if (empty($conf->$modulenameforenabled->enabled)) $enabled = false; + if (empty($conf->$modulenameforenabled->enabled)) { + $enabled = false; + } - if ($enabled) - { + if ($enabled) { // If exists, load the API class for enable module // Search files named api_.class.php into /htdocs//class directory // @todo : use getElementProperties() function ? $dir_part = dol_buildpath('/'.$moduledirforclass.'/class/'); $handle_part = @opendir(dol_osencode($dir_part)); - if (is_resource($handle_part)) - { - while (($file_searched = readdir($handle_part)) !== false) - { - if ($file_searched == 'api_access.class.php') continue; + if (is_resource($handle_part)) { + while (($file_searched = readdir($handle_part)) !== false) { + if ($file_searched == 'api_access.class.php') { + continue; + } + + //$conf->global->MAIN_MODULE_API_LOGIN_DISABLED = 1; + if ($file_searched == 'api_login.class.php' && !empty($conf->global->MAIN_MODULE_API_LOGIN_DISABLED)) { + continue; + } $regapi = array(); - if (is_readable($dir_part.$file_searched) && preg_match("/^api_(.*)\.class\.php$/i", $file_searched, $regapi)) - { + if (is_readable($dir_part.$file_searched) && preg_match("/^api_(.*)\.class\.php$/i", $file_searched, $regapi)) { $classname = ucwords($regapi[1]); $classname = str_replace('_', '', $classname); require_once $dir_part.$file_searched; - if (class_exists($classname.'Api')) - { + if (class_exists($classname.'Api')) { //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 { @@ -224,8 +249,7 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $ // Sort the classes before adding them to Restler. // The Restler API Explorer shows the classes in the order they are added and it's a mess if they are not sorted. asort($listofapis); - foreach ($listofapis as $apiname => $classname) - { + foreach ($listofapis as $apiname => $classname) { $api->r->addAPIClass($classname, $apiname); } //var_dump($api->r); @@ -233,11 +257,9 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $ // Call one APIs or one definition of an API $regbis = array(); -if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && $reg[2] != '/resources.json' && preg_match('/^\/(swagger|resources)\.json\/(.+)$/', $reg[2], $regbis) && $regbis[2] != 'root'))) -{ +if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && $reg[2] != '/resources.json' && preg_match('/^\/(swagger|resources)\.json\/(.+)$/', $reg[2], $regbis) && $regbis[2] != 'root'))) { $moduleobject = $reg[1]; - if ($moduleobject == 'explorer') // If we call page to explore details of a service - { + if ($moduleobject == 'explorer') { // If we call page to explore details of a service $moduleobject = $regbis[2]; } @@ -248,31 +270,61 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && dol_syslog("Load a dedicated API file moduleobject=".$moduleobject." moduledirforclass=".$moduledirforclass); $tmpmodule = $moduleobject; - if ($tmpmodule != 'api') + if ($tmpmodule != 'api') { $tmpmodule = preg_replace('/api$/i', '', $tmpmodule); + } $classfile = str_replace('_', '', $tmpmodule); // Special cases that does not match name rules conventions - if ($moduleobject == 'supplierproposals') + if ($moduleobject == 'supplierproposals') { $classfile = 'supplier_proposals'; - if ($moduleobject == 'supplierorders') + } + if ($moduleobject == 'supplierorders') { $classfile = 'supplier_orders'; - if ($moduleobject == 'supplierinvoices') + } + if ($moduleobject == 'supplierinvoices') { $classfile = 'supplier_invoices'; - if ($moduleobject == 'ficheinter') + } + if ($moduleobject == 'ficheinter') { $classfile = 'interventions'; - if ($moduleobject == 'interventions') + } + if ($moduleobject == 'interventions') { $classfile = 'interventions'; + } $dir_part_file = dol_buildpath('/'.$moduledirforclass.'/class/api_'.$classfile.'.class.php', 0, 2); $classname = ucwords($moduleobject); + // Test rules on endpoints. For example: + // $conf->global->API_ENDPOINT_RULES = 'endpoint1:1,endpoint2:1,...' + if (!empty($conf->global->API_ENDPOINT_RULES)) { + $listofendpoints = explode(',', $conf->global->API_ENDPOINT_RULES); + $endpointisallowed = false; + + foreach ($listofendpoints as $endpointrule) { + $tmparray = explode(':', $endpointrule); + if ($classfile == $tmparray[0] && $tmparray[1] == 1) { + $endpointisallowed = true; + break; + } + } + + if (! $endpointisallowed) { + dol_syslog('The API with endpoint /'.$classfile.' is forbidden by config API_ENDPOINT_RULES', LOG_WARNING); + print 'The API with endpoint /'.$classfile.' is forbidden by config API_ENDPOINT_RULES'; + header('HTTP/1.1 501 API is forbidden by API_ENDPOINT_RULES'); + //session_destroy(); + exit(0); + } + } + dol_syslog('Search api file /'.$moduledirforclass.'/class/api_'.$classfile.'.class.php => dir_part_file='.$dir_part_file.' classname='.$classname); $res = false; - if ($dir_part_file) + if ($dir_part_file) { $res = include_once $dir_part_file; + } if (!$res) { dol_syslog('Failed to make include_once '.$dir_part_file, LOG_WARNING); print 'API not found (failed to include API file)'; @@ -281,20 +333,37 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && exit(0); } - if (class_exists($classname)) + if (class_exists($classname)) { $api->r->addAPIClass($classname); + } } //var_dump($api->r->apiVersionMap); //exit; +// We do not want that restler outputs data if we use native compression (default behaviour) but we want to have it returned into a string. +Luracast\Restler\Defaults::$returnResponse = (empty($conf->global->API_DISABLE_COMPRESSION) && !empty($_SERVER['HTTP_ACCEPT_ENCODING'])); + // Call API (we suppose we found it). // The handle will use the file api/temp/routes.php to get data to run the API. If the file exists and the entry for API is not found, it will return 404. +$result = $api->r->handle(); -//Luracast\Restler\Defaults::$returnResponse = true; -//print $api->r->handle(); +if (Luracast\Restler\Defaults::$returnResponse) { + // We try to compress data + if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'br') !== false && is_callable('brotli_compress')) { + header('Content-Encoding: br'); + $result = brotli_compress($result, 11, BROTLI_TEXT); + } elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'bz') !== false && is_callable('bzcompress')) { + header('Content-Encoding: bz'); + $result = bzcompress($result, 9); + } elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && is_callable('gzencode')) { + header('Content-Encoding: gzip'); + $result = gzencode($result, 9); + } -$api->r->handle(); + // Restler did not output data yet, we return it now + echo $result; +} //session_destroy(); diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index 3334610b927..9a68f99fe06 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -35,13 +35,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'don'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -74,8 +78,7 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; @@ -88,8 +91,7 @@ if ($action != 'create' && $action != 'edit') /* */ /* ************************************************************************** */ -if ($action == 'create') -{ +if ($action == 'create') { print "
    "; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,8 +103,7 @@ if ($action == 'create') /* Edit optional field */ /* */ /* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index e17d421437d..165361f7f57 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -34,13 +34,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'adherent_type'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -72,35 +76,22 @@ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 42a5888c537..c6cd45a0cc5 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -32,7 +32,9 @@ global $langs, $user; $langs->loadLangs(array("admin", "assets")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -63,8 +65,7 @@ $head = asset_admin_prepare_head(); print dol_get_fiche_head($head, 'settings', $langs->trans("Assets"), -1, 'generic'); -if ($action == 'edit') -{ +if ($action == 'edit') { print '
    '; print ''; print ''; @@ -72,8 +73,7 @@ if ($action == 'edit') print '
    '; - print img_object('', $params['picto']); + print img_object('', $params['picto'], 'class="pictofixedwidth"'); print ' '.$langs->trans('desc'.$key); if (!empty($params['warning'])) { diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php new file mode 100755 index 00000000000..c0b4055ba5b --- /dev/null +++ b/htdocs/admin/workstation.php @@ -0,0 +1,493 @@ + + * Copyright (C) 2020 Gauthier VERDOL + * + * 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/workstation.php + * \ingroup workstation + * \brief Workstation setup page. + */ + +// Load Dolibarr environment +require "../main.inc.php"; + +// Libraries +require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php"; +require_once DOL_DOCUMENT_ROOT . '/workstation/lib/workstation.lib.php'; +//require_once "../class/myclass.class.php"; + +// Translations +$langs->loadLangs(array("admin", "workstation")); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +$value = GETPOST('value', 'alpha'); + +/*$arrayofparameters = array( + 'WORKSTATION_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1), + 'WORKSTATION_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) +);*/ + +$error = 0; +$setupnotempty = 0; + + +/* + * Actions + */ + +if ((float) DOL_VERSION >= 6) { + include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; +} + +if ($action == 'updateMask') { + $maskconstorder = GETPOST('maskconstWorkstation', 'alpha'); + $maskorder = GETPOST('maskWorkstation', 'alpha'); + + if ($maskconstorder) { + $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + } + + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'specimen') { + $modele = GETPOST('module', 'alpha'); + $tmpobjectkey = GETPOST('object'); + + $tmpobject = new $tmpobjectkey($db); + $tmpobject->initAsSpecimen(); + + // Search template files + $file = ''; $classname = ''; $filefound = 0; + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $file = dol_buildpath($reldir."core/modules/workstation/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); + if (file_exists($file)) { + $filefound = 1; + $classname = "pdf_".$modele; + break; + } + } + + if ($filefound) { + require_once $file; + + $module = new $classname($db); + + if ($module->write_file($tmpobject, $langs) > 0) { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); + return; + } else { + setEventMessages($module->error, null, 'errors'); + dol_syslog($module->error, LOG_ERR); + } + } else { + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } +} elseif ($action == 'set') { + // Activate a model + $ret = addDocumentModel($value, $type, $label, $scandir); +} elseif ($action == 'del') { + $tmpobjectkey = GETPOST('object'); + + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $constforval = strtoupper($tmpobjectkey).'_ADDON_PDF'; + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } + } +} elseif ($action == 'setdoc') { + // Set default model + $tmpobjectkey = GETPOST('object'); + $constforval = strtoupper($tmpobjectkey).'_ADDON_PDF'; + if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { + // The constant that was read before the new set + // We therefore requires a variable to have a coherent view + $conf->global->$constforval = $value; + } + + // On active le modele + $ret = delDocumentModel($value, $type); + if ($ret > 0) { + $ret = addDocumentModel($value, $type, $label, $scandir); + } +} elseif ($action == 'setmod') { + // TODO Check if numbering module chosen can be activated + // by calling method canBeActivated + $tmpobjectkey = GETPOST('object'); + $constforval = 'WORKSTATION_'.strtoupper($tmpobjectkey)."_ADDON"; + dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); +} + + + +/* + * View + */ + +$form = new Form($db); + +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + +$page_name = "WorkstationSetup"; +llxHeader('', $langs->trans($page_name)); + +// Subheader +$linkback = ''.$langs->trans("BackToModuleList").''; + +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_workstation@workstation'); + +// Configuration header +$head = workstationAdminPrepareHead(); +print dol_get_fiche_head($head, 'settings', '', -1, "workstation@workstation"); + +// Setup page goes here +//echo ''.$langs->trans("WorkstationSetupPage").'

    '; + + +if ($action == 'edit') { + print ''; + print ''; + print ''; + + print ''; + print ''; + + foreach ($arrayofparameters as $key => $val) { + print ''; + } + print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; + $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); + print $form->textwithpicto($langs->trans($key), $tooltiphelp); + print '
    '; + + print '
    '; + print ''; + print '
    '; + + print ''; + print '
    '; +} else { + if (!empty($arrayofparameters)) { + print ''; + print ''; + + foreach ($arrayofparameters as $key => $val) { + $setupnotempty++; + + print ''; + } + + print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; + $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); + print $form->textwithpicto($langs->trans($key), $tooltiphelp); + print ''.$conf->global->$key.'
    '; + + print '
    '; + print ''.$langs->trans("Modify").''; + print '
    '; + }/* else { + print '
    '.$langs->trans("NothingToSetup"); + }*/ +} + + +$moduledir = 'workstation'; +$myTmpObjects = array(); +$myTmpObjects['workstation'] = array('includerefgeneration'=>1, 'includedocgeneration'=>0); + + +foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'MyObject') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + /* + * Orders Numbering model + */ + $setupnotempty++; + + print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', ''); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''."\n"; + + clearstatcache(); + + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/".$moduledir); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { + $file = substr($file, 0, dol_strlen($file) - 4); + + require_once $dir.'/'.$file.'.php'; + + $module = new $file($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } + + if ($module->isEnabled()) { + dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); + + print ''; + + // Show example of numbering model + print ''."\n"; + + print ''; + + $mytmpinstance = new $myTmpObjectKey($db); + $mytmpinstance->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
    '; + + $nextval = $module->getNextValue($mytmpinstance); + 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 "\n"; + } + } + } + closedir($handle); + } + } + } + print "
    '.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
    '.$module->name."\n"; + print $module->info(); + print ''; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) { + $langs->load("errors"); + print '
    '.$langs->trans($tmp).'
    '; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } + print '
    '; + $constforvar = 'WORKSTATION_'.strtoupper($myTmpObjectKey).'_ADDON'; + if ($conf->global->$constforvar == $file) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '

    \n"; + } + + if ($myTmpObjectArray['includedocgeneration']) { + /* + * Document templates generators + */ + $setupnotempty++; + $type = strtolower($myTmpObjectKey); + + print load_fiche_titre($langs->trans("DocumentModules", $myTmpObjectKey), '', ''); + + // Load array def with activated templates + $def = array(); + $sql = "SELECT nom"; + $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; + $sql .= " WHERE type = '".$db->escape($type)."'"; + $sql .= " AND entity = ".$conf->entity; + $resql = $db->query($sql); + if ($resql) { + $i = 0; + $num_rows = $db->num_rows($resql); + while ($i < $num_rows) { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } + } else { + dol_print_error($db); + } + + print "\n"; + print "\n"; + print ''; + print ''; + print '\n"; + print '\n"; + print ''; + print ''; + print "\n"; + + clearstatcache(); + + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { + $realpath = $reldir."core/modules/".$moduledir.$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); + + 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); + + $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 ''; + + // Active + if (in_array($name, $def)) { + print ''; + } else { + print '"; + } + + // Default + 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; + + $htmltooltip .= '

    '.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
    '.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); + $htmltooltip .= '
    '.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } + } + + print '
    '.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
    '; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print "'; + $constforvar = 'WORKSTATION_'.strtoupper($myTmpObjectKey).'_ADDON'; + if ($conf->global->$constforvar == $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 ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + if ($module->type == 'pdf') { + print ''.img_object($langs->trans("Preview"), 'generic').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print '
    '; + } +} + +/*if (empty($setupnotempty)) { + print '
    '.$langs->trans("NothingToSetup"); +}*/ + +// Page end +print dol_get_fiche_end(); + +llxFooter(); +$db->close(); diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php deleted file mode 100644 index 835a5485544..00000000000 --- a/htdocs/api/admin/explorer.php +++ /dev/null @@ -1,221 +0,0 @@ - - * Copyright (C) 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 . - * - * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php. - */ - -/** - * \defgroup api Module DolibarrApi - * \brief API loader - * Search files htdocs//class/api_.class.php - * \file htdocs/api/admin/explorer.php - */ - -use Luracast\Restler\Routes; - -require_once '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; -require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; - -// Load translation files required by the page -$langs->load("admin"); - - -/* - * View - */ - -// Enable and test if module Api is enabled -if (empty($conf->global->MAIN_MODULE_API)) -{ - dol_syslog("Call Dolibarr API interfaces with module REST disabled"); - print $langs->trans("WarningModuleNotActive", 'Api').'.

    '; - print $langs->trans("ToActivateModule"); - exit; -} - - -$api = new DolibarrApi($db); - -$api->r->addAPIClass('Luracast\\Restler\\Resources'); //this creates resources.json at API Root -$api->r->setSupportedFormats('JsonFormat', 'XmlFormat'); -$api->r->addAuthenticationClass('DolibarrApiAccess', ''); - -$listofapis = array(); - -$modulesdir = dolGetModulesDirs(); -foreach ($modulesdir as $dir) -{ - /* - * Search available module - */ - //dol_syslog("Scan directory ".$dir." for API modules"); - - $handle = @opendir(dol_osencode($dir)); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) - { - $modulename = $reg[1]; - - // Defined if module is enabled - $enabled = true; - $module = $part = $obj = strtolower(preg_replace('/^mod/i', '', $modulename)); - //if ($part == 'propale') $part='propal'; - if ($module == 'societe') { - $obj = 'thirdparty'; - } - if ($module == 'categorie') { - $part = 'categories'; - $obj = 'category'; - } - if ($module == 'facture') { - $part = 'compta/facture'; - $obj = 'facture'; - } - if ($module == 'ficheinter') { - $obj = 'fichinter'; - $part = 'fichinter'; - $module = 'fichinter'; - } - - if (empty($conf->$module->enabled)) $enabled = false; - - if ($enabled) { - /* - * If exists, load the API class for enable module - * - * Search files named api_.class.php into /htdocs//class directory - * - * @todo : take care of externals module! - * @todo : use getElementProperties() function ? - */ - $dir_part = DOL_DOCUMENT_ROOT.'/'.$part.'/class/'; - - $handle_part = @opendir(dol_osencode($dir_part)); - if (is_resource($handle_part)) - { - while (($file_searched = readdir($handle_part)) !== false) - { - if (is_readable($dir_part.$file_searched) && preg_match("/^api_(.*)\.class\.php$/i", $file_searched, $reg)) - { - $classname = ucwords($reg[1]); - require_once $dir_part.$file_searched; - if (class_exists($classname)) - { - dol_syslog("Found API classname=".$classname." into ".$dir); - $listofapis[] = $classname; - } - } - - /* - if (is_readable($dir_part.$file_searched) && preg_match("/^(api_.*)\.class\.php$/i",$file_searched,$reg)) - { - $classname=$reg[1]; - $classname = str_replace('Api_','',ucwords($reg[1])).'Api'; - //$classname = str_replace('Api_','',ucwords($reg[1])); - $classname = ucfirst($classname); - require_once $dir_part.$file_searched; - - // if (class_exists($classname)) - // { - // dol_syslog("Found API classname=".$classname); - // $api->r->addAPIClass($classname,''); - - // require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php'; - // $tmpclass = new ReflectionClass($classname); - // try { - // $classMetadata = CommentParser::parse($tmpclass->getDocComment()); - // } catch (Exception $e) { - // throw new RestException(500, "Error while parsing comments of `$classname` class. " . $e->getMessage()); - // } - - // //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); - // } - }*/ - } - } - } - } - } - } -} - -//var_dump($listofapis); -$listofapis = Routes::toArray(); // @todo api for "status" is lost here -//var_dump($listofapis); - - -llxHeader(); - -$linkback = ''.$langs->trans("BackToModuleList").''; -print load_fiche_titre($langs->trans("ApiSetup"), $linkback, 'title_setup'); - -// 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 - -// Show message -print '
    '; -$message = ''; -$url = ''.$urlwithroot.'/api/index.php/login?login='.urlencode($user->login).'&password=yourpassword[&reset=1]'; -$message .= $langs->trans("UrlToGetKeyToUseAPIs").':
    '; -$message .= img_picto('', 'globe').' '.$url; -print $message; -print '
    '; -print '
    '; - -$oldclass = ''; - -print $langs->trans("ListOfAvailableAPIs").':
    '; -foreach ($listofapis['v1'] as $key => $val) -{ - if ($key == 'login') continue; - if ($key == 'index') continue; - - if ($key) - { - foreach ($val as $method => $val2) - { - $newclass = $val2['className']; - - if (preg_match('/restler/i', $newclass)) continue; - - if ($oldclass != $newclass) - { - print "\n
    \n".$langs->trans("Class").': '.$newclass.'
    '."\n"; - $oldclass = $newclass; - } - //print $key.' - '.$val['classname'].' - '.$val['fullpath']." - ".DOL_MAIN_URL_ROOT.'/api/index.php/'.strtolower(preg_replace('/Api$/','',$val['classname']))."/xxx
    \n"; - $url = $urlwithroot.'/api/index.php/'.$key; - $url .= '?api_key=token'; - print img_picto('', 'globe').' '.$method.' '.$url."
    \n"; - } - } -} - -print '
    '; -print '
    '; -print $langs->trans("OnlyActiveElementsAreExposed", DOL_URL_ROOT.'/admin/modules.php'); - - -llxFooter(); -$db->close(); diff --git a/htdocs/api/admin/explorer_withredoc.php b/htdocs/api/admin/explorer_withredoc.php new file mode 100644 index 00000000000..45dd31d57c9 --- /dev/null +++ b/htdocs/api/admin/explorer_withredoc.php @@ -0,0 +1,87 @@ + + * Copyright (C) 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 . + * + * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php. + */ + +/** + * \defgroup api Module DolibarrApi + * \brief API explorer using the swagger.json file + * \file htdocs/api/admin/explorer_withredoc.php + */ + +require_once '../../main.inc.php'; + +// Enable and test if module Api is enabled +if (empty($conf->global->MAIN_MODULE_API)) { + $langs->load("admin"); + dol_syslog("Call of Dolibarr API interfaces with module API REST are disabled"); + print $langs->trans("WarningModuleNotActive", 'Api').'.

    '; + print $langs->trans("ToActivateModule"); + //session_destroy(); + exit(0); +} + +// Test if explorer is not disabled +if (!empty($conf->global->API_EXPLORER_DISABLED)) { + $langs->load("admin"); + dol_syslog("Call Dolibarr API interfaces with module REST disabled"); + print $langs->trans("WarningAPIExplorerDisabled").'.

    '; + //session_destroy(); + exit(0); +} + +// Restrict API to some IPs +if (!empty($conf->global->API_RESTRICT_ON_IP)) { + $allowedip = explode(' ', $conf->global->API_RESTRICT_ON_IP); + $ipremote = getUserRemoteIP(); + if (!in_array($ipremote, $allowedip)) { + dol_syslog('Remote ip is '.$ipremote.', not into list '.$conf->global->API_RESTRICT_ON_IP); + print 'APIs are not allowed from the IP '.$ipremote; + header('HTTP/1.1 503 API not allowed from your IP '.$ipremote); + //session_destroy(); + exit(0); + } +} + +?> + + + + ReDoc + + + + + + + + + + '> + + + + + diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 1d15d5b9e75..1697318c5e8 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -32,50 +32,44 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->load("admin"); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); //Activate ProfId -if ($action == 'setproductionmode') -{ +if ($action == 'setproductionmode') { $status = GETPOST('status', 'alpha'); - if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', 0) > 0) - { + if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', 0) > 0) { $error = 0; - if ($status == 1) - { + if ($status == 1) { $result = dol_mkdir($conf->api->dir_temp); - if ($result < 0) - { + if ($result < 0) { setEventMessages($langs->trans("ErrorFailedToCreateDir", $conf->api->dir_temp), null, 'errors'); $error++; } } else { // Delete the cache file otherwise it does not update $result = dol_delete_file($conf->api->dir_temp.'/routes.php'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($langs->trans("ErrorFailedToDeleteFile", $conf->api->dir_temp.'/routes.php'), null, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { header("Location: ".$_SERVER["PHP_SELF"]); - exit; + exit; } } else { dol_print_error($db); } } -if ($action == 'save') -{ +if ($action == 'save') { dolibarr_set_const($db, 'API_RESTRICT_ON_IP', GETPOST('API_RESTRICT_ON_IP', 'alpha')); } @@ -110,8 +104,7 @@ print "
    '.$langs->trans("ApiProductionMode").''; print img_picto($langs->trans("Activated"), 'switch_on'); print '
    '; print ''; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print ''; @@ -91,8 +91,7 @@ if ($action == 'edit') print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print '
    '; print ''; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print ''; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 96cb7baff73..3d722bca400 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -55,18 +55,23 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'asset', $id); $permissiontoread = $user->rights->asset->read; @@ -74,7 +79,7 @@ $permissiontoadd = $user->rights->asset->write; // Used by the include of action $permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); $permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php -$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1]; +$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1]; /* @@ -83,10 +88,11 @@ $upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object- $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/asset/list.php', 1); @@ -109,12 +115,10 @@ if (empty($reshook)) // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'set_thirdparty' && $permissiontoadd) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -138,15 +142,18 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') -{ - print load_fiche_titre($langs->trans("NewAsset"), '', 'accountancy'); +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewAsset"), '', $object->picto); print ''; print ''; print ''; - if ($backtopage) print ''; - if ($backtopageforcancel) print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } print dol_get_fiche_head(array(), ''); @@ -174,8 +181,7 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("Assets")); print ''; @@ -183,8 +189,12 @@ if (($id || $ref) && $action == 'edit') print ''; print ''; print ''; - if ($backtopage) print ''; - if ($backtopageforcancel) print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } print dol_get_fiche_head(); @@ -208,8 +218,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = asset_prepare_head($object); @@ -218,16 +227,18 @@ 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('DeleteAssets'), $langs->trans('ConfirmDeleteAsset'), 'confirm_delete', '', 0, 1); } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -274,24 +285,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea /* * Buttons */ - if ($user->socid == 0) - { + if ($user->socid == 0) { print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { - if ($user->rights->asset->write) - { + if (empty($reshook)) { + if ($user->rights->asset->write) { print ''.$langs->trans("Modify").''."\n"; } else { print ''.$langs->trans('Modify').''."\n"; } - if ($user->rights->asset->delete) - { + if ($user->rights->asset->delete) { print ''.$langs->trans('Delete').''."\n"; } else { print ''.$langs->trans('Delete').''."\n"; @@ -300,8 +307,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print "
    "; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
    '; print ''; // ancre diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index f4823ae9b6f..66cd9bcb4cf 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -170,8 +170,12 @@ class Asset extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled)) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled)) { + $this->fields['entity']['enabled'] = 0; + } } /** @@ -304,44 +308,55 @@ class Asset extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; - $companylink = ''; - $label = ''.$langs->trans("Asset").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Asset").''; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; $url = dol_buildpath('/asset/card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowAssets"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = ''; $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -381,7 +396,9 @@ class Asset extends CommonObject $labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); $statusType = 'status0'; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } return dolGetStatus($labelStatus[$status], $labelStatusShort[$status], '', $statusType, $mode); } @@ -397,30 +414,25 @@ class Asset extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 5af5f3d7591..36c654c28ba 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -42,7 +42,7 @@ class AssetType extends CommonObject /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'invoice'; + public $picto = 'asset'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -131,27 +131,25 @@ class AssetType extends CommonObject dol_syslog("Asset_type::create", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."asset_type"); $result = $this->update($user, 1); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -3; } - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('ASSET_TYPE_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -190,33 +188,30 @@ class AssetType extends CommonObject $sql .= "accountancy_code_depreciation_asset = '".$this->db->escape($this->accountancy_code_depreciation_asset)."',"; $sql .= "accountancy_code_depreciation_expense = '".$this->db->escape($this->accountancy_code_depreciation_expense)."',"; $sql .= "note = '".$this->db->escape($this->note)."'"; - $sql .= " WHERE rowid =".$this->id; + $sql .= " WHERE rowid = ".((int) $this->id); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('ASSET_TYPE_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -243,14 +238,15 @@ class AssetType extends CommonObject $error = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."asset_type"; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " WHERE rowid = ".((int) $this->id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger $result = $this->call_trigger('ASSET_TYPE_DELETE', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -2; } + if ($result < 0) { + $error++; $this->db->rollback(); return -2; + } // End call triggers $this->db->commit(); @@ -277,10 +273,8 @@ class AssetType extends CommonObject dol_syslog("Asset_type::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -317,15 +311,12 @@ class AssetType extends CommonObject $sql .= " WHERE entity IN (".getEntity('asset_type').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $nump = $this->db->num_rows($resql); - if ($nump) - { + if ($nump) { $i = 0; - while ($i < $nump) - { + while ($i < $nump) { $obj = $this->db->fetch_object($resql); $assettypes[$obj->rowid] = $langs->trans($obj->label); @@ -341,7 +332,7 @@ class AssetType extends CommonObject /** * Return array of Asset objects for asset type this->id (or all if this->id not defined) * - * @param string $excludefilter Filter to exclude + * @param string $excludefilter Filter to exclude. This parameter must not be provided by input of users * @param int $mode 0=Return array of asset instance * 1=Return array of asset instance without extra data * 2=Return array of asset id only @@ -357,18 +348,16 @@ class AssetType extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."asset as a"; $sql .= " WHERE a.entity IN (".getEntity('asset').")"; $sql .= " AND a.fk_asset_type = ".$this->id; - if (!empty($excludefilter)) $sql .= ' AND ('.$excludefilter.')'; + if (!empty($excludefilter)) { + $sql .= ' AND ('.$excludefilter.')'; + } dol_syslog(get_class($this)."::listAssetsForGroup", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - if (!array_key_exists($obj->rowid, $ret)) - { - if ($mode < 2) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + if (!array_key_exists($obj->rowid, $ret)) { + if ($mode < 2) { $assetstatic = new Asset($this->db); if ($mode == 1) { $assetstatic->fetch($obj->rowid, '', '', '', false, false); @@ -376,7 +365,9 @@ class AssetType extends CommonObject $assetstatic->fetch($obj->rowid); } $ret[$obj->rowid] = $assetstatic; - } else $ret[$obj->rowid] = $obj->rowid; + } else { + $ret[$obj->rowid] = $obj->rowid; + } } } @@ -406,12 +397,16 @@ class AssetType extends CommonObject $result = ''; $label = $langs->trans("ShowTypeCard", $this->label); - $linkstart = ''; + $linkstart = ''; $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= ($maxlen ?dol_trunc($this->label, $maxlen) : $this->label); + } $result .= $linkend; return $result; diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index dc7be10b704..e6f5ed9b353 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -41,8 +41,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid) -{ +if ($user->socid) { $socid = $user->socid; } $result=restrictedArea($user, 'asset', $id, ''); @@ -52,16 +51,21 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Asset($db); -if ($object->fetch($id)) -{ +if ($object->fetch($id)) { $upload_dir = $conf->asset->dir_output."/".dol_sanitizeFileName($object->ref); } @@ -78,17 +82,17 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; */ $title = $langs->trans('Assets')." - ".$langs->trans('Documents'); -$helpurl = ''; -llxHeader('', $title, $helpurl); + +$help_url = ''; + +llxHeader('', $title, $help_url); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $upload_dir = $conf->asset->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $head = asset_prepare_head($object); @@ -97,8 +101,7 @@ if ($id > 0 || !empty($ref)) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index d211cf0dbad..7a8f4c20ce2 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -29,12 +29,14 @@ require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; // Load translation files required by the page $langs->loadLangs(array("asset")); -$id = GETPOST('id', 'int'); +$id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'asset', $id); $object = new Asset($db); @@ -55,8 +57,10 @@ $object->fetch($id); $form = new Form($db); $title = $langs->trans('Asset')." - ".$langs->trans('Info'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = ""; + +llxHeader('', $title, $help_url); $object->info($id); diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index cffcc8a962d..1e906677e7d 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -50,7 +50,9 @@ $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 +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; @@ -68,14 +70,20 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Security check $socid = 0; -if ($user->socid) $socid = $user->socid; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid) { + $socid = $user->socid; +} +if ($user->socid > 0) { + // Protection if external user //$socid = $user->socid; accessforbidden(); } @@ -86,30 +94,31 @@ $result = restrictedArea($user, 'asset', $id); // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +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'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); + } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -132,31 +141,33 @@ $permissiontodelete = $user->rights->asset->delete; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -185,13 +196,14 @@ $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Assets")); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -199,20 +211,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -225,7 +249,7 @@ $sql .= $hookmanager->resPrint; $sql.= " GROUP BY " foreach($object->fields as $key => $val) { - $sql.='t.'.$key.', '; + $sql.='t.'.$key.', '; } // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { @@ -242,26 +266,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -270,8 +292,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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_URL_ROOT.'/asset/card.php?id='.$id); @@ -302,28 +323,44 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print ''."\n"; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -333,7 +370,7 @@ print ''; $newcardbutton = dolGetButtonTitle($langs->trans('NewAsset'), '', 'fa fa-plus-circle', dol_buildpath('/asset/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); // Add code for pre mass action (confirmation or email presend form) $topicmail = "SendAssetsRef"; @@ -342,9 +379,10 @@ $objecttmp = new Asset($db); $trackid = 'asset'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } @@ -355,11 +393,13 @@ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -376,20 +416,26 @@ print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print ''.$conf->global->$key.'
    '; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print ''; } } @@ -411,15 +457,18 @@ print ''."\n"; // Fields title label // -------------------------------------------------------------------- print ''; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -436,11 +485,11 @@ print ''."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -449,37 +498,50 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + 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) - { + 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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print ''; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -492,14 +554,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ''."\n"; @@ -510,10 +575,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''; } @@ -529,10 +597,11 @@ print ''."\n"; print ''."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 514e05bff72..752591ade9e 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -52,10 +52,14 @@ $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->asset->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id; +} // Security check -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'asset', $id); $permissionnote = 1; @@ -79,8 +83,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans('Assets'), $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = asset_prepare_head($object); @@ -101,35 +104,35 @@ if ($id > 0 || !empty($ref)) // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($user->rights->asset->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.=''; - } - } + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($user->rights->asset->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 .= ''; diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 38969d65182..6103b963e21 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -26,9 +26,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} // Load translation files required by the page $langs->load("assets"); @@ -44,12 +50,18 @@ $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 = "a.label"; } +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "a.label"; +} $label = GETPOST("label", "alpha"); $accountancy_code_asset = GETPOST('accountancy_code_asset', 'string'); @@ -67,8 +79,7 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -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 -{ +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 $type = ""; $sall = ""; } @@ -86,15 +97,13 @@ $permissiontoadd = $user->rights->asset->setup_advance; if ($cancel) { $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } } -if ($action == 'add' && $user->rights->asset->write) -{ +if ($action == 'add' && $user->rights->asset->write) { $object->label = trim($label); $object->accountancy_code_asset = trim($accountancy_code_asset); $object->accountancy_code_depreciation_asset = trim($accountancy_code_depreciation_asset); @@ -103,7 +112,9 @@ if ($action == 'add' && $user->rights->asset->write) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (empty($object->label)) { $error++; @@ -121,11 +132,9 @@ if ($action == 'add' && $user->rights->asset->write) } } - if (!$error) - { + if (!$error) { $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -137,8 +146,7 @@ if ($action == 'add' && $user->rights->asset->write) } } -if ($action == 'update' && $user->rights->asset->write) -{ +if ($action == 'update' && $user->rights->asset->write) { $object->fetch($rowid); $object->oldcopy = clone $object; @@ -151,12 +159,13 @@ if ($action == 'update' && $user->rights->asset->write) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } $ret = $object->update($user); - if ($ret >= 0 && !count($object->errors)) - { + if ($ret >= 0 && !count($object->errors)) { setEventMessages($langs->trans("AssetTypeModified"), null, 'mesgs'); } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -166,13 +175,11 @@ if ($action == 'update' && $user->rights->asset->write) exit; } -if ($action == 'confirm_delete' && $user->rights->asset->write) -{ +if ($action == 'confirm_delete' && $user->rights->asset->write) { $object->fetch($rowid); $res = $object->delete(); - if ($res > 0) - { + if ($res > 0) { setEventMessages($langs->trans("AssetsTypeDeleted"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -189,13 +196,13 @@ if ($action == 'confirm_delete' && $user->rights->asset->write) $form = new Form($db); -$helpurl = ''; -llxHeader('', $langs->trans("AssetsTypeSetup"), $helpurl); +$help_url = ''; + +llxHeader('', $langs->trans("AssetsTypeSetup"), $help_url); // List of asset type -if (!$rowid && $action != 'create' && $action != 'edit') -{ +if (!$rowid && $action != 'create' && $action != 'edit') { //print dol_get_fiche_head(''); $sql = "SELECT d.rowid, d.label as label, d.accountancy_code_asset, d.accountancy_code_depreciation_asset, d.accountancy_code_depreciation_expense, d.note"; @@ -203,8 +210,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $sql .= " WHERE d.entity IN (".getEntity('asset_type').")"; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $nbtotalofrecords = $num; @@ -213,7 +219,9 @@ if (!$rowid && $action != 'create' && $action != 'edit') $param = ''; print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -223,7 +231,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $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); + print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit); $moreforfilter = ''; @@ -241,8 +249,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $assettype = new AssetType($db); - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $assettype->id = $objp->rowid; @@ -257,8 +264,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; print ''; print ''; print ''; - if ($user->rights->asset->write) - print ''; - else print ''; + if ($user->rights->asset->write) { + print ''; + } else { + print ''; + } print ""; $i++; } + + // If no record found + if ($num == 0) { + $colspan = 6; + print ''; + } + print "
    '; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } 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 '
    '; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '.$langs->trans("NoRecordFound").'
    '.dol_escape_htmltag($objp->label).''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objp->accountancy_code_asset, 1); @@ -269,8 +275,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $objp->accountancy_code_depreciation_asset, 1); @@ -281,8 +286,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount3 = new AccountingAccount($db); $accountingaccount3->fetch('', $objp->accountancy_code_depreciation_expense, 1); @@ -292,12 +296,21 @@ if (!$rowid && $action != 'create' && $action != 'edit') } print 'rowid.'">'.img_edit().' rowid.'">'.img_edit().' 
    '.$langs->trans("NoRecordFound").'
    "; print ''; @@ -313,12 +326,13 @@ if (!$rowid && $action != 'create' && $action != 'edit') /* Creation mode */ /* */ /* ************************************************************************** */ -if ($action == 'create') -{ +if ($action == 'create') { $object = new AssetType($db); - if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); + if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); + } - print load_fiche_titre($langs->trans("NewAssetType")); + print load_fiche_titre($langs->trans("NewAssetType"), '', $object->picto); print ''; print ''; @@ -331,8 +345,7 @@ if ($action == 'create') print '
    '.$langs->trans("Label").'
    '.$langs->trans("AccountancyCodeAsset").''; @@ -375,8 +388,7 @@ if ($action == 'create') $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } print '
    '; + print '
    '; print ''; - print ''; + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + + $i++; + } + + $result .= '
    '; + print ''; print $langs->trans("AccountancyCodeAsset"); print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->accountancy_code_asset, 1); @@ -453,8 +461,7 @@ if ($rowid > 0) print ''; print $langs->trans("AccountancyCodeDepreciationAsset"); print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $object->accountancy_code_depreciation_asset, 1); @@ -469,8 +476,7 @@ if ($rowid > 0) print ''; print $langs->trans("AccountancyCodeDepreciationExpense"); print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount3 = new AccountingAccount($db); $accountingaccount3->fetch('', $object->accountancy_code_depreciation_expense, 1); @@ -499,14 +505,12 @@ if ($rowid > 0) print '
    '; // Edit - if ($user->rights->asset->write) - { + if ($user->rights->asset->write) { print ''; } // Delete - if ($user->rights->asset->write) - { + if ($user->rights->asset->write) { print ''; } @@ -519,12 +523,13 @@ if ($rowid > 0) /* */ /* ************************************************************************** */ - if ($action == 'edit') - { + if ($action == 'edit') { $object = new AssetType($db); $object->fetch($rowid); $object->fetch_optionals(); - if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); + if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); + } $head = asset_type_prepare_head($object); @@ -537,12 +542,11 @@ if ($rowid > 0) print ''; - print ''; + print ''; print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { // Accountancy_code_asset print ''; print ''; print ''; print ''; print ''; $cats = $object->get_filles(); -if ($cats < 0) -{ +if ($cats < 0) { dol_print_error($db, $object->error, $object->errors); -} elseif (count($cats) < 1) -{ +} elseif (count($cats) < 1) { print ''; print ''; print ''; @@ -360,50 +346,61 @@ if ($cats < 0) $fulltree = $categstatic->get_full_arbo($type, $object->id, 1); // Load possible missing includes - if ($conf->global->CATEGORY_SHOW_COUNTS) - { - if ($type == Categorie::TYPE_MEMBER) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - if ($type == Categorie::TYPE_ACCOUNT) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - if ($type == Categorie::TYPE_PROJECT) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - if ($type == Categorie::TYPE_USER) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + if ($conf->global->CATEGORY_SHOW_COUNTS) { + if ($type == Categorie::TYPE_MEMBER) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + } + if ($type == Categorie::TYPE_ACCOUNT) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + } + if ($type == Categorie::TYPE_PROJECT) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + } + if ($type == Categorie::TYPE_USER) { + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + } } // Define data (format for treeview) $data = array(); $data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>''); - foreach ($fulltree as $key => $val) - { + foreach ($fulltree as $key => $val) { $categstatic->id = $val['id']; $categstatic->ref = $val['label']; $categstatic->color = $val['color']; $categstatic->type = $type; $desc = dol_htmlcleanlastbr($val['description']); - $counter = 0; - - if ($conf->global->CATEGORY_SHOW_COUNTS) - { + $counter = ''; + if ($conf->global->CATEGORY_SHOW_COUNTS) { // we need only a count of the elements, so it is enough to consume only the id's from the database $elements = $type == Categorie::TYPE_ACCOUNT ? $categstatic->getObjectsInCateg("account", 1) // Categorie::TYPE_ACCOUNT is "bank_account" instead of "account" : $categstatic->getObjectsInCateg($type, 1); - $counter = is_countable($elements) ? count($elements) : 0; + $counter = ""; } - $color = $categstatic->color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"'; + $color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"'; + $li = $categstatic->getNomUrl(1, '', 60, '&backtolist='.urlencode($_SERVER["PHP_SELF"].'?id='.$id.'&type='.$type)); $entry = '
    '.$langs->trans("Ref").''.$object->id.'
    '.$langs->trans("Ref").''.$object->id.'
    '.$langs->trans("Label").'
    '.$langs->trans("AccountancyCodeAsset").''; @@ -585,8 +589,7 @@ if ($rowid > 0) $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index 7a3660e350e..716057198f8 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -33,15 +33,13 @@ $phone = GETPOST('phone'); $notfound = $langs->trans("Unknown"); // Security check -if (empty($conf->clicktodial->enabled)) -{ +if (empty($conf->clicktodial->enabled)) { print "Error: Module Click to dial is not enabled.\n"; exit; } // Check parameters -if (empty($phone)) -{ +if (empty($phone)) { print "Error: Url must be called with parameter phone=phone to search\n"; exit; } @@ -57,11 +55,9 @@ $sql .= $db->plimit(1); dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $found = $obj->name; } else { $found = $notfound; diff --git a/htdocs/asterisk/index.html b/htdocs/asterisk/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index 0a9ac82ce23..7313fdfd2d5 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -28,13 +28,27 @@ * write = system,call,log,verbose,command,agent,user */ -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} /** * Empty header @@ -61,35 +75,53 @@ function llxFooter() print "\n".''."\n"; } + require_once '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Security check -if (empty($conf->clicktodial->enabled)) -{ +if (empty($conf->clicktodial->enabled)) { accessforbidden(); exit; } // Define Asterisk setup -if (!isset($conf->global->ASTERISK_HOST)) $conf->global->ASTERISK_HOST = "127.0.0.1"; -if (!isset($conf->global->ASTERISK_TYPE)) $conf->global->ASTERISK_TYPE = "SIP/"; -if (!isset($conf->global->ASTERISK_INDICATIF)) $conf->global->ASTERISK_INDICATIF = "0"; -if (!isset($conf->global->ASTERISK_PORT)) $conf->global->ASTERISK_PORT = 5038; -if ($conf->global->ASTERISK_INDICATIF == 'NONE') $conf->global->ASTERISK_INDICATIF = ''; -if (!isset($conf->global->ASTERISK_CONTEXT)) $conf->global->ASTERISK_CONTEXT = "from-internal"; -if (!isset($conf->global->ASTERISK_WAIT_TIME)) $conf->global->ASTERISK_WAIT_TIME = "30"; -if (!isset($conf->global->ASTERISK_PRIORITY)) $conf->global->ASTERISK_PRIORITY = "1"; -if (!isset($conf->global->ASTERISK_MAX_RETRY)) $conf->global->ASTERISK_MAX_RETRY = "2"; +if (!isset($conf->global->ASTERISK_HOST)) { + $conf->global->ASTERISK_HOST = "127.0.0.1"; +} +if (!isset($conf->global->ASTERISK_TYPE)) { + $conf->global->ASTERISK_TYPE = "SIP/"; +} +if (!isset($conf->global->ASTERISK_INDICATIF)) { + $conf->global->ASTERISK_INDICATIF = "0"; +} +if (!isset($conf->global->ASTERISK_PORT)) { + $conf->global->ASTERISK_PORT = 5038; +} +if ($conf->global->ASTERISK_INDICATIF == 'NONE') { + $conf->global->ASTERISK_INDICATIF = ''; +} +if (!isset($conf->global->ASTERISK_CONTEXT)) { + $conf->global->ASTERISK_CONTEXT = "from-internal"; +} +if (!isset($conf->global->ASTERISK_WAIT_TIME)) { + $conf->global->ASTERISK_WAIT_TIME = "30"; +} +if (!isset($conf->global->ASTERISK_PRIORITY)) { + $conf->global->ASTERISK_PRIORITY = "1"; +} +if (!isset($conf->global->ASTERISK_MAX_RETRY)) { + $conf->global->ASTERISK_MAX_RETRY = "2"; +} -$login = GETPOST('login'); -$password = GETPOST('password'); -$caller = GETPOST('caller'); -$called = GETPOST('called'); +$login = GETPOST('login', 'alphanohtml'); +$password = GETPOST('password', 'none'); +$caller = GETPOST('caller', 'alphanohtml'); +$called = GETPOST('called', 'alphanohtml'); // IP address of Asterisk server $strHost = $conf->global->ASTERISK_HOST; @@ -127,14 +159,12 @@ $sql .= $db->plimit(1); dol_syslog('click to dial search information with phone '.$called, LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $found = $obj->name; } else { - $found = $notfound; + $found = 'Not found'; } $db->free($resql); } else { @@ -144,16 +174,13 @@ if ($resql) $number = strtolower($called); $pos = strpos($number, "local"); -if (!empty($number)) -{ - if ($pos === false) - { +if (!empty($number)) { + if ($pos === false) { $errno = 0; $errstr = 0; - $strCallerId = "Dolibarr call $found <".strtolower($number).">"; + $strCallerId = "Dolibarr caller $found <".strtolower($number).">"; $oSocket = @fsockopen($strHost, $port, $errno, $errstr, 10); - if (!$oSocket) - { + if (!$oSocket) { print ''."\n"; $txt = "Failed to execute fsockopen($strHost, $port, \$errno, \$errstr, 10)
    \n"; print $txt; @@ -185,7 +212,7 @@ if (!empty($number)) } } } else { - print 'Bad parameters in URL. Must be '.$_SERVER['PHP_SELF'].'?caller=99999&called=99999&login=xxxxx&password=xxxxx'; + print 'Bad parameters in URL. Must be '.dol_escape_htmltag($_SERVER['PHP_SELF']).'?caller=99999&called=99999&login=xxxxx&password=xxxxx'; } // End of page diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 52a11e78bdd..f35547523c9 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -52,27 +52,21 @@ $maxperinit = 1000; */ // Define barcode template for products -if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) -{ +if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); - foreach ($dirbarcodenum as $dirroot) - { + foreach ($dirbarcodenum as $dirroot) { $dir = dol_buildpath($dirroot, 0); $handle = @opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/^mod_barcode_product_.*php$/', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^mod_barcode_product_.*php$/', $file)) { $file = substr($file, 0, dol_strlen($file) - 4); try { dol_include_once($dirroot.$file.'.php'); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -85,28 +79,23 @@ if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) } } -if ($action == 'initbarcodeproducts') -{ - if (!is_object($modBarCodeProduct)) - { +if ($action == 'initbarcodeproducts') { + if (!is_object($modBarCodeProduct)) { $error++; setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors'); } - if (!$error) - { + if (!$error) { $productstatic = new Product($db); $db->begin(); $nbok = 0; - if (!empty($eraseallbarcode)) - { + if (!empty($eraseallbarcode)) { $sql = "UPDATE ".MAIN_DB_PREFIX."product"; $sql .= " SET barcode = NULL"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); } else { $error++; @@ -121,16 +110,13 @@ if ($action == 'initbarcodeproducts') dol_syslog("codeinit", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $nbok = $nbtry = 0; - while ($i < min($num, $maxperinit)) - { + while ($i < min($num, $maxperinit)) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $productstatic->id = $obj->rowid; $productstatic->ref = $obj->ref; $productstatic->type = $obj->fk_product_type; @@ -140,7 +126,9 @@ if ($action == 'initbarcodeproducts') $result = $productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY'); $nbtry++; - if ($result > 0) $nbok++; + if ($result > 0) { + $nbok++; + } } $i++; @@ -150,14 +138,12 @@ if ($action == 'initbarcodeproducts') dol_print_error($db); } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); } } - if (!$error) - { + if (!$error) { //$db->rollback(); $db->commit(); } else { @@ -174,8 +160,12 @@ if ($action == 'initbarcodeproducts') * View */ -if (!$user->admin) accessforbidden(); -if (empty($conf->barcode->enabled)) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} +if (empty($conf->barcode->enabled)) { + accessforbidden(); +} $form = new Form($db); @@ -198,8 +188,7 @@ print ''; print '
    '; // For thirdparty -if ($conf->societe->enabled) -{ +if ($conf->societe->enabled) { $nbno = $nbtotal = 0; print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company'); @@ -207,19 +196,21 @@ if ($conf->societe->enabled) print '
    '."\n"; $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $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); - if ($resql) - { + if ($resql) { $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"; @@ -231,8 +222,7 @@ if ($conf->societe->enabled) // For products -if ($conf->product->enabled || $conf->product->service) -{ +if ($conf->product->enabled || $conf->product->service) { // Example 1 : Adding jquery code print ''."\n"; -if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) -{ +if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { ?> - admin && !$user->rights->blockedlog->read) || empty($conf->blockedlog->enabled)) accessforbidden(); +if ((!$user->admin && !$user->rights->blockedlog->read) || empty($conf->blockedlog->enabled)) { + accessforbidden(); +} $langs->loadLangs(array("admin")); @@ -49,8 +57,7 @@ $langs->loadLangs(array("admin")); print '
    '; print ''; -if ($block->fetch($id) > 0) -{ +if ($block->fetch($id) > 0) { $objtoshow = $block->object_data; print formatObject($objtoshow, ''); } else { @@ -77,18 +84,14 @@ function formatObject($objtoshow, $prefix) $newobjtoshow = $objtoshow; - if (is_object($newobjtoshow) || is_array($newobjtoshow)) - { + if (is_object($newobjtoshow) || is_array($newobjtoshow)) { //var_dump($newobjtoshow); - foreach ($newobjtoshow as $key => $val) - { - if (!is_object($val) && !is_array($val)) - { + foreach ($newobjtoshow as $key => $val) { + if (!is_object($val) && !is_array($val)) { // TODO $val can be '__PHP_Incomplete_Class', the is_object return false $s .= ''; $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/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index cca98176930..cc91182293e 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -26,14 +26,22 @@ // This script is called with a POST method. // Directory to scan (full path) is inside POST['dir']. -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} require '../../main.inc.php'; -if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) exit('BLOCKEDLOG_AUTHORITY_URL not set'); +if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { + exit('BLOCKEDLOG_AUTHORITY_URL not set'); +} require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; diff --git a/htdocs/blockedlog/ajax/index.html b/htdocs/blockedlog/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index faed3ac7530..2071eb03c47 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -122,7 +122,9 @@ class BlockedLogAuthority public function checkBlock($block) { - if (strlen($block) != 64) return false; + if (strlen($block) != 64) { + return false; + } $blocks = str_split($this->blockchain, 64); @@ -146,10 +148,9 @@ class BlockedLogAuthority global $langs; - dol_syslog(get_class($this)."::fetch id=".$id, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch id=".((int) $id), LOG_DEBUG); - if (empty($id) && empty($signature)) - { + if (empty($id) && empty($signature)) { $this->error = 'BadParameter'; return -1; } @@ -159,14 +160,15 @@ class BlockedLogAuthority $sql = "SELECT b.rowid, b.signature, b.blockchain, b.tms"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b"; - if ($id) $sql .= " WHERE b.rowid = ".$id; - elseif ($signature)$sql .= " WHERE b.signature = '".$this->db->escape($signature)."'"; + if ($id) { + $sql .= " WHERE b.rowid = ".((int) $id); + } elseif ($signature) { + $sql .= " WHERE b.signature = '".$this->db->escape($signature)."'"; + } $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -216,12 +218,10 @@ class BlockedLogAuthority $sql .= ")"; $res = $this->db->query($sql); - if ($res) - { + if ($res) { $id = $this->db->last_insert_id(MAIN_DB_PREFIX."blockedlog_authority"); - if ($id > 0) - { + if ($id > 0) { $this->id = $id; $this->db->commit(); @@ -259,11 +259,10 @@ class BlockedLogAuthority $sql = "UPDATE ".MAIN_DB_PREFIX."blockedlog_authority SET "; $sql .= " blockchain='".$this->db->escape($this->blockchain)."'"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $res = $this->db->query($sql); - if ($res) - { + if ($res) { $this->db->commit(); return 1; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index f6402ca3b04..366d7042d77 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -124,69 +124,114 @@ class BlockedLog */ public function __construct(DoliDB $db) { - global $conf; - $this->db = $db; + } + + + /** + * Load list of tracked events into $this->trackedevents. + * + * @return int Always 1 + */ + public function loadTrackedEvents() + { + global $conf; $this->trackedevents = array(); - if ($conf->facture->enabled) $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE'; - if ($conf->facture->enabled) $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE'; - if ($conf->facture->enabled) $this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL'; - if ($conf->facture->enabled) $this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload'; - if ($conf->facture->enabled) $this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview'; - - if ($conf->facture->enabled) $this->trackedevents['PAYMENT_CUSTOMER_CREATE'] = 'logPAYMENT_CUSTOMER_CREATE'; - if ($conf->facture->enabled) $this->trackedevents['PAYMENT_CUSTOMER_DELETE'] = 'logPAYMENT_CUSTOMER_DELETE'; + if ($conf->facture->enabled) { + $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE'; + } + if ($conf->facture->enabled) { + $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE'; + } + if ($conf->facture->enabled) { + $this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL'; + } + if ($conf->facture->enabled) { + $this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload'; + } + if ($conf->facture->enabled) { + $this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview'; + } + if ($conf->facture->enabled) { + $this->trackedevents['PAYMENT_CUSTOMER_CREATE'] = 'logPAYMENT_CUSTOMER_CREATE'; + } + if ($conf->facture->enabled) { + $this->trackedevents['PAYMENT_CUSTOMER_DELETE'] = 'logPAYMENT_CUSTOMER_DELETE'; + } /* Supplier - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete'; - if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done + if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; + if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete'; + if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done + if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done + if ($conf->fournisseur->enabled) $this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done - if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; - if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; - */ + if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate'; + if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; + */ - if ($conf->don->enabled) $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE'; - if ($conf->don->enabled) $this->trackedevents['DON_DELETE'] = 'logDON_DELETE'; + if ($conf->don->enabled) { + $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE'; + } + if ($conf->don->enabled) { + $this->trackedevents['DON_DELETE'] = 'logDON_DELETE'; + } //if ($conf->don->enabled) $this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL'; - if ($conf->don->enabled) $this->trackedevents['DONATION_PAYMENT_CREATE'] = 'logDONATION_PAYMENT_CREATE'; - if ($conf->don->enabled) $this->trackedevents['DONATION_PAYMENT_DELETE'] = 'logDONATION_PAYMENT_DELETE'; + if ($conf->don->enabled) { + $this->trackedevents['DONATION_PAYMENT_CREATE'] = 'logDONATION_PAYMENT_CREATE'; + } + if ($conf->don->enabled) { + $this->trackedevents['DONATION_PAYMENT_DELETE'] = 'logDONATION_PAYMENT_DELETE'; + } /* - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; - if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; - */ - - if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE'; - if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY'; - if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE'; - - - if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE'; - if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY'; - if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE'; + if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; + if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate'; + if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; + */ + if ($conf->adherent->enabled) { + $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE'; + } + if ($conf->adherent->enabled) { + $this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY'; + } + if ($conf->adherent->enabled) { + $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE'; + } + if ($conf->banque->enabled) { + $this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE'; + } + if ($conf->banque->enabled) { + $this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY'; + } + if ($conf->banque->enabled) { + $this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE'; + } // $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules $moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL)); - if ($moduleposenabled) $this->trackedevents['CASHCONTROL_VALIDATE'] = 'logCASHCONTROL_VALIDATE'; + if ($moduleposenabled) { + $this->trackedevents['CASHCONTROL_VALIDATE'] = 'logCASHCONTROL_VALIDATE'; + } + // Add more action to track from a conf variable 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; } } + + return 1; } /** - * Try to retrieve source object (it it still exists) - * @return string + * Try to retrieve source object (it it still exists). + * + * @return string URL string of source object */ public function getObjectLink() { @@ -274,11 +319,9 @@ class BlockedLog } 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 { @@ -297,7 +340,9 @@ class BlockedLog { global $langs, $cachedUser; - if (empty($cachedUser))$cachedUser = array(); + if (empty($cachedUser)) { + $cachedUser = array(); + } if (empty($cachedUser[$this->fk_user])) { $u = new User($this->db); @@ -326,7 +371,9 @@ class BlockedLog { global $langs, $user, $mysoc; - if (is_object($fuser)) $user = $fuser; + if (is_object($fuser)) { + $user = $fuser; + } // Generic fields @@ -335,20 +382,15 @@ class BlockedLog // amount $this->amounts = $amounts; // date - if ($object->element == 'payment' || $object->element == 'payment_supplier') - { + 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 { $this->date_object = $object->date; @@ -379,149 +421,168 @@ class BlockedLog 'name', 'lastname', 'firstname', 'region', 'region_id', 'region_code', 'state', 'state_id', 'state_code', 'country', 'country_id', 'country_code', 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2', 'barcode_type', 'barcode_type_code', 'barcode_type_label', 'barcode_type_coder', 'mode_reglement_id', 'cond_reglement_id', 'mode_reglement', 'cond_reglement', 'shipping_method_id', - 'fk_incoterms', 'label_incoterms', 'location_incoterms', 'lines') - ); + 'fk_incoterms', 'label_incoterms', 'location_incoterms', 'lines')); } // Add thirdparty info - if (empty($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) $object->fetch_thirdparty(); - if (!empty($object->thirdparty)) - { + if (empty($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) { + $object->fetch_thirdparty(); + } + if (!empty($object->thirdparty)) { $this->object_data->thirdparty = new stdClass(); - foreach ($object->thirdparty as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + foreach ($object->thirdparty as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) $this->object_data->thirdparty->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->thirdparty->{$key} = $value; + } } } // Add company info - if (!empty($mysoc)) - { + if (!empty($mysoc)) { $this->object_data->mycompany = new stdClass(); - foreach ($mysoc as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + foreach ($mysoc as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) $this->object_data->mycompany->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->mycompany->{$key} = $value; + } } } // Add user info - if (!empty($user)) - { + if (!empty($user)) { $this->fk_user = $user->id; $this->user_fullname = $user->getFullName($langs); } // Field specific to object - if ($this->element == 'facture') - { - foreach ($object as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + if ($this->element == 'facture') { + foreach ($object as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'datev', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public', 'lines' - ))) continue; // Discard if not into a dedicated list - if ($key == 'lines') - { + ))) { + continue; // Discard if not into a dedicated list + } + if ($key == 'lines') { $lineid = 0; - foreach ($value as $tmpline) // $tmpline is object FactureLine - { + foreach ($value as $tmpline) { // $tmpline is object FactureLine $lineid++; - foreach ($tmpline as $keyline => $valueline) - { + foreach ($tmpline as $keyline => $valueline) { if (!in_array($keyline, array( 'ref', 'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc', 'qty', 'product_type', 'vat_src_code', 'tva_tx', 'info_bits', 'localtax1_tx', 'localtax2_tx', 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2' - ))) continue; // Discard if not into a dedicated list + ))) { + continue; // Discard if not into a dedicated list + } if (empty($this->object_data->invoiceline[$lineid]) || !is_object($this->object_data->invoiceline[$lineid])) { // To avoid warning $this->object_data->invoiceline[$lineid] = new stdClass(); } - $this->object_data->invoiceline[$lineid]->{$keyline} = $valueline; + if (!is_object($valueline) && !is_null($valueline) && $valueline !== '') { + $this->object_data->invoiceline[$lineid]->{$keyline} = $valueline; + } } } - } elseif (!is_object($value)) $this->object_data->{$key} = $value; + } elseif (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->{$key} = $value; + } } - if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } elseif ($this->element == 'invoice_supplier') - { - foreach ($object as $key => $value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + if (!empty($object->newref)) { + $this->object_data->ref = $object->newref; + } + } elseif ($this->element == 'invoice_supplier') { + foreach ($object as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) $this->object_data->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->{$key} = $value; + } } - 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') - { + 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') { $datepayment = $object->datepaye ? $object->datepaye : ($object->datepaid ? $object->datepaid : $object->datep); $paymenttypeid = $object->paiementid ? $object->paiementid : ($object->paymenttype ? $object->paymenttype : $object->type_payment); $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_payment; + + if (!empty($object->num_payment)) { + $this->object_data->payment_num = $object->num_payment; + } + if (!empty($object->note_private)) { + $this->object_data->note_private = $object->note_private; + } //$this->object_data->fk_account = $object->fk_account; - $this->object_data->note = $object->note; //var_dump($this->object_data);exit; $totalamount = 0; - if (!is_array($object->amounts) && $object->amount) - { + if (!is_array($object->amounts) && $object->amount) { $object->amounts = array($object->id => $object->amount); } $paymentpartnumber = 0; - foreach ($object->amounts as $objid => $amount) - { - if (empty($amount)) continue; + foreach ($object->amounts as $objid => $amount) { + if (empty($amount)) { + continue; + } $totalamount += $amount; $tmpobject = null; - if ($this->element == 'payment_supplier') - { + if ($this->element == 'payment_supplier') { 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); } - if (!is_object($tmpobject)) - { + if (!is_object($tmpobject)) { continue; } $result = $tmpobject->fetch($objid); - if ($result <= 0) - { + if ($result <= 0) { $this->error = $tmpobject->error; $this->errors = $tmpobject->errors; dol_syslog("Failed to fetch object with id ".$objid, LOG_ERR); @@ -531,51 +592,61 @@ class BlockedLog $paymentpart = new stdClass(); $paymentpart->amount = $amount; - if (!in_array($this->element, array('payment_donation', 'payment_various'))) - { + if (!in_array($this->element, array('payment_donation', 'payment_various'))) { $result = $tmpobject->fetch_thirdparty(); - if ($result == 0) - { + if ($result == 0) { $this->error = 'Failed to fetch thirdparty for object with id '.$tmpobject->id; $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; return -1; } $paymentpart->thirdparty = new stdClass(); - foreach ($tmpobject->thirdparty as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + foreach ($tmpobject->thirdparty as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) $paymentpart->thirdparty->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $paymentpart->thirdparty->{$key} = $value; + } } } // Init object to avoid warnings - if ($this->element == 'payment_donation') $paymentpart->donation = new stdClass(); - else $paymentpart->invoice = new stdClass(); + if ($this->element == 'payment_donation') { + $paymentpart->donation = new stdClass(); + } else { + $paymentpart->invoice = new stdClass(); + } - if ($this->element != 'payment_various') - { - foreach ($tmpobject as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + if ($this->element != 'payment_various') { + foreach ($tmpobject as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) - { - if ($this->element == 'payment_donation') $paymentpart->donation->{$key} = $value; - elseif ($this->element == 'payment_various') $paymentpart->various->{$key} = $value; - else $paymentpart->invoice->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + if ($this->element == 'payment_donation') { + $paymentpart->donation->{$key} = $value; + } elseif ($this->element == 'payment_various') { + $paymentpart->various->{$key} = $value; + } else { + $paymentpart->invoice->{$key} = $value; + } } } @@ -586,33 +657,47 @@ class BlockedLog $this->object_data->amount = $totalamount; - if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } elseif ($this->element == 'payment_salary') - { + if (!empty($object->newref)) { + $this->object_data->ref = $object->newref; + } + } 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') - { - foreach ($object as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties + if (!empty($object->newref)) { + $this->object_data->ref = $object->newref; + } + } elseif ($this->element == 'subscription') { + foreach ($object as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } if (!in_array($key, array( 'id', 'datec', 'dateh', 'datef', 'fk_adherent', 'amount', 'import_key', 'statut', 'note' - ))) continue; // Discard if not into a dedicated list - if (!is_object($value)) $this->object_data->{$key} = $value; + ))) { + continue; // Discard if not into a dedicated list + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->{$key} = $value; + } } - if (!empty($object->newref)) $this->object_data->ref = $object->newref; + if (!empty($object->newref)) { + $this->object_data->ref = $object->newref; + } } else // Generic case { - foreach ($object as $key=>$value) - { - if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (!is_object($value)) $this->object_data->{$key} = $value; + foreach ($object as $key => $value) { + if (in_array($key, $arrayoffieldstoexclude)) { + continue; // Discard some properties + } + if (!is_object($value) && !is_null($value) && $value !== '') { + $this->object_data->{$key} = $value; + } } - if (!empty($object->newref)) $this->object_data->ref = $object->newref; + if (!empty($object->newref)) { + $this->object_data->ref = $object->newref; + } } return 1; @@ -626,31 +711,24 @@ class BlockedLog */ public function fetch($id) { - global $langs; - dol_syslog(get_class($this)."::fetch id=".$id, LOG_DEBUG); - - if (empty($id)) - { + if (empty($id)) { $this->error = 'BadParameter'; return -1; } - $langs->load("blockedlog"); - $sql = "SELECT b.rowid, b.date_creation, b.signature, b.signature_line, b.amounts, b.action, b.element, b.fk_object, b.entity,"; $sql .= " b.certified, b.tms, b.fk_user, b.user_fullname, b.date_object, b.ref_object, b.object_data, b.object_version"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog as b"; - if ($id) $sql .= " WHERE b.rowid = ".$id; + if ($id) { + $sql .= " WHERE b.rowid = ".((int) $id); + } $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); - + if ($resql) { + $obj = $this->db->fetch_object($resql); + if ($obj) { $this->id = $obj->rowid; $this->entity = $obj->entity; $this->ref = $obj->rowid; @@ -678,6 +756,7 @@ class BlockedLog return 1; } else { + $langs->load("blockedlog"); $this->error = $langs->trans("RecordNotFound"); return 0; } @@ -717,8 +796,10 @@ class BlockedLog public function setCertified() { - $res = $this->db->query("UPDATE ".MAIN_DB_PREFIX."blockedlog SET certified=1 WHERE rowid=".$this->id); - if ($res === false) return false; + $res = $this->db->query("UPDATE ".MAIN_DB_PREFIX."blockedlog SET certified=1 WHERE rowid=".((int) $this->id)); + if ($res === false) { + return false; + } return true; } @@ -732,7 +813,6 @@ class BlockedLog */ public function create($user, $forcesignature = '') { - global $conf, $langs, $hookmanager; $langs->load('blockedlog'); @@ -745,8 +825,7 @@ class BlockedLog dol_syslog(get_class($this).'::create action='.$this->action.' fk_user='.$this->fk_user.' user_fullname='.$this->user_fullname, LOG_DEBUG); // Check parameters/properties - if (!isset($this->amounts)) // amount can be 0 for some events (like when module is disabled) - { + if (!isset($this->amounts)) { // amount can be 0 for some events (like when module is disabled) $this->error = $langs->trans("BlockLogNeedAmountsValue"); dol_syslog($this->error, LOG_WARNING); return -1; @@ -763,7 +842,9 @@ class BlockedLog dol_syslog($this->error, LOG_WARNING); return -3; } - if (empty($this->fk_user)) $this->user_fullname = '(Anonymous)'; + if (empty($this->fk_user)) { + $this->user_fullname = '(Anonymous)'; + } $this->date_creation = dol_now(); @@ -773,9 +854,13 @@ class BlockedLog $keyforsignature = $this->buildKeyForSignature(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; + $this->signature_line = dol_hash($keyforsignature, '5'); // Not really usefull $this->signature = dol_hash($previoushash.$keyforsignature, '5'); - if ($forcesignature) $this->signature = $forcesignature; + if ($forcesignature) { + $this->signature = $forcesignature; + } //var_dump($keyforsignature);var_dump($previoushash);var_dump($this->signature_line);var_dump($this->signature); $sql = "INSERT INTO ".MAIN_DB_PREFIX."blockedlog ("; @@ -813,12 +898,10 @@ class BlockedLog $sql .= ")"; $res = $this->db->query($sql); - if ($res) - { + if ($res) { $id = $this->db->last_insert_id(MAIN_DB_PREFIX."blockedlog"); - if ($id > 0) - { + if ($id > 0) { $this->id = $id; $this->db->commit(); @@ -840,19 +923,19 @@ class BlockedLog /** * Check if current signature still correct compared to the value in chain * - * @param string $previoushash If previous signature hash is known, we can provide it to avoid to make a search of it in database. - * @return boolean True if OK, False if KO + * @param string $previoushash If previous signature hash is known, we can provide it to avoid to make a search of it in database. + * @param int $returnarray 1=Return array of details, 2=Return array of details including keyforsignature, 0=Boolean + * @return boolean|array True if OK, False if KO */ - public function checkSignature($previoushash = '') + public function checkSignature($previoushash = '', $returnarray = 0) { - if (empty($previoushash)) - { + if (empty($previoushash)) { $previoushash = $this->getPreviousHash(0, $this->id); } // Recalculate hash $keyforsignature = $this->buildKeyForSignature(); - $signature_line = dol_hash($keyforsignature, '5'); // Not really usefull + //$signature_line = dol_hash($keyforsignature, '5'); // Not really usefull $signature = dol_hash($previoushash.$keyforsignature, '5'); //var_dump($previoushash); var_dump($keyforsignature); var_dump($signature_line); var_dump($signature); @@ -862,7 +945,17 @@ class BlockedLog $this->error = 'Signature KO'; } - return $res; + if ($returnarray) { + if ($returnarray == 1) { + unset($keyforsignature); + return array('checkresult' => $res, 'calculatedsignature' => $signature, 'previoushash' => $previoushash); + } else { // Consume much memory ($keyforsignature is a large var) + return array('checkresult' => $res, 'calculatedsignature' => $signature, 'previoushash' => $previoushash, 'keyforsignature'=>$keyforsignature); + } + } else { + unset($keyforsignature); + return $res; + } } /** @@ -896,31 +989,31 @@ class BlockedLog $previoussignature = ''; - $sql = "SELECT rowid, signature FROM ".MAIN_DB_PREFIX."blockedlog"; - $sql .= " WHERE entity=".$conf->entity; - if ($beforeid) $sql .= " AND rowid < ".(int) $beforeid; - $sql .= " ORDER BY rowid DESC LIMIT 1"; - $sql .= ($withlock ? " FOR UPDATE " : ""); + $sql = "SELECT rowid, signature FROM ".MAIN_DB_PREFIX."blockedlog"; + $sql .= " WHERE entity=".$conf->entity; + if ($beforeid) { + $sql .= " AND rowid < ".(int) $beforeid; + } + $sql .= " ORDER BY rowid DESC LIMIT 1"; + $sql .= ($withlock ? " FOR UPDATE " : ""); - $resql = $this->db->query($sql); - if ($resql) { - $obj = $this->db->fetch_object($resql); - if ($obj) - { - $previoussignature = $obj->signature; - } - } else { - dol_print_error($this->db); - exit; - } + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + if ($obj) { + $previoussignature = $obj->signature; + } + } else { + dol_print_error($this->db); + exit; + } - if (empty($previoussignature)) - { + if (empty($previoussignature)) { // First signature line (line 0) - $previoussignature = $this->getSignature(); - } + $previoussignature = $this->getSignature(); + } - return $previoussignature; + return $previoussignature; } /** @@ -941,31 +1034,47 @@ class BlockedLog */ public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref = '', $search_amount = '', $search_code = '') { - global $conf, $cachedlogs; + global $conf; + //global $cachedlogs; /* $cachedlogs allow fastest search */ - if (empty($cachedlogs)) $cachedlogs = array(); + //if (empty($cachedlogs)) $cachedlogs = array(); if ($element == 'all') { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog - WHERE entity=".$conf->entity; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog + WHERE entity=".$conf->entity; } elseif ($element == 'not_certified') { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog - WHERE entity=".$conf->entity." AND certified = 0"; + WHERE entity=".$conf->entity." AND certified = 0"; } elseif ($element == 'just_certified') { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog - WHERE entity=".$conf->entity." AND certified = 1"; + WHERE entity=".$conf->entity." AND certified = 1"; } else { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog - WHERE entity=".$conf->entity." AND element='".$element."' AND fk_object=".(int) $fk_object; + WHERE entity=".$conf->entity." AND element='".$this->db->escape($element)."'"; } - if ($search_fk_user > 0) $sql .= natural_search("fk_user", $search_fk_user, 2); - if ($search_start > 0) $sql .= " AND date_creation >= '".$this->db->idate($search_start)."'"; - if ($search_end > 0) $sql .= " AND date_creation <= '".$this->db->idate($search_end)."'"; - if ($search_ref != '') $sql .= natural_search("ref_object", $search_ref); - if ($search_amount != '') $sql .= natural_search("amounts", $search_amount, 1); - if ($search_code != '' && $search_code != '-1') $sql .= natural_search("action", $search_code, 3); + if ($fk_object) { + $sql .= natural_search("rowid", $fk_object, 1); + } + if ($search_fk_user > 0) { + $sql .= natural_search("fk_user", $search_fk_user, 2); + } + if ($search_start > 0) { + $sql .= " AND date_creation >= '".$this->db->idate($search_start)."'"; + } + if ($search_end > 0) { + $sql .= " AND date_creation <= '".$this->db->idate($search_end)."'"; + } + if ($search_ref != '') { + $sql .= natural_search("ref_object", $search_ref); + } + if ($search_amount != '') { + $sql .= natural_search("amounts", $search_amount, 1); + } + if ($search_code != '' && $search_code != '-1') { + $sql .= natural_search("action", $search_code, 3); + } $sql .= $this->db->order($sortfield, $sortorder); $sql .= $this->db->plimit($limit + 1); // We want more, because we will stop into loop later with error if we reach max @@ -975,24 +1084,23 @@ class BlockedLog $results = array(); $i = 0; - while ($obj = $this->db->fetch_object($res)) - { + while ($obj = $this->db->fetch_object($res)) { $i++; - if ($i > $limit) - { + if ($i > $limit) { // Too many record, we will consume too much memory return -2; } - if (!isset($cachedlogs[$obj->rowid])) - { - $b = new BlockedLog($this->db); - $b->fetch($obj->rowid); + //if (!isset($cachedlogs[$obj->rowid])) + //{ + $b = new BlockedLog($this->db); + $b->fetch($obj->rowid); + //$b->loadTrackedEvents(); + //$cachedlogs[$obj->rowid] = $b; + //} - $cachedlogs[$obj->rowid] = $b; - } - - $results[] = $cachedlogs[$obj->rowid]; + //$results[] = $cachedlogs[$obj->rowid]; + $results[] = $b; } return $results; @@ -1040,15 +1148,20 @@ class BlockedLog $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog"; $sql .= " WHERE entity = ".$conf->entity; - if ($ignoresystem) $sql .= " AND action not in ('MODULE_SET','MODULE_RESET')"; + if ($ignoresystem) { + $sql .= " AND action not in ('MODULE_SET','MODULE_RESET')"; + } $sql .= $this->db->plimit(1); $res = $this->db->query($sql); - if ($res !== false) - { + if ($res !== false) { $obj = $this->db->fetch_object($res); - if ($obj) $result = true; - } else dol_print_error($this->db); + if ($obj) { + $result = true; + } + } else { + dol_print_error($this->db); + } dol_syslog("Module Blockedlog alreadyUsed with ignoresystem=".$ignoresystem." is ".$result); diff --git a/htdocs/blockedlog/class/index.html b/htdocs/blockedlog/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/blockedlog/index.html b/htdocs/blockedlog/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php index 11b85567a41..44f7074d582 100644 --- a/htdocs/blockedlog/lib/blockedlog.lib.php +++ b/htdocs/blockedlog/lib/blockedlog.lib.php @@ -44,8 +44,7 @@ function blockedlogadmin_prepare_head() require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; $b = new BlockedLog($db); - if ($b->alreadyUsed()) - { + if ($b->alreadyUsed()) { $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '...' : ''); } $head[$h][2] = 'fingerprints'; diff --git a/htdocs/blockedlog/lib/index.html b/htdocs/blockedlog/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index a7cc68d5677..dc3421dea0c 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -41,30 +41,32 @@ $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'; + 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'); -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'bom', $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 +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'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // Initialize technical objects $object = new BOM($db); @@ -76,8 +78,15 @@ $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->bom->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->bom->multidir_output[$object->entity]."/".$object->id; +} +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); /* @@ -86,20 +95,19 @@ if ($id > 0 || !empty($ref)) $upload_dir = $conf->bom->multidir_output[$object-> $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -115,14 +123,15 @@ $contactstatic = new Contact($db); $form = new Form($db); -if ($object->id > 0) -{ +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"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = bomPrepareHead($object); @@ -147,31 +156,31 @@ if ($object->id > 0) if ($user->rights->bom->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.='' . 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 .= ''; @@ -196,10 +205,11 @@ if ($object->id > 0) $out = '&origin='.$object->element.'&originid='.$object->id; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='trans("AddAnAction"),'filenew'); @@ -209,10 +219,8 @@ if ($object->id > 0) print ''; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } //print load_fiche_titre($langs->trans("ActionsOnBom"), '', ''); diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 47f1d336279..37ec67e1ba3 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -37,10 +37,10 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); -$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); // PDF $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); @@ -59,12 +59,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -72,8 +75,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); $permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php @@ -88,18 +91,22 @@ $upload_dir = $conf->bom->multidir_output[isset($object->entity) ? $object->enti $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $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($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } @@ -127,8 +134,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; // Add line - if ($action == 'addline' && $user->rights->bom->write) - { + if ($action == 'addline' && $user->rights->bom->write) { $langs->load('errors'); $error = 0; @@ -153,8 +159,7 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $bomline = new BOMLine($db); $bomline->fk_bom = $id; $bomline->fk_product = $idprod; @@ -164,10 +169,10 @@ if (empty($reshook)) $bomline->efficiency = $efficiency; // Rang to use - $rangmax = $object->line_max(0); - $ranktouse = $rangmax + 1; + $rangmax = $object->line_max(0); + $ranktouse = $rangmax + 1; - $bomline->position = ($ranktouse + 1); + $bomline->position = ($ranktouse + 1); $result = $bomline->create($user); if ($result <= 0) { @@ -179,16 +184,15 @@ if (empty($reshook)) unset($_POST['qty_frozen']); unset($_POST['disable_stock_change']); - $object->fetchLines(); + $object->fetchLines(); - $object->calculateCosts(); - } + $object->calculateCosts(); + } } } // Add line - if ($action == 'updateline' && $user->rights->bom->write) - { + if ($action == 'updateline' && $user->rights->bom->write) { $langs->load('errors'); $error = 0; @@ -211,8 +215,7 @@ if (empty($reshook)) $bomline->efficiency = $efficiency; $result = $bomline->update($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($bomline->error, $bomline->errors, 'errors'); $action = ''; } else { @@ -221,9 +224,9 @@ if (empty($reshook)) unset($_POST['qty_frozen']); unset($_POST['disable_stock_change']); - $object->fetchLines(); + $object->fetchLines(); - $object->calculateCosts(); + $object->calculateCosts(); } } } @@ -236,7 +239,10 @@ if (empty($reshook)) $form = new Form($db); $formfile = new FormFile($db); -llxHeader('', $langs->trans("BOM"), ''); + +$title = $langs->trans('BOM'); + +llxHeader('', $title, ''); // Example : Adding jquery code print ''; diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 87c1a72789d..fff9d077a08 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -35,8 +35,7 @@ */ // Protection to avoid direct call of template -if (empty($object) || !is_object($object)) -{ +if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } @@ -44,11 +43,21 @@ if (empty($object) || !is_object($object)) global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; -if (empty($dateSelector)) $dateSelector = 0; -if (empty($forceall)) $forceall = 0; -if (empty($senderissupplier)) $senderissupplier = 0; -if (empty($inputalsopricewithtax)) $inputalsopricewithtax = 0; -if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax = 0; +if (empty($dateSelector)) { + $dateSelector = 0; +} +if (empty($forceall)) { + $forceall = 0; +} +if (empty($senderissupplier)) { + $senderissupplier = 0; +} +if (empty($inputalsopricewithtax)) { + $inputalsopricewithtax = 0; +} +if (empty($outputalsopricetotalwithtax)) { + $outputalsopricetotalwithtax = 0; +} // add html5 elements $domData = ' data-element="'.$line->element.'"'; @@ -79,8 +88,7 @@ $coldisplay++; echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) -{ +if (!empty($conf->global->PRODUCT_USE_UNITS)) { print ''; //Line extrafield -if (!empty($extrafields)) -{ - print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1); +if (!empty($extrafields)) { + print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1, 'line'); } print "\n"; diff --git a/htdocs/bookmarks/admin/index.html b/htdocs/bookmarks/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index ffd1673ac63..199944165b4 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -53,7 +53,7 @@ function printDropdownBookmarksList() if (is_array($_POST)) { foreach ($_POST as $key => $val) { if (preg_match('/^search_/', $key) && $val != '') { - $tmpurl .= ($tmpurl ? '&' : '').$key.'='.$val; + $tmpurl .= ($tmpurl ? '&' : '').http_build_query(array($key => $val)); } } } @@ -67,7 +67,7 @@ function printDropdownBookmarksList() // Url to list bookmark $listbtn = ''; - $listbtn .= ''.$langs->trans('Bookmarks').''; + $listbtn .= img_picto('', 'bookmark', 'class="paddingright"').$langs->trans('Bookmarks').''; // Url to go on create new bookmark page $newbtn = ''; @@ -75,7 +75,7 @@ function printDropdownBookmarksList() //$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url); $urltoadd = DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url); $newbtn .= ''; - $newbtn .= img_picto('', 'bookmark', '', false, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; + $newbtn .= img_picto('', 'add', '', false, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; } // Menu with list of bookmarks diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index ddb043292f6..3c3e03ecb37 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -52,8 +52,7 @@ $object = new Bookmark($db); * Actions */ -if ($action == 'add' || $action == 'addproduct' || $action == 'update') -{ +if ($action == 'add' || $action == 'addproduct' || $action == 'update') { if ($action == 'update') { $invertedaction = 'edit'; } else { @@ -62,14 +61,17 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') $error = 0; - if (GETPOST('cancel', 'alpha')) - { - if (empty($backtopage)) $backtopage = ($urlsource ? $urlsource : ((!empty($url) && !preg_match('/^http/i', $url)) ? $url : DOL_URL_ROOT.'/bookmarks/list.php')); + if (GETPOST('cancel', 'alpha')) { + if (empty($backtopage)) { + $backtopage = ($urlsource ? $urlsource : ((!empty($url) && !preg_match('/^http/i', $url)) ? $url : DOL_URL_ROOT.'/bookmarks/list.php')); + } header("Location: ".$backtopage); exit; } - if ($action == 'update') $object->fetch(GETPOST("id", 'int')); + if ($action == 'update') { + $object->fetch(GETPOST("id", 'int')); + } // Check if null because user not admin can't set an user and send empty value here. if (!empty($userid)) { $object->fk_user = $userid; @@ -89,21 +91,23 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("UrlOrLink")), null, 'errors'); } - if (!$error) - { + if (!$error) { $object->favicon = 'none'; - if ($action == 'update') $res = $object->update(); - else $res = $object->create(); + if ($action == 'update') { + $res = $object->update(); + } else { + $res = $object->create(); + } - if ($res > 0) - { - if (empty($backtopage)) $backtopage = ($urlsource ? $urlsource : ((!empty($url) && !preg_match('/^http/i', $url)) ? $url : DOL_URL_ROOT.'/bookmarks/list.php')); + if ($res > 0) { + 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 { - if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings'); } else { @@ -137,8 +141,7 @@ $h++; $hselected = 'card'; -if ($action == 'create') -{ +if ($action == 'create') { /* * Fact bookmark creation mode */ @@ -189,8 +192,7 @@ if ($action == 'create') } -if ($id > 0 && !preg_match('/^add/i', $action)) -{ +if ($id > 0 && !preg_match('/^add/i', $action)) { /* * Fact bookmark mode or visually edition */ @@ -205,8 +207,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) ) ); - if ($action == 'edit') - { + if ($action == 'edit') { print ''; print ''; print ''; @@ -239,8 +240,11 @@ if ($id > 0 && !preg_match('/^add/i', $action)) } print ''; print ''; print ''; print ''; // Date creation @@ -298,8 +309,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '
       
    '; print ''; } @@ -310,14 +320,12 @@ if ($id > 0 && !preg_match('/^add/i', $action)) print "
    \n"; // Edit - if ($user->rights->bookmark->creer && $action != 'edit') - { + if ($user->rights->bookmark->creer && $action != 'edit') { print ''.$langs->trans("Edit").''."\n"; } // Remove - if ($user->rights->bookmark->supprimer && $action != 'edit') - { + if ($user->rights->bookmark->supprimer && $action != 'edit') { print ''.$langs->trans("Delete").''."\n"; } diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index f5bbefae3d3..9a5b3a53c20 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -117,7 +117,7 @@ class Bookmark extends CommonObject $sql = "SELECT rowid, fk_user, dateb as datec, url, target,"; $sql .= " title, position, favicon"; $sql .= " FROM ".MAIN_DB_PREFIX."bookmark"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); $sql .= " AND entity = ".$conf->entity; dol_syslog("Bookmark::fetch", LOG_DEBUG); @@ -219,7 +219,7 @@ class Bookmark extends CommonObject $sql .= " ,title = '".$this->db->escape($this->title)."'"; $sql .= " ,favicon = '".$this->db->escape($this->favicon)."'"; $sql .= " ,position = ".(int) $this->position; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog("Bookmark::update", LOG_DEBUG); if ($this->db->query($sql)) { @@ -239,7 +239,7 @@ class Bookmark extends CommonObject public function remove($id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog("Bookmark::remove", LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/bookmarks/class/index.html b/htdocs/bookmarks/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/bookmarks/index.html b/htdocs/bookmarks/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 6ad2770aa25..d94b5cbdd88 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -45,12 +45,18 @@ $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 +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 = 'position'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 'position'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} $id = GETPOST("id", 'int'); @@ -65,11 +71,9 @@ $permissiontodelete = $user->rights->bookmark->delete; * Actions */ -if ($action == 'delete') -{ +if ($action == 'delete') { $res = $object->remove($id); - if ($res > 0) - { + if ($res > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -93,32 +97,30 @@ $sql .= " u.login, u.lastname, u.firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid"; $sql .= " WHERE 1=1"; $sql .= " AND b.entity IN (".getEntity('bookmark').")"; -if (!$user->admin) $sql .= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL OR b.fk_user = 0)"; +if (!$user->admin) { + $sql .= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL OR b.fk_user = 0)"; +} $sql .= $db->order($sortfield.", position", $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) -{ +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -127,25 +129,37 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) } $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 (!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); +} $moreforfilter = ''; // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '
    '; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -176,8 +190,7 @@ print "\n"; $cacheOfUsers = array(); $i = 0; -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $object->id = $obj->rowid; @@ -197,28 +210,39 @@ while ($i < min($num, $limit)) // Title print "
    \n"; // Url print '\n"; // Target print '\n"; // Author print ''; print ''; print '"; } $color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"'; + $li = $categstatic->getNomUrl(1, '', 60, '&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam)); - $data[] = array( - 'rowid'=>$val['rowid'], - 'fk_menu'=>$val['fk_parent'], - 'entry'=>'
    '.$langs->trans('Field').''.$langs->trans('Value').'
    '.($prefix ? $prefix.' > ' : '').$key.''; - if (in_array($key, array('date', 'datef', 'dateh', 'datec', 'datem', 'datep'))) - { + if (in_array($key, array('date', 'datef', 'dateh', 'datec', 'datem', 'datep'))) { /*var_dump(is_object($val)); var_dump(is_array($val)); var_dump(is_array($val)); @@ -99,11 +102,9 @@ function formatObject($objtoshow, $prefix) $s .= $val; } $s .= '
    '; $label = $tmpproduct->getLabelOfUnit('long'); if ($label !== '') { @@ -159,9 +167,8 @@ if ($action == 'selectlines') { print '
    '; - if ($action == 'edit') print 'title).'">'; - else print $object->title; + if ($action == 'edit') { + print 'title).'">'; + } else { + print $object->title; + } print '
    '; @@ -252,28 +256,32 @@ if ($id > 0 && !preg_match('/^add/i', $action)) print ''; } print ''; - if ($action == 'edit') print 'url).'">'; - else print 'target ? ' target="_blank"' : '').'>'.$object->url.''; + if ($action == 'edit') { + print 'url).'">'; + } else { + print 'target ? ' target="_blank"' : '').'>'.$object->url.''; + } print '
    '.$langs->trans("BehaviourOnClick").''; - if ($action == 'edit') - { + if ($action == 'edit') { $liste = array(1=>$langs->trans("OpenANewWindow"), 0=>$langs->trans("ReplaceWindow")); print $form->selectarray('target', $liste, GETPOSTISSET("target") ? GETPOST("target") : $object->target); } else { - if ($object->target == 0) print $langs->trans("ReplaceWindow"); - if ($object->target == 1) print $langs->trans("OpenANewWindow"); + if ($object->target == 0) { + print $langs->trans("ReplaceWindow"); + } + if ($object->target == 1) { + print $langs->trans("OpenANewWindow"); + } } print '
    '.$langs->trans("Owner").''; - if ($action == 'edit' && $user->admin) - { + if ($action == 'edit' && $user->admin) { print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); } else { - if ($object->fk_user > 0) - { + if ($object->fk_user > 0) { $fuser = new User($db); $fuser->fetch($object->fk_user); print $fuser->getNomUrl(1); @@ -285,8 +293,11 @@ if ($id > 0 && !preg_match('/^add/i', $action)) // Position print '
    '.$langs->trans("Position").''; - if ($action == 'edit') print 'position).'">'; - else print $object->position; + if ($action == 'edit') { + print 'position).'">'; + } else { + print $object->position; + } print '
    "; $linkintern = 1; - if ($linkintern) print ''; + if ($linkintern) { + print ''; + } print $title; - if ($linkintern) print ""; + if ($linkintern) { + print ""; + } print "'; - if (!$linkintern) print 'target ? ' target="newlink" rel="noopener"' : '').'>'; + if (!$linkintern) { + print 'target ? ' target="newlink" rel="noopener"' : '').'>'; + } print $link; - if (!$linkintern) print ''; + if (!$linkintern) { + print ''; + } print "'; - if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort"); - if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort"); + if ($obj->target == 0) { + print $langs->trans("BookmarkTargetReplaceWindowShort"); + } + if ($obj->target == 1) { + print $langs->trans("BookmarkTargetNewWindowShort"); + } print "'; - if ($obj->fk_user) - { + if ($obj->fk_user) { if (empty($cacheOfUsers[$obj->fk_user])) { $tmpuser = new User($db); $tmpuser->fetch($obj->fk_user); @@ -239,12 +263,10 @@ while ($i < min($num, $limit)) // Actions print ''; - if ($user->rights->bookmark->creer) - { + if ($user->rights->bookmark->creer) { print ''.img_edit().""; } - if ($user->rights->bookmark->supprimer) - { + if ($user->rights->bookmark->supprimer) { print 'rowid.'">'.img_delete().''; } else { print " "; diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 21e10c05fc7..eee5cac755f 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -27,16 +27,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; // If socid provided by ajax company selector -if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) -{ +if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) { $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); } // Security check -if (!$user->admin) -accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("admin", "cashdesk")); @@ -45,11 +45,13 @@ $langs->loadLangs(array("admin", "cashdesk")); /* * Actions */ -if (GETPOST('action', 'alpha') == 'set') -{ + +if (GETPOST('action', 'alpha') == 'set') { $db->begin(); - if (GETPOST('socid', 'int') < 0) $_POST["socid"] = ''; + if (GETPOST('socid', 'int') < 0) { + $_POST["socid"] = ''; + } $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY", (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_CASH", (GETPOST('CASHDESK_ID_BANKACCOUNT_CASH', 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH', 'alpha') : ''), 'chaine', 0, '', $conf->entity); @@ -62,10 +64,11 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -93,8 +96,7 @@ print ''; print ''; print ''; -if (!empty($conf->service->enabled)) -{ +if (!empty($conf->service->enabled)) { print ''; print ''; print ''; @@ -121,8 +123,7 @@ print ''; -if (!empty($conf->banque->enabled)) -{ +if (!empty($conf->banque->enabled)) { print ''; print ''; } -if (!empty($conf->stock->enabled)) -{ +if (!empty($conf->stock->enabled)) { print ''; // Force warehouse (this is not a default value) print ''; // Force warehouse (this is not a default value) print ' - + - + - - - - + @@ -130,8 +132,8 @@ for ($i = 0; $i < $nbtoshow; $i++) - - + +
    '.$langs->trans("Parameters").''.$langs->trans("Value").'
    '.$langs->trans("CashDeskThirdParty print ''; print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s.client in (1,3) AND s.status = 1)', 1, 0, 0, array(), 0); print '
    '.$langs->trans("CashDeskBankAccountForSell").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CASH, 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", 1); @@ -141,8 +142,7 @@ if (!empty($conf->banque->enabled)) print '
    '.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { @@ -161,8 +161,7 @@ if (!empty($conf->stock->enabled)) print '
    '.$langs->trans("CashDeskIdWareHouse").''; - if (!$disabled) - { + if (!$disabled) { print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE, 'CASHDESK_ID_WAREHOUSE', '', 1, $disabled); print ' ('.$langs->trans("Create").')'; } else { @@ -172,8 +171,7 @@ if (!empty($conf->stock->enabled)) } // Use Dolibarr Receipt Printer -if (!empty($conf->receiptprinter->enabled)) -{ +if (!empty($conf->receiptprinter->enabled)) { print '
    '; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; print ''; diff --git a/htdocs/cashdesk/admin/index.html b/htdocs/cashdesk/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index 72cb99123a4..d8e31f3b9c9 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -22,18 +22,17 @@ * \ingroup cashdesk * \brief Include to show main page for cashdesk module */ + require_once 'class/Facturation.class.php'; // Si nouvelle vente, reinitialisation des donnees (destruction de l'objet et vidage de la table contenant la liste des articles) -if ($_GET['id'] == 'NOUV') -{ +if (GETPOST('id', 'int') == 'NOUV') { unset($_SESSION['serObjFacturation']); unset($_SESSION['poscart']); } // Recuperation, s'il existe, de l'objet contenant les infos de la vente en cours ... -if (isset($_SESSION['serObjFacturation'])) -{ +if (isset($_SESSION['serObjFacturation'])) { $obj_facturation = unserialize($_SESSION['serObjFacturation']); unset($_SESSION['serObjFacturation']); } else { @@ -41,6 +40,15 @@ if (isset($_SESSION['serObjFacturation'])) $obj_facturation = new Facturation(); } +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + + +/* + * View + */ + // $obj_facturation contains data for all invoice total + selection of current product $obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] @@ -58,17 +66,18 @@ print '
    '; print '
    '; $page = GETPOST('menutpl', 'alpha'); -if (empty($page)) $page = 'facturation'; +if (empty($page)) { + $page = 'facturation'; +} if (in_array( - $page, - array( + $page, + array( 'deconnexion', 'index', 'index_verif', 'facturation', 'facturation_verif', 'facturation_dhtml', 'validation', 'validation_ok', 'validation_ticket', 'validation_verif', ) - )) -{ +)) { include $page.'.php'; } else { dol_print_error('', 'menu param '.$page.' is not inside allowed list'); diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php index 1e3bddf1df7..a352649feb4 100644 --- a/htdocs/cashdesk/affIndex.php +++ b/htdocs/cashdesk/affIndex.php @@ -30,8 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/keypad.php'; $error = GETPOST('error'); // Test if already logged -if ($_SESSION['uid'] <= 0) -{ +if ($_SESSION['uid'] <= 0) { header('Location: index.php'); exit; } @@ -39,6 +38,10 @@ if ($_SESSION['uid'] <= 0) // Load translation files required by the page $langs->loadLangs(array("companies", "compta", "cashdesk")); +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + /* * View @@ -53,8 +56,7 @@ top_htmlhead($head, $langs->trans("CashDesk"), 0, 0, $arrayofjs, $arrayofcss); print ''."\n"; -if (!empty($error)) -{ +if (!empty($error)) { dol_htmloutput_events(); } diff --git a/htdocs/cashdesk/affPied.php b/htdocs/cashdesk/affPied.php index b3108217346..6481a0c2aff 100644 --- a/htdocs/cashdesk/affPied.php +++ b/htdocs/cashdesk/affPied.php @@ -21,14 +21,17 @@ * \brief Bottom of main page of point of sale module */ +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + ?>
    use_javascript_ajax) && empty($conf->dol_no_mouse_hover)) -{ +if (!empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover)) { print "\n\n"; print ''); diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 45ce3857068..47a1d90b76c 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -41,37 +41,38 @@ $bankid_cash = (GETPOST("CASHDESK_ID_BANKACCOUNT_CASH") > 0) ?GETPOST("CASHDESK_ $bankid_cheque = (GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE") > 0) ?GETPOST("CASHDESK_ID_BANKACCOUNT_CHEQUE", 'int') : $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; $bankid_cb = (GETPOST("CASHDESK_ID_BANKACCOUNT_CB") > 0) ?GETPOST("CASHDESK_ID_BANKACCOUNT_CB", 'int') : $conf->global->CASHDESK_ID_BANKACCOUNT_CB; + +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + + // Check username -if (empty($username)) -{ +if (empty($username)) { $retour = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Login")); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid.'&bankid_cash='.$bankid_cash.'&bankid_cheque='.$bankid_cheque.'&bankid_cb='.$bankid_cb); exit; } // Check third party id -if (!($thirdpartyid > 0)) -{ +if (!($thirdpartyid > 0)) { $retour = $langs->trans("ErrorFieldRequired", $langs->transnoentities("CashDeskThirdPartyForSell")); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid.'&bankid_cash='.$bankid_cash.'&bankid_cheque='.$bankid_cheque.'&bankid_cb='.$bankid_cb); exit; } // If we setup stock module to ask movement on invoices, we must not allow access if required setup not finished. -if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && !($warehouseid > 0)) -{ +if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && !($warehouseid > 0)) { $retour = $langs->trans("CashDeskYouDidNotDisableStockDecease"); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid.'&bankid_cash='.$bankid_cash.'&bankid_cheque='.$bankid_cheque.'&bankid_cb='.$bankid_cb); exit; } // If stock decrease on bill validation, check user has stock edit permissions -if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && !empty($username)) -{ +if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK) && !empty($username)) { $testuser = new User($db); $testuser->fetch(0, $username); $testuser->getrights('stock'); - if (empty($testuser->rights->stock->creer)) - { + if (empty($testuser->rights->stock->creer)) { $retour = $langs->trans("UserNeedPermissionToEditStockToUsePos"); header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid.'&bankid_cash='.$bankid_cash.'&bankid_cheque='.$bankid_cheque.'&bankid_cb='.$bankid_cb); exit; @@ -83,8 +84,7 @@ if (!empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_S $auth = new Auth($db); $retour = $auth->verif($username, $password); -if ($retour >= 0) -{ +if ($retour >= 0) { $return = array(); $sql = "SELECT rowid, lastname, firstname"; @@ -93,12 +93,10 @@ if ($retour >= 0) $sql .= " AND entity IN (0,".$conf->entity.")"; $result = $db->query($sql); - if ($result) - { + if ($result) { $tab = $db->fetch_array($res); - foreach ($tab as $key => $value) - { + foreach ($tab as $key => $value) { $return[$key] = $value; } diff --git a/htdocs/cashdesk/javascript/index.html b/htdocs/cashdesk/javascript/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index d48fc544eb0..41a0f0b757e 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -21,8 +21,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -64,10 +63,11 @@ $id = $obj_facturation->id(); // Si trop d'articles ont ete trouves, on n'affiche que les X premiers (defini dans le fichier de configuration) ... $nbtoshow = $nbr_enreg; -if (!empty($conf_taille_listes) && $nbtoshow > $conf_taille_listes) $nbtoshow = $conf_taille_listes; +if (!empty($conf_taille_listes) && $nbtoshow > $conf_taille_listes) { + $nbtoshow = $conf_taille_listes; +} -for ($i = 0; $i < $nbtoshow; $i++) -{ +for ($i = 0; $i < $nbtoshow; $i++) { if ($id == $tab_designations[$i]['rowid']) { $selected = 'selected'; } else { @@ -96,9 +96,9 @@ for ($i = 0; $i < $nbtoshow; $i++)
    trans("Qty"); ?> trans("PriceUHT"); ?> trans("Discount"); ?> (%)trans("VATRate"); ?>trans("VATRate"); ?>
    @@ -106,20 +106,22 @@ for ($i = 0; $i < $nbtoshow; $i++) + + - - + + + vatrate; // To get vat rate we just have selected $buyer = new Societe($db); - if ($_SESSION["CASHDESK_ID_THIRDPARTY"] > 0) $buyer->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]); + if ($_SESSION["CASHDESK_ID_THIRDPARTY"] > 0) { + $buyer->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]); + } echo $form->load_tva('selTva', (GETPOSTISSET("selTva") ? GETPOST("selTva", 'alpha', 2) : $vatrate), $mysoc, $buyer, 0, 0, '', false, -1); ?> -
    trans("TotalHT"); ?>
    @@ -165,25 +167,28 @@ for ($i = 0; $i < $nbtoshow; $i++)
    '; - if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CASH']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] < 0) - { + if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CASH']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] < 0) { $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) - { + 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) - { + 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/index.html b/htdocs/cashdesk/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index e3c3c285966..74be200945f 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -18,8 +18,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -48,10 +47,10 @@ $societe->fetch($thirdpartyid); $tab = (!empty($_SESSION['poscart']) ? $_SESSION['poscart'] : array()); $tab_size = count($tab); -if ($tab_size <= 0) print '
    '.$langs->trans("NoArticle").'

    '; -else { - for ($i = 0; $i < $tab_size; $i++) - { +if ($tab_size <= 0) { + print '
    '.$langs->trans("NoArticle").'

    '; +} else { + for ($i = 0; $i < $tab_size; $i++) { echo ('
    '."\n"); echo ('

    '.$tab[$i]['ref'].' - '.$tab[$i]['label'].'

    '."\n"); diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index 1e347f4d01e..67891aa67cf 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -20,8 +20,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -37,27 +36,23 @@ include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]); $companyLink = $company->getNomUrl(1); }*/ -if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"])) -{ +if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"])) { $bankcash = new Account($db); $bankcash->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]); $bankcash->label = $bankcash->ref; $bankcashLink = $bankcash->getNomUrl(1); } -if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"])) -{ +if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"])) { $bankcb = new Account($db); $bankcb->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]); $bankcbLink = $bankcb->getNomUrl(1); } -if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"])) -{ +if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"])) { $bankcheque = new Account($db); $bankcheque->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]); $bankchequeLink = $bankcheque->getNomUrl(1); } -if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && !empty($conf->stock->enabled)) -{ +if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && !empty($conf->stock->enabled)) { $warehouse = new Entrepot($db); $warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]); $warehouseLink = $warehouse->getNomUrl(1); @@ -87,8 +82,7 @@ print ''; print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'
    '; print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'
    ';*/ print '
    '; -if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && !empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) -{ +if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && !empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) { print $langs->trans("CashDeskWarehouse").': '.$warehouseLink; } print '
    '; diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 101ea687e7b..9220e3daad4 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -18,8 +18,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -38,82 +37,81 @@ $object->fetch($facid); ?> - - <?php echo $langs->trans('PrintTicket') ?> - + + <?php echo $langs->trans('PrintTicket') ?> +
    - -
    -

    name; ?>
    -
    -

    + +
    +

    name; ?>
    +
    +

    -

    '; print $object->ref; ?>

    -
    +

    - + - - - - - + + + + + - - - + + - - - - - - - - + + + + + + + - +
    trans("Code"); ?>trans("Label"); ?>trans("Qty"); ?>trans("Discount").' (%)'; ?>trans("TotalHT"); ?>trans("Code"); ?>trans("Label"); ?>trans("Qty"); ?>trans("Discount").' (%)'; ?>trans("TotalHT"); ?>
    currency); ?>
    currency); ?>
    - - + + - + - +
    trans("TotalHT"); ?>amountWithoutTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>trans("TotalHT"); ?>amountWithoutTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>
    trans("TotalVAT").''.price(price2num($obj_facturation->amountVat(), '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->amountWithTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>trans("TotalTTC").''.price(price2num($obj_facturation->amountWithTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>
    trans("Close"); ?> diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index cc558cca058..c2a9124f300 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -47,25 +46,27 @@ if ($obj_facturation->amountVat()) {
    trans("TotalTTC"); ?> amountWithTax(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
    trans("PaymentMode"); ?> getSetPaymentMode()) - { + switch ($obj_facturation->getSetPaymentMode()) { case 'ESP': echo $langs->trans("Cash"); $filtre = 'courant=2'; - if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"])) + if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"])) { $selected = $_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]; + } break; case 'CB': echo $langs->trans("CreditCard"); $filtre = 'courant=1'; - if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"])) + if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"])) { $selected = $_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]; + } break; case 'CHQ': echo $langs->trans("Cheque"); $filtre = 'courant=1'; - if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"])) + if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"])) { $selected = $_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]; + } break; case 'DIF': echo $langs->trans("Reported"); diff --git a/htdocs/cashdesk/tpl/validation2.tpl.php b/htdocs/cashdesk/tpl/validation2.tpl.php index 8b3ca9c76d5..d89edfdc41a 100644 --- a/htdocs/cashdesk/tpl/validation2.tpl.php +++ b/htdocs/cashdesk/tpl/validation2.tpl.php @@ -18,8 +18,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/cashdesk/validation_ticket.php b/htdocs/cashdesk/validation_ticket.php index 28ad91dc4e7..5fcf017ada1 100644 --- a/htdocs/cashdesk/validation_ticket.php +++ b/htdocs/cashdesk/validation_ticket.php @@ -26,6 +26,15 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + + +/* + * Actions + */ + $obj_facturation = unserialize($_SESSION['serObjFacturation']); unset($_SESSION['serObjFacturation']); @@ -33,8 +42,7 @@ $hookmanager->initHooks(array('cashdeskTplTicket')); $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $obj_facturation); -if (empty($reshook)) -{ +if (empty($reshook)) { require 'tpl/ticket.tpl.php'; } diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index 1df6f805ff6..0c9758d9a29 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -36,8 +36,16 @@ $obj_facturation = unserialize($_SESSION['serObjFacturation']); $action = GETPOST('action', 'aZ09'); $bankaccountid = GETPOST('cashdeskbank'); -switch ($action) -{ +if (empty($user->rights->cashdesk->run)) { + accessforbidden(); +} + + +/* + * Actions + */ + +switch ($action) { default: $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=validation'; break; @@ -55,15 +63,18 @@ switch ($action) // To use a specific numbering module for POS, reset $conf->global->FACTURE_ADDON and other vars here // and restore values just after $sav_FACTURE_ADDON = ''; - if (!empty($conf->global->POS_ADDON)) - { + if (!empty($conf->global->POS_ADDON)) { $sav_FACTURE_ADDON = $conf->global->FACTURE_ADDON; $conf->global->FACTURE_ADDON = $conf->global->POS_ADDON; // To force prefix only for POS with terre module - if (!empty($conf->global->POS_NUMBERING_TERRE_FORCE_PREFIX)) $conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX = $conf->global->POS_NUMBERING_TERRE_FORCE_PREFIX; + if (!empty($conf->global->POS_NUMBERING_TERRE_FORCE_PREFIX)) { + $conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX = $conf->global->POS_NUMBERING_TERRE_FORCE_PREFIX; + } // To force prefix only for POS with mars module - if (!empty($conf->global->POS_NUMBERING_MARS_FORCE_PREFIX)) $conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX = $conf->global->POS_NUMBERING_MARS_FORCE_PREFIX; + if (!empty($conf->global->POS_NUMBERING_MARS_FORCE_PREFIX)) { + $conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX = $conf->global->POS_NUMBERING_MARS_FORCE_PREFIX; + } // To force rule only for POS with mercure //... } @@ -71,8 +82,7 @@ switch ($action) $num = $invoice->getNextNumRef($company); // Restore save values - if (!empty($sav_FACTURE_ADDON)) - { + if (!empty($sav_FACTURE_ADDON)) { $conf->global->FACTURE_ADDON = $sav_FACTURE_ADDON; } @@ -120,14 +130,12 @@ switch ($action) $heure = dol_print_date($now, 'hour'); $note = ''; - if (!is_object($obj_facturation)) - { + if (!is_object($obj_facturation)) { dol_print_error('', 'Empty context'); exit; } - switch ($obj_facturation->getSetPaymentMode()) - { + switch ($obj_facturation->getSetPaymentMode()) { case 'DIF': $mode_reglement_id = 0; //$cond_reglement_id = dol_getIdFromCode($db,'RECEP','cond_reglement','code','rowid') @@ -151,9 +159,13 @@ switch ($action) $cond_reglement_id = 0; break; } - if (empty($mode_reglement_id)) $mode_reglement_id = 0; // If mode_reglement_id not found - if (empty($cond_reglement_id)) $cond_reglement_id = 0; // If cond_reglement_id not found - $note .= $_POST['txtaNotes']; + if (empty($mode_reglement_id)) { + $mode_reglement_id = 0; // If mode_reglement_id not found + } + if (empty($cond_reglement_id)) { + $cond_reglement_id = 0; // If cond_reglement_id not found + } + $note .= GETPOST('txtaNotes', 'alphanohtml'); dol_syslog("obj_facturation->getSetPaymentMode()=".$obj_facturation->getSetPaymentMode()." mode_reglement_id=".$mode_reglement_id." cond_reglement_id=".$cond_reglement_id); $error = 0; @@ -175,8 +187,7 @@ switch ($action) // Loop on each line into cart $tab_liste_size = count($tab_liste); - for ($i = 0; $i < $tab_liste_size; $i++) - { + for ($i = 0; $i < $tab_liste_size; $i++) { $tmp = getTaxesFromId($tab_liste[$i]['fk_tva']); $vat_rate = $tmp['rate']; $vat_npr = $tmp['npr']; @@ -218,32 +229,32 @@ switch ($action) //print "c=".$invoice->cond_reglement_id." m=".$invoice->mode_reglement_id; exit; // Si paiement differe ... - if ($obj_facturation->getSetPaymentMode() == 'DIF') - { + if ($obj_facturation->getSetPaymentMode() == 'DIF') { $resultcreate = $invoice->create($user, 0, dol_stringtotime($obj_facturation->paiementLe())); - if ($resultcreate > 0) - { + if ($resultcreate > 0) { $warehouseidtodecrease = (isset($_SESSION["CASHDESK_ID_WAREHOUSE"]) ? $_SESSION["CASHDESK_ID_WAREHOUSE"] : 0); - if (!empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease = 0; // If a particular stock is defined, we disable choice + if (!empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) { + $warehouseidtodecrease = 0; // If a particular stock is defined, we disable choice + } $resultvalid = $invoice->validate($user, $obj_facturation->numInvoice(), 0); - if ($warehouseidtodecrease > 0) - { + if ($warehouseidtodecrease > 0) { // Decrease require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); // Loop on each line $cpt = count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { + for ($i = 0; $i < $cpt; $i++) { + if ($invoice->lines[$i]->fk_product > 0) { $mouvP = new MouvementStock($db); $mouvP->origin = &$invoice; // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result = $mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); - else $result = $mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) { + $result = $mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + } else { + $result = $mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + } if ($result < 0) { $error++; } @@ -258,29 +269,30 @@ switch ($action) $id = $invoice->id; } else { $resultcreate = $invoice->create($user, 0, 0); - if ($resultcreate > 0) - { + if ($resultcreate > 0) { $warehouseidtodecrease = (isset($_SESSION["CASHDESK_ID_WAREHOUSE"]) ? $_SESSION["CASHDESK_ID_WAREHOUSE"] : 0); - if (!empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease = 0; // If a particular stock is defined, we disable choice + if (!empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) { + $warehouseidtodecrease = 0; // If a particular stock is defined, we disable choice + } $resultvalid = $invoice->validate($user, $obj_facturation->numInvoice(), 0); - if ($warehouseidtodecrease > 0) - { + if ($warehouseidtodecrease > 0) { // Decrease require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); // Loop on each line $cpt = count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { + for ($i = 0; $i < $cpt; $i++) { + if ($invoice->lines[$i]->fk_product > 0) { $mouvP = new MouvementStock($db); $mouvP->origin = &$invoice; // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result = $mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); - else $result = $mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) { + $result = $mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + } else { + $result = $mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos", $invoice->newref)); + } if ($result < 0) { setEventMessages($mouvP->error, $mouvP->errors, 'errors'); $error++; @@ -301,26 +313,21 @@ switch ($action) $payment->num_payment = ''; $paiement_id = $payment->create($user); - if ($paiement_id > 0) - { - if (!$error) - { + if ($paiement_id > 0) { + if (!$error) { $result = $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccountid, '', ''); - if (!$result > 0) - { + if (!$result > 0) { $errmsg = $paiement->error; $error++; } } - if (!$error) - { + if (!$error) { if ($invoice->total_ttc == $obj_facturation->amountWithTax() - && $obj_facturation->getSetPaymentMode() != 'DIFF') - { + && $obj_facturation->getSetPaymentMode() != 'DIFF') { // We set status to paid - $result = $invoice->set_paid($user); - //print 'set paid';exit; + $result = $invoice->setPaid($user); + //print 'set paid';exit; } } } else { @@ -334,8 +341,7 @@ switch ($action) } - if (!$error) - { + if (!$error) { $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 { diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 693a3e53a2a..bddeb9a771a 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -27,8 +27,9 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; -if (!$user->admin) -accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("categories", "admin")); @@ -40,11 +41,9 @@ $action = GETPOST('action', 'aZ09'); */ $reg = array(); -if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -52,11 +51,9 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -100,12 +97,10 @@ print ''.$langs->trans("CategorieRecursiv").''.$form->textwithpicto('', $langs->trans("CategorieRecursivHelp"), 1, 'help').''; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ajax_constantonoff('CATEGORIE_RECURSIV_ADD'); } else { - if (empty($conf->global->CATEGORIE_RECURSIV_ADD)) - { + if (empty($conf->global->CATEGORIE_RECURSIV_ADD)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; } 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 ff6a4ca7881..02cd6e2a784 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -37,13 +37,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'categorie'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -76,35 +80,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/categories/admin/index.html b/htdocs/categories/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 74e16f9082d..734f2e89506 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -37,14 +37,16 @@ $langs->load("categories"); // Security check $socid = (int) GETPOST('socid', 'int'); -if (!$user->rights->categorie->lire) accessforbidden(); +if (!$user->rights->categorie->lire) { + accessforbidden(); +} -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $origin = GETPOST('origin', 'alpha'); $catorigin = (int) GETPOST('catorigin', 'int'); -$type = GETPOST('type', 'aZ09'); -$urlfrom = GETPOST('urlfrom', 'alpha'); +$type = GETPOST('type', 'aZ09'); +$urlfrom = GETPOST('urlfrom', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $label = (string) GETPOST('label', 'alphanohtml'); @@ -54,15 +56,29 @@ $visible = (int) GETPOST('visible', 'int'); $parent = (int) GETPOST('parent', 'int'); if ($origin) { - if ($type == Categorie::TYPE_PRODUCT) $idProdOrigin = $origin; - if ($type == Categorie::TYPE_SUPPLIER) $idSupplierOrigin = $origin; - if ($type == Categorie::TYPE_CUSTOMER) $idCompanyOrigin = $origin; - if ($type == Categorie::TYPE_MEMBER) $idMemberOrigin = $origin; - if ($type == Categorie::TYPE_CONTACT) $idContactOrigin = $origin; - if ($type == Categorie::TYPE_PROJECT) $idProjectOrigin = $origin; + if ($type == Categorie::TYPE_PRODUCT) { + $idProdOrigin = $origin; + } + if ($type == Categorie::TYPE_SUPPLIER) { + $idSupplierOrigin = $origin; + } + if ($type == Categorie::TYPE_CUSTOMER) { + $idCompanyOrigin = $origin; + } + if ($type == Categorie::TYPE_MEMBER) { + $idMemberOrigin = $origin; + } + if ($type == Categorie::TYPE_CONTACT) { + $idContactOrigin = $origin; + } + if ($type == Categorie::TYPE_PROJECT) { + $idProjectOrigin = $origin; + } } -if ($catorigin && $type == Categorie::TYPE_PRODUCT) $idCatOrigin = $catorigin; +if ($catorigin && $type == Categorie::TYPE_PRODUCT) { + $idCatOrigin = $catorigin; +} $object = new Categorie($db); @@ -80,13 +96,10 @@ $error = 0; */ // Add action -if ($action == 'add' && $user->rights->categorie->creer) -{ - // Action ajout d'une categorie - if ($cancel) - { - if ($urlfrom) - { +if ($action == 'add' && $user->rights->categorie->creer) { + // Action add a category + if ($cancel) { + if ($urlfrom) { header("Location: ".$urlfrom); exit; } elseif ($backtopage) { @@ -125,24 +138,25 @@ if ($action == 'add' && $user->rights->categorie->creer) $object->visible = $visible; $object->type = $type; - if ($parent != "-1") $object->fk_parent = $parent; + if ($parent != "-1") { + $object->fk_parent = $parent; + } $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$object->label) - { + if (!$object->label) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $action = 'create'; } // Create category in database - if (!$error) - { + if (!$error) { $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { $action = 'confirmed'; $_POST["addcat"] = ''; } else { @@ -152,41 +166,31 @@ if ($action == 'add' && $user->rights->categorie->creer) } // Confirm action -if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->creer) -{ - // Action confirmation de creation categorie - if ($action == 'confirmed') - { - if ($urlfrom) - { +if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->creer) { + // Action confirmation of creation category + if ($action == 'confirmed') { + if ($urlfrom) { 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; } @@ -204,14 +208,13 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr $form = new Form($db); $formother = new FormOther($db); -$helpurl = ''; -llxHeader("", $langs->trans("Categories"), $helpurl); +$help_url = 'EN:Module_Categories|FR:Module_Catégories|DE:Modul_Kategorien'; -if ($user->rights->categorie->creer) -{ +llxHeader("", $langs->trans("Categories"), $help_url); + +if ($user->rights->categorie->creer) { // Create or add - if ($action == 'create' || GETPOST("addcat") == 'addcat') - { + if ($action == 'create' || GETPOST("addcat") == 'addcat') { dol_set_focus('#label'); print '
    '; @@ -222,8 +225,12 @@ if ($user->rights->categorie->creer) print ''; print ''; print ''; - if ($origin) print ''; - if ($catorigin) print ''; + if ($origin) { + print ''; + } + if ($catorigin) { + print ''; + } print load_fiche_titre($langs->trans("CreateCat")); @@ -257,8 +264,7 @@ if ($user->rights->categorie->creer) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 03610100c9c..65483a561af 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -140,15 +140,12 @@ class Categories extends DolibarrApi $sql = "SELECT t.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie as t"; $sql .= ' WHERE t.entity IN ('.getEntity('category').')'; - if (!empty($type)) - { + if (!empty($type)) { $sql .= ' AND t.type='.array_search($type, Categories::$TYPES); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -157,8 +154,7 @@ class Categories extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -167,13 +163,11 @@ class Categories extends DolibarrApi } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $i = 0; $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $category_static = new Categorie($this->db); if ($category_static->fetch($obj->rowid)) { @@ -181,8 +175,7 @@ class Categories extends DolibarrApi } $i++; } - } - else { + } else { throw new RestException(503, 'Error when retrieve category list : '.$this->db->lasterror()); } if (!count($obj_ret)) { @@ -238,7 +231,9 @@ class Categories extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->category->$field = $value; } @@ -721,8 +716,9 @@ class Categories extends DolibarrApi { $category = array(); foreach (Categories::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $category[$field] = $data[$field]; } return $category; @@ -747,8 +743,7 @@ class Categories extends DolibarrApi throw new RestException(401); } - if (empty($type)) - { + if (empty($type)) { throw new RestException(500, 'The "type" parameter is required.'); } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 7f8e415e4b1..51079636d4f 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -98,7 +98,7 @@ class Categorie extends CommonObject 8 => 'bank_line', 9 => 'warehouse', 10 => 'actioncomm', - 11 => 'website_page' + 11 => 'website_page' ); /** @@ -197,7 +197,7 @@ class Categorie extends CommonObject /** * @var string Category label */ - public $label; + public $label; /** * @var string description @@ -231,9 +231,9 @@ class Categorie extends CommonObject * @see Categorie::TYPE_PROJECT * @see Categorie::TYPE_ACCOUNT * @see Categorie::TYPE_BANK_LINE - * @see Categorie::TYPE_WAREHOUSE - * @see Categorie::TYPE_ACTIONCOMM - * @see Categorie::TYPE_WEBSITE_PAGE + * @see Categorie::TYPE_WAREHOUSE + * @see Categorie::TYPE_ACTIONCOMM + * @see Categorie::TYPE_WEBSITE_PAGE */ public $type; @@ -266,9 +266,9 @@ class Categorie extends CommonObject $mapList = $hookmanager->resArray; $mapId = $mapList['id']; $mapCode = $mapList['code']; - self::$MAP_ID_TO_CODE[$mapId] = $mapCode; - $this->MAP_ID[$mapCode] = $mapId; - $this->MAP_CAT_FK[$mapCode] = $mapList['cat_fk']; + self::$MAP_ID_TO_CODE[$mapId] = $mapCode; + $this->MAP_ID[$mapCode] = $mapId; + $this->MAP_CAT_FK[$mapCode] = $mapList['cat_fk']; $this->MAP_CAT_TABLE[$mapCode] = $mapList['cat_table']; $this->MAP_OBJ_CLASS[$mapCode] = $mapList['obj_class']; $this->MAP_OBJ_TABLE[$mapCode] = $mapList['obj_table']; @@ -313,19 +313,25 @@ class Categorie extends CommonObject global $conf; // Check parameters - if (empty($id) && empty($label) && empty($ref_ext)) return -1; - if (!is_null($type) && !is_numeric($type)) $type = $this->MAP_ID[$type]; + if (empty($id) && empty($label) && empty($ref_ext)) { + return -1; + } + if (!is_null($type) && !is_numeric($type)) { + $type = $this->MAP_ID[$type]; + } $sql = "SELECT rowid, fk_parent, entity, label, description, color, fk_soc, visible, type, ref_ext"; $sql .= ", date_creation, tms, fk_user_creat, fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie"; - if ($id > 0) { - $sql .= " WHERE rowid = ".$id; + if ($id) { + $sql .= " WHERE rowid = ".((int) $id); } elseif (!empty($ref_ext)) { $sql .= " WHERE ref_ext LIKE '".$this->db->escape($ref_ext)."'"; } else { $sql .= " WHERE label = '".$this->db->escape($label)."' AND entity IN (".getEntity('category').")"; - if (!is_null($type)) $sql .= " AND type = ".((int) $type); + if (!is_null($type)) { + $sql .= " AND type = ".((int) $type); + } } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -357,7 +363,9 @@ class Categorie extends CommonObject $this->db->free($resql); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) $this->getMultiLangs(); + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->getMultiLangs(); + } return 1; } else { @@ -365,6 +373,8 @@ class Categorie extends CommonObject } } else { dol_print_error($this->db); + $this->error=$this->db->lasterror; + $this->errors[]=$this->db->lasterror; return -1; } } @@ -385,7 +395,9 @@ class Categorie extends CommonObject $type = $this->type; - if (!is_numeric($type)) $type = $this->MAP_ID[$type]; + if (!is_numeric($type)) { + $type = $this->MAP_ID[$type]; + } $error = 0; @@ -397,7 +409,9 @@ class Categorie extends CommonObject $this->color = trim($this->color); $this->import_key = trim($this->import_key); $this->ref_ext = trim($this->ref_ext); - if (empty($this->visible)) $this->visible = 0; + if (empty($this->visible)) { + $this->visible = 0; + } $this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0); if ($this->already_exists()) { @@ -461,7 +475,9 @@ class Categorie extends CommonObject if (!$error) { // Call trigger $result = $this->call_trigger('CATEGORY_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } @@ -540,7 +556,9 @@ class Categorie extends CommonObject if (!$error) { // Call trigger $result = $this->call_trigger('CATEGORY_MODIFY', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } + if ($result < 0) { + $error++; $this->db->rollback(); return -1; + } // End call triggers } @@ -577,14 +595,16 @@ class Categorie extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CATEGORY_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } /* FIX #1317 : Check for child category and move up 1 level*/ if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."categorie"; - $sql .= " SET fk_parent = ".$this->fk_parent; + $sql .= " SET fk_parent = ".((int) $this->fk_parent); $sql .= " WHERE fk_parent = ".$this->id; if (!$this->db->query($sql)) { @@ -647,9 +667,13 @@ class Categorie extends CommonObject $error = 0; - if ($this->id == -1) return -2; + if ($this->id == -1) { + return -2; + } - if (empty($type)) $type = $obj->element; + if (empty($type)) { + $type = $obj->element; + } $this->db->begin(); @@ -697,7 +721,9 @@ class Categorie extends CommonObject // 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++; } + if ($result < 0) { + $error++; + } // End call triggers if (!$error) { @@ -755,7 +781,9 @@ class Categorie extends CommonObject // 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++; } + if ($result < 0) { + $error++; + } // End call triggers if (!$error) { @@ -803,7 +831,9 @@ class Categorie extends CommonObject if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) { $sql .= " AND o.rowid = ".$user->socid; } - if ($limit > 0 || $offset > 0) $sql .= $this->db->plimit($limit + 1, $offset); + if ($limit > 0 || $offset > 0) { + $sql .= $this->db->plimit($limit + 1, $offset); + } $sql .= $this->db->order($sortfield, $sortorder); dol_syslog(get_class($this)."::getObjectsInCateg", LOG_DEBUG); @@ -839,7 +869,7 @@ class Categorie extends CommonObject public function containsObject($type, $object_id) { $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); - $sql .= " WHERE fk_categorie = ".$this->id." AND fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = ".$object_id; + $sql .= " WHERE fk_categorie = ".$this->id." AND fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = ".((int) $object_id); dol_syslog(get_class($this)."::containsObject", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1035,7 +1065,9 @@ class Categorie extends CommonObject // phpcs:enable global $conf, $langs; - if (!is_numeric($type)) $type = $this->MAP_ID[$type]; + if (!is_numeric($type)) { + $type = $this->MAP_ID[$type]; + } if (is_null($type)) { $this->error = 'BadValueForParameterType'; return -1; @@ -1061,9 +1093,13 @@ class Categorie extends CommonObject // Init $this->cats array $sql = "SELECT DISTINCT c.rowid, c.label, c.ref_ext, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates - if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= ", t.label as label_trans, t.description as description_trans"; + if (!empty($conf->global->MAIN_MULTILANGS)) { + $sql .= ", t.label as label_trans, t.description as description_trans"; + } $sql .= " FROM ".MAIN_DB_PREFIX."categorie as c"; - if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'"; + if (!empty($conf->global->MAIN_MULTILANGS)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'"; + } $sql .= " WHERE c.entity IN (".getEntity('category').")"; $sql .= " AND c.type = ".(int) $type; @@ -1202,14 +1238,18 @@ class Categorie extends CommonObject public function get_all_categories($type = null, $parent = false) { // phpcs:enable - if (!is_numeric($type)) $type = $this->MAP_ID[$type]; + if (!is_numeric($type)) { + $type = $this->MAP_ID[$type]; + } $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; $sql .= " WHERE entity IN (".getEntity('category').")"; - if (!is_null($type)) + if (!is_null($type)) { $sql .= " AND type = ".(int) $type; - if ($parent) + } + if ($parent) { $sql .= " AND fk_parent = 0"; + } $res = $this->db->query($sql); if ($res) { @@ -1250,7 +1290,9 @@ class Categorie extends CommonObject // phpcs:enable $type = $this->type; - if (!is_numeric($type)) $type = $this->MAP_ID[$type]; + if (!is_numeric($type)) { + $type = $this->MAP_ID[$type]; + } /* We have to select any rowid from llx_categorie which category's mother and label * are equals to those of the calling category @@ -1258,7 +1300,7 @@ class Categorie extends CommonObject $sql = "SELECT c.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie as c "; $sql .= " WHERE c.entity IN (".getEntity('category').")"; - $sql .= " AND c.type = ".$type; + $sql .= " AND c.type = ".((int) $type); $sql .= " AND c.fk_parent = ".$this->fk_parent; $sql .= " AND c.label = '".$this->db->escape($this->label)."'"; @@ -1316,7 +1358,9 @@ class Categorie extends CommonObject // Check contrast with background and correct text color $forced_color = 'categtextwhite'; if ($cat->color) { - if (colorIsLight($cat->color)) $forced_color = 'categtextblack'; + if (colorIsLight($cat->color)) { + $forced_color = 'categtextblack'; + } } } } @@ -1397,8 +1441,9 @@ class Categorie extends CommonObject } } - if (count($ways) == 0) + if (count($ways) == 0) { $ways[0][0] = $this; + } return $ways; } @@ -1417,13 +1462,15 @@ class Categorie extends CommonObject { $cats = array(); - if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; + if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; + } if ($type === Categorie::TYPE_BANK_LINE) { // TODO Remove this with standard category code after migration of llx_bank_categ into llx_categorie // Load bank categories $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 .= " WHERE a.lineid=".((int) $id)." AND a.fk_categ = c.rowid"; $sql .= " AND c.entity IN (".getEntity('category').")"; $sql .= " ORDER BY c.label"; @@ -1473,7 +1520,6 @@ class Categorie extends CommonObject return $cats; } - /** * Returns categories whose id or name match * add wildcards in the name unless $exact = true @@ -1507,14 +1553,17 @@ class Categorie extends CommonObject $sql .= " WHERE type = ".$this->MAP_ID[$type]; $sql .= " AND entity IN (".getEntity('category').")"; if ($nom) { - if (!$exact) - $nom = '%'.str_replace('*', '%', $nom).'%'; - if (!$case) + if (!$exact) { + $nom = '%'.$this->db->escape(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) { - $sql .= " AND rowid = '".$id."'"; + $sql .= " AND rowid = ".((int) $id); } $res = $this->db->query($sql); @@ -1552,7 +1601,9 @@ class Categorie extends CommonObject // Check contrast with background and correct text color $forced_color = 'categtextwhite'; if ($this->color) { - if (colorIsLight($this->color)) $forced_color = 'categtextblack'; + if (colorIsLight($this->color)) { + $forced_color = 'categtextblack'; + } } $link = ''; @@ -1561,9 +1612,15 @@ class Categorie extends CommonObject $picto = 'category'; - 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; + 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; } @@ -1651,13 +1708,18 @@ class Categorie extends CommonObject // Objet $obj = array(); $obj['photo'] = $photo; - if ($photo_vignette && is_file($dirthumb.$photo_vignette)) $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; - else $obj['photo_vignette'] = ""; + if ($photo_vignette && is_file($dirthumb.$photo_vignette)) { + $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; + } else { + $obj['photo_vignette'] = ""; + } $tabobj[$nbphoto - 1] = $obj; // On continue ou on arrete de boucler - if ($nbmax && $nbphoto >= $nbmax) break; + if ($nbmax && $nbphoto >= $nbmax) { + break; + } } } @@ -1729,7 +1791,7 @@ class Categorie extends CommonObject $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_lang"; $sql .= " WHERE fk_category=".$this->id; - $sql .= " AND lang='".$key."'"; + $sql .= " AND lang = '".$this->db->escape($key)."'"; $result = $this->db->query($sql); @@ -1762,8 +1824,9 @@ class Categorie extends CommonObject } // on ne sauvegarde pas des champs vides - if ($this->multilangs["$key"]["label"] || $this->multilangs["$key"]["description"] || $this->multilangs["$key"]["note"]) + 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; @@ -1874,7 +1937,9 @@ class Categorie extends CommonObject */ public static function getFilterJoinQuery($type, $rowIdName) { - if ($type == 'bank_account') $type = 'account'; + if ($type == 'bank_account') { + $type = 'account'; + } return " LEFT JOIN ".MAIN_DB_PREFIX."categorie_".$type." as cp ON ".$rowIdName." = cp.fk_".$type; } @@ -1889,7 +1954,9 @@ class Categorie extends CommonObject */ public static function getFilterSelectQuery($type, $rowIdName, $searchList) { - if ($type == 'bank_account') $type = 'account'; + if ($type == 'bank_account') { + $type = 'account'; + } if (empty($searchList) && !is_array($searchList)) { return ""; diff --git a/htdocs/categories/class/index.html b/htdocs/categories/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index f4b7e12cc30..91d32736cbc 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -35,10 +35,10 @@ $langs->load("categories"); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alphanohtml'); -$type = GETPOST('type', 'aZ09'); // Can be int or string $action = (GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'edit'); $confirm = GETPOST('confirm'); $cancel = GETPOST('cancel', 'alpha'); +$backtopage = GETPOST('backtopage', 'alpha'); $socid = (int) GETPOST('socid', 'int'); $label = (string) GETPOST('label', 'alphanohtml'); @@ -56,8 +56,14 @@ if ($id == "") { $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -if ($id > 0) { - $result = $object->fetch($id); +$result = $object->fetch($id, $label); +if ($result <= 0) { + dol_print_error($db, $object->error); exit; +} + +$type = $object->type; +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility } $extrafields = new ExtraFields($db); @@ -74,21 +80,25 @@ $error = 0; */ if ($cancel) { - header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); - exit; + if ($backtopage) { + header("Location: ".$backtopage); + exit; + } else { + header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); + exit; + } } // Action mise a jour d'une categorie if ($action == 'update' && $user->rights->categorie->creer) { $object->oldcopy = dol_clone($object); - $object->label = $label; + $object->label = $label; $object->description = dol_htmlcleanlastbr($description); $object->color = $color; $object->socid = ($socid > 0 ? $socid : 0); $object->visible = $visible; $object->fk_parent = $parent != -1 ? $parent : 0; - if (empty($object->label)) { $error++; $action = 'edit'; @@ -96,11 +106,18 @@ if ($action == 'update' && $user->rights->categorie->creer) { } if (!$error && empty($object->error)) { $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error && $object->update($user) > 0) { - header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); - exit; + if ($backtopage) { + header("Location: ".$backtopage); + exit; + } else { + header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); + exit; + } } else { setEventMessages($object->error, $object->errors, 'errors'); } @@ -131,6 +148,7 @@ print ''; print ''; print ''; print ''; +print ''; print dol_get_fiche_head(''); diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 164c07c7ae0..5779558e722 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -5,6 +5,7 @@ * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2021 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 @@ -34,7 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load translation files required by the page $langs->load("categories"); -if (!$user->rights->categorie->lire) accessforbidden(); +if (!$user->rights->categorie->lire) { + accessforbidden(); +} $id = GETPOST('id', 'int'); $type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT); @@ -42,7 +45,9 @@ $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 +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('categoryindex')); @@ -56,11 +61,15 @@ $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 { +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'); } @@ -102,24 +111,22 @@ if (empty($nosearch)) { /* * Categories found */ - if ($catname || $id > 0) - { + if ($catname || $id > 0) { $cats = $categstatic->rechercher($id, $catname, $typetext); print ''; print ''; - foreach ($cats as $cat) - { - $color = $categstatic->color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #bbb"'; - - print "\t".''."\n"; - print "\t\t'."\n"; + print "\t\t\n"; } print "
    '.$langs->trans("FoundCats").'
    "; + foreach ($cats as $cat) { $categstatic->id = $cat->id; $categstatic->ref = $cat->label; $categstatic->label = $cat->label; $categstatic->type = $cat->type; $categstatic->color = $cat->color; + $color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"'; + + print "\t".'
    "; print ''; print $categstatic->getNomUrl(1, ''); print ''; @@ -130,7 +137,9 @@ if (empty($nosearch)) { print "\t
    "; - } else print ' '; + } else { + print ' '; + } print ''; } @@ -145,43 +154,67 @@ $cate_arbo = $categstatic->get_full_arbo($typetext); $fulltree = $cate_arbo; // Load possible missing includes -if ($conf->global->CATEGORY_SHOW_COUNTS) -{ - if ($type == Categorie::TYPE_MEMBER) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - if ($type == Categorie::TYPE_ACCOUNT) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - if ($type == Categorie::TYPE_PROJECT) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - if ($type == Categorie::TYPE_USER) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +if (!empty($conf->global->CATEGORY_SHOW_COUNTS)) { + if ($type == Categorie::TYPE_MEMBER) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + } + if ($type == Categorie::TYPE_ACCOUNT) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + } + if ($type == Categorie::TYPE_PROJECT) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + } + if ($type == Categorie::TYPE_USER) { + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; + } } // Define data (format for treeview) $data = array(); $data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>''); -foreach ($fulltree as $key => $val) -{ +foreach ($fulltree as $key => $val) { $categstatic->id = $val['id']; $categstatic->ref = $val['label']; $categstatic->color = $val['color']; $categstatic->type = $type; - $li = $categstatic->getNomUrl(1, '', 60, $moreparam.'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam)); $desc = dol_htmlcleanlastbr($val['description']); $counter = ''; - - if ($conf->global->CATEGORY_SHOW_COUNTS) - { + if (!empty($conf->global->CATEGORY_SHOW_COUNTS)) { // we need only a count of the elements, so it is enough to consume only the id's from the database - $elements = $categstatic->getObjectsInCateg($type, 1); + $elements = $type == Categorie::TYPE_ACCOUNT + ? $categstatic->getObjectsInCateg("account", 1) // Categorie::TYPE_ACCOUNT is "bank_account" instead of "account" + : $categstatic->getObjectsInCateg($type, 1); + $counter = "
    ".(is_countable($elements) ? count($elements) : '0')."
    '.$counter. - '
    '.$li.''.img_view().'
    ' - ); + $entry = ''; + $entry .= ''; + + $entry .= ''; + + $entry .= $counter; + + $entry .= ''; + $entry .= ''; + $entry .= ''; + + $entry .= ''; + $entry .= '
    '; + $entry .= ''.$li.''; + $entry .= ''; + $entry .= ''.img_view().''; + $entry .= ''; + $entry .= ''.img_edit().''; + $entry .= ''; + $entry .= ''.img_delete().''; + $entry .= '
    '; + + $data[] = array('rowid' => $val['rowid'], 'fk_menu' => $val['fk_parent'], 'entry' => $entry); } @@ -189,16 +222,13 @@ foreach ($fulltree as $key => $val) print ''; print ''; $nbofentries = (count($data) - 1); - -if ($nbofentries > 0) -{ +if ($nbofentries > 0) { print ''; diff --git a/htdocs/categories/info.php b/htdocs/categories/info.php index f64f3be8f9e..f5b54f50de9 100644 --- a/htdocs/categories/info.php +++ b/htdocs/categories/info.php @@ -20,7 +20,7 @@ /** * \file htdocs/categories/info.php * \ingroup categories - * \brief Category info page + * \brief Category info page */ require '../main.inc.php'; @@ -37,18 +37,24 @@ $langs->loadLangs(array('categories', 'sendings')); $socid = 0; $id = GETPOST('id', 'int'); +$label = GETPOST('label', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -if (!$object->fetch($id) > 0) { - dol_print_error($db); - exit; +$result = $object->fetch($id, $label); +if ($result <= 0) { + dol_print_error($db, $object->error); exit; } + $type = $object->type; -if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} /* * View @@ -63,13 +69,13 @@ llxHeader('', $langs->trans('Categories'), ''); $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; $head = categories_prepare_head($object, $type); - print dol_get_fiche_head($head, 'info', $langs->trans($title), -1, 'category'); -$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type); -$linkback = ''.$langs->trans("BackToList").''; -$object->next_prev_filter = ' type = '.$type; + +$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type)); +$linkback = ''.$langs->trans("BackToList").''; +$object->next_prev_filter = ' type = '.$object->type; $object->ref = $object->label; -$morehtmlref = '
    '.$langs->trans("Root").' >> '; +$morehtmlref = '
    '.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); foreach ($ways as $way) { $morehtmlref .= $way."
    \n"; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 73c7664f6c2..5fb1c85dd40 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -38,12 +38,10 @@ $langs->loadlangs(array('categories', 'bills')); $id = GETPOST('id', 'int'); $label = GETPOST('label', 'alpha'); -$type = GETPOST('type'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -if ($id == '' && $label == '') -{ +if ($id == '' && $label == '') { dol_print_error('', 'Missing parameter id'); exit(); } @@ -52,32 +50,28 @@ if ($id == '' && $label == '') $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -$result = $object->fetch($id, $label, $type); +$result = $object->fetch($id, $label); if ($result <= 0) { dol_print_error($db, $object->error); exit; } -$object->fetch_optionals(); -if ($result <= 0) { - dol_print_error($db, $object->error); exit; -} -$upload_dir = $conf->categorie->multidir_output[$object->entity]; -if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +$type = $object->type; +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} + +$upload_dir = $conf->categorie->multidir_output[$object->entity]; /* * Actions */ -if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) -{ +if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && GETPOST("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])) - { + 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]); } @@ -90,13 +84,11 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sen } } -if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer) -{ +if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer) { $object->delete_photo($upload_dir."/".$_GET["file"]); } -if ($action == 'addthumb' && $_GET["file"]) -{ +if ($action == 'addthumb' && $_GET["file"]) { $object->addThumbs($upload_dir."/".$_GET["file"]); } @@ -110,22 +102,19 @@ llxHeader("", "", $langs->trans("Categories")); $form = new Form($db); $formother = new FormOther($db); -if ($object->id) -{ +if ($object->id) { $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; $head = categories_prepare_head($object, $type); - - print dol_get_fiche_head($head, 'photos', $langs->trans($title), -1, 'category'); - $linkback = ''.$langs->trans("BackToList").''; + $backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type)); + $linkback = ''.$langs->trans("BackToList").''; $object->next_prev_filter = ' type = '.$object->type; $object->ref = $object->label; $morehtmlref = '
    '.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); - foreach ($ways as $way) - { + foreach ($ways as $way) { $morehtmlref .= $way."
    \n"; } $morehtmlref .= '
    '; @@ -135,8 +124,7 @@ if ($object->id) /* * Confirmation de la suppression de photo */ - if ($action == 'delete') - { + 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); } @@ -165,18 +153,13 @@ if ($object->id) - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - + /* + * Action bar + */ print '
    '."\n"; - if ($action != 'ajout_photo' && $user->rights->categorie->creer) - { - if (!empty($conf->global->MAIN_UPLOAD_DOC)) - { + if ($action != 'ajout_photo' && $user->rights->categorie->creer) { + if (!empty($conf->global->MAIN_UPLOAD_DOC)) { print ''; print $langs->trans("AddPhoto").''; } else { @@ -190,16 +173,14 @@ if ($object->id) /* * Ajouter une photo */ - if ($action == 'ajout_photo' && $user->rights->categorie->creer && !empty($conf->global->MAIN_UPLOAD_DOC)) - { + if ($action == 'ajout_photo' && $user->rights->categorie->creer && !empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'].'?id='.$object->id.'&type='.$type, $langs->trans("AddPhoto"), 1, '', $user->rights->categorie->creer, 50, $object, '', false, '', 0); } // Affiche photos - if ($action != 'ajout_photo') - { + if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; @@ -211,23 +192,24 @@ if ($object->id) $listofphoto = $object->liste_photos($dir); - if (is_array($listofphoto) && count($listofphoto)) - { + if (is_array($listofphoto) && count($listofphoto)) { print '
    '; print '
    '.$langs->trans("Categories").''; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print ''; } print '
    '; tree_recur($data, $data[0], 0); print '
    '; - foreach ($listofphoto as $key => $obj) - { + foreach ($listofphoto as $key => $obj) { $nbphoto++; - if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print ''; - if ($nbbyrow) print ''; + } + if ($nbbyrow) { + print ''; - if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print ''; + if ($nbbyrow) { + print ''; + } + if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) { + print ''; + } } // Ferme tableau - while ($nbphoto % $nbbyrow) - { + while ($nbphoto % $nbbyrow) { print ''; $nbphoto++; } @@ -271,8 +254,7 @@ if ($object->id) print '
    '; + if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) { + print '
    '; + } print ''; // Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine - if ($obj['photo_vignette']) - { + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -248,22 +230,23 @@ if ($object->id) 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)) - { + 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) - { + if ($user->rights->categorie->creer) { print ''; print img_delete().''; } - if ($nbbyrow) print '
     
    '; } - if ($nbphoto < 1) - { + if ($nbphoto < 1) { print '
    '.$langs->trans("NoPhotoYet")."
    "; } } diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 423819c49ac..cd5d7ad8214 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -35,14 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('categories', 'languages')); -$id = GETPOST('id', 'int'); -$label = GETPOST('label', 'alpha'); +$id = GETPOST('id', 'int'); +$label = GETPOST('label', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); -$type = GETPOST('type', 'aZ09'); -if ($id == '' && $label == '') -{ +if ($id == '' && $label == '') { dol_print_error('', 'Missing parameter id'); exit(); } @@ -51,16 +49,15 @@ if ($id == '' && $label == '') $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -$result = $object->fetch($id, $label, $type); -if ($result <= 0) { - dol_print_error($db, $object->error); exit; -} -$object->fetch_optionals(); +$result = $object->fetch($id, $label); if ($result <= 0) { dol_print_error($db, $object->error); exit; } -if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +$type = $object->type; +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} /* * Actions @@ -68,8 +65,7 @@ if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backwar $error = 0; // retour a l'affichage des traduction si annulation -if ($cancel == $langs->trans("Cancel")) -{ +if ($cancel == $langs->trans("Cancel")) { $action = ''; } @@ -77,8 +73,7 @@ if ($cancel == $langs->trans("Cancel")) // Validation de l'ajout if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && -($user->rights->categorie->creer)) -{ +($user->rights->categorie->creer)) { $object->fetch($id); $current_lang = $langs->getDefaultLang(); @@ -110,7 +105,9 @@ $cancel != $langs->trans("Cancel") && // sauvegarde en base $res = $object->setMultiLangs($user); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } } @@ -125,13 +122,11 @@ $cancel != $langs->trans("Cancel") && // Validation de l'edition if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && -($user->rights->categorie->creer)) -{ +($user->rights->categorie->creer)) { $object->fetch($id); $current_lang = $langs->getDefaultLang(); - foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet - { + foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet $libelle = GETPOST('libelle-'.$key, 'alpha'); $desc = GETPOST('desc-'.$key); @@ -151,7 +146,9 @@ $cancel != $langs->trans("Cancel") && if (!$error) { $res = $object->setMultiLangs($user); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } if ($error) { @@ -179,17 +176,16 @@ $head = categories_prepare_head($object, $type); // Calculate $cnt_trans $cnt_trans = 0; -if (!empty($object->multilangs)) -{ - foreach ($object->multilangs as $key => $value) - { +if (!empty($object->multilangs)) { + foreach ($object->multilangs as $key => $value) { $cnt_trans++; } } print dol_get_fiche_head($head, 'translation', $langs->trans($title), -1, 'category'); -$linkback = ''.$langs->trans("BackToList").''; +$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type)); +$linkback = ''.$langs->trans("BackToList").''; $object->next_prev_filter = ' type = '.$object->type; $object->ref = $object->label; $morehtmlref = '
    '.$langs->trans("Root").' >> '; @@ -228,20 +224,17 @@ print dol_get_fiche_end(); -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - +/* + * Action bar + */ print "\n
    \n"; -if ($action == '') -{ - if ($user->rights->produit->creer || $user->rights->service->creer) - { +if ($action == '') { + if ($user->rights->produit->creer || $user->rights->service->creer) { print ''.$langs->trans('Add').''; - if ($cnt_trans > 0) print ''.$langs->trans('Update').''; + if ($cnt_trans > 0) { + print ''.$langs->trans('Update').''; + } } } @@ -249,8 +242,7 @@ print "\n
    \n"; -if ($action == 'edit') -{ +if ($action == 'edit') { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -260,10 +252,8 @@ if ($action == 'edit') print ''; print ''; - if (!empty($object->multilangs)) - { - foreach ($object->multilangs as $key => $value) - { + if (!empty($object->multilangs)) { + foreach ($object->multilangs as $key => $value) { print "
    ".$langs->trans('Language_'.$key)." :
    "; print ''; @@ -291,27 +281,27 @@ if ($action == 'edit') print ''; print ''; -} elseif ($action != 'add') -{ - if ($cnt_trans) print '
    '; +} elseif ($action != 'add') { + if ($cnt_trans) { + print '
    '; + } - if (!empty($object->multilangs)) - { - foreach ($object->multilangs as $key => $value) - { + if (!empty($object->multilangs)) { + foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); print '
    '; print ''; print ''; print ''; - if (!empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) - { + if (!empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) { print ''; } print '
    '.($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"].'
    '; } } - if (!$cnt_trans && $action != 'add') print '
    '.$langs->trans('NoTranslation').'
    '; + if (!$cnt_trans && $action != 'add') { + print '
    '.$langs->trans('NoTranslation').'
    '; + } } @@ -319,8 +309,7 @@ if ($action == 'edit') * Form to add a new translation */ -if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service->creer)) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 4fb2a1aede4..817c750a571 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -38,7 +38,6 @@ $langs->load("categories"); $id = GETPOST('id', 'int'); $label = GETPOST('label', 'alpha'); -$type = GETPOST('type', 'aZ09'); $removeelem = GETPOST('removeelem', 'int'); $elemid = GETPOST('elemid', 'int'); @@ -50,7 +49,7 @@ $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') : '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') +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Load variable for pagination @@ -58,13 +57,14 @@ $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 +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 ($id == "" && $label == "") -{ +if ($id == "" && $label == "") { dol_print_error('', 'Missing parameter id'); exit(); } @@ -73,20 +73,15 @@ if ($id == "" && $label == "") $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -$result = $object->fetch($id, $label, $type); -if ($result <= 0) { - dol_print_error($db, $object->error); exit; -} -$object->fetch_optionals(); +$result = $object->fetch($id, $label); if ($result <= 0) { dol_print_error($db, $object->error); exit; } -$objecttype = $object->type; -if (is_numeric($objecttype)) $objecttype = Categorie::$MAP_ID_TO_CODE[$objecttype]; -if ($type === '') $type = $objecttype; - -if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +$type = $object->type; +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); @@ -94,39 +89,35 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('categorycard', 'globalcard')); -// Protection when type provided is not similare to type of category -if ($objecttype != $type) { - print 'Error: Value for type parameter does not match value of the type of the category with id='.$id; - exit; -} - /* * Actions */ +if ($confirm == 'no') { + if ($backtopage) { + header("Location: ".$backtopage); + exit; + } +} + $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Remove element from category -if ($id > 0 && $removeelem > 0) -{ - if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) - { +if ($id > 0 && $removeelem > 0) { + if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $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); @@ -136,20 +127,17 @@ if ($id > 0 && $removeelem > 0) $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); $result = $tmpobject->fetch($removeelem); @@ -157,15 +145,20 @@ if ($id > 0 && $removeelem > 0) } $result = $object->del_type($tmpobject, $elementtype); - if ($result < 0) dol_print_error('', $object->error); + if ($result < 0) { + dol_print_error('', $object->error); + } } -if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes') -{ - if ($object->delete($user) >= 0) - { - header("Location: ".DOL_URL_ROOT.'/categories/index.php?type='.$type); - exit; +if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes') { + if ($object->delete($user) >= 0) { + if ($backtopage) { + header("Location: ".$backtopage); + exit; + } else { + header("Location: ".DOL_URL_ROOT.'/categories/index.php?type='.$type); + exit; + } } else { setEventMessages($object->error, $object->errors, 'errors'); } @@ -175,20 +168,16 @@ if ($elemid && $action == 'addintocategory' && (($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer)) || ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) || ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) - )) -{ - if ($type == Categorie::TYPE_PRODUCT) - { + )) { + if ($type == Categorie::TYPE_PRODUCT) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $newobject = new Product($db); $elementtype = 'product'; - } elseif ($type == Categorie::TYPE_CUSTOMER) - { + } elseif ($type == Categorie::TYPE_CUSTOMER) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $newobject = new Societe($db); $elementtype = 'customer'; - } elseif ($type == Categorie::TYPE_SUPPLIER) - { + } elseif ($type == Categorie::TYPE_SUPPLIER) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $newobject = new Societe($db); $elementtype = 'supplier'; @@ -197,12 +186,10 @@ if ($elemid && $action == 'addintocategory' && // TODO Add into categ $result = $object->add_type($newobject, $elementtype); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("WasAddedSuccessfully", $newobject->ref), null, 'mesgs'); } else { - if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -220,37 +207,40 @@ $formother = new FormOther($db); $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'); -$helpurl = ''; -llxHeader("", $langs->trans("Categories"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss); + +$help_url = ''; + +llxHeader("", $langs->trans("Categories"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss); $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; $head = categories_prepare_head($object, $type); - - print dol_get_fiche_head($head, 'card', $langs->trans($title), -1, 'category'); -$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type); -$linkback = ''.$langs->trans("BackToList").''; + +$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type)); +$linkback = ''.$langs->trans("BackToList").''; $object->next_prev_filter = ' type = '.$object->type; $object->ref = $object->label; -$morehtmlref = '
    '.$langs->trans("Root").' >> '; +$morehtmlref = '
    '.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); -foreach ($ways as $way) -{ +foreach ($ways as $way) { $morehtmlref .= $way."
    \n"; } $morehtmlref .= '
    '; -dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.$type, 0, '', '', 1); +dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.urlencode($type), 0, '', '', 1); /* * Confirmation suppression */ -if ($action == 'delete') -{ - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 1); +if ($action == 'delete') { + if ($backtopage) { + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&backtopage='.urlencode($backtopage), $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 2); + } else { + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 1); + } } print '
    '; @@ -286,25 +276,24 @@ print dol_get_fiche_end(); print "
    \n"; $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { - if ($user->rights->categorie->creer) - { + if ($user->rights->categorie->creer) { $socid = ($object->socid ? "&socid=".$object->socid : ""); print ''.$langs->trans("Modify").''; } - if ($user->rights->categorie->supprimer) - { - print 'id.'&type='.$type.'">'.$langs->trans("Delete").''; + if ($user->rights->categorie->supprimer) { + print 'id.'&type='.$type.'&backtolist='.urlencode($backtolist).'">'.$langs->trans("Delete").''; } } print "
    "; $newcardbutton = ''; -if (!empty($user->rights->categorie->creer)) -{ +if (!empty($user->rights->categorie->creer)) { $link = DOL_URL_ROOT.'/categories/card.php'; $link .= '?action=create'; $link .= '&type='.$type; @@ -333,8 +322,7 @@ print '
    '.$langs->trans("SubCats").''; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print '
    '; print ''.img_picto('', 'folder').' '.$langs->trans("UndoExpandAll").''; print " | "; @@ -346,11 +334,9 @@ print '
    '.$langs->trans("NoSubCat").'
    ".(is_countable($elements) ? count($elements) : '0')."
    '; $entry .= ''; $entry .= ''; - $entry .= ''; + $entry .= $counter; $entry .= ''; + $entry .= ''; + $entry .= ''; $entry .= ''; @@ -412,8 +409,8 @@ if ($cats < 0) $data[] = array('rowid' => $val['rowid'], 'fk_menu' => $val['fk_parent'], 'entry' => $entry); } - if ((count($data) - 1)) - { + $nbofentries = (count($data) - 1); + if ($nbofentries > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; print ''; print ''; if ($num > 0) { - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); @@ -216,7 +218,7 @@ if ($result) print $bprev->getNomUrl(1); print "\n"; print '\n"; - print '\n"; + print '\n"; print '\n"; print "\n"; diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index ccb60486c76..a912ecdba3a 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -36,7 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); // Security check -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // Get supervariables $action = GETPOST('action', 'aZ09'); @@ -49,52 +51,49 @@ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST('sortorder', 'aZ09comma'); $sortfield = GETPOST('sortfield', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if ($page == -1 || $page == null) { $page = 0; } +if ($page == -1 || $page == null) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if ($sortorder == "") $sortorder = "DESC"; -if ($sortfield == "") $sortfield = "pl.fk_soc"; +if ($sortorder == "") { + $sortorder = "DESC"; +} +if ($sortfield == "") { + $sortfield = "pl.fk_soc"; +} /* * Actions */ -if ($action == 'confirm_rejet') -{ - if (GETPOST("confirm") == 'yes') - { - if (GETPOST('remonth', 'int')) - { +if ($action == 'confirm_rejet') { + if (GETPOST("confirm") == 'yes') { + if (GETPOST('remonth', 'int')) { $daterej = mktime(2, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); } - if (empty($daterej)) - { + if (empty($daterej)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); - } elseif ($daterej > dol_now()) - { + } elseif ($daterej > dol_now()) { $error++; $langs->load("error"); setEventMessages($langs->transnoentities("ErrorDateMustBeBeforeToday"), null, 'errors'); } - if (GETPOST('motif', 'alpha') == 0) - { + if (GETPOST('motif', 'alpha') == 0) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefusedReason")), null, 'errors'); } - if (!$error) - { + if (!$error) { $lipre = new LignePrelevement($db); - if ($lipre->fetch($id) == 0) - - { + if ($lipre->fetch($id) == 0) { $rej = new RejetPrelevement($db, $user, $type); $rej->create($user, $id, GETPOST('motif', 'alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer', 'int')); @@ -133,12 +132,10 @@ $head[$h][1] = $title; $hselected = $h; $h++; -if ($id) -{ +if ($id) { $lipre = new LignePrelevement($db); - if ($lipre->fetch($id) >= 0) - { + if ($lipre->fetch($id) >= 0) { $bon = new BonPrelevement($db); $bon->fetch($lipre->bon_rowid); @@ -156,16 +153,13 @@ if ($id) print ''; print ''; - if ($lipre->statut == 3) - { + if ($lipre->statut == 3) { $rej = new RejetPrelevement($db, $user, $type); $resf = $rej->fetch($lipre->id); - if ($resf == 0) - { + if ($resf == 0) { print ''; print '\n"; - print '\n"; + print '\n"; print '\n"; if ($num) { - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); $bon->id = $obj->rowid; @@ -247,7 +266,7 @@ if ($result) print '\n"; - print '\n"; + print '\n"; print ''; diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index 7b37238982b..5c6f058bff1 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -35,7 +35,9 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'di // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); @@ -44,12 +46,18 @@ $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 +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.datec"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.datec"; +} // Get supervariables $statut = GETPOST('statut', 'int'); @@ -69,8 +77,7 @@ if ($type == 'bank-transfer') { * 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 -{ +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_amount = ""; } @@ -90,19 +97,21 @@ if ($type == 'bank-transfer') { } else { $sql .= " AND p.type = 'debit-order'"; } -if ($search_ref) $sql .= natural_search("p.ref", $search_ref); -if ($search_amount) $sql .= natural_search("p.amount", $search_amount, 1); +if ($search_ref) { + $sql .= natural_search("p.ref", $search_ref); +} +if ($search_amount) { + $sql .= natural_search("p.amount", $search_amount, 1); +} $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -111,27 +120,31 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $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 (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } $param .= "&statut=".urlencode($statut); $selectedfields = ''; $newcardbutton = ''; - if ($usercancreate) - { + if ($usercancreate) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php'); } // Lines of title fields print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -175,8 +188,7 @@ if ($result) $directdebitorder = new BonPrelevement($db); if ($num) { - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); $directdebitorder->id = $obj->rowid; @@ -193,7 +205,7 @@ if ($result) print '\n"; - print '\n"; + print '\n"; print '\n"; if ($num) { - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); print ''; diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index c046f2f278e..ae1dd54a13c 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -33,7 +33,9 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); @@ -64,13 +66,11 @@ if ($type == 'bank-transfer') { } $sql .= " AND pb.entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { $row = $db->fetch_row($resql); $total = $row[0]; $nbtotal = $row[1]; @@ -100,8 +100,7 @@ if ($type == 'bank-transfer') { $sql .= " GROUP BY pl.statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -111,8 +110,7 @@ if ($resql) print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); print ''; // Email - if (!empty($conf->mailing->enabled)) - { + 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; - } + if (!empty($conf->mailing->enabled)) { + $result=$object->getNoEmail(); + if ($result<0) { + setEventMessages($object->error, $object->errors, 'errors'); } - print ''; + print ''; } print ''; @@ -1386,7 +1372,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (!empty($object->socid)) { print ''; print ''; } @@ -1397,45 +1383,48 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->load_ref_elements(); - if (!empty($conf->propal->enabled)) - { + if (!empty($conf->propal->enabled)) { print ''; } - if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) - { + if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) { print ''; } - if (!empty($conf->contrat->enabled)) - { + if (!empty($conf->contrat->enabled)) { print ''; } - if (!empty($conf->facture->enabled)) - { + if (!empty($conf->facture->enabled)) { print ''; } print ''; print ''; -if ($object->thirdparty->client) -{ +if ($object->thirdparty->client) { $thirdTypeArray['customer'] = $langs->trans("customer"); - if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); - if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); - if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); - if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + if ($conf->propal->enabled && $user->rights->propal->lire) { + $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); + } + if ($conf->commande->enabled && $user->rights->commande->lire) { + $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); + } + if ($conf->facture->enabled && $user->rights->facture->lire) { + $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); + } + if ($conf->contrat->enabled && $user->rights->contrat->lire) { + $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + } } -if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); +if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) { + $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); +} -if ($object->thirdparty->fournisseur) -{ +if ($object->thirdparty->fournisseur) { $thirdTypeArray['supplier'] = $langs->trans("supplier"); - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { + $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) { + $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); + } // There no contact type for supplier proposals // if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); @@ -166,8 +190,7 @@ print ''; print ''; $sql_select = ''; -if ($type_element == 'fichinter') -{ // Customer : show products from invoices +if ($type_element == 'fichinter') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $documentstatic = new Fichinter($db); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, tc.libelle as type_contact_label, '; @@ -178,8 +201,7 @@ if ($type_element == 'fichinter') $where = ' WHERE f.entity IN ('.getEntity('ficheinter').')'; $dateprint = 'f.datec'; $doc_number = 'f.ref'; -} elseif ($type_element == 'invoice') -{ // Customer : show products from invoices +} elseif ($type_element == 'invoice') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $documentstatic = new Facture($db); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, '; @@ -192,8 +214,7 @@ if ($type_element == 'fichinter') $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); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; @@ -206,8 +227,7 @@ if ($type_element == 'fichinter') $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); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; @@ -220,8 +240,7 @@ if ($type_element == 'fichinter') $dateprint = 'c.date_commande'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; -} elseif ($type_element == 'supplier_invoice') -{ // Supplier : Show products from invoices. +} 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); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, tc.libelle as type_contact_label, '; @@ -234,22 +253,19 @@ if ($type_element == 'fichinter') $dateprint = 'f.datef'; $doc_number = 'f.ref'; $thirdTypeSelect = 'supplier'; -} -//elseif ($type_element == 'supplier_proposal') -//{ -// require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; -// $documentstatic=new SupplierProposal($db); -// $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, '; -// $tables_from = MAIN_DB_PREFIX."supplier_proposal as c,".MAIN_DB_PREFIX."supplier_proposaldet as d"; -// $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; -// $where.= " AND d.fk_supplier_proposal = c.rowid"; -// $where.= " AND c.entity = ".$conf->entity; -// $dateprint = 'c.date_valid'; -// $doc_number='c.ref'; -// $thirdTypeSelect='supplier'; -//} -elseif ($type_element == 'supplier_order') -{ // Supplier : Show products from orders. + //} elseif ($type_element == 'supplier_proposal') { + // require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; + // $documentstatic=new SupplierProposal($db); + // $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, '; + // $tables_from = MAIN_DB_PREFIX."supplier_proposal as c,".MAIN_DB_PREFIX."supplier_proposaldet as d"; + // $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); + // $where.= " AND d.fk_supplier_proposal = c.rowid"; + // $where.= " AND c.entity = ".$conf->entity; + // $dateprint = 'c.date_valid'; + // $doc_number='c.ref'; + // $thirdTypeSelect='supplier'; + //} +} elseif ($type_element == 'supplier_order') { // Supplier : Show products from orders. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $documentstatic = new CommandeFournisseur($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, tc.libelle as type_contact_label, '; @@ -262,8 +278,7 @@ elseif ($type_element == 'supplier_order') $dateprint = 'c.date_valid'; $doc_number = 'c.ref'; $thirdTypeSelect = 'supplier'; -} elseif ($type_element == 'contract') -{ // Order +} elseif ($type_element == 'contract') { // Order require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic = new Contrat($db); $documentstaticline = new ContratLigne($db); @@ -282,26 +297,40 @@ elseif ($type_element == 'supplier_order') $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -if (!empty($sql_select)) -{ +if (!empty($sql_select)) { $sql = $sql_select; $sql .= ' d.description as description'; - if ($type_element != 'fichinter' && $type_element != 'contract' && $type_element != 'supplier_proposal') $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element == 'supplier_proposal') $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element == 'contract') $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element != 'fichinter') $sql .= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity'; + if ($type_element != 'fichinter' && $type_element != 'contract' && $type_element != 'supplier_proposal') { + $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element == 'supplier_proposal') { + $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element == 'contract') { + $sql .= ', d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element != 'fichinter') { + $sql .= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity'; + } $sql .= " "; - if ($type_element != 'fichinter') $sql .= ", p.ref as prod_ref, p.label as product_label"; + if ($type_element != 'fichinter') { + $sql .= ", p.ref as prod_ref, p.label as product_label"; + } $sql .= " FROM "/*.MAIN_DB_PREFIX."societe as s, "*/.$tables_from; // if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; $sql .= $where; $sql .= dolSqlDateFilter($dateprint, 0, $month, $year); - if ($sref) $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; - if ($sprod_fulldescr) - { + if ($sref) { + $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; + } + if ($sprod_fulldescr) { $sql .= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'"; - if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; - if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'"; + if (GETPOST('type_element') != 'fichinter') { + $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; + } + if (GETPOST('type_element') != 'fichinter') { + $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'"; + } $sql .= ")"; } $sql .= $db->order($sortfield, $sortorder); @@ -332,21 +361,36 @@ $param .= "&type_element=".urlencode($type_element); $total_qty = 0; -if ($sql_select) -{ +if ($sql_select) { $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $num = $db->num_rows($resql); $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($sprod_fulldescr) $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); - if ($sref) $param .= "&sref=".urlencode($sref); - if ($month) $param .= "&month=".urlencode($month); - if ($year) $param .= "&year=".urlencode($year); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($sprod_fulldescr) { + $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); + } + if ($sref) { + $param .= "&sref=".urlencode($sref); + } + if ($month) { + $param .= "&month=".urlencode($month); + } + if ($year) { + $param .= "&year=".urlencode($year); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit); @@ -393,8 +437,7 @@ if ($sql_select) $i = 0; - while (($objp = $db->fetch_object($resql)) && $i < min($num, $limit)) - { + while (($objp = $db->fetch_object($resql)) && $i < min($num, $limit)) { $documentstatic->id = $objp->doc_id; $documentstatic->ref = $objp->doc_number; $documentstatic->type = $objp->doc_type; @@ -405,7 +448,9 @@ if ($sql_select) $documentstatic->paye = $objp->paid; $documentstatic->paid = $objp->paid; - if (is_object($documentstaticline)) $documentstaticline->statut = $objp->status; + if (is_object($documentstaticline)) { + $documentstaticline->statut = $objp->status; + } print ''; print ''; - } + print ''; + } - else - { - print ''; - } - }*/ + else + { + print ''; + } + }*/ // Civility print '
    '; - $entry .= ''.$categstatic->getNomUrl(1, '', 60).''; + $entry .= ''.$li.''; $entry .= ''.$counter.''; - $entry .= ''.img_view().''; + $entry .= ''.img_view().''; + $entry .= ''; + $entry .= ''.img_edit().''; + $entry .= ''; + $entry .= ''.img_delete().''; $entry .= '
    '; @@ -456,19 +453,16 @@ $typeid = $type; // List of products or services (type is type of category) -if ($type == Categorie::TYPE_PRODUCT) -{ +if ($type == Categorie::TYPE_PRODUCT) { $permission = ($user->rights->produit->creer || $user->rights->service->creer); $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($prods < 0) - { + if ($prods < 0) { dol_print_error($db, $object->error, $object->errors); } else { // Form to add record into a category $showclassifyform = 1; - if ($showclassifyform) - { + if ($showclassifyform) { print '
    '; print '
    '; print ''; @@ -501,13 +495,13 @@ if ($type == Categorie::TYPE_PRODUCT) print ''."\n"; print ''."\n"; - if (count($prods) > 0) - { + if (count($prods) > 0) { $i = 0; - foreach ($prods as $prod) - { + foreach ($prods as $prod) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print '
    '.$langs->trans("Ref").'
    '; @@ -516,8 +510,7 @@ if ($type == Categorie::TYPE_PRODUCT) print ''.$prod->label."'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -535,19 +528,16 @@ if ($type == Categorie::TYPE_PRODUCT) } } -if ($type == Categorie::TYPE_CUSTOMER) -{ +if ($type == Categorie::TYPE_CUSTOMER) { $permission = $user->rights->societe->creer; $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($socs < 0) - { + if ($socs < 0) { dol_print_error($db, $object->error, $object->errors); } else { // Form to add record into a category $showclassifyform = 1; - if ($showclassifyform) - { + if ($showclassifyform) { print '
    '; print ''; print ''; @@ -579,13 +569,13 @@ if ($type == Categorie::TYPE_CUSTOMER) print ''."\n"; print ''."\n"; - if (count($socs) > 0) - { + if (count($socs) > 0) { $i = 0; - foreach ($socs as $key => $soc) - { + foreach ($socs as $key => $soc) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); print ''; print "\n"; diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 2ce24d20d90..c0d13f6b16f 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -38,7 +38,9 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', ''); @@ -55,8 +57,7 @@ $result = restrictedArea($user, 'prelevement', '', ''); llxHeader('', $langs->trans("CustomersStandingOrdersArea")); -if (prelevement_check_config() < 0) -{ +if (prelevement_check_config() < 0) { $langs->load("errors"); setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors'); } @@ -83,9 +84,9 @@ print ''; print ''; print ''; -print '
    '.$langs->trans("Name").'
    '; @@ -593,8 +583,7 @@ if ($type == Categorie::TYPE_CUSTOMER) print "'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -613,19 +602,16 @@ if ($type == Categorie::TYPE_CUSTOMER) } -if ($type == Categorie::TYPE_SUPPLIER) -{ +if ($type == Categorie::TYPE_SUPPLIER) { $permission = $user->rights->societe->creer; $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($socs < 0) - { + if ($socs < 0) { dol_print_error($db, $object->error, $object->errors); } else { // Form to add record into a category $showclassifyform = 1; - if ($showclassifyform) - { + if ($showclassifyform) { print '
    '; print ''; print ''; @@ -657,13 +643,13 @@ if ($type == Categorie::TYPE_SUPPLIER) print ''."\n"; print '\n"; - if (count($socs) > 0) - { + if (count($socs) > 0) { $i = 0; - foreach ($socs as $soc) - { + foreach ($socs as $soc) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print ''; print ''; - if ($object->date_trans <> 0) - { + if ($object->date_trans <> 0) { $muser = new User($db); $muser->fetch($object->user_trans); @@ -104,8 +105,7 @@ if ($prev_id > 0 || $ref) print $object->methodes_trans[$object->method_trans]; print ''; } - if ($object->date_credit <> 0) - { + if ($object->date_credit <> 0) { print ''; @@ -123,22 +123,29 @@ if ($prev_id > 0 || $ref) print ''; print ''; print ''; print '
    '.$langs->trans("Name")."
    '; @@ -671,8 +657,7 @@ if ($type == Categorie::TYPE_SUPPLIER) print "'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -692,15 +677,13 @@ if ($type == Categorie::TYPE_SUPPLIER) } // List of members -if ($type == Categorie::TYPE_MEMBER) -{ +if ($type == Categorie::TYPE_MEMBER) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $permission = $user->rights->adherent->creer; $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($prods < 0) - { + if ($prods < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -717,13 +700,13 @@ if ($type == Categorie::TYPE_MEMBER) print "\n"; print ''."\n"; - if (count($prods) > 0) - { + if (count($prods) > 0) { $i = 0; - foreach ($prods as $key => $member) - { + foreach ($prods as $key => $member) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print '
    '.$langs->trans("Name").'
    '; @@ -734,8 +717,7 @@ if ($type == Categorie::TYPE_MEMBER) print ''.$member->firstname."'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -753,13 +735,11 @@ if ($type == Categorie::TYPE_MEMBER) } // Categorie contact -if ($type == Categorie::TYPE_CONTACT) -{ +if ($type == Categorie::TYPE_CONTACT) { $permission = $user->rights->societe->creer; $contacts = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($contacts < 0) - { + if ($contacts < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -779,13 +759,13 @@ if ($type == Categorie::TYPE_CONTACT) print ''."\n"; print ''."\n"; - if (count($contacts) > 0) - { + if (count($contacts) > 0) { $i = 0; - foreach ($contacts as $key => $contact) - { + foreach ($contacts as $key => $contact) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print ''; print ''; $i = 0; -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } $invoicestatic->fetch($obj->rowid); diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 1f8ecdaeced..c00c29e1c39 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -35,7 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals')); // Securite acces client -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // Get supervariables $id = GETPOST('id', 'int'); @@ -48,12 +50,18 @@ $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 +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 = 'p.ref'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'p.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} $object = new BonPrelevement($db); @@ -79,10 +87,8 @@ $thirdpartytmp = new Societe($db); llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($id > 0 || $ref) -{ - if ($object->fetch($id, $ref) >= 0) - { +if ($id > 0 || $ref) { + if ($object->fetch($id, $ref) >= 0) { $head = prelevement_prepare_head($object); print dol_get_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); @@ -98,8 +104,7 @@ if ($id > 0 || $ref) print ''; print ''; - if ($object->date_trans <> 0) - { + if ($object->date_trans <> 0) { $muser = new User($db); $muser->fetch($object->user_trans); @@ -110,8 +115,7 @@ if ($id > 0 || $ref) print $object->methodes_trans[$object->method_trans]; print ''; } - if ($object->date_credit <> 0) - { + if ($object->date_credit <> 0) { print ''; @@ -129,22 +133,29 @@ if ($id > 0 || $ref) print ''; print ''; print ''; print '
    '.$langs->trans("Ref").'
    '; @@ -793,8 +773,7 @@ if ($type == Categorie::TYPE_CONTACT) print "'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -813,15 +792,13 @@ if ($type == Categorie::TYPE_CONTACT) } // List of bank accounts -if ($type == Categorie::TYPE_ACCOUNT) -{ +if ($type == Categorie::TYPE_ACCOUNT) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $permission = $user->rights->banque->creer; $accounts = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($accounts < 0) - { + if ($accounts < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -838,13 +815,13 @@ if ($type == Categorie::TYPE_ACCOUNT) print "\n"; print ''."\n"; - if (count($accounts) > 0) - { + if (count($accounts) > 0) { $i = 0; - foreach ($accounts as $key => $account) - { + foreach ($accounts as $key => $account) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print '\n"; + $i++; + } + print "
    '.$langs->trans("Ref").'
    '; @@ -854,8 +831,7 @@ if ($type == Categorie::TYPE_ACCOUNT) print ''.$account->number."'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -873,15 +849,13 @@ if ($type == Categorie::TYPE_ACCOUNT) } // List of Project -if ($type == Categorie::TYPE_PROJECT) -{ +if ($type == Categorie::TYPE_PROJECT) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $permission = $user->rights->projet->creer; $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($objects < 0) - { + if ($objects < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -899,13 +873,13 @@ if ($type == Categorie::TYPE_PROJECT) print "\n"; print ''."\n"; - if (count($objects) > 0) - { + if (count($objects) > 0) { $i = 0; - foreach ($objects as $key => $project) - { + foreach ($objects as $key => $project) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print ''; 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 + print ''; + } print ''; - if ($num) - { + if ($num) { require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; $bac = new CompanyBankAccount($db); - while ($i < $num && $i < $limit) - { + while ($i < $num && $i < $limit) { $obj = $db->fetch_object($resql); $bac->fetch(0, $obj->socid); @@ -363,7 +409,9 @@ if ($resql) // RIB print ''; // RUM @@ -373,10 +421,12 @@ if ($resql) print $rumtoshow; $format = $thirdpartystatic->display_rib('format'); if ($type != 'bank-transfer') { - if ($format) print ' ('.$format.')'; + if ($format) { + print ' ('.$format.')'; + } } } else { - print img_warning($langs->trans("NoBankAccount")); + print img_warning($langs->trans("NoBankAccountDefined")); } print ''; // Amount @@ -387,6 +437,16 @@ if ($resql) print ''; + // Action column + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + print ''; + } print ''; $i++; } @@ -419,41 +479,41 @@ $sql.=$db->plimit($limit); $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result); - $i = 0; + $num = $db->num_rows($result); + $i = 0; - print"\n\n"; - print '
    '.$langs->trans("Ref").'
    '; @@ -915,8 +889,7 @@ if ($type == Categorie::TYPE_PROJECT) print ''.$project->title."'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -934,13 +907,11 @@ if ($type == Categorie::TYPE_PROJECT) } // List of users -if ($type == Categorie::TYPE_USER) -{ +if ($type == Categorie::TYPE_USER) { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $users = $object->getObjectsInCateg($type); - if ($users < 0) - { + if ($users < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -960,11 +931,9 @@ if ($type == Categorie::TYPE_USER) print "\n"; print ''."\n"; - if (count($users) > 0) - { + if (count($users) > 0) { // Use "$userentry" here, because "$user" is the current user - foreach ($users as $key => $userentry) - { + foreach ($users as $key => $userentry) { print "\t".''."\n"; print ''; @@ -426,19 +423,16 @@ if ($id > 0 || $ref) print $thirdparty->getNomUrl(1); print "\n"; - print '\n"; + print '\n"; print ''; print ''; print ''; print '\n"; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 721d7c10111..dbf2d67778a 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2014-2016 Ferran Marcet * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2019 JC Prieto * * 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 @@ -143,10 +144,8 @@ class BonPrelevement extends CommonObject // Add lines $result = $this->addline($line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key); - if ($result == 0) - { - if ($line_id > 0) - { + if ($result == 0) { + if ($line_id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture ("; if ($type != 'bank-transfer') { $sql .= "fk_facture"; @@ -159,8 +158,7 @@ class BonPrelevement extends CommonObject $sql .= ", ".$line_id; $sql .= ")"; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $result = 0; } else { $result = -1; @@ -198,8 +196,7 @@ class BonPrelevement extends CommonObject $result = -1; $concat = 0; - if ($concat == 1) - { + if ($concat == 1) { /* * We aggregate the lines */ @@ -212,8 +209,7 @@ class BonPrelevement extends CommonObject $sql .= " AND number = '".$this->db->escape($number)."'"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); } else { $result = -1; @@ -233,17 +229,16 @@ class BonPrelevement extends CommonObject $sql .= ", cle_rib"; $sql .= ") VALUES ("; $sql .= $this->id; - $sql .= ", ".$client_id; + $sql .= ", ".((int) $client_id); $sql .= ", '".$this->db->escape($client_nom)."'"; - $sql .= ", '".price2num($amount)."'"; + $sql .= ", ".((float) price2num($amount)); $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)) - { + if ($this->db->query($sql)) { $line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); $result = 0; } else { @@ -294,15 +289,16 @@ class BonPrelevement extends CommonObject $sql .= ", p.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; - if ($rowid > 0) $sql .= " AND p.rowid = ".$rowid; - else $sql .= " AND p.ref = '".$this->db->escape($ref)."'"; + if ($rowid > 0) { + $sql .= " AND p.rowid = ".((int) $rowid); + } else { + $sql .= " AND p.ref = '".$this->db->escape($ref)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -348,44 +344,38 @@ class BonPrelevement extends CommonObject $error = 0; - if ($this->db->begin()) - { + if ($this->db->begin()) { $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_bons"; $sql .= " SET statut = ".self::STATUS_TRANSFERED; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND entity = ".$conf->entity; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { dol_syslog(get_class($this)."::set_credite Erreur 1"); $error++; } - if (!$error) - { + if (!$error) { $facs = array(); $facs = $this->getListInvoices(); $num = count($facs); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { /* Tag invoice as paid */ dol_syslog(get_class($this)."::set_credite set_paid fac ".$facs[$i]); $fac = new Facture($this->db); $fac->fetch($facs[$i]); - $result = $fac->set_paid($user); + $result = $fac->setPaid($user); } } - 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_credite Erreur 1"); $error++; } @@ -394,8 +384,7 @@ class BonPrelevement extends CommonObject /* * End of procedure */ - if (!$error) - { + if (!$error) { $this->db->commit(); return 0; } else { @@ -425,10 +414,8 @@ class BonPrelevement extends CommonObject $error = 0; - if ($this->fetched == 1) - { - if ($date < $this->date_trans) - { + if ($this->fetched == 1) { + if ($date < $this->date_trans) { $this->error = 'DateOfMovementLowerThanDateOfFileTransmission'; dol_syslog("bon-prelevment::set_infocredit 1027 ".$this->error); return -1027; @@ -440,13 +427,12 @@ class BonPrelevement extends CommonObject $sql .= " SET fk_user_credit = ".$user->id; $sql .= ", statut = ".self::STATUS_CREDITED; $sql .= ", date_credit = '".$this->db->idate($date)."'"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $sql .= " AND entity = ".$conf->entity; $sql .= " AND statut = ".self::STATUS_TRANSFERED; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $langs->load('withdrawals'); $subject = $langs->trans("InfoCreditSubject", $this->ref); $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour')); @@ -461,8 +447,7 @@ class BonPrelevement extends CommonObject // Loop on each invoice. $facs=array(0=>id, 1=>amount requested) $num = count($facs); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { if ($this->type == 'bank-transfer') { $fac = new FactureFournisseur($this->db); } else { @@ -481,7 +466,7 @@ class BonPrelevement extends CommonObject // @TODO Move this after creation of payment if (price2num($alreadypayed + $facs[$i][1], 'MT') == $fac->total_ttc) { - $result = $fac->set_paid($user); + $result = $fac->setPaid($user); if ($result < 0) { $this->error = $fac->error; $this->errors = $fac->errors; @@ -491,8 +476,7 @@ class BonPrelevement extends CommonObject //var_dump($amountsperthirdparty);exit; // Make one payment per customer - foreach ($amountsperthirdparty as $thirdpartyid => $cursoramounts) - { + foreach ($amountsperthirdparty as $thirdpartyid => $cursoramounts) { if ($this->type == 'bank-transfer') { $paiement = new PaiementFourn($this->db); } else { @@ -513,8 +497,7 @@ class BonPrelevement extends CommonObject $paiement->id_prelevement = $this->id; $paiement_id = $paiement->create($user); // This use ->paiementid, that is ID of payment mode - if ($paiement_id < 0) - { + if ($paiement_id < 0) { $error++; $this->error = $paiement->error; $this->errors = $paiement->errors; @@ -527,8 +510,7 @@ class BonPrelevement extends CommonObject } $result = $paiement->addPaymentToBank($user, $modeforaddpayment, '(WithdrawalPayment)', $bankaccount, '', ''); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $paiement->error; $this->errors = $paiement->errors; @@ -561,8 +543,7 @@ class BonPrelevement extends CommonObject /* * End of procedure */ - if ($error == 0) - { + if ($error == 0) { $this->date_credit = $date; $this->statut = self::STATUS_CREDITED; @@ -594,19 +575,17 @@ class BonPrelevement extends CommonObject $error = 0; dol_syslog(get_class($this)."::set_infotrans Start", LOG_INFO); - if ($this->db->begin()) - { + if ($this->db->begin()) { $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons "; $sql .= " SET fk_user_trans = ".$user->id; $sql .= " , date_trans = '".$this->db->idate($date)."'"; - $sql .= " , method_trans = ".$method; + $sql .= " , method_trans = ".((int) $method); $sql .= " , statut = ".self::STATUS_TRANSFERED; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND entity = ".$conf->entity; $sql .= " AND statut = 0"; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->method_trans = $method; $langs->load('withdrawals'); $subject = $langs->trans("InfoTransSubject", $this->ref); @@ -618,8 +597,7 @@ class BonPrelevement extends CommonObject $error++; } - if ($error == 0) - { + if ($error == 0) { $this->date_trans = $date; $this->statut = 1; $this->user_trans = $user->id; @@ -659,7 +637,9 @@ class BonPrelevement extends CommonObject } else { $sql .= " pf.fk_facture"; } - if ($amounts) $sql .= ", SUM(pl.amount)"; + if ($amounts) { + $sql .= ", SUM(pl.amount)"; + } $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_facture as pf"; @@ -676,18 +656,16 @@ class BonPrelevement extends CommonObject } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_row($resql); - if (!$amounts) $arr[$i] = $row[0]; - else { + if (!$amounts) { + $arr[$i] = $row[0]; + } else { $arr[$i] = array( $row[0], $row[1] @@ -724,8 +702,7 @@ class BonPrelevement extends CommonObject } $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE f.entity IN (".getEntity('invoice').")"; - if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) - { + if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } if ($mode != 'bank-transfer') { @@ -739,8 +716,7 @@ class BonPrelevement extends CommonObject $sql .= " AND f.total_ttc > 0"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $this->db->free($resql); @@ -786,8 +762,7 @@ class BonPrelevement extends CommonObject } $sql .= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE f.entity IN (".getEntity('invoice').")"; - if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) - { + if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } if ($type == 'bank-transfer') { @@ -802,8 +777,7 @@ class BonPrelevement extends CommonObject dol_syslog(get_class($this)."::NbFactureAPrelever"); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $this->db->free($resql); @@ -851,7 +825,9 @@ class BonPrelevement extends CommonObject $datetimeprev = time(); //Choice the date of the execution direct debit - if (!empty($executiondate)) $datetimeprev = $executiondate; + if (!empty($executiondate)) { + $datetimeprev = $executiondate; + } $month = strftime("%m", $datetimeprev); $year = strftime("%Y", $datetimeprev); @@ -866,8 +842,7 @@ class BonPrelevement extends CommonObject $factures_prev_id = array(); $factures_errors = array(); - if (!$error) - { + if (!$error) { $sql = "SELECT f.rowid, pfd.rowid as pfdrowid, f.fk_soc"; $sql .= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib"; $sql .= ", pfd.amount"; @@ -895,13 +870,11 @@ class BonPrelevement extends CommonObject dol_syslog(__METHOD__."::Read invoices, sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_row($resql); $factures[$i] = $row; // All fields if ($row[7] == 0) { @@ -920,8 +893,7 @@ class BonPrelevement extends CommonObject } } - if (!$error) - { + if (!$error) { require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; $soc = new Societe($this->db); @@ -929,36 +901,29 @@ class BonPrelevement extends CommonObject $i = 0; dol_syslog(__METHOD__."::Check BAN", LOG_DEBUG); - if (count($factures) > 0) - { - foreach ($factures as $key => $fac) - { + if (count($factures) > 0) { + foreach ($factures as $key => $fac) { if ($type != 'bank-transfer') { $tmpinvoice = new Facture($this->db); } else { $tmpinvoice = new FactureFournisseur($this->db); } $resfetch = $tmpinvoice->fetch($fac[0]); - if ($resfetch >= 0) // Field 0 of $fac is rowid of invoice - { - if ($soc->fetch($tmpinvoice->socid) >= 0) - { + if ($resfetch >= 0) { // Field 0 of $fac is rowid of invoice + if ($soc->fetch($tmpinvoice->socid) >= 0) { $bac = new CompanyBankAccount($this->db); $bac->fetch(0, $soc->id); if ($type != 'bank-transfer') { - if ($format == 'FRST' && $bac->frstrecur != 'FRST') - { + if ($format == 'FRST' && $bac->frstrecur != 'FRST') { continue; } - if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR')) - { + if ($format == 'RCUR' && ($bac->frstrecur != 'RCUR' && $bac->frstrecur != 'RECUR')) { continue; } } - if ($bac->verif() >= 1) - { + if ($bac->verif() >= 1) { $factures_prev[$i] = $fac; /* second array necessary for BonPrelevement */ $factures_prev_id[$i] = $fac[0]; @@ -997,8 +962,7 @@ class BonPrelevement extends CommonObject $i++; }*/ - if (count($factures_prev) > 0) - { + if (count($factures_prev) > 0) { if ($mode == 'real') { $ok = 1; } else { @@ -1006,8 +970,7 @@ class BonPrelevement extends CommonObject } } - if ($ok) - { + if ($ok) { /* * We are in real mode. * We create order and build file into disk @@ -1019,8 +982,7 @@ class BonPrelevement extends CommonObject /* * Process order generation */ - if (!$error) - { + if (!$error) { $ref = substr($year, -2).$month; $sql = "SELECT substring(ref from char_length(ref) - 1)"; @@ -1032,8 +994,7 @@ class BonPrelevement extends CommonObject dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $row = $this->db->fetch_row($resql); $ref = "T".$ref.str_pad(dol_substr("00".intval($row[0]) + 1, 0, 2), 2, "0", STR_PAD_LEFT); @@ -1042,7 +1003,9 @@ class BonPrelevement extends CommonObject } else { $dir = $conf->paymentbybanktransfer->dir_output.'/receipts'; } - if (!is_dir($dir)) dol_mkdir($dir); + if (!is_dir($dir)) { + dol_mkdir($dir); + } $this->filename = $dir.'/'.$ref.'.xml'; @@ -1057,8 +1020,7 @@ class BonPrelevement extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons"); $this->id = $prev_id; $this->ref = $ref; @@ -1072,8 +1034,7 @@ class BonPrelevement extends CommonObject } } - if (!$error) - { + if (!$error) { if ($type != 'bank-transfer') { $fact = new Facture($this->db); } else { @@ -1083,10 +1044,8 @@ class BonPrelevement extends CommonObject /* * Create withdrawal receipt in database */ - if (count($factures_prev) > 0) - { - foreach ($factures_prev as $fac) // Add a link in database for each invoice - { + if (count($factures_prev) > 0) { + foreach ($factures_prev as $fac) { // Add a link in database for each invoice // Fetch invoice $result = $fact->fetch($fac[0]); if ($result < 0) { @@ -1108,8 +1067,7 @@ class BonPrelevement extends CommonObject * $fac[8] : client nom */ $ri = $this->AddFacture($fac[0], $fac[2], $fac[8], $fac[7], $fac[3], $fac[4], $fac[5], $fac[6], $type); - if ($ri <> 0) - { + if ($ri <> 0) { $error++; } @@ -1118,11 +1076,10 @@ class BonPrelevement extends CommonObject $sql .= " SET traite = 1"; $sql .= ", date_traite = '".$this->db->idate($now)."'"; $sql .= ", fk_prelevement_bons = ".$this->id; - $sql .= " WHERE rowid = ".$fac[1]; + $sql .= " WHERE rowid = ".((int) $fac[1]); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->errors[] = $this->db->lasterror(); dol_syslog(__METHOD__."::Update Error=".$this->db->lasterror(), LOG_ERR); @@ -1131,16 +1088,14 @@ class BonPrelevement extends CommonObject } } - if (!$error) - { + if (!$error) { /* * Create file of type='direct-debit' for direct debit order or type='bank-transfer' for credit transfer into a XML file */ dol_syslog(__METHOD__."::Init direct debit or credit transfer file for ".count($factures_prev)." invoices", LOG_DEBUG); - if (count($factures_prev) > 0) - { + if (count($factures_prev) > 0) { $this->date_echeance = $datetimeprev; $this->reference_remise = $ref; @@ -1149,8 +1104,7 @@ class BonPrelevement extends CommonObject $id = $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT; } $account = new Account($this->db); - if ($account->fetch($id) > 0) - { + if ($account->fetch($id) > 0) { $this->emetteur_code_banque = $account->code_banque; $this->emetteur_code_guichet = $account->code_guichet; $this->emetteur_numero_compte = $account->number; @@ -1158,7 +1112,7 @@ class BonPrelevement extends CommonObject $this->emetteur_iban = $account->iban; $this->emetteur_bic = $account->bic; - $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; + $this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics); $this->raison_sociale = $account->proprio; } @@ -1185,19 +1139,17 @@ class BonPrelevement extends CommonObject if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons"; $sql .= " SET amount = ".price2num($this->total); - $sql .= " WHERE rowid = ".$this->id; + $sql .= " WHERE rowid = ".((int) $this->id); $sql .= " AND entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR); } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { $triggername = 'DIRECT_DEBIT_ORDER_CREATE'; if ($type != 'bank-transfer') { $triggername = 'CREDIT_TRANSFER_ORDER_CREATE'; @@ -1205,12 +1157,13 @@ class BonPrelevement extends CommonObject // Call trigger $result = $this->call_trigger($triggername, $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return count($factures_prev); } else { @@ -1237,48 +1190,52 @@ class BonPrelevement extends CommonObject $error = 0; $resql1 = $resql2 = $resql3 = $resql4 = 0; - if (!$notrigger) - { + if (!$notrigger) { $triggername = 'DIRECT_DEBIT_ORDER_DELETE'; if ($this->type == 'bank-transfer') { $triggername = 'PAYMENTBYBANKTRANFER_DELETE'; } // Call trigger $result = $this->call_trigger($triggername, $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."prelevement_facture WHERE fk_prelevement_lignes IN (SELECT rowid FROM ".MAIN_DB_PREFIX."prelevement_lignes WHERE fk_prelevement_bons = ".$this->id.")"; $resql1 = $this->db->query($sql); - if (!$resql1) dol_print_error($this->db); + if (!$resql1) { + dol_print_error($this->db); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."prelevement_lignes WHERE fk_prelevement_bons = ".$this->id; $resql2 = $this->db->query($sql); - if (!$resql2) dol_print_error($this->db); + if (!$resql2) { + dol_print_error($this->db); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."prelevement_bons WHERE rowid = ".$this->id; $resql3 = $this->db->query($sql); - if (!$resql3) dol_print_error($this->db); + if (!$resql3) { + dol_print_error($this->db); + } } - if (!$error) - { + if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_facture_demande SET fk_prelevement_bons = NULL, traite = 0 WHERE fk_prelevement_bons = ".$this->id; $resql4 = $this->db->query($sql); - if (!$resql4) dol_print_error($this->db); + if (!$resql4) { + dol_print_error($this->db); + } } - if ($resql1 && $resql2 && $resql3 && $resql4 && !$error) - { + if ($resql1 && $resql2 && $resql3 && $resql4 && !$error) { $this->db->commit(); return 1; } else { @@ -1302,7 +1259,9 @@ class BonPrelevement extends CommonObject { global $conf, $langs, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -1323,19 +1282,20 @@ class BonPrelevement extends CommonObject $url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id; } - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowMyObject"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -1348,15 +1308,21 @@ 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 = ''; $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -1364,8 +1330,11 @@ class BonPrelevement extends CommonObject $hookmanager->initHooks(array('banktransferdao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -1386,8 +1355,7 @@ class BonPrelevement extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; $sql .= " WHERE rowid = ".((int) $rowid); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { return 0; } else { return -1; @@ -1410,8 +1378,7 @@ class BonPrelevement extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; $sql .= " WHERE fk_user=".$user." AND fk_action='".$this->db->escape($action)."'"; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { return 0; } else { return -1; @@ -1432,16 +1399,14 @@ class BonPrelevement extends CommonObject // phpcs:enable $result = 0; - if ($this->DeleteNotification($user, $action) == 0) - { + if ($this->DeleteNotification($user, $action) == 0) { $now = dol_now(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_user, fk_soc, fk_contact, fk_action)"; $sql .= " VALUES ('".$this->db->idate($now)."', ".$user.", 'NULL', 'NULL', '".$this->db->escape($action)."')"; dol_syslog("adnotiff: ".$sql); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $result = 0; } else { $result = -1; @@ -1476,8 +1441,7 @@ class BonPrelevement extends CommonObject dol_syslog(get_class($this)."::generate build file=".$this->filename." type=".$type); $this->file = fopen($this->filename, "w"); - if (empty($this->file)) - { + if (empty($this->file)) { $this->error = $langs->trans('ErrorFailedToOpenFile', $this->filename); return -1; } @@ -1486,8 +1450,7 @@ class BonPrelevement extends CommonObject $this->total = 0; // Build file for European countries - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { $found++; if ($type != 'bank-transfer') { @@ -1502,7 +1465,9 @@ class BonPrelevement extends CommonObject $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); $date_actu = $now; - if (!empty($executiondate)) $date_actu = $executiondate; + if (!empty($executiondate)) { + $date_actu = $executiondate; + } $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); @@ -1536,13 +1501,11 @@ class BonPrelevement extends CommonObject // Define $fileDebiteurSection. One section DrctDbtTxInf per invoice. $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cachearraytotestduplicate = array(); $num = $this->db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if (!empty($cachearraytotestduplicate[$obj->idfac])) { @@ -1566,8 +1529,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); } @@ -1589,18 +1551,20 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$conf->global->PRELEVEMENT_ICS.''.$CrLf); + fputs($this->file, ' '.$this->emetteur_ics.''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); // SEPA File Emetteur - if ($result != -2) - { fputs($this-> file, $fileEmetteurSection); } + if ($result != -2) { + fputs($this-> file, $fileEmetteurSection); + } // SEPA File Debiteurs - if ($result != -2) - { fputs($this-> file, $fileDebiteurSection); } + if ($result != -2) { + fputs($this-> file, $fileDebiteurSection); + } // SEPA FILE FOOTER fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1617,7 +1581,9 @@ class BonPrelevement extends CommonObject $dateTime_ECMA = dol_print_date($now, '%Y-%m-%dT%H:%M:%S'); $date_actu = $now; - if (!empty($executiondate)) $date_actu = $executiondate; + if (!empty($executiondate)) { + $date_actu = $executiondate; + } $dateTime_YMD = dol_print_date($date_actu, '%Y%m%d'); $dateTime_YMDHMS = dol_print_date($date_actu, '%Y%m%d%H%M%S'); @@ -1631,7 +1597,7 @@ class BonPrelevement extends CommonObject $sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,"; $sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,"; - $sql .= " f.ref as fac, pf.fk_facture_fourn as idfac,"; + $sql .= " f.ref as fac, pf.fk_facture_fourn as idfac, f.ref_supplier as fac_ref_supplier,"; $sql .= " rib.rowid, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum"; $sql .= " FROM"; $sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; @@ -1651,13 +1617,11 @@ class BonPrelevement extends CommonObject // Define $fileCrediteurSection. One section DrctDbtTxInf per invoice. $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cachearraytotestduplicate = array(); $num = $this->db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if (!empty($cachearraytotestduplicate[$obj->idfac])) { @@ -1669,7 +1633,7 @@ class BonPrelevement extends CommonObject $cachearraytotestduplicate[$obj->idfac] = $obj->rowid; $daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec); - $fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type); + $fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac_ref_supplier, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type); $this->total = $this->total + $obj->somme; $i++; } @@ -1703,18 +1667,20 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.$conf->global->PAYMENTBYBANKTRANSFER_ICS.''.$CrLf); + fputs($this->file, ' '.$this->emetteur_ics.''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); // SEPA File Emetteur (mycompany) - if ($result != -2) - { fputs($this-> file, $fileEmetteurSection); } + if ($result != -2) { + fputs($this-> file, $fileEmetteurSection); + } // SEPA File Creditors - if ($result != -2) - { fputs($this-> file, $fileCrediteurSection); } + if ($result != -2) { + fputs($this-> file, $fileCrediteurSection); + } // SEPA FILE FOOTER fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1723,8 +1689,7 @@ class BonPrelevement extends CommonObject } // Build file for Other Countries with unknow format - if (!$found) - { + if (!$found) { if ($type != 'bank-transfer') { $sql = "SELECT pl.amount"; $sql .= " FROM"; @@ -1738,12 +1703,10 @@ class BonPrelevement extends CommonObject // Lines $i = 0; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->total = $this->total + $obj->amount; @@ -1766,12 +1729,10 @@ class BonPrelevement extends CommonObject // Lines $i = 0; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->total = $this->total + $obj->amount; @@ -1936,7 +1897,7 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; // Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum) - $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters + $XML_DEBITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('DD-'.dol_trunc($row_idfac.'-'.$row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.round($row_somme, 2).''.$CrLf; $XML_DEBITOR .= ' '.$CrLf; @@ -1957,8 +1918,12 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))); $addressline2 = dol_string_unaccent(strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""))); - if (trim($addressline1)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; - if (trim($addressline2)) $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + if (trim($addressline1)) { + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; + } + if (trim($addressline2)) { + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + } $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; @@ -1978,7 +1943,7 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; // Add EndToEndId. Must be a unique ID for each payment (for example by including bank, buyer or seller, date, checksum) - $XML_CREDITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('AS-'.dol_trunc($row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters + $XML_CREDITOR .= ' '.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20)).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.round($row_somme, 2).''.$CrLf; @@ -2004,8 +1969,12 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))); $addressline2 = dol_string_unaccent(strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => ""))); - if (trim($addressline1)) $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; - if (trim($addressline2)) $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + if (trim($addressline1)) { + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline1, 70, 'right', 'UTF-8', true)).''.$CrLf; + } + if (trim($addressline2)) { + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc($addressline2, 70, 'right', 'UTF-8', true)).''.$CrLf; + } $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; @@ -2121,8 +2090,7 @@ class BonPrelevement extends CommonObject //$id = $configuration->global->PRELEVEMENT_ID_BANKACCOUNT; $id = ($type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT); $account = new Account($this->db); - if ($account->fetch($id) > 0) - { + if ($account->fetch($id) > 0) { $this->emetteur_code_banque = $account->code_banque; $this->emetteur_code_guichet = $account->code_guichet; $this->emetteur_numero_compte = $account->number; @@ -2130,7 +2098,7 @@ class BonPrelevement extends CommonObject $this->emetteur_iban = $account->iban; $this->emetteur_bic = $account->bic; - $this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; + $this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456"; $this->raison_sociale = $account->proprio; } @@ -2139,11 +2107,10 @@ class BonPrelevement extends CommonObject $sql = "SELECT rowid, ref"; $sql .= " FROM"; $sql .= " ".MAIN_DB_PREFIX."prelevement_bons as pb"; - $sql .= " WHERE pb.rowid = ".$this->id; + $sql .= " WHERE pb.rowid = ".((int) $this->id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $country = explode(':', $configuration->global->MAIN_INFO_SOCIETE_COUNTRY); @@ -2174,8 +2141,12 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""))); $addressline2 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""))); - if ($addressline1) $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; - if ($addressline2) $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + if ($addressline1) { + $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; + } + if ($addressline2) { + $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2236,8 +2207,12 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => ""))); $addressline2 = dol_string_unaccent(strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => ""))); - if ($addressline1) $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; - if ($addressline2) $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + if ($addressline1) { + $XML_SEPA_INFO .= ' '.$addressline1.''.$CrLf; + } + if ($addressline2) { + $XML_SEPA_INFO .= ' '.$addressline2.''.$CrLf; + } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2363,8 +2338,7 @@ class BonPrelevement extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('StatusWaiting'); @@ -2376,8 +2350,12 @@ class BonPrelevement extends CommonObject } $statusType = 'status1'; - if ($status == self::STATUS_TRANSFERED) $statusType = 'status3'; - if ($status == self::STATUS_CREDITED) $statusType = 'status6'; + if ($status == self::STATUS_TRANSFERED) { + $statusType = 'status3'; + } + if ($status == self::STATUS_CREDITED) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/compta/prelevement/class/index.html b/htdocs/compta/prelevement/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index e3b0833f925..1c57feca37e 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -79,15 +79,13 @@ class LignePrelevement $sql .= ", pl.statut, pl.fk_soc"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as p"; - $sql .= " WHERE pl.rowid=".$rowid; + $sql .= " WHERE pl.rowid=".((int) $rowid); $sql .= " AND p.rowid = pl.fk_prelevement_bons"; $sql .= " AND p.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -135,24 +133,32 @@ class LignePrelevement // phpcs:enable global $langs; - if ($mode == 0) - { + if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } 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) - { - 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) - { - 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'); - elseif ($status == 3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } 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) { + 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) { + 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'); + } elseif ($status == 3) { + return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } } } diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 8b7d21d221f..0faea8a159c 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -119,8 +119,7 @@ class RejetPrelevement $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { dol_syslog("RejetPrelevement::create Erreur 4"); dol_syslog("RejetPrelevement::create Erreur 4 $sql"); $error++; @@ -129,10 +128,9 @@ class RejetPrelevement // Tag the line to refused $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes "; $sql .= " SET statut = 3"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { dol_syslog("RejetPrelevement::create Erreur 5"); $error++; } @@ -184,15 +182,14 @@ class RejetPrelevement //Tag invoice as unpaid dol_syslog("RejetPrelevement::Create set_unpaid fac ".$fac->ref); - $fac->set_unpaid($user); + $fac->setUnpaid($user); //TODO: Must be managed by notifications module // Send email to sender of the standing order request $this->_send_email($fac); } - if ($error == 0) - { + if ($error == 0) { dol_syslog("RejetPrelevement::Create Commit"); $this->db->commit(); } else { @@ -221,11 +218,9 @@ class RejetPrelevement $sql .= " AND pfd.fk_facture".($this->type == 'bank-transfer' ? '_fourn=' : '=').$fac->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $row = $this->db->fetch_row($resql); $userid = $row[0]; } @@ -233,8 +228,7 @@ class RejetPrelevement dol_syslog("RejetPrelevement::_send_email Erreur lecture user"); } - if ($userid > 0) - { + if ($userid > 0) { $emuser = new User($this->db); $emuser->fetch($userid); @@ -288,22 +282,22 @@ class RejetPrelevement //Returns all invoices of a withdrawal $sql = "SELECT f.rowid as facid, pl.amount"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf"; - if ($this->type == 'bank-transfer') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON (pf.fk_facture_fourn = f.rowid)"; - else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)"; + if ($this->type == 'bank-transfer') { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON (pf.fk_facture_fourn = f.rowid)"; + } else { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)"; + } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_lignes as pl ON (pf.fk_prelevement_lignes = pl.rowid)"; $sql .= " WHERE pf.fk_prelevement_lignes = ".$this->id; $sql .= " AND f.entity IN (".getEntity('invoice').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_row($resql); if (!$amounts) { $arr[$i] = $row[0]; @@ -338,10 +332,8 @@ class RejetPrelevement $sql .= " WHERE pr.fk_prelevement_lignes =".$rowid; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $rowid; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index e93b2a7472d..6793fb0a893 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -40,18 +40,25 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies', 'bills')); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); // Get supervariables $action = GETPOST('action', 'aZ09'); +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list $mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real'; $format = GETPOST('format', 'aZ09'); +$id_bankaccount = GETPOST('id_bankaccount', 'int'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $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; $hookmanager->initHooks(array('directdebitcreatecard', 'globalcard')); @@ -60,28 +67,46 @@ $hookmanager->initHooks(array('directdebitcreatecard', 'globalcard')); /* * Actions */ +if (GETPOST('cancel', 'alpha')) { + $massaction = ''; +} $parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'page' => $page, 'offset' => $offset); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Change customer bank information to withdraw - if ($action == 'modify') - { - for ($i = 1; $i < 9; $i++) - { + if ($action == 'modify') { + for ($i = 1; $i < 9; $i++) { dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"), 'chaine', 0, '', $conf->entity); } } - if ($action == 'create') - { + if ($action == 'create') { + $default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT'); + + if ($id_bankaccount != $conf->global->{$default_account}) { + $res = dolibarr_set_const($db, $default_account, $id_bankaccount, 'chaine', 0, '', $conf->entity); //Set as default + } + + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $bank = new Account($db); + $bank->fetch($conf->global->{$default_account}); + if (empty($bank->ics) || empty($bank->ics_transfer)) { + $errormessage = str_replace('{url}', $bank->getNomUrl(1), $langs->trans("ErrorICSmissing", '{url}')); + setEventMessages($errormessage, null, 'errors'); + header("Location: ".DOL_URL_ROOT.'/compta/prelevement/create.php'); + exit; + } + + $delayindays = 0; if ($type != 'bank-transfer') { - $conf->global->PRELEVEMENT_ADDDAYS; + $delayindays = $conf->global->PRELEVEMENT_ADDDAYS; } else { - $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS; + $delayindays = $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS; } $bprev = new BonPrelevement($db); $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), (GETPOST('reday', 'int') + $delayindays), GETPOST('reyear', 'int')); @@ -94,8 +119,7 @@ if (empty($reshook)) $mesg = $langs->trans("NoInvoiceCouldBeWithdrawed", $format); setEventMessages($mesg, null, 'errors'); $mesg .= '
    '."\n"; - foreach ($bprev->invoice_in_error as $key => $val) - { + foreach ($bprev->invoice_in_error as $key => $val) { $mesg .= ''.$val."
    \n"; } } else { @@ -109,6 +133,9 @@ if (empty($reshook)) exit; } } + $objectclass = "BonPrelevement"; + $uploaddir = $conf->prelevement->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -125,15 +152,23 @@ if ($type != 'bank-transfer') { $invoicestatic = new FactureFournisseur($db); } $bprev = new BonPrelevement($db); +$arrayofselected = is_array($toselect) ? $toselect : array(); +// List of mass actions available +$arrayofmassactions = array( +); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); llxHeader('', $langs->trans("NewStandingOrder")); -if (prelevement_check_config() < 0) -{ +if (prelevement_check_config($type) < 0) { $langs->load("errors"); setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors'); } + /*$h=0; $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/create.php'; $head[$h][1] = $langs->trans("NewStandingOrder"); @@ -155,8 +190,7 @@ print dol_get_fiche_head(); $nb = $bprev->nbOfInvoiceToPay($type); $pricetowithdraw = $bprev->SommeAPrelever($type); -if ($nb < 0) -{ +if ($nb < 0) { dol_print_error($bprev->error); } print '
    '.$langs->trans("Users").' '.$num.'
    '; print $userentry->getNomUrl(1); @@ -973,8 +942,7 @@ if ($type == Categorie::TYPE_USER) // Link to delete from category print ''; - if ($user->rights->user->user->creer) - { + if ($user->rights->user->user->creer) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); @@ -993,15 +961,13 @@ if ($type == Categorie::TYPE_USER) // List of warehouses -if ($type == Categorie::TYPE_WAREHOUSE) -{ +if ($type == Categorie::TYPE_WAREHOUSE) { $permission = $user->rights->stock->creer; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $objects = $object->getObjectsInCateg($type, 0, $limit, $offset); - if ($objects < 0) - { + if ($objects < 0) { dol_print_error($db, $object->error, $object->errors); } else { print ''; @@ -1019,13 +985,13 @@ if ($type == Categorie::TYPE_WAREHOUSE) print "\n"; print ''."\n"; - if (count($objects) > 0) - { + if (count($objects) > 0) { $i = 0; - foreach ($objects as $key => $project) - { + foreach ($objects as $key => $project) { $i++; - if ($i > $limit) break; + if ($i > $limit) { + break; + } print "\t".''."\n"; print '\n"; // Link to delete from category print ''; // Status - Percent $withstatus = 0; - if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') - { + if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') { $withstatus = 1; - if ($event->percentage >= 0) $withstatus = 2; + if ($event->percentage >= 0) { + $withstatus = 2; + } } print '
    '.$langs->trans("Ref").'
    '; @@ -1035,8 +1001,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) print ''.$project->title."'; - if ($permission) - { + if ($permission) { print ""; print $langs->trans("DeleteFromCat"); print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index e5fe22c9168..296e0f3852f 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "other", "website")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $conf->dol_hide_leftmenu = 1; // Force hide of left menu. @@ -41,17 +43,37 @@ $page = GETPOST('page', 'alpha'); $pageid = GETPOST('pageid', 'int'); $action = GETPOST('action', 'aZ09'); -if (GETPOST('delete')) { $action = 'delete'; } -if (GETPOST('preview')) $action = 'preview'; -if (GETPOST('create')) { $action = 'create'; } -if (GETPOST('editmedia')) { $action = 'editmedia'; } -if (GETPOST('editcss')) { $action = 'editcss'; } -if (GETPOST('editmenu')) { $action = 'editmenu'; } -if (GETPOST('setashome')) { $action = 'setashome'; } -if (GETPOST('editmeta')) { $action = 'editmeta'; } -if (GETPOST('editcontent')) { $action = 'editcontent'; } +if (GETPOST('delete')) { + $action = 'delete'; +} +if (GETPOST('preview')) { + $action = 'preview'; +} +if (GETPOST('create')) { + $action = 'create'; +} +if (GETPOST('editmedia')) { + $action = 'editmedia'; +} +if (GETPOST('editcss')) { + $action = 'editcss'; +} +if (GETPOST('editmenu')) { + $action = 'editmenu'; +} +if (GETPOST('setashome')) { + $action = 'setashome'; +} +if (GETPOST('editmeta')) { + $action = 'editmeta'; +} +if (GETPOST('editcontent')) { + $action = 'editcontent'; +} -if (empty($action)) $action = 'preview'; +if (empty($action)) { + $action = 'preview'; +} @@ -60,13 +82,16 @@ if (empty($action)) $action = 'preview'; * Actions */ -if (GETPOST('refreshsite')) $pageid = 0; // If we change the site, we reset the pageid. -if (GETPOST('refreshpage')) $action = 'preview'; +if (GETPOST('refreshsite')) { + $pageid = 0; // If we change the site, we reset the pageid. +} +if (GETPOST('refreshpage')) { + $action = 'preview'; +} // Add a collab page -if ($action == 'add') -{ +if ($action == 'add') { $db->begin(); $objectpage->title = GETPOST('WEBSITE_TITLE'); @@ -74,23 +99,19 @@ if ($action == 'add') $objectpage->description = GETPOST('WEBSITE_DESCRIPTION'); $objectpage->keywords = GETPOST('WEBSITE_KEYWORD'); - if (empty($objectpage->title)) - { + if (empty($objectpage->title)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WEBSITE_PAGENAME")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $res = $objectpage->create($user); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("PageAdded", $objectpage->pageurl), null, 'mesgs'); $action = ''; @@ -103,25 +124,21 @@ if ($action == 'add') } // Update page -if ($action == 'delete') -{ +if ($action == 'delete') { $db->begin(); $res = $object->fetch(0, $website); $res = $objectpage->fetch($pageid, $object->fk_website); - if ($res > 0) - { + if ($res > 0) { $res = $objectpage->delete($user); - if (!($res > 0)) - { + if (!($res > 0)) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("PageDeleted", $objectpage->pageurl, $website), null, 'mesgs'); @@ -149,15 +166,16 @@ llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, '', '', '', '', ' print "\n".'
    '; print ''; -if ($action == 'create') -{ +if ($action == 'create') { print ''; } // Add a margin under toolbar ? $style = ''; -if ($action != 'preview' && $action != 'editcontent') $style = ' margin-bottom: 5px;'; +if ($action != 'preview' && $action != 'editcontent') { + $style = ' margin-bottom: 5px;'; +} //var_dump($objectpage);exit; print '
    '; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index b3cb6d60a23..322a688bd45 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -7,7 +7,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2015 Alexandre Spangaro - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2019 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -77,15 +77,15 @@ $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2mi // Security check $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); -if ($user->socid && $socid) $result = restrictedArea($user, 'societe', $socid); +if ($user->socid) { + $socid = $user->socid; +} $error = GETPOST("error"); $donotclearsession = GETPOST('donotclearsession') ?GETPOST('donotclearsession') : 0; -$cactioncomm = new CActionComm($db); $object = new ActionComm($db); +$cactioncomm = new CActionComm($db); $contact = new Contact($db); $extrafields = new ExtraFields($db); $formfile = new FormFile($db); @@ -114,14 +114,25 @@ $hookmanager->initHooks(array('actioncard', 'globalcard')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $TRemindTypes = array(); -if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = array('label'=>$langs->trans('BrowserPush'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_BROWSER) ? 1 : 0)); -if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = array('label'=>$langs->trans('EMail'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_EMAIL) ? 1 : 0)); +if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) { + $TRemindTypes['browser'] = array('label'=>$langs->trans('BrowserPush'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_BROWSER) ? 1 : 0)); +} +if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) { + $TRemindTypes['email'] = array('label'=>$langs->trans('EMail'), 'disabled'=>(empty($conf->global->AGENDA_REMINDER_EMAIL) ? 1 : 0)); +} $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')); +$result = restrictedArea($user, 'agenda', $object->id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); +if ($user->socid && $socid) { + $result = restrictedArea($user, 'societe', $socid); +} + /* * Actions @@ -129,60 +140,65 @@ $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month') $listUserAssignedUpdated = false; // Remove user to assigned list -if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')) -{ +if (empty($reshook) && (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')) { $idtoremove = GETPOST('removedassigned'); - if (!empty($_SESSION['assignedtouser'])) $tmpassigneduserids = json_decode($_SESSION['assignedtouser'], 1); - else $tmpassigneduserids = array(); + if (!empty($_SESSION['assignedtouser'])) { + $tmpassigneduserids = json_decode($_SESSION['assignedtouser'], 1); + } else { + $tmpassigneduserids = array(); + } - foreach ($tmpassigneduserids as $key => $val) - { - if ($val['id'] == $idtoremove || $val['id'] == -1) unset($tmpassigneduserids[$key]); + foreach ($tmpassigneduserids as $key => $val) { + if ($val['id'] == $idtoremove || $val['id'] == -1) { + unset($tmpassigneduserids[$key]); + } } $_SESSION['assignedtouser'] = json_encode($tmpassigneduserids); $donotclearsession = 1; - if ($action == 'add') $action = 'create'; - if ($action == 'update') $action = 'edit'; + if ($action == 'add') { + $action = 'create'; + } + if ($action == 'update') { + $action = 'edit'; + } $listUserAssignedUpdated = true; } // Add user to assigned list -if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))) -{ +if (empty($reshook) && (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))) { // Add a new user - if (GETPOST('assignedtouser') > 0) - { + if (GETPOST('assignedtouser') > 0) { $assignedtouser = array(); - if (!empty($_SESSION['assignedtouser'])) - { + if (!empty($_SESSION['assignedtouser'])) { $assignedtouser = json_decode($_SESSION['assignedtouser'], true); } $assignedtouser[GETPOST('assignedtouser')] = array('id'=>GETPOST('assignedtouser'), 'transparency'=>GETPOST('transparency'), 'mandatory'=>1); $_SESSION['assignedtouser'] = json_encode($assignedtouser); } $donotclearsession = 1; - if ($action == 'add') $action = 'create'; - if ($action == 'update') $action = 'edit'; + if ($action == 'add') { + $action = 'create'; + } + if ($action == 'update') { + $action = 'edit'; + } $listUserAssignedUpdated = true; } // Link to a project if (empty($reshook) && $action == 'classin' && ($user->rights->agenda->allactions->create || - (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))) -{ + (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))) { //$object->fetch($id); $object->setProject(GETPOST('projectid', 'int')); } // Action clone object -if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') -{ - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { +if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') { + if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { if ($id > 0) { @@ -204,23 +220,22 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') } // Add event -if (empty($reshook) && $action == 'add') -{ +if (empty($reshook) && $action == 'add') { $error = 0; - if (empty($backtopage)) - { - if ($socid > 0) $backtopage = DOL_URL_ROOT.'/societe/agenda.php?socid='.$socid; - else $backtopage = DOL_URL_ROOT.'/comm/action/index.php'; + if (empty($backtopage)) { + if ($socid > 0) { + $backtopage = DOL_URL_ROOT.'/societe/agenda.php?socid='.$socid; + } else { + $backtopage = DOL_URL_ROOT.'/comm/action/index.php'; + } } - if (!empty($socpeopleassigned[0])) - { + if (!empty($socpeopleassigned[0])) { $result = $contact->fetch($socpeopleassigned[0]); } - if ($cancel) - { + if ($cancel) { header("Location: ".$backtopage); exit; } @@ -232,23 +247,20 @@ if (empty($reshook) && $action == 'add') $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuser'); // Check parameters - if (!$datef && $percentage == 100) - { + if (!$datef && $percentage == 100) { $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } - if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && !GETPOST('label')) - { + if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && !GETPOST('label')) { $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); } // Initialisation objet cactioncomm - if (GETPOSTISSET('actioncode') && !GETPOST('actioncode', 'aZ09')) // actioncode is '0' - { + if (GETPOSTISSET('actioncode') && !GETPOST('actioncode', 'aZ09')) { // actioncode is '0' $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); @@ -256,8 +268,7 @@ if (empty($reshook) && $action == 'add') $object->type_code = GETPOST('actioncode', 'aZ09'); } - if (!$error) - { + if (!$error) { // Initialisation objet actioncomm $object->priority = GETPOSTISSET("priority") ? GETPOST("priority", "int") : 0; $object->fulldayevent = (!empty($fulldayevent) ? 1 : 0); @@ -265,14 +276,11 @@ if (empty($reshook) && $action == 'add') $object->label = GETPOST('label', 'alphanohtml'); $object->fk_element = GETPOST("fk_element", 'int'); $object->elementtype = GETPOST("elementtype", 'alpha'); - if (!GETPOST('label')) - { - if (GETPOST('actioncode', 'aZ09') == 'AC_RDV' && $contact->getFullName($langs)) - { + if (!GETPOST('label')) { + if (GETPOST('actioncode', 'aZ09') == 'AC_RDV' && $contact->getFullName($langs)) { $object->label = $langs->transnoentitiesnoconv("TaskRDVWith", $contact->getFullName($langs)); } else { - if ($langs->trans("Action".$object->type_code) != "Action".$object->type_code) - { + if ($langs->trans("Action".$object->type_code) != "Action".$object->type_code) { $object->label = $langs->transnoentitiesnoconv("Action".$object->type_code)."\n"; } else { $cactioncomm->fetch($object->type_code); @@ -301,13 +309,15 @@ if (empty($reshook) && $action == 'add') $transparency = (GETPOST("transparency") == 'on' ? 1 : 0); $listofuserid = array(); - if (!empty($_SESSION['assignedtouser'])) $listofuserid = json_decode($_SESSION['assignedtouser'], true); + if (!empty($_SESSION['assignedtouser'])) { + $listofuserid = json_decode($_SESSION['assignedtouser'], true); + } $i = 0; - foreach ($listofuserid as $key => $value) - { - if ($i == 0) // First entry - { - if ($value['id'] > 0) $object->userownerid = $value['id']; + foreach ($listofuserid as $key => $value) { + if ($i == 0) { // First entry + if ($value['id'] > 0) { + $object->userownerid = $value['id']; + } $object->transparency = $transparency; } @@ -317,17 +327,19 @@ if (empty($reshook) && $action == 'add') } } - if (!$error && !empty($conf->global->AGENDA_ENABLE_DONEBY)) - { - if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int"); + if (!$error && !empty($conf->global->AGENDA_ENABLE_DONEBY)) { + if (GETPOST("doneby") > 0) { + $object->userdoneid = GETPOST("doneby", "int"); + } } $object->note_private = trim(GETPOST("note", "restricthtml")); - if (GETPOSTISSET("contactid")) $object->contact = $contact; + if (GETPOSTISSET("contactid")) { + $object->contact = $contact; + } - if (GETPOST('socid', 'int') > 0) - { + if (GETPOST('socid', 'int') > 0) { $object->socid = GETPOST('socid', 'int'); $object->fetch_thirdparty(); @@ -335,51 +347,45 @@ if (empty($reshook) && $action == 'add') } // Check parameters - if (empty($object->userownerid) && empty($_SESSION['assignedtouser'])) - { + if (empty($object->userownerid) && empty($_SESSION['assignedtouser'])) { $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ActionsOwnedBy")), null, 'errors'); } - if ($object->type_code == 'AC_RDV' && ($datep == '' || ($datef == '' && empty($fulldayevent)))) - { + if ($object->type_code == 'AC_RDV' && ($datep == '' || ($datef == '' && empty($fulldayevent)))) { $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } - if (!GETPOST('apyear') && !GETPOST('adyear')) - { + if (!GETPOST('apyear') && !GETPOST('adyear')) { $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } - foreach ($socpeopleassigned as $cid) - { + foreach ($socpeopleassigned as $cid) { $object->socpeopleassigned[$cid] = array('id' => $cid); } - if (!empty($object->socpeopleassigned)) - { + if (!empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); $object->contact_id = key($object->socpeopleassigned); } // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $db->begin(); // Creation of action/event $idaction = $object->create($user); - if ($idaction > 0) - { - if (!$object->error) - { + if ($idaction > 0) { + if (!$object->error) { // Category association $categories = GETPOST('categories', 'array'); $object->setCategories($categories); @@ -387,7 +393,9 @@ if (empty($reshook) && $action == 'add') unset($_SESSION['assignedtouser']); $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. + 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. + } // Create reminders if ($addreminder == 'on') { @@ -401,11 +409,12 @@ if (empty($reshook) && $action == 'add') $actionCommReminder->offsetvalue = $offsetvalue; $actionCommReminder->status = $actionCommReminder::STATUS_TODO; $actionCommReminder->fk_actioncomm = $object->id; - if ($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail; + 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) - { + foreach ($object->userassigned as $userassigned) { $actionCommReminder->fk_user = $userassigned['id']; $res = $actionCommReminder->create($user); @@ -427,12 +436,10 @@ if (empty($reshook) && $action == 'add') $db->commit(); } - if (!empty($backtopage)) - { + 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 { header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : '')); @@ -457,10 +464,8 @@ if (empty($reshook) && $action == 'add') /* * Action update event */ -if (empty($reshook) && $action == 'update') -{ - if (empty($cancel)) - { +if (empty($reshook) && $action == 'update') { + if (empty($cancel)) { $fulldayevent = GETPOST('fullday'); $aphour = GETPOST('aphour', 'int'); $apmin = GETPOST('apmin', 'int'); @@ -469,10 +474,18 @@ if (empty($reshook) && $action == 'update') $percentage = in_array(GETPOST('status'), array(-1, 100)) ?GETPOST('status') : (in_array(GETPOST('complete'), array(-1, 100)) ?GETPOST('complete') : GETPOST("percentage")); // If status is -1 or 100, percentage is not defined and we must use status // Clean parameters - if ($aphour == -1) $aphour = '0'; - if ($apmin == -1) $apmin = '0'; - if ($p2hour == -1) $p2hour = '0'; - if ($p2min == -1) $p2min = '0'; + if ($aphour == -1) { + $aphour = '0'; + } + if ($apmin == -1) { + $apmin = '0'; + } + if ($p2hour == -1) { + $p2hour = '0'; + } + if ($p2min == -1) { + $p2min = '0'; + } $object->fetch($id); $object->fetch_optionals(); @@ -493,7 +506,9 @@ if (empty($reshook) && $action == 'update') $object->socid = GETPOST("socid", "int"); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); $object->socpeopleassigned = array(); - foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid); + foreach ($socpeopleassigned as $cid) { + $object->socpeopleassigned[$cid] = array('id' => $cid); + } $object->contact_id = GETPOST("contactid", 'int'); if (empty($object->contact_id) && !empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); @@ -503,8 +518,7 @@ if (empty($reshook) && $action == 'update') $object->note_private = trim(GETPOST("note", "restricthtml")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); - if (!$datef && $percentage == 100) - { + if (!$datef && $percentage == 100) { $error++; $donotclearsession = 1; setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), $object->errors, 'errors'); $action = 'edit'; @@ -514,23 +528,26 @@ if (empty($reshook) && $action == 'update') // Users $listofuserid = array(); - if (!empty($_SESSION['assignedtouser'])) // Now concat assigned users - { + if (!empty($_SESSION['assignedtouser'])) { // Now concat assigned users // Restore array with key with same value than param 'id' $tmplist1 = json_decode($_SESSION['assignedtouser'], true); - foreach ($tmplist1 as $key => $val) - { - if ($val['id'] > 0 && $val['id'] != $assignedtouser) $listofuserid[$val['id']] = $val; + foreach ($tmplist1 as $key => $val) { + if ($val['id'] > 0 && $val['id'] != $assignedtouser) { + $listofuserid[$val['id']] = $val; + } } } 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 + if ($assignedtouser) { + $listofuserid[$assignedtouser] = array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>($user->id == $assignedtouser ? $transparency : '')); // Owner first + } } $object->userassigned = array(); $object->userownerid = 0; // Clear old content $i = 0; - foreach ($listofuserid as $key => $val) - { - if ($i == 0) $object->userownerid = $val['id']; + foreach ($listofuserid as $key => $val) { + if ($i == 0) { + $object->userownerid = $val['id']; + } $object->userassigned[$val['id']] = array('id'=>$val['id'], 'mandatory'=>0, 'transparency'=>($user->id == $val['id'] ? $transparency : '')); $i++; } @@ -538,22 +555,21 @@ if (empty($reshook) && $action == 'update') $object->transparency = $transparency; // We set transparency on event (even if we can also store it on each user, standard says this property is for event) // TODO store also transparency on owner user - if (!empty($conf->global->AGENDA_ENABLE_DONEBY)) - { - if (GETPOST("doneby")) $object->userdoneid = GETPOST("doneby", "int"); + if (!empty($conf->global->AGENDA_ENABLE_DONEBY)) { + if (GETPOST("doneby")) { + $object->userdoneid = GETPOST("doneby", "int"); + } } // Check parameters - if (GETPOSTISSET('actioncode') && !GETPOST('actioncode', 'aZ09')) // actioncode is '0' - { + if (GETPOSTISSET('actioncode') && !GETPOST('actioncode', 'aZ09')) { // actioncode is '0' $error++; $donotclearsession = 1; $action = 'edit'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); } else { $result = $cactioncomm->fetch(GETPOST('actioncode', 'aZ09')); } - if (empty($object->userownerid)) - { + if (empty($object->userownerid)) { $error++; $donotclearsession = 1; $action = 'edit'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ActionsOwnedBy")), null, 'errors'); @@ -561,7 +577,9 @@ if (empty($reshook) && $action == 'update') // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { // check if an event resource is already in use @@ -622,23 +640,19 @@ if (empty($reshook) && $action == 'update') } } - if (!$error) - { + if (!$error) { $db->begin(); $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { // Category association $categories = GETPOST('categories', 'array'); $object->setCategories($categories); $object->loadReminders(); - if (!empty($object->reminders) && $object->datep > dol_now()) - { - foreach ($object->reminders as $reminder) - { + if (!empty($object->reminders) && $object->datep > dol_now()) { + foreach ($object->reminders as $reminder) { $reminder->delete($user); } $object->reminders = array(); @@ -656,11 +670,12 @@ if (empty($reshook) && $action == 'update') $actionCommReminder->offsetvalue = $offsetvalue; $actionCommReminder->status = $actionCommReminder::STATUS_TODO; $actionCommReminder->fk_actioncomm = $object->id; - if ($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail; + 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) - { + foreach ($object->userassigned as $userassigned) { $actionCommReminder->fk_user = $userassigned['id']; $res = $actionCommReminder->create($user); @@ -677,8 +692,11 @@ if (empty($reshook) && $action == 'update') unset($_SESSION['assignedtouser']); - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); @@ -686,10 +704,8 @@ if (empty($reshook) && $action == 'update') } } - if (!$error) - { - if (!empty($backtopage)) - { + if (!$error) { + if (!empty($backtopage)) { unset($_SESSION['assignedtouser']); header("Location: ".$backtopage); exit; @@ -700,20 +716,17 @@ if (empty($reshook) && $action == 'update') /* * delete event */ -if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes') -{ +if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes') { $object->fetch($id); $object->fetch_optionals(); $object->fetch_userassigned(); $object->oldcopy = clone $object; if ($user->rights->agenda->myactions->delete - || $user->rights->agenda->allactions->delete) - { + || $user->rights->agenda->allactions->delete) { $result = $object->delete(); - if ($result >= 0) - { + if ($result >= 0) { header("Location: index.php"); exit; } else { @@ -726,16 +739,14 @@ if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes * Action move update, used when user move an event in calendar by drag'n drop * TODO Move this into page comm/action/index that trigger this call by the drag and drop of event. */ -if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') -{ +if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { $error = 0; $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. $smin = dol_print_date($object->datep, "%M", 'tzuserrel'); $newdate = GETPOST('newdate', 'alpha'); - if (empty($newdate) || strpos($newdate, 'dayevent_') != 0) - { + if (empty($newdate) || strpos($newdate, 'dayevent_') != 0) { header("Location: ".$backtopage); exit; } @@ -743,10 +754,8 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') $datep = dol_mktime($shour, $smin, 0, substr($newdate, 13, 2), substr($newdate, 15, 2), substr($newdate, 9, 4), 'tzuserrel'); //print dol_print_date($datep, 'dayhour');exit; - if ($datep != $object->datep) - { - if (!empty($object->datef)) - { + if ($datep != $object->datep) { + if (!empty($object->datef)) { $object->datef += $datep - $object->datep; } $object->datep = $datep; @@ -822,8 +831,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') } } } - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } else { @@ -857,21 +865,20 @@ $arrayrecurrulefreq = array( $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); -if ($action == 'create') -{ +if ($action == 'create') { $contact = new Contact($db); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); - if (!empty($socpeopleassigned[0])) - { + if (!empty($socpeopleassigned[0])) { $result = $contact->fetch($socpeopleassigned[0]); - if ($result < 0) dol_print_error($db, $contact->error); + if ($result < 0) { + dol_print_error($db, $contact->error); + } } dol_set_focus("#label"); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n".''."\n"; - foreach ($showextcals as $val) - { + foreach ($showextcals as $val) { $htmlname = md5($val['name']); $s .= '
     
    '; } @@ -532,31 +588,41 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on // Calendars from hooks $parameters = array(); $object = null; $reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action); - if (empty($reshook)) - { + if (empty($reshook)) { $s .= $hookmanager->resPrint; - } elseif ($reshook > 1) - { + } elseif ($reshook > 1) { $s = $hookmanager->resPrint; } + + $s .= "\n".''."\n"; } 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'; + if (!preg_match('/showbirthday=/i', $newparam)) { + $newparam .= '&showbirthday=1'; + } $link = '
    '; - if (empty($showbirthday)) $link .= $langs->trans("AgendaShowBirthdayEvents"); - else $link .= $langs->trans("AgendaHideBirthdayEvents"); + if (empty($showbirthday)) { + $link .= $langs->trans("AgendaShowBirthdayEvents"); + } else { + $link .= $langs->trans("AgendaHideBirthdayEvents"); + } $link .= ''; } + // Load events from database into $eventarray $eventarray = array(); + +// DEFAULT CALENDAR + AUTOEVENT CALENDAR + CONFERENCEBOOTH CALENDAR $sql = 'SELECT '; -if ($usergroup > 0) $sql .= " DISTINCT"; +if ($usergroup > 0) { + $sql .= " DISTINCT"; +} $sql .= ' a.id, a.label,'; $sql .= ' a.datep,'; $sql .= ' a.datep2,'; @@ -565,49 +631,71 @@ $sql .= ' a.fk_user_author,a.fk_user_action,'; $sql .= ' a.transparency, a.priority, a.fulldayevent, a.location,'; $sql .= ' a.fk_soc, a.fk_contact, a.fk_project,'; $sql .= ' a.fk_element, a.elementtype,'; -$sql .= ' ca.code as type_code, ca.libelle as type_label, ca.color as type_color'; +$sql .= ' ca.code as type_code, ca.libelle as type_label, ca.color as type_color, ca.type as type_type, ca.picto as type_picto'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; +} // We must filter on resource table -if ($resourceid > 0) $sql .= ", ".MAIN_DB_PREFIX."element_resources as r"; +if ($resourceid > 0) { + $sql .= ", ".MAIN_DB_PREFIX."element_resources as r"; +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) $sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; -if ($usergroup > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; +if ($filtert > 0 || $usergroup > 0) { + $sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; +} +if ($usergroup > 0) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; +} $sql .= ' WHERE a.fk_action = ca.id'; $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'"; +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)."')"; + 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 (".$db->sanitize("'".implode("','", $actioncode)."'", 1).")"; } else { - $sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + $sql .= " AND ca.code IN (".$db->sanitize("'".implode("','", explode(',', $actioncode))."'", 1).")"; } } } } -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); -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; -if ($socid > 0) $sql .= ' AND a.fk_soc = '.$socid; +if ($resourceid > 0) { + $sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = ".((int) $resourceid); +} +if ($pid) { + $sql .= " AND a.fk_project=".((int) $pid); +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; +} +if ($socid > 0) { + $sql .= ' AND a.fk_soc = '.$socid; +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; +if ($filtert > 0 || $usergroup > 0) { + $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; +} //var_dump($day.' '.$month.' '.$year); -if ($action == 'show_day') -{ +if ($action == 'show_day') { $sql .= " AND ("; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')"; @@ -631,18 +719,33 @@ if ($action == 'show_day') $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"; } -if ($status == '-1') { $sql .= " AND a.percent = -1"; } // Not applicable -if ($status == '50') { $sql .= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started -if ($status == 'done' || $status == '100') { $sql .= " AND (a.percent = 100)"; } -if ($status == 'todo') { $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; } +if ($type) { + $sql .= " AND ca.id = ".((int) $type); +} +if ($status == '0') { + $sql .= " AND a.percent = 0"; +} +if ($status == '-1') { + $sql .= " AND a.percent = -1"; +} // Not applicable +if ($status == '50') { + $sql .= " AND (a.percent > 0 AND a.percent < 100)"; +} // Running already started +if ($status == 'done' || $status == '100') { + $sql .= " AND (a.percent = 100)"; +} +if ($status == 'todo') { + $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) -{ +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; + if ($filtert > 0) { + $sql .= "ar.fk_element = ".$filtert; + } + if ($usergroup > 0) { + $sql .= ($filtert > 0 ? " OR " : "")." ugu.fk_usergroup = ".$usergroup; + } $sql .= ")"; } // Sort on date @@ -652,19 +755,16 @@ $sql .= ' ORDER BY datep'; dol_syslog("comm/action/index.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($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) - { + 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') - { + if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO') { $i++; continue; } @@ -684,13 +784,17 @@ if ($resql) $event->type_code = $obj->type_code; $event->type_label = $obj->type_label; $event->type_color = $obj->type_color; + $event->type = $obj->type_type; + $event->type_picto = $obj->type_picto; $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; @@ -706,11 +810,13 @@ if ($resql) // 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; + 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) - { + if ($event->date_start_in_calendar == $event->date_end_in_calendar) { $event->ponctuel = 1; } @@ -718,8 +824,12 @@ if ($resql) 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); + 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; @@ -740,7 +850,9 @@ if ($resql) $j++; $daykey += 60 * 60 * 24; - if ($daykey > $event->date_end_in_calendar) $loop = false; + 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); @@ -753,16 +865,15 @@ if ($resql) } //var_dump($eventarray); +// BIRTHDATES CALENDAR // Complete $eventarray with birthdates -if ($showbirthday) -{ +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') - { + if ($action == 'show_day') { $sql .= ' AND MONTH(birthday) = '.$month; $sql .= ' AND DAY(birthday) = '.$day; } else { @@ -772,13 +883,12 @@ if ($showbirthday) dol_syslog("comm/action/index.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + 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 @@ -789,28 +899,39 @@ if ($showbirthday) $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->type_label = ''; + $event->type_color = ''; + $event->type = 'birthdate'; + $event->type_picto = 'birthdate'; + $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->date_start_in_calendar = $db->jdate($event->datep); + $event->date_end_in_calendar = $db->jdate($event->datef); $event->ponctuel = 0; - // Add an entry in actionarray for each day - $daycursor = $event->date_start_in_calendar; - $annee = dol_print_date($daycursor, '%Y'); - $mois = dol_print_date($daycursor, '%m'); - $jour = dol_print_date($daycursor, '%d'); + // Add an entry in eventarray for each day + $daycursor = $event->datep; + $annee = dol_print_date($daycursor, '%Y', 'tzuserrel'); + $mois = dol_print_date($daycursor, '%m', 'tzuserrel'); + $jour = dol_print_date($daycursor, '%d', 'tzuserrel'); - $loop = true; + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); + + $eventarray[$daykey][] = $event; + + /*$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 { @@ -818,127 +939,116 @@ if ($showbirthday) } } -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 '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time - } 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"; // date_debut and date_fin are date without time +} 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); + $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->type_label = ''; + $event->type_color = ''; + $event->type = 'holiday'; + $event->type_picto = 'holiday'; - $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->datep = $db->jdate($obj->date_start); + $event->datef = $db->jdate($obj->date_end); + $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->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; - } - - $daycursor = $event->date_start_in_calendar; - $annee = dol_print_date($daycursor, '%Y'); - $mois = dol_print_date($daycursor, '%m'); - $jour = dol_print_date($daycursor, '%d'); - - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - - do { - $eventarray[$daykey][] = $event; - - $daykey += 60 * 60 * 24; - } while ($daykey <= $event->date_end_in_calendar); - - $i++; + 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; + } + + $daycursor = $event->date_start_in_calendar; + $annee = dol_print_date($daycursor, '%Y', 'tzuserrel'); + $mois = dol_print_date($daycursor, '%m', 'tzuserrel'); + $jour = dol_print_date($daycursor, '%d', 'tzuserrel'); + + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); + do { + $eventarray[$daykey][] = $event; + + $daykey += 60 * 60 * 24; + } while ($daykey <= $event->date_end_in_calendar); + + $i++; } } +// EXTERNAL CALENDAR // Complete $eventarray with external import Ical -if (count($listofextcals)) -{ +if (count($listofextcals)) { require_once DOL_DOCUMENT_ROOT.'/comm/action/class/ical.class.php'; - foreach ($listofextcals as $extcal) - { + 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'] + 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) - { + 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 - { + 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 - { + 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'])) - { + } elseif (is_array($icalevent['DTSTART']) && !empty($icalevent['DTSTART']['unixtime'])) { $datecurstart = $icalevent['DTSTART']['unixtime']; $datecurend = $icalevent['DTEND']['unixtime']; - if (!empty($ical->cal['DAYLIGHT']['DTSTART']) && $datecurstart) - { + if (!empty($ical->cal['DAYLIGHT']['DTSTART']) && $datecurstart) { //var_dump($ical->cal); $tmpcurstart = $datecurstart; $tmpcurend = $datecurend; @@ -946,10 +1056,16 @@ if (count($listofextcals)) $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; + 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; @@ -963,18 +1079,19 @@ if (count($listofextcals)) $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 + 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 - { + while (($datecurstart < $lastdaytoshow) && (empty($maxrepeat) || ($numofevent < $maxrepeat))) { + if ($datecurend >= $firstdaytoshow) { // We add event $newevent = $icalevent; unset($newevent['RRULE']); - if ($icalevent['DTSTART;VALUE=DATE']) - { + 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 { @@ -986,27 +1103,22 @@ if (count($listofextcals)) // Jump on next occurence $numofevent++; $savdatecurstart = $datecurstart; - if ($icalevent['RRULE']['FREQ'] == 'DAILY') - { + 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') - { + 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') - { + } 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') - { + } 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) - { + 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; @@ -1017,27 +1129,30 @@ if (count($listofextcals)) $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) - { + 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. + 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 - { + 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 + if (empty($icalevent['DTEND;VALUE=DATE'])) { + $dateend = $datestart + 86400 - 1; + } else { + $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) - { + } 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']; @@ -1047,8 +1162,7 @@ if (count($listofextcals)) $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) - { + } 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']; @@ -1056,13 +1170,11 @@ if (count($listofextcals)) $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 - { + 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 - { + 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); @@ -1076,19 +1188,20 @@ if (count($listofextcals)) $addevent = true; } - if ($addevent) - { + if ($addevent) { $event->id = $icalevent['UID']; $event->ref = $event->id; $userId = $userstatic->findUserIdByEmail($namecal); - if (!empty($userId) && $userId > 0) - { + if (!empty($userId) && $userId > 0) { $event->userassigned[$userId] = $userId; $event->percentage = -1; } - else { - $event->type_code = "ICALEVENT"; - } + + $event->type_code = "ICALEVENT"; + $event->type_label = $namecal; + $event->type_color = $colorcal; + $event->type = 'icalevent'; + $event->type_picto = 'rss'; $event->icalname = $namecal; $event->icalcolor = $colorcal; @@ -1096,21 +1209,30 @@ if (count($listofextcals)) $event->datep = $datestart + $usertime; $event->datef = $dateend + $usertime; - if ($icalevent['SUMMARY']) $event->label = $icalevent['SUMMARY']; - elseif ($icalevent['DESCRIPTION']) $event->label = dol_nl2br($icalevent['DESCRIPTION'], 1); - else $event->label = $langs->trans("ExtSiteNoLabel"); + if ($icalevent['SUMMARY']) { + $event->label = $icalevent['SUMMARY']; + } elseif ($icalevent['DESCRIPTION']) { + $event->label = dol_nl2br($icalevent['DESCRIPTION'], 1); + } else { + $event->label = $langs->trans("ExtSiteNoLabel"); + } // 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']; + if (!empty($icalevent['PRIORITY'])) { + $event->priority = $icalevent['PRIORITY']; + } // 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 + if ($icalevent['TRANSP']) { + if ($icalevent['TRANSP'] == "TRANSPARENT") { + $event->transparency = 0; // 0 = available / free + } + if ($icalevent['TRANSP'] == "OPAQUE") { + $event->transparency = 1; // 1 = busy + } // TODO: MS outlook states // X-MICROSOFT-CDO-BUSYSTATUS:FREE + TRANSP:TRANSPARENT => Available / Free @@ -1120,47 +1242,56 @@ if (count($listofextcals)) // X-MICROSOFT-CDO-BUSYSTATUS:OOF + TRANSP:OPAQUE => Away from the office / off-site } - if ($icalevent['LOCATION']) $event->location = $icalevent['LOCATION']; + if (!empty($icalevent['LOCATION'])) { + $event->location = $icalevent['LOCATION']; + } $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; + 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) - { + 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) - { + 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); + 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); + $annee = dol_print_date($daycursor, '%Y', 'tzuserrel'); + $mois = dol_print_date($daycursor, '%m', 'tzuserrel'); + $jour = dol_print_date($daycursor, '%d', 'tzuserrel'); // 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); + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); + $daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); 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; + if (($event->fulldayevent ? $daykeygmt : $daykey) > $event->date_end_in_calendar) { + $loop = false; + } } while ($loop); } } @@ -1184,8 +1315,7 @@ if (!empty($hookmanager->resArray['eventarray'])) { } // Sort events -foreach ($eventarray as $keyDate => &$dateeventarray) -{ +foreach ($eventarray as $keyDate => &$dateeventarray) { usort($dateeventarray, 'sort_events_by_date'); } @@ -1197,20 +1327,22 @@ $cacheusers = array(); // Define theme_datacolor array $color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; -if (is_readable($color_file)) -{ - include_once $color_file; +if (is_readable($color_file)) { + include $color_file; +} +if (!is_array($theme_datacolor)) { + $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220)); } -if (!is_array($theme_datacolor)) $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220)); +$massactionbutton =''; 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); +// Show div with list of calendars print $s; -if (empty($action) || $action == 'show_month') // View by month -{ +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); @@ -1230,17 +1362,17 @@ if (empty($action) || $action == 'show_month') // View by month print ''; print ' '; // Column title of weeks numbers - echo ' '; + echo ' '; $i = 0; - while ($i < 7) - { - print ' '."\n"; $i++; } @@ -1254,15 +1386,11 @@ if (empty($action) || $action == 'show_month') // View by month 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 - { + 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 - { + } 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 + } 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); } @@ -1275,7 +1403,9 @@ if (empty($action) || $action == 'show_month') // View by month 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'; + if ($iter_day == 6) { + $style .= ' cal_other_month_right'; + } echo ' \n"; @@ -1283,11 +1413,19 @@ if (empty($action) || $action == 'show_month') // View by 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'; + 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'; + 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"; @@ -1347,12 +1487,18 @@ if (empty($action) || $action == 'show_month') // View by month $tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel'); $style = 'cal_current_month'; - if ($iter_day == 6) $style .= ' cal_other_month_right'; + 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'; + if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) { + $today = 1; + } + if ($today) { + $style = 'cal_today'; + } echo ' \n"; /* - echo '
    '; - echo '
    '; - echo '
    '; - echo show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, -1); - echo '
    '."\n"; - echo "
    \n"; + echo '
    '; + echo '
    '; + echo '
    '; + echo show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, -1); + echo '
    '."\n"; + echo "
    \n"; */ echo '
    ##'; + while ($i < 7) { + print ' '; $numdayinweek = (($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7); - if (!empty($conf->dol_optimize_smallscreen)) - { + 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); + } 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 " '; show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); @@ -1295,7 +1433,9 @@ if (empty($action) || $action == 'show_month') // View by month } else { /* Show days after the current month (next month) */ $style = 'cal_other_month'; - if ($iter_day == 6) $style .= ' cal_other_month_right'; + 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 "'; show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300); @@ -1377,7 +1523,9 @@ if (empty($action) || $action == 'show_month') // View by month $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 ($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); @@ -1395,12 +1543,12 @@ if (empty($action) || $action == 'show_month') // View by month echo "
    '; @@ -1408,8 +1556,7 @@ if (empty($action) || $action == 'show_month') // View by month /* WIP View per hour */ $useviewhour = 0; - if ($useviewhour) - { + 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 @@ -1422,14 +1569,19 @@ if (empty($action) || $action == 'show_month') // View by month $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; } + if ($minhour > 23) { + $minhour = 23; + } + if ($maxhour < 1) { + $maxhour = 1; + } + if ($maxhour <= $minhour) { + $maxhour = $minhour + 1; + } $i = 0; $j = 0; - while ($i < 24) - { + while ($i < 24) { echo '
    '."\n"; echo '
    '.dol_print_date($i * 3600, 'hour', 'gmt').'
    '; echo '
    '."\n"; @@ -1484,6 +1636,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa global $theme_datacolor; global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; + if ($conf->use_javascript_ajax) { // Enable the "Show more button..." + $conf->global->MAIN_JS_SWITCH_AGENDA = 1; + } + $dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); //print 'show_day_events day='.$day.' month='.$month.' year='.$year.' dateint='.$dateint; @@ -1493,8 +1649,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $curtime = dol_mktime(0, 0, 0, $month, $day, $year); $urltoshow = DOL_URL_ROOT.'/comm/action/index.php?action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year.$newparam; $urltocreate = ''; - if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) - { + if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; $hourminsec = '100000'; $urltocreate = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $year, $month, $day).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')); @@ -1503,16 +1658,17 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Line with title of day print '
    '."\n"; - if ($nonew <= 0) - { + if ($nonew <= 0) { print '
    '; - if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) - { + if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { print ''; // Explicit link, usefull for nojs interfaces print img_picto($langs->trans("NewAction"), 'edit_add.png'); print ''; @@ -1520,8 +1676,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '
    '."\n"; } - if ($nonew < 0) - { + if ($nonew < 0) { print '
    '; return; } @@ -1531,13 +1686,16 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '
    '; //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); - $i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array(); + $i = 0; $ireallyshown = 0; $itoshow = 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, ... //var_dump($colorindexused); + include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; + $tmpholiday = new Holiday($db); + foreach ($eventarray as $daykey => $notused) { // daykey is the 'YYYYMMDD' to show according to user $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' @@ -1545,23 +1703,18 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."
    \n"; - 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)) - { + 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)) - { + if (in_array($user->id, $keysofuserassigned)) { $cssclass = 'family_mytasks'; - if (empty($cacheusers[$event->userownerid])) - { + if (empty($cacheusers[$event->userownerid])) { $newuser = new User($db); $newuser->fetch($event->userownerid); $cacheusers[$event->userownerid] = $newuser; @@ -1569,9 +1722,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa //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 - { + 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)])) { @@ -1582,63 +1736,63 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $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]); + } elseif ($event->type_code == 'BIRTHDAY') { + $numbirthday++; $colorindex = 2; $cssclass = 'family_birthday '; $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])) - { + 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; + // 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. - { + 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])) - { + 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 + $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; + $cssclass = $cssclass.' eventday_'.$ymd; // Defined style to disable drag and drop feature - if ($event->type_code == 'AC_OTH_AUTO') - { + if ($event->type_code == 'AC_OTH_AUTO') { $cssclass .= " unmovable"; - } elseif ($event->type_code == 'ICALEVENT') - { + } elseif ($event->type_code == 'HOLIDAY') { + $cssclass .= " unmovable"; + } elseif ($event->type_code == 'BIRTHDAY') { + $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) - { + 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)) - { + (($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { $cssclass .= " movable cursormove"; } else { $cssclass .= " unmovable"; @@ -1646,13 +1800,36 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } $h = ''; $nowrapontd = 1; - if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; } - if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; } + if ($action == 'show_day') { + $h = 'height: 100%; '; $nowrapontd = 0; + } + if ($action == 'show_week') { + $h = 'height: 100%; '; $nowrapontd = 0; + } - // Show rect of event + // Show event box print "\n"; print ''."\n"; - print '
    = $maxprint) { + $morecss = 'showifmore'; + } + if ($event->type == 'birthdate' && !GETPOST('check_birthday')) { + $morecss = 'hidden'; + } + if ($event->type == 'holiday' && !GETPOST('check_holiday')) { + $morecss = 'hidden'; + } + if ($morecss != 'hidden') { + $itoshow++; + } + if ($morecss != 'showifmore' && $morecss != 'hidden') { + $ireallyshown++; + } + //var_dump($event->type.' - '.$morecss.' - '.$cssclass.' - '.$i.' - '.$ireallyshown.' - '.$itoshow); + + print '
    type_code == 'BIRTHDAY') // It's a birthday - { + if ($event->type_code == 'BIRTHDAY') { // It's birthday calendar 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') - { + } elseif ($event->type_code == 'HOLIDAY') { // It's holiday calendar + $tmpholiday->fetch($event->id); + + print $tmpholiday->getNomUrl(1); + + $tmpid = $tmpholiday->fk_user; + if (empty($cacheusers[$tmpid])) { + $newuser = new User($db); + $newuser->fetch($tmpid); + $cacheusers[$tmpid] = $newuser; + } + + $listofusertoshow .= '
    '.$cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); + print $listofusertoshow; + } else { // Other calendar // Picto - if (empty($event->fulldayevent)) - { + if (empty($event->fulldayevent)) { //print $event->getNomUrl(2).' '; } // Date - if (empty($event->fulldayevent)) - { + if (empty($event->fulldayevent)) { // Show hours (start ... end) $tmpyearstart = dol_print_date($event->date_start_in_calendar, '%Y', 'tzuserrel'); $tmpmonthstart = dol_print_date($event->date_start_in_calendar, '%m', 'tzuserrel'); @@ -1713,33 +1896,29 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $tmpdayend = dol_print_date($event->date_end_in_calendar, '%d', 'tzuserrel'); // Hour start - if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) - { + if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) { $daterange .= dol_print_date($event->date_start_in_calendar, 'hour', 'tzuserrel'); - if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) - { - if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) - $daterange .= '-'; + 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) - { + 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', 'tzuserrel'); + 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', 'tzuserrel'); + } } } else { - if ($showinfo) - { + if ($showinfo) { print $langs->trans("EventOnFullDay")."
    \n"; } } @@ -1753,7 +1932,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $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 cal_event_title', '', 0, 0); + $titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : ''); + $titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0); $event->label = $savlabel; $event->libelle = $savlabel; } @@ -1761,12 +1941,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Loop on each assigned user $listofusertoshow = ''; $posuserassigned = 0; - foreach ($event->userassigned as $tmpid => $tmpdata) - { - if (!$posuserassigned && $titletoshow) $listofusertoshow .= '
    '; + foreach ($event->userassigned as $tmpid => $tmpdata) { + if (!$posuserassigned && $titletoshow) { + $listofusertoshow .= '
    '; + } $posuserassigned++; - if (empty($cacheusers[$tmpid])) - { + if (empty($cacheusers[$tmpid])) { $newuser = new User($db); $newuser->fetch($tmpid); $cacheusers[$tmpid] = $newuser; @@ -1778,48 +1958,57 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print $titletoshow; print $listofusertoshow; - if ($event->type_code == 'ICALEVENT') print '
    ('.dol_trunc($event->icalname, $maxnbofchar).')'; + 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])) - { + 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); + } 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])) - { + 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); + } 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)) - { + 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 .= '
    '; + if ($linerelatedto) { + $linerelatedto .= '
    '; + } $linerelatedto .= dolGetElementUrl($event->fk_element, $event->elementtype, 1); } - if ($linerelatedto) print '
    '.$linerelatedto; + if ($linerelatedto) { + print '
    '.$linerelatedto; + } } // Show location - if ($showinfo) - { - if ($event->location) - { + if ($showinfo) { + if ($event->location) { print '
    '; print $langs->trans("Location").': '.$event->location; } @@ -1828,16 +2017,21 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '
    '; - if ($withstatus) print $event->getLibStatut(3, 1); - else print ' '; + if ($withstatus) { + print $event->getLibStatut(3, 1); + } else { + print ' '; + } print '
    '; print ''."\n"; + $i++; } else { print '
    '.img_picto("all", "1downarrow_selected.png").' +'.$langs->trans("More").'...'; + if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $itoshow > $ireallyshown && $maxprint) { + print '
    '.img_picto("All", "angle-double-down", 'class="warning"').' +'.($itoshow - $ireallyshown).'
    '; //print ' +'.(count($eventarray[$daykey])-$maxprint); + print ''."\n"; } @@ -1897,8 +2093,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa function dol_color_minus($color, $minus, $minusunit = 16) { $newcolor = $color; - if ($minusunit == 16) - { + 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)); @@ -1918,13 +2113,10 @@ function dol_color_minus($color, $minus, $minusunit = 16) function sort_events_by_date($a, $b) { // Sort holidays at first - if ($a->type_code === 'HOLIDAY') - { + if ($a->type_code === 'HOLIDAY') { return -1; } - - if ($b->type_code === 'HOLIDAY') - { + if ($b->type_code === 'HOLIDAY') { return 1; } @@ -1932,20 +2124,17 @@ function sort_events_by_date($a, $b) // datef => Event end time // Events have different start time - if ($a->datep !== $b->datep) - { + 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))) - { + 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) - { + if ($b->datef === $a->datef) { return sort_events_by_percentage($a, $b); } @@ -1965,13 +2154,11 @@ 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) - if ($a->percentage < 0) - { + if ($a->percentage < 0) { return -1; } - if ($b->percentage < 0) - { + if ($b->percentage < 0) { return 1; } diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 40787abb8c3..f5d1c65b267 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -39,13 +39,15 @@ $langs->load("commercial"); $id = GETPOST('id', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id'); +if ($user->socid && $socid) { + $result = restrictedArea($user, 'societe', $socid); +} /* @@ -84,8 +86,7 @@ $morehtmlref = '
    '; // Thirdparty //$morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); //$morehtmlref.='
    '.$langs->trans('Project') . ' '; $morehtmlref .= $langs->trans('Project').': '; @@ -95,7 +96,9 @@ if (!empty($conf->projet->enabled)) $morehtmlref .= '
    '; $morehtmlref .= $proj->ref; $morehtmlref .= ''; - if ($proj->title) $morehtmlref .= ' - '.$proj->title; + if ($proj->title) { + $morehtmlref .= ' - '.$proj->title; + } } else { $morehtmlref .= ''; } diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 2db2d988add..96a69403289 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -27,7 +27,9 @@ * \brief Page to list actions */ -if (!defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); +if (!defined("NOREDIRECTBYMAINTOLOGIN")) { + define('NOREDIRECTBYMAINTOLOGIN', 1); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; @@ -55,14 +57,17 @@ $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')) -{ +if (GETPOST('search_actioncode', 'array')) { $actioncode = GETPOST('search_actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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); +if ($actioncode == '' && empty($actioncodearray)) { + $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE); +} $search_id = GETPOST('search_id', 'alpha'); $search_title = GETPOST('search_title', 'alpha'); $search_note = GETPOST('search_note', 'alpha'); @@ -70,8 +75,12 @@ $search_note = GETPOST('search_note', 'alpha'); $dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'), 'tzuserrel'); $datestart = dol_mktime(0, 0, 0, GETPOST('datestartmonth', 'int'), GETPOST('datestartday', 'int'), GETPOST('datestartyear', 'int'), 'tzuserrel'); $dateend = dol_mktime(0, 0, 0, GETPOST('dateendmonth', 'int'), GETPOST('dateendday', 'int'), GETPOST('dateendyear', 'int'), 'tzuserrel'); -if ($search_status == '' && !GETPOSTISSET('search_status')) $search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); -if (empty($action) && !GETPOSTISSET('action')) $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +if ($search_status == '' && !GETPOSTISSET('search_status')) { + $search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); +} +if (empty($action) && !GETPOSTISSET('action')) { + $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +} $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); @@ -89,8 +98,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // If not choice done on calendar owner, we filter on user. -if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) -{ +if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) { $filtert = $user->id; } @@ -98,30 +106,40 @@ $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 ($page == -1 || $page == null) { $page = 0; } -$offset = $limit * $page; -if (!$sortorder) -{ - $sortorder = "DESC,DESC"; - if ($search_status == 'todo') $sortorder = "DESC,DESC"; +if ($page == -1 || $page == null) { + $page = 0; } -if (!$sortfield) -{ +$offset = $limit * $page; +if (!$sortorder) { + $sortorder = "DESC,DESC"; + if ($search_status == 'todo') { + $sortorder = "DESC,DESC"; + } +} +if (!$sortfield) { $sortfield = "a.datep,a.id"; - if ($search_status == 'todo') $sortfield = "a.datep,a.id"; + if ($search_status == 'todo') { + $sortfield = "a.datep,a.id"; + } } // Security check $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 = ''; +if ($user->socid) { + $socid = $user->socid; +} +if ($socid < 0) { + $socid = ''; +} $canedit = 1; -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 -{ +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; } @@ -146,24 +164,24 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -//var_dump($_POST);exit; +$result = restrictedArea($user, 'agenda', 0, '', 'myactions'); +if ($user->socid && $socid) { + $result = restrictedArea($user, 'societe', $socid); +} + /* * Actions */ -if (GETPOST('cancel', 'alpha')) -{ +if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) -{ +if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) { $param = ''; - if (is_array($_POST)) - { - foreach ($_POST as $key => $val) - { + if (is_array($_POST)) { + foreach ($_POST as $key => $val) { $param .= '&'.$key.'='.urlencode($val); } } @@ -174,13 +192,14 @@ if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // 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 -{ +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_id = ''; $search_title = ''; @@ -192,12 +211,10 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_array_options = array(); } -if (empty($reshook) && !empty($massaction)) -{ +if (empty($reshook) && !empty($massaction)) { unset($percent); - switch ($massaction) - { + switch ($massaction) { case 'set_all_events_to_todo': $percent = ActionComm::EVENT_TODO; break; @@ -211,13 +228,10 @@ if (empty($reshook) && !empty($massaction)) break; } - if (isset($percent)) - { - foreach ($toselect as $toselectid) - { + if (isset($percent)) { + foreach ($toselect as $toselectid) { $result = $object->updatePercent($toselectid, $percent); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db); break; } @@ -226,13 +240,13 @@ if (empty($reshook) && !empty($massaction)) } // As mass deletion happens with a confirm step, $massaction is not use for the final step (deletion). -if (empty($reshook)) -{ +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; + $permissiontoadd = $user->rights->agenda->myactions->create; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -257,61 +271,117 @@ llxHeader('', $langs->trans("Agenda"), $help_url); $listofextcals = array(); $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($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} if ($actioncode != '') { if (is_array($actioncode)) { - foreach ($actioncode as $str_action) $param .= "&search_actioncode[]=".urlencode($str_action); - } else $param .= "&search_actioncode=".urlencode($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 ($search_status != '' && $search_status > -1) { + $param .= "&search_status=".urlencode($search_status); +} +if ($filter) { + $param .= "&search_filter=".urlencode($filter); +} +if ($filtert) { + $param .= "&search_filtert=".urlencode($filtert); +} +if ($usergroup > 0) { + $param .= "&search_usergroup=".urlencode($usergroup); +} +if ($socid > 0) { + $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 ($search_id != '') { + $param .= '&search_title='.urlencode($search_id); +} +if ($search_title != '') { + $param .= '&search_title='.urlencode($search_title); +} +if ($search_note != '') { + $param .= '&search_note='.$search_note; +} +if (GETPOST('datestartday', 'int')) { + $param .= '&datestartday='.GETPOST('datestartday', 'int'); +} +if (GETPOST('datestartmonth', 'int')) { + $param .= '&datestartmonth='.GETPOST('datestartmonth', 'int'); +} +if (GETPOST('datestartyear', 'int')) { + $param .= '&datestartyear='.GETPOST('datestartyear', 'int'); +} +if (GETPOST('dateendday', 'int')) { + $param .= '&dateendday='.GETPOST('dateendday', 'int'); +} +if (GETPOST('dateendmonth', 'int')) { + $param .= '&dateendmonth='.GETPOST('dateendmonth', 'int'); +} +if (GETPOST('dateendyear', 'int')) { + $param .= '&dateendyear='.GETPOST('dateendyear', 'int'); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); } -if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid); -if ($search_status != '' && $search_status > -1) $param .= "&search_status=".urlencode($search_status); -if ($filter) $param .= "&search_filter=".urlencode($filter); -if ($filtert) $param .= "&search_filtert=".urlencode($filtert); -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 ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup); -if ($search_id != '') $param .= '&search_title='.urlencode($search_id); -if ($search_title != '') $param .= '&search_title='.urlencode($search_title); -if ($search_note != '') $param .= '&search_note='.$search_note; -if (GETPOST('datestartday', 'int')) $param .= '&datestartday='.GETPOST('datestartday', 'int'); -if (GETPOST('datestartmonth', 'int')) $param .= '&datestartmonth='.GETPOST('datestartmonth', 'int'); -if (GETPOST('datestartyear', 'int')) $param .= '&datestartyear='.GETPOST('datestartyear', 'int'); -if (GETPOST('dateendday', 'int')) $param .= '&dateendday='.GETPOST('dateendday', 'int'); -if (GETPOST('dateendmonth', 'int')) $param .= '&dateendmonth='.GETPOST('dateendmonth', 'int'); -if (GETPOST('dateendyear', 'int')) $param .= '&dateendyear='.GETPOST('dateendyear', 'int'); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +$paramnoactionodate = $param; + // 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 ($user->rights->agenda->allactions->delete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if ($user->rights->agenda->myactions->create) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { + $arrayofmassactions = array(); } -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $sql = "SELECT"; -if ($usergroup > 0) $sql .= " DISTINCT"; +if ($usergroup > 0) { + $sql .= " DISTINCT"; +} $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; $sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; $sql .= ' a.fk_user_author,a.fk_user_action,'; $sql .= " a.fk_contact, a.note, a.percent as percent,"; $sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; -$sql .= " c.code as type_code, c.libelle as type_label,"; +$sql .= " c.code as type_code, c.libelle as type_label, c.color as type_color, c.type as type_type, c.picto as type_picto,"; $sql .= " sp.lastname, sp.firstname, sp.email, sp.phone, sp.address, sp.phone as phone_pro, sp.phone_mobile, sp.phone_perso, sp.fk_pays as country_id"; // 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 @@ -321,70 +391,122 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_extrafields as ef ON (a.id = ef.fk_object) "; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; +if (!$user->rights->societe->client->voir && !$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 .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; $sql .= " ,".MAIN_DB_PREFIX."c_actioncomm as c"; // We must filter on resource table -if ($resourceid > 0) $sql .= ", ".MAIN_DB_PREFIX."element_resources as r"; +if ($resourceid > 0) { + $sql .= ", ".MAIN_DB_PREFIX."element_resources as r"; +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) $sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; -if ($usergroup > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; +if ($filtert > 0 || $usergroup > 0) { + $sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; +} +if ($usergroup > 0) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; +} $sql .= " WHERE c.id = a.fk_action"; $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 c.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else { - if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'"; - if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'"; +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'"; + } + if ($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 { - if (is_array($actioncode)) - { - $sql .= " AND c.code IN ('".implode("','", $actioncode)."')"; + if ($actioncode == 'AC_NON_AUTO') { + $sql .= " AND c.type != 'systemauto'"; + } elseif ($actioncode == 'AC_ALL_AUTO') { + $sql .= " AND c.type = 'systemauto'"; + } else { + if (is_array($actioncode)) { + $sql .= " AND c.code IN (".$db->sanitize("'".implode("','", $actioncode)."'", 1).")"; } else { - $sql .= " AND c.code IN ('".implode("','", explode(',', $actioncode))."')"; + $sql .= " AND c.code IN (".$db->sanitize("'".implode("','", explode(',', $actioncode))."'", 1).")"; } } } } -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); -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; -if ($socid > 0) $sql .= " AND s.rowid = ".$socid; +if ($resourceid > 0) { + $sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = ".((int) $resourceid); +} +if ($pid) { + $sql .= " AND a.fk_project=".((int) $pid); +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; +} +if ($socid > 0) { + $sql .= " AND s.rowid = ".((int) $socid); +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; -if ($type) $sql .= " AND c.id = ".(int) $type; -if ($search_status == '0') { $sql .= " AND a.percent = 0"; } -if ($search_status == '-1') { $sql .= " AND a.percent = -1"; } // Not applicable -if ($search_status == '50') { $sql .= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started -if ($search_status == '100') { $sql .= " AND a.percent = 100"; } -if ($search_status == 'done') { $sql .= " AND (a.percent = 100)"; } -if ($search_status == 'todo') { $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; } -if ($search_id) $sql .= natural_search("a.id", $search_id, 1); -if ($search_title) $sql .= natural_search("a.label", $search_title); -if ($search_note) $sql .= natural_search('a.note', $search_note); +if ($filtert > 0 || $usergroup > 0) { + $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; +} +if ($type) { + $sql .= " AND c.id = ".((int) $type); +} +if ($search_status == '0') { + $sql .= " AND a.percent = 0"; +} +if ($search_status == 'na') { + $sql .= " AND a.percent = -1"; +} // Not applicable +if ($search_status == '50') { + $sql .= " AND (a.percent > 0 AND a.percent < 100)"; +} // Running already started +if ($search_status == '100') { + $sql .= " AND a.percent = 100"; +} +if ($search_status == 'done') { + $sql .= " AND (a.percent = 100)"; +} +if ($search_status == 'todo') { + $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; +} +if ($search_id) { + $sql .= natural_search("a.id", $search_id, 1); +} +if ($search_title) { + $sql .= natural_search("a.label", $search_title); +} +if ($search_note) { + $sql .= natural_search('a.note', $search_note); +} // We must filter on assignement table -if ($filtert > 0 || $usergroup > 0) -{ +if ($filtert > 0 || $usergroup > 0) { $sql .= " AND ("; - if ($filtert > 0) $sql .= "(ar.fk_element = ".$filtert." OR (ar.fk_element IS NULL AND a.fk_user_action=".$filtert."))"; // The OR is for backward compatibility - if ($usergroup > 0) $sql .= ($filtert > 0 ? " OR " : "")." ugu.fk_usergroup = ".$usergroup; + if ($filtert > 0) { + $sql .= "(ar.fk_element = ".((int) $filtert)." OR (ar.fk_element IS NULL AND a.fk_user_action = ".((int) $filtert)."))"; // The OR is for backward compatibility + } + if ($usergroup > 0) { + $sql .= ($filtert > 0 ? " OR " : "")." ugu.fk_usergroup = ".((int) $usergroup); + } $sql .= ")"; } // The second or of next test is to take event with no end date (we suppose duration is 1 hour in such case) -if ($dateselect > 0) $sql .= " AND ((a.datep2 >= '".$db->idate($dateselect)."' AND a.datep <= '".$db->idate($dateselect + 3600 * 24 - 1)."') OR (a.datep2 IS NULL AND a.datep > '".$db->idate($dateselect - 3600)."' AND a.datep <= '".$db->idate($dateselect + 3600 * 24 - 1)."'))"; -if ($datestart > 0) $sql .= " AND a.datep BETWEEN '".$db->idate($datestart)."' AND '".$db->idate($datestart + 3600 * 24 - 1)."'"; -if ($dateend > 0) $sql .= " AND a.datep2 BETWEEN '".$db->idate($dateend)."' AND '".$db->idate($dateend + 3600 * 24 - 1)."'"; +if ($dateselect > 0) { + $sql .= " AND ((a.datep2 >= '".$db->idate($dateselect)."' AND a.datep <= '".$db->idate($dateselect + 3600 * 24 - 1)."') OR (a.datep2 IS NULL AND a.datep > '".$db->idate($dateselect - 3600)."' AND a.datep <= '".$db->idate($dateselect + 3600 * 24 - 1)."'))"; +} +if ($datestart > 0) { + $sql .= " AND a.datep BETWEEN '".$db->idate($datestart)."' AND '".$db->idate($datestart + 3600 * 24 - 1)."'"; +} +if ($dateend > 0) { + $sql .= " AND a.datep2 BETWEEN '".$db->idate($dateend)."' AND '".$db->idate($dateend + 3600 * 24 - 1)."'"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -397,12 +519,10 @@ $sql .= $hookmanager->resPrint; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -413,8 +533,7 @@ $sql .= $db->plimit($limit + 1, $offset); dol_syslog("comm/action/list.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $actionstatic = new ActionComm($db); $societestatic = new Societe($db); @@ -434,7 +553,9 @@ if ($resql) print ''."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -442,8 +563,12 @@ if ($resql) print ''; $nav = ''; - if ($filter) $nav .= ''; - if ($showbirthday) $nav .= ''; + if ($filter) { + $nav .= ''; + } + if ($showbirthday) { + $nav .= ''; + } print $nav; //print dol_get_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); @@ -453,19 +578,19 @@ if ($resql) // Add link to show birthdays $link = ''; /* - if (empty($conf->use_javascript_ajax)) - { - $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.=''; - } - */ + if (empty($conf->use_javascript_ajax)) + { + $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.=''; + } + */ $s = $newtitle; @@ -479,31 +604,31 @@ if ($resql) } $viewmode = ''; - $viewmode .= ''; + $viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewList").''; - $viewmode .= ''; + $viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewCal").''; - $viewmode .= ''; + $viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewWeek").''; - $viewmode .= ''; + $viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); //$viewmode .= ''; $viewmode .= ''.$langs->trans("ViewDay").''; - $viewmode .= ''; + $viewmode .= ''; //$viewmode .= ''; $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); //$viewmode .= ''; @@ -539,13 +664,16 @@ if ($resql) print $s; + $objecttmp = new ActionComm($db); include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; $moreforfilter = ''; $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); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } $i = 0; print '
    '; @@ -556,11 +684,21 @@ if ($resql) print ''."\n"; print ''; - if (!empty($arrayfields['a.id']['checked'])) print ''; - if (!empty($arrayfields['owner']['checked'])) print ''; - if (!empty($arrayfields['c.libelle']['checked'])) print ''; - if (!empty($arrayfields['a.label']['checked'])) print ''; - if (!empty($arrayfields['a.note']['checked'])) print ''; + if (!empty($arrayfields['a.id']['checked'])) { + print ''; + } + if (!empty($arrayfields['owner']['checked'])) { + print ''; + } + if (!empty($arrayfields['c.libelle']['checked'])) { + print ''; + } + if (!empty($arrayfields['a.label']['checked'])) { + print ''; + } + if (!empty($arrayfields['a.note']['checked'])) { + print ''; + } if (!empty($arrayfields['a.datep']['checked'])) { print ''; } - if (!empty($arrayfields['a.fk_contact']['checked'])) print ''; - if (!empty($arrayfields['a.fk_element']['checked'])) print ''; + if (!empty($arrayfields['a.fk_contact']['checked'])) { + print ''; + } + if (!empty($arrayfields['a.fk_element']['checked'])) { + print ''; + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -585,8 +727,12 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (!empty($arrayfields['a.datec']['checked'])) print ''; - if (!empty($arrayfields['a.tms']['checked'])) print ''; + if (!empty($arrayfields['a.datec']['checked'])) { + print ''; + } + if (!empty($arrayfields['a.tms']['checked'])) { + print ''; + } if (!empty($arrayfields['a.percent']['checked'])) { print '\n"; print ''; - if (!empty($arrayfields['a.id']['checked'])) print_liste_field_titre($arrayfields['a.id']['label'], $_SERVER["PHP_SELF"], "a.id", $param, "", "", $sortfield, $sortorder); - if (!empty($arrayfields['owner']['checked'])) print_liste_field_titre($arrayfields['owner']['label'], $_SERVER["PHP_SELF"], "", $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['a.label']['checked'])) print_liste_field_titre($arrayfields['a.label']['label'], $_SERVER["PHP_SELF"], "a.label", $param, "", "", $sortfield, $sortorder); - if (!empty($arrayfields['a.note']['checked'])) print_liste_field_titre($arrayfields['a.note']['label'], $_SERVER["PHP_SELF"], "a.note", $param, "", "", $sortfield, $sortorder); + if (!empty($arrayfields['a.id']['checked'])) { + print_liste_field_titre($arrayfields['a.id']['label'], $_SERVER["PHP_SELF"], "a.id", $param, "", "", $sortfield, $sortorder); + } + if (!empty($arrayfields['owner']['checked'])) { + print_liste_field_titre($arrayfields['owner']['label'], $_SERVER["PHP_SELF"], "", $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['a.label']['checked'])) { + print_liste_field_titre($arrayfields['a.label']['label'], $_SERVER["PHP_SELF"], "a.label", $param, "", "", $sortfield, $sortorder); + } + if (!empty($arrayfields['a.note']['checked'])) { + print_liste_field_titre($arrayfields['a.note']['label'], $_SERVER["PHP_SELF"], "a.note", $param, "", "", $sortfield, $sortorder); + } //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) - if (!empty($arrayfields['a.datep']['checked'])) print_liste_field_titre($arrayfields['a.datep']['label'], $_SERVER["PHP_SELF"], "a.datep,a.id", $param, '', 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['a.datep2']['checked'])) print_liste_field_titre($arrayfields['a.datep2']['label'], $_SERVER["PHP_SELF"], "a.datep2", $param, '', 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", $param, "", "", $sortfield, $sortorder); - if (!empty($arrayfields['a.fk_contact']['checked'])) print_liste_field_titre($arrayfields['a.fk_contact']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); - if (!empty($arrayfields['a.fk_element']['checked'])) print_liste_field_titre($arrayfields['a.fk_element']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); + if (!empty($arrayfields['a.datep']['checked'])) { + print_liste_field_titre($arrayfields['a.datep']['label'], $_SERVER["PHP_SELF"], "a.datep,a.id", $param, '', 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['a.datep2']['checked'])) { + print_liste_field_titre($arrayfields['a.datep2']['label'], $_SERVER["PHP_SELF"], "a.datep2", $param, '', 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", $param, "", "", $sortfield, $sortorder); + } + if (!empty($arrayfields['a.fk_contact']['checked'])) { + print_liste_field_titre($arrayfields['a.fk_contact']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); + } + if (!empty($arrayfields['a.fk_element']['checked'])) { + print_liste_field_titre($arrayfields['a.fk_element']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -621,10 +787,16 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (!empty($arrayfields['a.datec']['checked'])) print_liste_field_titre($arrayfields['a.datec']['label'], $_SERVER["PHP_SELF"], "a.datec,a.id", $param, "", 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['a.tms']['checked'])) print_liste_field_titre($arrayfields['a.tms']['label'], $_SERVER["PHP_SELF"], "a.tms,a.id", $param, "", 'align="center"', $sortfield, $sortorder); + if (!empty($arrayfields['a.datec']['checked'])) { + print_liste_field_titre($arrayfields['a.datec']['label'], $_SERVER["PHP_SELF"], "a.datec,a.id", $param, "", 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['a.tms']['checked'])) { + print_liste_field_titre($arrayfields['a.tms']['label'], $_SERVER["PHP_SELF"], "a.tms,a.id", $param, "", 'align="center"', $sortfield, $sortorder); + } - if (!empty($arrayfields['a.percent']['checked']))print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", $param, "", 'align="center"', $sortfield, $sortorder); + if (!empty($arrayfields['a.percent']['checked'])) { + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", $param, "", 'align="center"', $sortfield, $sortorder); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; @@ -637,13 +809,11 @@ if ($resql) $arraylist = $caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0), '', 1); $contactListCache = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $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') - { + if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO') { $i++; continue; } @@ -654,6 +824,7 @@ if ($resql) $actionstatic->type_code = $obj->type_code; $actionstatic->type_label = $obj->type_label; $actionstatic->type_picto = $obj->type_picto; + $actionstatic->type_color = $obj->type_color; $actionstatic->label = $obj->label; $actionstatic->location = $obj->location; $actionstatic->note_private = dol_htmlentitiesbr($obj->note); @@ -670,47 +841,34 @@ if ($resql) } // User owner - if (!empty($arrayfields['owner']['checked'])) - { + if (!empty($arrayfields['owner']['checked'])) { print ''; } // Type - if (!empty($arrayfields['c.libelle']['checked'])) - { + if (!empty($arrayfields['c.libelle']['checked'])) { print ''; @@ -738,11 +896,21 @@ if ($resql) print ''; } @@ -756,15 +924,16 @@ if ($resql) // Third party if (!empty($arrayfields['s.nom']['checked'])) { print ''; } @@ -772,17 +941,13 @@ if ($resql) if (!empty($arrayfields['a.fk_contact']['checked'])) { print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index a399ee3d580..19f8a8ce31c 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -39,7 +39,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; 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; +if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) { + $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW = 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); @@ -49,31 +51,42 @@ $usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", $showbirthday = 0; // If not choice done on calendar owner, we filter on user. -if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) -{ +if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) { $filtert = $user->id; } $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 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "a.datec"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "a.datec"; +} // Security check $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 = ''; +if ($user->socid) { + $socid = $user->socid; +} +if ($socid < 0) { + $socid = ''; +} $canedit = 1; -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 -{ +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; } @@ -90,18 +103,20 @@ $type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPO $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('search_actioncode', 'array')) -{ +if (GETPOST('search_actioncode', 'array')) { $actioncode = GETPOST('search_actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + if (!count($actioncode)) { + $actioncode = '0'; + } } 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); +if ($actioncode == '' && empty($actioncodearray)) { + $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE); +} $dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); -if ($dateselect > 0) -{ +if ($dateselect > 0) { $day = GETPOST('dateselectday', 'int'); $month = GETPOST('dateselectmonth', 'int'); $year = GETPOST('dateselectyear', 'int'); @@ -112,9 +127,15 @@ $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); -if ($begin_h < 0 || $begin_h > 23) $begin_h = 9; -if ($end_h < 1 || $end_h > 24) $end_h = 18; -if ($end_h <= $begin_h) $end_h = $begin_h + 1; +if ($begin_h < 0 || $begin_h > 23) { + $begin_h = 9; +} +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 @@ -122,8 +143,12 @@ $tmparray = explode('-', $tmp); $begin_d = 1; $end_d = 53; -if ($status == '' && !GETPOSTISSET('status')) $status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); -if (empty($action) && !GETPOSTISSET('action')) $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +if ($status == '' && !GETPOSTISSET('status')) { + $status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); +} +if (empty($action) && !GETPOSTISSET('action')) { + $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +} if (GETPOST('viewcal', 'alpha') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { $action = 'show_month'; $day = ''; @@ -144,13 +169,17 @@ $langs->loadLangs(array('users', 'agenda', 'other', 'commercial')); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agenda')); +$result = restrictedArea($user, 'agenda', 0, '', 'myactions'); +if ($user->socid && $socid) { + $result = restrictedArea($user, 'societe', $socid); +} + /* * Actions */ -if ($action == 'delete_action') -{ +if ($action == 'delete_action') { $event = new ActionComm($db); $event->fetch($actionid); $event->fetch_optionals(); @@ -185,7 +214,9 @@ $parameters = array( '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'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $form = new Form($db); $companystatic = new Societe($db); @@ -223,31 +254,69 @@ $tmpday = $first_day; //print 'xx'.$next_year.'-'.$next_month.'-'.$next_day; $title = $langs->trans("DoneAndToDoActions"); -if ($status == 'done') $title = $langs->trans("DoneActions"); -if ($status == 'todo') $title = $langs->trans("ToDoActions"); +if ($status == 'done') { + $title = $langs->trans("DoneActions"); +} +if ($status == 'todo') { + $title = $langs->trans("ToDoActions"); +} $param = ''; if ($actioncode || GETPOSTISSET('search_actioncode')) { if (is_array($actioncode)) { - foreach ($actioncode as $str_action) $param .= "&search_actioncode[]=".urlencode($str_action); - } else $param .= "&search_actioncode=".urlencode($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 || GETPOSTISSET('status')) { + $param .= "&search_status=".urlencode($status); +} +if ($filter) { + $param .= "&search_filter=".urlencode($filter); +} +if ($filtert) { + $param .= "&search_filtert=".urlencode($filtert); +} +if ($usergroup > 0) { + $param .= "&search_usergroup=".urlencode($usergroup); +} +if ($socid > 0) { + $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); } -if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid); -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); -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); +$paramnoactionodate = $param; + $prev = dol_get_first_day($year, 1); $prev_year = $year - 1; $prev_month = $month; @@ -299,28 +368,23 @@ print 'use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { $s = ''; $s .= ''."\n"; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { $s .= '
    '.$langs->trans("LocalAgenda").'  
    '; - if (is_array($showextcals) && count($showextcals) > 0) - { - foreach ($showextcals as $val) - { + if (is_array($showextcals) && count($showextcals) > 0) { + foreach ($showextcals as $val) { $htmlname = md5($val['name']); $s .= ''."\n"; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { $s .= '
    '.$langs->trans("LocalAgenda").'  
    '; - if (is_array($showextcals) && count($showextcals) > 0) - { - foreach ($showextcals as $val) - { + if (is_array($showextcals) && count($showextcals) > 0) { + foreach ($showextcals as $val) { $htmlname = md5($val['name']); $s .= ''."\n"; - if (count($listofpaths)) - { - foreach ($listofpaths as $key => $val) - { + if (count($listofpaths)) { + foreach ($listofpaths as $key => $val) { $out .= '
    '; $out .= img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; $out .= ' '; $out .= '
    '; } } else { - $out .= $langs->trans("NoAttachedFiles").'
    '; + $out .= ''.$langs->trans("NoAttachedFiles").'
    '; } // Add link to add file $out .= ''; @@ -1269,15 +1235,13 @@ if ($action == 'create') // Message print '
    '; - if ($action == 'edit') - { + if ($action == 'edit') { // wysiwyg editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('bodyemail', $object->body, '', 600, 'dolibarr_mailings', '', true, true, $conf->global->FCKEDITOR_ENABLE_MAILING, 20, '90%'); $doleditor->Create(); } - if ($action == 'edithtml') - { + if ($action == 'edithtml') { // HTML source editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('bodyemail', $object->body, '', 600, 'dolibarr_mailings', '', true, true, 'ace', 20, '90%'); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index fe3f4a76d96..afd6273d6c0 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -35,21 +35,23 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load translation files required by the page $langs->load("mails"); -// Security check -if (!$user->rights->mailing->lire || $user->socid > 0) 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 +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 = "mc.statut,email"; -if (!$sortorder) $sortorder = "DESC,ASC"; +if (!$sortfield) { + $sortfield = "mc.statut,email"; +} +if (!$sortorder) { + $sortorder = "DESC,ASC"; +} $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'int'); @@ -67,17 +69,22 @@ $object = new Mailing($db); $result = $object->fetch($id); +// Security check +if (!$user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) { + accessforbidden(); +} +//$result = restrictedArea($user, 'mailing'); + + /* * Actions */ -if ($action == 'add') -{ +if ($action == 'add') { $module = GETPOST("module", 'alpha'); $result = -1; - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
    "; dol_syslog("Scan directory ".$dir." for modules"); @@ -86,8 +93,7 @@ if ($action == 'add') $file = $dir."/".$module.".modules.php"; $classname = "mailing_".$module; - if (file_exists($file)) - { + if (file_exists($file)) { require_once $file; // Add targets into database @@ -96,25 +102,19 @@ if ($action == 'add') $result = $obj->add_to_target($id); } } - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("XTargetsAdded", $result), null, 'mesgs'); - - header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); - exit; + $action = ''; } - if ($result == 0) - { + if ($result == 0) { setEventMessages($langs->trans("WarningNoEMailsAdded"), null, 'warnings'); } - if ($result < 0) - { + if ($result < 0) { setEventMessages($langs->trans("Error").($obj->error ? ' '.$obj->error : ''), null, 'errors'); } } -if (GETPOST('clearlist', 'int')) -{ +if (GETPOST('clearlist', 'int')) { // Loading Class $obj = new MailingTargets($db); $obj->clear_target($id); @@ -124,8 +124,7 @@ if (GETPOST('clearlist', 'int')) */ } -if (GETPOST('exportcsv', 'int')) -{ +if (GETPOST('exportcsv', 'int')) { $completefilename = 'targets_emailing'.$object->id.'_'.dol_print_date(dol_now(), 'dayhourlog').'.csv'; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename='.$completefilename); @@ -138,13 +137,11 @@ if (GETPOST('exportcsv', 'int')) $sql .= $db->order($sortfield, $sortorder); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $sep = ','; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { print $obj->rowid.$sep; print '"'.$obj->lastname.'"'.$sep; print '"'.$obj->firstname.'"'.$sep; @@ -166,15 +163,12 @@ if (GETPOST('exportcsv', 'int')) exit; } -if ($action == 'delete') -{ +if ($action == 'delete') { // Ici, rowid indique le destinataire et id le mailing - $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid = ".((int) $rowid); $resql = $db->query($sql); - if ($resql) - { - if (!empty($id)) - { + if ($resql) { + if (!empty($id)) { $obj = new MailingTargets($db); $obj->update_nb($id); @@ -189,8 +183,7 @@ if ($action == 'delete') } // 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 -{ +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_lastname = ''; $search_firstname = ''; $search_email = ''; @@ -209,8 +202,7 @@ llxHeader('', $langs->trans("Mailing"), 'EN:Module_EMailing|FR:Module_Mailing|ES $form = new Form($db); $formmailing = new FormMailing($db); -if ($object->fetch($id) >= 0) -{ +if ($object->fetch($id) >= 0) { $head = emailing_prepare_head($object); print dol_get_fiche_head($head, 'targets', $langs->trans("Mailing"), -1, 'email'); @@ -219,14 +211,15 @@ if ($object->fetch($id) >= 0) $morehtmlright = ''; $nbtry = $nbok = 0; - if ($object->statut == 2 || $object->statut == 3) - { + if ($object->statut == 2 || $object->statut == 3) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); $nbok = ($nbtry - $nbko); $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; - if ($nbko) $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + if ($nbko) { + $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + } $morehtmlright .= ')   '; } @@ -279,21 +272,19 @@ if ($object->fetch($id) >= 0) print $langs->trans("TotalNbOfDistinctRecipients"); print '
    '; print ''; - if (!$filteremail) print ''; + if (!$filteremail) { + print ''; + } print ''; print ''; print '\n"; @@ -224,8 +264,7 @@ if ($resql) $email = new Mailing($db); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $email->id = $obj->rowid; @@ -246,8 +285,7 @@ if ($resql) print ''; // Nb of email - if (!$filteremail) - { + if (!$filteremail) { print ''; } diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index c8a674773a2..fb10c6435af 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -30,24 +30,33 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Load translation files required by the page $langs->loadLangs(array('orders', 'companies')); +$action = GETPOST('action', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); + $id = GETPOST('id', 'int'); $_socid = GETPOST("id", 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $_socid = $user->socid; } +// Security check +$socid = GETPOST("socid", 'int'); +if ($user->socid > 0) { + $action = ''; + $id = $user->socid; +} +$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); + /* * Actions */ -if ($_POST["action"] == 'setpricelevel') -{ +if ($action == 'setpricelevel' && $user->rights->societe->creer) { $soc = new Societe($db); $soc->fetch($id); - $soc->set_price_level($_POST["price_level"], $user); + $soc->setPriceLevel(GETPOST("price_level"), $user); header("Location: multiprix.php?id=".$id); exit; @@ -62,8 +71,7 @@ llxHeader(); $userstatic = new User($db); -if ($_socid > 0) -{ +if ($_socid > 0) { // We load data of thirdparty $objsoc = new Societe($db); $objsoc->id = $_socid; @@ -73,8 +81,12 @@ if ($_socid > 0) $head = societe_prepare_head($objsoc); $tabchoice = ''; - if ($objsoc->client == 1) $tabchoice = 'customer'; - if ($objsoc->client == 2) $tabchoice = 'prospect'; + if ($objsoc->client == 1) { + $tabchoice = 'customer'; + } + if ($objsoc->client == 2) { + $tabchoice = 'prospect'; + } print ''; print ''; @@ -90,14 +102,16 @@ if ($_socid > 0) print ''; print ''; + // Payment mode + print ''; + print ''; + // Delivery date $langs->load('deliveries'); print ''; print ''; @@ -2065,13 +2148,15 @@ if ($action == 'create') print ''; } + // Warehouse + if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { + $langs->load('stocks'); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + print ''; + print ''; + } + // Origin of demand print ''; print ''; - // Payment mode - print ''; - print ''; - // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Multicurrency code print ''; print ''; // Multicurrency rate - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; print ''; } - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { // Bank Account print ''; - print ''; } if ($totalVolume) { print ''; - print ''; } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; - print '
    '; print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel'); @@ -574,8 +712,12 @@ if ($resql) if (!empty($arrayfields['s.nom']['checked'])) { print ''; $formactions->form_select_status_action('formaction', $search_status, 1, 'search_status', 1, 2, 'minwidth100imp maxwidth125'); @@ -601,17 +747,37 @@ if ($resql) print "
    '; // With edge and chrome the td overflow is not supported correctly when content is not full text. - if ($obj->fk_user_action > 0) - { + if ($obj->fk_user_action > 0) { $userstatic->fetch($obj->fk_user_action); print $userstatic->getNomUrl(-1); - } else print ' '; + } else { + print ' '; + } print ''; - $actioncomm = $actionstatic; - // TODO Code common with code into showactions - $imgpicto = ''; - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($actioncomm->type_picto) { - $imgpicto = img_picto('', $actioncomm->type_picto); - } 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' || $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').' '; - } - } - print $imgpicto; - + print $actionstatic->getTypePicto(); $labeltype = $obj->type_code; - if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; - if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { + 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 ($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 + 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 ''; print dol_print_date($db->jdate($obj->dp), $formatToUse, 'tzuser'); $late = 0; - if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; - if ($obj->percent == 0 && !$obj->dp && $obj->dp2 && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; - if ($obj->percent > 0 && $obj->percent < 100 && $obj->dp2 && $db->jdate($obj->dp2) < ($now - $delay_warning)) $late = 1; - if ($obj->percent > 0 && $obj->percent < 100 && !$obj->dp2 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; - if ($late) print img_warning($langs->trans("Late")).' '; + if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) { + $late = 1; + } + if ($obj->percent == 0 && !$obj->dp && $obj->dp2 && $db->jdate($obj->dp) < ($now - $delay_warning)) { + $late = 1; + } + if ($obj->percent > 0 && $obj->percent < 100 && $obj->dp2 && $db->jdate($obj->dp2) < ($now - $delay_warning)) { + $late = 1; + } + if ($obj->percent > 0 && $obj->percent < 100 && !$obj->dp2 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) { + $late = 1; + } + if ($late) { + print img_warning($langs->trans("Late")).' '; + } print ''; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $societestatic->id = $obj->socid; $societestatic->client = $obj->client; $societestatic->name = $obj->societe; $societestatic->email = $obj->socemail; print $societestatic->getNomUrl(1, '', 28); - } else print ' '; + } else { + print ' '; + } print ''; - if (!empty($actionstatic->socpeopleassigned)) - { + if (!empty($actionstatic->socpeopleassigned)) { $contactList = array(); - foreach ($actionstatic->socpeopleassigned as $socpeopleassigned) - { - if (!isset($contactListCache[$socpeopleassigned['id']])) - { + foreach ($actionstatic->socpeopleassigned as $socpeopleassigned) { + if (!isset($contactListCache[$socpeopleassigned['id']])) { // if no cache found we fetch it $contact = new Contact($db); - if ($contact->fetch($socpeopleassigned['id']) > 0) - { + if ($contact->fetch($socpeopleassigned['id']) > 0) { $contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1, '', 0); $contactList[] = $contact->getNomUrl(1, '', 0); } @@ -794,8 +959,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; $contactstatic->lastname = $obj->lastname; @@ -847,10 +1011,11 @@ if ($resql) } // Action column print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->id, $arrayofselected)) $selected = 1; + if (in_array($obj->id, $arrayofselected)) { + $selected = 1; + } print ''; } print ''; $nbemail = ($object->nbemail ? $object->nbemail : 0); - if (is_numeric($nbemail)) - { + if (is_numeric($nbemail)) { $text = ''; - if ((!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) - { - if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) - { + if ((!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) { + if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) { $text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB); } else { $text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed'); } } - if (empty($nbemail)) $nbemail .= ' '.img_warning('').' '.$langs->trans("NoTargetYet").''; - if ($text) - { + if (empty($nbemail)) { + $nbemail .= ' '.img_warning('').' '.$langs->trans("NoTargetYet").''; + } + if ($text) { print $form->textwithpicto($nbemail, $text, 1, 'warning'); } else { print $nbemail; @@ -313,8 +304,7 @@ if ($object->fetch($id) >= 0) $allowaddtarget = ($object->statut == 0); // Show email selectors - if ($allowaddtarget && $user->rights->mailing->creer) - { + if ($allowaddtarget && $user->rights->mailing->creer) { print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin ?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1) : ''), 'generic'); //print ''; @@ -335,23 +325,20 @@ if ($object->fetch($id) >= 0) clearstatcache(); - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { $modulenames = array(); // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
    "; dol_syslog("Scan directory ".$dir." for modules"); $handle = @opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') - { - if (preg_match("/(.*)\.modules\.php$/i", $file, $reg)) - { - if ($reg[1] == 'example') continue; + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { + if (preg_match("/(.*)\.modules\.php$/i", $file, $reg)) { + if ($reg[1] == 'example') { + continue; + } $modulenames[] = $reg[1]; } } @@ -365,8 +352,7 @@ if ($object->fetch($id) >= 0) $var = true; // Loop on each submodule - foreach ($modulenames as $modulename) - { + foreach ($modulenames as $modulename) { // Loading Class $file = $dir.$modulename.".modules.php"; $classname = "mailing_".$modulename; @@ -376,10 +362,8 @@ if ($object->fetch($id) >= 0) // Check dependencies $qualified = (isset($obj->enabled) ? $obj->enabled : 1); - foreach ($obj->require_module as $key) - { - if (!$conf->$key->enabled || (!$user->admin && $obj->require_admin)) - { + foreach ($obj->require_module as $key) { + if (!$conf->$key->enabled || (!$user->admin && $obj->require_admin)) { $qualified = 0; //print "Les prerequis d'activation du module mailing ne sont pas respectes. Il ne sera pas actif"; break; @@ -387,12 +371,10 @@ if ($object->fetch($id) >= 0) } // Si le module mailing est qualifie - if ($qualified) - { + if ($qualified) { $var = !$var; - if ($allowaddtarget) - { + if ($allowaddtarget) { print ''; print ''; } else { @@ -400,7 +382,9 @@ if ($object->fetch($id) >= 0) } print '
    '; - if (empty($obj->picto)) $obj->picto = 'generic'; + if (empty($obj->picto)) { + $obj->picto = 'generic'; + } print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle pictomodule"'); print ' '; print $obj->getDesc(); @@ -408,14 +392,12 @@ if ($object->fetch($id) >= 0) try { $nbofrecipient = $obj->getNbOfRecipients(''); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } print '
    '; - if ($nbofrecipient >= 0) - { + if ($nbofrecipient >= 0) { print $nbofrecipient; } else { print $langs->trans("Error").' '.img_error($obj->error); @@ -423,22 +405,22 @@ if ($object->fetch($id) >= 0) print '
    '; print '
    '; - if ($allowaddtarget) - { + if ($allowaddtarget) { try { $filter = $obj->formFilter(); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } - if ($filter) print $filter; - else print $langs->trans("None"); + if ($filter) { + print $filter; + } else { + print $langs->trans("None"); + } } print '
    '; print '
    '; - if ($allowaddtarget) - { + if ($allowaddtarget) { print ''; } else { print ''; @@ -447,8 +429,11 @@ if ($object->fetch($id) >= 0) } print '
    '; - if ($allowaddtarget) print ''; - else print '
    '; + if ($allowaddtarget) { + print ''; + } else { + print ''; + } } } } // End foreach dir @@ -464,7 +449,7 @@ if ($object->fetch($id) >= 0) $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; $asearchcriteriahasbeenset = 0; - if ($search_lastname) { + if ($search_lastname) { $sql .= natural_search("mc.lastname", $search_lastname); $asearchcriteriahasbeenset++; } @@ -472,11 +457,11 @@ if ($object->fetch($id) >= 0) $sql .= natural_search("mc.firstname", $search_firstname); $asearchcriteriahasbeenset++; } - if ($search_email) { + if ($search_email) { $sql .= natural_search("mc.email", $search_email); $asearchcriteriahasbeenset++; } - if ($search_other) { + if ($search_other) { $sql .= natural_search("mc.other", $search_other); $asearchcriteriahasbeenset++; } @@ -488,43 +473,51 @@ if ($object->fetch($id) >= 0) // 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 - $page = 0; - $offset = 0; - } + 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; + } - // Fix/update nbemail on emailing record if it differs (may happen if user edit lines from database directly) - if (empty($asearchcriteriahasbeenset)) { - if ($nbtotalofrecords != $object->nbemail) { - dol_syslog("We found a difference in nb of record in target table and the property ->nbemail, we fix ->nbemail"); - //print "nbemail=".$object->nbemail." nbtotalofrecords=".$nbtotalofrecords; - $resultrefresh = $object->refreshNbOfTargets(); - if ($resultrefresh < 0) { - dol_print_error($db, $object->error, $object->errors); - } - } - } + // Fix/update nbemail on emailing record if it differs (may happen if user edit lines from database directly) + if (empty($asearchcriteriahasbeenset)) { + if ($nbtotalofrecords != $object->nbemail) { + dol_syslog("We found a difference in nb of record in target table and the property ->nbemail, we fix ->nbemail"); + //print "nbemail=".$object->nbemail." nbtotalofrecords=".$nbtotalofrecords; + $resultrefresh = $object->refreshNbOfTargets(); + if ($resultrefresh < 0) { + dol_print_error($db, $object->error, $object->errors); + } + } + } } //$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $param = "&id=".$object->id; //if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($search_lastname) $param .= "&search_lastname=".urlencode($search_lastname); - if ($search_firstname) $param .= "&search_firstname=".urlencode($search_firstname); - if ($search_email) $param .= "&search_email=".urlencode($search_email); - if ($search_other) $param .= "&search_other=".urlencode($search_other); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($search_lastname) { + $param .= "&search_lastname=".urlencode($search_lastname); + } + if ($search_firstname) { + $param .= "&search_firstname=".urlencode($search_firstname); + } + if ($search_email) { + $param .= "&search_email=".urlencode($search_email); + } + if ($search_other) { + $param .= "&search_other=".urlencode($search_other); + } print ''; print ''; @@ -575,17 +568,17 @@ if ($object->fetch($id) >= 0) print ''; // Source print ''; // Date last update print ''; // Date sending print ''; //Statut @@ -599,7 +592,9 @@ if ($object->fetch($id) >= 0) print ''; print ''; - if ($page) $param .= "&page=".urlencode($page); + if ($page) { + $param .= "&page=".urlencode($page); + } print ''; print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "mc.email", $param, "", "", $sortfield, $sortorder); @@ -617,8 +612,7 @@ if ($object->fetch($id) >= 0) $i = 0; - if ($num) - { + if ($num) { include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -628,8 +622,7 @@ if ($object->fetch($id) >= 0) $objectstaticcompany = new Societe($db); $objectstaticcontact = new Contact($db); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); print ''; @@ -638,24 +631,19 @@ if ($object->fetch($id) >= 0) print ''; print ''; print ''; // Date last update - print ''; // Status of recipient sending email (Warning != status of emailing) - if ($obj->statut == 0) - { + if ($obj->statut == 0) { // Date sent - print ''; + print ''; print ''; } else { // Date sent - print ''; + print ''; print ''; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index b7f20319229..0e7f2abe76d 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -131,7 +131,7 @@ class AdvanceTargetingMailing extends CommonObject /** * Create object into database * - * @param User $user User that creates + * @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 */ @@ -228,7 +228,7 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " t.tms"; $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); @@ -284,9 +284,9 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; if (!empty($id)) { - $sql .= " WHERE t.fk_element = ".$id." AND type_element='mailing'"; + $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'"; } else { - $sql .= " WHERE t.fk_element = ".$this->fk_element." AND type_element='mailing'"; + $sql .= " WHERE t.fk_element = ".((int) $this->fk_element)." AND type_element = 'mailing'"; } dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); @@ -347,9 +347,9 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; if (!empty($id)) { - $sql .= " WHERE t.fk_element = ".$id." AND type_element='$type_element'"; + $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'"; } else { - $sql .= " WHERE t.fk_element = ".$this->fk_element." AND type_element='$type_element'"; + $sql .= " WHERE t.fk_element = ".((int) $this->fk_element)." AND type_element = '".$this->db->escape($type_element)."'"; } dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); @@ -419,7 +419,7 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " filtervalue=".(isset($this->filtervalue) ? "'".$this->db->escape($this->filtervalue)."'" : "null").","; $sql .= " fk_user_mod=".$user->id; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); @@ -459,7 +459,7 @@ class AdvanceTargetingMailing extends CommonObject if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."advtargetemailing"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); @@ -559,34 +559,34 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[] = " (t.parent IN (SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE (".$str.")))"; } if (!empty($arrayquery['cust_status']) && count($arrayquery['cust_status']) > 0) { - $sqlwhere[] = " (t.status IN (".implode(',', $arrayquery['cust_status'])."))"; + $sqlwhere[] = " (t.status IN (".$this->db->sanitize(implode(',', $arrayquery['cust_status']))."))"; } if (!empty($arrayquery['cust_typecust']) && count($arrayquery['cust_typecust']) > 0) { - $sqlwhere[] = " (t.client IN (".implode(',', $arrayquery['cust_typecust'])."))"; + $sqlwhere[] = " (t.client IN (".$this->db->sanitize(implode(',', $arrayquery['cust_typecust']))."))"; } if (!empty($arrayquery['cust_comm_status']) && count($arrayquery['cust_comm_status'] > 0)) { - $sqlwhere[] = " (t.fk_stcomm IN (".implode(',', $arrayquery['cust_comm_status'])."))"; + $sqlwhere[] = " (t.fk_stcomm IN (".$this->db->sanitize(implode(',', $arrayquery['cust_comm_status']))."))"; } if (!empty($arrayquery['cust_prospect_status']) && count($arrayquery['cust_prospect_status']) > 0) { - $sqlwhere[] = " (t.fk_prospectlevel IN ('".implode("','", $arrayquery['cust_prospect_status'])."'))"; + $sqlwhere[] = " (t.fk_prospectlevel IN (".$this->db->sanitize("'".implode("','", $arrayquery['cust_prospect_status'])."'", 1)."))"; } if (!empty($arrayquery['cust_typeent']) && count($arrayquery['cust_typeent']) > 0) { - $sqlwhere[] = " (t.fk_typent IN (".implode(',', $arrayquery['cust_typeent'])."))"; + $sqlwhere[] = " (t.fk_typent IN (".$this->db->sanitize(implode(',', $arrayquery['cust_typeent']))."))"; } if (!empty($arrayquery['cust_saleman']) && count($arrayquery['cust_saleman']) > 0) { - $sqlwhere[] = " (saleman.fk_user IN (".implode(',', $arrayquery['cust_saleman'])."))"; + $sqlwhere[] = " (saleman.fk_user IN (".$this->db->sanitize(implode(',', $arrayquery['cust_saleman']))."))"; } if (!empty($arrayquery['cust_country']) && count($arrayquery['cust_country']) > 0) { - $sqlwhere[] = " (t.fk_pays IN (".implode(',', $arrayquery['cust_country'])."))"; + $sqlwhere[] = " (t.fk_pays IN (".$this->db->sanitize(implode(',', $arrayquery['cust_country']))."))"; } if (!empty($arrayquery['cust_effectif_id']) && count($arrayquery['cust_effectif_id']) > 0) { - $sqlwhere[] = " (t.fk_effectif IN (".implode(',', $arrayquery['cust_effectif_id'])."))"; + $sqlwhere[] = " (t.fk_effectif IN (".$this->db->sanitize(implode(',', $arrayquery['cust_effectif_id']))."))"; } if (!empty($arrayquery['cust_categ']) && count($arrayquery['cust_categ']) > 0) { - $sqlwhere[] = " (custcateg.fk_categorie IN (".implode(',', $arrayquery['cust_categ'])."))"; + $sqlwhere[] = " (custcateg.fk_categorie IN (".$this->db->sanitize(implode(',', $arrayquery['cust_categ']))."))"; } if (!empty($arrayquery['cust_language']) && count($arrayquery['cust_language']) > 0) { - $sqlwhere[] = " (t.default_lang IN ('".implode("','", $arrayquery['cust_language'])."'))"; + $sqlwhere[] = " (t.default_lang IN (".$this->db->sanitize("'".implode("','", $arrayquery['cust_language'])."'", 1)."))"; } //Standard Extrafield feature @@ -614,11 +614,11 @@ class AdvanceTargetingMailing extends CommonObject } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key] != '') { - $sqlwhere[] = " (te.".$key." = ".$arrayquery['options_'.$key].")"; + $sqlwhere[] = " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")"; } } else { if (is_array($arrayquery['options_'.$key])) { - $sqlwhere[] = " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))"; + $sqlwhere[] = " (te.".$key." IN (".$this->db->sanitize("'".implode("','", $arrayquery['options_'.$key])."'", 1)."))"; } elseif (!empty($arrayquery['options_'.$key])) { $sqlwhere[] = " (te.".$key." LIKE '".$this->db->escape($arrayquery['options_'.$key])."')"; } @@ -703,7 +703,7 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[] = " (t.statut IN (".$this->db->sanitize($this->db->escape(implode(',', $arrayquery['contact_status'])))."))"; } if (!empty($arrayquery['contact_civility']) && count($arrayquery['contact_civility']) > 0) { - $sqlwhere[] = " (t.civility IN ('".$this->db->sanitize($this->db->escape(implode("','", $arrayquery['contact_civility'])))."'))"; + $sqlwhere[] = " (t.civility IN (".$this->db->sanitize("'".implode("','", $arrayquery['contact_civility'])."'", 1)."))"; } if ($arrayquery['contact_no_email'] != '') { $tmpwhere = ''; @@ -762,7 +762,7 @@ class AdvanceTargetingMailing extends CommonObject } } else { if (is_array($arrayquery['options_'.$key.'_cnct'])) { - $sqlwhere[] = " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key.'_cnct'])."'))"; + $sqlwhere[] = " (te.".$key." IN (".$this->db->sanitize("'".implode("','", $arrayquery['options_'.$key.'_cnct'])."'", 1)."))"; } elseif (!empty($arrayquery['options_'.$key.'_cnct'])) { $sqlwhere[] = " (te.".$key." LIKE '".$this->db->escape($arrayquery['options_'.$key.'_cnct'])."')"; } @@ -797,34 +797,34 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[] = " (ts.parent IN (SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE (".$str.")))"; } if (!empty($arrayquery['cust_status']) && count($arrayquery['cust_status']) > 0) { - $sqlwhere[] = " (ts.status IN (".implode(',', $arrayquery['cust_status'])."))"; + $sqlwhere[] = " (ts.status IN (".$this->db->sanitize(implode(',', $arrayquery['cust_status']))."))"; } if (!empty($arrayquery['cust_typecust']) && count($arrayquery['cust_typecust']) > 0) { - $sqlwhere[] = " (ts.client IN (".implode(',', $arrayquery['cust_typecust'])."))"; + $sqlwhere[] = " (ts.client IN (".$this->db->sanitize(implode(',', $arrayquery['cust_typecust']))."))"; } if (!empty($arrayquery['cust_comm_status']) && count($arrayquery['cust_comm_status'] > 0)) { - $sqlwhere[] = " (ts.fk_stcomm IN (".implode(',', $arrayquery['cust_comm_status'])."))"; + $sqlwhere[] = " (ts.fk_stcomm IN (".$this->db->sanitize(implode(',', $arrayquery['cust_comm_status']))."))"; } if (!empty($arrayquery['cust_prospect_status']) && count($arrayquery['cust_prospect_status']) > 0) { - $sqlwhere[] = " (ts.fk_prospectlevel IN ('".implode("','", $arrayquery['cust_prospect_status'])."'))"; + $sqlwhere[] = " (ts.fk_prospectlevel IN ('".$this->db->sanitize(implode("','", $arrayquery['cust_prospect_status']))."'))"; } if (!empty($arrayquery['cust_typeent']) && count($arrayquery['cust_typeent']) > 0) { - $sqlwhere[] = " (ts.fk_typent IN (".implode(',', $arrayquery['cust_typeent'])."))"; + $sqlwhere[] = " (ts.fk_typent IN (".$this->db->sanitize(implode(',', $arrayquery['cust_typeent']))."))"; } if (!empty($arrayquery['cust_saleman']) && count($arrayquery['cust_saleman']) > 0) { - $sqlwhere[] = " (saleman.fk_user IN (".implode(',', $arrayquery['cust_saleman'])."))"; + $sqlwhere[] = " (saleman.fk_user IN (".$this->db->sanitize(implode(',', $arrayquery['cust_saleman']))."))"; } if (!empty($arrayquery['cust_country']) && count($arrayquery['cust_country']) > 0) { - $sqlwhere[] = " (ts.fk_pays IN (".implode(',', $arrayquery['cust_country'])."))"; + $sqlwhere[] = " (ts.fk_pays IN (".$this->db->sanitize(implode(',', $arrayquery['cust_country']))."))"; } if (!empty($arrayquery['cust_effectif_id']) && count($arrayquery['cust_effectif_id']) > 0) { - $sqlwhere[] = " (ts.fk_effectif IN (".implode(',', $arrayquery['cust_effectif_id'])."))"; + $sqlwhere[] = " (ts.fk_effectif IN (".$this->db->sanitize(implode(',', $arrayquery['cust_effectif_id']))."))"; } if (!empty($arrayquery['cust_categ']) && count($arrayquery['cust_categ']) > 0) { - $sqlwhere[] = " (custcateg.fk_categorie IN (".implode(',', $arrayquery['cust_categ'])."))"; + $sqlwhere[] = " (custcateg.fk_categorie IN (".$this->db->sanitize(implode(',', $arrayquery['cust_categ']))."))"; } if (!empty($arrayquery['cust_language']) && count($arrayquery['cust_language']) > 0) { - $sqlwhere[] = " (ts.default_lang IN ('".implode("','", $arrayquery['cust_language'])."'))"; + $sqlwhere[] = " (ts.default_lang IN ('".$this->db->sanitize(implode("','", $arrayquery['cust_language']))."'))"; } //Standard Extrafield feature @@ -860,7 +860,7 @@ class AdvanceTargetingMailing extends CommonObject } } else { if (is_array($arrayquery['options_'.$key])) { - $sqlwhere[] = " (tse.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))"; + $sqlwhere[] = " (tse.".$key." IN (".$this->db->sanitize("'".implode("','", $arrayquery['options_'.$key])."'", 1)."))"; } elseif (!empty($arrayquery['options_'.$key])) { $sqlwhere[] = " (tse.".$key." LIKE '".$this->db->escape($arrayquery['options_'.$key])."')"; } diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 9d230404cba..2c47edd4289 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -74,8 +74,9 @@ class FormAdvTargetEmailing extends Form $obj = $this->db->fetch_object($resql); $level = $langs->trans($obj->code); - if ($level == $obj->code) + if ($level == $obj->code) { $level = $langs->trans($obj->label); + } $options_array[$obj->code] = $level; $i++; @@ -89,9 +90,9 @@ class FormAdvTargetEmailing extends Form /** * Return combo list of activated countries, into language of user * - * @param string $htmlname of html select object - * @param array $selected_array or Code or Label of preselected country - * @return string HTML string with select + * @param string $htmlname of html select object + * @param array $selected_array or Code or Label of preselected country + * @return string HTML string with select */ public function multiselectCountry($htmlname = 'country_id', $selected_array = array()) { @@ -131,8 +132,9 @@ class FormAdvTargetEmailing extends Form foreach ($countryArray as $row) { $label = dol_trunc($row['label'], $maxlength, 'middle'); - if ($row['code_iso']) + if ($row['code_iso']) { $label .= ' ('.$row['code_iso'].')'; + } $options_array[$row['rowid']] = $label; } @@ -165,8 +167,9 @@ class FormAdvTargetEmailing extends Form $sql_usr .= " WHERE u2.entity IN (0,".$conf->entity.")"; $sql_usr .= " AND u2.rowid = sc.fk_user "; - if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) + if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { $sql_usr .= " AND u2.statut<>0 "; + } $sql_usr .= " ORDER BY name ASC"; // print $sql_usr;exit; @@ -201,8 +204,7 @@ class FormAdvTargetEmailing extends Form $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 12); - foreach ($langs_available as $key => $value) - { + foreach ($langs_available as $key => $value) { $label = $value; $options_array[$key] = $label; } @@ -223,8 +225,7 @@ class FormAdvTargetEmailing extends Form { $options_array = array(); - if (is_array($sqlqueryparam)) - { + if (is_array($sqlqueryparam)) { $param_list = array_keys($sqlqueryparam); $InfoFieldList = explode(":", $param_list [0]); @@ -297,14 +298,11 @@ class FormAdvTargetEmailing extends Form dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $this->db->fetch_object($resql); // Si traduction existe, on l'utilise, sinon on prend le libelle par defaut $label = ($langs->trans("Civility".$obj->code) != "Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite != '-' ? $obj->civilite : '')); @@ -364,8 +362,9 @@ class FormAdvTargetEmailing extends Form $resql = $this->db->query($sql); if ($resql) { $out .= ''; print '
    '; @@ -80,16 +80,14 @@ print '
    '; $result = $db->query($sql); @@ -121,8 +115,7 @@ if (is_resource($handle)) $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); print ''; $num = $db->num_rows($result); - if ($num > 0) - { + if ($num > 0) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); $mailstatic = new Mailing($db); $mailstatic->id = $obj->rowid; diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 199a5caad8b..74d6943a044 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -33,8 +33,10 @@ $id = GETPOST('id', 'int'); $langs->load("mails"); // Security check -if (!$user->rights->mailing->lire || $user->socid > 0) -accessforbidden(); +if (!$user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) { + accessforbidden(); +} +//$result = restrictedArea($user, 'mailing'); @@ -48,8 +50,7 @@ $form = new Form($db); $object = new Mailing($db); -if ($object->fetch($id) >= 0) -{ +if ($object->fetch($id) >= 0) { $head = emailing_prepare_head($object); print dol_get_fiche_head($head, 'info', $langs->trans("Mailing"), -1, 'email'); @@ -58,13 +59,14 @@ if ($object->fetch($id) >= 0) $morehtmlright = ''; $nbtry = $nbok = 0; - if ($object->statut == 2 || $object->statut == 3) - { + if ($object->statut == 2 || $object->statut == 3) { $nbtry = $object->countNbOfTargets('alreadysent'); $nbko = $object->countNbOfTargets('alreadysentko'); $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail; - if ($nbko) $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + if ($nbko) { + $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error"); + } $morehtmlright .= ')   '; } @@ -73,14 +75,9 @@ if ($object->fetch($id) >= 0) print '

    '; //print '
    '; - print ' '; + print ' '; print ''; - print ' '; + print ' '; print ''; - print ' '; + print ' '; print '
    '.$obj->firstname.''.$obj->other.''; - if (empty($obj->source_id) || empty($obj->source_type)) - { + if (empty($obj->source_id) || empty($obj->source_type)) { print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility } else { - if ($obj->source_type == 'member') - { + if ($obj->source_type == 'member') { $objectstaticmember->fetch($obj->source_id); print $objectstaticmember->getNomUrl(1); - } elseif ($obj->source_type == 'user') - { + } elseif ($obj->source_type == 'user') { $objectstaticuser->fetch($obj->source_id); print $objectstaticuser->getNomUrl(1); - } elseif ($obj->source_type == 'thirdparty') - { + } elseif ($obj->source_type == 'thirdparty') { $objectstaticcompany->fetch($obj->source_id); print $objectstaticcompany->getNomUrl(1); - } elseif ($obj->source_type == 'contact') - { + } elseif ($obj->source_type == 'contact') { $objectstaticcontact->fetch($obj->source_id); print $objectstaticcontact->getNomUrl(1); } else { @@ -665,22 +653,21 @@ if ($object->fetch($id) >= 0) print ''; + print ''; print dol_print_date($obj->tms, 'dayhour'); print ' '; print $object::libStatutDest($obj->statut, 2, ''); print ''.$obj->date_envoi.''.$obj->date_envoi.''; print $object::libStatutDest($obj->statut, 2, $obj->error_text); @@ -690,9 +677,8 @@ if ($object->fetch($id) >= 0) // Search Icon print ''; print ''; - if ($obj->statut == 0) // Not sent yet - { - if ($user->rights->mailing->creer && $allowaddtarget) { + if ($obj->statut == 0) { // Not sent yet + if (!empty($user->rights->mailing->creer) && $allowaddtarget) { print ''.img_delete($langs->trans("RemoveRecipient")).''; } } @@ -706,8 +692,7 @@ if ($object->fetch($id) >= 0) $i++; } } else { - if ($object->statut < 2) - { + if ($object->statut < 2) { print '
    '; print $langs->trans("NoTargetYet"); print '
    '.$langs->trans("TargetsStatistic $dir = DOL_DOCUMENT_ROOT."/core/modules/mailings"; $handle = opendir($dir); -if (is_resource($handle)) -{ - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') - { - if (preg_match("/(.*)\.(.*)\.(.*)/i", $file, $reg)) - { +if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { + if (preg_match("/(.*)\.(.*)\.(.*)/i", $file, $reg)) { $modulename = $reg[1]; - if ($modulename == 'example') continue; + if ($modulename == 'example') { + continue; + } // Loading Class $file = $dir."/".$modulename.".modules.php"; @@ -98,10 +96,8 @@ if (is_resource($handle)) $mailmodule = new $classname($db); $qualified = 1; - foreach ($mailmodule->require_module as $key) - { - if (!$conf->$key->enabled || (!$user->admin && $mailmodule->require_admin)) - { + foreach ($mailmodule->require_module as $key) { + if (!$conf->$key->enabled || (!$user->admin && $mailmodule->require_admin)) { $qualified = 0; //print "Les pr�requis d'activation du module mailing ne sont pas respect�s. Il ne sera pas actif"; break; @@ -109,10 +105,8 @@ if (is_resource($handle)) } // Si le module mailing est qualifi� - if ($qualified) - { - foreach ($mailmodule->getSqlArrayForStats() as $sql) - { + if ($qualified) { + foreach ($mailmodule->getSqlArrayForStats() as $sql) { print '
    '.img_object('', $mailmodule->picto).' '.$obj->label.''.$obj->nb.''; $i++; @@ -169,12 +162,10 @@ if ($result) { print ''.$langs->trans("AllEMailings").'
    '; - $object->user_creation = $object->user_creat; - $object->date_creation = $object->date_creat; - $object->user_validation = $object->user_valid; - $object->date_validation = $object->date_valid; dol_print_object_info($object, 0); //print '
    '; - print dol_get_fiche_end(); } diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 8a005d2dc82..94db62d7b19 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -28,20 +28,23 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php'; // Load translation files required by the page $langs->load("mails"); -// Security check -$result = restrictedArea($user, 'mailing'); - $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $optioncss = GETPOST('optioncss', 'alpha'); $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 +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 (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "m.date_creat"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "m.date_creat"; +} $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST("search_ref", "alpha") ? GETPOST("search_ref", "alpha") : GETPOST("sref", "alpha"); @@ -63,6 +66,11 @@ $fieldstosearchall = array( 'm.titre'=>'Ref', ); +// Security check +if (!$user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) { + accessforbidden(); +} +//$result = restrictedArea($user, 'mailing'); @@ -70,21 +78,25 @@ $fieldstosearchall = array( * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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 /*foreach($object->fields as $key => $val) { $search[$key]=''; @@ -95,8 +107,7 @@ if (empty($reshook)) $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')) - { + || 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 } @@ -125,29 +136,43 @@ if ($filteremail) { $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE m.rowid = mc.fk_mailing AND m.entity = ".$conf->entity; $sql .= " AND mc.email = '".$db->escape($filteremail)."'"; - if ($search_ref) $sql .= " AND m.rowid = '".$db->escape($search_ref)."'"; - if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')"; - if (!$sortorder) $sortorder = "ASC"; - if (!$sortfield) $sortfield = "m.rowid"; + if ($search_ref) { + $sql .= " AND m.rowid = '".$db->escape($search_ref)."'"; + } + if ($search_all) { + $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')"; + } + if (!$sortorder) { + $sortorder = "ASC"; + } + if (!$sortfield) { + $sortfield = "m.rowid"; + } } else { $sql = "SELECT m.rowid, m.titre as title, m.nbemail, m.statut, m.date_creat as datec, m.date_envoi as date_envoi"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m"; $sql .= " WHERE m.entity = ".$conf->entity; - if ($search_ref) $sql .= " AND m.rowid = '".$db->escape($search_ref)."'"; - if ($search_all) $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')"; - if (!$sortorder) $sortorder = "ASC"; - if (!$sortfield) $sortfield = "m.rowid"; + if ($search_ref) { + $sql .= " AND m.rowid = '".$db->escape($search_ref)."'"; + } + if ($search_all) { + $sql .= " AND (m.titre like '%".$db->escape($search_all)."%' OR m.sujet like '%".$db->escape($search_all)."%' OR m.body like '%".$db->escape($search_all)."%')"; + } + if (!$sortorder) { + $sortorder = "ASC"; + } + if (!$sortfield) { + $sortfield = "m.rowid"; + } } $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -158,28 +183,36 @@ $sql .= $db->plimit($limit + 1, $offset); dol_syslog("comm/mailing/list.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $title = $langs->trans("ListOfEMailings"); - if ($filteremail) $title .= ' ('.$langs->trans("SentTo", $filteremail).')'; + if ($filteremail) { + $title .= ' ('.$langs->trans("SentTo", $filteremail).')'; + } $newcardbutton = ''; - if ($user->rights->mailing->creer) - { + if ($user->rights->mailing->creer) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewMailing'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/mailing/card.php?action=create'); } $i = 0; $param = "&search_all=".urlencode($search_all); - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($filteremail) $param .= '&filteremail='.urlencode($filteremail); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($filteremail) { + $param .= '&filteremail='.urlencode($filteremail); + } print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -201,7 +234,9 @@ if ($resql) print ''; print '
         '; @@ -214,9 +249,14 @@ if ($resql) print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "m.rowid", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "m.titre", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "m.date_creat", $param, "", 'align="center"', $sortfield, $sortorder); - if (!$filteremail) print_liste_field_titre("NbOfEMails", $_SERVER["PHP_SELF"], "m.nbemail", $param, "", 'align="center"', $sortfield, $sortorder); - if (!$filteremail) print_liste_field_titre("DateLastSend", $_SERVER["PHP_SELF"], "m.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder); - else print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder); + if (!$filteremail) { + print_liste_field_titre("NbOfEMails", $_SERVER["PHP_SELF"], "m.nbemail", $param, "", 'align="center"', $sortfield, $sortorder); + } + if (!$filteremail) { + print_liste_field_titre("DateLastSend", $_SERVER["PHP_SELF"], "m.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder); + } else { + print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder); + } print_liste_field_titre("Status", $_SERVER["PHP_SELF"], ($filteremail ? "mc.statut" : "m.statut"), $param, "", 'class="right"', $sortfield, $sortorder); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'class="right"', $sortfield, $sortorder, 'maxwidthsearch '); print "
    '; $nbemail = $obj->nbemail; /*if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) @@ -269,8 +307,7 @@ if ($resql) // Status print ''; - if ($filteremail) - { + if ($filteremail) { print $email::libStatutDest($obj->sendstatut, 2); } else { print $email->LibStatut($obj->statut, 5); @@ -284,7 +321,9 @@ if ($resql) } if (empty($num)) { $colspan = 6; - if (!$filteremail) $colspan++; + if (!$filteremail) { + $colspan++; + } print '
    '.$langs->trans("NoRecordFound").'
    '; print $langs->trans("NewValue").''; print ''; @@ -125,8 +139,7 @@ if ($_socid > 0) $sql .= " ORDER BY rc.datec DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print ''; $tag = !$tag; print ''; @@ -137,8 +150,7 @@ if ($_socid > 0) $i = 0; $num = $db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 73ea01bc3f8..44e2ad8a4cd 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2016 Marcos García - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2020 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -60,9 +60,12 @@ if (!empty($conf->variants->enabled)) { // Load translation files required by the page $langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); -if (!empty($conf->margin->enabled)) +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} +if (!empty($conf->margin->enabled)) { $langs->load('margins'); +} $error = 0; @@ -86,10 +89,6 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($con // Nombre de ligne pour choix de produit/service predefinis $NBLINES = 4; -// Security check -if (!empty($user->socid)) $socid = $user->socid; -$result = restrictedArea($user, 'propal', $id); - $object = new Propal($db); $extrafields = new ExtraFields($db); @@ -99,10 +98,10 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret > 0) + if ($ret > 0) { $ret = $object->fetch_thirdparty(); - if ($ret <= 0) - { + } + if ($ret <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } @@ -123,12 +122,19 @@ $usercancreateorder = $user->rights->commande->creer; $usercancreateinvoice = $user->rights->facture->creer; $usercancreatecontract = $user->rights->contrat->creer; $usercancreateintervention = $user->rights->ficheinter->creer; -$usercancreatepurchaseorder = $user->rights->fournisseur->commande->creer; +$usercancreatepurchaseorder = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); $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 +// Security check +if (!empty($user->socid)) { + $socid = $user->socid; + $object->id = $user->socid; +} +restrictedArea($user, 'propal', $object->id); + /* * Actions @@ -136,14 +142,13 @@ $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown $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 ($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; } @@ -157,39 +162,44 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) - { - if (!GETPOST('socid', 3)) - { + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { + if (!GETPOST('socid', 3)) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { if ($object->id > 0) { if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) { //Get difference between old and new delivery date and change lines according to difference - $date_delivery = dol_mktime(12, 0, 0, + $date_delivery = dol_mktime( + 12, + 0, + 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int') ); $date_delivery_old = (empty($object->delivery_date) ? $object->date_livraison : $object->delivery_date); - if (!empty($date_delivery_old) && !empty($date_delivery)) - { + if (!empty($date_delivery_old) && !empty($date_delivery)) { //Attempt to get the date without possible hour rounding errors - $old_date_delivery = dol_mktime(12, 0, 0, + $old_date_delivery = dol_mktime( + 12, + 0, + 0, dol_print_date($date_delivery_old, '%m'), dol_print_date($date_delivery_old, '%d'), dol_print_date($date_delivery_old, '%Y') ); //Calculate the difference and apply if necessary $difference = $date_delivery - $old_date_delivery; - if ($difference != 0) - { + if ($difference != 0) { $object->date_livraison = $date_delivery; $object->delivery_date = $date_delivery; - foreach ($object->lines as $line) - { - if (isset($line->date_start)) $line->date_start = $line->date_start + $difference; - if (isset($line->date_end)) $line->date_end = $line->date_end + $difference; + foreach ($object->lines as $line) { + if (isset($line->date_start)) { + $line->date_start = $line->date_start + $difference; + } + if (isset($line->date_end)) { + $line->date_end = $line->date_end + $difference; + } } } } @@ -200,14 +210,15 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit(); } else { - if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); + if (count($object->errors) > 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } $action = ''; } } } - } // Delete proposal - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { + // Delete proposal $result = $object->delete($user); if ($result > 0) { header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'); @@ -216,13 +227,13 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); } - } // Remove line - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { + // Remove line $result = $object->deleteline($lineid); // reorder lines - if ($result) + if ($result) { $object->line_order(true); + } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -233,24 +244,28 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - if ($ret > 0) $object->fetch_thirdparty(); + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); - } // Validation - elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) - { + } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { + // Validation + $idwarehouse = GETPOST('idwarehouse', 'int'); $result = $object->valid($user); - if ($result >= 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if ($result >= 0) { + 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 ($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); @@ -265,11 +280,13 @@ if (empty($reshook)) } } else { $langs->load("errors"); - if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans($object->error), null, 'errors'); + if (count($object->errors) > 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + } } - } elseif ($action == 'setdate' && $usercancreate) - { + } elseif ($action == 'setdate' && $usercancreate) { $datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datep)) { @@ -279,35 +296,32 @@ if (empty($reshook)) if (!$error) { $result = $object->set_date($user, $datep); - if ($result < 0) + if ($result < 0) { dol_print_error($db, $object->error); + } } - } elseif ($action == 'setecheance' && $usercancreate) - { + } elseif ($action == 'setecheance' && $usercancreate) { $result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear'])); $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) + if ($result < 0) { dol_print_error($db, $object->error); - } elseif ($action == 'setdate_livraison' && $usercancreate) - { + } + } elseif ($action == 'setdate_livraison' && $usercancreate) { $result = $object->setDeliveryDate($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear'])); - if ($result < 0) + if ($result < 0) { dol_print_error($db, $object->error); - } // Positionne ref client - elseif ($action == 'setref_client' && $usercancreate) - { + } + } elseif ($action == 'setref_client' && $usercancreate) { + // Positionne ref client $result = $object->set_ref_client($user, GETPOST('ref_client')); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } // Set incoterm - elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) - { + } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) { + // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); - } // Create proposal - elseif ($action == 'add' && $usercancreate) - { + } elseif ($action == 'add' && $usercancreate) { + // Create proposal $object->socid = $socid; $object->fetch_thirdparty(); @@ -333,13 +347,11 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $db->begin(); // If we select proposal to clone during creation (when option PROPAL_CLONE_ON_CREATE_PAGE is on) - if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal')) - { + if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal')) { if ($object->fetch(GETPOST('copie_propal', 'int')) > 0) { $object->ref = GETPOST('ref'); $object->datep = $datep; @@ -350,12 +362,13 @@ if (empty($reshook)) $object->demand_reason_id = GETPOST('demand_reason_id'); $object->fk_delivery_address = GETPOST('fk_address', 'int'); $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); + $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->duree_validite = $duration; $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->remise_percent = GETPOST('remise_percent'); - $object->remise_absolue = GETPOST('remise_absolue'); + $object->remise_percent = price2num(GETPOST('remise_percent'), 2); + $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); $object->socid = GETPOST('socid', 'int'); $object->contact_id = GETPOST('contactid', 'int'); $object->fk_project = GETPOST('projectid', 'int'); @@ -381,6 +394,7 @@ if (empty($reshook)) $object->demand_reason_id = GETPOST('demand_reason_id', 'int'); $object->fk_delivery_address = GETPOST('fk_address', 'int'); $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); + $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->duree_validite = price2num(GETPOST('duree_validite', 'alpha')); $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); @@ -398,8 +412,7 @@ if (empty($reshook)) $object->origin_id = GETPOST('originid'); // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } @@ -411,10 +424,8 @@ if (empty($reshook)) } } - if (!$error) - { - if ($origin && $originid) - { + if (!$error) { + if ($origin && $originid) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { @@ -450,8 +461,7 @@ if (empty($reshook)) } $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -460,19 +470,16 @@ if (empty($reshook)) dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle); @@ -481,21 +488,27 @@ if (empty($reshook)) // Date start $date_start = false; - if ($lines[$i]->date_debut_prevue) + if ($lines[$i]->date_debut_prevue) { $date_start = $lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) + } + if ($lines[$i]->date_debut_reel) { $date_start = $lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) + } + if ($lines[$i]->date_start) { $date_start = $lines[$i]->date_start; + } // Date end $date_end = false; - if ($lines[$i]->date_fin_prevue) + if ($lines[$i]->date_fin_prevue) { $date_end = $lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) + } + if ($lines[$i]->date_fin_reel) { $date_end = $lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) + } + 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) { @@ -509,7 +522,9 @@ if (empty($reshook)) } $tva_tx = $lines[$i]->tva_tx; - if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; + if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) { + $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; + } $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit); @@ -531,8 +546,9 @@ if (empty($reshook)) $parameters = array('objFrom' => $srcobject); $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if ($reshook < 0) + if ($reshook < 0) { $error++; + } } else { setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error++; @@ -541,44 +557,42 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } // Standard creation - else { + } else { + // Standard creation $id = $object->create($user); } - if ($id > 0) - { + if ($id > 0) { // Insert default contacts if defined if (GETPOST('contactid') > 0) { $result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors'); } } - if (!empty($conf->global->PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT)) - { + if (!empty($conf->global->PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT)) { $result = $object->add_contact($user->id, 'SALESREPFOLL', 'internal'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($langs->trans("ErrorFailedToAddUserAsContact"), null, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -587,7 +601,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); @@ -603,101 +619,86 @@ if (empty($reshook)) } } } - } // Classify billed - elseif ($action == 'classifybilled' && $usercanclose) - { + } elseif ($action == 'classifybilled' && $usercanclose) { + // Classify billed $db->begin(); - $result = $object->cloture($user, $object::STATUS_BILLED, ''); - if ($result < 0) - { + $result = $object->classifyBilled($user, 0, ''); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } - } // Close proposal - elseif ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) { + // Close proposal if (!(GETPOST('statut', 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'closeas'; - } else { + } elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) { // prevent browser refresh from closing proposal several times - if ($object->statut == $object::STATUS_VALIDATED) - { + if ($object->statut == $object::STATUS_VALIDATED) { $db->begin(); - $result = $object->cloture($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); - if ($result < 0) - { + $result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } } } - } // Reopen proposal - elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) { + // Reopen proposal // prevent browser refresh from reopening proposal several times - if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) - { + if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) { $db->begin(); $result = $object->reopen($user, 1); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } } - } // add lines from objectlinked - elseif ($action == 'import_lines_from_object' + } elseif ($action == 'import_lines_from_object' && $user->rights->propal->creer && $object->statut == Propal::STATUS_DRAFT - ) - { + ) { + // add lines from objectlinked $fromElement = GETPOST('fromelement'); $fromElementid = GETPOST('fromelementid'); $importLines = GETPOST('line_checkbox'); - if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) - { - if ($fromElement == 'commande') - { + if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) { + if ($fromElement == 'commande') { 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'; } $nextRang = count($object->lines) + 1; $importCount = 0; $error = 0; - foreach ($importLines as $lineId) - { + foreach ($importLines as $lineId) { $lineId = intval($lineId); $originLine = new $lineClassName($db); - if (intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) - { + if (intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) { $originLine->fetch_optionals(); $desc = $originLine->desc; $pu_ht = $originLine->subprice; @@ -741,8 +742,7 @@ if (empty($reshook)) } } - if ($error) - { + if ($error) { setEventMessages($langs->trans('ErrorsOnXLines', $error), null, 'errors'); } } @@ -759,12 +759,10 @@ if (empty($reshook)) // Go back to draft - if ($action == 'modif' && $usercancreate) - { + if ($action == 'modif' && $usercancreate) { $object->setDraft($user); - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; if (!empty($conf->global->MAIN_MULTILANGS)) { @@ -773,13 +771,15 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - if ($ret > 0) $object->fetch_thirdparty(); + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } elseif ($action == "setabsolutediscount" && $usercancreate) { - if ($_POST["remise_id"]) { + if (GETPOST("remise_id", "int")) { if ($object->id > 0) { - $result = $object->insert_discount($_POST["remise_id"]); + $result = $object->insert_discount(GETPOST("remise_id", "int")); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -801,8 +801,7 @@ if (empty($reshook)) $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); $prod_entry_mode = GETPOST('prod_entry_mode'); - if ($prod_entry_mode == 'free') - { + if ($prod_entry_mode == 'free') { $idprod = 0; $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { @@ -811,8 +810,10 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = GETPOST('remise_percent'.$predef); - if (empty($remise_percent)) $remise_percent = 0; + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); + if (empty($remise_percent)) { + $remise_percent = 0; + } // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -830,8 +831,7 @@ if (empty($reshook)) $error++; } - if ($prod_entry_mode == 'free' && empty($idprod) && $price_ht === '' && $price_ht_devise === '') // Unit price can be 0 but not ''. Also price can be negative for proposal. - { + if ($prod_entry_mode == 'free' && empty($idprod) && $price_ht === '' && $price_ht_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal. setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -877,7 +877,9 @@ if (empty($reshook)) // Update if prices fields are defined $tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } // Price unique per product $pu_ht = $prod->price; @@ -886,20 +888,21 @@ if (empty($reshook)) $price_base_type = $prod->price_base_type; // If price per segment - if (!empty($conf->global->PRODUIT_MULTIPRICES) && $object->thirdparty->price_level) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES) && $object->thirdparty->price_level) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $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]; - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility - { - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { + $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; + } + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) { + $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + } } - } // If price per customer - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + // If price per customer require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); @@ -915,26 +918,28 @@ if (empty($reshook)) $price_min = price($prodcustprice->lines[0]->price_min); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); - if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } $tva_npr = $prodcustprice->lines[0]->recuperableonly; - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } } } - } // If price per quantity - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) - { - if ($prod->prices_by_qty[0]) // yes, this product has some prices per quantity - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { + // If price per quantity + if ($prod->prices_by_qty[0]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. $pqp = GETPOST('pbq', 'int'); // Search price into product_price_by_qty from $prod->id - foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) - { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) { + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -943,21 +948,19 @@ if (empty($reshook)) break; } } - } // If price per quantity and customer - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { - if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + // If price per quantity and customer + if ($prod->prices_by_qty[$object->thirdparty->price_level]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. $pqp = GETPOST('pbq', 'int'); // Search price into product_price_by_qty from $prod->id - foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) - { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) { + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -975,9 +978,9 @@ if (empty($reshook)) 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 - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - elseif ($tmpvat != $tmpprodvat) { + } elseif ($tmpvat != $tmpprodvat) { + // 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 ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } else { @@ -991,22 +994,32 @@ if (empty($reshook)) if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) + } + if (empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $desc = (!empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; + $desc = (!empty($prod->multilangs[$outputlangs->defaultlang]["description"])) ? $prod->multilangs[$outputlangs->defaultlang]["description"] : $prod->description; } else { $desc = $prod->description; } - if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; - else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + //If text set in desc is the same as product description (as now it's preloaded) whe add it only one time + if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc=''; + } + + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { + $desc = $product_desc; + } else { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } // Add dimensions into product description /*if (empty($conf->global->MAIN_PRODUCT_DISABLE_AUTOADD_DIM)) @@ -1021,35 +1034,42 @@ if (empty($reshook)) }*/ // Add custom code and origin country into description - if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) - { + if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { $tmptxt = '('; // Define output language if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'alpha')) + if (empty($newlang) && GETPOST('lang_id', 'alpha')) { $newlang = GETPOST('lang_id', 'alpha'); - if (empty($newlang)) + } + if (empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - if (!empty($prod->customcode)) + if (!empty($prod->customcode)) { $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; - if (!empty($prod->customcode) && !empty($prod->country_code)) + } + if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; - if (!empty($prod->country_code)) + } + if (!empty($prod->country_code)) { $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $outputlangs, 0); + } } else { - if (!empty($prod->customcode)) + if (!empty($prod->customcode)) { $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; - if (!empty($prod->customcode) && !empty($prod->country_code)) + } + if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; - if (!empty($prod->country_code)) + } + if (!empty($prod->country_code)) { $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $langs, 0); + } } $tmptxt .= ')'; $desc = dol_concatdesc($desc, $tmptxt); @@ -1082,8 +1102,9 @@ if (empty($reshook)) $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $tva_npr); $info_bits = 0; - if ($tva_npr) + if ($tva_npr) { $info_bits |= 0x01; + } if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!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)); @@ -1149,9 +1170,8 @@ if (empty($reshook)) } } } - } // Update a line within proposal - elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) - { + } elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) { + // Update a line within proposal // Define info_bits $info_bits = 0; if (preg_match('/\*/', GETPOST('tva_tx'))) { @@ -1190,7 +1210,9 @@ if (empty($reshook)) // Define special_code for special lines $special_code = GETPOST('special_code'); - if (!GETPOST('qty')) $special_code = 3; + if (!GETPOST('qty')) { + $special_code = 3; + } // Check minimum price $productid = GETPOST('productid', 'int'); @@ -1201,11 +1223,12 @@ if (empty($reshook)) $type = $product->type; $price_min = $product->price_min; - if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) + if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) { $price_min = $product->multiprices_min [$object->thirdparty->price_level]; + } $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))) { + if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent'), 2) / 100) < price2num($price_min)))) { setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error++; } @@ -1223,12 +1246,9 @@ if (empty($reshook)) if (!$error) { $db->begin(); - if (empty($user->rights->margins->creer)) - { - foreach ($object->lines as &$line) - { - if ($line->id == GETPOST('lineid')) - { + if (empty($user->rights->margins->creer)) { + foreach ($object->lines as &$line) { + if ($line->id == GETPOST('lineid', 'int')) { $fournprice = $line->fk_fournprice; $buyingprice = $line->pa_ht; break; @@ -1238,7 +1258,7 @@ if (empty($reshook)) $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); - $result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, $_POST["units"], $pu_ht_devise); + $result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise); if ($result >= 0) { $db->commit(); @@ -1252,7 +1272,9 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); } $ret = $object->fetch($id); // Reload to get new records - if ($ret > 0) $object->fetch_thirdparty(); + if ($ret > 0) { + $object->fetch_thirdparty(); + } $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } @@ -1294,56 +1316,59 @@ if (empty($reshook)) } elseif ($action == 'classin' && $usercancreate) { // Set project $object->setProject(GETPOST('projectid', 'int')); - } // Delivery time - elseif ($action == 'setavailability' && $usercancreate) { + } elseif ($action == 'setavailability' && $usercancreate) { + // Delivery time $result = $object->set_availability($user, GETPOST('availability_id', 'int')); - } // Origin of the commercial proposal - elseif ($action == 'setdemandreason' && $usercancreate) { + } elseif ($action == 'setdemandreason' && $usercancreate) { + // Origin of the commercial proposal $result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int')); - } // Terms of payment - elseif ($action == 'setconditions' && $usercancreate) { + } elseif ($action == 'setconditions' && $usercancreate) { + // Terms of payment $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } elseif ($action == 'setremisepercent' && $usercancreate) { - $result = $object->set_remise_percent($user, $_POST['remise_percent']); + $result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'))); } elseif ($action == 'setremiseabsolue' && $usercancreate) { - $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); - } // Payment choice - elseif ($action == 'setmode' && $usercancreate) { + $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'))); + } elseif ($action == 'setmode' && $usercancreate) { + // Payment choice $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $usercancreate) { + } elseif ($action == 'setmulticurrencycode' && $usercancreate) { + // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); - } // bank account - elseif ($action == 'setbankaccount' && $usercancreate) { + } elseif ($action == 'setbankaccount' && $usercancreate) { + // bank account $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } // shipping method - elseif ($action == 'setshippingmethod' && $usercancreate) { + } elseif ($action == 'setshippingmethod' && $usercancreate) { + // shipping method $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); + } elseif ($action == 'setwarehouse' && $usercancreate) { + // warehouse + $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); } 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', 'restricthtml')); - if ($ret < 0) $error++; - if (!$error) - { + if ($ret < 0) { + $error++; + } + if (!$error) { $result = $object->updateExtraField(GETPOST('attribute', 'restricthtml'), 'PROPAL_MODIFY', $user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) - { - if ($action == 'addcontact') - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { + if ($action == 'addcontact') { if ($object->id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); @@ -1361,15 +1386,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } // Toggle the status of a contact - elseif ($action == 'swapstatut') { + } elseif ($action == 'swapstatut') { + // Toggle the status of a contact if ($object->fetch($id) > 0) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } - } // Delete a contact - elseif ($action == 'deletecontact') { + } elseif ($action == 'deletecontact') { + // Delete a contact $object->fetch($id); $result = $object->delete_contact($lineid); @@ -1399,27 +1424,28 @@ $formfile = new FormFile($db); $formpropal = new FormPropal($db); $formmargin = new FormMargin($db); $companystatic = new Societe($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} -$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; +$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote'; llxHeader('', $langs->trans('Proposal'), $help_url); $now = dol_now(); // Add new proposal -if ($action == 'create') -{ +if ($action == 'create') { $currency_code = $conf->currency; print load_fiche_titre($langs->trans("NewProp"), '', 'propal'); $soc = new Societe($db); - if ($socid > 0) + if ($socid > 0) { $res = $soc->fetch($socid); + } // Load objectsrc - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; $regs = array(); @@ -1451,8 +1477,7 @@ if ($action == 'create') $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) - { + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); } $objectsrc->fetch_thirdparty(); @@ -1466,20 +1491,39 @@ if ($action == 'create') $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); $remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0)); $remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); + $warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0)); $dateinvoice = (empty($dateinvoice) ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $dateinvoice); // Replicate extrafields $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($objectsrc->multicurrency_code)) { + $currency_code = $objectsrc->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) { + $currency_tx = $objectsrc->multicurrency_tx; + } } } } else { - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + $currency_code = $soc->multicurrency_code; + } + } + + //Warehouse default if null + if ($soc->fk_warehouse > 0) { + $warehouse_id = $soc->fk_warehouse; + } + if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { + $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; + } + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { + $warehouse_id = $user->fk_warehouse; + } } $object = new Propal($db); @@ -1514,19 +1558,23 @@ if ($action == 'create') print $soc->getNomUrl(1); print ''; print ''; + if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD) && !empty($soc->shipping_method_id)) { + $shipping_method_id = $soc->shipping_method_id; + } + //$warehouse_id = $soc->warehouse_id; } else { print ''."\n"; - if ($socid > 0) - { + if ($socid > 0) { // Contacts (ask contact only if thirdparty already defined). print "'; // Third party discounts info line @@ -1561,21 +1609,24 @@ if ($action == 'create') print ''; // Validaty duration - print ''; + print ''; // Terms of payment print ''; // Mode of payment print ''; // Bank Account if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { print ''; } @@ -1587,9 +1638,11 @@ if ($action == 'create') // Delivery delay print ''; @@ -1599,10 +1652,20 @@ if ($action == 'create') $shipping_method_id = $soc->shipping_method_id; } print ''; } + // Warehouse + if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + print ''; + } + // Delivery date (or manufacturing) print ''; print ''; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); print ''; print ''; print ''; print ''; print ''; print '"; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; print ''; print ''; print ''; print ''; print ''; @@ -1683,8 +1743,7 @@ if ($action == 'create') include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Lines from source - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { // TODO for compatibility if ($origin == 'contrat') { // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva @@ -1702,31 +1761,29 @@ if ($action == 'create') print ''; $newclassname = $classname; - if ($newclassname == 'Propal') + if ($newclassname == 'Propal') { $newclassname = 'CommercialProposal'; - elseif ($newclassname == 'Commande') + } elseif ($newclassname == 'Commande') { $newclassname = 'Order'; - elseif ($newclassname == 'Expedition') + } elseif ($newclassname == 'Expedition') { $newclassname = 'Sending'; - elseif ($newclassname == 'Fichinter') + } elseif ($newclassname == 'Fichinter') { $newclassname = 'Intervention'; + } print ''; print ''; print '"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 print '"; } - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 print '"; } print '"; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; print '"; print '"; @@ -1738,12 +1795,13 @@ if ($action == 'create') /* * Combobox for copy function - */ + */ - if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) print ''; + if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) { + print ''; + } - if (!empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) - { + if (!empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) { print '
    '; print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500'); // reload page to retrieve customer informations - if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) - { + if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print ''; @@ -1536,11 +1584,11 @@ if ($action == 'create') } print '
    ".$langs->trans("DefaultContact").''; - $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist); + print img_picto('', 'contact'); + print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, '', '', 0, 'minwidth300'); print '
    '.$langs->trans("ValidityDuration").' '.$langs->trans("days").'
    '.$langs->trans("ValidityDuration").''.img_picto('', 'clock').'  '.$langs->trans("days").'
    '.$langs->trans('PaymentConditionsShort').''; + print img_picto('', 'paiment'); $form->select_conditions_paiements((GETPOSTISSET('cond_reglement_id') ? GETPOST('cond_reglement_id', 'int') : $soc->cond_reglement_id), 'cond_reglement_id', -1, 1); print '
    '.$langs->trans('PaymentMode').''; + print img_picto('', 'bank').' '; $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id), 'mode_reglement_id'); print '
    '.$langs->trans('BankAccount').''; + print img_picto('', 'bank_account'); $form->select_comptes($soc->fk_account, 'fk_account', 0, '', 1); print '
    '.$langs->trans('AvailabilityPeriod'); - if (!empty($conf->commande->enabled)) + if (!empty($conf->commande->enabled)) { print ' ('.$langs->trans('AfterOrder').')'; + } print ''; + print img_picto('', 'clock').' '; $form->selectAvailabilityDelay('', 'availability_id', '', 1); print '
    '.$langs->trans('SendingMethod').''; + print img_picto('', 'object_dollyrevert').' '; print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1); print '
    '.$langs->trans('Warehouse').''; + print img_picto('', 'stock').$formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth175 maxwidth500 widthcentpercentminusxx'); + print '
    '.$langs->trans("DeliveryDate").''; @@ -1618,8 +1681,7 @@ if ($action == 'create') print '
    '.$langs->trans("Project").''; @@ -1630,8 +1692,7 @@ if ($action == 'create') } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '
    '; @@ -1643,14 +1704,14 @@ if ($action == 'create') print '
    '.$langs->trans("DefaultModel").''; + print img_picto('', 'pdf').' '; $liste = ModelePDFPropales::liste_modeles($db); $preselected = ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF); print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); print "
    '.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).''; @@ -1663,17 +1724,16 @@ if ($action == 'create') print ''.$langs->trans('NotePublic').''; $note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc) ? $objectsrc->note_public : null)); - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); // Private note - if (empty($user->socid)) - { + if (empty($user->socid)) { print '
    '.$langs->trans('NotePrivate').''; $note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc)) ? $objectsrc->note_private : null)); - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); // print ' print '
    '.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
    '.$langs->trans('AmountHT').''.price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'
    '.$langs->trans('AmountVAT').''.price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency)."
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency)."
    '.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency)."
    '.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency)."
    '.$langs->trans('MulticurrencyAmountHT').''.price($objectsrc->multicurrency_total_ht).'
    '.$langs->trans('MulticurrencyAmountVAT').''.price($objectsrc->multicurrency_total_tva)."
    '.$langs->trans('MulticurrencyAmountTTC').''.price($objectsrc->multicurrency_total_ttc)."
    '; // For backward compatibility @@ -1837,16 +1895,14 @@ if ($action == 'create') $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if ($action == 'closeas') - { + if ($action == 'closeas') { //Form to close proposal (signed or not) $formquestion = array( array('type' => 'select', 'name' => 'statut', 'label' => ''.$langs->trans("CloseAs").'', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))), array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '') // Field to complete private note (not replace) ); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $formquestion = array_merge($formquestion, array( @@ -1855,17 +1911,17 @@ if ($action == 'create') } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250); - } // Confirm delete - elseif ($action == 'delete') { + } elseif ($action == 'delete') { + // Confirm delete $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); - } // Confirm reopen - elseif ($action == 'reopen') { + } elseif ($action == 'reopen') { + // Confirm reopen $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); - } // Confirmation delete product/service line - elseif ($action == 'ask_deleteline') { + } elseif ($action == 'ask_deleteline') { + // Confirmation delete product/service line $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); - } // Confirm validate proposal - elseif ($action == 'validate') { + } elseif ($action == 'validate') { + // Confirm validate proposal $error = 0; // We verify whether the object is provisionally numbering @@ -1888,15 +1944,19 @@ if ($action == 'create') $text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid, $object); } - if (!$error) + if (!$error) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + } } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -1912,16 +1972,17 @@ if ($action == 'create') $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherProposals").')'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherProposals").')'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($usercancreate) - { - if ($action != 'classify') + 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 .= ''; @@ -1986,10 +2047,11 @@ if ($action == 'create') print '
    '; - if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $langs->trans('Date'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) { print ''; print ''; @@ -2012,10 +2074,11 @@ if ($action == 'create') print ''; - if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $langs->trans('DateEndPropal'); print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) { print ''; print ''; @@ -2026,8 +2089,9 @@ if ($action == 'create') } else { if (!empty($object->fin_validite)) { print dol_print_date($object->fin_validite, 'day'); - if ($object->statut == Propal::STATUS_VALIDATED && $object->fin_validite < ($now - $conf->propal->cloture->warning_delay)) + if ($object->statut == Propal::STATUS_VALIDATED && $object->fin_validite < ($now - $conf->propal->cloture->warning_delay)) { print img_warning($langs->trans("Late")); + } } else { print ' '; } @@ -2040,10 +2104,11 @@ if ($action == 'create') print ''; - if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $langs->trans('PaymentConditionsShort'); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { @@ -2052,11 +2117,29 @@ if ($action == 'create') print '
    '; + print ''; + if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { + print ''; + } + print '
    '; + print $langs->trans('PaymentMode'); + print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'
    '; + print '
    '; + if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); + } else { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); + } + print '
    '; print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker'); - print ''; + print ''; print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->delivery_date, $object, $usercancreate, 'datepicker'); print '
    '; print ''; - if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $langs->trans('AvailabilityPeriod'); - if (!empty($conf->commande->enabled)) + if (!empty($conf->commande->enabled)) { print ' ('.$langs->trans('AfterOrder').')'; + } print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editavailability' && $usercancreate) { $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); } else { @@ -2087,10 +2172,11 @@ if ($action == 'create') print ''; - if ($action != 'editshippingmethod' && $usercancreate) + if ($action != 'editshippingmethod' && $usercancreate) { print ''; + } print '
    '; print $langs->trans('SendingMethod'); print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'
    '; - print '
    '; + print ''; if ($action == 'editshippingmethod' && $usercancreate) { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1); } else { @@ -2100,15 +2186,34 @@ if ($action == 'create') print '
    '; + $editenable = $usercancreate; + print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable); + print ''; + if ($action == 'editwarehouse') { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); + } else { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); + } + print '
    '; print ''; - if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) + if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $langs->trans('Source'); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdemandreason' && $usercancreate) { $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { @@ -2117,36 +2222,19 @@ if ($action == 'create') print '
    '; - print ''; - if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print ''; - print '
    '; - print $langs->trans('PaymentMode'); - print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'
    '; - print '
    '; - if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); - } else { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); - } - print '
    '; print ''; - if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT && $usercancreate) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT && $usercancreate) { print ''; + } print '
    '; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == $object::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) { $form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'multicurrency_code'); } else { @@ -2155,18 +2243,18 @@ if ($action == 'create') print '
    '; print ''; print ''; - if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) { print ''; + } print '
    '; print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print 'id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'
    '; - print '
    '; + print ''; if ($object->statut == $object::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) { if ($action == 'actualizemulticurrencyrate') { list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); @@ -2184,12 +2272,11 @@ if ($action == 'create') } } - if ($soc->outstanding_limit) - { + if ($soc->outstanding_limit) { // Outstanding Bill print '
    '; print $langs->trans('OutstandingBill'); - print ''; + print ''; $arrayoutstandingbills = $soc->getOutstandingBills(); print price($arrayoutstandingbills['opened']).' / '; print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency); @@ -2197,17 +2284,17 @@ if ($action == 'create') print '
    '; print ''; - if ($action != 'editbankaccount' && $usercancreate) + if ($action != 'editbankaccount' && $usercancreate) { print ''; + } print '
    '; print $langs->trans('BankAccount'); print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; - print '
    '; + print ''; if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { @@ -2222,31 +2309,32 @@ if ($action == 'create') $totalVolume = $tmparray['volume']; if ($totalWeight) { print '
    '.$langs->trans("CalculatedWeight").''; + print ''; print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); print '
    '.$langs->trans("CalculatedVolume").''; + print ''; print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); print '
    '; print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($usercancreate) print ''.img_edit().''; - else print ' '; + if ($usercancreate) { + print ''.img_edit().''; + } else { + print ' '; + } print '
    '; print '
    '; - if ($action != 'editincoterm') - { + print ''; + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -2266,8 +2354,7 @@ if ($action == 'create') print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) - { + if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -2295,14 +2382,12 @@ if ($action == 'create') print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1 print ''; print ''; print ''; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { // Localtax2 print ''; print ''; print ''; @@ -2319,8 +2404,7 @@ if ($action == 'create') 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)).'
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency).'
    '.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency).'
    '; // Margin Infos - if (!empty($conf->margin->enabled)) - { + if (!empty($conf->margin->enabled)) { $formmargin->displayMarginInfos($object); } @@ -2349,7 +2433,7 @@ if ($action == 'create') // Show object lines $result = $object->getLinesArray(); - print ' + print ' @@ -2361,19 +2445,16 @@ if ($action == 'create') } print '
    '; - if (!empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline')) - { + if (!empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline')) { print ''; } - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); } // Form to add new line - if ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines') - { + if ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines') { if ($action != 'editline') { // Add products/services form $object->formAddObjectLine(1, $mysoc, $soc); @@ -2386,8 +2467,7 @@ if ($action == 'create') } } - if (!empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline')) - { + if (!empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline')) { print '
    '; } print '
    '; @@ -2407,18 +2487,16 @@ if ($action == 'create') $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($action != 'editline') - { + if (empty($reshook)) { + if ($action != 'editline') { // Validate if (($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) - || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) - { - if ($usercanvalidate) - { + || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) { + if ($usercanvalidate) { print ''.$langs->trans('Validate').''; - } else print ''.$langs->trans('Validate').''; + } else { + print ''.$langs->trans('Validate').''; + } } // 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. @@ -2441,7 +2519,9 @@ if ($action == 'create') if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else print ''.$langs->trans('SendMail').''; + } else { + print ''.$langs->trans('SendMail').''; + } } } @@ -2453,9 +2533,8 @@ if ($action == 'create') } // Create a purchase order - if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL)) - { - if (!empty($conf->fournisseur->enabled) && $object->statut == Propal::STATUS_SIGNED) { + if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_PROPOSAL)) { + if ($object->statut == Propal::STATUS_SIGNED && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { if ($usercancreatepurchaseorder) { print ''.$langs->trans("AddPurchaseOrder").''; } @@ -2480,18 +2559,14 @@ if ($action == 'create') } // Create an invoice and classify billed - if ($object->statut == Propal::STATUS_SIGNED) - { - if (!empty($conf->facture->enabled) && $usercancreateinvoice) - { + if ($object->statut == Propal::STATUS_SIGNED) { + if (!empty($conf->facture->enabled) && $usercancreateinvoice) { print ''.$langs->trans("AddBill").''; } $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); - if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || empty($conf->global->WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED)) - { - if ($usercanclose) - { + if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || empty($conf->global->WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED)) { + if ($usercanclose) { print 'socid.'">'.$langs->trans("ClassifyBilled").''; } else { print ''.$langs->trans("ClassifyBilled").''; @@ -2522,14 +2597,15 @@ if ($action == 'create') } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } - if ($action != 'presend') - { + if ($action != 'presend') { print '
    '; print ''; // ancre /* - * Documents generes + * Generated documents */ $objref = dol_sanitizeFileName($object->ref); $filedir = $conf->propal->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref); @@ -2543,8 +2619,7 @@ if ($action == 'create') $linktoelem = $form->showLinkToObjectBlock($object, null, array('propal')); $compatibleImportElementsList = false; - if ($user->rights->propal->creer && $object->statut == Propal::STATUS_DRAFT) - { + if ($user->rights->propal->creer && $object->statut == Propal::STATUS_DRAFT) { $compatibleImportElementsList = array('commande', 'propal'); // import from linked elements } $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList); @@ -2552,20 +2627,12 @@ if ($action == 'create') // Show online signature link $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok - if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) - { + if ($object->statut != Propal::STATUS_DRAFT && $useonlinesignature) { print '
    '; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; print showOnlineSignatureUrl('proposal', $object->ref).'
    '; } - // Show direct download link - if ($object->statut != Propal::STATUS_DRAFT && !empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) - { - print '
    '."\n"; - print showDirectDownloadLink($object).'
    '; - } - print '
    '; // List of actions on element diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index fd2cb3d371c..3c3447f3697 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -155,6 +155,10 @@ class Proposals extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->propal->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -162,28 +166,37 @@ class Proposals extends DolibarrApi // 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 (!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) + 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."propal 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('propal').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -192,8 +205,7 @@ class Proposals extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -204,13 +216,11 @@ class Proposals extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $proposal_static = new Propal($this->db); if ($proposal_static->fetch($obj->rowid)) { @@ -247,12 +257,12 @@ class Proposals extends DolibarrApi $this->propal->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->propal->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->propal->lines = $lines; + }*/ if ($this->propal->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating order", array_merge(array($this->propal->error), $this->propal->errors)); } @@ -304,7 +314,7 @@ class Proposals extends DolibarrApi public function postLine($id, $request_data = null) { if (!DolibarrApiAccess::$user->rights->propal->creer) { - throw new RestException(401); + throw new RestException(401); } $result = $this->propal->fetch($id); @@ -318,33 +328,36 @@ class Proposals extends DolibarrApi $request_data = (object) $request_data; + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + $updateRes = $this->propal->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - 'HT', - 0, - $request_data->info_bits, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $request_data->fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->date_start, - $request_data->date_end, - $request_data->array_options, - $request_data->fk_unit, - $request_data->origin, - $request_data->origin_id, - $request_data->multicurrency_subprice, - $request_data->fk_remise_except + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->price_base_type ? $request_data->price_base_type : 'HT', + $request_data->subprice, + $request_data->info_bits, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $request_data->fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->date_start, + $request_data->date_end, + $request_data->array_options, + $request_data->fk_unit, + $request_data->origin, + $request_data->origin_id, + $request_data->multicurrency_subprice, + $request_data->fk_remise_except ); if ($updateRes > 0) { @@ -378,15 +391,18 @@ class Proposals extends DolibarrApi if (!DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + } - $request_data = (object) $request_data; + $request_data = (object) $request_data; - $propalline = new PropaleLigne($this->db); - $result = $propalline->fetch($lineid); - if ($result <= 0) { - throw new RestException(404, 'Proposal line not found'); - } + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + + $propalline = new PropaleLigne($this->db); + $result = $propalline->fetch($lineid); + if ($result <= 0) { + throw new RestException(404, 'Proposal line not found'); + } $updateRes = $this->propal->updateline( $lineid, @@ -397,7 +413,7 @@ class Proposals extends DolibarrApi isset($request_data->localtax1_tx) ? $request_data->localtax1_tx : $propalline->localtax1_tx, isset($request_data->localtax2_tx) ? $request_data->localtax2_tx : $propalline->localtax2_tx, isset($request_data->desc) ? $request_data->desc : $propalline->desc, - 'HT', + isset($request_data->price_base_type) ? $request_data->price_base_type : 'HT', isset($request_data->info_bits) ? $request_data->info_bits : $propalline->info_bits, isset($request_data->special_code) ? $request_data->special_code : $propalline->special_code, isset($request_data->fk_parent_line) ? $request_data->fk_parent_line : $propalline->fk_parent_line, @@ -572,25 +588,23 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->propal->$field = $value; } // update end of validity date - if (empty($this->propal->fin_validite) && !empty($this->propal->duree_validite) && !empty($this->propal->date_creation)) - { + if (empty($this->propal->fin_validite) && !empty($this->propal->duree_validite) && !empty($this->propal->date_creation)) { $this->propal->fin_validite = $this->propal->date_creation + ($this->propal->duree_validite * 24 * 3600); } - if (!empty($this->propal->fin_validite)) - { - if ($this->propal->set_echeance(DolibarrApiAccess::$user, $this->propal->fin_validite) < 0) - { + if (!empty($this->propal->fin_validite)) { + if ($this->propal->set_echeance(DolibarrApiAccess::$user, $this->propal->fin_validite) < 0) { throw new RestException(500, $this->propal->error); } } - if ($this->propal->update(DolibarrApiAccess::$user) > 0) - { + if ($this->propal->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->propal->error); @@ -758,7 +772,7 @@ class Proposals extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->propal->cloture(DolibarrApiAccess::$user, $status, $note_private, $notrigger); + $result = $this->propal->closeProposal(DolibarrApiAccess::$user, $status, $note_private, $notrigger); if ($result == 0) { throw new RestException(304, 'Error nothing done. May be object is already closed'); } @@ -834,8 +848,9 @@ class Proposals extends DolibarrApi { $propal = array(); foreach (Proposals::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $propal[$field] = $data[$field]; } return $propal; diff --git a/htdocs/comm/propal/class/index.html b/htdocs/comm/propal/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 3766c7ba1a1..441020c9b5d 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -13,7 +13,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -118,6 +118,13 @@ class Propal extends CommonObject */ public $statut; + /** + * Status of the quote + * @var int + * @see Propal::STATUS_DRAFT, Propal::STATUS_VALIDATED, Propal::STATUS_SIGNED, Propal::STATUS_NOTSIGNED, Propal::STATUS_BILLED + */ + public $status; + /** * @deprecated * @see $date_creation @@ -140,6 +147,16 @@ class Propal extends CommonObject */ public $date_validation; + /** + * @var integer|string $date_signature; + */ + public $date_signature; + + /** + * @var User $user_signature + */ + public $user_signature; + /** * @var integer|string date of the quote; */ @@ -208,6 +225,8 @@ class Propal extends CommonObject public $demand_reason_id; public $demand_reason_code; + public $warehouse_id; + public $extraparams = array(); /** @@ -231,8 +250,6 @@ class Propal extends CommonObject public $multicurrency_total_tva; public $multicurrency_total_ttc; - public $oldcopy; - /** * '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') @@ -285,10 +302,10 @@ class Propal extends CommonObject 'remise_absolue' =>array('type'=>'double', 'label'=>'CustomerRelativeDiscount', 'enabled'=>1, 'visible'=>-1, 'position'=>115), //'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120), 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1), - 'tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1), + 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', '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' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1), + 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1), 'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>150), 'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155), 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>160), @@ -298,6 +315,7 @@ class Propal extends CommonObject 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'PDFTemplate', 'enabled'=>1, 'visible'=>0, 'position'=>180), 'date_livraison' =>array('type'=>'date', 'label'=>'DateDeliveryPlanned', 'enabled'=>1, 'visible'=>-1, 'position'=>185), 'fk_shipping_method' =>array('type'=>'integer', 'label'=>'ShippingMethod', 'enabled'=>1, 'visible'=>-1, 'position'=>190), + 'fk_warehouse' =>array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Fk warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>191), 'fk_availability' =>array('type'=>'integer', 'label'=>'Availability', 'enabled'=>1, 'visible'=>-1, 'position'=>195), 'fk_delivery_address' =>array('type'=>'integer', 'label'=>'DeliveryAddress', 'enabled'=>1, 'visible'=>0, 'position'=>200), // deprecated 'fk_input_reason' =>array('type'=>'integer', 'label'=>'InputReason', 'enabled'=>1, 'visible'=>-1, 'position'=>205), @@ -375,11 +393,12 @@ class Propal extends CommonObject // phpcs:enable global $conf, $mysoc; - if (!$qty) $qty = 1; + if (!$qty) { + $qty = 1; + } dol_syslog(get_class($this)."::add_product $idproduct, $qty, $remise_percent"); - if ($idproduct > 0) - { + if ($idproduct > 0) { $prod = new Product($this->db); $prod->fetch($idproduct); @@ -387,15 +406,16 @@ class Propal extends CommonObject $tva_tx = get_default_tva($mysoc, $this->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $this->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $vat_src_code = ''; // May be defined into tva_tx $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $this->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $this->thirdparty, $tva_npr); // multiprices - if ($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) - { + if ($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) { $price = $prod->multiprices[$this->thirdparty->price_level]; } else { $price = $prod->price; @@ -411,7 +431,9 @@ class Propal extends CommonObject $line->vat_src_code = $vat_src_code; $line->tva_tx = $tva_tx; $line->fk_unit = $prod->fk_unit; - if ($tva_npr) $line->info_bits = 1; + if ($tva_npr) { + $line->info_bits = 1; + } $this->lines[] = $line; } @@ -437,10 +459,8 @@ class Propal extends CommonObject $remise = new DiscountAbsolute($this->db); $result = $remise->fetch($idremise); - if ($result > 0) - { - if ($remise->fk_facture) // Protection against multiple submission - { + if ($result > 0) { + if ($remise->fk_facture) { // Protection against multiple submission $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); $this->db->rollback(); return -5; @@ -471,11 +491,9 @@ class Propal extends CommonObject $line->total_ttc = -$remise->amount_ttc; $result = $line->insert(); - if ($result > 0) - { + if ($result > 0) { $result = $this->update_price(1); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return 1; } else { @@ -536,16 +554,25 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::addline propalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type, fk_remise_except=".$fk_remise_except); - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters - if (empty($remise_percent)) $remise_percent = 0; - if (empty($qty)) $qty = 0; - if (empty($info_bits)) $info_bits = 0; - if (empty($rang)) $rang = 0; - if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; + if (empty($remise_percent)) { + $remise_percent = 0; + } + if (empty($qty)) { + $qty = 0; + } + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($rang)) { + $rang = 0; + } + if (empty($fk_parent_line) || $fk_parent_line < 0) { + $fk_parent_line = 0; + } $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -558,15 +585,16 @@ class Propal extends CommonObject $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); $pa_ht = price2num($pa_ht); - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { $pu = $pu_ht; } else { $pu = $pu_ttc; } // Check parameters - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -577,8 +605,7 @@ class Propal extends CommonObject $this->db->begin(); $product_type = $type; - if (!empty($fk_product)) - { + if (!empty($fk_product)) { $product = new Product($this->db); $result = $product->fetch($fk_product); $product_type = $product->type; @@ -602,8 +629,7 @@ class Propal extends CommonObject $reg = array(); $vat_src_code = ''; $reg = array(); - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -627,8 +653,7 @@ class Propal extends CommonObject // Rang to use $ranktouse = $rang; - if ($ranktouse == -1) - { + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } @@ -637,8 +662,7 @@ class Propal extends CommonObject // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; $remise = 0; - if ($remise_percent > 0) - { + if ($remise_percent > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } @@ -693,7 +717,9 @@ class Propal extends CommonObject $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; // Mise en option de la ligne - if (empty($qty) && empty($special_code)) $this->line->special_code = 3; + if (empty($qty) && empty($special_code)) { + $this->line->special_code = 3; + } // TODO deprecated $this->line->price = $price; @@ -704,10 +730,11 @@ class Propal extends CommonObject } $result = $this->line->insert(); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } // Mise a jour informations denormalisees au niveau de la propale meme $result = $this->update_price(1, 'auto', 0, $mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. @@ -780,9 +807,15 @@ class Propal extends CommonObject $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); $pa_ht = price2num($pa_ht); - if (empty($qty) && empty($special_code)) $special_code = 3; // Set option tag - if (!empty($qty) && $special_code == 3) $special_code = 0; // Remove option tag - if (empty($type)) $type = 0; + if (empty($qty) && empty($special_code)) { + $special_code = 3; // Set option tag + } + if (!empty($qty) && $special_code == 3) { + $special_code = 0; // Remove option tag + } + if (empty($type)) { + $type = 0; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -790,8 +823,7 @@ class Propal extends CommonObject return -1; } - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); // Calcul du total TTC et de la TVA pour la ligne a partir de @@ -804,8 +836,7 @@ class Propal extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -829,8 +860,7 @@ class Propal extends CommonObject // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; $remise = 0; - if ($remise_percent > 0) - { + if ($remise_percent > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } @@ -846,8 +876,7 @@ class Propal extends CommonObject $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) - { + if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) { $rangmax = $this->line_max($fk_parent_line); $this->line->rang = $rangmax + 1; } @@ -901,10 +930,11 @@ class Propal extends CommonObject $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; $result = $this->line->update($notrigger); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } $this->update_price(1); @@ -936,8 +966,7 @@ class Propal extends CommonObject { global $user; - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); $line = new PropaleLigne($this->db); @@ -945,8 +974,7 @@ class Propal extends CommonObject // For triggers $line->fetch($lineid); - if ($line->delete($user) > 0) - { + if ($line->delete($user) > 0) { $this->update_price(1); $this->db->commit(); @@ -978,16 +1006,24 @@ class Propal extends CommonObject $now = dol_now(); // Clean parameters - if (empty($this->date)) $this->date = $this->datep; + if (empty($this->date)) { + $this->date = $this->datep; + } $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600); - if (empty($this->availability_id)) $this->availability_id = 0; - if (empty($this->demand_reason_id)) $this->demand_reason_id = 0; + if (empty($this->availability_id)) { + $this->availability_id = 0; + } + if (empty($this->demand_reason_id)) { + $this->demand_reason_id = 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, $this->date); - else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + 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); + } else { + $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; $this->fk_multicurrency = 0; $this->multicurrency_tx = 1; @@ -1000,19 +1036,16 @@ class Propal extends CommonObject // Check parameters $result = $this->fetch_thirdparty(); - if ($result < 0) - { + if ($result < 0) { $this->error = "Failed to fetch company"; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -3; } // Check parameters - if (!empty($this->ref)) // We check that ref is not already used - { + if (!empty($this->ref)) { // We check that ref is not already used $result = self::isExistingObject($this->element, 0, $this->ref); // Check ref is not yet used - if ($result > 0) - { + if ($result > 0) { $this->error = 'ErrorRefAlreadyExists'; dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); $this->db->rollback(); @@ -1020,8 +1053,7 @@ class Propal extends CommonObject } } - if (empty($this->date)) - { + if (empty($this->date)) { $this->error = "Date of proposal is required"; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -4; @@ -1037,8 +1069,8 @@ class Propal extends CommonObject $sql .= ", remise"; $sql .= ", remise_percent"; $sql .= ", remise_absolue"; - $sql .= ", tva"; - $sql .= ", total"; + $sql .= ", total_tva"; + $sql .= ", total_ttc"; $sql .= ", datep"; $sql .= ", datec"; $sql .= ", ref"; @@ -1053,6 +1085,7 @@ class Propal extends CommonObject $sql .= ", ref_client"; $sql .= ", date_livraison"; $sql .= ", fk_shipping_method"; + $sql .= ", fk_warehouse"; $sql .= ", fk_availability"; $sql .= ", fk_input_reason"; $sql .= ", fk_projet"; @@ -1085,6 +1118,7 @@ class Propal extends CommonObject $sql .= ", '".$this->db->escape($this->ref_client)."'"; $sql .= ", ".(empty($delivery_date) ? "NULL" : "'".$this->db->idate($delivery_date)."'"); $sql .= ", ".($this->shipping_method_id > 0 ? $this->shipping_method_id : 'NULL'); + $sql .= ", ".($this->warehouse_id > 0 ? $this->warehouse_id : 'NULL'); $sql .= ", ".$this->availability_id; $sql .= ", ".$this->demand_reason_id; $sql .= ", ".($this->fk_project ? $this->fk_project : "null"); @@ -1098,36 +1132,30 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."propal"); - if ($this->id) - { + if ($this->id) { $this->ref = '(PROV'.$this->id.')'; $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) $error++; + 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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1136,8 +1164,7 @@ class Propal extends CommonObject { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1146,18 +1173,16 @@ class Propal extends CommonObject } /* - * Insertion du detail des produits dans la base - * Insert products detail in database - */ - if (!$error) - { + * Insertion du detail des produits dans la base + * Insert products detail in database + */ + if (!$error) { $fk_parent_line = 0; $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { - if (!is_object($this->lines[$i])) // If this->lines is not array of objects, coming from REST API - { // Convert into object this->lines[$i]. + for ($i = 0; $i < $num; $i++) { + if (!is_object($this->lines[$i])) { // If this->lines is not array of objects, coming from REST API + // Convert into object this->lines[$i]. $line = (object) $this->lines[$i]; } else { $line = $this->lines[$i]; @@ -1168,7 +1193,9 @@ class Propal extends CommonObject } // Complete vat rate with code $vatrate = $line->tva_tx; - if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; + if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) { + $vatrate .= ' ('.$line->vat_src_code.')'; + } if (!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { $originid = $line->origin_id; @@ -1205,8 +1232,7 @@ class Propal extends CommonObject $originid ); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $this->db->error; dol_print_error($this->db); @@ -1223,36 +1249,33 @@ class Propal extends CommonObject /*if (! $error && $this->fk_delivery_address) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql.= " SET fk_delivery_address = ".$this->fk_delivery_address; + $sql.= " SET fk_delivery_address = ".((int) $this->fk_delivery_address); $sql.= " WHERE ref = '".$this->db->escape($this->ref)."'"; $sql.= " AND entity = ".setEntity($this); $result=$this->db->query($sql); }*/ - if (!$error) - { + if (!$error) { // Mise a jour infos denormalisees $resql = $this->update_price(1); - if ($resql) - { + if ($resql) { $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROPAL_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } else { @@ -1265,8 +1288,7 @@ class Propal extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); dol_syslog(get_class($this)."::create done id=".$this->id); return $this->id; @@ -1310,25 +1332,23 @@ class Propal extends CommonObject $objsoc = new Societe($this->db); // Change socid if needed - if (!empty($socid) && $socid != $object->socid) - { - if ($objsoc->fetch($socid) > 0) - { + if (!empty($socid) && $socid != $object->socid) { + if ($objsoc->fetch($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_delivery_address = ''; /*if (!empty($conf->projet->enabled)) - { - $project = new Project($db); - if ($this->fk_project > 0 && $project->fetch($this->fk_project)) { - if ($project->socid <= 0) $clonedObj->fk_project = $this->fk_project; - else $clonedObj->fk_project = ''; - } else { - $clonedObj->fk_project = ''; - } - }*/ + { + $project = new Project($db); + if ($this->fk_project > 0 && $project->fetch($this->fk_project)) { + if ($project->socid <= 0) $clonedObj->fk_project = $this->fk_project; + else $clonedObj->fk_project = ''; + } else { + $clonedObj->fk_project = ''; + } + }*/ $object->fk_project = ''; // A cloned proposal is set by default to no project. } @@ -1351,58 +1371,54 @@ class Propal extends CommonObject $object->date = $now; $object->datep = $now; // deprecated $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); - if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = ''; - if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1) - { + if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) { + $object->ref_client = ''; + } + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1) { $object->note_private = ''; $object->note_public = ''; } // Create clone $object->context['createfromclone'] = 'createfromclone'; $result = $object->create($user); - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $this->errors = array_merge($this->errors, $object->errors); $error++; } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($object->copy_linked_contact($this, 'internal') < 0) - { + if ($object->copy_linked_contact($this, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if ($this->socid == $object->socid) - { - if ($object->copy_linked_contact($this, 'external') < 0) + if ($this->socid == $object->socid) { + if ($object->copy_linked_contact($this, 'external') < 0) { $error++; + } } } - if (!$error) - { + if (!$error) { // Hook of thirdparty module - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('objFrom'=>$this, 'clonedObj'=>$object); $action = ''; $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } } } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -1422,7 +1438,7 @@ class Propal extends CommonObject public function fetch($rowid, $ref = '', $ref_ext = '') { $sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; - $sql .= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht"; + $sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht"; $sql .= ", p.datec"; $sql .= ", p.date_valid as datev"; $sql .= ", p.datep as dp"; @@ -1439,6 +1455,7 @@ class Propal extends CommonObject $sql .= ", p.fk_mode_reglement"; $sql .= ', p.fk_account'; $sql .= ", p.fk_shipping_method"; + $sql .= ", p.fk_warehouse"; $sql .= ", p.fk_incoterms, p.location_incoterms"; $sql .= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc"; $sql .= ", p.tms as date_modification"; @@ -1459,14 +1476,14 @@ class Propal extends CommonObject if ($ref) { $sql .= " WHERE p.entity IN (".getEntity('propal').")"; // Dont't use entity if you use rowid $sql .= " AND p.ref='".$this->db->escape($ref)."'"; - } else $sql .= " WHERE p.rowid=".$rowid; + } else { + $sql .= " WHERE p.rowid = ".((int) $rowid); + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -1477,12 +1494,12 @@ class Propal extends CommonObject $this->remise = $obj->remise; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; - $this->total = $obj->total; // TODO deprecated + $this->total = $obj->total_ttc; // TODO deprecated + $this->total_ttc = $obj->total_ttc; $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->tva; + $this->total_tva = $obj->total_tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; - $this->total_ttc = $obj->total; $this->socid = $obj->fk_soc; $this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty @@ -1512,6 +1529,7 @@ class Propal extends CommonObject $this->date_livraison = $this->db->jdate($obj->delivery_date); // deprecated $this->delivery_date = $this->db->jdate($obj->delivery_date); $this->shipping_method_id = ($obj->fk_shipping_method > 0) ? $obj->fk_shipping_method : null; + $this->warehouse_id = ($obj->fk_warehouse > 0) ? $obj->fk_warehouse : null; $this->availability_id = $obj->fk_availability; $this->availability_code = $obj->availability_code; $this->availability = $obj->availability; @@ -1532,8 +1550,8 @@ class Propal extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); $this->user_author_id = $obj->fk_user_author; - $this->user_valid_id = $obj->fk_user_valid; - $this->user_close_id = $obj->fk_user_cloture; + $this->user_valid_id = $obj->fk_user_valid; + $this->user_close_id = $obj->fk_user_cloture; //Incoterms $this->fk_incoterms = $obj->fk_incoterms; @@ -1545,11 +1563,10 @@ class Propal extends CommonObject $this->multicurrency_code = $obj->multicurrency_code; $this->multicurrency_tx = $obj->multicurrency_tx; $this->multicurrency_total_ht = $obj->multicurrency_total_ht; - $this->multicurrency_total_tva = $obj->multicurrency_total_tva; - $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - if ($obj->fk_statut == self::STATUS_DRAFT) - { + if ($obj->fk_statut == self::STATUS_DRAFT) { $this->brouillon = 1; } @@ -1563,8 +1580,7 @@ class Propal extends CommonObject // Lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } @@ -1593,13 +1609,27 @@ class Propal extends CommonObject $error = 0; // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); - 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->model_pdf)) $this->model_pdf = trim($this->model_pdf); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); - if (!empty($this->duree_validite) && is_numeric($this->duree_validite)) $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600); + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->ref_client)) { + $this->ref_client = trim($this->ref_client); + } + 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->model_pdf)) { + $this->model_pdf = trim($this->model_pdf); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } + if (!empty($this->duree_validite) && is_numeric($this->duree_validite)) { + $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600); + } // Check parameters // Put here code to add control on parameters values @@ -1611,13 +1641,15 @@ class Propal extends CommonObject $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").","; $sql .= " datep=".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').","; - if (!empty($this->fin_validite)) $sql .= " fin_validite=".(strval($this->fin_validite) != '' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; + if (!empty($this->fin_validite)) { + $sql .= " fin_validite=".(strval($this->fin_validite) != '' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; + } $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; - $sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; + $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; $sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").","; $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; - $sql .= " total=".(isset($this->total_ttc) ? $this->total_ttc : "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->user_author_id) ? $this->user_author_id : "null").","; $sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").","; @@ -1627,40 +1659,38 @@ class Propal extends CommonObject $sql .= " fk_input_reason=".(isset($this->demand_reason_id) ? $this->demand_reason_id : "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->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "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 .= " WHERE rowid=".((int) $this->id); $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(); + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1698,20 +1728,20 @@ class Propal extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.'propaldet as d'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (d.fk_product = p.rowid)'; $sql .= ' WHERE d.fk_propal = '.$this->id; - if ($only_product) $sql .= ' AND p.fk_product_type = 0'; + if ($only_product) { + $sql .= ' AND p.fk_product_type = 0'; + } $sql .= ' ORDER by d.rang'; dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $line = new PropaleLigne($this->db); @@ -1819,15 +1849,13 @@ class Propal extends CommonObject $error = 0; // Protection - if ($this->statut == self::STATUS_VALIDATED) - { + if ($this->statut == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING); return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->propal->propal_advance->validate)))) { $this->error = 'ErrorPermissionDenied'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; @@ -1842,8 +1870,7 @@ class Propal extends CommonObject $soc->fetch($this->socid); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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($soc); } else { $num = $this->ref; @@ -1857,49 +1884,47 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::valid", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $error++; } // Trigger calls - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROPAL_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'propale/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'propale/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->propal->multidir_output[$this->entity].'/'.$oldref; $dirdest = $conf->propal->multidir_output[$this->entity].'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($dirdest, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -1937,15 +1962,13 @@ class Propal extends CommonObject public function set_date($user, $date, $notrigger = 0) { // phpcs:enable - if (empty($date)) - { + if (empty($date)) { $this->error = 'ErrorBadParameter'; dol_syslog(get_class($this)."::set_date ".$this->error, LOG_ERR); return -1; } - if (!empty($user->rights->propal->creer)) - { + if (!empty($user->rights->propal->creer)) { $error = 0; $this->db->begin(); @@ -1955,34 +1978,31 @@ class Propal extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->date = $date; $this->datep = $date; // deprecated } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2004,8 +2024,7 @@ class Propal extends CommonObject public function set_echeance($user, $date_fin_validite, $notrigger = 0) { // phpcs:enable - if (!empty($user->rights->propal->creer)) - { + if (!empty($user->rights->propal->creer)) { $error = 0; $this->db->begin(); @@ -2015,34 +2034,31 @@ class Propal extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->fin_validite = $date_fin_validite; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2078,8 +2094,7 @@ class Propal extends CommonObject */ public function setDeliveryDate($user, $delivery_date, $notrigger = 0) { - if (!empty($user->rights->propal->creer)) - { + if (!empty($user->rights->propal->creer)) { $error = 0; $this->db->begin(); @@ -2090,34 +2105,31 @@ class Propal extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->date_livraison = $delivery_date; $this->delivery_date = $delivery_date; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2139,8 +2151,7 @@ class Propal extends CommonObject public function set_availability($user, $id, $notrigger = 0) { // phpcs:enable - if (!empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) - { + if (!empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); @@ -2151,34 +2162,31 @@ class Propal extends CommonObject dol_syslog(__METHOD__.' availability('.$id.')', LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->fk_availability = $id; $this->availability_id = $id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2206,48 +2214,44 @@ class Propal extends CommonObject public function set_demand_reason($user, $id, $notrigger = 0) { // phpcs:enable - if (!empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) - { + if (!empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."propal "; - $sql .= " SET fk_input_reason = ".$id; + $sql .= " SET fk_input_reason = ".((int) $id); $sql .= " WHERE rowid = ".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->fk_input_reason = $id; $this->demand_reason_id = $id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2275,8 +2279,7 @@ class Propal extends CommonObject public function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable - if (!empty($user->rights->propal->creer)) - { + if (!empty($user->rights->propal->creer)) { $error = 0; $this->db->begin(); @@ -2286,33 +2289,30 @@ class Propal extends CommonObject dol_syslog(__METHOD__.' $this->id='.$this->id.', ref_client='.$ref_client, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->ref_client = $ref_client; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2338,47 +2338,43 @@ class Propal extends CommonObject // phpcs:enable $remise = trim($remise) ?trim($remise) : 0; - if (!empty($user->rights->propal->creer)) - { - $remise = price2num($remise); + if (!empty($user->rights->propal->creer)) { + $remise = price2num($remise, 2); $error = 0; $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET remise_percent = ".$remise; + $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET remise_percent = ".((float) $remise); $sql .= " WHERE rowid = ".$this->id." AND fk_statut = ".self::STATUS_DRAFT; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->remise_percent = $remise; $this->update_price(1); } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2401,50 +2397,47 @@ class Propal extends CommonObject public function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable - $remise = trim($remise) ?trim($remise) : 0; - - if (!empty($user->rights->propal->creer)) - { - $remise = price2num($remise); + if (empty($remise)) { + $remise = 0; + } + $remise = price2num($remise); + if (!empty($user->rights->propal->creer)) { $error = 0; $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."propal "; - $sql .= " SET remise_absolue = ".$remise; + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; + $sql .= " SET remise_absolue = ".((float) $remise); $sql .= " WHERE rowid = ".$this->id." AND fk_statut = ".self::STATUS_DRAFT; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->remise_absolue = $remise; $this->update_price(1); } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2460,20 +2453,20 @@ class Propal extends CommonObject * Reopen the commercial proposal * * @param User $user Object user that close - * @param int $statut Statut + * @param int $status Status * @param string $note Comment * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function reopen($user, $statut, $note = '', $notrigger = 0) + public function reopen($user, $status, $note = '', $notrigger = 0) { - - $this->statut = $statut; $error = 0; $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".$this->statut.","; - if (!empty($note)) $sql .= " note_private = '".$this->db->escape($note)."',"; + $sql .= " SET fk_statut = ".$status.","; + if (!empty($note)) { + $sql .= " note_private = '".$this->db->escape($note)."',"; + } $sql .= " date_cloture=NULL, fk_user_cloture=NULL"; $sql .= " WHERE rowid = ".$this->id; @@ -2482,26 +2475,24 @@ class Propal extends CommonObject dol_syslog(get_class($this)."::reopen", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { - $error++; $this->errors[] = "Error ".$this->db->lasterror(); + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROPAL_REOPEN', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - if (!empty($this->errors)) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + if (!empty($this->errors)) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2509,24 +2500,26 @@ class Propal extends CommonObject $this->db->rollback(); return -1 * $error; } else { + $this->statut = $status; + $this->status = $status; + $this->db->commit(); return 1; } } - /** - * Close the commercial proposal + * Close/set the commercial proposal to status signed or refused (fill also date signature) * * @param User $user Object user that close - * @param int $status Status + * @param int $status Status (self::STATUS_BILLED or self::STATUS_REFUSED) * @param string $note Complete private note with this note * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ - public function cloture($user, $status, $note = "", $notrigger = 0) + public function closeProposal($user, $status, $note = '', $notrigger = 0) { - global $langs, $conf; + global $langs,$conf; $error = 0; $now = dol_now(); @@ -2535,75 +2528,69 @@ class Propal extends CommonObject $newprivatenote = dol_concatdesc($this->note_private, $note); - $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".$status.", note_private = '".$this->db->escape($newprivatenote)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; + $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { + // Status self::STATUS_REFUSED by default $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf; - $triggerName = 'PROPAL_CLOSE_REFUSED'; + $trigger_name = 'PROPAL_CLOSE_REFUSED'; - if ($status == self::STATUS_SIGNED) - { - $triggerName = 'PROPAL_CLOSE_SIGNED'; - $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf; + if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED + $trigger_name = 'PROPAL_CLOSE_SIGNED'; + $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL:$this->model_pdf; // The connected company is classified as a client - $soc = new Societe($this->db); + $soc=new Societe($this->db); $soc->id = $this->socid; $result = $soc->set_as_client(); - if ($result < 0) - { - $this->error = $this->db->lasterror(); + if ($result < 0) { + $this->error=$this->db->lasterror(); $this->db->rollback(); return -2; } } - if ($status == self::STATUS_BILLED) // ->cloture() can also be called when we set it to billed, after setting it to signed - { - $triggerName = 'PROPAL_CLASSIFY_BILLED'; - } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); } + //$ret=$object->fetch($id); // Reload to get new records $this->generateDocument($modelpdf, $outputlangs); } - if (!$error) - { - $this->oldcopy = clone $this; + if (!$error) { + $this->oldcopy= clone $this; $this->statut = $status; - $this->date_cloture = $now; + $this->status = $status; + $this->date_signature = $now; $this->note_private = $newprivatenote; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger - $result = $this->call_trigger($triggerName, $user); - if ($result < 0) { $error++; } + $result=$this->call_trigger($trigger_name, $user); + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error ) { $this->db->commit(); return 1; } else { $this->statut = $this->oldcopy->statut; - $this->date_cloture = $this->oldcopy->date_cloture; + $this->status = $this->oldcopy->statut; + $this->date_signature = $this->oldcopy->date_signature; $this->note_private = $this->oldcopy->note_private; $this->db->rollback(); @@ -2617,50 +2604,77 @@ class Propal extends CommonObject } /** - * Class invoiced the Propal + * Classify the proposal to status Billed * * @param User $user Object user * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 si ko, >0 si ok + * @param string $note Complete private note with this note + * @return int <0 if KO, 0 = nothing done, >0 if OK */ - public function classifyBilled(User $user, $notrigger = 0) + public function classifyBilled(User $user, $notrigger = 0, $note = '') { + global $conf, $langs; + $error = 0; + $now = dol_now(); + $num = 0; + + $triggerName = 'PROPAL_CLASSIFY_BILLED'; + $this->db->begin(); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal SET fk_statut = '.self::STATUS_BILLED; - $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; + $newprivatenote = dol_concatdesc($this->note_private, $note); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal SET fk_statut = '.self::STATUS_BILLED.", "; + $sql .= " note_private = '".$this->db->escape($newprivatenote)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; + $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut = '.self::STATUS_SIGNED; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; + } else { + $num = $this->db->affected_rows($resql); } - if (!$error) - { + if (!$error) { + $modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf; + + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + // Define output language + $outputlangs = $langs; + if (!empty($conf->global->MAIN_MULTILANGS)) { + $outputlangs = new Translate("", $conf); + $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); + $outputlangs->setDefaultLang($newlang); + } + + //$ret=$object->fetch($id); // Reload to get new records + $this->generateDocument($modelpdf, $outputlangs); + } + $this->oldcopy = clone $this; $this->statut = self::STATUS_BILLED; + $this->date_cloture = $now; + $this->note_private = $newprivatenote; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger - $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + $result = $this->call_trigger($triggerName, $user); + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); - return 1; + return $num; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2683,8 +2697,7 @@ class Propal extends CommonObject $error = 0; // Protection - if ($this->statut <= self::STATUS_DRAFT) - { + if ($this->statut <= self::STATUS_DRAFT) { return 0; } @@ -2697,35 +2710,32 @@ class Propal extends CommonObject $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->statut = self::STATUS_DRAFT; $this->brouillon = 1; $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2759,38 +2769,42 @@ class Propal extends CommonObject $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql .= " p.datep as dp, p.fin_validite as datelimite"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user"; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.entity IN (".getEntity('propal').")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; - if (!$user->rights->societe->client->voir && !$socid) //restriction - { + if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if ($socid) $sql .= " AND s.rowid = ".$socid; - if ($draft) $sql .= " AND p.fk_statut = ".self::STATUS_DRAFT; - if ($notcurrentuser > 0) $sql .= " AND p.fk_user_author <> ".$user->id; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } + if ($draft) { + $sql .= " AND p.fk_statut = ".self::STATUS_DRAFT; + } + if ($notcurrentuser > 0) { + $sql .= " AND p.fk_user_author <> ".$user->id; + } $sql .= $this->db->order($sortfield, $sortorder); $sql .= $this->db->plimit($limit, $offset); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($shortlist == 1) - { + if ($shortlist == 1) { $ga[$obj->propalid] = $obj->ref; - } elseif ($shortlist == 2) - { + } elseif ($shortlist == 2) { $ga[$obj->propalid] = $obj->ref.' ('.$obj->name.')'; } else { $ga[$i]['id'] = $obj->propalid; @@ -2832,25 +2846,19 @@ class Propal extends CommonObject $linkedInvoices = array(); $this->fetchObjectLinked($id, $this->element); - foreach ($this->linkedObjectsIds as $objecttype => $objectid) - { + foreach ($this->linkedObjectsIds as $objecttype => $objectid) { // Nouveau système du comon object renvoi des rowid et non un id linéaire de 1 à n // On parcourt donc une liste d'objets en tant qu'objet unique - foreach ($objectid as $key => $object) - { + foreach ($objectid as $key => $object) { // Cas des factures liees directement - if ($objecttype == 'facture') - { + if ($objecttype == 'facture') { $linkedInvoices[] = $object; - } // Cas des factures liees par un autre objet (ex: commande) - else { + } else { + // Cas des factures liees par un autre objet (ex: commande) $this->fetchObjectLinked($object, $objecttype); - foreach ($this->linkedObjectsIds as $subobjecttype => $subobjectid) - { - foreach ($subobjectid as $subkey => $subobject) - { - if ($subobjecttype == 'facture') - { + foreach ($this->linkedObjectsIds as $subobjecttype => $subobjectid) { + foreach ($subobjectid as $subkey => $subobject) { + if ($subobjecttype == 'facture') { $linkedInvoices[] = $subobject; } } @@ -2859,21 +2867,18 @@ class Propal extends CommonObject } } - if (count($linkedInvoices) > 0) - { - $sql = "SELECT rowid as facid, ref, total, datef as df, fk_user_author, fk_statut, paye"; + if (count($linkedInvoices) > 0) { + $sql = "SELECT rowid as facid, ref, total_ht as total, datef as df, fk_user_author, fk_statut, paye"; $sql .= " FROM ".MAIN_DB_PREFIX."facture"; - $sql .= " WHERE rowid IN (".implode(',', $linkedInvoices).")"; + $sql .= " WHERE rowid IN (".$this->db->sanitize(implode(',', $linkedInvoices)).")"; dol_syslog(get_class($this)."::InvoiceArrayList", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $tab_sqlobj = array(); $nump = $this->db->num_rows($resql); - for ($i = 0; $i < $nump; $i++) - { + for ($i = 0; $i < $nump; $i++) { $sqlobj = $this->db->fetch_object($resql); $tab_sqlobj[] = $sqlobj; } @@ -2881,11 +2886,9 @@ class Propal extends CommonObject $nump = count($tab_sqlobj); - if ($nump) - { + if ($nump) { $i = 0; - while ($i < $nump) - { + while ($i < $nump) { $obj = array_shift($tab_sqlobj); $ga[$i] = $obj; @@ -2897,7 +2900,9 @@ class Propal extends CommonObject } else { return -1; } - } else return $ga; + } else { + return $ga; + } } /** @@ -2919,14 +2924,16 @@ class Propal extends CommonObject if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROPAL_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Delete extrafields of lines and lines if (!$error && !empty($this->table_element_line)) { $tabletodelete = $this->table_element_line; - $sqlef = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete."_extrafields WHERE fk_object IN (SELECT rowid FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".$this->id.")"; + $sqlef = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete."_extrafields WHERE fk_object IN (SELECT rowid FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".((int) $this->id).")"; $sql = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".$this->id; if (!$this->db->query($sqlef) || !$this->db->query($sql)) { $error++; @@ -2939,13 +2946,17 @@ class Propal extends CommonObject if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } // Removed extrafields of object @@ -3027,45 +3038,41 @@ class Propal extends CommonObject { global $user; - if ($this->statut >= self::STATUS_DRAFT) - { + if ($this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal'; - $sql .= ' SET fk_availability = '.$availability_id; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' SET fk_availability = '.((int) $availability_id); + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__.' availability('.$availability_id.')', LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->availability_id = $availability_id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -3095,45 +3102,41 @@ class Propal extends CommonObject // phpcs:enable global $user; - if ($this->statut >= self::STATUS_DRAFT) - { + if ($this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'propal'; - $sql .= ' SET fk_input_reason = '.$demand_reason_id; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' SET fk_input_reason = '.((int) $demand_reason_id); + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__.' demand_reason('.$demand_reason_id.')', LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->demand_reason_id = $demand_reason_id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('PROPAL_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -3159,38 +3162,41 @@ class Propal extends CommonObject public function info($id) { $sql = "SELECT c.rowid, "; - $sql .= " c.datec, c.date_valid as datev, c.date_cloture as dateo,"; - $sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_cloture"; + $sql .= " c.datec, c.date_valid as datev, c.date_signature, c.date_cloture as dateo,"; + $sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_signature, c.fk_user_cloture"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= " WHERE c.rowid = ".((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; $this->date_creation = $this->db->jdate($obj->datec); $this->date_validation = $this->db->jdate($obj->datev); + $this->date_signature = $this->db->jdate($obj->date_signature); $this->date_cloture = $this->db->jdate($obj->dateo); $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; - if ($obj->fk_user_valid) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_signature) { + $user_signature = new User($this->db); + $user_signature->fetch($obj->fk_user_signature); + $this->user_signature = $user_signature; + } + + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -3228,8 +3234,7 @@ class Propal extends CommonObject global $conf; // Init/load array of translation of status - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load("propal"); $this->labelStatus[0] = $langs->transnoentitiesnoconv("PropalStatusDraft"); @@ -3245,11 +3250,17 @@ class Propal extends CommonObject } $statusType = ''; - if ($status == self::STATUS_DRAFT) $statusType = 'status0'; - elseif ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - elseif ($status == self::STATUS_SIGNED) $statusType = 'status4'; - elseif ($status == self::STATUS_NOTSIGNED) $statusType = 'status9'; - elseif ($status == self::STATUS_BILLED) $statusType = 'status6'; + if ($status == self::STATUS_DRAFT) { + $statusType = 'status0'; + } elseif ($status == self::STATUS_VALIDATED) { + $statusType = 'status1'; + } elseif ($status == self::STATUS_SIGNED) { + $statusType = 'status4'; + } elseif ($status == self::STATUS_NOTSIGNED) { + $statusType = 'status9'; + } elseif ($status == self::STATUS_BILLED) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -3272,20 +3283,24 @@ class Propal extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin, p.total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + if (!$user->rights->societe->client->voir && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".$user->id; $clause = " AND"; } $sql .= $clause." p.entity IN (".getEntity('propal').")"; - if ($mode == 'opened') $sql .= " AND p.fk_statut = ".self::STATUS_VALIDATED; - if ($mode == 'signed') $sql .= " AND p.fk_statut = ".self::STATUS_SIGNED; - if ($user->socid) $sql .= " AND p.fk_soc = ".$user->socid; + if ($mode == 'opened') { + $sql .= " AND p.fk_statut = ".self::STATUS_VALIDATED; + } + if ($mode == 'signed') { + $sql .= " AND p.fk_statut = ".self::STATUS_SIGNED; + } + if ($user->socid) { + $sql .= " AND p.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $langs->load("propal"); $now = dol_now(); @@ -3314,16 +3329,13 @@ class Propal extends CommonObject $response->img = img_object('', "propal"); // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $response->total += $obj->total_ht; - if ($mode == 'opened') - { + if ($mode == 'opened') { $datelimit = $this->db->jdate($obj->datefin); - if ($datelimit < ($now - $delay_warning)) - { + if ($datelimit < ($now - $delay_warning)) { $response->nbtodolate++; } } @@ -3359,12 +3371,10 @@ class Propal extends CommonObject $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -3396,8 +3406,7 @@ class Propal extends CommonObject // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new PropaleLigne($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->qty = 1; @@ -3406,8 +3415,7 @@ class Propal extends CommonObject $line->tva_tx = 20; $line->localtax1_tx = 0; $line->localtax2_tx = 0; - if ($xnbp == 2) - { + if ($xnbp == 2) { $line->total_ht = 50; $line->total_ttc = 60; $line->total_tva = 10; @@ -3419,8 +3427,7 @@ class Propal extends CommonObject $line->remise_percent = 00; } - if ($num_prods > 0) - { + if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; $line->product_ref = 'SPECIMEN'; @@ -3453,8 +3460,7 @@ class Propal extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -3462,11 +3468,9 @@ class Propal extends CommonObject $sql .= " ".$clause." p.entity IN (".getEntity('propal').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["proposals"] = $obj->nb; } $this->db->free($resql); @@ -3493,8 +3497,7 @@ class Propal extends CommonObject $classname = $conf->global->PROPALE_ADDON; - if (!empty($classname)) - { + if (!empty($classname)) { $mybool = false; $file = $classname.".php"; @@ -3508,8 +3511,7 @@ class Propal extends CommonObject $mybool |= @include_once $dir.$file; } - if (!$mybool) - { + if (!$mybool) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -3518,8 +3520,7 @@ class Propal extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -3548,14 +3549,15 @@ class Propal extends CommonObject { global $langs, $conf, $user; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $label = ''; $url = ''; - if ($user->rights->propal->lire) - { + if ($user->rights->propal->lire) { $label = img_picto('', $this->picto).' '.$langs->trans("Proposal").''; if (isset($this->statut)) { $label .= ' '.$this->getLibStatut(5); @@ -3589,20 +3591,21 @@ class Propal extends CommonObject $url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id.$get_params; } - if ($option != 'nolink') - { + 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'; + 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) && $user->rights->propal->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->propal->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Proposal"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -3615,8 +3618,12 @@ class Propal extends CommonObject $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; + 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 >= 0) { @@ -3644,7 +3651,9 @@ class Propal extends CommonObject $txttoshow .= dol_string_nohtmltag($this->note_public, 1); } if (!empty($this->note_private)) { - if (!empty($txttoshow)) $txttoshow .= '

    '; + if (!empty($txttoshow)) { + $txttoshow .= '

    '; + } $txttoshow .= dol_string_nohtmltag($this->note_private, 1); } } @@ -3890,15 +3899,13 @@ class PropaleLigne extends CommonObjectLine $sql .= ' pd.date_start, pd.date_end, pd.product_type'; $sql .= ' FROM '.MAIN_DB_PREFIX.'propaldet as pd'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid'; - $sql .= ' WHERE pd.rowid = '.$rowid; + $sql .= ' WHERE pd.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); - if ($objp) - { + if ($objp) { $this->id = $objp->rowid; $this->rowid = $objp->rowid; // deprecated $this->fk_propal = $objp->fk_propal; @@ -3979,32 +3986,70 @@ class PropaleLigne extends CommonObjectLine $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'. // 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) || !is_numeric($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->fk_fournprice)) $this->fk_fournprice = 0; - if (!is_numeric($this->qty)) $this->qty = 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; + 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) || !is_numeric($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->fk_fournprice)) { + $this->fk_fournprice = 0; + } + if (!is_numeric($this->qty)) { + $this->qty = 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; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0 && $pa_ht_isemptystring) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0 && $pa_ht_isemptystring) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -4012,7 +4057,9 @@ class PropaleLigne extends CommonObjectLine } // Check parameters - if ($this->product_type < 0) return -1; + if ($this->product_type < 0) { + return -1; + } $this->db->begin(); @@ -4065,26 +4112,21 @@ class PropaleLigne extends CommonObjectLine dol_syslog(get_class($this).'::insert', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX.'propaldet'); - if (!$error) - { + if (!$error) { $this->id = $this->rowid; $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEPROPAL_INSERT', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -4116,26 +4158,21 @@ class PropaleLigne extends CommonObjectLine $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE rowid = ".$this->rowid; dol_syslog("PropaleLigne::delete", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Remove extrafields - if (!$error) - { + if (!$error) { $this->id = $this->rowid; $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEPROPAL_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -4166,33 +4203,69 @@ class PropaleLigne extends CommonObjectLine $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'. - if (empty($this->id) && !empty($this->rowid)) $this->id = $this->rowid; + if (empty($this->id) && !empty($this->rowid)) { + $this->id = $this->rowid; + } // 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->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; - if (empty($this->localtax1_type)) $this->localtax1_type = 0; - if (empty($this->localtax2_type)) $this->localtax2_type = 0; - if (empty($this->marque_tx)) $this->marque_tx = 0; - if (empty($this->marge_tx)) $this->marge_tx = 0; - if (empty($this->price)) $this->price = 0; // TODO A virer - if (empty($this->remise)) $this->remise = 0; // TODO A virer - 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->fk_fournprice)) $this->fk_fournprice = 0; - if (empty($this->subprice)) $this->subprice = 0; - if (empty($this->pa_ht)) $this->pa_ht = 0; + 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->total_localtax1)) { + $this->total_localtax1 = 0; + } + if (empty($this->total_localtax2)) { + $this->total_localtax2 = 0; + } + if (empty($this->localtax1_type)) { + $this->localtax1_type = 0; + } + if (empty($this->localtax2_type)) { + $this->localtax2_type = 0; + } + if (empty($this->marque_tx)) { + $this->marque_tx = 0; + } + if (empty($this->marge_tx)) { + $this->marge_tx = 0; + } + if (empty($this->price)) { + $this->price = 0; // TODO A virer + } + if (empty($this->remise)) { + $this->remise = 0; // TODO A virer + } + 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->fk_fournprice)) { + $this->fk_fournprice = 0; + } + if (empty($this->subprice)) { + $this->subprice = 0; + } + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0 && $pa_ht_isemptystring) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0 && $pa_ht_isemptystring) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -4218,8 +4291,7 @@ class PropaleLigne extends CommonObjectLine $sql .= ", price=".price2num($this->price).""; // TODO A virer $sql .= ", remise=".price2num($this->remise).""; // TODO A virer $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; - if (empty($this->skip_update_total)) - { + 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).""; @@ -4228,9 +4300,13 @@ class PropaleLigne extends CommonObjectLine } $sql .= ", fk_product_fournisseur_price=".(!empty($this->fk_fournprice) ? "'".$this->db->escape($this->fk_fournprice)."'" : "null"); $sql .= ", buy_price_ht=".price2num($this->pa_ht); - if (strlen($this->special_code)) $sql .= ", special_code=".$this->special_code; + if (strlen($this->special_code)) { + $sql .= ", special_code=".$this->special_code; + } $sql .= ", fk_parent_line=".($this->fk_parent_line > 0 ? $this->fk_parent_line : "null"); - if (!empty($this->rang)) $sql .= ", rang=".$this->rang; + if (!empty($this->rang)) { + $sql .= ", rang=".$this->rang; + } $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 .= ", fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); @@ -4245,23 +4321,18 @@ class PropaleLigne extends CommonObjectLine dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$error) - { + if ($resql) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEPROPAL_UPDATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -4299,8 +4370,7 @@ class PropaleLigne extends CommonObjectLine dol_syslog("PropaleLigne::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index ca95be53fc1..a06945a09a6 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -69,8 +69,7 @@ class PropaleStats extends Stats $this->userid = $userid; $this->join = ''; - if ($mode == 'customer') - { + if ($mode == 'customer') { $object = new Propal($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; @@ -81,8 +80,7 @@ class PropaleStats extends Stats //$this->where .= " p.fk_statut > 0"; } - if ($mode == 'supplier') - { + if ($mode == 'supplier') { $object = new SupplierProposal($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; @@ -95,24 +93,25 @@ class PropaleStats extends Stats } //$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '')."p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($this->socid) - { + if (!$user->rights->societe->client->voir && !$this->socid) { + $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($this->socid) { $this->where .= " AND p.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where .= ' AND fk_user_author = '.$this->userid; - - if ($typentid) - { - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc'; - $this->where .= ' AND s.fk_typent = '.$typentid; + if ($this->userid > 0) { + $this->where .= ' AND fk_user_author = '.((int) $this->userid); } - if ($categid) - { + if ($typentid) { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc'; + $this->where .= ' AND s.fk_typent = '.((int) $typentid); + } + + if ($categid) { $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cs ON cs.fk_soc = p.fk_soc'; $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as c ON c.rowid = cs.fk_categorie'; - $this->where .= ' AND c.rowid = '.$categid; + $this->where .= ' AND c.rowid = '.((int) $categid); } } @@ -130,7 +129,9 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -153,7 +154,9 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; @@ -175,7 +178,9 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, SUM(p.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -198,7 +203,9 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, AVG(p.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -219,7 +226,9 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; @@ -243,7 +252,9 @@ class PropaleStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid"; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index af3679de945..09aa9fddb6c 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -33,83 +33,74 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page -$langs->loadLangs(array('facture', 'orders', 'sendings', 'companies')); +$langs->loadLangs(array('facture', 'propal', 'orders', 'sendings', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'propal', $id); - $object = new Propal($db); // Load object -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret == 0) - { + if ($ret == 0) { $langs->load("errors"); setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; - } elseif ($ret < 0) - { + } elseif ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } -if (!$error) -{ +if (!$error) { $object->fetch_thirdparty(); } else { header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); exit; } +// Security check +if (!empty($user->socid)) { + $socid = $user->socid; + $object->id = $user->socid; +} +restrictedArea($user, 'propal', $object->id); + /* * Add a new contact */ -if ($action == 'addcontact' && $user->rights->propale->creer) -{ - if ($object->id > 0) - { +if ($action == 'addcontact' && $user->rights->propale->creer) { + if ($object->id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} // Toggle the status of a contact -elseif ($action == 'swapstatut' && $user->rights->propale->creer) -{ - if ($object->id > 0) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && $user->rights->propale->creer) { + // Toggle the status of a contact + if ($object->id > 0) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } -} // Deletes a contact -elseif ($action == 'deletecontact' && $user->rights->propale->creer) -{ +} elseif ($action == 'deletecontact' && $user->rights->propale->creer) { + // Deletes a contact $result = $object->delete_contact($lineid); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -134,8 +125,7 @@ $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); -if ($object->id > 0) -{ +if ($object->id > 0) { $head = propal_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("Proposal"), -1, 'propal'); @@ -152,12 +142,10 @@ if ($object->id > 0) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) - { + if ($user->rights->propal->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref .= ' : '; @@ -194,10 +182,11 @@ if ($object->id > 0) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index b5bb8df308b..1a71d4ffaba 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -39,15 +39,14 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('compta', 'other', 'companies')); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); // Security check $socid = ''; -if (!empty($user->socid)) -{ +if (!empty($user->socid)) { $socid = $user->socid; } $result = restrictedArea($user, 'propal', $id); @@ -57,30 +56,46 @@ $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 (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; } -if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; } +if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { + $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; +} +if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { + $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; +} -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Propal($db); $object->fetch($id, $ref); +// Security check +if (!empty($user->socid)) { + $socid = $user->socid; + $object->id = $user->socid; +} +restrictedArea($user, 'propal', $object->id); + /* * Actions */ -if ($object->id > 0) -{ +if ($object->id > 0) { $object->fetch_thirdparty(); $upload_dir = $conf->propal->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } @@ -92,8 +107,7 @@ llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition $form = new Form($db); -if ($object->id > 0) -{ +if ($object->id > 0) { $upload_dir = $conf->propal->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $head = propal_prepare_head($object); @@ -102,8 +116,7 @@ if ($object->id > 0) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -120,12 +133,10 @@ if ($object->id > 0) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer'); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) - { + if ($user->rights->propal->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref .= ' : '; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index b51f138b0e5..445fd9b5773 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -20,22 +20,12 @@ */ /** - * \file htdocs/comm/propal/index.php + * \file htdocs/comm/propal/index.php * \ingroup propal * \brief Home page of proposal area */ require '../../main.inc.php'; - -// Security check -$socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) -{ - $action = ''; - $socid = $user->socid; -} -restrictedArea($user, 'propal'); - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; @@ -49,9 +39,19 @@ $langs->loadLangs(array('propal', 'companies')); $now = dol_now(); $max = 5; +// Security check +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) { + $action = ''; + $socid = $user->socid; +} +restrictedArea($user, 'propal'); + + /* * View */ + $propalstatic = new Propal($db); $companystatic = new Societe($db); $form = new Form($db); @@ -65,48 +65,30 @@ print load_fiche_titre($langs->trans("ProspectionArea"), '', 'propal'); print '
    '; print '
    '; -// This is useless due to the global search combo -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) -{ - print ''; - print '
    '; - print ''; - print ''; - - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - - print '
    '.$langs->trans("Search").'
    '.$langs->trans("Proposal").':
    '; - print '
    '; - print ''; - print '
    '; -} - /* * Statistics */ + $listofstatus = array(Propal::STATUS_DRAFT, Propal::STATUS_VALIDATED, Propal::STATUS_SIGNED, Propal::STATUS_NOTSIGNED, Propal::STATUS_BILLED); $sql = "SELECT count(p.rowid) as nb, p.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_soc = s.rowid"; -if ($user->socid) $sql .= ' AND p.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 .= " AND p.fk_statut IN (".implode(" ,", $listofstatus).")"; +if ($user->socid) { + $sql .= ' AND p.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 .= " AND p.fk_statut IN (".$db->sanitize(implode(" ,", $listofstatus)).")"; $sql .= " GROUP BY p.fk_statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; $total = 0; @@ -115,11 +97,9 @@ if ($resql) $colorseries = array(); $vals = array(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $vals[$obj->status] = $obj->nb; $totalinprocess += $obj->nb; @@ -129,7 +109,7 @@ if ($resql) } $db->free($resql); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '
    '; print ''; @@ -140,11 +120,21 @@ if ($resql) foreach ($listofstatus as $status) { $dataseries[] = array($propalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == Propal::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == Propal::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == Propal::STATUS_SIGNED) $colorseries[$status] = $badgeStatus4; - if ($status == Propal::STATUS_NOTSIGNED) $colorseries[$status] = $badgeStatus9; - if ($status == Propal::STATUS_BILLED) $colorseries[$status] = $badgeStatus6; + if ($status == Propal::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Propal::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Propal::STATUS_SIGNED) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == Propal::STATUS_NOTSIGNED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == Propal::STATUS_BILLED) { + $colorseries[$status] = $badgeStatus6; + } if (empty($conf->use_javascript_ajax)) { print ''; @@ -198,16 +188,22 @@ if ($resql) * Draft proposals */ if (!empty($conf->propal->enabled)) { - $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.tva as total_tva, p.total as total_ttc"; + $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc"; $sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.email, s.entity, s.code_compta"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut =".Propal::STATUS_DRAFT; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($socid) $sql .= " AND p.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($socid) { + $sql .= " AND p.fk_soc = ".$socid; + } $resql = $db->query($sql); if ($resql) { @@ -271,12 +267,18 @@ $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, date_cloture as datec"; $sql .= ", s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND c.fk_soc = s.rowid"; //$sql.= " AND c.fk_statut > 2"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; -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; +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= " ORDER BY c.tms DESC"; $sql .= $db->plimit($max, 0); @@ -336,15 +338,21 @@ if ($resql) { */ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client"; - $sql .= ", p.rowid as propalid, p.entity, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; + $sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity($propalstatic->element).")"; $sql .= " AND p.fk_statut = ".Propal::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; + 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 = ".((int) $socid); + } $sql .= " ORDER BY p.rowid DESC"; $resql = $db->query($sql); diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index cf63d919f62..72e4f887496 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -19,9 +19,9 @@ */ /** - * \file htdocs/comm/propal/info.php - * \ingroup propal - * \brief Page d'affichage des infos d'une proposition commerciale + * \file htdocs/comm/propal/info.php + * \ingroup propal + * \brief Page d'affichage des infos d'une proposition commerciale */ require '../../main.inc.php'; @@ -39,17 +39,18 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -// Security check -if (!empty($user->socid)) $socid = $user->socid; -$result = restrictedArea($user, 'propal', $id); - $object = new Propal($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); exit; } +// Security check +if (!empty($user->socid)) { + $socid = $user->socid; + $object->id = $user->socid; +} +restrictedArea($user, 'propal', $object->id); /* @@ -80,12 +81,10 @@ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_cl // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->creer) - { + if ($user->rights->propal->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref .= ' : '; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 5190adb379a..3c150e2aec8 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -14,6 +14,7 @@ * Copyright (C) 2017-2018 Charlene Benke * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2019 Alexandre Spangaro + * Copyright (C) 2021 Anthony Berton * * 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 @@ -47,6 +48,9 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'categories')); +if (!empty($conf->expedition->enabled)) { + $langs->loadLangs(array('sendings')); +} $socid = GETPOST('socid', 'int'); @@ -66,9 +70,11 @@ $search_refproject = GETPOST('search_refproject', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); +$search_societe_alias = GETPOST('search_societe_alias', 'alpha'); $search_montant_ht = GETPOST('search_montant_ht', 'alpha'); $search_montant_vat = GETPOST('search_montant_vat', 'alpha'); $search_montant_ttc = GETPOST('search_montant_ttc', 'alpha'); +$search_warehouse = GETPOST('search_warehouse', 'alpha'); $search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha'); $search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha'); $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); @@ -89,6 +95,10 @@ $search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_st $search_datedelivery_end = dol_mktime(23, 59, 59, GETPOST('search_datedelivery_endmonth', 'int'), GETPOST('search_datedelivery_endday', 'int'), GETPOST('search_datedelivery_endyear', 'int')); $search_availability = GETPOST('search_availability', 'int'); $search_categ_cus = GETPOST("search_categ_cus", 'int'); +$search_fk_cond_reglement = GETPOST("search_fk_cond_reglement", 'int'); +$search_fk_shipping_method = GETPOST("search_fk_shipping_method", 'int'); +$search_fk_input_reason = GETPOST("search_fk_input_reason", 'int'); +$search_fk_mode_reglement = GETPOST("search_fk_mode_reglement", 'int'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -104,25 +114,27 @@ $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 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 +if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = 'p.ref'; -if (!$sortorder) $sortorder = 'DESC'; - -$permissiontoread = $user->rights->propal->lire; -$permissiontoadd = $user->rights->propal->write; -$permissiontodelete = $user->rights->propal->supprimer; -$permissiontoclose = $user->rights->propal->cloturer; +if (!$sortfield) { + $sortfield = 'p.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // Security check $module = 'propal'; $dbtable = ''; $objectid = ''; -if (!empty($user->socid)) $socid = $user->socid; -if (!empty($socid)) -{ +if (!empty($user->socid)) { + $socid = $user->socid; +} +if (!empty($socid)) { $objectid = $socid; $module = 'societe'; $dbtable = '&societe'; @@ -152,7 +164,9 @@ $fieldstosearchall = array( 's.town'=>"Town", 'p.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["p.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["p.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; @@ -162,6 +176,7 @@ $arrayfields = array( 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1)), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1), 's.town'=>array('label'=>"Town", 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'checked'=>1), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), @@ -171,15 +186,19 @@ $arrayfields = array( 'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1), 'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0), 'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0), + 'p.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'enabled'=>!empty($conf->expedition->enabled)), + 'p.fk_input_reason'=>array('label'=>"Origin", 'checked'=>0, 'enabled'=>1), + 'p.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>0), + 'p.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0), 'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), - 'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'p.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0), 'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), 'p.total_ht_invoiced'=>array('label'=>"AmountInvoicedHT", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.total_invoiced'=>array('label'=>"AmountInvoicedTTC", 'checked'=>0, 'enabled'=>!empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'p.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), + 'p.multicurrency_total_tva'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'p.multicurrency_total_ht_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedHT', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), 'p.multicurrency_total_invoiced'=>array('label'=>'MulticurrencyAmountInvoicedTTC', 'checked'=>0, 'enabled'=>!empty($conf->multicurrency->enabled) && !empty($conf->global->PROPOSAL_SHOW_INVOICED_AMOUNT)), @@ -192,26 +211,47 @@ $arrayfields = array( 'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; +$permissiontoread = $user->rights->propal->lire; +$permissiontoadd = $user->rights->propal->write; +$permissiontodelete = $user->rights->propal->supprimer; +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + $permissiontovalidate = $user->rights->propale->propal_advance->validate; + $permissiontoclose = $user->rights->propale->propal_advance->close; + $permissiontosendbymail = $user->rights->propale->propal_advance->send; +} else { + $permissiontovalidate = $user->rights->propal->write; + $permissiontoclose = $user->rights->propal->write; +} + + + /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; + $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 -{ +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_categ = ''; $search_user = ''; $search_sale = ''; @@ -220,9 +260,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_refproject = ''; $search_project = ''; $search_societe = ''; + $search_societe_alias = ''; $search_montant_ht = ''; $search_montant_vat = ''; $search_montant_ttc = ''; + $search_warehouse = ''; $search_multicurrency_code = ''; $search_multicurrency_tx = ''; $search_multicurrency_montant_ht = ''; @@ -248,28 +290,31 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $toselect = ''; $search_array_options = array(); $search_categ_cus = 0; + $search_fk_cond_reglement = ''; + $search_fk_shipping_method = ''; + $search_fk_input_reason = ''; + $search_fk_mode_reglement = ''; +} +if ($object_statut != '') { + $search_status = $object_statut; } -if ($object_statut != '') $search_status = $object_statut; -if (empty($reshook)) -{ +if (empty($reshook)) { $objectclass = 'Propal'; $objectlabel = 'Proposals'; $uploaddir = $conf->propal->multidir_output[$conf->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -// Mass action validate (after a confirmation question, it is $action that is used). -if ($action == 'validate') { +if ($action == 'validate' && $permissiontovalidate) { if (GETPOST('confirm') == 'yes') { $tmpproposal = new Propal($db); - $db->begin(); $error = 0; foreach ($toselect as $checked) { if ($tmpproposal->fetch($checked)) { - if ($tmpproposal->statut == $tmpproposal::STATUS_DRAFT) { + if ($tmpproposal->statut == 0) { if ($tmpproposal->valid($user)) { setEventMessage($tmpproposal->ref." ".$langs->trans('PassedInOpenStatus'), 'mesgs'); } else { @@ -293,19 +338,16 @@ if ($action == 'validate') { } } -// Mass action sign (after a confirmation question, it is $action that is used). -if ($action == "sign") { +if ($action == "sign" && $permissiontoclose) { if (GETPOST('confirm') == 'yes') { $tmpproposal = new Propal($db); - $db->begin(); $error = 0; foreach ($toselect as $checked) { if ($tmpproposal->fetch($checked)) { if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) { - $tmpproposal->statut = $tmpproposal::STATUS_SIGNED; - - if ($tmpproposal->update($user)) { + $tmpproposal->statut = $tmpproposal::STATUS_SIGNED;; + if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_SIGNED)) { setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); } else { dol_print_error($db); @@ -327,6 +369,73 @@ if ($action == "sign") { } } } +if ($action == "nosign" && $permissiontoclose) { + if (GETPOST('confirm') == 'yes') { + $tmpproposal = new Propal($db); + $db->begin(); + $error = 0; + foreach ($toselect as $checked) { + if ($tmpproposal->fetch($checked)) { + if ($tmpproposal->statut == $tmpproposal::STATUS_VALIDATED) { + $tmpproposal->statut = $tmpproposal::STATUS_NOTSIGNED; + if ($tmpproposal->closeProposal($user, $tmpproposal::STATUS_NOTSIGNED)) { + setEventMessage($tmpproposal->ref." ".$langs->trans('NoSigned'), 'mesgs'); + } else { + dol_print_error($db); + $error++; + } + } else { + setEventMessage($tmpproposal->ref." ".$langs->trans('CantBeClosed'), 'errors'); + $error++; + } + } else { + dol_print_error($db); + $error++; + } + } + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } +} + +// Closed records +if (!$error && $massaction === 'setbilled' && $permissiontoclose) { + $db->begin(); + + $objecttmp = new $objectclass($db); + $nbok = 0; + foreach ($toselect as $toselectid) { + $result = $objecttmp->fetch($toselectid); + if ($result > 0) { + $result = $objecttmp->classifyBilled($user, 0); + if ($result <= 0) { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } else { + $nbok++; + } + } else { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } + $db->commit(); + } else { + $db->rollback(); + } +} @@ -348,22 +457,31 @@ $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos' //llxHeader('',$langs->trans('Proposal'),$help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; +if ($sall || $search_product_category > 0 || $search_user > 0) { + $sql = 'SELECT DISTINCT'; +} +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, '; $sql .= " typent.code as typent_code,"; $sql .= " ava.rowid as availability,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; -$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; -$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva as multicurrency_total_vat, p.multicurrency_total_ttc,'; +$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; +$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc,'; $sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,'; $sql .= ' p.note_public, p.note_private,'; +$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,'; $sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,"; $sql .= ' u.login'; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; -if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user"; +} +if ($search_categ_cus) { + $sql .= ", cc.fk_categorie, cc.fk_soc"; +} // 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(); @@ -374,70 +492,156 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -if (!empty($search_categ_cus)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ_cus)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +} $sql .= ', '.MAIN_DB_PREFIX.'propal 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)"; -if ($sall || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'propaldet as pd ON p.rowid=pd.fk_propal'; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +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)"; +} +if ($sall || $search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'propaldet as pd ON p.rowid=pd.fk_propal'; +} +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 p.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr ON pr.rowid = p.fk_projet"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_availability as ava on (ava.rowid = p.fk_availability)"; // 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"; -if ($search_user > 0) -{ +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as c"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } $sql .= ' WHERE p.fk_soc = s.rowid'; $sql .= ' AND p.entity IN ('.getEntity('propal').')'; -if (!$user->rights->societe->client->voir && !$socid) //restriction -{ +if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } -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->sanitize($db->escape($search_country)).')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; -if ($search_ref) $sql .= natural_search('p.ref', $search_ref); -if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer); -if ($search_refproject) $sql .= natural_search('pr.ref', $search_refproject); -if ($search_project) $sql .= natural_search('pr.title', $search_project); -if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; - -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); -if ($search_login) $sql .= natural_search("u.login", $search_login); -if ($search_montant_ht != '') $sql .= natural_search("p.total_ht", $search_montant_ht, 1); -if ($search_montant_vat != '') $sql .= natural_search("p.tva", $search_montant_vat, 1); -if ($search_montant_ttc != '') $sql .= natural_search("p.total", $search_montant_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND p.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; -if ($search_multicurrency_tx != '') $sql .= natural_search('p.multicurrency_tx', $search_multicurrency_tx, 1); -if ($search_multicurrency_montant_ht != '') $sql .= natural_search('p.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); -if ($search_multicurrency_montant_vat != '') $sql .= natural_search('p.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); -if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('p.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); +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->sanitize($db->escape($search_country)).')'; +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; +} +if ($search_ref) { + $sql .= natural_search('p.ref', $search_ref); +} +if ($search_refcustomer) { + $sql .= natural_search('p.ref_client', $search_refcustomer); +} +if ($search_refproject) { + $sql .= natural_search('pr.ref', $search_refproject); +} +if ($search_project) { + $sql .= natural_search('pr.title', $search_project); +} +if ($search_availability) { + $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; +} +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} +if ($search_societe_alias) { + $sql .= natural_search('s.name_alias', $search_societe_alias); +} +if ($search_login) { + $sql .= natural_search("u.login", $search_login); +} +if ($search_montant_ht != '') { + $sql .= natural_search("p.total_ht", $search_montant_ht, 1); +} +if ($search_montant_vat != '') { + $sql .= natural_search("p.total_tva", $search_montant_vat, 1); +} +if ($search_montant_ttc != '') { + $sql .= natural_search("p.total_ttc", $search_montant_ttc, 1); +} +if ($search_warehouse != '' && $search_warehouse > 0) { + $sql .= natural_search("p.fk_warehouse", $search_warehouse, 1); +} +if ($search_multicurrency_code != '') { + $sql .= ' AND p.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; +} +if ($search_multicurrency_tx != '') { + $sql .= natural_search('p.multicurrency_tx', $search_multicurrency_tx, 1); +} +if ($search_multicurrency_montant_ht != '') { + $sql .= natural_search('p.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); +} +if ($search_multicurrency_montant_vat != '') { + $sql .= natural_search('p.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); +} +if ($search_multicurrency_montant_ttc != '') { + $sql .= natural_search('p.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); +} if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } -if ($search_categ_cus > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); -if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL"; - -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category); -if ($socid > 0) $sql .= ' AND s.rowid = '.$socid; -if ($search_status != '' && $search_status != '-1') -{ - $sql .= ' AND p.fk_statut IN ('.$db->sanitize($db->escape($search_status)).')'; +if ($search_categ_cus > 0) { + $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); } -if ($search_date_start) $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'"; -if ($search_date_end) $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'"; -if ($search_dateend_start) $sql .= " AND p.fin_validite >= '".$db->idate($search_dateend_start)."'"; -if ($search_dateend_end) $sql .= " AND p.fin_validite <= '".$db->idate($search_dateend_end)."'"; -if ($search_datedelivery_start) $sql .= " AND p.date_livraison >= '".$db->idate($search_datedelivery_start)."'"; -if ($search_datedelivery_end) $sql .= " AND p.date_livraison <= '".$db->idate($search_datedelivery_end)."'"; -if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); -if ($search_user > 0) -{ +if ($search_categ_cus == -2) { + $sql .= " AND cc.fk_categorie IS NULL"; +} + +if ($search_fk_cond_reglement > 0) { + $sql .= " AND p.fk_cond_reglement = ".$db->escape($search_fk_cond_reglement); +} +if ($search_fk_shipping_method > 0) { + $sql .= " AND p.fk_shipping_method = ".$db->escape($search_fk_shipping_method); +} +if ($search_fk_input_reason > 0) { + $sql .= " AND p.fk_input_reason = ".$db->escape($search_fk_input_reason); +} +if ($search_fk_mode_reglement > 0) { + $sql .= " AND p.fk_mode_reglement = ".$db->escape($search_fk_mode_reglement); +} + +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category); +} +if ($socid > 0) { + $sql .= ' AND s.rowid = '.$socid; +} +if ($search_status != '' && $search_status != '-1') { + $sql .= ' AND p.fk_statut IN ('.$db->sanitize($search_status).')'; +} +if ($search_date_start) { + $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'"; +} +if ($search_date_end) { + $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'"; +} +if ($search_dateend_start) { + $sql .= " AND p.fin_validite >= '".$db->idate($search_dateend_start)."'"; +} +if ($search_dateend_end) { + $sql .= " AND p.fin_validite <= '".$db->idate($search_dateend_end)."'"; +} +if ($search_datedelivery_start) { + $sql .= " AND p.date_livraison >= '".$db->idate($search_datedelivery_start)."'"; +} +if ($search_datedelivery_end) { + $sql .= " AND p.date_livraison <= '".$db->idate($search_datedelivery_end)."'"; +} +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 c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$db->escape($search_user); } // Add where from extra fields @@ -453,13 +657,11 @@ $sql .= ', p.ref DESC'; // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -469,17 +671,17 @@ $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $objectstatic = new Propal($db); $userstatic = new User($db); - if ($socid > 0) - { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); $title = $langs->trans('ListOfProposals').' - '.$soc->name; - if (empty($search_societe)) $search_societe = $soc->name; + if (empty($search_societe)) { + $search_societe = $soc->name; + } } else { $title = $langs->trans('ListOfProposals'); } @@ -488,8 +690,7 @@ if ($resql) $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->rowid; @@ -501,58 +702,164 @@ if ($resql) llxHeader('', $langs->trans('Proposal'), $help_url); $param = '&search_status='.urlencode($search_status); - 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 ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start); - if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end); - if ($search_dateend_start) $param .= '&search_dateend_start='.urlencode($search_dateend_start); - if ($search_dateend_end) $param .= '&search_dateend_end='.urlencode($search_dateend_end); - if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); - if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); - if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); - if ($search_refcustomer) $param .= '&search_refcustomer='.urlencode($search_refcustomer); - if ($search_refproject) $param .= '&search_refproject='.urlencode($search_refproject); - if ($search_societe) $param .= '&search_societe='.urlencode($search_societe); - if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); - if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); - if ($search_montant_ht) $param .= '&search_montant_ht='.urlencode($search_montant_ht); - 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); - if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); - if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); - if ($search_login) $param .= '&search_login='.urlencode($search_login); - if ($search_town) $param .= '&search_town='.urlencode($search_town); - if ($search_zip) $param .= '&search_zip='.urlencode($search_zip); - if ($socid > 0) $param .= '&socid='.urlencode($socid); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); - if ($search_product_category != '') $param .= '&search_product_category='.$search_product_category; + 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 ($search_date_start) { + $param .= '&search_date_start='.urlencode($search_date_start); + } + if ($search_date_end) { + $param .= '&search_date_end='.urlencode($search_date_end); + } + if ($search_dateend_start) { + $param .= '&search_dateend_start='.urlencode($search_dateend_start); + } + if ($search_dateend_end) { + $param .= '&search_dateend_end='.urlencode($search_dateend_end); + } + if ($search_datedelivery_start) { + $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); + } + if ($search_datedelivery_end) { + $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); + } + if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); + } + if ($search_refcustomer) { + $param .= '&search_refcustomer='.urlencode($search_refcustomer); + } + if ($search_refproject) { + $param .= '&search_refproject='.urlencode($search_refproject); + } + if ($search_societe) { + $param .= '&search_societe='.urlencode($search_societe); + } + if ($search_societe_alias) { + $param .= '&search_societe_alias='.urlencode($search_societe_alias); + } + if ($search_user > 0) { + $param .= '&search_user='.urlencode($search_user); + } + if ($search_sale > 0) { + $param .= '&search_sale='.urlencode($search_sale); + } + if ($search_montant_ht) { + $param .= '&search_montant_ht='.urlencode($search_montant_ht); + } + 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); + } + if ($search_multicurrency_montant_vat != '') { + $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); + } + if ($search_multicurrency_montant_ttc != '') { + $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); + } + if ($search_login) { + $param .= '&search_login='.urlencode($search_login); + } + if ($search_town) { + $param .= '&search_town='.urlencode($search_town); + } + if ($search_zip) { + $param .= '&search_zip='.urlencode($search_zip); + } + if ($socid > 0) { + $param .= '&socid='.urlencode($socid); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_categ_cus > 0) { + $param .= '&search_categ_cus='.urlencode($search_categ_cus); + } + if ($search_product_category != '') { + $param .= '&search_product_category='.$search_product_category; + } + if ($search_fk_cond_reglement > 0) { + $param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement; + } + if ($search_fk_shipping_method > 0) { + $param .= '&search_fk_shipping_method='.$search_fk_shipping_method; + } + if ($search_fk_input_reason > 0) { + $param .= '&search_fk_input_reason='.$search_fk_input_reason; + } + if ($search_fk_mode_reglement > 0) { + $param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement; + } + if ($search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.$search_type_thirdparty; + } + if ($search_town) { + $param .= '&search_town='.$search_town; + } + if ($search_zip) { + $param .= '&search_zip='.$search_zip; + } + if ($search_state) { + $param .= '&search_state='.$search_state; + } + if ($search_town) { + $param .= '&search_town='.$search_town; + } + if ($search_country) { + $param .= '&search_country='.$search_country; + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), - 'prevalidate'=>$langs->trans("Validate"), - 'presign'=>$langs->trans("Sign"), + 'generate_doc'=>img_picto('', 'pdf').' '.$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf').' '.$langs->trans("PDFMerge"), + ); - if ($user->rights->propal->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); - if ($user->rights->propal->cloturer) $arrayofmassactions['closed'] = $langs->trans("Close"); - if (in_array($massaction, array('presend', 'predelete', 'closed'))) $arrayofmassactions = array(); + if ($permissiontosendbymail) { + $arrayofmassactions['presend']=img_picto('', 'email').' '.$langs->trans("SendByMail"); + } + if ($permissiontovalidate) { + $arrayofmassactions['prevalidate']=img_picto('', 'check').' '.$langs->trans("Validate"); + } + if ($permissiontoclose) { + $arrayofmassactions['presign']=img_picto('', 'propal').' '.$langs->trans("Sign"); + $arrayofmassactions['nopresign']=img_picto('', 'propal').' '.$langs->trans("NoSign"); + $arrayofmassactions['setbilled'] =img_picto('', 'bill').' '.$langs->trans("ClassifyBilled"); + } + if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete').' '.$langs->trans("Delete"); + } + + if (in_array($massaction, array('presend', 'predelete', 'closed'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $url = DOL_URL_ROOT.'/comm/propal/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->rights->propal->creer); // Fields title search print '
    '; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -568,19 +875,22 @@ if ($resql) $trackid = 'pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($massaction == 'prevalidate') - { + if ($massaction == 'prevalidate') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassValidation"), $langs->trans("ConfirmMassValidationQuestion"), "validate", null, '', 0, 200, 500, 1); } - if ($massaction == 'presign') - { + if ($massaction == 'presign') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassSignature"), $langs->trans("ConfirmMassSignatureQuestion"), "sign", null, '', 0, 200, 500, 1); } - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($massaction == 'nopresign') { + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassNoSignature"), $langs->trans("ConfirmMassNoSignatureQuestion"), "nosign", null, '', 0, 200, 500, 1); + } + + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } @@ -589,47 +899,53 @@ if ($resql) $moreforfilter = ''; // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { + if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); $moreforfilter .= '
    '; } // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { + if ($user->rights->societe->client->voir || $socid) { $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '
    '; } // If the user can view products - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($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 .= '
    '; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; + $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '
    '; } - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) - { + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': '; - $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1); + $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle); + $moreforfilter .= '
    '; + } + if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $moreforfilter .= '
    '; + $tmptitle = $langs->trans('Warehouse'); + $moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', $tmptitle, 0, 0, $tmptitle); $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -643,63 +959,63 @@ if ($resql) print '
    '."\n"; print ''; - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print ''; } - if (!empty($arrayfields['p.ref_client']['checked'])) - { + if (!empty($arrayfields['p.ref_client']['checked'])) { print ''; } - if (!empty($arrayfields['pr.ref']['checked'])) - { + if (!empty($arrayfields['pr.ref']['checked'])) { print ''; } - if (!empty($arrayfields['pr.title']['checked'])) - { + if (!empty($arrayfields['pr.title']['checked'])) { print ''; } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print ''; } - if (!empty($arrayfields['s.town']['checked'])) print ''; - if (!empty($arrayfields['s.zip']['checked'])) print ''; + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + } + if (!empty($arrayfields['s.town']['checked'])) { + print ''; + } + if (!empty($arrayfields['s.zip']['checked'])) { + print ''; + } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print ''; } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; } // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print ''; } // Date - if (!empty($arrayfields['p.date']['checked'])) - { + if (!empty($arrayfields['p.date']['checked'])) { print ''; } // Date end - if (!empty($arrayfields['p.fin_validite']['checked'])) - { + if (!empty($arrayfields['p.fin_validite']['checked'])) { print ''; } // Date delivery - if (!empty($arrayfields['p.date_livraison']['checked'])) - { + if (!empty($arrayfields['p.date_livraison']['checked'])) { print ''; } // Availability - if (!empty($arrayfields['ava.rowid']['checked'])) - { + if (!empty($arrayfields['ava.rowid']['checked'])) { print ''; } - if (!empty($arrayfields['p.total_ht']['checked'])) - { + // Shipping Method + if (!empty($arrayfields['p.fk_shipping_method']['checked'])) { + print ''; + } + // Source - Input reason + if (!empty($arrayfields['p.fk_input_reason']['checked'])) { + print ''; + } + // Payment term + if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { + print ''; + } + // Payment mode + if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { + print ''; + } + if (!empty($arrayfields['p.total_ht']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.total_vat']['checked'])) - { + if (!empty($arrayfields['p.total_tva']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.total_ttc']['checked'])) - { + if (!empty($arrayfields['p.total_ttc']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) - { + if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) { // Amount invoiced print ''; } - if (!empty($arrayfields['p.total_invoiced']['checked'])) - { + if (!empty($arrayfields['p.total_invoiced']['checked'])) { // Amount invoiced print ''; } - if (!empty($arrayfields['p.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_code']['checked'])) { // Currency print ''; } - if (!empty($arrayfields['p.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_tx']['checked'])) { // Currency rate print ''; } - if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.multicurrency_total_vat']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_total_tva']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) { // Amount invoiced print ''; } - if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) { // Amount invoiced print ''; } - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { // Author print ''; } - if (!empty($arrayfields['sale_representative']['checked'])) - { + if (!empty($arrayfields['sale_representative']['checked'])) { print ''; } // Extra fields @@ -840,38 +1163,32 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { + if (!empty($arrayfields['p.datec']['checked'])) { print ''; } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { + if (!empty($arrayfields['p.tms']['checked'])) { print ''; } // Date cloture - if (!empty($arrayfields['p.date_cloture']['checked'])) - { + if (!empty($arrayfields['p.date_cloture']['checked'])) { print ''; } - if (!empty($arrayfields['p.note_public']['checked'])) - { + if (!empty($arrayfields['p.note_public']['checked'])) { // Note public print ''; } - if (!empty($arrayfields['p.note_private']['checked'])) - { + if (!empty($arrayfields['p.note_private']['checked'])) { // Note private print ''; } // Status - if (!empty($arrayfields['p.fk_statut']['checked'])) - { + if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; @@ -887,46 +1204,129 @@ if ($resql) // Fields title print ''; - 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.ref_client']['checked'])) print_liste_field_titre($arrayfields['p.ref_client']['label'], $_SERVER["PHP_SELF"], 'p.ref_client', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['pr.title']['checked'])) print_liste_field_titre($arrayfields['pr.title']['label'], $_SERVER["PHP_SELF"], 'pr.title', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['p.date']['checked'])) print_liste_field_titre($arrayfields['p.date']['label'], $_SERVER["PHP_SELF"], 'p.datep', '', $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'], $_SERVER["PHP_SELF"], 'dfv', '', $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['p.date_livraison']['checked'])) print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'ddelivery', '', $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['ava.rowid']['checked'])) print_liste_field_titre($arrayfields['ava.rowid']['label'], $_SERVER["PHP_SELF"], 'availability', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'], $_SERVER["PHP_SELF"], 'p.total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'], $_SERVER["PHP_SELF"], 'p.tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'], $_SERVER["PHP_SELF"], 'p.total', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) print_liste_field_titre($arrayfields['p.total_ht_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.total_invoiced']['checked'])) print_liste_field_titre($arrayfields['p.total_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_code', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_tx', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_total_ht_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) print_liste_field_titre($arrayfields['p.multicurrency_total_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_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.ref_client']['checked'])) { + print_liste_field_titre($arrayfields['p.ref_client']['label'], $_SERVER["PHP_SELF"], 'p.ref_client', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['pr.ref']['checked'])) { + print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['pr.title']['checked'])) { + print_liste_field_titre($arrayfields['pr.title']['label'], $_SERVER["PHP_SELF"], 'pr.title', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['country.code_iso']['checked'])) { + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['typent.code']['checked'])) { + print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.date']['checked'])) { + print_liste_field_titre($arrayfields['p.date']['label'], $_SERVER["PHP_SELF"], 'p.datep', '', $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.fin_validite']['checked'])) { + print_liste_field_titre($arrayfields['p.fin_validite']['label'], $_SERVER["PHP_SELF"], 'dfv', '', $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.date_livraison']['checked'])) { + print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'ddelivery', '', $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['ava.rowid']['checked'])) { + print_liste_field_titre($arrayfields['ava.rowid']['label'], $_SERVER["PHP_SELF"], 'availability', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.fk_shipping_method']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_shipping_method']['label'], $_SERVER["PHP_SELF"], "p.fk_shipping_method", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.fk_input_reason']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_input_reason']['label'], $_SERVER["PHP_SELF"], "p.fk_input_reason", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_cond_reglement']['label'], $_SERVER["PHP_SELF"], "p.fk_cond_reglement", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "p.fk_mode_reglement", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['p.total_ht']['label'], $_SERVER["PHP_SELF"], 'p.total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.total_tva']['checked'])) { + print_liste_field_titre($arrayfields['p.total_tva']['label'], $_SERVER["PHP_SELF"], 'p.total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['p.total_ttc']['label'], $_SERVER["PHP_SELF"], 'p.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) { + print_liste_field_titre($arrayfields['p.total_ht_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.total_invoiced']['checked'])) { + print_liste_field_titre($arrayfields['p.total_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_code']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_code', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_tx']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_tx', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_total_tva']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_total_tva']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'p.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_total_ht_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) { + print_liste_field_titre($arrayfields['p.multicurrency_total_invoiced']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['sale_representative']['checked'])) { + print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$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['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (!empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (!empty($arrayfields['p.date_cloture']['checked'])) print_liste_field_titre($arrayfields['p.date_cloture']['label'], $_SERVER["PHP_SELF"], "p.date_cloture", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (!empty($arrayfields['p.note_public']['checked'])) print_liste_field_titre($arrayfields['p.note_public']['label'], $_SERVER["PHP_SELF"], "p.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['p.note_private']['checked'])) print_liste_field_titre($arrayfields['p.note_private']['label'], $_SERVER["PHP_SELF"], "p.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder); + if (!empty($arrayfields['p.datec']['checked'])) { + print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.tms']['checked'])) { + print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.date_cloture']['checked'])) { + print_liste_field_titre($arrayfields['p.date_cloture']['label'], $_SERVER["PHP_SELF"], "p.date_cloture", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } + if (!empty($arrayfields['p.note_public']['checked'])) { + print_liste_field_titre($arrayfields['p.note_public']['label'], $_SERVER["PHP_SELF"], "p.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + } + if (!empty($arrayfields['p.note_private']['checked'])) { + print_liste_field_titre($arrayfields['p.note_private']['label'], $_SERVER["PHP_SELF"], "p.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + } + if (!empty($arrayfields['p.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print ''."\n"; @@ -935,8 +1335,7 @@ if ($resql) $totalarray = array(); $typenArray = null; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $objectstatic->id = $obj->rowid; @@ -964,14 +1363,14 @@ if ($resql) $TInvoiceData = $objectstatic->InvoiceArrayList($obj->rowid); - if (!empty($TInvoiceData)) - { - foreach ($TInvoiceData as $invoiceData) - { + if (!empty($TInvoiceData)) { + foreach ($TInvoiceData as $invoiceData) { $invoice = new Facture($db); $invoice->fetch($invoiceData->facid); - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $invoice->type == Facture::TYPE_DEPOSIT) continue; + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $invoice->type == Facture::TYPE_DEPOSIT) { + continue; + } $totalInvoicedHT += $invoice->total_ht; $totalInvoicedTTC += $invoice->total_ttc; @@ -982,8 +1381,7 @@ if ($resql) print ''; - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.ref_client']['checked'])) - { + if (!empty($arrayfields['p.ref_client']['checked'])) { // Customer ref print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['pr.ref']['checked'])) - { + if (!empty($arrayfields['pr.ref']['checked'])) { // Project ref print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['pr.title']['checked'])) - { + if (!empty($arrayfields['pr.title']['checked'])) { // Project label print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Thirdparty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Alias + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.town']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { - if (!is_array($typenArray) || empty($typenArray)) $typenArray = $formcompany->typent_array(1); + if (!empty($arrayfields['typent.code']['checked'])) { + if (!is_array($typenArray) || empty($typenArray)) { + $typenArray = $formcompany->typent_array(1); + } print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date proposal - if (!empty($arrayfields['p.date']['checked'])) - { + if (!empty($arrayfields['p.date']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date end validity - if (!empty($arrayfields['p.fin_validite']['checked'])) - { - if ($obj->dfv) - { + if (!empty($arrayfields['p.fin_validite']['checked'])) { + if ($obj->dfv) { print ''; } else { print ''; } - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date delivery - if (!empty($arrayfields['p.date_livraison']['checked'])) - { - if ($obj->ddelivery) - { + if (!empty($arrayfields['p.date_livraison']['checked'])) { + if ($obj->ddelivery) { print ''; } else { print ''; } - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Availability - if (!empty($arrayfields['ava.rowid']['checked'])) - { + if (!empty($arrayfields['ava.rowid']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Shipping Method + if (!empty($arrayfields['p.fk_shipping_method']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Source - input reason + if (!empty($arrayfields['p.fk_input_reason']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Payment terms + if (!empty($arrayfields['p.fk_cond_reglement']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Payment mode + if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } - // Amount HT - if (!empty($arrayfields['p.total_ht']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht'; + if (!empty($arrayfields['p.total_ht']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht'; + } $totalarray['val']['p.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['p.total_vat']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_vat'; - $totalarray['val']['p.total_vat'] += $obj->total_vat; + if (!empty($arrayfields['p.total_tva']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.total_tva'; + } + $totalarray['val']['p.total_tva'] += $obj->total_tva; } // Amount TTC - if (!empty($arrayfields['p.total_ttc']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ttc'; + if (!empty($arrayfields['p.total_ttc']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ttc'; + } $totalarray['val']['p.total_ttc'] += $obj->total_ttc; } - // Amount invoiced - if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced'; + // Amount invoiced HT + if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced'; + } $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT; } - // Amount invoiced - if (!empty($arrayfields['p.total_invoiced']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced'; + // Amount invoiced TTC + if (!empty($arrayfields['p.total_invoiced']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced'; + } $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC; } - // Currency - if (!empty($arrayfields['p.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_code']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency rate - if (!empty($arrayfields['p.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['p.multicurrency_tx']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.multicurrency_total_ht']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount VAT - if (!empty($arrayfields['p.multicurrency_total_vat']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.multicurrency_total_tva']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount TTC - if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.multicurrency_total_ttc']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount invoiced - if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount invoiced - if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; // Author - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['sale_representative']['checked'])) - { + if (!empty($arrayfields['sale_representative']['checked'])) { // Sales representatives print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -1283,61 +1773,70 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { + if (!empty($arrayfields['p.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { + if (!empty($arrayfields['p.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date cloture - if (!empty($arrayfields['p.date_cloture']['checked'])) - { + if (!empty($arrayfields['p.date_cloture']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note public - if (!empty($arrayfields['p.note_public']['checked'])) - { + if (!empty($arrayfields['p.note_public']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note private - if (!empty($arrayfields['p.note_private']['checked'])) - { + if (!empty($arrayfields['p.note_private']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['p.fk_statut']['checked'])) - { + if (!empty($arrayfields['p.fk_statut']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; @@ -1359,7 +1858,9 @@ if ($resql) print ''."\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 06be1179fb1..0d880219bef 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -40,11 +40,19 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'propale', $id, 'propal'); +$now = dol_now(); $object = new Propal($db); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} + +// Security check +if ($user->socid > 0) { + $socid = $user->socid; + $object->id = $user->socid; +} +restrictedArea($user, 'propal', $object->id, 'propal'); /* @@ -61,87 +69,78 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, * View */ -llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'); - $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ - if ($mesg) print $mesg; +$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; - $now = dol_now(); +llxHeader('', $langs->trans('Proposal'), $help_url); - if ($object->fetch($id, $ref) > 0) - { - if ($object->fetch_thirdparty() > 0) - { - $head = propal_prepare_head($object); - print dol_get_fiche_head($head, 'note', $langs->trans('Proposal'), -1, 'propal'); +if ($object->id > 0) { + if ($object->fetch_thirdparty() > 0) { + $head = propal_prepare_head($object); + print dol_get_fiche_head($head, 'note', $langs->trans('Proposal'), -1, 'propal'); - $cssclass = 'titlefield'; - //if ($action == 'editnote_public') $cssclass='titlefieldcreate'; - //if ($action == 'editnote_private') $cssclass='titlefieldcreate'; + $cssclass = 'titlefield'; + //if ($action == 'editnote_public') $cssclass='titlefieldcreate'; + //if ($action == 'editnote_private') $cssclass='titlefieldcreate'; - // Proposal card + // Proposal card - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - $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').' : '.$object->thirdparty->getNomUrl(1); - // Project - if (!empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->propal->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); - } + $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').' : '.$object->thirdparty->getNomUrl(1); + // Project + if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
    '.$langs->trans('Project').' '; + if ($user->rights->propal->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 { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } else { - $morehtmlref .= ''; - } + $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); - - print '
    '; - print '
    '; - - $cssclass = "titlefield"; - include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - - print '
    '; - - print dol_get_fiche_end(); } + $morehtmlref .= '
    '; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
    '; + print '
    '; + + $cssclass = "titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '
    '; + + print dol_get_fiche_end(); } } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 34feb8bbe44..c0d92908aab 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -38,8 +38,6 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer'; -if ($mode == 'customer' && !$user->rights->propale->lire) accessforbidden(); -if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) accessforbidden(); $object_status = GETPOST('object_status', 'intcomma'); $typent_id = GETPOST('typent_id', 'int'); @@ -48,8 +46,7 @@ $categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -63,6 +60,13 @@ $endyear = $year; // Load translation files required by the page $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal')); +if ($mode == 'customer' && !$user->rights->propale->lire) { + accessforbidden(); +} +if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) { + accessforbidden(); +} + /* * View @@ -75,16 +79,14 @@ $formother = new FormOther($db); $langs->loadLangs(array('propal', 'other', 'companies')); -if ($mode == 'customer') -{ +if ($mode == 'customer') { $picto = 'propal'; $title = $langs->trans("ProposalsStatistics"); - $dir = $conf->propale->dir_temp; + $dir = $conf->propal->dir_temp; $cat_type = Categorie::TYPE_CUSTOMER; $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); } -if ($mode == 'supplier') -{ +if ($mode == 'supplier') { $picto = 'supplier_proposal'; $title = $langs->trans("ProposalsStatisticsSuppliers"); $dir = $conf->supplier_proposal->dir_temp; @@ -101,15 +103,16 @@ dol_mkdir($dir); $stats = new PropaleStats($db, $socid, ($userid > 0 ? $userid : 0), $mode, ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); -if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND p.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; +if ($object_status != '' && $object_status >= 0) { + $stats->where .= ' AND p.fk_statut IN ('.$db->sanitize($object_status).')'; +} // Build graphic number of object $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/proposalsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnbinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -119,12 +122,11 @@ if (!$user->rights->societe->client->voir || $user->socid) $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); - $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + $i = $startyear; + $legend = array(); + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -146,8 +148,7 @@ if (!$mesg) $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, 0); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/proposalsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsamountinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -157,12 +158,11 @@ if (!$user->rights->societe->client->voir || $user->socid) $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); - $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + $i = $startyear; + $legend = array(); + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -183,25 +183,31 @@ if (!$mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); $fileurl_avg = ''; -if (!$user->rights->societe->client->voir || $user->socid) -{ +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'; + 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 { $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'; + 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'; + } } $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); - $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + $i = $startyear; + $legend = array(); + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -228,7 +234,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; @@ -263,8 +271,10 @@ print '
    '; // ThirdParty Type print '
    '; // Category print ''; // Year print ''; @@ -304,11 +318,9 @@ print ''; print ''; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { // If we have empty year + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; print ''; @@ -341,7 +353,9 @@ print '
    '; // Show graphs print '
    '; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; + print ''; + print ''; print ''; print ''; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print ''; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print ajax_combobox('search_type_thirdparty'); print ''; print '
    '; print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -710,8 +1026,7 @@ if ($resql) print '
    '; print '
    '; print $form->selectDate($search_dateend_start ? $search_dateend_start : -1, 'search_dateend_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -722,8 +1037,7 @@ if ($resql) print '
    '; print '
    '; print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -734,102 +1048,111 @@ if ($resql) print '
    '; $form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1); print ajax_combobox('search_availability'); print ''; + $form->selectShippingMethod($search_fk_shipping_method, 'search_fk_shipping_method', '', 1, '', 1); + print ''; + $form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, 'maxwidth125', 1); + print ''; + $form->select_conditions_paiements($search_fk_cond_reglement, 'search_fk_cond_reglement', -1, 1, 1); + print ''; + $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut'); print '
    '; print ''; @@ -993,9 +1391,10 @@ if ($resql) print ''; // Warning $warnornote = ''; - if ($obj->status == Propal::STATUS_VALIDATED && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) $warnornote .= img_warning($langs->trans("Late")); - if ($warnornote) - { + if ($obj->status == Propal::STATUS_VALIDATED && $db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) { + $warnornote .= img_warning($langs->trans("Late")); + } + if ($warnornote) { print ''; @@ -1009,250 +1408,334 @@ if ($resql) print '
    '; print $warnornote; print '
    '; print "
    '; print $obj->ref_client; print ''; if ($obj->project_id > 0) { print $projectstatic->getNomUrl(1); } print ''; if ($obj->project_id > 0) { print $projectstatic->title; } print ''; print $companystatic->getNomUrl(1, 'customer'); print ''; + print $obj->alias; + print ''; print $obj->town; print ''; print $obj->zip; print '".$obj->state_name."'; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print ''; print $typenArray[$obj->typent_code]; print ''; print dol_print_date($db->jdate($obj->dp), 'day'); print "'.dol_print_date($db->jdate($obj->dfv), 'day'); print ' '.dol_print_date($db->jdate($obj->ddelivery), 'day'); print ' '; $form->form_availability('', $obj->availability, 'none', 1); print ''; + $form->formSelectShippingMethod('', $obj->fk_shipping_method, 'none', 1); + print ''; + if ($obj->fk_input_reason > 0) { + print $form->cache_demand_reason[$obj->fk_input_reason]['label']; + } + print ''; + $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none'); + 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_tva)."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'.price($totalInvoicedHT)."'.price($totalInvoicedHT)."'.price($totalInvoicedTTC)."'.price($totalInvoicedTTC)."'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'; $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_tva)."'.price($obj->multicurrency_total_ttc)."'.price($obj->multicurrency_total_ttc)."'.price($multicurrency_totalInvoicedHT)."'.price($multicurrency_totalInvoicedHT)."'.price($multicurrency_totalInvoicedTTC)."'.price($multicurrency_totalInvoicedTTC)."'; - if ($userstatic->id) print $userstatic->getLoginUrl(1); + if ($userstatic->id) { + print $userstatic->getLoginUrl(1); + } print "'; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $listsalesrepresentatives = $companystatic->getSalesRepresentatives($user); - if ($listsalesrepresentatives < 0) dol_print_error($db); + if ($listsalesrepresentatives < 0) { + dol_print_error($db); + } $nbofsalesrepresentative = count($listsalesrepresentatives); - if ($nbofsalesrepresentative > 3) // We print only number - { + if ($nbofsalesrepresentative > 6) { + // We print only number print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -1260,20 +1743,27 @@ if ($resql) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; - + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; //print '
    ': - print $userstatic->getNomUrl(-2); + print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2); $j++; - if ($j < $nbofsalesrepresentative) print ' '; + if ($j < $nbofsalesrepresentative) { + print ' '; + } //print '
    '; } } //else print $langs->trans("NoSalesRepresentativeAffected"); } else { - print ' '; + print ' '; } print '
    '; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_cloture), 'dayhour', 'tzuser'); print ''; print dol_escape_htmltag($obj->note_public); print ''; print dol_escape_htmltag($obj->note_private); print ''.$objectstatic->getLibStatut(5).''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '.$langs->trans("ThirdPartyType").''; $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. - print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); - if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1); +if ($user->admin) { + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +} print '
    '.$cat_label.''; @@ -280,8 +290,12 @@ print '
    '; print '
    '.$langs->trans("Year").''; - if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; - if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '
    %
    '; print ''; print "\n"; } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { print ''; print ''; print ''; diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index 7ae61362f09..8883e0af6f3 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -30,12 +30,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; // Load translation files required by the page $langs->load("propal"); - -if ($user->socid > 0) -{ +if ($user->socid > 0) { $socid = $user->socid; } +// Security check +$socid = GETPOST('socid', 'int'); +if ($user->socid) { + $action = ''; + $socid = $user->socid; +} +$result = restrictedArea($user, 'propal', $socid, ''); + /* @@ -53,8 +59,7 @@ print load_fiche_titre($langs->trans("ProspectionArea")); print '
    '; -if (!empty($conf->propal->enabled)) -{ +if (!empty($conf->propal->enabled)) { $var = false; print '
    '; print ''; @@ -75,26 +80,27 @@ if (!empty($conf->propal->enabled)) $sql = "SELECT count(*) as cc, st.libelle, st.picto, st.id"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st "; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.client IN (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 (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= " GROUP BY st.id"; $sql .= " ORDER BY st.id"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + 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/comm/propal/tpl/index.html b/htdocs/comm/propal/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 300b35cc868..23c1a459c74 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -44,16 +44,16 @@ $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1) $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } print '
    '.$langs->trans("Proposal"); - if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) - { + if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; print ' '; } @@ -71,8 +71,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) print ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'
    '.$langs->trans("Total").'
    '; print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print ''; -print '
    '.$langs->trans("ProspectsByStatus").'
    '; @@ -112,31 +118,31 @@ if ($resql) /* * Liste des propal brouillons */ -if (!empty($conf->propal->enabled) && $user->rights->propale->lire) -{ +if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_statut = 0"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $total = 0; $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { print ''; print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; // Ref - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print ''; } // Ref customer - if (!empty($arrayfields['c.ref_client']['checked'])) - { + if (!empty($arrayfields['c.ref_client']['checked'])) { print ''; } // Project ref - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print ''; } // Project title - if (!empty($arrayfields['p.title']['checked'])) - { + if (!empty($arrayfields['p.title']['checked'])) { print ''; } // Thirpdarty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print ''; } + // Alias + if (!empty($arrayfields['s.name_alias']['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'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print ''; } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; } // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print ''; } // Date order - if (!empty($arrayfields['c.date_commande']['checked'])) - { + if (!empty($arrayfields['c.date_commande']['checked'])) { print ''; } - if (!empty($arrayfields['c.date_delivery']['checked'])) - { + if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; } - if (!empty($arrayfields['c.total_ht']['checked'])) - { + // Shipping Method + if (!empty($arrayfields['c.fk_shipping_method']['checked'])) { + print ''; + } + // Payment term + if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { + print ''; + } + // Payment mode + if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { + print ''; + } + if (!empty($arrayfields['c.total_ht']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['c.total_vat']['checked'])) - { + if (!empty($arrayfields['c.total_vat']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['c.total_ttc']['checked'])) - { + if (!empty($arrayfields['c.total_ttc']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['c.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_code']['checked'])) { // Currency print ''; } - if (!empty($arrayfields['c.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_tx']['checked'])) { // Currency rate print ''; } - if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { // Amount VAT print ''; } - if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) { // Amount print ''; } - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { // Author print ''; } // Date modification - if (!empty($arrayfields['c.tms']['checked'])) - { + if (!empty($arrayfields['c.tms']['checked'])) { print ''; } // Date cloture - if (!empty($arrayfields['c.date_cloture']['checked'])) - { + if (!empty($arrayfields['c.date_cloture']['checked'])) { print ''; } // Note public - if (!empty($arrayfields['c.note_public']['checked'])) - { + if (!empty($arrayfields['c.note_public']['checked'])) { print ''; } // Note private - if (!empty($arrayfields['c.note_private']['checked'])) - { + if (!empty($arrayfields['c.note_private']['checked'])) { print ''; } // Shippable - if (!empty($arrayfields['shippable']['checked'])) - { + if (!empty($arrayfields['shippable']['checked'])) { print ''; } // Status billed - if (!empty($arrayfields['c.facture']['checked'])) - { + if (!empty($arrayfields['c.facture']['checked'])) { print ''; } // Status - if (!empty($arrayfields['c.fk_statut']['checked'])) - { + if (!empty($arrayfields['c.fk_statut']['checked'])) { print ''; - if (!empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['c.ref_client']['checked'])) print_liste_field_titre($arrayfields['c.ref_client']['label'], $_SERVER["PHP_SELF"], 'c.ref_client', '', $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.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['c.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['c.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_code', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['c.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['c.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_tx', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['c.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['c.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); + if (!empty($arrayfields['c.ref']['checked'])) { + print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.ref_client']['checked'])) { + print_liste_field_titre($arrayfields['c.ref_client']['label'], $_SERVER["PHP_SELF"], 'c.ref_client', '', $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.title']['checked'])) { + print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['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['c.date_commande']['checked'])) { + print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['c.date_delivery']['checked'])) { + print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['c.fk_shipping_method']['checked'])) { + print_liste_field_titre($arrayfields['c.fk_shipping_method']['label'], $_SERVER["PHP_SELF"], "c.fk_shipping_method", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { + print_liste_field_titre($arrayfields['c.fk_cond_reglement']['label'], $_SERVER["PHP_SELF"], "c.fk_cond_reglement", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { + print_liste_field_titre($arrayfields['c.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "c.fk_mode_reglement", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['c.total_vat']['checked'])) { + print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.total_tva', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['c.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['c.multicurrency_code']['checked'])) { + print_liste_field_titre($arrayfields['c.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_code', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.multicurrency_tx']['checked'])) { + print_liste_field_titre($arrayfields['c.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_tx', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) { + print_liste_field_titre($arrayfields['c.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { + print_liste_field_titre($arrayfields['c.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['c.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'c.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -904,14 +1185,30 @@ if ($resql) $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (!empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, '', $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['shippable']['checked'])) print_liste_field_titre($arrayfields['shippable']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, '', $sortfield, $sortorder, 'center '); - 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, 'center '); + 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['shippable']['checked'])) { + print_liste_field_titre($arrayfields['shippable']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['c.facture']['checked'])) { + print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, '', $sortfield, $sortorder, 'center '); + } + 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, 'center '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); print ''."\n"; @@ -926,8 +1223,7 @@ if ($resql) $userstatic = new User($db); $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $notshippable = 0; @@ -966,8 +1262,7 @@ if ($resql) print ''; // Ref - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref customer - if (!empty($arrayfields['c.ref_client']['checked'])) - { + if (!empty($arrayfields['c.ref_client']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project ref - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project label - if (!empty($arrayfields['p.title']['checked'])) - { + if (!empty($arrayfields['p.title']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.name_alias']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Town + if (!empty($arrayfields['s.town']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Order date - if (!empty($arrayfields['c.date_commande']['checked'])) - { + if (!empty($arrayfields['c.date_commande']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Plannned date of delivery - if (!empty($arrayfields['c.date_delivery']['checked'])) - { + if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + //Shipping Method + if (!empty($arrayfields['c.fk_shipping_method']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Payment terms + if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Payment mode + if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['c.total_ht']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'c.total_ht'; + if (!empty($arrayfields['c.total_ht']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'c.total_ht'; + } $totalarray['val']['c.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['c.total_vat']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'c.total_tva'; + if (!empty($arrayfields['c.total_vat']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'c.total_tva'; + } $totalarray['val']['c.total_tva'] += $obj->total_tva; } // Amount TTC - if (!empty($arrayfields['c.total_ttc']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'c.total_ttc'; + if (!empty($arrayfields['c.total_ttc']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'c.total_ttc'; + } $totalarray['val']['c.total_ttc'] += $obj->total_ttc; } // Currency - if (!empty($arrayfields['c.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_code']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency rate - if (!empty($arrayfields['c.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['c.multicurrency_tx']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount VAT - if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount TTC - if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; // Author - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -1174,53 +1533,57 @@ if ($resql) print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['c.datec']['checked'])) - { + if (!empty($arrayfields['c.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['c.tms']['checked'])) - { + if (!empty($arrayfields['c.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date cloture - if (!empty($arrayfields['c.date_cloture']['checked'])) - { + if (!empty($arrayfields['c.date_cloture']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note public - if (!empty($arrayfields['c.note_public']['checked'])) - { + if (!empty($arrayfields['c.note_public']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note private - if (!empty($arrayfields['c.note_private']['checked'])) - { + if (!empty($arrayfields['c.note_private']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Show shippable Icon (this creates subloops, so may be slow) - if (!empty($arrayfields['shippable']['checked'])) - { + if (!empty($arrayfields['shippable']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - // Status - if (!empty($arrayfields['c.fk_statut']['checked'])) - { + if (!empty($arrayfields['c.fk_statut']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; @@ -1367,7 +1731,9 @@ if ($resql) print ''."\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 0cf0da709da..0805bb8d1d9 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -42,13 +42,14 @@ $action = GETPOST('action', 'aZ09'); // Security check $socid = 0; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $id, ''); $object = new Commande($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); exit; } @@ -71,8 +72,7 @@ llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients| $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = commande_prepare_head($object); @@ -91,12 +91,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref .= ' : '; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 6e7c8ef36fb..090d07baf81 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -39,8 +39,12 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer'; -if ($mode == 'customer' && !$user->rights->commande->lire) accessforbidden(); -if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) accessforbidden(); +if ($mode == 'customer' && !$user->rights->commande->lire) { + accessforbidden(); +} +if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) { + accessforbidden(); +} $object_status = GETPOST('object_status', 'intcomma'); $typent_id = GETPOST('typent_id', 'int'); @@ -49,8 +53,7 @@ $categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -78,8 +81,7 @@ $picto = 'order'; $title = $langs->trans("OrdersStatistics"); $dir = $conf->commande->dir_temp; -if ($mode == 'supplier') -{ +if ($mode == 'supplier') { $picto = 'supplier_order'; $title = $langs->trans("OrdersStatisticsSuppliers"); $dir = $conf->fournisseur->commande->dir_temp; @@ -92,13 +94,15 @@ print load_fiche_titre($title, '', $picto); 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->sanitize($db->escape($object_status)).')'; +if ($mode == 'customer') { + if ($object_status != '' && $object_status >= -1) { + $stats->where .= ' AND c.fk_statut IN ('.$db->sanitize($object_status).')'; + } } -if ($mode == 'supplier') -{ - if ($object_status != '' && $object_status >= 0) $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->sanitize($object_status).')'; + } } @@ -109,25 +113,30 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +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'; + 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 { $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'; + 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'; + } } $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -150,25 +159,30 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +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'; + 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 { $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'; + 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'; + } } $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -189,25 +203,30 @@ if (!$mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) -{ +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'; + 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 { $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'; + 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'; + } } $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -235,7 +254,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); @@ -244,8 +265,12 @@ $head[$h][1] = $langs->trans("ByMonthYear"); $head[$h][2] = 'byyear'; $h++; -if ($mode == 'customer') $type = 'order_stats'; -if ($mode == 'supplier') $type = 'supplier_order_stats'; +if ($mode == 'customer') { + $type = 'order_stats'; +} +if ($mode == 'supplier') { + $type = 'supplier_order_stats'; +} complete_head_from_modules($conf, $langs, null, $head, $h, $type); @@ -264,26 +289,30 @@ print '
    '.$langs->trans("ProposalsDraft").'
    '; @@ -164,41 +170,45 @@ print '
    '; /* * Actions commerciales a faire */ -if (!empty($conf->agenda->enabled)) show_array_actions_to_do(10); +if (!empty($conf->agenda->enabled)) { + show_array_actions_to_do(10); +} /* * Dernieres propales ouvertes */ -if (!empty($conf->propal->enabled) && $user->rights->propale->lire) -{ +if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,"; - $sql .= " p.rowid as propalid, p.total as total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid"; + $sql .= " p.rowid as propalid, p.total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; $sql .= " AND p.fk_statut = 1"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - 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; + 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 = ".((int) $socid); + } $sql .= " ORDER BY p.rowid DESC"; $sql .= $db->plimit(5, 0); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $total = 0; $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '"; } print "
    '.$langs->trans("ProposalsOpened").'
    '; @@ -218,8 +228,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) $i++; $total += $obj->price; } - if ($total > 0) - { + if ($total > 0) { print '
    '.$langs->trans("Total")."".price($total)."

    "; @@ -235,25 +244,26 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) */ $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.fk_stcomm = 1"; $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 (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= " ORDER BY s.tms ASC"; $sql .= $db->plimit(15, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { print ''; print ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print ''; @@ -84,7 +83,7 @@ if ($socid > 0) print $langs->trans("FeatureNotYetAvailable"); } else { - dol_print_error($db); + dol_print_error($db); } // End of page diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index e93944d4fbe..f9cec9d11c1 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -33,8 +33,7 @@ $id = GETPOST("id", 'int'); $socid = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $socid = $user->socid; } @@ -45,14 +44,12 @@ $backtopage = GETPOST('backtopage', 'alpha'); * Actions */ -if (GETPOST('cancel', 'alpha') && !empty($backtopage)) -{ +if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { header("Location: ".$backtopage); exit; } -if (GETPOST('action', 'aZ09') == 'setremise') -{ +if (GETPOST('action', 'aZ09') == 'setremise') { $object = new Societe($db); $object->fetch($id); @@ -64,14 +61,12 @@ if (GETPOST('action', 'aZ09') == 'setremise') $result = $object->set_remise_client(price2num(GETPOST("remise")), GETPOST("note", "alphanohtml"), $user); } - if ($result > 0) - { - if (!empty($backtopage)) - { + if ($result > 0) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } else { - header("Location: remise.php?id=".$_GET["id"]); + header("Location: remise.php?id=".GETPOST("id", 'int')); exit; } } else { @@ -79,6 +74,12 @@ if (GETPOST('action', 'aZ09') == 'setremise') } } +// Security check +if ($user->socid > 0) { + $id = $user->socid; +} +$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); + /* * View @@ -88,14 +89,12 @@ $form = new Form($db); llxHeader(); - /********************************************************************************* * * Mode fiche * *********************************************************************************/ -if ($socid > 0) -{ +if ($socid > 0) { // On recupere les donnees societes par l'objet $object = new Societe($db); $object->fetch($socid); @@ -154,18 +153,17 @@ if ($socid > 0) /*if (! ($isCustomer && $isSupplier)) { - if ($isCustomer && ! $isSupplier) { - print ''; - } - if (! $isCustomer && $isSupplier) { - print ''; - } + if ($isCustomer && ! $isSupplier) { + print ''; + } + if (! $isCustomer && $isSupplier) { + print ''; + } }*/ print '
    '.$langs->trans("ProspectToContact").'
    '; diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php deleted file mode 100644 index 1acf2cbf218..00000000000 --- a/htdocs/comm/prospect/recap-prospect.php +++ /dev/null @@ -1,92 +0,0 @@ - - * Copyright (C) 2004-2010 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/comm/prospect/recap-prospect.php - * \ingroup societe - * \brief Page with prospect summary - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - -// Load translation files required by the page -$langs->loadLangs(array('companies', 'other')); -if (!empty($conf->facture->enabled)) $langs->load("bills"); - -// Security check -$socid = $_GET["socid"]; -if ($user->socid > 0) -{ - $action = ''; - $socid = $user->socid; -} - - - -/* - * View - */ - -llxHeader(); - -if ($socid > 0) -{ - $societe = new Societe($db); - $societe->fetch($socid); - - /* - * Affichage onglets - */ - $head = societe_prepare_head($societe); - - print dol_get_fiche_head($head, 'prospect', $langs->trans("ThirdParty"), 0, 'company'); - - - print "\n"; - print '
    '; - - print ''; - - // Name - print ''; - - // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - - print "
    '.$langs->trans("Thirdpary").''.$societe->getNomUrl(1).'
    '.$langs->trans("Prefix").''; - print ($societe->prefix_comm ? $societe->prefix_comm : ' '); - print '
    "; - - print "
    \n"; - - print ''; - - - print $langs->trans("FeatureNotYetAvailable"); -} else { - dol_print_error($db); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 254305a9443..ee32c0dd016 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -28,16 +28,17 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Load translation files required by the page $langs->load("companies"); -if (!empty($conf->facture->enabled)) $langs->load("bills"); - -// Security check -$socid = $_GET["socid"]; -if ($user->socid > 0) -{ - $action = ''; - $socid = $user->socid; +if (!empty($conf->facture->enabled)) { + $langs->load("bills"); } +// Security check +$socid = GETPOST("socid", 'int'); +if ($user->socid > 0) { + $action = ''; + $id = $user->socid; +} +$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); /* @@ -46,14 +47,13 @@ if ($user->socid > 0) llxHeader(); -if ($socid > 0) -{ +if ($socid > 0) { $societe = new Societe($db); $societe->fetch($socid); /* - * Affichage onglets - */ + * Affichage onglets + */ $head = societe_prepare_head($societe); print dol_get_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company'); @@ -68,8 +68,7 @@ if ($socid > 0) print '
    '.$langs->trans("ThirdParty").''.$societe->getNomUrl(1).'
    '.$langs->trans("Prefix").''; print ($societe->prefix_comm ? $societe->prefix_comm : ' '); print '
    '; - if ($isCustomer || $isSupplier) - { + if ($isCustomer || $isSupplier) { // Discount type print ''; print ''; print ''; print '
    '.$langs->trans('DiscountType').''; if ($isCustomer) { @@ -193,8 +191,7 @@ if ($socid > 0) print '
    '; print ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print '     '; print ''; } @@ -223,8 +220,7 @@ if ($socid > 0) $sql .= " ORDER BY rc.datec DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print ''; $tag = !$tag; print ''; @@ -234,11 +230,9 @@ if ($socid > 0) print ''; print ''; $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print ''; @@ -278,8 +272,7 @@ if ($socid > 0) $sql .= " ORDER BY rc.datec DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '
    '.$langs->trans("User").'
    '.dol_print_date($db->jdate($obj->dc), "dayhour").'
    '; $tag = !$tag; print ''; @@ -289,11 +282,9 @@ if ($socid > 0) print ''; print ''; $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print ''; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index e2900858c84..8f26d897389 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -24,6 +24,8 @@ * \brief Page to edit absolute discounts for a customer */ +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/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -40,24 +42,27 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Security check $socid = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); -if ($user->socid > 0) -{ +if ($user->socid > 0) { $socid = $user->socid; } +// Security check +if ($user->socid > 0) { + $id = $user->socid; +} +$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); + /* * Actions */ -if (GETPOST('cancel', 'alpha') && !empty($backtopage)) -{ +if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { header("Location: ".$backtopage); exit; } -if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') -{ +if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes' && $user->rights->societe->creer) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) @@ -70,23 +75,19 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') $remid = (GETPOST("remid", 'int') ? GETPOST("remid", 'int') : 0); $discount = new DiscountAbsolute($db); $res = $discount->fetch($remid); - if (!($res > 0)) - { + if (!($res > 0)) { $error++; setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors'); } - if (!$error && price2num($amount_ttc_1 + $amount_ttc_2) != $discount->amount_ttc) - { + if (!$error && price2num($amount_ttc_1 + $amount_ttc_2) != $discount->amount_ttc) { $error++; setEventMessages($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), null, 'errors'); } - if (!$error && $discount->fk_facture_line) - { + if (!$error && $discount->fk_facture_line) { $error++; setEventMessages($langs->trans("ErrorCantSplitAUsedDiscount"), null, 'errors'); } - if (!$error) - { + if (!$error) { $newdiscount1 = new DiscountAbsolute($db); $newdiscount2 = new DiscountAbsolute($db); $newdiscount1->fk_facture_source = $discount->fk_facture_source; @@ -101,8 +102,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') $newdiscount2->fk_invoice_supplier = $discount->fk_invoice_supplier; $newdiscount1->fk_invoice_supplier_line = $discount->fk_invoice_supplier_line; $newdiscount2->fk_invoice_supplier_line = $discount->fk_invoice_supplier_line; - if ($discount->description == '(CREDIT_NOTE)' || $discount->description == '(DEPOSIT)') - { + if ($discount->description == '(CREDIT_NOTE)' || $discount->description == '(DEPOSIT)') { $newdiscount1->description = $discount->description; $newdiscount2->description = $discount->description; } else { @@ -143,8 +143,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') $res = $discount->delete($user); $newid1 = $newdiscount1->create($user); $newid2 = $newdiscount2->create($user); - if ($res > 0 && $newid1 > 0 && $newid2 > 0) - { + if ($res > 0 && $newid1 > 0 && $newid2 > 0) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id.($backtopage ? '&backtopage='.urlencode($backtopage) : '')); // To avoid pb whith back exit; @@ -154,8 +153,7 @@ if ($action == 'confirm_split' && GETPOST("confirm", "alpha") == 'yes') } } -if ($action == 'setremise' && $user->rights->societe->creer) -{ +if ($action == 'setremise' && $user->rights->societe->creer) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) @@ -164,25 +162,20 @@ if ($action == 'setremise' && $user->rights->societe->creer) $tva_tx = GETPOST('tva_tx', 'alpha'); $discount_type = !empty($_POST['discount_type']) ?GETPOST('discount_type', 'alpha') : 0; - if ($amount_ht > 0) - { + if ($amount_ht > 0) { $error = 0; - if (empty($desc)) - { + if (empty($desc)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReasonDiscount")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $soc = new Societe($db); $soc->fetch($id); $discountid = $soc->set_remise_except($amount_ht, $user, $desc, $tva_tx, $discount_type); - if ($discountid > 0) - { - if (!empty($backtopage)) - { + if ($discountid > 0) { + if (!empty($backtopage)) { header("Location: ".$backtopage.'&discountid='.$discountid); exit; } else { @@ -199,8 +192,7 @@ if ($action == 'setremise' && $user->rights->societe->creer) } } -if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes') -{ +if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' && $user->rights->societe->creer) { //if ($user->rights->societe->creer) //if ($user->rights->facture->creer) @@ -209,8 +201,7 @@ if (GETPOST('action', 'aZ09') == 'confirm_remove' && GETPOST("confirm") == 'yes' $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("remid")); $result = $discount->delete($user); - if ($result > 0) - { + if ($result > 0) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id); // To avoid pb whith back exit; @@ -231,8 +222,7 @@ $facturefournstatic = new FactureFournisseur($db); llxHeader('', $langs->trans("GlobalDiscount")); -if ($socid > 0) -{ +if ($socid > 0) { // On recupere les donnees societes par l'objet $object = new Societe($db); $object->fetch($socid); @@ -283,11 +273,12 @@ if ($socid > 0) $sql .= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; $sql .= " GROUP BY rc.fk_user"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $remise_all += $obj->amount; - if ($obj->fk_user == $user->id) $remise_user += $obj->amount; + if ($obj->fk_user == $user->id) { + $remise_user += $obj->amount; + } } else { dol_print_error($db); } @@ -295,8 +286,7 @@ if ($socid > 0) print ''; print ''; - if (!empty($user->fk_soc)) // No need to show this for external users - { + if (!empty($user->fk_soc)) { // No need to show this for external users print ''; print ''; } @@ -313,11 +303,12 @@ if ($socid > 0) $sql .= " AND (fk_invoice_supplier_line IS NULL AND fk_invoice_supplier IS NULL)"; $sql .= " GROUP BY rc.fk_user"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $remise_all += $obj->amount; - if ($obj->fk_user == $user->id) $remise_user += $obj->amount; + if ($obj->fk_user == $user->id) { + $remise_user += $obj->amount; + } } else { dol_print_error($db); } @@ -325,8 +316,7 @@ if ($socid > 0) print ''; print ''; - if (!empty($user->fk_soc)) // No need to show this for external users - { + if (!empty($user->fk_soc)) { // No need to show this for external users print ''; print ''; } @@ -339,8 +329,7 @@ if ($socid > 0) print dol_get_fiche_end(); - if ($user->rights->societe->creer) - { + if ($user->rights->societe->creer) { print '
    '; print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', ''); @@ -378,12 +367,10 @@ if ($socid > 0) print dol_get_fiche_end(); } - if ($user->rights->societe->creer) - { + if ($user->rights->societe->creer) { print '
    '; print ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print '     '; print ''; } @@ -395,8 +382,7 @@ if ($socid > 0) print '
    '; - if ($_GET['action'] == 'remove') - { + if ($_GET['action'] == 'remove') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.GETPOST('remid'), $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } @@ -430,8 +416,7 @@ if ($socid > 0) $sql .= " ORDER BY rc.datec DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '
    '; print '
    '.$langs->trans("User").'
    '.dol_print_date($db->jdate($obj->dc), "dayhour").'
    '.$langs->trans("CustomerAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
    '.$langs->trans("CustomerAbsoluteDiscountMy").''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
    '.$langs->trans("SupplierAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
    '.$langs->trans("SupplierAbsoluteDiscountMy").''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
    '; print ''; @@ -439,14 +424,12 @@ if ($socid > 0) print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; @@ -457,32 +440,27 @@ if ($socid > 0) $i = 0; $num = $db->num_rows($resql); - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print ''; - if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) - { + if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) - { + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) - { + } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) { print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; - if ($user->rights->societe->creer || $user->rights->facture->creer) - { + if ($user->rights->societe->creer || $user->rights->facture->creer) { print ''; - } else print ''; + } else { + print ''; + } print ''; - if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) - { + if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) { $showconfirminfo['rowid'] = $obj->rowid; $showconfirminfo['amount_ttc'] = $obj->amount_ttc; } @@ -527,15 +503,16 @@ if ($socid > 0) } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) $colspan += 2; + if (!empty($conf->multicurrency->enabled)) { + $colspan += 2; + } print ''; } $db->free($resql); print "
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").'
    '.dol_print_date($db->jdate($obj->dc), 'dayhour').''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->ref; $facturestatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->ref; $facturestatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->ref; @@ -496,30 +474,28 @@ if ($socid > 0) } print ''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; print ''.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.''; print ''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print '  
    '.$langs->trans("None").'
    "; print '
    '; - if (count($showconfirminfo)) - { + if (count($showconfirminfo)) { $amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT'); $amount2 = ($showconfirminfo['amount_ttc'] - $amount1); $formquestion = array( @@ -578,8 +555,7 @@ if ($socid > 0) $sql .= " ORDER BY rc.datec DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '
    '; print ''; print ''; @@ -587,14 +563,12 @@ if ($socid > 0) print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; @@ -605,32 +579,27 @@ if ($socid > 0) $i = 0; $num = $db->num_rows($resql); - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print ''; - if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) - { + if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) - { + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) - { + } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) { print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; - if ($user->rights->societe->creer || $user->rights->facture->creer) - { + if ($user->rights->societe->creer || $user->rights->facture->creer) { print ''; - } else print ''; + } else { + print ''; + } print ''; - if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) - { + if ($_GET["action"] == 'split' && GETPOST('remid') == $obj->rowid) { $showconfirminfo['rowid'] = $obj->rowid; $showconfirminfo['amount_ttc'] = $obj->amount_ttc; } @@ -675,15 +642,16 @@ if ($socid > 0) } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) $colspan += 2; + if (!empty($conf->multicurrency->enabled)) { + $colspan += 2; + } print ''; } $db->free($resql); print "
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("DiscountOfferedBy").'
    '.dol_print_date($db->jdate($obj->dc), 'dayhour').''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->ref; $facturefournstatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->ref; $facturefournstatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->ref; @@ -644,30 +613,28 @@ if ($socid > 0) } print ''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; print ''.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.''; print ''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; - print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).''; + print 'rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).''; print '  
    '.$langs->trans("None").'
    "; print '
    '; - if (count($showconfirminfo)) - { + if (count($showconfirminfo)) { $amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT'); $amount2 = ($showconfirminfo['amount_ttc'] - $amount1); $formquestion = array( @@ -758,9 +726,10 @@ if ($socid > 0) $resql = $db->query($sql); $resql2 = null; - if ($resql) $resql2 = $db->query($sql2); - if ($resql2) - { + if ($resql) { + $resql2 = $db->query($sql2); + } + if ($resql2) { print '
    '; print ''; print ''; @@ -768,14 +737,12 @@ if ($socid > 0) print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; @@ -785,10 +752,8 @@ if ($socid > 0) $tab_sqlobj = array(); $tab_sqlobjOrder = array(); $num = $db->num_rows($resql); - if ($num > 0) - { - for ($i = 0; $i < $num; $i++) - { + if ($num > 0) { + for ($i = 0; $i < $num; $i++) { $sqlobj = $db->fetch_object($resql); $tab_sqlobj[] = $sqlobj; $tab_sqlobjOrder[] = $db->jdate($sqlobj->dc); @@ -797,8 +762,7 @@ if ($socid > 0) $db->free($resql); $num = $db->num_rows($resql2); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $sqlobj = $db->fetch_object($resql2); $tab_sqlobj[] = $sqlobj; $tab_sqlobjOrder[] = $db->jdate($sqlobj->dc); @@ -807,32 +771,27 @@ if ($socid > 0) array_multisort($tab_sqlobjOrder, SORT_DESC, $tab_sqlobj); $num = count($tab_sqlobj); - if ($num > 0) - { + if ($num > 0) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = array_shift($tab_sqlobj); print ''; print ''; - if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) - { + if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) - { + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) - { + } elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; } @@ -928,9 +886,10 @@ if ($socid > 0) $resql = $db->query($sql); $resql2 = null; - if ($resql) $resql2 = $db->query($sql2); - if ($resql2) - { + if ($resql) { + $resql2 = $db->query($sql2); + } + if ($resql2) { print '
    '; print '
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").'
    '.dol_print_date($db->jdate($obj->dc), 'dayhour').''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->invoice_source_ref; $facturestatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->invoice_source_ref; $facturestatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturestatic->getNomURl(1); print ''; $facturestatic->id = $obj->fk_facture_source; $facturestatic->ref = $obj->invoice_source_ref; @@ -845,20 +804,17 @@ if ($socid > 0) print ''; - if ($obj->invoiceid) - { + if ($obj->invoiceid) { print ''.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.''; } print ''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -870,7 +826,9 @@ if ($socid > 0) } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) $colspan += 2; + if (!empty($conf->multicurrency->enabled)) { + $colspan += 2; + } print '
    '.$langs->trans("None").'
    '; print ''; @@ -938,14 +897,12 @@ if ($socid > 0) print ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; @@ -955,10 +912,8 @@ if ($socid > 0) $tab_sqlobj = array(); $tab_sqlobjOrder = array(); $num = $db->num_rows($resql); - if ($num > 0) - { - for ($i = 0; $i < $num; $i++) - { + if ($num > 0) { + for ($i = 0; $i < $num; $i++) { $sqlobj = $db->fetch_object($resql); $tab_sqlobj[] = $sqlobj; $tab_sqlobjOrder[] = $db->jdate($sqlobj->dc); @@ -967,8 +922,7 @@ if ($socid > 0) $db->free($resql); $num = $db->num_rows($resql2); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $sqlobj = $db->fetch_object($resql2); $tab_sqlobj[] = $sqlobj; $tab_sqlobjOrder[] = $db->jdate($sqlobj->dc); @@ -977,32 +931,27 @@ if ($socid > 0) array_multisort($tab_sqlobjOrder, SORT_DESC, $tab_sqlobj); $num = count($tab_sqlobj); - if ($num > 0) - { + if ($num > 0) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = array_shift($tab_sqlobj); print ''; print ''; - if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) - { + if (preg_match('/\(CREDIT_NOTE\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) - { + } elseif (preg_match('/\(DEPOSIT\)/', $obj->description)) { print ''; - } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) - { + } elseif (preg_match('/\(EXCESS PAID\)/', $obj->description)) { print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; print ''; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; } print ''; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 1ef37552f1f..12117a5f1cb 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -60,9 +60,15 @@ if (!empty($conf->variants->enabled)) { // Load translation files required by the page $langs->loadLangs(array('orders', 'sendings', 'companies', 'bills', 'propal', 'deliveries', 'products', 'other')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); -if (!empty($conf->margin->enabled)) $langs->load('margins'); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} +if (!empty($conf->margin->enabled)) { + $langs->load('margins'); +} +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int')); $ref = GETPOST('ref', 'alpha'); @@ -82,8 +88,9 @@ $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); // Security check -if (!empty($user->socid)) +if (!empty($user->socid)) { $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $id); $object = new Commande($db); @@ -107,17 +114,12 @@ $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancr $usercancancel = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->annuler))); $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send); -$usercancreatepurchaseorder = $user->rights->fournisseur->commande->creer; +$usercancreatepurchaseorder = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { - if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $object->warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; - if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse; -} - $error = 0; $date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); @@ -130,14 +132,13 @@ $date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int' $parameters = array('socid' => $socid); // Note that $action and $object may be modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +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; } @@ -151,20 +152,16 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) - { - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { + if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { - if ($object->id > 0) - { + if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later $orig = clone $object; $result = $object->createFromClone($user, $socid); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; } else { @@ -174,49 +171,38 @@ if (empty($reshook)) } } } - } - - // Reopen a closed order - elseif ($action == 'reopen' && $usercancreate) - { - if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) - { + } elseif ($action == 'reopen' && $usercancreate) { + // Reopen a closed order + if ($object->statut == Commande::STATUS_CANCELED || $object->statut == Commande::STATUS_CLOSED) { $result = $object->set_reopen($user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans('OrderReopened', $object->ref), null); } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Remove order - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { + // Remove order $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header('Location: list.php?restore_lastsearch_values=1'); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Remove a product line - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { + // Remove a product line $result = $object->deleteline($user, $lineid); - if ($result > 0) - { + if ($result > 0) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -231,17 +217,11 @@ if (empty($reshook)) } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Link to a project - elseif ($action == 'classin' && $usercancreate) - { + } elseif ($action == 'classin' && $usercancreate) { + // Link to a project $object->setProject(GETPOST('projectid', 'int')); - } - - // Add order - elseif ($action == 'add' && $usercancreate) - { + } elseif ($action == 'add' && $usercancreate) { + // Add order $datecommande = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $date_delivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $selectedLines = GETPOST('toselect', 'array'); @@ -287,15 +267,15 @@ if (empty($reshook)) $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); // Fill array 'array_options' with data from add form - if (!$error) - { + if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } // If creation from another object of another module (Example: origin=propal, originid=1) - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { @@ -325,12 +305,10 @@ if (empty($reshook)) $object->linked_objects = array_merge($object->linked_objects, $other_linked_objects); } - if (!$error) - { + if (!$error) { $object_id = $object->create($user); - if ($object_id > 0) - { + if ($object_id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -338,11 +316,9 @@ if (empty($reshook)) dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } @@ -350,9 +326,10 @@ if (empty($reshook)) $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { - if (!in_array($lines[$i]->id, $selectedLines)) continue; // Skip unselected lines + for ($i = 0; $i < $num; $i++) { + if (!in_array($lines[$i]->id, $selectedLines)) { + continue; // Skip unselected lines + } $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : ''); @@ -361,15 +338,19 @@ if (empty($reshook)) // Dates // TODO mutualiser $date_start = $lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) + if ($lines[$i]->date_debut_reel) { $date_start = $lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) + } + if ($lines[$i]->date_start) { $date_start = $lines[$i]->date_start; + } $date_end = $lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) + if ($lines[$i]->date_fin_reel) { $date_end = $lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) + } + 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) { @@ -377,20 +358,42 @@ if (empty($reshook)) } // Extrafields - if (method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if trigger used - { + if (method_exists($lines[$i], 'fetch_optionals')) { // For avoid conflicts if trigger used $lines[$i]->fetch_optionals(); $array_options = $lines[$i]->array_options; } $tva_tx = $lines[$i]->tva_tx; - if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; + if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) { + $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; + } $result = $object->addline( - $desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, - $lines[$i]->remise_percent, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $date_start, $date_end, $product_type, - $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, - $lines[$i]->fk_unit, $object->origin, $lines[$i]->rowid + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $date_start, + $date_end, + $product_type, + $lines[$i]->rang, + $lines[$i]->special_code, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + $label, + $array_options, + $lines[$i]->fk_unit, + $object->origin, + $lines[$i]->rowid ); if ($result < 0) { @@ -412,26 +415,26 @@ if (empty($reshook)) /* Useless, already into the create if (! empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) { - $originforcontact = $object->origin; - $originidforcontact = $object->origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { - $originforcontact=$srcobject->origin; - $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 = '".$db->escape($originforcontact)."'"; + $originforcontact = $object->origin; + $originidforcontact = $object->origin_id; + if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order + { + $originforcontact=$srcobject->origin; + $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 = ".((int) $originidforcontact)." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$db->escape($originforcontact)."'"; - $resqlcontact = $db->query($sqlcontact); - if ($resqlcontact) - { - while($objcontact = $db->fetch_object($resqlcontact)) - { - //print $objcontact->code.'-'.$objcontact->fk_socpeople."\n"; - $object->add_contact($objcontact->fk_socpeople, $objcontact->code); - } - } - else dol_print_error($resqlcontact); + $resqlcontact = $db->query($sqlcontact); + if ($resqlcontact) + { + while($objcontact = $db->fetch_object($resqlcontact)) + { + //print $objcontact->code.'-'.$objcontact->fk_socpeople."\n"; + $object->add_contact($objcontact->fk_socpeople, $objcontact->code); + } + } + else dol_print_error($resqlcontact); }*/ // Hooks @@ -450,15 +453,13 @@ if (empty($reshook)) $action = 'create'; } } else { - if (!$error) - { + if (!$error) { $object_id = $object->create($user); } } // Insert default contacts if defined - if ($object_id > 0) - { + if ($object_id > 0) { if (GETPOST('contactid', 'int')) { $result = $object->add_contact(GETPOST('contactid', 'int'), 'CUSTOMER', 'external'); if ($result < 0) { @@ -472,8 +473,7 @@ if (empty($reshook)) } // End of object creation, we show it - if ($object_id > 0 && !$error) - { + if ($object_id > 0 && !$error) { $db->commit(); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); exit(); @@ -483,32 +483,26 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } elseif ($action == 'classifybilled' && $usercancreate) - { + } elseif ($action == 'classifybilled' && $usercancreate) { $ret = $object->classifyBilled($user); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'classifyunbilled' && $usercancreate) - { - $ret = $object->classifyUnBilled(); + } elseif ($action == 'classifyunbilled' && $usercancreate) { + $ret = $object->classifyUnBilled($user); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Positionne ref commande client - elseif ($action == 'setref_client' && $usercancreate) { + } elseif ($action == 'setref_client' && $usercancreate) { + // Positionne ref commande client $result = $object->set_ref_client($user, GETPOST('ref_client')); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setremise' && $usercancreate) { - $result = $object->set_remise($user, GETPOST('remise')); - if ($result < 0) - { + $result = $object->setDiscount($user, price2num(GETPOST('remise'), 2)); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setabsolutediscount' && $usercancreate) { @@ -521,7 +515,7 @@ if (empty($reshook)) } } elseif ($action == 'setdate' && $usercancreate) { // print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; - $date = dol_mktime(0, 0, 0, GETPOST('order_month'), GETPOST('order_day'), GETPOST('order_year')); + $date = dol_mktime(0, 0, 0, GETPOST('order_month', 'int'), GETPOST('order_day', 'int'), GETPOST('order_year', 'int')); $result = $object->set_date($user, $date); if ($result < 0) { @@ -538,26 +532,25 @@ if (empty($reshook)) } } elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - - // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $usercancreate) { + } + } elseif ($action == 'setmulticurrencycode' && $usercancreate) { + // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } elseif ($action == 'setavailability' && $usercancreate) { $result = $object->availability(GETPOST('availability_id')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } elseif ($action == 'setdemandreason' && $usercancreate) { $result = $object->demand_reason(GETPOST('demand_reason_id')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } elseif ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) { @@ -567,8 +560,9 @@ if (empty($reshook)) // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -578,43 +572,34 @@ if (empty($reshook)) $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } - } - - // Set incoterm - elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) - { + } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // bank account - elseif ($action == 'setbankaccount' && $usercancreate) { + } elseif ($action == 'setbankaccount' && $usercancreate) { + // bank account $result = $object->setBankAccount(GETPOST('fk_account', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // shipping method - elseif ($action == 'setshippingmethod' && $usercancreate) { + } elseif ($action == 'setshippingmethod' && $usercancreate) { + // shipping method $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // warehouse - elseif ($action == 'setwarehouse' && $usercancreate) { + } elseif ($action == 'setwarehouse' && $usercancreate) { + // warehouse $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } elseif ($action == 'setremisepercent' && $usercancreate) { - $result = $object->set_remise($user, GETPOST('remise_percent')); + $result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), 2)); } elseif ($action == 'setremiseabsolue' && $usercancreate) { - $result = $object->set_remise_absolue($user, GETPOST('remise_absolue')); + $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU')); } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') { // Define vat_rate $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); @@ -624,8 +609,7 @@ if (empty($reshook)) foreach ($object->lines as $line) { $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); } - } elseif ($action == 'addline' && $usercancreate) // Add a new line - { + } elseif ($action == 'addline' && $usercancreate) { // Add a new line $langs->load('errors'); $error = 0; @@ -635,8 +619,7 @@ if (empty($reshook)) $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); $prod_entry_mode = GETPOST('prod_entry_mode'); - if ($prod_entry_mode == 'free') - { + if ($prod_entry_mode == 'free') { $idprod = 0; $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { @@ -645,6 +628,7 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0); if (empty($remise_percent)) { $remise_percent = 0; @@ -669,8 +653,7 @@ if (empty($reshook)) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && empty($idprod) && $price_ht == '' && $price_ht_devise == '') // Unit price can be 0 but not ''. Also price can be negative for order. - { + if ($prod_entry_mode == 'free' && empty($idprod) && $price_ht == '' && $price_ht_devise == '') { // Unit price can be 0 but not ''. Also price can be negative for order. setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -716,7 +699,9 @@ if (empty($reshook)) // Update if prices fields are defined $tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; @@ -724,21 +709,21 @@ if (empty($reshook)) $price_base_type = $prod->price_base_type; // If price per segment - if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $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]; - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility - { - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { + $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; + } + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) { + $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + } } - } - // If price per customer - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + // If price per customer require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; $prodcustprice = new Productcustomerprice($db); @@ -746,38 +731,37 @@ if (empty($reshook)) $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); - if ($result >= 0) - { - if (count($prodcustprice->lines) > 0) - { + if ($result >= 0) { + if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines[0]->price); $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_min = price($prodcustprice->lines[0]->price_min); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = $prodcustprice->lines[0]->tva_tx; - if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } $tva_npr = $prodcustprice->lines[0]->recuperableonly; - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } } } else { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } - } - // If price per quantity - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) - { - if ($prod->prices_by_qty[0]) // yes, this product has some prices per quantity - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { + // If price per quantity + if ($prod->prices_by_qty[0]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. $pqp = GETPOST('pbq', 'int'); // Search price into product_price_by_qty from $prod->id - foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) - { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + foreach ($prod->prices_by_qty_list[0] as $priceforthequantityarray) { + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -786,21 +770,18 @@ if (empty($reshook)) break; } } - } - // If price per quantity and customer - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { - if ($prod->prices_by_qty[$object->thirdparty->price_level]) // yes, this product has some prices per quantity - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + // If price per quantity and customer + if ($prod->prices_by_qty[$object->thirdparty->price_level]) { // yes, this product has some prices per quantity // Search the correct price into loaded array product_price_by_qty using id of array retrieved into POST['pqp']. $pqp = GETPOST('pbq', 'int'); // Search price into product_price_by_qty from $prod->id - foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) - { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + foreach ($prod->prices_by_qty_list[$object->thirdparty->price_level] as $priceforthequantityarray) { + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -818,10 +799,9 @@ if (empty($reshook)) 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 - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - elseif ($tmpvat != $tmpprodvat) { + } elseif ($tmpvat != $tmpprodvat) { + // 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 ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); } else { @@ -835,22 +815,32 @@ if (empty($reshook)) if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) + } + if (empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $desc = (!empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; + $desc = (!empty($prod->multilangs[$outputlangs->defaultlang]["description"])) ? $prod->multilangs[$outputlangs->defaultlang]["description"] : $prod->description; } else { $desc = $prod->description; } - if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; - else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time + if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc=''; + } + + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { + $desc = $product_desc; + } else { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } // Add custom code and origin country into description if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (!empty($prod->customcode) || !empty($prod->country_code))) { @@ -859,28 +849,36 @@ if (empty($reshook)) if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'alpha')) + if (empty($newlang) && GETPOST('lang_id', 'alpha')) { $newlang = GETPOST('lang_id', 'alpha'); - if (empty($newlang)) + } + if (empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - if (!empty($prod->customcode)) + if (!empty($prod->customcode)) { $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; - if (!empty($prod->customcode) && !empty($prod->country_code)) + } + if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; - if (!empty($prod->country_code)) + } + if (!empty($prod->country_code)) { $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $outputlangs, 0); + } } else { - if (!empty($prod->customcode)) + if (!empty($prod->customcode)) { $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; - if (!empty($prod->customcode) && !empty($prod->country_code)) + } + if (!empty($prod->customcode) && !empty($prod->country_code)) { $tmptxt .= ' - '; - if (!empty($prod->country_code)) + } + if (!empty($prod->country_code)) { $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $langs, 0); + } } $tmptxt .= ')'; $desc = dol_concatdesc($desc, $tmptxt); @@ -911,8 +909,9 @@ if (empty($reshook)) $desc = dol_htmlcleanlastbr($desc); $info_bits = 0; - if ($tva_npr) + if ($tva_npr) { $info_bits |= 0x01; + } if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!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)); @@ -929,8 +928,9 @@ if (empty($reshook)) // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -976,13 +976,8 @@ if (empty($reshook)) } } } - } - - /* - * Update a line - */ - elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) - { + } elseif ($action == 'updateline' && $usercancreate && GETPOST('save')) { + // Update a line // Clean parameters $date_start = ''; $date_end = ''; @@ -1020,7 +1015,9 @@ if (empty($reshook)) // Define special_code for special lines $special_code = GETPOST('special_code'); - if (!GETPOST('qty')) $special_code = 3; + if (!GETPOST('qty')) { + $special_code = 3; + } // Check minimum price $productid = GETPOST('productid', 'int'); @@ -1031,12 +1028,13 @@ if (empty($reshook)) $type = $product->type; $price_min = $product->price_min; - if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && !empty($object->thirdparty->price_level)) + if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && !empty($object->thirdparty->price_level)) { $price_min = $product->multiprices_min[$object->thirdparty->price_level]; + } $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min)))) { + if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent'), 2) / 100) < price2num($price_min)))) { setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error++; } @@ -1052,29 +1050,28 @@ if (empty($reshook)) } if (!$error) { - if (empty($user->rights->margins->creer)) - { - foreach ($object->lines as &$line) - { - if ($line->id == GETPOST('lineid')) - { + if (empty($user->rights->margins->creer)) { + foreach ($object->lines as &$line) { + if ($line->id == GETPOST('lineid', 'int')) { $fournprice = $line->fk_fournprice; $buyingprice = $line->pa_ht; break; } } } - $result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); + $result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu_ht, price2num(GETPOST('qty'), 'MS'), price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise); if ($result >= 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -1117,23 +1114,19 @@ if (empty($reshook)) } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit(); - } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) - { + } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { - if (!$idwarehouse || $idwarehouse == -1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; @@ -1142,15 +1135,17 @@ if (empty($reshook)) if (!$error) { $result = $object->valid($user, $idwarehouse); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1164,25 +1159,20 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Go back to draft status - elseif ($action == 'confirm_modif' && $usercancreate) { + } elseif ($action == 'confirm_modif' && $usercancreate) { + // Go back to draft status $idwarehouse = GETPOST('idwarehouse'); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { - if (!$idwarehouse || $idwarehouse == -1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; @@ -1191,15 +1181,17 @@ if (empty($reshook)) if (!$error) { $result = $object->setDraft($user, $idwarehouse); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1216,23 +1208,19 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) - { + } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { - if (!$idwarehouse || $idwarehouse == -1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; @@ -1248,58 +1236,53 @@ if (empty($reshook)) } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('ORDER_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } // add lines from objectlinked if ($action == 'import_lines_from_object' && $usercancreate && $object->statut == Commande::STATUS_DRAFT - ) - { + ) { $fromElement = GETPOST('fromelement'); $fromElementid = GETPOST('fromelementid'); $importLines = GETPOST('line_checkbox'); - if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) - { - if ($fromElement == 'commande') - { + if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) { + if ($fromElement == 'commande') { 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'; } $nextRang = count($object->lines) + 1; $importCount = 0; $error = 0; - foreach ($importLines as $lineId) - { + foreach ($importLines as $lineId) { $lineId = intval($lineId); $originLine = new $lineClassName($db); - if (intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) - { + if (intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0) { $originLine->fetch_optionals(); $desc = $originLine->desc; $pu_ht = $originLine->subprice; @@ -1343,8 +1326,7 @@ if (empty($reshook)) } } - if ($error) - { + if ($error) { setEventMessages($langs->trans('ErrorsOnXLines', $error), null, 'errors'); } } @@ -1366,10 +1348,8 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - if (!$error && !empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) - { - if ($action == 'addcontact') - { + if (!$error && !empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { + if ($action == 'addcontact') { if ($object->id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); @@ -1387,21 +1367,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // bascule du statut d'un contact - elseif ($action == 'swapstatut') - { + } elseif ($action == 'swapstatut') { + // bascule du statut d'un contact if ($object->id > 0) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } - } - - // Efface un contact - elseif ($action == 'deletecontact') - { + } elseif ($action == 'deletecontact') { + // Efface un contact $result = $object->delete_contact($lineid); if ($result >= 0) { @@ -1419,22 +1393,24 @@ if (empty($reshook)) * View */ -llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); +llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'); $form = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); $formmargin = new FormMargin($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} // Mode creation -if ($action == 'create' && $usercancreate) -{ +if ($action == 'create' && $usercancreate) { print load_fiche_titre($langs->trans('CreateOrder'), '', 'order'); $soc = new Societe($db); - if ($socid > 0) + if ($socid > 0) { $res = $soc->fetch($socid); + } $remise_absolue = 0; @@ -1481,8 +1457,9 @@ if ($action == 'create' && $usercancreate) $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); + } $objectsrc->fetch_thirdparty(); // Replicate extrafields @@ -1505,12 +1482,17 @@ if ($action == 'create' && $usercancreate) $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ?-1 : ''; $date_delivery = (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : ''); - if (empty($date_delivery)) $date_delivery = (!empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : ''); + if (empty($date_delivery)) { + $date_delivery = (!empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : ''); + } - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($objectsrc->multicurrency_code)) { + $currency_code = $objectsrc->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) { + $currency_tx = $objectsrc->multicurrency_tx; + } } $note_private = $object->getDefaultCreateValueFor('note_private', (!empty($objectsrc->note_private) ? $objectsrc->note_private : null)); @@ -1531,12 +1513,27 @@ if ($action == 'create' && $usercancreate) $remise_absolue = 0; $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER) ?-1 : ''; - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + $currency_code = $soc->multicurrency_code; + } $note_private = $object->getDefaultCreateValueFor('note_private'); $note_public = $object->getDefaultCreateValueFor('note_public'); } + //Warehouse default if null + if ($soc->fk_warehouse > 0) { + $warehouse_id = $soc->fk_warehouse; + } + if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { + $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; + } + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { + $warehouse_id = $user->fk_warehouse; + } + } + print ''; print ''; print ''; @@ -1544,7 +1541,9 @@ if ($action == 'create' && $usercancreate) print ''; print ''; print ''; - if (!empty($currency_tx)) print ''; + if (!empty($currency_tx)) { + print ''; + } print dol_get_fiche_head(''); @@ -1555,9 +1554,11 @@ if ($action == 'create' && $usercancreate) // Reference client print ''; - else print ''; + } else { + print ''; + } print ''; // Thirdparty @@ -1572,15 +1573,15 @@ if ($action == 'create' && $usercancreate) print ''; // Ligne info remises tiers @@ -1630,31 +1632,34 @@ if ($action == 'create' && $usercancreate) // Mode de reglement print ''; // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && !empty($conf->banque->enabled)) { print ''; } // Delivery delay print ''; // Shipping Method if (!empty($conf->expedition->enabled)) { print ''; } // Warehouse - if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); print ''; print ''; print ''; print ''; print '"; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; print ''; print ''; print ''; @@ -1752,14 +1754,13 @@ if ($action == 'create' && $usercancreate) print ''; print ''; } - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { // TODO for compatibility if ($origin == 'contrat') { // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva @@ -1798,20 +1799,17 @@ if ($action == 'create' && $usercancreate) // Amount print ''; print '"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE - { + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 RE print '"; } - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF - { + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 IRPF print '"; } print '"; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; print '"; print '"; @@ -1869,8 +1867,7 @@ if ($action == 'create' && $usercancreate) } // Confirmation of validation - if ($action == 'validate') - { + if ($action == 'validate') { // We check that object has a temporary ref $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { @@ -1880,8 +1877,7 @@ if ($action == 'create' && $usercancreate) } $text = $langs->trans('ConfirmValidateOrder', $numref); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -1889,21 +1885,21 @@ if ($action == 'create' && $usercancreate) } $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -1916,25 +1912,24 @@ if ($action == 'create' && $usercancreate) } // Confirm back to draft status - if ($action == 'modif') - { + if ($action == 'modif') { $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } $text = $langs->trans('ConfirmUnvalidateOrder', $object->ref); $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -1956,25 +1951,24 @@ if ($action == 'create' && $usercancreate) /* * Confirmation de l'annulation */ - if ($action == 'cancel') - { + if ($action == 'cancel') { $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } $text = $langs->trans('ConfirmCancelOrder', $object->ref); $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -1987,8 +1981,7 @@ if ($action == 'create' && $usercancreate) } // Confirmation to delete line - if ($action == 'ask_deleteline') - { + if ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } @@ -2005,8 +1998,11 @@ if ($action == 'create' && $usercancreate) $parameters = array('formConfirm' => $formconfirm, '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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -2022,16 +2018,17 @@ if ($action == 'create' && $usercancreate) $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherOrders").')'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherOrders").')'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($usercancreate) - { - if ($action != 'classify') + 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 .= ''; @@ -2067,12 +2064,11 @@ if ($action == 'create' && $usercancreate) print '
    '.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("MulticurrencyAmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("MulticurrencyAmountTTC").''.$langs->trans("Author").'
    '.dol_print_date($db->jdate($obj->dc), 'dayhour').''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->invoice_source_ref; $facturefournstatic->type = $obj->type; print preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->invoice_source_ref; $facturefournstatic->type = $obj->type; print preg_replace('/\(DEPOSIT\)/', $langs->trans("InvoiceDeposit"), $obj->description).' '.$facturefournstatic->getNomURl(1); print ''; $facturefournstatic->id = $obj->fk_invoice_supplier_source; $facturefournstatic->ref = $obj->invoice_source_ref; @@ -1020,14 +969,12 @@ if ($socid > 0) } print ''.price($obj->amount_ht).''.price($obj->multicurrency_amount_ht).''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''.price($obj->amount_ttc).''.price($obj->multicurrency_amount_ttc).''; @@ -1039,7 +986,9 @@ if ($socid > 0) } } else { $colspan = 8; - if (!empty($conf->multicurrency->enabled)) $colspan += 2; + if (!empty($conf->multicurrency->enabled)) { + $colspan += 2; + } print '
    '.$langs->trans("None").'
    '.$langs->trans('RefCustomer').''; - if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER) && !empty($origin) && !empty($originid)) + if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER) && !empty($origin) && !empty($originid)) { print '
    '; print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations - if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) - { + if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print ''; @@ -1594,7 +1595,8 @@ if ($action == 'create' && $usercancreate) if ($socid > 0) { // Contacts (ask contact only if thirdparty already defined). print "
    ".$langs->trans("DefaultContact").''; - $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1); + print img_picto('', 'contact'); + print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1); print '
    '.$langs->trans('PaymentMode').''; + print img_picto('', 'bank').' '; $form->select_types_paiements($mode_reglement_id, 'mode_reglement_id'); print '
    '.$langs->trans('BankAccount').''; + print img_picto('', 'bank_account'); $form->select_comptes($fk_account, 'fk_account', 0, '', 1); print '
    '.$langs->trans('AvailabilityPeriod').''; + print img_picto('', 'clock').' '; $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1); print '
    '.$langs->trans('SendingMethod').''; + print img_picto('', 'object_dollyrevert').' '; print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1); print '
    '.$langs->trans('Warehouse').''; @@ -1670,8 +1675,7 @@ if ($action == 'create' && $usercancreate) // TODO How record was recorded OrderMode (llx_c_input_method) // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); print '
    '.$langs->trans("Project").''; @@ -1683,15 +1687,13 @@ if ($action == 'create' && $usercancreate) } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '
    '; $incoterm_id = GETPOST('incoterm_id'); $incoterm_location = GETPOST('location_incoterms'); - if (empty($incoterm_id)) - { + if (empty($incoterm_id)) { $incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms); $incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms); } @@ -1720,6 +1722,7 @@ if ($action == 'create' && $usercancreate) // Template to use by default print '
    '.$langs->trans('DefaultModel').''; + print img_picto('', 'pdf').' '; include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; $liste = ModelePDFCommandes::liste_modeles($db); $preselected = $conf->global->COMMANDE_ADDON_PDF; @@ -1727,8 +1730,7 @@ if ($action == 'create' && $usercancreate) print "
    '.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).''; @@ -1741,7 +1743,7 @@ if ($action == 'create' && $usercancreate) print ''.$langs->trans('NotePublic').''; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); // print ''; print '
    '.$langs->trans('NotePrivate').''; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); // print ''; print '
    '.$langs->trans('AmountHT').''.price($objectsrc->total_ht).'
    '.$langs->trans('AmountVAT').''.price($objectsrc->total_tva)."
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($objectsrc->total_localtax1)."
    '.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($objectsrc->total_localtax2)."
    '.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc)."
    '.$langs->trans('MulticurrencyAmountHT').''.price($objectsrc->multicurrency_total_ht).'
    '.$langs->trans('MulticurrencyAmountVAT').''.price($objectsrc->multicurrency_total_tva)."
    '.$langs->trans('MulticurrencyAmountTTC').''.price($objectsrc->multicurrency_total_ttc)."
    '; - if ($soc->outstanding_limit) - { + if ($soc->outstanding_limit) { // Outstanding Bill print ''; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Multicurrency code print ''; print ''; // Multicurrency rate - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print ''; print ''; - print ''; } if ($totalVolume) { print ''; - print ''; } @@ -2311,9 +2305,8 @@ if ($action == 'create' && $usercancreate) $editenable = $usercancreate; print $form->editfieldkey("IncotermLabel", 'incoterm', '', $object, $editenable); print ''; - print ''; print ''; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); print ''; print '
    '; print $langs->trans('OutstandingBill'); - print ''; + print ''; $arrayoutstandingbills = $soc->getOutstandingBills(); print price($arrayoutstandingbills['opened']).' / '; print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency); @@ -2093,7 +2089,7 @@ if ($action == 'create' && $usercancreate) $addabsolutediscount = ''.$langs->trans("EditGlobalDiscounts").''; $addcreditnote = ''.$langs->trans("AddCreditNote").''; - print '
    '.$langs->trans('Discounts').''; + print '
    '.$langs->trans('Discounts').''; $absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount); $absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote); @@ -2111,7 +2107,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate && $object->statut == Commande::STATUS_DRAFT; print $form->editfieldkey("Date", 'date', '', $object, $editenable); - print ''; + print ''; if ($action == 'editdate') { print ''; print ''; @@ -2132,7 +2128,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("DateDeliveryPlanned", 'date_livraison', '', $object, $editenable); - print ''; + print ''; if ($action == 'editdate_livraison') { print ''; print ''; @@ -2154,7 +2150,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("SendingMethod", 'shippingmethod', '', $object, $editenable); - print ''; + print ''; if ($action == 'editshippingmethod') { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1); } else { @@ -2165,14 +2161,14 @@ if ($action == 'create' && $usercancreate) } // Warehouse - if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { $langs->load('stocks'); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); print '
    '; $editenable = $usercancreate; print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable); - print ''; + print ''; if ($action == 'editwarehouse') { $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); } else { @@ -2186,7 +2182,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("PaymentConditionsShort", 'conditions', '', $object, $editenable); - print ''; + print ''; if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); } else { @@ -2200,7 +2196,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("PaymentMode", 'mode', '', $object, $editenable); - print ''; + print ''; if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); } else { @@ -2209,14 +2205,13 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate && $object->statut == Commande::STATUS_DRAFT; print $form->editfieldkey("Currency", 'multicurrencycode', '', $object, $editenable); - print ''; + print ''; if ($action == 'editmulticurrencycode') { $form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'multicurrency_code'); } else { @@ -2225,13 +2220,12 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $object->statut == $object::STATUS_DRAFT; print $form->editfieldkey("CurrencyRate", 'multicurrencyrate', '', $object, $editenable); - print ''; + print ''; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { if ($action == 'actualizemulticurrencyrate') { list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); @@ -2253,7 +2247,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, $editenable); - print ''; + print ''; if ($action == 'editavailability') { $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, $object->availability_id, 'availability_id', 1); } else { @@ -2265,7 +2259,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("Channel", 'demandreason', '', $object, $editenable); - print ''; + print ''; if ($action == 'editdemandreason') { $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { @@ -2292,13 +2286,13 @@ if ($action == 'create' && $usercancreate) $totalVolume = $tmparray['volume']; if ($totalWeight) { print '
    '.$langs->trans("CalculatedWeight").''; + print ''; print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); print '
    '.$langs->trans("CalculatedVolume").''; + print ''; print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); print '
    '; - if ($action != 'editincoterm') - { + print ''; + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -2326,7 +2319,7 @@ if ($action == 'create' && $usercancreate) print '
    '; $editenable = $usercancreate; print $form->editfieldkey("BankAccount", 'bankaccount', '', $object, $editenable); - print ''; + print ''; if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { @@ -2348,21 +2341,20 @@ if ($action == 'create' && $usercancreate) print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) - { + 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 ''; } @@ -2372,25 +2364,23 @@ if ($action == 'create' && $usercancreate) $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount)); } print ''; - print ''; + print ''; // Total VAT - print ''; + print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1 print ''; - print ''; + print ''; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { // Localtax2 IRPF print ''; - print ''; + print ''; } // Total TTC - print ''; + print ''; // Statut //print ''; @@ -2426,7 +2416,7 @@ if ($action == 'create' && $usercancreate) */ $result = $object->getLinesArray(); - print ' + print ' @@ -2440,18 +2430,17 @@ if ($action == 'create' && $usercancreate) 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($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($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($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).$alert.''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).$alert.'
    '.$langs->trans('AmountVAT').''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans('AmountVAT').''.price($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($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($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($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'
    ' . $langs->trans('Status') . '' . $object->getLibStatut(4) . '
    '; // Show object lines - if (!empty($object->lines)) + if (!empty($object->lines)) { $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); + } $numlines = count($object->lines); /* * Form to add new line */ - if ($object->statut == Commande::STATUS_DRAFT && $usercancreate && $action != 'selectlines') - { - if ($action != 'editline') - { + if ($object->statut == Commande::STATUS_DRAFT && $usercancreate && $action != 'selectlines') { + if ($action != 'editline') { // Add free products/services $object->formAddObjectLine(1, $mysoc, $soc); @@ -2487,13 +2476,14 @@ if ($action == 'create' && $usercancreate) if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else print ''.$langs->trans('SendMail').''; + } else { + print ''.$langs->trans('SendMail').''; + } } } // Valid - if ($object->statut == Commande::STATUS_DRAFT && ($object->total_ttc >= 0 || !empty($conf->global->ORDER_ENABLE_NEGATIVE)) && $numlines > 0 && $usercanvalidate) - { + if ($object->statut == Commande::STATUS_DRAFT && ($object->total_ttc >= 0 || !empty($conf->global->ORDER_ENABLE_NEGATIVE)) && $numlines > 0 && $usercanvalidate) { print ''.$langs->trans('Validate').''; } // Edit @@ -2510,9 +2500,8 @@ if ($action == 'create' && $usercancreate) }*/ // Create a purchase order - if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_SALE_ORDER)) - { - if (!empty($conf->fournisseur->enabled) && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { + if (!empty($conf->global->WORKFLOW_CAN_CREATE_PURCHASE_ORDER_FROM_SALE_ORDER)) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { if ($usercancreatepurchaseorder) { print ''.$langs->trans("AddPurchaseOrder").''; } @@ -2585,8 +2574,7 @@ if ($action == 'create' && $usercancreate) } // Cancel order - if ($object->statut == Commande::STATUS_VALIDATED && (!empty($usercanclose) || !empty($usercancancel))) - { + if ($object->statut == Commande::STATUS_VALIDATED && (!empty($usercanclose) || !empty($usercancancel))) { print ''; } @@ -2607,8 +2595,7 @@ if ($action == 'create' && $usercancreate) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
    '; print ''; // ancre // Documents @@ -2626,29 +2613,22 @@ if ($action == 'create' && $usercancreate) $compatibleImportElementsList = false; if ($usercancreate - && $object->statut == Commande::STATUS_DRAFT) - { + && $object->statut == Commande::STATUS_DRAFT) { $compatibleImportElementsList = array('commande', 'propal'); // import from linked elements } $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList); // Show online payment link $useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)); - if (!empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) $useonlinepayment = 0; - if ($object->statut != Commande::STATUS_DRAFT && $useonlinepayment) - { + if (!empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) { + $useonlinepayment = 0; + } + if ($object->statut != Commande::STATUS_DRAFT && $useonlinepayment) { print '
    '; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; print showOnlinePaymentUrl('order', $object->ref).'
    '; } - // Show direct download link - if ($object->statut != Commande::STATUS_DRAFT && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) - { - print '
    '."\n"; - print showDirectDownloadLink($object).'
    '; - } - print '
    '; // List of actions on element diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 71a26eea698..763fb061446 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -158,6 +158,10 @@ class Orders extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -165,28 +169,37 @@ class Orders extends DolibarrApi // 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 (!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) + 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."commande 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('commande').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -195,8 +208,7 @@ class Orders extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -207,13 +219,11 @@ class Orders extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $commande_static = new Commande($this->db); if ($commande_static->fetch($obj->rowid)) { @@ -252,12 +262,12 @@ class Orders extends DolibarrApi $this->commande->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->commande->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->commande->lines = $lines; + }*/ if ($this->commande->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors)); @@ -321,35 +331,40 @@ class Orders extends DolibarrApi if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + $updateRes = $this->commande->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $request_data->fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $request_data->origin, - $request_data->origin_id, - $request_data->multicurrency_subprice, - $request_data->ref_ext + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + $request_data->price_base_type ? $request_data->price_base_type : 'HT', + $request_data->subprice, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $request_data->fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $request_data->origin, + $request_data->origin_id, + $request_data->multicurrency_subprice, + $request_data->ref_ext ); if ($updateRes > 0) { @@ -384,7 +399,12 @@ class Orders extends DolibarrApi if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + $updateRes = $this->commande->updateline( $lineid, $request_data->desc, @@ -394,7 +414,7 @@ class Orders extends DolibarrApi $request_data->tva_tx, $request_data->localtax1_tx, $request_data->localtax2_tx, - 'HT', + $request_data->price_base_type ? $request_data->price_base_type : 'HT', $request_data->info_bits, $request_data->date_start, $request_data->date_end, @@ -407,9 +427,9 @@ class Orders extends DolibarrApi $request_data->special_code, $request_data->array_options, $request_data->fk_unit, - $request_data->multicurrency_subprice, + $request_data->multicurrency_subprice, 0, - $request_data->ref_ext + $request_data->ref_ext ); if ($updateRes > 0) { @@ -613,18 +633,20 @@ class Orders extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->commande->$field = $value; } // Update availability if (!empty($this->commande->availability_id)) { - if ($this->commande->availability($this->commande->availability_id) < 0) - throw new RestException(400, 'Error while updating availability'); + if ($this->commande->availability($this->commande->availability_id) < 0) { + throw new RestException(400, 'Error while updating availability'); + } } - if ($this->commande->update(DolibarrApiAccess::$user) > 0) - { + if ($this->commande->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->commande->error); @@ -979,8 +1001,9 @@ class Orders extends DolibarrApi { $commande = array(); foreach (Orders::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, $field." field missing"); + } $commande[$field] = $data[$field]; } return $commande; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index f23a1ff6715..074e3a6d67b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -11,6 +11,7 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2016-2018 Ferran Marcet + * Copyright (C) 2021 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 @@ -126,6 +127,10 @@ class Commande extends CommonOrder * @var int Draft Status of the order */ public $brouillon; + + /** + * @var string Condition payment code + */ public $cond_reglement_code; /** @@ -166,8 +171,16 @@ class Commande extends CommonOrder */ public $availability; - public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) + /** + * @var int Source demand reason Id + */ + public $demand_reason_id; + + /** + * @var string Source reason code. Why we receive order (after a phone campaign, ...) + */ public $demand_reason_code; + /** * @var int Date of order */ @@ -182,11 +195,15 @@ class Commande extends CommonOrder /** * @var int Date expected for delivery + * @see delivery_date * @deprecated */ - public $date_livraison; // deprecated; Use delivery_date instead. + public $date_livraison; - public $delivery_date; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) + /** + * @var int Date expected of shipment (date starting shipment, not the reception that occurs some days after) + */ + public $delivery_date; /** * @var int ID @@ -200,6 +217,11 @@ class Commande extends CommonOrder public $special_code; public $source; // Order mode. How we received order (by phone, by email, ...) + /** + * @var int Warehouse Id + */ + public $warehouse_id; + public $extraparams = array(); public $linked_objects = array(); @@ -225,17 +247,15 @@ class Commande extends CommonOrder */ public $fk_multicurrency; + /** + * @var string multicurrency code + */ public $multicurrency_code; public $multicurrency_tx; public $multicurrency_total_ht; public $multicurrency_total_tva; public $multicurrency_total_ttc; - /** - * @var Commande clone of order object - */ - public $oldcopy; - //! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...) public $module_source; //! key of pos source ('0', '1', ...) @@ -293,7 +313,7 @@ class Commande extends CommonOrder 'remise_percent' =>array('type'=>'double', 'label'=>'RelativeDiscount', 'enabled'=>1, 'visible'=>-1, 'position'=>110), 'remise_absolue' =>array('type'=>'double', 'label'=>'CustomerRelativeDiscount', 'enabled'=>1, 'visible'=>-1, 'position'=>115), //'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>120), - 'tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1), + 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>125, 'isameasure'=>1), 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1), 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1), 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1), @@ -383,8 +403,7 @@ class Commande extends CommonOrder global $langs, $conf; $langs->load("order"); - if (!empty($conf->global->COMMANDE_ADDON)) - { + if (!empty($conf->global->COMMANDE_ADDON)) { $mybool = false; $file = $conf->global->COMMANDE_ADDON.".php"; @@ -392,16 +411,14 @@ class Commande extends CommonOrder // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/commande/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -409,8 +426,7 @@ class Commande extends CommonOrder $obj = new $classname(); $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -441,15 +457,13 @@ class Commande extends CommonOrder $error = 0; // Protection - if ($this->statut == self::STATUS_VALIDATED) - { + if ($this->statut == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING); return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->validate)))) { $this->error = 'NotEnoughPermissions'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; @@ -467,8 +481,7 @@ class Commande extends CommonOrder $result = $soc->set_as_client(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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($soc); } else { $num = $this->ref; @@ -485,8 +498,7 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::valid", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; @@ -511,7 +523,9 @@ class Commande extends CommonOrder $this->error = $mouvP->error; } } - if ($error) break; + if ($error) { + break; + } } } } @@ -519,7 +533,9 @@ class Commande extends CommonOrder if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -527,30 +543,28 @@ class Commande extends CommonOrder $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'commande/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'commande/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->commande->multidir_output[$this->entity].'/'.$oldref; $dirdest = $conf->commande->multidir_output[$this->entity].'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->commande->multidir_output[$this->entity].'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -563,15 +577,13 @@ class Commande extends CommonOrder } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->statut = self::STATUS_VALIDATED; $this->brouillon = 0; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -596,14 +608,12 @@ class Commande extends CommonOrder $error = 0; // Protection - if ($this->statut <= self::STATUS_DRAFT) - { + if ($this->statut <= self::STATUS_DRAFT) { return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->validate)))) { $this->error = 'Permission denied'; return -1; } @@ -616,31 +626,28 @@ class Commande extends CommonOrder $sql .= " SET fk_statut = ".self::STATUS_DRAFT; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - if (!$error) - { + if ($this->db->query($sql)) { + if (!$error) { $this->oldcopy = clone $this; } // If stock is decremented on validate order, we must reincrement it - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { $result = 0; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { - if ($this->lines[$i]->fk_product > 0) - { + for ($i = 0; $i < $num; $i++) { + if ($this->lines[$i]->fk_product > 0) { $mouvP = new MouvementStock($this->db); $mouvP->origin = &$this; // We increment stock of product (and sub-products) $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr", $this->ref)); - if ($result < 0) { $error++; $this->error = $mouvP->error; break; } + if ($result < 0) { + $error++; $this->error = $mouvP->error; break; + } } } } @@ -648,7 +655,9 @@ class Commande extends CommonOrder if (!$error) { // Call trigger $result = $this->call_trigger('ORDER_UNVALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { @@ -680,8 +689,7 @@ class Commande extends CommonOrder // phpcs:enable $error = 0; - if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) - { + if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) { dol_syslog(get_class($this)."::set_reopen order has not status closed", LOG_WARNING); return 0; } @@ -694,11 +702,12 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::set_reopen", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger $result = $this->call_trigger('ORDER_REOPEN', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } else { $error++; @@ -706,16 +715,14 @@ class Commande extends CommonOrder dol_print_error($this->db); } - if (!$error) - { + if (!$error) { $this->statut = self::STATUS_VALIDATED; $this->billed = 0; $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::set_reopen ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -740,10 +747,8 @@ class Commande extends CommonOrder $usercanclose = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->commande->order_advance->close))); - if ($usercanclose) - { - if ($this->statut == self::STATUS_CLOSED) - { + if ($usercanclose) { + if ($this->statut == self::STATUS_CLOSED) { return 0; } $this->db->begin(); @@ -756,18 +761,17 @@ class Commande extends CommonOrder $sql .= " date_cloture = '".$this->db->idate($now)."'"; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; - if ($this->db->query($sql)) - { - if (!$notrigger) - { + if ($this->db->query($sql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_CLOSE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->statut = self::STATUS_CLOSED; $this->db->commit(); @@ -807,24 +811,19 @@ class Commande extends CommonOrder $sql .= " AND fk_statut = ".self::STATUS_VALIDATED; dol_syslog(get_class($this)."::cancel", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // If stock is decremented on validate order, we must reincrement it - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { - if ($this->lines[$i]->fk_product > 0) - { + for ($i = 0; $i < $num; $i++) { + if ($this->lines[$i]->fk_product > 0) { $mouvP = new MouvementStock($this->db); // We increment stock of product (and sub-products) $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderCanceledInDolibarr", $this->ref)); // price is 0, we don't want WAP to be changed - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $mouvP->error; break; @@ -833,22 +832,21 @@ class Commande extends CommonOrder } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('ORDER_CANCEL', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->statut = self::STATUS_CANCELED; $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::cancel ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -883,10 +881,12 @@ class Commande extends CommonOrder $delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date; // 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); - else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) { + list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date); + } else { + $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; $this->fk_multicurrency = 0; $this->multicurrency_tx = 1; @@ -895,11 +895,9 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::create user=".$user->id); // Check parameters - if (!empty($this->ref)) // We check that ref is not already used - { + if (!empty($this->ref)) { // We check that ref is not already used $result = self::isExistingObject($this->element, 0, $this->ref); // Check ref is not yet used - if ($result > 0) - { + if ($result > 0) { $this->error = 'ErrorRefAlreadyExists'; dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); $this->db->rollback(); @@ -909,14 +907,12 @@ class Commande extends CommonOrder $soc = new Societe($this->db); $result = $soc->fetch($this->socid); - if ($result < 0) - { + if ($result < 0) { $this->error = "Failed to fetch company"; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -2; } - if (!empty($conf->global->ORDER_REQUIRE_SOURCE) && $this->source < 0) - { + if (!empty($conf->global->ORDER_REQUIRE_SOURCE) && $this->source < 0) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Source")); dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; @@ -971,25 +967,24 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'commande'); - if ($this->id) - { + if ($this->id) { $fk_parent_line = 0; $num = count($this->lines); /* * Insert products details into db */ - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $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; + if (!is_object($line)) { + $line = (object) $line; + } // 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) { @@ -998,7 +993,9 @@ class Commande extends CommonOrder // Complete vat rate with code $vatrate = $line->tva_tx; - if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; + if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) { + $vatrate .= ' ('.$line->vat_src_code.')'; + } if (!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { $originid = $line->origin_id; @@ -1042,10 +1039,8 @@ class Commande extends CommonOrder 0, $line->ref_ext ); - if ($result < 0) - { - if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER) - { + if ($result < 0) { + if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER) { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; dol_print_error($this->db); @@ -1061,30 +1056,25 @@ class Commande extends CommonOrder // update ref $initialref = '(PROV'.$this->id.')'; - if (!empty($this->ref)) $initialref = $this->ref; + if (!empty($this->ref)) { + $initialref = $this->ref; + } - $sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($initialref)."' WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { + $sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='".$this->db->escape($initialref)."' WHERE rowid=".((int) $this->id); + if ($this->db->query($sql)) { $this->ref = $initialref; - 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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1093,8 +1083,7 @@ class Commande extends CommonOrder { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1102,58 +1091,58 @@ class Commande extends CommonOrder } } - if (!$error && $this->id && !empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && !empty($this->origin) && !empty($this->origin_id)) // Get contact from origin object - { + if (!$error && $this->id && !empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && !empty($this->origin) && !empty($this->origin_id)) { // Get contact from origin object $originforcontact = $this->origin; $originidforcontact = $this->origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { + 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(); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { + 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; + 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 = '".$this->db->escape($originforcontact)."'"; + $sqlcontact .= " WHERE element_id = ".((int) $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)) - { + 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); + } else { + dol_print_error($resqlcontact); + } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1190,19 +1179,18 @@ class Commande extends CommonOrder $this->db->begin(); // get lines so they will be clone - foreach ($this->lines as $line) + foreach ($this->lines as $line) { $line->fetch_optionals(); + } // Load source object $objFrom = clone $this; // Change socid if needed - if (!empty($socid) && $socid != $this->socid) - { + if (!empty($socid) && $socid != $this->socid) { $objsoc = new Societe($this->db); - if ($objsoc->fetch($socid) > 0) - { + if ($objsoc->fetch($socid) > 0) { $this->socid = $objsoc->id; $this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); $this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); @@ -1224,56 +1212,55 @@ class Commande extends CommonOrder $this->date_commande = dol_now(); $this->date_creation = ''; $this->date_validation = ''; - if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = ''; + if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) { + $this->ref_client = ''; + } // Do not clone ref_ext $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $this->lines[$i]->ref_ext = ''; } // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($this->copy_linked_contact($objFrom, 'internal') < 0) - { + if ($this->copy_linked_contact($objFrom, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if ($this->socid == $objFrom->socid) - { - if ($this->copy_linked_contact($objFrom, 'external') < 0) + if ($this->socid == $objFrom->socid) { + if ($this->copy_linked_contact($objFrom, 'external') < 0) { $error++; + } } } - if (!$error) - { + if (!$error) { // Hook of thirdparty module - if (is_object($hookmanager)) - { + 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 ($reshook < 0) { + $error++; + } } } unset($this->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1303,8 +1290,7 @@ class Commande extends CommonOrder $this->source = 0; $num = count($object->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $line = new OrderLine($this->db); $line->libelle = $object->lines[$i]->libelle; @@ -1338,8 +1324,9 @@ class Commande extends CommonOrder // get extrafields from original line $object->lines[$i]->fetch_optionals(); - foreach ($object->lines[$i]->array_options as $options_key => $value) + foreach ($object->lines[$i]->array_options as $options_key => $value) { $line->array_options[$options_key] = $value; + } $this->lines[$i] = $line; } @@ -1360,8 +1347,7 @@ class Commande extends CommonOrder $this->contact_id = $object->contact_id; $this->ref_client = $object->ref_client; - if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) - { + if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) { $this->note_private = $object->note_private; $this->note_public = $object->note_public; } @@ -1382,34 +1368,36 @@ class Commande extends CommonOrder } // Possibility to add external linked objects with hooks $this->linked_objects[$this->origin] = $this->origin_id; - if (is_array($object->other_linked_objects) && !empty($object->other_linked_objects)) - { + if (is_array($object->other_linked_objects) && !empty($object->other_linked_objects)) { $this->linked_objects = array_merge($this->linked_objects, $object->other_linked_objects); } $ret = $this->create($user); - if ($ret > 0) - { + if ($ret > 0) { // Actions hooked (by external module) $hookmanager->initHooks(array('orderdao')); $parameters = array('objFrom'=>$object); $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 ($reshook < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Validate immediatly the order - if (!empty($conf->global->ORDER_VALID_AFTER_CLOSE_PROPAL)) - { + if (!empty($conf->global->ORDER_VALID_AFTER_CLOSE_PROPAL)) { $this->fetch($ret); $this->valid($user); } return $ret; - } else return -1; - } else return -1; + } else { + return -1; + } + } else { + return -1; + } } @@ -1461,22 +1449,41 @@ class Commande extends CommonOrder $logtext .= ", date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit, origin=$origin, origin_id=$origin_id, pu_ht_devise=$pu_ht_devise, ref_ext=$ref_ext"; dol_syslog(get_class($this).$logtext, LOG_DEBUG); - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters - if (empty($remise_percent)) $remise_percent = 0; - if (empty($qty)) $qty = 0; - if (empty($info_bits)) $info_bits = 0; - if (empty($rang)) $rang = 0; - if (empty($txtva)) $txtva = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; - if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; - if (empty($this->fk_multicurrency)) $this->fk_multicurrency = 0; - if (empty($ref_ext)) $ref_ext = ''; + if (empty($remise_percent)) { + $remise_percent = 0; + } + if (empty($qty)) { + $qty = 0; + } + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($rang)) { + $rang = 0; + } + if (empty($txtva)) { + $txtva = 0; + } + if (empty($txlocaltax1)) { + $txlocaltax1 = 0; + } + if (empty($txlocaltax2)) { + $txlocaltax2 = 0; + } + if (empty($fk_parent_line) || $fk_parent_line < 0) { + $fk_parent_line = 0; + } + if (empty($this->fk_multicurrency)) { + $this->fk_multicurrency = 0; + } + if (empty($ref_ext)) { + $ref_ext = ''; + } $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -1489,8 +1496,7 @@ class Commande extends CommonOrder } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { $pu = $pu_ht; } else { $pu = $pu_ttc; @@ -1499,7 +1505,9 @@ class Commande extends CommonOrder $desc = trim($desc); // Check parameters - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -1510,14 +1518,12 @@ class Commande extends CommonOrder $this->db->begin(); $product_type = $type; - if (!empty($fk_product)) - { + if (!empty($fk_product)) { $product = new Product($this->db); $result = $product->fetch($fk_product); $product_type = $product->type; - if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty) - { + if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty) { $langs->load("errors"); $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref); $this->errors[] = $this->error; @@ -1536,8 +1542,7 @@ class Commande extends CommonOrder // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -1567,8 +1572,7 @@ class Commande extends CommonOrder // Rang to use $ranktouse = $rang; - if ($ranktouse == -1) - { + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } @@ -1577,8 +1581,7 @@ class Commande extends CommonOrder // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; $remise = 0; - if ($remise_percent > 0) - { + if ($remise_percent > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } @@ -1641,15 +1644,15 @@ class Commande extends CommonOrder } $result = $this->line->insert($user); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + 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, $mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -1688,16 +1691,19 @@ class Commande extends CommonOrder // phpcs:enable global $conf, $mysoc; - if (!$qty) $qty = 1; + if (!$qty) { + $qty = 1; + } - if ($idproduct > 0) - { + if ($idproduct > 0) { $prod = new Product($this->db); $prod->fetch($idproduct); $tva_tx = get_default_tva($mysoc, $this->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $this->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $vat_src_code = ''; // May be defined into tva_tx $localtax1_tx = get_localtax($tva_tx, 1, $this->thirdparty, $mysoc, $tva_npr); @@ -1729,8 +1735,12 @@ class Commande extends CommonOrder $line->fk_unit = $prod->fk_unit; // Save the start and end date of the line in the object - if ($date_start) { $line->date_start = $date_start; } - if ($date_end) { $line->date_end = $date_end; } + if ($date_start) { + $line->date_start = $date_start; + } + if ($date_end) { + $line->date_end = $date_end; + } $this->lines[] = $line; @@ -1747,7 +1757,7 @@ class Commande extends CommonOrder { // print "id : ".$value[1].' :qty: '.$value[0].'
    '; if not in lines { - $this->add_product($value[1], $value[0]); + $this->add_product($value[1], $value[0]); } } } @@ -1768,10 +1778,12 @@ class Commande extends CommonOrder public function fetch($id, $ref = '', $ref_ext = '', $notused = '') { // Check parameters - if (empty($id) && empty($ref) && empty($ref_ext)) return -1; + if (empty($id) && empty($ref) && empty($ref_ext)) { + return -1; + } $sql = 'SELECT c.rowid, c.entity, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_user_valid, c.fk_statut'; - $sql .= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason'; + $sql .= ', c.amount_ht, c.total_ht, c.total_ttc, c.total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason'; $sql .= ', c.fk_account'; $sql .= ', c.date_commande, c.date_valid, c.tms'; $sql .= ', c.date_livraison as delivery_date'; @@ -1794,20 +1806,27 @@ class Commande extends CommonOrder $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON c.fk_input_reason = dr.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid'; - if ($id) $sql .= " WHERE c.rowid=".$id; - else $sql .= " WHERE c.entity IN (".getEntity('commande').")"; // Dont't use entity if you use rowid + if ($id) { + $sql .= " WHERE c.rowid=".((int) $id); + } else { + $sql .= " WHERE c.entity IN (".getEntity('commande').")"; // Dont't use entity if you use rowid + } - if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'"; - if ($ref_ext) $sql .= " AND c.ref_ext='".$this->db->escape($ref_ext)."'"; - if ($notused) $sql .= " AND c.ref_int='".$this->db->escape($notused)."'"; + if ($ref) { + $sql .= " AND c.ref='".$this->db->escape($ref)."'"; + } + if ($ref_ext) { + $sql .= " AND c.ref_ext='".$this->db->escape($ref_ext)."'"; + } + if ($notused) { + $sql .= " AND c.ref_int='".$this->db->escape($notused)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { $this->id = $obj->rowid; $this->entity = $obj->entity; @@ -1887,7 +1906,9 @@ class Commande extends CommonOrder $this->lines = array(); - if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; + if ($this->statut == self::STATUS_DRAFT) { + $this->brouillon = 1; + } // Retrieve all extrafield // fetch optionals attributes and labels @@ -1897,8 +1918,7 @@ class Commande extends CommonOrder // Lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } return 1; @@ -1933,10 +1953,8 @@ class Commande extends CommonOrder $remise = new DiscountAbsolute($this->db); $result = $remise->fetch($idremise); - if ($result > 0) - { - if ($remise->fk_facture) // Protection against multiple submission - { + if ($result > 0) { + if ($remise->fk_facture) { // Protection against multiple submission $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); $this->db->rollback(); return -5; @@ -1963,11 +1981,9 @@ class Commande extends CommonOrder $line->total_ttc = -$remise->amount_ttc; $result = $line->insert(); - if ($result > 0) - { + if ($result > 0) { $result = $this->update_price(1); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return 1; } else { @@ -2011,18 +2027,18 @@ class Commande extends CommonOrder $sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)'; $sql .= ' WHERE l.fk_commande = '.$this->id; - if ($only_product) $sql .= ' AND p.fk_product_type = 0'; + if ($only_product) { + $sql .= ' AND p.fk_product_type = 0'; + } $sql .= ' ORDER BY l.rang, l.rowid'; dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $line = new OrderLine($this->db); @@ -2126,9 +2142,10 @@ class Commande extends CommonOrder public function getNbOfProductsLines() { $nb = 0; - foreach ($this->lines as $line) - { - if ($line->product_type == 0) $nb++; + foreach ($this->lines as $line) { + if ($line->product_type == 0) { + $nb++; + } } return $nb; } @@ -2141,9 +2158,10 @@ class Commande extends CommonOrder public function getNbOfServicesLines() { $nb = 0; - foreach ($this->lines as $line) - { - if ($line->product_type == 1) $nb++; + foreach ($this->lines as $line) { + if ($line->product_type == 1) { + $nb++; + } } return $nb; } @@ -2167,10 +2185,11 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::getNbOfShipments", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) $nb = $obj->nb; + if ($obj) { + $nb = $obj->nb; + } $this->db->free($resql); return $nb; @@ -2194,25 +2213,31 @@ class Commande extends CommonOrder $sql = 'SELECT cd.rowid, cd.fk_product,'; $sql .= ' sum(ed.qty) as qty'; $sql .= ' FROM '.MAIN_DB_PREFIX.'expeditiondet as ed,'; - if ($filtre_statut >= 0) $sql .= ' '.MAIN_DB_PREFIX.'expedition as e,'; + if ($filtre_statut >= 0) { + $sql .= ' '.MAIN_DB_PREFIX.'expedition as e,'; + } $sql .= ' '.MAIN_DB_PREFIX.'commandedet as cd'; $sql .= ' WHERE'; - if ($filtre_statut >= 0) $sql .= ' ed.fk_expedition = e.rowid AND'; + if ($filtre_statut >= 0) { + $sql .= ' ed.fk_expedition = e.rowid AND'; + } $sql .= ' ed.fk_origin_line = 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; + 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'; //print $sql; dol_syslog(get_class($this)."::loadExpeditions", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->expeditions[$obj->rowid] = $obj->qty; $i++; @@ -2245,11 +2270,12 @@ class Commande extends CommonOrder $sql .= " AND el.targettype = 'shipping'"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $row = $this->db->fetch_row($resql); return $row[0]; - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -2271,19 +2297,16 @@ class Commande extends CommonOrder // Recherche total en stock pour chaque produit // TODO $array_of_product est défini vide juste au dessus !! - if (count($array_of_product)) - { + if (count($array_of_product)) { $sql = "SELECT fk_product, sum(ps.reel) as total"; $sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; - $sql .= " WHERE ps.fk_product IN (".join(',', $array_of_product).")"; - $sql .= ' GROUP BY fk_product '; + $sql .= " WHERE ps.fk_product IN (".$this->db->sanitize(join(',', $array_of_product)).")"; + $sql .= ' GROUP BY fk_product'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->stocks[$obj->fk_product] = $obj->total; $i++; @@ -2303,21 +2326,18 @@ class Commande extends CommonOrder */ public function deleteline($user = null, $lineid = 0) { - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); $sql = "SELECT fk_product, qty"; $sql .= " FROM ".MAIN_DB_PREFIX."commandedet"; - $sql .= " WHERE rowid = ".$lineid; + $sql .= " WHERE rowid = ".((int) $lineid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { $product = new Product($this->db); $product->id = $obj->fk_product; @@ -2327,12 +2347,10 @@ class Commande extends CommonOrder // For triggers $line->fetch($lineid); - if ($line->delete($user) > 0) - { + if ($line->delete($user) > 0) { $result = $this->update_price(1); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return 1; } else { @@ -2364,6 +2382,8 @@ class Commande extends CommonOrder /** * Applique une remise relative * + * @deprecated + * @see setDiscount() * @param User $user User qui positionne la remise * @param float $remise Discount (percent) * @param int $notrigger 1=Does not execute triggers, 0= execute triggers @@ -2372,50 +2392,60 @@ class Commande extends CommonOrder public function set_remise($user, $remise, $notrigger = 0) { // phpcs:enable + dol_syslog(get_class($this)."::set_remise is deprecated, use setDiscount instead", LOG_NOTICE); + return $this->setDiscount($user, $remise, $notrigger); + } + + /** + * Set a percentage discount + * + * @param User $user User setting the discount + * @param float $remise Discount (percent) + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDiscount($user, $remise, $notrigger = 0) + { $remise = trim($remise) ?trim($remise) : 0; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { $error = 0; $this->db->begin(); - $remise = price2num($remise); + $remise = price2num($remise, 2); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; - $sql .= ' SET remise_percent = '.$remise; - $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut = '.self::STATUS_DRAFT.' ;'; + $sql .= ' SET remise_percent = '.((float) $remise); + $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut = '.self::STATUS_DRAFT; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->remise_percent = $remise; $this->update_price(1); } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2428,7 +2458,7 @@ class Commande extends CommonOrder // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Applique une remise absolue + * Set a fixed amount discount * * @param User $user User qui positionne la remise * @param float $remise Discount @@ -2438,50 +2468,48 @@ class Commande extends CommonOrder public function set_remise_absolue($user, $remise, $notrigger = 0) { // phpcs:enable - $remise = trim($remise) ?trim($remise) : 0; + if (empty($remise)) { + $remise = 0; + } - if ($user->rights->commande->creer) - { + $remise = price2num($remise); + + if ($user->rights->commande->creer) { $error = 0; $this->db->begin(); - $remise = price2num($remise); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; - $sql .= ' SET remise_absolue = '.$remise; - $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut = '.self::STATUS_DRAFT.' ;'; + $sql .= ' SET remise_absolue = '.((float) $remise); + $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut = '.self::STATUS_DRAFT; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->remise_absolue = $remise; $this->update_price(1); } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2504,8 +2532,7 @@ class Commande extends CommonOrder public function set_date($user, $date, $notrigger = 0) { // phpcs:enable - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { $error = 0; $this->db->begin(); @@ -2516,33 +2543,30 @@ class Commande extends CommonOrder dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->date = $date; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2580,8 +2604,7 @@ class Commande extends CommonOrder */ public function setDeliveryDate($user, $delivery_date, $notrigger = 0) { - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { $error = 0; $this->db->begin(); @@ -2592,34 +2615,31 @@ class Commande extends CommonOrder dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->date_livraison = $delivery_date; $this->delivery_date = $delivery_date; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2654,37 +2674,41 @@ class Commande extends CommonOrder $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " c.rowid as cid, c.ref"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user"; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->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"; - if (!$user->rights->societe->client->voir && !$socid) //restriction - { + if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if ($socid) $sql .= " AND s.rowid = ".$socid; - if ($draft) $sql .= " AND c.fk_statut = ".self::STATUS_DRAFT; - if (is_object($excluser)) $sql .= " AND c.fk_user_author <> ".$excluser->id; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } + if ($draft) { + $sql .= " AND c.fk_statut = ".self::STATUS_DRAFT; + } + if (is_object($excluser)) { + $sql .= " AND c.fk_user_author <> ".$excluser->id; + } $sql .= $this->db->order($sortfield, $sortorder); $sql .= $this->db->plimit($limit, $offset); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $numc = $this->db->num_rows($result); - if ($numc) - { + if ($numc) { $i = 0; - while ($i < $numc) - { + while ($i < $numc) { $obj = $this->db->fetch_object($result); - if ($shortlist == 1) - { + if ($shortlist == 1) { $ga[$obj->cid] = $obj->ref; - } elseif ($shortlist == 2) - { + } elseif ($shortlist == 2) { $ga[$obj->cid] = $obj->ref.' ('.$obj->name.')'; } else { $ga[$i]['id'] = $obj->cid; @@ -2713,45 +2737,41 @@ class Commande extends CommonOrder global $user; dol_syslog('Commande::availability('.$availability_id.')'); - if ($this->statut >= self::STATUS_DRAFT) - { + if ($this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; - $sql .= ' SET fk_availability = '.$availability_id; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' SET fk_availability = '.((int) $availability_id); + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->availability_id = $availability_id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2781,45 +2801,41 @@ class Commande extends CommonOrder global $user; dol_syslog('Commande::demand_reason('.$demand_reason_id.')'); - if ($this->statut >= self::STATUS_DRAFT) - { + if ($this->statut >= self::STATUS_DRAFT) { $error = 0; $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande'; - $sql .= ' SET fk_input_reason = '.$demand_reason_id; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' SET fk_input_reason = '.((int) $demand_reason_id); + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->demand_reason_id = $demand_reason_id; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2847,44 +2863,40 @@ class Commande extends CommonOrder public function set_ref_client($user, $ref_client, $notrigger = 0) { // phpcs:enable - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { $error = 0; $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET'; - $sql .= ' ref_client = '.(empty($ref_client) ? 'NULL' : '\''.$this->db->escape($ref_client).'\''); + $sql .= ' ref_client = '.(empty($ref_client) ? 'NULL' : "'".$this->db->escape($ref_client)."'"); $sql .= ' WHERE rowid = '.$this->id; dol_syslog(__METHOD__.' this->id='.$this->id.', ref_client='.$ref_client, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->ref_client = $ref_client; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2907,8 +2919,7 @@ class Commande extends CommonOrder { $error = 0; - if ($this->billed) - { + if ($this->billed) { return 0; } @@ -2918,29 +2929,26 @@ class Commande extends CommonOrder $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; dol_syslog(get_class($this)."::classifyBilled", LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$error) - { + if ($this->db->query($sql)) { + if (!$error) { $this->oldcopy = clone $this; $this->billed = 1; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_CLASSIFY_BILLED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::classifyBilled ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2957,11 +2965,12 @@ class Commande extends CommonOrder /** * Classify the order as not invoiced * - * @return int <0 if ko, >0 if ok + * @param User $user Object user making the change + * @param int $notrigger 1=Does not execute triggers, 0=execute triggers + * @return int <0 if ko, >0 if ok */ - public function classifyUnBilled() + public function classifyUnBilled(User $user, $notrigger = 0) { - global $conf, $user, $langs; $error = 0; $this->db->begin(); @@ -2970,28 +2979,28 @@ class Commande extends CommonOrder $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; dol_syslog(get_class($this)."::classifyUnBilled", LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$error) - { + if ($this->db->query($sql)) { + if (!$error) { $this->oldcopy = clone $this; $this->billed = 1; } - // Call trigger - $result = $this->call_trigger('ORDER_CLASSIFY_UNBILLED', $user); - if ($result < 0) $error++; - // End call triggers + if (!$notrigger && empty($error)) { + // Call trigger + $result = $this->call_trigger('ORDER_CLASSIFY_UNBILLED', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } - if (!$error) - { + if (!$error) { $this->billed = 0; $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -3042,17 +3051,32 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code, ref_ext=$ref_ext"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - if ($this->statut == Commande::STATUS_DRAFT) - { + if ($this->statut == Commande::STATUS_DRAFT) { // 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_percent)) $remise_percent = 0; - if (empty($special_code) || $special_code == 3) $special_code = 0; - if (empty($ref_ext)) $ref_ext = ''; + 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_percent)) { + $remise_percent = 0; + } + if (empty($special_code) || $special_code == 3) { + $special_code = 0; + } + if (empty($ref_ext)) { + $ref_ext = ''; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -3083,8 +3107,7 @@ class Commande extends CommonOrder // Clean vat code $vat_src_code = ''; $reg = array(); - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -3108,15 +3131,13 @@ class Commande extends CommonOrder // Anciens indicateurs: $price, $subprice (a ne plus utiliser) $price = $pu_ht; - if ($price_base_type == 'TTC') - { + if ($price_base_type == 'TTC') { $subprice = $pu_ttc; } else { $subprice = $pu_ht; } $remise = 0; - if ($remise_percent > 0) - { + if ($remise_percent > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = ($pu - $remise); } @@ -3126,18 +3147,18 @@ class Commande extends CommonOrder $line->fetch($rowid); $line->fetch_optionals(); - if (!empty($line->fk_product)) - { + if (!empty($line->fk_product)) { $product = new Product($this->db); $result = $product->fetch($line->fk_product); $product_type = $product->type; - if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty) - { + if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty) { $langs->load("errors"); $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref); $this->errors[] = $this->error; + dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR); + $this->db->rollback(); return self::STOCK_NOT_ENOUGH_FOR_ORDER; } @@ -3150,8 +3171,7 @@ class Commande extends CommonOrder $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) - { + if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) { $rangmax = $this->line_max($fk_parent_line); $this->line->rang = $rangmax + 1; } @@ -3205,10 +3225,11 @@ class Commande extends CommonOrder } $result = $this->line->update($user, $notrigger); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } // Mise a jour info denormalisees $this->update_price(1); @@ -3242,12 +3263,24 @@ class Commande extends CommonOrder $error = 0; // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); - 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->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)) { + $this->ref = trim($this->ref); + } + if (isset($this->ref_client)) { + $this->ref_client = trim($this->ref_client); + } + 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->model_pdf)) { + $this->model_pdf = trim($this->model_pdf); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } $delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date; // Check parameters @@ -3262,7 +3295,7 @@ class Commande extends CommonOrder $sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").","; $sql .= " date_commande=".(strval($this->date_commande) != '' ? "'".$this->db->idate($this->date_commande)."'" : 'null').","; $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; - $sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; + $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; $sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").","; $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; @@ -3279,10 +3312,10 @@ class Commande extends CommonOrder $sql .= " fk_input_reason=".($this->demand_reason_id > 0 ? $this->demand_reason_id : "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->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "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 .= " WHERE rowid=".((int) $this->id); $this->db->begin(); @@ -3292,28 +3325,25 @@ class Commande extends CommonOrder $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -3346,13 +3376,14 @@ class Commande extends CommonOrder if (!$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Test we can delete - if ($this->nb_expedition() != 0) - { + if ($this->nb_expedition() != 0) { $this->errors[] = $langs->trans('SomeShipmentExists'); $error++; } @@ -3373,13 +3404,17 @@ class Commande extends CommonOrder if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } // Removed extrafields of object @@ -3466,8 +3501,7 @@ class Commande extends CommonOrder $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut, c.total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -3475,11 +3509,12 @@ class Commande extends CommonOrder $sql .= $clause." c.entity IN (".getEntity('commande').")"; //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; $sql .= " AND ((c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.")) OR (c.fk_statut = ".self::STATUS_CLOSED." AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected - if ($user->socid) $sql .= " AND c.fk_soc = ".$user->socid; + if ($user->socid) { + $sql .= " AND c.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $response = new WorkboardResponse(); $response->warning_delay = $conf->commande->client->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("OrdersToProcess"); @@ -3489,8 +3524,7 @@ class Commande extends CommonOrder $generic_commande = new Commande($this->db); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $response->total += $obj->total_ht; @@ -3523,7 +3557,9 @@ class Commande extends CommonOrder $label = $langs->trans('OrderSource'.$this->source); - if ($label == 'OrderSource') return ''; + if ($label == 'OrderSource') { + return ''; + } return $label; } @@ -3554,7 +3590,9 @@ class Commande extends CommonOrder global $langs, $conf; $billedtext = ''; - if (empty($donotshowbilled)) $billedtext .= ($billed ? ' - '.$langs->transnoentitiesnoconv("Billed") : ''); + if (empty($donotshowbilled)) { + $billedtext .= ($billed ? ' - '.$langs->transnoentitiesnoconv("Billed") : ''); + } $labelTooltip = ''; @@ -3614,25 +3652,36 @@ class Commande extends CommonOrder { global $conf, $langs, $user; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; - if (!empty($conf->expedition->enabled) && ($option == '1' || $option == '2')) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id; - else $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id; - - if (!$user->rights->commande->lire) - $option = 'nolink'; - - 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'; + if (!empty($conf->expedition->enabled) && ($option == '1' || $option == '2')) { + $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id; + } else { + $url = DOL_URL_ROOT.'/commande/card.php?id='.$this->id; } - if ($short) return $url; + if (!$user->rights->commande->lire) { + $option = 'nolink'; + } + + 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'; + } + } + + if ($short) { + return $url; + } $label = ''; @@ -3642,7 +3691,7 @@ class Commande extends CommonOrder $label .= ' '.$this->getLibStatut(5); } $label .= '
    '.$langs->trans('Ref').': '.$this->ref; - $label .= '
    '.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client); + $label .= '
    '.$langs->trans('RefCustomer').': '.(empty($this->ref_customer) ? (empty($this->ref_client) ? '' : $this->ref_client) : $this->ref_customer); if (!empty($this->total_ht)) { $label .= '
    '.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); } @@ -3661,10 +3710,8 @@ class Commande extends CommonOrder } $linkclose = ''; - if (empty($notooltip) && $user->rights->commande->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->commande->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Order"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -3682,15 +3729,17 @@ class Commande extends CommonOrder } $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; + 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) - { + if ($addlinktonotes) { $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { + if ($txttoshow) { $notetoshow = $langs->trans("ViewPrivateNote").':
    '.dol_string_nohtmltag($txttoshow, 1); $result .= ' '; $result .= ''; @@ -3719,30 +3768,25 @@ class Commande extends CommonOrder $sql .= ' date_cloture as datecloture,'; $sql .= ' fk_user_author, fk_user_valid, fk_user_cloture'; $sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c'; - $sql .= ' WHERE c.rowid = '.$id; + $sql .= ' WHERE c.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -3783,12 +3827,10 @@ class Commande extends CommonOrder $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -3816,8 +3858,7 @@ class Commande extends CommonOrder // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new OrderLine($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; @@ -3825,8 +3866,7 @@ class Commande extends CommonOrder $line->subprice = 100; $line->price = 100; $line->tva_tx = 20; - if ($xnbp == 2) - { + if ($xnbp == 2) { $line->total_ht = 50; $line->total_ttc = 60; $line->total_tva = 10; @@ -3837,8 +3877,7 @@ class Commande extends CommonOrder $line->total_tva = 20; $line->remise_percent = 0; } - if ($num_prods > 0) - { + if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; $line->product_ref = 'SPECIMEN'; @@ -3872,8 +3911,7 @@ class Commande extends CommonOrder $sql = "SELECT count(co.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."commande 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) - { + 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"; @@ -3881,10 +3919,8 @@ class Commande extends CommonOrder $sql .= " ".$clause." co.entity IN (".getEntity('commande').")"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["orders"] = $obj->nb; } $this->db->free($resql); @@ -3929,7 +3965,7 @@ class Commande extends CommonOrder if (!empty($this->model_pdf)) { $modele = $this->model_pdf; - } elseif (!empty($this->modelpdf)) { // dperecated + } elseif (!empty($this->modelpdf)) { // deprecated $modele = $this->modelpdf; } elseif (!empty($conf->global->COMMANDE_ADDON_PDF)) { $modele = $conf->global->COMMANDE_ADDON_PDF; @@ -3986,8 +4022,11 @@ class Commande extends CommonOrder { global $conf, $langs; - if (empty($this->date_livraison)) $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); - else $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->date_livraison, 'day'); + if (empty($this->date_livraison)) { + $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); + } else { + $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->date_livraison, 'day'); + } $text .= ' '.($conf->commande->client->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->client->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); return $text; @@ -4091,10 +4130,9 @@ class OrderLine extends CommonOrderLine $sql .= ' cd.date_start, cd.date_end'; $sql .= ' FROM '.MAIN_DB_PREFIX.'commandedet as cd'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid'; - $sql .= ' WHERE cd.rowid = '.$rowid; + $sql .= ' WHERE cd.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); $this->rowid = $objp->rowid; $this->id = $objp->rowid; @@ -4170,11 +4208,15 @@ class OrderLine extends CommonOrderLine $error = 0; + if (empty($this->id) && !empty($this->rowid)) { // For backward compatibility + $this->id = $this->rowid; + } + // check if order line is not in a shipment line before deleting $sqlCheckShipmentLine = "SELECT"; $sqlCheckShipmentLine .= " ed.rowid"; $sqlCheckShipmentLine .= " FROM ".MAIN_DB_PREFIX."expeditiondet ed"; - $sqlCheckShipmentLine .= " WHERE ed.fk_origin_line = ".$this->rowid; + $sqlCheckShipmentLine .= " WHERE ed.fk_origin_line = ".((int) $this->id); $resqlCheckShipmentLine = $this->db->query($sqlCheckShipmentLine); if (!$resqlCheckShipmentLine) { @@ -4199,29 +4241,27 @@ class OrderLine extends CommonOrderLine $this->db->begin(); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid=".$this->rowid; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid = ".((int) $this->id); dol_syslog("OrderLine::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Remove extrafields - if (!$error) - { + if (!$error) { $this->id = $this->rowid; $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEORDER_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -4230,8 +4270,7 @@ class OrderLine extends CommonOrderLine return 1; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -4261,27 +4300,55 @@ class OrderLine extends CommonOrderLine 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; - 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; + } + 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; + } + if (empty($this->ref_ext)) { + $this->ref_ext = ''; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0 && $pa_ht_isemptystring) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0 && $pa_ht_isemptystring) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -4289,7 +4356,9 @@ class OrderLine extends CommonOrderLine } // Check parameters - if ($this->product_type < 0) return -1; + if ($this->product_type < 0) { + return -1; + } $this->db->begin(); @@ -4345,25 +4414,23 @@ class OrderLine extends CommonOrderLine dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'commandedet'); $this->rowid = $this->id; - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEORDER_INSERT', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -4372,8 +4439,7 @@ class OrderLine extends CommonOrderLine return 1; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::insert ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -4402,30 +4468,64 @@ class OrderLine extends CommonOrderLine $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'. // 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->qty)) $this->qty = 0; - if (empty($this->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; - if (empty($this->marque_tx)) $this->marque_tx = 0; - if (empty($this->marge_tx)) $this->marge_tx = 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->product_type)) $this->product_type = 0; - if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; - if (empty($this->pa_ht)) $this->pa_ht = 0; - 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; + } + if (empty($this->localtax1_type)) { + $this->localtax1_type = 0; + } + if (empty($this->localtax2_type)) { + $this->localtax2_type = 0; + } + if (empty($this->qty)) { + $this->qty = 0; + } + if (empty($this->total_localtax1)) { + $this->total_localtax1 = 0; + } + if (empty($this->total_localtax2)) { + $this->total_localtax2 = 0; + } + if (empty($this->marque_tx)) { + $this->marque_tx = 0; + } + if (empty($this->marge_tx)) { + $this->marge_tx = 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->product_type)) { + $this->product_type = 0; + } + if (empty($this->fk_parent_line)) { + $this->fk_parent_line = 0; + } + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } + if (empty($this->ref_ext)) { + $this->ref_ext = ''; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0 && $pa_ht_isemptystring) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0 && $pa_ht_isemptystring) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -4450,8 +4550,7 @@ class OrderLine extends CommonOrderLine $sql .= " , remise_percent=".price2num($this->remise_percent).""; $sql .= " , price=".price2num($this->price).""; // TODO A virer $sql .= " , remise=".price2num($this->remise).""; // TODO A virer - if (empty($this->skip_update_total)) - { + 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).""; @@ -4466,7 +4565,9 @@ class OrderLine extends CommonOrderLine $sql .= " , date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); $sql .= " , product_type=".$this->product_type; $sql .= " , fk_parent_line=".(!empty($this->fk_parent_line) ? $this->fk_parent_line : "null"); - if (!empty($this->rang)) $sql .= ", rang=".$this->rang; + if (!empty($this->rang)) { + $sql .= ", rang=".$this->rang; + } $sql .= " , fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); // Multicurrency @@ -4479,23 +4580,21 @@ class OrderLine extends CommonOrderLine dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$error) - { + if ($resql) { + if (!$error) { $this->id = $this->rowid; $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEORDER_UPDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -4504,8 +4603,7 @@ class OrderLine extends CommonOrderLine return 1; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -4531,8 +4629,12 @@ class OrderLine extends CommonOrderLine $this->db->begin(); // Clean parameters - if (empty($this->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; + if (empty($this->total_localtax1)) { + $this->total_localtax1 = 0; + } + if (empty($this->total_localtax2)) { + $this->total_localtax2 = 0; + } // Mise a jour ligne en base $sql = "UPDATE ".MAIN_DB_PREFIX."commandedet SET"; @@ -4546,8 +4648,7 @@ class OrderLine extends CommonOrderLine dol_syslog("OrderLine::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 57f8147cd57..85036543e18 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -20,9 +20,9 @@ */ /** - * \file htdocs/commande/class/commandestats.class.php - * \ingroup commandes - * \brief File of class to manage order statistics + * \file htdocs/commande/class/commandestats.class.php + * \ingroup commandes + * \brief File of class to manage order statistics */ include_once DOL_DOCUMENT_ROOT.'/core/class/stats.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; @@ -70,16 +70,14 @@ class CommandeStats extends Stats $this->cachefilesuffix = $mode; $this->join = ''; - if ($mode == 'customer') - { + if ($mode == 'customer') { $object = new Commande($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; $this->field = 'total_ht'; $this->field_line = 'total_ht'; //$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled - } elseif ($mode == 'supplier') - { + } elseif ($mode == 'supplier') { $object = new CommandeFournisseur($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; @@ -90,24 +88,25 @@ class CommandeStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '').'c.entity IN ('.getEntity('commande').')'; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($this->socid) - { + if (!$user->rights->societe->client->voir && !$this->socid) { + $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($this->socid) { $this->where .= " AND c.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; - - if ($typentid) - { - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = c.fk_soc'; - $this->where .= ' AND s.fk_typent = '.$typentid; + if ($this->userid > 0) { + $this->where .= ' AND c.fk_user_author = '.$this->userid; } - if ($categid) - { + if ($typentid) { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = c.fk_soc'; + $this->where .= ' AND s.fk_typent = '.((int) $typentid); + } + + if ($categid) { $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cats ON cats.fk_soc = c.fk_soc'; $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie'; - $this->where .= ' AND cat.rowid = '.$categid; + $this->where .= ' AND cat.rowid = '.((int) $categid); } } @@ -124,7 +123,9 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -147,7 +148,9 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; @@ -169,7 +172,9 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -192,7 +197,9 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, AVG(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; @@ -213,7 +220,9 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; @@ -235,7 +244,9 @@ class CommandeStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; diff --git a/htdocs/commande/class/index.html b/htdocs/commande/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 7df7dbea130..3160c8e289a 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2021 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 @@ -40,7 +41,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $id, ''); $object = new Commande($db); @@ -49,55 +52,43 @@ $object = new Commande($db); * Ajout d'un nouveau contact */ -if ($action == 'addcontact' && $user->rights->commande->creer) -{ +if ($action == 'addcontact' && $user->rights->commande->creer) { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// bascule du statut d'un contact -elseif ($action == 'swapstatut' && $user->rights->commande->creer) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && $user->rights->commande->creer) { + // bascule du statut d'un contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } -} - -// Efface un contact -elseif ($action == 'deletecontact' && $user->rights->commande->creer) -{ +} elseif ($action == 'deletecontact' && $user->rights->commande->creer) { + // Efface un contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } /* @@ -128,23 +119,17 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - $langs->trans("OrderCard"); - - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); $head = commande_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order'); - // Order card $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
    '; // Ref customer $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); @@ -152,12 +137,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref .= ' : '; @@ -195,10 +178,11 @@ if ($id > 0 || !empty($ref)) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } else { // Contact not found diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index f2f806cc7af..6dfa898a024 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -33,14 +33,14 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $action = GETPOST('action', 'aZ09'); // Secrutiy check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -if (!$user->rights->facture->creer) -accessforbidden(); +if (!$user->rights->facture->creer) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array("companies", "orders")); @@ -49,12 +49,18 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "nom"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "nom"; +} /* @@ -71,26 +77,35 @@ $thirdpartystatic = new Societe($db); $sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea"; $sql .= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user "; +} $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."commande as c"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.fk_stcomm = st.id AND c.fk_soc = s.rowid"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if (dol_strlen($stcomm)) -{ +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} +if (dol_strlen($stcomm)) { $sql .= " AND s.fk_stcomm=".$stcomm; } -if (GETPOST("search_nom")) $sql .= natural_search("s.nom", GETPOST("search_nom")); -if (GETPOST("search_compta")) $sql .= natural_search("s.code_compta", GETPOST("search_compta")); -if (GETPOST("search_code_client")) $sql .= natural_search("s.code_client", GETPOST("search_code_client")); -if (dol_strlen($begin)) -{ +if (GETPOST("search_nom")) { + $sql .= natural_search("s.nom", GETPOST("search_nom")); +} +if (GETPOST("search_compta")) { + $sql .= natural_search("s.code_compta", GETPOST("search_compta")); +} +if (GETPOST("search_code_client")) { + $sql .= natural_search("s.code_client", GETPOST("search_code_client")); +} +if (dol_strlen($begin)) { $sql .= " AND s.nom like '".$db->escape($begin)."'"; } -if ($socid > 0) -{ - $sql .= " AND s.rowid = ".$socid; +if ($socid > 0) { + $sql .= " AND s.rowid = ".((int) $socid); } $sql .= " AND c.fk_statut in (1, 2) AND c.facture = 0"; $sql .= " GROUP BY s.nom"; @@ -98,13 +113,11 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -114,8 +127,7 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -155,8 +167,7 @@ if ($resql) print "\n"; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); print '
    '; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 9ec4e1250f5..c61f7c63542 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -45,8 +45,7 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref'); // Security check -if ($user->socid) -{ +if ($user->socid) { $socid = $user->socid; } $result = restrictedArea($user, 'commande', $id, ''); @@ -56,16 +55,26 @@ $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 (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; } -if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; } +if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { + $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; +} +if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { + $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; +} -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Commande($db); @@ -74,13 +83,12 @@ $object = new Commande($db); * Actions */ -if ($object->fetch($id)) -{ +if ($object->fetch($id)) { $object->fetch_thirdparty(); $upload_dir = $conf->commande->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref); } -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -91,10 +99,8 @@ llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients| $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref)) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); $upload_dir = $conf->commande->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); @@ -105,8 +111,7 @@ if ($id > 0 || !empty($ref)) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -122,12 +127,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref .= ' : '; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 4a18f96ddde..dc15b85525c 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!$user->rights->commande->lire) accessforbidden(); +if (!$user->rights->commande->lire) { + accessforbidden(); +} $hookmanager = new HookManager($db); @@ -43,12 +45,17 @@ $langs->loadLangs(array('orders', 'bills')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + +// 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; /* @@ -69,20 +76,6 @@ print load_fiche_titre($langs->trans("OrdersArea"), '', 'order'); print '
    '; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - // Search customer orders - print ''; - print ''; - print '
    '; - print '
    '; - print ''; - print ''; - print "
    '.$langs->trans("Search").'
    '; - print $langs->trans("CustomerOrder").':

    \n"; -} - - /* * Statistics */ @@ -90,16 +83,21 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $sql = "SELECT count(c.rowid) as nb, c.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('societe').")"; -if ($user->socid) $sql .= ' AND c.fk_soc = '.$user->socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($user->socid) { + $sql .= ' AND c.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 c.fk_statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -109,14 +107,14 @@ if ($resql) $colorseries = array(); $vals = array(); // -1=Canceled, 0=Draft, 1=Validated, 2=Accepted/On process, 3=Closed (Sent/Received, billed or not) - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); - if ($row) - { + if ($row) { //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) { - if (!isset($vals[$row[1]])) $vals[$row[1]] = 0; + if (!isset($vals[$row[1]])) { + $vals[$row[1]] = 0; + } $vals[$row[1]] += $row[0]; $totalinprocess += $row[0]; } @@ -126,24 +124,34 @@ if ($resql) } $db->free($resql); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '
    '; print ''; print ''."\n"; $listofstatus = array(0, 1, 2, 3, -1); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array($commandestatic->LibStatut($status, 0, 1, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == Commande::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == Commande::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == Commande::STATUS_SHIPMENTONPROCESS) $colorseries[$status] = $badgeStatus4; - if ($status == Commande::STATUS_CLOSED && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) $colorseries[$status] = $badgeStatus6; - if ($status == Commande::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) $colorseries[$status] = $badgeStatus6; - if ($status == Commande::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; + if ($status == Commande::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Commande::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Commande::STATUS_SHIPMENTONPROCESS) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == Commande::STATUS_CLOSED && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { + $colorseries[$status] = $badgeStatus6; + } + if ($status == Commande::STATUS_CLOSED && (!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) { + $colorseries[$status] = $badgeStatus6; + } + if ($status == Commande::STATUS_CANCELED) { + $colorseries[$status] = $badgeStatus9; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print ''; print ''; print '\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print ''; print ''; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); print ''; print '
    '.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'
    '.$commandestatic->LibStatut($status, 0, 0, 1).''.(isset($vals[$status]) ? $vals[$status] : 0).' '; @@ -152,8 +160,7 @@ if ($resql) print "
    '; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -181,35 +188,37 @@ if ($resql) /* * Draft orders */ -if (!empty($conf->commande->enabled)) -{ +if (!empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; $sql .= " AND c.fk_statut = 0"; - if ($socid) $sql .= " AND c.fk_soc = ".$socid; - 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 = ".((int) $socid); + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '
    '; print ''; print ''; print ''; $langs->load("orders"); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $commandestatic->id = $obj->rowid; @@ -254,29 +263,32 @@ $sql .= ", s.code_client"; $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; //$sql.= " AND c.fk_statut > 2"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; -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; +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= " ORDER BY c.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '
    '; print '
    '.$langs->trans("DraftOrders").'
    '; print ''; print ''; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; @@ -319,32 +331,38 @@ if ($resql) } } print "
    '.$langs->trans("LastModifiedOrders", $max).'

    "; -} else dol_print_error($db); +} else { + dol_print_error($db); +} $max = 10; /* * Orders to process */ -if (!empty($conf->commande->enabled)) -{ +if (!empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; $sql .= " AND c.fk_statut = ".Commande::STATUS_VALIDATED; - if ($socid) $sql .= " AND c.fk_soc = ".$socid; - 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; + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $sql .= " ORDER BY c.rowid DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -352,11 +370,9 @@ if (!empty($conf->commande->enabled)) print '
    '.$langs->trans("OrdersToProcess").' '.$num.'
    '; @@ -405,31 +421,37 @@ if (!empty($conf->commande->enabled)) } print "

    "; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } /* * Orders that are in process */ -if (!empty($conf->commande->enabled)) -{ +if (!empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, c.facture, c.date_commande as date, s.nom as name, s.rowid as socid"; $sql .= ", s.client"; $sql .= ", s.code_client"; $sql .= ", s.canvas"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; $sql .= " AND c.fk_statut = ".Commande::STATUS_ACCEPTED; - if ($socid) $sql .= " AND c.fk_soc = ".$socid; - 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; + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $sql .= " ORDER BY c.rowid DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -437,11 +459,9 @@ if (!empty($conf->commande->enabled)) print '
    '.$langs->trans("OnProcessOrders").' '.$num.'
    '; @@ -489,7 +509,9 @@ if (!empty($conf->commande->enabled)) } } print "

    "; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 117afab2398..5dd9a64a8a6 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -31,7 +31,9 @@ if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } -if (!$user->rights->commande->lire) accessforbidden(); +if (!$user->rights->commande->lire) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('orders', 'sendings', 'bills')); @@ -42,12 +44,13 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $comid, ''); $object = new Commande($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); exit; } @@ -78,12 +81,10 @@ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_cl // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref .= ' : '; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 3efa8f534a4..db6bba130b1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -56,9 +56,13 @@ $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'orderlist'; $search_datecloture_start = GETPOST('search_datecloture_start', 'int'); -if (empty($search_datecloture_start)) $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int')); +if (empty($search_datecloture_start)) { + $search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int')); +} $search_datecloture_end = GETPOST('search_datecloture_end', 'int'); -if (empty($search_datecloture_end)) $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int')); +if (empty($search_datecloture_end)) { + $search_datecloture_end = dol_mktime(23, 59, 59, GETPOST('search_datecloture_endmonth', 'int'), GETPOST('search_datecloture_endday', 'int'), GETPOST('search_datecloture_endyear', 'int')); +} $search_dateorder_start = dol_mktime(0, 0, 0, GETPOST('search_dateorder_start_month', 'int'), GETPOST('search_dateorder_start_day', 'int'), GETPOST('search_dateorder_start_year', 'int')); $search_dateorder_end = dol_mktime(23, 59, 59, GETPOST('search_dateorder_end_month', 'int'), GETPOST('search_dateorder_end_day', 'int'), GETPOST('search_dateorder_end_year', 'int')); $search_datedelivery_start = dol_mktime(0, 0, 0, GETPOST('search_datedelivery_start_month', 'int'), GETPOST('search_datedelivery_start_day', 'int'), GETPOST('search_datedelivery_start_year', 'int')); @@ -67,6 +71,7 @@ $search_product_category = GETPOST('search_product_category', 'int'); $search_ref = GETPOST('search_ref', 'alpha') != '' ?GETPOST('search_ref', 'alpha') : GETPOST('sref', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); +$search_company_alias = GETPOST('search_company_alias', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); $search_state = GETPOST("search_state", 'alpha'); @@ -95,11 +100,15 @@ $search_remove_btn = GETPOST('button_removefilter', 'alpha'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); $search_project = GETPOST('search_project', 'alpha'); $search_shippable = GETPOST('search_shippable', 'aZ09'); - +$search_fk_cond_reglement = GETPOST("search_fk_cond_reglement", 'int'); +$search_fk_shipping_method = GETPOST("search_fk_shipping_method", 'int'); +$search_fk_mode_reglement = GETPOST("search_fk_mode_reglement", 'int'); // Security check $id = (GETPOST('orderid') ?GETPOST('orderid', 'int') : GETPOST('id', 'int')); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $id, ''); $diroutputmassaction = $conf->commande->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id; @@ -109,12 +118,18 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = 'c.ref'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'c.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} $show_shippable_command = GETPOST('show_shippable_command', 'aZ09'); @@ -138,7 +153,9 @@ $fieldstosearchall = array( 's.town'=>"Town", 'c.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["c.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["c.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -147,6 +164,7 @@ $arrayfields = array( 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20), 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>25), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>31), 's.town'=>array('label'=>"Town", 'checked'=>1, 'position'=>35), 's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>40), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), @@ -154,6 +172,9 @@ $arrayfields = array( 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55), 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60), 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65), + 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)), + 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>0, 'position'=>67), + 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0, 'position'=>68), 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), @@ -184,21 +205,25 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_categ = ''; $search_user = ''; $search_sale = ''; @@ -206,6 +231,7 @@ if (empty($reshook)) $search_ref = ''; $search_ref_customer = ''; $search_company = ''; + $search_company_alias = ''; $search_town = ''; $search_zip = ""; $search_state = ""; @@ -235,10 +261,12 @@ if (empty($reshook)) $search_categ_cus = 0; $search_datecloture_start = ''; $search_datecloture_end = ''; + $search_fk_cond_reglement = ''; + $search_fk_shipping_method = ''; + $search_fk_mode_reglement = ''; } 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')) - { + || 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 } @@ -271,20 +299,28 @@ $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_P // llxHeader('',$title,$help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; -$sql .= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; +if ($sall || $search_product_category > 0 || $search_user > 0) { + $sql = 'SELECT DISTINCT'; +} +$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; -$sql .= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client, c.fk_user_author,'; +$sql .= ' c.rowid, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.ref_client, c.fk_user_author,'; $sql .= ' c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva as multicurrency_total_vat, c.multicurrency_total_ttc,'; $sql .= ' c.date_valid, c.date_commande, c.note_public, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,'; $sql .= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture as date_cloture,'; $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,"; -$sql .= " u.login"; -if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; +$sql .= " u.login,"; +$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method'; +if ($search_categ_cus) { + $sql .= ", cc.fk_categorie, cc.fk_soc"; +} // 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 : ''); +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 : ''); + } +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -293,82 +329,171 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -if (!empty($search_categ_cus)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ_cus)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +} $sql .= ', '.MAIN_DB_PREFIX.'commande as c'; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; -if ($sall || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)"; +} +if ($sall || $search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; +} +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."projet as p ON p.rowid = c.fk_projet"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON c.fk_user_author = u.rowid'; // 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"; -if ($search_user > 0) -{ +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } $sql .= ' WHERE c.fk_soc = s.rowid'; $sql .= ' AND c.entity IN ('.getEntity('commande').')'; -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; -if ($socid > 0) $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 ($search_ref) $sql .= natural_search('c.ref', $search_ref); -if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer); -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND c.facture = '.$search_billed; -if ($search_status <> '') -{ - if ($search_status < 4 && $search_status > -3) - { - if ($search_status == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated' - else $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$search_product_category; +} +if ($socid > 0) { + $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 ($search_ref) { + $sql .= natural_search('c.ref', $search_ref); +} +if ($search_ref_customer) { + $sql .= natural_search('c.ref_client', $search_ref_customer); +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($search_billed != '' && $search_billed >= 0) { + $sql .= ' AND c.facture = '.$search_billed; +} +if ($search_status <> '') { + if ($search_status < 4 && $search_status > -3) { + if ($search_status == 1 && empty($conf->expedition->enabled)) { + $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated' + } else { + $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee + } } - if ($search_status == 4) - { + if ($search_status == 4) { $sql .= ' AND c.facture = 1'; // invoice created } - if ($search_status == -2) // To process - { + if ($search_status == -2) { // To process //$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0'; $sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected } - if ($search_status == -3) // To bill - { + if ($search_status == -3) { // To bill //$sql.= ' AND c.fk_statut in (1,2,3)'; //$sql.= ' AND c.facture = 0'; // invoice not created $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed } } -if ($search_datecloture_start) $sql .= " AND c.date_cloture >= '".$db->idate($search_datecloture_start)."'"; -if ($search_datecloture_end) $sql .= " AND c.date_cloture <= '".$db->idate($search_datecloture_end)."'"; -if ($search_dateorder_start) $sql .= " AND c.date_commande >= '".$db->idate($search_dateorder_start)."'"; -if ($search_dateorder_end) $sql .= " AND c.date_commande <= '".$db->idate($search_dateorder_end)."'"; -if ($search_datedelivery_start) $sql .= " AND c.date_livraison >= '".$db->idate($search_datedelivery_start)."'"; -if ($search_datedelivery_end) $sql .= " AND c.date_livraison <= '".$db->idate($search_datedelivery_end)."'"; -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 (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$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 = ".$search_sale; -if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; -if ($search_total_ht != '') $sql .= natural_search('c.total_ht', $search_total_ht, 1); -if ($search_total_vat != '') $sql .= natural_search('c.tva', $search_total_vat, 1); -if ($search_total_ttc != '') $sql .= natural_search('c.total_ttc', $search_total_ttc, 1); -if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1); -if ($search_multicurrency_code != '') $sql .= ' AND c.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; -if ($search_multicurrency_tx != '') $sql .= natural_search('c.multicurrency_tx', $search_multicurrency_tx, 1); -if ($search_multicurrency_montant_ht != '') $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); -if ($search_multicurrency_montant_vat != '') $sql .= natural_search('c.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); -if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('c.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); -if ($search_login) $sql .= natural_search("u.login", $search_login); -if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_ref); -if ($search_project != '') $sql .= natural_search("p.title", $search_project); -if ($search_categ_cus > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); -if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL"; +if ($search_datecloture_start) { + $sql .= " AND c.date_cloture >= '".$db->idate($search_datecloture_start)."'"; +} +if ($search_datecloture_end) { + $sql .= " AND c.date_cloture <= '".$db->idate($search_datecloture_end)."'"; +} +if ($search_dateorder_start) { + $sql .= " AND c.date_commande >= '".$db->idate($search_dateorder_start)."'"; +} +if ($search_dateorder_end) { + $sql .= " AND c.date_commande <= '".$db->idate($search_dateorder_end)."'"; +} +if ($search_datedelivery_start) { + $sql .= " AND c.date_livraison >= '".$db->idate($search_datedelivery_start)."'"; +} +if ($search_datedelivery_end) { + $sql .= " AND c.date_livraison <= '".$db->idate($search_datedelivery_end)."'"; +} +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->sanitize($search_country).')'; +} +if ($search_type_thirdparty) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; +} +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); +} +if ($search_company_alias) { + $sql .= natural_search('s.name_alias', $search_company_alias); +} +if ($search_sale > 0) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; +} +if ($search_user > 0) { + $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; +} +if ($search_total_ht != '') { + $sql .= natural_search('c.total_ht', $search_total_ht, 1); +} +if ($search_total_vat != '') { + $sql .= natural_search('c.total_tva', $search_total_vat, 1); +} +if ($search_total_ttc != '') { + $sql .= natural_search('c.total_ttc', $search_total_ttc, 1); +} +if ($search_warehouse != '' && $search_warehouse > 0) { + $sql .= natural_search('c.fk_warehouse', $search_warehouse, 1); +} +if ($search_multicurrency_code != '') { + $sql .= ' AND c.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; +} +if ($search_multicurrency_tx != '') { + $sql .= natural_search('c.multicurrency_tx', $search_multicurrency_tx, 1); +} +if ($search_multicurrency_montant_ht != '') { + $sql .= natural_search('c.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); +} +if ($search_multicurrency_montant_vat != '') { + $sql .= natural_search('c.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); +} +if ($search_multicurrency_montant_ttc != '') { + $sql .= natural_search('c.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); +} +if ($search_login) { + $sql .= natural_search("u.login", $search_login); +} +if ($search_project_ref != '') { + $sql .= natural_search("p.ref", $search_project_ref); +} +if ($search_project != '') { + $sql .= natural_search("p.title", $search_project); +} +if ($search_categ_cus > 0) { + $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +} +if ($search_categ_cus == -2) { + $sql .= " AND cc.fk_categorie IS NULL"; +} +if ($search_fk_cond_reglement > 0) { + $sql .= " AND c.fk_cond_reglement = ".$db->escape($search_fk_cond_reglement); +} +if ($search_fk_shipping_method > 0) { + $sql .= " AND c.fk_shipping_method = ".$db->escape($search_fk_shipping_method); +} +if ($search_fk_mode_reglement > 0) { + $sql .= " AND c.fk_mode_reglement = ".$db->escape($search_fk_mode_reglement); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -381,13 +506,11 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -397,40 +520,47 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ - if ($socid > 0) - { +if ($resql) { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); $title = $langs->trans('ListOfOrders').' - '.$soc->name; - if (empty($search_company)) $search_company = $soc->name; + if (empty($search_company)) { + $search_company = $soc->name; + } } else { $title = $langs->trans('ListOfOrders'); } - if (strval($search_status) == '0') - $title .= ' - '.$langs->trans('StatusOrderDraftShort'); - if ($search_status == 1) - $title .= ' - '.$langs->trans('StatusOrderValidatedShort'); - if ($search_status == 2) - $title .= ' - '.$langs->trans('StatusOrderSentShort'); - if ($search_status == 3) - $title .= ' - '.$langs->trans('StatusOrderToBillShort'); - if ($search_status == 4) - $title .= ' - '.$langs->trans('StatusOrderProcessedShort'); - if ($search_status == -1) - $title .= ' - '.$langs->trans('StatusOrderCanceledShort'); - if ($search_status == -2) - $title .= ' - '.$langs->trans('StatusOrderToProcessShort'); - if ($search_status == -3) - $title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill'); + if (strval($search_status) == '0') { + $title .= ' - '.$langs->trans('StatusOrderDraftShort'); + } + if ($search_status == 1) { + $title .= ' - '.$langs->trans('StatusOrderValidatedShort'); + } + if ($search_status == 2) { + $title .= ' - '.$langs->trans('StatusOrderSentShort'); + } + if ($search_status == 3) { + $title .= ' - '.$langs->trans('StatusOrderToBillShort'); + } + if ($search_status == 4) { + $title .= ' - '.$langs->trans('StatusOrderProcessedShort'); + } + if ($search_status == -1) { + $title .= ' - '.$langs->trans('StatusOrderCanceledShort'); + } + if ($search_status == -2) { + $title .= ' - '.$langs->trans('StatusOrderToProcessShort'); + } + if ($search_status == -3) { + $title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill'); + } $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/commande/card.php?id='.$id); @@ -441,43 +571,129 @@ if ($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 ($sall) $param .= '&sall='.urlencode($sall); - if ($socid > 0) $param .= '&socid='.urlencode($socid); - if ($search_status != '') $param .= '&search_status='.urlencode($search_status); - if ($search_datecloture_start) $param .= '&search_datecloture_start='.urlencode($search_datecloture_start); - if ($search_datecloture_end) $param .= '&search_datecloture_end='.urlencode($search_datecloture_end); - if ($search_dateorder_start) $param .= '&search_dateorder_start_day='.dol_print_date($search_dateorder_start, '%d').'&search_dateorder_start_month='.dol_print_date($search_dateorder_start, '%m').'&search_dateorder_start_year='.dol_print_date($search_dateorder_start, '%Y'); - if ($search_dateorder_end) $param .= '&search_dateorder_end_day='.dol_print_date($search_dateorder_end, '%d').'&search_dateorder_end_month='.dol_print_date($search_dateorder_end, '%m').'&search_dateorder_end_year='.dol_print_date($search_dateorder_end, '%Y'); - if ($search_datedelivery_start) $param .= '&search_datedelivery_start_day='.dol_print_date($search_datedelivery_start, '%d').'&search_datedelivery_start_month='.dol_print_date($search_datedelivery_start, '%m').'&search_datedelivery_start_year='.dol_print_date($search_datedelivery_start, '%Y'); - if ($search_datedelivery_end) $param .= '&search_datedelivery_end_day='.dol_print_date($search_datedelivery_end, '%d').'&search_datedelivery_end_month='.dol_print_date($search_datedelivery_end, '%m').'&search_datedelivery_end_year='.dol_print_date($search_datedelivery_end, '%Y'); - 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_warehouse != '') $param .= '&search_warehouse='.urlencode($search_warehouse); - if ($search_login) $param .= '&search_login='.urlencode($search_login); - 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); - if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); - if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); - if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref); - if ($search_town != '') $param .= '&search_town='.urlencode($search_town); - if ($search_zip != '') $param .= '&search_zip='.urlencode($search_zip); - if ($search_state != '') $param .= '&search_state='.urlencode($search_state); - if ($search_country != '') $param .= '&search_country='.urlencode($search_country); - if ($search_type_thirdparty != '') $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); - if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); - if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); - if ($show_files) $param .= '&show_files='.urlencode($show_files); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($search_billed != '') $param .= '&search_billed='.urlencode($search_billed); + 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_datecloture_start) { + $param .= '&search_datecloture_start='.urlencode($search_datecloture_start); + } + if ($search_datecloture_end) { + $param .= '&search_datecloture_end='.urlencode($search_datecloture_end); + } + if ($search_dateorder_start) { + $param .= '&search_dateorder_start_day='.dol_print_date($search_dateorder_start, '%d').'&search_dateorder_start_month='.dol_print_date($search_dateorder_start, '%m').'&search_dateorder_start_year='.dol_print_date($search_dateorder_start, '%Y'); + } + if ($search_dateorder_end) { + $param .= '&search_dateorder_end_day='.dol_print_date($search_dateorder_end, '%d').'&search_dateorder_end_month='.dol_print_date($search_dateorder_end, '%m').'&search_dateorder_end_year='.dol_print_date($search_dateorder_end, '%Y'); + } + if ($search_datedelivery_start) { + $param .= '&search_datedelivery_start_day='.dol_print_date($search_datedelivery_start, '%d').'&search_datedelivery_start_month='.dol_print_date($search_datedelivery_start, '%m').'&search_datedelivery_start_year='.dol_print_date($search_datedelivery_start, '%Y'); + } + if ($search_datedelivery_end) { + $param .= '&search_datedelivery_end_day='.dol_print_date($search_datedelivery_end, '%d').'&search_datedelivery_end_month='.dol_print_date($search_datedelivery_end, '%m').'&search_datedelivery_end_year='.dol_print_date($search_datedelivery_end, '%Y'); + } + if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); + } + if ($search_company) { + $param .= '&search_company='.urlencode($search_company); + } + if ($search_company_alias) { + $param .= '&search_company_alias='.urlencode($search_company_alias); + } + 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_warehouse != '') { + $param .= '&search_warehouse='.urlencode($search_warehouse); + } + if ($search_login) { + $param .= '&search_login='.urlencode($search_login); + } + 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); + } + if ($search_multicurrency_montant_vat != '') { + $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); + } + if ($search_multicurrency_montant_ttc != '') { + $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); + } + if ($search_project_ref >= 0) { + $param .= "&search_project_ref=".urlencode($search_project_ref); + } + if ($search_town != '') { + $param .= '&search_town='.urlencode($search_town); + } + if ($search_zip != '') { + $param .= '&search_zip='.urlencode($search_zip); + } + if ($search_state != '') { + $param .= '&search_state='.urlencode($search_state); + } + if ($search_country != '') { + $param .= '&search_country='.urlencode($search_country); + } + if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); + } + if ($search_product_category != '') { + $param .= '&search_product_category='.urlencode($search_product_category); + } + if ($search_categ_cus > 0) { + $param .= '&search_categ_cus='.urlencode($search_categ_cus); + } + if ($show_files) { + $param .= '&show_files='.urlencode($show_files); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_billed != '') { + $param .= '&search_billed='.urlencode($search_billed); + } + if ($search_fk_cond_reglement > 0) { + $param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement; + } + if ($search_fk_shipping_method > 0) { + $param .= '&search_fk_shipping_method='.$search_fk_shipping_method; + } + if ($search_fk_mode_reglement > 0) { + $param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement; + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -489,18 +705,28 @@ if ($resql) 'cancelorders'=>$langs->trans("Cancel"), 'presend'=>$langs->trans("SendByMail"), ); - if ($user->rights->facture->creer) $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisCustomer"); - if ($user->rights->commande->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); + if ($user->rights->facture->creer) { + $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisCustomer"); + } + if ($user->rights->commande->supprimer) { + $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete', 'createbills'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $url = DOL_URL_ROOT.'/commande/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlist' && $user->rights->commande->creer); // Lines of title fields print '
    '; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -518,8 +744,7 @@ if ($resql) $trackid = 'ord'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($massaction == 'createbills') - { + if ($massaction == 'createbills') { //var_dump($_REQUEST); print ''; @@ -545,15 +770,17 @@ if ($resql) print $langs->trans('ValidateInvoices'); print '
    '; - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { print $form->selectyesno('validate_invoices', 0, 1, 1); print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')'; } else { print $form->selectyesno('validate_invoices', 0, 1); } - if (!empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) print '     '.$langs->trans("IfValidateInvoiceIsNoOrderStayUnbilled").''; - else print '     '.$langs->trans("OptionToSetOrderBilledNotEnabled").''; + if (!empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) { + print '     '.$langs->trans("IfValidateInvoiceIsNoOrderStayUnbilled").''; + } else { + print '     '.$langs->trans("OptionToSetOrderBilledNotEnabled").''; + } print '
    '; @@ -566,64 +793,63 @@ if ($resql) print '
    '; } - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } $moreforfilter = ''; - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); - $moreforfilter .= '
    '; - } - // If the user can view other users - if ($user->rights->user->user->lire) - { - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); - $moreforfilter .= '
    '; - } // If the user can view prospects other than his' - 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'; + if ($user->rights->societe->client->voir || $socid) { + $langs->load("commercial"); $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; - $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); $moreforfilter .= '
    '; } - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) - { + // If the user can view other users + if ($user->rights->user->user->lire) { + $moreforfilter .= '
    '; + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); + $moreforfilter .= '
    '; + } + // If the user can view prospects other than his' + 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 .= '
    '; + $tmptitle = $langs->trans('IncludingProductWithTag'); + $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= '
    '; + } + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': '; - $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1); - $moreforfilter .= '
    '; + $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle); + $moreforfilter .= '
    '; } if (!empty($conf->expedition->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('Warehouse').': '; - $moreforfilter .= $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1); - $moreforfilter .= '
    '; + $tmptitle = $langs->trans('Warehouse'); + $moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle); + $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -648,64 +874,65 @@ if ($resql) print '
    '; print ''; print ''; print ''; print ''; print ''; print ''; + print ''; + print ''; print ''; print ''; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print ''; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print ''; print '
    '; print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -715,8 +942,7 @@ if ($resql) print '
    '; print '
    '; print '
    '; print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start_', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -726,64 +952,73 @@ if ($resql) print '
    '; print '
    '; + $form->selectShippingMethod($search_fk_shipping_method, 'search_fk_shipping_method', '', 1, '', 1); + print ''; + $form->select_conditions_paiements($search_fk_cond_reglement, 'search_fk_cond_reglement', -1, 1, 1); + print ''; + $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; @@ -796,20 +1031,17 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['c.datec']['checked'])) - { + if (!empty($arrayfields['c.datec']['checked'])) { 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')); @@ -820,20 +1052,17 @@ if ($resql) print '
    '; print ''; print ''; //print $form->selectyesno('search_shippable', $search_shippable, 1, 0, 1, 1); if (!empty($conf->global->ORDER_SHIPABLE_STATUS_DISABLED_BY_DEFAULT)) { @@ -845,15 +1074,13 @@ if ($resql) print ''; print $form->selectyesno('search_billed', $search_billed, 1, 0, 1, 1); print ''; $liststatus = array( Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraftShort"), @@ -876,27 +1103,81 @@ if ($resql) // Fields title print '
    '; print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1); @@ -982,188 +1277,252 @@ if ($resql) print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir); print ''.$obj->ref_client.''; - if ($obj->project_id > 0) - { + if ($obj->project_id > 0) { print $projectstatic->getNomUrl(1); } print ''; - if ($obj->project_id > 0) - { + if ($obj->project_id > 0) { print $projectstatic->title; } print ''; print $getNomUrl_cache[$obj->socid]; // If module invoices enabled and user with invoice creation permissions - if (!empty($conf->facture->enabled) && !empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) - { - if ($user->rights->facture->creer) - { - if (($obj->fk_statut > 0 && $obj->fk_statut < 3) || ($obj->fk_statut == 3 && $obj->billed == 0)) - { + if (!empty($conf->facture->enabled) && !empty($conf->global->ORDER_BILLING_ALL_CUSTOMER)) { + if ($user->rights->facture->creer) { + if (($obj->fk_statut > 0 && $obj->fk_statut < 3) || ($obj->fk_statut == 3 && $obj->billed == 0)) { print ' '; print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->name, 'object_bill', 'hideonsmartphone').''; } } } print ''; + print $obj->alias; + print ''; print $obj->town; print ''; print $obj->zip; print '".$obj->state_name."'; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print ''; - if (empty($typenArray)) $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_commande), 'day'); print ''; print dol_print_date($db->jdate($obj->date_delivery), 'dayhour'); print ''; + $form->formSelectShippingMethod('', $obj->fk_shipping_method, 'none', 1); + print ''; + $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none'); + 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_tva)."'.price($obj->total_tva)."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'; $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)."'; - if ($userstatic->id) print $userstatic->getLoginUrl(1); - else print ' '; + if ($userstatic->id) { + print $userstatic->getLoginUrl(1); + } else { + print ' '; + } print "'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_cloture), 'dayhour', 'tzuser'); print ''; print dol_escape_htmltag($obj->note_public); print ''; print dol_escape_htmltag($obj->note_private); print ''; if (!empty($show_shippable_command) && !empty($conf->stock->enabled)) { if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) { @@ -1228,8 +1591,7 @@ if ($resql) $numlines = count($generic_commande->lines); // Loop on each line of order for ($lig = 0; $lig < $numlines; $lig++) { - if ($generic_commande->lines[$lig]->product_type == 0 && $generic_commande->lines[$lig]->fk_product > 0) // If line is a product and not a service - { + if ($generic_commande->lines[$lig]->product_type == 0 && $generic_commande->lines[$lig]->fk_product > 0) { // If line is a product and not a service $nbprod++; // order contains real products $generic_product->id = $generic_commande->lines[$lig]->fk_product; @@ -1243,8 +1605,7 @@ if ($resql) $generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; } - if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) // Default code. Default should be this case. - { + if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { // Default code. Default should be this case. $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.''; @@ -1260,8 +1621,7 @@ if ($resql) // stock order and stock order_supplier $stock_order = 0; $stock_order_supplier = 0; - if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) // What about other options ? - { + if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { // What about other options ? if (!empty($conf->commande->enabled)) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { $generic_product->load_stats_commande(0, '1,2'); @@ -1271,7 +1631,7 @@ if ($resql) } $stock_order = $generic_product->stats_commande['qty']; } - if (!empty($conf->fournisseur->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { $generic_product->load_stats_commande_fournisseur(0, '3'); $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; @@ -1293,7 +1653,7 @@ if ($resql) } else { $text_info .= ''.$langs->trans('Available').' : '.$text_stock_reel.''; } - if (!empty($conf->fournisseur->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { $text_info .= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier.'
    '; } else { $text_info .= '
    '; @@ -1321,29 +1681,33 @@ if ($resql) } // Billed - if (!empty($arrayfields['c.facture']['checked'])) - { + if (!empty($arrayfields['c.facture']['checked'])) { print '
    '.yn($obj->billed).''.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '; print ''; // Company print ''; // ThirdParty Type print ''; // Category -if ($mode == 'customer') -{ +if ($mode == 'customer') { $cat_type = Categorie::TYPE_CUSTOMER; $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); } -if ($mode == 'supplier') -{ +if ($mode == 'supplier') { $cat_type = Categorie::TYPE_SUPPLIER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); } print ''; // Year print ''; @@ -335,11 +366,9 @@ print ''; print ''; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { // If we have empty year + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; print ''; @@ -375,7 +404,9 @@ print '
    '; // Show graphs print '
    '.$langs->trans("Filter").'
    '.$langs->trans("ThirdParty").''; -if ($mode == 'customer') $filter = 's.client IN (1,2,3)'; -if ($mode == 'supplier') $filter = 's.fournisseur = 1'; +if ($mode == 'customer') { + $filter = 's.client IN (1,2,3)'; +} +if ($mode == 'supplier') { + $filter = 's.fournisseur = 1'; +} print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, '', 'style="width: 95%"'); print '
    '.$langs->trans("ThirdPartyType").''; $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. -print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); -if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1); +if ($user->admin) { + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +} print '
    '.$cat_label.''; print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); @@ -293,8 +322,7 @@ print '
    '.$langs->trans("CreatedBy").' print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); // Status print '
    '.$langs->trans("Status").''; -if ($mode == 'customer') -{ +if ($mode == 'customer') { $liststatus = array( Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraft"), Commande::STATUS_VALIDATED=>$langs->trans("StatusOrderValidated"), @@ -304,15 +332,18 @@ if ($mode == 'customer') ); print $form->selectarray('object_status', $liststatus, GETPOST('object_status', 'intcomma'), -4); } -if ($mode == 'supplier') -{ +if ($mode == 'supplier') { $formorder->selectSupplierOrderStatus((strstr($object_status, ',') ? -1 : $object_status), 0, 'object_status'); } print '
    '.$langs->trans("Year").''; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; -if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '
    %
    '; echo ''; print ''; print ''; - if (!empty($conf->multicurrency->enabled)) print ''; + if (!empty($conf->multicurrency->enabled)) { + print ''; + } print ''; - if ($result) - { + if ($result) { $TData = dol_sort_array($filesarray, $sortfield, $sortorder); - if (empty($TData)) - { + if (empty($TData)) { print ''; if (!empty($conf->multicurrency->enabled)) { print ''; @@ -638,8 +657,7 @@ if (!empty($date_start) && !empty($date_stop)) $totalVAT_credit = 0; // Display array - foreach ($TData as $data) - { + foreach ($TData as $data) { $html_class = ''; //if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture']; //elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement']; @@ -684,7 +702,7 @@ if (!empty($date_start) && !empty($date_stop)) } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; - print $salary_payment->getNomUrl(1, '', 0, '', 0); + print $salary_payment->getNomUrl(1); } elseif ($data['item'] == 'Donation') { $don->id = $data['id']; $don->ref = $data['ref']; @@ -708,9 +726,8 @@ if (!empty($date_start) && !empty($date_stop)) // File link print ''; print ''."\n"; } // Overwrite some values if creation of invoice is from a predefined invoice - if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0) - { + if (empty($origin) && empty($originid) && GETPOST('fac_rec', 'int') > 0) { $invoice_predefined->fetch(GETPOST('fac_rec', 'int')); $dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later - if (empty($projectid)) $projectid = $invoice_predefined->fk_project; + if (empty($projectid)) { + $projectid = $invoice_predefined->fk_project; + } $cond_reglement_id = $invoice_predefined->cond_reglement_id; $mode_reglement_id = $invoice_predefined->mode_reglement_id; $fk_account = $invoice_predefined->fk_account; $note_public = $invoice_predefined->note_public; $note_private = $invoice_predefined->note_private; - if (!empty($invoice_predefined->multicurrency_code)) $currency_code = $invoice_predefined->multicurrency_code; - if (!empty($invoice_predefined->multicurrency_tx)) $currency_tx = $invoice_predefined->multicurrency_tx; + if (!empty($invoice_predefined->multicurrency_code)) { + $currency_code = $invoice_predefined->multicurrency_code; + } + if (!empty($invoice_predefined->multicurrency_tx)) { + $currency_tx = $invoice_predefined->multicurrency_tx; + } $sql = 'SELECT r.rowid, r.titre as title, r.total_ttc'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_rec as r'; - $sql .= ' WHERE r.fk_soc = '.$invoice_predefined->socid; + $sql .= ' WHERE r.fk_soc = '.((int) $invoice_predefined->socid); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { print ''; // Bank account -if (!empty($conf->banque->enabled)) -{ - if ($object->bank_account) - { +if (!empty($conf->banque->enabled)) { + if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); @@ -174,8 +174,7 @@ $sql .= ' AND pf.rowid = '.$object->id; dol_syslog("compta/payment_sc/card.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -190,10 +189,8 @@ if ($resql) print ''; print "\n"; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); print ''; @@ -210,14 +207,13 @@ if ($resql) // Label print ''; // Expected to pay - print ''; + print ''; // Status print ''; // Amount paid - print ''; + print ''; print "\n"; - if ($objp->paye == 1) // If at least one invoice is paid, disable delete - { + if ($objp->paye == 1) { // If at least one invoice is paid, disable delete $disable_delete = 1; } $total = $total + $objp->amount; @@ -246,18 +242,15 @@ if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { if ($user->rights->facture->paiement) { - print ''.$langs->trans('Valid').''; + print ''.$langs->trans('Valid').''; } } } */ -if ($action == '') -{ - if ($user->rights->tax->charges->supprimer) - { - if (!$disable_delete) - { +if ($action == '') { + if ($user->rights->tax->charges->supprimer) { + if (!$disable_delete) { print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; diff --git a/htdocs/compta/payment_sc/index.html b/htdocs/compta/payment_sc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/compta/payment_vat/card.php b/htdocs/compta/payment_vat/card.php new file mode 100644 index 00000000000..1b615bcbb8d --- /dev/null +++ b/htdocs/compta/payment_vat/card.php @@ -0,0 +1,321 @@ + + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2021 Gauthier VERDOL + * + * 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/compta/payment_vat/card.php + * \ingroup facture + * \brief Onglet payment of a social contribution + * \remarks Fichier presque identique a fournisseur/paiement/card.php + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; +if (!empty($conf->banque->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +} + +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'companies')); + +// Security check +$id = GETPOST("id", 'int'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +if ($user->socid) { + $socid = $user->socid; +} +// TODO ajouter regle pour restreindre acces paiement +//$result = restrictedArea($user, 'facture', $id,''); + +$object = new PaymentVAT($db); +if ($id > 0) { + $result = $object->fetch($id); + if (!$result) { + dol_print_error($db, 'Failed to get payment id '.$id); + } +} + + +/* + * Actions + */ + +// Delete payment +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->charges->supprimer) { + $db->begin(); + + $result = $object->delete($user); + if ($result > 0) { + $db->commit(); + header("Location: ".DOL_URL_ROOT."/compta/tva/payments.php?mode=tvaonly"); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $db->rollback(); + } +} + +// Validate social contribution +/* +if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->charges->creer) +{ + $db->begin(); + + $result=$object->valide(); + + if ($result > 0) + { + $db->commit(); + + $factures=array(); // TODO Get all id of invoices linked to this payment + foreach($factures as $id) + { + $fac = new Facture($db); + $fac->fetch($id); + + $outputlangs = $langs; + if (! empty($_REQUEST['lang_id'])) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($_REQUEST['lang_id']); + } + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $fac->generateDocument($fac->modelpdf, $outputlangs); + } + } + + header('Location: card.php?id='.$object->id); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + $db->rollback(); + } +} +*/ + + +/* + * View + */ + +llxHeader(); + +$tva = new TVA($db); + +$form = new Form($db); + +$h = 0; + +$head[$h][0] = DOL_URL_ROOT.'/compta/payment_vat/card.php?id='.$id; +$head[$h][1] = $langs->trans("VATPayment"); +$hselected = $h; +$h++; + +/*$head[$h][0] = DOL_URL_ROOT.'/compta/payment_sc/info.php?id='.$id; +$head[$h][1] = $langs->trans("Info"); +$h++; +*/ + + +print dol_get_fiche_head($head, $hselected, $langs->trans("VATPayment"), -1, 'payment'); + +/* + * Deletion confirmation of payment + */ +if ($action == 'delete') { + print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2); +} + +/* + * Validation confirmation of payment + */ +/* +if ($action == 'valide') +{ + $facid = $_GET['facid']; + print $form->formconfirm('card.php?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + +} +*/ + + +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'id', ''); + + +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/commande/tpl/index.html b/htdocs/commande/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index a9c01386bf7..428589aa844 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -38,12 +38,13 @@ $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1) $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } echo '
    '.$langs->trans("CustomerOrder"); if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 02098e986ba..68c73c84090 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2017 Pierre-Henry Favre * Copyright (C) 2020 Maxime DEMAREST + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -25,12 +26,15 @@ */ if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file - if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); + if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); + } } require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; @@ -53,13 +57,12 @@ $date_start = GETPOST('date_start', 'alpha'); $date_startDay = GETPOST('date_startday', 'int'); $date_startMonth = GETPOST('date_startmonth', 'int'); $date_startYear = GETPOST('date_startyear', 'int'); -$date_start = ($date_startDay) ?dol_mktime(0, 0, 0, $date_startMonth, $date_startDay, $date_startYear) : strtotime($date_start); +$date_start = ($date_startDay ? dol_mktime(0, 0, 0, $date_startMonth, $date_startDay, $date_startYear, 'tzuserrel') : dol_stringtotime($date_start)); $date_stop = GETPOST('date_stop', 'alpha'); $date_stopDay = GETPOST('date_stopday', 'int'); $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); +$date_stop = ($date_stopDay ? dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear, 'tzuserrel') : dol_stringtotime($date_stop)); $action = GETPOST('action', 'aZ09'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -70,12 +73,18 @@ $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 +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 = "date,item"; // Set here default search field -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "date,item"; // Set here default search field +} +if (!$sortorder) { + $sortorder = "DESC"; +} $arrayfields = array( @@ -111,10 +120,23 @@ if (!empty($conf->multicompany->enabled) && is_object($mc)) { $entity = '0,'.join(',', array_keys($arrayofentities)); } } -if (empty($entity)) $entity = $conf->entity; +if (empty($entity)) { + $entity = $conf->entity; +} $error = 0; +$listofchoices = array( + 'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills', 'enabled' => !empty($conf->facture->enabled), 'perms' => !empty($user->rights->facture->lire)), + 'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills', 'enabled' => !empty($conf->supplier_invoice->enabled), 'perms' => !empty($user->rights->fournisseur->facture->lire)), + 'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips', 'enabled' => !empty($conf->expensereport->enabled), 'perms' => !empty($user->rights->expensereport->lire)), + 'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation', 'enabled' => !empty($conf->don->enabled), 'perms' => !empty($user->rights->don->lire)), + 'selectsocialcontributions'=>array('label'=>'SocialContributions', 'enabled' => !empty($conf->tax->enabled), 'perms' => !empty($user->rights->tax->charges->lire)), + 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries', 'enabled' => !empty($conf->salaries->enabled), 'perms' => !empty($user->rights->salaries->read)), + 'selectvariouspayment'=>array('label'=>'VariousPayment', 'enabled' => !empty($conf->banque->enabled), 'perms' => !empty($user->rights->banque->lire)), + 'selectloanspayment'=>array('label'=>'PaymentLoan', 'enabled' => !empty($conf->loan->enabled), 'perms' => !empty($user->rights->loan->read)), +); + /* @@ -129,92 +151,105 @@ $error = 0; $filesarray = array(); $result = false; if (($action == 'searchfiles' || $action == 'dl')) { - if (empty($date_start)) - { + if (empty($date_start)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors'); $error++; } - if (empty($date_stop)) - { + if (empty($date_stop)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $sql = ''; $wheretail = " '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'"; // 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.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"; + if (GETPOST('selectinvoices') && !empty($listofchoices['selectinvoices']['perms'])) { + 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, 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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT; } // Vendor invoices - if (GETPOST('selectsupplierinvoices')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) { + 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.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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT; } // Expense reports - if (GETPOST('selectexpensereports')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms'])) { + 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.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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".ExpenseReport::STATUS_DRAFT; } // Donations - if (GETPOST('selectdonations')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectdonations') && !empty($listofchoices['selectdonations']['perms'])) { + 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, '".$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.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT; } // Payments of salaries - if (GETPOST('selectpaymentsofsalaries')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) { + 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, '".$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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT; } // Social contributions - if (GETPOST('selectsocialcontributions')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) { + 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_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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; } // Various payments - if (GETPOST('selectvariouspayment')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) { + if (!empty($sql)) { + $sql .= " UNION ALL"; + } $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).')'; + $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; } // Loan payments - if (GETPOST('selectloanspayment')) { - if (!empty($sql)) $sql .= " UNION ALL"; + if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms'])) { + 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_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).')'; + $sql .= " AND l.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; } if ($sql) { @@ -225,8 +260,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $files = array(); $link = ''; - if ($resd) - { + if ($resd) { $numd = $db->num_rows($resd); $tmpinvoice = new Facture($db); @@ -235,12 +269,10 @@ if (($action == 'searchfiles' || $action == 'dl')) { $upload_dir = ''; $i = 0; - while ($i < $numd) - { + while ($i < $numd) { $objd = $db->fetch_object($resd); - switch ($objd->item) - { + switch ($objd->item) { case "Invoice": $subdir = ''; $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->ref); @@ -306,15 +338,13 @@ if (($action == 'searchfiles' || $action == 'dl')) { break; } - if (!empty($upload_dir)) - { + if (!empty($upload_dir)) { $result = true; $files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1); //var_dump($upload_dir); //var_dump($files); - if (count($files) < 1) - { + if (count($files) < 1) { $nofile = array(); $nofile['id'] = $objd->id; $nofile['entity'] = $objd->entity; @@ -335,8 +365,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $filesarray[$nofile['item'].'_'.$nofile['id']] = $nofile; } else { - foreach ($files as $key => $file) - { + foreach ($files as $key => $file) { $file['id'] = $objd->id; $file['entity'] = $objd->entity; $file['date'] = $db->idate($objd->date); @@ -399,17 +428,14 @@ if (($action == 'searchfiles' || $action == 'dl')) { */ $dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->comptabilite->dir_temp); -if (empty($dirfortmpfile)) -{ +if (empty($dirfortmpfile)) { setEventMessages($langs->trans("ErrorNoAccountingModuleEnabled"), null, 'errors'); $error++; } -if ($result && $action == "dl" && !$error) -{ - if (!extension_loaded('zip')) - { +if ($result && $action == "dl" && !$error) { + if (!extension_loaded('zip')) { setEventMessages('PHPZIPExtentionNotLoaded', null, 'errors'); exit; } @@ -417,8 +443,7 @@ if ($result && $action == "dl" && !$error) dol_mkdir($dirfortmpfile); $log = $langs->transnoentitiesnoconv("Type"); - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { $log .= ','.$langs->transnoentitiesnoconv("Entity"); } $log .= ','.$langs->transnoentitiesnoconv("Date"); @@ -441,10 +466,8 @@ if ($result && $action == "dl" && !$error) $zip = new ZipArchive; $res = $zip->open($zipname, ZipArchive::OVERWRITE | ZipArchive::CREATE); - if ($res) - { - foreach ($filesarray as $key => $file) - { + if ($res) { + foreach ($filesarray as $key => $file) { if (!empty($file['files'])) { foreach ($file['files'] as $filecursor) { if (file_exists($filecursor["fullname"])) { @@ -454,8 +477,7 @@ if ($result && $action == "dl" && !$error) } $log .= '"'.$langs->trans($file['item']).'"'; - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { $log .= ',"'.(empty($arrayofentities[$file['entity']]) ? $file['entity'] : $arrayofentities[$file['entity']]).'"'; } $log .= ','.dol_print_date($file['date'], 'dayrfc'); @@ -528,12 +550,14 @@ 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"; +print $langs->trans("ReportPeriod").': '; +print $form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0, '', '', '', '', 1, '', '', 'tzuserrel'); +print ' - '; +print $form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0, '', '', '', '', 1, '', '', 'tzuserrel'); +print "\n"; // Export is for current company only -if (!empty($conf->multicompany->enabled) && is_object($mc)) -{ +if (!empty($conf->multicompany->enabled) && is_object($mc)) { $mc->getInfo($conf->entity); print '('.$langs->trans("Entity").' : '; print "
    "; @@ -548,20 +572,16 @@ if (!empty($conf->multicompany->enabled) && is_object($mc)) print '
    '; -$listofchoices = array( - 'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills', 'enabled' => !empty($conf->facture->enabled)), - 'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills', 'enabled' => !empty($conf->supplier_invoice->enabled)), - 'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips', 'enabled' => !empty($conf->expensereport->enabled)), - 'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation', 'enabled' => !empty($conf->don->enabled)), - 'selectsocialcontributions'=>array('label'=>'SocialContributions', 'enabled' => !empty($conf->tax->enabled)), - 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries', 'enabled' => !empty($conf->salaries->enabled)), - 'selectvariouspayment'=>array('label'=>'VariousPayment', 'enabled' => !empty($conf->banque->enabled)), - 'selectloanspayment'=>array('label'=>'PaymentLoan', 'enabled' => !empty($conf->loan->enabled)), -); foreach ($listofchoices as $choice => $val) { - if (empty($val['enabled'])) continue; // list not qualified + if (empty($val['enabled'])) { + continue; // list not qualified + } + $disabled = ''; + if (empty($val['perms'])) { + $disabled = ' disabled'; + } $checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : ''); - print '
    '; + print '
    '; } print ''; @@ -570,8 +590,7 @@ print ''."\n"; print dol_get_fiche_end(); -if (!empty($date_start) && !empty($date_stop)) -{ +if (!empty($date_start) && !empty($date_stop)) { $param = 'action=searchfiles'; $param .= '&date_startday='.GETPOST('date_startday', 'int'); $param .= '&date_startmonth='.GETPOST('date_startmonth', 'int'); @@ -614,14 +633,14 @@ if (!empty($date_start) && !empty($date_stop)) print '
    '.$langs->trans("Code").''.$langs->trans("Country").''.$langs->trans("VATIntra").''.$langs->trans("Currency").''.$langs->trans("Currency").'
    '.$langs->trans("NoItem").''; - if (!empty($data['files'])) - { - foreach ($data['files'] as $id=>$filecursor) { + if (!empty($data['files'])) { + foreach ($data['files'] as $id => $filecursor) { print ''.($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']).' '.$formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name']).'
    '; } } diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index 0129d1e5f43..d22e1a0182a 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -20,11 +20,21 @@ * \brief File to return Ajax response on payment breakdown process */ -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} require '../main.inc.php'; @@ -46,18 +56,20 @@ $currentInvId = $_POST['imgClicked']; // from DOM elements : imgId (equals invoi $amountPayment = $amountPayment != '' ? (is_numeric(price2num($amountPayment)) ? price2num($amountPayment) : '') : ''; // keep void if not a valid entry // Clean checkamounts -foreach ($amounts as $key => $value) -{ +foreach ($amounts as $key => $value) { $value = price2num($value); $amounts[$key] = $value; - if (empty($value)) unset($amounts[$key]); + if (empty($value)) { + unset($amounts[$key]); + } } // Clean remains -foreach ($remains as $key => $value) -{ +foreach ($remains as $key => $value) { $value = price2num($value); $remains[$key] = (($invoice_type) == 2 ?-1 : 1) * $value; - if (empty($value)) unset($remains[$key]); + if (empty($value)) { + unset($remains[$key]); + } } // Treatment @@ -65,19 +77,16 @@ $result = ($amountPayment != '') ? ($amountPayment - array_sum($amounts)) : arra $toJsonArray = array(); $totalRemaining = price2num(array_sum($remains)); $toJsonArray['label'] = $amountPayment == '' ? '' : $langs->transnoentities('RemainingAmountPayment'); -if ($currentInvId) // Here to breakdown -{ +if ($currentInvId) { // Here to breakdown // Get the current amount (from form) and the corresponding remainToPay (from invoice) $currentAmount = $amounts['amount_'.$currentInvId]; $currentRemain = $remains['remain_'.$currentInvId]; // If amountPayment isn't filled, breakdown invoice amount, else breakdown from amountPayment - if ($amountPayment == '') - { + if ($amountPayment == '') { // Check if current amount exists in amounts $amountExists = array_key_exists('amount_'.$currentInvId, $amounts); - if ($amountExists) - { + if ($amountExists) { $remainAmount = $currentRemain - $currentAmount; // To keep value between curRemain and curAmount $result += $remainAmount; // result must be deduced by $currentAmount += $remainAmount; // curAmount put to curRemain @@ -90,8 +99,7 @@ if ($currentInvId) // Here to breakdown $result += price2num($currentAmount); $currentAmount = 0; - if ($result >= 0) // then we need to calculate the amount to breakdown - { + if ($result >= 0) { // then we need to calculate the amount to breakdown $amountToBreakdown = ($result - $currentRemain >= 0 ? $currentRemain : // Remain can be fully paid $currentRemain + ($result - $currentRemain)); // Remain can only partially be paid diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php index 8c9432c6837..4f317c1a9ed 100644 --- a/htdocs/compta/bank/account_statement_document.php +++ b/htdocs/compta/bank/account_statement_document.php @@ -47,26 +47,30 @@ if ($user->socid) { $action = ''; $socid = $user->socid; } -if ($user->socid) +if ($user->socid) { $socid = $user->socid; +} // Get parameters $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 (empty($page) || $page == -1) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) +if (!$sortorder) { $sortorder = "ASC"; -if (!$sortfield) +} +if (!$sortfield) { $sortfield = "name"; +} $object = new Account($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $account = $object->id; // Force the search field on id of account } @@ -75,43 +79,37 @@ $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') -{ +if (GETPOST("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 .= " AND b.fk_account = ".((int) $id); $sql .= " ORDER BY b.num_releve DESC"; dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $db->num_rows($resql); - if ($numrows > 0) - { + if ($numrows > 0) { $obj = $db->fetch_object($resql); $numref = $obj->num; $found = true; } } -} elseif ($_GET["rel"] == 'next') -{ +} elseif (GETPOST("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 .= " AND b.fk_account = ".((int) $id); $sql .= " ORDER BY b.num_releve ASC"; dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $db->num_rows($resql); - if ($numrows > 0) - { + if ($numrows > 0) { $obj = $db->fetch_object($resql); $numref = $obj->num; $found = true; @@ -127,13 +125,12 @@ if ($_GET["rel"] == 'prev') * Actions */ -if (!empty($numref)) -{ +if (!empty($numref)) { $object->fetch_thirdparty(); $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref); } -$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$numref; -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +$backtopage = $_SERVER['PHP_SELF']."?account=".urlencode($id)."&num=".urlencode($numref); +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -189,14 +186,14 @@ if ($id > 0 || !empty($ref)) { $permission = $user->rights->banque->modifier; $permtoedit = $user->rights->banque->modifier; $param = '&id='.$object->id.'&num='.urlencode($numref); - $moreparam = '&num='.urlencode($numref); ; + $moreparam = '&num='.urlencode($numref); $relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/"; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { dol_print_error($db); } } else { - Header('Location: index.php'); + header('Location: index.php'); exit; } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index a0650e9ffa4..d771b307234 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -41,13 +41,14 @@ $ref = GETPOST('ref'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); $year_start = GETPOST('year_start'); $year_current = strftime("%Y", time()); -if (!$year_start) -{ +if (!$year_start) { $year_start = $year_current - 2; $year_end = $year_current; } else { @@ -68,13 +69,11 @@ $form = new Form($db); // Get account informations $object = new Account($db); -if ($id > 0 && !preg_match('/,/', $id)) // if for a particular account and not a list -{ +if ($id > 0 && !preg_match('/,/', $id)) { // if for a particular account and not a list $result = $object->fetch($id); $id = $object->id; } -if (!empty($ref)) -{ +if (!empty($ref)) { $result = $object->fetch(0, $ref); $id = $object->id; } @@ -90,17 +89,16 @@ $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.amount >= 0"; -if (!empty($id)) +if (!empty($id)) { $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; +} $sql .= " GROUP BY dm"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); $encaiss[$row[1]] = $row[0]; $i++; @@ -116,17 +114,16 @@ $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.amount <= 0"; -if (!empty($id)) +if (!empty($id)) { $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; +} $sql .= " GROUP BY dm"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); $decaiss[$row[1]] = -$row[0]; $i++; @@ -141,25 +138,25 @@ $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'annual', $langs->trans("FinancialAccount"), 0, 'account'); $title = $langs->trans("FinancialAccount")." : ".$object->label; -$link = ($year_start ? "".img_previous('', 'class="valignbottom"')." ".$langs->trans("Year")." ".img_next('', 'class="valignbottom"')."" : ""); +$link = ($year_start ? ''.img_previous('', 'class="valignbottom"')." ".$langs->trans("Year").' '.img_next('', 'class="valignbottom"').'' : ''); $linkback = ''.$langs->trans("BackToList").''; +$morehtmlref = ''; -if (!empty($id)) -{ - if (!preg_match('/,/', $id)) - { +if (!empty($id)) { + if (!preg_match('/,/', $id)) { dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); } else { $bankaccount = new Account($db); $listid = explode(',', $id); - foreach ($listid as $key => $aId) - { + foreach ($listid as $key => $aId) { $bankaccount->fetch($aId); $bankaccount->label = $bankaccount->ref; print $bankaccount->getNomUrl(1); - if ($key < (count($listid) - 1)) print ', '; + if ($key < (count($listid) - 1)) { + print ', '; + } } } } else { @@ -176,39 +173,33 @@ print '
    '; // You can use div-table-responsive- print ''; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; } print ''; print ''; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; } print ''; -for ($mois = 1; $mois < 13; $mois++) -{ +for ($mois = 1; $mois < 13; $mois++) { print ''; print ""; - for ($annee = $year_start; $annee <= $year_end; $annee++) - { + for ($annee = $year_start; $annee <= $year_end; $annee++) { $case = sprintf("%04s-%02s", $annee, $mois); print '"; print '"; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; } print "\n"; @@ -239,14 +229,16 @@ $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $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)) +if (!empty($id)) { $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; +} $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $balance = $obj->total; + if ($obj) { + $balance = $obj->total; + } } else { dol_print_error($db); } @@ -264,8 +256,7 @@ print "
    '.$langs->trans("Month").''.$annee.'
     '.$langs->trans("Debit").''.$langs->trans("Credit").'
    ".dol_print_date(dol_mktime(1, 1, 1, $mois, 1, 2000), "%B")." '; - if ($decaiss[$case] > 0) - { + if ($decaiss[$case] > 0) { print price($decaiss[$case]); $totsorties[$annee] += $decaiss[$case]; } print " '; - if ($encaiss[$case] > 0) - { + if ($encaiss[$case] > 0) { print price($encaiss[$case]); $totentrees[$annee] += $encaiss[$case]; } @@ -219,8 +210,7 @@ for ($mois = 1; $mois < 13; $mois++) // Total debit-credit print '
    '.$langs->trans("Total")."'.price($totsorties[$annee]).''.price($totentrees[$annee]).'
    "; $year = $year_end; $result = dol_mkdir($conf->bank->dir_temp); -if ($result < 0) -{ +if ($result < 0) { $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); @@ -276,11 +267,12 @@ if ($result < 0) $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - if ($id && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$id.")"; + if ($id && $_GET["option"] != 'all') { + $sql .= " AND b.fk_account IN (".$db->sanitize($id).")"; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $obj = $db->fetch_object($resql); $min = $db->jdate($obj->min); @@ -297,8 +289,7 @@ if ($result < 0) $tblyear[1] = array(); $tblyear[2] = array(); - for ($annee = 0; $annee < 3; $annee++) - { + for ($annee = 0; $annee < 3; $annee++) { $sql = "SELECT date_format(b.datev,'%m')"; $sql .= ", SUM(b.amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -308,16 +299,16 @@ if ($result < 0) $sql .= " AND b.datev >= '".($year - $annee)."-01-01 00:00:00'"; $sql .= " AND b.datev <= '".($year - $annee)."-12-31 23:59:59'"; $sql .= " AND b.amount > 0"; - if ($id && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$id.")"; + if ($id && $_GET["option"] != 'all') { + $sql .= " AND b.fk_account IN (".$db->sanitize($id).")"; + } $sql .= " GROUP BY date_format(b.datev,'%m');"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); $tblyear[$annee][$row[0]] = $row[1]; $i++; @@ -333,8 +324,7 @@ if ($result < 0) $data_year_1 = array(); $data_year_2 = array(); - for ($i = 0; $i < 12; $i++) - { + for ($i = 0; $i < 12; $i++) { $data_year_0[$i] = isset($tblyear[0][substr("0".($i + 1), -2)]) ? $tblyear[0][substr("0".($i + 1), -2)] : 0; $data_year_1[$i] = isset($tblyear[1][substr("0".($i + 1), -2)]) ? $tblyear[1][substr("0".($i + 1), -2)] : 0; $data_year_2[$i] = isset($tblyear[2][substr("0".($i + 1), -2)]) ? $tblyear[2][substr("0".($i + 1), -2)] : 0; @@ -347,8 +337,7 @@ if ($result < 0) $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=banque_temp&file='."/credmovement".$id."-".$year.".png"; $title = $langs->transnoentities("Credit").' - '.$langs->transnoentities("Year").': '.($year - 2).' - '.($year - 1)." - ".$year; $graph_datas = array(); - for ($i = 0; $i < 12; $i++) - { + for ($i = 0; $i < 12; $i++) { $graph_datas[$i] = array($labels[$i], $data_year_0[$i], $data_year_1[$i], $data_year_2[$i]); } @@ -382,8 +371,7 @@ if ($result < 0) $tblyear[1] = array(); $tblyear[2] = array(); - for ($annee = 0; $annee < 3; $annee++) - { + for ($annee = 0; $annee < 3; $annee++) { $sql = "SELECT date_format(b.datev,'%m')"; $sql .= ", SUM(b.amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -393,16 +381,16 @@ if ($result < 0) $sql .= " AND b.datev >= '".($year - $annee)."-01-01 00:00:00'"; $sql .= " AND b.datev <= '".($year - $annee)."-12-31 23:59:59'"; $sql .= " AND b.amount < 0"; - if ($id && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$id.")"; + if ($id && $_GET["option"] != 'all') { + $sql .= " AND b.fk_account IN (".$db->sanitize($id).")"; + } $sql .= " GROUP BY date_format(b.datev,'%m');"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); $tblyear[$annee][$row[0]] = abs($row[1]); $i++; @@ -418,8 +406,7 @@ if ($result < 0) $data_year_1 = array(); $data_year_2 = array(); - for ($i = 0; $i < 12; $i++) - { + for ($i = 0; $i < 12; $i++) { $data_year_0[$i] = isset($tblyear[0][substr("0".($i + 1), -2)]) ? $tblyear[0][substr("0".($i + 1), -2)] : 0; $data_year_1[$i] = isset($tblyear[1][substr("0".($i + 1), -2)]) ? $tblyear[1][substr("0".($i + 1), -2)] : 0; $data_year_2[$i] = isset($tblyear[2][substr("0".($i + 1), -2)]) ? $tblyear[2][substr("0".($i + 1), -2)] : 0; @@ -431,8 +418,7 @@ if ($result < 0) $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=banque_temp&file='."/debmovement".$id."-".$year.".png"; $title = $langs->transnoentities("Debit").' - '.$langs->transnoentities("Year").': '.($year - 2).' - '.($year - 1)." - ".$year; $graph_datas = array(); - for ($i = 0; $i < 12; $i++) - { + for ($i = 0; $i < 12; $i++) { $graph_datas[$i] = array($labels[$i], $data_year_0[$i], $data_year_1[$i], $data_year_2[$i]); } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 7abd2c6a2b7..0a9784fce75 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -9,6 +9,7 @@ * Copyright (C) 2017-2019 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -41,6 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; @@ -66,12 +68,15 @@ $contextpage = 'banktransactionlist'.(empty($object->ref) ? '' : '-'.$object->id // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($fielvalue) -{ - if ($user->socid) $socid = $user->socid; +if ($fielvalue) { + if ($user->socid) { + $socid = $user->socid; + } $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); } else { - if ($user->socid) $socid = $user->socid; + if ($user->socid) { + $socid = $user->socid; + } $result = restrictedArea($user, 'banque'); } @@ -88,34 +93,42 @@ $search_dt_start = dol_mktime(0, 0, 0, GETPOST('search_start_dtmonth', 'int'), G $search_dt_end = dol_mktime(0, 0, 0, GETPOST('search_end_dtmonth', 'int'), GETPOST('search_end_dtday', 'int'), GETPOST('search_end_dtyear', 'int')); $search_dv_start = dol_mktime(0, 0, 0, GETPOST('search_start_dvmonth', 'int'), GETPOST('search_start_dvday', 'int'), GETPOST('search_start_dvyear', 'int')); $search_dv_end = dol_mktime(0, 0, 0, GETPOST('search_end_dvmonth', 'int'), GETPOST('search_end_dvday', 'int'), GETPOST('search_end_dvyear', 'int')); -$search_thirdparty = GETPOST("search_thirdparty", 'alpha') ?GETPOST("search_thirdparty", 'alpha') : GETPOST("thirdparty", 'alpha'); +$search_thirdparty_user = GETPOST("search_thirdparty", 'alpha') ?GETPOST("search_thirdparty", 'alpha') : GETPOST("thirdparty", 'alpha'); $search_req_nb = GETPOST("req_nb", 'alpha'); $search_num_releve = GETPOST("search_num_releve", 'alpha'); $search_conciliated = GETPOST("search_conciliated", 'int'); $num_releve = GETPOST("num_releve", "alpha"); -if (empty($dateop)) $dateop = -1; +if (empty($dateop)) { + $dateop = -1; +} $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'); $pageplusone = GETPOST("pageplusone", 'int'); -if ($pageplusone) $page = $pageplusone - 1; -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +if ($pageplusone) { + $page = $pageplusone - 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,desc,desc'; -if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid'; +if (!$sortorder) { + $sortorder = 'desc,desc,desc'; +} +if (!$sortfield) { + $sortfield = 'b.datev,b.dateo,b.rowid'; +} $object = new Account($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $search_account = $object->id; // Force the search field on id of account - if (!($object->id > 0)) - { + if (!($object->id > 0)) { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound')); exit; @@ -124,10 +137,11 @@ if ($id > 0 || !empty($ref)) $mode_balance_ok = false; //if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) // TODO Manage balance when account not selected -if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) -{ +if (($sortfield == 'b.datev' || $sortfield == 'b.datev,b.dateo,b.rowid')) { $sortfield = 'b.datev,b.dateo,b.rowid'; - if ($id > 0 || !empty($ref) || $search_account > 0) $mode_balance_ok = true; + if ($id > 0 || !empty($ref) || $search_account > 0) { + $mode_balance_ok = true; + } } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -145,7 +159,7 @@ $arrayfields = array( '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), + 'bu.label'=>array('label'=>$langs->trans("ThirdParty").'/'.$langs->trans("User"), '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), @@ -166,17 +180,23 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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 = ''; @@ -188,17 +208,17 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_ref = ""; $search_req_nb = ''; $search_description = ''; - $search_thirdparty = ''; + $search_thirdparty_user = ''; $search_num_releve = ''; $search_conciliated = ''; - $thirdparty = ''; $search_account = ""; - if ($id > 0 || !empty($ref)) $search_account = $object->id; + if ($id > 0 || !empty($ref)) { + $search_account = $object->id; + } } -if (empty($reshook)) -{ +if (empty($reshook)) { $objectclass = 'Account'; $objectlabel = 'BankTransaction'; $permissiontoread = $user->rights->banque->lire; @@ -209,15 +229,13 @@ if (empty($reshook)) // Conciliation if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate - && (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) -{ + && (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) { $error = 0; // Definition, nettoyage parametres $num_releve = GETPOST("num_releve", "alpha"); - if ($num_releve) - { + if ($num_releve) { $bankline = new AccountLine($db); $rowids = GETPOST('rowid', 'array'); @@ -226,7 +244,7 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' foreach ($rowids as $row) { if ($row > 0) { $result = $bankline->fetch($row); - $bankline->num_releve = $num_releve; //$_POST["num_releve"]; + $bankline->num_releve = $num_releve; // GETPOST("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'); @@ -246,22 +264,45 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors'); } - if (!$error) - { + 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); - if ($search_thirdparty) $param .= '&search_thirdparty='.urlencode($search_thirdparty); - if ($search_num_releve) $param .= '&search_num_releve='.urlencode($search_num_releve); - if ($search_description) $param .= '&search_description='.urlencode($search_description); - if ($search_start_dt) $param .= '&search_start_dt='.urlencode($search_start_dt); - if ($search_end_dt) $param .= '&search_end_dt='.urlencode($search_end_dt); - if ($search_start_dv) $param .= '&search_start_dv='.urlencode($search_start_dv); - if ($search_end_dv) $param .= '&search_end_dv='.urlencode($search_end_dv); - if ($search_type) $param .= '&search_type='.urlencode($search_type); - if ($search_debit) $param .= '&search_debit='.urlencode($search_debit); - if ($search_credit) $param .= '&search_credit='.urlencode($search_credit); + if ($page) { + $param .= '&page='.urlencode($page); + } + if ($offset) { + $param .= '&offset='.urlencode($offset); + } + if ($search_thirdparty_user) { + $param .= '&search_thirdparty='.urlencode($search_thirdparty_user); + } + if ($search_num_releve) { + $param .= '&search_num_releve='.urlencode($search_num_releve); + } + if ($search_description) { + $param .= '&search_description='.urlencode($search_description); + } + if ($search_start_dt) { + $param .= '&search_start_dt='.urlencode($search_start_dt); + } + if ($search_end_dt) { + $param .= '&search_end_dt='.urlencode($search_end_dt); + } + if ($search_start_dv) { + $param .= '&search_start_dv='.urlencode($search_start_dv); + } + if ($search_end_dv) { + $param .= '&search_end_dv='.urlencode($search_end_dv); + } + if ($search_type) { + $param .= '&search_type='.urlencode($search_type); + } + if ($search_debit) { + $param .= '&search_debit='.urlencode($search_debit); + } + 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; @@ -269,12 +310,10 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' } -if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) -{ +if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) { $error = 0; - if (price2num(GETPOST("addcredit")) > 0) - { + if (price2num(GETPOST("addcredit")) > 0) { $amount = price2num(GETPOST("addcredit")); } else { $amount = - price2num(GETPOST("adddebit")); @@ -286,8 +325,9 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) $cat1 = GETPOST("cat1", 'alpha'); $bankaccountid = $id; - if (GETPOST('add_account', 'int') > 0) $bankaccountid = GETPOST('add_account', 'int'); - + if (GETPOST('add_account', 'int') > 0) { + $bankaccountid = GETPOST('add_account', 'int'); + } if (!$dateop) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); @@ -304,24 +344,21 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); } - if (!$bankaccountid > 0) - { + 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)) { + 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) - { + if ($insertid > 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF'].($id ? "?id=".$id : '')); exit; @@ -333,8 +370,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) } } -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier) { $accline = new AccountLine($db); $result = $accline->fetch(GETPOST("rowid", "int")); $result = $accline->delete($user); @@ -357,6 +393,7 @@ $formaccounting = new FormAccounting($db); $companystatic = new Societe($db); $bankaccountstatic = new Account($db); +$userstatic= new User($db); $banktransferstatic = new BonPrelevement($db); $societestatic = new Societe($db); @@ -368,7 +405,7 @@ $donstatic = new Don($db); $paymentstatic = new Paiement($db); $paymentsupplierstatic = new PaiementFourn($db); $paymentscstatic = new PaymentSocialContribution($db); -$paymentvatstatic = new TVA($db); +$paymentvatstatic = new PaymentVAT($db); $paymentsalstatic = new PaymentSalary($db); $paymentdonationstatic = new PaymentDonation($db); $paymentvariousstatic = new PaymentVarious($db); @@ -381,28 +418,72 @@ $now = dol_now(); // Must be before button action $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -if ($id > 0) $param .= '&id='.urlencode($id); -if (!empty($ref)) $param .= '&ref='.urlencode($ref); -if (!empty($search_ref)) $param .= '&search_ref='.urlencode($search_ref); -if (!empty($search_description)) $param .= '&search_description='.urlencode($search_description); -if (!empty($search_type)) $param .= '&type='.urlencode($search_type); -if (!empty($search_thirdparty)) $param .= '&search_thirdparty='.urlencode($search_thirdparty); -if (!empty($search_debit)) $param .= '&search_debit='.urlencode($search_debit); -if (!empty($search_credit)) $param .= '&search_credit='.urlencode($search_credit); -if (!empty($search_account)) $param .= '&search_account='.urlencode($search_account); -if (!empty($search_num_releve)) $param .= '&search_num_releve='.urlencode($search_num_releve); -if ($search_conciliated != '' && $search_conciliated != '-1') $param .= '&search_conciliated='.urlencode($search_conciliated); -if ($search_bid > 0) $param .= '&search_bid='.urlencode($search_bid); -if (dol_strlen($search_dt_start) > 0) $param .= '&search_start_dtmonth='.GETPOST('search_start_dtmonth', 'int').'&search_start_dtday='.GETPOST('search_start_dtday', 'int').'&search_start_dtyear='.GETPOST('search_start_dtyear', 'int'); -if (dol_strlen($search_dt_end) > 0) $param .= '&search_end_dtmonth='.GETPOST('search_end_dtmonth', 'int').'&search_end_dtday='.GETPOST('search_end_dtday', 'int').'&search_end_dtyear='.GETPOST('search_end_dtyear', 'int'); -if (dol_strlen($search_dv_start) > 0) $param .= '&search_start_dvmonth='.GETPOST('search_start_dvmonth', 'int').'&search_start_dvday='.GETPOST('search_start_dvday', 'int').'&search_start_dvyear='.GETPOST('search_start_dvyear', 'int'); -if (dol_strlen($search_dv_end) > 0) $param .= '&search_end_dvmonth='.GETPOST('search_end_dvmonth', 'int').'&search_end_dvday='.GETPOST('search_end_dvday', 'int').'&search_end_dvyear='.GETPOST('search_end_dvyear', 'int'); -if ($search_req_nb) $param .= '&req_nb='.urlencode($search_req_nb); -if (GETPOST("search_thirdparty", 'int')) $param .= '&thirdparty='.urlencode(GETPOST("search_thirdparty", 'int')); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); -if ($action == 'reconcile') $param .= '&action=reconcile'; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($id > 0) { + $param .= '&id='.urlencode($id); +} +if (!empty($ref)) { + $param .= '&ref='.urlencode($ref); +} +if (!empty($search_ref)) { + $param .= '&search_ref='.urlencode($search_ref); +} +if (!empty($search_description)) { + $param .= '&search_description='.urlencode($search_description); +} +if (!empty($search_type)) { + $param .= '&type='.urlencode($search_type); +} +if (!empty($search_thirdparty_user)) { + $param .= '&search_thirdparty='.urlencode($search_thirdparty_user); +} +if (!empty($search_debit)) { + $param .= '&search_debit='.urlencode($search_debit); +} +if (!empty($search_credit)) { + $param .= '&search_credit='.urlencode($search_credit); +} +if (!empty($search_account)) { + $param .= '&search_account='.urlencode($search_account); +} +if (!empty($search_num_releve)) { + $param .= '&search_num_releve='.urlencode($search_num_releve); +} +if ($search_conciliated != '' && $search_conciliated != '-1') { + $param .= '&search_conciliated='.urlencode($search_conciliated); +} +if ($search_bid > 0) { + $param .= '&search_bid='.urlencode($search_bid); +} +if (dol_strlen($search_dt_start) > 0) { + $param .= '&search_start_dtmonth='.GETPOST('search_start_dtmonth', 'int').'&search_start_dtday='.GETPOST('search_start_dtday', 'int').'&search_start_dtyear='.GETPOST('search_start_dtyear', 'int'); +} +if (dol_strlen($search_dt_end) > 0) { + $param .= '&search_end_dtmonth='.GETPOST('search_end_dtmonth', 'int').'&search_end_dtday='.GETPOST('search_end_dtday', 'int').'&search_end_dtyear='.GETPOST('search_end_dtyear', 'int'); +} +if (dol_strlen($search_dv_start) > 0) { + $param .= '&search_start_dvmonth='.GETPOST('search_start_dvmonth', 'int').'&search_start_dvday='.GETPOST('search_start_dvday', 'int').'&search_start_dvyear='.GETPOST('search_start_dvyear', 'int'); +} +if (dol_strlen($search_dv_end) > 0) { + $param .= '&search_end_dvmonth='.GETPOST('search_end_dvmonth', 'int').'&search_end_dvday='.GETPOST('search_end_dvday', 'int').'&search_end_dvyear='.GETPOST('search_end_dvyear', 'int'); +} +if ($search_req_nb) { + $param .= '&req_nb='.urlencode($search_req_nb); +} +if (GETPOST("search_thirdparty", 'int')) { + $param .= '&thirdparty='.urlencode(GETPOST("search_thirdparty", 'int')); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +if ($action == 'reconcile') { + $param .= '&action=reconcile'; +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -411,8 +492,7 @@ $options = array(); $buttonreconcile = ''; $morehtmlref = ''; -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions"); $helpurl = ""; llxHeader('', $title, $helpurl); @@ -437,20 +517,37 @@ if ($id > 0 || !empty($ref)) /* - * Buttons actions - */ + * Buttons actions + */ + + if ($action != 'reconcile') { + if ($object->canBeConciliated() > 0) { + $allowautomaticconciliation = false; // TODO + $titletoconciliatemanual = $langs->trans("Conciliate"); + $titletoconciliateauto = $langs->trans("Conciliate"); + if ($allowautomaticconciliation) { + $titletoconciliatemanual .= ' ('.$langs->trans("Manual").')'; + $titletoconciliateauto .= ' ('.$langs->trans("Auto").')'; + } - 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").''; + $buttonreconcile = ''.$titletoconciliatemanual.''; } else { - $buttonreconcile = ''.$langs->trans("Conciliate").''; + $buttonreconcile = ''.$titletoconciliatemanual.''; + } + + if ($allowautomaticconciliation) { + // If not cash account and can be reconciliate + if ($user->rights->banque->consolidate) { + $newparam = $param; + $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam); + $buttonreconcile .= ' '.$titletoconciliateauto.''; + } else { + $buttonreconcile .= ' '.$titletoconciliateauto.''; + } } } } @@ -460,40 +557,72 @@ if ($id > 0 || !empty($ref)) $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,"; $sql .= " b.fk_account, b.fk_type,"; -$sql .= " ba.rowid as bankid, ba.ref as bankref,"; -$sql .= " bu.url_id,"; -$sql .= " s.nom, s.name_alias, s.client, s.fournisseur, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur"; +$sql .= " ba.rowid as bankid, ba.ref as bankref"; // 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 "; -if ($search_bid > 0) $sql .= MAIN_DB_PREFIX."bank_class as l,"; +if ($search_bid > 0) { + $sql .= MAIN_DB_PREFIX."bank_class as l,"; +} $sql .= " ".MAIN_DB_PREFIX."bank_account as ba,"; $sql .= " ".MAIN_DB_PREFIX."bank as b"; -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 (b.rowid = ef.fk_object)"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid"; +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 (b.rowid = ef.fk_object)"; +} $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; -if ($search_account > 0) $sql .= " AND b.fk_account = ".$search_account; +if ($search_account > 0) { + $sql .= " AND b.fk_account = ".((int) $search_account); +} // Search period criteria -if (dol_strlen($search_dt_start) > 0) $sql .= " AND b.dateo >= '".$db->idate($search_dt_start)."'"; -if (dol_strlen($search_dt_end) > 0) $sql .= " AND b.dateo <= '".$db->idate($search_dt_end)."'"; +if (dol_strlen($search_dt_start) > 0) { + $sql .= " AND b.dateo >= '".$db->idate($search_dt_start)."'"; +} +if (dol_strlen($search_dt_end) > 0) { + $sql .= " AND b.dateo <= '".$db->idate($search_dt_end)."'"; +} // Search period criteria -if (dol_strlen($search_dv_start) > 0) $sql .= " AND b.datev >= '".$db->idate($search_dv_start)."'"; -if (dol_strlen($search_dv_end) > 0) $sql .= " AND b.datev <= '".$db->idate($search_dv_end)."'"; -if ($search_ref) $sql .= natural_search("b.rowid", $search_ref, 1); -if ($search_req_nb) $sql .= natural_search("b.num_chq", $search_req_nb); -if ($search_num_releve) $sql .= natural_search("b.num_releve", $search_num_releve); -if ($search_conciliated != '' && $search_conciliated != '-1') $sql .= " AND b.rappro = ".urlencode($search_conciliated); -if ($search_thirdparty) $sql .= natural_search("s.nom", $search_thirdparty); -if ($search_description) -{ +if (dol_strlen($search_dv_start) > 0) { + $sql .= " AND b.datev >= '".$db->idate($search_dv_start)."'"; +} +if (dol_strlen($search_dv_end) > 0) { + $sql .= " AND b.datev <= '".$db->idate($search_dv_end)."'"; +} +if ($search_ref) { + $sql .= natural_search("b.rowid", $search_ref, 1); +} +if ($search_req_nb) { + $sql .= natural_search("b.num_chq", $search_req_nb); +} +if ($search_num_releve) { + $sql .= natural_search("b.num_releve", $search_num_releve); +} +if ($search_conciliated != '' && $search_conciliated != '-1') { + $sql .= " AND b.rappro = ".((int) $search_conciliated); +} +if ($search_thirdparty_user) { + $sql.= " AND (b.rowid IN "; + $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; + $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; + $sql.= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; + $sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1)."))"; + + $sql.= " OR b.rowid IN "; + $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; + $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; + $sql.= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; + $sql.= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); + $sql.= ")"; +} +if ($search_description) { $search_description_to_use = $search_description; $arrayoffixedlabels = array( 'payment_salary', @@ -505,18 +634,21 @@ if ($search_description) 'SubscriptionPayment', 'WithdrawalPayment' ); - foreach ($arrayoffixedlabels as $keyforlabel) - { + foreach ($arrayoffixedlabels as $keyforlabel) { $translatedlabel = $langs->transnoentitiesnoconv($keyforlabel); - if (preg_match('/'.$search_description.'/i', $translatedlabel)) - { + if (preg_match('/'.$search_description.'/i', $translatedlabel)) { $search_description_to_use .= "|".$keyforlabel; } } $sql .= natural_search("b.label", $search_description_to_use); // Warning some text are just translation keys, not translated strings } -if ($search_bid > 0) $sql .= " AND b.rowid=l.lineid AND l.fk_categ=".((int) $search_bid); -if (!empty($search_type)) $sql .= " AND b.fk_type = '".$db->escape($search_type)."'"; + +if ($search_bid > 0) { + $sql .= " AND b.rowid = l.lineid AND l.fk_categ = ".((int) $search_bid); +} +if (!empty($search_type)) { + $sql .= " AND b.fk_type = '".$db->escape($search_type)."'"; +} // Search criteria amount if ($search_debit) { $sql .= natural_search('ABS(b.amount)', $search_debit, 1); @@ -538,71 +670,92 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; $nbtotalofpages = 0; -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); $nbtotalofpages = ceil($nbtotalofrecords / $limit); } -if (($id > 0 || !empty($ref)) && ((string) $page == '')) -{ +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; + if ($page < 0) { + $page = 0; + } } -if ($page >= $nbtotalofpages) -{ +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 ($page < 0) { + $page = 0; + } } // If not account defined $mode_balance_ok=false -if (empty($search_account)) $mode_balance_ok = false; +if (empty($search_account)) { + $mode_balance_ok = false; +} // If a search is done $mode_balance_ok=false -if (!empty($search_ref)) $mode_balance_ok = false; -if (!empty($search_description)) $mode_balance_ok = false; -if (!empty($search_type)) $mode_balance_ok = false; -if (!empty($search_debit)) $mode_balance_ok = false; -if (!empty($search_credit)) $mode_balance_ok = false; -if (!empty($search_thirdparty)) $mode_balance_ok = false; -if ($search_conciliated != '' && $search_conciliated != '-1') $mode_balance_ok = false; -if (!empty($search_num_releve)) $mode_balance_ok = false; +if (!empty($search_ref)) { + $mode_balance_ok = false; +} +if (!empty($search_description)) { + $mode_balance_ok = false; +} +if (!empty($search_type)) { + $mode_balance_ok = false; +} +if (!empty($search_debit)) { + $mode_balance_ok = false; +} +if (!empty($search_credit)) { + $mode_balance_ok = false; +} +if (!empty($search_thirdparty_user)) { + $mode_balance_ok = false; +} +if ($search_conciliated != '' && $search_conciliated != '-1') { + $mode_balance_ok = false; +} +if (!empty($search_num_releve)) { + $mode_balance_ok = false; +} $sql .= $db->plimit($limit + 1, $offset); //print $sql; dol_syslog('compta/bank/bankentries_list.php', LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); - //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // Confirmation delete - if ($action == '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 print '
    '."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -612,17 +765,17 @@ if ($resql) print ''; print ''; print ''; - if (GETPOST('bid')) print ''; + if (GETPOST('bid')) { + print ''; + } // Form to reconcile - if ($user->rights->banque->consolidate && $action == '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)) - { + if (is_array($options) && count($options)) { print $langs->trans("EventualyAddCategory").': '; print Form::selectarray('cat', $options, GETPOST('cat'), 1); } @@ -638,19 +791,17 @@ if ($resql) $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 .= " WHERE fk_account = ".((int) $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) - { + if ($resqlr) { $numr = $db->num_rows($resqlr); $i = 0; $last_ok = 0; - while (($i < $numr) && ($i < $nbmax)) - { + while (($i < $numr) && ($i < $nbmax)) { $objr = $db->fetch_object($resqlr); if (!$last_ok) { $last_releve = $objr->num_releve; @@ -659,16 +810,19 @@ if ($resql) $i++; $liste = ''.$objr->num_releve.'   '.$liste; } - if ($numr >= $nbmax) $liste = "...   ".$liste; + if ($numr >= $nbmax) { + $liste = "...   ".$liste; + } print $liste; - if ($numr <= 0) print ''.$langs->trans("None").''; + 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)) - { + if (!empty($conf->global->BANK_REPORT_LAST_NUM_RELEVE)) { print ' + '; + */ print '
    '; print dol_get_fiche_end(); @@ -581,8 +610,7 @@ if ($result) // Releve rappro - if ($acct->canBeConciliated() > 0) // Si compte rapprochable - { + if ($acct->canBeConciliated() > 0) { // Si compte rapprochable print load_fiche_titre($langs->trans("Reconciliation"), '', 'bank_account'); print '
    '."\n"; @@ -597,17 +625,17 @@ if ($result) print ''; print '"; - if ($user->rights->banque->consolidate) - { + if ($user->rights->banque->consolidate) { print ''; } else { print ''; @@ -615,8 +643,7 @@ if ($result) print ''; print ""; - if ($user->rights->banque->consolidate) - { + if ($user->rights->banque->consolidate) { print ''; @@ -631,8 +658,7 @@ if ($result) print '
    '; print ''; - if ($backtopage) - { + if ($backtopage) { print '   '; print ''; } @@ -643,7 +669,9 @@ 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 a7177b78b5a..384d0ef6963 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -32,9 +32,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; -if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} +if (!empty($conf->categorie->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'accountancy', 'compta')); @@ -52,15 +58,21 @@ $search_number = GETPOST('search_number', 'alpha'); $search_status = GETPOST('search_status') ?GETPOST('search_status', 'alpha') : 'opened'; // 'all' or ''='opened' $optioncss = GETPOST('optioncss', 'alpha'); -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $search_category_list = GETPOST("search_category_".Categorie::TYPE_ACCOUNT."_list", "array"); } +$socid = 0; // Security check -if ($user->socid) $socid = $user->socid; -if (!empty($user->rights->accounting->chartofaccount)) $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account -if (!$allowed) $result = restrictedArea($user, 'banque'); +if ($user->socid) { + $socid = $user->socid; +} +if (!empty($user->rights->accounting->chartofaccount)) { + $allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account +} +if (!$allowed) { + $result = restrictedArea($user, 'banque'); +} $diroutputmassaction = $conf->bank->dir_output.'/temp/massgeneration/'.$user->id; @@ -68,17 +80,23 @@ $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 (!$sortfield) $sortfield = 'b.label'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 'b.label'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Account($db); -$hookmanager->initHooks(array('bankaccountlist')); $extrafields = new ExtraFields($db); +$hookmanager->initHooks(array('bankaccountlist')); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -111,29 +129,44 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$permissiontoadd = $user->rights->banque->modifier; +$permissiontodelete = $user->rights->banque->supprimer; /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; + $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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'); - -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_label = ''; - $search_number = ''; - $search_status = ''; +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } +if (empty($reshook)) { + 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_label = ''; + $search_number = ''; + $search_status = ''; + } + + // Mass actions + $objectclass = 'Account'; + $objectlabel = 'FinancialAccount'; + $uploaddir = $conf->banque->dir_output; + include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php'; +} /* * View @@ -149,32 +182,44 @@ $accounts = array(); $sql = "SELECT b.rowid, b.label, b.courant, b.rappro, b.account_number, b.fk_accountancy_journal, b.currency_code, b.datec as date_creation, b.tms as date_update"; // 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."bank_account as b"; -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 (b.rowid = ef.fk_object)"; +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 (b.rowid = ef.fk_object)"; +} -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_ACCOUNT, "b.rowid"); } $sql .= " WHERE b.entity IN (".getEntity('bank_account').")"; -if ($search_status == 'opened') $sql .= " AND clos = 0"; -if ($search_status == 'closed') $sql .= " AND clos = 1"; +if ($search_status == 'opened') { + $sql .= " AND clos = 0"; +} +if ($search_status == 'closed') { + $sql .= " AND clos = 1"; +} -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_ACCOUNT, "b.rowid", $search_category_list); } -if ($search_ref != '') $sql .= natural_search('b.ref', $search_ref); -if ($search_label != '') $sql .= natural_search('b.label', $search_label); -if ($search_number != '') $sql .= natural_search('b.number', $search_number); +if ($search_ref != '') { + $sql .= natural_search('b.ref', $search_ref); +} +if ($search_label != '') { + $sql .= natural_search('b.label', $search_label); +} +if ($search_number != '') { + $sql .= natural_search('b.number', $search_number); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -186,8 +231,7 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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); } @@ -195,18 +239,18 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $accounts[$objp->rowid] = $objp->courant; $i++; } $db->free($resql); -} else dol_print_error($db); +} else { + dol_print_error($db); +} @@ -218,40 +262,70 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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_ref != '') $param .= '&search_ref='.urlencode($search_ref); -if ($search_label != '') $param .= '&search_label='.urlencode($search_label); -if ($search_number != '') $param .= '&search_number='.urlencode($search_number); -if ($search_status != '') $param .= '&search_status='.urlencode($search_status); -if ($show_files) $param .= '&show_files='.urlencode($show_files); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +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_number != '') { + $param .= '&search_number='.urlencode($search_number); +} +if ($search_status != '') { + $param .= '&search_status='.urlencode($search_status); +} +if ($show_files) { + $param .= '&show_files='.urlencode($show_files); +} +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( -// 'presend'=>$langs->trans("SendByMail"), -// 'builddoc'=>$langs->trans("PDFMerge"), +// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -if ($user->rights->banque->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if ($user->rights->banque->modifier) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); -$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer); - -// Lines of title fields -print ''; -if ($optioncss != '') print ''; +print ''."\n"; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; print ''; print ''; +print ''; + print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1); +$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1); $topicmail = "Information"; //$modelmail="subscription"; @@ -259,27 +333,29 @@ $objecttmp = new Account($db); $trackid = 'bank'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } $moreforfilter = ''; -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $moreforfilter .= $form->getFilterBox(Categorie::TYPE_ACCOUNT, $search_category_list); } // Bank accounts $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; +$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)) -{ +if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -287,60 +363,55 @@ if (!empty($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) : ''); -print '
    '; -print '
    '.$langs->trans("Conciliation")."'; - if ($objp->rappro) - { + if ($objp->rappro) { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; print ''; } else { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; } - if ($objp->num_releve) print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; + if ($objp->num_releve) { + print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; + } print ''.$objp->num_releve.' 
    ".$langs->trans("BankLineConciliated")."'; print 'rappro ? ' checked="checked"' : '')).'">'; print '
    '."\n"; +print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print '
    '."\n"; -print ''; +// Fields title search +// -------------------------------------------------------------------- +print ''; // Ref -if (!empty($arrayfields['b.ref']['checked'])) -{ +if (!empty($arrayfields['b.ref']['checked'])) { print ''; } // Label -if (!empty($arrayfields['b.label']['checked'])) -{ +if (!empty($arrayfields['b.label']['checked'])) { print ''; } // Account type -if (!empty($arrayfields['accountype']['checked'])) -{ +if (!empty($arrayfields['accountype']['checked'])) { print ''; } // Bank number -if (!empty($arrayfields['b.number']['checked'])) -{ +if (!empty($arrayfields['b.number']['checked'])) { print ''; } // Account number -if (!empty($arrayfields['b.account_number']['checked'])) -{ +if (!empty($arrayfields['b.account_number']['checked'])) { print ''; } // Accountancy journal -if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) -{ +if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) { print ''; } // Transactions to reconcile -if (!empty($arrayfields['toreconcile']['checked'])) -{ +if (!empty($arrayfields['toreconcile']['checked'])) { print ''; } // Currency -if (!empty($arrayfields['b.currency_code']['checked'])) -{ +if (!empty($arrayfields['b.currency_code']['checked'])) { print ''; } @@ -349,23 +420,20 @@ 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 +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation -if (!empty($arrayfields['b.datec']['checked'])) -{ +if (!empty($arrayfields['b.datec']['checked'])) { print ''; } // Date modification -if (!empty($arrayfields['b.tms']['checked'])) -{ +if (!empty($arrayfields['b.tms']['checked'])) { print ''; } // Status -if (!empty($arrayfields['b.clos']['checked'])) -{ +if (!empty($arrayfields['b.clos']['checked'])) { print ''; } // Balance -if (!empty($arrayfields['balance']['checked'])) -{ +if (!empty($arrayfields['balance']['checked'])) { print ''; } // Action column -print ''; -print ''; +print ''."\n"; -// Fields title +// Fields title label +// -------------------------------------------------------------------- print ''; -if (!empty($arrayfields['b.ref']['checked'])) print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['b.label']['checked'])) print_liste_field_titre($arrayfields['b.label']['label'], $_SERVER["PHP_SELF"], 'b.label', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['accountype']['checked'])) print_liste_field_titre($arrayfields['accountype']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['b.ref']['checked'])) { + print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['b.label']['checked'])) { + print_liste_field_titre($arrayfields['b.label']['label'], $_SERVER["PHP_SELF"], 'b.label', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['accountype']['checked'])) { + print_liste_field_titre($arrayfields['accountype']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['b.number']['checked'])) { + print_liste_field_titre($arrayfields['b.number']['label'], $_SERVER["PHP_SELF"], 'b.number', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['b.account_number']['checked'])) { + print_liste_field_titre($arrayfields['b.account_number']['label'], $_SERVER["PHP_SELF"], 'b.account_number', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) { + print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'], $_SERVER["PHP_SELF"], 'b.fk_accountancy_journal', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['b.currency_code']['checked'])) { + print_liste_field_titre($arrayfields['b.currency_code']['label'], $_SERVER["PHP_SELF"], 'b.currency_code', '', $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['toreconcile']['checked'])) { + print_liste_field_titre($arrayfields['toreconcile']['label'], $_SERVER["PHP_SELF"], '', '', $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); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['b.datec']['checked'])) { + print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['b.tms']['checked'])) { + print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['b.clos']['checked'])) { + print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['balance']['checked'])) { + print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; -$totalarray = array(); $found = 0; $i = 0; $lastcurrencycode = ''; +$totalarray = array(); +$found = 0; +$i = 0; +$lastcurrencycode = ''; -foreach ($accounts as $key=>$type) -{ - if ($i >= $limit) break; +foreach ($accounts as $key => $type) { + if ($i >= $limit) { + break; + } $found++; @@ -422,69 +518,71 @@ foreach ($accounts as $key=>$type) $solde = $objecttmp->solde(1); - if (!empty($lastcurrencycode) && $lastcurrencycode != $objecttmp->currency_code) - { + if (!empty($lastcurrencycode) && $lastcurrencycode != $objecttmp->currency_code) { $lastcurrencycode = 'various'; // We found several different currencies } - if ($lastcurrencycode != 'various') - { + if ($lastcurrencycode != 'various') { $lastcurrencycode = $objecttmp->currency_code; } print ''; // Ref - if (!empty($arrayfields['b.ref']['checked'])) - { + if (!empty($arrayfields['b.ref']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label - if (!empty($arrayfields['b.label']['checked'])) - { + if (!empty($arrayfields['b.label']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Account type - if (!empty($arrayfields['accountype']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Number - if (!empty($arrayfields['b.number']['checked'])) - { + if (!empty($arrayfields['b.number']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Account number - if (!empty($arrayfields['b.account_number']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Accountancy journal - if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) - { + if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency - if (!empty($arrayfields['b.currency_code']['checked'])) - { + if (!empty($arrayfields['b.currency_code']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Transactions to reconcile - if (!empty($arrayfields['toreconcile']['checked'])) - { + if (!empty($arrayfields['toreconcile']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -549,50 +653,61 @@ foreach ($accounts as $key=>$type) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['b.datec']['checked'])) - { + if (!empty($arrayfields['b.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['b.tms']['checked'])) - { + if (!empty($arrayfields['b.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['b.clos']['checked'])) - { + if (!empty($arrayfields['b.clos']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Balance - if (!empty($arrayfields['balance']['checked'])) - { + if (!empty($arrayfields['balance']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'balance'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'balance'; + } $totalarray['val']['balance'] += $solde; } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ''; @@ -602,16 +717,18 @@ foreach ($accounts as $key=>$type) } // If no record found -if (!$found) -{ +if (!$found) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''; } // Show total line -if ($lastcurrencycode != 'various') // If there is several currency, $lastcurrencycode is set to 'various' before -{ +if ($lastcurrencycode != 'various') { // If there is several currency, $lastcurrencycode is set to 'various' before // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 9a534b76320..c607f0f922c 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -61,17 +61,17 @@ $newbankreceipt = GETPOST('newbankreceipt', 'alpha'); // Security check $fieldid = (!empty($ref) ? $ref : $id); $fieldname = isset($ref) ? 'ref' : 'rowid'; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'banque', $fieldid, 'bank_account', '', '', $fieldname); -if ($user->rights->banque->consolidate && $action == 'dvnext' && !empty($dvid)) -{ +if ($user->rights->banque->consolidate && $action == 'dvnext' && !empty($dvid)) { $al = new AccountLine($db); $al->datev_next($dvid); } -if ($user->rights->banque->consolidate && $action == 'dvprev' && !empty($dvid)) -{ +if ($user->rights->banque->consolidate && $action == 'dvprev' && !empty($dvid)) { $al = new AccountLine($db); $al->datev_previous($dvid); } @@ -82,17 +82,24 @@ $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $pageplusone = GETPOST("pageplusone", 'int'); -if ($pageplusone) $page = $pageplusone - 1; -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +if ($pageplusone) { + $page = $pageplusone - 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 = "ASC"; -if (!$sortfield) $sortfield = "s.nom"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "s.nom"; +} $object = new Account($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $account = $object->id; // Force the search field on id of account } @@ -104,8 +111,7 @@ $contextpage = 'banktransactionlist'.(empty($object->ref) ? '' : '-'.$object->id // Define number of receipt to show (current, previous or next one ?) $found = false; -if ($_GET["rel"] == 'prev') -{ +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"; @@ -115,18 +121,15 @@ if ($_GET["rel"] == 'prev') dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $db->num_rows($resql); - if ($numrows > 0) - { + if ($numrows > 0) { $obj = $db->fetch_object($resql); $numref = $obj->num; $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"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -136,11 +139,9 @@ if ($_GET["rel"] == 'prev') dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $db->num_rows($resql); - if ($numrows > 0) - { + if ($numrows > 0) { $obj = $db->fetch_object($resql); $numref = $obj->num; $found = true; @@ -161,7 +162,9 @@ $sql .= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= ", ".MAIN_DB_PREFIX."bank as b"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau'; $sql .= " WHERE b.num_releve='".$db->escape($numref)."'"; -if (empty($numref)) $sql .= " OR b.num_releve is null"; +if (empty($numref)) { + $sql .= " OR b.num_releve is null"; +} $sql .= " AND b.fk_account = ".$object->id; $sql .= " AND b.fk_account = ba.rowid"; $sql .= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day @@ -174,12 +177,14 @@ $sqlrequestforbankline = $sql; * Actions */ -if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) -{ +if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) { // TODO Add a test to check newbankreceipt does not exists yet - $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX.'bank SET num_releve = "'.$db->escape($newbankreceipt).'" WHERE num_releve = "'.$db->escape($oldbankreceipt).'" AND fk_account = '.$id; + $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX.'bank'; + $sqlupdate .= ' SET num_releve = "'.$db->escape($newbankreceipt).'" WHERE num_releve = "'.$db->escape($oldbankreceipt).'" AND fk_account = '.((int) $id); $result = $db->query($sqlupdate); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } $action = 'view'; } @@ -199,7 +204,7 @@ $chargestatic = new ChargeSociales($db); $memberstatic = new Adherent($db); $paymentstatic = new Paiement($db); $paymentsupplierstatic = new PaiementFourn($db); -$paymentvatstatic = new TVA($db); +$paymentvatstatic = new Tva($db); $bankstatic = new Account($db); $banklinestatic = new AccountLine($db); $remisestatic = new RemiseCheque($db); @@ -209,26 +214,30 @@ $paymentvariousstatic = new PaymentVarious($db); // Must be before button action $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; -if ($id > 0) $param .= '&id='.urlencode($id); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.$contextpage; +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} +if ($id > 0) { + $param .= '&id='.urlencode($id); +} -if (empty($numref)) -{ +if (empty($numref)) { $sortfield = 'numr'; $sortorder = 'DESC'; // List of all standing receipts $sql = "SELECT DISTINCT(b.num_releve) as numr"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; - $sql .= " WHERE b.fk_account = ".$object->id; + $sql .= " WHERE b.fk_account = ".((int) $object->id); $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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); } @@ -236,8 +245,7 @@ if (empty($numref)) $sql .= $db->plimit($conf->liste_limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $numrows = $db->num_rows($result); $i = 0; @@ -257,12 +265,34 @@ if (empty($numref)) print '
    '; if ($object->canBeConciliated() > 0) { + $allowautomaticconciliation = false; // TODO + $titletoconciliatemanual = $langs->trans("Conciliate"); + $titletoconciliateauto = $langs->trans("Conciliate"); + if ($allowautomaticconciliation) { + $titletoconciliatemanual .= ' ('.$langs->trans("Manual").')'; + $titletoconciliateauto .= ' ('.$langs->trans("Auto").')'; + } + // If not cash account and can be reconciliate if ($user->rights->banque->consolidate) { - print ''.$langs->trans("Conciliate").''; + $buttonreconcile = ''.$titletoconciliatemanual.''; } else { - print ''.$langs->trans("Conciliate").''; + $buttonreconcile = ''.$titletoconciliatemanual.''; } + + + if ($allowautomaticconciliation) { + // If not cash account and can be reconciliate + if ($user->rights->banque->consolidate) { + $newparam = $param; + $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam); + $buttonreconcile .= ' '.$titletoconciliateauto.''; + } else { + $buttonreconcile .= ' '.$titletoconciliateauto.''; + } + } + + print $buttonreconcile; } print '
    '; @@ -288,18 +318,15 @@ if (empty($numref)) $balancestart = array(); $content = array(); - while ($i < min($numrows, $conf->liste_limit)) - { + while ($i < min($numrows, $conf->liste_limit)) { $objp = $db->fetch_object($result); - if (!isset($objp->numr)) - { + if (!isset($objp->numr)) { // } else { print ''; print ''; + print ''; // Calculate end amount $sql = "SELECT sum(b.amount) as amount"; @@ -329,13 +355,12 @@ if (empty($numref)) $sql .= " WHERE b.num_releve = '".$db->escape($objp->numr)."'"; $sql .= " AND b.fk_account = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $content[$objp->numr] = $obj->amount; $db->free($resql); } - print ''; + print ''; print ''; print "\n"; - while ($i < $numrows) - { + while ($i < $numrows) { $objp = $db->fetch_object($result); $total = $total + $objp->amount; @@ -433,11 +455,14 @@ if (empty($numref)) // Date de valeur print '\n"; // Type and num @@ -459,8 +484,11 @@ if (empty($numref)) print ''; $reg = array(); preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction - if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) print $langs->trans($reg[1]); - else print $objp->label; + if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) { + print $langs->trans($reg[1]); + } else { + print $objp->label; + } print ''; /* @@ -468,63 +496,56 @@ if (empty($numref)) */ $newline = 1; $links = $object->get_url($objp->rowid); - foreach ($links as $key=>$val) - { - if (!$newline) print ' - '; - else print '
    '; - if ($links[$key]['type'] == 'payment') - { + foreach ($links as $key => $val) { + if (!$newline) { + print ' - '; + } else { + print '
    '; + } + if ($links[$key]['type'] == 'payment') { $paymentstatic->id = $links[$key]['url_id']; $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') { // 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) - { + if ($objp->amount > 0) { $banklinestatic->fetch($links[$key]['url_id']); $bankstatic->id = $banklinestatic->fk_account; $bankstatic->label = $banklinestatic->bank_account_label; @@ -579,8 +600,7 @@ if (empty($numref)) } // Categories - if ($ve) - { + if ($ve) { $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_categ as ct"; $sql .= ", ".MAIN_DB_PREFIX."bank_class as cl"; @@ -589,13 +609,13 @@ if (empty($numref)) $sql .= " AND cl.lineid = ".$objp->rowid; $resc = $db->query($sql); - if ($resc) - { + if ($resc) { $numc = $db->num_rows($resc); $ii = 0; - if ($numc && !$newline) print '
    '; - while ($ii < $numc) - { + if ($numc && !$newline) { + print '
    '; + } + while ($ii < $numc) { $objc = $db->fetch_object($resc); print "
    ".$objc->label.""; $ii++; @@ -607,8 +627,7 @@ if (empty($numref)) print ""; - if ($objp->amount < 0) - { + if ($objp->amount < 0) { $totald = $totald + abs($objp->amount); print '\n"; } else { @@ -618,8 +637,7 @@ if (empty($numref)) print '\n"; - if ($user->rights->banque->modifier || $user->rights->banque->consolidate) - { + if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '"; @@ -642,6 +660,29 @@ if (empty($numref)) print "\n"; print "
    '; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $array = array( 'opened'=>$langs->trans("Opened"), @@ -375,46 +443,74 @@ if (!empty($arrayfields['b.clos']['checked'])) print ''; -$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); +print ''; +$searchpicto = $form->showFilterButtons(); print $searchpicto; print '
    '.$objecttmp->getNomUrl(1).''.$objecttmp->label.''; + if (!empty($arrayfields['accountype']['checked'])) { + print ''; print $objecttmp->type_lib[$objecttmp->type]; print ''.$objecttmp->number.''; - if (!empty($conf->accounting->enabled) && !empty($objecttmp->account_number)) - { + if (!empty($arrayfields['b.account_number']['checked'])) { + print ''; + if (!empty($conf->accounting->enabled) && !empty($objecttmp->account_number)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); - print $accountingaccount->getNomUrl(0, 1, 1, '', 1); + print ''; + print $accountingaccount->getNomUrl(0, 1, 1, '', 0); + print ''; } else { - print $objecttmp->account_number; + print ''.$objecttmp->account_number.''; } print ''; - if (!empty($conf->accounting->enabled) && !empty($objecttmp->fk_accountancy_journal)) - { + if (!empty($conf->accounting->enabled) && !empty($objecttmp->fk_accountancy_journal)) { $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); print $accountingjournal->getNomUrl(0, 1, 1, '', 1); @@ -492,27 +590,31 @@ foreach ($accounts as $key=>$type) print ''; } print ''; - print $objecttmp->currency_code; + print $objecttmp->currency_code; print ''; $conciliate = $objecttmp->canBeConciliated(); - if ($conciliate == -2) print ''.$langs->trans("CashAccount").''; - elseif ($conciliate == -3) print ''.$langs->trans("Closed").''; - elseif (empty($objecttmp->rappro)) { + if ($conciliate == -2) { + print ''.$langs->trans("CashAccount").''; + } elseif ($conciliate == -3) { + print ''.$langs->trans("Closed").''; + } elseif (empty($objecttmp->rappro)) { print ''.$langs->trans("ConciliationDisabled").''; } else { $result = $objecttmp->load_board($user, $objecttmp->id); @@ -533,7 +635,9 @@ foreach ($accounts as $key=>$type) } print ''; print dol_print_date($objecttmp->date_creation, 'dayhour'); print ''; print dol_print_date($objecttmp->date_update, 'dayhour'); print ''.$objecttmp->getLibStatut(5).''; - print ''.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).''; + print ''; + print ''.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).''; + 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 - { + 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($objecttmp->id, $arrayofselected)) $selected = 1; + if (in_array($objecttmp->id, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '.$langs->trans("NoRecordFound").'
    '; - if ($action != 'editbankreceipt' || $objp->numr != $brref) - { + if ($action != 'editbankreceipt' || $objp->numr != $brref) { print ''.$objp->numr.''; } else { print ''; @@ -315,13 +342,12 @@ if (empty($numref)) $sql .= " WHERE b.num_releve < '".$db->escape($objp->numr)."'"; $sql .= " AND b.fk_account = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $balancestart[$objp->numr] = $obj->amount; $db->free($resql); } - print ''.price($balancestart[$objp->numr], '', $langs, 1, -1, -1, $conf->currency).''.price($balancestart[$objp->numr], '', $langs, 1, -1, -1, $conf->currency).''.price(($balancestart[$objp->numr] + $content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).''.price(($balancestart[$objp->numr] + $content[$objp->numr]), '', $langs, 1, -1, -1, $conf->currency).''; if ($user->rights->banque->consolidate && $action != 'editbankreceipt') { @@ -399,8 +424,7 @@ if (empty($numref)) $sql .= " AND b.fk_account = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $total = $obj->amount; $db->free($resql); @@ -410,8 +434,7 @@ if (empty($numref)) $sql = $sqlrequestforbankline; $result = $db->query($sql); - if ($result) - { + if ($result) { $numrows = $db->num_rows($result); $i = 0; @@ -421,8 +444,7 @@ if (empty($numref)) print ''.price($total).' 
    '; - print dol_print_date($db->jdate($objp->dv), "day").' '; - print ''; + print ''.dol_print_date($db->jdate($objp->dv), "day").''; + print ' '; + print ''; + print ''; print img_edit_remove()." "; - print ''; + print ''; print img_edit_add().""; + print ''; print "'.price($objp->amount * -1)." '.price(price2num($total, 'MT'))."'; print img_edit(); print "
    "; + // Code to adjust value date with plus and less picto using an Ajax call instead of a full reload of page + $urlajax = DOL_URL_ROOT.'/core/ajax/bankconciliate.php?token='.currentToken(); + print ' + + '; + print ""; print "\n"; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index c100dfd0091..9665a8a2b1f 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -33,23 +33,30 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array("banks", "categories", "multicurrency")); - -if (!$user->rights->banque->transfer) - accessforbidden(); +$socid = 0; +if ($user->socid > 0) { + $socid = $user->socid; +} +if (!$user->rights->banque->transfer) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $error = 0; $hookmanager->initHooks(array('banktransfer')); + /* * 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 ($action == 'add') -{ +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} +if ($action == 'add') { $langs->load("errors"); $dateo = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); @@ -57,28 +64,23 @@ if ($action == 'add') $amount = price2num(GETPOST('amount', 'alpha'), 'MT'); $amountto = price2num(GETPOST('amountto', 'alpha'), 'MT'); - if (!$label) - { + if (!$label) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Description")), null, 'errors'); } - if (!$amount) - { + if (!$amount) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); } - if (!GETPOST('account_from', 'int')) - { + if (!GETPOST('account_from', 'int')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TransferFrom")), null, 'errors'); } - if (!GETPOST('account_to', 'int')) - { + if (!GETPOST('account_to', 'int')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TransferTo")), null, 'errors'); } - if (!$error) - { + if (!$error) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $accountfrom = new Account($db); @@ -87,19 +89,25 @@ if ($action == 'add') $accountto = new Account($db); $accountto->fetch(GETPOST('account_to', 'int')); - if ($accountto->currency_code == $accountfrom->currency_code) - { + if ($accountto->currency_code == $accountfrom->currency_code) { $amountto = $amount; } else { - if (!$amountto) - { + if (!$amountto) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AmountTo")), null, 'errors'); } } + if ($amountto < 0) { + $error++; + setEventMessages($langs->trans("AmountMustBePositive"), null, 'errors'); + } - if (($accountto->id != $accountfrom->id) && empty($error)) - { + if ($accountto->id == $accountfrom->id) { + $error++; + setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); + } + + if (empty($error)) { $db->begin(); $bank_line_id_from = 0; @@ -109,25 +117,39 @@ if ($action == 'add') // By default, electronic transfert from bank to bank $typefrom = 'PRE'; $typeto = 'VIR'; - if ($accountto->courant == Account::TYPE_CASH || $accountfrom->courant == Account::TYPE_CASH) - { + if ($accountto->courant == Account::TYPE_CASH || $accountfrom->courant == Account::TYPE_CASH) { // This is transfer of change $typefrom = 'LIQ'; $typeto = 'LIQ'; } - if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, price2num(-1 * $amount), '', '', $user); - if (!($bank_line_id_from > 0)) $error++; - if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, $amountto, '', '', $user); - if (!($bank_line_id_to > 0)) $error++; + if (!$error) { + $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, price2num(-1 * $amount), '', '', $user); + } + if (!($bank_line_id_from > 0)) { + $error++; + } + if (!$error) { + $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, $amountto, '', '', $user); + } + if (!($bank_line_id_to > 0)) { + $error++; + } - if (!$error) $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); - if (!($result > 0)) $error++; - if (!$error) $result = $accountto->add_url_line($bank_line_id_to, $bank_line_id_from, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); - if (!($result > 0)) $error++; + if (!$error) { + $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); + } + if (!($result > 0)) { + $error++; + } + if (!$error) { + $result = $accountto->add_url_line($bank_line_id_to, $bank_line_id_from, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); + } + if (!($result > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $mesgs = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount, $langs->transnoentitiesnoconv("Currency".$conf->currency)); $mesgs = str_replace('{s1}', ''.$accountfrom->label.'', $mesgs); $mesgs = str_replace('{s2}', ''.$accountto->label.'', $mesgs); @@ -137,9 +159,6 @@ if ($action == 'add') setEventMessages($accountfrom->error.' '.$accountto->error, null, 'errors'); $db->rollback(); } - } else { - $error++; - setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); } } } @@ -150,7 +169,10 @@ if ($action == 'add') * View */ -llxHeader(); +$help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas'; +$title = $langs->trans('MenuBankInternalTransfer'); + +llxHeader('', $title, $help_url); print ' '; } - if (!GETPOST('fac_rec', 'int')) print ' '; + if (!GETPOST('fac_rec', 'int')) { + print ' '; + } print '
    '.$langs->trans('CreateFromRepeatableInvoice').''; //print ''; print ''; // Option to reload page to retrieve customer informations. Note, this clear other input - if (empty($conf->global->RELOAD_PAGE_ON_TEMPLATE_CHANGE_DISABLED)) - { + if (empty($conf->global->RELOAD_PAGE_ON_TEMPLATE_CHANGE_DISABLED)) { print ''; $tmp = $tmp.''; $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); - print '
    '; + print ''; + print ''; - if (($origin == 'propal') || ($origin == 'commande')) - { - print ''; - print ''; } - print '
    '; print $desc; print ''; + if (($origin == 'propal') || ($origin == 'commande')) { + print ''; $arraylist = array( 'amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')), @@ -3077,18 +3216,18 @@ if ($action == 'create') ); print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit', 'aZ09'), 0, 0, 0, '', 1); print ''.$langs->trans('Value').':'; + print ''; + print ''.$langs->trans("AmountOrPercent").''; + print '
    '; + print '
    '; print ''; - } + } } - if ($socid > 0) - { - if (!empty($conf->global->INVOICE_USE_SITUATION)) - { + if ($socid > 0) { + if (!empty($conf->global->INVOICE_USE_SITUATION)) { // First situation invoice print '
    '; $tmp = ' '; @@ -3102,13 +3241,15 @@ if ($action == 'create') print '
    '; $tmp = ''.$langs->trans('NoSituations').'') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) + if ($opt == ('') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) { $tmp .= ' disabled'; + } $tmp .= '> '; $text = ' '; $text .= ''; @@ -3118,8 +3259,7 @@ if ($action == 'create') } // Replacement - if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT)) - { + if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT)) { // Type de facture $facids = $facturestatic->list_replacable_invoices($soc->id); if ($facids < 0) { @@ -3128,11 +3268,11 @@ if ($action == 'create') } $options = ""; if (is_array($facids)) { - foreach ($facids as $facparam) - { + foreach ($facids as $facparam) { $options .= ''; @@ -3142,7 +3282,9 @@ if ($action == 'create') print ''; print '
    '; $tmp = 'id > 0) $tmp .= ' disabled'; + if (!$options || $invoice_predefined->id > 0) { + $tmp .= ' disabled'; + } $tmp .= '> '; print ''; $text = ''; $text .= ' '; $text = ' '; @@ -3197,24 +3339,19 @@ if ($action == 'create') } - if (empty($origin)) - { - if ($socid > 0) - { + if (empty($origin)) { + if ($socid > 0) { // Credit note - if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE)) - { + if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE)) { // Show link for credit note $facids = $facturestatic->list_qualified_avoir_invoices($soc->id); - if ($facids < 0) - { + if ($facids < 0) { dol_print_error($db, $facturestatic); exit; } $optionsav = ""; $newinvoice_static = new Facture($db); - foreach ($facids as $key => $valarray) - { + foreach ($facids as $key => $valarray) { $newinvoice_static->id = $key; $newinvoice_static->ref = $valarray ['ref']; $newinvoice_static->statut = $valarray ['status']; @@ -3222,8 +3359,9 @@ if ($action == 'create') $newinvoice_static->paye = $valarray ['paye']; $optionsav .= '
    '.$langs->trans('Amount').''.price($object-> print '
    '.$langs->trans('Note').''.nl2br($object->note).'
    '.$langs->trans('PayedByThisPayment').'
    '.$objp->label.''.price($objp->sc_amount).''.price($objp->sc_amount).''.$socialcontrib->getLibStatut(4, $objp->amount).''.price($objp->amount).''.price($objp->amount).'
    '; + +// Ref +/*print ''; +print '';*/ + +// Date +print ''; + +// Mode +print ''; + +// Numero +print ''; + +// Montant +print ''; + +// Note +print ''; + +// Bank account +if (!empty($conf->banque->enabled)) { + if ($object->bank_account) { + $bankline = new AccountLine($db); + $bankline->fetch($object->bank_line); + + print ''; + print ''; + print ''; + print ''; + } +} + +print '
    '.$langs->trans('Ref').''; +print $form->showrefnav($object,'id','',1,'rowid','id'); +print '
    '.$langs->trans('Date').''.dol_print_date($object->datep, 'day').'
    '.$langs->trans('Mode').''.$langs->trans("PaymentType".$object->type_code).'
    '.$langs->trans('Numero').''.$object->num_paiement.'
    '.$langs->trans('Amount').''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
    '.$langs->trans('Note').''.nl2br($object->note).'
    '.$langs->trans('BankTransactionLine').''; + print $bankline->getNomUrl(1, 0, 'showall'); + print '
    '; + +print ''; + +print dol_get_fiche_end(); + + +/* + * List of social contributions payed + */ + +$disable_delete = 0; +$sql = 'SELECT f.rowid as scid, f.label as label, f.paye, f.amount as tva_amount, pf.amount'; +//$sql .= ', pc.libelle as sc_type'; +$sql .= ' FROM '.MAIN_DB_PREFIX.'payment_vat as pf,'.MAIN_DB_PREFIX.'tva as f'; +//$sql .= ', '.MAIN_DB_PREFIX.'c_chargesociales as pc'; +$sql .= ' WHERE pf.fk_tva = f.rowid'; +//$sql .= ' AND f.fk_type = pc.id'; +$sql .= ' AND f.entity = '.$conf->entity; +$sql .= ' AND pf.rowid = '.$object->id; + +dol_syslog("compta/payment_vat/card.php", LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + + $i = 0; + $total = 0; + print '
    '; + print ''; + print ''; + //print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + if ($num > 0) { + while ($i < $num) { + $objp = $db->fetch_object($resql); + + print ''; + // Ref + print '\n"; + // Type + /* print '\n";*/ + // Label + print ''; + // Expected to pay + print ''; + // Status + print ''; + // Amount payed + print ''; + print "\n"; + if ($objp->paye == 1) { // If at least one invoice is paid, disable delete + $disable_delete = 1; + } + $total = $total + $objp->amount; + $i++; + } + } + + + print "
    '.$langs->trans('VATDeclaration').''.$langs->trans('Type').''.$langs->trans('Label').''.$langs->trans('ExpectedToPay').''.$langs->trans('Status').''.$langs->trans('PayedByThisPayment').'
    '; + $tva->fetch($objp->scid); + print $tva->getNomUrl(1); + print "'; + print $tva->type_label;4 + print "'.$objp->label.''.price($objp->tva_amount).''.$tva->getLibStatut(4, $objp->amount).''.price($objp->amount).'
    \n"; + $db->free($resql); +} else { + dol_print_error($db); +} + + + +/* + * Boutons Actions + */ +print '
    '; + +/* +if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) +{ + if ($user->socid == 0 && $object->statut == 0 && $_GET['action'] == '') + { + if ($user->rights->facture->paiement) + { + print ''.$langs->trans('Valid').''; + } + } +} +*/ + +if ($action == '') { + if ($user->rights->tax->charges->supprimer) { + if (!$disable_delete) { + print ''.$langs->trans('Delete').''; + } else { + print ''.$langs->trans('Delete').''; + } + } +} + +print '
    '; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index 78425398017..5d76ae4d8b4 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -38,7 +38,9 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'paymentbybanktransfer', '', ''); @@ -55,10 +57,9 @@ $result = restrictedArea($user, 'paymentbybanktransfer', '', ''); llxHeader('', $langs->trans("SuppliersStandingOrdersArea")); -if (prelevement_check_config() < 0) -{ +if (prelevement_check_config('bank-transfer') < 0) { $langs->load("errors"); - setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors'); + setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("PaymentByBankTransfer")), null, 'errors'); } print load_fiche_titre($langs->trans("SuppliersStandingOrdersArea")); @@ -83,9 +84,9 @@ print ''; print '
    '.$langs->trans("AmountToWithdraw").''; +print ''; print price($bprev->SommeAPrelever('bank-transfer'), '', '', 1, -1, -1, 'auto'); -print '

    '; +print '

    '; @@ -97,24 +98,28 @@ $sql .= " pfd.date_demande, pfd.amount,"; $sql .= " s.nom as name, s.email, s.rowid as socid, s.tva_intra"; $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"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; $sql .= " AND f.total_ttc > 0"; -if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) -{ +if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; } $sql .= " AND pfd.traite = 0"; $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND pfd.fk_facture_fourn = f.rowid"; -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; +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 = ".((int) $socid); +} $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -122,10 +127,8 @@ if ($resql) print ''; print ''; print ''; - if ($num) - { - while ($i < $num && $i < 20) - { + if ($num) { + while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); $invoicestatic->id = $obj->rowid; @@ -186,8 +189,7 @@ $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -202,8 +204,7 @@ if ($result) print ''; if ($num > 0) { - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); print ''; @@ -215,8 +216,8 @@ if ($result) print $bprev->getNomUrl(1); print "\n"; print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; $i++; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index b58b4ddec0c..cd3e155ae06 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals')); // Security check -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // Get supervariables $action = GETPOST('action', 'aZ09'); @@ -48,13 +50,19 @@ $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 +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 = 'pl.fk_soc'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'pl.fk_soc'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} $object = new BonPrelevement($db); @@ -77,15 +85,14 @@ if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transf $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($action == 'confirm_delete') - { +if (empty($reshook)) { + if ($action == 'confirm_delete') { $res = $object->delete($user); - if ($res > 0) - { + if ($res > 0) { if ($object->type == 'bank-transfer') { header("Location: ".DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php'); } else { @@ -96,8 +103,7 @@ if (empty($reshook)) } // Seems to no be used and replaced with $action == 'infocredit' - if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') - { + if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') { if ($object->statut == 2) { $res = -1; setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors'); @@ -105,50 +111,46 @@ if (empty($reshook)) $res = $object->set_credite(); } - if ($res >= 0) - { + if ($res >= 0) { header("Location: card.php?id=".$id); exit; } } - if ($action == 'infotrans' && $user->rights->prelevement->bons->send) - { + 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'; + if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref) + { + $dir = $conf->prelevement->dir_output.'/receipts'; - if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0) - { - $object->set_infotrans($user, $dt, GETPOST('methode','alpha')); - } + if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0) + { + $object->set_infotrans($user, $dt, GETPOST('methode','alpha')); + } - header("Location: card.php?id=".$id); - exit; - } - else - { - dol_syslog("Fichier invalide",LOG_WARNING); - $mesg='BadFile'; - }*/ + header("Location: card.php?id=".$id); + exit; + } + else + { + dol_syslog("Fichier invalide",LOG_WARNING); + $mesg='BadFile'; + }*/ $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha')); - if ($error) - { + 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) - { + if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) { $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if ($object->statut == 2) { @@ -158,9 +160,8 @@ if (empty($reshook)) $error = $object->set_infocredit($user, $dt); } - if ($error) - { - setEventMessages($object->error, $object->errors, 'errors'); + if ($error) { + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -175,13 +176,11 @@ $form = new Form($db); llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($id > 0 || $ref) -{ +if ($id > 0 || $ref) { $head = prelevement_prepare_head($object); print dol_get_fiche_head($head, 'prelevement', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - if (GETPOST('error', 'alpha') != '') - { + if (GETPOST('error', 'alpha') != '') { print '
    '.$object->getErrorString(GETPOST('error', 'alpha')).'
    '; } @@ -210,8 +209,7 @@ if ($id > 0 || $ref) print ''; */ - if ($object->date_trans <> 0) - { + if ($object->date_trans <> 0) { $muser = new User($db); $muser->fetch($object->user_trans); @@ -222,8 +220,7 @@ if ($id > 0 || $ref) print $object->methodes_trans[$object->method_trans]; print ''; } - if ($object->date_credit <> 0) - { + if ($object->date_credit <> 0) { print '
    '; @@ -241,22 +238,29 @@ if ($id > 0 || $ref) print ''; print ''; print ''; print '
    '.$langs->trans("SupplierInvoiceWaitingWithdraw").' ('.$num.')
    '.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.$bprev->getLibStatut(3)."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
    '.$langs->trans('CreditDate').''; print dol_print_date($object->date_credit, 'day'); print '
    '; $labelofbankfield = "BankToReceiveWithdraw"; - if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + if ($object->type == 'bank-transfer') { + $labelofbankfield = 'BankToPayCreditTransfer'; + } print $langs->trans($labelofbankfield); print ''; - if ($acc->id > 0) + if ($acc->id > 0) { print $acc->getNomUrl(1); + } print '
    '; $labelfororderfield = 'WithdrawalFile'; - if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + if ($object->type == 'bank-transfer') { + $labelfororderfield = 'CreditTransferFile'; + } print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; $modulepart = 'prelevement'; - if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + if ($object->type == 'bank-transfer') { + $modulepart = 'paymentbybanktransfer'; + } print ''.$relativepath.''; print '
    '; @@ -268,8 +272,7 @@ if ($id > 0 || $ref) $formconfirm = ''; // Confirmation to delete - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Delete'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); } @@ -283,8 +286,7 @@ if ($id > 0 || $ref) print $formconfirm; - if (empty($object->date_trans) && $user->rights->prelevement->bons->send && $action == 'settransmitted') - { + if (empty($object->date_trans) && $user->rights->prelevement->bons->send && $action == 'settransmitted') { print '
    '; print ''; print ''; @@ -303,8 +305,7 @@ if ($id > 0 || $ref) print '
    '; } - if (!empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action == 'setcredited') - { + if (!empty($object->date_trans) && $object->date_credit == 0 && $user->rights->prelevement->bons->credit && $action == 'setcredited') { print ''; print ''; print ''; @@ -323,17 +324,14 @@ if ($id > 0 || $ref) // Actions - if ($action != 'settransmitted' && $action != 'setcredited') - { + if ($action != 'settransmitted' && $action != 'setcredited') { print "\n
    \n"; - if (empty($object->date_trans) && $user->rights->prelevement->bons->send) - { + if (empty($object->date_trans) && $user->rights->prelevement->bons->send) { print "id."\">".$langs->trans("SetToStatusSent").""; } - if (!empty($object->date_trans) && $object->date_credit == 0) - { + if (!empty($object->date_trans) && $object->date_credit == 0) { print "id."\">".$langs->trans("ClassCredited").""; } @@ -353,21 +351,22 @@ if ($id > 0 || $ref) $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - $sql .= " WHERE pl.fk_prelevement_bons = ".$id; + $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id); $sql .= " AND pl.fk_prelevement_bons = pb.rowid"; $sql .= " AND pb.entity = ".$conf->entity; $sql .= " AND pl.fk_soc = s.rowid"; - if ($socid) $sql .= " AND s.rowid = ".$socid; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { + // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -377,12 +376,11 @@ if ($id > 0 || $ref) $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - $urladd = "&id=".$id; + $urladd = "&id=".urlencode($id); print ''."\n"; print ''; @@ -406,8 +404,7 @@ if ($id > 0 || $ref) $total = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); print '
    '.price($obj->amount)."'.price($obj->amount)."'; - if ($obj->statut == 3) - { - print ''.$langs->trans("StatusRefused").''; + if ($obj->statut == 3) { + print ''.$langs->trans("StatusRefused").''; } else { - if ($object->statut == BonPrelevement::STATUS_CREDITED) - { + if ($object->statut == BonPrelevement::STATUS_CREDITED) { if ($obj->statut == 2) { - if ($user->rights->prelevement->bons->credit) - { + if ($user->rights->prelevement->bons->credit) { //print ''.$langs->trans("StandingOrderReject").''; print ''.$langs->trans("StandingOrderReject").''; } else { @@ -457,15 +451,16 @@ if ($id > 0 || $ref) $i++; } - if ($num > 0) - { + if ($num > 0) { print '
    '.$langs->trans("Total").' '; - if (empty($offset) && $num <= $limit) // If we have all record on same page, then the following test/warning can be done - { - if ($total != $object->amount) print img_warning("TotalAmountOfdirectDebitOrderDiffersFromSumOfLines"); + if (empty($offset) && $num <= $limit) { + // If we have all record on same page, then the following test/warning can be done + if ($total != $object->amount) { + print img_warning($langs->trans("TotalAmountOfdirectDebitOrderDiffersFromSumOfLines")); + } } print price($total); print "
    '; @@ -180,7 +214,9 @@ print ''; print '
    '; print ''; -if ($mesg) print $mesg; +if ($mesg) { + print $mesg; +} print '
    '."\n"; @@ -189,10 +225,15 @@ print ''; print ''; if ($nb) { if ($pricetowithdraw) { + print $langs->trans('BankToReceiveWithdraw').': '; + $form->select_comptes($conf->global->PRELEVEMENT_ID_BANKACCOUNT, 'id_bankaccount', 0, "courant=1"); + print ' - '; + 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') { @@ -214,8 +255,7 @@ if ($nb) { print ''.$title."\n"; } } else { - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { $title = $langs->trans("CreateForSepaFRST"); if ($type == 'bank-transfer') { $title = $langs->trans("CreateSepaFileForPaymentByBankTransfer"); @@ -256,7 +296,7 @@ print '
    '; */ $sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,"; -$sql .= " pfd.date_demande, pfd.amount"; +$sql .= " pfd.rowid as request_row_id, pfd.date_demande, pfd.amount"; if ($type == 'bank-transfer') { $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; } else { @@ -266,8 +306,7 @@ $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; -if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) -{ +if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } //$sql .= " AND pfd.amount > 0"; @@ -279,15 +318,16 @@ if ($type == 'bank-transfer') { } else { $sql .= " AND pfd.fk_facture = f.rowid"; } -if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; +if ($socid > 0) { + $sql .= " AND f.fk_soc = ".((int) $socid); +} $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 (($page * $limit) > $nbtotalofrecords) { + // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -296,15 +336,20 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; $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 ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($socid) { + $param .= '&socid='.urlencode($socid); + } + if ($option) { + $param .= "&option=".urlencode($option); + } print ''; print ''; @@ -317,7 +362,7 @@ 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, '', '', $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); $tradinvoice = "Invoice"; if ($type == 'bank-transfer') { @@ -332,15 +377,16 @@ if ($resql) print '
    '.$langs->trans("RUM").''.$langs->trans("AmountTTC").''.$langs->trans("DateRequest").''.$form->showCheckAddButtons('checkforselect', 1).'
    '; print $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; - if ($bac->verif() <= 0) print img_warning('Error on default bank number for IBAN : '.$bac->error_message); + if ($bac->verif() <= 0) { + print img_warning('Error on default bank number for IBAN : '.$bac->error_message); + } print ''; print dol_print_date($db->jdate($obj->date_demande), 'day'); print ''; + $selected = 0; + if (in_array($obj->request_row_id, $arrayofselected)) { + $selected = 1; + } + print ''; + print '
    '; - print ''; - print ''; - print ''; + print"\n\n"; + print '
    '.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Amount").'
    '; + print ''; + print ''; + print ''; - while ($i < min($num,$limit)) - { - $obj = $db->fetch_object($result); + while ($i < min($num,$limit)) + { + $obj = $db->fetch_object($result); - print ''; + print ''; - print "\n"; + print "\n"; - print '\n"; + print '\n"; - print '\n"; + print '\n"; - print "\n"; - $i++; - } - print "
    '.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Amount").'
    "; - $bprev->id=$obj->rowid; - $bprev->ref=$obj->ref; - print $bprev->getNomUrl(1); - print ""; + $bprev->id=$obj->rowid; + $bprev->ref=$obj->ref; + print $bprev->getNomUrl(1); + print "'.dol_print_date($db->jdate($obj->datec),'day')."'.dol_print_date($db->jdate($obj->datec),'day')."'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."

    "; - $db->free($result); + print "

    "; + $db->free($result); } else { - dol_print_error($db); + dol_print_error($db); } */ diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 94c8c0639e1..266097f7a2d 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -37,7 +37,9 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); $status = GETPOST('status', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search @@ -54,12 +56,18 @@ $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 || 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 +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 (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "f.ref"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.ref"; +} $massactionbutton = ''; @@ -72,11 +80,12 @@ $hookmanager->initHooks(array('withdrawalstodolist')); $parameters = array('socid' => $socid, 'limit' => $limit, 'page' => $page, 'offset' => $offset); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // 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 -{ +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_facture = ''; $search_societe = ''; $search_array_options = array(); @@ -123,17 +132,26 @@ if ($type != 'bank-transfer') { } $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.rowid = f.fk_soc"; $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; -if (!$status) $sql .= " AND pfd.traite = 0"; +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 = ".((int) $socid); +} +if (!$status) { + $sql .= " AND pfd.traite = 0"; +} $sql .= " AND pfd.ext_payment_id IS NULL"; -if ($status) $sql .= " AND pfd.traite = ".$status; +if ($status) { + $sql .= " AND pfd.traite = ".((int) $status); +} $sql .= " AND f.total_ttc > 0"; -if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) -{ +if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } if ($type != 'bank-transfer') { @@ -141,32 +159,32 @@ if ($type != 'bank-transfer') { } else { $sql .= " AND pfd.fk_facture_fourn = f.rowid"; } -if ($search_facture) $sql .= natural_search("f.ref", $search_facture); -if ($search_societe) $sql .= natural_search("s.nom", $search_societe); +if ($search_facture) { + $sql .= natural_search("f.ref", $search_facture); +} +if ($search_societe) { + $sql .= natural_search("s.nom", $search_societe); +} $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) -{ +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -182,7 +200,9 @@ if ($type == 'bank-transfer') { } print ''; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -226,10 +246,11 @@ print '
    '.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
    '.$langs->trans("Amount").''.price($object->amount).'
    '.$langs->trans('CreditDate').''; print dol_print_date($object->date_credit, 'day'); print '
    '; $labelofbankfield = "BankToReceiveWithdraw"; - if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + if ($object->type == 'bank-transfer') { + $labelofbankfield = 'BankToPayCreditTransfer'; + } print $langs->trans($labelofbankfield); print ''; - if ($acc->id > 0) + if ($acc->id > 0) { print $acc->getNomUrl(1); + } print '
    '; $labelfororderfield = 'WithdrawalFile'; - if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + if ($object->type == 'bank-transfer') { + $labelfororderfield = 'CreditTransferFile'; + } print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; $modulepart = 'prelevement'; - if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + if ($object->type == 'bank-transfer') { + $modulepart = 'paymentbybanktransfer'; + } print ''.$relativepath.''; print '
    '; @@ -152,7 +163,7 @@ if ($id > 0 || $ref) print dol_get_fiche_end(); } else { - dol_print_error($db); + dol_print_error($db); } } @@ -183,18 +194,20 @@ if ($object->type != 'bank-transfer') { } else { $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; } -if ($object->id > 0) $sql .= " AND p.rowid=".$object->id; -if ($socid) $sql .= " AND s.rowid = ".$socid; +if ($object->id > 0) { + $sql .= " AND p.rowid = ".((int) $object->id); +} +if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); +} $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -203,16 +216,17 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); - $i = 0; +if ($resql) { + $num = $db->num_rows($resql); + $i = 0; - $param = "&id=".$id; + $param = "&id=".urlencode($id); // Lines of title fields print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -226,58 +240,57 @@ if ($resql) print_barre_liste($langs->trans("Invoices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); - print"\n\n"; + print"\n\n"; print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; - print ''; - print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("AmountInvoice", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); + print '
    '; + print ''; + print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("AmountInvoice", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre(''); print "\n"; - $totalinvoices = 0; + $totalinvoices = 0; $totalamount_requested = 0; $invoicetmpcustomer = new Facture($db); $invoicetmpsupplier = new FactureFournisseur($db); - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($resql); + while ($i < min($num, $limit)) { + $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 "\n"; - print '\n"; + print '\n"; - // Amount of invoice - print '\n"; + // Amount of invoice + print '\n"; - // Amount requested - print '\n"; + // Amount requested + print '\n"; - // Status of requests - 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 ''; - print ''; - print ''; + print ''; + print ''; + print '\n"; - print '\n"; - print ''; - print ''; - print "\n"; + print "\n"; + print ''; + print ''; + print "\n"; } - print "
    "; - print $invoicetmp->getNomUrl(1); + print ""; + print $invoicetmp->getNomUrl(1); print "'; - print $thirdpartytmp->getNomUrl(1); - print "'; + print $thirdpartytmp->getNomUrl(1); + print "'.price($obj->total_ttc)."'.price($obj->total_ttc)."'.price($obj->amount_requested)."'.price($obj->amount_requested)."'; + // Status of requests + print ''; - if ($obj->statut == 0) { - print '-'; + if ($obj->statut == 0) { + print '-'; } elseif ($obj->statut == 2) { if ($obj->type == 'bank-transfer') { print $langs->trans("StatusDebited"); @@ -285,42 +298,43 @@ if ($resql) print $langs->trans("StatusCredited"); } } elseif ($obj->statut == 3) { - print ''.$langs->trans("StatusRefused").''; + print ''.$langs->trans("StatusRefused").''; } - print "
    '.$langs->trans("Total").' '; + if ($num > 0) { + print '
    '.$langs->trans("Total").' '; //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 "'; + print ''; print price($totalamount_requested); - print "  
      
    "; - print '
    '; + print "
    "; + print ''; - $db->free($result); + $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 fb1a9451aed..b202d8ce0b7 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -35,7 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills')); // Security check -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // Get supervariables $prev_id = GETPOST('id', 'int'); @@ -48,7 +50,9 @@ $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -73,10 +77,8 @@ if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transf llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($prev_id > 0 || $ref) -{ - if ($object->fetch($prev_id, $ref) >= 0) - { +if ($prev_id > 0 || $ref) { + if ($object->fetch($prev_id, $ref) >= 0) { $head = prelevement_prepare_head($object); print dol_get_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); @@ -92,8 +94,7 @@ if ($prev_id > 0 || $ref) print '
    '.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
    '.$langs->trans("Amount").''.price($object->amount).'
    '.$langs->trans('CreditDate').''; print dol_print_date($object->date_credit, 'day'); print '
    '; $labelofbankfield = "BankToReceiveWithdraw"; - if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + if ($object->type == 'bank-transfer') { + $labelofbankfield = 'BankToPayCreditTransfer'; + } print $langs->trans($labelofbankfield); print ''; - if ($acc->id > 0) + if ($acc->id > 0) { print $acc->getNomUrl(1); + } print '
    '; $labelfororderfield = 'WithdrawalFile'; - if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + if ($object->type == 'bank-transfer') { + $labelfororderfield = 'CreditTransferFile'; + } print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; $modulepart = 'prelevement'; - if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + if ($object->type == 'bank-transfer') { + $modulepart = 'paymentbybanktransfer'; + } print ''.$relativepath.''; print '
    '; @@ -146,7 +153,7 @@ if ($prev_id > 0 || $ref) print dol_get_fiche_end(); } else { - dol_print_error($db); + dol_print_error($db); } } @@ -169,17 +176,17 @@ $sql .= " AND p.entity = ".$conf->entity; $sql .= " AND pl.fk_soc = s.rowid"; $sql .= " AND pl.statut = 3 "; $sql .= " AND pr.fk_prelevement_lignes = pl.rowid"; -if ($socid) $sql .= " AND s.rowid = ".$socid; +if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); +} $sql .= " ORDER BY pl.amount DESC"; // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -188,26 +195,23 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); +if ($resql) { + $num = $db->num_rows($resql); - print_barre_liste($langs->trans("Rejects"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); + print_barre_liste($langs->trans("Rejects"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); - print"\n\n"; - print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print ''; - print ''; - print ''; - print ''; + print"\n\n"; + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '
    '.$langs->trans("Line").''.$langs->trans("ThirdParty").''.$langs->trans("Amount").''.$langs->trans("Reason").''.$langs->trans("ToBill").''.$langs->trans("Invoice").'
    '; + print ''; + print ''; + print ''; $total = 0; - if ($num > 0) - { - $i = 0; - while ($i < $num) - { + if ($num > 0) { + $i = 0; + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print '\n"; - print '\n"; + print '\n"; print ''; print ''; @@ -233,11 +237,10 @@ if ($resql) print ''; } - if ($num > 0) - { + if ($num > 0) { print ''; print ''; - print '\n"; + print '\n"; print ''; print "\n"; } diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 81e854ef5a0..3f51b5b554d 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -33,7 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->loadLangs(array("banks", "categories", 'withdrawals', 'bills')); // Security check -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // Get supervariables $prev_id = GETPOST('id', 'int'); @@ -46,7 +48,9 @@ $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -72,10 +76,8 @@ if (!$user->rights->paymentbybanktransfer->read && $object->type == 'bank-transf llxHeader('', $langs->trans("WithdrawalsReceipts")); -if ($prev_id > 0 || $ref) -{ - if ($object->fetch($prev_id, $ref) >= 0) - { +if ($prev_id > 0 || $ref) { + if ($object->fetch($prev_id, $ref) >= 0) { $head = prelevement_prepare_head($object); print dol_get_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); @@ -91,8 +93,7 @@ if ($prev_id > 0 || $ref) print ''; print ''; - if ($object->date_trans <> 0) - { + if ($object->date_trans <> 0) { $muser = new User($db); $muser->fetch($object->user_trans); @@ -103,8 +104,7 @@ if ($prev_id > 0 || $ref) print $object->methodes_trans[$object->method_trans]; print ''; } - if ($object->date_credit <> 0) - { + if ($object->date_credit <> 0) { print ''; @@ -122,22 +122,29 @@ if ($prev_id > 0 || $ref) print ''; print ''; print ''; print '
    '.$langs->trans("Line").''.$langs->trans("ThirdParty").''.$langs->trans("Amount").''.$langs->trans("Reason").''.$langs->trans("ToBill").''.$langs->trans("Invoice").'
    '; @@ -218,7 +222,7 @@ if ($resql) print ''.$obj->name."'.price($obj->amount)."'.price($obj->amount)."'.$rej->motifs[$obj->motif].''.yn($obj->afacturer).'
    '.$langs->trans("None").'
     '.$langs->trans("Total").''.price($total)."'.price($total)." 
    '.$langs->trans("Date").''.dol_print_date($object->datec, 'day').'
    '.$langs->trans("Amount").''.price($object->amount).'
    '.$langs->trans('CreditDate').''; print dol_print_date($object->date_credit, 'day'); print '
    '; $labelofbankfield = "BankToReceiveWithdraw"; - if ($object->type == 'bank-transfer') $labelofbankfield = 'BankToPayCreditTransfer'; + if ($object->type == 'bank-transfer') { + $labelofbankfield = 'BankToPayCreditTransfer'; + } print $langs->trans($labelofbankfield); print ''; - if ($acc->id > 0) + if ($acc->id > 0) { print $acc->getNomUrl(1); + } print '
    '; $labelfororderfield = 'WithdrawalFile'; - if ($object->type == 'bank-transfer') $labelfororderfield = 'CreditTransferFile'; + if ($object->type == 'bank-transfer') { + $labelfororderfield = 'CreditTransferFile'; + } print $langs->trans($labelfororderfield).''; $relativepath = 'receipts/'.$object->ref.'.xml'; $modulepart = 'prelevement'; - if ($object->type == 'bank-transfer') $modulepart = 'paymentbybanktransfer'; + if ($object->type == 'bank-transfer') { + $modulepart = 'paymentbybanktransfer'; + } print ''.$relativepath.''; print '
    '; @@ -155,12 +162,11 @@ if ($prev_id > 0 || $ref) $sql = "SELECT sum(pl.amount), pl.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; - $sql .= " WHERE pl.fk_prelevement_bons = ".$object->id; + $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $object->id); $sql .= " GROUP BY pl.statut"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -171,8 +177,7 @@ if ($prev_id > 0 || $ref) print '
    '.$langs->trans("Status").''.$langs->trans("Amount").'%
    '; @@ -183,7 +188,9 @@ if ($prev_id > 0 || $ref) print price($row[0]); print ''; - if ($object->amount) print round($row[0] / $object->amount * 100, 2)." %"; + if ($object->amount) { + print round($row[0] / $object->amount * 100, 2)." %"; + } print '
    '.$langs->trans("AmountToWithdraw").''; +print ''; print price($bprev->SommeAPrelever('direct-debit'), '', '', 1, -1, -1, 'auto'); -print '

    '; +print '

    '; @@ -97,24 +98,28 @@ $sql .= " pfd.date_demande, pfd.amount,"; $sql .= " s.nom as name, s.email, s.rowid as socid"; $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"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " , ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE s.rowid = f.fk_soc"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND f.total_ttc > 0"; -if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) -{ +if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) { $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; } $sql .= " AND pfd.traite = 0"; $sql .= " AND pfd.ext_payment_id IS NULL"; $sql .= " AND pfd.fk_facture = f.rowid"; -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; +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 = ".((int) $socid); +} $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -122,10 +127,8 @@ if ($resql) print ''; print ''; print ''; - if ($num) - { - while ($i < $num && $i < 20) - { + if ($num) { + while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); $invoicestatic->id = $obj->rowid; @@ -162,7 +165,8 @@ if ($resql) $i++; } } else { - print ''; + $titlefortab = $langs->transnoentitiesnoconv("StandingOrders"); + print ''; } print "
    '.$langs->trans("InvoiceWaitingWithdraw").' ('.$num.')
    '.$langs->trans("NoInvoiceToWithdraw", $langs->transnoentitiesnoconv("StandingOrders")).'
    '.$langs->trans("NoInvoiceToWithdraw", $titlefortab, $titlefortab).'

    "; } else { @@ -186,8 +190,7 @@ $sql .= " ORDER BY datec DESC"; $sql .= $db->plimit($limit); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -202,8 +205,7 @@ if ($result) print '
    '.dol_print_date($db->jdate($obj->datec), "dayhour")."'.price($obj->amount)."'.price($obj->amount)."'.$bprev->getLibStatut(3)."
    '.$langs->trans("Amount").''.price($lipre->amount).'
    '.$langs->trans("Status").''.$lipre->LibStatut($lipre->statut, 1).'
    '.$langs->trans("RefusedReason").''.$rej->motif.'
    '.$langs->trans("RefusedData").''; - if ($rej->date_rejet == 0) - { + if ($rej->date_rejet == 0) { /* Historique pour certaines install */ print $langs->trans("Unknown"); } else { @@ -184,8 +178,7 @@ if ($id) dol_print_error($db); } - if ($action == 'rejet' && $user->rights->prelevement->bons->credit) - { + if ($action == 'rejet' && $user->rights->prelevement->bons->credit) { $form = new Form($db); $soc = new Societe($db); @@ -232,21 +225,15 @@ if ($id) print ''; } - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - + /* + * Action bar + */ print "
    "; - if ($action == '') - { - if ($bon->statut == BonPrelevement::STATUS_CREDITED) - { + if ($action == '') { + if ($bon->statut == BonPrelevement::STATUS_CREDITED) { if ($lipre->statut == 2) { - if ($user->rights->prelevement->bons->credit) - { + if ($user->rights->prelevement->bons->credit) { print ''.$langs->trans("StandingOrderReject").''; } else { print ''.$langs->trans("StandingOrderReject").''; @@ -275,19 +262,20 @@ if ($id) $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND pf.fk_facture = f.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; - $sql .= " AND pl.rowid=".$id; - if ($socid) $sql .= " AND s.rowid = ".$socid; + $sql .= " AND pl.rowid = ".((int) $id); + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } $sql .= " ORDER BY $sortfield $sortorder "; $sql .= $db->plimit($conf->liste_limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - $urladd = "&id=".$id; + $urladd = "&id=".urlencode($id); print_barre_liste($langs->trans("Bills"), $page, "factures.php", $urladd, $sortfield, $sortorder, '', $num, 0, ''); @@ -299,8 +287,7 @@ if ($id) $total = 0; - while ($i < min($num, $conf->liste_limit)) - { + while ($i < min($num, $conf->liste_limit)) { $obj = $db->fetch_object($result); print '
    '; @@ -314,7 +301,7 @@ if ($id) print ''; print img_object($langs->trans("ShowCompany"), "company").' '.$obj->name."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'; $invoicestatic->fetch($obj->facid); diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index f171857963c..feb69bdc7fb 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -44,7 +44,9 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always ' // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); @@ -53,12 +55,18 @@ $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 +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.datec"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.datec"; +} $search_line = GETPOST('search_line', 'alpha'); $search_bon = GETPOST('search_bon', 'alpha'); @@ -77,8 +85,7 @@ $hookmanager->initHooks(array('withdrawalsreceiptslineslist')); * 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 -{ +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_line = ""; $search_bon = ""; $search_code = ""; @@ -117,26 +124,36 @@ if ($type == 'bank-transfer') { } $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; -if ($socid) $sql .= " AND s.rowid = ".$socid; -if ($search_line) $sql .= " AND pl.rowid = '".$db->escape($search_line)."'"; -if ($search_bon) $sql .= natural_search("p.ref", $search_bon); -if ($type == 'bank-transfer') { - if ($search_code) $sql .= natural_search("s.code_fourn", $search_code); -} else { - if ($search_code) $sql .= natural_search("s.code_client", $search_code); +if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); +} +if ($search_line) { + $sql .= " AND pl.rowid = '".$db->escape($search_line)."'"; +} +if ($search_bon) { + $sql .= natural_search("p.ref", $search_bon); +} +if ($type == 'bank-transfer') { + if ($search_code) { + $sql .= natural_search("s.code_fourn", $search_code); + } +} else { + if ($search_code) { + $sql .= natural_search("s.code_client", $search_code); + } +} +if ($search_company) { + $sql .= natural_search("s.nom", $search_company); } -if ($search_company) $sql .= natural_search("s.nom", $search_company); $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -145,18 +162,21 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; $param = "&statut=".urlencode($statut); $param .= "&search_bon=".urlencode($search_bon); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } print"\n\n"; print '
    '."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -206,8 +226,7 @@ if ($result) print "
    '.dol_print_date($db->jdate($obj->datec), 'day')."'.price($obj->amount)."'.price($obj->amount)." '.dol_print_date($db->jdate($obj->datec), 'day')."'.price($obj->amount)."'.price($obj->amount)."'; print $bon->LibStatut($obj->statut, 3); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 8a16f4ecb76..5aec35cf504 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -35,7 +35,9 @@ $langs->loadLangs(array('banks', 'categories', 'withdrawals', 'companies')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); @@ -45,7 +47,9 @@ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -62,8 +66,12 @@ if ($type == 'bank-transfer') { llxHeader('', $title); -if ($sortorder == "") $sortorder = "DESC"; -if ($sortfield == "") $sortfield = "p.datec"; +if ($sortorder == "") { + $sortorder = "DESC"; +} +if ($sortfield == "") { + $sortfield = "p.datec"; +} $rej = new RejetPrelevement($db, $user, $type); $line = new LignePrelevement($db); @@ -90,13 +98,14 @@ if ($type == 'bank-transfer') { } else { $sql .= " AND p.type = 'debit-order'"; } -if ($socid) $sql .= " AND s.rowid = ".$socid; +if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); +} $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -112,8 +121,7 @@ if ($result) print "
    '.$langs->trans("Status").''.$langs->trans("Number").'%'.$langs->trans("Amount").'%
    '; @@ -168,13 +166,11 @@ if ($type == 'bank-transfer') { $sql .= " AND pb.type = 'debit-order'"; } $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num > 0) - { + if ($num > 0) { $row = $db->fetch_row($resql); $total = $row[0]; $nbtotal = $row[1]; @@ -202,8 +198,7 @@ $sql .= " GROUP BY pr.motif"; $sql .= " ORDER BY cc DESC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -216,8 +211,7 @@ if ($resql) require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; $Rejet = new RejetPrelevement($db, $user, $type); - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); print '
    '; diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 397db077515..3abdf04ae1b 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -30,16 +30,22 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; // Load translation files required by the page $langs->load("companies"); -if (!empty($conf->facture->enabled)) $langs->load("bills"); +if (!empty($conf->facture->enabled)) { + $langs->load("bills"); +} $id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); // Security check -if ($user->socid) $id = $user->socid; +if ($user->socid) { + $id = $user->socid; +} $result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Societe($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('recapcomptacard', 'globalcard')); @@ -49,12 +55,18 @@ $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 +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 = "f.datef,f.rowid"; // Set here default search field -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "f.datef,f.rowid"; // Set here default search field +} +if (!$sortorder) { + $sortorder = "DESC"; +} $arrayfields = array( @@ -70,7 +82,9 @@ $hookmanager->initHooks(array('supplierbalencelist', 'globalcard')); */ $parameters = array('socid' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object); // Note that $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // None @@ -83,15 +97,18 @@ $form = new Form($db); $userstatic = new User($db); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Summary"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Summary"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Summary"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($id > 0) -{ +if ($id > 0) { $param = ''; - if ($id > 0) $param .= '&socid='.$id; + if ($id > 0) { + $param .= '&socid='.$id; + } $head = societe_prepare_head($object); @@ -99,14 +116,15 @@ if ($id > 0) dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom', '', '', 0, '', '', 1); print dol_get_fiche_end(); - if (!empty($conf->facture->enabled) && $user->rights->facture->lire) - { + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { // Invoice list print load_fiche_titre($langs->trans("CustomerPreview")); print ''; print ''; - if (!empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + if (!empty($arrayfields['f.datef']['checked'])) { + print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER["PHP_SELF"], "f.datef", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } print ''; print ''; print ''; @@ -121,25 +139,22 @@ if ($id > 0) $sql .= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; $sql .= " u.login, u.rowid as userid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id; + $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".((int) $object->id); $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND f.fk_user_valid = u.rowid"; $sql .= $db->order($sortfield, $sortorder); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); // Boucle sur chaque facture - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $objf = $db->fetch_object($resql); $fac = new Facture($db); $ret = $fac->fetch($objf->facid); - if ($ret < 0) - { + if ($ret < 0) { print $fac->error."
    "; continue; } @@ -160,7 +175,9 @@ if ($id > 0) $parameters = array('socid' => $id, 'values' => &$values, 'fac' => $fac, 'userstatic' => $userstatic); $reshook = $hookmanager->executeHooks('facdao', $parameters, $object); // Note that $parameters['values'] and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $TData[] = $values; @@ -176,13 +193,11 @@ if ($id > 0) $sql .= " ORDER BY p.datep ASC, p.rowid ASC"; $resqlp = $db->query($sql); - if ($resqlp) - { + if ($resqlp) { $nump = $db->num_rows($resqlp); $j = 0; - while ($j < $nump) - { + while ($j < $nump) { $objp = $db->fetch_object($resqlp); $paymentstatic = new Paiement($db); @@ -203,7 +218,9 @@ if ($id > 0) $parameters = array('socid' => $id, 'values' => &$values, 'fac' => $fac, 'userstatic' => $userstatic, 'paymentstatic' => $paymentstatic); $reshook = $hookmanager->executeHooks('paydao', $parameters, $object); // Note that $parameters['values'] and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $TData[] = $values; @@ -241,14 +258,20 @@ if ($id > 0) // Display array foreach ($TData as $data) { $html_class = ''; - if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture']; - elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement']; + if (!empty($data['fk_facture'])) { + $html_class = 'facid-'.$data['fk_facture']; + } elseif (!empty($data['fk_paiement'])) { + $html_class = 'payid-'.$data['fk_paiement']; + } print ''; print "\n"; print '\n"; @@ -263,7 +286,7 @@ if ($id > 0) $totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']); // Balance - print '\n"; + print '\n"; // Author print '
    '.$langs->trans("Element").''.$langs->trans("Status").''.$langs->trans("Debit").'
    "; - if (!empty($data['fk_facture'])) print dol_print_date($data['date'], 'day'); - elseif (!empty($data['fk_paiement'])) print dol_print_date($data['date'], 'dayhour'); + if (!empty($data['fk_facture'])) { + print dol_print_date($data['date'], 'day'); + } elseif (!empty($data['fk_paiement'])) { + print dol_print_date($data['date'], 'dayhour'); + } print "'.$data['link']."'.price($data['balance'])."'.price($data['balance'])."'; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 4f1a3043c76..bd871fd3ea3 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -49,22 +49,20 @@ $date_endday = GETPOST('date_endday', 'int'); $date_endyear = GETPOST('date_endyear', 'int'); $showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ?GETPOST('showaccountdetail', 'aZ09') : 'no'; -// Security check -$socid = GETPOST('socid', 'int'); -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'); - $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 (! $sortfield) $sortfield='s.nom, s.rowid'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortorder) { + $sortorder = 'ASC'; +} // Date range $year = GETPOST('year', 'int'); @@ -81,31 +79,45 @@ $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_starty $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // We define date_start and date_end -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $year_end = $year_start; $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); - if (!GETPOST('month')) - { - if (!GETPOST("year") && $month_start > $month_current) - { + if (!GETPOST('month')) { + if (!GETPOST("year") && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; - } 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 ($month_end < 1) { + $month_end = 12; + } else { + $year_end++; + } + } 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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } // $date_start and $date_end are defined. We force $year_start and $nbofyear @@ -118,11 +130,26 @@ $nbofyear = ($year_end - $year_start) + 1; // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; -if (!empty($conf->accounting->enabled)) $modecompta = 'BOOKKEEPING'; -if (GETPOST("modecompta", 'alpha')) $modecompta = GETPOST("modecompta", 'alpha'); +if (!empty($conf->accounting->enabled)) { + $modecompta = 'BOOKKEEPING'; +} +if (GETPOST("modecompta", 'alpha')) { + $modecompta = GETPOST("modecompta", 'alpha'); +} $AccCat = new AccountancyCategory($db); +// Security check +$socid = GETPOST('socid', 'int'); +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'); +} /* @@ -140,8 +167,7 @@ $total_ht = 0; $total_ttc = 0; // Affiche en-tete de rapport -if ($modecompta == "CREANCES-DETTES") -{ +if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups"); $calcmode = $langs->trans("CalcModeDebt"); $calcmode .= '
    ('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')'; @@ -153,12 +179,14 @@ if ($modecompta == "CREANCES-DETTES") $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= $langs->trans("DepositsAreNotIncluded"); + } 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"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')'; @@ -172,8 +200,7 @@ if ($modecompta == "CREANCES-DETTES") $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"); $calcmode .= '
    ('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')'; @@ -194,19 +221,30 @@ $hselected = 'report'; report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta), $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } // Show report array $param = '&modecompta='.urlencode($modecompta).'&showaccountdetail='.urlencode($showaccountdetail); -if ($date_startday) $param .= '&date_startday='.$date_startday; -if ($date_startmonth) $param .= '&date_startmonth='.$date_startmonth; -if ($date_startyear) $param .= '&date_startyear='.$date_startyear; -if ($date_endday) $param .= '&date_endday='.$date_endday; -if ($date_endmonth) $param .= '&date_endmonth='.$date_endmonth; -if ($date_endyear) $param .= '&date_endyear='.$date_endyear; +if ($date_startday) { + $param .= '&date_startday='.$date_startday; +} +if ($date_startmonth) { + $param .= '&date_startmonth='.$date_startmonth; +} +if ($date_startyear) { + $param .= '&date_startyear='.$date_startyear; +} +if ($date_endday) { + $param .= '&date_endday='.$date_endday; +} +if ($date_endmonth) { + $param .= '&date_endmonth='.$date_endmonth; +} +if ($date_endyear) { + $param .= '&date_endyear='.$date_endyear; +} print ''; print ''; @@ -216,12 +254,10 @@ if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'width200 '); } print_liste_field_titre(''); -if ($modecompta == 'BOOKKEEPING') -{ +if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'amount', '', $param, 'class="right"', $sortfield, $sortorder); } else { - if ($modecompta == 'CREANCES-DETTES') - { + if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); } print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'class="right"', $sortfield, $sortorder); @@ -232,8 +268,7 @@ print "\n"; $total_ht_outcome = $total_ttc_outcome = $total_ht_income = $total_ttc_income = 0; -if ($modecompta == 'BOOKKEEPING') -{ +if ($modecompta == 'BOOKKEEPING') { $predefinedgroupwhere = "("; $predefinedgroupwhere .= " (pcg_type = 'EXPENSE')"; $predefinedgroupwhere .= " OR "; @@ -250,8 +285,9 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " AND ".$predefinedgroupwhere; $sql .= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; $sql .= " AND f.entity = ".$conf->entity; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.doc_date >= '".$db->idate($date_start)."' AND f.doc_date <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY pcg_type DESC, name, socid"; $sql .= $db->order($sortfield, $sortorder); @@ -263,14 +299,11 @@ if ($modecompta == 'BOOKKEEPING') if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($result); - if ($objp->pcg_type != $oldpcgtype) - { + if ($objp->pcg_type != $oldpcgtype) { print ''; $oldpcgtype = $objp->pcg_type; } @@ -278,7 +311,7 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; print '\n"; - print '\n"; + print '\n"; print "\n"; $total_ht += (isset($objp->amount) ? $objp->amount : 0); @@ -295,8 +328,7 @@ if ($modecompta == 'BOOKKEEPING') // Loop on detail of all accounts // This make 14 calls for each detail of account (NP, N and month m) - if ($showaccountdetail != 'no') - { + if ($showaccountdetail != 'no') { $tmppredefinedgroupwhere = "pcg_type = '".$db->escape($objp->pcg_type)."'"; $tmppredefinedgroupwhere .= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; //$tmppredefinedgroupwhere.= " AND thirdparty_code = '".$db->escape($objp->name)."'"; @@ -304,8 +336,7 @@ if ($modecompta == 'BOOKKEEPING') // Get cpts of category/group $cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere); - foreach ($cpts as $j => $cpt) - { + foreach ($cpts as $j => $cpt) { $return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']); if ($return < 0) { setEventMessages(null, $AccCat->errors, 'errors'); @@ -315,12 +346,11 @@ if ($modecompta == 'BOOKKEEPING') } - if ($showaccountdetail == 'all' || $resultN <> 0) - { + if ($showaccountdetail == 'all' || $resultN <> 0) { print ''; print ''; print ''; - print ''; + print ''; print "\n"; } } @@ -331,31 +361,34 @@ if ($modecompta == 'BOOKKEEPING') } else { print ''; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } else { /* * Factures clients */ print ''; - if ($modecompta == 'CREANCES-DETTES') - { - $sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc"; + if ($modecompta == 'CREANCES-DETTES') { + $sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.fk_statut IN (1,2)"; - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + 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)"; - if (!empty($date_start) && !empty($date_end)) + } 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 - * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) - */ + * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les + * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) + */ $sql = "SELECT s.nom as name, s.rowid as socid, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; @@ -364,11 +397,14 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " WHERE p.rowid = pf.fk_paiement"; $sql .= " AND pf.fk_facture = f.rowid"; $sql .= " AND f.fk_soc = s.rowid"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; + } $sql .= " GROUP BY name, socid"; $sql .= $db->order($sortfield, $sortorder); @@ -377,16 +413,16 @@ if ($modecompta == 'BOOKKEEPING') if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') - print '\n"; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print '\n"; + } + print '\n"; $total_ht += (isset($objp->amount_ht) ? $objp->amount_ht : 0); $total_ttc += $objp->amount_ttc; @@ -399,8 +435,7 @@ if ($modecompta == 'BOOKKEEPING') } // On ajoute les paiements clients anciennes version, non lie par paiement_facture - if ($modecompta == 'RECETTES-DEPENSES') - { + if ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT 'Autres' as name, '0' as idp, sum(p.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -410,8 +445,9 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " AND p.fk_bank = b.rowid"; $sql .= " AND b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY name, idp"; $sql .= " ORDER BY name"; @@ -421,17 +457,17 @@ if ($modecompta == 'BOOKKEEPING') $num = $db->num_rows($result); $i = 0; if ($num) { - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); print ''; print "\n"; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print '\n"; + } + print '\n"; $total_ht += (isset($objp->amount_ht) ? $objp->amount_ht : 0); $total_ttc += $objp->amount_ttc; @@ -446,8 +482,7 @@ if ($modecompta == 'BOOKKEEPING') } } - if ($total_ttc == 0) - { + if ($total_ttc == 0) { print ''; print ''; print ''; @@ -457,8 +492,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_income += $total_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; @@ -466,14 +502,11 @@ if ($modecompta == 'BOOKKEEPING') * Donations */ - if (!empty($conf->don->enabled)) - { + if (!empty($conf->don->enabled)) { print ''; - if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') - { - if ($modecompta == 'CREANCES-DETTES') - { + if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT p.societe as name, 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 .= " WHERE p.entity IN (".getEntity('donation').")"; @@ -486,28 +519,32 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " WHERE p.entity IN (".getEntity('donation').")"; $sql .= " AND fk_statut >= 2"; } - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'"; + } } $sql .= " GROUP BY p.societe, p.firstname, p.lastname, dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.societe, p.firstname, p.lastname, dm'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'p.societe, p.firstname, p.lastname, dm'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get dunning"); $result = $db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); $total_ht += $obj->amount; @@ -519,8 +556,10 @@ if ($modecompta == 'BOOKKEEPING') print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } @@ -537,8 +576,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_income += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; } @@ -546,20 +586,21 @@ if ($modecompta == 'BOOKKEEPING') /* * Suppliers invoices */ - if ($modecompta == 'CREANCES-DETTES') - { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT s.nom as name, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.fk_statut IN (1,2)"; - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + 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)"; - if (!empty($date_start) && !empty($date_end)) + } 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"; $sql .= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf"; @@ -568,12 +609,15 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s"; $sql .= " ON f.fk_soc = s.rowid"; $sql .= " WHERE p.rowid = pf.fk_paiementfourn "; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND f.entity = ".$conf->entity; - if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; + } $sql .= " GROUP BY name, socid"; $sql .= $db->order($sortfield, $sortorder); @@ -586,18 +630,17 @@ if ($modecompta == 'BOOKKEEPING') if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($result); print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') - print '\n"; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print '\n"; + } + print '\n"; $total_ht -= (isset($objp->amount_ht) ? $objp->amount_ht : 0); $total_ttc -= $objp->amount_ttc; @@ -622,8 +665,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_outcome += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; @@ -634,17 +678,16 @@ if ($modecompta == 'BOOKKEEPING') print ''; - if ($modecompta == 'CREANCES-DETTES') - { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT c.id, c.libelle as label, sum(cs.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= " WHERE cs.fk_type = c.id"; $sql .= " AND c.deductible = 0"; - if (!empty($date_start) && !empty($date_end)) + 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"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; @@ -652,15 +695,22 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " WHERE p.fk_charge = cs.rowid"; $sql .= " AND cs.fk_type = c.id"; $sql .= " AND c.deductible = 0"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND cs.entity = ".$conf->entity; $sql .= " GROUP BY c.libelle, c.id"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'c.libelle, c.id'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); @@ -682,8 +732,10 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } @@ -700,8 +752,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_outcome += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; @@ -712,18 +765,17 @@ if ($modecompta == 'BOOKKEEPING') print ''; - if ($modecompta == 'CREANCES-DETTES') - { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT c.id, c.libelle as label, sum(cs.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= " WHERE cs.fk_type = c.id"; $sql .= " AND c.deductible = 1"; - if (!empty($date_start) && !empty($date_end)) + 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"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; @@ -731,15 +783,22 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " WHERE p.fk_charge = cs.rowid"; $sql .= " AND cs.fk_type = c.id"; $sql .= " AND c.deductible = 1"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= " AND cs.entity = ".$conf->entity; } $sql .= " GROUP BY c.libelle, c.id"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'c.libelle, c.id'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get social contributions deductible=1", LOG_DEBUG); @@ -760,9 +819,10 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; - if ($modecompta == 'CREANCES-DETTES') - print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } @@ -779,8 +839,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_outcome += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; @@ -789,12 +850,10 @@ if ($modecompta == 'BOOKKEEPING') * Salaries */ - if (!empty($conf->salaries->enabled)) - { + if (!empty($conf->salaries->enabled)) { print ''; - if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') - { + if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') { if ($modecompta == 'CREANCES-DETTES') { $column = 'p.datev'; } else { @@ -805,14 +864,21 @@ if ($modecompta == 'BOOKKEEPING') $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user"; $sql .= " WHERE p.entity IN (".getEntity('payment_salary').")"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'u.firstname, u.lastname'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'u.firstname, u.lastname'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); } @@ -820,14 +886,11 @@ if ($modecompta == 'BOOKKEEPING') $result = $db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); $total_ht -= $obj->amount; @@ -839,8 +902,10 @@ if ($modecompta == 'BOOKKEEPING') print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } @@ -857,8 +922,9 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_outcome += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; } @@ -868,10 +934,8 @@ if ($modecompta == 'BOOKKEEPING') * Expense */ - if (!empty($conf->expensereport->enabled)) - { - if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') - { + if (!empty($conf->expensereport->enabled)) { + if ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES') { $langs->load('trips'); if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT p.rowid, p.ref, u.rowid as userid, u.firstname, u.lastname, date_format(date_valid,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; @@ -893,14 +957,15 @@ if ($modecompta == 'BOOKKEEPING') $column = 'pe.datep'; } - if (!empty($date_start) && !empty($date_end)) - { + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; } $sql .= " GROUP BY u.rowid, p.rowid, p.ref, u.firstname, u.lastname, dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.ref'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'p.ref'; + } $sql .= $db->order($newsortfield, $sortorder); } @@ -910,13 +975,10 @@ if ($modecompta == 'BOOKKEEPING') $result = $db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($num) - { - while ($obj = $db->fetch_object($result)) - { + if ($num) { + while ($obj = $db->fetch_object($result)) { $total_ht -= $obj->amount_ht; $total_ttc -= $obj->amount_ttc; $subtotal_ht += $obj->amount_ht; @@ -926,8 +988,10 @@ if ($modecompta == 'BOOKKEEPING') print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; } } else { @@ -943,19 +1007,20 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_outcome += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } print ''; print ''; } /* - * Various Payments - */ + * Various Payments + */ //$conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY = 1; - if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) - { + if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { $subtotal_ht = 0; $subtotal_ttc = 0; @@ -964,19 +1029,18 @@ if ($modecompta == 'BOOKKEEPING') // Debit $sql = "SELECT SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various as p"; $sql .= ' WHERE 1 = 1'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= ' GROUP BY p.sens'; $sql .= ' ORDER BY p.sens'; dol_syslog('get various payments', LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { // Debit (payment of suppliers for example) $obj = $db->fetch_object($result); - if (isset($obj->amount)) - { + if (isset($obj->amount)) { $subtotal_ht += -$obj->amount; $subtotal_ttc += -$obj->amount; @@ -985,14 +1049,15 @@ if ($modecompta == 'BOOKKEEPING') } print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print '\n"; print "\n"; // Credit (payment received from customer for example) $obj = $db->fetch_object($result); - if (isset($obj->amount)) - { + if (isset($obj->amount)) { $subtotal_ht += $obj->amount; $subtotal_ttc += $obj->amount; @@ -1001,27 +1066,31 @@ if ($modecompta == 'BOOKKEEPING') } print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print '\n"; print "\n"; // Total $total_ht += $subtotal_ht; $total_ttc += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } /* - * Payement Loan - */ + * Payement Loan + */ - if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) - { + if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { $subtotal_ht = 0; $subtotal_ttc = 0; @@ -1030,26 +1099,27 @@ if ($modecompta == 'BOOKKEEPING') $sql = 'SELECT l.rowid as id, l.label AS label, SUM(p.amount_capital + p.amount_insurance + p.amount_interest) as amount FROM '.MAIN_DB_PREFIX.'payment_loan as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'loan AS l ON l.rowid = p.fk_loan'; $sql .= ' WHERE 1 = 1'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= ' GROUP BY p.fk_loan'; $sql .= ' ORDER BY p.fk_loan'; dol_syslog('get loan payments', LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; $loan_static = new Loan($db); - while ($obj = $db->fetch_object($result)) - { + while ($obj = $db->fetch_object($result)) { $loan_static->id = $obj->id; $loan_static->ref = $obj->id; $loan_static->label = $obj->label; print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print '\n"; print "\n"; $subtotal_ht -= $obj->amount; $subtotal_ttc -= $obj->amount; @@ -1061,11 +1131,14 @@ if ($modecompta == 'BOOKKEEPING') $total_ttc_income += $subtotal_ttc; print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } /* @@ -1076,38 +1149,42 @@ if ($modecompta == 'BOOKKEEPING') $subtotal_ht = 0; $subtotal_ttc = 0; - if ($conf->tax->enabled && ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES')) - { - if ($modecompta == 'CREANCES-DETTES') - { + if ($conf->tax->enabled && ($modecompta == 'CREANCES-DETTES' || $modecompta == 'RECETTES-DEPENSES')) { + if ($modecompta == 'CREANCES-DETTES') { // VAT to pay $amount = 0; - $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.tva) as amount"; + $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE f.fk_statut IN (1,2)"; - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + 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)"; - if (!empty($date_start) && !empty($date_end)) + } 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').")"; $sql .= " GROUP BY dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'dm'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get vat to pay", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); $amount -= $obj->amount; @@ -1128,7 +1205,7 @@ if ($modecompta == 'BOOKKEEPING') print ''; print "\n"; print ''."\n"; - print '\n"; + print '\n"; print "\n"; // VAT to retreive @@ -1136,29 +1213,35 @@ if ($modecompta == 'BOOKKEEPING') $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " WHERE f.fk_statut IN (1,2)"; - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + 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)"; - if (!empty($date_start) && !empty($date_end)) + } 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; $sql .= " GROUP BY dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'dm'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get vat received back", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); $amount += $obj->amount; @@ -1180,7 +1263,7 @@ if ($modecompta == 'BOOKKEEPING') print ''; print '\n"; print ''."\n"; - print '\n"; + print '\n"; print "\n"; } else { // VAT really already paid @@ -1188,14 +1271,21 @@ if ($modecompta == 'BOOKKEEPING') $sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql .= " WHERE amount > 0"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'"; + } $sql .= " AND t.entity = ".$conf->entity; $sql .= " GROUP BY dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'dm'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get vat really paid", LOG_DEBUG); @@ -1226,9 +1316,10 @@ if ($modecompta == 'BOOKKEEPING') print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''."\n"; - print '\n"; + } + print '\n"; print "\n"; // VAT really received @@ -1236,14 +1327,21 @@ if ($modecompta == 'BOOKKEEPING') $sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql .= " WHERE amount < 0"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'"; + } $sql .= " AND t.entity = ".$conf->entity; $sql .= " GROUP BY dm"; $newsortfield = $sortfield; - if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm'; - if ($newsortfield == 'amount_ht') $newsortfield = 'amount'; - if ($newsortfield == 'amount_ttc') $newsortfield = 'amount'; + if ($newsortfield == 's.nom, s.rowid') { + $newsortfield = 'dm'; + } + if ($newsortfield == 'amount_ht') { + $newsortfield = 'amount'; + } + if ($newsortfield == 'amount_ttc') { + $newsortfield = 'amount'; + } $sql .= $db->order($newsortfield, $sortorder); dol_syslog("get vat really received back", LOG_DEBUG); @@ -1274,18 +1372,19 @@ if ($modecompta == 'BOOKKEEPING') print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''."\n"; - print '\n"; + } + print '\n"; print "\n"; } } - if ($mysoc->tva_assuj != '0') // Assujetti - { + if ($mysoc->tva_assuj != '0') { // Assujetti print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; } diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 38d0f4ec3f9..2d4ea6fc9e0 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -46,8 +46,7 @@ $nbofyear = 4; // Date range $year = GETPOST('year', 'int'); -if (empty($year)) -{ +if (empty($year)) { $year_current = strftime("%Y", dol_now()); $month_current = strftime("%m", dol_now()); $year_start = $year_current - ($nbofyear - 1); @@ -60,31 +59,45 @@ $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_starty $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // We define date_start and date_end -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $year_end = $year_start + ($nbofyear - 1); $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); - if (!GETPOST('month')) - { - if (!GETPOST("year") && $month_start > $month_current) - { + if (!GETPOST('month')) { + if (!GETPOST("year") && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; - } 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 ($month_end < 1) { + $month_end = 12; + } else { + $year_end++; + } + } 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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } // $date_start and $date_end are defined. We force $year_start and $nbofyear @@ -95,17 +108,26 @@ $year_end = $tmpe['year']; $nbofyear = ($year_end - $year_start) + 1; //var_dump("year_start=".$year_start." year_end=".$year_end." nbofyear=".$nbofyear." date_start=".dol_print_date($date_start, 'dayhour')." date_end=".dol_print_date($date_end, 'dayhour')); +// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') +$modecompta = $conf->global->ACCOUNTING_MODE; +if (!empty($conf->accounting->enabled)) { + $modecompta = 'BOOKKEEPING'; +} +if (GETPOST("modecompta", 'alpha')) { + $modecompta = GETPOST("modecompta", 'alpha'); +} // Security check $socid = GETPOST('socid', 'int'); -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'); - -// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') -$modecompta = $conf->global->ACCOUNTING_MODE; -if (!empty($conf->accounting->enabled)) $modecompta = 'BOOKKEEPING'; -if (GETPOST("modecompta", 'alpha')) $modecompta = GETPOST("modecompta", 'alpha'); +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'); +} /* @@ -119,8 +141,7 @@ $form = new Form($db); $exportlink = ''; // Affiche en-tete du rapport -if ($modecompta == 'CREANCES-DETTES') -{ +if ($modecompta == 'CREANCES-DETTES') { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode = $langs->trans("CalcModeDebt"); $calcmode .= '
    ('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')'; @@ -133,8 +154,11 @@ if ($modecompta == 'CREANCES-DETTES') $periodlink = ($year_start ? "".img_previous()."".img_next()."" : ""); $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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= "
    ".$langs->trans("DepositsAreNotIncluded"); + } else { + $description .= "
    ".$langs->trans("DepositsAreIncluded"); + } $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } elseif ($modecompta == "RECETTES-DEPENSES") { @@ -152,8 +176,7 @@ if ($modecompta == 'CREANCES-DETTES') $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"); $calcmode .= '
    ('.$langs->trans("SeeReportInInputOutputMode", '{s1}', '{s2}').')'; @@ -172,8 +195,7 @@ $hselected = 'report'; report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta), $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -185,21 +207,22 @@ if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') $subtotal_ht = 0; $subtotal_ttc = 0; -if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') - { - $sql = "SELECT sum(f.total) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm"; +if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { + if ($modecompta == 'CREANCES-DETTES') { + $sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE f.fk_soc = s.rowid"; $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)"; - if (!empty($date_start) && !empty($date_end)) + 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)"; + } + 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 * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) @@ -210,24 +233,25 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $sql .= ", ".MAIN_DB_PREFIX."paiement as p"; $sql .= " WHERE p.rowid = pf.fk_paiement"; $sql .= " AND pf.fk_facture = f.rowid"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if ($socid) $sql .= " AND f.fk_soc = $socid"; + if ($socid) { + $sql .= " AND f.fk_soc = $socid"; + } $sql .= " GROUP BY dm"; $sql .= " ORDER BY dm"; //print $sql; dol_syslog("get customers invoices", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_object($result); $encaiss[$row->dm] = (isset($row->amount_ht) ? $row->amount_ht : 0); $encaiss_ttc[$row->dm] = $row->amount_ttc; @@ -237,16 +261,13 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod } else { dol_print_error($db); } -} elseif ($modecompta == "BOOKKEEPING") -{ +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } -if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ +if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { // On ajoute les paiements clients anciennes version, non lies par paiement_facture - if ($modecompta != 'CREANCES-DETTES') - { + if ($modecompta != 'CREANCES-DETTES') { $sql = "SELECT sum(p.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -256,8 +277,9 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $sql .= " AND p.fk_bank = b.rowid"; $sql .= " AND b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY dm"; $sql .= " ORDER BY dm"; @@ -266,14 +288,17 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_object($result); - if (!isset($encaiss[$row->dm])) $encaiss[$row->dm] = 0; + if (!isset($encaiss[$row->dm])) { + $encaiss[$row->dm] = 0; + } $encaiss[$row->dm] += (isset($row->amount_ht) ? $row->amount_ht : 0); - if (!isset($encaiss_ttc[$row->dm])) $encaiss_ttc[$row->dm] = 0; + if (!isset($encaiss_ttc[$row->dm])) { + $encaiss_ttc[$row->dm] = 0; + } $encaiss_ttc[$row->dm] += $row->amount_ttc; $i++; @@ -281,12 +306,10 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod } 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 } @@ -297,47 +320,53 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $subtotal_ht = 0; $subtotal_ttc = 0; -if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') - { +if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $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)"; - if (!empty($date_start) && !empty($date_end)) + 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)"; + } + 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"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf"; $sql .= " WHERE f.rowid = pf.fk_facturefourn"; $sql .= " AND p.rowid = pf.fk_paiementfourn"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND f.entity = ".$conf->entity; - if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if ($socid) { + $sql .= " AND f.fk_soc = ".((int) $socid); + } $sql .= " GROUP BY dm"; dol_syslog("get suppliers invoices", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_object($result); - if (!isset($decaiss[$row->dm])) $decaiss[$row->dm] = 0; + if (!isset($decaiss[$row->dm])) { + $decaiss[$row->dm] = 0; + } $decaiss[$row->dm] = (isset($row->amount_ht) ? $row->amount_ht : 0); - if (!isset($decaiss_ttc[$row->dm])) $decaiss_ttc[$row->dm] = 0; + if (!isset($decaiss_ttc[$row->dm])) { + $decaiss_ttc[$row->dm] = 0; + } $decaiss_ttc[$row->dm] = $row->amount_ttc; $i++; @@ -346,8 +375,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod } else { dol_print_error($db); } -} elseif ($modecompta == "BOOKKEEPING") -{ +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -359,19 +387,21 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $subtotal_ht = 0; $subtotal_ttc = 0; -if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') - { +if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { + if ($modecompta == 'CREANCES-DETTES') { // TVA collected to pay - $sql = "SELECT sum(f.tva) as amount, date_format(f.datef,'%Y-%m') as dm"; + $sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $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)"; + 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)"; + } $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY dm"; dol_syslog("get vat to pay", LOG_DEBUG); @@ -383,10 +413,14 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; + if (!isset($decaiss[$obj->dm])) { + $decaiss[$obj->dm] = 0; + } $decaiss[$obj->dm] += $obj->amount; - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } $decaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -399,11 +433,15 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $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)"; + 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)"; + } $sql .= " AND f.entity = ".$conf->entity; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY dm"; dol_syslog("get vat to receive back", LOG_DEBUG); @@ -415,10 +453,14 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; + if (!isset($encaiss[$obj->dm])) { + $encaiss[$obj->dm] = 0; + } $encaiss[$obj->dm] += $obj->amount; - if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; + if (!isset($encaiss_ttc[$obj->dm])) { + $encaiss_ttc[$obj->dm] = 0; + } $encaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -427,15 +469,15 @@ 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"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql .= " WHERE amount > 0"; $sql .= " AND t.entity = ".$conf->entity; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY dm"; dol_syslog("get vat really paid", LOG_DEBUG); @@ -447,10 +489,14 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; + if (!isset($decaiss[$obj->dm])) { + $decaiss[$obj->dm] = 0; + } $decaiss[$obj->dm] += $obj->amount; - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } $decaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -464,8 +510,9 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql .= " WHERE amount < 0"; $sql .= " AND t.entity = ".$conf->entity; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY dm"; dol_syslog("get vat really received back", LOG_DEBUG); @@ -477,10 +524,14 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; + if (!isset($encaiss[$obj->dm])) { + $encaiss[$obj->dm] = 0; + } $encaiss[$obj->dm] += -$obj->amount; - if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; + if (!isset($encaiss_ttc[$obj->dm])) { + $encaiss_ttc[$obj->dm] = 0; + } $encaiss_ttc[$obj->dm] += -$obj->amount; $i++; @@ -490,8 +541,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom dol_print_error($db); } } -} elseif ($modecompta == "BOOKKEEPING") -{ +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -501,26 +551,25 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $subtotal_ht = 0; $subtotal_ttc = 0; -if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') - { +if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { + if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT c.libelle as nom, date_format(cs.date_ech,'%Y-%m') as dm, sum(cs.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= " WHERE cs.fk_type = c.id"; - if (!empty($date_start) && !empty($date_end)) + 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"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= ", ".MAIN_DB_PREFIX."paiementcharge as p"; $sql .= " WHERE p.fk_charge = cs.rowid"; $sql .= " AND cs.fk_type = c.id"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } } $sql .= " AND cs.entity = ".$conf->entity; @@ -535,10 +584,14 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; + if (!isset($decaiss[$obj->dm])) { + $decaiss[$obj->dm] = 0; + } $decaiss[$obj->dm] += $obj->amount; - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } $decaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -547,8 +600,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 } @@ -557,18 +609,22 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom * Salaries */ -if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ - if ($modecompta == 'CREANCES-DETTES') $column = 'p.datev'; - if ($modecompta == "RECETTES-DEPENSES") $column = 'p.datep'; +if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { + if ($modecompta == 'CREANCES-DETTES') { + $column = 'p.datev'; + } + if ($modecompta == "RECETTES-DEPENSES") { + $column = 'p.datep'; + } $subtotal_ht = 0; $subtotal_ttc = 0; $sql = "SELECT p.label as nom, date_format(".$column.",'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; $sql .= " WHERE p.entity IN (".getEntity('payment_salary').")"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND ".$column." >= '".$db->idate($date_start)."' AND ".$column." <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY p.label, dm"; dol_syslog("get social salaries payments"); @@ -580,12 +636,14 @@ if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss[$obj->dm])) + if (!isset($decaiss[$obj->dm])) { $decaiss[$obj->dm] = 0; + } $decaiss[$obj->dm] += $obj->amount; - if (!isset($decaiss_ttc[$obj->dm])) + if (!isset($decaiss_ttc[$obj->dm])) { $decaiss_ttc[$obj->dm] = 0; + } $decaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -594,8 +652,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 } @@ -604,8 +661,7 @@ if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo * Expense reports */ -if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ +if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { $langs->load('trips'); if ($modecompta == 'CREANCES-DETTES') { @@ -616,8 +672,9 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | $sql .= " AND p.fk_statut>=5"; $column = 'p.date_valid'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND ".$column." >= '".$db->idate($date_start)."' AND ".$column." <= '".$db->idate($date_end)."'"; + } } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as p"; @@ -628,8 +685,9 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | $sql .= " AND p.fk_statut>=5"; $column = 'pe.datep'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND ".$column." >= '".$db->idate($date_start)."' AND ".$column." <= '".$db->idate($date_end)."'"; + } } $sql .= " GROUP BY dm"; @@ -638,17 +696,18 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | $result = $db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($num) - { - while ($obj = $db->fetch_object($result)) - { - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; + if ($num) { + while ($obj = $db->fetch_object($result)) { + if (!isset($decaiss[$obj->dm])) { + $decaiss[$obj->dm] = 0; + } $decaiss[$obj->dm] += $obj->amount_ht; - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } $decaiss_ttc[$obj->dm] += $obj->amount_ttc; } } @@ -664,8 +723,7 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | * Donation get dunning payments */ -if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ +if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { $subtotal_ht = 0; $subtotal_ttc = 0; @@ -674,15 +732,16 @@ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; $sql .= " WHERE p.entity IN (".getEntity('donation').")"; $sql .= " AND fk_statut in (1,2)"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'"; + } } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%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"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; $sql .= " WHERE p.entity IN (".getEntity('donation').")"; - $sql .= " AND fk_statut >= 2"; + $sql .= " AND fk_statut >= 2"; if (!empty($date_start) && !empty($date_end)) { $sql .= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'"; } @@ -692,20 +751,21 @@ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom dol_syslog("get donation payments"); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; + if (!isset($encaiss[$obj->dm])) { + $encaiss[$obj->dm] = 0; + } $encaiss[$obj->dm] += $obj->amount; - if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; + if (!isset($encaiss_ttc[$obj->dm])) { + $encaiss_ttc[$obj->dm] = 0; + } $encaiss_ttc[$obj->dm] += $obj->amount; $i++; @@ -722,29 +782,30 @@ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom * Various Payments */ -if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ +if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { // decaiss $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various as p"; $sql .= ' WHERE p.sens = 0'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= ' GROUP BY dm'; dol_syslog("get various payments"); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; - if (isset($obj->amount)) $decaiss_ttc[$obj->dm] += $obj->amount; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } + if (isset($obj->amount)) { + $decaiss_ttc[$obj->dm] += $obj->amount; + } $i++; } } @@ -756,23 +817,25 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various AS p"; $sql .= ' WHERE p.sens = 1'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= ' GROUP BY dm'; dol_syslog("get various payments"); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; - if (isset($obj->amount)) $encaiss_ttc[$obj->dm] += $obj->amount; + if (!isset($encaiss_ttc[$obj->dm])) { + $encaiss_ttc[$obj->dm] = 0; + } + if (isset($obj->amount)) { + $encaiss_ttc[$obj->dm] += $obj->amount; + } $i++; } } @@ -788,27 +851,28 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba * Payement Loan */ -if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) -{ +if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount_capital + p.amount_insurance + p.amount_interest) AS amount FROM ".MAIN_DB_PREFIX."payment_loan AS p"; $sql .= ' WHERE 1 = 1'; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= ' GROUP BY dm'; dol_syslog("get loan payments"); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; - if (isset($obj->amount)) $decaiss_ttc[$obj->dm] += $obj->amount; + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } + if (isset($obj->amount)) { + $decaiss_ttc[$obj->dm] += $obj->amount; + } $i++; } } @@ -825,8 +889,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan * Request in mode BOOKKEEPING */ -if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) -{ +if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) { $predefinedgroupwhere = "("; $predefinedgroupwhere .= " (aa.pcg_type = 'EXPENSE')"; $predefinedgroupwhere .= " OR "; @@ -843,8 +906,9 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) $sql .= " AND b.numero_compte = aa.account_number"; $sql .= " AND ".$predefinedgroupwhere; $sql .= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; - if (!empty($date_start) && !empty($date_end)) + if (!empty($date_start) && !empty($date_end)) { $sql .= " AND b.doc_date >= '".$db->idate($date_start)."' AND b.doc_date <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY b.doc_ref, b.numero_compte, b.subledger_account, b.subledger_label, pcg_type, dm"; //print $sql; @@ -853,30 +917,35 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) dol_syslog("get bookkeeping record"); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($result); if ($obj->pcg_type == 'INCOME') { - if (!isset($encaiss[$obj->dm])) $encaiss[$obj->dm] = 0; // To avoid warning of var not defined + if (!isset($encaiss[$obj->dm])) { + $encaiss[$obj->dm] = 0; // To avoid warning of var not defined + } $encaiss[$obj->dm] += $obj->credit; $encaiss[$obj->dm] -= $obj->debit; } if ($obj->pcg_type == 'EXPENSE') { - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; // To avoid warning of var not defined + if (!isset($decaiss[$obj->dm])) { + $decaiss[$obj->dm] = 0; // To avoid warning of var not defined + } $decaiss[$obj->dm] += $obj->debit; $decaiss[$obj->dm] -= $obj->credit; } // ??? - if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; - if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (!isset($encaiss_ttc[$obj->dm])) { + $encaiss_ttc[$obj->dm] = 0; + } + if (!isset($decaiss_ttc[$obj->dm])) { + $decaiss_ttc[$obj->dm] = 0; + } $encaiss_ttc[$obj->dm] += 0; $decaiss_ttc[$obj->dm] += 0; @@ -911,19 +980,19 @@ print '
    '.$objp->pcg_type.'
     '.$objp->pcg_type.($objp->name ? ' ('.$objp->name.')' : '')."'.price($objp->amount)."'.price($objp->amount)."
        '.length_accountg($cpt['account_number']).' - '.$cpt['account_label'].''.price($resultN).''.price($resultN).'
    '.$langs->trans("NoRecordFound").'
    '.$langs->trans("CustomersInvoices").'
     ".$langs->trans("Bills").' '.$objp->name."'.price($objp->amount_ht)."'.price($objp->amount_ttc)."'.price($objp->amount_ht)."'.price($objp->amount_ttc)."
     ".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n"; - if ($modecompta == 'CREANCES-DETTES') - print ''.price($objp->amount_ht)."'.price($objp->amount_ttc)."'.price($objp->amount_ht)."'.price($objp->amount_ttc)."
     '.$langs->trans("None").'
    '.price($total_ht).''.price($total_ttc).'
    '.$langs->trans("Donations").'
    ".$langs->trans("Donation")." name."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->name." ".$obj->firstname." ".$obj->lastname."'.price($obj->amount).''.price($obj->amount).''.price($obj->amount).''.price($obj->amount).'
    '.price($subtotal_ht).''.price($subtotal_ttc).'
     ".$langs->trans("Bills")." socid."\">".$objp->name."'.price(-$objp->amount_ht)."'.price(-$objp->amount_ttc)."'.price(-$objp->amount_ht)."'.price(-$objp->amount_ttc)."
    '.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
    '.$langs->trans("SocialContributionsNondeductibles").'
     '.$obj->label.''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).'
    '.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
    '.$langs->trans("SocialContributionsDeductibles").'
     '.$obj->label.''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).'
    '.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
    '.$langs->trans("Salaries").'
    ".$langs->trans("Salary")." fk_user."\">".$obj->firstname." ".$obj->lastname."'.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).'
    '.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
    ".$langs->trans("ExpenseReport")." userid."\">".$obj->firstname." ".$obj->lastname."'.price(-$obj->amount_ht).''.price(-$obj->amount_ttc).''.price(-$obj->amount_ht).''.price(-$obj->amount_ttc).'
    '.price(-$subtotal_ht).''.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
     ".$langs->trans("Debit")."'.price(-$obj->amount).''.price(-$obj->amount)."'.price(-$obj->amount).''.price(-$obj->amount)."
     ".$langs->trans("Credit")."'.price($obj->amount).''.price($obj->amount)."'.price($obj->amount).''.price($obj->amount)."
    '.price($subtotal_ht).''.price($subtotal_ttc).'
     ".$loan_static->getNomUrl(1).' - '.$obj->label."'.price(-$obj->amount).''.price(-$obj->amount)."'.price(-$obj->amount).''.price(-$obj->amount)."
    '.price($subtotal_ht).''.price($subtotal_ttc).'
     ".$langs->trans("VATToPay")." '.price($amount)."'.price($amount)."
     '.$langs->trans("VATToCollect")." '.price($amount)."'.price($amount)."
     ".$langs->trans("VATPaid")."'.price($amount)."'.price($amount)."
     ".$langs->trans("VATCollected")."'.price($amount)."'.price($amount)."
     '.price(price2num($subtotal_ttc, 'MT')).'
    '."\n"; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; } print ''; print ''; // Loop on each year to ouput -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; // Loop on each month $nb_mois_decalage = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START - 1) : 0; -for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) -{ +for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $mois_modulo = $mois; - if ($mois > 12) {$mois_modulo = $mois - 12; } + if ($mois > 12) { + $mois_modulo = $mois - 12; + } print ''; print ""; - for ($annee = $year_start; $annee <= $year_end; $annee++) - { + for ($annee = $year_start; $annee <= $year_end; $annee++) { $annee_decalage = $annee; - if ($mois > 12) {$annee_decalage = $annee + 1; } + if ($mois > 12) { + $annee_decalage = $annee + 1; + } $case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage)); print '"; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { $nbcols += 2; print ''; print ''; @@ -1018,11 +1093,9 @@ print "\n"; // Balance print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { print ''; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 2a69f590449..467169230d0 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Alexandre Spangaro - * Copyright (C) 2018 Laurent Destailleur + * Copyright (C) 2018-2020 Laurent Destailleur * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -57,8 +57,7 @@ $nbofyear = 1; // Date range $year = GETPOST('year', 'int'); -if (empty($year)) -{ +if (empty($year)) { $year_current = strftime("%Y", dol_now()); $month_current = strftime("%m", dol_now()); $year_start = $year_current - ($nbofyear - 1); @@ -71,36 +70,49 @@ $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_starty $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // We define date_start and date_end -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $year_end = $year_start + ($nbofyear - 1); $month_start = GETPOST("month", 'int') ?GETPOST("month", 'int') : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $date_startmonth = $month_start; - if (!GETPOST('month')) - { - if (!GETPOST("year") && $month_start > $month_current) - { + if (!GETPOST('month')) { + if (!GETPOST("year") && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; - } 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 ($month_end < 1) { + $month_end = 12; + } else { + $year_end++; + } + } 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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } -if (($date_start < dol_time_plus_duree($date_end, -1, 'y')) || ($date_start > $date_end)) -{ +if (($date_start < dol_time_plus_duree($date_end, -1, 'y')) || ($date_start > $date_end)) { $date_end = dol_time_plus_duree($date_start - 1, 1, 'y'); } @@ -125,17 +137,27 @@ if ($cat_id == 0) { // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; -if (!empty($conf->accounting->enabled)) $modecompta = 'BOOKKEEPING'; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta", 'alpha'); - -// Security check -if ($user->socid > 0) - accessforbidden(); -if (!$user->rights->accounting->comptarapport->lire) - accessforbidden(); +if (!empty($conf->accounting->enabled)) { + $modecompta = 'BOOKKEEPING'; +} +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta", 'alpha'); +} $AccCat = new AccountancyCategory($db); +// Security check +$socid = GETPOST('socid', 'int'); +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'); +} + /* * View @@ -167,31 +189,36 @@ $textnextyear = ' ('.$langs->trans("SeeReportInInputOutputMode", '', '').')'; - if (!empty($conf->accounting->enabled)) $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '', '').')'; + if (!empty($conf->accounting->enabled)) { + $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '', '').')'; + } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); //$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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= $langs->trans("DepositsAreNotIncluded"); + } else { + $description .= $langs->trans("DepositsAreIncluded"); + } $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("AnnualByAccountInputOutputMode"); $calcmode = $langs->trans("CalcModeEngagement"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; - if (!empty($conf->accounting->enabled)) $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '', '').')'; + if (!empty($conf->accounting->enabled)) { + $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '', '').')'; + } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); //$periodlink=''.img_previous().' '.img_next().''; $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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -211,8 +238,7 @@ if ($modecompta == "CREANCES-DETTES") report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta, 'action' => ''), $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -228,29 +254,24 @@ print '
    '; print ''; print ''; foreach ($months as $k => $v) { - if (($k + 1) >= $date_startmonth) - { + if (($k + 1) >= $date_startmonth) { print ''; } } foreach ($months as $k => $v) { - if (($k + 1) < $date_startmonth) - { + if (($k + 1) < $date_startmonth) { print ''; } } print ''; -if ($modecompta == 'CREANCES-DETTES') -{ +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 @@ -260,7 +281,7 @@ if ($modecompta == 'CREANCES-DETTES') if (! empty($date_start) && ! empty($date_end)) $sql.= " AND t.doc_date >= '".$db->idate($date_start)."' AND t.doc_date <= '".$db->idate($date_end)."'"; if (! empty($month)) { - $sql .= " AND MONTH(t.doc_date) = " . $month; + $sql .= " AND MONTH(t.doc_date) = " . ((int) $month); } $resql = $db->query($sql); if ($resql) @@ -297,9 +318,9 @@ if ($modecompta == 'CREANCES-DETTES') // Year NP print ''; $vars = array(); @@ -316,7 +337,7 @@ if ($modecompta == 'CREANCES-DETTES') $r = dol_eval($result, 1); //var_dump($r); - print ''; + print ''; // Year N $code = $cat['code']; // code of categorie ('VTE', 'MAR', ...) @@ -334,7 +355,7 @@ if ($modecompta == 'CREANCES-DETTES') //$r = $AccCat->calculate($result); $r = dol_eval($result, 1); - print ''; + print ''; $sommes[$code]['N'] += $r; // Detail by month @@ -348,7 +369,7 @@ if ($modecompta == 'CREANCES-DETTES') //$r = $AccCat->calculate($result); $r = dol_eval($result, 1); - print ''; + print ''; $sommes[$code]['M'][$k] += $r; } } @@ -362,7 +383,7 @@ if ($modecompta == 'CREANCES-DETTES') //$r = $AccCat->calculate($result); $r = dol_eval($result, 1); - print ''; + print ''; $sommes[$code]['M'][$k] += $r; } } @@ -386,8 +407,7 @@ if ($modecompta == 'CREANCES-DETTES') $cpts = $AccCat->getCptsCat($cat['rowid']); $arrayofaccountforfilter = array(); - foreach ($cpts as $i => $cpt) // Loop on each account. - { + foreach ($cpts as $i => $cpt) { // Loop on each account. $arrayofaccountforfilter[] = $cpt['account_number']; } @@ -399,8 +419,7 @@ if ($modecompta == 'CREANCES-DETTES') setEventMessages(null, $AccCat->errors, 'errors'); $resultNP = 0; } else { - foreach ($cpts as $i => $cpt) // Loop on each account. - { + foreach ($cpts as $i => $cpt) { // Loop on each account. $resultNP = empty($AccCat->sdcperaccount[$cpt['account_number']]) ? 0 : $AccCat->sdcperaccount[$cpt['account_number']]; $totCat['NP'] += $resultNP; @@ -412,8 +431,7 @@ if ($modecompta == 'CREANCES-DETTES') // Set value into column N and month M ($totCat) // This make 12 calls for each accountancy account (12 monthes M) - foreach ($cpts as $i => $cpt) // Loop on each account. - { + foreach ($cpts as $i => $cpt) { // Loop on each account. // We make 1 loop for each account because we may want detail per account. // @todo Optimize to ask a 'group by' account and a filter with account in (..., ...) in request @@ -422,8 +440,9 @@ if ($modecompta == 'CREANCES-DETTES') foreach ($months as $k => $v) { $monthtoprocess = $k + 1; // ($k+1) is month 1, 2, ..., 12 $yeartoprocess = $start_year; - if (($k + 1) < $start_month) + if (($k + 1) < $start_month) { $yeartoprocess++; + } //var_dump($monthtoprocess.'_'.$yeartoprocess); $return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cat['dc'] ? $cat['dc'] : 0, 'nofilter', $monthtoprocess, $yeartoprocess); @@ -452,44 +471,48 @@ if ($modecompta == 'CREANCES-DETTES') // Column group print ''; // Label of group print ''; - print ''; - print ''; + print ''; + print ''; // Each month foreach ($totCat['M'] as $k => $v) { - if (($k + 1) >= $date_startmonth) - print ''; + if (($k + 1) >= $date_startmonth) { + print ''; + } } foreach ($totCat['M'] as $k => $v) { - if (($k + 1) < $date_startmonth) - print ''; + if (($k + 1) < $date_startmonth) { + print ''; + } } print "\n"; @@ -508,20 +531,20 @@ if ($modecompta == 'CREANCES-DETTES') print ' - '; print $cpt['account_label']; print ''; - print ''; - print ''; + print ''; + print ''; // Make one call for each month foreach ($months as $k => $v) { if (($k + 1) >= $date_startmonth) { $resultM = $totPerAccount[$cpt['account_number']]['M'][$k]; - print ''; + print ''; + print ''; } } print "\n"; diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 25e96c79a28..0f38181e284 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2016-2018 Frédéric France * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2021 Gauthier VERDOL * * 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,9 +29,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; if (!empty($conf->projet->enabled)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -40,7 +43,7 @@ if (!empty($conf->accounting->enabled)) { } // Load translation files required by the page -$langs->loadLangs(array('compta', 'bills', 'banks')); +$langs->loadLangs(array('compta', 'bills', 'banks', 'hrm')); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); @@ -51,34 +54,37 @@ $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), $dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear')); $label = GETPOST('label', 'alpha'); $actioncode = GETPOST('actioncode'); +$fk_user = GETPOST('userid', 'int'); + +$object = new ChargeSociales($db); +if ($id > 0) { + $object->fetch($id); +} // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); -$object = new ChargeSociales($db); -/* *************************************************************************** */ -/* */ -/* Actions */ -/* */ -/* *************************************************************************** */ + +/* + * Actions + */ // Classify paid -if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes') -{ +if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes') { $object->fetch($id); - $result = $object->set_paid($user); + $result = $object->setPaid($user); } if ($action == 'reopen' && $user->rights->tax->charges->creer) { $result = $object->fetch($id); - if ($object->paye) - { - $result = $object->set_unpaid($user); - if ($result > 0) - { + if ($object->paye) { + $result = $object->setUnpaid($user); + if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit(); } else { @@ -88,26 +94,32 @@ if ($action == 'reopen' && $user->rights->tax->charges->creer) { } // Link to a project -if ($action == 'classin' && $user->rights->tax->charges->creer) -{ +if ($action == 'classin' && $user->rights->tax->charges->creer) { $object->fetch($id); $object->setProject(GETPOST('fk_project')); } -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setfk_user' && $user->rights->tax->charges->creer) { + $object->fetch($id); + $object->fk_user = $fk_user; + $object->update($user); +} + +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } // payment mode if ($action == 'setmode' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } // bank account @@ -120,8 +132,7 @@ if ($action == 'setbankaccount' && $user->rights->tax->charges->creer) { } // Delete social contribution -if ($action == 'confirm_delete' && $confirm == 'yes') -{ +if ($action == 'confirm_delete' && $confirm == 'yes') { $object->fetch($id); $result = $object->delete($user); if ($result > 0) { @@ -134,24 +145,19 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // Add social contribution -if ($action == 'add' && $user->rights->tax->charges->creer) -{ +if ($action == 'add' && $user->rights->tax->charges->creer) { $amount = price2num(GETPOST('amount'), 'MT'); - if (!$dateech) - { + if (!$dateech) { 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)) { @@ -163,6 +169,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer) $object->date_ech = $dateech; $object->periode = $dateperiod; $object->amount = $amount; + $object->fk_user = $fk_user; $object->mode_reglement_id = (int) GETPOST('mode_reglement_id', 'int'); $object->fk_account = (int) GETPOST('fk_account', 'int'); $object->fk_project = (int) GETPOST('fk_project', 'int'); @@ -176,24 +183,19 @@ if ($action == 'add' && $user->rights->tax->charges->creer) } -if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->creer) -{ +if ($action == 'update' && !GETPOST("cancel") && $user->rights->tax->charges->creer) { $amount = price2num(GETPOST('amount'), 'MT'); - if (!$dateech) - { + if (!$dateech) { 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 { @@ -202,6 +204,7 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre $object->date_ech = $dateech; $object->periode = $dateperiod; $object->amount = $amount; + $object->fk_user = $fk_user; $result = $object->update($user); if ($result <= 0) { @@ -211,18 +214,18 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre } // Action clone object -if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } +if ($action == 'confirm_clone' && $confirm != 'yes') { + $action = ''; +} -if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->charges->creer)) -{ +if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->charges->creer)) { $db->begin(); $originalId = $id; $object->fetch($id); - if ($object->id > 0) - { + if ($object->id > 0) { $object->paye = 0; $object->id = $object->ref = null; @@ -232,21 +235,32 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char $object->label = $langs->trans("CopyOf").' '.$object->label; } - if (GETPOST('clone_for_next_month', 'int')) { + if (GETPOST('clone_for_next_month', 'int')) { // This can be true only if TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX has been set $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); } else { + // Note dateech is often a little bit higher than dateperiod $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; - if ($newdateech) $object->date_ech = $newdateech; + if ($newdateperiod) { + $object->periode = $newdateperiod; + if (empty($newdateech)) { + $object->date_ech = $object->periode; + } + } + if ($newdateech) { + $object->date_ech = $newdateech; + if (empty($newdateperiod)) { + // TODO We can here get dol_get_last_day of previous month: + // $object->periode = dol_get_last_day(year of $object->date_ech - 1m, month or $object->date_ech -1m) + $object->periode = $object->date_ech; + } + } } - if ($object->check()) - { + if ($object->check()) { $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { $db->commit(); $db->close(); @@ -276,7 +290,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char $form = new Form($db); $formsocialcontrib = new FormSocialContrib($db); $bankaccountstatic = new Account($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $title = $langs->trans("SocialContribution").' - '.$langs->trans("Card"); $help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; @@ -284,8 +300,7 @@ llxHeader("", $title, $help_url); // Mode creation -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewSocialContribution")); print ''; @@ -342,9 +357,14 @@ if ($action == 'create') print ''; print ''; + // Employee + print ''; + print ''; + // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); // Associated project @@ -352,21 +372,20 @@ if ($action == 'create') print ''; } // Payment Mode - print ''; // Bank Account - if (!empty($conf->banque->enabled)) - { - print ''; } @@ -388,25 +407,21 @@ if ($action == 'create') /* Card Mode */ /* */ /* *************************************************************************** */ -if ($id > 0) -{ +if ($id > 0) { $object = new ChargeSociales($db); $result = $object->fetch($id); - if ($result > 0) - { + if ($result > 0) { $head = tax_prepare_head($object); $totalpaye = $object->getSommePaiement(); // Clone confirmation - if ($action === 'clone') - { + if ($action === 'clone') { $formquestion = array( - array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label), + array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label, 'tdclass'=>'fieldrequired'), ); - if (!empty($conf->global->TAX_ADD_CLON_FOR_NEXT_MONTH_CHECKBOX)) - { + if (!empty($conf->global->TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX)) { $formquestion[] = array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1); } else { $formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); @@ -417,21 +432,18 @@ if ($id > 0) } - if ($action == 'paid') - { + if ($action == 'paid') { $text = $langs->trans('ConfirmPaySocialContribution'); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySocialContribution'), $text, "confirm_paid", '', '', 2); } // Confirmation of the removal of the Social Contribution - if ($action == 'delete') - { + if ($action == 'delete') { $text = $langs->trans('ConfirmDeleteSocialContribution'); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSocialContribution'), $text, 'confirm_delete', '', '', 2); } - if ($action == 'edit') - { + if ($action == 'edit') { print "id&action=update\" method=\"post\">"; print ''; } @@ -442,13 +454,43 @@ if ($id > 0) // Ref customer $morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); + + // Employee + if ($action != 'editfk_user') { + if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) { + $userstatic = new User($db); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0) { + $morehtmlref .= '
    ' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); + } + } else { + $morehtmlref .= '
    ' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); + if (!empty($object->fk_user)) { + $userstatic = new User($db); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0) { + $morehtmlref .= $userstatic->getNomUrl(1); + } else { + dol_print_error($db); + exit(); + } + } + } + } else { + $morehtmlref .= '
    '.$langs->trans('Employee').' : '; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $form->select_dolusers($object->fk_user, 'userid', 1); + $morehtmlref .= ''; + $morehtmlref .= ''; + } + // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->tax->charges->creer) - { + if ($user->rights->tax->charges->creer) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -497,8 +539,7 @@ if ($id > 0) print ""; // Date - if ($action == 'edit') - { + if ($action == 'edit') { print '"; @@ -509,8 +550,7 @@ if ($id > 0) // Period end date print ""; print ""; // Amount - if ($action == 'edit') - { + if ($action == 'edit') { print '"; @@ -530,10 +569,11 @@ if ($id > 0) // Mode of payment print ''; // Bank Account - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '\n"; if (count($name)) { - foreach ($name as $key=>$value) { + foreach ($name as $key => $value) { print ''; // Product diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index a7f68644f7b..32b85b9aea9 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/compta/stats/supplier_ca_by_thirdparty.php + * \file htdocs/compta/stats/supplier_turnover_by_thirdparty.php * \brief Page reporting purchase turnover by thirdparty */ @@ -34,12 +34,18 @@ $langs->loadLangs(array('companies', 'categories', 'bills', 'compta')); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta"); +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta"); +} -$sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; -$sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; -if (!$sortorder) $sortorder = "asc"; -if (!$sortfield) $sortfield = "nom"; +$sortorder = GETPOST("sortorder", 'aZ09'); +$sortfield = GETPOST("sortfield", 'aZ09'); +if (!$sortorder) { + $sortorder = "asc"; +} +if (!$sortfield) { + $sortfield = "nom"; +} $socid = GETPOST('socid', 'int'); @@ -53,11 +59,6 @@ if (GETPOST('subcat', 'alpha') === 'yes') { // Hook $hookmanager->initHooks(array('supplierturnoverbythirdpartylist')); -// Security check -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'); - // Date range $year = GETPOST("year", 'int'); $month = GETPOST("month", 'int'); @@ -71,45 +72,56 @@ $date_startday = GETPOST("date_startday", 'alpha'); $date_endyear = GETPOST("date_endyear", 'alpha'); $date_endmonth = GETPOST("date_endmonth", 'alpha'); $date_endday = GETPOST("date_endday", 'alpha'); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q", "int") ?GETPOST("q", "int") : 0; - if (empty($q)) - { + if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } else { // TODO We define q } @@ -152,6 +164,17 @@ foreach ($allparams as $key => $value) { $paramslink .= '&'.$key.'='.$value; } +// Security check +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'); +} + /* * View @@ -164,39 +187,43 @@ $thirdparty_static = new Societe($db); $formother = new FormOther($db); // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header -if ($modecompta == "CREANCES-DETTES") -{ +if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("PurchaseTurnover").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeDebt"); //$calcmode.='
    ('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} elseif ($modecompta == "BOOKKEEPING") -{ -} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") -{ +} elseif ($modecompta == "BOOKKEEPING") { +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { +} +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().''.img_next().''; +} else { + $periodlink = ''; } -$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().''.img_next().''; -else $periodlink = ''; report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -210,11 +237,9 @@ if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,"; $sql .= " sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s"; - if ($selected_cat === -2) // Without any category - { + 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"; } $sql .= " WHERE f.fk_statut in (1,2)"; @@ -223,26 +248,25 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category - { + if ($selected_cat === -2) { // Without any category $sql .= " AND cs.fk_soc is null"; } 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 .= " AND (c.rowid = ".((int) $selected_cat); + if ($subcat) { + $sql .= " OR c.fk_parent = ".((int) $selected_cat); + } $sql .= ")"; $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid"; } -} else { +} elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf"; $sql .= ", ".MAIN_DB_PREFIX."paiementfourn as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if ($selected_cat === -2) // Without any category - { + 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"; } $sql .= " WHERE p.rowid = pf.fk_paiementfourn"; @@ -251,22 +275,33 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category - { + if ($selected_cat === -2) { // Without any category $sql .= " AND cs.fk_soc is null"; } elseif ($selected_cat) { // Into a specific category - $sql .= " AND (c.rowid = ".$selected_cat; - if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; + $sql .= " AND (c.rowid = ".((int) $selected_cat); + if ($subcat) { + $sql .= " OR c.fk_parent = ".((int) $selected_cat); + } $sql .= ")"; $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid"; } } -if (!empty($search_societe)) $sql .= natural_search('s.nom', $search_societe); -if (!empty($search_zip)) $sql .= natural_search('s.zip', $search_zip); -if (!empty($search_town)) $sql .= natural_search('s.town', $search_town); -if ($search_country > 0) $sql .= ' AND s.fk_pays = '.$search_country.''; +if (!empty($search_societe)) { + $sql .= natural_search('s.nom', $search_societe); +} +if (!empty($search_zip)) { + $sql .= natural_search('s.zip', $search_zip); +} +if (!empty($search_town)) { + $sql .= natural_search('s.town', $search_town); +} +if ($search_country > 0) { + $sql .= ' AND s.fk_pays = '.$search_country.''; +} $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; -if ($socid) $sql .= " AND f.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; +} $sql .= " GROUP BY s.rowid, s.nom, s.zip, s.town, s.fk_pays"; $sql .= " ORDER BY s.rowid"; //echo $sql; @@ -297,8 +332,7 @@ $i = 0; print ''; print ''."\n"; // Extra parameters management -foreach ($headerparams as $key => $value) -{ +foreach ($headerparams as $key => $value) { print ''; } @@ -352,8 +386,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Zip"), $_SERVER["PHP_SELF"], @@ -361,8 +396,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Town"), $_SERVER["PHP_SELF"], @@ -370,8 +406,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Country"), $_SERVER["PHP_SELF"], @@ -379,18 +416,19 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre( - $langs->trans('AmountHT'), - $_SERVER["PHP_SELF"], - "amount_ht", - "", - $paramslink, - 'class="right"', - $sortfield, - $sortorder + $langs->trans('AmountHT'), + $_SERVER["PHP_SELF"], + "amount_ht", + "", + $paramslink, + 'class="right"', + $sortfield, + $sortorder ); } else { print_liste_field_titre(''); @@ -478,7 +516,7 @@ if (count($amount)) { $arrayforsort = $address_town; } - foreach ($arrayforsort as $key=>$value) { + foreach ($arrayforsort as $key => $value) { print ''; // Third party @@ -550,10 +588,10 @@ if (count($amount)) { if (!empty($conf->supplier_proposal->enabled) && $key > 0) { print ' '.img_picto($langs->trans("ProposalStats"), "stats").' '; } - if (!empty($conf->fournisseur->enabled) && $key > 0) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $key > 0) { print ' '.img_picto($langs->trans("OrderStats"), "stats").' '; } - if (!empty($conf->fournisseur->enabled) && $key > 0) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && $key > 0) { print ' '.img_picto($langs->trans("InvoiceStats"), "stats").' '; } print ''; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php old mode 100644 new mode 100755 index 493f01ee53c..daf5afb025e --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL * * 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,65 +28,121 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; +if (!empty($conf->accounting->enabled)) { + include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} + // Load translation files required by the page $langs->loadLangs(array('compta', 'banks', 'bills')); $id = GETPOST("id", 'int'); $action = GETPOST("action", "alpha"); +$cancel = GETPOST('cancel'); +$confirm = GETPOST('confirm'); $refund = GETPOST("refund", "int"); -if (empty($refund)) $refund = 0; +if (GETPOSTISSET('auto_create_paiement') || $action === 'add') { + $auto_create_payment = GETPOST("auto_create_paiement", "int"); +} else { + $auto_create_payment = empty($conf->global->CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT); +} + +if (empty($refund)) { + $refund = 0; +} $datev = dol_mktime(12, 0, 0, GETPOST("datevmonth", 'int'), GETPOST("datevday", 'int'), GETPOST("datevyear", 'int')); $datep = dol_mktime(12, 0, 0, GETPOST("datepmonth", 'int'), GETPOST("datepday", 'int'), GETPOST("datepyear", 'int')); - -// Security check -$socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - $object = new Tva($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('taxvatcard', 'globalcard')); +if ($id > 0) { + $object->fetch($id); +} + +// Security check +$socid = GETPOST('socid', 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); + /** * Actions */ -if ($_POST["cancel"] == $langs->trans("Cancel") && !$id) -{ +if ($cancel && !$id) { header("Location: list.php"); exit; } -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } -if ($action == 'setdatev' && $user->rights->tax->charges->creer) -{ +if ($action == 'setdatev' && $user->rights->tax->charges->creer) { $object->fetch($id); $object->datev = $datev; $result = $object->update($user); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } $action = ''; } -if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) -{ +// payment mode +if ($action == 'setmode' && $user->rights->tax->charges->creer) { + $object->fetch($id); + $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Bank account +if ($action == 'setbankaccount' && $user->rights->tax->charges->creer) { + $object->fetch($id); + $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Classify paid +if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes') { + $object->fetch($id); + $result = $object->setPaid($user); +} + +if ($action == 'reopen' && $user->rights->tax->charges->creer) { + $result = $object->fetch($id); + if ($object->paye) { + $result = $object->setUnpaid($user); + if ($result > 0) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} + +if ($action == 'add' && !$cancel) { $error = 0; - $object->accountid = GETPOST("accountid", 'int'); + $object->fk_account = GETPOST("accountid", 'int'); $object->type_payment = GETPOST("type_payment", 'alphanohtml'); $object->num_payment = GETPOST("num_payment", 'alphanohtml'); @@ -98,69 +155,98 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) } $object->amount = $amount; $object->label = GETPOST("label", 'alpha'); - $object->note_private = GETPOST("note", 'restricthtml'); + $object->note = GETPOST("note", 'none'); - if (empty($object->datep)) - { + if (empty($object->datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment")), null, 'errors'); $error++; } - if (empty($object->datev)) - { + if (empty($object->datev)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PeriodEndDate")), null, 'errors'); $error++; } - if (empty($object->type_payment) || $object->type_payment < 0) - { + if (!empty($auto_create_payment) && (empty($object->type_payment) || $object->type_payment < 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); $error++; } - if (empty($object->amount)) - { + if (empty($object->amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } + if (!empty($auto_create_payment) && ($object->fk_account <= 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AccountToCredit")), null, 'errors'); + $error++; + } - if (!$error) - { - $db->begin(); + if (!$error) { + $ret = $object->create($user); + if ($ret < 0) { + $error++; + } - $ret = $object->addPayment($user); - if ($ret > 0) - { - $db->commit(); - header("Location: list.php"); + // Auto create payment + if (!empty($auto_create_payment) && !$error) { + $db->begin(); + + // Create a line of payments + $paiement = new PaymentVAT($db); + $paiement->chid = $object->id; + $paiement->datepaye = $datep; + $paiement->amounts = array($object->id=>$amount); // Tableau de montant + $paiement->paiementtype = GETPOST("type_payment", 'alphanohtml'); + $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); + $paiement->note = GETPOST("note", 'none'); + + if (!$error) { + $paymentid = $paiement->create($user, (int) GETPOST('closepaidtva')); + if ($paymentid < 0) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + $action = 'create'; + } + } + + if (!$error) { + $result = $paiement->addPaymentToBank($user, 'payment_vat', '(VATPayment)', GETPOST('accountid', 'int'), '', ''); + if (!($result > 0)) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + } + } + + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } + } + if (empty($error)) { + header("Location: card.php?id=" . $object->id); exit; - } else { - $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); - $action = "create"; } } $action = 'create'; } -if ($action == 'delete') -{ +if ($action == 'confirm_delete' && $confirm == 'yes') { $result = $object->fetch($id); + $totalpaye = $object->getSommePaiement(); - if ($object->rappro == 0) - { + if (empty($totalpaye)) { $db->begin(); $ret = $object->delete($user); - if ($ret > 0) - { - if ($object->fk_bank) - { + if ($ret > 0) { + if ($object->fk_bank) { $accountline = new AccountLine($db); $result = $accountline->fetch($object->fk_bank); - if ($result > 0) $result = $accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) + if ($result > 0) { + $result = $accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) + } } - if ($result >= 0) - { + if ($result >= 0) { $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php'); exit; @@ -174,8 +260,76 @@ if ($action == 'delete') setEventMessages($object->error, $object->errors, 'errors'); } } else { - $mesg = 'Error try do delete a line linked to a conciliated bank transaction'; - setEventMessages($mesg, null, 'errors'); + setEventMessages($langs->trans('DisabledBecausePayments'), null, 'errors'); + } +} + +if ($action == 'update' && !GETPOST("cancel") && $user->rights->tax->charges->creer) { + $amount = price2num(GETPOST('amount')); + + if (empty($amount)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); + $action = 'edit'; + } elseif (!is_numeric($amount)) { + setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); + $action = 'create'; + } else { + $result = $object->fetch($id); + + $object->amount = price2num($amount); + + $result = $object->update($user); + if ($result <= 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} + +// Action clone object +if ($action == 'confirm_clone' && $confirm != 'yes') { + $action = ''; +} + +if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->charges->creer)) { + $db->begin(); + + $originalId = $id; + + $object->fetch($id); + + if ($object->id > 0) { + $object->paye = 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; + } + + $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); + if ($newdateperiod) { + $object->datev = $newdateperiod; + } + + //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 { + $db->rollback(); + dol_print_error($db, $object->error); } } @@ -188,37 +342,51 @@ $form = new Form($db); $title = $langs->trans("VAT")." - ".$langs->trans("Card"); $help_url = ''; -llxHeader("", $title, $helpurl); + +llxHeader("", $title, $help_url); -if ($id) -{ +if ($id) { $result = $object->fetch($id); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db); exit; } } // Form to enter VAT -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("VAT").' - '.$langs->trans("New")); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n".''."\n"; } @@ -226,10 +394,15 @@ if ($action == 'create') print ''; print ''; + print dol_get_fiche_head(); + + print '
     '; print ''; print $annee; - if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) print '-'.($annee + 1); + if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) { + print '-'.($annee + 1); + } print '
    '.$langs->trans("Month").''; $htmlhelp = ''; // if ($modecompta == 'RECETTES-DEPENSES') $htmlhelp=$langs->trans("PurchasesPlusVATEarnedAndDue"); @@ -940,52 +1009,56 @@ print '
    ".dol_print_date(dol_mktime(12, 0, 0, $mois_modulo, 1, $annee), "%B")." '; - if ($modecompta == 'BOOKKEEPING') - { - if (isset($decaiss[$case]) && $decaiss[$case] != 0) - { + if ($modecompta == 'BOOKKEEPING') { + if (isset($decaiss[$case]) && $decaiss[$case] != 0) { print ''.price(price2num($decaiss[$case], 'MT')).''; - if (!isset($totsorties[$annee])) $totsorties[$annee] = 0; + if (!isset($totsorties[$annee])) { + $totsorties[$annee] = 0; + } $totsorties[$annee] += $decaiss[$case]; } } else { - if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) - { + if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) { print ''.price(price2num($decaiss_ttc[$case], 'MT')).''; - if (!isset($totsorties[$annee])) $totsorties[$annee] = 0; + if (!isset($totsorties[$annee])) { + $totsorties[$annee] = 0; + } $totsorties[$annee] += $decaiss_ttc[$case]; } } print " '; - if ($modecompta == 'BOOKKEEPING') - { - if (isset($encaiss[$case])) - { + if ($modecompta == 'BOOKKEEPING') { + if (isset($encaiss[$case])) { print ''.price(price2num($encaiss[$case], 'MT')).''; - if (!isset($totentrees[$annee])) $totentrees[$annee] = 0; + if (!isset($totentrees[$annee])) { + $totentrees[$annee] = 0; + } $totentrees[$annee] += $encaiss[$case]; } } else { - if (isset($encaiss_ttc[$case])) - { + if (isset($encaiss_ttc[$case])) { print ''.price(price2num($encaiss_ttc[$case], 'MT')).''; - if (!isset($totentrees[$annee])) $totentrees[$annee] = 0; + if (!isset($totentrees[$annee])) { + $totentrees[$annee] = 0; + } $totentrees[$annee] += $encaiss_ttc[$case]; } } @@ -999,11 +1072,13 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) $nbcols = 0; print '
    '; -if ($modecompta == 'BOOKKEEPING') print $langs->trans("Total"); -else print $langs->trans("TotalTTC"); +if ($modecompta == 'BOOKKEEPING') { + print $langs->trans("Total"); +} else { + print $langs->trans("TotalTTC"); +} print ''.(isset($totsorties[$annee]) ?price(price2num($totsorties[$annee], 'MT')) : ' ').''.(isset($totentrees[$annee]) ?price(price2num($totentrees[$annee], 'MT')) : ' ').'
    '.$langs->trans("AccountingResult").' '; - if (isset($totentrees[$annee]) || isset($totsorties[$annee])) - { + if (isset($totentrees[$annee]) || isset($totsorties[$annee])) { $in = (isset($totentrees[$annee]) ?price2num($totentrees[$annee], 'MT') : 0); $out = (isset($totsorties[$annee]) ?price2num($totsorties[$annee], 'MT') : 0); print price(price2num($in - $out, 'MT')).''.$langs->trans("PreviousPeriod").''.$langs->trans("SelectedPeriod").''.$langs->trans('MonthShort'.sprintf("%02s", ($k + 1))).''.$langs->trans('MonthShort'.sprintf("%02s", ($k + 1))).'
    '; - print $cat['code']; + print dol_escape_htmltag($cat['code']); print ''; - print $cat['label']; + print dol_escape_htmltag($cat['label']); print ''.price($r).''.price($r).''.price($r).''.price($r).''.price($r).''.price($r).''.price($r).''.price($r).''; - print $cat['code']; + print dol_escape_htmltag($cat['code']); print ''; - print $cat['label']; - if (count($cpts) > 0) // Show example of 5 first accounting accounts - { + print dol_escape_htmltag($cat['label']); + if (count($cpts) > 0) { // Show example of 5 first accounting accounts $i = 0; foreach ($cpts as $cpt) { if ($i > 5) { print '...)'; break; } - if ($i > 0) + if ($i > 0) { print ', '; - else print ' ('; - print $cpt['account_number']; + } else { + print ' ('; + } + print dol_escape_htmltag($cpt['account_number']); $i++; } - if ($i <= 5) + if ($i <= 5) { print ')'; + } } else { print ' - '.$langs->trans("GroupIsEmptyCheckSetup").''; } print ''.price($totCat['NP']).''.price($totCat['N']).''.price($totCat['NP']).''.price($totCat['N']).''.price($v).''.price($v).''.price($v).''.price($v).'
    '.price($resultNP).''.price($resultN).''.price($resultNP).''.price($resultN).''.price($resultM).''.price($resultM).'/td>'; } } foreach ($months as $k => $v) { if (($k + 1) < $date_startmonth) { $resultM = $totPerAccount[$cpt['account_number']]['M'][$k]; - print ''.price($resultM).''.price($resultM).'
    '; + print $langs->trans('Employee'); + print ''.img_picto('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($fk_user, 'userid', 1).'
    '.$langs->trans("Project").''; - $numproject = $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, 1); + print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 1); print '
    '.$langs->trans('PaymentMode').''; + print '
    '.$langs->trans('DefaultPaymentMode').''; $form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id'); print '
    '.$langs->trans('BankAccount').''; - $form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 2); + if (!empty($conf->banque->enabled)) { + print '
    '.$langs->trans('DefaultBankAccount').''; + print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 2, '', 0, '', 1); print '
    '.$langs->trans("Date").""; print $form->selectDate($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "
    ".$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).""; - if ($action == 'edit') - { + if ($action == 'edit') { print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); } else { print dol_print_date($object->periode, "day"); @@ -518,8 +558,7 @@ if ($id > 0) print "
    '.$langs->trans("AmountTTC").""; print ''; print "
    '; print ''; - if ($action != 'editmode') + if ($action != 'editmode') { print ''; + } print '
    '; - print $langs->trans('PaymentMode'); + print $langs->trans('DefaultPaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; print '
    '; if ($action == 'editmode') { @@ -544,14 +584,14 @@ if ($id > 0) print '
    '; print ''; + } print '
    '; - print $langs->trans('BankAccount'); + print $langs->trans('DefaultBankAccount'); print ''; - if ($action != 'editbankaccount' && $user->rights->tax->charges->creer) + if ($action != 'editbankaccount' && $user->rights->tax->charges->creer) { print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; print '
    '; if ($action == 'editbankaccount') { @@ -585,19 +625,19 @@ if ($id > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepaiement = c.id"; $sql .= ", ".MAIN_DB_PREFIX."chargesociales as cs"; - $sql .= " WHERE p.fk_charge = ".$id; + $sql .= " WHERE p.fk_charge = ".((int) $id); $sql .= " AND p.fk_charge = cs.rowid"; $sql .= " AND cs.entity IN (".getEntity('tax').")"; $sql .= " ORDER BY dp DESC"; //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $totalpaye = 0; $num = $db->num_rows($resql); - $i = 0; $total = 0; + $i = 0; + $total = 0; print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; @@ -613,10 +653,8 @@ if ($id > 0) $paymentsocialcontributiontmp = new PaymentSocialContribution($db); - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); $paymentsocialcontributiontmp->id = $objp->rowid; @@ -630,8 +668,7 @@ if ($id > 0) print '\n"; $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type; print "\n"; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref; @@ -647,11 +684,12 @@ if ($id > 0) } print ''; } - print '\n"; + print '\n"; print ""; $totalpaye += $objp->amount; $i++; @@ -687,8 +725,7 @@ if ($id > 0) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '
    '; print ''; print '   '; @@ -696,50 +733,45 @@ if ($id > 0) print '
    '; } - if ($action == 'edit') print "\n"; + if ($action == 'edit') { + print "\n"; + } /* * Actions buttons */ - if ($action != 'edit') - { - print "
    \n"; + if ($action != 'edit') { + print '
    '."\n"; // Reopen - if ($object->paye && $user->rights->tax->charges->creer) - { + if ($object->paye && $user->rights->tax->charges->creer) { print ''; } // Edit - if ($object->paye == 0 && $user->rights->tax->charges->creer) - { + if ($object->paye == 0 && $user->rights->tax->charges->creer) { print ''; } // Emit payment - if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) - { + if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { print ""; } // Classify 'paid' - if ($object->paye == 0 && round($resteapayer) <= 0 && $user->rights->tax->charges->creer) - { + if ($object->paye == 0 && round($resteapayer) <= 0 && $user->rights->tax->charges->creer) { print ''; } // Clone - if ($user->rights->tax->charges->creer) - { + if ($user->rights->tax->charges->creer) { print '"; } // Delete - if ($user->rights->tax->charges->supprimer) - { + if ($user->rights->tax->charges->supprimer) { print ''; } diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index ceace76bba9..8cfadd84f4f 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -46,9 +46,15 @@ class Cchargesociales /** * @var string Label + * @deprecated */ public $libelle; + /** + * @var string Label + */ + public $label; + public $deductible; public $active; public $code; @@ -107,7 +113,6 @@ class Cchargesociales // Insert request $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element.'('; - $sql .= 'libelle,'; $sql .= 'deductible,'; $sql .= 'active,'; @@ -115,10 +120,7 @@ class Cchargesociales $sql .= 'fk_pays,'; $sql .= 'module'; $sql .= 'accountancy_code'; - - $sql .= ') VALUES ('; - $sql .= ' '.(!isset($this->libelle) ? 'NULL' : "'".$this->db->escape($this->libelle)."'").','; $sql .= ' '.(!isset($this->deductible) ? 'NULL' : $this->deductible).','; $sql .= ' '.(!isset($this->active) ? 'NULL' : $this->active).','; @@ -126,8 +128,6 @@ class Cchargesociales $sql .= ' '.(!isset($this->fk_pays) ? 'NULL' : $this->fk_pays).','; $sql .= ' '.(!isset($this->module) ? 'NULL' : "'".$this->db->escape($this->module)."'").','; $sql .= ' '.(!isset($this->accountancy_code) ? 'NULL' : "'".$this->db->escape($this->accountancy_code)."'"); - - $sql .= ')'; $this->db->begin(); @@ -179,7 +179,7 @@ class Cchargesociales $sql = 'SELECT'; $sql .= " t.id,"; - $sql .= " t.libelle,"; + $sql .= " t.libelle as label,"; $sql .= " t.deductible,"; $sql .= " t.active,"; $sql .= " t.code,"; @@ -190,7 +190,7 @@ class Cchargesociales if (null !== $ref) { $sql .= " WHERE t.code = '".$this->db->escape($ref)."'"; } else { - $sql .= ' WHERE t.id = '.$id; + $sql .= ' WHERE t.id = '.((int) $id); } $resql = $this->db->query($sql); @@ -201,7 +201,8 @@ class Cchargesociales $this->id = $obj->id; - $this->libelle = $obj->libelle; + $this->libelle = $obj->label; + $this->label = $obj->label; $this->deductible = $obj->deductible; $this->active = $obj->active; $this->code = $obj->code; @@ -429,10 +430,11 @@ class Cchargesociales $link .= '>'; $linkend = ''; - if ($withpicto) - { + if ($withpicto) { $result .= ($link.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend); - if ($withpicto != 2) $result .= ' '; + if ($withpicto != 2) { + $result .= ' '; + } } $result .= $link.$this->ref.$linkend; return $result; @@ -462,30 +464,42 @@ class Cchargesociales // phpcs:enable global $langs; - if ($mode == 0) - { - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } elseif ($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'); + if ($mode == 0) { + if ($status == 1) { + return $langs->trans('Enabled'); + } elseif ($status == 0) { + return $langs->trans('Disabled'); + } + } elseif ($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'); + } } } @@ -501,6 +515,7 @@ class Cchargesociales $this->id = 0; $this->libelle = ''; + $this->label = ''; $this->deductible = ''; $this->active = ''; $this->code = ''; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index a281aeb2198..1977ac9791b 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2016-2020 Frédéric France * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -107,6 +108,11 @@ class ChargeSociales extends CommonObject */ public $fk_project; + /** + * @var int ID + */ + public $fk_user; + const STATUS_UNPAID = 0; const STATUS_PAID = 1; @@ -133,22 +139,23 @@ class ChargeSociales extends CommonObject { $sql = "SELECT cs.rowid, cs.date_ech"; $sql .= ", cs.libelle as label, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key"; - $sql .= ", cs.fk_account, cs.fk_mode_reglement"; - $sql .= ", c.libelle"; + $sql .= ", cs.fk_account, cs.fk_mode_reglement, cs.fk_user"; + $sql .= ", c.libelle as type_label"; $sql .= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_chargesociales as c ON cs.fk_type = c.id"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON cs.fk_mode_reglement = p.id'; $sql .= ' WHERE cs.entity IN ('.getEntity('tax').')'; - if ($ref) $sql .= " AND cs.rowid = ".$ref; - else $sql .= " AND cs.rowid = ".$id; + if ($ref) { + $sql .= " AND cs.ref = '".$this->db->escape($ref)."'"; + } else { + $sql .= " AND cs.rowid = ".((int) $id); + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -157,13 +164,14 @@ class ChargeSociales extends CommonObject $this->lib = $obj->label; $this->label = $obj->label; $this->type = $obj->fk_type; - $this->type_label = $obj->libelle; + $this->type_label = $obj->type_label; $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->amount = $obj->amount; $this->fk_project = $obj->fk_project; + $this->fk_user = $obj->fk_user; $this->paye = $obj->paye; $this->periode = $this->db->jdate($obj->periode); $this->import_key = $this->import_key; @@ -189,9 +197,8 @@ class ChargeSociales extends CommonObject { $newamount = price2num($this->amount, 'MT'); - // Validation parametres - if (!$newamount > 0 || empty($this->date_ech) || empty($this->periode)) - { + // Validation of parameters + if (!$newamount > 0 || empty($this->date_ech) || empty($this->periode)) { return false; } @@ -222,7 +229,7 @@ class ChargeSociales extends CommonObject $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, fk_account, fk_mode_reglement, libelle, date_ech, periode, amount, fk_projet, entity, fk_user_author, date_creation)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, fk_account, fk_mode_reglement, libelle, date_ech, periode, amount, fk_projet, entity, fk_user_author, fk_user, date_creation)"; $sql .= " VALUES (".$this->type; $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : "NULL"); @@ -233,6 +240,7 @@ class ChargeSociales extends CommonObject $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : 'NULL'); $sql .= ", ".$conf->entity; $sql .= ", ".$user->id; + $sql .= ", ".($this->fk_user > 0 ? $this->db->escape($this->fk_user) : 'NULL'); $sql .= ", '".$this->db->idate($now)."'"; $sql .= ")"; @@ -243,7 +251,9 @@ class ChargeSociales extends CommonObject //dol_syslog("ChargesSociales::create this->id=".$this->id); $result = $this->call_trigger('SOCIALCONTRIBUTION_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } if (empty($error)) { $this->db->commit(); @@ -278,47 +288,39 @@ class ChargeSociales extends CommonObject $lines_url = $account->get_url('', $this->id, 'sc'); // Delete bank urls - foreach ($lines_url as $line_url) - { - if (!$error) - { + foreach ($lines_url as $line_url) { + if (!$error) { $accountline = new AccountLine($this->db); $accountline->fetch($line_url['fk_bank']); $result = $accountline->delete_urls($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } } // Delete payments - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge WHERE fk_charge=".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales WHERE rowid=".$this->id; + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -346,32 +348,32 @@ class ChargeSociales extends CommonObject $sql .= ", periode='".$this->db->idate($this->periode)."'"; $sql .= ", amount='".price2num($this->amount, 'MT')."'"; $sql .= ", fk_projet=".($this->fk_project > 0 ? $this->db->escape($this->fk_project) : "NULL"); + $sql .= ", fk_user=".($this->fk_user > 0 ? $this->db->escape($this->fk_user) : "NULL"); $sql .= ", fk_user_modif=".$user->id; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { - $error++; $this->errors[] = "Error ".$this->db->lasterror(); + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('SOCIALCHARGES_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -403,10 +405,8 @@ class ChargeSociales extends CommonObject } $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->db->free($result); return $obj->amount; @@ -423,36 +423,70 @@ class ChargeSociales extends CommonObject /** * Tag social contribution as paid completely * - * @param User $user Object user making change - * @return int <0 if KO, >0 if OK + * @deprecated + * @see setPaid() + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK */ public function set_paid($user) { // phpcs:enable + dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE); + return $this->setPaid($user); + } + + /** + * Tag social contribution as paid completely + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setPaid($user) + { $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; $sql .= " paye = 1"; $sql .= " WHERE rowid = ".$this->id; $return = $this->db->query($sql); - if ($return) return 1; - else return -1; + if ($return) { + return 1; + } else { + return -1; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Remove tag paid on social contribution * - * @param User $user Object user making change - * @return int <0 if KO, >0 if OK + * @deprecated + * @see setUnpaid() + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK */ public function set_unpaid($user) { // phpcs:enable + dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); + return $this->setUnpaid($user); + } + + /** + * Remove tag paid on social contribution + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setUnpaid($user) + { $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; $sql .= " paye = 0"; $sql .= " WHERE rowid = ".$this->id; $return = $this->db->query($sql); - if ($return) return 1; - else return -1; + if ($return) { + return 1; + } else { + return -1; + } } /** @@ -488,21 +522,28 @@ class ChargeSociales extends CommonObject $this->labelStatus = array(); $this->labelStatusShort = array(); - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + 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'); - if ($status == self::STATUS_UNPAID && $alreadypaid > 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + if ($status == self::STATUS_UNPAID && $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('Paid'); - if ($status == self::STATUS_UNPAID && $alreadypaid > 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + if ($status == self::STATUS_UNPAID && $alreadypaid > 0) { + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + } } $statusType = 'status1'; - if ($status == 0 && $alreadypaid > 0) $statusType = 'status3'; - if ($status == 1) $statusType = 'status6'; + if ($status == 0 && $alreadypaid > 0) { + $statusType = 'status3'; + } + if ($status == 1) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -522,40 +563,50 @@ class ChargeSociales extends CommonObject { global $langs, $conf, $user, $form; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $url = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$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'; + if ($short) { + return $url; } - if (empty($this->ref)) $this->ref = $this->label; + 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'; + } + } + + if (empty($this->ref)) { + $this->ref = $this->label; + } $label = img_picto('', 'tax').''.$langs->trans("SocialContribution").''; if (isset($this->paye)) { $label .= ' '.$this->getLibStatut(5); } - if (!empty($this->ref)) + if (!empty($this->ref)) { $label .= '
    '.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->label)) + } + if (!empty($this->label)) { $label .= '
    '.$langs->trans('Label').': '.$this->label; - if (!empty($this->type_label)) + } + if (!empty($this->type_label)) { $label .= '
    '.$langs->trans('Type').': '.$this->type_label; + } $linkclose = ''; - if (empty($notooltip) && $user->rights->facture->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->facture->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("SocialContribution"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -568,8 +619,12 @@ class ChargeSociales extends CommonObject $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; return $result; @@ -595,7 +650,9 @@ class ChargeSociales extends CommonObject $amount = 0; $obj = $this->db->fetch_object($resql); - if ($obj) $amount = $obj->amount ? $obj->amount : 0; + if ($obj) { + $amount = $obj->amount ? $obj->amount : 0; + } $this->db->free($resql); return $amount; @@ -615,14 +672,12 @@ class ChargeSociales extends CommonObject $sql = "SELECT e.rowid, e.tms as datem, e.date_creation as datec, e.date_valid as datev, e.import_key,"; $sql .= " e.fk_user_author, e.fk_user_modif, e.fk_user_valid"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as e"; - $sql .= " WHERE e.rowid = ".$id; + $sql .= " WHERE e.rowid = ".((int) $id); dol_syslog(get_class($this)."::info", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; diff --git a/htdocs/compta/sociales/class/index.html b/htdocs/compta/sociales/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index ca46bdadfea..434078959b9 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -46,6 +46,11 @@ class PaymentSocialContribution extends CommonObject */ public $picto = 'payment'; + /** + * @var string Label + */ + public $label; + /** * @var int ID */ @@ -124,25 +129,39 @@ class PaymentSocialContribution extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); // Validate parametres - if (!$this->datepaye) - { + if (!$this->datepaye) { $this->error = 'ErrorBadValueForParameterCreatePaymentSocialContrib'; return -1; } // Clean parameters - 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_payment)) $this->num_payment = trim($this->num_payment); - 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; + 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_payment)) { + $this->num_payment = trim($this->num_payment); + } + 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; + } $totalamount = 0; - foreach ($this->amounts as $key => $value) // How payment is dispatch - { + foreach ($this->amounts as $key => $value) { // How payment is dispatch $newvalue = price2num($value, 'MT'); $this->amounts[$key] = $newvalue; $totalamount += $newvalue; @@ -150,13 +169,14 @@ class PaymentSocialContribution extends CommonObject $totalamount = price2num($totalamount); // Check parameters - if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + if ($totalamount == 0) { + return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + } $this->db->begin(); - if ($totalamount != 0) - { + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,"; $sql .= " fk_typepaiement, num_paiement, note, fk_user_creat, fk_bank)"; $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; @@ -166,21 +186,17 @@ class PaymentSocialContribution extends CommonObject $sql .= " 0)"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."paiementcharge"); // Insere tableau des montants / factures - foreach ($this->amounts as $key => $amount) - { + foreach ($this->amounts as $key => $amount) { $contribid = $key; - if (is_numeric($amount) && $amount <> 0) - { + if (is_numeric($amount) && $amount <> 0) { $amount = price2num($amount); // If we want to closed paid invoices - if ($closepaidcontrib) - { + if ($closepaidcontrib) { $contrib = new ChargeSociales($this->db); $contrib->fetch($contribid); $paiement = $contrib->getSommePaiement(); @@ -190,10 +206,11 @@ class PaymentSocialContribution extends CommonObject $deposits = 0; $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); $remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT'); - if ($remaintopay == 0) - { - $result = $contrib->set_paid($user); - } else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + if ($remaintopay == 0) { + $result = $contrib->setPaid($user); + } else { + dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + } } } } @@ -203,10 +220,11 @@ class PaymentSocialContribution extends CommonObject } $result = $this->call_trigger('PAYMENTSOCIALCONTRIBUTION_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if ($totalamount != 0 && !$error) - { + if ($totalamount != 0 && !$error) { $this->amount = $totalamount; $this->total = $totalamount; // deprecated $this->db->commit(); @@ -244,15 +262,13 @@ class PaymentSocialContribution extends CommonObject $sql .= ' b.fk_account'; $sql .= " FROM ".MAIN_DB_PREFIX."paiementcharge as t LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepaiement = pt.id"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); // TODO link on entity of tax; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -300,14 +316,30 @@ class PaymentSocialContribution extends CommonObject // Clean parameters - 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_payment)) $this->num_payment = trim($this->num_payment); - 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; + 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_payment)) { + $this->num_payment = trim($this->num_payment); + } + 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; + } @@ -330,19 +362,20 @@ class PaymentSocialContribution extends CommonObject $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -371,8 +404,7 @@ class PaymentSocialContribution extends CommonObject $this->db->begin(); - if ($this->bank_line > 0) - { + if ($this->bank_line > 0) { $accline = new AccountLine($this->db); $accline->fetch($this->bank_line); $result = $accline->delete(); @@ -382,21 +414,21 @@ class PaymentSocialContribution extends CommonObject } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -438,8 +470,7 @@ class PaymentSocialContribution extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $error++; } @@ -447,8 +478,7 @@ class PaymentSocialContribution extends CommonObject unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -505,15 +535,16 @@ class PaymentSocialContribution extends CommonObject $error = 0; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); $acc->fetch($accountid); $total = $this->total; - if ($mode == 'payment_sc') $total = -$total; + if ($mode == 'payment_sc') { + $total = -$total; + } // Insert payment into llx_bank $bank_line_id = $acc->addline( @@ -530,23 +561,21 @@ class PaymentSocialContribution extends CommonObject // Mise a jour fk_bank dans llx_paiement. // On connait ainsi le paiement qui a genere l'ecriture bancaire - if ($bank_line_id > 0) - { + if ($bank_line_id > 0) { $result = $this->update_fk_bank($bank_line_id); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } // Add link 'payment', 'payment_supplier', 'payment_sc' in bank_url between payment and bank transaction $url = ''; - if ($mode == 'payment_sc') $url = DOL_URL_ROOT.'/compta/payment_sc/card.php?id='; - if ($url) - { + if ($mode == 'payment_sc') { + $url = DOL_URL_ROOT.'/compta/payment_sc/card.php?id='; + } + if ($url) { $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } @@ -554,14 +583,33 @@ class PaymentSocialContribution extends CommonObject // Add link 'company' in bank_url between invoice and bank transaction (for each invoice concerned by payment) $linkaddedforthirdparty = array(); - foreach ($this->amounts as $key => $value) - { - if ($mode == 'payment_sc') - { + foreach ($this->amounts as $key => $value) { + if ($mode == 'payment_sc') { $socialcontrib = new ChargeSociales($this->db); $socialcontrib->fetch($key); $result = $acc->add_url_line($bank_line_id, $socialcontrib->id, DOL_URL_ROOT.'/compta/charges.php?id=', $socialcontrib->type_label.(($socialcontrib->lib && $socialcontrib->lib != $socialcontrib->type_label) ? ' ('.$socialcontrib->lib.')' : ''), 'sc'); - if ($result <= 0) dol_print_error($this->db); + if ($result <= 0) { + dol_print_error($this->db); + } + + if ($socialcontrib->fk_user) { + $fuser = new User($this->db); + $fuser->fetch($socialcontrib->fk_user); + + // Add link 'user' in bank_url between operation and bank transaction + $result = $acc->add_url_line( + $bank_line_id, + $socialcontrib->fk_user, + DOL_URL_ROOT . '/user/card.php?id=', + $fuser->getFullName($langs), + 'user' + ); + + if ($result <= 0) { + $this->error = $acc->error; + $error++; + } + } } } } else { @@ -570,8 +618,7 @@ class PaymentSocialContribution extends CommonObject } } - if (!$error) - { + if (!$error) { return 1; } else { return -1; @@ -589,12 +636,11 @@ class PaymentSocialContribution extends CommonObject public function update_fk_bank($id_bank) { // phpcs:enable - $sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { $this->error = $this->db->error(); @@ -679,30 +725,41 @@ class PaymentSocialContribution extends CommonObject $result = ''; - if (empty($this->ref)) $this->ref = $this->lib; + if (empty($this->ref)) { + $this->ref = $this->label; + } $label = img_picto('', $this->picto).' '.$langs->trans("SocialContributionPayment").''; $label .= '
    '.$langs->trans('Ref').': '.$this->ref; if (!empty($this->label)) { $labeltoshow = $this->label; $reg = array(); - if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) - { + if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant - if ($reg[1] == 'paiement') $reg[1] = 'Payment'; + if ($reg[1] == 'paiement') { + $reg[1] = 'Payment'; + } $labeltoshow = $langs->trans($reg[1]); } $label .= '
    '.$langs->trans('Label').': '.$labeltoshow; } - if ($this->datep) $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->datep, 'day'); + if ($this->datep) { + $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->datep, 'day'); + } if (!empty($this->id)) { $link = ''; $linkend = ''; - if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + if ($withpicto) { + $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + } } return $result; @@ -722,11 +779,9 @@ class PaymentSocialContribution extends CommonObject $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->bank_line; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $alreadydispatched = $obj->nb; } } else { @@ -734,8 +789,7 @@ class PaymentSocialContribution extends CommonObject return -1; } - if ($alreadydispatched) - { + if ($alreadydispatched) { return 1; } return 0; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 87ce284f953..3335174d86f 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -33,8 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -46,11 +45,6 @@ $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); - - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -62,29 +56,41 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new ChargeSociales($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $upload_dir = $conf->tax->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'tax'; +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); + /* * Actions */ -require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } @@ -93,14 +99,15 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) */ $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $title = $langs->trans("SocialContribution").' - '.$langs->trans("Documents"); $help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; llxHeader("", $title, $help_url); -if ($object->id) -{ +if ($object->id) { $alreadypayed = $object->getSommePaiement(); $head = tax_prepare_head($object); @@ -112,8 +119,7 @@ if ($object->id) $morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' : '; if (!empty($object->fk_project)) { @@ -140,8 +146,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index 71e49486888..eefd667b964 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -25,8 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -37,24 +36,29 @@ $langs->loadLangs(array('compta', 'bills')); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); +$object = new ChargeSociales($db); +if ($id > 0) { + $object->fetch($id); +} + // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); - -$object = new ChargeSociales($db); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); /* * Actions */ -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } @@ -64,7 +68,9 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $title = $langs->trans("SocialContribution").' - '.$langs->trans("Info"); $help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; @@ -82,8 +88,7 @@ $morehtmlref = '
    '; $morehtmlref .= $form->editfieldkey("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'lib', $object->label, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' : '; if (!empty($object->fk_project)) { diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 746a8480453..2b0c3961759 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -5,7 +5,8 @@ * Copyright (C) 2016 Frédéric France * Copyright (C) 2020 Pierre Ardoin * Copyright (C) 2020 Tobias Sekan - + * Copyright (C) 2021 Gauthier VERDOL + * * 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 @@ -27,20 +28,17 @@ */ require '../../main.inc.php'; - -// Security check -$socid = isset($_GET["socid"]) ? $_GET["socid"] : ''; -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.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('compta', 'banks', 'bills')); +$langs->loadLangs(array('compta', 'banks', 'bills', 'hrm')); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -56,32 +54,41 @@ $search_day_lim = GETPOST('search_day_lim', 'int'); $search_month_lim = GETPOST('search_month_lim', 'int'); $search_year_lim = GETPOST('search_year_lim', 'int'); $search_project_ref = GETPOST('search_project_ref', 'alpha'); -$search_project = GETPOST('search_project', 'alpha'); +$search_project = GETPOST('search_project', 'alpha'); +$search_users = GETPOST('search_users'); +$search_type = GETPOST('search_type', 'int'); +$search_account = GETPOST('search_account', 'int'); $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 (!$sortfield) $sortfield = "cs.date_ech"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "cs.date_ech"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $year = GETPOST("year", 'int'); $filtre = GETPOST("filtre", 'int'); -if (!GETPOSTISSET('search_typeid')) -{ +if (!GETPOSTISSET('search_typeid')) { $newfiltre = str_replace('filtre=', '', $filtre); $filterarray = explode('-', $newfiltre); - foreach ($filterarray as $val) - { + foreach ($filterarray as $val) { $part = explode(':', $val); - if ($part[0] == 'cs.fk_type') $search_typeid = $part[1]; + if ($part[0] == 'cs.fk_type') { + $search_typeid = $part[1]; + } } } else { $search_typeid = GETPOST('search_typeid', 'int'); @@ -91,25 +98,42 @@ $arrayfields = array( 'cs.rowid' =>array('label'=>"Ref", 'checked'=>1, 'position'=>10), 'cs.libelle' =>array('label'=>"Label", 'checked'=>1, 'position'=>20), 'cs.fk_type' =>array('label'=>"Type", 'checked'=>1, 'position'=>30), - 'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>40, 'enable'=>(!empty($conf->projet->enabled))), - 'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>50), - 'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>60), - 'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70), - 'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>80), + 'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>40), + 'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50), + 'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->projet->enabled))), + 'cs.fk_user' =>array('label'=>"Employee", 'checked'=>1, 'position'=>70), + 'cs.fk_mode_reglement' =>array('checked'=>-1, 'position'=>80, 'label'=>"DefaultPaymentMode"), + 'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>100), + 'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>110), ); + +if (!empty($conf->banque->enabled)) { + $arrayfields['cs.fk_account'] = array('checked'=>-1, 'position'=>90, 'label'=>"DefaultBankAccount"); +} + $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('sclist')); $object = new ChargeSociales($db); +// Security check +$socid = GETPOST("socid", 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges'); + + /* * 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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { @@ -128,6 +152,9 @@ if (empty($reshook)) { $search_month_lim = ''; $search_project_ref = ''; $search_project = ''; + $search_users = ''; + $search_type = ''; + $search_account = ''; $search_array_options = array(); } } @@ -138,33 +165,64 @@ if (empty($reshook)) { $form = new Form($db); $formother = new FormOther($db); +$bankstatic = new Account($db); $formsocialcontrib = new FormSocialContrib($db); $chargesociale_static = new ChargeSociales($db); -if (!empty($conf->projet->enabled)) $projectstatic = new Project($db); +if (!empty($conf->projet->enabled)) { + $projectstatic = new Project($db); +} llxHeader('', $langs->trans("SocialContributions")); -$sql = "SELECT cs.rowid, cs.fk_type as type, "; -$sql .= " cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode,"; -if (!empty($conf->projet->enabled)) $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,"; -$sql .= " c.libelle as type_label,"; -$sql .= " SUM(pc.amount) as alreadypayed"; +$sql = "SELECT cs.rowid, cs.fk_type as type, cs.fk_user,"; +$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode,"; +if (!empty($conf->projet->enabled)) { + $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,"; +} +$sql .= " c.libelle as type_label, cs.fk_account,"; +$sql .= " ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,"; +$sql .= " SUM(pc.amount) as alreadypayed, pay.code as payment_code"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql .= " ".MAIN_DB_PREFIX."chargesociales as cs"; -if (!empty($conf->projet->enabled)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cs.fk_projet"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON (cs.fk_account = ba.rowid)"; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pay ON (cs.fk_mode_reglement = pay.id)'; +if (!empty($conf->projet->enabled)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cs.fk_projet"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON (cs.fk_user = u.rowid)"; $sql .= " WHERE cs.fk_type = c.id"; $sql .= " AND cs.entity = ".$conf->entity; // Search criteria -if ($search_ref) $sql .= " AND cs.rowid=".$db->escape($search_ref); -if ($search_label) $sql .= natural_search("cs.libelle", $search_label); -if (!empty($conf->projet->enabled)) if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_ref); -if ($search_amount) $sql .= natural_search("cs.amount", $search_amount, 1); -if ($search_status != '' && $search_status >= 0) $sql .= " AND cs.paye = ".$db->escape($search_status); +if ($search_ref) { + $sql .= " AND cs.ref = '".$db->escape($search_ref)."'"; +} +if ($search_label) { + $sql .= natural_search("cs.libelle", $search_label); +} +if (!empty($conf->projet->enabled)) { + if ($search_project_ref != '') { + $sql .= natural_search("p.ref", $search_project_ref); + } +} +if (!empty($search_users)) { + $sql .= ' AND cs.fk_user IN('.implode(', ', $search_users).')'; +} +if (!empty($search_type) && $search_type > 0) { + $sql .= ' AND cs.fk_mode_reglement='.$search_type; +} +if (!empty($search_account) && $search_account > 0) { + $sql .= ' AND cs.fk_account='.$search_account; +} +if ($search_amount) { + $sql .= natural_search("cs.amount", $search_amount, 1); +} +if ($search_status != '' && $search_status >= 0) { + $sql .= " AND cs.paye = ".$db->escape($search_status); +} $sql .= dolSqlDateFilter("cs.periode", $search_day_lim, $search_month_lim, $search_year_lim); //$sql.= dolSqlDateFilter("cs.periode", 0, 0, $year); -if ($year > 0) -{ +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 @@ -172,28 +230,24 @@ if ($year > 0) $sql .= "OR (cs.periode IS NULL AND date_format(cs.date_ech, '%Y') = '".$db->escape($year)."')"; $sql .= ")"; } -if ($filtre) { - $filtre = str_replace(":", "=", $filtre); - $sql .= " AND ".$filtre; -} if ($search_typeid) { $sql .= " AND cs.fk_type=".$db->escape($search_typeid); } -$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle"; -if (!empty($conf->projet->enabled)) $sql .= ", p.rowid, p.ref, p.title"; +$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle, cs.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code, u.lastname"; +if (!empty($conf->projet->enabled)) { + $sql .= ", p.rowid, p.ref, p.title"; +} $sql .= $db->order($sortfield, $sortorder); $totalnboflines = 0; $result = $db->query($sql); -if ($result) -{ +if ($result) { $totalnboflines = $db->num_rows($result); } $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if (!$resql) -{ +if (!$resql) { dol_print_error($db); llxFooter(); $db->close(); @@ -204,24 +258,54 @@ $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 ($search_ref) $param .= '&search_ref='.urlencode($search_ref); -if ($search_label) $param .= '&search_label='.urlencode($search_label); -if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref); -if ($search_amount) $param .= '&search_amount='.urlencode($search_amount); -if ($search_typeid) $param .= '&search_typeid='.urlencode($search_typeid); -if ($search_status != '' && $search_status != '-1') $param .= '&search_status='.urlencode($search_status); -if ($year) $param .= '&year='.urlencode($year); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +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_project_ref >= 0) { + $param .= "&search_project_ref=".urlencode($search_project_ref); +} +if ($search_amount) { + $param .= '&search_amount='.urlencode($search_amount); +} +if ($search_typeid) { + $param .= '&search_typeid='.urlencode($search_typeid); +} +if ($search_users) { + foreach ($search_users as $id_user) { + $param .= '&search_users[]='.urlencode($id_user); + } +} +if ($search_type) { + $param .= '&search_type='.urlencode($search_type); +} +if ($search_account) { + $param .= '&search_account='.$search_account; +} +if ($search_status != '' && $search_status != '-1') { + $param .= '&search_status='.urlencode($search_status); +} +if ($year) { + $param .= '&year='.urlencode($year); +} $newcardbutton = ''; -if ($user->rights->tax->charges->creer) -{ +if ($user->rights->tax->charges->creer) { $newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewSocialContribution'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/sociales/card.php?action=create'); } print '
    '; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -231,8 +315,7 @@ print ''; print ''; $center = ''; -if ($year) -{ +if ($year) { $center = ''.img_previous().''; $center .= ' '.$langs->trans("Year").' '.$year; $center .= ' '.img_next().''; @@ -240,8 +323,7 @@ if ($year) print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); -if (empty($mysoc->country_id) && empty($mysoc->country_code)) -{ +if (empty($mysoc->country_id) && empty($mysoc->country_code)) { print '
    '; $langs->load("errors"); $countrynotdefined = $langs->trans("ErrorSetACountryFirst"); @@ -255,7 +337,9 @@ if (empty($mysoc->country_id) && empty($mysoc->country_code)) $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); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '
    '; print '
    '.dol_print_date($db->jdate($objp->dp), 'day')."".$labeltype.' '.$objp->num_payment."'; - if ($bankaccountstatic->id) + if ($bankaccountstatic->id) { print $bankaccountstatic->getNomUrl(1, 'transactions'); + } print ''.price($objp->amount)."'.price($objp->amount)."
    '."\n"; @@ -270,7 +354,7 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { // Filter: Ref if (!empty($arrayfields['cs.rowid']['checked'])) { - print ''; } @@ -284,15 +368,8 @@ if (!empty($arrayfields['cs.rowid']['checked'])) { // Filter: Type if (!empty($arrayfields['cs.fk_type']['checked'])) { - print ''; -} - -// Filter: Project ref -if (!empty($arrayfields['p.ref']['checked'])) { print ''; } @@ -305,12 +382,41 @@ if (!empty($arrayfields['cs.date_ech']['checked'])) { // Filter: Period end date if (!empty($arrayfields['cs.periode']['checked'])) { print ''; } +// Filter: Project ref +if (!empty($arrayfields['p.ref']['checked'])) { + print ''; +} + +if (!empty($arrayfields['cs.fk_user']['checked'])) { + // Employee + print ''; +} + +// Filter: Bank Account +if (!empty($arrayfields['cs.fk_account']['checked'])) { + print ''; +} + // Filter: Amount if (!empty($arrayfields['cs.amount']['checked'])) { 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['cs.rowid']['checked'])) print_liste_field_titre($arrayfields['cs.rowid']['label'], $_SERVER["PHP_SELF"], "cs.rowid", '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['cs.libelle']['checked'])) print_liste_field_titre($arrayfields['cs.libelle']['label'], $_SERVER["PHP_SELF"], "cs.libelle", '', $param, 'class="left"', $sortfield, $sortorder); -if (!empty($arrayfields['cs.fk_type']['checked'])) print_liste_field_titre($arrayfields['cs.fk_type']['label'], $_SERVER["PHP_SELF"], "cs.fk_type", '', $param, 'class="left"', $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['cs.date_ech']['checked'])) print_liste_field_titre($arrayfields['cs.date_ech']['label'], $_SERVER["PHP_SELF"], "cs.date_ech", '', $param, 'align="center"', $sortfield, $sortorder); -if (!empty($arrayfields['cs.periode']['checked'])) print_liste_field_titre($arrayfields['cs.periode']['label'], $_SERVER["PHP_SELF"], "cs.periode", '', $param, 'align="center"', $sortfield, $sortorder); -if (!empty($arrayfields['cs.amount']['checked'])) print_liste_field_titre($arrayfields['cs.amount']['label'], $_SERVER["PHP_SELF"], "cs.amount", '', $param, 'class="right"', $sortfield, $sortorder); -if (!empty($arrayfields['cs.paye']['checked'])) print_liste_field_titre($arrayfields['cs.paye']['label'], $_SERVER["PHP_SELF"], "cs.paye", '', $param, 'class="right"', $sortfield, $sortorder); +if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.rowid']['checked'])) { + print_liste_field_titre($arrayfields['cs.rowid']['label'], $_SERVER["PHP_SELF"], "cs.rowid", '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.libelle']['checked'])) { + print_liste_field_titre($arrayfields['cs.libelle']['label'], $_SERVER["PHP_SELF"], "cs.libelle", '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.fk_type']['checked'])) { + print_liste_field_titre($arrayfields['cs.fk_type']['label'], $_SERVER["PHP_SELF"], "cs.fk_type", '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.date_ech']['checked'])) { + print_liste_field_titre($arrayfields['cs.date_ech']['label'], $_SERVER["PHP_SELF"], "cs.date_ech", '', $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['cs.periode']['checked'])) { + print_liste_field_titre($arrayfields['cs.periode']['label'], $_SERVER["PHP_SELF"], "cs.periode", '', $param, '', $sortfield, $sortorder, 'center '); +} +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['cs.fk_user']['checked'])) { + print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname", "", $param, 'class="left"', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { + print_liste_field_titre($arrayfields['cs.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "cs.fk_mode_reglement", '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.fk_account']['checked'])) { + print_liste_field_titre($arrayfields['cs.fk_account']['label'], $_SERVER["PHP_SELF"], "cs.fk_account", '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.amount']['checked'])) { + print_liste_field_titre($arrayfields['cs.amount']['label'], $_SERVER["PHP_SELF"], "cs.amount", '', $param, 'class="right"', $sortfield, $sortorder); +} +if (!empty($arrayfields['cs.paye']['checked'])) { + print_liste_field_titre($arrayfields['cs.paye']['label'], $_SERVER["PHP_SELF"], "cs.paye", '', $param, 'class="right"', $sortfield, $sortorder); +} // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); @@ -358,14 +491,13 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $ print ''; $i = 0; -$totalarray = array(); -while ($i < min($num, $limit)) -{ + $totalarray = $TLoadedUsers = array(); +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $chargesociale_static->id = $obj->rowid; $chargesociale_static->ref = $obj->rowid; - $chargesociale_static->label = $obj->libelle; + $chargesociale_static->label = $obj->label; $chargesociale_static->type_label = $obj->type_label; if (!empty($conf->projet->enabled)) { $projectstatic->id = $obj->project_id; @@ -378,25 +510,55 @@ while ($i < min($num, $limit)) // Line number if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref if (!empty($arrayfields['cs.rowid']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label if (!empty($arrayfields['cs.libelle']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Type if (!empty($arrayfields['cs.fk_type']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Date + if (!empty($arrayfields['cs.date_ech']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Date end period + if (!empty($arrayfields['cs.periode']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Project ref @@ -406,22 +568,58 @@ while ($i < min($num, $limit)) print $projectstatic->getNomUrl(1); } print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - // Date - if (!empty($arrayfields['cs.date_ech']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['cs.fk_user']['checked'])) { + // Employee + print "\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - // Date end period - if (!empty($arrayfields['cs.periode']['checked'])) { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + + // Account + if (!empty($arrayfields['cs.fk_account']['checked'])) { + print ''; if (!$i) $totalarray['nbfield']++; @@ -429,21 +627,29 @@ while ($i < min($num, $limit)) // Amount if (!empty($arrayfields['cs.amount']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + } $totalarray['val']['totalttcfield'] += $obj->amount; } // Status if (!empty($arrayfields['cs.paye']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Buttons print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ''; $i++; diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 7432702bb34..b2ee4ffce5e 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -6,6 +6,7 @@ * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2021 Gauthier VERDOL * * 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,25 +30,21 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php'; -require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php'; - $hookmanager = new HookManager($db); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('specialexpensesindex')); // Load translation files required by the page -$langs->loadLangs(array('compta', 'bills')); - -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|'); +$langs->loadLangs(array('compta', 'bills', 'hrm')); $year = GETPOST("year", 'int'); $search_sc_type = GETPOST('search_sc_type', 'int'); @@ -56,17 +53,24 @@ $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 < 0) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = "cs.date_ech"; -if (!$sortorder) $sortorder = "DESC"; - -if (empty($conf->tax->enabled) || empty($user->rights->tax->charges->lire)) -{ - accessforbidden(); +if (!$sortfield) { + $sortfield = "cs.date_ech"; } +if (!$sortorder) { + $sortorder = "DESC"; +} + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges'); /* @@ -74,8 +78,7 @@ if (empty($conf->tax->enabled) || empty($user->rights->tax->charges->lire)) */ // 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 -{ +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_sc_type = ''; //$toselect = ''; //$search_array_options = array(); @@ -89,26 +92,43 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $tva_static = new Tva($db); $socialcontrib = new ChargeSociales($db); $payment_sc_static = new PaymentSocialContribution($db); -$sal_static = new PaymentSalary($db); +$userstatic = new User($db); +$sal_static = new Salary($db); $accountstatic = new Account($db); +$accountlinestatic = new AccountLine($db); $formsocialcontrib = new FormSocialContrib($db); $title = $langs->trans("SocialContributionsPayments"); +$help_url = ''; -llxHeader('', $title); +llxHeader('', $title, $help_url); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -if ($sortfield) $param .= '&sortfield='.urlencode($sortfield); -if ($sortorder) $param .= '&sortorder='.urlencode($sortorder); -if ($year) $param .= '&year='.urlencode($year); -if ($search_sc_type) $param .= '&search_sc_type='.urlencode($search_sc_type); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($sortfield) { + $param .= '&sortfield='.urlencode($sortfield); +} +if ($sortorder) { + $param .= '&sortorder='.urlencode($sortorder); +} +if ($year) { + $param .= '&year='.urlencode($year); +} +if ($search_sc_type) { + $param .= '&search_sc_type='.urlencode($search_sc_type); +} $num = 0; print ''; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -119,13 +139,15 @@ $sql = "SELECT c.id, c.libelle as label,"; $sql .= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,"; $sql .= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment, pc.fk_bank,"; $sql .= " pct.code as payment_code,"; -$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel"; +$sql .= " u.rowid uid, u.lastname, u.firstname, u.email, u.login, u.admin,"; +$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql .= " ".MAIN_DB_PREFIX."chargesociales as cs"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid"; +$sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.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."user as u ON u.rowid = cs.fk_user"; $sql .= " WHERE cs.fk_type = c.id"; $sql .= " AND cs.entity IN (".getEntity("tax").")"; if ($search_sc_type > 0) { @@ -139,7 +161,12 @@ if ($year > 0) { $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= ")"; } -if (preg_match('/^cs\./', $sortfield) || preg_match('/^c\./', $sortfield) || preg_match('/^pc\./', $sortfield) || preg_match('/^pct\./', $sortfield)) { +if (preg_match('/^cs\./', $sortfield) + || preg_match('/^c\./', $sortfield) + || preg_match('/^pc\./', $sortfield) + || preg_match('/^pct\./', $sortfield) + || preg_match('/^u\./', $sortfield) + || preg_match('/^ba\./', $sortfield)) { $sql .= $db->order($sortfield, $sortorder); } @@ -157,7 +184,9 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); if (!$resql) { @@ -185,7 +214,12 @@ print ''; print ''; print ''; print ''; -if (!empty($conf->banque->enabled)) print ''; +print ''; +print ''; +if (!empty($conf->banque->enabled)) { + print ''; + print ''; +} print ''; print ''; print "\n"; print ''; -print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder); -print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("SocialContribution", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.periode", "", $param, 'width="140px"', $sortfield, $sortorder); print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $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("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "pc.num_paiement", "", $param, '', $sortfield, $sortorder, '', 'ChequeOrTransferNumber'); +if (!empty($conf->banque->enabled)) { + print_liste_field_titre("BankTransactionLine", $_SERVER["PHP_SELF"], "pc.fk_bank", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); +} +print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre(''); print "\n"; -if (!$resql) -{ +if (!$resql) { dol_print_error($db); exit; } @@ -220,51 +258,89 @@ $totalpaye = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); print ''; - // Date - $date = $obj->periode; - if (empty($date)) $date = $obj->date_ech; - print ''; - // Label - print ''; - // Type - print ''; - // Expected to pay - print ''; // Ref payment $payment_sc_static->id = $obj->pid; $payment_sc_static->ref = $obj->pid; print '\n"; + // Label + print ''; + // Type + print ''; + // Date + $date = $obj->periode; + if (empty($date)) { + $date = $obj->date_ech; + } + print ''; // Date payment print ''; + + // Employee + print "\n"; + } + // Type payment - print ''; + $labelpayment = ''; + if ($obj->payment_code) { + $labelpayment = $langs->trans("PaymentTypeShort".$obj->payment_code); + } + print ''; + + print ''; + // Account - if (!empty($conf->banque->enabled)) - { - print ''; + + print ''; } + + // Expected to pay + print ''; + // Paid print ''; print ''; @@ -283,7 +359,12 @@ print ''; // A total here has no sense print ''; print ''; print ''; -if (!empty($conf->banque->enabled)) print ''; +print ''; +print ''; +if (!empty($conf->banque->enabled)) { + print ''; + print ''; +} print '"; print ''; print ""; diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index ee859965552..d65bed019fc 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -43,45 +43,56 @@ $modecompta = (GETPOST('modecompta', 'alpha') ? GETPOST('modecompta', 'alpha') : // Date range $year = GETPOST("year", 'int'); $month = GETPOST("month", 'int'); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q", "int"); - if (empty($q)) - { + if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $date_start = dol_get_first_day($year_start, $month_start, false); + $date_end = dol_get_last_day($year_end, $month_end, false); } 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } + 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); + } + if ($q == 4) { + $date_start = dol_get_first_day($year_start, 10, false); + $date_end = dol_get_last_day($year_start, 12, false); + } } } @@ -92,20 +103,30 @@ $tmpe = dol_getdate($date_end); $year_end = $tmpe['year']; $tmp_date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; -if ($tmp_date_end < $date_end || $date_end < $date_start) $date_end = $tmp_date_end; +if ($tmp_date_end < $date_end || $date_end < $date_start) { + $date_end = $tmp_date_end; +} $min = price2num(GETPOST("min", "alpha")); -if (empty($min)) $min = 0; +if (empty($min)) { + $min = 0; +} // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products -$modetax = $conf->global->TAX_MODE; -if (GETPOSTISSET("modetax")) $modetax = GETPOST("modetax", 'int'); -if (empty($modetax)) $modetax = 0; +$modetax = empty($conf->global->TAX_MODE) ? 0 : $conf->global->TAX_MODE; +if (GETPOSTISSET("modetax")) { + $modetax = GETPOST("modetax", 'int'); +} +if (empty($modetax)) { + $modetax = 0; +} // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'tax', '', '', 'charges'); @@ -126,9 +147,10 @@ $paymentexpensereport_static = new PaymentExpenseReport($db); $morequerystring = ''; $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday'); -foreach ($listofparams as $param) -{ - if (GETPOST($param) != '') $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); +foreach ($listofparams as $param) { + if (GETPOST($param) != '') { + $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); + } } llxHeader('', $langs->trans("TurnoverReport"), '', '', 0, 0, '', '', $morequerystring); @@ -146,35 +168,57 @@ $fsearch .= ' '; // Show report header $name = $langs->trans("xxx"); $calcmode = ''; -if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); -if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); -if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); +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').')'; // 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; +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$prevyear = $year_start; +$prevquarter = $q; if ($prevquarter > 1) { $prevquarter--; } else { - $prevquarter = 4; $prevyear--; + $prevquarter = 4; + $prevyear--; } -$nextyear = $year_start; $nextquarter = $q; +$nextyear = $year_start; +$nextquarter = $q; if ($nextquarter < 4) { $nextquarter++; } else { - $nextquarter = 1; $nextyear++; + $nextquarter = 1; + $nextyear++; } $description .= $fsearch; $builddate = dol_now(); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description .= $langs->trans("RulesVATDueProducts"); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description .= $langs->trans("RulesVATInProducts"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description .= '
    '.$langs->trans("RulesVATDueServices"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description .= '
    '.$langs->trans("RulesVATInServices"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') { + $description .= $langs->trans("RulesVATDueProducts"); +} +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') { + $description .= $langs->trans("RulesVATInProducts"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') { + $description .= '
    '.$langs->trans("RulesVATDueServices"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + $description .= '
    '.$langs->trans("RulesVATInServices"); +} if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= '
    '.$langs->trans("DepositsAreNotIncluded"); } -if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { + $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +} // Customers invoices $elementcust = $langs->trans("CustomersInvoices"); @@ -190,8 +234,12 @@ $namesup = $namecust; // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header if ($modecompta == "CREANCES-DETTES") { @@ -207,8 +255,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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -217,21 +264,23 @@ if ($modecompta == "CREANCES-DETTES") { $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} elseif ($modecompta == "BOOKKEEPING") -{ -} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") -{ +} elseif ($modecompta == "BOOKKEEPING") { +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { +} +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().' '.img_next().''; +} else { + $periodlink = ''; } -$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().' '.img_next().''; -else $periodlink = ''; $description .= ' '; report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -244,12 +293,15 @@ if ($modecompta == 'CREANCES-DETTES') { $i = 0; while ($i < 12) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } print '
    '; $i++; } print ''; + // Sales invoices $sql = "SELECT fd.tva_tx AS vatrate,"; $sql .= " fd.product_type AS product_type,"; $sql .= " cc.code, cc.label AS country,"; @@ -273,7 +325,6 @@ if ($modecompta == 'CREANCES-DETTES') { $sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label, cc.code "; $sql .= " ORDER BY country, product_type, vatrate"; - dol_syslog("htdocs/compta/tva/index.php sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -292,7 +343,9 @@ if ($modecompta == 'CREANCES-DETTES') { print ''; for ($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); print ''; $totalpermonth[$j] = (empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j]) + $obj->$monthj; @@ -309,7 +362,9 @@ if ($modecompta == 'CREANCES-DETTES') { print ''; for ($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); print ''; } @@ -319,20 +374,21 @@ if ($modecompta == 'CREANCES-DETTES') { print $db->lasterror(); // Show last sql error } - print ''; print ''; print ''; $i = 0; - while ($i < 12) - { + while ($i < 12) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } print ''; $i++; } print ''; + // Purchase invoices $sql2 = "SELECT ffd.tva_tx AS vatrate,"; $sql2 .= " ffd.product_type AS product_type,"; $sql2 .= " cc.code, cc.label AS country,"; @@ -374,7 +430,9 @@ if ($modecompta == 'CREANCES-DETTES') { print ''; for ($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); print ''; $totalpermonth[$j] = (empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j]) + $obj->$monthj; @@ -391,7 +449,9 @@ if ($modecompta == 'CREANCES-DETTES') { print ''; for ($i = 0; $i < 12; $i++) { $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); - if ($j > 12) $j -= 12; + if ($j > 12) { + $j -= 12; + } $monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); print ''; } diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 485a6088338..d48a931ca2c 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -36,18 +36,30 @@ $langs->loadLangs(array("products", "categories", "errors", 'accountancy')); // Security pack (data & check) $socid = GETPOST('socid', 'int'); -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'); +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'); +} // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta"); +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta"); +} -$sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; -$sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; -if (!$sortorder) $sortorder = "asc"; -if (!$sortfield) $sortfield = "ref"; +$sortorder = GETPOST("sortorder", 'aZ09'); +$sortfield = GETPOST("sortfield", 'aZ09'); +if (!$sortorder) { + $sortorder = "asc"; +} +if (!$sortfield) { + $sortfield = "ref"; +} // Category $selected_cat = (int) GETPOST('search_categ', 'int'); @@ -60,7 +72,9 @@ $categorie = new Categorie($db); // product/service $selected_type = GETPOST('search_type', 'int'); -if ($selected_type == '') $selected_type = -1; +if ($selected_type == '') { + $selected_type = -1; +} // Hook $hookmanager->initHooks(array('cabyprodservlist')); @@ -74,45 +88,56 @@ $date_startday = GETPOST("date_startday"); $date_endyear = GETPOST("date_endyear"); $date_endmonth = GETPOST("date_endmonth"); $date_endday = GETPOST("date_endday"); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q", "int"); - if (empty($q)) - { + if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $date_start = dol_get_first_day($year_start, $month_start, false); + $date_end = dol_get_last_day($year_end, $month_end, false); } 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } + 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); + } + if ($q == 4) { + $date_start = dol_get_first_day($year_start, 10, false); + $date_end = dol_get_last_day($year_start, 12, false); + } } } else { // TODO We define q @@ -126,25 +151,53 @@ $year_end = $tmpe['year']; $nbofyear = ($year_end - $year_start) + 1; $commonparams = array(); -if (!empty($modecompta)) $commonparams['modecompta'] = $modecompta; -if (!empty($sortorder)) $commonparams['sortorder'] = $sortorder; -if (!empty($sortfield)) $commonparams['sortfield'] = $sortfield; +if (!empty($modecompta)) { + $commonparams['modecompta'] = $modecompta; +} +if (!empty($sortorder)) { + $commonparams['sortorder'] = $sortorder; +} +if (!empty($sortfield)) { + $commonparams['sortfield'] = $sortfield; +} $headerparams = array(); -if (!empty($date_startyear)) $headerparams['date_startyear'] = $date_startyear; -if (!empty($date_startmonth)) $headerparams['date_startmonth'] = $date_startmonth; -if (!empty($date_startday)) $headerparams['date_startday'] = $date_startday; -if (!empty($date_endyear)) $headerparams['date_endyear'] = $date_endyear; -if (!empty($date_endmonth)) $headerparams['date_endmonth'] = $date_endmonth; -if (!empty($date_endday)) $headerparams['date_endday'] = $date_endday; -if (!empty($year)) $headerparams['year'] = $year; -if (!empty($month)) $headerparams['month'] = $month; +if (!empty($date_startyear)) { + $headerparams['date_startyear'] = $date_startyear; +} +if (!empty($date_startmonth)) { + $headerparams['date_startmonth'] = $date_startmonth; +} +if (!empty($date_startday)) { + $headerparams['date_startday'] = $date_startday; +} +if (!empty($date_endyear)) { + $headerparams['date_endyear'] = $date_endyear; +} +if (!empty($date_endmonth)) { + $headerparams['date_endmonth'] = $date_endmonth; +} +if (!empty($date_endday)) { + $headerparams['date_endday'] = $date_endday; +} +if (!empty($year)) { + $headerparams['year'] = $year; +} +if (!empty($month)) { + $headerparams['month'] = $month; +} $headerparams['q'] = $q; $tableparams = array(); -if (!empty($selected_cat)) $tableparams['search_categ'] = $selected_cat; -if (!empty($selected_soc)) $tableparams['search_soc'] = $selected_soc; -if (!empty($selected_type)) $tableparams['search_type'] = $selected_type; +if (!empty($selected_cat)) { + $tableparams['search_categ'] = $selected_cat; +} +if (!empty($selected_soc)) { + $tableparams['search_soc'] = $selected_soc; +} +if (!empty($selected_type)) { + $tableparams['search_type'] = $selected_type; +} $tableparams['subcat'] = ($subcat === true) ? 'yes' : ''; // Adding common parameters @@ -167,8 +220,12 @@ $form = new Form($db); $formother = new FormOther($db); // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header if ($modecompta == "CREANCES-DETTES") { @@ -184,8 +241,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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -194,20 +250,22 @@ if ($modecompta == "CREANCES-DETTES") { $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} elseif ($modecompta == "BOOKKEEPING") -{ -} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") -{ +} elseif ($modecompta == "BOOKKEEPING") { +} 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); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().''.img_next().''; -else $periodlink = ''; +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().''.img_next().''; +} else { + $periodlink = ''; +} report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -220,13 +278,19 @@ $catotal = 0; $catotal_ht = 0; $qtytotal = 0; -if ($modecompta == 'CREANCES-DETTES') -{ +if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label, p.fk_product_type as product_type,"; $sql .= " SUM(l.total_ht) as amount, SUM(l.total_ttc) as amount_ttc,"; $sql .= " SUM(CASE WHEN f.type = 2 THEN -l.qty ELSE l.qty END) as qty"; + + $parameters = array(); + $hookmanager->executeHooks('printFieldListSelect', $parameters); + $sql .= $hookmanager->resPrint; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - if ($selected_soc > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc ON (soc.rowid = f.fk_soc)"; + if ($selected_soc > 0) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc ON (soc.rowid = f.fk_soc)"; + } $sql .= ",".MAIN_DB_PREFIX."facturedet as l"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid"; if ($selected_cat === -2) { // Without any category @@ -234,6 +298,11 @@ if ($modecompta == 'CREANCES-DETTES') } elseif ($selected_cat) { // Into a specific category $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } + + $parameters = array(); + $hookmanager->executeHooks('printFieldListFrom', $parameters); + $sql .= $hookmanager->resPrint; + $sql .= " WHERE l.fk_facture = f.rowid"; $sql .= " AND f.fk_statut in (1,2)"; $sql .= " AND l.product_type in (0,1)"; @@ -245,9 +314,8 @@ if ($modecompta == 'CREANCES-DETTES') if ($date_start && $date_end) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_type >= 0) - { - $sql .= " AND l.product_type = ".$selected_type; + if ($selected_type >= 0) { + $sql .= " AND l.product_type = ".((int) $selected_type); } if ($selected_cat === -2) { // Without any category $sql .= " AND cp.fk_product is null"; @@ -256,21 +324,32 @@ if ($modecompta == 'CREANCES-DETTES') $TListOfCats = $categorie->get_full_arbo('product', $selected_cat, 1); $listofcatsql = ""; - foreach ($TListOfCats as $key => $cat) - { - if ($key !== 0) $listofcatsql .= ","; + foreach ($TListOfCats as $key => $cat) { + if ($key !== 0) { + $listofcatsql .= ","; + } $listofcatsql .= $cat['rowid']; } } $sql .= " AND (p.rowid IN "; $sql .= " (SELECT fk_product FROM ".MAIN_DB_PREFIX."categorie_product cp WHERE "; - if ($subcat) $sql .= "cp.fk_categorie IN (".$listofcatsql.")"; - else $sql .= "cp.fk_categorie = ".$selected_cat; + if ($subcat) { + $sql .= "cp.fk_categorie IN (".$db->sanitize($listofcatsql).")"; + } else { + $sql .= "cp.fk_categorie = ".((int) $selected_cat); + } $sql .= "))"; } - if ($selected_soc > 0) $sql .= " AND soc.rowid=".$selected_soc; + if ($selected_soc > 0) { + $sql .= " AND soc.rowid=".((int) $selected_soc); + } $sql .= " AND f.entity IN (".getEntity('invoice').")"; + + $parameters = array(); + $hookmanager->executeHooks('printFieldListWhere', $parameters); + $sql .= $hookmanager->resPrint; + $sql .= " GROUP BY p.rowid, p.ref, p.label, p.fk_product_type"; $sql .= $db->order($sortfield, $sortorder); @@ -300,8 +379,7 @@ if ($modecompta == 'CREANCES-DETTES') print ''; print ''."\n"; // Extra parameters management - foreach ($headerparams as $key => $value) - { + foreach ($headerparams as $key => $value) { print ''; } @@ -333,6 +411,11 @@ if ($modecompta == 'CREANCES-DETTES') print ''; // Array header @@ -400,7 +483,7 @@ if ($modecompta == 'CREANCES-DETTES') print "\n"; if (count($name)) { - foreach ($name as $key=>$value) { + foreach ($name as $key => $value) { print ''; // Product diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 2e46e306030..63798baf62f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -35,67 +35,90 @@ $langs->load("accountancy"); $socid = GETPOST('socid', 'int'); // Security check -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'); +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'); +} // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta"); +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta"); +} -$sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; -$sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; -if (!$sortorder) $sortorder = "asc"; -if (!$sortfield) $sortfield = "name"; +$sortorder = GETPOST("sortorder", 'aZ09'); +$sortfield = GETPOST("sortfield", 'aZ09'); +if (!$sortorder) { + $sortorder = "asc"; +} +if (!$sortfield) { + $sortfield = "name"; +} // Date range -$year = GETPOST("year"); -$month = GETPOST("month"); -$date_startyear = GETPOST("date_startyear"); -$date_startmonth = GETPOST("date_startmonth"); -$date_startday = GETPOST("date_startday"); -$date_endyear = GETPOST("date_endyear"); -$date_endmonth = GETPOST("date_endmonth"); -$date_endday = GETPOST("date_endday"); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +$year = GETPOST("year", 'int'); +$month = GETPOST("month", 'int'); +$date_startyear = GETPOST("date_startyear", 'int'); +$date_startmonth = GETPOST("date_startmonth", 'int'); +$date_startday = GETPOST("date_startday", 'int'); +$date_endyear = GETPOST("date_endyear", 'int'); +$date_endmonth = GETPOST("date_endmonth", 'int'); +$date_endday = GETPOST("date_endday", 'int'); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, $_REQUEST["date_startmonth"], $_REQUEST["date_startday"], $_REQUEST["date_startyear"]); -$date_end = dol_mktime(23, 59, 59, $_REQUEST["date_endmonth"], $_REQUEST["date_endday"], $_REQUEST["date_endyear"]); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } else { // TODO We define q } @@ -142,8 +165,12 @@ llxHeader(); $form = new Form($db); // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header if ($modecompta == "CREANCES-DETTES") { @@ -151,12 +178,14 @@ if ($modecompta == "CREANCES-DETTES") { $calcmode = $langs->trans("CalcModeDebt"); //$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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= $langs->trans("DepositsAreNotIncluded"); + } 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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -164,24 +193,28 @@ if ($modecompta == "CREANCES-DETTES") { $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 } -$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().''.img_next().''; -else $periodlink = ''; +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().''.img_next().''; +} else { + $periodlink = ''; +} $moreparam = array(); -if (!empty($modecompta)) $moreparam['modecompta'] = $modecompta; +if (!empty($modecompta)) { + $moreparam['modecompta'] = $modecompta; +} report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $moreparam, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -192,14 +225,13 @@ $name = array(); print ''; print ''."\n"; // Extra parameters management -foreach ($headerparams as $key => $value) -{ +foreach ($headerparams as $key => $value) { print ''; } $catotal = 0; if ($modecompta == 'CREANCES-DETTES') { - $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; + $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid"; $sql .= " WHERE f.fk_statut in (1,2)"; @@ -211,11 +243,11 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } -} else { +} elseif ($modecompta == "RECETTES-DEPENSES") { /* - * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les - * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) - */ + * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les + * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) + */ $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid "; @@ -225,9 +257,13 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } +} elseif ($modecompta == "BOOKKEEPING") { +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $sql .= " AND f.entity IN (".getEntity('invoice').")"; -if ($socid) $sql .= " AND f.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; +} $sql .= " GROUP BY u.rowid, u.lastname, u.firstname"; $sql .= " ORDER BY u.rowid"; @@ -252,7 +288,7 @@ if ($result) { } // Adding old-version payments, non-bound by "paiement_facture" then without User -if ($modecompta != 'CREANCES-DETTES') { +if ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -302,14 +338,14 @@ print_liste_field_titre( ); if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre( - $langs->trans('AmountHT'), - $_SERVER["PHP_SELF"], - "amount_ht", - "", - $paramslink, - 'class="right"', - $sortfield, - $sortorder + $langs->trans('AmountHT'), + $_SERVER["PHP_SELF"], + "amount_ht", + "", + $paramslink, + 'class="right"', + $sortfield, + $sortorder ); } else { print_liste_field_titre(''); @@ -326,7 +362,8 @@ print_liste_field_titre( ); print_liste_field_titre( $langs->trans("Percentage"), - $_SERVER["PHP_SELF"], "amount_ttc", + $_SERVER["PHP_SELF"], + "amount_ttc", "", $paramslink, 'class="right"', @@ -401,7 +438,9 @@ if (count($amount)) { //print ''; } print price($amount_ht[$key]); - if ($key > 0) print ''; + if ($key > 0) { + print ''; + } } print ''; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 8fa06046076..af3f2bc8a53 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -40,12 +40,18 @@ $langs->loadLangs(array('companies', 'categories', 'bills', 'compta')); // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta"); +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta"); +} -$sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; -$sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; -if (!$sortorder) $sortorder = "asc"; -if (!$sortfield) $sortfield = "nom"; +$sortorder = GETPOST("sortorder", 'aZ09'); +$sortfield = GETPOST("sortfield", 'aZ09'); +if (!$sortorder) { + $sortorder = "asc"; +} +if (!$sortfield) { + $sortfield = "nom"; +} $socid = GETPOST('socid', 'int'); @@ -57,9 +63,15 @@ if (GETPOST('subcat', 'alpha') === 'yes') { } // Security check -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'); +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')); @@ -71,54 +83,66 @@ $search_societe = GETPOST("search_societe", 'alpha'); $search_zip = GETPOST("search_zip", 'alpha'); $search_town = GETPOST("search_town", 'alpha'); $search_country = GETPOST("search_country", 'alpha'); -$date_startyear = GETPOST("date_startyear", 'alpha'); -$date_startmonth = GETPOST("date_startmonth", 'alpha'); -$date_startday = GETPOST("date_startday", 'alpha'); -$date_endyear = GETPOST("date_endyear", 'alpha'); -$date_endmonth = GETPOST("date_endmonth", 'alpha'); -$date_endday = GETPOST("date_endday", 'alpha'); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +$date_startyear = GETPOST("date_startyear", 'int'); +$date_startmonth = GETPOST("date_startmonth", 'int'); +$date_startday = GETPOST("date_startday", 'int'); +$date_endyear = GETPOST("date_endyear", 'int'); +$date_endmonth = GETPOST("date_endmonth", 'int'); +$date_endday = GETPOST("date_endday", 'int'); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q", "int") ?GETPOST("q", "int") : 0; - if (empty($q)) - { + if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } else { // TODO We define q } +//print dol_print_date($date_start, 'dayhour', 'gmt'); // $date_start and $date_end are defined. We force $year_start and $nbofyear $tmps = dol_getdate($date_start); @@ -170,22 +194,27 @@ $thirdparty_static = new Societe($db); $formother = new FormOther($db); // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header -if ($modecompta == "CREANCES-DETTES") -{ +if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("Turnover").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeDebt"); //$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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= $langs->trans("DepositsAreNotIncluded"); + } 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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; @@ -193,19 +222,21 @@ if ($modecompta == "CREANCES-DETTES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} elseif ($modecompta == "BOOKKEEPING") -{ -} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") -{ +} elseif ($modecompta == "BOOKKEEPING") { +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { +} +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().''.img_next().''; +} else { + $periodlink = ''; } -$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().''.img_next().''; -else $periodlink = ''; report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -216,13 +247,11 @@ $name = array(); $catotal = 0; if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,"; - $sql .= " sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; + $sql .= " sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; - if ($selected_cat === -2) // Without any category - { + 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"; } $sql .= " WHERE f.fk_statut in (1,2)"; @@ -235,16 +264,17 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category - { + if ($selected_cat === -2) { // Without any category $sql .= " AND cs.fk_soc is null"; } 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 .= " AND (c.rowid = ".((int) $selected_cat); + if ($subcat) { + $sql .= " OR c.fk_parent = ".((int) $selected_cat); + } $sql .= ")"; $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid"; } -} else { +} elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) @@ -254,11 +284,9 @@ if ($modecompta == 'CREANCES-DETTES') { $sql .= ", ".MAIN_DB_PREFIX."paiement_facture as pf"; $sql .= ", ".MAIN_DB_PREFIX."paiement as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if ($selected_cat === -2) // Without any category - { + 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"; } $sql .= " WHERE p.rowid = pf.fk_paiement"; @@ -267,22 +295,35 @@ if ($modecompta == 'CREANCES-DETTES') { if ($date_start && $date_end) { $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category - { + if ($selected_cat === -2) { // Without any category $sql .= " AND cs.fk_soc is null"; } elseif ($selected_cat) { // Into a specific category - $sql .= " AND (c.rowid = ".$selected_cat; - if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; + $sql .= " AND (c.rowid = ".((int) $selected_cat); + if ($subcat) { + $sql .= " OR c.fk_parent = ".((int) $selected_cat); + } $sql .= ")"; $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_soc = s.rowid"; } +} elseif ($modecompta == "BOOKKEEPING") { +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { +} +if (!empty($search_societe)) { + $sql .= natural_search('s.nom', $search_societe); +} +if (!empty($search_zip)) { + $sql .= natural_search('s.zip', $search_zip); +} +if (!empty($search_town)) { + $sql .= natural_search('s.town', $search_town); +} +if ($search_country > 0) { + $sql .= ' AND s.fk_pays = '.((int) $search_country); } -if (!empty($search_societe)) $sql .= natural_search('s.nom', $search_societe); -if (!empty($search_zip)) $sql .= natural_search('s.zip', $search_zip); -if (!empty($search_town)) $sql .= natural_search('s.town', $search_town); -if ($search_country > 0) $sql .= ' AND s.fk_pays = '.$search_country.''; $sql .= " AND f.entity IN (".getEntity('invoice').")"; -if ($socid) $sql .= " AND f.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND f.fk_soc = ".((int) $socid); +} $sql .= " GROUP BY s.rowid, s.nom, s.zip, s.town, s.fk_pays"; $sql .= " ORDER BY s.rowid"; //echo $sql; @@ -311,7 +352,7 @@ if ($result) { } // On ajoute les paiements anciennes version, non lies par paiement_facture -if ($modecompta != 'CREANCES-DETTES') { +if ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -321,7 +362,9 @@ if ($modecompta != 'CREANCES-DETTES') { $sql .= " AND p.fk_bank = b.rowid"; $sql .= " AND b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - if ($date_start && $date_end) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + if ($date_start && $date_end) { + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + } $sql .= " GROUP BY socid, name"; $sql .= " ORDER BY name"; @@ -350,8 +393,7 @@ $i = 0; print ''; print ''."\n"; // Extra parameters management -foreach ($headerparams as $key => $value) -{ +foreach ($headerparams as $key => $value) { print ''; } @@ -405,8 +447,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Zip"), $_SERVER["PHP_SELF"], @@ -414,8 +457,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Town"), $_SERVER["PHP_SELF"], @@ -423,8 +467,9 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); print_liste_field_titre( $langs->trans("Country"), $_SERVER["PHP_SELF"], @@ -432,18 +477,19 @@ print_liste_field_titre( "", $paramslink, "", - $sortfield, $sortorder - ); + $sortfield, + $sortorder +); if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre( - $langs->trans('AmountHT'), - $_SERVER["PHP_SELF"], - "amount_ht", - "", - $paramslink, - 'class="right"', - $sortfield, - $sortorder + $langs->trans('AmountHT'), + $_SERVER["PHP_SELF"], + "amount_ht", + "", + $paramslink, + 'class="right"', + $sortfield, + $sortorder ); } else { print_liste_field_titre(''); @@ -531,7 +577,7 @@ if (count($amount)) { $arrayforsort = $address_town; } - foreach ($arrayforsort as $key=>$value) { + foreach ($arrayforsort as $key => $value) { print ''; // Third party diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 03c128e841f..b93d3c507b3 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -42,8 +42,7 @@ $nbofyear = 4; // Date range $year = GETPOST('year', 'int'); -if (empty($year)) -{ +if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); $year_start = $year_current - ($nbofyear - 1); @@ -52,34 +51,47 @@ if (empty($year)) $month_current = dol_print_date(dol_now(), "%m"); $year_start = $year - ($nbofyear - 1); } -$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); -$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); +$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear, 'tzserver'); +$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear, 'tzserver'); // We define date_start and date_end -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ? GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $year_end = $year_start + ($nbofyear - 1); $month_start = GETPOSTISSET("month") ? GETPOST("month", 'int') : ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1); - if (!GETPOST('month')) - { - if (!GETPOST("year") && $month_start > $month_current) - { + if (!GETPOST('month')) { + if (!GETPOST("year") && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - } 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 ($month_end < 1) { + $month_end = 12; + } + } 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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } $userid = GETPOST('userid', 'int'); @@ -95,13 +107,23 @@ $nbofyear = ($year_end - $year_start) + 1; // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; -if (!empty($conf->accounting->enabled)) $modecompta = 'BOOKKEEPING'; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta", 'alpha'); +if (!empty($conf->accounting->enabled)) { + $modecompta = 'BOOKKEEPING'; +} +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta", 'alpha'); +} // Security check -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'); +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'); +} @@ -111,98 +133,116 @@ if (!empty($conf->accounting->enabled)) $result = restrictedArea($user, 'account */ $param = ''; -if ($date_startday && $date_startmonth && $date_startyear) $param .= '&date_startday='.$date_startday.'&date_startmonth='.$date_startmonth.'&date_startyear='.$date_startyear; -if ($date_endday && $date_endmonth && $date_endyear) $param .= '&date_endday='.$date_endday.'&date_endmonth='.$date_endmonth.'&date_endyear='.$date_endyear; +if ($date_startday && $date_startmonth && $date_startyear) { + $param .= '&date_startday='.$date_startday.'&date_startmonth='.$date_startmonth.'&date_startyear='.$date_startyear; +} +if ($date_endday && $date_endmonth && $date_endyear) { + $param .= '&date_endday='.$date_endday.'&date_endmonth='.$date_endmonth.'&date_endyear='.$date_endyear; +} llxHeader(); $form = new Form($db); // Affiche en-tete du rapport -if ($modecompta == "CREANCES-DETTES") -{ +if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeDebt"); //$calcmode.='
    ('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '{link1}', '{link2}').')'; $calcmode = str_replace('{link1}', '', $calcmode); $calcmode = str_replace('{link2}', '', $calcmode); - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $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"); + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { + $description .= $langs->trans("DepositsAreNotIncluded"); + } 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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; //$calcmode.='
    ('.$langs->trans("SeeReportInBookkeepingMode",'','').')'; - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()."".img_next()."" : ""); $description = $langs->trans("RulesCAIn"); $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"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '{link1}', '{link2}').')'; $calcmode = str_replace('{link1}', '', $calcmode); $calcmode = str_replace('{link2}', '', $calcmode); //$calcmode.='
    ('.$langs->trans("SeeReportInInputOutputMode",'','').')'; - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()."".img_next()."" : ""); - $description = $langs->trans("RulesCATotalSaleJournal"); + $description = $langs->trans("RulesSalesTurnoverOfIncomeAccounts"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); $moreparam = array(); -if (!empty($modecompta)) $moreparam['modecompta'] = $modecompta; +if (!empty($modecompta)) { + $moreparam['modecompta'] = $modecompta; +} report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $moreparam, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } -if ($modecompta == 'CREANCES-DETTES') -{ - $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; +if ($modecompta == 'CREANCES-DETTES') { + $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $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)"; + 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)"; + } $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} elseif ($modecompta == "RECETTES-DEPENSES") -{ + if ($socid) { + $sql .= " AND f.fk_soc = ".((int) $socid); + } +} elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) */ - $sql = "SELECT date_format(p.datep,'%Y-%m') as dm, sum(pf.amount) as amount_ttc"; + $sql = "SELECT date_format(p.datep, '%Y-%m') as dm, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."paiement_facture as pf"; $sql .= ", ".MAIN_DB_PREFIX."paiement as p"; $sql .= " WHERE p.rowid = pf.fk_paiement"; $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") -{ - $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"; - $sql .= " WHERE b.entity = ".$conf->entity; // In module double party accounting, we never share entities - $sql .= " AND aj.entity = ".$conf->entity; - $sql .= " AND b.code_journal = aj.code AND aj.nature = 2"; // @todo currently count amount in sale journal, but we need to define a category group for turnover -} + if ($socid) { + $sql .= " AND f.fk_soc = ".((int) $socid); + } +} elseif ($modecompta == "BOOKKEEPING") { + $pcgverid = $conf->global->CHARTOFACCOUNTS; + $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); + if (empty($pcgvercode)) { + $pcgvercode = $pcgverid; + } + $sql = "SELECT date_format(b.doc_date, '%Y-%m') as dm, sum(b.credit - b.debit) as amount_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b,"; + $sql .= " ".MAIN_DB_PREFIX."accounting_account as aa"; + $sql .= " WHERE b.entity = ".$conf->entity; // In module double party accounting, we never share entities + $sql .= " AND b.numero_compte = aa.account_number"; + $sql .= " AND b.doc_type = 'customer_invoice'"; + $sql .= " AND aa.entity = ".$conf->entity; + $sql .= " AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; + $sql .= " AND aa.pcg_type = 'INCOME'"; // TODO Be able to use a custom group +} $sql .= " GROUP BY dm"; $sql .= " ORDER BY dm"; // TODO Add a filter on $date_start and $date_end to reduce quantity on data @@ -211,17 +251,14 @@ $sql .= " ORDER BY dm"; $minyearmonth = $maxyearmonth = 0; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); $cum_ht[$obj->dm] = !empty($obj->amount) ? $obj->amount : 0; $cum[$obj->dm] = $obj->amount_ttc; - if ($obj->amount_ttc) - { + if ($obj->amount_ttc) { $minyearmonth = ($minyearmonth ? min($minyearmonth, $obj->dm) : $obj->dm); $maxyearmonth = max($maxyearmonth, $obj->dm); } @@ -233,8 +270,7 @@ if ($result) } // On ajoute les paiements anciennes version, non lies par paiement_facture (very old versions) -if ($modecompta == 'RECETTES-DEPENSES') -{ +if ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; @@ -248,16 +284,13 @@ if ($modecompta == 'RECETTES-DEPENSES') $sql .= " ORDER BY dm"; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); $cum[$obj->dm] += $obj->amount_ttc; - if ($obj->amount_ttc) - { + if ($obj->amount_ttc) { $minyearmonth = ($minyearmonth ?min($minyearmonth, $obj->dm) : $obj->dm); $maxyearmonth = max($maxyearmonth, $obj->dm); } @@ -275,26 +308,45 @@ print '
    '; + print ''; print ''; print ''; - $formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth100onsmartphone', 1); - print ''; - print ''; + $formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth150', 1); 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_lim ? $search_year_lim : -1, 'search_year_lim', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); print ''; + print ''; + print ''; + print $form->select_dolusers($search_users, 'search_users', 1, null, 0, '', '', '0', '0', 0, '', 0, '', '', 0, 0, true); +} + +// Filter: Type +if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { + print ''; + $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150'); + print ''; + $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth150'); + print ''; @@ -339,15 +445,42 @@ print '
    '.(($offset * $limit) + $i).''.$chargesociale_static->getNomUrl(1, '20').''.dol_trunc($obj->libelle, 42).''.dol_escape_htmltag($obj->label).''.$obj->type_label.''.dol_escape_htmltag($obj->type_label).''.dol_print_date($db->jdate($obj->date_ech), 'day').''; + if ($obj->periode) { + print ''; + print dol_print_date($db->jdate($obj->periode), 'day'); + print ''; + } + print ''.dol_print_date($db->jdate($obj->date_ech), 'day').'"; + if (!empty($obj->fk_user)) { + if (!empty($TLoadedUsers[$obj->fk_user])) { + $ustatic = $TLoadedUsers[$obj->fk_user]; + } else { + $ustatic = new User($db); + $ustatic->fetch($obj->fk_user); + $TLoadedUsers[$obj->fk_user] = $ustatic; + } + print $ustatic->getNomUrl(-1); + } + print "'; - if ($obj->periode) { - print 'jdate($obj->periode)).'">'; - print dol_print_date($db->jdate($obj->periode), 'day'); - print ''; + // Type + if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { + print ''; + if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); + print ''; + if ($obj->fk_account > 0) { + $bankstatic->id = $obj->fk_account; + $bankstatic->ref = $obj->bref; + $bankstatic->number = $obj->bnumber; + $bankstatic->iban = $obj->iban; + $bankstatic->bic = $obj->bic; + $bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code); + $bankstatic->account_number = $obj->account_number; + $bankstatic->clos = $obj->clos; + + //$accountingjournal->fetch($obj->fk_accountancy_journal); + //$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); + + $bankstatic->label = $obj->blabel; + print $bankstatic->getNomUrl(1); } print ''.price($obj->amount).''.price($obj->amount).''.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'
    '; $searchpicto = $form->showFilterButtons(); @@ -194,20 +228,24 @@ print '
    '.dol_print_date($date, 'day').''; - $socialcontrib->id = $obj->rowid; - $socialcontrib->ref = $obj->label; - $socialcontrib->label = $obj->label; - print $socialcontrib->getNomUrl(1, '20'); - print ''.$obj->label.''.price($obj->total).''.$payment_sc_static->getNomUrl(1)."'; + $socialcontrib->id = $obj->rowid; + $socialcontrib->ref = empty($obj->libelle) ? $obj->label : $obj->libelle; + $socialcontrib->label = empty($obj->libelle) ? $obj->label : $obj->libelle; + print $socialcontrib->getNomUrl(1, '20'); + print ''.$obj->label.''.dol_print_date($date, 'day').''.dol_print_date($db->jdate($obj->datep), 'day').'"; + if (!empty($obj->uid)) { + $userstatic->id = $obj->uid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->admin = $obj->admin; + $userstatic->login = $obj->login; + $userstatic->email = $obj->email; + $userstatic->socid = $obj->fk_soc; + $userstatic->statut = $obj->status; + print $userstatic->getNomUrl(1); + print "'; - if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' '; - print $obj->num_payment.''; + print $labelpayment; + print ''.$obj->num_payment.''; - if ($obj->fk_bank > 0) - { - //$accountstatic->fetch($obj->fk_bank); + if (!empty($conf->banque->enabled)) { + // Bank transaction + print ''; + $accountlinestatic->id = $obj->fk_bank; + print $accountlinestatic->getNomUrl(1); + print ''; + if ($obj->bid > 0) { $accountstatic->id = $obj->bid; $accountstatic->ref = $obj->bref; $accountstatic->number = $obj->bnumber; $accountstatic->accountancy_number = $obj->account_number; $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; + $accountstatic->iban = $obj->iban; + $accountstatic->bic = $obj->bic; + $accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code); + $accountstatic->clos = $obj->clos; print $accountstatic->getNomUrl(1); - } else print ' '; + } else { + print ' '; + } print ''.price($obj->total).''; - if ($obj->totalpaye) print price($obj->totalpaye); + if ($obj->totalpaye) { + print ''.price($obj->totalpaye).''; + } print '     '.price($totalpaye)."
    '.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).''.$langs->trans("TotalHT").'
    '.price($obj->$monthj).''.price($totalpermonth[$j]).'
    '.$langs->trans("PurchasebyVatrate").''.$langs->trans("ProductOrService").''.$langs->trans("Country").''.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).''.$langs->trans("TotalHT").'
    '.price($obj->$monthj).''.price($totalpermonth[$j]).' '; print ''; + + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListeTitle', $parameters); + print $hookmanager->resPrint; + print '
    '; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ - if ($modecompta == 'CREANCES-DETTES') print ''; - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print ''; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; +for ($annee = $year_start; $annee <= $year_end; $annee++) { + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print ''; @@ -309,10 +361,11 @@ $casenow = dol_print_date($now, "%Y-%m"); // Loop on each month $nb_mois_decalage = GETPOSTISSET('date_startmonth') ? (GETPOST('date_startmonth', 'int') - 1) : (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 0 : ($conf->global->SOCIETE_FISCAL_MONTH_START - 1)); -for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) -{ +for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $mois_modulo = $mois; // ajout - if ($mois > 12) {$mois_modulo = $mois - 12; } // ajout + if ($mois > 12) { + $mois_modulo = $mois - 12; + } // ajout if ($year_start == $year_end) { // If we show only one year or one month, we do not show month before the selected month @@ -330,15 +383,15 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) // Month print ""; - for ($annee = $year_start - 1; $annee <= $year_end; $annee++) // We start one year before to have data to be able to make delta - { + for ($annee = $year_start - 1; $annee <= $year_end; $annee++) { // We start one year before to have data to be able to make delta $annee_decalage = $annee; - if ($mois > 12) {$annee_decalage = $annee + 1; } + if ($mois > 12) { + $annee_decalage = $annee + 1; + } $case = dol_print_date(dol_mktime(1, 1, 1, $mois_modulo, 1, $annee_decalage), "%Y-%m"); $caseprev = dol_print_date(dol_mktime(1, 1, 1, $mois_modulo, 1, $annee_decalage - 1), "%Y-%m"); - if ($annee >= $year_start) // We ignore $annee < $year_start, we loop on it to be able to make delta, nothing is output. - { + if ($annee >= $year_start) { // We ignore $annee < $year_start, we loop on it to be able to make delta, nothing is output. if ($modecompta == 'CREANCES-DETTES') { // Value turnover of month w/o VAT print '"; @@ -358,11 +415,19 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) { if ($cum[$case]) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. - if ($modecompta != 'BOOKKEEPING') print ''; + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print price($cum[$case], 1); - if ($modecompta != 'BOOKKEEPING') print ''; + if ($modecompta != 'BOOKKEEPING') { + print ''; + } } else { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { + print '0'; + } else { + print ' '; + } } } print ""; @@ -371,38 +436,38 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) print ''; print '-'; } - if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) - { + if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) { print '+0%'; } - if (!isset($cum[$caseprev]) && !$cum[$case]) - { + if (!isset($cum[$caseprev]) && !$cum[$case]) { print '-'; } } else { - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { + print '-'; + } else { + print ' '; + } } } print ''; - if ($annee_decalage < $year_end || ($annee_decalage == $year_end && $mois > 12 && $annee < $year_end)) print ''; + if ($annee_decalage < $year_end || ($annee_decalage == $year_end && $mois > 12 && $annee < $year_end)) { + print ''; + } } if ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) { @@ -481,8 +546,7 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) // Show total print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { if ($modecompta == 'CREANCES-DETTES') { // Montant total HT if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { @@ -511,25 +575,28 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) print ($percent >= 0 ? "+$percent" : "$percent").'%'; print ''; } - if ($total[$annee - 1] && !$total[$annee]) - { + if ($total[$annee - 1] && !$total[$annee]) { print ''; } - if (!$total[$annee - 1] && $total[$annee]) - { + if (!$total[$annee - 1] && $total[$annee]) { print ''; } - if (!$total[$annee - 1] && !$total[$annee]) - { + if (!$total[$annee - 1] && !$total[$annee]) { print ''; } } else { print ''; } - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print "\n"; print "
     '; - else print ''; - if ($modecompta != 'BOOKKEEPING') print ''; +for ($annee = $year_start; $annee <= $year_end; $annee++) { + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } else { + print ''; + } + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print $annee; - if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) print '-'.($annee + 1); - if ($modecompta != 'BOOKKEEPING') print ''; + if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) { + print '-'.($annee + 1); + } + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print '  
    '.$langs->trans("Month").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''; + if ($modecompta == "BOOKKEEPING") { + print $langs->trans("Amount"); + } else { + print $langs->trans("AmountTTC"); + } + print ''.$langs->trans("Delta").'  
    ".dol_print_date(dol_mktime(12, 0, 0, $mois_modulo, 1, 2000), "%B")."'; @@ -347,7 +400,11 @@ 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 ' '; } + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { + print '0'; + } else { + print ' '; + } } } print "'; //var_dump($annee.' '.$year_end.' '.$mois.' '.$month_end); if ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) { - if ($annee_decalage > $minyear && $case <= $casenow) - { - if ($cum[$caseprev] && $cum[$case]) - { + if ($annee_decalage > $minyear && $case <= $casenow) { + if ($cum[$caseprev] && $cum[$case]) { $percent = (round(($cum[$case] - $cum[$caseprev]) / $cum[$caseprev], 4) * 100); //print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X"; print ($percent >= 0 ? "+$percent" : "$percent").'%'; } - if ($cum[$caseprev] && !$cum[$case]) - { + if ($cum[$caseprev] && !$cum[$case]) { print '-100%'; } - if (!$cum[$caseprev] && $cum[$case]) - { + if (!$cum[$caseprev] && $cum[$case]) { //print '+Inf%  
    '.$langs->trans("Total").'-100%+'.$langs->trans('Inf').'%+0%'; - 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 '  
    "; @@ -601,7 +668,7 @@ print '
    '; Je commente toute cette partie car les chiffres affichees sont faux - Eldy. En attendant correction. - $sql = "SELECT sum(f.total) as tot_fht,sum(f.total_ttc) as tot_fttc, p.rowid, p.ref, s.nom, s.rowid as socid, p.total_ht, p.total_ttc + $sql = "SELECT sum(f.total_ht) as tot_fht,sum(f.total_ttc) as tot_fttc, p.rowid, p.ref, s.nom, s.rowid as socid, p.total_ht, p.total_ttc FROM ".MAIN_DB_PREFIX."commande AS p, ".MAIN_DB_PREFIX."societe AS s LEFT JOIN ".MAIN_DB_PREFIX."co_fa AS co_fa ON co_fa.fk_commande = p.rowid LEFT JOIN ".MAIN_DB_PREFIX."facture AS f ON co_fa.fk_facture = f.rowid diff --git a/htdocs/compta/stats/supplier_turnover.php b/htdocs/compta/stats/supplier_turnover.php index eeb1c142712..bb341c6a3a5 100644 --- a/htdocs/compta/stats/supplier_turnover.php +++ b/htdocs/compta/stats/supplier_turnover.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/compta/stats/supplier_ca.php + * \file htdocs/compta/stats/supplier_turnover.php * \brief Page reporting purchase turnover */ @@ -38,8 +38,7 @@ $nbofyear = 4; // Date range $year = GETPOST('year', 'int'); -if (empty($year)) -{ +if (empty($year)) { $year_current = strftime("%Y", dol_now()); $month_current = strftime("%m", dol_now()); $year_start = $year_current - ($nbofyear - 1); @@ -48,34 +47,47 @@ if (empty($year)) $month_current = strftime("%m", dol_now()); $year_start = $year - ($nbofyear - 1); } -$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); -$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); +$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear, 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear, 'tzserver'); // We use timezone of server so report is same from everywhere // We define date_start and date_end -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { + if ($q == 0) { // We define date_start and date_end $year_end = $year_start + ($nbofyear - 1); $month_start = GETPOST("month") ? GETPOST("month", 'int') : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); - if (!GETPOST('month')) - { - if (!GETPOST("year") && $month_start > $month_current) - { + if (!GETPOST('month')) { + if (!GETPOST("year") && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - } 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 ($month_end < 1) { + $month_end = 12; + } + } 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); + } + 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); } - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } } $userid = GETPOST('userid', 'int'); @@ -89,15 +101,23 @@ $nbofyear = ($year_end - $year_start) + 1; // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING') $modecompta = $conf->global->ACCOUNTING_MODE; -if (!empty($conf->accounting->enabled)) $modecompta = 'BOOKKEEPING'; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta", 'alpha'); +if (!empty($conf->accounting->enabled)) { + $modecompta = 'BOOKKEEPING'; +} +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta", 'alpha'); +} // Security check -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'); - - +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'); +} /* @@ -109,61 +129,59 @@ llxHeader(); $form = new Form($db); // Affiche en-tete du rapport -if ($modecompta == "CREANCES-DETTES") -{ +if ($modecompta == "CREANCES-DETTES") { $name = $langs->trans("PurchaseTurnover"); $calcmode = $langs->trans("CalcModeDebt"); $calcmode .= '
    ('.$langs->trans("SeeReportInBookkeepingMode", '{link1}', '{link2}').')'; $calcmode = str_replace('{link1}', '', $calcmode); $calcmode = str_replace('{link2}', '', $calcmode); - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $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"); - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $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"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '{link1}', '{link2}').')'; $calcmode = str_replace('{link1}', '', $calcmode); $calcmode = str_replace('{link2}', '', $calcmode); - $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); - $description = $langs->trans("RulesPurchaseTurnoverTotalPurchaseJournal"); + $description = $langs->trans("RulesPurchaseTurnoverOfExpenseAccounts"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); $moreparam = array(); -if (!empty($modecompta)) $moreparam['modecompta'] = $modecompta; +if (!empty($modecompta)) { + $moreparam['modecompta'] = $modecompta; +} report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $moreparam, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } -if ($modecompta == 'CREANCES-DETTES') -{ +if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " WHERE f.fk_statut in (1,2)"; $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") -{ + if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; + } +} 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"; $sql .= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf"; @@ -171,15 +189,27 @@ if ($modecompta == 'CREANCES-DETTES') $sql .= " WHERE p.rowid = pf.fk_paiementfourn"; $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") -{ - $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"; + if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; + } +} elseif ($modecompta == "BOOKKEEPING") { + $pcgverid = $conf->global->CHARTOFACCOUNTS; + $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); + if (empty($pcgvercode)) { + $pcgvercode = $pcgverid; + } + + $sql = "SELECT date_format(b.doc_date, '%Y-%m') as dm, sum(b.debit - b.credit) as amount_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b,"; + $sql .= " ".MAIN_DB_PREFIX."accounting_account as aa"; $sql .= " WHERE b.entity = ".$conf->entity; // In module double party accounting, we never share entities - $sql .= " AND aj.entity = ".$conf->entity; - $sql .= " AND b.code_journal = aj.code AND aj.nature = 3"; // @todo currently count amount in sale journal, but we need to define a category group for turnover + $sql .= " AND b.doc_type = 'supplier_invoice'"; + $sql .= " AND b.numero_compte = aa.account_number"; + $sql .= " AND aa.entity = ".$conf->entity; + $sql .= " AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; + $sql .= " AND aa.pcg_type = 'EXPENSE'"; // TODO Be able to use a custom group } +//print $sql; $sql .= " GROUP BY dm"; $sql .= " ORDER BY dm"; @@ -189,17 +219,14 @@ $sql .= " ORDER BY dm"; $minyearmonth = $maxyearmonth = 0; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); $cum_ht[$obj->dm] = !empty($obj->amount) ? $obj->amount : 0; $cum[$obj->dm] = $obj->amount_ttc; - if ($obj->amount_ttc) - { + if ($obj->amount_ttc) { $minyearmonth = ($minyearmonth ? min($minyearmonth, $obj->dm) : $obj->dm); $maxyearmonth = max($maxyearmonth, $obj->dm); } @@ -217,26 +244,45 @@ print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ - if ($modecompta == 'CREANCES-DETTES') print ''; - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print ''; print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; +for ($annee = $year_start; $annee <= $year_end; $annee++) { + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print ''; @@ -251,10 +297,11 @@ $casenow = dol_print_date($now, "%Y-%m"); // Loop on each month $nb_mois_decalage = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START - 1) : 0; -for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) -{ +for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $mois_modulo = $mois; // ajout - if ($mois > 12) {$mois_modulo = $mois - 12; } // ajout + if ($mois > 12) { + $mois_modulo = $mois - 12; + } // ajout if ($year_start == $year_end) { if ($mois > $date_endmonth && $year_end >= $date_endyear) { @@ -267,74 +314,84 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) // Month print ""; - for ($annee = $year_start - 1; $annee <= $year_end; $annee++) // We start one year before to have data to be able to make delta - { + for ($annee = $year_start - 1; $annee <= $year_end; $annee++) { // We start one year before to have data to be able to make delta $annee_decalage = $annee; - if ($mois > 12) {$annee_decalage = $annee + 1; } + if ($mois > 12) { + $annee_decalage = $annee + 1; + } $case = dol_print_date(dol_mktime(1, 1, 1, $mois_modulo, 1, $annee_decalage), "%Y-%m"); $caseprev = dol_print_date(dol_mktime(1, 1, 1, $mois_modulo, 1, $annee_decalage - 1), "%Y-%m"); - if ($annee >= $year_start) // We ignore $annee < $year_start, we loop on it to be able to make delta, nothing is output. - { + if ($annee >= $year_start) { // We ignore $annee < $year_start, we loop on it to be able to make delta, nothing is output. if ($modecompta == 'CREANCES-DETTES') { // Valeur CA du mois w/o VAT print '"; } // Valeur CA du mois print '"; // Pourcentage du mois - if ($annee_decalage > $minyear && $case <= $casenow) - { - if ($cum[$caseprev] && $cum[$case]) - { + if ($annee_decalage > $minyear && $case <= $casenow) { + if ($cum[$caseprev] && $cum[$case]) { $percent = (round(($cum[$case] - $cum[$caseprev]) / $cum[$caseprev], 4) * 100); //print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X"; print ''; } - if ($cum[$caseprev] && !$cum[$case]) - { + if ($cum[$caseprev] && !$cum[$case]) { print ''; } - if (!$cum[$caseprev] && $cum[$case]) - { + if (!$cum[$caseprev] && $cum[$case]) { //print ''; print ''; } - if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) - { + if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) { print ''; } - if (!isset($cum[$caseprev]) && !$cum[$case]) - { + if (!isset($cum[$caseprev]) && !$cum[$case]) { print ''; } } else { print ''; } - if ($annee_decalage < $year_end || ($annee_decalage == $year_end && $mois > 12 && $annee < $year_end)) print ''; + if ($annee_decalage < $year_end || ($annee_decalage == $year_end && $mois > 12 && $annee < $year_end)) { + print ''; + } } $total_ht[$annee] += ((!empty($cum_ht[$case])) ? $cum_ht[$case] : 0); @@ -346,12 +403,10 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) // Affiche total print ''; -for ($annee = $year_start; $annee <= $year_end; $annee++) -{ +for ($annee = $year_start; $annee <= $year_end; $annee++) { if ($modecompta == 'CREANCES-DETTES') { // Montant total HT - if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) - { + if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print '"; } else { print ''; @@ -359,39 +414,40 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) } // Montant total - if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) - { + if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print '"; } else { print ''; } // Pourcentage total - if ($annee > $minyear && $annee <= max($nowyear, $maxyear)) - { + if ($annee > $minyear && $annee <= max($nowyear, $maxyear)) { if ($total[$annee - 1] && $total[$annee]) { $percent = (round(($total[$annee] - $total[$annee - 1]) / $total[$annee - 1], 4) * 100); print ''; } - if ($total[$annee - 1] && !$total[$annee]) - { + if ($total[$annee - 1] && !$total[$annee]) { print ''; } - if (!$total[$annee - 1] && $total[$annee]) - { + if (!$total[$annee - 1] && $total[$annee]) { print ''; } - if (!$total[$annee - 1] && !$total[$annee]) - { + if (!$total[$annee - 1] && !$total[$annee]) { print ''; } } else { print ''; } - if ($annee != $year_end) print ''; + if ($annee != $year_end) { + print ''; + } } print "\n"; print "
     '; - else print ''; - if ($modecompta != 'BOOKKEEPING') print ''; +for ($annee = $year_start; $annee <= $year_end; $annee++) { + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } else { + print ''; + } + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print $annee; - if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) print '-'.($annee + 1); - if ($modecompta != 'BOOKKEEPING') print ''; + if ($conf->global->SOCIETE_FISCAL_MONTH_START > 1) { + print '-'.($annee + 1); + } + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print '  
    '.$langs->trans("Month").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("AmountHT").''; + if ($modecompta == "BOOKKEEPING") { + print $langs->trans("Amount"); + } else { + print $langs->trans("AmountTTC"); + } + print ''.$langs->trans("Delta").'  
    ".dol_print_date(dol_mktime(12, 0, 0, $mois_modulo, 1, 2000), "%B")."'; - if ($cum_ht[$case]) - { + if ($cum_ht[$case]) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. print ''.price($cum_ht[$case], 1).''; } else { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { + print '0'; + } else { + print ' '; + } } print "'; - if ($cum[$case]) - { + if ($cum[$case]) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. - if ($modecompta != 'BOOKKEEPING') print ''; + if ($modecompta != 'BOOKKEEPING') { + print ''; + } print price($cum[$case], 1); - if ($modecompta != 'BOOKKEEPING') print ''; + if ($modecompta != 'BOOKKEEPING') { + print ''; + } } else { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { + print '0'; + } else { + print ' '; + } } print "'.($percent >= 0 ? "+$percent" : "$percent").'%-100%+Inf%-+0%-'; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { + print '-'; + } else { + print ' '; + } print '  
    '.$langs->trans("Total").''.($total_ht[$annee] ?price($total_ht[$annee]) : "0")." '.($total[$annee] ?price($total[$annee]) : "0")." '.($percent >= 0 ? "+$percent" : "$percent").'%-100%+'.$langs->trans('Inf').'%+0%'; - 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 18e03d05f8f..1af51249433 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -30,21 +30,20 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; // Load translation files required by the page $langs->loadLangs(array("products", "categories", "errors", 'accountancy')); -// Security pack (data & check) -$socid = GETPOST('socid', 'int'); - -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'); - // Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') $modecompta = $conf->global->ACCOUNTING_MODE; -if (GETPOST("modecompta")) $modecompta = GETPOST("modecompta"); +if (GETPOST("modecompta")) { + $modecompta = GETPOST("modecompta"); +} -$sortorder = isset($_GET["sortorder"]) ? $_GET["sortorder"] : $_POST["sortorder"]; -$sortfield = isset($_GET["sortfield"]) ? $_GET["sortfield"] : $_POST["sortfield"]; -if (!$sortorder) $sortorder = "asc"; -if (!$sortfield) $sortfield = "ref"; +$sortorder = GETPOST("sortorder", 'aZ09'); +$sortfield = GETPOST("sortfield", 'aZ09'); +if (!$sortorder) { + $sortorder = "asc"; +} +if (!$sortfield) { + $sortfield = "ref"; +} // Category $selected_cat = (int) GETPOST('search_categ', 'int'); @@ -55,7 +54,9 @@ if (GETPOST('subcat', 'alpha') === 'yes') { } // product/service $selected_type = GETPOST('search_type', 'int'); -if ($selected_type == '') $selected_type = -1; +if ($selected_type == '') { + $selected_type = -1; +} // Hook $hookmanager->initHooks(array('supplierturnoverbyprodservlist')); @@ -69,45 +70,56 @@ $date_startday = GETPOST("date_startday"); $date_endyear = GETPOST("date_endyear"); $date_endmonth = GETPOST("date_endmonth"); $date_endday = GETPOST("date_endday"); -if (empty($year)) -{ - $year_current = strftime("%Y", dol_now()); - $month_current = strftime("%m", dol_now()); +if (empty($year)) { + $year_current = dol_print_date(dol_now(), '%Y'); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year_current; } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $month_current = dol_print_date(dol_now(), '%m'); $year_start = $year; } -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q", "int"); - if (empty($q)) - { + if (empty($q)) { // We define date_start and date_end $month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_end = $year_start; $month_end = $month_start; - if (!GETPOST("month")) // If month not forced - { - if (!GETPOST('year') && $month_start > $month_current) - { + if (!GETPOST("month")) { // If month not forced + if (!GETPOST('year') && $month_start > $month_current) { $year_start--; $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) $month_end = 12; - else $year_end++; + if ($month_end < 1) { + $month_end = 12; + } 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); + $date_start = dol_get_first_day($year_start, $month_start, false); + $date_end = dol_get_last_day($year_end, $month_end, false); } 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } + 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); + } + if ($q == 4) { + $date_start = dol_get_first_day($year_start, 10, false); + $date_end = dol_get_last_day($year_start, 12, false); + } } } else { // TODO We define q @@ -121,25 +133,53 @@ $year_end = $tmpe['year']; $nbofyear = ($year_end - $year_start) + 1; $commonparams = array(); -if (!empty($modecompta)) $commonparams['modecompta'] = $modecompta; -if (!empty($sortorder)) $commonparams['sortorder'] = $sortorder; -if (!empty($sortfield)) $commonparams['sortfield'] = $sortfield; +if (!empty($modecompta)) { + $commonparams['modecompta'] = $modecompta; +} +if (!empty($sortorder)) { + $commonparams['sortorder'] = $sortorder; +} +if (!empty($sortfield)) { + $commonparams['sortfield'] = $sortfield; +} $headerparams = array(); -if (!empty($date_startyear)) $headerparams['date_startyear'] = $date_startyear; -if (!empty($date_startmonth)) $headerparams['date_startmonth'] = $date_startmonth; -if (!empty($date_startday)) $headerparams['date_startday'] = $date_startday; -if (!empty($date_endyear)) $headerparams['date_endyear'] = $date_endyear; -if (!empty($date_endmonth)) $headerparams['date_endmonth'] = $date_endmonth; -if (!empty($date_endday)) $headerparams['date_endday'] = $date_endday; -if (!empty($year)) $headerparams['year'] = $year; -if (!empty($month)) $headerparams['month'] = $month; +if (!empty($date_startyear)) { + $headerparams['date_startyear'] = $date_startyear; +} +if (!empty($date_startmonth)) { + $headerparams['date_startmonth'] = $date_startmonth; +} +if (!empty($date_startday)) { + $headerparams['date_startday'] = $date_startday; +} +if (!empty($date_endyear)) { + $headerparams['date_endyear'] = $date_endyear; +} +if (!empty($date_endmonth)) { + $headerparams['date_endmonth'] = $date_endmonth; +} +if (!empty($date_endday)) { + $headerparams['date_endday'] = $date_endday; +} +if (!empty($year)) { + $headerparams['year'] = $year; +} +if (!empty($month)) { + $headerparams['month'] = $month; +} $headerparams['q'] = $q; $tableparams = array(); -if (!empty($selected_cat)) $tableparams['search_categ'] = $selected_cat; -if (!empty($selected_soc)) $tableparams['search_soc'] = $selected_soc; -if (!empty($selected_type)) $tableparams['search_type'] = $selected_type; +if (!empty($selected_cat)) { + $tableparams['search_categ'] = $selected_cat; +} +if (!empty($selected_soc)) { + $tableparams['search_soc'] = $selected_soc; +} +if (!empty($selected_type)) { + $tableparams['search_type'] = $selected_type; +} $tableparams['subcat'] = ($subcat === true) ? 'yes' : ''; // Adding common parameters @@ -151,6 +191,19 @@ foreach ($allparams as $key => $value) { $paramslink .= '&'.$key.'='.$value; } +// Security pack (data & check) +$socid = GETPOST('socid', 'int'); + +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'); +} + /* * View @@ -162,8 +215,12 @@ $form = new Form($db); $formother = new FormOther($db); // TODO Report from bookkeeping not yet available, so we switch on report on business events -if ($modecompta == "BOOKKEEPING") $modecompta = "CREANCES-DETTES"; -if ($modecompta == "BOOKKEEPINGCOLLECTED") $modecompta = "RECETTES-DEPENSES"; +if ($modecompta == "BOOKKEEPING") { + $modecompta = "CREANCES-DETTES"; +} +if ($modecompta == "BOOKKEEPINGCOLLECTED") { + $modecompta = "RECETTES-DEPENSES"; +} // Show report header if ($modecompta == "CREANCES-DETTES") { @@ -173,28 +230,29 @@ 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"); //$calcmode.='
    ('.$langs->trans("SeeReportInDueDebtMode",'','').')'; $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); -} elseif ($modecompta == "BOOKKEEPING") -{ -} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") -{ +} elseif ($modecompta == "BOOKKEEPING") { +} 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); -if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) $periodlink = ''.img_previous().' '.img_next().''; -else $periodlink = ''; +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) { + $periodlink = ''.img_previous().' '.img_next().''; +} else { + $periodlink = ''; +} report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') -{ +if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); } @@ -207,20 +265,19 @@ $catotal = 0; $catotal_ht = 0; $qtytotal = 0; -if ($modecompta == 'CREANCES-DETTES') -{ +if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label, p.fk_product_type as product_type,"; $sql .= " SUM(l.total_ht) as amount, SUM(l.total_ttc) as amount_ttc,"; $sql .= " SUM(CASE WHEN f.type = 2 THEN -l.qty ELSE l.qty END) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; - if ($selected_soc > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc ON (soc.rowid = f.fk_soc)"; + if ($selected_soc > 0) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc ON (soc.rowid = f.fk_soc)"; + } $sql .= ",".MAIN_DB_PREFIX."facture_fourn_det as l"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid"; - if ($selected_cat === -2) // Without any category - { + 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"; } $sql .= " WHERE l.fk_facture_fourn = f.rowid"; @@ -230,20 +287,22 @@ if ($modecompta == 'CREANCES-DETTES') if ($date_start && $date_end) { $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_type >= 0) - { - $sql .= " AND l.product_type = ".$selected_type; + if ($selected_type >= 0) { + $sql .= " AND l.product_type = ".((int) $selected_type); } - if ($selected_cat === -2) // Without any category - { + if ($selected_cat === -2) { // Without any category $sql .= " AND cp.fk_product is null"; } elseif ($selected_cat) { // Into a specific category - $sql .= " AND (c.rowid = ".$selected_cat; - if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; + $sql .= " AND (c.rowid = ".((int) $selected_cat); + if ($subcat) { + $sql .= " OR c.fk_parent = ".((int) $selected_cat); + } $sql .= ")"; $sql .= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid"; } - if ($selected_soc > 0) $sql .= " AND soc.rowid=".$selected_soc; + if ($selected_soc > 0) { + $sql .= " AND soc.rowid=".((int) $selected_soc); + } $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; $sql .= " GROUP BY p.rowid, p.ref, p.label, p.fk_product_type"; $sql .= $db->order($sortfield, $sortorder); @@ -274,8 +333,7 @@ if ($modecompta == 'CREANCES-DETTES') print ''; print ''."\n"; // Extra parameters management - foreach ($headerparams as $key => $value) - { + foreach ($headerparams as $key => $value) { print ''; } @@ -374,7 +432,7 @@ if ($modecompta == 'CREANCES-DETTES') print "
    '; + + print ''; @@ -242,26 +219,44 @@ if (!is_array($x_coll) || !is_array($x_paye)) } else { $x_both = array(); //now, from these two arrays, get another array with one rate per line - foreach (array_keys($x_coll) as $my_coll_thirdpartyid) - { + foreach (array_keys($x_coll) as $my_coll_thirdpartyid) { $x_both[$my_coll_thirdpartyid]['coll']['totalht'] = $x_coll[$my_coll_thirdpartyid]['totalht']; $x_both[$my_coll_thirdpartyid]['coll']['vat'] = $x_coll[$my_coll_thirdpartyid]['vat']; $x_both[$my_coll_thirdpartyid]['paye']['totalht'] = 0; $x_both[$my_coll_thirdpartyid]['paye']['vat'] = 0; $x_both[$my_coll_thirdpartyid]['coll']['links'] = ''; $x_both[$my_coll_thirdpartyid]['coll']['detail'] = array(); - foreach ($x_coll[$my_coll_thirdpartyid]['facid'] as $id=>$dummy) { + foreach ($x_coll[$my_coll_thirdpartyid]['facid'] as $id => $dummy) { $invoice_customer->id = $x_coll[$my_coll_thirdpartyid]['facid'][$id]; $invoice_customer->ref = $x_coll[$my_coll_thirdpartyid]['facnum'][$id]; $invoice_customer->type = $x_coll[$my_coll_thirdpartyid]['type'][$id]; - $company_static->fetch($x_coll[$my_coll_thirdpartyid]['company_id'][$id]); + + //$company_static->fetch($x_coll[$my_coll_thirdpartyid]['company_id'][$id]); + $company_static->id = $x_coll[$my_coll_thirdpartyid]['company_id'][$id]; + $company_static->name = $x_coll[$my_coll_thirdpartyid]['company_name'][$id]; + $company_static->name_alias = $x_coll[$my_coll_thirdpartyid]['company_alias'][$id]; + $company_static->email = $x_coll[$my_coll_thirdpartyid]['company_email'][$id]; + $company_static->tva_intra = $x_coll[$my_coll_thirdpartyid]['tva_intra'][$id]; + $company_static->client = $x_coll[$my_coll_thirdpartyid]['company_client'][$id]; + $company_static->fournisseur = $x_coll[$my_coll_thirdpartyid]['company_fournisseur'][$id]; + $company_static->status = $x_coll[$my_coll_thirdpartyid]['company_status'][$id]; + $company_static->code_client = $x_coll[$my_coll_thirdpartyid]['company_customer_code'][$id]; + $company_static->code_compta_client = $x_coll[$my_coll_thirdpartyid]['company_customer_accounting_code'][$id]; + $company_static->code_fournisseur = $x_coll[$my_coll_thirdpartyid]['company_supplier_code'][$id]; + $company_static->code_compta_fournisseur = $x_coll[$my_coll_thirdpartyid]['company_supplier_accounting_code'][$id]; + $x_both[$my_coll_thirdpartyid]['coll']['detail'][] = array( 'id' =>$x_coll[$my_coll_thirdpartyid]['facid'][$id], 'descr' =>$x_coll[$my_coll_thirdpartyid]['descr'][$id], + 'pid' =>$x_coll[$my_coll_thirdpartyid]['pid'][$id], 'pref' =>$x_coll[$my_coll_thirdpartyid]['pref'][$id], 'ptype' =>$x_coll[$my_coll_thirdpartyid]['ptype'][$id], + 'pstatus' =>$x_paye[$my_coll_thirdpartyid]['pstatus'][$id], + 'pstatusbuy'=>$x_paye[$my_coll_thirdpartyid]['pstatusbuy'][$id], + 'payment_id'=>$x_coll[$my_coll_thirdpartyid]['payment_id'][$id], + 'payment_ref'=>$x_coll[$my_coll_thirdpartyid]['payment_ref'][$id], 'payment_amount'=>$x_coll[$my_coll_thirdpartyid]['payment_amount'][$id], 'ftotal_ttc'=>$x_coll[$my_coll_thirdpartyid]['ftotal_ttc'][$id], 'dtotal_ttc'=>$x_coll[$my_coll_thirdpartyid]['dtotal_ttc'][$id], @@ -269,7 +264,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'drate' =>$x_coll[$my_coll_thirdpartyid]['drate'][$id], 'datef' =>$x_coll[$my_coll_thirdpartyid]['datef'][$id], 'datep' =>$x_coll[$my_coll_thirdpartyid]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1, '', 20), + 'ddate_start'=>$x_coll[$my_coll_thirdpartyid]['ddate_start'][$id], 'ddate_end' =>$x_coll[$my_coll_thirdpartyid]['ddate_end'][$id], 'totalht' =>$x_coll[$my_coll_thirdpartyid]['totalht_list'][$id], @@ -289,11 +286,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_both[$my_paye_thirdpartyid]['paye']['links'] = ''; $x_both[$my_paye_thirdpartyid]['paye']['detail'] = array(); - foreach ($x_paye[$my_paye_thirdpartyid]['facid'] as $id=>$dummy) - { + foreach ($x_paye[$my_paye_thirdpartyid]['facid'] as $id => $dummy) { // ExpenseReport - if ($x_paye[$my_paye_thirdpartyid]['ptype'][$id] == 'ExpenseReportPayment') - { + if ($x_paye[$my_paye_thirdpartyid]['ptype'][$id] == 'ExpenseReportPayment') { $expensereport->id = $x_paye[$my_paye_thirdpartyid]['facid'][$id]; $expensereport->ref = $x_paye[$my_paye_thirdpartyid]['facnum'][$id]; $expensereport->type = $x_paye[$my_paye_thirdpartyid]['type'][$id]; @@ -301,10 +296,15 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_both[$my_paye_thirdpartyid]['paye']['detail'][] = array( 'id' =>$x_paye[$my_paye_thirdpartyid]['facid'][$id], 'descr' =>$x_paye[$my_paye_thirdpartyid]['descr'][$id], + 'pid' =>$x_paye[$my_paye_thirdpartyid]['pid'][$id], 'pref' =>$x_paye[$my_paye_thirdpartyid]['pref'][$id], 'ptype' =>$x_paye[$my_paye_thirdpartyid]['ptype'][$id], + 'pstatus' =>$x_paye[$my_paye_thirdpartyid]['pstatus'][$id], + 'pstatusbuy' =>$x_paye[$my_paye_thirdpartyid]['pstatusbuy'][$id], + 'payment_id' =>$x_paye[$my_paye_thirdpartyid]['payment_id'][$id], + 'payment_ref' =>$x_paye[$my_paye_thirdpartyid]['payment_ref'][$id], 'payment_amount' =>$x_paye[$my_paye_thirdpartyid]['payment_amount'][$id], 'ftotal_ttc' =>price2num($x_paye[$my_paye_thirdpartyid]['ftotal_ttc'][$id]), 'dtotal_ttc' =>price2num($x_paye[$my_paye_thirdpartyid]['dtotal_ttc'][$id]), @@ -320,14 +320,33 @@ if (!is_array($x_coll) || !is_array($x_paye)) $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]; - $company_static->fetch($x_paye[$my_paye_thirdpartyid]['company_id'][$id]); + + //$company_static->fetch($x_paye[$my_paye_thirdpartyid]['company_id'][$id]); + $company_static->id = $x_paye[$my_paye_thirdpartyid]['company_id'][$id]; + $company_static->name = $x_paye[$my_paye_thirdpartyid]['company_name'][$id]; + $company_static->name_alias = $x_paye[$my_paye_thirdpartyid]['company_alias'][$id]; + $company_static->email = $x_paye[$my_paye_thirdpartyid]['company_email'][$id]; + $company_static->tva_intra = $x_paye[$my_paye_thirdpartyid]['tva_intra'][$id]; + $company_static->client = $x_paye[$my_paye_thirdpartyid]['company_client'][$id]; + $company_static->fournisseur = $x_paye[$my_paye_thirdpartyid]['company_fournisseur'][$id]; + $company_static->status = $x_paye[$my_paye_thirdpartyid]['company_status'][$id]; + $company_static->code_client = $x_paye[$my_paye_thirdpartyid]['company_customer_code'][$id]; + $company_static->code_compta_client = $x_paye[$my_paye_thirdpartyid]['company_customer_accounting_code'][$id]; + $company_static->code_fournisseur = $x_paye[$my_paye_thirdpartyid]['company_supplier_code'][$id]; + $company_static->code_compta_fournisseur = $x_paye[$my_paye_thirdpartyid]['company_supplier_accounting_code'][$id]; + $x_both[$my_paye_thirdpartyid]['paye']['detail'][] = array( 'id' =>$x_paye[$my_paye_thirdpartyid]['facid'][$id], 'descr' =>$x_paye[$my_paye_thirdpartyid]['descr'][$id], + 'pid' =>$x_paye[$my_paye_thirdpartyid]['pid'][$id], 'pref' =>$x_paye[$my_paye_thirdpartyid]['pref'][$id], 'ptype' =>$x_paye[$my_paye_thirdpartyid]['ptype'][$id], + 'pstatus' =>$x_paye[$my_paye_thirdpartyid]['pstatus'][$id], + 'pstatusbuy'=>$x_paye[$my_paye_thirdpartyid]['pstatusbuy'][$id], + 'payment_id'=>$x_paye[$my_paye_thirdpartyid]['payment_id'][$id], + 'payment_ref'=>$x_paye[$my_paye_thirdpartyid]['payment_ref'][$id], 'payment_amount'=>$x_paye[$my_paye_thirdpartyid]['payment_amount'][$id], 'ftotal_ttc'=>price2num($x_paye[$my_paye_thirdpartyid]['ftotal_ttc'][$id]), 'dtotal_ttc'=>price2num($x_paye[$my_paye_thirdpartyid]['dtotal_ttc'][$id]), @@ -335,7 +354,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'drate' =>$x_paye[$my_coll_thirdpartyid]['drate'][$id], 'datef' =>$x_paye[$my_paye_thirdpartyid]['datef'][$id], 'datep' =>$x_paye[$my_paye_thirdpartyid]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1, '', 20), + 'ddate_start'=>$x_paye[$my_paye_thirdpartyid]['ddate_start'][$id], 'ddate_end' =>$x_paye[$my_paye_thirdpartyid]['ddate_end'][$id], 'totalht' =>price2num($x_paye[$my_paye_thirdpartyid]['totalht_list'][$id]), @@ -355,21 +376,20 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_paye_sum = 0; $x_paye_ht = 0; - $span = $columns; - if ($modetax != 1) $span += 2; - //print ''; // Customers invoices print ''; print ''; print ''; - if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; - else print ''; + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + print ''; + } else { + print ''; + } print ''; print ''; - if ($modetax != 1) - { + if ($modetax != 1) { print ''; print ''; } @@ -392,10 +412,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) $subtot_coll_total_ht = 0; $subtot_coll_vat = 0; - if ($min == 0 || ($min > 0 && $x_both[$thirdparty_id]['coll']['totalht'] > $min)) - { - if (is_array($x_both[$thirdparty_id]['coll']['detail'])) - { + if ($min == 0 || ($min > 0 && $x_both[$thirdparty_id]['coll']['totalht'] > $min)) { + if (is_array($x_both[$thirdparty_id]['coll']['detail'])) { // VAT Rate print ""; print ''; + print ''; } // Payment @@ -492,7 +513,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; if ($fields['payment_amount'] && $fields['ftotal_ttc']) { $payment_static->id = $fields['payment_id']; - print $payment_static->getNomUrl(2); + $payment_static->ref = $fields['payment_ref']; + print $payment_static->getNomUrl(2, '', '', 0).' '; } if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { @@ -501,7 +523,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } - print price(price2num($fields['payment_amount'], 'MT')); + print ''.price(price2num($fields['payment_amount'], 'MT')).''; if (isset($fields['payment_amount'])) { print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; } @@ -510,17 +532,17 @@ if (!is_array($x_coll) || !is_array($x_paye)) } // Total collected - print ''; + print ''; // VAT - print ''; + print ''; print ''; $subtot_coll_total_ht += $temp_ht; @@ -528,6 +550,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_coll_sum += $temp_vat; } } + // Total customers for this vat rate print ''; print ''; @@ -536,14 +559,13 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } } - if (count($x_coll) == 0) // Show a total ine if nothing shown - { + if (count($x_coll) == 0) { // Show a total line if nothing shown print ''; print ''; print ''; @@ -563,8 +585,11 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; print ''; - if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; - else print ''; + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') { + print ''; + } else { + print ''; + } print ''; print ''; if ($modetax != 1) { @@ -575,8 +600,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''."\n"; - foreach (array_keys($x_paye) as $thirdparty_id) - { + foreach (array_keys($x_paye) as $thirdparty_id) { $subtot_paye_total_ht = 0; $subtot_paye_vat = 0; @@ -625,7 +649,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) } // Company name - print ''; + print ''; // Description print ''; + print ''; } // Payment $ratiopaymentinvoice = 1; - if ($modetax != 1) - { + if ($modetax != 1) { print ''; + print ''; // VAT - print ''; + print ''; print ''; $subtot_paye_total_ht += $temp_ht; @@ -725,8 +749,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } } diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index f8524dcfb3e..eee1abcd2f5 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -34,8 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } @@ -47,11 +46,6 @@ $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', 'vat', 'charges'); - - // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -63,29 +57,41 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; - +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Tva($db); -if ($id > 0) $object->fetch($id); + +if ($id > 0) { + $object->fetch($id); +} $upload_dir = $conf->tax->dir_output.'/vat/'.dol_sanitizeFileName($object->ref); $modulepart = 'tax-vat'; +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); + /* * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } @@ -94,14 +100,15 @@ if ($action == 'setlib' && $user->rights->tax->charges->creer) */ $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $title = $langs->trans("VATPayment").' - '.$langs->trans("Documents"); $help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; llxHeader("", $title, $help_url); -if ($object->id) -{ +if ($object->id) { $alreadypayed = $object->getSommePaiement(); $head = vat_prepare_head($object); @@ -126,8 +133,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 576a9038165..e1ac3f96a2d 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -4,7 +4,9 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2021 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 @@ -35,67 +37,32 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php'; // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); -$now = dol_now(); -$current_date = dol_getdate($now); -if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1; +$refresh = GETPOSTISSET('submit') ? true : false; +$year_current = GETPOSTISSET('year') ? GETPOST('year', 'int') : dol_print_date($now, '%Y', 'tzserver'); +$year_start = $year_current; +$month_current = GETPOSTISSET('month') ? GETPOST('month', 'int') : dol_print_date($now, '%m', 'tzserver'); +$month_start = $month_current; -// Date range -$year = GETPOST("year", "int"); -if (empty($year)) -{ - $year_current = $current_date['year']; - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; -} -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); -// Set default period if not defined -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 (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 - 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--; - } - } else { - if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year - $year_start--; - } - } - $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 - $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 { - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } - } -} +$refresh = true; + +include DOL_DOCUMENT_ROOT.'/compta/tva/initdatesforvat.inc.php'; // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products $modetax = $conf->global->TAX_MODE; -if (GETPOSTISSET("modetax")) $modetax = GETPOST("modetax", 'int'); -if (empty($modetax)) $modetax = 0; +if (GETPOSTISSET("modetax")) { + $modetax = GETPOST("modetax", 'int'); +} +if (empty($modetax)) { + $modetax = 0; +} // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); /** @@ -108,7 +75,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges'); */ function pt($db, $sql, $date) { - global $conf, $bc, $langs; + global $conf, $bc, $langs, $form; $result = $db->query($sql); if ($result) { @@ -120,7 +87,7 @@ function pt($db, $sql, $date) print ''; print ''; print ''; - print ''; + print ''; print "\n"; $totalclaimed = 0; @@ -136,35 +103,31 @@ function pt($db, $sql, $date) $mode = $obj->mode; //print $obj->dm.' '.$obj->mode.' '.$previousmonth.' '.$previousmode; - if ($obj->mode == 'claimed' && !empty($previousmode)) - { + if ($obj->mode == 'claimed' && !empty($previousmode)) { print ''; print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; $amountclaimed = 0; $amountpaid = 0; } - if ($obj->mode == 'claimed') - { + if ($obj->mode == 'claimed') { $amountclaimed = $obj->mm; $totalclaimed = $totalclaimed + $amountclaimed; } - if ($obj->mode == 'paid') - { + if ($obj->mode == 'paid') { $amountpaid = $obj->mm; $totalpaid = $totalpaid + $amountpaid; } - if ($obj->mode == 'paid') - { + if ($obj->mode == 'paid') { print ''; print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; $amountclaimed = 0; $amountpaid = 0; @@ -178,8 +141,7 @@ function pt($db, $sql, $date) $i++; } - if ($mode == 'claimed' && !empty($previousmode)) - { + if ($mode == 'claimed' && !empty($previousmode)) { print ''; print '\n"; print '\n"; @@ -222,20 +184,36 @@ $description = $fsearch; // Show report header $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'); +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').')'; $description .= $langs->trans("VATSummary").'
    '; -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description .= $langs->trans("RulesVATDueProducts"); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description .= $langs->trans("RulesVATInProducts"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description .= '
    '.$langs->trans("RulesVATDueServices"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description .= '
    '.$langs->trans("RulesVATInServices"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') { + $description .= $langs->trans("RulesVATDueProducts"); +} +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') { + $description .= $langs->trans("RulesVATInProducts"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') { + $description .= '
    '.$langs->trans("RulesVATDueServices"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + $description .= '
    '.$langs->trans("RulesVATInServices"); +} if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= '
    '.$langs->trans("DepositsAreNotIncluded"); } -if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { + $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +} $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -254,364 +232,320 @@ report_header($name, '', $period, $periodlink, $description, $builddate, $export print '
    '; -print '
    '; +if ($refresh === true) { + print '
    '; -print load_fiche_titre($langs->trans("VATSummary"), '', ''); + print load_fiche_titre($langs->trans("VATSummary"), '', ''); -print '
    '; + //print $langs->trans("Type"); + print ''; + print '
    '; - print '
    '; - print $langs->trans("Type").':   '; - print '
    '; print '
    '; - print "
    \n"; - print dol_get_fiche_head(); - - print ''; - - print ""; - print ''; - - print ''; + print ''; + //print "
    \n"; // Label if ($refund == 1) { @@ -263,29 +425,50 @@ if ($action == 'create') } else { $label = $langs->trans("VATPayment"); } - print ''; + print ''; + + print ''; // Amount - print ''; + print ''; - if (!empty($conf->banque->enabled)) - { - print ''; - } + print ''; + + // Auto create payment + print ''; + print ''."\n"; + + print ''; + print ''; // Type payment - print '\n"; print ""; + if (!empty($conf->banque->enabled)) { + print ''; + } + // Number - print ''."\n"; + // Comments + 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 @@ -296,6 +479,11 @@ if ($action == 'create') print dol_get_fiche_end(); print '
    '; + print '
    '; + print ' '.$langs->trans("ClosePaidVATAutomatically").''; + print '
    '; + print '
    '; + print ''; print '     '; print ''; @@ -305,10 +493,38 @@ if ($action == 'create') } // View mode -if ($id) -{ +if ($id) { $head = vat_prepare_head($object); + $totalpaye = $object->getSommePaiement(); + + // 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', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); + $formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); + + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVAT', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240); + } + + if ($action == 'paid') { + $text = $langs->trans('ConfirmPayVAT'); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PayVAT'), $text, "confirm_paid", '', '', 2); + } + + if ($action == 'delete') { + $text = $langs->trans('ConfirmDeleteVAT'); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteVAT'), $text, 'confirm_delete', '', '', 2); + } + + if ($action == 'edit') { + print "id&action=update\" method=\"post\">"; + print ''; + } + print dol_get_fiche_head($head, 'card', $langs->trans("VATPayment"), -1, 'payment'); $morehtmlref = '
    '; @@ -320,9 +536,12 @@ if ($id) $linkback = ''.$langs->trans("BackToList").''; + $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); print '
    '; + print '
    '; print '
    '; print '
    '.$langs->trans("DatePayment").''; - print $form->selectDate($datep, "datep", '', '', '', 'add', 1, 1); - print '
    '.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; - print $form->selectDate((GETPOST("datevmonth", 'int') ? $datev : -1), "datev", '', '', '', 'add', 1, 1); - print '
    '.$langs->trans("Label").'
    '.$langs->trans("Label").'
    '.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).''; + print $form->selectDate((GETPOST("datevmonth", 'int') ? $datev : -1), "datev", '', '', '', 'add', 1, 1); + print '
    '.$langs->trans("Amount").'
    '.$langs->trans("Amount").'
    '.$langs->trans("BankAccount").''; - $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 2); // List of bank account available - print '

    '.$langs->trans('AutomaticCreationPayment').'
    '.$langs->trans("DatePayment").''; + print $form->selectDate($datep, "datep", '', '', '', 'add', 1, 1); + print '
    '.$langs->trans("PaymentMode").''; + print '
    '.$langs->trans("PaymentMode").''; $form->select_types_paiements(GETPOST("type_payment"), "type_payment"); print "
    '.$langs->trans("BankAccount").''; + print img_picto('', 'bank_account', 'pictofixedwidth'); + $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available + print '
    '.$langs->trans('Numero'); + print '
    '.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print '
    '.$langs->trans("Comments").'
    '; @@ -330,10 +549,10 @@ if ($id) // Label //print ''; - print ""; + /*print ""; print ''; + print '';*/ print ''; - print ''; + if ($action == 'edit') { + print ''; + } else { + print ''; + } - if (!empty($conf->banque->enabled)) - { - if ($object->fk_account > 0) - { - $bankline = new AccountLine($db); - $bankline->fetch($object->fk_bank); + // Mode of payment + print ''; - print ''; - print ''; - print ''; - print ''; + // Bank account + if (!empty($conf->banque->enabled)) { + print ''; + print ''; } // Other attributes @@ -369,22 +613,167 @@ if ($id) print ''; - print dol_get_fiche_end(); + print '
    '; + print '
    '; + + $nbcols = 3; + if (!empty($conf->banque->enabled)) { + $nbcols++; + } /* - * Action buttons + * Payments + */ + $sql = "SELECT p.rowid, p.num_paiement as num_payment, p.datep as dp, p.amount,"; + $sql .= " c.code as type_code,c.libelle as paiement_type,"; + $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.currency_code as bacurrency_code, ba.fk_accountancy_journal'; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_vat as p"; + $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."c_paiement as c ON p.fk_typepaiement = c.id"; + $sql .= ", ".MAIN_DB_PREFIX."tva as tva"; + $sql .= " WHERE p.fk_tva = ".((int) $id); + $sql .= " AND p.fk_tva = tva.rowid"; + $sql .= " AND tva.entity IN (".getEntity('tax').")"; + $sql .= " ORDER BY dp DESC"; + + //print $sql; + $resql = $db->query($sql); + if ($resql) { + $totalpaye = 0; + + $num = $db->num_rows($resql); + $i = 0; + $total = 0; + + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '
    '.$langs->trans("Label").''.$object->label.'
    '.$langs->trans("DatePayment").''; print dol_print_date($object->datep, 'day'); - print '
    '; print $form->editfieldkey($form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")), 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); @@ -342,22 +561,47 @@ if ($id) //print dol_print_date($object->datev,'day'); print '
    '.$langs->trans("Amount").''.price($object->amount).'
    ' . $langs->trans("Amount") . '
    ' . $langs->trans("Amount") . '' . price($object->amount) . '
    '; + print ''; + if ($action != 'editmode') { + print ''; + } + print '
    '; + print $langs->trans('PaymentMode'); + print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; + print '
    '; + if ($action == 'editmode') { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->type_payment, 'mode_reglement_id'); + } else { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->type_payment, 'none'); + } + print '
    '.$langs->trans('BankTransactionLine').''; - print $bankline->getNomUrl(1, 0, 'showall'); - print '
    '; + print ''; } + print '
    '; + print $langs->trans('BankAccount'); + print ''; + if ($action != 'editbankaccount' && $user->rights->tax->charges->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'); + } + print '
    '; + print ''; + print ''; + print ''; + print ''; + if (!empty($conf->banque->enabled)) { + print ''; + } + print ''; + print ''; + + if ($num > 0) { + $bankaccountstatic = new Account($db); + while ($i < $num) { + $objp = $db->fetch_object($resql); + + print ''; + print '\n"; + $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type; + print "\n"; + if (!empty($conf->banque->enabled)) { + $bankaccountstatic->id = $objp->baid; + $bankaccountstatic->ref = $objp->baref; + $bankaccountstatic->label = $objp->baref; + $bankaccountstatic->number = $objp->banumber; + $bankaccountstatic->currency_code = $objp->bacurrency_code; + + if (!empty($conf->accounting->enabled)) { + $bankaccountstatic->account_number = $objp->account_number; + + $accountingjournal = new AccountingJournal($db); + $accountingjournal->fetch($objp->fk_accountancy_journal); + $bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); + } + + print ''; + } + print '\n"; + print ""; + $totalpaye += $objp->amount; + $i++; + } + } else { + print ''; + print ''; + print ''; + } + + print '\n"; + print '\n"; + + $resteapayer = $object->amount - $totalpaye; + $cssforamountpaymentcomplete = 'amountpaymentcomplete'; + + print '"; + print '\n"; + + print "
    '.$langs->trans("RefPayment").''.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans('BankAccount').''.$langs->trans("Amount").'
    '; + print ''.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp), 'day')."".$labeltype.' '.$objp->num_payment."'; + if ($bankaccountstatic->id) { + print $bankaccountstatic->getNomUrl(1, 'transactions'); + } + print ''.price($objp->amount)."
    '.$langs->trans("None").'
    '.$langs->trans("AlreadyPaid")." :".price($totalpaye)."
    '.$langs->trans("AmountExpected")." :".price($object->amount)."
    '.$langs->trans("RemainderToPay")." :'.price($resteapayer)."
    "; + print ''; + + $db->free($resql); + } else { + dol_print_error($db); + } + + print ''; + print ''; + print ''; + + print '
    '; + + print dol_get_fiche_end(); + + if ($action == 'edit') { + print '
    '; + print ''; + print '   '; + print ''; + print '
    '; + print "\n"; + } + + /* + * Action bar */ print "
    \n"; - if ($object->rappro == 0) - { - if (!empty($user->rights->tax->charges->supprimer)) - { - print ''; - } else { - print ''; + if ($action != 'edit') { + // Reopen + if ($object->paye && $user->rights->tax->charges->creer) { + print ""; + } + + // Edit + if ($object->paye == 0 && $user->rights->tax->charges->creer) { + print ""; + } + + // Emit payment + if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { + print ""; + } + + // Classify 'paid' + if ($object->paye == 0 + && ( + (round($resteapayer) <= 0 && $object->amount > 0) + || (round($resteapayer) >= 0 && $object->amount < 0) + ) + && $user->rights->tax->charges->creer) { + print ""; + } + + // Clone + if ($user->rights->tax->charges->creer) { + print ""; + } + + if (!empty($user->rights->tax->charges->supprimer) && empty($totalpaye)) { + print ''; + } else { + print ''; } - } else { - print ''; } print "
    "; } diff --git a/htdocs/compta/tva/class/index.html b/htdocs/compta/tva/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/compta/tva/class/paymentvat.class.php b/htdocs/compta/tva/class/paymentvat.class.php new file mode 100644 index 00000000000..f8a397bdb9a --- /dev/null +++ b/htdocs/compta/tva/class/paymentvat.class.php @@ -0,0 +1,751 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2021 Gauthier VERDOL + * + * 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/compta/sociales/class/paymentsocialcontribution.class.php + * \ingroup facture + * \brief File of class to manage payment of social contributions + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; + + +/** + * Class to manage payments of social contributions + */ +class PaymentVAT extends CommonObject +{ + /** + * @var string ID to identify managed object + */ + public $element = 'payment_vat'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'payment_vat'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'payment'; + + /** + * @var int ID + */ + public $fk_tva; + + public $datec = ''; + public $tms = ''; + public $datep = ''; + + /** + * @deprecated + * @see $amount + */ + public $total; + + public $amount; // Total amount of payment + public $amounts = array(); // Array of amounts + + /** + * @var int ID + */ + public $fk_typepaiement; + + /** + * @var string + * @deprecated + */ + public $num_paiement; + + /** + * @var string + */ + public $num_payment; + + /** + * @var int ID + */ + public $fk_bank; + + /** + * @var int ID + */ + public $fk_user_creat; + + /** + * @var int ID + */ + public $fk_user_modif; + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + /** + * Create payment of social contribution into database. + * Use this->amounts to have list of lines for the payment + * + * @param User $user User making payment + * @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more + * @return int <0 if KO, id of payment if OK + */ + public function create($user, $closepaidcontrib = 0) + { + global $conf, $langs; + + $error = 0; + + $now = dol_now(); + + dol_syslog(get_class($this)."::create", LOG_DEBUG); + + // Validate parametres + if (!$this->datepaye) { + $this->error = 'ErrorBadValueForParameterCreatePaymentVAT'; + return -1; + } + + // Clean parameters + if (isset($this->fk_tva)) { + $this->fk_tva = (int) $this->fk_tva; + } + 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->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; + } + + $totalamount = 0; + foreach ($this->amounts as $key => $value) { // How payment is dispatch + $newvalue = price2num($value, 'MT'); + $this->amounts[$key] = $newvalue; + $totalamount += $newvalue; + } + $totalamount = price2num($totalamount); + + // Check parameters + if ($totalamount == 0) { + return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + } + + + $this->db->begin(); + + if ($totalamount != 0) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_vat (fk_tva, datec, datep, amount,"; + $sql .= " fk_typepaiement, num_paiement, note, fk_user_creat, fk_bank)"; + $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; + $sql .= " '".$this->db->idate($this->datepaye)."',"; + $sql .= " ".$totalamount.","; + $sql .= " ".$this->paiementtype.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".$user->id.","; + $sql .= " 0)"; + + $resql = $this->db->query($sql); + if ($resql) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_vat"); + + // Insere tableau des montants / factures + foreach ($this->amounts as $key => $amount) { + $contribid = $key; + if (is_numeric($amount) && $amount <> 0) { + $amount = price2num($amount); + + // If we want to closed payed invoices + if ($closepaidcontrib) { + $contrib = new Tva($this->db); + $contrib->fetch($contribid); + $paiement = $contrib->getSommePaiement(); + //$creditnotes=$contrib->getSumCreditNotesUsed(); + $creditnotes = 0; + //$deposits=$contrib->getSumDepositsUsed(); + $deposits = 0; + $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); + $remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT'); + if ($remaintopay == 0) { + $result = $contrib->setPaid($user); + } else { + dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + } + } + } + } + } else { + $error++; + } + } + + $result = $this->call_trigger('PAYMENTVAT_CREATE', $user); + if ($result < 0) { + $error++; + } + + if ($totalamount != 0 && !$error) { + $this->amount = $totalamount; + $this->total = $totalamount; // deprecated + $this->db->commit(); + return $this->id; + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -1; + } + } + + /** + * Load object in memory from database + * + * @param int $id Id object + * @return int <0 if KO, >0 if OK + */ + public function fetch($id) + { + global $langs; + $sql = "SELECT"; + $sql .= " t.rowid,"; + $sql .= " t.fk_tva,"; + $sql .= " t.datec,"; + $sql .= " t.tms,"; + $sql .= " t.datep,"; + $sql .= " t.amount,"; + $sql .= " t.fk_typepaiement,"; + $sql .= " t.num_paiement as num_payment,"; + $sql .= " t.note,"; + $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."payment_vat as t LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepaiement = pt.id"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; + $sql .= " WHERE t.rowid = ".((int) $id); + // TODO link on entity of tax; + + 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->rowid; + + $this->fk_tva = $obj->fk_tva; + $this->datec = $this->db->jdate($obj->datec); + $this->tms = $this->db->jdate($obj->tms); + $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->fk_bank = $obj->fk_bank; + $this->fk_user_creat = $obj->fk_user_creat; + $this->fk_user_modif = $obj->fk_user_modif; + + $this->type_code = $obj->type_code; + $this->type_label = $obj->type_label; + + $this->bank_account = $obj->fk_account; + $this->bank_line = $obj->fk_bank; + } + $this->db->free($resql); + + return 1; + } else { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + } + + + /** + * 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 (isset($this->fk_tva)) { + $this->fk_tva = (int) $this->fk_tva; + } + 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->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; + } + + + + // Check parameters + // Put here code to add control on parameters values + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET"; + + $sql .= " fk_tva=".(isset($this->fk_tva) ? $this->fk_tva : "null").","; + $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; + $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; + $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 .= " 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").","; + $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null").""; + + + $sql .= " WHERE rowid=".((int) $this->id); + + $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(); + } + + // 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 delete + * @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; + $error = 0; + + dol_syslog(get_class($this)."::delete"); + + $this->db->begin(); + + if ($this->bank_line > 0) { + $accline = new AccountLine($this->db); + $accline->fetch($this->bank_line); + $result = $accline->delete(); + if ($result < 0) { + $this->errors[] = $accline->error; + $error++; + } + } + + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_vat"; + $sql .= " WHERE rowid=".((int) $this->id); + + 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; + } + } + + + + /** + * 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 + * @return int New id of clone + */ + public function createFromClone(User $user, $fromid) + { + $error = 0; + + $object = new PaymentSocialContribution($this->db); + + $this->db->begin(); + + // Load source object + $object->fetch($fromid); + $object->id = 0; + $object->statut = 0; + + // Clear fields + // ... + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->create($user); + + // Other options + if ($result < 0) { + $this->error = $object->error; + $error++; + } + + unset($object->context['createfromclone']); + + // End + if (!$error) { + $this->db->commit(); + return $object->id; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * 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() + { + $this->id = 0; + + $this->fk_tva = 0; + $this->datec = ''; + $this->tms = ''; + $this->datep = ''; + $this->amount = ''; + $this->fk_typepaiement = ''; + $this->num_payment = ''; + $this->note_private = ''; + $this->note_public = ''; + $this->fk_bank = 0; + $this->fk_user_creat = 0; + $this->fk_user_modif = 0; + } + + + /** + * Add record into bank for payment with links between this bank record and invoices of payment. + * All payment properties must have been set first like after a call to create(). + * + * @param User $user Object of user making payment + * @param string $mode 'payment_sc' + * @param string $label Label to use in bank record + * @param int $accountid Id of bank account to do link with + * @param string $emetteur_nom Name of transmitter + * @param string $emetteur_banque Name of bank + * @return int <0 if KO, >0 if OK + */ + public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) + { + global $conf; + + // Clean data + $this->num_payment = trim($this->num_payment ? $this->num_payment : $this->num_paiement); + + $error = 0; + + if (!empty($conf->banque->enabled)) { + include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + + $acc = new Account($this->db); + $acc->fetch($accountid); + + $total = $this->total; + if ($mode == 'payment_vat') { + $total = -$total; + } + + // Insert payment into llx_bank + $bank_line_id = $acc->addline( + $this->datepaye, + $this->paiementtype, // Payment mode id or code ("CHQ or VIR for example") + $label, + $total, + $this->num_payment, + '', + $user, + $emetteur_nom, + $emetteur_banque + ); + + // Mise a jour fk_bank dans llx_paiement. + // On connait ainsi le paiement qui a genere l'ecriture bancaire + if ($bank_line_id > 0) { + $result = $this->update_fk_bank($bank_line_id); + if ($result <= 0) { + $error++; + dol_print_error($this->db); + } + + // Add link 'payment', 'payment_supplier', 'payment_sc' in bank_url between payment and bank transaction + $url = ''; + if ($mode == 'payment_vat') { + $url = DOL_URL_ROOT.'/compta/payment_vat/card.php?id='; + } + if ($url) { + $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); + if ($result <= 0) { + $error++; + dol_print_error($this->db); + } + } + + // Add link 'company' in bank_url between invoice and bank transaction (for each invoice concerned by payment) + $linkaddedforthirdparty = array(); + foreach ($this->amounts as $key => $value) { + if ($mode == 'payment_vat') { + $tva = new Tva($this->db); + $tva->fetch($key); + $result = $acc->add_url_line($bank_line_id, $tva->id, DOL_URL_ROOT.'/compta/tva/card.php?id=', '('.$tva->label.')', 'vat'); + if ($result <= 0) { + dol_print_error($this->db); + } + } + } + } else { + $this->error = $acc->error; + $error++; + } + } + + if (!$error) { + return 1; + } else { + return -1; + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Mise a jour du lien entre le paiement de tva et la ligne dans llx_bank generee + * + * @param int $id_bank Id if bank + * @return int >0 if OK, <=0 if KO + */ + public function update_fk_bank($id_bank) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + return 1; + } else { + $this->error = $this->db->error(); + return 0; + } + } + + + /** + * Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) + * + * @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 = 0) + { + return $this->LibStatut($this->statut, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Renvoi le libelle d'un statut donne + * + * @param int $status 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 Libelle du statut + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + + $langs->load('compta'); + /*if ($mode == 0) + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 1) + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 2) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 3) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4'); + } + if ($mode == 4) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 5) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + } + if ($mode == 6) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + }*/ + return ''; + } + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $maxlen Longueur max libelle + * @return string Chaine avec URL + */ + public function getNomUrl($withpicto = 0, $maxlen = 0) + { + global $langs; + + $result = ''; + + if (empty($this->ref)) { + $this->ref = $this->lib; + } + + $label = img_picto('', $this->picto).' '.$langs->trans("VATPayment").''; + $label .= '
    '.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->label)) { + $labeltoshow = $this->label; + $reg = array(); + if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) { + // Label generique car entre parentheses. On l'affiche en le traduisant + if ($reg[1] == 'paiement') { + $reg[1] = 'Payment'; + } + $labeltoshow = $langs->trans($reg[1]); + } + $label .= '
    '.$langs->trans('Label').': '.$labeltoshow; + } + if ($this->datep) { + $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->datep, 'day'); + } + + if (!empty($this->id)) { + $link = ''; + $linkend = ''; + + if ($withpicto) { + $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + } + } + + return $result; + } +} diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 4b97070cce6..ff35ece947b 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2011-2017 Alexandre Spangaro * Copyright (C) 2018 Philippe Grand * Copyright (C) 2018 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -80,6 +81,10 @@ class Tva extends CommonObject */ public $fk_user_modif; + + const STATUS_UNPAID = 0; + const STATUS_PAID = 1; + /** * Constructor * @@ -107,8 +112,9 @@ class Tva extends CommonObject // Clean parameters $this->amount = trim($this->amount); $this->label = trim($this->label); + $this->type_payment = (int) $this->type_payment; $this->note = trim($this->note); - $this->fk_bank = (int) $this->fk_bank; + $this->fk_account = (int) $this->fk_account; $this->fk_user_creat = (int) $this->fk_user_creat; $this->fk_user_modif = (int) $this->fk_user_modif; @@ -125,7 +131,8 @@ class Tva extends CommonObject $sql .= "amount,"; $sql .= "label,"; $sql .= "note,"; - $sql .= "fk_bank,"; + $sql .= "fk_account,"; + $sql .= "fk_typepayment,"; $sql .= "fk_user_creat,"; $sql .= "fk_user_modif"; $sql .= ") VALUES ("; @@ -135,24 +142,25 @@ class Tva extends CommonObject $sql .= " '".$this->db->escape($this->amount)."',"; $sql .= " '".$this->db->escape($this->label)."',"; $sql .= " '".$this->db->escape($this->note)."',"; - $sql .= " ".($this->fk_bank <= 0 ? "NULL" : "'".$this->db->escape($this->fk_bank)."'").","; + $sql .= " '".$this->db->escape($this->fk_account)."',"; + $sql .= " '".$this->db->escape($this->type_payment)."',"; $sql .= " '".$this->db->escape($this->fk_user_creat)."',"; $sql .= " '".$this->db->escape($this->fk_user_modif)."'"; $sql .= ")"; - dol_syslog(get_class($this)."::create", LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // Call trigger $result = $this->call_trigger('TVA_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -183,7 +191,6 @@ class Tva extends CommonObject $this->amount = trim($this->amount); $this->label = trim($this->label); $this->note = trim($this->note); - $this->fk_bank = (int) $this->fk_bank; $this->fk_user_creat = (int) $this->fk_user_creat; $this->fk_user_modif = (int) $this->fk_user_modif; @@ -200,29 +207,27 @@ class Tva extends CommonObject $sql .= " amount=".price2num($this->amount).","; $sql .= " label='".$this->db->escape($this->label)."',"; $sql .= " note='".$this->db->escape($this->note)."',"; - $sql .= " fk_bank=".$this->fk_bank.","; $sql .= " fk_user_creat=".$this->fk_user_creat.","; $sql .= " fk_user_modif=".($this->fk_user_modif > 0 ? $this->fk_user_modif : $user->id).""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('TVA_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -231,6 +236,46 @@ class Tva extends CommonObject } } + /** + * Tag TVA as payed completely + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setPaid($user) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."tva SET"; + $sql .= " paye = 1"; + $sql .= " WHERE rowid = ".$this->id; + $resql = $this->db->query($sql); + if ($resql) { + return 1; + } else { + return -1; + } + } + + /** + * Remove tag payed on TVA + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setUnpaid($user) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."tva SET"; + $sql .= " paye = 0"; + $sql .= " WHERE rowid = ".$this->id; + $resql = $this->db->query($sql); + if ($resql) { + return 1; + } else { + return -1; + } + } + /** * Load object in memory from database @@ -253,23 +298,19 @@ class Tva extends CommonObject $sql .= " t.num_payment,"; $sql .= " t.label,"; $sql .= " t.note,"; - $sql .= " t.fk_bank,"; + $sql .= " t.paye,"; $sql .= " t.fk_user_creat,"; $sql .= " t.fk_user_modif,"; - $sql .= " b.fk_account,"; - $sql .= " b.fk_type,"; - $sql .= " b.rappro"; + $sql .= " t.fk_account"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; - $sql .= " WHERE t.rowid = ".$id; + //$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -281,8 +322,8 @@ class Tva extends CommonObject $this->type_payment = $obj->fk_typepayment; $this->num_payment = $obj->num_payment; $this->label = $obj->label; + $this->paye = $obj->paye; $this->note = $obj->note; - $this->fk_bank = $obj->fk_bank; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; $this->fk_account = $obj->fk_account; @@ -293,18 +334,18 @@ class Tva extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } - /** - * Delete object in database - * - * @param User $user User that delete - * @return int <0 if KO, >0 if OK - */ + /** + * Delete object in database + * + * @param User $user User that delete + * @return int <0 if KO, >0 if OK + */ public function delete($user) { global $conf, $langs; @@ -313,16 +354,17 @@ class Tva extends CommonObject // Call trigger $result = $this->call_trigger('TVA_DELETE', $user); - if ($result < 0) return -1; + if ($result < 0) { + return -1; + } // End call triggers $sql = "DELETE FROM ".MAIN_DB_PREFIX."tva"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -374,7 +416,7 @@ class Tva extends CommonObject return $solde; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Total of the VAT from invoices emitted by the thirdparty. * @@ -383,20 +425,17 @@ class Tva extends CommonObject */ public function tva_sum_collectee($year = 0) { - // phpcs:enable + // phpcs:enable - $sql = "SELECT sum(f.tva) as amount"; + $sql = "SELECT sum(f.total_tva) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1"; - if ($year) - { + if ($year) { $sql .= " AND f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $ret = $obj->amount; $this->db->free($result); @@ -411,29 +450,26 @@ class Tva extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Total of VAT paid into invoice + * VAT payed * * @param int $year Year * @return double Amount */ public function tva_sum_payee($year = 0) { - // phpcs:enable + // phpcs:enable $sql = "SELECT sum(f.total_tva) as total_tva"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; - if ($year) - { + if ($year) { $sql .= " WHERE f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $ret = $obj->total_tva; $this->db->free($result); @@ -449,30 +485,27 @@ class Tva extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Total of the VAT paid + * Total of the VAT payed * * @param int $year Year * @return double Amount */ public function tva_sum_reglee($year = 0) { - // phpcs:enable + // phpcs:enable $sql = "SELECT sum(f.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."tva as f"; - if ($year) - { + if ($year) { $sql .= " WHERE f.datev >= '".$this->db->escape($year)."-01-01' AND f.datev <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $ret = $obj->amount; $this->db->free($result); @@ -508,26 +541,24 @@ class Tva extends CommonObject $this->fk_bank = (int) $this->fk_bank; $this->fk_user_creat = (int) $this->fk_user_creat; $this->fk_user_modif = (int) $this->fk_user_modif; - if (empty($this->datec)) $this->datec = dol_now(); + if (empty($this->datec)) { + $this->datec = dol_now(); + } // Check parameters - if (!$this->label) - { + if (!$this->label) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")); return -3; } - if ($this->amount == '') - { + if ($this->amount == '') { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); return -4; } - if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0)) - { + if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account")); return -5; } - if (!empty($conf->banque->enabled) && (empty($this->type_payment) || $this->type_payment <= 0)) - { + if (!empty($conf->banque->enabled) && (empty($this->type_payment) || $this->type_payment <= 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); return -5; } @@ -540,8 +571,12 @@ class Tva extends CommonObject $sql .= ", amount"; $sql .= ", fk_typepayment"; $sql .= ", num_payment"; - if ($this->note) $sql .= ", note"; - if ($this->label) $sql .= ", label"; + if ($this->note) { + $sql .= ", note"; + } + if ($this->label) { + $sql .= ", label"; + } $sql .= ", fk_user_creat"; $sql .= ", fk_bank"; $sql .= ", entity"; @@ -550,11 +585,15 @@ class Tva extends CommonObject $sql .= " '".$this->db->idate($this->datec)."'"; $sql .= ", '".$this->db->idate($this->datep)."'"; $sql .= ", '".$this->db->idate($this->datev)."'"; - $sql .= ", ".$this->amount; + $sql .= ", ".((float) $this->amount); $sql .= ", '".$this->db->escape($this->type_payment)."'"; $sql .= ", '".$this->db->escape($this->num_payment)."'"; - if ($this->note) $sql .= ", '".$this->db->escape($this->note)."'"; - if ($this->label) $sql .= ", '".$this->db->escape($this->label)."'"; + if ($this->note) { + $sql .= ", '".$this->db->escape($this->note)."'"; + } + if ($this->label) { + $sql .= ", '".$this->db->escape($this->label)."'"; + } $sql .= ", '".$this->db->escape($user->id)."'"; $sql .= ", NULL"; $sql .= ", ".$conf->entity; @@ -562,31 +601,29 @@ class Tva extends CommonObject dol_syslog(get_class($this)."::addPayment", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO should be called 'payment_vat' // Call trigger //XXX: Should be done just befor commit no ? $result = $this->call_trigger('TVA_ADDPAYMENT', $user); - if ($result < 0) - { + if ($result < 0) { $this->id = 0; $ok = 0; } // End call triggers - if ($this->id > 0) - { + if ($this->id > 0) { $ok = 1; - if (!empty($conf->banque->enabled) && !empty($this->amount)) - { + if (!empty($conf->banque->enabled) && !empty($this->amount)) { // Insert into llx_bank require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); $result = $acc->fetch($this->accountid); - if ($result <= 0) dol_print_error($this->db); + if ($result <= 0) { + dol_print_error($this->db); + } if ($this->amount > 0) { $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, -abs($this->amount), $this->num_payment, '', $user); @@ -595,8 +632,7 @@ class Tva extends CommonObject } // Update fk_bank into llx_tva. So we know vat line used to generate bank transaction - if ($bank_line_id > 0) - { + if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); } else { $this->error = $acc->error; @@ -605,15 +641,13 @@ class Tva extends CommonObject // Update links $result = $acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/tva/card.php?id=', "(VATPayment)", "payment_vat"); - if ($result < 0) - { + if ($result < 0) { $this->error = $acc->error; $ok = 0; } } - if ($ok) - { + if ($ok) { $this->db->commit(); return $this->id; } else { @@ -631,7 +665,7 @@ class Tva extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update link between payment tva and line generate into llx_bank * @@ -640,12 +674,11 @@ class Tva extends CommonObject */ public function update_fk_bank($id_bank) { - // phpcs:enable + // phpcs:enable $sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.(int) $id_bank; $sql .= ' WHERE rowid = '.(int) $this->id; $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { dol_print_error($this->db); @@ -659,34 +692,51 @@ class Tva extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param string $option link option * @param int $notooltip 1=Disable tooltip - * @param string $morecss More CSS + * @param string $morecss More CSS + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string Chaine with URL */ - public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '') + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs, $conf; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $label = ''.$langs->trans("ShowVatPayment").''; $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->label)) { + $label .= '
    '.$langs->trans('Label').': '.$this->label; + } $url = DOL_URL_ROOT.'/compta/tva/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)) - { + 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.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = ''; @@ -695,8 +745,12 @@ class Tva extends CommonObject $picto = 'payment'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; return $result; @@ -709,8 +763,8 @@ class Tva extends CommonObject */ public function getSommePaiement() { - $table = 'paiementcharge'; - $field = 'fk_charge'; + $table = 'payment_vat'; + $field = 'fk_tva'; $sql = 'SELECT sum(amount) as amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.$table; @@ -718,12 +772,13 @@ class Tva extends CommonObject dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $amount = 0; $obj = $this->db->fetch_object($resql); - if ($obj) $amount = $obj->amount ? $obj->amount : 0; + if ($obj) { + $amount = $obj->amount ? $obj->amount : 0; + } $this->db->free($resql); return $amount; @@ -746,10 +801,8 @@ class Tva extends CommonObject dol_syslog(get_class($this)."::info", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -778,29 +831,61 @@ class Tva extends CommonObject } /** - * Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) + * Retourne le libelle du statut d'une TVA (impaye, payee) * - * @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 + * @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 double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @return string Label */ - public function getLibStatut($mode = 0) + public function getLibStatut($mode = 0, $alreadypaid = -1) { - return $this->LibStatut($this->statut, $mode); + return $this->LibStatut($this->paye, $mode, $alreadypaid); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoi le libelle d'un statut donne + * Renvoi le libelle d'un statut donne * - * @param int $status 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 Libelle du statut + * @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 + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @return string Label */ - public function LibStatut($status, $mode = 0) + public function LibStatut($status, $mode = 0, $alreadypaid = -1) { // phpcs:enable - global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + global $langs; - return ''; + // Load translation files required by the page + $langs->loadLangs(array("customers", "bills")); + + // We reinit status array to force to redefine them because label may change according to properties values. + $this->labelStatus = array(); + $this->labelStatusShort = array(); + + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("mymodule"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { + $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + } + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) { + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + } + } + + $statusType = 'status1'; + if ($status == 0 && $alreadypaid <> 0) { + $statusType = 'status3'; + } + if ($status == 1) { + $statusType = 'status6'; + } + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } } diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index d4acecf063d..f7b860cd792 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -43,71 +43,29 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); - -$now = dol_now(); -$current_date = dol_getdate($now); -if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1; - -// Date range -$year = GETPOST("year", "int"); -if (empty($year)) -{ - $year_current = $current_date['year']; - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; -} -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); -// Set default period if not defined -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 (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 - 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--; - } - } else { - if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year - $year_start--; - } - } - $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 - $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 { - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } - } -} +include DOL_DOCUMENT_ROOT.'/compta/tva/initdatesforvat.inc.php'; $min = price2num(GETPOST("min", "alpha")); -if (empty($min)) $min = 0; +if (empty($min)) { + $min = 0; +} // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products -$modetax = $conf->global->TAX_MODE; -if (GETPOSTISSET("modetax")) $modetax = GETPOST("modetax", 'int'); -if (empty($modetax)) $modetax = 0; +$modetax = (empty($conf->global->TAX_MODE) ? 0 : $conf->global->TAX_MODE); +if (GETPOSTISSET("modetax")) { + $modetax = GETPOSTINT("modetax"); +} +if (empty($modetax)) { + $modetax = 0; +} // Security check -$socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); +$socid = GETPOSTINT('socid'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); @@ -128,9 +86,10 @@ $user_static = new User($db); $morequerystring = ''; $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday'); -foreach ($listofparams as $param) -{ - if (GETPOST($param) != '') $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); +foreach ($listofparams as $param) { + if (GETPOST($param) != '') { + $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); + } } $special_report = false; @@ -149,13 +108,19 @@ $fsearch .= ''; // Show report header $name = $langs->trans("VATReportByThirdParties"); $calcmode = ''; -if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); -if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); -if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); +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').')'; // 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; +$prevyear = $date_start_year; $prevquarter = $q; if ($prevquarter > 1) { $prevquarter--; @@ -163,7 +128,7 @@ if ($prevquarter > 1) { $prevquarter = 4; $prevyear--; } -$nextyear = $year_start; +$nextyear = $date_start_year; $nextquarter = $q; if ($nextquarter < 4) { $nextquarter++; @@ -173,19 +138,28 @@ if ($nextquarter < 4) { } $builddate = dol_now(); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description .= $langs->trans("RulesVATDueProducts"); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description .= $langs->trans("RulesVATInProducts"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description .= '
    '.$langs->trans("RulesVATDueServices"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description .= '
    '.$langs->trans("RulesVATInServices"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') { + $description .= $langs->trans("RulesVATDueProducts"); +} +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') { + $description .= $langs->trans("RulesVATInProducts"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') { + $description .= '
    '.$langs->trans("RulesVATDueServices"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + $description .= '
    '.$langs->trans("RulesVATInServices"); +} if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= '
    '.$langs->trans("DepositsAreNotIncluded"); } -if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { + $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +} //$periodlink=($year_start?"
    ".img_previous()." ".img_next()."":""); $description .= ($description ? '
    ' : '').$fsearch; -if (!empty($conf->global->TAX_REPORT_EXTRA_REPORT)) -{ +if (!empty($conf->global->TAX_REPORT_EXTRA_REPORT)) { $description .= '
    '; $description .= ' '; $description .= $langs->trans('SimpleReport'); @@ -224,13 +198,16 @@ $y = $year_current; $total = 0; $i = 0; $columns = 5; +$span = $columns; +if ($modetax != 1) { + $span += 2; +} // Load arrays of datas $x_coll = tax_by_thirdparty('vat', $db, 0, $date_start, $date_end, $modetax, 'sell'); $x_paye = tax_by_thirdparty('vat', $db, 0, $date_start, $date_end, $modetax, 'buy'); -if (!is_array($x_coll) || !is_array($x_paye)) -{ +if (!is_array($x_coll) || !is_array($x_paye)) { $langs->load("errors"); if ($x_coll == -1) { print '
    '.$langs->trans("ErrorNoAccountancyModuleLoaded").'
    '..')
    '.$elementcust.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$langs->trans("DatePayment").''.$namerate.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')
    '; @@ -447,6 +465,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) $product_static->id = $fields['pid']; $product_static->ref = $fields['pref']; $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered + $product_static->status = $fields['pstatus']; + $product_static->status_buy = $fields['pstatusbuy']; + print $product_static->getNomUrl(1); if (dol_string_nohtmltag($fields['descr'])) { print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); @@ -475,14 +496,14 @@ if (!is_array($x_coll) || !is_array($x_paye)) // Total HT if ($modetax != 1) { - print ''; + print ''; print price($fields['totalht']); if (price2num($fields['ftotal_ttc'])) { //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); //print ' ('.round($ratiolineinvoice*100,2).'%)'; } - print ''; + print ''; $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; print price(price2num($temp_ht, 'MT'), 1); - print ''; + print ''; $temp_vat = $fields['vat'] * $ratiopaymentinvoice; print price(price2num($temp_vat, 'MT'), 1); //print price($fields['vat']); - print '
      '.price(price2num($subtot_coll_total_ht, 'MT')).''.price(price2num($subtot_coll_vat, 'MT')).''.price(price2num($subtot_coll_total_ht, 'MT')).''.price(price2num($subtot_coll_vat, 'MT')).'
    '.$langs->trans("Total").':
    '.$elementsup.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$langs->trans("DatePayment").''.$namesup.''.$productsup.''.$vatsup.'
    '.$fields['company_link'].''; + print $fields['company_link']; + print ''; @@ -661,36 +687,34 @@ if (!is_array($x_coll) || !is_array($x_paye)) // Total HT if ($modetax != 1) { - print ''; + print ''; print price($fields['totalht']); if (price2num($fields['ftotal_ttc'])) { //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); //print ' ('.round($ratiolineinvoice*100,2).'%)'; } - print ''; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) - { + if ($fields['payment_amount'] && $fields['ftotal_ttc']) { $paymentfourn_static->id = $fields['payment_id']; - print $paymentfourn_static->getNomUrl(2); + $paymentfourn_static->ref = $fields['payment_ref']; + print $paymentfourn_static->getNomUrl(2, '', '', 0); } if (($type == 0 && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice') - || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) - { + || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { print $langs->trans("NA"); } else { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } - print price(price2num($fields['payment_amount'], 'MT')); + print ''.price(price2num($fields['payment_amount'], 'MT')).''; if (isset($fields['payment_amount'])) { print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; } @@ -699,17 +723,17 @@ if (!is_array($x_coll) || !is_array($x_paye)) } // VAT paid - print ''; + print ''; $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; print price(price2num($temp_ht, 'MT'), 1); - print ''; + print ''; $temp_vat = $fields['vat'] * $ratiopaymentinvoice; print price(price2num($temp_vat, 'MT'), 1); //print price($fields['vat']); - print '
      '.price(price2num($subtot_paye_total_ht, 'MT')).''.price(price2num($subtot_paye_vat, 'MT')).''.price(price2num($subtot_paye_total_ht, 'MT')).''.price(price2num($subtot_paye_vat, 'MT')).'
    '.$date.''.$langs->trans("ClaimedForThisPeriod").''.$langs->trans("PaidDuringThisPeriod").''.$langs->trans("PaidDuringThisPeriod").$form->textwithpicto('', $langs->trans('PaidDuringThisPeriodDesc'), 1).'
    '.$previousmonth."'.price($amountclaimed)."'.price($amountpaid)."'.price($amountclaimed)."'.price($amountpaid)."
    '.$obj->dm."'.price($amountclaimed)."'.price($amountpaid)."'.price($amountclaimed)."'.price($amountpaid)."
    '.$previousmonth."'.price($amountclaimed)."
    '; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''."\n"; -print ''."\n"; + print '
    '.$langs->trans("Year")." ".$y.''.$langs->trans("VATToPay").''.$langs->trans("VATToCollect").''.$langs->trans("Balance").' 
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print '' . "\n"; + print '' . "\n"; -$tmp = dol_getdate($date_start); -$y = $tmp['year']; -$m = $tmp['mon']; -$tmp = dol_getdate($date_end); -$yend = $tmp['year']; -$mend = $tmp['mon']; -//var_dump($m); -$total = 0; $subtotalcoll = 0; $subtotalpaye = 0; $subtotal = 0; -$i = 0; $mcursor = 0; + $tmp = dol_getdate($date_start); + $y = $tmp['year']; + $m = $tmp['mon']; + $tmp = dol_getdate($date_end); + $yend = $tmp['year']; + $mend = $tmp['mon']; + //var_dump($m); + $total = 0; + $subtotalcoll = 0; + $subtotalpaye = 0; + $subtotal = 0; + $i = 0; + $mcursor = 0; -while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop -{ - //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); - if ($m == 13) $y++; - if ($m > 12) $m -= 12; - $mcursor++; - - $x_coll = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'sell', $m); - $x_paye = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'buy', $m); - - $x_both = array(); - //now, from these two arrays, get another array with one rate per line - foreach (array_keys($x_coll) as $my_coll_rate) - { - $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; - $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; - $x_both[$my_coll_rate]['paye']['totalht'] = 0; - $x_both[$my_coll_rate]['paye']['vat'] = 0; - $x_both[$my_coll_rate]['coll']['links'] = ''; - $x_both[$my_coll_rate]['coll']['detail'] = array(); - foreach ($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { - //$invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; - //$invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; - //$invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; - //$company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); - $x_both[$my_coll_rate]['coll']['detail'][] = array( - 'id' =>$x_coll[$my_coll_rate]['facid'][$id], - 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], - 'pid' =>$x_coll[$my_coll_rate]['pid'][$id], - 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], - 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], - 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], - 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], - 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], - 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], - 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], - 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], - 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], - //'company_link'=>$company_static->getNomUrl(1,'',20), - 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], - 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], - 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], - 'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id], - //'link' =>$invoice_customer->getNomUrl(1,'',12) - ); + while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) { // $mcursor is to avoid too large loop + //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); + if ($m == 13) { + $y++; } - } - - // tva paid - foreach (array_keys($x_paye) as $my_paye_rate) { - $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; - $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; - if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { - $x_both[$my_paye_rate]['coll']['totalht'] = 0; - $x_both[$my_paye_rate]['coll']['vat'] = 0; + if ($m > 12) { + $m -= 12; } - $x_both[$my_paye_rate]['paye']['links'] = ''; - $x_both[$my_paye_rate]['paye']['detail'] = array(); + $mcursor++; - foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) - { - // ExpenseReport - if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') - { - //$expensereport->id=$x_paye[$my_paye_rate]['facid'][$id]; - //$expensereport->ref=$x_paye[$my_paye_rate]['facnum'][$id]; - //$expensereport->type=$x_paye[$my_paye_rate]['type'][$id]; + $x_coll = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'sell', $m); + $x_paye = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'buy', $m); - $x_both[$my_paye_rate]['paye']['detail'][] = array( - 'id' =>$x_paye[$my_paye_rate]['facid'][$id], - 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], - 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], - 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], - 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], - 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], - 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], - 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), - 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), - 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], - 'ddate_start' =>$x_paye[$my_paye_rate]['ddate_start'][$id], - 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], - 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), - 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - //'link' =>$expensereport->getNomUrl(1) - ); - } 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]; - //$company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); - $x_both[$my_paye_rate]['paye']['detail'][] = array( - 'id' =>$x_paye[$my_paye_rate]['facid'][$id], - 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], - 'pid' =>$x_paye[$my_paye_rate]['pid'][$id], - 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], - 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], - 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], - 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], - 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), - 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), - 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], - 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], - 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], - //'company_link'=>$company_static->getNomUrl(1,'',20), - 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], - 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], - 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), - 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], - //'link' =>$invoice_supplier->getNomUrl(1,'',12) + $x_both = array(); + //now, from these two arrays, get another array with one rate per line + foreach (array_keys($x_coll) as $my_coll_rate) { + $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; + $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; + $x_both[$my_coll_rate]['paye']['totalht'] = 0; + $x_both[$my_coll_rate]['paye']['vat'] = 0; + $x_both[$my_coll_rate]['coll']['links'] = ''; + $x_both[$my_coll_rate]['coll']['detail'] = array(); + foreach ($x_coll[$my_coll_rate]['facid'] as $id => $dummy) { + //$invoice_customer->id=$x_coll[$my_coll_rate]['facid'][$id]; + //$invoice_customer->ref=$x_coll[$my_coll_rate]['facnum'][$id]; + //$invoice_customer->type=$x_coll[$my_coll_rate]['type'][$id]; + //$company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); + $x_both[$my_coll_rate]['coll']['detail'][] = array( + 'id' => $x_coll[$my_coll_rate]['facid'][$id], + 'descr' => $x_coll[$my_coll_rate]['descr'][$id], + 'pid' => $x_coll[$my_coll_rate]['pid'][$id], + 'pref' => $x_coll[$my_coll_rate]['pref'][$id], + 'ptype' => $x_coll[$my_coll_rate]['ptype'][$id], + 'payment_id' => $x_coll[$my_coll_rate]['payment_id'][$id], + 'payment_amount' => $x_coll[$my_coll_rate]['payment_amount'][$id], + 'ftotal_ttc' => $x_coll[$my_coll_rate]['ftotal_ttc'][$id], + 'dtotal_ttc' => $x_coll[$my_coll_rate]['dtotal_ttc'][$id], + 'dtype' => $x_coll[$my_coll_rate]['dtype'][$id], + 'datef' => $x_coll[$my_coll_rate]['datef'][$id], + 'datep' => $x_coll[$my_coll_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start' => $x_coll[$my_coll_rate]['ddate_start'][$id], + 'ddate_end' => $x_coll[$my_coll_rate]['ddate_end'][$id], + 'totalht' => $x_coll[$my_coll_rate]['totalht_list'][$id], + 'vat' => $x_coll[$my_coll_rate]['vat_list'][$id], + //'link' =>$invoice_customer->getNomUrl(1,'',12) ); } } - } - //now we have an array (x_both) indexed by rates for coll and paye - $action = "tva"; - $object = array(&$x_coll, &$x_paye, &$x_both); - $parameters["mode"] = $modetax; - $parameters["year"] = $y; - $parameters["month"] = $m; - $parameters["type"] = 'vat'; + // tva paid + foreach (array_keys($x_paye) as $my_paye_rate) { + $x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht']; + $x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat']; + if (!isset($x_both[$my_paye_rate]['coll']['totalht'])) { + $x_both[$my_paye_rate]['coll']['totalht'] = 0; + $x_both[$my_paye_rate]['coll']['vat'] = 0; + } + $x_both[$my_paye_rate]['paye']['links'] = ''; + $x_both[$my_paye_rate]['paye']['detail'] = array(); - // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array - $hookmanager->initHooks(array('externalbalance')); - $reshook = $hookmanager->executeHooks('addVatLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + foreach ($x_paye[$my_paye_rate]['facid'] as $id => $dummy) { + // ExpenseReport + if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') { + //$expensereport->id=$x_paye[$my_paye_rate]['facid'][$id]; + //$expensereport->ref=$x_paye[$my_paye_rate]['facnum'][$id]; + //$expensereport->type=$x_paye[$my_paye_rate]['type'][$id]; - if (!is_array($x_coll) && $coll_listbuy == -1) - { - $langs->load("errors"); - print ''; - break; - } - if (!is_array($x_paye) && $coll_listbuy == -2) - { - print ''; - break; - } - - - print ''; - print ''; - - $x_coll_sum = 0; - foreach (array_keys($x_coll) as $rate) - { - $subtot_coll_total_ht = 0; - $subtot_coll_vat = 0; - - foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) - { - // Payment - $ratiopaymentinvoice = 1; - if ($modetax != 1) - { - // Define type - // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. - $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (!empty($fields['ddate_start'])) { - $type = 1; - } - if (!empty($fields['ddate_end'])) { - $type = 1; - } - - if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') - || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) - { - //print $langs->trans("NA"); + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' => $x_paye[$my_paye_rate]['facid'][$id], + 'descr' => $x_paye[$my_paye_rate]['descr'][$id], + 'pid' => $x_paye[$my_paye_rate]['pid'][$id], + 'pref' => $x_paye[$my_paye_rate]['pref'][$id], + 'ptype' => $x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id' => $x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount' => $x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc' => price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc' => price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' => $x_paye[$my_paye_rate]['dtype'][$id], + 'ddate_start' => $x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' => $x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' => price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' => $x_paye[$my_paye_rate]['vat_list'][$id], + //'link' =>$expensereport->getNomUrl(1) + ); } else { - if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { - $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); - } + //$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]; + //$company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); + $x_both[$my_paye_rate]['paye']['detail'][] = array( + 'id' => $x_paye[$my_paye_rate]['facid'][$id], + 'descr' => $x_paye[$my_paye_rate]['descr'][$id], + 'pid' => $x_paye[$my_paye_rate]['pid'][$id], + 'pref' => $x_paye[$my_paye_rate]['pref'][$id], + 'ptype' => $x_paye[$my_paye_rate]['ptype'][$id], + 'payment_id' => $x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_amount' => $x_paye[$my_paye_rate]['payment_amount'][$id], + 'ftotal_ttc' => price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), + 'dtotal_ttc' => price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), + 'dtype' => $x_paye[$my_paye_rate]['dtype'][$id], + 'datef' => $x_paye[$my_paye_rate]['datef'][$id], + 'datep' => $x_paye[$my_paye_rate]['datep'][$id], + //'company_link'=>$company_static->getNomUrl(1,'',20), + 'ddate_start' => $x_paye[$my_paye_rate]['ddate_start'][$id], + 'ddate_end' => $x_paye[$my_paye_rate]['ddate_end'][$id], + 'totalht' => price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), + 'vat' => $x_paye[$my_paye_rate]['vat_list'][$id], + //'link' =>$invoice_supplier->getNomUrl(1,'',12) + ); } } - //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); - $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; - $temp_vat = $fields['vat'] * $ratiopaymentinvoice; - $subtot_coll_total_ht += $temp_ht; - $subtot_coll_vat += $temp_vat; - $x_coll_sum += $temp_vat; } - } - print ''; + //now we have an array (x_both) indexed by rates for coll and paye - $x_paye_sum = 0; - foreach (array_keys($x_paye) as $rate) - { - $subtot_paye_total_ht = 0; - $subtot_paye_vat = 0; + $action = "tva"; + $object = array(&$x_coll, &$x_paye, &$x_both); + $parameters["mode"] = $modetax; + $parameters["year"] = $y; + $parameters["month"] = $m; + $parameters["type"] = 'vat'; - foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) - { - // Payment - $ratiopaymentinvoice = 1; - if ($modetax != 1) - { - // Define type - // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. - $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); - // Try to enhance type detection using date_start and date_end for free lines where type - // was not saved. - if (!empty($fields['ddate_start'])) { - $type = 1; - } - if (!empty($fields['ddate_end'])) { - $type = 1; - } + // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array + $hookmanager->initHooks(array('externalbalance')); + $reshook = $hookmanager->executeHooks('addVatLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') - || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) - { - //print $langs->trans("NA"); - } else { - if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { - $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); + if (!is_array($x_coll) && $coll_listbuy == -1) { + $langs->load("errors"); + print ''; + break; + } + if (!is_array($x_paye) && $coll_listbuy == -2) { + print ''; + break; + } + + + print ''; + print ''; + + $x_coll_sum = 0; + foreach (array_keys($x_coll) as $rate) { + $subtot_coll_total_ht = 0; + $subtot_coll_vat = 0; + + foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) { + // Payment + $ratiopaymentinvoice = 1; + if ($modetax != 1) { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type = 1; + } + if (!empty($fields['ddate_end'])) { + $type = 1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); + } } } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; + $temp_vat = $fields['vat'] * $ratiopaymentinvoice; + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; } - //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); - $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; - $temp_vat = $fields['vat'] * $ratiopaymentinvoice; - $subtot_paye_total_ht += $temp_ht; - $subtot_paye_vat += $temp_vat; - $x_paye_sum += $temp_vat; + } + print ''; + + $x_paye_sum = 0; + foreach (array_keys($x_paye) as $rate) { + $subtot_paye_total_ht = 0; + $subtot_paye_vat = 0; + + foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) { + // Payment + $ratiopaymentinvoice = 1; + if ($modetax != 1) { + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type = 1; + } + if (!empty($fields['ddate_end'])) { + $type = 1; + } + + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { + //print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); + } + } + } + //var_dump('type='.$type.' '.$fields['totalht'].' '.$ratiopaymentinvoice); + $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; + $temp_vat = $fields['vat'] * $ratiopaymentinvoice; + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; + } + } + print ''; + + $subtotalcoll = $subtotalcoll + $x_coll_sum; + $subtotalpaye = $subtotalpaye + $x_paye_sum; + + $diff = $x_coll_sum - $x_paye_sum; + $total = $total + $diff; + $subtotal = price2num($subtotal + $diff, 'MT'); + + print '' . "\n"; + print "\n"; + print "\n"; + + // Total + $i++; + $m++; + if ($i > 2) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i = 0; + $subtotalcoll = 0; + $subtotalpaye = 0; + $subtotal = 0; } } - print ''; - - $subtotalcoll = $subtotalcoll + $x_coll_sum; - $subtotalpaye = $subtotalpaye + $x_paye_sum; - - $diff = $x_coll_sum - $x_paye_sum; - $total = $total + $diff; - $subtotal = price2num($subtotal + $diff, 'MT'); - - print ''."\n"; + print ''; print "\n"; - print "\n"; + print ''; - $i++; $m++; - if ($i > 2) - { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $i = 0; - $subtotalcoll = 0; $subtotalpaye = 0; $subtotal = 0; - } -} -print ''; -print "\n"; -print ''; - -print '
    ' . $langs->trans("Year") . " " . $y . '' . $langs->trans("VATToPay") . '' . $langs->trans("VATToCollect") . '' . $langs->trans("Balance") . ' 
    '.$langs->trans("ErrorNoAccountancyModuleLoaded").'
    '.$langs->trans("FeatureNotYetAvailable").'
    '.dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y").''.price(price2num($x_coll_sum, 'MT')).'
    ' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '
    ' . $langs->trans("FeatureNotYetAvailable") . '
    ' . dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y") . '' . price(price2num($x_coll_sum, 'MT')) . '' . price(price2num($x_paye_sum, 'MT')) . '' . price(price2num($diff, 'MT')) . ' 
    ' . $langs->trans("SubTotal") . ':' . price(price2num($subtotalcoll, 'MT')) . '' . price(price2num($subtotalpaye, 'MT')) . '' . price(price2num($subtotal, 'MT')) . ' 
    '.price(price2num($x_paye_sum, 'MT')).''.price(price2num($diff, 'MT')).'
    ' . $langs->trans("TotalToPay") . ':' . price(price2num($total, 'MT')) . ' 
    '.$langs->trans("SubTotal").':'.price(price2num($subtotalcoll, 'MT')).''.price(price2num($subtotalpaye, 'MT')).''.price(price2num($subtotal, 'MT')).' 
    '.$langs->trans("TotalToPay").':'.price(price2num($total, 'MT')).' 
    '; + print '
    '; -print '
    '; + print '
    '; - -/* - * Paid - */ - -print load_fiche_titre($langs->trans("VATPaid"), '', ''); - -$sql = ''; - -$sql .= "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm, 'claimed' as mode"; -$sql .= " FROM ".MAIN_DB_PREFIX."tva as f"; -$sql .= " WHERE f.entity = ".$conf->entity; -$sql .= " AND (f.datev >= '".$db->idate($date_start)."' AND f.datev <= '".$db->idate($date_end)."')"; -$sql .= " GROUP BY dm"; - -$sql .= " UNION "; - -$sql .= "SELECT SUM(amount) as mm, date_format(f.datep,'%Y-%m') as dm, 'paid' as mode"; -$sql .= " FROM ".MAIN_DB_PREFIX."tva as f"; -$sql .= " WHERE f.entity = ".$conf->entity; -$sql .= " AND (f.datep >= '".$db->idate($date_start)."' AND f.datep <= '".$db->idate($date_end)."')"; -$sql .= " GROUP BY dm"; - -$sql .= " ORDER BY dm ASC, mode ASC"; -//print $sql; - -pt($db, $sql, $langs->trans("Month")); - - -if (!empty($conf->global->MAIN_FEATURES_LEVEL)) -{ - print '
    '; - /* - * Recap - */ + * Paid + */ + print load_fiche_titre($langs->trans("VATPaid"), '', ''); - print load_fiche_titre($langs->trans("VATBalance"), '', ''); // need to add translation + $sql = ''; - $sql1 = "SELECT SUM(amount) as mm"; - $sql1 .= " FROM ".MAIN_DB_PREFIX."tva as f"; - $sql1 .= " WHERE f.entity = ".$conf->entity; - $sql1 .= " AND f.datev >= '".$db->idate($date_start)."'"; - $sql1 .= " AND f.datev <= '".$db->idate($date_end)."'"; + $sql .= "SELECT SUM(amount) as mm, date_format(tva.datev,'%Y-%m') as dm, 'claimed' as mode"; + $sql .= " FROM " . MAIN_DB_PREFIX . "tva as tva"; + $sql .= " WHERE tva.entity = " . $conf->entity; + $sql .= " AND (tva.datev >= '" . $db->idate($date_start) . "' AND tva.datev <= '" . $db->idate($date_end) . "')"; + $sql .= " GROUP BY dm"; - $result = $db->query($sql1); - if ($result) { - $obj = $db->fetch_object($result); - print ''; + $sql .= " UNION "; - print ""; - print ''; - print ''; - print "\n"; + $sql .= "SELECT SUM(ptva.amount) as mm, date_format(tva.datev,'%Y-%m') as dm, 'paid' as mode"; + $sql .= " FROM " . MAIN_DB_PREFIX . "tva as tva"; + $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "payment_vat as ptva ON (tva.rowid = ptva.fk_tva)"; + $sql .= " WHERE tva.entity = " . $conf->entity; + $sql .= " AND (tva.datev >= '" . $db->idate($date_start) . "' AND tva.datev <= '" . $db->idate($date_end) . "')"; + $sql .= " GROUP BY dm"; - print ""; - print ''; - print '\n"; - print "\n"; + $sql .= " ORDER BY dm ASC, mode ASC"; + //print $sql; - $restopay = $total - $obj->mm; - print ""; - print ''; - print ''; - print "\n"; + pt($db, $sql, $langs->trans("Month")); - print '
    '.$langs->trans("VATDue").''.price(price2num($total, 'MT')).'
    '.$langs->trans("VATPaid").''.price(price2num($obj->mm, 'MT'))."
    '.$langs->trans("RemainToPay").''.price(price2num($restopay, 'MT')).'
    '; - } + print '
    '; } -print '
    '; - llxFooter(); $db->close(); diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index ddabf6e2b49..96eed7ce20b 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -32,25 +32,26 @@ $langs->loadLangs(array('compta', 'bills')); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); -// Security check -$socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - $object = new Tva($db); +// Security check +$socid = GETPOST('socid', 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); /* * Actions */ -if ($action == 'setlib' && $user->rights->tax->charges->creer) -{ +if ($action == 'setlib' && $user->rights->tax->charges->creer) { $object->fetch($id); $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } @@ -83,6 +84,8 @@ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, print '
    '; print '
    '; +print '
    '; + print '
    '; dol_print_object_info($object); print '
    '; diff --git a/htdocs/compta/tva/initdatesforvat.inc.php b/htdocs/compta/tva/initdatesforvat.inc.php new file mode 100644 index 00000000000..8039fce728f --- /dev/null +++ b/htdocs/compta/tva/initdatesforvat.inc.php @@ -0,0 +1,98 @@ + + * + * 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/compta/tva/initdatesforvat.inc.php + * \brief Set value for date_start and date_end + */ + +$now = dol_now(); +$current_date = dol_getdate($now); +if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) { + $conf->global->SOCIETE_FISCAL_MONTH_START = 1; +} + +// Date range +$year = GETPOST("year", "int"); +if (empty($year)) { + $year_current = $current_date['year']; + $year_start = $year_current; +} else { + $year_current = $year; + $year_start = $year; +} +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); +// Set default period if not defined +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'), 'tzserver'); + $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), 'tzserver'); + } 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 + 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--; + } + } else { + if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year + $year_start--; + } + } + $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, 'tzserver'); + $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 + $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 { + if ($q == 1) { + $date_start = dol_get_first_day($year_start, 1, 'tzserver'); + $date_end = dol_get_last_day($year_start, 3, 'tzserver'); + } + if ($q == 2) { + $date_start = dol_get_first_day($year_start, 4, 'tzserver'); + $date_end = dol_get_last_day($year_start, 6, 'tzserver'); + } + if ($q == 3) { + $date_start = dol_get_first_day($year_start, 7, 'tzserver'); + $date_end = dol_get_last_day($year_start, 9, 'tzserver'); + } + if ($q == 4) { + $date_start = dol_get_first_day($year_start, 10, 'tzserver'); + $date_end = dol_get_last_day($year_start, 12, 'tzserver'); + } + } +} + +//print dol_print_date($date_start, 'day').' '.dol_print_date($date_end, 'day'); + +$tmp = dol_getdate($date_start); +$date_start_day = $tmp['mday']; +$date_start_month = $tmp['mon']; +$date_start_year = $tmp['year']; +$tmp = dol_getdate($date_end); +$date_end_day = $tmp['mday']; +$date_end_month = $tmp['mon']; +$date_end_year = $tmp['year']; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index a142518279f..17237732cea 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2019 Alexandre Spangaro * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2021 Gauthier VERDOL * * 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 +28,6 @@ require '../../main.inc.php'; -// Security check -$socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -54,40 +50,55 @@ $search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', $search_datepayment_start = dol_mktime(0, 0, 0, GETPOST('search_datepayment_startmonth', 'int'), GETPOST('search_datepayment_startday', 'int'), GETPOST('search_datepayment_startyear', 'int')); $search_datepayment_end = dol_mktime(23, 59, 59, GETPOST('search_datepayment_endmonth', 'int'), GETPOST('search_datepayment_endday', 'int'), GETPOST('search_datepayment_endyear', 'int')); $search_type = GETPOST('search_type', 'int'); -$search_cheque = GETPOST('search_cheque', 'alpha'); $search_account = GETPOST('search_account', 'int'); $search_amount = GETPOST('search_amount', 'alpha'); +$search_status = GETPOST('search_status', 'int'); $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 (!$sortfield) $sortfield = 't.datev'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 't.datev'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} $arrayfields = array( 't.rowid' =>array('checked'=>1, 'position'=>10, 'label'=>"Ref",), 't.label' =>array('checked'=>1, 'position'=>20, 'label'=>"Label"), 't.datev' =>array('checked'=>1, 'position'=>30, 'label'=>"PeriodEndDate"), - 't.datep' =>array('checked'=>1, 'position'=>40, 'label'=>"DatePayment"), - 't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"Type"), - 't.num_payment' =>array('checked'=>1, 'position'=>60, 'label'=>"Numero", 'tooltip'=>"ChequeOrTransferNumber"), - 'transaction' =>array('checked'=>1, 'position'=>70, 'label'=>"BankTransactionLine", 'enabled'=>(!empty($conf->banque->enabled))), - 'ba.label' =>array('checked'=>1, 'position'=>80, 'label'=>"Account", 'enable'=>(!empty($conf->banque->enabled))), - 't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"PayedByThisPayment"), + 't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"DefaultPaymentMode"), + 't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"Amount"), + 't.status' =>array('checked'=>1, 'position'=>90, 'label'=>"Status"), ); + +if (!empty($conf->banque->enabled)) { + $arrayfields['t.fk_account'] = array('checked'=>1, 'position'=>60, 'label'=>"DefaultBankAccount"); +} + $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('salestaxeslist')); $object = new Tva($db); +// Security check +$socid = GETPOST('socid', 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); + /* * Actions @@ -95,14 +106,15 @@ $object = new Tva($db); $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 ($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')) // Both test are required to be compatible with all browsers - { + 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_ref = ''; $search_label = ''; $search_dateend_start = ''; @@ -110,9 +122,9 @@ if (empty($reshook)) { $search_datepayment_start = ''; $search_datepayment_end = ''; $search_type = ''; - $search_cheque = ''; $search_account = ''; $search_amount = ''; + $search_status = ''; } } @@ -128,28 +140,50 @@ $bankstatic = new Account($db); $accountingjournal = new AccountingJournal($db); $bankline = new AccountLine($db); -llxHeader('', $langs->trans("VATPayments")); +llxHeader('', $langs->trans("VATDeclarations")); -$sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.fk_typepayment as type, t.num_payment, t.fk_bank'; -$sql .= ', ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel'; -$sql .= ', pst.code as payment_code'; +$sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment as type, t.fk_account,'; +$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,'; +$sql.= ' t.num_payment, pst.code as payment_code,'; +$sql .= ' SUM(ptva.amount) as alreadypayed'; $sql .= ' FROM '.MAIN_DB_PREFIX.'tva as t'; -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pst ON t.fk_typepayment = pst.id'; -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.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.'c_paiement as pst ON (t.fk_typepayment = pst.id)'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON (t.fk_account = ba.rowid)'; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON (ptva.fk_tva = t.rowid)"; $sql .= ' WHERE t.entity IN ('.getEntity($object->element).')'; -if (!empty($search_ref)) $sql .= natural_search('t.rowid', $search_ref); -if (!empty($search_label)) $sql .= natural_search('t.label', $search_label); -if (!empty($search_dateend_start)) $sql .= ' AND t.datev >= "'.$db->idate($search_dateend_start).'"'; -if (!empty($search_dateend_end)) $sql .= ' AND t.datev <= "'.$db->idate($search_dateend_end).'"'; -if (!empty($search_datepayment_start)) $sql .= ' AND t.datep >= "'.$db->idate($search_datepayment_start).'"'; -if (!empty($search_datepayment_end)) $sql .= ' AND t.datep <= "'.$db->idate($search_datepayment_end).'"'; -if (!empty($search_type) && $search_type > 0) $sql .= ' AND t.fk_typepayment='.$search_type; -if (!empty($search_cheque)) $sql .= natural_search('t.num_payment', $search_cheque); -if (!empty($search_account) && $search_account > 0) $sql .= ' AND b.fk_account='.$search_account; -if (!empty($search_amount)) $sql .= natural_search('t.amount', price2num(trim($search_amount)), 1); +if (!empty($search_ref)) { + $sql .= natural_search('t.rowid', $search_ref); +} +if (!empty($search_label)) { + $sql .= natural_search('t.label', $search_label); +} +if (!empty($search_dateend_start)) { + $sql .= ' AND t.datev >= "'.$db->idate($search_dateend_start).'"'; +} +if (!empty($search_dateend_end)) { + $sql .= ' AND t.datev <= "'.$db->idate($search_dateend_end).'"'; +} +if (!empty($search_datepayment_start)) { + $sql .= ' AND t.datep >= "'.$db->idate($search_datepayment_start).'"'; +} +if (!empty($search_datepayment_end)) { + $sql .= ' AND t.datep <= "'.$db->idate($search_datepayment_end).'"'; +} +if (!empty($search_type) && $search_type > 0) { + $sql .= ' AND t.fk_typepayment='.$search_type; +} +if (!empty($search_account) && $search_account > 0) { + $sql .= ' AND t.fk_account='.$search_account; +} +if (!empty($search_amount)) { + $sql .= natural_search('t.amount', price2num(trim($search_amount)), 1); +} +if ($search_status != '' && $search_status >= 0) { + $sql .= " AND t.paye = ".$db->escape($search_status); +} +$sql .= " GROUP BY t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment, t.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, t.num_payment, pst.code"; $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; @@ -167,8 +201,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if (!$result) -{ +if (!$result) { dol_print_error($db); llxFooter(); $db->close(); @@ -178,31 +211,75 @@ if (!$result) $num = $db->num_rows($result); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) $param .= '&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) { + $param .= '&contextpage='.$contextpage; +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} -if (!empty($search_ref)) $param .= '&search_ref="'.$search_ref.'"'; -if (!empty($search_label)) $param .= '&search_label="'.$search_label.'"'; -if (!empty($search_dateend_start)) $param .= '&search_dateend_startyear='.GETPOST('search_dateend_startyear', 'int'); -if (!empty($search_dateend_start)) $param .= '&search_dateend_startmonth='.GETPOST('search_dateend_startmonth', 'int'); -if (!empty($search_dateend_start)) $param .= '&search_dateend_startday='.GETPOST('search_dateend_startday', 'int'); -if (!empty($search_dateend_end)) $param .= '&search_dateend_endyear='.GETPOST('search_dateend_endyear', 'int'); -if (!empty($search_dateend_end)) $param .= '&search_dateend_endmonth='.GETPOST('search_dateend_endmonth', 'int'); -if (!empty($search_dateend_end)) $param .= '&search_dateend_endday='.GETPOST('search_dateend_endday', 'int'); -if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startyear='.GETPOST('search_datepayment_startyear', 'int'); -if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startmonth='.GETPOST('search_datepayment_startmonth', 'int'); -if (!empty($search_datepayment_start)) $param .= '&search_datepayment_startday='.GETPOST('search_datepayment_startday', 'int'); -if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endyear='.GETPOST('search_datepayment_endyear', 'int'); -if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endmonth='.GETPOST('search_datepayment_endmonth', 'int'); -if (!empty($search_datepayment_end)) $param .= '&search_datepayment_endday='.GETPOST('search_datepayment_endday', 'int'); -if (!empty($search_type) && $search_type > 0) $param .= '&search_type='.$search_type; -if (!empty($search_cheque)) $param .= '&search_cheque="'.$search_cheque.'"'; -if (!empty($search_account) && $search_account > 0) $param .= '&search_account='.$search_account; -if (!empty($search_amount)) $param .= '&search_amount="'.$search_amount.'"'; +if (!empty($search_ref)) { + $param .= '&search_ref="'.$search_ref.'"'; +} +if (!empty($search_label)) { + $param .= '&search_label="'.$search_label.'"'; +} +if (!empty($search_dateend_start)) { + $param .= '&search_dateend_startyear='.GETPOST('search_dateend_startyear', 'int'); +} +if (!empty($search_dateend_start)) { + $param .= '&search_dateend_startmonth='.GETPOST('search_dateend_startmonth', 'int'); +} +if (!empty($search_dateend_start)) { + $param .= '&search_dateend_startday='.GETPOST('search_dateend_startday', 'int'); +} +if (!empty($search_dateend_end)) { + $param .= '&search_dateend_endyear='.GETPOST('search_dateend_endyear', 'int'); +} +if (!empty($search_dateend_end)) { + $param .= '&search_dateend_endmonth='.GETPOST('search_dateend_endmonth', 'int'); +} +if (!empty($search_dateend_end)) { + $param .= '&search_dateend_endday='.GETPOST('search_dateend_endday', 'int'); +} +if (!empty($search_datepayment_start)) { + $param .= '&search_datepayment_startyear='.GETPOST('search_datepayment_startyear', 'int'); +} +if (!empty($search_datepayment_start)) { + $param .= '&search_datepayment_startmonth='.GETPOST('search_datepayment_startmonth', 'int'); +} +if (!empty($search_datepayment_start)) { + $param .= '&search_datepayment_startday='.GETPOST('search_datepayment_startday', 'int'); +} +if (!empty($search_datepayment_end)) { + $param .= '&search_datepayment_endyear='.GETPOST('search_datepayment_endyear', 'int'); +} +if (!empty($search_datepayment_end)) { + $param .= '&search_datepayment_endmonth='.GETPOST('search_datepayment_endmonth', 'int'); +} +if (!empty($search_datepayment_end)) { + $param .= '&search_datepayment_endday='.GETPOST('search_datepayment_endday', 'int'); +} +if (!empty($search_type) && $search_type > 0) { + $param .= '&search_type='.$search_type; +} +if (!empty($search_account) && $search_account > 0) { + $param .= '&search_account='.$search_account; +} +if (!empty($search_amount)) { + $param .= '&search_amount="'.$search_amount.'"'; +} +if ($search_status != '' && $search_status != '-1') { + $param .= '&search_status='.urlencode($search_status); +} print '
    '; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -211,13 +288,17 @@ print ''; print ''; $url = DOL_URL_ROOT.'/compta/tva/card.php?action=create'; -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); -print_barre_liste($langs->trans("VATPayments"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($langs->trans("VATDeclarations"), $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 -if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '
    '; print ''; @@ -257,7 +338,7 @@ if (!empty($arrayfields['t.datev']['checked'])) { } // Filter: Date payment -if (!empty($arrayfields['t.datep']['checked'])) { +/*if (!empty($arrayfields['t.datep']['checked'])) { print ''; -} +}*/ // Filter: Type if (!empty($arrayfields['t.fk_typepayment']['checked'])) { @@ -275,22 +356,9 @@ if (!empty($arrayfields['t.fk_typepayment']['checked'])) { print ''; } -// Filter: Cheque number -if (!empty($arrayfields['t.num_payment']['checked'])) { +// Filter: Bank Account +if (!empty($arrayfields['t.fk_account']['checked'])) { print ''; -} - -// Filter: Bank transaction number (placeholder) -if (!empty($arrayfields['transaction']['checked'])) { - print ''; -} - -// Filter: Bank account -if (!empty($arrayfields['ba.label']['checked'])) { - print ''; } @@ -302,6 +370,14 @@ if (!empty($arrayfields['t.amount']['checked'])) { print ''; } +// Status +if (!empty($arrayfields['t.status']['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 @@ -315,16 +391,30 @@ 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['t.rowid']['checked'])) print_liste_field_titre($arrayfields['t.rowid']['label'], $_SERVER['PHP_SELF'], 't.rowid', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['t.label']['checked'])) print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER['PHP_SELF'], 't.label', '', $param, 'align="left"', $sortfield, $sortorder); -if (!empty($arrayfields['t.datev']['checked'])) print_liste_field_titre($arrayfields['t.datev']['label'], $_SERVER['PHP_SELF'], 't.datev', '', $param, 'align="center"', $sortfield, $sortorder); -if (!empty($arrayfields['t.datep']['checked'])) print_liste_field_titre($arrayfields['t.datep']['label'], $_SERVER['PHP_SELF'], 't.datep', '', $param, 'align="center"', $sortfield, $sortorder); -if (!empty($arrayfields['t.fk_typepayment']['checked'])) print_liste_field_titre($arrayfields['t.fk_typepayment']['label'], $_SERVER['PHP_SELF'], 't.fk_typepayment', '', $param, '', $sortfield, $sortorder, 'left '); -if (!empty($arrayfields['t.num_payment']['checked'])) print_liste_field_titre($arrayfields['t.num_payment']['label'], $_SERVER['PHP_SELF'], 't.num_payment', '', $param, '', $sortfield, $sortorder, '', $arrayfields['t.num_payment']['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, 'left '); -if (!empty($arrayfields['t.amount']['checked'])) print_liste_field_titre($arrayfields['t.amount']['label'], $_SERVER['PHP_SELF'], 't.amount', '', $param, '', $sortfield, $sortorder, 'right '); +if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['t.rowid']['checked'])) { + print_liste_field_titre($arrayfields['t.rowid']['label'], $_SERVER['PHP_SELF'], 't.rowid', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['t.label']['checked'])) { + print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER['PHP_SELF'], 't.label', '', $param, 'align="left"', $sortfield, $sortorder); +} +if (!empty($arrayfields['t.datev']['checked'])) { + print_liste_field_titre($arrayfields['t.datev']['label'], $_SERVER['PHP_SELF'], 't.datev', '', $param, 'align="center"', $sortfield, $sortorder); +} +if (!empty($arrayfields['t.fk_typepayment']['checked'])) { + print_liste_field_titre($arrayfields['t.fk_typepayment']['label'], $_SERVER['PHP_SELF'], 't.fk_typepayment', '', $param, '', $sortfield, $sortorder, 'left '); +} +if (!empty($arrayfields['t.fk_account']['checked'])) { + print_liste_field_titre($arrayfields['t.fk_account']['label'], $_SERVER['PHP_SELF'], 't.fk_account', '', $param, '', $sortfield, $sortorder, 'left '); +} +if (!empty($arrayfields['t.amount']['checked'])) { + print_liste_field_titre($arrayfields['t.amount']['label'], $_SERVER['PHP_SELF'], 't.amount', '', $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['t.status']['checked'])) { + print_liste_field_titre($arrayfields['t.status']['label'], $_SERVER["PHP_SELF"], "t.paye", "", $param, 'class="right"', $sortfield, $sortorder); +} // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); @@ -341,70 +431,73 @@ while ($i < min($num, $limit)) { $tva_static->id = $obj->rowid; $tva_static->ref = $obj->rowid; + $tva_static->label = $obj->label; print ''; // No if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref if (!empty($arrayfields['t.rowid']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label if (!empty($arrayfields['t.label']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date end period if (!empty($arrayfields['t.datev']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date payment - if (!empty($arrayfields['t.datep']['checked'])) { + /*if (!empty($arrayfields['t.datep']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; - } + }*/ // Type - if (!empty($arrayfields['t.fk_typepayment']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - - // Cheque number - if (!empty($arrayfields['t.num_payment']['checked'])) { - print ''; - if (!$i) $totalarray['nbfield']++; - } - - // Bank transaction - if (!empty($arrayfields['transaction']['checked'])) { - $bankline->fetch($obj->fk_bank); - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['t.fk_typepayment']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Account - if (!empty($arrayfields['ba.label']['checked'])) { + if (!empty($arrayfields['t.fk_account']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; - $totalarray['pos'][$totalarray['nbfield']] = 'amount'; - $totalarray['val']['amount'] += $objp->amount; + if (!empty($arrayfields['t.amount']['checked'])) { + $total = $total + $obj->amount; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + $totalarray['pos'][$totalarray['nbfield']] = 'amount'; + $totalarray['val']['amount'] += $obj->amount; + } + + if (!empty($arrayfields['t.status']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($arrayfields['t.amount']['checked'])) { + $totalarray['pos'][$totalarray['nbfield']] = ''; + } + } // Buttons print ''; diff --git a/htdocs/compta/tva/payments.php b/htdocs/compta/tva/payments.php new file mode 100644 index 00000000000..57e70e70a3d --- /dev/null +++ b/htdocs/compta/tva/payments.php @@ -0,0 +1,276 @@ + + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2021 Gauthier VERDOL + * + * 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/compta/tva/payments.php + * \ingroup compta + * \brief Page to list payments of special expenses + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('compta', 'bills')); + +$mode = GETPOST("mode", 'alpha'); +$year = GETPOST("year", 'int'); +$filtre = GETPOST("filtre", 'alpha'); +if (!$year && $mode != 'tvaonly') { + $year = date("Y", time()); +} + +$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 = "ptva.datep"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} + +$object = new Tva($db); + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +//$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|'); +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); + + +/* + * View + */ + +$tva_static = new Tva($db); +$tva = new Tva($db); +$accountlinestatic = new AccountLine($db); +$payment_vat_static = new PaymentVAT($db); +$sal_static = new PaymentSalary($db); + +llxHeader('', $langs->trans("VATExpensesArea")); + +$title = $langs->trans("VATPayments"); + +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.$contextpage; +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} +if ($sortfield) { + $param .= '&sortfield='.$sortfield; +} +if ($sortorder) { + $param .= '&sortorder='.$sortorder; +} + + +print ''; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit); + +if ($year) { + $param .= '&year='.$year; +} + +if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '
    '; print '
    '; print $form->selectDate($search_datepayment_start ? $search_datepayment_start : -1, 'search_datepayment_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); @@ -266,7 +347,7 @@ if (!empty($arrayfields['t.datep']['checked'])) { print $form->selectDate($search_datepayment_end ? $search_datepayment_end : -1, 'search_datepayment_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print '
    '; print '
    '; - print ''; - print ''; - print ''; $form->select_comptes($search_account, 'search_account', 0, '', 1); print ''; + $liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); + print $form->selectarray('search_status', $liststatus, $search_status, 1); + print '
    '.(($offset * $limit) + $i).''.$tva_static->getNomUrl(1).''.dol_trunc($obj->label, 40).''.dol_print_date($db->jdate($obj->datev), 'day').''.dol_print_date($db->jdate($obj->datep), 'day').''.$langs->trans("PaymentTypeShort".$obj->payment_code).''.$obj->num_payment.''.$bankline->getNomUrl(1, 0).''; + if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); + print ''; - if ($obj->fk_bank > 0) { - $bankstatic->id = $obj->bid; + if ($obj->fk_account > 0) { + $bankstatic->id = $obj->fk_account; $bankstatic->ref = $obj->bref; $bankstatic->number = $obj->bnumber; + $bankstatic->iban = $obj->iban; + $bankstatic->bic = $obj->bic; + $bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code); $bankstatic->account_number = $obj->account_number; + $bankstatic->clos = $obj->clos; - $accountingjournal->fetch($obj->fk_accountancy_journal); - $bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); + //$accountingjournal->fetch($obj->fk_accountancy_journal); + //$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); $bankstatic->label = $obj->blabel; print $bankstatic->getNomUrl(1); @@ -414,11 +507,25 @@ while ($i < min($num, $limit)) { } // Amount - $total = $total + $obj->amount; - print ''.price($obj->amount).'' . price($obj->amount) . '' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) . '
    '; + print ''; + print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("VATDeclaration", $_SERVER["PHP_SELF"], "tva.rowid", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "tva.label", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "tva.datev", "", $param, 'width="140px"', $sortfield, $sortorder); + print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "ptva.num_paiement", "", $param, '', $sortfield, $sortorder, '', 'ChequeOrTransferNumber'); + if (!empty($conf->banque->enabled)) { + print_liste_field_titre("BankTransactionLine", $_SERVER["PHP_SELF"], "ptva.fk_bank", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "bank.ref", "", $param, '', $sortfield, $sortorder); + } + //print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "tva.fk_type", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "tva.amount", "", $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, 'class="right"', $sortfield, $sortorder); + print "\n"; + + $sql = "SELECT tva.rowid, tva.label as label, b.fk_account, ptva.fk_bank"; + $sql .= ", tva.datev"; + $sql .= ", tva.amount as total,"; + $sql .= " ptva.rowid as pid, ptva.datep, ptva.amount as totalpaye, ptva.num_paiement as num_payment,"; + $sql .= " pct.code as payment_code"; + $sql .= " FROM ".MAIN_DB_PREFIX."tva as tva,"; + $sql .= " ".MAIN_DB_PREFIX."payment_vat as ptva"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."bank as b ON (b.rowid = ptva.fk_bank)"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."bank_account as bank ON (bank.rowid = b.fk_account)"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ptva.fk_typepaiement = pct.id"; + $sql .= " WHERE ptva.fk_tva = tva.rowid"; + $sql .= " AND tva.entity = ".$conf->entity; + 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 .= " (tva.datev IS NOT NULL AND tva.datev between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; + $sql .= " OR (tva.datev IS NULL AND tva.datev between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; + $sql .= ")"; + } + if (preg_match('/^cs\./', $sortfield) + || preg_match('/^tva\./', $sortfield) + || preg_match('/^ptva\./', $sortfield) + || preg_match('/^pct\./', $sortfield) + || preg_match('/^bank\./', $sortfield)) { + $sql .= $db->order($sortfield, $sortorder); + } + //$sql.= $db->plimit($limit+1,$offset); + //print $sql; + + dol_syslog("compta/tva/payments.php: select payment", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + $total = 0; + $totalnb = 0; + $totalpaye = 0; + + while ($i < min($num, $limit)) { + $obj = $db->fetch_object($resql); + + $payment_vat_static->id = $obj->pid; + $payment_vat_static->ref = $obj->pid; + + print ''; + + // Ref payment + print '\n"; + + // VAT + print ''; + + // Label + print ''; + + // Date + $date = $obj->datev; + print ''; + + // Date payment + print ''; + + // Type payment + print ''; + + // Chq number + print ''; + + if (!empty($conf->banque->enabled)) { + // Bank transaction + print ''; + + // Account + print ''; + } + + // Type + //print ''; + // Expected to pay + print ''; + // Paid + print ''; + print ''; + + $total = $total + $obj->total; + $totalnb = $totalnb + $obj->nb; + $totalpaye = $totalpaye + $obj->totalpaye; + $i++; + } + + // Total + print ''; + print ''; // A total here has no sense + print ''; + print ''; + if (!empty($conf->banque->enabled)) { + print ''; + print ''; + } + print ''; + print ''; + print '"; + print ""; + } else { + dol_print_error($db); + } + print '
    '.$payment_vat_static->getNomUrl(1)."'; + $tva->id = $obj->rowid; + $tva->ref = $obj->rowid; + $tva->label = $obj->label; + print $tva->getNomUrl(1, '20'); + print ''.$obj->label.''.dol_print_date($date, 'day').''.dol_print_date($db->jdate($obj->datep), 'day').''; + if ($obj->payment_code) { + print $langs->trans("PaymentTypeShort".$obj->payment_code).' '; + } + print ''.$obj->num_payment.''; + $accountlinestatic->id = $obj->fk_bank; + print $accountlinestatic->getNomUrl(1); + print ''; + $account = new Account($db); + $account->fetch($obj->fk_account); + print $account->getNomUrl(1); + print ''.$obj->type_label.''.price($obj->total).''; + if ($obj->totalpaye) { + print price($obj->totalpaye); + } + print '
    '.$langs->trans("Total").'      '.price($totalpaye)."
    '; + print '
    '; +} + +print '
    '; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index ba12b08b3b0..4b44959bc1a 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -4,8 +4,9 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2006-2015 Yannick Warnier * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2019 Eric Seigne + * Copyright (C) 2021 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 @@ -44,71 +45,35 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class. // Load translation files required by the page $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); -$now = dol_now(); -$current_date = dol_getdate($now); -if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1; +$refresh = (GETPOSTISSET('submit') || GETPOSTISSET('vat_rate_show') || GETPOSTISSET('invoice_type')) ? true : false; +$invoice_type = GETPOSTISSET('invoice_type') ? GETPOST('invoice_type', 'alpha') : ''; +$vat_rate_show = GETPOSTISSET('vat_rate_show') ? GETPOST('vat_rate_show', 'int') : -1; -// Date range -$year = GETPOST("year", "int"); -if (empty($year)) -{ - $year_current = $current_date['year']; - $year_start = $year_current; -} else { - $year_current = $year; - $year_start = $year; -} -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); -// Set default period if not defined -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 (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 - 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--; - } - } else { - if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year - $year_start--; - } - } - $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 - $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 { - 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); } - if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } - } -} +include DOL_DOCUMENT_ROOT.'/compta/tva/initdatesforvat.inc.php'; $min = price2num(GETPOST("min", "alpha")); -if (empty($min)) $min = 0; +if (empty($min)) { + $min = 0; +} // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products -$modetax = $conf->global->TAX_MODE; -if (GETPOSTISSET("modetax")) $modetax = GETPOST("modetax", 'int'); -if (empty($modetax)) $modetax = 0; +$modetax = (empty($conf->global->TAX_MODE) ? 0 : $conf->global->TAX_MODE); +if (GETPOSTISSET("modetax")) { + $modetax = GETPOSTINT("modetax"); +} +if (empty($modetax)) { + $modetax = 0; +} + +$object = new Tva($db); // Security check -$socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'tax', '', '', 'charges'); - +$socid = GETPOSTINT('socid'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'tax', '', 'tva', 'charges'); /* @@ -127,12 +92,13 @@ $paymentexpensereport_static = new PaymentExpenseReport($db); $morequerystring = ''; $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday'); -foreach ($listofparams as $param) -{ - if (GETPOST($param) != '') $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); +foreach ($listofparams as $param) { + if (GETPOST($param) != '') { + $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param); + } } -$title = $langs->trans("VATReport")." ".dol_print_date($date_start)." -> ".dol_print_date($date_end); +$title = $langs->trans("VATReport")." ".dol_print_date($date_start, '', 'tzserver')." -> ".dol_print_date($date_end, '', 'tzserver'); llxHeader('', $title, '', '', 0, 0, '', '', $morequerystring); @@ -149,20 +115,29 @@ $fsearch .= ''; // Show report header $name = $langs->trans("VATReportByRates"); $calcmode = ''; -if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); -if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); -if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); +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').')'; // 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; +$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$period .= ' - '; +$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver'); +$prevyear = $date_start_year; +$prevquarter = $q; if ($prevquarter > 1) { $prevquarter--; } else { $prevquarter = 4; $prevyear--; } -$nextyear = $year_start; +$nextyear = $date_start_year; $nextquarter = $q; if ($nextquarter < 4) { $nextquarter++; @@ -173,14 +148,24 @@ if ($nextquarter < 4) { $description .= $fsearch; $builddate = dol_now(); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description .= $langs->trans("RulesVATDueProducts"); -if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description .= $langs->trans("RulesVATInProducts"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description .= '
    '.$langs->trans("RulesVATDueServices"); -if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description .= '
    '.$langs->trans("RulesVATInServices"); +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') { + $description .= $langs->trans("RulesVATDueProducts"); +} +if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') { + $description .= $langs->trans("RulesVATInProducts"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') { + $description .= '
    '.$langs->trans("RulesVATDueServices"); +} +if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + $description .= '
    '.$langs->trans("RulesVATInServices"); +} if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= '
    '.$langs->trans("DepositsAreNotIncluded"); } -if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { + $description .= '
    '.$langs->trans("ThisIsAnEstimatedValue"); +} // Customers invoices $elementcust = $langs->trans("CustomersInvoices"); @@ -202,7 +187,7 @@ if ($mysoc->tva_assuj) { $vatsup .= ' ('.$langs->trans("ToGetBack").')'; } -$optioncss = GETPOST('optioncss'); +$optioncss = GETPOST('optioncss', 'alpha'); if ($optioncss != "print") { report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode); } @@ -217,16 +202,19 @@ print '
    '; print ''; $y = $year_current; -$total = 0; $i = 0; -$columns = 5; + +$columns = 7; +$span = $columns; +if ($modetax != 1) { + $span += 2; +} // Load arrays of datas $x_coll = tax_by_rate('vat', $db, 0, 0, $date_start, $date_end, $modetax, 'sell'); $x_paye = tax_by_rate('vat', $db, 0, 0, $date_start, $date_end, $modetax, 'buy'); -if (!is_array($x_coll) || !is_array($x_paye)) -{ +if (!is_array($x_coll) || !is_array($x_paye)) { $langs->load("errors"); if ($x_coll == -1) { print ''; @@ -238,19 +226,32 @@ if (!is_array($x_coll) || !is_array($x_paye)) } else { $x_both = array(); //now, from these two arrays, get another array with one rate per line - foreach (array_keys($x_coll) as $my_coll_rate) - { + foreach (array_keys($x_coll) as $my_coll_rate) { $x_both[$my_coll_rate]['coll']['totalht'] = $x_coll[$my_coll_rate]['totalht']; $x_both[$my_coll_rate]['coll']['vat'] = $x_coll[$my_coll_rate]['vat']; $x_both[$my_coll_rate]['paye']['totalht'] = 0; $x_both[$my_coll_rate]['paye']['vat'] = 0; $x_both[$my_coll_rate]['coll']['links'] = ''; $x_both[$my_coll_rate]['coll']['detail'] = array(); - foreach ($x_coll[$my_coll_rate]['facid'] as $id=>$dummy) { + foreach ($x_coll[$my_coll_rate]['facid'] as $id => $dummy) { $invoice_customer->id = $x_coll[$my_coll_rate]['facid'][$id]; $invoice_customer->ref = $x_coll[$my_coll_rate]['facnum'][$id]; $invoice_customer->type = $x_coll[$my_coll_rate]['type'][$id]; - $company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); + + //$company_static->fetch($x_coll[$my_coll_rate]['company_id'][$id]); + $company_static->id = $x_coll[$my_coll_rate]['company_id'][$id]; + $company_static->name = $x_coll[$my_coll_rate]['company_name'][$id]; + $company_static->name_alias = $x_coll[$my_coll_rate]['company_alias'][$id]; + $company_static->email = $x_coll[$my_coll_rate]['company_email'][$id]; + $company_static->tva_intra = $x_coll[$my_coll_rate]['tva_intra'][$id]; + $company_static->client = $x_coll[$my_coll_rate]['company_client'][$id]; + $company_static->fournisseur = $x_coll[$my_coll_rate]['company_fournisseur'][$id]; + $company_static->status = $x_coll[$my_coll_rate]['company_status'][$id]; + $company_static->code_client = $x_coll[$my_coll_rate]['company_customer_code'][$id]; + $company_static->code_compta_client = $x_coll[$my_coll_rate]['company_customer_accounting_code'][$id]; + $company_static->code_fournisseur = $x_coll[$my_coll_rate]['company_supplier_code'][$id]; + $company_static->code_compta_fournisseur = $x_coll[$my_coll_rate]['company_supplier_accounting_code'][$id]; + $x_both[$my_coll_rate]['coll']['detail'][] = array( 'id' =>$x_coll[$my_coll_rate]['facid'][$id], 'descr' =>$x_coll[$my_coll_rate]['descr'][$id], @@ -258,13 +259,16 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'pref' =>$x_coll[$my_coll_rate]['pref'][$id], 'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id], 'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id], + 'payment_ref'=>$x_coll[$my_coll_rate]['payment_ref'][$id], 'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id], 'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id], 'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id], 'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id], 'datef' =>$x_coll[$my_coll_rate]['datef'][$id], 'datep' =>$x_coll[$my_coll_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1, '', 20), + 'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id], 'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id], 'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id], @@ -284,11 +288,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_both[$my_paye_rate]['paye']['links'] = ''; $x_both[$my_paye_rate]['paye']['detail'] = array(); - foreach ($x_paye[$my_paye_rate]['facid'] as $id=>$dummy) - { + foreach ($x_paye[$my_paye_rate]['facid'] as $id => $dummy) { // ExpenseReport - if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') - { + if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') { $expensereport->id = $x_paye[$my_paye_rate]['facid'][$id]; $expensereport->ref = $x_paye[$my_paye_rate]['facnum'][$id]; $expensereport->type = $x_paye[$my_paye_rate]['type'][$id]; @@ -300,6 +302,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], 'payment_id' =>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_ref' =>$x_paye[$my_paye_rate]['payment_ref'][$id], 'payment_amount' =>$x_paye[$my_paye_rate]['payment_amount'][$id], 'ftotal_ttc' =>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), 'dtotal_ttc' =>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), @@ -314,7 +317,20 @@ if (!is_array($x_coll) || !is_array($x_paye)) $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]; - $company_static->fetch($x_paye[$my_paye_rate]['company_id'][$id]); + + $company_static->id = $x_paye[$my_paye_rate]['company_id'][$id]; + $company_static->name = $x_paye[$my_paye_rate]['company_name'][$id]; + $company_static->name_alias = $x_paye[$my_paye_rate]['company_alias'][$id]; + $company_static->email = $x_paye[$my_paye_rate]['company_email'][$id]; + $company_static->tva_intra = $x_paye[$my_paye_rate]['tva_intra'][$id]; + $company_static->client = $x_paye[$my_paye_rate]['company_client'][$id]; + $company_static->fournisseur = $x_paye[$my_paye_rate]['company_fournisseur'][$id]; + $company_static->status = $x_paye[$my_paye_rate]['company_status'][$id]; + $company_static->code_client = $x_paye[$my_paye_rate]['company_customer_code'][$id]; + $company_static->code_compta_client = $x_paye[$my_paye_rate]['company_customer_accounting_code'][$id]; + $company_static->code_fournisseur = $x_paye[$my_paye_rate]['company_supplier_code'][$id]; + $company_static->code_compta_fournisseur = $x_paye[$my_paye_rate]['company_supplier_accounting_code'][$id]; + $x_both[$my_paye_rate]['paye']['detail'][] = array( 'id' =>$x_paye[$my_paye_rate]['facid'][$id], 'descr' =>$x_paye[$my_paye_rate]['descr'][$id], @@ -322,13 +338,16 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'pref' =>$x_paye[$my_paye_rate]['pref'][$id], 'ptype' =>$x_paye[$my_paye_rate]['ptype'][$id], 'payment_id'=>$x_paye[$my_paye_rate]['payment_id'][$id], + 'payment_ref'=>$x_paye[$my_paye_rate]['payment_ref'][$id], 'payment_amount'=>$x_paye[$my_paye_rate]['payment_amount'][$id], 'ftotal_ttc'=>price2num($x_paye[$my_paye_rate]['ftotal_ttc'][$id]), 'dtotal_ttc'=>price2num($x_paye[$my_paye_rate]['dtotal_ttc'][$id]), 'dtype' =>$x_paye[$my_paye_rate]['dtype'][$id], 'datef' =>$x_paye[$my_paye_rate]['datef'][$id], 'datep' =>$x_paye[$my_paye_rate]['datep'][$id], + 'company_link'=>$company_static->getNomUrl(1, '', 20), + 'ddate_start'=>$x_paye[$my_paye_rate]['ddate_start'][$id], 'ddate_end' =>$x_paye[$my_paye_rate]['ddate_end'][$id], 'totalht' =>price2num($x_paye[$my_paye_rate]['totalht_list'][$id]), @@ -348,21 +367,20 @@ if (!is_array($x_coll) || !is_array($x_paye)) $x_paye_sum = 0; $x_paye_ht = 0; - $span = $columns; - if ($modetax != 1) $span += 2; - //print ''; // Customers invoices print ''; print ''; print ''; - if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; - else print ''; + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') { + print ''; + } else { + print ''; + } print ''; print ''; - if ($modetax != 1) - { + if ($modetax != 1) { print ''; print ''; } @@ -385,11 +403,17 @@ if (!is_array($x_coll) || !is_array($x_paye)) $subtot_coll_total_ht = 0; $subtot_coll_vat = 0; - if (is_array($x_both[$rate]['coll']['detail'])) - { + if (is_array($x_both[$rate]['coll']['detail'])) { // VAT Rate print ""; - print ''; + print ''; print ''."\n"; foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) { @@ -405,115 +429,166 @@ if (!is_array($x_coll) || !is_array($x_paye)) $type = 1; } - - print ''; - - // Ref - print ''; - - // Invoice date - print ''; - - // Payment date - if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; - else print ''; - - // Company name - print ''; - - // Description - print ''; - - // Total HT - if ($modetax != 1) - { - print ''; - } - // Payment - $ratiopaymentinvoice = 1; - if ($modetax != 1) - { - print ''; } // Total collected - print ''; + $temp_ht=$fields['totalht']*$ratiopaymentinvoice; // VAT - print ''; - print ''; + $temp_vat=$fields['vat']*$ratiopaymentinvoice; $subtot_coll_total_ht += $temp_ht; $subtot_coll_vat += $temp_vat; $x_coll_sum += $temp_vat; } } + + if ($invoice_type == 'customer' && $vat_rate_show == $rate) { + if (is_array($x_both[$rate]['coll']['detail'])) { + foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) { + /*$company_static->id = $fields['company_id']; + $company_static->name = $fields['company_name']; + $company_static->name_alias = $fields['company_alias']; + $company_static->email = $fields['company_email']; + $company_static->tva_intra = $fields['tva_intra']; + $company_static->client = $fields['company_client']; + $company_static->fournisseur = $fields['company_fournisseur']; + $company_static->status = $fields['company_status']; + $company_static->code_client = $fields['company_client']; + $company_static->code_compta_client = $fields['company_customer_code']; + $company_static->code_fournisseur = $fields['company_customer_accounting_code']; + $company_static->code_compta_fournisseur = $fields['company_supplier_accounting_code'];*/ + + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type = 1; + } + if (!empty($fields['ddate_end'])) { + $type = 1; + } + + + print ''; + + // Ref + print ''; + + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print ''; + else print ''; + + // Company name + print ''; + + // Description + print ''; + + // Total HT + if ($modetax != 1) { + print ''; + } + + // Payment + $ratiopaymentinvoice = 1; + if ($modetax != 1) { + print ''; + } + + // Total collected + print ''; + + // VAT + print ''; + print ''; + + //$subtot_coll_total_ht += $temp_ht; + //$subtot_coll_vat += $temp_vat; + //$x_coll_sum += $temp_vat; + } + } + } // Total customers for this vat rate print ''; print ''; @@ -522,13 +597,12 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } - if (count($x_coll) == 0) // Show a total line if nothing shown - { + if (count($x_coll) == 0) { // Show a total line if nothing shown print ''; print ''; print ''; @@ -542,9 +616,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) } // Blank line - print ''; + print ''; - // Print table headers for this quadri - expenses now + // Print table headers for this quadri - expenses print ''; print ''; print ''; @@ -560,18 +634,23 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''."\n"; - foreach (array_keys($x_paye) as $rate) - { + foreach (array_keys($x_paye) as $rate) { $subtot_paye_total_ht = 0; $subtot_paye_vat = 0; - if (is_array($x_both[$rate]['paye']['detail'])) - { + if (is_array($x_both[$rate]['paye']['detail'])) { print ""; - print ''; + print ''; print ''."\n"; - foreach ($x_both[$rate]['paye']['detail'] as $index=>$fields) { + foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) { // Define type // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); @@ -584,115 +663,168 @@ if (!is_array($x_coll) || !is_array($x_paye)) $type = 1; } - - print ''; - - // Ref - print ''; - - // Invoice date - print ''; - - // Payment date - if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''; - else print ''; - - // Company name - print ''; - - // Description - print ''; - - // Total HT - if ($modetax != 1) - { - print ''; - } - // Payment $ratiopaymentinvoice = 1; - if ($modetax != 1) - { - print ''; } // VAT paid - print ''; // VAT - print ''; - print ''; $subtot_paye_total_ht += $temp_ht; $subtot_paye_vat += $temp_vat; $x_paye_sum += $temp_vat; } + + if ($invoice_type == 'supplier' && $vat_rate_show == $rate) { + foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) { + /*$company_static->id = $fields['company_id']; + $company_static->name = $fields['company_name']; + $company_static->name_alias = $fields['company_alias']; + $company_static->email = $fields['company_email']; + $company_static->tva_intra = $fields['tva_intra']; + $company_static->client = $fields['company_client']; + $company_static->fournisseur = $fields['company_fournisseur']; + $company_static->status = $fields['company_status']; + $company_static->code_client = $fields['company_client']; + $company_static->code_compta_client = $fields['company_customer_code']; + $company_static->code_fournisseur = $fields['company_customer_accounting_code']; + $company_static->code_compta_fournisseur = $fields['company_supplier_accounting_code'];*/ + + // Define type + // We MUST use dtype (type in line). We can use something else, only if dtype is really unknown. + $type = (isset($fields['dtype']) ? $fields['dtype'] : $fields['ptype']); + // Try to enhance type detection using date_start and date_end for free lines where type + // was not saved. + if (!empty($fields['ddate_start'])) { + $type = 1; + } + if (!empty($fields['ddate_end'])) { + $type = 1; + } + + + print ''; + + // Ref + print ''; + + // Invoice date + print ''; + + // Payment date + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') { + print ''; + } else { + print ''; + } + + // Company name + print ''; + + // Description + print ''; + + // Total HT + if ($modetax != 1) { + print ''; + } + + // Payment + $ratiopaymentinvoice = 1; + if ($modetax != 1) { + print ''; + } + + // VAT paid + print ''; + + // VAT + print ''; + print ''; + + //$subtot_paye_total_ht += $temp_ht; + //$subtot_paye_vat += $temp_vat; + //$x_paye_sum += $temp_vat; + } + } } + // Total suppliers for this vat rate print ''; print ''; @@ -701,8 +833,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } @@ -714,8 +846,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ''; } diff --git a/htdocs/conf/.gitignore b/htdocs/conf/.gitignore index ed21fdfaa4c..8d06ea77328 100644 --- a/htdocs/conf/.gitignore +++ b/htdocs/conf/.gitignore @@ -5,3 +5,4 @@ /conf.php.pgsql /conf.php.sqlite /conf.php.utf8 +/conf.php.nov* diff --git a/htdocs/conf/index.html b/htdocs/conf/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 2aeb2e4e2a1..ca496540a47 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -65,36 +65,44 @@ $extrafields->fetch_name_optionals_label($object->table_element); $object->getCanvas($id); $objcanvas = null; $canvas = (!empty($object->canvas) ? $object->canvas : GETPOST("canvas")); -if (!empty($canvas)) -{ +if (!empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; $objcanvas = new Canvas($db, $action); $objcanvas->getCanvas('contact', 'contactcard', $canvas); } -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $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'); $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 (!$sortfield) $sortfield = 'a.datep, a.id'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'a.datep, a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('contactagenda', 'globalcard')); @@ -106,20 +114,19 @@ $hookmanager->initHooks(array('contactagenda', 'globalcard')); $parameters = array('id'=>$id, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 test are required to be compatible with all browsers - { + 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 $actioncode = ''; $search_agenda_label = ''; } @@ -133,29 +140,30 @@ if (empty($reshook)) $form = new Form($db); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) $title = $object->lastname; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) { + $title = $object->lastname; +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($socid > 0) -{ +if ($socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($socid); } -if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) -{ +if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // 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 + 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 { // ----------------------------------------- @@ -163,26 +171,27 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // ----------------------------------------- // Confirm deleting contact - if ($user->rights->societe->contact->supprimer) - { - if ($action == 'delete') - { + 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 - */ + * Onglets + */ $head = array(); - if ($id > 0) - { + if ($id > 0) { // Si edition contact deja existant $object = new Contact($db); $res = $object->fetch($id, $user); - if ($res < 0) { dol_print_error($db, $object->error); exit; } + if ($res < 0) { + dol_print_error($db, $object->error); exit; + } $res = $object->fetch_optionals(); - if ($res < 0) { dol_print_error($db, $object->error); exit; } + if ($res < 0) { + dol_print_error($db, $object->error); exit; + } // Show tabs $head = contact_prepare_head($object); @@ -190,13 +199,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); } - if (!empty($id) && $action != 'edit' && $action != 'create') - { + if (!empty($id) && $action != 'edit' && $action != 'create') { $objsoc = new Societe($db); /* - * Fiche en mode visualisation - */ + * Fiche en mode visualisation + */ dol_htmloutput_errors($error, $errors); @@ -205,14 +213,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; @@ -238,29 +248,31 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $out = ''; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { - if (is_object($objthirdparty) && get_class($objthirdparty) == 'Societe') $out .= '&originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&socid='.$objthirdparty->id : ''); + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { + 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')); } $newcardbutton = ''; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } } - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { - print '
    '; + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + print '
    '; $param = '&id='.$id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print load_fiche_titre($langs->trans("ActionsOnContact"), $newcardbutton, ''); //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $morehtmlcenter, 0, -1, '', '', '', '', 0, 1, 1); diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index f6f6fa0b45e..0e80df07676 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -64,14 +64,16 @@ abstract class ActionsContactCardCommon { /*$ret = $this->getInstanceDao(); - if (is_object($this->object) && method_exists($this->object,'fetch')) - { - if (! empty($id)) $this->object->fetch($id); - } - else - {*/ + if (is_object($this->object) && method_exists($this->object,'fetch')) + { + if (! empty($id)) $this->object->fetch($id); + } + else + {*/ $object = new Contact($this->db); - if (!empty($id)) $object->fetch($id); + if (!empty($id)) { + $object->fetch($id); + } $this->object = $object; //} } @@ -90,20 +92,19 @@ abstract class ActionsContactCardCommon global $conf, $langs, $user, $canvas; global $form, $formcompany, $objsoc; - if ($action == 'add' || $action == 'update') $this->assign_post(); + if ($action == 'add' || $action == 'update') { + $this->assign_post(); + } - foreach ($this->object as $key => $value) - { + foreach ($this->object as $key => $value) { $this->tpl[$key] = $value; } $this->tpl['error'] = $this->error; $this->tpl['errors'] = $this->errors; - if ($action == 'create' || $action == 'edit') - { - if ($conf->use_javascript_ajax) - { + if ($action == 'create' || $action == 'edit') { + if ($conf->use_javascript_ajax) { $this->tpl['ajax_selectcountry'] = "\n".''."\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 { @@ -127,14 +127,25 @@ abstract class ActionsContactCardCommon $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') || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) - { - 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; - if (dol_strlen(trim($this->object->phone_pro)) == 0) $this->object->phone_pro = $objsoc->phone; - if (dol_strlen(trim($this->object->fax)) == 0) $this->object->fax = $objsoc->fax; - if (dol_strlen(trim($this->object->email)) == 0) $this->object->email = $objsoc->email; + if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE') || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) { + 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; + } + if (dol_strlen(trim($this->object->phone_pro)) == 0) { + $this->object->phone_pro = $objsoc->phone; + } + if (dol_strlen(trim($this->object->fax)) == 0) { + $this->object->fax = $objsoc->fax; + } + if (dol_strlen(trim($this->object->email)) == 0) { + $this->object->email = $objsoc->email; + } } // Zip @@ -143,28 +154,33 @@ abstract class ActionsContactCardCommon // Town $this->tpl['select_town'] = $formcompany->select_ziptown($this->object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); - if (dol_strlen(trim($this->object->country_id)) == 0) $this->object->country_id = $objsoc->country_id; + if (dol_strlen(trim($this->object->country_id)) == 0) { + $this->object->country_id = $objsoc->country_id; + } // Country $this->tpl['select_country'] = $form->select_country($this->object->country_id, 'country_id'); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; - if ($user->admin) $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } // State - if ($this->object->country_id) $this->tpl['select_state'] = $formcompany->select_state($this->object->state_id, $this->object->country_code); - else $this->tpl['select_state'] = $countrynotdefined; + if ($this->object->country_id) { + $this->tpl['select_state'] = $formcompany->select_state($this->object->state_id, $this->object->country_code); + } else { + $this->tpl['select_state'] = $countrynotdefined; + } // Public or private $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); $this->tpl['select_visibility'] = $form->selectarray('priv', $selectarray, $this->object->priv, 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(); } @@ -175,46 +191,41 @@ abstract class ActionsContactCardCommon $this->object->load_ref_elements(); - if (!empty($conf->commande->enabled)) - { + if (!empty($conf->commande->enabled)) { $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForOrders"); $this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_commande ? $this->object->ref_commande : $langs->trans("NoContactForAnyOrder"); $i++; } - if (!empty($conf->propal->enabled)) - { + if (!empty($conf->propal->enabled)) { $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForProposals"); $this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_propal ? $this->object->ref_propal : $langs->trans("NoContactForAnyProposal"); $i++; } - if (!empty($conf->contrat->enabled)) - { + if (!empty($conf->contrat->enabled)) { $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForContracts"); $this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_contrat ? $this->object->ref_contrat : $langs->trans("NoContactForAnyContract"); $i++; } - if (!empty($conf->facture->enabled)) - { + if (!empty($conf->facture->enabled)) { $this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForInvoices"); $this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_facturation ? $this->object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); $i++; } // 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); @@ -243,14 +254,13 @@ abstract class ActionsContactCardCommon $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'; $login = dol_buildlogin($this->object->lastname, $this->object->firstname); - $generated_password = getRandomPassword(false); + $generated_password = getRandomPassword(false); $password = $generated_password; // Create a form array @@ -273,36 +283,34 @@ abstract class ActionsContactCardCommon // phpcs:enable global $langs, $mysoc; - $this->object->old_name = $_POST["old_name"]; - $this->object->old_firstname = $_POST["old_firstname"]; + $this->object->old_name = GETPOST("old_name"); + $this->object->old_firstname = GETPOST("old_firstname"); - $this->object->socid = $_POST["socid"]; - $this->object->lastname = $_POST["name"]; - $this->object->firstname = $_POST["firstname"]; - $this->object->civility_id = $_POST["civility_id"]; - $this->object->poste = $_POST["poste"]; - $this->object->address = $_POST["address"]; - $this->object->zip = $_POST["zipcode"]; - $this->object->town = $_POST["town"]; - $this->object->country_id = $_POST["country_id"] ? $_POST["country_id"] : $mysoc->country_id; - $this->object->state_id = $_POST["state_id"]; - $this->object->phone_pro = $_POST["phone_pro"]; - $this->object->phone_perso = $_POST["phone_perso"]; - $this->object->phone_mobile = $_POST["phone_mobile"]; - $this->object->fax = $_POST["fax"]; - $this->object->email = $_POST["email"]; - $this->object->jabberid = $_POST["jabberid"]; - $this->object->priv = $_POST["priv"]; - $this->object->note = $_POST["note"]; - $this->object->canvas = $_POST["canvas"]; + $this->object->socid = GETPOST("socid"); + $this->object->lastname = GETPOST("name"); + $this->object->firstname = GETPOST("firstname"); + $this->object->civility_id = GETPOST("civility_id"); + $this->object->poste = GETPOST("poste"); + $this->object->address = GETPOST("address"); + $this->object->zip = GETPOST("zipcode"); + $this->object->town = GETPOST("town"); + $this->object->country_id = GETPOST("country_id") ? GETPOST("country_id") : $mysoc->country_id; + $this->object->state_id = GETPOST("state_id"); + $this->object->phone_pro = GETPOST("phone_pro"); + $this->object->phone_perso = GETPOST("phone_perso"); + $this->object->phone_mobile = GETPOST("phone_mobile"); + $this->object->fax = GETPOST("fax"); + $this->object->email = GETPOST("email"); + $this->object->jabberid = GETPOST("jabberid"); + $this->object->priv = GETPOST("priv"); + $this->object->note = GETPOST("note", "restricthtml"); + $this->object->canvas = GETPOST("canvas"); // We set country_id, and country_code label of the chosen country - if ($this->object->country_id) - { - $sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_country WHERE rowid = ".$this->object->country_id; + if ($this->object->country_id) { + $sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_country WHERE rowid = ".((int) $this->object->country_id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); } else { dol_print_error($this->db); diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index d399584b48d..846f7440f97 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -40,11 +40,11 @@ class ActionsContactCardDefault extends ActionsContactCardCommon */ public function __construct($db, $dirmodule, $targetmodule, $canvas, $card) { - $this->db = $db; + $this->db = $db; $this->dirmodule = $dirmodule; - $this->targetmodule = $targetmodule; - $this->canvas = $canvas; - $this->card = $card; + $this->targetmodule = $targetmodule; + $this->canvas = $canvas; + $this->card = $card; } /** @@ -55,13 +55,19 @@ class ActionsContactCardDefault extends ActionsContactCardCommon */ private function getTitle($action) { - global $langs; + global $langs, $conf; $out = ''; - if ($action == 'view') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress")); - if ($action == 'edit') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress")); - if ($action == 'create') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")); + if ($action == 'view') { + $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress")); + } + if ($action == 'edit') { + $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress")); + } + if ($action == 'create') { + $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")); + } return $out; } @@ -89,8 +95,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->tpl['error'] = $this->error; $this->tpl['errors'] = $this->errors; - if ($action == 'view') - { + if ($action == 'view') { // Card header $head = contact_prepare_head($this->object); $title = $this->getTitle($action); @@ -106,14 +111,12 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1); } else { // Confirm delete contact - if ($action == 'delete' && $user->rights->societe->contact->supprimer) - { + if ($action == 'delete' && $user->rights->societe->contact->supprimer) { $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1); } } - if ($action == 'list') - { + if ($action == 'list') { $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } diff --git a/htdocs/contact/canvas/default/index.html b/htdocs/contact/canvas/default/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 98a66e499b9..bd5cf24e195 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -16,8 +16,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/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 2c82a868ed4..41fbdb5def9 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -16,8 +16,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/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index 43fd48e3ef0..c624eca4026 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -16,8 +16,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; } @@ -30,8 +29,12 @@ echo $this->control->tpl['showhead']; dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']); -if (!empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; -if (!empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?> +if (!empty($this->control->tpl['action_create_user'])) { + echo $this->control->tpl['action_create_user']; +} +if (!empty($this->control->tpl['action_delete'])) { + echo $this->control->tpl['action_delete']; +} ?>
    '.$langs->trans("ErrorNoAccountancyModuleLoaded").'
    '..')
    '.$elementcust.''.$langs->trans("DateInvoice").''.$langs->trans("DatePayment").''.$langs->trans("DatePayment").''.$namecust.''.$productcust.''.$amountcust.''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')
    '.$langs->trans("Rate").': '.vatrate($rate).'%'; + print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%'; + print ' - ' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . ''; + print '
    '.$fields['link'].''.dol_print_date($fields['datef'], 'day').''.dol_print_date($fields['datep'], 'day').''.$fields['company_link'].''; - if ($fields['pid']) - { - $product_static->id = $fields['pid']; - $product_static->ref = $fields['pref']; - $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) { - print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); - } - } else { - if ($type) { - $text = img_object($langs->trans('Service'), 'service'); - } else { - $text = img_object($langs->trans('Product'), 'product'); - } - if (preg_match('/^\((.*)\)$/', $fields['descr'], $reg)) { - if ($reg[1] == 'DEPOSIT') { - $fields['descr'] = $langs->transnoentitiesnoconv('Deposit'); - } elseif ($reg[1] == 'CREDIT_NOTE') { - $fields['descr'] = $langs->transnoentitiesnoconv('CreditNote'); - } else { - $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); - } - } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); - - // Show range - print_date_range($fields['ddate_start'], $fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) - { - //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; - $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); - //print ' ('.round($ratiolineinvoice*100,2).'%)'; - } - print ''; - //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) - { - $payment_static->id = $fields['payment_id']; - print $payment_static->getNomUrl(2); - } + $ratiopaymentinvoice=1; + if ($modetax != 1) { if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') - || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) - { - print $langs->trans("NA"); + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { } else { if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { - $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); - } - print price(price2num($fields['payment_amount'], 'MT')); - if (isset($fields['payment_amount'])) { - print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; + $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); } } - print ''; - $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; - print price(price2num($temp_ht, 'MT'), 1); - print ''; - $temp_vat = $fields['vat'] * $ratiopaymentinvoice; - print price(price2num($temp_vat, 'MT'), 1); - //print price($fields['vat']); - print '
    ' . $fields['link'] . '' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . ''; + //print $company_static->getNomUrl(1); + print $fields['company_link']; + print ''; + if ($fields['pid']) { + $product_static->id = $fields['pid']; + $product_static->ref = $fields['pref']; + $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); + } + } else { + if ($type) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } + if (preg_match('/^\((.*)\)$/', $fields['descr'], $reg)) { + if ($reg[1] == 'DEPOSIT') { + $fields['descr'] = $langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1] == 'CREDIT_NOTE') { + $fields['descr'] = $langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); + } + } + print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); + + // Show range + print_date_range($fields['ddate_start'], $fields['ddate_end']); + } + print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) { + //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; + $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); + //print ' ('.round($ratiolineinvoice*100,2).'%)'; + } + print ''; + //print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc']; + if ($fields['payment_amount'] && $fields['ftotal_ttc']) { + $payment_static->id = $fields['payment_id']; + $payment_static->ref = $fields['payment_ref']; + print $payment_static->getNomUrl(2, '', '', 0).' '; + } + if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) { + print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { + $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'], 'MT')); + if (isset($fields['payment_amount'])) { + print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)'; + } + } + print ''; + $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; + print price(price2num($temp_ht, 'MT'), 1); + print ''; + $temp_vat = $fields['vat'] * $ratiopaymentinvoice; + print price(price2num($temp_vat, 'MT'), 1); + //print price($fields['vat']); + print '
      '.price(price2num($subtot_coll_total_ht, 'MT')).''.price(price2num($subtot_coll_vat, 'MT')).''.price(price2num($subtot_coll_total_ht, 'MT')).''.price(price2num($subtot_coll_vat, 'MT')).'
    '.$langs->trans("Total").':
     
     
    '.$elementsup.''.$langs->trans("DateInvoice").''.$vatsup.'
    '.$langs->trans("Rate").': '.vatrate($rate).'%'; + print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%'; + print ' - ' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . ''; + print '
    '.$fields['link'].''.dol_print_date($fields['datef'], 'day').''.dol_print_date($fields['datep'], 'day').''.$fields['company_link'].''; - if ($fields['pid']) - { - $product_static->id = $fields['pid']; - $product_static->ref = $fields['pref']; - $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered - print $product_static->getNomUrl(1); - if (dol_string_nohtmltag($fields['descr'])) { - print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); - } - } else { - if ($type) { - $text = img_object($langs->trans('Service'), 'service'); - } else { - $text = img_object($langs->trans('Product'), 'product'); - } - if (preg_match('/^\((.*)\)$/', $fields['descr'], $reg)) { - if ($reg[1] == 'DEPOSIT') { - $fields['descr'] = $langs->transnoentitiesnoconv('Deposit'); - } elseif ($reg[1] == 'CREDIT_NOTE') { - $fields['descr'] = $langs->transnoentitiesnoconv('CreditNote'); - } else { - $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); - } - } - print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); - - // Show range - print_date_range($fields['ddate_start'], $fields['ddate_end']); - } - print ''; - print price($fields['totalht']); - if (price2num($fields['ftotal_ttc'])) - { - //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; - $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); - //print ' ('.round($ratiolineinvoice*100,2).'%)'; - } - print ''; - if ($fields['payment_amount'] && $fields['ftotal_ttc']) - { - $paymentfourn_static->id = $fields['payment_id']; - print $paymentfourn_static->getNomUrl(2); - } - + if ($modetax != 1) { if (($type == 0 && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice') - || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) - { - print $langs->trans("NA"); + || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { } else { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } - print price(price2num($fields['payment_amount'], 'MT')); - if (isset($fields['payment_amount'])) { - print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; - } } - print ''; $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; - print price(price2num($temp_ht, 'MT'), 1); - print ''; $temp_vat = $fields['vat'] * $ratiopaymentinvoice; - print price(price2num($temp_vat, 'MT'), 1); - //print price($fields['vat']); - print '
    ' . $fields['link'] . '' . dol_print_date($fields['datef'], 'day') . '' . dol_print_date($fields['datep'], 'day') . ''; + //print $company_static->getNomUrl(1); + print $fields['company_link']; + print ''; + if ($fields['pid']) { + $product_static->id = $fields['pid']; + $product_static->ref = $fields['pref']; + $product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered + print $product_static->getNomUrl(1); + if (dol_string_nohtmltag($fields['descr'])) { + print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); + } + } else { + if ($type) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } + if (preg_match('/^\((.*)\)$/', $fields['descr'], $reg)) { + if ($reg[1] == 'DEPOSIT') { + $fields['descr'] = $langs->transnoentitiesnoconv('Deposit'); + } elseif ($reg[1] == 'CREDIT_NOTE') { + $fields['descr'] = $langs->transnoentitiesnoconv('CreditNote'); + } else { + $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]); + } + } + print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24); + + // Show range + print_date_range($fields['ddate_start'], $fields['ddate_end']); + } + print ''; + print price($fields['totalht']); + if (price2num($fields['ftotal_ttc'])) { + //print $fields['dtotal_ttc']."/".$fields['ftotal_ttc']." - "; + $ratiolineinvoice = ($fields['dtotal_ttc'] / $fields['ftotal_ttc']); + //print ' ('.round($ratiolineinvoice*100,2).'%)'; + } + print ''; + if ($fields['payment_amount'] && $fields['ftotal_ttc']) { + $paymentfourn_static->id = $fields['payment_id']; + $paymentfourn_static->ref = $fields['payment_ref']; + print $paymentfourn_static->getNomUrl(2, '', '', 0).' '; + } + + if (($type == 0 && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice') + || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { + print $langs->trans("NA"); + } else { + if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { + $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); + } + print price(price2num($fields['payment_amount'], 'MT')); + if (isset($fields['payment_amount'])) { + print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)'; + } + } + print ''; + $temp_ht = $fields['totalht'] * $ratiopaymentinvoice; + print price(price2num($temp_ht, 'MT'), 1); + print ''; + $temp_vat = $fields['vat'] * $ratiopaymentinvoice; + print price(price2num($temp_vat, 'MT'), 1); + //print price($fields['vat']); + print '
      '.price(price2num($subtot_paye_total_ht, 'MT')).''.price(price2num($subtot_paye_vat, 'MT')).''.price(price2num($subtot_paye_total_ht, 'MT')).''.price(price2num($subtot_paye_vat, 'MT')).'
      '.price(price2num(0, 'MT')).''.price(price2num(0, 'MT')).''.price(price2num(0, 'MT')).''.price(price2num(0, 'MT')).'
    diff --git a/htdocs/contact/canvas/default/tpl/index.html b/htdocs/contact/canvas/default/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/canvas/index.html b/htdocs/contact/canvas/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 6bc9133c553..b337f0980e6 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2019 Josep Lluís Amador * Copyright (C) 2020 Open-Dsi * @@ -71,24 +71,26 @@ $socialnetworks = getArrayOfSocialNetworks(); $object->getCanvas($id); $objcanvas = null; $canvas = (!empty($object->canvas) ? $object->canvas : GETPOST("canvas")); -if (!empty($canvas)) -{ +if (!empty($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; +if ($user->socid) { + $socid = $user->socid; +} $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')); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} -if (!($object->id > 0) && $action == 'view') -{ +if (!($object->id > 0) && $action == 'view') { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound')); exit; @@ -100,36 +102,32 @@ if (!($object->id > 0) && $action == 'view') $parameters = array('id'=>$id, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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) - { + if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) { // Recuperation contact actuel $result = $object->fetch($id); - if ($result > 0) - { + if ($result > 0) { $db->begin(); // Creation user $nuser = new User($db); $result = $nuser->create_from_contact($object, GETPOST("login")); // Do not use GETPOST(alpha) - if ($result > 0) - { + if ($result > 0) { $result2 = $nuser->setPassword($user, GETPOST("password"), 0, 0, 1); // Do not use GETPOST(alpha) - if ($result2) - { + if ($result2) { $db->commit(); } else { $error = $nuser->error; $errors = $nuser->errors; @@ -146,11 +144,9 @@ if (empty($reshook)) // Confirmation desactivation - if ($action == 'disable') - { + if ($action == 'disable') { $object->fetch($id); - if ($object->setstatus(0) < 0) - { + if ($object->setstatus(0) < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); @@ -159,11 +155,9 @@ if (empty($reshook)) } // Confirmation activation - if ($action == 'enable') - { + if ($action == 'enable') { $object->fetch($id); - if ($object->setstatus(1) < 0) - { + if ($object->setstatus(1) < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); @@ -172,11 +166,12 @@ if (empty($reshook)) } // Add contact - if ($action == 'add' && $user->rights->societe->contact->creer) - { + if ($action == 'add' && $user->rights->societe->contact->creer) { $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'); @@ -202,7 +197,7 @@ if (empty($reshook)) } } } - $object->email = (string) GETPOST("email", 'alpha'); + $object->email = (string) GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); $object->no_email = GETPOST("no_email", "int"); $object->phone_pro = (string) GETPOST("phone_pro", 'alpha'); $object->phone_perso = (string) GETPOST("phone_perso", 'alpha'); @@ -221,54 +216,69 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) - { + if ($ret < 0) { $error++; $action = 'create'; } - if (!GETPOST("lastname")) { + if (!empty($conf->mailing->enabled) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1 && $object->no_email==-1 && !empty($object->email)) { + $error++; + $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")); + $action = 'create'; + } + + if (!empty($object->email) && !isValidEMail($object->email)) { + $langs->load("errors"); + $error++; + $errors[] = $langs->trans("ErrorBadEMail", GETPOST('email', 'alpha')); + $action = 'create'; + } + + if (empty($object->lastname)) { $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label")); $action = 'create'; } - if (!$error) - { + if (empty($error)) { $id = $object->create($user); - if ($id <= 0) - { + if ($id <= 0) { $error++; $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); $action = 'create'; - } else { - // Categories association - $contcats = GETPOST('contcats', 'array'); - $object->setCategories($contcats); + } + } - // Add mass emailing flag into table mailing_unsubscribe - if (GETPOST('no_email', 'int') && $object->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); - if (empty($obj->nb)) - { - $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); - } - } + if (empty($error)) { + // Categories association + $contcats = GETPOST('contcats', 'array'); + if (count($contcats)>0) { + $result = $object->setCategories($contcats); + if ($result <= 0) { + $error++; + $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); + $action = 'create'; } } } - if (!$error && $id > 0) - { + if (empty($error) && !empty($conf->mailing->enabled) && !empty($object->email)) { + // Add mass emailing flag into table mailing_unsubscribe + $result=$object->setNoEmail($object->no_email); + if ($result<0) { + $error++; + $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); + $action = 'create'; + } + } + + if (empty($error) && $id > 0) { $db->commit(); - if (!empty($backtopage)) $url = $backtopage; - else $url = 'card.php?id='.$id; + if (!empty($backtopage)) { + $url = $backtopage; + } else { + $url = 'card.php?id='.$id; + } header("Location: ".$url); exit; } else { @@ -276,8 +286,7 @@ if (empty($reshook)) } } - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) - { + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) { $result = $object->fetch($id); $object->oldcopy = clone $object; @@ -298,16 +307,26 @@ if (empty($reshook)) } } - if ($action == 'update' && empty($cancel) && $user->rights->societe->contact->creer) - { - if (!GETPOST("lastname", 'alpha')) - { + if ($action == 'update' && empty($cancel) && $user->rights->societe->contact->creer) { + if (!GETPOST("lastname", 'alpha')) { $error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); $action = 'edit'; } - if (!$error) - { + if (!empty($conf->mailing->enabled) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1 && GETPOST("no_email", "int")==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + $error++; + $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")); + $action = 'edit'; + } + + if (!empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)) && !isValidEMail(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + $langs->load("errors"); + $error++; + $errors[] = $langs->trans("ErrorBadEMail", GETPOST('email', 'alpha')); + $action = 'edit'; + } + + if (!$error) { $contactid = GETPOST("contactid", 'int'); $object->fetch($contactid); $object->fetchRoles($contactid); @@ -315,27 +334,22 @@ 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) - { + 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) - { + if ($file_OK) { + 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']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) - { + if (!$result > 0) { $errors[] = "ErrorFailedToSaveFile"; } else { $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); @@ -348,8 +362,7 @@ if (empty($reshook)) $errors[] = "ErrorBadImageFormat"; } } else { - switch ($_FILES['photo']['error']) - { + 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"; @@ -377,7 +390,7 @@ if (empty($reshook)) $object->state_id = GETPOST("state_id", 'int'); $object->country_id = GETPOST("country_id", 'int'); - $object->email = (string) GETPOST("email", 'alpha'); + $object->email = (string) GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); $object->no_email = GETPOST("no_email", "int"); //$object->jabberid = GETPOST("jabberid", 'alpha'); //$object->skype = GETPOST("skype", 'alpha'); @@ -404,10 +417,11 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $result = $object->update($contactid, $user); if ($result > 0) { @@ -415,31 +429,14 @@ if (empty($reshook)) $categories = GETPOST('contcats', 'array'); $object->setCategories($categories); - $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); + if (GETPOSTISSET('no_email') && $object->email) { + $no_email = GETPOST('no_email', 'int'); + $result=$object->setNoEmail($no_email); + if ($result<0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; } - - $object->no_email = $no_email; } $object->old_lastname = ''; @@ -452,31 +449,31 @@ if (empty($reshook)) } } - if (!$error && empty($errors)) - { - if (!empty($backtopage)) - { - header("Location: ".$backtopage); - exit; - } + if (!$error && empty($errors)) { + if (!empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } } } - if ($action == 'setprospectcontactlevel' && $user->rights->societe->contact->creer) - { + 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'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // set communication status - if ($action == 'setstcomm') - { + 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'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // Actions to send emails @@ -493,7 +490,9 @@ if (empty($reshook)) $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) $title = $object->lastname; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) { + $title = $object->lastname; +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); @@ -502,24 +501,23 @@ $formcompany = new FormCompany($db); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -if ($socid > 0) -{ +if ($socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($socid); } -if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) -{ +if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // 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 + 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 { // ----------------------------------------- @@ -527,20 +525,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // ----------------------------------------- // Confirm deleting contact - if ($user->rights->societe->contact->supprimer) - { - if ($action == 'delete') - { + 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 - */ + * Onglets + */ $head = array(); - if ($id > 0) - { + if ($id > 0) { // Si edition contact deja existant $object = new Contact($db); $res = $object->fetch($id, $user); @@ -556,21 +551,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $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 - */ + * Fiche en mode creation + */ $object->canvas = $canvas; $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) - { + $object->country_id = GETPOST("country_id") ? GETPOST("country_id", "int") : (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']; @@ -583,8 +575,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Show errors dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print "\n".''."\n"; + } + if (!GETPOSTISSET("no_email") && !empty($object->email)) { + $result=$object->getNoEmail(); + if ($result<0) { + setEventMessages($object->error, $object->errors, 'errors'); } } - print ''; - print ''; - print ''; + print ''; + print ''; print ''; } - print ''; + if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -770,6 +784,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; print ''; print ''; print ''; @@ -778,39 +795,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } } } - // 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 ''; print ''; - print ''; - } else { - print ''; + print ''; + print ''; + $useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == -1)); + print ''; + print ''; } - print ''; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1083,7 +1073,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; print ''; print ''; print ''; } elseif (!empty($object->socialnetworks[$key])) { @@ -1100,13 +1093,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Note Public print ''; // Note Private print ''; @@ -1142,36 +1135,31 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } $object->load_ref_elements(); - if (!empty($conf->commande->enabled)) - { + if (!empty($conf->commande->enabled)) { print ''; } - if (!empty($conf->propal->enabled)) - { + if (!empty($conf->propal->enabled)) { print ''; } - if (!empty($conf->contrat->enabled)) - { + if (!empty($conf->contrat->enabled)) { print ''; } - if (!empty($conf->facture->enabled)) - { + if (!empty($conf->facture->enabled)) { print ''; @@ -1179,12 +1167,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Login Dolibarr print ''; // Photo @@ -1196,7 +1185,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print "
    \n"; } print '
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'alpha') : $noemail), 1).''.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1)).'
    '; + if (!empty($value['icon'])) { + print ''; + } print ''; print '
    jabberid).'">
    skype).'">
    twitter).'">
    facebook).'">
    linkedin).'">
    '; @@ -839,8 +823,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } @@ -856,8 +839,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Date To Birth print '
    '; $form = new Form($db); - if ($object->birthday) - { + 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); @@ -865,8 +847,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ': '; - if ($object->birthday_alert) - { + if ($object->birthday_alert) { print ''; } else { print ''; @@ -880,8 +861,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '
    '; print ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print '     '; print ''; } else { @@ -893,12 +873,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ""; } elseif ($action == 'edit' && !empty($id)) { /* - * Fiche en mode edition - */ + * Fiche en mode edition + */ // We set country_id, and country_code label of the chosen country - if (GETPOSTISSET("country_id") || $object->country_id) - { + if (GETPOSTISSET("country_id") || $object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; @@ -910,8 +889,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Show errors dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print "\n".''."\n"; + } + if (!GETPOSTISSET("no_email") && !empty($object->email)) { + $result=$object->getNoEmail(); + if ($result<0) { + setEventMessages($object->error, $object->errors, 'errors'); } } - - print '
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ?GETPOST("no_email", 'alpha') : $noemail), 1).'
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty).'
    '; - print ''; + if (!empty($value['icon'])) { + print ''; + } + print ''; print '
    '; - $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, 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%'); + $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); 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("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("DolibarrLogin").''; - if ($object->user_id) - { + 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"); + } else { + print $langs->trans("NoDolibarrAccess"); + } print '
    '; - if ($object->photo) print ''; + if ($object->photo) { + print ''; + } //print ''; print ''; print '
    '.$langs->trans("Delete").'

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

    '.$langs->trans("PhotoFile").'
    '; @@ -1223,8 +1214,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $action = 'presend'; } - if (!empty($id) && $action != 'edit' && $action != 'create') - { + if (!empty($id) && $action != 'edit' && $action != 'create') { $objsoc = new Societe($db); // View mode @@ -1234,15 +1224,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print dol_get_fiche_head($head, 'card', $title, -1, 'contact'); - 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'; $login = dol_buildlogin($object->lastname, $object->firstname); $generated_password = ''; - if (!$ldap_sid) // TODO ldap_sid ? - { + if (!$ldap_sid) { // TODO ldap_sid ? require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $generated_password = getRandomPassword(false); } @@ -1255,10 +1243,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) //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"); + 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'); } @@ -1266,13 +1256,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + 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"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; @@ -1294,30 +1286,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '
    '.$langs->trans("PostOrFunction").''.$object->poste.'
    '.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '.$langs->trans("No_Email").''.yn($noemail).'
    '.$langs->trans("No_Email").''.yn($object->no_email).'
    '.$langs->trans("ContactVisibility").''; @@ -1330,8 +1311,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->fetch_thirdparty(); if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { - if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3) - { + if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3) { print '
    '; print '
    '; @@ -1342,7 +1322,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; + if ($action != 'editlevel' && $user->rights->societe->contact->creer) { + print ''; + } print '
    '; print $langs->trans('ProspectLevel'); print ''; - if ($action != 'editlevel' && $user->rights->societe->contact->creer) print 'id.'">'.img_edit($langs->trans('Modify'), 1).'id.'">'.img_edit($langs->trans('Modify'), 1).'
    '; print '
    '; if ($action == 'editlevel') { @@ -1360,8 +1342,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) 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']).''; + 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 '
    '.$langs->trans("ContactByDefaultFor").''; - print $formcompany->showRoles("roles", $object, 'view'); + print $formcompany->showRoles("roles", $object, 'view', $object->roles); 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"); + 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"); } + 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("ContactForInvoices").''; print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); print '
    '.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { + 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"); + } else { + print $langs->trans("NoDolibarrAccess"); + } print '
    '; @@ -1453,16 +1442,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print dol_get_fiche_end(); - // Barre d'actions + /* + * Action bar + */ print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && $action != 'presend') - { + if (empty($reshook) && $action != 'presend') { if (empty($user->socid)) { - if (!empty($object->email)) - { + if (!empty($object->email)) { $langs->load("mails"); print ''; } else { @@ -1471,30 +1460,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } } - if ($user->rights->societe->contact->creer) - { + if ($user->rights->societe->contact->creer) { print ''.$langs->trans('Modify').''; } - if (!$object->user_id && $user->rights->user->user->creer) - { + 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").''; + 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").''; + if ($object->statut == 1 && $user->rights->societe->contact->creer) { + print ''.$langs->trans("DisableUser").''; } // Delete - if ($user->rights->societe->contact->supprimer) - { + if ($user->rights->societe->contact->supprimer) { print ''.$langs->trans('Delete').''; } } @@ -1506,8 +1490,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
    '; print '
    '; @@ -1527,7 +1510,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Presend form $modelmail = 'contact'; $defaulttopic = 'Information'; - $diroutput = $conf->contact->dir_output; + $diroutput = $conf->societe->dir_output.'/contact/'; $trackid = 'ctc'.$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 c4289a24605..5befcba4537 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -145,14 +145,32 @@ class Contact extends CommonObject */ public $town; - public $state_id; // Id of department - public $state_code; // Code of department - public $state; // Label of department + /** + * @var int // Id of department + */ + public $state_id; + + /** + * @var string // Code of department + */ + public $state_code; + + /** + * @var string // Label of department + */ + public $state; public $poste; // Position - public $socid; // fk_soc - public $statut; // 0=inactif, 1=actif + /** + * @var int Thirdparty ID + */ + public $socid; + + /** + * @var int 0=inactive, 1=active + */ + public $statut; public $code; @@ -242,12 +260,34 @@ class Contact extends CommonObject public $birthday; public $default_lang; - public $ref_facturation; // Reference number of invoice for which it is contact - public $ref_contrat; // Nb de reference contrat pour lequel il est contact - public $ref_commande; // Nb de reference commande pour lequel il est contact - public $ref_propal; // Nb de reference propal pour lequel il est contact + /** + * @var int Number of invoices for which he is contact + */ + public $ref_facturation; + /** + * @var int Number of contracts for which he is contact + */ + public $ref_contrat; + + /** + * @var int Number of orders for which he is contact + */ + public $ref_commande; + + /** + * @var int Number of proposals for which he is contact + */ + public $ref_propal; + + /** + * @var int user ID + */ public $user_id; + + /** + * @var string user login + */ public $user_login; // END MODULEBUILDER PROPERTIES @@ -259,12 +299,19 @@ class Contact extends CommonObject */ public $oldcopy; // To contains a clone of this when we need to save old properties of object - public $roles = null; + /** + * @var array roles + */ + public $roles; public $cacheprospectstatus = array(); public $fk_prospectlevel; public $stcomm_id; public $statut_commercial; + + /** + * @var string picto + */ public $stcomm_picto; /** @@ -335,8 +382,7 @@ class Contact extends CommonObject $sql = "SELECT count(sp.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + if (!$user->rights->societe->client->voir && !$user->socid) { $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -344,13 +390,13 @@ class Contact extends CommonObject } $sql .= ' '.$clause.' sp.entity IN ('.getEntity($this->element).')'; $sql .= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))"; - if ($user->socid > 0) $sql .= " AND sp.fk_soc = ".$user->socid; + if ($user->socid > 0) { + $sql .= " AND sp.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["contacts"] = $obj->nb; } $this->db->free($resql); @@ -381,9 +427,15 @@ class Contact extends CommonObject $this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name); $this->firstname = trim($this->firstname); $this->setUpperOrLowerCase(); - if (empty($this->socid)) $this->socid = 0; - if (empty($this->priv)) $this->priv = 0; - if (empty($this->statut)) $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request + if (empty($this->socid)) { + $this->socid = 0; + } + if (empty($this->priv)) { + $this->priv = 0; + } + if (empty($this->statut)) { + $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request + } $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); @@ -402,8 +454,11 @@ class Contact extends CommonObject $sql .= ", import_key"; $sql .= ") VALUES ("; $sql .= "'".$this->db->idate($now)."',"; - if ($this->socid > 0) $sql .= " ".$this->db->escape($this->socid).","; - else $sql .= "null,"; + if ($this->socid > 0) { + $sql .= " ".$this->db->escape($this->socid).","; + } else { + $sql .= "null,"; + } $sql .= "'".$this->db->escape($this->lastname)."',"; $sql .= "'".$this->db->escape($this->firstname)."',"; $sql .= " ".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "null").","; @@ -418,40 +473,35 @@ class Contact extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."socpeople"); - if (!$error) - { + if (!$error) { $result = $this->update($this->id, $user, 1, 'add'); // This include updateRoles(), ... - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $result = $this->update_perso($this->id, $user, 1); // TODO Remove function update_perso, should be same than update - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('CONTACT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -503,13 +553,20 @@ class Contact extends CommonObject $this->town = (empty($this->town) ? '' : trim($this->town)); $this->setUpperOrLowerCase(); $this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id); - if (empty($this->statut)) $this->statut = 0; - if (empty($this->civility_code) && !is_numeric($this->civility_id)) $this->civility_code = $this->civility_id; // For backward compatibility + if (empty($this->statut)) { + $this->statut = 0; + } + if (empty($this->civility_code) && !is_numeric($this->civility_id)) { + $this->civility_code = $this->civility_id; // For backward compatibility + } $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET "; - if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; - elseif ($this->socid == -1) $sql .= " fk_soc=null,"; + if ($this->socid > 0) { + $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; + } elseif ($this->socid == -1) { + $sql .= " fk_soc=null,"; + } $sql .= " civility='".$this->db->escape($this->civility_code)."'"; $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; @@ -531,8 +588,7 @@ class Contact extends CommonObject $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)) - { + 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); @@ -543,8 +599,7 @@ class Contact extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { unset($this->country_code); unset($this->country); unset($this->state_code); @@ -553,111 +608,95 @@ class Contact extends CommonObject $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } if (!$error) { $result = $this->updateRoles(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && $this->user_id > 0) - { + if (!$error && $this->user_id > 0) { // If contact is linked to a user $tmpobj = new User($this->db); $tmpobj->fetch($this->user_id); $usermustbemodified = 0; - if ($tmpobj->office_phone != $this->phone_pro) - { + if ($tmpobj->office_phone != $this->phone_pro) { $tmpobj->office_phone = $this->phone_pro; $usermustbemodified++; } - if ($tmpobj->office_fax != $this->fax) - { + if ($tmpobj->office_fax != $this->fax) { $tmpobj->office_fax = $this->fax; $usermustbemodified++; } - if ($tmpobj->address != $this->address) - { + if ($tmpobj->address != $this->address) { $tmpobj->address = $this->address; $usermustbemodified++; } - if ($tmpobj->town != $this->town) - { + if ($tmpobj->town != $this->town) { $tmpobj->town = $this->town; $usermustbemodified++; } - if ($tmpobj->zip != $this->zip) - { + if ($tmpobj->zip != $this->zip) { $tmpobj->zip = $this->zip; $usermustbemodified++; } - if ($tmpobj->zip != $this->zip) - { + if ($tmpobj->zip != $this->zip) { $tmpobj->state_id = $this->state_id; $usermustbemodified++; } - if ($tmpobj->country_id != $this->country_id) - { + if ($tmpobj->country_id != $this->country_id) { $tmpobj->country_id = $this->country_id; $usermustbemodified++; } - if ($tmpobj->email != $this->email) - { + if ($tmpobj->email != $this->email) { $tmpobj->email = $this->email; $usermustbemodified++; } - if (!empty(array_diff($tmpobj->socialnetworks, $this->socialnetworks))) - { + if (!empty(array_diff($tmpobj->socialnetworks, $this->socialnetworks))) { $tmpobj->socialnetworks = $this->socialnetworks; $usermustbemodified++; } - // if ($tmpobj->skype != $this->skype) - // { + // if ($tmpobj->skype != $this->skype) { // $tmpobj->skype = $this->skype; // $usermustbemodified++; // } - // if ($tmpobj->twitter != $this->twitter) - // { + // if ($tmpobj->twitter != $this->twitter) { // $tmpobj->twitter = $this->twitter; // $usermustbemodified++; // } - // if ($tmpobj->facebook != $this->facebook) - // { + // if ($tmpobj->facebook != $this->facebook) { // $tmpobj->facebook = $this->facebook; // $usermustbemodified++; // } - // if ($tmpobj->linkedin != $this->linkedin) - // { + // if ($tmpobj->linkedin != $this->linkedin) { // $tmpobj->linkedin = $this->linkedin; // $usermustbemodified++; // } - if ($usermustbemodified) - { + if ($usermustbemodified) { $result = $tmpobj->update($user, 0, 1, 1, 1); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONTACT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -689,9 +728,13 @@ class Contact extends CommonObject // phpcs:enable global $conf; $dn = ''; - if ($mode == 0) $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS].",".$conf->global->LDAP_CONTACT_DN; - elseif ($mode == 1) $dn = $conf->global->LDAP_CONTACT_DN; - elseif ($mode == 2) $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS]; + if ($mode == 0) { + $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS].",".$conf->global->LDAP_CONTACT_DN; + } elseif ($mode == 1) { + $dn = $conf->global->LDAP_CONTACT_DN; + } elseif ($mode == 2) { + $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS]; + } return $dn; } @@ -716,35 +759,69 @@ class Contact extends CommonObject $this->fullname = $this->getFullName($langs); // Fields - if ($this->fullname && !empty($conf->global->LDAP_CONTACT_FIELD_FULLNAME)) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname; - if ($this->lastname && !empty($conf->global->LDAP_CONTACT_FIELD_NAME)) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->lastname; - if ($this->firstname && !empty($conf->global->LDAP_CONTACT_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname; + if ($this->fullname && !empty($conf->global->LDAP_CONTACT_FIELD_FULLNAME)) { + $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname; + } + if ($this->lastname && !empty($conf->global->LDAP_CONTACT_FIELD_NAME)) { + $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->lastname; + } + if ($this->firstname && !empty($conf->global->LDAP_CONTACT_FIELD_FIRSTNAME)) { + $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname; + } - if ($this->poste) $info["title"] = $this->poste; - if ($this->socid > 0) - { + if ($this->poste) { + $info["title"] = $this->poste; + } + if ($this->socid > 0) { $soc = new Societe($this->db); $soc->fetch($this->socid); $info[$conf->global->LDAP_CONTACT_FIELD_COMPANY] = $soc->name; - if ($soc->client == 1) $info["businessCategory"] = "Customers"; - if ($soc->client == 2) $info["businessCategory"] = "Prospects"; - if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers"; + if ($soc->client == 1) { + $info["businessCategory"] = "Customers"; + } + if ($soc->client == 2) { + $info["businessCategory"] = "Prospects"; + } + if ($soc->fournisseur == 1) { + $info["businessCategory"] = "Suppliers"; + } + } + if ($this->address && !empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) { + $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address; + } + if ($this->zip && !empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) { + $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->zip; + } + if ($this->town && !empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) { + $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->town; + } + if ($this->country_code && !empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) { + $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code; + } + if ($this->phone_pro && !empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) { + $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro; + } + if ($this->phone_perso && !empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) { + $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; + } + if ($this->phone_mobile && !empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) { + $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile; + } + if ($this->fax && !empty($conf->global->LDAP_CONTACT_FIELD_FAX)) { + $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax; + } + if ($this->skype && !empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) { + $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype; + } + if ($this->note_private && !empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) { + $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = dol_string_nohtmltag($this->note_private, 2); + } + if ($this->email && !empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) { + $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email; } - if ($this->address && !empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address; - if ($this->zip && !empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->zip; - if ($this->town && !empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->town; - if ($this->country_code && !empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code; - if ($this->phone_pro && !empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro; - if ($this->phone_perso && !empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; - if ($this->phone_mobile && !empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile; - if ($this->fax && !empty($conf->global->LDAP_CONTACT_FIELD_FAX)) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax; - if ($this->skype && !empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype; - if ($this->note_private && !empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = dol_string_nohtmltag($this->note_private, 2); - if ($this->email && !empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email; - if ($conf->global->LDAP_SERVER_TYPE == 'egroupware') - { + if ($conf->global->LDAP_SERVER_TYPE == 'egroupware') { $info["objectclass"][4] = "phpgwContact"; // compatibilite egroupware $info['uidnumber'] = $this->id; @@ -757,15 +834,18 @@ class Contact extends CommonObject $info["phpgwContactCatId"] = 0; $info["phpgwContactAccess"] = "public"; - if (dol_strlen($this->egroupware_id) == 0) - { + if (dol_strlen($this->egroupware_id) == 0) { $this->egroupware_id = 1; } $info["phpgwContactOwner"] = $this->egroupware_id; - if ($this->email) $info["rfc822Mailbox"] = $this->email; - if ($this->phone_mobile) $info["phpgwCellTelephoneNumber"] = $this->phone_mobile; + if ($this->email) { + $info["rfc822Mailbox"] = $this->email; + } + if ($this->phone_mobile) { + $info["phpgwCellTelephoneNumber"] = $this->phone_mobile; + } } return $info; @@ -793,13 +873,14 @@ class Contact extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET"; $sql .= " birthday=".($this->birthday ? "'".$this->db->idate($this->birthday)."'" : "null"); $sql .= ", photo = ".($this->photo ? "'".$this->db->escape($this->photo)."'" : "null"); - if ($user) $sql .= ", fk_user_modif=".$user->id; + if ($user) { + $sql .= ", fk_user_modif=".$user->id; + } $sql .= " WHERE rowid=".$this->db->escape($id); dol_syslog(get_class($this)."::update_perso this->birthday=".$this->birthday." -", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } @@ -834,7 +915,9 @@ class Contact extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONTACT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } @@ -865,8 +948,7 @@ class Contact extends CommonObject dol_syslog(get_class($this)."::fetch id=".$id." ref_ext=".$ref_ext." email=".$email, LOG_DEBUG); - if (empty($id) && empty($ref_ext) && empty($email)) - { + if (empty($id) && empty($ref_ext) && empty($email)) { $this->error = 'BadParameter'; return -1; } @@ -895,8 +977,9 @@ class Contact extends CommonObject $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 = ".((int) $id); - else { + if ($id) { + $sql .= " WHERE c.rowid = ".((int) $id); + } else { $sql .= " WHERE c.entity IN (".getEntity($this->element).")"; if ($ref_ext) { $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; @@ -907,17 +990,14 @@ class Contact extends CommonObject } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 1) - { + if ($num > 1) { $this->error = 'Fetch found several records. Rename one of contact to avoid duplicate.'; dol_syslog($this->error, LOG_ERR); return 2; - } elseif ($num) // $num = 1 - { + } elseif ($num) { // $num = 1 $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -989,10 +1069,8 @@ class Contact extends CommonObject $sql .= " WHERE u.fk_socpeople = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $uobj = $this->db->fetch_object($resql); $this->user_id = $uobj->rowid; @@ -1008,17 +1086,14 @@ class Contact extends CommonObject $this->fetch_optionals(); // Load also alerts of this user - if ($user) - { + if ($user) { $sql = "SELECT fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."user_alert"; $sql .= " WHERE fk_user = ".$user->id." AND fk_contact = ".$this->db->escape($id); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->birthday_alert = 1; @@ -1061,11 +1136,9 @@ class Contact extends CommonObject { unset($this->gender); - if (in_array($this->civility_id, array('MR')) || in_array($this->civility_code, array('MR'))) - { + 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'; } } @@ -1094,16 +1167,18 @@ class Contact extends CommonObject dol_syslog(get_class($this)."::load_ref_elements", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - if ($obj->nb) - { - if ($obj->element == 'facture') $this->ref_facturation = $obj->nb; - elseif ($obj->element == 'contrat') $this->ref_contrat = $obj->nb; - elseif ($obj->element == 'commande') $this->ref_commande = $obj->nb; - elseif ($obj->element == 'propal') $this->ref_propal = $obj->nb; + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + if ($obj->nb) { + if ($obj->element == 'facture') { + $this->ref_facturation = $obj->nb; + } elseif ($obj->element == 'contrat') { + $this->ref_contrat = $obj->nb; + } elseif ($obj->element == 'commande') { + $this->ref_commande = $obj->nb; + } elseif ($obj->element == 'propal') { + $this->ref_propal = $obj->nb; + } } } $this->db->free($resql); @@ -1128,8 +1203,7 @@ class Contact extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { // Get all rowid of element_contact linked to a type that is link to llx_socpeople $sql = "SELECT ec.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."element_contact ec,"; @@ -1139,21 +1213,18 @@ class Contact extends CommonObject $sql .= " AND tc.source='external'"; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num && !$error) - { + while ($i < $num && !$error) { $obj = $this->db->fetch_object($resql); $sqldel = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sqldel .= " WHERE rowid = ".$obj->rowid; dol_syslog(__METHOD__, LOG_DEBUG); $result = $this->db->query($sqldel); - if (!$result) - { + if (!$result) { $error++; $this->error = $this->db->error().' sql='.$sqldel; } @@ -1166,42 +1237,48 @@ class Contact extends CommonObject } } - if (!$error) - { + if (!$error) { // Remove Roles $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople = ".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error .= $this->db->lasterror(); $errorflag = -1; } } - if (!$error) - { + if (!$error) { + // Remove Roles + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople = ".$this->id; + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error .= $this->db->lasterror(); + $errorflag = -1; + } + } + + if (!$error) { // Remove category $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error .= $this->db->lasterror(); $errorflag = -1; } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $error++; $this->error = $this->db->error().' sql='.$sql; } @@ -1211,19 +1288,21 @@ class Contact extends CommonObject if (!$error) { // For avoid conflicts if trigger used $result = $this->deleteExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONTACT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1248,10 +1327,8 @@ class Contact extends CommonObject $sql .= " WHERE c.rowid = ".$this->db->escape($id); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -1291,8 +1368,7 @@ class Contact extends CommonObject $sql .= " AND m.entity IN (".getEntity($this->element).") AND mc.statut NOT IN (-1,0)"; // -1 error, 0 not sent, 1 sent with success $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $nb = $obj->nb; @@ -1322,8 +1398,7 @@ class Contact extends CommonObject $result = ''; $label = ''; - if (!empty($this->photo) && class_exists('Form')) - { + if (!empty($this->photo) && class_exists('Form')) { $label .= '
    '; $label .= Form::showphoto('contact', $this, 0, 40, 0, '', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. $label .= '
    '; @@ -1333,67 +1408,87 @@ class Contact extends CommonObject $label .= ' '.$this->getLibStatut(4); $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; + if (!empty($this->poste)) { + $label .= '
    '.$langs->trans("Poste").': '.$this->poste; + } $label .= '
    '.$langs->trans("EMail").': '.$this->email; $phonelist = array(); $country_code = empty($this->country_code) ? '': $this->country_code; - if ($this->phone_pro) $phonelist[] = dol_print_phone($this->phone_pro, $country_code, $this->id, 0, '', ' ', 'phone'); - if ($this->phone_mobile) $phonelist[] = dol_print_phone($this->phone_mobile, $country_code, $this->id, 0, '', ' ', 'mobile'); - if ($this->phone_perso) $phonelist[] = dol_print_phone($this->phone_perso, $country_code, $this->id, 0, '', ' ', 'phone'); + if ($this->phone_pro) { + $phonelist[] = dol_print_phone($this->phone_pro, $country_code, $this->id, 0, '', ' ', 'phone'); + } + if ($this->phone_mobile) { + $phonelist[] = dol_print_phone($this->phone_mobile, $country_code, $this->id, 0, '', ' ', 'mobile'); + } + if ($this->phone_perso) { + $phonelist[] = dol_print_phone($this->phone_perso, $country_code, $this->id, 0, '', ' ', 'phone'); + } $label .= '
    '.$langs->trans("Phone").': '.implode(' ', $phonelist); $label .= '
    '.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); $url = DOL_URL_ROOT.'/contact/card.php?id='.$this->id; - if ($option !== 'nolink') - { + 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'; + 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'; + } } $url .= $moreparam; $linkclose = ""; if (empty($notooltip)) { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowContact"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip"'; + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip"'; - /* - $hookmanager->initHooks(array('contactdao')); - $parameters=array('id'=>$this->id); - $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; - */ + /* + $hookmanager->initHooks(array('contactdao')); + $parameters=array('id'=>$this->id); + $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; + */ } $linkstart = ''; $linkend = ''; - if ($option == 'xxx') - { + if ($option == 'xxx') { $linkstart = ''; $linkend = ''; } $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($maxlen ?dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs)); + if ($withpicto) { + if ($withpicto == -2) { + $result .= ''.Form::showphoto('contact', $this, 0, 0, 0, 'userphoto'.($withpicto == -3 ? 'small' : ''), 'mini', 0, 1).''; + } 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); + } + } + if ($withpicto != 2 && $withpicto != -2) { + $result .= ($maxlen ?dol_trunc($this->getFullName($langs), $maxlen) : $this->getFullName($langs)); + } $result .= $linkend; global $action; $hookmanager->initHooks(array('contactdao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -1408,7 +1503,9 @@ class Contact extends CommonObject global $langs; $code = ($this->civility_code ? $this->civility_code : (!empty($this->civility_id) ? $this->civility : (!empty($this->civilite) ? $this->civilite : ''))); - if (empty($code)) return ''; + if (empty($code)) { + return ''; + } $langs->load("dict"); return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code); @@ -1452,7 +1549,9 @@ class Contact extends CommonObject ); $statusType = 'status4'; - if ($status == 0 || $status == 5) $statusType = 'status5'; + if ($status == 0 || $status == 5) { + $statusType = 'status5'; + } $label = $langs->trans($labelStatus[$status]); $labelshort = $langs->trans($labelStatusShort[$status]); @@ -1472,8 +1571,11 @@ class Contact extends CommonObject { // phpcs:enable global $langs; - if ($status == '1') return $langs->trans('ContactPrivate'); - else return $langs->trans('ContactPublic'); + if ($status == '1') { + return $langs->trans('ContactPrivate'); + } else { + return $langs->trans('ContactPublic'); + } } @@ -1492,7 +1594,9 @@ class Contact extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) $socid = $obj->rowid; + if ($obj) { + $socid = $obj->rowid; + } } // Initialise parameters @@ -1537,28 +1641,31 @@ class Contact extends CommonObject $error = 0; // Check parameters - if ($this->statut == $status) return 0; - else $this->statut = $status; + if ($this->statut == $status) { + return 0; + } else { + $this->statut = $status; + } $this->db->begin(); // Desactive utilisateur $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople"; - $sql .= " SET statut = ".$this->statut; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " SET statut = ".((int) $this->statut); + $sql .= " WHERE rowid = ".((int) $this->id); $result = $this->db->query($sql); dol_syslog(get_class($this)."::setstatus", LOG_DEBUG); - if ($result) - { + if ($result) { // Call trigger $result = $this->call_trigger('CONTACT_ENABLEDISABLE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if ($error) - { + if ($error) { $this->db->rollback(); return -$error; } else { @@ -1579,38 +1686,8 @@ class Contact extends CommonObject */ public function setCategories($categories) { - // Handle single category - if (!is_array($categories)) { - $categories = array($categories); - } - - // Get current categories require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $c = new Categorie($this->db); - $existing = $c->containing($this->id, Categorie::TYPE_CONTACT, '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; - } - - // Process - foreach ($to_del as $del) { - if ($c->fetch($del) > 0) { - $c->del_type($this, Categorie::TYPE_CONTACT); - } - } - foreach ($to_add as $add) { - if ($c->fetch($add) > 0) { - $c->add_type($this, Categorie::TYPE_CONTACT); - } - } - - return; + return parent::setCategoriesCommon($categories, Categorie::TYPE_CONTACT); } /** @@ -1700,12 +1777,10 @@ class Contact extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $tab[] = array('fk_socpeople'=>$obj->id, 'type_contact'=>$obj->fk_c_type_contact); @@ -1733,7 +1808,9 @@ class Contact extends CommonObject $error = 0; - if (!isset($this->roles)) return; // Avoid to loose roles when property not set + if (!isset($this->roles)) { + return; // Avoid to loose roles when property not set + } $this->db->begin(); @@ -1775,8 +1852,7 @@ class Contact extends CommonObject $sql .= ")"; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $this->errors[] = $this->db->lasterror().' sql='.$sql; $error++; } @@ -1805,12 +1881,13 @@ class Contact extends CommonObject global $langs; $sql = "SELECT id, code, libelle as label, picto FROM ".MAIN_DB_PREFIX."c_stcommcontact"; - if ($active >= 0) $sql .= " WHERE active = ".$active; + if ($active >= 0) { + $sql .= " WHERE active = ".((int) $active); + } $resql = $this->db->query($sql); $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + 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++; @@ -1840,8 +1917,7 @@ class Contact extends CommonObject $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)) - { + if ($lib == $langs->trans("ProspectLevel".$fk_prospectlevel)) { $lib = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label'); } return $lib; @@ -1890,40 +1966,134 @@ class Contact extends CommonObject 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 { + 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 { + 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 { + 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"; } + + + /** + * Set "blacklist" mailing status + * + * @param int $no_email 1=Do not send mailing, 0=Ok to recieve mailling + * @return int <0 if KO, >0 if OK + */ + public function setNoEmail($no_email) + { + $error = 0; + + // Update mass emailing flag into table mailing_unsubscribe + if ($this->email) { + $this->db->begin(); + + if ($no_email) { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$this->db->escape($this->email)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $noemail = $obj->nb; + if (empty($noemail)) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$this->db->escape($this->email)."', ".$this->db->escape(getEntity('mailing', 0)).", '".$this->db->idate(dol_now())."')"; + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } else { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$this->db->escape($this->email)."' AND entity = ".$this->db->escape(getEntity('mailing', 0)); + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } + } + + if (empty($error)) { + $this->no_email = $no_email; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return $error * -1; + } + } + + return 0; + } + + /** + * get "blacklist" mailing status + * set no_email attribut to 1 or 0 + * + * @return int <0 if KO, >0 if OK + */ + public function getNoEmail() + { + if ($this->email) { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($this->email)."'"; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_object($resql); + $this->no_email = $obj->nb; + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + return -1; + } + } + return 0; + } } diff --git a/htdocs/contact/class/index.html b/htdocs/contact/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index da00374cc2a..974bfb15e77 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -37,8 +37,12 @@ $id = GETPOST('id', 'int'); $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); -if ($id > 0) $object->fetch($id); -if (empty($object->thirdparty)) $object->fetch_thirdparty(); +if ($id > 0) { + $object->fetch($id); +} +if (empty($object->thirdparty)) { + $object->fetch_thirdparty(); +} $socid = $object->thirdparty->id; // Sort & Order fields @@ -46,12 +50,18 @@ $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 = 'dateprint'; +if (!$sortorder) { + $sortorder = 'DESC'; +} +if (!$sortfield) { + $sortfield = 'dateprint'; +} // Search fields $sref = GETPOST("sref"); @@ -60,8 +70,7 @@ $month = GETPOST('month', 'int'); $year = GETPOST('year', 'int'); // Clean up on 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 -{ +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 $sref = ''; $sprod_fulldescr = ''; $year = ''; @@ -84,7 +93,9 @@ $hookmanager->initHooks(array('consumptioncontact')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} /* @@ -99,8 +110,7 @@ $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("C $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if (empty($id)) -{ +if (empty($id)) { dol_print_error($db); exit; } @@ -111,13 +121,15 @@ print dol_get_fiche_head($head, 'consumption', $langs->trans("ContactsAddresses" $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; -if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) -{ +if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $objsoc->fetch($socid); // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; @@ -133,22 +145,34 @@ print '
    '.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
    '; @@ -415,8 +460,7 @@ if ($sql_select) // Status print ''; - if ($type_element == 'contract') - { + if ($type_element == 'contract') { print $documentstaticline->getLibStatut(2); } else { print $documentstatic->getLibStatut(2); @@ -429,8 +473,7 @@ if ($sql_select) $text = ''; $description = ''; $type = 0; // Code to show product duplicated from commonobject->printObjectLine - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { $product_static = new Product($db); $product_static->type = $objp->fk_product_type; @@ -441,20 +484,21 @@ if ($sql_select) } // Product - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($objp->fk_product); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $object->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $object->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -468,42 +512,42 @@ if ($sql_select) $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($objp->description)); } - if (($objp->info_bits & 2) == 2) - { + if (($objp->info_bits & 2) == 2) { print ''; $txt = ''; print img_object($langs->trans("ShowReduc"), 'reduc').' '; - if ($objp->description == '(DEPOSIT)') $txt = $langs->trans("Deposit"); - elseif ($objp->description == '(EXCESS RECEIVED)') $txt = $langs->trans("ExcessReceived"); - elseif ($objp->description == '(EXCESS PAID)') $txt = $langs->trans("ExcessPaid"); + if ($objp->description == '(DEPOSIT)') { + $txt = $langs->trans("Deposit"); + } elseif ($objp->description == '(EXCESS RECEIVED)') { + $txt = $langs->trans("ExcessReceived"); + } elseif ($objp->description == '(EXCESS PAID)') { + $txt = $langs->trans("ExcessPaid"); + } //else $txt=$langs->trans("Discount"); print $txt; print ''; - if ($objp->description) - { - if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) - { + if ($objp->description) { + if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); } - if ($objp->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) - { + if ($objp->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) { $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).')'; + if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) { + echo ' ('.dol_print_date($discount->datec).')'; + } } else { echo ($txt ? ' - ' : '').dol_htmlentitiesbr($objp->description); } @@ -516,15 +560,16 @@ if ($sql_select) echo get_date_range($objp->date_start, $objp->date_end); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($objp->description) && $objp->description != $objp->product_label) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } } else { - if (!empty($objp->label) || !empty($objp->description)) - { - if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if (!empty($objp->label) || !empty($objp->description)) { + if ($type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($objp->label)) { $text .= ' '.$objp->label.''; diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index ad9a0e9c0d5..e980b0ee94c 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -1,7 +1,7 @@ - * Copyright (C) 2015 Frederic France - * Copyright (C) 2017 Regis Houssin +/* Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2015-2021 Frederic France + * Copyright (C) 2017 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 @@ -43,15 +43,16 @@ $object = new Contact($db); $object->getCanvas($id); $objcanvas = null; $canvas = (!empty($object->canvas) ? $object->canvas : GETPOST("canvas")); -if (!empty($canvas)) -{ +if (!empty($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; +if ($user->socid) { + $socid = $user->socid; +} $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 @@ -59,18 +60,30 @@ $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 (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; } -if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; } +if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { + $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; +} +if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { + $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; +} -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $upload_dir = $conf->societe->multidir_output[$object->entity].'/contact/'.dol_sanitizeFileName($object->ref); $modulepart = 'contact'; @@ -92,12 +105,13 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) $title = $object->lastname; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) { + $title = $object->lastname; +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $title, $helpurl); +llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { $head = contact_prepare_head($object); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); @@ -107,22 +121,23 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; @@ -135,23 +150,23 @@ if ($object->id) // Company /* - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($object->socid > 0) - { - $objsoc = new Societe($db); - $objsoc->fetch($object->socid); + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + if ($object->socid > 0) + { + $objsoc = new Societe($db); + $objsoc->fetch($object->socid); - print '
    '.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''; - print $langs->trans("ContactNotLinkedToCompany"); - print '
    '.$langs->trans("ThirdParty").''; + print $langs->trans("ContactNotLinkedToCompany"); + print '
    '.$langs->trans("UserTitle").''; diff --git a/htdocs/contact/index.html b/htdocs/contact/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index c39c20d3d25..4cea1cae85b 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -34,7 +34,9 @@ $langs->load("companies"); // Security check $id = GETPOST("id", 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); @@ -51,8 +53,7 @@ $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("C llxHeader('', $title, 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); -if ($id > 0) -{ +if ($id > 0) { $result = $object->fetch($id, $user); $object->info($id); diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 78934c5857e..6677a7b17d7 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -36,12 +36,13 @@ $action = GETPOST('action', 'aZ09'); // Security check $id = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); -if ($id > 0) -{ +if ($id > 0) { $object->fetch($id, $user); } @@ -50,8 +51,7 @@ if ($id > 0) * Actions */ -if ($action == 'dolibarr2ldap') -{ +if ($action == 'dolibarr2ldap') { $db->begin(); $ldap = new Ldap(); @@ -63,8 +63,7 @@ if ($action == 'dolibarr2ldap') $result = $ldap->update($dn, $info, $user, $olddn); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("ContactSynchronized"), null, 'mesgs'); $db->commit(); } else { @@ -98,8 +97,7 @@ print '
    '; print ''; // Company -if ($object->socid > 0) -{ +if ($object->socid > 0) { $thirdparty = new Societe($db); $thirdparty->fetch($object->socid); @@ -134,19 +132,19 @@ print dol_get_fiche_end(); /* - * Barre d'actions + * Action bar */ - print '
    '; -if (!empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_ACTIVE != 'ldap2dolibarr') -{ +if (!empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_ACTIVE != 'ldap2dolibarr') { print ''.$langs->trans("ForceSynchronize").''; } print "
    \n"; -if (!empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_ACTIVE != 'ldap2dolibarr') print "
    \n"; +if (!empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_ACTIVE != 'ldap2dolibarr') { + print "
    \n"; +} @@ -163,8 +161,7 @@ print ''; // Lecture LDAP $ldap = new Ldap(); $result = $ldap->connect_bind(); -if ($result > 0) -{ +if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info, 1); $search = "(".$object->_load_ldap_dn($info, 2).")"; @@ -174,10 +171,8 @@ if ($result > 0) //var_dump($records); // Show tree - if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) - { - if (!is_array($records)) - { + if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) { + if (!is_array($records)) { print ''; } else { $result = show_ldap_content($records, 0, $records['count'], true); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 00c74544d17..c7386c260ed 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -55,7 +55,9 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'con $id = GETPOST('id', 'int'); $contactid = GETPOST('id', 'int'); $ref = ''; // There is no ref for contacts -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contact', $contactid, ''); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); @@ -95,7 +97,9 @@ $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 +if ($search_status == '') { + $search_status = 1; // always display active customer first +} $optioncss = GETPOST('optioncss', 'alpha'); @@ -109,31 +113,41 @@ $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $userid = GETPOST('userid', 'int'); $begin = GETPOST('begin'); -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "p.lastname"; -if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; } +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "p.lastname"; +} +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + $page = 0; +} $offset = $limit * $page; $titre = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); -if ($type == "p") -{ - if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactprospectlist'; +if ($type == "p") { + if (empty($contextpage) || $contextpage == 'contactlist') { + $contextpage = 'contactprospectlist'; + } $titre .= ' ('.$langs->trans("ThirdPartyProspects").')'; $urlfiche = "card.php"; } -if ($type == "c") -{ - if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactcustomerlist'; +if ($type == "c") { + if (empty($contextpage) || $contextpage == 'contactlist') { + $contextpage = 'contactcustomerlist'; + } $titre .= ' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche = "card.php"; -} elseif ($type == "f") -{ - if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactsupplierlist'; +} elseif ($type == "f") { + if (empty($contextpage) || $contextpage == 'contactlist') { + $contextpage = 'contactsupplierlist'; + } $titre .= ' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche = "card.php"; -} elseif ($type == "o") -{ - if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactotherlist'; +} elseif ($type == "o") { + if (empty($contextpage) || $contextpage == 'contactlist') { + $contextpage = 'contactotherlist'; + } $titre .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; $urlfiche = ""; } @@ -150,8 +164,7 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ +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; @@ -209,10 +222,11 @@ $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -if (($id > 0 || !empty($ref)) && $action != 'add') -{ +if (($id > 0 || !empty($ref)) && $action != 'add') { $result = $object->fetch($id, $ref); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } } @@ -220,21 +234,25 @@ if (($id > 0 || !empty($ref)) && $action != 'add') * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Selection of new fields include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Did we click on 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 - { + 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 $sall = ""; $search_id = ''; $search_firstlast_only = ""; @@ -267,7 +285,7 @@ if (empty($reshook)) $search_categ_thirdparty = ''; $search_categ_supplier = ''; $search_import_key = ''; - $toselect = ''; + $toselect = array(); $search_array_options = array(); $search_roles = array(); } @@ -277,22 +295,26 @@ if (empty($reshook)) $objectlabel = 'Contact'; $permissiontoread = $user->rights->societe->lire; $permissiontodelete = $user->rights->societe->supprimer; + $permissiontoadd = $user->rights->societe->creer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if ($action == 'setstcomm') - { + 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'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } $action = ''; } } -if ($search_priv < 0) $search_priv = ''; +if ($search_priv < 0) { + $search_priv = ''; +} /* @@ -317,17 +339,18 @@ $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)) - { +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); + if ($level == $obj->code) { + $level = $langs->trans($obj->label); + } $tab_level[$obj->code] = $level; } +} else { + dol_print_error($db); } -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,"; @@ -337,64 +360,121 @@ $sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as $sql .= " co.label as country, co.code as country_code"; // 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."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)"; +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 -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; +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 +} +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('socpeople').')'; -if (!$user->rights->societe->client->voir && !$socid) //restriction -{ +if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND (sc.fk_user = ".$user->id." OR p.fk_soc IS NULL)"; } -if (!empty($userid)) // propre au commercial -{ +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 { - 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.")"; +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); } -if ($search_categ > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ); -if ($search_categ == -2) $sql .= " AND cc.fk_categorie IS NULL"; -if ($search_categ_thirdparty > 0) $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_thirdparty); -if ($search_categ_thirdparty == -2) $sql .= " AND cs.fk_categorie IS NULL"; -if ($search_categ_supplier > 0) $sql .= " AND cs2.fk_categorie = ".$db->escape($search_categ_supplier); -if ($search_categ_supplier == -2) $sql .= " AND cs2.fk_categorie IS NULL"; +// 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 { + 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.")"; + } +} -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if (strlen($search_phone)) $sql .= natural_search(array('p.phone', 'p.phone_perso', 'p.phone_mobile'), $search_phone); -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_categ > 0) { + $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ); +} +if ($search_categ == -2) { + $sql .= " AND cc.fk_categorie IS NULL"; +} +if ($search_categ_thirdparty > 0) { + $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_thirdparty); +} +if ($search_categ_thirdparty == -2) { + $sql .= " AND cs.fk_categorie IS NULL"; +} +if ($search_categ_supplier > 0) { + $sql .= " AND cs2.fk_categorie = ".$db->escape($search_categ_supplier); +} +if ($search_categ_supplier == -2) { + $sql .= " AND cs2.fk_categorie IS NULL"; +} -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(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); -if (strlen($search_phone_pro)) $sql .= natural_search('p.phone', $search_phone_pro); -if (strlen($search_phone_mobile)) $sql .= natural_search('p.phone_mobile', $search_phone_mobile); -if (strlen($search_fax)) $sql .= natural_search('p.fax', $search_fax); +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if (strlen($search_phone)) { + $sql .= natural_search(array('p.phone', 'p.phone_perso', 'p.phone_mobile'), $search_phone); +} +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_lastname) { + $sql .= natural_search('p.lastname', $search_lastname); +} +if ($search_firstname) { + $sql .= natural_search('p.firstname', $search_firstname); +} +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 (".$db->sanitize($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); +} +if (strlen($search_phone_pro)) { + $sql .= natural_search('p.phone', $search_phone_pro); +} +if (strlen($search_phone_mobile)) { + $sql .= natural_search('p.phone_mobile', $search_phone_mobile); +} +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])) { @@ -402,32 +482,38 @@ if (!empty($conf->socialnetworks->enabled)) { } } } -if (strlen($search_email)) $sql .= natural_search('p.email', $search_email); -if (strlen($search_zip)) $sql .= natural_search("p.zip", $search_zip); -if (strlen($search_town)) $sql .= natural_search("p.town", $search_town); -if (count($search_roles) > 0) { - $sql .= " AND p.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".implode(',', $search_roles)."))"; +if (strlen($search_email)) { + $sql .= natural_search('p.email', $search_email); } - -if ($search_no_email != '' && $search_no_email >= 0) $sql .= " AND p.no_email = ".$db->escape($search_no_email); -if ($search_status != '' && $search_status >= 0) $sql .= " AND p.statut = ".$db->escape($search_status); -if ($search_import_key) $sql .= natural_search("p.import_key", $search_import_key); -if ($type == "o") // filtre sur type -{ +if (strlen($search_zip)) { + $sql .= natural_search("p.zip", $search_zip); +} +if (strlen($search_town)) { + $sql .= natural_search("p.town", $search_town); +} +if (count($search_roles) > 0) { + $sql .= " AND p.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))"; +} +if ($search_no_email != '' && $search_no_email >= 0) { + $sql .= " AND p.no_email = ".$db->escape($search_no_email); +} +if ($search_status != '' && $search_status >= 0) { + $sql .= " AND p.statut = ".$db->escape($search_status); +} +if ($search_import_key) { + $sql .= natural_search("p.import_key", $search_import_key); +} +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)"; } -if (!empty($socid)) -{ - $sql .= " AND s.rowid = ".$socid; +if (!empty($socid)) { + $sql .= " AND s.rowid = ".((int) $socid); } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -436,8 +522,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; // Add order -if ($view == "recent") -{ +if ($view == "recent") { $sql .= $db->order("p.datec", "DESC"); } else { $sql .= $db->order($sortfield, $sortorder); @@ -445,12 +530,10 @@ if ($view == "recent") // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -459,8 +542,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; } @@ -469,8 +551,7 @@ $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $search_cti != '')) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $search_cti != '')) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/contact/card.php?id='.$id); @@ -481,57 +562,118 @@ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'; llxHeader('', $title, $help_url); $param = ''; -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='.$contextpage; +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} $param .= '&begin='.urlencode($begin).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); $param .= '&type='.urlencode($type).'&view='.urlencode($view); -if (!empty($search_categ)) $param .= '&search_categ='.urlencode($search_categ); -if (!empty($search_categ_thirdparty)) $param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty); -if (!empty($search_categ_supplier)) $param .= '&search_categ_supplier='.urlencode($search_categ_supplier); -if ($sall != '') $param .= '&sall='.urlencode($sall); -if ($search_id > 0) $param .= "&search_id=".urlencode($search_id); -if ($search_lastname != '') $param .= '&search_lastname='.urlencode($search_lastname); -if ($search_firstname != '') $param .= '&search_firstname='.urlencode($search_firstname); -if ($search_societe != '') $param .= '&search_societe='.urlencode($search_societe); -if ($search_zip != '') $param .= '&search_zip='.urlencode($search_zip); -if ($search_town != '') $param .= '&search_town='.urlencode($search_town); -if ($search_country != '') $param .= "&search_country=".urlencode($search_country); -if ($search_poste != '') $param .= '&search_poste='.urlencode($search_poste); -if ($search_phone_pro != '') $param .= '&search_phone_pro='.urlencode($search_phone_pro); -if ($search_phone_perso != '') $param .= '&search_phone_perso='.urlencode($search_phone_perso); -if ($search_phone_mobile != '') $param .= '&search_phone_mobile='.urlencode($search_phone_mobile); -if ($search_fax != '') $param .= '&search_fax='.urlencode($search_fax); -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 (!empty($search_categ)) { + $param .= '&search_categ='.urlencode($search_categ); +} +if (!empty($search_categ_thirdparty)) { + $param .= '&search_categ_thirdparty='.urlencode($search_categ_thirdparty); +} +if (!empty($search_categ_supplier)) { + $param .= '&search_categ_supplier='.urlencode($search_categ_supplier); +} +if ($sall != '') { + $param .= '&sall='.urlencode($sall); +} +if ($search_id > 0) { + $param .= "&search_id=".urlencode($search_id); +} +if ($search_lastname != '') { + $param .= '&search_lastname='.urlencode($search_lastname); +} +if ($search_firstname != '') { + $param .= '&search_firstname='.urlencode($search_firstname); +} +if ($search_societe != '') { + $param .= '&search_societe='.urlencode($search_societe); +} +if ($search_zip != '') { + $param .= '&search_zip='.urlencode($search_zip); +} +if ($search_town != '') { + $param .= '&search_town='.urlencode($search_town); +} +if ($search_country != '') { + $param .= "&search_country=".urlencode($search_country); +} +if ($search_poste != '') { + $param .= '&search_poste='.urlencode($search_poste); +} +if ($search_phone_pro != '') { + $param .= '&search_phone_pro='.urlencode($search_phone_pro); +} +if ($search_phone_perso != '') { + $param .= '&search_phone_perso='.urlencode($search_phone_perso); +} +if ($search_phone_mobile != '') { + $param .= '&search_phone_mobile='.urlencode($search_phone_mobile); +} +if ($search_fax != '') { + $param .= '&search_fax='.urlencode($search_fax); +} +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='.urlencode($optioncss); -if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles); +if ($search_import_key != '') { + $param .= '&search_import_key='.urlencode($search_import_key); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +if (count($search_roles) > 0) { + $param .= implode('&search_roles[]=', $search_roles); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( -// 'presend'=>$langs->trans("SendByMail"), -// 'builddoc'=>$langs->trans("PDFMerge"), +// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); -if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->societe->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if ($user->rights->societe->creer) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $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 ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -548,38 +690,43 @@ $objecttmp = new Contact($db); $trackid = 'ctc'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } -if ($search_firstlast_only) -{ +if ($search_firstlast_only) { print '
    '.$langs->trans("FilterOnInto", $search_firstlast_only).$langs->trans("Lastname").", ".$langs->trans("Firstname").'
    '; } $moreforfilter = ''; -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('Categories').': '; - $moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, $search_categ, 'search_categ', 1); + $tmptitle = $langs->trans('ContactCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= $formother->select_categories(Categorie::TYPE_CONTACT, $search_categ, 'search_categ', 1, $tmptitle); $moreforfilter .= '
    '; - if (empty($type) || $type == 'c' || $type == 'p') - { + if (empty($type) || $type == 'c' || $type == 'p') { $moreforfilter .= '
    '; - if ($type == 'c') $moreforfilter .= $langs->trans('CustomersCategoriesShort').': '; - elseif ($type == 'p') $moreforfilter .= $langs->trans('ProspectsCategoriesShort').': '; - else $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': '; - $moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, $search_categ_thirdparty, 'search_categ_thirdparty', 1); + $tmptitle = ''; + if ($type == 'c') { + $tmptitle .= $langs->trans('CustomersCategoriesShort'); + } elseif ($type == 'p') { + $tmptitle .= $langs->trans('ProspectsCategoriesShort'); + } else { + $tmptitle .= $langs->trans('CustomersProspectsCategoriesShort'); + } + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= $formother->select_categories(Categorie::TYPE_CUSTOMER, $search_categ_thirdparty, 'search_categ_thirdparty', 1, $tmptitle); $moreforfilter .= '
    '; } - if (empty($type) || $type == 'f') - { + if (empty($type) || $type == 'f') { $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('SuppliersCategoriesShort').': '; - $moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1); + $tmptitle = $langs->trans('SuppliersCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1, $tmptitle); $moreforfilter .= '
    '; } } @@ -598,45 +745,41 @@ 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); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '
    '; print '
    '.$langs->trans("ErrorFailedToReadLDAP").'
    '."\n"; // Lines for filter fields print ''; -if (!empty($arrayfields['p.rowid']['checked'])) -{ +if (!empty($arrayfields['p.rowid']['checked'])) { print ''; } -if (!empty($arrayfields['p.lastname']['checked'])) -{ +if (!empty($arrayfields['p.lastname']['checked'])) { print ''; } -if (!empty($arrayfields['p.firstname']['checked'])) -{ +if (!empty($arrayfields['p.firstname']['checked'])) { print ''; } -if (!empty($arrayfields['p.poste']['checked'])) -{ +if (!empty($arrayfields['p.poste']['checked'])) { print ''; } -if (!empty($arrayfields['p.zip']['checked'])) -{ +if (!empty($arrayfields['p.zip']['checked'])) { print ''; } -if (!empty($arrayfields['p.town']['checked'])) -{ +if (!empty($arrayfields['p.town']['checked'])) { print ''; @@ -656,44 +799,37 @@ if (!empty($arrayfields['p.town']['checked'])) print ''; }*/ // Country -if (!empty($arrayfields['country.code_iso']['checked'])) -{ +if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; } -if (!empty($arrayfields['p.phone']['checked'])) -{ +if (!empty($arrayfields['p.phone']['checked'])) { print ''; } -if (!empty($arrayfields['p.phone_perso']['checked'])) -{ +if (!empty($arrayfields['p.phone_perso']['checked'])) { print ''; } -if (!empty($arrayfields['p.phone_mobile']['checked'])) -{ +if (!empty($arrayfields['p.phone_mobile']['checked'])) { print ''; } -if (!empty($arrayfields['p.fax']['checked'])) -{ +if (!empty($arrayfields['p.fax']['checked'])) { print ''; } -if (!empty($arrayfields['p.email']['checked'])) -{ +if (!empty($arrayfields['p.email']['checked'])) { print ''; } -if (!empty($arrayfields['p.no_email']['checked'])) -{ +if (!empty($arrayfields['p.no_email']['checked'])) { print ''; @@ -701,8 +837,7 @@ if (!empty($arrayfields['p.no_email']['checked'])) if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { - if (!empty($arrayfields['p.'.$key]['checked'])) - { + if (!empty($arrayfields['p.'.$key]['checked'])) { print ''; @@ -710,33 +845,28 @@ if (!empty($conf->socialnetworks->enabled)) { } } } -if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) { print ''; } -if (!empty($arrayfields['p.priv']['checked'])) -{ +if (!empty($arrayfields['p.priv']['checked'])) { print ''; } // Prospect level -if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) -{ +if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) { print ''; } // Prospect status -if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) -{ +if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) { print ''; } // Date modification -if (!empty($arrayfields['p.tms']['checked'])) -{ +if (!empty($arrayfields['p.tms']['checked'])) { print ''; } // Status -if (!empty($arrayfields['p.statut']['checked'])) -{ +if (!empty($arrayfields['p.statut']['checked'])) { print ''; } -if (!empty($arrayfields['p.import_key']['checked'])) -{ +if (!empty($arrayfields['p.import_key']['checked'])) { print ''; @@ -784,23 +910,47 @@ print ''; // Ligne des titres print ''; -if (!empty($arrayfields['p.rowid']['checked'])) print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['p.lastname']['checked'])) print_liste_field_titre($arrayfields['p.lastname']['label'], $_SERVER["PHP_SELF"], "p.lastname", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.firstname']['checked'])) print_liste_field_titre($arrayfields['p.firstname']['label'], $_SERVER["PHP_SELF"], "p.firstname", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.poste']['checked'])) print_liste_field_titre($arrayfields['p.poste']['label'], $_SERVER["PHP_SELF"], "p.poste", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.zip']['checked'])) print_liste_field_titre($arrayfields['p.zip']['label'], $_SERVER["PHP_SELF"], "p.zip", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.rowid']['checked'])) { + print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['p.lastname']['checked'])) { + print_liste_field_titre($arrayfields['p.lastname']['label'], $_SERVER["PHP_SELF"], "p.lastname", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.firstname']['checked'])) { + print_liste_field_titre($arrayfields['p.firstname']['label'], $_SERVER["PHP_SELF"], "p.firstname", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.poste']['checked'])) { + print_liste_field_titre($arrayfields['p.poste']['label'], $_SERVER["PHP_SELF"], "p.poste", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.zip']['checked'])) { + print_liste_field_titre($arrayfields['p.zip']['label'], $_SERVER["PHP_SELF"], "p.zip", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.town']['checked'])) { + print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder); +} //if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); //if (! empty($arrayfields['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 '); } -if (!empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'], $_SERVER["PHP_SELF"], "p.fax", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $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); +} +if (!empty($arrayfields['p.phone_mobile']['checked'])) { + print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.fax']['checked'])) { + print_liste_field_titre($arrayfields['p.fax']['label'], $_SERVER["PHP_SELF"], "p.fax", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.email']['checked'])) { + print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['p.no_email']['checked'])) { + print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center '); +} if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) { @@ -808,11 +958,21 @@ if (!empty($conf->socialnetworks->enabled)) { } } } -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 '); +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 @@ -842,8 +1002,7 @@ print "\n"; $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $arraysocialnetworks = (array) json_decode($obj->socialnetworks, true); @@ -868,44 +1027,50 @@ while ($i < min($num, $limit)) print ''; // ID - if (!empty($arrayfields['p.rowid']['checked'])) - { + if (!empty($arrayfields['p.rowid']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Name - if (!empty($arrayfields['p.lastname']['checked'])) - { + if (!empty($arrayfields['p.lastname']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Firstname - if (!empty($arrayfields['p.firstname']['checked'])) - { + if (!empty($arrayfields['p.firstname']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Job position - if (!empty($arrayfields['p.poste']['checked'])) - { + if (!empty($arrayfields['p.poste']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['p.zip']['checked'])) - { + if (!empty($arrayfields['p.zip']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['p.town']['checked'])) - { + if (!empty($arrayfields['p.town']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State /*if (! empty($arrayfields['state.nom']['checked'])) @@ -920,101 +1085,119 @@ while ($i < min($num, $limit)) if (! $i) $totalarray['nbfield']++; }*/ // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Phone - if (!empty($arrayfields['p.phone']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.phone']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Phone perso - if (!empty($arrayfields['p.phone_perso']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.phone_perso']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Phone mobile - if (!empty($arrayfields['p.phone_mobile']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.phone_mobile']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Fax - if (!empty($arrayfields['p.fax']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.fax']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // EMail - if (!empty($arrayfields['p.email']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['p.email']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // No EMail - if (!empty($arrayfields['p.no_email']['checked'])) - { + if (!empty($arrayfields['p.no_email']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } } } // Company - if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Private/Public - if (!empty($arrayfields['p.priv']['checked'])) - { + if (!empty($arrayfields['p.priv']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) - { + if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) { // Prospect level print '"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) - { + if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) { // Prospect status print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -1024,45 +1207,52 @@ while ($i < min($num, $limit)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { + if (!empty($arrayfields['p.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { + if (!empty($arrayfields['p.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['p.statut']['checked'])) - { + if (!empty($arrayfields['p.statut']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.import_key']['checked'])) - { + if (!empty($arrayfields['p.import_key']['checked'])) { print '\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; $i++; diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 6a6ccd5a7ee..c301ef02276 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -36,11 +36,15 @@ $langs->load("companies"); // Security check $id = GETPOST('id', 'int'); -if ($user->socid) $id = $user->socid; +if ($user->socid) { + $id = $user->socid; +} $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php @@ -67,12 +71,13 @@ $form = new Form($db); $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($id > 0) -{ +if ($id > 0) { /* - * Affichage onglets - */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); + * Affichage onglets + */ + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = contact_prepare_head($object); @@ -81,14 +86,16 @@ if ($id > 0) $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 0555eb84719..628c73b0afc 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 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 @@ -35,7 +35,9 @@ $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); @@ -43,47 +45,43 @@ $object = new Contact($db); * Action */ -if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) -{ +if ($action == 'update' && !GETPOST("cancel") && $user->rights->societe->contact->creer) { $ret = $object->fetch($id); // Note: Correct date should be completed with location to have exact GM time of birth. - $object->birthday = dol_mktime(0, 0, 0, $_POST["birthdaymonth"], $_POST["birthdayday"], $_POST["birthdayyear"]); - $object->birthday_alert = $_POST["birthday_alert"]; + $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth"), GETPOST("birthdayday"), GETPOST("birthdayyear")); + $object->birthday_alert = GETPOST("birthday_alert"); - if (GETPOST('deletephoto')) $object->photo = ''; - elseif (!empty($_FILES['photo']['name'])) $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + if (GETPOST('deletephoto')) { + $object->photo = ''; + } elseif (!empty($_FILES['photo']['name'])) { + $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + } $result = $object->update_perso($id, $user); - if ($result > 0) - { + if ($result > 0) { $object->old_name = ''; $object->old_firstname = ''; // Logo/Photo save $dir = $conf->societe->dir_output.'/contact/'.get_exdir($object->id, 0, 0, 1, $object, 'contact').'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if ($file_OK) - { + if ($file_OK) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; - if (GETPOST('deletephoto')) - { + if (GETPOST('deletephoto')) { $fileimg = $conf->societe->dir_output.'/contact/'.get_exdir($object->id, 0, 0, 1, $object, 'contact').'/photos/'.$object->photo; $dirthumbs = $conf->societe->dir_output.'/contact/'.get_exdir($object->id, 0, 0, 1, $object, 'contact').'/photos/thumbs'; dol_delete_file($fileimg); 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 @@ -94,8 +92,7 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- setEventMessages("ErrorBadImageFormat", null, 'errors'); } } else { - switch ($_FILES['photo']['error']) - { + 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"; @@ -118,9 +115,11 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- $now = dol_now(); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) $title = $object->lastname; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->lastname) { + $title = $object->lastname; +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $title, $helpurl); +llxHeader('', $title, $help_url); $form = new Form($db); @@ -128,8 +127,7 @@ $object->fetch($id, $user); $head = contact_prepare_head($object); -if ($action == 'edit') -{ +if ($action == 'edit') { /* * Fiche en mode edition */ @@ -151,11 +149,15 @@ if ($action == 'edit') // Photo print ''; // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($object->socid > 0) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { + if ($object->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); @@ -194,8 +194,7 @@ if ($action == 'edit') print ''; print ''; } else { print ''; @@ -221,14 +220,16 @@ if ($action == 'edit') $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $objsoc = new Societe($db); $objsoc->fetch($object->socid); // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + if ($objsoc->id > 0) { + $morehtmlref .= $objsoc->getNomUrl(1); + } else { + $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } } $morehtmlref .= '
    '; @@ -243,23 +244,23 @@ if ($action == 'edit') // Company /* - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($object->socid > 0) - { - $objsoc = new Societe($db); - $objsoc->fetch($object->socid); + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + if ($object->socid > 0) + { + $objsoc = new Societe($db); + $objsoc->fetch($object->socid); - print ''; - } + print ''; + } - else - { - print ''; - } - }*/ + else + { + print ''; + } + }*/ // Civility print ''; - if (!empty($object->birthday)) - { + if (!empty($object->birthday)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; print ''; } else { print ''; @@ -300,15 +307,14 @@ if ($action == 'edit') } -if ($action != 'edit') -{ - // Barre d'actions - if ($user->socid == 0) - { +if ($action != 'edit') { + /* + * Action bar + */ + if ($user->socid == 0) { print '
    '; - if ($user->rights->societe->contact->creer) - { + if ($user->rights->societe->contact->creer) { print ''.$langs->trans('Modify').''; } diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 05426db19a6..1fba506e910 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -39,8 +39,7 @@ $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $result = $contact->fetch($id); -if ($result <= 0) -{ +if ($result <= 0) { dol_print_error($contact->error); exit; } @@ -48,8 +47,7 @@ if ($result <= 0) $physicalperson = 1; $company = new Societe($db); -if ($contact->socid) -{ +if ($contact->socid) { $result = $company->fetch($contact->socid); } @@ -76,33 +74,32 @@ $v->setNote($contact->note); $v->setTitle($contact->poste); // Data from linked company -if ($company->id) -{ +if ($company->id) { $v->setURL($company->url, "TYPE=WORK"); - if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); - if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); - if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); + if (!$contact->phone_pro) { + $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); + } + if (!$contact->fax) { + $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); + } + if (!$contact->zip) { + $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); + } // when company e-mail is empty, use only contact e-mail - if (empty(trim($company->email))) - { + if (empty(trim($company->email))) { // was set before, don't set twice - } - // when contact e-mail is empty, use only company e-mail - elseif (empty(trim($contact->email))) - { + } elseif (empty(trim($contact->email))) { + // when contact e-mail is empty, use only company e-mail $v->setEmail($company->email); - } - // when e-mail domain of contact and company are the same, use contact e-mail at first (and company e-mail at second) - elseif (strtolower(end(explode("@", $contact->email))) == strtolower(end(explode("@", $company->email)))) - { + } elseif (strtolower(end(explode("@", $contact->email))) == strtolower(end(explode("@", $company->email)))) { + // when e-mail domain of contact and company are the same, use contact e-mail at first (and company e-mail at second) $v->setEmail($contact->email); // support by Microsoft Outlook (2019 and possible earlier) $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 { + // when e-mail of contact and company complete different use company e-mail at first (and contact e-mail at second) $v->setEmail($company->email); // support by Microsoft Outlook (2019 and possible earlier) @@ -110,12 +107,16 @@ if ($company->id) } // Si contact lie a un tiers non de type "particulier" - if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name); + if ($contact->typent_code != 'TE_PRIVATE') { + $v->setOrg($company->name); + } } // Personal informations $v->setPhoneNumber($contact->phone_perso, "TYPE=HOME;VOICE"); -if ($contact->birthday) $v->setBirthday($contact->birthday); +if ($contact->birthday) { + $v->setBirthday($contact->birthday); +} $db->close(); diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 8571856362a..b725ef6f3f4 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -40,13 +40,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'contrat'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +82,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print '

    '; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index 4b3f03ffedf..70d3193c12f 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -40,13 +40,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'contratdet'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +82,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '"; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// 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 d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "
    "; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/contrat/admin/index.html b/htdocs/contrat/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index f88b470215c..94232aa6afd 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -35,10 +35,11 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array("companies", "contracts")); -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -50,19 +51,27 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $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 +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'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agendacontract', 'globalcard')); @@ -74,20 +83,19 @@ $hookmanager->initHooks(array('agendacontract', 'globalcard')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -102,19 +110,18 @@ if (empty($reshook)) $form = new Form($db); $formfile = new FormFile($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} -if ($id > 0) -{ +if ($id > 0) { // Load object modContract $module = (!empty($conf->global->CONTRACT_ADDON) ? $conf->global->CONTRACT_ADDON : 'mod_contract_serpis'); - if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/contract/'.$module.'.php'); - if ($result > 0) - { + if ($result > 0) { $modCodeContract = new $module(); } @@ -126,10 +133,14 @@ if ($id > 0) $object->fetch_thirdparty(); $title = $langs->trans("Agenda"); - if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contractrefonly/', $conf->global->MAIN_HTML_TITLE) && $object->ref) $title = $object->ref." - ".$title; + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contractrefonly/', $conf->global->MAIN_HTML_TITLE) && $object->ref) { + $title = $object->ref." - ".$title; + } llxHeader('', $title); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = contract_prepare_head($object); print dol_get_fiche_head($head, 'agenda', $langs->trans("Contract"), -1, 'contract'); @@ -156,14 +167,14 @@ if ($id > 0) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $permtoedit, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->contrat->creer) - { + if ($user->rights->contrat->creer) { if ($action != 'classify') { //$morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).''; $morehtmlref .= ' : '; @@ -231,21 +242,22 @@ if ($id > 0) $newcardbutton = ''; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } } - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { print '
    '; $param = '&id='.$id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print load_fiche_titre($langs->trans("ActionsOnContract"), $newcardbutton, ''); //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 1); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 8b1367a12bb..c925dea94bf 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -9,7 +9,7 @@ * Copyright (C) 2014-2020 Ferran Marcet * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 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 @@ -40,7 +40,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -52,6 +54,8 @@ $langs->loadLangs(array("contracts", "orders", "companies", "bills", "products", $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); + $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -62,7 +66,9 @@ $datecontrat = ''; $usehm = (!empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE) ? $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE : 0); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $id); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -74,10 +80,12 @@ $extrafields = new ExtraFields($db); // Load object if ($id > 0 || !empty($ref) && $action != 'add') { $ret = $object->fetch($id, $ref); - if ($ret > 0) + if ($ret > 0) { $ret = $object->fetch_thirdparty(); - if ($ret < 0) + } + if ($ret < 0) { dol_print_error('', $object->error); + } } // fetch optionals attributes and labels @@ -98,36 +106,31 @@ $error = 0; $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)) -{ +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} +if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once - if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) - { - $result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); + if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) { + $result = $object->active_line($user, GETPOST('ligne', 'int'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) - { - if (!GETPOST('dateend')) - { + } elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { + if (!GETPOST('dateend')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } - if (!$error) - { - $result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment'))); - if ($result > 0) - { + if (!$error) { + $result = $object->close_line($user, GETPOST('ligne', 'int'), GETPOST('dateend'), urldecode(GETPOST('comment'))); + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -137,16 +140,13 @@ if (empty($reshook)) } // Si ajout champ produit predefini - if (GETPOST('mode') == 'predefined') - { + if (GETPOST('mode') == 'predefined') { $date_start = ''; $date_end = ''; - if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) - { + if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) { $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); } - if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) - { + if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) { $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); } } @@ -156,40 +156,32 @@ if (empty($reshook)) $date_end_update = ''; $date_start_real_update = ''; $date_end_real_update = ''; - if (GETPOST('date_start_updatemonth') && GETPOST('date_start_updateday') && GETPOST('date_start_updateyear')) - { + if (GETPOST('date_start_updatemonth') && GETPOST('date_start_updateday') && GETPOST('date_start_updateyear')) { $date_start_update = dol_mktime(GETPOST('date_start_updatehour'), GETPOST('date_start_updatemin'), 0, GETPOST('date_start_updatemonth'), GETPOST('date_start_updateday'), GETPOST('date_start_updateyear')); } - if (GETPOST('date_end_updatemonth') && GETPOST('date_end_updateday') && GETPOST('date_end_updateyear')) - { + if (GETPOST('date_end_updatemonth') && GETPOST('date_end_updateday') && GETPOST('date_end_updateyear')) { $date_end_update = dol_mktime(GETPOST('date_end_updatehour'), GETPOST('date_end_updatemin'), 0, GETPOST('date_end_updatemonth'), GETPOST('date_end_updateday'), GETPOST('date_end_updateyear')); } - if (GETPOST('date_start_real_updatemonth') && GETPOST('date_start_real_updateday') && GETPOST('date_start_real_updateyear')) - { + if (GETPOST('date_start_real_updatemonth') && GETPOST('date_start_real_updateday') && GETPOST('date_start_real_updateyear')) { $date_start_real_update = dol_mktime(GETPOST('date_start_real_updatehour'), GETPOST('date_start_real_updatemin'), 0, GETPOST('date_start_real_updatemonth'), GETPOST('date_start_real_updateday'), GETPOST('date_start_real_updateyear')); } - if (GETPOST('date_end_real_updatemonth') && GETPOST('date_end_real_updateday') && GETPOST('date_end_real_updateyear')) - { + if (GETPOST('date_end_real_updatemonth') && GETPOST('date_end_real_updateday') && GETPOST('date_end_real_updateyear')) { $date_end_real_update = dol_mktime(GETPOST('date_end_real_updatehour'), GETPOST('date_end_real_updatemin'), 0, GETPOST('date_end_real_updatemonth'), GETPOST('date_end_real_updateday'), GETPOST('date_end_real_updateyear')); } - if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) - { + if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) { $datecontrat = dol_mktime(GETPOST('rehour'), GETPOST('remin'), 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); } // Add contract - if ($action == 'add' && $user->rights->contrat->creer) - { + if ($action == 'add' && $user->rights->contrat->creer) { // Check - if (empty($datecontrat)) - { + if (empty($datecontrat)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $action = 'create'; } - if ($socid < 1) - { + if ($socid < 1) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")), null, 'errors'); $action = 'create'; $error++; @@ -202,8 +194,7 @@ if (empty($reshook)) $action = 'create'; } - if (!$error) - { + if (!$error) { $object->socid = $socid; $object->date_contrat = $datecontrat; @@ -213,33 +204,34 @@ if (empty($reshook)) $object->note_private = GETPOST('note_private', 'alpha'); $object->note_public = GETPOST('note_public', 'alpha'); $object->fk_project = GETPOST('projectid', 'int'); - $object->remise_percent = GETPOST('remise_percent', 'alpha'); + $object->remise_percent = price2num(GETPOST('remise_percent'), 2); $object->ref = GETPOST('ref', 'alpha'); $object->ref_customer = GETPOST('ref_customer', 'alpha'); $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); // If creation from another object of another module (Example: origin=propal, originid=1) - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; - if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { $element = $regs[1]; $subelement = $regs[2]; } // For compatibility - if ($element == 'order') { $element = $subelement = 'commande'; } - if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } + if ($element == 'order') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; $subelement = 'propal'; + } $object->origin = $origin; $object->origin_id = $originid; // Possibility to add external linked objects with hooks $object->linked_objects[$object->origin] = $object->origin_id; - if (is_array($_POST['other_linked_objects']) && !empty($_POST['other_linked_objects'])) - { + if (is_array($_POST['other_linked_objects']) && !empty($_POST['other_linked_objects'])) { $object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']); } @@ -248,8 +240,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -257,12 +248,10 @@ if (empty($reshook)) dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $srcobject->fetch_thirdparty(); $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } @@ -270,29 +259,29 @@ if (empty($reshook)) $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); if ($product_type == 1 || (!empty($conf->global->CONTRACT_SUPPORT_PRODUCTS) && in_array($product_type, array(0, 1)))) { // TODO Exclude also deee // service prédéfini - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { $product_static = new Product($db); // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->id = $lines[$i]->fk_product; $prod->getMultiLangs(); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $srcobject->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -340,8 +329,7 @@ if (empty($reshook)) $lines[$i]->fk_unit ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -356,16 +344,16 @@ if (empty($reshook)) $parameters = array('objFrom' => $srcobject); $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if ($reshook < 0) + if ($reshook < 0) { $error++; + } } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } else { $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -376,18 +364,14 @@ if (empty($reshook)) } } elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); - } - - // Add a new line - elseif ($action == 'addline' && $user->rights->contrat->creer) - { + } elseif ($action == 'addline' && $user->rights->contrat->creer) { + // Add a new line // Set if we used free entry or predefined product $predef = ''; $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); - if (GETPOST('prod_entry_mode', 'alpha') == 'free') - { + if (GETPOST('prod_entry_mode', 'alpha') == 'free') { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); } else { @@ -396,23 +380,20 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = ((GETPOST('remise_percent'.$predef) != '') ? GETPOST('remise_percent'.$predef) : 0); + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef), 2) : 0); - if ($qty == '') - { + if ($qty == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")), null, 'errors'); $error++; } - if (GETPOST('prod_entry_mode', 'alpha') == 'free' && empty($idprod) && empty($product_desc)) - { + if (GETPOST('prod_entry_mode', 'alpha') == 'free' && empty($idprod) && empty($product_desc)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), null, 'errors'); $error++; } $date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); - if (!empty($date_start) && !empty($date_end) && $date_start > $date_end) - { + if (!empty($date_start) && !empty($date_end) && $date_start > $date_end) { setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors'); $error++; } @@ -428,8 +409,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { // Clean parameters $date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); @@ -439,15 +419,16 @@ if (empty($reshook)) // Ecrase $desc par celui du produit // Ecrase $tva_tx par celui du produit // Ecrase $base_price_type par celui du produit - if ($idprod > 0) - { + if ($idprod > 0) { $prod = new Product($db); $prod->fetch($idprod); // Update if prices fields are defined $tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $pu_ht = $prod->price; $pu_ttc = $prod->price_ttc; @@ -455,14 +436,12 @@ if (empty($reshook)) $price_base_type = $prod->price_base_type; // On defini prix unitaire - if ($conf->global->PRODUIT_MULTIPRICES && $object->thirdparty->price_level) - { + if ($conf->global->PRODUIT_MULTIPRICES && $object->thirdparty->price_level) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $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'; $prodcustprice = new Productcustomerprice($db); @@ -476,9 +455,13 @@ if (empty($reshook)) $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; $tva_tx = $prodcustprice->lines [0]->tva_tx; - if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } $tva_npr = $prodcustprice->lines[0]->recuperableonly; - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } } } } @@ -488,19 +471,26 @@ if (empty($reshook)) // 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') - { + 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'); } } - $desc = $prod->description; - if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; - else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + $desc = $prod->description; + + //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time + if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc=''; + } + + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { + $desc = $product_desc; + } else { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } $fk_unit = $prod->fk_unit; } else { @@ -517,16 +507,19 @@ if (empty($reshook)) // ajout prix achat $fk_fournprice = $_POST['fournprice']; - if (!empty($_POST['buying_price'])) - $pa_ht = $_POST['buying_price']; - else $pa_ht = null; + if (!empty($_POST['buying_price'])) { + $pa_ht = $_POST['buying_price']; + } else { + $pa_ht = null; + } $info_bits = 0; - if ($tva_npr) $info_bits |= 0x01; + if ($tva_npr) { + $info_bits |= 0x01; + } if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) - || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) - { + || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { $object->error = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); $result = -1; } else { @@ -545,22 +538,24 @@ if (empty($reshook)) $price_base_type, $pu_ttc, $info_bits, - $fk_fournprice, - $pa_ht, + $fk_fournprice, + $pa_ht, $array_options, $fk_unit ); } - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && !empty($conf->global->CONTRACT_ADDON_PDF)) // No generation if default type not defined - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && !empty($conf->global->CONTRACT_ADDON_PDF)) { // No generation if default type not defined $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 ($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); @@ -609,19 +604,16 @@ if (empty($reshook)) } 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) - { + if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update) { setEventMessages($langs->trans("Error").': '.$langs->trans("DateStartPlanned").' > '.$langs->trans("DateEndPlanned"), null, 'errors'); $action = 'editline'; $_GET['rowid'] = GETPOST('elrowid'); $error++; } - if (!$error) - { + if (!$error) { $objectline = new ContratLigne($db); - if ($objectline->fetch(GETPOST('elrowid', 'int')) < 0) - { + if ($objectline->fetch(GETPOST('elrowid', 'int')) < 0) { setEventMessages($objectline->error, $objectline->errors, 'errors'); $error++; } @@ -630,10 +622,13 @@ if (empty($reshook)) $db->begin(); - if (!$error) - { - if ($date_start_real_update == '') $date_start_real_update = $objectline->date_ouverture; - if ($date_end_real_update == '') $date_end_real_update = $objectline->date_cloture; + if (!$error) { + if ($date_start_real_update == '') { + $date_start_real_update = $objectline->date_ouverture; + } + if ($date_end_real_update == '') { + $date_end_real_update = $objectline->date_cloture; + } $vat_rate = GETPOST('eltva_tx'); // Define info_bits @@ -652,14 +647,12 @@ if (empty($reshook)) // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } // ajout prix d'achat - $fk_fournprice = GETPOST('fournprice'); if (GETPOST('buying_price')) { $pa_ht = price2num(GETPOST('buying_price'), '', 2); } else { @@ -670,10 +663,10 @@ if (empty($reshook)) $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'); - $objectline->remise_percent = GETPOST('elremise_percent'); + $objectline->price_ht = price2num(GETPOST('elprice'), 'MU'); + $objectline->subprice = price2num(GETPOST('elprice'), 'MU'); + $objectline->qty = price2num(GETPOST('elqty'), 'MS'); + $objectline->remise_percent = price2num(GETPOST('elremise_percent'), 2); $objectline->tva_tx = ($txtva ? $txtva : 0); // Field may be disabled, so we use vat rate 0 $objectline->vat_src_code = $vat_src_code; $objectline->localtax1_tx = is_numeric($localtax1_tx) ? $localtax1_tx : 0; @@ -706,43 +699,40 @@ if (empty($reshook)) // TODO verifier price_min si fk_product et multiprix $result = $objectline->update($user); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($objectline->error, $objectline->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } - } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) - { - $result = $object->deleteline(GETPOST('lineid'), $user); + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { + $result = $object->deleteline(GETPOST('lineid', 'int'), $user); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } 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); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -755,53 +745,38 @@ if (empty($reshook)) } 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) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Close all lines - elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) - { + } elseif ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) { + // Close all lines $result = $object->closeAll($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Close all lines - elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) - { + } elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->rights->contrat->creer) { + // Close all lines $result = $object->activateAll($user); - if ($result < 0) - { + if ($result < 0) { 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) - { + if ($result >= 0) { header("Location: list.php?restore_lastsearch_values=1"); return; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) - { - if (GETPOST('newcid') > 0) - { + } elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { + if (GETPOST('newcid') > 0) { $contractline = new ContratLigne($db); - $result = $contractline->fetch(GETPOST('lineid')); - $contractline->fk_contrat = GETPOST('newcid'); + $result = $contractline->fetch(GETPOSTINT('lineid')); + $contractline->fk_contrat = GETPOSTINT('newcid'); $result = $contractline->update($user, 1); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); return; } else { @@ -810,18 +785,18 @@ if (empty($reshook)) } 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $result = $object->insertExtraFields('CONTRACT_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -830,8 +805,7 @@ if (empty($reshook)) if ($error) { $action = 'edit_extras'; } - } elseif ($action == 'setref_supplier') - { + } elseif ($action == 'setref_supplier') { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { $object->oldcopy = dol_clone($object); @@ -848,12 +822,10 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } elseif ($action == 'setref_customer') - { + } elseif ($action == 'setref_customer') { $cancelbutton = GETPOST('cancel', 'alpha'); - if (!$cancelbutton) - { + if (!$cancelbutton) { $object->oldcopy = dol_clone($object); $result = $object->setValueFrom('ref_customer', GETPOST('ref_customer', 'alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY'); @@ -868,8 +840,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } elseif ($action == 'setref') - { + } elseif ($action == 'setref') { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { @@ -890,11 +861,11 @@ if (empty($reshook)) $new_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $files = dol_dir_list($old_filedir); - if (!empty($files)) - { - if (!is_dir($new_filedir)) dol_mkdir($new_filedir); - foreach ($files as $file) - { + if (!empty($files)) { + if (!is_dir($new_filedir)) { + dol_mkdir($new_filedir); + } + foreach ($files as $file) { dol_move($file['fullname'], $new_filedir.'/'.$file['name']); } } @@ -906,8 +877,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } elseif ($action == 'setdate_contrat') - { + } elseif ($action == 'setdate_contrat') { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { @@ -944,42 +914,31 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) - { - if ($action == 'addcontact') - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) { + if ($action == 'addcontact') { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } + } elseif ($action == 'swapstatut') { + // bascule du statut d'un contact + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + } elseif ($action == 'deletecontact') { + // Efface un contact + $result = $object->delete_contact(GETPOST('lineid', 'int')); - // bascule du statut d'un contact - elseif ($action == 'swapstatut') - { - $result = $object->swapContactStatus(GETPOST('ligne')); - } - - // Efface un contact - elseif ($action == 'deletecontact') - { - $result = $object->delete_contact(GETPOST('lineid')); - - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -989,10 +948,8 @@ if (empty($reshook)) } // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes') - { - if (!GETPOST('socid', 3)) - { + if ($action == 'confirm_clone' && $confirm == 'yes') { + if (!GETPOST('socid', 3)) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { if ($object->id > 0) { @@ -1001,7 +958,9 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit(); } else { - if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); + if (count($object->errors) > 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } $action = ''; } } @@ -1014,57 +973,64 @@ if (empty($reshook)) * View */ -llxHeader('', $langs->trans("Contract"), ""); + +$help_url = 'EN:Module_Contracts|FR:Module_Contrat'; + +llxHeader('', $langs->trans("Contract"), $help_url); $form = new Form($db); $formfile = new FormFile($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} // Load object modContract $module = (!empty($conf->global->CONTRACT_ADDON) ? $conf->global->CONTRACT_ADDON : 'mod_contract_serpis'); -if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') -{ +if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/contract/'.$module.'.php'); -if ($result > 0) -{ +if ($result > 0) { $modCodeContract = new $module(); } // Create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans('AddContract'), '', 'contract'); $soc = new Societe($db); - if ($socid > 0) $soc->fetch($socid); + if ($socid > 0) { + $soc->fetch($socid); + } - if (GETPOST('origin') && GETPOST('originid')) - { + if (GETPOST('origin') && GETPOST('originid')) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin'); - if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs)) { $element = $regs[1]; $subelement = $regs[2]; } - if ($element == 'project') - { + if ($element == 'project') { $projectid = GETPOST('originid'); } else { // For compatibility - if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } - if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } + if ($element == 'order' || $element == 'commande') { + $element = $subelement = 'commande'; + } + if ($element == 'propal') { + $element = 'comm/propal'; $subelement = 'propal'; + } dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) $objectsrc->fetch_lines(); + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { + $objectsrc->fetch_lines(); + } $objectsrc->fetch_thirdparty(); // Replicate extrafields @@ -1121,8 +1087,7 @@ if ($action == 'create') // Thirdparty print '
    '; print ''; - if ($socid > 0) - { + if ($socid > 0) { print ''."\n"; - if ($socid > 0) - { + if ($socid > 0) { // Ligne info remises tiers print ''; } @@ -1164,8 +1134,7 @@ if ($action == 'create') print ""; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load('projects'); $formproject = new FormProjets($db); @@ -1177,14 +1146,13 @@ if ($action == 'create') } print ''; - if (empty($user->socid)) - { + if (empty($user->socid)) { print ''; } @@ -1209,13 +1177,11 @@ if ($action == 'create') print ''; print ''; - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print ''; print ''; - if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) - { + if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { print '
    '.$langs->trans("Note").': '.$langs->trans("OnlyLinesWithTypeServiceAreUsed"); } } @@ -1229,8 +1195,7 @@ if ($action == 'create') { $now = dol_now(); - if ($object->id > 0) - { + if ($object->id > 0) { $object->fetch_thirdparty(); $soc = $object->thirdparty; // $soc is used later @@ -1302,10 +1267,9 @@ if ($action == 'create') print $formconfirm; /* - * Contrat - */ - if (!empty($object->brouillon) && $user->rights->contrat->creer) - { + * Contrat + */ + if (!empty($object->brouillon) && $user->rights->contrat->creer) { print ''; print ''; print ''; @@ -1334,14 +1298,14 @@ if ($action == 'create') $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->contrat->creer) - { + if ($user->rights->contrat->creer) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -1382,12 +1346,18 @@ if ($action == 'create') // Line info of thirdparty discounts print ''; @@ -1408,22 +1378,19 @@ if ($action == 'create') print ''; - if (!empty($object->brouillon) && $user->rights->contrat->creer) - { + if (!empty($object->brouillon) && $user->rights->contrat->creer) { print ''; } echo '
    '; - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $blocname = 'notes'; $title = $langs->trans('Notes'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; @@ -1433,19 +1400,20 @@ if ($action == 'create') $arrayothercontracts = $object->getListOfContracts('others'); /* - * Lines of contracts - */ + * Lines of contracts + */ $productstatic = new Product($db); $usemargins = 0; - if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) $usemargins = 1; + if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) { + $usemargins = 1; + } // Title line for service $cursorline = 1; print '
    '; - while ($cursorline <= $nbofservices) - { + while ($cursorline <= $nbofservices) { print '
    '; print '
    '; print ''; @@ -1469,8 +1437,7 @@ if ($action == 'create') $sql .= " WHERE cd.rowid = ".$object->lines[$cursorline - 1]->id; $result = $db->query($sql); - if ($result) - { + if ($result) { $total = 0; print '
    '; @@ -1481,23 +1448,27 @@ if ($action == 'create') // print ''; //} print ''; - if (!empty($conf->global->PRODUCT_USE_UNITS)) print ''; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + } print ''; - if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print ''; + if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { + print ''; + } print ''; print "\n"; $objp = $db->fetch_object($result); // Line in view mode - if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) - { + if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { $moreparam = ''; - if (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $objp->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') $moreparam = 'style="display: none;"'; + 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) - { + if ($objp->fk_product > 0) { $productstatic->id = $objp->fk_product; $productstatic->type = $objp->ptype; $productstatic->ref = $objp->pref; @@ -1509,16 +1480,14 @@ if ($action == 'create') print ''; // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) print ''; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print ''; + } // Discount - if ($objp->remise_percent > 0) - { + if ($objp->remise_percent > 0) { print '\n"; } else { print ''; } // Margin - if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print ''; + if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { + print ''; + } // Icon move, update et delete (statut contrat 0=brouillon,1=valide,2=ferme) print '\n"; // Dates of service planed and real - if ($objp->subprice >= 0) - { + if ($objp->subprice >= 0) { $colspan = 6; if ($conf->margin->enabled && $conf->global->PRODUCT_USE_UNITS) { @@ -1595,8 +1563,7 @@ if ($action == 'create') // Date planned print $langs->trans("DateStartPlanned").': '; - if ($objp->date_debut) - { + if ($objp->date_debut) { print dol_print_date($db->jdate($objp->date_debut), 'day'); // Warning si date prevu passee et pas en service if ($objp->statut == 0 && $db->jdate($objp->date_debut) < ($now - $conf->contrat->services->inactifs->warning_delay)) { @@ -1604,18 +1571,21 @@ if ($action == 'create') $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) - { + if ($objp->date_fin) { print dol_print_date($db->jdate($objp->date_fin), 'day'); if ($objp->statut == 4 && $db->jdate($objp->date_fin) < ($now - $conf->contrat->services->expires->warning_delay)) { $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 $langs->trans("Unknown"); + } else { + print $langs->trans("Unknown"); + } print ''; print ''; @@ -1628,14 +1598,12 @@ if ($action == 'create') $line->fetch_optionals(); print $line->showOptionals($extrafields, 'view', array('class'=>'oddeven', 'style'=>$moreparam, 'colspan'=>$colspan), '', '', 1); } - } - // Line in mode update - else { + } else { + // Line in mode update // Ligne carac print ''; print ''; // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { print ''; @@ -1696,10 +1665,11 @@ if ($action == 'create') // Discount print ''; - if (!empty($usemargins)) - { + if (!empty($usemargins)) { print ''; } print ''; $colspan = 6; - if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) $colspan++; - if (!empty($conf->global->PRODUCT_USE_UNITS)) $colspan++; + if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { + $colspan++; + } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $colspan++; + } // Ligne dates prevues print ''; @@ -1735,10 +1709,11 @@ if ($action == 'create') dol_print_error($db); } - if ($object->statut > 0) - { + if ($object->statut > 0) { $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;"'; + 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"; @@ -1751,22 +1726,21 @@ if ($action == 'create') /* - * Confirmation to delete service line of contract - */ - if ($action == 'deleteline' && !$_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline - 1]->id == GETPOST('rowid')) - { + * Confirmation to delete service line of contract + */ + if ($action == 'deleteline' && !$_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline - 1]->id == GETPOST('rowid')) { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'), $langs->trans("DeleteContractLine"), $langs->trans("ConfirmDeleteContractLine"), "confirm_deleteline", '', 0, 1); - if ($ret == 'html') print '
    '; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->selectarray('search_no_email', array('-1'=>'', '0'=>$langs->trans('No'), '1'=>$langs->trans('Yes')), $search_no_email); print ''; print ''; print ''; print ''; print ''; $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); print $form->selectarray('search_priv', $selectarray, $search_priv, 1); print ''; print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2); print ''; $arraystcomm = array(); - foreach ($contactstatic->cacheprospectstatus as $key => $val) - { + 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 '); @@ -750,26 +880,22 @@ $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation -if (!empty($arrayfields['p.datec']['checked'])) -{ +if (!empty($arrayfields['p.datec']['checked'])) { print ''; print ''; print ''; print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status); print ''; print ''; print '
    '; print $obj->rowid; print "'; print $contactstatic->getNomUrl(1); print ''.$obj->firstname.''.$obj->poste.''.$obj->zip.''.$obj->town.''; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print ''.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').''.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').''.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').''.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').''.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').''.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').''.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').''.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').''.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18).''.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).''.yn($obj->no_email).''.dol_print_socialnetworks($arraysocialnetworks[$key], $obj->rowid, $obj->socid, $key, $socialnetworks).''; - if ($obj->socid) - { + 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 ' '; + } else { + print ' '; + } print ''.$contactstatic->LibPubPriv($obj->priv).''; print $contactstatic->getLibProspLevel(); 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']).''; + 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 '
    '; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''.$contactstatic->getLibStatut(5).''; print $obj->import_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 - { + 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; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '; print $form->showphoto('contact', $object)."\n"; - if ($object->photo) print "
    \n"; + if ($object->photo) { + print "
    \n"; + } print ''; - if ($object->photo) print ''; + if ($object->photo) { + print ''; + } print ''; print ''; print '
    '.$langs->trans("Delete").'

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

    '.$langs->trans("PhotoFile").'
    '; @@ -167,10 +169,8 @@ if ($action == 'edit') print '
    '.$langs->trans("Firstname").''.$object->firstname.''.$langs->trans("Alert").': '; - if (!empty($object->birthday_alert)) - { + if (!empty($object->birthday_alert)) { print '
    '.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''; - print $langs->trans("ContactNotLinkedToCompany"); - print '
    '.$langs->trans("ThirdParty").''; + print $langs->trans("ContactNotLinkedToCompany"); + print '
    '.$langs->trans("UserTitle").''; @@ -268,8 +269,7 @@ if ($action == 'edit') // Date To Birth print '
    '.$langs->trans("DateOfBirth").''.dol_print_date($object->birthday, "day"); @@ -278,14 +278,21 @@ if ($action == 'edit') //var_dump($birthdatearray); $ageyear = convertSecondToTime($now - $object->birthday, 'year') - 1970; $agemonth = convertSecondToTime($now - $object->birthday, 'month') - 1; - if ($ageyear >= 2) print '('.$ageyear.' '.$langs->trans("DurationYears").')'; - elseif ($agemonth >= 2) print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; - else print '('.$agemonth.' '.$langs->trans("DurationMonth").')'; + if ($ageyear >= 2) { + print '('.$ageyear.' '.$langs->trans("DurationYears").')'; + } elseif ($agemonth >= 2) { + print '('.$agemonth.' '.$langs->trans("DurationMonths").')'; + } else { + print '('.$agemonth.' '.$langs->trans("DurationMonth").')'; + } print '   -   '; - if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn"); - else print $langs->trans("BirthdayAlertOff"); + if ($object->birthday_alert) { + print $langs->trans("BirthdayAlertOn"); + } else { + print $langs->trans("BirthdayAlertOff"); + } print ''.$langs->trans("DateOfBirth").'
    '.$langs->trans('ThirdParty').''; print $soc->getNomUrl(1); print ''; @@ -1135,16 +1100,21 @@ if ($action == 'create') } print '
    '.$langs->trans('Discounts').''; - if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); + if ($soc->remise_percent) { + print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); + } else { + print $langs->trans("CompanyHasNoRelativeDiscount"); + } print '. '; $absolute_discount = $soc->getAvailableDiscounts(); - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); - else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($absolute_discount) { + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + } else { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + } print '.'; print '
    '.$langs->trans("NotePublic").''; - $doleditor = new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', '100', 'dolibarr_notes', 'In', 1, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    '.$langs->trans("NotePrivate").''; - $doleditor = new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', '100', 'dolibarr_notes', 'In', 1, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    '.$langs->trans('Discount').''; - if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); + if ($object->thirdparty->remise_percent) { + print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); + } else { + print $langs->trans("CompanyHasNoRelativeDiscount"); + } $absolute_discount = $object->thirdparty->getAvailableDiscounts(); print '. '; - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); - else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($absolute_discount) { + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + } else { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + } print '.'; print '
    '.$langs->trans("PriceUHTCurrency").''.$langs->trans("Qty").''.$langs->trans("Unit").''.$langs->trans("Unit").''.$langs->trans("ReductionShort").''.$langs->trans("BuyingPrice").''.$langs->trans("BuyingPrice").' 
    '; $text = $productstatic->getNomUrl(1, '', 32); - if ($objp->plabel) - { + if ($objp->plabel) { $text .= ' - '; $text .= $objp->plabel; } $description = $objp->description; // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { $text .= (!empty($objp->description) && $objp->description != $objp->plabel) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; $description = ''; // Already added into main visible desc } @@ -1542,35 +1511,35 @@ if ($action == 'create') // Quantity print '
    '.$objp->qty.''.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).''.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).''.$objp->remise_percent."% '.price($objp->pa_ht).''.price($objp->pa_ht).''; - if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) - { + if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) { print ''; - print ''; + print ''; print img_picto($langs->trans("MoveToAnotherContract"), 'uparrow'); print ''; } - if ($user->rights->contrat->creer && ($object->statut >= 0)) - { + if ($user->rights->contrat->creer && ($object->statut >= 0)) { print ''; print img_edit(); print ''; } - if ($user->rights->contrat->creer && ($object->statut >= 0)) - { + if ($user->rights->contrat->creer && ($object->statut >= 0)) { print ''; print img_delete(); print ''; @@ -1580,8 +1549,7 @@ if ($action == 'create') print "
    '; - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { $canchangeproduct = 1; if (empty($canchangeproduct)) { $productstatic->id = $objp->fk_product; @@ -1662,7 +1630,9 @@ if ($action == 'create') // editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $nbrows = ROWS_2; - if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; + if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) { + $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT; + } $enable = (isset($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0); $doleditor = new DolEditor('product_desc', $objp->description, '', 92, 'dolibarr_details', '', false, true, $enable, $nbrows, '90%'); $doleditor->Create(); @@ -1686,8 +1656,7 @@ if ($action == 'create') print ''; print $form->selectUnits($objp->fk_unit, "unit"); print '%'; - if ($objp->fk_product) print ''; + if ($objp->fk_product) { + print ''; + } print ''; @@ -1709,8 +1679,12 @@ if ($action == 'create') print '

    '; + if ($ret == 'html') { + print '
    '; + } } /* - * Confirmation to move service toward another contract - */ - if ($action == 'move' && !$_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline - 1]->id == GETPOST('rowid')) - { + * Confirmation to move service toward another contract + */ + if ($action == 'move' && !$_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline - 1]->id == GETPOST('rowid')) { $arraycontractid = array(); - foreach ($arrayothercontracts as $contractcursor) - { + foreach ($arrayothercontracts as $contractcursor) { $arraycontractid[$contractcursor->id] = $contractcursor->ref; } //var_dump($arraycontractid); @@ -1775,33 +1749,30 @@ if ($action == 'create') 'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"), array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid)); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid', 'int'), $langs->trans("MoveToAnotherContract"), $langs->trans("ConfirmMoveToAnotherContract"), "confirm_move", $formquestion); print '
    '; } /* - * Confirmation de la validation activation - */ - if ($action == 'active' && !$_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline - 1]->id == GETPOST('ligne')) - { + * Confirmation de la validation activation + */ + if ($action == 'active' && !$cancel && $user->rights->contrat->activer && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment', 'alpha'); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("ActivateService"), $langs->trans("ConfirmActivateService", dol_print_date($dateactstart, "%A %d %B %Y")), "confirm_active", '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne', 'int')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("ActivateService"), $langs->trans("ConfirmActivateService", dol_print_date($dateactstart, "%A %d %B %Y")), "confirm_active", '', 0, 1); print '
    '; } /* - * Confirmation de la validation fermeture - */ - if ($action == 'closeline' && !$_REQUEST["cancel"] && $user->rights->contrat->activer && $object->lines[$cursorline - 1]->id == GETPOST('ligne')) - { + * Confirmation de la validation fermeture + */ + if ($action == 'closeline' && !$cancel && $user->rights->contrat->activer && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); $comment = GETPOST('comment', 'alpha'); - if (empty($dateactend)) - { + if (empty($dateactend)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEndReal")), null, 'errors'); } 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); @@ -1811,28 +1782,23 @@ if ($action == 'create') // Area with status and activation info of line - if ($object->statut > 0) - { + if ($object->statut > 0) { print ''; print ''; print ''; print ''; print ''; @@ -1874,24 +1845,25 @@ if ($action == 'create') } // Form to activate line - if ($user->rights->contrat->activer && $action == 'activateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne')) - { - print ''; + if ($user->rights->contrat->activer && $action == 'activateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { + print ''; print ''; print '
    '.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline - 1]->getLibStatut(4).''; - if ($user->socid == 0) - { - if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline') - { + if ($user->socid == 0) { + if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline') { $tmpaction = 'activateline'; $tmpactionpicto = 'play'; $tmpactiontext = $langs->trans("Activate"); - if ($objp->statut == 4) - { + if ($objp->statut == 4) { $tmpaction = 'unactivateline'; $tmpactionpicto = 'playstop'; $tmpactiontext = $langs->trans("Disable"); } - if (($tmpaction == 'activateline' && $user->rights->contrat->activer) || ($tmpaction == 'unactivateline' && $user->rights->contrat->desactiver)) - { + if (($tmpaction == 'activateline' && $user->rights->contrat->activer) || ($tmpaction == 'unactivateline' && $user->rights->contrat->desactiver)) { print ''; print img_picto($tmpactiontext, $tmpactionpicto); print ''; @@ -1848,8 +1814,11 @@ if ($action == 'create') // Si pas encore active if (!$objp->date_debut_reelle) { print $langs->trans("DateStartReal").': '; - if ($objp->date_debut_reelle) print dol_print_date($db->jdate($objp->date_debut_reelle), 'day'); - else print $langs->trans("ContractStatusNotRunning"); + if ($objp->date_debut_reelle) { + print dol_print_date($db->jdate($objp->date_debut_reelle), 'day'); + } else { + print $langs->trans("ContractStatusNotRunning"); + } } // Si active et en cours if ($objp->date_debut_reelle && !$objp->date_fin_reelle) { @@ -1864,7 +1833,9 @@ if ($action == 'create') print $langs->trans("DateEndReal").': '; print dol_print_date($db->jdate($objp->date_fin_reelle), 'day'); } - if (!empty($objp->comment)) print "  -  ".$objp->comment; + if (!empty($objp->comment)) { + print "  -  ".$objp->comment; + } print ' 
    '; // Definie date debut et fin par defaut $dateactstart = $objp->date_debut; - if (GETPOST('remonth')) $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - elseif (!$dateactstart) $dateactstart = time(); + if (GETPOST('remonth')) { + $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); + } elseif (!$dateactstart) { + $dateactstart = time(); + } $dateactend = $objp->date_fin; - if (GETPOST('endmonth')) $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); - elseif (!$dateactend) - { - if ($objp->fk_product > 0) - { + if (GETPOST('endmonth')) { + $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); + } elseif (!$dateactend) { + if ($objp->fk_product > 0) { $product = new Product($db); $product->fetch($objp->fk_product); $dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit); @@ -1923,8 +1895,7 @@ if ($action == 'create') print ''; } - if ($user->rights->contrat->activer && $action == 'unactivateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne')) - { + if ($user->rights->contrat->activer && $action == 'unactivateline' && $object->lines[$cursorline - 1]->id == GETPOST('ligne', 'int')) { /** * Disable a contract line */ @@ -1938,28 +1909,30 @@ if ($action == 'create') // Definie date debut et fin par defaut $dateactstart = $objp->date_debut_reelle; - if (GETPOST('remonth')) $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - elseif (!$dateactstart) $dateactstart = time(); + if (GETPOST('remonth')) { + $dateactstart = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); + } elseif (!$dateactstart) { + $dateactstart = time(); + } $dateactend = $objp->date_fin_reelle; - if (GETPOST('endmonth')) $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); - elseif (!$dateactend) - { - if ($objp->fk_product > 0) - { + if (GETPOST('endmonth')) { + $dateactend = dol_mktime(12, 0, 0, GETPOST('endmonth'), GETPOST('endday'), GETPOST('endyear')); + } elseif (!$dateactend) { + if ($objp->fk_product > 0) { $product = new Product($db); $product->fetch($objp->fk_product); $dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit); } } $now = dol_now(); - if ($dateactend > $now) $dateactend = $now; + if ($dateactend > $now) { + $dateactend = $now; + } print ''; // Severity @@ -237,8 +245,7 @@ class FormTicket // If public form, display more information $toolbarname = 'dolibarr_notes'; - if ($this->ispublic) - { + if ($this->ispublic) { $toolbarname = 'dolibarr_details'; print '
    '.($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')).'
    '; } @@ -248,6 +255,18 @@ class FormTicket $doleditor->Create(); print ''; + if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + print ''; + } // Attached files if (!empty($this->withfile)) { @@ -294,7 +313,7 @@ class FormTicket if ($this->withfile == 2) { // Can add other files $out .= ''; $out .= ' '; - $out .= ''; + $out .= ''; } $out .= "\n"; @@ -369,7 +388,9 @@ class FormTicket if (response.num) { var selecthtml_str = response.value; var selecthtml_dom=$.parseHTML(selecthtml_str); - $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + if (typeof(selecthtml_dom[0][0]) !== \'undefined\') { + $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + } } else { $("#inputautocomplete"+htmlname).val(""); } @@ -397,16 +418,14 @@ class FormTicket } // Notify thirdparty at creation - if (empty($this->ispublic)) - { + if (empty($this->ispublic)) { print ''; } } - if (!empty($conf->projet->enabled) && !$this->ispublic) - { + if (!empty($conf->projet->enabled) && !$this->ispublic) { $formproject = new FormProjets($this->db); print '
    '; - if ($objp->statut >= 4) - { - if ($objp->statut == 4) - { + if ($objp->statut >= 4) { + if ($objp->statut == 4) { print $langs->trans("DateEndReal").' '; print $form->selectDate($dateactend, "end", $usehm, $usehm, ($objp->date_fin_reelle > 0 ? 0 : 1), "closeline", 1, 1); } @@ -1986,12 +1959,11 @@ if ($action == 'create') print ''; // Form to add new line - if ($user->rights->contrat->creer && ($object->statut == 0)) - { + if ($user->rights->contrat->creer && ($object->statut == 0)) { $dateSelector = 1; print "\n"; - print '
    + print ' @@ -2002,10 +1974,11 @@ if ($action == 'create') print ''; // Array with (n*2)+1 lines // Form to add new line - if ($action != 'editline') - { + if ($action != 'editline') { $forcetoshowtitlelines = 1; - if (empty($object->multicurrency_code)) $object->multicurrency_code = $conf->currency; // TODO Remove this when multicurrency supported on contracts + if (empty($object->multicurrency_code)) { + $object->multicurrency_code = $conf->currency; // TODO Remove this when multicurrency supported on contracts + } // Add free products/services $object->formAddObjectLine(1, $mysoc, $soc); @@ -2023,66 +1996,70 @@ if ($action == 'create') /* - * Buttons - */ + * Buttons + */ - if ($user->socid == 0) - { + if ($user->socid == 0) { print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { if ($object->statut == 1) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->contrat->creer)) { - print ''; - } else print ''; + print ''; + } else { + print ''; + } } } - if ($object->statut == 0 && $nbofservices) - { - if ($user->rights->contrat->creer) print ''; - else print ''; + if ($object->statut == 0 && $nbofservices) { + if ($user->rights->contrat->creer) { + print ''; + } else { + print ''; + } } - if ($object->statut == 1) - { - if ($user->rights->contrat->creer) print ''; - else print ''; + if ($object->statut == 1) { + if ($user->rights->contrat->creer) { + print ''; + } else { + print ''; + } } - if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) - { + if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) { $langs->load("orders"); - if ($user->rights->commande->creer) print ''; - else print ''; + if ($user->rights->commande->creer) { + print ''; + } else { + print ''; + } } - if (!empty($conf->facture->enabled) && $object->statut > 0) - { + if (!empty($conf->facture->enabled) && $object->statut > 0) { $langs->load("bills"); - if ($user->rights->facture->creer) print ''; - else print ''; + if ($user->rights->facture->creer) { + print ''; + } else { + print ''; + } } - if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) - { - if ($user->rights->contrat->activer) - { - print ''; + if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) { + if ($user->rights->contrat->activer) { + print ''; } else { print ''; } } - if ($object->nbofservicesclosed < $nbofservices) - { - if ($user->rights->contrat->desactiver) - { - print ''; + if ($object->nbofservicesclosed < $nbofservices) { + if ($user->rights->contrat->desactiver) { + print ''; } else { print ''; } @@ -2096,22 +2073,23 @@ if ($action == 'create') //} } - if (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->nbofservicesclosed > 0) - { - if ($action == 'showclosedlines') print ''; - else print ''; + if (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->nbofservicesclosed > 0) { + if ($action == 'showclosedlines') { + print ''; + } else { + print ''; + } } // Clone if ($user->rights->contrat->creer) { - print ''; + 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) - { + if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) { print ''; } else { print ''; @@ -2126,13 +2104,12 @@ if ($action == 'create') $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
    '; /* - * Documents generes - */ + * Generated documents + */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; @@ -2147,7 +2124,6 @@ if ($action == 'create') $linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; $MAXEVENT = 10; @@ -2179,8 +2155,7 @@ $db->close(); ?> margin->enabled) && $action == 'editline') -{ +if (!empty($conf->margin->enabled) && $action == 'editline') { // TODO Why this ? To manage margin on contracts ? ?> rights->contrat->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -113,28 +117,37 @@ class Contracts extends DolibarrApi // 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 (!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) + 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."contrat 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('contrat').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -143,8 +156,7 @@ class Contracts extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -155,13 +167,11 @@ class Contracts extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $contrat_static = new Contrat($this->db); if ($contrat_static->fetch($obj->rowid)) { @@ -196,12 +206,12 @@ class Contracts extends DolibarrApi $this->contract->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->contract->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->contract->lines = $lines; + }*/ if ($this->contract->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating contract", array_merge(array($this->contract->error), $this->contract->errors)); } @@ -264,7 +274,12 @@ class Contracts extends DolibarrApi if (!DolibarrApi::_checkAccessToResource('contrat', $this->contract->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->price_base_type = checkVal($request_data->price_base_type); + $updateRes = $this->contract->addline( $request_data->desc, $request_data->subprice, @@ -276,7 +291,7 @@ class Contracts extends DolibarrApi $request_data->remise_percent, $request_data->date_start, // date_start = date planned start, date ouverture = date_start_real $request_data->date_end, // date_end = date planned end, date_cloture = date_end_real - $request_data->HT, + $request_data->price_base_type ? $request_data->price_base_type : 'HT', $request_data->subprice_excl_tax, $request_data->info_bits, $request_data->fk_fournprice, @@ -320,6 +335,9 @@ class Contracts extends DolibarrApi $request_data = (object) $request_data; + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->price_base_type = checkVal($request_data->price_base_type); + $updateRes = $this->contract->updateline( $lineid, $request_data->desc, @@ -333,7 +351,7 @@ class Contracts extends DolibarrApi $request_data->localtax2_tx, $request_data->date_ouverture, $request_data->date_cloture, - 'HT', + $request_data->price_base_type ? $request_data->price_base_type : 'HT', $request_data->info_bits, $request_data->fk_fourn_price, $request_data->pa_ht, @@ -416,8 +434,6 @@ class Contracts extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - // $request_data = (object) $request_data; - $updateRes = $this->contract->close_line(DolibarrApiAccess::$user, $lineid, $datestart, $comment); if ($updateRes > 0) { @@ -491,7 +507,9 @@ class Contracts extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->contract->$field = $value; } @@ -667,8 +685,9 @@ class Contracts extends DolibarrApi { $contrat = array(); foreach (Contracts::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $contrat[$field] = $data[$field]; } return $contrat; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 7c99a9483b9..3bfe1a2315e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2015-2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -269,8 +269,7 @@ class Contrat extends CommonObject global $db, $langs, $conf; $langs->load("contracts"); - if (!empty($conf->global->CONTRACT_ADDON)) - { + if (!empty($conf->global->CONTRACT_ADDON)) { $mybool = false; $file = $conf->global->CONTRACT_ADDON.".php"; @@ -286,8 +285,7 @@ class Contrat extends CommonObject $mybool |= @include_once $dir.$file; } - if (!$mybool) - { + if (!$mybool) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -295,8 +293,7 @@ class Contrat extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -325,8 +322,7 @@ class Contrat extends CommonObject { // phpcs:enable $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); - if ($result < 0) - { + if ($result < 0) { $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; $this->errors = $this->lines[$this->lines_id_index_mapper[$line_id]]->errors; } @@ -348,8 +344,7 @@ class Contrat extends CommonObject { // phpcs:enable $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); - if ($result < 0) - { + if ($result < 0) { $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error; $this->errors = $this->lines[$this->lines_id_index_mapper[$line_id]]->errors; } @@ -369,7 +364,9 @@ class Contrat extends CommonObject */ public function activateAll($user, $date_start = '', $notrigger = 0, $comment = '') { - if (empty($date_start)) $date_start = dol_now(); + if (empty($date_start)) { + $date_start = dol_now(); + } $this->db->begin(); @@ -378,16 +375,13 @@ class Contrat extends CommonObject // Load lines $this->fetch_lines(); - foreach ($this->lines as $contratline) - { + foreach ($this->lines as $contratline) { // Open lines not already open - if ($contratline->statut != ContratLigne::STATUS_OPEN) - { + if ($contratline->statut != ContratLigne::STATUS_OPEN) { $contratline->context = $this->context; $result = $contratline->active_line($user, $date_start, -1, $comment); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $contratline->error; $this->errors = $contratline->errors; @@ -396,14 +390,14 @@ class Contrat extends CommonObject } } - if (!$error && $this->statut == 0) - { + if (!$error && $this->statut == 0) { $result = $this->validate($user, '', $notrigger); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -432,17 +426,14 @@ class Contrat extends CommonObject $error = 0; - foreach ($this->lines as $contratline) - { + foreach ($this->lines as $contratline) { // Close lines not already closed - if ($contratline->statut != ContratLigne::STATUS_CLOSED) - { + if ($contratline->statut != ContratLigne::STATUS_CLOSED) { $contratline->date_cloture = $now; $contratline->fk_user_cloture = $user->id; $contratline->statut = ContratLigne::STATUS_CLOSED; $result = $contratline->close_line($user, $now, $comment, $notrigger); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $contratline->error; $this->errors = $contratline->errors; @@ -451,14 +442,14 @@ class Contrat extends CommonObject } } - if (!$error && $this->statut == 0) - { + if (!$error && $this->statut == 0) { $result = $this->validate($user, '', $notrigger); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -491,76 +482,69 @@ class Contrat extends CommonObject $this->fetch_thirdparty(); // A contract is validated so we can move thirdparty to status customer - if (empty($conf->global->CONTRACT_DISABLE_AUTOSET_AS_CLIENT_ON_CONTRACT_VALIDATION)) - { + if (empty($conf->global->CONTRACT_DISABLE_AUTOSET_AS_CLIENT_ON_CONTRACT_VALIDATION)) { $result = $this->thirdparty->set_as_client(); } // Define new ref - if ($force_number) - { + 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 { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); - if ($num) - { + if ($num) { $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"; dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $error++; $this->error = $this->db->lasterror(); } // Trigger calls - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONTRACT_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'contract/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'contract/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->contract->dir_output.'/'.$oldref; $dirdest = $conf->contract->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->contract->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -573,8 +557,7 @@ class Contrat extends CommonObject } // Set new ref and define current statut - if (!$error) - { + if (!$error) { $this->ref = $num; $this->statut = 1; $this->brouillon = 0; @@ -584,8 +567,7 @@ class Contrat extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -621,16 +603,14 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $error++; $this->error = $this->db->lasterror(); } // Trigger calls - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('CONTRACT_REOPEN', $user); if ($result < 0) { @@ -640,15 +620,13 @@ class Contrat extends CommonObject } // Set new ref and define current status - if (!$error) - { + if (!$error) { $this->statut = 0; $this->brouillon = 1; $this->date_validation = $now; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -678,36 +656,32 @@ class Contrat extends CommonObject $sql .= " fk_commercial_signature, fk_commercial_suivi,"; $sql .= " note_private, note_public, model_pdf, extraparams"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat"; - if (!$id) $sql .= " WHERE entity IN (".getEntity('contract').")"; - else $sql .= " WHERE rowid=".(int) $id; - if ($ref_customer) - { + if (!$id) { + $sql .= " WHERE entity IN (".getEntity('contract').")"; + } else { + $sql .= " WHERE rowid=".(int) $id; + } + if ($ref_customer) { $sql .= " AND ref_customer = '".$this->db->escape($ref_customer)."'"; } - if ($ref_supplier) - { + if ($ref_supplier) { $sql .= " AND ref_supplier = '".$this->db->escape($ref_supplier)."'"; } - if ($ref) - { + if ($ref) { $sql .= " AND ref='".$this->db->escape($ref)."'"; } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 1) - { + if ($num > 1) { $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) - { + if ($obj) { $this->id = $obj->rowid; $this->ref = (!isset($obj->ref) || !$obj->ref) ? $obj->rowid : $obj->ref; $this->ref_customer = $obj->ref_customer; @@ -745,8 +719,7 @@ class Contrat extends CommonObject // Lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { $this->error = $this->db->lasterror(); return -3; } @@ -791,8 +764,7 @@ class Contrat extends CommonObject $now = dol_now(); - if (!is_object($extrafields)) - { + if (!is_object($extrafields)) { require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); } @@ -825,13 +797,11 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $line = new ContratLigne($this->db); @@ -908,10 +878,18 @@ class Contrat extends CommonObject //dol_syslog("1 ".$line->desc); //dol_syslog("2 ".$line->product_desc); - if ($line->statut == ContratLigne::STATUS_INITIAL) $this->nbofserviceswait++; - if ($line->statut == ContratLigne::STATUS_OPEN && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++; - if ($line->statut == ContratLigne::STATUS_OPEN && (!empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) $this->nbofservicesexpired++; - if ($line->statut == ContratLigne::STATUS_CLOSED) $this->nbofservicesclosed++; + if ($line->statut == ContratLigne::STATUS_INITIAL) { + $this->nbofserviceswait++; + } + if ($line->statut == ContratLigne::STATUS_OPEN && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) { + $this->nbofservicesopened++; + } + if ($line->statut == ContratLigne::STATUS_OPEN && (!empty($line->date_fin_prevue) && $line->date_fin_prevue < $now)) { + $this->nbofservicesexpired++; + } + if ($line->statut == ContratLigne::STATUS_CLOSED) { + $this->nbofservicesclosed++; + } $total_ttc += $objp->total_ttc; // TODO Not saved into database $total_vat += $objp->total_tva; @@ -946,20 +924,20 @@ class Contrat extends CommonObject // Check parameters $paramsok = 1; - if ($this->commercial_signature_id <= 0) - { + if ($this->commercial_signature_id <= 0) { $langs->load("commercial"); $this->error .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("SalesRepresentativeSignature")); $paramsok = 0; } - if ($this->commercial_suivi_id <= 0) - { + if ($this->commercial_suivi_id <= 0) { $langs->load("commercial"); $this->error .= ($this->error ? "
    " : ''); $this->error .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("SalesRepresentativeFollowUp")); $paramsok = 0; } - if (!$paramsok) return -1; + if (!$paramsok) { + return -1; + } $this->db->begin(); @@ -985,76 +963,66 @@ class Contrat extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $error = 0; $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."contrat"); // Load object modContract $module = (!empty($conf->global->CONTRACT_ADDON) ? $conf->global->CONTRACT_ADDON : 'mod_contract_serpis'); - if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/contract/'.$module.'.php'); - if ($result > 0) - { + if ($result > 0) { $modCodeContract = new $module(); if (!empty($modCodeContract->code_auto)) { // Force the ref to a draft value if numbering module is an automatic numbering - $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { - if ($this->id) - { + $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".((int) $this->id); + if ($this->db->query($sql)) { + if ($this->id) { $this->ref = "(PROV".$this->id.")"; } } } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } // Insert business contacts ('SALESREPSIGN','contrat') - if (!$error) - { + if (!$error) { $result = $this->add_contact($this->commercial_signature_id, 'SALESREPSIGN', 'internal'); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } // Insert business contacts ('SALESREPFOLL','contrat') if (!$error) { $result = $this->add_contact($this->commercial_suivi_id, 'SALESREPFOLL', 'internal'); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1063,8 +1031,7 @@ class Contrat extends CommonObject { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { + if (!$ret) { $this->error = $this->db->lasterror(); $error++; } @@ -1072,20 +1039,16 @@ class Contrat extends CommonObject } } - if (!$error && $this->id && !empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && !empty($this->origin) && !empty($this->origin_id)) // Get contact from origin object - { + if (!$error && $this->id && !empty($conf->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN) && !empty($this->origin) && !empty($this->origin_id)) { // Get contact from origin object $originforcontact = $this->origin; $originidforcontact = $this->origin_id; - if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order - { + 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(); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { + if (count($exp->linkedObjectsIds['commande']) > 0) { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) { $originforcontact = 'commande'; $originidforcontact = $value->id; break; // We take first one @@ -1094,31 +1057,33 @@ 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 = '".$this->db->escape($originforcontact)."'"; + $sqlcontact .= " WHERE element_id = ".((int) $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)) - { - if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) continue; // ignore this, already forced previously + if ($resqlcontact) { + while ($objcontact = $this->db->fetch_object($resqlcontact)) { + if ($objcontact->source == 'internal' && in_array($objcontact->code, array('SALESREPSIGN', 'SALESREPFOLL'))) { + continue; // ignore this, already forced previously + } //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); + } } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('CONTRACT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1158,29 +1123,29 @@ class Contrat extends CommonObject // Call trigger $result = $this->call_trigger('CONTRACT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) - { + if ($res < 0) { dol_syslog(get_class($this)."::delete error", LOG_ERR); $error++; } } - if (!$error) - { + if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Delete contratdet_log /* $sql = "DELETE cdl"; @@ -1193,29 +1158,25 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::delete contratdet_log", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->error(); $error++; } $numressql = $this->db->num_rows($resql); - if (!$error && $numressql) - { + if (!$error && $numressql) { $tab_resql = array(); - for ($i = 0; $i < $numressql; $i++) - { + for ($i = 0; $i < $numressql; $i++) { $objresql = $this->db->fetch_object($resql); $tab_resql[] = $objresql->cdlrowid; } $this->db->free($resql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet_log "; - $sql .= " WHERE ".MAIN_DB_PREFIX."contratdet_log.rowid IN (".implode(",", $tab_resql).")"; + $sql .= " WHERE ".MAIN_DB_PREFIX."contratdet_log.rowid IN (".$this->db->sanitize(implode(",", $tab_resql)).")"; dol_syslog(get_class($this)."::delete contratdet_log", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->error(); $error++; } @@ -1231,23 +1192,20 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::delete contratdet_extrafields", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->error(); $error++; } } - if (!$error) - { + if (!$error) { // Delete contratdet $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet"; $sql .= " WHERE fk_contrat=".$this->id; dol_syslog(get_class($this)."::delete contratdet", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->error(); $error++; } @@ -1257,8 +1215,7 @@ class Contrat extends CommonObject if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX."ecm_files WHERE src_object_type = '".$this->db->escape($this->table_element.(empty($this->module) ? '' : '@'.$this->module))."' AND src_object_id = ".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; $error++; @@ -1266,15 +1223,13 @@ class Contrat extends CommonObject } // Delete contract - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."contrat"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete contrat", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->error(); $error++; } @@ -1283,25 +1238,20 @@ class Contrat extends CommonObject // Removed extrafields if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); } } - if (!$error) - { + if (!$error) { // We remove directory $ref = dol_sanitizeFileName($this->ref); - if ($conf->contrat->dir_output) - { + if ($conf->contrat->dir_output) { $dir = $conf->contrat->multidir_output[$this->entity]."/".$ref; - if (file_exists($dir)) - { + if (file_exists($dir)) { $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->error = 'ErrorFailToDeleteDir'; $error++; } @@ -1309,8 +1259,7 @@ class Contrat extends CommonObject } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1333,23 +1282,55 @@ class Contrat extends CommonObject $error = 0; // Clean parameters - if (empty($this->fk_commercial_signature) && $this->commercial_signature_id > 0) $this->fk_commercial_signature = $this->commercial_signature_id; - if (empty($this->fk_commercial_suivi) && $this->commercial_suivi_id > 0) $this->fk_commercial_suivi = $this->commercial_suivi_id; - if (empty($this->fk_soc) && $this->socid > 0) $this->fk_soc = (int) $this->socid; - if (empty($this->fk_project) && $this->projet > 0) $this->fk_project = (int) $this->projet; + if (empty($this->fk_commercial_signature) && $this->commercial_signature_id > 0) { + $this->fk_commercial_signature = $this->commercial_signature_id; + } + if (empty($this->fk_commercial_suivi) && $this->commercial_suivi_id > 0) { + $this->fk_commercial_suivi = $this->commercial_suivi_id; + } + if (empty($this->fk_soc) && $this->socid > 0) { + $this->fk_soc = (int) $this->socid; + } + if (empty($this->fk_project) && $this->projet > 0) { + $this->fk_project = (int) $this->projet; + } - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->ref_customer)) $this->ref_customer = trim($this->ref_customer); - if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); - if (isset($this->ref_ext)) $this->ref_ext = trim($this->ref_ext); - if (isset($this->entity)) $this->entity = (int) $this->entity; - if (isset($this->statut)) $this->statut = (int) $this->statut; - if (isset($this->fk_soc)) $this->fk_soc = (int) $this->fk_soc; - if (isset($this->fk_commercial_signature)) $this->fk_commercial_signature = trim($this->fk_commercial_signature); - if (isset($this->fk_commercial_suivi)) $this->fk_commercial_suivi = trim($this->fk_commercial_suivi); - 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->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->ref_customer)) { + $this->ref_customer = trim($this->ref_customer); + } + if (isset($this->ref_supplier)) { + $this->ref_supplier = trim($this->ref_supplier); + } + if (isset($this->ref_ext)) { + $this->ref_ext = trim($this->ref_ext); + } + if (isset($this->entity)) { + $this->entity = (int) $this->entity; + } + if (isset($this->statut)) { + $this->statut = (int) $this->statut; + } + if (isset($this->fk_soc)) { + $this->fk_soc = (int) $this->fk_soc; + } + if (isset($this->fk_commercial_signature)) { + $this->fk_commercial_signature = trim($this->fk_commercial_signature); + } + if (isset($this->fk_commercial_suivi)) { + $this->fk_commercial_suivi = trim($this->fk_commercial_suivi); + } + 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->import_key)) { + $this->import_key = trim($this->import_key); + } //if (isset($this->extraparams)) $this->extraparams=trim($this->extraparams); // Check parameters @@ -1372,35 +1353,34 @@ class Contrat extends CommonObject $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null").""; //$sql.= " extraparams=".(isset($this->extraparams)?"'".$this->db->escape($this->extraparams)."'":"null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('CONTRACT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1444,14 +1424,12 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type, $pu_ttc, $info_bits, $rang"); // Check parameters - if ($fk_product <= 0 && empty($desc)) - { + if ($fk_product <= 0 && empty($desc)) { $this->error = "ErrorDescRequiredForFreeProductLines"; return -1; } - if ($this->statut >= 0) - { + if ($this->statut >= 0) { // Clean parameters $pu_ht = price2num($pu_ht); $pu_ttc = price2num($pu_ttc); @@ -1460,8 +1438,7 @@ class Contrat extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -1471,23 +1448,38 @@ class Contrat extends CommonObject $remise_percent = price2num($remise_percent); $qty = price2num($qty); - if (empty($qty)) $qty = 1; - if (empty($info_bits)) $info_bits = 0; - if (empty($pu_ht) || !is_numeric($pu_ht)) $pu_ht = 0; - if (empty($pu_ttc)) $pu_ttc = 0; - if (empty($txtva) || !is_numeric($txtva)) $txtva = 0; - if (empty($txlocaltax1) || !is_numeric($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2) || !is_numeric($txlocaltax2)) $txlocaltax2 = 0; + if (empty($qty)) { + $qty = 1; + } + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($pu_ht) || !is_numeric($pu_ht)) { + $pu_ht = 0; + } + if (empty($pu_ttc)) { + $pu_ttc = 0; + } + if (empty($txtva) || !is_numeric($txtva)) { + $txtva = 0; + } + if (empty($txlocaltax1) || !is_numeric($txlocaltax1)) { + $txlocaltax1 = 0; + } + if (empty($txlocaltax2) || !is_numeric($txlocaltax2)) { + $txlocaltax2 = 0; + } - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { $pu = $pu_ht; } else { $pu = $pu_ttc; } // Check parameters - if (empty($remise_percent)) $remise_percent = 0; + if (empty($remise_percent)) { + $remise_percent = 0; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -1518,20 +1510,19 @@ class Contrat extends CommonObject // Anciens indicateurs: $price, $remise (a ne plus utiliser) $remise = 0; $price = price2num(round($pu_ht, 2)); - if (dol_strlen($remise_percent) > 0) - { + if (dol_strlen($remise_percent) > 0) { $remise = round(($pu_ht * $remise_percent / 100), 2); $price = $pu_ht - $remise; } - if (empty($pa_ht)) $pa_ht = 0; + if (empty($pa_ht)) { + $pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) - { - if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0) - { + if ($this->pa_ht == 0) { + if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0) { return $result; } else { $pa_ht = $result; @@ -1545,8 +1536,12 @@ class Contrat extends CommonObject $sql .= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc,"; $sql .= " info_bits,"; $sql .= " price_ht, remise, fk_product_fournisseur_price, buy_price_ht"; - if ($date_start > 0) { $sql .= ",date_ouverture_prevue"; } - if ($date_end > 0) { $sql .= ",date_fin_validite"; } + if ($date_start > 0) { + $sql .= ",date_ouverture_prevue"; + } + if ($date_end > 0) { + $sql .= ",date_fin_validite"; + } $sql .= ", fk_unit"; $sql .= ") VALUES ("; $sql .= $this->id.", '', '".$this->db->escape($desc)."',"; @@ -1563,28 +1558,35 @@ class Contrat extends CommonObject $sql .= " ".price2num($total_ht).",".price2num($total_tva).",".price2num($total_localtax1).",".price2num($total_localtax2).",".price2num($total_ttc).","; $sql .= " '".$this->db->escape($info_bits)."',"; $sql .= " ".price2num($price).",".price2num($remise).","; - if (isset($fk_fournprice)) $sql .= ' '.$fk_fournprice.','; - else $sql .= ' null,'; - if (isset($pa_ht)) $sql .= ' '.price2num($pa_ht); - else $sql .= ' null'; - if ($date_start > 0) { $sql .= ",'".$this->db->idate($date_start)."'"; } - if ($date_end > 0) { $sql .= ",'".$this->db->idate($date_end)."'"; } + if (isset($fk_fournprice)) { + $sql .= ' '.$fk_fournprice.','; + } else { + $sql .= ' null,'; + } + if (isset($pa_ht)) { + $sql .= ' '.price2num($pa_ht); + } else { + $sql .= ' null'; + } + if ($date_start > 0) { + $sql .= ",'".$this->db->idate($date_start)."'"; + } + if ($date_end > 0) { + $sql .= ",'".$this->db->idate($date_end)."'"; + } $sql .= ", ".($fk_unit ? "'".$this->db->escape($fk_unit)."'" : "null"); $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $contractlineid = $this->db->last_insert_id(MAIN_DB_PREFIX."contratdet"); - if (!$error) - { + if (!$error) { $contractline = new ContratLigne($this->db); $contractline->array_options = $array_options; $contractline->id = $contractlineid; $result = $contractline->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->error[] = $contractline->error; $error++; } @@ -1593,15 +1595,13 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger $result = $this->call_trigger('LINECONTRACT_INSERT', $user); - if ($result < 0) - { + if ($result < 0) { $error++; } // End call triggers } - if ($error) - { + if ($error) { $this->db->rollback(); return -1; } else { @@ -1657,12 +1657,13 @@ class Contrat extends CommonObject $localtax1tx = price2num($localtax1tx); $localtax2tx = price2num($localtax2tx); $pa_ht = price2num($pa_ht); - if (empty($fk_fournprice)) $fk_fournprice = 0; + if (empty($fk_fournprice)) { + $fk_fournprice = 0; + } $subprice = $price; $remise = 0; - if (dol_strlen($remise_percent) > 0) - { + if (dol_strlen($remise_percent) > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } else { @@ -1701,19 +1702,18 @@ class Contrat extends CommonObject // Anciens indicateurs: $price, $remise (a ne plus utiliser) $remise = 0; $price = price2num(round($pu, 2)); - if (dol_strlen($remise_percent) > 0) - { + if (dol_strlen($remise_percent) > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } - if (empty($pa_ht)) $pa_ht = 0; + if (empty($pa_ht)) { + $pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) - { - if (($result = $this->defineBuyPrice($pu, $remise_percent)) < 0) - { + if ($this->pa_ht == 0) { + if (($result = $this->defineBuyPrice($pu, $remise_percent)) < 0) { return $result; } else { $pa_ht = $result; @@ -1738,22 +1738,35 @@ 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; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $result = $this->update_statut($user); - if ($result >= 0) - { - if (is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used - { + if ($result >= 0) { + if (is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used $contractline = new ContratLigne($this->db); $contractline->fetch($rowid); $contractline->fetch_optionals(); @@ -1764,8 +1777,7 @@ class Contrat extends CommonObject } $result = $contractline->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->error[] = $contractline->error; $error++; } @@ -1774,8 +1786,7 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger $result = $this->call_trigger('LINECONTRACT_UPDATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -3; } @@ -1810,22 +1821,22 @@ class Contrat extends CommonObject $error = 0; - if ($this->statut >= 0) - { + if ($this->statut >= 0) { // Call trigger $result = $this->call_trigger('LINECONTRACT_DELETE', $user); - if ($result < 0) return -1; + if ($result < 0) { + return -1; + } // End call triggers $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element_line; - $sql .= " WHERE rowid=".$idline; + $sql .= " WHERE rowid = ".((int) $idline); dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); $error++; } @@ -1835,8 +1846,7 @@ class Contrat extends CommonObject $contractline = new ContratLigne($this->db); $contractline->id = $idline; $result = $contractline->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = "Error ".get_class($this)."::deleteline deleteExtraFields error -4 ".$contractline->error; } @@ -1871,7 +1881,9 @@ class Contrat extends CommonObject dol_syslog(__METHOD__." is deprecated", LOG_WARNING); // If draft, we keep it (should not happen) - if ($this->statut == 0) return 1; + if ($this->statut == 0) { + return 1; + } // Load $this->lines array // $this->fetch_lines(); @@ -1910,8 +1922,7 @@ class Contrat extends CommonObject // phpcs:enable global $langs; - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load("contracts"); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('ContractStatusDraft'); @@ -1923,10 +1934,11 @@ class Contrat extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status6'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status6'; + } - if ($mode == 4 || $mode == 6 || $mode == 7) - { + if ($mode == 4 || $mode == 6 || $mode == 7) { $text = ''; if ($mode == 4) { $text = ''; @@ -1972,8 +1984,12 @@ class Contrat extends CommonObject //{ // 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'; + 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'; + } //} $label = ''; @@ -1985,7 +2001,8 @@ class Contrat extends CommonObject $label .= ' '.$this->getLibStatut(5); }*/ $label .= '
    '.$langs->trans('Ref').': '.($this->ref ? $this->ref : $this->id); - $label .= '
    '.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client); + $ref_customer = (!empty($this->ref_customer) ? $this->ref_customer : (empty($this->ref_client) ? '' : $this->ref_client)); + $label .= '
    '.$langs->trans('RefCustomer').': '.$ref_customer; $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); @@ -1999,10 +2016,8 @@ class Contrat extends CommonObject } $linkclose = ''; - if (empty($notooltip) && $user->rights->contrat->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->contrat->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowOrder"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -2015,8 +2030,12 @@ class Contrat extends CommonObject $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 ? $this->ref : $this->id); + 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 ? $this->ref : $this->id); + } $result .= $linkend; global $action; @@ -2047,10 +2066,8 @@ class Contrat extends CommonObject $sql .= " WHERE c.rowid = ".((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -2087,16 +2104,16 @@ class Contrat extends CommonObject $sql = "SELECT cd.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= " WHERE fk_contrat =".$this->id; - if ($status >= 0) $sql .= " AND statut = ".$status; + if ($status >= 0) { + $sql .= " AND statut = ".$status; + } dol_syslog(get_class($this)."::array_detail()", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $tab[$i] = $obj->rowid; $i++; @@ -2121,16 +2138,16 @@ class Contrat extends CommonObject $sql = "SELECT c.rowid, c.ref"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c"; $sql .= " WHERE fk_soc =".$this->socid; - if ($option == 'others') $sql .= " AND c.rowid != ".$this->id; + if ($option == 'others') { + $sql .= " AND c.rowid != ".$this->id; + } dol_syslog(get_class($this)."::getOtherContracts()", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $contrat = new Contrat($this->db); $contrat->fetch($obj->rowid); @@ -2161,25 +2178,24 @@ class Contrat extends CommonObject $this->from = " FROM ".MAIN_DB_PREFIX."contrat as c"; $this->from .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $this->from .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) $this->from .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) { + $this->from .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } - if ($mode == 'inactive') - { + if ($mode == 'inactive') { $sql = "SELECT cd.rowid, cd.date_ouverture_prevue as datefin"; $sql .= $this->from; $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; $sql .= " WHERE c.statut = 1"; $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; $sql .= " WHERE c.statut = 1"; @@ -2190,12 +2206,15 @@ class Contrat extends CommonObject } $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; - if ($user->socid) $sql .= " AND c.fk_soc = ".$user->socid; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($user->socid) { + $sql .= " AND c.fk_soc = ".$user->socid; + } + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $langs->load("contracts"); $now = dol_now(); @@ -2225,8 +2244,7 @@ class Contrat extends CommonObject $response->url = $url; $response->img = img_object('', "contract"); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; if ($obj->datefin && $this->db->jdate($obj->datefin) < ($now - $warning_delay)) { @@ -2259,8 +2277,7 @@ class Contrat extends CommonObject $sql = "SELECT count(c.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -2268,10 +2285,8 @@ class Contrat extends CommonObject $sql .= " ".$clause." c.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["contracts"] = $obj->nb; } $this->db->free($resql); @@ -2328,12 +2343,10 @@ class Contrat extends CommonObject $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -2359,8 +2372,7 @@ class Contrat extends CommonObject // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new ContratLigne($this->db); $line->qty = 1; $line->subprice = 100; @@ -2374,8 +2386,7 @@ class Contrat extends CommonObject $line->date_start_real = dol_now() - 200000; $line->date_end = dol_now() + 500000; $line->date_end_real = dol_now() - 100000; - if ($num_prods > 0) - { + if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; } @@ -2478,15 +2489,12 @@ class Contrat extends CommonObject // Clean data $clonedObj->statut = 0; // Clean extrafields - if (is_array($clonedObj->array_options) && count($clonedObj->array_options) > 0) - { + if (is_array($clonedObj->array_options) && count($clonedObj->array_options) > 0) { $extrafields->fetch_name_optionals_label($this->table_element); - foreach ($clonedObj->array_options as $key => $option) - { + foreach ($clonedObj->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); //var_dump($shortkey); var_dump($extrafields->attributes[$this->element]['unique'][$shortkey]); - if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) - { + if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) { //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($clonedObj->array_options[$key]); } @@ -2546,8 +2554,9 @@ class Contrat extends CommonObject ); $action = ''; $reshook = $hookmanager->executeHooks('createFrom', $parameters, $clonedObj, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) + if ($reshook < 0) { $error++; + } } } @@ -2756,12 +2765,15 @@ class ContratLigne extends CommonObjectLine } $statusType = 'status'.$status; - if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status1'; - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + if ($status == self::STATUS_OPEN && $expired == 1) { + $statusType = 'status1'; + } + if ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } $params = array(); $reg = array(); - if (preg_match('/class="(.*)"/', $moreatt, $reg)) - { + if (preg_match('/class="(.*)"/', $moreatt, $reg)) { $params = array('badgeParams'=>array('css' => $reg[1])); } return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode, '', $params); @@ -2780,17 +2792,27 @@ class ContratLigne extends CommonObjectLine $result = ''; $label = $langs->trans("ShowContractOfService").': '.$this->label; - if (empty($label)) $label = $this->description; + if (empty($label)) { + $label = $this->description; + } $link = ''; $linkend = ''; $picto = 'service'; - if ($this->type == 0) $picto = 'product'; + if ($this->type == 0) { + $picto = 'product'; + } - if ($withpicto) $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($this->product_ref ? $this->product_ref.' ' : '').($this->label ? $this->label : $this->description).$linkend; + if ($withpicto) { + $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.($this->product_ref ? $this->product_ref.' ' : '').($this->label ? $this->label : $this->description).$linkend; + } return $result; } @@ -2804,7 +2826,9 @@ class ContratLigne extends CommonObjectLine public function fetch($id, $ref = '') { // Check parameters - if (empty($id) && empty($ref)) return -1; + if (empty($id) && empty($ref)) { + return -1; + } $sql = "SELECT"; $sql .= " t.rowid,"; @@ -2849,15 +2873,17 @@ class ContratLigne extends CommonObjectLine $sql .= " t.commentaire,"; $sql .= " t.fk_unit"; $sql .= " FROM ".MAIN_DB_PREFIX."contratdet as t LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = t.fk_product"; - if ($id) $sql .= " WHERE t.rowid = ".$id; - if ($ref) $sql .= " WHERE t.rowid = '".$this->db->escape($ref)."'"; + if ($id) { + $sql .= " WHERE t.rowid = ".((int) $id); + } + if ($ref) { + $sql .= " WHERE t.rowid = '".$this->db->escape($ref)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -2966,18 +2992,40 @@ class ContratLigne extends CommonObjectLine $this->fk_user_cloture = (int) $this->fk_user_cloture; $this->commentaire = trim($this->commentaire); //if (empty($this->subprice)) $this->subprice = 0; - if (empty($this->price_ht)) $this->price_ht = 0; - if (empty($this->total_ht)) $this->total_ht = 0; - if (empty($this->total_tva)) $this->total_tva = 0; - if (empty($this->total_ttc)) $this->total_ttc = 0; - if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; - if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; - if (empty($this->remise_percent)) $this->remise_percent = 0; + if (empty($this->price_ht)) { + $this->price_ht = 0; + } + if (empty($this->total_ht)) { + $this->total_ht = 0; + } + if (empty($this->total_tva)) { + $this->total_tva = 0; + } + if (empty($this->total_ttc)) { + $this->total_ttc = 0; + } + if (empty($this->localtax1_tx)) { + $this->localtax1_tx = 0; + } + if (empty($this->localtax2_tx)) { + $this->localtax2_tx = 0; + } + if (empty($this->remise_percent)) { + $this->remise_percent = 0; + } // For backward compatibility - if (empty($this->date_start)) $this->date_start = $this->date_ouverture_prevue; - if (empty($this->date_start_real)) $this->date_start = $this->date_ouverture; - if (empty($this->date_end)) $this->date_start = $this->date_fin_validite; - if (empty($this->date_end_real)) $this->date_start = $this->date_cloture; + if (empty($this->date_start)) { + $this->date_start = $this->date_ouverture_prevue; + } + if (empty($this->date_start_real)) { + $this->date_start = $this->date_ouverture; + } + if (empty($this->date_end)) { + $this->date_start = $this->date_fin_validite; + } + if (empty($this->date_end_real)) { + $this->date_start = $this->date_cloture; + } // Check parameters @@ -2996,13 +3044,13 @@ class ContratLigne extends CommonObjectLine $this->total_localtax1 = $tabprice[9]; $this->total_localtax2 = $tabprice[10]; - if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -3051,50 +3099,42 @@ class ContratLigne extends CommonObjectLine $sql .= " fk_user_cloture=".($this->fk_user_cloture > 0 ? $this->fk_user_cloture : "NULL").","; $sql .= " commentaire='".$this->db->escape($this->commentaire)."',"; $sql .= " fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); $error++; } - if (!$error) // For avoid conflicts if trigger used - { + if (!$error) { // For avoid conflicts if trigger used $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } // If we change a planned date (start or end), sync dates for all services - if (!$error && !empty($conf->global->CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES)) - { - if ($this->date_ouverture_prevue != $this->oldcopy->date_ouverture_prevue) - { + if (!$error && !empty($conf->global->CONTRACT_SYNC_PLANNED_DATE_OF_SERVICES)) { + if ($this->date_ouverture_prevue != $this->oldcopy->date_ouverture_prevue) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'contratdet SET'; $sql .= " date_ouverture_prevue = ".($this->date_ouverture_prevue != '' ? "'".$this->db->idate($this->date_ouverture_prevue)."'" : "null"); $sql .= " WHERE fk_contrat = ".$this->fk_contrat; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = "Error ".$this->db->lasterror(); } } - if ($this->date_fin_validite != $this->oldcopy->date_fin_validite) - { + if ($this->date_fin_validite != $this->oldcopy->date_fin_validite) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'contratdet SET'; $sql .= " date_fin_validite = ".($this->date_fin_validite != '' ? "'".$this->db->idate($this->date_fin_validite)."'" : "null"); $sql .= " WHERE fk_contrat = ".$this->fk_contrat; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = "Error ".$this->db->lasterror(); } @@ -3111,8 +3151,7 @@ class ContratLigne extends CommonObjectLine // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -3147,8 +3186,7 @@ class ContratLigne extends CommonObjectLine dol_syslog(get_class($this)."::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -3178,8 +3216,12 @@ class ContratLigne extends CommonObjectLine $sql .= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc,"; $sql .= " info_bits,"; $sql .= " price_ht, remise, fk_product_fournisseur_price, buy_price_ht"; - if ($this->date_ouverture_prevue > 0) { $sql .= ",date_ouverture_prevue"; } - if ($this->date_fin_validite > 0) { $sql .= ",date_fin_validite"; } + if ($this->date_ouverture_prevue > 0) { + $sql .= ",date_ouverture_prevue"; + } + if ($this->date_fin_validite > 0) { + $sql .= ",date_fin_validite"; + } $sql .= ") VALUES ($this->fk_contrat, '', '".$this->db->escape($this->description)."',"; $sql .= ($this->fk_product > 0 ? $this->fk_product : "null").","; $sql .= " '".$this->db->escape($this->qty)."',"; @@ -3193,34 +3235,40 @@ class ContratLigne extends CommonObjectLine $sql .= " ".price2num($this->total_ht).",".price2num($this->total_tva).",".price2num($this->total_localtax1).",".price2num($this->total_localtax2).",".price2num($this->total_ttc).","; $sql .= " '".$this->db->escape($this->info_bits)."',"; $sql .= " ".price2num($this->price_ht).",".price2num($this->remise).","; - if ($this->fk_fournprice > 0) $sql .= ' '.$this->fk_fournprice.','; - else $sql .= ' null,'; - if ($this->pa_ht > 0) $sql .= ' '.price2num($this->pa_ht); - else $sql .= ' null'; - if ($this->date_ouverture > 0) { $sql .= ",'".$this->db->idate($this->date_ouverture)."'"; } - if ($this->date_cloture > 0) { $sql .= ",'".$this->db->idate($this->date_cloture)."'"; } + if ($this->fk_fournprice > 0) { + $sql .= ' '.$this->fk_fournprice.','; + } else { + $sql .= ' null,'; + } + if ($this->pa_ht > 0) { + $sql .= ' '.price2num($this->pa_ht); + } else { + $sql .= ' null'; + } + if ($this->date_ouverture > 0) { + $sql .= ",'".$this->db->idate($this->date_ouverture)."'"; + } + if ($this->date_cloture > 0) { + $sql .= ",'".$this->db->idate($this->date_cloture)."'"; + } $sql .= ")"; dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'contratdet'); // Insert of extrafields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } } - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINECONTRACT_INSERT', $user); if ($result < 0) { @@ -3260,7 +3308,9 @@ class ContratLigne extends CommonObjectLine $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = ".ContratLigne::STATUS_OPEN.","; $sql .= " date_ouverture = ".(dol_strlen($date) != 0 ? "'".$this->db->idate($date)."'" : "null").","; - if ($date_end >= 0) $sql .= " date_fin_validite = ".(dol_strlen($date_end) != 0 ? "'".$this->db->idate($date_end)."'" : "null").","; + if ($date_end >= 0) { + $sql .= " date_fin_validite = ".(dol_strlen($date_end) != 0 ? "'".$this->db->idate($date_end)."'" : "null").","; + } $sql .= " fk_user_ouverture = ".$user->id.","; $sql .= " date_cloture = null,"; $sql .= " commentaire = '".$this->db->escape($comment)."'"; @@ -3271,11 +3321,12 @@ class ContratLigne extends CommonObjectLine if ($resql) { // Call trigger $result = $this->call_trigger('LINECONTRACT_ACTIVATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->statut = ContratLigne::STATUS_OPEN; $this->date_ouverture = $date; $this->date_fin_validite = $date_end; @@ -3329,10 +3380,8 @@ class ContratLigne extends CommonObjectLine $sql .= " WHERE rowid = ".$this->id." AND statut = ".ContratLigne::STATUS_OPEN; $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { + if ($resql) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINECONTRACT_CLOSE', $user); if ($result < 0) { diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index c837769819a..3d0be4d9552 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -43,7 +43,9 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $id); $object = new Contrat($db); @@ -56,19 +58,16 @@ $hookmanager->initHooks(array('contractcard', 'globalcard')); * Actions */ -if ($action == 'addcontact' && $user->rights->contrat->creer) -{ +if ($action == 'addcontact' && $user->rights->contrat->creer) { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -84,24 +83,20 @@ if ($action == 'addcontact' && $user->rights->contrat->creer) } // bascule du statut d'un contact -if ($action == 'swapstatut' && $user->rights->contrat->creer) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +if ($action == 'swapstatut' && $user->rights->contrat->creer) { + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db, $object->error); } } // Delete contact -if ($action == 'deletecontact' && $user->rights->contrat->creer) -{ +if ($action == 'deletecontact' && $user->rights->contrat->creer) { $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -125,10 +120,8 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); $head = contract_prepare_head($object); @@ -146,9 +139,9 @@ if ($id > 0 || !empty($ref)) //if (! empty($modCodeContract->code_auto)) { $morehtmlref .= $object->ref; /*} else { - $morehtmlref.=$form->editfieldkey("",'ref',$object->ref,0,'string','',0,3); - $morehtmlref.=$form->editfieldval("",'ref',$object->ref,0,'string','',0,2); - }*/ + $morehtmlref.=$form->editfieldkey("",'ref',$object->ref,0,'string','',0,3); + $morehtmlref.=$form->editfieldval("",'ref',$object->ref,0,'string','',0,2); + }*/ $morehtmlref .= '
    '; // Ref customer @@ -213,8 +206,11 @@ if ($id > 0 || !empty($ref)) } $absolute_discount = $object->thirdparty->getAvailableDiscounts(); print '. '; - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); - else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($absolute_discount) { + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + } else { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + } print '.'; print ''; diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 4600f17e206..1dd87fd75e3 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -46,8 +46,7 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { unset($_GET["action"]); $action = ''; $socid = $user->socid; @@ -59,18 +58,23 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Contrat($db); $object->fetch($id, $ref); -if ($object->id > 0) -{ +if ($object->id > 0) { $object->fetch_thirdparty(); } @@ -85,7 +89,7 @@ $hookmanager->initHooks(array('contractcard', 'globalcard')); * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -97,8 +101,7 @@ $form = new Form($db); llxHeader('', $langs->trans("Contract"), ""); -if ($object->id) -{ +if ($object->id) { $head = contract_prepare_head($object); print dol_get_fiche_head($head, 'documents', $langs->trans("Contract"), -1, 'contract'); @@ -107,8 +110,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -136,17 +138,18 @@ if ($object->id) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->contrat->creer) - { - if ($action != 'classify') + if ($user->rights->contrat->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 .= ''; diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 5ea558c9689..aed4cba2fe1 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -46,7 +46,9 @@ $statut = GETPOST('statut') ?GETPOST('statut') : 1; // Security check $socid = 0; $id = GETPOST('id', 'int'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $id); $staticcompany = new Societe($db); @@ -73,31 +75,9 @@ llxHeader(); print load_fiche_titre($langs->trans("ContractsArea"), '', 'contract'); -//print '
    '; -//print ''; print ''; print ''; - if ($conf->global->MARGIN_TYPE == "1") + if ($conf->global->MARGIN_TYPE == "1") { print ''; - else print ''; + } else { + print ''; + } print ''; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print ''; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print ''; + } print ''; - if (!empty($conf->product->enabled)) - { + if (!empty($conf->product->enabled)) { //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { print ''; print ''; print ''; print ''; print ''; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print ''; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print ''; + } print ''; } - if (!empty($conf->service->enabled)) - { + if (!empty($conf->service->enabled)) { print ''; print ''; print ''; print ''; print ''; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print ''; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print ''; + } print ''; } - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) - { + if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { print ''; print ''; print ''; print ''; print ''; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print ''; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print ''; + } print ''; } print '
    '; print '
    '; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - // Search contract - if (!empty($conf->contrat->enabled)) - { - print ''; - print ''; - - print '
    '; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
    '.$langs->trans("Search").'
    '.$langs->trans("Contract").':
    \n"; - print "
    "; - } -} - - /* * Statistics */ @@ -112,26 +92,28 @@ $vals = array(); $sql = "SELECT count(cd.rowid) as nb, cd.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; $sql .= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate($now)."')))"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; -if ($user->socid) $sql .= ' AND c.fk_soc = '.$user->socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($user->socid) { + $sql .= ' AND c.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 cd.statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $nb[$obj->status] = $obj->nb; - if ($obj->status != 5) - { + if ($obj->status != 5) { $vals[$obj->status] = $obj->nb; $totalinprocess += $obj->nb; } @@ -147,28 +129,30 @@ if ($resql) $sql = "SELECT count(cd.rowid) as nb, cd.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; $sql .= " AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now)."')"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; -if ($user->socid) $sql .= ' AND c.fk_soc = '.$user->socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($user->socid) { + $sql .= ' AND c.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 cd.statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); // 0 inactive, 4 active, 5 closed $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $nb[$obj->status.true] = $obj->nb; - if ($obj->status != 5) - { + if ($obj->status != 5) { $vals[$obj->status.true] = $obj->nb; $totalinprocess += $obj->nb; } @@ -183,32 +167,40 @@ if ($resql) $colorseries = array(); -include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; +include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '
    '; print ''; print ''."\n"; $listofstatus = array(0, 4, 4, 5); $bool = false; -foreach ($listofstatus as $status) -{ +foreach ($listofstatus as $status) { $dataseries[] = array($staticcontratligne->LibStatut($status, 1, ($bool ? 1 : 0)), (isset($nb[$status.$bool]) ? (int) $nb[$status.$bool] : 0)); - if ($status == ContratLigne::STATUS_INITIAL) $colorseries[$status.$bool] = '-'.$badgeStatus0; - if ($status == ContratLigne::STATUS_OPEN && !$bool) $colorseries[$status.$bool] = $badgeStatus4; - if ($status == ContratLigne::STATUS_OPEN && $bool) $colorseries[$status.$bool] = $badgeStatus1; - if ($status == ContratLigne::STATUS_CLOSED) $colorseries[$status.$bool] = $badgeStatus6; + if ($status == ContratLigne::STATUS_INITIAL) { + $colorseries[$status.$bool] = '-'.$badgeStatus0; + } + if ($status == ContratLigne::STATUS_OPEN && !$bool) { + $colorseries[$status.$bool] = $badgeStatus4; + } + if ($status == ContratLigne::STATUS_OPEN && $bool) { + $colorseries[$status.$bool] = $badgeStatus1; + } + if ($status == ContratLigne::STATUS_CLOSED) { + $colorseries[$status.$bool] = $badgeStatus6; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print ''; print ''; print ''; print "\n"; } - if ($status == 4 && !$bool) $bool = true; - else $bool = false; + if ($status == 4 && !$bool) { + $bool = true; + } else { + $bool = false; + } } -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print ''; } $listofstatus = array(0, 4, 4, 5); $bool = false; -foreach ($listofstatus as $status) -{ - if (empty($conf->use_javascript_ajax)) - { +foreach ($listofstatus as $status) { + if (empty($conf->use_javascript_ajax)) { print ''; print ''; print ''; - if ($status == 4 && !$bool) $bool = true; - else $bool = false; + if ($status == 4 && !$bool) { + $bool = true; + } else { + $bool = false; + } print "\n"; } } -//if ($totalinprocess != $total) -//print ''; print ''; print "
    '.$langs->trans("Statistics").' - '.$langs->trans("Services").'
    '.$staticcontratligne->LibStatut($status, 0, ($bool ? 1 : 0)).''.($nb[$status.$bool] ? $nb[$status.$bool] : 0).' '.$staticcontratligne->LibStatut($status, 3, ($bool ? 1 : 0)).'
    '; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -225,56 +217,57 @@ if (!empty($conf->use_javascript_ajax)) print '
    '.$staticcontratligne->LibStatut($status, 0, ($bool ? 1 : 0)).''.($nb[$status.$bool] ? $nb[$status.$bool] : 0).' '.$staticcontratligne->LibStatut($status, 3, ($bool ? 1 : 0)).'
    '.$langs->trans("Total").' ('.$langs->trans("ServicesRunning").')'.$totalinprocess.'
    '.$langs->trans("Total").''.$total.'

    "; // Draft contracts -if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) -{ +if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $sql = "SELECT c.rowid, c.ref,"; $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE s.rowid = c.fk_soc"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND c.statut = 0"; - 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; + 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; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '
    '; print ''; print ''; print ''; - if ($num) - { + if ($num) { $companystatic = new Societe($db); $i = 0; //$tot_ttc = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $staticcontrat->ref = $obj->ref; @@ -305,7 +298,6 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) } -//print ''; print "\n"; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); print ''; @@ -356,7 +352,9 @@ if ($result) $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid); $staticcontrat->id = $obj->cid; print $staticcontrat->getNomUrl(1, 16); - if ($obj->nb_late) print img_warning($langs->trans("Late")); + if ($obj->nb_late) { + print img_warning($langs->trans("Late")); + } print ''; print ''; print "\n"; - while ($i < min($num, $max)) - { + while ($i < min($num, $max)) { $obj = $db->fetch_object($resql); print ''; @@ -422,8 +424,7 @@ if ($resql) //if (1 == 1) print img_warning($langs->trans("Late")); print ''; print ''; print ''; print "\n"; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; @@ -498,8 +506,7 @@ if ($resql) print $staticcontrat->getNomUrl(1, 16); print ''; print ''; print ''; print "\n"; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; @@ -574,8 +588,7 @@ if ($resql) print $staticcontrat->getNomUrl(1, 16); print ''; print ''; print '
    '.$langs->trans("DraftContracts").($num ? ''.$num.'' : '').'
    '; print '
    '; @@ -319,22 +311,27 @@ $sql .= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AN $sql .= ' sum('.$db->ifsql("cd.statut=5", 1, 0).') as nb_closed,'; $sql .= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; +} $sql .= " ".MAIN_DB_PREFIX."contrat as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND c.statut > 0"; -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; +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 = ".((int) $socid); +} $sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid"; $sql .= " ORDER BY c.tms DESC"; -$sql .= " LIMIT ".$max; +$sql .= $db->plimit($max); dol_syslog("contrat/index.php", LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -347,8 +344,7 @@ if ($result) print '
    '.$langs->trans("Services").'
    '; $staticcompany->id = $obj->socid; @@ -388,19 +386,24 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= ") LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql .= " WHERE c.entity IN (".getEntity('contract', 0).")"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -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; +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 = ".((int) $socid); +} $sql .= " ORDER BY cd.tms DESC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -410,8 +413,7 @@ if ($resql) print '
    '.$langs->trans("LastModifiedServices", $max).'
    '; - if ($obj->fk_product > 0) - { + if ($obj->fk_product > 0) { $productstatic->id = $obj->fk_product; $productstatic->type = $obj->ptype; $productstatic->ref = $obj->pref; @@ -431,8 +432,11 @@ if ($resql) print $productstatic->getNomUrl(1, '', 20); } else { print ''.img_object($langs->trans("ShowService"), "service"); - if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; - else print ' '.dol_trunc($obj->note, 20); + if ($obj->label) { + print ' '.dol_trunc($obj->label, 20).''; + } else { + print ' '.dol_trunc($obj->note, 20); + } } print ''; @@ -462,7 +466,9 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql .= " WHERE c.entity IN (".getEntity('contract', 0).")"; @@ -470,13 +476,16 @@ $sql .= " AND c.statut = 1"; $sql .= " AND cd.statut = 0"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -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; +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 = ".((int) $socid); +} $sql .= " ORDER BY cd.tms DESC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -486,8 +495,7 @@ if ($resql) print '
    '.$langs->trans("NotActivatedServices").' '.$num.'
    '; - if ($obj->fk_product > 0) - { + if ($obj->fk_product > 0) { $productstatic->id = $obj->fk_product; $productstatic->type = $obj->ptype; $productstatic->ref = $obj->pref; @@ -507,8 +514,11 @@ if ($resql) print $productstatic->getNomUrl(1, '', 20); } else { print ''.img_object($langs->trans("ShowService"), "service"); - if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; - else print ' '.dol_trunc($obj->note, 20); + if ($obj->label) { + print ' '.dol_trunc($obj->label, 20).''; + } else { + print ' '.dol_trunc($obj->note, 20); + } } print ''; @@ -537,7 +547,9 @@ $sql .= " s.nom as name,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity"; $sql .= " FROM (".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= " ) LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; $sql .= " WHERE c.entity IN (".getEntity('contract', 0).")"; @@ -546,13 +558,16 @@ $sql .= " AND cd.statut = 4"; $sql .= " AND cd.date_fin_validite < '".$db->idate($now)."'"; $sql .= " AND cd.fk_contrat = c.rowid"; $sql .= " AND c.fk_soc = s.rowid"; -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; +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 = ".((int) $socid); +} $sql .= " ORDER BY cd.tms DESC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -562,8 +577,7 @@ if ($resql) print '
    '.$langs->trans("ListOfExpiredServices").' '.$num.'
    '; - if ($obj->fk_product > 0) - { + if ($obj->fk_product > 0) { $productstatic->id = $obj->fk_product; $productstatic->type = $obj->ptype; $productstatic->ref = $obj->pref; @@ -583,8 +596,11 @@ if ($resql) print $productstatic->getNomUrl(1, '', 20); } else { print ''.img_object($langs->trans("ShowService"), "service"); - if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; - else print ' '.dol_trunc($obj->note, 20); + if ($obj->label) { + print ' '.dol_trunc($obj->label, 20).''; + } else { + print ' '.dol_trunc($obj->note, 20); + } } print ''; @@ -606,7 +622,6 @@ if ($resql) } -//print '
    '; print '
    '; $parameters = array('user' => $user); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index f9c537aea2f..51b61c41830 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -33,6 +33,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -75,16 +76,24 @@ $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 (!$sortfield) $sortfield = 'c.ref'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'c.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // Security check $id = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $id); $diroutputmassaction = $conf->contrat->dir_output.'/temp/massgeneration/'.$user->id; @@ -92,7 +101,9 @@ $diroutputmassaction = $conf->contrat->dir_output.'/temp/massgeneration/'.$user- $staticcontrat = new Contrat($db); $staticcontratligne = new ContratLigne($db); -if ($search_status == '') $search_status = 1; +if ($search_status == '') { + $search_status = 1; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Contrat($db); @@ -111,7 +122,9 @@ $fieldstosearchall = array( 's.nom'=>"ThirdParty", 'c.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["c.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["c.note_private"] = "NotePrivate"; +} $arrayfields = array( 'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>10), @@ -141,18 +154,23 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Action */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 test are required to be compatible with all browsers -{ +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 $day = ''; $month = ''; $year = ''; @@ -175,11 +193,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $sall = ""; $search_status = ""; $toselect = ''; + $search_type_thirdparty = ''; $search_array_options = array(); } -if (empty($reshook)) -{ +if (empty($reshook)) { $objectclass = 'Contrat'; $objectlabel = 'Contracts'; $permissiontoread = $user->rights->contrat->lire; @@ -198,6 +216,7 @@ $form = new Form($db); $formfile = new FormFile($db); $formother = new FormOther($db); $socstatic = new Societe($db); +$formcompany = new FormCompany($db); $contracttmp = new Contrat($db); $sql = 'SELECT'; @@ -213,7 +232,9 @@ $sql .= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AN $sql .= ' SUM('.$db->ifsql("cd.statut=5", 1, 0).') as nb_closed'; // 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(); @@ -223,33 +244,60 @@ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; -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 (c.rowid = ef.fk_object)"; +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 (c.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; -if ($search_user > 0) -{ +if ($search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } $sql .= " WHERE c.fk_soc = s.rowid "; $sql .= ' AND c.entity IN ('.getEntity('contract').')'; -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; -if ($socid) $sql .= " AND s.rowid = ".$db->escape($socid); -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; +} +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$search_product_category; +} +if ($socid) { + $sql .= " AND s.rowid = ".$db->escape($socid); +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= dolSqlDateFilter('c.date_contrat', $day, $month, $year); -if ($search_name) $sql .= natural_search('s.nom', $search_name); -if ($search_email) $sql .= natural_search('s.email', $search_email); -if ($search_contract) $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract); -if (!empty($search_ref_customer)) $sql .= natural_search(array('c.ref_customer'), $search_ref_customer); -if (!empty($search_ref_supplier)) $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier); -if ($search_sale > 0) -{ +if ($search_name) { + $sql .= natural_search('s.nom', $search_name); +} +if ($search_email) { + $sql .= natural_search('s.email', $search_email); +} +if ($search_contract) { + $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract); +} +if (!empty($search_ref_customer)) { + $sql .= natural_search(array('c.ref_customer'), $search_ref_customer); +} +if (!empty($search_ref_supplier)) { + $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier); +} +if ($search_sale > 0) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; } -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($search_user > 0) { + $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -262,35 +310,36 @@ $sql .= " typent.code,"; $sql .= " state.code_departement, state.nom"; // 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 : ''); + 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; -if ($search_dfyear > 0 && $search_op2df) -{ - if ($search_op2df == '<=') $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."'"; - elseif ($search_op2df == '>=') $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'"; - else $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."' AND MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'"; +if ($search_dfyear > 0 && $search_op2df) { + if ($search_op2df == '<=') { + $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."'"; + } elseif ($search_op2df == '>=') { + $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'"; + } else { + $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."' AND MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'"; + } } $sql .= $db->order($sortfield, $sortorder); -//print $sql; $totalnboflines = 0; $result = $db->query($sql); -if ($result) -{ +if ($result) { $totalnboflines = $db->num_rows($result); } $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -299,8 +348,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; } @@ -308,8 +356,7 @@ if (!$resql) $num = $db->num_rows($resql); // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall && !$page) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/contrat/card.php?id='.$id); @@ -326,49 +373,93 @@ $i = 0; $arrayofselected = is_array($toselect) ? $toselect : array(); -if ($socid > 0) -{ +if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); - if (empty($search_name)) $search_name = $soc->name; + if (empty($search_name)) { + $search_name = $soc->name; + } } $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 ($search_contract != '') $param .= '&search_contract='.urlencode($search_contract); -if ($search_name != '') $param .= '&search_name='.urlencode($search_name); -if ($search_email != '') $param .= '&search_email='.urlencode($search_email); -if ($search_ref_customer != '') $param .= '&search_ref_customer='.urlencode($search_ref_customer); -if ($search_ref_supplier != '') $param .= '&search_ref_supplier='.urlencode($search_ref_supplier); -if ($search_op2df != '') $param .= '&search_op2df='.urlencode($search_op2df); -if ($search_dfyear != '') $param .= '&search_dfyear='.urlencode($search_dfyear); -if ($search_dfmonth != '') $param .= '&search_dfmonth='.urlencode($search_dfmonth); -if ($search_sale != '') $param .= '&search_sale='.urlencode($search_sale); -if ($search_user != '') $param .= '&search_user='.urlencode($search_user); -if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); -if ($show_files) $param .= '&show_files='.urlencode($show_files); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +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 ($search_contract != '') { + $param .= '&search_contract='.urlencode($search_contract); +} +if ($search_name != '') { + $param .= '&search_name='.urlencode($search_name); +} +if ($search_email != '') { + $param .= '&search_email='.urlencode($search_email); +} +if ($search_ref_customer != '') { + $param .= '&search_ref_customer='.urlencode($search_ref_customer); +} +if ($search_ref_supplier != '') { + $param .= '&search_ref_supplier='.urlencode($search_ref_supplier); +} +if ($search_op2df != '') { + $param .= '&search_op2df='.urlencode($search_op2df); +} +if ($search_dfyear != '') { + $param .= '&search_dfyear='.urlencode($search_dfyear); +} +if ($search_dfmonth != '') { + $param .= '&search_dfmonth='.urlencode($search_dfmonth); +} +if ($search_sale != '') { + $param .= '&search_sale='.urlencode($search_sale); +} +if ($search_user != '') { + $param .= '&search_user='.urlencode($search_user); +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); +} +if ($search_product_category != '') { + $param .= '&search_product_category='.urlencode($search_product_category); +} +if ($show_files) { + $param .= '&show_files='.urlencode($show_files); +} +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( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->contrat->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $url = DOL_URL_ROOT.'/contrat/card.php?action=create'; -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', $url, '', $user->rights->contrat->creer); print '
    '; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -384,49 +475,49 @@ $objecttmp = new Contrat($db); $trackid = 'con'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } $moreforfilter = ''; // If the user can view prospects other than his' -if ($user->rights->societe->client->voir || $socid) -{ +if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); + $tmpttile = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmpttile, 'maxwidth250'); $moreforfilter .= '
    '; } // If the user can view other users -if ($user->rights->user->user->lire) -{ +if ($user->rights->user->user->lire) { $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); - $moreforfilter .= '
    '; + $tmpttile = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmpttile, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); + $moreforfilter .= ''; } // If the user can view categories of products -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($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 .= '
    '; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; + $tmpttile = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmpttile, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 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 (empty($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -434,77 +525,75 @@ if (!empty($moreforfilter)) $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); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '
    '; print ''."\n"; print ''; -if (!empty($arrayfields['c.ref']['checked'])) -{ +if (!empty($arrayfields['c.ref']['checked'])) { print ''; } -if (!empty($arrayfields['c.ref_customer']['checked'])) -{ +if (!empty($arrayfields['c.ref_customer']['checked'])) { print ''; } -if (!empty($arrayfields['c.ref_supplier']['checked'])) -{ +if (!empty($arrayfields['c.ref_supplier']['checked'])) { print ''; } -if (!empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['s.nom']['checked'])) { print ''; } -if (!empty($arrayfields['s.email']['checked'])) -{ +if (!empty($arrayfields['s.email']['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'])) -{ +if (!empty($arrayfields['state.nom']['checked'])) { print ''; } // Country -if (!empty($arrayfields['country.code_iso']['checked'])) -{ +if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; } // Company type -if (!empty($arrayfields['typent.code']['checked'])) -{ +if (!empty($arrayfields['typent.code']['checked'])) { print ''; } -if (!empty($arrayfields['sale_representative']['checked'])) -{ +if (!empty($arrayfields['sale_representative']['checked'])) { print ''; } -if (!empty($arrayfields['c.date_contrat']['checked'])) -{ +if (!empty($arrayfields['c.date_contrat']['checked'])) { // Date contract print ''; } // Date modification -if (!empty($arrayfields['c.tms']['checked'])) -{ +if (!empty($arrayfields['c.tms']['checked'])) { print ''; } // First end date -if (!empty($arrayfields['lower_planned_end_date']['checked'])) -{ +if (!empty($arrayfields['lower_planned_end_date']['checked'])) { print ''; } // Status -if (!empty($arrayfields['status']['checked'])) -{ +if (!empty($arrayfields['status']['checked'])) { print ''; } print ''; print "\n"; print ''; -if (!empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['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['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['c.ref']['checked'])) { + print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['c.ref_customer']['checked'])) { + print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['c.ref_supplier']['checked'])) { + print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.email']['checked'])) { + print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['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['sale_representative']['checked'])) { + print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['c.date_contrat']['checked'])) { + print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", $param, '', $sortfield, $sortorder, 'center '); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -594,8 +703,7 @@ $totalarray = array(); $typenArray = array(); $cacheCountryIDCode = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $contracttmp->ref = $obj->ref; @@ -628,11 +736,12 @@ while ($i < min($num, $limit)) print ''; // Ref - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print ''; } - if (!empty($arrayfields['c.ref_customer']['checked'])) - { + if (!empty($arrayfields['c.ref_customer']['checked'])) { print ''; } - if (!empty($arrayfields['c.ref_supplier']['checked'])) - { + if (!empty($arrayfields['c.ref_supplier']['checked'])) { print ''; } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print ''; } - if (!empty($arrayfields['s.email']['checked'])) - { + if (!empty($arrayfields['s.email']['checked'])) { print ''; } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.town']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['sale_representative']['checked'])) - { + if (!empty($arrayfields['sale_representative']['checked'])) { // Sales representatives print ''; } // Date - if (!empty($arrayfields['c.date_contrat']['checked'])) - { + if (!empty($arrayfields['c.date_contrat']['checked'])) { print ''; } // Extra fields @@ -759,32 +874,34 @@ while ($i < min($num, $limit)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['c.datec']['checked'])) - { + if (!empty($arrayfields['c.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['c.tms']['checked'])) - { + if (!empty($arrayfields['c.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date lower end date - if (!empty($arrayfields['lower_planned_end_date']['checked'])) - { + if (!empty($arrayfields['lower_planned_end_date']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['status']['checked'])) - { + if (!empty($arrayfields['status']['checked'])) { print ''; print ''; print ''; @@ -792,14 +909,17 @@ while ($i < min($num, $limit)) } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; $i++; @@ -816,7 +936,9 @@ print ''; print ''; $hidegeneratedfilelistifempty = 1; -if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; +if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; +} // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index c9000c4fb0d..bd96eac7b0d 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -41,7 +41,9 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $id); $object = new Contrat($db); @@ -70,8 +72,7 @@ llxHeader('', $langs->trans("Contract"), ""); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = contract_prepare_head($object); @@ -89,9 +90,9 @@ if ($id > 0 || !empty($ref)) //if (! empty($modCodeContract->code_auto)) { $morehtmlref .= $object->ref; /*} else { - $morehtmlref.=$form->editfieldkey("",'ref',$object->ref,0,'string','',0,3); - $morehtmlref.=$form->editfieldval("",'ref',$object->ref,0,'string','',0,2); - }*/ + $morehtmlref.=$form->editfieldkey("",'ref',$object->ref,0,'string','',0,3); + $morehtmlref.=$form->editfieldval("",'ref',$object->ref,0,'string','',0,2); + }*/ $morehtmlref .= '
    '; // Ref customer @@ -104,15 +105,14 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->contrat->creer) - { - if ($action != 'classify') + if ($user->rights->contrat->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 .= '
    '; @@ -150,12 +150,18 @@ if ($id > 0 || !empty($ref)) // Ligne info remises tiers print '
    '; @@ -174,6 +180,7 @@ if ($id > 0 || !empty($ref)) //print '
    '; + $cssclass='fieldtitle'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; print dol_get_fiche_end(); diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 4de651a24f9..a0ecc6b4be8 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -39,12 +39,18 @@ $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 (!$sortfield) $sortfield = "c.rowid"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "c.rowid"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $mode = GETPOST("mode"); $filter = GETPOST("filter"); @@ -90,22 +96,32 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Security check $contratid = GETPOST('id', 'int'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'contrat', $contratid); -if ($search_status != '') -{ +if ($search_status != '') { $tmp = explode('&', $search_status); $mode = $tmp[0]; - if (empty($tmp[1])) $filter = ''; - else { - if ($tmp[1] == 'filter=notexpired') $filter = 'notexpired'; - if ($tmp[1] == 'filter=expired') $filter = 'expired'; + if (empty($tmp[1])) { + $filter = ''; + } else { + if ($tmp[1] == 'filter=notexpired') { + $filter = 'notexpired'; + } + if ($tmp[1] == 'filter=expired') { + $filter = 'expired'; + } } } else { $search_status = $mode; - if ($filter == 'expired') $search_status .= '&filter=expired'; - if ($filter == 'notexpired') $search_status .= '&filter=notexpired'; + if ($filter == 'expired') { + $search_status .= '&filter=expired'; + } + if ($filter == 'notexpired') { + $search_status .= '&filter=notexpired'; + } } $staticcontrat = new Contrat($db); @@ -113,21 +129,21 @@ $staticcontratligne = new ContratLigne($db); $companystatic = new Societe($db); $arrayfields = array( - 'c.ref'=>array('label'=>$langs->trans("Contract"), 'checked'=>1, 'position'=>80), - 'p.description'=>array('label'=>$langs->trans("Service"), 'checked'=>1, 'position'=>80), - 'cd.qty'=>array('label'=>$langs->trans("Qty"), 'checked'=>0, 'position'=>100), - 'cd.total_ht'=>array('label'=>$langs->trans("TotalHT"), 'checked'=>0, 'position'=>100), - 'cd.total_tva'=>array('label'=>$langs->trans("TotalVAT"), 'checked'=>0, 'position'=>100), - 'cd.tva_tx'=>array('label'=>$langs->trans("VAT"), 'checked'=>0, 'position'=>100), - 'cd.subprice'=>array('label'=>$langs->trans("PriceUHT"), 'checked'=>0, 'position'=>100), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>100), - 'cd.date_ouverture_prevue'=>array('label'=>$langs->trans("DateStartPlannedShort"), 'checked'=>(($mode == "" || $mode == -1) || $mode == "0")), - 'cd.date_ouverture'=>array('label'=>$langs->trans("DateStartRealShort"), 'checked'=>(($mode == "" || $mode == -1) || $mode > 0)), - 'cd.date_fin_validite'=>array('label'=>$langs->trans("DateEndPlannedShort"), 'checked'=>(($mode == "" || $mode == -1) || $mode < 5)), - 'cd.date_cloture'=>array('label'=>$langs->trans("DateEndRealShort"), 'checked'=>(($mode == "" || $mode == -1) || $mode >= 5)), - 'status'=>array('label'=>$langs->trans("Status"), 'checked'=>1), + 'c.ref'=>array('label'=>"Contract", 'checked'=>1, 'position'=>80), + 'p.description'=>array('label'=>"Service", 'checked'=>1, 'position'=>80), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>90), + 'cd.tva_tx'=>array('label'=>"VATRate", 'checked'=>-1, 'position'=>100), + 'cd.subprice'=>array('label'=>"PriceUHT", 'checked'=>-1, 'position'=>105), + 'cd.qty'=>array('label'=>"Qty", 'checked'=>-1, 'position'=>108), + 'cd.total_ht'=>array('label'=>"TotalHT", 'checked'=>-1, 'position'=>109), + 'cd.total_tva'=>array('label'=>"TotalVAT", 'checked'=>-1, 'position'=>110), + 'cd.date_ouverture_prevue'=>array('label'=>"DateStartPlannedShort", 'checked'=>(($mode == "" || $mode == -1) || $mode == "0"), 'position'=>150), + 'cd.date_ouverture'=>array('label'=>"DateStartRealShort", 'checked'=>(($mode == "" || $mode == -1) || $mode > 0), 'position'=>160), + 'cd.date_fin_validite'=>array('label'=>"DateEndPlannedShort", 'checked'=>(($mode == "" || $mode == -1) || $mode < 5), 'position'=>170), + 'cd.date_cloture'=>array('label'=>"DateEndRealShort", 'checked'=>(($mode == "" || $mode == -1) || $mode >= 5), 'position'=>180), //'cd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'cd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500) + 'cd.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -142,21 +158,25 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Selection of new fields 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_product_category = 0; + 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_product_category = 0; $search_name = ""; $search_contract = ""; $search_service = ""; @@ -197,7 +217,9 @@ $sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut, c.ref_customer, c.ref $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,"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " sc.fk_soc, sc.fk_user,"; +} $sql .= " cd.date_ouverture_prevue,"; $sql .= " cd.date_ouverture,"; $sql .= " cd.date_fin_validite,"; @@ -211,7 +233,9 @@ $sql .= " cd.subprice,"; $sql .= " cd.tms as date_update"; // 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(); @@ -219,50 +243,102 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."contrat as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s,"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; +} $sql .= " ".MAIN_DB_PREFIX."contratdet as cd"; -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 (cd.rowid = ef.fk_object)"; +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 (cd.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; +if ($search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; +} $sql .= " WHERE c.entity = ".$conf->entity; $sql .= " AND c.rowid = cd.fk_contrat"; -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$search_product_category; +} $sql .= " AND c.fk_soc = s.rowid"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if ($mode == "0") $sql .= " AND cd.statut = 0"; -if ($mode == "4") $sql .= " AND cd.statut = 4"; -if ($mode == "5") $sql .= " AND cd.statut = 5"; -if ($filter == "expired") $sql .= " AND cd.date_fin_validite < '".$db->idate($now)."'"; -if ($filter == "notexpired") $sql .= " AND cd.date_fin_validite >= '".$db->idate($now)."'"; -if ($search_name) $sql .= " AND s.nom LIKE '%".$db->escape($search_name)."%'"; -if ($search_contract) $sql .= " AND c.ref LIKE '%".$db->escape($search_contract)."%' "; -if ($search_service) $sql .= " AND (p.ref LIKE '%".$db->escape($search_service)."%' OR p.description LIKE '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')"; -if ($socid > 0) $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 ($mode == "0") { + $sql .= " AND cd.statut = 0"; +} +if ($mode == "4") { + $sql .= " AND cd.statut = 4"; +} +if ($mode == "5") { + $sql .= " AND cd.statut = 5"; +} +if ($filter == "expired") { + $sql .= " AND cd.date_fin_validite < '".$db->idate($now)."'"; +} +if ($filter == "notexpired") { + $sql .= " AND cd.date_fin_validite >= '".$db->idate($now)."'"; +} +if ($search_name) { + $sql .= " AND s.nom LIKE '%".$db->escape($search_name)."%'"; +} +if ($search_contract) { + $sql .= " AND c.ref LIKE '%".$db->escape($search_contract)."%' "; +} +if ($search_service) { + $sql .= " AND (p.ref LIKE '%".$db->escape($search_service)."%' OR p.description LIKE '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')"; +} +if ($socid > 0) { + $sql .= " AND s.rowid = ".((int) $socid); +} $filter_dateouvertureprevue_start = dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear); $filter_dateouvertureprevue_end = dol_mktime(23, 59, 59, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear); -if ($filter_dateouvertureprevue_start != '' && $filter_opouvertureprevue == -1) $filter_opouvertureprevue = ' BETWEEN '; +if ($filter_dateouvertureprevue_start != '' && $filter_opouvertureprevue == -1) { + $filter_opouvertureprevue = ' BETWEEN '; +} $filter_date1_start = dol_mktime(0, 0, 0, $op1month, $op1day, $op1year); $filter_date1_end = dol_mktime(23, 59, 59, $op1month, $op1day, $op1year); -if ($filter_date1_start != '' && $filter_op1 == -1) $filter_op1 = ' BETWEEN '; +if ($filter_date1_start != '' && $filter_op1 == -1) { + $filter_op1 = ' BETWEEN '; +} $filter_date2_start = dol_mktime(0, 0, 0, $op2month, $op2day, $op2year); $filter_date2_end = dol_mktime(23, 59, 59, $op2month, $op2day, $op2year); -if ($filter_date2_start != '' && $filter_op2 == -1) $filter_op2 = ' BETWEEN '; +if ($filter_date2_start != '' && $filter_op2 == -1) { + $filter_op2 = ' BETWEEN '; +} $filter_datecloture_start = dol_mktime(0, 0, 0, $opcloturemonth, $opclotureday, $opclotureyear); $filter_datecloture_end = dol_mktime(23, 59, 59, $opcloturemonth, $opclotureday, $opclotureyear); -if ($filter_datecloture_start != '' && $filter_opcloture == -1) $filter_opcloture = ' BETWEEN '; +if ($filter_datecloture_start != '' && $filter_opcloture == -1) { + $filter_opcloture = ' BETWEEN '; +} -if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1 && $filter_opouvertureprevue != ' BETWEEN ' && $filter_dateouvertureprevue_start != '') $sql .= " AND cd.date_ouverture_prevue ".$filter_opouvertureprevue." '".$db->idate($filter_dateouvertureprevue_start)."'"; -if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue == ' BETWEEN ') $sql .= " AND '".$db->idate($filter_dateouvertureprevue_end)."'"; -if (!empty($filter_op1) && $filter_op1 != -1 && $filter_op1 != ' BETWEEN ' && $filter_date1_start != '') $sql .= " AND cd.date_ouverture ".$filter_op1." '".$db->idate($filter_date1_start)."'"; -if (!empty($filter_op1) && $filter_op1 == ' BETWEEN ') $sql .= " AND '".$db->idate($filter_date1_end)."'"; -if (!empty($filter_op2) && $filter_op2 != -1 && $filter_op2 != ' BETWEEN ' && $filter_date2_start != '') $sql .= " AND cd.date_fin_validite ".$filter_op2." '".$db->idate($filter_date2_start)."'"; -if (!empty($filter_op2) && $filter_op2 == ' BETWEEN ') $sql .= " AND '".$db->idate($filter_date2_end)."'"; -if (!empty($filter_opcloture) && $filter_opcloture != ' BETWEEN ' && $filter_opcloture != -1 && $filter_datecloture_start != '') $sql .= " AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture_start)."'"; -if (!empty($filter_opcloture) && $filter_opcloture == ' BETWEEN ') $sql .= " AND '".$db->idate($filter_datecloture_end)."'"; +if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1 && $filter_opouvertureprevue != ' BETWEEN ' && $filter_dateouvertureprevue_start != '') { + $sql .= " AND cd.date_ouverture_prevue ".$filter_opouvertureprevue." '".$db->idate($filter_dateouvertureprevue_start)."'"; +} +if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue == ' BETWEEN ') { + $sql .= " AND '".$db->idate($filter_dateouvertureprevue_end)."'"; +} +if (!empty($filter_op1) && $filter_op1 != -1 && $filter_op1 != ' BETWEEN ' && $filter_date1_start != '') { + $sql .= " AND cd.date_ouverture ".$filter_op1." '".$db->idate($filter_date1_start)."'"; +} +if (!empty($filter_op1) && $filter_op1 == ' BETWEEN ') { + $sql .= " AND '".$db->idate($filter_date1_end)."'"; +} +if (!empty($filter_op2) && $filter_op2 != -1 && $filter_op2 != ' BETWEEN ' && $filter_date2_start != '') { + $sql .= " AND cd.date_fin_validite ".$filter_op2." '".$db->idate($filter_date2_start)."'"; +} +if (!empty($filter_op2) && $filter_op2 == ' BETWEEN ') { + $sql .= " AND '".$db->idate($filter_date2_end)."'"; +} +if (!empty($filter_opcloture) && $filter_opcloture != ' BETWEEN ' && $filter_opcloture != -1 && $filter_datecloture_start != '') { + $sql .= " AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture_start)."'"; +} +if (!empty($filter_opcloture) && $filter_opcloture == ' BETWEEN ') { + $sql .= " AND '".$db->idate($filter_datecloture_end)."'"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $sql .= $db->order($sortfield, $sortorder); @@ -270,12 +346,10 @@ $sql .= $db->order($sortfield, $sortorder); //print $sql; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -286,8 +360,7 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; dol_syslog("contrat/services_list.php", LOG_DEBUG); $resql = $db->query($sql); -if (!$resql) -{ +if (!$resql) { dol_print_error($db); exit; } @@ -297,45 +370,79 @@ $num = $db->num_rows($resql); /* if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { - $obj = $db->fetch_object($resql); - $id = $obj->id; - header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withprojet=1'); - exit; + $obj = $db->fetch_object($resql); + $id = $obj->id; + header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withprojet=1'); + exit; }*/ llxHeader(null, $langs->trans("Services")); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; -if ($search_contract) $param .= '&search_contract='.urlencode($search_contract); -if ($search_name) $param .= '&search_name='.urlencode($search_name); -if ($search_service) $param .= '&search_service='.urlencode($search_service); -if ($mode) $param .= '&mode='.urlencode($mode); -if ($filter) $param .= '&filter='.urlencode($filter); -if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1) $param .= '&filter_opouvertureprevue='.urlencode($filter_opouvertureprevue); -if (!empty($filter_op1) && $filter_op1 != -1) $param .= '&filter_op1='.urlencode($filter_op1); -if (!empty($filter_op2) && $filter_op2 != -1) $param .= '&filter_op2='.urlencode($filter_op2); -if (!empty($filter_opcloture) && $filter_opcloture != -1) $param .= '&filter_opcloture='.urlencode($filter_opcloture); -if ($filter_dateouvertureprevue != '') $param .= '&opouvertureprevueday='.$opouvertureprevueday.'&opouvertureprevuemonth='.$opouvertureprevuemonth.'&opouvertureprevueyear='.$opouvertureprevueyear; -if ($filter_date1 != '') $param .= '&op1day='.$op1day.'&op1month='.$op1month.'&op1year='.$op1year; -if ($filter_date2 != '') $param .= '&op2day='.$op2day.'&op2month='.$op2month.'&op2year='.$op2year; -if ($filter_datecloture != '') $param .= '&opclotureday='.$op2day.'&opcloturemonth='.$op2month.'&opclotureyear='.$op2year; -if ($optioncss != '') $param .= '&optioncss='.$optioncss; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} +if ($search_contract) { + $param .= '&search_contract='.urlencode($search_contract); +} +if ($search_name) { + $param .= '&search_name='.urlencode($search_name); +} +if ($search_service) { + $param .= '&search_service='.urlencode($search_service); +} +if ($mode) { + $param .= '&mode='.urlencode($mode); +} +if ($filter) { + $param .= '&filter='.urlencode($filter); +} +if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1) { + $param .= '&filter_opouvertureprevue='.urlencode($filter_opouvertureprevue); +} +if (!empty($filter_op1) && $filter_op1 != -1) { + $param .= '&filter_op1='.urlencode($filter_op1); +} +if (!empty($filter_op2) && $filter_op2 != -1) { + $param .= '&filter_op2='.urlencode($filter_op2); +} +if (!empty($filter_opcloture) && $filter_opcloture != -1) { + $param .= '&filter_opcloture='.urlencode($filter_opcloture); +} +if ($filter_dateouvertureprevue != '') { + $param .= '&opouvertureprevueday='.$opouvertureprevueday.'&opouvertureprevuemonth='.$opouvertureprevuemonth.'&opouvertureprevueyear='.$opouvertureprevueyear; +} +if ($filter_date1 != '') { + $param .= '&op1day='.$op1day.'&op1month='.$op1month.'&op1year='.$op1year; +} +if ($filter_date2 != '') { + $param .= '&op2day='.$op2day.'&op2month='.$op2month.'&op2year='.$op2year; +} +if ($filter_datecloture != '') { + $param .= '&opclotureday='.$op2day.'&opcloturemonth='.$op2month.'&opclotureyear='.$op2year; +} +if ($optioncss != '') { + $param .= '&optioncss='.$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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); +//if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print ''; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -345,24 +452,32 @@ print ''; print ''; $title = $langs->trans("ListOfServices"); -if ($mode == "0") $title = $langs->trans("ListOfInactiveServices"); // Must use == "0" -if ($mode == "4" && $filter != "expired") $title = $langs->trans("ListOfRunningServices"); -if ($mode == "4" && $filter == "expired") $title = $langs->trans("ListOfExpiredServices"); -if ($mode == "5") $title = $langs->trans("ListOfClosedServices"); +if ($mode == "0") { + $title = $langs->trans("ListOfInactiveServices"); // Must use == "0" +} +if ($mode == "4" && $filter != "expired") { + $title = $langs->trans("ListOfRunningServices"); +} +if ($mode == "4" && $filter == "expired") { + $title = $langs->trans("ListOfExpiredServices"); +} +if ($mode == "5") { + $title = $langs->trans("ListOfClosedServices"); +} print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contract', 0, '', '', $limit); -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } $morefilter = ''; // If the user can view categories of products -if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) -{ +if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; @@ -373,12 +488,14 @@ if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights- $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -392,33 +509,62 @@ print '
    '; print '
    '; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print ''; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print ''; //print $langs->trans('Month').': '; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print ''; + } print ''; //print ' '.$langs->trans('Year').': '; $syear = $year; @@ -519,20 +608,17 @@ $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation -if (!empty($arrayfields['c.datec']['checked'])) -{ +if (!empty($arrayfields['c.datec']['checked'])) { print ''; print ''; print ''; $arrayofoperators = array('0'=>'', '='=>'=', '<='=>'<=', '>='=>'>='); print $form->selectarray('search_op2df', $arrayofoperators, $search_op2df, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth50imp'); @@ -543,8 +629,7 @@ if (!empty($arrayfields['lower_planned_end_date']['checked'])) print ''; @@ -554,18 +639,42 @@ print '
    '; print $contracttmp->getNomUrl(1); - if ($obj->nb_late) print img_warning($langs->trans("Late")); + if ($obj->nb_late) { + print img_warning($langs->trans("Late")); + } if (!empty($obj->note_private) || !empty($obj->note_public)) { print ' '; print ''.img_picto($langs->trans("ViewPrivateNote"), 'note').''; @@ -648,16 +757,13 @@ while ($i < min($num, $limit)) print ''.$contracttmp->getFormatedCustomerRef($obj->ref_customer).''.$obj->ref_supplier.''; if ($obj->socid > 0) { // TODO Use a cache for this string @@ -665,67 +771,71 @@ while ($i < min($num, $limit)) } print ''.$obj->email.''; print $obj->town; print ''; print $obj->zip; print '".$obj->state_name."'; print $socstatic->country; print ''; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (count($typenArray) == 0) { + $typenArray = $formcompany->typent_array(1); + } print $typenArray[$obj->typent_code]; print ''; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $listsalesrepresentatives = $socstatic->getSalesRepresentatives($user); - if ($listsalesrepresentatives < 0) dol_print_error($db); + if ($listsalesrepresentatives < 0) { + dol_print_error($db); + } $nbofsalesrepresentative = count($listsalesrepresentatives); - if ($nbofsalesrepresentative > 3) { + if ($nbofsalesrepresentative > 6) { // We print only number print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -733,23 +843,28 @@ while ($i < min($num, $limit)) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; //print '
    ': - print $userstatic->getNomUrl(-2); + print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2); $j++; - if ($j < $nbofsalesrepresentative) print ' '; + if ($j < $nbofsalesrepresentative) { + print ' '; + } //print '
    '; } } //else print $langs->trans("NoSalesRepresentativeAffected"); } else { - print ' '; + print ' '; } print '
    '.dol_print_date($db->jdate($obj->date_contrat), 'day', 'tzserver').''; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->lower_planned_end_date), 'day', 'tzuser'); print ''.($obj->nb_initial > 0 ? $obj->nb_initial : '').''.($obj->nb_running > 0 ? $obj->nb_running : '').''.($obj->nb_expired > 0 ? $obj->nb_expired : '').''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    '.$langs->trans('Discount').''; - if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); + if ($object->thirdparty->remise_percent) { + print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); + } else { + print $langs->trans("CompanyHasNoRelativeDiscount"); + } $absolute_discount = $object->thirdparty->getAvailableDiscounts(); print '. '; - if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); - else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($absolute_discount) { + print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency".$conf->currency)); + } else { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + } print '.'; print '
    '."\n"; print ''; -if (!empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['p.description']['checked'])) print_liste_field_titre($arrayfields['p.description']['label'], $_SERVER["PHP_SELF"], "p.description", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['cd.qty']['checked'])) print_liste_field_titre($arrayfields['cd.qty']['label'], $_SERVER["PHP_SELF"], "cd.qty", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['cd.total_ht']['checked'])) print_liste_field_titre($arrayfields['cd.total_ht']['label'], $_SERVER["PHP_SELF"], "cd.total_ht", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['cd.total_tva']['checked'])) print_liste_field_titre($arrayfields['cd.total_tva']['label'], $_SERVER["PHP_SELF"], "cd.total_tva", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['cd.tva_tx']['checked'])) print_liste_field_titre($arrayfields['cd.tva_tx']['label'], $_SERVER["PHP_SELF"], "cd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['cd.subprice']['checked'])) print_liste_field_titre($arrayfields['cd.subprice']['label'], $_SERVER["PHP_SELF"], "cd.subprice", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -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['cd.date_ouverture_prevue']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture_prevue']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture_prevue", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['cd.date_ouverture']['checked'])) print_liste_field_titre($arrayfields['cd.date_ouverture']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['cd.date_fin_validite']['checked'])) print_liste_field_titre($arrayfields['cd.date_fin_validite']['label'], $_SERVER["PHP_SELF"], "cd.date_fin_validite", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['cd.date_cloture']['checked'])) print_liste_field_titre($arrayfields['cd.date_cloture']['label'], $_SERVER["PHP_SELF"], "cd.date_cloture", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['c.ref']['checked'])) { + print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['p.description']['checked'])) { + print_liste_field_titre($arrayfields['p.description']['label'], $_SERVER["PHP_SELF"], "p.description", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['cd.tva_tx']['checked'])) { + print_liste_field_titre($arrayfields['cd.tva_tx']['label'], $_SERVER["PHP_SELF"], "cd.tva_tx", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['cd.subprice']['checked'])) { + print_liste_field_titre($arrayfields['cd.subprice']['label'], $_SERVER["PHP_SELF"], "cd.subprice", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['cd.qty']['checked'])) { + print_liste_field_titre($arrayfields['cd.qty']['label'], $_SERVER["PHP_SELF"], "cd.qty", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['cd.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['cd.total_ht']['label'], $_SERVER["PHP_SELF"], "cd.total_ht", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['cd.total_tva']['checked'])) { + print_liste_field_titre($arrayfields['cd.total_tva']['label'], $_SERVER["PHP_SELF"], "cd.total_tva", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +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['cd.date_ouverture_prevue']['checked'])) { + print_liste_field_titre($arrayfields['cd.date_ouverture_prevue']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture_prevue", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['cd.date_ouverture']['checked'])) { + print_liste_field_titre($arrayfields['cd.date_ouverture']['label'], $_SERVER["PHP_SELF"], "cd.date_ouverture", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['cd.date_fin_validite']['checked'])) { + print_liste_field_titre($arrayfields['cd.date_fin_validite']['label'], $_SERVER["PHP_SELF"], "cd.date_fin_validite", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['cd.date_cloture']['checked'])) { + print_liste_field_titre($arrayfields['cd.date_cloture']['label'], $_SERVER["PHP_SELF"], "cd.date_cloture", "", $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); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['cd.datec']['checked'])) print_liste_field_titre($arrayfields['cd.datec']['label'], $_SERVER["PHP_SELF"], "cd.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['cd.tms']['checked'])) print_liste_field_titre($arrayfields['cd.tms']['label'], $_SERVER["PHP_SELF"], "cd.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['status']['checked'])) print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "cd.statut,c.statut", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['cd.datec']['checked'])) { + print_liste_field_titre($arrayfields['cd.datec']['label'], $_SERVER["PHP_SELF"], "cd.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['cd.tms']['checked'])) { + print_liste_field_titre($arrayfields['cd.tms']['label'], $_SERVER["PHP_SELF"], "cd.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['status']['checked'])) { + print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "cd.statut,c.statut", "", $param, '', $sortfield, $sortorder, 'right '); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; print ''; -if (!empty($arrayfields['c.ref']['checked'])) -{ +if (!empty($arrayfields['c.ref']['checked'])) { print ''; } // Service label -if (!empty($arrayfields['p.description']['checked'])) -{ +if (!empty($arrayfields['p.description']['checked'])) { print ''; } // detail lines -if (!empty($arrayfields['cd.qty']['checked'])) -{ +if (!empty($arrayfields['cd.tva_tx']['checked'])) { print ''; } -if (!empty($arrayfields['cd.total_ht']['checked'])) -{ +if (!empty($arrayfields['cd.subprice']['checked'])) { print ''; } -if (!empty($arrayfields['cd.total_tva']['checked'])) -{ +if (!empty($arrayfields['cd.qty']['checked'])) { print ''; } -if (!empty($arrayfields['cd.tva_tx']['checked'])) -{ +if (!empty($arrayfields['cd.total_ht']['checked'])) { print ''; } -if (!empty($arrayfields['cd.subprice']['checked'])) -{ +if (!empty($arrayfields['cd.total_tva']['checked'])) { print ''; } // Third party -if (!empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['s.nom']['checked'])) { print ''; } -if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) -{ +if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) { print ''; } -if (!empty($arrayfields['cd.date_ouverture']['checked'])) -{ +if (!empty($arrayfields['cd.date_ouverture']['checked'])) { print ''; } -if (!empty($arrayfields['cd.date_fin_validite']['checked'])) -{ +if (!empty($arrayfields['cd.date_fin_validite']['checked'])) { print ''; } -if (!empty($arrayfields['cd.date_cloture']['checked'])) -{ +if (!empty($arrayfields['cd.date_cloture']['checked'])) { print ''; } -if (!empty($arrayfields['cd.tms']['checked'])) -{ +if (!empty($arrayfields['cd.tms']['checked'])) { // Date modification print ''; } -if (!empty($arrayfields['status']['checked'])) -{ +if (!empty($arrayfields['status']['checked'])) { // Status print ''; } // Action column @@ -552,8 +684,7 @@ $productstatic = new Product($db); $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $contractstatic->id = $obj->cid; @@ -570,118 +701,141 @@ while ($i < min($num, $limit)) print ''; // Ref - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Service - if (!empty($arrayfields['p.description']['checked'])) - { + if (!empty($arrayfields['p.description']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cd.qty']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['cd.total_ht']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cd.total_ht'; - $totalarray['val']['cd.total_ht'] += $obj->total_ht; - } - if (!empty($arrayfields['cd.total_tva']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cd.total_tva'; - $totalarray['val']['cd.total_tva'] += $obj->total_tva; - } - if (!empty($arrayfields['cd.tva_tx']['checked'])) - { + if (!empty($arrayfields['cd.tva_tx']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cd.subprice']['checked'])) - { + if (!empty($arrayfields['cd.subprice']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['cd.qty']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['cd.total_ht']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'cd.total_ht'; + } + $totalarray['val']['cd.total_ht'] += $obj->total_ht; + } + if (!empty($arrayfields['cd.total_tva']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'cd.total_tva'; + } + $totalarray['val']['cd.total_tva'] += $obj->total_tva; } - // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Start date - if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) - { + if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cd.date_ouverture']['checked'])) - { + if (!empty($arrayfields['cd.date_ouverture']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // End date - if (!empty($arrayfields['cd.date_fin_validite']['checked'])) - { + if (!empty($arrayfields['cd.date_fin_validite']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Close date (real end date) - if (!empty($arrayfields['cd.date_cloture']['checked'])) - { + if (!empty($arrayfields['cd.date_cloture']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -691,45 +845,50 @@ while ($i < min($num, $limit)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['cd.datec']['checked'])) - { + if (!empty($arrayfields['cd.datec']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['cd.tms']['checked'])) - { + if (!empty($arrayfields['cd.tms']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['status']['checked'])) - { + if (!empty($arrayfields['status']['checked'])) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; $i++; diff --git a/htdocs/contrat/tpl/index.html b/htdocs/contrat/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 339f51db22c..310e2bd00b9 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.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; } @@ -37,24 +36,24 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("contracts"); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - - - + + + -
    '; print ''; print ''; @@ -426,49 +572,41 @@ if (!empty($arrayfields['c.ref']['checked'])) print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $arrayofoperators = array('<'=>'<', '>'=>'>'); print $form->selectarray('filter_opouvertureprevue', $arrayofoperators, $filter_opouvertureprevue, 1); @@ -477,8 +615,7 @@ if (!empty($arrayfields['cd.date_ouverture_prevue']['checked'])) print $form->selectDate($filter_dateouvertureprevue, 'opouvertureprevue', 0, 0, 1, '', 1, 0); print ''; $arrayofoperators = array('<'=>'<', '>'=>'>'); print $form->selectarray('filter_op1', $arrayofoperators, $filter_op1, 1); @@ -487,8 +624,7 @@ if (!empty($arrayfields['cd.date_ouverture']['checked'])) print $form->selectDate($filter_date1, 'op1', 0, 0, 1, '', 1, 0); print ''; $arrayofoperators = array('<'=>'<', '>'=>'>'); print $form->selectarray('filter_op2', $arrayofoperators, $filter_op2, 1); @@ -497,8 +633,7 @@ if (!empty($arrayfields['cd.date_fin_validite']['checked'])) print $form->selectDate($filter_date2, 'op2', 0, 0, 1, '', 1, 0); print ''; $arrayofoperators = array('<'=>'<', '>'=>'>'); print $form->selectarray('filter_opcloture', $arrayofoperators, $filter_opcloture, 1); @@ -514,20 +649,17 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; $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['cd.datec']['checked'])) -{ +if (!empty($arrayfields['cd.datec']['checked'])) { // Date creation print ''; print ''; print ''; $arrayofstatus = array( @@ -537,7 +669,7 @@ if (!empty($arrayfields['status']['checked'])) '4&filter=expired'=>$langs->trans("ServiceStatusLate"), '5'=>$langs->trans("ServiceStatusClosed") ); - print $form->selectarray('search_status', $arrayofstatus, (strstr($search_status, ',') ?-1 : $search_status), 1, 0, '', 0, 0, 0, '', 'maxwidth100onsmartphone'); + print $form->selectarray('search_status', $arrayofstatus, (strstr($search_status, ',') ?-1 : $search_status), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); print '
    '; print $contractstatic->getNomUrl(1, 16); print ''; - if ($obj->pid > 0) - { + if ($obj->pid > 0) { $productstatic->id = $obj->pid; $productstatic->type = $obj->ptype; $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; 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); + if (!empty($obj->description) && !empty($conf->global->PRODUCT_DESC_IN_LIST)) { + print '
    '.dol_nl2br($obj->description); + } } 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); + 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); + } } print '
    '; - print $obj->qty; - print ''; - print price($obj->total_ht); - print ''; - print price($obj->total_tva); - print ''; print price2num($obj->tva_tx).'%'; print ''; print price($obj->subprice); print ''; + print $obj->qty; + print ''; + print ''.price($obj->total_ht).''; + print ''; + print ''.price($obj->total_tva).''; + print ''; + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; print $companystatic->getNomUrl(1, 'customer', 28); print ''; print ($obj->date_ouverture_prevue ?dol_print_date($db->jdate($obj->date_ouverture_prevue), 'dayhour') : ' '); - if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0) - print ' '.img_picto($langs->trans("Late"), "warning"); - else print '    '; + if ($db->jdate($obj->date_ouverture_prevue) && ($db->jdate($obj->date_ouverture_prevue) < ($now - $conf->contrat->services->inactifs->warning_delay)) && $obj->statut == 0) { + print ' '.img_picto($langs->trans("Late"), "warning"); + } else { + print '    '; + } print ''.($obj->date_ouverture ?dol_print_date($db->jdate($obj->date_ouverture), 'dayhour') : ' ').''.($obj->date_fin_validite ?dol_print_date($db->jdate($obj->date_fin_validite), 'dayhour') : ' '); - if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) - { + if ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < ($now - $conf->contrat->services->expires->warning_delay) && $obj->statut < 5) { $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 ''.dol_print_date($db->jdate($obj->date_cloture), 'dayhour').''; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; - if ($obj->cstatut == 0) - { + if ($obj->cstatut == 0) { // If contract is draft, we say line is also draft print $contractstatic->LibStatut(0, 5); } else { print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now) ? 1 : 0); } print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print '
    trans("Contract"); ?>getNomUrl(1); ?>trans("Contract"); ?>getNomUrl(1); ?> date_contrat, 'day'); ?>rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) - { + if ($user->rights->contrat->lire && empty($conf->global->CONTRACT_SHOW_TOTAL_OF_PRODUCT_AS_PRICE)) { $totalcontrat = 0; foreach ($objectlink->lines as $linecontrat) { $totalcontrat = $totalcontrat + $linecontrat->total_ht; diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 3bc8f0040cc..f871ed73de8 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -30,18 +30,17 @@ // $backtopage may be defined // $triggermodname may be defined -if (!empty($permissionedit) && empty($permissiontoadd)) $permissiontoadd = $permissionedit; // For backward compatibility +if (!empty($permissionedit) && empty($permissiontoadd)) { + $permissiontoadd = $permissionedit; // For backward compatibility +} -if ($cancel) -{ +if ($cancel) { /*var_dump($cancel); var_dump($backtopage);exit;*/ - if (!empty($backtopageforcancel)) - { + if (!empty($backtopageforcancel)) { header("Location: ".$backtopageforcancel); exit; - } elseif (!empty($backtopage)) - { + } elseif (!empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -50,19 +49,25 @@ if ($cancel) // Action to add record -if ($action == 'add' && !empty($permissiontoadd)) -{ - foreach ($object->fields as $key => $val) - { +if ($action == 'add' && !empty($permissiontoadd)) { + foreach ($object->fields as $key => $val) { if ($object->fields[$key]['type'] == 'duration') { - if (GETPOST($key.'hour') == '' && GETPOST($key.'min') == '') continue; // The field was not submited to be edited + if (GETPOST($key.'hour') == '' && GETPOST($key.'min') == '') { + continue; // The field was not submited to be edited + } } else { - if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited + if (!GETPOSTISSET($key)) { + continue; // The field was not submited to be edited + } } // Ignore special fields - if (in_array($key, array('rowid', 'entity', 'import_key'))) continue; + if (in_array($key, array('rowid', 'entity', 'import_key'))) { + continue; + } if (in_array($key, array('date_creation', 'tms', 'fk_user_creat', 'fk_user_modif'))) { - if (!in_array(abs($val['visible']), array(1, 3))) continue; // Only 1 and 3 that are case to create + if (!in_array(abs($val['visible']), array(1, 3))) { + continue; // Only 1 and 3 that are case to create + } } // Set value to insert @@ -84,17 +89,19 @@ if ($action == 'add' && !empty($permissiontoadd)) } else { $value = GETPOST($key, 'alphanohtml'); } - if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value = ''; // This is an implicit foreign key field - if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') $value = ''; // This is an explicit foreign key field + if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') { + $value = ''; // This is an implicit foreign key field + } + if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') { + $value = ''; // This is an explicit foreign key field + } //var_dump($key.' '.$value.' '.$object->fields[$key]['type']); $object->$key = $value; - if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)') - { + if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)') { $object->$key = '(PROV)'; } - if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) - { + if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv($val['label'])), null, 'errors'); } @@ -103,14 +110,14 @@ if ($action == 'add' && !empty($permissiontoadd)) // Fill array 'array_options' with data from add form if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { // 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 @@ -118,8 +125,11 @@ if ($action == 'add' && !empty($permissiontoadd)) exit; } else { // Creation KO - if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + if (!empty($object->errors)) { + setEventMessages(null, $object->errors, 'errors'); + } else { + setEventMessages($object->error, null, 'errors'); + } $action = 'create'; } } else { @@ -128,25 +138,31 @@ if ($action == 'add' && !empty($permissiontoadd)) } // Action to update record -if ($action == 'update' && !empty($permissiontoadd)) -{ - foreach ($object->fields as $key => $val) - { +if ($action == 'update' && !empty($permissiontoadd)) { + foreach ($object->fields as $key => $val) { // 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 + if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) { + continue; // The field was not submited to be edited + } } 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 { - if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited + if (!GETPOSTISSET($key)) { + continue; // The field was not submited to be edited + } } // Ignore special fields - if (in_array($key, array('rowid', 'entity', 'import_key'))) continue; + if (in_array($key, array('rowid', 'entity', 'import_key'))) { + continue; + } if (in_array($key, array('date_creation', 'tms', 'fk_user_creat', 'fk_user_modif'))) { - if (!in_array(abs($val['visible']), array(1, 3, 4))) continue; // Only 1 and 3 and 4 that are case to update + if (!in_array(abs($val['visible']), array(1, 3, 4))) { + continue; // Only 1 and 3 and 4 that are case to update + } } // Set value to update @@ -176,12 +192,15 @@ if ($action == 'update' && !empty($permissiontoadd)) } else { $value = GETPOST($key, 'alpha'); } - if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value = ''; // This is an implicit foreign key field - if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') $value = ''; // This is an explicit foreign key field + if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') { + $value = ''; // This is an implicit foreign key field + } + if (!empty($object->fields[$key]['foreignkey']) && $value == '-1') { + $value = ''; // This is an explicit foreign key field + } $object->$key = $value; - if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) - { + if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv($val['label'])), null, 'errors'); } @@ -190,14 +209,14 @@ if ($action == 'update' && !empty($permissiontoadd)) // Fill array 'array_options' with data from add form if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { $action = 'view'; } else { // Creation KO @@ -210,8 +229,7 @@ if ($action == 'update' && !empty($permissiontoadd)) } // Action to update one extrafield -if ($action == "update_extras" && !empty($permissiontoadd)) -{ +if ($action == "update_extras" && !empty($permissiontoadd)) { $object->fetch(GETPOST('id', 'int')); $attributekey = GETPOST('attribute', 'alpha'); @@ -226,8 +244,7 @@ if ($action == "update_extras" && !empty($permissiontoadd)) } $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); $action = 'view'; } else { @@ -237,46 +254,42 @@ if ($action == "update_extras" && !empty($permissiontoadd)) } // Action to delete -if ($action == 'confirm_delete' && !empty($permissiontodelete)) -{ - if (!($object->id > 0)) - { +if ($action == 'confirm_delete' && !empty($permissiontodelete)) { + if (!($object->id > 0)) { dol_print_error('', 'Error, object must be fetched before being deleted'); exit; } $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { // Delete OK setEventMessages("RecordDeleted", null, 'mesgs'); header("Location: ".$backurlforlist); exit; } else { - if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + if (!empty($object->errors)) { + setEventMessages(null, $object->errors, 'errors'); + } else { + setEventMessages($object->error, null, 'errors'); + } } } // Remove a line -if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd)) -{ +if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd)) { if (method_exists($object, 'deleteline')) { $result = $object->deleteline($user, $lineid); // For backward compatibility } else { $result = $object->deleteLine($user, $lineid); } - if ($result > 0) - { + if ($result > 0) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); } - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && is_object($object->thirdparty)) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && is_object($object->thirdparty)) { $newlang = $object->thirdparty->default_lang; } if (!empty($newlang)) { @@ -299,18 +312,20 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissionto } // Action validate object -if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) -{ +if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) { $result = $object->validate($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { if (method_exists($object, 'generateDocument')) { $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 ($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); @@ -332,18 +347,20 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) } // Action close object -if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) -{ +if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) { $result = $object->cancel($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { if (method_exists($object, 'generateDocument')) { $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 ($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); @@ -360,11 +377,9 @@ if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) } // Action setdraft object -if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) -{ +if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) { $result = $object->setDraft($user); - if ($result >= 0) - { + if ($result >= 0) { // Nothing else done } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -372,18 +387,20 @@ if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) } // Action reopen object -if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) -{ +if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) { $result = $object->reopen($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { if (method_exists($object, 'generateDocument')) { $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 ($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); @@ -400,21 +417,21 @@ if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) } // Action clone object -if ($action == 'confirm_clone' && $confirm == 'yes' && !empty($permissiontoadd)) -{ - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { +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. //$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) - { + if (is_object($result) || $result > 0) { $newid = 0; - if (is_object($result)) $newid = $result->id; - else $newid = $result; + if (is_object($result)) { + $newid = $result->id; + } else { + $newid = $result; + } header("Location: ".$_SERVER['PHP_SELF'].'?id='.$newid); // Open record of new object exit; } else { diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 4ae83829fa4..63cac253976 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -29,27 +29,26 @@ // $upload_dir must be defined (example $conf->projet->dir_output . "/";) // $hidedetails, $hidedesc, $hideref and $moreparams may have been set or not. -if (!empty($permissioncreate) && empty($permissiontoadd)) $permissiontoadd = $permissioncreate; // For backward compatibility +if (!empty($permissioncreate) && empty($permissiontoadd)) { + $permissiontoadd = $permissioncreate; // For backward compatibility +} // Build doc -if ($action == 'builddoc' && $permissiontoadd) -{ - if (is_numeric(GETPOST('model', 'alpha'))) - { +if ($action == 'builddoc' && $permissiontoadd) { + if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); } else { - // Reload to get all modified line records and be ready for hooks + // Reload to get all modified line records and be ready for hooks $ret = $object->fetch($id); $ret = $object->fetch_thirdparty(); /*if (empty($object->id) || ! $object->id > 0) - { - dol_print_error('Object must have been loaded by a fetch'); - exit; - }*/ + { + dol_print_error('Object must have been loaded by a fetch'); + exit; + }*/ // Save last template used to generate document - if (GETPOST('model', 'alpha')) - { + if (GETPOST('model', 'alpha')) { $object->setDocModel($user, GETPOST('model', 'alpha')); } @@ -67,29 +66,40 @@ if ($action == 'builddoc' && $permissiontoadd) $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) && isset($object->thirdparty->default_lang)) $newlang = $object->thirdparty->default_lang; // for proposal, order, invoice, ... - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->default_lang)) $newlang = $object->default_lang; // for thirdparty - if (!empty($newlang)) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->thirdparty->default_lang)) { + $newlang = $object->thirdparty->default_lang; // for proposal, order, invoice, ... + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->default_lang)) { + $newlang = $object->default_lang; // for thirdparty + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } // To be sure vars is defined - if (empty($hidedetails)) $hidedetails = 0; - if (empty($hidedesc)) $hidedesc = 0; - if (empty($hideref)) $hideref = 0; - if (empty($moreparams)) $moreparams = null; + if (empty($hidedetails)) { + $hidedetails = 0; + } + if (empty($hidedesc)) { + $hidedesc = 0; + } + if (empty($hideref)) { + $hideref = 0; + } + if (empty($moreparams)) { + $moreparams = null; + } $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } else { - if (empty($donotredirect)) // This is set when include is done by bulk action "Bill Orders" - { + if (empty($donotredirect)) { // This is set when include is done by bulk action "Bill Orders" setEventMessages($langs->trans("FileGenerated"), null); $urltoredirect = $_SERVER['REQUEST_URI']; @@ -104,13 +114,11 @@ if ($action == 'builddoc' && $permissiontoadd) } // Delete file in doc form -if ($action == 'remove_file' && $permissiontoadd) -{ +if ($action == 'remove_file' && $permissiontoadd) { if (!empty($upload_dir)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if (empty($object->id) || !$object->id > 0) - { + if (empty($object->id) || !$object->id > 0) { // Reload to get all modified line records and be ready for hooks $ret = $object->fetch($id); $ret = $object->fetch_thirdparty(); @@ -120,8 +128,11 @@ if ($action == 'remove_file' && $permissiontoadd) $filetodelete = GETPOST('file', 'alpha'); $file = $upload_dir.'/'.$filetodelete; $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filetodelete), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filetodelete), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", $filetodelete), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", $filetodelete), null, 'errors'); + } // Make a redirect to avoid to keep the remove_file into the url that create side effects $urltoredirect = $_SERVER['REQUEST_URI']; diff --git a/htdocs/core/actions_changeselectedfields.inc.php b/htdocs/core/actions_changeselectedfields.inc.php index 4daf53891cf..f0ead24e6b1 100644 --- a/htdocs/core/actions_changeselectedfields.inc.php +++ b/htdocs/core/actions_changeselectedfields.inc.php @@ -28,14 +28,16 @@ // $object must be defined (object is loaded in this file with fetch) // Save selection -if (GETPOST('formfilteraction', 'alphanohtml') == 'listafterchangingselectedfields') -{ +if (GETPOST('formfilteraction', 'alphanohtml') == 'listafterchangingselectedfields') { $tabparam = array(); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - if (GETPOST("selectedfields")) $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = GETPOST("selectedfields"); - else $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = ''; + if (GETPOST("selectedfields")) { + $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = GETPOST("selectedfields"); + } else { + $tabparam["MAIN_SELECTEDFIELDS_".$varpage] = ''; + } include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php index f590adee197..fc6bf11a115 100644 --- a/htdocs/core/actions_comments.inc.php +++ b/htdocs/core/actions_comments.inc.php @@ -33,19 +33,16 @@ $comment = new Comment($db); * Actions */ -if ($action == 'addcomment') -{ +if ($action == 'addcomment') { $description = GETPOST('comment_description', 'restricthtml'); - if (!empty($description)) - { + if (!empty($description)) { $comment->description = $description; $comment->datec = time(); $comment->fk_element = GETPOST('id', 'int'); $comment->element_type = GETPOST('comment_element_type', 'alpha'); $comment->fk_user_author = $user->id; $comment->entity = $conf->entity; - if ($comment->create($user) > 0) - { + if ($comment->create($user) > 0) { setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; @@ -55,13 +52,10 @@ if ($action == 'addcomment') } } } -if ($action === 'updatecomment') -{ - if ($comment->fetch($idcomment) >= 0) - { +if ($action === 'updatecomment') { + if ($comment->fetch($idcomment) >= 0) { $comment->description = GETPOST('comment_description', 'restricthtml'); - if ($comment->update($user) > 0) - { + if ($comment->update($user) > 0) { setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1#comment' : '')); exit; @@ -71,12 +65,9 @@ if ($action === 'updatecomment') } } } -if ($action == 'deletecomment') -{ - if ($comment->fetch($idcomment) >= 0) - { - if ($comment->delete($user) > 0) - { +if ($action == 'deletecomment') { + if ($comment->fetch($idcomment) >= 0) { + if ($comment->delete($user) > 0) { setEventMessages($langs->trans("CommentDeleted"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index 2dd2588ca48..a7ac035506f 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -30,16 +30,16 @@ $dellinkid = GETPOST('dellinkid', 'int'); $addlinkid = GETPOST('idtolinkto', 'int'); // Link invoice to order -if ($action == 'addlink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $id > 0 && $addlinkid > 0) -{ +if ($action == 'addlink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $id > 0 && $addlinkid > 0) { $object->fetch($id); $object->fetch_thirdparty(); $result = $object->add_object_linked(GETPOST('addlink', 'alpha'), $addlinkid); } // Delete link -if ($action == 'dellink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $dellinkid > 0) -{ +if ($action == 'dellink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $dellinkid > 0) { $result = $object->deleteObjectLinked(0, '', 0, '', $dellinkid); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 7ba4d7d64b9..b03c2c3d192 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -31,91 +31,85 @@ $extrasize = GETPOST('size', 'intcomma'); $type = GETPOST('type', 'alpha'); $param = GETPOST('param', 'alpha'); -if ($type == 'double' && strpos($extrasize, ',') === false) $extrasize = '24,8'; -if ($type == 'date') $extrasize = ''; -if ($type == 'datetime') $extrasize = ''; -if ($type == 'select') $extrasize = ''; +if ($type == 'double' && strpos($extrasize, ',') === false) { + $extrasize = '24,8'; +} +if ($type == 'date') { + $extrasize = ''; +} +if ($type == 'datetime') { + $extrasize = ''; +} +if ($type == 'select') { + $extrasize = ''; +} // Add attribute -if ($action == 'add') -{ - if (GETPOST("button") != $langs->trans("Cancel")) - { +if ($action == 'add') { + if (GETPOST("button") != $langs->trans("Cancel")) { // Check values - if (!$type) - { + if (!$type) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); $action = 'create'; } - if ($type == 'varchar' && $extrasize <= 0) - { + if ($type == 'varchar' && $extrasize <= 0) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); $action = 'edit'; } - if ($type == 'varchar' && $extrasize > $maxsizestring) - { + if ($type == 'varchar' && $extrasize > $maxsizestring) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); $action = 'create'; } - if ($type == 'int' && $extrasize > $maxsizeint) - { + if ($type == 'int' && $extrasize > $maxsizeint) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); $action = 'create'; } - if ($type == 'select' && !$param) - { + if ($type == 'select' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForSelectType"); $action = 'create'; } - if ($type == 'sellist' && !$param) - { + if ($type == 'sellist' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForSelectListType"); $action = 'create'; } - if ($type == 'checkbox' && !$param) - { + if ($type == 'checkbox' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForCheckBoxType"); $action = 'create'; } - if ($type == 'link' && !$param) - { + if ($type == 'link' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForLinkType"); $action = 'create'; } - if ($type == 'radio' && !$param) - { + if ($type == 'radio' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForRadioType"); $action = 'create'; } - if ((($type == 'radio') || ($type == 'checkbox')) && $param) - { + if ((($type == 'radio') || ($type == 'checkbox')) && $param) { // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { if (!empty($param_ligne)) { - if (preg_match_all('/,/', $param_ligne, $matches)) - { + if (preg_match_all('/,/', $param_ligne, $matches)) { if (count($matches[0]) > 1) { $error++; $langs->load("errors"); @@ -160,14 +154,12 @@ if ($action == 'add') $parameters_array = explode("\r\n", $parameters); //In sellist we have only one line and it can have come to do SQL expression if ($type == 'sellist' || $type == 'chkbxlst') { - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { $params['options'] = array($parameters=>null); } } else { // Else it's separated key/value and coma list - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { list($key, $value) = explode(',', $param_ligne); $params['options'][$key] = $value; } @@ -175,7 +167,9 @@ if ($action == 'add') // Visibility: -1=not visible by default in list, 1=visible, 0=hidden $visibility = GETPOST('list', 'alpha'); - if ($type == 'separate') $visibility = 3; + if ($type == 'separate') { + $visibility = 3; + } $result = $extrafields->addExtraField( GETPOST('attrname', 'aZ09'), @@ -199,8 +193,7 @@ if ($action == 'add') (GETPOST('totalizable', 'alpha') ? 1 : 0), GETPOST('printable', 'alpha') ); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -223,77 +216,64 @@ if ($action == 'add') } // Rename field -if ($action == 'update') -{ - if (GETPOST("button") != $langs->trans("Cancel")) - { +if ($action == 'update') { + if (GETPOST("button") != $langs->trans("Cancel")) { // Check values - if (!$type) - { + if (!$type) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")); $action = 'edit'; } - if ($type == 'varchar' && $extrasize <= 0) - { + if ($type == 'varchar' && $extrasize <= 0) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Size")); $action = 'edit'; } - if ($type == 'varchar' && $extrasize > $maxsizestring) - { + if ($type == 'varchar' && $extrasize > $maxsizestring) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorSizeTooLongForVarcharType", $maxsizestring); $action = 'edit'; } - if ($type == 'int' && $extrasize > $maxsizeint) - { + if ($type == 'int' && $extrasize > $maxsizeint) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorSizeTooLongForIntType", $maxsizeint); $action = 'edit'; } - if ($type == 'select' && !$param) - { + if ($type == 'select' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForSelectType"); $action = 'edit'; } - if ($type == 'sellist' && !$param) - { + if ($type == 'sellist' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForSelectListType"); $action = 'edit'; } - if ($type == 'checkbox' && !$param) - { + if ($type == 'checkbox' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForCheckBoxType"); $action = 'edit'; } - if ($type == 'radio' && !$param) - { + if ($type == 'radio' && !$param) { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorNoValueForRadioType"); $action = 'edit'; } - if ((($type == 'radio') || ($type == 'checkbox')) && $param) - { + if ((($type == 'radio') || ($type == 'checkbox')) && $param) { // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { if (!empty($param_ligne)) { - if (preg_match_all('/,/', $param_ligne, $matches)) - { + if (preg_match_all('/,/', $param_ligne, $matches)) { if (count($matches[0]) > 1) { $error++; $langs->load("errors"); @@ -329,24 +309,20 @@ if ($action == 'update') } } - if (!$error) - { - if (GETPOSTISSET("attrname") && preg_match("/^\w[a-zA-Z0-9-_]*$/", GETPOST('attrname', 'aZ09')) && !is_numeric(GETPOST('attrname', 'aZ09'))) - { + if (!$error) { + if (GETPOSTISSET("attrname") && preg_match("/^\w[a-zA-Z0-9-_]*$/", GETPOST('attrname', 'aZ09')) && !is_numeric(GETPOST('attrname', 'aZ09'))) { $pos = GETPOST('pos', 'int'); // Construct array for parameter (value of select list) $parameters = $param; $parameters_array = explode("\r\n", $parameters); //In sellist we have only one line and it can have come to do SQL expression if ($type == 'sellist' || $type == 'chkbxlst') { - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { $params['options'] = array($parameters=>null); } } else { //Esle it's separated key/value and coma list - foreach ($parameters_array as $param_ligne) - { + foreach ($parameters_array as $param_ligne) { list($key, $value) = explode(',', $param_ligne); $params['options'][$key] = $value; } @@ -354,7 +330,9 @@ if ($action == 'update') // Visibility: -1=not visible by default in list, 1=visible, 0=hidden $visibility = GETPOST('list', 'alpha'); - if ($type == 'separate') $visibility = 3; + if ($type == 'separate') { + $visibility = 3; + } // Example: is_object($object) ? ($object->id < 10 ? round($object->id / 2, 2) : (2 * $user->id) * (int) substr($mysoc->zip, 1, 2)) : 'objnotdefined' $computedvalue = GETPOST('computed_value', 'nohtml'); @@ -409,7 +387,9 @@ if ($action == 'delete') { if ($result >= 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } else $mesg = $extrafields->error; + } else { + $mesg = $extrafields->error; + } } else { $error++; $langs->load("errors"); diff --git a/htdocs/core/actions_fetchobject.inc.php b/htdocs/core/actions_fetchobject.inc.php index c881b335f18..3ca797a9bb3 100644 --- a/htdocs/core/actions_fetchobject.inc.php +++ b/htdocs/core/actions_fetchobject.inc.php @@ -28,20 +28,15 @@ // $cancel must be defined // $id or $ref must be defined (object is loaded in this file with fetch) -if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask', 'add')))) && (empty($cancel) || $id > 0)) -{ - if (($id > 0 && is_numeric($id)) || !empty($ref)) // To discard case when id is list of ids like '1,2,3...' - { +if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask', 'add')))) && (empty($cancel) || $id > 0)) { + if (($id > 0 && is_numeric($id)) || !empty($ref)) { // To discard case when id is list of ids like '1,2,3...' $ret = $object->fetch($id, $ref); - if ($ret > 0) - { + if ($ret > 0) { $object->fetch_thirdparty(); $id = $object->id; } else { - if (empty($object->error) && !count($object->errors)) - { - if ($ret < 0) // if $ret == 0, it means not found. - { + 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 { diff --git a/htdocs/core/actions_lineupdown.inc.php b/htdocs/core/actions_lineupdown.inc.php index e5507eeafc0..5aee952292b 100644 --- a/htdocs/core/actions_lineupdown.inc.php +++ b/htdocs/core/actions_lineupdown.inc.php @@ -28,15 +28,18 @@ // $langs must be defined // $hidedetails, $hidedesc, $hideref must de defined -if ($action == 'up' && $permissiontoedit) -{ +if ($action == 'up' && $permissiontoedit) { $object->line_up(GETPOST('rowid')); // Define output language $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 ($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); @@ -50,15 +53,18 @@ if ($action == 'up' && $permissiontoedit) exit(); } -if ($action == 'down' && $permissiontoedit) -{ +if ($action == 'down' && $permissiontoedit) { $object->line_down(GETPOST('rowid')); // Define output language $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 ($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); diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index b0671bbf555..af60583118d 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -27,17 +27,16 @@ // Submit file/link -if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) -{ - if (!empty($_FILES)) - { - if (is_array($_FILES['userfile']['tmp_name'])) $userfiles = $_FILES['userfile']['tmp_name']; - else $userfiles = array($_FILES['userfile']['tmp_name']); +if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) { + if (!empty($_FILES)) { + if (is_array($_FILES['userfile']['tmp_name'])) { + $userfiles = $_FILES['userfile']['tmp_name']; + } else { + $userfiles = array($_FILES['userfile']['tmp_name']); + } - foreach ($userfiles as $key => $userfile) - { - if (empty($_FILES['userfile']['tmp_name'][$key])) - { + foreach ($userfiles as $key => $userfile) { + if (empty($_FILES['userfile']['tmp_name'][$key])) { $error++; if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); @@ -47,27 +46,24 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) } } - if (!$error) - { + if (!$error) { // Define if we have to generate thumbs or not $generatethumbs = 1; - if (GETPOST('section_dir', 'alpha')) $generatethumbs = 0; + if (GETPOST('section_dir', 'alpha')) { + $generatethumbs = 0; + } $allowoverwrite = (GETPOST('overwritefile', 'int') ? 1 : 0); - if (!empty($upload_dirold) && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + 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, $object); - } elseif (!empty($upload_dir)) - { + } elseif (!empty($upload_dir)) { $result = dol_add_file_process($upload_dir, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs, $object); } } } -} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC)) -{ +} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC)) { $link = GETPOST('link', 'alpha'); - if ($link) - { + if ($link) { if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://' && substr($link, 0, 7) != 'file://') { $link = 'http://'.$link; } @@ -77,17 +73,18 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) // Delete file/link -if ($action == 'confirm_deletefile' && $confirm == 'yes') -{ +if ($action == 'confirm_deletefile' && $confirm == 'yes') { $urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). 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. { - $urlfile = basename($urlfile); - $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; - if (!empty($upload_dirold)) $fileold = $upload_dirold."/".$urlfile; + $urlfile = basename($urlfile); + $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; + if (!empty($upload_dirold)) { + $fileold = $upload_dirold."/".$urlfile; + } } $linkid = GETPOST('linkid', 'int'); @@ -97,21 +94,20 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image) $ret = dol_delete_file($file, 0, 0, 0, (is_object($object) ? $object : null)); - if (!empty($fileold)) dol_delete_file($fileold, 0, 0, 0, (is_object($object) ? $object : null)); // Delete file using old path + if (!empty($fileold)) { + dol_delete_file($fileold, 0, 0, 0, (is_object($object) ? $object : null)); // Delete file using old path + } // If it exists, remove thumb. $regs = array(); - if (preg_match('/(\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff)$/i', $file, $regs)) - { + if (preg_match('/(\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff)$/i', $file, $regs)) { $photo_vignette = basename(preg_replace('/'.$regs[0].'/i', '', $file).'_small'.$regs[0]); - if (file_exists(dol_osencode($dirthumb.$photo_vignette))) - { + if (file_exists(dol_osencode($dirthumb.$photo_vignette))) { dol_delete_file($dirthumb.$photo_vignette); } $photo_vignette = basename(preg_replace('/'.$regs[0].'/i', '', $file).'_mini'.$regs[0]); - if (file_exists(dol_osencode($dirthumb.$photo_vignette))) - { + if (file_exists(dol_osencode($dirthumb.$photo_vignette))) { dol_delete_file($dirthumb.$photo_vignette); } } @@ -149,33 +145,27 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') 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'); $link = new Link($db); $f = $link->fetch(GETPOST('linkid', 'int')); - if ($f) - { + if ($f) { $link->url = GETPOST('link', 'alpha'); - if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://' && substr($link->url, 0, 7) != 'file://') - { + if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://' && substr($link->url, 0, 7) != 'file://') { $link->url = 'http://'.$link->url; } $link->label = GETPOST('label', 'alphanohtml'); $res = $link->update($user); - if (!$res) - { + if (!$res) { setEventMessages($langs->trans("ErrorFailedToUpdateLink", $link->label), null, 'mesgs'); } } 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)) - { + if (!empty($upload_dir)) { $filenamefrom = dol_sanitizeFileName(GETPOST('renamefilefrom', 'alpha'), '_', 0); // Do not remove accents $filenameto = dol_sanitizeFileName(GETPOST('renamefileto', 'alpha'), '_', 0); // Do not remove accents @@ -183,24 +173,23 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') // this function is also applied when we upload and when we make try to download file (by the GETPOST(filename, 'alphanohtml') call). $filenameto = dol_string_nohtmltag($filenameto); - if ($filenamefrom != $filenameto) - { + if ($filenamefrom != $filenameto) { // Security: // Disallow file with some extensions. We rename them. // Because if we put the documents directory into a directory inside web root (very bad), this allows to execute on demand arbitrary code. - if (isAFileWithExecutableContent($filenameto) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED)) - { + if (isAFileWithExecutableContent($filenameto) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED)) { // $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 $filenameto .= '.noexe'; } } - if ($filenamefrom && $filenameto) - { + if ($filenamefrom && $filenameto) { $srcpath = $upload_dir.'/'.$filenamefrom; $destpath = $upload_dir.'/'.$filenameto; @@ -208,26 +197,24 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $parameters = array('filenamefrom' => $filenamefrom, 'filenameto' => $filenameto, 'upload_dir' => $upload_dir); $reshook = $hookmanager->executeHooks('renameUploadedFile', $parameters, $object); - if (empty($reshook)) - { + if (empty($reshook)) { if (preg_match('/^\./', $filenameto)) { $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("ErrorFilenameCantStartWithDot", $filenameto), null, 'errors'); } elseif (!file_exists($destpath)) { $result = dol_move($srcpath, $destpath); - if ($result) - { + if ($result) { // Define if we have to generate thumbs or not $generatethumbs = 1; // When we rename a file from the file manager in ecm, we must not regenerate thumbs (not a problem, we do pass here) // When we rename a file from the website module, we must not regenerate thumbs (module = medias in such a case) // but when we rename from a tab "Documents", we must regenerate thumbs - if (GETPOST('modulepart') == 'medias') $generatethumbs = 0; + if (GETPOST('modulepart') == 'medias') { + $generatethumbs = 0; + } - if ($generatethumbs) - { - if ($object->id) - { + if ($generatethumbs) { + if ($object->id) { $object->addThumbs($destpath); } @@ -250,19 +237,15 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') } // Update properties in ECM table - if (GETPOST('ecmfileid', 'int') > 0) - { + if (GETPOST('ecmfileid', 'int') > 0) { $shareenabled = GETPOST('shareenabled', 'alpha'); include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(GETPOST('ecmfileid', 'int')); - if ($result > 0) - { - if ($shareenabled) - { - if (empty($ecmfile->share)) - { + if ($result > 0) { + if ($shareenabled) { + if (empty($ecmfile->share)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true); } @@ -270,8 +253,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ecmfile->share = ''; } $result = $ecmfile->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); } } diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 6b6d5854a1d..c7954384fae 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -37,37 +37,38 @@ // Protection -if (empty($objectclass) || empty($uploaddir)) -{ +if (empty($objectclass) || empty($uploaddir)) { dol_print_error(null, 'include of actions_massactions.inc.php is done but var $objectclass or $uploaddir was not defined'); exit; } // For backward compatibility -if (!empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread; -if (!empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate; -if (!empty($permtodelete) && empty($permissiontodelete)) $permissiontodelete = $permtodelete; +if (!empty($permtoread) && empty($permissiontoread)) { + $permissiontoread = $permtoread; +} +if (!empty($permtocreate) && empty($permissiontoadd)) { + $permissiontoadd = $permtocreate; +} +if (!empty($permtodelete) && empty($permissiontodelete)) { + $permissiontodelete = $permtodelete; +} // Mass actions. Controls on number of lines checked. $maxformassaction = (empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS) ? 1000 : $conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); -if (!empty($massaction) && is_array($toselect) && count($toselect) < 1) -{ +if (!empty($massaction) && is_array($toselect) && count($toselect) < 1) { $error++; setEventMessages($langs->trans("NoRecordSelected"), null, "warnings"); } -if (!$error && is_array($toselect) && count($toselect) > $maxformassaction) -{ +if (!$error && is_array($toselect) && count($toselect) > $maxformassaction) { setEventMessages($langs->trans('TooManyRecordForMassAction', $maxformassaction), null, 'errors'); $error++; } -if (!$error && $massaction == 'confirm_presend' && !GETPOST('sendmail')) // If we do not choose button send (for example when we change template or limit), we must not send email, but keep on send email form -{ +if (!$error && $massaction == 'confirm_presend' && !GETPOST('sendmail')) { // If we do not choose button send (for example when we change template or limit), we must not send email, but keep on send email form $massaction = 'presend'; } -if (!$error && $massaction == 'confirm_presend') -{ +if (!$error && $massaction == 'confirm_presend') { $resaction = ''; $nbsent = 0; $nbignored = 0; @@ -82,27 +83,36 @@ if (!$error && $massaction == 'confirm_presend') $attachedfilesThirdpartyObj = array(); $oneemailperrecipient = (GETPOST('oneemailperrecipient') == 'on' ? 1 : 0); - if (!$error) - { + if (!$error) { $thirdparty = new Societe($db); $objecttmp = new $objectclass($db); - if ($objecttmp->element == 'expensereport') $thirdparty = new User($db); - if ($objecttmp->element == 'holiday') $thirdparty = new User($db); + if ($objecttmp->element == 'expensereport') { + $thirdparty = new User($db); + } + if ($objecttmp->element == 'holiday') { + $thirdparty = new User($db); + } - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $objecttmp = new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $listofobjectid[$toselectid] = $toselectid; $thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid); - if ($objecttmp->element == 'societe') $thirdpartyid = $objecttmp->id; - if ($objecttmp->element == 'expensereport') $thirdpartyid = $objecttmp->fk_user_author; - if ($objecttmp->element == 'holiday') $thirdpartyid = $objecttmp->fk_user; - if (empty($thirdpartyid)) $thirdpartyid = 0; + if ($objecttmp->element == 'societe') { + $thirdpartyid = $objecttmp->id; + } + if ($objecttmp->element == 'expensereport') { + $thirdpartyid = $objecttmp->fk_user_author; + } + if ($objecttmp->element == 'holiday') { + $thirdpartyid = $objecttmp->fk_user; + } + if (empty($thirdpartyid)) { + $thirdpartyid = 0; + } if ($objectclass == 'Facture') { $tmparraycontact = array(); @@ -121,41 +131,37 @@ if (!$error && $massaction == 'confirm_presend') } // Check mandatory parameters - if (GETPOST('fromtype', 'alpha') === 'user' && empty($user->email)) - { + if (GETPOST('fromtype', 'alpha') === 'user' && empty($user->email)) { $error++; setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); $massaction = 'presend'; } $receiver = $_POST['receiver']; - if (!is_array($receiver)) - { - if (empty($receiver) || $receiver == '-1') $receiver = array(); - else $receiver = array($receiver); + if (!is_array($receiver)) { + if (empty($receiver) || $receiver == '-1') { + $receiver = array(); + } else { + $receiver = array($receiver); + } } - if (!trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) // if only one recipient, receiver is mandatory - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); - $massaction = 'presend'; + if (!trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) { // if only one recipient, receiver is mandatory + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); + $massaction = 'presend'; } - if (!GETPOST('subject', 'restricthtml')) - { + if (!GETPOST('subject', 'restricthtml')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); $massaction = 'presend'; } // Loop on each recipient/thirdparty - if (!$error) - { - foreach ($listofobjectthirdparties as $thirdpartyid) - { + if (!$error) { + foreach ($listofobjectthirdparties as $thirdpartyid) { $result = $thirdparty->fetch($thirdpartyid); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db); exit; } @@ -167,21 +173,16 @@ if (!$error && $massaction == 'confirm_presend') // Define $sendto $tmparray = array(); - if (trim($_POST['sendto'])) - { + if (trim($_POST['sendto'])) { // Recipients are provided into free text $tmparray[] = trim($_POST['sendto']); } - if (count($receiver) > 0) - { - foreach ($receiver as $key=>$val) - { + if (count($receiver) > 0) { + foreach ($receiver as $key => $val) { // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party or user - { + 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; } @@ -191,26 +192,23 @@ if (!$error && $massaction == 'confirm_presend') // Define $sendtocc $receivercc = $_POST['receivercc']; - if (!is_array($receivercc)) - { - if ($receivercc == '-1') $receivercc = array(); - else $receivercc = array($receivercc); + if (!is_array($receivercc)) { + if ($receivercc == '-1') { + $receivercc = array(); + } else { + $receivercc = array($receivercc); + } } $tmparray = array(); - if (trim($_POST['sendtocc'])) - { + if (trim($_POST['sendtocc'])) { $tmparray[] = trim($_POST['sendtocc']); } - if (count($receivercc) > 0) - { - foreach ($receivercc as $key=>$val) - { + if (count($receivercc) > 0) { + foreach ($receivercc as $key => $val) { // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party - { + 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 ? } @@ -223,25 +221,21 @@ if (!$error && $massaction == 'confirm_presend') $listofqualifiedref = array(); $thirdpartywithoutemail = array(); - foreach ($listofobjectref[$thirdpartyid] as $objectid => $objectobj) - { + foreach ($listofobjectref[$thirdpartyid] as $objectid => $objectobj) { //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); - if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) - { + if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; $resaction .= '
    '.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction', $objectobj->ref).'

    '; continue; // Payment done or started or canceled } - if ($objectclass == 'Commande' && $objectobj->statut == Commande::STATUS_DRAFT) - { + if ($objectclass == 'Commande' && $objectobj->statut == Commande::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; $resaction .= '
    '.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction', $objectobj->ref).'

    '; continue; } - if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) - { + if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) { $langs->load("errors"); $nbignored++; $resaction .= '
    '.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction', $objectobj->ref).'

    '; @@ -249,23 +243,18 @@ if (!$error && $massaction == 'confirm_presend') } // Test recipient - if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) - { - if ($objectobj->element == 'societe') - { + if (empty($sendto)) { // For the case, no recipient were set (multi thirdparties send) + 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(); $contactidtosend = array(); @@ -284,27 +273,24 @@ if (!$error && $massaction == 'confirm_presend') } } - if (empty($sendto)) - { + if (empty($sendto)) { if ($objectobj->element == 'societe') { $objectobj->thirdparty = $objectobj; // Hack so following code is comaptible when objectobj is a thirdparty } - //print "No recipient for thirdparty ".$objectobj->thirdparty->name; - $nbignored++; - if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) - { + //print "No recipient for thirdparty ".$objectobj->thirdparty->name; + $nbignored++; + if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) { $resaction .= '
    '.$langs->trans('NoRecipientEmail', $objectobj->thirdparty->name).'

    '; } dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); $thirdpartywithoutemail[$objectobj->thirdparty->id] = 1; - continue; + continue; } - if ($_POST['addmaindocfile']) - { + if ($_POST['addmaindocfile']) { // TODO Use future field $objectobj->fullpathdoc to know where is stored default file - // TODO If not defined, use $objectobj->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. + // TODO If not defined, use $objectobj->model_pdf (or defaut invoice config) to know what is template to use to regenerate doc. $filename = dol_sanitizeFileName($objectobj->ref).'.pdf'; $subdir = ''; // TODO Set subdir to be compatible with multi levels dir trees @@ -313,16 +299,14 @@ if (!$error && $massaction == 'confirm_presend') $file = $filedir.'/'.$filename; // For supplier invoices, we use the file provided by supplier, not the one we generate - if ($objectobj->element == 'invoice_supplier') - { + if ($objectobj->element == 'invoice_supplier') { $fileparams = dol_most_recent_file($uploaddir.'/'.get_exdir($objectobj->id, 2, 0, 0, $objectobj, $objectobj->element).$objectobj->ref, preg_quote($objectobj->ref, '/').'([^\-])+'); $file = $fileparams['fullname']; } $mime = dol_mimetype($file); - if (dol_is_file($file)) - { + if (dol_is_file($file)) { // Create form object $attachedfilesThirdpartyObj[$thirdpartyid][$objectid] = array( 'paths'=>array($file), @@ -347,8 +331,7 @@ if (!$error && $massaction == 'confirm_presend') } // Send email if there is at least one qualified object for current thirdparty - if (count($listofqualifiedobj) > 0) - { + if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); $reg = array(); @@ -367,8 +350,7 @@ if (!$error && $massaction == 'confirm_presend') $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); - if ($obj) - { + if ($obj) { $from = $obj->label.' <'.$obj->email.'>'; } } else { @@ -380,22 +362,34 @@ if (!$error && $massaction == 'confirm_presend') $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)); - if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); - if ($objectclass == 'Facture') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); - if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); - if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); - if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - if ($objectclass == 'Project') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO)); + if ($objectclass == 'Propal') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); + } + if ($objectclass == 'Commande') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); + } + if ($objectclass == 'Facture') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); + } + if ($objectclass == 'Supplier_Proposal') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); + } + if ($objectclass == 'CommandeFournisseur') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); + } + if ($objectclass == 'FactureFournisseur') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); + } + if ($objectclass == 'Project') { + $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_PROJECT_TO)); + } // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) $looparray = array(); - if (!$oneemailperrecipient) - { + if (!$oneemailperrecipient) { $looparray = $listofqualifiedobj; - foreach ($looparray as $key => $objecttmp) - { + foreach ($looparray as $key => $objecttmp) { $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object } } else { @@ -406,11 +400,9 @@ if (!$error && $massaction == 'confirm_presend') //var_dump($looparray);exit; dol_syslog("We have set an array of ".count($looparray)." emails to send. oneemailperrecipient=".$oneemailperrecipient); //var_dump($oneemailperrecipient); var_dump($listofqualifiedobj); var_dump($listofqualifiedref); - foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object - { + foreach ($looparray as $objectid => $objecttmp) { // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object // Make substitution in email content - if (!empty($conf->projet->enabled) && method_exists($objecttmp, 'fetch_projet') && is_null($objecttmp->project)) - { + if (!empty($conf->projet->enabled) && method_exists($objecttmp, 'fetch_projet') && is_null($objecttmp->project)) { $objecttmp->fetch_projet(); } $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $objecttmp); @@ -434,12 +426,10 @@ if (!$error && $massaction == 'confirm_presend') $messagereplaced = make_substitutions($message, $substitutionarray); $attachedfiles = array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); - if ($oneemailperrecipient) - { + if ($oneemailperrecipient) { // if "one email per recipient" is check we must collate $attachedfiles by thirdparty - if (is_array($attachedfilesThirdpartyObj[$thirdparty->id]) && count($attachedfilesThirdpartyObj[$thirdparty->id])) - { - foreach ($attachedfilesThirdpartyObj[$thirdparty->id] as $keyObjId => $objAttachedFiles) { + if (is_array($attachedfilesThirdpartyObj[$thirdparty->id]) && count($attachedfilesThirdpartyObj[$thirdparty->id])) { + foreach ($attachedfilesThirdpartyObj[$thirdparty->id] as $keyObjId => $objAttachedFiles) { // Create form object $attachedfiles = array( 'paths'=>array_merge($attachedfiles['paths'], $objAttachedFiles['paths']), @@ -459,20 +449,37 @@ if (!$error && $massaction == 'confirm_presend') $mimetype = $attachedfiles['mimes']; // Define the trackid when emails sent from the mass action - if ($oneemailperrecipient) - { + if ($oneemailperrecipient) { $trackid = 'thi'.$thirdparty->id; - if ($objecttmp->element == 'expensereport') $trackid = 'use'.$thirdparty->id; - if ($objecttmp->element == 'holiday') $trackid = 'use'.$thirdparty->id; + if ($objecttmp->element == 'expensereport') { + $trackid = 'use'.$thirdparty->id; + } + if ($objecttmp->element == 'holiday') { + $trackid = 'use'.$thirdparty->id; + } } else { $trackid = strtolower(get_class($objecttmp)); - if (get_class($objecttmp) == 'Contrat') $trackid = 'con'; - if (get_class($objecttmp) == 'Propal') $trackid = 'pro'; - if (get_class($objecttmp) == 'Commande') $trackid = 'ord'; - if (get_class($objecttmp) == 'Facture') $trackid = 'inv'; - if (get_class($objecttmp) == 'Supplier_Proposal') $trackid = 'spr'; - if (get_class($objecttmp) == 'CommandeFournisseur') $trackid = 'sor'; - if (get_class($objecttmp) == 'FactureFournisseur') $trackid = 'sin'; + if (get_class($objecttmp) == 'Contrat') { + $trackid = 'con'; + } + if (get_class($objecttmp) == 'Propal') { + $trackid = 'pro'; + } + if (get_class($objecttmp) == 'Commande') { + $trackid = 'ord'; + } + if (get_class($objecttmp) == 'Facture') { + $trackid = 'inv'; + } + if (get_class($objecttmp) == 'Supplier_Proposal') { + $trackid = 'spr'; + } + if (get_class($objecttmp) == 'CommandeFournisseur') { + $trackid = 'sor'; + } + if (get_class($objecttmp) == 'FactureFournisseur') { + $trackid = 'sin'; + } $trackid .= $objecttmp->id; } @@ -480,40 +487,42 @@ if (!$error && $massaction == 'confirm_presend') //var_dump($trackid);exit; //var_dump($subjectreplaced); - if (empty($sendcontext)) $sendcontext = 'standard'; + if (empty($sendcontext)) { + $sendcontext = 'standard'; + } // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', $trackid, '', $sendcontext); - if ($mailfile->error) - { + if ($mailfile->error) { $resaction .= '
    '.$mailfile->error.'
    '; } else { $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $resaction .= $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)).'
    '; // Must not contain " $error = 0; // Insert logs into agenda - foreach ($listofqualifiedobj as $objid2 => $objectobj2) - { - if ((!$oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + foreach ($listofqualifiedobj as $objid2 => $objectobj2) { + if ((!$oneemailperrecipient) && $objid2 != $objectid) { + continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + } dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; - if ($objectclass == 'Commande') $actiontypecode='AC_COM'; - if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; - if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; - if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; - if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ + if ($objectclass == 'Commande') $actiontypecode='AC_COM'; + if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; + if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; + if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; + if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($message) - { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); + if ($message) { + if ($sendtocc) { + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); + } $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subjectreplaced); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); $actionmsg = dol_concatdesc($actionmsg, $messagereplaced); @@ -528,24 +537,40 @@ if (!$error && $massaction == 'confirm_presend') $objectobj2->elementtype = $objectobj2->element; $triggername = strtoupper(get_class($objectobj2)).'_SENTBYMAIL'; - if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; - if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; - if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; - if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL'; - if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYMAIL'; - if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; + if ($triggername == 'SOCIETE_SENTBYMAIL') { + $triggername = 'COMPANY_SENTBYMAIL'; + } + if ($triggername == 'CONTRAT_SENTBYMAIL') { + $triggername = 'CONTRACT_SENTBYMAIL'; + } + if ($triggername == 'COMMANDE_SENTBYMAIL') { + $triggername = 'ORDER_SENTBYMAIL'; + } + if ($triggername == 'FACTURE_SENTBYMAIL') { + $triggername = 'BILL_SENTBYMAIL'; + } + if ($triggername == 'EXPEDITION_SENTBYMAIL') { + $triggername = 'SHIPPING_SENTBYMAIL'; + } + if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') { + $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; + } + if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') { + $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; + } + if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') { + $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; + } - if (!empty($triggername)) - { + if (!empty($triggername)) { // Call trigger $result = $objectobj2->call_trigger($triggername, $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if ($error) - { + if ($error) { setEventMessages($db->lasterror(), $errors, 'errors'); dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } @@ -555,8 +580,7 @@ if (!$error && $massaction == 'confirm_presend') } } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto); $resaction .= '
    '.$mailfile->error.'
    '; } else { @@ -574,8 +598,7 @@ if (!$error && $massaction == 'confirm_presend') $resaction .= $langs->trans("NbIgnored").': '.($nbignored ? $nbignored : 0)."\n
    "; $resaction .= $langs->trans("NbSent").': '.($nbsent ? $nbsent : 0)."\n
    "; - if ($nbsent) - { + if ($nbsent) { $action = ''; // Do not show form post if there was at least one successfull sent //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); @@ -590,8 +613,8 @@ if (!$error && $massaction == 'confirm_presend') } } -if ($massaction == 'confirm_createbills') // Create bills from orders -{ +// TODO Move this action into commande/list.php if called only by this page. +if ($massaction == 'confirm_createbills') { // Create bills from orders. $orders = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('validate_invoices', 'int'); @@ -600,17 +623,21 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $TFactThird = array(); $nb_bills_created = 0; + $lastid= 0; + $lastref = ''; $db->begin(); - foreach ($orders as $id_order) - { + foreach ($orders as $id_order) { $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) continue; + if ($cmd->fetch($id_order) <= 0) { + continue; + } $objecttmp = new Facture($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 { + 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 { // Load extrafields of order $cmd->fetch_optionals(); @@ -620,11 +647,12 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $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; + if (empty($createbills_onebythird)) { + $objecttmp->ref_client = $cmd->ref_client; + } $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - if (empty($datefacture)) - { + if (empty($datefacture)) { $datefacture = dol_now(); } @@ -636,11 +664,14 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $res = $objecttmp->create($user); - if ($res > 0) $nb_bills_created++; + if ($res > 0) { + $nb_bills_created++; + $lastref = $objecttmp->ref; + $lastid = $objecttmp->id; + } } - if ($objecttmp->id > 0) - { + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; $sql .= "fk_source"; $sql .= ", sourcetype"; @@ -653,16 +684,13 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $sql .= ", '".$db->escape($objecttmp->element)."'"; $sql .= ")"; - if (!$db->query($sql)) - { + if (!$db->query($sql)) { $error++; } - if (!$error) - { + if (!$error) { $lines = $cmd->lines; - if (empty($lines) && method_exists($cmd, 'fetch_lines')) - { + if (empty($lines) && method_exists($cmd, 'fetch_lines')) { $cmd->fetch_lines(); $lines = $cmd->lines; } @@ -670,17 +698,14 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $desc = ($lines[$i]->desc ? $lines[$i]->desc : ''); // If we build one invoice for several order, we must put the invoice of order on the line - if (!empty($createbills_onebythird)) - { + if (!empty($createbills_onebythird)) { $desc = dol_concatdesc($desc, $langs->trans("Order").' '.$cmd->ref.' - '.dol_print_date($cmd->date, 'day')); } - if ($lines[$i]->subprice < 0) - { + if ($lines[$i]->subprice < 0) { // Negative line, we create a discount line $discount = new DiscountAbsolute($db); $discount->fk_soc = $objecttmp->socid; @@ -691,8 +716,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $discount->fk_user = $user->id; $discount->description = $desc; $discountid = $discount->create($user); - if ($discountid > 0) - { + if ($discountid > 0) { $result = $objecttmp->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); } else { @@ -705,17 +729,28 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $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; + 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; + 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) - { + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { $fk_parent_line = 0; } @@ -754,9 +789,8 @@ if ($massaction == 'confirm_createbills') // Create bills from orders 100, 0, $lines[$i]->fk_unit - ); - if ($result > 0) - { + ); + if ($result > 0) { $lineid = $result; } else { $lineid = 0; @@ -764,8 +798,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders break; } // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { + if ($result > 0 && $lines[$i]->product_type == 9) { $fk_parent_line = $result; } } @@ -775,23 +808,23 @@ if ($massaction == 'confirm_createbills') // Create bills from orders //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; - else $TFact[$objecttmp->id] = $objecttmp; + if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) { + $TFactThird[$cmd->socid] = $objecttmp; + } else { + $TFact[$objecttmp->id] = $objecttmp; + } } // Build doc with all invoices $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; $toselect = array(); - if (!$error && $validate_invoices) - { + if (!$error && $validate_invoices) { $massaction = $action = 'builddoc'; - foreach ($TAllFact as &$objecttmp) - { + foreach ($TAllFact as &$objecttmp) { $result = $objecttmp->validate($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; @@ -807,7 +840,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders // Call action to build doc $savobject = $object; - $object = $objecttmp; + $object = $objecttmp; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; $object = $savobject; } @@ -815,36 +848,88 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $massaction = $action = 'confirm_createbills'; } - if (!$error) - { + if (!$error) { $db->commit(); - setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + + if ($nb_bills_created == 1) { + $texttoshow = $langs->trans('BillXCreated', '{s1}'); + $texttoshow = str_replace('{s1}', ''.$lastref.'', $texttoshow); + setEventMessages($texttoshow, null, 'mesgs'); + } else { + setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + } // 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); + 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; @@ -858,22 +943,20 @@ if ($massaction == 'confirm_createbills') // Create bills from orders } } -if (!$error && $massaction == 'cancelorders') -{ +if (!$error && $massaction == 'cancelorders') { $db->begin(); $nbok = 0; $orders = GETPOST('toselect', 'array'); - foreach ($orders as $id_order) - { + foreach ($orders as $id_order) { $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) + if ($cmd->fetch($id_order) <= 0) { continue; + } - if ($cmd->statut != Commande::STATUS_VALIDATED) - { + if ($cmd->statut != Commande::STATUS_VALIDATED) { $langs->load('errors'); setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); $error++; @@ -883,18 +966,20 @@ if (!$error && $massaction == 'cancelorders') $result = $cmd->cancel(); } - if ($result < 0) - { + if ($result < 0) { setEventMessages($cmd->error, $cmd->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } - if (!$error) - { - if ($nbok > 1) + 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 { $db->rollback(); @@ -902,10 +987,8 @@ if (!$error && $massaction == 'cancelorders') } -if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('button_search')) -{ - if (empty($diroutputmassaction)) - { +if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('button_search')) { + if (empty($diroutputmassaction)) { dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); exit; } @@ -918,12 +1001,10 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $listofobjectid = array(); $listofobjectthirdparties = array(); $listofobjectref = array(); - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $objecttmp = new $objectclass($db); // must create new instance because instance is saved into $listofobjectref array for future use $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $listofobjectid[$toselectid] = $toselectid; $thirdpartyid = $objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid; $listofobjectthirdparties[$thirdpartyid] = $thirdpartyid; @@ -932,19 +1013,20 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto } $arrayofinclusion = array(); - foreach ($listofobjectref as $tmppdf) $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; - foreach ($listofobjectref as $tmppdf) $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files + foreach ($listofobjectref as $tmppdf) { + $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; + } + foreach ($listofobjectref as $tmppdf) { + $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files + } $listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); // build list of files with full path $files = array(); - foreach ($listofobjectref as $basename) - { + foreach ($listofobjectref as $basename) { $basename = dol_sanitizeFileName($basename); - foreach ($listoffiles as $filefound) - { - if (strstr($filefound["name"], $basename)) - { + foreach ($listoffiles as $filefound) { + if (strstr($filefound["name"], $basename)) { $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; break; } @@ -954,15 +1036,18 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto // Define output language (Here it is not used because we do only merging existing PDF) $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 = $objecttmp->thirdparty->default_lang; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + $newlang = $objecttmp->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) - { + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) { // Create output dir if not exists dol_mkdir($diroutputmassaction); @@ -971,16 +1056,21 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $filename = preg_replace('/\s/', '_', $filename); // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option == 'late') $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { + if ($option == 'late') { + $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + } else { + $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + } + if ($year) { + $filename .= '_'.$year; + } + if ($month) { + $filename .= '_'.$month; } - if ($year) $filename .= '_'.$year; - if ($month) $filename .= '_'.$month; - if (count($files) > 0) - { + if (count($files) > 0) { $now = dol_now(); $file = $diroutputmassaction.'/'.$filename.'_'.dol_print_date($now, 'dayhourlog').'.pdf'; @@ -994,8 +1084,9 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto // check if pdftk is installed if (file_exists($file)) { - if (!empty($conf->global->MAIN_UMASK)) + 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'); @@ -1014,22 +1105,21 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $pdf = pdf_getInstance($format); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } // Add all others - foreach ($files as $file) - { + foreach ($files as $file) { // Charge un document PDF depuis un fichier. $pagecount = $pdf->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) - { + for ($i = 1; $i <= $pagecount; $i++) { $tplidx = $pdf->importPage($i); $s = $pdf->getTemplatesize($tplidx); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); @@ -1045,20 +1135,26 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $filename = preg_replace('/\s/', '_', $filename); // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option == 'late') $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { + if ($option == 'late') { + $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + } else { + $filename .= '_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } } - if ($year) $filename .= '_'.$year; - if ($month) $filename .= '_'.$month; - if ($pagecount) - { + if ($year) { + $filename .= '_'.$year; + } + if ($month) { + $filename .= '_'.$month; + } + if ($pagecount) { $now = dol_now(); $file = $diroutputmassaction.'/'.$filename.'_'.dol_print_date($now, 'dayhourlog').'.pdf'; $pdf->Output($file, 'F'); - if (!empty($conf->global->MAIN_UMASK)) + 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'); @@ -1069,47 +1165,43 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto } // Remove a file from massaction area -if ($action == 'remove_file') -{ +if ($action == 'remove_file') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->load("other"); $upload_dir = $diroutputmassaction; $file = $upload_dir.'/'.GETPOST('file'); $ret = dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + } $action = ''; } // Validate records -if (!$error && $massaction == 'validate' && $permissiontoadd) -{ +if (!$error && $massaction == 'validate' && $permissiontoadd) { $objecttmp = new $objectclass($db); - if (($objecttmp->element == 'facture' || $objecttmp->element == 'invoice') && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) - { + if (($objecttmp->element == 'facture' || $objecttmp->element == 'invoice') && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { $langs->load("errors"); setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); $error++; } - if ($objecttmp->element == 'invoice_supplier' && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) - { + if ($objecttmp->element == 'invoice_supplier' && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { $langs->load("errors"); setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $result = $objecttmp->validate($user); if ($result == 0) { $langs->load("errors"); @@ -1159,10 +1251,12 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -1171,8 +1265,10 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) } } -// Closed records -if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissiontoclose) { +//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) { $db->begin(); $objecttmp = new $objectclass($db); @@ -1180,12 +1276,37 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); if ($result > 0) { - $result = $objecttmp->cloture($user, 3); + // Refuse deletion for some objects/status + if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) { + $langs->load("errors"); + $nbignored++; + $resaction .= '
    '.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction', $objecttmp->ref).'

    '; + continue; + } + + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) { + $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".((int) $objecttmp->id); + $res = $db->query($sql); + + if (!$res) { + setEventMessage('ErrorRecordParentingNotModified', 'errors'); + $error++; + } + } + + if (in_array($objecttmp->element, array('societe', 'member'))) { + $result = $objecttmp->delete($objecttmp->id, $user, 1); + } else { + $result = $objecttmp->delete($user); + } + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -1194,70 +1315,11 @@ 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'); - $db->commit(); - } 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) -{ - $db->begin(); - - $objecttmp = new $objectclass($db); - $nbok = 0; - foreach ($toselect as $toselectid) - { - $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { - // Refuse deletion for some objects/status - if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction .= '
    '.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction', $objecttmp->ref).'

    '; - continue; - } - - if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; - $res = $db->query($sql); - - if (!$res) - { - setEventMessage('ErrorRecordParentingNotModified', 'errors'); - $error++; - } - } - - if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); - else $result = $objecttmp->delete($user); - - if ($result <= 0) - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } else $nbok++; + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); } else { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; + setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); } - } - - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); $db->commit(); } else { $db->rollback(); @@ -1267,43 +1329,54 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' // Generate document foreach object according to model linked to object // @todo : propose model selection -if (!$error && $massaction == 'generate_doc' && $permissiontoread) -{ +if (!$error && $massaction == 'generate_doc' && $permissiontoread) { $db->begin(); $objecttmp = new $objectclass($db); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $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) && isset($objecttmp->thirdparty->default_lang)) $newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang = $objecttmp->default_lang; // for thirdparty - if (!empty($newlang)) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) { + $newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) { + $newlang = $objecttmp->default_lang; // for thirdparty + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } // To be sure vars is defined - if (empty($hidedetails)) $hidedetails = 0; - if (empty($hidedesc)) $hidedesc = 0; - if (empty($hideref)) $hideref = 0; - if (empty($moreparams)) $moreparams = null; + if (empty($hidedetails)) { + $hidedetails = 0; + } + if (empty($hidedesc)) { + $hidedesc = 0; + } + if (empty($hideref)) { + $hideref = 0; + } + if (empty($moreparams)) { + $moreparams = null; + } - $result = $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + $result = $objecttmp->generateDocument($objecttmp->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -1311,20 +1384,84 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordGenerated", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordGenerated", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); } } +if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd) { + $db->begin(); + + $affecttag_type=GETPOST('affecttag_type', 'alpha'); + if (!empty($affecttag_type)) { + $affecttag_type_array=explode(',', $affecttag_type); + } else { + setEventMessage('CategTypeNotFound', 'errors'); + } + if (!empty($affecttag_type_array)) { + //check if tag type submited exists into Tag Map categorie class + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $categ = new Categorie($db); + $to_affecttag_type_array=array(); + $categ_type_array=$categ->getMapList(); + foreach ($categ_type_array as $categdef) { + if (in_array($categdef['code'], $affecttag_type_array)) { + $to_affecttag_type_array[] = $categdef['code']; + } + } + + //For each valid categ type set common categ + $nbok = 0; + if (!empty($to_affecttag_type_array)) { + foreach ($to_affecttag_type_array as $categ_type) { + $contcats = GETPOST('contcats_' . $categ_type, 'array'); + //var_dump($toselect);exit; + foreach ($toselect as $toselectid) { + $result = $object->fetch($toselectid); + //var_dump($contcats);exit; + if ($result > 0) { + $result = $object->setCategoriesCommon($contcats, $categ_type, false); + if ($result > 0) { + $nbok++; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + break; + } + } + } + } + } + + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null); + } + $db->commit(); + $toselect=array(); + } else { + $db->rollback(); + } +} + $parameters['toselect'] = $toselect; $parameters['uploaddir'] = $uploaddir; $parameters['massaction'] = $massaction; $parameters['diroutputmassaction'] = $diroutputmassaction; $reshook = $hookmanager->executeHooks('doMassActions', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} diff --git a/htdocs/core/actions_printing.inc.php b/htdocs/core/actions_printing.inc.php index 3838e6963ab..de415bb4ba3 100644 --- a/htdocs/core/actions_printing.inc.php +++ b/htdocs/core/actions_printing.inc.php @@ -55,16 +55,15 @@ if ($action == 'print_file' && $user->rights->printing->read) { $subdir = ''; $module = GETPOST('printer', 'alpha'); - switch ($module) - { - case 'livraison' : + switch ($module) { + case 'livraison': $subdir = 'receipt'; $module = 'expedition'; break; - case 'expedition' : + case 'expedition': $subdir = 'sending'; break; - case 'commande_fournisseur' : + case 'commande_fournisseur': $module = 'fournisseur'; $subdir = 'commande'; break; @@ -75,20 +74,20 @@ if ($action == 'print_file' && $user->rights->printing->read) { //print '
    '.print_r($printer->errors, true).'
    '; setEventMessages($printer->error, $printer->errors, 'errors'); } - if ($ret == 0) - { + if ($ret == 0) { //print '
    '.print_r($printer->errors, true).'
    '; 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'); } } } - if ($printerfound == 0) setEventMessages($langs->trans("NoActivePrintingModuleFound", $langs->transnoentities("Module64000Name")), null, 'warnings'); + if ($printerfound == 0) { + setEventMessages($langs->trans("NoActivePrintingModuleFound", $langs->transnoentities("Module64000Name")), null, 'warnings'); + } } else { setEventMessages($langs->trans("NoModuleFound"), null, 'warnings'); } diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 0be919de0dd..d05985b1aa3 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -33,8 +33,7 @@ /* * Add file in email form */ -if (GETPOST('addfile', 'alpha')) -{ +if (GETPOST('addfile', 'alpha')) { $trackid = GETPOST('trackid', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -50,8 +49,7 @@ if (GETPOST('addfile', 'alpha')) /* * Remove file in email form */ -if (!empty($_POST['removedfile']) && empty($_POST['removAll'])) -{ +if (!empty($_POST['removedfile']) && empty($_POST['removAll'])) { $trackid = GETPOST('trackid', 'aZ09'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -69,24 +67,28 @@ if (!empty($_POST['removedfile']) && empty($_POST['removAll'])) /* * Remove all files in email form */ -if (GETPOST('removAll', 'alpha')) -{ +if (GETPOST('removAll', 'alpha')) { $trackid = GETPOST('trackid', 'aZ09'); $listofpaths = array(); $listofnames = array(); $listofmimes = array(); $keytoavoidconflict = empty($trackid) ? '' : '-'.$trackid; - if (!empty($_SESSION["listofpaths".$keytoavoidconflict])) $listofpaths = explode(';', $_SESSION["listofpaths".$keytoavoidconflict]); - if (!empty($_SESSION["listofnames".$keytoavoidconflict])) $listofnames = explode(';', $_SESSION["listofnames".$keytoavoidconflict]); - if (!empty($_SESSION["listofmimes".$keytoavoidconflict])) $listofmimes = explode(';', $_SESSION["listofmimes".$keytoavoidconflict]); + if (!empty($_SESSION["listofpaths".$keytoavoidconflict])) { + $listofpaths = explode(';', $_SESSION["listofpaths".$keytoavoidconflict]); + } + if (!empty($_SESSION["listofnames".$keytoavoidconflict])) { + $listofnames = explode(';', $_SESSION["listofnames".$keytoavoidconflict]); + } + if (!empty($_SESSION["listofmimes".$keytoavoidconflict])) { + $listofmimes = explode(';', $_SESSION["listofmimes".$keytoavoidconflict]); + } include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->trackid = $trackid; - foreach ($listofpaths as $key => $value) - { + foreach ($listofpaths as $key => $value) { $pathtodelete = $value; $filetodelete = $listofnames[$key]; $result = dol_delete_file($pathtodelete, 1); // Delete uploded Files @@ -101,50 +103,58 @@ if (GETPOST('removAll', 'alpha')) /* * Send mail */ -if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST['removAll'] && !$_POST['removedfile'] && !$_POST['cancel'] && !$_POST['modelselected']) -{ - if (empty($trackid)) $trackid = GETPOST('trackid', 'aZ09'); +if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST['removAll'] && !$_POST['removedfile'] && !$_POST['cancel'] && !$_POST['modelselected']) { + if (empty($trackid)) { + $trackid = GETPOST('trackid', 'aZ09'); + } - $subject = ''; $actionmsg = ''; $actionmsg2 = ''; + $subject = ''; + $actionmsg = ''; + $actionmsg2 = ''; $langs->load('mails'); - if (is_object($object)) - { + if (is_object($object)) { $result = $object->fetch($id); $sendtosocid = 0; // Id of related thirdparty - if (method_exists($object, "fetch_thirdparty") && !in_array($object->element, array('member', 'user', 'expensereport', 'societe', 'contact'))) - { + if (method_exists($object, "fetch_thirdparty") && !in_array($object->element, array('member', 'user', 'expensereport', 'societe', 'contact'))) { $resultthirdparty = $object->fetch_thirdparty(); $thirdparty = $object->thirdparty; - if (is_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') - { + if ($object->socid > 0) { + $sendtosocid = $object->socid; + } + } 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') - { + if ($object->socid > 0) { + $sendtosocid = $object->socid; + } + } elseif ($object->element == 'societe') { $thirdparty = $object; - if (is_object($thirdparty) && $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) { $contact->fetch_thirdparty(); $thirdparty = $contact->thirdparty; - if (is_object($thirdparty) && $thirdparty->id > 0) $sendtosocid = $thirdparty->id; + 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"); + } else { + dol_print_error('', "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported"); + } - if (is_object($hookmanager)) - { + 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 } @@ -152,8 +162,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $thirdparty = $mysoc; } - if ($result > 0) - { + if ($result > 0) { $sendto = ''; $sendtocc = ''; $sendtobcc = ''; @@ -163,48 +172,40 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST // Define $sendto $receiver = $_POST['receiver']; - if (!is_array($receiver)) - { - if ($receiver == '-1') $receiver = array(); - else $receiver = array($receiver); + if (!is_array($receiver)) { + if ($receiver == '-1') { + $receiver = array(); + } else { + $receiver = array($receiver); + } } $tmparray = array(); - if (trim($_POST['sendto'])) - { + if (trim($_POST['sendto'])) { // Recipients are provided into free text $tmparray[] = trim($_POST['sendto']); } - if (count($receiver) > 0) - { + if (count($receiver) > 0) { // Recipient was provided from combo list - foreach ($receiver as $key=>$val) - { - if ($val == 'thirdparty') // Key selected means current third party ('thirdparty' may be used for current member or current user too) - { + foreach ($receiver as $key => $val) { + 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.'>'; - } - elseif ($val == 'contact') // Key selected means current contact - { + } elseif ($val == 'contact') { // Key selected means current contact $tmparray[] = dol_string_nospecial($contact->getFullName($langs), ' ', array(",")).' <'.$contact->email.'>'; $sendtoid[] = $contact->id; - } elseif ($val) // $val is the Id of a contact - { + } elseif ($val) { // $val is the Id of a contact $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = ((int) $val); } } } - if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) - { + if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) { $receiveruser = $_POST['receiveruser']; - if (is_array($receiveruser) && count($receiveruser) > 0) - { + if (is_array($receiveruser) && count($receiveruser) > 0) { $fuserdest = new User($db); - foreach ($receiveruser as $key=>$val) - { + foreach ($receiveruser as $key => $val) { $tmparray[] = $fuserdest->user_get_property($val, 'email'); $sendtouserid[] = $val; } @@ -215,32 +216,27 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST // Define $sendtocc $receivercc = $_POST['receivercc']; - if (!is_array($receivercc)) - { - if ($receivercc == '-1') $receivercc = array(); - else $receivercc = array($receivercc); + if (!is_array($receivercc)) { + if ($receivercc == '-1') { + $receivercc = array(); + } else { + $receivercc = array($receivercc); + } } $tmparray = array(); - if (trim($_POST['sendtocc'])) - { + if (trim($_POST['sendtocc'])) { $tmparray[] = trim($_POST['sendtocc']); } - if (count($receivercc) > 0) - { - foreach ($receivercc 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 (count($receivercc) > 0) { + foreach ($receivercc as $key => $val) { + if ($val == 'thirdparty') { // Key selected means current thirdparty (may be usd for current member or current user too) + // Recipient was provided from combo list $tmparray[] = dol_string_nospecial($thirdparty->name, ' ', array(",")).' <'.$thirdparty->email.'>'; - } - // Recipient was provided from combo list - elseif ($val == 'contact') // Key selected means current contact - { + } elseif ($val == 'contact') { // Key selected means current contact + // Recipient was provided from combo list $tmparray[] = dol_string_nospecial($contact->name, ' ', array(",")).' <'.$contact->email.'>'; //$sendtoid[] = $contact->id; TODO Add also id of contact in CC ? - } elseif ($val) // $val is the Id of a contact - { + } elseif ($val) { // $val is the Id of a contact $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = ((int) $val); TODO Add also id of contact in CC ? } @@ -249,11 +245,9 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST if (!empty($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT)) { $receiverccuser = $_POST['receiverccuser']; - if (is_array($receiverccuser) && count($receiverccuser) > 0) - { + if (is_array($receiverccuser) && count($receiverccuser) > 0) { $fuserdest = new User($db); - foreach ($receiverccuser as $key=>$val) - { + foreach ($receiverccuser as $key => $val) { $tmparray[] = $fuserdest->user_get_property($val, 'email'); $sendtoccuserid[] = $val; } @@ -261,8 +255,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST } $sendtocc = implode(',', $tmparray); - if (dol_strlen($sendto)) - { + 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 @@ -291,8 +284,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $sql .= ' WHERE rowid = '.(int) $reg[1]; $resql = $db->query($sql); $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $from = dol_string_nospecial($obj->label, ' ', array(",")).' <'.$obj->email.'>'; } } else { @@ -312,21 +304,20 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $sendtobcc = GETPOST('sendtoccc'); // Autocomplete the $sendtobcc // $autocopy can be MAIN_MAIL_AUTOCOPY_PROPOSAL_TO, MAIN_MAIL_AUTOCOPY_ORDER_TO, MAIN_MAIL_AUTOCOPY_INVOICE_TO, MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO... - if (!empty($autocopy)) - { + if (!empty($autocopy)) { $sendtobcc .= (empty($conf->global->$autocopy) ? '' : (($sendtobcc ? ", " : "").$conf->global->$autocopy)); } $deliveryreceipt = $_POST['deliveryreceipt']; - if ($action == 'send' || $action == 'relance') - { + if ($action == 'send' || $action == 'relance') { $actionmsg2 = $langs->transnoentities('MailSentBy').' '.CMailFile::getValidAddress($from, 4, 0, 1).' '.$langs->transnoentities('at').' '.CMailFile::getValidAddress($sendto, 4, 0, 1); - if ($message) - { + if ($message) { $actionmsg = $langs->transnoentities('MailFrom').': '.dol_escape_htmltag($from); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTo').': '.dol_escape_htmltag($sendto)); - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".dol_escape_htmltag($sendtocc)); + if ($sendtocc) { + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".dol_escape_htmltag($sendtocc)); + } $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); $actionmsg = dol_concatdesc($actionmsg, $message); @@ -343,50 +334,6 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - // Feature to push mail sent into Sent folder - /* This code must be now included into the hook mail, method sendMailAfter - if (! empty($conf->dolimail->enabled)) - { - $mailfromid = explode("#", $_POST['frommail'],3); // $_POST['frommail'] = 'aaa#Sent# ' // TODO Use a better way to define Sent dir. - if (count($mailfromid)==0) $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; - else - { - $mbid = $mailfromid[1]; - - // IMAP Postbox - $mailboxconfig = new IMAP($db); - $mailboxconfig->fetch($mbid); - if ($mailboxconfig->mailbox_imap_host) $ref=$mailboxconfig->get_ref(); - - $mailboxconfig->folder_id=$mailboxconfig->mailbox_imap_outbox; - $mailboxconfig->userfolder_fetch(); - - if ($mailboxconfig->mailbox_save_sent_mails == 1) - { - - $folder=str_replace($ref, '', $mailboxconfig->folder_cache_key); - if (!$folder) $folder = "Sent"; // Default Sent folder - - $mailboxconfig->mbox = imap_open($mailboxconfig->get_connector_url().$folder, $mailboxconfig->mailbox_imap_login, $mailboxconfig->mailbox_imap_password); - if (false === $mailboxconfig->mbox) - { - $info = false; - $err = $langs->trans('Error3_Imap_Connection_Error'); - setEventMessages($err,$mailboxconfig->element, null, 'errors'); - } - else - { - $mailboxconfig->mailboxid=$_POST['frommail']; - $mailboxconfig->foldername=$folder; - $from = $mailfromid[0] . $mailfromid[2]; - $imap=1; - } - - } - } - } - */ - // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); $substitutionarray['__EMAIL__'] = $sendto; @@ -398,38 +345,38 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $subject = make_substitutions($subject, $substitutionarray); $message = make_substitutions($message, $substitutionarray); - if (method_exists($object, 'makeSubstitution')) - { + if (method_exists($object, 'makeSubstitution')) { $subject = $object->makeSubstitution($subject); $message = $object->makeSubstitution($message); } // Send mail (substitutionarray must be done just before this) - if (empty($sendcontext)) $sendcontext = 'standard'; + if (empty($sendcontext)) { + $sendcontext = 'standard'; + } $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', $trackid, '', $sendcontext); - if ($mailfile->error) - { + if ($mailfile->error) { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); $action = 'presend'; } else { $result = $mailfile->sendfile(); - if ($result) - { + 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 (is_object($object)) { + 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->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')...); + $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...); $object->trackid = $trackid; - $object->fk_element = $object->id; - $object->elementtype = $object->element; + $object->fk_element = $object->id; + $object->elementtype = $object->element; if (is_array($attachedfiles) && count($attachedfiles) > 0) { $object->attachedfiles = $attachedfiles; } @@ -447,13 +394,13 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $object->email_msgid = $mailfile->msgid; // Call of triggers (you should have set $triggersendname to execute trigger. $trigger_name is deprecated) - if (!empty($triggersendname) || !empty($trigger_name)) - { + if (!empty($triggersendname) || !empty($trigger_name)) { // Call trigger $result = $object->call_trigger(empty($triggersendname) ? $trigger_name : $triggersendname, $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if ($error) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -466,10 +413,12 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)); setEventMessages($mesg, null, 'mesgs'); - $moreparam = ''; - 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; + $moreparam = ''; + 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 { $langs->load("other"); $mesg = '
    '; diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index d662d3c85c9..797bb8e4cb7 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -27,93 +27,101 @@ // $nomessageinupdate can be set to 1 // $nomessageinsetmoduleoptions can be set to 1 -if ($action == 'update' && is_array($arrayofparameters)) -{ +if ($action == 'update' && is_array($arrayofparameters)) { $db->begin(); - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { // Modify constant only if key was posted (avoid resetting key to the null value) - if (GETPOSTISSET($key)) - { - $result = dolibarr_set_const($db, $key, GETPOST($key, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result < 0) - { + if (GETPOSTISSET($key)) { + if (preg_match('/category:/', $val['type'])) { + if (GETPOST($key, 'int') == '-1') { + $val_const = ''; + } else { + $val_const = GETPOST($key, 'int'); + } + } else { + $val_const = GETPOST($key, 'alpha'); + } + + $result = dolibarr_set_const($db, $key, $val_const, 'chaine', 0, '', $conf->entity); + if ($result < 0) { $error++; break; } } } - if (!$error) - { + if (!$error) { $db->commit(); - if (empty($nomessageinupdate)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + if (empty($nomessageinupdate)) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } else { $db->rollback(); - if (empty($nomessageinupdate)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); + if (empty($nomessageinupdate)) { + setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); + } } } // Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) -if ($action == 'setModuleOptions') -{ +if ($action == 'setModuleOptions') { $db->begin(); // Process common param fields - if (is_array($_POST)) - { - foreach ($_POST as $key => $val) - { + if (is_array($_POST)) { + foreach ($_POST as $key => $val) { $reg = array(); - if (preg_match('/^param(\d*)$/', $key, $reg)) // Works for POST['param'], POST['param1'], POST['param2'], ... - { + if (preg_match('/^param(\d*)$/', $key, $reg)) { // Works for POST['param'], POST['param1'], POST['param2'], ... $param = GETPOST("param".$reg[1], 'alpha'); $value = GETPOST("value".$reg[1], 'alpha'); - if ($param) - { + if ($param) { $res = dolibarr_set_const($db, $param, $value, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } } } } } // Process upload fields - if (GETPOST('upload', 'alpha') && GETPOST('keyforuploaddir', 'aZ09')) - { + if (GETPOST('upload', 'alpha') && GETPOST('keyforuploaddir', 'aZ09')) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $keyforuploaddir = GETPOST('keyforuploaddir', 'aZ09'); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->$keyforuploaddir))); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + unset($listofdir[$key]); + continue; } if (!is_dir($tmpdir)) { if (empty($nomessageinsetmoduleoptions)) { setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); } - } - else { + } else { $upload_dir = $tmpdir; } } - if ($upload_dir) - { + if ($upload_dir) { $result = dol_add_file_process($upload_dir, 1, 1, 'uploadfile', ''); - if ($result <= 0) $error++; + if ($result <= 0) { + $error++; + } } } - if (!$error) - { + if (!$error) { $db->commit(); - if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + if (empty($nomessageinsetmoduleoptions)) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } else { $db->rollback(); - if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); + 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 b9dd4194268..f2426f6523f 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -28,23 +28,29 @@ // $id must be defined (object is loaded in this file with fetch) // Set public note -if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) -{ - 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 +if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) { + 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', 'restricthtml'), ENT_QUOTES | ENT_HTML5, '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'))) - { + 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'))) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -56,13 +62,21 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } } } elseif ($action == 'setnote_private' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) { // 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 + 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', 'restricthtml'), ENT_QUOTES | ENT_HTML5), '_private'); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 41e23819266..cf619f70de6 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -27,13 +27,20 @@ * ajaxdirpreview.php?mode=nojs&action=preview&module=ecm§ion=0&file=xxx */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} -if (!isset($mode) || $mode != 'noajax') // For ajax call -{ +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'; @@ -50,12 +57,18 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $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 = "ASC"; - if (!$sortfield) $sortfield = "name"; + if (!$sortorder) { + $sortorder = "ASC"; + } + if (!$sortfield) { + $sortfield = "name"; + } $rootdirfordoc = $conf->ecm->dir_output; @@ -64,8 +77,7 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $ecmdir = new EcmDirectory($db); if ($section > 0) { $result = $ecmdir->fetch($section); - if (!$result > 0) - { + if (!$result > 0) { //dol_print_error($db,$ecmdir->error); //exit; } @@ -76,18 +88,15 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $ecmdir = new EcmDirectory($db); $relativepath = ''; - if ($section > 0) - { + if ($section > 0) { $result = $ecmdir->fetch($section); - if (!$result > 0) - { + if (!$result > 0) { dol_print_error($db, $ecmdir->error); exit; } $relativepath = $ecmdir->getRelativePath(); // Example 'mydir/' - } elseif (GETPOST('section_dir')) - { + } elseif (GETPOST('section_dir')) { $relativepath = GETPOST('section_dir'); } //var_dump($section.'-'.GETPOST('section_dir').'-'.$relativepath); @@ -95,24 +104,27 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $upload_dir = $rootdirfordoc.'/'.$relativepath; } -if (empty($url)) -{ - if (GETPOSTISSET('website')) $url = DOL_URL_ROOT.'/website/index.php'; - else $url = DOL_URL_ROOT.'/ecm/index.php'; +if (empty($url)) { + if (GETPOSTISSET('website')) { + $url = DOL_URL_ROOT.'/website/index.php'; + } else { + $url = DOL_URL_ROOT.'/ecm/index.php'; + } } // Load translation files required by the page $langs->loadLangs(array("ecm", "companies", "other")); // Security check -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} //print 'xxx'.$upload_dir; // Security: // On interdit les remontees de repertoire ainsi que les pipe dans les noms de fichiers. -if (preg_match('/\.\./', $upload_dir) || preg_match('/[<>|]/', $upload_dir)) -{ +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)); @@ -120,12 +132,12 @@ if (preg_match('/\.\./', $upload_dir) || preg_match('/[<>|]/', $upload_dir)) } // Check permissions -if ($modulepart == 'ecm') -{ - if (!$user->rights->ecm->read) accessforbidden(); +if ($modulepart == 'ecm') { + if (!$user->rights->ecm->read) { + accessforbidden(); + } } -if ($modulepart == 'medias') -{ +if ($modulepart == 'medias') { // Always allowed } @@ -142,8 +154,7 @@ if ($modulepart == 'medias') * View */ -if (!isset($mode) || $mode != 'noajax') -{ +if (!isset($mode) || $mode != 'noajax') { // Ajout directives pour resoudre bug IE header('Cache-Control: Public, must-revalidate'); header('Pragma: public'); @@ -154,25 +165,27 @@ if (!isset($mode) || $mode != 'noajax') $type = 'directory'; // This test if file exists should be useless. We keep it to find bug more easily -if (!dol_is_dir($upload_dir)) -{ +if (!dol_is_dir($upload_dir)) { //dol_mkdir($upload_dir); /*$langs->load("install"); - dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); - exit;*/ + dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); + exit;*/ } print ''."\n"; //print ''."\n"; $param = ($sortfield ? '&sortfield='.urlencode($sortfield) : '').($sortorder ? '&sortorder='.urlencode($sortorder) : ''); -if (!empty($websitekey)) $param .= '&website='.urlencode($websitekey); -if (!empty($pageid)) $param .= '&pageid='.urlencode($pageid); +if (!empty($websitekey)) { + $param .= '&website='.urlencode($websitekey); +} +if (!empty($pageid)) { + $param .= '&pageid='.urlencode($pageid); +} // Dir scan -if ($type == 'directory') -{ +if ($type == 'directory') { $formfile = new FormFile($db); $maxlengthname = 40; @@ -201,35 +214,69 @@ if ($type == 'directory') 'mrp-mo' ); + $parameters = array('modulepart'=>$module); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) { + $automodules[]=$hookmanager->resArray['module']; + } + // 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'; + 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'; + } else { + $parameters = array('modulepart'=>$module); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { + $upload_dir = $hookmanager->resArray['directory']; + } + } // Automatic list - if (in_array($module, $automodules)) - { + if (in_array($module, $automodules)) { $param .= '&module='.$module; - if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.urlencode($search_doc_ref); + 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"))); - 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); @@ -237,14 +284,12 @@ if ($type == 'directory') $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') - { + } else { + // Manual list + if ($module == 'medias') { /* - $_POST is array like - 'token' => string '062380e11b7dcd009d07318b57b71750' (length=32) + $_POST is array like + 'token' => string '062380e11b7dcd009d07318b57b71750' (length=32) 'action' => string 'file_manager' (length=12) 'website' => string 'template' (length=8) 'pageid' => string '124' (length=3) @@ -252,15 +297,20 @@ if ($type == 'directory') 'section_id' => string '0' (length=1) '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 .= '/'; + if ($relativepath && $relativepath != '/') { + $relativepath .= '/'; + } $upload_dir = $dolibarr_main_data_root.'/'.$module.'/'.$relativepath; - if (GETPOSTISSET('website') || GETPOSTISSET('file_manager')) - { + 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('/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 { @@ -269,47 +319,46 @@ if ($type == 'directory') } // If $section defined with value 0 - if (($section === '0' || empty($section)) && ($module != 'medias')) - { + 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); } - if ($section) - { + if ($section) { $param .= '§ion='.$section; - if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.$search_doc_ref; + 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")); + } 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') - { + 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) - { + } elseif ($module == 'ecm') { // DMS/ECM -> manual structure + if ($user->rights->ecm->read) { // Buttons: Preview $useinecm = 2; } - if ($user->rights->ecm->upload) - { + if ($user->rights->ecm->upload) { // Buttons: Preview + Delete $useinecm = 4; } - if ($user->rights->ecm->setup) - { + if ($user->rights->ecm->setup) { // Buttons: Preview + Delete + Edit $useinecm = 5; } @@ -335,18 +384,27 @@ if ($type == 'directory') // Bottom of page $useajax = 1; -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; +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; +} //$param.=($param?'?':'').(preg_replace('/^&/','',$param)); -if ($useajax || $action == 'delete') -{ +if ($useajax || $action == 'delete') { $urlfile = ''; - if ($action == 'delete') $urlfile = GETPOST('urlfile', 'alpha'); + if ($action == 'delete') { + $urlfile = GETPOST('urlfile', 'alpha'); + } - if (empty($section_dir)) $section_dir = GETPOST("file", "alpha"); + if (empty($section_dir)) { + $section_dir = GETPOST("file", "alpha"); + } $section_id = $section; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -358,22 +416,26 @@ if ($useajax || $action == 'delete') $formquestion['section_dir'] = array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); // We must always put field, even if empty because it is filled by javascript later $formquestion['sortfield'] = array('type'=>'hidden', 'value'=>$sortfield, 'name'=>'sortfield'); // We must always put field, even if empty because it is filled by javascript later $formquestion['sortorder'] = array('type'=>'hidden', 'value'=>$sortorder, 'name'=>'sortorder'); // We must always put field, even if empty because it is filled by javascript later - if (!empty($action) && $action == 'file_manager') $formquestion['file_manager'] = array('type'=>'hidden', 'value'=>1, 'name'=>'file_manager'); - if (!empty($websitekey)) $formquestion['website'] = array('type'=>'hidden', 'value'=>$websitekey, 'name'=>'website'); - if (!empty($pageid) && $pageid > 0) $formquestion['pageid'] = array('type'=>'hidden', 'value'=>$pageid, 'name'=>'pageid'); + if (!empty($action) && $action == 'file_manager') { + $formquestion['file_manager'] = array('type'=>'hidden', 'value'=>1, 'name'=>'file_manager'); + } + if (!empty($websitekey)) { + $formquestion['website'] = array('type'=>'hidden', 'value'=>$websitekey, 'name'=>'website'); + } + if (!empty($pageid) && $pageid > 0) { + $formquestion['pageid'] = array('type'=>'hidden', 'value'=>$pageid, 'name'=>'pageid'); + } print $form->formconfirm($url, $langs->trans("DeleteFile"), $langs->trans("ConfirmDeleteFile"), 'confirm_deletefile', $formquestion, "no", ($useajax ? 'deletefile' : 0)); } -if ($useajax) -{ +if ($useajax) { print ''; + $stringtoshow .= '
    '; // hideobject is to start hidden + $stringtoshow .= ''; + $stringtoshow .= ''; + $stringtoshow .= ''; + $stringtoshow .= ''; + $stringtoshow .= ' ' . $langs->trans("Days"); + $stringtoshow .= ''; + $stringtoshow .= ''; + $stringtoshow .= '
    '; + + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + $px1 = new DolGraph(); + + $mesg = $px1->isGraphKo(); + $totalnb = 0; + if (!$mesg) { + $data = array(); + foreach ($dataseries as $value) { + $data[] = array($value['label'], $value['data']); + $totalnb += $value['data']; + } + $px1->SetData($data); + $px1->setShowLegend(2); + $px1->SetType(array('bar')); + $px1->SetLegend(array($langs->trans('BoxNumberOfTicketByDay'))); + $px1->SetMaxValue($px1->GetCeilMaxValue()); + $px1->SetHeight(192); + $px1->SetShading(3); + $px1->SetHorizTickIncrement(1); + $px1->SetCssPrefix("cssboxes"); + $px1->mode = 'depth'; + + $px1->draw('idgraphticketlastxdays'); + $graphtoshow= $px1->show($totalnb ? 0 : 1); + } + if ($totalnb) { + $stringtoshow .= $graphtoshow; + } + $stringtoshow .= '
    '; + if ($totalnb) { + $this->info_box_contents[][]=array( + 'td' => 'center', + 'text' => $stringtoshow + ); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="center opacitymedium"', + 'text' => $stringtoshow . $langs->trans("BoxNoTicketLastXDays", $days) + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_graph_nb_tickets_type.php b/htdocs/core/boxes/box_graph_nb_tickets_type.php new file mode 100644 index 00000000000..aee3e68ee5d --- /dev/null +++ b/htdocs/core/boxes/box_graph_nb_tickets_type.php @@ -0,0 +1,212 @@ + + * 2016 Christophe Battarel + * Copyright (C) 2019-2021 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/core/boxes/box_graph_nb_tickets_type.php + * \ingroup ticket + * \brief This box shows the number of tickets types + */ +require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box + */ +class box_graph_nb_tickets_type extends ModeleBoxes +{ + + public $boxcode = "box_nb_tickets_type"; + public $boximg = "ticket"; + public $boxlabel; + public $depends = array("ticket"); + + public $param; + public $info_box_head = array(); + public $info_box_contents = array(); + + public $widgettype = 'graph'; + + + /** + * Constructor + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param = '') + { + global $langs; + $langs->load("boxes"); + $this->db = $db; + + $this->boxlabel = $langs->transnoentitiesnoconv("BoxTicketType"); + } + + /** + * Load data into info_box_contents array to show array later. + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs; + + $badgeStatus0 = '#cbd3d3'; // draft + $badgeStatus1 = '#bc9526'; // validated + $badgeStatus1b = '#bc9526'; // validated + $badgeStatus2 = '#9c9c26'; // approved + $badgeStatus3 = '#bca52b'; + $badgeStatus4 = '#25a580'; // Color ok + $badgeStatus4b = '#25a580'; // Color ok + $badgeStatus5 = '#cad2d2'; + $badgeStatus6 = '#cad2d2'; + $badgeStatus7 = '#baa32b'; + $badgeStatus8 = '#993013'; + $badgeStatus9 = '#e7f0f0'; + $text = $langs->trans("BoxTicketType"); + $this->info_box_head = array( + 'text' => $text, + 'limit' => dol_strlen($text) + ); + + $listofopplabel = array(); + $listofoppcode = array(); + $colorseriesstat = array(); + if ($user->rights->ticket->read) { + $sql = "SELECT ctt.rowid, ctt.label, ctt.code"; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_ticket_type as ctt"; + $sql .= " WHERE ctt.active = 1"; + $sql .= $this->db->order('ctt.rowid', 'ASC'); + $resql = $this->db->query($sql); + + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $objp = $this->db->fetch_object($resql); + $listofoppcode[$objp->rowid] = $objp->code; + $listofopplabel[$objp->rowid] = $objp->label; + switch ($objp->code) { + case 'COM': + $colorseriesstat[$objp->rowid] = $badgeStatus1; + break; + case 'HELP': + $colorseriesstat[$objp->rowid] = $badgeStatus2; + break; + case 'ISSUE': + $colorseriesstat[$objp->rowid] = $badgeStatus3; + break; + case 'REQUEST': + $colorseriesstat[$objp->rowid] = $badgeStatus4; + break; + case 'OTHER': + $colorseriesstat[$objp->rowid] = $badgeStatus5; + break; + default: + break; + } + $i++; + } + } else { + dol_print_error($this->db); + } + $dataseries = array(); + $data = array(); + $sql = "SELECT t.type_code, COUNT(t.type_code) as nb"; + $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; + $sql .= " WHERE t.fk_statut <> 8"; + $sql .= " GROUP BY t.type_code"; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $objp = $this->db->fetch_object($resql); + $data[$objp->type_code] = $objp->nb; + $i++; + } + foreach ($listofoppcode as $rowid => $code) { + $dataseries[] = array( + 'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_category', 'code', 'label', $code), + 'data' => (empty($data[$code]) ? 0 : $data[$code]) + ); + } + } else { + dol_print_error($this->db); + } + $stringtoprint = ''; + $stringtoprint .= '
    '; + if (!empty($dataseries) && count($dataseries) > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + $px1 = new DolGraph(); + + $mesg = $px1->isGraphKo(); + $totalnb = 0; + if (!$mesg) { + $px1->SetDataColor(array_values($colorseriesstat)); + $data = array(); + $legend = array(); + foreach ($dataseries as $value) { + $data[] = array($value['label'], $value['data']); + $totalnb += $value['data']; + } + $px1->SetData($data); + $px1->setShowLegend(2); + $px1->SetType(array('pie')); + $px1->SetLegend($legend); + $px1->SetMaxValue($px1->GetCeilMaxValue()); + $px1->SetShading(3); + $px1->SetHorizTickIncrement(1); + $px1->SetCssPrefix("cssboxes"); + $px1->mode = 'depth'; + $px1->draw('idgraphtickettype'); + $stringtoprint .= $px1->show($totalnb ? 0 : 1); + } + $stringtoprint .= '
    '; + $this->info_box_contents[][]=array( + 'td' => 'center', + 'text' => $stringtoprint + ); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="center opacitymedium"', + 'text' => $langs->trans("BoxNoTicketSeverity"), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_graph_new_vs_close_ticket.php b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php new file mode 100644 index 00000000000..bd835d6cc07 --- /dev/null +++ b/htdocs/core/boxes/box_graph_new_vs_close_ticket.php @@ -0,0 +1,181 @@ + + * 2016 Christophe Battarel + * 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 core/boxes/box_nb_ticket_last_x_days.php + * \ingroup ticket + * \brief This box shows the number of new daily tickets the last X days + */ +require_once DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box + */ +class box_graph_new_vs_close_ticket extends ModeleBoxes +{ + + public $boxcode = "box_nb_tickets_type"; + public $boximg = "ticket"; + public $boxlabel; + public $depends = array("ticket"); + + public $param; + public $info_box_head = array(); + public $info_box_contents = array(); + + public $widgettype = 'graph'; + + + /** + * Constructor + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + public function __construct($db, $param = '') + { + global $langs; + $langs->load("boxes"); + $this->db = $db; + + $this->boxlabel = $langs->transnoentitiesnoconv("BoxNewTicketVSClose"); + } + + /** + * Load data into info_box_contents array to show array later. + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf, $user, $langs; + + $badgeStatus0 = '#cbd3d3'; // draft + $badgeStatus1 = '#bc9526'; // validated + $badgeStatus1b = '#bc9526'; // validated + $badgeStatus2 = '#9c9c26'; // approved + $badgeStatus3 = '#bca52b'; + $badgeStatus4 = '#25a580'; // Color ok + $badgeStatus4b = '#25a580'; // Color ok + $badgeStatus5 = '#cad2d2'; + $badgeStatus6 = '#cad2d2'; + $badgeStatus7 = '#baa32b'; + $badgeStatus8 = '#993013'; + $badgeStatus9 = '#e7f0f0'; + $text = $langs->trans("BoxNewTicketVSClose"); + $this->info_box_head = array( + 'text' => $text, + 'limit' => dol_strlen($text) + ); + + if ($user->rights->ticket->read) { + $data = array(); + $totalnb = 0; + $sql = "SELECT COUNT(t.datec) as nb"; + $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; + $sql .= " WHERE CAST(t.datec AS DATE) = CURRENT_DATE"; + $sql .= " AND t.fk_statut <> 8"; + $sql .= " GROUP BY CAST(t.datec AS DATE)"; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + if ($num > 0) { + $objp = $this->db->fetch_object($resql); + $data[] = array($langs->trans('TicketCreatedToday'), $objp->nb); + $totalnb += $objp->nb; + } else { + $data[] = array($langs->trans('TicketCreatedToday'), 0); + } + } else { + dol_print_error($this->db); + } + $sql = "SELECT COUNT(t.date_close) as nb"; + $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; + $sql .= " WHERE CAST(t.date_close AS DATE) = CURRENT_DATE"; + $sql .= " AND t.fk_statut = 8"; + $sql .= " GROUP BY CAST(t.date_close AS DATE)"; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + if ($num > 0) { + $objp = $this->db->fetch_object($resql); + $data[] = array($langs->trans('TicketClosedToday'), $objp->nb); + $totalnb += $objp->nb; + } else { + $data[] = array($langs->trans('TicketClosedToday'), 0); + } + } else { + dol_print_error($this->db); + } + $colorseries = array(); + $colorseries[] = $badgeStatus8; + $colorseries[] = $badgeStatus2; + $stringtoprint = ''; + $stringtoprint .= '
    '; + if (!empty($data) && count($data) > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + $px1 = new DolGraph(); + $mesg = $px1->isGraphKo(); + if (!$mesg) { + $px1->SetDataColor(array_values($colorseries)); + $px1->SetData($data); + $px1->setShowLegend(2); + $px1->SetType(array('pie')); + $px1->SetMaxValue($px1->GetCeilMaxValue()); + $px1->SetShading(3); + $px1->SetHorizTickIncrement(1); + $px1->SetCssPrefix("cssboxes"); + $px1->mode = 'depth'; + + $px1->draw('idgraphticketnewvsclosetoday'); + $stringtoprint .= $px1->show($totalnb ? 0 : 1); + } + $stringtoprint .= '
    '; + $this->info_box_contents[][]=array( + 'td' => 'center', + 'text' => $stringtoprint + ); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="center opacitymedium"', + 'text' => $langs->trans("BoxNoTicketSeverity"), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @return string + */ + public function showBox($head = null, $contents = null, $nooutput = 0) + { + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); + } +} diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index df6a9f5c18e..48f0bd67ec3 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -41,6 +41,8 @@ class box_graph_orders_permonth extends ModeleBoxes public $info_box_head = array(); public $info_box_contents = array(); + public $widgettype = 'graph'; + /** * Constructor @@ -75,7 +77,9 @@ class box_graph_orders_permonth extends ModeleBoxes //$commandestatic=new Commande($this->db); $startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1; - if (empty($conf->global->GRAPH_USE_FISCAL_YEAR)) $startmonth = 1; + if (empty($conf->global->GRAPH_USE_FISCAL_YEAR)) { + $startmonth = 1; + } $text = $langs->trans("BoxCustomersOrdersPerMonth", $max); $this->info_box_head = array( @@ -92,11 +96,14 @@ class box_graph_orders_permonth extends ModeleBoxes $dir = ''; // We don't need a path because image file will not be saved into disk $prefix = ''; $socid = 0; - if ($user->socid) $socid = $user->socid; - if (!$user->rights->societe->client->voir || $socid) $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user + if ($user->socid) { + $socid = $user->socid; + } + if (!$user->rights->societe->client->voir || $socid) { + $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user + } - if ($user->rights->commande->lire) - { + if ($user->rights->commande->lire) { $langs->load("orders"); $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; @@ -106,21 +113,25 @@ class box_graph_orders_permonth extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) - { + if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOST($param_year, 'int'); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); - $endyear = $tmparray['year']; - $shownb = $tmparray['shownb']; - $showtot = $tmparray['showtot']; + $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); + $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); + $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); + } + if (empty($shownb) && empty($showtot)) { + $shownb = 1; + $showtot = 1; } - if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; } $nowarray = dol_getdate(dol_now(), true); - if (empty($endyear)) $endyear = $nowarray['year']; - $startyear = $endyear - (empty($conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH) ? 1 : $conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH); + if (empty($endyear)) { + $endyear = $nowarray['year']; + } + $startyear = $endyear - (empty($conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH) ? 2 : ($conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH - 1)); $mode = 'customer'; $WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '256' : '320'; @@ -129,27 +140,25 @@ class box_graph_orders_permonth extends ModeleBoxes $stats = new CommandeStats($this->db, $socid, $mode, 0); // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) - if ($shownb) - { + if ($shownb) { $data1 = $stats->getNbByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), ($WIDTH < 300 ? 2 : 0), $startmonth); $filenamenb = $dir."/".$prefix."ordersnbinyear-".$endyear.".png"; // default value for customer mode $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$endyear.'.png'; - if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$endyear.'.png'; + if ($mode == 'supplier') { + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$endyear.'.png'; + } $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); - if (!$mesg) - { + if (!$mesg) { $px1->SetData($data1); unset($data1); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { - if ($startmonth != 1) - { + while ($i <= $endyear) { + if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); } else { $legend[] = $i; @@ -172,26 +181,25 @@ class box_graph_orders_permonth extends ModeleBoxes } // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) - if ($showtot) - { + if ($showtot) { $data2 = $stats->getAmountByMonthWithPrevYear($endyear, $startyear, (GETPOST('action', 'aZ09') == $refreshaction ?-1 : (3600 * 24)), ($WIDTH < 300 ? 2 : 0), $startmonth); $filenamenb = $dir."/".$prefix."ordersamountinyear-".$endyear.".png"; // default value for customer mode $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$endyear.'.png'; - if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$endyear.'.png'; + if ($mode == 'supplier') { + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$endyear.'.png'; + } $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); - if (!$mesg) - { + if (!$mesg) { $px2->SetData($data2); unset($data2); - $i = $startyear; $legend = array(); - while ($i <= $endyear) - { - if ($startmonth != 1) - { + $i = $startyear; + $legend = array(); + while ($i <= $endyear) { + if ($startmonth != 1) { $legend[] = sprintf("%d/%d", $i - 2001, $i - 2000); } else { $legend[] = $i; @@ -213,14 +221,12 @@ class box_graph_orders_permonth extends ModeleBoxes } } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { $langs->load("errors"); $mesg = $langs->trans("WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs"); } - if (!$mesg) - { + if (!$mesg) { $stringtoshow = ''; $stringtoshow .= ''."\n"; } - if (empty($found)) - { + if (empty($found)) { $out .= 'Error, unknown value for tool '.$this->tool.' in DolEditor Create function.'; } - if ($noprint) return $out; - else print $out; + if ($noprint) { + return $out; + } else { + print $out; + } } } diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 98fbe62e4c5..b4218bbfd40 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -46,54 +46,49 @@ class DolGeoIP global $conf; $geoipversion = '2'; // 'php', or '2' - if (!empty($conf->global->GEOIP_VERSION)) $geoipversion = $conf->global->GEOIP_VERSION; + if (!empty($conf->global->GEOIP_VERSION)) { + $geoipversion = $conf->global->GEOIP_VERSION; + } - if ($type == 'country') - { + if ($type == 'country') { // geoip may have been already included with PEAR - if ($geoipversion == '2' || ($geoipversion != 'php' && !function_exists('geoip_country_code_by_name'))) - { + if ($geoipversion == '2' || ($geoipversion != 'php' && !function_exists('geoip_country_code_by_name'))) { 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'))) - { + 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)) - { + if (empty($type) || empty($datfile)) { $this->errorlabel = 'Constructor was called with no datafile parameter'; dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } - if (!file_exists($datfile) || !is_readable($datfile)) - { + if (!file_exists($datfile) || !is_readable($datfile)) { $this->error = 'ErrorGeoIPClassNotInitialized'; $this->errorlabel = "Datafile ".$datfile." not found"; dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } - if ($geoipversion == '2') - { + if ($geoipversion == '2') { 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); - } - elseif (function_exists('geoip_country_code_by_name')) { + } elseif (function_exists('geoip_country_code_by_name')) { $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(); @@ -113,21 +108,19 @@ class DolGeoIP global $conf; $geoipversion = '2'; // 'php', or '2' - if (!empty($conf->global->GEOIP_VERSION)) $geoipversion = $conf->global->GEOIP_VERSION; + if (!empty($conf->global->GEOIP_VERSION)) { + $geoipversion = $conf->global->GEOIP_VERSION; + } - if (empty($this->gi)) - { + if (empty($this->gi)) { return ''; } - if ($this->gi == 'NOGI') - { + if ($this->gi == 'NOGI') { // geoip_country_code_by_addr does not exists return strtolower(geoip_country_code_by_name($ip)); } else { - if (preg_match('/^[0-9]+.[0-9]+\.[0-9]+\.[0-9]+/', $ip)) - { - if ($geoipversion == '2') - { + if (preg_match('/^[0-9]+.[0-9]+\.[0-9]+\.[0-9]+/', $ip)) { + if ($geoipversion == '2') { try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); @@ -136,12 +129,13 @@ class DolGeoIP return ''; } } else { - if (!function_exists('geoip_country_code_by_addr')) return strtolower(geoip_country_code_by_name($this->gi, $ip)); + if (!function_exists('geoip_country_code_by_addr')) { + return strtolower(geoip_country_code_by_name($ip)); + } return strtolower(geoip_country_code_by_addr($this->gi, $ip)); } } else { - if ($geoipversion == '2') - { + if ($geoipversion == '2') { try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); @@ -150,7 +144,9 @@ class DolGeoIP return ''; } } else { - if (!function_exists('geoip_country_code_by_addr_v6')) return strtolower(geoip_country_code_by_name_v6($this->gi, $ip)); + 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)); } } @@ -168,15 +164,15 @@ class DolGeoIP global $conf; $geoipversion = '2'; // 'php', or '2' - if (!empty($conf->global->GEOIP_VERSION)) $geoipversion = $conf->global->GEOIP_VERSION; + if (!empty($conf->global->GEOIP_VERSION)) { + $geoipversion = $conf->global->GEOIP_VERSION; + } - if (empty($this->gi)) - { + if (empty($this->gi)) { return ''; } - if ($geoipversion == '2') - { + if ($geoipversion == '2') { try { $record = $this->gi->country($name); return $record->country->isoCode; @@ -199,12 +195,16 @@ class DolGeoIP global $conf; $geoipversion = '2'; // 'php', or '2' - if (!empty($conf->global->GEOIP_VERSION)) $geoipversion = $conf->global->GEOIP_VERSION; + if (!empty($conf->global->GEOIP_VERSION)) { + $geoipversion = $conf->global->GEOIP_VERSION; + } - if ($geoipversion == 'php') - { - if ($this->gi == 'NOGI') return geoip_database_info(); - else return 'geoip_database_info() function not available'; + if ($geoipversion == 'php') { + if ($this->gi == 'NOGI') { + return geoip_database_info(); + } else { + return 'geoip_database_info() function not available'; + } } return 'Not available (not using PHP internal geo functions - We are using embedded Geoip v'.$geoipversion.')'; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 5fcc7b00c91..31c230f8d78 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -66,6 +66,7 @@ class DolGraph public $labelInterval = -1; public $hideXGrid = false; + public $hideXValues = false; public $hideYGrid = false; public $Legend = array(); @@ -75,6 +76,12 @@ class DolGraph public $showpercent = 0; public $combine = 0; // 0.05 if you want to combine records < 5% into "other" public $graph; // Objet Graph (Artichow, Phplot...) + /** + * @var boolean Mirrors graph values + */ + public $mirrorGraphValues = false; + public $tooltipsTitles = null; + public $tooltipsLabels = null; /** * @var string Error code (or message) @@ -85,6 +92,7 @@ class DolGraph public $bgcolor; // array(R,G,B) public $bgcolorgrid = array(255, 255, 255); // array(R,G,B) public $datacolor; // array(array(R,G,B),...) + public $borderwidth = 1; private $stringtoshow; // To store string to output graph into HTML page @@ -105,10 +113,16 @@ class DolGraph $color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; if (is_readable($color_file)) { - include_once $color_file; - if (isset($theme_bordercolor)) $this->bordercolor = $theme_bordercolor; - if (isset($theme_datacolor)) $this->datacolor = $theme_datacolor; - if (isset($theme_bgcolor)) $this->bgcolor = $theme_bgcolor; + include $color_file; + if (isset($theme_bordercolor)) { + $this->bordercolor = $theme_bordercolor; + } + if (isset($theme_datacolor)) { + $this->datacolor = $theme_datacolor; + } + if (isset($theme_bgcolor)) { + $this->bgcolor = $theme_bgcolor; + } } //print 'bgcolor: '.join(',',$this->bgcolor).'
    '; @@ -175,6 +189,18 @@ class DolGraph return true; } + /** + * Hide X Values + * + * @param boolean $bool XValues or not + * @return boolean true + */ + public function setHideXValues($bool) + { + $this->hideXValues = $bool; + return true; + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Hide Y grid @@ -244,9 +270,9 @@ class DolGraph // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Set data + * Set data color * - * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) + * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) or array('#......','#......'...) * @return void */ public function SetDataColor($datacolor) @@ -255,6 +281,50 @@ class DolGraph $this->datacolor = $datacolor; } + /** + * Set border color + * + * @param array $bordercolor Border Color array(array(R,G,B),array(R,G,B)...) or array('#FFFFFF','#......'...) + * @return void + */ + public function setBorderColor($bordercolor) + { + $this->bordercolor = $bordercolor; + } + + /** + * Set border width + * + * @param int $borderwidth Border Width + * @return void + */ + public function setBorderWidth($borderwidth) + { + $this->borderwidth = $borderwidth; + } + + /** + * Set tooltips labels of the graph + * + * @param array $tooltipsLabels Tooltips Labels array('...','...'...) + * @return void + */ + public function setTooltipsLabels($tooltipsLabels) + { + $this->tooltipsLabels = $tooltipsLabels; + } + + /** + * Set tooltips titles of the graph + * + * @param array $tooltipsTitles Tooltips Titles array('...','...'...) + * @return void + */ + public function setTooltipsTitles($tooltipsTitles) + { + $this->tooltipsTitles = $tooltipsTitles; + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set type @@ -408,6 +478,17 @@ class DolGraph unset($this->bgcolorgrid); } + /** + * Mirror Values of the graph + * + * @param boolean $mirrorGraphValues Mirror Values if true and doesn't if false + * @return void + */ + public function setMirrorGraphValues($mirrorGraphValues) + { + $this->mirrorGraphValues = $mirrorGraphValues; + } + /** * Is graph ko * @@ -522,7 +603,9 @@ class DolGraph public function GetMaxValueInData() { // phpcs:enable - if (!is_array($this->data)) return 0; + if (!is_array($this->data)) { + return 0; + } $k = 0; $vals = array(); @@ -549,7 +632,9 @@ class DolGraph public function GetMinValueInData() { // phpcs:enable - if (!is_array($this->data)) return 0; + if (!is_array($this->data)) { + return 0; + } $k = 0; $vals = array(); @@ -577,7 +662,9 @@ class DolGraph { // phpcs:enable $max = $this->GetMaxValueInData(); - if ($max != 0) $max++; + if ($max != 0) { + $max++; + } $size = dol_strlen(abs(ceil($max))); $factor = 1; for ($i = 0; $i < ($size - 1); $i++) { @@ -585,7 +672,9 @@ class DolGraph } $res = 0; - if (is_numeric($max)) $res = ceil($max / $factor) * $factor; + if (is_numeric($max)) { + $res = ceil($max / $factor) * $factor; + } //print "max=".$max." res=".$res; return $res; @@ -601,8 +690,12 @@ class DolGraph { // phpcs:enable $min = $this->GetMinValueInData(); - if ($min == '') $min = 0; - if ($min != 0) $min--; + if ($min == '') { + $min = 0; + } + if ($min != 0) { + $min--; + } $size = dol_strlen(abs(floor($min))); $factor = 1; for ($i = 0; $i < ($size - 1); $i++) { @@ -676,22 +769,22 @@ class DolGraph if (is_array($this->data) && is_array($this->data[0])) { $nblot = count($this->data[0]) - 1; // -1 to remove legend } - if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING); + if ($nblot < 0) { + dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING); + } $firstlot = 0; // Works with line but not with bars //if ($nblot > 2) $firstlot = ($nblot - 2); // We limit nblot to 2 because jflot can't manage more than 2 bars on same x $i = $firstlot; $serie = array(); - while ($i < $nblot) // Loop on each serie - { + while ($i < $nblot) { // Loop on each serie $values = array(); // Array with horizontal y values (specific values of a serie) for each abscisse x $serie[$i] = "var d" . $i . " = [];\n"; // Fill array $values $x = 0; - foreach ($this->data as $valarray) // Loop on each x - { + foreach ($this->data as $valarray) { // Loop on each x $legends[$x] = $valarray[0]; $values[$x] = (is_numeric($valarray[$i + 1]) ? $valarray[$i + 1] : null); $x++; @@ -699,11 +792,15 @@ class DolGraph if (isset($this->type[$firstlot]) && in_array($this->type[$firstlot], array('pie', 'piesemicircle', 'polar'))) { foreach ($values as $x => $y) { - if (isset($y)) $serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n"; + if (isset($y)) { + $serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n"; + } } } else { foreach ($values as $x => $y) { - if (isset($y)) $serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n"; + if (isset($y)) { + $serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n"; + } } } @@ -713,7 +810,9 @@ class DolGraph $tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.')))); $this->stringtoshow = '' . "\n"; - if (!empty($this->title)) $this->stringtoshow .= '
    ' . $this->title . '
    '; + if (!empty($this->title)) { + $this->stringtoshow .= '
    ' . $this->title . '
    '; + } if (!empty($this->shownographyet)) { $this->stringtoshow .= '
    '; $this->stringtoshow .= '
    ' . $langs->trans("NotEnoughDataYet") . '...
    '; @@ -722,7 +821,9 @@ class DolGraph // Start the div that will contains all the graph $dolxaxisvertical = ''; - if (count($this->data) > 20) $dolxaxisvertical = 'dol-xaxis-vertical'; + if (count($this->data) > 20) { + $dolxaxisvertical = 'dol-xaxis-vertical'; + } $this->stringtoshow .= '
    ' . "\n"; $this->stringtoshow .= ''; + $out .= ' });'."\n"; + $out .= ' });'."\n"; + $out .= '});'."\n"; + $out .= ''."\n"; } } } @@ -1979,42 +2038,48 @@ class ExtraFields $nofillrequired = 0; // For error when required field left blank $error_field_required = array(); - if (is_array($this->attributes[$object->table_element]['label'])) $extralabels = $this->attributes[$object->table_element]['label']; + if (isset($this->attributes[$object->table_element]['label']) && is_array($this->attributes[$object->table_element]['label'])) { + $extralabels = $this->attributes[$object->table_element]['label']; + } - if (is_array($extralabels)) - { + if (is_array($extralabels)) { // Get extra fields - foreach ($extralabels as $key => $value) - { - if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) continue; - if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key)) continue; + foreach ($extralabels as $key => $value) { + if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) { + continue; + } + if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key)) { + continue; + } $key_type = $this->attributes[$object->table_element]['type'][$key]; - if ($key_type == 'separate') continue; + if ($key_type == 'separate') { + continue; + } $enabled = 1; - if (isset($this->attributes[$object->table_element]['list'][$key])) - { + if (isset($this->attributes[$object->table_element]['list'][$key])) { $enabled = dol_eval($this->attributes[$object->table_element]['list'][$key], 1); } $perms = 1; - if (isset($this->attributes[$object->table_element]['perms'][$key])) - { + if (isset($this->attributes[$object->table_element]['perms'][$key])) { $perms = dol_eval($this->attributes[$object->table_element]['perms'][$key], 1); } - if (empty($enabled)) continue; - if (empty($perms)) continue; + if (empty($enabled)) { + continue; + } + if (empty($perms)) { + continue; + } - if ($this->attributes[$object->table_element]['required'][$key]) // Value is required - { + if ($this->attributes[$object->table_element]['required'][$key]) { // Value is required // Check if functionally empty without using GETPOST (depending on the type of extrafield, a // technically non-empty value may be treated as empty functionally). // value can be alpha, int, array, etc... - if ((!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] != 'select' && $_POST["options_".$key] != '0') - || (!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'select') - || (!is_array($_POST["options_".$key]) && isset($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'sellist' && $_POST['options_'.$key] == '0') - || (is_array($_POST["options_".$key]) && empty($_POST["options_".$key]))) - { + if ((!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] != 'select' && $_POST["options_".$key] != '0') + || (!is_array($_POST["options_".$key]) && empty($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'select') + || (!is_array($_POST["options_".$key]) && isset($_POST["options_".$key]) && $this->attributes[$object->table_element]['type'][$key] == 'sellist' && $_POST['options_'.$key] == '0') + || (is_array($_POST["options_".$key]) && empty($_POST["options_".$key]))) { //print 'ccc'.$value.'-'.$this->attributes[$object->table_element]['required'][$key]; $nofillrequired++; $error_field_required[] = $langs->transnoentitiesnoconv($value); @@ -2043,7 +2108,9 @@ class ExtraFields $value_key = GETPOST("options_".$key, 'alphanohtml'); } else { $value_key = GETPOST("options_".$key); - if (in_array($key_type, array('link')) && $value_key == '-1') $value_key = ''; + if (in_array($key_type, array('link')) && $value_key == '-1') { + $value_key = ''; + } } $object->array_options["options_".$key] = $value_key; @@ -2073,47 +2140,70 @@ class ExtraFields { global $_POST; - if (is_string($extrafieldsobjectkey) && is_array($this->attributes[$extrafieldsobjectkey]['label'])) - { + if (is_string($extrafieldsobjectkey) && !empty($this->attributes[$extrafieldsobjectkey]['label']) && is_array($this->attributes[$extrafieldsobjectkey]['label'])) { $extralabels = $this->attributes[$extrafieldsobjectkey]['label']; } else { $extralabels = $extrafieldsobjectkey; } - if (is_array($extralabels)) - { + if (is_array($extralabels)) { $array_options = array(); // Get extra fields - foreach ($extralabels as $key => $value) - { + foreach ($extralabels as $key => $value) { $key_type = ''; - if (is_string($extrafieldsobjectkey)) - { + if (is_string($extrafieldsobjectkey)) { $key_type = $this->attributes[$extrafieldsobjectkey]['type'][$key]; } if (in_array($key_type, array('date'))) { - if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) continue; // Value was not provided, we should not set it. - // Clean parameters - $value_key = dol_mktime(12, 0, 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int')); + $dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start'; + $dateparamname_end = $keysuffix . 'options_' . $key . $keyprefix . '_end'; + if (GETPOSTISSET($dateparamname_start . 'year') && GETPOSTISSET($dateparamname_end . 'year')) { + // values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc. + $value_key = array( + 'start' => dol_mktime(0, 0, 0, GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int')), + 'end' => dol_mktime(23, 59, 59, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int')) + ); + } elseif (GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) { + // Clean parameters + $value_key = dol_mktime(12, 0, 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int')); + } else { + continue; // Value was not provided, we should not set it. + } } elseif (in_array($key_type, array('datetime'))) { - if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) continue; // Value was not provided, we should not set it. - // Clean parameters - $value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."sec", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'), 'tzuserrel'); + $dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start'; + $dateparamname_end = $keysuffix . 'options_' . $key . $keyprefix . '_end'; + if (GETPOSTISSET($dateparamname_start . 'year') && GETPOSTISSET($dateparamname_end . 'year')) { + // values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc. + $value_key = array( + 'start' => dol_mktime(GETPOST($dateparamname_start . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'), 'tzuserrel'), + 'end' => dol_mktime(GETPOST($dateparamname_end . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'), 'tzuserrel') + ); + } elseif (GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) { + // Clean parameters + $value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."sec", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'), 'tzuserrel'); + } else { + continue; // Value was not provided, we should not set it. + } } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { - if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) continue; // Value was not provided, we should not set it. + if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) { + continue; // Value was not provided, we should not set it. + } $value_arr = GETPOST($keysuffix."options_".$key.$keyprefix); // Make sure we get an array even if there's only one checkbox $value_arr = (array) $value_arr; $value_key = implode(',', $value_arr); - } elseif (in_array($key_type, array('price', 'double', 'int'))) - { - if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) continue; // Value was not provided, we should not set it. + } elseif (in_array($key_type, array('price', 'double', 'int'))) { + if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) { + continue; // Value was not provided, we should not set it. + } $value_arr = GETPOST($keysuffix."options_".$key.$keyprefix); $value_key = price2num($value_arr); } else { - if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) continue; // Value was not provided, we should not set it. + if (!GETPOSTISSET($keysuffix."options_".$key.$keyprefix)) { + continue; // Value was not provided, we should not set it. + } $value_key = GETPOST($keysuffix."options_".$key.$keyprefix); } diff --git a/htdocs/core/class/extralanguages.class.php b/htdocs/core/class/extralanguages.class.php index 34c2e34dc82..af733c8f6cb 100644 --- a/htdocs/core/class/extralanguages.class.php +++ b/htdocs/core/class/extralanguages.class.php @@ -83,11 +83,19 @@ class ExtraLanguages // phpcs:enable global $conf; - if (empty($elementtype)) return array(); + if (empty($elementtype)) { + return array(); + } - if ($elementtype == 'thirdparty') $elementtype = 'societe'; - if ($elementtype == 'contact') $elementtype = 'socpeople'; - if ($elementtype == 'order_supplier') $elementtype = 'commande_fournisseur'; + if ($elementtype == 'thirdparty') { + $elementtype = 'societe'; + } + if ($elementtype == 'contact') { + $elementtype = 'socpeople'; + } + if ($elementtype == 'order_supplier') { + $elementtype = 'commande_fournisseur'; + } $array_name_label = array(); @@ -133,16 +141,14 @@ class ExtraLanguages { global $conf, $langs, $form; - if (!is_object($form)) - { + if (!is_object($form)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $form = new Form($this->db); } $out = ''; - if (!preg_match('/options_$/', $keyprefix)) // Because we work on extrafields, we add 'options_' to prefix if not already added - { + if (!preg_match('/options_$/', $keyprefix)) { // Because we work on extrafields, we add 'options_' to prefix if not already added $keyprefix = $keyprefix.'options_'; } diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index b601994536e..45bc622b9db 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -52,8 +52,7 @@ class FileUpload $this->element = $element; $pathname = $filename = $element; - if (preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) { $pathname = $regs[1]; $filename = $regs[2]; } @@ -71,7 +70,8 @@ class FileUpload $element = $pathname = 'projet'; $dir_output = $conf->$element->dir_output; } elseif ($element == 'project_task') { - $pathname = 'projet'; $filename = 'task'; + $pathname = 'projet'; + $filename = 'task'; $dir_output = $conf->projet->dir_output; $parentForeignKey = 'fk_project'; $parentClass = 'Project'; @@ -81,20 +81,24 @@ class FileUpload $element = 'ficheinter'; $dir_output = $conf->$element->dir_output; } elseif ($element == 'order_supplier') { - $pathname = 'fourn'; $filename = 'fournisseur.commande'; + $pathname = 'fourn'; + $filename = 'fournisseur.commande'; $dir_output = $conf->fournisseur->commande->dir_output; } elseif ($element == 'invoice_supplier') { - $pathname = 'fourn'; $filename = 'fournisseur.facture'; + $pathname = 'fourn'; + $filename = 'fournisseur.facture'; $dir_output = $conf->fournisseur->facture->dir_output; } elseif ($element == 'product') { $dir_output = $conf->product->multidir_output[$conf->entity]; } elseif ($element == 'productbatch') { $dir_output = $conf->productbatch->multidir_output[$conf->entity]; } elseif ($element == 'action') { - $pathname = 'comm/action'; $filename = 'actioncomm'; + $pathname = 'comm/action'; + $filename = 'actioncomm'; $dir_output = $conf->agenda->dir_output; } elseif ($element == 'chargesociales') { - $pathname = 'compta/sociales'; $filename = 'chargesociales'; + $pathname = 'compta/sociales'; + $filename = 'chargesociales'; $dir_output = $conf->tax->dir_output; } else { $dir_output = $conf->$element->dir_output; @@ -234,8 +238,7 @@ class FileUpload protected function getFileObject($file_name) { $file_path = $this->options['upload_dir'].$file_name; - if (is_file($file_path) && $file_name[0] !== '.') - { + if (is_file($file_path) && $file_name[0] !== '.') { $file = new stdClass(); $file->name = $file_name; $file->mime = dol_mimetype($file_name, '', 2); @@ -277,8 +280,7 @@ class FileUpload $file_path = $this->options['upload_dir'].$file_name; $new_file_path = $options['upload_dir'].$file_name; - if (dol_mkdir($options['upload_dir']) >= 0) - { + if (dol_mkdir($options['upload_dir']) >= 0) { list($img_width, $img_height) = @getimagesize($file_path); if (!$img_width || !$img_height) { return false; @@ -286,7 +288,9 @@ class FileUpload $res = vignette($file_path, $maxwidthmini, $maxheightmini, '_mini'); // We don't use ->addThumbs here because there is no object and we don't need all thumbs, only the "mini". - if (preg_match('/error/i', $res)) return false; + if (preg_match('/error/i', $res)) { + return false; + } return true; } else { return false; @@ -398,10 +402,8 @@ class FileUpload preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { $file_name .= '.'.$matches[1]; } - if ($this->options['discard_aborted_uploads']) - { - while (is_file($this->options['upload_dir'].$file_name)) - { + if ($this->options['discard_aborted_uploads']) { + while (is_file($this->options['upload_dir'].$file_name)) { $file_name = $this->upcountName($file_name); } } @@ -426,15 +428,13 @@ class FileUpload $file->mime = dol_mimetype($file->name, '', 2); $file->size = intval($size); $file->type = $type; - if ($this->validate($uploaded_file, $file, $error, $index) && dol_mkdir($this->options['upload_dir']) >= 0) - { + if ($this->validate($uploaded_file, $file, $error, $index) && dol_mkdir($this->options['upload_dir']) >= 0) { $file_path = $this->options['upload_dir'].$file->name; $append_file = !$this->options['discard_aborted_uploads'] && is_file($file_path) && $file->size > filesize($file_path); clearstatcache(); if ($uploaded_file && is_uploaded_file($uploaded_file)) { // multipart/formdata uploads (POST method uploads) - if ($append_file) - { + if ($append_file) { file_put_contents($file_path, fopen($uploaded_file, 'r'), FILE_APPEND); } else { dol_move_uploaded_file($uploaded_file, $file_path, 1, 0, 0, 0, 'userfile'); @@ -444,19 +444,15 @@ class FileUpload file_put_contents($file_path, fopen('php://input', 'r'), $append_file ? FILE_APPEND : 0); } $file_size = filesize($file_path); - if ($file_size === $file->size) - { + if ($file_size === $file->size) { $file->url = $this->options['upload_url'].rawurlencode($file->name); - foreach ($this->options['image_versions'] as $version => $options) - { - if ($this->createScaledImage($file->name, $options)) - { + foreach ($this->options['image_versions'] as $version => $options) { + if ($this->createScaledImage($file->name, $options)) { $tmp = explode('.', $file->name); $file->{$version.'_url'} = $options['upload_url'].rawurlencode($tmp[0].'_mini.'.$tmp[1]); } } - } elseif ($this->options['discard_aborted_uploads']) - { + } elseif ($this->options['discard_aborted_uploads']) { unlink($file_path); $file->error = 'abort'; } @@ -475,8 +471,7 @@ class FileUpload { $file_name = isset($_REQUEST['file']) ? basename(stripslashes($_REQUEST['file'])) : null; - if ($file_name) - { + if ($file_name) { $info = $this->getFileObject($file_name); } else { $info = $this->getFileObjects(); @@ -492,15 +487,13 @@ class FileUpload */ public function post() { - if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') - { + if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') { return $this->delete(); } $upload = isset($_FILES[$this->options['param_name']]) ? $_FILES[$this->options['param_name']] : null; $info = array(); - if ($upload && is_array($upload['tmp_name'])) - { + if ($upload && is_array($upload['tmp_name'])) { // param_name is an array identifier like "files[]", // $_FILES is a multi-dimensional array: foreach ($upload['tmp_name'] as $index => $value) { @@ -553,13 +546,10 @@ class FileUpload basename(stripslashes($_REQUEST['file'])) : null; $file_path = $this->options['upload_dir'].$file_name; $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); - if ($success) - { - foreach ($this->options['image_versions'] as $version => $options) - { + if ($success) { + foreach ($this->options['image_versions'] as $version => $options) { $file = $options['upload_dir'].$file_name; - if (is_file($file)) - { + if (is_file($file)) { unlink($file); } } diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index ebbdb2c3274..7356e53dc0a 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -154,13 +154,11 @@ class Fiscalyear extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_fiscalyear"); $result = $this->update($user); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return $this->id; } else { @@ -186,8 +184,7 @@ class Fiscalyear extends CommonObject global $langs; // Check parameters - if (empty($this->date_start) && empty($this->date_end)) - { + if (empty($this->date_start) && empty($this->date_end)) { $this->error = 'ErrorBadParameter'; return -1; } @@ -199,13 +196,12 @@ class Fiscalyear extends CommonObject $sql .= ", date_start = '".$this->db->idate($this->date_start)."'"; $sql .= ", date_end = ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null"); $sql .= ", statut = '".$this->db->escape($this->statut ? $this->statut : 0)."'"; - $sql .= ", fk_user_modif = ".$user->id; - $sql .= " WHERE rowid = ".$this->id; + $sql .= ", fk_user_modif = ".((int) $user->id); + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->db->commit(); return 1; } else { @@ -226,12 +222,11 @@ class Fiscalyear extends CommonObject { $sql = "SELECT rowid, label, date_start, date_end, statut"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -258,12 +253,11 @@ class Fiscalyear extends CommonObject { $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."accounting_fiscalyear WHERE rowid = ".$id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."accounting_fiscalyear WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->db->commit(); return 1; } else { @@ -285,26 +279,36 @@ class Fiscalyear extends CommonObject { global $conf, $langs, $user; - if (empty($this->ref)) $this->ref = $this->id; + if (empty($this->ref)) { + $this->ref = $this->id; + } - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $url = DOL_URL_ROOT.'/accountancy/admin/fiscalyear_card.php?id='.$this->id; - if (!$user->rights->accounting->fiscalyear->write) + if (!$user->rights->accounting->fiscalyear->write) { $option = 'nolink'; - - 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'; } - 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'; + } + } + + if ($short) { + return $url; + } $label = ''; @@ -317,10 +321,8 @@ class Fiscalyear extends CommonObject } $linkclose = ''; - if (empty($notooltip) && $user->rights->accounting->fiscalyear->write) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->accounting->fiscalyear->write) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("FiscalYear"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -338,8 +340,12 @@ class Fiscalyear extends CommonObject } $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; + 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; @@ -369,28 +375,34 @@ class Fiscalyear extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) - { + 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) - { - if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$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]), 'statut4'); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8'); - } elseif ($mode == 4) - { - if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$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]), 'statut4'); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + } elseif ($mode == 2) { + if ($status == 0) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + } elseif ($status == 1) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$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]), 'statut4'); + } elseif ($status == 1 && !empty($this->statuts_short[$status])) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8'); + } + } elseif ($mode == 4) { + if ($status == 0 && !empty($this->statuts_short[$status])) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 1 && !empty($this->statuts_short[$status])) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$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]), 'statut4'); + } elseif ($status == 1 && !empty($this->statuts_short[$status])) { + return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + } } } @@ -405,25 +417,21 @@ class Fiscalyear extends CommonObject $sql = 'SELECT fy.rowid, fy.datec, fy.fk_user_author, fy.fk_user_modif,'; $sql .= ' fy.tms'; $sql .= ' FROM '.MAIN_DB_PREFIX.'accounting_fiscalyear as fy'; - $sql .= ' WHERE fy.rowid = '.$id; + $sql .= ' WHERE fy.rowid = '.((int) $id); dol_syslog(get_class($this)."::fetch info", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + if ($obj->fk_user_author) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; } - if ($obj->fk_user_modif) - { + if ($obj->fk_user_modif) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modif); $this->user_modification = $muser; @@ -448,10 +456,12 @@ class Fiscalyear extends CommonObject { global $conf; - if (empty($datestart)) + if (empty($datestart)) { $datestart = $this->date_start; - if (empty($dateend)) + } + if (empty($dateend)) { $dateend = $this->date_end; + } $sql = "SELECT count(DISTINCT piece_num) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping"; @@ -459,11 +469,12 @@ class Fiscalyear extends CommonObject $sql .= " AND doc_date >= '".$this->db->idate($datestart)."' and doc_date <= '".$this->db->idate($dateend)."'"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $nb = $obj->nb; - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } return $nb; } @@ -479,10 +490,12 @@ class Fiscalyear extends CommonObject { global $conf; - if (empty($datestart)) + if (empty($datestart)) { $datestart = $this->date_start; - if (empty($dateend)) + } + if (empty($dateend)) { $dateend = $this->date_end; + } $sql = "SELECT count(rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping "; @@ -490,11 +503,12 @@ class Fiscalyear extends CommonObject $sql .= " AND doc_date >= '".$this->db->idate($datestart)."' and doc_date <= '".$this->db->idate($dateend)."'"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $nb = $obj->nb; - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } return $nb; } diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index d610203b3ad..cef41497381 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -84,49 +84,57 @@ class HookManager global $conf; // Test if there is hooks to manage - if (!is_array($conf->modules_parts['hooks']) || empty($conf->modules_parts['hooks'])) return; + if (!is_array($conf->modules_parts['hooks']) || empty($conf->modules_parts['hooks'])) { + return; + } // For backward compatibility - if (!is_array($arraycontext)) $arraycontext = array($arraycontext); + if (!is_array($arraycontext)) { + $arraycontext = array($arraycontext); + } $this->contextarray = array_unique(array_merge($arraycontext, $this->contextarray)); // All contexts are concatenated $arraytolog = array(); - foreach ($conf->modules_parts['hooks'] as $module => $hooks) // Loop on each module that brings hooks - { - if (empty($conf->$module->enabled)) continue; + foreach ($conf->modules_parts['hooks'] as $module => $hooks) { // Loop on each module that brings hooks + if (empty($conf->$module->enabled)) { + continue; + } //dol_syslog(get_class($this).'::initHooks module='.$module.' arraycontext='.join(',',$arraycontext)); - foreach ($arraycontext as $context) - { - if (is_array($hooks)) $arrayhooks = $hooks; // New system - else $arrayhooks = explode(':', $hooks); // Old system (for backward compatibility) + foreach ($arraycontext as $context) { + if (is_array($hooks)) { + $arrayhooks = $hooks; // New system + } else { + $arrayhooks = explode(':', $hooks); // Old system (for backward compatibility) + } - if (in_array($context, $arrayhooks) || in_array('all', $arrayhooks)) // We instantiate action class only if initialized hook is handled by module - { + if (in_array($context, $arrayhooks) || in_array('all', $arrayhooks)) { // We instantiate action class only if initialized hook is handled by module // Include actions class overwriting hooks - if (empty($this->hooks[$context][$module]) || !is_object($this->hooks[$context][$module])) // If set to an object value, class was already loaded - { + if (empty($this->hooks[$context][$module]) || !is_object($this->hooks[$context][$module])) { // If set to an object value, class was already loaded $path = '/'.$module.'/class/'; $actionfile = 'actions_'.$module.'.class.php'; $arraytolog[] = 'context='.$context.'-path='.$path.$actionfile; $resaction = dol_include_once($path.$actionfile); - if ($resaction) - { + if ($resaction) { $controlclassname = 'Actions'.ucfirst($module); $actionInstance = new $controlclassname($this->db); - $this->hooks[$context][$module] = $actionInstance; + $priority = empty($actionInstance->priority) ? 50 : $actionInstance->priority; + $this->hooks[$context][$priority.':'.$module] = $actionInstance; } } } } } - if (count($arraytolog) > 0) - { + if (count($arraytolog) > 0) { dol_syslog(get_class($this)."::initHooks Loading hooks: ".join(', ', $arraytolog), LOG_DEBUG); } + if (!empty($this->hooks[$context])) { + ksort($this->hooks[$context], SORT_NATURAL); + } + return 1; } @@ -144,7 +152,9 @@ class HookManager */ public function executeHooks($method, $parameters = array(), &$object = '', &$action = '') { - if (!is_array($this->hooks) || empty($this->hooks)) return 0; // No hook available, do nothing. + if (!is_array($this->hooks) || empty($this->hooks)) { + return 0; // No hook available, do nothing. + } $parameters['context'] = join(':', $this->contextarray); //dol_syslog(get_class($this).'::executeHooks method='.$method." action=".$action." context=".$parameters['context']); @@ -161,6 +171,7 @@ class HookManager 'addMoreMassActions', 'addSearchEntry', 'addStatisticLine', + 'addSectionECMAuto', 'createDictionaryFieldlist', 'editDictionaryFieldlist', 'getFormMail', @@ -217,27 +228,35 @@ class HookManager 'setHtmlTitle', 'completeTabsHead' ) - )) $hooktype = 'addreplace'; + )) { + $hooktype = 'addreplace'; + } // Init return properties - $this->resPrint = ''; $this->resArray = array(); $this->resNbOfHooks = 0; + $this->resPrint = ''; + $this->resArray = array(); + $this->resNbOfHooks = 0; // Loop on each hook to qualify modules that have declared context $modulealreadyexecuted = array(); - $resaction = 0; $error = 0; - foreach ($this->hooks as $context => $modules) // $this->hooks is an array with context as key and value is an array of modules that handle this context - { - if (!empty($modules)) - { - foreach ($modules as $module => $actionclassinstance) - { - //print "Before hook ".get_class($actionclassinstance)." method=".$method." hooktype=".$hooktype." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." resaction=".$resaction."
    \n"; + $resaction = 0; + $error = 0; + foreach ($this->hooks as $context => $modules) { // $this->hooks is an array with context as key and value is an array of modules that handle this context + if (!empty($modules)) { + // Loop on each active hooks of module for this context + foreach ($modules as $module => $actionclassinstance) { + $module = preg_replace('/^\d+:/', '', $module); + //print "Before hook ".get_class($actionclassinstance)." method=".$method." module=".$module." hooktype=".$hooktype." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." resaction=".$resaction."
    \n"; // test to avoid running twice a hook, when a module implements several active contexts - if (in_array($module, $modulealreadyexecuted)) continue; + if (in_array($module, $modulealreadyexecuted)) { + continue; + } // jump to next module/class if method does not exist - if (!method_exists($actionclassinstance, $method)) continue; + if (!method_exists($actionclassinstance, $method)) { + continue; + } $this->resNbOfHooks++; @@ -247,45 +266,55 @@ class HookManager $actionclassinstance->error = 0; $actionclassinstance->errors = array(); - dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", action=".$action." context=".$context, LOG_DEBUG); + dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".get_class($actionclassinstance).'->'.$method.", context=".$context.", module=".$module.", action=".$action.((is_object($object) && property_exists($object, 'id')) ? ', objectid='.$object->id : ''), LOG_DEBUG); // Add current context to avoid method execution in bad context, you can add this test in your method : eg if($currentcontext != 'formfile') return; $parameters['currentcontext'] = $context; // Hooks that must return int (hooks with type 'addreplace') - if ($hooktype == 'addreplace') - { + if ($hooktype == 'addreplace') { $resaction += $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example) - if ($resaction < 0 || !empty($actionclassinstance->error) || (!empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0)) - { + if ($resaction < 0 || !empty($actionclassinstance->error) || (!empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0)) { $error++; - $this->error = $actionclassinstance->error; $this->errors = array_merge($this->errors, (array) $actionclassinstance->errors); + $this->error = $actionclassinstance->error; + $this->errors = array_merge($this->errors, (array) $actionclassinstance->errors); dol_syslog("Error on hook module=".$module.", method ".$method.", class ".get_class($actionclassinstance).", hooktype=".$hooktype.(empty($this->error) ? '' : " ".$this->error).(empty($this->errors) ? '' : " ".join(",", $this->errors)), LOG_ERR); } - if (isset($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray = array_merge($this->resArray, $actionclassinstance->results); - if (!empty($actionclassinstance->resprints)) $this->resPrint .= $actionclassinstance->resprints; - } - // Generic hooks that return a string or array (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...) - else { + if (isset($actionclassinstance->results) && is_array($actionclassinstance->results)) { + $this->resArray = array_merge($this->resArray, $actionclassinstance->results); + } + if (!empty($actionclassinstance->resprints)) { + $this->resPrint .= $actionclassinstance->resprints; + } + } else { + // Generic hooks that return a string or array (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...) // TODO. this test should be done into the method of hook by returning nothing - if (is_array($parameters) && !empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue; + if (is_array($parameters) && !empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) { + continue; + } //dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG); $resaction = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example) - if (!empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray = array_merge($this->resArray, $actionclassinstance->results); - if (!empty($actionclassinstance->resprints)) $this->resPrint .= $actionclassinstance->resprints; - if (is_numeric($resaction) && $resaction < 0) - { + if (!empty($actionclassinstance->results) && is_array($actionclassinstance->results)) { + $this->resArray = array_merge($this->resArray, $actionclassinstance->results); + } + if (!empty($actionclassinstance->resprints)) { + $this->resPrint .= $actionclassinstance->resprints; + } + if (is_numeric($resaction) && $resaction < 0) { $error++; - $this->error = $actionclassinstance->error; $this->errors = array_merge($this->errors, (array) $actionclassinstance->errors); + $this->error = $actionclassinstance->error; + $this->errors = array_merge($this->errors, (array) $actionclassinstance->errors); dol_syslog("Error on hook module=".$module.", method ".$method.", class ".get_class($actionclassinstance).", hooktype=".$hooktype.(empty($this->error) ? '' : " ".$this->error).(empty($this->errors) ? '' : " ".join(",", $this->errors)), LOG_ERR); } // TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string but an int. you must use $actionclassinstance->resprints to return a string - if (!is_array($resaction) && !is_numeric($resaction)) - { + if (!is_array($resaction) && !is_numeric($resaction)) { dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR); - if (empty($actionclassinstance->resprints)) { $this->resPrint .= $resaction; $resaction = 0; } + if (empty($actionclassinstance->resprints)) { + $this->resPrint .= $resaction; + $resaction = 0; + } } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7f52cb099a1..835810ff065 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -15,9 +15,9 @@ * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2012-2015 Raphaël Doursenaud - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014-2020 Alexandre Spangaro * Copyright (C) 2018-2021 Ferran Marcet - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Christophe Battarel * Copyright (C) 2018 Josep Lluis Amador @@ -96,7 +96,7 @@ class Form * @param string $preselected Value to show/edit (not used in this function) * @param object $object Object * @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field. - * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) + * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'checkbox:ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) * @param string $moreparam More param to add on a href URL. * @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS. * @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' ' @@ -111,46 +111,74 @@ class Form $ret = ''; // TODO change for compatibility - if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;/', $typeofdata)) - { - if (!empty($perm)) - { + if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;/', $typeofdata)) { + if (!empty($perm)) { $tmp = explode(':', $typeofdata); $ret .= '
    '; - if ($fieldrequired) $ret .= ''; + if ($fieldrequired) { + $ret .= ''; + } if ($help) { $ret .= $this->textwithpicto($langs->trans($text), $help); } else { $ret .= $langs->trans($text); } - if ($fieldrequired) $ret .= ''; + if ($fieldrequired) { + $ret .= ''; + } $ret .= '
    '."\n"; } else { - if ($fieldrequired) $ret .= ''; + if ($fieldrequired) { + $ret .= ''; + } if ($help) { $ret .= $this->textwithpicto($langs->trans($text), $help); } else { $ret .= $langs->trans($text); } - if ($fieldrequired) $ret .= ''; + if ($fieldrequired) { + $ret .= ''; + } } } else { - if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= ''; + } + if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= ''; + } + if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= '
    '; - if ($fieldrequired) $ret .= ''; + if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= ''; - if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= ''; - if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= '
    '; + } + if ($fieldrequired) { + $ret .= ''; + } if ($help) { $ret .= $this->textwithpicto($langs->trans($text), $help); } else { $ret .= $langs->trans($text); } - if ($fieldrequired) $ret .= ''; - if (!empty($notabletag)) $ret .= ' '; - if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= ''; - if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= 'id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).''; - if (!empty($notabletag) && $notabletag == 1) $ret .= ' : '; - if (!empty($notabletag) && $notabletag == 3) $ret .= ' '; - if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) $ret .= '
    '; + if ($fieldrequired) { + $ret .= '
    '; + } + if (!empty($notabletag)) { + $ret .= ' '; + } + if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= '
    '; + } + if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= 'id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).''; + } + if (!empty($notabletag) && $notabletag == 1) { + $ret .= ' : '; + } + if (!empty($notabletag) && $notabletag == 3) { + $ret .= ' '; + } + if (empty($notabletag) && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { + $ret .= '
    '; + } } return $ret; @@ -181,39 +209,42 @@ class Form $ret = ''; // Check parameters - if (empty($typeofdata)) return 'ErrorBadParameter'; + if (empty($typeofdata)) { + return 'ErrorBadParameter'; + } // When option to edit inline is activated - if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;|datehourpicker/', $typeofdata)) // TODO add jquery timepicker and support select - { + if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !preg_match('/^select;|datehourpicker/', $typeofdata)) { // TODO add jquery timepicker and support select $ret .= $this->editInPlace($object, $value, $htmlname, $perm, $typeofdata, $editvalue, $extObject, $custommsg); } else { $editmode = (GETPOST('action', 'aZ09') == 'edit'.$htmlname); - if ($editmode) - { + if ($editmode) { $ret .= "\n"; $ret .= '
    '; $ret .= ''; $ret .= ''; $ret .= ''; - if (empty($notabletag)) $ret .= ''; - if (empty($notabletag)) $ret .= '
    '; - if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) - { + if (empty($notabletag)) { + $ret .= ''; + } + if (empty($notabletag)) { + $ret .= ''; + if (empty($notabletag)) { + $ret .= ''; + } - if (empty($notabletag)) $ret .= ''; + if (empty($notabletag)) { + $ret .= ''; + } - if (empty($notabletag)) $ret .= '
    '; + } + if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $ret .= ''; - } elseif (preg_match('/^(numeric|amount)/', $typeofdata)) - { + } elseif (preg_match('/^(numeric|amount)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $valuetoshow = price2num($editvalue ? $editvalue : $value); $ret .= ''; - } elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) // if wysiwyg is enabled $typeofdata = 'ckeditor' - { + } elseif (preg_match('/^(checkbox)/', $typeofdata)) { + $tmp = explode(':', $typeofdata); + $ret .= ''; + } elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) { // if wysiwyg is enabled $typeofdata = 'ckeditor' $tmp = explode(':', $typeofdata); $cols = $tmp[2]; $morealt = ''; - if (preg_match('/%/', $cols)) - { + if (preg_match('/%/', $cols)) { $morealt = ' style="width: '.$cols.'"'; $cols = ''; } @@ -225,64 +256,82 @@ class Form $valuetoshow = str_replace('&', '&', $valuetoshow); $ret .= dol_string_neverthesehtmltags($valuetoshow, array('textarea')); $ret .= ''; - } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') - { + } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $ret .= $this->selectDate($value, $htmlname, 0, 0, 1, 'form'.$htmlname, 1, 0); - } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') - { + } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { $ret .= $this->selectDate($value, $htmlname, 1, 1, 1, 'form'.$htmlname, 1, 0); - } elseif (preg_match('/^select;/', $typeofdata)) - { + } elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraylist = array(); - foreach ($arraydata as $val) - { + foreach ($arraydata as $val) { $tmp = explode(':', $val); $tmpkey = str_replace('|', ':', $tmp[0]); $arraylist[$tmpkey] = $tmp[1]; } $ret .= $this->selectarray($htmlname, $arraylist, $value); - } elseif (preg_match('/^ckeditor/', $typeofdata)) - { + } elseif (preg_match('/^ckeditor/', $typeofdata)) { $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($htmlname, ($editvalue ? $editvalue : $value), ($tmp[2] ? $tmp[2] : ''), ($tmp[3] ? $tmp[3] : '100'), ($tmp[1] ? $tmp[1] : 'dolibarr_notes'), 'In', ($tmp[5] ? $tmp[5] : 0), (isset($tmp[8]) ? ($tmp[8] ?true:false) : true), true, ($tmp[6] ? $tmp[6] : '20'), ($tmp[7] ? $tmp[7] : '100')); $ret .= $doleditor->Create(1); } - if (empty($notabletag)) $ret .= ''; + if (empty($notabletag)) { + $ret .= ''; + } //else $ret.='
    '; $ret .= ''; - if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '
    '."\n"; + if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) { + $ret .= '
    '."\n"; + } $ret .= ''; - if (empty($notabletag)) $ret .= '
    '."\n"; + if (empty($notabletag)) { + $ret .= '
    '."\n"; + } $ret .= '
    '."\n"; } else { - if (preg_match('/^(email)/', $typeofdata)) $ret .= dol_print_email($value, 0, 0, 0, 0, 1); - elseif (preg_match('/^(amount|numeric)/', $typeofdata)) $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : ''); - elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) $ret .= dol_htmlentitiesbr($value); - elseif (preg_match('/^safehtmlstring/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value); - elseif (preg_match('/^restricthtml/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value); - elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= ''.dol_print_date($value, 'day').''; - elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= ''.dol_print_date($value, 'dayhour').''; - elseif (preg_match('/^select;/', $typeofdata)) - { + if (preg_match('/^(email)/', $typeofdata)) { + $ret .= dol_print_email($value, 0, 0, 0, 0, 1); + } elseif (preg_match('/^(amount|numeric)/', $typeofdata)) { + $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : ''); + } elseif (preg_match('/^(checkbox)/', $typeofdata)) { + $tmp = explode(':', $typeofdata); + $ret .= ''; + } elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) { + $ret .= dol_htmlentitiesbr($value); + } elseif (preg_match('/^safehtmlstring/', $typeofdata)) { + $ret .= dol_string_onlythesehtmltags($value); + } elseif (preg_match('/^restricthtml/', $typeofdata)) { + $ret .= dol_string_onlythesehtmltags($value); + } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { + $ret .= ''.dol_print_date($value, 'day').''; + } elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') { + $ret .= ''.dol_print_date($value, 'dayhour').''; + } elseif (preg_match('/^select;/', $typeofdata)) { $arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata)); $arraylist = array(); - foreach ($arraydata as $val) - { + foreach ($arraydata as $val) { $tmp = explode(':', $val); $arraylist[$tmp[0]] = $tmp[1]; } $ret .= $arraylist[$value]; - } elseif (preg_match('/^ckeditor/', $typeofdata)) - { + if ($htmlname == 'fk_product_type') { + if ($value == 0) { + $ret = img_picto($langs->trans("Product"), 'product', 'class="paddingleftonly paddingrightonly colorgrey"').$ret; + } else { + $ret = img_picto($langs->trans("Service"), 'service', 'class="paddingleftonly paddingrightonly colorgrey"').$ret; + } + } + } elseif (preg_match('/^ckeditor/', $typeofdata)) { $tmpcontent = dol_htmlentitiesbr($value); - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $firstline = preg_replace('/
    .*/', '', $tmpcontent); $firstline = preg_replace('/[\n\r].*/', '', $firstline); $tmpcontent = $firstline.((strlen($firstline) != strlen($tmpcontent)) ? '...' : ''); @@ -294,8 +343,7 @@ class Form $ret .= dol_escape_htmltag($value); } - if ($formatfunc && method_exists($object, $formatfunc)) - { + if ($formatfunc && method_exists($object, $formatfunc)) { $ret = $object->$formatfunc($ret); } } @@ -322,7 +370,9 @@ class Form // List of extra languages $arrayoflangcode = array(); - if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE)) $arrayoflangcode[] = $conf->global->PDF_USE_ALSO_LANGUAGE_CODE; + if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE)) { + $arrayoflangcode[] = $conf->global->PDF_USE_ALSO_LANGUAGE_CODE; + } if (is_array($arrayoflangcode) && count($arrayoflangcode)) { if (!is_object($extralanguages)) { @@ -344,8 +394,7 @@ class Form $result .= ''; + if (empty($notabs)) { + $s .= '
    '; + } elseif ($notabs == 2) { + $s .= '
    '; + } return $s; } @@ -593,26 +695,32 @@ class Form global $conf, $langs; $alt = ''; - if ($tooltiptrigger) $alt = $langs->transnoentitiesnoconv("ClickToShowHelp"); + if ($tooltiptrigger) { + $alt = $langs->transnoentitiesnoconv("ClickToShowHelp"); + } //For backwards compatibility - if ($type == '0') $type = 'info'; - elseif ($type == '1') $type = 'help'; + if ($type == '0') { + $type = 'info'; + } elseif ($type == '1') { + $type = 'help'; + } // If info or help with no javascript, show only text - if (empty($conf->use_javascript_ajax)) - { - if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') return $text; - else { + if (empty($conf->use_javascript_ajax)) { + if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') { + return $text; + } else { $alt = $htmltext; $htmltext = ''; } } // If info or help with smartphone, show only text (tooltip hover can't works) - if (!empty($conf->dol_no_mouse_hover) && empty($tooltiptrigger)) - { - if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') return $text; + if (!empty($conf->dol_no_mouse_hover) && empty($tooltiptrigger)) { + if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') { + return $text; + } } // If info or help with smartphone, show only text (tooltip on click does not works with dialog on smaprtphone) //if (! empty($conf->dol_no_mouse_hover) && ! empty($tooltiptrigger)) @@ -621,13 +729,21 @@ class Form //} $img = ''; - if ($type == 'info') $img = img_help(0, $alt); - elseif ($type == 'help') $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt); - elseif ($type == 'helpclickable') $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt); - elseif ($type == 'superadmin') $img = img_picto($alt, 'redstar'); - elseif ($type == 'admin') $img = img_picto($alt, 'star'); - elseif ($type == 'warning') $img = img_warning($alt); - elseif ($type != 'none') $img = img_picto($alt, $type); // $type can be an image path + if ($type == 'info') { + $img = img_help(0, $alt); + } elseif ($type == 'help') { + $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt); + } elseif ($type == 'helpclickable') { + $img = img_help(($tooltiptrigger != '' ? 2 : 1), $alt); + } elseif ($type == 'superadmin') { + $img = img_picto($alt, 'redstar'); + } elseif ($type == 'admin') { + $img = img_picto($alt, 'star'); + } elseif ($type == 'warning') { + $img = img_warning($alt); + } elseif ($type != 'none') { + $img = img_picto($alt, $type); // $type can be an image path + } return $this->textwithtooltip($text, $htmltext, ((($tooltiptrigger && !$img) || strpos($type, 'clickable')) ? 3 : 2), $direction, $img, $extracss, $notabs, '', $noencodehtmltext, $tooltiptrigger, $forcenowrap); } @@ -655,12 +771,12 @@ class Form $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreMassActions', $parameters); // Note that $action and $object may have been modified by hook // check if there is a mass action - if (count($arrayofaction) == 0 && empty($hookmanager->resPrint)) return; - if (empty($reshook)) - { + if (count($arrayofaction) == 0 && empty($hookmanager->resPrint)) { + return; + } + if (empty($reshook)) { $ret .= ''; - foreach ($arrayofaction as $code => $label) - { + foreach ($arrayofaction as $code => $label) { $ret .= ''; } } @@ -668,15 +784,16 @@ class Form $ret .= ''; - if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.'.$name.'select'); + if (empty($conf->dol_optimize_smallscreen)) { + $ret .= ajax_combobox('.'.$name.'select'); + } // Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button $ret .= ''; // Hidden button BEFORE so it is the one used when we submit with ENTER. - $ret .= ''; + $ret .= 'use_javascript_ajax) ? '' : ' style="display: none"').' class="button'.(empty($conf->use_javascript_ajax) ? '' : ' hideobject').' '.$name.' '.$name.'confirmed" value="'.dol_escape_htmltag($langs->trans("Confirm")).'">'; $ret .= ''; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { $ret .= ' ";*/ + $retstring.=img_object($langs->trans("SelectDate"),'calendarday','id="'.$prefix.'id" class="datecallink"'); + $retstring.="";*/ } else { - $retstring .= ''; + $retstringbutton = ''; + $retsring = $retstringbutton.$retstring; } $retstring .= ''; @@ -5730,33 +6196,28 @@ class Form } else { $retstring .= "Bad value of MAIN_POPUP_CALENDAR"; } - } - // Show date with combo selects - else { + } else { + // Show date with combo selects // Day $retstring .= ''; - if ($emptydate || $set_time == -1) - { + if ($emptydate || $set_time == -1) { $retstring .= ''; } - for ($day = 1; $day <= 31; $day++) - { + for ($day = 1; $day <= 31; $day++) { $retstring .= ''; } $retstring .= ""; $retstring .= ''; - if ($emptydate || $set_time == -1) - { + if ($emptydate || $set_time == -1) { $retstring .= ''; } // Month - for ($month = 1; $month <= 12; $month++) - { + for ($month = 1; $month <= 12; $month++) { $retstring .= '"; @@ -5764,14 +6225,12 @@ class Form $retstring .= ""; // Year - if ($emptydate || $set_time == -1) - { + if ($emptydate || $set_time == -1) { $retstring .= ''; } else { $retstring .= ''; - for ($year = $syear - 10; $year < $syear + 10; $year++) - { + for ($year = $syear - 10; $year < $syear + 10; $year++) { $retstring .= ''; } $retstring .= "\n"; @@ -5784,39 +6243,47 @@ class Form $retstring .= ''; } - if ($h) - { + if ($h) { $hourstart = 0; $hourend = 24; if ($openinghours != '') { $openinghours = explode(',', $openinghours); $hourstart = $openinghours[0]; $hourend = $openinghours[1]; - if ($hourend < $hourstart) $hourend = $hourstart; + if ($hourend < $hourstart) { + $hourend = $hourstart; + } } // Show hour $retstring .= ''; - if ($emptyhours) $retstring .= ''; - for ($hour = $hourstart; $hour < $hourend; $hour++) - { - if (strlen($hour) < 2) $hour = "0".$hour; + if ($emptyhours) { + $retstring .= ''; + } + for ($hour = $hourstart; $hour < $hourend; $hour++) { + if (strlen($hour) < 2) { + $hour = "0".$hour; + } $retstring .= ''; } $retstring .= ''; //if ($m && empty($conf->dol_optimize_smallscreen)) $retstring .= ":"; - if ($m) $retstring .= ":"; + if ($m) { + $retstring .= ":"; + } } - if ($m) - { + if ($m) { // Show minutes $retstring .= ''; - if ($emptyhours) $retstring .= ''; - for ($min = 0; $min < 60; $min += $stepminutes) - { - if (strlen($min) < 2) $min = "0".$min; + if ($emptyhours) { + $retstring .= ''; + } + for ($min = 0; $min < 60; $min += $stepminutes) { + if (strlen($min) < 2) { + $min = "0".$min; + } $retstring .= ''; } $retstring .= ''; @@ -5829,8 +6296,7 @@ class Form } // Add a "Now" link - if ($conf->use_javascript_ajax && $addnowlink) - { + if ($conf->use_javascript_ajax && $addnowlink) { // Script which will be inserted in the onClick of the "Now" link $reset_scripts = ""; if ($addnowlink == 2) { // local computer time @@ -5851,64 +6317,65 @@ class Form $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date($nowgmt, '%Y', 'tzuserrel').'\');'; } 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());'; - */ + * 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($nowgmt, 'day', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date($nowgmt, '%d', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date($nowgmt, '%m', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date($nowgmt, '%Y', 'tzuserrel').'\');'; } /*if ($usecalendar == "eldy") - { - $base=DOL_URL_ROOT.'/core/'; - $reset_scripts .= 'resetDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');'; - } - else - { - $reset_scripts .= 'this.form.elements[\''.$prefix.'day\'].value=formatDate(new Date(), \'d\'); '; - $reset_scripts .= 'this.form.elements[\''.$prefix.'month\'].value=formatDate(new Date(), \'M\'); '; - $reset_scripts .= 'this.form.elements[\''.$prefix.'year\'].value=formatDate(new Date(), \'yyyy\'); '; - }*/ - // Update the hour part - if ($h) { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + $base=DOL_URL_ROOT.'/core/'; + $reset_scripts .= 'resetDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');'; + } + else + { + $reset_scripts .= 'this.form.elements[\''.$prefix.'day\'].value=formatDate(new Date(), \'d\'); '; + $reset_scripts .= 'this.form.elements[\''.$prefix.'month\'].value=formatDate(new Date(), \'M\'); '; + $reset_scripts .= 'this.form.elements[\''.$prefix.'year\'].value=formatDate(new Date(), \'yyyy\'); '; + }*/ + // Update the hour part + if ($h) { + 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) - { + if ($addnowlink == 1) { $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date($nowgmt, '%H', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; - } elseif ($addnowlink == 2) - { + } elseif ($addnowlink == 2) { $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; } - if ($fullday) $reset_scripts .= ' } '; + if ($fullday) { + $reset_scripts .= ' } '; + } } // Update the minute part - if ($m) - { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + if ($m) { + 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) - { + if ($addnowlink == 1) { $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date($nowgmt, '%M', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; - } elseif ($addnowlink == 2) - { + } elseif ($addnowlink == 2) { $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; } - if ($fullday) $reset_scripts .= ' } '; + if ($fullday) { + $reset_scripts .= ' } '; + } } // If reset_scripts is not empty, print the link with the reset_scripts in the onClick - if ($reset_scripts && empty($conf->dol_optimize_smallscreen)) - { + if ($reset_scripts && empty($conf->dol_optimize_smallscreen)) { $retstring .= ' '; @@ -5916,8 +6383,7 @@ class Form } // Add a "Plus one hour" link - if ($conf->use_javascript_ajax && $addplusone) - { + if ($conf->use_javascript_ajax && $addplusone) { // Script which will be inserted in the onClick of the "Add plusone" link $reset_scripts = ""; @@ -5927,22 +6393,27 @@ class Form $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date($nowgmt, '%m', 'tzuserrel').'\');'; $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date($nowgmt, '%Y', 'tzuserrel').'\');'; // Update the hour part - if ($h) - { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + if ($h) { + if ($fullday) { + $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + } $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date($nowgmt, '%H', 'tzuserrel').'\');'; - if ($fullday) $reset_scripts .= ' } '; + if ($fullday) { + $reset_scripts .= ' } '; + } } // Update the minute part - if ($m) - { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + if ($m) { + if ($fullday) { + $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; + } $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date($nowgmt, '%M', 'tzuserrel').'\');'; - if ($fullday) $reset_scripts .= ' } '; + if ($fullday) { + $reset_scripts .= ' } '; + } } // If reset_scripts is not empty, print the link with the reset_scripts in the onClick - if ($reset_scripts && empty($conf->dol_optimize_smallscreen)) - { + if ($reset_scripts && empty($conf->dol_optimize_smallscreen)) { $retstring .= ' '; @@ -5950,10 +6421,11 @@ class Form } // Add a link to set data - if ($conf->use_javascript_ajax && $adddateof) - { + if ($conf->use_javascript_ajax && $adddateof) { $tmparray = dol_getdate($adddateof); - if (empty($labeladddateof)) $labeladddateof = $langs->trans("DateInvoice"); + if (empty($labeladddateof)) { + $labeladddateof = $langs->trans("DateInvoice"); + } $retstring .= ' -
    '.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').'
    '.$langs->trans('MarginOnProducts').''.price($marginInfo['pv_products']).''.price($marginInfo['pa_products']).''.price($marginInfo['margin_on_products']).''.(($marginInfo['margin_rate_products'] == '') ? '' : price($marginInfo['margin_rate_products'], null, null, null, null, 2).'%').''.(($marginInfo['mark_rate_products'] == '') ? '' : price($marginInfo['mark_rate_products'], null, null, null, null, 2).'%').'
    '.$langs->trans('MarginOnServices').''.price($marginInfo['pv_services']).''.price($marginInfo['pa_services']).''.price($marginInfo['margin_on_services']).''.(($marginInfo['margin_rate_services'] == '') ? '' : price($marginInfo['margin_rate_services'], null, null, null, null, 2).'%').''.(($marginInfo['mark_rate_services'] == '') ? '' : price($marginInfo['mark_rate_services'], null, null, null, null, 2).'%').'
    '.$langs->trans('TotalMargin').''.price($marginInfo['pv_total']).''.price($marginInfo['pa_total']).''.price($marginInfo['total_margin']).''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').'
    '; diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index be169106621..9c75d15bae5 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -62,8 +62,11 @@ class FormOrder extends Form $options[$value] = $tmpsupplierorder->getLibStatut($short); } - if (is_array($selected)) $selectedarray = $selected; - else $selectedarray = explode(',', $selected); + if (is_array($selected)) { + $selectedarray = $selected; + } else { + $selectedarray = explode(',', $selected); + } print Form::multiselectarray($hmlname, $options, $selectedarray, 0); } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index b6ae7cdbfc2..18f3fd0f3ce 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -76,21 +76,20 @@ class FormOther $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 + 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) - { + if ($result) { print ''; - if ($useempty) - { + if ($useempty) { print ''; } $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $label = $obj->label; @@ -165,8 +162,7 @@ class FormOther $label .= ' ('.$tmpuser->getFullName($langs).')'; } - if ($selected == $obj->rowid) - { + if ($selected == $obj->rowid) { print ''."\n"; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $this->db->fetch_object($resql); - if (($selected && $selected == $obj->taux) || $num == 1) - { + if (($selected && $selected == $obj->taux) || $num == 1) { $out .= ''; // Should use -1 to say nothing + if ($showempty) { + $textforempty = ' '; + if (!empty($conf->use_javascript_ajax)) { + $textforempty = ' '; // If we use ajaxcombo, we need   here to avoid to have an empty element that is too small. + } + if (!is_numeric($showempty)) { + $textforempty = $showempty; + } + $moreforfilter .= ''."\n"; + //$moreforfilter .= ''; // Should use -1 to say nothing + } - if (is_array($tab_categs)) - { - foreach ($tab_categs as $categ) - { + if (is_array($tab_categs)) { + foreach ($tab_categs as $categ) { $moreforfilter .= ''; } @@ -394,14 +389,14 @@ class FormOther /** * 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 + * @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|string $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) { @@ -412,13 +407,11 @@ class FormOther $out = ''; // Enhance with select2 - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $comboenhancement = ajax_combobox($htmlname); - if ($comboenhancement) - { + if ($comboenhancement) { $out .= $comboenhancement; } } @@ -427,14 +420,22 @@ class FormOther // Select each sales and print them in a select input $out .= ''; - if ($useempty) print ''; + if ($useempty) { + print ''; + } $j = 0; $level = 0; $this->_pLineSelect($j, 0, $tasksarray, $level, $selectedtask, $projectid, $disablechildoftaskid); @@ -613,13 +623,15 @@ class FormOther //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 ''; + 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 '
    '; - $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', 2, 0, 0, 0, 'minwidth200'); + $filter = ''; + if ($public) { + $filter = 'public=1'; + } + $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 0, 0, 0, 'minwidth200'); print '
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''.img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"').''; + print ''; + print '
    '; print 'withnotifytiersatcreate ? ' checked="checked"' : '').'>'; print '
    '; print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); @@ -416,17 +435,18 @@ class FormTicket // Other attributes $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { print $ticketstat->showOptionals($extrafields, 'create'); } print '
    '; - if ($withdolfichehead) print dol_get_fiche_end(); + if ($withdolfichehead) { + print dol_get_fiche_end(); + } - print '
    '; - print ''; + print '
    '; + print ''; if ($this->withcancel) { print "      "; print ''; @@ -537,7 +557,7 @@ class FormTicket * * @param string $selected Id categorie pre-selectionnée * @param string $htmlname Nom de la zone select - * @param string $filtertype To filter on field type in llx_c_ticket_category (array('code'=>xx,'label'=>zz)) + * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users. * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code * @param int $empty 1=peut etre vide, 0 sinon * @param int $noadmininfo 0=Add admin info, 1=Disable admin info @@ -553,12 +573,6 @@ class FormTicket dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); - $filterarray = array(); - - if ($filtertype != '' && $filtertype != '-1') { - $filterarray = explode(',', $filtertype); - } - $ticketstat->loadCacheCategoriesTickets(); print ''; // External users can't send message email - if ($user->rights->ticket->write && !$user->socid) - { + if ($user->rights->ticket->write && !$user->socid) { print '\n"; diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index 8cbb7967415..4210113f990 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -68,21 +68,17 @@ class FormWebsite $sql .= " WHERE 1 = 1"; $sql .= " ORDER BY rowid"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $out .= ''; - if ($useempty == 1 || ($useempty == 2 && $num > 1)) - { + if ($useempty == 1 || ($useempty == 2 && $num > 1)) { print ''; } - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($selected == $obj->rowid || $selected == $obj->code) - { + if ($selected == $obj->rowid || $selected == $obj->code) { print '
    '; $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ''); print ' '; @@ -1063,7 +1083,7 @@ class FormTicket if ($this->withfile == 2) { // Can add other files $out .= ''; $out .= ' '; - $out .= ''; + $out .= ''; } $out .= "
    '; print ''; - print ''; + print ''; print ''; } else { print ''; } @@ -1855,14 +1884,14 @@ function email_admin_prepare_head() $head[$h][2] = 'common'; $h++; - if ($conf->mailing->enabled) { + if (!empty($conf->mailing->enabled)) { $head[$h][0] = DOL_URL_ROOT."/admin/mails_emailing.php"; $head[$h][1] = $langs->trans("OutGoingEmailSetupForEmailing", $langs->transnoentitiesnoconv("EMailing")); $head[$h][2] = 'common_emailing'; $h++; } - if ($conf->ticket->enabled) { + if (!empty($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'; @@ -1870,7 +1899,8 @@ function email_admin_prepare_head() } } - if (!empty($user->admin) && (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates')) { + // admin and non admin can view this menu entry, but it is not shown yet when we on user menu "Email templates" + if (empty($_SESSION['leftmenu']) || $_SESSION['leftmenu'] != 'email_templates') { $head[$h][0] = DOL_URL_ROOT."/admin/mails_senderprofile_list.php"; $head[$h][1] = $langs->trans("EmailSenderProfiles"); $head[$h][2] = 'senderprofiles'; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index fd3ba8c6fb2..939e6514c13 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -64,20 +64,17 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; print ''; print ''; - if ($massaction != 'predelete') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system. + if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system. print ''; } print ''; - if ($canedit) - { + if ($canedit) { print '
    '; // Type - print ''; - print ''.$langs->trans("Type").''; + print ''; $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" - { + 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 $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500'); @@ -85,57 +82,47 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh // Assigned to print '
    '; - print img_picto('', 'user', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("ActionsToDoBy").''; + print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="fawidth30 inline-block"'); print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500 widthcentpercentminusxx'); print '
    '; print '
    '; - print img_picto('', 'object_group', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("ToUserOfGroup").''; + print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="fawidth30 inline-block"'); print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500'); print '
    '; - if ($conf->resource->enabled) - { + if ($conf->resource->enabled) { include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; $formresource = new FormResource($db); // Resource print '
    '; - print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("Resource").''; + print img_picto($langs->trans("Resource"), 'object_resource', 'class="fawidth30 inline-block"'); print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500'); print '
    '; } } - if (!empty($conf->societe->enabled) && $user->rights->societe->lire) - { + if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { print '
    '; - print img_picto('', 'company', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("ThirdParty").''; + print img_picto($langs->trans("ThirdParty"), 'company', 'class="fawidth30 inline-block"'); print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500'); print '
    '; } - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) - { + if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; $formproject = new FormProjets($db); print '
    '; - print img_picto('', 'project', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("Project").''; + print img_picto($langs->trans("Project"), 'project', 'class="fawidth30 inline-block"'); print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); print '
    '; } - if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) - { + if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) { // Status print '
    '; - print img_picto('', 'setup', 'class="fawidth30 inline-block"'); - print ''.$langs->trans("Status").''; + print img_picto($langs->trans("Status"), 'setup', 'class="fawidth30 inline-block"'); $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); print '
    '; } @@ -172,17 +159,22 @@ function show_array_actions_to_do($max = 5) $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; - 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; + 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 a.datep DESC, a.id DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -196,8 +188,7 @@ function show_array_actions_to_do($max = 5) $staticaction = new ActionComm($db); $customerstatic = new Client($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); @@ -211,8 +202,7 @@ function show_array_actions_to_do($max = 5) // print '
    '; print '"; // Statut @@ -275,17 +275,22 @@ function show_array_last_actions_done($max = 5) $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN "; $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action "; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; - 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; + 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 a.datep2 DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -299,8 +304,7 @@ function show_array_last_actions_done($max = 5) $staticaction = new ActionComm($db); $customerstatic = new Societe($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); @@ -314,8 +318,7 @@ function show_array_last_actions_done($max = 5) //print '
    '; print '
    '.$langs->trans("Description").''.$langs->trans("Description").''; $text = $langs->trans("Value"); print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext'); @@ -1598,24 +1628,24 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } - print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : '[]'), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0); + print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $arrayoflabels, ($obj->value ? $obj->value : 'CARD'), 1, 0, 0); print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; if ($obj->type == 'textarea' || in_array($const, array('ADHERENT_CARD_TEXT', 'ADHERENT_CARD_TEXT_RIGHT', 'ADHERENT_ETIQUETTE_TEXT'))) { - print '\n"; } 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 = new DolEditor('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); $doleditor->Create(); } elseif ($obj->type == 'yesno') { - print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : '[]'), $obj->value, 1); + print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $obj->value, 1); } elseif (preg_match('/emailtemplate/', $obj->type)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); @@ -1638,10 +1668,9 @@ 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' - { - print ''; + print $form->selectarray('constvalue'.(empty($strictw3c) ? '' : ($strictw3c == 3 ? '_'.$const : '[]')), $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); + } else { // type = 'string' ou 'chaine' + print ''; } print ''.dol_trunc($obj->label,22).''; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $customerstatic->id = $obj->socid; $customerstatic->name = $obj->name; //$customerstatic->name_alias = $obj->name_alias; @@ -232,11 +222,21 @@ function show_array_actions_to_do($max = 5) // Date print ''.dol_print_date($datep, 'day').' '; $late = 0; - if ($obj->percent == 0 && $datep && $datep < time()) $late = 1; - if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) $late = 1; - if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) $late = 1; - if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) $late = 1; - if ($late) print img_warning($langs->trans("Late")); + if ($obj->percent == 0 && $datep && $datep < time()) { + $late = 1; + } + if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) { + $late = 1; + } + if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) { + $late = 1; + } + if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) { + $late = 1; + } + if ($late) { + print img_warning($langs->trans("Late")); + } print "'.dol_trunc($obj->label,24).''; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $customerstatic->id = $obj->socid; $customerstatic->name = $obj->name; //$customerstatic->name_alias = $obj->name_alias; @@ -418,8 +421,7 @@ function actions_prepare_head($object) $h++; // Tab to link resources - if ($conf->resource->enabled) - { + if ($conf->resource->enabled) { include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; $resource = new DolResource($db); @@ -427,7 +429,9 @@ function actions_prepare_head($object) $listofresourcelinked = $resource->getElementResources($object->element, $object->id); $nbResources = (is_array($listofresourcelinked) ?count($listofresourcelinked) : 0); $head[$h][1] = $langs->trans("Resources"); - if ($nbResources > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.($nbResources).'' : ''); + if ($nbResources > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.($nbResources).'' : ''); + } $head[$h][2] = 'resources'; $h++; } @@ -440,7 +444,9 @@ function actions_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.($nbFiles + $nbLinks).'' : ''); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ''.($nbFiles + $nbLinks).'' : ''); + } $head[$h][2] = 'documents'; $h++; @@ -491,8 +497,7 @@ function calendars_prepare_head($param) $h++; //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) - if (!empty($conf->global->AGENDA_SHOW_PERTYPE)) - { + if (!empty($conf->global->AGENDA_SHOW_PERTYPE)) { $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param ? '?'.$param : ''); $head[$h][1] = $langs->trans("ViewPerType"); $head[$h][2] = 'cardpertype'; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index c9f64129e65..8874b96eda5 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -25,7 +25,7 @@ /** - * Generic function that return javascript to add to a page to transform a common input field into an autocomplete field by calling an Ajax page (ex: /societe/ajaxcompanies.php). + * Generic function that return javascript to add to a page to transform a common input field into an autocomplete field by calling an Ajax page (ex: /societe/ajax/ajaxcompanies.php). * The HTML field must be an input text with id=search_$htmlname. * This use the jQuery "autocomplete" function. If we want to use the select2, we must also convert the input into select on funcntions that call this method. * @@ -46,13 +46,19 @@ */ 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'); + 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. @@ -135,7 +141,13 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen } return { label: label, value: item.value, id: item.key, disabled: item.disabled, update: update, textarea: textarea, - pbq: item.pbq, type: item.type, qty: item.qty, discount: item.discount, pricebasetype: item.pricebasetype, price_ht: item.price_ht, price_ttc: item.price_ttc } + pbq: item.pbq, + type: item.type, qty: item.qty, discount: item.discount, + pricebasetype: item.pricebasetype, + price_ht: item.price_ht, + price_ttc: item.price_ttc, + description : item.description, + ref_customer: item.ref_customer } })); } else console.error("Error: Ajax url '.$url.($urloption ? '?'.$urloption : '').' has returned an empty page. Should be an empty json array."); @@ -147,14 +159,28 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen console.log("We will trigger change on input '.$htmlname.' because of the select definition of autocomplete code for input#search_'.$htmlname.'"); console.log("Selected id = "+ui.item.id+" - If this value is null, it means you select a record with key that is null so selection is not effective"); - console.log("Propagate before some properties retrieved into data-xxx properties"); + console.log("Propagate before some properties retrieved by ajax into data-xxx properties"); + + // For supplier price and customer when price by quantity is off + $("#'.$htmlname.'").attr("data-up", ui.item.price_ht); + $("#'.$htmlname.'").attr("data-base", ui.item.pricebasetype); + $("#'.$htmlname.'").attr("data-qty", ui.item.qty); + $("#'.$htmlname.'").attr("data-discount", ui.item.discount); + $("#'.$htmlname.'").attr("data-description", ui.item.description); + $("#'.$htmlname.'").attr("data-ref-customer", ui.item.ref_customer); + '; + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { + $script .= ' + // For customer price when PRODUIT_CUSTOMER_PRICES_BY_QTY is on $("#'.$htmlname.'").attr("data-pbq", ui.item.pbq); $("#'.$htmlname.'").attr("data-pbqup", ui.item.price_ht); $("#'.$htmlname.'").attr("data-pbqbase", ui.item.pricebasetype); $("#'.$htmlname.'").attr("data-pbqqty", ui.item.qty); $("#'.$htmlname.'").attr("data-pbqpercent", ui.item.discount); - - $("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value + '; + } + $script .= ' + $("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value // Disable an element if (options.option_disabled) { @@ -393,14 +419,26 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = global $conf; // select2 can be disabled for smartphones - if (!empty($conf->browser->layout) && $conf->browser->layout == 'phone' && !empty($conf->global->MAIN_DISALLOW_SELECT2_WITH_SMARTPHONE)) return ''; + if (!empty($conf->browser->layout) && $conf->browser->layout == 'phone' && !empty($conf->global->MAIN_DISALLOW_SELECT2_WITH_SMARTPHONE)) { + return ''; + } - if (!empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; - if (empty($conf->use_javascript_ajax)) return ''; - if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && !defined('REQUIRE_JQUERY_MULTISELECT')) return ''; - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) return ''; + if (!empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) { + return ''; + } + if (empty($conf->use_javascript_ajax)) { + return ''; + } + if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && !defined('REQUIRE_JQUERY_MULTISELECT')) { + return ''; + } + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + return ''; + } - if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete = 0; + if (empty($minLengthToAutocomplete)) { + $minLengthToAutocomplete = 0; + } $tmpplugin = 'select2'; $msg = "\n".' @@ -412,14 +450,19 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = minimumInputLength: '.$minLengthToAutocomplete.', language: select2arrayoflanguage, containerCssClass: \':all:\', /* Line to add class of origin SELECT propagated to the new tag */ templateResult: function (data, container) { /* Format visible output into combo list */ /* Code to add class of origin OPTION propagated to the new select2
  • tag */ if (data.element) { $(container).addClass($(data.element).attr("class")); } - //console.log(data.html); + console.log($(data.element).attr("data-html")); + if (data.id == -1 && $(data.element).attr("data-html") == undefined) { + return \' \'; + } if ($(data.element).attr("data-html") != undefined) return htmlEntityDecodeJs($(data.element).attr("data-html")); // If property html set, we decode html entities and use this - return data.text; + return data.text; }, templateSelection: function (selection) { /* Format visible output of selected value */ + if (selection.id == -1) return \'\'+selection.text+\'\'; return selection.text; }, escapeMarkup: function(markup) { @@ -427,11 +470,12 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = }, dropdownCssClass: \'ui-dialog\' })'; - if ($forcefocus) $msg .= '.select2(\'focus\')'; + if ($forcefocus) { + $msg .= '.select2(\'focus\')'; + } $msg .= ';'."\n"; - if (is_array($events) && count($events)) // If an array of js events to do were provided. - { + if (is_array($events) && count($events)) { // If an array of js events to do were provided. $msg .= ' jQuery("#'.$htmlname.'").change(function () { var obj = '.json_encode($events).'; @@ -471,7 +515,9 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = if (response.num) { var selecthtml_str = response.value; var selecthtml_dom=$.parseHTML(selecthtml_str); - $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + if (typeof(selecthtml_dom[0][0]) !== \'undefined\') { + $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + } } else { $("#inputautocomplete"+htmlname).val(""); } @@ -505,12 +551,16 @@ 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').''; + 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 { $out = "\n".' '; - if ($addlink) $out .= ' '.$langs->trans("Link").''; + if ($addlink) { + $out .= ' '.$langs->trans("Link").''; + } return $out; } @@ -8288,15 +8933,21 @@ function dolIsAllowedForPreview($file) global $conf; // Check .noexe extension in filename - if (preg_match('/\.noexe$/i', $file)) return 0; + if (preg_match('/\.noexe$/i', $file)) { + return 0; + } // Check mime types $mime_preview = array('bmp', 'jpeg', 'png', 'gif', 'tiff', 'pdf', 'plain', 'css', 'webp'); - if (!empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) $mime_preview[] = 'svg+xml'; + if (!empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) { + $mime_preview[] = 'svg+xml'; + } //$mime_preview[]='vnd.oasis.opendocument.presentation'; //$mime_preview[]='archive'; $num_mime = array_search(dol_mimetype($file, '', 1), $mime_preview); - if ($num_mime !== false) return 1; + if ($num_mime !== false) { + return 1; + } // By default, not allowed for preview return 0; @@ -8322,103 +8973,377 @@ function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0) $tmpfile = preg_replace('/\.noexe$/', '', $file); // Plain text files - if (preg_match('/\.txt$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $famime = 'file-text-o'; } - if (preg_match('/\.rtx$/i', $tmpfile)) { $mime = 'text/richtext'; $imgmime = 'text.png'; $famime = 'file-text-o'; } - if (preg_match('/\.csv$/i', $tmpfile)) { $mime = 'text/csv'; $imgmime = 'text.png'; $famime = 'file-text-o'; } - if (preg_match('/\.tsv$/i', $tmpfile)) { $mime = 'text/tab-separated-values'; $imgmime = 'text.png'; $famime = 'file-text-o'; } - if (preg_match('/\.(cf|conf|log)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $famime = 'file-text-o'; } - if (preg_match('/\.ini$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'ini'; $famime = 'file-text-o'; } - if (preg_match('/\.md$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'md'; $famime = 'file-text-o'; } - if (preg_match('/\.css$/i', $tmpfile)) { $mime = 'text/css'; $imgmime = 'css.png'; $srclang = 'css'; $famime = 'file-text-o'; } - if (preg_match('/\.lang$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'lang'; $famime = 'file-text-o'; } + if (preg_match('/\.txt$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.rtx$/i', $tmpfile)) { + $mime = 'text/richtext'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.csv$/i', $tmpfile)) { + $mime = 'text/csv'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.tsv$/i', $tmpfile)) { + $mime = 'text/tab-separated-values'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.(cf|conf|log)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.ini$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'ini'; + $famime = 'file-text-o'; + } + if (preg_match('/\.md$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'md'; + $famime = 'file-text-o'; + } + if (preg_match('/\.css$/i', $tmpfile)) { + $mime = 'text/css'; + $imgmime = 'css.png'; + $srclang = 'css'; + $famime = 'file-text-o'; + } + if (preg_match('/\.lang$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'lang'; + $famime = 'file-text-o'; + } // Certificate files - if (preg_match('/\.(crt|cer|key|pub)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $famime = 'file-text-o'; } + if (preg_match('/\.(crt|cer|key|pub)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $famime = 'file-text-o'; + } // XML based (HTML/XML/XAML) - if (preg_match('/\.(html|htm|shtml)$/i', $tmpfile)) { $mime = 'text/html'; $imgmime = 'html.png'; $srclang = 'html'; $famime = 'file-text-o'; } - if (preg_match('/\.(xml|xhtml)$/i', $tmpfile)) { $mime = 'text/xml'; $imgmime = 'other.png'; $srclang = 'xml'; $famime = 'file-text-o'; } - if (preg_match('/\.xaml$/i', $tmpfile)) { $mime = 'text/xml'; $imgmime = 'other.png'; $srclang = 'xaml'; $famime = 'file-text-o'; } + if (preg_match('/\.(html|htm|shtml)$/i', $tmpfile)) { + $mime = 'text/html'; + $imgmime = 'html.png'; + $srclang = 'html'; + $famime = 'file-text-o'; + } + if (preg_match('/\.(xml|xhtml)$/i', $tmpfile)) { + $mime = 'text/xml'; + $imgmime = 'other.png'; + $srclang = 'xml'; + $famime = 'file-text-o'; + } + if (preg_match('/\.xaml$/i', $tmpfile)) { + $mime = 'text/xml'; + $imgmime = 'other.png'; + $srclang = 'xaml'; + $famime = 'file-text-o'; + } // Languages - if (preg_match('/\.bas$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'bas'; $famime = 'file-code-o'; } - if (preg_match('/\.(c)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'c'; $famime = 'file-code-o'; } - if (preg_match('/\.(cpp)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'cpp'; $famime = 'file-code-o'; } - if (preg_match('/\.cs$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'cs'; $famime = 'file-code-o'; } - if (preg_match('/\.(h)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'h'; $famime = 'file-code-o'; } - if (preg_match('/\.(java|jsp)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'java'; $famime = 'file-code-o'; } - if (preg_match('/\.php([0-9]{1})?$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'php.png'; $srclang = 'php'; $famime = 'file-code-o'; } - if (preg_match('/\.phtml$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'php.png'; $srclang = 'php'; $famime = 'file-code-o'; } - if (preg_match('/\.(pl|pm)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'pl.png'; $srclang = 'perl'; $famime = 'file-code-o'; } - if (preg_match('/\.sql$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'sql'; $famime = 'file-code-o'; } - if (preg_match('/\.js$/i', $tmpfile)) { $mime = 'text/x-javascript'; $imgmime = 'jscript.png'; $srclang = 'js'; $famime = 'file-code-o'; } + if (preg_match('/\.bas$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'bas'; + $famime = 'file-code-o'; + } + if (preg_match('/\.(c)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'c'; + $famime = 'file-code-o'; + } + if (preg_match('/\.(cpp)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'cpp'; + $famime = 'file-code-o'; + } + if (preg_match('/\.cs$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'cs'; + $famime = 'file-code-o'; + } + if (preg_match('/\.(h)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'h'; + $famime = 'file-code-o'; + } + if (preg_match('/\.(java|jsp)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'java'; + $famime = 'file-code-o'; + } + if (preg_match('/\.php([0-9]{1})?$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'php.png'; + $srclang = 'php'; + $famime = 'file-code-o'; + } + if (preg_match('/\.phtml$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'php.png'; + $srclang = 'php'; + $famime = 'file-code-o'; + } + if (preg_match('/\.(pl|pm)$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'pl.png'; + $srclang = 'perl'; + $famime = 'file-code-o'; + } + if (preg_match('/\.sql$/i', $tmpfile)) { + $mime = 'text/plain'; + $imgmime = 'text.png'; + $srclang = 'sql'; + $famime = 'file-code-o'; + } + if (preg_match('/\.js$/i', $tmpfile)) { + $mime = 'text/x-javascript'; + $imgmime = 'jscript.png'; + $srclang = 'js'; + $famime = 'file-code-o'; + } // Open office - if (preg_match('/\.odp$/i', $tmpfile)) { $mime = 'application/vnd.oasis.opendocument.presentation'; $imgmime = 'ooffice.png'; $famime = 'file-powerpoint-o'; } - if (preg_match('/\.ods$/i', $tmpfile)) { $mime = 'application/vnd.oasis.opendocument.spreadsheet'; $imgmime = 'ooffice.png'; $famime = 'file-excel-o'; } - if (preg_match('/\.odt$/i', $tmpfile)) { $mime = 'application/vnd.oasis.opendocument.text'; $imgmime = 'ooffice.png'; $famime = 'file-word-o'; } + if (preg_match('/\.odp$/i', $tmpfile)) { + $mime = 'application/vnd.oasis.opendocument.presentation'; + $imgmime = 'ooffice.png'; + $famime = 'file-powerpoint-o'; + } + if (preg_match('/\.ods$/i', $tmpfile)) { + $mime = 'application/vnd.oasis.opendocument.spreadsheet'; + $imgmime = 'ooffice.png'; + $famime = 'file-excel-o'; + } + if (preg_match('/\.odt$/i', $tmpfile)) { + $mime = 'application/vnd.oasis.opendocument.text'; + $imgmime = 'ooffice.png'; + $famime = 'file-word-o'; + } // MS Office - if (preg_match('/\.mdb$/i', $tmpfile)) { $mime = 'application/msaccess'; $imgmime = 'mdb.png'; $famime = 'file-o'; } - if (preg_match('/\.doc(x|m)?$/i', $tmpfile)) { $mime = 'application/msword'; $imgmime = 'doc.png'; $famime = 'file-word-o'; } - if (preg_match('/\.dot(x|m)?$/i', $tmpfile)) { $mime = 'application/msword'; $imgmime = 'doc.png'; $famime = 'file-word-o'; } - if (preg_match('/\.xlt(x)?$/i', $tmpfile)) { $mime = 'application/vnd.ms-excel'; $imgmime = 'xls.png'; $famime = 'file-excel-o'; } - if (preg_match('/\.xla(m)?$/i', $tmpfile)) { $mime = 'application/vnd.ms-excel'; $imgmime = 'xls.png'; $famime = 'file-excel-o'; } - if (preg_match('/\.xls$/i', $tmpfile)) { $mime = 'application/vnd.ms-excel'; $imgmime = 'xls.png'; $famime = 'file-excel-o'; } - if (preg_match('/\.xls(b|m|x)$/i', $tmpfile)) { $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; $imgmime = 'xls.png'; $famime = 'file-excel-o'; } - if (preg_match('/\.pps(m|x)?$/i', $tmpfile)) { $mime = 'application/vnd.ms-powerpoint'; $imgmime = 'ppt.png'; $famime = 'file-powerpoint-o'; } - if (preg_match('/\.ppt(m|x)?$/i', $tmpfile)) { $mime = 'application/x-mspowerpoint'; $imgmime = 'ppt.png'; $famime = 'file-powerpoint-o'; } + if (preg_match('/\.mdb$/i', $tmpfile)) { + $mime = 'application/msaccess'; + $imgmime = 'mdb.png'; + $famime = 'file-o'; + } + if (preg_match('/\.doc(x|m)?$/i', $tmpfile)) { + $mime = 'application/msword'; + $imgmime = 'doc.png'; + $famime = 'file-word-o'; + } + if (preg_match('/\.dot(x|m)?$/i', $tmpfile)) { + $mime = 'application/msword'; + $imgmime = 'doc.png'; + $famime = 'file-word-o'; + } + if (preg_match('/\.xlt(x)?$/i', $tmpfile)) { + $mime = 'application/vnd.ms-excel'; + $imgmime = 'xls.png'; + $famime = 'file-excel-o'; + } + if (preg_match('/\.xla(m)?$/i', $tmpfile)) { + $mime = 'application/vnd.ms-excel'; + $imgmime = 'xls.png'; + $famime = 'file-excel-o'; + } + if (preg_match('/\.xls$/i', $tmpfile)) { + $mime = 'application/vnd.ms-excel'; + $imgmime = 'xls.png'; + $famime = 'file-excel-o'; + } + if (preg_match('/\.xls(b|m|x)$/i', $tmpfile)) { + $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + $imgmime = 'xls.png'; + $famime = 'file-excel-o'; + } + if (preg_match('/\.pps(m|x)?$/i', $tmpfile)) { + $mime = 'application/vnd.ms-powerpoint'; + $imgmime = 'ppt.png'; + $famime = 'file-powerpoint-o'; + } + if (preg_match('/\.ppt(m|x)?$/i', $tmpfile)) { + $mime = 'application/x-mspowerpoint'; + $imgmime = 'ppt.png'; + $famime = 'file-powerpoint-o'; + } // Other - if (preg_match('/\.pdf$/i', $tmpfile)) { $mime = 'application/pdf'; $imgmime = 'pdf.png'; $famime = 'file-pdf-o'; } + if (preg_match('/\.pdf$/i', $tmpfile)) { + $mime = 'application/pdf'; + $imgmime = 'pdf.png'; + $famime = 'file-pdf-o'; + } // Scripts - if (preg_match('/\.bat$/i', $tmpfile)) { $mime = 'text/x-bat'; $imgmime = 'script.png'; $srclang = 'dos'; $famime = 'file-code-o'; } - if (preg_match('/\.sh$/i', $tmpfile)) { $mime = 'text/x-sh'; $imgmime = 'script.png'; $srclang = 'bash'; $famime = 'file-code-o'; } - if (preg_match('/\.ksh$/i', $tmpfile)) { $mime = 'text/x-ksh'; $imgmime = 'script.png'; $srclang = 'bash'; $famime = 'file-code-o'; } - if (preg_match('/\.bash$/i', $tmpfile)) { $mime = 'text/x-bash'; $imgmime = 'script.png'; $srclang = 'bash'; $famime = 'file-code-o'; } + if (preg_match('/\.bat$/i', $tmpfile)) { + $mime = 'text/x-bat'; + $imgmime = 'script.png'; + $srclang = 'dos'; + $famime = 'file-code-o'; + } + if (preg_match('/\.sh$/i', $tmpfile)) { + $mime = 'text/x-sh'; + $imgmime = 'script.png'; + $srclang = 'bash'; + $famime = 'file-code-o'; + } + if (preg_match('/\.ksh$/i', $tmpfile)) { + $mime = 'text/x-ksh'; + $imgmime = 'script.png'; + $srclang = 'bash'; + $famime = 'file-code-o'; + } + if (preg_match('/\.bash$/i', $tmpfile)) { + $mime = 'text/x-bash'; + $imgmime = 'script.png'; + $srclang = 'bash'; + $famime = 'file-code-o'; + } // Images - if (preg_match('/\.ico$/i', $tmpfile)) { $mime = 'image/x-icon'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.(jpg|jpeg)$/i', $tmpfile)) { $mime = 'image/jpeg'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.png$/i', $tmpfile)) { $mime = 'image/png'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.gif$/i', $tmpfile)) { $mime = 'image/gif'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.bmp$/i', $tmpfile)) { $mime = 'image/bmp'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.(tif|tiff)$/i', $tmpfile)) { $mime = 'image/tiff'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.svg$/i', $tmpfile)) { $mime = 'image/svg+xml'; $imgmime = 'image.png'; $famime = 'file-image-o'; } - if (preg_match('/\.webp$/i', $tmpfile)) { $mime = 'image/webp'; $imgmime = 'image.png'; $famime = 'file-image-o'; } + if (preg_match('/\.ico$/i', $tmpfile)) { + $mime = 'image/x-icon'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.(jpg|jpeg)$/i', $tmpfile)) { + $mime = 'image/jpeg'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.png$/i', $tmpfile)) { + $mime = 'image/png'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.gif$/i', $tmpfile)) { + $mime = 'image/gif'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.bmp$/i', $tmpfile)) { + $mime = 'image/bmp'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.(tif|tiff)$/i', $tmpfile)) { + $mime = 'image/tiff'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.svg$/i', $tmpfile)) { + $mime = 'image/svg+xml'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } + if (preg_match('/\.webp$/i', $tmpfile)) { + $mime = 'image/webp'; + $imgmime = 'image.png'; + $famime = 'file-image-o'; + } // Calendar - if (preg_match('/\.vcs$/i', $tmpfile)) { $mime = 'text/calendar'; $imgmime = 'other.png'; $famime = 'file-text-o'; } - if (preg_match('/\.ics$/i', $tmpfile)) { $mime = 'text/calendar'; $imgmime = 'other.png'; $famime = 'file-text-o'; } + if (preg_match('/\.vcs$/i', $tmpfile)) { + $mime = 'text/calendar'; + $imgmime = 'other.png'; + $famime = 'file-text-o'; + } + if (preg_match('/\.ics$/i', $tmpfile)) { + $mime = 'text/calendar'; + $imgmime = 'other.png'; + $famime = 'file-text-o'; + } // Other - if (preg_match('/\.torrent$/i', $tmpfile)) { $mime = 'application/x-bittorrent'; $imgmime = 'other.png'; $famime = 'file-o'; } + if (preg_match('/\.torrent$/i', $tmpfile)) { + $mime = 'application/x-bittorrent'; + $imgmime = 'other.png'; + $famime = 'file-o'; + } // Audio - if (preg_match('/\.(mp3|ogg|au|wav|wma|mid)$/i', $tmpfile)) { $mime = 'audio'; $imgmime = 'audio.png'; $famime = 'file-audio-o'; } + if (preg_match('/\.(mp3|ogg|au|wav|wma|mid)$/i', $tmpfile)) { + $mime = 'audio'; + $imgmime = 'audio.png'; + $famime = 'file-audio-o'; + } // Video - if (preg_match('/\.mp4$/i', $tmpfile)) { $mime = 'video/mp4'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.ogv$/i', $tmpfile)) { $mime = 'video/ogg'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.webm$/i', $tmpfile)) { $mime = 'video/webm'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.avi$/i', $tmpfile)) { $mime = 'video/x-msvideo'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.divx$/i', $tmpfile)) { $mime = 'video/divx'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.xvid$/i', $tmpfile)) { $mime = 'video/xvid'; $imgmime = 'video.png'; $famime = 'file-video-o'; } - if (preg_match('/\.(wmv|mpg|mpeg)$/i', $tmpfile)) { $mime = 'video'; $imgmime = 'video.png'; $famime = 'file-video-o'; } + if (preg_match('/\.mp4$/i', $tmpfile)) { + $mime = 'video/mp4'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.ogv$/i', $tmpfile)) { + $mime = 'video/ogg'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.webm$/i', $tmpfile)) { + $mime = 'video/webm'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.avi$/i', $tmpfile)) { + $mime = 'video/x-msvideo'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.divx$/i', $tmpfile)) { + $mime = 'video/divx'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.xvid$/i', $tmpfile)) { + $mime = 'video/xvid'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } + if (preg_match('/\.(wmv|mpg|mpeg)$/i', $tmpfile)) { + $mime = 'video'; + $imgmime = 'video.png'; + $famime = 'file-video-o'; + } // Archive - if (preg_match('/\.(zip|rar|gz|tgz|z|cab|bz2|7z|tar|lzh)$/i', $tmpfile)) { $mime = 'archive'; $imgmime = 'archive.png'; $famime = 'file-archive-o'; } // application/xxx where zzz is zip, ... + if (preg_match('/\.(zip|rar|gz|tgz|z|cab|bz2|7z|tar|lzh|zst)$/i', $tmpfile)) { + $mime = 'archive'; + $imgmime = 'archive.png'; + $famime = 'file-archive-o'; + } // application/xxx where zzz is zip, ... // Exe - if (preg_match('/\.(exe|com)$/i', $tmpfile)) { $mime = 'application/octet-stream'; $imgmime = 'other.png'; $famime = 'file-o'; } + if (preg_match('/\.(exe|com)$/i', $tmpfile)) { + $mime = 'application/octet-stream'; + $imgmime = 'other.png'; + $famime = 'file-o'; + } // Lib - if (preg_match('/\.(dll|lib|o|so|a)$/i', $tmpfile)) { $mime = 'library'; $imgmime = 'library.png'; $famime = 'file-o'; } + if (preg_match('/\.(dll|lib|o|so|a)$/i', $tmpfile)) { + $mime = 'library'; + $imgmime = 'library.png'; + $famime = 'file-o'; + } // Err - if (preg_match('/\.err$/i', $tmpfile)) { $mime = 'error'; $imgmime = 'error.png'; $famime = 'file-text-o'; } + if (preg_match('/\.err$/i', $tmpfile)) { + $mime = 'error'; + $imgmime = 'error.png'; + $famime = 'file-text-o'; + } // Return string - if ($mode == 1) - { + if ($mode == 1) { $tmp = explode('/', $mime); return (!empty($tmp[1]) ? $tmp[1] : $tmp[0]); } - if ($mode == 2) - { + if ($mode == 2) { return $imgmime; } - if ($mode == 3) - { + if ($mode == 3) { return $srclang; } - if ($mode == 4) - { + if ($mode == 4) { return $famime; } return $mime; @@ -8438,17 +9363,16 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield { global $dictvalues, $db, $langs; - if (!isset($dictvalues[$tablename])) - { + if (!isset($dictvalues[$tablename])) { $dictvalues[$tablename] = array(); $sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields - if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')'; + if ($checkentity) { + $sql .= ' AND entity IN (0,'.getEntity($tablename).')'; + } $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $dictvalues[$tablename][$obj->{$rowidfield}] = $obj; } } else { @@ -8456,10 +9380,13 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield } } - if (!empty($dictvalues[$tablename][$id])) return $dictvalues[$tablename][$id]->{$field}; // Found - else // Not found + if (!empty($dictvalues[$tablename][$id])) { + return $dictvalues[$tablename][$id]->{$field}; // Found + } else // Not found { - if ($id > 0) return $id; + if ($id > 0) { + return $id; + } return ''; } } @@ -8474,12 +9401,10 @@ function colorIsLight($stringcolor) { $stringcolor = str_replace('#', '', $stringcolor); $res = -1; - if (!empty($stringcolor)) - { + if (!empty($stringcolor)) { $res = 0; $tmp = explode(',', $stringcolor); - if (count($tmp) > 1) // This is a comma RGB ('255','255','255') - { + if (count($tmp) > 1) { // This is a comma RGB ('255','255','255') $r = $tmp[0]; $g = $tmp[1]; $b = $tmp[2]; @@ -8492,7 +9417,9 @@ function colorIsLight($stringcolor) $b = hexdec($hexb); } $bright = (max($r, $g, $b) + min($r, $g, $b)) / 510.0; // HSL algorithm - if ($bright > 0.6) $res = 1; + if ($bright > 0.6) { + $res = 1; + } } return $res; } @@ -8511,22 +9438,31 @@ function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal //print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms']; //print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal); - if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition - if ($type_user && $menuentry['module']) - { + if (empty($menuentry['enabled'])) { + return 0; // Entry disabled by condition + } + if ($type_user && $menuentry['module']) { $tmploops = explode('|', $menuentry['module']); $found = 0; - foreach ($tmploops as $tmploop) - { + foreach ($tmploops as $tmploop) { if (in_array($tmploop, $listofmodulesforexternal)) { - $found++; break; + $found++; + break; } } - if (!$found) return 0; // Entry is for menus all excluded to external users + if (!$found) { + return 0; // Entry is for menus all excluded to external users + } + } + if (!$menuentry['perms'] && $type_user) { + return 0; // No permissions and user is external + } + if (!$menuentry['perms'] && !empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) { + return 0; // No permissions and option to hide when not allowed, even for internal user, is on + } + if (!$menuentry['perms']) { + return 2; // No permissions and user is external } - if (!$menuentry['perms'] && $type_user) return 0; // No permissions and user is external - if (!$menuentry['perms'] && !empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on - if (!$menuentry['perms']) return 2; // No permissions and user is external return 1; } @@ -8576,7 +9512,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' // Override attr if (!empty($params['attr']) && is_array($params['attr'])) { - foreach ($params['attr']as $key => $value) { + foreach ($params['attr'] as $key => $value) { if ($key == 'class') { $attr['class'] .= ' '.$value; } elseif ($key == 'classOverride') { @@ -8633,18 +9569,21 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st $return = !empty($html) ? $html : (empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)); } elseif ($displayMode == 1) { $return = !empty($html) ? $html : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); - } // Use status with images (for backward compatibility) - elseif (!empty($conf->global->MAIN_STATUS_USES_IMAGES)) { + } elseif (!empty($conf->global->MAIN_STATUS_USES_IMAGES)) { + // Use status with images (for backward compatibility) $return = ''; $htmlLabel = (in_array($displayMode, array(1, 2, 5)) ? '' : '').(!empty($html) ? $html : $statusLabel).(in_array($displayMode, array(1, 2, 5)) ? '' : ''); $htmlLabelShort = (in_array($displayMode, array(1, 2, 5)) ? '' : '').(!empty($html) ? $html : (!empty($statusLabelShort) ? $statusLabelShort : $statusLabel)).(in_array($displayMode, array(1, 2, 5)) ? '' : ''); // For small screen, we always use the short label instead of long label. - if (!empty($conf->dol_optimize_smallscreen)) - { - if ($displayMode == 0) $displayMode = 1; - elseif ($displayMode == 4) $displayMode = 2; - elseif ($displayMode == 6) $displayMode = 5; + if (!empty($conf->dol_optimize_smallscreen)) { + if ($displayMode == 0) { + $displayMode = 1; + } elseif ($displayMode == 4) { + $displayMode = 2; + } elseif ($displayMode == 6) { + $displayMode = 5; + } } // For backward compatibility. Image's filename are still in French, so we use this array to convert @@ -8678,8 +9617,8 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } else { // $displayMode >= 6 $return = $htmlLabel.' '.$htmlImg; } - } // Use new badge - elseif (empty($conf->global->MAIN_STATUS_USES_IMAGES) && !empty($displayMode)) { + } elseif (empty($conf->global->MAIN_STATUS_USES_IMAGES) && !empty($displayMode)) { + // Use new badge $statusLabelShort = (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); $dolGetBadgeParams['attr']['class'] = 'badge-status'; @@ -8771,6 +9710,17 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = return '
    <'.$tag.' '.$compiledAttributes.'>'.$html.'
    '; } +/** + * Add space between dolGetButtonTitle + * + * @param string $moreClass more css class label + * @return string html of title separator + */ +function dolGetButtonTitleSeparator($moreClass = "") +{ + return ''; +} + /** * Function dolGetButtonTitle : this kind of buttons are used in title in list * @@ -8779,7 +9729,7 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = * @param string $iconClass class for icon element (Example: 'fa fa-file') * @param string $url the url for link * @param string $id attribute id of button - * @param int $status 0 no user rights, 1 active, -1 Feature Disabled, -2 disable Other reason use helpText as tooltip + * @param int $status 0 no user rights, 1 active, 2 current action or selected, -1 Feature Disabled, -2 disable Other reason use helpText as tooltip * @param array $params various params for future : recommended rather than adding more function arguments * @return string html button */ @@ -8793,10 +9743,14 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u } $class = 'btnTitle'; - if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-comment-dots'))) $class .= ' btnTitlePlus'; + if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-comment-dots'))) { + $class .= ' btnTitlePlus'; + } $useclassfortooltip = 1; - if (!empty($params['morecss'])) $class .= ' '.$params['morecss']; + if (!empty($params['morecss'])) { + $class .= ' '.$params['morecss']; + } $attr = array( 'class' => $class, @@ -8810,7 +9764,9 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $useclassfortooltip = 0; } - if ($status <= 0) { + if ($status == 2) { + $attr['class'] .= ' btnTitleSelected'; + } elseif ($status <= 0) { $attr['class'] .= ' refused'; $attr['href'] = ''; @@ -8982,9 +9938,15 @@ function getElementProperties($element_type) $subelement = 'product'; } - if (empty($classfile)) $classfile = strtolower($subelement); - if (empty($classname)) $classname = ucfirst($subelement); - if (empty($classpath)) $classpath = $module.'/class'; + if (empty($classfile)) { + $classfile = strtolower($subelement); + } + if (empty($classname)) { + $classname = ucfirst($subelement); + } + if (empty($classpath)) { + $classpath = $module.'/class'; + } $element_properties = array( 'module' => $module, @@ -9011,14 +9973,12 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '') global $conf, $db; $element_prop = getElementProperties($element_type); - if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled) - { + if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled) { dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php'); $objecttmp = new $element_prop['classname']($db); $ret = $objecttmp->fetch($element_id, $element_ref); - if ($ret >= 0) - { + if ($ret >= 0) { return $objecttmp; } } @@ -9033,8 +9993,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '') */ function isAFileWithExecutableContent($filename) { - if (preg_match('/\.(htm|html|js|phar|php|php\d+|phtml|pht|pl|py|cgi|ksh|sh|shtml|bash|bat|cmd|wpk|exe|dmg)$/i', $filename)) - { + if (preg_match('/\.(htm|html|js|phar|php|php\d+|phtml|pht|pl|py|cgi|ksh|sh|shtml|bash|bat|cmd|wpk|exe|dmg)$/i', $filename)) { return true; } @@ -9166,16 +10125,14 @@ function addSummaryTableLine($tableColumnCount, $num, $nbofloop = 0, $total = 0, return; } - if ($nbofloop === 0) - { + if ($nbofloop === 0) { // don't show a summary line return; } if ($num === 0) { $colspan = $tableColumnCount; - } - elseif ($num > $nbofloop) { + } elseif ($num > $nbofloop) { $colspan = $tableColumnCount; } else { $colspan = $tableColumnCount - 1; @@ -9215,27 +10172,31 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1) if ($method == -1) { $method = 0; - if (!empty($conf->global->MAIN_FORCE_READFILE_WITH_FREAD)) $method = 1; - if (!empty($conf->global->MAIN_FORCE_READFILE_WITH_STREAM_COPY)) $method = 2; + if (!empty($conf->global->MAIN_FORCE_READFILE_WITH_FREAD)) { + $method = 1; + } + if (!empty($conf->global->MAIN_FORCE_READFILE_WITH_STREAM_COPY)) { + $method = 2; + } } // Be sure we don't have output buffering enabled to have readfile working correctly - while (ob_get_level()) ob_end_flush(); + while (ob_get_level()) { + ob_end_flush(); + } // Solution 0 if ($method == 0) { readfile($fullpath_original_file_osencoded); - } - // Solution 1 - elseif ($method == 1) { + } elseif ($method == 1) { + // Solution 1 $handle = fopen($fullpath_original_file_osencoded, "rb"); while (!feof($handle)) { print fread($handle, 8192); } fclose($handle); - } - // Solution 2 - elseif ($method == 2) { + } elseif ($method == 2) { + // Solution 2 $handle1 = fopen($fullpath_original_file_osencoded, "rb"); $handle2 = fopen("php://output", "wb"); stream_copy_to_stream($handle1, $handle2); @@ -9243,3 +10204,16 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1) fclose($handle2); } } + +/** + * Create a button to copy $valuetoprint in the clipboard + * + * @param string $valuetoprint The value to print + * @param int $showonlyonhover Show the copypaste button only on hover + * @return string The string to print for the button + */ +function showValueWithClipboardCPButton($valuetoprint, $showonlyonhover = 1) +{ + $result = ''.$valuetoprint.''; + return $result; +} diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index fcac069183e..e279ced2a3d 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -83,8 +83,7 @@ function dolGetModulesDirs($subdir = '') $modulesdir = array(); - foreach ($conf->file->dol_document_root as $type => $dirroot) - { + foreach ($conf->file->dol_document_root as $type => $dirroot) { // Default core/modules dir if ($type === 'main') { $modulesdir[$dirroot.'/core/modules'.$subdir.'/'] = $dirroot.'/core/modules'.$subdir.'/'; @@ -92,16 +91,14 @@ function dolGetModulesDirs($subdir = '') // Scan dir from external modules $handle = @opendir($dirroot); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/disabled/', $file)) continue; // We discard module if it contains disabled into name. + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/disabled/', $file)) { + continue; // We discard module if it contains disabled into name. + } - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot.'/'.$file.'/core/modules'.$subdir.'/')) - { + if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') { + if (is_dir($dirroot.'/'.$file.'/core/modules'.$subdir.'/')) { $modulesdir[$dirroot.'/'.$file.'/core/modules'.$subdir.'/'] = $dirroot.'/'.$file.'/core/modules'.$subdir.'/'; } } @@ -128,8 +125,12 @@ function dol_getDefaultFormat(Translate $outputlangs = null) $outputlangs = $langs; } - if ($outputlangs->defaultlang == 'ca_CA') $selected = 'CAP4'; // Canada - if ($outputlangs->defaultlang == 'en_US') $selected = 'USLetter'; // US + if ($outputlangs->defaultlang == 'ca_CA') { + $selected = 'CAP4'; // Canada + } + if ($outputlangs->defaultlang == 'en_US') { + $selected = 'USLetter'; // US + } return $selected; } @@ -146,35 +147,47 @@ function dol_print_file($langs, $filename, $searchalt = 0) global $conf; // Test if file is in lang directory - foreach ($langs->dir as $searchdir) - { + foreach ($langs->dir as $searchdir) { $formfile = ($searchdir."/langs/".$langs->defaultlang."/".$filename); dol_syslog('functions2::dol_print_file search file '.$formfile, LOG_DEBUG); - if (is_readable($formfile)) - { + if (is_readable($formfile)) { $content = file_get_contents($formfile); $isutf8 = utf8_check($content); - if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') print utf8_encode($content); - elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') print utf8_decode($content); - else print $content; + if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') { + print utf8_encode($content); + } elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') { + print utf8_decode($content); + } else { + print $content; + } return true; - } else dol_syslog('functions2::dol_print_file not found', LOG_DEBUG); + } else { + dol_syslog('functions2::dol_print_file not found', LOG_DEBUG); + } if ($searchalt) { // Test si fichier dans repertoire de la langue alternative - if ($langs->defaultlang != "en_US") $formfilealt = $searchdir."/langs/en_US/".$filename; - else $formfilealt = $searchdir."/langs/fr_FR/".$filename; + if ($langs->defaultlang != "en_US") { + $formfilealt = $searchdir."/langs/en_US/".$filename; + } else { + $formfilealt = $searchdir."/langs/fr_FR/".$filename; + } dol_syslog('functions2::dol_print_file search alt file '.$formfilealt, LOG_DEBUG); //print 'getcwd='.getcwd().' htmlfilealt='.$formfilealt.' X '.file_exists(getcwd().'/'.$formfilealt); - if (is_readable($formfilealt)) - { + if (is_readable($formfilealt)) { $content = file_get_contents($formfilealt); $isutf8 = utf8_check($content); - if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') print utf8_encode($content); - elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') print utf8_decode($content); - else print $content; + if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') { + print utf8_encode($content); + } elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') { + print utf8_decode($content); + } else { + print $content; + } return true; - } else dol_syslog('functions2::dol_print_file not found', LOG_DEBUG); + } else { + dol_syslog('functions2::dol_print_file not found', LOG_DEBUG); + } } } @@ -204,268 +217,492 @@ function dol_print_object_info($object, $usetable = 0) $deltadateforuser = round($deltadateforclient - $deltadateforserver); //print "x".$deltadateforserver." - ".$deltadateforclient." - ".$deltadateforuser; - if ($usetable) print ''; + if ($usetable) { + print '
    '; + } // Import key - if (!empty($object->import_key)) - { - if ($usetable) print ''; - else print '
    '; + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User creation (old method using already loaded object and not id is kept for backward compatibility) - if (!empty($object->user_creation) || !empty($object->user_creation_id)) - { - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date creation - if (!empty($object->date_creation)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_creation, "dayhour", "tzuserrel").'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User change (old method using already loaded object and not id is kept for backward compatibility) - if (!empty($object->user_modification) || !empty($object->user_modification_id)) - { - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date change - if (!empty($object->date_modification)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_modification, "dayhour", "tzuserrel").'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User validation (old method using already loaded object and not id is kept for backward compatibility) - if (!empty($object->user_validation) || !empty($object->user_validation_id)) - { - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date validation - if (!empty($object->date_validation)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_validation, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User approve (old method using already loaded object and not id is kept for backward compatibility) - if (!empty($object->user_approve) || !empty($object->user_approve_id)) - { - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date approve - if (!empty($object->date_approve)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_approve, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User approve - if (!empty($object->user_approve_id2)) - { - if ($usetable) print ''; - else print '
    '; + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // Date approve - if (!empty($object->date_approve2)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_approve2, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } + } + + // User signature + if (!empty($object->user_signature)) { + if ($usetable) { + print ''; + } else { + print '
    '; + } + } + + // Date signature + if (!empty($object->date_signature)) { + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User close - if (!empty($object->user_cloture) || !empty($object->user_closing)) - { - if (isset($object->user_cloture) && !empty($object->user_cloture)) $object->user_closing = $object->user_cloture; - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date close - if (!empty($object->date_cloture) || !empty($object->date_closing)) - { - if (isset($object->date_cloture) && !empty($object->date_cloture)) $object->date_closing = $object->date_cloture; - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // User conciliate - if (!empty($object->user_rappro)) - { - if ($usetable) print ''; + } else { + print '
    '; } - if ($usetable) print ''; - else print '
    '; } // Date conciliate - if (!empty($object->date_rappro)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } // Date send - if (!empty($object->date_envoi)) - { - if ($usetable) print ''; - else print '
    '; + if ($deltadateforuser) { + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + } + if ($usetable) { + print ''; + } else { + print '
    '; + } } - if ($usetable) print '
    '; + if (!empty($object->import_key)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ImportedWithSet"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print $object->import_key; - if ($usetable) print '
    '; + if (!empty($object->user_creation) || !empty($object->user_creation_id)) { + if ($usetable) { + print '
    '; + } print $langs->trans("CreatedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_creation)) - { - if ($object->user_creation->id) print $object->user_creation->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_creation)) { + if ($object->user_creation->id) { + print $object->user_creation->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_creation_id ? $object->user_creation_id : $object->user_creation); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_creation)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateCreation"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_creation, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_creation, "dayhour", "tzuserrel").'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->user_modification) || !empty($object->user_modification_id)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ModifiedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_modification)) - { - if ($object->user_modification->id) print $object->user_modification->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_modification)) { + if ($object->user_modification->id) { + print $object->user_modification->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_modification_id ? $object->user_modification_id : $object->user_modification); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_modification)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateLastModification"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_modification, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_modification, "dayhour", "tzuserrel").'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->user_validation) || !empty($object->user_validation_id)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ValidatedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_validation)) - { - if ($object->user_validation->id) print $object->user_validation->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_validation)) { + if ($object->user_validation->id) { + print $object->user_validation->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_validation_id ? $object->user_validation_id : $object->user_validation); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_validation)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateValidation"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_validation, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_validation, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->user_approve) || !empty($object->user_approve_id)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ApprovedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_approve)) - { - if ($object->user_approve->id) print $object->user_approve->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_approve)) { + if ($object->user_approve->id) { + print $object->user_approve->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_approve_id ? $object->user_approve_id : $object->user_approve); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_approve)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateApprove"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_approve, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_approve, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->user_approve_id2)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ApprovedBy"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } $userstatic = new User($db); $userstatic->fetch($object->user_approve_id2); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); - if ($usetable) print '
    '; + if (!empty($object->date_approve2)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateApprove2"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_approve2, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_approve2, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + } + print $langs->trans('SignedBy'); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_signature)) { + if ($object->user_signature->id) { + print $object->user_signature->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans('Unknown'); + } + } else { + $userstatic = new User($db); + $userstatic->fetch($object->user_signature); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans('Unknown'); + } + } + if ($usetable) { + print '
    '; + } + print $langs->trans('DateSigning'); + if ($usetable) { + print ''; + } else { + print ': '; + } + print dol_print_date($object->date_signature, 'dayhour'); + if ($deltadateforuser) { + print ' '.$langs->trans('CurrentHour').'   /   '.dol_print_date($object->date_signature, 'dayhour', 'tzuserrel').'  '.$langs->trans('ClientHour'); + } + if ($usetable) { + print '
    '; + if (!empty($object->user_cloture) || !empty($object->user_closing)) { + if (isset($object->user_cloture) && !empty($object->user_cloture)) { + $object->user_closing = $object->user_cloture; + } + if ($usetable) { + print '
    '; + } print $langs->trans("ClosedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_closing)) - { - if ($object->user_closing->id) print $object->user_closing->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_closing)) { + if ($object->user_closing->id) { + print $object->user_closing->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_closing); - if ($userstatic->id) print $userstatic->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_cloture) || !empty($object->date_closing)) { + if (isset($object->date_cloture) && !empty($object->date_cloture)) { + $object->date_closing = $object->date_cloture; + } + if ($usetable) { + print '
    '; + } print $langs->trans("DateClosing"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_closing, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->user_rappro)) { + if ($usetable) { + print '
    '; + } print $langs->trans("ConciliatedBy"); - if ($usetable) print ''; - else print ': '; - if (is_object($object->user_rappro)) - { - if ($object->user_rappro->id) print $object->user_rappro->getNomUrl(-1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($usetable) { + print ''; + } else { + print ': '; + } + if (is_object($object->user_rappro)) { + if ($object->user_rappro->id) { + print $object->user_rappro->getNomUrl(-1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } } else { $userstatic = new User($db); $userstatic->fetch($object->user_rappro); - if ($userstatic->id) print $userstatic->getNomUrl(1, '', 0, 0, 0); - else print $langs->trans("Unknown"); + if ($userstatic->id) { + print $userstatic->getNomUrl(1, '', 0, 0, 0); + } else { + print $langs->trans("Unknown"); + } + } + if ($usetable) { + print '
    '; + if (!empty($object->date_rappro)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateConciliating"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_rappro, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if (!empty($object->date_envoi)) { + if ($usetable) { + print '
    '; + } print $langs->trans("DateLastSend"); - if ($usetable) print ''; - else print ': '; + if ($usetable) { + print ''; + } else { + print ': '; + } print dol_print_date($object->date_envoi, 'dayhour', 'tzserver'); - if ($deltadateforuser) print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); - if ($usetable) print '
    '; + if ($usetable) { + print '
  • '; + } } @@ -514,10 +751,14 @@ function isValidUrl($url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0 $urlregex = ''; // SCHEME - if ($http) $urlregex .= "^(http:\/\/|https:\/\/)"; + if ($http) { + $urlregex .= "^(http:\/\/|https:\/\/)"; + } // USER AND PASS - if ($pass) $urlregex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)"; + if ($pass) { + $urlregex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)"; + } // HOSTNAME OR IP //$urlregex .= "[a-z0-9+\$_-]+(\.[a-z0-9+\$_-]+)*"; // x allowed (ex. http://localhost, http://routerlogin) @@ -526,17 +767,24 @@ function isValidUrl($url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0 //use only one of the above // PORT - if ($port) $urlregex .= "(\:[0-9]{2,5})"; + if ($port) { + $urlregex .= "(\:[0-9]{2,5})"; + } // PATH - if ($path) $urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/"; + if ($path) { + $urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/"; + } // GET Query - if ($query) $urlregex .= "(\?[a-z+&\$_.-][a-z0-9;:@\/&%=+\$_.-]*)"; + if ($query) { + $urlregex .= "(\?[a-z+&\$_.-][a-z0-9;:@\/&%=+\$_.-]*)"; + } // ANCHOR - if ($anchor) $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)$"; + if ($anchor) { + $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)$"; + } // check - if (preg_match('/'.$urlregex.'/i', $url)) - { + if (preg_match('/'.$urlregex.'/i', $url)) { $ValidUrl = 1; } //print $urlregex.' - '.$url.' - '.$ValidUrl; @@ -552,16 +800,14 @@ function isValidUrl($url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0 */ function isValidVATID($company) { - if ($company->isInEEC()) // Syntax check rules for EEC countries - { + if ($company->isInEEC()) { // Syntax check rules for EEC countries /* Disabled because some companies can have an address in Irland and a vat number in France. - $vatprefix = $company->country_code; - if ($vatprefix == 'GR') $vatprefix = '(EL|GR)'; - elseif ($vatprefix == 'MC') $vatprefix = 'FR'; // Monaco is using french VAT numbers - else $vatprefix = preg_quote($vatprefix, '/');*/ + $vatprefix = $company->country_code; + if ($vatprefix == 'GR') $vatprefix = '(EL|GR)'; + elseif ($vatprefix == 'MC') $vatprefix = 'FR'; // Monaco is using french VAT numbers + else $vatprefix = preg_quote($vatprefix, '/');*/ $vatprefix = '[a-zA-Z][a-zA-Z]'; - if (!preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,14}$/i', str_replace(' ', '', $company->tva_intra))) - { + if (!preg_match('/^'.$vatprefix.'[a-zA-Z0-9\-\.]{5,14}$/i', str_replace(' ', '', $company->tva_intra))) { return 0; } } @@ -582,8 +828,7 @@ function clean_url($url, $http = 1) // To include the minus sign in a char class, we must not escape it but put it at the end of the class // Also, there's no need of escape a dot sign in a class $regs = array(); - if (preg_match('/^(https?:[\\/]+)?([0-9A-Z.-]+\.[A-Z]{2,4})(:[0-9]+)?/i', $url, $regs)) - { + if (preg_match('/^(https?:[\\/]+)?([0-9A-Z.-]+\.[A-Z]{2,4})(:[0-9]+)?/i', $url, $regs)) { $proto = $regs[1]; $domain = $regs[2]; $port = isset($regs[3]) ? $regs[3] : ''; @@ -593,10 +838,8 @@ function clean_url($url, $http = 1) // Si http: defini on supprime le http (Si https on ne supprime pas) $newproto = $proto; - if ($http == 0) - { - if (preg_match('/^http:[\\/]+/i', $url)) - { + if ($http == 0) { + if (preg_match('/^http:[\\/]+/i', $url)) { $url = preg_replace('/^http:[\\/]+/i', '', $url); $newproto = ''; } @@ -606,7 +849,9 @@ function clean_url($url, $http = 1) $CleanUrl = preg_replace('/^'.preg_quote($proto.$domain, '/').'/i', $newproto.strtolower($domain), $url); return $CleanUrl; - } else return $url; + } else { + return $url; + } } @@ -624,7 +869,9 @@ function clean_url($url, $http = 1) */ function dolObfuscateEmail($mail, $replace = "*", $nbreplace = 8, $nbdisplaymail = 4, $nbdisplaydomain = 3, $displaytld = true) { - if (!isValidEmail($mail))return ''; + if (!isValidEmail($mail)) { + return ''; + } $tab = explode('@', $mail); $tab2 = explode('.', $tab[1]); $string_replace = ''; @@ -633,8 +880,7 @@ function dolObfuscateEmail($mail, $replace = "*", $nbreplace = 8, $nbdisplaymail $mail_tld = ''; $nbofelem = count($tab2); - for ($i = 1; $i < $nbofelem && $displaytld; $i++) - { + for ($i = 1; $i < $nbofelem && $displaytld; $i++) { $mail_tld .= '.'.$tab2[$i]; } @@ -686,7 +932,9 @@ function array2tr($data, $troptions = '', $tdoptions = '') function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = '', $tdoptions = '') { $text = ''; - if ($tableMarkup) $text = ''; + if ($tableMarkup) { + $text = '
    '; + } foreach ($data as $key => $item) { if (is_array($item)) { $text .= array2tr($item, $troptions, $tdoptions); @@ -697,7 +945,9 @@ function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = ' $text .= ''; } } - if ($tableMarkup) $text .= '
    '; + if ($tableMarkup) { + $text .= '
    '; + } return $text; } @@ -721,15 +971,23 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ { global $conf, $user; - if (!is_object($objsoc)) $valueforccc = $objsoc; - elseif ($table == "commande_fournisseur" || $table == "facture_fourn") $valueforccc = dol_string_unaccent($objsoc->code_fournisseur); - else $valueforccc = dol_string_unaccent($objsoc->code_client); + if (!is_object($objsoc)) { + $valueforccc = $objsoc; + } elseif ($table == "commande_fournisseur" || $table == "facture_fourn") { + $valueforccc = dol_string_unaccent($objsoc->code_fournisseur); + } else { + $valueforccc = dol_string_unaccent($objsoc->code_client); + } $sharetable = $table; - if ($table == 'facture' || $table == 'invoice') $sharetable = 'invoicenumber'; // for getEntity function + if ($table == 'facture' || $table == 'invoice') { + $sharetable = 'invoicenumber'; // for getEntity function + } // Clean parameters - if ($date == '') $date = dol_now(); // We use local year and month of PHP server to search numbers + if ($date == '') { + $date = dol_now(); // We use local year and month of PHP server to search numbers + } // but we should use local year and month of user // For debugging @@ -742,8 +1000,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $hasglobalcounter = false; $reg = array(); // Extract value for mask counter, mask raz and mask offset - if (preg_match('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i', $mask, $reg)) - { + if (preg_match('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i', $mask, $reg)) { $masktri = $reg[1].(!empty($reg[2]) ? $reg[2] : '').(!empty($reg[3]) ? $reg[3] : ''); $maskcounter = $reg[1]; $hasglobalcounter = true; @@ -756,12 +1013,13 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskraz = -1; $maskoffset = 0; $resetEveryMonth = false; - if (dol_strlen($maskcounter) < 3 && empty($conf->global->MAIN_COUNTER_WITH_LESS_3_DIGITS)) return 'ErrorCounterMustHaveMoreThan3Digits'; + if (dol_strlen($maskcounter) < 3 && empty($conf->global->MAIN_COUNTER_WITH_LESS_3_DIGITS)) { + return 'ErrorCounterMustHaveMoreThan3Digits'; + } // Extract value for third party mask counter $regClientRef = array(); - if (preg_match('/\{(c+)(0*)\}/i', $mask, $regClientRef)) - { + if (preg_match('/\{(c+)(0*)\}/i', $mask, $regClientRef)) { $maskrefclient = $regClientRef[1].$regClientRef[2]; $maskrefclient_maskclientcode = $regClientRef[1]; $maskrefclient_maskcounter = $regClientRef[2]; @@ -769,19 +1027,21 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskrefclient_clientcode = substr($valueforccc, 0, dol_strlen($maskrefclient_maskclientcode)); //get n first characters of client code where n is length in mask $maskrefclient_clientcode = str_pad($maskrefclient_clientcode, dol_strlen($maskrefclient_maskclientcode), "#", STR_PAD_RIGHT); //padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode $maskrefclient_clientcode = dol_string_nospecial($maskrefclient_clientcode); //sanitize maskrefclient_clientcode for sql insert and sql select like - if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits'; - } else $maskrefclient = ''; + if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) { + return 'ErrorCounterMustHaveMoreThan3Digits'; + } + } else { + $maskrefclient = ''; + } // fail if there is neither a global nor a third party counter - if (!$hasglobalcounter && ($maskrefclient_maskcounter == '')) - { + if (!$hasglobalcounter && ($maskrefclient_maskcounter == '')) { return 'ErrorBadMask'; } // Extract value for third party type $regType = array(); - if (preg_match('/\{(t+)\}/i', $mask, $regType)) - { + if (preg_match('/\{(t+)\}/i', $mask, $regType)) { $masktype = $regType[1]; $masktype_value = substr(preg_replace('/^TE_/', '', $objsoc->typent_code), 0, dol_strlen($regType[1])); // get n first characters of thirdpaty typent_code (where n is length in mask) $masktype_value = str_pad($masktype_value, dol_strlen($regType[1]), "#", STR_PAD_RIGHT); // we fill on right with # to have same number of char than into mask @@ -791,10 +1051,12 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ } // Extract value for user - $regType = array(); + $regType = array(); if (preg_match('/\{(u+)\}/i', $mask, $regType)) { $lastname = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; - if (is_object($objuser)) $lastname = $objuser->lastname; + if (is_object($objuser)) { + $lastname = $objuser->lastname; + } $maskuser = $regType[1]; $maskuser_value = substr($lastname, 0, dol_strlen($regType[1])); // get n first characters of user firstname (where n is length in mask) @@ -809,15 +1071,13 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskpersonew = array(); $tmpmask = $mask; $regKey = array(); - while (preg_match('/\{([A-Z]+)\-([1-9])\}/', $tmpmask, $regKey)) - { + while (preg_match('/\{([A-Z]+)\-([1-9])\}/', $tmpmask, $regKey)) { $maskperso[$regKey[1]] = '{'.$regKey[1].'-'.$regKey[2].'}'; $maskpersonew[$regKey[1]] = str_pad('', $regKey[2], '_', STR_PAD_RIGHT); $tmpmask = preg_replace('/\{'.$regKey[1].'\-'.$regKey[2].'\}/i', $maskpersonew[$regKey[1]], $tmpmask); } - if (strstr($mask, 'user_extra_')) - { + if (strstr($mask, 'user_extra_')) { $start = "{user_extra_"; $end = "\}"; $extra = get_string_between($mask, "user_extra_", "}"); @@ -831,8 +1091,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskwithonlyymcode = preg_replace('/\{(c+)(0*)\}/i', $maskrefclient, $maskwithonlyymcode); $maskwithonlyymcode = preg_replace('/\{(t+)\}/i', $masktype_value, $maskwithonlyymcode); $maskwithonlyymcode = preg_replace('/\{(u+)\}/i', $maskuser_value, $maskwithonlyymcode); - foreach ($maskperso as $key => $val) - { + foreach ($maskperso as $key => $val) { $maskwithonlyymcode = preg_replace('/'.preg_quote($val, '/').'/i', $maskpersonew[$key], $maskwithonlyymcode); } $maskwithnocode = $maskwithonlyymcode; @@ -846,8 +1105,12 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ //var_dump($reg); // If an offset is asked - if (!empty($reg[2]) && preg_match('/^\+/', $reg[2])) $maskoffset = preg_replace('/^\+/', '', $reg[2]); - if (!empty($reg[3]) && preg_match('/^\+/', $reg[3])) $maskoffset = preg_replace('/^\+/', '', $reg[3]); + if (!empty($reg[2]) && preg_match('/^\+/', $reg[2])) { + $maskoffset = preg_replace('/^\+/', '', $reg[2]); + } + if (!empty($reg[3]) && preg_match('/^\+/', $reg[3])) { + $maskoffset = preg_replace('/^\+/', '', $reg[3]); + } // Define $sqlwhere $sqlwhere = ''; @@ -855,14 +1118,19 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $yearoffsettype = false; // false: no reset, 0,-,=,+: reset at offset SOCIETE_FISCAL_MONTH_START, x=reset at offset x // If a restore to zero after a month is asked we check if there is already a value for this year. - if (!empty($reg[2]) && preg_match('/^@/', $reg[2])) $yearoffsettype = preg_replace('/^@/', '', $reg[2]); - if (!empty($reg[3]) && preg_match('/^@/', $reg[3])) $yearoffsettype = preg_replace('/^@/', '', $reg[3]); + if (!empty($reg[2]) && preg_match('/^@/', $reg[2])) { + $yearoffsettype = preg_replace('/^@/', '', $reg[2]); + } + if (!empty($reg[3]) && preg_match('/^@/', $reg[3])) { + $yearoffsettype = preg_replace('/^@/', '', $reg[3]); + } //print "yearoffset=".$yearoffset." yearoffsettype=".$yearoffsettype; - if (is_numeric($yearoffsettype) && $yearoffsettype >= 1) + if (is_numeric($yearoffsettype) && $yearoffsettype >= 1) { $maskraz = $yearoffsettype; // For backward compatibility - elseif ($yearoffsettype === '0' || (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) + } elseif ($yearoffsettype === '0' || (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $conf->global->SOCIETE_FISCAL_MONTH_START > 1)) { $maskraz = $conf->global->SOCIETE_FISCAL_MONTH_START; + } //print "maskraz=".$maskraz; // -1=no reset if ($maskraz > 0) { // A reset is required @@ -870,27 +1138,49 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskraz = date('m', $date); $resetEveryMonth = true; } - if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth'; + if ($maskraz > 12) { + return 'ErrorBadMaskBadRazMonth'; + } // Define posy, posm and reg - if ($maskraz > 1) // if reset is not first month, we need month and year into mask - { - if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) { $posy = 2; $posm = 3; } elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i', $maskwithonlyymcode, $reg)) { $posy = 3; $posm = 2; } else return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask'; + if ($maskraz > 1) { // if reset is not first month, we need month and year into mask + if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) { + $posy = 2; + $posm = 3; + } elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i', $maskwithonlyymcode, $reg)) { + $posy = 3; + $posm = 2; + } else { + return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask'; + } - if (dol_strlen($reg[$posy]) < 2) return 'ErrorCantUseRazWithYearOnOneDigit'; + if (dol_strlen($reg[$posy]) < 2) { + return 'ErrorCantUseRazWithYearOnOneDigit'; + } } else // if reset is for a specific month in year, we need year { - if (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i', $maskwithonlyymcode, $reg)) { $posy = 3; $posm = 2; } elseif (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) { $posy = 2; $posm = 3; } elseif (preg_match('/^(.*)\{(y+)\}/i', $maskwithonlyymcode, $reg)) { $posy = 2; $posm = 0; } else return 'ErrorCantUseRazIfNoYearInMask'; + if (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i', $maskwithonlyymcode, $reg)) { + $posy = 3; + $posm = 2; + } elseif (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) { + $posy = 2; + $posm = 3; + } elseif (preg_match('/^(.*)\{(y+)\}/i', $maskwithonlyymcode, $reg)) { + $posy = 2; + $posm = 0; + } else { + return 'ErrorCantUseRazIfNoYearInMask'; + } } // Define length $yearlen = $posy ?dol_strlen($reg[$posy]) : 0; $monthlen = $posm ?dol_strlen($reg[$posm]) : 0; // Define pos - $yearpos = (dol_strlen($reg[1]) + 1); + $yearpos = (dol_strlen($reg[1]) + 1); $monthpos = ($yearpos + $yearlen); if ($posy == 3 && $posm == 2) { // if month is before year - $monthpos = (dol_strlen($reg[1]) + 1); - $yearpos = ($monthpos + $monthlen); + $monthpos = (dol_strlen($reg[1]) + 1); + $yearpos = ($monthpos + $monthlen); } //print "xxx ".$maskwithonlyymcode." maskraz=".$maskraz." posy=".$posy." yearlen=".$yearlen." yearpos=".$yearpos." posm=".$posm." monthlen=".$monthlen." monthpos=".$monthpos." yearoffsettype=".$yearoffsettype." resetEveryMonth=".$resetEveryMonth."\n"; @@ -898,8 +1188,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $monthcomp = $maskraz; $yearcomp = 0; - if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') // $yearoffsettype is - or + - { + if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') { // $yearoffsettype is - or + $currentyear = date("Y", $date); $fiscaldate = dol_mktime('0', '0', '0', $maskraz, '1', $currentyear); $newyeardate = dol_mktime('0', '0', '0', '1', '1', $currentyear); @@ -907,22 +1196,33 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ //echo 'currentyear='.$currentyear.' date='.dol_print_date($date, 'day').' fiscaldate='.dol_print_date($fiscaldate, 'day').'
    '; // If after or equal of current fiscal date - if ($date >= $fiscaldate) - { + if ($date >= $fiscaldate) { // If before of next new year date - if ($date < $nextnewyeardate && $yearoffsettype == '+') $yearoffset = 1; - } // If after or equal of current new year date - elseif ($date >= $newyeardate && $yearoffsettype == '-') $yearoffset = -1; - } // For backward compatibility - elseif (date("m", $date) < $maskraz && empty($resetEveryMonth)) { $yearoffset = -1; } // If current month lower that month of return to zero, year is previous year + if ($date < $nextnewyeardate && $yearoffsettype == '+') { + $yearoffset = 1; + } + } elseif ($date >= $newyeardate && $yearoffsettype == '-') { + // If after or equal of current new year date + $yearoffset = -1; + } + } elseif (date("m", $date) < $maskraz && empty($resetEveryMonth)) { + // For backward compatibility + $yearoffset = -1; + } // If current month lower that month of return to zero, year is previous year - if ($yearlen == 4) $yearcomp = sprintf("%04d", date("Y", $date) + $yearoffset); - elseif ($yearlen == 2) $yearcomp = sprintf("%02d", date("y", $date) + $yearoffset); - elseif ($yearlen == 1) $yearcomp = substr(date("y", $date), 2, 1) + $yearoffset; - if ($monthcomp > 1 && empty($resetEveryMonth)) // Test with month is useless if monthcomp = 0 or 1 (0 is same as 1) (regis: $monthcomp can't equal 0) - { - if ($yearlen == 4) $yearcomp1 = sprintf("%04d", date("Y", $date) + $yearoffset + 1); - elseif ($yearlen == 2) $yearcomp1 = sprintf("%02d", date("y", $date) + $yearoffset + 1); + if ($yearlen == 4) { + $yearcomp = sprintf("%04d", date("Y", $date) + $yearoffset); + } elseif ($yearlen == 2) { + $yearcomp = sprintf("%02d", date("y", $date) + $yearoffset); + } elseif ($yearlen == 1) { + $yearcomp = substr(date("y", $date), 2, 1) + $yearoffset; + } + if ($monthcomp > 1 && empty($resetEveryMonth)) { // Test with month is useless if monthcomp = 0 or 1 (0 is same as 1) (regis: $monthcomp can't equal 0) + if ($yearlen == 4) { + $yearcomp1 = sprintf("%04d", date("Y", $date) + $yearoffset + 1); + } elseif ($yearlen == 2) { + $yearcomp1 = sprintf("%02d", date("y", $date) + $yearoffset + 1); + } $sqlwhere .= "("; $sqlwhere .= " (SUBSTRING(".$field.", ".$yearpos.", ".$yearlen.") = '".$db->escape($yearcomp)."'"; @@ -947,7 +1247,9 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ } else { $posnumstart = strrpos($maskwithnocode, $maskcounter); } // Pos of counter in final string (from 0 to ...) - if ($posnumstart < 0) return 'ErrorBadMaskFailedToLocatePosOfSequence'; + if ($posnumstart < 0) { + return 'ErrorBadMaskFailedToLocatePosOfSequence'; + } $sqlstring = 'SUBSTRING('.$field.', '.($posnumstart + 1).', '.dol_strlen($maskcounter).')'; // Define $maskLike @@ -961,11 +1263,16 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskLike = preg_replace('/\{mm\}/i', '__', $maskLike); $maskLike = preg_replace('/\{dd\}/i', '__', $maskLike); $maskLike = str_replace(dol_string_nospecial('{'.$masktri.'}'), str_pad("", dol_strlen($maskcounter), "_"), $maskLike); - if ($maskrefclient) $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'), str_pad("", dol_strlen($maskrefclient), "_"), $maskLike); - if ($masktype) $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'), $masktype_value, $maskLike); - if ($maskuser) $maskLike = str_replace(dol_string_nospecial('{'.$maskuser.'}'), $maskuser_value, $maskLike); - foreach ($maskperso as $key => $val) - { + if ($maskrefclient) { + $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'), str_pad("", dol_strlen($maskrefclient), "_"), $maskLike); + } + if ($masktype) { + $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'), $masktype_value, $maskLike); + } + if ($maskuser) { + $maskLike = str_replace(dol_string_nospecial('{'.$maskuser.'}'), $maskuser_value, $maskLike); + } + foreach ($maskperso as $key => $val) { $maskLike = str_replace(dol_string_nospecial($maskperso[$key]), $maskpersonew[$key], $maskLike); } @@ -975,32 +1282,39 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $sql .= " FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE ".$field." LIKE '".$db->escape($maskLike)."'"; $sql .= " AND ".$field." NOT LIKE '(PROV%)'"; - if ($bentityon) // only if entity enable + if ($bentityon) { // only if entity enable $sql .= " AND entity IN (".getEntity($sharetable).")"; - elseif (!empty($forceentity)) - $sql .= " AND entity IN (".$forceentity.")"; - if ($where) $sql .= $where; - if ($sqlwhere) $sql .= ' AND '.$sqlwhere; + } elseif (!empty($forceentity)) { + $sql .= " AND entity IN (".$db->sanitize($forceentity).")"; + } + if ($where) { + $sql .= $where; + } + if ($sqlwhere) { + $sql .= ' AND '.$sqlwhere; + } //print $sql.'
    '; dol_syslog("functions2::get_next_value mode=".$mode."", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $counter = $obj->val; - } else dol_print_error($db); + } else { + dol_print_error($db); + } // Check if we must force counter to maskoffset - if (empty($counter)) $counter = $maskoffset; - elseif (preg_match('/[^0-9]/i', $counter)) - { + if (empty($counter)) { + $counter = $maskoffset; + } elseif (preg_match('/[^0-9]/i', $counter)) { $counter = 0; dol_syslog("Error, the last counter found is '".$counter."' so is not a numeric value. We will restart to 1.", LOG_ERR); - } elseif ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) $counter = $maskoffset; + } elseif ($counter < $maskoffset && empty($conf->global->MAIN_NUMBERING_OFFSET_ONLY_FOR_FIRST)) { + $counter = $maskoffset; + } - if ($mode == 'last') // We found value for counter = last counter value. Now need to get corresponding ref of invoice. - { + if ($mode == 'last') { // We found value for counter = last counter value. Now need to get corresponding ref of invoice. $counterpadded = str_pad($counter, dol_strlen($maskcounter), "0", STR_PAD_LEFT); // Define $maskLike @@ -1013,47 +1327,61 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskLike = preg_replace('/\{mm\}/i', '__', $maskLike); $maskLike = preg_replace('/\{dd\}/i', '__', $maskLike); $maskLike = str_replace(dol_string_nospecial('{'.$masktri.'}'), $counterpadded, $maskLike); - if ($maskrefclient) $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'), str_pad("", dol_strlen($maskrefclient), "_"), $maskLike); - if ($masktype) $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'), $masktype_value, $maskLike); - if ($maskuser) $maskLike = str_replace(dol_string_nospecial('{'.$maskuser.'}'), $maskuser_value, $maskLike); + if ($maskrefclient) { + $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'), str_pad("", dol_strlen($maskrefclient), "_"), $maskLike); + } + if ($masktype) { + $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'), $masktype_value, $maskLike); + } + if ($maskuser) { + $maskLike = str_replace(dol_string_nospecial('{'.$maskuser.'}'), $maskuser_value, $maskLike); + } $ref = ''; $sql = "SELECT ".$field." as ref"; $sql .= " FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE ".$field." LIKE '".$db->escape($maskLike)."'"; $sql .= " AND ".$field." NOT LIKE '%PROV%'"; - if ($bentityon) // only if entity enable + if ($bentityon) { // only if entity enable $sql .= " AND entity IN (".getEntity($sharetable).")"; - elseif (!empty($forceentity)) - $sql .= " AND entity IN (".$forceentity.")"; - if ($where) $sql .= $where; - if ($sqlwhere) $sql .= ' AND '.$sqlwhere; + } elseif (!empty($forceentity)) { + $sql .= " AND entity IN (".$db->sanitize($forceentity).")"; + } + if ($where) { + $sql .= $where; + } + if ($sqlwhere) { + $sql .= ' AND '.$sqlwhere; + } dol_syslog("functions2::get_next_value mode=".$mode."", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $ref = $obj->ref; - } else dol_print_error($db); + if ($obj) { + $ref = $obj->ref; + } + } else { + dol_print_error($db); + } $numFinal = $ref; } elseif ($mode == 'next') { $counter++; // If value for $counter has a length higher than $maskcounter chars - if ($counter >= pow(10, dol_strlen($maskcounter))) - { + if ($counter >= pow(10, dol_strlen($maskcounter))) { $counter = 'ErrorMaxNumberReachForThisMask'; } - if (!empty($maskrefclient_maskcounter)) - { + if (!empty($maskrefclient_maskcounter)) { //print "maskrefclient_maskcounter=".$maskrefclient_maskcounter." maskwithnocode=".$maskwithnocode." maskrefclient=".$maskrefclient."\n
    "; // Define $sqlstring $maskrefclient_posnumstart = strpos($maskwithnocode, $maskrefclient_maskcounter, strpos($maskwithnocode, $maskrefclient)); // Pos of counter in final string (from 0 to ...) - if ($maskrefclient_posnumstart <= 0) return 'ErrorBadMask'; + if ($maskrefclient_posnumstart <= 0) { + return 'ErrorBadMask'; + } $maskrefclient_sqlstring = 'SUBSTRING('.$field.', '.($maskrefclient_posnumstart + 1).', '.dol_strlen($maskrefclient_maskcounter).')'; //print "x".$sqlstring; @@ -1075,23 +1403,31 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $maskrefclient_sql .= " FROM ".MAIN_DB_PREFIX.$table; //$sql.= " WHERE ".$field." not like '(%'"; $maskrefclient_sql .= " WHERE ".$field." LIKE '".$db->escape($maskrefclient_maskLike)."'"; - if ($bentityon) // only if entity enable + if ($bentityon) { // only if entity enable $maskrefclient_sql .= " AND entity IN (".getEntity($sharetable).")"; - elseif (!empty($forceentity)) - $sql .= " AND entity IN (".$forceentity.")"; - if ($where) $maskrefclient_sql .= $where; //use the same optional where as general mask - if ($sqlwhere) $maskrefclient_sql .= ' AND '.$sqlwhere; //use the same sqlwhere as general mask + } elseif (!empty($forceentity)) { + $sql .= " AND entity IN (".$db->sanitize($forceentity).")"; + } + if ($where) { + $maskrefclient_sql .= $where; //use the same optional where as general mask + } + if ($sqlwhere) { + $maskrefclient_sql .= ' AND '.$sqlwhere; //use the same sqlwhere as general mask + } $maskrefclient_sql .= ' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode, $maskrefclient) + 1).', '.dol_strlen($maskrefclient_maskclientcode).")='".$db->escape($maskrefclient_clientcode)."')"; dol_syslog("functions2::get_next_value maskrefclient", LOG_DEBUG); $maskrefclient_resql = $db->query($maskrefclient_sql); - if ($maskrefclient_resql) - { + if ($maskrefclient_resql) { $maskrefclient_obj = $db->fetch_object($maskrefclient_resql); $maskrefclient_counter = $maskrefclient_obj->val; - } else dol_print_error($db); + } else { + dol_print_error($db); + } - if (empty($maskrefclient_counter) || preg_match('/[^0-9]/i', $maskrefclient_counter)) $maskrefclient_counter = $maskrefclient_maskoffset; + if (empty($maskrefclient_counter) || preg_match('/[^0-9]/i', $maskrefclient_counter)) { + $maskrefclient_counter = $maskrefclient_maskoffset; + } $maskrefclient_counter++; } @@ -1099,8 +1435,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $numFinal = $mask; // We replace special codes except refclient - if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') // yearoffsettype is - or +, so we don't want current year - { + if (!empty($yearoffsettype) && !is_numeric($yearoffsettype) && $yearoffsettype != '=') { // yearoffsettype is - or +, so we don't want current year $numFinal = preg_replace('/\{yyyy\}/i', date("Y", $date) + $yearoffset, $numFinal); $numFinal = preg_replace('/\{yy\}/i', date("y", $date) + $yearoffset, $numFinal); $numFinal = preg_replace('/\{y\}/i', substr(date("y", $date), 1, 1) + $yearoffset, $numFinal); @@ -1120,8 +1455,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ $numFinal = str_replace($maskbefore, $maskafter, $numFinal); // Now we replace the refclient - if ($maskrefclient) - { + if ($maskrefclient) { //print "maskrefclient=".$maskrefclient." maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode." maskrefclient_clientcode=".$maskrefclient_clientcode."\n
    ";exit; $maskrefclient_maskbefore = '{'.$maskrefclient.'}'; $maskrefclient_maskafter = $maskrefclient_clientcode.str_pad($maskrefclient_counter, dol_strlen($maskrefclient_maskcounter), "0", STR_PAD_LEFT); @@ -1129,16 +1463,14 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ } // Now we replace the type - if ($masktype) - { + if ($masktype) { $masktype_maskbefore = '{'.$masktype.'}'; $masktype_maskafter = $masktype_value; $numFinal = str_replace($masktype_maskbefore, $masktype_maskafter, $numFinal); } // Now we replace the user - if ($maskuser) - { + if ($maskuser) { $maskuser_maskbefore = '{'.$maskuser.'}'; $maskuser_maskafter = $maskuser_value; $numFinal = str_replace($maskuser_maskbefore, $maskuser_maskafter, $numFinal); @@ -1161,7 +1493,9 @@ function get_string_between($string, $start, $end) { $string = " ".$string; $ini = strpos($string, $start); - if ($ini == 0) return ""; + if ($ini == 0) { + return ""; + } $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len); @@ -1192,12 +1526,13 @@ function check_value($mask, $value) } $maskraz = -1; $maskoffset = 0; - if (dol_strlen($maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits'; + if (dol_strlen($maskcounter) < 3) { + return 'ErrorCounterMustHaveMoreThan3Digits'; + } // Extract value for third party mask counter $regClientRef = array(); - if (preg_match('/\{(c+)(0*)\}/i', $mask, $regClientRef)) - { + if (preg_match('/\{(c+)(0*)\}/i', $mask, $regClientRef)) { $maskrefclient = $regClientRef[1].$regClientRef[2]; $maskrefclient_maskclientcode = $regClientRef[1]; $maskrefclient_maskcounter = $regClientRef[2]; @@ -1205,12 +1540,15 @@ function check_value($mask, $value) $maskrefclient_clientcode = substr('', 0, dol_strlen($maskrefclient_maskclientcode)); //get n first characters of client code to form maskrefclient_clientcode $maskrefclient_clientcode = str_pad($maskrefclient_clientcode, dol_strlen($maskrefclient_maskclientcode), "#", STR_PAD_RIGHT); //padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode $maskrefclient_clientcode = dol_string_nospecial($maskrefclient_clientcode); //sanitize maskrefclient_clientcode for sql insert and sql select like - if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'ErrorCounterMustHaveMoreThan3Digits'; - } else $maskrefclient = ''; + if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) { + return 'ErrorCounterMustHaveMoreThan3Digits'; + } + } else { + $maskrefclient = ''; + } // fail if there is neither a global nor a third party counter - if (!$hasglobalcounter && ($maskrefclient_maskcounter == '')) - { + if (!$hasglobalcounter && ($maskrefclient_maskcounter == '')) { return 'ErrorBadMask'; } @@ -1228,46 +1566,62 @@ function check_value($mask, $value) //print "maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode."\n
    "; // If an offset is asked - if (!empty($reg[2]) && preg_match('/^\+/', $reg[2])) $maskoffset = preg_replace('/^\+/', '', $reg[2]); - if (!empty($reg[3]) && preg_match('/^\+/', $reg[3])) $maskoffset = preg_replace('/^\+/', '', $reg[3]); + if (!empty($reg[2]) && preg_match('/^\+/', $reg[2])) { + $maskoffset = preg_replace('/^\+/', '', $reg[2]); + } + if (!empty($reg[3]) && preg_match('/^\+/', $reg[3])) { + $maskoffset = preg_replace('/^\+/', '', $reg[3]); + } // Define $sqlwhere // If a restore to zero after a month is asked we check if there is already a value for this year. - if (!empty($reg[2]) && preg_match('/^@/', $reg[2])) $maskraz = preg_replace('/^@/', '', $reg[2]); - if (!empty($reg[3]) && preg_match('/^@/', $reg[3])) $maskraz = preg_replace('/^@/', '', $reg[3]); - if ($maskraz >= 0) - { + if (!empty($reg[2]) && preg_match('/^@/', $reg[2])) { + $maskraz = preg_replace('/^@/', '', $reg[2]); + } + if (!empty($reg[3]) && preg_match('/^@/', $reg[3])) { + $maskraz = preg_replace('/^@/', '', $reg[3]); + } + if ($maskraz >= 0) { if ($maskraz == 99) { $maskraz = date('m'); $resetEveryMonth = true; } - if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth'; + if ($maskraz > 12) { + return 'ErrorBadMaskBadRazMonth'; + } // Define reg - if ($maskraz > 1 && !preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask'; - if ($maskraz <= 1 && !preg_match('/^(.*)\{(y+)\}/i', $maskwithonlyymcode, $reg)) return 'ErrorCantUseRazIfNoYearInMask'; + if ($maskraz > 1 && !preg_match('/^(.*)\{(y+)\}\{(m+)\}/i', $maskwithonlyymcode, $reg)) { + return 'ErrorCantUseRazInStartedYearIfNoYearMonthInMask'; + } + if ($maskraz <= 1 && !preg_match('/^(.*)\{(y+)\}/i', $maskwithonlyymcode, $reg)) { + return 'ErrorCantUseRazIfNoYearInMask'; + } //print "x".$maskwithonlyymcode." ".$maskraz; } //print "masktri=".$masktri." maskcounter=".$maskcounter." maskwithonlyymcode=".$maskwithonlyymcode." maskwithnocode=".$maskwithnocode." maskraz=".$maskraz." maskoffset=".$maskoffset."
    \n"; if (function_exists('mb_strrpos')) { $posnumstart = mb_strrpos($maskwithnocode, $maskcounter, 0, 'UTF-8'); - } - else { + } else { $posnumstart = strrpos($maskwithnocode, $maskcounter); } // Pos of counter in final string (from 0 to ...) - if ($posnumstart < 0) return 'ErrorBadMaskFailedToLocatePosOfSequence'; + if ($posnumstart < 0) { + return 'ErrorBadMaskFailedToLocatePosOfSequence'; + } // Check we have a number in $value at position ($posnumstart+1).', '.dol_strlen($maskcounter) // TODO - // Check length - $len = dol_strlen($maskwithnocode); - if (dol_strlen($value) != $len) $result = -1; + // Check length + $len = dol_strlen($maskwithnocode); + if (dol_strlen($value) != $len) { + $result = -1; + } - dol_syslog("functions2::check_value result=".$result, LOG_DEBUG); - return $result; + dol_syslog("functions2::check_value result=".$result, LOG_DEBUG); + return $result; } /** @@ -1281,10 +1635,18 @@ function check_value($mask, $value) function binhex($bin, $pad = false, $upper = false) { $last = dol_strlen($bin) - 1; - for ($i = 0; $i <= $last; $i++) { $x += $bin[$last - $i] * pow(2, $i); } + for ($i = 0; $i <= $last; $i++) { + $x += $bin[$last - $i] * pow(2, $i); + } $x = dechex($x); - if ($pad) { while (dol_strlen($x) < intval(dol_strlen($bin)) / 4) { $x = "0$x"; } } - if ($upper) { $x = strtoupper($x); } + if ($pad) { + while (dol_strlen($x) < intval(dol_strlen($bin)) / 4) { + $x = "0$x"; + } + } + if ($upper) { + $x = strtoupper($x); + } return $x; } @@ -1298,8 +1660,7 @@ function hexbin($hexa) { $bin = ''; $strLength = dol_strlen($hexa); - for ($i = 0; $i < $strLength; $i++) - { + for ($i = 0; $i < $strLength; $i++) { $bin .= str_pad(decbin(hexdec($hexa[$i])), 4, '0', STR_PAD_LEFT); } return $bin; @@ -1315,8 +1676,7 @@ function numero_semaine($time) { $stime = strftime('%Y-%m-%d', $time); - if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/i', $stime, $reg)) - { + if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/i', $stime, $reg)) { // Date est au format 'YYYY-MM-DD' ou 'YYYY-MM-DD HH:MM:SS' $annee = $reg[1]; $mois = $reg[2]; @@ -1324,31 +1684,29 @@ function numero_semaine($time) } /* - * Norme ISO-8601: - * - La semaine 1 de toute annee est celle qui contient le 4 janvier ou que la semaine 1 de toute annee est celle qui contient le 1er jeudi de janvier. - * - La majorite des annees ont 52 semaines mais les annees qui commence un jeudi et les annees bissextiles commencant un mercredi en possede 53. - * - Le 1er jour de la semaine est le Lundi - */ + * Norme ISO-8601: + * - La semaine 1 de toute annee est celle qui contient le 4 janvier ou que la semaine 1 de toute annee est celle qui contient le 1er jeudi de janvier. + * - La majorite des annees ont 52 semaines mais les annees qui commence un jeudi et les annees bissextiles commencant un mercredi en possede 53. + * - Le 1er jour de la semaine est le Lundi + */ // Definition du Jeudi de la semaine - if (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) == 0) // Dimanche - $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) - 3 * 24 * 60 * 60; - elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) < 4) // du Lundi au Mercredi - $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) + (4 - date("w", mktime(12, 0, 0, $mois, $jour, $annee))) * 24 * 60 * 60; - elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) > 4) // du Vendredi au Samedi - $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) - (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) - 4) * 24 * 60 * 60; - else // Jeudi - $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee); + if (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) == 0) { // Dimanche + $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) - 3 * 24 * 60 * 60; + } elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) < 4) { // du Lundi au Mercredi + $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) + (4 - date("w", mktime(12, 0, 0, $mois, $jour, $annee))) * 24 * 60 * 60; + } elseif (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) > 4) { // du Vendredi au Samedi + $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee) - (date("w", mktime(12, 0, 0, $mois, $jour, $annee)) - 4) * 24 * 60 * 60; + } else { // Jeudi + $jeudiSemaine = mktime(12, 0, 0, $mois, $jour, $annee); + } // Definition du premier Jeudi de l'annee - if (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 0) // Dimanche - { + if (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 0) { // Dimanche $premierJeudiAnnee = mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine)) + 4 * 24 * 60 * 60; - } elseif (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) < 4) // du Lundi au Mercredi - { + } elseif (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) < 4) { // du Lundi au Mercredi $premierJeudiAnnee = mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine)) + (4 - date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine)))) * 24 * 60 * 60; - } elseif (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) > 4) // du Vendredi au Samedi - { + } elseif (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) > 4) { // du Vendredi au Samedi $premierJeudiAnnee = mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine)) + (7 - (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) - 4)) * 24 * 60 * 60; } else // Jeudi { @@ -1365,11 +1723,9 @@ function numero_semaine($time) ) + 1; // Cas particulier de la semaine 53 - if ($numeroSemaine == 53) - { + if ($numeroSemaine == 53) { // Les annees qui commence un Jeudi et les annees bissextiles commencant un Mercredi en possede 53 - if (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 4 || (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 3 && date("z", mktime(12, 0, 0, 12, 31, date("Y", $jeudiSemaine))) == 365)) - { + if (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 4 || (date("w", mktime(12, 0, 0, 1, 1, date("Y", $jeudiSemaine))) == 3 && date("z", mktime(12, 0, 0, 12, 31, date("Y", $jeudiSemaine))) == 365)) { $numeroSemaine = 53; } else { $numeroSemaine = 1; @@ -1392,20 +1748,17 @@ function numero_semaine($time) function weight_convert($weight, &$from_unit, $to_unit) { /* Pour convertire 320 gr en Kg appeler - * $f = -3 - * weigh_convert(320, $f, 0) retournera 0.32 - * - */ - while ($from_unit <> $to_unit) - { - if ($from_unit > $to_unit) - { + * $f = -3 + * weigh_convert(320, $f, 0) retournera 0.32 + * + */ + while ($from_unit <> $to_unit) { + if ($from_unit > $to_unit) { $weight = $weight * 10; $from_unit = $from_unit - 1; $weight = weight_convert($weight, $from_unit, $to_unit); } - if ($from_unit < $to_unit) - { + if ($from_unit < $to_unit) { $weight = $weight / 10; $from_unit = $from_unit + 1; $weight = weight_convert($weight, $from_unit, $to_unit); @@ -1429,7 +1782,9 @@ function weight_convert($weight, &$from_unit, $to_unit) function dol_set_user_param($db, $conf, &$user, $tab) { // Verification parametres - if (count($tab) < 1) return -1; + if (count($tab) < 1) { + return -1; + } $db->begin(); @@ -1439,9 +1794,10 @@ function dol_set_user_param($db, $conf, &$user, $tab) $sql .= " AND entity = ".$conf->entity; $sql .= " AND param in ("; $i = 0; - foreach ($tab as $key => $value) - { - if ($i > 0) $sql .= ','; + foreach ($tab as $key => $value) { + if ($i > 0) { + $sql .= ','; + } $sql .= "'".$db->escape($key)."'"; $i++; } @@ -1449,26 +1805,22 @@ function dol_set_user_param($db, $conf, &$user, $tab) dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); $db->rollback(); return -1; } - foreach ($tab as $key => $value) - { + foreach ($tab as $key => $value) { // Set new parameters - if ($value) - { + if ($value) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_param(fk_user,entity,param,value)"; $sql .= " VALUES (".$user->id.",".$conf->entity.","; $sql .= " '".$db->escape($key)."','".$db->escape($value)."')"; dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG); $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); $db->rollback(); return -1; @@ -1494,8 +1846,7 @@ function dol_set_user_param($db, $conf, &$user, $tab) function dol_print_reduction($reduction, $langs) { $string = ''; - if ($reduction == 100) - { + if ($reduction == 100) { $string = $langs->transnoentities("Offered"); } else { $string = vatrate($reduction, true); @@ -1513,8 +1864,11 @@ function dol_print_reduction($reduction, $langs) */ function version_os($option = '') { - if ($option == 'smr') $osversion = php_uname('s').' '.php_uname('m').' '.php_uname('r'); - else $osversion = php_uname(); + if ($option == 'smr') { + $osversion = php_uname('s').' '.php_uname('m').' '.php_uname('r'); + } else { + $osversion = php_uname(); + } return $osversion; } @@ -1573,20 +1927,17 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) dol_syslog('/core/lib/function2.lib.php::getListOfModels', LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $found = 1; $obj = $db->fetch_object($resql); // If this generation module needs to scan a directory, then description field is filled // with the constant that contains list of directories to scan (COMPANY_ADDON_PDF_ODT_PATH, ...). - if (!empty($obj->description)) // A list of directories to scan is defined - { + if (!empty($obj->description)) { // A list of directories to scan is defined include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $const = $obj->description; @@ -1597,23 +1948,24 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) // Now we add models found in directories scanned $listofdir = explode(',', $dirtoscan); - foreach ($listofdir as $key=>$tmpdir) - { + 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)) - { + if (!$tmpdir) { + unset($listofdir[$key]); + continue; + } + if (is_dir($tmpdir)) { // all type of template is allowed $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '', '', 'name', SORT_ASC, 0); - if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } - if (count($listoffiles)) - { - foreach ($listoffiles as $record) - { + if (count($listoffiles)) { + foreach ($listoffiles as $record) { $max = ($maxfilenamelength ? $maxfilenamelength : 28); $liste[$obj->id.':'.$record['fullname']] = dol_trunc($record['name'], $max, 'middle'); } @@ -1621,12 +1973,10 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) $liste[0] = $obj->label.': '.$langs->trans("None"); } } else { - if ($type == 'member' && $obj->doc_template_name == 'standard') // Special case, if member template, we add variant per format - { + if ($type == 'member' && $obj->doc_template_name == 'standard') { // Special case, if member template, we add variant per format global $_Avery_Labels; include_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; - foreach ($_Avery_Labels as $key => $val) - { + foreach ($_Avery_Labels as $key => $val) { $liste[$obj->id.':'.$key] = ($obj->label ? $obj->label : $obj->doc_template_name).' '.$val['name']; } } else { @@ -1641,8 +1991,11 @@ function getListOfModels($db, $type, $maxfilenamelength = 0) return -1; } - if ($found) return $liste; - else return 0; + if ($found) { + return $liste; + } else { + return 0; + } } /** @@ -1657,10 +2010,14 @@ function is_ip($ip) // First we test if it is a valid IPv4 if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { // Then we test if it is a private range - if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) return 2; + if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) { + return 2; + } // Then we test if it is a reserved range - if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)) return 0; + if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)) { + return 0; + } return 1; } @@ -1715,8 +2072,7 @@ function getSoapParams() $timeout = (empty($conf->global->MAIN_USE_CONNECT_TIMEOUT) ? 10 : $conf->global->MAIN_USE_CONNECT_TIMEOUT); // Connection timeout $response_timeout = (empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT) ? 30 : $conf->global->MAIN_USE_RESPONSE_TIMEOUT); // Response timeout //print extension_loaded('soap'); - if ($proxyuse) - { + if ($proxyuse) { $params = array('connection_timeout'=>$timeout, 'response_timeout'=>$response_timeout, 'proxy_use' => 1, @@ -1761,12 +2117,10 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') if (preg_match('/^([^@]+)@([^@]+)$/i', $objecttype, $regs)) { $myobject = $regs[1]; $module = $regs[2]; - } - else { + } else { // Parse $objecttype (ex: project_task) $module = $myobject = $objecttype; - if (preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs)) { $module = $regs[1]; $myobject = $regs[2]; } @@ -1828,10 +2182,15 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $classpath = 'mrp/class'; $module = 'mrp'; $myobject = 'mo'; + } elseif ($objecttype == 'productlot') { + $classpath = 'product/stock/class'; + $module = 'stock'; + $myobject = 'productlot'; } // Generic case for $classfile and $classname - $classfile = strtolower($myobject); $classname = ucfirst($myobject); + $classfile = strtolower($myobject); + $classname = ucfirst($myobject); //print "objecttype=".$objecttype." module=".$module." subelement=".$subelement." classfile=".$classfile." classname=".$classname." classpath=".$classpath; if ($objecttype == 'invoice_supplier') { @@ -1844,26 +2203,21 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $classname = 'CommandeFournisseur'; $classpath = 'fourn/class'; $module = 'fournisseur'; - } - elseif ($objecttype == 'supplier_proposal') { + } elseif ($objecttype == 'supplier_proposal') { $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; $classpath = 'supplier_proposal/class'; $module = 'supplier_proposal'; - } - elseif ($objecttype == 'stock') { + } elseif ($objecttype == 'stock') { $classpath = 'product/stock/class'; $classfile = 'entrepot'; $classname = 'Entrepot'; } - if (!empty($conf->$module->enabled)) - { + if (!empty($conf->$module->enabled)) { $res = dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); - if ($res) - { - if (class_exists($classname)) - { + if ($res) { + if (class_exists($classname)) { $object = new $classname($db); $res = $object->fetch($objectid); if ($res > 0) { @@ -1872,7 +2226,9 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $ret = $langs->trans('Deleted'); } unset($object); - } else dol_syslog("Class with classname ".$classname." is unknown even after the include", LOG_ERR); + } else { + dol_syslog("Class with classname ".$classname." is unknown even after the include", LOG_ERR); + } } } return $ret; @@ -1896,33 +2252,30 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) // Get list of all id in array listofid and all parents in array listofparentid $sql = 'SELECT rowid, '.$fieldfkparent.' as parent_id FROM '.MAIN_DB_PREFIX.$tabletocleantree; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $listofid[] = $obj->rowid; - if ($obj->parent_id > 0) $listofparentid[$obj->rowid] = $obj->parent_id; + if ($obj->parent_id > 0) { + $listofparentid[$obj->rowid] = $obj->parent_id; + } $i++; } } else { dol_print_error($db); } - if (count($listofid)) - { + if (count($listofid)) { print 'Code requested to clean tree (may be to solve data corruption), so we check/clean orphelins and loops.'."
    \n"; // Check loops on each other $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree." SET ".$fieldfkparent." = 0 WHERE ".$fieldfkparent." = rowid"; // So we update only records linked to themself $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $nb = $db->affected_rows($sql); - if ($nb > 0) - { + if ($nb > 0) { print '
    Some record that were parent of themself were cleaned.'; } @@ -1932,17 +2285,15 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) // Check other loops $listofidtoclean = array(); - foreach ($listofparentid as $id => $pid) - { + foreach ($listofparentid as $id => $pid) { // Check depth //print 'Analyse record id='.$id.' with parent '.$pid.'
    '; - $cursor = $id; $arrayidparsed = array(); // We start from child $id - while ($cursor > 0) - { + $cursor = $id; + $arrayidparsed = array(); // We start from child $id + while ($cursor > 0) { $arrayidparsed[$cursor] = 1; - if ($arrayidparsed[$listofparentid[$cursor]]) // We detect a loop. A record with a parent that was already into child - { + if ($arrayidparsed[$listofparentid[$cursor]]) { // We detect a loop. A record with a parent that was already into child print 'Found a loop between id '.$id.' - '.$cursor.'
    '; unset($arrayidparsed); $listofidtoclean[$cursor] = $id; @@ -1951,18 +2302,18 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) $cursor = $listofparentid[$cursor]; } - if (count($listofidtoclean)) break; + if (count($listofidtoclean)) { + break; + } } $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; $sql .= " SET ".$fieldfkparent." = 0"; - $sql .= " WHERE rowid IN (".join(',', $listofidtoclean).")"; // So we update only records detected wrong + $sql .= " WHERE rowid IN (".$db->sanitize(join(',', $listofidtoclean)).")"; // So we update only records detected wrong $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $nb = $db->affected_rows($sql); - if ($nb > 0) - { + if ($nb > 0) { // Removed orphelins records print '
    Some records were detected to have parent that is a child, we set them as root record for id: '; print join(',', $listofidtoclean); @@ -1975,13 +2326,11 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) // Check and clean orphelins $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; $sql .= " SET ".$fieldfkparent." = 0"; - $sql .= " WHERE ".$fieldfkparent." NOT IN (".join(',', $listofid).")"; // So we update only records linked to a non existing parent + $sql .= " WHERE ".$fieldfkparent." NOT IN (".$db->sanitize(join(',', $listofid), 1).")"; // So we update only records linked to a non existing parent $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $nb = $db->affected_rows($sql); - if ($nb > 0) - { + if ($nb > 0) { // Removed orphelins records print '
    Some orphelins were found and modified to be parent so records are visible again for id: '; print join(',', $listofid); @@ -2008,8 +2357,12 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) */ function colorArrayToHex($arraycolor, $colorifnotfound = '888888') { - if (!is_array($arraycolor)) return $colorifnotfound; - if (empty($arraycolor)) return $colorifnotfound; + if (!is_array($arraycolor)) { + return $colorifnotfound; + } + if (empty($arraycolor)) { + return $colorifnotfound; + } return sprintf("%02s", dechex($arraycolor[0])).sprintf("%02s", dechex($arraycolor[1])).sprintf("%02s", dechex($arraycolor[2])); } @@ -2025,13 +2378,16 @@ function colorArrayToHex($arraycolor, $colorifnotfound = '888888') */ function colorStringToArray($stringcolor, $colorifnotfound = array(88, 88, 88)) { - if (is_array($stringcolor)) return $stringcolor; // If already into correct output format, we return as is + if (is_array($stringcolor)) { + return $stringcolor; // If already into correct output format, we return as is + } $reg = array(); $tmp = preg_match('/^#?([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])$/', $stringcolor, $reg); - if (!$tmp) - { + if (!$tmp) { $tmp = explode(',', $stringcolor); - if (count($tmp) < 3) return $colorifnotfound; + if (count($tmp) < 3) { + return $colorifnotfound; + } return $tmp; } return array(hexdec($reg[1]), hexdec($reg[2]), hexdec($reg[3])); @@ -2044,10 +2400,11 @@ function colorStringToArray($stringcolor, $colorifnotfound = array(88, 88, 88)) */ function colorValidateHex($color, $allow_white = true) { - if (!$allow_white && ($color === '#fff' || $color === '#ffffff')) return false; + if (!$allow_white && ($color === '#fff' || $color === '#ffffff')) { + return false; + } - if (preg_match('/^#[a-f0-9]{6}$/i', $color)) //hex color is valid - { + if (preg_match('/^#[a-f0-9]{6}$/i', $color)) { //hex color is valid return true; } return false; @@ -2064,7 +2421,9 @@ function colorValidateHex($color, $allow_white = true) */ function colorAgressiveness($hex, $ratio = -50, $brightness = 0) { - if (empty($ratio)) $ratio = 0; // To avoid null + if (empty($ratio)) { + $ratio = 0; // To avoid null + } // Steps should be between -255 and 255. Negative = darker, positive = lighter $ratio = max(-100, min(100, $ratio)); @@ -2081,17 +2440,23 @@ function colorAgressiveness($hex, $ratio = -50, $brightness = 0) foreach ($color_parts as $color) { $color = hexdec($color); // Convert to decimal - if ($ratio > 0) // We increase aggressivity - { - if ($color > 127) $color += ((255 - $color) * ($ratio / 100)); - if ($color < 128) $color -= ($color * ($ratio / 100)); + if ($ratio > 0) { // We increase aggressivity + if ($color > 127) { + $color += ((255 - $color) * ($ratio / 100)); + } + if ($color < 128) { + $color -= ($color * ($ratio / 100)); + } } else // We decrease agressiveness { - if ($color > 128) $color -= (($color - 128) * (abs($ratio) / 100)); - if ($color < 127) $color += ((128 - $color) * (abs($ratio) / 100)); + if ($color > 128) { + $color -= (($color - 128) * (abs($ratio) / 100)); + } + if ($color < 127) { + $color += ((128 - $color) * (abs($ratio) / 100)); + } } - if ($brightness > 0) - { + if ($brightness > 0) { $color = ($color * (100 + abs($brightness)) / 100); } else { $color = ($color * (100 - abs($brightness)) / 100); @@ -2228,7 +2593,9 @@ function cartesianArray(array $input) function getModuleDirForApiClass($moduleobject) { $moduledirforclass = $moduleobject; - if ($moduledirforclass != 'api') $moduledirforclass = preg_replace('/api$/i', '', $moduledirforclass); + if ($moduledirforclass != 'api') { + $moduledirforclass = preg_replace('/api$/i', '', $moduledirforclass); + } if ($moduleobject == 'contracts') { $moduledirforclass = 'contrat'; @@ -2298,8 +2665,7 @@ function randomColor($min = 0, $max = 255) } -if (!function_exists('dolEscapeXML')) -{ +if (!function_exists('dolEscapeXML')) { /** * Encode string for xml usage * @@ -2324,26 +2690,42 @@ if (!function_exists('dolEscapeXML')) function autoOrManual($automaticmanual, $case = 1, $color = 0) { global $langs; - $result = 'unknown'; $classname = ''; - if ($automaticmanual == 1 || strtolower($automaticmanual) == 'automatic' || strtolower($automaticmanual) == 'true') // A mettre avant test sur no a cause du == 0 - { + $result = 'unknown'; + $classname = ''; + if ($automaticmanual == 1 || strtolower($automaticmanual) == 'automatic' || strtolower($automaticmanual) == 'true') { // A mettre avant test sur no a cause du == 0 $result = $langs->trans('automatic'); - if ($case == 1 || $case == 3) $result = $langs->trans("Automatic"); - if ($case == 2) $result = ''; - if ($case == 3) $result = ' '.$result; + if ($case == 1 || $case == 3) { + $result = $langs->trans("Automatic"); + } + if ($case == 2) { + $result = ''; + } + if ($case == 3) { + $result = ' '.$result; + } $classname = 'ok'; - } elseif ($automaticmanual == 0 || strtolower($automaticmanual) == 'manual' || strtolower($automaticmanual) == 'false') - { + } elseif ($automaticmanual == 0 || strtolower($automaticmanual) == 'manual' || strtolower($automaticmanual) == 'false') { $result = $langs->trans("manual"); - if ($case == 1 || $case == 3) $result = $langs->trans("Manual"); - if ($case == 2) $result = ''; - if ($case == 3) $result = ' '.$result; + if ($case == 1 || $case == 3) { + $result = $langs->trans("Manual"); + } + if ($case == 2) { + $result = ''; + } + if ($case == 3) { + $result = ' '.$result; + } - if ($color == 2) $classname = 'ok'; - else $classname = 'error'; + if ($color == 2) { + $classname = 'ok'; + } else { + $classname = 'error'; + } + } + if ($color) { + return ''.$result.''; } - if ($color) return ''.$result.''; return $result; } @@ -2378,7 +2760,9 @@ function price2fec($amount) global $conf; // Clean parameters - if (empty($amount)) $amount = 0; // To have a numeric value if amount not defined or = '' + if (empty($amount)) { + $amount = 0; // To have a numeric value if amount not defined or = '' + } $amount = (is_numeric($amount) ? $amount : 0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number) // Output decimal number by default @@ -2402,9 +2786,15 @@ function price2fec($amount) */ function phpSyntaxError($code) { - if (!defined("CR")) define("CR", "\r"); - if (!defined("LF")) define("LF", "\n"); - if (!defined("CRLF")) define("CRLF", "\r\n"); + if (!defined("CR")) { + define("CR", "\r"); + } + if (!defined("LF")) { + define("LF", "\n"); + } + if (!defined("CRLF")) { + define("CRLF", "\r\n"); + } $braces = 0; $inString = 0; @@ -2413,27 +2803,39 @@ function phpSyntaxError($code) switch ($token[0]) { case T_CURLY_OPEN: case T_DOLLAR_OPEN_CURLY_BRACES: - case T_START_HEREDOC: ++$inString; break; - case T_END_HEREDOC: --$inString; break; + case T_START_HEREDOC: + ++$inString; + break; + case T_END_HEREDOC: + --$inString; + break; } } elseif ($inString & 1) { switch ($token) { case '`': case '\'': - case '"': --$inString; break; + case '"': + --$inString; + break; } } else { switch ($token) { case '`': case '\'': - case '"': ++$inString; break; - case '{': ++$braces; break; + case '"': + ++$inString; + break; + case '{': + ++$braces; + break; case '}': if ($inString) { --$inString; } else { --$braces; - if ($braces < 0) break 2; + if ($braces < 0) { + break 2; + } } break; } @@ -2458,7 +2860,9 @@ function phpSyntaxError($code) $code = $code[2] <= $braces ? array($code[1], $code[2]) : array('unexpected $end'.substr($code[1], 14), $braces); - } else $code = array('syntax error', 0); + } else { + $code = array('syntax error', 0); + } } else { ob_end_clean(); $code = false; diff --git a/htdocs/core/lib/functions_ch.lib.php b/htdocs/core/lib/functions_ch.lib.php index 04e74837853..cb683ceec1f 100644 --- a/htdocs/core/lib/functions_ch.lib.php +++ b/htdocs/core/lib/functions_ch.lib.php @@ -158,8 +158,7 @@ function dol_ch_controle_bvrb($bvrb) // Make control $report = 0; - while (dol_strlen($bv) > 1) - { + while (dol_strlen($bv) > 1) { $match = substr($bv, 0, 1); $report = $tableau[$report][$match]; $bv = substr($bv, 1); diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php index 930c6d06a9e..6de1e69de1f 100644 --- a/htdocs/core/lib/functionsnumtoword.lib.php +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -142,10 +142,14 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false) $decimalpart = empty($TNum[1]) ? '' : preg_replace('/0+$/', '', $TNum[1]); if ($decimalpart) { - if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and'); + if (!empty($currency)) { + $concatWords .= ' '.$langs->transnoentities('and'); + } $concatWords .= ' '.dol_convertToWord($decimalpart, $langs, '', true); - if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes'); + if (!empty($currency)) { + $concatWords .= ' '.$langs->transnoentities('centimes'); + } } return $concatWords; } @@ -164,7 +168,9 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false) function dolNumberToWord($numero, $langs, $numorcurrency = 'number') { // If the number is negative convert to positive and return -1 if it is too long - if ($numero < 0) $numero *= -1; + if ($numero < 0) { + $numero *= -1; + } if ($numero >= 1000000000001) { return -1; } @@ -172,8 +178,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number') // Get 2 decimals to cents, another functions round or truncate $strnumber = number_format($numero, 10); $len = strlen($strnumber); - for ($i = 0; $i < $len; $i++) - { + for ($i = 0; $i < $len; $i++) { if ($strnumber[$i] == '.') { $parte_decimal = $strnumber[$i + 1].$strnumber[$i + 2]; break; @@ -182,8 +187,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number') /*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and in case exist why ask $lang like a parameter?*/ - if (((is_object($langs) && $langs->default == 'es_MX') || (!is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency') - { + if (((is_object($langs) && $langs->default == 'es_MX') || (!is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency') { if ($numero >= 1 && $numero < 2) { return ("UN PESO ".$parte_decimal." / 100 M.N."); } elseif ($numero >= 0 && $numero < 1) { @@ -213,9 +217,11 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number') $udMILLON = (int) ($numero / 1000000); $numero = $numero - $udMILLON * 1000000; $entexto .= hundreds2text($CdMILLON, $DdMILLON, $udMILLON); - if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON == 1) + if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON == 1) { $entexto .= " MILLÓN "; - else $entexto .= " MILLONES "; + } else { + $entexto .= " MILLONES "; + } } if ($number >= 1000) { $cdm = (int) ($numero / 100000); @@ -225,16 +231,18 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number') $udm = (int) ($numero / 1000); $numero = $numero - $udm * 1000; $entexto .= hundreds2text($cdm, $ddm, $udm); - if ($cdm || $ddm || $udm) + if ($cdm || $ddm || $udm) { $entexto .= " MIL "; + } } $c = (int) ($numero / 100); $numero = $numero - $c * 100; $d = (int) ($numero / 10); $u = (int) $numero - $d * 10; $entexto .= hundreds2text($c, $d, $u); - if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number > 1000000) + if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number > 1000000) { $entexto .= " DE"; + } $entexto .= " PESOS ".$parte_decimal." / 100 M.N."; } return $entexto; @@ -264,7 +272,9 @@ function hundreds2text($hundreds, $tens, $units) $entexto .= $centenas[$hundreds - 1]; } if ($tens > 2) { - if ($hundreds != 0) $entexto .= " "; + if ($hundreds != 0) { + $entexto .= " "; + } $entexto .= $decenas[$tens - 1]; if ($units != 0) { $entexto .= " Y "; @@ -272,16 +282,22 @@ function hundreds2text($hundreds, $tens, $units) } return $entexto; } elseif ($tens == 2) { - if ($hundreds != 0) $entexto .= " "; + if ($hundreds != 0) { + $entexto .= " "; + } $entexto .= " ".$veintis[$units]; return $entexto; } elseif ($tens == 1) { - if ($hundreds != 0) $entexto .= " "; + if ($hundreds != 0) { + $entexto .= " "; + } $entexto .= $diecis[$units]; return $entexto; } if ($units != 0) { - if ($hundreds != 0 || $tens != 0) $entexto .= " "; + if ($hundreds != 0 || $tens != 0) { + $entexto .= " "; + } $entexto .= $unidades[$units - 1]; } return $entexto; diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index 7e93623f3c1..9feddb6f7f5 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -51,9 +51,9 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $ch = curl_init(); /*print $API_Endpoint."-".$API_version."-".$PAYPAL_API_USER."-".$PAYPAL_API_PASSWORD."-".$PAYPAL_API_SIGNATURE."
    "; - print $USE_PROXY."-".$gv_ApiErrorURL."
    "; - print $nvpStr; - exit;*/ + print $USE_PROXY."-".$gv_ApiErrorURL."
    "; + print $nvpStr; + exit;*/ curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_USERAGENT, 'Dolibarr geturl function'); @@ -61,12 +61,16 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = // We force value to false so we will manage redirection ourself later. @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - if (is_array($addheaders) && count($addheaders)) curl_setopt($ch, CURLOPT_HTTPHEADER, $addheaders); + if (is_array($addheaders) && count($addheaders)) { + curl_setopt($ch, CURLOPT_HTTPHEADER, $addheaders); + } curl_setopt($ch, CURLINFO_HEADER_OUT, true); // To be able to retrieve request header and log it // By default use tls decied by PHP. // You can force, if supported a version like TLSv1 or TLSv1.2 - if (!empty($conf->global->MAIN_CURL_SSLVERSION)) curl_setopt($ch, CURLOPT_SSLVERSION, $conf->global->MAIN_CURL_SSLVERSION); + if (!empty($conf->global->MAIN_CURL_SSLVERSION)) { + curl_setopt($ch, CURLOPT_SSLVERSION, $conf->global->MAIN_CURL_SSLVERSION); + } //curl_setopt($ch, CURLOPT_SSLVERSION, 6); for tls 1.2 // Turning off the server and peer verification(TrustManager Concept). @@ -77,8 +81,12 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $protocols = 0; if (is_array($allowedschemes)) { foreach ($allowedschemes as $allowedscheme) { - if ($allowedscheme == 'http') $protocols |= CURLPROTO_HTTP; - if ($allowedscheme == 'https') $protocols |= CURLPROTO_HTTPS; + if ($allowedscheme == 'http') { + $protocols |= CURLPROTO_HTTP; + } + if ($allowedscheme == 'https') { + $protocols |= CURLPROTO_HTTPS; + } } curl_setopt($ch, CURLOPT_PROTOCOLS, $protocols); curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, $protocols); @@ -98,8 +106,9 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = } elseif ($postorget == 'PUT') { $array_param = null; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' - if (!is_array($param)) parse_str($param, $array_param); - else { + if (!is_array($param)) { + parse_str($param, $array_param); + } else { dol_syslog("parameter param must be a string", LOG_WARNING); $array_param = $param; } @@ -121,7 +130,9 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = dol_syslog("getURLContent set proxy to ".$PROXY_HOST.":".$PROXY_PORT." - ".$PROXY_USER.":".$PROXY_PASS); //curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); // Curl 7.10 curl_setopt($ch, CURLOPT_PROXY, $PROXY_HOST.":".$PROXY_PORT); - if ($PROXY_USER) curl_setopt($ch, CURLOPT_PROXYUSERPWD, $PROXY_USER.":".$PROXY_PASS); + if ($PROXY_USER) { + curl_setopt($ch, CURLOPT_PROXYUSERPWD, $PROXY_USER.":".$PROXY_PASS); + } } $newUrl = $url; @@ -130,7 +141,9 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $response = ''; do { - if ($maxRedirection < 1) break; + if ($maxRedirection < 1) { + break; + } curl_setopt($ch, CURLOPT_URL, $newUrl); @@ -139,36 +152,78 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $hosttocheck = $newUrlArray['host']; $hosttocheck = str_replace(array('[', ']'), '', $hosttocheck); // Remove brackets of IPv6 - if (in_array($hosttocheck, array('localhost', 'localhost.domain'))) { - $iptocheck = '127.0.0.1'; - } else { - // TODO Resolve $iptocheck to get an IP and set CURLOPT_CONNECT_TO to use this ip - $iptocheck = $hosttocheck; + // Deny some reserved host names + if (in_array($hosttocheck, array('metadata.google.internal'))) { + $info['http_code'] = 400; + $info['content'] = 'Error bad hostname '.$hosttocheck.' (Used by Google metadata). This value for hostname is not allowed.'; + break; } - if (!filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { // This is not an IP - $iptocheck = 0; // + // Clean host name $hosttocheck to convert it into an IP $iptocheck + if (in_array($hosttocheck, array('localhost', 'localhost.domain'))) { + $iptocheck = '127.0.0.1'; + } elseif (in_array($hosttocheck, array('ip6-localhost', 'ip6-loopback'))) { + $iptocheck = '::1'; + } else { + // Resolve $hosttocheck to get the IP $iptocheck and set CURLOPT_CONNECT_TO to use this ip so curl will not try another resolution that may give a different result + if (function_exists('gethostbyname')) { + $iptocheck = gethostbyname($hosttocheck); + } else { + $iptocheck = $hosttocheck; + } + // TODO Resolve ip v6 + } + + // Check $iptocheck is an IP (v4 or v6), if not clear value. + if (!filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { // This is not an IP, we clean data + $iptocheck = '0'; // } if ($iptocheck) { if ($localurl == 0) { // Only external url allowed (dangerous, may allow to get malware) if (!filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { + // Deny ips like 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 0.0.0.0/8, 169.254.0.0/16, 127.0.0.0/8 et 240.0.0.0/4, ::1/128, ::/128, ::ffff:0:0/96, fe80::/10... $info['http_code'] = 400; $info['content'] = 'Error bad hostname IP (private or reserved range). Must be an external URL.'; break; } - if (in_array($iptocheck, array('100.100.100.200'))) { + if (!empty($_SERVER["SERVER_ADDR"]) && $iptocheck == $_SERVER["SERVER_ADDR"]) { $info['http_code'] = 400; - $info['content'] = 'Error bad hostname IP (Used by Alibaba metadata). Must be an external URL.'; + $info['content'] = 'Error bad hostname IP (IP is a local IP). Must be an external URL.'; + break; + } + if (!empty($conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP) && in_array($iptocheck, explode(',', $conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP))) { + $info['http_code'] = 400; + $info['content'] = 'Error bad hostname IP (IP is a local IP defined into MAIN_SECURITY_SERVER_IP). Must be an external URL.'; break; } } if ($localurl == 1) { // Only local url allowed (dangerous, may allow to get metadata on server or make internal port scanning) if (filter_var($iptocheck, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { $info['http_code'] = 400; - $info['content'] = 'Error bad hostname. Must be a local URL.'; + $info['content'] = 'Error bad hostname '.$iptocheck.'. Must be a local URL.'; break; } + if (!empty($conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP) && !in_array($iptocheck, explode(',', '127.0.0.1,::1,'.$conf->global->MAIN_SECURITY_ANTI_SSRF_SERVER_IP))) { + $info['http_code'] = 400; + $info['content'] = 'Error bad hostname IP (IP is not a local IP defined into list MAIN_SECURITY_SERVER_IP). Must be a local URL in allowed list.'; + break; + } + } + + // Common check (local and external) + if (in_array($iptocheck, array('100.100.100.200'))) { + $info['http_code'] = 400; + $info['content'] = 'Error bad hostname IP (Used by Alibaba metadata). Must be an external URL.'; + break; + } + + // Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+ + if (defined('CURLOPT_CONNECT_TO')) { + $connect_to = array(sprintf("%s:%d:%s:%d", $newUrlArray['host'], $newUrlArray['port'], $iptocheck, $newUrlArray['port'])); + //var_dump($newUrlArray); + //var_dump($connect_to); + curl_setopt($ch, CURLOPT_CONNECT_TO, $connect_to); } } @@ -177,6 +232,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $info = curl_getinfo($ch); // Reading of request must be done after sending request $http_code = $info['http_code']; + if ($followlocation && ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307)) { $newUrl = $info['redirect_url']; $maxRedirection--; @@ -185,8 +241,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = } else { $http_code = 0; } - } - while ($http_code); + } while ($http_code); $request = curl_getinfo($ch, CURLINFO_HEADER_OUT); // Reading of request must be done after sending request @@ -196,7 +251,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $rep = array(); if (curl_errno($ch)) { - // Ad keys to $rep + // Add keys to $rep $rep['content'] = $response; // moving to display page to display curl errors @@ -207,14 +262,16 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = } else { //$info = curl_getinfo($ch); - // Ad keys to $rep + // Add keys to $rep $rep = $info; //$rep['header_size']=$info['header_size']; //$rep['http_code']=$info['http_code']; dol_syslog("getURLContent http_code=".$rep['http_code']); // Add more keys to $rep - $rep['content'] = $response; + if ($response) { + $rep['content'] = $response; + } $rep['curl_error_no'] = ''; $rep['curl_error_msg'] = ''; } @@ -263,7 +320,9 @@ function getRootURLFromURL($url) $prefix = ''; $tmpurl = $url; $reg = null; - if (preg_match('/^(https?:\/\/)/i', $tmpurl, $reg)) $prefix = $reg[1]; + if (preg_match('/^(https?:\/\/)/i', $tmpurl, $reg)) { + $prefix = $reg[1]; + } $tmpurl = preg_replace('/^https?:\/\//i', '', $tmpurl); // Remove http(s):// $tmpurl = preg_replace('/\/.*$/i', '', $tmpurl); // Remove part after domain diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php index 7b9c5d46da2..4f6da9f6d51 100644 --- a/htdocs/core/lib/holiday.lib.php +++ b/htdocs/core/lib/holiday.lib.php @@ -47,7 +47,9 @@ function holiday_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index bd392760cc5..36e8cef6bfe 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -23,11 +23,30 @@ */ // Define size of logo small and mini -$maxwidthsmall = 480; $maxheightsmall = 270; // Near 16/9eme -$maxwidthmini = 128; $maxheightmini = 72; // 16/9eme +$maxwidthsmall = 480; +$maxheightsmall = 270; // Near 16/9eme +$maxwidthmini = 128; +$maxheightmini = 72; // 16/9eme $quality = 80; +/** + * Return if a filename is file name of a supported image format + * + * @param int $acceptsvg 0=Default (depends on setup), 1=Always accept SVG as image files + * @return string Return list fo image format + */ +function getListOfPossibleImageExt($acceptsvg = 0) +{ + global $conf; + + $regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into product.class.php + if ($acceptsvg || !empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) { + $regeximgext .= '|\.svg'; // Not allowed by default. SVG can contains javascript + } + + return $regeximgext; +} /** * Return if a filename is file name of a supported image format @@ -38,32 +57,45 @@ $quality = 80; */ function image_format_supported($file, $acceptsvg = 0) { - global $conf; - - $regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into product.class.php - if ($acceptsvg || !empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) { - $regeximgext .= '|\.svg'; // Not allowed by default. SVG can contains javascript - } + $regeximgext = getListOfPossibleImageExt(); // Case filename is not a format image $reg = array(); - if (!preg_match('/('.$regeximgext.')$/i', $file, $reg)) return -1; + if (!preg_match('/('.$regeximgext.')$/i', $file, $reg)) { + return -1; + } // Case filename is a format image but not supported by this PHP $imgfonction = ''; - if (strtolower($reg[1]) == '.gif') $imgfonction = 'imagecreatefromgif'; - if (strtolower($reg[1]) == '.jpg') $imgfonction = 'imagecreatefromjpeg'; - if (strtolower($reg[1]) == '.jpeg') $imgfonction = 'imagecreatefromjpeg'; - if (strtolower($reg[1]) == '.png') $imgfonction = 'imagecreatefrompng'; - if (strtolower($reg[1]) == '.bmp') $imgfonction = 'imagecreatefromwbmp'; - if (strtolower($reg[1]) == '.webp') $imgfonction = 'imagecreatefromwebp'; - if (strtolower($reg[1]) == '.xpm') $imgfonction = 'imagecreatefromxpm'; - if (strtolower($reg[1]) == '.xbm') $imgfonction = 'imagecreatefromxbm'; - if (strtolower($reg[1]) == '.svg') $imgfonction = 'imagecreatefromsvg'; // Never available - if ($imgfonction) - { - if (!function_exists($imgfonction)) - { + if (strtolower($reg[1]) == '.gif') { + $imgfonction = 'imagecreatefromgif'; + } + if (strtolower($reg[1]) == '.jpg') { + $imgfonction = 'imagecreatefromjpeg'; + } + if (strtolower($reg[1]) == '.jpeg') { + $imgfonction = 'imagecreatefromjpeg'; + } + if (strtolower($reg[1]) == '.png') { + $imgfonction = 'imagecreatefrompng'; + } + if (strtolower($reg[1]) == '.bmp') { + $imgfonction = 'imagecreatefromwbmp'; + } + if (strtolower($reg[1]) == '.webp') { + $imgfonction = 'imagecreatefromwebp'; + } + if (strtolower($reg[1]) == '.xpm') { + $imgfonction = 'imagecreatefromxpm'; + } + if (strtolower($reg[1]) == '.xbm') { + $imgfonction = 'imagecreatefromxbm'; + } + if (strtolower($reg[1]) == '.svg') { + $imgfonction = 'imagecreatefromsvg'; // Never available + } + if ($imgfonction) { + if (!function_exists($imgfonction)) { // Fonctions of conversion not available in this PHP return 0; } @@ -77,7 +109,7 @@ function image_format_supported($file, $acceptsvg = 0) /** - * Return size of image file on disk (Supported extensions are gif, jpg, png and bmp) + * Return size of image file on disk (Supported extensions are gif, jpg, png, bmp and webp) * * @param string $file Full path name of file * @param bool $url Image with url (true or false) @@ -87,16 +119,16 @@ function dol_getImageSize($file, $url = false) { $ret = array(); - if (image_format_supported($file) < 0) return $ret; + if (image_format_supported($file) < 0) { + return $ret; + } $filetoread = $file; - if (!$url) - { + if (!$url) { $filetoread = realpath(dol_osencode($file)); // Chemin canonique absolu de l'image } - if ($filetoread) - { + if ($filetoread) { $infoImg = getimagesize($filetoread); // Recuperation des infos de l'image $ret['width'] = $infoImg[0]; // Largeur de l'image $ret['height'] = $infoImg[1]; // Hauteur de l'image @@ -107,17 +139,19 @@ function dol_getImageSize($file, $url = false) /** - * Resize or crop an image file (Supported extensions are gif, jpg, png and bmp) + * Resize or crop an image file (Supported extensions are gif, jpg, png, bmp and webp) * - * @param string $file Path of file to resize/crop - * @param int $mode 0=Resize, 1=Crop - * @param int $newWidth Largeur maximum que dois faire l'image destination (0=keep ratio) - * @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio) - * @param int $src_x Position of croping image in source image (not use if mode=0) - * @param int $src_y Position of croping image in source image (not use if mode=0) - * @return string File name if OK, error message if KO + * @param string $file Path of source file to resize/crop + * @param int $mode 0=Resize, 1=Crop + * @param int $newWidth Largeur maximum que dois faire l'image destination (0=keep ratio) + * @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio) + * @param int $src_x Position of croping image in source image (not use if mode=0) + * @param int $src_y Position of croping image in source image (not use if mode=0) + * @param string $filetowrite Path of file to write (overwrite source file if not provided) + * @return string File name if OK, error message if KO + * @see dol_convert_file() */ -function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0) +function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0, $filetowrite = '') { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -129,25 +163,19 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $file = trim($file); // Check parameters - if (!$file) - { + if (!$file) { // Si le fichier n'a pas ete indique return 'Bad parameter file'; - } elseif (!file_exists($file)) - { + } elseif (!file_exists($file)) { // Si le fichier passe en parametre n'existe pas return $langs->trans("ErrorFileNotFound", $file); - } elseif (image_format_supported($file) < 0) - { + } elseif (image_format_supported($file) < 0) { return 'This filename '.$file.' does not seem to be an image filename.'; - } elseif (!is_numeric($newWidth) && !is_numeric($newHeight)) - { + } elseif (!is_numeric($newWidth) && !is_numeric($newHeight)) { return 'Wrong value for parameter newWidth or newHeight'; - } elseif ($mode == 0 && $newWidth <= 0 && $newHeight <= 0) - { - return 'At least newHeight or newWidth must be defined for resizing'; - } elseif ($mode == 1 && ($newWidth <= 0 || $newHeight <= 0)) - { + } elseif ($mode == 0 && $newWidth <= 0 && $newHeight <= 0 && (empty($filetowrite) || $filetowrite == $file)) { + return 'At least newHeight or newWidth must be defined for resizing, or a target filename must be set to convert'; + } elseif ($mode == 1 && ($newWidth <= 0 || $newHeight <= 0)) { return 'Both newHeight or newWidth must be defined for croping'; } @@ -157,21 +185,22 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $imgWidth = $infoImg[0]; // Largeur de l'image $imgHeight = $infoImg[1]; // Hauteur de l'image - if ($mode == 0) // If resize, we check parameters - { - if ($newWidth <= 0) - { + if ($mode == 0) { // If resize, we check parameters + if (!empty($filetowrite) && $filetowrite != $file && $newWidth <= 0 && $newHeight <= 0) { + $newWidth = $imgWidth; + $newHeight = $imgHeight; + } + + if ($newWidth <= 0) { $newWidth = intval(($newHeight / $imgHeight) * $imgWidth); // Keep ratio } - if ($newHeight <= 0) - { + if ($newHeight <= 0) { $newHeight = intval(($newWidth / $imgWidth) * $imgHeight); // Keep ratio } } $imgfonction = ''; - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case 1: // IMG_GIF $imgfonction = 'imagecreatefromgif'; break; @@ -188,18 +217,15 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $imgfonction = 'imagecreatefromwebp'; break; } - if ($imgfonction) - { - if (!function_exists($imgfonction)) - { + if ($imgfonction) { + if (!function_exists($imgfonction)) { // Fonctions de conversion non presente dans ce PHP return 'Resize not possible. This PHP does not support GD functions '.$imgfonction; } } // Initialisation des variables selon l'extension de l'image - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case 1: // Gif $img = imagecreatefromgif($filetoread); $extImg = '.gif'; // File name extension of image @@ -228,8 +254,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, } // Create empty image - if ($infoImg[2] == 1) - { + if ($infoImg[2] == 1) { // Compatibilite image GIF $imgThumb = imagecreate($newWidth, $newHeight); } else { @@ -237,20 +262,17 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, } // Activate antialiasing for better quality - if (function_exists('imageantialias')) - { + if (function_exists('imageantialias')) { imageantialias($imgThumb, true); } // This is to keep transparent alpha channel if exists (PHP >= 4.2) - if (function_exists('imagesavealpha')) - { + if (function_exists('imagesavealpha')) { imagesavealpha($imgThumb, true); } // Initialisation des variables selon l'extension de l'image - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case 1: // Gif $trans_colour = imagecolorallocate($imgThumb, 255, 255, 255); // On procede autrement pour le format GIF imagecolortransparent($imgThumb, $trans_colour); @@ -269,40 +291,45 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $trans_colour = imagecolorallocatealpha($imgThumb, 255, 255, 255, 127); break; } - if (function_exists("imagefill")) imagefill($imgThumb, 0, 0, $trans_colour); + if (function_exists("imagefill")) { + imagefill($imgThumb, 0, 0, $trans_colour); + } dol_syslog("dol_imageResizeOrCrop: convert image from ($imgWidth x $imgHeight) at position ($src_x x $src_y) to ($newWidth x $newHeight) as $extImg, newquality=$newquality"); //imagecopyresized($imgThumb, $img, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imgWidth, $imgHeight); // Insere l'image de base redimensionnee imagecopyresampled($imgThumb, $img, 0, 0, $src_x, $src_y, $newWidth, $newHeight, ($mode == 0 ? $imgWidth : $newWidth), ($mode == 0 ? $imgHeight : $newHeight)); // Insere l'image de base redimensionnee - $imgThumbName = $file; + $imgTargetName = ($filetowrite ? $filetowrite : $file); // Check if permission are ok - //$fp = fopen($imgThumbName, "w"); + //$fp = fopen($imgTargetName, "w"); //fclose($fp); - // Create image on disk - switch ($infoImg[2]) - { - case 1: // Gif - imagegif($imgThumb, $imgThumbName); + $newExt = strtolower(pathinfo($imgTargetName, PATHINFO_EXTENSION)); + + // Create image on disk (overwrite file if exists) + switch ($newExt) { + case 'gif': // Gif + imagegif($imgThumb, $imgTargetName); break; - case 2: // Jpg - imagejpeg($imgThumb, $imgThumbName, $newquality); + case 'jpg': // Jpg + imagejpeg($imgThumb, $imgTargetName, $newquality); break; - case 3: // Png - imagepng($imgThumb, $imgThumbName, $newquality); + case 'png': // Png + imagepng($imgThumb, $imgTargetName, $newquality); break; - case 4: // Bmp - imagewbmp($imgThumb, $imgThumbName); + case 'bmp': // Bmp + imagewbmp($imgThumb, $imgTargetName); break; - case 18: // Webp - imagewebp($imgThumb, $imgThumbName, $newquality); + case 'webp': // Webp + imagewebp($imgThumb, $imgTargetName, $newquality); break; } // Set permissions on file - if (!empty($conf->global->MAIN_UMASK)) @chmod($imgThumbName, octdec($conf->global->MAIN_UMASK)); + if (!empty($conf->global->MAIN_UMASK)) { + @chmod($imgTargetName, octdec($conf->global->MAIN_UMASK)); + } // Free memory. This does not delete image. imagedestroy($img); @@ -310,7 +337,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, clearstatcache(); // File was replaced by a modified one, so we clear file caches. - return $imgThumbName; + return $imgTargetName; } @@ -359,8 +386,7 @@ function correctExifImageOrientation($fileSource, $fileDest, $quality = 95) break; } if ($deg) { - if ($infoImg[2] === 'IMAGETYPE_PNG') // In fact there is no exif on PNG but just in case - { + if ($infoImg[2] === 'IMAGETYPE_PNG') { // In fact there is no exif on PNG but just in case imagealphablending($img, false); imagesavealpha($img, true); $img = imagerotate($img, $deg, imageColorAllocateAlpha($img, 0, 0, 0, 127)); @@ -378,8 +404,7 @@ function correctExifImageOrientation($fileSource, $fileDest, $quality = 95) // Create image on disk $image = false; - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case IMAGETYPE_GIF: // 1 $image = imagegif($img, $fileDest); break; @@ -434,17 +459,14 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $file = trim($file); // Check parameters - if (!$file) - { + if (!$file) { // Si le fichier n'a pas ete indique return 'ErrorBadParameters'; - } elseif (!file_exists($file)) - { + } elseif (!file_exists($file)) { // Si le fichier passe en parametre n'existe pas dol_syslog($langs->trans("ErrorFileNotFound", $file), LOG_ERR); return $langs->trans("ErrorFileNotFound", $file); - } elseif (image_format_supported($file) < 0) - { + } elseif (image_format_supported($file) < 0) { dol_syslog('This file '.$file.' does not seem to be an image format file name.', LOG_WARNING); return 'ErrorBadImageFormat'; } elseif (!is_numeric($maxWidth) || empty($maxWidth) || $maxWidth < -1) { @@ -471,20 +493,22 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } } - if ($maxWidth == -1) $maxWidth = $infoImg[0]; // If size is -1, we keep unchanged - if ($maxHeight == -1) $maxHeight = $infoImg[1]; // If size is -1, we keep unchanged + if ($maxWidth == -1) { + $maxWidth = $infoImg[0]; // If size is -1, we keep unchanged + } + if ($maxHeight == -1) { + $maxHeight = $infoImg[1]; // If size is -1, we keep unchanged + } // Si l'image est plus petite que la largeur et la hauteur max, on ne cree pas de vignette - if ($infoImg[0] < $maxWidth && $infoImg[1] < $maxHeight) - { + if ($infoImg[0] < $maxWidth && $infoImg[1] < $maxHeight) { // On cree toujours les vignettes dol_syslog("File size is smaller than thumb size", LOG_DEBUG); //return 'Le fichier '.$file.' ne necessite pas de creation de vignette'; } $imgfonction = ''; - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case IMAGETYPE_GIF: // 1 $imgfonction = 'imagecreatefromgif'; break; @@ -501,10 +525,8 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $imgfonction = 'imagecreatefromwbmp'; break; } - if ($imgfonction) - { - if (!function_exists($imgfonction)) - { + if ($imgfonction) { + if (!function_exists($imgfonction)) { // Fonctions de conversion non presente dans ce PHP return 'Error: Creation of thumbs not possible. This PHP does not support GD function '.$imgfonction; } @@ -516,8 +538,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', // Initialisation des variables selon l'extension de l'image $img = null; - switch ($infoImg[2]) - { + switch ($infoImg[2]) { case IMAGETYPE_GIF: // 1 $img = imagecreatefromgif($filetoread); $extImg = '.gif'; // Extension de l'image @@ -540,16 +561,14 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', break; } - if (!is_resource($img)) - { + if (!is_resource($img)) { dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING); return 0; } $exifAngle = false; if ($ort && !empty($conf->global->MAIN_USE_EXIF_ROTATION)) { - switch ($ort) - { + switch ($ort) { case 3: // 180 rotate left $exifAngle = 180; break; @@ -568,12 +587,10 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } } - if ($exifAngle) - { + if ($exifAngle) { $rotated = false; - if ($infoImg[2] === 'IMAGETYPE_PNG') // In fact there is no exif on PNG but just in case - { + if ($infoImg[2] === 'IMAGETYPE_PNG') { // In fact there is no exif on PNG but just in case imagealphablending($img, false); imagesavealpha($img, true); $rotated = imagerotate($img, $exifAngle, imageColorAllocateAlpha($img, 0, 0, 0, 127)); @@ -592,15 +609,18 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } // Initialisation des dimensions de la vignette si elles sont superieures a l'original - if ($maxWidth > $imgWidth) { $maxWidth = $imgWidth; } - if ($maxHeight > $imgHeight) { $maxHeight = $imgHeight; } + if ($maxWidth > $imgWidth) { + $maxWidth = $imgWidth; + } + if ($maxHeight > $imgHeight) { + $maxHeight = $imgHeight; + } $whFact = $maxWidth / $maxHeight; // Facteur largeur/hauteur des dimensions max de la vignette $imgWhFact = $imgWidth / $imgHeight; // Facteur largeur/hauteur de l'original // Fixe les dimensions de la vignette - if ($whFact < $imgWhFact) - { + if ($whFact < $imgWhFact) { // Si largeur determinante $thumbWidth = $maxWidth; $thumbHeight = $thumbWidth / $imgWhFact; @@ -613,11 +633,12 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $thumbWidth = round($thumbWidth); // Define target format - if (empty($targetformat)) $targetformat = $infoImg[2]; + if (empty($targetformat)) { + $targetformat = $infoImg[2]; + } // Create empty image - if ($targetformat == IMAGETYPE_GIF) - { + if ($targetformat == IMAGETYPE_GIF) { // Compatibilite image GIF $imgThumb = imagecreate($thumbWidth, $thumbHeight); } else { @@ -625,21 +646,18 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } // Activate antialiasing for better quality - if (function_exists('imageantialias')) - { + if (function_exists('imageantialias')) { imageantialias($imgThumb, true); } // This is to keep transparent alpha channel if exists (PHP >= 4.2) - if (function_exists('imagesavealpha')) - { + if (function_exists('imagesavealpha')) { imagesavealpha($imgThumb, true); } // Initialisation des variables selon l'extension de l'image // $targetformat is 0 by default, in such case, we keep original extension - switch ($targetformat) - { + switch ($targetformat) { case IMAGETYPE_GIF: // 1 $trans_colour = imagecolorallocate($imgThumb, 255, 255, 255); // On procede autrement pour le format GIF imagecolortransparent($imgThumb, $trans_colour); @@ -669,7 +687,9 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $newquality = 'NU'; break; } - if (function_exists("imagefill")) imagefill($imgThumb, 0, 0, $trans_colour); + if (function_exists("imagefill")) { + imagefill($imgThumb, 0, 0, $trans_colour); + } dol_syslog("vignette: convert image from ($imgWidth x $imgHeight) to ($thumbWidth x $thumbHeight) as $extImg, newquality=$newquality"); //imagecopyresized($imgThumb, $img, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $imgWidth, $imgHeight); // Insere l'image de base redimensionnee @@ -686,8 +706,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', //fclose($fp); // Create image on disk - switch ($targetformat) - { + switch ($targetformat) { case IMAGETYPE_GIF: // 1 imagegif($imgThumb, $imgThumbName); break; @@ -706,7 +725,9 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', } // Set permissions on file - if (!empty($conf->global->MAIN_UMASK)) @chmod($imgThumbName, octdec($conf->global->MAIN_UMASK)); + if (!empty($conf->global->MAIN_UMASK)) { + @chmod($imgThumbName, octdec($conf->global->MAIN_UMASK)); + } // Free memory. This does not delete image. imagedestroy($img); diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php index 385dee32a86..a9663795988 100644 --- a/htdocs/core/lib/import.lib.php +++ b/htdocs/core/lib/import.lib.php @@ -36,13 +36,14 @@ function import_prepare_head($param, $maxstep = 0) { global $langs; - if (empty($maxstep)) $maxstep = 6; + if (empty($maxstep)) { + $maxstep = 6; + } $h = 0; $head = array(); $i = 1; - while ($i <= $maxstep) - { + while ($i <= $maxstep) { if ($i < 6) { $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param; } else { diff --git a/htdocs/core/lib/index.html b/htdocs/core/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index eda1a901986..b3a9ed7b453 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -45,32 +45,37 @@ function facture_prepare_head($object) $head[$h][2] = 'compta'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } - if (!empty($conf->prelevement->enabled)) - { + if (!empty($conf->prelevement->enabled)) { $nbStandingOrders = 0; $sql = "SELECT COUNT(pfd.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " WHERE pfd.fk_facture = ".$object->id; $sql .= " AND pfd.ext_payment_id IS NULL"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $nbStandingOrders = $obj->nb; - } else dol_print_error($db); + if ($obj) { + $nbStandingOrders = $obj->nb; + } + } else { + dol_print_error($db); + } $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; $head[$h][1] = $langs->trans('StandingOrders'); - if ($nbStandingOrders > 0) $head[$h][1] .= ''.$nbStandingOrders.''; + if ($nbStandingOrders > 0) { + $head[$h][1] .= ''.$nbStandingOrders.''; + } $head[$h][2] = 'standingorders'; $h++; } @@ -81,14 +86,19 @@ function facture_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'invoice'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -100,7 +110,9 @@ function facture_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; @@ -203,3 +215,1055 @@ function invoice_rec_prepare_head($object) return $head; } + +/** + * 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 getCustomerInvoicePieChart($socid = 0) +{ + global $conf, $db, $langs, $user; + + if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) { + return ''; + } + + $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); + + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + + $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 ($status == Facture::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Facture::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Facture::STATUS_CLOSED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == Facture::STATUS_ABANDONED) { + $colorseries[$status] = $badgeStatus6; + } + + if (!$conf->use_javascript_ajax) { + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + } + } + + if ($conf->use_javascript_ajax) { + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->SetDataColor(array_values($colorseries)); + $dolgraph->setShowLegend(2); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(['pie']); + $dolgraph->setHeight('200'); + $dolgraph->draw('idgraphcustomerinvoices'); + + $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 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 getPurchaseInvoicePieChart($socid = 0) +{ + global $conf, $db, $langs, $user; + + if (!((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire))) { + return ''; + } + + $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); + + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + + $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 ($status == FactureFournisseur::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == FactureFournisseur::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == FactureFournisseur::STATUS_CLOSED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == FactureFournisseur::STATUS_ABANDONED) { + $colorseries[$status] = $badgeStatus6; + } + + if (!$conf->use_javascript_ajax) { + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + } + } + + if ($conf->use_javascript_ajax) { + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->SetDataColor(array_values($colorseries)); + $dolgraph->setShowLegend(2); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(['pie']); + $dolgraph->setHeight('200'); + $dolgraph->draw('idgraphpurchaseinvoices'); + + $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 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 getCustomerInvoiceDraftTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user, $hookmanager; + + $result = ''; + $tmpinvoice = new Facture($db); + + $sql = "SELECT f.rowid, f.ref, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.ref_client"; + $sql .= ", f.type, f.fk_statut as status, f.paye"; + $sql .= ", s.nom as name"; + $sql .= ", s.rowid as socid, s.email"; + $sql .= ", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= ", cc.rowid as country_id, cc.code as country_code"; + 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 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 = ".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; + } + + if ($socid) { + $sql .= " AND f.fk_soc = $socid"; + } + // Add where from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListWhereCustomerDraft', $parameters); + $sql .= $hookmanager->resPrint; + + $sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,"; + $sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,"; + $sql .= " cc.rowid, cc.code"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql.= ", sc.fk_soc, sc.fk_user"; + } + + // Add Group from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListGroupByCustomerDraft', $parameters); + $sql .= $hookmanager->resPrint; + + $resql = $db->query($sql); + + if ($resql) { + $num = $db->num_rows($resql); + + $result .= '
    '; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num) { + $companystatic = new Societe($db); + + $i = 0; + $othernb = 0; + $tot_ttc = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + + if ($i >= $maxCount) { + $othernb += 1; + $i++; + $tot_ttc += $obj->total_ttc; + continue; + } + + $tmpinvoice->id = $obj->rowid; + $tmpinvoice->ref = $obj->ref; + $tmpinvoice->date = $db->jdate($obj->date); + $tmpinvoice->type = $obj->type; + $tmpinvoice->total_ht = $obj->total_ht; + $tmpinvoice->total_tva = $obj->total_tva; + $tmpinvoice->total_ttc = $obj->total_ttc; + $tmpinvoice->ref_client = $obj->ref_client; + $tmpinvoice->statut = $obj->status; + $tmpinvoice->paye = $obj->paye; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->name; + $companystatic->email = $obj->email; + $companystatic->country_id = $obj->country_id; + $companystatic->country_code = $obj->country_code; + $companystatic->client = 1; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + $companystatic->code_compta = $obj->code_compta; + $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + $tot_ttc += $obj->total_ttc; + $i++; + } + + if ($othernb) { + $result .= ''; + $result .= ''; + $result .= "\n"; + } + + $result .= ''; + $result .= ''; + $result .= ''; + } else { + $result .= ''; + } + $result .= "
    '; + $result .= $langs->trans("CustomersDraftInvoices").' '; + $result .= ''; + $result .= ''.$num.''; + $result .= ''; + $result .= '
    '; + $result .= $tmpinvoice->getNomUrl(1, ''); + $result .= ''; + $result .= $companystatic->getNomUrl(1, 'customer'); + $result .= ''.price($obj->total_ttc).'
    '; + $result .= ''.$langs->trans("More").'... ('.$othernb.')'; + $result .= '
    '.$langs->trans("Total").''.price($tot_ttc).'
    '.$langs->trans("NoInvoice").'
    "; + $db->free($resql); + } else { + dol_print_error($db); + } + + 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 getDraftSupplierTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user, $hookmanager; + + $result = ''; + $facturesupplierstatic = new FactureFournisseur($db); + + $sql = "SELECT f.ref, f.rowid, f.total_ht, f.total_tva, f.total_ttc, f.type, f.ref_supplier, f.fk_statut as status, f.paye"; + $sql .= ", s.nom as name"; + $sql .= ", s.rowid as socid, s.email"; + $sql .= ", s.code_client, s.code_compta"; + $sql .= ", s.code_fournisseur, s.code_compta_fournisseur"; + $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 = ".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; + } + // Add where from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListWhereSupplierDraft', $parameters); + $sql .= $hookmanager->resPrint; + $resql = $db->query($sql); + + if ($resql) { + $num = $db->num_rows($resql); + + $result .= '
    '; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num) { + $companystatic = new Societe($db); + + $i = 0; + $othernb = 0; + $tot_ttc = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + + if ($i >= $maxCount) { + $othernb += 1; + $i++; + $tot_ttc += $obj->total_ttc; + continue; + } + + $facturesupplierstatic->ref = $obj->ref; + $facturesupplierstatic->id = $obj->rowid; + $facturesupplierstatic->total_ht = $obj->total_ht; + $facturesupplierstatic->total_tva = $obj->total_tva; + $facturesupplierstatic->total_ttc = $obj->total_ttc; + $facturesupplierstatic->ref_supplier = $obj->ref_supplier; + $facturesupplierstatic->type = $obj->type; + $facturesupplierstatic->statut = $obj->status; + $facturesupplierstatic->paye = $obj->paye; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->name; + $companystatic->email = $obj->email; + $companystatic->country_id = $obj->country_id; + $companystatic->country_code = $obj->country_code; + $companystatic->fournisseur = 1; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + $companystatic->code_compta = $obj->code_compta; + $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + $tot_ttc += $obj->total_ttc; + $i++; + } + + if ($othernb) { + $result .= ''; + $result .= ''; + $result .= "\n"; + } + + $result .= ''; + $result .= ''; + $result .= ''; + } else { + $result .= ''; + } + $result .= "
    '; + $result .= $langs->trans("SuppliersDraftInvoices").' '; + $result .= ''; + $result .= ''.$num.''; + $result .= ''; + $result .= '
    '; + $result .= $facturesupplierstatic->getNomUrl(1, ''); + $result .= ''; + $result .= $companystatic->getNomUrl(1, 'supplier'); + $result .= ''.price($obj->total_ttc).'
    '; + $result .= ''.$langs->trans("More").'... ('.$othernb.')'; + $result .= '
    '.$langs->trans("Total").''.price($tot_ttc).'
    '.$langs->trans("NoInvoice").'
    "; + $db->free($resql); + } else { + dol_print_error($db); + } + + 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 getCustomerInvoiceLatestEditTable($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 = ".((int) $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 .= '
    '.$objectstatic->getNomUrl(1).' '.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
    '; + $result .= '
    '.$companystatic->getNomUrl(1, 'customer').''.dol_print_date($db->jdate($obj->datec), 'day').''.$objectstatic->getLibStatut(5).'
    '; + $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 getPurchaseInvoiceLatestEditTable($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 of unpaid customers 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 getCustomerInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user, $hookmanager; + + $result = ''; + + if (!empty($conf->facture->enabled) && !empty($user->rights->facture->lire)) { + $tmpinvoice = new Facture($db); + + $sql = "SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms"; + $sql .= ", f.date_lim_reglement as datelimite"; + $sql .= ", s.nom as name"; + $sql .= ", s.rowid as socid, s.email"; + $sql .= ", s.code_client, s.code_compta"; + $sql .= ", s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= ", cc.rowid as country_id, cc.code as country_code"; + $sql .= ", sum(pf.amount) as am"; + $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 = ".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; + } + // Add where from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListWhereCustomerUnpaid', $parameters); + $sql .= $hookmanager->resPrint; + + $sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,"; + $sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code"; + $sql .= ", s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= " ORDER BY f.datef ASC, f.ref ASC"; + + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + $othernb = 0; + + $formfile = new FormFile($db); + + print '
    '; + print ''; + + print ''; + print ''; + + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { + print ''; + } + print ''; + print ''; + print ''; + print ''; + if ($num) { + $societestatic = new Societe($db); + $total_ttc = $totalam = $total = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + + if ($i >= $maxCount) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + + $tmpinvoice->ref = $obj->ref; + $tmpinvoice->id = $obj->rowid; + $tmpinvoice->total_ht = $obj->total_ht; + $tmpinvoice->total_tva = $obj->total_tva; + $tmpinvoice->total_ttc = $obj->total_ttc; + $tmpinvoice->type = $obj->type; + $tmpinvoice->statut = $obj->status; + $tmpinvoice->paye = $obj->paye; + $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite); + + $societestatic->id = $obj->socid; + $societestatic->name = $obj->name; + $societestatic->email = $obj->email; + $societestatic->country_id = $obj->country_id; + $societestatic->country_code = $obj->country_code; + $societestatic->client = 1; + $societestatic->code_client = $obj->code_client; + $societestatic->code_fournisseur = $obj->code_fournisseur; + $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 ''; + + $total_ttc += $obj->total_ttc; + $total += $obj->total_ht; + $totalam += $obj->am; + + $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 ''; + } + print ''; + print ''; + print ''; + print ''; + } else { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { + $colspan++; + } + print ''; + } + print '
    '; + print $langs->trans("BillsCustomersUnpaid", $num).' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Received").' 
    '; + + print ''; + print ''; + print ''; + print '
    '; + print $tmpinvoice->getNomUrl(1, ''); + print ''; + if ($tmpinvoice->hasDelay()) { + print img_warning($langs->trans("Late")); + } + print ''; + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($obj->ref); + $urlsource = $_SERVER['PHP_SELF'].'?facid='.$obj->rowid; + print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir); + print '
    '; + + print '
    '; + print $societestatic->getNomUrl(1, 'customer'); + print ''.dol_print_date($db->jdate($obj->datelimite), 'day').''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).''.$tmpinvoice->getLibStatut(3, $obj->am).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("Total").'   ('.$langs->trans("RemainderToTake").': '.price($total_ttc - $totalam).')  '.price($total).''.price($total_ttc).''.price($totalam).' 
    '.$langs->trans("NoInvoice").'

    '; + $db->free($resql); + } else { + dol_print_error($db); + } + } + + return $result; +} + + +/** + * Return a HTML table that contains of unpaid purchase 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 getPurchaseInvoiceUnpaidOpenTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user, $hookmanager; + + $result = ''; + + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { + $facstatic = new FactureFournisseur($db); + + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut as status, 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"; + $sql .= ", s.code_client, s.code_compta"; + $sql .= ", s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= ", sum(pf.amount) as am"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } + $sql .= " WHERE s.rowid = ff.fk_soc"; + $sql .= " AND ff.entity = ".$conf->entity; + $sql .= " AND ff.paye = 0"; + $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 + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListWhereSupplierUnpaid', $parameters); + $sql .= $hookmanager->resPrint; + + $sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, 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"; + + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $othernb = 0; + + $formfile = new FormFile($db); + + print '
    '; + print ''; + + print ''; + print ''; + + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { + print ''; + } + print ''; + print ''; + print ''; + print "\n"; + $societestatic = new Societe($db); + if ($num) { + $i = 0; + $total = $total_ttc = $totalam = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + + if ($i >= $maxCount) { + $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; + $facstatic->statut = $obj->status; + $facstatic->paye = $obj->paye; + + $societestatic->id = $obj->socid; + $societestatic->name = $obj->name; + $societestatic->email = $obj->email; + $societestatic->client = 0; + $societestatic->fournisseur = 1; + $societestatic->code_client = $obj->code_client; + $societestatic->code_fournisseur = $obj->code_fournisseur; + $societestatic->code_compta = $obj->code_compta; + $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur; + + print ''; + print ''; + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { + print ''; + } + print ''; + print ''; + print ''; + print ''; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + $totalam += $obj->am; + $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 ''; + } + print ''; + print ''; + print ''; + print ''; + } else { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) { + $colspan++; + } + print ''; + } + print '
    '; + print $langs->trans("BillsSuppliersUnpaid", $num).' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Paid").' 
    '; + print $facstatic->getNomUrl(1, ''); + print ''.$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->getLibStatut(3, $obj->am).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("Total").'   ('.$langs->trans("RemainderToPay").': '.price($total_ttc - $totalam).')  '.price($total).''.price($total_ttc).''.price($totalam).' 
    '.$langs->trans("NoInvoice").'

    '; + } else { + dol_print_error($db); + } + } + + return $result; +} diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index 1357bfb2417..c5e2aeb0a16 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -53,85 +53,106 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sqlwhere = ''; $sqlorder = ''; - if (in_array('all', $filter)) - { + if (in_array('all', $filter)) { $sqlorder = " ORDER BY f.ref ASC"; } - if (in_array('date', $filter)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (in_array('date', $filter)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= " f.fk_statut > 0"; $sqlwhere .= " AND f.datef >= '".$db->idate($dateafterdate)."'"; $sqlwhere .= " AND f.datef <= '".$db->idate($datebeforedate)."'"; $sqlorder = " ORDER BY f.datef ASC"; } - if (in_array('nopayment', $filter)) - { + if (in_array('nopayment', $filter)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid = pf.fk_facture"; - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= " f.fk_statut > 0"; $sqlwhere .= " AND pf.fk_paiement IS NULL"; } - if (in_array('payments', $filter) || in_array('bank', $filter)) - { + if (in_array('payments', $filter) || in_array('bank', $filter)) { $sql .= ", ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; - if (in_array('bank', $filter)) $sql .= ", ".MAIN_DB_PREFIX."bank as b"; - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (in_array('bank', $filter)) { + $sql .= ", ".MAIN_DB_PREFIX."bank as b"; + } + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= " f.fk_statut > 0"; $sqlwhere .= " AND f.rowid = pf.fk_facture"; $sqlwhere .= " AND pf.fk_paiement = p.rowid"; - if (in_array('payments', $filter)) - { + if (in_array('payments', $filter)) { $sqlwhere .= " AND p.datep >= '".$db->idate($paymentdateafter)."'"; $sqlwhere .= " AND p.datep <= '".$db->idate($paymentdatebefore)."'"; } - if (in_array('bank', $filter)) - { + if (in_array('bank', $filter)) { $sqlwhere .= " AND p.fk_bank = b.rowid"; - $sqlwhere .= " AND b.fk_account = ".$paymentbankid; + $sqlwhere .= " AND b.fk_account = ".((int) $paymentbankid); } $sqlorder = " ORDER BY p.datep ASC"; } - if (in_array('nodeposit', $filter)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (in_array('nodeposit', $filter)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= ' type <> 3'; } - if (in_array('noreplacement', $filter)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (in_array('noreplacement', $filter)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= ' type <> 1'; } - if (in_array('nocreditnote', $filter)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; + if (in_array('nocreditnote', $filter)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } $sqlwhere .= ' type <> 2'; } - if (in_array('excludethirdparties', $filter) && is_array($thirdpartiesid)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; - $sqlwhere .= ' f.fk_soc NOT IN ('.join(',', $thirdpartiesid).')'; + if (in_array('excludethirdparties', $filter) && is_array($thirdpartiesid)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } + $sqlwhere .= ' f.fk_soc NOT IN ('.$db->sanitize(join(',', $thirdpartiesid)).')'; } - if (in_array('onlythirdparties', $filter) && is_array($thirdpartiesid)) - { - if (empty($sqlwhere)) $sqlwhere = ' WHERE '; - else $sqlwhere .= " AND"; - $sqlwhere .= ' f.fk_soc IN ('.join(',', $thirdpartiesid).')'; + if (in_array('onlythirdparties', $filter) && is_array($thirdpartiesid)) { + if (empty($sqlwhere)) { + $sqlwhere = ' WHERE '; + } else { + $sqlwhere .= " AND"; + } + $sqlwhere .= ' f.fk_soc IN ('.$db->sanitize(join(',', $thirdpartiesid)).')'; + } + if ($sqlwhere) { + $sql .= $sqlwhere; + } + if ($sqlorder) { + $sql .= $sqlorder; } - if ($sqlwhere) $sql .= $sqlwhere; - if ($sqlorder) $sql .= $sqlorder; //print $sql; exit; dol_syslog("scripts/invoices/rebuild_merge.php:", LOG_DEBUG); - if ($usestdout) print '--- start'."\n"; + if ($usestdout) { + print '--- start'."\n"; + } // Start of transaction //$db->begin(); @@ -141,54 +162,53 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte $files = array(); // liste les fichiers dol_syslog("scripts/invoices/rebuild_merge.php", LOG_DEBUG); - if ($resql = $db->query($sql)) - { + if ($resql = $db->query($sql)) { $num = $db->num_rows($resql); $cpt = 0; $oldemail = ''; $message = ''; $total = ''; - if ($num) - { + if ($num) { // First loop on each resultset to build PDF // ----------------------------------------- - while ($cpt < $num) - { + while ($cpt < $num) { $obj = $db->fetch_object($resql); $fac = new Facture($db); $result = $fac->fetch($obj->rowid); - if ($result > 0) - { + if ($result > 0) { $outputlangs = $langs; - if (!empty($newlangid)) - { - if ($outputlangs->defaultlang != $newlangid) - { + if (!empty($newlangid)) { + if ($outputlangs->defaultlang != $newlangid) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlangid); } } $filename = $conf->facture->dir_output.'/'.$fac->ref.'/'.$fac->ref.'.pdf'; - if ($regenerate || !dol_is_file($filename)) - { - if ($usestdout) print "Build PDF for invoice ".$obj->ref." - Lang = ".$outputlangs->defaultlang."\n"; - $result = $fac->generateDocument($regenerate ? $regenerate : $fac->modelpdf, $outputlangs); + if ($regenerate || !dol_is_file($filename)) { + if ($usestdout) { + print "Build PDF for invoice ".$obj->ref." - Lang = ".$outputlangs->defaultlang."\n"; + } + $result = $fac->generateDocument($regenerate ? $regenerate : $fac->model_pdf, $outputlangs); } else { - if ($usestdout) print "PDF for invoice ".$obj->ref." already exists\n"; + if ($usestdout) { + print "PDF for invoice ".$obj->ref." already exists\n"; + } } // Add file into files array $files[] = $filename; } - if ($result <= 0) - { + if ($result <= 0) { $error++; - if ($usestdout) print "Error: Failed to build PDF for invoice ".($fac->ref ? $fac->ref : ' id '.$obj->rowid)."\n"; - else dol_syslog("Failed to build PDF for invoice ".($fac->ref ? $fac->ref : ' id '.$obj->rowid), LOG_ERR); + if ($usestdout) { + print "Error: Failed to build PDF for invoice ".($fac->ref ? $fac->ref : ' id '.$obj->rowid)."\n"; + } else { + dol_syslog("Failed to build PDF for invoice ".($fac->ref ? $fac->ref : ' id '.$obj->rowid), LOG_ERR); + } } $cpt++; @@ -201,8 +221,11 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte $page_hauteur = $formatarray['height']; $format = array($page_largeur, $page_hauteur); - if ($usestdout) print "Using output PDF format ".join('x', $format)."\n"; - else dol_syslog("Using output PDF format ".join('x', $format), LOG_ERR); + if ($usestdout) { + print "Using output PDF format ".join('x', $format)."\n"; + } else { + dol_syslog("Using output PDF format ".join('x', $format), LOG_ERR); + } // Now, build a merged files with all files in $files array @@ -210,26 +233,28 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte // Create empty PDF $pdf = pdf_getInstance($format); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } $pdf->SetFont(pdf_getPDFFont($langs)); - if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false); + if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) { + $pdf->SetCompression(false); + } //$pdf->SetCompression(false); // Add all others - foreach ($files as $file) - { - if ($usestdout) print "Merge PDF file for invoice ".$file."\n"; - else dol_syslog("Merge PDF file for invoice ".$file); + foreach ($files as $file) { + if ($usestdout) { + print "Merge PDF file for invoice ".$file."\n"; + } else { + dol_syslog("Merge PDF file for invoice ".$file); + } // Charge un document PDF depuis un fichier. $pagecount = $pdf->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) - { + for ($i = 1; $i <= $pagecount; $i++) { $tplidx = $pdf->importPage($i); $s = $pdf->getTemplatesize($tplidx); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); @@ -242,27 +267,36 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte // Save merged file $filename = $fileprefix; - if (empty($filename)) $filename = 'mergedpdf'; - if (!empty($filesuffix)) $filename .= '_'.$filesuffix; + if (empty($filename)) { + $filename = 'mergedpdf'; + } + if (!empty($filesuffix)) { + $filename .= '_'.$filesuffix; + } $file = $diroutputpdf.'/'.$filename.'.pdf'; - if (!$error && $pagecount) - { + if (!$error && $pagecount) { $pdf->Output($file, 'F'); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } } - if ($usestdout) - { - if (!$error) print "Merged PDF has been built in ".$file."\n"; - else print "Can't build PDF ".$file."\n"; + if ($usestdout) { + if (!$error) { + print "Merged PDF has been built in ".$file."\n"; + } else { + print "Can't build PDF ".$file."\n"; + } } $result = 1; } else { - if ($usestdout) print "No invoices found for criteria.\n"; - else dol_syslog("No invoices found for criteria"); + if ($usestdout) { + print "No invoices found for criteria.\n"; + } else { + dol_syslog("No invoices found for criteria"); + } $result = 0; } } else { @@ -271,6 +305,9 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte $error++; } - if ($error) return -1; - else return $result; + if ($error) { + return -1; + } else { + return $result; + } } diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index cd48bbcb3c7..fe50503ed99 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -23,8 +23,7 @@ * \ingroup core */ -if (!function_exists('json_encode')) -{ +if (!function_exists('json_encode')) { /** * Implement json_encode for PHP that does not have module enabled. * @@ -50,26 +49,32 @@ function dol_json_encode($elements) dol_syslog("For better performance, enable the native json in your PHP", LOG_WARNING); $num = 0; - if (is_object($elements)) // Count number of properties for an object - { - foreach ($elements as $key => $value) $num++; + if (is_object($elements)) { // Count number of properties for an object + foreach ($elements as $key => $value) { + $num++; + } } else { $num = count($elements); } //var_dump($num); // determine type - if (is_numeric(key($elements)) && key($elements) == 0) - { + if (is_numeric(key($elements)) && key($elements) == 0) { // indexed (list) $keysofelements = array_keys($elements); // Elements array mus have key that does not start with 0 and end with num-1, so we will use this later. $output = '['; - for ($i = 0, $last = ($num - 1); $i < $num; $i++) - { - if (!isset($elements[$keysofelements[$i]])) continue; - if (is_array($elements[$keysofelements[$i]]) || is_object($elements[$keysofelements[$i]])) $output .= json_encode($elements[$keysofelements[$i]]); - else $output .= _val($elements[$keysofelements[$i]]); - if ($i !== $last) $output .= ','; + for ($i = 0, $last = ($num - 1); $i < $num; $i++) { + if (!isset($elements[$keysofelements[$i]])) { + continue; + } + if (is_array($elements[$keysofelements[$i]]) || is_object($elements[$keysofelements[$i]])) { + $output .= json_encode($elements[$keysofelements[$i]]); + } else { + $output .= _val($elements[$keysofelements[$i]]); + } + if ($i !== $last) { + $output .= ','; + } } $output .= ']'; } else { @@ -78,14 +83,22 @@ function dol_json_encode($elements) $last = $num - 1; $i = 0; $tmpelements = array(); - if (is_array($elements)) $tmpelements = $elements; - if (is_object($elements)) $tmpelements = get_object_vars($elements); - foreach ($tmpelements as $key => $value) - { + if (is_array($elements)) { + $tmpelements = $elements; + } + if (is_object($elements)) { + $tmpelements = get_object_vars($elements); + } + foreach ($tmpelements as $key => $value) { $output .= '"'.$key.'":'; - if (is_array($value)) $output .= json_encode($value); - else $output .= _val($value); - if ($i !== $last) $output .= ','; + if (is_array($value)) { + $output .= json_encode($value); + } else { + $output .= _val($value); + } + if ($i !== $last) { + $output .= ','; + } ++$i; } $output .= '}'; @@ -109,9 +122,9 @@ function _val($val) $strlen_var = strlen($val); /* - * Iterate over every character in the string, - * escaping with a slash or encoding to UTF-8 where necessary - */ + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ for ($c = 0; $c < $strlen_var; ++$c) { $ord_var_c = ord($val[$c]); @@ -192,14 +205,18 @@ function _val($val) } return '"'.$ascii.'"'; - } elseif (is_int($val)) return sprintf('%d', $val); - elseif (is_float($val)) return sprintf('%F', $val); - elseif (is_bool($val)) return ($val ? 'true' : 'false'); - else return 'null'; + } elseif (is_int($val)) { + return sprintf('%d', $val); + } elseif (is_float($val)) { + return sprintf('%F', $val); + } elseif (is_bool($val)) { + return ($val ? 'true' : 'false'); + } else { + return 'null'; + } } -if (!function_exists('json_decode')) -{ +if (!function_exists('json_decode')) { /** * Implement json_decode for PHP that does not support it * @@ -230,16 +247,23 @@ function dol_json_decode($json, $assoc = false) $out = ''; $strLength = strlen($json); // Must stay strlen and not dol_strlen because we want technical length, not visible length - for ($i = 0; $i < $strLength; $i++) - { - if (!$comment) - { - if (($json[$i] == '{') || ($json[$i] == '[')) $out .= 'array('; - elseif (($json[$i] == '}') || ($json[$i] == ']')) $out .= ')'; - elseif ($json[$i] == ':') $out .= ' => '; - else $out .= $json[$i]; - } else $out .= $json[$i]; - if ($json[$i] == '"' && $json[($i - 1)] != "\\") $comment = !$comment; + for ($i = 0; $i < $strLength; $i++) { + if (!$comment) { + if (($json[$i] == '{') || ($json[$i] == '[')) { + $out .= 'array('; + } elseif (($json[$i] == '}') || ($json[$i] == ']')) { + $out .= ')'; + } elseif ($json[$i] == ':') { + $out .= ' => '; + } else { + $out .= $json[$i]; + } + } else { + $out .= $json[$i]; + } + if ($json[$i] == '"' && $json[($i - 1)] != "\\") { + $comment = !$comment; + } } $out = _unval($out); @@ -256,17 +280,16 @@ function dol_json_decode($json, $assoc = false) } // Return an object - if (!$assoc) - { - if (!empty($array)) - { + if (!$assoc) { + if (!empty($array)) { $object = false; if (count($array) > 0) { $object = (object) array(); } - foreach ($array as $key => $value) - { - if ($key) $object->{$key} = $value; + foreach ($array as $key => $value) { + if ($key) { + $object->{$key} = $value; + } } return $object; @@ -287,8 +310,7 @@ function dol_json_decode($json, $assoc = false) function _unval($val) { $reg = array(); - while (preg_match('/\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg)) - { + while (preg_match('/\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg)) { // single, escaped unicode character $utf16 = chr(hexdec($reg[1])).chr(hexdec($reg[2])); $utf8 = utf162utf8($utf16); @@ -320,18 +342,18 @@ function utf162utf8($utf16) case ((0x7F & $bytes) == $bytes): // this case should never be reached, because we are in ASCII range // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr($bytes); + return chr($bytes); case (0x07FF & $bytes) == $bytes: // return a 2-byte UTF-8 character // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0xC0 | (($bytes >> 6) & 0x1F)) + return chr(0xC0 | (($bytes >> 6) & 0x1F)) . chr(0x80 | ($bytes & 0x3F)); case (0xFFFF & $bytes) == $bytes: // return a 3-byte UTF-8 character // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - return chr(0xE0 | (($bytes >> 12) & 0x0F)) + return chr(0xE0 | (($bytes >> 12) & 0x0F)) . chr(0x80 | (($bytes >> 6) & 0x3F)) . chr(0x80 | ($bytes & 0x3F)); } diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 640152d5999..9d6e0193108 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -43,40 +43,35 @@ function ldap_prepare_head() $head[$h][2] = 'ldap'; $h++; - if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE)) - { + if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE)) { $head[$h][0] = DOL_URL_ROOT."/admin/ldap_users.php"; $head[$h][1] = $langs->trans("LDAPUsersSynchro"); $head[$h][2] = 'users'; $h++; } - if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE)) - { + if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE)) { $head[$h][0] = DOL_URL_ROOT."/admin/ldap_groups.php"; $head[$h][1] = $langs->trans("LDAPGroupsSynchro"); $head[$h][2] = 'groups'; $h++; } - if (!empty($conf->societe->enabled) && !empty($conf->global->LDAP_CONTACT_ACTIVE)) - { + if (!empty($conf->societe->enabled) && !empty($conf->global->LDAP_CONTACT_ACTIVE)) { $head[$h][0] = DOL_URL_ROOT."/admin/ldap_contacts.php"; $head[$h][1] = $langs->trans("LDAPContactsSynchro"); $head[$h][2] = 'contacts'; $h++; } - if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_ACTIVE)) - { + if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_ACTIVE)) { $head[$h][0] = DOL_URL_ROOT."/admin/ldap_members.php"; $head[$h][1] = $langs->trans("LDAPMembersSynchro"); $head[$h][2] = 'members'; $h++; } - if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE)) - { + if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE)) { $head[$h][0] = DOL_URL_ROOT."/admin/ldap_members_types.php"; $head[$h][1] = $langs->trans("LDAPMembersTypesSynchro"); $head[$h][2] = 'memberstypes'; @@ -111,14 +106,11 @@ function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) //print 'key='.$key.' dn='.$dn.' objectclass='.$objectclass; print '
    '; - if (!function_exists("ldap_connect")) - { + if (!function_exists("ldap_connect")) { print ''.$butlabel.''; - } elseif (empty($conf->global->LDAP_SERVER_HOST)) - { + } elseif (empty($conf->global->LDAP_SERVER_HOST)) { print ''.$butlabel.''; - } elseif (empty($key) || empty($dn) || empty($objectclass)) - { + } elseif (empty($key) || empty($dn) || empty($objectclass)) { $langs->load("errors"); print ''.$butlabel.''; } else { @@ -144,39 +136,54 @@ function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = global $bc, $conf; $count--; - if ($count == 0) return -1; // To stop loop - if (!is_array($result)) return -1; + if ($count == 0) { + return -1; // To stop loop + } + if (!is_array($result)) { + return -1; + } - foreach ($result as $key => $val) - { - if ("$key" == "objectclass") continue; - if ("$key" == "count") continue; - if ("$key" == "dn") continue; - if ("$val" == "objectclass") continue; + foreach ($result as $key => $val) { + if ("$key" == "objectclass") { + continue; + } + if ("$key" == "count") { + continue; + } + if ("$key" == "dn") { + continue; + } + if ("$val" == "objectclass") { + continue; + } $lastkey[$level] = $key; - if (is_array($val)) - { + if (is_array($val)) { $hide = 0; - if (!is_numeric($key)) - { + if (!is_numeric($key)) { print ''; print ''; print $key; print ''; - if (strtolower($key) == 'userpassword') $hide = 1; + if (strtolower($key) == 'userpassword') { + $hide = 1; + } } show_ldap_content($val, $level + 1, $count, $var, $hide, $val["count"]); - } elseif ($subcount) - { + } elseif ($subcount) { $subcount--; $newstring = dol_htmlentitiesbr($val); - if ($hide) print preg_replace('/./i', '*', $newstring); - else print $newstring; + if ($hide) { + print preg_replace('/./i', '*', $newstring); + } else { + print $newstring; + } print '
    '; } - if ("$val" != $lastkey[$level] && !$subcount) print ''; + if ("$val" != $lastkey[$level] && !$subcount) { + print ''; + } } return 1; } diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index 3a34d3e57c4..4692c0b938b 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -60,7 +60,9 @@ function loan_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id; $head[$tab][1] = $langs->trans("Documents"); - if (($nbFiles + $nbLinks) > 0) $head[$tab][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$tab][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$tab][2] = 'documents'; $tab++; @@ -68,7 +70,9 @@ function loan_prepare_head($object) $nbNote = (empty($object->note_private) ? 0 : 1) + (empty($object->note_public) ? 0 : 1); $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; $head[$tab][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$tab][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$tab][1] .= ''.$nbNote.''; + } $head[$tab][2] = 'note'; $tab++; } @@ -86,20 +90,27 @@ function loan_prepare_head($object) /** * Calculate remaining loan mensuality and interests * - * @param int $mens Value of this mensuality (interests include, set 0 if we don't paid interests for this mensuality) - * @param float $capital Remaining capital for this mensuality - * @param float $rate Loan rate - * @param int $echance Actual loan term - * @param int $nbterm Total number of term for this loan - * @return array Array with remaining capital, interest, and mensuality for each remaining terms + * @param float $mens Value of this mensuality (interests include, set 0 if we don't paid interests for this mensuality) + * @param float $capital Remaining capital for this mensuality + * @param float $rate Loan rate + * @param int $numactualloadterm Actual loan term + * @param int $nbterm Total number of term for this loan + * @return array Array with remaining capital, interest, and mensuality for each remaining terms */ -function loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm) +function loanCalcMonthlyPayment($mens, $capital, $rate, $numactualloadterm, $nbterm) { global $conf, $db; require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; $object = new LoanSchedule($db); $output = array(); + // Sanitize data in case of + $mens = price2num($mens); + $capital = price2num($capital); + $rate = price2num($rate); + $numactualloadterm = ((int) $numactualloadterm); + $nbterm = ((int) $nbterm); + // If mensuality is 0 we don't pay interests and remaining capital not modified if ($mens == 0) { $int = 0; @@ -109,18 +120,18 @@ function loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm) $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); + $output[$numactualloadterm] = 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++; + $numactualloadterm++; $capital = $cap_rest; - while ($echance <= $nbterm) { - $mens = round($object->calcMonthlyPayments($capital, $rate, $nbterm - $echance + 1), 2, PHP_ROUND_HALF_UP); + while ($numactualloadterm <= $nbterm) { + $mens = round($object->calcMonthlyPayments($capital, $rate, $nbterm - $numactualloadterm + 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( + $output[$numactualloadterm] = array( 'cap_rest' => $cap_rest, 'cap_rest_str' => price($cap_rest, 0, '', 1, -1, -1, $conf->currency), 'interet' => $int, @@ -129,7 +140,7 @@ function loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm) ); $capital = $cap_rest; - $echance++; + $numactualloadterm++; } return $output; diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 50330686805..484f34c265c 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -43,8 +43,7 @@ function member_prepare_head(Adherent $object) $h++; if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_MEMBER_ACTIVE)) - && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) - { + && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT.'/adherents/ldap.php?id='.$object->id; @@ -53,13 +52,14 @@ function member_prepare_head(Adherent $object) $h++; } - if (!empty($user->rights->adherent->cotisation->lire)) - { + if (!empty($user->rights->adherent->cotisation->lire)) { $nbSubscription = is_array($object->subscriptions) ?count($object->subscriptions) : 0; $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id; $head[$h][1] = $langs->trans("Subscriptions"); $head[$h][2] = 'subscription'; - if ($nbSubscription > 0) $head[$h][1] .= ''.$nbSubscription.''; + if ($nbSubscription > 0) { + $head[$h][1] .= ''.$nbSubscription.''; + } $h++; } @@ -70,13 +70,21 @@ function member_prepare_head(Adherent $object) complete_head_from_modules($conf, $langs, $object, $head, $h, 'member'); $nbNote = 0; - if (!empty($object->note)) $nbNote++; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note)) { + $nbNote++; + } + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id; $head[$h][1] = $langs->trans("Note"); $head[$h][2] = 'note'; - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $h++; // Attachments @@ -87,17 +95,17 @@ function member_prepare_head(Adherent $object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'document'; $h++; // Show agenda tab - if (!empty($conf->agenda->enabled)) - { + if (!empty($conf->agenda->enabled)) { $head[$h][0] = DOL_URL_ROOT."/adherents/agenda.php?id=".$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))) - { + 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"); } @@ -129,8 +137,7 @@ function member_type_prepare_head(AdherentType $object) $h++; // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $head[$h][0] = DOL_URL_ROOT."/adherents/type_translation.php?rowid=".$object->id; $head[$h][1] = $langs->trans("Translation"); $head[$h][2] = 'translation'; @@ -138,8 +145,7 @@ function member_type_prepare_head(AdherentType $object) } if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE)) - && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) - { + && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) { $langs->load("ldap"); $head[$h][0] = DOL_URL_ROOT.'/adherents/type_ldap.php?rowid='.$object->id; @@ -171,12 +177,12 @@ function member_admin_prepare_head() $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member.php'; $head[$h][1] = $langs->trans("Miscellaneous"); $head[$h][2] = 'general'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_emails.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_emails.php'; $head[$h][1] = $langs->trans("EMails"); $head[$h][2] = 'emails'; $h++; @@ -187,12 +193,12 @@ function member_admin_prepare_head() // $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, 'member_admin'); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMember"); $head[$h][2] = 'attributes'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_type_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_type_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMemberType"); $head[$h][2] = 'attributes_type'; $h++; diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index 7b863391b24..1300c1b771f 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2021 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 @@ -23,11 +24,34 @@ global $shmkeys, $shmoffset; -$shmkeys = array('main'=>1, 'admin'=>2, 'dict'=>3, 'companies'=>4, 'suppliers'=>5, 'products'=>6, - 'commercial'=>7, 'compta'=>8, 'projects'=>9, 'cashdesk'=>10, 'agenda'=>11, 'bills'=>12, - 'propal'=>13, 'boxes'=>14, 'banks'=>15, 'other'=>16, 'errors'=>17, 'members'=>18, 'ecm'=>19, - 'orders'=>20, 'users'=>21, 'help'=>22, 'stocks'=>23, 'interventions'=>24, - 'donations'=>25, 'contracts'=>26); +$shmkeys = array( + 'main' => 1, + 'admin' => 2, + 'dict' => 3, + 'companies' => 4, + 'suppliers' => 5, + 'products' => 6, + 'commercial' => 7, + 'compta' => 8, + 'projects' => 9, + 'cashdesk' => 10, + 'agenda' => 11, + 'bills' => 12, + 'propal' => 13, + 'boxes' => 14, + 'banks' => 15, + 'other' => 16, + 'errors' => 17, + 'members' => 18, + 'ecm' => 19, + 'orders' => 20, + 'users' => 21, + 'help' => 22, + 'stocks' => 23, + 'interventions' => 24, + 'donations' => 25, + 'contracts' => 26, +); $shmoffset = 1000; // Max number of entries found into a language file. If too low, some entries will be overwritten. @@ -36,60 +60,66 @@ $shmoffset = 1000; // Max number of entries found into a language file. If too l * Save data into a memory area shared by all users, all sessions on server * * @param string $memoryid Memory id of shared area - * @param string $data Data to save - * @return int <0 if KO, Nb of bytes written if OK + * @param mixed $data Data to save. It must not be a null value. + * @param int $expire ttl in seconds, 0 never expire + * @return int <0 if KO, 0 if nothing is done, Nb of bytes written if OK + * @see dol_getcache() */ -function dol_setcache($memoryid, $data) +function dol_setcache($memoryid, $data, $expire = 0) { global $conf; $result = 0; - // Using a memcached server - if (!empty($conf->memcached->enabled) && class_exists('Memcached')) - { - global $dolmemcache; - if (empty($dolmemcache) || !is_object($dolmemcache)) - { - $dolmemcache = new Memcached(); - $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); - $result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); - if (!$result) return -1; - } + if (strpos($memoryid, 'count_') === 0) { // The memoryid key start with 'count_...' + if (empty($conf->global->MAIN_CACHE_COUNT)) { + return 0; + } + } - $memoryid = session_name().'_'.$memoryid; + if (!empty($conf->memcached->enabled) && class_exists('Memcached')) { + // Using a memcached server + global $dolmemcache; + if (empty($dolmemcache) || !is_object($dolmemcache)) { + $dolmemcache = new Memcached(); + $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); + $result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); + if (!$result) { + return -1; + } + } + + $memoryid = session_name() . '_' . $memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); - $dolmemcache->add($memoryid, $data); // This fails if key already exists + $dolmemcache->add($memoryid, $data, $expire); // This fails if key already exists $rescode = $dolmemcache->getResultCode(); - if ($rescode == 0) - { - return count($data); + if ($rescode == 0) { + return is_countable($data) ? count($data) : 0; } else { return -$rescode; } - } elseif (!empty($conf->memcached->enabled) && class_exists('Memcache')) - { + } elseif (!empty($conf->memcached->enabled) && class_exists('Memcache')) { // This is a really not reliable cache ! Use Memcached instead. + // Using a memcache server global $dolmemcache; - if (empty($dolmemcache) || !is_object($dolmemcache)) - { - $dolmemcache = new Memcache(); - $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); - $result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); - if (!$result) return -1; - } + if (empty($dolmemcache) || !is_object($dolmemcache)) { + $dolmemcache = new Memcache(); + $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); + $result = $dolmemcache->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); + if (!$result) { + return -1; + } + } - $memoryid = session_name().'_'.$memoryid; + $memoryid = session_name() . '_' . $memoryid; //$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false); - $result = $dolmemcache->add($memoryid, $data); // This fails if key already exists - if ($result) - { - return count($data); + $result = $dolmemcache->add($memoryid, $data, false, $expire); // This fails if key already exists + if ($result) { + return is_countable($data) ? count($data) : 0; } else { return -1; } - } // Using shmop - elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) - { - $result = dol_setshmop($memoryid, $data); + } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead. + // Using shmop + $result = dol_setshmop($memoryid, $data, $expire); } return $result; @@ -99,67 +129,73 @@ function dol_setcache($memoryid, $data) * Read a memory area shared by all users, all sessions on server * * @param string $memoryid Memory id of shared area - * @return int <0 if KO, data if OK + * @return int|mixed <0 if KO, data if OK, null if not found into cache or no caching feature enabled + * @see dol_setcache() */ function dol_getcache($memoryid) { global $conf; - // Using a memcached server - if (!empty($conf->memcached->enabled) && class_exists('Memcached')) - { - global $m; - if (empty($m) || !is_object($m)) - { - $m = new Memcached(); - $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); - $result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); - if (!$result) return -1; - } + if (strpos($memoryid, 'count_') === 0) { // The memoryid key start with 'count_...' + if (empty($conf->global->MAIN_CACHE_COUNT)) { + return null; + } + } - $memoryid = session_name().'_'.$memoryid; + // Using a memcached server + if (!empty($conf->memcached->enabled) && class_exists('Memcached')) { + global $m; + if (empty($m) || !is_object($m)) { + $m = new Memcached(); + $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); + $result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); + if (!$result) { + return -1; + } + } + + $memoryid = session_name() . '_' . $memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); //print "Get memoryid=".$memoryid; $data = $m->get($memoryid); $rescode = $m->getResultCode(); - //print "memoryid=".$memoryid." - rescode=".$rescode." - data=".count($data)."\n
    "; + //print "memoryid=".$memoryid." - rescode=".$rescode." - count(response)=".count($data)."\n
    "; //var_dump($data); - if ($rescode == 0) - { + if ($rescode == 0) { return $data; + } elseif ($rescode == 16) { // = Memcached::MEMCACHED_NOTFOUND but this constant doe snot exists. + return null; } else { return -$rescode; } - } elseif (!empty($conf->memcached->enabled) && class_exists('Memcache')) - { + } elseif (!empty($conf->memcached->enabled) && class_exists('Memcache')) { // This is a really not reliable cache ! Use Memcached instead. global $m; - if (empty($m) || !is_object($m)) - { - $m = new Memcache(); - $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); - $result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); - if (!$result) return -1; - } + if (empty($m) || !is_object($m)) { + $m = new Memcache(); + $tmparray = explode(':', $conf->global->MEMCACHED_SERVER); + $result = $m->addServer($tmparray[0], $tmparray[1] ? $tmparray[1] : 11211); + if (!$result) { + return -1; + } + } - $memoryid = session_name().'_'.$memoryid; + $memoryid = session_name() . '_' . $memoryid; //$m->setOption(Memcached::OPT_COMPRESSION, false); $data = $m->get($memoryid); //print "memoryid=".$memoryid." - rescode=".$rescode." - data=".count($data)."\n
    "; //var_dump($data); - if ($data) - { + if ($data) { return $data; } else { - return -1; + return null; // There is no way to make a difference between NOTFOUND and error when using Memcache. So do not use it, use Memcached instead. } - } // Using shmop - elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) - { + } elseif (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) { // This is a really not reliable cache ! Use Memcached instead. + // Using shmop $data = dol_getshmop($memoryid); return $data; } - return 0; + return null; } @@ -173,7 +209,9 @@ function dol_getcache($memoryid) function dol_getshmopaddress($memoryid) { global $shmkeys, $shmoffset; - if (empty($shmkeys[$memoryid])) return 0; + if (empty($shmkeys[$memoryid])) { // No room reserved for thid memoryid, no way to use cache + return 0; + } return $shmkeys[$memoryid] + $shmoffset; } @@ -187,10 +225,11 @@ function dol_listshmop() global $shmkeys, $shmoffset; $resarray = array(); - foreach ($shmkeys as $key => $val) - { + foreach ($shmkeys as $key => $val) { $result = dol_getshmop($key); - if (!is_numeric($result) || $result > 0) $resarray[$key] = $result; + if (!is_numeric($result) || $result > 0) { + $resarray[$key] = $result; + } } return $resarray; } @@ -199,32 +238,37 @@ function dol_listshmop() * Save data into a memory area shared by all users, all sessions on server * * @param int $memoryid Memory id of shared area ('main', 'agenda', ...) - * @param string $data Data to save - * @return int <0 if KO, Nb of bytes written if OK + * @param string $data Data to save. Must be a not null value. + * @param int $expire ttl in seconds, 0 never expire + * @return int <0 if KO, 0=Caching not available, Nb of bytes written if OK */ -function dol_setshmop($memoryid, $data) +function dol_setshmop($memoryid, $data, $expire) { global $shmkeys, $shmoffset; //print 'dol_setshmop memoryid='.$memoryid."
    \n"; - if (empty($shmkeys[$memoryid]) || !function_exists("shmop_write")) return 0; + if (empty($shmkeys[$memoryid]) || !function_exists("shmop_write")) { + return 0; + } $shmkey = dol_getshmopaddress($memoryid); + if (empty($shmkey)) { + return 0; // No key reserved for this memoryid, we can't cache this memoryid + } + $newdata = serialize($data); $size = strlen($newdata); //print 'dol_setshmop memoryid='.$memoryid." shmkey=".$shmkey." newdata=".$size."bytes
    \n"; $handle = shmop_open($shmkey, 'c', 0644, 6 + $size); - if ($handle) - { + if ($handle) { $shm_bytes_written1 = shmop_write($handle, str_pad($size, 6), 0); $shm_bytes_written2 = shmop_write($handle, $newdata, 6); - if (($shm_bytes_written1 + $shm_bytes_written2) != (6 + dol_strlen($newdata))) - { - print "Couldn't write the entire length of data\n"; + if (($shm_bytes_written1 + $shm_bytes_written2) != (6 + dol_strlen($newdata))) { + print "Couldn't write the entire length of data\n"; } shmop_close($handle); return ($shm_bytes_written1 + $shm_bytes_written2); } else { - print 'Error in shmop_open for memoryid='.$memoryid.' shmkey='.$shmkey.' 6+size=6+'.$size; + print 'Error in shmop_open for memoryid=' . $memoryid . ' shmkey=' . $shmkey . ' 6+size=6+' . $size; return -1; } } @@ -233,24 +277,34 @@ function dol_setshmop($memoryid, $data) * Read a memory area shared by all users, all sessions on server * * @param string $memoryid Memory id of shared area ('main', 'agenda', ...) - * @return int <0 if KO, data if OK + * @return int <0 if KO, data if OK, Null if no cache enabled or not found */ function dol_getshmop($memoryid) { global $shmkeys, $shmoffset; - if (empty($shmkeys[$memoryid]) || !function_exists("shmop_open")) return 0; + $data = null; + + if (empty($shmkeys[$memoryid]) || !function_exists("shmop_open")) { + return null; + } $shmkey = dol_getshmopaddress($memoryid); + if (empty($shmkey)) { + return null; // No key reserved for this memoryid, we can't cache this memoryid + } + //print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."
    \n"; $handle = @shmop_open($shmkey, 'a', 0, 0); - if ($handle) - { + if ($handle) { $size = trim(shmop_read($handle, 0, 6)); - if ($size) $data = unserialize(shmop_read($handle, 6, $size)); - else return -1; + if ($size) { + $data = unserialize(shmop_read($handle, 6, $size)); + } else { + return -1; + } shmop_close($handle); } else { - return -2; + return null; // Can't open existing block, so we suppose it was not created, so nothing were cached yet for the memoryid } return $data; } diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index f0da3bad3ea..27a4ea7a9ab 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -22,8 +22,6 @@ */ - - /** * Regenerate files .class.php * @@ -41,31 +39,30 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = { global $db, $langs; - if (empty($objectname)) return -1; - if (empty($readdir)) $readdir = $destdir; + if (empty($objectname)) { + return -1; + } + if (empty($readdir)) { + $readdir = $destdir; + } - if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) - { + if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) { dol_print_error('', 'Bad parameter addfieldentry with a property arrayofkeyval defined but that is not an array.'); return -1; } // Check parameters - if (is_array($addfieldentry) && count($addfieldentry) > 0) - { - if (empty($addfieldentry['name'])) - { + if (is_array($addfieldentry) && count($addfieldentry) > 0) { + if (empty($addfieldentry['name'])) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Name")), null, 'errors'); return -2; } - if (empty($addfieldentry['label'])) - { + if (empty($addfieldentry['label'])) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Label")), null, 'errors'); return -2; } if (!preg_match('/^(integer|price|sellist|varchar|double|text|html|duration)/', $addfieldentry['type']) - && !preg_match('/^(boolean|real|date|datetime|timestamp)$/', $addfieldentry['type'])) - { + && !preg_match('/^(boolean|real|date|datetime|timestamp)$/', $addfieldentry['type'])) { setEventMessages($langs->trans('BadValueForType', $objectname), null, 'errors'); return -2; } @@ -73,8 +70,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = $pathoffiletoeditsrc = $readdir.'/class/'.strtolower($objectname).'.class.php'; $pathoffiletoedittarget = $destdir.'/class/'.strtolower($objectname).'.class.php'.($readdir != $destdir ? '.new' : ''); - if (!dol_is_file($pathoffiletoeditsrc)) - { + if (!dol_is_file($pathoffiletoeditsrc)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFileNotFound", $pathoffiletoeditsrc), null, 'errors'); return -3; @@ -85,8 +81,11 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = try { include_once $pathoffiletoeditsrc; - if (class_exists($objectname)) $object = new $objectname($db); - else return -4; + if (class_exists($objectname)) { + $object = new $objectname($db); + } else { + return -4; + } // Backup old file dol_copy($pathoffiletoedittarget, $pathoffiletoedittarget.'.back', $newmask, 1); @@ -95,17 +94,14 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = $contentclass = file_get_contents(dol_osencode($pathoffiletoeditsrc), 'r'); // Update ->fields (add or remove entries) - if (count($object->fields)) - { - if (is_array($addfieldentry) && count($addfieldentry)) - { + if (count($object->fields)) { + if (is_array($addfieldentry) && count($addfieldentry)) { $name = $addfieldentry['name']; unset($addfieldentry['name']); $object->fields[$name] = $addfieldentry; } - if (!empty($delfieldentry)) - { + if (!empty($delfieldentry)) { $name = $delfieldentry; unset($object->fields[$name]); } @@ -120,40 +116,69 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = $texttoinsert .= "\t".' */'."\n"; $texttoinsert .= "\t".'public $fields=array('."\n"; - if (count($object->fields)) - { - foreach ($object->fields as $key => $val) - { + if (count($object->fields)) { + foreach ($object->fields as $key => $val) { $i++; - $texttoinsert .= "\t\t'".$key."' => array('type'=>'".$val['type']."', 'label'=>'".$val['label']."',"; + $texttoinsert .= "\t\t'".$key."' => array('type'=>'".$val['type']."',"; + $texttoinsert .= " 'label'=>'".$val['label']."',"; $texttoinsert .= " 'enabled'=>'".($val['enabled'] !== '' ? $val['enabled'] : 1)."',"; $texttoinsert .= " 'position'=>".($val['position'] !== '' ? $val['position'] : 50).","; $texttoinsert .= " 'notnull'=>".(empty($val['notnull']) ? 0 : $val['notnull']).","; $texttoinsert .= " 'visible'=>".($val['visible'] !== '' ? $val['visible'] : -1).","; - if ($val['noteditable']) $texttoinsert .= " 'noteditable'=>'".$val['noteditable']."',"; - if ($val['default'] || $val['default'] === '0') $texttoinsert .= " 'default'=>'".$val['default']."',"; - if ($val['index']) $texttoinsert .= " 'index'=>".$val['index'].","; - if ($val['foreignkey']) $texttoinsert .= " 'foreignkey'=>'".$val['foreignkey']."',"; - if ($val['searchall']) $texttoinsert .= " 'searchall'=>".$val['searchall'].","; - if ($val['isameasure']) $texttoinsert .= " 'isameasure'=>'".$val['isameasure']."',"; - if ($val['css']) $texttoinsert .= " 'css'=>'".$val['css']."',"; - if ($val['help']) $texttoinsert .= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\","; - if ($val['showoncombobox']) $texttoinsert .= " 'showoncombobox'=>'".$val['showoncombobox']."',"; - if ($val['disabled']) $texttoinsert .= " 'disabled'=>'".$val['disabled']."',"; - if ($val['autofocusoncreate']) $texttoinsert .= " 'autofocusoncreate'=>'".$val['autofocusoncreate']."',"; - if ($val['arrayofkeyval']) - { + if ($val['noteditable']) { + $texttoinsert .= " 'noteditable'=>'".$val['noteditable']."',"; + } + if ($val['default'] || $val['default'] === '0') { + $texttoinsert .= " 'default'=>'".$val['default']."',"; + } + if ($val['index']) { + $texttoinsert .= " 'index'=>".$val['index'].","; + } + if ($val['foreignkey']) { + $texttoinsert .= " 'foreignkey'=>'".$val['foreignkey']."',"; + } + if ($val['searchall']) { + $texttoinsert .= " 'searchall'=>".$val['searchall'].","; + } + if ($val['isameasure']) { + $texttoinsert .= " 'isameasure'=>'".$val['isameasure']."',"; + } + if ($val['css']) { + $texttoinsert .= " 'css'=>'".$val['css']."',"; + } + if ($val['cssview']) { + $texttoinsert .= " 'cssview'=>'".$val['cssview']."',"; + } + if ($val['csslist']) { + $texttoinsert .= " 'csslist'=>'".$val['csslist']."',"; + } + if ($val['help']) { + $texttoinsert .= " 'help'=>\"".preg_replace('/"/', '', $val['help'])."\","; + } + if ($val['showoncombobox']) { + $texttoinsert .= " 'showoncombobox'=>'".$val['showoncombobox']."',"; + } + if ($val['disabled']) { + $texttoinsert .= " 'disabled'=>'".$val['disabled']."',"; + } + if ($val['autofocusoncreate']) { + $texttoinsert .= " 'autofocusoncreate'=>'".$val['autofocusoncreate']."',"; + } + if ($val['arrayofkeyval']) { $texttoinsert .= " 'arrayofkeyval'=>array("; $i = 0; - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { - if ($i) $texttoinsert .= ", "; + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + if ($i) { + $texttoinsert .= ", "; + } $texttoinsert .= "'".$key2."'=>'".$val2."'"; $i++; } $texttoinsert .= "),"; } - if ($val['comment']) $texttoinsert .= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\""; + if ($val['comment']) { + $texttoinsert .= " 'comment'=>\"".preg_replace('/"/', '', $val['comment'])."\""; + } $texttoinsert .= "),\n"; } @@ -162,12 +187,10 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = $texttoinsert .= "\t".');'."\n"; //print ($texttoinsert);exit; - if (count($object->fields)) - { + if (count($object->fields)) { //$typetotypephp=array('integer'=>'integer', 'duration'=>'integer', 'varchar'=>'string'); - foreach ($object->fields as $key => $val) - { + foreach ($object->fields as $key => $val) { $i++; //$typephp=$typetotypephp[$val['type']]; $texttoinsert .= "\t".'public $'.$key.";"; @@ -192,8 +215,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = @chmod($pathoffiletoedittarget, octdec($newmask)); return $object; - } catch (Exception $e) - { + } catch (Exception $e) { print $e->getMessage(); return -5; } @@ -218,8 +240,12 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $error = 0; - if (empty($objectname)) return -1; - if (empty($readdir)) $readdir = $destdir; + if (empty($objectname)) { + return -1; + } + if (empty($readdir)) { + $readdir = $destdir; + } $pathoffiletoclasssrc = $readdir.'/class/'.strtolower($objectname).'.class.php'; @@ -232,8 +258,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $pathoffiletoedittarget = $destdir.'/sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql'.($readdir != $destdir ? '.new' : ''); } - if (!dol_is_file($pathoffiletoeditsrc)) - { + if (!dol_is_file($pathoffiletoeditsrc)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFileNotFound", $pathoffiletoeditsrc), null, 'errors'); return -1; @@ -241,14 +266,15 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' // Load object from myobject.class.php try { - if (!is_object($object)) - { + if (!is_object($object)) { include_once $pathoffiletoclasssrc; - if (class_exists($objectname)) $object = new $objectname($db); - else return -1; + if (class_exists($objectname)) { + $object = new $objectname($db); + } else { + return -1; + } } - } catch (Exception $e) - { + } catch (Exception $e) { print $e->getMessage(); } @@ -259,31 +285,41 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $i = 0; $texttoinsert = '-- BEGIN MODULEBUILDER FIELDS'."\n"; - if (count($object->fields)) - { - foreach ($object->fields as $key => $val) - { + if (count($object->fields)) { + foreach ($object->fields as $key => $val) { $i++; $type = $val['type']; $type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php' - if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database - elseif ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database - elseif (in_array($type, array('link', 'sellist', 'duration'))) $type = 'integer'; + if ($type == 'html') { + $type = 'text'; // html modulebuilder type is a text type in database + } elseif ($type == 'price') { + $type = 'double'; // html modulebuilder type is a text type in database + } elseif (in_array($type, array('link', 'sellist', 'duration'))) { + $type = 'integer'; + } $texttoinsert .= "\t".$key." ".$type; - if ($key == 'rowid') $texttoinsert .= ' AUTO_INCREMENT PRIMARY KEY'; - if ($key == 'entity') $texttoinsert .= ' DEFAULT 1'; - else { - if ($val['default'] != '') - { - if (preg_match('/^null$/i', $val['default'])) $texttoinsert .= " DEFAULT NULL"; - elseif (preg_match('/varchar/', $type)) $texttoinsert .= " DEFAULT '".$db->escape($val['default'])."'"; - else $texttoinsert .= (($val['default'] > 0) ? ' DEFAULT '.$val['default'] : ''); + if ($key == 'rowid') { + $texttoinsert .= ' AUTO_INCREMENT PRIMARY KEY'; + } + if ($key == 'entity') { + $texttoinsert .= ' DEFAULT 1'; + } else { + if ($val['default'] != '') { + if (preg_match('/^null$/i', $val['default'])) { + $texttoinsert .= " DEFAULT NULL"; + } elseif (preg_match('/varchar/', $type)) { + $texttoinsert .= " DEFAULT '".$db->escape($val['default'])."'"; + } else { + $texttoinsert .= (($val['default'] > 0) ? ' DEFAULT '.$val['default'] : ''); + } } } $texttoinsert .= (($val['notnull'] > 0) ? ' NOT NULL' : ''); - if ($i < count($object->fields)) $texttoinsert .= ", "; + if ($i < count($object->fields)) { + $texttoinsert .= ", "; + } $texttoinsert .= "\n"; } } @@ -292,8 +328,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $contentsql = preg_replace('/-- BEGIN MODULEBUILDER FIELDS.*END MODULEBUILDER FIELDS/ims', $texttoinsert, $contentsql); $result = file_put_contents($pathoffiletoedittarget, $contentsql); - if ($result) - { + if ($result) { @chmod($pathoffiletoedittarget, octdec($newmask)); } else { $error++; @@ -312,21 +347,16 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $i = 0; $texttoinsert = '-- BEGIN MODULEBUILDER INDEXES'."\n"; - if (count($object->fields)) - { - foreach ($object->fields as $key => $val) - { + if (count($object->fields)) { + foreach ($object->fields as $key => $val) { $i++; - if (!empty($val['index'])) - { + if (!empty($val['index'])) { $texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD INDEX idx_".strtolower($module).'_'.strtolower($objectname)."_".$key." (".$key.");"; $texttoinsert .= "\n"; } - if (!empty($val['foreignkey'])) - { + if (!empty($val['foreignkey'])) { $tmp = explode('.', $val['foreignkey']); - if (!empty($tmp[0]) && !empty($tmp[1])) - { + if (!empty($tmp[0]) && !empty($tmp[1])) { $texttoinsert .= "ALTER TABLE llx_".strtolower($module).'_'.strtolower($objectname)." ADD CONSTRAINT llx_".strtolower($module).'_'.strtolower($objectname)."_".$key." FOREIGN KEY (".$key.") REFERENCES llx_".preg_replace('/^llx_/', '', $tmp[0])."(".$tmp[1].");"; $texttoinsert .= "\n"; } @@ -340,8 +370,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' dol_mkdir(dirname($pathoffiletoedittarget)); $result2 = file_put_contents($pathoffiletoedittarget, $contentsql); - if ($result) - { + if ($result) { @chmod($pathoffiletoedittarget, octdec($newmask)); } else { $error++; diff --git a/htdocs/core/lib/multicurrency.lib.php b/htdocs/core/lib/multicurrency.lib.php index a3f7d56ec90..e77a9ee8081 100644 --- a/htdocs/core/lib/multicurrency.lib.php +++ b/htdocs/core/lib/multicurrency.lib.php @@ -65,8 +65,7 @@ function multicurrencyLimitPrepareHead($aCurrencies) $i = 0; $head = array(); - foreach ($aCurrencies as $currency) - { + foreach ($aCurrencies as $currency) { $head[$i][0] = $_SERVER['PHP_SELF'].'?currencycode='.$currency; $head[$i][1] = $langs->trans("Currency".$currency).' ('.$langs->getCurrencySymbol($currency).')'; $head[$i][2] = $currency; diff --git a/htdocs/core/lib/oauth.lib.php b/htdocs/core/lib/oauth.lib.php index a006aad8964..48356868143 100644 --- a/htdocs/core/lib/oauth.lib.php +++ b/htdocs/core/lib/oauth.lib.php @@ -27,8 +27,7 @@ $supportedoauth2array = array( 'OAUTH_GOOGLE_NAME'=>'google', ); -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { $supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = 'stripetest'; $supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = 'stripelive'; } diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 9bd92a2c79b..2bd8707f86b 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -34,43 +34,59 @@ function commande_prepare_head(Commande $object) { global $db, $langs, $conf, $user; - if (!empty($conf->expedition->enabled)) $langs->load("sendings"); + if (!empty($conf->expedition->enabled)) { + $langs->load("sendings"); + } $langs->load("orders"); $h = 0; $head = array(); - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) - { + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $head[$h][0] = DOL_URL_ROOT.'/commande/card.php?id='.$object->id; $head[$h][1] = $langs->trans("CustomerOrder"); $head[$h][2] = 'order'; $h++; } - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } if (($conf->expedition_bon->enabled && $user->rights->expedition->lire) - || ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire)) - { - $nbShipments = $object->getNbOfShipments(); $nbReceiption = 0; + || ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire)) { + $nbShipments = $object->getNbOfShipments(); + $nbReceiption = 0; $head[$h][0] = DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id; $text = ''; - if ($conf->expedition_bon->enabled) $text .= $langs->trans("Shipments"); - if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled) $text .= ' - '; - if ($conf->delivery_note->enabled) $text .= $langs->trans("Receivings"); - if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''.($nbShipments ? $nbShipments : 0); - if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - '; - if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0); - if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''; + if ($conf->expedition_bon->enabled) { + $text .= $langs->trans("Shipments"); + } + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled) { + $text .= ' - '; + } + if ($conf->delivery_note->enabled) { + $text .= $langs->trans("Receivings"); + } + if ($nbShipments > 0 || $nbReceiption > 0) { + $text .= ''.($nbShipments ? $nbShipments : 0); + } + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) { + $text .= ' - '; + } + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) { + $text .= ($nbReceiption ? $nbReceiption : 0); + } + if ($nbShipments > 0 || $nbReceiption > 0) { + $text .= ''; + } $head[$h][1] = $text; $head[$h][2] = 'shipping'; $h++; @@ -82,14 +98,19 @@ function commande_prepare_head(Commande $object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'order'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -101,7 +122,9 @@ function commande_prepare_head(Commande $object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/parsemd.lib.php b/htdocs/core/lib/parsemd.lib.php index ef0de8c1298..72903dd9e76 100644 --- a/htdocs/core/lib/parsemd.lib.php +++ b/htdocs/core/lib/parsemd.lib.php @@ -31,17 +31,14 @@ */ function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null) { - if (is_array($replaceimagepath)) - { - foreach ($replaceimagepath as $key => $val) - { + if (is_array($replaceimagepath)) { + foreach ($replaceimagepath as $key => $val) { $keytoreplace = ']('.$key; $valafter = ']('.$val; $content = preg_replace('/'.preg_quote($keytoreplace, '/').'/m', $valafter, $content); } } - if ($parser == 'parsedown') - { + if ($parser == 'parsedown') { include_once DOL_DOCUMENT_ROOT.'/includes/parsedown/Parsedown.php'; $Parsedown = new Parsedown(); $content = $Parsedown->text($content); @@ -63,10 +60,8 @@ function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null) */ function dolMd2Asciidoc($content, $parser = 'dolibarr', $replaceimagepath = null) { - if (is_array($replaceimagepath)) - { - foreach ($replaceimagepath as $key => $val) - { + if (is_array($replaceimagepath)) { + foreach ($replaceimagepath as $key => $val) { $keytoreplace = ']('.$key; $valafter = ']('.$val; $content = preg_replace('/'.preg_quote($keytoreplace, '/').'/m', $valafter, $content); diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 286243564f1..494a92d33e3 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -136,18 +136,15 @@ function getValidOnlinePaymentMethods($paymentmethod = '') $validpaymentmethod = array(); - if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) - { + if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { $langs->load("paypal"); $validpaymentmethod['paypal'] = 'valid'; } - if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) - { + if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { $langs->load("paybox"); $validpaymentmethod['paybox'] = 'valid'; } - if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) - { + if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { $langs->load("stripe"); $validpaymentmethod['stripe'] = 'valid'; } @@ -173,9 +170,10 @@ function showOnlinePaymentUrl($type, $ref) $servicename = $langs->transnoentitiesnoconv('Online'); - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
    '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'
    '; $url = getOnlinePaymentUrl(0, $type, $ref); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinepaymenturl", 0); return $out; } @@ -204,102 +202,143 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current $urltouse = DOL_MAIN_URL_ROOT; - if ($localorexternal) $urltouse = $urlwithroot; + if ($localorexternal) { + $urltouse = $urlwithroot; + } - if ($type == 'free') - { + if ($type == 'free') { $out = $urltouse.'/public/payment/newpayment.php?amount='.($mode ? '' : '').$amount.($mode ? '' : '').'&tag='.($mode ? '' : '').$freetag.($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else $out .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { + $out .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2)); + } } //if ($mode) $out.='&noidempotency=1'; - } elseif ($type == 'order') - { + } elseif ($type == 'order') { $out = $urltouse.'/public/payment/newpayment.php?source=order&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'order_ref'; - if ($mode == 0) $out .= urlencode($ref); + if ($mode == 1) { + $out .= 'order_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + if ($mode == 1) { + $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)"; + } + if ($mode == 0) { + $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + } $out .= ($mode ? '' : ''); } } - } elseif ($type == 'invoice') - { + } elseif ($type == 'invoice') { $out = $urltouse.'/public/payment/newpayment.php?source=invoice&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'invoice_ref'; - if ($mode == 0) $out .= urlencode($ref); + if ($mode == 1) { + $out .= 'invoice_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + if ($mode == 1) { + $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; + } + if ($mode == 0) { + $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + } $out .= ($mode ? '' : ''); } } - } elseif ($type == 'contractline') - { + } elseif ($type == 'contractline') { $out = $urltouse.'/public/payment/newpayment.php?source=contractline&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'contractline_ref'; - if ($mode == 0) $out .= urlencode($ref); + if ($mode == 1) { + $out .= 'contractline_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + if ($mode == 1) { + $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; + } + if ($mode == 0) { + $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + } $out .= ($mode ? '' : ''); } } } elseif ($type == 'member' || $type == 'membersubscription') { $newtype = 'member'; - $out = $urltouse.'/public/payment/newpayment.php?source='.$newtype.'&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'member_ref'; - if ($mode == 0) $out .= urlencode($ref); + $out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '' : ''); + if ($mode == 1) { + $out .= 'member_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2); + if ($mode == 1) { + $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$newtype."' + member_ref)"; + } + if ($mode == 0) { + $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$newtype.$ref, 2); + } $out .= ($mode ? '' : ''); } } } - if ($type == 'donation') - { + if ($type == 'donation') { $out = $urltouse.'/public/payment/newpayment.php?source=donation&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'donation_ref'; - if ($mode == 0) $out .= urlencode($ref); + if ($mode == 1) { + $out .= 'donation_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) - { - if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; - else { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $out .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN); + } else { $out .= '&securekey='.($mode ? '' : ''); - if ($mode == 1) $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)"; - if ($mode == 0) $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + if ($mode == 1) { + $out .= "hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)"; + } + if ($mode == 0) { + $out .= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$type.$ref, 2); + } $out .= ($mode ? '' : ''); } } } // For multicompany - if (!empty($out) && !empty($conf->multicompany->enabled)) $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities + if (!empty($out) && !empty($conf->multicompany->enabled)) { + $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities + } return $out; } @@ -322,78 +361,86 @@ function htmlPrintOnlinePaymentFooter($fromcompany, $langs, $addformmessage = 0, // Juridical status $line1 = ""; - if ($fromcompany->forme_juridique_code) - { + if ($fromcompany->forme_juridique_code) { $line1 .= ($line1 ? " - " : "").getFormeJuridiqueLabel($fromcompany->forme_juridique_code); } // Capital - if ($fromcompany->capital) - { + if ($fromcompany->capital) { $line1 .= ($line1 ? " - " : "").$langs->transnoentities("CapitalOf", $fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->currency); } // Prof Id 1 - if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) - { + if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) { $field = $langs->transcountrynoentities("ProfId1", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof1; } // Prof Id 2 - if ($fromcompany->idprof2) - { + if ($fromcompany->idprof2) { $field = $langs->transcountrynoentities("ProfId2", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof2; } // Second line of company infos $line2 = ""; // Prof Id 3 - if ($fromcompany->idprof3) - { + if ($fromcompany->idprof3) { $field = $langs->transcountrynoentities("ProfId3", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof3; } // Prof Id 4 - if ($fromcompany->idprof4) - { + if ($fromcompany->idprof4) { $field = $langs->transcountrynoentities("ProfId4", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof4; } // IntraCommunautary VAT - if ($fromcompany->tva_intra != '') - { + if ($fromcompany->tva_intra != '') { $line2 .= ($line2 ? " - " : "").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra; } print '
    '; print '
    '."\n"; - if ($addformmessage) - { + 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); + 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) - { + 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); + 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 ' - '; + 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 6e4cc60ce53..529355b94b2 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -49,10 +49,11 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') dol_syslog("pdf_getFormat Get paper format with mode=".$mode." MAIN_PDF_FORMAT=".(empty($conf->global->MAIN_PDF_FORMAT) ? 'null' : $conf->global->MAIN_PDF_FORMAT)." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null')); // Default value if setup was not done and/or entry into c_paper_format not defined - $width = 210; $height = 297; $unit = 'mm'; + $width = 210; + $height = 297; + $unit = 'mm'; - if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || $conf->global->MAIN_PDF_FORMAT == 'auto') - { + if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || $conf->global->MAIN_PDF_FORMAT == 'auto') { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $pdfformat = dol_getDefaultFormat($outputlangs); } else { @@ -62,11 +63,9 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') $sql = "SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format"; $sql .= " WHERE code = '".$db->escape($pdfformat)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $width = (int) $obj->width; $height = (int) $obj->height; $unit = $obj->unit; @@ -90,8 +89,7 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') global $conf; // Define constant for TCPDF - if (!defined('K_TCPDF_EXTERNAL_CONFIG')) - { + if (!defined('K_TCPDF_EXTERNAL_CONFIG')) { define('K_TCPDF_EXTERNAL_CONFIG', 1); // this avoid using tcpdf_config file define('K_PATH_CACHE', DOL_DATA_ROOT.'/admin/temp/'); define('K_PATH_URL_CACHE', DOL_DATA_ROOT.'/admin/temp/'); @@ -133,21 +131,27 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') require_once TCPDF_PATH.'tcpdf.php'; // We need to instantiate tcpdi object (instead of tcpdf) to use merging features. But we can disable it (this will break all merge features). - if (empty($conf->global->MAIN_DISABLE_TCPDI)) require_once TCPDI_PATH.'tcpdi.php'; + if (empty($conf->global->MAIN_DISABLE_TCPDI)) { + require_once TCPDI_PATH.'tcpdi.php'; + } //$arrayformat=pdf_getFormat(); //$format=array($arrayformat['width'],$arrayformat['height']); //$metric=$arrayformat['unit']; $pdfa = false; // PDF-1.3 - if (!empty($conf->global->PDF_USE_1A)) $pdfa = true; // PDF1/A + if (!empty($conf->global->PDF_USE_1A)) { + $pdfa = true; // PDF1/A + } - if (class_exists('TCPDI')) $pdf = new TCPDI($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); - else $pdf = new TCPDF($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); + if (class_exists('TCPDI')) { + $pdf = new TCPDI($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); + } else { + $pdf = new TCPDF($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); + } // Protection and encryption of pdf - if (!empty($conf->global->PDF_SECURITY_ENCRYPTION)) - { + if (!empty($conf->global->PDF_SECURITY_ENCRYPTION)) { /* Permission supported by TCPDF - print : Print the document; - modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble'; @@ -223,13 +227,13 @@ function pdf_getPDFFont($outputlangs) { global $conf; - if (!empty($conf->global->MAIN_PDF_FORCE_FONT)) return $conf->global->MAIN_PDF_FORCE_FONT; + if (!empty($conf->global->MAIN_PDF_FORCE_FONT)) { + return $conf->global->MAIN_PDF_FORCE_FONT; + } $font = 'Helvetica'; // By default, for FPDI, or ISO language on TCPDF - if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) - { - if ($outputlangs->trans('FONTFORPDF') != 'FONTFORPDF') - { + if (class_exists('TCPDF')) { // If TCPDF on, we can use an UTF8 one like DejaVuSans if required (slower) + if ($outputlangs->trans('FONTFORPDF') != 'FONTFORPDF') { $font = $outputlangs->trans('FONTFORPDF'); } } @@ -247,14 +251,14 @@ function pdf_getPDFFontSize($outputlangs) global $conf; $size = 10; // By default, for FPDI or ISO language on TCPDF - if (class_exists('TCPDF')) // If TCPDF on, we can use an UTF8 font like DejaVuSans if required (slower) - { - if ($outputlangs->trans('FONTSIZEFORPDF') != 'FONTSIZEFORPDF') - { + if (class_exists('TCPDF')) { // If TCPDF on, we can use an UTF8 font like DejaVuSans if required (slower) + if ($outputlangs->trans('FONTSIZEFORPDF') != 'FONTSIZEFORPDF') { $size = (int) $outputlangs->trans('FONTSIZEFORPDF'); } } - if (!empty($conf->global->MAIN_PDF_FORCE_FONT_SIZE)) $size = $conf->global->MAIN_PDF_FORCE_FONT_SIZE; + if (!empty($conf->global->MAIN_PDF_FORCE_FONT_SIZE)) { + $size = $conf->global->MAIN_PDF_FORCE_FONT_SIZE; + } return $size; } @@ -274,10 +278,11 @@ function pdf_getHeightForLogo($logo, $url = false) $maxwidth = 130; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp = dol_getImageSize($logo, $url); - if ($tmp['height']) - { + if ($tmp['height']) { $width = round($height * $tmp['width'] / $tmp['height']); - if ($width > $maxwidth) $height = $height * $maxwidth / $width; + if ($width > $maxwidth) { + $height = $height * $maxwidth / $width; + } } //print $tmp['width'].' '.$tmp['height'].' '.$width; exit; return $height; @@ -377,82 +382,103 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t { global $conf, $hookmanager; - if ($mode == 'source' && !is_object($sourcecompany)) return -1; - if ($mode == 'target' && !is_object($targetcompany)) return -1; + if ($mode == 'source' && !is_object($sourcecompany)) { + return -1; + } + if ($mode == 'target' && !is_object($targetcompany)) { + return -1; + } - if (!empty($sourcecompany->state_id) && empty($sourcecompany->state)) $sourcecompany->state = getState($sourcecompany->state_id); - if (!empty($targetcompany->state_id) && empty($targetcompany->state)) $targetcompany->state = getState($targetcompany->state_id); + if (!empty($sourcecompany->state_id) && empty($sourcecompany->state)) { + $sourcecompany->state = getState($sourcecompany->state_id); + } + if (!empty($targetcompany->state_id) && empty($targetcompany->state)) { + $targetcompany->state = getState($targetcompany->state_id); + } $reshook = 0; $stringaddress = ''; - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('sourcecompany' => &$sourcecompany, 'targetcompany' => &$targetcompany, 'targetcontact' => &$targetcontact, 'outputlangs' => $outputlangs, 'mode' => $mode, 'usecontact' => $usecontact); $action = ''; $reshook = $hookmanager->executeHooks('pdf_build_address', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $stringaddress .= $hookmanager->resPrint; } - if (empty($reshook)) - { - if ($mode == 'source') - { + if (empty($reshook)) { + if ($mode == 'source') { $withCountry = 0; - if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1; + if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { + $withCountry = 1; + } $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n"; - if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) - { + if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) { // Phone - if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("PhoneShort").": ".$outputlangs->convToOutputCharset($sourcecompany->phone); + if ($sourcecompany->phone) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("PhoneShort").": ".$outputlangs->convToOutputCharset($sourcecompany->phone); + } // Fax - if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? ($sourcecompany->phone ? " - " : "\n") : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax); + if ($sourcecompany->fax) { + $stringaddress .= ($stringaddress ? ($sourcecompany->phone ? " - " : "\n") : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax); + } // EMail - if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email); + if ($sourcecompany->email) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email); + } // Web - if ($sourcecompany->url) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($sourcecompany->url); + if ($sourcecompany->url) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($sourcecompany->url); + } } // Intra VAT - if (!empty($conf->global->MAIN_TVAINTRA_IN_SOURCE_ADDRESS)) - { - if ($sourcecompany->tva_intra) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($sourcecompany->tva_intra); + if (!empty($conf->global->MAIN_TVAINTRA_IN_SOURCE_ADDRESS)) { + if ($sourcecompany->tva_intra) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($sourcecompany->tva_intra); + } } // Professionnal Ids $reg = array(); - if (!empty($conf->global->MAIN_PROFID1_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof1)) - { + if (!empty($conf->global->MAIN_PROFID1_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof1)) { $tmp = $outputlangs->transcountrynoentities("ProfId1", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof1); } - if (!empty($conf->global->MAIN_PROFID2_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof2)) - { + if (!empty($conf->global->MAIN_PROFID2_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof2)) { $tmp = $outputlangs->transcountrynoentities("ProfId2", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof2); } - if (!empty($conf->global->MAIN_PROFID3_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof3)) - { + if (!empty($conf->global->MAIN_PROFID3_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof3)) { $tmp = $outputlangs->transcountrynoentities("ProfId3", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof3); } - if (!empty($conf->global->MAIN_PROFID4_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof4)) - { + if (!empty($conf->global->MAIN_PROFID4_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof4)) { $tmp = $outputlangs->transcountrynoentities("ProfId4", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof4); } - if (!empty($conf->global->MAIN_PROFID5_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof5)) - { + if (!empty($conf->global->MAIN_PROFID5_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof5)) { $tmp = $outputlangs->transcountrynoentities("ProfId5", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof5); } - if (!empty($conf->global->MAIN_PROFID6_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof6)) - { + if (!empty($conf->global->MAIN_PROFID6_IN_SOURCE_ADDRESS) && !empty($sourcecompany->idprof6)) { $tmp = $outputlangs->transcountrynoentities("ProfId6", $sourcecompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof6); } if (!empty($conf->global->PDF_ADD_MORE_AFTER_SOURCE_ADDRESS)) { @@ -460,10 +486,8 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t } } - if ($mode == 'target' || preg_match('/targetwithdetails/', $mode)) - { - if ($usecontact) - { + if ($mode == 'target' || preg_match('/targetwithdetails/', $mode)) { + if ($usecontact) { $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($targetcontact->getFullName($outputlangs, 1)); if (!empty($targetcontact->address)) { @@ -472,8 +496,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t $companytouseforaddress = $targetcompany; // Contact on a thirdparty that is a different thirdparty than the thirdparty of object - if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id) - { + if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id) { $targetcontact->fetch_thirdparty(); $companytouseforaddress = $targetcontact->thirdparty; } @@ -487,118 +510,142 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); } - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || preg_match('/targetwithdetails/', $mode)) - { + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || preg_match('/targetwithdetails/', $mode)) { // Phone - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_phone/', $mode)) - { - if (!empty($targetcontact->phone_pro) || !empty($targetcontact->phone_mobile)) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Phone").": "; - if (!empty($targetcontact->phone_pro)) $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_pro); - if (!empty($targetcontact->phone_pro) && !empty($targetcontact->phone_mobile)) $stringaddress .= " / "; - if (!empty($targetcontact->phone_mobile)) $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_mobile); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_phone/', $mode)) { + if (!empty($targetcontact->phone_pro) || !empty($targetcontact->phone_mobile)) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Phone").": "; + } + if (!empty($targetcontact->phone_pro)) { + $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_pro); + } + if (!empty($targetcontact->phone_pro) && !empty($targetcontact->phone_mobile)) { + $stringaddress .= " / "; + } + if (!empty($targetcontact->phone_mobile)) { + $stringaddress .= $outputlangs->convToOutputCharset($targetcontact->phone_mobile); + } } // Fax - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_fax/', $mode)) - { - if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_fax/', $mode)) { + if ($targetcontact->fax) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax); + } } // EMail - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_email/', $mode)) - { - if ($targetcontact->email) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcontact->email); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_email/', $mode)) { + if ($targetcontact->email) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcontact->email); + } } // Web - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_url/', $mode)) - { - if ($targetcontact->url) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcontact->url); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_url/', $mode)) { + if ($targetcontact->url) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcontact->url); + } } } } 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)); + if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); + } - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || preg_match('/targetwithdetails/', $mode)) - { + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || preg_match('/targetwithdetails/', $mode)) { // Phone - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_phone/', $mode)) - { - if (!empty($targetcompany->phone) || !empty($targetcompany->phone_mobile)) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Phone").": "; - if (!empty($targetcompany->phone)) $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone); - if (!empty($targetcompany->phone) && !empty($targetcompany->phone_mobile)) $stringaddress .= " / "; - if (!empty($targetcompany->phone_mobile)) $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone_mobile); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_phone/', $mode)) { + if (!empty($targetcompany->phone) || !empty($targetcompany->phone_mobile)) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Phone").": "; + } + if (!empty($targetcompany->phone)) { + $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone); + } + if (!empty($targetcompany->phone) && !empty($targetcompany->phone_mobile)) { + $stringaddress .= " / "; + } + if (!empty($targetcompany->phone_mobile)) { + $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone_mobile); + } } // Fax - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_fax/', $mode)) - { - if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_fax/', $mode)) { + if ($targetcompany->fax) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax); + } } // EMail - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_email/', $mode)) - { - if ($targetcompany->email) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcompany->email); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_email/', $mode)) { + if ($targetcompany->email) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($targetcompany->email); + } } // Web - if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_url/', $mode)) - { - if ($targetcompany->url) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcompany->url); + if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_url/', $mode)) { + if ($targetcompany->url) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcompany->url); + } } } } // Intra VAT - if (empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS)) - { - if ($targetcompany->tva_intra) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra); + if (empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS)) { + if ($targetcompany->tva_intra) { + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra); + } } // Professionnal Ids - if (!empty($conf->global->MAIN_PROFID1_IN_ADDRESS) && !empty($targetcompany->idprof1)) - { + if (!empty($conf->global->MAIN_PROFID1_IN_ADDRESS) && !empty($targetcompany->idprof1)) { $tmp = $outputlangs->transcountrynoentities("ProfId1", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof1); } - if (!empty($conf->global->MAIN_PROFID2_IN_ADDRESS) && !empty($targetcompany->idprof2)) - { + if (!empty($conf->global->MAIN_PROFID2_IN_ADDRESS) && !empty($targetcompany->idprof2)) { $tmp = $outputlangs->transcountrynoentities("ProfId2", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof2); } - if (!empty($conf->global->MAIN_PROFID3_IN_ADDRESS) && !empty($targetcompany->idprof3)) - { + if (!empty($conf->global->MAIN_PROFID3_IN_ADDRESS) && !empty($targetcompany->idprof3)) { $tmp = $outputlangs->transcountrynoentities("ProfId3", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof3); } - if (!empty($conf->global->MAIN_PROFID4_IN_ADDRESS) && !empty($targetcompany->idprof4)) - { + if (!empty($conf->global->MAIN_PROFID4_IN_ADDRESS) && !empty($targetcompany->idprof4)) { $tmp = $outputlangs->transcountrynoentities("ProfId4", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof4); } - if (!empty($conf->global->MAIN_PROFID5_IN_ADDRESS) && !empty($targetcompany->idprof5)) - { + if (!empty($conf->global->MAIN_PROFID5_IN_ADDRESS) && !empty($targetcompany->idprof5)) { $tmp = $outputlangs->transcountrynoentities("ProfId5", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof5); } - if (!empty($conf->global->MAIN_PROFID6_IN_ADDRESS) && !empty($targetcompany->idprof6)) - { + if (!empty($conf->global->MAIN_PROFID6_IN_ADDRESS) && !empty($targetcompany->idprof6)) { $tmp = $outputlangs->transcountrynoentities("ProfId6", $targetcompany->country_code); - if (preg_match('/\((.+)\)/', $tmp, $reg)) $tmp = $reg[1]; + if (preg_match('/\((.+)\)/', $tmp, $reg)) { + $tmp = $reg[1]; + } $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($targetcompany->idprof6); } // Public note - if (!empty($conf->global->MAIN_PUBLIC_NOTE_IN_ADDRESS)) - { - if ($mode == 'source' && !empty($sourcecompany->note_public)) - { + if (!empty($conf->global->MAIN_PUBLIC_NOTE_IN_ADDRESS)) { + if ($mode == 'source' && !empty($sourcecompany->note_public)) { $stringaddress .= ($stringaddress ? "\n" : '').dol_string_nohtmltag($sourcecompany->note_public); } - if (($mode == 'target' || preg_match('/targetwithdetails/', $mode)) && !empty($targetcompany->note_public)) - { + if (($mode == 'target' || preg_match('/targetwithdetails/', $mode)) && !empty($targetcompany->note_public)) { $stringaddress .= ($stringaddress ? "\n" : '').dol_string_nohtmltag($targetcompany->note_public); } } @@ -622,8 +669,7 @@ function pdf_pagehead(&$pdf, $outputlangs, $page_height) global $conf; // Add a background image on document - if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image - { + if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) { // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image $pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image $pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0), 0, $page_height); $pdf->SetAutoPageBreak(1, 0); // Restore pagebreak @@ -665,10 +711,15 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) global $langs, $mysoc, $user; // Print Draft Watermark - if ($unit == 'pt') $k = 1; - elseif ($unit == 'mm') $k = 72 / 25.4; - elseif ($unit == 'cm') $k = 72 / 2.54; - elseif ($unit == 'in') $k = 72; + if ($unit == 'pt') { + $k = 1; + } elseif ($unit == 'mm') { + $k = 72 / 25.4; + } elseif ($unit == 'cm') { + $k = 72 / 2.54; + } elseif ($unit == 'in') { + $k = 72; + } // Make substitution $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, null); @@ -676,7 +727,8 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) $text = make_substitutions($text, $substitutionarray, $outputlangs); $text = $outputlangs->convToOutputCharset($text); - $savx = $pdf->getX(); $savy = $pdf->getY(); + $savx = $pdf->getX(); + $savy = $pdf->getY(); $watermark_angle = atan($h / $w) / 2; $watermark_x_pos = 0; @@ -719,8 +771,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $diffsizecontent = (empty($conf->global->PDF_DIFFSIZE_CONTENT) ? 4 : $conf->global->PDF_DIFFSIZE_CONTENT); $pdf->SetXY($curx, $cury); - if (empty($onlynumber)) - { + if (empty($onlynumber)) { $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0); $cury += 4; @@ -730,36 +781,36 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, // Use correct name of bank id according to country $bickey = "BICNumber"; - if ($account->getCountryCode() == 'IN') $bickey = "SWIFT"; + if ($account->getCountryCode() == 'IN') { + $bickey = "SWIFT"; + } // Get format of bank account according to its country $usedetailedbban = $account->useDetailedBBAN(); //$onlynumber=0; $usedetailedbban=1; // For tests - if ($usedetailedbban) - { + if ($usedetailedbban) { $savcurx = $curx; - if (empty($onlynumber)) - { + if (empty($onlynumber)) { $pdf->SetFont('', '', $default_font_size - $diffsizecontent); $pdf->SetXY($curx, $cury); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': '.$outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); $cury += 3; } - if (empty($conf->global->PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN)) // Note that some countries still need bank number, BIC/IBAN not enougth for them - { + if (empty($conf->global->PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN)) { // Note that some countries still need bank number, BIC/IBAN not enougth for them // Note: // bank = code_banque (FR), sort code (GB, IR. Example: 12-34-56) // desk = code guichet (FR), used only when $usedetailedbban = 1 // number = account number // key = check control key used only when $usedetailedbban = 1 - if (empty($onlynumber)) $pdf->line($curx + 1, $cury + 1, $curx + 1, $cury + 6); + if (empty($onlynumber)) { + $pdf->line($curx + 1, $cury + 1, $curx + 1, $cury + 6); + } - foreach ($account->getFieldsToShow() as $val) - { + foreach ($account->getFieldsToShow() as $val) { $pdf->SetXY($curx, $cury + 4); $pdf->SetFont('', '', $default_font_size - 3); @@ -812,7 +863,9 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $pdf->MultiCell(100, 3, $outputlangs->transnoentities("BankAccountNumber").': '.$outputlangs->convToOutputCharset($account->number), 0, 'L', 0); $cury += 3; - if ($diffsizecontent <= 2) $cury += 1; + if ($diffsizecontent <= 2) { + $cury += 1; + } } $pdf->SetFont('', '', $default_font_size - $diffsizecontent); @@ -840,17 +893,17 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, // Use correct name of bank id according to country $ibankey = FormBank::getIBANLabel($account); - if (!empty($account->iban)) - { + if (!empty($account->iban)) { //Remove whitespaces to ensure we are dealing with the format we expect $ibanDisplay_temp = str_replace(' ', '', $outputlangs->convToOutputCharset($account->iban)); $ibanDisplay = ""; $nbIbanDisplay_temp = dol_strlen($ibanDisplay_temp); - for ($i = 0; $i < $nbIbanDisplay_temp; $i++) - { + for ($i = 0; $i < $nbIbanDisplay_temp; $i++) { $ibanDisplay .= $ibanDisplay_temp[$i]; - if ($i % 4 == 3 && $i > 0) $ibanDisplay .= " "; + if ($i % 4 == 3 && $i > 0) { + $ibanDisplay .= " "; + } } $pdf->SetFont('', 'B', $default_font_size - 3); @@ -859,8 +912,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $cury += 3; } - if (!empty($account->bic)) - { + if (!empty($account->bic)) { $pdf->SetFont('', 'B', $default_font_size - 3); $pdf->SetXY($curx, $cury); $pdf->MultiCell(100, 3, $outputlangs->transnoentities($bickey).': '.$outputlangs->convToOutputCharset($account->bic), 0, 'L', 0); @@ -894,8 +946,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $dims = $pdf->getPageDimensions(); // Line of free text - if (empty($hidefreetext) && !empty($conf->global->$paramfreetext)) - { + if (empty($hidefreetext) && !empty($conf->global->$paramfreetext)) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); // More substitution keys $substitutionarray['__FROM_NAME__'] = $fromcompany->name; @@ -913,126 +964,123 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ } // First line of company infos - $line1 = ""; $line2 = ""; $line3 = ""; $line4 = ""; + $line1 = ""; + $line2 = ""; + $line3 = ""; + $line4 = ""; - if ($showdetails == 1 || $showdetails == 3) - { + if ($showdetails == 1 || $showdetails == 3) { // Company name - if ($fromcompany->name) - { + if ($fromcompany->name) { $line1 .= ($line1 ? " - " : "").$outputlangs->transnoentities("RegisteredOffice").": ".$fromcompany->name; } // Address - if ($fromcompany->address) - { + if ($fromcompany->address) { $line1 .= ($line1 ? " - " : "").str_replace("\n", ", ", $fromcompany->address); } // Zip code - if ($fromcompany->zip) - { + if ($fromcompany->zip) { $line1 .= ($line1 ? " - " : "").$fromcompany->zip; } // Town - if ($fromcompany->town) - { + if ($fromcompany->town) { $line1 .= ($line1 ? " " : "").$fromcompany->town; } // Country - if ($fromcompany->country) - { + if ($fromcompany->country) { $line1 .= ($line1 ? ", " : "").$fromcompany->country; } // Phone - if ($fromcompany->phone) - { + if ($fromcompany->phone) { $line2 .= ($line2 ? " - " : "").$outputlangs->transnoentities("Phone").": ".$fromcompany->phone; } // Fax - if ($fromcompany->fax) - { + if ($fromcompany->fax) { $line2 .= ($line2 ? " - " : "").$outputlangs->transnoentities("Fax").": ".$fromcompany->fax; } // URL - if ($fromcompany->url) - { + if ($fromcompany->url) { $line2 .= ($line2 ? " - " : "").$fromcompany->url; } // Email - if ($fromcompany->email) - { + if ($fromcompany->email) { $line2 .= ($line2 ? " - " : "").$fromcompany->email; } } - if ($showdetails == 2 || $showdetails == 3 || ($fromcompany->country_code == 'DE')) - { + if ($showdetails == 2 || $showdetails == 3 || ($fromcompany->country_code == 'DE')) { // Managers - if ($fromcompany->managers) - { + if ($fromcompany->managers) { $line2 .= ($line2 ? " - " : "").$fromcompany->managers; } } // Line 3 of company infos // Juridical status - if ($fromcompany->forme_juridique_code) - { + if ($fromcompany->forme_juridique_code) { $line3 .= ($line3 ? " - " : "").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); } // Capital - if ($fromcompany->capital) - { + if ($fromcompany->capital) { $tmpamounttoshow = price2num($fromcompany->capital); // This field is a free string - if (is_numeric($tmpamounttoshow) && $tmpamounttoshow > 0) $line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", price($tmpamounttoshow, 0, $outputlangs, 0, 0, 0, $conf->currency)); - else $line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", $tmpamounttoshow, $outputlangs); + if (is_numeric($tmpamounttoshow) && $tmpamounttoshow > 0) { + $line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", price($tmpamounttoshow, 0, $outputlangs, 0, 0, 0, $conf->currency)); + } else { + $line3 .= ($line3 ? " - " : "").$outputlangs->transnoentities("CapitalOf", $tmpamounttoshow, $outputlangs); + } } // Prof Id 1 - if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) - { + if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) { $field = $outputlangs->transcountrynoentities("ProfId1", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line3 .= ($line3 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1); } // Prof Id 2 - if ($fromcompany->idprof2) - { + if ($fromcompany->idprof2) { $field = $outputlangs->transcountrynoentities("ProfId2", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line3 .= ($line3 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2); } // Line 4 of company infos // Prof Id 3 - if ($fromcompany->idprof3) - { + if ($fromcompany->idprof3) { $field = $outputlangs->transcountrynoentities("ProfId3", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3); } // Prof Id 4 - if ($fromcompany->idprof4) - { + if ($fromcompany->idprof4) { $field = $outputlangs->transcountrynoentities("ProfId4", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4); } // Prof Id 5 - if ($fromcompany->idprof5) - { + if ($fromcompany->idprof5) { $field = $outputlangs->transcountrynoentities("ProfId5", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof5); } // Prof Id 6 - if ($fromcompany->idprof6) - { + if ($fromcompany->idprof6) { $field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof6); } // IntraCommunautary VAT - if ($fromcompany->tva_intra != '') - { + if ($fromcompany->tva_intra != '') { $line4 .= ($line4 ? " - " : "").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra); } @@ -1041,14 +1089,14 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ // The start of the bottom of this page footer is positioned according to # of lines $freetextheight = 0; - if ($line) // Free text - { + if ($line) { // Free text //$line="sample text
    \nfdsfsdf
    \nghfghg
    "; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) - { - $width = 20000; $align = 'L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. + if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { + $width = 20000; + $align = 'L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. if (!empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) { - $width = 200; $align = 'C'; + $width = 200; + $align = 'C'; } $freetextheight = $pdf->getStringHeight($width, $line); } else { @@ -1060,11 +1108,9 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $marginwithfooter = $marge_basse + $freetextheight + (!empty($line1) ? 3 : 0) + (!empty($line2) ? 3 : 0) + (!empty($line3) ? 3 : 0) + (!empty($line4) ? 3 : 0); $posy = $marginwithfooter + 0; - if ($line) // Free text - { + if ($line) { // Free text $pdf->SetXY($dims['lm'], -$posy); - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) // by default - { + if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { // by default $pdf->MultiCell(0, 3, $line, 0, $align, 0); } 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)); @@ -1076,8 +1122,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $pdf->line($dims['lm'], $dims['hk'] - $posy, $dims['wk'] - $dims['rm'], $dims['hk'] - $posy); $posy--; - if (!empty($line1)) - { + if (!empty($line1)) { $pdf->SetFont('', 'B', 7); $pdf->SetXY($dims['lm'], -$posy); $pdf->MultiCell($dims['wk'] - $dims['rm'] - $dims['lm'], 2, $line1, 0, 'C', 0); @@ -1085,8 +1130,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $pdf->SetFont('', '', 7); } - if (!empty($line2)) - { + if (!empty($line2)) { $pdf->SetFont('', 'B', 7); $pdf->SetXY($dims['lm'], -$posy); $pdf->MultiCell($dims['wk'] - $dims['rm'] - $dims['lm'], 2, $line2, 0, 'C', 0); @@ -1094,22 +1138,19 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $pdf->SetFont('', '', 7); } - if (!empty($line3)) - { + if (!empty($line3)) { $pdf->SetXY($dims['lm'], -$posy); $pdf->MultiCell($dims['wk'] - $dims['rm'] - $dims['lm'], 2, $line3, 0, 'C', 0); } - if (!empty($line4)) - { + if (!empty($line4)) { $posy -= 3; $pdf->SetXY($dims['lm'], -$posy); $pdf->MultiCell($dims['wk'] - $dims['rm'] - $dims['lm'], 2, $line4, 0, 'C', 0); } // Show page nb only on iso languages (so default Helvetica font) - if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') - { + if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { $pdf->SetXY($dims['wk'] - $dims['rm'] - 15, -$posy); //print 'xxx'.$pdf->PageNo().'-'.$pdf->getAliasNbPages().'-'.$pdf->getAliasNumPage();exit; $pdf->MultiCell(15, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0); @@ -1135,13 +1176,10 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ function pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size) { $linkedobjects = pdf_getLinkedObjects($object, $outputlangs); - if (!empty($linkedobjects)) - { - foreach ($linkedobjects as $linkedobject) - { + if (!empty($linkedobjects)) { + foreach ($linkedobjects as $linkedobject) { $reftoshow = $linkedobject["ref_title"].' : '.$linkedobject["ref_value"]; - if (!empty($linkedobject["date_value"])) - { + if (!empty($linkedobject["date_value"])) { $reftoshow .= ' / '.$linkedobject["date_value"]; } @@ -1178,18 +1216,20 @@ function pdf_writelinedesc(&$pdf, $object, $i, $outputlangs, $w, $h, $posx, $pos $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $special_code = empty($object->lines[$i]->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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('pdf'=>$pdf, 'i'=>$i, 'outputlangs'=>$outputlangs, 'w'=>$w, 'h'=>$h, 'posx'=>$posx, 'posy'=>$posy, 'hideref'=>$hideref, 'hidedesc'=>$hidedesc, 'issupplierline'=>$issupplierline, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_writelinedesc', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { + if (empty($reshook)) { $labelproductservice = pdf_getlinedesc($object, $i, $outputlangs, $hideref, $hidedesc, $issupplierline); //var_dump($labelproductservice);exit; @@ -1229,21 +1269,22 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $note = (!empty($object->lines[$i]->note) ? $object->lines[$i]->note : ''); $dbatch = (!empty($object->lines[$i]->detail_batch) ? $object->lines[$i]->detail_batch : false); - if ($issupplierline) - { + if ($issupplierline) { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $prodser = new ProductFournisseur($db); } else { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $prodser = new Product($db); + + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + include_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; + } } - if ($idprod) - { + if ($idprod) { $prodser->fetch($idprod); // If a predefined product and multilang and on other lang, we renamed label with label translated - if (!empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang)) { $translatealsoifmodified = (!empty($conf->global->MAIN_MULTILANG_TRANSLATE_EVEN_IF_MODIFIED)); // By default if value was modified manually, we keep it (no translation because we don't have it) // TODO Instead of making a compare to see if param was modified, check that content contains reference translation. If yes, add the added part to the new translation @@ -1265,11 +1306,15 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, } else { $textwasmodified = ($desc == $prodser->description); } - if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($textwasmodified || $translatealsoifmodified)) $desc = $prodser->multilangs[$outputlangs->defaultlang]["description"]; + if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($textwasmodified || $translatealsoifmodified)) { + $desc = $prodser->multilangs[$outputlangs->defaultlang]["description"]; + } // Set note $textwasmodified = ($note == $prodser->note); - if (!empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note = $prodser->multilangs[$outputlangs->defaultlang]["note"]; + if (!empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) { + $note = $prodser->multilangs[$outputlangs->defaultlang]["note"]; + } } } elseif ($object->element == 'facture' || $object->element == 'facturefourn') { if ($object->type == $object::TYPE_DEPOSIT) { @@ -1295,34 +1340,30 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, } // Description long of product line - if (!empty($desc) && ($desc != $label)) - { - if ($libelleproduitservice && empty($hidedesc)) - { + if (!empty($desc) && ($desc != $label)) { + if ($libelleproduitservice && empty($hidedesc)) { $libelleproduitservice .= '__N__'; } - if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) - { + if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) { $discount = new DiscountAbsolute($db); $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); $sourceref = !empty($discount->discount_type) ? $discount->ref_invoive_supplier_source : $discount->ref_facture_source; $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) - { + 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) { $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); @@ -1367,7 +1408,9 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, if ($issupplierline) { if (empty($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES)) { // Common case $ref_prodserv = $prodser->ref; // Show local ref - if ($ref_supplier) $ref_prodserv .= ($prodser->ref ? ' (' : '').$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.($prodser->ref ? ')' : ''); + if ($ref_supplier) { + $ref_prodserv .= ($prodser->ref ? ' (' : '').$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.($prodser->ref ? ')' : ''); + } } elseif ($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES == 1) { $ref_prodserv = $ref_supplier; } elseif ($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES == 2) { @@ -1375,45 +1418,70 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, } } else { $ref_prodserv = $prodser->ref; // Show local ref only + + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $productCustomerPriceStatic = new Productcustomerprice($db); + $filter = array('fk_product' => $idprod, 'fk_soc' => $object->socid); + + $nbCustomerPrices = $productCustomerPriceStatic->fetch_all('', '', 1, 0, $filter); + + if ($nbCustomerPrices > 0) { + $productCustomerPrice = $productCustomerPriceStatic->lines[0]; + + if (! empty($productCustomerPrice->ref_customer)) { + switch ($conf->global->PRODUIT_CUSTOMER_PRICES_PDF_REF_MODE) { + case 1: + $ref_prodserv = $productCustomerPrice->ref_customer; + break; + + case 2: + $ref_prodserv = $productCustomerPrice->ref_customer . ' (' . $outputlangs->transnoentitiesnoconv('InternalRef') . ' ' . $ref_prodserv . ')'; + break; + + default: + $ref_prodserv = $ref_prodserv . ' (' . $outputlangs->transnoentitiesnoconv('RefCustomer') . ' ' . $productCustomerPrice->ref_customer . ')'; + } + } + } + } } - if (!empty($libelleproduitservice) && !empty($ref_prodserv)) $ref_prodserv .= " - "; + if (!empty($libelleproduitservice) && !empty($ref_prodserv)) { + $ref_prodserv .= " - "; + } } - if (!empty($ref_prodserv) && !empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) { $ref_prodserv = ''.$ref_prodserv.''; } + if (!empty($ref_prodserv) && !empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) { + $ref_prodserv = ''.$ref_prodserv.''; + } $libelleproduitservice = $prefix_prodserv.$ref_prodserv.$libelleproduitservice; // Add an additional description for the category products - if (!empty($conf->global->CATEGORY_ADD_DESC_INTO_DOC) && $idprod && !empty($conf->categorie->enabled)) - { + if (!empty($conf->global->CATEGORY_ADD_DESC_INTO_DOC) && $idprod && !empty($conf->categorie->enabled)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $categstatic = new Categorie($db); // recovering the list of all the categories linked to product $tblcateg = $categstatic->containing($idprod, Categorie::TYPE_PRODUCT); - foreach ($tblcateg as $cate) - { + foreach ($tblcateg as $cate) { // Adding the descriptions if they are filled $desccateg = $cate->description; - if ($desccateg) + if ($desccateg) { $libelleproduitservice .= '__N__'.$desccateg; + } } } - if (!empty($object->lines[$i]->date_start) || !empty($object->lines[$i]->date_end)) - { + if (!empty($object->lines[$i]->date_start) || !empty($object->lines[$i]->date_end)) { $format = 'day'; $period = ''; // Show duration if exists - if ($object->lines[$i]->date_start && $object->lines[$i]->date_end) - { + if ($object->lines[$i]->date_start && $object->lines[$i]->date_end) { $period = '('.$outputlangs->transnoentitiesnoconv('DateFromTo', dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs), dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; } - if ($object->lines[$i]->date_start && !$object->lines[$i]->date_end) - { + if ($object->lines[$i]->date_start && !$object->lines[$i]->date_end) { $period = '('.$outputlangs->transnoentitiesnoconv('DateFrom', dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs)).')'; } - if (!$object->lines[$i]->date_start && $object->lines[$i]->date_end) - { + if (!$object->lines[$i]->date_start && $object->lines[$i]->date_end) { $period = '('.$outputlangs->transnoentitiesnoconv('DateUntil', dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; } //print '>'.$outputlangs->charset_output.','.$period; @@ -1425,23 +1493,30 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, //print $libelleproduitservice; } - if ($dbatch) - { + if ($dbatch) { $format = 'day'; - foreach ($dbatch as $detail) - { + foreach ($dbatch as $detail) { $dte = array(); - if ($detail->eatby) $dte[] = $outputlangs->transnoentitiesnoconv('printEatby', dol_print_date($detail->eatby, $format, false, $outputlangs)); - if ($detail->sellby) $dte[] = $outputlangs->transnoentitiesnoconv('printSellby', dol_print_date($detail->sellby, $format, false, $outputlangs)); - if ($detail->batch) $dte[] = $outputlangs->transnoentitiesnoconv('printBatch', $detail->batch); + if ($detail->eatby) { + $dte[] = $outputlangs->transnoentitiesnoconv('printEatby', dol_print_date($detail->eatby, $format, false, $outputlangs)); + } + if ($detail->sellby) { + $dte[] = $outputlangs->transnoentitiesnoconv('printSellby', dol_print_date($detail->sellby, $format, false, $outputlangs)); + } + if ($detail->batch) { + $dte[] = $outputlangs->transnoentitiesnoconv('printBatch', $detail->batch); + } $dte[] = $outputlangs->transnoentitiesnoconv('printQty', $detail->qty); $libelleproduitservice .= "__N__ ".implode(" - ", $dte); } } // Now we convert \n into br - if (dol_textishtml($libelleproduitservice)) $libelleproduitservice = preg_replace('/__N__/', '
    ', $libelleproduitservice); - else $libelleproduitservice = preg_replace('/__N__/', "\n", $libelleproduitservice); + if (dol_textishtml($libelleproduitservice)) { + $libelleproduitservice = preg_replace('/__N__/', '
    ', $libelleproduitservice); + } else { + $libelleproduitservice = preg_replace('/__N__/', "\n", $libelleproduitservice); + } $libelleproduitservice = dol_htmlentitiesbr($libelleproduitservice, 1); return $libelleproduitservice; @@ -1463,17 +1538,17 @@ function pdf_getlinenum($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlinenum', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $result .= $hookmanager->resPrint; } - if (empty($reshook)) - { + if (empty($reshook)) { $result .= dol_htmlentitiesbr($object->lines[$i]->num); } return $result; @@ -1496,17 +1571,17 @@ function pdf_getlineref($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineref', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $result .= $hookmanager->resPrint; } - if (empty($reshook)) - { + if (empty($reshook)) { $result .= dol_htmlentitiesbr($object->lines[$i]->product_ref); } return $result; @@ -1528,17 +1603,17 @@ function pdf_getlineref_supplier($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineref_supplier', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $result .= $hookmanager->resPrint; } - if (empty($reshook)) - { + if (empty($reshook)) { $result .= dol_htmlentitiesbr($object->lines[$i]->ref_supplier); } return $result; @@ -1560,38 +1635,41 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0) $result = ''; $reshook = 0; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduce this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduce this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlinevatrate', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if (empty($hidedetails) || $hidedetails > 1) - { + if (empty($reshook)) { + if (empty($hidedetails) || $hidedetails > 1) { $tmpresult = ''; $tmpresult .= vatrate($object->lines[$i]->tva_tx, 0, $object->lines[$i]->info_bits, -1); - if (empty($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX)) - { - if ($object->lines[$i]->total_localtax1 != 0) - { - if (preg_replace('/[\s0%]/', '', $tmpresult)) $tmpresult .= '/'; - else $tmpresult = ''; + if (empty($conf->global->MAIN_PDF_MAIN_HIDE_SECOND_TAX)) { + if ($object->lines[$i]->total_localtax1 != 0) { + if (preg_replace('/[\s0%]/', '', $tmpresult)) { + $tmpresult .= '/'; + } else { + $tmpresult = ''; + } $tmpresult .= vatrate(abs($object->lines[$i]->localtax1_tx), 0); } } - if (empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) - { - if ($object->lines[$i]->total_localtax2 != 0) - { - if (preg_replace('/[\s0%]/', '', $tmpresult)) $tmpresult .= '/'; - else $tmpresult = ''; + if (empty($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX)) { + if ($object->lines[$i]->total_localtax2 != 0) { + if (preg_replace('/[\s0%]/', '', $tmpresult)) { + $tmpresult .= '/'; + } else { + $tmpresult = ''; + } $tmpresult .= vatrate(abs($object->lines[$i]->localtax2_tx), 0); } } @@ -1617,25 +1695,28 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0) global $conf, $hookmanager; $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $result = ''; $reshook = 0; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineupexcltax', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if (empty($hidedetails) || $hidedetails > 1) - { + if (empty($reshook)) { + if (empty($hidedetails) || $hidedetails > 1) { $subprice = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_subprice : $object->lines[$i]->subprice); $result .= price($sign * $subprice, 0, $outputlangs); } @@ -1657,24 +1738,30 @@ function pdf_getlineupwithtax($object, $i, $outputlangs, $hidedetails = 0) global $hookmanager, $conf; $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $result = ''; $reshook = 0; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineupwithtax', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if (empty($hidedetails) || $hidedetails > 1) $result .= price($sign * (($object->lines[$i]->subprice) + ($object->lines[$i]->subprice) * ($object->lines[$i]->tva_tx) / 100), 0, $outputlangs); + if (empty($reshook)) { + if (empty($hidedetails) || $hidedetails > 1) { + $result .= price($sign * (($object->lines[$i]->subprice) + ($object->lines[$i]->subprice) * ($object->lines[$i]->tva_tx) / 100), 0, $outputlangs); + } } return $result; } @@ -1695,20 +1782,26 @@ function pdf_getlineqty($object, $i, $outputlangs, $hidedetails = 0) $result = ''; $reshook = 0; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineqty', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result = $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result = $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result .= $object->lines[$i]->qty; + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + $result .= $object->lines[$i]->qty; + } } return $result; } @@ -1729,20 +1822,26 @@ function pdf_getlineqty_asked($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineqty_asked', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result .= $object->lines[$i]->qty_asked; + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + $result .= $object->lines[$i]->qty_asked; + } } return $result; } @@ -1763,20 +1862,26 @@ function pdf_getlineqty_shipped($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineqty_shipped', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result .= $object->lines[$i]->qty_shipped; + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + $result .= $object->lines[$i]->qty_shipped; + } } return $result; } @@ -1797,20 +1902,26 @@ function pdf_getlineqty_keeptoship($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineqty_keeptoship', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result .= ($object->lines[$i]->qty_asked - $object->lines[$i]->qty_shipped); + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + $result .= ($object->lines[$i]->qty_asked - $object->lines[$i]->qty_shipped); + } } return $result; } @@ -1832,8 +1943,7 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); @@ -1847,11 +1957,14 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineunit', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if (empty($hidedetails) || $hidedetails > 1) $result .= $langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short')); + if (empty($reshook)) { + if (empty($hidedetails) || $hidedetails > 1) { + $result .= $langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short')); + } } return $result; } @@ -1875,20 +1988,26 @@ function pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails = 0) $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineremisepercent', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) $result .= dol_print_reduction($object->lines[$i]->remise_percent, $outputlangs); + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + $result .= dol_print_reduction($object->lines[$i]->remise_percent, $outputlangs); + } } return $result; } @@ -1905,37 +2024,42 @@ function pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails = 0) */ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null) { - if (empty($hookmanager)) global $hookmanager; + if (empty($hookmanager)) { + global $hookmanager; + } global $conf; $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i' => $i, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails, 'special_code' => $special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlineprogress', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) return $hookmanager->resPrint; + if (!empty($hookmanager->resPrint)) { + return $hookmanager->resPrint; + } } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) return ''; - if (empty($hidedetails) || $hidedetails > 1) - { - if ($conf->global->SITUATION_DISPLAY_DIFF_ON_PDF) - { + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + return ''; + } + if (empty($hidedetails) || $hidedetails > 1) { + if ($conf->global->SITUATION_DISPLAY_DIFF_ON_PDF) { $prev_progress = 0; - if (method_exists($object, 'get_prev_progress')) - { - $prev_progress = $object->lines[$i]->get_prev_progress($object->id); + if (method_exists($object, 'get_prev_progress')) { + $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.'%'; - } + $result = round($object->lines[$i]->situation_percent - $prev_progress, 1).'%'; + } else { + $result = round($object->lines[$i]->situation_percent, 1).'%'; + } + } } return $result; } @@ -1954,37 +2078,36 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0) global $conf, $hookmanager; $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code, 'sign'=>$sign); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlinetotalexcltax', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; - } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) - { - $result .= $outputlangs->transnoentities("Option"); + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; } - elseif (empty($hidedetails) || $hidedetails > 1) - { + } + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + $result .= $outputlangs->transnoentities("Option"); + } elseif (empty($hidedetails) || $hidedetails > 1) { $total_ht = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht); - if (!empty($object->lines[$i]->situation_percent) && $object->lines[$i]->situation_percent > 0) - { + if (!empty($object->lines[$i]->situation_percent) && $object->lines[$i]->situation_percent > 0) { // TODO Remove this. The total should be saved correctly in database instead of being modified here. $prev_progress = 0; $progress = 1; - if (method_exists($object->lines[$i], 'get_prev_progress')) - { + if (method_exists($object->lines[$i], 'get_prev_progress')) { $prev_progress = $object->lines[$i]->get_prev_progress($object->id); $progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100; } @@ -2011,37 +2134,36 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0) global $hookmanager, $conf; $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $reshook = 0; $result = ''; //if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) ) - if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run - { + if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getlinetotalwithtax', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resPrint)) $result .= $hookmanager->resPrint; - } - if (empty($reshook)) - { - if ($object->lines[$i]->special_code == 3) - { - $result .= $outputlangs->transnoentities("Option"); + if (!empty($hookmanager->resPrint)) { + $result .= $hookmanager->resPrint; } - elseif (empty($hidedetails) || $hidedetails > 1) - { + } + if (empty($reshook)) { + if ($object->lines[$i]->special_code == 3) { + $result .= $outputlangs->transnoentities("Option"); + } elseif (empty($hidedetails) || $hidedetails > 1) { $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ttc : $object->lines[$i]->total_ttc); - if ($object->lines[$i]->situation_percent > 0) - { + if ($object->lines[$i]->situation_percent > 0) { // TODO Remove this. The total should be saved correctly in database instead of being modified here. $prev_progress = 0; $progress = 1; - if (method_exists($object->lines[$i], 'get_prev_progress')) - { + if (method_exists($object->lines[$i], 'get_prev_progress')) { $prev_progress = $object->lines[$i]->get_prev_progress($object->id); $progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100; } @@ -2071,26 +2193,22 @@ function pdf_getTotalQty($object, $type, $outputlangs) $nblines = count($object->lines); // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->special_code != 3) - { - if ($type == 'all') - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->special_code != 3) { + 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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code); $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; } } @@ -2115,81 +2233,73 @@ function pdf_getLinkedObjects($object, $outputlangs) $object->fetchObjectLinked(); - foreach ($object->linkedObjects as $objecttype => $objects) - { - if ($objecttype == 'facture') - { + foreach ($object->linkedObjects as $objecttype => $objects) { + 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'); - foreach ($objects as $elementobject) - { + foreach ($objects as $elementobject) { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefProposal"); $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref); $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) - { + foreach ($objects as $elementobject) { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder"); $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref).($elementobject->ref_client ? ' ('.$elementobject->ref_client.')' : '').($elementobject->ref_supplier ? ' ('.$elementobject->ref_supplier.')' : ''); $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) - { + foreach ($objects as $elementobject) { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefContract"); $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref); $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) - { + foreach ($objects as $elementobject) { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("InterRef"); $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref); $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")); - foreach ($objects as $x => $elementobject) - { + foreach ($objects as $x => $elementobject) { $order = null; // We concat this record info into fields xxx_value. title is overwrote. - 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 - { + 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'])) { 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)) - { + if (!is_object($order)) { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending"); - if (!empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] .= ' / '; + if (!empty($linkedobjects[$objecttype]['ref_value'])) { + $linkedobjects[$objecttype]['ref_value'] .= ' / '; + } $linkedobjects[$objecttype]['ref_value'] .= $outputlangs->transnoentities($elementobject->ref); //$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 { $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.')' : ''); + 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); //$linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate") . ($elementobject->date_delivery ? ' / ' . $outputlangs->transnoentities("DateShipment") : ''); //if (empty($linkedobjects[$objecttype]['date_value'])) $linkedobjects[$objecttype]['date_value'] = dol_print_date($order->date,'day','',$outputlangs); @@ -2200,12 +2310,13 @@ function pdf_getLinkedObjects($object, $outputlangs) } // For add external linked objects - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('linkedobjects' => $linkedobjects, 'outputlangs'=>$outputlangs); $action = ''; $hookmanager->executeHooks('pdf_getLinkedObjects', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($hookmanager->resArray)) $linkedobjects = $hookmanager->resArray; + if (!empty($hookmanager->resArray)) { + $linkedobjects = $hookmanager->resArray; + } } return $linkedobjects; @@ -2226,11 +2337,9 @@ function pdf_getSizeForImage($realpath) $maxheight = (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT) ? 32 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT); include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp = dol_getImageSize($realpath); - if ($tmp['height']) - { + if ($tmp['height']) { $width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight - if ($width > $maxwidth) // Pb with maxheight, so i use maxwidth - { + if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth $width = $maxwidth; $height = (int) round($maxwidth * $tmp['height'] / $tmp['width']); } else // No pb with maxheight @@ -2254,15 +2363,17 @@ function pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, $hidedetails = { global $conf, $hookmanager; $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; - if ($object->lines[$i]->special_code == 3) - { + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } + if ($object->lines[$i]->special_code == 3) { return $outputlangs->transnoentities("Option"); } else { - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $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); + if (!empty($object->lines[$i]->fk_parent_line)) { + $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); + } $parameters = array( 'i'=>$i, @@ -2273,13 +2384,14 @@ function pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, $hidedetails = $action = ''; - if ($hookmanager->executeHooks('getlinetotalremise', $parameters, $object, $action) > 0) - { + if ($hookmanager->executeHooks('getlinetotalremise', $parameters, $object, $action) > 0) { return $hookmanager->resPrint; // Note that $action and $object may have been modified by some hooks } } - if (empty($hidedetails) || $hidedetails > 1) return $sign * (($object->lines[$i]->subprice * $object->lines[$i]->qty) - $object->lines[$i]->total_ht); + if (empty($hidedetails) || $hidedetails > 1) { + return $sign * (($object->lines[$i]->subprice * $object->lines[$i]->qty) - $object->lines[$i]->total_ht); + } } return ''; } diff --git a/htdocs/core/lib/prelevement.lib.php b/htdocs/core/lib/prelevement.lib.php index 8008c9fd51f..bc81ee2bfbd 100644 --- a/htdocs/core/lib/prelevement.lib.php +++ b/htdocs/core/lib/prelevement.lib.php @@ -78,13 +78,29 @@ function prelevement_prepare_head(BonPrelevement $object) /** * Check need data to create standigns orders receipt file * + * @param string $type 'bank-transfer' or 'direct-debit' + * * @return int -1 if ko 0 if ok */ -function prelevement_check_config() +function prelevement_check_config($type = 'direct-debit') { - global $conf; - if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1; - if (empty($conf->global->PRELEVEMENT_ICS)) return -1; - if (empty($conf->global->PRELEVEMENT_USER)) return -1; + global $conf, $db; + if ($type == 'bank-transfer') { + if (empty($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT)) { + return -1; + } + //if (empty($conf->global->PRELEVEMENT_ICS)) return -1; + if (empty($conf->global->PAYMENTBYBANKTRANSFER_USER)) { + return -1; + } + } else { + if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) { + return -1; + } + //if (empty($conf->global->PRELEVEMENT_ICS)) return -1; + if (empty($conf->global->PRELEVEMENT_USER)) { + return -1; + } + } return 0; } diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 98311d093cd..9be293a81ab 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -90,13 +90,15 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $result = array(); // Clean parameters - if (empty($info_bits)) $info_bits = 0; - if (empty($txtva)) $txtva = 0; - if (empty($seller) || !is_object($seller)) - { + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($txtva)) { + $txtva = 0; + } + if (empty($seller) || !is_object($seller)) { dol_syslog("Price.lib::calcul_price_total Warning: function is called with parameter seller that is missing", LOG_WARNING); - if (!is_object($mysoc)) // mysoc may be not defined (during migration process) - { + if (!is_object($mysoc)) { // mysoc may be not defined (during migration process) $mysoc = new Societe($db); $mysoc->setMysoc($conf); } @@ -116,11 +118,19 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $countryid = $seller->country_id; - if (is_numeric($uselocaltax1_rate)) $uselocaltax1_rate = (float) $uselocaltax1_rate; - if (is_numeric($uselocaltax2_rate)) $uselocaltax2_rate = (float) $uselocaltax2_rate; + if (is_numeric($uselocaltax1_rate)) { + $uselocaltax1_rate = (float) $uselocaltax1_rate; + } + if (is_numeric($uselocaltax2_rate)) { + $uselocaltax2_rate = (float) $uselocaltax2_rate; + } - if ($uselocaltax1_rate < 0) $uselocaltax1_rate = $seller->localtax1_assuj; - if ($uselocaltax2_rate < 0) $uselocaltax2_rate = $seller->localtax2_assuj; + if ($uselocaltax1_rate < 0) { + $uselocaltax1_rate = $seller->localtax1_assuj; + } + if ($uselocaltax2_rate < 0) { + $uselocaltax2_rate = $seller->localtax2_assuj; + } //var_dump($uselocaltax1_rate.' - '.$uselocaltax2_rate); dol_syslog('Price.lib::calcul_price_total qty='.$qty.' pu='.$pu.' remise_percent_ligne='.$remise_percent_ligne.' txtva='.$txtva.' uselocaltax1_rate='.$uselocaltax1_rate.' uselocaltax2_rate='.$uselocaltax2_rate.' remise_percent_global='.$remise_percent_global.' price_base_type='.$price_base_type.' type='.$type.' progress='.$progress); @@ -141,36 +151,40 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type"; $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as cv"; - $sql .= " WHERE cv.taux = ".$txtva; - $sql .= " AND cv.fk_pays = ".$countryid; + $sql .= " WHERE cv.taux = ".((float) $txtva); + $sql .= " AND cv.fk_pays = ".((int) $countryid); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $localtax1_rate = (float) $obj->localtax1; // Use float to force to get first numeric value when value is x:y:z $localtax2_rate = (float) $obj->localtax2; // Use float to force to get first numeric value when value is -19:-15:-9 $localtax1_type = $obj->localtax1_type; $localtax2_type = $obj->localtax2_type; //var_dump($localtax1_rate.' '.$localtax2_rate.' '.$localtax1_type.' '.$localtax2_type); } - } 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 { + if (!empty($multicurrency_tx)) { + $pu = $pu_devise / $multicurrency_tx; + } 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(); } } - if ($pu === '') $pu = 0; + if ($pu === '') { + $pu = 0; + } // 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 { + if (is_numeric($pu) && is_numeric($multicurrency_tx)) { + $pu_devise = $pu * $multicurrency_tx; + } 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(); } @@ -182,13 +196,14 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $tot_avec_remise = $tot_avec_remise_ligne * (1 - ($remise_percent_global / 100)); // initialize result array - for ($i = 0; $i <= 15; $i++) $result[$i] = 0; + for ($i = 0; $i <= 15; $i++) { + $result[$i] = 0; + } // if there's some localtax including vat, we calculate localtaxes (we will add later) // if input unit price is 'HT', we need to have the totals with main VAT for a correct calculation - if ($price_base_type != 'TTC') - { + if ($price_base_type != 'TTC') { $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'); @@ -207,22 +222,26 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $apply_tax = true; break; case '4': // localtax on product - if ($type == 0) $apply_tax = true; + if ($type == 0) { + $apply_tax = true; + } break; case '6': // localtax on service - if ($type == 1) $apply_tax = true; + if ($type == 1) { + $apply_tax = true; + } break; } if ($uselocaltax1_rate && $apply_tax) { - $result[14] = price2num(($tot_sans_remise_wt * (1 + ($localtax1_rate / 100))) - $tot_sans_remise_wt, 'MT'); - $localtaxes[0] += $result[14]; + $result[14] = price2num(($tot_sans_remise_wt * (1 + ($localtax1_rate / 100))) - $tot_sans_remise_wt, 'MT'); + $localtaxes[0] += $result[14]; - $result[9] = price2num(($tot_avec_remise_wt * (1 + ($localtax1_rate / 100))) - $tot_avec_remise_wt, 'MT'); - $localtaxes[1] += $result[9]; + $result[9] = price2num(($tot_avec_remise_wt * (1 + ($localtax1_rate / 100))) - $tot_avec_remise_wt, 'MT'); + $localtaxes[1] += $result[9]; - $result[11] = price2num(($pu_wt * (1 + ($localtax1_rate / 100))) - $pu_wt, 'MU'); - $localtaxes[2] += $result[11]; + $result[11] = price2num(($pu_wt * (1 + ($localtax1_rate / 100))) - $pu_wt, 'MU'); + $localtaxes[2] += $result[11]; } $apply_tax = false; @@ -231,26 +250,29 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $apply_tax = true; break; case '4': // localtax on product - if ($type == 0) $apply_tax = true; + if ($type == 0) { + $apply_tax = true; + } break; case '6': // localtax on service - if ($type == 1) $apply_tax = true; + if ($type == 1) { + $apply_tax = true; + } break; } if ($uselocaltax2_rate && $apply_tax) { - $result[15] = price2num(($tot_sans_remise_wt * (1 + ($localtax2_rate / 100))) - $tot_sans_remise_wt, 'MT'); - $localtaxes[0] += $result[15]; + $result[15] = price2num(($tot_sans_remise_wt * (1 + ($localtax2_rate / 100))) - $tot_sans_remise_wt, 'MT'); + $localtaxes[0] += $result[15]; - $result[10] = price2num(($tot_avec_remise_wt * (1 + ($localtax2_rate / 100))) - $tot_avec_remise_wt, 'MT'); - $localtaxes[1] += $result[10]; + $result[10] = price2num(($tot_avec_remise_wt * (1 + ($localtax2_rate / 100))) - $tot_avec_remise_wt, 'MT'); + $localtaxes[1] += $result[10]; - $result[12] = price2num(($pu_wt * (1 + ($localtax2_rate / 100))) - $pu_wt, 'MU'); - $localtaxes[2] += $result[12]; + $result[12] = price2num(($pu_wt * (1 + ($localtax2_rate / 100))) - $pu_wt, 'MU'); + $localtaxes[2] += $result[12]; } //dol_syslog("price.lib::calcul_price_total $qty, $pu, $remise_percent_ligne, $txtva, $price_base_type $info_bits"); - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { // We work to define prices using the price without tax $result[6] = price2num($tot_sans_remise, 'MT'); $result[8] = price2num($tot_sans_remise * (1 + ((($info_bits & 1) ? 0 : $txtva) / 100)) + $localtaxes[0], 'MT'); // Selon TVA NPR ou non @@ -287,8 +309,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt // if there's some localtax without vat, we calculate localtaxes (we will add them at end) //If input unit price is 'TTC', we need to have the totals without main VAT for a correct calculation - if ($price_base_type == 'TTC') - { + if ($price_base_type == 'TTC') { $tot_sans_remise = price2num($tot_sans_remise / (1 + ($txtva / 100)), 'MU'); $tot_avec_remise = price2num($tot_avec_remise / (1 + ($txtva / 100)), 'MU'); $pu = price2num($pu / (1 + ($txtva / 100)), 'MU'); @@ -300,21 +321,25 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $apply_tax = true; break; case '3': // localtax on product - if ($type == 0) $apply_tax = true; + if ($type == 0) { + $apply_tax = true; + } break; case '5': // localtax on service - if ($type == 1) $apply_tax = true; + if ($type == 1) { + $apply_tax = true; + } break; } if ($uselocaltax1_rate && $apply_tax) { - $result[14] = price2num(($tot_sans_remise * (1 + ($localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount - $result[8] += $result[14]; // total_ttc_without_discount + tax1 + $result[14] = price2num(($tot_sans_remise * (1 + ($localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount + $result[8] += $result[14]; // total_ttc_without_discount + tax1 - $result[9] = price2num(($tot_avec_remise * (1 + ($localtax1_rate / 100))) - $tot_avec_remise, 'MT'); // amount tax1 for total_ht - $result[2] += $result[9]; // total_ttc + tax1 + $result[9] = price2num(($tot_avec_remise * (1 + ($localtax1_rate / 100))) - $tot_avec_remise, 'MT'); // amount tax1 for total_ht + $result[2] += $result[9]; // total_ttc + tax1 - $result[11] = price2num(($pu * (1 + ($localtax1_rate / 100))) - $pu, 'MU'); // amount tax1 for pu_ht - $result[5] += $result[11]; // pu_ht + tax1 + $result[11] = price2num(($pu * (1 + ($localtax1_rate / 100))) - $pu, 'MU'); // amount tax1 for pu_ht + $result[5] += $result[11]; // pu_ht + tax1 } $apply_tax = false; @@ -323,28 +348,30 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $apply_tax = true; break; case '3': // localtax on product - if ($type == 0) $apply_tax = true; + if ($type == 0) { + $apply_tax = true; + } break; case '5': // localtax on service - if ($type == 1) $apply_tax = true; + if ($type == 1) { + $apply_tax = true; + } break; } if ($uselocaltax2_rate && $apply_tax) { - $result[15] = price2num(($tot_sans_remise * (1 + ($localtax2_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax2 for total_ht_without_discount - $result[8] += $result[15]; // total_ttc_without_discount + tax2 + $result[15] = price2num(($tot_sans_remise * (1 + ($localtax2_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax2 for total_ht_without_discount + $result[8] += $result[15]; // total_ttc_without_discount + tax2 - $result[10] = price2num(($tot_avec_remise * (1 + ($localtax2_rate / 100))) - $tot_avec_remise, 'MT'); // amount tax2 for total_ht - $result[2] += $result[10]; // total_ttc + tax2 + $result[10] = price2num(($tot_avec_remise * (1 + ($localtax2_rate / 100))) - $tot_avec_remise, 'MT'); // amount tax2 for total_ht + $result[2] += $result[10]; // total_ttc + tax2 - $result[12] = price2num(($pu * (1 + ($localtax2_rate / 100))) - $pu, 'MU'); // amount tax2 for pu_ht - $result[5] += $result[12]; // pu_ht + tax2 + $result[12] = price2num(($pu * (1 + ($localtax2_rate / 100))) - $pu, 'MU'); // amount tax2 for pu_ht + $result[5] += $result[12]; // pu_ht + tax2 } // If rounding is not using base 10 (rare) - if (!empty($conf->global->MAIN_ROUNDING_RULE_TOT)) - { - if ($price_base_type == 'HT') - { + if (!empty($conf->global->MAIN_ROUNDING_RULE_TOT)) { + if ($price_base_type == 'HT') { $result[0] = round($result[0] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; $result[1] = round($result[1] / $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; @@ -360,8 +387,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt } // Multicurrency - if ($multicurrency_tx != 1) - { + if ($multicurrency_tx != 1) { if ($multicurrency_code) { $savMAIN_MAX_DECIMALS_UNIT = $conf->global->MAIN_MAX_DECIMALS_UNIT; $savMAIN_MAX_DECIMALS_TOT = $conf->global->MAIN_MAX_DECIMALS_TOT; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 7012b6bff07..9825b2dac2c 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -38,7 +38,9 @@ function product_prepare_head($object) $langs->load("products"); $label = $langs->trans('Product'); - if ($object->isService()) $label = $langs->trans('Service'); + if ($object->isService()) { + $label = $langs->trans('Service'); + } $h = 0; $head = array(); @@ -48,20 +50,17 @@ function product_prepare_head($object) $head[$h][2] = 'card'; $h++; - if (!empty($object->status)) - { + if (!empty($object->status)) { $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$object->id; $head[$h][1] = $langs->trans("SellingPrices"); $head[$h][2] = 'price'; $h++; } - if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) // If margin is on and product on sell, we may need the cost price even if product os not on purchase - { - if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire) + if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase + if ((((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire) || (!empty($conf->margin->enabled) && $user->rights->margin->liretous) - ) - { + ) { $head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id; $head[$h][1] = $langs->trans("BuyingPrices"); $head[$h][2] = 'suppliers'; @@ -70,8 +69,7 @@ function product_prepare_head($object) } // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $head[$h][0] = DOL_URL_ROOT."/product/traduction.php?id=".$object->id; $head[$h][1] = $langs->trans("Translation"); $head[$h][2] = 'translation'; @@ -79,13 +77,14 @@ function product_prepare_head($object) } // Sub products - if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { $head[$h][0] = DOL_URL_ROOT."/product/composition/card.php?id=".$object->id; $head[$h][1] = $langs->trans('AssociatedProducts'); $nbFatherAndChild = $object->hasFatherOrChild(); - if ($nbFatherAndChild > 0) $head[$h][1] .= ''.$nbFatherAndChild.''; + if ($nbFatherAndChild > 0) { + $head[$h][1] .= ''.$nbFatherAndChild.''; + } $head[$h][2] = 'subproduct'; $h++; } @@ -97,22 +96,21 @@ function product_prepare_head($object) $prodcomb = new ProductCombination($db); - if ($prodcomb->fetchByFkProductChild($object->id) <= 0) - { + if ($prodcomb->fetchByFkProductChild($object->id) <= 0) { $head[$h][0] = DOL_URL_ROOT."/variants/combinations.php?id=".$object->id; $head[$h][1] = $langs->trans('ProductCombinations'); $head[$h][2] = 'combinations'; $nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id); - if ($nbVariant > 0) $head[$h][1] .= ''.$nbVariant.''; + if ($nbVariant > 0) { + $head[$h][1] .= ''.$nbVariant.''; + } } $h++; } - if ($object->isProduct() || ($object->isService() && !empty($conf->global->STOCK_SUPPORTS_SERVICES))) // If physical product we can stock (or service with option) - { - if (!empty($conf->stock->enabled) && $user->rights->stock->lire) - { + if ($object->isProduct() || ($object->isService() && !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { // If physical product we can stock (or service with option) + if (!empty($conf->stock->enabled) && $user->rights->stock->lire) { $head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$object->id; $head[$h][1] = $langs->trans("Stock"); $head[$h][2] = 'stock'; @@ -121,17 +119,14 @@ function product_prepare_head($object) } // Tab to link resources - if (!empty($conf->resource->enabled)) - { - if ($object->isProduct() && !empty($conf->global->RESOURCE_ON_PRODUCTS)) - { + if (!empty($conf->resource->enabled)) { + if ($object->isProduct() && !empty($conf->global->RESOURCE_ON_PRODUCTS)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=product&ref='.$object->ref; $head[$h][1] = $langs->trans("Resources"); $head[$h][2] = 'resources'; $h++; } - if ($object->isService() && !empty($conf->global->RESOURCE_ON_SERVICES)) - { + if ($object->isService() && !empty($conf->global->RESOURCE_ON_SERVICES)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=service&ref='.$object->ref; $head[$h][1] = $langs->trans("Resources"); $head[$h][2] = 'resources'; @@ -156,14 +151,19 @@ function product_prepare_head($object) complete_head_from_modules($conf, $langs, $object, $head, $h, 'product'); // Notes - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -171,18 +171,28 @@ function product_prepare_head($object) // Attachments require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - if (!empty($conf->product->enabled) && ($object->type == Product::TYPE_PRODUCT)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); - if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); + if (!empty($conf->product->enabled) && ($object->type == Product::TYPE_PRODUCT)) { + $upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); + } + if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) { + $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); + } $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { - if (!empty($conf->product->enabled) && ($object->type == Product::TYPE_PRODUCT)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; - if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; + if (!empty($conf->product->enabled) && ($object->type == Product::TYPE_PRODUCT)) { + $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; + } + if (!empty($conf->service->enabled) && ($object->type == Product::TYPE_SERVICE)) { + $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos'; + } $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.'/product/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; @@ -191,8 +201,7 @@ function product_prepare_head($object) // Log $head[$h][0] = DOL_URL_ROOT.'/product/agenda.php?id='.$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))) - { + 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"); } @@ -231,7 +240,9 @@ function productlot_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; @@ -245,11 +256,11 @@ function productlot_prepare_head($object) // Log /* - $head[$h][0] = DOL_URL_ROOT.'/product/info.php?id='.$object->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++; - */ + $head[$h][0] = DOL_URL_ROOT.'/product/info.php?id='.$object->id; + $head[$h][1] = $langs->trans("Info"); + $head[$h][2] = 'info'; + $h++; + */ return $head; } @@ -273,8 +284,7 @@ function product_admin_prepare_head() $head[$h][2] = 'general'; $h++; - if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($conf->global->PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($conf->global->PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL)) { $head[$h] = array( 0 => DOL_URL_ROOT."/product/admin/price_rules.php", 1 => $langs->trans('MultipriceRules'), @@ -318,6 +328,11 @@ function product_lot_admin_prepare_head() $h = 0; $head = array(); + $head[$h][0] = DOL_URL_ROOT."/product/admin/product_lot.php"; + $head[$h][1] = $langs->trans('Parameters'); + $head[$h][2] = 'settings'; + $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 @@ -358,11 +373,12 @@ function show_stats_for_company($product, $socid) print ''; // Customer proposals - if (!empty($conf->propal->enabled) && $user->rights->propale->lire) - { + if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $nblines++; $ret = $product->load_stats_propale($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("propal"); print ''; print ''.img_object('', 'propal', 'class="paddingright"').$langs->trans("Proposals").''; @@ -376,11 +392,12 @@ function show_stats_for_company($product, $socid) print ''; } // Supplier proposals - if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) - { + if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { $nblines++; $ret = $product->load_stats_proposal_supplier($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("supplier_proposal"); print ''; print ''.img_object('', 'supplier_proposal', 'class="paddingright"').$langs->trans("SupplierProposals").''; @@ -394,11 +411,12 @@ function show_stats_for_company($product, $socid) print ''; } // Customer orders - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) - { + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { $nblines++; $ret = $product->load_stats_commande($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("orders"); print ''; print ''.img_object('', 'order', 'class="paddingright"').$langs->trans("CustomersOrders").''; @@ -412,11 +430,12 @@ function show_stats_for_company($product, $socid) print ''; } // Supplier orders - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) { $nblines++; $ret = $product->load_stats_commande_fournisseur($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("orders"); print ''; print ''.img_object('', 'supplier_order', 'class="paddingright"').$langs->trans("SuppliersOrders").''; @@ -430,11 +449,12 @@ function show_stats_for_company($product, $socid) print ''; } // Customer invoices - if (!empty($conf->facture->enabled) && $user->rights->facture->lire) - { + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $nblines++; $ret = $product->load_stats_facture($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("bills"); print ''; print ''.img_object('', 'bill').' '.$langs->trans("CustomersInvoices").''; @@ -448,11 +468,12 @@ function show_stats_for_company($product, $socid) print ''; } // Supplier invoices - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { $nblines++; $ret = $product->load_stats_facture_fournisseur($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("bills"); print ''; print ''.img_object('', 'supplier_invoice', 'class="paddingright"').$langs->trans("SuppliersInvoices").''; @@ -467,11 +488,12 @@ function show_stats_for_company($product, $socid) } // Contracts - if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) - { + if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { $nblines++; $ret = $product->load_stats_contrat($socid); - if ($ret < 0) dol_print_error($db); + if ($ret < 0) { + dol_print_error($db); + } $langs->load("contracts"); print ''; print ''.img_object('', 'contract', 'class="paddingright"').$langs->trans("Contracts").''; @@ -486,8 +508,7 @@ function show_stats_for_company($product, $socid) } // BOM - if (!empty($conf->bom->enabled) && $user->rights->bom->read) - { + if (!empty($conf->bom->enabled) && $user->rights->bom->read) { $nblines++; $ret = $product->load_stats_bom($socid); if ($ret < 0) { @@ -510,8 +531,7 @@ function show_stats_for_company($product, $socid) } // MO - if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) - { + if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) { $nblines++; $ret = $product->load_stats_mo($socid); if ($ret < 0) { @@ -579,19 +599,16 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho $outputlangs = $langs; } - if (empty($measuring_unit_cache[$unit.'_'.$measuring_style.'_'.$scale.'_'.$use_short_label])) - { + if (empty($measuring_unit_cache[$unit.'_'.$measuring_style.'_'.$scale.'_'.$use_short_label])) { require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; $measuringUnits = new CUnits($db); - if ($measuring_style == '' && $scale == '') - { + if ($measuring_style == '' && $scale == '') { $arrayforfilter = array( 't.rowid' => $unit, 't.active' => 1 ); - } elseif ($scale !== '') - { + } elseif ($scale !== '') { $arrayforfilter = array( 't.scale' => $scale, 't.unit_type' => $measuring_style, @@ -610,8 +627,11 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho return -1; } else { if (is_array($measuringUnits->records) && count($measuringUnits->records) > 0) { - if ($use_short_label) $labeltoreturn = $measuringUnits->records[key($measuringUnits->records)]->short_label; - else $labeltoreturn = $outputlangs->transnoentitiesnoconv($measuringUnits->records[key($measuringUnits->records)]->label); + if ($use_short_label) { + $labeltoreturn = $measuringUnits->records[key($measuringUnits->records)]->short_label; + } else { + $labeltoreturn = $outputlangs->transnoentitiesnoconv($measuringUnits->records[key($measuringUnits->records)]->label); + } } else { $labeltoreturn = ''; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index aaa1e144202..0315e848e94 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2010 Regis Houssin * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -44,83 +44,197 @@ function project_prepare_head(Project $project) $head[$h][1] = $langs->trans("Project"); $head[$h][2] = 'project'; $h++; + $nbContacts = 0; + // Enable caching of project count Contacts + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_contacts_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); - $nbContact = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); + if (!is_null($dataretrieved)) { + $nbContacts = $dataretrieved; + } else { + $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); + dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result. + } $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.''; + if ($nbContacts > 0) { + $head[$h][1] .= ''.$nbContacts.''; + } $head[$h][2] = 'contact'; $h++; - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Then tab for sub level of projet, i mean tasks + $nbTasks = 0; + // Enable caching of project count Tasks + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_tasks_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + + if (!is_null($dataretrieved)) { + $nbTasks = $dataretrieved; + } else { + require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + $taskstatic = new Task($db); + $nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0)); + dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result. + } $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, $project->id, 0, 0)); - if ($nbTasks > 0) $head[$h][1] .= ''.($nbTasks).''; + if ($nbTasks > 0) { + $head[$h][1] .= ''.($nbTasks).''; + } $head[$h][2] = 'tasks'; $h++; $nbTimeSpent = 0; - $sql = "SELECT t.rowid"; - //$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; - //$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 =".$project->id; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - if ($obj) $nbTimeSpent = 1; - } else dol_print_error($db); + // Enable caching of project count Timespent + $cachekey = 'count_timespent_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $nbTimeSpent = $dataretrieved; + } else { + $sql = "SELECT t.rowid"; + //$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; + //$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 =".$project->id; + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $nbTimeSpent = 1; + dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result. + } + } else { + dol_print_error($db); + } + } $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] .= '...'; + if ($nbTimeSpent > 0) { + $head[$h][1] .= '...'; + } $head[$h][2] = 'timespent'; $h++; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->contrat->enabled) - || !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled)) - { - $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'); - + || !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled)) { + $nbElements = 0; + // Enable caching of thirdrparty count Contacts + $cachekey = 'count_elements_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $nbElements = $dataretrieved; + } else { + if (!empty($conf->propal->enabled)) { + $nbElements += $project->getElementCount('propal', 'propal'); + } + if (!empty($conf->commande->enabled)) { + $nbElements += $project->getElementCount('order', 'commande'); + } + if (!empty($conf->facture->enabled)) { + $nbElements += $project->getElementCount('invoice', 'facture'); + } + if (!empty($conf->facture->enabled)) { + $nbElements += $project->getElementCount('invoice_predefined', 'facture_rec'); + } + if (!empty($conf->supplier_proposal->enabled)) { + $nbElements += $project->getElementCount('proposal_supplier', 'supplier_proposal'); + } + if (!empty($conf->supplier_order->enabled)) { + $nbElements += $project->getElementCount('order_supplier', 'commande_fournisseur'); + } + if (!empty($conf->supplier_invoice->enabled)) { + $nbElements += $project->getElementCount('invoice_supplier', 'facture_fourn'); + } + if (!empty($conf->contrat->enabled)) { + $nbElements += $project->getElementCount('contract', 'contrat'); + } + if (!empty($conf->ficheinter->enabled)) { + $nbElements += $project->getElementCount('intervention', 'fichinter'); + } + if (!empty($conf->expedition->enabled)) { + $nbElements += $project->getElementCount('shipping', 'expedition'); + } + if (!empty($conf->mrp->enabled)) { + $nbElements += $project->getElementCount('mrp', 'mrp_mo', 'fk_project'); + } + if (!empty($conf->deplacement->enabled)) { + $nbElements += $project->getElementCount('trip', 'deplacement'); + } + if (!empty($conf->expensereport->enabled)) { + $nbElements += $project->getElementCount('expensereport', 'expensereport'); + } + if (!empty($conf->don->enabled)) { + $nbElements += $project->getElementCount('donation', 'don'); + } + if (!empty($conf->loan->enabled)) { + $nbElements += $project->getElementCount('loan', 'loan'); + } + if (!empty($conf->tax->enabled)) { + $nbElements += $project->getElementCount('chargesociales', 'chargesociales'); + } + if (!empty($conf->projet->enabled)) { + $nbElements += $project->getElementCount('project_task', 'projet_task'); + } + if (!empty($conf->stock->enabled)) { + $nbElements += $project->getElementCount('stock_mouvement', 'stock'); + } + if (!empty($conf->salaries->enabled)) { + $nbElements += $project->getElementCount('salaries', 'payment_salary'); + } + if (!empty($conf->banque->enabled)) { + $nbElements += $project->getElementCount('variouspayment', 'payment_various'); + } + dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result. + } $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.''; + if ($nbElements > 0) { + $head[$h][1] .= ''.$nbElements.''; + } $head[$h][2] = 'element'; $h++; } + if ($conf->eventorganization->enabled && !empty($project->usage_organize_event)) { + $langs->load('eventorganization'); + $head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id; + $head[$h][1] = $langs->trans("ConferenceOrBoothTab"); + + // Enable caching of conf or booth count + $nbConfOrBooth = 0; + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_conferenceorbooth_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $nbConfOrBooth = $dataretrieved; + } else { + require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; + $conforbooth=new ConferenceOrBooth($db); + $result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id)); + //, + if (!is_array($result) && $result<0) { + setEventMessages($conforbooth->error, $conforbooth->errors, 'errors'); + } else { + $nbConfOrBooth = count($result); + } + dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. + } + if ($nbConfOrBooth > 0) { + $head[$h][1] .= '' . $nbConfOrBooth . ''; + } + $head[$h][2] = 'eventorganisation'; + $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 @@ -128,44 +242,73 @@ function project_prepare_head(Project $project) complete_head_from_modules($conf, $langs, $project, $head, $h, 'project'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($project->note_private)) $nbNote++; - if (!empty($project->note_public)) $nbNote++; + 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.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'notes'; $h++; } - 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($project->ref); - $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $project->element, $project->id); + // Attached files and Links + $totalAttached = 0; + // Enable caching of thirdrparty count attached files and links + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_attached_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $totalAttached = $dataretrieved; + } else { + 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($project->ref); + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $project->element, $project->id); + $totalAttached = $nbFiles + $nbLinks; + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. + } $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).''; + if (($totalAttached) > 0) { + $head[$h][1] .= ''.($totalAttached).''; + } $head[$h][2] = 'document'; $h++; // Manage discussion - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT)) - { - $nbComments = $project->getNbComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT)) { + $nbComments = 0; + // Enable caching of thirdrparty count attached files and links + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_attached_project_'.$project->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $nbComments = $dataretrieved; + } else { + $nbComments = $project->getNbComments(); + dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result. + } $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.''; + if ($nbComments > 0) { + $head[$h][1] .= ''.$nbComments.''; + } $head[$h][2] = 'project_comment'; $h++; } $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))) - { + 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"); } @@ -198,7 +341,9 @@ function task_prepare_head($object) $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject') ? '&withproject=1' : ''); $head[$h][1] = $langs->trans("TaskRessourceLinks"); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'task_contact'; $h++; @@ -210,15 +355,20 @@ function task_prepare_head($object) $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " WHERE t.fk_task =".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $nbTimeSpent = 1; - } else dol_print_error($db); + if ($obj) { + $nbTimeSpent = 1; + } + } 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"); - if ($nbTimeSpent > 0) $head[$h][1] .= '...'; + if ($nbTimeSpent > 0) { + $head[$h][1] .= '...'; + } $head[$h][2] = 'task_time'; $h++; @@ -228,14 +378,19 @@ function task_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'task'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject') ? '&withproject=1' : ''); $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'task_notes'; $h++; } @@ -247,17 +402,20 @@ function task_prepare_head($object) $nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'task_document'; $h++; // Manage discussion - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK)) - { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK)) { $nbComments = $object->getNbComments(); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject') ? '&withproject=1' : ''); $head[$h][1] = $langs->trans("CommentLink"); - if ($nbComments > 0) $head[$h][1] .= ''.$nbComments.''; + if ($nbComments > 0) { + $head[$h][1] .= ''.$nbComments.''; + } $head[$h][2] = 'task_comment'; $h++; } @@ -284,26 +442,25 @@ function project_timesheet_prepare_head($mode, $fuser = null) $param = ''; $param .= ($mode ? '&mode='.$mode : ''); - if (is_object($fuser) && $fuser->id > 0 && $fuser->id != $user->id) $param .= '&search_usertoprocessid='.$fuser->id; + if (is_object($fuser) && $fuser->id > 0 && $fuser->id != $user->id) { + $param .= '&search_usertoprocessid='.$fuser->id; + } - if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERMONTH)) - { + if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERMONTH)) { $head[$h][0] = DOL_URL_ROOT."/projet/activity/permonth.php".($param ? '?'.$param : ''); $head[$h][1] = $langs->trans("InputPerMonth"); $head[$h][2] = 'inputpermonth'; $h++; } - if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERWEEK)) - { + if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERWEEK)) { $head[$h][0] = DOL_URL_ROOT."/projet/activity/perweek.php".($param ? '?'.$param : ''); $head[$h][1] = $langs->trans("InputPerWeek"); $head[$h][2] = 'inputperweek'; $h++; } - if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERTIME)) - { + if (empty($conf->global->PROJECT_DISABLE_TIMESHEET_PERTIME)) { $head[$h][0] = DOL_URL_ROOT."/projet/activity/perday.php".($param ? '?'.$param : ''); $head[$h][1] = $langs->trans("InputPerDay"); $head[$h][2] = 'inputperday'; @@ -356,6 +513,15 @@ function project_admin_prepare_head() $head[$h][2] = 'attributes_task'; $h++; + if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { + $langs->load("members"); + + $head[$h][0] = DOL_URL_ROOT.'/projet/admin/website.php'; + $head[$h][1] = $langs->trans("BlankSubscriptionForm"); + $head[$h][2] = 'website'; + $h++; + } + complete_head_from_modules($conf, $langs, null, $head, $h, 'project_admin', 'remove'); return $head; @@ -389,7 +555,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $projectsArrayId = explode(',', $projectsListId); if ($filterprogresscalc !== '') { - foreach ($lines as $key=>$line) { + foreach ($lines as $key => $line) { if (!empty($line->planned_workload) && !empty($line->duration)) { $filterprogresscalc = str_replace(' = ', ' == ', $filterprogresscalc); if (!eval($filterprogresscalc)) { @@ -404,8 +570,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // We declare counter as global because we want to edit them into recursive call global $total_projectlinesa_spent, $total_projectlinesa_planned, $total_projectlinesa_spent_if_planned, $total_projectlinesa_declared_if_planned, $total_projectlinesa_tobill, $total_projectlinesa_billed; - if ($level == 0) - { + if ($level == 0) { $total_projectlinesa_spent = 0; $total_projectlinesa_planned = 0; $total_projectlinesa_spent_if_planned = 0; @@ -414,31 +579,28 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $total_projectlinesa_billed = 0; } - for ($i = 0; $i < $numlines; $i++) - { - if ($parent == 0 && $level >= 0) $level = 0; // if $level = -1, we dont' use sublevel recursion, we show all lines + for ($i = 0; $i < $numlines; $i++) { + if ($parent == 0 && $level >= 0) { + $level = 0; // if $level = -1, we dont' use sublevel recursion, we show all lines + } // Process line // print "i:".$i."-".$lines[$i]->fk_project.'
    '; - if ($lines[$i]->fk_parent == $parent || $level < 0) // if $level = -1, we dont' use sublevel recursion, we show all lines - { + if ($lines[$i]->fk_parent == $parent || $level < 0) { // if $level = -1, we dont' use sublevel recursion, we show all lines // Show task line. $showline = 1; $showlineingray = 0; // If there is filters to use - if (is_array($taskrole)) - { + if (is_array($taskrole)) { // If task not legitimate to show, search if a legitimate task exists later in tree - if (!isset($taskrole[$lines[$i]->id]) && $lines[$i]->id != $lines[$i]->fk_parent) - { + if (!isset($taskrole[$lines[$i]->id]) && $lines[$i]->id != $lines[$i]->fk_parent) { // So search if task has a subtask legitimate to show $foundtaskforuserdeeper = 0; searchTaskInChild($foundtaskforuserdeeper, $lines[$i]->id, $lines, $taskrole); //print '$foundtaskforuserpeeper='.$foundtaskforuserdeeper.'
    '; - if ($foundtaskforuserdeeper > 0) - { + if ($foundtaskforuserdeeper > 0) { $showlineingray = 1; // We will show line but in gray } else { $showline = 0; // No reason to show line @@ -447,11 +609,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } 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)) - { + if (empty($user->rights->projet->all->lire)) { // User is not allowed on this project and project is not public, so we hide line - if (!in_array($lines[$i]->fk_project, $projectsArrayId)) - { + if (!in_array($lines[$i]->fk_project, $projectsArrayId)) { // Note that having a user assigned to a task into a project user has no permission on, should not be possible // because assignement on task can be done only on contact of project. // If assignement was done and after, was removed from contact of project, then we can hide the line. @@ -460,11 +620,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } - if ($showline) - { + if ($showline) { // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) - { + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { $var = !$var; $lastprojectid = $lines[$i]->fk_project; } @@ -491,13 +649,15 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $taskstatic->duration_effective = $lines[$i]->duration; - if ($showproject) - { + if ($showproject) { // Project ref print ""; //if ($showlineingray) print ''; - if ($lines[$i]->public || in_array($lines[$i]->fk_project, $projectsArrayId) || !empty($user->rights->projet->all->lire)) print $projectstatic->getNomUrl(1); - else print $projectstatic->getNomUrl(1, 'nolink'); + if ($lines[$i]->public || in_array($lines[$i]->fk_project, $projectsArrayId) || !empty($user->rights->projet->all->lire)) { + print $projectstatic->getNomUrl(1); + } else { + print $projectstatic->getNomUrl(1, 'nolink'); + } //if ($showlineingray) print ''; print ""; @@ -522,8 +682,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Title of task if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) { print ""; - if ($showlineingray) + if ($showlineingray) { print ''; + } //else print ''; for ($k = 0; $k < $level; $k++) { print '
    '; @@ -532,8 +693,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t for ($k = 0; $k < $level; $k++) { print '
    '; } - if ($showlineingray) + if ($showlineingray) { print '
    '; + } //else print ''; print "\n"; } @@ -555,15 +717,20 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { print ''; print dol_print_date($lines[$i]->date_end, 'dayhour'); - if ($taskstatic->hasDelay()) + if ($taskstatic->hasDelay()) { print img_warning($langs->trans("Late")); + } print ''; } $plannedworkloadoutputformat = 'allhourmin'; $timespentoutputformat = 'allhourmin'; - if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; - if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; + if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) { + $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; + } + if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) { + $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; + } // Planned Workload (in working hours) if (count($arrayfields) > 0 && !empty($arrayfields['t.planned_workload']['checked'])) { @@ -582,15 +749,21 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Time spent if (count($arrayfields) > 0 && !empty($arrayfields['t.duration_effective']['checked'])) { print ''; - if ($showlineingray) + if ($showlineingray) { print ''; - else print ''; - if ($lines[$i]->duration) + } else { + print ''; + } + if ($lines[$i]->duration) { print convertSecondToTime($lines[$i]->duration, $timespentoutputformat); - else print '--:--'; - if ($showlineingray) + } else { + print '--:--'; + } + if ($showlineingray) { print ''; - else print ''; + } else { + print ''; + } print ''; } @@ -598,9 +771,11 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) { print ''; if ($lines[$i]->planned_workload || $lines[$i]->duration) { - if ($lines[$i]->planned_workload) + if ($lines[$i]->planned_workload) { print round(100 * $lines[$i]->duration / $lines[$i]->planned_workload, 2).' %'; - else print ''.$langs->trans('WorkloadNotDefined').''; + } else { + print ''.$langs->trans('WorkloadNotDefined').''; + } } print ''; } @@ -623,8 +798,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; } - if ($showbilltime) - { + if ($showbilltime) { // Time not billed if (count($arrayfields) > 0 && !empty($arrayfields['t.tobill']['checked'])) { print ''; @@ -650,25 +824,57 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } - // Contacts of task - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) - { + // Contacts of tasks. Disabled, because available by default just after + /* + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { print ''; - foreach (array('internal', 'external') as $source) - { + foreach (array('internal', 'external') as $source) { $tab = $lines[$i]->liste_contact(-1, $source); $num = count($tab); if (!empty($num)) { foreach ($tab as $contacttask) { //var_dump($contacttask); - if ($source == 'internal') $c = new User($db); - else $c = new Contact($db); + if ($source == 'internal') { + $c = new User($db); + } else { + $c = new Contact($db); + } $c->fetch($contacttask['id']); print $c->getNomUrl(1).' ('.$contacttask['libelle'].')
    '; } } } print ''; + }*/ + + // Contacts of task + if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { + print ''; + foreach (array('internal', 'external') as $source) { + $tab = $lines[$i]->liste_contact(-1, $source); + $num = count($tab); + if (!empty($num)) { + foreach ($tab as $contacttask) { + //var_dump($contacttask); + if ($source == 'internal') { + $c = new User($db); + } else { + $c = new Contact($db); + } + $c->fetch($contacttask['id']); + if (!empty($c->photo)) { + print $c->getNomUrl(-2).' '; + } else { + if (get_class($c) == 'User') { + print $c->getNomUrl(2, '', 0, 0, 24, 1);//.' '; + } else { + print $c->getNomUrl(2);//.' '; + } + } + } + } + } + print ''; } // Extra fields @@ -685,19 +891,26 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print "\n"; - if (!$showlineingray) $inc++; + if (!$showlineingray) { + $inc++; + } - if ($level >= 0) // Call sublevels - { + if ($level >= 0) { // Call sublevels $level++; - if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick, $projectidfortotallink, $filterprogresscalc, $showbilltime, $arrayfields); + if ($lines[$i]->id) { + projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick, $projectidfortotallink, $filterprogresscalc, $showbilltime, $arrayfields); + } $level--; } $total_projectlinesa_spent += $lines[$i]->duration; $total_projectlinesa_planned += $lines[$i]->planned_workload; - 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; + 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 { //$level--; @@ -705,14 +918,21 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0 || $total_projectlinesa_tobill > 0 || $total_projectlinesa_billed > 0) - && $level <= 0) - { + && $level <= 0) { print ''; print ''.$langs->trans("Total").''; - if ($showproject) print ''; - if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) print ''; - if (count($arrayfields) > 0 && !empty($arrayfields['t.dateo']['checked'])) print ''; - if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) print ''; + if ($showproject) { + print ''; + } + if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) { + print ''; + } + if (count($arrayfields) > 0 && !empty($arrayfields['t.dateo']['checked'])) { + print ''; + } + if (count($arrayfields) > 0 && !empty($arrayfields['t.datee']['checked'])) { + print ''; + } if (count($arrayfields) > 0 && !empty($arrayfields['t.planned_workload']['checked'])) { print ''; print convertSecondToTime($total_projectlinesa_planned, 'allhourmin'); @@ -720,11 +940,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } if (count($arrayfields) > 0 && !empty($arrayfields['t.duration_effective']['checked'])) { print ''; - if ($projectidfortotallink > 0) + if ($projectidfortotallink > 0) { print ''; + } print convertSecondToTime($total_projectlinesa_spent, 'allhourmin'); - if ($projectidfortotallink > 0) + if ($projectidfortotallink > 0) { print ''; + } print ''; } @@ -753,14 +975,16 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (count($arrayfields) > 0 && !empty($arrayfields['t.progress_calculated']['checked'])) { print ''; - if ($total_projectlinesa_planned) + if ($total_projectlinesa_planned) { print $totalCalculatedProgress.' %'; + } print ''; } if (count($arrayfields) > 0 && !empty($arrayfields['t.progress']['checked'])) { print ''; - if ($total_projectlinesa_planned) + if ($total_projectlinesa_planned) { print ''.$totalAverageDeclaredProgress.' %'; + } print ''; } @@ -778,8 +1002,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; } - if ($showbilltime) - { + if ($showbilltime) { if (count($arrayfields) > 0 && !empty($arrayfields['t.tobill']['checked'])) { print ''; print convertSecondToTime($total_projectlinesa_tobill, 'allhourmin'); @@ -791,9 +1014,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; } } + // Contacts of task for backward compatibility, + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print ''; + } // Contacts of task - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) - { + if (count($arrayfields) > 0 && !empty($arrayfields['c.assigned']['checked'])) { print ''; } print ''; @@ -834,45 +1060,40 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec $numlines = count($lines); // Create a smaller array with sublevels only to be used later. This increase dramatically performances. - if ($parent == 0) // Always and only if at first level - { - for ($i = 0; $i < $numlines; $i++) - { - if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[] = $lines[$i]; + if ($parent == 0) { // Always and only if at first level + for ($i = 0; $i < $numlines; $i++) { + if ($lines[$i]->fk_task_parent) { + $lineswithoutlevel0[] = $lines[$i]; + } } } - if (empty($oldprojectforbreak)) - { + if (empty($oldprojectforbreak)) { $oldprojectforbreak = (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : -1); // 0 to start break , -1 no break } //dol_syslog('projectLinesPerDay inc='.$inc.' preselectedday='.$preselectedday.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0)); - for ($i = 0; $i < $numlines; $i++) - { - if ($parent == 0) $level = 0; + for ($i = 0; $i < $numlines; $i++) { + if ($parent == 0) { + $level = 0; + } //if ($lines[$i]->fk_task_parent == $parent) //{ // If we want all or we have a role on task, we show it - if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) - { + if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) { //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) - { + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { $lastprojectid = $lines[$i]->fk_project; - if ($preselectedday) - { + if ($preselectedday) { $projectstatic->id = $lines[$i]->fk_project; } } - if (empty($workloadforid[$projectstatic->id])) - { - if ($preselectedday) - { + if (empty($workloadforid[$projectstatic->id])) { + if ($preselectedday) { $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week $workloadforid[$projectstatic->id] = 1; } @@ -894,13 +1115,11 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec $thirdpartystatic->name = $lines[$i]->thirdparty_name; $thirdpartystatic->email = $lines[$i]->thirdparty_email; - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($projectstatic->title) - { + if ($projectstatic->title) { print ' - '; print $projectstatic->title; } @@ -908,7 +1127,9 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec print ''; } - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + if ($oldprojectforbreak != -1) { + $oldprojectforbreak = $projectstatic->id; + } print ''."\n"; @@ -921,8 +1142,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec // Project print ""; - if ($oldprojectforbreak == -1) - { + if ($oldprojectforbreak == -1) { print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); print '
    '.$projectstatic->title; } @@ -930,17 +1150,23 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec // Thirdparty print ''; - if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); + if ($thirdpartystatic->id > 0) { + print $thirdpartystatic->getNomUrl(1, 'project', 10); + } print ''; // Ref print ''; print ''; - for ($k = 0; $k < $level; $k++) print "   "; + for ($k = 0; $k < $level; $k++) { + print "   "; + } print $taskstatic->getNomUrl(1, 'withproject', 'time'); // Label task print '
    '; - for ($k = 0; $k < $level; $k++) print "   "; + for ($k = 0; $k < $level; $k++) { + print "   "; + } print $taskstatic->label; //print "
    "; //for ($k = 0 ; $k < $level ; $k++) print "   "; @@ -952,19 +1178,18 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec print dol_print_date($lines[$i]->timespent_datehour, 'day'); print ''; - $disabledproject = 1; $disabledtask = 1; + $disabledproject = 1; + $disabledtask = 1; //print "x".$lines[$i]->fk_project; //var_dump($lines[$i]); //var_dump($projectsrole[$lines[$i]->fk_project]); // If at least one role for project - if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { + if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) { $disabledproject = 0; $disabledtask = 0; } // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) { $disabledtask = 1; } @@ -974,9 +1199,13 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec print ''; $cssonholiday = ''; - if (!$isavailable[$preselectedday]['morning'] && !$isavailable[$preselectedday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$preselectedday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$preselectedday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$preselectedday]['morning'] && !$isavailable[$preselectedday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$preselectedday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$preselectedday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } // Duration print ''; @@ -985,7 +1214,9 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec $totalforeachline[$preselectedday] += $lines[$i]->timespent_duration; $alreadyspent = ''; - if ($dayWorkLoad > 0) $alreadyspent = convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + if ($dayWorkLoad > 0) { + $alreadyspent = convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + } print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); @@ -1063,54 +1294,47 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $numlines = count($lines); // Create a smaller array with sublevels only to be used later. This increase dramatically performances. - if ($parent == 0) // Always and only if at first level - { - for ($i = 0; $i < $numlines; $i++) - { - if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[] = $lines[$i]; + if ($parent == 0) { // Always and only if at first level + for ($i = 0; $i < $numlines; $i++) { + if ($lines[$i]->fk_task_parent) { + $lineswithoutlevel0[] = $lines[$i]; + } } } - if (empty($oldprojectforbreak)) - { + if (empty($oldprojectforbreak)) { $oldprojectforbreak = (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : -1); // 0 to start break , -1 no break } //dol_syslog('projectLinesPerDay inc='.$inc.' preselectedday='.$preselectedday.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0)); - for ($i = 0; $i < $numlines; $i++) - { - if ($parent == 0) $level = 0; + for ($i = 0; $i < $numlines; $i++) { + if ($parent == 0) { + $level = 0; + } - if ($lines[$i]->fk_task_parent == $parent) - { + if ($lines[$i]->fk_task_parent == $parent) { $obj = &$lines[$i]; // To display extrafields // If we want all or we have a role on task, we show it - if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) - { + if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) { //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); - if ($restricteditformytask == 2 && empty($tasksrole[$lines[$i]->id])) // we have no role on task and we request to hide such cases - { + if ($restricteditformytask == 2 && empty($tasksrole[$lines[$i]->id])) { // we have no role on task and we request to hide such cases continue; } // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) - { + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { $lastprojectid = $lines[$i]->fk_project; - if ($preselectedday) - { + if ($preselectedday) { $projectstatic->id = $lines[$i]->fk_project; } } - if (empty($workloadforid[$projectstatic->id])) - { - if ($preselectedday) - { + if (empty($workloadforid[$projectstatic->id])) { + if ($preselectedday) { $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - $workloadforid[$projectstatic->id] = 1; + $workloadforid[$projectstatic->id] = 1; } } @@ -1118,6 +1342,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $projectstatic->ref = $lines[$i]->projectref; $projectstatic->title = $lines[$i]->projectlabel; $projectstatic->public = $lines[$i]->public; + $projectstatic->status = $lines[$i]->projectstatus; $taskstatic->id = $lines[$i]->id; $taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id); @@ -1129,91 +1354,98 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $thirdpartystatic->name = $lines[$i]->thirdparty_name; $thirdpartystatic->email = $lines[$i]->thirdparty_email; - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { $addcolspan = 0; - if (!empty($arrayfields['t.planned_workload']['checked'])) $addcolspan++; - if (!empty($arrayfields['t.progress']['checked'])) $addcolspan++; - foreach ($arrayfields as $key => $val) - { - if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++; + if (!empty($arrayfields['t.planned_workload']['checked'])) { + $addcolspan++; + } + if (!empty($arrayfields['t.progress']['checked'])) { + $addcolspan++; + } + foreach ($arrayfields as $key => $val) { + if ($val['checked'] && substr($key, 0, 5) == 'efpt.') { + $addcolspan++; + } } print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, ''.$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1); - if ($projectstatic->title) - { + if ($thirdpartystatic->id > 0) { + print ' - '.$thirdpartystatic->getNomUrl(1); + } + if ($projectstatic->title) { print ' - '; print ''.$projectstatic->title.''; } /* - $colspan=5+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2); - print ''; + $colspan=5+(empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)?0:2); + print '
    '; - print ''; + print ''; - // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); - if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); + // PROJECT fields + if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); + if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); - $extrafieldsobjectkey='projet'; - $extrafieldsobjectprefix='efp.'; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; + $extrafieldsobjectkey='projet'; + $extrafieldsobjectprefix='efp.'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; - print ''; - print ''; + print ''; + print ''; - // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) - { - print '\n"; - } - if (! empty($arrayfields['p.opp_amount']['checked'])) - { - print '\n"; - } - if (! empty($arrayfields['p.opp_percent']['checked'])) - { - print '\n"; - } - if (! empty($arrayfields['p.budget_amount']['checked'])) - { - print '\n"; - } - if (! empty($arrayfields['p.usage_bill_time']['checked'])) - { - print '\n"; - } + // PROJECT fields + if (! empty($arrayfields['p.fk_opp_status']['checked'])) + { + print '\n"; + } + if (! empty($arrayfields['p.opp_amount']['checked'])) + { + print '\n"; + } + if (! empty($arrayfields['p.opp_percent']['checked'])) + { + print '\n"; + } + if (! empty($arrayfields['p.budget_amount']['checked'])) + { + print '\n"; + } + if (! empty($arrayfields['p.usage_bill_time']['checked'])) + { + print '\n"; + } - $extrafieldsobjectkey='projet'; - $extrafieldsobjectprefix='efp.'; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + $extrafieldsobjectkey='projet'; + $extrafieldsobjectprefix='efp.'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - print ''; - print '
    '; - $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); - print "'; - print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); - print "'; - print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; - print "'; - print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); - print "'; - print yn($lines[$i]->usage_bill_time); - print "'; + $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); + if ($code) print $langs->trans("OppStatus".$code); + print "'; + print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + print "'; + print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; + print "'; + print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + print "'; + print yn($lines[$i]->usage_bill_time); + print "
    '; + print ''; + print ''; */ print ''; print ''; } - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + if ($oldprojectforbreak != -1) { + $oldprojectforbreak = $projectstatic->id; + } print ''."\n"; @@ -1225,30 +1457,36 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr */ // Project - if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) - { + if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { print ""; - if ($oldprojectforbreak == -1) print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + if ($oldprojectforbreak == -1) { + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + } print ""; } // Thirdparty - if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) - { + if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { print ''; - if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); + if ($thirdpartystatic->id > 0) { + print $thirdpartystatic->getNomUrl(1, 'project', 10); + } print ''; } // Ref print ''; print ''; - for ($k = 0; $k < $level; $k++) print '
    '; + for ($k = 0; $k < $level; $k++) { + print '
    '; + } print $taskstatic->getNomUrl(1, 'withproject', 'time'); // Label task print '
    '; print ''.$taskstatic->label.''; - for ($k = 0; $k < $level; $k++) print "
    "; + for ($k = 0; $k < $level; $k++) { + print "
    "; + } print "\n"; // TASK extrafields @@ -1257,53 +1495,59 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Planned Workload - if (!empty($arrayfields['t.planned_workload']['checked'])) - { + if (!empty($arrayfields['t.planned_workload']['checked'])) { print ''; - if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); - else print '--:--'; + if ($lines[$i]->planned_workload) { + print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); + } else { + print '--:--'; + } print ''; } // Progress declared % - if (!empty($arrayfields['t.progress']['checked'])) - { + if (!empty($arrayfields['t.progress']['checked'])) { print ''; print $formother->select_percent($lines[$i]->progress, $lines[$i]->id.'progress'); print ''; } - // Time spent by everybody - print ''; - // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user - if ($lines[$i]->duration) - { - print ''; - print convertSecondToTime($lines[$i]->duration, 'allhourmin'); - print ''; - } else print '--:--'; - print "\n"; + if (!empty($arrayfields['timeconsumed']['checked'])) { + // Time spent by everybody + print ''; + // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user + if ($lines[$i]->duration) { + print ''; + print convertSecondToTime($lines[$i]->duration, 'allhourmin'); + print ''; + } else { + print '--:--'; + } + print "\n"; - // Time spent by user - print ''; - $tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id); - if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); - else print '--:--'; - print "\n"; + // Time spent by user + print ''; + $tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id); + if ($tmptimespent['total_duration']) { + print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); + } else { + print '--:--'; + } + print "\n"; + } - $disabledproject = 1; $disabledtask = 1; + $disabledproject = 1; + $disabledtask = 1; //print "x".$lines[$i]->fk_project; //var_dump($lines[$i]); //var_dump($projectsrole[$lines[$i]->fk_project]); // If at least one role for project - if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { + if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) { $disabledproject = 0; $disabledtask = 0; } // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) { $disabledtask = 1; } @@ -1314,9 +1558,13 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print ''; $cssonholiday = ''; - if (!$isavailable[$preselectedday]['morning'] && !$isavailable[$preselectedday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$preselectedday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$preselectedday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$preselectedday]['morning'] && !$isavailable[$preselectedday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$preselectedday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$preselectedday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } global $daytoparse; $tmparray = dol_getdate($daytoparse, true); // detail of current day @@ -1324,8 +1572,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $idw = ($tmparray['wday'] - (empty($conf->global->MAIN_START_WEEK) ? 0 : 1)); global $numstartworkingday, $numendworkingday; $cssweekend = ''; - if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } @@ -1335,7 +1582,9 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $totalforeachday[$preselectedday] += $dayWorkLoad; $alreadyspent = ''; - if ($dayWorkLoad > 0) $alreadyspent = convertSecondToTime($dayWorkLoad, 'allhourmin'); + if ($dayWorkLoad > 0) { + $alreadyspent = convertSecondToTime($dayWorkLoad, 'allhourmin'); + } $idw = 0; @@ -1365,14 +1614,16 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr // Warning print ''; - if ((!$lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); - elseif ($disabledtask) - { - $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + if ((!$lines[$i]->public) && $disabledproject) { + print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); + } elseif ($disabledtask) { + $titleassigntask = $langs->trans("AssignTaskToMe"); + if ($fuser->id != $user->id) { + $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + } - print $form->textwithpicto('', $langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); - } + print $form->textwithpicto('', $langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); + } print ''; print "\n"; @@ -1380,15 +1631,13 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr $inc++; $level++; - if ($lines[$i]->id > 0) - { + if ($lines[$i]->id > 0) { //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level); //var_dump($totalforeachday); $ret = projectLinesPerDay($inc, $lines[$i]->id, $fuser, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $preselectedday, $isavailable, $oldprojectforbreak, $arrayfields, $extrafields); //var_dump('ret with parent='.$lines[$i]->id.' level='.$level); //var_dump($ret); - foreach ($ret as $key => $val) - { + foreach ($ret as $key => $val) { $totalforeachday[$key] += $val; } //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level.' + subtasks'); @@ -1436,50 +1685,45 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $lineswithoutlevel0 = array(); // Create a smaller array with sublevels only to be used later. This increase dramatically performances. - if ($parent == 0) // Always and only if at first level - { - for ($i = 0; $i < $numlines; $i++) - { - if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[] = $lines[$i]; + if ($parent == 0) { // Always and only if at first level + for ($i = 0; $i < $numlines; $i++) { + if ($lines[$i]->fk_task_parent) { + $lineswithoutlevel0[] = $lines[$i]; + } } } //dol_syslog('projectLinesPerWeek inc='.$inc.' firstdaytoshow='.$firstdaytoshow.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0)); - if (empty($oldprojectforbreak)) - { + if (empty($oldprojectforbreak)) { $oldprojectforbreak = (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : -1); // 0 = start break, -1 = never break } - for ($i = 0; $i < $numlines; $i++) - { - if ($parent == 0) $level = 0; + for ($i = 0; $i < $numlines; $i++) { + if ($parent == 0) { + $level = 0; + } - if ($lines[$i]->fk_task_parent == $parent) - { + if ($lines[$i]->fk_task_parent == $parent) { $obj = &$lines[$i]; // To display extrafields // If we want all or we have a role on task, we show it - if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) - { + if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) { //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); - if ($restricteditformytask == 2 && empty($tasksrole[$lines[$i]->id])) // we have no role on task and we request to hide such cases - { + if ($restricteditformytask == 2 && empty($tasksrole[$lines[$i]->id])) { // we have no role on task and we request to hide such cases continue; } // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) - { + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { $lastprojectid = $lines[$i]->fk_project; $projectstatic->id = $lines[$i]->fk_project; } //var_dump('--- '.$level.' '.$firstdaytoshow.' '.$fuser->id.' '.$projectstatic->id.' '.$workloadforid[$projectstatic->id]); //var_dump($projectstatic->weekWorkLoadPerTask); - if (empty($workloadforid[$projectstatic->id])) - { + if (empty($workloadforid[$projectstatic->id])) { $projectstatic->loadTimeSpent($firstdaytoshow, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week $workloadforid[$projectstatic->id] = 1; } @@ -1491,6 +1735,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $projectstatic->title = $lines[$i]->projectlabel; $projectstatic->public = $lines[$i]->public; $projectstatic->thirdparty_name = $lines[$i]->thirdparty_name; + $projectstatic->status = $lines[$i]->projectstatus; $taskstatic->id = $lines[$i]->id; $taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id); @@ -1502,22 +1747,27 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $thirdpartystatic->name = $lines[$i]->thirdparty_name; $thirdpartystatic->email = $lines[$i]->thirdparty_email; - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { $addcolspan = 0; - if (!empty($arrayfields['t.planned_workload']['checked'])) $addcolspan++; - if (!empty($arrayfields['t.progress']['checked'])) $addcolspan++; - foreach ($arrayfields as $key => $val) - { - if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++; + if (!empty($arrayfields['t.planned_workload']['checked'])) { + $addcolspan++; + } + if (!empty($arrayfields['t.progress']['checked'])) { + $addcolspan++; + } + foreach ($arrayfields as $key => $val) { + if ($val['checked'] && substr($key, 0, 5) == 'efpt.') { + $addcolspan++; + } } print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, ''.$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1); - if ($projectstatic->title) - { + if ($thirdpartystatic->id > 0) { + print ' - '.$thirdpartystatic->getNomUrl(1); + } + if ($projectstatic->title) { print ' - '; print ''.$projectstatic->title.''; } @@ -1528,65 +1778,67 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print ''; // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); - if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); - if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); + if (! empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER["PHP_SELF"], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); - $extrafieldsobjectkey='projet'; - $extrafieldsobjectprefix='efp.'; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; + $extrafieldsobjectkey='projet'; + $extrafieldsobjectprefix='efp.'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; - print ''; - print ''; + print ''; + print ''; - // PROJECT fields - if (! empty($arrayfields['p.fk_opp_status']['checked'])) - { - print ''; - $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); - print "\n"; - } - if (! empty($arrayfields['p.opp_amount']['checked'])) - { - print ''; - print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); - print "\n"; - } - if (! empty($arrayfields['p.opp_percent']['checked'])) - { - print ''; - print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; - print "\n"; - } - if (! empty($arrayfields['p.budget_amount']['checked'])) - { - print ''; - print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); - print "\n"; - } - if (! empty($arrayfields['p.usage_bill_time']['checked'])) - { - print ''; - print yn($lines[$i]->usage_bill_time); - print "\n"; - } + // PROJECT fields + if (! empty($arrayfields['p.fk_opp_status']['checked'])) + { + print ''; + $code = dol_getIdFromCode($db, $lines[$i]->fk_opp_status, 'c_lead_status', 'rowid', 'code'); + if ($code) print $langs->trans("OppStatus".$code); + print "\n"; + } + if (! empty($arrayfields['p.opp_amount']['checked'])) + { + print ''; + print price($lines[$i]->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + print "\n"; + } + if (! empty($arrayfields['p.opp_percent']['checked'])) + { + print ''; + print price($lines[$i]->opp_percent, 0, $langs, 1, 0).' %'; + print "\n"; + } + if (! empty($arrayfields['p.budget_amount']['checked'])) + { + print ''; + print price($lines[$i]->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + print "\n"; + } + if (! empty($arrayfields['p.usage_bill_time']['checked'])) + { + print ''; + print yn($lines[$i]->usage_bill_time); + print "\n"; + } - $extrafieldsobjectkey='projet'; - $extrafieldsobjectprefix='efp.'; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + $extrafieldsobjectkey='projet'; + $extrafieldsobjectprefix='efp.'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - print ''; - print ''; + print ''; + print ''; */ print ''; print ''; } - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + if ($oldprojectforbreak != -1) { + $oldprojectforbreak = $projectstatic->id; + } print ''."\n"; @@ -1598,30 +1850,36 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ */ // Project - if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) - { + if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { print ''; - if ($oldprojectforbreak == -1) print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + if ($oldprojectforbreak == -1) { + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + } print ""; } // Thirdparty - if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) - { + if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { print ''; - if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project'); + if ($thirdpartystatic->id > 0) { + print $thirdpartystatic->getNomUrl(1, 'project'); + } print ''; } // Ref print ''; print ''; - for ($k = 0; $k < $level; $k++) print '
    '; + for ($k = 0; $k < $level; $k++) { + print '
    '; + } print $taskstatic->getNomUrl(1, 'withproject', 'time'); // Label task print '
    '; print ''.$taskstatic->label.''; - for ($k = 0; $k < $level; $k++) print "
    "; + for ($k = 0; $k < $level; $k++) { + print "
    "; + } print "\n"; // TASK extrafields @@ -1630,111 +1888,123 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Planned Workload - if (!empty($arrayfields['t.planned_workload']['checked'])) - { + if (!empty($arrayfields['t.planned_workload']['checked'])) { print ''; - if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); - else print '--:--'; + if ($lines[$i]->planned_workload) { + print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); + } else { + print '--:--'; + } print ''; } - if (!empty($arrayfields['t.progress']['checked'])) - { + if (!empty($arrayfields['t.progress']['checked'])) { // Progress declared % print ''; print $formother->select_percent($lines[$i]->progress, $lines[$i]->id.'progress'); print ''; } - // Time spent by everybody - print ''; - // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user - if ($lines[$i]->duration) - { - print ''; - print convertSecondToTime($lines[$i]->duration, 'allhourmin'); - print ''; - } else print '--:--'; - print "\n"; + if (!empty($arrayfields['timeconsumed']['checked'])) { + // Time spent by everybody + print ''; + // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user + if ($lines[$i]->duration) { + print ''; + print convertSecondToTime($lines[$i]->duration, 'allhourmin'); + print ''; + } else { + print '--:--'; + } + print "\n"; - // Time spent by user - print ''; - $tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id); - if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); - else print '--:--'; - print "\n"; + // Time spent by user + print ''; + $tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id); + if ($tmptimespent['total_duration']) { + print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); + } else { + print '--:--'; + } + print "\n"; + } - $disabledproject = 1; $disabledtask = 1; + $disabledproject = 1; + $disabledtask = 1; //print "x".$lines[$i]->fk_project; //var_dump($lines[$i]); //var_dump($projectsrole[$lines[$i]->fk_project]); // If at least one role for project - if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { + if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) { $disabledproject = 0; $disabledtask = 0; } // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) { $disabledtask = 1; } //var_dump($projectstatic->weekWorkLoadPerTask); // Fields to show current time - $tableCell = ''; $modeinput = 'hours'; - for ($idw = 0; $idw < 7; $idw++) - { + $tableCell = ''; + $modeinput = 'hours'; + for ($idw = 0; $idw < 7; $idw++) { $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $cssonholiday = ''; - if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$tmpday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$tmpday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } $tmparray = dol_getdate($tmpday); $dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id]; $totalforeachday[$tmpday] += $dayWorkLoad; $alreadyspent = ''; - if ($dayWorkLoad > 0) $alreadyspent = convertSecondToTime($dayWorkLoad, 'allhourmin'); + if ($dayWorkLoad > 0) { + $alreadyspent = convertSecondToTime($dayWorkLoad, 'allhourmin'); + } $alttitle = $langs->trans("AddHereTimeSpentForDay", $tmparray['day'], $tmparray['mon']); global $numstartworkingday, $numendworkingday; $cssweekend = ''; - if (($idw + 1 < $numstartworkingday) || ($idw + 1 > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if (($idw + 1 < $numstartworkingday) || ($idw + 1 > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } $tableCell = ''; //$tableCell .= 'idw='.$idw.' '.$conf->global->MAIN_START_WEEK.' '.$numstartworkingday.'-'.$numendworkingday; $placeholder = ''; - if ($alreadyspent) - { + if ($alreadyspent) { $tableCell .= ''; //$placeholder=' placeholder="00:00"'; - //$tableCell.='+'; + //$tableCell.='+'; } - $tableCell .= ''; - $tableCell .= ''; + $tableCell .= ' onkeyup="updateTotal('.$idw.',\''.$modeinput.'\')"'; + $tableCell .= ' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />'; + $tableCell .= ''; print $tableCell; } // Warning print ''; - if ((!$lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); - elseif ($disabledtask) - { - $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + if ((!$lines[$i]->public) && $disabledproject) { + print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); + } elseif ($disabledtask) { + $titleassigntask = $langs->trans("AssignTaskToMe"); + if ($fuser->id != $user->id) { + $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + } - print $form->textwithpicto('', $langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); - } + print $form->textwithpicto('', $langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); + } print ''; print "\n"; @@ -1743,15 +2013,13 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ // Call to show task with a lower level (task under the current task) $inc++; $level++; - if ($lines[$i]->id > 0) - { + if ($lines[$i]->id > 0) { //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level); //var_dump($totalforeachday); $ret = projectLinesPerWeek($inc, $firstdaytoshow, $fuser, $lines[$i]->id, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $isavailable, $oldprojectforbreak, $arrayfields, $extrafields); //var_dump('ret with parent='.$lines[$i]->id.' level='.$level); //var_dump($ret); - foreach ($ret as $key => $val) - { + foreach ($ret as $key => $val) { $totalforeachday[$key] += $val; } //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level.' + subtasks'); @@ -1797,43 +2065,39 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & $lineswithoutlevel0 = array(); // Create a smaller array with sublevels only to be used later. This increase dramatically performances. - if ($parent == 0) // Always and only if at first level - { - for ($i = 0; $i < $numlines; $i++) - { - if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[] = $lines[$i]; + if ($parent == 0) { // Always and only if at first level + for ($i = 0; $i < $numlines; $i++) { + if ($lines[$i]->fk_task_parent) { + $lineswithoutlevel0[] = $lines[$i]; + } } } //dol_syslog('projectLinesPerWeek inc='.$inc.' firstdaytoshow='.$firstdaytoshow.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0)); - if (empty($oldprojectforbreak)) - { + if (empty($oldprojectforbreak)) { $oldprojectforbreak = (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : -1); // 0 = start break, -1 = never break } - for ($i = 0; $i < $numlines; $i++) - { - if ($parent == 0) $level = 0; + for ($i = 0; $i < $numlines; $i++) { + if ($parent == 0) { + $level = 0; + } - if ($lines[$i]->fk_task_parent == $parent) - { + if ($lines[$i]->fk_task_parent == $parent) { // If we want all or we have a role on task, we show it - if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) - { + if (empty($mine) || !empty($tasksrole[$lines[$i]->id])) { //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) - { + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { $lastprojectid = $lines[$i]->fk_project; $projectstatic->id = $lines[$i]->fk_project; } //var_dump('--- '.$level.' '.$firstdaytoshow.' '.$fuser->id.' '.$projectstatic->id.' '.$workloadforid[$projectstatic->id]); //var_dump($projectstatic->weekWorkLoadPerTask); - if (empty($workloadforid[$projectstatic->id])) - { + if (empty($workloadforid[$projectstatic->id])) { $projectstatic->loadTimeSpentMonth($firstdaytoshow, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week $workloadforid[$projectstatic->id] = 1; } @@ -1857,14 +2121,14 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & $thirdpartystatic->name = $lines[$i]->thirdparty_name; $thirdpartystatic->email = $lines[$i]->thirdparty_email; - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) { print ''."\n"; print ''; print $projectstatic->getNomUrl(1, '', 0, ''.$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($thirdpartystatic->id > 0) print ' - '.$thirdpartystatic->getNomUrl(1); - if ($projectstatic->title) - { + if ($thirdpartystatic->id > 0) { + print ' - '.$thirdpartystatic->getNomUrl(1); + } + if ($projectstatic->title) { print ' - '; print ''.$projectstatic->title.''; } @@ -1872,7 +2136,9 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & print ''; } - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + if ($oldprojectforbreak != -1) { + $oldprojectforbreak = $projectstatic->id; + } print ''."\n"; // User @@ -1895,18 +2161,25 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & // Ref print ''; print ''; - for ($k = 0; $k < $level; $k++) print '
    '; + for ($k = 0; $k < $level; $k++) { + print '
    '; + } print $taskstatic->getNomUrl(1, 'withproject', 'time'); // Label task print '
    '; print ''.$taskstatic->label.''; - for ($k = 0; $k < $level; $k++) print "
    "; + for ($k = 0; $k < $level; $k++) { + print "
    "; + } print "\n"; // Planned Workload print ''; - if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); - else print '--:--'; + if ($lines[$i]->planned_workload) { + print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); + } else { + print '--:--'; + } print ''; // Progress declared % @@ -1917,60 +2190,64 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & // Time spent by everybody print ''; // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user - if ($lines[$i]->duration) - { + if ($lines[$i]->duration) { print ''; print convertSecondToTime($lines[$i]->duration, 'allhourmin'); print ''; - } else print '--:--'; + } else { + print '--:--'; + } print "\n"; // Time spent by user print ''; $tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id); - if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); - else print '--:--'; + if ($tmptimespent['total_duration']) { + print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); + } else { + print '--:--'; + } print "\n"; - $disabledproject = 1; $disabledtask = 1; + $disabledproject = 1; + $disabledtask = 1; //print "x".$lines[$i]->fk_project; //var_dump($lines[$i]); //var_dump($projectsrole[$lines[$i]->fk_project]); // If at least one role for project - if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { + if ($lines[$i]->public || !empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) { $disabledproject = 0; $disabledtask = 0; } // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) { $disabledtask = 1; } //var_dump($projectstatic->weekWorkLoadPerTask); //TODO // Fields to show current time - $tableCell = ''; $modeinput = 'hours'; + $tableCell = ''; + $modeinput = 'hours'; $TFirstDay = getFirstDayOfEachWeek($TWeek, date('Y', $firstdaytoshow)); $TFirstDay[reset($TWeek)] = 1; foreach ($TFirstDay as &$fday) { $fday--; } - foreach ($TWeek as $weekNb) - { + foreach ($TWeek as $weekNb) { $weekWorkLoad = $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]; $totalforeachweek[$weekNb] += $weekWorkLoad; $alreadyspent = ''; - if ($weekWorkLoad > 0) $alreadyspent = convertSecondToTime($weekWorkLoad, 'allhourmin'); + if ($weekWorkLoad > 0) { + $alreadyspent = convertSecondToTime($weekWorkLoad, 'allhourmin'); + } $alttitle = $langs->trans("AddHereTimeSpentForWeek", $weekNb); $tableCell = ''; $placeholder = ''; - if ($alreadyspent) - { + if ($alreadyspent) { $tableCell .= ''; //$placeholder=' placeholder="00:00"'; //$tableCell.='+'; @@ -1986,11 +2263,13 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & // Warning print ''; - if ((!$lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); - elseif ($disabledtask) - { + if ((!$lines[$i]->public) && $disabledproject) { + print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); + } elseif ($disabledtask) { $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + if ($fuser->id != $user->id) { + $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + } print $form->textwithpicto('', $langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); } @@ -2002,15 +2281,13 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & // Call to show task with a lower level (task under the current task) $inc++; $level++; - if ($lines[$i]->id > 0) - { + if ($lines[$i]->id > 0) { //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level); //var_dump($totalforeachday); $ret = projectLinesPerMonth($inc, $firstdaytoshow, $fuser, $lines[$i]->id, ($parent == 0 ? $lineswithoutlevel0 : $lines), $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $isavailable, $oldprojectforbreak, $TWeek); //var_dump('ret with parent='.$lines[$i]->id.' level='.$level); //var_dump($ret); - foreach ($ret as $key => $val) - { + foreach ($ret as $key => $val) { $totalforeachweek[$key] += $val; } //var_dump('totalforeachday after taskid='.$lines[$i]->id.' and previous one on level '.$level.' + subtasks'); @@ -2039,14 +2316,11 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) { //print 'Search in line with parent id = '.$parent.'
    '; $numlines = count($lines); - for ($i = 0; $i < $numlines; $i++) - { + for ($i = 0; $i < $numlines; $i++) { // Process line $lines[$i] - if ($lines[$i]->fk_parent == $parent && $lines[$i]->id != $lines[$i]->fk_parent) - { + if ($lines[$i]->fk_parent == $parent && $lines[$i]->id != $lines[$i]->fk_parent) { // If task is legitimate to show, no more need to search deeper - if (isset($taskrole[$lines[$i]->id])) - { + if (isset($taskrole[$lines[$i]->id])) { //print 'Found a legitimate task id='.$lines[$i]->id.'
    '; $inc++; return $inc; @@ -2055,7 +2329,9 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) searchTaskInChild($inc, $lines[$i]->id, $lines, $taskrole); //print 'Found inc='.$inc.'
    '; - if ($inc > 0) return $inc; + if ($inc > 0) { + return $inc; + } } } @@ -2106,7 +2382,9 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $project_year_filter = 0; $title = $langs->trans("Projects"); - if (strcmp($status, '') && $status >= 0) $title = $langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$status]); + if (strcmp($status, '') && $status >= 0) { + $title = $langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$status]); + } $arrayidtypeofcontact = array(); @@ -2114,8 +2392,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print ''; $sql = " FROM ".MAIN_DB_PREFIX."projet as p"; - if ($mytasks) - { + if ($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"; @@ -2123,28 +2400,25 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; } $sql .= " WHERE p.entity IN (".getEntity('project').")"; - $sql .= " AND p.rowid IN (".$projectsListId.")"; - if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; - if ($mytasks) - { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; + if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; + } + if ($mytasks) { $sql .= " AND p.rowid = t.fk_projet"; $sql .= " AND ec.element_id = t.rowid"; $sql .= " AND ec.fk_socpeople = ".$user->id; $sql .= " AND ec.fk_c_type_contact = ctc.rowid"; // Replace the 2 lines with ec.fk_c_type_contact in $arrayidtypeofcontact $sql .= " AND ctc.element = 'project_task'"; } - if ($status >= 0) - { + if ($status >= 0) { $sql .= " AND p.fk_statut = ".(int) $status; } - if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) - { + if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) { $project_year_filter = GETPOST("project_year_filter"); //Check if empty or invalid year. Wildcard ignores the sql check - if ($project_year_filter != "*") - { - if (empty($project_year_filter) || !ctype_digit($project_year_filter)) - { + if ($project_year_filter != "*") { + if (empty($project_year_filter) || !ctype_digit($project_year_filter)) { $project_year_filter = date("Y"); } $sql .= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($project_year_filter, 12, false)).")"; @@ -2157,18 +2431,20 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql1 = "SELECT p.rowid as projectid"; $sql1 .= $sql; $resql = $db->query($sql1); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $arrayidofprojects[$objp->projectid] = $objp->projectid; $i++; } - } else dol_print_error($db); - if (empty($arrayidofprojects)) $arrayidofprojects[0] = -1; + } 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,"; @@ -2182,14 +2458,13 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql2 .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; $sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; - $sql2 .= " WHERE p.rowid IN (".join(',', $arrayidofprojects).")"; + $sql2 .= " WHERE p.rowid IN (".$db->sanitize(join(',', $arrayidofprojects)).")"; $sql2 .= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur,"; $sql2 .= " s.logo, s.email, s.entity, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee"; $sql2 .= " ORDER BY p.title, p.ref"; $resql = $db->query($sql2); - if ($resql) - { + if ($resql) { $total_task = 0; $total_opp_amount = 0; $ponderated_opp_amount = 0; @@ -2198,27 +2473,32 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $i = 0; print ''; - print_liste_field_titre($title.''.$num.'', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre($title.''.$num.'', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - if (!in_array('prospectionstatus', $hiddenfields)) print_liste_field_titre("OpportunityStatus", "", "", "", "", '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("OpportunityAmount", "", "", "", "", 'align="right"', $sortfield, $sortorder); + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + if (!in_array('prospectionstatus', $hiddenfields)) { + print_liste_field_titre("OpportunityStatus", "", "", "", "", 'style="max-width: 100px"', $sortfield, $sortorder, 'center '); + } + print_liste_field_titre($form->textwithpicto($langs->trans("Amount"), $langs->trans("OpportunityAmount").' ('.$langs->trans("Tooltip").' = '.$langs->trans("OpportunityWeightedAmount").')'), "", "", "", "", 'style="max-width: 100px"', $sortfield, $sortorder, 'right '); //print_liste_field_titre('OpportunityWeightedAmount', '', '', '', '', 'align="right"', $sortfield, $sortorder); } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print_liste_field_titre("Tasks", "", "", "", "", 'align="right"', $sortfield, $sortorder); - if (!in_array('plannedworkload', $hiddenfields)) print_liste_field_titre("PlannedWorkload", "", "", "", "", '', $sortfield, $sortorder, 'right '); - if (!in_array('declaredprogress', $hiddenfields)) print_liste_field_titre("ProgressDeclared", "", "", "", "", '', $sortfield, $sortorder, 'right '); + if (!in_array('plannedworkload', $hiddenfields)) { + print_liste_field_titre("PlannedWorkload", "", "", "", "", 'style="max-width: 100px"', $sortfield, $sortorder, 'right '); + } + if (!in_array('declaredprogress', $hiddenfields)) { + print_liste_field_titre("%", "", "", "", "", '', $sortfield, $sortorder, 'right ', $langs->trans("ProgressDeclared")); + } + } + if (!in_array('projectstatus', $hiddenfields)) { + print_liste_field_titre("Status", "", "", "", "", '', $sortfield, $sortorder, 'right '); } - if (!in_array('projectstatus', $hiddenfields)) print_liste_field_titre("Status", "", "", "", "", '', $sortfield, $sortorder, 'right '); print "\n"; $total_plannedworkload = 0; $total_declaredprogressworkload = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $projectstatic->id = $objp->projectid; @@ -2227,8 +2507,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks // Check is user has read permission on project $userAccess = $projectstatic->restrictedProjectArea($user); - if ($userAccess >= 0) - { + if ($userAccess >= 0) { $projectstatic->ref = $objp->ref; $projectstatic->status = $objp->status; $projectstatic->title = $objp->title; @@ -2239,12 +2518,13 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print ''; print ''; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { if (!in_array('prospectionstatus', $hiddenfields)) { print ''; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print ''; $plannedworkload = $objp->planned_workload; $total_plannedworkload += $plannedworkload; - if (!in_array('plannedworkload', $hiddenfields)) - { + if (!in_array('plannedworkload', $hiddenfields)) { print ''; } - if (!in_array('declaredprogress', $hiddenfields)) - { + if (!in_array('declaredprogress', $hiddenfields)) { $declaredprogressworkload = $objp->declared_progess_workload; $total_declaredprogressworkload += $declaredprogressworkload; print ''; print '"; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { if (!in_array('prospectionstatus', $hiddenfields)) { print ''; } print ''; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print ''; - if (!in_array('plannedworkload', $hiddenfields)) print ''; - if (!in_array('declaredprogress', $hiddenfields)) print ''; + if (!in_array('plannedworkload', $hiddenfields)) { + print ''; + } + if (!in_array('declaredprogress', $hiddenfields)) { + print ''; + } } if (!in_array('projectstatus', $hiddenfields)) { print ''; @@ -2367,8 +2647,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print "
    '; print $projectstatic->getNomUrl(1, '', 0, '', '-', 0, -1, 'nowraponall'); - if (!in_array('projectlabel', $hiddenfields)) print '
    '.dol_trunc($objp->title, 24).''; + if (!in_array('projectlabel', $hiddenfields)) { + print '
    '.dol_trunc($objp->title, 24).''; + } print '
    '; - if ($objp->fk_soc > 0) - { + if ($objp->fk_soc > 0) { $thirdpartystatic->id = $objp->socid; $thirdpartystatic->name = $objp->socname; //$thirdpartystatic->name_alias = $objp->name_alias; @@ -2261,8 +2541,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks } print ''; // Because color of prospection status has no meaning yet, it is used if hidden constant is set @@ -2296,22 +2575,21 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $alttext = $langs->trans("OpportunityWeightedAmount").' '.price($opp_weighted_amount, 0, '', 1, -1, 0, $conf->currency); $ponderated_opp_amount += price2num($opp_weighted_amount); } - if ($objp->opp_amount) print ''.price($objp->opp_amount, 0, '', 1, -1, 0, $conf->currency).''; + if ($objp->opp_amount) { + print ''.$form->textwithpicto(price($objp->opp_amount, 0, '', 1, -1, 0), $alttext).''; + } print ''.$objp->nb.''.($plannedworkload ?convertSecondToTime($plannedworkload) : '').''; @@ -2338,21 +2616,23 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print '
    '.$langs->trans("Total")."'; //$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1); - print $form->textwithpicto(price($total_opp_amount, 0, '', 1, -1, 0, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc").' : '.price($ponderated_opp_amount, 0, '', 1, -1, 0, $conf->currency)); + print $form->textwithpicto(price($total_opp_amount, 0, '', 1, -1, 0), $langs->trans("OpportunityPonderatedAmountDesc").' : '.price($ponderated_opp_amount, 0, '', 1, -1, 0, $conf->currency)); print ''.$total_task.''.($total_plannedworkload ?convertSecondToTime($total_plannedworkload) : '').''.($total_plannedworkload ?round(100 * $total_declaredprogressworkload / $total_plannedworkload, 0).'%' : '').''.($total_plannedworkload ?convertSecondToTime($total_plannedworkload) : '').''.($total_plannedworkload ?round(100 * $total_declaredprogressworkload / $total_plannedworkload, 0).'%' : '').'
    "; print ''; - if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) - { + if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) { //Add the year filter input print ''; print ''; @@ -2397,8 +2676,12 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $plannedworkloadoutputformat = 'allhourmin'; $timespentoutputformat = 'allhourmin'; - if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; - if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; + if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) { + $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; + } + if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) { + $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; + } if (empty($task->progress) && !empty($hideOnProgressNull)) { return ''; @@ -2437,8 +2720,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= '
    '; - if ($label !== false) - { + if ($label !== false) { $out .= ' '; if ($label !== true) { @@ -2450,21 +2732,25 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide } - if ($progressNumber !== false) - { + if ($progressNumber !== false) { $out .= ' '; if ($progressNumber !== true) { $out .= $progressNumber; // replace label by param } else { - if ($task->hasDelay()) $out .= img_warning($langs->trans("Late")).' '; + if ($task->hasDelay()) { + $out .= img_warning($langs->trans("Late")).' '; + } $url = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$task->id; $out .= !empty($diff) ? $diff.' ' : ''; $out .= ''; $out .= ''; - if ($task->duration_effective) $out .= convertSecondToTime($task->duration_effective, $timespentoutputformat); - else $out .= '--:--'; + if ($task->duration_effective) { + $out .= convertSecondToTime($task->duration_effective, $timespentoutputformat); + } else { + $out .= '--:--'; + } $out .= ''; $out .= ''; @@ -2472,8 +2758,11 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= ''; $out .= ''; - if ($task->planned_workload) $out .= convertSecondToTime($task->planned_workload, $plannedworkloadoutputformat); - else $out .= '--:--'; + if ($task->planned_workload) { + $out .= convertSecondToTime($task->planned_workload, $plannedworkloadoutputformat); + } else { + $out .= '--:--'; + } $out .= ''; } $out .= ' '; @@ -2516,8 +2805,7 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') $out = ''; $badgeClass = ''; - if ($task->progress != '') - { + if ($task->progress != '') { // TODO : manage 100% // define color according to time spend vs workload @@ -2535,10 +2823,14 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') } } elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $badgeClass .= 'badge-warning'; - if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + if (empty($tooltip)) { + $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + } } else { $badgeClass .= 'badge-success'; - if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + if (empty($tooltip)) { + $tooltip = $task->progress.'% >= '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + } } } } diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index bd3a30151da..3ddd3ab1b2b 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -43,24 +43,28 @@ function propal_prepare_head($object) $h++; if ((empty($conf->commande->enabled) && ((!empty($conf->expedition->enabled) && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->delivery->lire)))) - { + || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->delivery->lire)))) { $langs->load("sendings"); $text = ''; $head[$h][0] = DOL_URL_ROOT.'/expedition/propal.php?id='.$object->id; - if ($conf->expedition_bon->enabled) $text = $langs->trans("Shipment"); - if ($conf->delivery_note->enabled) $text .= '/'.$langs->trans("Receivings"); + if ($conf->expedition_bon->enabled) { + $text = $langs->trans("Shipment"); + } + if ($conf->delivery_note->enabled) { + $text .= '/'.$langs->trans("Receivings"); + } $head[$h][1] = $text; $head[$h][2] = 'shipping'; $h++; } - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -71,14 +75,19 @@ function propal_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'propal'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -90,7 +99,9 @@ function propal_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/receiptprinter.lib.php b/htdocs/core/lib/receiptprinter.lib.php index e5589f30707..7bbfbc66387 100644 --- a/htdocs/core/lib/receiptprinter.lib.php +++ b/htdocs/core/lib/receiptprinter.lib.php @@ -47,8 +47,7 @@ function receiptprinteradmin_prepare_head($mode) $head[$h][2] = 'template'; $h++; - if ($mode == 'test') - { + if ($mode == 'test') { $head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=test"; $head[$h][1] = $langs->trans("TargetedPrinter"); $head[$h][2] = 'test'; diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index f36295e31f3..42355497286 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -47,18 +47,18 @@ function reception_prepare_head(Reception $object) $head[$h][2] = 'reception'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $objectsrc = $object; - if ($object->origin == 'commande' && $object->origin_id > 0) - { + 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.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -70,11 +70,17 @@ function reception_prepare_head(Reception $object) complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception'); $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + 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.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; @@ -103,16 +109,14 @@ function reception_admin_prepare_head() complete_head_from_modules($conf, $langs, null, $head, $h, 'reception_admin'); - if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) - { + 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++; } - if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) - { + 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'; diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index b23acd76a5b..a4279d27a95 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -44,7 +44,9 @@ function report_header($reportname, $notused, $period, $periodlink, $description print "\n\n\n"; - if (!empty($varlink)) $varlink = '?'.$varlink; + if (!empty($varlink)) { + $varlink = '?'.$varlink; + } $head = array(); @@ -58,8 +60,7 @@ function report_header($reportname, $notused, $period, $periodlink, $description print dol_get_fiche_head($head, 'report'); - foreach ($moreparam as $key => $value) - { + foreach ($moreparam as $key => $value) { print ''."\n"; } @@ -73,17 +74,20 @@ function report_header($reportname, $notused, $period, $periodlink, $description print '
    '; - if ($variante) print ''; + if ($variante) { + print ''; + } print ''."\n"; // Calculation mode - if ($calcmode) - { + if ($calcmode) { print ''; print ''; print ''; + if ($variante) { + print ''; + } print ''; print ''."\n"; } @@ -92,8 +96,12 @@ function report_header($reportname, $notused, $period, $periodlink, $description print ''; print ''; print ''; + if ($period) { + print $period; + } + if ($variante) { + print ''; + } print ''; print ''."\n"; @@ -101,7 +109,9 @@ function report_header($reportname, $notused, $period, $periodlink, $description print ''; print ''; print ''; - if ($variante) print ''; + if ($variante) { + print ''; + } print ''."\n"; // Ligne d'export @@ -110,7 +120,9 @@ function report_header($reportname, $notused, $period, $periodlink, $description print ''; - if ($variante) print ''; + if ($variante) { + print ''; + } print ''."\n"; print '
    '; print $reportname; print '
    '.$langs->trans("CalculationMode").''; print $calcmode; - if ($variante) print '
    '.$langs->trans("ReportPeriod").''; - if ($period) print $period; - if ($variante) print ''.$periodlink.''.$periodlink.'
    '.$langs->trans("ReportDescription").''.$description.'
    '; print dol_print_date($builddate, 'dayhour'); print ''.($exportlink ? $langs->trans("Export").': '.$exportlink : '').''.($exportlink ? $langs->trans("Export").': '.$exportlink : '').'
    '."\n"; diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php index a4ba796078f..29cd8a5b089 100644 --- a/htdocs/core/lib/resource.lib.php +++ b/htdocs/core/lib/resource.lib.php @@ -40,12 +40,13 @@ function resource_prepare_head($object) $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))) - { + 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; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -56,14 +57,19 @@ function resource_prepare_head($object) // $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, 'resource'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/resource/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -73,14 +79,15 @@ function resource_prepare_head($object) $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $head[$h][0] = DOL_URL_ROOT.'/resource/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if ($nbFiles > 0) $head[$h][1] .= ''.$nbFiles.''; + if ($nbFiles > 0) { + $head[$h][1] .= ''.$nbFiles.''; + } $head[$h][2] = 'documents'; $h++; $head[$h][0] = DOL_URL_ROOT.'/resource/agenda.php?id='.$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))) - { + 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"); } diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index f4662f43991..57cb9675e3f 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -2,6 +2,7 @@ /** * Copyright (C) 2015 Charlie BENKE * Copyright (C) 2019 Alexandre Spangaro + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ function salaries_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/salaries/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("SalaryPayment"); + $head[$h][1] = $langs->trans("Salary"); $head[$h][2] = 'card'; $h++; @@ -50,7 +51,9 @@ function salaries_prepare_head($object) $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).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 9d18dd1dd85..e1df5da4dfb 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -37,21 +37,17 @@ */ function dol_encode($chain, $key = '1') { - if (is_numeric($key) && $key == '1') // rule 1 is offset of 17 for char - { + if (is_numeric($key) && $key == '1') { // rule 1 is offset of 17 for char $output_tab = array(); $strlength = dol_strlen($chain); - for ($i = 0; $i < $strlength; $i++) - { + for ($i = 0; $i < $strlength; $i++) { $output_tab[$i] = chr(ord(substr($chain, $i, 1)) + 17); } $chain = implode("", $output_tab); - } elseif ($key) - { + } elseif ($key) { $result = ''; $strlength = dol_strlen($chain); - for ($i = 0; $i < $strlength; $i++) - { + for ($i = 0; $i < $strlength; $i++) { $keychar = substr($key, ($i % strlen($key)) - 1, 1); $result .= chr(ord(substr($chain, $i, 1)) + (ord($keychar) - 65)); } @@ -74,22 +70,18 @@ function dol_decode($chain, $key = '1') { $chain = base64_decode($chain); - if (is_numeric($key) && $key == '1') // rule 1 is offset of 17 for char - { + if (is_numeric($key) && $key == '1') { // rule 1 is offset of 17 for char $output_tab = array(); $strlength = dol_strlen($chain); - for ($i = 0; $i < $strlength; $i++) - { + for ($i = 0; $i < $strlength; $i++) { $output_tab[$i] = chr(ord(substr($chain, $i, 1)) - 17); } $chain = implode("", $output_tab); - } elseif ($key) - { + } elseif ($key) { $result = ''; $strlength = dol_strlen($chain); - for ($i = 0; $i < $strlength; $i++) - { + for ($i = 0; $i < $strlength; $i++) { $keychar = substr($key, ($i % strlen($key)) - 1, 1); $result .= chr(ord(substr($chain, $i, 1)) - (ord($keychar) - 65)); } @@ -115,21 +107,30 @@ function dol_hash($chain, $type = '0') global $conf; // No need to add salt for password_hash - if (($type == '0' || $type == 'auto') && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_hash')) - { + if (($type == '0' || $type == 'auto') && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_hash')) { return password_hash($chain, PASSWORD_DEFAULT); } // Salt value - if (!empty($conf->global->MAIN_SECURITY_SALT) && $type != '4' && $type !== 'md5openldap') $chain = $conf->global->MAIN_SECURITY_SALT.$chain; + if (!empty($conf->global->MAIN_SECURITY_SALT) && $type != '4' && $type !== 'md5openldap') { + $chain = $conf->global->MAIN_SECURITY_SALT.$chain; + } - if ($type == '1' || $type == 'sha1') return sha1($chain); - elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain)); - elseif ($type == '3' || $type == 'md5') return md5($chain); - elseif ($type == '4' || $type == 'md5openldap') return '{md5}'.base64_encode(mhash(MHASH_MD5, $chain)); // For OpenLdap with md5 (based on an unencrypted password in base) - elseif ($type == '5') return hash('sha256', $chain); - elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain); - elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain)); + if ($type == '1' || $type == 'sha1') { + return sha1($chain); + } elseif ($type == '2' || $type == 'sha1md5') { + return sha1(md5($chain)); + } elseif ($type == '3' || $type == 'md5') { + return md5($chain); + } elseif ($type == '4' || $type == 'md5openldap') { + return '{md5}'.base64_encode(mhash(MHASH_MD5, $chain)); // For OpenLdap with md5 (based on an unencrypted password in base) + } elseif ($type == '5') { + return hash('sha256', $chain); + } elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') { + return sha1($chain); + } elseif (!empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') { + return sha1(md5($chain)); + } // No particular encoding defined, use default return md5($chain); @@ -151,9 +152,13 @@ function dol_verifyHash($chain, $hash, $type = '0') global $conf; if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) { - if ($hash[0] == '$') return password_verify($chain, $hash); - elseif (strlen($hash) == 32) return dol_verifyHash($chain, $hash, '3'); // md5 - elseif (strlen($hash) == 40) return dol_verifyHash($chain, $hash, '2'); // sha1md5 + if ($hash[0] == '$') { + return password_verify($chain, $hash); + } elseif (strlen($hash) == 32) { + return dol_verifyHash($chain, $hash, '3'); // md5 + } elseif (strlen($hash) == 40) { + return dol_verifyHash($chain, $hash, '2'); // sha1md5 + } return false; } @@ -192,68 +197,131 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f // Fix syntax of $features param $originalfeatures = $features; - 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'; + 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, 'originalfeatures'=>$originalfeatures, 'objectid'=>$objectid, 'dbt_select'=>$dbt_select, 'idtype'=>$dbt_select, 'isdraft'=>$isdraft); $reshook = $hookmanager->executeHooks('restrictedArea', $parameters); if (isset($hookmanager->resArray['result'])) { - if ($hookmanager->resArray['result'] == 0) accessforbidden(); // Module returns 0, so access forbidden + if ($hookmanager->resArray['result'] == 0) { + accessforbidden(); // Module returns 0, so access forbidden + } } if ($reshook > 0) { // No other test done. return 1; } - if ($dbt_select != 'rowid' && $dbt_select != 'id') $objectid = "'".$objectid."'"; + if ($dbt_select != 'rowid' && $dbt_select != 'id') { + $objectid = "'".$objectid."'"; + } // Features/modules to check $featuresarray = array($features); - if (preg_match('/&/', $features)) $featuresarray = explode("&", $features); - elseif (preg_match('/\|/', $features)) $featuresarray = explode("|", $features); + if (preg_match('/&/', $features)) { + $featuresarray = explode("&", $features); + } elseif (preg_match('/\|/', $features)) { + $featuresarray = explode("|", $features); + } // More subfeatures to check - if (!empty($feature2)) $feature2 = explode("|", $feature2); + if (!empty($feature2)) { + $feature2 = explode("|", $feature2); + } $listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // Check read permission from module - $readok = 1; $nbko = 0; + $readok = 1; + $nbko = 0; foreach ($featuresarray as $feature) { // first we check nb of test ko $featureforlistofmodule = $feature; - if ($featureforlistofmodule == 'produit') $featureforlistofmodule = 'product'; + if ($featureforlistofmodule == 'produit') { + $featureforlistofmodule = 'product'; + } if (!empty($user->socid) && !empty($conf->global->MAIN_MODULES_FOR_EXTERNAL) && !in_array($featureforlistofmodule, $listofmodules)) { // If limits on modules for external users, module must be into list of modules for external users - $readok = 0; $nbko++; + $readok = 0; + $nbko++; continue; } if ($feature == 'societe') { - if (!$user->rights->societe->lire && !$user->rights->fournisseur->lire) { $readok = 0; $nbko++; } + if (!$user->rights->societe->lire && !$user->rights->fournisseur->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'contact') { - if (!$user->rights->societe->contact->lire) { $readok = 0; $nbko++; } + if (!$user->rights->societe->contact->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'produit|service') { - if (!$user->rights->produit->lire && !$user->rights->service->lire) { $readok = 0; $nbko++; } + if (!$user->rights->produit->lire && !$user->rights->service->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'prelevement') { - if (!$user->rights->prelevement->bons->lire) { $readok = 0; $nbko++; } + if (!$user->rights->prelevement->bons->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'cheque') { - if (!$user->rights->banque->cheque) { $readok = 0; $nbko++; } + if (!$user->rights->banque->cheque) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'projet') { - if (!$user->rights->projet->lire && !$user->rights->projet->all->lire) { $readok = 0; $nbko++; } + if (!$user->rights->projet->lire && !$user->rights->projet->all->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'payment') { - if (!$user->rights->facture->lire) { $readok = 0; $nbko++; } + if (!$user->rights->facture->lire) { + $readok = 0; + $nbko++; + } } elseif ($feature == 'payment_supplier') { - if (!$user->rights->fournisseur->facture->lire) { $readok = 0; $nbko++; } + if (!$user->rights->fournisseur->facture->lire) { + $readok = 0; + $nbko++; + } } elseif (!empty($feature2)) { // This is for permissions on 2 levels $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 ($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 (!$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). @@ -262,45 +330,79 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f } elseif (!empty($feature) && ($feature != 'user' && $feature != 'usergroup')) { // This is permissions on 1 level if (empty($user->rights->$feature->lire) && empty($user->rights->$feature->read) - && empty($user->rights->$feature->run)) { $readok = 0; $nbko++; } + && empty($user->rights->$feature->run)) { + $readok = 0; + $nbko++; + } } } // If a or and at least one ok - if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) $readok = 1; + if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) { + $readok = 1; + } - if (!$readok) accessforbidden(); + if (!$readok) { + accessforbidden(); + } //print "Read access is ok"; // Check write permission from module (we need to know write permission to create but also to delete drafts record or to upload files) - $createok = 1; $nbko = 0; + $createok = 1; + $nbko = 0; $wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || GETPOST('action', 'aZ09') == 'create' || GETPOST('action', 'aZ09') == 'update'); $wemustcheckpermissionfordeletedraft = ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete'); - if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) - { - foreach ($featuresarray as $feature) - { + if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) { + foreach ($featuresarray as $feature) { if ($feature == 'contact') { - if (!$user->rights->societe->contact->creer) { $createok = 0; $nbko++; } + if (!$user->rights->societe->contact->creer) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'produit|service') { - if (!$user->rights->produit->creer && !$user->rights->service->creer) { $createok = 0; $nbko++; } + if (!$user->rights->produit->creer && !$user->rights->service->creer) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'prelevement') { - if (!$user->rights->prelevement->bons->creer) { $createok = 0; $nbko++; } + if (!$user->rights->prelevement->bons->creer) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'commande_fournisseur') { - if (!$user->rights->fournisseur->commande->creer) { $createok = 0; $nbko++; } + if (!$user->rights->fournisseur->commande->creer || !$user->rights->supplier_order->creer) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'banque') { - if (!$user->rights->banque->modifier) { $createok = 0; $nbko++; } + if (!$user->rights->banque->modifier) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'cheque') { - if (!$user->rights->banque->cheque) { $createok = 0; $nbko++; } + if (!$user->rights->banque->cheque) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'import') { - if (!$user->rights->import->run) { $createok = 0; $nbko++; } + if (!$user->rights->import->run) { + $createok = 0; + $nbko++; + } } elseif ($feature == 'ecm') { - if (!$user->rights->ecm->upload) { $createok = 0; $nbko++; } + if (!$user->rights->ecm->upload) { + $createok = 0; + $nbko++; + } } 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 + 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 + } if (empty($user->rights->$feature->$subfeature->creer) && empty($user->rights->$feature->$subfeature->write) @@ -325,82 +427,103 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f } // If a or and at least one ok - if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) $createok = 1; + if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) { + $createok = 1; + } - if ($wemustcheckpermissionforcreate && !$createok) accessforbidden(); + if ($wemustcheckpermissionforcreate && !$createok) { + accessforbidden(); + } //print "Write access is ok"; } // Check create user permission $createuserok = 1; - if (GETPOST('action', 'aZ09') == 'confirm_create_user' && GETPOST("confirm", 'aZ09') == 'yes') - { - if (!$user->rights->user->user->creer) $createuserok = 0; + if (GETPOST('action', 'aZ09') == 'confirm_create_user' && GETPOST("confirm", 'aZ09') == 'yes') { + if (!$user->rights->user->user->creer) { + $createuserok = 0; + } - if (!$createuserok) accessforbidden(); + if (!$createuserok) { + accessforbidden(); + } //print "Create user access is ok"; } // Check delete permission from module - $deleteok = 1; $nbko = 0; - if ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete') - { - foreach ($featuresarray as $feature) - { - if ($feature == 'contact') - { - if (!$user->rights->societe->contact->supprimer) $deleteok = 0; - } elseif ($feature == 'produit|service') - { - if (!$user->rights->produit->supprimer && !$user->rights->service->supprimer) $deleteok = 0; - } elseif ($feature == 'commande_fournisseur') - { - if (!$user->rights->fournisseur->commande->supprimer) $deleteok = 0; - } elseif ($feature == 'banque') - { - if (!$user->rights->banque->modifier) $deleteok = 0; - } elseif ($feature == 'cheque') - { - if (!$user->rights->banque->cheque) $deleteok = 0; - } elseif ($feature == 'ecm') - { - if (!$user->rights->ecm->upload) $deleteok = 0; - } elseif ($feature == 'ftp') - { - if (!$user->rights->ftp->write) $deleteok = 0; - } elseif ($feature == 'salaries') - { - if (!$user->rights->salaries->delete) $deleteok = 0; - } elseif ($feature == 'salaries') - { - if (!$user->rights->salaries->delete) $deleteok = 0; - } 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 + $deleteok = 1; + $nbko = 0; + if ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete') { + foreach ($featuresarray as $feature) { + if ($feature == 'contact') { + if (!$user->rights->societe->contact->supprimer) { + $deleteok = 0; } - } elseif (!empty($feature)) // This is used for permissions on 1 level - { + } elseif ($feature == 'produit|service') { + if (!$user->rights->produit->supprimer && !$user->rights->service->supprimer) { + $deleteok = 0; + } + } elseif ($feature == 'commande_fournisseur') { + if (!$user->rights->fournisseur->commande->supprimer) { + $deleteok = 0; + } + } elseif ($feature == 'banque') { + if (!$user->rights->banque->modifier) { + $deleteok = 0; + } + } elseif ($feature == 'cheque') { + if (!$user->rights->banque->cheque) { + $deleteok = 0; + } + } elseif ($feature == 'ecm') { + if (!$user->rights->ecm->upload) { + $deleteok = 0; + } + } elseif ($feature == 'ftp') { + if (!$user->rights->ftp->write) { + $deleteok = 0; + } + } elseif ($feature == 'salaries') { + if (!$user->rights->salaries->delete) { + $deleteok = 0; + } + } elseif ($feature == 'salaries') { + if (!$user->rights->salaries->delete) { + $deleteok = 0; + } + } 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 //print '
    feature='.$feature.' creer='.$user->rights->$feature->supprimer.' write='.$user->rights->$feature->delete; if (empty($user->rights->$feature->supprimer) && empty($user->rights->$feature->delete) - && empty($user->rights->$feature->run)) $deleteok = 0; + && empty($user->rights->$feature->run)) { + $deleteok = 0; + } } } // If a or and at least one ok - if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) $deleteok = 1; + if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) { + $deleteok = 1; + } - if (!$deleteok && !($isdraft && $createok)) accessforbidden(); + if (!$deleteok && !($isdraft && $createok)) { + accessforbidden(); + } //print "Delete access is ok"; } // If we have a particular object to check permissions on, we check this object // is linked to a company allowed to $user. - if (!empty($objectid) && $objectid > 0) - { + if (!empty($objectid) && $objectid > 0) { $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); @@ -411,7 +534,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f /** * Check access by user to object. - * This function is also called by restrictedArea + * This function is also called by restrictedArea that check before if module is enabled and permissions of user compared to $action. * * @param User $user User to check * @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...) @@ -437,16 +560,23 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $dbtablename = (!empty($params[0]) ? $params[0] : ''); $sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename); - foreach ($featuresarray as $feature) - { + foreach ($featuresarray as $feature) { $sql = ''; - // For backward compatibility - if ($feature == 'member') $feature = 'adherent'; - if ($feature == 'project') $feature = 'projet'; - if ($feature == 'task') $feature = 'projet_task'; + //var_dump($feature); - $check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'website'); // Test on entity only (Objects with no link to company) + // For backward compatibility + if ($feature == 'member') { + $feature = 'adherent'; + } + if ($feature == 'project') { + $feature = 'projet'; + } + if ($feature == 'task') { + $feature = 'projet_task'; + } + + $check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salary', '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 + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet', 'project'); // Test for project object @@ -455,54 +585,54 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand //$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...). // If dbtablename not defined, we use same name for table than module name - if (empty($dbtablename)) - { + if (empty($dbtablename)) { $dbtablename = $feature; $sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename); // We change dbtablename, so we set sharedelement too. } // Check permission for object on entity only - if (in_array($feature, $check)) - { + if (in_array($feature, $check)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; if (($feature == 'user' || $feature == 'usergroup') && !empty($conf->multicompany->enabled)) { // Special for multicompany if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if ($conf->entity == 1 && $user->admin && !$user->entity) { - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IS NOT NULL"; } else { $sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $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 .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } 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 .= " WHERE dbt.".$reg[1]." = dbtp.rowid AND dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbtp.entity IN (".getEntity($sharedelement, 1).")"; } else { - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } } elseif (in_array($feature, $checksoc)) { // We check feature = checksoc + // If external user: Check permission for external users if ($user->socid > 0) { - // If external user: Check permission for external users - if ($user->socid <> $objectid) return false; + if ($user->socid <> $objectid) { + return false; + } } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { // If internal user: Check permission for internal users that are restricted on their objects $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= ", ".MAIN_DB_PREFIX."societe as s)"; - $sql .= " WHERE sc.fk_soc IN (".$objectid.")"; + $sql .= " WHERE sc.fk_soc IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND sc.fk_user = ".$user->id; $sql .= " AND sc.fk_soc = s.rowid"; $sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")"; @@ -510,37 +640,33 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(s.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql .= " WHERE s.rowid IN (".$objectid.")"; + $sql .= " WHERE s.rowid IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } - } elseif (in_array($feature, $checkother)) // Test on entity + link to thirdparty. Allowed if link is empty (Ex: contacts...). - { + } elseif (in_array($feature, $checkother)) { // Test on entity + link to thirdparty. Allowed if link is empty (Ex: contacts...). // If external user: Check permission for external users - if ($user->socid > 0) - { + if ($user->socid > 0) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.fk_soc = ".$user->socid; - } // 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)) - { + } elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { + // If internal user: Check permission for internal users that are restricted on their objects $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 = ".((int) $user->id); - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $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 - elseif (!empty($conf->multicompany->enabled)) - { + } elseif (!empty($conf->multicompany->enabled)) { + // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } - if ($feature == 'agenda')// Also check owner or attendee for users without allactions->read - { + 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'; $action = new ActionComm($db); @@ -551,22 +677,22 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand } } } elseif (in_array($feature, $checkproject)) { - if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) - { + if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $projectstatic = new Project($db); $tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0); $tmparray = explode(',', $tmps); - if (!in_array($objectid, $tmparray)) return false; + if (!in_array($objectid, $tmparray)) { + return false; + } } 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 .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } elseif (in_array($feature, $checktask)) { - if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) - { + if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { $task = new Task($db); $task->fetch($objectid); @@ -574,29 +700,35 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $projectstatic = new Project($db); $tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0); $tmparray = explode(',', $tmps); - if (!in_array($task->fk_project, $tmparray)) return false; + if (!in_array($task->fk_project, $tmparray)) { + return false; + } } 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 .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $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 // If external user: Check permission for external users if ($user->socid > 0) { - if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined'); + if (empty($dbt_keyfield)) { + dol_print_error('', 'Param dbt_keyfield is required but not defined'); + } $sql = "SELECT COUNT(dbt.".$dbt_keyfield.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= " WHERE dbt.rowid IN (".$objectid.")"; + $sql .= " WHERE dbt.rowid IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.".$dbt_keyfield." = ".$user->socid; } elseif (!empty($conf->societe->enabled) && !$user->rights->societe->client->voir) { // If internal user: Check permission for internal users that are restricted on their objects if ($feature != 'ticket') { - if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined'); + if (empty($dbt_keyfield)) { + dol_print_error('', 'Param dbt_keyfield is required but not defined'); + } $sql = "SELECT COUNT(sc.fk_soc) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; $sql .= " AND sc.fk_soc = dbt.".$dbt_keyfield; $sql .= " AND sc.fk_user = ".$user->id; @@ -605,28 +737,29 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $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 sc.fk_soc = dbt.".$dbt_keyfield." AND sc.fk_user = ".$user->id; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; $sql .= " AND (sc.fk_user = ".$user->id." OR sc.fk_user IS NULL)"; } - } // If multicompany and internal users with all permissions, check user is in correct entity - elseif (!empty($conf->multicompany->enabled)) - { + } elseif (!empty($conf->multicompany->enabled)) { + // If multicompany and internal users with all permissions, check user is in correct entity $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " WHERE dbt.".$dbt_select." IN (".$db->sanitize($objectid, 1).")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } + //print $sql; - if ($sql) - { + if ($sql) { $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if (!$obj || $obj->nb < count(explode(',', $objectid))) return false; + if (!$obj || $obj->nb < count(explode(',', $objectid))) { + return false; + } } else { + dol_syslog("Bad forged sql in checkUserAccessToObject", LOG_WARNING); return false; } } @@ -649,8 +782,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0, $params = null) { global $conf, $db, $user, $langs, $hookmanager; - if (!is_object($langs)) - { + if (!is_object($langs)) { include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs = new Translate('', $conf); $langs->setDefaultLang(); @@ -658,21 +790,24 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho $langs->load("errors"); - if ($printheader) - { - if (function_exists("llxHeader")) llxHeader(''); - elseif (function_exists("llxHeaderVierge")) llxHeaderVierge(''); + if ($printheader) { + if (function_exists("llxHeader")) { + llxHeader(''); + } elseif (function_exists("llxHeaderVierge")) { + llxHeaderVierge(''); + } } print '
    '; - if (!$message) print $langs->trans("ErrorForbidden"); - else print $message; + if (!$message) { + print $langs->trans("ErrorForbidden"); + } else { + print $message; + } print '
    '; print '
    '; - if (empty($showonlymessage)) - { + if (empty($showonlymessage)) { global $action, $object; - if (empty($hookmanager)) - { + if (empty($hookmanager)) { $hookmanager = new HookManager($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('main')); @@ -680,10 +815,8 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho $parameters = array('message'=>$message, 'params'=>$params); $reshook = $hookmanager->executeHooks('getAccessForbiddenMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; - if (empty($reshook)) - { - if ($user->login) - { + if (empty($reshook)) { + if ($user->login) { print $langs->trans("CurrentLogin").': '.$user->login.'
    '; print $langs->trans("ErrorForbidden2", $langs->transnoentitiesnoconv("Home"), $langs->transnoentitiesnoconv("Users")); } else { @@ -691,6 +824,8 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho } } } - if ($printfooter && function_exists("llxFooter")) llxFooter(); + if ($printfooter && function_exists("llxFooter")) { + llxFooter(); + } exit(0); } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index fefe0aa19d5..523b8ccf2cb 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -35,8 +35,12 @@ function dol_getwebuser($mode) { $t = '?'; - if ($mode == 'user') $t = getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty - if ($mode == 'group') $t = getenv('APACHE_RUN_GROUP'); + if ($mode == 'user') { + $t = getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty + } + if ($mode == 'group') { + $t = getenv('APACHE_RUN_GROUP'); + } return $t; } @@ -56,44 +60,44 @@ function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $auth //global $dolauthmode; // To return authentication finally used // Check parameters - if ($entitytotest == '') $entitytotest = 1; + if ($entitytotest == '') { + $entitytotest = 1; + } dol_syslog("checkLoginPassEntity usertotest=".$usertotest." entitytotest=".$entitytotest." authmode=".join(',', $authmode)); $login = ''; // Validation of login/pass/entity with standard modules - if (empty($login)) - { + if (empty($login)) { $test = true; - foreach ($authmode as $mode) - { - if ($test && $mode && !$login) - { + foreach ($authmode as $mode) { + if ($test && $mode && !$login) { // Validation of login/pass/entity for mode $mode $mode = trim($mode); $authfile = 'functions_'.$mode.'.php'; $fullauthfile = ''; $dirlogin = array_merge(array("/core/login"), (array) $conf->modules_parts['login']); - foreach ($dirlogin as $reldir) - { + foreach ($dirlogin as $reldir) { $dir = dol_buildpath($reldir, 0); $newdir = dol_osencode($dir); // Check if file found (do not use dol_is_file to avoid loading files.lib.php) $tmpnewauthfile = $newdir.(preg_match('/\/$/', $newdir) ? '' : '/').$authfile; - if (is_file($tmpnewauthfile)) $fullauthfile = $tmpnewauthfile; + if (is_file($tmpnewauthfile)) { + $fullauthfile = $tmpnewauthfile; + } } $result = false; - if ($fullauthfile) $result = include_once $fullauthfile; - if ($fullauthfile && $result) - { + if ($fullauthfile) { + $result = include_once $fullauthfile; + } + if ($fullauthfile && $result) { // Call function to check user/password $function = 'check_user_password_'.$mode; $login = call_user_func($function, $usertotest, $passwordtotest, $entitytotest, $context); - if ($login && $login != '--bad-login-validity--') // 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 $dol_tz = GETPOST('tz'); @@ -117,8 +121,7 @@ function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $auth } -if (!function_exists('dol_loginfunction')) -{ +if (!function_exists('dol_loginfunction')) { /** * Show Dolibarr default login page. * Part of this code is also duplicated into main.inc.php::top_htmlhead @@ -147,7 +150,9 @@ if (!function_exists('dol_loginfunction')) // Title $appli = constant('DOL_APPLICATION_TITLE'); $title = $appli.' '.constant('DOL_VERSION'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = $conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = $conf->global->MAIN_APPLICATION_TITLE; + } $titletruedolibarrversion = constant('DOL_VERSION'); // $title used by login template after the @ to inform of true Dolibarr version // Note: $conf->css looks like '/theme/eldy/style.css.php' @@ -169,13 +174,14 @@ if (!function_exists('dol_loginfunction')) */ // Select templates dir - if (!empty($conf->modules_parts['tpl'])) // Using this feature slow down application - { + if (!empty($conf->modules_parts['tpl'])) { // Using this feature slow down application $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl/')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $tmp = dol_buildpath($reldir.'login.tpl.php'); - if (file_exists($tmp)) { $template_dir = preg_replace('/login\.tpl\.php$/', '', $tmp); break; } + if (file_exists($tmp)) { + $template_dir = preg_replace('/login\.tpl\.php$/', '', $tmp); + break; + } } } else { $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; @@ -184,18 +190,25 @@ if (!function_exists('dol_loginfunction')) // 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, (empty($dolibarr_main_force_https) ? false : true), 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"]); + if (GETPOST('urlfrom', 'alpha')) { + $_SESSION["urlfrom"] = GETPOST('urlfrom', 'alpha'); + } else { + unset($_SESSION["urlfrom"]); + } - if (!GETPOST("username", 'alpha')) $focus_element = 'username'; - else $focus_element = 'password'; + if (!GETPOST("username", 'alpha')) { + $focus_element = 'username'; + } else { + $focus_element = 'password'; + } $demologin = ''; $demopassword = ''; - if (!empty($dolibarr_main_demo)) - { + if (!empty($dolibarr_main_demo)) { $tab = explode(',', $dolibarr_main_demo); $demologin = $tab[0]; $demopassword = $tab[1]; @@ -219,23 +232,21 @@ if (!function_exists('dol_loginfunction')) $width = 0; $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)) - { + 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 (!empty($mysoc->logo_squarred_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_small)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_small); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } // Security graphical code $captcha = 0; $captcha_refresh = ''; - if (function_exists("imagecreatefrompng") && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) - { + if (function_exists("imagecreatefrompng") && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { $captcha = 1; $captcha_refresh = img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"'); } @@ -243,23 +254,19 @@ if (!function_exists('dol_loginfunction')) // Extra link $forgetpasslink = 0; $helpcenterlink = 0; - if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK) || empty($conf->global->MAIN_HELPCENTER_DISABLELINK)) - { - if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)) - { + if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK) || empty($conf->global->MAIN_HELPCENTER_DISABLELINK)) { + if (empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)) { $forgetpasslink = 1; } - if (empty($conf->global->MAIN_HELPCENTER_DISABLELINK)) - { + if (empty($conf->global->MAIN_HELPCENTER_DISABLELINK)) { $helpcenterlink = 1; } } // Home message $main_home = ''; - if (!empty($conf->global->MAIN_HOME)) - { + if (!empty($conf->global->MAIN_HOME)) { $substitutionarray = getCommonSubstitutionArray($langs); complete_substitutions_array($substitutionarray, $langs); $texttoshow = make_substitutions($conf->global->MAIN_HOME, $substitutionarray, $langs); @@ -274,11 +281,17 @@ if (!function_exists('dol_loginfunction')) $dol_loginmesg = (!empty($_SESSION["dol_loginmesg"]) ? $_SESSION["dol_loginmesg"] : ''); $favicon = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; - if (!empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - if (!empty($conf->global->MAIN_FAVICON_URL)) $favicon = $conf->global->MAIN_FAVICON_URL; + if (!empty($mysoc->logo_squarred_mini)) { + $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); + } + if (!empty($conf->global->MAIN_FAVICON_URL)) { + $favicon = $conf->global->MAIN_FAVICON_URL; + } $jquerytheme = 'base'; - if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; + if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) { + $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; + } // Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_no_mouse_hover $dol_hide_topmenu = GETPOST('dol_hide_topmenu', 'int'); @@ -308,18 +321,28 @@ if (!function_exists('dol_loginfunction')) function makesalt($type = CRYPT_SALT_LENGTH) { dol_syslog("makesalt type=".$type); - switch ($type) - { + switch ($type) { case 12: // 8 + 4 - $saltlen = 8; $saltprefix = '$1$'; $saltsuffix = '$'; break; + $saltlen = 8; + $saltprefix = '$1$'; + $saltsuffix = '$'; + break; case 8: // 8 (Pour compatibilite, ne devrait pas etre utilise) - $saltlen = 8; $saltprefix = '$1$'; $saltsuffix = '$'; break; + $saltlen = 8; + $saltprefix = '$1$'; + $saltsuffix = '$'; + break; case 2: // 2 default: // by default, fall back on Standard DES (should work everywhere) - $saltlen = 2; $saltprefix = ''; $saltsuffix = ''; break; + $saltlen = 2; + $saltprefix = ''; + $saltsuffix = ''; + break; } $salt = ''; - while (dol_strlen($salt) < $saltlen) $salt .= chr(mt_rand(64, 126)); + while (dol_strlen($salt) < $saltlen) { + $salt .= chr(mt_rand(64, 126)); + } $result = $saltprefix.$salt.$saltsuffix; dol_syslog("makesalt return=".$result); @@ -339,33 +362,27 @@ function encodedecode_dbpassconf($level = 0) $passwd = ''; $passwd_crypted = ''; - if ($fp = fopen(DOL_DOCUMENT_ROOT.'/conf/conf.php', 'r')) - { - while (!feof($fp)) - { + if ($fp = fopen(DOL_DOCUMENT_ROOT.'/conf/conf.php', 'r')) { + while (!feof($fp)) { $buffer = fgets($fp, 4096); $lineofpass = 0; - if (preg_match('/^[^#]*dolibarr_main_db_encrypted_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) // Old way to save crypted value - { + if (preg_match('/^[^#]*dolibarr_main_db_encrypted_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) { // Old way to save crypted value $val = trim($reg[1]); // This also remove CR/LF $val = preg_replace('/^["\']/', '', $val); $val = preg_replace('/["\'][\s;]*$/', '', $val); - if (!empty($val)) - { + if (!empty($val)) { $passwd_crypted = $val; $val = dol_decode($val); $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); $val = preg_replace('/["\'][\s;]*$/', '', $val); - if (preg_match('/crypted:/i', $buffer)) - { + if (preg_match('/crypted:/i', $buffer)) { $val = preg_replace('/crypted:/i', '', $val); $passwd_crypted = $val; $val = dol_decode($val); @@ -379,15 +396,12 @@ function encodedecode_dbpassconf($level = 0) } // Output line - if ($lineofpass) - { + if ($lineofpass) { // Add value at end of file - if ($level == 0) - { + if ($level == 0) { $config .= '$dolibarr_main_db_pass=\''.$passwd.'\';'."\n"; } - if ($level == 1) - { + if ($level == 1) { $config .= '$dolibarr_main_db_pass=\'crypted:'.$passwd_crypted.'\';'."\n"; } @@ -401,8 +415,7 @@ function encodedecode_dbpassconf($level = 0) // Write new conf file $file = DOL_DOCUMENT_ROOT.'/conf/conf.php'; - if ($fp = @fopen($file, 'w')) - { + if ($fp = @fopen($file, 'w')) { fputs($fp, $config); fflush($fp); fclose($fp); @@ -437,8 +450,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len global $db, $conf, $langs, $user; $generated_password = ''; - if ($generic) - { + if ($generic) { $lowercase = "qwertyuiopasdfghjklzxcvbnm"; $uppercase = "ASDFGHJKLZXCVBNMQWERTYUIOP"; $numbers = "1234567890"; @@ -446,8 +458,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len $nbofchar = round($length / 3); $nbofcharlast = ($length - 2 * $nbofchar); //var_dump($nbofchar.'-'.$nbofcharlast); - if (function_exists('random_int')) // Cryptographic random - { + if (function_exists('random_int')) { // Cryptographic random $max = strlen($lowercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { $tmp = random_int(0, $max); @@ -485,8 +496,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"; //print DOL_DOCUMENT_ROOT."/core/modules/security/generate/".$nomclass; @@ -497,8 +507,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len } // Do we have to discard some alphabetic characters ? - if (is_array($replaceambiguouschars) && count($replaceambiguouschars) > 0) - { + if (is_array($replaceambiguouschars) && count($replaceambiguouschars) > 0) { $numbers = "ABCDEF"; $max = strlen($numbers) - 1; if (function_exists('random_int')) { // Cryptographic random diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 0bb0db6afd1..15e7286ab08 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -47,12 +47,10 @@ function shipping_prepare_head($object) $head[$h][2] = 'shipping'; $h++; - if ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire) - { + if ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire) { // delivery link $object->fetchObjectLinked($object->id, $object->element); - if (is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery - { + if (is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) { // If there is a delivery // Take first one element of array $tmp = reset($object->linkedObjectsIds['delivery']); @@ -63,18 +61,18 @@ function shipping_prepare_head($object) } } - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $objectsrc = $object; - if ($object->origin == 'commande' && $object->origin_id > 0) - { + 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."/expedition/contact.php?id=".$object->id; $head[$h][1] = $langs->trans("ContactsAddresses"); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -86,16 +84,24 @@ function shipping_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; @@ -127,8 +133,7 @@ function delivery_prepare_head($object) $h = 0; $head = array(); - if ($conf->expedition_bon->enabled && $user->rights->expedition->lire) - { + if ($conf->expedition_bon->enabled && $user->rights->expedition->lire) { $head[$h][0] = DOL_URL_ROOT."/expedition/card.php?id=".$object->origin_id; $head[$h][1] = $langs->trans("SendingCard"); $head[$h][2] = 'shipping'; @@ -157,18 +162,18 @@ function delivery_prepare_head($object) $tmpobject = $object; } - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $objectsrc = $tmpobject; - if ($tmpobject->origin == 'commande' && $tmpobject->origin_id > 0) - { + if ($tmpobject->origin == 'commande' && $tmpobject->origin_id > 0) { $objectsrc = new Commande($db); $objectsrc->fetch($tmpobject->origin_id); } $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$tmpobject->id; $head[$h][1] = $langs->trans("ContactsAddresses"); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -180,16 +185,24 @@ function delivery_prepare_head($object) $nbLinks = Link::count($db, $tmpobject->element, $tmpobject->id); $head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$tmpobject->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; $nbNote = 0; - if (!empty($tmpobject->note_private)) $nbNote++; - if (!empty($tmpobject->note_public)) $nbNote++; + if (!empty($tmpobject->note_private)) { + $nbNote++; + } + if (!empty($tmpobject->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$tmpobject->id; $head[$h][1] = $langs->trans("Notes"); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; @@ -236,21 +249,24 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') $sql .= " AND obj.fk_".$origin." = ".$origin_id; $sql .= " AND obj.rowid = ed.fk_origin_line"; $sql .= " AND ed.fk_expedition = e.rowid"; - if ($filter) $sql .= $filter; + if ($filter) { + $sql .= $filter; + } $sql .= " ORDER BY obj.fk_product"; dol_syslog("show_list_sending_receive", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - if ($filter) print load_fiche_titre($langs->trans("OtherSendingsForSameOrder")); - else print load_fiche_titre($langs->trans("SendingsAndReceivingForSameOrder")); + if ($num) { + if ($filter) { + print load_fiche_titre($langs->trans("OtherSendingsForSameOrder")); + } else { + print load_fiche_titre($langs->trans("SendingsAndReceivingForSameOrder")); + } print ''; print ''; @@ -260,26 +276,23 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; } /*TODO Add link to expeditiondet_batch if (! empty($conf->productbatch->enabled)) { - print ''; + print ''; }*/ - if (!empty($conf->delivery_note->enabled)) - { + if (!empty($conf->delivery_note->enabled)) { print ''; //print ''; print ''; } print "\n"; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); print ''; @@ -290,11 +303,9 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; // Description - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object = new $origin($db); $object->fetch($origin_id); $object->fetch_thirdparty(); @@ -305,10 +316,13 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && !empty($_REQUEST['lang_id'])) $newlang = $_REQUEST['lang_id']; - if (empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && !empty($_REQUEST['lang_id'])) { + $newlang = $_REQUEST['lang_id']; + } + if (empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -334,16 +348,18 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print_date_range($objp->date_start, $objp->date_end); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($objp->description) && $objp->description != $objp->product) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } print ''; } else { print "'; // Warehouse - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; - } else { - print ''; - } + } + print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"),$detail); + } + else + { + print $langs->trans("NA"); + } + print ''; + } else { + print ''; + } }*/ // Informations on receipt - if (!empty($conf->delivery_note->enabled)) - { + if (!empty($conf->delivery_note->enabled)) { include_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php'; $expedition->id = $objp->sendingid; $expedition->fetchObjectLinked($expedition->id, $expedition->element); //var_dump($expedition->linkedObjects); $receiving = ''; - if (!empty($expedition->linkedObjects['delivery'])) $receiving = reset($expedition->linkedObjects['delivery']); // Take first link + if (!empty($expedition->linkedObjects['delivery'])) { + $receiving = reset($expedition->linkedObjects['delivery']); // Take first link + } - if (!empty($receiving)) - { + if (!empty($receiving)) { // $expedition->fk_origin_line = id of det line of order // $receiving->fk_origin_line = id of det line of order // $receiving->origin may be 'shipping' diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 14ca70926d3..82f446f04c7 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -33,9 +33,15 @@ function showOnlineSignatureUrl($type, $ref) $servicename = 'Online'; - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlineSignature", $servicename).'
    '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlineSignature", $servicename).'
    '; $url = getOnlineSignatureUrl(0, $type, $ref); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinesignatureurl", 0); return $out; } @@ -56,18 +62,24 @@ function getOnlineSignatureUrl($mode, $type, $ref = '') $ref = str_replace(' ', '', $ref); $out = ''; - if ($type == 'proposal') - { + if ($type == 'proposal') { $out = DOL_MAIN_URL_ROOT.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'proposal_ref'; - if ($mode == 0) $out .= urlencode($ref); + if ($mode == 1) { + $out .= 'proposal_ref'; + } + if ($mode == 0) { + $out .= urlencode($ref); + } $out .= ($mode ? '' : ''); - if ($mode == 1) $out .= '&hashp=hash_of_file'; - else { + if ($mode == 1) { + $out .= '&hashp=hash_of_file'; + } else { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $propaltmp = new Propal($db); $res = $propaltmp->fetch(0, $ref); - if ($res <= 0) return 'FailedToGetProposal'; + if ($res <= 0) { + return 'FailedToGetProposal'; + } include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); @@ -75,8 +87,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '') $ecmfile->fetch(0, '', $propaltmp->last_main_doc); $hashp = $ecmfile->share; - if (empty($hashp)) - { + if (empty($hashp)) { $out = $langs->trans("FeatureOnlineSignDisabled"); return $out; } else { @@ -86,7 +97,9 @@ function getOnlineSignatureUrl($mode, $type, $ref = '') } // For multicompany - if (!empty($out)) $out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities + if (!empty($out)) { + $out .= "&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities + } return $out; } diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 2d6768010fb..2e58e6c8082 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -39,8 +39,7 @@ function stock_prepare_head($object) $head[$h][2] = 'card'; $h++; - if (!empty($user->rights->stock->mouvement->lire)) - { + if (!empty($user->rights->stock->mouvement->lire)) { $head[$h][0] = DOL_URL_ROOT.'/product/stock/movement_list.php?id='.$object->id; $head[$h][1] = $langs->trans("StockMovements"); $head[$h][2] = 'movements'; diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php index ec782350c9d..a7720bd9ef4 100644 --- a/htdocs/core/lib/supplier_proposal.lib.php +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -44,12 +44,13 @@ function supplier_proposal_prepare_head($object) $head[$h][2] = 'comm'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -60,14 +61,19 @@ function supplier_proposal_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'supplier_proposal'); - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + if ($nbNote > 0) { + $head[$h][1] .= ''.$nbNote.''; + } $head[$h][2] = 'note'; $h++; } @@ -79,7 +85,9 @@ function supplier_proposal_prepare_head($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index dfddc95d733..db1623387c1 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -54,8 +54,7 @@ function takepos_admin_prepare_head() $h++; $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); - for ($i = 1; $i <= $numterminals; $i++) - { + for ($i = 1; $i <= $numterminals; $i++) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i; $head[$h][1] = $langs->trans("Terminal")." ".$i; $head[$h][2] = 'terminal'.$i; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 36ce55f7c85..743a847b2f2 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -1,11 +1,12 @@ - * Copyright (C) 2006-2007 Yannick Warnier - * Copyright (C) 2011 Regis Houssin - * Copyright (C) 2012-2017 Juanjo Menent - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud - * Copyright (C) 2015 Marcos García +/* Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2006-2007 Yannick Warnier + * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2012-2017 Juanjo Menent + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2015 Marcos García + * Copyright (C) 2021 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,7 +60,9 @@ function tax_prepare_head(ChargeSociales $object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } $head[$h][2] = 'documents'; $h++; @@ -93,14 +96,12 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di global $conf; // If we use date_start and date_end, we must not use $y, $m, $q - if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) - { + if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) { dol_print_error('', 'Bad value of input parameter for tax_by_rate'); } $list = array(); - if ($direction == 'sell') - { + if ($direction == 'sell') { $invoicetable = 'facture'; $invoicedettable = 'facturedet'; $fk_facture = 'fk_facture'; @@ -110,8 +111,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'; $fk_facture = 'fk_facture_fourn'; @@ -138,49 +138,64 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di // Define sql request $sql = ''; if (($direction == 'sell' && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') - || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice')) - { + || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice')) { // Count on delivery date (use invoice date as delivery is unknown) $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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; - $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; - $sql .= " 0 as payment_id, 0 as payment_amount"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; + $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, p.tosell as pstatus, p.tobuy as pstatusbuy,"; + $sql .= " 0 as payment_id, '' as payment_ref, 0 as payment_amount"; $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) - 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)"; + 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)"; + } $sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND s.rowid = f.fk_soc"; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(f.datef,'%m') > ".(($q - 1) * 3)." AND date_format(f.datef,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND f.datef > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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 { // 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; - $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; + $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, p.tosell as pstatus, p.tobuy as pstatusbuy,"; $sql .= " pf.".$fk_payment." as payment_id, pf.amount as payment_amount,"; - $sql .= " pa.datep as datep"; + $sql .= " pa.datep as datep, pa.ref as payment_ref"; $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; $sql .= " ".MAIN_DB_PREFIX.$paymentfacturetable." as pf,"; $sql .= " ".MAIN_DB_PREFIX.$paymenttable." as pa,"; @@ -189,49 +204,65 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) - 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)"; + 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)"; + } $sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND pf.".$fk_facture2." = f.rowid"; $sql .= " AND pa.rowid = pf.".$fk_payment; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(pa.datep,'%m') > ".(($q - 1) * 3)." AND date_format(pa.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND pa.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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"; } - if (!$sql) return -1; - if ($sql == 'TODO') return -2; - if ($sql != 'TODO') - { + if (!$sql) { + return -1; + } + if ($sql == 'TODO') { + return -2; + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_thirdparty", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $company_id = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { - if (!isset($list[$assoc['company_id']]['totalht'])) $list[$assoc['company_id']]['totalht'] = 0; - if (!isset($list[$assoc['company_id']]['vat'])) $list[$assoc['company_id']]['vat'] = 0; - if (!isset($list[$assoc['company_id']]['localtax1'])) $list[$assoc['company_id']]['localtax1'] = 0; - if (!isset($list[$assoc['company_id']]['localtax2'])) $list[$assoc['company_id']]['localtax2'] = 0; + while ($assoc = $db->fetch_array($resql)) { + if (!isset($list[$assoc['company_id']]['totalht'])) { + $list[$assoc['company_id']]['totalht'] = 0; + } + if (!isset($list[$assoc['company_id']]['vat'])) { + $list[$assoc['company_id']]['vat'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax1'])) { + $list[$assoc['company_id']]['localtax1'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax2'])) { + $list[$assoc['company_id']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['company_id']]['totalht'] += $assoc['total_ht']; $list[$assoc['company_id']]['vat'] += $assoc['total_vat']; @@ -242,8 +273,20 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $list[$assoc['company_id']]['dtype'][] = $assoc['dtype']; $list[$assoc['company_id']]['datef'][] = $db->jdate($assoc['datef']); $list[$assoc['company_id']]['datep'][] = $db->jdate($assoc['datep']); + $list[$assoc['company_id']]['company_name'][] = $assoc['company_name']; $list[$assoc['company_id']]['company_id'][] = $assoc['company_id']; + $list[$assoc['company_id']]['company_alias'][] = $assoc['company_alias']; + $list[$assoc['company_id']]['company_email'][] = $assoc['company_email']; + $list[$assoc['company_id']]['company_tva_intra'][] = $assoc['company_tva_intra']; + $list[$assoc['company_id']]['company_client'][] = $assoc['company_client']; + $list[$assoc['company_id']]['company_fournisseur'][] = $assoc['company_fournisseur']; + $list[$assoc['company_id']]['company_customer_code'][] = $assoc['company_customer_code']; + $list[$assoc['company_id']]['company_supplier_code'][] = $assoc['company_supplier_code']; + $list[$assoc['company_id']]['company_customer_accounting_code'][] = $assoc['company_customer_accounting_code']; + $list[$assoc['company_id']]['company_supplier_accounting_code'][] = $assoc['company_supplier_accounting_code']; + $list[$assoc['company_id']]['company_status'][] = $assoc['company_status']; + $list[$assoc['company_id']]['drate'][] = $assoc['rate']; $list[$assoc['company_id']]['ddate_start'][] = $db->jdate($assoc['date_start']); $list[$assoc['company_id']]['ddate_end'][] = $db->jdate($assoc['date_end']); @@ -280,49 +323,64 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di // Define sql request $sql = ''; if (($direction == 'sell' && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice') - || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) - { + || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { // Count on invoice 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; - $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; - $sql .= " 0 as payment_id, 0 as payment_amount"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; + $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, p.tosell as pstatus, p.tobuy as pstatusbuy,"; + $sql .= " 0 as payment_id, '' as payment_ref, 0 as payment_amount"; $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s,"; $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) - 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)"; + 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)"; + } $sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND s.rowid = f.fk_soc"; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(f.datef,'%m') > ".(($q - 1) * 3)." AND date_format(f.datef,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND f.datef > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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 { // 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; - $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; + $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype, p.tosell as pstatus, p.tobuy as pstatusbuy,"; $sql .= " pf.".$fk_payment." as payment_id, pf.amount as payment_amount,"; - $sql .= " pa.datep as datep"; + $sql .= " pa.datep as datep, pa.ref as payment_ref"; $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; $sql .= " ".MAIN_DB_PREFIX.$paymentfacturetable." as pf,"; $sql .= " ".MAIN_DB_PREFIX.$paymenttable." as pa,"; @@ -331,52 +389,65 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) - 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)"; + 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)"; + } $sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND pf.".$fk_facture2." = f.rowid"; $sql .= " AND pa.rowid = pf.".$fk_payment; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(pa.datep,'%m') > ".(($q - 1) * 3)." AND date_format(pa.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND pa.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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"; } - if (!$sql) - { + if (!$sql) { dol_syslog("Tax.lib.php::tax_by_rate no accountancy module enabled".$sql, LOG_ERR); return -1; // -1 = Not accountancy module enabled } - if ($sql == 'TODO') return -2; // -2 = Feature not yet available - if ($sql != 'TODO') - { + if ($sql == 'TODO') { + return -2; // -2 = Feature not yet available + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_rate", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $company_id = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { - if (!isset($list[$assoc['company_id']]['totalht'])) $list[$assoc['company_id']]['totalht'] = 0; - if (!isset($list[$assoc['company_id']]['vat'])) $list[$assoc['company_id']]['vat'] = 0; - if (!isset($list[$assoc['company_id']]['localtax1'])) $list[$assoc['company_id']]['localtax1'] = 0; - if (!isset($list[$assoc['company_id']]['localtax2'])) $list[$assoc['company_id']]['localtax2'] = 0; + while ($assoc = $db->fetch_array($resql)) { + if (!isset($list[$assoc['company_id']]['totalht'])) { + $list[$assoc['company_id']]['totalht'] = 0; + } + if (!isset($list[$assoc['company_id']]['vat'])) { + $list[$assoc['company_id']]['vat'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax1'])) { + $list[$assoc['company_id']]['localtax1'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax2'])) { + $list[$assoc['company_id']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['company_id']]['totalht'] += $assoc['total_ht']; $list[$assoc['company_id']]['vat'] += $assoc['total_vat']; @@ -387,8 +458,20 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $list[$assoc['company_id']]['dtype'][] = $assoc['dtype']; $list[$assoc['company_id']]['datef'][] = $db->jdate($assoc['datef']); $list[$assoc['company_id']]['datep'][] = $db->jdate($assoc['datep']); + $list[$assoc['company_id']]['company_name'][] = $assoc['company_name']; $list[$assoc['company_id']]['company_id'][] = $assoc['company_id']; + $list[$assoc['company_id']]['company_alias'][] = $assoc['company_alias']; + $list[$assoc['company_id']]['company_email'][] = $assoc['company_email']; + $list[$assoc['company_id']]['company_tva_intra'][] = $assoc['company_tva_intra']; + $list[$assoc['company_id']]['company_client'][] = $assoc['company_client']; + $list[$assoc['company_id']]['company_fournisseur'][] = $assoc['company_fournisseur']; + $list[$assoc['company_id']]['company_customer_code'][] = $assoc['company_customer_code']; + $list[$assoc['company_id']]['company_supplier_code'][] = $assoc['company_supplier_code']; + $list[$assoc['company_id']]['company_customer_accounting_code'][] = $assoc['company_customer_accounting_code']; + $list[$assoc['company_id']]['company_supplier_accounting_code'][] = $assoc['company_supplier_accounting_code']; + $list[$assoc['company_id']]['company_status'][] = $assoc['company_status']; + $list[$assoc['company_id']]['drate'][] = $assoc['rate']; $list[$assoc['company_id']]['ddate_start'][] = $db->jdate($assoc['date_start']); $list[$assoc['company_id']]['ddate_end'][] = $db->jdate($assoc['date_end']); @@ -409,6 +492,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $list[$assoc['company_id']]['ptype'][] = $assoc['ptype']; $list[$assoc['company_id']]['payment_id'][] = $assoc['payment_id']; + $list[$assoc['company_id']]['payment_ref'][] = $assoc['payment_ref']; $list[$assoc['company_id']]['payment_amount'][] = $assoc['payment_amount']; $company_id = $assoc['company_id']; @@ -422,8 +506,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di // CASE OF EXPENSE REPORT - if ($direction == 'buy') // buy only for expense reports - { + if ($direction == 'buy') { // buy only for expense reports // Define sql request $sql = ''; @@ -438,45 +521,55 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_expensereport as p ON p.fk_expensereport = e.rowid "; $sql .= " WHERE e.entity = ".$conf->entity; $sql .= " AND e.fk_statut in (6)"; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(p.datep,'%m') > ".(($q - 1) * 3)." AND date_format(p.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND p.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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) - { + if (!$sql) { dol_syslog("Tax.lib.php::tax_by_rate no accountancy module enabled".$sql, LOG_ERR); return -1; // -1 = Not accountancy module enabled } - if ($sql == 'TODO') return -2; // -2 = Feature not yet available - if ($sql != 'TODO') - { + if ($sql == 'TODO') { + return -2; // -2 = Feature not yet available + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_rate", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $company_id = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { - if (!isset($list[$assoc['company_id']]['totalht'])) $list[$assoc['company_id']]['totalht'] = 0; - if (!isset($list[$assoc['company_id']]['vat'])) $list[$assoc['company_id']]['vat'] = 0; - if (!isset($list[$assoc['company_id']]['localtax1'])) $list[$assoc['company_id']]['localtax1'] = 0; - if (!isset($list[$assoc['company_id']]['localtax2'])) $list[$assoc['company_id']]['localtax2'] = 0; + while ($assoc = $db->fetch_array($resql)) { + if (!isset($list[$assoc['company_id']]['totalht'])) { + $list[$assoc['company_id']]['totalht'] = 0; + } + if (!isset($list[$assoc['company_id']]['vat'])) { + $list[$assoc['company_id']]['vat'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax1'])) { + $list[$assoc['company_id']]['localtax1'] = 0; + } + if (!isset($list[$assoc['company_id']]['localtax2'])) { + $list[$assoc['company_id']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['company_id']]['totalht'] += $assoc['total_ht']; $list[$assoc['company_id']]['vat'] += $assoc['total_vat']; @@ -487,8 +580,20 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $list[$assoc['company_id']]['dtotal_ttc'][] = $assoc['total_ttc']; $list[$assoc['company_id']]['dtype'][] = 'ExpenseReportPayment'; $list[$assoc['company_id']]['datef'][] = $assoc['datef']; + $list[$assoc['company_id']]['company_name'][] = ''; $list[$assoc['company_id']]['company_id'][] = ''; + $list[$assoc['company_id']]['company_alias'][] = ''; + $list[$assoc['company_id']]['company_email'][] = ''; + $list[$assoc['company_id']]['company_tva_intra'][] = ''; + $list[$assoc['company_id']]['company_client'][] = ''; + $list[$assoc['company_id']]['company_fournisseur'][] = ''; + $list[$assoc['company_id']]['company_customer_code'][] = ''; + $list[$assoc['company_id']]['company_supplier_code'][] = ''; + $list[$assoc['company_id']]['company_customer_accounting_code'][] = ''; + $list[$assoc['company_id']]['company_supplier_accounting_code'][] = ''; + $list[$assoc['company_id']]['company_status'][] = ''; + $list[$assoc['company_id']]['user_id'][] = $assoc['fk_user_author']; $list[$assoc['company_id']]['drate'][] = $assoc['rate']; $list[$assoc['company_id']]['ddate_start'][] = $db->jdate($assoc['date_start']); @@ -510,6 +615,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $list[$assoc['company_id']]['ptype'][] = 'ExpenseReportPayment'; $list[$assoc['company_id']]['payment_id'][] = $assoc['payment_id']; + $list[$assoc['company_id']]['payment_ref'][] = $assoc['payment_ref']; $list[$assoc['company_id']]['payment_amount'][] = $assoc['payment_amount']; $company_id = $assoc['company_id']; @@ -545,15 +651,13 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire global $conf; // If we use date_start and date_end, we must not use $y, $m, $q - if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) - { + if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) { dol_print_error('', 'Bad value of input parameter for tax_by_rate'); } $list = array(); - if ($direction == 'sell') - { + if ($direction == 'sell') { $invoicetable = 'facture'; $invoicedettable = 'facturedet'; $fk_facture = 'fk_facture'; @@ -585,106 +689,131 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $total_localtax2 = 'total_localtax2'; - // CAS DES BIENS/PRODUITS + // CASE OF PRODUCTS/GOODS // Define sql request $sql = ''; if (($direction == 'sell' && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') - || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice')) - { + || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_PRODUCT == 'invoice')) { // Count on delivery date (use invoice date as delivery is unknown) $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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; - $sql .= " 0 as payment_id, 0 as payment_amount"; - $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; - $sql .= " ".MAIN_DB_PREFIX."societe as s,"; - $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; + $sql .= " 0 as payment_id, '' as payment_ref, 0 as payment_amount"; + $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$invoicedettable." as d ON d.".$fk_facture."=f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) - 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)"; - $sql .= " AND f.rowid = d.".$fk_facture; - $sql .= " AND s.rowid = f.fk_soc"; - if ($y && $m) - { + 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)"; + } + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(f.datef,'%m') > ".(($q - 1) * 3)." AND date_format(f.datef,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND f.datef > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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 { // 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; $sql .= " pf.".$fk_payment." as payment_id, pf.amount as payment_amount,"; - $sql .= " pa.datep as datep"; - $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; - $sql .= " ".MAIN_DB_PREFIX.$paymentfacturetable." as pf,"; - $sql .= " ".MAIN_DB_PREFIX.$paymenttable." as pa,"; - $sql .= " ".MAIN_DB_PREFIX."societe as s,"; - $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; + $sql .= " pa.datep as datep, pa.ref as payment_ref"; + $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$paymentfacturetable." as pf ON pf.".$fk_facture2." = f.rowid";; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$paymenttable." as pa ON pa.rowid = pf.".$fk_payment; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$invoicedettable." as d ON d.".$fk_facture." = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) - 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)"; - $sql .= " AND f.rowid = d.".$fk_facture; - $sql .= " AND s.rowid = f.fk_soc"; - $sql .= " AND pf.".$fk_facture2." = f.rowid"; - $sql .= " AND pa.rowid = pf.".$fk_payment; - if ($y && $m) - { + 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)"; + } + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(pa.datep,'%m') > ".(($q - 1) * 3)." AND date_format(pa.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND pa.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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"; } - if (!$sql) return -1; - if ($sql == 'TODO') return -2; - if ($sql != 'TODO') - { + if (!$sql) { + return -1; + } + if ($sql == 'TODO') { + return -2; + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_rate", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $rate = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { + while ($assoc = $db->fetch_array($resql)) { // Code to avoid warnings when array entry not defined - if (!isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht'] = 0; - if (!isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat'] = 0; - if (!isset($list[$assoc['rate']]['localtax1'])) $list[$assoc['rate']]['localtax1'] = 0; - if (!isset($list[$assoc['rate']]['localtax2'])) $list[$assoc['rate']]['localtax2'] = 0; + if (!isset($list[$assoc['rate']]['totalht'])) { + $list[$assoc['rate']]['totalht'] = 0; + } + if (!isset($list[$assoc['rate']]['vat'])) { + $list[$assoc['rate']]['vat'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax1'])) { + $list[$assoc['rate']]['localtax1'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax2'])) { + $list[$assoc['rate']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['rate']]['totalht'] += $assoc['total_ht']; $list[$assoc['rate']]['vat'] += $assoc['total_vat']; @@ -695,8 +824,20 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $list[$assoc['rate']]['dtype'][] = $assoc['dtype']; $list[$assoc['rate']]['datef'][] = $db->jdate($assoc['datef']); $list[$assoc['rate']]['datep'][] = $db->jdate($assoc['datep']); + $list[$assoc['rate']]['company_name'][] = $assoc['company_name']; $list[$assoc['rate']]['company_id'][] = $assoc['company_id']; + $list[$assoc['rate']]['company_alias'][] = $assoc['company_alias']; + $list[$assoc['rate']]['company_email'][] = $assoc['company_email']; + $list[$assoc['rate']]['company_tva_intra'][] = $assoc['company_tva_intra']; + $list[$assoc['rate']]['company_client'][] = $assoc['company_client']; + $list[$assoc['rate']]['company_fournisseur'][] = $assoc['company_fournisseur']; + $list[$assoc['rate']]['company_customer_code'][] = $assoc['company_customer_code']; + $list[$assoc['rate']]['company_supplier_code'][] = $assoc['company_supplier_code']; + $list[$assoc['rate']]['company_customer_accounting_code'][] = $assoc['company_customer_accounting_code']; + $list[$assoc['rate']]['company_supplier_accounting_code'][] = $assoc['company_supplier_accounting_code']; + $list[$assoc['rate']]['company_status'][] = $assoc['company_status']; + $list[$assoc['rate']]['ddate_start'][] = $db->jdate($assoc['date_start']); $list[$assoc['rate']]['ddate_end'][] = $db->jdate($assoc['date_end']); @@ -716,6 +857,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $list[$assoc['rate']]['ptype'][] = $assoc['ptype']; $list[$assoc['rate']]['payment_id'][] = $assoc['payment_id']; + $list[$assoc['rate']]['payment_ref'][] = $assoc['payment_ref']; $list[$assoc['rate']]['payment_amount'][] = $assoc['payment_amount']; $rate = $assoc['rate']; @@ -727,109 +869,131 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire } - // CAS DES SERVICES + // CASE OF SERVICES // Define sql request $sql = ''; if (($direction == 'sell' && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice') - || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) - { + || ($direction == 'buy' && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { // Count on invoice 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; - $sql .= " 0 as payment_id, 0 as payment_amount"; - $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; - $sql .= " ".MAIN_DB_PREFIX."societe as s,"; - $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; + $sql .= " 0 as payment_id, '' as payment_ref, 0 as payment_amount"; + $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$invoicedettable." as d ON d.".$fk_facture." = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) - 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)"; - $sql .= " AND f.rowid = d.".$fk_facture; - $sql .= " AND s.rowid = f.fk_soc"; - if ($y && $m) - { + 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)"; + } + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(f.datef,'%m') > ".(($q - 1) * 3)." AND date_format(f.datef,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND f.datef > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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 { // 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, "; $sql .= " d.date_start as date_start, d.date_end as date_end,"; - $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef, s.nom as company_name, s.rowid as company_id,"; + $sql .= " f.".$invoicefieldref." as facnum, f.type, f.total_ttc as ftotal_ttc, f.datef,"; + $sql .= " s.nom as company_name, s.name_alias as company_alias, s.rowid as company_id, s.client as company_client, s.fournisseur as company_fournisseur, s.email as company_email,"; + $sql .= " s.code_client as company_customer_code, s.code_fournisseur as company_supplier_code,"; + $sql .= " s.code_compta as company_customer_accounting_code, s.code_compta_fournisseur as company_supplier_accounting_code,"; + $sql .= " s.status as company_status, s.tva_intra as company_tva_intra,"; $sql .= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; $sql .= " pf.".$fk_payment." as payment_id, pf.amount as payment_amount,"; - $sql .= " pa.datep as datep"; - $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; - $sql .= " ".MAIN_DB_PREFIX.$paymentfacturetable." as pf,"; - $sql .= " ".MAIN_DB_PREFIX.$paymenttable." as pa,"; - $sql .= " ".MAIN_DB_PREFIX."societe as s,"; - $sql .= " ".MAIN_DB_PREFIX.$invoicedettable." as d"; + $sql .= " pa.datep as datep, pa.ref as payment_ref"; + $sql .= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$paymentfacturetable." as pf ON pf.".$fk_facture2." = f.rowid"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$paymenttable." as pa ON pa.rowid = pf.".$fk_payment; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX.$invoicedettable." as d ON d.".$fk_facture." = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) - 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)"; - $sql .= " AND f.rowid = d.".$fk_facture; - $sql .= " AND s.rowid = f.fk_soc"; - $sql .= " AND pf.".$fk_facture2." = f.rowid"; - $sql .= " AND pa.rowid = pf.".$fk_payment; - if ($y && $m) - { + 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)"; + } + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(pa.datep,'%m') > ".(($q - 1) * 3)." AND date_format(pa.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND pa.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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"; } - if (!$sql) - { + if (!$sql) { dol_syslog("Tax.lib.php::tax_by_rate no accountancy module enabled".$sql, LOG_ERR); return -1; // -1 = Not accountancy module enabled } - if ($sql == 'TODO') return -2; // -2 = Feature not yet available - if ($sql != 'TODO') - { + if ($sql == 'TODO') { + return -2; // -2 = Feature not yet available + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_rate", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $rate = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { + while ($assoc = $db->fetch_array($resql)) { // Code to avoid warnings when array entry not defined - if (!isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht'] = 0; - if (!isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat'] = 0; - if (!isset($list[$assoc['rate']]['localtax1'])) $list[$assoc['rate']]['localtax1'] = 0; - if (!isset($list[$assoc['rate']]['localtax2'])) $list[$assoc['rate']]['localtax2'] = 0; + if (!isset($list[$assoc['rate']]['totalht'])) { + $list[$assoc['rate']]['totalht'] = 0; + } + if (!isset($list[$assoc['rate']]['vat'])) { + $list[$assoc['rate']]['vat'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax1'])) { + $list[$assoc['rate']]['localtax1'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax2'])) { + $list[$assoc['rate']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['rate']]['totalht'] += $assoc['total_ht']; $list[$assoc['rate']]['vat'] += $assoc['total_vat']; @@ -840,11 +1004,23 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $list[$assoc['rate']]['dtype'][] = $assoc['dtype']; $list[$assoc['rate']]['datef'][] = $db->jdate($assoc['datef']); $list[$assoc['rate']]['datep'][] = $db->jdate($assoc['datep']); - $list[$assoc['rate']]['company_name'][] = $assoc['company_name']; - $list[$assoc['rate']]['company_id'][] = $assoc['company_id']; + $list[$assoc['rate']]['ddate_start'][] = $db->jdate($assoc['date_start']); $list[$assoc['rate']]['ddate_end'][] = $db->jdate($assoc['date_end']); + $list[$assoc['rate']]['company_name'][] = $assoc['company_name']; + $list[$assoc['rate']]['company_id'][] = $assoc['company_id']; + $list[$assoc['rate']]['company_alias'][] = $assoc['company_alias']; + $list[$assoc['rate']]['company_email'][] = $assoc['company_email']; + $list[$assoc['rate']]['company_tva_intra'][] = $assoc['company_tva_intra']; + $list[$assoc['rate']]['company_client'][] = $assoc['company_client']; + $list[$assoc['rate']]['company_fournisseur'][] = $assoc['company_fournisseur']; + $list[$assoc['rate']]['company_customer_code'][] = $assoc['company_customer_code']; + $list[$assoc['rate']]['company_supplier_code'][] = $assoc['company_supplier_code']; + $list[$assoc['rate']]['company_customer_accounting_code'][] = $assoc['company_customer_accounting_code']; + $list[$assoc['rate']]['company_supplier_accounting_code'][] = $assoc['company_supplier_accounting_code']; + $list[$assoc['rate']]['company_status'][] = $assoc['company_status']; + $list[$assoc['rate']]['facid'][] = $assoc['facid']; $list[$assoc['rate']]['facnum'][] = $assoc['facnum']; $list[$assoc['rate']]['type'][] = $assoc['type']; @@ -861,6 +1037,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $list[$assoc['rate']]['ptype'][] = $assoc['ptype']; $list[$assoc['rate']]['payment_id'][] = $assoc['payment_id']; + $list[$assoc['rate']]['payment_ref'][] = $assoc['payment_ref']; $list[$assoc['rate']]['payment_amount'][] = $assoc['payment_amount']; $rate = $assoc['rate']; @@ -874,8 +1051,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire // CASE OF EXPENSE REPORT - if ($direction == 'buy') // buy only for expense reports - { + if ($direction == 'buy') { // buy only for expense reports // Define sql request $sql = ''; @@ -885,51 +1061,61 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $sql .= " e.date_debut as date_start, e.date_fin as date_end, e.fk_user_author,"; $sql .= " e.ref as facnum, e.total_ttc as ftotal_ttc, e.date_create, d.fk_c_type_fees as type,"; $sql .= " p.fk_bank as payment_id, p.amount as payment_amount, p.rowid as pid, e.ref as pref"; - $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_det as d ON d.fk_expensereport = e.rowid "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_expensereport as p ON p.fk_expensereport = e.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_det as d ON d.fk_expensereport = e.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_expensereport as p ON p.fk_expensereport = e.rowid"; $sql .= " WHERE e.entity = ".$conf->entity; $sql .= " AND e.fk_statut in (6)"; - if ($y && $m) - { + if ($y && $m) { $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))."'"; } - if ($q) $sql .= " AND (date_format(p.datep,'%m') > ".(($q - 1) * 3)." AND date_format(p.datep,'%m') <= ".($q * 3).")"; - if ($date_start && $date_end) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + if ($q) { + $sql .= " AND p.datep > '".$db->idate(dol_get_first_day($y, (($q - 1) * 3) + 1, false))."'"; + $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, ($q * 3), false))."'"; + } + 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_NOT_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) - { + if (!$sql) { dol_syslog("Tax.lib.php::tax_by_rate no accountancy module enabled".$sql, LOG_ERR); return -1; // -1 = Not accountancy module enabled } - if ($sql == 'TODO') return -2; // -2 = Feature not yet available - if ($sql != 'TODO') - { + if ($sql == 'TODO') { + return -2; // -2 = Feature not yet available + } + if ($sql != 'TODO') { dol_syslog("Tax.lib.php::tax_by_rate", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $rate = -1; $oldrowid = ''; - while ($assoc = $db->fetch_array($resql)) - { + while ($assoc = $db->fetch_array($resql)) { // Code to avoid warnings when array entry not defined - if (!isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht'] = 0; - if (!isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat'] = 0; - if (!isset($list[$assoc['rate']]['localtax1'])) $list[$assoc['rate']]['localtax1'] = 0; - if (!isset($list[$assoc['rate']]['localtax2'])) $list[$assoc['rate']]['localtax2'] = 0; + if (!isset($list[$assoc['rate']]['totalht'])) { + $list[$assoc['rate']]['totalht'] = 0; + } + if (!isset($list[$assoc['rate']]['vat'])) { + $list[$assoc['rate']]['vat'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax1'])) { + $list[$assoc['rate']]['localtax1'] = 0; + } + if (!isset($list[$assoc['rate']]['localtax2'])) { + $list[$assoc['rate']]['localtax2'] = 0; + } - if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid - { + if ($assoc['rowid'] != $oldrowid) { // Si rupture sur d.rowid $oldrowid = $assoc['rowid']; $list[$assoc['rate']]['totalht'] += $assoc['total_ht']; $list[$assoc['rate']]['vat'] += $assoc['total_vat']; @@ -962,6 +1148,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $list[$assoc['rate']]['ptype'][] = 'ExpenseReportPayment'; $list[$assoc['rate']]['payment_id'][] = $assoc['payment_id']; + $list[$assoc['rate']]['payment_ref'][] = $assoc['payment_ref']; $list[$assoc['rate']]['payment_amount'][] = $assoc['payment_amount']; $rate = $assoc['rate']; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 1500739b7dd..e2e06487de8 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -88,7 +88,9 @@ function ticket_prepare_head($object) $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.''; + if ($nbContact > 0) { + $head[$h][1] .= ''.$nbContact.''; + } $head[$h][2] = 'contact'; $h++; } @@ -124,8 +126,7 @@ function ticket_prepare_head($object) $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))) - { + 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"); } @@ -150,8 +151,7 @@ function showDirectPublicLink($object) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $email = CMailFile::getValidAddress($object->origin_email, 2); $url = ''; - if ($email) - { + if ($email) { $url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email; } @@ -159,9 +159,12 @@ function showDirectPublicLink($object) if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { $out .= ''.$langs->trans("PublicInterfaceNotEnabled").''; } else { - $out .= img_picto('', 'object_globe.png').' '.$langs->trans("TicketPublicAccess").':
    '; + $out .= img_picto('', 'object_globe.png').' '.$langs->trans("TicketPublicAccess").'
    '; if ($url) { + $out .= ''; $out .= ajax_autoselect("directpubliclink", 0); } else { $out .= ''.$langs->trans("TicketNotCreatedFromPublicInterface").''; @@ -239,7 +242,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } @@ -278,7 +281,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no dol_include_once('/comm/action/class/actioncomm.class.php'); // Check parameters - if (!is_object($filterobj) && !is_object($objcon)) dol_print_error('', 'BadParameter'); + if (!is_object($filterobj) && !is_object($objcon)) { + dol_print_error('', 'BadParameter'); + } $histo = array(); $numaction = 0; @@ -362,22 +367,34 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $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; + 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; + 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; + 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; + 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; + 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; + if ($filterobj->id) { + $sql .= " AND a.fk_element = ".$filterobj->id; + } } } @@ -396,20 +413,28 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } } } 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 ($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 ($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')) - { + && (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"; @@ -465,7 +490,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no //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->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) { + $tododone = 'todo'; + } $histo[$numaction] = array( 'type'=>$obj->type, @@ -556,7 +583,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } else { $out .= ''; } - if ($filterobj && get_class($filterobj) == 'Societe') $out .= ''; + if ($filterobj && get_class($filterobj) == 'Societe') { + $out .= ''; + } $out .= "\n"; @@ -598,12 +627,16 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no if ($donetodo) { $tmp = ''; - if (get_class($filterobj) == 'Societe') $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 .= ''; + if (get_class($filterobj) == 'Societe') { + $tmp .= ''; + } $out .= getTitleFieldOfList($tmp); } @@ -614,8 +647,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $actualCycleDate = false; - 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']; @@ -659,8 +691,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no //} if ($user->rights->agenda->allactions->create || - (($actionstatic->authorid == $user->id || $actionstatic->userownerid == $user->id) && $user->rights->agenda->myactions->create)) - { + (($actionstatic->authorid == $user->id || $actionstatic->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { $out .= ''; } @@ -678,11 +709,21 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } } $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")).' '; + 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 .= "\n"; // Ref @@ -690,8 +731,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no // Author of event $out .= ''; - if ($histo[$key]['userid'] > 0) - { + if ($histo[$key]['userid'] > 0) { if (!isset($userGetNomUrlCache[$histo[$key]['userid']])) { // is in cache ? $userstatic->fetch($histo[$key]['userid']); $userGetNomUrlCache[$histo[$key]['userid']] = $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); @@ -730,8 +770,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no if (!empty($histo[$key]['message']) && $actionstatic->code != 'AC_TICKET_CREATE' && $actionstatic->code != 'AC_TICKET_MODIFY' - ) - { + ) { $out .= '
    '; $out .= $histo[$key]['message']; $out .= '
    '; @@ -755,8 +794,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $contactList .= !empty($contactList) ? ', ' : ''; $contactList .= $contact->getNomUrl(1); if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') { - if (!empty($contact->phone_pro)) + if (!empty($contact->phone_pro)) { $contactList .= '('.dol_print_phone($contact->phone_pro).')'; + } } } } @@ -766,24 +806,24 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $contact = new Contact($db); $result = $contact->fetch($histo[$key]['contact_id']); - if ($result < 0) + if ($result < 0) { dol_print_error($db, $contact->error); + } if ($result > 0) { $footer .= $contact->getNomUrl(1); if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') { - if (!empty($contact->phone_pro)) + if (!empty($contact->phone_pro)) { $footer .= '('.dol_print_phone($contact->phone_pro).')'; + } } } } $documents = getTicketActionCommEcmList($actionstatic); - if (!empty($documents)) - { + if (!empty($documents)) { $footer .= '
    '; - foreach ($documents as $doc) - { + foreach ($documents as $doc) { $footer .= 'id.'" '; $footer .= ' data-path="'.$doc->filepath.'"'; @@ -826,8 +866,11 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $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 e4de8b0c833..255bc47d9a9 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -38,8 +38,7 @@ function tree_showpad(&$fulltree, $key, $silent = 0) $pos = 1; // Loop on each pos, because we will output an img for each pos - while ($pos <= $fulltree[$key]['level'] && $fulltree[$key]['level'] > 0) - { + while ($pos <= $fulltree[$key]['level'] && $fulltree[$key]['level'] > 0) { // Process for column $pos $atleastoneofthislevelafter = 0; @@ -47,41 +46,41 @@ function tree_showpad(&$fulltree, $key, $silent = 0) $nbofdocinsub = 0; $found = 0; //print 'x'.$key; - foreach ($fulltree as $key2 => $val2) - { + foreach ($fulltree as $key2 => $val2) { //print "x".$pos." ".$key2." ".$found." ".$fulltree[$key2]['level']; - if ($found == 1) // We are after the entry to show - { - if ($fulltree[$key2]['level'] > $pos) - { + if ($found == 1) { // We are after the entry to show + if ($fulltree[$key2]['level'] > $pos) { $nbofdirinsub++; - if (isset($fulltree[$key2]['cachenbofdoc']) && $fulltree[$key2]['cachenbofdoc'] > 0) $nbofdocinsub += $fulltree[$key2]['cachenbofdoc']; + if (isset($fulltree[$key2]['cachenbofdoc']) && $fulltree[$key2]['cachenbofdoc'] > 0) { + $nbofdocinsub += $fulltree[$key2]['cachenbofdoc']; + } } - if ($fulltree[$key2]['level'] == $pos) - { + if ($fulltree[$key2]['level'] == $pos) { $atleastoneofthislevelafter = 1; } - if ($fulltree[$key2]['level'] <= $pos) - { + if ($fulltree[$key2]['level'] <= $pos) { break; } } - if ($key2 == $key) // We found ourself, so now every lower level will be counted - { + if ($key2 == $key) { // We found ourself, so now every lower level will be counted $found = 1; } } //print $atleastoneofthislevelafter; - if (!$silent) - { - if ($atleastoneofthislevelafter) - { - if ($fulltree[$key]['level'] == $pos) print img_picto_common('', 'treemenu/branch.gif'); - else print img_picto_common('', 'treemenu/line.gif'); + if (!$silent) { + if ($atleastoneofthislevelafter) { + if ($fulltree[$key]['level'] == $pos) { + print img_picto_common('', 'treemenu/branch.gif'); + } else { + print img_picto_common('', 'treemenu/line.gif'); + } } else { - if ($fulltree[$key]['level'] == $pos) print img_picto_common('', 'treemenu/branchbottom.gif'); - else print img_picto_common('', 'treemenu/linebottom.gif'); + if ($fulltree[$key]['level'] == $pos) { + print img_picto_common('', 'treemenu/branchbottom.gif'); + } else { + print img_picto_common('', 'treemenu/linebottom.gif'); + } } } $pos++; @@ -116,10 +115,11 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset { global $tree_recur_alreadyadded, $menu_handler_to_search; - if ($rang == 0 && empty($donoresetalreadyloaded)) $tree_recur_alreadyadded = array(); + if ($rang == 0 && empty($donoresetalreadyloaded)) { + $tree_recur_alreadyadded = array(); + } - if ($rang == 0) - { + if ($rang == 0) { // Test also done with jstree and dynatree (not able to have inside label) print ''."\n"; - } elseif ($type == 'organization') - { + } elseif ($type == 'organization') { $companyname = $mysoc->name; $url = $mysoc->url; @@ -601,16 +596,16 @@ function getStructuredData($type, $data = array()) $ret .= '"https://www.'.$key.'.com/'.dol_escape_json($value).'"'; } $i++; - if ($i < count($mysoc->socialnetworks)) $ret .= ', '; + if ($i < count($mysoc->socialnetworks)) { + $ret .= ', '; + } } $ret .= ']'."\n"; } $ret .= '}'."\n"; $ret .= ''."\n"; - } elseif ($type == 'blogpost') - { - if (!empty($websitepage->author_alias)) - { + } elseif ($type == 'blogpost') { + if (!empty($websitepage->author_alias)) { //include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; //$tmpuser = new User($db); //$restmpuser = $tmpuser->fetch($websitepage->fk_user_creat); @@ -662,7 +657,9 @@ function getStructuredData($type, $data = array()) foreach ($arrayofkeywords as $keyword) { $ret .= '"'.dol_escape_json($keyword).'"'; $i++; - if ($i < count($arrayofkeywords)) $ret .= ', '; + if ($i < count($arrayofkeywords)) { + $ret .= ', '; + } } $ret .= '],'."\n"; } @@ -670,8 +667,7 @@ function getStructuredData($type, $data = array()) $ret .= "\n".'}'."\n"; $ret .= ''."\n"; } - } elseif ($type == 'product') - { + } elseif ($type == 'product') { $ret = ''."\n"; $ret .= ''."\n"; - } elseif ($type == 'qa') - { + } elseif ($type == 'qa') { $ret = ''."\n"; $ret .= ''."\n"; + $tplcontent .= ''."\n"; // Add headers $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; @@ -335,8 +353,9 @@ function dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent) dol_mkdir($pathofwebsite); $result = file_put_contents($filehtmlheader, $htmlheadercontent); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filehtmlheader, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -356,8 +375,9 @@ function dolSaveCssFile($filecss, $csscontent) dol_mkdir($pathofwebsite); $result = file_put_contents($filecss, $csscontent); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filecss, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -377,8 +397,9 @@ function dolSaveJsFile($filejs, $jscontent) dol_mkdir($pathofwebsite); $result = file_put_contents($filejs, $jscontent); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filejs, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -398,8 +419,9 @@ function dolSaveRobotFile($filerobot, $robotcontent) dol_mkdir($pathofwebsite); $result = file_put_contents($filerobot, $robotcontent); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filerobot, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -419,8 +441,9 @@ function dolSaveHtaccessFile($filehtaccess, $htaccess) dol_mkdir($pathofwebsite); $result = file_put_contents($filehtaccess, $htaccess); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filehtaccess, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -440,8 +463,9 @@ function dolSaveManifestJson($file, $content) dol_mkdir($pathofwebsite); $result = file_put_contents($file, $content); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -461,8 +485,9 @@ function dolSaveReadme($file, $content) dol_mkdir($pathofwebsite); $result = file_put_contents($file, $content); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } return $result; } @@ -479,10 +504,8 @@ function showWebsiteTemplates(Website $website) global $conf, $langs, $db, $form; $dirthemes = array('/doctemplates/websites'); - if (!empty($conf->modules_parts['websitetemplates'])) // Using this feature slow down application - { - foreach ($conf->modules_parts['websitetemplates'] as $reldir) - { + if (!empty($conf->modules_parts['websitetemplates'])) { // Using this feature slow down application + foreach ($conf->modules_parts['websitetemplates'] as $reldir) { $dirthemes = array_merge($dirthemes, (array) ($reldir.'doctemplates/websites')); } } @@ -511,32 +534,33 @@ function showWebsiteTemplates(Website $website) if (count($dirthemes)) { $i = 0; - foreach ($dirthemes as $dir) - { + foreach ($dirthemes as $dir) { //print $dirroot.$dir;exit; $dirtheme = DOL_DATA_ROOT.$dir; // This include loop on $conf->file->dol_document_root - if (is_dir($dirtheme)) - { + if (is_dir($dirtheme)) { $handle = opendir($dirtheme); - if (is_resource($handle)) - { - while (($subdir = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($subdir = readdir($handle)) !== false) { if (is_file($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' - && substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir)) - { + && substr($subdir, 0, 3) <> 'CVS' && preg_match('/\.zip$/i', $subdir)) { $subdirwithoutzip = preg_replace('/\.zip$/i', '', $subdir); // Disable not stable themes (dir ends with _exp or _dev) - if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) continue; - if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) continue; + if ($conf->global->MAIN_FEATURES_LEVEL < 2 && preg_match('/_dev$/i', $subdir)) { + continue; + } + if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/_exp$/i', $subdir)) { + continue; + } print '
    '; $file = $dirtheme."/".$subdirwithoutzip.".jpg"; $url = DOL_URL_ROOT.'/viewimage.php?modulepart=doctemplateswebsite&file='.$subdirwithoutzip.".jpg"; - if (!file_exists($file)) $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png'; + if (!file_exists($file)) { + $url = DOL_URL_ROOT.'/public/theme/common/nophoto.png'; + } $originalfile = basename($file); $entity = $conf->entity; @@ -546,8 +570,11 @@ function showWebsiteTemplates(Website $website) $ret = ''; $urladvanced = getAdvancedPreviewUrl($modulepart, $originalfile, 1, '&entity='.$entity); - if (!empty($urladvanced)) $ret .= ''; - else $ret .= ''; + if (!empty($urladvanced)) { + $ret .= ''; + } else { + $ret .= ''; + } print $ret; print ''.$title.''; print ''; diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 2545c8e5973..ad4688f9134 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -39,55 +39,57 @@ function check_authentication($authentication, &$error, &$errorcode, &$errorlabe $fuser = new User($db); - if (!$error && ($authentication['dolibarrkey'] != $conf->global->WEBSERVICES_KEY)) - { + if (!$error && ($authentication['dolibarrkey'] != $conf->global->WEBSERVICES_KEY)) { $error++; - $errorcode = 'BAD_VALUE_FOR_SECURITY_KEY'; $errorlabel = 'Value provided into dolibarrkey entry field does not match security key defined in Webservice module setup'; + $errorcode = 'BAD_VALUE_FOR_SECURITY_KEY'; + $errorlabel = 'Value provided into dolibarrkey entry field does not match security key defined in Webservice module setup'; } - if (!$error && !empty($authentication['entity']) && !is_numeric($authentication['entity'])) - { + if (!$error && !empty($authentication['entity']) && !is_numeric($authentication['entity'])) { $error++; - $errorcode = 'BAD_PARAMETERS'; $errorlabel = "The entity parameter must be empty (or filled with numeric id of instance if multicompany module is used)."; + $errorcode = 'BAD_PARAMETERS'; + $errorlabel = "The entity parameter must be empty (or filled with numeric id of instance if multicompany module is used)."; } - if (!$error) - { + if (!$error) { $result = $fuser->fetch('', $authentication['login'], '', 0); - if ($result < 0) - { + if ($result < 0) { $error++; - $errorcode = 'ERROR_FETCH_USER'; $errorlabel = 'A technical error occurred during fetch of user'; - } elseif ($result == 0) - { + $errorcode = 'ERROR_FETCH_USER'; + $errorlabel = 'A technical error occurred during fetch of user'; + } elseif ($result == 0) { $error++; - $errorcode = 'BAD_CREDENTIALS'; $errorlabel = 'Bad value for login or password'; + $errorcode = 'BAD_CREDENTIALS'; + $errorlabel = 'Bad value for login or password'; } - if (!$error && $fuser->statut == 0) - { + if (!$error && $fuser->statut == 0) { $error++; - $errorcode = 'ERROR_USER_DISABLED'; $errorlabel = 'This user has been locked or disabled'; + $errorcode = 'ERROR_USER_DISABLED'; + $errorlabel = 'This user has been locked or disabled'; } // Validation of login - if (!$error) - { + if (!$error) { $fuser->getrights(); // Load permission of user // Authentication mode - if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'http,dolibarr'; + if (empty($dolibarr_main_authentication)) { + $dolibarr_main_authentication = 'http,dolibarr'; + } // Authentication mode: forceuser - if ($dolibarr_main_authentication == 'forceuser' && empty($dolibarr_auto_user)) $dolibarr_auto_user = 'auto'; + if ($dolibarr_main_authentication == 'forceuser' && empty($dolibarr_auto_user)) { + $dolibarr_auto_user = 'auto'; + } // Set authmode $authmode = explode(',', $dolibarr_main_authentication); include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $login = checkLoginPassEntity($authentication['login'], $authentication['password'], $authentication['entity'], $authmode, 'ws'); - if (empty($login)) - { + if (empty($login)) { $error++; - $errorcode = 'BAD_CREDENTIALS'; $errorlabel = 'Bad value for login or password'; + $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 e7252ac2171..fcd1660985b 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -38,8 +38,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) dol_syslog("xcal.lib.php::build_calfile Build cal file ".$outputfile." to format ".$format); - if (empty($outputfile)) - { + if (empty($outputfile)) { // -1 = error return -1; } @@ -47,15 +46,13 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) // Note: A cal file is an UTF8 encoded file $calfileh = fopen($outputfile, "w"); - if ($calfileh) - { + if ($calfileh) { include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; $now = dol_now(); $encoding = ""; - if ($format === "vcal") - { + if ($format === "vcal") { $encoding = "ENCODING=QUOTED-PRINTABLE:"; } @@ -72,8 +69,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fwrite($calfileh, "X-WR-CALDESC:".$encoding.format_cal($format, $desc)."\n"); //fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n"); - if (!empty($conf->global->MAIN_AGENDA_EXPORT_CACHE) && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) - { + if (!empty($conf->global->MAIN_AGENDA_EXPORT_CACHE) && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) { $hh = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "hour"); $mm = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "min"); $ss = convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE, "sec"); @@ -81,8 +77,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fwrite($calfileh, "X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); } - foreach ($events_array as $key => $event) - { + foreach ($events_array as $key => $event) { // See http://fr.wikipedia.org/wiki/ICalendar for format // See http://www.ietf.org/rfc/rfc2445.txt for RFC @@ -147,28 +142,22 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) END:VEVENT */ - if ($type === "event") - { + if ($type === "event") { fwrite($calfileh, "BEGIN:VEVENT\n"); fwrite($calfileh, "UID:".$uid."\n"); - if (!empty($email)) - { + if (!empty($email)) { fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); } - if (!empty($url)) - { + if (!empty($url)) { fwrite($calfileh, "URL:".$url."\n"); } - if (is_array($assignedUsers)) - { - foreach ($assignedUsers as $assignedUser) - { - if ($assignedUser->email === $email) - { + if (is_array($assignedUsers)) { + foreach ($assignedUsers as $assignedUser) { + if ($assignedUser->email === $email) { continue; } @@ -176,32 +165,27 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) } } - if ($created) - { + if ($created) { fwrite($calfileh, "CREATED:".dol_print_date($created, "dayhourxcard", true)."\n"); } - if ($modified) - { + if ($modified) { fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, "dayhourxcard", true)."\n"); } fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); - if (!empty($location)) - { + if (!empty($location)) { fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); } - if ($fulldayevent) - { + if ($fulldayevent) { fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); } // see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2 - if ($fulldayevent) - { + if ($fulldayevent) { fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n"); } @@ -213,8 +197,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) $prefix = ""; $startdatef = dol_print_date($startdate, "dayhourxcard", true); - if ($fulldayevent) - { + if ($fulldayevent) { // Local time $prefix = ";VALUE=DATE"; $startdatef = dol_print_date($startdate, "dayxcard", false); @@ -223,15 +206,12 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fwrite($calfileh, "DTSTART".$prefix.":".$startdatef."\n"); // End date - if ($fulldayevent) - { - if (empty($enddate)) - { + if ($fulldayevent) { + if (empty($enddate)) { $enddate = dol_time_plus_duree($startdate, 1, "d"); } } else { - if (empty($enddate)) - { + if (empty($enddate)) { $enddate = $startdate + $duration; } } @@ -239,8 +219,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) $prefix = ""; $enddatef = dol_print_date($enddate, "dayhourxcard", true); - if ($fulldayevent) - { + if ($fulldayevent) { $prefix = ";VALUE=DATE"; $enddatef = dol_print_date($enddate + 1, "dayxcard", false); @@ -251,13 +230,11 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fwrite($calfileh, "DTEND".$prefix.":".$enddatef."\n"); fwrite($calfileh, "STATUS:CONFIRMED\n"); - if (!empty($transparency)) - { + if (!empty($transparency)) { fwrite($calfileh, "TRANSP:".$transparency."\n"); } - if (!empty($category)) - { + if (!empty($category)) { fwrite($calfileh, "CATEGORIES:".$encoding.$category."\n"); } @@ -265,29 +242,24 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) } // Output the vCard/iCal VJOURNAL object - if ($type === "journal") - { + if ($type === "journal") { fwrite($calfileh, "BEGIN:VJOURNAL\n"); fwrite($calfileh, "UID:".$uid."\n"); - if (!empty($email)) - { + if (!empty($email)) { fwrite($calfileh, "ORGANIZER:MAILTO:".$email."\n"); fwrite($calfileh, "CONTACT:MAILTO:".$email."\n"); } - if (!empty($url)) - { + if (!empty($url)) { fwrite($calfileh, "URL:".$url."\n"); } - if ($created) - { + if ($created) { fwrite($calfileh, "CREATED:".dol_print_date($created, "dayhourxcard", true)."\n"); } - if ($modified) - { + if ($modified) { fwrite($calfileh, "LAST-MODIFIED:".dol_print_date($modified, "dayhourxcard", true)."\n"); } @@ -309,8 +281,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fclose($calfileh); - if (!empty($conf->global->MAIN_UMASK)) - { + if (!empty($conf->global->MAIN_UMASK)) { @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); } } else { @@ -340,16 +311,14 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt dol_syslog("xcal.lib.php::build_rssfile Build rss file ".$outputfile." to format ".$format); - if (empty($outputfile)) - { + if (empty($outputfile)) { // -1 = error return -1; } $fichier = fopen($outputfile, "w"); - if ($fichier) - { + if ($fichier) { $date = date("r"); // Print header @@ -361,15 +330,17 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, "\n"); fwrite($fichier, "".$title."\n"); - if ($langcode) fwrite($fichier, "".$langcode."\n"); + if ($langcode) { + fwrite($fichier, "".$langcode."\n"); + } /* - fwrite($fichier, ""."\n". - // "fr"."\n". - "Dolibarr"."\n". - "".$date.""."\n". - "Dolibarr"."\n"); - */ + fwrite($fichier, ""."\n". + // "fr"."\n". + "Dolibarr"."\n". + "".$date.""."\n". + "Dolibarr"."\n"); + */ if (empty($url)) { // Define $urlwithroot @@ -382,19 +353,16 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, "\n"); - foreach ($events_array as $key => $event) - { + foreach ($events_array as $key => $event) { $eventqualified = true; - if ($filter) - { + if ($filter) { // TODO Add a filter $eventqualified = false; } - if ($eventqualified) - { + if ($eventqualified) { if (is_object($event) && get_class($event) == 'WebsitePage') { // Convert object into an array $tmpevent = array(); @@ -417,11 +385,11 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $category = $event["category"]; /* No place inside a RSS - $priority = $event["priority"]; - $fulldayevent = $event["fulldayevent"]; - $location = $event["location"]; - $email = $event["email"]; - */ + $priority = $event["priority"]; + $fulldayevent = $event["fulldayevent"]; + $location = $event["location"]; + $email = $event["email"]; + */ $description = dol_string_nohtmltag(preg_replace("//i", "\n", $event["desc"]), 0); @@ -432,8 +400,9 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, "\n"); fwrite($fichier, "global->MAIN_UMASK)) - { + if (!empty($conf->global->MAIN_UMASK)) { @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); } } @@ -471,13 +439,11 @@ function format_cal($format, $string) $newstring = $string; - if ($format === "vcal") - { + if ($format === "vcal") { $newstring = quotedPrintEncode($newstring); } - if ($format === "ical") - { + if ($format === "ical") { // Replace new lines chars by "\n" $newstring = preg_replace("/\r\n/i", "\\n", $newstring); $newstring = preg_replace("/\n\r/i", "\\n", $newstring); @@ -503,17 +469,14 @@ function calEncode($line) $newpara = ""; // If mb_ functions exists, it"s better to use them - if (function_exists("mb_strlen")) - { + if (function_exists("mb_strlen")) { $strlength = mb_strlen($line, "UTF-8"); - for ($j = 0; $j < $strlength; $j++) - { + for ($j = 0; $j < $strlength; $j++) { // Take char at position $j $char = mb_substr($line, $j, 1, "UTF-8"); - if ((mb_strlen($newpara, "UTF-8") + mb_strlen($char, "UTF-8")) >= 75) - { + if ((mb_strlen($newpara, "UTF-8") + mb_strlen($char, "UTF-8")) >= 75) { // CRLF + Space for cal $out .= $newpara."\r\n "; @@ -527,13 +490,11 @@ function calEncode($line) } else { $strlength = dol_strlen($line); - for ($j = 0; $j < $strlength; $j++) - { + for ($j = 0; $j < $strlength; $j++) { // Take char at position $j $char = substr($line, $j, 1); - if ((dol_strlen($newpara) + dol_strlen($char)) >= 75) - { + if ((dol_strlen($newpara) + dol_strlen($char)) >= 75) { // CRLF + Space for cal $out .= $newpara."\r\n "; @@ -562,32 +523,29 @@ function quotedPrintEncode($str, $forcal = 0) $lines = preg_split("/\r\n/", $str); $out = ""; - foreach ($lines as $line) - { + foreach ($lines as $line) { $newpara = ""; // Do not use dol_strlen here, we need number of bytes $strlength = strlen($line); - for ($j = 0; $j < $strlength; $j++) - { + for ($j = 0; $j < $strlength; $j++) { $char = substr($line, $j, 1); $ascii = ord($char); - if ($ascii < 32 || $ascii === 61 || $ascii > 126) - { + if ($ascii < 32 || $ascii === 61 || $ascii > 126) { $char = "=".strtoupper(sprintf("%02X", $ascii)); } // Do not use dol_strlen here, we need number of bytes - if ((strlen($newpara) + strlen($char)) >= 76) - { + if ((strlen($newpara) + strlen($char)) >= 76) { // New line with carray-return (CR) and line-feed (LF) $out .= $newpara."=\r\n"; // extra space for cal - if ($forcal) + if ($forcal) { $out .= " "; + } $newpara = ""; } diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index a6f9323f99b..1b01a3eb782 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -39,12 +39,13 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes // Force master entity in transversal mode $entity = $entitytotest; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) $entity = 1; + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + $entity = 1; + } $login = ''; - if (!empty($usertotest)) - { + 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); @@ -57,7 +58,9 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $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)."'"; + if (preg_match('/@/', $usertotest)) { + $sql .= ' OR '.$usernamecol2." = '".$db->escape($usertotest)."'"; + } $sql .= ') AND '.$entitycol." IN (0,".($entity ? $entity : 1).")"; $sql .= ' AND statut = 1'; // Note: Test on validity is done later @@ -66,11 +69,9 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $sql .= ' ORDER BY entity DESC'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $now = dol_now(); if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) { // Load translation files required by the page @@ -93,34 +94,33 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes // Check crypted password $cryptType = ''; - if (!empty($conf->global->DATABASE_PWD_ENCRYPTED)) $cryptType = $conf->global->DATABASE_PWD_ENCRYPTED; + if (!empty($conf->global->DATABASE_PWD_ENCRYPTED)) { + $cryptType = $conf->global->DATABASE_PWD_ENCRYPTED; + } // By default, we use default setup for encryption rule - if (!in_array($cryptType, array('auto'))) $cryptType = 'auto'; + if (!in_array($cryptType, array('auto'))) { + $cryptType = 'auto'; + } // Check crypted password according to crypt algorithm - if ($cryptType == 'auto') - { - if (dol_verifyHash($passtyped, $passcrypted, '0')) - { + if ($cryptType == 'auto') { + if (dol_verifyHash($passtyped, $passcrypted, '0')) { $passok = true; - dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok"); + dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - hash ".$cryptType." of pass is ok"); } } // For compatibility with very old versions - if (!$passok) - { + if (!$passok) { if ((!$passcrypted || $passtyped) - && ($passclear && ($passtyped == $passclear))) - { + && ($passclear && ($passtyped == $passclear))) { $passok = true; dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found pass in database"); } } // Password ok ? - if ($passok) - { + if ($passok) { $login = $obj->login; } else { sleep(2); // Anti brut force protection @@ -133,15 +133,14 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes } // We must check entity - if ($passok && !empty($conf->multicompany->enabled)) // We must check entity - { + if ($passok && !empty($conf->multicompany->enabled)) { // We must check entity global $mc; - if (!isset($mc)) $conf->multicompany->enabled = false; // Global not available, disable $conf->multicompany->enabled for safety - else { + if (!isset($mc)) { + $conf->multicompany->enabled = false; // Global not available, disable $conf->multicompany->enabled for safety + } else { $ret = $mc->checkRight($obj->rowid, $entitytotest); - if ($ret < 0) - { + if ($ret < 0) { dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO entity '".$entitytotest."' not allowed for user '".$obj->rowid."'", LOG_NOTICE); $login = ''; // force authentication failure } diff --git a/htdocs/core/login/functions_forceuser.php b/htdocs/core/login/functions_forceuser.php index 91040f98f8c..427e9c52e7e 100644 --- a/htdocs/core/login/functions_forceuser.php +++ b/htdocs/core/login/functions_forceuser.php @@ -40,9 +40,13 @@ function check_user_password_forceuser($usertotest, $passwordtotest, $entitytote dol_syslog("functions_forceuser::check_user_password_forceuser"); $login = $dolibarr_auto_user; - if (empty($login)) $login = 'auto'; + if (empty($login)) { + $login = 'auto'; + } - if ($_SESSION["dol_loginmesg"]) $login = ''; + if ($_SESSION["dol_loginmesg"]) { + $login = ''; + } dol_syslog("functions_forceuser::check_user_password_forceuser ok. forced user = ".$login); return $login; diff --git a/htdocs/core/login/functions_googleoauth.php b/htdocs/core/login/functions_googleoauth.php index b5e56c74d74..0fce5d50587 100644 --- a/htdocs/core/login/functions_googleoauth.php +++ b/htdocs/core/login/functions_googleoauth.php @@ -48,26 +48,25 @@ function check_user_password_googleoauth($usertotest, $passwordtotest, $entityto $login = ''; // Get identity from user and redirect browser to Google OAuth Server - if (GETPOSTISSET('username')) - { + if (GETPOSTISSET('username')) { /*$openid = new SimpleOpenID(); - $openid->SetIdentity($_POST['username']); - $protocol = ($conf->file->main_force_https ? 'https://' : 'http://'); - $openid->SetTrustRoot($protocol . $_SERVER["HTTP_HOST"]); - $openid->SetRequiredFields(array('email','fullname')); - $_SESSION['dol_entity'] = $_POST["entity"]; - //$openid->SetOptionalFields(array('dob','gender','postcode','country','language','timezone')); - if ($openid->sendDiscoveryRequestToGetXRDS()) - { - $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(); - return false; - } - return false;*/ + $openid->SetIdentity($_POST['username']); + $protocol = ($conf->file->main_force_https ? 'https://' : 'http://'); + $openid->SetTrustRoot($protocol . $_SERVER["HTTP_HOST"]); + $openid->SetRequiredFields(array('email','fullname')); + $_SESSION['dol_entity'] = $_POST["entity"]; + //$openid->SetOptionalFields(array('dob','gender','postcode','country','language','timezone')); + if ($openid->sendDiscoveryRequestToGetXRDS()) + { + $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(); + return false; + } + return false;*/ } diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php index 7b2eebb0426..92b5af438d8 100644 --- a/htdocs/core/login/functions_http.php +++ b/htdocs/core/login/functions_http.php @@ -38,8 +38,7 @@ function check_user_password_http($usertotest, $passwordtotest, $entitytotest) dol_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".(empty($_SERVER["REMOTE_USER"]) ? '' : $_SERVER["REMOTE_USER"])); $login = ''; - if (!empty($_SERVER["REMOTE_USER"])) - { + if (!empty($_SERVER["REMOTE_USER"])) { $login = $_SERVER["REMOTE_USER"]; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 41ce8a67316..9de95be506b 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -45,13 +45,14 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // Force master entity in transversal mode $entity = $entitytotest; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) $entity = 1; + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + $entity = 1; + } $login = ''; $resultFetchUser = ''; - if (!function_exists("ldap_connect")) - { + if (!function_exists("ldap_connect")) { dol_syslog("functions_ldap::check_user_password_ldap Authentication KO failed to connect to LDAP. LDAP functions are disabled on this PHP", LOG_ERR); sleep(1); @@ -62,8 +63,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) return; } - if ($usertotest) - { + if ($usertotest) { dol_syslog("functions_ldap::check_user_password_ldap usertotest=".$usertotest." passwordtotest=".preg_replace('/./', '*', $passwordtotest)." entitytotest=".$entitytotest); // If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko @@ -78,7 +78,9 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $ldapadminpass = $dolibarr_main_auth_ldap_admin_pass; $ldapdebug = (empty($dolibarr_main_auth_ldap_debug) || $dolibarr_main_auth_ldap_debug == "false" ? false : true); - if ($ldapdebug) print "DEBUG: Logging LDAP steps
    \n"; + if ($ldapdebug) { + print "DEBUG: Logging LDAP steps
    \n"; + } require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; $ldap = new Ldap(); @@ -89,8 +91,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $ldap->searchUser = $ldapadminlogin; $ldap->searchPassword = $ldapadminpass; - if ($ldapdebug) - { + if ($ldapdebug) { dol_syslog("functions_ldap::check_user_password_ldap Server:".join(',', $ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType); dol_syslog("functions_ldap::check_user_password_ldap uid/samacountname=".$ldapuserattr.", dn=".$ldapdn.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword); print "DEBUG: Server:".join(',', $ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType."
    \n"; @@ -109,17 +110,16 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // If admin login provided // Code to get user in LDAP from an admin connection (may differ from user connection, done later) - if ($ldapadminlogin) - { + if ($ldapadminlogin) { $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $resultFetchLdapUser = $ldap->fetch($usertotest, $userSearchFilter); //dol_syslog('functions_ldap::check_user_password_ldap resultFetchLdapUser='.$resultFetchLdapUser); - if ($resultFetchLdapUser > 0 && $ldap->pwdlastset == 0) // If ok but password need to be reset - { + if ($resultFetchLdapUser > 0 && $ldap->pwdlastset == 0) { // If ok but password need to be reset dol_syslog('functions_ldap::check_user_password_ldap '.$usertotest.' must change password next logon'); - if ($ldapdebug) print "DEBUG: User ".$usertotest." must change password
    \n"; + if ($ldapdebug) { + print "DEBUG: User ".$usertotest." must change password
    \n"; + } $ldap->close(); sleep(1); $langs->load('ldap'); @@ -127,7 +127,9 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) return ''; } } else { - if ($ldapdebug) print "DEBUG: ".$ldap->error."
    \n"; + if ($ldapdebug) { + print "DEBUG: ".$ldap->error."
    \n"; + } } $ldap->close(); } @@ -138,18 +140,21 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $ldap->searchUser = $ldapuserattr."=".$usertotest.",".$ldapdn; // Default dn (will work if LDAP accept a dn with login value inside) // But if LDAP need a dn with name like "cn=Jhon Bloggs,ou=People,dc=foo,dc=com", previous part must have been executed to have // dn detected into ldapUserDN. - if ($resultFetchLdapUser && !empty($ldap->ldapUserDN)) $ldap->searchUser = $ldap->ldapUserDN; + if ($resultFetchLdapUser && !empty($ldap->ldapUserDN)) { + $ldap->searchUser = $ldap->ldapUserDN; + } $ldap->searchPassword = $passwordtotest; // Test with this->seachUser and this->searchPassword //print $resultFetchLdapUser."-".$ldap->ldapUserDN."-".$ldap->searchUser.'-'.$ldap->searchPassword;exit; $result = $ldap->connect_bind(); - if ($result > 0) - { - if ($result == 2) // Connection is ok for user/pass into LDAP - { - dol_syslog("functions_ldap::check_user_password_ldap Authentification ok"); + if ($result > 0) { + if ($result == 2) { // Connection is ok for user/pass into LDAP $login = $usertotest; + if (!empty($conf->global->LDAP_FIELD_LOGIN)) { + $login = $ldap->login; + } + dol_syslog("functions_ldap::check_user_password_ldap $login authentication ok"); require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -173,35 +178,41 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) } // ldap2dolibarr synchronisation - if ($login && !empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') // ldap2dolibarr synchronisation - { + if ($login && !empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') { // ldap2dolibarr synchronisation dol_syslog("functions_ldap::check_user_password_ldap Sync ldap2dolibarr"); // On charge les attributs du user ldap - if ($ldapdebug) print "DEBUG: login ldap = ".$login."
    \n"; + if ($ldapdebug) { + print "DEBUG: login ldap = ".$login."
    \n"; + } $resultFetchLdapUser = $ldap->fetch($login, $userSearchFilter); - if ($ldapdebug) print "DEBUG: UACF = ".join(',', $ldap->uacf)."
    \n"; - if ($ldapdebug) print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset, 'day')."
    \n"; - if ($ldapdebug) print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime, 'day')."
    \n"; + if ($ldapdebug) { + print "DEBUG: UACF = ".join(',', $ldap->uacf)."
    \n"; + } + if ($ldapdebug) { + print "DEBUG: pwdLastSet = ".dol_print_date($ldap->pwdlastset, 'day')."
    \n"; + } + if ($ldapdebug) { + print "DEBUG: badPasswordTime = ".dol_print_date($ldap->badpwdtime, 'day')."
    \n"; + } // On recherche le user dolibarr en fonction de son SID ldap (only for Active Directory) $sid = null; - if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") - { + if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") { $sid = $ldap->getObjectSid($login); - if ($ldapdebug) print "DEBUG: sid = ".$sid."
    \n"; + if ($ldapdebug) { + print "DEBUG: sid = ".$sid."
    \n"; + } } $usertmp = new User($db); $resultFetchUser = $usertmp->fetch('', $login, $sid); - if ($resultFetchUser > 0) - { + if ($resultFetchUser > 0) { dol_syslog("functions_ldap::check_user_password_ldap Sync user found user id=".$usertmp->id); // On verifie si le login a change et on met a jour les attributs dolibarr - if ($usertmp->login != $ldap->login && $ldap->login) - { + if ($usertmp->login != $ldap->login && $ldap->login) { $usertmp->login = $ldap->login; $usertmp->update($usertmp); // TODO Que faire si update echoue car on update avec un login deja existant. @@ -213,23 +224,20 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) unset($usertmp); } - if (!empty($conf->multicompany->enabled)) // We must check entity (even if sync is not active) - { + if (!empty($conf->multicompany->enabled)) { // We must check entity (even if sync is not active) global $mc; $usertmp = new User($db); $usertmp->fetch('', $login); $ret = $mc->checkRight($usertmp->id, $entitytotest); - if ($ret < 0) - { + if ($ret < 0) { dol_syslog("functions_ldap::check_user_password_ldap Authentication KO entity '".$entitytotest."' not allowed for user '".$usertmp->id."'", LOG_NOTICE); $login = ''; // force authentication failure } unset($usertmp); } } - if ($result == 1) - { + if ($result == 1) { dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE); sleep(1); @@ -240,16 +248,15 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) } } 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) - ** 19 - Account locked out (too many invalid login attempts) - ** 32 - User does not exist - ** 49 - Wrong password - ** 53 - Account inactive (manually locked out by administrator) - */ + ** the LDAP server. The common error codes and reasons are listed below : + ** (for iPlanet, other servers may differ) + ** 19 - Account locked out (too many invalid login attempts) + ** 32 - User does not exist + ** 49 - Wrong password + ** 53 - Account inactive (manually locked out by administrator) + */ dol_syslog("functions_ldap::check_user_password_ldap Authentication KO failed to connect to LDAP for '".$usertotest."'", LOG_NOTICE); - if (is_resource($ldap->connection)) // If connection ok but bind ko - { + if (is_resource($ldap->connection)) { // If connection ok but bind ko $ldap->ldapErrorCode = ldap_errno($ldap->connection); $ldap->ldapErrorText = ldap_error($ldap->connection); dol_syslog("functions_ldap::check_user_password_ldap ".$ldap->ldapErrorCode." ".$ldap->ldapErrorText); diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index 3819e3503dd..3f77eca1326 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -51,8 +51,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) $openid->SetRequiredFields(array('email', 'fullname')); $_SESSION['dol_entity'] = $_POST["entity"]; //$openid->SetOptionalFields(array('dob','gender','postcode','country','language','timezone')); - if ($openid->sendDiscoveryRequestToGetXRDS()) - { + if ($openid->sendDiscoveryRequestToGetXRDS()) { $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 { @@ -65,8 +64,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) $openid = new SimpleOpenID(); $openid->SetIdentity($_GET['openid_identity']); $openid_validation_result = $openid->ValidateWithServer(); - if ($openid_validation_result === true) - { + if ($openid_validation_result === true) { // OK HERE KEY IS VALID $sql = "SELECT login, entity, datestartvalidity, dateendvalidity"; @@ -76,11 +74,9 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) dol_syslog("functions_openid::check_user_password_openid", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $now = dol_now(); if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) { // Load translation files required by the page @@ -98,8 +94,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) $login = $obj->login; } } - } elseif ($openid->IsError() === true) - { + } elseif ($openid->IsError() === true) { // ON THE WAY, WE GOT SOME ERROR $_SESSION["dol_loginmesg"] = $openid->GetError(); return false; @@ -108,8 +103,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) //echo "INVALID AUTHORIZATION"; return false; } - } elseif ($_GET['openid_mode'] == 'cancel') - { + } elseif ($_GET['openid_mode'] == 'cancel') { // User Canceled your Request //echo "USER CANCELED REQUEST"; return false; diff --git a/htdocs/core/login/index.html b/htdocs/core/login/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/menus/index.html b/htdocs/core/menus/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 2d77f7a285b..d9c2cad7c9f 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -9,7 +9,7 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; -- table llx_menu -- insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur|supplier_order|supplier_invoice', '($conf->societe->enabled && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) || $conf->fournisseur->enabled || $conf->supplier_order->enabled || $conf->supplier_invoice->enabled))', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur|supplier_order|supplier_invoice', '($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) || $conf->supplier_order->enabled || $conf->supplier_invoice->enabled))', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', 16__+MAX_llx_menu__, __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__); @@ -166,18 +166,18 @@ 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->supplier_proposal->enabled', __HANDLER__, 'left', 1652__+MAX_llx_menu__, 'commercial', '', 1650__+MAX_llx_menu__, '/supplier_proposal/list.php?leftmenu=supplier_proposals', 'List', 1, 'supplier_proposal', '$user->rights->supplier_proposal->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->supplier_proposal->enabled', __HANDLER__, 'left', 1653__+MAX_llx_menu__, 'commercial', '', 1650__+MAX_llx_menu__, '/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier', 'Statistics', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 2, __ENTITY__); -- Commercial - Supplier's orders -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->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 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->supplier_order->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', 'List', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5103__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5104__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5105__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=2', 'StatusOrderApprovedShort', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5106__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=3', 'StatusOrderOnProcessShort', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5107__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=4', 'StatusOrderReceivedPartiallyShort', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=5', 'StatusOrderReceivedAll', 1, 'orders', '$user->rights->fournisseur->commande->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 ('', '$conf->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5109__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=6,7', 'StatusOrderCanceled', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 8, __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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5110__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=9', 'StatusOrderRefused', 1, 'orders', '$user->rights->fournisseur->commande->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->supplier_order->enabled', __HANDLER__, 'left', 5111__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '$user->rights->fournisseur->commande->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 ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)', '', 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->supplier_order->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', 'List', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5103__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=0', 'StatusOrderDraftShort', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5104__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=1', 'StatusOrderValidated', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5105__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=2', 'StatusOrderApprovedShort', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5106__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=3', 'StatusOrderOnProcessShort', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5107__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=4', 'StatusOrderReceivedPartiallyShort', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->creer)', '', 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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=5', 'StatusOrderReceivedAll', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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 ('', '$conf->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5109__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=6,7', 'StatusOrderCanceled', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire)', '', 2, 8, __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->supplier_order->enabled && $leftmenu=="orders_suppliers"', __HANDLER__, 'left', 5110__+MAX_llx_menu__, 'commercial', '', 5102__+MAX_llx_menu__, '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers&statut=9', 'StatusOrderRefused', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->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->supplier_order->enabled', __HANDLER__, 'left', 5111__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire)', '', 2, 7, __ENTITY__); -- Commercial - Contracts 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->contrat->enabled', __HANDLER__, 'left', 1400__+MAX_llx_menu__, 'commercial', 'contracts', 5__+MAX_llx_menu__, '/contrat/index.php?mainmenu=commercial&leftmenu=contracts', 'Contracts', 0, 'contracts', '$user->rights->contrat->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 ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1401__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/card.php?mainmenu=commercial&action=create&leftmenu=contracts', 'NewContract', 1, 'contracts', '$user->rights->contrat->creer', '', 2, 0, __ENTITY__); @@ -233,7 +233,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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?mainmenu=billing&leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/index.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByMonth', 2, 'companies', '$user->rights->tax->charges->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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByThirdparties', 2, 'companies', '$user->rights->tax->charges->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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2305__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?mainmenu=billing&leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 4, __ENTITY__); -- Salary 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->salaries->enabled', __HANDLER__, 'left', 2210__+MAX_llx_menu__, 'billing', 'tax_sal', 6__+MAX_llx_menu__, '/salaries/list.php?mainmenu=billing&leftmenu=tax_salary', 'Salaries', 0, 'salaries', '$user->rights->salaries->read', '', 0, 10, __ENTITY__); @@ -296,7 +296,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- 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__); +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, 16, __ENTITY__); +-- Closure +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', 2437__+MAX_llx_menu__, 'accountancy', 'accountancy_closure', 2400__+MAX_llx_menu__, '/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure', 'MenuAccountancyClosure', 1, 'accountancy', '$user->rights->accounting->fiscalyear->write', '', 0, 17, __ENTITY__); -- Reports 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', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __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_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index b50ff9594c0..b191e24b117 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -54,14 +54,15 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $substitarray = getCommonSubstitutionArray($langs, 0, null, null); - if (empty($noout)) print_start_menu_array_auguria(); + if (empty($noout)) { + print_start_menu_array_auguria(); + } global $usemenuhider; $usemenuhider = 1; // Show/Hide vertical menu. The hamburger icon for .menuhider action. - if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $showmode = 1; $classname = 'class="tmenu menuhider"'; $idsel = 'menu'; @@ -70,8 +71,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout } $num = count($newTabMenu); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $idsel = (empty($newTabMenu[$i]['mainmenu']) ? 'none' : $newTabMenu[$i]['mainmenu']); $shorturl = ''; @@ -82,19 +82,16 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $url = $shorturl = $newTabMenu[$i]['url']; - if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) - { + if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) { $tmp = explode('?', $newTabMenu[$i]['url'], 2); $url = $shorturl = $tmp[0]; $param = (isset($tmp[1]) ? $tmp[1] : ''); // Complete param to force leftmenu to '' to close open menu when we click on a link with no leftmenu defined. - if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && !empty($newTabMenu[$i]['url'])) - { + if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && !empty($newTabMenu[$i]['url'])) { $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; } - if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && empty($newTabMenu[$i]['url'])) - { + if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && empty($newTabMenu[$i]['url'])) { $param .= ($param ? '&' : '').'leftmenu='; } //$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad @@ -102,21 +99,29 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout //$shorturl = $shorturl.($param?'?'.$param:''); $shorturl = $url; - if (DOL_URL_ROOT) $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl); + if (DOL_URL_ROOT) { + $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl); + } } // TODO Find a generic solution - if (preg_match('/search_project_user=__search_project_user__/', $shorturl)) - { + if (preg_match('/search_project_user=__search_project_user__/', $shorturl)) { $search_project_user = GETPOST('search_project_user', 'int'); - if ($search_project_user) $shorturl = preg_replace('/search_project_user=__search_project_user__/', 'search_project_user='.$search_project_user, $shorturl); - else $shorturl = preg_replace('/search_project_user=__search_project_user__/', '', $shorturl); + if ($search_project_user) { + $shorturl = preg_replace('/search_project_user=__search_project_user__/', 'search_project_user='.$search_project_user, $shorturl); + } else { + $shorturl = preg_replace('/search_project_user=__search_project_user__/', '', $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"'; + 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"'; } else { @@ -131,8 +136,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout // 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)) - { + if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && !empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); $mysoc->logo_squarred_mini = (empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI) ? '' : $conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); @@ -141,15 +145,13 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $logoContainerAdditionalClass = ''; } - if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) - { + if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - } - /*elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - }*/ - else { + /*} elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); + }*/ + } else { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_512x512_white.png'; $logoContainerAdditionalClass = ''; } @@ -206,8 +208,7 @@ function print_start_menu_array_auguria() */ function print_start_menu_entry_auguria($idsel, $classname, $showmode) { - if ($showmode) - { + if ($showmode) { print ''; } print "\n"; @@ -305,8 +305,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t global $usemenuhider; $usemenuhider = 0; - if (is_array($moredata) && !empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page - { + if (is_array($moredata) && !empty($moredata['searchform'])) { // searchform can contains select2 code or link to show old search form or link to switch on search page print "\n"; print "\n"; print '
    '."\n"; @@ -315,8 +314,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t print "\n"; } - if (is_array($moredata) && !empty($moredata['bookmarks'])) - { + if (is_array($moredata) && !empty($moredata['bookmarks'])) { print "\n"; print "\n"; print '
    '."\n"; @@ -332,8 +330,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, ($user->socid ? 1 : 0), 'auguria', $tabMenu); // We update newmenu for special dynamic menus - if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account - { + if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') { // Entry for each bank account include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required for to get Account::TYPE_CASH for example $sql = "SELECT rowid, label, courant, rappro, courant"; @@ -343,29 +340,29 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $sql .= " ORDER BY label"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numr = $db->num_rows($resql); $i = 0; - if ($numr > 0) $newmenu->add('/compta/bank/list.php', $langs->trans("BankAccounts"), 0, $user->rights->banque->lire); + if ($numr > 0) { + $newmenu->add('/compta/bank/list.php', $langs->trans("BankAccounts"), 0, $user->rights->banque->lire); + } - while ($i < $numr) - { + while ($i < $numr) { $objp = $db->fetch_object($resql); $newmenu->add('/compta/bank/card.php?id='.$objp->rowid, $objp->label, 1, $user->rights->banque->lire); - if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) // If not cash account and not closed and can be reconciliate - { + if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) { // If not cash account and not closed and can be reconciliate $newmenu->add('/compta/bank/bankentries_list.php?id='.$objp->rowid, $langs->trans("Conciliate"), 2, $user->rights->banque->consolidate); } $i++; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } $db->free($resql); } - if (!empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account - { + if (!empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { // Entry in accountancy journal for each bank account $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy', 10); // Multi journal @@ -376,39 +373,49 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $sql .= " ORDER BY label DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numr = $db->num_rows($resql); $i = 0; - if ($numr > 0) - { - while ($i < $numr) - { + if ($numr > 0) { + while ($i < $numr) { $objp = $db->fetch_object($resql); $nature = ''; // Must match array $sourceList defined into journals_list.php - if ($objp->nature == 2 && !empty($conf->facture->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) $nature = "sells"; + 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)) + && ((!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)) - { - if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') $nature = ''; + } + 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"; } - if ($nature) - { + // To enable when page exists + if (empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) { + if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') { + $nature = ''; + } + } + + if ($nature) { $langs->load('accountancy'); $journallabel = $langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ... $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, $user->rights->accounting->comptarapport->lire); @@ -419,20 +426,19 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t // 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); } - if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP - { + if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') { // Entry for FTP $MAXFTP = 20; $i = 1; - while ($i <= $MAXFTP) - { + while ($i <= $MAXFTP) { $paramkey = 'FTP_NAME_'.$i; //print $paramkey; - if (!empty($conf->global->$paramkey)) - { + if (!empty($conf->global->$paramkey)) { $link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; $newmenu->add($link, dol_trunc($conf->global->$paramkey, 24)); @@ -446,34 +452,41 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t //var_dump($menu_array_before);exit; //var_dump($menu_array_after);exit; $menu_array = $newmenu->liste; - if (is_array($menu_array_before)) $menu_array = array_merge($menu_array_before, $menu_array); - if (is_array($menu_array_after)) $menu_array = array_merge($menu_array, $menu_array_after); + if (is_array($menu_array_before)) { + $menu_array = array_merge($menu_array_before, $menu_array); + } + if (is_array($menu_array_after)) { + $menu_array = array_merge($menu_array, $menu_array_after); + } //var_dump($menu_array);exit; - if (!is_array($menu_array)) return 0; + if (!is_array($menu_array)) { + return 0; + } // Show menu $invert = empty($conf->global->MAIN_MENU_INVERT) ? "" : "invert"; - if (empty($noout)) - { - $altok = 0; $blockvmenuopened = false; $lastlevel0 = ''; + if (empty($noout)) { + $altok = 0; + $blockvmenuopened = false; + $lastlevel0 = ''; $num = count($menu_array); - for ($i = 0; $i < $num; $i++) // Loop on each menu entry - { + for ($i = 0; $i < $num; $i++) { // Loop on each menu entry $showmenu = true; - if (!empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) $showmenu = false; + if (!empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($menu_array[$i]['enabled'])) { + $showmenu = false; + } // Begin of new left menu block - if (empty($menu_array[$i]['level']) && $showmenu) - { + if (empty($menu_array[$i]['level']) && $showmenu) { $altok++; $blockvmenuopened = true; $lastopened = true; - for ($j = ($i + 1); $j < $num; $j++) - { - if (empty($menu_array[$j]['level'])) $lastopened = false; + for ($j = ($i + 1); $j < $num; $j++) { + if (empty($menu_array[$j]['level'])) { + $lastopened = false; + } } - if ($altok % 2 == 0) - { + if ($altok % 2 == 0) { print '
    '."\n"; } else { print '
    '."\n"; @@ -483,10 +496,8 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t // Add tabulation $tabstring = ''; $tabul = ($menu_array[$i]['level'] - 1); - if ($tabul > 0) - { - for ($j = 0; $j < $tabul; $j++) - { + if ($tabul > 0) { + for ($j = 0; $j < $tabul; $j++) { $tabstring .= '   '; } } @@ -496,19 +507,16 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $menu_array[$i]['url'] = make_substitutions($menu_array[$i]['url'], $substitarray); $url = $shorturl = $shorturlwithoutparam = $menu_array[$i]['url']; - if (!preg_match("/^(http:\/\/|https:\/\/)/i", $menu_array[$i]['url'])) - { + if (!preg_match("/^(http:\/\/|https:\/\/)/i", $menu_array[$i]['url'])) { $tmp = explode('?', $menu_array[$i]['url'], 2); $url = $shorturl = $tmp[0]; $param = (isset($tmp[1]) ? $tmp[1] : ''); // params in url of the menu link // Complete param to force leftmenu to '' to close open menu when we click on a link with no leftmenu defined. - if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && !empty($menu_array[$i]['mainmenu'])) - { + if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && !empty($menu_array[$i]['mainmenu'])) { $param .= ($param ? '&' : '').'mainmenu='.$menu_array[$i]['mainmenu'].'&leftmenu='; } - if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && empty($menu_array[$i]['mainmenu'])) - { + if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && empty($menu_array[$i]['mainmenu'])) { $param .= ($param ? '&' : '').'leftmenu='; } //$url.="idmenu=".$menu_array[$i]['rowid']; // Already done by menuLoad @@ -521,64 +529,78 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t print ''."\n"; // Menu level 0 - if ($menu_array[$i]['level'] == 0) - { - if ($menu_array[$i]['enabled']) // Enabled so visible - { + if ($menu_array[$i]['level'] == 0) { + if ($menu_array[$i]['enabled']) { // Enabled so visible 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 { $lastlevel0 = 'hidden'; } - if ($showmenu) - { + if ($showmenu) { print ''."\n"; } } // Menu level > 0 - if ($menu_array[$i]['level'] > 0) - { + if ($menu_array[$i]['level'] > 0) { $cssmenu = ''; - if ($menu_array[$i]['url']) $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url'])); + if ($menu_array[$i]['url']) { + $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url'])); + } - if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') // Enabled so visible, except if parent was not enabled. - { + if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') { // Enabled so visible, except if parent was not enabled. 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"; } } // If next is a new block or if there is nothing after - if (empty($menu_array[$i + 1]['level'])) // End menu block - { - if ($showmenu) + if (empty($menu_array[$i + 1]['level'])) { // End menu block + if ($showmenu) { print ''."\n"; - if ($blockvmenuopened) { print '
    '."\n"; $blockvmenuopened = false; } + } + if ($blockvmenuopened) { + print '
    '."\n"; + $blockvmenuopened = false; + } } } - if ($altok) print '
    '; // End menu block + if ($altok) { + print '
    '; // End menu block + } } return count($menu_array); @@ -599,21 +621,30 @@ function dol_auguria_showmenu($type_user, &$menuentry, &$listofmodulesforexterna //print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms']; //print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal); - if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition - if ($type_user && $menuentry['module']) - { + if (empty($menuentry['enabled'])) { + return 0; // Entry disabled by condition + } + if ($type_user && $menuentry['module']) { $tmploops = explode('|', $menuentry['module']); $found = 0; - foreach ($tmploops as $tmploop) - { + foreach ($tmploops as $tmploop) { if (in_array($tmploop, $listofmodulesforexternal)) { - $found++; break; + $found++; + break; } } - if (!$found) return 0; // Entry is for menus all excluded to external users + if (!$found) { + return 0; // Entry is for menus all excluded to external users + } + } + if (!$menuentry['perms'] && $type_user) { + return 0; // No permissions and user is external + } + if (!$menuentry['perms'] && !empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) { + return 0; // No permissions and option to hide when not allowed, even for internal user, is on + } + if (!$menuentry['perms']) { + return 2; // No permissions and user is external } - if (!$menuentry['perms'] && $type_user) return 0; // No permissions and user is external - if (!$menuentry['perms'] && !empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on - if (!$menuentry['perms']) return 2; // No permissions and user is external return 1; } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index c80810656db..77725be2ae7 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -56,24 +56,27 @@ class MenuManager } - /** - * Load this->tabMenu - * - * @param string $forcemainmenu To force mainmenu to load - * @param string $forceleftmenu To force leftmenu to load - * @return void - */ - public function loadMenu($forcemainmenu = '', $forceleftmenu = '') - { + /** + * Load this->tabMenu + * + * @param string $forcemainmenu To force mainmenu to load + * @param string $forceleftmenu To force leftmenu to load + * @return void + */ + public function loadMenu($forcemainmenu = '', $forceleftmenu = '') + { global $conf, $user, $langs; - // On sauve en session le menu principal choisi - if (GETPOSTISSET("mainmenu")) $_SESSION["mainmenu"] = GETPOST("mainmenu", 'aZ09'); - if (GETPOSTISSET("idmenu")) $_SESSION["idmenu"] = GETPOST("idmenu", 'int'); + // On sauve en session le menu principal choisi + 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 (GETPOSTISSET("mainmenu")) - { + if (GETPOSTISSET("mainmenu")) { // On sauve en session le menu principal choisi $mainmenu = GETPOST("mainmenu", 'aZ09'); $_SESSION["mainmenu"] = $mainmenu; @@ -82,16 +85,16 @@ class MenuManager // On va le chercher en session si non defini par le lien $mainmenu = isset($_SESSION["mainmenu"]) ? $_SESSION["mainmenu"] : ''; } - if (!empty($forcemainmenu)) $mainmenu = $forcemainmenu; + if (!empty($forcemainmenu)) { + $mainmenu = $forcemainmenu; + } - if (GETPOSTISSET("leftmenu")) - { + if (GETPOSTISSET("leftmenu")) { // On sauve en session le menu principal choisi $leftmenu = GETPOST("leftmenu", 'aZ09'); $_SESSION["leftmenu"] = $leftmenu; - if ($_SESSION["leftmenuopened"] == $leftmenu) // To collapse - { + if ($_SESSION["leftmenuopened"] == $leftmenu) { // To collapse //$leftmenu=""; $_SESSION["leftmenuopened"] = ""; } else { @@ -101,7 +104,9 @@ class MenuManager // On va le chercher en session si non defini par le lien $leftmenu = isset($_SESSION["leftmenu"]) ? $_SESSION["leftmenu"] : ''; } - if (!empty($forceleftmenu)) $leftmenu = $forceleftmenu; + if (!empty($forceleftmenu)) { + $leftmenu = $forceleftmenu; + } require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; $tabMenu = array(); @@ -111,7 +116,7 @@ class MenuManager //var_dump($tabMenu); //if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; } - } + } /** @@ -128,8 +133,7 @@ class MenuManager require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php'; - if ($this->type_user == 1) - { + if ($this->type_user == 1) { $conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED = 1; $conf->global->MAIN_SEARCHFORM_CONTACT_DISABLED = 1; } @@ -137,36 +141,39 @@ class MenuManager require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $this->menu = new Menu(); - if (empty($conf->global->MAIN_MENU_INVERT)) - { - 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); + if (empty($conf->global->MAIN_MENU_INVERT)) { + 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 { $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); + 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); + } } - if ($mode == 'topnb') - { + if ($mode == 'topnb') { print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 1, $mode); return $this->menu->getNbOfVisibleMenuEntries(); } - if ($mode == 'jmobile') // Used to get menu in xml ul/li - { + if ($mode == 'jmobile') { // Used to get menu in xml ul/li print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 1, $mode); // $this->menu->liste is top menu //var_dump($this->menu->liste);exit; $lastlevel = array(); print ''."\n"; - foreach ($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' - { + foreach ($this->menu->liste as $key => $val) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' print '
      '; print '
    • '; - if ($val['enabled'] == 1) - { + if ($val['enabled'] == 1) { $substitarray = array('__LOGIN__' => $user->login, '__USER_ID__' => $user->id, '__USER_SUPERVISOR_ID__' => $user->fk_user); $substitarray['__USERID__'] = $user->id; // For backward compatibility $val['url'] = make_substitutions($val['url'], $substitarray); @@ -177,7 +184,9 @@ class MenuManager print ''; // Add font-awesome - if ($val['level'] == 0 && $val['mainmenu'] == 'home') print ''; + if ($val['level'] == 0 && $val['mainmenu'] == 'home') { + print ''; + } print $val['titre']; print ''."\n"; @@ -195,27 +204,27 @@ class MenuManager //var_dump($canonnexturl); print ''; } - if ($val['enabled'] == 2) - { + if ($val['enabled'] == 2) { print ''.$val['titre'].''; } print '
    • '; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index ed835a3d4c0..e35d9d4490c 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -6,6 +6,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -75,7 +76,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $menu_arr[] = array( 'name' => 'Home', 'link' => '/index.php?mainmenu=home&leftmenu=home', - 'title' => (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : "Home"), + 'title' => "Home", 'level' => 0, 'enabled' => $showmode = 1, 'target' => $atarget, @@ -85,7 +86,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'home', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => '', 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "home") ? 0 : 1), 'loadLangs' => array(), 'submenus' => array(), @@ -110,7 +111,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'members', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'member', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") ? 0 : 1), 'loadLangs' => array(), 'submenus' => array(), @@ -121,9 +122,9 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = '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)) + || ((!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)), + 'perms'=> (!empty($user->rights->societe->lire) || !empty($user->rights->fournisseur->lire) || !empty($user->rights->supplier_order->lire) || !empty($user->rights->supplier_invoice->lire) || !empty($user->rights->supplier_proposal->lire)), 'module'=>'societe|fournisseur' ); $menu_arr[] = array( @@ -139,7 +140,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'companies', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'company', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") ? 0 : 1), 'loadLangs' => array("companies", "suppliers"), 'submenus' => array(), @@ -166,7 +167,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'products', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "products") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'product', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "products") ? 0 : 1), 'loadLangs' => array("products"), 'submenus' => array(), @@ -191,7 +192,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'mrp', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'mrp', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 0 : 1), 'loadLangs' => array("mrp"), 'submenus' => array(), @@ -206,9 +207,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $menu_arr[] = array( 'name' => 'Projet', 'link' => '/projet/index.php?mainmenu=project&leftmenu=', - 'title' => (empty($conf->global->PROJECT_USE_OPPORTUNITIES) || $conf->global->PROJECT_USE_OPPORTUNITIES == 2) - ? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2) ? "Leads" : "Projects") - : "Projects", + 'title' => (! empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2 ? "Leads" : "Projects"), 'level' => 0, 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, @@ -218,7 +217,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'project', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'project', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") ? 0 : 1), 'loadLangs' => array("projects"), 'submenus' => array(), @@ -264,7 +263,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'commercial', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'contract', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial") ? 0 : 1), 'loadLangs' => array("commercial"), 'submenus' => array(), @@ -298,7 +297,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'billing', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "billing") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', + 'prefix' => img_picto('', 'bill', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "billing") ? 0 : 1), 'loadLangs' => array("compta"), 'submenus' => array(), @@ -323,10 +322,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'bank', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', - + 'prefix' => img_picto('', 'bank_account', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") ? 0 : 1), - 'loadLangs' => array("compta", "banks"), 'submenus' => array(), ); @@ -350,10 +347,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'accountancy', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "accountancy") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', - + 'prefix' => img_picto('', 'accountancy', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "accountancy") ? 0 : 1), - 'loadLangs' => array("compta", "accountancy", "assets", "intracommreport"), 'submenus' => array(), ); @@ -378,10 +373,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'hrm', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "hrm") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', - + 'prefix' => img_picto('', 'hrm', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "hrm") ? 0 : 1), - 'loadLangs' => array("holiday"), 'submenus' => array(), ); @@ -405,10 +398,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'id' => $id, 'idsel' => 'tools', 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "tools") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', - + 'prefix' => img_picto('', 'tools', 'class="fa-fw paddingright"'), 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "tools") ? 0 : 1), - 'loadLangs' => array("other"), 'submenus' => array(), ); @@ -497,7 +488,8 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $newTabMenu[$i]['position'], $id, $idsel, - $classname + $classname, + $newTabMenu[$i]['prefix'] ); } @@ -517,12 +509,11 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - } - /*elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) - { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); - }*/ - else { + /*} elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); + }*/ + } else { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_512x512_white.png'; $logoContainerAdditionalClass = ''; } @@ -599,24 +590,29 @@ function print_start_menu_entry($idsel, $classname, $showmode) */ function print_text_menu_entry($text, $showmode, $url, $id, $idsel, $classname, $atarget) { - global $langs; + global $conf, $langs; + //$conf->global->THEME_TOPMENU_DISABLE_TEXT=1; if ($showmode == 1) { print ''; print '
      '; print '
      '; - print ''; - print ''; - print $text; - print ''; - print ''; + if (empty($conf->global->THEME_TOPMENU_DISABLE_TEXT)) { + print ''; + print ''; + print $text; + print ''; + print ''; + } } elseif ($showmode == 2) { print '
      '; - print ''; - print ''; - print $text; - print ''; - print ''; + if (empty($conf->global->THEME_TOPMENU_DISABLE_TEXT)) { + print ''; + print ''; + print $text; + print ''; + print ''; + } } } @@ -697,6 +693,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $substitarray = getCommonSubstitutionArray($langs, 0, null, null); + $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); + /** * We update newmenu with entries found into database * -------------------------------------------------- @@ -709,10 +707,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $langs->load("users"); // Home - dashboard - $newmenu->add("/index.php?mainmenu=home&leftmenu=home", $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', ''); + $newmenu->add("/index.php?mainmenu=home&leftmenu=home", $langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', ''); // Setup - $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, $user->admin, '', $mainmenu, 'setup', 0, '', '', '', ''); + $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, $user->admin, '', $mainmenu, 'setup', 0, '', '', '', ''); if ($usemenuhider || empty($leftmenu) || $leftmenu == "setup") { // Load translation files required by the page @@ -743,11 +741,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1); $warnpicto = ''; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + if (!empty($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningPHPMailD")); } - if (in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) { + if (!empty($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("ErrorSetupOfEmailsNotComplete")); } @@ -759,7 +757,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // System tools - $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("AdminTools"), 0, $user->admin, '', $mainmenu, 'admintools', 0, '', '', '', ''); + $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("AdminTools"), 0, $user->admin, '', $mainmenu, 'admintools', 0, '', '', '', ''); if ($usemenuhider || empty($leftmenu) || preg_match('/^admintools/', $leftmenu)) { // Load translation files required by the page $langs->loadLangs(array('admin', 'help')); @@ -775,10 +773,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1); $newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1); $newmenu->add('/admin/system/database.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoDatabase'), 1); - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { - $newmenu->add("/admin/system/perf.php?mainmenu=home&leftmenu=admintools", $langs->trans("InfoPerf"), 1); - $newmenu->add("/admin/system/security.php?mainmenu=home&leftmenu=admintools", $langs->trans("InfoSecurity"), 1); - } + $newmenu->add("/admin/system/perf.php?mainmenu=home&leftmenu=admintools", $langs->trans("InfoPerf"), 1); + $newmenu->add("/admin/system/security.php?mainmenu=home&leftmenu=admintools", $langs->trans("InfoSecurity"), 1); $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home&leftmenu=admintools", $langs->trans("Backup"), 1); $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home&leftmenu=admintools", $langs->trans("Restore"), 1); $newmenu->add("/admin/tools/update.php?mainmenu=home&leftmenu=admintools", $langs->trans("MenuUpgrade"), 1); @@ -793,7 +789,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } } - $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', ''); + $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); if ($user->rights->user->user->lire) { if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { $newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); @@ -805,8 +801,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat'); } $newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); - $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); - $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); + $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); } } } @@ -819,7 +815,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Societes if (!empty($conf->societe->enabled)) { $langs->load("companies"); - $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire, '', $mainmenu, 'thirdparties'); + $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire, '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); if ($user->rights->societe->creer) { $newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1); @@ -854,10 +850,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Suppliers - if (!empty($conf->societe->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->supplier_proposal->enabled))) { + if (!empty($conf->societe->enabled) && (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->supplier_proposal->enabled))) { $langs->load("suppliers"); - $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->rights->fournisseur->lire), '', $mainmenu, 'suppliers'); - $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->rights->societe->creer && ($user->rights->fournisseur->lire)); + $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->rights->fournisseur->lire || $user->rights->supplier_order->lire || $user->rights->supplier_invoice->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers'); + $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_order->lire || $user->rights->supplier_invoice->lire || $user->rights->supplier_proposal->lire)); } // Categories @@ -875,13 +871,14 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); } // Categories suppliers - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->rights->categorie->lire); } } // Contacts - $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->rights->societe->contact->lire, '', $mainmenu, 'contacts'); + $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->rights->societe->contact->lire, '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer); $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire); if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { @@ -890,7 +887,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire); } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire); } $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->rights->societe->contact->lire); @@ -913,7 +910,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Customer proposal if (!empty($conf->propal->enabled)) { $langs->load("propal"); - $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->rights->propale->lire, '', $mainmenu, 'propals', 100); + $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->rights->propale->lire, '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->rights->propale->creer); $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->rights->propale->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") { @@ -930,7 +927,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Customers orders if (!empty($conf->commande->enabled)) { $langs->load("orders"); - $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 200); + $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") { @@ -949,7 +946,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Supplier proposal if (!empty($conf->supplier_proposal->enabled)) { $langs->load("supplier_proposal"); - $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->rights->supplier_proposal->lire, '', $mainmenu, 'propals_supplier', 300); + $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->rights->supplier_proposal->lire, '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->rights->supplier_proposal->creer); $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->rights->supplier_proposal->lire); $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->supplier_proposal->lire); @@ -958,7 +955,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Suppliers orders if (!empty($conf->supplier_order->enabled)) { $langs->load("orders"); - $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400); + $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewOrder"), 1, $user->rights->fournisseur->commande->creer); $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); @@ -983,7 +980,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Contrat if (!empty($conf->contrat->enabled)) { $langs->load("contracts"); - $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->rights->contrat->lire, '', $mainmenu, 'contracts', 2000); + $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->rights->contrat->lire, '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->rights->contrat->creer); $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->rights->contrat->lire); $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->rights->contrat->lire); @@ -998,7 +995,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Interventions if (!empty($conf->ficheinter->enabled)) { $langs->load("interventions"); - $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200); + $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201); $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202); if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { @@ -1018,7 +1015,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Customers invoices if (!empty($conf->facture->enabled)) { $langs->load("bills"); - $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->rights->facture->lire, '', $mainmenu, 'customers_bills'); + $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->rights->facture->lire, '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->rights->facture->creer); $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->rights->facture->lire, '', $mainmenu, 'customers_bills_list'); @@ -1043,8 +1040,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Suppliers invoices if (!empty($conf->societe->enabled) && !empty($conf->supplier_invoice->enabled)) { $langs->load("bills"); - $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills'); - $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, $user->rights->fournisseur->facture->creer, '', $mainmenu, 'suppliers_bills_create'); + $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), '', $mainmenu, 'suppliers_bills_create'); $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_list'); if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { @@ -1064,7 +1061,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->commande->enabled)) { $langs->load("orders"); if (!empty($conf->facture->enabled)) { - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); } //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); } @@ -1073,7 +1070,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->supplier_invoice->enabled)) { if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { $langs->load("supplier"); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); } } @@ -1082,7 +1079,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Donations if (!empty($conf->don->enabled)) { $langs->load("donations"); - $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations'); + $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->rights->don->lire, '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") { $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->rights->don->creer); $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->rights->don->lire); @@ -1092,7 +1089,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Taxes and social contributions if (!empty($conf->tax->enabled)) { - $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->rights->tax->charges->lire, '', $mainmenu, 'tax'); + $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->rights->tax->charges->lire, '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) { @@ -1108,8 +1105,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) { $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->rights->tax->charges->creer); $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); } @@ -1120,7 +1118,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->rights->tax->charges->creer); $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); } } @@ -1131,7 +1129,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->rights->tax->charges->creer); $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->rights->tax->charges->lire); - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->rights->tax->charges->lire); $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); } } @@ -1141,10 +1139,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Salaries if (!empty($conf->salaries->enabled)) { $langs->load("salaries"); - $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->rights->salaries->read, '', $mainmenu, 'tax_salary'); + $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->rights->salaries->read, '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) { - $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("NewPayment"), 1, $user->rights->salaries->write); - $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->rights->salaries->read); + $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->rights->salaries->write); + $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->rights->salaries->read); + $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->rights->salaries->read); $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->rights->salaries->read); } } @@ -1152,7 +1151,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Loan if (!empty($conf->loan->enabled)) { $langs->load("loan"); - $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->rights->loan->read, '', $mainmenu, 'tax_loan'); + $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->rights->loan->read, '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) { $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->rights->loan->write); //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->rights->loan->read); @@ -1162,7 +1161,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Various payment if (!empty($conf->banque->enabled) && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) { $langs->load("banks"); - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->rights->banque->lire, '', $mainmenu, 'tax_various'); + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->rights->banque->lire, '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) { $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->rights->banque->modifier); $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->rights->banque->lire); @@ -1182,7 +1181,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM //$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy'); // Configuration - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) { $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10); @@ -1200,7 +1199,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->banque->enabled)) { $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 70); } - if (!empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) { + if (!empty($conf->facture->enabled) || ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled))) { $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 80); } if (!empty($conf->tax->enabled)) { @@ -1217,7 +1216,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Transfer in accounting - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'transfer', 1); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); // Binding // $newmenu->add("", $langs->trans("Binding"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch'); @@ -1270,7 +1269,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $nature = "sells"; } if ($objp->nature == 3 - && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->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)) { $nature = "purchases"; } @@ -1315,7 +1314,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Accounting - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire, '', $mainmenu, 'accountancy', 1); + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->rights->accounting->mouvements->lire, '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); // Balance $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire); @@ -1332,9 +1331,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Closure - if (!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { - $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure'); - } + $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->rights->accounting->fiscalyear->write, '', $mainmenu, 'closure'); // Reports $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca'); @@ -1375,7 +1372,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { $modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED } - if ($modecompta && $conf->fournisseur->enabled) { + if ($modecompta && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled))) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->rights->accounting->comptarapport->lire); $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); @@ -1385,7 +1382,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $modecompta = 'RECETTES-DEPENSES'; //if (! empty($conf->accounting->enabled) && ! empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED - if ($modecompta && $conf->fournisseur->enabled) { + if ($modecompta && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled))) { if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->rights->accounting->comptarapport->lire); $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->rights->accounting->comptarapport->lire); @@ -1446,7 +1443,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Assets if (!empty($conf->asset->enabled)) { - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->rights->asset->read, '', $mainmenu, 'asset'); + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->rights->asset->read, '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->rights->asset->write); $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->rights->asset->read); $newmenu->add("/asset/type.php?leftmenu=asset_type", $langs->trans("MenuTypeAssets"), 1, $user->rights->asset->read, '', $mainmenu, 'asset_type'); @@ -1467,7 +1464,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Bank-Cash account if (!empty($conf->banque->enabled)) { - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->rights->banque->lire, '', $mainmenu, 'bank'); + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->rights->banque->lire, '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->rights->banque->configurer); $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->rights->banque->lire, '', $mainmenu, 'bank'); @@ -1485,7 +1482,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Direct debit order if (!empty($conf->prelevement->enabled)) { - $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw'); + $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") { $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->rights->prelevement->bons->creer); @@ -1499,7 +1496,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Bank transfer order if (!empty($conf->paymentbybanktransfer->enabled)) { - $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->rights->paymentbybanktransfer->read, '', $mainmenu, 'banktransfer'); + $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->rights->paymentbybanktransfer->read, '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") { $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->rights->paymentbybanktransfer->create); @@ -1513,7 +1510,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Management of checks if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && !empty($conf->banque->enabled) && (!empty($conf->facture->enabled) || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) { - $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->rights->banque->cheque, '', $mainmenu, 'checks'); + $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->rights->banque->cheque, '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); if (preg_match('/checks/', $leftmenu)) { $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->rights->banque->cheque); $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->rights->banque->cheque); @@ -1523,7 +1520,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Cash Control if (!empty($conf->takepos->enabled) || !empty($conf->cashdesk->enabled)) { $permtomakecashfence = ($user->rights->cashdesk->run || $user->rights->takepos->run); - $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol'); + $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol', 0, '', '', '', img_picto('', 'pos', 'class="pictofixedwidth"')); $newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", $langs->trans("NewCashFence"), 1, $permtomakecashfence); $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("List"), 1, $permtomakecashfence); } @@ -1535,7 +1532,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($mainmenu == 'products') { // Products if (!empty($conf->product->enabled)) { - $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product'); + $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->rights->produit->lire, '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"')); $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer); $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire); if (!empty($conf->stock->enabled)) { @@ -1549,7 +1546,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->variants->enabled)) { $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->rights->produit->lire); } - if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) { + if (!empty($conf->propal->enabled) || (!empty($conf->commande->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire); } @@ -1563,10 +1560,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Services if (!empty($conf->service->enabled)) { - $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service'); + $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"')); $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer); $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire); - if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) { + if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_proposal->enabled) || !empty($conf->supplier_oder->enabled) || !empty($conf->supplier_invoice->enabled)) { $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire); } // Categories @@ -1580,7 +1577,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Warehouse if (!empty($conf->stock->enabled)) { $langs->load("stocks"); - $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); + $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); $newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); @@ -1602,13 +1599,13 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->stock->enabled)) { $langs->load("stocks"); if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->creer); $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->lire); } } else { - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock'); + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write); $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read); @@ -1620,7 +1617,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Shipments if (!empty($conf->expedition->enabled)) { $langs->load("sendings"); - $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings'); + $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->rights->expedition->lire, '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"')); $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer); $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") { @@ -1634,7 +1631,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Receptions if (!empty($conf->reception->enabled)) { $langs->load("receptions"); - $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions'); + $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"')); $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer); $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { @@ -1658,7 +1655,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->bom->enabled) || !empty($conf->mrp->enabled)) { $langs->load("mrp"); - $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->bom->read, '', $mainmenu, 'bom'); + $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->bom->read, '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingrightonly pictofixedwidth"')); $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write, '', $mainmenu, 'bom'); $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read, '', $mainmenu, 'bom'); } @@ -1666,7 +1663,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); - $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->rights->mrp->read, '', $mainmenu, 'mo'); + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->rights->mrp->read, '', $mainmenu, 'mo', 0, '', '', '', img_picto('', 'mrp', 'class="paddingrightonly pictofixedwidth"')); $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->rights->mrp->write, '', $mainmenu, 'mo'); $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->rights->mrp->read, '', $mainmenu, 'mo'); } @@ -1700,7 +1697,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Project assigned to user - $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects'); + $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="pictofixedwidth"')); $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->rights->projet->creer); if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0) { @@ -1723,12 +1720,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Project affected to user - $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks'); + $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="pictofixedwidth"')); $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer); $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire); $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire); - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire); + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="pictofixedwidth"')); } } } @@ -1741,7 +1738,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->hrm->enabled)) { $langs->load("hrm"); - $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->user->user->lire, '', $mainmenu, 'hrm'); + $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee", $langs->trans("Employees"), 0, $user->rights->user->user->lire, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"')); $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer); $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire); } @@ -1751,7 +1748,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Load translation files required by the page $langs->loadLangs(array("holiday", "trips")); - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm'); + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm', 0, '', '', '', img_picto('', 'holiday', 'class="pictofixedwidth"')); $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->rights->holiday->write); $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=hrm", $langs->trans("List"), 1, $user->rights->holiday->read); if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") { @@ -1769,7 +1766,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Trips and expenses (old module) if (!empty($conf->deplacement->enabled)) { $langs->load("trips"); - $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses'); + $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="pictofixedwidth"')); $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->deplacement->creer); $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire); $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire); @@ -1778,7 +1775,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Expense report if (!empty($conf->expensereport->enabled)) { $langs->load("trips"); - $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport'); + $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="pictofixedwidth"')); $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer); $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") { @@ -1798,7 +1795,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $search_project_user = GETPOST('search_project_user', 'int'); - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire); + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="pictofixedwidth"')); } } } @@ -1810,25 +1807,25 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if ($mainmenu == 'tools') { if (empty($user->socid)) { // limit to internal users $langs->load("mails"); - $newmenu->add("/admin/mails_templates.php?leftmenu=email_templates", $langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates'); + $newmenu->add("/admin/mails_templates.php?leftmenu=email_templates", $langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); } if (!empty($conf->mailing->enabled)) { - $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing'); + $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); } if (!empty($conf->export->enabled)) { $langs->load("exports"); - $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export'); + $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->rights->export->lire, '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->rights->export->creer); //$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire); } if (!empty($conf->import->enabled)) { $langs->load("exports"); - $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import'); + $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->rights->import->run, '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->rights->import->run); } } @@ -1841,7 +1838,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Load translation files required by the page $langs->loadLangs(array("members", "compta")); - $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Members"), 0, $user->rights->adherent->lire, '', $mainmenu, 'members'); + $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Members"), 0, $user->rights->adherent->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'member', 'class="paddingright pictofixedwidth"')); $newmenu->add("/adherents/card.php?leftmenu=members&action=create", $langs->trans("NewMember"), 1, $user->rights->adherent->creer); $newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->rights->adherent->lire); @@ -1862,7 +1859,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/categories/index.php?leftmenu=cat&type=3", $langs->trans("Categories"), 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); } - $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire); + $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members", $langs->trans("Subscriptions"), 0, $user->rights->adherent->cotisation->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members", $langs->trans("NewSubscription"), 1, $user->rights->adherent->cotisation->creer); $newmenu->add("/adherents/subscription/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/stats/index.php?leftmenu=members", $langs->trans("MenuMembersStats"), 1, $user->rights->adherent->lire); @@ -1871,7 +1868,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM //if (! empty($conf->export->enabled) && ($usemenuhider || empty($leftmenu) || $leftmenu=="export")) $newmenu->add("/exports/index.php?leftmenu=export",$langs->trans("Datas"),1,$user->rights->adherent->export); // Type - $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup'); + $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("MembersTypes"), 0, $user->rights->adherent->configurer, '', $mainmenu, 'setup', 0, '', '', '', img_picto('', 'members', 'class="paddingright pictofixedwidth"')); $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", $langs->trans("New"), 1, $user->rights->adherent->configurer); $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", $langs->trans("List"), 1, $user->rights->adherent->configurer); } @@ -1891,7 +1888,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM //print $paramkey; if (!empty($conf->global->$paramkey)) { $link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; - $newmenu->add($link, dol_trunc($conf->global->$paramkey, 24)); } $i++; @@ -1931,7 +1927,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Show menu $invert = empty($conf->global->MAIN_MENU_INVERT) ? "" : "invert"; if (empty($noout)) { - $altok = 0; $blockvmenuopened = false; $lastlevel0 = ''; + $altok = 0; + $blockvmenuopened = false; + $lastlevel0 = ''; $num = count($menu_array); for ($i = 0; $i < $num; $i++) { // Loop on each menu entry $showmenu = true; @@ -2055,7 +2053,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM print ''."\n"; } if ($blockvmenuopened) { - print '
    '."\n"; $blockvmenuopened = false; + print '
    '."\n"; + $blockvmenuopened = false; } } } diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index a024e6743e8..f5f280b659b 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -185,8 +185,8 @@ class MenuManager print ''; // Add font-awesome - if ($val['level'] == 0 && $val['mainmenu'] == 'home') { - print ''; + if ($val['level'] == 0 && !empty($val['prefix'])) { + print $val['prefix']; } print $val['titre']; @@ -213,7 +213,7 @@ class MenuManager print str_pad('', 1).'
  • '; // ui-btn to highlight on clic print ''; if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") { // No translation - if (in_array($val['mainmenu'], array('cashdesk', 'externalsite', 'website', 'collab'))) { + if (in_array($val['mainmenu'], array('cashdesk', 'externalsite', 'website', 'collab', 'takepos'))) { print $langs->trans("Access"); } else { print $langs->trans("Dashboard"); diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 5ab8ff24f9f..f51aacdd90e 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -370,7 +370,9 @@ class MenuManager } if (empty($noout)) { - $alt = 0; $altok = 0; $blockvmenuopened = false; + $alt = 0; + $altok = 0; + $blockvmenuopened = false; $num = count($menu_array); for ($i = 0; $i < $num; $i++) { $alt++; diff --git a/htdocs/core/menus/standard/index.html b/htdocs/core/menus/standard/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 510ec8ef55a..30ee2bb72be 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -192,6 +192,18 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it */ public $version; + /** + * Module last version + * @var string $lastVersion + */ + public $lastVersion = ''; + + /** + * true indicate this module need update + * @var bool $needUpdate + */ + public $needUpdate = false; + /** * @var string Module description (short text) * @@ -316,7 +328,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.4 = array(5, 4) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ public $phpmin; @@ -353,15 +365,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Enables a module. - * Inserts all informations into database + * Inserts all informations into database. * - * @param array $array_sql SQL requests to be executed when enabling module - * @param string $options String with options when disabling module: - * - 'noboxes' = Do not insert boxes - - * 'newboxdefonly' = For boxes, insert def of - * boxes only and not boxes activation - * - * @return int 1 if OK, 0 if KO + * @param array $array_sql SQL requests to be executed when enabling module + * @param string $options String with options when disabling module: + * - 'noboxes' = Do all actions but do not insert boxes + * - 'newboxdefonly' = Do all actions but for boxes, insert def of boxes only and not boxes activation + * @return int 1 if OK, 0 if KO */ protected function _init($array_sql, $options = '') { @@ -391,7 +401,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $err += $this->insert_const(); // Test on newboxdefonly to avoid to erase value during upgrade } - // Insert boxes def into llx_boxes_def and boxes setup (into llx_boxes) + // Insert boxes def (into llx_boxes_def) and boxes setup (into llx_boxes) if (!$err && !preg_match('/noboxes/', $options)) { $err += $this->insert_boxes($options); } @@ -418,8 +428,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Execute addons requests $num = count($array_sql); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { if (!$err) { $val = $array_sql[$i]; $sql = $val; @@ -517,8 +526,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Run complementary sql requests $num = count($array_sql); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { if (!$err) { dol_syslog(get_class($this)."::_remove", LOG_DEBUG); $result = $this->db->query($array_sql[$i]); @@ -557,9 +565,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } else { // If module name translation using it's unique id does not exist, we try to use its name to find translation if (is_array($this->langfiles)) { - foreach ($this->langfiles as $val) - { - if ($val) { $langs->load($val); + foreach ($this->langfiles as $val) { + if ($val) { + $langs->load($val); } } } @@ -591,9 +599,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } else { // If module description translation does not exist using its unique id, we can use its name to find translation if (is_array($this->langfiles)) { - foreach ($this->langfiles as $val) - { - if ($val) { $langs->load($val); + foreach ($this->langfiles as $val) { + if ($val) { + $langs->load($val); } } } @@ -622,10 +630,10 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; + $content=''; $pathoffile = $this->getDescLongReadmeFound(); - if ($pathoffile) // Mostly for external modules - { + if ($pathoffile) { // Mostly for external modules $content = file_get_contents($pathoffile); if ((float) DOL_VERSION >= 6.0) { @@ -647,9 +655,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Mostly for internal modules if (!empty($this->descriptionlong)) { if (is_array($this->langfiles)) { - foreach ($this->langfiles as $val) - { - if ($val) { $langs->load($val); + foreach ($this->langfiles as $val) { + if ($val) { + $langs->load($val); } } } @@ -724,8 +732,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } } - if ($filefound) // Mostly for external modules - { + if ($filefound) { // Mostly for external modules $content = file_get_contents($pathoffile); if ((float) DOL_VERSION >= 6.0) { @@ -889,8 +896,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $err++; } else { $obj = $this->db->fetch_object($resql); @@ -920,8 +926,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $err++; } else { $obj = $this->db->fetch_object($resql); @@ -974,7 +979,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::_active insert activation constant", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $err++; + if (!$resql) { + $err++; } return $err; @@ -1033,8 +1039,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $ok = 1; - foreach ($conf->file->dol_document_root as $dirroot) - { + foreach ($conf->file->dol_document_root as $dirroot) { if ($ok) { $dir = $dirroot.$reldir; $ok = 0; @@ -1045,16 +1050,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Run llx_mytable.sql files, then llx_mytable_*.sql $files = array(); - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { $files[] = $file; } sort($files); - foreach ($files as $file) - { + foreach ($files as $file) { if (preg_match('/\.sql$/i', $file) && !preg_match('/\.key\.sql$/i', $file) && substr($file, 0, 4) == 'llx_' && substr($file, 0, 4) != 'data') { $result = run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG) ? 1 : 0, '', 1); - if ($result <= 0) { $error++; + if ($result <= 0) { + $error++; } } } @@ -1063,16 +1067,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Run llx_mytable.key.sql files (Must be done after llx_mytable.sql) then then llx_mytable_*.key.sql $files = array(); - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { $files[] = $file; } sort($files); - foreach ($files as $file) - { + foreach ($files as $file) { if (preg_match('/\.key\.sql$/i', $file) && substr($file, 0, 4) == 'llx_' && substr($file, 0, 4) != 'data') { $result = run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG) ? 1 : 0, '', 1); - if ($result <= 0) { $error++; + if ($result <= 0) { + $error++; } } } @@ -1081,16 +1084,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Run data_xxx.sql files (Must be done after llx_mytable.key.sql) $files = array(); - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { $files[] = $file; } sort($files); - foreach ($files as $file) - { + foreach ($files as $file) { if (preg_match('/\.sql$/i', $file) && !preg_match('/\.key\.sql$/i', $file) && substr($file, 0, 4) == 'data') { $result = run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG) ? 1 : 0, '', 1); - if ($result <= 0) { $error++; + if ($result <= 0) { + $error++; } } } @@ -1099,16 +1101,15 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Run update_xxx.sql files $files = array(); - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { $files[] = $file; } sort($files); - foreach ($files as $file) - { + foreach ($files as $file) { if (preg_match('/\.sql$/i', $file) && !preg_match('/\.key\.sql$/i', $file) && substr($file, 0, 6) == 'update') { $result = run_sql($dir.$file, empty($conf->global->MAIN_DISPLAY_SQL_INSTALL_LOG) ? 1 : 0, '', 1); - if ($result <= 0) { $error++; + if ($result <= 0) { + $error++; } } } @@ -1151,22 +1152,24 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $pos_name = InfoBox::getListOfPagesForBoxes(); - foreach ($this->boxes as $key => $value) - { + foreach ($this->boxes as $key => $value) { $file = isset($this->boxes[$key]['file']) ? $this->boxes[$key]['file'] : ''; $note = isset($this->boxes[$key]['note']) ? $this->boxes[$key]['note'] : ''; $enabledbydefaulton = isset($this->boxes[$key]['enabledbydefaulton']) ? $this->boxes[$key]['enabledbydefaulton'] : 'Home'; - if (empty($file)) { $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility + if (empty($file)) { + $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility } - if (empty($note)) { $note = isset($this->boxes[$key][2]) ? $this->boxes[$key][2] : ''; // For backward compatibility + if (empty($note)) { + $note = isset($this->boxes[$key][2]) ? $this->boxes[$key][2] : ''; // For backward compatibility } // Search if boxes def already present $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."boxes_def"; $sql .= " WHERE file = '".$this->db->escape($file)."'"; $sql .= " AND entity = ".$conf->entity; - if ($note) { $sql .= " AND note ='".$this->db->escape($note)."'"; + if ($note) { + $sql .= " AND note ='".$this->db->escape($note)."'"; } $result = $this->db->query($sql); @@ -1184,16 +1187,17 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $err++; + if (!$resql) { + $err++; } } if (!$err && !preg_match('/newboxdefonly/', $option)) { $lastid = $this->db->last_insert_id(MAIN_DB_PREFIX."boxes_def", "rowid"); - foreach ($pos_name as $key2 => $val2) - { - //print 'key2='.$key2.'-val2='.$val2."
    \n"; - if ($enabledbydefaulton && $val2 != $enabledbydefaulton) { continue; // Not enabled by default onto this page. + foreach ($pos_name as $key2 => $val2) { + //print 'key2='.$key2.'-val2='.$val2."
    \n"; + if ($enabledbydefaulton && $val2 != $enabledbydefaulton) { + continue; // Not enabled by default onto this page. } $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id,position,box_order,fk_user,entity)"; @@ -1201,7 +1205,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::insert_boxes onto page ".$key2."=".$val2."", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $err++; + if (!$resql) { + $err++; } } } @@ -1209,8 +1214,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (!$err) { $this->db->commit(); } else { - $this->error = $this->db->lasterror(); - $this->db->rollback(); + $this->error = $this->db->lasterror(); + $this->db->rollback(); } } // else box already registered into database @@ -1239,8 +1244,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $err = 0; if (is_array($this->boxes)) { - foreach ($this->boxes as $key => $value) - { + foreach ($this->boxes as $key => $value) { //$titre = $this->boxes[$key][0]; $file = $this->boxes[$key]['file']; //$note = $this->boxes[$key][2]; @@ -1317,8 +1321,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (is_array($this->cronjobs)) { dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG); - foreach ($this->cronjobs as $key => $value) - { + foreach ($this->cronjobs as $key => $value) { $entity = isset($this->cronjobs[$key]['entity']) ? $this->cronjobs[$key]['entity'] : $conf->entity; $label = isset($this->cronjobs[$key]['label']) ? $this->cronjobs[$key]['label'] : ''; $jobtype = isset($this->cronjobs[$key]['jobtype']) ? $this->cronjobs[$key]['jobtype'] : ''; @@ -1363,10 +1366,18 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (!$err) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,"; - if (is_int($frequency)) { $sql .= ' frequency,'; } - if (is_int($unitfrequency)) { $sql .= ' unitfrequency,'; } - if (is_int($priority)) { $sql .= ' priority,'; } - if (is_int($status)) { $sql .= ' status,'; } + if (is_int($frequency)) { + $sql .= ' frequency,'; + } + if (is_int($unitfrequency)) { + $sql .= ' unitfrequency,'; + } + if (is_int($priority)) { + $sql .= ' priority,'; + } + if (is_int($status)) { + $sql .= ' status,'; + } $sql .= " entity, test)"; $sql .= " VALUES ("; $sql .= "'".$this->db->escape(empty($this->rights_class) ?strtolower($this->name) : $this->rights_class)."', "; @@ -1381,20 +1392,25 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $sql .= ($command ? "'".$this->db->escape($command)."'" : "null").","; $sql .= ($parameters ? "'".$this->db->escape($parameters)."'" : "null").","; $sql .= ($comment ? "'".$this->db->escape($comment)."'" : "null").","; - if (is_int($frequency)) { $sql .= "'".$this->db->escape($frequency)."', "; + if (is_int($frequency)) { + $sql .= "'".$this->db->escape($frequency)."', "; } - if (is_int($unitfrequency)) { $sql .= "'".$this->db->escape($unitfrequency)."', "; + if (is_int($unitfrequency)) { + $sql .= "'".$this->db->escape($unitfrequency)."', "; } - if (is_int($priority)) {$sql .= "'".$this->db->escape($priority)."', "; + if (is_int($priority)) { + $sql .= "'".$this->db->escape($priority)."', "; } - if (is_int($status)) { $sql .= "'".$this->db->escape($status)."', "; + if (is_int($status)) { + $sql .= "'".$this->db->escape($status)."', "; } $sql .= $entity.","; $sql .= "'".$this->db->escape($test)."'"; $sql .= ")"; $resql = $this->db->query($sql); - if (!$resql) { $err++; + if (!$resql) { + $err++; } } @@ -1491,9 +1507,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG); $i = 0; - foreach ($this->tabs as $key => $value) - { - if (is_array($value) && count($value) == 0) { continue; // Discard empty arrays + foreach ($this->tabs as $key => $value) { + if (is_array($value) && count($value) == 0) { + continue; // Discard empty arrays } $entity = $conf->entity; @@ -1501,7 +1517,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (is_array($value)) { $newvalue = $value['data']; - if (isset($value['entity'])) { $entity = $value['entity']; + if (isset($value['entity'])) { + $entity = $value['entity']; } } @@ -1553,13 +1570,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $err = 0; - if (empty($this->const)) { return 0; + if (empty($this->const)) { + return 0; } dol_syslog(get_class($this)."::insert_const", LOG_DEBUG); - foreach ($this->const as $key => $value) - { + foreach ($this->const as $key => $value) { $name = $this->const[$key][0]; $type = $this->const[$key][1]; $val = $this->const[$key][2]; @@ -1568,9 +1585,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $entity = (!empty($this->const[$key][5]) && $this->const[$key][5] != 'current') ? 0 : $conf->entity; // Clean - if (empty($visible)) { $visible = '0'; + if (empty($visible)) { + $visible = '0'; } - if (empty($val) && $val != '0') { $val = ''; + if (empty($val) && $val != '0') { + $val = ''; } $sql = "SELECT count(*)"; @@ -1582,8 +1601,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if ($result) { $row = $this->db->fetch_row($result); - if ($row[0] == 0) // If not found - { + if ($row[0] == 0) { // If not found $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible,entity)"; $sql .= " VALUES ("; $sql .= $this->db->encrypt($name, 1); @@ -1621,11 +1639,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $err = 0; - if (empty($this->const)) { return 0; + if (empty($this->const)) { + return 0; } - foreach ($this->const as $key => $value) - { + foreach ($this->const as $key => $value) { $name = $this->const[$key][0]; $deleteonunactive = (!empty($this->const[$key][6])) ? 1 : 0; @@ -1675,8 +1693,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $obj = $this->db->fetch_object($resql); if ($obj !== null && !empty($obj->value) && !empty($this->rights)) { // If the module is active - foreach ($this->rights as $key => $value) - { + foreach ($this->rights as $key => $value) { $r_id = $this->rights[$key][0]; $r_desc = $this->rights[$key][1]; $r_type = isset($this->rights[$key][2]) ? $this->rights[$key][2] : ''; @@ -1685,11 +1702,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $r_subperms = isset($this->rights[$key][5]) ? $this->rights[$key][5] : ''; $r_modul = empty($this->rights_class) ?strtolower($this->name) : $this->rights_class; - if (empty($r_type)) { $r_type = 'w'; } + if (empty($r_type)) { + $r_type = 'w'; + } // Search if perm already present $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def"; - $sql .= " WHERE id = ".$r_id." AND entity = ".$entity; + $sql .= " WHERE id = ".((int) $r_id)." AND entity = ".((int) $entity); $resqlselect = $this->db->query($sql); if ($resqlselect) { @@ -1721,7 +1740,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $this->error = $this->db->lasterror(); $err++; break; - } else { dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO); + } else { + dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO); } } @@ -1742,8 +1762,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if ($resqlseladmin) { $num = $this->db->num_rows($resqlseladmin); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj2 = $this->db->fetch_object($resqlseladmin); dol_syslog(get_class($this)."::insert_permissions Add permission to user id=".$obj2->rowid); @@ -1762,8 +1781,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } } - if ($reinitadminperms && !empty($user->admin)) // Reload permission for current user if defined - { + if ($reinitadminperms && !empty($user->admin)) { // Reload permission for current user if defined // We reload permissions $user->clearrights(); $user->getrights(); @@ -1816,7 +1834,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // phpcs:enable global $user; - if (!is_array($this->menu) || empty($this->menu)) { return 0; + if (!is_array($this->menu) || empty($this->menu)) { + return 0; } include_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; @@ -1827,8 +1846,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $this->db->begin(); - foreach ($this->menu as $key => $value) - { + foreach ($this->menu as $key => $value) { $menu = new Menubase($this->db); $menu->menu_handler = 'all'; @@ -1840,8 +1858,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } else { $foundparent = 0; $fk_parent = $this->menu[$key]['fk_menu']; - if (preg_match('/^r=/', $fk_parent)) // old deprecated method - { + if (preg_match('/^r=/', $fk_parent)) { // old deprecated method $fk_parent = str_replace('r=', '', $fk_parent); if (isset($this->menu[$fk_parent]['rowid'])) { $menu->fk_menu = $this->menu[$fk_parent]['rowid']; @@ -1868,8 +1885,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $menu->mainmenu = isset($this->menu[$key]['mainmenu']) ? $this->menu[$key]['mainmenu'] : (isset($menu->fk_mainmenu) ? $menu->fk_mainmenu : ''); $menu->leftmenu = isset($this->menu[$key]['leftmenu']) ? $this->menu[$key]['leftmenu'] : ''; $menu->title = $this->menu[$key]['titre']; + $menu->prefix = isset($this->menu[$key]['prefix']) ? $this->menu[$key]['prefix'] : ''; $menu->url = $this->menu[$key]['url']; - $menu->langs = $this->menu[$key]['langs']; + $menu->langs = isset($this->menu[$key]['langs']) ? $this->menu[$key]['langs'] : ''; $menu->position = $this->menu[$key]['position']; $menu->perms = $this->menu[$key]['perms']; $menu->target = isset($this->menu[$key]['target']) ? $this->menu[$key]['target'] : ''; @@ -1945,11 +1963,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $err = 0; if (isset($this->dirs) && is_array($this->dirs)) { - foreach ($this->dirs as $key => $value) - { + foreach ($this->dirs as $key => $value) { $addtodatabase = 0; - if (!is_array($value)) { $dir = $value; // Default simple mode + if (!is_array($value)) { + $dir = $value; // Default simple mode } else { $constname = $this->const_name."_DIR_"; $dir = $this->dirs[$key][1]; @@ -1957,17 +1975,21 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $subname = empty($this->dirs[$key][3]) ? '' : strtoupper($this->dirs[$key][3]); // Add submodule name (ex: $conf->module->submodule->dir_output) $forcename = empty($this->dirs[$key][4]) ? '' : strtoupper($this->dirs[$key][4]); // Change the module name if different - if (!empty($forcename)) { $constname = 'MAIN_MODULE_'.$forcename."_DIR_"; + if (!empty($forcename)) { + $constname = 'MAIN_MODULE_'.$forcename."_DIR_"; } - if (!empty($subname)) { $constname = $constname.$subname."_"; + if (!empty($subname)) { + $constname = $constname.$subname."_"; } $name = $constname.strtoupper($this->dirs[$key][0]); } // Define directory full path ($dir must start with "/") - if (empty($conf->global->MAIN_MODULE_MULTICOMPANY) || $conf->entity == 1) { $fulldir = DOL_DATA_ROOT.$dir; - } else { $fulldir = DOL_DATA_ROOT."/".$conf->entity.$dir; + if (empty($conf->global->MAIN_MODULE_MULTICOMPANY) || $conf->entity == 1) { + $fulldir = DOL_DATA_ROOT.$dir; + } else { + $fulldir = DOL_DATA_ROOT."/".$conf->entity.$dir; } // Create dir if it does not exists if (!empty($fulldir) && !file_exists($fulldir)) { @@ -1981,7 +2003,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Define the constant in database if requested (not the default mode) if (!empty($addtodatabase)) { $result = $this->insert_dirs($name, $dir); - if ($result) { $err++; + if ($result) { + $err++; } } } @@ -2073,9 +2096,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $error = 0; if (is_array($this->module_parts) && !empty($this->module_parts)) { - foreach ($this->module_parts as $key => $value) - { - if (is_array($value) && count($value) == 0) { continue; // Discard empty arrays + foreach ($this->module_parts as $key => $value) { + if (is_array($value) && count($value) == 0) { + continue; // Discard empty arrays } $entity = $conf->entity; // Reset the current entity @@ -2087,11 +2110,13 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Example when $key='hooks', then $value is an array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>X) if (isset($value['data']) && is_array($value['data'])) { $newvalue = json_encode($value['data']); - if (isset($value['entity'])) { $entity = $value['entity']; + if (isset($value['entity'])) { + $entity = $value['entity']; } } elseif (isset($value['data']) && !is_array($value['data'])) { $newvalue = $value['data']; - if (isset($value['entity'])) { $entity = $value['entity']; + if (isset($value['entity'])) { + $entity = $value['entity']; } } else // when hook is declared with syntax 'hook'=>array('hookcontext1','hookcontext2',...) { @@ -2147,10 +2172,10 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $entity = $conf->entity; if (is_array($this->module_parts) && !empty($this->module_parts)) { - foreach ($this->module_parts as $key => $value) - { + foreach ($this->module_parts as $key => $value) { // If entity is defined - if (is_array($value) && isset($value['entity'])) { $entity = $value['entity']; + if (is_array($value) && isset($value['entity'])) { + $entity = $value['entity']; } $sql = "DELETE FROM ".MAIN_DB_PREFIX."const"; @@ -2172,9 +2197,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it * The init function adds tabs, constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') - * 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes, - * insert def of boxes only and not boxes activation + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes', 'menuonly') + * 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation * @return int 1 if OK, 0 if KO */ public function init($options = '') @@ -2209,8 +2233,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Define imginfo $imginfo = "info"; - if ($this->isCoreOrExternalModule() == 'external') - { + if ($this->isCoreOrExternalModule() == 'external') { $imginfo = "info_black"; } @@ -2218,28 +2241,45 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $version = $this->getVersion(0); $versiontrans = ''; - if (preg_match('/development/i', $version)) $versiontrans .= 'warning'; - if (preg_match('/experimental/i', $version)) $versiontrans .= 'warning'; - if (preg_match('/deprecated/i', $version)) $versiontrans .= 'warning'; + if (preg_match('/development/i', $version)) { + $versiontrans .= 'warning'; + } + if (preg_match('/experimental/i', $version)) { + $versiontrans .= 'warning'; + } + if (preg_match('/deprecated/i', $version)) { + $versiontrans .= 'warning'; + } print ' -
    +
    '; $alttext = ''; //if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version); //if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin); - if (!empty($this->picto)) - { - if (preg_match('/^\//i', $this->picto)) print img_picto($alttext, $this->picto, 'class="inline-block valignmiddle"', 1); - else print img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); + if (!empty($this->picto)) { + if (preg_match('/^\//i', $this->picto)) { + print img_picto($alttext, $this->picto, 'class="inline-block valignmiddle"', 1); + } else { + print img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); + } } else { print img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); } if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { - print 'getVersion(1).'">'; + $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); + if ($this->needUpdate) { + $versionTitle.= '
    '.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; + } + + print ''; print $this->getVersion(1); print ''; } @@ -2268,4 +2308,33 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
    '; } + + /** + * Check for module update + * TODO : store results for $this->url_last_version and $this->needUpdate + * Add a cron task to monitor for updates + * + * @return int <0 if Error, 0 == no update needed, >0 if need update + */ + public function checkForUpdate() + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; + if (!empty($this->url_last_version)) { + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only + if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { + // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - + $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); + if (version_compare($this->lastVersion, $this->version) > 0) { + $this->needUpdate = true; + return 1; + } else { + $this->needUpdate = false; + return 0; + } + } else { + return -1; + } + } + return 0; + } } diff --git a/htdocs/core/modules/action/index.html b/htdocs/core/modules/action/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php index cb57315322f..b496e32f5e1 100644 --- a/htdocs/core/modules/action/modules_action.php +++ b/htdocs/core/modules/action/modules_action.php @@ -80,10 +80,8 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h $srctemplatepath = ''; // Position modele on the name of fichinter model to use - if (!dol_strlen($modele)) - { - if (!empty($conf->global->ACTION_EVENT_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->ACTION_EVENT_ADDON_PDF)) { $modele = $conf->global->ACTION_EVENT_ADDON_PDF; } else { $modele = 'soleil'; @@ -92,37 +90,38 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h // If selected modele is a filename template (then $modele="modelname:filename") $tmp = explode(':', $modele, 2); - if (!empty($tmp[1])) - { + if (!empty($tmp[1])) { $modele = $tmp[0]; $srctemplatepath = $tmp[1]; } // Search template files - $file = ''; $classname = ''; $filefound = 0; + $file = ''; + $classname = ''; + $filefound = 0; $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 (is_array($conf->modules_parts['models'])) { + $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + } + foreach ($dirmodels as $reldir) { + foreach (array('doc', 'pdf') as $prefix) { $file = $prefix."_".$modele.".modules.php"; // On verifie l'emplacement du modele $file = dol_buildpath($reldir."core/modules/action/doc/".$file, 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $prefix.'_'.$modele; break; } } - if ($filefound) break; + if ($filefound) { + break; + } } // Charge le modele - if ($filefound) - { + if ($filefound) { require_once $file; $obj = new $classname($db); @@ -130,8 +129,7 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h // 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 ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) { $outputlangs->charset_output = $sav_charset_output; // We delete old preview diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 43df3d227b9..8b80492685d 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -57,11 +57,11 @@ class CommActionRapport public $marge_gauche; - public $marge_droite; + public $marge_droite; - public $marge_haute; + public $marge_haute; - public $marge_basse; + public $marge_basse; /** @@ -113,9 +113,13 @@ class CommActionRapport // phpcs:enable global $user, $conf, $langs, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); @@ -123,20 +127,16 @@ class CommActionRapport $dir = $conf->agenda->dir_temp."/"; $file = $dir."actions-".$this->month."-".$this->year.".pdf"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -154,8 +154,7 @@ class CommActionRapport $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -176,14 +175,15 @@ class CommActionRapport $nbpage = $this->_pages($pdf, $outputlangs); // Write content - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -191,14 +191,14 @@ class CommActionRapport $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) - { + 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); @@ -242,14 +242,12 @@ class CommActionRapport dol_syslog(get_class($this)."::_page", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $y0 = $y1 = $y2 = $y3 = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $eventstatic->id = $obj->id; @@ -260,14 +258,15 @@ class CommActionRapport // Calculate height of text $text = ''; - if (!preg_match('/^'.preg_quote($obj->label, '/').'/', $obj->note)) $text = $obj->label."\n"; + if (!preg_match('/^'.preg_quote($obj->label, '/').'/', $obj->note)) { + $text = $obj->label."\n"; + } $text .= dolGetFirstLineOfText(dol_string_nohtmltag($obj->note), 2); // Add status to text $text .= "\n"; $status = $outputlangs->trans("Status").': '.dol_htmlentitiesbr_decode($eventstatic->getLibStatut(1, 1)); $text .= $status; - if ($obj->fk_project > 0) - { + if ($obj->fk_project > 0) { $projectstatic->fetch($obj->fk_project); if ($projectstatic->ref) { $text .= ($status ? ' - ' : '').$outputlangs->transnoentitiesnoconv("Project").": ".dol_htmlentitiesbr_decode($projectstatic->ref); @@ -279,8 +278,7 @@ class CommActionRapport $heightlinemax = max(2 * $height, $nboflines * $height); // Check if there is enough space to print record - if ((1 + $y + $heightlinemax) >= ($this->page_hauteur - $this->marge_haute)) - { + if ((1 + $y + $heightlinemax) >= ($this->page_hauteur - $this->marge_haute)) { // We need to break page $pagenb++; $y = $this->_pagehead($pdf, $outputlangs, $pagenb); @@ -293,9 +291,11 @@ class CommActionRapport $pdf->SetXY($this->marge_gauche, $y); $textdate = dol_print_date($this->db->jdate($obj->dp), "day")."\n".dol_print_date($this->db->jdate($obj->dp), "hour"); if ($obj->dp2) { - if (dol_print_date($this->db->jdate($obj->dp), "day") != dol_print_date($this->db->jdate($obj->dp2), "day")) + if (dol_print_date($this->db->jdate($obj->dp), "day") != dol_print_date($this->db->jdate($obj->dp2), "day")) { $textdate .= " -> ".dol_print_date($this->db->jdate($obj->dp2), "day")." - ".dol_print_date($this->db->jdate($obj->dp2), "hour"); - else $textdate .= " -> ".dol_print_date($this->db->jdate($obj->dp2), "hour"); + } else { + $textdate .= " -> ".dol_print_date($this->db->jdate($obj->dp2), "hour"); + } } $textdate = $outputlangs->trans("ID").' '.$obj->id.' - '.$textdate; $pdf->MultiCell(45 - $this->marge_gauche, $height, $textdate, 0, 'L', 0); @@ -308,10 +308,13 @@ class CommActionRapport // Action code $code = $obj->code; - if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($code == 'AC_OTH') $code = 'AC_MANUAL'; - if ($code == 'AC_OTH_AUTO') $code = 'AC_AUTO'; + if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { + if ($code == 'AC_OTH') { + $code = 'AC_MANUAL'; + } + if ($code == 'AC_OTH_AUTO') { + $code = 'AC_AUTO'; + } } $pdf->SetXY(73, $y); $labelactiontype = $outputlangs->transnoentitiesnoconv("Action".$code); @@ -354,8 +357,7 @@ class CommActionRapport $pdf->SetXY($this->marge_gauche, $this->marge_haute); $pdf->MultiCell(120, 1, $outputlangs->convToOutputCharset($this->title), 0, 'L', 0); // Show page nb only on iso languages (so default Helvetica font) - if (pdf_getPDFFont($outputlangs) == 'Helvetica') - { + if (pdf_getPDFFont($outputlangs) == 'Helvetica') { $pdf->SetXY($this->page_largeur - $this->marge_droite - 40, $this->marge_haute); $pdf->MultiCell(40, 1, $pagenb.'/'.$pdf->getAliasNbPages(), 0, 'R', 0); } diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index e4531140f8f..1bbf2e14cc0 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -78,7 +78,9 @@ class pdf_ban extends ModeleBankAccountDoc // Retrieves transmitter $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define column position $this->posxref = $this->marge_gauche + 1; @@ -102,15 +104,18 @@ class pdf_ban extends ModeleBankAccountDoc // phpcs:enable global $conf, $hookmanager, $langs, $user; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->bank->dir_output) - { + if ($conf->bank->dir_output) { //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file @@ -123,20 +128,16 @@ class pdf_ban extends ModeleBankAccountDoc $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -150,11 +151,12 @@ class pdf_ban extends ModeleBankAccountDoc $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -169,7 +171,9 @@ class pdf_ban extends ModeleBankAccountDoc $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("BAN")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -187,8 +191,7 @@ class pdf_ban extends ModeleBankAccountDoc $tab_height_newpage = 210; // Affiche notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxref - 1, $tab_top - 2, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); @@ -214,8 +217,7 @@ class pdf_ban extends ModeleBankAccountDoc // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -227,15 +229,16 @@ class pdf_ban extends ModeleBankAccountDoc * Footer of the page */ $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -243,14 +246,14 @@ class pdf_ban extends ModeleBankAccountDoc $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) - { + 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); @@ -316,10 +319,8 @@ class pdf_ban extends ModeleBankAccountDoc // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -328,7 +329,9 @@ class pdf_ban extends ModeleBankAccountDoc $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); @@ -351,25 +354,25 @@ class pdf_ban extends ModeleBankAccountDoc /* Removed: A project can have more than thousands linked objects (orders, invoices, proposals, etc.... $object->fetchObjectLinked(); - foreach($object->linkedObjects as $objecttype => $objects) - { - var_dump($objects);exit; - if ($objecttype == 'commande') - { - $outputlangs->load('orders'); - $num=count($objects); - for ($i=0;$i<$num;$i++) - { - $posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $text=$objects[$i]->ref; - if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); - } - } - } - */ + foreach($object->linkedObjects as $objecttype => $objects) + { + var_dump($objects);exit; + if ($objecttype == 'commande') + { + $outputlangs->load('orders'); + $num=count($objects); + for ($i=0;$i<$num;$i++) + { + $posy+=4; + $pdf->SetXY($posx,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $text=$objects[$i]->ref; + if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); + } + } + } + */ } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index a07592d339a..f1ebc5bf64f 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -81,7 +81,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc // Retrieves transmitter $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define column position $this->posxref = $this->marge_gauche; @@ -106,44 +108,48 @@ class pdf_sepamandate extends ModeleBankAccountDoc // phpcs:enable global $conf, $hookmanager, $langs, $user, $mysoc; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills")); - if (!empty($conf->bank->dir_output)) - { + if (!empty($conf->bank->dir_output)) { //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file - if ($object->specimen) - { - if (!empty($moreparams['force_dir_output'])) $dir = $moreparams['force_dir_output']; - else $dir = $conf->bank->dir_output; + if ($object->specimen) { + if (!empty($moreparams['force_dir_output'])) { + $dir = $moreparams['force_dir_output']; + } else { + $dir = $conf->bank->dir_output; + } $file = $dir."/SPECIMEN.pdf"; } else { $objectref = dol_sanitizeFileName($object->ref); - if (!empty($moreparams['force_dir_output'])) $dir = $moreparams['force_dir_output']; - else $dir = $conf->bank->dir_output."/".$objectref; + if (!empty($moreparams['force_dir_output'])) { + $dir = $moreparams['force_dir_output']; + } else { + $dir = $conf->bank->dir_output."/".$objectref; + } $file = $dir."/".$langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref."-".dol_sanitizeFileName($object->rum).".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -157,11 +163,12 @@ class pdf_sepamandate extends ModeleBankAccountDoc $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -176,7 +183,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("SepaMandate")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -194,8 +203,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $tab_height_newpage = 210; // Show notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxref, $tab_top - 2, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); @@ -229,7 +237,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc $posY += 2; $pdf->SetXY($this->marge_gauche, $posY); $ics = ''; - if (!empty($conf->global->PRELEVEMENT_ICS)) $ics = $conf->global->PRELEVEMENT_ICS; + if (!empty($conf->global->PRELEVEMENT_ICS)) { + $ics = $conf->global->PRELEVEMENT_ICS; + } $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").') : '.$ics, 0, 'L'); $posY = $pdf->GetY(); @@ -266,11 +276,12 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFillForm"), 0, 'C'); $thirdparty = new Societe($this->db); - if ($object->socid > 0) $thirdparty->fetch($object->socid); + if ($object->socid > 0) { + $thirdparty->fetch($object->socid); + } $sepaname = '______________________________________________'; - if ($thirdparty->id > 0) - { + if ($thirdparty->id > 0) { $sepaname = $thirdparty->name.($object->account_owner ? ' ('.$object->account_owner.')' : ''); } $posY = $pdf->GetY(); @@ -281,7 +292,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepaname, 0, 'L'); $sepavatid = '__________________________________________________'; - if (!empty($thirdparty->idprof1)) $sepavatid = $thirdparty->idprof1; + if (!empty($thirdparty->idprof1)) { + $sepavatid = $thirdparty->idprof1; + } $posY = $pdf->GetY(); $posY += 1; $pdf->SetXY($this->marge_gauche, $posY); @@ -290,8 +303,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepavatid, 0, 'L'); $address = '______________________________________________'; - if ($thirdparty->id > 0) - { + if ($thirdparty->id > 0) { $address = $thirdparty->getFullAddress(); } $posY = $pdf->GetY(); @@ -300,15 +312,16 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L'); $pdf->SetXY(80, $posY); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L'); - if (preg_match('/_____/', $address)) - { + if (preg_match('/_____/', $address)) { $posY += 6; $pdf->SetXY(80, $posY); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L'); } $ban = '__________________________________________________'; - if (!empty($object->iban)) $ban = $object->iban; + if (!empty($object->iban)) { + $ban = $object->iban; + } $posY = $pdf->GetY(); $posY += 1; $pdf->SetXY($this->marge_gauche, $posY); @@ -317,7 +330,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $ban, 0, 'L'); $bic = '__________________________________________________'; - if (!empty($object->bic)) $bic = $object->bic; + if (!empty($object->bic)) { + $bic = $object->bic; + } $posY = $pdf->GetY(); $posY += 1; $pdf->SetXY($this->marge_gauche, $posY); @@ -333,19 +348,22 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L'); $pdf->Rect(80, $posY, 5, 5); $pdf->SetXY(80, $posY); - if ($object->frstrecur == 'RECUR') $pdf->MultiCell(5, 3, 'X', 0, 'L'); + if ($object->frstrecur == 'RECUR') { + $pdf->MultiCell(5, 3, 'X', 0, 'L'); + } $pdf->SetXY(86, $posY); $txt = $langs->transnoentitiesnoconv("ModeRECUR").' '.$langs->transnoentitiesnoconv("or"); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L'); $posY += 6; $pdf->Rect(80, $posY, 5, 5); $pdf->SetXY(80, $posY); - if ($object->frstrecur == 'FRST') $pdf->MultiCell(5, 3, 'X', 0, 'L'); + if ($object->frstrecur == 'FRST') { + $pdf->MultiCell(5, 3, 'X', 0, 'L'); + } $pdf->SetXY(86, $posY); $txt = $langs->transnoentitiesnoconv("ModeFRST"); $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L'); - if (empty($object->frstrecur)) - { + if (empty($object->frstrecur)) { $posY += 6; $pdf->SetXY(80, $posY); $txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')'; @@ -359,8 +377,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -381,15 +398,16 @@ class pdf_sepamandate extends ModeleBankAccountDoc * Footer of the page */ $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -397,14 +415,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc $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) - { + 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); @@ -552,10 +570,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -564,7 +580,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); @@ -576,10 +594,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $daterum = '__________________'; - if (!empty($object->date_rum)) - { + if (!empty($object->date_rum)) { $daterum = dol_print_date($object->date_rum, 'day', false, $outputlangs, true); - } else $daterum = dol_print_date($object->datec, 'day', false, $outputlangs, true); // For old record, the date_rum was not saved. + } else { + $daterum = dol_print_date($object->datec, 'day', false, $outputlangs, true); // For old record, the date_rum was not saved. + } $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : ".$daterum, '', 'R'); /*$posy+=6; $pdf->SetXY($posx,$posy); @@ -592,25 +611,25 @@ class pdf_sepamandate extends ModeleBankAccountDoc /* Removed: A project can have more than thousands linked objects (orders, invoices, proposals, etc.... $object->fetchObjectLinked(); - foreach($object->linkedObjects as $objecttype => $objects) - { - var_dump($objects);exit; - if ($objecttype == 'commande') - { - $outputlangs->load('orders'); - $num=count($objects); - for ($i=0;$i<$num;$i++) - { - $posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $text=$objects[$i]->ref; - if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); - } - } - } - */ + foreach($object->linkedObjects as $objecttype => $objects) + { + var_dump($objects);exit; + if ($objecttype == 'commande') + { + $outputlangs->load('orders'); + $num=count($objects); + for ($i=0;$i<$num;$i++) + { + $posy+=4; + $pdf->SetXY($posx,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $text=$objects[$i]->ref; + if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); + } + } + } + */ } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/barcode/doc/index.html b/htdocs/core/modules/barcode/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 34ebc518e56..56c2a12fee6 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -96,15 +96,27 @@ class modPhpbarcode extends ModeleBarCode //print 'genbarcode_loc='.$genbarcode_loc.' encoding='.$encoding;exit; $supported = 0; - if ($encoding == 'EAN13') $supported = 1; - if ($encoding == 'ISBN') $supported = 1; + if ($encoding == 'EAN13') { + $supported = 1; + } + if ($encoding == 'ISBN') { + $supported = 1; + } + if ($encoding == 'UPC') { + $supported = 1; + } // Formats that hangs on Windows (when genbarcode.exe for Windows is called, so they are not // activated on Windows) if (file_exists($genbarcode_loc) && empty($_SERVER["WINDIR"])) { - if ($encoding == 'EAN8') $supported = 1; - if ($encoding == 'UPC') $supported = 1; - if ($encoding == 'C39') $supported = 1; - if ($encoding == 'C128') $supported = 1; + if ($encoding == 'EAN8') { + $supported = 1; + } + if ($encoding == 'C39') { + $supported = 1; + } + if ($encoding == 'C128') { + $supported = 1; + } } return $supported; } @@ -125,10 +137,16 @@ class modPhpbarcode extends ModeleBarCode global $conf; global $genbarcode_loc, $bar_color, $bg_color, $text_color, $font_loc; - if (!$this->encodingIsSupported($encoding)) return -1; + if (!$this->encodingIsSupported($encoding)) { + return -1; + } - if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN'; - if ($encoding == 'C39' || $encoding == 'C128') $encoding = substr($encoding, 1); + if ($encoding == 'EAN8' || $encoding == 'EAN13') { + $encoding = 'EAN'; + } + if ($encoding == 'C39' || $encoding == 'C128') { + $encoding = substr($encoding, 1); + } $mode = 'png'; @@ -138,12 +156,15 @@ class modPhpbarcode extends ModeleBarCode $_GET["mode"] = $mode; dol_syslog(get_class($this)."::buildBarCode $code,$encoding,$scale,$mode"); - if ($code) $result = barcode_print($code, $encoding, $scale, $mode); + if ($code) { + $result = barcode_print($code, $encoding, $scale, $mode); + } - if (!is_array($result)) - { + if (!is_array($result)) { $this->error = $result; - if (empty($nooutputiferror)) print $this->error; + if (empty($nooutputiferror)) { + print $this->error; + } return -1; } diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index d13fe589883..90b7cd4f543 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -110,7 +110,9 @@ class modTcpdfbarcode extends ModeleBarCode global $_GET; $tcpdfEncoding = $this->getTcpdfEncodingType($encoding); - if (empty($tcpdfEncoding)) return -1; + if (empty($tcpdfEncoding)) { + return -1; + } $color = array(0, 0, 0); @@ -159,7 +161,9 @@ class modTcpdfbarcode extends ModeleBarCode $file = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; $tcpdfEncoding = $this->getTcpdfEncodingType($encoding); - if (empty($tcpdfEncoding)) return -1; + if (empty($tcpdfEncoding)) { + return -1; + } $color = array(0, 0, 0); diff --git a/htdocs/core/modules/barcode/index.html b/htdocs/core/modules/barcode/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 3f18d536122..7bbedd0aa67 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -97,11 +97,11 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode $texte .= '
  • '.$langs->trans("DateCreation").''.$langs->trans("DateDeliveryPlanned").''.$langs->trans("QtyPreparedOrShipped").''.$langs->trans("Warehouse").''; - print ''; + print ''.$langs->trans("DeliveryOrder").''.$langs->trans("QtyReceived").''.$langs->trans("DeliveryDate").'
    "; - if ($objp->fk_product_type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($objp->fk_product_type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($objp->label)) { $text .= ' '.$objp->label.''; @@ -369,11 +385,9 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''.$objp->qty_shipped.''; - if ($objp->warehouse_id > 0) - { + if ($objp->warehouse_id > 0) { $warehousestatic->fetch($objp->warehouse_id); print $warehousestatic->getNomUrl(1); } @@ -384,47 +398,47 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') /*TODO Add link to expeditiondet_batch if (! empty($conf->productbatch->enabled)) { - var_dump($objp->edrowid); - $lines[$i]->detail_batch - if (isset($lines[$i]->detail_batch)) - { - print ''; - if ($lines[$i]->product_tobatch) - { - $detail = ''; - foreach ($lines[$i]->detail_batch as $dbatch) - { + var_dump($objp->edrowid); + $lines[$i]->detail_batch + if (isset($lines[$i]->detail_batch)) + { + print ''; + if ($lines[$i]->product_tobatch) + { + $detail = ''; + foreach ($lines[$i]->detail_batch as $dbatch) + { $detail.= $langs->trans("Batch").': '.$dbatch->batch; $detail.= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby,"day"); $detail.= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby,"day"); $detail.= ' - '.$langs->trans("Qty").': '.$dbatch->qty; $detail.= '
    '; - } - print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"),$detail); - } - else - { - print $langs->trans("NA"); - } - print '
    '; $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode")); - $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes3EAN"); $tooltip .= ''.$langs->trans("Example").':
    '; - $tooltip .= '020{000000000} (for internal use)
    '; - $tooltip .= '9771234{00000} (example of ISSN code with prefix 1234)
    '; - $tooltip .= '9791234{00000} (example of ISMN code with prefix 1234)
    '; + $tooltip .= '020{000000000}? (for internal use)
    '; + $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
    '; + $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
    '; //$tooltip.=$langs->trans("GenericMaskCodes5"); // Mask parameter @@ -128,19 +128,46 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode public function getExample($langs, $objproduct = 0) { $examplebarcode = $this->getNextValue($objproduct, ''); - if (!$examplebarcode) - { + if (!$examplebarcode) { $examplebarcode = $langs->trans('NotConfigured'); } - if ($examplebarcode == "ErrorBadMask") - { + if ($examplebarcode == "ErrorBadMask") { $langs->load("errors"); $examplebarcode = $langs->trans($examplebarcode); } return $examplebarcode; } + /** + * Return literal barcode type code from numerical rowid type of barcode + * + * @param Database $db Database + * @param int $type Type of barcode (EAN, ISBN, ...) as rowid + * @return string + */ + public function literalBarcodeType($db, $type = '') + { + global $conf; + $out = ''; + $sql = "SELECT rowid, code, libelle as label"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; + $sql .= " WHERE rowid = '".$db->escape($type)."'"; + $sql .= " AND entity = ".((int) $conf->entity); + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + + if ($num > 0) { + $obj = $db->fetch_object($result); + $out .= $obj->label; //take the label corresponding to the type rowid in the database + } + } else { + dol_print_error($db); + } + + return $out; + } /** * Return next value * @@ -153,25 +180,50 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode global $db, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean) + + if (empty($type)) { + $type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; + } //get barcode type configuration for products if $type not set // TODO // Get Mask value $mask = ''; - if (!empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) $mask = $conf->global->BARCODE_STANDARD_PRODUCT_MASK; + if (!empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) { + $mask = $conf->global->BARCODE_STANDARD_PRODUCT_MASK; + } - if (empty($mask)) - { + if (empty($mask)) { $this->error = 'NotConfigured'; return ''; } - $field = 'barcode'; $where = ''; + $field = 'barcode'; + $where = ''; $now = dol_now(); $numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now); - + //Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key + if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...) + $literaltype = ''; + $literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type + switch ($literaltype) { + case 'EAN13': //EAN13 rowid = 2 + if (strlen($numFinal)==13) {// be sure that the mask length is correct for EAN13 + $ean = substr($numFinal, 0, 12); //take first 12 digits + $eansum = barcode_gen_ean_sum($ean); + $ean .= $eansum; //substitute the las character by the key + $numFinal = $ean; + } + break; + // Other barcode cases with key could be written here + default: + break; + } + } + //End barcode with key return $numFinal; } @@ -201,25 +253,20 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) - { + if (empty($code) && $this->code_null && empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK))) { $result = -2; } else { - if ($this->verif_syntax($code, $type) >= 0) - { + if ($this->verif_syntax($code, $type) >= 0) { $is_dispo = $this->verif_dispo($db, $code, $product); - if ($is_dispo <> 0) - { + if ($is_dispo <> 0) { $result = -3; } else { $result = 0; } } else { - if (dol_strlen($code) == 0) - { + if (dol_strlen($code) == 0) { $result = -2; } else { $result = -1; @@ -246,13 +293,13 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode // phpcs:enable $sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE barcode = '".$db->escape($code)."'"; - if ($product->id > 0) $sql .= " AND rowid <> ".$product->id; + if ($product->id > 0) { + $sql .= " AND rowid <> ".$product->id; + } $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { return 0; } else { return -1; @@ -279,8 +326,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode // Get Mask value $mask = empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK) ? '' : $conf->global->BARCODE_STANDARD_PRODUCT_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return -1; } @@ -290,18 +336,17 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode $newcodefortest = $codefortest; // Special case, if mask is on 12 digits instead of 13, we remove last char into code to test - if (in_array($typefortest, array('EAN13', 'ISBN'))) // We remove the CRC char not included into mask - { - if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) - { - if (strlen($reg[1]) == 12) $newcodefortest = substr($newcodefortest, 0, 12); + if (in_array($typefortest, array('EAN13', 'ISBN'))) { // We remove the CRC char not included into mask + if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) { + if (strlen($reg[1]) == 12) { + $newcodefortest = substr($newcodefortest, 0, 12); + } dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest); } } $result = check_value($mask, $newcodefortest); - if (is_string($result)) - { + if (is_string($result)) { $this->error = $result; return -1; } diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 01e532a7e29..99fc8ed366d 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -111,10 +111,18 @@ abstract class ModeleNumRefBarCode global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } @@ -135,43 +143,56 @@ abstract class ModeleNumRefBarCode $s = ''; $s .= $langs->trans("Name").': '.$this->name.'
    '; $s .= $langs->trans("Version").': '.$this->getVersion().'
    '; - if ($type != -1) $s .= $langs->trans("ValidityControledByModule").': '.$this->getNom($langs).'
    '; + if ($type != -1) { + $s .= $langs->trans("ValidityControledByModule").': '.$this->getNom($langs).'
    '; + } $s .= '
    '; $s .= ''.$langs->trans("ThisIsModuleRules").':
    '; - if ($type == 0) - { + if ($type == 0) { $s .= $langs->trans("RequiredIfProduct").': '; - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ''; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ''; + } $s .= yn(!$this->code_null, 1, 2); - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + } $s .= '
    '; } - if ($type == 1) - { + if ($type == 1) { $s .= $langs->trans("RequiredIfService").': '; - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ''; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ''; + } $s .= yn(!$this->code_null, 1, 2); - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + } $s .= '
    '; } - if ($type == -1) - { + if ($type == -1) { $s .= $langs->trans("Required").': '; - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ''; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ''; + } $s .= yn(!$this->code_null, 1, 2); - if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + if (!empty($conf->global->MAIN_BARCODE_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) { + $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; + } $s .= '
    '; } /*$s.=$langs->trans("CanBeModifiedIfOk").': '; - $s.=yn($this->code_modifiable,1,2); - $s.='
    '; - $s.=$langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide,1,2).'
    '; - */ + $s.=yn($this->code_modifiable,1,2); + $s.='
    '; + $s.=$langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide,1,2).'
    '; + */ $s .= $langs->trans("AutomaticCode").': '.yn($this->code_auto, 1, 2).'
    '; $s .= '
    '; $nextval = $this->getNextValue($soc, ''); - if (empty($nextval)) $nextval = $langs->trans("Undefined"); + if (empty($nextval)) { + $nextval = $langs->trans("Undefined"); + } $s .= $langs->trans("NextValue").': '.$nextval.'
    '; return $s; diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index 18f2d405acf..20ce1373b66 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -91,7 +91,9 @@ class doc_generic_bom_odt extends ModelePDFBom // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -122,17 +124,20 @@ class doc_generic_bom_odt extends ModelePDFBom $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->BOM_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -151,8 +156,7 @@ class doc_generic_bom_odt extends ModelePDFBom // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->BOM_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->BOM_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'
    ':''; $texte .= count($listoffiles); @@ -160,14 +164,13 @@ class doc_generic_bom_odt extends ModelePDFBom $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } $texte .= ''; @@ -200,37 +203,34 @@ class doc_generic_bom_odt extends ModelePDFBom // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->bom->dir_output) - { + if ($conf->bom->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Bom($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -240,20 +240,19 @@ class doc_generic_bom_odt extends ModelePDFBom $dir = $conf->bom->multidir_output[isset($object->entity) ? $object->entity : 1]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -263,10 +262,11 @@ class doc_generic_bom_odt extends ModelePDFBom //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -283,22 +283,20 @@ class doc_generic_bom_odt extends ModelePDFBom // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { // On peut utiliser le nom de la societe du contact if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { $socobject = $object->thirdparty; - // if we have a CUSTOMER contact and we dont use as recipient we store the contact object for later use + // if we have a CUSTOMER contact and we dont use as recipient we store the contact object for later use $contactobject = $object->contact; } } else { @@ -317,8 +315,7 @@ class doc_generic_bom_odt extends ModelePDFBom // Line of free text $newfreetext = ''; $paramfreetext = 'BOM_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -334,8 +331,7 @@ class doc_generic_bom_odt extends ModelePDFBom 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -350,8 +346,7 @@ class doc_generic_bom_odt extends ModelePDFBom // 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); } @@ -365,7 +360,9 @@ class doc_generic_bom_odt extends ModelePDFBom $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -374,19 +371,19 @@ class doc_generic_bom_odt extends ModelePDFBom $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -395,32 +392,26 @@ class doc_generic_bom_odt extends ModelePDFBom $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -428,8 +419,7 @@ class doc_generic_bom_odt extends ModelePDFBom } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -437,12 +427,10 @@ class doc_generic_bom_odt extends ModelePDFBom // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -474,8 +462,9 @@ class doc_generic_bom_odt extends ModelePDFBom $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 53bd17f1b9d..71bd2788c82 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -98,18 +98,17 @@ class mod_bom_advanced extends ModeleNumRefboms */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -131,8 +130,7 @@ class mod_bom_advanced extends ModeleNumRefboms // We get cursor rule $mask = $conf->global->BOM_ADVANCED_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/bom/mod_bom_standard.php b/htdocs/core/modules/bom/mod_bom_standard.php index 7d5486d5c41..f5a9fb75976 100644 --- a/htdocs/core/modules/bom/mod_bom_standard.php +++ b/htdocs/core/modules/bom/mod_bom_standard.php @@ -56,7 +56,7 @@ class mod_bom_standard extends ModeleNumRefboms public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -81,7 +81,8 @@ class mod_bom_standard extends ModeleNumRefboms { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -90,13 +91,14 @@ class mod_bom_standard extends ModeleNumRefboms $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -124,11 +126,13 @@ class mod_bom_standard extends ModeleNumRefboms $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_bom_standard::getNextValue", LOG_DEBUG); return -1; @@ -138,8 +142,11 @@ class mod_bom_standard extends ModeleNumRefboms $date = $object->date_creation; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_bom_standard::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/bom/modules_bom.php b/htdocs/core/modules/bom/modules_bom.php index 54d13971207..84182993756 100644 --- a/htdocs/core/modules/bom/modules_bom.php +++ b/htdocs/core/modules/bom/modules_bom.php @@ -142,10 +142,18 @@ abstract class ModeleNumRefBoms global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/cheque/doc/index.html b/htdocs/core/modules/cheque/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index ee00a98b039..21c131ad2a6 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -70,7 +70,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // Retrieves transmitter $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define column position $this->line_height = 5; @@ -93,22 +95,24 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // phpcs:enable global $user, $conf, $langs, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 $sav_charset_output = $outputlangs->charset_output; - if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output = 'ISO-8859-1'; + if (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta")); $dir = $_dir."/".get_exdir($number, 0, 1, 0, $object, 'checkdeposits'); - if (!is_dir($dir)) - { + if (!is_dir($dir)) { $result = dol_mkdir($dir); - if ($result < 0) - { + if ($result < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } @@ -117,8 +121,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $file = $dir."/bordereau-".$number.".pdf"; // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -132,11 +135,12 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -151,7 +155,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->transnoentities("CheckReceipt")." ".$number); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -159,12 +165,10 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // Define nb of page $pages = intval($nboflines / $this->line_per_page); - if (($nboflines % $this->line_per_page) > 0) - { + if (($nboflines % $this->line_per_page) > 0) { $pages++; } - if ($pages == 0) - { + if ($pages == 0) { // force to build at least one page if report has no lines $pages = 1; } @@ -177,15 +181,16 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // Pied de page $this->_pagefoot($pdf, '', $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -193,14 +198,14 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -340,21 +345,23 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $yp = 0; $lineinpage = 0; $num = count($this->lines); - for ($j = 0; $j < $num; $j++) - { + for ($j = 0; $j < $num; $j++) { // Dynamic max line heigh calculation $dynamic_line_height = array(); $dynamic_line_height[] = $pdf->getStringHeight(60, $outputlangs->convToOutputCharset($this->lines[$j]->bank_chq)); $dynamic_line_height[] = $pdf->getStringHeight(80, $outputlangs->convToOutputCharset($this->lines[$j]->emetteur_chq)); $max_line_height = max($dynamic_line_height); // Calculate number of line used function of estimated line size - if ($max_line_height > $this->line_height) $nb_lines = floor($max_line_height / $this->line_height) + 1; - else $nb_lines = 1; + if ($max_line_height > $this->line_height) { + $nb_lines = floor($max_line_height / $this->line_height) + 1; + } else { + $nb_lines = 1; + } // Add page break if we do not have space to add current line - if ($lineinpage >= ($this->line_per_page - 1)) - { - $lineinpage = 0; $yp = 0; + if ($lineinpage >= ($this->line_per_page - 1)) { + $lineinpage = 0; + $yp = 0; // New page $pdf->AddPage(); @@ -407,8 +414,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts complete_substitutions_array($substitutionarray, $outputlangs, $object); $newfreetext = ''; $paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } diff --git a/htdocs/core/modules/cheque/index.html b/htdocs/core/modules/cheque/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index d03b597b4e0..a882c1e0068 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -53,7 +53,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -78,7 +78,8 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts { global $conf, $langs, $db; - $payyymm = ''; $max = ''; + $payyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -87,13 +88,14 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $payyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $payyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) - { + if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -121,11 +123,13 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(__METHOD__, LOG_DEBUG); return -1; @@ -135,8 +139,11 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts $date = $object->date_bordereau; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 6af1a89baca..36a2b30e6e0 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -96,11 +96,10 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -122,8 +121,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts // We get cursor rule $mask = $conf->global->CHEQUERECEIPTS_THYME_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 66b2f9f7d82..dfdf0fbe363 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -109,10 +109,18 @@ abstract class ModeleNumRefChequeReceipts global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } @@ -142,14 +150,14 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator global $conf; $type = 'chequereceipt'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); // TODO Remove this to use getListOfModels only - $liste = array('blochet'=>'blochet'); + $list = array('blochet'=>'blochet'); - return $liste; + return $list; } } @@ -173,10 +181,8 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs) $dir = DOL_DOCUMENT_ROOT."/core/modules/cheque/doc/"; // Positionne modele sur le nom du modele a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->CHEQUERECEIPT_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->CHEQUERECEIPT_ADDON_PDF)) { $modele = $conf->global->CHEQUERECEIPT_ADDON_PDF; } else { //print $langs->trans("Error")." ".$langs->trans("Error_FACTURE_ADDON_PDF_NotDefined"); @@ -187,8 +193,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs) // Charge le modele $file = "pdf_".$modele.".modules.php"; - if (file_exists($dir.$file)) - { + if (file_exists($dir.$file)) { $classname = "pdf_".$modele; require_once $dir.$file; @@ -197,8 +202,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs) // 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 ($obj->write_file($id, $outputlangs) > 0) - { + if ($obj->write_file($id, $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; return 1; } else { diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 45ea3dc6816..33b31135caf 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -98,7 +98,9 @@ class doc_generic_order_odt extends ModelePDFCommandes // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -129,17 +131,20 @@ class doc_generic_order_odt extends ModelePDFCommandes $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->COMMANDE_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -158,8 +163,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -167,14 +171,13 @@ class doc_generic_order_odt extends ModelePDFCommandes $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; } // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate").' '; @@ -212,37 +215,34 @@ class doc_generic_order_odt extends ModelePDFCommandes // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->commande->dir_output) - { + if ($conf->commande->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Commande($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -252,20 +252,19 @@ class doc_generic_order_odt extends ModelePDFCommandes $dir = $conf->commande->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -275,10 +274,11 @@ class doc_generic_order_odt extends ModelePDFCommandes //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -295,16 +295,14 @@ class doc_generic_order_odt extends ModelePDFCommandes // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -332,8 +330,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -349,8 +346,7 @@ class doc_generic_order_odt extends ModelePDFCommandes 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -365,8 +361,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // 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); } @@ -380,7 +375,9 @@ class doc_generic_order_odt extends ModelePDFCommandes $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -389,19 +386,19 @@ class doc_generic_order_odt extends ModelePDFCommandes $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -410,32 +407,26 @@ class doc_generic_order_odt extends ModelePDFCommandes $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -443,8 +434,7 @@ class doc_generic_order_odt extends ModelePDFCommandes } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -452,12 +442,10 @@ class doc_generic_order_odt extends ModelePDFCommandes // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -489,8 +477,9 @@ class doc_generic_order_odt extends ModelePDFCommandes $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/commande/doc/index.html b/htdocs/core/modules/commande/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 43bbcdd5959..b759711ac49 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -47,6 +47,11 @@ class pdf_einstein extends ModelePDFCommandes */ public $db; + /** + * @var int The environment ID when using a multicompany module + */ + public $entity; + /** * @var string model name */ @@ -162,12 +167,13 @@ class pdf_einstein extends ModelePDFCommandes // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva = 101; $this->posxup = 118; $this->posxqty = 135; @@ -180,10 +186,11 @@ class pdf_einstein extends ModelePDFCommandes } $this->posxdiscount = 162; $this->postotalht = 174; - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxtva = $this->posxup; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { + $this->posxtva = $this->posxup; + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -217,9 +224,13 @@ class pdf_einstein extends ModelePDFCommandes // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); @@ -234,15 +245,13 @@ class pdf_einstein extends ModelePDFCommandes $nblines = count($object->lines); - if ($conf->commande->multidir_output[$conf->entity]) - { + if ($conf->commande->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); $deja_regle = 0; // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->commande->multidir_output[$conf->entity]; $file = $dir."/SPECIMEN.pdf"; } else { @@ -251,20 +260,16 @@ class pdf_einstein extends ModelePDFCommandes $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -273,6 +278,9 @@ class pdf_einstein extends ModelePDFCommandes 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 command lines content after hook + $nblines = count($object->lines); + // Create pdf instance $pdf = pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -281,20 +289,21 @@ class pdf_einstein extends ModelePDFCommandes $heightforinfotot = 40; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) { - $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) { - $logodir = $conf->mycompany->multidir_output[$object->entity]; - } + $logodir = $conf->mycompany->dir_output; + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -308,20 +317,19 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } - if (empty($this->atleastonediscount)) - { + if (empty($this->atleastonediscount)) { $delta = ($this->postotalht - $this->posxdiscount); $this->posxpicture += $delta; $this->posxtva += $delta; @@ -334,7 +342,9 @@ class pdf_einstein extends ModelePDFCommandes // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, (is_object($outputlangsbis) ? $outputlangsbis : null)); $pdf->SetFont('', '', $default_font_size - 1); @@ -347,11 +357,9 @@ class pdf_einstein extends ModelePDFCommandes // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -369,15 +377,15 @@ class pdf_einstein extends ModelePDFCommandes // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } // Extrafields in note @@ -386,8 +394,7 @@ class pdf_einstein extends ModelePDFCommandes $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); @@ -412,8 +419,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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); @@ -430,8 +436,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -439,21 +444,25 @@ class pdf_einstein extends ModelePDFCommandes pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 4, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -470,14 +479,14 @@ class pdf_einstein extends ModelePDFCommandes // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva - 5, $curY); $pdf->MultiCell($this->posxup - $this->posxtva + 4, 3, $vat_rate, 0, 'R'); @@ -494,8 +503,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L'); @@ -503,8 +511,7 @@ class pdf_einstein extends ModelePDFCommandes // Discount on line $pdf->SetXY($this->posxdiscount, $curY); - if ($object->lines[$i]->remise_percent) - { + if ($object->lines[$i]->remise_percent) { $pdf->SetXY($this->posxdiscount - 2, $curY); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 2, 3, $remise_percent, 0, 'R'); @@ -516,8 +523,11 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by value of vat in $this->vat["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -526,34 +536,44 @@ class pdf_einstein extends ModelePDFCommandes $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -564,11 +584,9 @@ class pdf_einstein extends ModelePDFCommandes $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -577,12 +595,12 @@ class pdf_einstein extends ModelePDFCommandes $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -590,9 +608,13 @@ class pdf_einstein extends ModelePDFCommandes $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } @@ -620,7 +642,9 @@ class pdf_einstein extends ModelePDFCommandes // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -631,14 +655,14 @@ class pdf_einstein extends ModelePDFCommandes $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -689,8 +713,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -701,8 +724,7 @@ class pdf_einstein extends ModelePDFCommandes $posxval = 52; // Show payments conditions - if ($object->cond_reglement_code || $object->cond_reglement) - { + if ($object->cond_reglement_code || $object->cond_reglement) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -720,33 +742,32 @@ class pdf_einstein extends ModelePDFCommandes // Check a payment mode is defined /* Not used with orders if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) + && ! $conf->global->FACTURE_CHQ_NUMBER + && ! $conf->global->FACTURE_RIB_NUMBER) { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); - $pdf->SetTextColor(0,0,0); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); + $pdf->SetTextColor(0,0,0); - $posy=$pdf->GetY()+1; - } + $posy=$pdf->GetY()+1; + } */ /* TODO else if (! empty($object->availability_code)) { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->transnoentities("AvailabilityPeriod").': '.,0,'L',0); - $pdf->SetTextColor(0,0,0); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->transnoentities("AvailabilityPeriod").': '.,0,'L',0); + $pdf->SetTextColor(0,0,0); - $posy=$pdf->GetY()+1; + $posy=$pdf->GetY()+1; }*/ // Show planed date of delivery - if (!empty($object->delivery_date)) - { + if (!empty($object->delivery_date)) { $outputlangs->load("sendings"); $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); @@ -777,7 +798,7 @@ class pdf_einstein extends ModelePDFCommandes // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -792,15 +813,12 @@ class pdf_einstein extends ModelePDFCommandes } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // Si mode reglement non force ou si force a CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -809,23 +827,20 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -836,12 +851,12 @@ class pdf_einstein extends ModelePDFCommandes } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { + if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if ($object->fk_bank > 0) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if ($object->fk_bank > 0) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -889,9 +904,9 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -914,31 +929,27 @@ class pdf_einstein extends ModelePDFCommandes $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -952,25 +963,23 @@ class pdf_einstein extends ModelePDFCommandes } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -986,18 +995,15 @@ class pdf_einstein extends ModelePDFCommandes } //} // VAT - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1014,22 +1020,20 @@ class pdf_einstein extends ModelePDFCommandes //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1043,27 +1047,25 @@ class pdf_einstein extends ModelePDFCommandes } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1100,10 +1102,11 @@ class pdf_einstein extends ModelePDFCommandes //$depositsamount=$object->getSumDepositsUsed(); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if ($deja_regle > 0) - { + if ($deja_regle > 0) { // Already paid + Deposits $index++; @@ -1150,7 +1153,9 @@ class pdf_einstein extends ModelePDFCommandes // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1159,8 +1164,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency)); @@ -1170,7 +1174,9 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -1179,34 +1185,29 @@ class pdf_einstein extends ModelePDFCommandes // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); } } $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } @@ -1220,21 +1221,17 @@ class pdf_einstein extends ModelePDFCommandes } $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { - if ($this->atleastonediscount) - { + if (empty($hidetop)) { + if ($this->atleastonediscount) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); } - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -1266,8 +1263,7 @@ class pdf_einstein extends ModelePDFCommandes pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -1282,20 +1278,18 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1326,35 +1320,31 @@ class pdf_einstein extends ModelePDFCommandes $posy += 1; $pdf->SetFont('', '', $default_font_size - 1); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -1363,8 +1353,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R'); - if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && !empty($object->thirdparty->code_client)) - { + if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && !empty($object->thirdparty->code_client)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1372,11 +1361,9 @@ class pdf_einstein extends ModelePDFCommandes } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1392,30 +1379,29 @@ class pdf_einstein extends ModelePDFCommandes // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of proposal if defined + // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user($arrayidcontact[0]); - $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (count($arrayidcontact) > 0) { + $object->fetch_user($arrayidcontact[0]); + $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = 42 + $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -1443,8 +1429,7 @@ class pdf_einstein extends ModelePDFCommandes // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1458,15 +1443,20 @@ class pdf_einstein extends ModelePDFCommandes $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 16f29f95dcb..2c7171fed8a 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -47,6 +47,11 @@ class pdf_eratosthene extends ModelePDFCommandes */ public $db; + /** + * @var int The environment ID when using a multicompany module + */ + public $entity; + /** * @var string model name */ @@ -79,9 +84,9 @@ class pdf_eratosthene extends ModelePDFCommandes */ public $version = 'dolibarr'; - /** - * @var int page_largeur - */ + /** + * @var int page_largeur + */ public $page_largeur; /** @@ -121,7 +126,7 @@ class pdf_eratosthene extends ModelePDFCommandes public $emetteur; /** - * @var array of document table collumns + * @var array of document table columns */ public $cols; @@ -167,7 +172,9 @@ class pdf_eratosthene extends ModelePDFCommandes // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff @@ -201,9 +208,13 @@ class pdf_eratosthene extends ModelePDFCommandes // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); @@ -226,18 +237,17 @@ class pdf_eratosthene extends ModelePDFCommandes // 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_ORDERS_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -246,22 +256,17 @@ class pdf_eratosthene extends ModelePDFCommandes } $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { + foreach ($pdir as $midir) { + if (!$arephoto) { if ($conf->product->entity != $objphoto->entity) { $dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities } else { $dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product } - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -277,21 +282,21 @@ class pdf_eratosthene extends ModelePDFCommandes } } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + if ($realpath && $arephoto) { + $realpatharray[$i] = $realpath; + } } } - if ($conf->commande->multidir_output[$conf->entity]) - { + if ($conf->commande->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); $deja_regle = 0; // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->commande->multidir_output[$conf->entity]; $file = $dir."/SPECIMEN.pdf"; } else { @@ -300,20 +305,16 @@ class pdf_eratosthene extends ModelePDFCommandes $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -322,6 +323,9 @@ class pdf_eratosthene extends ModelePDFCommandes 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 command lines content after hook + $nblines = count($object->lines); + // Create pdf instance $pdf = pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -331,18 +335,17 @@ class pdf_eratosthene extends ModelePDFCommandes $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')) - { + 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)) { - $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) { - $logodir = $conf->mycompany->multidir_output[$object->entity]; - } + $logodir = $conf->mycompany->dir_output; + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -356,15 +359,15 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfOrderTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } @@ -372,7 +375,9 @@ class pdf_eratosthene extends ModelePDFCommandes // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); $pdf->SetFont('', '', $default_font_size - 1); @@ -385,11 +390,9 @@ class pdf_eratosthene extends ModelePDFCommandes // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -407,15 +410,15 @@ class pdf_eratosthene extends ModelePDFCommandes // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } @@ -426,8 +429,7 @@ class pdf_eratosthene extends ModelePDFCommandes } $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; @@ -446,16 +448,19 @@ class pdf_eratosthene extends ModelePDFCommandes $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + 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); + 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. @@ -471,8 +476,7 @@ class pdf_eratosthene extends ModelePDFCommandes $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -509,8 +513,12 @@ class pdf_eratosthene extends ModelePDFCommandes // 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); + 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 @@ -521,15 +529,18 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -555,15 +566,16 @@ class pdf_eratosthene extends ModelePDFCommandes // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -574,25 +586,26 @@ class pdf_eratosthene extends ModelePDFCommandes $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('photo')) - { + 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -600,15 +613,13 @@ class pdf_eratosthene extends ModelePDFCommandes } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -617,21 +628,23 @@ class pdf_eratosthene extends ModelePDFCommandes $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -652,22 +665,21 @@ class pdf_eratosthene extends ModelePDFCommandes // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if ($this->getColumnStatus('vat')) - { + if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'vat', $vat_rate); $nexY = max($pdf->GetY(), $nexY); } // Unit price before discount - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'subprice', $up_excl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -675,8 +687,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Quantity // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { + if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); $nexY = max($pdf->GetY(), $nexY); @@ -684,32 +695,28 @@ class pdf_eratosthene extends ModelePDFCommandes // Unit - if ($this->getColumnStatus('unit')) - { + if ($this->getColumnStatus('unit')) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $this->printStdColumnContent($pdf, $curY, 'unit', $unit); $nexY = max($pdf->GetY(), $nexY); } // Discount on line - if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) - { + if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'discount', $remise_percent); $nexY = max($pdf->GetY(), $nexY); } // Total excl tax line (HT) - if ($this->getColumnStatus('totalexcltax')) - { + if ($this->getColumnStatus('totalexcltax')) { $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalexcltax', $total_excl_tax); $nexY = max($pdf->GetY(), $nexY); } // Total with tax line (TTC) - if ($this->getColumnStatus('totalincltax')) - { + if ($this->getColumnStatus('totalincltax')) { $total_incl_tax = pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -718,8 +725,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -740,8 +746,11 @@ class pdf_eratosthene extends ModelePDFCommandes // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -750,34 +759,44 @@ class pdf_eratosthene extends ModelePDFCommandes $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -787,11 +806,9 @@ class pdf_eratosthene extends ModelePDFCommandes // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == $pageposbeforeprintlines) - { + if ($pagenb == $pageposbeforeprintlines) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -800,12 +817,12 @@ class pdf_eratosthene extends ModelePDFCommandes $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 (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) - { + 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); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -813,15 +830,18 @@ class pdf_eratosthene extends ModelePDFCommandes $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + if ($pagenb == $pageposbeforeprintlines) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code); @@ -844,7 +864,9 @@ class pdf_eratosthene extends ModelePDFCommandes // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -855,14 +877,14 @@ class pdf_eratosthene extends ModelePDFCommandes $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -907,8 +929,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -919,8 +940,7 @@ class pdf_eratosthene extends ModelePDFCommandes $posxval = 52; // Show payments conditions - if ($object->cond_reglement_code || $object->cond_reglement) - { + if ($object->cond_reglement_code || $object->cond_reglement) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -938,33 +958,32 @@ class pdf_eratosthene extends ModelePDFCommandes // Check a payment mode is defined /* Not used with orders if (empty($object->mode_reglement_code) - && ! $conf->global->FACTURE_CHQ_NUMBER - && ! $conf->global->FACTURE_RIB_NUMBER) + && ! $conf->global->FACTURE_CHQ_NUMBER + && ! $conf->global->FACTURE_RIB_NUMBER) { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); - $pdf->SetTextColor(0,0,0); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0); + $pdf->SetTextColor(0,0,0); - $posy=$pdf->GetY()+1; - } + $posy=$pdf->GetY()+1; + } */ /* TODO else if (! empty($object->availability_code)) { - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->SetTextColor(200,0,0); - $pdf->SetFont('','B', $default_font_size - 2); - $pdf->MultiCell(80, 3, $outputlangs->transnoentities("AvailabilityPeriod").': '.,0,'L',0); - $pdf->SetTextColor(0,0,0); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->MultiCell(80, 3, $outputlangs->transnoentities("AvailabilityPeriod").': '.,0,'L',0); + $pdf->SetTextColor(0,0,0); - $posy=$pdf->GetY()+1; + $posy=$pdf->GetY()+1; }*/ // Show planed date of delivery - if (!empty($object->delivery_date)) - { + if (!empty($object->delivery_date)) { $outputlangs->load("sendings"); $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); @@ -976,8 +995,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->MultiCell(80, 4, $dlp, 0, 'L'); $posy = $pdf->GetY() + 1; - } elseif ($object->availability_code || $object->availability) // Show availability conditions - { + } elseif ($object->availability_code || $object->availability) { // Show availability conditions $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; @@ -995,7 +1013,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -1010,15 +1028,12 @@ class pdf_eratosthene extends ModelePDFCommandes } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // Si mode reglement non force ou si force a CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -1027,23 +1042,20 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -1054,12 +1066,12 @@ class pdf_eratosthene extends ModelePDFCommandes } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { + if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if ($object->fk_bank > 0) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if ($object->fk_bank > 0) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -1105,9 +1117,9 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -1129,30 +1141,26 @@ class pdf_eratosthene extends ModelePDFCommandes $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1166,25 +1174,23 @@ class pdf_eratosthene extends ModelePDFCommandes } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1200,18 +1206,15 @@ class pdf_eratosthene extends ModelePDFCommandes } //} // VAT - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1228,22 +1231,20 @@ class pdf_eratosthene extends ModelePDFCommandes //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1257,27 +1258,25 @@ class pdf_eratosthene extends ModelePDFCommandes } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1314,10 +1313,11 @@ class pdf_eratosthene extends ModelePDFCommandes //$depositsamount=$object->getSumDepositsUsed(); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if ($deja_regle > 0) - { + if ($deja_regle > 0) { // Already paid + Deposits $index++; @@ -1364,7 +1364,9 @@ class pdf_eratosthene extends ModelePDFCommandes // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1373,8 +1375,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency)); @@ -1429,8 +1430,7 @@ class pdf_eratosthene extends ModelePDFCommandes pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -1445,14 +1445,13 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; @@ -1489,8 +1488,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -1499,35 +1497,31 @@ class pdf_eratosthene extends ModelePDFCommandes $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -1541,8 +1535,7 @@ class pdf_eratosthene extends ModelePDFCommandes } $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R'); - if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && !empty($object->thirdparty->code_client)) - { + if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && !empty($object->thirdparty->code_client)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1550,11 +1543,9 @@ class pdf_eratosthene extends ModelePDFCommandes } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1570,31 +1561,30 @@ class pdf_eratosthene extends ModelePDFCommandes // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of proposal if defined + // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user($arrayidcontact[0]); - $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (count($arrayidcontact) > 0) { + $object->fetch_user($arrayidcontact[0]); + $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender - $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; - $posy += $top_shift; + $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; + $posy += $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1624,8 +1614,7 @@ class pdf_eratosthene extends ModelePDFCommandes // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1639,15 +1628,20 @@ class pdf_eratosthene extends ModelePDFCommandes $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1721,22 +1715,22 @@ class pdf_eratosthene extends ModelePDFCommandes ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -1772,8 +1766,7 @@ class pdf_eratosthene extends ModelePDFCommandes 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -1788,8 +1781,7 @@ class pdf_eratosthene extends ModelePDFCommandes '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)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $this->cols['vat']['status'] = true; } @@ -1891,11 +1883,9 @@ class pdf_eratosthene extends ModelePDFCommandes ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/core/modules/commande/index.html b/htdocs/core/modules/commande/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 2576533d5b7..0cc9324ef16 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -56,7 +56,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -81,7 +81,8 @@ class mod_commande_marbre extends ModeleNumRefCommandes { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -90,13 +91,14 @@ class mod_commande_marbre extends ModeleNumRefCommandes $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -124,11 +126,13 @@ class mod_commande_marbre extends ModeleNumRefCommandes $sql .= " AND entity IN (".getEntity('ordernumber', 1, $object).")"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_commande_marbre::getNextValue", LOG_DEBUG); return -1; @@ -138,8 +142,11 @@ class mod_commande_marbre extends ModeleNumRefCommandes $date = $object->date; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_commande_marbre::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 7d99facd7d3..4099686c1b6 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -98,18 +98,17 @@ class mod_commande_saphir extends ModeleNumRefCommandes */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -131,8 +130,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes // We get cursor rule $mask = $conf->global->COMMANDE_SAPHIR_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index f883a51630a..4f3378a0683 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -143,10 +143,18 @@ abstract class ModeleNumRefCommandes global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index bc6274482c4..7b451287ae1 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -97,7 +97,9 @@ class doc_generic_contract_odt extends ModelePDFContract // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -128,17 +130,20 @@ class doc_generic_contract_odt extends ModelePDFContract $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->CONTRACT_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -156,8 +161,7 @@ class doc_generic_contract_odt extends ModelePDFContract $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; } @@ -197,38 +201,35 @@ class doc_generic_contract_odt extends ModelePDFContract // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->contrat->multidir_output[$object->entity]) - { + if ($conf->contrat->multidir_output[$object->entity]) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Contrat($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -238,20 +239,19 @@ class doc_generic_contract_odt extends ModelePDFContract $dir = $conf->contrat->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -262,10 +262,11 @@ class doc_generic_contract_odt extends ModelePDFContract // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -282,8 +283,7 @@ class doc_generic_contract_odt extends ModelePDFContract // If CUSTOMER contact defined on contract, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -315,7 +315,9 @@ class doc_generic_contract_odt extends ModelePDFContract $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in order as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $substitutionarray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($substitutionarray, $outputlangs, $object); @@ -329,8 +331,7 @@ class doc_generic_contract_odt extends ModelePDFContract // Line of free text $newfreetext = ''; $paramfreetext = 'CONTRACT_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $tmparray); } @@ -347,8 +348,7 @@ class doc_generic_contract_odt extends ModelePDFContract 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -363,24 +363,23 @@ class doc_generic_contract_odt extends ModelePDFContract // 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); } - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -390,32 +389,26 @@ class doc_generic_contract_odt extends ModelePDFContract $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -423,8 +416,7 @@ class doc_generic_contract_odt extends ModelePDFContract } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -432,12 +424,10 @@ class doc_generic_contract_odt extends ModelePDFContract // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -465,8 +455,9 @@ class doc_generic_contract_odt extends ModelePDFContract $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/contract/doc/index.html b/htdocs/core/modules/contract/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 45d86ab0ced..c440cbf1cba 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -55,6 +55,11 @@ class pdf_strato extends ModelePDFContract */ 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 document type */ @@ -131,6 +136,7 @@ class pdf_strato extends ModelePDFContract $this->db = $db; $this->name = 'strato'; $this->description = $langs->trans("StandardContractsTemplate"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -154,7 +160,9 @@ class pdf_strato extends ModelePDFContract // Get source company $this->emetteur = $mysoc; - if (empty($this->emetteur->country_code)) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if not defined + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; @@ -177,20 +185,22 @@ class pdf_strato extends ModelePDFContract // phpcs:enable global $user, $langs, $conf, $hookmanager, $mysoc; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "contracts")); - if ($conf->contrat->dir_output) - { + if ($conf->contrat->dir_output) { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->contrat->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -199,20 +209,16 @@ class pdf_strato extends ModelePDFContract $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $outputlangs->trans("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -226,18 +232,18 @@ class pdf_strato extends ModelePDFContract $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -251,13 +257,17 @@ class pdf_strato extends ModelePDFContract $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -268,8 +278,7 @@ class pdf_strato extends ModelePDFContract $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10); // Display notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -295,14 +304,12 @@ class pdf_strato extends ModelePDFContract $nblines = count($object->lines); // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + for ($i = 0; $i < $nblines; $i++) { $objectligne = $object->lines[$i]; $valide = $objectligne->id ? 1 : 0; - if ($valide > 0 || $object->specimen) - { + if ($valide > 0 || $object->specimen) { $curX = $this->posxdesc - 1; $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -340,33 +347,31 @@ class pdf_strato extends ModelePDFContract $datere = $langs->trans("Unknown"); } - $txtpredefinedservice = $objectligne->product_ref; - if ($objectligne->product_label) - { - $txtpredefinedservice .= ' - '; - $txtpredefinedservice .= $objectligne->product_label; - } + $txtpredefinedservice = $objectligne->product_ref; + if ($objectligne->product_label) { + $txtpredefinedservice .= ' - '; + $txtpredefinedservice .= $objectligne->product_label; + } $desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines) $txt = ''; $txt .= $outputlangs->transnoentities("Quantity").' : '.$objectligne->qty.' - '.$outputlangs->transnoentities("UnitPrice").' : '.price($objectligne->subprice).''; // Desc (not empty for free lines) - if (empty($conf->global->CONTRACT_HIDE_PLANNED_DATE_ON_PDF)) - { + if (empty($conf->global->CONTRACT_HIDE_PLANNED_DATE_ON_PDF)) { $txt .= '
    '; $txt .= $outputlangs->transnoentities("DateStartPlannedShort")." : ".$datei." - ".$outputlangs->transnoentities("DateEndPlanned")." : ".$datee.''; } - if (empty($conf->global->CONTRACT_HIDE_REAL_DATE_ON_PDF)) - { + if (empty($conf->global->CONTRACT_HIDE_REAL_DATE_ON_PDF)) { $txt .= '
    '; $txt .= $outputlangs->transnoentities("DateStartRealShort")." : ".$daters.''; - if ($objectligne->date_cloture) $txt .= " - ".$outputlangs->transnoentities("DateEndRealShort")." : ''".$datere.''; + if ($objectligne->date_cloture) { + $txt .= " - ".$outputlangs->transnoentities("DateEndRealShort")." : ''".$datere.''; + } } $pdf->startTransaction(); $pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -375,22 +380,26 @@ class pdf_strato extends ModelePDFContract $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -406,17 +415,16 @@ class pdf_strato extends ModelePDFContract // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1); @@ -427,10 +435,8 @@ class pdf_strato extends ModelePDFContract $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. } - if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) - { - if ($pagenb == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1); @@ -438,15 +444,16 @@ class pdf_strato extends ModelePDFContract $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $this->tabSignature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs); $bottomlasttab = $this->page_hauteur - $heightforfooter - $heightforfooter + 1; @@ -457,15 +464,16 @@ class pdf_strato extends ModelePDFContract } $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -473,14 +481,14 @@ class pdf_strato extends ModelePDFContract $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) - { + 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); @@ -514,7 +522,9 @@ class pdf_strato extends ModelePDFContract // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); /* @@ -541,7 +551,7 @@ class pdf_strato extends ModelePDFContract $pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY); $pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also. - */ + */ // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 3); // Rect takes a length in 3rd parameter and 4th parameter @@ -596,8 +606,7 @@ class pdf_strato extends ModelePDFContract pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); //Affiche le filigrane brouillon - Print Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->CONTRACT_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->CONTRACT_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->CONTRACT_DRAFT_WATERMARK); } @@ -612,10 +621,8 @@ class pdf_strato extends ModelePDFContract // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -650,22 +657,19 @@ class pdf_strato extends ModelePDFContract $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_contrat, "day", false, $outputlangs, true), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'INTERREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } @@ -675,7 +679,9 @@ class pdf_strato extends ModelePDFContract // Show sender $posy = 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -702,8 +708,7 @@ class pdf_strato extends ModelePDFContract // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -723,10 +728,14 @@ class pdf_strato extends ModelePDFContract // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/contract/index.html b/htdocs/core/modules/contract/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 226efa0c99e..d696ac06fdd 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -101,15 +101,14 @@ class mod_contract_magre extends ModelNumRefContracts */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -130,8 +129,7 @@ class mod_contract_magre extends ModelNumRefContracts $mask = $conf->global->CONTRACT_MAGRE_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index 0c49c63ab4a..9d9551bfa96 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -111,11 +111,9 @@ class mod_contract_olive extends ModelNumRefContracts $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED))) { $result = -2; } diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index de54fff3d76..6bc09464dba 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -67,7 +67,7 @@ class mod_contract_serpis extends ModelNumRefContracts public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -91,7 +91,8 @@ class mod_contract_serpis extends ModelNumRefContracts { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -100,13 +101,14 @@ class mod_contract_serpis extends ModelNumRefContracts $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -133,11 +135,13 @@ class mod_contract_serpis extends ModelNumRefContracts $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_contract_serpis::getNextValue", LOG_DEBUG); return -1; @@ -146,8 +150,11 @@ class mod_contract_serpis extends ModelNumRefContracts $date = $contract->date_contrat; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_contract_serpis::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index c259c247304..8e296f626fb 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -57,12 +57,12 @@ abstract class ModelePDFContract extends CommonDocGenerator global $conf; $type = 'contract'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -144,10 +144,18 @@ class ModelNumRefContracts global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/delivery/doc/index.html b/htdocs/core/modules/delivery/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index d6376e6cd17..057310a9976 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Chiptronik - * Copyright (C) 2011-2019 Philippe Grand + * Copyright (C) 2011-2021 Philippe Grand * Copyright (C) 2015 Marcos García * Copyright (C) 2020 John BOTELLA @@ -54,6 +54,11 @@ class pdf_storm extends ModelePDFDeliveryOrder */ 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 document type */ @@ -61,9 +66,9 @@ class pdf_storm extends ModelePDFDeliveryOrder /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document @@ -127,6 +132,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $this->db = $db; $this->name = "Storm"; $this->description = $langs->trans("DocumentModelStorm"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -145,7 +151,9 @@ class pdf_storm extends ModelePDFDeliveryOrder // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } $this->tva = array(); $this->atleastoneratenotnull = 0; @@ -170,43 +178,40 @@ class pdf_storm extends ModelePDFDeliveryOrder // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries")); - if ($conf->expedition->dir_output) - { + if ($conf->expedition->dir_output) { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->expedition->dir_output."/receipt"; $file = $dir."/SPECIMEN.pdf"; - } - else { + } else { $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->expedition->dir_output."/receipt/".$objectref; $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -221,46 +226,37 @@ class pdf_storm extends ModelePDFDeliveryOrder // 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_DELIVERY_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_DELIVERY_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; - } - else { + } else { $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative } $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { + foreach ($pdir as $midir) { + if (!$arephoto) { $dir = $conf->product->dir_output.'/'.$midir; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; - } - else { + } else { $filename = $obj['photo']; } - } - else { + } else { $filename = $obj['photo']; } @@ -271,11 +267,15 @@ class pdf_storm extends ModelePDFDeliveryOrder } } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + if ($realpath && $arephoto) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxweightvol; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxweightvol; + } @@ -285,18 +285,18 @@ class pdf_storm extends ModelePDFDeliveryOrder $heightforinfotot = 30; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -306,8 +306,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $result = $expedition->fetch($object->origin_id); // Now we get the order that is origin of shipment $commande = new Commande($this->db); - if ($expedition->origin == 'commande') - { + if ($expedition->origin == 'commande') { $commande->fetch($expedition->origin_id); } $object->commande = $commande; // We set order of shipment onto delivery. @@ -323,14 +322,18 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -346,11 +349,9 @@ class pdf_storm extends ModelePDFDeliveryOrder // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -372,13 +373,11 @@ class pdf_storm extends ModelePDFDeliveryOrder // Extrafields in note $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { + if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if (!empty($notetoshow)) - { + if (!empty($notetoshow)) { $tab_top = 88 + $height_incoterms; $pdf->SetFont('', '', $default_font_size - 1); @@ -392,8 +391,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $tab_height = $tab_height - $height_note; $tab_top = $nexY + 6; - } - else { + } else { $height_note = 0; } @@ -410,8 +408,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $nexY = $tab_top + $this->tabTitleHeight + 2; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + for ($i = 0; $i < $nblines; $i++) { // Fetch optionals if (empty($object->lines[$i]->array_options)) { $object->lines[$i]->fetch_optionals(); @@ -423,7 +420,9 @@ class pdf_storm extends ModelePDFDeliveryOrder // Define size of image if we need it $imglinesize = array(); - if (!empty($realpatharray[$i])) $imglinesize = pdf_getSizeForImage($realpatharray[$i]); + if (!empty($realpatharray[$i])) { + $imglinesize = pdf_getSizeForImage($realpatharray[$i]); + } $pdf->setTopMargin($tab_top_newpage); @@ -437,27 +436,28 @@ class pdf_storm extends ModelePDFDeliveryOrder $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('photo')) - { + 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -470,29 +470,32 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 4, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -510,7 +513,8 @@ class pdf_storm extends ModelePDFDeliveryOrder // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -534,8 +538,7 @@ class pdf_storm extends ModelePDFDeliveryOrder // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -544,8 +547,7 @@ class pdf_storm extends ModelePDFDeliveryOrder } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -556,47 +558,45 @@ class pdf_storm extends ModelePDFDeliveryOrder $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); - } - else { + } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); } $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 == 1) - { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); } - else { + } + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); + } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); } $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - } - else { + } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } @@ -607,15 +607,16 @@ class pdf_storm extends ModelePDFDeliveryOrder // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -623,20 +624,19 @@ class pdf_storm extends ModelePDFDeliveryOrder $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); return 1; // No error - } - else { + } else { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } @@ -696,7 +696,9 @@ class pdf_storm extends ModelePDFDeliveryOrder // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -705,10 +707,11 @@ class pdf_storm extends ModelePDFDeliveryOrder $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -744,8 +747,7 @@ class pdf_storm extends ModelePDFDeliveryOrder pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -759,21 +761,19 @@ class pdf_storm extends ModelePDFDeliveryOrder // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) - } - else { + } else { $pdf->SetTextColor(200, 0, 0); $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } + } else { + $pdf->MultiCell(100, 4, $this->emetteur->name, 0, 'L'); } - else $pdf->MultiCell(100, 4, $this->emetteur->name, 0, 'L'); $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetXY($posx, $posy); @@ -785,18 +785,15 @@ class pdf_storm extends ModelePDFDeliveryOrder $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - if ($object->date_valid) - { + if ($object->date_valid) { $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_delivery, "%d %b %Y", false, $outputlangs, true), '', 'R'); - } - else { + } else { $pdf->SetTextColor(255, 0, 0); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryNotValidated"), '', 'R'); $pdf->SetTextColor(0, 0, 60); } - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -810,15 +807,16 @@ class pdf_storm extends ModelePDFDeliveryOrder // Show list of linked objects $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -845,7 +843,9 @@ class pdf_storm extends ModelePDFDeliveryOrder // Client destinataire $posy = 42; $posx = 102; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posx, $posy - 5); @@ -854,8 +854,7 @@ class pdf_storm extends ModelePDFDeliveryOrder // If SHIPPING contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->commande->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -873,10 +872,14 @@ class pdf_storm extends ModelePDFDeliveryOrder // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -996,8 +999,7 @@ class pdf_storm extends ModelePDFDeliveryOrder 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_DELIVERY_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_DELIVERY_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -1062,15 +1064,11 @@ class pdf_storm extends ModelePDFDeliveryOrder ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } - elseif (empty($reshook)) - { + } elseif (empty($reshook)) { $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys - } - else { + } else { $this->cols = $hookmanager->resArray; } } diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index 3b8baa107ad..66f232653ac 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Chiptronik - * Copyright (C) 2011-2020 Philippe Grand + * Copyright (C) 2011-2021 Philippe Grand * Copyright (C) 2015 Marcos García * This program is free software; you can redistribute it and/or modify @@ -53,6 +53,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ 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 document type */ @@ -126,6 +131,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->db = $db; $this->name = "Typhon"; $this->description = $langs->trans("DocumentModelTyphon"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -144,7 +150,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; @@ -155,8 +163,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->posxremainingqty = 185; //$this->posxdiscount=162; //$this->postotalht=174; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxcomm -= 20; //$this->posxtva-=20; //$this->posxup-=20; @@ -188,20 +195,22 @@ class pdf_typhon extends ModelePDFDeliveryOrder // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries")); - if ($conf->expedition->dir_output) - { + if ($conf->expedition->dir_output) { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->expedition->dir_output."/receipt"; $file = $dir."/SPECIMEN.pdf"; } else { @@ -210,20 +219,16 @@ class pdf_typhon extends ModelePDFDeliveryOrder $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -240,18 +245,18 @@ class pdf_typhon extends ModelePDFDeliveryOrder $heightforinfotot = 30; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -261,8 +266,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $result = $expedition->fetch($object->origin_id); // Now we get the order that is origin of shipment $commande = new Commande($this->db); - if ($expedition->origin == 'commande') - { + if ($expedition->origin == 'commande') { $commande->fetch($expedition->origin_id); } $object->commande = $commande; // We set order of shipment onto delivery. @@ -278,7 +282,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -286,12 +292,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Positionne $this->atleastonediscount si on a au moins une remise for ($i = 0 ; $i < $nblines ; $i++) { - if ($object->lines[$i]->remise_percent) - { - $this->atleastonediscount++; - } + if ($object->lines[$i]->remise_percent) + { + $this->atleastonediscount++; + } } - if (empty($this->atleastonediscount)) + if (empty($this->atleastonediscount)) { $this->posxpicture+=($this->postotalht - $this->posxdiscount); $this->posxtva+=($this->postotalht - $this->posxdiscount); @@ -304,7 +310,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -318,11 +326,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -340,8 +346,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder } // Affiche notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $tab_top = 88 + $height_incoterms; $pdf->SetFont('', '', $default_font_size - 1); @@ -364,8 +369,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $nexY = $tab_top + 11; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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); @@ -382,29 +386,32 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxcomm - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxcomm - $curX, 4, $curX, $curY, $hideref, $hidedesc); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -419,7 +426,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -463,8 +471,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -475,11 +482,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -488,12 +493,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -501,15 +506,18 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -523,7 +531,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } // Check product remaining to be delivered // TODO doit etre modifie @@ -544,16 +554,16 @@ class pdf_typhon extends ModelePDFDeliveryOrder $outputlangs->transnoentities('Qty') ); - // Header - $num = count($header); - for($i = 0; $i < $num; $i++) - { - $pdf->Cell($w[$i],7,$header[$i],1,0,'C'); - } + // Header + $num = count($header); + for($i = 0; $i < $num; $i++) + { + $pdf->Cell($w[$i],7,$header[$i],1,0,'C'); + } - $pdf->Ln(); + $pdf->Ln(); - // Data + // Data foreach($waitingDelivery as $value) { $pdf->Cell($w[0], 6, $value['ref'], 1, 0, 'L'); @@ -591,8 +601,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -600,14 +609,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -671,7 +680,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -682,16 +693,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Output Rec $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 10, $this->page_largeur - $this->marge_droite, $tab_top + 10); } $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell($this->posxcomm - $this->posxdesc, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } @@ -737,8 +746,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -752,10 +760,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -764,7 +770,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $this->emetteur->name, 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $this->emetteur->name, 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetXY($posx, $posy); @@ -776,8 +784,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - if ($object->date_valid) - { + if ($object->date_valid) { $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_delivery, "%d %b %Y", false, $outputlangs, true), '', 'R'); } else { $pdf->SetTextColor(255, 0, 0); @@ -785,8 +792,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetTextColor(0, 0, 60); } - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -800,15 +806,16 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Show list of linked objects $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -835,7 +842,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Client destinataire $posy = 42; $posx = 102; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posx, $posy - 5); @@ -844,8 +853,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder // If SHIPPING contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->commande->getIdContact('external', 'SHIPPING'); - if ($arrayidcontact && count($arrayidcontact) > 0) - { + if ($arrayidcontact && count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -863,10 +871,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/delivery/index.html b/htdocs/core/modules/delivery/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/delivery/mod_delivery_jade.php b/htdocs/core/modules/delivery/mod_delivery_jade.php index 822986cffa5..605265fde00 100644 --- a/htdocs/core/modules/delivery/mod_delivery_jade.php +++ b/htdocs/core/modules/delivery/mod_delivery_jade.php @@ -94,7 +94,8 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder $langs->load("bills"); // Check invoice num - $fayymm = ''; $max = ''; + $fayymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL @@ -103,13 +104,14 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -140,18 +142,26 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder dol_syslog("mod_delivery_jade::getNextValue", LOG_DEBUG); if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { return -1; } $date = $object->date_delivery; - if (empty($date)) $date = dol_now(); + if (empty($date)) { + $date = dol_now(); + } $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_delivery_jade::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index ca0de68a670..af1900803c8 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/modules/delivery/mod_livraison_saphir.php + * \file htdocs/core/modules/delivery/mod_delivery_saphir.php * \ingroup expedition * \brief Fichier contenant la classe du modele de numerotation de reference de livraison Saphir */ @@ -102,15 +102,14 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -133,8 +132,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder // On defini critere recherche compteur $mask = $conf->global->DELIVERY_SAPHIR_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/delivery/modules_delivery.php b/htdocs/core/modules/delivery/modules_delivery.php index 80e2b092d42..5bd3bd33866 100644 --- a/htdocs/core/modules/delivery/modules_delivery.php +++ b/htdocs/core/modules/delivery/modules_delivery.php @@ -55,12 +55,12 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator global $conf; $type = 'delivery'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -145,10 +145,16 @@ abstract class ModeleNumRefDeliveryOrder global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index b3480297476..792c8434ba4 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -81,26 +81,25 @@ class html_cerfafr extends ModeleDon $now = dol_now(); $id = (!is_object($don) ? $don : ''); - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "donations")); $currency = !empty($currency) ? $currency : $conf->currency; - if (!empty($conf->don->dir_output)) - { + if (!empty($conf->don->dir_output)) { // Definition of the object don (for upward compatibility) - if (!is_object($don)) - { + if (!is_object($don)) { $don = new Don($this->db); $ret = $don->fetch($id); $id = $don->id; } // Definition of $dir and $file - if (!empty($don->specimen)) - { + if (!empty($don->specimen)) { $dir = $conf->don->dir_output; $file = $dir."/SPECIMEN.html"; } else { @@ -109,26 +108,24 @@ class html_cerfafr extends ModeleDon $file = $dir."/".$donref.".html"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { $formclass = new Form($this->db); // This is not the proper way to do it but $formclass->form_modes_reglement // prints the translation instead of returning it - if ($don->modepaiementid) - { + if ($don->modepaiementid) { $formclass->load_cache_types_paiements(); $paymentmode = $formclass->cache_types_paiements[$don->modepaiementid]['label']; - } else $paymentmode = ''; + } else { + $paymentmode = ''; + } if ($don->modepaymentcode == 'CHQ') { $ModePaiement = ''; @@ -197,17 +194,20 @@ class html_cerfafr extends ModeleDon $form = str_replace('__ModePaiement__', $ModePaiement, $form); $frencharticle = ''; - if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencharticle = 'Article 200, 238 bis et 978 du code général des impôts (CGI)'; + if (preg_match('/fr/i', $outputlangs->defaultlang)) { + $frencharticle = 'Article 200, 238 bis et 978 du code général des impôts (CGI)'; + } $form = str_replace('__FrenchArticle__', $frencharticle, $form); $frencheligibility = ''; - if (preg_match('/fr/i', $outputlangs->defaultlang)) $frencheligibility = 'Le bénéficiaire certifie sur l\'honneur que les dons et versements qu\'il reçoit ouvrent droit à la réduction d\'impôt prévue à l\'article :'; + if (preg_match('/fr/i', $outputlangs->defaultlang)) { + $frencheligibility = 'Le bénéficiaire certifie sur l\'honneur que les dons et versements qu\'il reçoit ouvrent droit à la réduction d\'impôt prévue à l\'article :'; + } $form = str_replace('__FrenchEligibility__', $frencheligibility, $form); $art200 = ''; if ($mysoc->country_code == 'FR') { - if ($conf->global->DONATION_ART200 >= 1) - { + if ($conf->global->DONATION_ART200 >= 1) { $art200 = '200 du CGI'; } else { $art200 = '200 du CGI'; @@ -217,8 +217,7 @@ class html_cerfafr extends ModeleDon $art238 = ''; if ($mysoc->country_code == 'FR') { - if ($conf->global->DONATION_ART238 >= 1) - { + if ($conf->global->DONATION_ART238 >= 1) { $art238 = '238 bis du CGI'; } else { $art238 = '238 bis du CGI'; @@ -228,8 +227,7 @@ class html_cerfafr extends ModeleDon $art978 = ''; if ($mysoc->country_code == 'FR') { - if ($conf->global->DONATION_ART978 >= 1) - { + if ($conf->global->DONATION_ART978 >= 1) { $art978 = '978 du CGI'; } else { $art978 = '978 du CGI'; @@ -242,8 +240,9 @@ class html_cerfafr extends ModeleDon $handle = fopen($file, "w"); fwrite($handle, $form); fclose($handle); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -271,10 +270,16 @@ class html_cerfafr extends ModeleDon $unite = array(); $dix = array(); $cent = array(); - if (empty($devise1)) $dev1 = 'euros'; - else $dev1 = $devise1; - if (empty($devise2)) $dev2 = 'centimes'; - else $dev2 = $devise2; + if (empty($devise1)) { + $dev1 = 'euros'; + } else { + $dev1 = $devise1; + } + if (empty($devise2)) { + $dev2 = 'centimes'; + } else { + $dev2 = $devise2; + } $valeur_entiere = intval($montant); $valeur_decimal = intval(round($montant - intval($montant), 2) * 100); $dix_c = intval($valeur_decimal % 100 / 10); @@ -366,34 +371,46 @@ class html_cerfafr extends ModeleDon $prim[$i] = $chif[$unite[$i] + 10]; } } - if ($cent[$i] == 1) $trio[$i] = 'cent'; - elseif ($cent[$i] != 0 || $cent[$i] != '') $trio[$i] = $chif[$cent[$i]].' cents'; + if ($cent[$i] == 1) { + $trio[$i] = 'cent'; + } elseif ($cent[$i] != 0 || $cent[$i] != '') { + $trio[$i] = $chif[$cent[$i]].' cents'; + } } $chif2 = array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix'); $secon_c = $chif2[$dix_c]; - if ($cent_c == 1) $trio_c = 'cent'; - elseif ($cent_c != 0 || $cent_c != '') $trio_c = $chif[$cent_c].' cents'; + if ($cent_c == 1) { + $trio_c = 'cent'; + } elseif ($cent_c != 0 || $cent_c != '') { + $trio_c = $chif[$cent_c].' cents'; + } - if (($cent[3] == 0 || $cent[3] == '') && ($dix[3] == 0 || $dix[3] == '') && ($unite[3] == 1)) + if (($cent[3] == 0 || $cent[3] == '') && ($dix[3] == 0 || $dix[3] == '') && ($unite[3] == 1)) { $somme = $trio[3].' '.$secon[3].' '.$prim[3].' million '; - elseif (($cent[3] != 0 && $cent[3] != '') || ($dix[3] != 0 && $dix[3] != '') || ($unite[3] != 0 && $unite[3] != '')) + } elseif (($cent[3] != 0 && $cent[3] != '') || ($dix[3] != 0 && $dix[3] != '') || ($unite[3] != 0 && $unite[3] != '')) { $somme = $trio[3].' '.$secon[3].' '.$prim[3].' millions '; - else $somme = $trio[3].' '.$secon[3].' '.$prim[3]; + } else { + $somme = $trio[3].' '.$secon[3].' '.$prim[3]; + } - if (($cent[2] == 0 || $cent[2] == '') && ($dix[2] == 0 || $dix[2] == '') && ($unite[2] == 1)) + if (($cent[2] == 0 || $cent[2] == '') && ($dix[2] == 0 || $dix[2] == '') && ($unite[2] == 1)) { $somme = $somme.' mille '; - elseif (($cent[2] != 0 && $cent[2] != '') || ($dix[2] != 0 && $dix[2] != '') || ($unite[2] != 0 && $unite[2] != '')) + } elseif (($cent[2] != 0 && $cent[2] != '') || ($dix[2] != 0 && $dix[2] != '') || ($unite[2] != 0 && $unite[2] != '')) { $somme = $somme.$trio[2].' '.$secon[2].' '.$prim[2].' milles '; - else $somme = $somme.$trio[2].' '.$secon[2].' '.$prim[2]; + } else { + $somme = $somme.$trio[2].' '.$secon[2].' '.$prim[2]; + } $somme = $somme.$trio[1].' '.$secon[1].' '.$prim[1]; $somme = $somme.' '.$dev1.' '; - if (($cent_c == '0' || $cent_c == '') && ($dix_c == '0' || $dix_c == '')) + if (($cent_c == '0' || $cent_c == '') && ($dix_c == '0' || $dix_c == '')) { return $somme.' et zéro '.$dev2; - else return $somme.$trio_c.' '.$secon_c.' '.$dev2; + } else { + return $somme.$trio_c.' '.$secon_c.' '.$dev2; + } } } diff --git a/htdocs/core/modules/dons/index.html b/htdocs/core/modules/dons/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php index 73186354285..cd332c48fcb 100644 --- a/htdocs/core/modules/dons/modules_don.php +++ b/htdocs/core/modules/dons/modules_don.php @@ -53,12 +53,12 @@ abstract class ModeleDon extends CommonDocGenerator global $conf; $type = 'donation'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -139,10 +139,18 @@ abstract class ModeleNumRefDons global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index ecfe7268564..797530a6c13 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -99,7 +99,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -130,17 +132,20 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->EXPEDITION_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -159,22 +164,20 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->EXPEDITION_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->EXPEDITION_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); //$texte.=$nbofiles?'':''; $texte .= ''; } - if ($nbofiles) - { - $texte .= '
    '; - // Show list of found files - foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; - } - $texte .= '
    '; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate").' '; @@ -211,38 +214,35 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->expedition->dir_output."/sending") - { + if ($conf->expedition->dir_output."/sending") { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Expedition($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -252,20 +252,19 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $dir = $conf->expedition->dir_output."/sending"; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -275,10 +274,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -295,8 +295,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // If SHIPMENT contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -331,8 +330,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Line of free text $newfreetext = ''; $paramfreetext = 'EXPEDITION_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -348,8 +346,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -364,48 +361,47 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // 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); } // Make substitutions into odt of user info $tmparray = $this->get_substitutionarray_user($user, $outputlangs); //var_dump($tmparray); exit; - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { // Image //var_dump($value);exit; - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } // Make substitutions into odt of mysoc $tmparray = $this->get_substitutionarray_mysoc($mysoc, $outputlangs); //var_dump($tmparray); exit; - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { // Image //var_dump($value);exit; - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -415,63 +411,63 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } else { $tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs); } - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } if ($usecontact && is_object($contactobject)) { $tmparray = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } } // Replace tags of object + external modules - $tmparray = $this->get_substitutionarray_shipment($object, $outputlangs); + $tmparray = array_merge($tmparray, $this->get_substitutionarray_shipment($object, $outputlangs)); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -480,30 +476,24 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { - foreach ($object->lines as $line) - { + if ($foundtagforlines) { + foreach ($object->lines as $line) { $tmparray = $this->get_substitutionarray_shipment_lines($line, $outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -511,8 +501,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -520,12 +509,10 @@ class doc_generic_shipment_odt extends ModelePdfExpedition // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -555,8 +542,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/expedition/doc/index.html b/htdocs/core/modules/expedition/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 165e83a8e87..42a777a196f 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -51,6 +51,11 @@ class pdf_espadon extends ModelePdfExpedition */ 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 document type */ @@ -122,6 +127,7 @@ class pdf_espadon extends ModelePdfExpedition $this->db = $db; $this->name = "espadon"; $this->description = $langs->trans("DocumentModelStandardPDF"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template $this->type = 'pdf'; $formatarray = pdf_getFormat(); @@ -137,7 +143,9 @@ class pdf_espadon extends ModelePdfExpedition // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } $this->tabTitleHeight = 5; // default height } @@ -161,9 +169,13 @@ class pdf_espadon extends ModelePdfExpedition $object->fetch_thirdparty(); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); @@ -181,19 +193,18 @@ class pdf_espadon extends ModelePdfExpedition // 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_SHIPMENT_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -203,12 +214,9 @@ class pdf_espadon extends ModelePdfExpedition $realpath = ''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -222,17 +230,19 @@ class pdf_espadon extends ModelePdfExpedition break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxweightvol; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxweightvol; + } - if ($conf->expedition->dir_output) - { + if ($conf->expedition->dir_output) { // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->expedition->dir_output."/sending"; $file = $dir."/SPECIMEN.pdf"; } else { @@ -241,20 +251,16 @@ class pdf_espadon extends ModelePdfExpedition $file = $dir."/".$expref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -271,18 +277,18 @@ class pdf_espadon extends ModelePdfExpedition $heightforinfotot = 8; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -291,20 +297,26 @@ class pdf_espadon extends ModelePdfExpedition $pagenb = 0; $pdf->SetDrawColor(128, 128, 128); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetSubject($outputlangs->transnoentities("Shipment")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -320,11 +332,9 @@ class pdf_espadon extends ModelePdfExpedition // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -346,13 +356,11 @@ class pdf_espadon extends ModelePdfExpedition // Extrafields in note $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { + if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if (!empty($notetoshow) || !empty($object->tracking_number)) - { + if (!empty($notetoshow) || !empty($object->tracking_number)) { $tab_top = 88 + $height_incoterms; $tab_top_alt = $tab_top; @@ -363,21 +371,19 @@ class pdf_espadon extends ModelePdfExpedition //$tab_top_alt += 1; // Tracking number - if (!empty($object->tracking_number)) - { + if (!empty($object->tracking_number)) { $object->getUrlTrackingStatus($object->tracking_number); - if (!empty($object->tracking_url)) - { - if ($object->shipping_method_id > 0) - { + if (!empty($object->tracking_url)) { + if ($object->shipping_method_id > 0) { // Get code using getLabelFromKey $code = $outputlangs->getLabelFromKey($this->db, $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); $label = ''; - if ($object->tracking_url != $object->tracking_number) $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + if ($object->tracking_url != $object->tracking_number) { + $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + } $label .= $outputlangs->trans("SendingMethod").": ".$outputlangs->trans("SendingMethod".strtoupper($code)); //var_dump($object->tracking_url != $object->tracking_number);exit; - if ($object->tracking_url != $object->tracking_number) - { + if ($object->tracking_url != $object->tracking_number) { $label .= " : "; $label .= $object->tracking_url; } @@ -390,8 +396,7 @@ class pdf_espadon extends ModelePdfExpedition } // Notes - if (!empty($notetoshow)) - { + if (!empty($notetoshow)) { $pdf->SetFont('', '', $default_font_size - 1); // In loop to manage multi-page $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top_alt, dol_htmlentitiesbr($notetoshow), 0, 1); } @@ -422,15 +427,16 @@ class pdf_espadon extends ModelePdfExpedition $nexY = $tab_top + $this->tabTitleHeight; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -440,27 +446,28 @@ class pdf_espadon extends ModelePdfExpedition $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('photo')) - { + 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 + $heightforsignature + $heightforinfotot))) // If photo too high, we moved completely on new page - { + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -468,15 +475,13 @@ class pdf_espadon extends ModelePdfExpedition } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); @@ -484,21 +489,23 @@ class pdf_espadon extends ModelePdfExpedition $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 + $heightforsignature + $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 - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -516,12 +523,14 @@ class pdf_espadon extends ModelePdfExpedition // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font @@ -529,37 +538,31 @@ class pdf_espadon extends ModelePdfExpedition // weight $weighttxt = ''; - if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight) - { + if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight) { $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1); } $voltxt = ''; - if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume) - { + if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume) { $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1); } - if ($this->getColumnStatus('weight')) - { + if ($this->getColumnStatus('weight')) { $this->printStdColumnContent($pdf, $curY, 'weight', $weighttxt.(($weighttxt && $voltxt) ? '
    ' : '').$voltxt, array('html'=>1)); $nexY = max($pdf->GetY(), $nexY); } - if ($this->getColumnStatus('qty_asked')) - { + if ($this->getColumnStatus('qty_asked')) { $this->printStdColumnContent($pdf, $curY, 'qty_asked', $object->lines[$i]->qty_asked); $nexY = max($pdf->GetY(), $nexY); } - if ($this->getColumnStatus('qty_shipped')) - { + if ($this->getColumnStatus('qty_shipped')) { $this->printStdColumnContent($pdf, $curY, 'qty_shipped', $object->lines[$i]->qty_shipped); $nexY = max($pdf->GetY(), $nexY); } - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $this->printStdColumnContent($pdf, $curY, 'subprice', price($object->lines[$i]->subprice, 0, $outputlangs)); $nexY = max($pdf->GetY(), $nexY); } @@ -567,8 +570,7 @@ class pdf_espadon extends ModelePdfExpedition // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -577,8 +579,7 @@ class pdf_espadon extends ModelePdfExpedition } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -587,11 +588,9 @@ class pdf_espadon extends ModelePdfExpedition } // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -600,12 +599,12 @@ class pdf_espadon extends ModelePdfExpedition $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -613,15 +612,18 @@ class pdf_espadon extends ModelePdfExpedition $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -634,7 +636,9 @@ class pdf_espadon extends ModelePdfExpedition // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -645,14 +649,14 @@ class pdf_espadon extends ModelePdfExpedition $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) - { + 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); @@ -693,13 +697,17 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetFont('', 'B', $default_font_size - 1); // Total table - $col1x = $this->posxweightvol - 50; $col2x = $this->posxweightvol; + $col1x = $this->posxweightvol - 50; + $col2x = $this->posxweightvol; /*if ($this->page_largeur < 210) // To work with US executive format { $col2x-=20; }*/ - if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) $largcol2 = ($this->posxqtyordered - $this->posxweightvol); - else $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { + $largcol2 = ($this->posxqtyordered - $this->posxweightvol); + } else { + $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + } $useborder = 0; $index = 0; @@ -714,53 +722,53 @@ class pdf_espadon extends ModelePdfExpedition $totalOrdered = $tmparray['ordered']; $totalToShip = $tmparray['toship']; // Set trueVolume and volume_units not currently stored into database - if ($object->trueWidth && $object->trueHeight && $object->trueDepth) - { + if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { $object->trueVolume = price(($object->trueWidth * $object->trueHeight * $object->trueDepth), 0, $outputlangs, 0, 0); $object->volume_units = $object->size_units * 3; } - if ($totalWeight != '') $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); - if ($totalVolume != '') $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); - if ($object->trueWeight) $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); - if ($object->trueVolume) $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + if ($totalWeight != '') { + $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); + } + if ($totalVolume != '') { + $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); + } + if ($object->trueWeight) { + $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); + } + if ($object->trueVolume) { + $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + } - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $this->printStdColumnContent($pdf, $tab2_top, 'desc', $outputlangs->transnoentities("Total")); } - if ($this->getColumnStatus('weight')) - { - if ($totalWeighttoshow) - { + if ($this->getColumnStatus('weight')) { + if ($totalWeighttoshow) { $this->printStdColumnContent($pdf, $tab2_top, 'weight', $totalWeighttoshow); $index++; } - if ($totalVolumetoshow) - { + if ($totalVolumetoshow) { $y = $tab2_top + ($tab2_hl * $index); $this->printStdColumnContent($pdf, $y, 'weight', $totalVolumetoshow); } } - if ($this->getColumnStatus('qty_asked') && $totalOrdered) - { + if ($this->getColumnStatus('qty_asked') && $totalOrdered) { $this->printStdColumnContent($pdf, $tab2_top, 'qty_asked', $totalOrdered); } - if ($this->getColumnStatus('qty_shipped') && $totalToShip) - { + if ($this->getColumnStatus('qty_shipped') && $totalToShip) { $this->printStdColumnContent($pdf, $tab2_top, 'qty_shipped', $totalToShip); } - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $this->printStdColumnContent($pdf, $tab2_top, 'subprice', price($object->total_ht, 0, $outputlangs)); } @@ -788,7 +796,9 @@ class pdf_espadon extends ModelePdfExpedition // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -797,8 +807,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); @@ -840,8 +849,7 @@ class pdf_espadon extends ModelePdfExpedition pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK); } @@ -858,10 +866,8 @@ class pdf_espadon extends ModelePdfExpedition // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -876,23 +882,20 @@ class pdf_espadon extends ModelePdfExpedition } // Show barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -917,16 +920,14 @@ class pdf_espadon extends ModelePdfExpedition $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); // Date planned delivery - if (!empty($object->date_delivery)) - { + if (!empty($object->date_delivery)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R'); } - if (!empty($object->thirdparty->code_client)) - { + if (!empty($object->thirdparty->code_client)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -942,20 +943,20 @@ class pdf_espadon extends ModelePdfExpedition $origin_id = $object->origin_id; // TODO move to external function - if (!empty($conf->$origin->enabled)) // commonly $origin='commande' - { + if (!empty($conf->$origin->enabled)) { // commonly $origin='commande' $outputlangs->load('orders'); $classname = ucfirst($origin); $linkedobject = new $classname($this->db); $result = $linkedobject->fetch($origin_id); - if ($result >= 0) - { + if ($result >= 0) { //$linkedobject->fetchObjectLinked() Get all linked object to the $linkedobject (commonly order) into $linkedobject->linkedObjects $pdf->SetFont('', '', $default_font_size - 2); $text = $linkedobject->ref; - if ($linkedobject->ref_client) $text .= ' ('.$linkedobject->ref_client.')'; + if ($linkedobject->ref_client) { + $text .= ' ('.$linkedobject->ref_client.')'; + } $Yoff = $Yoff + 8; $pdf->SetXY($this->page_largeur - $this->marge_droite - $w, $Yoff); $pdf->MultiCell($w, 2, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), 0, 'R'); @@ -965,25 +966,27 @@ class pdf_espadon extends ModelePdfExpedition } } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of origin element if defined + // Add internal contact of origin element if defined $arrayidcontact = array(); - if (!empty($origin) && is_object($object->$origin)) $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); - if (is_array($arrayidcontact) && count($arrayidcontact) > 0) - { - $object->fetch_user(reset($arrayidcontact)); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (!empty($origin) && is_object($object->$origin)) { + $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); + } + if (is_array($arrayidcontact) && count($arrayidcontact) > 0) { + $object->fetch_user(reset($arrayidcontact)); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1014,8 +1017,7 @@ class pdf_espadon extends ModelePdfExpedition // If SHIPPING contact defined, we use it $usecontact = false; $arrayidcontact = $object->$origin->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1033,10 +1035,14 @@ class pdf_espadon extends ModelePdfExpedition // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1105,22 +1111,22 @@ class pdf_espadon extends ModelePdfExpedition ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -1154,8 +1160,7 @@ class pdf_espadon extends ModelePdfExpedition 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -1236,11 +1241,9 @@ class pdf_espadon extends ModelePdfExpedition ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index bad252bf799..f2434c93d26 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -52,6 +52,11 @@ class pdf_merou extends ModelePdfExpedition */ 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 document type */ @@ -123,6 +128,7 @@ class pdf_merou extends ModelePdfExpedition $this->db = $db; $this->name = "merou"; $this->description = $langs->trans("DocumentModelMerou"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template $this->type = 'pdf'; $formatarray = pdf_getFormat(); @@ -138,7 +144,9 @@ class pdf_merou extends ModelePdfExpedition // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -161,15 +169,18 @@ class pdf_merou extends ModelePdfExpedition $object->fetch_thirdparty(); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); - if ($conf->expedition->dir_output) - { + if ($conf->expedition->dir_output) { $object->fetch_thirdparty(); $origin = $object->origin; @@ -180,16 +191,19 @@ class pdf_merou extends ModelePdfExpedition //Create recipient $idcontact = $object->$origin->getIdContact('external', 'SHIPPING'); $this->destinataire = new Contact($this->db); - if (!empty($idcontact[0])) $this->destinataire->fetch($idcontact[0]); + if (!empty($idcontact[0])) { + $this->destinataire->fetch($idcontact[0]); + } //Create deliverer $idcontact = $object->$origin->getIdContact('internal', 'LIVREUR'); $this->livreur = new User($this->db); - if (!empty($idcontact[0])) $this->livreur->fetch($idcontact[0]); + if (!empty($idcontact[0])) { + $this->livreur->fetch($idcontact[0]); + } // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->expedition->dir_output."/sending"; $file = $dir."/SPECIMEN.pdf"; } else { @@ -198,20 +212,16 @@ class pdf_merou extends ModelePdfExpedition $file = $dir."/".$expref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -227,18 +237,18 @@ class pdf_merou extends ModelePdfExpedition $heightforinfotot = 0; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -247,14 +257,18 @@ class pdf_merou extends ModelePdfExpedition $pagenb = 0; $pdf->SetDrawColor(128, 128, 128); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetSubject($outputlangs->transnoentities("Shipment")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -272,8 +286,7 @@ class pdf_merou extends ModelePdfExpedition $tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter; // Display notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); @@ -300,8 +313,7 @@ class pdf_merou extends ModelePdfExpedition $num = count($object->lines); // Loop on each lines - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetTextColor(0, 0, 0); @@ -321,7 +333,8 @@ class pdf_merou extends ModelePdfExpedition // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 3); @@ -343,8 +356,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0); // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -355,11 +367,9 @@ class pdf_merou extends ModelePdfExpedition $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -369,10 +379,8 @@ class pdf_merou extends ModelePdfExpedition $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. } - if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) - { - if ($pagenb == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -385,8 +393,7 @@ class pdf_merou extends ModelePdfExpedition } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -396,15 +403,16 @@ class pdf_merou extends ModelePdfExpedition // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -412,14 +420,14 @@ class pdf_merou extends ModelePdfExpedition $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -455,8 +463,7 @@ class pdf_merou extends ModelePdfExpedition // Translations $langs->loadLangs(array("main", "bills", "orders")); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY(10, $tab_top); $pdf->MultiCell(10, 5, "LS", 0, 'C', 1); @@ -524,8 +531,7 @@ class pdf_merou extends ModelePdfExpedition pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); //Affiche le filigrane brouillon - Print Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->SENDING_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->SENDING_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SENDING_DRAFT_WATERMARK); } @@ -543,10 +549,8 @@ class pdf_merou extends ModelePdfExpedition //*********************LOGO**************************** $pdf->SetXY(11, 7); $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, 10, 5, 0, $height); // width=0 (auto) } else { @@ -605,8 +609,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->MultiCell(80, 2, $carac_emetteur, 0, 'L'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $Yoff += 3; $posy = $Yoff; $pdf->SetXY($Xoff, $posy); @@ -632,21 +635,17 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetTextColor(0, 0, 0); - if (!empty($object->tracking_number)) - { + if (!empty($object->tracking_number)) { $object->getUrlTrackingStatus($object->tracking_number); - if (!empty($object->tracking_url)) - { - if ($object->shipping_method_id > 0) - { + if (!empty($object->tracking_url)) { + if ($object->shipping_method_id > 0) { // Get code using getLabelFromKey $code = $outputlangs->getLabelFromKey($this->db, $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); $label = ''; $label .= $outputlangs->trans("SendingMethod").": ".$outputlangs->trans("SendingMethod".strtoupper($code)); //var_dump($object->tracking_url != $object->tracking_number);exit; - if ($object->tracking_url != $object->tracking_number) - { + if ($object->tracking_url != $object->tracking_number) { $label .= " : "; $label .= $object->tracking_url; } @@ -671,8 +670,7 @@ class pdf_merou extends ModelePdfExpedition // If SHIPPING contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->$origin->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index f3cffecdd9c..c41fd92f524 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -52,6 +52,11 @@ class pdf_rouget extends ModelePdfExpedition */ 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 document type */ @@ -123,6 +128,7 @@ class pdf_rouget extends ModelePdfExpedition $this->db = $db; $this->name = "rouget"; $this->description = $langs->trans("DocumentModelStandardPDF"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template $this->type = 'pdf'; $formatarray = pdf_getFormat(); @@ -138,7 +144,9 @@ class pdf_rouget extends ModelePdfExpedition // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; @@ -155,7 +163,9 @@ class pdf_rouget extends ModelePdfExpedition $this->posxtotalht = $this->page_largeur - $this->marge_droite - 20; } - if (!empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) $this->posxweightvol = $this->posxqtyordered; + if (!empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) { + $this->posxweightvol = $this->posxqtyordered; + } $this->posxpicture = $this->posxweightvol - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images @@ -193,9 +203,13 @@ class pdf_rouget extends ModelePdfExpedition $object->fetch_thirdparty(); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); @@ -204,18 +218,17 @@ class pdf_rouget extends ModelePdfExpedition // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -228,8 +241,7 @@ class pdf_rouget extends ModelePdfExpedition foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - if ($obj['photo_vignette']) - { + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -242,17 +254,19 @@ class pdf_rouget extends ModelePdfExpedition break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxweightvol; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxweightvol; + } - if ($conf->expedition->dir_output) - { + if ($conf->expedition->dir_output) { // Definition de $dir et $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->expedition->dir_output."/sending"; $file = $dir."/SPECIMEN.pdf"; } else { @@ -261,20 +275,16 @@ class pdf_rouget extends ModelePdfExpedition $file = $dir."/".$expref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -291,18 +301,18 @@ class pdf_rouget extends ModelePdfExpedition $heightforinfotot = 8; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -311,20 +321,26 @@ class pdf_rouget extends ModelePdfExpedition $pagenb = 0; $pdf->SetDrawColor(128, 128, 128); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetSubject($outputlangs->transnoentities("Shipment")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Shipment")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -338,11 +354,9 @@ class pdf_rouget extends ModelePdfExpedition // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -359,8 +373,7 @@ class pdf_rouget extends ModelePdfExpedition } } - if (!empty($object->note_public) || !empty($object->tracking_number)) - { + if (!empty($object->note_public) || !empty($object->tracking_number)) { $tab_top = 88 + $height_incoterms; $tab_top_alt = $tab_top; @@ -369,24 +382,22 @@ class pdf_rouget extends ModelePdfExpedition //$tab_top_alt += 1; // Tracking number - if (!empty($object->tracking_number)) - { + if (!empty($object->tracking_number)) { $pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L'); $tab_top_alt = $pdf->GetY(); $object->getUrlTrackingStatus($object->tracking_number); - if (!empty($object->tracking_url)) - { - if ($object->shipping_method_id > 0) - { + if (!empty($object->tracking_url)) { + if ($object->shipping_method_id > 0) { // Get code using getLabelFromKey $code = $outputlangs->getLabelFromKey($this->db, $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); $label = ''; - if ($object->tracking_url != $object->tracking_number) $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + if ($object->tracking_url != $object->tracking_number) { + $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + } $label .= $outputlangs->trans("SendingMethod").": ".$outputlangs->trans("SendingMethod".strtoupper($code)); //var_dump($object->tracking_url != $object->tracking_number);exit; - if ($object->tracking_url != $object->tracking_number) - { + if ($object->tracking_url != $object->tracking_number) { $label .= " : "; $label .= $object->tracking_url; } @@ -399,8 +410,7 @@ class pdf_rouget extends ModelePdfExpedition } // Notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); // Dans boucle pour gerer multi-page $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top_alt, dol_htmlentitiesbr($object->note_public), 0, 1); } @@ -423,15 +433,16 @@ class pdf_rouget extends ModelePdfExpedition $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -442,23 +453,27 @@ class pdf_rouget extends ModelePdfExpedition $posYAfterDescription = 0; // 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (isset($imglinesize['width']) && isset($imglinesize['height'])) - { + if (isset($imglinesize['width']) && isset($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxweightvol - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -472,8 +487,7 @@ class pdf_rouget extends ModelePdfExpedition pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxpicture - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -483,22 +497,26 @@ class pdf_rouget extends ModelePdfExpedition $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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -515,48 +533,44 @@ class pdf_rouget extends ModelePdfExpedition // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetXY($this->posxweightvol, $curY); $weighttxt = ''; - if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->weight) - { + if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->weight) { $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1); } $voltxt = ''; - if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) - { + if (empty($object->lines[$i]->fk_product_type) && $object->lines[$i]->volume) { $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1); } - if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) { $pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt) ? '
    ' : '').$voltxt, 0, 0, false, true, 'C'); //$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'
    ':'').$voltxt,'','C'); } - if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { $pdf->SetXY($this->posxqtyordered, $curY); $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C'); } - if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) { $pdf->SetXY($this->posxqtytoship, $curY); $pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 3, $object->lines[$i]->qty_shipped, '', 'C'); } - if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) - { + if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) { $pdf->SetXY($this->posxpuht, $curY); $pdf->MultiCell(($this->posxtotalht - $this->posxpuht - 1), 3, price($object->lines[$i]->subprice, 0, $outputlangs), '', 'R'); @@ -565,11 +579,12 @@ class pdf_rouget extends ModelePdfExpedition } $nexY += 3; - if ($weighttxt && $voltxt) $nexY += 2; + if ($weighttxt && $voltxt) { + $nexY += 2; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -578,11 +593,9 @@ class pdf_rouget extends ModelePdfExpedition } // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -591,12 +604,12 @@ class pdf_rouget extends ModelePdfExpedition $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -604,15 +617,18 @@ class pdf_rouget extends ModelePdfExpedition $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -625,7 +641,9 @@ class pdf_rouget extends ModelePdfExpedition // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -636,14 +654,14 @@ class pdf_rouget extends ModelePdfExpedition $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) - { + 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); @@ -684,13 +702,17 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetFont('', 'B', $default_font_size - 1); // Tableau total - $col1x = $this->posxweightvol - 50; $col2x = $this->posxweightvol; + $col1x = $this->posxweightvol - 50; + $col2x = $this->posxweightvol; /*if ($this->page_largeur < 210) // To work with US executive format { $col2x-=20; }*/ - if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) $largcol2 = ($this->posxqtyordered - $this->posxweightvol); - else $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { + $largcol2 = ($this->posxqtyordered - $this->posxweightvol); + } else { + $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + } $useborder = 0; $index = 0; @@ -705,35 +727,39 @@ class pdf_rouget extends ModelePdfExpedition $totalOrdered = $tmparray['ordered']; $totalToShip = $tmparray['toship']; // Set trueVolume and volume_units not currently stored into database - if ($object->trueWidth && $object->trueHeight && $object->trueDepth) - { + if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { $object->trueVolume = price(($object->trueWidth * $object->trueHeight * $object->trueDepth), 0, $outputlangs, 0, 0); $object->volume_units = $object->size_units * 3; } - if ($totalWeight != '') $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); - if ($totalVolume != '') $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); - if (!empty($object->trueWeight)) $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); - if (!empty($object->trueVolume)) $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + if ($totalWeight != '') { + $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); + } + if ($totalVolume != '') { + $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); + } + if (!empty($object->trueWeight)) { + $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); + } + if (!empty($object->trueVolume)) { + $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + } $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Total"), 0, 'L', 1); - if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { $pdf->SetXY($this->posxqtyordered, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxqtytoship - $this->posxqtyordered, $tab2_hl, $totalOrdered, 0, 'C', 1); } - if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) { $pdf->SetXY($this->posxqtytoship, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxpuht - $this->posxqtytoship, $tab2_hl, $totalToShip, 0, 'C', 1); } - if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) - { + if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) { $pdf->SetXY($this->posxpuht, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxtotalht - $this->posxpuht, $tab2_hl, '', 0, 'C', 1); @@ -741,24 +767,23 @@ class pdf_rouget extends ModelePdfExpedition $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1); } - if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) { // Total Weight - if ($totalWeighttoshow) - { + if ($totalWeighttoshow) { $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalWeighttoshow, 0, 'C', 1); $index++; } - if ($totalVolumetoshow) - { + if ($totalVolumetoshow) { $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalVolumetoshow, 0, 'C', 1); $index++; } - if (!$totalWeighttoshow && !$totalVolumetoshow) $index++; + if (!$totalWeighttoshow && !$totalVolumetoshow) { + $index++; + } } $pdf->SetTextColor(0, 0, 0); @@ -785,7 +810,9 @@ class pdf_rouget extends ModelePdfExpedition // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -799,39 +826,32 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell($this->posxqtyordered - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L'); } - if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME)) { $pdf->line($this->posxweightvol - 1, $tab_top, $this->posxweightvol - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxweightvol - 1, $tab_top + 1); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 2, $outputlangs->transnoentities("WeightVolShort"), '', 'C'); } } - if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) { $pdf->line($this->posxqtyordered - 1, $tab_top, $this->posxqtyordered - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqtyordered - 1, $tab_top + 1); $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 2, $outputlangs->transnoentities("QtyOrdered"), '', 'C'); } } - if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) - { + if (empty($conf->global->SHIPPING_PDF_HIDE_QTYTOSHIP)) { $pdf->line($this->posxqtytoship - 1, $tab_top, $this->posxqtytoship - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqtytoship, $tab_top + 1); $pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToShip"), '', 'C'); } @@ -839,15 +859,13 @@ class pdf_rouget extends ModelePdfExpedition if (!empty($conf->global->SHIPPING_PDF_DISPLAY_AMOUNT_HT)) { $pdf->line($this->posxpuht - 1, $tab_top, $this->posxpuht - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxpuht - 1, $tab_top + 1); $pdf->MultiCell(($this->posxtotalht - $this->posxpuht), 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxtotalht - 1, $tab_top, $this->posxtotalht - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtotalht - 1, $tab_top + 1); $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -875,8 +893,7 @@ class pdf_rouget extends ModelePdfExpedition pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->SHIPPING_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK); } @@ -893,10 +910,8 @@ class pdf_rouget extends ModelePdfExpedition // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -911,23 +926,20 @@ class pdf_rouget extends ModelePdfExpedition } // Show barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -952,16 +964,14 @@ class pdf_rouget extends ModelePdfExpedition $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); // Date planned delivery - if (!empty($object->date_delivery)) - { + if (!empty($object->date_delivery)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R'); } - if (!empty($object->thirdparty->code_client)) - { + if (!empty($object->thirdparty->code_client)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -977,20 +987,20 @@ class pdf_rouget extends ModelePdfExpedition $origin_id = $object->origin_id; // TODO move to external function - if (!empty($conf->$origin->enabled)) // commonly $origin='commande' - { + if (!empty($conf->$origin->enabled)) { // commonly $origin='commande' $outputlangs->load('orders'); $classname = ucfirst($origin); $linkedobject = new $classname($this->db); $result = $linkedobject->fetch($origin_id); - if ($result >= 0) - { + if ($result >= 0) { //$linkedobject->fetchObjectLinked() Get all linked object to the $linkedobject (commonly order) into $linkedobject->linkedObjects $pdf->SetFont('', '', $default_font_size - 2); $text = $linkedobject->ref; - if ($linkedobject->ref_client) $text .= ' ('.$linkedobject->ref_client.')'; + if ($linkedobject->ref_client) { + $text .= ' ('.$linkedobject->ref_client.')'; + } $Yoff = $Yoff + 8; $pdf->SetXY($this->page_largeur - $this->marge_droite - $w, $Yoff); $pdf->MultiCell($w, 2, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), 0, 'R'); @@ -1000,25 +1010,27 @@ class pdf_rouget extends ModelePdfExpedition } } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of origin element if defined + // Add internal contact of origin element if defined $arrayidcontact = array(); - if (!empty($origin) && is_object($object->$origin)) $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user(reset($arrayidcontact)); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (!empty($origin) && is_object($object->$origin)) { + $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); + } + if (count($arrayidcontact) > 0) { + $object->fetch_user(reset($arrayidcontact)); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1049,8 +1061,7 @@ class pdf_rouget extends ModelePdfExpedition // If SHIPPING contact defined, we use it $usecontact = false; $arrayidcontact = $object->$origin->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1068,10 +1079,14 @@ class pdf_rouget extends ModelePdfExpedition // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/expedition/index.html b/htdocs/core/modules/expedition/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 6e13e4e3186..0303dfde3dc 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -96,18 +96,17 @@ class mod_expedition_ribera extends ModelNumRefExpedition */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -128,8 +127,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition $mask = $conf->global->EXPEDITION_RIBERA_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 0edd59642c0..aa1628e7482 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -62,7 +62,7 @@ class mod_expedition_safor extends ModelNumRefExpedition public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -86,7 +86,8 @@ class mod_expedition_safor extends ModelNumRefExpedition { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -95,13 +96,14 @@ class mod_expedition_safor extends ModelNumRefExpedition $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -128,11 +130,13 @@ class mod_expedition_safor extends ModelNumRefExpedition $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_expedition_safor::getNextValue", LOG_DEBUG); return -1; @@ -141,8 +145,11 @@ class mod_expedition_safor extends ModelNumRefExpedition $date = time(); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_expedition_safor::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index 4305f8336e7..ce210d6a958 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -142,10 +142,18 @@ abstract class ModelNumRefExpedition global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 176b09264d4..d1f959f5460 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -59,6 +59,11 @@ class pdf_standard extends ModeleExpenseReport */ 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 document type */ @@ -133,6 +138,7 @@ class pdf_standard extends ModeleExpenseReport $this->db = $db; $this->name = ""; $this->description = $langs->trans('PDFStandardExpenseReports'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -159,7 +165,9 @@ class pdf_standard extends ModeleExpenseReport // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxpiece = $this->marge_gauche + 1; @@ -177,8 +185,7 @@ class pdf_standard extends ModeleExpenseReport // $this->posxqty-=20; // $this->postotalttc-=20; // } - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxdate -= 20; $this->posxtype -= 20; $this->posxprojet -= 20; @@ -212,9 +219,13 @@ class pdf_standard extends ModeleExpenseReport // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks")); @@ -232,20 +243,16 @@ class pdf_standard extends ModeleExpenseReport $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -260,19 +267,19 @@ class pdf_standard extends ModeleExpenseReport $heightforinfotot = 40; // Height reserved to output the info and total 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 + 12; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -286,13 +293,17 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Trips")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -306,19 +317,18 @@ class pdf_standard extends ModeleExpenseReport // Show notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -402,16 +412,22 @@ class pdf_standard extends ModeleExpenseReport 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -444,12 +460,10 @@ class pdf_standard extends ModeleExpenseReport $nexY += ($pdf->getFontSize() * 1.3); // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -458,12 +472,12 @@ class pdf_standard extends ModeleExpenseReport $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -471,9 +485,13 @@ class pdf_standard extends ModeleExpenseReport $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } @@ -497,8 +515,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->MultiCell($this->page_largeur - $this->marge_gauche - 180, 5, price($object->total_ht), 1, 'R'); $pdf->SetFillColor(248, 248, 248); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { // TODO Show vat amout per tax level $posy += 5; $pdf->SetXY(130, $posy); @@ -524,7 +541,9 @@ class pdf_standard extends ModeleExpenseReport // Page footer $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -535,14 +554,14 @@ class pdf_standard extends ModeleExpenseReport $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) - { + 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); @@ -670,7 +689,7 @@ class pdf_standard extends ModeleExpenseReport // Draft watermark if ($object->fk_statut == 0 && !empty($conf->global->EXPENSEREPORT_DRAFT_WATERMARK)) { - pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->EXPENSEREPORT_DRAFT_WATERMARK); + pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->EXPENSEREPORT_DRAFT_WATERMARK); } $pdf->SetTextColor(0, 0, 60); @@ -700,35 +719,35 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetFont('', 'B', $default_font_size + 4); $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); + $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 6, $langs->trans("ExpenseReport"), 0, 'R'); $pdf->SetFont('', '', $default_font_size - 1); - // Ref complete - $posy += 8; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("Ref")." : ".$object->ref, '', 'R'); + // Ref complete + $posy += 8; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("Ref")." : ".$object->ref, '', 'R'); - // Date start period - $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("DateStart")." : ".($object->date_debut > 0 ?dol_print_date($object->date_debut, "day", false, $outputlangs) : ''), '', 'R'); + // Date start period + $posy += 5; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("DateStart")." : ".($object->date_debut > 0 ?dol_print_date($object->date_debut, "day", false, $outputlangs) : ''), '', 'R'); - // Date end period - $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("DateEnd")." : ".($object->date_fin > 0 ?dol_print_date($object->date_fin, "day", false, $outputlangs) : ''), '', 'R'); + // Date end period + $posy += 5; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities("DateEnd")." : ".($object->date_fin > 0 ?dol_print_date($object->date_fin, "day", false, $outputlangs) : ''), '', 'R'); - // Status Expense Report - $posy += 6; - $pdf->SetXY($posx, $posy); - $pdf->SetFont('', 'B', $default_font_size + 2); - $pdf->SetTextColor(111, 81, 124); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R'); + // Status Expense Report + $posy += 6; + $pdf->SetXY($posx, $posy); + $pdf->SetFont('', 'B', $default_font_size + 2); + $pdf->SetTextColor(111, 81, 124); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R'); if ($showaddress) { // Sender properties @@ -736,10 +755,18 @@ class pdf_standard extends ModeleExpenseReport $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->convToOutputCharset($this->emetteur->zip).' '.$outputlangs->convToOutputCharset($this->emetteur->town); $carac_emetteur .= "\n"; - if ($this->emetteur->phone) $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Phone")." : ".$outputlangs->convToOutputCharset($this->emetteur->phone); - if ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? ($this->emetteur->tel ? " - " : "\n") : '').$outputlangs->transnoentities("Fax")." : ".$outputlangs->convToOutputCharset($this->emetteur->fax); - if ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Email")." : ".$outputlangs->convToOutputCharset($this->emetteur->email); - if ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Web")." : ".$outputlangs->convToOutputCharset($this->emetteur->url); + if ($this->emetteur->phone) { + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Phone")." : ".$outputlangs->convToOutputCharset($this->emetteur->phone); + } + if ($this->emetteur->fax) { + $carac_emetteur .= ($carac_emetteur ? ($this->emetteur->tel ? " - " : "\n") : '').$outputlangs->transnoentities("Fax")." : ".$outputlangs->convToOutputCharset($this->emetteur->fax); + } + if ($this->emetteur->email) { + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Email")." : ".$outputlangs->convToOutputCharset($this->emetteur->email); + } + if ($this->emetteur->url) { + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Web")." : ".$outputlangs->convToOutputCharset($this->emetteur->url); + } // Receiver Properties $receiver = new User($this->db); @@ -750,14 +777,20 @@ class pdf_standard extends ModeleExpenseReport $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->convToOutputCharset($receiver->address); $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->convToOutputCharset($receiver->zip).' '.$outputlangs->convToOutputCharset($receiver->town); $expense_receiver .= "\n"; - if ($receiver->email) $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->transnoentities("Email")." : ".$outputlangs->convToOutputCharset($receiver->email); - if ($receiver_account->iban) $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->transnoentities("IBAN")." : ".$outputlangs->convToOutputCharset($receiver_account->iban); + if ($receiver->email) { + $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->transnoentities("Email")." : ".$outputlangs->convToOutputCharset($receiver->email); + } + if ($receiver_account->iban) { + $expense_receiver .= ($expense_receiver ? "\n" : '').$outputlangs->transnoentities("IBAN")." : ".$outputlangs->convToOutputCharset($receiver_account->iban); + } // Show sender $posy = 50; $posx = $this->marge_gauche; $hautcadre = 40; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = 118; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = 118; + } // Show sender frame $pdf->SetTextColor(0, 0, 0); @@ -789,7 +822,9 @@ class pdf_standard extends ModeleExpenseReport // Show recipient $posy = 50; $posx = 100; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -814,7 +849,8 @@ class pdf_standard extends ModeleExpenseReport if ($object->fk_statut == 99) { if ($object->fk_user_refuse > 0) { $userfee = new User($this->db); - $userfee->fetch($object->fk_user_refuse); $posy += 6; + $userfee->fetch($object->fk_user_refuse); + $posy += 6; $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell(96, 4, $outputlangs->transnoentities("REFUSEUR")." : ".dolGetFirstLastname($userfee->firstname, $userfee->lastname), 0, 'L'); $posy += 5; @@ -827,7 +863,8 @@ class pdf_standard extends ModeleExpenseReport } elseif ($object->fk_statut == 4) { if ($object->fk_user_cancel > 0) { $userfee = new User($this->db); - $userfee->fetch($object->fk_user_cancel); $posy += 6; + $userfee->fetch($object->fk_user_cancel); + $posy += 6; $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell(96, 4, $outputlangs->transnoentities("CANCEL_USER")." : ".dolGetFirstLastname($userfee->firstname, $userfee->lastname), 0, 'L'); $posy += 5; @@ -840,7 +877,8 @@ class pdf_standard extends ModeleExpenseReport } else { if ($object->fk_user_approve > 0) { $userfee = new User($this->db); - $userfee->fetch($object->fk_user_approve); $posy += 6; + $userfee->fetch($object->fk_user_approve); + $posy += 6; $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell(96, 4, $outputlangs->transnoentities("VALIDOR")." : ".dolGetFirstLastname($userfee->firstname, $userfee->lastname), 0, 'L'); $posy += 5; @@ -852,7 +890,8 @@ class pdf_standard extends ModeleExpenseReport if ($object->fk_statut == 6) { if ($object->fk_user_paid > 0) { $userfee = new User($this->db); - $userfee->fetch($object->fk_user_paid); $posy += 6; + $userfee->fetch($object->fk_user_paid); + $posy += 6; $pdf->SetXY($posx + 2, $posy); $pdf->MultiCell(96, 4, $outputlangs->transnoentities("AUTHORPAIEMENT")." : ".dolGetFirstLastname($userfee->firstname, $userfee->lastname), 0, 'L'); $posy += 5; @@ -883,7 +922,9 @@ class pdf_standard extends ModeleExpenseReport // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1037,8 +1078,7 @@ class pdf_standard extends ModeleExpenseReport $sql .= " ORDER BY dp"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $totalpaid = 0; $i = 0; @@ -1063,8 +1103,7 @@ class pdf_standard extends ModeleExpenseReport $totalpaid += $row->amount; $i++; } - if ($num > 0 && $object->paid == 0) - { + if ($num > 0 && $object->paid == 0) { $y += $tab3_height; $pdf->SetXY($tab3_posx + 17, $tab3_top + $y); diff --git a/htdocs/core/modules/expensereport/index.html b/htdocs/core/modules/expensereport/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index e6e60741628..b25ac15345b 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -87,7 +87,8 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -96,13 +97,14 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -122,11 +124,9 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport global $db, $conf; // For backward compatibility and restore old behavior to get ref of expense report - if (!empty($conf->global->EXPENSEREPORT_USE_OLD_NUMBERING_RULE)) - { + if (!empty($conf->global->EXPENSEREPORT_USE_OLD_NUMBERING_RULE)) { $fuser = null; - if ($object->fk_user_author > 0) - { + if ($object->fk_user_author > 0) { $fuser = new User($db); $fuser->fetch($object->fk_user_author); } @@ -158,13 +158,14 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport $user_author_infos = dolGetFirstLastname($fuser->firstname, $fuser->lastname); $prefix = "ER"; - if (!empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix = $conf->global->EXPENSE_REPORT_PREFIX; + if (!empty($conf->global->EXPENSE_REPORT_PREFIX)) { + $prefix = $conf->global->EXPENSE_REPORT_PREFIX; + } $newref = str_replace(' ', '_', $user_author_infos).$expld_car.$prefix.$newref.$expld_car.dol_print_date($object->date_debut, '%y%m%d'); - $sqlbis = 'UPDATE '.MAIN_DB_PREFIX.'expensereport SET ref_number_int = '.$ref_number_int.' WHERE rowid = '.$object->id; + $sqlbis = 'UPDATE '.MAIN_DB_PREFIX.'expensereport SET ref_number_int = '.((int) $ref_number_int).' WHERE rowid = '.((int) $object->id); $resqlbis = $db->query($sqlbis); - if (!$resqlbis) - { + if (!$resqlbis) { dol_print_error($resqlbis); exit; } @@ -181,27 +182,31 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_expensereport_jade::getNextValue", LOG_DEBUG); return 0; } $date = $object->date_valid; // $object->date does not exists - if (empty($date)) - { + if (empty($date)) { $this->error = 'Date valid not defined'; return 0; } $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_expensereport_jade::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 4899383a97b..195667692f1 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -101,16 +101,15 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport */ public function getExample() { - global $db, $conf, $langs, $user; + global $db, $conf, $langs, $user; - $exp = new ExpenseReport($db); - $exp->initAsSpecimen(); - $exp->fk_user_author = $user->id; + $exp = new ExpenseReport($db); + $exp->initAsSpecimen(); + $exp->fk_user_author = $user->id; - $numExample = $this->getNextValue($exp); + $numExample = $this->getNextValue($exp); - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -131,22 +130,19 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport // We get cursor rule $mask = $conf->global->EXPENSEREPORT_SAND_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } $date = $object->date_valid; // $object->date does not exists - if (empty($date)) - { + if (empty($date)) { $this->error = 'Date valid not defined'; return 0; } $fuser = null; - if ($object->fk_user_author > 0) - { + if ($object->fk_user_author > 0) { $fuser = new User($db); $fuser->fetch($object->fk_user_author); } diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 12a6617cf72..c4d74d7b6d2 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -148,10 +148,16 @@ abstract class ModeleNumRefExpenseReport global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 364f8562eb2..2d15f3999d0 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -69,7 +69,9 @@ class ExportCsv extends ModeleExports $this->db = $db; $this->separator = ','; - if (!empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE)) $this->separator = $conf->global->EXPORT_CSV_SEPARATOR_TO_USE; + if (!empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE)) { + $this->separator = $conf->global->EXPORT_CSV_SEPARATOR_TO_USE; + } $this->escape = '"'; $this->enclosure = '"'; @@ -175,8 +177,7 @@ class ExportCsv extends ModeleExports $outputlangs->load("exports"); $this->handle = fopen($file, "wt"); - if (!$this->handle) - { + if (!$this->handle) { $langs->load("errors"); $this->error = $langs->trans("ErrorFailToCreateFile", $file); $ret = -1; @@ -214,15 +215,13 @@ class ExportCsv extends ModeleExports // phpcs:enable global $conf; - if (!empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) - { + if (!empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) { $outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET; } else { $outputlangs->charset_output = 'ISO-8859-1'; } - foreach ($array_selected_sorted as $code => $value) - { + foreach ($array_selected_sorted as $code => $value) { $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded $newvalue = $this->csvClean($newvalue, $outputlangs->charset_output); @@ -248,8 +247,7 @@ class ExportCsv extends ModeleExports // phpcs:enable global $conf; - if (!empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) - { + if (!empty($conf->global->EXPORT_CSV_FORCE_CHARSET)) { $outputlangs->charset_output = $conf->global->EXPORT_CSV_FORCE_CHARSET; } else { $outputlangs->charset_output = 'ISO-8859-1'; @@ -259,22 +257,27 @@ class ExportCsv extends ModeleExports $reg = array(); - foreach ($array_selected_sorted as $code => $value) - { - if (strpos($code, ' as ') == 0) $alias = str_replace(array('.', '-', '(', ')'), '_', $code); - else $alias = substr($code, strpos($code, ' as ') + 4); - if (empty($alias)) dol_print_error('', 'Bad value for field with key='.$code.'. Try to redefine export.'); + foreach ($array_selected_sorted as $code => $value) { + if (strpos($code, ' as ') == 0) { + $alias = str_replace(array('.', '-', '(', ')'), '_', $code); + } else { + $alias = substr($code, strpos($code, ' as ') + 4); + } + if (empty($alias)) { + dol_print_error('', 'Bad value for field with key='.$code.'. Try to redefine export.'); + } $newvalue = $outputlangs->convToOutputCharset($objp->$alias); // objp->$alias must be utf8 encoded as any var in memory // newvalue is now $outputlangs->charset_output encoded $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; // Translation newvalue - if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) $newvalue = $outputlangs->transnoentities($reg[1]); + if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) { + $newvalue = $outputlangs->transnoentities($reg[1]); + } $newvalue = $this->csvClean($newvalue, $outputlangs->charset_output); - if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) - { + if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) { $array = unserialize($typefield); $array = $array['options']; $newvalue = $array[$newvalue]; @@ -330,32 +333,29 @@ class ExportCsv extends ModeleExports $addquote = 0; // Rule Dolibarr: No HTML - //print $charset.' '.$newvalue."\n"; - //$newvalue=dol_string_nohtmltag($newvalue,0,$charset); - $newvalue = dol_htmlcleanlastbr($newvalue); - //print $charset.' '.$newvalue."\n"; + //print $charset.' '.$newvalue."\n"; + //$newvalue=dol_string_nohtmltag($newvalue,0,$charset); + $newvalue = dol_htmlcleanlastbr($newvalue); + //print $charset.' '.$newvalue."\n"; // Rule 1 CSV: No CR, LF in cells (except if USE_STRICT_CSV_RULES is on, we can keep record as it is but we must add quotes) $oldvalue = $newvalue; $newvalue = str_replace("\r", '', $newvalue); $newvalue = str_replace("\n", '\n', $newvalue); - if (!empty($conf->global->USE_STRICT_CSV_RULES) && $oldvalue != $newvalue) - { + if (!empty($conf->global->USE_STRICT_CSV_RULES) && $oldvalue != $newvalue) { // If strict use of CSV rules, we just add quote $newvalue = $oldvalue; $addquote = 1; } // Rule 2 CSV: If value contains ", we must escape with ", and add " - if (preg_match('/"/', $newvalue)) - { + if (preg_match('/"/', $newvalue)) { $addquote = 1; $newvalue = str_replace('"', '""', $newvalue); } // Rule 3 CSV: If value contains separator, we must add " - if (preg_match('/'.$this->separator.'/', $newvalue)) - { + if (preg_match('/'.$this->separator.'/', $newvalue)) { $addquote = 1; } diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index b93a0a0c8de..370fc49df7e 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -89,8 +89,7 @@ class ExportExcel2007 extends ModeleExports $this->disabled = 0; - if (empty($this->disabled)) - { + if (empty($this->disabled)) { require_once PHPEXCELNEW_PATH.'Spreadsheet.php'; $this->label_lib = 'PhpSpreadSheet'; $this->version_lib = '1.6.0'; // No way to get info from library @@ -183,8 +182,7 @@ class ExportExcel2007 extends ModeleExports // phpcs:enable global $user, $conf, $langs; - if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) - { + if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { $outputlangs->charset_output = 'ISO-8859-1'; // Because Excel 5 format is ISO } @@ -195,14 +193,12 @@ class ExportExcel2007 extends ModeleExports $outputlangs->load("exports"); - require_once DOL_DOCUMENT_ROOT.'/includes/phpoffice/autoloader.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/phpoffice/phpspreadsheet/src/autoloader.php'; require_once DOL_DOCUMENT_ROOT.'/includes/Psr/autoloader.php'; require_once PHPEXCELNEW_PATH.'Spreadsheet.php'; - if ($this->id == 'excel2007') - { - if (!class_exists('ZipArchive')) // For Excel2007, PHPSpreadSheet may need ZipArchive - { + if ($this->id == 'excel2007') { + if (!class_exists('ZipArchive')) { // For Excel2007, PHPSpreadSheet may need ZipArchive $langs->load("errors"); $this->error = $langs->trans('ErrorPHPNeedModule', 'zip'); return -1; @@ -262,18 +258,17 @@ class ExportExcel2007 extends ModeleExports if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { $this->col = 0; } - foreach ($array_selected_sorted as $code => $value) - { + foreach ($array_selected_sorted as $code => $value) { $alias = $array_export_fields_label[$code]; //print "dd".$alias; - if (empty($alias)) dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); - if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) - { + if (empty($alias)) { + dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); + } + if (!empty($conf->global->MAIN_USE_PHP_WRITEEXCEL)) { $this->worksheet->write($this->row, $this->col, $outputlangs->transnoentities($alias), $formatheader); } else { $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, $outputlangs->transnoentities($alias)); - if (!empty($array_types[$code]) && in_array($array_types[$code], array('Date', 'Numeric', 'TextAuto'))) // Set autowidth for some types - { + if (!empty($array_types[$code]) && in_array($array_types[$code], array('Date', 'Numeric', 'TextAuto'))) { // Set autowidth for some types $this->workbook->getActiveSheet()->getColumnDimension($this->column2Letter($this->col + 1))->setAutoSize(true); } } @@ -306,46 +301,45 @@ class ExportExcel2007 extends ModeleExports $reg = array(); - foreach ($array_selected_sorted as $code => $value) - { - if (strpos($code, ' as ') == 0) $alias = str_replace(array('.', '-', '(', ')'), '_', $code); - else $alias = substr($code, strpos($code, ' as ') + 4); - if (empty($alias)) dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); + foreach ($array_selected_sorted as $code => $value) { + if (strpos($code, ' as ') == 0) { + $alias = str_replace(array('.', '-', '(', ')'), '_', $code); + } else { + $alias = substr($code, strpos($code, ' as ') + 4); + } + if (empty($alias)) { + dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); + } $newvalue = $objp->$alias; $newvalue = $this->excel_clean($newvalue); $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; - if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) - { + if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) { $array = unserialize($typefield); $array = $array['options']; $newvalue = $array[$newvalue]; } // Traduction newvalue - if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) - { + if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) { $newvalue = $outputlangs->transnoentities($reg[1]); } else { $newvalue = $outputlangs->convToOutputCharset($newvalue); } - if (preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/i', $newvalue)) - { + if (preg_match('/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/i', $newvalue)) { $newvalue = dol_stringtotime($newvalue); $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($newvalue)); $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('yyyy-mm-dd'); - } elseif (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', $newvalue)) - { + } elseif (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', $newvalue)) { $newvalue = dol_stringtotime($newvalue); $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel($newvalue)); $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('yyyy-mm-dd h:mm:ss'); } else { - if ($typefield == 'Text' || $typefield == 'TextAuto') - { + if ($typefield == 'Text' || $typefield == 'TextAuto') { $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row + 1, (string) $newvalue); $coord = $this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row + 1)->getCoordinate(); $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@'); @@ -422,7 +416,9 @@ class ExportExcel2007 extends ModeleExports { $c = intval($c); - if ($c <= 0) return ''; + if ($c <= 0) { + return ''; + } while ($c != 0) { $p = ($c - 1) % 26; @@ -449,11 +445,13 @@ class ExportExcel2007 extends ModeleExports if (!empty($endCell)) { $cellRange = $startCell.':'.$endCell; $this->workbook->getActiveSheet()->mergeCells($startCell.':'.$endCell); + } else { + $cellRange = $startCell; } - else $cellRange = $startCell; - if (!empty($this->styleArray)) $this->workbook->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styleArray); - } - catch (Exception $e) { + if (!empty($this->styleArray)) { + $this->workbook->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styleArray); + } + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -532,11 +530,15 @@ class ExportExcel2007 extends ModeleExports $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); $startRow = $startCell->getRow(); foreach ($TDatas as $column => $TRows) { - if ($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + if ($boldTitle) { + $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + } $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); $this->setCellValue($column, $cell->getCoordinate()); $rowPos = $startRow; - if ($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + if ($boldTitle) { + $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + } foreach ($TRows as $row) { $rowPos++; $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $rowPos); @@ -545,8 +547,7 @@ class ExportExcel2007 extends ModeleExports $startColumn++; } } - } - catch (Exception $e) { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -570,16 +571,19 @@ class ExportExcel2007 extends ModeleExports $startRow = $startCell->getRow(); foreach ($TDatas as $title => $val) { $cell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); - if ($boldTitle) $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + if ($boldTitle) { + $this->setFontStyle(true, $this->styleArray['font']['color']['argb']); + } $this->setCellValue($title, $cell->getCoordinate()); - if ($boldTitle) $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + if ($boldTitle) { + $this->setFontStyle(false, $this->styleArray['font']['color']['argb']); + } $cell2 = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn + 1, $startRow); $this->setCellValue($val, $cell2->getCoordinate()); $startRow++; } } - } - catch (Exception $e) { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -615,7 +619,9 @@ class ExportExcel2007 extends ModeleExports try { $startCell = $this->workbook->getActiveSheet()->getCell($startCell); $startColumn = Coordinate::columnIndexFromString($startCell->getColumn()); - if (!empty($offset)) $startColumn += $offset; + if (!empty($offset)) { + $startColumn += $offset; + } $startRow = $startCell->getRow(); $startCell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn, $startRow); @@ -625,8 +631,7 @@ class ExportExcel2007 extends ModeleExports $endCell = $this->workbook->getActiveSheet()->getCellByColumnAndRow($startColumn + ($length - 1), $startRow); $endCoordinate = $endCell->getCoordinate(); $this->workbook->getActiveSheet()->mergeCells($startCoordinate.':'.$endCoordinate); - } - catch (Exception $e) { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index 90e478458f7..c93787a762c 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -169,8 +169,7 @@ class ExportTsv extends ModeleExports $outputlangs->load("exports"); $this->handle = fopen($file, "wt"); - if (!$this->handle) - { + if (!$this->handle) { $langs->load("errors"); $this->error = $langs->trans("ErrorFailToCreateFile", $file); $ret = -1; @@ -206,8 +205,7 @@ class ExportTsv extends ModeleExports public function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) { // phpcs:enable - foreach ($array_selected_sorted as $code => $value) - { + foreach ($array_selected_sorted as $code => $value) { $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded $newvalue = $this->tsv_clean($newvalue, $outputlangs->charset_output); @@ -234,22 +232,27 @@ class ExportTsv extends ModeleExports global $conf; $this->col = 0; - foreach ($array_selected_sorted as $code => $value) - { - if (strpos($code, ' as ') == 0) $alias = str_replace(array('.', '-', '(', ')'), '_', $code); - else $alias = substr($code, strpos($code, ' as ') + 4); - if (empty($alias)) dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); + foreach ($array_selected_sorted as $code => $value) { + if (strpos($code, ' as ') == 0) { + $alias = str_replace(array('.', '-', '(', ')'), '_', $code); + } else { + $alias = substr($code, strpos($code, ' as ') + 4); + } + if (empty($alias)) { + dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.'); + } $newvalue = $outputlangs->convToOutputCharset($objp->$alias); // objp->$alias must be utf8 encoded as any var in memory // newvalue is now $outputlangs->charset_output encoded $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; // Translation newvalue - if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) $newvalue = $outputlangs->transnoentities($reg[1]); + if (preg_match('/^\((.*)\)$/i', $newvalue, $reg)) { + $newvalue = $outputlangs->transnoentities($reg[1]); + } $newvalue = $this->tsv_clean($newvalue, $outputlangs->charset_output); - if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) - { + if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7)) { $array = unserialize($typefield); $array = $array['options']; $newvalue = $array[$newvalue]; diff --git a/htdocs/core/modules/export/index.html b/htdocs/core/modules/export/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php index 2f345556bdf..685a4bda430 100644 --- a/htdocs/core/modules/export/modules_export.php +++ b/htdocs/core/modules/export/modules_export.php @@ -62,12 +62,9 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac // Recherche des fichiers drivers exports disponibles $i = 0; - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) { $moduleid = $reg[1]; // Loading Class @@ -75,8 +72,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac $classname = "Export".ucfirst($moduleid); require_once $file; - if (class_exists($classname)) - { + if (class_exists($classname)) { $module = new $classname($db); // Picto diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 792587f6205..eb48373a443 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -98,7 +98,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + } } @@ -129,17 +131,20 @@ class doc_generic_invoice_odt extends ModelePDFFactures $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->FACTURE_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -158,22 +163,20 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->FACTURE_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->FACTURE_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); //$texte.=$nbofiles?'':''; $texte .= ''; } - if ($nbofiles) - { - $texte .= '
    '; - // Show list of found files - foreach ($listoffiles as $file) { - $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; - } - $texte .= '
    '; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate").' '; @@ -210,38 +213,35 @@ class doc_generic_invoice_odt extends ModelePDFFactures // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->facture->dir_output) - { + if ($conf->facture->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Facture($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -251,20 +251,19 @@ class doc_generic_invoice_odt extends ModelePDFFactures $dir = $conf->facture->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -275,10 +274,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -296,8 +296,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -338,8 +337,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Line of free text $newfreetext = ''; $paramfreetext = 'INVOICE_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -355,8 +353,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -371,8 +368,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // 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); } @@ -387,7 +383,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_propal, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -397,20 +395,20 @@ class doc_generic_invoice_odt extends ModelePDFFactures $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks //var_dump($tmparray); exit; - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { // Image //var_dump($value);exit; - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -419,32 +417,26 @@ class doc_generic_invoice_odt extends ModelePDFFactures $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -452,8 +444,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -461,12 +452,10 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -496,8 +485,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/facture/doc/index.html b/htdocs/core/modules/facture/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index f92deff0c88..e60f272caf5 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -173,12 +173,13 @@ class pdf_crabe extends ModelePDFFactures // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva = 101; $this->posxup = 118; $this->posxqty = 135; @@ -193,10 +194,11 @@ class pdf_crabe extends ModelePDFFactures $this->posxdiscount = 162; $this->posxprogress = 174; $this->postotalht = 174; - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxtva = $this->posxup; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { + $this->posxtva = $this->posxup; + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -235,9 +237,13 @@ class pdf_crabe extends ModelePDFFactures dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!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")); @@ -246,11 +252,11 @@ class pdf_crabe extends ModelePDFFactures // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) - { - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) { + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); @@ -259,21 +265,23 @@ class pdf_crabe extends ModelePDFFactures $dir = $conf->product->dir_output.'/'.$pdir; $realpath = ''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { $filename = $obj['photo']; //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; $realpath = $dir.$filename; break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxtva; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxtva; + } - if ($conf->facture->dir_output) - { + if ($conf->facture->dir_output) { $object->fetch_thirdparty(); $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); @@ -281,8 +289,7 @@ class pdf_crabe extends ModelePDFFactures $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->facture->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -290,20 +297,16 @@ class pdf_crabe extends ModelePDFFactures $dir = $conf->facture->dir_output."/".$objectref; $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -322,13 +325,16 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetAutoPageBreak(1, 0); $heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part - if ($heightforinfotot > 220) $heightforinfotot = 220; + if ($heightforinfotot > 220) { + $heightforinfotot = 220; + } $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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -353,7 +359,9 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } // Set certificate $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; @@ -375,15 +383,12 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } - if (empty($this->atleastonediscount)) // retrieve space not used by discount - { + if (empty($this->atleastonediscount)) { // retrieve space not used by discount $delta = ($this->posxprogress - $this->posxdiscount); $this->posxpicture += $delta; $this->posxtva += $delta; @@ -396,8 +401,7 @@ class pdf_crabe extends ModelePDFFactures $progress_width = 0; // Situation invoice handling - if ($object->situation_cycle_ref && empty($conf->global->MAIN_PDF_HIDE_SITUATION)) - { + if ($object->situation_cycle_ref && empty($conf->global->MAIN_PDF_HIDE_SITUATION)) { $this->situationinvoice = true; $progress_width = 10; $this->posxpicture -= $progress_width; @@ -411,7 +415,9 @@ class pdf_crabe extends ModelePDFFactures // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); @@ -423,11 +429,9 @@ class pdf_crabe extends ModelePDFFactures $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -445,15 +449,15 @@ class pdf_crabe extends ModelePDFFactures // Display notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } // Extrafields in note @@ -461,8 +465,7 @@ class pdf_crabe extends ModelePDFFactures if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); @@ -488,15 +491,16 @@ class pdf_crabe extends ModelePDFFactures $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -507,23 +511,27 @@ class pdf_crabe extends ModelePDFFactures $posYAfterDescription = 0; // 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (isset($imglinesize['width']) && isset($imglinesize['height'])) - { + if (isset($imglinesize['width']) && isset($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxtva - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -536,8 +544,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxpicture - $curX - $progress_width, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -546,22 +553,26 @@ class pdf_crabe extends ModelePDFFactures $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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -577,14 +588,14 @@ class pdf_crabe extends ModelePDFFactures // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva - 5, $curY); $pdf->MultiCell($this->posxup - $this->posxtva + 4, 3, $vat_rate, 0, 'R'); @@ -601,24 +612,21 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L'); } // Discount on line - if ($object->lines[$i]->remise_percent) - { + if ($object->lines[$i]->remise_percent) { $pdf->SetXY($this->posxdiscount - 2, $curY); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->posxprogress - $this->posxdiscount + 2, 3, $remise_percent, 0, 'R'); } // Situation progress - if ($this->situationinvoice) - { + if ($this->situationinvoice) { $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxprogress, $curY); $pdf->MultiCell($this->postotalht - $this->posxprogress + 1, 3, $progress, 0, 'R'); @@ -631,16 +639,23 @@ class pdf_crabe extends ModelePDFFactures $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } // Collection of totals by value of VAT in $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 (!empty($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; + if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation + if (!empty($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 (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $sign * $object->lines[$i]->total_tva; + if (!empty($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; @@ -650,36 +665,48 @@ class pdf_crabe extends ModelePDFFactures $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = $posYAfterImage; + if ($posYAfterImage > $posYAfterDescription) { + $nexY = $posYAfterImage; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -690,11 +717,9 @@ class pdf_crabe extends ModelePDFFactures $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -703,12 +728,12 @@ class pdf_crabe extends ModelePDFFactures $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -716,15 +741,18 @@ class pdf_crabe extends ModelePDFFactures $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -739,14 +767,15 @@ class pdf_crabe extends ModelePDFFactures $posy = $this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); // Display Payments area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) - { + if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { $posy = $this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter); } // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -757,14 +786,14 @@ class pdf_crabe extends ModelePDFFactures $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) - { + 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); @@ -798,15 +827,16 @@ class pdf_crabe extends ModelePDFFactures global $conf; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $current_page = $pdf->getPage(); $tab3_posx = 120; $tab3_top = $posy + 8; $tab3_width = 80; $tab3_height = 4; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $tab3_posx -= 20; } @@ -826,31 +856,37 @@ class pdf_crabe extends ModelePDFFactures $sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as re, ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE re.fk_facture_source = f.rowid AND re.fk_facture = ".$object->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $invoice = new Facture($this->db); - while ($i < $num) - { + while ($i < $num) { $y += 3; - if ($tab3_top + $y >= ($this->page_hauteur - $heightforfooter)) - { + if ($tab3_top + $y >= ($this->page_hauteur - $heightforfooter)) { $y = 0; $current_page++; $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($current_page); $this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height); } $obj = $this->db->fetch_object($resql); - if ($obj->type == 2) $text = $outputlangs->transnoentities("CreditNote"); - elseif ($obj->type == 3) $text = $outputlangs->transnoentities("Deposit"); - elseif ($obj->type == 0) $text = $outputlangs->transnoentities("ExcessReceived"); - else $text = $outputlangs->transnoentities("UnknownType"); + if ($obj->type == 2) { + $text = $outputlangs->transnoentities("CreditNote"); + } elseif ($obj->type == 3) { + $text = $outputlangs->transnoentities("Deposit"); + } elseif ($obj->type == 0) { + $text = $outputlangs->transnoentities("ExcessReceived"); + } else { + $text = $outputlangs->transnoentities("UnknownType"); + } $invoice->fetch($obj->fk_facture_source); @@ -883,19 +919,21 @@ class pdf_crabe extends ModelePDFFactures $sql .= " ORDER BY p.datep"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; while ($i < $num) { $y += 3; - if ($tab3_top + $y >= ($this->page_hauteur - $heightforfooter)) - { + if ($tab3_top + $y >= ($this->page_hauteur - $heightforfooter)) { $y = 0; $current_page++; $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($current_page); $this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top + $y - 3, $tab3_width, $tab3_height); } @@ -944,7 +982,9 @@ class pdf_crabe extends ModelePDFFactures { // phpcs:enable $title = $outputlangs->transnoentities("PaymentsAlreadyDone"); - if ($object->type == 2) $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); + if ($object->type == 2) { + $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); + } $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); @@ -986,11 +1026,14 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); + if ($mysoc->forme_juridique_code == 92) { + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoiceAsso"), 0, 'L', 0); + } else { + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); + } $posy = $pdf->GetY() + 4; } @@ -998,8 +1041,7 @@ class pdf_crabe extends ModelePDFFactures $posxval = 52; // Show payments conditions - if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) - { + if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -1014,19 +1056,15 @@ class pdf_crabe extends ModelePDFFactures $posy = $pdf->GetY() + 3; } - if ($object->type != 2) - { + if ($object->type != 2) { // Check a payment mode is defined if (empty($object->mode_reglement_code) && empty($conf->global->FACTURE_CHQ_NUMBER) - && empty($conf->global->FACTURE_RIB_NUMBER)) - { + && empty($conf->global->FACTURE_RIB_NUMBER)) { $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); - } - // Avoid having any valid PDF with setup that is not complete - elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) - || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) - { + } elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) + || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) { + // Avoid having any valid PDF with setup that is not complete $outputlangs->load("errors"); $pdf->SetXY($this->marge_gauche, $posy); @@ -1042,8 +1080,7 @@ class pdf_crabe extends ModelePDFFactures // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') - { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -1073,15 +1110,12 @@ class pdf_crabe extends ModelePDFFactures } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // If payment mode unregulated or payment mode forced to CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -1090,23 +1124,20 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -1117,11 +1148,12 @@ class pdf_crabe extends ModelePDFFactures } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if ($object->fk_bank > 0) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if ($object->fk_bank > 0) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -1157,7 +1189,9 @@ class pdf_crabe extends ModelePDFFactures global $conf, $mysoc; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1166,9 +1200,9 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -1191,11 +1225,9 @@ class pdf_crabe extends ModelePDFFactures $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { // FIXME amount of vat not supported with multicurrency @@ -1203,22 +1235,20 @@ class pdf_crabe extends ModelePDFFactures //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1232,18 +1262,17 @@ class pdf_crabe extends ModelePDFFactures } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; @@ -1252,8 +1281,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1270,18 +1298,15 @@ class pdf_crabe extends ModelePDFFactures //} // VAT - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1298,20 +1323,19 @@ class pdf_crabe extends ModelePDFFactures //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ foreach ($this->localtax1 as $localtax_type => $localtax_rate) { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1324,24 +1348,23 @@ class pdf_crabe extends ModelePDFFactures } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1357,8 +1380,7 @@ class pdf_crabe extends ModelePDFFactures //} // Revenue stamp - if (price2num($object->revenuestamp) != 0) - { + if (price2num($object->revenuestamp) != 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RevenueStamp"), $useborder, 'L', 1); @@ -1378,8 +1400,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1); // Retained warranty - if ($object->displayRetainedWarranty()) - { + if ($object->displayRetainedWarranty()) { $pdf->SetTextColor(40, 40, 40); $pdf->SetFillColor(255, 255, 255); @@ -1413,10 +1434,11 @@ class pdf_crabe extends ModelePDFFactures $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) - { + if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { // Already paid + Deposits $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -1425,8 +1447,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); // Credit note - if ($creditnoteamount) - { + if ($creditnoteamount) { $labeltouse = ($outputlangs->transnoentities("CreditNotesOrExcessReceived") != "CreditNotesOrExcessReceived") ? $outputlangs->transnoentities("CreditNotesOrExcessReceived") : $outputlangs->transnoentities("CreditNotes"); $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -1436,8 +1457,7 @@ class pdf_crabe extends ModelePDFFactures } // Escompte - if ($object->close_code == Facture::CLOSECODE_DISCOUNTVAT) - { + if ($object->close_code == Facture::CLOSECODE_DISCOUNTVAT) { $index++; $pdf->SetFillColor(255, 255, 255); @@ -1485,7 +1505,9 @@ class pdf_crabe extends ModelePDFFactures // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1494,14 +1516,15 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -1510,50 +1533,42 @@ class pdf_crabe extends ModelePDFFactures // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) { $pdf->line($this->posxpicture - 1, $tab_top, $this->posxpicture - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$pdf->SetXY($this->posxpicture-1, $tab_top+1); //$pdf->MultiCell($this->posxtva-$this->posxpicture-1,2, $outputlangs->transnoentities("Photo"),'','C'); } } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); } } $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); @@ -1561,13 +1576,11 @@ class pdf_crabe extends ModelePDFFactures } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { - $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); - $pdf->MultiCell($this->posxprogress - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); + if (empty($hidetop)) { + $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); + $pdf->MultiCell($this->posxprogress - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } @@ -1580,8 +1593,7 @@ class pdf_crabe extends ModelePDFFactures } $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -1609,8 +1621,7 @@ class pdf_crabe extends ModelePDFFactures pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == Facture::STATUS_DRAFT && (!empty($conf->global->FACTURE_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); } @@ -1625,20 +1636,18 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1657,11 +1666,21 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfInvoiceTitle"); - if ($object->type == 1) $title = $outputlangs->transnoentities("InvoiceReplacement"); - if ($object->type == 2) $title = $outputlangs->transnoentities("InvoiceAvoir"); - if ($object->type == 3) $title = $outputlangs->transnoentities("InvoiceDeposit"); - if ($object->type == 4) $title = $outputlangs->transnoentities("InvoiceProForma"); - if ($this->situationinvoice) $title = $outputlangs->transnoentities("PDFInvoiceSituation"); + if ($object->type == 1) { + $title = $outputlangs->transnoentities("InvoiceReplacement"); + } + if ($object->type == 2) { + $title = $outputlangs->transnoentities("InvoiceAvoir"); + } + if ($object->type == 3) { + $title = $outputlangs->transnoentities("InvoiceDeposit"); + } + if ($object->type == 4) { + $title = $outputlangs->transnoentities("InvoiceProForma"); + } + if ($this->situationinvoice) { + $title = $outputlangs->transnoentities("PDFInvoiceSituation"); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); @@ -1670,8 +1689,7 @@ class pdf_crabe extends ModelePDFFactures $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 == Facture::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -1680,41 +1698,36 @@ class pdf_crabe extends ModelePDFFactures $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } $objectidnext = $object->getIdReplacingInvoice('validated'); - if ($object->type == 0 && $objectidnext) - { + if ($object->type == 0 && $objectidnext) { $objectreplacing = new Facture($this->db); $objectreplacing->fetch($objectidnext); @@ -1723,8 +1736,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R'); } - if ($object->type == 1) - { + if ($object->type == 1) { $objectreplaced = new Facture($this->db); $objectreplaced->fetch($object->fk_facture_source); @@ -1733,8 +1745,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R'); } - if ($object->type == 2 && !empty($object->fk_facture_source)) - { + if ($object->type == 2 && !empty($object->fk_facture_source)) { $objectreplaced = new Facture($this->db); $objectreplaced->fetch($object->fk_facture_source); @@ -1749,24 +1760,21 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateInvoice")." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R'); - if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) - { + if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : ".dol_print_date($object->date_pointoftax, "day", false, $outputlangs), '', 'R'); } - if ($object->type != 2) - { + if ($object->type != 2) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateDue")." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R'); } - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1774,11 +1782,9 @@ class pdf_crabe extends ModelePDFFactures } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1794,13 +1800,11 @@ class pdf_crabe extends ModelePDFFactures // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); @@ -1808,7 +1812,9 @@ class pdf_crabe extends ModelePDFFactures $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1840,8 +1846,7 @@ class pdf_crabe extends ModelePDFFactures // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1855,15 +1860,20 @@ class pdf_crabe extends ModelePDFFactures $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index b42858ca4c9..6ffc043eb5e 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -80,9 +80,9 @@ class pdf_sponge extends ModelePDFFactures */ public $version = 'dolibarr'; - /** - * @var int page_largeur - */ + /** + * @var int page_largeur + */ public $page_largeur; /** @@ -128,7 +128,7 @@ class pdf_sponge extends ModelePDFFactures /** - * @var array of document table collumns + * @var array of document table columns */ public $cols; @@ -174,7 +174,9 @@ class pdf_sponge extends ModelePDFFactures // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff @@ -212,9 +214,13 @@ class pdf_sponge extends ModelePDFFactures dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!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")); @@ -237,18 +243,17 @@ class pdf_sponge extends ModelePDFFactures // 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_INVOICES_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -257,22 +262,17 @@ class pdf_sponge extends ModelePDFFactures } $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { + foreach ($pdir as $midir) { + if (!$arephoto) { if ($conf->product->entity != $objphoto->entity) { $dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities } else { $dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product } - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -288,14 +288,15 @@ class pdf_sponge extends ModelePDFFactures } } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + if ($realpath && $arephoto) { + $realpatharray[$i] = $realpath; + } } } //if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva; - if ($conf->facture->multidir_output[$conf->entity]) - { + if ($conf->facture->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); @@ -303,8 +304,7 @@ class pdf_sponge extends ModelePDFFactures $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->facture->multidir_output[$conf->entity]; $file = $dir."/SPECIMEN.pdf"; } else { @@ -312,20 +312,16 @@ class pdf_sponge extends ModelePDFFactures $dir = $conf->facture->multidir_output[$object->entity]."/".$objectref; $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -347,8 +343,7 @@ class pdf_sponge extends ModelePDFFactures $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')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -356,8 +351,8 @@ class pdf_sponge extends ModelePDFFactures // Set path to the background PDF File if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { - $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->dir_output; + if (!empty($conf->mycompany->multidir_output[$object->entity])) { $logodir = $conf->mycompany->multidir_output[$object->entity]; } $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); @@ -373,7 +368,9 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } // Set certificate $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; @@ -395,24 +392,23 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } // Situation invoice handling - if ($object->situation_cycle_ref) - { + if ($object->situation_cycle_ref) { $this->situationinvoice = true; } // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); @@ -424,17 +420,17 @@ class pdf_sponge extends ModelePDFFactures $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; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $tab_height_newpage -= $top_shift; + } $nexY = $tab_top - 1; // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -453,15 +449,15 @@ class pdf_sponge extends ModelePDFFactures // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } @@ -472,8 +468,7 @@ class pdf_sponge extends ModelePDFFactures } $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; @@ -492,16 +487,19 @@ class pdf_sponge extends ModelePDFFactures $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + 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); + 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. @@ -517,8 +515,7 @@ class pdf_sponge extends ModelePDFFactures $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -555,8 +552,12 @@ class pdf_sponge extends ModelePDFFactures // 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); + 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 @@ -567,15 +568,18 @@ class pdf_sponge extends ModelePDFFactures $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -600,15 +604,16 @@ class pdf_sponge extends ModelePDFFactures // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -618,25 +623,26 @@ class pdf_sponge extends ModelePDFFactures $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('photo')) - { + 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -644,15 +650,13 @@ class pdf_sponge extends ModelePDFFactures } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. @@ -662,20 +666,22 @@ class pdf_sponge extends ModelePDFFactures $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 - { + 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); + 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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -693,22 +699,21 @@ class pdf_sponge extends ModelePDFFactures // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if ($this->getColumnStatus('vat')) - { + if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'vat', $vat_rate); $nexY = max($pdf->GetY(), $nexY); } // Unit price before discount - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'subprice', $up_excl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -716,48 +721,42 @@ class pdf_sponge extends ModelePDFFactures // Quantity // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { + if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); $nexY = max($pdf->GetY(), $nexY); } // Situation progress - if ($this->getColumnStatus('progress')) - { + if ($this->getColumnStatus('progress')) { $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'progress', $progress); $nexY = max($pdf->GetY(), $nexY); } // Unit - if ($this->getColumnStatus('unit')) - { + if ($this->getColumnStatus('unit')) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $this->printStdColumnContent($pdf, $curY, 'unit', $unit); $nexY = max($pdf->GetY(), $nexY); } // Discount on line - if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) - { + if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'discount', $remise_percent); $nexY = max($pdf->GetY(), $nexY); } // Total excl tax line (HT) - if ($this->getColumnStatus('totalexcltax')) - { + if ($this->getColumnStatus('totalexcltax')) { $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalexcltax', $total_excl_tax); $nexY = max($pdf->GetY(), $nexY); } // Total with tax line (TTC) - if ($this->getColumnStatus('totalincltax')) - { + if ($this->getColumnStatus('totalincltax')) { $total_incl_tax = pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -766,8 +765,7 @@ class pdf_sponge extends ModelePDFFactures // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -789,16 +787,23 @@ class pdf_sponge extends ModelePDFFactures $sign = 1; - if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if (isset($object->type) && $object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $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 (!empty($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; + if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation + if (!empty($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 (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $sign * $object->lines[$i]->total_tva; + if (!empty($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; @@ -808,16 +813,21 @@ class pdf_sponge extends ModelePDFFactures $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; @@ -831,8 +841,12 @@ class pdf_sponge extends ModelePDFFactures $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; + 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); @@ -858,7 +872,9 @@ class pdf_sponge extends ModelePDFFactures $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 (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) { @@ -870,15 +886,18 @@ class pdf_sponge extends ModelePDFFactures $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + 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 { @@ -893,14 +912,15 @@ class pdf_sponge extends ModelePDFFactures $posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); // Display payment area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) - { + 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(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -911,14 +931,14 @@ class pdf_sponge extends ModelePDFFactures $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -948,21 +968,24 @@ class pdf_sponge extends ModelePDFFactures global $conf; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $tab3_posx = 120; $tab3_top = $posy + 8; $tab3_width = 80; $tab3_height = 4; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $tab3_posx -= 20; } $default_font_size = pdf_getPDFFontSize($outputlangs); $title = $outputlangs->transnoentities("PaymentsAlreadyDone"); - if ($object->type == 2) $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); + if ($object->type == 2) { + $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); + } $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); @@ -994,20 +1017,23 @@ class pdf_sponge extends ModelePDFFactures $sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as re, ".MAIN_DB_PREFIX."facture as f"; $sql .= " WHERE re.fk_facture_source = f.rowid AND re.fk_facture = ".$object->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $invoice = new Facture($this->db); - while ($i < $num) - { + while ($i < $num) { $y += 3; $obj = $this->db->fetch_object($resql); - if ($obj->type == 2) $text = $outputlangs->transnoentities("CreditNote"); - elseif ($obj->type == 3) $text = $outputlangs->transnoentities("Deposit"); - elseif ($obj->type == 0) $text = $outputlangs->transnoentities("ExcessReceived"); - else $text = $outputlangs->transnoentities("UnknownType"); + if ($obj->type == 2) { + $text = $outputlangs->transnoentities("CreditNote"); + } elseif ($obj->type == 3) { + $text = $outputlangs->transnoentities("Deposit"); + } elseif ($obj->type == 0) { + $text = $outputlangs->transnoentities("ExcessReceived"); + } else { + $text = $outputlangs->transnoentities("UnknownType"); + } $invoice->fetch($obj->fk_facture_source); @@ -1040,8 +1066,7 @@ class pdf_sponge extends ModelePDFFactures $sql .= " ORDER BY p.datep"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; while ($i < $num) { @@ -1090,8 +1115,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -1102,8 +1126,7 @@ class pdf_sponge extends ModelePDFFactures $posxval = 52; // Show payments conditions - if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) - { + if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -1118,19 +1141,15 @@ class pdf_sponge extends ModelePDFFactures $posy = $pdf->GetY() + 3; } - if ($object->type != 2) - { + if ($object->type != 2) { // Check a payment mode is defined if (empty($object->mode_reglement_code) && empty($conf->global->FACTURE_CHQ_NUMBER) - && empty($conf->global->FACTURE_RIB_NUMBER)) - { + && empty($conf->global->FACTURE_RIB_NUMBER)) { $this->error = $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"); - } - // Avoid having any valid PDF with setup that is not complete - elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) - || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) - { + } elseif (($object->mode_reglement_code == 'CHQ' && empty($conf->global->FACTURE_CHQ_NUMBER) && empty($object->fk_account) && empty($object->fk_bank)) + || ($object->mode_reglement_code == 'VIR' && empty($conf->global->FACTURE_RIB_NUMBER) && empty($object->fk_account) && empty($object->fk_bank))) { + // Avoid having any valid PDF with setup that is not complete $outputlangs->load("errors"); $pdf->SetXY($this->marge_gauche, $posy); @@ -1146,8 +1165,7 @@ class pdf_sponge extends ModelePDFFactures // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') - { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -1176,15 +1194,12 @@ class pdf_sponge extends ModelePDFFactures } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // If payment mode unregulated or payment mode forced to CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -1193,23 +1208,20 @@ class pdf_sponge extends ModelePDFFactures $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -1220,11 +1232,12 @@ class pdf_sponge extends ModelePDFFactures } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if ($object->fk_bank > 0) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if ($object->fk_bank > 0) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -1257,7 +1270,9 @@ class pdf_sponge extends ModelePDFFactures global $conf, $mysoc, $hookmanager; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1274,9 +1289,9 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -1294,8 +1309,7 @@ class pdf_sponge extends ModelePDFFactures // overall percentage of advancement $percent = 0; $i = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $percent += $line->situation_percent; $i++; } @@ -1415,7 +1429,9 @@ class pdf_sponge extends ModelePDFFactures foreach ($object->lines as $i => $line) { $total_line_remise += pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, 2); // TODO: add this methode to core/lib/pdf.lib // Gestion remise sous forme de ligne négative - if ($line->total_ht < 0) $total_line_remise += -$line->total_ht; + if ($line->total_ht < 0) { + $total_line_remise += -$line->total_ht; + } } if ($total_line_remise > 0) { if (!empty($conf->global->MAIN_SHOW_AMOUNT_DISCOUNT)) { @@ -1454,11 +1470,9 @@ class pdf_sponge extends ModelePDFFactures $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { // FIXME amount of vat not supported with multicurrency @@ -1466,22 +1480,20 @@ class pdf_sponge extends ModelePDFFactures //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1496,26 +1508,24 @@ class pdf_sponge extends ModelePDFFactures } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1540,8 +1550,7 @@ class pdf_sponge extends ModelePDFFactures } if ($sum_pdf_tva != $object->total_tva) { // apply coef to recover the VAT object amount (the good one) - if (!empty($sum_pdf_tva)) - { + if (!empty($sum_pdf_tva)) { $coef_fix_tva = $object->total_tva / $sum_pdf_tva; } else { $coef_fix_tva = 1; @@ -1554,18 +1563,15 @@ class pdf_sponge extends ModelePDFFactures } } - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1582,22 +1588,20 @@ class pdf_sponge extends ModelePDFFactures //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1611,27 +1615,25 @@ class pdf_sponge extends ModelePDFFactures } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1649,8 +1651,7 @@ class pdf_sponge extends ModelePDFFactures // Revenue stamp - if (price2num($object->revenuestamp) != 0) - { + if (price2num($object->revenuestamp) != 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RevenueStamp").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("RevenueStamp", $mysoc->country_code) : ''), $useborder, 'L', 1); @@ -1671,8 +1672,7 @@ class pdf_sponge extends ModelePDFFactures // Retained warranty - if ($object->displayRetainedWarranty()) - { + if ($object->displayRetainedWarranty()) { $pdf->SetTextColor(40, 40, 40); $pdf->SetFillColor(255, 255, 255); @@ -1707,10 +1707,11 @@ class pdf_sponge extends ModelePDFFactures $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) - { + if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { // Already paid + Deposits $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -1719,8 +1720,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); // Credit note - if ($creditnoteamount) - { + if ($creditnoteamount) { $labeltouse = ($outputlangs->transnoentities("CreditNotesOrExcessReceived") != "CreditNotesOrExcessReceived") ? $outputlangs->transnoentities("CreditNotesOrExcessReceived") : $outputlangs->transnoentities("CreditNotes"); $labeltouse .= (is_object($outputlangsbis) ? ' / '.($outputlangsbis->transnoentities("CreditNotesOrExcessReceived") != "CreditNotesOrExcessReceived") ? $outputlangsbis->transnoentities("CreditNotesOrExcessReceived") : $outputlangsbis->transnoentities("CreditNotes") : ''); $index++; @@ -1796,7 +1796,9 @@ class pdf_sponge extends ModelePDFFactures // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1805,8 +1807,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency)); @@ -1858,8 +1859,7 @@ class pdf_sponge extends ModelePDFFactures pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($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); } @@ -1874,14 +1874,13 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; @@ -1905,20 +1904,37 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfInvoiceTitle"); - if ($object->type == 1) $title = $outputlangs->transnoentities("InvoiceReplacement"); - if ($object->type == 2) $title = $outputlangs->transnoentities("InvoiceAvoir"); - if ($object->type == 3) $title = $outputlangs->transnoentities("InvoiceDeposit"); - if ($object->type == 4) $title = $outputlangs->transnoentities("InvoiceProForma"); - if ($this->situationinvoice) $title = $outputlangs->transnoentities("PDFInvoiceSituation"); + if ($object->type == 1) { + $title = $outputlangs->transnoentities("InvoiceReplacement"); + } + if ($object->type == 2) { + $title = $outputlangs->transnoentities("InvoiceAvoir"); + } + if ($object->type == 3) { + $title = $outputlangs->transnoentities("InvoiceDeposit"); + } + if ($object->type == 4) { + $title = $outputlangs->transnoentities("InvoiceProForma"); + } + if ($this->situationinvoice) { + $title = $outputlangs->transnoentities("PDFInvoiceSituation"); + } if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $title .= ' - '; if ($object->type == 0) { - if ($this->situationinvoice) $title .= $outputlangsbis->transnoentities("PDFInvoiceSituation"); + if ($this->situationinvoice) { + $title .= $outputlangsbis->transnoentities("PDFInvoiceSituation"); + } $title .= $outputlangsbis->transnoentities("PdfInvoiceTitle"); - } elseif ($object->type == 1) $title .= $outputlangsbis->transnoentities("InvoiceReplacement"); - elseif ($object->type == 2) $title .= $outputlangsbis->transnoentities("InvoiceAvoir"); - elseif ($object->type == 3) $title .= $outputlangsbis->transnoentities("InvoiceDeposit"); - elseif ($object->type == 4) $title .= $outputlangsbis->transnoentities("InvoiceProForma"); + } elseif ($object->type == 1) { + $title .= $outputlangsbis->transnoentities("InvoiceReplacement"); + } elseif ($object->type == 2) { + $title .= $outputlangsbis->transnoentities("InvoiceAvoir"); + } elseif ($object->type == 3) { + $title .= $outputlangsbis->transnoentities("InvoiceDeposit"); + } elseif ($object->type == 4) { + $title .= $outputlangsbis->transnoentities("InvoiceProForma"); + } } $pdf->MultiCell($w, 3, $title, '', 'R'); @@ -1928,8 +1944,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -1938,41 +1953,36 @@ class pdf_sponge extends ModelePDFFactures $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } $objectidnext = $object->getIdReplacingInvoice('validated'); - if ($object->type == 0 && $objectidnext) - { + if ($object->type == 0 && $objectidnext) { $objectreplacing = new Facture($this->db); $objectreplacing->fetch($objectidnext); @@ -1981,8 +1991,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R'); } - if ($object->type == 1) - { + if ($object->type == 1) { $objectreplaced = new Facture($this->db); $objectreplaced->fetch($object->fk_facture_source); @@ -1991,8 +2000,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R'); } - if ($object->type == 2 && !empty($object->fk_facture_source)) - { + if ($object->type == 2 && !empty($object->fk_facture_source)) { $objectreplaced = new Facture($this->db); $objectreplaced->fetch($object->fk_facture_source); @@ -2012,16 +2020,14 @@ class pdf_sponge extends ModelePDFFactures } $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R'); - if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) - { + if (!empty($conf->global->INVOICE_POINTOFTAX_DATE)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("DatePointOfTax")." : ".dol_print_date($object->date_pointoftax, "day", false, $outputlangs), '', 'R'); } - if ($object->type != 2) - { + if ($object->type != 2) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -2032,8 +2038,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R'); } - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -2041,11 +2046,9 @@ class pdf_sponge extends ModelePDFFactures } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -2061,13 +2064,11 @@ class pdf_sponge extends ModelePDFFactures // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); @@ -2075,7 +2076,9 @@ class pdf_sponge extends ModelePDFFactures $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -2105,8 +2108,7 @@ class pdf_sponge extends ModelePDFFactures // If BILLING contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -2120,15 +2122,20 @@ class pdf_sponge extends ModelePDFFactures $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -2198,22 +2205,22 @@ class pdf_sponge extends ModelePDFFactures ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -2249,8 +2256,7 @@ class pdf_sponge extends ModelePDFFactures 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -2266,8 +2272,7 @@ class pdf_sponge extends ModelePDFFactures '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)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $this->cols['vat']['status'] = true; } @@ -2315,8 +2320,7 @@ class pdf_sponge extends ModelePDFFactures 'border-left' => true, // add left line separator ); - if ($this->situationinvoice) - { + if ($this->situationinvoice) { $this->cols['progress']['status'] = true; } @@ -2385,11 +2389,9 @@ class pdf_sponge extends ModelePDFFactures ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/core/modules/facture/index.html b/htdocs/core/modules/facture/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index b8c7b941a15..c7a69a82caa 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -55,8 +55,8 @@ class mod_facture_mars extends ModeleNumRefFactures */ public function __construct() { - if (!empty($conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX)) - { + global $conf; + if (!empty($conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX)) { $this->prefixinvoice = $conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX; } } @@ -96,7 +96,8 @@ class mod_facture_mars extends ModeleNumRefFactures $langs->load("bills"); // Check invoice num - $fayymm = ''; $max = ''; + $fayymm = ''; + $max = ''; $posindice = strlen($this->prefixinvoice) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED) as max"; // This is standard SQL @@ -105,13 +106,14 @@ class mod_facture_mars extends ModeleNumRefFactures $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -127,13 +129,14 @@ class mod_facture_mars extends ModeleNumRefFactures $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } @@ -154,9 +157,13 @@ class mod_facture_mars extends ModeleNumRefFactures global $db; $prefix = $this->prefixinvoice; - if ($invoice->type == 1) $prefix = $this->prefixreplacement; - elseif ($invoice->type == 2) $prefix = $this->prefixcreditnote; - elseif ($invoice->type == 3) $prefix = $this->prefixdeposit; + if ($invoice->type == 1) { + $prefix = $this->prefixreplacement; + } elseif ($invoice->type == 2) { + $prefix = $this->prefixcreditnote; + } elseif ($invoice->type == 3) { + $prefix = $this->prefixdeposit; + } // First we get the max value $posindice = strlen($prefix) + 6; @@ -167,19 +174,23 @@ class mod_facture_mars extends ModeleNumRefFactures $resql = $db->query($sql); dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { return -1; } - if ($mode == 'last') - { - if ($max >= (pow(10, 4) - 1)) $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max); + if ($mode == 'last') { + if ($max >= (pow(10, 4) - 1)) { + $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max); + } $ref = ''; $sql = "SELECT ref as ref"; @@ -190,24 +201,31 @@ class mod_facture_mars extends ModeleNumRefFactures dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $ref = $obj->ref; - } else dol_print_error($db); + if ($obj) { + $ref = $obj->ref; + } + } else { + dol_print_error($db); + } return $ref; - } elseif ($mode == 'next') - { + } elseif ($mode == 'next') { $date = $invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; - } else dol_print_error('', 'Bad parameter for getNextValue'); + } else { + dol_print_error('', 'Bad parameter for getNextValue'); + } } /** diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 5273803ea58..70fde36f549 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -120,8 +120,7 @@ class mod_facture_mercure extends ModeleNumRefFactures $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = 'NotConfigured'; } return $numExample; @@ -143,18 +142,19 @@ class mod_facture_mercure extends ModeleNumRefFactures // Get Mask value $mask = ''; - if (is_object($invoice) && $invoice->type == 1) - { + if (is_object($invoice) && $invoice->type == 1) { $mask = $conf->global->FACTURE_MERCURE_MASK_REPLACEMENT; - if (!$mask) - { + if (!$mask) { $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; } - } elseif (is_object($invoice) && $invoice->type == 2) $mask = $conf->global->FACTURE_MERCURE_MASK_CREDIT; - elseif (is_object($invoice) && $invoice->type == 3) $mask = $conf->global->FACTURE_MERCURE_MASK_DEPOSIT; - else $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; - if (!$mask) - { + } elseif (is_object($invoice) && $invoice->type == 2) { + $mask = $conf->global->FACTURE_MERCURE_MASK_CREDIT; + } elseif (is_object($invoice) && $invoice->type == 3) { + $mask = $conf->global->FACTURE_MERCURE_MASK_DEPOSIT; + } else { + $mask = $conf->global->FACTURE_MERCURE_MASK_INVOICE; + } + if (!$mask) { $this->error = 'NotConfigured'; return 0; } @@ -167,7 +167,9 @@ class mod_facture_mercure extends ModeleNumRefFactures $entity = getEntity('invoicenumber', 1, $invoice); $numFinal = get_next_value($db, $mask, 'facture', 'ref', $where, $objsoc, $invoice->date, $mode, false, null, $entity); - if (!preg_match('/([0-9])+/', $numFinal)) $this->error = $numFinal; + if (!preg_match('/([0-9])+/', $numFinal)) { + $this->error = $numFinal; + } return $numFinal; } diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index ae1afbf2ce4..f3e38cf7db7 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -65,8 +65,8 @@ class mod_facture_terre extends ModeleNumRefFactures */ public function __construct() { - if (!empty($conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX)) - { + global $conf; + if (!empty($conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX)) { $this->prefixinvoice = $conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX; } } @@ -106,7 +106,8 @@ class mod_facture_terre extends ModeleNumRefFactures $langs->load("bills"); // Check invoice num - $fayymm = ''; $max = ''; + $fayymm = ''; + $max = ''; $posindice = strlen($this->prefixinvoice) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL @@ -115,13 +116,14 @@ class mod_facture_terre extends ModeleNumRefFactures $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -137,13 +139,14 @@ class mod_facture_terre extends ModeleNumRefFactures $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } @@ -158,13 +161,14 @@ class mod_facture_terre extends ModeleNumRefFactures $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($fayymm && !preg_match('/'.$this->prefixdeposit.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if ($fayymm && !preg_match('/'.$this->prefixdeposit.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } @@ -187,8 +191,11 @@ class mod_facture_terre extends ModeleNumRefFactures dol_syslog(get_class($this)."::getNextValue mode=".$mode, LOG_DEBUG); $prefix = $this->prefixinvoice; - if ($invoice->type == 2) $prefix = $this->prefixcreditnote; - elseif ($invoice->type == 3) $prefix = $this->prefixdeposit; + if ($invoice->type == 2) { + $prefix = $this->prefixcreditnote; + } elseif ($invoice->type == 3) { + $prefix = $this->prefixdeposit; + } // First we get the max value $posindice = strlen($prefix) + 6; @@ -198,19 +205,23 @@ class mod_facture_terre extends ModeleNumRefFactures $sql .= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { return -1; } - if ($mode == 'last') - { - if ($max >= (pow(10, 4) - 1)) $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max); + if ($mode == 'last') { + if ($max >= (pow(10, 4) - 1)) { + $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max); + } $ref = ''; $sql = "SELECT ref as ref"; @@ -220,24 +231,31 @@ class mod_facture_terre extends ModeleNumRefFactures $sql .= " ORDER BY ref DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $ref = $obj->ref; - } else dol_print_error($db); + if ($obj) { + $ref = $obj->ref; + } + } else { + dol_print_error($db); + } return $ref; - } elseif ($mode == 'next') - { + } elseif ($mode == 'next') { $date = $invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; - } else dol_print_error('', 'Bad parameter for getNextValue'); + } else { + dol_print_error('', 'Bad parameter for getNextValue'); + } } /** diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 775864eec52..b5f8b62d419 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -60,12 +60,12 @@ abstract class ModelePDFFactures extends CommonDocGenerator global $conf; $type = 'invoice'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -147,10 +147,16 @@ abstract class ModeleNumRefFactures global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/fichinter/doc/index.html b/htdocs/core/modules/fichinter/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 622cd0b2250..ac0cb1fac80 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -54,6 +54,11 @@ class pdf_soleil extends ModelePDFFicheinter */ 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 document type */ @@ -124,6 +129,7 @@ class pdf_soleil extends ModelePDFFicheinter $this->db = $db; $this->name = 'soleil'; $this->description = $langs->trans("DocumentModelStandardPDF"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -146,7 +152,9 @@ class pdf_soleil extends ModelePDFFicheinter // Get source company $this->emetteur = $mysoc; - if (empty($this->emetteur->country_code)) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if not defined + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; @@ -169,20 +177,22 @@ class pdf_soleil extends ModelePDFFicheinter // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "interventions", "dict", "companies")); - if ($conf->ficheinter->dir_output) - { + if ($conf->ficheinter->dir_output) { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->ficheinter->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -191,20 +201,16 @@ class pdf_soleil extends ModelePDFFicheinter $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -222,18 +228,18 @@ class pdf_soleil extends ModelePDFFicheinter $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -247,13 +253,17 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("InterventionCard")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -266,8 +276,7 @@ class pdf_soleil extends ModelePDFFicheinter // Display notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -302,8 +311,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetXY($this->marge_gauche, $tab_top + 5); $text = $object->description; - if ($object->duration > 0) - { + if ($object->duration > 0) { $totaltime = convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); $text .= ($text ? ' - ' : '').$langs->trans("Total").": ".$totaltime; } @@ -318,13 +326,11 @@ class pdf_soleil extends ModelePDFFicheinter $nblines = count($object->lines); // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + for ($i = 0; $i < $nblines; $i++) { $objectligne = $object->lines[$i]; $valide = empty($objectligne->id) ? 0 : $objectligne->fetch($objectligne->id); - if ($valide > 0 || $object->specimen) - { + if ($valide > 0 || $object->specimen) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -343,8 +349,7 @@ class pdf_soleil extends ModelePDFFicheinter $txt = $outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei, 'day', false, $outputlangs, true); } - if ($objectligne->duration > 0) - { + if ($objectligne->duration > 0) { $txt .= " - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration); } $txt = ''.dol_htmlentitiesbr($txt, 1, $outputlangs->charset_output).''; @@ -353,8 +358,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->startTransaction(); $pdf->writeHTMLCell(0, 0, $curX, $curY + 1, dol_concatdesc($txt, $desc), 0, 1, 0); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -363,13 +367,15 @@ class pdf_soleil extends ModelePDFFicheinter $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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposafter + 1); } } @@ -386,17 +392,16 @@ class pdf_soleil extends ModelePDFFicheinter // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -405,12 +410,12 @@ class pdf_soleil extends ModelePDFFicheinter $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -418,16 +423,19 @@ class pdf_soleil extends ModelePDFFicheinter $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -436,7 +444,9 @@ class pdf_soleil extends ModelePDFFicheinter } $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); @@ -446,14 +456,14 @@ class pdf_soleil extends ModelePDFFicheinter $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) - { + 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); @@ -511,13 +521,12 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY); $pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also. - */ + */ // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height + 1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidebottom)) - { + if (empty($hidebottom)) { $pdf->SetXY(20, 230); $pdf->MultiCell(66, 5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"), 0, 'L', 0); @@ -553,8 +562,7 @@ class pdf_soleil extends ModelePDFFicheinter pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); //Affiche le filigrane brouillon - Print Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->FICHINTER_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->FICHINTER_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FICHINTER_DRAFT_WATERMARK); } @@ -569,10 +577,8 @@ class pdf_soleil extends ModelePDFFicheinter // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -607,22 +613,19 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R'); } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'INTERREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } @@ -632,7 +635,9 @@ class pdf_soleil extends ModelePDFFicheinter // Show sender $posy = 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -659,8 +664,7 @@ class pdf_soleil extends ModelePDFFicheinter // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -678,10 +682,14 @@ class pdf_soleil extends ModelePDFFicheinter // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/fichinter/index.html b/htdocs/core/modules/fichinter/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 58888a7cb8d..fa5dd49f0fa 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -103,15 +103,14 @@ class mod_arctic extends ModeleNumRefFicheinter */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -133,8 +132,7 @@ class mod_arctic extends ModeleNumRefFicheinter // We define the search criteria of the counter $mask = $conf->global->FICHINTER_ARTIC_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 5af891f39a2..b2ffe3a7e98 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -64,7 +64,7 @@ class mod_pacific extends ModeleNumRefFicheinter public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } /** @@ -89,7 +89,8 @@ class mod_pacific extends ModeleNumRefFicheinter $langs->load("bills"); - $fayymm = ''; $max = ''; + $fayymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -98,13 +99,14 @@ class mod_pacific extends ModeleNumRefFicheinter $sql .= " WHERE entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $fayymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $fayymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$fayymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $fayymm)) - { + if (!$fayymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $fayymm)) { return true; } else { $langs->load("errors"); @@ -132,19 +134,24 @@ class mod_pacific extends ModeleNumRefFicheinter $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } //$date=time(); $date = $object->datec; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } return $this->prefix.$yymm."-".$num; } diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index b9991a7d14e..8cf79227d4f 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -140,11 +140,17 @@ abstract class ModeleNumRefFicheinter global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } @@ -173,10 +179,8 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $srctemplatepath = ''; // Positionne modele sur le nom du modele de fichinter a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->FICHEINTER_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->FICHEINTER_ADDON_PDF)) { $modele = $conf->global->FICHEINTER_ADDON_PDF; } else { $modele = 'soleil'; @@ -185,37 +189,38 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, // If selected modele is a filename template (then $modele="modelname:filename") $tmp = explode(':', $modele, 2); - if (!empty($tmp[1])) - { + if (!empty($tmp[1])) { $modele = $tmp[0]; $srctemplatepath = $tmp[1]; } // Search template files - $file = ''; $classname = ''; $filefound = 0; + $file = ''; + $classname = ''; + $filefound = 0; $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 (is_array($conf->modules_parts['models'])) { + $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + } + foreach ($dirmodels as $reldir) { + foreach (array('doc', 'pdf') as $prefix) { $file = $prefix."_".$modele.".modules.php"; // On verifie l'emplacement du modele $file = dol_buildpath($reldir."core/modules/fichinter/doc/".$file, 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $prefix.'_'.$modele; break; } } - if ($filefound) break; + if ($filefound) { + break; + } } // Charge le modele - if ($filefound) - { + if ($filefound) { require_once $file; $obj = new $classname($db); @@ -223,8 +228,7 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, // 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 ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) { $outputlangs->charset_output = $sav_charset_output; // We delete old preview diff --git a/htdocs/core/modules/holiday/index.html b/htdocs/core/modules/holiday/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/core/modules/holiday/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index bedcfb0cc80..b8cb33f550e 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -101,15 +101,14 @@ class mod_holiday_immaculate extends ModelNumRefHolidays */ public function getExample() { - global $conf, $langs, $user; + global $conf, $langs, $user; $old_login = $user->login; $user->login = 'UUUUUUU'; - $numExample = $this->getNextValue($user, ''); + $numExample = $this->getNextValue($user, ''); $user->login = $old_login; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -130,8 +129,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays $mask = $conf->global->HOLIDAY_IMMACULATE_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index 5028cad8afc..fd2271198bc 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -68,7 +68,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -92,7 +92,8 @@ class mod_holiday_madonna extends ModelNumRefHolidays { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -101,13 +102,14 @@ class mod_holiday_madonna extends ModelNumRefHolidays $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -134,11 +136,13 @@ class mod_holiday_madonna extends ModelNumRefHolidays $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_holiday_madonna::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +151,11 @@ class mod_holiday_madonna extends ModelNumRefHolidays $date = $holiday->date_debut; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_holiday_madonna::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index afd83c7429e..65b08f4bba8 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -145,10 +145,16 @@ class ModelNumRefHolidays global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index e7386f0b7e4..1768029b97e 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -114,7 +114,9 @@ class ImportCsv extends ModeleImports $this->version_lib = DOL_VERSION; $this->datatoimport = $datatoimport; - if (preg_match('/^societe_/', $datatoimport)) $this->thirpartyobject = new Societe($this->db); + if (preg_match('/^societe_/', $datatoimport)) { + $this->thirpartyobject = new Societe($this->db); + } } @@ -193,8 +195,7 @@ class ImportCsv extends ModeleImports ini_set('auto_detect_line_endings', 1); // For MAC compatibility $this->handle = fopen(dol_osencode($file), "r"); - if (!$this->handle) - { + if (!$this->handle) { $langs->load("errors"); $this->error = $langs->trans("ErrorFailToOpenFile", $file); $ret = -1; @@ -247,19 +248,17 @@ class ImportCsv extends ModeleImports $arrayres = fgetcsv($this->handle, 100000, $this->separator, $this->enclosure, $this->escape); // End of file - if ($arrayres === false) return false; + if ($arrayres === false) { + return false; + } //var_dump($this->handle); //var_dump($arrayres);exit; $newarrayres = array(); - if ($arrayres && is_array($arrayres)) - { - foreach ($arrayres as $key => $val) - { - if (!empty($conf->global->IMPORT_CSV_FORCE_CHARSET)) // Forced charset - { - if (strtolower($conf->global->IMPORT_CSV_FORCE_CHARSET) == 'utf8') - { + if ($arrayres && is_array($arrayres)) { + foreach ($arrayres as $key => $val) { + if (!empty($conf->global->IMPORT_CSV_FORCE_CHARSET)) { // Forced charset + if (strtolower($conf->global->IMPORT_CSV_FORCE_CHARSET) == 'utf8') { $newarrayres[$key]['val'] = $val; $newarrayres[$key]['type'] = (dol_strlen($val) ? 1 : -1); // If empty we considere it's null } else { @@ -268,8 +267,7 @@ class ImportCsv extends ModeleImports } } else // Autodetect format (UTF8 or ISO) { - if (utf8_check($val)) - { + if (utf8_check($val)) { $newarrayres[$key]['val'] = $val; $newarrayres[$key]['type'] = (dol_strlen($val) ? 1 : -1); // If empty we considere it's null } else { @@ -333,8 +331,7 @@ class ImportCsv extends ModeleImports //var_dump($sort_array_match_file_to_database); - if (count($arrayrecord) == 0 || (count($arrayrecord) == 1 && empty($arrayrecord[0]['val']))) - { + if (count($arrayrecord) == 0 || (count($arrayrecord) == 1 && empty($arrayrecord[0]['val']))) { //print 'W'; $this->warnings[$warning]['lib'] = $langs->trans('EmptyLine'); $this->warnings[$warning]['type'] = 'EMPTY'; @@ -344,8 +341,7 @@ class ImportCsv extends ModeleImports $updatedone = false; $insertdone = false; // For each table to insert, me make a separate insert - foreach ($objimport->array_import_tables[0] as $alias => $tablename) - { + foreach ($objimport->array_import_tables[0] as $alias => $tablename) { // Build sql request $sql = ''; $listfields = array(); @@ -354,16 +350,19 @@ class ImportCsv extends ModeleImports $errorforthistable = 0; // Define $tablewithentity_cache[$tablename] if not already defined - if (!isset($tablewithentity_cache[$tablename])) // keep this test with "isset" - { + if (!isset($tablewithentity_cache[$tablename])) { // keep this test with "isset" dol_syslog("Check if table ".$tablename." has an entity field"); $resql = $this->db->DDLDescTable($tablename, 'entity'); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) $tablewithentity_cache[$tablename] = 1; // table contains entity field - else $tablewithentity_cache[$tablename] = 0; // table does not contains entity field - } else dol_print_error($this->db); + if ($obj) { + $tablewithentity_cache[$tablename] = 1; // table contains entity field + } else { + $tablewithentity_cache[$tablename] = 0; // table does not contains entity field + } + } else { + dol_print_error($this->db); + } } else { //dol_syslog("Table ".$tablename." check for entity into cache is ".$tablewithentity_cache[$tablename]); } @@ -375,43 +374,43 @@ class ImportCsv extends ModeleImports } // Loop on each fields in the match array: $key = 1..n, $val=alias of field (s.nom) - foreach ($sort_array_match_file_to_database as $key => $val) - { + foreach ($sort_array_match_file_to_database as $key => $val) { $fieldalias = preg_replace('/\..*$/i', '', $val); $fieldname = preg_replace('/^.*\./i', '', $val); - if ($alias != $fieldalias) continue; // Not a field of current table + if ($alias != $fieldalias) { + continue; // Not a field of current table + } - if ($key <= $maxfields) - { + if ($key <= $maxfields) { // Set $newval with value to insert and set $listvalues with sql request part for insert $newval = ''; - if ($arrayrecord[($key - 1)]['type'] > 0) $newval = $arrayrecord[($key - 1)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value + if ($arrayrecord[($key - 1)]['type'] > 0) { + $newval = $arrayrecord[($key - 1)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value + } // Make some tests on $newval // Is it a required field ? - if (preg_match('/\*/', $objimport->array_import_fields[0][$val]) && ((string) $newval == '')) - { + if (preg_match('/\*/', $objimport->array_import_fields[0][$val]) && ((string) $newval == '')) { $this->errors[$error]['lib'] = $langs->trans('ErrorMissingMandatoryValue', $key); $this->errors[$error]['type'] = 'NOTNULL'; $errorforthistable++; $error++; - } - // Test format only if field is not a missing mandatory field (field may be a value or empty but not mandatory) - else { + } else { + // Test format only if field is not a missing mandatory field (field may be a value or empty but not mandatory) // We convert field if required - if (!empty($objimport->array_import_convertvalue[0][$val])) - { + if (!empty($objimport->array_import_convertvalue[0][$val])) { //print 'Must convert '.$newval.' with rule '.join(',',$objimport->array_import_convertvalue[0][$val]).'. '; if ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeid' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromref' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel' - ) - { + ) { // New val can be an id or ref. If it start with id: it is forced to id, if it start with ref: it is forced to ref. It not, we try to guess. $isidorref = 'id'; - if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) $isidorref = 'ref'; + if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) { + $isidorref = 'ref'; + } $newval = preg_replace('/^(id|ref):/i', '', $newval); // Remove id: or ref: that was used to force if field is id or ref //print 'Val is now '.$newval.' and is type '.$isidorref."
    \n"; @@ -420,13 +419,11 @@ class ImportCsv extends ModeleImports $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; $method = $objimport->array_import_convertvalue[0][$val]['method']; - if ($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] != '') - { + if ($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] != '') { $newval = $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval]; } else { $resultload = dol_include_once($file); - if (empty($resultload)) - { + if (empty($resultload)) { dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method); break; } @@ -436,35 +433,37 @@ class ImportCsv extends ModeleImports if ($class == 'AccountingAccount') { //var_dump($arrayrecord[0]['val']); /*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php'; - $tmpchartofaccount = new AccountancySystem($this->db); - $tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); - var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']); - if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val']) - { - $this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); - $this->errors[$error]['type']='RESTRICTONCURRENCTCHART'; - $errorforthistable++; - $error++; - }*/ + $tmpchartofaccount = new AccountancySystem($this->db); + $tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); + var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']); + if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val']) + { + $this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); + $this->errors[$error]['type']='RESTRICTONCURRENCTCHART'; + $errorforthistable++; + $error++; + }*/ $param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart. } call_user_func_array(array($classinstance, $method), $param_array); // If not found, try the fetch from label - if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') - { + if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') { $param_array = array('', '', $newval); call_user_func_array(array($classinstance, $method), $param_array); } $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] = $classinstance->id; //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. '; - if ($classinstance->id != '') // id may be 0, it is a found value - { + if ($classinstance->id != '') { // id may be 0, it is a found value $newval = $classinstance->id; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); - else $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + } else { + $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -473,7 +472,9 @@ class ImportCsv extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeandlabel') { $isidorref = 'id'; - if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) $isidorref = 'ref'; + if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) { + $isidorref = 'ref'; + } $newval = preg_replace('/^(id|ref):/i', '', $newval); if ($isidorref == 'ref') { @@ -495,12 +496,14 @@ class ImportCsv extends ModeleImports $param_array = array('', $newval, $code); call_user_func_array(array($classinstance, $method), $param_array); $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'.$code][$newval] = $classinstance->id; - if ($classinstance->id > 0) // we found record - { + if ($classinstance->id > 0) { // we found record $newval = $classinstance->id; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -508,19 +511,19 @@ class ImportCsv extends ModeleImports } } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'zeroifnull') { - if (empty($newval)) $newval = '0'; + if (empty($newval)) { + $newval = '0'; + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeunits' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchscalefromcodeunits') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; $method = $objimport->array_import_convertvalue[0][$val]['method']; $units = $objimport->array_import_convertvalue[0][$val]['units']; - if ($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'.$units][$newval] != '') - { + if ($this->cacheconvert[$file.'_'.$class.'_'.$method.'_'.$units][$newval] != '') { $newval = $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'.$units][$newval]; } else { $resultload = dol_include_once($file); - if (empty($resultload)) - { + if (empty($resultload)) { dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method.', units='.$units); break; } @@ -530,77 +533,88 @@ class ImportCsv extends ModeleImports $scaleorid = (($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeunits') ? $classinstance->id : $classinstance->scale); $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'.$units][$newval] = $scaleorid; //print 'We have made a '.$class.'->'.$method." to get a value from key '".$newval."' and we got '".$scaleorid."'.";exit; - if ($classinstance->id > 0) // we found record - { + if ($classinstance->id > 0) { // we found record $newval = $scaleorid ? $scaleorid : 0; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; } } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomercodeifauto') { - if (strtolower($newval) == 'auto') - { + if (strtolower($newval) == 'auto') { $this->thirpartyobject->get_codeclient(0, 0); $newval = $this->thirpartyobject->code_client; //print 'code_client='.$newval; } - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsuppliercodeifauto') { - if (strtolower($newval) == 'auto') - { + if (strtolower($newval) == 'auto') { $newval = $this->thirpartyobject->get_codefournisseur(0, 1); $newval = $this->thirpartyobject->code_fournisseur; //print 'code_fournisseur='.$newval; } - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomeraccountancycodeifauto') { - if (strtolower($newval) == 'auto') - { + if (strtolower($newval) == 'auto') { $this->thirpartyobject->get_codecompta('customer'); $newval = $this->thirpartyobject->code_compta; //print 'code_compta='.$newval; } - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsupplieraccountancycodeifauto') { - if (strtolower($newval) == 'auto') - { + if (strtolower($newval) == 'auto') { $this->thirpartyobject->get_codecompta('supplier'); $newval = $this->thirpartyobject->code_compta_fournisseur; - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } //print 'code_compta_fournisseur='.$newval; } - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getrefifauto') { $defaultref = ''; // TODO provide the $modTask (module of generation of ref) as parameter of import_insert function $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; - if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) - { + if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php'; $modTask = new $obj; $defaultref = $modTask->getNextValue(null, null); } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = ''; + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } $newval = $defaultref; } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'compute') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; $method = $objimport->array_import_convertvalue[0][$val]['method']; $resultload = dol_include_once($file); - if (empty($resultload)) - { + if (empty($resultload)) { dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method); break; } $classinstance = new $class($this->db); $res = call_user_func_array(array($classinstance, $method), array(&$arrayrecord)); if ($res < 0) { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -615,37 +629,35 @@ class ImportCsv extends ModeleImports } // Test regexp - if (!empty($objimport->array_import_regex[0][$val]) && ($newval != '')) - { + if (!empty($objimport->array_import_regex[0][$val]) && ($newval != '')) { // If test is "Must exist in a field@table or field@table:..." $reg = array(); - if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) - { + if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) { $field = $reg[1]; $table = $reg[2]; $filter = !empty($reg[3]) ?substr($reg[3], 1) : ''; $cachekey = $field.'@'.$table; - if (!empty($filter)) $cachekey .= ':'.$filter; + if (!empty($filter)) { + $cachekey .= ':'.$filter; + } // Load content of field@table into cache array - if (!is_array($this->cachefieldtable[$cachekey])) // If content of field@table not already loaded into cache - { + if (!is_array($this->cachefieldtable[$cachekey])) { // If content of field@table not already loaded into cache $sql = "SELECT ".$field." as aliasfield FROM ".$table; - if (!empty($filter)) - { + if (!empty($filter)) { $sql .= ' WHERE '.$filter; } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($obj) $this->cachefieldtable[$cachekey][] = $obj->aliasfield; + if ($obj) { + $this->cachefieldtable[$cachekey][] = $obj->aliasfield; + } $i++; } } else { @@ -654,18 +666,18 @@ class ImportCsv extends ModeleImports } // Now we check cache is not empty (should not) and key is into cache - if (!is_array($this->cachefieldtable[$cachekey]) || !in_array($newval, $this->cachefieldtable[$cachekey])) - { + if (!is_array($this->cachefieldtable[$cachekey]) || !in_array($newval, $this->cachefieldtable[$cachekey])) { $tableforerror = $table; - if (!empty($filter)) $tableforerror .= ':'.$filter; + if (!empty($filter)) { + $tableforerror .= ':'.$filter; + } $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorFieldValueNotIn', $key, $newval, $field, $tableforerror); $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; } - } - // If test is just a static regex - elseif (!preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) { + } elseif (!preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) { + // If test is just a static regex //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
    "; $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]); $this->errors[$error]['type'] = 'REGEX'; @@ -694,26 +706,23 @@ class ImportCsv extends ModeleImports } // We add hidden fields (but only if there is at least one field to add into table) - if (!empty($listfields) && is_array($objimport->array_import_fieldshidden[0])) - { + if (!empty($listfields) && is_array($objimport->array_import_fieldshidden[0])) { // Loop on each hidden fields to add them into listfields/listvalues - foreach ($objimport->array_import_fieldshidden[0] as $key => $val) - { - if (!preg_match('/^'.preg_quote($alias, '/').'\./', $key)) continue; // Not a field of current table - if ($val == 'user->id') - { + foreach ($objimport->array_import_fieldshidden[0] as $key => $val) { + if (!preg_match('/^'.preg_quote($alias, '/').'\./', $key)) { + continue; // Not a field of current table + } + if ($val == 'user->id') { $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = $user->id; - } elseif (preg_match('/^lastrowid-/', $val)) - { + } elseif (preg_match('/^lastrowid-/', $val)) { $tmp = explode('-', $val); $lastinsertid = (isset($last_insert_id_array[$tmp[1]])) ? $last_insert_id_array[$tmp[1]] : 0; $keyfield = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listfields[] = $keyfield; $listvalues[] = $lastinsertid; //print $key."-".$val."-".$listfields."-".$listvalues."
    ";exit; - } elseif (preg_match('/^const-/', $val)) - { + } elseif (preg_match('/^const-/', $val)) { $tmp = explode('-', $val, 2); $listfields[] = preg_replace('/^'.preg_quote($alias, '/').'\./', '', $key); $listvalues[] = "'".$tmp[1]."'"; @@ -728,11 +737,9 @@ class ImportCsv extends ModeleImports // If no error for this $alias/$tablename, we have a complete $listfields and $listvalues that are defined // so we can try to make the insert or update now. - if (!$errorforthistable) - { + if (!$errorforthistable) { //print "$alias/$tablename/$listfields/$listvalues
    "; - if (!empty($listfields)) - { + if (!empty($listfields)) { $updatedone = false; $insertdone = false; @@ -780,8 +787,10 @@ class ImportCsv extends ModeleImports // Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object' $sqlSelect = 'SELECT rowid FROM '.$tablename; - if (empty($keyfield)) $keyfield = 'rowid'; - $sqlSelect .= ' WHERE '.$keyfield.' = '.$lastinsertid; + if (empty($keyfield)) { + $keyfield = 'rowid'; + } + $sqlSelect .= ' WHERE '.$keyfield.' = '.((int) $lastinsertid); $resql = $this->db->query($sqlSelect); if ($resql) { @@ -812,8 +821,10 @@ class ImportCsv extends ModeleImports } $sqlstart .= ' SET '.implode(', ', $set); - if (empty($keyfield)) $keyfield = 'rowid'; - $sqlend = ' WHERE '.$keyfield.' = '.$lastinsertid; + if (empty($keyfield)) { + $keyfield = 'rowid'; + } + $sqlend = ' WHERE '.$keyfield.' = '.((int) $lastinsertid); $sql = $sqlstart.$sqlend; @@ -848,11 +859,9 @@ class ImportCsv extends ModeleImports //dol_syslog("import_csv.modules", LOG_DEBUG); // Run insert request - if ($sql) - { + if ($sql) { $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr). $insertdone = true; } else { @@ -870,11 +879,17 @@ class ImportCsv extends ModeleImports }*/ } - if ($error) break; + if ($error) { + break; + } } - if ($updatedone) $this->nbupdate++; - if ($insertdone) $this->nbinsert++; + if ($updatedone) { + $this->nbupdate++; + } + if ($insertdone) { + $this->nbinsert++; + } } return 1; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 5b2e339a588..d90a52755e3 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -112,15 +112,14 @@ class ImportXlsx extends ModeleImports $this->picto = 'mime/xls'; // Picto (This is not used by the example file code as Mime type, too bad ...) $this->version = '1.0'; // Driver version // If driver use an external library, put its name here - require_once DOL_DOCUMENT_ROOT . '/includes/phpoffice/autoloader.php'; - require_once DOL_DOCUMENT_ROOT . '/includes/Psr/autoloader.php'; - require_once PHPEXCELNEW_PATH . 'Spreadsheet.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/phpoffice/phpspreadsheet/src/autoloader.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/Psr/autoloader.php'; + require_once PHPEXCELNEW_PATH.'Spreadsheet.php'; $this->workbook = new Spreadsheet(); //if ($this->id == 'excel2007new') { - if (!class_exists('ZipArchive')) // For Excel2007 - { + if (!class_exists('ZipArchive')) { // For Excel2007 $langs->load("errors"); $this->error = $langs->trans('ErrorPHPNeedModule', 'zip'); return -1; @@ -130,7 +129,9 @@ class ImportXlsx extends ModeleImports $this->version_lib = '1.8.0'; $this->datatoimport = $datatoimport; - if (preg_match('/^societe_/', $datatoimport)) $this->thirpartyobject = new Societe($this->db); + if (preg_match('/^societe_/', $datatoimport)) { + $this->thirpartyobject = new Societe($this->db); + } } @@ -308,8 +309,9 @@ class ImportXlsx extends ModeleImports global $conf; $rowcount = $this->workbook->getActiveSheet()->getHighestDataRow(); - if ($this->record > $rowcount) + if ($this->record > $rowcount) { return false; + } $array = array(); $xlsx = new Xlsx(); $info = $xlsx->listWorksheetinfo($this->file); @@ -391,15 +393,19 @@ class ImportXlsx extends ModeleImports $errorforthistable = 0; // Define $tablewithentity_cache[$tablename] if not already defined - if (!isset($tablewithentity_cache[$tablename])) // keep this test with "isset" - { + if (!isset($tablewithentity_cache[$tablename])) { // keep this test with "isset" dol_syslog("Check if table " . $tablename . " has an entity field"); $resql = $this->db->DDLDescTable($tablename, 'entity'); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) $tablewithentity_cache[$tablename] = 1; // table contains entity field - else $tablewithentity_cache[$tablename] = 0; // table does not contains entity field - } else dol_print_error($this->db); + if ($obj) { + $tablewithentity_cache[$tablename] = 1; // table contains entity field + } else { + $tablewithentity_cache[$tablename] = 0; // table does not contains entity field + } + } else { + dol_print_error($this->db); + } } else { //dol_syslog("Table ".$tablename." check for entity into cache is ".$tablewithentity_cache[$tablename]); } @@ -415,12 +421,16 @@ class ImportXlsx extends ModeleImports $fieldalias = preg_replace('/\..*$/i', '', $val); $fieldname = preg_replace('/^.*\./i', '', $val); - if ($alias != $fieldalias) continue; // Not a field of current table + if ($alias != $fieldalias) { + continue; // Not a field of current table + } if ($key <= $maxfields) { // Set $newval with value to insert and set $listvalues with sql request part for insert $newval = ''; - if ($arrayrecord[($key)]['type'] > 0) $newval = $arrayrecord[($key)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value + if ($arrayrecord[($key)]['type'] > 0) { + $newval = $arrayrecord[($key)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value + } // Make some tests on $newval @@ -430,20 +440,20 @@ class ImportXlsx extends ModeleImports $this->errors[$error]['type'] = 'NOTNULL'; $errorforthistable++; $error++; - } - // Test format only if field is not a missing mandatory field (field may be a value or empty but not mandatory) - else { + } else { + // Test format only if field is not a missing mandatory field (field may be a value or empty but not mandatory) // We convert field if required if (!empty($objimport->array_import_convertvalue[0][$val])) { //print 'Must convert '.$newval.' with rule '.join(',',$objimport->array_import_convertvalue[0][$val]).'. '; - if ( - $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeid' + if ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeid' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromref' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel' ) { // New val can be an id or ref. If it start with id: it is forced to id, if it start with ref: it is forced to ref. It not, we try to guess. $isidorref = 'id'; - if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) $isidorref = 'ref'; + if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) { + $isidorref = 'ref'; + } $newval = preg_replace('/^(id|ref):/i', '', $newval); // Remove id: or ref: that was used to force if field is id or ref //print 'Val is now '.$newval.' and is type '.$isidorref."
    \n"; @@ -465,16 +475,16 @@ class ImportXlsx extends ModeleImports if ($class == 'AccountingAccount') { //var_dump($arrayrecord[0]['val']); /*include_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancysystem.class.php'; - $tmpchartofaccount = new AccountancySystem($this->db); - $tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); - var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']); - if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val']) - { - $this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); - $this->errors[$error]['type']='RESTRICTONCURRENCTCHART'; - $errorforthistable++; - $error++; - }*/ + $tmpchartofaccount = new AccountancySystem($this->db); + $tmpchartofaccount->fetch($conf->global->CHARTOFACCOUNTS); + var_dump($tmpchartofaccount->ref.' - '.$arrayrecord[0]['val']); + if ((! ($conf->global->CHARTOFACCOUNTS > 0)) || $tmpchartofaccount->ref != $arrayrecord[0]['val']) + { + $this->errors[$error]['lib']=$langs->trans('ErrorImportOfChartLimitedToCurrentChart', $tmpchartofaccount->ref); + $this->errors[$error]['type']='RESTRICTONCURRENCTCHART'; + $errorforthistable++; + $error++; + }*/ $param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart. } call_user_func_array(array($classinstance, $method), $param_array); @@ -485,13 +495,16 @@ class ImportXlsx extends ModeleImports } $this->cacheconvert[$file . '_' . $class . '_' . $method . '_'][$newval] = $classinstance->id; //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. '; - if ($classinstance->id != '') // id may be 0, it is a found value - { + if ($classinstance->id != '') { // id may be 0, it is a found value $newval = $classinstance->id; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); - else $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + } else { + $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -500,7 +513,9 @@ class ImportXlsx extends ModeleImports } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeandlabel') { $isidorref = 'id'; - if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) $isidorref = 'ref'; + if (!is_numeric($newval) && $newval != '' && !preg_match('/^id:/i', $newval)) { + $isidorref = 'ref'; + } $newval = preg_replace('/^(id|ref):/i', '', $newval); if ($isidorref == 'ref') { @@ -522,12 +537,14 @@ class ImportXlsx extends ModeleImports $param_array = array('', $newval, $code); call_user_func_array(array($classinstance, $method), $param_array); $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $code][$newval] = $classinstance->id; - if ($classinstance->id > 0) // we found record - { + if ($classinstance->id > 0) { // we found record $newval = $classinstance->id; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -535,7 +552,9 @@ class ImportXlsx extends ModeleImports } } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'zeroifnull') { - if (empty($newval)) $newval = '0'; + if (empty($newval)) { + $newval = '0'; + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeunits' || $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchscalefromcodeunits') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); $class = $objimport->array_import_convertvalue[0][$val]['class']; @@ -555,12 +574,14 @@ class ImportXlsx extends ModeleImports $scaleorid = (($objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeunits') ? $classinstance->id : $classinstance->scale); $this->cacheconvert[$file . '_' . $class . '_' . $method . '_' . $units][$newval] = $scaleorid; //print 'We have made a '.$class.'->'.$method." to get a value from key '".$newval."' and we got '".$scaleorid."'.";exit; - if ($classinstance->id > 0) // we found record - { + if ($classinstance->id > 0) { // we found record $newval = $scaleorid ? $scaleorid : 0; } else { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -572,29 +593,39 @@ class ImportXlsx extends ModeleImports $newval = $this->thirpartyobject->code_client; //print 'code_client='.$newval; } - if (empty($newval)) $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsuppliercodeifauto') { if (strtolower($newval) == 'auto') { $newval = $this->thirpartyobject->get_codefournisseur(0, 1); $newval = $this->thirpartyobject->code_fournisseur; //print 'code_fournisseur='.$newval; } - if (empty($newval)) $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getcustomeraccountancycodeifauto') { if (strtolower($newval) == 'auto') { $this->thirpartyobject->get_codecompta('customer'); $newval = $this->thirpartyobject->code_compta; //print 'code_compta='.$newval; } - if (empty($newval)) $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getsupplieraccountancycodeifauto') { if (strtolower($newval) == 'auto') { $this->thirpartyobject->get_codecompta('supplier'); $newval = $this->thirpartyobject->code_compta_fournisseur; - if (empty($newval)) $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key - 1)]['type'] = -1; // If we get empty value, we will use "null" + } //print 'code_compta_fournisseur='.$newval; } - if (empty($newval)) $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + if (empty($newval)) { + $arrayrecord[($key)]['type'] = -1; // If we get empty value, we will use "null" + } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'getrefifauto') { $defaultref = ''; // TODO provide the $modTask (module of generation of ref) as parameter of import_insert function @@ -604,7 +635,9 @@ class ImportXlsx extends ModeleImports $modTask = new $obj; $defaultref = $modTask->getNextValue(null, null); } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = ''; + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } $newval = $defaultref; } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'compute') { $file = (empty($objimport->array_import_convertvalue[0][$val]['classfile']) ? $objimport->array_import_convertvalue[0][$val]['file'] : $objimport->array_import_convertvalue[0][$val]['classfile']); @@ -618,8 +651,11 @@ class ImportXlsx extends ModeleImports $classinstance = new $class($this->db); $res = call_user_func_array(array($classinstance, $method), array(&$arrayrecord)); if ($res < 0) { - if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); - else $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + } else { + $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; + } $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -643,11 +679,12 @@ class ImportXlsx extends ModeleImports $filter = !empty($reg[3]) ? substr($reg[3], 1) : ''; $cachekey = $field . '@' . $table; - if (!empty($filter)) $cachekey .= ':' . $filter; + if (!empty($filter)) { + $cachekey .= ':' . $filter; + } // Load content of field@table into cache array - if (!is_array($this->cachefieldtable[$cachekey])) // If content of field@table not already loaded into cache - { + if (!is_array($this->cachefieldtable[$cachekey])) { // If content of field@table not already loaded into cache $sql = "SELECT " . $field . " as aliasfield FROM " . $table; if (!empty($filter)) { $sql .= ' WHERE ' . $filter; @@ -659,7 +696,9 @@ class ImportXlsx extends ModeleImports $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($obj) $this->cachefieldtable[$cachekey][] = $obj->aliasfield; + if ($obj) { + $this->cachefieldtable[$cachekey][] = $obj->aliasfield; + } $i++; } } else { @@ -670,15 +709,16 @@ class ImportXlsx extends ModeleImports // Now we check cache is not empty (should not) and key is into cache if (!is_array($this->cachefieldtable[$cachekey]) || !in_array($newval, $this->cachefieldtable[$cachekey])) { $tableforerror = $table; - if (!empty($filter)) $tableforerror .= ':' . $filter; + if (!empty($filter)) { + $tableforerror .= ':' . $filter; + } $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorFieldValueNotIn', $key, $newval, $field, $tableforerror); $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; } - } - // If test is just a static regex - elseif (!preg_match('/' . $objimport->array_import_regex[0][$val] . '/i', $newval)) { + } elseif (!preg_match('/' . $objimport->array_import_regex[0][$val] . '/i', $newval)) { + // If test is just a static regex //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
    "; $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]); $this->errors[$error]['type'] = 'REGEX'; @@ -695,9 +735,13 @@ class ImportXlsx extends ModeleImports $listfields[] = $fieldname; // Note: arrayrecord (and 'type') is filled with ->import_read_record called by import.php page before calling import_insert - if (empty($newval) && $arrayrecord[($key)]['type'] < 0) $listvalues[] = ($newval == '0' ? $newval : "null"); - elseif (empty($newval) && $arrayrecord[($key)]['type'] == 0) $listvalues[] = "''"; - else $listvalues[] = "'" . $this->db->escape($newval) . "'"; + if (empty($newval) && $arrayrecord[($key)]['type'] < 0) { + $listvalues[] = ($newval == '0' ? $newval : "null"); + } elseif (empty($newval) && $arrayrecord[($key)]['type'] == 0) { + $listvalues[] = "''"; + } else { + $listvalues[] = "'" . $this->db->escape($newval) . "'"; + } } $i++; } @@ -706,7 +750,9 @@ class ImportXlsx extends ModeleImports if (!empty($listfields) && is_array($objimport->array_import_fieldshidden[0])) { // Loop on each hidden fields to add them into listfields/listvalues foreach ($objimport->array_import_fieldshidden[0] as $key => $val) { - if (!preg_match('/^' . preg_quote($alias, '/') . '\./', $key)) continue; // Not a field of current table + if (!preg_match('/^' . preg_quote($alias, '/') . '\./', $key)) { + continue; // Not a field of current table + } if ($val == 'user->id') { $listfields[] = preg_replace('/^' . preg_quote($alias, '/') . '\./', '', $key); $listvalues[] = $user->id; @@ -781,8 +827,10 @@ class ImportXlsx extends ModeleImports // Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object' $sqlSelect = 'SELECT rowid FROM ' . $tablename; - if (empty($keyfield)) $keyfield = 'rowid'; - $sqlSelect .= ' WHERE ' . $keyfield . ' = ' . $lastinsertid; + if (empty($keyfield)) { + $keyfield = 'rowid'; + } + $sqlSelect .= ' WHERE ' . $keyfield . ' = ' .((int) $lastinsertid); $resql = $this->db->query($sqlSelect); if ($resql) { @@ -813,8 +861,10 @@ class ImportXlsx extends ModeleImports } $sqlstart .= ' SET ' . implode(', ', $set); - if (empty($keyfield)) $keyfield = 'rowid'; - $sqlend = ' WHERE ' . $keyfield . ' = ' . $lastinsertid; + if (empty($keyfield)) { + $keyfield = 'rowid'; + } + $sqlend = ' WHERE ' . $keyfield . ' = '.((int) $lastinsertid); $sql = $sqlstart . $sqlend; @@ -869,11 +919,17 @@ class ImportXlsx extends ModeleImports }*/ } - if ($error) break; + if ($error) { + break; + } } - if ($updatedone) $this->nbupdate++; - if ($insertdone) $this->nbinsert++; + if ($updatedone) { + $this->nbupdate++; + } + if ($insertdone) { + $this->nbinsert++; + } } return 1; diff --git a/htdocs/core/modules/import/index.html b/htdocs/core/modules/import/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 27b9a6e9cf4..d875afc5c4f 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -173,12 +173,9 @@ class ModeleImports // Recherche des fichiers drivers imports disponibles $i = 0; - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match("/^import_(.*)\.modules\.php/i", $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match("/^import_(.*)\.modules\.php/i", $file, $reg)) { $moduleid = $reg[1]; // Loading Class diff --git a/htdocs/core/modules/index.html b/htdocs/core/modules/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index 2820ea00ac5..cbf668b6c67 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -75,25 +75,22 @@ class mailing_advthirdparties extends MailingTargets if (($type_of_target == 1) || ($type_of_target == 3)) { // Select the third parties from category - if (count($socid) > 0) - { + if (count($socid) > 0) { $sql = "SELECT s.rowid as id, s.email as email, s.nom as name, null as fk_contact"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT OUTER JOIN ".MAIN_DB_PREFIX."societe_extrafields se ON se.fk_object=s.rowid"; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; - $sql .= " AND s.rowid IN (".implode(',', $socid).")"; + $sql .= " AND s.rowid IN (".$this->db->sanitize(implode(',', $socid)).")"; $sql .= " ORDER BY email"; // Stock recipients emails into targets table $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; dol_syslog(get_class($this)."::add_to_target_spec mailing ".$num." targets found", LOG_DEBUG); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); if (!empty($obj->email) && filter_var($obj->email, FILTER_VALIDATE_EMAIL)) { @@ -123,30 +120,27 @@ class mailing_advthirdparties extends MailingTargets if (($type_of_target == 1) || ($type_of_target == 2) || ($type_of_target == 4)) { // Select the third parties from category - if (count($socid) > 0 || count($contactid) > 0) - { + if (count($socid) > 0 || count($contactid) > 0) { $sql = "SELECT socp.rowid as id, socp.email as email, socp.lastname as lastname, socp.firstname as firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as socp"; $sql .= " WHERE socp.entity IN (".getEntity('socpeople').")"; if (count($contactid) > 0) { - $sql .= " AND socp.rowid IN (".implode(',', $contactid).")"; + $sql .= " AND socp.rowid IN (".$this->db->sanitize(implode(',', $contactid)).")"; } if (count($socid) > 0) { - $sql .= " AND socp.fk_soc IN (".implode(',', $socid).")"; + $sql .= " AND socp.fk_soc IN (".$this->db->sanitize(implode(',', $socid)).")"; } $sql .= " ORDER BY email"; // Stock recipients emails into targets table $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; dol_syslog(get_class($this)."::add_to_target_spec mailing ".$num." targets found"); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); if (!empty($obj->email) && filter_var($obj->email, FILTER_VALIDATE_EMAIL)) { @@ -246,25 +240,34 @@ class mailing_advthirdparties extends MailingTargets //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if (empty($conf->categorie->enabled)) $num = 0; // Force empty list if category module is not enabled + if (empty($conf->categorie->enabled)) { + $num = 0; // Force empty list if category module is not enabled + } - if ($num) $s .= ''; - else $s .= ''; + if ($num) { + $s .= ''; + } else { + $s .= ''; + } $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $type = ''; - if ($obj->type == 1) $type = $langs->trans("Supplier"); - if ($obj->type == 2) $type = $langs->trans("Customer"); + if ($obj->type == 1) { + $type = $langs->trans("Supplier"); + } + if ($obj->type == 2) { + $type = $langs->trans("Customer"); + } $s .= ''; $i++; } diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index deb1b1e12c6..4bd03593e09 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -143,17 +143,17 @@ class mailing_contacts1 extends MailingTargets $s .= $langs->trans("PostOrFunction").': '; $s .= ''; $s .= ' '; @@ -177,14 +177,11 @@ class mailing_contacts1 extends MailingTargets $s .= ''; $s .= '
    '; @@ -205,23 +204,28 @@ class mailing_contacts1 extends MailingTargets $sql .= " WHERE active > 0"; $sql .= " ORDER BY label"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) $s .= ''; - else $s .= ''; + if ($num) { + $s .= ''; + } else { + $s .= ''; + } $s .= ''; $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $level = $langs->trans($obj->code); - if ($level == $obj->code) $level = $langs->trans($obj->label); + if ($level == $obj->code) { + $level = $langs->trans($obj->label); + } $s .= ''; $i++; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } $s .= ''; //$s.=''; $s .= ''; @@ -248,14 +252,11 @@ class mailing_contacts1 extends MailingTargets $s .= ''; $s .= ' '; @@ -287,14 +290,11 @@ class mailing_contacts1 extends MailingTargets $s .= ''; return $s; @@ -348,29 +350,41 @@ class mailing_contacts1 extends MailingTargets $sql .= " WHERE active > 0"; $sql .= " ORDER BY label"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $prospectlevel[$obj->code] = $obj->label; $i++; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } // Request must return: id, email, fk_contact, lastname, firstname, other $sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact, sp.lastname, sp.firstname, sp.civility as civility_id, sp.poste as jobposition,"; $sql .= " s.nom as companyname"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc"; - if ($filter_category <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie as c"; - if ($filter_category <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie_contact as cs"; - if ($filter_category_customer <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie as c2"; - if ($filter_category_customer <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c2s"; - if ($filter_category_supplier <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie as c3"; - if ($filter_category_supplier <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as c3s"; + if ($filter_category <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie as c"; + } + if ($filter_category <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie_contact as cs"; + } + if ($filter_category_customer <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie as c2"; + } + if ($filter_category_customer <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c2s"; + } + if ($filter_category_supplier <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie as c3"; + } + if ($filter_category_supplier <> 'all') { + $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as c3s"; + } $sql .= " WHERE sp.entity IN (".getEntity('socpeople').")"; $sql .= " AND sp.email <> ''"; $sql .= " AND sp.no_email = 0"; @@ -379,31 +393,54 @@ class mailing_contacts1 extends MailingTargets $sql .= " AND sp.statut = 1"; $sql .= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; // Filter on category - if ($filter_category <> 'all') $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_socpeople = sp.rowid"; - if ($filter_category <> 'all') $sql .= " AND c.label = '".$this->db->escape($filter_category)."'"; - if ($filter_category_customer <> 'all') $sql .= " AND c2s.fk_categorie = c2.rowid AND c2s.fk_soc = sp.fk_soc"; - if ($filter_category_customer <> 'all') $sql .= " AND c2.label = '".$this->db->escape($filter_category_customer)."'"; - if ($filter_category_supplier <> 'all') $sql .= " AND c3s.fk_categorie = c3.rowid AND c3s.fk_soc = sp.fk_soc"; - if ($filter_category_supplier <> 'all') $sql .= " AND c3.label = '".$this->db->escape($filter_category_supplier)."'"; + if ($filter_category <> 'all') { + $sql .= " AND cs.fk_categorie = c.rowid AND cs.fk_socpeople = sp.rowid"; + } + if ($filter_category <> 'all') { + $sql .= " AND c.label = '".$this->db->escape($filter_category)."'"; + } + if ($filter_category_customer <> 'all') { + $sql .= " AND c2s.fk_categorie = c2.rowid AND c2s.fk_soc = sp.fk_soc"; + } + if ($filter_category_customer <> 'all') { + $sql .= " AND c2.label = '".$this->db->escape($filter_category_customer)."'"; + } + if ($filter_category_supplier <> 'all') { + $sql .= " AND c3s.fk_categorie = c3.rowid AND c3s.fk_soc = sp.fk_soc"; + } + if ($filter_category_supplier <> 'all') { + $sql .= " AND c3.label = '".$this->db->escape($filter_category_supplier)."'"; + } // Filter on nature $key = $filter; { //print "xx".$key; - if ($key == 'prospects') $sql .= " AND s.client=2"; - foreach ($prospectlevel as $codelevel=>$valuelevel) if ($key == 'prospectslevel'.$codelevel) $sql .= " AND s.fk_prospectlevel='".$this->db->escape($codelevel)."'"; - if ($key == 'customers') $sql .= " AND s.client=1"; - if ($key == 'suppliers') $sql .= " AND s.fournisseur=1"; + if ($key == 'prospects') { + $sql .= " AND s.client=2"; } + foreach ($prospectlevel as $codelevel => $valuelevel) { + if ($key == 'prospectslevel'.$codelevel) { + $sql .= " AND s.fk_prospectlevel='".$this->db->escape($codelevel)."'"; + } + } + if ($key == 'customers') { + $sql .= " AND s.client=1"; + } + if ($key == 'suppliers') { + $sql .= " AND s.fournisseur=1"; + } + } // Filter on job position - $key = $filter_jobposition; - if (!empty($key) && $key != 'all') $sql .= " AND sp.poste ='".$this->db->escape($key)."'"; - $sql .= " ORDER BY sp.email"; + $key = $filter_jobposition; + if (!empty($key) && $key != 'all') { + $sql .= " AND sp.poste ='".$this->db->escape($key)."'"; + } + $sql .= " ORDER BY sp.email"; //print "wwwwwwx".$sql; // Stocke destinataires dans cibles - $result = $this->db->query($sql); - if ($result) - { + $result = $this->db->query($sql); + if ($result) { $num = $this->db->num_rows($result); $i = 0; $j = 0; @@ -411,23 +448,21 @@ class mailing_contacts1 extends MailingTargets dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found"); $old = ''; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($old <> $obj->email) - { + if ($old <> $obj->email) { $cibles[$j] = array( - 'email' => $obj->email, - 'fk_contact' => $obj->fk_contact, - 'lastname' => $obj->lastname, - 'firstname' => $obj->firstname, - 'other' => - ($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'. - ($langs->transnoentities("UserTitle").'='.($obj->civility_id ? $langs->transnoentities("Civility".$obj->civility_id) : '')).';'. - ($langs->transnoentities("JobPosition").'='.$obj->jobposition), - 'source_url' => $this->url($obj->id), - 'source_id' => $obj->id, - 'source_type' => 'contact' + 'email' => $obj->email, + 'fk_contact' => $obj->fk_contact, + 'lastname' => $obj->lastname, + 'firstname' => $obj->firstname, + 'other' => + ($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'. + ($langs->transnoentities("UserTitle").'='.($obj->civility_id ? $langs->transnoentities("Civility".$obj->civility_id) : '')).';'. + ($langs->transnoentities("JobPosition").'='.$obj->jobposition), + 'source_url' => $this->url($obj->id), + 'source_id' => $obj->id, + 'source_type' => 'contact' ); $old = $obj->email; $j++; @@ -441,6 +476,6 @@ class mailing_contacts1 extends MailingTargets return -1; } - return parent::addTargetsToDatabase($mailing_id, $cibles); + return parent::addTargetsToDatabase($mailing_id, $cibles); } } diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index 6c57baaa4da..bd553e1fd5d 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -20,7 +20,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; // CHANGE THIS: Class name must be called mailing_xxx with xxx=name of your selector /** - \class mailing_example + \class mailing_example \brief Class to manage a list of personalised recipients for mailing feature */ class mailing_example extends MailingTargets diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index d57d4e8061a..34a5bd34a1e 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -138,16 +138,16 @@ class mailing_fraise extends MailingTargets $sql .= " WHERE entity IN (".getEntity('member_type').")"; $sql .= " ORDER BY rowid"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $s .= ''; - if (!$num) $s .= ''; + if (!$num) { + $s .= ''; + } $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $s .= ''; - if (!$num) $s .= ''; + if (!$num) { + $s .= ''; + } $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $s .= ''; - else $s .= ''; + if ($num) { + $s .= ''; + } else { + $s .= ''; + } $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $type = ''; - if ($obj->type == 1) $type = $langs->trans("Supplier"); - if ($obj->type == 2) $type = $langs->trans("Customer"); + if ($obj->type == 1) { + $type = $langs->trans("Supplier"); + } + if ($obj->type == 2) { + $type = $langs->trans("Customer"); + } $s .= ''; $i++; } diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index d6eea141bab..7b5d4f38737 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -58,17 +58,17 @@ class mailing_thirdparties_services_expired extends MailingTargets // List of services $sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; - if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $sql .= " AND fk_product_type = 1"; // By default, only services + if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) { + $sql .= " AND fk_product_type = 1"; // By default, only services + } $sql .= " ORDER BY ref"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); dol_syslog("dolibarr_services_expired.modules.php:mailing_dolibarr_services_expired ".$num." services found"); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $i++; $this->arrayofproducts[$i] = $obj->ref; @@ -95,8 +95,7 @@ class mailing_thirdparties_services_expired extends MailingTargets $j = 0; $product = ''; - if ($key == '0') - { + if ($key == '0') { $this->error = "Error: You must choose a filter"; $this->errors[] = $this->error; return $this->error; @@ -119,19 +118,16 @@ class mailing_thirdparties_services_expired extends MailingTargets // Stocke destinataires dans cibles $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; dol_syslog(get_class($this)."::add_to_target ".$num." targets found"); $old = ''; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($old <> $obj->email) - { + if ($old <> $obj->email) { $cibles[$j] = array( 'email' => $obj->email, 'lastname' => $obj->name, // For thirdparties, lastname must be name @@ -201,7 +197,7 @@ class mailing_thirdparties_services_expired extends MailingTargets $sql .= " WHERE s.entity IN (".getEntity('societe').")"; $sql .= " AND s.rowid = c.fk_soc AND cd.fk_contrat = c.rowid AND s.email != ''"; $sql .= " AND cd.statut= 4 AND cd.fk_product=p.rowid"; - $sql .= " AND p.ref IN ('".join("','", $this->arrayofproducts)."')"; + $sql .= " AND p.ref IN (".$this->db->sanitize("'".join("','", $this->arrayofproducts)."'", 1).")"; $sql .= " AND cd.date_fin_validite < '".$this->db->idate($now)."'"; $a = parent::getNbOfRecipients($sql); @@ -221,10 +217,12 @@ class mailing_thirdparties_services_expired extends MailingTargets $s = $langs->trans("ProductOrService"); $s .= ''; diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index a31d1c41483..3ece88d4c1d 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -135,23 +135,19 @@ class mailing_xinputfile extends MailingTargets $upload_dir = $conf->mailing->dir_temp; - if (dol_mkdir($upload_dir) >= 0) - { + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['username']['tmp_name'], $upload_dir."/".$_FILES['username']['name'], 1, 0, $_FILES['username']['error']); - if (is_numeric($resupload) && $resupload > 0) - { + if (is_numeric($resupload) && $resupload > 0) { $cpt = 0; $file = $upload_dir."/".$_FILES['username']['name']; $handle = @fopen($file, "r"); - if ($handle) - { + if ($handle) { $i = 0; $j = 0; $old = ''; - while (!feof($handle)) - { + while (!feof($handle)) { $cpt++; $buffer = trim(fgets($handle)); $tab = explode(';', $buffer, 4); @@ -159,13 +155,10 @@ class mailing_xinputfile extends MailingTargets $name = $tab[1]; $firstname = $tab[2]; $other = $tab[3]; - if (!empty($buffer)) - { + if (!empty($buffer)) { //print 'xx'.dol_strlen($buffer).empty($buffer)."
    \n"; - if (isValidEMail($email)) - { - if ($old <> $email) - { + if (isValidEMail($email)) { + if ($old <> $email) { $cibles[$j] = array( 'email' => $email, 'lastname' => $name, @@ -182,15 +175,17 @@ class mailing_xinputfile extends MailingTargets $i++; $langs->load("errors"); $msg = $langs->trans("ErrorFoundBadEmailInFile", $i, $cpt, $email); - if (!empty($msg)) $this->error = $msg; - else $this->error = 'ErrorFoundBadEmailInFile '.$i.' '.$cpt.' '.$email; // We experience case where $langs->trans return an empty string. + if (!empty($msg)) { + $this->error = $msg; + } else { + $this->error = 'ErrorFoundBadEmailInFile '.$i.' '.$cpt.' '.$email; // We experience case where $langs->trans return an empty string. + } } } } fclose($handle); - if ($i > 0) - { + if ($i > 0) { return -$i; } } else { @@ -201,11 +196,9 @@ class mailing_xinputfile extends MailingTargets dol_syslog(get_class($this)."::add_to_target mailing ".$cpt." targets found"); } else { $langs->load("errors"); - if ($resupload < 0) // Unknown error - { + if ($resupload < 0) { // Unknown error $this->error = '
    '.$langs->trans("ErrorFileNotUploaded").'
    '; - } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus - { + } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) { // Files infected by a virus $this->error = '
    '.$langs->trans("ErrorFileIsInfectedWithAVirus").'
    '; } else // Known error { diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 9c6748a10c8..b2874b43ca0 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -133,14 +133,12 @@ class mailing_xinputuser extends MailingTargets $other = $tmparray[3]; $cibles = array(); - if (!empty($email)) - { - if (isValidEMail($email)) - { + if (!empty($email)) { + if (isValidEMail($email)) { $cibles[] = array( - 'email' => $email, - 'lastname' => $lastname, - 'firstname' => $firstname, + 'email' => $email, + 'lastname' => $lastname, + 'firstname' => $firstname, 'other' => $other, 'source_url' => '', 'source_id' => '', diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index e0fccd309ab..5ff5a1f767a 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/modules/member/doc/doc_generic_member_odt.modules.php + * \file htdocs/core/modules/member/doc/doc_generic_member_odt.class.php * \ingroup societe * \brief File of class to build ODT documents for members */ @@ -94,7 +94,9 @@ class doc_generic_member_odt extends ModelePDFMember // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -125,17 +127,20 @@ class doc_generic_member_odt extends ModelePDFMember $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MEMBER_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -153,8 +158,7 @@ class doc_generic_member_odt extends ModelePDFMember $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; $texte .= '
    '; @@ -204,15 +208,16 @@ class doc_generic_member_odt extends ModelePDFMember } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; @@ -235,7 +240,9 @@ class doc_generic_member_odt extends ModelePDFMember $dir = $conf->adherent->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; if (!file_exists($dir)) { @@ -258,7 +265,9 @@ class doc_generic_member_odt extends ModelePDFMember $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -305,8 +314,7 @@ class doc_generic_member_odt extends ModelePDFMember 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_WARNING); return -1; @@ -319,7 +327,9 @@ class doc_generic_member_odt extends ModelePDFMember $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($array_member, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -331,12 +341,15 @@ class doc_generic_member_odt extends ModelePDFMember 'substitutionarray'=>&$tmparray ); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) { + foreach ($tmparray as $key => $value) { try { if (preg_match('/logo$/', $key)) { // Image - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else { // Text $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -348,7 +361,7 @@ class doc_generic_member_odt extends ModelePDFMember // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); } catch (OdfException $e) { @@ -381,8 +394,9 @@ class doc_generic_member_odt extends ModelePDFMember $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/member/doc/index.html b/htdocs/core/modules/member/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php index 3cecb685f1d..1d1a892cc56 100644 --- a/htdocs/core/modules/member/doc/pdf_standard.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard.class.php @@ -82,14 +82,11 @@ class pdf_standard extends CommonStickerGenerator // Define logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if (!is_readable($logo)) - { + if (!is_readable($logo)) { $logo = ''; - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) - { + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $logo = $conf->mycompany->dir_output.'/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)) { $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; } } @@ -100,41 +97,38 @@ class pdf_standard extends CommonStickerGenerator // Define photo $dir = $conf->adherent->dir_output; - if (!empty($photo)) - { + if (!empty($photo)) { $file = get_exdir(0, 0, 0, 0, $member, 'member').'photos/'.$photo; $photo = $dir.'/'.$file; - if (!is_readable($photo)) $photo = ''; + if (!is_readable($photo)) { + $photo = ''; + } } // Define background image $backgroundimage = ''; - if (!empty($conf->global->ADHERENT_CARD_BACKGROUND) && file_exists($conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND)) - { + if (!empty($conf->global->ADHERENT_CARD_BACKGROUND) && file_exists($conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND)) { $backgroundimage = $conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND; } // Print lines - if ($this->code == "CARD") - { + if ($this->code == "CARD") { $this->Tformat = $this->_Avery_Labels["CARD"]; //$this->_Pointille($pdf,$_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,25); $this->_Croix($pdf, $_PosX, $_PosY, $_PosX + $this->_Width, $_PosY + $this->_Height, 0.1, 10); } // Background - if ($backgroundimage) - { + if ($backgroundimage) { $pdf->image($backgroundimage, $_PosX, $_PosY, $this->_Width, $this->_Height); } - $xleft = 2; $ytop = 2; + $xleft = 2; + $ytop = 2; // Top - if ($header != '') - { - if ($this->code == "CARD") - { + if ($header != '') { + if ($this->code == "CARD") { $pdf->SetDrawColor(128, 128, 128); $pdf->Line($_PosX, $_PosY + $this->_Line_Height + 1, $_PosX + $this->_Width, $_PosY + $this->_Line_Height + 1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0, 0, 0); @@ -147,39 +141,50 @@ class pdf_standard extends CommonStickerGenerator $ytop += (empty($header) ? 0 : (1 + $this->_Line_Height)); // Define widthtouse and heighttouse - $maxwidthtouse = round(($this->_Width - 2 * $xleft) * $imgscalewidth); $maxheighttouse = round(($this->_Height - 2 * $ytop) * $imgscaleheight); + $maxwidthtouse = round(($this->_Width - 2 * $xleft) * $imgscalewidth); + $maxheighttouse = round(($this->_Height - 2 * $ytop) * $imgscaleheight); $defaultratio = ($maxwidthtouse / $maxheighttouse); - $widthtouse = $maxwidthtouse; $heighttouse = 0; // old value for image + $widthtouse = $maxwidthtouse; + $heighttouse = 0; // old value for image $tmp = dol_getImageSize($photo, false); - if ($tmp['height']) - { + if ($tmp['height']) { $imgratio = $tmp['width'] / $tmp['height']; - if ($imgratio >= $defaultratio) { $widthtouse = $maxwidthtouse; $heighttouse = round($widthtouse / $imgratio); } else { $heightouse = $maxheighttouse; $widthtouse = round($heightouse * $imgratio); } + if ($imgratio >= $defaultratio) { + $widthtouse = $maxwidthtouse; + $heighttouse = round($widthtouse / $imgratio); + } else { + $heightouse = $maxheighttouse; + $widthtouse = round($heightouse * $imgratio); + } } //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; // Center - if ($textright == '') // Only a left part - { + if ($textright == '') { // Only a left part // Output left area - if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - else { + if ($textleft == '__LOGO__' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft == '__PHOTO__' && $photo) { + $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } - } elseif ($textleft != '' && $textright != '') // - { - if ($textleft == '__LOGO__' || $textleft == '__PHOTO__') - { - if ($textleft == '__LOGO__' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textleft == '__PHOTO__' && $photo) $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft != '' && $textright != '') { // + if ($textleft == '__LOGO__' || $textleft == '__PHOTO__') { + if ($textleft == '__LOGO__' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft == '__PHOTO__' && $photo) { + $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } $pdf->SetXY($_PosX + $xleft + $widthtouse + 1, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $xleft - $xleft - $widthtouse - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); - } elseif ($textright == '__LOGO__' || $textright == '__PHOTO__') - { - if ($textright == '__LOGO__' && $logo) $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '__LOGO__' || $textright == '__PHOTO__') { + if ($textright == '__LOGO__' && $logo) { + $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '__PHOTO__' && $photo) { + $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $widthtouse - $xleft - $xleft - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } else // text on halft left and text on half right @@ -192,19 +197,19 @@ class pdf_standard extends CommonStickerGenerator } else // Only a right part { // Output right area - if ($textright == '__LOGO__' && $logo) $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textright == '__PHOTO__' && $photo) $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - else { + if ($textright == '__LOGO__' && $logo) { + $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '__PHOTO__' && $photo) { + $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } } // Bottom - if ($footer != '') - { - if ($this->code == "CARD") - { + if ($footer != '') { + if ($this->code == "CARD") { $pdf->SetDrawColor(128, 128, 128); $pdf->Line($_PosX, $_PosY + $this->_Height - $this->_Line_Height - 2, $_PosX + $this->_Width, $_PosY + $this->_Height - $this->_Line_Height - 2); $pdf->SetDrawColor(0, 0, 0); @@ -247,9 +252,10 @@ class pdf_standard extends CommonStickerGenerator $this->code = $srctemplatepath; - if (is_object($object)) - { - if ($object->country == '-') $object->country = ''; + if (is_object($object)) { + if ($object->country == '-') { + $object->country = ''; + } $now = dol_now(); $year = dol_print_date($now, '%Y'); @@ -287,10 +293,11 @@ class pdf_standard extends CommonStickerGenerator $textright = make_substitutions($conf->global->ADHERENT_CARD_TEXT_RIGHT, $substitutionarray); $nb = $_Avery_Labels[$this->code]['NX'] * $_Avery_Labels[$this->code]['NY']; - if ($nb <= 0) $nb = 1; // Protection to avoid empty page + if ($nb <= 0) { + $nb = 1; // Protection to avoid empty page + } - for ($j = 0; $j < $nb; $j++) - { + for ($j = 0; $j < $nb; $j++) { $arrayofmembers[] = array( 'textleft'=>$textleft, 'textheader'=>$textheader, @@ -309,7 +316,10 @@ class pdf_standard extends CommonStickerGenerator //var_dump($arrayofrecords);exit; $this->Tformat = $_Avery_Labels[$this->code]; - if (empty($this->Tformat)) { dol_print_error('', 'ErrorBadTypeForCard'.$this->code); exit; } + if (empty($this->Tformat)) { + dol_print_error('', 'ErrorBadTypeForCard'.$this->code); + exit; + } $this->type = 'pdf'; // standard format or custom if ($this->Tformat['paper-size'] != 'custom') { @@ -320,15 +330,18 @@ class pdf_standard extends CommonStickerGenerator $this->format = $resolution; } - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members")); - if (empty($mode) || $mode == 'member') - { + if (empty($mode) || $mode == 'member') { $title = $outputlangs->transnoentities('MembersCards'); $keywords = $outputlangs->transnoentities('MembersCards')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->name); } else { @@ -337,8 +350,7 @@ class pdf_standard extends CommonStickerGenerator } $filename = 'tmp_cards.pdf'; - if (is_object($object)) - { + if (is_object($object)) { $outputdir = $conf->adherent->dir_output; $dir = $outputdir."/".get_exdir(0, 0, 0, 0, $object, 'member'); $file = $dir.'/'.$filename; @@ -350,10 +362,8 @@ class pdf_standard extends CommonStickerGenerator //var_dump($file);exit; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir", $dir); return 0; } @@ -361,8 +371,7 @@ class pdf_standard extends CommonStickerGenerator $pdf = pdf_getInstance($this->format, $this->Tformat['metric'], $this->Tformat['orientation']); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -373,7 +382,9 @@ class pdf_standard extends CommonStickerGenerator $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($keywords); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins(0, 0); $pdf->SetAutoPageBreak(false); @@ -382,8 +393,16 @@ class pdf_standard extends CommonStickerGenerator // Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie $posX = 1; $posY = 1; - if ($posX > 0) $posX--; else $posX = 0; - if ($posY > 0) $posY--; else $posY = 0; + if ($posX > 0) { + $posX--; + } else { + $posX = 0; + } + if ($posY > 0) { + $posY--; + } else { + $posY = 0; + } $this->_COUNTX = $posX; $this->_COUNTY = $posY; $this->_Set_Format($pdf, $this->Tformat); @@ -394,8 +413,7 @@ class pdf_standard extends CommonStickerGenerator // Add each record - foreach ($arrayofrecords as $val) - { + foreach ($arrayofrecords as $val) { // imprime le texte specifique sur la carte $this->Add_PDF_card($pdf, $val['textleft'], $val['textheader'], $val['textfooter'], $langs, $val['textright'], $val['id'], $val['photo']); } @@ -407,25 +425,32 @@ class pdf_standard extends CommonStickerGenerator // Output to file $pdf->Output($file, 'F'); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); // Output to http stream - if (empty($nooutput)) - { + if (empty($nooutput)) { clearstatcache(); $attachment = true; - if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment = false; + if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) { + $attachment = false; + } $type = dol_mimetype($filename); //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.'"'); + if ($type) { + header('Content-Type: '.$type); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } // Ajout directives pour resoudre bug IE header('Cache-Control: Public, must-revalidate'); diff --git a/htdocs/core/modules/member/index.html b/htdocs/core/modules/member/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php index a6de637b24f..0e041a17559 100644 --- a/htdocs/core/modules/member/modules_cards.php +++ b/htdocs/core/modules/member/modules_cards.php @@ -54,12 +54,12 @@ class ModelePDFCards global $conf; $type = 'member'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -94,50 +94,53 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o $srctemplatepath = ''; // Positionne le modele sur le nom du modele a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->ADHERENT_CARDS_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->ADHERENT_CARDS_ADDON_PDF)) { $code = $conf->global->ADHERENT_CARDS_ADDON_PDF; } else { $code = $modele; } - } else $code = $modele; + } else { + $code = $modele; + } // If selected modele is a filename template (then $modele="modelname:filename") $tmp = explode(':', $template, 2); - if (!empty($tmp[1])) - { + if (!empty($tmp[1])) { $template = $tmp[0]; $srctemplatepath = $tmp[1]; - } else $srctemplatepath = $code; + } else { + $srctemplatepath = $code; + } // Search template files - $file = ''; $classname = ''; $filefound = 0; + $file = ''; + $classname = ''; + $filefound = 0; $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 (is_array($conf->modules_parts['models'])) { + $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + } + foreach ($dirmodels as $reldir) { + foreach (array('doc', 'pdf') as $prefix) { $file = $prefix."_".$template.".class.php"; // On verifie l'emplacement du modele $file = dol_buildpath($reldir."core/modules/member/doc/".$file, 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $prefix.'_'.$template; break; } } - if ($filefound) break; + if ($filefound) { + break; + } } // Charge le modele - if ($filefound) - { + if ($filefound) { require_once $file; $obj = new $classname($db); @@ -145,8 +148,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o // 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 ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath) > 0) - { + if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath) > 0) { $outputlangs->charset_output = $sav_charset_output; return 1; } else { diff --git a/htdocs/core/modules/member/modules_member.class.php b/htdocs/core/modules/member/modules_member.class.php index 2166fd9ccb7..1ff1ffc3d30 100644 --- a/htdocs/core/modules/member/modules_member.class.php +++ b/htdocs/core/modules/member/modules_member.class.php @@ -26,7 +26,7 @@ */ /** - * \file htdocs/core/modules/member/modules_member.php + * \file htdocs/core/modules/member/modules_member.class.php * \ingroup members * \brief File with parent class for generating members to PDF */ diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c81e5440a5d..7b289c74253 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -1,10 +1,10 @@ - * Copyright (C) 2013-2019 Alexandre Spangaro - * Copyright (C) 2014 Ari Elbaz (elarifr) - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2016-2017 Laurent Destailleur - * Copyright (C) 2017 Open-DSI +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2021 Alexandre Spangaro + * Copyright (C) 2014 Ari Elbaz (elarifr) + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2016-2017 Laurent Destailleur + * Copyright (C) 2017-2021 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 @@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; /** - * Description and activation class for module accounting expert + * Class to describe and enable double entry accounting module */ class modAccounting extends DolibarrModules { @@ -60,13 +60,13 @@ class modAccounting extends DolibarrModules $this->dirs = array('/accounting/temp'); // Config pages - $this->config_page_url = array(); + $this->config_page_url = array('accounting.php'); // Dependencies $this->depends = array("modFacture", "modBanque", "modTax"); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module $this->langfiles = array("accountancy", "compta"); @@ -314,6 +314,76 @@ class modAccounting extends DolibarrModules 'b.sens'=>'C' // This field is still used by accounting export. We can remove it once it has been replace into accountancyexport.class.php by a detection using ->debit and ->credit ); + // General ledger - Fichier FEC + $r++; + $this->import_code[$r] = $this->rights_class.'_'.$r; + $this->import_label[$r] = 'ImportAccountingEntriesFECFormat'; + $this->import_icon[$r] = $this->picto; + $this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon + $this->import_tables_array[$r] = array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order) + $this->import_fields_array[$r] = array( + 'b.code_journal'=>'FECFormatJournalCode*', + 'b.journal_label'=>'FECFormatJournalLabel', + 'b.piece_num'=>'FECFormatEntryNum*', + 'b.doc_date'=>'FECFormatEntryDate*', + 'b.numero_compte'=>'FECFormatGeneralAccountNumber*', + 'b.label_compte'=>'FECFormatGeneralAccountLabel*', + 'b.subledger_account'=>'FECFormatSubledgerAccountNumber', + 'b.subledger_label'=>'FECFormatSubledgerAccountLabel', + 'b.doc_ref'=>'FECFormatPieceRef*', + 'b.date_creation'=>'FECFormatPieceDate', + 'b.label_operation'=>'FECFormatLabelOperation', + 'b.debit'=>'FECFormatDebit*', + 'b.credit'=>'FECFormatCredit*', + 'b.lettering_code'=>'FECFormatReconcilableCode', + 'b.date_lettering'=>'FECFormatReconcilableDate', + 'b.date_validated'=>'FECFormatValidateDate', + 'b.multicurrency_amount'=>'FECFormatMulticurrencyAmount', + 'b.multicurrency_code'=>'FECFormatMulticurrencyCode' + ); + $this->import_fieldshidden_array[$r] = array( + 'b.doc_type'=>'const-import_from_external', + 'b.fk_doc'=>'const-0', + 'b.fk_docdet'=>'const-0', + 'b.fk_user_author'=>'user->id', + 'b.montant'=>'rule-computeMontant', + 'b.sens'=>'rule-computeSens' + ); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) + $this->import_convertvalue_array[$r]=array( + 'b.montant' => array('rule' => 'compute', 'classfile' => '/accountancy/class/accountancyimport.class.php', 'class' => 'AccountancyImport', 'method' => 'computeAmount', 'element' => 'Accountancy'), + 'b.sens' => array('rule' => 'compute', 'classfile' => '/accountancy/class/accountancyimport.class.php', 'class' => 'AccountancyImport', 'method' => 'computeDirection', 'element' => 'Accountancy'), + ); + $this->import_regex_array[$r] = array( + //'b.doc_date'=>'^\d{4}\d{2}\d{2}$', + 'b.doc_ref'=>'^.{1,300}$', + 'b.numero_compte'=>'^.{1,32}$', + 'b.label_compte'=>'^.{1,255}$', + 'b.subledger_compte'=>'^.{1,32}$', + 'b.subledger_label'=>'^.{1,255}$', + 'b.label_operation'=>'^.{1,255}$', + //'b.sens'=>'^[D|C]$', + ); + $this->import_examplevalues_array[$r] = array( + 'b.code_journal'=>"VT", + 'b.journal_label'=>"Sale journal", + 'b.piece_num'=>'123 (!!! use next value not already used)', + 'b.doc_date'=>dol_print_date(dol_now(), "%Y%m%d"), + 'b.numero_compte'=>"707", + 'b.label_compte'=>'Sale', + 'b.subledger_account'=>'', + 'b.subledger_label'=>'', + 'b.doc_ref'=>'My document ABC', + 'b.date_creation'=>dol_print_date(dol_now(), "%Y%m%d"), + 'b.label_operation'=>"Sale of ABC", + 'b.debit'=>"0", + 'b.credit'=>"100", + 'b.lettering_code'=>'ABC', + 'b.date_lettering'=>dol_print_date(dol_now(), "%Y%m%d"), + 'b.date_validated'=>dol_print_date(dol_now(), "%Y%m%d"), + 'b.multicurrency_amount'=>"90 (Necessary if devise is different than EUR)", + 'b.multicurrency_code'=>"US (Necessary if devise is different than EUR)", + ); + // Chart of accounts $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 1db3e2b7d50..16ecbee8526 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -27,7 +27,7 @@ * \brief Module to manage members of a foundation * \file htdocs/core/modules/modAdherent.class.php * \ingroup member - * \brief File descriptor or module Member + * \brief Description and activation file for the module member */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -66,7 +66,7 @@ class modAdherent extends DolibarrModules ); // Config pages - $this->config_page_url = array("adherent.php@adherents"); + $this->config_page_url = array("member.php@adherents"); // Dependencies $this->hidden = false; // A condition to hide module @@ -74,7 +74,7 @@ class modAdherent extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array('modMailmanSpip'); // List of module class names as string this module is in conflict with $this->langfiles = array("members", "companies"); - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Constants $this->const = array(); @@ -192,8 +192,12 @@ class modAdherent extends DolibarrModules // Boxes //------- $this->boxes = array( - 0=>array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'), - 2=>array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home') + 0 => array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'), + 2 => array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home'), + 3 => array('file'=>'box_members_last_modified.php', 'enabledbydefaulton'=>'membersindex'), + 4 => array('file'=>'box_members_last_subscriptions.php', 'enabledbydefaulton'=>'membersindex'), + 5 => array('file'=>'box_members_subscriptions_by_year.php', 'enabledbydefaulton'=>'membersindex'), + 6 => array('file'=>'box_members_by_type.php', 'enabledbydefaulton'=>'membersindex'), ); // Permissions @@ -305,7 +309,9 @@ class modAdherent extends DolibarrModules 'c.rowid'=>'subscription', 'c.dateadh'=>'subscription', 'c.datef'=>'subscription', 'c.subscription'=>'subscription' ); // Add extra fields - $keyforselect = 'adherent'; $keyforelement = 'member'; $keyforaliasextra = 'extra'; + $keyforselect = 'adherent'; + $keyforelement = 'member'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // End add axtra fields $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -341,10 +347,8 @@ class modAdherent extends DolibarrModules // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); @@ -399,24 +403,22 @@ class modAdherent extends DolibarrModules // Permissions $this->remove($options); - //ODT template + // ODT template /* - $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt'; - $dirodt=DOL_DATA_ROOT.'/doctemplates/orders'; - $dest=$dirodt.'/template_order.odt'; + $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt'; + $dirodt=DOL_DATA_ROOT.'/doctemplates/orders'; + $dest=$dirodt.'/template_order.odt'; - if (file_exists($src) && ! file_exists($dest)) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_mkdir($dirodt); - $result=dol_copy($src,$dest,0,0); - if ($result < 0) - { - $langs->load("errors"); - $this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest); - return 0; - } - }*/ + if (file_exists($src) && ! file_exists($dest)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result=dol_copy($src,$dest,0,0); + if ($result < 0) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest); + return 0; + } + }*/ $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type='member' AND entity = ".$conf->entity, diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 5c8a6a3fe5d..7a593740590 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -28,7 +28,7 @@ * \brief Module to manage agenda and events * \file htdocs/core/modules/modAgenda.class.php * \ingroup agenda - * \brief File of class to describe and enable/disable module Agenda + * \brief Description and activation file for the module agenda */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -73,7 +73,7 @@ class modAgenda extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("companies"); - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Module parts $this->module_parts = array(); @@ -88,12 +88,12 @@ class modAgenda extends DolibarrModules //$this->const[] = array('AGENDA_DEFAULT_FILTER_TYPE', 'chaine', 'AC_NON_AUTO', 'Default filter for type of event on agenda', 0, 'current'); $sqlreadactions = "SELECT code, label, description FROM ".MAIN_DB_PREFIX."c_action_trigger ORDER by rang"; $resql = $this->db->query($sqlreadactions); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { //if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation). - if (preg_match('/^TASK_/', $obj->code)) continue; // We don't track such events by default. + if (preg_match('/^TASK_/', $obj->code)) { + continue; // We don't track such events by default. + } //if (preg_match('/^_MODIFY/',$obj->code)) continue; // We don't track such events by default. $this->const[] = array('MAIN_AGENDA_ACTIONAUTO_'.$obj->code, "chaine", "1", '', 0, 'current'); } @@ -206,6 +206,7 @@ class modAgenda extends DolibarrModules 'fk_menu'=>0, 'type'=>'top', 'titre'=>'TMenuAgenda', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php', 'langs'=>'agenda', @@ -221,6 +222,7 @@ class modAgenda extends DolibarrModules 'fk_menu'=>'r=0', 'type'=>'left', 'titre'=>'Actions', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', @@ -461,15 +463,23 @@ class modAgenda extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'actioncomm as ac'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_extrafields as extra ON ac.id = extra.fk_object'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_actioncomm as cac on ac.fk_action = cac.id'; - if (!empty($user) && empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_resources acr on ac.id = acr.fk_actioncomm'; + if (!empty($user) && empty($user->rights->agenda->allactions->read)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_resources acr on ac.id = acr.fk_actioncomm'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp on ac.fk_contact = sp.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s on ac.fk_soc = s.rowid'; - if (!empty($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (!empty($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co on s.fk_pays = co.rowid'; $this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = ac.fk_project"; $this->export_sql_end[$r] .= ' WHERE ac.entity IN ('.getEntity('agenda').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR ac.fk_soc IS NULL)'; - if (empty($user->rights->agenda->allactions->read)) $this->export_sql_end[$r] .= ' AND acr.fk_element = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR ac.fk_soc IS NULL)'; + } + if (empty($user->rights->agenda->allactions->read)) { + $this->export_sql_end[$r] .= ' AND acr.fk_element = '.(empty($user) ? 0 : $user->id); + } $this->export_sql_order[$r] = ' ORDER BY ac.datep'; } } diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 32b16a74703..bf7fc2777ae 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -23,7 +23,7 @@ * \brief Descriptor file for Api modulee * \file htdocs/core/modules/modApi.class.php * \ingroup api - * \brief Description and activation file for module Api + * \brief Description and activation file for the module Api */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -83,7 +83,7 @@ class modApi extends DolibarrModules $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array('modZapier'); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("other"); // Constants @@ -120,8 +120,7 @@ class modApi extends DolibarrModules $this->tabs = array(); // Dictionaries - if (!isset($conf->api->enabled)) - { + if (!isset($conf->api->enabled)) { $conf->api = new stdClass(); $conf->api->enabled = 0; } @@ -196,7 +195,7 @@ class modApi extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', // 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', // 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation", - // 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', + // 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', // 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate", // 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart", // 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef' @@ -204,7 +203,7 @@ class modApi extends DolibarrModules // $this->export_entities_array[$r]=array( // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', // 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', - // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice", + // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice", // 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line", // 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line", // 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product' @@ -246,8 +245,8 @@ class modApi extends DolibarrModules { // Remove old constants with entity fields different of 0 $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('MAIN_MODULE_API', 1), - "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('API_PRODUCTION_MODE', 1) + "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->db->escape($this->db->encrypt('MAIN_MODULE_API'))."'", + "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->db->escape($this->db->encrypt('API_PRODUCTION_MODE'))."'" ); return $this->_remove($sql, $options); diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index 9f20ae44f86..12b58bfcc38 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modAsset.class.php * \ingroup asset - * \brief Description and activation file for module Assets + * \brief Description and activation file for the module assets */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -90,7 +90,7 @@ class modAsset extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("assets"); - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -105,8 +105,7 @@ class modAsset extends DolibarrModules $this->const = array(); - if (!isset($conf->asset) || !isset($conf->asset->enabled)) - { + if (!isset($conf->asset) || !isset($conf->asset->enabled)) { $conf->asset = new stdClass(); $conf->asset->enabled = 0; } diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index 11912cf778a..b4135294293 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -24,7 +24,7 @@ * \brief Module pour gerer la tenue d'un compte bancaire et rapprochements * \file htdocs/core/modules/modBanque.class.php * \ingroup banque - * \brief Fichier de description et activation du module Banque + * \brief Description and activation file for the module bank */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -162,8 +162,7 @@ class modBanque extends DolibarrModules "s.nom"=>"company", "s.code_compta"=>"company", "s.code_compta_fournisseur"=>"company" ); $this->export_special_array[$r] = array('-b.amount'=>'NULLIFNEG', 'b.amount'=>'NULLIFNEG'); - if (empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || empty($conf->supplier_order->enabled) || empty($conf->supplier_invoice->enabled)) - { + if ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled) || empty($conf->supplier_invoice->enabled)) { unset($this->export_fields_array[$r]['s.code_compta_fournisseur']); unset($this->export_entities_array[$r]['s.code_compta_fournisseur']); } diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 6a894972eb7..fab12a0ae59 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -22,8 +22,8 @@ * \defgroup barcode Module barcode * \brief Module pour gerer les codes barres * \file htdocs/core/modules/modBarcode.class.php - * \ingroup barcode,produit - * \brief Fichier de description et activation du module Barcode + * \ingroup barcode, product + * \brief Description and activation file for the module barcode */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -79,13 +79,13 @@ class modBarcode extends DolibarrModules $this->rights = array(); $this->rights_class = 'barcode'; - $this->rights[1][0] = 300; // id de la permission + $this->rights[1][0] = 301; // id de la permission $this->rights[1][1] = 'Read barcodes'; // libelle de la permission $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) $this->rights[1][3] = 1; // La permission est-elle une permission par defaut $this->rights[1][4] = 'lire_advance'; - $this->rights[2][0] = 301; // id de la permission + $this->rights[2][0] = 302; // id de la permission $this->rights[2][1] = 'Create/modify barcodes'; // libelle de la permission $this->rights[2][2] = 'w'; // type de la permission (deprecie a ce jour) $this->rights[2][3] = 0; // La permission est-elle une permission par defaut @@ -93,30 +93,35 @@ class modBarcode extends DolibarrModules // Main menu entries $r = 0; - $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'mainmenu'=>'tools', - 'leftmenu'=>'barcodeprint', - 'type'=>'left', // This is a Left menu entry - 'titre'=>'BarCodePrintsheet', - 'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint', - 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>200, - 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'mainmenu'=>'tools', + 'leftmenu'=>'barcodeprint', + 'type'=>'left', // This is a Left menu entry + 'titre'=>'BarCodePrintsheet', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint', + 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>200, + 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; - $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // 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'=>'MassBarcodeInit', - 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools', - 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>300, - 'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // 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'=>'MassBarcodeInit', + 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools', + 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>300, + 'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>0, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; } @@ -135,14 +140,14 @@ class modBarcode extends DolibarrModules $this->remove($options); $sql = array( - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('DATAMATRIX', 'Datamatrix', 0, '1234567xyz', __ENTITY__)", 'ignoreerror'=>1), - array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('QRCODE', 'Qr Code', 0, 'www.dolibarr.org', __ENTITY__)", 'ignoreerror'=>1) + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('DATAMATRIX', 'Datamatrix', 0, '1234567xyz', __ENTITY__)", 'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('QRCODE', 'Qr Code', 0, 'www.dolibarr.org', __ENTITY__)", 'ignoreerror'=>1) ); return $this->_init($sql, $options); diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index 6a3cd4767f7..9a90fa945bb 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -20,7 +20,7 @@ * \brief Add a log into a block chain for some actions. * \file htdocs/core/modules/modBlockedLog.class.php * \ingroup blockedlog - * \brief Description and activation file for module BlockedLog + * \brief Description and activation file for the module BlockedLog */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -47,7 +47,7 @@ class modBlockedLog extends DolibarrModules // It is used to group modules in module setup page $this->family = "base"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '75'; + $this->module_position = '76'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Enable a log on some business events into a non reversible log. This module may be mandatory for some countries."; @@ -80,19 +80,19 @@ class modBlockedLog extends DolibarrModules // Currently, activation is not automatic because only companies (in France) making invoices to non business customers must // enable this module. /*if (! empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY)) - { - $tmp=explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY); - $this->automatic_activation = array(); - foreach($tmp as $key) - { - $this->automatic_activation[$key]='BlockedLogActivatedBecauseRequiredByYourCountryLegislation'; - } - }*/ + { + $tmp=explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY); + $this->automatic_activation = array(); + foreach($tmp as $key) + { + $this->automatic_activation[$key]='BlockedLogActivatedBecauseRequiredByYourCountryLegislation'; + } + }*/ //var_dump($this->automatic_activation); $this->always_enabled = (!empty($conf->blockedlog->enabled) && !empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) - && in_array($mysoc->country_code, explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY)) + && in_array((empty($mysoc->country_code) ? '' : $mysoc->country_code), explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY)) && $this->alreadyUsed()); // Constants @@ -113,7 +113,7 @@ class modBlockedLog extends DolibarrModules // ----------------- $this->rights = array(); // Permission array used by this module - $r = 0; + $r = 1; $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][1] = 'Read archived events and fingerprints'; // Permission label $this->rights[$r][3] = 0; // Permission by default for new user (0/1) @@ -124,18 +124,20 @@ class modBlockedLog extends DolibarrModules // ----------------- $r = 0; $this->menu[$r] = array( - 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'mainmenu'=>'tools', - 'leftmenu'=>'blockedlogbrowser', - 'type'=>'left', // This is a Left menu entry - 'titre'=>'BrowseBlockedLog', - 'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser', - 'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>200, - 'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'mainmenu'=>'tools', + 'leftmenu'=>'blockedlogbrowser', + 'type'=>'left', // This is a Left menu entry + 'titre'=>'BrowseBlockedLog', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser', + 'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>200, + 'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; } @@ -179,8 +181,7 @@ class modBlockedLog extends DolibarrModules $b = new BlockedLog($this->db); $result = $b->setObjectData($object, 'MODULE_SET', 0); - if ($result < 0) - { + if ($result < 0) { $this->error = $b->error; $this->errors = $b->erros; return 0; @@ -223,15 +224,13 @@ class modBlockedLog extends DolibarrModules $b = new BlockedLog($this->db); $result = $b->setObjectData($object, 'MODULE_RESET', 0); - if ($result < 0) - { + if ($result < 0) { $this->error = $b->error; $this->errors = $b->erros; return 0; } - if ($b->alreadyUsed(1)) - { + if ($b->alreadyUsed(1)) { $res = $b->create($user, '0000000000'); // If already used for something else than SET or UNSET, we log with error } else { $res = $b->create($user); diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php index 092ceb17d79..6b69c6b7af0 100644 --- a/htdocs/core/modules/modBom.class.php +++ b/htdocs/core/modules/modBom.class.php @@ -23,7 +23,7 @@ * * \file htdocs/core/modules/modBom.class.php * \ingroup bom - * \brief Description and activation file for module Bom + * \brief Description and activation file for the module Bom */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -80,19 +80,19 @@ class modBom extends DolibarrModules // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) $this->module_parts = array( /* - 'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers) + 'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers) 'login' => 0, // Set this to 1 if module has its own login method file (core/login) 'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions) 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus) 'theme' => 0, // Set this to 1 if module has its own theme directory (theme) - 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl) + 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl) 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode) 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx) 'css' => array('/bom/css/bom.css.php'), // Set this to relative path of css file if module has its own css file - 'js' => array('/bom/js/bom.js.php'), // Set this to relative path of js file if module must load a js on all pages + 'js' => array('/bom/js/bom.js.php'), // Set this to relative path of js file if module must load a js on all pages 'hooks' => array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>'0'), // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all' 'moduleforexternal' => 0 // Set this to 1 if feature of module are opened to external users - */ + */ ); // Data directories to create when module is enabled. @@ -108,7 +108,7 @@ class modBom extends DolibarrModules $this->requiredby = array('modMrp'); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->langfiles = array("mrp"); - //$this->phpmin = array(5,4); // Minimum version of PHP required by module + //$this->phpmin = array(5, 6)); // Minimum version of PHP required by module $this->need_dolibarr_version = array(9, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -132,8 +132,7 @@ class modBom extends DolibarrModules 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' )*/ - if (!isset($conf->bom) || !isset($conf->bom->enabled)) - { + if (!isset($conf->bom) || !isset($conf->bom->enabled)) { $conf->bom = new stdClass(); $conf->bom->enabled = 0; } @@ -171,19 +170,19 @@ class modBom extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@bom', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->bom->enabled,$conf->bom->enabled,$conf->bom->enabled) // Condition to show each dictionary - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@bom', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order + 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) + 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') + 'tabcond'=>array($conf->bom->enabled,$conf->bom->enabled,$conf->bom->enabled) // Condition to show each dictionary + ); + */ // Boxes/Widgets @@ -206,7 +205,7 @@ class modBom extends DolibarrModules // Permissions provided by this module $this->rights = array(); // Permission array used by this module - $r = 0; + $r = 1; $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) $this->rights[$r][1] = 'Read bom of Bom'; // Permission label $this->rights[$r][3] = 0; // Permission by default for new user (0/1) @@ -247,7 +246,7 @@ class modBom extends DolibarrModules 'perms'=>'1', // Use 'perms'=>'$user->rights->bom->level1->level2' if you want your menu with a permission rules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both - */ + */ /* END MODULEBUILDER TOPMENU */ /* BEGIN MODULEBUILDER LEFTMENU BILLOFMATERIALS @@ -287,15 +286,25 @@ class modBom extends DolibarrModules $langs->load("mrp"); $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'BomAndBomLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("bom", "read")); $this->export_icon[$r] = 'bom'; - $keyforclass = 'BOM'; $keyforclassfile = '/bom/class/bom.class.php'; $keyforelement = 'bom'; + $keyforclass = 'BOM'; + $keyforclassfile = '/bom/class/bom.class.php'; + $keyforelement = 'bom'; include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforclass = 'BOMLine'; $keyforclassfile = '/bom/class/bom.class.php'; $keyforelement = 'bomline'; $keyforalias = 'tl'; + $keyforclass = 'BOMLine'; + $keyforclassfile = '/bom/class/bom.class.php'; + $keyforelement = 'bomline'; + $keyforalias = 'tl'; include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; unset($this->export_fields_array[$r]['tl.fk_bom']); - $keyforselect = 'bom_bom'; $keyforaliasextra = 'extra'; $keyforelement = 'bom'; + $keyforselect = 'bom_bom'; + $keyforaliasextra = 'extra'; + $keyforelement = 'bom'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'bom_bomline'; $keyforaliasextra = 'extraline'; $keyforelement = 'bomline'; + $keyforselect = 'bom_bomline'; + $keyforaliasextra = 'extraline'; + $keyforelement = 'bomline'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_dependencies_array[$r] = array('bomline'=>'tl.rowid'); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -321,7 +330,9 @@ class modBom extends DolibarrModules global $conf, $langs; $result = $this->_load_tables('/bom/sql/'); - if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') + if ($result < 0) { + return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') + } // Create extrafields //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -343,13 +354,11 @@ class modBom extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/boms'; $dest = $dirodt.'/template_bom.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modBookmark.class.php b/htdocs/core/modules/modBookmark.class.php index e6ac76f0178..7b8d623bc6d 100644 --- a/htdocs/core/modules/modBookmark.class.php +++ b/htdocs/core/modules/modBookmark.class.php @@ -21,7 +21,7 @@ * \brief Module to manage Bookmarks * \file htdocs/core/modules/modBookmark.class.php * \ingroup bookmark - * \brief Fichier de description et activation du module Bookmarks + * \brief Description and activation file for the module Bookmarks */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index e3368fb636f..ba6c7ddce6c 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -20,7 +20,7 @@ * \brief Module to manage points of sale * \file htdocs/core/modules/modCashDesk.class.php * \ingroup pos - * \brief File to enable/disable module Point Of Sales + * \brief Description and activation file for the module Point Of Sales */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -66,7 +66,7 @@ class modCashDesk extends DolibarrModules $this->hidden = false; // A condition to hide module $this->depends = array('always'=>"modBanque", 'always'=>"modFacture", 'always'=>"modProduct", 'FR'=>'modBlockedLog'); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(2, 4); // Minimum version of Dolibarr required by module $this->langfiles = array("cashdesk"); $this->warnings_activation = array('FR'=>'WarningNoteModulePOSForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text') @@ -98,6 +98,8 @@ class modCashDesk extends DolibarrModules 'type'=>'top', // This is a Top menu entry 'titre'=>'PointOfSaleShort', 'mainmenu'=>'cashdesk', + 'leftmenu'=>'', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'url'=>'/cashdesk/index.php?user=__USER_LOGIN__', 'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>900, diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 0f9d12c1a5d..4f97eed58f0 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -23,7 +23,7 @@ * \brief Module to manage categories * \file htdocs/core/modules/modCategorie.class.php * \ingroup category - * \brief Fichier de description et activation du module Categorie + * \brief Description and activation file for the module Category */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; @@ -123,22 +123,46 @@ class modCategorie extends DolibarrModules $this->export_code[$r] = $this->rights_class.'_list'; $this->export_label[$r] = 'CatListAll'; $this->export_icon[$r] = $this->picto; - $this->export_enabled[$r] = 'true'; + $this->export_enabled[$r] = 'true'; $this->export_permission[$r] = array(array("categorie", "lire")); $typeexample = ""; - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { $typeexample .= ($typeexample ? " / " : "")."0=Product-Service"; } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; } - if (!empty($conf->societe->enabled)) { $typeexample .= ($typeexample ? " / " : "")."2=Customer-Prospect"; } - if (!empty($conf->adherent->enabled)) { $typeexample .= ($typeexample ? " / " : "")."3=Member"; } - if (!empty($conf->societe->enabled)) { $typeexample .= ($typeexample ? " / " : "")."4=Contact"; } - if (!empty($conf->bank->enabled)) { $typeexample .= ($typeexample ? " / " : "")."5=Bank account"; } - if (!empty($conf->projet->enabled)) { $typeexample .= ($typeexample ? " / " : "")."6=Project"; } - if (!empty($conf->user->enabled)) { $typeexample .= ($typeexample ? " / " : "")."7=User"; } - if (!empty($conf->bank->enabled)) { $typeexample .= ($typeexample ? " / " : "")."8=Bank line"; } - if (!empty($conf->stock->enabled)) { $typeexample .= ($typeexample ? " / " : "")."9=Warehouse"; } - if (!empty($conf->agenda->enabled)) { $typeexample .= ($typeexample ? " / " : "")."10=Agenda event"; } - if (!empty($conf->website->enabled)) { $typeexample .= ($typeexample ? " / " : "")."11=Website page"; } + if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."0=Product-Service"; + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; + } + if (!empty($conf->societe->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."2=Customer-Prospect"; + } + if (!empty($conf->adherent->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."3=Member"; + } + if (!empty($conf->societe->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."4=Contact"; + } + if (!empty($conf->bank->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."5=Bank account"; + } + if (!empty($conf->projet->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."6=Project"; + } + if (!empty($conf->user->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."7=User"; + } + if (!empty($conf->bank->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."8=Bank line"; + } + if (!empty($conf->stock->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."9=Warehouse"; + } + if (!empty($conf->agenda->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."10=Agenda event"; + } + if (!empty($conf->website->enabled)) { + $typeexample .= ($typeexample ? " / " : "")."11=Website page"; + } $this->export_fields_array[$r] = array('cat.rowid'=>"CategId", 'cat.label'=>"Label", 'cat.type'=>"Type", 'cat.description'=>"Description", 'cat.fk_parent'=>"ParentCategory", 'pcat.label'=>"ParentCategoryLabel" ); $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.type'=>"Numeric", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'pcat.label'=>'Text' ); @@ -161,7 +185,9 @@ class modCategorie extends DolibarrModules $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'p.ref'=>'Text', 'p.label'=>'Text'); $this->export_entities_array[$r] = array('p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product'); // We define here only fields that use another picto - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -203,7 +229,9 @@ class modCategorie extends DolibarrModules 't.libelle'=>'company' ); // We define here only fields that use another picto - $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extra'; + $keyforselect = 'societe'; + $keyforelement = 'company'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -247,7 +275,9 @@ class modCategorie extends DolibarrModules 't.libelle'=>'company', 'pl.code'=>'company', 'st.code'=>'company' ); // We define here only fields that use another picto - $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extra'; + $keyforselect = 'societe'; + $keyforelement = 'company'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -273,7 +303,9 @@ class modCategorie extends DolibarrModules $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'p.lastname'=>'Text', 'p.firstname'=>'Text'); $this->export_entities_array[$r] = array('p.rowid'=>'member', 'p.lastname'=>'member', 'p.firstname'=>'member'); // We define here only fields that use another picto - $keyforselect = 'adherent'; $keyforelement = 'member'; $keyforaliasextra = 'extra'; + $keyforselect = 'adherent'; + $keyforelement = 'member'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -324,7 +356,9 @@ class modCategorie extends DolibarrModules 's.phone'=>"company", 's.fax'=>"company", 's.url'=>"company", 's.email'=>"company" ); // We define here only fields that use another picto - $keyforselect = 'socpeople'; $keyforelement = 'contact'; $keyforaliasextra = 'extra'; + $keyforselect = 'socpeople'; + $keyforelement = 'contact'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -351,7 +385,9 @@ class modCategorie extends DolibarrModules $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'p.ref'=>'Text', 's.rowid'=>"List:societe:nom:rowid", 's.nom'=>"Text"); $this->export_entities_array[$r] = array('p.rowid'=>'project', 'p.ref'=>'project', 's.rowid'=>"company", 's.nom'=>"company"); // We define here only fields that use another picto - $keyforselect = 'projet'; $keyforelement = 'project'; $keyforaliasextra = 'extra'; + $keyforselect = 'projet'; + $keyforelement = 'project'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -374,7 +410,9 @@ class modCategorie extends DolibarrModules $this->export_TypeFields_array[$r] = array('cat.label'=>"Text", 'cat.description'=>"Text", 'cat.fk_parent'=>'List:categorie:label:rowid', 'p.login'=>'Text', 'p.lastname'=>'Text', 'p.firstname'=>'Text'); $this->export_entities_array[$r] = array('p.rowid'=>'user', 'p.login'=>'user', 'p.lastname'=>'user', 'p.firstname'=>'user'); // We define here only fields that use another picto - $keyforselect = 'user'; $keyforelement = 'user'; $keyforaliasextra = 'extra'; + $keyforselect = 'user'; + $keyforelement = 'user'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -428,8 +466,7 @@ class modCategorie extends DolibarrModules $this->import_updatekeys_array[$r] = array('ca.label'=>'Label'); // 0 Products - if (!empty($conf->product->enabled)) - { + if (!empty($conf->product->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_0_'.Categorie::$MAP_ID_TO_CODE[0]; $this->import_label[$r] = "CatProdLinks"; // Translation key @@ -447,8 +484,7 @@ class modCategorie extends DolibarrModules } // 1 Suppliers - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_1_'.Categorie::$MAP_ID_TO_CODE[1]; $this->import_label[$r] = "CatSupLinks"; // Translation key @@ -469,8 +505,7 @@ class modCategorie extends DolibarrModules } // 2 Customers - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_2_'.Categorie::$MAP_ID_TO_CODE[2]; $this->import_label[$r] = "CatCusLinks"; // Translation key @@ -491,8 +526,7 @@ class modCategorie extends DolibarrModules } // 3 Members - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_3_'.Categorie::$MAP_ID_TO_CODE[3]; $this->import_label[$r] = "CatMembersLinks"; // Translation key @@ -510,8 +544,7 @@ class modCategorie extends DolibarrModules } // 4 Contacts/Addresses - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_4_'.Categorie::$MAP_ID_TO_CODE[4]; $this->import_label[$r] = "CatContactsLinks"; // Translation key @@ -534,8 +567,7 @@ class modCategorie extends DolibarrModules // 5 Bank accounts, TODO ? // 6 Projects - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_6_'.Categorie::$MAP_ID_TO_CODE[6]; $this->import_label[$r] = "CatProjectsLinks"; // Translation key @@ -553,8 +585,7 @@ class modCategorie extends DolibarrModules } // 7 Users - if (!empty($conf->user->enabled)) - { + if (!empty($conf->user->enabled)) { $r++; $this->import_code[$r] = $this->rights_class.'_7_'.Categorie::$MAP_ID_TO_CODE[7]; $this->import_label[$r] = "CatUsersLinks"; // Translation key diff --git a/htdocs/core/modules/modClickToDial.class.php b/htdocs/core/modules/modClickToDial.class.php index 80a78aba2e9..f28659bbd5d 100644 --- a/htdocs/core/modules/modClickToDial.class.php +++ b/htdocs/core/modules/modClickToDial.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer l'appel automatique * \file htdocs/core/modules/modClickToDial.class.php * \ingroup clicktodial - * \brief Fichier de description et activation du module de click to Dial + * \brief Description and activation file for the module Click to Dial */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modCollab.class.php b/htdocs/core/modules/modCollab.class.php index 1f777a4a117..695efd6c3b1 100644 --- a/htdocs/core/modules/modCollab.class.php +++ b/htdocs/core/modules/modCollab.class.php @@ -20,7 +20,7 @@ * \brief Collab module descriptor. * \file htdocs/core/modules/modCollab.class.php * \ingroup collab - * \brief Description and activation file for module Collab + * \brief Description and activation file for the module Collab */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -55,7 +55,7 @@ class modCollab extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. - $this->picto = 'website'; + $this->picto = 'collab'; // Data directories to create when module is enabled $this->dirs = array("/collab/temp"); @@ -90,22 +90,22 @@ class modCollab extends DolibarrModules $r = 0; /*$this->rights[$r][0] = 30001; - $this->rights[$r][1] = 'Read website content'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'read'; - $r++; + $this->rights[$r][1] = 'Read website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'read'; + $r++; - $this->rights[$r][0] = 30002; - $this->rights[$r][1] = 'Create/modify website content'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'write'; - $r++; + $this->rights[$r][0] = 30002; + $this->rights[$r][1] = 'Create/modify website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'write'; + $r++; - $this->rights[$r][0] = 30003; - $this->rights[$r][1] = 'Delete website content'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'delete'; - $r++;*/ + $this->rights[$r][0] = 30003; + $this->rights[$r][1] = 'Delete website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'delete'; + $r++;*/ // Main menu entries $r = 0; @@ -113,6 +113,7 @@ class modCollab extends DolibarrModules 'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'top', // This is a Left menu entry 'titre'=>'Collab', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'), 'mainmenu'=>'collab', 'url'=>'/collab/index.php', 'langs'=>'collab', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index f257c6e3132..6a44075822c 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -27,7 +27,7 @@ * \brief Module pour gerer le suivi des commandes * \file htdocs/core/modules/modCommande.class.php * \ingroup commande - * \brief Fichier de description et activation du module Commande + * \brief Description and activation file for the module command */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -203,8 +203,7 @@ class modCommande extends DolibarrModules 'cd.tva_tx'=>"LineVATRate", 'cd.qty'=>"LineQty", 'cd.total_ht'=>"LineTotalHT", 'cd.total_tva'=>"LineTotalVAT", 'cd.total_ttc'=>"LineTotalTTC", 'p.rowid'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['c.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['c.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['c.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; @@ -237,17 +236,27 @@ class modCommande extends DolibarrModules 'cd.total_ttc'=>"order_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product' ); $this->export_dependencies_array[$r] = array('order_line'=>'cd.rowid', 'product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'commande'; $keyforelement = 'order'; $keyforaliasextra = 'extra'; + $keyforselect = 'commande'; + $keyforelement = 'order'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'commandedet'; $keyforelement = 'order_line'; $keyforaliasextra = 'extra2'; + $keyforselect = 'commandedet'; + $keyforelement = 'order_line'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra3'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra3'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extra4'; + $keyforselect = 'societe'; + $keyforelement = 'company'; + $keyforaliasextra = 'extra4'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; @@ -262,7 +271,9 @@ class modCommande extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('commande').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } // Imports //-------- @@ -288,7 +299,7 @@ class modCommande extends DolibarrModules 'c.fk_user_valid' => 'ValidatedById', 'c.fk_statut' => 'Status*', 'c.remise_percent' => 'GlobalDiscount', - 'c.tva' => 'TotalTVA', + 'c.total_tva' => 'TotalTVA', 'c.total_ht' => 'TotalHT', 'c.total_ttc' => 'TotalTTC', 'c.note_private' => 'NotePrivate', @@ -357,7 +368,7 @@ class modCommande extends DolibarrModules //Import CPV Lines $r++; $this->import_code[$r] = 'commande_lines_'.$r; - $this->import_label[$r] = 'OrderLine'; + $this->import_label[$r] = 'SaleOrderLines'; $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; $this->import_tables_array[$r] = ['cd' => MAIN_DB_PREFIX.'commandedet', 'extra' => MAIN_DB_PREFIX.'commandedet_extrafields']; @@ -442,13 +453,11 @@ class modCommande extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/orders'; $dest = $dirodt.'/template_order.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modComptabilite.class.php b/htdocs/core/modules/modComptabilite.class.php index 7ee9fe3c70f..09f6cd85496 100644 --- a/htdocs/core/modules/modComptabilite.class.php +++ b/htdocs/core/modules/modComptabilite.class.php @@ -23,7 +23,7 @@ * \brief Module pour inclure des fonctions de comptabilite (gestion de comptes comptables et rapports) * \file htdocs/core/modules/modComptabilite.class.php * \ingroup comptabilite - * \brief Fichier de description et activation du module Comptabilite + * \brief Description and activation file for the module simple accountancy */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index d58e1d8497a..f91e54039f4 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer la tenue de contrat de services * \file htdocs/core/modules/modContrat.class.php * \ingroup contrat - * \brief Fichier de description et activation du module Contrat + * \brief Description and activation file for the module contract */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -193,9 +193,13 @@ class modContrat extends DolibarrModules 'p.rowid'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text'); - $keyforselect = 'contrat'; $keyforelement = 'contract'; $keyforaliasextra = 'coextra'; + $keyforselect = 'contrat'; + $keyforelement = 'contract'; + $keyforaliasextra = 'coextra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'contratdet'; $keyforelement = 'contract_line'; $keyforaliasextra = 'codextra'; + $keyforselect = 'contratdet'; + $keyforelement = 'contract_line'; + $keyforaliasextra = 'codextra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -230,13 +234,11 @@ class modContrat extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/contracts'; $dest = $dirodt.'/template_contract.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modCron.class.php b/htdocs/core/modules/modCron.class.php index deb140f76e4..60d713d5fc4 100644 --- a/htdocs/core/modules/modCron.class.php +++ b/htdocs/core/modules/modCron.class.php @@ -21,7 +21,7 @@ * \brief cron module descriptor. * \file htdocs/core/modules/modCron.class.php * \ingroup cron - * \brief Description and activation file for module Jobs + * \brief Description and activation file for the module Jobs */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -55,7 +55,7 @@ class modCron extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. - $this->picto = 'technic'; + $this->picto = 'cron'; // Data directories to create when module is enabled $this->dirs = array(); @@ -97,7 +97,7 @@ class modCron extends DolibarrModules // Cronjobs $this->cronjobs = array( - 0=>array('entity'=>0, 'label'=>'PurgeDeleteTemporaryFilesShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'purgeFiles', 'parameters'=>'', 'comment'=>'PurgeDeleteTemporaryFiles', 'frequency'=>2, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>50, 'status'=>1, 'test'=>true), + 0=>array('entity'=>0, 'label'=>'PurgeDeleteTemporaryFilesShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'purgeFiles', 'parameters'=>'tempfilesold+logfiles', 'comment'=>'PurgeDeleteTemporaryFiles', 'frequency'=>2, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>50, 'status'=>1, 'test'=>true), 1=>array('entity'=>0, 'label'=>'MakeLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'dumpDatabase', 'parameters'=>'none,auto,1,auto,10', 'comment'=>'MakeLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>90, 'status'=>0, 'test'=>in_array($this->db->type, array('mysql', 'mysqli'))), // 1=>array('entity'=>0, 'label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24) ); diff --git a/htdocs/core/modules/modDataPolicy.class.php b/htdocs/core/modules/modDataPolicy.class.php index 54d29595982..047ff2b5a8d 100644 --- a/htdocs/core/modules/modDataPolicy.class.php +++ b/htdocs/core/modules/modDataPolicy.class.php @@ -23,7 +23,7 @@ * * \file htdocs/core/modules/modDataPolicy.class.php * \ingroup datapolicy - * \brief Description and activation file for module DATAPOLICY + * \brief Description and activation file for the module datapolicy */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -132,13 +132,13 @@ class modDataPolicy extends DolibarrModules { array('DATAPOLICY_ADHERENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), ); - $country = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); + $country = explode(":", empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY) ? '' : $conf->global->MAIN_INFO_SOCIETE_COUNTRY); // Some keys to add into the overwriting translation tables /* $this->overwrite_translation = array( - 'en_US:ParentCompany'=>'Parent company or reseller', - 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' - ) */ + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + ) */ if (!isset($conf->datapolicy) || !isset($conf->datapolicy->enabled)) { $conf->datapolicy = new stdClass(); @@ -218,27 +218,27 @@ class modDataPolicy extends DolibarrModules { $extrafields = new ExtraFields($this->db); /* - // Extrafield contact - $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0); - $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0); + // Extrafield contact + $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0); + $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0); - // Extrafield Tiers - $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0); - $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0); + // Extrafield Tiers + $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0); + $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0); - // Extrafield Adherent - $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); - $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0); - $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0); - */ + // Extrafield Adherent + $result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled'); + $result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0); + $result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0); + */ $sql = array(); diff --git a/htdocs/core/modules/modDav.class.php b/htdocs/core/modules/modDav.class.php index ff355725e66..09f7d814553 100644 --- a/htdocs/core/modules/modDav.class.php +++ b/htdocs/core/modules/modDav.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modDav.class.php * \ingroup dav - * \brief Description and activation file for module dav + * \brief Description and activation file for the module dav */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -108,8 +108,7 @@ class modDav extends DolibarrModules ); - if (!isset($conf->dav) || !isset($conf->dav->enabled)) - { + if (!isset($conf->dav) || !isset($conf->dav->enabled)) { $conf->dav = new stdClass(); $conf->dav->enabled = 0; } @@ -147,19 +146,19 @@ class modDav extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@dav', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->dav->enabled,$conf->dav->enabled,$conf->dav->enabled) // Condition to show each dictionary - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@dav', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order + 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) + 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') + 'tabcond'=>array($conf->dav->enabled,$conf->dav->enabled,$conf->dav->enabled) // Condition to show each dictionary + ); + */ // Boxes/Widgets diff --git a/htdocs/core/modules/modDebugBar.class.php b/htdocs/core/modules/modDebugBar.class.php index 4d38e848bbe..ae2bdcfffc8 100644 --- a/htdocs/core/modules/modDebugBar.class.php +++ b/htdocs/core/modules/modDebugBar.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modDebugBar.class.php * \ingroup debugbar - * \brief Description and activation file for module debugbar + * \brief Description and activation file for the module debugbar */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -79,7 +79,7 @@ class modDebugBar extends DolibarrModules // Permissions $this->rights = array(); - $this->rights[1][0] = 430; // id de la permission + $this->rights[1][0] = 431; // id de la permission $this->rights[1][1] = 'Use Debug Bar'; // libelle de la permission $this->rights[1][2] = 'u'; // type de la permission (deprecie a ce jour) $this->rights[1][3] = 1; // La permission est-elle une permission par defaut diff --git a/htdocs/core/modules/modDeplacement.class.php b/htdocs/core/modules/modDeplacement.class.php index 8e7ec7db4c2..f0f06395565 100644 --- a/htdocs/core/modules/modDeplacement.class.php +++ b/htdocs/core/modules/modDeplacement.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les deplacements et notes de frais * \file htdocs/core/modules/modDeplacement.class.php * \ingroup deplacement - * \brief Fichier de description et activation du module Deplacement et notes de frais + * \brief Description and activation file for the module trips (deprecated) */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -129,17 +129,22 @@ class modDeplacement extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'user as u'; $this->export_sql_end[$r] .= ', '.MAIN_DB_PREFIX.'deplacement as d'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON d.fk_soc = s.rowid'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' WHERE d.fk_user = u.rowid'; $this->export_sql_end[$r] .= ' AND d.entity IN ('.getEntity('deplacement').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR d.fk_soc IS NULL)'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.(empty($user) ? 0 : $user->id).' OR d.fk_soc IS NULL)'; + } - if (!empty($user)) // Not defined during migration process - { + if (!empty($user)) { // Not defined during migration process $childids = $user->getAllChildIds(); $childids[] = $user->id; - if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $this->export_sql_end[$r] .= ' AND d.fk_user IN ('.join(',', $childids).')'; + if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) { + $this->export_sql_end[$r] .= ' AND d.fk_user IN ('.$this->db->sanitize(join(',', $childids)).')'; + } } } diff --git a/htdocs/core/modules/modDocumentGeneration.class.php b/htdocs/core/modules/modDocumentGeneration.class.php index 2c2c2ed1888..466523e7f81 100644 --- a/htdocs/core/modules/modDocumentGeneration.class.php +++ b/htdocs/core/modules/modDocumentGeneration.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer des generations de documents * \file htdocs/core/modules/modDocumentGeneration.class.php * \ingroup document - * \brief Fichier de description et activation du module Generation document + * \brief Description and activation file for the module Generation document */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 64d9c045ad1..7d8a8fc9455 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -23,7 +23,7 @@ * \brief Module to manage the follow-up of the donations * \file htdocs/core/modules/modDon.class.php * \ingroup donations - * \brief Description and activation file for module Donation + * \brief Description and activation file for the module Donation */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php index fc4863e1280..23a0f892014 100644 --- a/htdocs/core/modules/modDynamicPrices.class.php +++ b/htdocs/core/modules/modDynamicPrices.class.php @@ -20,7 +20,7 @@ * \brief Module to manage dynamic prices in products * \file htdocs/core/modules/modDynamicPrices.class.php * \ingroup produit - * \brief File to describe module to manage dynamic prices in products + * \brief Description and activation file for the module to manage dynamic prices in products */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modECM.class.php b/htdocs/core/modules/modECM.class.php index d83edc6cf96..8b846089a03 100644 --- a/htdocs/core/modules/modECM.class.php +++ b/htdocs/core/modules/modECM.class.php @@ -20,7 +20,7 @@ * \brief Module for ECM (Electronic Content Management) * \file htdocs/core/modules/modECM.class.php * \ingroup ecm - * \brief Description and activation file for module ECM + * \brief Description and activation file for the module ECM */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -58,7 +58,7 @@ class modECM extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (XXX is id value) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of png file (without png) used for this module - $this->picto = 'folder'; + $this->picto = 'folder-open'; // Data directories to create when module is enabled $this->dirs = array("/ecm/temp"); @@ -123,59 +123,69 @@ class modECM extends DolibarrModules $r = 0; // Top menu - $this->menu[$r] = array('fk_menu'=>0, - 'type'=>'top', - 'titre'=>'MenuECM', - 'mainmenu'=>'ecm', - 'url'=>'/ecm/index.php', - 'langs'=>'ecm', - 'position'=>82, - 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup', - 'enabled'=>'$conf->ecm->enabled', - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>0, + 'type'=>'top', + 'titre'=>'MenuECM', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'ecm', + 'url'=>'/ecm/index.php', + 'langs'=>'ecm', + 'position'=>82, + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup', + 'enabled'=>'$conf->ecm->enabled', + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; // Left menu linked to top menu - $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm', - 'type'=>'left', - 'titre'=>'ECMArea', - 'mainmenu'=>'ecm', - 'leftmenu'=>'ecm', - 'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm', - 'langs'=>'ecm', - 'position'=>101, - 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', - 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>'fk_mainmenu=ecm', + 'type'=>'left', + 'titre'=>'ECMArea', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'ecm', + 'leftmenu'=>'ecm', + 'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm', + 'langs'=>'ecm', + 'position'=>101, + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; - $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', - 'type'=>'left', - 'titre'=>'ECMSectionsManual', - 'mainmenu'=>'ecm', - 'leftmenu'=>'ecm_manual', - 'url'=>'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm', - 'langs'=>'ecm', - 'position'=>102, - 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', - 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', + 'type'=>'left', + 'titre'=>'ECMSectionsManual', + 'mainmenu'=>'ecm', + 'leftmenu'=>'ecm_manual', + 'url'=>'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm', + 'langs'=>'ecm', + 'position'=>102, + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; - $this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', - 'type'=>'left', - 'titre'=>'ECMSectionsAuto', - 'mainmenu'=>'ecm', - 'url'=>'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm', - 'langs'=>'ecm', - 'position'=>103, - 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', - 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)', - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $this->menu[$r] = array( + 'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', + 'type'=>'left', + 'titre'=>'ECMSectionsAuto', + 'mainmenu'=>'ecm', + 'url'=>'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm', + 'langs'=>'ecm', + 'position'=>103, + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)', + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; } } diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index f71932c93b9..53223ecd705 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modEmailCollector.class.php * \ingroup emailcollector - * \brief Description and activation file for module emailcollector + * \brief Description and activation file for the module emailcollector */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -91,7 +91,7 @@ class modEmailCollector extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("admin"); - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -108,8 +108,7 @@ class modEmailCollector extends DolibarrModules ); - if (!isset($conf->emailcollector) || !isset($conf->emailcollector->enabled)) - { + if (!isset($conf->emailcollector) || !isset($conf->emailcollector->enabled)) { $conf->emailcollector = new stdClass(); $conf->emailcollector->enabled = 0; } @@ -147,19 +146,19 @@ class modEmailCollector extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@dav', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->dav->enabled,$conf->dav->enabled,$conf->dav->enabled) // Condition to show each dictionary - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@dav', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order + 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) + 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') + 'tabcond'=>array($conf->dav->enabled,$conf->dav->enabled,$conf->dav->enabled) // Condition to show each dictionary + ); + */ // Boxes/Widgets @@ -304,7 +303,9 @@ class modEmailCollector extends DolibarrModules $sql[] = $sqlforexampleFilterA3; $sql[] = $sqlforexampleA4; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } $tmpsql = "SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Responses_Out' and entity = ".$conf->entity; $tmpresql = $this->db->query($tmpsql); @@ -346,7 +347,9 @@ class modEmailCollector extends DolibarrModules $sql[] = $sqlforexampleB2; $sql[] = $sqlforexampleB3; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } $tmpsql = "SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Leads' and entity = ".$conf->entity; $tmpresql = $this->db->query($tmpsql); @@ -375,7 +378,9 @@ class modEmailCollector extends DolibarrModules $sql[] = $sqlforexampleFilterC3; $sql[] = $sqlforexampleC4; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } $tmpsql = "SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Candidatures' and entity = ".$conf->entity; $tmpresql = $this->db->query($tmpsql); @@ -403,7 +408,9 @@ class modEmailCollector extends DolibarrModules $sql[] = $sqlforexampleFilterC3; $sql[] = $sqlforexampleC4; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } return $this->_init($sql, $options); } diff --git a/htdocs/core/modules/modEventOrganization.class.php b/htdocs/core/modules/modEventOrganization.class.php new file mode 100644 index 00000000000..3a81102f4bd --- /dev/null +++ b/htdocs/core/modules/modEventOrganization.class.php @@ -0,0 +1,414 @@ + + * + * 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 . + */ + +/** + * \defgroup eventorganization Module EventOrganization + * \brief EventOrganization module descriptor. + * + * \file htdocs/eventorganization/core/modules/modEventOrganization.class.php + * \ingroup eventorganization + * \brief Description and activation file for the EventOrganization + */ +include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; + +/** + * Description and activation class for module EventOrganization + * This module is base on this specification : + * https://wiki.dolibarr.org/index.php/Draft:Module_Event_Organization + */ +class modEventOrganization extends DolibarrModules +{ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $langs, $conf; + $this->db = $db; + + $this->numero = 2450; + + $this->rights_class = 'eventorganization'; + + $this->family = "projects"; + + $this->module_position = '20'; + + $this->name = preg_replace('/^mod/i', '', get_class($this)); + + $this->description = "EventOrganizationDescription"; + $this->descriptionlong = "EventOrganizationDescriptionLong"; + + $this->version = 'development'; + + + // Key used in llx_const table to save module status enabled/disabled (where EVENTORGANIZATION is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + + $this->picto = 'action'; + + // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) + $this->module_parts = array( + // Set this to 1 if module has its own trigger directory (core/triggers) + 'triggers' => 1, + // Set this to 1 if module has its own login method file (core/login) + 'login' => 0, + // Set this to 1 if module has its own substitution function file (core/substitutions) + 'substitutions' => 0, + // Set this to 1 if module has its own menus handler directory (core/menus) + 'menus' => 0, + // Set this to 1 if module overwrite template dir (core/tpl) + 'tpl' => 0, + // Set this to 1 if module has its own barcode directory (core/modules/barcode) + 'barcode' => 0, + // Set this to 1 if module has its own models directory (core/modules/xxx) + 'models' => 1, + // Set this to 1 if module has its own printing directory (core/modules/printing) + 'printing' => 0, + // Set this to 1 if module has its own theme directory (theme) + 'theme' => 0, + // Set this to relative path of css file if module has its own css file + 'css' => array( + // '/eventorganization/css/eventorganization.css.php', + ), + // Set this to relative path of js file if module must load a js on all pages + 'js' => array( + // '/eventorganization/js/eventorganization.js.php', + ), + // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all' + 'hooks' => array( + // 'data' => array( + // 'hookcontext1', + // 'hookcontext2', + // ), + // 'entity' => '0', + ), + // Set this to 1 if features of module are opened to external users + 'moduleforexternal' => 0, + ); + + // Data directories to create when module is enabled. + // Example: this->dirs = array("/eventorganization/temp","/eventorganization/subdir"); + $this->dirs = array("/eventorganization/temp"); + + // Config pages. Put here list of php page, stored into eventorganization/admin directory, to use to setup module. + $this->config_page_url = array("eventorganization.php"); + + // Dependencies + // A condition to hide module + $this->hidden = false; + // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...) + $this->depends = array('modProjet','modCategorie'); + $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) + $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) + + // The language file dedicated to your module + $this->langfiles = array("eventorganization"); + + // Prerequisites + $this->phpmin = array(5, 6); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(13, -3); // Minimum version of Dolibarr required by module + + // Messages at activation + $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + //$this->automatic_activation = array('FR'=>'EventOrganizationWasAutomaticallyActivatedBecauseOfYourCountryChoice'); + //$this->always_enabled = true; // If true, can't be disabled + + // Constants + // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive) + // Example: $this->const=array(1 => array('EVENTORGANIZATION_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1), + // 2 => array('EVENTORGANIZATION_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1) + // ); + $this->const = array(1 => array('EVENTORGANIZATION_TASK_LABEL', 'chaine', '', '', 0)); + + + + // Some keys to add into the overwriting translation tables + /*$this->overwrite_translation = array( + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ + + if (!isset($conf->eventorganization) || !isset($conf->eventorganization->enabled)) { + $conf->eventorganization = new stdClass(); + $conf->eventorganization->enabled = 0; + } + + // Array to add new pages in new tabs + $this->tabs = array(); + // Example: + // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@eventorganization:$user->rights->eventorganization->read:/eventorganization/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 + // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@eventorganization:$user->rights->othermodule->read:/eventorganization/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // + // Where objecttype can be + // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) + // 'contact' to add a tab in contact view + // 'contract' to add a tab in contract view + // 'group' to add a tab in group view + // 'intervention' to add a tab in intervention view + // 'invoice' to add a tab in customer invoice view + // 'invoice_supplier' to add a tab in supplier invoice view + // 'member' to add a tab in fundation member view + // 'opensurveypoll' to add a tab in opensurvey poll view + // 'order' to add a tab in customer order view + // 'order_supplier' to add a tab in supplier order view + // 'payment' to add a tab in payment view + // 'payment_supplier' to add a tab in supplier payment view + // 'product' to add a tab in product view + // 'propal' to add a tab in propal view + // 'project' to add a tab in project view + // 'stock' to add a tab in stock view + // 'thirdparty' to add a tab in third party view + // 'user' to add a tab in user view + + // Dictionaries + $this->dictionaries = array(); + /* Example: + $this->dictionaries=array( + 'langs'=>'eventorganization@eventorganization', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1", MAIN_DB_PREFIX."table2", MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1", "Table2", "Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC", "label ASC", "label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label", "code,label", "code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid", "rowid", "rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->eventorganization->enabled, $conf->eventorganization->enabled, $conf->eventorganization->enabled) + ); + */ + + // Boxes/Widgets + // Add here list of php file(s) stored in eventorganization/core/boxes that contains a class to show a widget. + $this->boxes = array( + // 0 => array( + // 'file' => 'eventorganizationwidget1.php@eventorganization', + // 'note' => 'Widget provided by EventOrganization', + // 'enabledbydefaulton' => 'Home', + // ), + // ... + ); + + // Cronjobs (List of cron jobs entries to add when module is enabled) + // unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week + $this->cronjobs = array( + ); + + + // Permissions provided by this module + $this->rights = array(); + $r = 1; + + // Add here entries to declare new permissions + /* BEGIN MODULEBUILDER PERMISSIONS */ + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Read objects of EventOrganization'; // Permission label + $this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->eventorganization->level1) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Create/Update objects of EventOrganization'; // Permission label + $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->eventorganization->level1) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Delete objects of EventOrganization'; // Permission label + $this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->eventorganization->level1) + $r++; + /* END MODULEBUILDER PERMISSIONS */ + + // Main menu entries to add + $this->menu = array(); + $r = 0; + // Add here entries to declare new menus + /* BEGIN MODULEBUILDER TOPMENU */ + /* END MODULEBUILDER TOPMENU */ + /* BEGIN MODULEBUILDER LEFTMENU CONFERENCEORBOOTH*/ + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project', // '' 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'=>'EventOrganizationMenuLeft', + 'prefix' => img_picto('', 'eventorganization', 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'project', + 'leftmenu'=>'eventorganization', + 'url'=>'', + 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' 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', + 'url'=>'/projet/list.php?search_usage_event_organization=1&mainmenu=project&contextpage=organizedevents', + 'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' 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', + 'url'=>'/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1', + 'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->write', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project', // '' 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'=>'ConferenceOrBooth', + 'prefix' => img_picto('', 'conferenceorbooth', 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'project', + 'leftmenu'=>'eventorganizationconforbooth', + 'url'=>'', + 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' 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', + 'url'=>'/eventorganization/conferenceorbooth_list.php?mainmenu=project', + 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->read', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' 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', + 'url'=>'/eventorganization/conferenceorbooth_card.php?leftmenu=projects&action=create', + 'langs'=>'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->eventorganization->write', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + /* END MODULEBUILDER LEFTMENU CONFERENCEORBOOTH */ + // Exports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER EXPORT CONFERENCEORBOOTH */ + /* END MODULEBUILDER EXPORT CONFERENCEORBOOTH */ + + // Imports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER IMPORT CONFERENCEORBOOTH */ + /* END MODULEBUILDER IMPORT CONFERENCEORBOOTH */ + } + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function init($options = '') + { + global $conf, $langs; + + $result = $this->_load_tables('/eventorganization/sql/'); + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } + + // Permissions + $this->remove($options); + + $sql = array(); + + // Document templates + $moduledir = 'eventorganization'; + $myTmpObjects = array(); + $myTmpObjects['ConferenceOrBooth'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + + foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'ConferenceOrBooth') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/eventorganization/template_conferenceorbooths.odt'; + $dirodt = DOL_DATA_ROOT.'/doctemplates/eventorganization'; + $dest = $dirodt.'/template_conferenceorbooths.odt'; + + if (file_exists($src) && !file_exists($dest)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result = dol_copy($src, $dest, 0, 0); + if ($result < 0) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array_merge($sql, array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."','".strtolower($myTmpObjectKey)."',".$conf->entity.")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".strtolower($myTmpObjectKey)."', ".$conf->entity.")" + )); + } + } + + return $this->_init($sql, $options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function remove($options = '') + { + $sql = array(); + return $this->_remove($sql, $options); + } +} diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index c42cbeb0f8c..238eef2d6fe 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -24,7 +24,7 @@ * \brief Module pour gerer les expeditions de produits * \file htdocs/core/modules/modExpedition.class.php * \ingroup expedition - * \brief Fichier de description et activation du module Expedition + * \brief Description and activation file for the module Expedition */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -251,7 +251,9 @@ class modExpedition extends DolibarrModules 'ed.rowid'=>'LineId', 'cd.description'=>'Description', 'ed.qty'=>"Qty", 'p.rowid'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'p.weight'=>'ProductWeight', 'p.weight_units'=>'WeightUnits', 'p.volume'=>'ProductVolume', 'p.volume_units'=>'VolumeUnits' ); - if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) $this->export_fields_array[$r] += array('sp.rowid'=>'IdContact', 'sp.lastname'=>'Lastname', 'sp.firstname'=>'Firstname', 'sp.note_public'=>'NotePublic'); + if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { + $this->export_fields_array[$r] += array('sp.rowid'=>'IdContact', 'sp.lastname'=>'Lastname', 'sp.firstname'=>'Firstname', 'sp.note_public'=>'NotePublic'); + } //$this->export_TypeFields_array[$r]=array( // 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.label'=>'List:c_country:label:label', // 'co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text", @@ -273,25 +275,36 @@ class modExpedition extends DolibarrModules 'ed.rowid'=>'shipment_line', 'cd.description'=>'shipment_line', 'ed.qty'=>"shipment_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product', 'p.weight'=>'product', 'p.weight_units'=>'product', 'p.volume'=>'product', 'p.volume_units'=>'product' ); - if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) $this->export_entities_array[$r] += array('sp.rowid'=>'contact', 'sp.lastname'=>'contact', 'sp.firstname'=>'contact', 'sp.note_public'=>'contact'); + if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { + $this->export_entities_array[$r] += array('sp.rowid'=>'contact', 'sp.lastname'=>'contact', 'sp.firstname'=>'contact', 'sp.note_public'=>'contact'); + } $this->export_dependencies_array[$r] = array('shipment_line'=>'ed.rowid', 'product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) - { - $keyforselect = 'socpeople'; $keyforelement = 'contact'; $keyforaliasextra = 'extra3'; + if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { + $keyforselect = 'socpeople'; + $keyforelement = 'contact'; + $keyforaliasextra = 'extra3'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; } - $keyforselect = 'expedition'; $keyforelement = 'shipment'; $keyforaliasextra = 'extra'; + $keyforselect = 'expedition'; + $keyforelement = 'shipment'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'expeditiondet'; $keyforelement = 'shipment_line'; $keyforaliasextra = 'extra2'; + $keyforselect = 'expeditiondet'; + $keyforelement = 'shipment_line'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extraprod'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extraprod'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'expedition as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expedition_extrafields as extra ON c.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'societe as s'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'expeditiondet as ed'; @@ -300,13 +313,15 @@ class modExpedition extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object'; if ($idcontacts && !empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$this->db->sanitize($idcontacts).')'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; } $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('expedition').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } } @@ -330,13 +345,11 @@ class modExpedition extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/shipments'; $dest = $dirodt.'/template_shipment.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modExpenseReport.class.php b/htdocs/core/modules/modExpenseReport.class.php index befafbc6767..f727247a831 100644 --- a/htdocs/core/modules/modExpenseReport.class.php +++ b/htdocs/core/modules/modExpenseReport.class.php @@ -21,7 +21,7 @@ * \brief Module to manage expense report. Replace old module Deplacement. * \file htdocs/core/modules/modExpenseReport.class.php * \ingroup expensereport - * \brief Description and activation file for module ExpenseReport + * \brief Description and activation file for the module ExpenseReport */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -65,7 +65,7 @@ class modExpenseReport extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled // $this->conflictwith = array("modDeplacement"); // Deactivate for access on old information $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 7); // Minimum version of Dolibarr required by module $this->langfiles = array("companies", "trips"); @@ -211,7 +211,9 @@ class modExpenseReport extends DolibarrModules $this->export_alias_array[$r] = array('d.rowid'=>"idtrip", 'd.type'=>"type", 'd.note_private'=>'note_private', 'd.note_public'=>'note_public', 'u.lastname'=>'name', 'u.firstname'=>'firstname', 'u.login'=>'login'); $this->export_dependencies_array[$r] = array('expensereport_line'=>'ed.rowid', 'type_fees'=>'tf.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'expensereport'; $keyforelement = 'expensereport'; $keyforaliasextra = 'extra'; + $keyforselect = 'expensereport'; + $keyforelement = 'expensereport'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; diff --git a/htdocs/core/modules/modExport.class.php b/htdocs/core/modules/modExport.class.php index 037283b1715..278a70e6339 100644 --- a/htdocs/core/modules/modExport.class.php +++ b/htdocs/core/modules/modExport.class.php @@ -21,7 +21,7 @@ * \brief Module generique pour realiser des exports de donnees en base * \file htdocs/core/modules/modExport.class.php * \ingroup export - * \brief Fichier de description et activation du module export + * \brief Description and activation file for the module export */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -78,14 +78,14 @@ class modExport extends DolibarrModules $r++; $this->rights[$r][0] = 1201; - $this->rights[$r][1] = 'Lire les exports'; + $this->rights[$r][1] = 'Read exports'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'lire'; $r++; $this->rights[$r][0] = 1202; - $this->rights[$r][1] = 'Creer/modifier un export'; + $this->rights[$r][1] = 'Creeate/modify export'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'creer'; diff --git a/htdocs/core/modules/modExternalRss.class.php b/htdocs/core/modules/modExternalRss.class.php index 05cc62094e6..d7710687ca6 100644 --- a/htdocs/core/modules/modExternalRss.class.php +++ b/htdocs/core/modules/modExternalRss.class.php @@ -21,7 +21,7 @@ * \brief Module pour inclure des informations externes RSS * \file htdocs/core/modules/modExternalRss.class.php * \ingroup externalrss - * \brief Fichier de description et activation du module externalrss + * \brief Description and activation file for the module externalrss */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -98,12 +98,10 @@ class modExternalRss extends DolibarrModules $sql .= " WHERE name like 'EXTERNAL_RSS_TITLE_%'"; $sql .= " AND entity = ".$conf->entity; $result = $this->db->query($sql); - if ($result) - { - while ($obj = $this->db->fetch_object($result)) - { - if (preg_match('/EXTERNAL_RSS_TITLE_([0-9]+)/i', $obj->name, $reg)) - { + if ($result) { + while ($obj = $this->db->fetch_object($result)) { + $reg = array(); + if (preg_match('/EXTERNAL_RSS_TITLE_([0-9]+)/i', $obj->name, $reg)) { // Definie la boite si on a trouvee une ancienne configuration //$this->boxes[$reg[1]][0] = "(ExternalRSSInformations)"; $this->boxes[$reg[1]]['file'] = "box_external_rss.php"; diff --git a/htdocs/core/modules/modExternalSite.class.php b/htdocs/core/modules/modExternalSite.class.php index 54c7a9d9b0b..71c3387ff5e 100644 --- a/htdocs/core/modules/modExternalSite.class.php +++ b/htdocs/core/modules/modExternalSite.class.php @@ -22,7 +22,7 @@ * \brief Module to include an external web site/tools into Dolibarr menu and into a frame page. * \file htdocs/core/modules/modExternalSite.class.php * \ingroup externalsite - * \brief Description and activation file for module ExternalSite + * \brief Description and activation file for the module ExternalSite */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -59,7 +59,7 @@ class modExternalSite extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (XXX is id value) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of png file (without png) used for this module - $this->picto = 'bookmark'; + $this->picto = 'website'; // Call to inside lang's file $this->langfiles = array("externalsite"); @@ -67,7 +67,7 @@ class modExternalSite extends DolibarrModules $this->dirs = array(); // Config pages. Put here list of php page names stored in admmin directory used to setup module - $this->config_page_url = array("externalsite.php@externalsite"); + $this->config_page_url = array("index.php@externalsite"); // Dependencies $this->depends = array(); // List of modules id that must be enabled if this module is enabled @@ -103,6 +103,7 @@ class modExternalSite extends DolibarrModules 'fk_menu'=>0, 'type'=>'top', 'titre'=>'__[EXTERNALSITE_LABEL]__', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'), 'mainmenu'=>'externalsite', 'url'=>'/externalsite/frames.php', 'langs'=>'other', diff --git a/htdocs/core/modules/modFTP.class.php b/htdocs/core/modules/modFTP.class.php index 52944961379..3e2ccd7d049 100644 --- a/htdocs/core/modules/modFTP.class.php +++ b/htdocs/core/modules/modFTP.class.php @@ -21,7 +21,7 @@ * \brief Module for FTP client module * \file htdocs/core/modules/modFTP.class.php * \ingroup ftp - * \brief Description and activation file for module FTP + * \brief Description and activation file for the module FTP */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 9212fa1f7ce..8e9d242a6e3 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2021 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 @@ -20,11 +21,11 @@ */ /** - * \defgroup facture Module invoices - * \brief Module pour gerer les factures clients et/ou fournisseurs + * \defgroup facture Module customer invoices + * \brief Module to manage customer invoices * \file htdocs/core/modules/modFacture.class.php * \ingroup facture - * \brief Fichier de la classe de description et activation du module Facture + * \brief Description and activation file for the module customer invoices */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -120,6 +121,7 @@ class modFacture extends DolibarrModules $datestart = dol_mktime(23, 0, 0, $arraydate['mon'], $arraydate['mday'], $arraydate['year']); $this->cronjobs = array( 0=>array('label'=>'RecurringInvoices', 'jobtype'=>'method', 'class'=>'compta/facture/class/facture-rec.class.php', 'objectname'=>'FactureRec', 'method'=>'createRecurringInvoices', 'parameters'=>'', 'comment'=>'Generate recurring invoices', 'frequency'=>1, 'unitfrequency'=>3600 * 24, 'priority'=>50, 'status'=>1, 'test'=>'$conf->facture->enabled', 'datestart'=>$datestart), + 1=>array('label'=>'SendEmailsRemindersOnDueDate', 'jobtype'=>'method', 'class'=>'compta/facture/class/facture.class.php', 'objectname'=>'Facture', 'method'=>'sendEmailsReminderOnDueDate', 'parameters'=>"10,all,EmailTemplateCode", 'comment'=>'Send an emails when the unpaid invoices reach a due date + n days (an email template with EmailTemplateCode must exists. the version in the language of the thirdparty will be used in priority)', 'frequency'=>1, 'unitfrequency'=>3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>'$conf->facture->enabled', 'datestart'=>$datestart), ); // Permissions @@ -206,6 +208,7 @@ class modFacture extends DolibarrModules //-------- $r = 1; + $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "pa"; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r] = 'invoice'; @@ -218,26 +221,24 @@ class modFacture extends DolibarrModules 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', - 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT", - 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', + 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total_ht'=>"TotalHT", + 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', 'none.rest'=>'Rest', 'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription", 'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT", 'fd.total_ttc'=>"LineTotalTTC", 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode', 'fd.product_type'=>"TypeOfLineServiceOrProduct", 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', - 'p.accountancy_code_sell'=>'ProductAccountancySellCode' + $alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; $this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } - if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) - { + if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { $this->export_fields_array[$r]['f.module_source'] = 'Module'; $this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal'; } @@ -245,16 +246,15 @@ class modFacture extends DolibarrModules 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date", - 'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', 'f.close_code'=>'Text', 'f.close_note'=>'Text', + 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', 'f.close_code'=>'Text', 'f.close_note'=>'Text', 'none.rest'=>"NumericCompute", 'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text', 'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>'Numeric', 'fd.label'=>'Text', 'fd.description'=>"Text", 'fd.subprice'=>"Numeric", 'fd.tva_tx'=>"Numeric", 'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_tva'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.date_start'=>"Date", 'fd.date_end'=>"Date", 'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', - 'p.accountancy_code_sell'=>'Text' + $alias_product_perentity . '.accountancy_code_sell'=>'Text' ); - if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) - { + if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { $this->export_TypeFields_array[$r]['f.module_source'] = 'Text'; $this->export_TypeFields_array[$r]['f.pos_source'] = 'Text'; } @@ -264,20 +264,28 @@ class modFacture extends DolibarrModules 's.tva_intra'=>'company', 'pj.ref'=>'project', 'pj.title'=>'project', 'fd.rowid'=>'invoice_line', 'fd.label'=>"invoice_line", 'fd.description'=>"invoice_line", 'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", 'fd.qty'=>"invoice_line", 'fd.date_start'=>"invoice_line", 'fd.date_end'=>"invoice_line", 'fd.special_code'=>'invoice_line', - 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', 'p.accountancy_code_sell'=>'product', + 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', $alias_product_perentity . '.accountancy_code_sell'=>'product', 'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user' ); $this->export_special_array[$r] = array('none.rest'=>'getRemainToPay'); $this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'facture'; $keyforelement = 'invoice'; $keyforaliasextra = 'extra'; + $keyforselect = 'facture'; + $keyforelement = 'invoice'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'facturedet'; $keyforelement = 'invoice_line'; $keyforaliasextra = 'extra2'; + $keyforselect = 'facturedet'; + $keyforelement = 'invoice_line'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra3'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra3'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture as f'; @@ -288,10 +296,15 @@ class modFacture extends DolibarrModules $this->export_sql_end[$r] .= ' , '.MAIN_DB_PREFIX.'facturedet as fd'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet_extrafields as extra2 on fd.rowid = extra2.fk_object'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } $r++; @@ -305,8 +318,8 @@ class modFacture extends DolibarrModules 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer', - 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT", - 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', + 'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total_ht'=>"TotalHT", + 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment', 'none.rest'=>'Rest', 'f.note_private'=>"NotePrivate", 'f.note_public'=>"NotePublic", 'f.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'f.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', 'p.rowid'=>'PaymentId', 'p.ref'=>'PaymentRef', @@ -314,8 +327,7 @@ class modFacture extends DolibarrModules 'pt.code'=>'CodePaymentMode', 'pt.libelle'=>'LabelPaymentMode', 'p.note'=>'PaymentNote', 'p.fk_bank'=>'IdTransaction', 'ba.ref'=>'AccountRef' ); $this->export_help_array[$r] = array('f.paye'=>'InvoicePaidCompletelyHelp'); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; @@ -323,8 +335,7 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; $this->export_examplevalues_array[$r]['f.multicurrency_code'] = 'EUR'; } - if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) - { + if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { $this->export_fields_array[$r]['f.module_source'] = 'POSModule'; $this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal'; } @@ -332,14 +343,13 @@ class modFacture extends DolibarrModules 's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.rowid'=>"Numeric", 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date", - 'f.total'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.close_code'=>'Text', 'f.close_note'=>'Text', + 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.close_code'=>'Text', 'f.close_note'=>'Text', 'none.rest'=>'NumericCompute', 'f.note_private'=>"Text", 'f.note_public'=>"Text", 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text', 'pj.ref'=>'Text', 'pj.title'=>'Text', 'p.amount'=>'Numeric', 'pf.amount'=>'Numeric', 'p.rowid'=>'Numeric', 'p.ref'=>'Text', 'p.title'=>'Text', 'p.datep'=>'Date', 'p.num_paiement'=>'Numeric', 'p.fk_bank'=>'Numeric', 'p.note'=>'Text', 'pt.code'=>'Text', 'pt.libelle'=>'text', 'ba.ref'=>'Text' ); - if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) - { + if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { $this->export_fields_array[$r]['f.module_source'] = 'POSModule'; $this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal'; } @@ -352,11 +362,15 @@ class modFacture extends DolibarrModules ); $this->export_special_array[$r] = array('none.rest'=>'getRemainToPay'); $this->export_dependencies_array[$r] = array('payment'=>'p.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them, or just to have field we need - $keyforselect = 'facture'; $keyforelement = 'invoice'; $keyforaliasextra = 'extra'; + $keyforselect = 'facture'; + $keyforelement = 'invoice'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c on s.fk_pays = c.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as cd on s.fk_departement = cd.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture as f'; @@ -371,7 +385,9 @@ class modFacture extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON ba.rowid = b.fk_account'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } $r++; } @@ -396,13 +412,11 @@ class modFacture extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/invoices'; $dest = $dirodt.'/template_invoice.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php index f93e08c1872..7742051989e 100644 --- a/htdocs/core/modules/modFckeditor.class.php +++ b/htdocs/core/modules/modFckeditor.class.php @@ -22,7 +22,7 @@ * \brief Module pour mettre en page les zones de saisie de texte * \file htdocs/core/modules/modFckeditor.class.php * \ingroup fckeditor - * \brief Fichier de description et activation du module Fckeditor + * \brief Description and activation file for the module Fckeditor */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 422ca6b22d5..af99e6f646f 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -25,7 +25,7 @@ * \brief Module to manage intervention cards * \file htdocs/core/modules/modFicheinter.class.php * \ingroup ficheinter - * \brief Fichier de description et activation du module Ficheinter + * \brief Description and activation file for the module Ficheinter */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -165,7 +165,9 @@ class modFicheinter extends DolibarrModules 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 'f.rowid'=>"InterId", 'f.ref'=>"InterRef", 'f.datec'=>"InterDateCreation", 'f.duree'=>"InterDuration", 'f.fk_statut'=>'InterStatus', 'f.description'=>"InterNote"); - $keyforselect = 'fichinter'; $keyforelement = 'intervention'; $keyforaliasextra = 'extra'; + $keyforselect = 'fichinter'; + $keyforelement = 'intervention'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_fields_array[$r] += array( 'pj.ref'=>'ProjectRef', 'pj.title'=>'ProjectLabel', @@ -195,7 +197,9 @@ class modFicheinter extends DolibarrModules 'fd.duree'=>'inter_line', 'fd.description'=>'inter_line' ); $this->export_dependencies_array[$r] = array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'fichinterdet'; $keyforelement = 'inter_line'; $keyforaliasextra = 'extradet'; + $keyforselect = 'fichinterdet'; + $keyforelement = 'inter_line'; + $keyforaliasextra = 'extradet'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index d39d67775f5..71f101014ad 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -24,7 +24,7 @@ * \defgroup fournisseur Module suppliers * \file htdocs/core/modules/modFournisseur.class.php * \ingroup fournisseur - * \brief Description and activation file for module Supplier + * \brief Description and activation file for the module Supplier */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -206,8 +206,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'supprimer'; - if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) - { + if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) { $r++; $this->rights[$r][0] = 1190; $this->rights[$r][1] = 'Approve supplier order (second level)'; // $langs->trans("Permission1190"); @@ -299,8 +298,7 @@ class modFournisseur extends DolibarrModules 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'p.accountancy_code_buy'=>'ProductAccountancyBuyCode', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; @@ -332,15 +330,12 @@ class modFournisseur extends DolibarrModules // Add extra fields object $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $typeFilter = "Text"; - switch ($obj->type) - { + switch ($obj->type) { case 'int': case 'double': case 'price': @@ -360,7 +355,9 @@ class modFournisseur extends DolibarrModules $var = array_keys($tmpparam['options']); $tmp = array_shift($var); } - if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp; + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) { + $typeFilter = "List:".$tmp; + } break; } $this->export_fields_array[$r][$fieldname] = $fieldlabel; @@ -372,15 +369,12 @@ class modFournisseur extends DolibarrModules // Add extra fields line $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extraline.'.$obj->name; $fieldlabel = ucfirst($obj->label); $typeFilter = "Text"; - switch ($obj->type) - { + switch ($obj->type) { case 'int': case 'double': case 'price': @@ -396,8 +390,12 @@ class modFournisseur extends DolibarrModules case 'sellist': $tmp = ''; $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null - if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift(array_keys($tmpparam['options'])); - if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp; + if ($tmpparam['options'] && is_array($tmpparam['options'])) { + $tmp = array_shift(array_keys($tmpparam['options'])); + } + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) { + $typeFilter = "List:".$tmp; + } break; } $this->export_fields_array[$r][$fieldname] = $fieldlabel; @@ -408,7 +406,9 @@ class modFournisseur extends DolibarrModules // End add extra fields line $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture_fourn as f'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)'; @@ -418,7 +418,9 @@ class modFournisseur extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_invoice').')'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + } $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; @@ -434,8 +436,7 @@ class modFournisseur extends DolibarrModules 'f.fk_statut'=>'InvoiceStatus', 'f.note_public'=>"InvoiceNote", 'p.rowid'=>'PaymentId', 'pf.amount'=>'AmountPayment', 'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber', 'p.fk_bank'=>'IdTransaction', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; @@ -465,15 +466,12 @@ class modFournisseur extends DolibarrModules // Add extra fields object $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $typeFilter = "Text"; - switch ($obj->type) - { + switch ($obj->type) { case 'int': case 'double': case 'price': @@ -489,8 +487,12 @@ class modFournisseur extends DolibarrModules case 'sellist': $tmp = ''; $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null - if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift(array_keys($tmpparam['options'])); - if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp; + if ($tmpparam['options'] && is_array($tmpparam['options'])) { + $tmp = array_shift(array_keys($tmpparam['options'])); + } + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) { + $typeFilter = "List:".$tmp; + } break; } $this->export_fields_array[$r][$fieldname] = $fieldlabel; @@ -501,7 +503,9 @@ class modFournisseur extends DolibarrModules // End add extra fields object $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture_fourn as f'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)'; @@ -510,7 +514,9 @@ class modFournisseur extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_invoice').')'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + } // Order $r++; @@ -522,29 +528,27 @@ class modFournisseur extends DolibarrModules 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6', 's.tva_intra'=>'VATIntra', 'f.rowid'=>"OrderId", 'f.ref'=>"Ref", 'f.ref_supplier'=>"RefSupplier", 'f.date_creation'=>"DateCreation", 'f.date_commande'=>"OrderDate", 'f.date_livraison'=>"DateDeliveryPlanned", - 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2', + 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2', 'f.note_public'=>"NotePublic", 'f.note_private'=>"NotePrivate", 'ua1.login'=>'ApprovedBy', 'ua2.login'=>'ApprovedBy2', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.remise_percent'=>"Discount", 'fd.total_ht'=>"LineTotalHT", 'fd.total_ttc'=>"LineTotalTTC", 'fd.total_tva'=>"LineTotalVAT", 'fd.product_type'=>'TypeOfLineServiceOrProduct', 'fd.ref'=>'RefSupplier', 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['f.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; $this->export_fields_array[$r]['f.multicurrency_total_tva'] = 'MulticurrencyAmountVAT'; $this->export_fields_array[$r]['f.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC'; } - if (empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) - { + if (empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) { unset($this->export_fields_array['f.date_approve2']); unset($this->export_fields_array['ua2.login']); } $this->export_TypeFields_array[$r] = array( 's.rowid'=>"company", 's.nom'=>'Text', 's.address'=>'Text', 's.cp'=>'Text', 's.ville'=>'Text', 'c.code'=>'Text', 's.tel'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", - 'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric", + 'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.fk_statut'=>'Status', 'f.date_approve'=>'Date', 'f.date_approve2'=>'Date', 'f.note_public'=>"Text", 'f.note_private'=>"Text", 'fd.description'=>"Text", 'fd.tva_tx'=>"Numeric", 'fd.qty'=>"Numeric", 'fd.remise_percent'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.total_tva'=>"Numeric", 'fd.product_type'=>'Numeric', 'fd.ref'=>'Text', 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text' @@ -560,15 +564,12 @@ class modFournisseur extends DolibarrModules // Add extra fields object $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $typeFilter = "Text"; - switch ($obj->type) - { + switch ($obj->type) { case 'int': case 'double': case 'price': @@ -585,8 +586,12 @@ class modFournisseur extends DolibarrModules $tmp = ''; $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null $tmpkey = array_keys($tmpparam['options']); - if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift($tmpkey); - if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp; + if ($tmpparam['options'] && is_array($tmpparam['options'])) { + $tmp = array_shift($tmpkey); + } + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) { + $typeFilter = "List:".$tmp; + } break; } $this->export_fields_array[$r][$fieldname] = $fieldlabel; @@ -598,15 +603,12 @@ class modFournisseur extends DolibarrModules // Add extra fields line $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extraline.'.$obj->name; $fieldlabel = ucfirst($obj->label); $typeFilter = "Text"; - switch ($obj->type) - { + switch ($obj->type) { case 'int': case 'double': case 'price': @@ -627,7 +629,9 @@ class modFournisseur extends DolibarrModules $tmpparam_param_key = array_keys($tmpparam['options']); $tmp = array_shift($tmpparam_param_key); } - if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp; + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) { + $typeFilter = "List:".$tmp; + } break; } $this->export_fields_array[$r][$fieldname] = $fieldlabel; @@ -638,7 +642,9 @@ class modFournisseur extends DolibarrModules // End add extra fields line $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'commande_fournisseur as f'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)'; @@ -650,7 +656,9 @@ class modFournisseur extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_order').')'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + } //Import Supplier Invoice //-------- @@ -658,7 +666,7 @@ class modFournisseur extends DolibarrModules $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; - $this->import_label[$r] = "Supplier Invoice"; // Translation key + $this->import_label[$r] = "SupplierInvoices"; // Translation key $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r] = ['f' => MAIN_DB_PREFIX.'facture_fourn', 'extra' => MAIN_DB_PREFIX.'facture_fourn_extrafields']; @@ -751,7 +759,7 @@ class modFournisseur extends DolibarrModules //Import Supplier Invoice Lines $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; - $this->import_label[$r] = "Supplier Invoice Lines"; // Translation key + $this->import_label[$r] = "SupplierInvoiceLines"; // Translation key $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r] = ['fd' => MAIN_DB_PREFIX.'facture_fourn_det', 'extra' => MAIN_DB_PREFIX.'facture_fourn_det_extrafields']; @@ -831,7 +839,7 @@ class modFournisseur extends DolibarrModules //Import Purchase Orders $r++; $this->import_code[$r] = 'commande_fournisseur_'.$r; - $this->import_label[$r] = 'Purchase Orders'; + $this->import_label[$r] = 'SuppliersOrders'; $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; $this->import_tables_array[$r] = ['c' => MAIN_DB_PREFIX.'commande_fournisseur', 'extra' => MAIN_DB_PREFIX.'commande_fournisseur_extrafields']; @@ -852,7 +860,7 @@ class modFournisseur extends DolibarrModules 'c.fk_statut' => 'Status*', 'c.billed' => 'Billed(0/1)', 'c.remise_percent' => 'GlobalDiscount', - 'c.tva' => 'TotalTVA', + 'c.total_tva' => 'TotalTVA', 'c.total_ht' => 'TotalHT', 'c.total_ttc' => 'TotalTTC', 'c.note_private' => 'NotePrivate', @@ -914,7 +922,7 @@ class modFournisseur extends DolibarrModules //Import PO Lines $r++; $this->import_code[$r] = 'commande_fournisseurdet_'.$r; - $this->import_label[$r] = 'PO Lines'; + $this->import_label[$r] = 'PurchaseOrderLines'; $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; $this->import_tables_array[$r] = ['cd' => MAIN_DB_PREFIX.'commande_fournisseurdet', 'extra' => MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields']; @@ -1001,13 +1009,11 @@ class modFournisseur extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_orders'; $dest = $dirodt.'/template_supplier_order.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modGeoIPMaxmind.class.php b/htdocs/core/modules/modGeoIPMaxmind.class.php index 10515a78449..41c3d8517d8 100644 --- a/htdocs/core/modules/modGeoIPMaxmind.class.php +++ b/htdocs/core/modules/modGeoIPMaxmind.class.php @@ -20,7 +20,7 @@ * \brief Module to make geoip conversions * \file htdocs/core/modules/modGeoIPMaxmind.class.php * \ingroup geoip - * \brief File of geoipmaxmind module descriptor + * \brief Description and activation file for the module geoipmaxmind */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -69,7 +69,7 @@ class modGeoIPMaxmind extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); + $this->phpmin = array(5, 6); $this->phpmax = array(); $this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module $this->need_javascript_ajax = 1; diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index 5aa0c2de5c6..25163a766bd 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -21,7 +21,7 @@ * \brief Module to use Gravatar to show photo of users * \file htdocs/core/modules/modGravatar.class.php * \ingroup gravatar - * \brief Description and activation file for module Gravatar + * \brief Description and activation file for the module Gravatar */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -77,7 +77,7 @@ class modGravatar extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(2, 7); // Minimum version of Dolibarr required by module $this->langfiles = array(); @@ -174,7 +174,7 @@ class modGravatar extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', // 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', // 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation", - // 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', + // 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', // 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty", // 'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd", // 'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef' @@ -182,7 +182,7 @@ class modGravatar extends DolibarrModules // $this->export_entities_array[$r]=array( // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', // 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', - // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice", + // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice", // 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line", // 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line", // 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product' diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 759c8b7d284..a50b06201a2 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -18,7 +18,7 @@ /** * \file htdocs/core/modules/modHRM.class.php * \ingroup HRM - * \brief Description and activation file for module HRM + * \brief Description and activation file for the module HRM */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -71,7 +71,7 @@ class modHRM extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(/*"modSalaries, modExpenseReport, modHoliday"*/); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module $this->langfiles = array("hrm"); diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index 6c6eaba69e0..23cbf7eddf8 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -26,7 +26,7 @@ * \brief Module de gestion des congés * \file htdocs/core/modules/modHoliday.class.php * \ingroup holiday - * \brief Description and activation file for module holiday + * \brief Description and activation file for the module holiday */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -87,7 +87,7 @@ class modHoliday extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("holiday"); @@ -221,7 +221,9 @@ class modHoliday extends DolibarrModules $this->export_special_array[$r] = array('none.num_open_days'=>'getNumOpenDays'); $this->export_dependencies_array[$r] = array(); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'holiday'; $keyforelement = 'holiday'; $keyforaliasextra = 'extra'; + $keyforselect = 'holiday'; + $keyforelement = 'holiday'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -241,7 +243,7 @@ class modHoliday extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', // 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', // 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation", - // 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', + // 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', // 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate", // 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart", // 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef' @@ -249,7 +251,7 @@ class modHoliday extends DolibarrModules // $this->export_entities_array[$r]=array( // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', // 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', - // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice", + // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice", // 'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line", // 'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line", // 'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product' @@ -258,7 +260,7 @@ class modHoliday extends DolibarrModules // 's.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.zip'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.phone'=>'soc_tel', // 's.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy', // 's.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice", - // 'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid', + // 'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid', // 'fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc", // 'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid', // 'p.ref'=>'productref' @@ -302,7 +304,7 @@ class modHoliday extends DolibarrModules return 0; } } - */ + */ $sql = array( // "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type = 'holiday' AND entity = ".$conf->entity, diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index 094e4a87aca..b70806af82a 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -21,7 +21,7 @@ * \brief Module to make generic import of data into dolibarr database * \file htdocs/core/modules/modImport.class.php * \ingroup import - * \brief Fichier de description et activation du module Import + * \brief Description and activation file for the module Import */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -64,7 +64,7 @@ class modImport extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module - Need auto_detect_line_endings php option to solve MAC pbs. + $this->phpmin = array(5, 6); // Minimum version of PHP required by module - Need auto_detect_line_endings php option to solve MAC pbs. $this->phpmax = array(); $this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module $this->need_javascript_ajax = 1; diff --git a/htdocs/core/modules/modIncoterm.class.php b/htdocs/core/modules/modIncoterm.class.php index 70e6c738801..a7a260dba6e 100644 --- a/htdocs/core/modules/modIncoterm.class.php +++ b/htdocs/core/modules/modIncoterm.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modIncoterm.class.php * \ingroup incoterm - * \brief Description and activation file for module MyModule + * \brief Description and activation file for the module MyModule */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,7 +68,7 @@ class modIncoterm extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("incoterm"); @@ -79,8 +79,7 @@ class modIncoterm extends DolibarrModules $this->tabs = array(); // Dictionaries - if (!isset($conf->incoterm->enabled)) - { + if (!isset($conf->incoterm->enabled)) { $conf->incoterm = new stdClass(); $conf->incoterm->enabled = 0; } diff --git a/htdocs/core/modules/modIntracommreport.class.php b/htdocs/core/modules/modIntracommreport.class.php index da1bda58c48..47ef889e2dd 100644 --- a/htdocs/core/modules/modIntracommreport.class.php +++ b/htdocs/core/modules/modIntracommreport.class.php @@ -21,7 +21,7 @@ /** * \file htdocs/core/modules/modIntracommreport.class.php * \ingroup Intracomm report - * \brief Module to activate intracomm report module + * \brief Description and activation file for the module intracomm report */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -44,13 +44,13 @@ class modIntracommreport extends DolibarrModules $this->numero = 68000; $this->family = "financial"; - $this->module_position = '100'; + $this->module_position = '60'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "Intracomm report management (Support for French DEB/DES format)"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version - $this->version = 'development'; + $this->version = 'experimental'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->picto = 'intracommreport'; @@ -86,8 +86,7 @@ class modIntracommreport extends DolibarrModules $this->boxes = array(); // Dictionaries - if (!isset($conf->intracommreport->enabled)) - { + if (!isset($conf->intracommreport->enabled)) { $conf->intracommreport = new stdClass(); $conf->intracommreport->enabled = 0; } diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 88e044f0444..8c8756c60c7 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les formats d'impression des etiquettes * \file htdocs/core/modules/modLabel.class.php * \ingroup other - * \brief Fichier de description et activation du module Label + * \brief Description and activation file for the module Labels */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -61,7 +61,7 @@ class modLabel extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages // $this->config_page_url = array("label.php"); diff --git a/htdocs/core/modules/modLdap.class.php b/htdocs/core/modules/modLdap.class.php index f6004f18410..0774f71a583 100644 --- a/htdocs/core/modules/modLdap.class.php +++ b/htdocs/core/modules/modLdap.class.php @@ -22,7 +22,7 @@ * \brief Module to manage LDAP interfaces with contacts or users * \file htdocs/core/modules/modLdap.class.php * \ingroup ldap - * \brief File to describe and activate Ldap module + * \brief Description and activation file for the module LDAP */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -67,7 +67,7 @@ class modLdap extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Constants $this->const = array( @@ -85,6 +85,7 @@ class modLdap extends DolibarrModules 11=>array('LDAP_FIELD_PHONE', 'chaine', 'telephonenumber', '', 0), 12=>array('LDAP_FIELD_FAX', 'chaine', 'facsimiletelephonenumber', '', 0), 13=>array('LDAP_FIELD_MOBILE', 'chaine', 'mobile', '', 0), + 14=>array('LDAP_GROUP_FILTER', 'chaine', '&(objectClass=groupOfNames)', '', 0), ); // Boxes diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index c29658ae0a7..b061e1b73a6 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -21,7 +21,7 @@ * \brief Module to include loans management * \file htdocs/core/modules/modLoan.class.php * \ingroup loan - * \brief File to activate module loan + * \brief Description and activation file for the module loan */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -67,7 +67,7 @@ class modLoan extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("loan"); // Constants @@ -97,7 +97,7 @@ class modLoan extends DolibarrModules $r = 0; $r++; - $this->rights[$r][0] = 520; + $this->rights[$r][0] = 521; $this->rights[$r][1] = 'Read loans'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; diff --git a/htdocs/core/modules/modMailing.class.php b/htdocs/core/modules/modMailing.class.php index 22cc75689a5..ad14724d154 100644 --- a/htdocs/core/modules/modMailing.class.php +++ b/htdocs/core/modules/modMailing.class.php @@ -22,7 +22,7 @@ * \brief Module to manage EMailings * \file htdocs/core/modules/modMailing.class.php * \ingroup mailing - * \brief Fichier de description et activation du module Mailing + * \brief Description and activation file for the module Mailing */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -48,7 +48,7 @@ class modMailing extends DolibarrModules // It is used to group modules by family in module setup page $this->family = "interface"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '22'; + $this->module_position = '23'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); @@ -66,7 +66,7 @@ class modMailing extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("mails"); // Config pages @@ -74,6 +74,14 @@ class modMailing extends DolibarrModules // Constants $this->const = array(); + $r = 0; + + $this->const[$r][0] = "MAILING_CONTACT_DEFAULT_BULK_STATUS"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "0"; + $this->const[$r][3] = 'Default black list mailing'; + $this->const[$r][4] = 0; + $r++; // Boxes $this->boxes = array(); diff --git a/htdocs/core/modules/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php index f8a74072bdd..2a8d97484e7 100644 --- a/htdocs/core/modules/modMailmanSpip.class.php +++ b/htdocs/core/modules/modMailmanSpip.class.php @@ -21,7 +21,7 @@ * \brief Module to manage mailman and spip * \file htdocs/core/modules/modMailmanSpip.class.php * \ingroup mailmanspip - * \brief Fichier de description et activation du module de click to Dial + * \brief Description and activation file for the module mailmanspip */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -66,7 +66,7 @@ class modMailmanSpip extends DolibarrModules $this->depends = array('modAdherent'); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages $this->config_page_url = array('mailman.php'); diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 3051b68f570..cb7b4d5e602 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -20,7 +20,7 @@ * \brief Module to manage margins * \file htdocs/core/modules/modMargin.class.php * \ingroup margin - * \brief Description and activation file for module Margin + * \brief Description and activation file for the module Margin */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -72,7 +72,7 @@ class modMargin extends DolibarrModules $this->depends = array("modPropale", "modProduct"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 2); // Minimum version of Dolibarr required by module $this->langfiles = array("margins"); @@ -104,18 +104,20 @@ class modMargin extends DolibarrModules // left menu entry $this->menu[$r] = array( - 'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu - 'type'=>'left', // This is a Top menu entry - 'titre'=>'Margins', - 'mainmenu'=>'billing', - 'leftmenu'=>'margins', - 'url'=>'/margin/index.php', - 'langs'=>'margins', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + 'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu + 'type'=>'left', // This is a Top menu entry + 'titre'=>'Margins', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'billing', + 'leftmenu'=>'margins', + 'url'=>'/margin/index.php', + 'langs'=>'margins', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>100, + 'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled. + 'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; // Permissions diff --git a/htdocs/core/modules/modModuleBuilder.class.php b/htdocs/core/modules/modModuleBuilder.class.php index 6060186a746..99c32e48bbd 100644 --- a/htdocs/core/modules/modModuleBuilder.class.php +++ b/htdocs/core/modules/modModuleBuilder.class.php @@ -21,7 +21,7 @@ * \brief Add a log into a block chain for some actions. * \file htdocs/core/modules/modBlockedLog.class.php * \ingroup blockedlog - * \brief Description and activation file for module ModuleBuilder + * \brief Description and activation file for the module ModuleBuilder */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php index 012bb2d576a..eb3baae78cd 100644 --- a/htdocs/core/modules/modMrp.class.php +++ b/htdocs/core/modules/modMrp.class.php @@ -24,7 +24,7 @@ * * \file htdocs/core/modules/modMrp.class.php * \ingroup mrp - * \brief Description and activation file for module Mrp + * \brief Description and activation file for the module Mrp */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -122,7 +122,7 @@ class modMrp extends DolibarrModules $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->langfiles = array("mrp"); - $this->phpmin = array(5, 5); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(8, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -142,9 +142,9 @@ class modMrp extends DolibarrModules // Some keys to add into the overwriting translation tables /*$this->overwrite_translation = array( - 'en_US:ParentCompany'=>'Parent company or reseller', - 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' - )*/ + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ if (!isset($conf->mrp) || !isset($conf->mrp->enabled)) { $conf->mrp = new stdClass(); @@ -182,28 +182,28 @@ class modMrp extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@mrp', - // List of tables we want to see into dictonnary editor - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), - // Label of tables - 'tablib'=>array("Table1","Table2","Table3"), - // Request to select fields - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), - // Sort order - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), - // List of fields (result of select to show dictionary) - 'tabfield'=>array("code,label","code,label","code,label"), - // List of fields (list of fields to edit a record) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), - // List of fields (list of fields for insert) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), - // Name of columns with primary key (try to always name it 'rowid') - 'tabrowid'=>array("rowid","rowid","rowid"), - // Condition to show each dictionary - 'tabcond'=>array($conf->mrp->enabled,$conf->mrp->enabled,$conf->mrp->enabled) - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@mrp', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1","Table2","Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label","code,label","code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid","rowid","rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->mrp->enabled,$conf->mrp->enabled,$conf->mrp->enabled) + ); + */ // Boxes/Widgets // Add here list of php file(s) stored in mrp/core/boxes that contains a class to show a widget. @@ -236,7 +236,7 @@ class modMrp extends DolibarrModules // Permissions provided by this module $this->rights = array(); - $r = 0; + $r = 1; // Add here entries to declare new permissions /* BEGIN MODULEBUILDER PERMISSIONS */ $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) @@ -267,40 +267,40 @@ class modMrp extends DolibarrModules $r = 1; /* BEGIN MODULEBUILDER EXPORT MO */ /* - $langs->load("mrp"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='mo@mrp'; - $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; - $r++; */ + $langs->load("mrp"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='mo@mrp'; + $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; + $r++; */ /* END MODULEBUILDER EXPORT MO */ // Imports profiles provided by this module $r = 1; /* BEGIN MODULEBUILDER IMPORT MO */ /* - $langs->load("mrp"); - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_icon[$r]='mo@mrp'; - $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; - include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; - $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; - include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; - $this->export_sql_end[$r] .=' WHERE 1 = 1'; - $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; - $r++; */ + $langs->load("mrp"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='MoLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='mo@mrp'; + $keyforclass = 'Mo'; $keyforclassfile='/mymobule/class/mo.class.php'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='mo'; $keyforaliasextra='extra'; $keyforelement='mo'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'mo as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('mo').')'; + $r++; */ /* END MODULEBUILDER IMPORT MO */ } @@ -317,7 +317,9 @@ class modMrp extends DolibarrModules global $conf, $langs; $result = $this->_load_tables('/mrp/sql/'); - if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } // Create extrafields during init //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -338,13 +340,11 @@ class modMrp extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/mrps'; $dest = $dirodt.'/template_mo.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index 605276dee0e..5bf91ec341e 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -23,7 +23,7 @@ * \brief Handle multiple currencies on company/propal/orders ... * \file htdocs/core/modules/modMultiCurrency.class.php * \ingroup multicurrency - * \brief Description and activation file for module MultiCurrency + * \brief Description and activation file for the module MultiCurrency */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -88,7 +88,7 @@ class modMultiCurrency extends DolibarrModules $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("multicurrency"); @@ -126,28 +126,27 @@ class modMultiCurrency extends DolibarrModules $this->tabs = array(); // Dictionaries - if (!isset($conf->multicurrency->enabled)) - { + if (!isset($conf->multicurrency->enabled)) { $conf->multicurrency = new stdClass(); $conf->multicurrency->enabled = 0; } $this->dictionaries = array(); /* Example: - if (! isset($conf->multicurrency->enabled)) $conf->multicurrency->enabled=0; // This is to avoid warnings - $this->dictionaries=array( - 'langs'=>'mylangfile@multicurrency', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + if (! isset($conf->multicurrency->enabled)) $conf->multicurrency->enabled=0; // This is to avoid warnings + $this->dictionaries=array( + 'langs'=>'mylangfile@multicurrency', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields // Sort order - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->multicurrency->enabled,$conf->multicurrency->enabled,$conf->multicurrency->enabled) // Condition to show each dictionary - ); - */ + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), + 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) + 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') + 'tabcond'=>array($conf->multicurrency->enabled,$conf->multicurrency->enabled,$conf->multicurrency->enabled) // Condition to show each dictionary + ); + */ // Boxes // Add here list of php file(s) stored in core/boxes that contains class to show a box. @@ -222,7 +221,7 @@ class modMultiCurrency extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', // 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', // 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation", - // 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', + // 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', // 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate", // 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart", // 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef' @@ -231,7 +230,7 @@ class modMultiCurrency extends DolibarrModules // 't.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', // 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text', // 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text', - // 'f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric", + // 'f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric", // 'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric", // 'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date", // 'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text', @@ -240,8 +239,8 @@ class modMultiCurrency extends DolibarrModules // $this->export_entities_array[$r]=array( // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', // 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', - // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice", - // 'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line", + // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice", + // 'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line", // 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line", // 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product' //); @@ -269,8 +268,7 @@ class modMultiCurrency extends DolibarrModules //$this->_load_tables('/multicurrency/sql/'); $res = $this->_init($sql, $options); - if ($res) - { + if ($res) { $this->createFirstCurrency(); } @@ -302,8 +300,7 @@ class modMultiCurrency extends DolibarrModules { global $conf, $user, $langs; - if (!MultiCurrency::checkCodeAlreadyExists($conf->currency)) - { + if (!MultiCurrency::checkCodeAlreadyExists($conf->currency)) { $langs->loadCacheCurrencies(''); $multicurrency = new MultiCurrency($this->db); @@ -311,7 +308,9 @@ class modMultiCurrency extends DolibarrModules $multicurrency->name = $langs->cache_currencies[$conf->currency]['label'].' ('.$langs->getCurrencySymbol($conf->currency).')'; $r = $multicurrency->create($user); - if ($r > 0) $multicurrency->addRate(1); + if ($r > 0) { + $multicurrency->addRate(1); + } } } } diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index dbc355ce53e..072e0607b60 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les notifications (par mail ou autre) * \file htdocs/core/modules/modNotification.class.php * \ingroup notification - * \brief Fichier de description et activation du module Notification + * \brief Description and activation file for the module Notification */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -45,7 +45,7 @@ class modNotification extends DolibarrModules // It is used to group modules in module setup page $this->family = "interface"; // Module position in the family on 2 digits ('01', '10', '20', ...) - $this->module_position = '01'; + $this->module_position = '22'; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); $this->description = "EMail notifications (push) on business Dolibarr events"; @@ -63,7 +63,7 @@ class modNotification extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("mails"); // Config pages diff --git a/htdocs/core/modules/modOauth.class.php b/htdocs/core/modules/modOauth.class.php index 48c31b15d24..f66ba404c7e 100644 --- a/htdocs/core/modules/modOauth.class.php +++ b/htdocs/core/modules/modOauth.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modOauth.class.php * \ingroup oauth - * \brief File of class to describe and activate module Oauth + * \brief Description and activation file for the module Oauth */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -71,7 +71,7 @@ class modOauth extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module $this->conflictwith = array(); $this->langfiles = array("oauth"); @@ -95,11 +95,11 @@ class modOauth extends DolibarrModules // $this->rights[$r][5] Niveau 2 pour nommer permission dans code /*$r++; - $this->rights[$r][0] = 66000; - $this->rights[$r][1] = 'OauthAccess'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'read';*/ + $this->rights[$r][0] = 66000; + $this->rights[$r][1] = 'OauthAccess'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'read';*/ // Main menu entries $this->menus = array(); // List of menus to add diff --git a/htdocs/core/modules/modOpenSurvey.class.php b/htdocs/core/modules/modOpenSurvey.class.php index 623c6d7c43e..87a4f453801 100644 --- a/htdocs/core/modules/modOpenSurvey.class.php +++ b/htdocs/core/modules/modOpenSurvey.class.php @@ -21,7 +21,7 @@ * \brief Module to OpenSurvey integration. * \file htdocs/core/modules/modOpenSurvey.class.php * \ingroup opensurvey - * \brief Description and activation file for module OpenSurvey + * \brief Description and activation file for the module OpenSurvey */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -76,7 +76,7 @@ class modOpenSurvey extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 4, 0); // Minimum version of Dolibarr required by module // Constants @@ -126,6 +126,7 @@ class modOpenSurvey extends DolibarrModules 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'left', 'titre'=>'Survey', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'tools', 'leftmenu'=>'opensurvey', 'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey', diff --git a/htdocs/core/modules/modPartnership.class.php b/htdocs/core/modules/modPartnership.class.php new file mode 100644 index 00000000000..17c137a7e3c --- /dev/null +++ b/htdocs/core/modules/modPartnership.class.php @@ -0,0 +1,485 @@ + + * Copyright (C) 2018-2019 Nicolas ZABOURI + * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2021 Dorian Laurent + * Copyright (C) 2021 NextGestion + * + * 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 . + */ + +/** + * \defgroup partnership Module Partnership + * \brief Partnership module descriptor. + * + * \file htdocs/partnership/core/modules/modPartnership.class.php + * \ingroup partnership + * \brief Description and activation file for module Partnership + */ +include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; + +/** + * Description and activation class for module Partnership + * This module is base on this specification : + * https://wiki.dolibarr.org/index.php?title=Draft:Module_Partnership_management#Note + */ +class modPartnership extends DolibarrModules +{ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $langs, $conf; + $this->db = $db; + + // Id for module (must be unique). + // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). + $this->numero = 500000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module + + // Key text used to identify module (for permissions, menus, etc...) + $this->rights_class = 'partnership'; + + // Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...' + // It is used to group modules by family in module setup page + $this->family = "crm"; + + // Module position in the family on 2 digits ('01', '10', '20', ...) + $this->module_position = '90'; + + // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) + //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); + // Module label (no space allowed), used if translation string 'ModulePartnershipName' not found (Partnership is name of module). + $this->name = preg_replace('/^mod/i', '', get_class($this)); + + // Module description, used if translation string 'ModulePartnershipDesc' not found (Partnership is name of module). + $this->description = "PartnershipDescription"; + // Used only if file README.md and README-LL.md not found. + $this->descriptionlong = "PartnershipDescriptionLong"; + + // // Author + // $this->editor_name = 'Editor name'; + // $this->editor_url = 'https://www.example.com'; + + // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' + $this->version = 'development'; + // Url to the file with your last numberversion of this module + //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; + + // Key used in llx_const table to save module status enabled/disabled (where PARTNERSHIP is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + + // Name of image file used for this module. + // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' + // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' + // To use a supported fa-xxx css style of font awesome, use this->picto='xxx' + $this->picto = 'generic'; + + // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) + $this->module_parts = array( + // Set this to 1 if module has its own trigger directory (core/triggers) + 'triggers' => 0, + // Set this to 1 if module has its own login method file (core/login) + 'login' => 0, + // Set this to 1 if module has its own substitution function file (core/substitutions) + 'substitutions' => 0, + // Set this to 1 if module has its own menus handler directory (core/menus) + 'menus' => 0, + // Set this to 1 if module overwrite template dir (core/tpl) + 'tpl' => 0, + // Set this to 1 if module has its own barcode directory (core/modules/barcode) + 'barcode' => 0, + // Set this to 1 if module has its own models directory (core/modules/xxx) + 'models' => 1, + // Set this to 1 if module has its own printing directory (core/modules/printing) + 'printing' => 0, + // Set this to 1 if module has its own theme directory (theme) + 'theme' => 0, + // Set this to relative path of css file if module has its own css file + 'css' => array( + // '/partnership/css/partnership.css.php', + ), + // Set this to relative path of js file if module must load a js on all pages + 'js' => array( + // '/partnership/js/partnership.js.php', + ), + // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all' + 'hooks' => array( + // 'data' => array( + // 'hookcontext1', + // 'hookcontext2', + // ), + // 'entity' => '0', + ), + // Set this to 1 if features of module are opened to external users + 'moduleforexternal' => 0, + ); + + // Data directories to create when module is enabled. + // Example: this->dirs = array("/partnership/temp","/partnership/subdir"); + $this->dirs = array("/partnership/temp"); + + // Config pages. Put here list of php page, stored into partnership/admin directory, to use to setup module. + $this->config_page_url = array("setup.php@partnership"); + + // Dependencies + // A condition to hide module + $this->hidden = false; + // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...) + $this->depends = array(); + $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) + $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) + + // The language file dedicated to your module + $this->langfiles = array("partnership@partnership"); + + // Prerequisites + $this->phpmin = array(5, 6); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module + + // Messages at activation + $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + //$this->automatic_activation = array('FR'=>'PartnershipWasAutomaticallyActivatedBecauseOfYourCountryChoice'); + //$this->always_enabled = true; // If true, can't be disabled + + // Constants + // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive) + // Example: $this->const=array(1 => array('PARTNERSHIP_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1), + // 2 => array('PARTNERSHIP_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1) + // ); + $this->const = array(); + + // Some keys to add into the overwriting translation tables + /*$this->overwrite_translation = array( + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ + + if (!isset($conf->partnership) || !isset($conf->partnership->enabled)) { + $conf->partnership = new stdClass(); + $conf->partnership->enabled = 0; + } + + // Array to add new pages in new tabs + $this->tabs = array(); + + $tabtoadd = (!empty(getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR')) && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') ? 'member' : 'thirdparty'; + + if ($tabtoadd == 'member') { + $this->tabs[] = array('data'=>'member:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/partnership/partnership.php?socid=__ID__'); + $fk_mainmenu = "members"; + } else { + $this->tabs[] = array('data'=>'thirdparty:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/partnership/partnership.php?socid=__ID__'); + $fk_mainmenu = "companies"; + } + + // Example: + // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@partnership:$user->rights->partnership->read:/partnership/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 + // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@partnership:$user->rights->othermodule->read:/partnership/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // + // Where objecttype can be + // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) + // 'contact' to add a tab in contact view + // 'contract' to add a tab in contract view + // 'group' to add a tab in group view + // 'intervention' to add a tab in intervention view + // 'invoice' to add a tab in customer invoice view + // 'invoice_supplier' to add a tab in supplier invoice view + // 'member' to add a tab in fundation member view + // 'opensurveypoll' to add a tab in opensurvey poll view + // 'order' to add a tab in customer order view + // 'order_supplier' to add a tab in supplier order view + // 'payment' to add a tab in payment view + // 'payment_supplier' to add a tab in supplier payment view + // 'product' to add a tab in product view + // 'propal' to add a tab in propal view + // 'project' to add a tab in project view + // 'stock' to add a tab in stock view + // 'thirdparty' to add a tab in third party view + // 'user' to add a tab in user view + + // Dictionaries + $this->dictionaries = array(); + /* Example: + $this->dictionaries=array( + 'langs'=>'partnership@partnership', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1", MAIN_DB_PREFIX."table2", MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1", "Table2", "Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC", "label ASC", "label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label", "code,label", "code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid", "rowid", "rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->partnership->enabled, $conf->partnership->enabled, $conf->partnership->enabled) + ); + */ + + // Boxes/Widgets + // Add here list of php file(s) stored in partnership/core/boxes that contains a class to show a widget. + $this->boxes = array( + // 0 => array( + // 'file' => 'partnershipwidget1.php@partnership', + // 'note' => 'Widget provided by Partnership', + // 'enabledbydefaulton' => 'Home', + // ), + // ... + ); + + // Cronjobs (List of cron jobs entries to add when module is enabled) + // unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week + + $statusatinstall=0; + $arraydate=dol_getdate(dol_now()); + $datestart=dol_mktime(21, 15, 0, $arraydate['mon'], $arraydate['mday'], $arraydate['year']); + + $this->cronjobs = array( + 0 => array('priority'=>60, 'label'=>'CancelPartnershipForExpiredMembers', 'jobtype'=>'method', 'class'=>'/partnership/class/partnershiputils.class.php', 'objectname'=>'PartnershipUtils', 'method'=>'doCancelStatusOfPartnership', 'parameters'=>'', 'comment'=>'Cancel status of partnership when subscription is expired + x days.', 'frequency'=>1, 'unitfrequency'=>86400, 'status'=>$statusatinstall, 'test'=>'$conf->partnership->enabled', 'datestart'=>$datestart), + ); + + // Permissions provided by this module + $this->rights = array(); + $r = 0; + // Add here entries to declare new permissions + /* BEGIN MODULEBUILDER PERMISSIONS */ + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Read objects of Partnership'; // Permission label + $this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->partnership->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Create/Update objects of Partnership'; // Permission label + $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->partnership->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Delete objects of Partnership'; // Permission label + $this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->partnership->level1->level2) + $r++; + /* END MODULEBUILDER PERMISSIONS */ + + // Main menu entries to add + $this->menu = array(); + $r = 0; + // Add here entries to declare new menus + /* BEGIN MODULEBUILDER TOPMENU */ + // $this->menu[$r++]=array( + // // '' 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 + // 'fk_menu'=>'fk_mainmenu=partnership', + // // This is a Left menu entry + // 'type'=>'left', + // 'titre'=>'List Partnership', + // 'mainmenu'=>'partnership', + // 'leftmenu'=>'partnership', + // 'url'=>'/partnership/partnership_list.php', + // // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + // 'langs'=>'partnership@partnership', + // 'position'=>1100+$r, + // // Define condition to show or hide menu entry. Use '$conf->partnership->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + // 'enabled'=>'$conf->partnership->enabled', + // // Use 'perms'=>'$user->rights->partnership->level1->level2' if you want your menu with a permission rules + // 'perms'=>'1', + // 'target'=>'', + // // 0=Menu for internal users, 1=external users, 2=both + // 'user'=>2, + // ); + $this->menu[$r++] = array( + 'fk_menu'=>'fk_mainmenu='.$fk_mainmenu, // '' 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 Top menu entry + 'titre'=>'Partnership', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>$fk_mainmenu, + 'leftmenu'=>'partnership', + 'url'=>'/partnership/partnership_list.php', + 'langs'=>'partnership', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1100 + $r, + 'enabled'=>'$conf->partnership->enabled', // Define condition to show or hide menu entry. Use '$conf->partnership->enabled' if entry must be visible if module is enabled. + 'perms'=>'$user->rights->partnership->read', // Use 'perms'=>'$user->rights->partnership->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++] = array( + 'fk_menu'=>'fk_mainmenu='.$fk_mainmenu.',fk_leftmenu=partnership', // '' 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'=>'NewPartnership', + 'mainmenu'=>$fk_mainmenu, + 'leftmenu'=>'partnership_new', + 'url'=>'/partnership/partnership_card.php?action=create', + 'langs'=>'partnership', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1100 + $r, + 'enabled'=>'$conf->partnership->enabled', // Define condition to show or hide menu entry. Use '$conf->partnership->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->partnership->write', // Use 'perms'=>'$user->rights->partnership->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++] = array( + 'fk_menu'=>'fk_mainmenu='.$fk_mainmenu.',fk_leftmenu=partnership', // '' 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'=>'ListOfPartnerships', + 'mainmenu'=>$fk_mainmenu, + 'leftmenu'=>'partnership_list', + 'url'=>'/partnership/partnership_list.php', + 'langs'=>'partnership', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1100 + $r, + 'enabled'=>'$conf->partnership->enabled', // Define condition to show or hide menu entry. Use '$conf->partnership->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->partnership->read', // Use 'perms'=>'$user->rights->partnership->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + /* END MODULEBUILDER LEFTMENU PARTNERSHIP */ + // Exports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER EXPORT PARTNERSHIP */ + /* + $langs->load("partnership@partnership"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='PartnershipLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='partnership@partnership'; + // Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array + $keyforclass = 'Partnership'; $keyforclassfile='/partnership/class/partnership.class.php'; $keyforelement='partnership@partnership'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + //$this->export_fields_array[$r]['t.fieldtoadd']='FieldToAdd'; $this->export_TypeFields_array[$r]['t.fieldtoadd']='Text'; + //unset($this->export_fields_array[$r]['t.fieldtoremove']); + //$keyforclass = 'PartnershipLine'; $keyforclassfile='/partnership/class/partnership.class.php'; $keyforelement='partnershipline@partnership'; $keyforalias='tl'; + //include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='partnership'; $keyforaliasextra='extra'; $keyforelement='partnership@partnership'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$keyforselect='partnershipline'; $keyforaliasextra='extraline'; $keyforelement='partnershipline@partnership'; + //include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r] = array('partnershipline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + //$this->export_special_array[$r] = array('t.field'=>'...'); + //$this->export_examplevalues_array[$r] = array('t.field'=>'Example'); + //$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'partnership as t'; + //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'partnership_line as tl ON tl.fk_partnership = t.rowid'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('partnership').')'; + $r++; */ + /* END MODULEBUILDER EXPORT PARTNERSHIP */ + + // Imports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER IMPORT PARTNERSHIP */ + /* + $langs->load("partnership@partnership"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='PartnershipLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='partnership@partnership'; + $keyforclass = 'Partnership'; $keyforclassfile='/partnership/class/partnership.class.php'; $keyforelement='partnership@partnership'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='partnership'; $keyforaliasextra='extra'; $keyforelement='partnership@partnership'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'partnership as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('partnership').')'; + $r++; */ + /* END MODULEBUILDER IMPORT PARTNERSHIP */ + } + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function init($options = '') + { + global $conf, $langs; + + $result = $this->_load_tables('/partnership/sql/'); + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } + + // Create extrafields during init + //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + //$extrafields = new ExtraFields($this->db); + //$result1=$extrafields->addExtraField('partnership_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'partnership@partnership', '$conf->partnership->enabled'); + //$result2=$extrafields->addExtraField('partnership_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'partnership@partnership', '$conf->partnership->enabled'); + //$result3=$extrafields->addExtraField('partnership_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'partnership@partnership', '$conf->partnership->enabled'); + //$result4=$extrafields->addExtraField('partnership_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'partnership@partnership', '$conf->partnership->enabled'); + //$result5=$extrafields->addExtraField('partnership_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'partnership@partnership', '$conf->partnership->enabled'); + + // Permissions + $this->remove($options); + + $sql = array(); + + // Document templates + $moduledir = 'partnership'; + $myTmpObjects = array(); + $myTmpObjects['Partnership'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + + foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'Partnership') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/partnership/template_partnerships.odt'; + $dirodt = DOL_DATA_ROOT.'/doctemplates/partnership'; + $dest = $dirodt.'/template_partnerships.odt'; + + if (file_exists($src) && !file_exists($dest)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result = dol_copy($src, $dest, 0, 0); + if ($result < 0) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array_merge($sql, array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."','".strtolower($myTmpObjectKey)."',".$conf->entity.")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".strtolower($myTmpObjectKey)."', ".$conf->entity.")" + )); + } + } + + return $this->_init($sql, $options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function remove($options = '') + { + $sql = array(); + return $this->_remove($sql, $options); + } +} diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index a5cda052656..24af8a3c953 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -21,7 +21,7 @@ * \brief Add integration with Paybox online payment system. * \file htdocs/core/modules/modPaybox.class.php * \ingroup paybox - * \brief Description and activation file for module Paybox + * \brief Description and activation file for the module Paybox */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -73,7 +73,7 @@ class modPayBox extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(2, 6); // Minimum version of Dolibarr required by module $this->langfiles = array("paybox"); @@ -168,8 +168,8 @@ class modPayBox extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town', // 's.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3', // 's.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode', - // 'f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT", - // 'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId', + // 'f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT", + // 'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId', // 'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT", // 'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef', // ); @@ -177,7 +177,7 @@ class modPayBox extends DolibarrModules // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company', // 's.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company', // 's.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice", - // 'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice', + // 'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice', // 'f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line", // 'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line", // 'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product', diff --git a/htdocs/core/modules/modPaymentByBankTransfer.class.php b/htdocs/core/modules/modPaymentByBankTransfer.class.php index 0eab52fcdec..6b51e25cdc2 100644 --- a/htdocs/core/modules/modPaymentByBankTransfer.class.php +++ b/htdocs/core/modules/modPaymentByBankTransfer.class.php @@ -23,7 +23,7 @@ * \brief Module to manage payment by bank transfer * \file htdocs/core/modules/modPaymentByBankTransfer.class.php * \ingroup paymentbybanktransfer - * \brief File to describe and activate the module PaymentByBankTransfer + * \brief Description and activation file for the module PaymentByBankTransfer */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,7 +68,7 @@ class modPaymentByBankTransfer extends DolibarrModules $this->depends = array("modFournisseur", "modBanque"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages $this->config_page_url = array("paymentbybanktransfer.php"); diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 15a92020062..a1e979715fe 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -22,7 +22,7 @@ * \brief Add integration with Paypal online payment system. * \file htdocs/core/modules/modPaypal.class.php * \ingroup paypal - * \brief Description and activation file for module Paypal + * \brief Description and activation file for the module Paypal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -74,7 +74,7 @@ class modPaypal extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array('modPaypalPlus'); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("paypal"); @@ -108,20 +108,20 @@ class modPaypal extends DolibarrModules $this->menus = array(); // List of menus to add $r = 0; /*$this->menu[$r]=array( - 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'mainmenu'=>'billing', - 'leftmenu'=>'customers_bills_payment_paypal', - 'type'=>'left', // This is a Left menu entry - 'titre'=>'PaypalImportPayment', - 'url'=>'/paypal/importpayments.php', - 'langs'=>'paypal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>501, - 'enabled'=>'$conf->paypal->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->banque->consolidate', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2 - ); // 0=Menu for internal users, 1=external users, 2=both - $r++;*/ + 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'mainmenu'=>'billing', + 'leftmenu'=>'customers_bills_payment_paypal', + 'type'=>'left', // This is a Left menu entry + 'titre'=>'PaypalImportPayment', + 'url'=>'/paypal/importpayments.php', + 'langs'=>'paypal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>501, + 'enabled'=>'$conf->paypal->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->banque->consolidate', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2 + ); // 0=Menu for internal users, 1=external users, 2=both + $r++;*/ // Add here entries to declare new menus // Example to declare the Top Menu entry: @@ -175,7 +175,7 @@ class modPaypal extends DolibarrModules // 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone', // 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode', // 's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation", - // 'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', + // 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus', // 'f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate", // 'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart", // 'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef' @@ -183,8 +183,8 @@ class modPaypal extends DolibarrModules // $this->export_entities_array[$r]=array( // 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company', // 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', - // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice", - // 'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line", + // 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice", + // 'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line", // 'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line", // 'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product' // ); diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 4ffa8358a06..8d68b372e91 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -23,7 +23,7 @@ * \brief Module to manage Direct debit orders * \file htdocs/core/modules/modPrelevement.class.php * \ingroup prelevement - * \brief File to describe and enable the module Prelevement + * \brief Description and activation file for the module Prelevement */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -67,7 +67,7 @@ class modPrelevement extends DolibarrModules $this->depends = array("modFacture", "modBanque"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages $this->config_page_url = array("prelevement.php"); diff --git a/htdocs/core/modules/modPrinting.class.php b/htdocs/core/modules/modPrinting.class.php index b918a8b1158..4c104b30ecf 100644 --- a/htdocs/core/modules/modPrinting.class.php +++ b/htdocs/core/modules/modPrinting.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modPrinting.class.php * \ingroup printing - * \brief File of class to describe and activate module Direct Printing + * \brief Description and activation file for the module Direct Printing */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -70,7 +70,7 @@ class modPrinting extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module $this->conflictwith = array(); $this->langfiles = array("printing"); diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 78f638b1821..e9dc9688217 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -1,13 +1,13 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent - * Copyright (C) 2014 Christophe Battarel - * Copyright (C) 2014 Cedric Gross - * Copyright (C) 2020 Alexandre Spangaro +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2014 Christophe Battarel + * Copyright (C) 2014 Cedric Gross + * Copyright (C) 2020-2021 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 @@ -28,7 +28,7 @@ * \brief Module to manage catalog of predefined products * \file htdocs/core/modules/modProduct.class.php * \ingroup produit - * \brief File to describe module to manage catalog of predefined products + * \brief Description and activation file for the module to manage catalog of predefined products */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -70,7 +70,7 @@ class modProduct extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array("modStock", "modBarcode", "modProductBatch", "modVariants"); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages $this->config_page_url = array("product.php@product"); @@ -168,12 +168,16 @@ class modProduct extends DolibarrModules */ $usenpr = 0; - if (is_object($mysoc)) $usenpr = $mysoc->useNPR(); + if (is_object($mysoc)) { + $usenpr = $mysoc->useNPR(); + } // Exports //-------- $r = 0; + $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "pa"; + $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "Products"; // Translation key (used only if key ExportDataset_xxx_z not found) @@ -183,71 +187,136 @@ class modProduct extends DolibarrModules 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", 'p.description'=>"Description", 'p.url'=>"PublicUrl", 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', - 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", + $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', 'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.length_units'=>"LengthUnits", 'p.width'=>"Width", 'p.width_units'=>"WidthUnits", 'p.height'=>"Height", 'p.height_units'=>"HeightUnits", 'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits", 'p.duration'=>"Duration", 'p.finished' => 'Nature', 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", + 'p.price_min'=>"MinPriceHT",'p.price_min_ttc'=>"MinPriceTTC", 'p.tva_tx'=>'VATRate', 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('e.ref'=>'DefaultWarehouse', 'p.tobatch'=>'ManageLotSerial', 'p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); - if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); + } + if (!empty($conf->stock->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('e.ref'=>'DefaultWarehouse', 'p.tobatch'=>'ManageLotSerial', 'p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - if (!empty($conf->fournisseur->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); - if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); + } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + } $this->export_TypeFields_array[$r] = array( 'p.ref'=>"Text", 'p.label'=>"Text", 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.description'=>"Text", 'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", + $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", 'p.note'=>"Text", 'p.note_public'=>"Text", 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', 'p.duration'=>"Text", 'p.finished' => 'Numeric', - 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', + 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", + 'p.price_min'=>"Numeric", 'p.price_min_ttc'=>"Numeric", + 'p.tva_tx'=>'Numeric', 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('e.ref'=>'Text', 'p.tobatch'=>'Numeric', 'p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); - if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - if (!empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + if (!empty($conf->stock->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('e.ref'=>'Text', 'p.tobatch'=>'Numeric', 'p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + } $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); + } + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + } + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + } $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; - if (!empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; - if (!empty($conf->stock->enabled)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON e.rowid = p.fk_default_warehouse'; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; + } + if (!empty($conf->stock->enabled)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON e.rowid = p.fk_default_warehouse'; + } $this->export_sql_end[$r] .= ' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')'; - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + } - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Exports product multiprice $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; @@ -259,7 +328,9 @@ class modProduct extends DolibarrModules 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.tva_tx'=>'PriceLevelVATRate', 'pr.date_price'=>'DateCreation'); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + } //$this->export_TypeFields_array[$r]=array( // 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text", // 'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text', @@ -279,8 +350,7 @@ class modProduct extends DolibarrModules $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Exports product multiprice $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; @@ -294,7 +364,9 @@ class modProduct extends DolibarrModules 'pr.tva_tx'=>'PriceVATRate', 'pr.default_vat_code'=>'PriceVATCode', 'pr.datec'=>'DateCreation'); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + } $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", 's.nom'=>'company', 'pr.price_base_type'=>"product", 'pr.price'=>"product", @@ -311,8 +383,7 @@ class modProduct extends DolibarrModules $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { // Exports virtual products $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; @@ -320,48 +391,65 @@ class modProduct extends DolibarrModules $this->export_permission[$r] = array(array("produit", "export")); $this->export_fields_array[$r] = array( 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", - 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", + $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); - if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + if (!empty($conf->stock->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); $this->export_TypeFields_array[$r] = array( 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", + $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", 'p.note'=>"Text", 'p.note_public'=>"Text", 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); - if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + if (!empty($conf->stock->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); $this->export_entities_array[$r] = array( 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", - 'p.accountancy_code_sell'=>'virtualproduct', 'p.accountancy_code_sell_intra'=>'virtualproduct', 'p.accountancy_code_sell_export'=>'virtualproduct', - 'p.accountancy_code_buy'=>'virtualproduct', 'p.accountancy_code_buy_intra'=>'virtualproduct', 'p.accountancy_code_buy_export'=>'virtualproduct', + $alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct', + $alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct', 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", 'p.tosell'=>"virtualproduct", 'p.tobuy'=>"virtualproduct", 'p.datec'=>"virtualproduct", 'p.tms'=>"virtualproduct" ); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + } $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct", 'pa.incdec'=>'subproduct')); - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description")); $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct")); $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); + } + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile $this->export_sql_end[$r] .= ' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils'; @@ -507,7 +595,7 @@ class modProduct extends DolibarrModules )); $this->import_regex_array[$r] = array_merge($this->import_regex_array[$r], array( - 'p.tobatch' => '^[0|1]$' + 'p.tobatch' => '^[0|1|2]$' )); $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( @@ -521,21 +609,31 @@ class modProduct extends DolibarrModules )); } - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.recuperableonly'=>'NPR')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax1_tx'=>'LT1', 'p.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax2_tx'=>'LT2', 'p.localtax2_type'=>'LT2Type')); - if (!empty($conf->barcode->enabled)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode')); - if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice')); + } + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.recuperableonly'=>'NPR')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax1_tx'=>'LT1', 'p.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax2_tx'=>'LT2', 'p.localtax2_type'=>'LT2Type')); + } + if (!empty($conf->barcode->enabled)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode')); + } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; + } // Add extra fields $import_extrafield_sample = array(); $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); @@ -544,7 +642,16 @@ class modProduct extends DolibarrModules } // End add extra fields $this->import_fieldshidden_array[$r] = array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'product'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) - + $this->import_regex_array[$r] = array( + 'p.ref'=>'[^ ]', + 'p.price_base_type' => 'HT|TTC', + 'p.tosell'=>'^[0|1]$', + 'p.tobuy'=>'^[0|1]$', + 'p.fk_product_type'=>'^[0|1]$', + 'p.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', + 'p.recuperableonly' => '^[0|1]$', + 'p.finished' => '^[0|1]$' + ); // field order as per structure of table llx_product $import_sample = array( 'p.ref' => "ref:PREF123456", @@ -587,17 +694,29 @@ class modProduct extends DolibarrModules 'p.finished' => '0 (raw material) / 1 (finished goods), matches field "code" in dictionary table "'.MAIN_DB_PREFIX.'c_product_nature"' ); //clauses copied from import_fields_array - if (!empty($conf->stock->enabled)) $import_sample = array_merge($import_sample, array( - 'p.tobatch'=>"0 (don't use) / 1 (use batch/serial number)", + if (!empty($conf->stock->enabled)) { + $import_sample = array_merge($import_sample, array( + 'p.tobatch'=>"0 (don't use) / 1 (use batch) / 2 (use serial number)", 'p.seuil_stock_alerte' => '', 'p.pmp' => '0', 'p.desiredstock' => '' )); - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $import_sample = array_merge($import_sample, array('p.cost_price'=>'90')); - if (is_object($mysoc) && $usenpr) $import_sample = array_merge($import_sample, array('p.recuperableonly'=>'0')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $import_sample = array_merge($import_sample, array('p.localtax1_tx'=>'', 'p.localtax1_type'=>'')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $import_sample = array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>'')); - if (!empty($conf->barcode->enabled)) $import_sample = array_merge($import_sample, array('p.barcode'=>'')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $import_sample = array_merge($import_sample, array('p.cost_price'=>'90')); + } + if (is_object($mysoc) && $usenpr) { + $import_sample = array_merge($import_sample, array('p.recuperableonly'=>'0')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $import_sample = array_merge($import_sample, array('p.localtax1_tx'=>'', 'p.localtax1_type'=>'')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $import_sample = array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>'')); + } + if (!empty($conf->barcode->enabled)) { + $import_sample = array_merge($import_sample, array('p.barcode'=>'')); + } if (!empty($conf->global->PRODUCT_USE_UNITS)) { $import_sample = array_merge( $import_sample, @@ -618,10 +737,11 @@ class modProduct extends DolibarrModules } $this->import_examplevalues_array[$r] = array_merge($import_sample, $import_extrafield_sample); $this->import_updatekeys_array[$r] = array('p.ref'=>'Ref'); - if (!empty($conf->barcode->enabled)) $this->import_updatekeys_array[$r] = array_merge($this->import_updatekeys_array[$r], array('p.barcode'=>'BarCode')); //only show/allow barcode as update key if Barcode module enabled + if (!empty($conf->barcode->enabled)) { + $this->import_updatekeys_array[$r] = array_merge($this->import_updatekeys_array[$r], array('p.barcode'=>'BarCode')); //only show/allow barcode as update key if Barcode module enabled + } - if (!empty($conf->fournisseur->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { // Import suppliers prices (note: this code is duplicated in module Service) $r++; $this->import_code[$r] = $this->rights_class.'_supplierprices'; @@ -640,17 +760,22 @@ class modProduct extends DolibarrModules 'sp.delivery_time_days' => 'DeliveryDelay', 'sp.supplier_reputation' => 'SupplierReputation' ); - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + } $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( 'sp.price'=>"PriceQtyMinHT*", 'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent'=>'DiscountQtyMin' )); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( 'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line 'sp.multicurrency_code'=>'CurrencyCode', @@ -668,10 +793,8 @@ class modProduct extends DolibarrModules $import_extrafield_sample = array(); $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product_fournisseur_price' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); @@ -699,17 +822,22 @@ class modProduct extends DolibarrModules 'sp.delivery_time_days' => '5', 'sp.supplier_reputation' => 'FAVORITE / NOTTHGOOD / DONOTORDER' ); - if (is_object($mysoc) && $usenpr) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.recuperableonly'=>'')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + if (is_object($mysoc) && $usenpr) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.recuperableonly'=>'')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + } $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( 'sp.price' => "50.00", 'sp.unitprice' => '10', // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent' => '20' )); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( 'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency', 'sp.multicurrency_code'=>'GBP', @@ -728,8 +856,7 @@ class modProduct extends DolibarrModules $this->import_updatekeys_array[$r] = array('sp.fk_product'=>'ProductOrService', 'sp.ref_fourn'=>'SupplierRef', 'sp.fk_soc'=>'Supplier'); } - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Import products multiprices $r++; $this->import_code[$r] = $this->rights_class.'_multiprice'; @@ -743,8 +870,12 @@ class modProduct extends DolibarrModules 'pr.price'=>"PriceLevelUnitPriceHT", 'pr.price_ttc'=>"PriceLevelUnitPriceTTC", 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.date_price'=>'DateCreation*'); - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) $this->import_fields_array[$r]['pr.tva_tx'] = 'VATRate'; - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('pr.recuperableonly'=>'NPR')); + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { + $this->import_fields_array[$r]['pr.tva_tx'] = 'VATRate'; + } + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('pr.recuperableonly'=>'NPR')); + } $this->import_regex_array[$r] = array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 'pr.recuperableonly'=>'^[0|1]$'); $this->import_convertvalue_array[$r] = array( 'pr.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') @@ -758,8 +889,7 @@ class modProduct extends DolibarrModules 'pr.date_price'=>'2020-12-31'); } - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // Import translations of product names and descriptions $r++; $this->import_code[$r] = $this->rights_class.'_languages'; @@ -773,7 +903,7 @@ class modProduct extends DolibarrModules $this->import_convertvalue_array[$r] = array( 'l.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') ); - $this->import_examplevalues_array[$r] = array('l.fk_product'=>'PRODUCT_REF or id:123456', 'l.lang'=>'en_US', 'l.label'=>'Label in en_US', 'l.description'=>'Desc in en_US'); + $this->import_examplevalues_array[$r] = array('l.fk_product'=>'ref:PRODUCT_REF or id:123456', 'l.lang'=>'en_US', 'l.label'=>'Label in en_US', 'l.description'=>'Desc in en_US'); $this->import_updatekeys_array[$r] = array('l.fk_product'=>'ProductOrService', 'l.lang'=>'Language'); } } diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 92bfb9b66a5..79529898bb0 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -23,7 +23,7 @@ * \brief Management module for batch number, eat-by and sell-by date for product * \file htdocs/core/modules/modProductBatch.class.php * \ingroup productbatch - * \brief Description and activation file for module productbatch + * \brief Description and activation file for the module productbatch */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -65,25 +65,40 @@ class modProductBatch extends DolibarrModules $this->dirs = array(); // Config pages. Put here list of php page, stored into productdluo/admin directory, to use to setup module. - $this->config_page_url = array("product_lot_extrafields.php@product"); + $this->config_page_url = array("product_lot.php@product"); // Dependencies $this->hidden = false; // A condition to hide module $this->depends = array("modProduct", "modStock", "modExpedition", "modFournisseur"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("productbatch"); + // Constants // Constants $this->const = array(); + $r = 0; + + $this->const[$r][0] = "PRODUCTBATCH_LOT_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_lot_free"; + $this->const[$r][3] = 'Module to control product codes'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "PRODUCTBATCH_SN_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_sn_free"; + $this->const[$r][3] = 'Module to control product codes'; + $this->const[$r][4] = 0; + $r++; $this->tabs = array(); // Dictionaries - if (!isset($conf->productbatch->enabled)) - { + if (!isset($conf->productbatch->enabled)) { $conf->productbatch = new stdClass(); $conf->productbatch->enabled = 0; } diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index ff2edd3c787..25448f239e6 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -26,7 +26,7 @@ * \brief Module to create projects/tasks/gantt diagram. Projects can them be affected to tasks. * \file htdocs/core/modules/modProjet.class.php * \ingroup projet - * \brief Fichier de description et activation du module Projet + * \brief Description and activation file for the module project */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,7 +68,7 @@ class modProjet extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array('projects'); // Constants @@ -238,13 +238,13 @@ class modProjet extends DolibarrModules 'p.datec'=>"DateCreation", 'p.dateo'=>"DateStart", 'p.datee'=>"DateEnd", 'p.fk_statut'=>'ProjectStatus', 'cls.code'=>'OpportunityStatus', 'p.opp_percent'=>'OpportunityProbability', 'p.opp_amount'=>'OpportunityAmount', 'p.description'=>"Description" ); // Add multicompany field - if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) - { + if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) { $nbofallowedentities = count(explode(',', getEntity('project'))); // If project are shared, nb will be > 1 - if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) $this->export_fields_array[$r] += array('p.entity'=>'Entity'); + if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) { + $this->export_fields_array[$r] += array('p.entity'=>'Entity'); + } } - if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { unset($this->export_fields_array[$r]['p.opp_percent']); unset($this->export_fields_array[$r]['p.opp_amount']); unset($this->export_fields_array[$r]['cls.code']); @@ -253,13 +253,17 @@ class modProjet extends DolibarrModules // Add fields for project $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array()); // Add extra fields for project - $keyforselect = 'projet'; $keyforelement = 'project'; $keyforaliasextra = 'extra'; + $keyforselect = 'projet'; + $keyforelement = 'project'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // Add fields for tasks $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pt.rowid'=>'TaskId', 'pt.ref'=>'RefTask', 'pt.label'=>'LabelTask', 'pt.dateo'=>"TaskDateStart", 'pt.datee'=>"TaskDateEnd", 'pt.duration_effective'=>"DurationEffective", 'pt.planned_workload'=>"PlannedWorkload", 'pt.progress'=>"Progress", 'pt.description'=>"TaskDescription")); $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask', 'pt.ref'=>'projecttask', 'pt.label'=>'projecttask', 'pt.dateo'=>"projecttask", 'pt.datee'=>"projecttask", 'pt.duration_effective'=>"projecttask", 'pt.planned_workload'=>"projecttask", 'pt.progress'=>"projecttask", 'pt.description'=>"projecttask")); // Add extra fields for task - $keyforselect = 'projet_task'; $keyforelement = 'projecttask'; $keyforaliasextra = 'extra2'; + $keyforselect = 'projet_task'; + $keyforelement = 'projecttask'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; // End add extra fields $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('ptt.rowid'=>'IdTaskTime', 'ptt.task_date'=>'TaskTimeDate', 'ptt.task_duration'=>"TimesSpent", 'ptt.fk_user'=>"TaskTimeUser", 'ptt.note'=>"TaskTimeNote")); @@ -283,8 +287,7 @@ class modProjet extends DolibarrModules // Import list of tasks - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { $r++; $this->import_code[$r] = 'tasksofprojects'; $this->import_label[$r] = 'ImportDatasetTasks'; @@ -295,10 +298,8 @@ class modProjet extends DolibarrModules // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); @@ -337,13 +338,11 @@ class modProjet extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/projects'; $dest = $dirodt.'/template_project.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; @@ -355,13 +354,11 @@ class modProjet extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/tasks'; $dest = $dirodt.'/template_task_summary.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index c0ffa6f0811..ea9f9548cb7 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -26,7 +26,7 @@ * \brief Module pour gerer la tenue de propositions commerciales * \file htdocs/core/modules/modPropale.class.php * \ingroup propale - * \brief Fichier de description et activation du module Propale + * \brief Description and activation file for the module customer proposal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -69,7 +69,7 @@ class modPropale extends DolibarrModules $this->depends = array("modSociete"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->config_page_url = array("propal.php"); $this->langfiles = array("propal", "bills", "companies", "deliveries", "products"); @@ -113,8 +113,8 @@ class modPropale extends DolibarrModules // Boxes $this->boxes = array( - 0=>array('file'=>'box_graph_propales_permonth.php', 'enabledbydefaulton'=>'Home'), - 1=>array('file'=>'box_propales.php', 'enabledbydefaulton'=>'Home'), + 0=>array('file'=>'box_graph_propales_permonth.php', 'enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_propales.php', 'enabledbydefaulton'=>'Home'), ); // Permissions @@ -138,7 +138,7 @@ class modPropale extends DolibarrModules $r++; $this->rights[$r][0] = 24; // id de la permission - $this->rights[$r][1] = 'Validate commercial proposals'; // libelle de la permission + $this->rights[$r][1] = 'Validate commercial proposals'; // Validate proposal $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'propal_advance'; @@ -154,7 +154,7 @@ class modPropale extends DolibarrModules $r++; $this->rights[$r][0] = 26; // id de la permission - $this->rights[$r][1] = 'Close commercial proposals'; // libelle de la permission + $this->rights[$r][1] = 'Close commercial proposals'; // Set proposal to signed or refused $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'cloturer'; @@ -191,14 +191,13 @@ class modPropale extends DolibarrModules 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'co.code'=>'CountryCode', 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 'c.rowid'=>"Id", 'c.ref'=>"Ref", 'c.ref_client'=>"RefCustomer", 'c.fk_soc'=>"IdCompany", 'c.datec'=>"DateCreation", 'c.datep'=>"DatePropal", 'c.fin_validite'=>"DateEndPropal", 'c.remise_percent'=>"GlobalDiscount", - 'c.total_ht'=>"TotalHT", 'c.total'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate', + 'c.total_ht'=>"TotalHT", 'c.total_ttc'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate', 'c.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'c.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'cd.rowid'=>'LineId', 'cd.label'=>"Label", 'cd.description'=>"LineDescription", 'cd.product_type'=>'TypeOfLineServiceOrProduct', 'cd.tva_tx'=>"LineVATRate", 'cd.qty'=>"LineQty", 'cd.total_ht'=>"LineTotalHT", 'cd.total_tva'=>"LineTotalVAT", 'cd.total_ttc'=>"LineTotalTTC", 'p.rowid'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel' ); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['c.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['c.multicurrency_tx'] = 'CurrencyRate'; $this->export_fields_array[$r]['c.multicurrency_total_ht'] = 'MulticurrencyAmountHT'; @@ -208,14 +207,14 @@ class modPropale extends DolibarrModules //$this->export_TypeFields_array[$r]=array( // 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text', // 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date", - // 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text", + // 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total_ttc'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text", // 'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric", // 'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text' //); $this->export_TypeFields_array[$r] = array( 's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.datec'=>"Date", 'c.datep'=>"Date", 'c.fin_validite'=>"Date", - 'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date', + 'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total_ttc'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date', 'pj.ref'=>'Text', 'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric", 'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text' ); @@ -223,25 +222,35 @@ class modPropale extends DolibarrModules 's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.siret'=>'company', 'c.rowid'=>"propal", 'c.ref'=>"propal", 'c.ref_client'=>"propal", 'c.fk_soc'=>"propal", 'c.datec'=>"propal", 'c.datep'=>"propal", 'c.fin_validite'=>"propal", 'c.remise_percent'=>"propal", 'c.total_ht'=>"propal", - 'c.total'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line', + 'c.total_ttc'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line', 'cd.label'=>"propal_line", 'cd.description'=>"propal_line", 'cd.product_type'=>'propal_line', 'cd.tva_tx'=>"propal_line", 'cd.qty'=>"propal_line", 'cd.total_ht'=>"propal_line", 'cd.total_tva'=>"propal_line", 'cd.total_ttc'=>"propal_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product' ); $this->export_dependencies_array[$r] = array('propal_line'=>'cd.rowid', 'product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - $keyforselect = 'propal'; $keyforelement = 'propal'; $keyforaliasextra = 'extra'; + $keyforselect = 'propal'; + $keyforelement = 'propal'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'propaldet'; $keyforelement = 'propal_line'; $keyforaliasextra = 'extra2'; + $keyforselect = 'propaldet'; + $keyforelement = 'propal_line'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra3'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra3'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'societe'; $keyforelement = 'societe'; $keyforaliasextra = 'extra4'; + $keyforselect = 'societe'; + $keyforelement = 'societe'; + $keyforaliasextra = 'extra4'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s '; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'propal as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON c.fk_projet = pj.rowid'; @@ -254,7 +263,9 @@ class modPropale extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('propal').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } // Imports //-------- @@ -276,7 +287,7 @@ class modPropale extends DolibarrModules 'c.fin_validite' => 'DateEndPropal', 'c.remise_percent' => 'GlobalDiscount', 'c.total_ht' => 'TotalHT', - 'c.total' => 'TotalTTC', + 'c.total_ttc' => 'TotalTTC', 'c.fk_statut' => 'Status*', 'c.note_public' => 'Note', 'c.date_livraison' => 'DeliveryDate', @@ -313,7 +324,7 @@ class modPropale extends DolibarrModules 'c.fin_validite' => '2020-01-01', 'c.remise_percent' => '', 'c.total_ht' => '0', - 'c.total' => '0', + 'c.total_ttc' => '0', 'c.fk_statut' => '1', 'c.note_public' => '', 'c.date_livraison' => '2020-01-01', @@ -339,7 +350,7 @@ class modPropale extends DolibarrModules //Import Proposal Lines $r++; $this->import_code[$r] = $this->rights_class.'line_'.$r; - $this->import_label[$r] = "ProposalLine"; // Translation key + $this->import_label[$r] = "ProposalLines"; // Translation key $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r] = [ @@ -446,13 +457,11 @@ class modPropale extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/proposals'; $dest = $dirodt.'/template_proposal.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index 7143dd0d614..ee87f4c57ba 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/modReceiptPrinter.class.php * \ingroup printing - * \brief File of class to describe and activate module Receipt Printer + * \brief Description and activation file for the module Receipt Printer */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -71,7 +71,7 @@ class modReceiptPrinter extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 9, -2); // Minimum version of Dolibarr required by module $this->conflictwith = array(); $this->langfiles = array("receiptprinter"); @@ -95,7 +95,7 @@ class modReceiptPrinter extends DolibarrModules // $this->rights[$r][5] Niveau 2 pour nommer permission dans code $r++; - $this->rights[$r][0] = 67000; + $this->rights[$r][0] = 67001; $this->rights[$r][1] = 'ReceiptPrinter'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 8bebf949b6f..02f17cf0fbe 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -20,7 +20,7 @@ * \brief Module pour gerer les réceptions de produits * \file htdocs/core/modules/modReception.class.php * \ingroup reception - * \brief Fichier de description et activation du module Reception + * \brief Description and activation file for the module Reception */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -186,7 +186,9 @@ class modReception extends DolibarrModules 'ed.comment'=>'Description', 'ed.qty'=>"Qty", 'p.rowid'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'p.weight'=>'ProductWeight', 'p.weight_units'=>'WeightUnits', 'p.volume'=>'ProductVolume', 'p.volume_units'=>'VolumeUnits' ); - if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) $this->export_fields_array[$r] += array('sp.rowid'=>'IdContact', 'sp.lastname'=>'Lastname', 'sp.firstname'=>'Firstname', 'sp.note_public'=>'NotePublic'); + if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) { + $this->export_fields_array[$r] += array('sp.rowid'=>'IdContact', 'sp.lastname'=>'Lastname', 'sp.firstname'=>'Firstname', 'sp.note_public'=>'NotePublic'); + } //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.label'=>'List:c_country:label:label','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Numeric",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total_ttc'=>"Numeric",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); $this->export_TypeFields_array[$r] = array( 's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', @@ -201,23 +203,32 @@ class modReception extends DolibarrModules 'ed.rowid'=>'reception_line', 'ed.comment'=>'reception_line', 'ed.qty'=>"reception_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product', 'p.weight'=>'product', 'p.weight_units'=>'product', 'p.volume'=>'product', 'p.volume_units'=>'product' ); - if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) $this->export_entities_array[$r] += array('sp.rowid'=>'contact', 'sp.lastname'=>'contact', 'sp.firstname'=>'contact', 'sp.note_public'=>'contact'); + if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) { + $this->export_entities_array[$r] += array('sp.rowid'=>'contact', 'sp.lastname'=>'contact', 'sp.firstname'=>'contact', 'sp.note_public'=>'contact'); + } $this->export_dependencies_array[$r] = array('reception_line'=>'ed.rowid', 'product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) - { - $keyforselect = 'socpeople'; $keyforelement = 'contact'; $keyforaliasextra = 'extra3'; + if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) { + $keyforselect = 'socpeople'; + $keyforelement = 'contact'; + $keyforaliasextra = 'extra3'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; } - $keyforselect = 'reception'; $keyforelement = 'reception'; $keyforaliasextra = 'extra'; + $keyforselect = 'reception'; + $keyforelement = 'reception'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'commande_fournisseur_dispatch'; $keyforelement = 'reception_line'; $keyforaliasextra = 'extra2'; + $keyforselect = 'commande_fournisseur_dispatch'; + $keyforelement = 'reception_line'; + $keyforaliasextra = 'extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'reception as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'reception_extrafields as extra ON c.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'societe as s'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as ed'; @@ -225,13 +236,15 @@ class modReception extends DolibarrModules $this->export_sql_end[$r] .= ' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) { - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$this->db->sanitize($idcontacts).')'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object'; } $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_reception AND ed.fk_commandefourndet = cd.rowid'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('reception').')'; - if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + if (empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id); + } } @@ -255,13 +268,11 @@ class modReception extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/reception'; $dest = $dirodt.'/template_reception.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modRecruitment.class.php b/htdocs/core/modules/modRecruitment.class.php index 8e282a9513d..3d4e88872ef 100644 --- a/htdocs/core/modules/modRecruitment.class.php +++ b/htdocs/core/modules/modRecruitment.class.php @@ -23,7 +23,7 @@ * * \file htdocs/recruitment/core/modules/modRecruitment.class.php * \ingroup recruitment - * \brief Description and activation file for module Recruitment + * \brief Description and activation file for the module Recruitment */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -62,7 +62,7 @@ class modRecruitment extends DolibarrModules // Used only if file README.md and README-LL.md not found. $this->descriptionlong = "Manage and follow recruitment campaign for new job positions"; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' - $this->version = 'experimental'; + $this->version = 'dolibarr'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; @@ -122,7 +122,7 @@ class modRecruitment extends DolibarrModules $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->langfiles = array("recruitment"); - $this->phpmin = array(5, 5); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -270,6 +270,7 @@ class modRecruitment extends DolibarrModules 'fk_menu'=>'fk_mainmenu=hrm', // '' 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 Top menu entry 'titre'=>'Recruitment', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'hrm', 'leftmenu'=>'recruitmentjobposition', 'url'=>'/recruitment/recruitmentindex.php', @@ -403,7 +404,9 @@ class modRecruitment extends DolibarrModules global $conf, $langs; $result = $this->_load_tables('/recruitment/sql/'); - if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } // Create extrafields during init //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -425,19 +428,19 @@ class modRecruitment extends DolibarrModules $myTmpObjects['RecruitmentJobPosition'] = array('includerefgeneration'=>1, 'includedocgeneration'=>1); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') continue; + if ($myTmpObjectKey == 'MyObject') { + continue; + } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/mymodule/template_myobjects.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/mymodule'; $dest = $dirodt.'/template_myobjects.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modResource.class.php b/htdocs/core/modules/modResource.class.php index 0d1353076ec..6f2d3f8d409 100644 --- a/htdocs/core/modules/modResource.class.php +++ b/htdocs/core/modules/modResource.class.php @@ -23,7 +23,7 @@ * \brief Resource module descriptor. * \file core/modules/modResource.class.php * \ingroup resource - * \brief Description and activation file for module Resource + * \brief Description and activation file for the module Resource */ include_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -95,7 +95,7 @@ class modResource extends DolibarrModules // List of modules id to disable if this one is disabled $this->requiredby = array('modPlace'); // Minimum version of PHP required by module - $this->phpmin = array(5, 4); + $this->phpmin = array(5, 6); $this->langfiles = array("resource"); // langfiles@resource // Constants @@ -188,6 +188,7 @@ class modResource extends DolibarrModules 'fk_menu'=>'fk_mainmenu=tools', 'type'=>'left', 'titre'=> 'MenuResourceIndex', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em92"'), 'mainmenu'=>'tools', 'leftmenu'=> 'resource', 'url'=> '/resource/list.php', @@ -241,7 +242,9 @@ class modResource extends DolibarrModules $this->export_fields_array[$r] = array('r.rowid'=>'IdResource', 'r.ref'=>'ResourceFormLabel_ref', 'c.code'=>'ResourceTypeCode', 'c.label'=>'ResourceType', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>"DateCreation", 'r.tms'=>"DateLastModification"); $this->export_TypeFields_array[$r] = array('r.rowid'=>'List:resource:ref', 'r.ref'=>'Text', 'r.asset_number'=>'Text', 'r.description'=>'Text', 'c.code'=>'Text', 'c.label'=>'List:c_type_resource:label', 'r.datec'=>'Date', 'r.tms'=>'Date', 'r.note_private'=>'Text', 'r.note_public'=>'Text'); $this->export_entities_array[$r] = array('r.rowid'=>'resource', 'r.ref'=>'resource', 'c.code'=>'resource', 'c.label'=>'resource', 'r.description'=>'resource', 'r.note_private'=>"resource", 'r.resource'=>"resource", 'r.asset_number'=>'resource', 'r.datec'=>"resource", 'r.tms'=>"resource"); - $keyforselect = 'resource'; $keyforelement = 'resource'; $keyforaliasextra = 'extra'; + $keyforselect = 'resource'; + $keyforelement = 'resource'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_dependencies_array[$r] = array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. @@ -267,10 +270,8 @@ class modResource extends DolibarrModules // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 23c892333d8..759804b409e 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -27,7 +27,7 @@ * \brief Module to include salaries management * \file htdocs/core/modules/modSalaries.class.php * \ingroup salaries - * \brief File to activate module salaries + * \brief Description and activation file for the module salaries */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -75,7 +75,7 @@ class modSalaries extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("salaries", "bills"); // Constants diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index b4dd93ff3e0..fd019ca4c68 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -1,10 +1,10 @@ - * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2020 Alexandre Spangaro +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2020-2021 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 @@ -25,7 +25,7 @@ * \brief Module pour gerer le suivi de services predefinis * \file htdocs/core/modules/modService.class.php * \ingroup service - * \brief Fichier de description et activation du module Service + * \brief Description and activation file for the module Service */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,7 +68,7 @@ class modService extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Config pages $this->config_page_url = array("product.php@product"); @@ -135,12 +135,16 @@ class modService extends DolibarrModules */ $usenpr = 0; - if (is_object($mysoc)) $usenpr = $mysoc->useNPR(); + if (is_object($mysoc)) { + $usenpr = $mysoc->useNPR(); + } // Exports //-------- $r = 0; + $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "pa"; + $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "Services"; // Translation key (used only if key ExportDataset_xxx_z not found) @@ -150,9 +154,9 @@ class modService extends DolibarrModules 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", 'p.description'=>"Description", 'p.url'=>"PublicUrl", 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', - 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", + $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.duration'=>"Duration", @@ -161,22 +165,40 @@ class modService extends DolibarrModules 'p.tva_tx'=>'VATRate', 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); - if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); + } + if (!empty($conf->stock->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - if (!empty($conf->fournisseur->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); - if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('s.nom'=>'Supplier', 'pf.ref_fourn'=>'SupplierRef', 'pf.quantity'=>'QtyMin', 'pf.remise_percent'=>'DiscountQtyMin', 'pf.unitprice'=>'BuyingPrice', 'pf.delivery_time_days'=>'NbDaysToDelivery')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('group_concat(cat.label)'=>'Categories')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote')); + } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $this->export_fields_array[$r]['p.fk_unit'] = 'Unit'; + } $this->export_TypeFields_array[$r] = array( 'p.ref'=>"Text", 'p.label'=>"Text", 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", - 'p.description'=>"Text", 'p.url'=>"Text", 'p.accountancy_code_sell'=>"Text", - 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", 'p.accountancy_code_buy'=>"Text", - 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + 'p.description'=>"Text", 'p.url'=>"Text", + $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", + $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", 'p.note'=>"Text", 'p.note_public'=>"Text", 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', @@ -185,48 +207,91 @@ class modService extends DolibarrModules 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); - if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); - if (!empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + if (!empty($conf->stock->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array("group_concat(cat.label)"=>'Text')); + } $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); - if (!empty($conf->fournisseur->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array("group_concat(cat.label)"=>'category')); + } + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + } + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'product', 'p.pmp'=>'product')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'product')); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('s.nom'=>'product_supplier_ref', 'pf.ref_fourn'=>'product_supplier_ref', 'pf.unitprice'=>'product_supplier_ref', 'pf.quantity'=>'product_supplier_ref', 'pf.remise_percent'=>'product_supplier_ref', 'pf.delivery_time_days'=>'product_supplier_ref')); + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('l.lang'=>'translation', 'l.label'=>'translation', 'l.description'=>'translation', 'l.note'=>'translation')); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); + } $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; - if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); + } + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; + } + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lang as l ON l.fk_product = p.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object'; - if (!empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc'; + } $this->export_sql_end[$r] .= ' WHERE p.fk_product_type = 1 AND p.entity IN ('.getEntity('product').')'; - if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { + $this->export_sql_order[$r] = ' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields" + } - if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries) - { - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->product->enabled)) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries) + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Exports product multiprice $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r] = array(array("produit", "export")); + $this->export_permission[$r] = array(array("service", "export")); $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", 'pr.price_base_type'=>"PriceBase", 'pr.price_level'=>"PriceLevel", 'pr.price'=>"PriceLevelUnitPriceHT", 'pr.price_ttc'=>"PriceLevelUnitPriceTTC", 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.tva_tx'=>'PriceLevelVATRate', 'pr.date_price'=>'DateCreation'); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + } //$this->export_TypeFields_array[$r]=array( // 'p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text", // 'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text', @@ -246,13 +311,12 @@ class modService extends DolibarrModules $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Exports product multiprice $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "ProductsPricePerCustomer"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r] = array(array("produit", "export")); + $this->export_permission[$r] = array(array("service", "export")); $this->export_fields_array[$r] = array('p.rowid'=>"Id", 'p.ref'=>"Ref", 's.nom'=>'ThirdParty', 'pr.price_base_type'=>"PriceBase", @@ -261,7 +325,9 @@ class modService extends DolibarrModules 'pr.tva_tx'=>'PriceVATRate', 'pr.default_vat_code'=>'PriceVATCode', 'pr.datec'=>'DateCreation'); - if (is_object($mysoc) && $usenpr) $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + if (is_object($mysoc) && $usenpr) { + $this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR'; + } $this->export_entities_array[$r] = array('p.rowid'=>"product", 'p.ref'=>"product", 's.nom'=>'company', 'pr.price_base_type'=>"product", 'pr.price'=>"product", @@ -278,56 +344,72 @@ class modService extends DolibarrModules $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile } - if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { // Exports virtual products $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = "AssociatedProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r] = array(array("produit", "export")); + $this->export_permission[$r] = array(array("service", "export")); $this->export_fields_array[$r] = array( 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", - 'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", - 'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode", - 'p.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", 'p.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", + $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", + $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", + $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); - if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); - if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + if (!empty($conf->stock->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); + } $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); $this->export_TypeFields_array[$r] = array( 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", - 'p.accountancy_code_sell'=>"Text", 'p.accountancy_code_sell_intra'=>"Text", 'p.accountancy_code_sell_export'=>"Text", - 'p.accountancy_code_buy'=>"Text", 'p.accountancy_code_buy_intra'=>"Text", 'p.accountancy_code_buy_export'=>"Text", + $alias_product_perentity . 'p.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", + $alias_product_perentity . 'p.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", 'p.note'=>"Text", 'p.note_public'=>"Text", 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); - if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + if (!empty($conf->stock->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); + } $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); $this->export_entities_array[$r] = array( 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", - 'p.accountancy_code_sell'=>'virtualproduct', 'p.accountancy_code_sell_intra'=>'virtualproduct', 'p.accountancy_code_sell_export'=>'virtualproduct', - 'p.accountancy_code_buy'=>'virtualproduct', 'p.accountancy_code_buy_intra'=>'virtualproduct', 'p.accountancy_code_buy_export'=>'virtualproduct', + $alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct', + $alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct', 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", 'p.tosell'=>"virtualproduct", 'p.tobuy'=>"virtualproduct", 'p.datec'=>"virtualproduct", 'p.tms'=>"virtualproduct" ); - if (!empty($conf->stock->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); - if (!empty($conf->barcode->enabled)) $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + if (!empty($conf->stock->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.stock'=>'virtualproduct', 'p.seuil_stock_alerte'=>'virtualproduct', 'p.desiredstock'=>'virtualproduct', 'p.pmp'=>'virtualproduct')); + } + if (!empty($conf->barcode->enabled)) { + $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode'=>'virtualproduct')); + } $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pa.qty'=>"subproduct", 'pa.incdec'=>'subproduct')); - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description")); $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct")); $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity); + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; $this->export_sql_end[$r] .= ' WHERE p.entity IN ('.getEntity('product').')'; // For product and service profile @@ -369,13 +451,13 @@ class modService extends DolibarrModules 'p.weight' => "Weight", 'p.weight_units' => "WeightUnits", 'p.length' => "Length", - 'p.length_units' => "LengthUnit", + 'p.length_units' => "LengthUnits", 'p.width' => "Width", 'p.width_units' => "WidthUnits", 'p.height' => "Height", - 'p.height_units' => "HeightUnit", + 'p.height_units' => "HeightUnits", 'p.surface' => "Surface", - 'p.surface_units' => "SurfaceUnit", + 'p.surface_units' => "SurfaceUnits", 'p.volume' => "Volume", 'p.volume_units' => "VolumeUnits", 'p.duration' => "Duration", //duration of service @@ -389,13 +471,6 @@ class modService extends DolibarrModules 'p.datec' => 'DateCreation', 'p.cost_price' => "CostPrice", ); - if (!empty($conf->stock->enabled)) {//if Stock module enabled - $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( - 'p.seuil_stock_alerte' => 'StockLimit', //lower limit for warning - 'p.pmp' => 'PMPValue', //weighted average price - 'p.desiredstock' => 'DesiredStock'//desired stock for replenishment feature - )); - } $this->import_convertvalue_array[$r] = array( 'p.weight_units' => array( @@ -454,20 +529,65 @@ class modService extends DolibarrModules 'dict' => 'DictionaryCountry' ) ); - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.recuperableonly'=>'NPR')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax1_tx'=>'LT1', 'p.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax2_tx'=>'LT2', 'p.localtax2_type'=>'LT2Type')); - if (!empty($conf->barcode->enabled)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode')); - if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; + + $this->import_regex_array[$r] = array( + 'p.ref' => '[^ ]', + 'p.price_base_type' => '\AHT\z|\ATTC\z', + 'p.tosell' => '^[0|1]$', + 'p.tobuy' => '^[0|1]$', + 'p.fk_product_type' => '^[0|1]$', + 'p.datec' => '^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', + 'p.recuperableonly' => '^[0|1]$', + ); + + if (!empty($conf->stock->enabled)) {//if Stock module enabled + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( + 'p.fk_default_warehouse'=>'DefaultWarehouse', + 'p.tobatch'=>'ManageLotSerial', + 'p.seuil_stock_alerte' => 'StockLimit', //lower limit for warning + 'p.pmp' => 'PMPValue', //weighted average price + 'p.desiredstock' => 'DesiredStock'//desired stock for replenishment feature + )); + + $this->import_regex_array[$r] = array_merge($this->import_regex_array[$r], array( + 'p.tobatch' => '^[0|1|2]$' + )); + + $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( + 'p.fk_default_warehouse' => array( + 'rule' => 'fetchidfromref', + 'classfile' => '/product/stock/class/entrepot.class.php', + 'class' => 'Entrepot', + 'method' => 'fetch', + 'element'=> 'Warehouse' + ) + )); + } + + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.cost_price'=>'CostPrice')); + } + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.recuperableonly'=>'NPR')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax1_tx'=>'LT1', 'p.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.localtax2_tx'=>'LT2', 'p.localtax2_type'=>'LT2Type')); + } + if (!empty($conf->barcode->enabled)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode')); + } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $this->import_fields_array[$r]['p.fk_unit'] = 'Unit'; + } // Add extra fields $import_extrafield_sample = array(); $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); @@ -478,7 +598,7 @@ class modService extends DolibarrModules $this->import_fieldshidden_array[$r] = array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'product'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r] = array( 'p.ref'=>'[^ ]', - 'p.price_base_type' => '\AHT\z|\ATTC\z', + 'p.price_base_type' => 'HT|TTC', 'p.tosell'=>'^[0|1]$', 'p.tobuy'=>'^[0|1]$', 'p.fk_product_type'=>'^[0|1]$', @@ -488,7 +608,7 @@ class modService extends DolibarrModules ); // field order as per structure of table llx_product $import_sample = array( - 'p.ref' => "PREF123456", + 'p.ref' => "ref:PREF123456", 'p.datec' => dol_print_date(dol_now(), '%Y-%m-%d'), 'p.label' => "Product name in default language", 'p.description' => "Product description in default language", @@ -525,28 +645,42 @@ class modService extends DolibarrModules 'p.surface_units' => 'm2', // Use a unit of measure from the dictionary. m2/cm2/mm2 etc....matches field "Short label" for unit type "surface" in table "' . MAIN_DB_PREFIX . 'c_units', 'p.volume' => "", 'p.volume_units' => 'm3', //Use a unit of measure from the dictionary. m3/cm3/mm3 etc....matches field "Short label" for unit type "volume" in table "' . MAIN_DB_PREFIX . 'c_units', - 'p.finished' => '0 (raw material) / 1 (finished goods)' + 'p.finished' => '0 (raw material) / 1 (finished goods), matches field "code" in dictionary table "'.MAIN_DB_PREFIX.'c_product_nature"' ); //clauses copied from import_fields_array - if (!empty($conf->stock->enabled)) $import_sample = array_merge($import_sample, array( + if (!empty($conf->stock->enabled)) { + $import_sample = array_merge($import_sample, array( 'p.seuil_stock_alerte' => '', 'p.pmp' => '0', 'p.desiredstock' => '' - )); - if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $import_sample = array_merge($import_sample, array('p.cost_price'=>'90')); - if (is_object($mysoc) && $usenpr) $import_sample = array_merge($import_sample, array('p.recuperableonly'=>'0')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $import_sample = array_merge($import_sample, array('p.localtax1_tx'=>'', 'p.localtax1_type'=>'')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $import_sample = array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>'')); - if (!empty($conf->barcode->enabled)) $import_sample = array_merge($import_sample, array('p.barcode'=>'')); + )); + } + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled) || !empty($conf->margin->enabled)) { + $import_sample = array_merge($import_sample, array('p.cost_price'=>'90')); + } + if (is_object($mysoc) && $usenpr) { + $import_sample = array_merge($import_sample, array('p.recuperableonly'=>'0')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $import_sample = array_merge($import_sample, array('p.localtax1_tx'=>'', 'p.localtax1_type'=>'')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $import_sample = array_merge($import_sample, array('p.localtax2_tx'=>'', 'p.localtax2_type'=>'')); + } + if (!empty($conf->barcode->enabled)) { + $import_sample = array_merge($import_sample, array('p.barcode'=>'')); + } if (!empty($conf->global->PRODUCT_USE_UNITS)) { $import_sample = array_merge( $import_sample, array( 'p.fk_unit' => 'use a unit of measure from the dictionary. G/KG/M2/M3 etc....matches field "code" in table "'.MAIN_DB_PREFIX.'c_units"' ) - ); + ); - if (!is_array($this->import_convertvalue_array[$r])) $this->import_convertvalue_array[$r] = array(); + if (!is_array($this->import_convertvalue_array[$r])) { + $this->import_convertvalue_array[$r] = array(); + } $this->import_convertvalue_array[$r] = array_merge($this->import_convertvalue_array[$r], array( 'p.fk_unit' => array( 'rule' => 'fetchidfromcodeorlabel', @@ -559,12 +693,12 @@ class modService extends DolibarrModules } $this->import_examplevalues_array[$r] = array_merge($import_sample, $import_extrafield_sample); $this->import_updatekeys_array[$r] = array('p.ref'=>'Ref'); - if (!empty($conf->barcode->enabled)) $this->import_updatekeys_array[$r] = array_merge($this->import_updatekeys_array[$r], array('p.barcode'=>'BarCode')); //only show/allow barcode as update key if Barcode module enabled + if (!empty($conf->barcode->enabled)) { + $this->import_updatekeys_array[$r] = array_merge($this->import_updatekeys_array[$r], array('p.barcode'=>'BarCode')); //only show/allow barcode as update key if Barcode module enabled + } - if (empty($conf->product->enabled)) // We enable next import templates only if module product not already enabled (to avoid duplicate entries) - { - if (!empty($conf->fournisseur->enabled)) - { + if (empty($conf->product->enabled)) { // We enable next import templates only if module product not already enabled (to avoid duplicate entries) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { // Import suppliers prices (note: this code is duplicated in module Service) $r++; $this->import_code[$r] = $this->rights_class.'_supplierprices'; @@ -583,32 +717,37 @@ class modService extends DolibarrModules 'sp.delivery_time_days' => 'DeliveryDelay', 'sp.supplier_reputation' => 'SupplierReputation' ); - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + } $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( 'sp.price'=>"PriceQtyMinHT*", 'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent'=>'DiscountQtyMin' )); - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array( - 'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line - 'sp.multicurrency_code'=>'CurrencyCode', - 'sp.multicurrency_tx'=>'CurrencyRate', - 'sp.multicurrency_unitprice'=>'CurrencyUnitPrice', - 'sp.multicurrency_price'=>'CurrencyPrice', + 'sp.fk_multicurrency'=>'CurrencyCodeId', //ideally this should be automatically obtained from the CurrencyCode on the next line + 'sp.multicurrency_code'=>'CurrencyCode', + 'sp.multicurrency_tx'=>'CurrencyRate', + 'sp.multicurrency_unitprice'=>'CurrencyUnitPrice', + 'sp.multicurrency_price'=>'CurrencyPrice', )); } - $this->import_convertvalue_array[$r] = array( + $this->import_convertvalue_array[$r] = array( 'sp.fk_soc'=>array('rule'=>'fetchidfromref', 'classfile'=>'/societe/class/societe.class.php', 'class'=>'Societe', 'method'=>'fetch', 'element'=>'ThirdParty'), 'sp.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') - ); - $this->import_examplevalues_array[$r] = array( - 'sp.fk_product' => "PRODUCT_REF or id:123456", + ); + $this->import_examplevalues_array[$r] = array( + 'sp.fk_product' => "ref:PRODUCT_REF or id:123456", 'sp.fk_soc' => "My Supplier", 'sp.ref_fourn' => "XYZ-F123456", 'sp.quantity' => "5", @@ -619,33 +758,42 @@ class modService extends DolibarrModules 'sp.default_vat_code' => '', 'sp.delivery_time_days' => '5', 'sp.supplier_reputation' => 'FAVORITE / NOTTHGOOD / DONOTORDER' - ); - if (is_object($mysoc) && $usenpr) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.recuperableonly'=>'')); - if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); - if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); - $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( + ); + if (is_object($mysoc) && $usenpr) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.recuperableonly'=>'')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(1)) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type')); + } + if (is_object($mysoc) && $mysoc->useLocalTax(2)) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type')); + } + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( 'sp.price' => "50.00", 'sp.unitprice' => '10', // TODO Make this field not required and calculate it from price and qty 'sp.remise_percent' => '20' - )); - if (!empty($conf->multicurrency->enabled)) - { + )); + if (!empty($conf->multicurrency->enabled)) { $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( - 'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency', - 'sp.multicurrency_code'=>'GBP', - 'sp.multicurrency_tx'=>'1.12345', - 'sp.multicurrency_unitprice'=>'', - // TODO Make this field not required and calculate it from price and qty - 'sp.multicurrency_price'=>'' + 'sp.fk_multicurrency'=>'eg: 2, rowid for code of multicurrency currency', + 'sp.multicurrency_code'=>'GBP', + 'sp.multicurrency_tx'=>'1.12345', + 'sp.multicurrency_unitprice'=>'', + // TODO Make this field not required and calculate it from price and qty + 'sp.multicurrency_price'=>'' + )); + } + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $this->import_examplevalues_array[$r] = array_merge($this->import_examplevalues_array[$r], array( + 'sp.packagning'=>'1', )); } $this->import_updatekeys_array[$r] = array('sp.fk_product'=>'ProductOrService', 'sp.ref_fourn'=>'SupplierRef', 'sp.fk_soc'=>'Supplier'); } - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { // Import products multiprices $r++; $this->import_code[$r] = $this->rights_class.'_multiprice'; @@ -659,13 +807,17 @@ class modService extends DolibarrModules 'pr.price'=>"PriceLevelUnitPriceHT", 'pr.price_ttc'=>"PriceLevelUnitPriceTTC", 'pr.price_min'=>"MinPriceLevelUnitPriceHT", 'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC", 'pr.date_price'=>'DateCreation*'); - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) $this->import_fields_array[$r]['pr.tva_tx'] = 'VATRate'; - if (is_object($mysoc) && $usenpr) $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('pr.recuperableonly'=>'NPR')); + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { + $this->import_fields_array[$r]['pr.tva_tx'] = 'VATRate'; + } + if (is_object($mysoc) && $usenpr) { + $this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('pr.recuperableonly'=>'NPR')); + } $this->import_regex_array[$r] = array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$', 'pr.recuperableonly'=>'^[0|1]$'); $this->import_convertvalue_array[$r] = array( 'pr.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') ); - $this->import_examplevalues_array[$r] = array('pr.fk_product'=>"SERVICE_REF or id:123456", + $this->import_examplevalues_array[$r] = array('pr.fk_product'=>"ref:SERVICE_REF or id:123456", 'pr.price_base_type'=>"HT (for excl tax) or TTC (for inc tax)", 'pr.price_level'=>"1", 'pr.price'=>"100", 'pr.price_ttc'=>"110", 'pr.price_min'=>"100", 'pr.price_min_ttc'=>"110", @@ -674,8 +826,7 @@ class modService extends DolibarrModules 'pr.date_price'=>'2013-04-10'); } - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // Import translations of product names and descriptions $r++; $this->import_code[$r] = $this->rights_class.'_languages'; @@ -689,7 +840,7 @@ class modService extends DolibarrModules $this->import_convertvalue_array[$r] = array( 'l.fk_product'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/class/product.class.php', 'class'=>'Product', 'method'=>'fetch', 'element'=>'Product') ); - $this->import_examplevalues_array[$r] = array('l.fk_product'=>'SERVICE_REF or id:123456', 'l.lang'=>'en_US', 'l.label'=>'Label in en_US', 'l.description'=>'Desc in en_US'); + $this->import_examplevalues_array[$r] = array('l.fk_product'=>'ref:SERVICE_REF or id:123456', 'l.lang'=>'en_US', 'l.label'=>'Label in en_US', 'l.description'=>'Desc in en_US'); $this->import_updatekeys_array[$r] = array('l.fk_product'=>'ProductOrService', 'l.lang'=>'Language'); } } diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index bf7573a912b..3949de6c691 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -21,7 +21,7 @@ * \brief Add a SocialNetworks button. * \file htdocs/core/modules/modSocialNetworks.class.php * \ingroup socialnetworks - * \brief Description and activation file for module SocialNetworks + * \brief Description and activation file for the module SocialNetworks */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -69,7 +69,7 @@ class modSocialNetworks extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array(); // Constants diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 1bb0c61b83e..af4fb9e64b8 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -25,7 +25,7 @@ * \brief Module to manage third parties (customers, prospects) * \file htdocs/core/modules/modSociete.class.php * \ingroup societe - * \brief Fichier de description et activation du module Societe + * \brief Description and activation file for the module societe (thirdparty) */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -70,7 +70,7 @@ class modSociete extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array("modExpedition", "modFacture", "modFournisseur", "modFicheinter", "modPropale", "modContrat", "modCommande"); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("companies", 'bills', "compta", "admin", "banks"); // Constants @@ -157,7 +157,7 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'read'; - */ + */ $r++; $this->rights[$r][0] = 122; // id de la permission @@ -181,7 +181,7 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on $this->rights[$r][5] = 'read'; - */ + */ $r++; $this->rights[$r][0] = 125; // id de la permission @@ -197,15 +197,25 @@ class modSociete extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'export'; - // 262 : Resteindre l'acces des commerciaux + // 262 : Restrict access to sales representative $r++; $this->rights[$r][0] = 262; - $this->rights[$r][1] = 'Read all third parties by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).'; + $this->rights[$r][1] = 'Read all third parties (and their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'client'; $this->rights[$r][5] = 'voir'; + /* + $r++; + $this->rights[$r][0] = 263; + $this->rights[$r][1] = 'Read all third parties (without their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'client'; + $this->rights[$r][5] = 'readallthirdparties_advance'; + */ + $r++; $this->rights[$r][0] = 281; // id de la permission $this->rights[$r][1] = 'Read contacts'; // libelle de la permission @@ -265,15 +275,22 @@ class modSociete extends DolibarrModules 'st.code'=>'ProspectStatus', 'payterm.libelle'=>'PaymentConditions', 'paymode.libelle'=>'PaymentMode', 's.outstanding_limit'=>'OutstandingBill', 'pbacc.ref'=>'PaymentBankAccount', 'incoterm.code'=>'IncotermLabel' ); - if (!empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix'] = 'Prefix'; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level'] = 'PriceLevel'; - // Add multicompany field - if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) - { - $nbofallowedentities = count(explode(',', getEntity('societe'))); // If project are shared, nb will be > 1 - if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) $this->export_fields_array[$r] += array('s.entity'=>'Entity'); + if (!empty($conf->global->SOCIETE_USEPREFIX)) { + $this->export_fields_array[$r]['s.prefix'] = 'Prefix'; } - $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extra'; + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + $this->export_fields_array[$r]['s.price_level'] = 'PriceLevel'; + } + // Add multicompany field + if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) { + $nbofallowedentities = count(explode(',', getEntity('societe'))); // If project are shared, nb will be > 1 + if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) { + $this->export_fields_array[$r] += array('s.entity'=>'Entity'); + } + } + $keyforselect = 'societe'; + $keyforelement = 'company'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_fields_array[$r] += array('u.login'=>'SaleRepresentativeLogin', 'u.firstname'=>'SaleRepresentativeFirstname', 'u.lastname'=>'SaleRepresentativeLastname'); @@ -326,7 +343,7 @@ class modSociete extends DolibarrModules $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.$user->id.' '; if (!empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) { $subordinatesids = $user->getAllChildIds(); - $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : ''; + $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.$this->db->sanitize(implode(',', $subordinatesids)).')' : ''; } $this->export_sql_end[$r] .= ')'; } @@ -367,20 +384,25 @@ class modSociete extends DolibarrModules 's.address'=>"company", 's.zip'=>"company", 's.town'=>"company", 's.phone'=>"company", 's.email'=>"company", 't.libelle'=>"company" ); // We define here only fields that use another picto - if (empty($conf->fournisseur->enabled)) - { + if (empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { unset($this->export_fields_array[$r]['s.code_fournisseur']); unset($this->export_entities_array[$r]['s.code_fournisseur']); } - $keyforselect = 'socpeople'; $keyforelement = 'contact'; $keyforaliasextra = 'extra'; + $keyforselect = 'socpeople'; + $keyforelement = 'contact'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extrasoc'; + $keyforselect = 'societe'; + $keyforelement = 'company'; + $keyforaliasextra = 'extrasoc'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'socpeople as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object'; - if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (is_object($user) && empty($user->rights->societe->client->voir)) { + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON c.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_regions as r ON r.code_region = d.fk_region AND r.fk_pays = c.fk_pays'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON c.fk_pays = co.rowid'; @@ -391,7 +413,7 @@ class modSociete extends DolibarrModules $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.$user->id.' '; if (!empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) { $subordinatesids = $user->getAllChildIds(); - $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : ''; + $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.$this->db->sanitize(implode(',', $subordinatesids)).')' : ''; } $this->export_sql_end[$r] .= ')'; } @@ -463,12 +485,13 @@ class modSociete extends DolibarrModules 's.fk_multicurrency' => 'MulticurrencyUsed', 's.multicurrency_code' => 'MulticurrencyCurrency' ); - if (!empty($conf->global->PRODUIT_MULTIPRICES)) $this->import_fields_array[$r]['s.price_level'] = 'PriceLevel'; + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + $this->import_fields_array[$r]['s.price_level'] = 'PriceLevel'; + } // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); @@ -644,8 +667,7 @@ class modSociete extends DolibarrModules // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on an old database (during a migration for example) - { + if ($resql) { // This can fail when class is used on an old database (during a migration for example) while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); @@ -750,8 +772,10 @@ class modSociete extends DolibarrModules $this->import_examplevalues_array[$r] = array(//field order as per structure of table llx_societe_rib 'sr.label' => 'eg. "account1"', 'sr.fk_soc' => 'eg. "TPBigCompany"', - 'sr.datec' => 'date used for creating direct debit UMR formatted as '.dol_print_date(dol_now(), - '%Y-%m-%d'), + 'sr.datec' => 'date used for creating direct debit UMR formatted as '.dol_print_date( + dol_now(), + '%Y-%m-%d' + ), 'sr.bank' => 'bank name eg: "ING-Direct"', 'sr.code_banque' => 'account sort code (GB)/Routing number (US) eg. "8456"', 'sr.code_guichet' => "bank code for office/branch", @@ -804,13 +828,11 @@ class modSociete extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/thirdparties'; $dest = $dirodt.'/template_thirdparty.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index c15f041d21d..c9379fb25d6 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -23,7 +23,7 @@ * \brief Module pour gerer la tenue de stocks produits * \file htdocs/core/modules/modStock.class.php * \ingroup stock - * \brief Fichier de description et activation du module Stock + * \brief Description and activation file for the module Stock */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -69,7 +69,7 @@ class modStock extends DolibarrModules $this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("stocks"); // Constants @@ -148,8 +148,7 @@ class modStock extends DolibarrModules $this->rights[4][4] = 'mouvement'; $this->rights[4][5] = 'creer'; - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { $this->rights[5][0] = 1011; $this->rights[5][1] = 'inventoryReadPermission'; // Permission label $this->rights[5][3] = 0; // Permission by default for new user (0/1) @@ -173,6 +172,12 @@ class modStock extends DolibarrModules $this->rights[9][3] = 0; // Permission by default for new user (0/1) $this->rights[9][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) + + $this->rights[10][0] = 1016; + $this->rights[10][1] = 'inventoryDeletePermission'; // Permission label + $this->rights[10][3] = 0; // Permission by default for new user (0/1) + $this->rights[10][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) + $this->rights[10][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) } // Main menu entries @@ -206,7 +211,9 @@ class modStock extends DolibarrModules ); $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into export_icon $this->export_aggregate_array[$r] = array(); - $keyforselect = 'warehouse'; $keyforelement = 'warehouse'; $keyforaliasextra = 'extra'; + $keyforselect = 'warehouse'; + $keyforelement = 'warehouse'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -244,7 +251,9 @@ class modStock extends DolibarrModules ); // We define here only fields that use another icon that the one defined into export_icon $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stock'=>array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them. - $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; + $keyforselect = 'product'; + $keyforelement = 'product'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('ps.reel'=>'Stock')); @@ -254,8 +263,7 @@ class modStock extends DolibarrModules $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; // Export stock including batch number - if ($conf->productbatch->enabled) - { + if (!empty($conf->productbatch->enabled)) { $langs->load("productbatch"); // This request is same than previous but without field ps.stock (real stock in warehouse) and with link to subtable productbatch @@ -290,7 +298,9 @@ class modStock extends DolibarrModules ); // We define here only fields that use another icon that the one defined into export_icon $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stockbatch'=>array('pb.rowid'), 'batch'=>array('pb.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. - $keyforselect = 'product_lot'; $keyforelement = 'batch'; $keyforaliasextra = 'extra'; + $keyforselect = 'product_lot'; + $keyforelement = 'batch'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r] = 'SELECT DISTINCT '; @@ -327,8 +337,7 @@ class modStock extends DolibarrModules 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", 'p.datec'=>'product', 'p.tms'=>'product' ); // We define here only fields that use another icon that the one defined into export_icon - if ($conf->productbatch->enabled) - { + if (!empty($conf->productbatch->enabled)) { $this->export_fields_array[$r]['sm.batch'] = 'Batch'; $this->export_TypeFields_array[$r]['sm.batch'] = 'Text'; $this->export_entities_array[$r]['sm.batch'] = 'movement'; @@ -383,9 +392,9 @@ class modStock extends DolibarrModules 'e.phone'=>'(+33)(0)123456789', 'e.fax'=>'(+33)(0)123456790', 'e.statut'=>'1', - 'e.fk_parent'=>'id or ref of warehouse' - ); - $this->import_updatekeys_array[$r] = array('p.ref'=>'Ref'); + 'e.fk_parent'=>'id or ref of warehouse' + ); + $this->import_updatekeys_array[$r] = array('p.ref'=>'Ref'); // Import stocks $r++; @@ -401,7 +410,7 @@ class modStock extends DolibarrModules 'ps.fk_entrepot'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/stock/class/entrepot.class.php', 'class'=>'Entrepot', 'method'=>'fetch', 'element'=>'ref') ); $this->import_examplevalues_array[$r] = array( - 'ps.fk_product'=>"id or ref of product", 'ps.fk_entrepot'=>"id or ref of warehouse", 'ps.reel'=>"10" + 'ps.fk_product'=>"id or ref of product", 'ps.fk_entrepot'=>"id or ref of warehouse", 'ps.reel'=>"10" ); $this->import_updatekeys_array[$r] = array('ps.fk_product'=>'Product', 'ps.fk_entrepot'=>"Warehouse"); $this->import_run_sql_after_array[$r] = array( // Because we may change data that are denormalized, we must update dernormalized data after. @@ -430,13 +439,11 @@ class modStock extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/stocks'; $dest = $dirodt.'/template_warehouse.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 4d95a6329ba..2677d3e3fa3 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -21,7 +21,7 @@ * \brief Add integration with Stripe online payment system. * \file htdocs/core/modules/modStripe.class.php * \ingroup stripe - * \brief Description and activation file for module Stripe + * \brief Description and activation file for the module Stripe */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -72,7 +72,7 @@ class modStripe extends DolibarrModules $this->hidden = false; // A condition to hide module $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(5, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("stripe"); @@ -93,25 +93,26 @@ class modStripe extends DolibarrModules // Main menu entries $r = 0; /* $this->menu[$r]=array( - 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'mainmenu'=>'billing', - 'leftmenu'=>'customers_bills_payment_stripe', - 'type'=>'left', // This is a Left menu entry - 'titre'=>'StripeImportPayment', - 'url'=>'/stripe/importpayments.php', - 'langs'=>'stripe', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>500, - 'enabled'=>'$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->banque->modifier', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2 - ); // 0=Menu for internal users, 1=external users, 2=both - $r++;*/ + 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'mainmenu'=>'billing', + 'leftmenu'=>'customers_bills_payment_stripe', + 'type'=>'left', // This is a Left menu entry + 'titre'=>'StripeImportPayment', + 'url'=>'/stripe/importpayments.php', + 'langs'=>'stripe', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>500, + 'enabled'=>'$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 2', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->banque->modifier', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2 + ); // 0=Menu for internal users, 1=external users, 2=both + $r++;*/ $this->menu[$r] = array( 'fk_menu'=>'fk_mainmenu=bank', 'type'=>'left', 'titre'=>'StripeAccount', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'bank', 'leftmenu'=>'stripe', 'url' => '', diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php index 6074966b4b1..4a0fc21fa44 100644 --- a/htdocs/core/modules/modSupplierProposal.class.php +++ b/htdocs/core/modules/modSupplierProposal.class.php @@ -26,7 +26,7 @@ * * \file htdocs/core/modules/modSupplierProposal.class.php * \ingroup supplier_proposal - * \brief File to describe and activate module SupplierProposal + * \brief Description and activation file for the module supplier proposal */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -70,7 +70,7 @@ class modSupplierProposal extends DolibarrModules $this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("supplier_proposal"); // Constants @@ -141,7 +141,7 @@ class modSupplierProposal extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'cloturer'; - // Main menu entries + // Main menu entries $this->menu = array(); // List of menus to add $r = 0; } @@ -167,13 +167,11 @@ class modSupplierProposal extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_proposals'; $dest = $dirodt.'/template_supplier_proposal.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index 01079310e4b..1d85dc2115d 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -21,7 +21,7 @@ * \brief Module pour gerer les messages d'erreur dans syslog * \file htdocs/core/modules/modSyslog.class.php * \ingroup syslog - * \brief Fichier de description et activation du module de syslog + * \brief Description and activation file for the module syslog */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -71,7 +71,7 @@ class modSyslog extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Constants $this->const = array(); diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index e8162ebf570..d34213f062c 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -22,7 +22,7 @@ * * \file htdocs/core/modules/modTakePos.class.php * \ingroup takepos - * \brief Description and activation file for module TakePos + * \brief Description and activation file for the module TakePos */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -102,7 +102,7 @@ class modTakePos extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->langfiles = array("cashdesk"); - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(4, 0); // Minimum version of Dolibarr required by module $this->warnings_activation = array('FR'=>'WarningNoteModulePOSForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text') $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -119,8 +119,7 @@ class modTakePos extends DolibarrModules ); - if (!isset($conf->takepos) || !isset($conf->takepos->enabled)) - { + if (!isset($conf->takepos) || !isset($conf->takepos->enabled)) { $conf->takepos = new stdClass(); $conf->takepos->enabled = 0; } @@ -158,19 +157,19 @@ class modTakePos extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@takepos', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->takepos->enabled,$conf->takepos->enabled,$conf->takepos->enabled) // Condition to show each dictionary - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@takepos', + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor + 'tablib'=>array("Table1","Table2","Table3"), // Label of tables + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order + 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) + 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') + 'tabcond'=>array($conf->takepos->enabled,$conf->takepos->enabled,$conf->takepos->enabled) // Condition to show each dictionary + ); + */ // Boxes/Widgets @@ -217,6 +216,7 @@ class modTakePos extends DolibarrModules 'titre'=>'PointOfSaleShort', 'mainmenu'=>'takepos', 'leftmenu'=>'', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'url'=>'/takepos/index.php', 'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>1000 + $r, diff --git a/htdocs/core/modules/modTax.class.php b/htdocs/core/modules/modTax.class.php index 3e2a62e099a..222b1c775c1 100644 --- a/htdocs/core/modules/modTax.class.php +++ b/htdocs/core/modules/modTax.class.php @@ -25,7 +25,7 @@ * \brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales * \file htdocs/core/modules/modTax.class.php * \ingroup tax - * \brief Fichier de description et activation du module Taxe + * \brief Description and activation file for the module taxes */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -71,7 +71,7 @@ class modTax extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("compta", "bills"); // Constants diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 7746bf9ca52..b374000c74c 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -22,7 +22,7 @@ * \brief Module for ticket and request management. * \file core/modules/modTicket.class.php * \ingroup ticket - * \brief Description and activation file for module Ticket + * \brief Description and activation file for the module Ticket */ require_once DOL_DOCUMENT_ROOT."/core/modules/DolibarrModules.class.php"; @@ -96,7 +96,7 @@ class modTicket extends DolibarrModules $this->depends = array('modAgenda'); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("ticket"); // Constants @@ -127,23 +127,32 @@ class modTicket extends DolibarrModules 'tabsql' => array( 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f', - 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', + 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.public FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f' ), 'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC", "pos ASC"), - 'tabfield' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default"), - 'tabfieldvalue' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default"), - 'tabfieldinsert' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default"), + 'tabfield' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public", "code,label,pos,use_default"), + 'tabfieldvalue' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public", "code,label,pos,use_default"), + 'tabfieldinsert' => array("code,label,pos,use_default", "code,label,pos,use_default", "code,label,pos,use_default,public", "code,label,pos,use_default"), 'tabrowid' => array("rowid", "rowid", "rowid", "rowid"), 'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled), - 'tabhelp' => array(array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"))), + 'tabhelp' => array( + array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), + array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), + array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"), 'public'=>$langs->trans("Enter0or1").'
    '.$langs->trans("TicketGroupIsPublicDesc")), + array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")) + ), ); // Boxes // Add here list of php file(s) stored in core/boxes that contains class to show a box. $this->boxes = array( 0=>array('file'=>'box_last_ticket.php', 'enabledbydefaulton'=>'Home'), - 1=>array('file'=>'box_last_modified_ticket.php', 'enabledbydefaulton'=>'Home') + 1=>array('file'=>'box_last_modified_ticket.php', 'enabledbydefaulton'=>'Home'), + 2=>array('file'=>'box_ticket_by_severity.php', 'enabledbydefaulton'=>'ticketindex'), + 3=>array('file'=>'box_nb_ticket_last_x_days.php', 'enabledbydefaulton'=>'ticketindex'), + 4=>array('file'=>'box_nb_tickets_type.php', 'enabledbydefaulton'=>'ticketindex'), + 5=>array('file'=>'box_new_vs_close_ticket.php', 'enabledbydefaulton'=>'ticketindex') ); // Boxes list // Permissions @@ -194,6 +203,7 @@ class modTicket extends DolibarrModules $this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu 'type' => 'top', // This is a Top menu entry 'titre' => 'Ticket', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'), 'mainmenu' => 'ticket', 'leftmenu' => '1', // Use 1 if you also want to add left menu entries using this descriptor. 'url' => '/ticket/index.php', @@ -208,6 +218,7 @@ class modTicket extends DolibarrModules $this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket', 'type' => 'left', 'titre' => 'Ticket', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'), 'mainmenu' => 'ticket', 'leftmenu' => 'ticket', 'url' => '/ticket/index.php', @@ -294,13 +305,11 @@ class modTicket extends DolibarrModules $dirodt = DOL_DATA_ROOT.'/doctemplates/tickets'; $dest = $dirodt.'/template_order.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 4b397df65e4..01303892435 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -22,7 +22,7 @@ * \brief Module pour gerer les utilisateurs * \file htdocs/core/modules/modUser.class.php * \ingroup user - * \brief Fichier de description et activation du module Utilisateur + * \brief Description and activation file for the module users */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,7 +68,7 @@ class modUser extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("main", "users", "companies", "members", "salaries", "hrm"); $this->always_enabled = true; // Can't be disabled @@ -78,7 +78,8 @@ class modUser extends DolibarrModules // Boxes $this->boxes = array( 0=>array('file'=>'box_lastlogin.php', 'enabledbydefaulton'=>'Home'), - 1=>array('file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home') + 1=>array('file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home'), + 2=>array('file'=>'box_dolibarr_state_board.php', 'enabledbydefaulton'=>'Home') ); // Permissions @@ -230,7 +231,8 @@ class modUser extends DolibarrModules 'u.birth'=>'DateOfBirth', 'u.datec'=>"DateCreation", 'u.tms'=>"DateLastModification", 'u.admin'=>"Administrator", 'u.statut'=>'Status', 'u.datelastlogin'=>'LastConnexion', 'u.datepreviouslogin'=>'PreviousConnexion', - 'u.fk_socpeople'=>"IdContact", 'u.fk_soc'=>"IdCompany", 'u.fk_member'=>"MemberId" + 'u.fk_socpeople'=>"IdContact", 'u.fk_soc'=>"IdCompany", 'u.fk_member'=>"MemberId", + 'g.nom'=>"Group" ); $this->export_TypeFields_array[$r] = array( 'u.rowid'=>'Numeric', 'u.login'=>"Text", 'u.lastname'=>"Text", 'u.firstname'=>"Text", 'u.employee'=>'Boolean', 'u.job'=>'Text', @@ -240,7 +242,8 @@ class modUser extends DolibarrModules 'u.email'=>'Text', 'u.datec'=>"Date", 'u.tms'=>"Date", 'u.admin'=>"Boolean", 'u.statut'=>'Status', 'u.note'=>"Text", 'u.datelastlogin'=>'Date', 'u.fk_user'=>"List:user:login", 'u.birth'=>'Date', - 'u.datepreviouslogin'=>'Date', 'u.fk_soc'=>"List:societe:nom:rowid", 'u.fk_member'=>"List:adherent:firstname" + 'u.datepreviouslogin'=>'Date', 'u.fk_soc'=>"List:societe:nom:rowid", 'u.fk_member'=>"List:adherent:firstname", + 'g.nom'=>"Text" ); $this->export_entities_array[$r] = array( 'u.rowid'=>"user", 'u.login'=>"user", 'u.lastname'=>"user", 'u.firstname'=>"user", 'u.employee'=>'user', 'u.job'=>'user', 'u.gender'=>'user', @@ -253,18 +256,22 @@ class modUser extends DolibarrModules 'u.birth'=>'user', 'u.datec'=>"user", 'u.tms'=>"user", 'u.admin'=>"user", 'u.statut'=>'user', 'u.datelastlogin'=>'user', 'u.datepreviouslogin'=>'user', - 'u.fk_socpeople'=>"contact", 'u.fk_soc'=>"company", 'u.fk_member'=>"member" + 'u.fk_socpeople'=>"contact", 'u.fk_soc'=>"company", 'u.fk_member'=>"member", + 'g.nom'=>"Group" ); - $keyforselect = 'user'; $keyforelement = 'user'; $keyforaliasextra = 'extra'; + $keyforselect = 'user'; + $keyforelement = 'user'; + $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; - if (empty($conf->adherent->enabled)) - { + if (empty($conf->adherent->enabled)) { unset($this->export_fields_array[$r]['u.fk_member']); unset($this->export_entities_array[$r]['u.fk_member']); } $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'user as u'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user_extrafields as extra ON u.rowid = extra.fk_object'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'usergroup_user as ug ON u.rowid = ug.fk_user'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'usergroup as g ON ug.fk_usergroup = g.rowid'; $this->export_sql_end[$r] .= ' WHERE u.entity IN ('.getEntity('user').')'; // Imports @@ -293,10 +300,8 @@ class modUser extends DolibarrModules // Add extra fields $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")"; $resql = $this->db->query($sql); - if ($resql) // This can fail when class is used on old database (during migration for example) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { // This can fail when class is used on old database (during migration for example) + while ($obj = $this->db->fetch_object($resql)) { $fieldname = 'extra.'.$obj->name; $fieldlabel = ucfirst($obj->label); $this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : ''); diff --git a/htdocs/core/modules/modVariants.class.php b/htdocs/core/modules/modVariants.class.php index 72b29230def..a6c88afc03d 100644 --- a/htdocs/core/modules/modVariants.class.php +++ b/htdocs/core/modules/modVariants.class.php @@ -24,6 +24,7 @@ * \brief Module to manage product combinations based on product attributes * \file htdocs/core/modules/modVariants.class.php * \ingroup produit + * \brief Description and activation file for the module product variants */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -83,7 +84,7 @@ class modVariants extends DolibarrModules $this->depends = array('modProduct'); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("products"); @@ -96,8 +97,7 @@ class modVariants extends DolibarrModules ); // Dictionaries - if (!isset($conf->mymodule->enabled)) - { + if (!isset($conf->mymodule->enabled)) { $conf->mymodule = new stdClass(); $conf->mymodule->enabled = 0; } diff --git a/htdocs/core/modules/modWebServices.class.php b/htdocs/core/modules/modWebServices.class.php index e61ed5dc689..a88db3dee26 100644 --- a/htdocs/core/modules/modWebServices.class.php +++ b/htdocs/core/modules/modWebServices.class.php @@ -20,7 +20,7 @@ * \brief Module to enable the Dolibarr server of web services * \file htdocs/core/modules/modWebServices.class.php * \ingroup webservices - * \brief File to describe webservices module + * \brief Description and activation file for the module webservices */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -63,7 +63,7 @@ class modWebServices extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("other"); // Constants diff --git a/htdocs/core/modules/modWebServicesClient.class.php b/htdocs/core/modules/modWebServicesClient.class.php index 52a8889fbbb..d44d48ef13a 100644 --- a/htdocs/core/modules/modWebServicesClient.class.php +++ b/htdocs/core/modules/modWebServicesClient.class.php @@ -20,7 +20,7 @@ * \brief Module to enable client for supplier WebServices * \file htdocs/core/modules/modWebServicesClient.class.php * \ingroup webservices - * \brief File to describe client for supplier webservices module + * \brief Description and activation file for the module supplier webservices module */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -63,7 +63,7 @@ class modWebServicesClient extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("other"); // Constants diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index c452ed9ded2..c4abadcd870 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -20,7 +20,7 @@ * \brief website module descriptor. * \file htdocs/core/modules/modWebsite.class.php * \ingroup websites - * \brief Description and activation file for module Website + * \brief Description and activation file for the module Website */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -68,14 +68,14 @@ class modWebsite extends DolibarrModules $this->depends = array('modFckeditor'); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->langfiles = array("website"); // Constants - $this->const = array(); + $this->const = array(); // New pages on tabs - //$this->tabs[] = array(); // To add a new tab identified by code tabname1 + //$this->tabs[] = array(); // To add a new tab identified by code tabname1 // Boxes $this->boxes = array(); @@ -109,11 +109,18 @@ class modWebsite extends DolibarrModules $this->rights[$r][4] = 'delete'; $r++; + $this->rights[$r][0] = 10008; + $this->rights[$r][1] = 'Export website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; + $r++; + // Main menu entries $r = 0; $this->menu[$r] = array('fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'top', // This is a Left menu entry 'titre'=>'WebSites', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'), 'mainmenu'=>'website', 'url'=>'/website/index.php', 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. @@ -129,8 +136,11 @@ class modWebsite extends DolibarrModules $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'MyWebsitePages'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r] = array(array("website", "export")); $this->export_icon[$r] = 'globe'; - $keyforclass = 'WebsitePage'; $keyforclassfile = '/website/class/websitepage.class.php'; $keyforelement = 'Website'; + $keyforclass = 'WebsitePage'; + $keyforclassfile = '/website/class/websitepage.class.php'; + $keyforelement = 'Website'; include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; //$keyforselect='myobject'; $keyforelement='myobject'; $keyforaliasextra='extra'; //include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; @@ -159,18 +169,15 @@ class modWebsite extends DolibarrModules // Copy flags and octicons directory $dirarray = array('common/flags'=>'flags', 'common/octicons/build/svg'=>'octicons'); - foreach ($dirarray as $dirfrom => $dirtarget) - { + foreach ($dirarray as $dirfrom => $dirtarget) { $src = DOL_DOCUMENT_ROOT.'/theme/'.$dirfrom; $dest = DOL_DATA_ROOT.'/medias/image/'.$dirtarget; - if (is_dir($src)) - { + if (is_dir($src)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dest); $result = dolCopyDir($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyDir', $src, $dest); return 0; diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php index c7bd464b9d1..fbf7927ed1c 100644 --- a/htdocs/core/modules/modWorkflow.class.php +++ b/htdocs/core/modules/modWorkflow.class.php @@ -21,7 +21,7 @@ * \brief Workflow management * \file htdocs/core/modules/modWorkflow.class.php * \ingroup workflow - * \brief File to describe and activate module Workflow + * \brief Description and activation file for the module Workflow */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -51,7 +51,7 @@ class modWorkflow extends DolibarrModules // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) - $this->description = "Workflow management"; + $this->description = "Inter-modules workflow management"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) @@ -72,7 +72,7 @@ class modWorkflow extends DolibarrModules $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with - $this->phpmin = array(5, 4); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(2, 8); // Minimum version of Dolibarr required by module $this->langfiles = array("@workflow"); @@ -101,44 +101,44 @@ class modWorkflow extends DolibarrModules $r = 0; /* - $r++; - $this->rights[$r][0] = 6001; // id de la permission - $this->rights[$r][1] = "Lire les workflow"; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'read'; - */ + $r++; + $this->rights[$r][0] = 6001; // id de la permission + $this->rights[$r][1] = "Lire les workflow"; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'read'; + */ // Main menu entries $this->menus = array(); // List of menus to add $r = 0; /* - $this->menu[$r]=array('fk_menu'=>0, - 'type'=>'top', - 'titre'=>'Workflow', - 'mainmenu'=>'workflow', - 'url'=>'/workflow/index.php', - 'langs'=>'@workflow', - 'position'=>100, - 'perms'=>'$user->rights->workflow->read', - 'enabled'=>'$conf->workflow->enabled', - 'target'=>'', - 'user'=>0); - $r++; + $this->menu[$r]=array('fk_menu'=>0, + 'type'=>'top', + 'titre'=>'Workflow', + 'mainmenu'=>'workflow', + 'url'=>'/workflow/index.php', + 'langs'=>'@workflow', + 'position'=>100, + 'perms'=>'$user->rights->workflow->read', + 'enabled'=>'$conf->workflow->enabled', + 'target'=>'', + 'user'=>0); + $r++; - $this->menu[$r]=array( 'fk_menu'=>'r=0', - 'type'=>'left', - 'titre'=>'Workflow', - 'mainmenu'=>'workflow', - 'url'=>'/workflow/index.php', - 'langs'=>'@workflow', - 'position'=>101, - 'enabled'=>1, - 'perms'=>'$user->rights->workflow->read', - 'target'=>'', - 'user'=>0); - $r++; - */ + $this->menu[$r]=array( 'fk_menu'=>'r=0', + 'type'=>'left', + 'titre'=>'Workflow', + 'mainmenu'=>'workflow', + 'url'=>'/workflow/index.php', + 'langs'=>'@workflow', + 'position'=>101, + 'enabled'=>1, + 'perms'=>'$user->rights->workflow->read', + 'target'=>'', + 'user'=>0); + $r++; + */ } diff --git a/htdocs/core/modules/modWorkstation.class.php b/htdocs/core/modules/modWorkstation.class.php new file mode 100755 index 00000000000..b0fae39bb52 --- /dev/null +++ b/htdocs/core/modules/modWorkstation.class.php @@ -0,0 +1,523 @@ + + * Copyright (C) 2018-2019 Nicolas ZABOURI + * Copyright (C) 2019-2020 Frédéric France + * Copyright (C) 2020 Gauthier VERDOL + * + * 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 . + */ + +/** + * \defgroup workstation Module Workstation + * \brief Workstation module descriptor. + * + * \file htdocs/workstation/core/modules/modWorkstation.class.php + * \ingroup workstation + * \brief Description and activation file for the module Workstation + */ +include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; + +/** + * Description and activation class for module Workstation + */ +class modWorkstation extends DolibarrModules +{ + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + global $langs, $conf; + $this->db = $db; + + // Id for module (must be unique). + // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). + $this->numero = 690; + // Key text used to identify module (for permissions, menus, etc...) + $this->rights_class = 'workstation'; + // Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...' + // It is used to group modules by family in module setup page + $this->family = "products"; + // Module position in the family on 2 digits ('01', '10', '20', ...) + $this->module_position = '90'; + // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) + //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); + // Module label (no space allowed), used if translation string 'ModuleWorkstationName' not found (Workstation is name of module). + $this->name = preg_replace('/^mod/i', '', get_class($this)); + // Module description, used if translation string 'ModuleWorkstationDesc' not found (Workstation is name of module). + $this->description = "WorkstationsDescription"; + // Used only if file README.md and README-LL.md not found. + $this->descriptionlong = "WorkstationsDescription"; + // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' + $this->version = 'development'; + // Url to the file with your last numberversion of this module + //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; + + // Key used in llx_const table to save module status enabled/disabled (where WORKSTATION is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + // Name of image file used for this module. + // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' + // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' + $this->picto = 'workstation'; + // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) + $this->module_parts = array( + // Set this to 1 if module has its own trigger directory (core/triggers) + 'triggers' => 0, + // Set this to 1 if module has its own login method file (core/login) + 'login' => 0, + // Set this to 1 if module has its own substitution function file (core/substitutions) + 'substitutions' => 0, + // Set this to 1 if module has its own menus handler directory (core/menus) + 'menus' => 0, + // Set this to 1 if module overwrite template dir (core/tpl) + 'tpl' => 0, + // Set this to 1 if module has its own barcode directory (core/modules/barcode) + 'barcode' => 0, + // Set this to 1 if module has its own models directory (core/modules/xxx) + 'models' => 1, + // Set this to 1 if module has its own printing directory (core/modules/printing) + 'printing' => 0, + // Set this to 1 if module has its own theme directory (theme) + 'theme' => 0, + // Set this to relative path of css file if module has its own css file + 'css' => array( + // '/workstation/css/workstation.css.php', + ), + // Set this to relative path of js file if module must load a js on all pages + 'js' => array( + // '/workstation/js/workstation.js.php', + ), + // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all' + 'hooks' => array( + // 'data' => array( + // 'hookcontext1', + // 'hookcontext2', + // ), + // 'entity' => '0', + ), + // Set this to 1 if features of module are opened to external users + 'moduleforexternal' => 0, + ); + // Data directories to create when module is enabled. + // Example: this->dirs = array("/workstation/temp","/workstation/subdir"); + $this->dirs = array("/workstation/temp"); + // Config pages. Put here list of php page, stored into workstation/admin directory, to use to setup module. + $this->config_page_url = array("workstation.php"); + // Dependencies + // A condition to hide module + $this->hidden = false; + // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...) + $this->depends = array(); + $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) + $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) + $this->langfiles = array("mrp"); + $this->phpmin = array(5, 6); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module + $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) + //$this->automatic_activation = array('FR'=>'WorkstationWasAutomaticallyActivatedBecauseOfYourCountryChoice'); + //$this->always_enabled = true; // If true, can't be disabled + + // Constants + // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive) + // Example: $this->const=array(1 => array('WORKSTATION_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1), + // 2 => array('WORKSTATION_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1) + // ); + $this->const = array(); + + // Some keys to add into the overwriting translation tables + /*$this->overwrite_translation = array( + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ + + if (!isset($conf->workstation) || !isset($conf->workstation->enabled)) { + $conf->workstation = new stdClass(); + $conf->workstation->enabled = 0; + } + + // Array to add new pages in new tabs + $this->tabs = array(); + // Example: + // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@workstation:$user->rights->workstation->read:/workstation/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 + // $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@workstation:$user->rights->othermodule->read:/workstation/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key. + // $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname + // + // Where objecttype can be + // 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member) + // 'contact' to add a tab in contact view + // 'contract' to add a tab in contract view + // 'group' to add a tab in group view + // 'intervention' to add a tab in intervention view + // 'invoice' to add a tab in customer invoice view + // 'invoice_supplier' to add a tab in supplier invoice view + // 'member' to add a tab in fundation member view + // 'opensurveypoll' to add a tab in opensurvey poll view + // 'order' to add a tab in customer order view + // 'order_supplier' to add a tab in supplier order view + // 'payment' to add a tab in payment view + // 'payment_supplier' to add a tab in supplier payment view + // 'product' to add a tab in product view + // 'propal' to add a tab in propal view + // 'project' to add a tab in project view + // 'stock' to add a tab in stock view + // 'thirdparty' to add a tab in third party view + // 'user' to add a tab in user view + + // Dictionaries + $this->dictionaries = array(); + /* Example: + $this->dictionaries=array( + 'langs'=>'workstation@workstation', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1", MAIN_DB_PREFIX."table2", MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1", "Table2", "Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC", "label ASC", "label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label", "code,label", "code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label", "code,label", "code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid", "rowid", "rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->workstation->enabled, $conf->workstation->enabled, $conf->workstation->enabled) + ); + */ + + // Boxes/Widgets + // Add here list of php file(s) stored in workstation/core/boxes that contains a class to show a widget. + $this->boxes = array( + // 0 => array( + // 'file' => 'workstationwidget1.php@workstation', + // 'note' => 'Widget provided by Workstation', + // 'enabledbydefaulton' => 'Home', + // ), + // ... + ); + + // Cronjobs (List of cron jobs entries to add when module is enabled) + // unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week + $this->cronjobs = array( + // 0 => array( + // 'label' => 'MyJob label', + // 'jobtype' => 'method', + // 'class' => '/workstation/class/workstation.class.php', + // 'objectname' => 'Workstation', + // 'method' => 'doScheduledJob', + // 'parameters' => '', + // 'comment' => 'Comment', + // 'frequency' => 2, + // 'unitfrequency' => 3600, + // 'status' => 0, + // 'test' => '$conf->workstation->enabled', + // 'priority' => 50, + // ), + ); + // Example: $this->cronjobs=array( + // 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>'$conf->workstation->enabled', 'priority'=>50), + // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>'$conf->workstation->enabled', 'priority'=>50) + // ); + + // Permissions provided by this module + $this->rights = array(); + $r = 1; + // Add here entries to declare new permissions + /* BEGIN MODULEBUILDER PERMISSIONS */ + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Read objects of Workstation'; // Permission label + $this->rights[$r][4] = 'workstation'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Create/Update objects of Workstation'; // Permission label + $this->rights[$r][4] = 'workstation'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][1] = 'Delete objects of Workstation'; // Permission label + $this->rights[$r][4] = 'workstation'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->workstation->level1->level2) + $r++; + /* END MODULEBUILDER PERMISSIONS */ + + // Main menu entries to add + $this->menu = array(); + $r = 0; + // Add here entries to declare new menus + /* BEGIN MODULEBUILDER TOPMENU */ + /*$this->menu[$r++] = array( + 'fk_menu'=>'', // '' 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'=>'top', // This is a Top menu entry + 'titre'=>$langs->trans('GPAO'), + 'mainmenu'=>'gpao', + 'leftmenu'=>'', + 'url'=>'/workstation/workstationindex.php', + 'langs'=>'workstation@workstation', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000 + $r, + 'enabled'=>'$conf->workstation->enabled', // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. + 'perms'=>'1', // Use 'perms'=>'$user->rights->workstation->workstation->read' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + );*/ + /* END MODULEBUILDER TOPMENU */ + /* BEGIN MODULEBUILDER LEFTMENU WORKSTATION + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=workstation', // '' 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 Top menu entry + 'titre'=>'Workstation', + 'mainmenu'=>'workstation', + 'leftmenu'=>'workstation', + 'url'=>'/workstation/workstationindex.php', + 'langs'=>'workstation@workstation', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->workstation->enabled', // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. + 'perms'=>'$user->rights->workstation->workstation->read', // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=workstation,fk_leftmenu=workstation', // '' 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_Workstation', + 'mainmenu'=>'workstation', + 'leftmenu'=>'workstation_workstation_list', + 'url'=>'/workstation/workstation_list.php', + 'langs'=>'workstation@workstation', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->workstation->enabled', // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->workstation->workstation->read', // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + $this->menu[$r++]=array( + 'fk_menu'=>'fk_mainmenu=workstation,fk_leftmenu=workstation', // '' 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_Workstation', + 'mainmenu'=>'workstation', + 'leftmenu'=>'workstation_workstation_new', + 'url'=>'/workstation/workstation_card.php?action=create', + 'langs'=>'workstation@workstation', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>1000+$r, + 'enabled'=>'$conf->workstation->enabled', // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->workstation->workstation->write', // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); + */ + + $this->menu[$r++]=array( + // '' 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 + 'fk_menu'=>'fk_mainmenu=mrp', + // This is a Left menu entry + 'type'=>'left', + 'titre'=>$langs->trans('Workstations'), + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), + 'mainmenu'=>'mrp', + 'leftmenu'=>'workstation_workstation', + 'url'=>'', + // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'mrp', + 'position'=>1100+$r, + // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'enabled'=>'$conf->workstation->enabled', + // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'perms'=>'$user->rights->workstation->workstation->read', + 'target'=>'', + // 0=Menu for internal users, 1=external users, 2=both + 'user'=>2, + ); + $this->menu[$r++]=array( + // '' 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 + 'fk_menu'=>'fk_mainmenu=mrp,fk_leftmenu=workstation_workstation', + // This is a Left menu entry + 'type'=>'left', + 'titre'=>$langs->trans('WorkstationCreate'), + 'mainmenu'=>'mrp', + 'leftmenu'=>'workstation_workstation_left_create', + 'url'=>'/workstation/workstation_card.php?action=create', + // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'mrp', + 'position'=>1100+$r, + // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'enabled'=>'$conf->workstation->enabled', + // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'perms'=>'$user->rights->workstation->workstation->write', + 'target'=>'', + // 0=Menu for internal users, 1=external users, 2=both + 'user'=>2 + ); + $this->menu[$r++]=array( + // '' 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 + 'fk_menu'=>'fk_mainmenu=mrp,fk_leftmenu=workstation_workstation', + // This is a Left menu entry + 'type'=>'left', + 'titre'=>$langs->trans('List'), + 'mainmenu'=>'mrp', + 'leftmenu'=>'workstation_workstation_left_list', + 'url'=>'/workstation/workstation_list.php', + // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'mrp', + 'position'=>1101+$r, + // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'enabled'=>'$conf->workstation->enabled', + // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules + 'perms'=>'$user->rights->workstation->workstation->read', + 'target'=>'', + // 0=Menu for internal users, 1=external users, 2=both + 'user'=>2 + ); + + /* END MODULEBUILDER LEFTMENU WORKSTATION */ + // Exports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER EXPORT WORKSTATION */ + /* + $langs->load("workstation@workstation"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='WorkstationLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='workstation@workstation'; + // Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array + $keyforclass = 'Workstation'; $keyforclassfile='/workstation/class/workstation.class.php'; $keyforelement='workstation@workstation'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + //$this->export_fields_array[$r]['t.fieldtoadd']='FieldToAdd'; $this->export_TypeFields_array[$r]['t.fieldtoadd']='Text'; + //unset($this->export_fields_array[$r]['t.fieldtoremove']); + //$keyforclass = 'WorkstationLine'; $keyforclassfile='/workstation/class/workstation.class.php'; $keyforelement='workstationline@workstation'; $keyforalias='tl'; + //include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='workstation'; $keyforaliasextra='extra'; $keyforelement='workstation@workstation'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$keyforselect='workstationline'; $keyforaliasextra='extraline'; $keyforelement='workstationline@workstation'; + //include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r] = array('workstationline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + //$this->export_special_array[$r] = array('t.field'=>'...'); + //$this->export_examplevalues_array[$r] = array('t.field'=>'Example'); + //$this->export_help_array[$r] = array('t.field'=>'FieldDescHelp'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'workstation as t'; + //$this->export_sql_end[$r] =' LEFT JOIN '.MAIN_DB_PREFIX.'workstation_line as tl ON tl.fk_workstation = t.rowid'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('workstation').')'; + $r++; */ + /* END MODULEBUILDER EXPORT WORKSTATION */ + + // Imports profiles provided by this module + $r = 1; + /* BEGIN MODULEBUILDER IMPORT WORKSTATION */ + /* + $langs->load("workstation@workstation"); + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='WorkstationLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r]='workstation@workstation'; + $keyforclass = 'Workstation'; $keyforclassfile='/workstation/class/workstation.class.php'; $keyforelement='workstation@workstation'; + include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php'; + $keyforselect='workstation'; $keyforaliasextra='extra'; $keyforelement='workstation@workstation'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + //$this->export_dependencies_array[$r]=array('mysubobject'=>'ts.rowid', 't.myfield'=>array('t.myfield2','t.myfield3')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields) + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'workstation as t'; + $this->export_sql_end[$r] .=' WHERE 1 = 1'; + $this->export_sql_end[$r] .=' AND t.entity IN ('.getEntity('workstation').')'; + $r++; */ + /* END MODULEBUILDER IMPORT WORKSTATION */ + } + + /** + * Function called when module is enabled. + * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. + * It also creates data directories + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function init($options = '') + { + global $conf, $langs; + + $result = $this->_load_tables('/workstation/sql/'); + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } + + // Create extrafields during init + //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + //$extrafields = new ExtraFields($this->db); + //$result1=$extrafields->addExtraField('workstation_myattr1', "New Attr 1 label", 'boolean', 1, 3, 'thirdparty', 0, 0, '', '', 1, '', 0, 0, '', '', 'workstation@workstation', '$conf->workstation->enabled'); + //$result2=$extrafields->addExtraField('workstation_myattr2', "New Attr 2 label", 'varchar', 1, 10, 'project', 0, 0, '', '', 1, '', 0, 0, '', '', 'workstation@workstation', '$conf->workstation->enabled'); + //$result3=$extrafields->addExtraField('workstation_myattr3', "New Attr 3 label", 'varchar', 1, 10, 'bank_account', 0, 0, '', '', 1, '', 0, 0, '', '', 'workstation@workstation', '$conf->workstation->enabled'); + //$result4=$extrafields->addExtraField('workstation_myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'workstation@workstation', '$conf->workstation->enabled'); + //$result5=$extrafields->addExtraField('workstation_myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'workstation@workstation', '$conf->workstation->enabled'); + + // Permissions + $this->remove($options); + + $sql = array(); + + // Document templates + $moduledir = 'workstation'; + $myTmpObjects = array(); + $myTmpObjects['Workstation'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + + foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { + if ($myTmpObjectKey == 'Workstation') { + continue; + } + if ($myTmpObjectArray['includerefgeneration']) { + $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/workstation/template_workstations.odt'; + $dirodt = DOL_DATA_ROOT.'/doctemplates/workstation'; + $dest = $dirodt.'/template_workstations.odt'; + + if (file_exists($src) && !file_exists($dest)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_mkdir($dirodt); + $result = dol_copy($src, $dest, 0, 0); + if ($result < 0) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); + return 0; + } + } + + $sql = array_merge($sql, array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'standard_".strtolower($myTmpObjectKey)."' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('standard_".strtolower($myTmpObjectKey)."','".strtolower($myTmpObjectKey)."',".$conf->entity.")", + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'generic_".strtolower($myTmpObjectKey)."_odt' AND type = '".strtolower($myTmpObjectKey)."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('generic_".strtolower($myTmpObjectKey)."_odt', '".strtolower($myTmpObjectKey)."', ".$conf->entity.")" + )); + } + } + + return $this->_init($sql, $options); + } + + /** + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted + * + * @param string $options Options when enabling module ('', 'noboxes') + * @return int 1 if OK, 0 if KO + */ + public function remove($options = '') + { + $sql = array(); + return $this->_remove($sql, $options); + } +} diff --git a/htdocs/core/modules/modZapier.class.php b/htdocs/core/modules/modZapier.class.php index ee7589c6537..430622465ca 100644 --- a/htdocs/core/modules/modZapier.class.php +++ b/htdocs/core/modules/modZapier.class.php @@ -21,7 +21,7 @@ * * \file htdocs/core/modules/modZapier.class.php * \ingroup zapier - * \brief Description and activation file for module Zapier + * \brief Description and activation file for the module Zapier */ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php'; @@ -110,7 +110,7 @@ class modZapier extends DolibarrModules $this->dirs = array("/zapier/temp"); // Config pages. Put here list of php page, stored into zapier/admin directory, to use to setup module. $this->config_page_url = array( - // "setup.php@zapier" + "setup.php@zapier" ); // Dependencies // A condition to hide module @@ -123,7 +123,7 @@ class modZapier extends DolibarrModules $this->conflictwith = array(); $this->langfiles = array("zapier"); // Minimum version of PHP required by module - //$this->phpmin = array(5, 5); + //$this->phpmin = array(5, 6); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(10, 0); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) @@ -146,9 +146,9 @@ class modZapier extends DolibarrModules ); // Some keys to add into the overwriting translation tables /*$this->overwrite_translation = array( - 'en_US:ParentCompany'=>'Parent company or reseller', - 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' - )*/ + 'en_US:ParentCompany'=>'Parent company or reseller', + 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' + )*/ if (!isset($conf->zapier) || !isset($conf->zapier->enabled)) { $conf->zapier = new stdClass(); $conf->zapier->enabled = 0; @@ -183,28 +183,28 @@ class modZapier extends DolibarrModules // Dictionaries $this->dictionaries = array(); /* Example: - $this->dictionaries=array( - 'langs'=>'mylangfile@zapier', - // List of tables we want to see into dictonnary editor - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), - // Label of tables - 'tablib'=>array("Table1","Table2","Table3"), - // Request to select fields - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), - // Sort order - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), - // List of fields (result of select to show dictionary) - 'tabfield'=>array("code,label","code,label","code,label"), - // List of fields (list of fields to edit a record) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), - // List of fields (list of fields for insert) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), - // Name of columns with primary key (try to always name it 'rowid') - 'tabrowid'=>array("rowid","rowid","rowid"), - // Condition to show each dictionary - 'tabcond'=>array($conf->zapier->enabled,$conf->zapier->enabled,$conf->zapier->enabled) - ); - */ + $this->dictionaries=array( + 'langs'=>'mylangfile@zapier', + // List of tables we want to see into dictonnary editor + 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), + // Label of tables + 'tablib'=>array("Table1","Table2","Table3"), + // Request to select fields + 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), + // Sort order + 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), + // List of fields (result of select to show dictionary) + 'tabfield'=>array("code,label","code,label","code,label"), + // List of fields (list of fields to edit a record) + 'tabfieldvalue'=>array("code,label","code,label","code,label"), + // List of fields (list of fields for insert) + 'tabfieldinsert'=>array("code,label","code,label","code,label"), + // Name of columns with primary key (try to always name it 'rowid') + 'tabrowid'=>array("rowid","rowid","rowid"), + // Condition to show each dictionary + 'tabcond'=>array($conf->zapier->enabled,$conf->zapier->enabled,$conf->zapier->enabled) + ); + */ // Boxes/Widgets // Add here list of php file(s) stored in zapier/core/boxes that contains class to show a widget. $this->boxes = array( @@ -242,7 +242,7 @@ class modZapier extends DolibarrModules // Permission array used by this module $this->rights = array(); - $r = 0; + $r = 1; // Permission id (must not be already used) $this->rights[$r][0] = $this->numero + $r; // Permission label @@ -269,53 +269,6 @@ class modZapier extends DolibarrModules // Main menu entries $this->menu = array(); // List of menus to add $r = 0; - - // Add here entries to declare new menus - // $this->menu[$r++]=array( - // 'fk_menu' => '', // '' 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' => 'top', // This is a Top menu entry - // 'titre' => 'Zapier', - // 'mainmenu' => 'zapier', - // 'leftmenu' => '', - // 'url' => '/zapier/zapierindex.php', - // 'langs' => 'zapier@zapier', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - // 'position' => 1000+$r, - // 'enabled' => '$conf->zapier->enabled', // Define condition to show or hide menu entry. Use '$conf->zapier->enabled' if entry must be visible if module is enabled. - // 'perms' => '1', // Use 'perms'=>'$user->rights->zapier->level1->level2' if you want your menu with a permission rules - // 'target' => '', - // 'user' => 2, // 0=Menu for internal users, 1=external users, 2=both - // ); - - /* - $this->menu[$r++]=array( - 'fk_menu'=>'fk_mainmenu=zapier', // '' 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', - 'mainmenu'=>'zapier', - 'leftmenu'=>'zapier_myobject_list', - 'url'=>'/zapier/myobject_list.php', - 'langs'=>'zapier@zapier', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>1000+$r, - 'enabled'=>'$conf->zapier->enabled', // Define condition to show or hide menu entry. Use '$conf->zapier->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'1', // Use 'perms'=>'$user->rights->zapier->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both - ); - $this->menu[$r++]=array( - 'fk_menu'=>'fk_mainmenu=zapier,fk_leftmenu=zapier', // '' 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', - 'mainmenu'=>'zapier', - 'leftmenu'=>'zapier_myobject_new', - 'url'=>'/zapier/myobject_page.php?action=create', - 'langs'=>'zapier@zapier', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>1000+$r, - 'enabled'=>'$conf->zapier->enabled', // Define condition to show or hide menu entry. Use '$conf->zapier->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'1', // Use 'perms'=>'$user->rights->zapier->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both - ); - */ } /** @@ -329,7 +282,9 @@ class modZapier extends DolibarrModules public function init($options = '') { $result = $this->_load_tables('/zapier/sql/'); - if ($result < 0) return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') + if ($result < 0) { + return -1; // Do not activate module if not allowed errors found on module SQL queries (the _load_table run sql with run_sql with error allowed parameter to 'default') + } // Create extrafields //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index 5917cb85042..c2817fb50f6 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -144,7 +144,9 @@ class pdf_stdandard extends ModelePDFMovement // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->wref = 15; @@ -159,10 +161,11 @@ class pdf_stdandard extends ModelePDFMovement $this->posxdiscount = 167; $this->postotalht = 180; - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxtva = $this->posxup; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { + $this->posxtva = $this->posxup; + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -196,9 +199,13 @@ class pdf_stdandard extends ModelePDFMovement // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); @@ -233,10 +240,16 @@ class pdf_stdandard extends ModelePDFMovement $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); - 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; - if (!$sortfield) $sortfield = "m.datem"; - if (!$sortorder) $sortorder = "DESC"; + if (!$sortfield) { + $sortfield = "m.datem"; + } + if (!$sortorder) { + $sortorder = "DESC"; + } $pdluoid = GETPOST('pdluoid', 'int'); @@ -264,7 +277,9 @@ class pdf_stdandard extends ModelePDFMovement $sql .= " u.login, u.photo, u.lastname, u.firstname"; // Add fields from extrafields if (!empty($extrafields->attributes[$element]['label'])) { - foreach ($extrafields->attributes[$element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + foreach ($extrafields->attributes[$element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + } } // Add fields from hooks $parameters = array(); @@ -273,35 +288,65 @@ class pdf_stdandard extends ModelePDFMovement $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql .= " ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."stock_mouvement as m"; - 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 (m.rowid = ef.fk_object)"; + 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 (m.rowid = ef.fk_object)"; + } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product"; $sql .= " WHERE m.fk_product = p.rowid"; - if ($msid > 0) $sql .= " AND m.rowid = ".$msid; + if ($msid > 0) { + $sql .= " AND m.rowid = ".((int) $msid); + } $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; - if ($id > 0) $sql .= " AND e.rowid ='".$id."'"; - if ($month > 0) - { - if ($year > 0) + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; + } + if ($id > 0) { + $sql .= " AND e.rowid ='".$id."'"; + } + if ($month > 0) { + if ($year > 0) { $sql .= " AND m.datem BETWEEN '".$this->db->idate(dol_get_first_day($year, $month, false))."' AND '".$this->db->idate(dol_get_last_day($year, $month, false))."'"; - else $sql .= " AND date_format(m.datem, '%m') = '$month'"; - } elseif ($year > 0) - { + } else { + $sql .= " AND date_format(m.datem, '%m') = '$month'"; + } + } elseif ($year > 0) { $sql .= " AND m.datem BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; } - if ($idproduct > 0) $sql .= " AND p.rowid = ".((int) $idproduct); - if (!empty($search_ref)) $sql .= natural_search('m.rowid', $search_ref, 1); - if (!empty($search_movement)) $sql .= natural_search('m.label', $search_movement); - if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $search_inventorycode); - if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref); - if (!empty($search_product)) $sql .= natural_search('p.label', $search_product); - if ($search_warehouse > 0) $sql .= " AND e.rowid = ".((int) $this->db->escape($search_warehouse)); - if (!empty($search_user)) $sql .= natural_search('u.login', $search_user); - if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch); - if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1); - if ($search_type_mouvement > 0) $sql .= " AND m.type_mouvement = '".$this->db->escape($search_type_mouvement)."'"; + if ($idproduct > 0) { + $sql .= " AND p.rowid = ".((int) $idproduct); + } + if (!empty($search_ref)) { + $sql .= natural_search('m.rowid', $search_ref, 1); + } + if (!empty($search_movement)) { + $sql .= natural_search('m.label', $search_movement); + } + if (!empty($search_inventorycode)) { + $sql .= natural_search('m.inventorycode', $search_inventorycode); + } + if (!empty($search_product_ref)) { + $sql .= natural_search('p.ref', $search_product_ref); + } + if (!empty($search_product)) { + $sql .= natural_search('p.label', $search_product); + } + if ($search_warehouse > 0) { + $sql .= " AND e.rowid = ".((int) $this->db->escape($search_warehouse)); + } + if (!empty($search_user)) { + $sql .= natural_search('u.login', $search_user); + } + if (!empty($search_batch)) { + $sql .= natural_search('m.batch', $search_batch); + } + if ($search_qty != '') { + $sql .= natural_search('m.value', $search_qty, 1); + } + if ($search_type_mouvement > 0) { + $sql .= " AND m.type_mouvement = '".$this->db->escape($search_type_mouvement)."'"; + } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -311,45 +356,40 @@ class pdf_stdandard extends ModelePDFMovement $sql .= $this->db->order($sortfield, $sortorder); $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $this->db->query($sql); $nbtotalofrecords = $this->db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } } - if (empty($search_inventorycode)) $sql .= $this->db->plimit($limit + 1, $offset); + if (empty($search_inventorycode)) { + $sql .= $this->db->plimit($limit + 1, $offset); + } $resql = $this->db->query($sql); $nbtotalofrecords = $this->db->num_rows($result); /* - * END TODO - **/ + * END TODO + **/ //$nblines = count($object->lines); - if ($conf->stock->dir_output) - { - if ($resql) - { + if ($conf->stock->dir_output) { + if ($resql) { $product = new Product($this->db); $object = new Entrepot($this->db); - if ($idproduct > 0) - { + if ($idproduct > 0) { $product->fetch($idproduct); } - if ($id > 0 || $ref) - { + if ($id > 0 || $ref) { $result = $object->fetch($id, $ref); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db); } } @@ -360,22 +400,28 @@ class pdf_stdandard extends ModelePDFMovement $i = 0; $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; - if ($msid) $texte = $langs->trans('StockMovementForId', $msid); - else { + if ($msid) { + $texte = $langs->trans('StockMovementForId', $msid); + } else { $texte = $langs->trans("ListOfStockMovements"); - if ($id) $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + if ($id) { + $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + } } } // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->stock->dir_output."/movement"; $file = $dir."/SPECIMEN.pdf"; } else { $objectref = dol_sanitizeFileName($object->ref); - if (!empty($search_inventorycode)) $objectref .= "_".$id."_".$search_inventorycode; - if ($search_type_mouvement) $objectref .= "_".$search_type_mouvement; + if (!empty($search_inventorycode)) { + $objectref .= "_".$id."_".$search_inventorycode; + } + if ($search_type_mouvement) { + $objectref .= "_".$search_type_mouvement; + } $dir = $conf->stock->dir_output."/movement/".$objectref; $file = $dir."/".$objectref.".pdf"; } @@ -386,20 +432,16 @@ class pdf_stdandard extends ModelePDFMovement $productstatic = new Product($this->db); - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -417,15 +459,13 @@ class pdf_stdandard extends ModelePDFMovement $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 + 8; // Height reserved to output the footer (value include bottom margin) - if (class_exists('TCPDF')) - { + 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_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { + if (empty($conf->global->MAIN_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -439,14 +479,18 @@ class pdf_stdandard extends ModelePDFMovement $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -474,18 +518,15 @@ class pdf_stdandard extends ModelePDFMovement //dol_syslog('List products', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $nblines = $num; - for ($i = 0; $i < $nblines; $i++) - { + for ($i = 0; $i < $nblines; $i++) { $objp = $this->db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; @@ -493,10 +534,11 @@ class pdf_stdandard extends ModelePDFMovement $sql .= " LIMIT 1"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objtp = $this->db->fetch_object($result); - if ($objtp->label != '') $objp->produit = $objtp->label; + if ($objtp->label != '') { + $objp->produit = $objtp->label; + } } } @@ -516,8 +558,7 @@ class pdf_stdandard extends ModelePDFMovement $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -525,22 +566,26 @@ class pdf_stdandard extends ModelePDFMovement pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 4, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -557,7 +602,8 @@ class pdf_stdandard extends ModelePDFMovement // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -639,8 +685,7 @@ class pdf_stdandard extends ModelePDFMovement $nexY += 3.5; // Add space between lines // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -651,11 +696,9 @@ class pdf_stdandard extends ModelePDFMovement $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -664,12 +707,12 @@ class pdf_stdandard extends ModelePDFMovement $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -677,9 +720,13 @@ class pdf_stdandard extends ModelePDFMovement $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } @@ -710,8 +757,7 @@ class pdf_stdandard extends ModelePDFMovement dol_print_error($this->db); } - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -741,8 +787,7 @@ class pdf_stdandard extends ModelePDFMovement $tab_top = $tab_top_newpage + 21; // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -760,7 +805,9 @@ class pdf_stdandard extends ModelePDFMovement // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -771,14 +818,14 @@ class pdf_stdandard extends ModelePDFMovement $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -813,7 +860,9 @@ class pdf_stdandard extends ModelePDFMovement // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -822,14 +871,15 @@ class pdf_stdandard extends ModelePDFMovement $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -846,8 +896,7 @@ class pdf_stdandard extends ModelePDFMovement $pdf->SetTextColor(0, 0, 120); //Ref mouv - if (empty($hidetop)) - { + if (empty($hidetop)) { //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxidref, $tab_top + 1); $pdf->MultiCell($this->posxdatemouv - $this->posxdatemouv - 0.8, 3, $outputlangs->transnoentities("Ref"), '', 'L'); @@ -855,64 +904,56 @@ class pdf_stdandard extends ModelePDFMovement //Date mouv //$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdatemouv, $tab_top + 1); $pdf->MultiCell($this->posxdesc - $this->posxdatemouv, 2, $outputlangs->transnoentities("Date"), '', 'C'); } //Ref Product //$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell($this->posxlabel - $this->posxdesc, 2, $outputlangs->transnoentities("Ref. Product"), '', 'C'); } //Label Product //$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxlabel - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxlabel, 2, $outputlangs->transnoentities("Label"), '', 'C'); } //Lot/serie Product //$pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxqty, 2, $outputlangs->transnoentities("Lot/Série"), '', 'C'); } //Code Inv //$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxup, 2, $outputlangs->transnoentities("Inventory Code"), '', 'C'); } //Label mouvement //$pdf->line($this->posxunit, $tab_top, $this->posxunit, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxunit, $tab_top + 1); $pdf->MultiCell($this->posxdiscount - $this->posxunit, 2, $outputlangs->transnoentities("Label Mouvement"), '', 'C'); } //Origin //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount + 2, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount - 0.8, 2, $outputlangs->transnoentities("Origin"), '', 'C'); } //Qty //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht + 2, $tab_top + 1); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } @@ -943,14 +984,16 @@ class pdf_stdandard extends ModelePDFMovement $default_font_size = pdf_getPDFFontSize($outputlangs); - if ($object->type == 1) $titlekey = 'ServiceSheet'; - else $titlekey = 'StockSheet'; + if ($object->type == 1) { + $titlekey = 'ServiceSheet'; + } else { + $titlekey = 'StockSheet'; + } pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -964,10 +1007,8 @@ class pdf_stdandard extends ModelePDFMovement // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1015,8 +1056,7 @@ class pdf_stdandard extends ModelePDFMovement $posy += 4; $pdf->SetXY($posx - 50, $posy); $e = new MouvementStock($this->db); - if (!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) - { + if (!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { $pdf->MultiCell(150, 3, $e->label, '', 'R'); } else { $pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R'); @@ -1051,16 +1091,14 @@ class pdf_stdandard extends ModelePDFMovement $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " WHERE m.fk_entrepot = ".((int) $object->id); $resqlbis = $this->db->query($sql); - if ($resqlbis) - { + if ($resqlbis) { $obj = $this->db->fetch_object($resqlbis); $lastmovementdate = $this->db->jdate($obj->datem); } else { dol_print_error($this->db); } - if ($lastmovementdate) - { + if ($lastmovementdate) { $toWrite = dol_print_date($lastmovementdate, 'dayhour').' '; } else { $toWrite = $outputlangs->transnoentities("None"); @@ -1071,73 +1109,72 @@ class pdf_stdandard extends ModelePDFMovement /*if ($object->ref_client) - { - $posy+=5; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); - }*/ + { + $posy+=5; + $pdf->SetXY($posx,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); + }*/ /*$posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R'); - */ + $pdf->SetXY($posx,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R'); + */ // 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(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); - } - }*/ + 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(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); + } + }*/ $posy += 2; // Show list of linked objects //$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($showaddress) - { + if ($showaddress) { /* - // Sender properties - $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); + // Sender properties + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); - // Show sender - $posy=42; - $posx=$this->marge_gauche; - if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; - $hautcadre=40; + // Show sender + $posy=42; + $posx=$this->marge_gauche; + if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; + $hautcadre=40; - // Show sender frame - $pdf->SetTextColor(0,0,0); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->SetXY($posx,$posy-5); - $pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L'); - $pdf->SetXY($posx,$posy); - $pdf->SetFillColor(230,230,230); - $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0,0,60); + // Show sender frame + $pdf->SetTextColor(0,0,0); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->SetXY($posx,$posy-5); + $pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L'); + $pdf->SetXY($posx,$posy); + $pdf->SetFillColor(230,230,230); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0,0,60); - // Show sender name - $pdf->SetXY($posx+2,$posy+3); - $pdf->SetFont('','B', $default_font_size); - $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); - $posy=$pdf->getY(); + // Show sender name + $pdf->SetXY($posx+2,$posy+3); + $pdf->SetFont('','B', $default_font_size); + $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); + $posy=$pdf->getY(); - // Show sender information - $pdf->SetXY($posx+2,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); - */ + // Show sender information + $pdf->SetXY($posx+2,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); + */ } $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/movement/modules_movement.php b/htdocs/core/modules/movement/modules_movement.php index 80a61c75074..77ff0c42fab 100644 --- a/htdocs/core/modules/movement/modules_movement.php +++ b/htdocs/core/modules/movement/modules_movement.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/stock/modules_movement.php + * \file htdocs/core/modules/movement/modules_movement.php * \ingroup stock * \brief File with parent class for generating PDF of a stock movements */ @@ -50,11 +50,11 @@ abstract class ModelePDFMovement extends CommonDocGenerator global $conf; $type = 'movement'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 06e52390451..374ae5b4337 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -98,7 +98,9 @@ class doc_generic_mo_odt extends ModelePDFMo // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -129,17 +131,20 @@ class doc_generic_mo_odt extends ModelePDFMo $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MRP_MO_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -158,8 +163,7 @@ class doc_generic_mo_odt extends ModelePDFMo // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->MRP_MO_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->MRP_MO_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -167,14 +171,13 @@ class doc_generic_mo_odt extends ModelePDFMo $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } $texte .= ''; @@ -207,37 +210,34 @@ class doc_generic_mo_odt extends ModelePDFMo // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->mrp->dir_output) - { + if ($conf->mrp->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new MO($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -247,20 +247,19 @@ class doc_generic_mo_odt extends ModelePDFMo $dir = $conf->mrp->multidir_output[isset($object->entity) ? $object->entity : 1]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -270,10 +269,11 @@ class doc_generic_mo_odt extends ModelePDFMo //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -290,8 +290,7 @@ class doc_generic_mo_odt extends ModelePDFMo // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -303,7 +302,7 @@ class doc_generic_mo_odt extends ModelePDFMo $socobject = $object->contact; } else { $socobject = $object->thirdparty; - // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use + // 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 { @@ -322,8 +321,7 @@ class doc_generic_mo_odt extends ModelePDFMo // Line of free text $newfreetext = ''; $paramfreetext = 'MRP_MO_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -339,8 +337,7 @@ class doc_generic_mo_odt extends ModelePDFMo 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -355,8 +352,7 @@ class doc_generic_mo_odt extends ModelePDFMo // 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); } @@ -370,7 +366,9 @@ class doc_generic_mo_odt extends ModelePDFMo $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -379,19 +377,19 @@ class doc_generic_mo_odt extends ModelePDFMo $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -400,32 +398,26 @@ class doc_generic_mo_odt extends ModelePDFMo $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -433,8 +425,7 @@ class doc_generic_mo_odt extends ModelePDFMo } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -442,12 +433,10 @@ class doc_generic_mo_odt extends ModelePDFMo // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -479,8 +468,9 @@ class doc_generic_mo_odt extends ModelePDFMo $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index 610346c67e2..3d70ded1ba2 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -99,18 +99,17 @@ class mod_mo_advanced extends ModeleNumRefMos */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -132,8 +131,7 @@ class mod_mo_advanced extends ModeleNumRefMos // We get cursor rule $mask = $conf->global->MRP_MO_ADVANCED_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/mrp/mod_mo_standard.php b/htdocs/core/modules/mrp/mod_mo_standard.php index d4b54cb318b..d47b4eb708e 100644 --- a/htdocs/core/modules/mrp/mod_mo_standard.php +++ b/htdocs/core/modules/mrp/mod_mo_standard.php @@ -56,7 +56,7 @@ class mod_mo_standard extends ModeleNumRefMos public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -81,7 +81,8 @@ class mod_mo_standard extends ModeleNumRefMos { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -90,13 +91,14 @@ class mod_mo_standard extends ModeleNumRefMos $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -124,11 +126,13 @@ class mod_mo_standard extends ModeleNumRefMos $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_mo_standard::getNextValue", LOG_DEBUG); return -1; @@ -138,8 +142,11 @@ class mod_mo_standard extends ModeleNumRefMos $date = $object->date_creation; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_mo_standard::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/mrp/modules_mo.php b/htdocs/core/modules/mrp/modules_mo.php index 1ad6382051c..82a1a9f3b56 100644 --- a/htdocs/core/modules/mrp/modules_mo.php +++ b/htdocs/core/modules/mrp/modules_mo.php @@ -142,10 +142,18 @@ abstract class ModeleNumRefMos global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index c92cab93aa1..496a2c988fa 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -71,9 +71,10 @@ $credentials = new Credentials( ); $requestedpermissionsarray = array(); -if (GETPOST('state')) $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'user'. 'state' parameter is standard to retrieve some parameters back -if ($action != 'delete' && empty($requestedpermissionsarray)) -{ +if (GETPOST('state')) { + $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'user'. 'state' parameter is standard to retrieve some parameters back +} +if ($action != 'delete' && empty($requestedpermissionsarray)) { print 'Error, parameter state is not defined'; exit; } @@ -92,8 +93,7 @@ $langs->load("oauth"); * Actions */ -if ($action == 'delete') -{ +if ($action == 'delete') { $storage->clearToken('GitHub'); setEventMessages($langs->trans('TokenDeleted'), null, 'mesgs'); @@ -102,8 +102,7 @@ if ($action == 'delete') exit(); } -if (!empty($_GET['code'])) // We are coming from oauth provider page -{ +if (!empty($_GET['code'])) { // We are coming from oauth provider page // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) @@ -147,8 +146,7 @@ if (!empty($_GET['code'])) // We are coming from oauth provider page // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). - if (GETPOST('state')) - { + if (GETPOST('state')) { $url = $apiService->getAuthorizationUri(array('state'=>GETPOST('state'))); } else { $url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 0b76a8151cf..4f9fded878f 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -71,9 +71,10 @@ $credentials = new Credentials( ); $requestedpermissionsarray = array(); -if (GETPOST('state')) $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to store a hash value and can be used to retrieve some parameters back -if ($action != 'delete' && empty($requestedpermissionsarray)) -{ +if (GETPOST('state')) { + $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to store a hash value and can be used to retrieve some parameters back +} +if ($action != 'delete' && empty($requestedpermissionsarray)) { print 'Error, parameter state is not defined'; exit; } @@ -98,8 +99,7 @@ $langs->load("oauth"); */ -if ($action == 'delete') -{ +if ($action == 'delete') { $storage->clearToken('Google'); setEventMessages($langs->trans('TokenDeleted'), null, 'mesgs'); @@ -108,8 +108,7 @@ if ($action == 'delete') exit(); } -if (!empty($_GET['code'])) // We are coming from oauth provider page -{ +if (!empty($_GET['code'])) { // We are coming from oauth provider page dol_syslog("We are coming from the oauth provider page"); //llxHeader('',$langs->trans("OAuthSetup")); @@ -145,8 +144,7 @@ if (!empty($_GET['code'])) // We are coming from oauth provider page // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). - if (GETPOST('state')) - { + if (GETPOST('state')) { $url = $apiService->getAuthorizationUri(array('state'=>GETPOST('state'))); } else { $url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated diff --git a/htdocs/core/modules/oauth/index.html b/htdocs/core/modules/oauth/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index ef0496a8541..77ef3ebde1a 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -71,11 +71,13 @@ $credentials = new Credentials( ); $requestedpermissionsarray = array(); -if (GETPOST('state')) $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back +if (GETPOST('state')) { + $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back +} /*if ($action != 'delete' && empty($requestedpermissionsarray)) { - print 'Error, parameter state is not defined'; - exit; + print 'Error, parameter state is not defined'; + exit; }*/ //var_dump($requestedpermissionsarray);exit; @@ -96,8 +98,7 @@ $langs->load("oauth"); */ -if ($action == 'delete') -{ +if ($action == 'delete') { $storage->clearToken('StripeLive'); setEventMessages($langs->trans('TokenDeleted'), null, 'mesgs'); @@ -106,8 +107,7 @@ if ($action == 'delete') exit(); } -if (!empty($_GET['code'])) // We are coming from oauth provider page -{ +if (!empty($_GET['code'])) { // We are coming from oauth provider page // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) @@ -151,8 +151,7 @@ if (!empty($_GET['code'])) // We are coming from oauth provider page // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). - if (GETPOST('state')) - { + if (GETPOST('state')) { $url = $apiService->getAuthorizationUri(array('state'=>GETPOST('state'))); } else { //$url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index 46576b0547e..a31f0f43db4 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -71,11 +71,13 @@ $credentials = new Credentials( ); $requestedpermissionsarray = array(); -if (GETPOST('state')) $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back +if (GETPOST('state')) { + $requestedpermissionsarray = explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back +} /*if ($action != 'delete' && empty($requestedpermissionsarray)) { - print 'Error, parameter state is not defined'; - exit; + print 'Error, parameter state is not defined'; + exit; }*/ //var_dump($requestedpermissionsarray);exit; @@ -96,8 +98,7 @@ $langs->load("oauth"); */ -if ($action == 'delete') -{ +if ($action == 'delete') { $storage->clearToken('StripeTest'); setEventMessages($langs->trans('TokenDeleted'), null, 'mesgs'); @@ -106,8 +107,7 @@ if ($action == 'delete') exit(); } -if (!empty($_GET['code'])) // We are coming from oauth provider page -{ +if (!empty($_GET['code'])) { // We are coming from oauth provider page // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) @@ -151,8 +151,7 @@ if (!empty($_GET['code'])) // We are coming from oauth provider page // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). - if (GETPOST('state')) - { + if (GETPOST('state')) { $url = $apiService->getAuthorizationUri(array('state'=>GETPOST('state'))); } else { //$url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index b5452f994ee..10926805721 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -101,15 +101,14 @@ class mod_payment_ant extends ModeleNumRefPayments */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -131,8 +130,7 @@ class mod_payment_ant extends ModeleNumRefPayments // We get cursor rule $mask = $conf->global->PAYMENT_ANT_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 9cda63103e0..d3259db513c 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -63,7 +63,7 @@ class mod_payment_cicada extends ModeleNumRefPayments public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -88,7 +88,8 @@ class mod_payment_cicada extends ModeleNumRefPayments { global $conf, $langs, $db; - $payyymm = ''; $max = ''; + $payyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -97,13 +98,14 @@ class mod_payment_cicada extends ModeleNumRefPayments $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $payyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $payyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) - { + if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -131,11 +133,13 @@ class mod_payment_cicada extends ModeleNumRefPayments $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(__METHOD__, LOG_DEBUG); return -1; @@ -145,8 +149,11 @@ class mod_payment_cicada extends ModeleNumRefPayments $date = $object->datepaye; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/payment/modules_payment.php b/htdocs/core/modules/payment/modules_payment.php index ffc2ab81184..f19e80dd3d2 100644 --- a/htdocs/core/modules/payment/modules_payment.php +++ b/htdocs/core/modules/payment/modules_payment.php @@ -96,10 +96,16 @@ abstract class ModeleNumRefPayments global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/printing/index.html b/htdocs/core/modules/printing/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index 006156d37bf..41a87cb2704 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -90,7 +90,10 @@ class PrintingDriver global $langs; $langs->load("printing"); $transstring = "PrintingModuleDesc".$this->name; - if ($langs->trans($transstring) != $transstring) return $langs->trans($transstring); - else return $this->desc; + if ($langs->trans($transstring) != $transstring) { + return $langs->trans($transstring); + } else { + return $this->desc; + } } } diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 9560af284b7..ace8a5da188 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -173,11 +173,9 @@ class printing_printgcp extends PrintingDriver $endoflife = $token->getEndOfLife(); - if ($endoflife == $token::EOL_NEVER_EXPIRES) - { + if ($endoflife == $token::EOL_NEVER_EXPIRES) { $expiredat = $langs->trans("Never"); - } elseif ($endoflife == $token::EOL_UNKNOWN) - { + } elseif ($endoflife == $token::EOL_UNKNOWN) { $expiredat = $langs->trans("Unknown"); } else { $expiredat = dol_print_date($endoflife, "dayhour"); @@ -188,12 +186,12 @@ class printing_printgcp extends PrintingDriver $this->conf[] = array('varname'=>'TOKEN_EXPIRE_AT', 'info'=>($expiredat), 'type'=>'info'); } /* - if ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE)) { - $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); - $this->conf[] = array('varname'=>'DELETE_TOKEN', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'delete'); - } else { - $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); - }*/ + if ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE)) { + $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); + $this->conf[] = array('varname'=>'DELETE_TOKEN', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'delete'); + } else { + $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); + }*/ } else { $this->conf[] = array('varname'=>'PRINTGCP_INFO', 'info'=>'GoogleAuthNotConfigured', 'type'=>'info'); } @@ -225,8 +223,7 @@ class printing_printgcp extends PrintingDriver $html .= '
    '."\n"; $list = $this->getlistAvailablePrinters(); //$html.= ''; - foreach ($list['available'] as $printer_det) - { + foreach ($list['available'] as $printer_det) { $html .= ''; $html .= ''; $html .= ''; @@ -237,10 +234,11 @@ class printing_printgcp extends PrintingDriver $html .= ''; // Defaut $html .= ''; $html .= ''."\n"; } @@ -338,15 +336,12 @@ class printing_printgcp extends PrintingDriver // select printer uri for module order, propal,... $sql = "SELECT rowid, printer_id, copy FROM ".MAIN_DB_PREFIX."printing WHERE module='".$this->db->escape($module)."' AND driver='printgcp' AND userid=".$user->id; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { $printer_id = $obj->printer_id; } else { - if (!empty($conf->global->PRINTING_GCP_DEFAULT)) - { + if (!empty($conf->global->PRINTING_GCP_DEFAULT)) { $printer_id = $conf->global->PRINTING_GCP_DEFAULT; } else { $this->errors[] = 'NoDefaultPrinterDefined'; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 5d840cb5ca3..b4d4c89b47f 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -143,7 +143,9 @@ class printing_printipp extends PrintingDriver $ipp->setUserName($this->userid); // Set default number of copy $ipp->setCopies(1); - if (!empty($this->user)) $ipp->setAuthentication($this->user, $this->password); + if (!empty($this->user)) { + $ipp->setAuthentication($this->user, $this->password); + } // select printer uri for module order, propal,... $sql = "SELECT rowid,printer_id,copy FROM ".MAIN_DB_PREFIX."printing WHERE module = '".$this->db->escape($module)."' AND driver = 'printipp' AND userid = ".$user->id; @@ -156,8 +158,7 @@ class printing_printipp extends PrintingDriver // Set number of copy $ipp->setCopies($obj->copy); } else { - if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) - { + if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) { dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT); $ipp->setPrinterURI($conf->global->PRINTIPP_URI_DEFAULT); } else { @@ -171,7 +172,9 @@ class printing_printipp extends PrintingDriver } $fileprint = $conf->{$module}->dir_output; - if ($subdir != '') $fileprint .= '/'.$subdir; + if ($subdir != '') { + $fileprint .= '/'.$subdir; + } $fileprint .= '/'.$file; $ipp->setData($fileprint); try { @@ -180,7 +183,9 @@ class printing_printipp extends PrintingDriver $this->errors[] = $e->getMessage(); $error++; } - if ($error == 0) $this->errors[] = 'PRINTIPP: Job added'; + if ($error == 0) { + $this->errors[] = 'PRINTIPP: Job added'; + } return $error; } diff --git a/htdocs/core/modules/printsheet/doc/index.html b/htdocs/core/modules/printsheet/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php index 0b4db8c2619..079b46003c4 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php @@ -80,48 +80,43 @@ class pdf_standardlabel extends CommonStickerGenerator // Define logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if (!is_readable($logo)) - { + if (!is_readable($logo)) { $logo = ''; - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) - { + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $logo = $conf->mycompany->dir_output.'/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)) { $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; } } // Define photo - if (!empty($photo)) - { - if (!is_readable($photo)) $photo = ''; + if (!empty($photo)) { + if (!is_readable($photo)) { + $photo = ''; + } } // Define background image $backgroundimage = ''; // Print lines - if ($this->code == "CARD") - { + if ($this->code == "CARD") { $this->Tformat = $this->_Avery_Labels["CARD"]; //$this->_Pointille($pdf,$_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.3,25); $this->_Croix($pdf, $_PosX, $_PosY, $_PosX + $this->_Width, $_PosY + $this->_Height, 0.1, 10); } // Background - if ($backgroundimage) - { + if ($backgroundimage) { $pdf->image($backgroundimage, $_PosX, $_PosY, $this->_Width, $this->_Height); } - $xleft = 2; $ytop = 2; + $xleft = 2; + $ytop = 2; // Top - if ($header != '') - { - if ($this->code == "CARD") - { + if ($header != '') { + if ($this->code == "CARD") { $pdf->SetDrawColor(128, 128, 128); $pdf->Line($_PosX, $_PosY + $this->_Line_Height + 1, $_PosX + $this->_Width, $_PosY + $this->_Line_Height + 1); // Only 1 mm and not ytop for top text $pdf->SetDrawColor(0, 0, 0); @@ -134,39 +129,50 @@ class pdf_standardlabel extends CommonStickerGenerator $ytop += (empty($header) ? 0 : (1 + $this->_Line_Height)); // Define widthtouse and heighttouse - $maxwidthtouse = round(($this->_Width - 2 * $xleft) * $imgscalewidth); $maxheighttouse = round(($this->_Height - 2 * $ytop) * $imgscaleheight); + $maxwidthtouse = round(($this->_Width - 2 * $xleft) * $imgscalewidth); + $maxheighttouse = round(($this->_Height - 2 * $ytop) * $imgscaleheight); $defaultratio = ($maxwidthtouse / $maxheighttouse); - $widthtouse = $maxwidthtouse; $heighttouse = 0; // old value for image + $widthtouse = $maxwidthtouse; + $heighttouse = 0; // old value for image $tmp = dol_getImageSize($photo, false); - if ($tmp['height']) - { + if ($tmp['height']) { $imgratio = $tmp['width'] / $tmp['height']; - if ($imgratio >= $defaultratio) { $widthtouse = $maxwidthtouse; $heighttouse = round($widthtouse / $imgratio); } else { $heightouse = $maxheighttouse; $widthtouse = round($heightouse * $imgratio); } + if ($imgratio >= $defaultratio) { + $widthtouse = $maxwidthtouse; + $heighttouse = round($widthtouse / $imgratio); + } else { + $heightouse = $maxheighttouse; + $widthtouse = round($heightouse * $imgratio); + } } //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; // Center - if ($textright == '') // Only a left part - { + if ($textright == '') { // Only a left part // Output left area - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - else { + if ($textleft == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft == '%PHOTO%' && $photo) { + $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } - } elseif ($textleft != '' && $textright != '') // - { - if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') - { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft != '' && $textright != '') { // + if ($textleft == '%LOGO%' || $textleft == '%PHOTO%') { + if ($textleft == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textleft == '%PHOTO%' && $photo) { + $pdf->Image($photo, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } $pdf->SetXY($_PosX + $xleft + $widthtouse + 1, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $xleft - $xleft - $widthtouse - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); - } elseif ($textright == '%LOGO%' || $textright == '%PHOTO%') - { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '%LOGO%' || $textright == '%PHOTO%') { + if ($textright == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '%PHOTO%' && $photo) { + $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $widthtouse - $xleft - $xleft - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } else // text on halft left and text on half right @@ -179,19 +185,19 @@ class pdf_standardlabel extends CommonStickerGenerator } else // Only a right part { // Output right area - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - elseif ($textright == '%PHOTO%' && $photo) $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); - else { + if ($textright == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } elseif ($textright == '%PHOTO%' && $photo) { + $pdf->Image($photo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); + } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width - $xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } } // Bottom - if ($footer != '') - { - if ($this->code == "CARD") - { + if ($footer != '') { + if ($this->code == "CARD") { $pdf->SetDrawColor(128, 128, 128); $pdf->Line($_PosX, $_PosY + $this->_Height - $this->_Line_Height - 2, $_PosX + $this->_Width, $_PosY + $this->_Height - $this->_Line_Height - 2); $pdf->SetDrawColor(0, 0, 0); @@ -237,7 +243,10 @@ class pdf_standardlabel extends CommonStickerGenerator $this->code = $srctemplatepath; $this->Tformat = $_Avery_Labels[$this->code]; - if (empty($this->Tformat)) { dol_print_error('', 'ErrorBadTypeForCard'.$this->code); exit; } + if (empty($this->Tformat)) { + dol_print_error('', 'ErrorBadTypeForCard'.$this->code); + exit; + } $this->type = 'pdf'; // standard format or custom if ($this->Tformat['paper-size'] != 'custom') { @@ -248,9 +257,13 @@ class pdf_standardlabel extends CommonStickerGenerator $this->format = $resolution; } - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin")); @@ -261,10 +274,8 @@ class pdf_standardlabel extends CommonStickerGenerator $dir = (empty($outputdir) ? $conf->adherent->dir_temp : $outputdir); $file = $dir."/".$filename; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir", $dir); return 0; } @@ -272,8 +283,7 @@ class pdf_standardlabel extends CommonStickerGenerator $pdf = pdf_getInstance($this->format, $this->Tformat['metric'], $this->Tformat['orientation']); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -284,7 +294,9 @@ class pdf_standardlabel extends CommonStickerGenerator $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($keywords); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins(0, 0); $pdf->SetAutoPageBreak(false); @@ -293,8 +305,16 @@ class pdf_standardlabel extends CommonStickerGenerator // Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie $posX = 1; $posY = 1; - if ($posX > 0) $posX--; else $posX = 0; - if ($posY > 0) $posY--; else $posY = 0; + if ($posX > 0) { + $posX--; + } else { + $posX = 0; + } + if ($posY > 0) { + $posY--; + } else { + $posY = 0; + } $this->_COUNTX = $posX; $this->_COUNTY = $posY; $this->_Set_Format($pdf, $this->Tformat); @@ -305,8 +325,7 @@ class pdf_standardlabel extends CommonStickerGenerator // Add each record - foreach ($arrayofrecords as $val) - { + foreach ($arrayofrecords as $val) { // imprime le texte specifique sur la carte $this->Add_PDF_label($pdf, $val['textleft'], $val['textheader'], $val['textfooter'], $langs, $val['textright'], $val['photo']); } @@ -318,8 +337,9 @@ class pdf_standardlabel extends CommonStickerGenerator // Output to file $pdf->Output($file, 'F'); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index e4f46d269e2..907b18daef3 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -120,14 +120,11 @@ class pdf_tcpdflabel extends CommonStickerGenerator // Define logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if (!is_readable($logo)) - { + if (!is_readable($logo)) { $logo = ''; - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) - { + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $logo = $conf->mycompany->dir_output.'/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)) { $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; } } @@ -136,8 +133,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator $ytop = 2; // Top - if ($header != '') - { + if ($header != '') { $pdf->SetXY($_PosX + $xleft, $_PosY + 1); // Only 1 mm and not ytop for top text $pdf->Cell($this->_Width - 2 * $xleft, $this->_Line_Height, $outputlangs->convToOutputCharset($header), 0, 1, 'C'); } @@ -158,54 +154,50 @@ class pdf_tcpdflabel extends CommonStickerGenerator //var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit; // Center - if ($textright == '') // Only a left part - { + if ($textright == '') { // Only a left part // Output left area - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); - elseif ($code && !empty($encoding)) - { + if ($textleft == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); + } elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); } - } elseif ($textleft != '' && $textright != '') // left and right part - { + } elseif ($textleft != '' && $textright != '') { // left and right part $logoHeight = $heighttouse / 2; $logoWidth = $widthtouse / 2; - if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%')) // left part logo/barcode right part text - { - if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $logoWidth, 0); - elseif ($code && !empty($encoding)) - { + if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%')) { // left part logo/barcode right part text + if ($textleft == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, $logoWidth, 0); + } elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse / 2, $heighttouse); } $pdf->SetXY($_PosX + ($widthtouse / 2), $_PosY + $ytop); $pdf->MultiCell($widthtouse / 2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); - } elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text - { - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + ($widthtouse / 2), $_PosY + $ytop, $logoWidth, 0); - elseif ($code && !empty($encoding)) - { + } elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) { // right part logo/barcode left part text + if ($textright == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + ($widthtouse / 2), $_PosY + $ytop, $logoWidth, 0); + } elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + ($widthtouse / 2), $_PosY + $ytop, $widthtouse / 2, $heighttouse); } $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); $pdf->MultiCell($widthtouse / 2, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft), 0, 'L'); - } elseif ($textleft == '%LOGO%') // left part logo right part text/barcode - { - if ($logo) $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); - if ($code && !empty($encoding)) - { + } elseif ($textleft == '%LOGO%') { // left part logo right part text/barcode + if ($logo) { + $pdf->Image($logo, $_PosX + $xleft, $_PosY + $ytop, 0, $logoHeight); + } + if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft + $logoWidth + 1, $_PosY + $ytop, $widthtouse - $logoWidth - 1, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft + $logoWidth + 1, $_PosY + $ytop); $pdf->MultiCell($widthtouse - $logoWidth - 1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright), 0, 'R'); } - } elseif ($textright == '%LOGO%') // right part logo left part text/barcode - { - if ($logo) $pdf->Image($logo, $_PosX + $xleft + $widthtouse - $logoWidth + 1, $_PosY + $ytop, 0, $logoHeight); - if ($code && !empty($encoding)) - { + } elseif ($textright == '%LOGO%') { // right part logo left part text/barcode + if ($logo) { + $pdf->Image($logo, $_PosX + $xleft + $widthtouse - $logoWidth + 1, $_PosY + $ytop, 0, $logoHeight); + } + if ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $xleft, $_PosY + $ytop, $widthtouse - $logoWidth - 1, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); @@ -221,9 +213,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator } else // Only a right part { // Output right area - if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, 0, $logoHeight); - elseif ($code && !empty($encoding)) - { + if ($textright == '%LOGO%' && $logo) { + $pdf->Image($logo, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, 0, $logoHeight); + } elseif ($code && !empty($encoding)) { $this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX + $this->_Width - $widthtouse - $xleft, $_PosY + $ytop, $widthtouse, $heighttouse); } else { $pdf->SetXY($_PosX + $xleft, $_PosY + $ytop); @@ -232,8 +224,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator } // Bottom - if ($footer != '') - { + if ($footer != '') { $pdf->SetXY($_PosX, $_PosY + $this->_Height - $this->_Line_Height - 1); $pdf->Cell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($footer), 0, 1, 'C'); } @@ -275,7 +266,10 @@ class pdf_tcpdflabel extends CommonStickerGenerator $this->code = $srctemplatepath; $this->Tformat = $_Avery_Labels[$this->code]; - if (empty($this->Tformat)) { dol_print_error('', 'ErrorBadTypeForCard'.$this->code); exit; } + if (empty($this->Tformat)) { + dol_print_error('', 'ErrorBadTypeForCard'.$this->code); + exit; + } $this->type = 'pdf'; // standard format or custom if ($this->Tformat['paper-size'] != 'custom') { @@ -286,9 +280,13 @@ class pdf_tcpdflabel extends CommonStickerGenerator $this->format = $resolution; } - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "admin")); @@ -299,10 +297,8 @@ class pdf_tcpdflabel extends CommonStickerGenerator $dir = (empty($outputdir) ? $conf->adherent->dir_temp : $outputdir); $file = $dir."/".$filename; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->trans("ErrorCanNotCreateDir", $dir); return 0; } @@ -310,8 +306,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf = pdf_getInstance($this->format, $this->Tformat['metric'], $this->Tformat['orientation']); - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -322,7 +317,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($keywords); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins(0, 0); $pdf->SetAutoPageBreak(false); @@ -331,8 +328,16 @@ class pdf_tcpdflabel extends CommonStickerGenerator // Permet de commencer l'impression de l'etiquette desiree dans le cas ou la page a deja servie $posX = 1; $posY = 1; - if ($posX > 0) $posX--; else $posX = 0; - if ($posY > 0) $posY--; else $posY = 0; + if ($posX > 0) { + $posX--; + } else { + $posX = 0; + } + if ($posY > 0) { + $posY--; + } else { + $posY = 0; + } $this->_COUNTX = $posX; $this->_COUNTY = $posY; $this->_Set_Format($pdf, $this->Tformat); @@ -343,8 +348,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator // Add each record - foreach ($arrayofrecords as $val) - { + foreach ($arrayofrecords as $val) { // imprime le texte specifique sur la carte $this->addSticker($pdf, $outputlangs, $val); } @@ -356,8 +360,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator // Output to file $pdf->Output($file, 'F'); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); diff --git a/htdocs/core/modules/printsheet/index.html b/htdocs/core/modules/printsheet/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index c04d0acc4ed..ae4c6888a6c 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -54,12 +54,12 @@ class ModelePDFLabels global $conf; $type = 'members_labels'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -95,51 +95,54 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp $srctemplatepath = ''; // Positionne le modele sur le nom du modele a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->ADHERENT_ETIQUETTE_TYPE)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->ADHERENT_ETIQUETTE_TYPE)) { $code = $conf->global->ADHERENT_ETIQUETTE_TYPE; } else { $code = $modele; } - } else $code = $modele; + } else { + $code = $modele; + } // If selected modele is a filename template (then $modele="modelname:filename") $tmp = explode(':', $template, 2); - if (!empty($tmp[1])) - { + if (!empty($tmp[1])) { $template = $tmp[0]; $srctemplatepath = $tmp[1]; - } else $srctemplatepath = $code; + } else { + $srctemplatepath = $code; + } dol_syslog("modele=".$modele." outputdir=".$outputdir." template=".$template." code=".$code." srctemplatepath=".$srctemplatepath." filename=".$filename, LOG_DEBUG); // Search template files - $file = ''; $classname = ''; $filefound = 0; + $file = ''; + $classname = ''; + $filefound = 0; $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 (is_array($conf->modules_parts['models'])) { + $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + } + foreach ($dirmodels as $reldir) { + foreach (array('doc', 'pdf') as $prefix) { $file = $prefix."_".$template.".class.php"; // On verifie l'emplacement du modele $file = dol_buildpath($reldir."core/modules/printsheet/doc/".$file, 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $prefix.'_'.$template; break; } } - if ($filefound) break; + if ($filefound) { + break; + } } // Charge le modele - if ($filefound) - { + if ($filefound) { require_once $file; $obj = new $classname($db); @@ -147,8 +150,7 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp // 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 ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir, $filename) > 0) - { + if ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir, $filename) > 0) { $outputlangs->charset_output = $sav_charset_output; $fullpath = $obj->result['fullpath']; @@ -157,13 +159,20 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp clearstatcache(); $attachment = true; - if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment = false; + if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) { + $attachment = false; + } $type = dol_mimetype($filename); //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.'"'); + if ($type) { + header('Content-Type: '.$type); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } // Ajout directives pour resoudre bug IE header('Cache-Control: Public, must-revalidate'); diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index ef5e97997f9..19a752d5be7 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -96,7 +96,9 @@ class doc_generic_product_odt extends ModelePDFProduct // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -120,8 +122,7 @@ class doc_generic_product_odt extends ModelePDFProduct $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -133,17 +134,20 @@ class doc_generic_product_odt extends ModelePDFProduct $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->PRODUCT_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -161,8 +165,7 @@ class doc_generic_product_odt extends ModelePDFProduct $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; /*if ($conf->global->MAIN_PRODUCT_CHOOSE_ODT_DOCUMENT > 0) @@ -221,38 +224,35 @@ class doc_generic_product_odt extends ModelePDFProduct // phpcs:enable global $product, $langs, $conf, $mysoc, $hookmanager, $user; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->product->dir_output) - { + if ($conf->product->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Product($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -263,20 +263,19 @@ class doc_generic_product_odt extends ModelePDFProduct $dir = $conf->product->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -287,10 +286,11 @@ class doc_generic_product_odt extends ModelePDFProduct // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -307,8 +307,7 @@ class doc_generic_product_odt extends ModelePDFProduct // If CUSTOMER contact defined on product, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -342,8 +341,7 @@ class doc_generic_product_odt extends ModelePDFProduct // Line of free text $newfreetext = ''; $paramfreetext = 'product_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -359,8 +357,7 @@ class doc_generic_product_odt extends ModelePDFProduct 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -376,8 +373,7 @@ class doc_generic_product_odt extends ModelePDFProduct // 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); } @@ -391,7 +387,9 @@ class doc_generic_product_odt extends ModelePDFProduct $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -400,19 +398,19 @@ class doc_generic_product_odt extends ModelePDFProduct $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -420,22 +418,18 @@ class doc_generic_product_odt extends ModelePDFProduct try { $listlines = $odfHandler->setSegment('supplierprices'); if (!empty($object->supplierprices)) { - foreach ($object->supplierprices as $supplierprice) - { + foreach ($object->supplierprices as $supplierprice) { $array_lines = $this->get_substitutionarray_each_var_object($supplierprice, $outputlangs); complete_substitutions_array($array_lines, $outputlangs, $object, $supplierprice, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$array_lines, 'line'=>$supplierprice); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($array_lines as $key => $val) - { + foreach ($array_lines as $key => $val) { 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); } } @@ -443,8 +437,7 @@ class doc_generic_product_odt extends ModelePDFProduct } } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -452,12 +445,10 @@ class doc_generic_product_odt extends ModelePDFProduct // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -487,8 +478,9 @@ class doc_generic_product_odt extends ModelePDFProduct $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index ceb1819df37..72eaae364a5 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -144,7 +144,9 @@ class pdf_standard extends ModelePDFProduct // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -165,20 +167,26 @@ class pdf_standard extends ModelePDFProduct // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblines = count($object->lines); + if (is_array($object->lines)) { + $nblines = count($object->lines); + } else { + $nblines = 0; + } - if ($conf->product->dir_output) - { + if ($conf->product->dir_output) { // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->product->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -191,20 +199,16 @@ class pdf_standard extends ModelePDFProduct $supplierprices = $productFournisseur->list_product_fournisseur_price($object->id); $object->supplierprices = $supplierprices; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -221,17 +225,17 @@ class pdf_standard extends ModelePDFProduct $heightforinfotot = 40; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -245,14 +249,18 @@ class pdf_standard extends ModelePDFProduct $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -277,48 +285,45 @@ class pdf_standard extends ModelePDFProduct $nexY += 5; $outputlangs->load("other"); - if ($object->weight) - { + if ($object->weight) { $texttoshow = $langs->trans("Weight").': '.dol_htmlentitiesbr($object->weight); - if (isset($object->weight_units)) $texttoshow .= ' '.measuring_units_string($object->weight_units, 'weight', 0, 0, $outputlangs); + if (isset($object->weight_units)) { + $texttoshow .= ' '.measuring_units_string($object->weight_units, 'weight', 0, 0, $outputlangs); + } $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); $nexY = $pdf->GetY(); } - if ($object->weight) - { + if ($object->weight) { $texttoshow = $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.($object->length != '' ? $object->length : '?').' x '.($object->width != '' ? $object->width : '?').' x '.($object->height != '' ? $object->height : '?'); $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); $nexY = $pdf->GetY(); } - if ($object->surface) - { + if ($object->surface) { $texttoshow = $langs->trans("Area").': '.dol_htmlentitiesbr($object->surface); $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); $nexY = $pdf->GetY(); } - if ($object->volume) - { + if ($object->volume) { $texttoshow = $langs->trans("Volume").': '.dol_htmlentitiesbr($object->volume); $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); - $nexY = $pdf->GetY(); + $nexY = $pdf->GetY(); } // Show notes // TODO There is no public note on product yet $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -474,7 +479,7 @@ class pdf_standard extends ModelePDFProduct $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } - // retrieve global local tax + // retrieve global local tax if ($localtax1_type && $localtax1ligne != 0) $this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne; if ($localtax2_type && $localtax2ligne != 0) @@ -544,14 +549,16 @@ class pdf_standard extends ModelePDFProduct $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code); $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - */ + */ // Affiche zone infos //$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs); // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -562,14 +569,14 @@ class pdf_standard extends ModelePDFProduct $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -604,7 +611,9 @@ class pdf_standard extends ModelePDFProduct // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -613,14 +622,15 @@ class pdf_standard extends ModelePDFProduct $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -629,34 +639,29 @@ class pdf_standard extends ModelePDFProduct // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); } } $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } @@ -670,21 +675,17 @@ class pdf_standard extends ModelePDFProduct } $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { - if ($this->atleastonediscount) - { + if (empty($hidetop)) { + if ($this->atleastonediscount) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); } - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -710,14 +711,16 @@ class pdf_standard extends ModelePDFProduct $default_font_size = pdf_getPDFFontSize($outputlangs); - if ($object->type == 1) $titlekey = 'ServiceSheet'; - else $titlekey = 'ProductSheet'; + if ($object->type == 1) { + $titlekey = 'ServiceSheet'; + } else { + $titlekey = 'ProductSheet'; + } pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -731,10 +734,8 @@ class pdf_standard extends ModelePDFProduct // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -765,73 +766,72 @@ class pdf_standard extends ModelePDFProduct $pdf->SetFont('', '', $default_font_size - 1); /*if ($object->ref_client) - { - $posy+=5; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); - }*/ + { + $posy+=5; + $pdf->SetXY($posx,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); + }*/ /*$posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R'); - */ + $pdf->SetXY($posx,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R'); + */ // 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(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); - } - }*/ + 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(100, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); + } + }*/ $posy += 2; // Show list of linked objects $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($showaddress) - { + if ($showaddress) { /* - // Sender properties - $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); + // Sender properties + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); - // Show sender - $posy=42; - $posx=$this->marge_gauche; - if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; - $hautcadre=40; + // Show sender + $posy=42; + $posx=$this->marge_gauche; + if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80; + $hautcadre=40; - // Show sender frame - $pdf->SetTextColor(0,0,0); - $pdf->SetFont('','', $default_font_size - 2); - $pdf->SetXY($posx,$posy-5); - $pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L'); - $pdf->SetXY($posx,$posy); - $pdf->SetFillColor(230,230,230); - $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0,0,60); + // Show sender frame + $pdf->SetTextColor(0,0,0); + $pdf->SetFont('','', $default_font_size - 2); + $pdf->SetXY($posx,$posy-5); + $pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":", 0, 'L'); + $pdf->SetXY($posx,$posy); + $pdf->SetFillColor(230,230,230); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0,0,60); - // Show sender name - $pdf->SetXY($posx+2,$posy+3); - $pdf->SetFont('','B', $default_font_size); - $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); - $posy=$pdf->getY(); + // Show sender name + $pdf->SetXY($posx+2,$posy+3); + $pdf->SetFont('','B', $default_font_size); + $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L'); + $posy=$pdf->getY(); - // Show sender information - $pdf->SetXY($posx+2,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); - */ + // Show sender information + $pdf->SetXY($posx+2,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); + */ } $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/product/index.html b/htdocs/core/modules/product/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 2580000ca7a..0a302c0fb6b 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -144,35 +144,33 @@ class mod_codeproduct_elephant extends ModeleProductCode */ public function getExample($langs, $objproduct = 0, $type = -1) { - if ($type == 0 || $type == -1) - { + if ($type == 0 || $type == -1) { $exampleproduct = $this->getNextValue($objproduct, 0); - if (!$exampleproduct) - { + if (!$exampleproduct) { $exampleproduct = $langs->trans('NotConfigured'); } - if ($exampleproduct == "ErrorBadMask") - { + if ($exampleproduct == "ErrorBadMask") { $langs->load("errors"); $exampleproduct = $langs->trans($exampleproduct); } } - if ($type == 1 || $type == -1) - { + if ($type == 1 || $type == -1) { $exampleservice = $this->getNextValue($objproduct, 1); - if (!$exampleservice) - { + if (!$exampleservice) { $exampleservice = $langs->trans('NotConfigured'); } - if ($exampleservice == "ErrorBadMask") - { + if ($exampleservice == "ErrorBadMask") { $langs->load("errors"); $exampleservice = $langs->trans($exampleservice); } } - if ($type == 0) return $exampleproduct; - if ($type == 1) return $exampleservice; + if ($type == 0) { + return $exampleproduct; + } + if ($type == 1) { + return $exampleservice; + } return $exampleproduct.'
    '.$exampleservice; } @@ -191,32 +189,32 @@ class mod_codeproduct_elephant extends ModeleProductCode // Get Mask value $mask = ''; - if ($type == 0 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)) + if ($type == 0 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)) { $mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; - elseif ($type == 1 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) + } elseif ($type == 1 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) { $mask = $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; + } - if (empty($mask)) - { + if (empty($mask)) { $this->error = 'NotConfigured'; return ''; } - $field = ''; $where = ''; - if ($type == 0) - { + $field = ''; + $where = ''; + if ($type == 0) { $field = 'ref'; //$where = ' AND client in (1,2)'; - } elseif ($type == 1) - { + } elseif ($type == 1) { $field = 'ref'; //$where = ' AND fournisseur = 1'; - } else return -1; + } else { + return -1; + } $now = dol_now(); - if (!empty($conf->global->PRODUCT_ELEPHANT_ADD_WHERE)) - { + if (!empty($conf->global->PRODUCT_ELEPHANT_ADD_WHERE)) { $where = ' AND ('.dol_string_nospecial(dol_string_unaccent($conf->global->PRODUCT_ELEPHANT_ADD_WHERE), '_', array(',', '@', '"', "|", ";", ":")).')'; } @@ -238,10 +236,14 @@ class mod_codeproduct_elephant extends ModeleProductCode global $conf; $mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; - if (preg_match('/\{pre\}/i', $mask)) return 1; + if (preg_match('/\{pre\}/i', $mask)) { + return 1; + } $mask = $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; - if (preg_match('/\{pre\}/i', $mask)) return 1; + if (preg_match('/\{pre\}/i', $mask)) { + return 1; + } return 0; } @@ -270,26 +272,26 @@ class mod_codeproduct_elephant extends ModeleProductCode $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) { $result = -2; } else { // Get Mask value $mask = ''; - if ($type == 0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT) ? '' : $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; - if ($type == 1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE) ? '' : $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; - if (!$mask) - { + if ($type == 0) { + $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT) ? '' : $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; + } + if ($type == 1) { + $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE) ? '' : $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; + } + if (!$mask) { $this->error = 'NotConfigured'; return -5; } $result = check_value($mask, $code); - if (is_string($result)) - { + if (is_string($result)) { $this->error = $result; return -5; } @@ -314,13 +316,13 @@ class mod_codeproduct_elephant extends ModeleProductCode // phpcs:enable $sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE ref = '".$db->escape($code)."'"; - if ($product->id > 0) $sql .= " AND rowid <> ".$product->id; + if ($product->id > 0) { + $sql .= " AND rowid <> ".$product->id; + } $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { return 0; } else { return -1; diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 49a3e65f9b0..f7578d696f6 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -131,11 +131,9 @@ class mod_codeproduct_leopard extends ModeleProductCode $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) { $result = -2; } diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 79950e4f14f..e0141348568 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -53,11 +53,11 @@ abstract class ModelePDFProduct extends CommonDocGenerator global $conf; $type = 'product'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + $list = getListOfModels($db, $type, $maxfilenamelength); + return $list; } } @@ -163,7 +163,7 @@ abstract class ModeleProductCode public static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable - $liste = array(); + $list = array(); $sql = ""; $resql = $db->query($sql); @@ -172,13 +172,13 @@ abstract class ModeleProductCode $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); - $liste[$row[0]] = $row[1]; + $list[$row[0]] = $row[1]; $i++; } } else { return -1; } - return $liste; + return $list; } /** diff --git a/htdocs/core/modules/product_batch/index.html b/htdocs/core/modules/product_batch/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php new file mode 100644 index 00000000000..c580d8915c9 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -0,0 +1,155 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2021 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 + * 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/modules/product_batch/mod_lot_advanced.php + * \ingroup productbatch + * \brief File containing class for numbering model of Lot advanced + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + + +/** + * Class to manage Batch numbering rules advanced + */ +class mod_lot_advanced extends ModeleNumRefBatch +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'lot_advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= '
    Remise d\'espèces Chèque Virement, prélèvement, carte bancaire
    '.print_r($list,true).'
    '.$printer_det['name'].''.$printer_det['displayName'].''.$langs->trans('TYPE_'.$printer_det['type']).''; - if ($conf->global->PRINTING_GCP_DEFAULT == $printer_det['id']) - { + if ($conf->global->PRINTING_GCP_DEFAULT == $printer_det['id']) { $html .= img_picto($langs->trans("Default"), 'on'); - } else $html .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + $html .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } $html .= '
    '; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte .= ''; + $texte .= ''; + + $texte .= ''; + + // Option to enable custom masks per product + $texte .= ''; + + $texte .= ''; + + $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '; + if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { + $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; + } else { + $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } + $texte .= ' '.$langs->trans('CustomMasks')."\n"; + $texte .= '
    '; + $texte .= ''; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $langs, $mysoc; + + $old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc, ''); + $mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type; + + if (!$numExample) { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask = $conf->global->BATCH_ADVANCED_MASK; + + if (!$mask) { + $this->error = 'NotConfigured'; + return 0; + } + + $date = $object->date; + + $numFinal = get_next_value($db, $mask, 'product_lot', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/core/modules/product_batch/mod_lot_free.php b/htdocs/core/modules/product_batch/mod_lot_free.php new file mode 100644 index 00000000000..0f069143ab1 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_lot_free.php @@ -0,0 +1,105 @@ + + * Copyright (C) 2006-2009 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/product/mod_lot_free.php + * \ingroup productbatch + * \brief File containing class for numbering model of Lot free + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + +/** + * \class mod_codeproduct_leopard + * \brief Classe permettant la gestion leopard des codes produits + */ +class mod_lot_free extends ModeleNumRefBatch +{ + /* + * Attention ce module est utilise par defaut si aucun module n'a + * ete definit dans la configuration + * + * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible + */ + + + /** + * @var string model name + */ + public $name = 'lot_free'; + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var int Automatic numbering + */ + public $code_auto; + + + /** + * Constructor + */ + public function __construct() + { + $this->code_null = 1; + $this->code_modifiable = 1; + $this->code_modifiable_invalide = 1; + $this->code_modifiable_null = 1; + $this->code_auto = 0; + } + + + /** + * Return description of module + * + * @return string Description of module + */ + public function info() + { + global $langs; + $langs->load("companies"); + return $langs->trans("LeopardNumRefModelDesc"); + } + + + /** + * Return an example of result returned by getNextValue + * + * @param product $objproduct Object product + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return next value + */ + public function getNextValue($objproduct = 0, $type = -1) + { + global $langs; + return ''; + } +} diff --git a/htdocs/core/modules/product_batch/mod_lot_standard.php b/htdocs/core/modules/product_batch/mod_lot_standard.php new file mode 100644 index 00000000000..0d2b5a55139 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_lot_standard.php @@ -0,0 +1,145 @@ + + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2021 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 + * 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/modules/product_batch/mod_lot_standard.php + * \ingroup productbatch + * \brief File of class to manage Lot numbering rules standard + */ +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + +/** + * Class to manage MO numbering rules standard + */ +class mod_lot_standard extends ModeleNumRefBatch +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix = 'LOT'; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'lot_standard'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + global $conf, $langs, $db; + + $coyymm = ''; $max = ''; + + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_lot"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $row = $db->fetch_row($resql); + if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + } + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorNumRefModel', $max); + return false; + } + + return true; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db, $conf; + + // First, we get the max value + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_lot"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) $max = intval($obj->max); + else $max = 0; + } else { + dol_syslog("mod_lot_standard::getNextValue", LOG_DEBUG); + return -1; + } + + //$date=time(); + $date = $object->date_creation; + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + else $num = sprintf("%04s", $max + 1); + + dol_syslog("mod_lot_standard::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + } +} diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php new file mode 100644 index 00000000000..74f36a55fe6 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -0,0 +1,155 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2021 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 + * 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/modules/product_batch/mod_batch_advanced.php + * \ingroup productbatch + * \brief File containing class for numbering model of SN advanced + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + + +/** + * Class to manage Batch numbering rules advanced + */ +class mod_sn_advanced extends ModeleNumRefBatch +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'sn_advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; + $texte .= '
    '; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte .= ''; + $texte .= ''; + + $texte .= ''; + + // Option to enable custom masks per product + $texte .= ''; + + $texte .= ''; + + $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; + } else { + $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } + $texte .= ' '.$langs->trans('CustomMasks')."\n"; + $texte .= '
    '; + $texte .= '
    '; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $langs, $mysoc; + + $old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT'; + $numExample = $this->getNextValue($mysoc, ''); + $mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type; + + if (!$numExample) { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask = $conf->global->BATCH_ADVANCED_MASK; + + if (!$mask) { + $this->error = 'NotConfigured'; + return 0; + } + + $date = $object->date; + + $numFinal = get_next_value($db, $mask, 'product_sn', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/core/modules/product_batch/mod_sn_free.php b/htdocs/core/modules/product_batch/mod_sn_free.php new file mode 100644 index 00000000000..95e1bd20359 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_sn_free.php @@ -0,0 +1,104 @@ + + * Copyright (C) 2006-2009 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/product/mod_sn_free.php + * \ingroup productbatch + * \brief File containing class for numbering model of SN free + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + +/** + * \class mod_codeproduct_leopard + * \brief Classe permettant la gestion leopard des codes produits + */ +class mod_sn_free extends ModeleNumRefBatch +{ + /* + * Attention ce module est utilise par defaut si aucun module n'a + * ete definit dans la configuration + * + * Le fonctionnement de celui-ci doit donc rester le plus ouvert possible + */ + + /** + * @var string model name + */ + public $name = 'sn_free'; + + public $code_modifiable; // Code modifiable + + public $code_modifiable_invalide; // Code modifiable si il est invalide + + public $code_modifiable_null; // Code modifiables si il est null + + public $code_null; // Code facultatif + + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var int Automatic numbering + */ + public $code_auto; + + + /** + * Constructor + */ + public function __construct() + { + $this->code_null = 1; + $this->code_modifiable = 1; + $this->code_modifiable_invalide = 1; + $this->code_modifiable_null = 1; + $this->code_auto = 0; + } + + + /** + * Return description of module + * + * @return string Description of module + */ + public function info() + { + global $langs; + $langs->load("companies"); + return $langs->trans("LeopardNumRefModelDesc"); + } + + + /** + * Return an example of result returned by getNextValue + * + * @param product $objproduct Object product + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return next value + */ + public function getNextValue($objproduct = 0, $type = -1) + { + global $langs; + return ''; + } +} diff --git a/htdocs/core/modules/product_batch/mod_sn_standard.php b/htdocs/core/modules/product_batch/mod_sn_standard.php new file mode 100644 index 00000000000..bef5efcd9f8 --- /dev/null +++ b/htdocs/core/modules/product_batch/mod_sn_standard.php @@ -0,0 +1,145 @@ + + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2021 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 + * 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/modules/product_batch/mod_sn_standard.php + * \ingroup productbatch + * \brief File of class to manage SN numbering rules standard + */ +require_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; + +/** + * Class to manage MO numbering rules standard + */ +class mod_sn_standard extends ModeleNumRefBatch +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix = 'SN'; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'sn_standard'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + global $conf, $langs, $db; + + $coyymm = ''; $max = ''; + + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_lot"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $row = $db->fetch_row($resql); + if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + } + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorNumRefModel', $max); + return false; + } + + return true; + } + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($objprod, $object) + { + global $db, $conf; + + // First, we get the max value + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_lot"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + $sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) $max = intval($obj->max); + else $max = 0; + } else { + dol_syslog("mod_sn_standard::getNextValue", LOG_DEBUG); + return -1; + } + + //$date=time(); + $date = $object->date_creation; + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + else $num = sprintf("%04s", $max + 1); + + dol_syslog("mod_sn_standard::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + } +} diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index f5ef6ac3dda..42d4d052bfe 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -65,3 +65,89 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator return $list; } } + +/** + * Parent class to manage numbering of batch products + */ +abstract class ModeleNumRefBatch +{ + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Returns the default description of the numbering template + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("productbatch"); + return $langs->trans("NoDescription"); + } + + /** + * Returns an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("productbatch"); + return $langs->trans("NoExample"); + } + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @return boolean false if conflict, true if ok + */ + public function canBeActivated() + { + return true; + } + + /** + * Returns next assigned value + * + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string Valeur + */ + public function getNextValue($objsoc, $object) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Returns version of numbering module + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') return $langs->trans("VersionDevelopment"); + if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); + if ($this->version == 'dolibarr') return DOL_VERSION; + if ($this->version) return $this->version; + return $langs->trans("NotAvailable"); + } +} diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index bfd35e70095..d007b421fd7 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -37,16 +37,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.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.class.php'; -if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; -if (!empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -if (!empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; -if (!empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.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.class.php'; +} +if (!empty($conf->contrat->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; +} +if (!empty($conf->ficheinter->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; +} +if (!empty($conf->deplacement->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; +} +if (!empty($conf->agenda->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +} /** @@ -113,7 +133,9 @@ class doc_generic_project_odt extends ModelePDFProjects // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->pays_code) $this->emetteur->pays_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + if (!$this->emetteur->pays_code) { + $this->emetteur->pays_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + } } @@ -400,17 +422,20 @@ class doc_generic_project_odt extends ModelePDFProjects $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->PROJECT_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -429,8 +454,7 @@ class doc_generic_project_odt extends ModelePDFProjects // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->PROJECT_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->PROJECT_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= $nbofiles; @@ -438,14 +462,13 @@ class doc_generic_project_odt extends ModelePDFProjects $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } $texte .= ''; @@ -475,38 +498,35 @@ class doc_generic_project_odt extends ModelePDFProjects // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Project($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -516,20 +536,19 @@ class doc_generic_project_odt extends ModelePDFProjects $dir = $conf->projet->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -539,10 +558,11 @@ class doc_generic_project_odt extends ModelePDFProjects //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -558,16 +578,14 @@ class doc_generic_project_odt extends ModelePDFProjects // If PROJECTLEADER contact defined on project, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'PROJECTLEADER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { // if we have a PROJECTLEADER contact and we dont use it as recipient we store the contact object for later use $contactobject = $object->contact; } @@ -618,7 +636,9 @@ class doc_generic_project_odt extends ModelePDFProjects $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_project_contact = array(); - if ($usecontact && is_object($contactobject)) $array_project_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_project_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_project_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -627,19 +647,19 @@ class doc_generic_project_odt extends ModelePDFProjects $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -652,24 +672,22 @@ class doc_generic_project_odt extends ModelePDFProjects // Security check $socid = 0; - if (!empty($object->fk_soc)) $socid = $object->fk_soc; + if (!empty($object->fk_soc)) { + $socid = $object->fk_soc; + } $tasksarray = $taskstatic->getTasksArray(0, 0, $object->id, $socid, 0); - foreach ($tasksarray as $task) - { + foreach ($tasksarray as $task) { $tmparray = $this->get_substitutionarray_tasks($task, $outputlangs); //complete_substitutions_array($tmparray, $outputlangs, $object, $task, "completesubstitutionarray_lines"); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -682,17 +700,14 @@ class doc_generic_project_odt extends ModelePDFProjects $contact_arrray = array(); foreach ($sourcearray as $source) { $contact_temp = $taskobj->liste_contact(-1, $source); - if ((is_array($contact_temp) && count($contact_temp) > 0)) - { + if ((is_array($contact_temp) && count($contact_temp) > 0)) { $contact_arrray = array_merge($contact_arrray, $contact_temp); } } - if ((is_array($contact_arrray) && count($contact_arrray) > 0)) - { + if ((is_array($contact_arrray) && count($contact_arrray) > 0)) { $listlinestaskres = $listlines->__get('tasksressources'); - foreach ($contact_arrray as $contact) - { + foreach ($contact_arrray as $contact) { if ($contact['source'] == 'internal') { $objectdetail = new User($this->db); $objectdetail->fetch($contact['id']); @@ -709,15 +724,12 @@ class doc_generic_project_odt extends ModelePDFProjects $tmparray = $this->get_substitutionarray_tasksressource($contact, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlinestaskres->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); } } @@ -735,8 +747,7 @@ class doc_generic_project_odt extends ModelePDFProjects $sql .= " ORDER BY t.task_date DESC"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $tasks = array(); @@ -756,22 +767,18 @@ class doc_generic_project_odt extends ModelePDFProjects $row['amountttc'] = ''; $row['thm'] = ''; $tmparray = $this->get_substitutionarray_taskstime($row, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlinestasktime->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); } } $listlinestasktime->merge(); } - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_array($resql); if (!empty($row['fk_user'])) { $objectdetail = new User($this->db); @@ -793,15 +800,12 @@ class doc_generic_project_odt extends ModelePDFProjects $tmparray = $this->get_substitutionarray_taskstime($row, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlinestasktime->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); } } @@ -819,19 +823,15 @@ class doc_generic_project_odt extends ModelePDFProjects $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', 'name', SORT_ASC, 1); - foreach ($filearray as $filedetail) - { + foreach ($filearray as $filedetail) { $tmparray = $this->get_substitutionarray_task_file($filedetail, $outputlangs); //dol_syslog(get_class($this).'::main $tmparray'.var_export($tmparray,true)); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listtasksfiles->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); } } @@ -840,12 +840,10 @@ class doc_generic_project_odt extends ModelePDFProjects $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $ExceptionTrace = $e->getTrace(); // no segment defined on ODT is not an error - if ($ExceptionTrace[0]['function'] != 'setSegment') - { + if ($ExceptionTrace[0]['function'] != 'setSegment') { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -859,28 +857,23 @@ class doc_generic_project_odt extends ModelePDFProjects $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref); $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', 'name', SORT_ASC, 1); - foreach ($filearray as $filedetail) - { + foreach ($filearray as $filedetail) { //dol_syslog(get_class($this).'::main $filedetail'.var_export($filedetail,true)); $tmparray = $this->get_substitutionarray_project_file($filedetail, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -891,18 +884,15 @@ class doc_generic_project_odt extends ModelePDFProjects $contact_arrray = array(); foreach ($sourcearray as $source) { $contact_temp = $object->liste_contact(-1, $source); - if ((is_array($contact_temp) && count($contact_temp) > 0)) - { + if ((is_array($contact_temp) && count($contact_temp) > 0)) { $contact_arrray = array_merge($contact_arrray, $contact_temp); } } - if ((is_array($contact_arrray) && count($contact_arrray) > 0)) - { + if ((is_array($contact_arrray) && count($contact_arrray) > 0)) { try { $listlines = $odfHandler->setSegment('projectcontacts'); - foreach ($contact_arrray as $contact) - { + foreach ($contact_arrray as $contact) { if ($contact['source'] == 'internal') { $objectdetail = new User($this->db); $objectdetail->fetch($contact['id']); @@ -918,23 +908,19 @@ class doc_generic_project_odt extends ModelePDFProjects $contact['fullname'] = $objectdetail->getFullName($outputlangs, 1); $tmparray = $this->get_substitutionarray_project_contacts($contact, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -978,13 +964,13 @@ class doc_generic_project_odt extends ModelePDFProjects 'title' => "ListSupplierOrdersAssociatedProject", 'table' => 'commande_fournisseur', 'class' => 'CommandeFournisseur', - 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire + 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire) ), 'invoice_supplier' => array( 'title' => "ListSupplierInvoicesAssociatedProject", 'table' => 'facture_fourn', 'class' => 'FactureFournisseur', - 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire + 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire) ), 'contract' => array( 'title' => "ListContractAssociatedProject", @@ -1057,22 +1043,18 @@ class doc_generic_project_odt extends ModelePDFProjects try { $listlines = $odfHandler->setSegment('projectrefs'); - foreach ($listofreferent as $keyref => $valueref) - { + foreach ($listofreferent as $keyref => $valueref) { $title = $valueref['title']; $tablename = $valueref['table']; $classname = $valueref['class']; $qualified = $valueref['test']; - if ($qualified) - { + if ($qualified) { $elementarray = $object->get_element_list($keyref, $tablename); - if (count($elementarray) > 0 && is_array($elementarray)) - { + if (count($elementarray) > 0 && is_array($elementarray)) { $total_ht = 0; $total_ttc = 0; $num = count($elementarray); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $ref_array = array(); $ref_array['type'] = $langs->trans($classname); @@ -1085,8 +1067,12 @@ class doc_generic_project_odt extends ModelePDFProjects //Date object $dateref = $element->date; - if (empty($dateref)) $dateref = $element->datep; - if (empty($dateref)) $dateref = $element->date_contrat; + if (empty($dateref)) { + $dateref = $element->datep; + } + if (empty($dateref)) { + $dateref = $element->date_contrat; + } $ref_array['date'] = $dateref; //Soc object @@ -1114,15 +1100,12 @@ class doc_generic_project_odt extends ModelePDFProjects $tmparray = $this->get_substitutionarray_project_reference($ref_array, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -1140,8 +1123,7 @@ class doc_generic_project_odt extends ModelePDFProjects // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); } catch (OdfException $e) { @@ -1174,8 +1156,9 @@ class doc_generic_project_odt extends ModelePDFProjects $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/project/doc/index.html b/htdocs/core/modules/project/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 6baf416ed64..373d41abc31 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -38,6 +38,31 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class pdf_baleine extends ModelePDFProjects { + /** + * @var DoliDb Database handler + */ + public $db; + + /** + * @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 document type + */ + public $type; + /** * @var array Minimum version of PHP required by module. * e.g.: PHP ≥ 5.6 = array(5, 6) @@ -50,6 +75,41 @@ class pdf_baleine extends ModelePDFProjects */ public $version = 'dolibarr'; + /** + * @var int page_largeur + */ + public $page_largeur; + + /** + * @var int page_hauteur + */ + public $page_hauteur; + + /** + * @var array format + */ + public $format; + + /** + * @var int marge_gauche + */ + public $marge_gauche; + + /** + * @var int marge_droite + */ + public $marge_droite; + + /** + * @var int marge_haute + */ + public $marge_haute; + + /** + * @var int marge_basse + */ + public $marge_basse; + /** * Issuer * @var Societe Object that emits @@ -71,6 +131,7 @@ class pdf_baleine extends ModelePDFProjects $this->db = $db; $this->name = "baleine"; $this->description = $langs->trans("DocumentModelBaleine"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -89,7 +150,9 @@ class pdf_baleine extends ModelePDFProjects // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->posxref = $this->marge_gauche + 1; @@ -98,8 +161,7 @@ class pdf_baleine extends ModelePDFProjects $this->posxprogress = $this->marge_gauche + 137; $this->posxdatestart = $this->marge_gauche + 147; $this->posxdateend = $this->marge_gauche + 169; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxref -= 20; $this->posxlabel -= 20; $this->posxworkload -= 20; @@ -123,36 +185,37 @@ class pdf_baleine extends ModelePDFProjects // phpcs:enable global $conf, $hookmanager, $langs, $user; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".pdf"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -169,17 +232,17 @@ class pdf_baleine extends ModelePDFProjects $heightforinfotot = 40; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -188,8 +251,7 @@ class pdf_baleine extends ModelePDFProjects $task = new Task($this->db); $tasksarray = $task->getTasksArray(0, 0, $object->id); - if (!$object->id > 0) // Special case when used with object = specimen, we may return all lines - { + if (!$object->id > 0) { // Special case when used with object = specimen, we may return all lines $tasksarray = array_slice($tasksarray, 0, min(5, count($tasksarray))); } @@ -205,13 +267,17 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -225,8 +291,7 @@ class pdf_baleine extends ModelePDFProjects // Show public note $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -255,8 +320,7 @@ class pdf_baleine extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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); @@ -280,8 +344,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetXY($this->posxlabel, $curY); $pdf->MultiCell($this->posxworkload - $this->posxlabel, 3, $outputlangs->convToOutputCharset($libelleline), 0, 'L'); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -292,33 +355,40 @@ class pdf_baleine extends ModelePDFProjects $pdf->MultiCell($this->posxworkload - $this->posxlabel, 3, $outputlangs->convToOutputCharset($libelleline), 0, 'L'); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } $forcedesconsamepage = 1; - if ($forcedesconsamepage) - { + if ($forcedesconsamepage) { $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposafter + 1); $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->MultiCell(0, 3, ''); // Set interline to 3 @@ -351,7 +421,8 @@ class pdf_baleine extends ModelePDFProjects // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { //var_dump($pageposbefore.'-'.$pageposafter.'-'.$showpricebeforepagebreak); - $pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage + $heightoftitleline + 1; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font @@ -373,8 +444,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxdateend, 3, $dateend, 0, 'C'); // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -385,11 +455,9 @@ class pdf_baleine extends ModelePDFProjects $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -398,12 +466,12 @@ class pdf_baleine extends ModelePDFProjects $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -411,21 +479,29 @@ class pdf_baleine extends ModelePDFProjects $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); - else $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); + } else { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); + } $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; // Footer of the page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -436,14 +512,14 @@ class pdf_baleine extends ModelePDFProjects $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -539,10 +615,8 @@ class pdf_baleine extends ModelePDFProjects // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -551,7 +625,9 @@ class pdf_baleine extends ModelePDFProjects $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); @@ -568,8 +644,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : ".dol_print_date($object->date_end, 'day', false, $outputlangs, true), '', 'R'); - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $posy += 6; $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : ".$object->thirdparty->getFullName($outputlangs), '', 'R'); @@ -581,25 +656,25 @@ class pdf_baleine extends ModelePDFProjects /* Removed: A project can have more than thousands linked objects (orders, invoices, proposals, etc.... $object->fetchObjectLinked(); - foreach($object->linkedObjects as $objecttype => $objects) - { - var_dump($objects);exit; - if ($objecttype == 'commande') - { - $outputlangs->load('orders'); - $num=count($objects); - for ($i=0;$i<$num;$i++) - { - $posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $text=$objects[$i]->ref; - if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); - } - } - } - */ + foreach($object->linkedObjects as $objecttype => $objects) + { + var_dump($objects);exit; + if ($objecttype == 'commande') + { + $outputlangs->load('orders'); + $num=count($objects); + for ($i=0;$i<$num;$i++) + { + $posy+=4; + $pdf->SetXY($posx,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $text=$objects[$i]->ref; + if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); + } + } + } + */ } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 0f877428052..30b9271a110 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -54,6 +54,78 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; class pdf_beluga extends ModelePDFProjects { + /** + * @var DoliDb Database handler + */ + public $db; + + /** + * @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 document type + */ + public $type; + + /** + * @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_hauteur + */ + public $page_hauteur; + + /** + * @var array format + */ + public $format; + + /** + * @var int marge_gauche + */ + public $marge_gauche; + + /** + * @var int marge_droite + */ + public $marge_droite; + + /** + * @var int marge_haute + */ + public $marge_haute; + + /** + * @var int marge_basse + */ + public $marge_basse; + /** * Page orientation * @var string 'P' or 'Portait' (default), 'L' or 'Landscape' @@ -81,6 +153,7 @@ class pdf_beluga extends ModelePDFProjects $this->db = $db; $this->name = "beluga"; $this->description = $langs->trans("DocumentModelBeluga"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -105,7 +178,9 @@ class pdf_beluga extends ModelePDFProjects // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns if ($this->orientation == 'L' || $this->orientation == 'Landscape') { @@ -123,8 +198,7 @@ class pdf_beluga extends ModelePDFProjects $this->posxamountttc = $this->marge_gauche + 135; $this->posxstatut = $this->marge_gauche + 165; } - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxref -= 20; $this->posxdate -= 20; $this->posxsociete -= 20; @@ -150,36 +224,37 @@ class pdf_beluga extends ModelePDFProjects $formproject = new FormProjets($this->db); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".pdf"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -196,17 +271,17 @@ class pdf_beluga extends ModelePDFProjects $heightforinfotot = 40; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -233,13 +308,17 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage($this->orientation); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -253,8 +332,7 @@ class pdf_beluga extends ModelePDFProjects // Show public note $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -322,7 +400,7 @@ class pdf_beluga extends ModelePDFProjects 'class'=>'CommandeFournisseur', 'table'=>'commande_fournisseur', 'datefieldname'=>'date_commande', - 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire, + 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire), 'lang'=>'orders'), 'invoice_supplier'=>array( 'name'=>"BillsSuppliers", @@ -331,7 +409,7 @@ class pdf_beluga extends ModelePDFProjects 'margin'=>'minus', 'table'=>'facture_fourn', 'datefieldname'=>'datef', - 'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire, + 'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire), 'lang'=>'bills'), 'contract'=>array( 'name'=>"Contracts", @@ -387,8 +465,7 @@ class pdf_beluga extends ModelePDFProjects $listofreferent = array_merge($listofreferent, $hookmanager->resArray); } - foreach ($listofreferent as $key => $value) - { + foreach ($listofreferent as $key => $value) { $title = $value['title']; $classname = $value['class']; $tablename = $value['table']; @@ -398,14 +475,15 @@ class pdf_beluga extends ModelePDFProjects $projectField = isset($value['project_field']) ? $value['project_field'] : 'fk_projet'; $langs->load($langstoload); - if (!$qualified) continue; + if (!$qualified) { + continue; + } //var_dump("$key, $tablename, $datefieldname, $dates, $datee"); $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, $projectField); $num = count($elementarray); - if ($num >= 0) - { + if ($num >= 0) { $nexY = $pdf->GetY() + 5; $curY = $nexY; @@ -424,7 +502,9 @@ class pdf_beluga extends ModelePDFProjects $pdf->MultiCell($this->posxsociety - $this->posxdate, 3, $outputlangs->transnoentities("Date"), 1, 'C'); $pdf->SetXY($this->posxsociety, $curY); $titlethirdparty = $outputlangs->transnoentities("ThirdParty"); - if ($classname == 'ExpenseReport') $titlethirdparty = $langs->trans("User"); + if ($classname == 'ExpenseReport') { + $titlethirdparty = $langs->trans("User"); + } $pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, $titlethirdparty, 1, 'L'); if (empty($value['disableamount'])) { $pdf->SetXY($this->posxamountht, $curY); @@ -438,8 +518,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($this->posxstatut, $curY); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxstatut, 3, $outputlangs->transnoentities("Status"), 1, 'R'); - if (is_array($elementarray) && count($elementarray) > 0) - { + if (is_array($elementarray) && count($elementarray) > 0) { $nexY = $pdf->GetY(); $total_ht = 0; @@ -447,8 +526,7 @@ class pdf_beluga extends ModelePDFProjects $num = count($elementarray); // Loop on each lines - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -459,13 +537,12 @@ class pdf_beluga extends ModelePDFProjects // Description of line $idofelement = $elementarray[$i]; - if ($classname == 'ExpenseReport') - { - // We get id of expense report - $expensereportline = new ExpenseReportLine($this->db); - $expensereportline->fetch($idofelement); - $idofelement = $expensereportline->fk_expensereport; - } + if ($classname == 'ExpenseReport') { + // We get id of expense report + $expensereportline = new ExpenseReportLine($this->db); + $expensereportline->fetch($idofelement); + $idofelement = $expensereportline->fk_expensereport; + } $element = new $classname($this->db); $element->fetch($idofelement); @@ -474,8 +551,9 @@ class pdf_beluga extends ModelePDFProjects $qualifiedfortotal = true; if ($key == 'invoice') { - if ($element->close_code == 'replaced') + if ($element->close_code == 'replaced') { $qualifiedfortotal = false; // Replacement invoice + } } $showpricebeforepagebreak = 1; @@ -485,8 +563,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($this->posxref, $curY); $pdf->MultiCell($this->posxdate - $this->posxref, 3, $element->ref, 1, 'L'); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -497,33 +574,40 @@ class pdf_beluga extends ModelePDFProjects $pdf->MultiCell($this->posxdate - $this->posxref, 3, $element->ref, 1, 'L'); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text - { - if ($i == ($num - 1)) // No more lines, and no space left to show total, so we create a new page - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // There is no space left for total+free text + if ($i == ($num - 1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage($this->orientation, '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } $forcedesconsamepage = 1; - if ($forcedesconsamepage) - { + if ($forcedesconsamepage) { $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; $pdf->setPageOrientation($this->orientation, 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pdf->AddPage($this->orientation, '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposafter + 1); $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->MultiCell(0, 3, ''); // Set interline to 3 @@ -556,30 +640,33 @@ class pdf_beluga extends ModelePDFProjects // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { //var_dump($pageposbefore.'-'.$pageposafter.'-'.$showpricebeforepagebreak); - $pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage + $heightoftitleline + 1; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // Date - if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order') + if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order') { $date = $element->date_commande; - else { + } else { $date = $element->date; - if (empty($date)) + if (empty($date)) { $date = $element->datep; - if (empty($date)) + } + if (empty($date)) { $date = $element->date_contrat; - if (empty($date)) + } + if (empty($date)) { $date = $element->datev; // Fiche inter + } } $pdf->SetXY($this->posxdate, $curY); $pdf->MultiCell($this->posxsociety - $this->posxdate, 3, dol_print_date($date, 'day'), 1, 'C'); $pdf->SetXY($this->posxsociety, $curY); - if ($classname == 'ExpenseReport') - { + if ($classname == 'ExpenseReport') { $fuser = new User($this->db); $fuser->fetch($element->fk_user_author); $pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, $fuser->getFullName($outputlangs), 1, 'L'); @@ -595,8 +682,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->MultiCell($this->posxstatut - $this->posxamountttc, 3, (isset($element->total_ttc) ? price($element->total_ttc) : ''), 1, 'R'); } else { $pdf->SetXY($this->posxamountht, $curY); - if ($key == 'agenda') - { + if ($key == 'agenda') { $textforamount = dol_trunc($element->label, 26); $pdf->MultiCell($this->posxstatut - $this->posxamountht, 3, $textforamount, 1, 'L'); } else { @@ -641,20 +727,23 @@ class pdf_beluga extends ModelePDFProjects $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); $this->_pagefoot($pdf, $object, $outputlangs, 1); $pagenb++; $pdf->setPage($pagenb); $pdf->setPageOrientation($this->orientation, 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 (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -665,14 +754,14 @@ class pdf_beluga extends ModelePDFProjects $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -766,10 +855,8 @@ class pdf_beluga extends ModelePDFProjects // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -778,7 +865,9 @@ class pdf_beluga extends ModelePDFProjects $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); @@ -795,8 +884,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : ".dol_print_date($object->date_end, 'day', false, $outputlangs, true), '', 'R'); - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $posy += 6; $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : ".$object->thirdparty->getFullName($outputlangs), '', 'R'); diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 5426e076d33..ef2ec4fcaf8 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -37,6 +37,31 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class pdf_timespent extends ModelePDFProjects { + /** + * @var DoliDb Database handler + */ + public $db; + + /** + * @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 document type + */ + public $type; + /** * @var array Minimum version of PHP required by module. * e.g.: PHP ≥ 5.6 = array(5, 6) @@ -49,6 +74,41 @@ class pdf_timespent extends ModelePDFProjects */ public $version = 'dolibarr'; + /** + * @var int page_largeur + */ + public $page_largeur; + + /** + * @var int page_hauteur + */ + public $page_hauteur; + + /** + * @var array format + */ + public $format; + + /** + * @var int marge_gauche + */ + public $marge_gauche; + + /** + * @var int marge_droite + */ + public $marge_droite; + + /** + * @var int marge_haute + */ + public $marge_haute; + + /** + * @var int marge_basse + */ + public $marge_basse; + /** * Issuer * @var Societe Object that emits @@ -70,6 +130,7 @@ class pdf_timespent extends ModelePDFProjects $this->db = $db; $this->name = "timespent"; $this->description = $langs->trans("DocumentModelTimeSpent"); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -88,7 +149,9 @@ class pdf_timespent extends ModelePDFProjects // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->posxref = $this->marge_gauche + 1; @@ -98,8 +161,7 @@ class pdf_timespent extends ModelePDFProjects //$this->posxprogress=$this->marge_gauche+140; $this->posxuser = $this->marge_gauche + 147; //$this->posxdateend = $this->marge_gauche + 169; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxref -= 20; $this->posxlabel -= 20; $this->posxtimespent -= 20; @@ -123,36 +185,37 @@ class pdf_timespent extends ModelePDFProjects // phpcs:enable global $conf, $hookmanager, $langs, $user; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".pdf"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -169,17 +232,17 @@ class pdf_timespent extends ModelePDFProjects $heightforinfotot = 40; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -188,8 +251,7 @@ class pdf_timespent extends ModelePDFProjects $task = new Task($this->db); $tasksarray = $task->getTasksArray(0, 0, $object->id); - if (!$object->id > 0) // Special case when used with object = specimen, we may return all lines - { + if (!$object->id > 0) { // Special case when used with object = specimen, we may return all lines $tasksarray = array_slice($tasksarray, 0, min(5, count($tasksarray))); } @@ -205,13 +267,17 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -225,8 +291,7 @@ class pdf_timespent extends ModelePDFProjects // Show public note $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -259,8 +324,7 @@ class pdf_timespent extends ModelePDFProjects // TODO We should loop on record of times spent grouped by user instead of lines of tasks // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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); @@ -284,8 +348,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetXY($this->posxlabel, $curY); $pdf->MultiCell($this->posxtimespent - $this->posxlabel, 3, $outputlangs->convToOutputCharset($libelleline), 0, 'L'); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -296,33 +359,40 @@ class pdf_timespent extends ModelePDFProjects $pdf->MultiCell($this->posxtimespent - $this->posxlabel, 3, $outputlangs->convToOutputCharset($libelleline), 0, 'L'); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } $forcedesconsamepage = 1; - if ($forcedesconsamepage) - { + if ($forcedesconsamepage) { $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposafter + 1); $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->MultiCell(0, 3, ''); // Set interline to 3 @@ -355,7 +425,8 @@ class pdf_timespent extends ModelePDFProjects // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { //var_dump($pageposbefore.'-'.$pageposafter.'-'.$showpricebeforepagebreak); - $pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage + $heightoftitleline + 1; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font @@ -378,8 +449,7 @@ class pdf_timespent extends ModelePDFProjects */ // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -390,11 +460,9 @@ class pdf_timespent extends ModelePDFProjects $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -403,12 +471,12 @@ class pdf_timespent extends ModelePDFProjects $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -416,21 +484,29 @@ class pdf_timespent extends ModelePDFProjects $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); - else $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); + } else { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0); + } $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; // Footer of the page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -441,14 +517,14 @@ class pdf_timespent extends ModelePDFProjects $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -539,10 +615,8 @@ class pdf_timespent extends ModelePDFProjects // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -551,7 +625,9 @@ class pdf_timespent extends ModelePDFProjects $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L'); $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } - } else $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } else { + $pdf->MultiCell(100, 4, $outputlangs->transnoentities($this->emetteur->name), 0, 'L'); + } $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); @@ -568,8 +644,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : ".dol_print_date($object->date_end, 'day', false, $outputlangs, true), '', 'R'); - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $posy += 6; $pdf->SetXY($posx, $posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : ".$object->thirdparty->getFullName($outputlangs), '', 'R'); @@ -581,25 +656,25 @@ class pdf_timespent extends ModelePDFProjects /* Removed: A project can have more than thousands linked objects (orders, invoices, proposals, etc.... $object->fetchObjectLinked(); - foreach($object->linkedObjects as $objecttype => $objects) - { - var_dump($objects);exit; - if ($objecttype == 'commande') - { - $outputlangs->load('orders'); - $num=count($objects); - for ($i=0;$i<$num;$i++) - { - $posy+=4; - $pdf->SetXY($posx,$posy); - $pdf->SetFont('','', $default_font_size - 1); - $text=$objects[$i]->ref; - if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); - } - } - } - */ + foreach($object->linkedObjects as $objecttype => $objects) + { + var_dump($objects);exit; + if ($objecttype == 'commande') + { + $outputlangs->load('orders'); + $num=count($objects); + for ($i=0;$i<$num;$i++) + { + $posy+=4; + $pdf->SetXY($posx,$posy); + $pdf->SetFont('','', $default_font_size - 1); + $text=$objects[$i]->ref; + if ($objects[$i]->ref_client) $text.=' ('.$objects[$i]->ref_client.')'; + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R'); + } + } + } + */ } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/project/index.html b/htdocs/core/modules/project/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 0c77ccc198d..b1dbe4bae48 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -65,7 +65,7 @@ class mod_project_simple extends ModeleNumRefProjects public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -90,7 +90,8 @@ class mod_project_simple extends ModeleNumRefProjects { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -98,13 +99,14 @@ class mod_project_simple extends ModeleNumRefProjects $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { return true; } else { $langs->load("errors"); @@ -133,11 +135,13 @@ class mod_project_simple extends ModeleNumRefProjects $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_project_simple::getNextValue", LOG_DEBUG); return -1; @@ -148,8 +152,11 @@ class mod_project_simple extends ModeleNumRefProjects //$yymm = strftime("%y%m",time()); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_project_simple::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 7c7ed786d92..3ab4079c1b7 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -109,8 +109,7 @@ class mod_project_universal extends ModeleNumRefProjects $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -132,8 +131,7 @@ class mod_project_universal extends ModeleNumRefProjects // On defini critere recherche compteur $mask = $conf->global->PROJECT_UNIVERSAL_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 6f174a27d7a..dc3f19d72fd 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -106,12 +106,12 @@ abstract class ModelePDFProjects extends CommonDocGenerator global $conf; $type = 'project'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -195,10 +195,16 @@ abstract class ModeleNumRefProjects global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; - else return $langs->trans("NotAvailable"); + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } else { + return $langs->trans("NotAvailable"); + } } } diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 4ff95328029..2d263aae6c0 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -38,16 +38,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; -if (!empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -if (!empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; -if (!empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.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.class.php'; +} +if (!empty($conf->contrat->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; +} +if (!empty($conf->ficheinter->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; +} +if (!empty($conf->deplacement->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; +} +if (!empty($conf->agenda->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +} /** @@ -114,7 +134,9 @@ class doc_generic_task_odt extends ModelePDFTask // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->pays_code) $this->emetteur->pays_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + if (!$this->emetteur->pays_code) { + $this->emetteur->pays_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + } } @@ -148,8 +170,7 @@ class doc_generic_task_odt extends ModelePDFTask ); // Retrieve extrafields - if (is_array($object->array_options) && count($object->array_options)) - { + if (is_array($object->array_options) && count($object->array_options)) { $object->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs); @@ -193,8 +214,7 @@ class doc_generic_task_odt extends ModelePDFTask ); // Retrieve extrafields - if (is_array($task->array_options) && count($task->array_options)) - { + if (is_array($task->array_options) && count($task->array_options)) { $task->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($task, $resarray, $extrafields, $array_key, $outputlangs); @@ -369,17 +389,20 @@ class doc_generic_task_odt extends ModelePDFTask $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -398,8 +421,7 @@ class doc_generic_task_odt extends ModelePDFTask // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= $nbofiles; @@ -407,14 +429,13 @@ class doc_generic_task_odt extends ModelePDFTask $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } $texte .= ''; @@ -444,29 +465,27 @@ class doc_generic_task_odt extends ModelePDFTask // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Task($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -477,21 +496,20 @@ class doc_generic_task_odt extends ModelePDFTask $dir = $conf->projet->dir_output."/".$project->ref."/"; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.(ods|odt)/i', '', $newfile); @@ -531,8 +549,7 @@ class doc_generic_task_odt extends ModelePDFTask 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -555,13 +572,14 @@ class doc_generic_task_odt extends ModelePDFTask $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other); complete_substitutions_array($tmparray, $outputlangs, $object); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -575,12 +593,13 @@ class doc_generic_task_odt extends ModelePDFTask try { // Security check $socid = 0; - if (!empty($project->fk_soc)) $socid = $project->fk_soc; + if (!empty($project->fk_soc)) { + $socid = $project->fk_soc; + } $tmparray = $this->get_substitutionarray_tasks($object, $outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $odfHandler->setVars($key, $val, true, 'UTF-8'); } catch (OdfException $e) { @@ -595,17 +614,14 @@ class doc_generic_task_odt extends ModelePDFTask $contact_arrray = array(); foreach ($sourcearray as $source) { $contact_temp = $object->liste_contact(-1, $source); - if ((is_array($contact_temp) && count($contact_temp) > 0)) - { + if ((is_array($contact_temp) && count($contact_temp) > 0)) { $contact_arrray = array_merge($contact_arrray, $contact_temp); } } - if ((is_array($contact_arrray) && count($contact_arrray) > 0)) - { + if ((is_array($contact_arrray) && count($contact_arrray) > 0)) { $listlinestaskres = $odfHandler->setSegment('tasksressources'); - foreach ($contact_arrray as $contact) - { + foreach ($contact_arrray as $contact) { if ($contact['source'] == 'internal') { $objectdetail = new User($this->db); $objectdetail->fetch($contact['id']); @@ -622,8 +638,7 @@ class doc_generic_task_odt extends ModelePDFTask $tmparray = $this->get_substitutionarray_tasksressource($contact, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlinestaskres->setVars($key, $val, true, 'UTF-8'); } catch (OdfException $e) { @@ -647,14 +662,12 @@ class doc_generic_task_odt extends ModelePDFTask $sql .= " ORDER BY t.task_date DESC"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $tasks = array(); $listlinestasktime = $odfHandler->setSegment('taskstimes'); - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_array($resql); if (!empty($row['fk_user'])) { $objectdetail = new User($this->db); @@ -667,15 +680,12 @@ class doc_generic_task_odt extends ModelePDFTask $tmparray = $this->get_substitutionarray_taskstime($row, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlinestasktime->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); } } @@ -695,19 +705,15 @@ class doc_generic_task_odt extends ModelePDFTask $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', 'name', SORT_ASC, 1); - foreach ($filearray as $filedetail) - { + foreach ($filearray as $filedetail) { $tmparray = $this->get_substitutionarray_task_file($filedetail, $outputlangs); //dol_syslog(get_class($this).'::main $tmparray'.var_export($tmparray,true)); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listtasksfiles->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); } } @@ -716,8 +722,7 @@ class doc_generic_task_odt extends ModelePDFTask //$listlines->merge(); $odfHandler->mergeSegment($listtasksfiles); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -733,28 +738,23 @@ class doc_generic_task_odt extends ModelePDFTask $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', 'name', SORT_ASC, 1); - foreach ($filearray as $filedetail) - { + foreach ($filearray as $filedetail) { //dol_syslog(get_class($this).'::main $filedetail'.var_export($filedetail,true)); $tmparray = $this->get_substitutionarray_project_file($filedetail, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -765,18 +765,15 @@ class doc_generic_task_odt extends ModelePDFTask $contact_arrray = array(); foreach ($sourcearray as $source) { $contact_temp = $project->liste_contact(-1, $source); - if ((is_array($contact_temp) && count($contact_temp) > 0)) - { + if ((is_array($contact_temp) && count($contact_temp) > 0)) { $contact_arrray = array_merge($contact_arrray, $contact_temp); } } - if ((is_array($contact_arrray) && count($contact_arrray) > 0)) - { + if ((is_array($contact_arrray) && count($contact_arrray) > 0)) { try { $listlines = $odfHandler->setSegment('projectcontacts'); - foreach ($contact_arrray as $contact) - { + foreach ($contact_arrray as $contact) { if ($contact['source'] == 'internal') { $objectdetail = new User($this->db); $objectdetail->fetch($contact['id']); @@ -793,23 +790,19 @@ class doc_generic_task_odt extends ModelePDFTask $tmparray = $this->get_substitutionarray_project_contacts($contact, $outputlangs); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -843,8 +836,9 @@ class doc_generic_task_odt extends ModelePDFTask $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/project/task/doc/index.html b/htdocs/core/modules/project/task/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/project/task/index.html b/htdocs/core/modules/project/task/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 1451ce26412..f0cdddfbc88 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -65,7 +65,7 @@ class mod_task_simple extends ModeleNumRefTask public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -90,7 +90,8 @@ class mod_task_simple extends ModeleNumRefTask { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(task.ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -99,13 +100,14 @@ class mod_task_simple extends ModeleNumRefTask $sql .= " AND task.ref LIKE '".$db->escape($this->prefix)."____-%'"; $sql .= " AND project.entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { return true; } else { $langs->load("errors"); @@ -133,11 +135,13 @@ class mod_task_simple extends ModeleNumRefTask $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_task_simple::getNextValue", LOG_DEBUG); return -1; @@ -148,8 +152,11 @@ class mod_task_simple extends ModeleNumRefTask //$yymm = strftime("%y%m",time()); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_task_simple::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index 2600538f273..09ba33332f1 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -52,12 +52,12 @@ abstract class ModelePDFTask extends CommonDocGenerator global $conf; $type = 'project_task'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -141,9 +141,15 @@ abstract class ModeleNumRefTask global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7b2ac19a016..4a292d4a97b 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -95,7 +95,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -119,8 +121,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -132,17 +133,20 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->PROPALE_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -161,8 +165,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->PROPALE_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->PROPALE_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -170,37 +173,35 @@ class doc_generic_proposal_odt extends ModelePDFPropales $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; - // Set default template for different status of proposal - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + // Set default template for different status of proposal + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFPropales::liste_modeles($this->db); + $list = ModelePDFPropales::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
    '.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); $texte .= "
    '.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); $texte .= "
    '.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); $texte .= "
    '; } @@ -240,38 +241,35 @@ class doc_generic_proposal_odt extends ModelePDFPropales // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->propal->multidir_output[$conf->entity]) - { + if ($conf->propal->multidir_output[$conf->entity]) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Propal($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -281,20 +279,19 @@ class doc_generic_proposal_odt extends ModelePDFPropales $dir = $conf->propal->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -305,10 +302,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -325,16 +323,14 @@ class doc_generic_proposal_odt extends ModelePDFPropales // If CUSTOMER contact defined on proposal, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -361,8 +357,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Line of free text $newfreetext = ''; $paramfreetext = 'PROPOSAL_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -378,8 +373,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -395,8 +389,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // 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); } @@ -410,7 +403,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -419,19 +414,19 @@ class doc_generic_proposal_odt extends ModelePDFPropales $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -440,32 +435,26 @@ class doc_generic_proposal_odt extends ModelePDFPropales $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -473,8 +462,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -482,12 +470,10 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -517,8 +503,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/propale/doc/index.html b/htdocs/core/modules/propale/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index e138fb43305..15de98e9a58 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -30,6 +30,7 @@ * \ingroup propale * \brief File of Class to generate PDF proposal with Azur template */ + require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -162,12 +163,13 @@ class pdf_azur extends ModelePDFPropales // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva = 101; $this->posxup = 118; $this->posxqty = 135; @@ -180,10 +182,11 @@ class pdf_azur extends ModelePDFPropales } $this->posxdiscount = 162; $this->postotalht = 174; - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxtva = $this->posxup; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { + $this->posxtva = $this->posxup; + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -217,9 +220,13 @@ class pdf_azur extends ModelePDFPropales // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); @@ -228,18 +235,17 @@ class pdf_azur extends ModelePDFPropales // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -248,22 +254,16 @@ class pdf_azur extends ModelePDFPropales } $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { + foreach ($pdir as $midir) { + if (!$arephoto) { if ($conf->product->entity != $objphoto->entity) { $dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities } else { $dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product } - - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -278,21 +278,23 @@ class pdf_azur extends ModelePDFPropales } } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + if ($realpath && $arephoto) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxtva; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxtva; + } - if ($conf->propal->multidir_output[$conf->entity]) - { + if ($conf->propal->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); $deja_regle = 0; // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->propal->multidir_output[$conf->entity]; $file = $dir."/SPECIMEN.pdf"; } else { @@ -301,20 +303,16 @@ class pdf_azur extends ModelePDFPropales $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -328,18 +326,17 @@ class pdf_azur extends ModelePDFPropales $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) { - $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) { - $logodir = $conf->mycompany->multidir_output[$object->entity]; - } + $logodir = $conf->mycompany->dir_output; + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -353,20 +350,19 @@ class pdf_azur extends ModelePDFPropales $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } - if (empty($this->atleastonediscount)) - { + if (empty($this->atleastonediscount)) { $delta = ($this->postotalht - $this->posxdiscount); $this->posxpicture += $delta; $this->posxtva += $delta; @@ -379,14 +375,18 @@ class pdf_azur extends ModelePDFPropales // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $heightforinfotot = 40; // Height reserved to output the info and total part $heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE) ? (pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature")) + 10) : 0; $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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } //print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); @@ -399,11 +399,9 @@ class pdf_azur extends ModelePDFPropales $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -421,15 +419,15 @@ class pdf_azur extends ModelePDFPropales // Affiche notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } // Extrafields in note @@ -437,16 +435,18 @@ class pdf_azur extends ModelePDFPropales if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) - { + if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) { $tmpuser = new User($this->db); $tmpuser->fetch($object->user_author_id); $notetoshow .= $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); - if ($tmpuser->email) $notetoshow .= ', Mail: '.$tmpuser->email; - if ($tmpuser->office_phone) $notetoshow .= ', Tel: '.$tmpuser->office_phone; + if ($tmpuser->email) { + $notetoshow .= ', Mail: '.$tmpuser->email; + } + if ($tmpuser->office_phone) { + $notetoshow .= ', Tel: '.$tmpuser->office_phone; + } } - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); @@ -471,15 +471,16 @@ class pdf_azur extends ModelePDFPropales $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + if (!empty($realpatharray[$i])) { + $imglinesize = pdf_getSizeForImage($realpatharray[$i]); + } $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. @@ -490,23 +491,27 @@ class pdf_azur extends ModelePDFPropales $posYAfterDescription = 0; // We start with Photo of product line - if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) // If photo too high, we moved completely on new page - { + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (isset($imglinesize['width']) && isset($imglinesize['height'])) - { + if (isset($imglinesize['width']) && isset($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxtva - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -519,8 +524,7 @@ class pdf_azur extends ModelePDFPropales $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxpicture - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -530,22 +534,26 @@ class pdf_azur extends ModelePDFPropales $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 + $heightforsignature + $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 - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -562,14 +570,14 @@ class pdf_azur extends ModelePDFPropales // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // VAT Rate - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva - 5, $curY); $pdf->MultiCell($this->posxup - $this->posxtva + 4, 3, $vat_rate, 0, 'R'); @@ -586,8 +594,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L'); @@ -595,8 +602,7 @@ class pdf_azur extends ModelePDFPropales // Discount on line $pdf->SetXY($this->posxdiscount, $curY); - if ($object->lines[$i]->remise_percent) - { + if ($object->lines[$i]->remise_percent) { $pdf->SetXY($this->posxdiscount - 2, $curY); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 2, 3, $remise_percent, 0, 'R'); @@ -608,8 +614,11 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -618,36 +627,48 @@ class pdf_azur extends ModelePDFPropales $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = $posYAfterImage; + if ($posYAfterImage > $posYAfterDescription) { + $nexY = $posYAfterImage; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -658,11 +679,9 @@ class pdf_azur extends ModelePDFPropales $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -671,12 +690,12 @@ class pdf_azur extends ModelePDFPropales $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -684,15 +703,18 @@ class pdf_azur extends ModelePDFPropales $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter + 1; } else { @@ -715,18 +737,18 @@ class pdf_azur extends ModelePDFPropales */ // Customer signature area - if (empty($conf->global->PROPAL_DISABLE_SIGNATURE)) - { + if (empty($conf->global->PROPAL_DISABLE_SIGNATURE)) { $posy = $this->_signature_area($pdf, $object, $posy, $outputlangs); } // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } //If propal merge product PDF is active - if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) - { + if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php'; $already_merged = array(); @@ -756,8 +778,7 @@ class pdf_azur extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (!empty($linefile->id) && !empty($linefile->file_name)) { - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (!empty($conf->product->enabled)) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; } elseif (!empty($conf->service->enabled)) { @@ -803,14 +824,14 @@ class pdf_azur extends ModelePDFPropales $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) - { + 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); @@ -861,8 +882,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -873,8 +893,7 @@ class pdf_azur extends ModelePDFPropales $posxval = 52; // Show shipping date - if (!empty($object->delivery_date)) - { + if (!empty($object->delivery_date)) { $outputlangs->load("sendings"); $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); @@ -886,8 +905,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell(80, 4, $dlp, 0, 'L'); $posy = $pdf->GetY() + 1; - } elseif ($object->availability_code || $object->availability) // Show availability conditions - { + } elseif ($object->availability_code || $object->availability) { // Show availability conditions $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; @@ -903,8 +921,7 @@ class pdf_azur extends ModelePDFPropales } // Show payments conditions - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) - { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -919,8 +936,7 @@ class pdf_azur extends ModelePDFPropales $posy = $pdf->GetY() + 3; } - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) - { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) { // Check a payment mode is defined /* Not required on a proposal if (empty($object->mode_reglement_code) @@ -940,8 +956,7 @@ class pdf_azur extends ModelePDFPropales // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') - { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -955,15 +970,12 @@ class pdf_azur extends ModelePDFPropales } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // Si mode reglement non force ou si force a CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -972,23 +984,20 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -999,12 +1008,12 @@ class pdf_azur extends ModelePDFPropales } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { - if (!empty($object->fk_account) || !empty($object->fk_bank) || !empty($conf->global->FACTURE_RIB_NUMBER)) - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { + if (!empty($object->fk_account) || !empty($object->fk_bank) || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = (empty($object->fk_account) ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if (!empty($object->fk_bank)) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if (!empty($object->fk_bank)) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -1044,9 +1053,9 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -1069,32 +1078,28 @@ class pdf_azur extends ModelePDFPropales $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1107,18 +1112,17 @@ class pdf_azur extends ModelePDFPropales } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; @@ -1127,8 +1131,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1143,18 +1146,15 @@ class pdf_azur extends ModelePDFPropales } //} // VAT - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1170,22 +1170,20 @@ class pdf_azur extends ModelePDFPropales //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1198,27 +1196,25 @@ class pdf_azur extends ModelePDFPropales } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1253,8 +1249,7 @@ class pdf_azur extends ModelePDFPropales if (! empty($object->paye)) $resteapayer=0; */ - if ($deja_regle > 0) - { + if ($deja_regle > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -1316,7 +1311,9 @@ class pdf_azur extends ModelePDFPropales // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1325,14 +1322,15 @@ class pdf_azur extends ModelePDFPropales $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -1341,29 +1339,24 @@ class pdf_azur extends ModelePDFPropales // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { $pdf->line($this->posxpicture - 1, $tab_top, $this->posxpicture - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$pdf->SetXY($this->posxpicture-1, $tab_top+1); //$pdf->MultiCell($this->posxtva-$this->posxpicture-1,2, $outputlangs->transnoentities("Photo"),'','C'); } } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { // Not do -3 and +3 instead of -1 -1 to have more space for text 'Sales tax' $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); @@ -1371,15 +1364,13 @@ class pdf_azur extends ModelePDFPropales } $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } @@ -1388,26 +1379,27 @@ class pdf_azur extends ModelePDFPropales $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', - 'C'); + $pdf->MultiCell( + $this->posxdiscount - $this->posxunit - 1, + 2, + $outputlangs->transnoentities("Unit"), + '', + 'C' + ); } } $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { - if ($this->atleastonediscount) - { + if (empty($hidetop)) { + if ($this->atleastonediscount) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); } - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -1435,8 +1427,7 @@ class pdf_azur extends ModelePDFPropales pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->PROPALE_DRAFT_WATERMARK); } @@ -1449,20 +1440,18 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1493,35 +1482,31 @@ class pdf_azur extends ModelePDFPropales $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -1535,8 +1520,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, "day", false, $outputlangs, true), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1544,11 +1528,9 @@ class pdf_azur extends ModelePDFPropales } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1564,30 +1546,29 @@ class pdf_azur extends ModelePDFPropales // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of proposal if defined + // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user($arrayidcontact[0]); - $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (count($arrayidcontact) > 0) { + $object->fetch_user($arrayidcontact[0]); + $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender $posy = 42 + $top_shift; - $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -1615,8 +1596,7 @@ class pdf_azur extends ModelePDFPropales // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1630,14 +1610,19 @@ class pdf_azur extends ModelePDFPropales $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42 + $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 7c9f4e6fe77..b7e44c6c4d5 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -78,9 +78,9 @@ class pdf_cyan extends ModelePDFPropales */ public $version = 'dolibarr'; - /** - * @var int page_largeur - */ + /** + * @var int page_largeur + */ public $page_largeur; /** @@ -120,7 +120,7 @@ class pdf_cyan extends ModelePDFPropales public $emetteur; /** - * @var array of document table collumns + * @var array of document table columns */ public $cols; @@ -166,7 +166,9 @@ class pdf_cyan extends ModelePDFPropales // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff @@ -202,9 +204,13 @@ class pdf_cyan extends ModelePDFPropales dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal")); @@ -227,18 +233,17 @@ class pdf_cyan extends ModelePDFPropales // 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_PROPOSALS_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto->fetch($object->lines[$i]->fk_product); //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; } else { @@ -247,22 +252,17 @@ class pdf_cyan extends ModelePDFPropales } $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { + foreach ($pdir as $midir) { + if (!$arephoto) { if ($conf->product->entity != $objphoto->entity) { $dir = $conf->product->multidir_output[$objphoto->entity].'/'.$midir; //Check repertories of current entities } else { $dir = $conf->product->dir_output.'/'.$midir; //Check repertory of the current product } - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -278,21 +278,23 @@ class pdf_cyan extends ModelePDFPropales } } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + if ($realpath && $arephoto) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxtva; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxtva; + } - if ($conf->propal->multidir_output[$conf->entity]) - { + if ($conf->propal->multidir_output[$conf->entity]) { $object->fetch_thirdparty(); $deja_regle = 0; // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->propal->multidir_output[$conf->entity]; $file = $dir."/SPECIMEN.pdf"; } else { @@ -301,20 +303,16 @@ class pdf_cyan extends ModelePDFPropales $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -332,18 +330,17 @@ class pdf_cyan extends ModelePDFPropales $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) { - $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) { - $logodir = $conf->mycompany->multidir_output[$object->entity]; - } + $logodir = $conf->mycompany->dir_output; + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -357,15 +354,15 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } @@ -373,7 +370,9 @@ class pdf_cyan extends ModelePDFPropales // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $heightforinfotot = 40; // Height reserved to output the info and total part @@ -394,11 +393,9 @@ class pdf_cyan extends ModelePDFPropales // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -416,15 +413,15 @@ class pdf_cyan extends ModelePDFPropales // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) - { + if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) { // Get first sale rep - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { $salereparray = $object->thirdparty->getSalesRepresentatives($user); $salerepobj = new User($this->db); $salerepobj->fetch($salereparray[0]['id']); - if (!empty($salerepobj->signature)) $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + if (!empty($salerepobj->signature)) { + $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature); + } } } @@ -434,20 +431,22 @@ class pdf_cyan extends ModelePDFPropales $notetoshow = dol_concatdesc($notetoshow, $extranote); } - if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) - { + if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) { $tmpuser = new User($this->db); $tmpuser->fetch($object->user_author_id); $notetoshow .= $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); - if ($tmpuser->email) $notetoshow .= ', Mail: '.$tmpuser->email; - if ($tmpuser->office_phone) $notetoshow .= ', Tel: '.$tmpuser->office_phone; + if ($tmpuser->email) { + $notetoshow .= ', Mail: '.$tmpuser->email; + } + if ($tmpuser->office_phone) { + $notetoshow .= ', Tel: '.$tmpuser->office_phone; + } } $tab_height = $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter; $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; @@ -466,16 +465,19 @@ class pdf_cyan extends ModelePDFPropales $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + 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); + 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. @@ -491,8 +493,7 @@ class pdf_cyan extends ModelePDFPropales $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -529,8 +530,12 @@ class pdf_cyan extends ModelePDFPropales // 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); + 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 @@ -541,15 +546,18 @@ class pdf_cyan extends ModelePDFPropales $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -573,15 +581,16 @@ class pdf_cyan extends ModelePDFPropales // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + if (!empty($realpatharray[$i])) { + $imglinesize = pdf_getSizeForImage($realpatharray[$i]); + } $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. @@ -591,26 +600,27 @@ class pdf_cyan extends ModelePDFPropales $posYAfterImage = 0; $posYAfterDescription = 0; - if ($this->getColumnStatus('photo')) - { + 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 + $heightforsignature + $heightforinfotot))) // If photo too high, we moved completely on new page - { + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $heightforinfotot))) { // If photo too high, we moved completely on new page $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -618,15 +628,13 @@ class pdf_cyan extends ModelePDFPropales } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + 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. @@ -636,20 +644,22 @@ class pdf_cyan extends ModelePDFPropales $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 + $heightforsignature + $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 - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforsignature + $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); + 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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -667,22 +677,21 @@ class pdf_cyan extends ModelePDFPropales // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if ($this->getColumnStatus('vat')) - { + if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'vat', $vat_rate); $nexY = max($pdf->GetY(), $nexY); } // Unit price before discount - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'subprice', $up_excl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -690,8 +699,7 @@ class pdf_cyan extends ModelePDFPropales // Quantity // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { + if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); $nexY = max($pdf->GetY(), $nexY); @@ -699,32 +707,28 @@ class pdf_cyan extends ModelePDFPropales // Unit - if ($this->getColumnStatus('unit')) - { + if ($this->getColumnStatus('unit')) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $this->printStdColumnContent($pdf, $curY, 'unit', $unit); $nexY = max($pdf->GetY(), $nexY); } // Discount on line - if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) - { + if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'discount', $remise_percent); $nexY = max($pdf->GetY(), $nexY); } // Total excl tax line (HT) - if ($this->getColumnStatus('totalexcltax')) - { + if ($this->getColumnStatus('totalexcltax')) { $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalexcltax', $total_excl_tax); $nexY = max($pdf->GetY(), $nexY); } // Total with tax line (TTC) - if ($this->getColumnStatus('totalincltax')) - { + if ($this->getColumnStatus('totalincltax')) { $total_incl_tax = pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -733,8 +737,7 @@ class pdf_cyan extends ModelePDFPropales // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -755,8 +758,11 @@ class pdf_cyan extends ModelePDFPropales // Collection of totals by value of vat in $this->tva["rate"] = total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -765,16 +771,21 @@ class pdf_cyan extends ModelePDFPropales $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; @@ -788,11 +799,17 @@ class pdf_cyan extends ModelePDFPropales $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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = max($nexY, $posYAfterImage); + if ($posYAfterImage > $posYAfterDescription) { + $nexY = max($nexY, $posYAfterImage); + } // Add line if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { @@ -817,7 +834,9 @@ class pdf_cyan extends ModelePDFPropales $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 (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) { @@ -829,15 +848,18 @@ class pdf_cyan extends ModelePDFPropales $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + if ($pagenb == $pageposbeforeprintlines) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter + 1; } else { @@ -860,18 +882,18 @@ class pdf_cyan extends ModelePDFPropales */ // Customer signature area - if (empty($conf->global->PROPAL_DISABLE_SIGNATURE)) - { + if (empty($conf->global->PROPAL_DISABLE_SIGNATURE)) { $posy = $this->drawSignatureArea($pdf, $object, $posy, $outputlangs); } // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } //If propal merge product PDF is active - if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) - { + if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php'; $already_merged = array(); @@ -901,8 +923,7 @@ class pdf_cyan extends ModelePDFPropales if (count($filetomerge->lines) > 0) { foreach ($filetomerge->lines as $linefile) { if (!empty($linefile->id) && !empty($linefile->file_name)) { - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { if (!empty($conf->product->enabled)) { $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir($product->id, 2, 0, 0, $product, 'product').$product->id."/photos"; } elseif (!empty($conf->service->enabled)) { @@ -948,14 +969,14 @@ class pdf_cyan extends ModelePDFPropales $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) - { + 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); @@ -1000,8 +1021,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -1012,8 +1032,7 @@ class pdf_cyan extends ModelePDFPropales $posxval = 52; // Show shipping date - if (!empty($object->delivery_date)) - { + if (!empty($object->delivery_date)) { $outputlangs->load("sendings"); $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); @@ -1025,8 +1044,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->MultiCell(80, 4, $dlp, 0, 'L'); $posy = $pdf->GetY() + 1; - } elseif ($object->availability_code || $object->availability) // Show availability conditions - { + } elseif ($object->availability_code || $object->availability) { // Show availability conditions $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; @@ -1042,8 +1060,7 @@ class pdf_cyan extends ModelePDFPropales } // Show payments conditions - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) - { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -1058,8 +1075,7 @@ class pdf_cyan extends ModelePDFPropales $posy = $pdf->GetY() + 3; } - if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) - { + if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) { // Check a payment mode is defined /* Not required on a proposal if (empty($object->mode_reglement_code) @@ -1079,8 +1095,7 @@ class pdf_cyan extends ModelePDFPropales // Show payment mode if ($object->mode_reglement_code && $object->mode_reglement_code != 'CHQ' - && $object->mode_reglement_code != 'VIR') - { + && $object->mode_reglement_code != 'VIR') { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -1094,15 +1109,12 @@ class pdf_cyan extends ModelePDFPropales } // Show payment mode CHQ - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ') { // Si mode reglement non force ou si force a CHQ - if (!empty($conf->global->FACTURE_CHQ_NUMBER)) - { + if (!empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE); - if ($conf->global->FACTURE_CHQ_NUMBER > 0) - { + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); $account->fetch($conf->global->FACTURE_CHQ_NUMBER); @@ -1111,23 +1123,20 @@ class pdf_cyan extends ModelePDFPropales $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy = $pdf->GetY() + 2; } } - if ($conf->global->FACTURE_CHQ_NUMBER == -1) - { + if ($conf->global->FACTURE_CHQ_NUMBER == -1) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', 'B', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $this->emetteur->name), 0, 'L', 0); $posy = $pdf->GetY() + 1; - if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) - { + if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); @@ -1138,12 +1147,12 @@ class pdf_cyan extends ModelePDFPropales } // If payment mode not forced or forced to VIR, show payment with BAN - if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') - { - if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) - { + if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { + if ($object->fk_account > 0 || $object->fk_bank > 0 || !empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid = ($object->fk_account <= 0 ? $conf->global->FACTURE_RIB_NUMBER : $object->fk_account); - if ($object->fk_bank > 0) $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + if ($object->fk_bank > 0) { + $bankid = $object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank + } $account = new Account($this->db); $account->fetch($bankid); @@ -1190,9 +1199,9 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -1215,32 +1224,28 @@ class pdf_cyan extends ModelePDFPropales $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $tvaisnull = ((!empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000'])) ? true : false); - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) - { + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_IFNULL) && $tvaisnull) { // Nothing to do } else { //Local tax 1 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1254,18 +1259,17 @@ class pdf_cyan extends ModelePDFPropales } } } - //} + //} //Local tax 2 before VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('1', '3', '5'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('1', '3', '5'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; @@ -1274,8 +1278,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1291,18 +1294,15 @@ class pdf_cyan extends ModelePDFPropales } //} // VAT - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1319,22 +1319,20 @@ class pdf_cyan extends ModelePDFPropales //Local tax 1 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1348,27 +1346,25 @@ class pdf_cyan extends ModelePDFPropales } } } - //} + //} //Local tax 2 after VAT //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { + foreach ($localtax_rate as $tvakey => $tvaval) { // retrieve global local tax - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1405,8 +1401,7 @@ class pdf_cyan extends ModelePDFPropales if (! empty($object->paye)) $resteapayer=0; */ - if ($deja_regle > 0) - { + if ($deja_regle > 0) { // Already paid + Deposits $index++; @@ -1470,7 +1465,9 @@ class pdf_cyan extends ModelePDFPropales // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1479,8 +1476,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency)); @@ -1531,8 +1527,7 @@ class pdf_cyan extends ModelePDFPropales pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) - { + if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->PROPALE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->PROPALE_DRAFT_WATERMARK); } @@ -1547,14 +1542,13 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; @@ -1586,8 +1580,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -1596,35 +1589,31 @@ class pdf_cyan extends ModelePDFPropales $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->projet->title), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -1643,8 +1632,7 @@ class pdf_cyan extends ModelePDFPropales } $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->fin_validite, "day", false, $outputlangs, true), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1652,11 +1640,9 @@ class pdf_cyan extends ModelePDFPropales } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1672,31 +1658,30 @@ class pdf_cyan extends ModelePDFPropales // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of proposal if defined + // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user($arrayidcontact[0]); - $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (count($arrayidcontact) > 0) { + $object->fetch_user($arrayidcontact[0]); + $labelbeforecontactname = ($outputlangs->transnoentities("FromContactName") != 'FromContactName' ? $outputlangs->transnoentities("FromContactName") : $outputlangs->transnoentities("Name")); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); // Show sender - $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; - $posy += $top_shift; - $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; + $posy += $top_shift; + $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1726,8 +1711,7 @@ class pdf_cyan extends ModelePDFPropales // If CUSTOMER contact defined, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1741,15 +1725,20 @@ class pdf_cyan extends ModelePDFPropales $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); - $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, 'target', $object); + $mode = 'target'; + $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1855,22 +1844,22 @@ class pdf_cyan extends ModelePDFPropales ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -1906,8 +1895,7 @@ class pdf_cyan extends ModelePDFPropales 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -1923,8 +1911,7 @@ class pdf_cyan extends ModelePDFPropales '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)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $this->cols['vat']['status'] = true; } @@ -2026,11 +2013,9 @@ class pdf_cyan extends ModelePDFPropales ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/core/modules/propale/index.html b/htdocs/core/modules/propale/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index fc3569323dc..28d66dfc40a 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -65,7 +65,7 @@ class mod_propale_marbre extends ModeleNumRefPropales public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -90,7 +90,8 @@ class mod_propale_marbre extends ModeleNumRefPropales { global $conf, $langs, $db; - $pryymm = ''; $max = ''; + $pryymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -99,14 +100,15 @@ class mod_propale_marbre extends ModeleNumRefPropales $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $pryymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $pryymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$pryymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $pryymm)) - { + if (!$pryymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $pryymm)) { return true; } else { $langs->load("errors"); @@ -134,11 +136,13 @@ class mod_propale_marbre extends ModeleNumRefPropales $sql .= " AND entity IN (".getEntity('proposalnumber', 1, $propal).")"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +151,11 @@ class mod_propale_marbre extends ModeleNumRefPropales $date = time(); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 4a2bb721591..5fb7eeaa6fb 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -104,18 +104,17 @@ class mod_propale_saphir extends ModeleNumRefPropales */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = 'NotConfigured'; } return $numExample; @@ -137,8 +136,7 @@ class mod_propale_saphir extends ModeleNumRefPropales // On defini critere recherche compteur $mask = $conf->global->PROPALE_SAPHIR_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 2127ff1f70c..ee7df804c59 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -56,12 +56,12 @@ abstract class ModelePDFPropales extends CommonDocGenerator global $conf; $type = 'propal'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -144,10 +144,18 @@ abstract class ModeleNumRefPropales global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/rapport/index.html b/htdocs/core/modules/rapport/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index fb9bfbb8809..b69ebdeb828 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -71,8 +71,7 @@ class pdf_paiement $this->posxbankaccount = 110; $this->posxinvoiceamount = 132; $this->posxpaymentamount = 162; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->line_per_page = 35; $this->posxpaymenttype -= 10; $this->posxinvoice -= 0; @@ -102,21 +101,25 @@ class pdf_paiement global $conf, $hookmanager, $langs, $user; $socid = 0; - if ($user->socid) $socid = $user->socid; + if ($user->socid) { + $socid = $user->socid; + } - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } $this->month = $month; $this->year = $year; $dir = $_dir.'/'.$year; - if (!is_dir($dir)) - { + if (!is_dir($dir)) { $result = dol_mkdir($dir); - if ($result < 0) - { + if ($result < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } @@ -137,8 +140,7 @@ class pdf_paiement // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -150,8 +152,7 @@ class pdf_paiement $pdf = pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance - if (class_exists('TCPDF')) - { + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } @@ -173,8 +174,7 @@ class pdf_paiement $sql .= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year, $month))."' AND '".$this->db->idate(dol_get_last_day($year, $month))."'"; $sql .= " AND p.entity = ".$conf->entity; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $numpaiement = $this->db->num_rows($result); } @@ -185,78 +185,86 @@ class pdf_paiement $sql .= ", c.code as paiement_code, p.num_paiement as num_payment"; $sql .= ", p.amount as paiement_amount, f.total_ttc as facture_amount"; $sql .= ", pf.amount as pf_amount"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= ", ba.ref as bankaccount"; + } $sql .= ", p.rowid as prowid"; $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 .= " ".MAIN_DB_PREFIX."paiement_facture as pf,"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; + } $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) - { + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= " AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "; + } $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year, $month))."' AND '".$this->db->idate(dol_get_last_day($year, $month))."'"; - if (!$user->rights->societe->client->voir && !$socid) - { + if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if (!empty($socid)) $sql .= " AND s.rowid = ".$socid; + if (!empty($socid)) { + $sql .= " AND s.rowid = ".$socid; + } // If global param PAYMENTS_REPORT_GROUP_BY_MOD is set, payement are ordered by paiement_code - if (!empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) + if (!empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) { $sql .= " ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiement ASC"; - else $sql .= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; + } else { + $sql .= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; + } break; case "fourn": $sql = "SELECT p.datep as dp, f.ref as ref"; $sql .= ", c.code as paiement_code, p.num_paiement as num_payment"; $sql .= ", p.amount as paiement_amount, f.total_ttc as facture_amount"; $sql .= ", pf.amount as pf_amount"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= ", ba.ref as bankaccount"; + } $sql .= ", p.rowid as prowid"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f,"; $sql .= " ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf,"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= " ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba,"; + } $sql .= " ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) - { + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.fk_soc = s.rowid AND pf.fk_facturefourn = f.rowid AND pf.fk_paiementfourn = p.rowid"; - if (!empty($conf->banque->enabled)) + if (!empty($conf->banque->enabled)) { $sql .= " AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "; + } $sql .= " AND f.entity = ".$conf->entity; $sql .= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year, $month))."' AND '".$this->db->idate(dol_get_last_day($year, $month))."'"; - if (!$user->rights->societe->client->voir && !$socid) - { + if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if (!empty($socid)) $sql .= " AND s.rowid = ".$socid; + if (!empty($socid)) { + $sql .= " AND s.rowid = ".$socid; + } // If global param PAYMENTS_FOURN_REPORT_GROUP_BY_MOD is set, payement fourn are ordered by paiement_code - if (!empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD)) + if (!empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD)) { $sql .= " ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiementfourn ASC"; - else $sql .= " ORDER BY p.datep ASC, pf.fk_paiementfourn ASC"; + } else { + $sql .= " ORDER BY p.datep ASC, pf.fk_paiementfourn ASC"; + } break; } dol_syslog(get_class($this)."::write_file", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $lines[$i][0] = $objp->ref; @@ -277,13 +285,11 @@ class pdf_paiement $pages = intval(($num + $numpaiement) / $this->line_per_page); - if ((($num + $numpaiement) % $this->line_per_page) > 0) - { + if ((($num + $numpaiement) % $this->line_per_page) > 0) { $pages++; } - if ($pages == 0) - { + if ($pages == 0) { // force to build at least one page if report has no line $pages = 1; } @@ -297,7 +303,9 @@ class pdf_paiement $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); //$pdf->SetKeyWords(); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetAutoPageBreak(1, 0); @@ -313,15 +321,16 @@ class pdf_paiement $this->Body($pdf, 1, $lines, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); $pdf->Output($file, 'F'); // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -329,14 +338,14 @@ class pdf_paiement $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -440,26 +449,21 @@ class pdf_paiement $pdf->SetFillColor(220, 220, 220); $yp = 0; $numlines = count($lines); - if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) - { + if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) { $mod = $lines[0][2]; $total_mod = 0; } - for ($j = 0; $j < $numlines; $j++) - { + for ($j = 0; $j < $numlines; $j++) { $i = $j; - if ($yp > $this->tab_height - 5) - { + if ($yp > $this->tab_height - 5) { $page++; $pdf->AddPage(); $this->_pagehead($pdf, $page, 0, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); $yp = 0; } - if ($oldprowid <> $lines[$j][7]) - { - if ($yp > $this->tab_height - 15) - { + if ($oldprowid <> $lines[$j][7]) { + if ($yp > $this->tab_height - 15) { $pdf->SetFillColor(255, 255, 255); $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); @@ -493,7 +497,9 @@ class pdf_paiement $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][4], 0, 'R', 1); $yp = $yp + 5; $total_page += $lines[$j][9]; - if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) $total_mod += $lines[$j][9]; + if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) { + $total_mod += $lines[$j][9]; + } } // Invoice number @@ -513,14 +519,12 @@ class pdf_paiement $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][6], 0, 'R', 0); $yp = $yp + 5; - if ($oldprowid <> $lines[$j][7]) - { + if ($oldprowid <> $lines[$j][7]) { $oldprowid = $lines[$j][7]; } // Add line to add total by payment mode if mode reglement for nex line change - if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j + 1][2])) - { + if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j + 1][2])) { $pdf->SetFillColor(245, 245, 245); $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); @@ -534,8 +538,7 @@ class pdf_paiement $mod = $lines[$j + 1][2]; $total_mod = 0; $yp = $yp + 5; - if ($yp > $this->tab_height - 5) - { + if ($yp > $this->tab_height - 5) { $page++; $pdf->AddPage(); $this->_pagehead($pdf, $page, 0, $outputlangs); diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 22ef687d13b..13a05b3378d 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -93,7 +93,9 @@ class doc_generic_reception_odt extends ModelePdfReception // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -124,17 +126,20 @@ class doc_generic_reception_odt extends ModelePdfReception $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->RECEPTION_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -153,22 +158,20 @@ class doc_generic_reception_odt extends ModelePdfReception // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->RECEPTION_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->RECEPTION_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); //$texte.=$nbofiles?'':''; $texte .= ''; } - if ($nbofiles) - { + if ($nbofiles) { $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; } - $texte .= '
    '; + $texte .= ''; } $texte .= ''; @@ -201,22 +204,22 @@ class doc_generic_reception_odt extends ModelePdfReception // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; @@ -225,16 +228,13 @@ class doc_generic_reception_odt extends ModelePdfReception $outputlangs->load("companies"); $outputlangs->load("bills"); - if ($conf->reception->dir_output."/reception") - { + if ($conf->reception->dir_output."/reception") { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Reception($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -244,20 +244,19 @@ class doc_generic_reception_odt extends ModelePdfReception $dir = $conf->reception->dir_output."/reception"; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -267,10 +266,11 @@ class doc_generic_reception_odt extends ModelePdfReception //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -287,8 +287,7 @@ class doc_generic_reception_odt extends ModelePdfReception // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -322,8 +321,7 @@ class doc_generic_reception_odt extends ModelePdfReception // Line of free text $newfreetext = ''; $paramfreetext = 'RECEPTION_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -339,8 +337,7 @@ class doc_generic_reception_odt extends ModelePdfReception 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -361,14 +358,15 @@ class doc_generic_reception_odt extends ModelePdfReception // Make substitutions into odt of user info $tmparray = $this->get_substitutionarray_user($user, $outputlangs); //var_dump($tmparray); exit; - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { // Image //var_dump($value);exit; - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -380,14 +378,15 @@ class doc_generic_reception_odt extends ModelePdfReception // Make substitutions into odt of mysoc $tmparray = $this->get_substitutionarray_mysoc($mysoc, $outputlangs); //var_dump($tmparray); exit; - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { // Image //var_dump($value);exit; - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -398,13 +397,14 @@ class doc_generic_reception_odt extends ModelePdfReception } // Make substitutions into odt of thirdparty $tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -419,13 +419,14 @@ class doc_generic_reception_odt extends ModelePdfReception // Call the ODTSubstitution hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); @@ -437,15 +438,13 @@ class doc_generic_reception_odt extends ModelePdfReception // Replace tags of lines try { $listlines = $odfHandler->setSegment('lines'); - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $tmparray = $this->get_substitutionarray_reception_lines($line, $outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { $listlines->setVars($key, $val, true, 'UTF-8'); } catch (OdfException $e) { @@ -457,8 +456,7 @@ class doc_generic_reception_odt extends ModelePdfReception $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -466,8 +464,7 @@ class doc_generic_reception_odt extends ModelePdfReception // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); } catch (OdfException $e) { @@ -498,8 +495,9 @@ class doc_generic_reception_odt extends ModelePdfReception $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/reception/doc/index.html b/htdocs/core/modules/reception/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 8043f9f9ba6..c9a2b397e17 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -62,7 +62,9 @@ class pdf_squille extends ModelePdfReception // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; @@ -81,16 +83,14 @@ class pdf_squille extends ModelePdfReception $this->posxpicture = $this->posxweightvol - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxweightvol -= 20; $this->posxpicture -= 20; $this->posxqtyordered -= 20; $this->posxqtytoship -= 20; } - if (!empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) - { + if (!empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $this->posxweightvol += ($this->posxqtytoship - $this->posxqtyordered); $this->posxpicture += ($this->posxqtytoship - $this->posxqtyordered); $this->posxqtyordered = $this->posxqtytoship; @@ -116,9 +116,13 @@ class pdf_squille extends ModelePdfReception $object->fetch_thirdparty(); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal", "deliveries", "receptions", "productbatch", "sendings")); @@ -126,13 +130,13 @@ class pdf_squille extends ModelePdfReception // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_SHIPMENT_WITH_PICTURE)) { $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); @@ -145,8 +149,7 @@ class pdf_squille extends ModelePdfReception foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - if ($obj['photo_vignette']) - { + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -159,17 +162,19 @@ class pdf_squille extends ModelePdfReception break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxweightvol; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxweightvol; + } - if ($conf->reception->dir_output) - { + if ($conf->reception->dir_output) { // Definition de $dir et $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->reception->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -178,20 +183,16 @@ class pdf_squille extends ModelePdfReception $file = $dir."/".$rcpref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -210,15 +211,13 @@ class pdf_squille extends ModelePdfReception $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { + if (empty($conf->global->MAIN_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -227,20 +226,26 @@ class pdf_squille extends ModelePdfReception $pagenb = 0; $pdf->SetDrawColor(128, 128, 128); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); $pdf->SetSubject($outputlangs->transnoentities("Reception")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Reception")); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -254,11 +259,9 @@ class pdf_squille extends ModelePdfReception // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -275,8 +278,7 @@ class pdf_squille extends ModelePdfReception } } - if (!empty($object->note_public) || !empty($object->tracking_number)) - { + if (!empty($object->note_public) || !empty($object->tracking_number)) { $tab_top = 88 + $height_incoterms; $tab_top_alt = $tab_top; @@ -287,21 +289,19 @@ class pdf_squille extends ModelePdfReception //$tab_top_alt += 1; // Tracking number - if (!empty($object->tracking_number)) - { + if (!empty($object->tracking_number)) { $object->getUrlTrackingStatus($object->tracking_number); - if (!empty($object->tracking_url)) - { - if ($object->reception_method_id > 0) - { + if (!empty($object->tracking_url)) { + if ($object->reception_method_id > 0) { // Get code using getLabelFromKey $code = $outputlangs->getLabelFromKey($this->db, $object->shipment_method_id, 'c_shipment_mode', 'rowid', 'code'); $label = ''; - if ($object->tracking_url != $object->tracking_number) $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + if ($object->tracking_url != $object->tracking_number) { + $label .= $outputlangs->trans("LinkToTrackYourPackage")."
    "; + } $label .= $outputlangs->trans("ReceptionMethod").": ".$outputlangs->trans("ReceptionMethod".strtoupper($code)); //var_dump($object->tracking_url != $object->tracking_number);exit; - if ($object->tracking_url != $object->tracking_number) - { + if ($object->tracking_url != $object->tracking_number) { $label .= " : "; $label .= $object->tracking_url; } @@ -314,8 +314,7 @@ class pdf_squille extends ModelePdfReception } // Notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $pdf->SetFont('', '', $default_font_size - 1); // Dans boucle pour gerer multi-page $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top_alt, dol_htmlentitiesbr($object->note_public), 0, 1); } @@ -339,15 +338,16 @@ class pdf_squille extends ModelePdfReception $fk_commandefourndet = 0; $totalOrdered = 0; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -358,23 +358,27 @@ class pdf_squille extends ModelePdfReception $posYAfterDescription = 0; // 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (isset($imglinesize['width']) && isset($imglinesize['height'])) - { + if (isset($imglinesize['width']) && isset($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxweightvol - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -388,8 +392,7 @@ class pdf_squille extends ModelePdfReception pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxpicture - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -400,22 +403,26 @@ class pdf_squille extends ModelePdfReception $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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -432,25 +439,25 @@ class pdf_squille extends ModelePdfReception // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetXY($this->posxweightvol, $curY); $weighttxt = ''; - if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight) - { + if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight) { $weighttxt = round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units); } $voltxt = ''; - if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume) - { + if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume) { $voltxt = round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units ? $object->lines[$i]->product->volume_units : 0); } @@ -469,8 +476,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetXY($this->posxqtytoship, $curY); $pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 3, $object->lines[$i]->qty, '', 'C'); - if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) - { + if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { $pdf->SetXY($this->posxpuht, $curY); $pdf->MultiCell(($this->posxtotalht - $this->posxpuht - 1), 3, price($object->lines[$i]->subprice, 0, $outputlangs), '', 'R'); @@ -479,11 +485,12 @@ class pdf_squille extends ModelePdfReception } $nexY += 3; - if ($weighttxt && $voltxt) $nexY += 2; + if ($weighttxt && $voltxt) { + $nexY += 2; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -492,11 +499,9 @@ class pdf_squille extends ModelePdfReception } // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -506,10 +511,8 @@ class pdf_squille extends ModelePdfReception $pdf->setPage($pagenb); $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. } - if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) - { - if ($pagenb == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -517,14 +520,15 @@ class pdf_squille extends ModelePdfReception $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -537,7 +541,9 @@ class pdf_squille extends ModelePdfReception // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -548,14 +554,14 @@ class pdf_squille extends ModelePdfReception $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) - { + 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)); + } return 1; // No error } else { @@ -595,13 +601,17 @@ class pdf_squille extends ModelePdfReception $pdf->SetFont('', 'B', $default_font_size - 1); // Tableau total - $col1x = $this->posxweightvol - 50; $col2x = $this->posxweightvol; + $col1x = $this->posxweightvol - 50; + $col2x = $this->posxweightvol; /*if ($this->page_largeur < 210) // To work with US executive format { $col2x-=20; }*/ - if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) $largcol2 = ($this->posxqtyordered - $this->posxweightvol); - else $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { + $largcol2 = ($this->posxqtyordered - $this->posxweightvol); + } else { + $largcol2 = ($this->posxqtytoship - $this->posxweightvol); + } $useborder = 0; $index = 0; @@ -617,23 +627,29 @@ class pdf_squille extends ModelePdfReception // Set trueVolume and volume_units not currently stored into database - if ($object->trueWidth && $object->trueHeight && $object->trueDepth) - { + if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { $object->trueVolume = ($object->trueWidth * $object->trueHeight * $object->trueDepth); $object->volume_units = $object->size_units * 3; } - if ($totalWeight != '') $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); - if ($totalVolume != '') $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); - if ($object->trueWeight) $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); - if ($object->trueVolume) $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + if ($totalWeight != '') { + $totalWeighttoshow = showDimensionInBestUnit($totalWeight, 0, "weight", $outputlangs); + } + if ($totalVolume != '') { + $totalVolumetoshow = showDimensionInBestUnit($totalVolume, 0, "volume", $outputlangs); + } + if ($object->trueWeight) { + $totalWeighttoshow = showDimensionInBestUnit($object->trueWeight, $object->weight_units, "weight", $outputlangs); + } + if ($object->trueVolume) { + $totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs); + } $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Total"), 0, 'L', 1); - if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) - { + if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $pdf->SetXY($this->posxqtyordered, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->posxqtytoship - $this->posxqtyordered, $tab2_hl, $totalOrdered, 0, 'C', 1); } @@ -650,21 +666,21 @@ class pdf_squille extends ModelePdfReception } // Total Weight - if ($totalWeighttoshow) - { + if ($totalWeighttoshow) { $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalWeighttoshow, 0, 'C', 1); $index++; } - if ($totalVolumetoshow) - { + if ($totalVolumetoshow) { $pdf->SetXY($this->posxweightvol, $tab2_top + $tab2_hl * $index); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), $tab2_hl, $totalVolumetoshow, 0, 'C', 1); $index++; } - if (!$totalWeighttoshow && !$totalVolumetoshow) $index++; + if (!$totalWeighttoshow && !$totalVolumetoshow) { + $index++; + } $pdf->SetTextColor(0, 0, 0); @@ -690,7 +706,9 @@ class pdf_squille extends ModelePdfReception // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -704,8 +722,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetDrawColor(128, 128, 128); $pdf->SetFont('', '', $default_font_size - 1); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); @@ -713,40 +730,34 @@ class pdf_squille extends ModelePdfReception } $pdf->line($this->posxweightvol - 1, $tab_top, $this->posxweightvol - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxweightvol - 1, $tab_top + 1); $pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 2, $outputlangs->transnoentities("WeightVolShort"), '', 'C'); } - if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) - { + if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) { $pdf->line($this->posxqtyordered - 1, $tab_top, $this->posxqtyordered - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqtyordered - 1, $tab_top + 1); $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 2, $outputlangs->transnoentities("QtyOrdered"), '', 'C'); } } $pdf->line($this->posxqtytoship - 1, $tab_top, $this->posxqtytoship - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqtytoship, $tab_top + 1); $pdf->MultiCell(($this->posxpuht - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToReceive"), '', 'C'); } if (!empty($conf->global->MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT)) { $pdf->line($this->posxpuht - 1, $tab_top, $this->posxpuht - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxpuht - 1, $tab_top + 1); $pdf->MultiCell(($this->posxtotalht - $this->posxpuht), 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxtotalht - 1, $tab_top, $this->posxtotalht - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtotalht - 1, $tab_top + 1); $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"), '', 'C'); } @@ -774,8 +785,7 @@ class pdf_squille extends ModelePdfReception pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->RECEPTION_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->RECEPTION_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->RECEPTION_DRAFT_WATERMARK); } @@ -792,10 +802,8 @@ class pdf_squille extends ModelePdfReception // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -810,23 +818,20 @@ class pdf_squille extends ModelePdfReception } // Show barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { $posx = 105; } else { $posx = $this->marge_gauche + 3; } //$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for reception ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); } $pdf->SetDrawColor(128, 128, 128); - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // TODO Build code bar with function writeBarCode of barcode module for reception ref $object->ref //$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3); //$pdf->Image($logo,10, 5, 0, 24); @@ -851,16 +856,14 @@ class pdf_squille extends ModelePdfReception $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefReception")." : ".$object->ref, '', 'R'); // Date planned delivery - if (!empty($object->date_delivery)) - { + if (!empty($object->date_delivery)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R'); } - if (!empty($object->thirdparty->code_fournisseur)) - { + if (!empty($object->thirdparty->code_fournisseur)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -876,20 +879,20 @@ class pdf_squille extends ModelePdfReception $origin_id = $object->origin_id; // TODO move to external function - if (!empty($conf->fournisseur->enabled)) // commonly $origin='commande' - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { // commonly $origin='commande' $outputlangs->load('orders'); $classname = 'CommandeFournisseur'; $linkedobject = new $classname($this->db); $result = $linkedobject->fetch($origin_id); - if ($result >= 0) - { + if ($result >= 0) { //$linkedobject->fetchObjectLinked() Get all linked object to the $linkedobject (commonly order) into $linkedobject->linkedObjects $pdf->SetFont('', '', $default_font_size - 2); $text = $linkedobject->ref; - if ($linkedobject->ref_client) $text .= ' ('.$linkedobject->ref_client.')'; + if ($linkedobject->ref_client) { + $text .= ' ('.$linkedobject->ref_client.')'; + } $Yoff = $Yoff + 8; $pdf->SetXY($this->page_largeur - $this->marge_droite - $w, $Yoff); $pdf->MultiCell($w, 2, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), 0, 'R'); @@ -899,26 +902,30 @@ class pdf_squille extends ModelePdfReception } } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; - // Add internal contact of origin element if defined + // Add internal contact of origin element if defined $arrayidcontact = array(); - if (!empty($origin) && is_object($object->$origin)) $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); - if (empty($arrayidcontact)) $arrayidcontact = $object->$origin->getIdContact('internal', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { - $object->fetch_user(reset($arrayidcontact)); - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; - } + if (!empty($origin) && is_object($object->$origin)) { + $arrayidcontact = $object->$origin->getIdContact('internal', 'SALESREPFOLL'); + } + if (empty($arrayidcontact)) { + $arrayidcontact = $object->$origin->getIdContact('internal', 'SHIPPING'); + } + if (count($arrayidcontact) > 0) { + $object->fetch_user(reset($arrayidcontact)); + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; + } - $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); // Show sender $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -938,8 +945,7 @@ class pdf_squille extends ModelePdfReception $usecontact = false; $arrayidcontact = $object->$origin->getIdContact('external', 'SHIPPING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -969,10 +975,14 @@ class pdf_squille extends ModelePdfReception // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/reception/index.html b/htdocs/core/modules/reception/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/reception/mod_reception_beryl.php b/htdocs/core/modules/reception/mod_reception_beryl.php index 7dfd46c32c7..bbfc0daee45 100644 --- a/htdocs/core/modules/reception/mod_reception_beryl.php +++ b/htdocs/core/modules/reception/mod_reception_beryl.php @@ -42,7 +42,7 @@ class mod_reception_beryl extends ModelNumRefReception public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -66,7 +66,8 @@ class mod_reception_beryl extends ModelNumRefReception { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -75,13 +76,14 @@ class mod_reception_beryl extends ModelNumRefReception $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -108,11 +110,13 @@ class mod_reception_beryl extends ModelNumRefReception $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_reception_beryl::getNextValue", LOG_DEBUG); return -1; @@ -121,8 +125,11 @@ class mod_reception_beryl extends ModelNumRefReception $date = time(); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_reception_beryl::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 13f8e224754..bcab451ab9e 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -77,18 +77,17 @@ class mod_reception_moonstone extends ModelNumRefReception */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $old_code_type = $mysoc->typent_code; $mysoc->code_client = 'CCCCCCCCCC'; $mysoc->typent_code = 'TTTTTTTTTT'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -109,8 +108,7 @@ class mod_reception_moonstone extends ModelNumRefReception $mask = $conf->global->RECEPTION_MOONSTONE_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/reception/modules_reception.php b/htdocs/core/modules/reception/modules_reception.php index 28b0bce6500..145a04fbd31 100644 --- a/htdocs/core/modules/reception/modules_reception.php +++ b/htdocs/core/modules/reception/modules_reception.php @@ -46,12 +46,12 @@ abstract class ModelePdfReception extends CommonDocGenerator global $conf; $type = 'reception'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -129,10 +129,15 @@ abstract class ModelNumRefReception global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/security/generate/index.html b/htdocs/core/modules/security/generate/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index 7a1da5ae130..d49d8b69c46 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -82,7 +82,7 @@ class modGeneratePassPerso extends ModeleGenPassword if (empty($conf->global->USER_PASSWORD_PATTERN)) { // default value (10carac, 1maj, 1digit, 1spe, 3 repeat, no ambi at auto generation. - dolibarr_set_const($db, "USER_PASSWORD_PATTERN", '10;1;1;1;3;1', 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "USER_PASSWORD_PATTERN", '12;1;1;1;3;1', 'chaine', 0, '', $conf->entity); } $this->Maj = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -99,8 +99,7 @@ class modGeneratePassPerso extends ModeleGenPassword $this->NbRepeat = $tabConf[4]; $this->WithoutAmbi = $tabConf[5]; - if ($this->WithoutAmbi) - { + if ($this->WithoutAmbi) { $this->Maj = str_replace($this->Ambi, "", $this->Maj); $this->Min = str_replace($this->Ambi, "", $this->Min); $this->Nb = str_replace($this->Ambi, "", $this->Nb); @@ -215,7 +214,9 @@ class modGeneratePassPerso extends ModeleGenPassword { $last = ""; - if (empty($this->NbRepeat)) return 1; + if (empty($this->NbRepeat)) { + return 1; + } $count = 0; $char = str_split($password); diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index cf49f0f063d..e091b5069e9 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -59,7 +59,7 @@ class modGeneratePassStandard extends ModeleGenPassword public function __construct($db, $conf, $langs, $user) { $this->id = "standard"; - $this->length = 10; + $this->length = 12; $this->db = $db; $this->conf = $conf; @@ -105,14 +105,12 @@ class modGeneratePassStandard extends ModeleGenPassword $i = 0; // add random characters to $password until $length is reached - while ($i < $this->length) - { + while ($i < $this->length) { // pick a random character from the possible ones $char = substr($possible, mt_rand(0, dol_strlen($possible) - 1), 1); // we don't want this character if it's already in the password - if (!strstr($password, $char)) - { + if (!strstr($password, $char)) { $password .= $char; $i++; } @@ -130,7 +128,9 @@ class modGeneratePassStandard extends ModeleGenPassword */ public function validatePassword($password) { - if (dol_strlen($password) < $this->length) return 0; + if (dol_strlen($password) < $this->length) { + return 0; + } return 1; } } diff --git a/htdocs/core/modules/security/index.html b/htdocs/core/modules/security/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index bf1711970dc..1822a5b8c95 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -80,7 +80,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Retrieves transmitter $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // Par defaut, si n'etait pas defini + } } @@ -111,15 +113,20 @@ class doc_generic_odt extends ModeleThirdPartyDoc $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->COMPANY_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + 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)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); - else { + if (!$tmpdir) { + unset($listofdir[$key]); + continue; + } + if (!is_dir($tmpdir)) { + $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); + } else { $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment - if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -141,8 +148,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->COMPANY_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->COMPANY_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= $nbofiles; @@ -150,14 +156,13 @@ class doc_generic_odt extends ModeleThirdPartyDoc $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } // Add input to upload a new template file. $texte .= '
    '.$langs->trans("UploadNewTemplate").' '; @@ -194,8 +199,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } @@ -208,30 +212,30 @@ class doc_generic_odt extends ModeleThirdPartyDoc $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); - if ($conf->societe->multidir_output[$object->entity]) - { + if ($conf->societe->multidir_output[$object->entity]) { $dir = $conf->societe->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->id); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(s|t)/i', '', $newfile); @@ -239,15 +243,15 @@ class doc_generic_odt extends ModeleThirdPartyDoc $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) - { - $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp; - $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) + if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) { + $newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp; + $newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax) } - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -275,8 +279,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -288,52 +291,44 @@ class doc_generic_odt extends ModeleThirdPartyDoc $sql = "SELECT p.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; - $sql .= " WHERE p.fk_soc = ".$object->id; + $sql .= " WHERE p.fk_soc = ".((int) $object->id); $result = $this->db->query($sql); $num = $this->db->num_rows($result); - if ($num) - { + if ($num) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $i = 0; $contactstatic = new Contact($this->db); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $contact_arrray[$i] = $obj->rowid; $i++; } } - if ((is_array($contact_arrray) && count($contact_arrray) > 0)) - { + if ((is_array($contact_arrray) && count($contact_arrray) > 0)) { try { $listlines = $odfHandler->setSegment('companycontacts'); - foreach ($contact_arrray as $array_key => $contact_id) - { + foreach ($contact_arrray as $array_key => $contact_id) { $res_contact = $contactstatic->fetch($contact_id); $tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact'); - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } $listlines->merge(); } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); //return -1; @@ -354,19 +349,19 @@ class doc_generic_odt extends ModeleThirdPartyDoc $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks // Replace variables into document - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { // setVars failed, probably because key not found dol_syslog($e->getMessage(), LOG_INFO); } @@ -374,12 +369,10 @@ class doc_generic_odt extends ModeleThirdPartyDoc // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -418,8 +411,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - 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)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/societe/doc/index.html b/htdocs/core/modules/societe/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/societe/index.html b/htdocs/core/modules/societe/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index accdfae89f6..d789f4f0d85 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -212,24 +212,28 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode // Get Mask value $mask = ''; - if ($type == 0) $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; - if ($type == 1) $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER; - if (!$mask) - { + if ($type == 0) { + $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; + } + if ($type == 1) { + $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER; + } + if (!$mask) { $this->error = 'NotConfigured'; return ''; } - $field = ''; $where = ''; - if ($type == 0) - { + $field = ''; + $where = ''; + if ($type == 0) { $field = 'code_client'; //$where = ' AND client in (1,2)'; - } elseif ($type == 1) - { + } elseif ($type == 1) { $field = 'code_fournisseur'; //$where = ' AND fournisseur = 1'; - } else return -1; + } else { + return -1; + } $now = dol_now(); @@ -251,10 +255,14 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode global $conf; $mask = $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; - if (preg_match('/\{pre\}/i', $mask)) return 1; + if (preg_match('/\{pre\}/i', $mask)) { + return 1; + } $mask = $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER; - if (preg_match('/\{pre\}/i', $mask)) return 1; + if (preg_match('/\{pre\}/i', $mask)) { + return 1; + } return 0; } @@ -284,25 +292,25 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) { $result = -2; } else { // Get Mask value $mask = ''; - if ($type == 0) $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; - if ($type == 1) $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER; - if (!$mask) - { + if ($type == 0) { + $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; + } + if ($type == 1) { + $mask = empty($conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER) ? '' : $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER; + } + if (!$mask) { $this->error = 'NotConfigured'; return -5; } $result = check_value($mask, $code); - if (is_string($result)) - { + if (is_string($result)) { $this->error = $result; return -6; } else { @@ -332,15 +340,18 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode { // phpcs:enable $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; - if ($type == 1) $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'"; - else $sql .= " WHERE code_client = '".$db->escape($code)."'"; - if ($soc->id > 0) $sql .= " AND rowid <> ".$soc->id; + if ($type == 1) { + $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'"; + } else { + $sql .= " WHERE code_client = '".$db->escape($code)."'"; + } + if ($soc->id > 0) { + $sql .= " AND rowid <> ".$soc->id; + } $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { return 0; } else { return -1; diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index 54ba73d08ef..aff13d41536 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -123,11 +123,9 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode $result = 0; $code = trim($code); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) { $result = -2; } diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 1d8b543234d..a7ae44323a1 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -139,11 +139,13 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { return -1; } @@ -151,8 +153,11 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $date = dol_now(); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 5) - 1)) $num = $max + 1; // If counter > 99999, we do not format on 5 chars, we take number as it is - else $num = sprintf("%05s", $max + 1); + if ($max >= (pow(10, 5) - 1)) { + $num = $max + 1; // If counter > 99999, we do not format on 5 chars, we take number as it is + } else { + $num = sprintf("%05s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; @@ -179,25 +184,20 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $result = 0; $code = strtoupper(trim($code)); - if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) - { + if (empty($code) && $this->code_null && empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) - { + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))) { $result = -2; } else { - if ($this->verif_syntax($code) >= 0) - { + if ($this->verif_syntax($code) >= 0) { $is_dispo = $this->verif_dispo($db, $code, $soc, $type); - if ($is_dispo <> 0) - { + if ($is_dispo <> 0) { $result = -3; } else { $result = 0; } } else { - if (dol_strlen($code) == 0) - { + if (dol_strlen($code) == 0) { $result = -2; } else { $result = -1; @@ -226,17 +226,20 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode global $conf, $mc; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; - if ($type == 1) $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'"; - else $sql .= " WHERE code_client = '".$db->escape($code)."'"; + if ($type == 1) { + $sql .= " WHERE code_fournisseur = '".$db->escape($code)."'"; + } else { + $sql .= " WHERE code_client = '".$db->escape($code)."'"; + } $sql .= " AND entity IN (".getEntity('societe').")"; - if ($soc->id > 0) $sql .= " AND rowid <> ".$soc->id; + if ($soc->id > 0) { + $sql .= " AND rowid <> ".$soc->id; + } dol_syslog(get_class($this)."::verif_dispo", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { return 0; } else { return -1; @@ -259,8 +262,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode // phpcs:enable $res = 0; - if (dol_strlen($code) < 11) - { + if (dol_strlen($code) < 11) { $res = -1; } else { $res = 0; diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 13cc8a4948c..752691b03b8 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -55,8 +55,12 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode public function __construct() { global $conf; - if (!isset($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) || trim($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) == '') $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER = '411'; - if (!isset($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) || trim($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) == '') $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER = '401'; + if (!isset($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) || trim($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) == '') { + $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER = '411'; + } + if (!isset($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) || trim($conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER) == '') { + $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER = '401'; + } $this->prefixcustomeraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER; $this->prefixsupplieraccountancycode = $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER; } @@ -90,9 +94,13 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode $texte .= $langs->trans("ModuleCompanyCodeSupplier".$this->name, '{s1}')."
    \n"; $texte = str_replace(array('{s1}', '{s2}'), array($s1, $s2), $texte); $texte .= "
    \n"; - if (!isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || !empty($conf->global->$conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) $texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."
    \n"; + if (!isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || !empty($conf->global->$conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) { + $texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."
    \n"; + } //if (! empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_ALPHA').' = '.yn($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)."
    \n"; - if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) $texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX."
    \n"; + if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) { + $texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX."
    \n"; + } $texte .= ''; $texte .= ''; $texte .= ''; @@ -139,12 +147,10 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode dol_syslog("mod_codecompta_aquarium::get_code search code for type=".$type." company=".(!empty($societe->name) ? $societe->name : '')); // Regle gestion compte compta - if ($type == 'customer') - { + if ($type == 'customer') { $codetouse = (!empty($societe->code_client) ? $societe->code_client : 'CUSTCODE'); $prefix = $this->prefixcustomeraccountancycode; - } elseif ($type == 'supplier') - { + } elseif ($type == 'supplier') { $codetouse = (!empty($societe->code_fournisseur) ? $societe->code_fournisseur : 'SUPPCODE'); $prefix = $this->prefixsupplieraccountancycode; } else { @@ -155,20 +161,22 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode //$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX='^..(..)..'; // Remove special char if COMPANY_AQUARIUM_REMOVE_SPECIAL is set to 1 or not set (default) - if (!isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || !empty($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) $codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse); + if (!isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || !empty($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) { + $codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse); + } // Remove special alpha if COMPANY_AQUARIUM_REMOVE_ALPHA is set to 1 - if (!empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $codetouse = preg_replace('/([a-z])/i', '', $codetouse); + if (!empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) { + $codetouse = preg_replace('/([a-z])/i', '', $codetouse); + } // Apply a regex replacement pattern on code if COMPANY_AQUARIUM_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed. - if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) // Example: $conf->global->COMPANY_AQUARIUM_CLEAN_REGEX='^..(..)..'; - { + if (!empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) { // Example: $conf->global->COMPANY_AQUARIUM_CLEAN_REGEX='^..(..)..'; $codetouse = preg_replace('/'.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX.'/', '\1\2\3', $codetouse); } $codetouse = $prefix.strtoupper($codetouse); $is_dispo = $this->verif($db, $codetouse, $societe, $type); - if (!$is_dispo) - { + if (!$is_dispo) { $this->code = $codetouse; } else { // Pour retour @@ -191,20 +199,26 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode public function verif($db, $code, $societe, $type) { $sql = "SELECT "; - if ($type == 'customer') $sql .= "code_compta"; - elseif ($type == 'supplier') $sql .= "code_compta_fournisseur"; + if ($type == 'customer') { + $sql .= "code_compta"; + } elseif ($type == 'supplier') { + $sql .= "code_compta_fournisseur"; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe"; $sql .= " WHERE "; - if ($type == 'customer') $sql .= "code_compta"; - elseif ($type == 'supplier') $sql .= "code_compta_fournisseur"; + if ($type == 'customer') { + $sql .= "code_compta"; + } elseif ($type == 'supplier') { + $sql .= "code_compta_fournisseur"; + } $sql .= " = '".$db->escape($code)."'"; - if (!empty($societe->id)) $sql .= " AND rowid <> ".$societe->id; + if (!empty($societe->id)) { + $sql .= " AND rowid <> ".$societe->id; + } $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { dol_syslog("mod_codecompta_aquarium::verif code '".$code."' available"); return 1; // Dispo } else { diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index ea25a480d45..363d3984516 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -64,13 +64,21 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode public function __construct() { global $conf, $langs; - if (!isset($conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER) || trim($conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER) == '') $conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER = '411'; - if (!isset($conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER) || trim($conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER) == '') $conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER = '401'; + if (!isset($conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER) || trim($conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER) == '') { + $conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER = '411'; + } + if (!isset($conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER) || trim($conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER) == '') { + $conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER = '401'; + } $this->prefixcustomeraccountancycode = $conf->global->COMPANY_DIGITARIA_MASK_CUSTOMER; $this->prefixsupplieraccountancycode = $conf->global->COMPANY_DIGITARIA_MASK_SUPPLIER; - if (!isset($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER) || trim($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER) == '') $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER = '5'; - if (!isset($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER) || trim($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER) == '') $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER = '5'; + if (!isset($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER) || trim($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER) == '') { + $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER = '5'; + } + if (!isset($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER) || trim($conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER) == '') { + $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER = '5'; + } $this->customeraccountancycodecharacternumber = $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_CUSTOMER; $this->supplieraccountancycodecharacternumber = $conf->global->COMPANY_DIGITARIA_MASK_NBCHARACTER_SUPPLIER; } @@ -105,11 +113,17 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $texte = str_replace(array('{s1}', '{s2}', '{s3}', '{s4}'), array($s1, $s2, $s3, $s4), $texte); $texte .= "
    \n"; // Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default) - if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || !empty($conf->global->$conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) $texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."
    \n"; + if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || !empty($conf->global->$conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) { + $texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."
    \n"; + } // Apply a regex replacement pattern on code if COMPANY_DIGITARIA_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed. - if (!empty($conf->global->COMPANY_DIGITARIA_CLEAN_REGEX)) $texte .= $langs->trans('COMPANY_DIGITARIA_CLEAN_REGEX').' = '.$conf->global->COMPANY_DIGITARIA_CLEAN_REGEX."
    \n"; + if (!empty($conf->global->COMPANY_DIGITARIA_CLEAN_REGEX)) { + $texte .= $langs->trans('COMPANY_DIGITARIA_CLEAN_REGEX').' = '.$conf->global->COMPANY_DIGITARIA_CLEAN_REGEX."
    \n"; + } // Unique index on code if COMPANY_DIGITARIA_UNIQUE_CODE is set to 1 or not set (default) - if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) $texte .= $langs->trans('COMPANY_DIGITARIA_UNIQUE_CODE').' = '.yn(1)."
    \n"; + if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) { + $texte .= $langs->trans('COMPANY_DIGITARIA_UNIQUE_CODE').' = '.yn(1)."
    \n"; + } $texte .= ''; $texte .= ''; $texte .= ''; @@ -133,7 +147,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $s = $langs->trans("ThirdPartyName").": ".$mysoc->name; $s .= "
    \n"; - if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) $thirdpartylabelexample = preg_replace('/([^a-z0-9])/i', '', $mysoc->name); + if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) { + $thirdpartylabelexample = preg_replace('/([^a-z0-9])/i', '', $mysoc->name); + } $s .= "
    \n"; $s .= $this->prefixcustomeraccountancycode.strtoupper(substr($thirdpartylabelexample, 0, $this->customeraccountancycodecharacternumber)); $s .= "
    \n"; @@ -159,16 +175,14 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $disponibility = 0; - if (is_object($societe)) - { + if (is_object($societe)) { dol_syslog("mod_codecompta_digitaria::get_code search code for type=".$type." & company=".(!empty($societe->name) ? $societe->name : '')); if ($type == 'supplier') { $codetouse = $societe->name; $prefix = $this->prefixsupplieraccountancycode; $width = $this->supplieraccountancycodecharacternumber; - } elseif ($type == 'customer') - { + } elseif ($type == 'customer') { $codetouse = $societe->name; $prefix = $this->prefixcustomeraccountancycode; $width = $this->customeraccountancycodecharacternumber; @@ -178,10 +192,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode } // Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default) - if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || !empty($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) $codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse); + if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || !empty($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) { + $codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse); + } // Apply a regex replacement pattern on code if COMPANY_DIGITARIA_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed. - if (!empty($conf->global->COMPANY_DIGITARIA_CLEAN_REGEX)) // Example: $conf->global->COMPANY_DIGITARIA_CLEAN_REGEX='^..(..)..'; - { + if (!empty($conf->global->COMPANY_DIGITARIA_CLEAN_REGEX)) { // Example: $conf->global->COMPANY_DIGITARIA_CLEAN_REGEX='^..(..)..'; $codetouse = preg_replace('/'.$conf->global->COMPANY_DIGITARIA_CLEAN_REGEX.'/', '\1\2\3', $codetouse); } @@ -189,8 +204,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode dol_syslog("mod_codecompta_digitaria::get_code search code proposed=".$this->code); // Unique index on code if COMPANY_DIGITARIA_UNIQUE_CODE is set to 1 or not set (default) - if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) - { + if (!isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || !empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) { $disponibility = $this->checkIfAccountancyCodeIsAlreadyUsed($db, $this->code, $type); while ($disponibility <> 0 && $i < 100) { @@ -235,11 +249,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode */ public function checkIfAccountancyCodeIsAlreadyUsed($db, $code, $type = '') { - if ($type == 'supplier') - { + if ($type == 'supplier') { $typethirdparty = 'code_compta_fournisseur'; - } elseif ($type == 'customer') - { + } elseif ($type == 'customer') { $typethirdparty = 'code_compta'; } else { $this->error = 'Bad value for parameter type'; @@ -250,10 +262,8 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $sql .= " WHERE ".$typethirdparty." = '".$db->escape($code)."'"; $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql) == 0) - { + if ($resql) { + if ($db->num_rows($resql) == 0) { dol_syslog("mod_codecompta_digitaria::checkIfAccountancyCodeIsAlreadyUsed '".$code."' available"); return 0; // Available } else { diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index 04ae16a1630..e86b9fa98c8 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -91,8 +91,11 @@ class mod_codecompta_panicum extends ModeleAccountancyCode $this->code = ''; if (is_object($societe)) { - if ($type == 'supplier') $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : ''); - else $this->code = (($societe->code_compta != "") ? $societe->code_compta : ''); + if ($type == 'supplier') { + $this->code = (($societe->code_compta_fournisseur != "") ? $societe->code_compta_fournisseur : ''); + } else { + $this->code = (($societe->code_compta != "") ? $societe->code_compta : ''); + } } return 0; // return ok diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index 03463f364bd..28d0120da72 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -51,12 +51,12 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator global $conf; $type = 'company'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -168,7 +168,7 @@ abstract class ModeleThirdPartyCode public static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable - $liste = array(); + $list = array(); $sql = ""; $resql = $db->query($sql); @@ -177,13 +177,13 @@ abstract class ModeleThirdPartyCode $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); - $liste[$row[0]] = $row[1]; + $list[$row[0]] = $row[1]; $i++; } } else { return -1; } - return $liste; + return $list; } /** diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index c0614bd811e..2819adea021 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -95,7 +95,9 @@ class doc_generic_stock_odt extends ModelePDFStock // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -126,17 +128,20 @@ class doc_generic_stock_odt extends ModelePDFStock $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->STOCK_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -155,8 +160,7 @@ class doc_generic_stock_odt extends ModelePDFStock // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->STOCK_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->STOCK_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -164,8 +168,7 @@ class doc_generic_stock_odt extends ModelePDFStock $texte .= ''; } - if ($nbofiles) - { + if ($nbofiles) { $texte .= '
    '; // Show list of found files foreach ($listoffiles as $file) { @@ -209,38 +212,35 @@ class doc_generic_stock_odt extends ModelePDFStock // phpcs:enable global $stock, $langs, $conf, $mysoc, $hookmanager, $user; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->product->dir_output) - { + if ($conf->product->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Entrepot($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -252,20 +252,19 @@ class doc_generic_stock_odt extends ModelePDFStock $dir = $conf->product->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -276,10 +275,11 @@ class doc_generic_stock_odt extends ModelePDFStock // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -296,16 +296,14 @@ class doc_generic_stock_odt extends ModelePDFStock // If CUSTOMER contact defined on stock, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -332,8 +330,7 @@ class doc_generic_stock_odt extends ModelePDFStock // Line of free text $newfreetext = ''; $paramfreetext = 'stock_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -349,8 +346,7 @@ class doc_generic_stock_odt extends ModelePDFStock 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -366,8 +362,7 @@ class doc_generic_stock_odt extends ModelePDFStock // 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); } @@ -381,7 +376,9 @@ class doc_generic_stock_odt extends ModelePDFStock $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in stock as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -390,19 +387,19 @@ class doc_generic_stock_odt extends ModelePDFStock $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -410,22 +407,18 @@ class doc_generic_stock_odt extends ModelePDFStock try { $listlines = $odfHandler->setSegment('supplierprices'); if (!empty($object->supplierprices)) { - foreach ($object->supplierprices as $supplierprice) - { + foreach ($object->supplierprices as $supplierprice) { $array_lines = $this->get_substitutionarray_each_var_object($supplierprice, $outputlangs); complete_substitutions_array($array_lines, $outputlangs, $object, $supplierprice, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$array_lines, 'line'=>$supplierprice); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($array_lines as $key => $val) - { + foreach ($array_lines as $key => $val) { 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); } } @@ -433,8 +426,7 @@ class doc_generic_stock_odt extends ModelePDFStock } } $odfHandler->mergeSegment($listlines); - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -442,12 +434,10 @@ class doc_generic_stock_odt extends ModelePDFStock // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -477,8 +467,9 @@ class doc_generic_stock_odt extends ModelePDFStock $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 55923d68a79..a57b996086b 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -144,7 +144,9 @@ class pdf_standard extends ModelePDFStock // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } // Define position of columns $this->wref = 35; @@ -157,10 +159,11 @@ class pdf_standard extends ModelePDFStock $this->posxdiscount = 155; $this->postotalht = 175; - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxtva = $this->posxup; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || !empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { + $this->posxtva = $this->posxup; + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -194,20 +197,22 @@ class pdf_standard extends ModelePDFStock // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); $nblines = count($object->lines); - if ($conf->stock->dir_output) - { + if ($conf->stock->dir_output) { // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->stock->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -222,20 +227,16 @@ class pdf_standard extends ModelePDFStock $productstatic = new Product($this->db); - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -253,15 +254,13 @@ class pdf_standard extends ModelePDFStock $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 + 8; // Height reserved to output the footer (value include bottom margin) - if (class_exists('TCPDF')) - { + 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_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { + if (empty($conf->global->MAIN_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -275,14 +274,18 @@ class pdf_standard extends ModelePDFStock $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Stock")." ".$outputlangs->convToOutputCharset($object->label)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -317,8 +320,7 @@ class pdf_standard extends ModelePDFStock //dol_syslog('List products', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; $nblines = $num; @@ -326,15 +328,13 @@ class pdf_standard extends ModelePDFStock $this->tabTitleHeight = 0; $nexY = $tab_top + $this->tabTitleHeight; - for ($i = 0; $i < $nblines; $i++) - { + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $objp = $this->db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; @@ -342,10 +342,11 @@ class pdf_standard extends ModelePDFStock $sql .= " LIMIT 1"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objtp = $this->db->fetch_object($result); - if ($objtp->label != '') $objp->produit = $objtp->label; + if ($objtp->label != '') { + $objp->produit = $objtp->label; + } } } @@ -364,8 +365,7 @@ class pdf_standard extends ModelePDFStock $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 3, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -373,22 +373,26 @@ class pdf_standard extends ModelePDFStock pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 4, $curX, $curY, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -405,7 +409,8 @@ class pdf_standard extends ModelePDFStock // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -444,8 +449,7 @@ class pdf_standard extends ModelePDFStock $totalvalue += price2num($objp->ppmp * $objp->value, 'MT'); // Price sell min - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { $pricemin = $objp->price; $pdf->SetXY($this->posxdiscount, $curY); $pdf->MultiCell($this->postotalht - $this->posxdiscount, 3, price(price2num($pricemin, 'MU'), 0, $outputlangs), 0, 'R', 0); @@ -457,8 +461,7 @@ class pdf_standard extends ModelePDFStock $totalvaluesell += price2num($pricemin * $objp->value, 'MT'); // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -469,11 +472,9 @@ class pdf_standard extends ModelePDFStock $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -482,12 +483,12 @@ class pdf_standard extends ModelePDFStock $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -495,9 +496,13 @@ class pdf_standard extends ModelePDFStock $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } @@ -534,8 +539,7 @@ class pdf_standard extends ModelePDFStock $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 3, price(price2num($totalvalue, 'MT'), 0, $outputlangs), 0, 'R'); // Price sell min - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { // Total sell min $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, price(price2num($totalvaluesell, 'MT'), 0, $outputlangs), 0, 'R', 0); @@ -548,8 +552,7 @@ class pdf_standard extends ModelePDFStock // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); @@ -579,8 +582,7 @@ class pdf_standard extends ModelePDFStock $tab_top = $tab_top_newpage + 25 + $top_shift; // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -598,7 +600,9 @@ class pdf_standard extends ModelePDFStock // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -609,14 +613,14 @@ class pdf_standard extends ModelePDFStock $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -651,7 +655,9 @@ class pdf_standard extends ModelePDFStock // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -660,14 +666,15 @@ class pdf_standard extends ModelePDFStock $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -683,51 +690,44 @@ class pdf_standard extends ModelePDFStock $pdf->SetDrawColor(128, 128, 128); $pdf->SetTextColor(0, 0, 120); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L'); } //$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxlabel - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities("Label"), '', 'L'); } //$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities("Units"), '', 'R'); } //$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities("AverageUnitPricePMPShort"), '', 'R'); } //$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'R'); } //$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("SellPriceMin"), '', 'R'); } //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 2, $outputlangs->transnoentities("EstimatedStockValueSellShort"), '', 'R'); } @@ -758,14 +758,16 @@ class pdf_standard extends ModelePDFStock $default_font_size = pdf_getPDFFontSize($outputlangs); - if ($object->type == 1) $titlekey = 'ServiceSheet'; - else $titlekey = 'StockSheet'; + if ($object->type == 1) { + $titlekey = 'ServiceSheet'; + } else { + $titlekey = 'StockSheet'; + } pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) - { + if ($object->statut == 0 && (!empty($conf->global->COMMANDE_DRAFT_WATERMARK))) { pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK); } @@ -779,10 +781,8 @@ class pdf_standard extends ModelePDFStock // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -865,16 +865,14 @@ class pdf_standard extends ModelePDFStock $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " WHERE m.fk_entrepot = ".((int) $object->id); $resqlbis = $this->db->query($sql); - if ($resqlbis) - { + if ($resqlbis) { $obj = $this->db->fetch_object($resqlbis); $lastmovementdate = $this->db->jdate($obj->datem); } else { dol_print_error($this->db); } - if ($lastmovementdate) - { + if ($lastmovementdate) { $toWrite = dol_print_date($lastmovementdate, 'dayhour').' '; } else { $toWrite = $outputlangs->transnoentities("None"); @@ -889,8 +887,7 @@ class pdf_standard extends ModelePDFStock // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index cd4fed5665f..2c9f9e82591 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -43,11 +43,11 @@ abstract class ModelePDFStock extends CommonDocGenerator global $conf; $type = 'stock'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/supplier_invoice/doc/index.html b/htdocs/core/modules/supplier_invoice/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 0bd44b43e22..b9c40645544 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -133,6 +133,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->db = $db; $this->name = "canelle"; $this->description = $langs->trans('SuppliersInvoiceModel'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page dimensions $this->type = 'pdf'; @@ -169,8 +170,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -206,22 +206,31 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $user, $langs, $conf, $mysoc, $hookmanager, $nblines; // Get source company - if (!is_object($object->thirdparty)) $object->fetch_thirdparty(); - if (!is_object($object->thirdparty)) $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen) + if (!is_object($object->thirdparty)) { + $object->fetch_thirdparty(); + } + if (!is_object($object->thirdparty)) { + $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen) + } $this->emetteur = $object->thirdparty; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); $nblines = count($object->lines); - if ($conf->fournisseur->facture->dir_output) - { + if ($conf->fournisseur->facture->dir_output) { $object->fetch_thirdparty(); $deja_regle = $object->getSommePaiement((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); @@ -229,8 +238,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $amount_deposits_included = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->fournisseur->facture->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -238,23 +246,21 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $objectrefsupplier = dol_sanitizeFileName($object->ref_supplier); $dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$objectref; $file = $dir."/".$objectref.".pdf"; - if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) { + $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + } } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -278,17 +284,17 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } $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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } - if (class_exists('TCPDF')) - { + 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)) - { + 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); } @@ -302,20 +308,19 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfInvoiceTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } - if (empty($this->atleastonediscount)) - { + if (empty($this->atleastonediscount)) { $delta = ($this->postotalht - $this->posxdiscount); $this->posxpicture += $delta; $this->posxtva += $delta; @@ -328,7 +333,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -339,11 +346,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -362,8 +367,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Displays notes $notetoshow = empty($object->note_public) ? '' : $object->note_public; - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); @@ -388,15 +392,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -411,29 +416,32 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->startTransaction(); pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 3, $curX, $curY, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->posxtva - $curX, 4, $curX, $curY, $hideref, $hidedesc, 1); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -449,17 +457,17 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font // VAT Rate - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R'); + $pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R'); } // Unit price before discount @@ -473,16 +481,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L'); } // Discount on line - if ($object->lines[$i]->remise_percent) - { + if ($object->lines[$i]->remise_percent) { $pdf->SetXY($this->posxdiscount - 2, $curY); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht - $this->posxdiscount - 1, 3, $remise_percent, 0, 'R'); @@ -494,31 +500,45 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); // Collection of totals by VAT value in $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; - if (!empty($object->remise_percent)) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; + if (!empty($object->remise_percent)) { + $tvaligne -= ($tvaligne * $object->remise_percent) / 100; + } $vatrate = (string) $object->lines[$i]->tva_tx; $localtax1rate = (string) $object->lines[$i]->localtax1_tx; $localtax2rate = (string) $object->lines[$i]->localtax2_tx; - if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate .= '*'; - if (empty($this->tva[$vatrate])) $this->tva[$vatrate] = 0; - if (empty($this->localtax1[$localtax1rate])) $this->localtax1[$localtax1rate] = 0; - if (empty($this->localtax2[$localtax2rate])) $this->localtax2[$localtax2rate] = 0; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (empty($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } + if (empty($this->localtax1[$localtax1rate])) { + $this->localtax1[$localtax1rate] = 0; + } + if (empty($this->localtax2[$localtax2rate])) { + $this->localtax2[$localtax2rate] = 0; + } $this->tva[$vatrate] += $tvaligne; $this->localtax1[$localtax1rate] += $localtax1ligne; $this->localtax2[$localtax2rate] += $localtax2ligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = $posYAfterImage; + if ($posYAfterImage > $posYAfterDescription) { + $nexY = $posYAfterImage; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -529,11 +549,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -542,12 +560,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -555,15 +573,18 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -578,14 +599,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $amount_deposits_included = 0; // Display Payments area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->SUPPLIER_INVOICE_NO_PAYMENT_DETAILS)) - { + if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->SUPPLIER_INVOICE_NO_PAYMENT_DETAILS)) { $posy = $this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter); } // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -596,14 +618,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $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) - { + 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); @@ -636,7 +658,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $conf, $mysoc; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -645,9 +669,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFont('', '', $default_font_size - 1); // Total table - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -670,10 +694,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $total_ttc = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc; $this->atleastoneratenotnull = 0; - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey > 0) // We do not display rate 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey > 0) { // We do not display rate 0 $this->atleastoneratenotnull++; $index++; @@ -681,8 +703,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -695,8 +716,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } - if (!$this->atleastoneratenotnull) // If no vat at all - { + if (!$this->atleastoneratenotnull) { // If no vat at all $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1); @@ -704,8 +724,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva, 0, $outputlangs), 0, 'R', 1); // Total LocalTax1 - if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1); @@ -714,8 +733,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } // Total LocalTax2 - if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1); @@ -727,16 +745,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices //{ //Local tax 1 foreach ($this->localtax1 as $tvakey => $tvaval) { - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -754,16 +770,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices //{ //Local tax 2 foreach ($this->localtax2 as $tvakey => $tvaval) { - if ($tvakey != 0) // On affiche pas taux 0 - { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -793,10 +807,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $depositsamount = $object->getSumDepositsUsed((!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? 1 : 0); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) - { + if (($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { // Already paid + Deposits $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -805,8 +820,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); // Credit note - if ($creditnoteamount) - { + if ($creditnoteamount) { $labeltouse = ($outputlangs->transnoentities("CreditNotesOrExcessReceived") != "CreditNotesOrExcessReceived") ? $outputlangs->transnoentities("CreditNotesOrExcessReceived") : $outputlangs->transnoentities("CreditNotes"); $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); @@ -816,8 +830,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } // Escompte - if ($object->close_code == FactureFournisseur::CLOSECODE_DISCOUNTVAT) - { + if ($object->close_code == FactureFournisseur::CLOSECODE_DISCOUNTVAT) { $index++; $pdf->SetFillColor(255, 255, 255); @@ -865,7 +878,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -874,14 +889,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -890,61 +906,57 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); } } $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); - $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', - 'C'); + $pdf->MultiCell( + $this->posxdiscount - $this->posxunit - 1, + 2, + $outputlangs->transnoentities("Unit"), + '', + 'C' + ); } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHTShort"), '', 'C'); } @@ -967,14 +979,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $conf; $sign = 1; - if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign = -1; + if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) { + $sign = -1; + } $tab3_posx = 120; $tab3_top = $posy + 8; $tab3_width = 80; $tab3_height = 4; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $tab3_posx -= 20; } @@ -1010,11 +1023,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $sql .= " cp.code"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf, ".MAIN_DB_PREFIX."paiementfourn as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON p.fk_paiement = cp.id"; - $sql .= " WHERE pf.fk_paiementfourn = p.rowid and pf.fk_facturefourn = ".$object->id; + $sql .= " WHERE pf.fk_paiementfourn = p.rowid and pf.fk_facturefourn = ".((int) $object->id); $sql .= " ORDER BY p.datep"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; while ($i < $num) { @@ -1079,8 +1091,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { if (is_readable($logo)) { - $height=pdf_getHeightForLogo($logo); - $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) + $height=pdf_getHeightForLogo($logo); + $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1099,11 +1111,20 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierInvoice")." ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + $title = $outputlangs->transnoentities("PdfInvoiceTitle"); + if ($object->type == 1) { + $title = $outputlangs->transnoentities("InvoiceReplacement"); + } + if ($object->type == 2) { + $title = $outputlangs->transnoentities("InvoiceAvoir"); + } + if ($object->type == 3) { + $title = $outputlangs->transnoentities("InvoiceDeposit"); + } + $pdf->MultiCell(100, 3, $title." ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); $posy += 1; - if ($object->ref_supplier) - { + if ($object->ref_supplier) { $posy += 4; $pdf->SetFont('', 'B', $default_font_size); $pdf->SetXY($posx, $posy); @@ -1114,21 +1135,29 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetFont('', '', $default_font_size - 1); - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $posy += 3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); + } + } + + if (!empty($conf->global->PDF_SHOW_PROJECT)) { + $object->fetch_projet(); + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 4; $pdf->SetXY($posx, $posy); $langs->load("projects"); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } - if ($object->date) - { + if ($object->date) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1140,8 +1169,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R'); } - if ($object->thirdparty->code_fournisseur) - { + if ($object->thirdparty->code_fournisseur) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1155,19 +1183,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } @@ -1177,7 +1202,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Show sender $posy = 42 + $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -1206,8 +1233,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('internal', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1225,10 +1251,14 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42 + $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/supplier_invoice/index.html b/htdocs/core/modules/supplier_invoice/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 74c487b4d25..3d8f62ce3ca 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -99,7 +99,8 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $langs->load("bills"); // Check invoice num - $siyymm = ''; $max = ''; + $siyymm = ''; + $max = ''; $posindice = strlen($this->prefixinvoice) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -107,13 +108,14 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $sql .= " WHERE ref LIKE '".$db->escape($this->prefixinvoice)."____-%'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $siyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $siyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($siyymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $siyymm)) - { + if ($siyymm && !preg_match('/'.$this->prefixinvoice.'[0-9][0-9][0-9][0-9]/i', $siyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -129,13 +131,14 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $siyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $siyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($siyymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $siyymm)) - { + if ($siyymm && !preg_match('/'.$this->prefixcreditnote.'[0-9][0-9][0-9][0-9]/i', $siyymm)) { $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } @@ -150,13 +153,14 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $siyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $siyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($siyymm && !preg_match('/'.$this->prefixdeposit.'[0-9][0-9][0-9][0-9]/i', $siyymm)) - { + if ($siyymm && !preg_match('/'.$this->prefixdeposit.'[0-9][0-9][0-9][0-9]/i', $siyymm)) { $this->error = $langs->trans('ErrorNumRefModel', $max); return false; } @@ -175,8 +179,11 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices global $db, $conf; $prefix = $this->prefixinvoice; - if ($object->type == 2) $prefix = $this->prefixcreditnote; - elseif ($object->type == 3) $prefix = $this->prefixdeposit; + if ($object->type == 2) { + $prefix = $this->prefixcreditnote; + } elseif ($object->type == 3) { + $prefix = $this->prefixdeposit; + } // First, we get the max value $posindice = strlen($prefix) + 6; @@ -187,19 +194,23 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $resql = $db->query($sql); dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { return -1; } - if ($mode == 'last') - { - if ($max >= (pow(10, 4) - 1)) $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max); + if ($mode == 'last') { + if ($max >= (pow(10, 4) - 1)) { + $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max); + } $ref = ''; $sql = "SELECT ref as ref"; @@ -209,24 +220,31 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $ref = $obj->ref; - } else dol_print_error($db); + if ($obj) { + $ref = $obj->ref; + } + } else { + dol_print_error($db); + } return $ref; - } elseif ($mode == 'next') - { + } elseif ($mode == 'next') { $date = $object->date; // This is invoice date (not creation date) $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num); return $prefix.$yymm."-".$num; - } else dol_print_error('', 'Bad parameter for getNextValue'); + } else { + dol_print_error('', 'Bad parameter for getNextValue'); + } } diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index db24e32280c..3cf0a4a209e 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -1,10 +1,10 @@ - * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013-2018 Philippe Grand - * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2016 Alexandre Spangaro +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013-2018 Philippe Grand + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2016-2021 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 @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php - * \ingroup commande + * \ingroup Supplier invoice * \brief File containing the Tulip Class of numbering models of suppliers invoices references */ @@ -90,7 +90,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice")); $tooltip .= $langs->trans("GenericMaskCodes5"); - // Parametrage du prefix + // Setting the prefix $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte .= ':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; @@ -99,25 +99,23 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $texte .= ''; - // Parametrage du prefix des avoirs + // Prefix setting of credit note $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; - if ($conf->global->MAIN_FEATURE_LEVEL >= 2) - { + if ($conf->global->MAIN_FEATURE_LEVEL >= 2) { // Parametrage du prefix des replacement $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= ''; - - - // Parametrage du prefix des acomptes - $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= ''; } + // Prefix setting of deposit + $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''; + $texte .= ''; $texte .= ''; @@ -138,8 +136,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -161,18 +158,19 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Get Mask value $mask = ''; - if (is_object($object) && $object->type == 1) - { + if (is_object($object) && $object->type == 1) { $mask = $conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK; - if (!$mask) - { + if (!$mask) { $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK; } - } elseif (is_object($object) && $object->type == 2) $mask = $conf->global->SUPPLIER_CREDIT_TULIP_MASK; - elseif (is_object($object) && $object->type == 3) $mask = $conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; - else $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK; - if (!$mask) - { + } elseif (is_object($object) && $object->type == 2) { + $mask = $conf->global->SUPPLIER_CREDIT_TULIP_MASK; + } elseif (is_object($object) && $object->type == 3) { + $mask = $conf->global->SUPPLIER_DEPOSIT_TULIP_MASK; + } else { + $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK; + } + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index 855809c0a58..acb3ad8fa2a 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -135,10 +135,18 @@ abstract class ModeleNumRefSuppliersInvoices global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index 1b58934b611..9e9799f44c6 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -99,7 +99,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Recupere issuer $this->issuer = $mysoc; - if (!$this->issuer->country_code) $this->issuer->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->issuer->country_code) { + $this->issuer->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -130,17 +132,20 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->SUPPLIER_ORDER_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -159,8 +164,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -168,14 +172,13 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; } $texte .= ''; @@ -208,33 +211,31 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->fournisseur->commande->dir_output) - { + if ($conf->fournisseur->commande->dir_output) { $object->fetch_thirdparty(); - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->fournisseur->commande->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -242,20 +243,19 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $objectrefsupplier = dol_sanitizeFileName($object->ref_supplier); $dir = $conf->fournisseur->commande->dir_output.'/'.$objectref; $file = $dir."/".$objectref.".pdf"; - if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) { + $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + } } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -265,10 +265,11 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -285,21 +286,19 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { $socobject = $object->thirdparty; - // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use + // 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 { @@ -322,8 +321,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -339,8 +337,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -355,8 +352,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // 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); } @@ -370,7 +366,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -379,19 +377,19 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -400,32 +398,26 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -433,8 +425,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -442,12 +433,10 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -479,8 +468,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/supplier_order/doc/index.html b/htdocs/core/modules/supplier_order/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 9ebff653a56..f2f75031d3b 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -56,6 +56,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders */ 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 document type */ @@ -130,6 +135,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->db = $db; $this->name = "cornas"; $this->description = $langs->trans('SuppliersCommandModel'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -155,7 +161,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // For module retrocompatibility support durring PDF transition: TODO remove this at the end @@ -185,9 +193,13 @@ class pdf_cornas extends ModelePDFSuppliersOrders // phpcs:enable global $user, $langs, $conf, $hookmanager, $mysoc, $nblines; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); @@ -209,17 +221,16 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) - { - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -228,21 +239,23 @@ class pdf_cornas extends ModelePDFSuppliersOrders } $realpath = ''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { $filename = $obj['photo']; //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; $realpath = $dir.$filename; break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxtva; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxtva; + } - if ($conf->fournisseur->commande->dir_output) - { + if ($conf->fournisseur->commande->dir_output) { $object->fetch_thirdparty(); $deja_regle = 0; @@ -252,8 +265,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders //$amount_deposits_included = $object->getSumDepositsUsed(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->fournisseur->commande->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -261,23 +273,21 @@ class pdf_cornas extends ModelePDFSuppliersOrders $objectrefsupplier = dol_sanitizeFileName($object->ref_supplier); $dir = $conf->fournisseur->commande->dir_output.'/'.$objectref; $file = $dir."/".$objectref.".pdf"; - if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) { + $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + } } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -293,18 +303,18 @@ class pdf_cornas extends ModelePDFSuppliersOrders $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -318,7 +328,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -332,7 +344,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -343,11 +357,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -368,14 +380,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Extrafields in note $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { + if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; $pageposbeforenote = $pagenb; @@ -394,16 +404,19 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + if ($pageposafternote > $pageposbeforenote) { $pdf->rollbackTransaction(true); // prepar 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); + 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. @@ -419,8 +432,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -457,8 +469,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders // 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); + 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 @@ -469,15 +485,18 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -497,15 +516,16 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -516,23 +536,27 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posYAfterDescription = 0; // We start with Photo of product line - if (!empty($imglinesize['width']) && !empty($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // If photo too high, we moved completely on new page - { + if (!empty($imglinesize['width']) && !empty($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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($imglinesize['width']) && !empty($imglinesize['height'])) - { + if (!empty($imglinesize['width']) && !empty($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxtva - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -542,35 +566,35 @@ class pdf_cornas extends ModelePDFSuppliersOrders $curX = $this->posxdesc - 1; $showpricebeforepagebreak = 1; - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); $posyafter = $pdf->GetY(); - 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } //if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -587,22 +611,21 @@ class pdf_cornas extends ModelePDFSuppliersOrders // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // VAT Rate - if ($this->getColumnStatus('vat')) - { + if ($this->getColumnStatus('vat')) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'vat', $vat_rate); $nexY = max($pdf->GetY(), $nexY); } // Unit price before discount - if ($this->getColumnStatus('subprice')) - { + if ($this->getColumnStatus('subprice')) { $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'subprice', $up_excl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -610,8 +633,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Quantity // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { + if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); $nexY = max($pdf->GetY(), $nexY); @@ -619,24 +641,21 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Unit - if ($this->getColumnStatus('unit')) - { + if ($this->getColumnStatus('unit')) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $this->printStdColumnContent($pdf, $curY, 'unit', $unit); $nexY = max($pdf->GetY(), $nexY); } // Discount on line - if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) - { + if ($this->getColumnStatus('discount') && $object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'discount', $remise_percent); $nexY = max($pdf->GetY(), $nexY); } // Total HT line - if ($this->getColumnStatus('totalexcltax')) - { + if ($this->getColumnStatus('totalexcltax')) { $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'totalexcltax', $total_excl_tax); $nexY = max($pdf->GetY(), $nexY); @@ -645,8 +664,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -667,8 +685,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -677,36 +698,48 @@ class pdf_cornas extends ModelePDFSuppliersOrders $localtax1_type = $object->lines[$i]->localtax1_type; $localtax2_type = $object->lines[$i]->localtax2_type; - if (!empty($object->remise_percent)) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; - if (!empty($object->remise_percent)) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; - if (!empty($object->remise_percent)) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; + if (!empty($object->remise_percent)) { + $tvaligne -= ($tvaligne * $object->remise_percent) / 100; + } + if (!empty($object->remise_percent)) { + $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; + } + if (!empty($object->remise_percent)) { + $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; + } $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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $mysoc, $object->thirdparty); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = $posYAfterImage; + if ($posYAfterImage > $posYAfterDescription) { + $nexY = $posYAfterImage; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -715,11 +748,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders } // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == $pageposbeforeprintlines) - { + if ($pagenb == $pageposbeforeprintlines) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -728,12 +759,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders $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 (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) - { + 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); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -741,15 +772,18 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + if ($pagenb == $pageposbeforeprintlines) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -764,14 +798,15 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posy = $this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); // Affiche zone versements - if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included) - { + if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included) { $posy = $this->_tableau_versements($pdf, $object, $posy, $outputlangs); } // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -782,14 +817,14 @@ class pdf_cornas extends ModelePDFSuppliersOrders $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) - { + 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); @@ -838,8 +873,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $default_font_size = pdf_getPDFFontSize($outputlangs); // If France, show VAT mention if not applicable - if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) - { + if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); @@ -850,8 +884,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posxval = 52; // Show payments conditions - if (!empty($object->cond_reglement_code) || $object->cond_reglement) - { + if (!empty($object->cond_reglement_code) || $object->cond_reglement) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentConditions").':'; @@ -866,9 +899,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posy = $pdf->GetY() + 3; } - // Show payment mode - if (!empty($object->mode_reglement_code)) - { + // Show payment mode + if (!empty($object->mode_reglement_code)) { $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("PaymentMode").':'; @@ -910,9 +942,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); // Tableau total - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -933,10 +965,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFillColor(248, 248, 248); $this->atleastoneratenotnull = 0; - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey > 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey > 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; @@ -944,8 +974,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -958,8 +987,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); } } - if (!$this->atleastoneratenotnull) // If no vat at all - { + if (!$this->atleastoneratenotnull) { // If no vat at all $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1); @@ -968,8 +996,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1); // Total LocalTax1 - if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1); @@ -978,8 +1005,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders } // Total LocalTax2 - if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1); @@ -990,22 +1016,20 @@ class pdf_cornas extends ModelePDFSuppliersOrders //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ //Local tax 1 - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1022,22 +1046,20 @@ class pdf_cornas extends ModelePDFSuppliersOrders //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ //Local tax 2 - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -1071,10 +1093,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders //$depositsamount=$object->getSumDepositsUsed(); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if ($deja_regle > 0) - { + if ($deja_regle > 0) { // Already paid + Deposits $index++; @@ -1120,7 +1143,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1129,8 +1154,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); @@ -1147,9 +1171,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - foreach ($this->cols as $colKey => $colDef) - { - if (!$this->getColumnStatus($colKey)) continue; + foreach ($this->cols as $colKey => $colDef) { + if (!$this->getColumnStatus($colKey)) { + continue; + } // get title label $colDef['title']['label'] = !empty($colDef['title']['label']) ? $colDef['title']['label'] : $outputlangs->transnoentities($colDef['title']['textkey']); @@ -1159,8 +1184,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->line($colDef['xStartPos'], $tab_top, $colDef['xStartPos'], $tab_top + $tab_height); } - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]); $textWidth = $colDef['width'] - $colDef['title']['padding'][3] - $colDef['title']['padding'][1]; @@ -1198,7 +1222,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders //Affiche le filigrane brouillon - Print Draft Watermark /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) { - pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); + pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); }*/ //Print content @@ -1212,10 +1236,8 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1236,8 +1258,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 3, $title, '', 'R'); $posy += 1; - if ($object->ref_supplier) - { + if ($object->ref_supplier) { $posy += 4; $pdf->SetFont('', 'B', $default_font_size); $pdf->SetXY($posx, $posy); @@ -1248,21 +1269,29 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $posy += 3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); + } + } + + if (!empty($conf->global->PDF_SHOW_PROJECT)) { + $object->fetch_projet(); + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 4; $pdf->SetXY($posx, $posy); $langs->load("projects"); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } - if (!empty($object->date_commande)) - { + if (!empty($object->date_commande)) { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1276,16 +1305,16 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day'; - if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 'dayhour'; - if (!empty($object->delivery_date)) - { + if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) { + $usehourmin = 'dayhour'; + } + if (!empty($object->delivery_date)) { $posy += 4; $pdf->SetXY($posx - 90, $posy); $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->delivery_date, $usehourmin, false, $outputlangs, true), '', 'R'); } - if ($object->thirdparty->code_fournisseur) - { + if ($object->thirdparty->code_fournisseur) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1293,11 +1322,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1314,19 +1341,16 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } @@ -1336,7 +1360,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Show sender $posy = 42 + $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -1365,8 +1391,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // If CUSTOMER contact defined on order, we use it. Note: Even if this is a supplier object, the code for external contat that follow order is 'CUSTOMER' $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1384,10 +1409,14 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42 + $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1458,22 +1487,22 @@ class pdf_cornas extends ModelePDFSuppliersOrders ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -1508,8 +1537,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) - { + if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) { $this->cols['photo']['status'] = true; } @@ -1525,8 +1553,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders '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)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $this->cols['vat']['status'] = true; } @@ -1541,8 +1568,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => true, // add left line separator ); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) { $this->cols['subprice']['status'] = true; } @@ -1596,8 +1622,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => true, // add left line separator ); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) { $this->cols['totalexcltax']['status'] = true; } @@ -1616,11 +1641,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index be195d923da..de283265931 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -56,6 +56,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders */ 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 document type */ @@ -130,6 +135,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->db = $db; $this->name = "muscadet"; $this->description = $langs->trans('SuppliersCommandModelMuscadet'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -155,15 +161,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; $this->posxdiscount = 162; $this->postotalht = 174; - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $this->posxtva = 95; $this->posxup = 114; $this->posxqty = 132; @@ -175,10 +182,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->posxunit = 162; } - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxup = $this->posxtva; // posxtva is picture position reference + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { + $this->posxup = $this->posxtva; // posxtva is picture position reference + } $this->posxpicture = $this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxpicture -= 20; $this->posxtva -= 20; $this->posxup -= 20; @@ -213,9 +221,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // phpcs:enable global $user, $langs, $conf, $hookmanager, $mysoc, $nblines; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); @@ -224,17 +236,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); - if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) - { - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { + for ($i = 0; $i < $nblines; $i++) { + if (empty($object->lines[$i]->fk_product)) { + continue; + } $objphoto = new Product($this->db); $objphoto->fetch($object->lines[$i]->fk_product); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { @@ -243,21 +254,23 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } $realpath = ''; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { $filename = $obj['photo']; //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; $realpath = $dir.$filename; break; } - if ($realpath) $realpatharray[$i] = $realpath; + if ($realpath) { + $realpatharray[$i] = $realpath; + } } } - if (count($realpatharray) == 0) $this->posxpicture = $this->posxtva; + if (count($realpatharray) == 0) { + $this->posxpicture = $this->posxtva; + } - if ($conf->fournisseur->commande->dir_output) - { + if ($conf->fournisseur->commande->dir_output) { $object->fetch_thirdparty(); $deja_regle = 0; @@ -267,8 +280,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //$amount_deposits_included = $object->getSumDepositsUsed(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->fournisseur->commande->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -276,23 +288,21 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $objectrefsupplier = dol_sanitizeFileName($object->ref_supplier); $dir = $conf->fournisseur->commande->dir_output.'/'.$objectref; $file = $dir."/".$objectref.".pdf"; - if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) { + $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + } } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -308,18 +318,18 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -332,21 +342,21 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetSubject($outputlangs->transnoentities("PurchaseOrder")); $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PurchaseOrder")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0; $i < $nblines; $i++) - { - if ($object->lines[$i]->remise_percent) - { + for ($i = 0; $i < $nblines; $i++) { + if ($object->lines[$i]->remise_percent) { $this->atleastonediscount++; } } - if (empty($this->atleastonediscount)) - { + if (empty($this->atleastonediscount)) { $delta = ($this->postotalht - $this->posxdiscount); $this->posxpicture += $delta; $this->posxtva += $delta; @@ -359,7 +369,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -370,11 +382,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); // Incoterm - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $desc_incoterms = $object->getIncotermsForPDF(); - if ($desc_incoterms) - { + if ($desc_incoterms) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -391,8 +401,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Affiche notes - if (!empty($object->note_public)) - { + if (!empty($object->note_public)) { $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -412,15 +421,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -431,23 +441,27 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posYAfterDescription = 0; // We start with Photo of product line - if (!empty($imglinesize['width']) && !empty($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // If photo too high, we moved completely on new page - { + if (!empty($imglinesize['width']) && !empty($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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($imglinesize['width']) && !empty($imglinesize['height'])) - { + if (!empty($imglinesize['width']) && !empty($imglinesize['height'])) { $curX = $this->posxpicture - 1; $pdf->Image($realpatharray[$i], $curX + (($this->posxtva - $this->posxpicture - $imglinesize['width']) / 2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi // $pdf->Image does not increase value return by getY, so we save it manually @@ -458,8 +472,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $showpricebeforepagebreak = 1; $pdf->startTransaction(); - if ($posYAfterImage > 0) - { + if ($posYAfterImage > 0) { $descWidth = $this->posxpicture - $curX; } else { $descWidth = $this->posxtva - $curX; @@ -467,29 +480,32 @@ class pdf_muscadet extends ModelePDFSuppliersOrders pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc, 1); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. pdf_writelinedesc($pdf, $object, $i, $outputlangs, $descWidth, 3, $curX, $curY, $hideref, $hidedesc, 1); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -504,14 +520,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // VAT Rate - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); $pdf->MultiCell($this->posxup - $this->posxtva - 1, 3, $vat_rate, 0, 'R'); @@ -530,8 +546,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager); $pdf->SetXY($this->posxunit, $curY); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L'); @@ -539,8 +554,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Discount on line $pdf->SetXY($this->posxdiscount, $curY); - if ($object->lines[$i]->remise_percent) - { + if ($object->lines[$i]->remise_percent) { $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $pdf->MultiCell($this->postotalht - $this->posxdiscount - 1, 3, $remise_percent, 0, 'R'); } @@ -553,8 +567,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $object->lines[$i]->total_tva; + if (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) { + $tvaligne = $object->lines[$i]->multicurrency_total_tva; + } else { + $tvaligne = $object->lines[$i]->total_tva; + } $localtax1ligne = $object->lines[$i]->total_localtax1; $localtax2ligne = $object->lines[$i]->total_localtax2; @@ -563,36 +580,48 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $localtax1_type = $object->lines[$i]->localtax1_type; $localtax2_type = $object->lines[$i]->localtax2_type; - if (!empty($object->remise_percent)) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; - if (!empty($object->remise_percent)) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; - if (!empty($object->remise_percent)) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; + if (!empty($object->remise_percent)) { + $tvaligne -= ($tvaligne * $object->remise_percent) / 100; + } + if (!empty($object->remise_percent)) { + $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; + } + if (!empty($object->remise_percent)) { + $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; + } $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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $mysoc, $object->thirdparty); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; } // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) + if ($localtax1_type && $localtax1ligne != 0) { $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - if ($localtax2_type && $localtax2ligne != 0) + } + 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; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) { + $vatrate .= '*'; + } + if (!isset($this->tva[$vatrate])) { + $this->tva[$vatrate] = 0; + } $this->tva[$vatrate] += $tvaligne; - if ($posYAfterImage > $posYAfterDescription) $nexY = $posYAfterImage; + if ($posYAfterImage > $posYAfterDescription) { + $nexY = $posYAfterImage; + } // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -603,11 +632,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -616,12 +643,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code); @@ -629,15 +656,18 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -652,14 +682,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posy = $this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); // Affiche zone versements - if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included) - { + if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included) { $posy = $this->_tableau_versements($pdf, $object, $posy, $outputlangs); } // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -670,14 +701,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $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) - { + 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); @@ -794,9 +825,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); // Tableau total - $col1x = 120; $col2x = 170; - if ($this->page_largeur < 210) // To work with US executive format - { + $col1x = 120; + $col2x = 170; + if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } $largcol2 = ($this->page_largeur - $this->marge_droite - $col2x); @@ -817,10 +848,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFillColor(248, 248, 248); $this->atleastoneratenotnull = 0; - foreach ($this->tva as $tvakey => $tvaval) - { - if ($tvakey > 0) // On affiche pas taux 0 - { + foreach ($this->tva as $tvakey => $tvaval) { + if ($tvakey > 0) { // On affiche pas taux 0 $this->atleastoneratenotnull++; $index++; @@ -828,8 +857,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -842,8 +870,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); } } - if (!$this->atleastoneratenotnull) // If no vat at all - { + if (!$this->atleastoneratenotnull) { // If no vat at all $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code), 0, 'L', 1); @@ -852,8 +879,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1); // Total LocalTax1 - if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION == 'localtax1on' && $object->total_localtax1 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code), 0, 'L', 1); @@ -862,8 +888,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Total LocalTax2 - if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) - { + if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION == 'localtax2on' && $object->total_localtax2 > 0) { $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code), 0, 'L', 1); @@ -874,22 +899,20 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') //{ //Local tax 1 - foreach ($this->localtax1 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax1 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -906,22 +929,20 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') //{ //Local tax 2 - foreach ($this->localtax2 as $localtax_type => $localtax_rate) - { - if (in_array((string) $localtax_type, array('2', '4', '6'))) continue; + foreach ($this->localtax2 as $localtax_type => $localtax_rate) { + if (in_array((string) $localtax_type, array('2', '4', '6'))) { + continue; + } - foreach ($localtax_rate as $tvakey => $tvaval) - { - if ($tvakey != 0) // On affiche pas taux 0 - { + foreach ($localtax_rate as $tvakey => $tvaval) { + if ($tvakey != 0) { // On affiche pas taux 0 //$this->atleastoneratenotnull++; $index++; $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $tvacompl = ''; - if (preg_match('/\*/', $tvakey)) - { + if (preg_match('/\*/', $tvakey)) { $tvakey = str_replace('*', '', $tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } @@ -955,10 +976,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //$depositsamount=$object->getSumDepositsUsed(); //print "x".$creditnoteamount."-".$depositsamount;exit; $resteapayer = price2num($total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT'); - if (!empty($object->paye)) $resteapayer = 0; + if (!empty($object->paye)) { + $resteapayer = 0; + } - if ($deja_regle > 0) - { + if ($deja_regle > 0) { // Already paid + Deposits $index++; @@ -1004,7 +1026,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -1013,14 +1037,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); $pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4); $pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre); //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; - if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { + $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); + } } $pdf->SetDrawColor(128, 128, 128); @@ -1029,34 +1054,29 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Output Rect $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Designation"), '', 'L'); } - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) { $pdf->line($this->posxtva, $tab_top, $this->posxtva, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxtva - 3, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxtva + 3, 2, $outputlangs->transnoentities("VAT"), '', 'C'); } } $pdf->line($this->posxup, $tab_top, $this->posxup, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxup - 1, 2, $outputlangs->transnoentities("PriceUHT"), '', 'C'); } $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C'); } @@ -1070,21 +1090,17 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); - if (empty($hidetop)) - { - if ($this->atleastonediscount) - { + if (empty($hidetop)) { + if ($this->atleastonediscount) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("ReductionShort"), '', 'C'); } } - if ($this->atleastonediscount) - { + if ($this->atleastonediscount) { $pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); } - if (empty($hidetop)) - { + if (empty($hidetop)) { $pdf->SetXY($this->postotalht - 1, $tab_top + 1); $pdf->MultiCell(30, 2, $outputlangs->transnoentities("TotalHTShort"), '', 'C'); } @@ -1115,7 +1131,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders //Affiche le filigrane brouillon - Print Draft Watermark /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) ) { - pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); + pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); }*/ //Print content @@ -1129,10 +1145,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; - if ($this->emetteur->logo) - { - if (is_readable($logo)) - { + if ($this->emetteur->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -1153,8 +1167,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 3, $title, '', 'R'); $posy += 1; - if ($object->ref_supplier) - { + if ($object->ref_supplier) { $posy += 4; $pdf->SetFont('', 'B', $default_font_size); $pdf->SetXY($posx, $posy); @@ -1165,11 +1178,20 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 1); - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $posy += 3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); + } + } + + if (!empty($conf->global->PDF_SHOW_PROJECT)) { + $object->fetch_projet(); + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 4; $pdf->SetXY($posx, $posy); $langs->load("projects"); @@ -1178,8 +1200,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } } - if (!empty($object->date_commande)) - { + if (!empty($object->date_commande)) { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1193,16 +1214,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day'; - if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 'dayhour'; - if (!empty($object->delivery_date)) - { + if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) { + $usehourmin = 'dayhour'; + } + if (!empty($object->delivery_date)) { $posy += 4; $pdf->SetXY($posx - 90, $posy); $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->delivery_date, $usehourmin, false, $outputlangs, true), '', 'R'); } - if ($object->thirdparty->code_fournisseur) - { + if ($object->thirdparty->code_fournisseur) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1210,11 +1231,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1231,19 +1250,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = ''; // Add internal contact of proposal if defined $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $object->fetch_user($arrayidcontact[0]); $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } @@ -1253,7 +1269,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Show sender $posy = 42 + $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -1281,8 +1299,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // If CUSTOMER contact defined on order, we use it. Note: Even if this is a supplier object, the code for external contat that follow order is 'CUSTOMER' $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1300,10 +1317,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Show recipient $widthrecbox = 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42 + $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/supplier_order/index.html b/htdocs/core/modules/supplier_order/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 056b9c2c15e..5aa92995c4c 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -64,7 +64,9 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders { global $conf; - if ((float) $conf->global->MAIN_VERSION_LAST_INSTALL >= 5.0) $this->prefix = 'PO'; // We use correct standard code "PO = Purchase Order" + if ((float) $conf->global->MAIN_VERSION_LAST_INSTALL >= 5.0) { + $this->prefix = 'PO'; // We use correct standard code "PO = Purchase Order" + } } /** @@ -75,7 +77,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -100,7 +102,8 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders { global $conf, $langs, $db; - $coyymm = ''; $max = ''; + $coyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -108,13 +111,14 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { return true; } else { $langs->load("errors"); @@ -142,20 +146,27 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } //$date=time(); $date = $object->date_commande; // Not always defined - if (empty($date)) $date = $object->date; // Creation date is order date for suppliers orders + if (empty($date)) { + $date = $object->date; // Creation date is order date for suppliers orders + } $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } return $this->prefix.$yymm."-".$num; } diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 7fa99bd7453..a609eeade08 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -111,8 +111,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -134,8 +133,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders // On defini critere recherche compteur $mask = $conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index dcd48b25913..6fe3cb8883d 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -57,12 +57,12 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator global $conf; $type = 'order_supplier'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -137,10 +137,18 @@ abstract class ModeleNumRefSuppliersOrders global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/supplier_payment/doc/index.html b/htdocs/core/modules/supplier_payment/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index bcb90df2bb1..138a6210904 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -53,6 +53,11 @@ class pdf_standard extends ModelePDFSuppliersPayments */ 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 document type */ @@ -127,6 +132,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->db = $db; $this->name = "standard"; $this->description = $langs->trans('DocumentModelStandardPDF'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -152,8 +158,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->posxtotalttc = 180; //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; - if ($this->page_largeur < 210) // To work with US executive format - { + if ($this->page_largeur < 210) { // To work with US executive format $this->posxreffacturefourn -= 20; $this->posxreffacture -= 20; $this->posxtype -= 20; @@ -170,7 +175,9 @@ class pdf_standard extends ModelePDFSuppliersPayments // Get source company $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -191,17 +198,20 @@ class pdf_standard extends ModelePDFSuppliersPayments // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!empty($conf->global->MAIN_USE_FPDF)) { + $outputlangs->charset_output = 'ISO-8859-1'; + } // Load translation files required by the page $outputlangs->loadLangs(array("main", "suppliers", "companies", "bills", "dict", "products")); $object->factures = array(); - if ($conf->fournisseur->payment->dir_output) - { + if ($conf->fournisseur->payment->dir_output) { $object->fetch_thirdparty(); /** * Supplier invoice list @@ -212,10 +222,8 @@ class pdf_standard extends ModelePDFSuppliersPayments $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiementfourn = '.$object->id; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql) > 0) - { + if ($resql) { + if ($this->db->num_rows($resql) > 0) { while ($objp = $this->db->fetch_object($resql)) { $objp->type = $outputlangs->trans('SupplierInvoice'); $object->lines[] = $objp; @@ -226,8 +234,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $total = $object->amount; // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->fournisseur->payment->dir_output; $file = $dir."/SPECIMEN.pdf"; } else { @@ -235,23 +242,21 @@ class pdf_standard extends ModelePDFSuppliersPayments $objectrefsupplier = dol_sanitizeFileName($object->ref_supplier); $dir = $conf->fournisseur->payment->dir_output.'/'.$objectref; $file = $dir."/".$objectref.".pdf"; - if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + if (!empty($conf->global->SUPPLIER_REF_IN_NAME)) { + $file = $dir."/".$objectref.($objectrefsupplier ? "_".$objectrefsupplier : "").".pdf"; + } } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -267,18 +272,18 @@ class pdf_standard extends ModelePDFSuppliersPayments $heightforinfotot = 50; // Height reserved to output the info and total 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 + 8; // Height reserved to output the footer (value include bottom margin) - if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6; + if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) { + $heightforfooter += 6; + } $pdf->SetAutoPageBreak(1, 0); - if (class_exists('TCPDF')) - { + 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)) - { + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) { $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -292,14 +297,18 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $this->_pagehead($pdf, $object, 1, $outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -321,8 +330,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblines; $i++) - { + 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); @@ -339,8 +347,7 @@ class pdf_standard extends ModelePDFSuppliersPayments //pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,1); $pdf->writeHTMLCell($this->posxtva - $curX, 4, $curX, $curY, $object->lines[$i]->datef, 0, 1, false, true, 'J', true); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + if ($pageposafter > $pageposbefore) { // There is a pagebreak $pdf->rollbackTransaction(true); $pageposafter = $pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; @@ -348,21 +355,25 @@ class pdf_standard extends ModelePDFSuppliersPayments //pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,1); $pdf->writeHTMLCell($this->posxtva - $curX, 4, $curX, $curY, $object->lines[$i]->datef, 0, 1, false, true, 'J', true); $posyafter = $pdf->GetY(); - 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 - { + 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); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -377,7 +388,8 @@ class pdf_standard extends ModelePDFSuppliersPayments // We suppose that a too long description is moved completely on next page if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + $pdf->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -408,8 +420,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) - { + 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); @@ -420,11 +431,9 @@ class pdf_standard extends ModelePDFSuppliersPayments $nexY += 2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) - { + while ($pagenb < $pageposafter) { $pdf->setPage($pagenb); - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -433,12 +442,12 @@ class pdf_standard extends ModelePDFSuppliersPayments $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 (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 == 1) - { + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1); } else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1); @@ -446,15 +455,18 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == 1) - { + if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } else { @@ -470,7 +482,9 @@ class pdf_standard extends ModelePDFSuppliersPayments // Footer page $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -481,14 +495,14 @@ class pdf_standard extends ModelePDFSuppliersPayments $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) - { + 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); @@ -582,7 +596,9 @@ class pdf_standard extends ModelePDFSuppliersPayments // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -639,10 +655,8 @@ class pdf_standard extends ModelePDFSuppliersPayments // Logo $logo = $conf->mycompany->dir_output.'/logos/'.$mysoc->logo; - if ($mysoc->logo) - { - if (is_readable($logo)) - { + if ($mysoc->logo) { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -664,26 +678,37 @@ class pdf_standard extends ModelePDFSuppliersPayments if ($object->ref_supplier) { - $posy+=4; + $posy+=4; $pdf->SetFont('','B', $default_font_size); - $pdf->SetXY($posx,$posy); + $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier")." : " . $object->ref_supplier, '', 'R'); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier")." : " . $object->ref_supplier, '', 'R'); $posy+=1; } $pdf->SetFont('','', $default_font_size - 1); + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { + $object->fetch_projet(); + if (!empty($object->project->ref)) { + $posy += 3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); + } + } + if (! empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); if (! empty($object->project->ref)) { - $posy+=4; + $outputlangs->load("projects"); + $posy+=4; $pdf->SetXY($posx,$posy); - $langs->load("projects"); + $langs->load("projects"); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->project->ref), '', 'R'); } } @@ -715,16 +740,17 @@ class pdf_standard extends ModelePDFSuppliersPayments // Show list of linked objects $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size); - */ - if ($showaddress) - { + */ + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty); // Show payer $posy = 42; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = 40; // Show sender frame @@ -759,10 +785,14 @@ class pdf_standard extends ModelePDFSuppliersPayments // Show recipient $widthrecbox = 90; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = 42; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 394ac684485..8f3b7ad36df 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -101,15 +101,14 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -131,8 +130,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments // We get cursor rule $mask = $conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 8a315399183..f86950c24d6 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -63,7 +63,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -88,7 +88,8 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments { global $conf, $langs, $db; - $payyymm = ''; $max = ''; + $payyymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -97,13 +98,14 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $payyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $payyymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) - { + if ($payyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $payyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -131,11 +133,13 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(__METHOD__, LOG_DEBUG); return -1; @@ -145,8 +149,11 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments $date = $object->datepaye; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(__METHOD__." return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php index c5c5fd489f9..b1b8e999ce9 100644 --- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php +++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php @@ -42,12 +42,12 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator global $conf; $type = 'supplier_payment'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -131,10 +131,15 @@ abstract class ModeleNumRefSupplierPayments global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - elseif ($this->version == 'dolibarr') return DOL_VERSION; - elseif ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } elseif ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } elseif ($this->version == 'dolibarr') { + return DOL_VERSION; + } elseif ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 8c42681e986..4b761f8099b 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -97,7 +97,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -121,8 +123,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -134,17 +135,20 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -163,8 +167,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '; //$texte.=$nbofiles?'':''; $texte .= count($listoffiles); @@ -172,36 +175,34 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $texte .= ''; } - if ($nbofiles) - { - $texte .= ''; + if ($nbofiles) { + $texte .= '
    '; + // Show list of found files + foreach ($listoffiles as $file) { + $texte .= '- '.$file['name'].' '.img_picto('', 'listlight').'
    '; + } + $texte .= '
    '; - if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFSupplierProposal::liste_modeles($this->db); + $list = ModelePDFSupplierProposal::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
    '.$langs->trans("DefaultModelSupplierProposalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); $texte .= "
    '.$langs->trans("DefaultModelSupplierProposalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); $texte .= "
    '.$langs->trans("DefaultModelSupplierProposalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); $texte .= "
    '; } @@ -237,38 +238,35 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "companies", "bills", "dict")); - if ($conf->supplier_proposal->dir_output) - { + if ($conf->supplier_proposal->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new SupplierProposal($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -278,20 +276,19 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $dir = $conf->supplier_proposal->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -302,10 +299,11 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -322,8 +320,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -358,8 +355,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Line of free text $newfreetext = ''; $paramfreetext = 'SUPPLIER_PROPOSAL_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -375,8 +371,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -391,8 +386,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // 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); } @@ -405,7 +399,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $array_other = $this->get_substitutionarray_other($outputlangs); $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -414,19 +410,19 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -435,32 +431,26 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -468,8 +458,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -477,12 +466,10 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -512,8 +499,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/supplier_proposal/doc/index.html b/htdocs/core/modules/supplier_proposal/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index e9e2179823b..356c3550100 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -53,6 +53,11 @@ class pdf_aurore extends ModelePDFSupplierProposal */ 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 document type */ @@ -127,6 +132,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->db = $db; $this->name = "aurore"; $this->description = $langs->trans('DocModelAuroreDescription'); + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; @@ -503,7 +509,8 @@ class pdf_aurore extends ModelePDFSupplierProposal // 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->setPage($pageposafter); + $curY = $tab_top_newpage; } $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut @@ -906,7 +913,8 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetFont('', '', $default_font_size - 1); // Tableau total - $col1x = 120; $col2x = 170; + $col1x = 120; + $col2x = 170; if ($this->page_largeur < 210) { // To work with US executive format $col2x -= 20; } diff --git a/htdocs/core/modules/supplier_proposal/index.html b/htdocs/core/modules/supplier_proposal/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 9daf788d92e..b225899cef2 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -65,7 +65,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal public function info() { global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); } @@ -90,7 +90,8 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal { global $conf, $langs, $db; - $pryymm = ''; $max = ''; + $pryymm = ''; + $max = ''; $posindice = strlen($this->prefix) + 6; $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; @@ -99,14 +100,15 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $pryymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $pryymm = substr($row[0], 0, 6); + $max = $row[0]; + } } - if (!$pryymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $pryymm)) - { + if (!$pryymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $pryymm)) { return true; } else { $langs->load("errors"); @@ -134,11 +136,13 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +151,11 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal $date = time(); $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 4abb7cb07f1..adf53aed4e6 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -104,15 +104,14 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal */ public function getExample() { - global $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; - if (!$numExample) - { + if (!$numExample) { $numExample = 'NotConfigured'; } return $numExample; @@ -134,8 +133,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal // On defini critere recherche compteur $mask = $conf->global->SUPPLIER_PROPOSAL_SAPHIR_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php index 4e32817ff19..0b6f0b3725d 100644 --- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php +++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php @@ -56,12 +56,12 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator global $conf; $type = 'supplier_proposal'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -144,10 +144,18 @@ abstract class ModeleNumRefSupplierProposal global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/core/modules/syslog/index.html b/htdocs/core/modules/syslog/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index cac16178c92..940f9a165d9 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -87,10 +87,11 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface $filename = $this->getFilename(); - if (file_exists($filename) && is_writable($filename)) - { + if (file_exists($filename) && is_writable($filename)) { dol_syslog('admin/syslog: file '.$filename); - } else $errors[] = $langs->trans("ErrorFailedToOpenFile", $filename); + } else { + $errors[] = $langs->trans("ErrorFailedToOpenFile", $filename); + } return $errors; } @@ -105,17 +106,17 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface { global $conf; - if (empty($conf->global->SYSLOG_FILE)) $tmp = DOL_DATA_ROOT.'/dolibarr.log'; - else $tmp = str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE); + if (empty($conf->global->SYSLOG_FILE)) { + $tmp = DOL_DATA_ROOT.'/dolibarr.log'; + } else { + $tmp = str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE); + } - if (!empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) - { - if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) // file depend on session key name (Note that session name is same for all users and is not a per user value) - { + if (!empty($conf->global->SYSLOG_FILE_ONEPERSESSION)) { + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 1) { // file depend on session key name (Note that session name is same for all users and is not a per user value) $suffixinfilename .= '_'.session_name(); } - if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) // file depend on session value sor per user - { + if ($conf->global->SYSLOG_FILE_ONEPERSESSION == 2) { // file depend on session value sor per user $suffixinfilename .= '_'.session_name().'_'.$_SERVER["REMOTE_ADDR"]; } } @@ -134,18 +135,21 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface { global $conf, $dolibarr_main_prod; - if (!empty($conf->global->MAIN_SYSLOG_DISABLE_FILE)) return; // Global option to disable output of this handler + if (!empty($conf->global->MAIN_SYSLOG_DISABLE_FILE)) { + return; // Global option to disable output of this handler + } $logfile = $this->getFilename($suffixinfilename); // Test constant SYSLOG_FILE_NO_ERROR (should stay a constant defined with define('SYSLOG_FILE_NO_ERROR',1); - if (defined('SYSLOG_FILE_NO_ERROR')) $filefd = @fopen($logfile, 'a+'); - else $filefd = fopen($logfile, 'a+'); + if (defined('SYSLOG_FILE_NO_ERROR')) { + $filefd = @fopen($logfile, 'a+'); + } else { + $filefd = fopen($logfile, 'a+'); + } - if (!$filefd) - { - if (!defined('SYSLOG_FILE_NO_ERROR') || !constant('SYSLOG_FILE_NO_ERROR')) - { + if (!$filefd) { + if (!defined('SYSLOG_FILE_NO_ERROR') || !constant('SYSLOG_FILE_NO_ERROR')) { // Do not break dolibarr usage if log fails //throw new Exception('Failed to open log file '.basename($logfile)); print 'Failed to open log file '.($dolibarr_main_prod ?basename($logfile) : $logfile); @@ -163,8 +167,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface ); $delay = ""; - if (!empty($conf->global->MAIN_SYSLOG_SHOW_DELAY)) - { + if (!empty($conf->global->MAIN_SYSLOG_SHOW_DELAY)) { $now = microtime(true); $delay = " ".sprintf("%05.3f", $this->lastTime != 0 ? $now - $this->lastTime : 0); $this->lastTime = $now; diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index 0ac23c0bda4..87cd89b2035 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -51,7 +51,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface global $conf; // This function does not exists on some ISP (Ex: Free in France) - if (!function_exists('openlog')) return 0; + if (!function_exists('openlog')) { + return 0; + } return empty($conf->global->SYSLOG_DISABLE_LOGHANDLER_SYSLOG) ? 1 : 0; // Set SYSLOG_DISABLE_LOGHANDLER_SYSLOG to 1 to disable this loghandler } @@ -86,10 +88,11 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface $errors = array(); $facility = constant($conf->global->SYSLOG_FACILITY); - if ($facility) - { + if ($facility) { // Only LOG_USER supported on Windows - if (!empty($_SERVER["WINDIR"])) $facility = constant('LOG_USER'); + if (!empty($_SERVER["WINDIR"])) { + $facility = constant('LOG_USER'); + } dol_syslog("admin/syslog: facility ".$facility); } else { @@ -109,12 +112,15 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface { global $conf; - if (!empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG)) return; // Global option to disable output of this handler + if (!empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG)) { + return; // Global option to disable output of this handler + } - if (!empty($conf->global->SYSLOG_FACILITY)) // Example LOG_USER - { + if (!empty($conf->global->SYSLOG_FACILITY)) { // Example LOG_USER $facility = constant($conf->global->SYSLOG_FACILITY); - } else $facility = constant('LOG_USER'); + } else { + $facility = constant('LOG_USER'); + } // (int) is required to avoid error parameter 3 expected to be long openlog('dolibarr', LOG_PID | LOG_PERROR, (int) $facility); diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php index 57e87006559..1b0a5d5bf32 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php @@ -141,17 +141,22 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); return -1; } - if ($mode == 'last') - { - if ($max >= (pow(10, 4) - 1)) $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max); + if ($mode == 'last') { + if ($max >= (pow(10, 4) - 1)) { + $num = $max; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max); + } $ref = ''; $sql = "SELECT ref as ref"; @@ -163,21 +168,29 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $ref = $obj->ref; - } else dol_print_error($db); + if ($obj) { + $ref = $obj->ref; + } + } else { + dol_print_error($db); + } return $ref; - } elseif ($mode == 'next') - { + } elseif ($mode == 'next') { $date = $invoice->date; // This is invoice date (not creation date) $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog(get_class($this)."::getNextValue return ".$this->prefix.$pos_source.'-'.$yymm.'-'.$num); return $this->prefix.$pos_source.'-'.$yymm.'-'.$num; - } else dol_print_error('', 'Bad parameter for getNextValue'); + } else { + dol_print_error('', 'Bad parameter for getNextValue'); + } } /** diff --git a/htdocs/core/modules/takepos/modules_takepos.php b/htdocs/core/modules/takepos/modules_takepos.php index c2e40abbd10..b9fae565647 100644 --- a/htdocs/core/modules/takepos/modules_takepos.php +++ b/htdocs/core/modules/takepos/modules_takepos.php @@ -107,10 +107,18 @@ abstract class ModeleNumRefTakepos global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans('VersionDevelopment'); - if ($this->version == 'experimental') return $langs->trans('VersionExperimental'); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans('VersionDevelopment'); + } + if ($this->version == 'experimental') { + return $langs->trans('VersionExperimental'); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans('NotAvailable'); } } diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index 35afdcf7192..eb90baef7e5 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -89,7 +89,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -121,17 +123,20 @@ class doc_generic_ticket_odt extends ModelePDFTicket $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->TICKET_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -149,8 +154,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; $texte .= '
    '; @@ -196,38 +200,35 @@ class doc_generic_ticket_odt extends ModelePDFTicket // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "companies", "bills", "dict")); - if ($conf->user->dir_output) - { + if ($conf->user->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new User($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -237,20 +238,19 @@ class doc_generic_ticket_odt extends ModelePDFTicket $dir = $conf->user->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -261,10 +261,11 @@ class doc_generic_ticket_odt extends ModelePDFTicket // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -281,15 +282,13 @@ class doc_generic_ticket_odt extends ModelePDFTicket // If CUSTOMER contact defined on user, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -313,8 +312,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_WARNING); return -1; @@ -327,7 +325,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -335,31 +335,29 @@ class doc_generic_ticket_odt extends ModelePDFTicket // Call the ODTSubstitution hook $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } @@ -389,8 +387,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/ticket/doc/index.html b/htdocs/core/modules/ticket/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index 2badaf4a33f..523da47191d 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -151,8 +151,8 @@ class mod_ticket_simple extends ModeleNumRefTicket if ($max >= (pow(10, 4) - 1)) { $num = $max + 1; - } // If counter > 9999, we do not format on 4 chars, we take number as it is - else { + } else { + // If counter > 9999, we do not format on 4 chars, we take number as it is $num = sprintf("%04s", $max + 1); } diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 2e39bf53ea2..fb24e2782c9 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -94,7 +94,9 @@ class doc_generic_user_odt extends ModelePDFUser // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -118,8 +120,7 @@ class doc_generic_user_odt extends ModelePDFUser $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -131,17 +132,20 @@ class doc_generic_user_odt extends ModelePDFUser $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->USER_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -159,31 +163,29 @@ class doc_generic_user_odt extends ModelePDFUser $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFUser::liste_modeles($this->db); + $list = ModelePDFUser::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
    '.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->USER_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->USER_ADDON_PDF_ODT_DEFAULT); $texte .= "
    '.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->USER_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->USER_ADDON_PDF_ODT_TOBILL); $texte .= "
    '.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->USER_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->USER_ADDON_PDF_ODT_CLOSED); $texte .= "
    '; } @@ -230,38 +232,35 @@ class doc_generic_user_odt extends ModelePDFUser // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "companies", "bills", "dict")); - if ($conf->user->dir_output) - { + if ($conf->user->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new User($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -271,20 +270,19 @@ class doc_generic_user_odt extends ModelePDFUser $dir = $conf->user->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -295,10 +293,11 @@ class doc_generic_user_odt extends ModelePDFUser // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -315,15 +314,13 @@ class doc_generic_user_odt extends ModelePDFUser // If CUSTOMER contact defined on user, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -347,8 +344,7 @@ class doc_generic_user_odt extends ModelePDFUser 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_WARNING); return -1; @@ -361,7 +357,9 @@ class doc_generic_user_odt extends ModelePDFUser $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -369,31 +367,29 @@ class doc_generic_user_odt extends ModelePDFUser // Call the ODTSubstitution hook $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } @@ -423,8 +419,9 @@ class doc_generic_user_odt extends ModelePDFUser $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/user/doc/index.html b/htdocs/core/modules/user/doc/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php index 2269d530c97..b0142687ce5 100644 --- a/htdocs/core/modules/user/modules_user.class.php +++ b/htdocs/core/modules/user/modules_user.class.php @@ -58,10 +58,10 @@ abstract class ModelePDFUser extends CommonDocGenerator global $conf; $type = 'user'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + $list = getListOfModels($db, $type, $maxfilenamelength); + return $list; } } diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 6fcc6160a97..45a9469753e 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -97,7 +97,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -121,8 +123,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $texte .= ''; $texte .= ''; $texte .= ''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { $texte .= ''; $texte .= ''; $texte .= ''; @@ -134,17 +135,20 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->USERGROUP_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { - unset($listofdir[$key]); continue; + 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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -162,31 +166,29 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $texte .= '
    '; // Scan directories - if (count($listofdir)) - { + if (count($listofdir)) { $texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).''; - if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) - { + if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFUserGroup::liste_modeles($this->db); + $list = ModelePDFUserGroup::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
    '.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_DEFAULT); $texte .= "
    '.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_TOBILL); $texte .= "
    '.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_CLOSED); $texte .= "
    '; } @@ -222,38 +224,35 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; // Load translation files required by the page $outputlangs->loadLangs(array("main", "companies", "bills", "dict")); - if ($conf->user->dir_output) - { + if ($conf->user->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new UserGroup($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -261,20 +260,19 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $dir = $conf->usergroup->dir_output; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -285,10 +283,11 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -305,15 +304,13 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // If CUSTOMER contact defined on user, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -340,8 +337,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Line of free text $newfreetext = ''; $paramfreetext = 'user_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -372,8 +368,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // 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_WARNING); } @@ -386,7 +381,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($array_global, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -394,19 +391,19 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Call the ODTSubstitution hook $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { - if (preg_match('/logo$/', $key)) // Image - { - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (preg_match('/logo$/', $key)) { // Image + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } @@ -415,16 +412,13 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { - foreach ($object->members as $u) - { + if ($foundtagforlines) { + foreach ($object->members as $u) { $tmparray = $this->get_substitutionarray_each_var_object($u, $outputlangs); unset($tmparray['object_pass']); unset($tmparray['object_pass_indatabase']); @@ -432,17 +426,14 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$u); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { try { if (!is_array($val)) { $listlines->setVars($key, $val, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); - } catch (SegmentException $e) - { + } catch (SegmentException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } @@ -450,8 +441,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -459,12 +449,10 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key => $value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_WARNING); } } @@ -494,8 +482,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php new file mode 100755 index 00000000000..4e23219581c --- /dev/null +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -0,0 +1,149 @@ + + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2019 Frédéric France + * Copyright (C) 2020 Gauthier VERDOL + * + * 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/modules/workstation/mod_workstation_advanced.php + * \ingroup workstation + * \brief File containing class for advanced numbering model of Workstation + */ + +require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php'; + + +/** + * Class to manage customer Bom numbering rules advanced + */ +class mod_workstation_advanced extends ModeleNumRefWorkstation +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."
    \n"; + $texte .= '
    '; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Workstation"), $langs->transnoentities("Workstation")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Workstation"), $langs->transnoentities("Workstation")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte .= ''; + $texte .= ''; + + $texte .= ''; + + $texte .= ''; + + $texte .= '
    '.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
    '; + $texte .= '
    '; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $db, $langs, $mysoc; + + $object = new Workstation($db); + $object->initAsSpecimen(); + + /*$old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT';*/ + + $numExample = $this->getNextValue($object); + + /*$mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type;*/ + + if (!$numExample) { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($object) + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask = $conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK; + + if (!$mask) { + $this->error = 'NotConfigured'; + return 0; + } + + $date = $object->date; + + $numFinal = get_next_value($db, $mask, 'workstation_workstation', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/core/modules/workstation/mod_workstation_standard.php b/htdocs/core/modules/workstation/mod_workstation_standard.php new file mode 100755 index 00000000000..34e727dd272 --- /dev/null +++ b/htdocs/core/modules/workstation/mod_workstation_standard.php @@ -0,0 +1,159 @@ + + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2020 Gauthier VERDOL + * + * 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/modules/workstation/mod_workstation_standard.php + * \ingroup workstation + * \brief File of class to manage Workstation numbering rules standard + */ +require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php'; + +/** + * Class to manage customer order numbering rules standard + */ +class mod_workstation_standard extends ModeleNumRefWorkstation +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix = 'WORKSTATION'; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'standard'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @param Object $object Object we need next value for + * @return boolean false if conflict, true if ok + */ + public function canBeActivated($object) + { + global $conf, $langs, $db; + + $coyymm = ''; + $max = ''; + + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."workstation_workstation"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + if ($object->ismultientitymanaged == 1) { + $sql .= " AND entity = ".$conf->entity; + } elseif ($object->ismultientitymanaged == 2) { + // TODO + } + + $resql = $db->query($sql); + if ($resql) { + $row = $db->fetch_row($resql); + if ($row) { + $coyymm = substr($row[0], 0, 6); + $max = $row[0]; + } + } + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorNumRefModel', $max); + return false; + } + + return true; + } + + /** + * Return next free value + * + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($object) + { + global $db, $conf; + + // First we get the max value + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."workstation_workstation"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + //$sql .= " AND entity = ".$conf->entity; + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } + } else { + dol_syslog("mod_workstation_standard::getNextValue", LOG_DEBUG); + return -1; + } + + //$date=time(); + $date = dol_now(); + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } + + dol_syslog("mod_workstation_standard::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + } +} diff --git a/htdocs/core/modules/workstation/modules_workstation.php b/htdocs/core/modules/workstation/modules_workstation.php new file mode 100755 index 00000000000..c8052ed4ff8 --- /dev/null +++ b/htdocs/core/modules/workstation/modules_workstation.php @@ -0,0 +1,159 @@ + + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2020 Gauthier VERDOL + * + * 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/modules/workstation/modules_workstation.php + * \ingroup workstation + * \brief File that contains parent class for workstations document models and parent class for workstations numbering models + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit + + +/** + * Parent class for documents models + */ +abstract class ModelePDFWorkstation extends CommonDocGenerator +{ + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of active generation modules + * + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates + */ + public static function liste_modeles($db, $maxfilenamelength = 0) + { + // phpcs:enable + global $conf; + + $type = 'workstation'; + $list = array(); + + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $list = getListOfModels($db, $type, $maxfilenamelength); + + return $list; + } +} + + + +/** + * Parent class to manage numbering of Workstation + */ +abstract class ModeleNumRefWorkstation +{ + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Returns the default description of the numbering template + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("workstation@workstation"); + return $langs->trans("NoDescription"); + } + + /** + * Returns an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("workstation@workstation"); + return $langs->trans("NoExample"); + } + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @param Object $object Object we need next value for + * @return boolean false if conflict, true if ok + */ + public function canBeActivated($object) + { + return true; + } + + /** + * Returns next assigned value + * + * @param Object $object Object we need next value for + * @return string Valeur + */ + public function getNextValue($object) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Returns version of numbering module + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } + return $langs->trans("NotAvailable"); + } +} diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index f1b5a109230..b3079691cd5 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -44,214 +44,234 @@ $website = GETPOST('website', 'alpha'); // Security check -if (empty($modulepart)) accessforbidden('Bad value for modulepart'); +if (empty($modulepart)) { + accessforbidden('Bad value for modulepart'); +} $accessallowed = 0; -if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'service' || $modulepart == 'produit|service') -{ +if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'service' || $modulepart == 'produit|service') { $result = restrictedArea($user, 'produit|service', $id, 'product&product'); - if ($modulepart == 'produit|service' && (!$user->rights->produit->lire && !$user->rights->service->lire)) accessforbidden(); + if ($modulepart == 'produit|service' && (!$user->rights->produit->lire && !$user->rights->service->lire)) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'project') -{ +} elseif ($modulepart == 'project') { $result = restrictedArea($user, 'projet', $id); - if (!$user->rights->projet->lire) accessforbidden(); + if (!$user->rights->projet->lire) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'bom') -{ +} elseif ($modulepart == 'bom') { $result = restrictedArea($user, $modulepart, $id, 'bom_bom'); - if (!$user->rights->bom->read) accessforbidden(); + if (!$user->rights->bom->read) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'member') -{ +} elseif ($modulepart == 'member') { $result = restrictedArea($user, 'adherent', $id, '', '', 'fk_soc', 'rowid'); - if (!$user->rights->adherent->lire) accessforbidden(); + if (!$user->rights->adherent->lire) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'user') -{ +} elseif ($modulepart == 'user') { $result = restrictedArea($user, $modulepart, $id, $modulepart); - if (!$user->rights->user->user->lire) accessforbidden(); + if (!$user->rights->user->user->lire) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'tax') -{ +} elseif ($modulepart == 'tax') { $result = restrictedArea($user, $modulepart, $id, 'chargesociales', 'charges'); - if (!$user->rights->tax->charges->lire) accessforbidden(); + if (!$user->rights->tax->charges->lire) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'bank') -{ +} elseif ($modulepart == 'bank') { $result = restrictedArea($user, 'banque', $id, 'bank_account'); - if (!$user->rights->banque->lire) accessforbidden(); + if (!$user->rights->banque->lire) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'medias') -{ +} elseif ($modulepart == 'medias') { $permtoadd = ($user->rights->mailing->creer || $user->rights->website->write); - if (!$permtoadd) accessforbidden(); + if (!$permtoadd) { + accessforbidden(); + } $accessallowed = 1; -} elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') -{ +} elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') { $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); - if (!$user->rights->fournisseur->facture->lire) accessforbidden(); + if (!$user->rights->fournisseur->facture->lire) { + accessforbidden(); + } $accessallowed = 1; -} else // ticket, holiday, expensereport, societe... -{ +} else { + // ticket, holiday, expensereport, societe... $result = restrictedArea($user, $modulepart, $id, $modulepart); - if (empty($user->rights->$modulepart->read) && empty($user->rights->$modulepart->lire)) accessforbidden(); + if (empty($user->rights->$modulepart->read) && empty($user->rights->$modulepart->lire)) { + accessforbidden(); + } $accessallowed = 1; } // Security: // Limit access if permissions are wrong -if (!$accessallowed) -{ +if (!$accessallowed) { accessforbidden(); } // Define dir according to modulepart -if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'service' || $modulepart == 'produit|service') -{ +if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'service' || $modulepart == 'produit|service') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $object = new Product($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->product->multidir_output[$object->entity]; // By default - if ($object->type == Product::TYPE_PRODUCT) $dir = $conf->product->multidir_output[$object->entity]; - if ($object->type == Product::TYPE_SERVICE) $dir = $conf->service->multidir_output[$object->entity]; + if ($object->type == Product::TYPE_PRODUCT) { + $dir = $conf->product->multidir_output[$object->entity]; + } + if ($object->type == Product::TYPE_SERVICE) { + $dir = $conf->service->multidir_output[$object->entity]; + } } -} elseif ($modulepart == 'project') -{ +} elseif ($modulepart == 'project') { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object = new Project($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->project->multidir_output[$object->entity]; // By default } -} elseif ($modulepart == 'propal') -{ +} elseif ($modulepart == 'propal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object = new Propal($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->propal->multidir_output[$object->entity]; // By default } -} elseif ($modulepart == 'holiday') -{ +} elseif ($modulepart == 'holiday') { require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $object = new Holiday($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } -} elseif ($modulepart == 'member') -{ +} elseif ($modulepart == 'member') { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $object = new Adherent($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->adherent->dir_output; // By default } -} elseif ($modulepart == 'societe') -{ +} elseif ($modulepart == 'societe') { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $object = new Societe($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; } -} elseif ($modulepart == 'user') -{ +} elseif ($modulepart == 'user') { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $object = new User($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } -} elseif ($modulepart == 'expensereport') -{ +} elseif ($modulepart == 'expensereport') { require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object = new ExpenseReport($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->expensereport->dir_output; // By default } -} elseif ($modulepart == 'tax') -{ +} elseif ($modulepart == 'tax') { require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object = new ChargeSociales($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } -} elseif ($modulepart == 'ticket') -{ +} elseif ($modulepart == 'ticket') { require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; $object = new Ticket($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } -} elseif ($modulepart == 'bom') -{ +} elseif ($modulepart == 'bom') { require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; $object = new BOM($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'mrp') { require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; $object = new MO($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'bank') { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $object = new Account($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->bank->dir_output; // By default } } elseif ($modulepart == 'facture') { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object = new Facture($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->$modulepart->dir_output; // By default } } elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object = new FactureFournisseur($db); - if ($id > 0) - { + if ($id > 0) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error($db, 'Failed to load object'); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } $dir = $conf->fournisseur->dir_output.'/facture'; // By default } } elseif ($modulepart == 'medias') { @@ -260,34 +280,50 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv print 'Bug: Action crop for modulepart = '.$modulepart.' is not supported yet by photos_resize.php.'; } -if (empty($backtourl)) -{ +if (empty($backtourl)) { $regs = array(); - if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('expensereport'))) $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('facture'))) $backtourl = DOL_URL_ROOT."/compta/facture/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('facture_fourn', 'facture_fournisseur'))) $backtourl = DOL_URL_ROOT."/fourn/facture/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) { + if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) { + $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('expensereport'))) { + $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('holiday'))) { + $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('member'))) { + $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('project'))) { + $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('propal'))) { + $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('societe'))) { + $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('tax'))) { + $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('ticket'))) { + $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('user'))) { + $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('facture'))) { + $backtourl = DOL_URL_ROOT."/compta/facture/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('facture_fourn', 'facture_fournisseur'))) { + $backtourl = DOL_URL_ROOT."/fourn/facture/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) { $num = $regs[1]; $backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".$id.'&num='.urlencode($num).'&file='.urldecode($file); - } elseif (in_array($modulepart, array('bank'))) $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('mrp'))) $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($file); - elseif (in_array($modulepart, array('medias'))) { + } elseif (in_array($modulepart, array('bank'))) { + $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('mrp'))) { + $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($file); + } elseif (in_array($modulepart, array('medias'))) { $section_dir = dirname($file); - if (!preg_match('/\/$/', $section_dir)) $section_dir .= '/'; + if (!preg_match('/\/$/', $section_dir)) { + $section_dir .= '/'; + } $backtourl = DOL_URL_ROOT."/website/index.php?action=file_manager&website=".$website.'§ion_dir='.urlencode($section_dir); + } else { + // Generic case that should work for everybody else + $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($file); } - // Generic case that should work for everybody else - else $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($file); } @@ -305,8 +341,7 @@ if ($cancel) { } } -if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey")) -{ +if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey")) { if (empty($dir)) { print 'Bug: Value for $dir could not be defined.'; } @@ -315,8 +350,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") $result = dol_imageResizeOrCrop($fullpath, 0, GETPOST('sizex', 'int'), GETPOST('sizey', 'int')); - if ($result == $fullpath) - { + if ($result == $fullpath) { // If image is related to a given object, we create also thumbs. if (is_object($object)) { $object->addThumbs($fullpath); @@ -329,8 +363,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', $rel_filename); - if ($result > 0) // If found - { + if ($result > 0) { // If found $filename = basename($rel_filename); $rel_dir = dirname($rel_filename); $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); @@ -338,8 +371,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") $ecmfile->label = md5_file(dol_osencode($fullpath)); $result = $ecmfile->update($user); - } elseif ($result == 0) // If not found - { + } elseif ($result == 0) { // If not found $filename = basename($rel_filename); $rel_dir = dirname($rel_filename); $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); @@ -353,15 +385,13 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") $ecmfile->description = ''; // indexed content $ecmfile->keyword = ''; // keyword content $result = $ecmfile->create($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); } $result = $ecmfile->create($user); } - if ($backtourl) - { + if ($backtourl) { header("Location: ".$backtourl); exit; } else { @@ -376,8 +406,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") } // Crop d'une image -if ($action == 'confirm_crop') -{ +if ($action == 'confirm_crop') { if (empty($dir)) { print 'Bug: Value for $dir could not be defined.'; } @@ -387,8 +416,7 @@ if ($action == 'confirm_crop') //var_dump($fullpath.' '.$_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit; $result = dol_imageResizeOrCrop($fullpath, 1, GETPOST('w', 'int'), GETPOST('h', 'int'), GETPOST('x', 'int'), GETPOST('y', 'int')); - if ($result == $fullpath) - { + if ($result == $fullpath) { if (is_object($object)) { $object->addThumbs($fullpath); } @@ -400,8 +428,7 @@ if ($action == 'confirm_crop') include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', $rel_filename); - if ($result > 0) // If found - { + if ($result > 0) { // If found $filename = basename($rel_filename); $rel_dir = dirname($rel_filename); $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); @@ -409,8 +436,7 @@ if ($action == 'confirm_crop') $ecmfile->label = md5_file(dol_osencode($fullpath)); $result = $ecmfile->update($user); - } elseif ($result == 0) // If not found - { + } elseif ($result == 0) { // If not found $filename = basename($rel_filename); $rel_dir = dirname($rel_filename); $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); @@ -424,8 +450,7 @@ if ($action == 'confirm_crop') $ecmfile->description = ''; // indexed content $ecmfile->keyword = ''; // keyword content $result = $ecmfile->create($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); } $result = $ecmfile->create($user); @@ -451,8 +476,10 @@ if ($action == 'confirm_crop') */ $title= $langs->trans("ImageEditor"); +$morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'); +$morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'); -llxHeader($head, $title, '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css')); +llxHeader($head, $title, '', '', 0, 0, $morejs, $morecss); print load_fiche_titre($title); @@ -460,8 +487,8 @@ print load_fiche_titre($title); $infoarray = dol_getImageSize($dir."/".GETPOST("file", 'alpha')); $height = $infoarray['height']; $width = $infoarray['width']; -print $langs->trans("CurrentInformationOnImage").': '; -print $langs->trans("Width").': '.$width.' x '.$langs->trans("Height").': '.$height.'
    '; +print ''.$langs->trans("CurrentInformationOnImage").': '; +print $langs->trans("Width").': '.$width.' x '.$langs->trans("Height").': '.$height.'
    '; print '
    '."\n"; @@ -500,15 +527,15 @@ print '
    '."\n"; print '
    '."\n"; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { $infoarray = dol_getImageSize($dir."/".GETPOST("file")); $height = $infoarray['height']; $width = $infoarray['width']; - $widthforcrop = $width; $refsizeforcrop = 'orig'; $ratioforcrop = 1; + $widthforcrop = $width; + $refsizeforcrop = 'orig'; + $ratioforcrop = 1; // If image is too large, we use another scale. - if (!empty($_SESSION['dol_screenwidth']) && ($widthforcrop > round($_SESSION['dol_screenwidth'] / 2))) - { + if (!empty($_SESSION['dol_screenwidth']) && ($widthforcrop > round($_SESSION['dol_screenwidth'] / 2))) { $ratioforcrop = 2; $widthforcrop = round($_SESSION['dol_screenwidth'] / $ratioforcrop); $refsizeforcrop = 'screenwidth'; diff --git a/htdocs/core/search.php b/htdocs/core/search.php index b0a61f5bd71..321fc94a925 100644 --- a/htdocs/core/search.php +++ b/htdocs/core/search.php @@ -23,14 +23,30 @@ * \brief Wrapper that receive any search. Depending on input field, make a redirect to correct URL. */ -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); +if (!defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', 1); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} require_once '../main.inc.php'; @@ -38,104 +54,84 @@ require_once '../main.inc.php'; * Actions */ -if (GETPOST('search_proposal') != '') -{ +if (GETPOST('search_proposal') != '') { header("Location: ".DOL_URL_ROOT.'/comm/propal/list.php?sall='.urlencode(GETPOST('search_proposal'))); exit; } -if (GETPOST('search_customer_order') != '') -{ +if (GETPOST('search_customer_order') != '') { header("Location: ".DOL_URL_ROOT.'/commande/list.php?sall='.urlencode(GETPOST('search_customer_order'))); exit; } -if (GETPOST('search_supplier_order') != '') -{ +if (GETPOST('search_supplier_order') != '') { header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php?search_all='.urlencode(GETPOST('search_supplier_order'))); exit; } -if (GETPOST('search_intervention') != '') -{ +if (GETPOST('search_intervention') != '') { header("Location: ".DOL_URL_ROOT.'/fichinter/list.php?sall='.urlencode(GETPOST('search_intervention'))); exit; } -if (GETPOST('search_contract') != '') -{ +if (GETPOST('search_contract') != '') { header("Location: ".DOL_URL_ROOT.'/contrat/list.php?sall='.urlencode(GETPOST('search_contract'))); exit; } -if (GETPOST('search_invoice') != '') -{ +if (GETPOST('search_invoice') != '') { header("Location: ".DOL_URL_ROOT.'/compta/facture/list.php?sall='.urlencode(GETPOST('search_invoice'))); exit; } -if (GETPOST('search_supplier_invoice') != '') -{ +if (GETPOST('search_supplier_invoice') != '') { header("Location: ".DOL_URL_ROOT.'/fourn/facture/list.php?sall='.urlencode(GETPOST('search_supplier_invoice'))); exit; } -if (GETPOST('search_supplier_proposal') != '') -{ +if (GETPOST('search_supplier_proposal') != '') { header("Location: ".DOL_URL_ROOT.'/supplier_proposal/list.php?sall='.urlencode(GETPOST('search_supplier_proposal'))); exit; } -if (GETPOST('search_donation') != '') -{ +if (GETPOST('search_donation') != '') { header("Location: ".DOL_URL_ROOT.'/don/list.php?sall='.urlencode(GETPOST('search_donation'))); exit; } -if (GETPOST('search_product') != '') -{ +if (GETPOST('search_product') != '') { header("Location: ".DOL_URL_ROOT.'/product/list.php?sall='.urlencode(GETPOST('search_product'))); exit; } -if (GETPOST('search_thirdparty') != '') -{ +if (GETPOST('search_thirdparty') != '') { header("Location: ".DOL_URL_ROOT.'/societe/list.php?mode=search&sall='.urlencode(GETPOST('search_thirdparty'))); exit; } -if (GETPOST('search_contact') != '') -{ +if (GETPOST('search_contact') != '') { header("Location: ".DOL_URL_ROOT.'/contact/list.php?mode=search&sall='.urlencode(GETPOST('search_contact'))); exit; } -if (GETPOST('search_deplacement') != '') -{ +if (GETPOST('search_deplacement') != '') { header("Location: ".DOL_URL_ROOT.'/compta/deplacement/list.php?mode=search&sall='.urlencode(GETPOST('search_deplacement'))); exit; } -if (GETPOST('search_expensereport') != '') -{ +if (GETPOST('search_expensereport') != '') { header("Location: ".DOL_URL_ROOT.'/expensereport/list.php?mode=search&sall='.urlencode(GETPOST('search_expensereport'))); exit; } -if (GETPOST('search_holiday') != '') -{ +if (GETPOST('search_holiday') != '') { header("Location: ".DOL_URL_ROOT.'/holiday/list.php?mode=search&sall='.urlencode(GETPOST('search_holiday'))); exit; } -if (GETPOST('search_member') != '') -{ +if (GETPOST('search_member') != '') { header("Location: ".DOL_URL_ROOT.'/adherents/list.php?mode=search&sall='.urlencode(GETPOST('search_member'))); exit; } -if (GETPOST('search_project') != '') -{ +if (GETPOST('search_project') != '') { header("Location: ".DOL_URL_ROOT.'/projet/list.php?mode=search&search_all='.urlencode(GETPOST('search_project'))); exit; } -if (GETPOST('search_task') != '') -{ +if (GETPOST('search_task') != '') { header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php?mode=search&search_all='.urlencode(GETPOST('search_task'))); exit; } -if (GETPOST('search_user') != '') -{ +if (GETPOST('search_user') != '') { header("Location: ".DOL_URL_ROOT.'/user/list.php?mode=search&sall='.urlencode(GETPOST('search_user'))); exit; } -if (GETPOST('search_group') != '') -{ +if (GETPOST('search_group') != '') { header("Location: ".DOL_URL_ROOT.'/user/group/list.php?mode=search&sall='.urlencode(GETPOST('search_group'))); exit; } @@ -143,8 +139,7 @@ if (GETPOST('search_group') != '') // If we are here, search was called with no supported criteria -if (!empty($_SERVER['HTTP_REFERER'])) -{ +if (!empty($_SERVER['HTTP_REFERER'])) { header("Location: ".$_SERVER['HTTP_REFERER']); exit; } else { diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 39f41b1dfe7..8581776a2d8 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -27,15 +27,23 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} //if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} //if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); require_once '../main.inc.php'; -if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php +if (GETPOST('lang', 'aZ09')) { + $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php +} $langs->load("main"); @@ -69,9 +77,10 @@ $hookmanager->initHooks(array('searchform')); // Define $searchform $searchform = ''; -if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile -{ - if (!is_object($form)) $form = new Form($db); +if ($conf->use_javascript_ajax && 1 == 2) { // select2 is ko with jmobile + if (!is_object($form)) { + $form = new Form($db); + } $selected = -1; $searchform .= '

    '.$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, '', '', 0, 1, 'minwidth300', 1, $langs->trans("Search"), 0); } else { @@ -82,15 +91,13 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile $i = 0; $accesskeyalreadyassigned = array(); - foreach ($arrayresult as $key => $val) - { + foreach ($arrayresult as $key => $val) { $tmp = explode('?', $val['url']); $urlaction = $tmp[0]; $keysearch = 'search_all'; $accesskey = ''; - if (!$accesskeyalreadyassigned[$val['label'][0]]) - { + if (!$accesskeyalreadyassigned[$val['label'][0]]) { $accesskey = $val['label'][0]; $accesskeyalreadyassigned[$accesskey] = $accesskey; } @@ -104,10 +111,11 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile // Execute hook printSearchForm $parameters = array('searchform'=>$searchform); $reshook = $hookmanager->executeHooks('printSearchForm', $parameters); // Note that $action and $object may have been modified by some hooks -if (empty($reshook)) -{ +if (empty($reshook)) { $searchform .= $hookmanager->resPrint; -} else $searchform = $hookmanager->resPrint; +} else { + $searchform = $hookmanager->resPrint; +} print "\n"; diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index accb8eeed00..3c55f1a1e37 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -29,7 +29,9 @@ $langs->loadLangs(array("companies", "other")); // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 2a9438f4413..ddcdfdf9e4b 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -28,8 +28,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; } @@ -43,60 +42,58 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con
    " method="post"> @@ -148,7 +145,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con - + @@ -163,18 +160,18 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con trans("Value"); ?> @@ -182,11 +179,14 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con +global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - + - + + + @@ -204,10 +204,10 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con - -multicompany->enabled) { ?> + +multicompany->enabled)) { ?> - +
    trans("LabelOrTranslationKey"); ?>
    trans("LabelOrTranslationKey"); ?>
    trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)
    - - -
    - - - textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"), 1, 0, '', 0, 2, 'helpvalue2')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"), 1, 0, '', 0, 2, 'helpvalue3')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'

    '.$langs->trans("Examples").':
    '.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?>
    - textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?> -
    + + +
    + + + textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"), 1, 0, '', 0, 2, 'helpvalue2')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"), 1, 0, '', 0, 2, 'helpvalue3')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'

    '.$langs->trans("Examples").':
    '.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?>
    + textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?> +
    trans("LanguageFile"); ?>
    textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
    textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
    textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?>
    textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?>
    trans("DefaultValue").' ('.$langs->trans("Database").')'; ?>
    trans("Totalizable"); ?>>
    textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
    textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?>
    trans("AllEntities"); ?>>
    trans("AllEntities"); ?>>
    diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index e56c7fb9257..c055dd1d3b5 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -27,8 +27,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; } @@ -42,60 +41,58 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con @@ -144,7 +141,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
    Contact:con - + @@ -171,24 +168,20 @@ $entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrna $printable = $extrafields->attributes[$elementtype]['printable'][$attrname]; $enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname]; -if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) -{ +if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { $param_chain = ''; - foreach ($param['options'] as $key => $value) - { - if (strlen($key)) - { + foreach ($param['options'] as $key => $value) { + if (strlen($key)) { $param_chain .= $key.','.$value."\n"; } } -} elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) -{ +} elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) { $paramlist = array_keys($param['options']); $param_chain = $paramlist[0]; } ?> -trans("LabelOrTranslationKey"); ?> +trans("LabelOrTranslationKey"); ?> trans("AttributeCode"); ?> @@ -215,16 +208,19 @@ if ($size <= 255 && in_array($type, array('text', 'html'))) { $typewecanchangeinto['text'][] = 'varchar'; }*/ -if (in_array($type, array_keys($typewecanchangeinto))) -{ +if (in_array($type, array_keys($typewecanchangeinto))) { $newarray = array(); print ''; print ajax_combobox('type'); @@ -244,18 +240,18 @@ if (in_array($type, array_keys($typewecanchangeinto))) trans("Value"); ?> - - -
    - - - textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"), 1, 0, '', 0, 2, 'helpvalue2')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"), 1, 0, '', 0, 2, 'helpvalue3')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'

    '.$langs->trans("Examples").':
    '.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?>
    - textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?> - textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?> -
    + + +
    + + + textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"), 1, 0, '', 0, 2, 'helpvalue2')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"), 1, 0, '', 0, 2, 'helpvalue3')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'

    '.$langs->trans("Examples").':
    '.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?>
    + textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?> +
    @@ -266,11 +262,14 @@ if (in_array($type, array_keys($typewecanchangeinto))) trans("LanguageFile"); ?> + global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + + trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> @@ -296,9 +295,9 @@ if (in_array($type, array_keys($typewecanchangeinto))) textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?> -multicompany->enabled) { ?> +multicompany->enabled)) { ?> - trans("AllEntities"); ?>> + trans("AllEntities"); ?>> diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index c62a95ec12b..c4a21812b01 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012-2017 Regis Houssin + * Copyright (C) 2012-2021 Regis Houssin * Copyright (C) 2018-2019 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -25,8 +25,7 @@ */ // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } @@ -66,16 +65,14 @@ print ''.$langs->trans("AlwaysEditable").''; print ''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''; print ''.$form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")).''; print ''.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).''; -if ($conf->multicompany->enabled) { - print ''.$langs->trans("Entities").''; +if (!empty($conf->multicompany->enabled)) { + print ''.$langs->trans("Entity").''; } print ' '; print "\n"; -if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) -{ - foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value) - { +if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) { + foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value) { /*if (! dol_eval($extrafields->attributes[$elementtype]['enabled'][$key], 1)) { // TODO Uncomment this to exclude extrafields of modules not enabled. Add a link to "Show extrafields disabled" // continue; @@ -102,12 +99,13 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel print ''.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."\n"; if (!empty($conf->multicompany->enabled)) { print ''; - if (empty($extrafields->attributes[$elementtype]['entityid'][$key])) - { + if (empty($extrafields->attributes[$elementtype]['entityid'][$key])) { print $langs->trans("All"); } else { global $multicompanylabel_cache; - if (!is_array($multicompanylabel_cache)) $multicompanylabel_cache = array(); + if (!is_array($multicompanylabel_cache)) { + $multicompanylabel_cache = array(); + } if (empty($multicompanylabel_cache[$extrafields->attributes[$elementtype]['entityid'][$key]])) { global $mc; $mc->getInfo($extrafields->attributes[$elementtype]['entityid'][$key]); @@ -123,7 +121,9 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel } } else { $colspan = 13; - if (!empty($conf->multicompany->enabled)) $colspan++; + if (!empty($conf->multicompany->enabled)) { + $colspan++; + } print ''; print ''; diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 590a65f1286..86292ec0ff4 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -154,7 +154,8 @@ if (!empty($array_query['cust_status'])) { } print ''; print $formadvtargetemaling->advMultiselectarray( - 'cust_status', array( + 'cust_status', + array( '0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity') ), @@ -473,8 +474,9 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { $extrafields->fetch_name_optionals_label($elementype); if (!empty($extrafields->attributes[$elementtype]['type'])) { foreach ($extrafields->attributes[$elementtype]['type'] as $key => &$value) { - if ($value == 'radio') + if ($value == 'radio') { $value = 'select'; + } } } if (!empty($extrafields->attributes[$elementtype]['label'])) { diff --git a/htdocs/core/tpl/ajax/fileupload_main.tpl.php b/htdocs/core/tpl/ajax/fileupload_main.tpl.php index 6b7e21b5261..a4563c7536a 100644 --- a/htdocs/core/tpl/ajax/fileupload_main.tpl.php +++ b/htdocs/core/tpl/ajax/fileupload_main.tpl.php @@ -16,8 +16,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; } @@ -27,20 +26,20 @@ if (empty($conf) || !is_object($conf))
    diff --git a/htdocs/core/tpl/ajax/index.html b/htdocs/core/tpl/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php index 119e27a705b..3193f3db96d 100644 --- a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php +++ b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php @@ -16,15 +16,13 @@ */ // 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; } $objectUrl = $object->getNomUrl(0, '', 0, 1); -if ($object->element == 'propal') -{ +if ($object->element == 'propal') { $objectUrl = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id; } @@ -36,67 +34,67 @@ if ($object->element == 'propal') $(document).ready(function(){ $('.objectlinked_importbtn').click(function (e) { - e.preventDefault(); - var page = $(this).attr("href"); + e.preventDefault(); + var page = $(this).attr("href"); - var fromelement = $(this).attr("data-element"); - var fromelementid = $(this).attr("data-id"); + var fromelement = $(this).attr("data-element"); + var fromelementid = $(this).attr("data-id"); if( page != undefined && fromelement != undefined && fromelementid != undefined) { - var windowWidth = $(window).width()*0.8; //retrieve current window width - var windowHeight = $(window).height()*0.8; //retrieve current window height + var windowWidth = $(window).width()*0.8; //retrieve current window width + var windowHeight = $(window).height()*0.8; //retrieve current window height var htmlLines; var formId = "ajaxloaded_tablelinesform_" + fromelement + "_" + fromelementid; - $.get(page, function (data) { - htmlLines = $(data).find('#tablelines') ; - }); + $.get(page, function (data) { + htmlLines = $(data).find('#tablelines') ; + }); - var $dialog = $('') - .load( page + " #tablelines", function() { + var $dialog = $('
    ') + .load( page + " #tablelines", function() { - $("#" + formId + " #tablelines").prop("id", "ajaxloaded_tablelines"); // change id attribute + $("#" + formId + " #tablelines").prop("id", "ajaxloaded_tablelines"); // change id attribute - $("#" + formId + " .linecheckbox,#" + formId + " .linecheckboxtoggle").prop("checked", true); // checked by default + $("#" + formId + " .linecheckbox,#" + formId + " .linecheckboxtoggle").prop("checked", true); // checked by default - // reload checkbox toggle function - $("#" + formId + " .linecheckboxtoggle").click(function(){ - var checkBoxes = $("#" + formId + " .linecheckbox"); - checkBoxes.prop("checked", this.checked); - }); + // reload checkbox toggle function + $("#" + formId + " .linecheckboxtoggle").click(function(){ + var checkBoxes = $("#" + formId + " .linecheckbox"); + checkBoxes.prop("checked", this.checked); + }); - }) - .html(htmlLines) - .dialog({ - autoOpen: false, - modal: true, - height: windowHeight, - width: windowWidth, - title: "transnoentities('LinesToImport'); ?>", - buttons: { - "trans('Import'); ?>": function() { - $( this ).dialog( "close" ); - $("#" + formId).append(''); - $("#" + formId).append(''); - $("#" + formId).append(''); - $("#" + formId).submit(); - }, - "trans("Cancel"); ?>": function() { - $( this ).dialog( "close" ); - } - } - }); + }) + .html(htmlLines) + .dialog({ + autoOpen: false, + modal: true, + height: windowHeight, + width: windowWidth, + title: "transnoentities('LinesToImport'); ?>", + buttons: { + "trans('Import'); ?>": function() { + $( this ).dialog( "close" ); + $("#" + formId).append(''); + $("#" + formId).append(''); + $("#" + formId).append(''); + $("#" + formId).submit(); + }, + "trans("Cancel"); ?>": function() { + $( this ).dialog( "close" ); + } + } + }); - $dialog.dialog('open'); + $dialog.dialog('open'); } else { $.jnotify("trans('ErrorNoUrl'); ?>", "error", true); } - }); + }); @@ -106,7 +104,7 @@ $(document).ready(function(){ diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 25d5f6f3526..6d6df3a5408 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -26,9 +26,8 @@ */ // Protection to avoid direct call of template -if (empty($object) || !is_object($object)) -{ - print "Error, template page can't be called as URL"; +if (empty($object) || !is_object($object)) { + print "Error, template page ".basename(__FILE__)." can't be called with no object defined."; exit; } @@ -50,13 +49,13 @@ if (GETPOST('action', 'aZ09') != 'editline' && $nboflines > 1 && $conf->browser- $(document).ready(function(){ $(".imgupforline").hide(); $(".imgdownforline").hide(); - $(".lineupdown").removeAttr('href'); - $(".tdlineupdown").css("background-image",'url(theme.'/img/grip.png'; ?>)'); - $(".tdlineupdown").css("background-repeat","no-repeat"); - $(".tdlineupdown").css("background-position","center center"); + $(".lineupdown").removeAttr('href'); + $(".tdlineupdown").css("background-image",'url(theme.'/img/grip.png'; ?>)'); + $(".tdlineupdown").css("background-repeat","no-repeat"); + $(".tdlineupdown").css("background-position","center center"); - console.log("Prepare tableDnd for #"); - $("#").tableDnD({ + console.log("Prepare tableDnd for #"); + $("#").tableDnD({ onDrop: function(table, row) { var reloadpage = ""; console.log("tableDND onDrop"); @@ -100,9 +99,9 @@ $(document).ready(function(){ onDragClass: "dragClass", dragHandle: "td.tdlineupdown" }); - $(".tdlineupdown").hover( function() { $(this).addClass('showDragHandle'); }, - function() { $(this).removeClass('showDragHandle'); } - ); + $(".tdlineupdown").hover( function() { $(this).addClass('showDragHandle'); }, + function() { $(this).removeClass('showDragHandle'); } + ); }); @@ -110,7 +109,7 @@ $(document).ready(function(){ $(document).ready(function(){ $(".imgupforline").hide(); $(".imgdownforline").hide(); - $(".lineupdown").removeAttr('href'); + $(".lineupdown").removeAttr('href'); }); diff --git a/htdocs/core/tpl/bloc_comment.tpl.php b/htdocs/core/tpl/bloc_comment.tpl.php index 6dae2c713f2..f30bb0c5c61 100644 --- a/htdocs/core/tpl/bloc_comment.tpl.php +++ b/htdocs/core/tpl/bloc_comment.tpl.php @@ -1,8 +1,7 @@ '; print ''; print "\n"; -if ($action !== 'editcomment') -{ +if ($action !== 'editcomment') { print ''; // Description @@ -58,21 +56,17 @@ if ($action !== 'editcomment') print ''; // List of comments -if (!empty($object->comments)) -{ +if (!empty($object->comments)) { // Default color for current user $TColors = array($user->id => array('bgcolor'=>'efefef', 'color'=>'555')); $first = true; - foreach ($object->comments as $comment) - { + foreach ($object->comments as $comment) { $fk_user = $comment->fk_user_author; $userstatic->fetch($fk_user); - if (empty($TColors[$fk_user])) - { + if (empty($TColors[$fk_user])) { $bgcolor = randomColor(180, 240); - if (!empty($userstatic->color)) - { + if (!empty($userstatic->color)) { $bgcolor = $userstatic->color; } $color = (colorIsLight($bgcolor)) ? '555' : 'fff'; @@ -85,19 +79,17 @@ if (!empty($object->comments)) print '
    '; print '
    '; - if (!empty($user->photo)) - { - print Form::showphoto('userphoto', $userstatic, 80, 0, 0, '', 'small', 0, 1).'
    '; + if (!empty($user->photo)) { + print Form::showphoto('userphoto', $userstatic, 80, 0, 0, '', 'small', 0, 1).'
    '; } - print $langs->trans('User').' : '.$userstatic->getNomUrl().'
    '; + print $langs->trans('User').' : '.$userstatic->getNomUrl().'
    '; print $langs->trans('Date').' : '.dol_print_date($comment->datec, 'dayhoursec'); print '
    '; // End comment-info print '
    '; print '
    '; - if ($action === 'editcomment' && $comment->id == $idcomment) - { + if ($action === 'editcomment' && $comment->id == $idcomment) { print '
    '; print ''; print ''; @@ -107,8 +99,7 @@ if (!empty($object->comments)) } print '
    '; - if ($action === 'editcomment' && $comment->id == $idcomment) - { + if ($action === 'editcomment' && $comment->id == $idcomment) { $doleditor = new DolEditor('comment_description', $comment->description, '', 80, 'dolibarr_notes', 'In', 0, true, true, ROWS_3, '100%'); print $doleditor->Create(1); } else { @@ -116,15 +107,13 @@ if (!empty($object->comments)) } print '
    '; // End comment-description - if ($action === 'editcomment' && $comment->id == $idcomment) - { + if ($action === 'editcomment' && $comment->id == $idcomment) { print ''; print ''; print '
    '; } else { - if ($fk_user == $user->id || $user->admin == 1) - { + if ($fk_user == $user->id || $user->admin == 1) { print ''; print img_picto('', 'edit.png'); print ''; diff --git a/htdocs/core/tpl/bloc_showhide.tpl.php b/htdocs/core/tpl/bloc_showhide.tpl.php index d654f2b97b3..ee67fa6b74a 100644 --- a/htdocs/core/tpl/bloc_showhide.tpl.php +++ b/htdocs/core/tpl/bloc_showhide.tpl.php @@ -18,15 +18,18 @@ */ // Protection to avoid direct call of template -if (empty($blocname)) -{ +if (empty($blocname)) { print "Error, template page can't be called as URL"; exit; } $hide = true; // Hide by default -if (isset($parameters['showblocbydefault'])) $hide = (empty($parameters['showblocbydefault']) ? true : false); -if (isset($object->extraparams[$blocname]['showhide'])) $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false); +if (isset($parameters['showblocbydefault'])) { + $hide = (empty($parameters['showblocbydefault']) ? true : false); +} +if (isset($object->extraparams[$blocname]['showhide'])) { + $hide = (empty($object->extraparams[$blocname]['showhide']) ? true : false); +} ?> diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 5d3381b2719..de10465a736 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -33,23 +33,20 @@ if (empty($conf) || !is_object($conf)) { } -if ($action == 'presend') -{ +if ($action == 'presend') { $langs->load("mails"); $titreform = 'SendMail'; $object->fetch_projet(); - if (!in_array($object->element, array('societe', 'user', 'member'))) - { + if (!in_array($object->element, array('societe', 'user', 'member'))) { // TODO get also the main_lastdoc field of $object. If not found, try to guess with following code $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Special case - if ($object->element == 'invoice_supplier') - { + if ($object->element == 'invoice_supplier') { $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); } else { $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); @@ -61,17 +58,14 @@ if ($action == 'presend') // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id'])) { $newlang = $_REQUEST['lang_id']; } - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) - { + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; } - if (!empty($newlang)) - { + if (!empty($newlang)) { $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($newlang); // Load traductions files required by page @@ -87,19 +81,20 @@ if ($action == 'presend') // Build document if it not exists $forcebuilddoc = true; - if (in_array($object->element, array('societe', 'user', 'member'))) $forcebuilddoc = false; - if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) $forcebuilddoc = false; - if ($forcebuilddoc) // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation - { - if ((!$file || !is_readable($file)) && method_exists($object, 'generateDocument')) - { + if (in_array($object->element, array('societe', 'user', 'member'))) { + $forcebuilddoc = false; + } + if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) { + $forcebuilddoc = false; + } + if ($forcebuilddoc) { // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation + if ((!$file || !is_readable($file)) && method_exists($object, 'generateDocument')) { $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) { dol_print_error($db, $object->error, $object->errors); exit(); } - if ($object->element == 'invoice_supplier') - { + if ($object->element == 'invoice_supplier') { $fileparams = dol_most_recent_file($diroutput.'/'.get_exdir($object->id, 2, 0, 0, $object, $object->element).$ref, preg_quote($ref, '/').'([^\-])+'); } else { $fileparams = dol_most_recent_file($diroutput.'/'.$ref, preg_quote($ref, '/').'[^\-]+'); @@ -123,8 +118,7 @@ if ($action == 'presend') $formmail->param['langsmodels'] = (empty($newlang) ? $langs->defaultlang : $newlang); $formmail->fromtype = (GETPOST('fromtype') ?GETPOST('fromtype') : (!empty($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE) ? $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE : 'user')); - if ($formmail->fromtype === 'user') - { + if ($formmail->fromtype === 'user') { $formmail->fromid = $user->id; } @@ -145,8 +139,7 @@ if ($action == 'presend') } $formmail->trackid = $trackid; - if (!empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set - { + if (!empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) { // If bit 2 is set include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $formmail->frommail = dolAddEmailTrackId($formmail->frommail, $trackid); } @@ -170,8 +163,7 @@ if ($action == 'presend') if (!empty($object->socid) && $object->socid > 0 && !is_object($object->thirdparty) && method_exists($object, 'fetch_thirdparty')) { $object->fetch_thirdparty(); } - if (is_object($object->thirdparty)) - { + if (is_object($object->thirdparty)) { foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) { $liste[$key] = $value; } @@ -206,7 +198,9 @@ if ($action == 'presend') $formmail->withcancel = 1; //$arrayoffamiliestoexclude=array('system', 'mycompany', 'object', 'objectamount', 'date', 'user', ...); - if (!isset($arrayoffamiliestoexclude)) $arrayoffamiliestoexclude = null; + if (!isset($arrayoffamiliestoexclude)) { + $arrayoffamiliestoexclude = null; + } // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, $arrayoffamiliestoexclude, $object); @@ -275,6 +269,9 @@ if ($action == 'presend') foreach ($contactarr as $contact) { $contactstatic->fetch($contact['id']); $substitutionarray['__CONTACT_NAME_'.$contact['code'].'__'] = $contactstatic->getFullName($outputlangs, 1); + $substitutionarray['__CONTACT_LASTNAME_'.$contact['code'].'__'] = $contactstatic->lastname; + $substitutionarray['__CONTACT_FIRSTNAME_'.$contact['code'].'__'] = $contactstatic->firstname; + $substitutionarray['__CONTACT_TITLE_'.$contact['code'].'__'] = $contactstatic->getCivilityLabel(); } } diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index f21ff31f7a6..639be537dba 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -23,8 +23,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; } @@ -35,33 +34,59 @@ if (empty($conf) || !is_object($conf)) $object->fields = dol_sort_array($object->fields, 'position'); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // Discard if extrafield is a hidden field on form - if (abs($val['visible']) != 1 && abs($val['visible']) != 3) continue; + if (abs($val['visible']) != 1 && abs($val['visible']) != 3) { + continue; + } - if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) continue; // We don't want this field + if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) { + continue; // We don't want this field + } - print ''; + print ''; print ''; - if (!empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); - else print $langs->trans($val['label']); + if (!empty($val['help'])) { + print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + } else { + print $langs->trans($val['label']); + } print ''; - print ''; - if (!empty($val['picto'])) { print img_picto('', $val['picto']); } - if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int'); - elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOST($key, 'restricthtml'); - elseif ($val['type'] == 'date') $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); - elseif ($val['type'] == 'datetime') $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); - elseif ($val['type'] == 'boolean') $value = (GETPOST($key) == 'on' ? 1 : 0); - else $value = GETPOST($key, 'alphanohtml'); - if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0); - else print $object->showInputField($val, $key, $value, '', '', '', 0); + print ''; + if (!empty($val['picto'])) { + print img_picto('', $val['picto']); + } + if (in_array($val['type'], array('int', 'integer'))) { + $value = GETPOST($key, 'int'); + } elseif ($val['type'] == 'double') { + $value = price2num(GETPOST($key, 'alphanohtml')); + } elseif ($val['type'] == 'text' || $val['type'] == 'html') { + $value = GETPOST($key, 'restricthtml'); + } elseif ($val['type'] == 'date') { + $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); + } elseif ($val['type'] == 'datetime') { + $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); + } elseif ($val['type'] == 'boolean') { + $value = (GETPOST($key) == 'on' ? 1 : 0); + } elseif ($val['type'] == 'price') { + $value = price2num(GETPOST($key)); + } else { + $value = GETPOST($key, 'alphanohtml'); + } + if ($val['noteditable']) { + print $object->showOutputField($val, $key, $value, '', '', '', 0); + } else { + print $object->showInputField($val, $key, $value, '', '', '', 0); + } print ''; print ''; } diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index 946d8c0b504..9fef2d2f2b9 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -22,12 +22,13 @@ */ // 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; } -if (!is_object($form)) $form = new Form($db); +if (!is_object($form)) { + $form = new Form($db); +} ?> @@ -35,25 +36,40 @@ if (!is_object($form)) $form = new Form($db); $object->fields = dol_sort_array($object->fields, 'position'); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // Discard if extrafield is a hidden field on form - if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4) continue; + if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4) { + continue; + } - if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) continue; // We don't want this field + if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) { + continue; // We don't want this field + } - print ''; - if (!empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); - else print $langs->trans($val['label']); + if (!empty($val['help'])) { + print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + } else { + print $langs->trans($val['label']); + } print ''; - print ''; - if (!empty($val['picto'])) { print img_picto('', $val['picto']); } - if (in_array($val['type'], array('int', 'integer'))) $value = GETPOSTISSET($key) ?GETPOST($key, 'int') : $object->$key; - elseif (preg_match('/^(text|html)/', $val['type'])) { + print ''; + if (!empty($val['picto'])) { + print img_picto('', $val['picto']); + } + if (in_array($val['type'], array('int', 'integer'))) { + $value = GETPOSTISSET($key) ?GETPOST($key, 'int') : $object->$key; + } elseif ($val['type'] == 'double') { + $value = GETPOSTISSET($key) ? price2num(GETPOST($key, 'alphanohtml')) : $object->$key; + } elseif (preg_match('/^(text|html)/', $val['type'])) { $tmparray = explode(':', $val['type']); if (!empty($tmparray[1])) { $check = $tmparray[1]; @@ -61,11 +77,17 @@ foreach ($object->fields as $key => $val) $check = 'restricthtml'; } $value = GETPOSTISSET($key) ? GETPOST($key, $check) : $object->$key; + } elseif ($val['type'] == 'price') { + $value = GETPOSTISSET($key) ? price2num(GETPOST($key)) : price2num($object->$key); + } else { + $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $object->$key; } - else $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $object->$key; //var_dump($val.' '.$key.' '.$value); - if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0); - else print $object->showInputField($val, $key, $value, '', '', '', 0); + if ($val['noteditable']) { + print $object->showOutputField($val, $key, $value, '', '', '', 0); + } else { + print $object->showInputField($val, $key, $value, '', '', '', 0); + } print ''; print ''; } diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 5f58ba9e7e9..4b7821c2dad 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -24,12 +24,13 @@ */ // 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; } -if (!is_object($form)) $form = new Form($db); +if (!is_object($form)) { + $form = new Form($db); +} ?> @@ -37,34 +38,54 @@ if (!is_object($form)) $form = new Form($db); $object->fields = dol_sort_array($object->fields, 'position'); -foreach ($object->fields as $key => $val) -{ - if (!empty($keyforbreak) && $key == $keyforbreak) break; // key used for break on second column +foreach ($object->fields as $key => $val) { + if (!empty($keyforbreak) && $key == $keyforbreak) { + break; // key used for break on second column + } // Discard if extrafield is a hidden field on form - if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4 && abs($val['visible']) != 5) continue; + if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4 && abs($val['visible']) != 5) { + continue; + } - if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) continue; // We don't want this field - if (in_array($key, array('ref', 'status'))) continue; // Ref and status are already in dol_banner + if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) { + continue; // We don't want this field + } + if (in_array($key, array('ref', 'status'))) { + continue; // Ref and status are already in dol_banner + } $value = $object->$key; - print ''; - if (!empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); - else print $langs->trans($val['label']); + if (!empty($val['help'])) { + print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + } else { + print $langs->trans($val['label']); + } print ''; print ''; - if (in_array($val['type'], array('text', 'html'))) print '
    '; + if (in_array($val['type'], array('text', 'html'))) { + print '
    '; + } print $object->showOutputField($val, $key, $value, '', '', '', 0); //print dol_escape_htmltag($object->$key, 1, 1); - if (in_array($val['type'], array('text', 'html'))) print '
    '; + if (in_array($val['type'], array('text', 'html'))) { + print '
    '; + } print ''; print ''; } @@ -79,10 +100,8 @@ print '
    '; print ''; $alreadyoutput = 1; -foreach ($object->fields as $key => $val) -{ - if ($alreadyoutput) - { +foreach ($object->fields as $key => $val) { + if ($alreadyoutput) { if (!empty($keyforbreak) && $key == $keyforbreak) { $alreadyoutput = 0; // key used for break on second column } else { @@ -91,29 +110,48 @@ foreach ($object->fields as $key => $val) } // Discard if extrafield is a hidden field on form - if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4 && abs($val['visible']) != 5) continue; + if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4 && abs($val['visible']) != 5) { + continue; + } - if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) continue; // We don't want this field - if (in_array($key, array('ref', 'status'))) continue; // Ref and status are already in dol_banner + if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) { + continue; // We don't want this field + } + if (in_array($key, array('ref', 'status'))) { + continue; // Ref and status are already in dol_banner + } $value = $object->$key; print ''; - if (!empty($val['help'])) print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); - else print $langs->trans($val['label']); + if (!empty($val['help'])) { + print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); + } else { + print $langs->trans($val['label']); + } print ''; print ''; print ''; } diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index a1abc3a9240..511c03a931b 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -24,8 +24,7 @@ */ // Protection to avoid direct call of template -if (empty($object) || !is_object($object)) -{ +if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } @@ -45,9 +44,17 @@ if ($module == 'propal') { } elseif ($module == 'fichinter') { $permission = $user->rights->ficheinter->creer; } elseif ($module == 'order_supplier') { - $permission = $user->rights->fournisseur->commande->creer; -} elseif ($module == 'invoice_supplier') { - $permission = $user->rights->fournisseur->facture->creer; + if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { + $permission = $user->rights->fournisseur->commande->creer; + } else { + $permission = $user->rights->supplier_order->creer; + } +} elseif ($module == 'invoice_supplier' && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { + if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { + $permission = $user->rights->fournisseur->facture->creer; + } else { + $permission = $user->rights->supplier_invoice->creer; + } } elseif ($module == 'project') { $permission = $user->rights->projet->creer; } elseif ($module == 'action') { @@ -73,8 +80,7 @@ $userstatic = new User($db); '."\n"; print '
    '."\n"; @@ -82,9 +88,8 @@ if ($permission) ?>
    -
    trans("NatureOfContact"); ?>
    trans("ThirdParty"); ?>
    -
    trans("Users").'/'.$langs->trans("Contacts"); ?>
    +
    trans("Users").' | '.$langs->trans("Contacts"); ?>
    trans("ContactType"); ?>
     
     
    @@ -92,60 +97,65 @@ if ($permission) " /> - - - - '; ?> -
    trans("Users"); ?>
    + + + + + '; + } ?> +
    global->MAIN_INFO_SOCIETE_NOM; ?>
    -
    select_dolusers($user->id, 'userid', 0, (!empty($userAlreadySelected) ? $userAlreadySelected : null), 0, null, null, 0, 56, '', 0, '', 'minwidth200imp'); ?>
    + +
    select_dolusers($user->id, 'userid', 0, (!empty($userAlreadySelected) ? $userAlreadySelected : null), 0, null, null, 0, 56, '', 0, '', 'minwidth200imp'); ?>
    element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) $tmpobject = $objectsrc; + if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) { + $tmpobject = $objectsrc; + } $formcompany->selectTypeContact($tmpobject, '', 'type', 'internal'); ?>
     
    ">
    -
    " /> - - - - '; ?> -
    trans("ThirdPartyContacts"); ?>
    + + + + + '; + } ?> +
    socid; ?> selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
    +
    selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); + print img_object('', 'contact', 'class="pictofixedwidth"').$form->selectcontacts(($selectedCompany > 0 ? $selectedCompany : -1), '', 'contactid', 3, '', '', 1, 'minwidth100imp'); $nbofcontacts = $form->num; $newcardbutton = ''; - if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer) - { + if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer) { $newcardbutton .= ''; } print $newcardbutton; @@ -154,17 +164,21 @@ if ($permission)
    element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) $tmpobject = $objectsrc; + if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) { + $tmpobject = $objectsrc; + } $formcompany->selectTypeContact($tmpobject, $preselectedtypeofcontact, 'typecontact', 'external', 'position', 0, 'minwidth100imp'); ?>
     
    - "> + ">
    - "; @@ -178,17 +192,14 @@ if ($permission) // TODO: replace this with direct SQL string to use $db->sort($sortfield, $sortorder) $list = array(); -foreach (array('internal', 'external') as $source) -{ - if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) - { +foreach (array('internal', 'external') as $source) { + if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) { $contactlist = $objectsrc->liste_contact(-1, $source); } else { $contactlist = $object->liste_contact(-1, $source); } - foreach ($contactlist as $contact) - { + foreach ($contactlist as $contact) { $entry = new stdClass(); $entry->id = $contact['rowid']; $entry->type = $contact['libelle']; @@ -199,15 +210,13 @@ foreach (array('internal', 'external') as $source) $entry->contact_name = ""; $entry->status = ""; - if ($contact['source'] == 'internal') - { + if ($contact['source'] == 'internal') { $entry->nature = $langs->trans("User"); } elseif ($contact['source'] == 'external') { $entry->nature = $langs->trans("ThirdPartyContact"); } - if ($contact['socid'] > 0) - { + if ($contact['socid'] > 0) { $companystatic->fetch($contact['socid']); $entry->thirdparty_html = $companystatic->getNomUrl(1); $entry->thirdparty_name = strtolower($companystatic->getFullName($langs)); @@ -216,8 +225,7 @@ foreach (array('internal', 'external') as $source) $entry->thirdparty_name = strtolower($conf->global->MAIN_INFO_SOCIETE_NOM); } - if ($contact['source'] == 'internal') - { + if ($contact['source'] == 'internal') { $userstatic->fetch($contact['id']); $entry->contact_html = $userstatic->getNomUrl(-1, '', 0, 0, 0, 0, '', 'valignmiddle'); $entry->contact_name = strtolower($userstatic->getFullName($langs)); @@ -227,8 +235,7 @@ foreach (array('internal', 'external') as $source) $entry->contact_name = strtolower($contactstatic->getFullName($langs)); } - if ($contact['source'] == 'internal') - { + if ($contact['source'] == 'internal') { $entry->status = $userstatic->LibStatut($contact['statuscontact'], 3); } elseif ($contact['source'] == 'external') { $entry->status = $contactstatic->LibStatut($contact['statuscontact'], 3); @@ -242,8 +249,12 @@ foreach (array('internal', 'external') as $source) $sortfield = GETPOST("sortfield", "aZ09comma"); $sortorder = GETPOST("sortorder", 'aZ09comma'); -if (!$sortfield) $sortfield = "nature"; -if (!$sortorder) $sortorder = "asc"; +if (!$sortfield) { + $sortfield = "nature"; +} +if (!$sortorder) { + $sortorder = "asc"; +} // Re-sort list $list = dol_sort_array($list, $sortfield, $sortorder, 1, 0, 1); @@ -277,26 +288,24 @@ print '
    '; - if (in_array($val['type'], array('text', 'html'))) print '
    '; + if (in_array($val['type'], array('text', 'html'))) { + print '
    '; + } print $object->showOutputField($val, $key, $value, '', '', '', 0); //print dol_escape_htmltag($object->$key, 1, 1); - if (in_array($val['type'], array('text', 'html'))) print '
    '; + if (in_array($val['type'], array('text', 'html'))) { + print '
    '; + } print '
    '; //print ''; print ''; -print_liste_field_titre($arrayfields['nature']['label'], $_SERVER["PHP_SELF"], "nature", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['thirdparty']['label'], $_SERVER["PHP_SELF"], "thirdparty_name", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['contact']['label'], $_SERVER["PHP_SELF"], "contact_name", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre($arrayfields['nature']['label'], $_SERVER["PHP_SELF"], "nature", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['status']['label'], $_SERVER["PHP_SELF"], "statut", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder, 'center maxwidthsearch '); print ""; -foreach ($list as $entry) -{ +foreach ($list as $entry) { print ''; - print ''; print ''; print ''; + print ''; print ''; print ''; - if ($permission) - { + if ($permission) { $href = $_SERVER["PHP_SELF"]; $href .= '?id='.$object->id; $href .= '&action=deletecontact&token='.newToken(); diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index 80fd0d7df12..4a43da6d6cc 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -30,25 +30,32 @@ // $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; // Protection to avoid direct call of template -if (empty($langs) || !is_object($langs)) -{ +if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } $langs->load("link"); -if (empty($relativepathwithnofile)) $relativepathwithnofile = ''; +if (empty($relativepathwithnofile)) { + $relativepathwithnofile = ''; +} -if (!isset($permission)) $permission = $permissiontoadd; -if (!isset($permtoedit)) $permtoedit = $permissiontoadd; +if (!isset($permission)) { + $permission = $permissiontoadd; +} +if (!isset($permtoedit)) { + $permtoedit = $permissiontoadd; +} // Drag and drop for up and down allowed on product, thirdparty, ... // The drag and drop call the page core/ajax/row.php // If you enable the move up/down of files here, check that page that include template set its sortorder on 'position_name' instead of 'name' // Also the object->fk_element must be defined. $disablemove = 1; -if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket', 'holiday', 'expensereport'))) $disablemove = 0; +if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket', 'holiday', 'expensereport'))) { + $disablemove = 0; +} @@ -56,23 +63,19 @@ if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket * Confirm form to delete */ -if ($action == 'delete') -{ +if ($action == 'delete') { $langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles print $form->formconfirm( - $_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")).'&linkid='.GETPOST('linkid', 'int').(empty($param) ? '' : $param), - $langs->trans('DeleteFile'), - $langs->trans('ConfirmDeleteFile'), - 'confirm_deletefile', - '', - 0, - 1 + $_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")).'&linkid='.GETPOST('linkid', 'int').(empty($param) ? '' : $param), + $langs->trans('DeleteFile'), + $langs->trans('ConfirmDeleteFile'), + 'confirm_deletefile', + '', + 0, + 1 ); } -$formfile = new FormFile($db); - - // We define var to enable the feature to add prefix of uploaded files. // Caller of this include can make // $savingdocmask=dol_sanitizeFileName($object->ref).'-__file__'; @@ -99,8 +102,7 @@ if (!isset($savingdocmask) || !empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_ 'product_batch', 'bom', 'mrp' - ))) - { + ))) { $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; } /*if (in_array($modulepart,array('member'))) @@ -110,6 +112,10 @@ if (!isset($savingdocmask) || !empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_ } } +if (!is_object($formfile)) { + $formfile = new FormFile($db); +} + // Show upload form (document and links) $formfile->form_attach_new_file( $_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject) ? '' : '&withproject=1').(empty($moreparam) ? '' : $moreparam), diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index 53cbe3d99cf..f194a177178 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -26,8 +26,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; } @@ -37,13 +36,17 @@ if (empty($conf) || !is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { $params = array(); - if (isset($tpl_context)) $params['tpl_context'] = $tpl_context; + if (isset($tpl_context)) { + $params['tpl_context'] = $tpl_context; + } $params['cols'] = $parameters['colspanvalue']; print $object->showOptionals($extrafields, 'create', $params); } diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index dbc2b9745cd..5915fb8a633 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -26,8 +26,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; } @@ -37,7 +36,9 @@ if (empty($conf) || !is_object($conf)) executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { diff --git a/htdocs/core/tpl/extrafields_list_array_fields.tpl.php b/htdocs/core/tpl/extrafields_list_array_fields.tpl.php index bbc5ba3370b..ebab4e8608a 100644 --- a/htdocs/core/tpl/extrafields_list_array_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_array_fields.tpl.php @@ -3,22 +3,24 @@ // So no output must be done. // 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; } -if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey = $object->table_element; +if (empty($extrafieldsobjectkey) && is_object($object)) { + $extrafieldsobjectkey = $object->table_element; +} // Loop to show all columns of extrafields from $obj, $extrafields and $db -if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... -{ - if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']) > 0) { - if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.'; +if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (isset($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']) > 0) { + if (empty($extrafieldsobjectprefix)) { + $extrafieldsobjectprefix = 'ef.'; + } foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) { - if (!empty($extrafields->attributes[$extrafieldsobjectkey]['list'][$key])) + if (!empty($extrafields->attributes[$extrafieldsobjectkey]['list'][$key])) { $arrayfields[$extrafieldsobjectprefix.$key] = array( 'label' => $extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 'checked' => (($extrafields->attributes[$extrafieldsobjectkey]['list'][$key] < 0) ? 0 : 1), @@ -27,6 +29,7 @@ if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_e 'langfile' => $extrafields->attributes[$extrafieldsobjectkey]['langfile'][$key], 'help' => $extrafields->attributes[$extrafieldsobjectkey]['help'][$key], ); + } } } } diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 8c46e34b428..4c56b0223cd 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -1,46 +1,44 @@ table_element; +if (empty($extrafieldsobjectkey) && is_object($object)) { + $extrafieldsobjectkey = $object->table_element; +} // Loop to show all columns of extrafields from $obj, $extrafields and $db -if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... -{ - if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) - { - if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.'; +if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) { + if (empty($extrafieldsobjectprefix)) { + $extrafieldsobjectprefix = 'ef.'; + } - foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) - { - if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) - { + foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) { + if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) { $align = $extrafields->getAlignFlag($key, $extrafieldsobjectkey); print ''; $tmpkey = 'options_'.$key; - if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) - { + if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey)) { $datenotinstring = $obj->$tmpkey; - if (!is_numeric($obj->$tmpkey)) // For backward compatibility - { + if (!is_numeric($obj->$tmpkey)) { // For backward compatibility $datenotinstring = $db->jdate($datenotinstring); } $value = $datenotinstring; } else { - $value = $obj->$tmpkey; + $value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : ''); } // If field is a computed field, we make computation to get value - if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) - { + if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) { //global $obj, $object; //var_dump($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]); //var_dump($obj); @@ -51,18 +49,23 @@ if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_e print $extrafields->showOutputField($key, $value, '', $extrafieldsobjectkey); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } if ($extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) { if (!$i) { // we keep position for the first line $totalarray['totalizable'][$key]['pos'] = $totalarray['nbfield']; } - if (is_numeric($obj->$tmpkey)) $totalarray['totalizable'][$key]['total'] += $obj->$tmpkey; + if (is_numeric($obj->$tmpkey)) { + $totalarray['totalizable'][$key]['total'] += $obj->$tmpkey; + } } - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = $extrafieldsobjectprefix.$tmpkey; + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = $extrafieldsobjectprefix.$tmpkey; + } $totalarray['val'][$extrafieldsobjectprefix.$tmpkey] += $obj->$tmpkey; } } diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index bf31ff34ad7..72f888f256a 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -3,45 +3,51 @@ print ''."\n"; // 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; } -if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey = $object->table_element; +if (empty($extrafieldsobjectkey) && is_object($object)) { + $extrafieldsobjectkey = $object->table_element; +} // Loop to show all columns of extrafields for the search title line -if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... -{ - if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) - { - if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.'; - if (empty($search_options_pattern)) $search_options_pattern = 'search_options_'; +if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) { + if (empty($extrafieldsobjectprefix)) { + $extrafieldsobjectprefix = 'ef.'; + } + if (empty($search_options_pattern)) { + $search_options_pattern = 'search_options_'; + } - foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) - { + foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) { if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) { $align = $extrafields->getAlignFlag($key); $typeofextrafield = $extrafields->attributes[$extrafieldsobjectkey]['type'][$key]; print ''; } diff --git a/htdocs/core/tpl/extrafields_list_search_param.tpl.php b/htdocs/core/tpl/extrafields_list_search_param.tpl.php index 224066d57ce..56652b87dd3 100644 --- a/htdocs/core/tpl/extrafields_list_search_param.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_param.tpl.php @@ -1,21 +1,38 @@ table_element like 'societe', 'socpeople', ... -{ - if (empty($search_options_pattern)) $search_options_pattern = 'search_options_'; +if (!empty($search_array_options) && is_array($search_array_options)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (empty($search_options_pattern)) { + $search_options_pattern = 'search_options_'; + } - foreach ($search_array_options as $key => $val) - { + foreach ($search_array_options as $key => $val) { $crit = $val; $tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key); - if ($val != '') $param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val); + if (is_array($val) && array_key_exists('start', $val) && array_key_exists('end', $val)) { + // date range from list filters is stored as array('start' => , 'end' => ) + // start date + $param .= '&' . $search_options_pattern.$tmpkey.'_startyear=' . dol_print_date($val['start'], '%Y'); + $param .= '&' . $search_options_pattern.$tmpkey.'_startmonth=' . dol_print_date($val['start'], '%m'); + $param .= '&' . $search_options_pattern.$tmpkey.'_startday=' . dol_print_date($val['start'], '%d'); + $param .= '&' . $search_options_pattern.$tmpkey.'_starthour=' . dol_print_date($val['start'], '%H'); + $param .= '&' . $search_options_pattern.$tmpkey.'_startmin=' . dol_print_date($val['start'], '%M'); + // end date + $param .= '&' . $search_options_pattern.$tmpkey.'_endyear=' . dol_print_date($val['end'], '%Y'); + $param .= '&' . $search_options_pattern.$tmpkey.'_endmonth=' . dol_print_date($val['end'], '%m'); + $param .= '&' . $search_options_pattern.$tmpkey.'_endday=' . dol_print_date($val['end'], '%d'); + $param .= '&' . $search_options_pattern.$tmpkey.'_endhour=' . dol_print_date($val['end'], '%H'); + $param .= '&' . $search_options_pattern.$tmpkey.'_endmin=' . dol_print_date($val['end'], '%M'); + $val = ''; + } + if ($val != '') { + $param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val); + } } } diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 1e62bd0a9d5..7268da76007 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -1,45 +1,66 @@ table_element; +if (empty($extrafieldsobjectkey) && is_object($object)) { + $extrafieldsobjectkey = $object->table_element; +} // Loop to complete the sql search criterias from extrafields -if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... -{ - if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.'; - if (empty($search_options_pattern)) $search_options_pattern = 'search_options_'; +if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($search_array_options)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (empty($extrafieldsobjectprefix)) { + $extrafieldsobjectprefix = 'ef.'; + } + if (empty($search_options_pattern)) { + $search_options_pattern = 'search_options_'; + } - foreach ($search_array_options as $key => $val) - { + foreach ($search_array_options as $key => $val) { $crit = $val; $tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key); $typ = $extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey]; - if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) - { - $sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'"; - } elseif (in_array($typ, array('boolean'))) - { + if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) { + if (is_numeric($crit)) { + $sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'"; + } elseif (is_array($crit)) { + if ($crit['start'] !== '' && $crit['end'] !== '') { + $sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." BETWEEN '". $db->idate($crit['start']). "' AND '".$db->idate($crit['end']) . "')"; + } elseif ($crit['start'] !== '') { + $sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." >= '". $db->idate($crit['start'])."')"; + } elseif ($crit['end'] !== '') { + $sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." <= '". $db->idate($crit['end'])."')"; + } + } + } elseif (in_array($typ, array('boolean'))) { if ($crit !== '-1' && $crit !== '') { $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." = '".$db->escape($crit)."'"; - if ($crit == '0') $sql .= " OR ".$extrafieldsobjectprefix.$tmpkey." IS NULL"; + if ($crit == '0') { + $sql .= " OR ".$extrafieldsobjectprefix.$tmpkey." IS NULL"; + } $sql .= ")"; } - } elseif ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0') && (!in_array($typ, array('link')) || $crit != '-1')) - { + } elseif ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0') && (!in_array($typ, array('link')) || $crit != '-1')) { $mode_search = 0; - if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search = 1; // Search on a numeric - if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search = 2; // Search on a foreign key int - if (in_array($typ, array('sellist')) && !is_numeric($crit)) $mode_search = 0;// Search on a foreign key string - if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search = 4; // Search on a multiselect field with sql type = text - if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string - elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) { + if (in_array($typ, array('int', 'double', 'real', 'price'))) { + $mode_search = 1; // Search on a numeric + } + if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') { + $mode_search = 2; // Search on a foreign key int + } + if (in_array($typ, array('sellist')) && !is_numeric($crit)) { + $mode_search = 0;// Search on a foreign key string + } + if (in_array($typ, array('chkbxlst', 'checkbox'))) { + $mode_search = 4; // Search on a multiselect field with sql type = text + } + if (is_array($crit)) { + $crit = implode(' ', $crit); // natural_search() expects a string + } elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) { $sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey.' = "'.$db->escape($crit).'")'; continue; } diff --git a/htdocs/core/tpl/extrafields_list_search_title.tpl.php b/htdocs/core/tpl/extrafields_list_search_title.tpl.php index 1c071ac64c1..0a61e51d33d 100644 --- a/htdocs/core/tpl/extrafields_list_search_title.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_title.tpl.php @@ -1,29 +1,32 @@ table_element; -if (!isset($disablesortlink)) $disablesortlink = 0; +if (empty($extrafieldsobjectkey) && is_object($object)) { + $extrafieldsobjectkey = $object->table_element; +} +if (!isset($disablesortlink)) { + $disablesortlink = 0; +} // Loop to show all columns of extrafields for the title line -if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... -{ - if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) - { - if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.'; +if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ... + if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label'])) { + if (empty($extrafieldsobjectprefix)) { + $extrafieldsobjectprefix = 'ef.'; + } - foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) - { - if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) - { + foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) { + if (!empty($arrayfields[$extrafieldsobjectprefix.$key]['checked'])) { $align = $extrafields->getAlignFlag($key); $sortonfield = $extrafieldsobjectprefix.$key; - if (!empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) $sortonfield = ''; + if (!empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) { + $sortonfield = ''; + } if ($extrafields->attributes[$extrafieldsobjectkey]['type'][$key] == 'separate') { print ''; } else { diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 40ea3e0ce50..9c15a71f43c 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -26,74 +26,86 @@ */ // Protection to avoid direct call of template -if (empty($object) || !is_object($object)) -{ +if (empty($object) || !is_object($object)) { print "Error, template page can't be called as URL"; exit; } -if (!is_object($form)) $form = new Form($db); +if (!is_object($form)) { + $form = new Form($db); +} ?> fk_soc)) $parameters['socid'] = $object->fk_soc; +if (!is_array($parameters)) { + $parameters = array(); +} +if (!empty($cols)) { + $parameters['colspan'] = ' colspan="'.$cols.'"'; +} +if (!empty($cols)) { + $parameters['cols'] = $cols; +} +if (!empty($object->fk_soc)) { + $parameters['socid'] = $object->fk_soc; +} $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); print $hookmanager->resPrint; -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} //var_dump($extrafields->attributes[$object->table_element]); -if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]['label'])) -{ +if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]['label'])) { $lastseparatorkeyfound = ''; $extrafields_collapse_num = ''; $extrafields_collapse_num_old = ''; $i = 0; - foreach ($extrafields->attributes[$object->table_element]['label'] as $tmpkeyextra => $tmplabelextra) - { + foreach ($extrafields->attributes[$object->table_element]['label'] as $tmpkeyextra => $tmplabelextra) { $i++; // Discard if extrafield is a hidden field on form $enabled = 1; - if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) - { + if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) { $enabled = dol_eval($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1); } - if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) - { + if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) { $enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1); } $perms = 1; - if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra])) - { + if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra])) { $perms = dol_eval($extrafields->attributes[$object->table_element]['perms'][$tmpkeyextra], 1); } - //print $tmpkeyextra.'-'.$enabled.'-'.$perms.'-'.$tmplabelextra.$_POST["options_" . $tmpkeyextra].'
    '."\n"; + //print $tmpkeyextra.'-'.$enabled.'-'.$perms.'
    '."\n"; - if (empty($enabled)) continue; // 0 = Never visible field - if (abs($enabled) != 1 && abs($enabled) != 3 && abs($enabled) != 5 && abs($enabled) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list <> 4 = not visible at the creation - if (empty($perms)) continue; // 0 = Not visible + if (empty($enabled)) { + continue; // 0 = Never visible field + } + if (abs($enabled) != 1 && abs($enabled) != 3 && abs($enabled) != 5 && abs($enabled) != 4) { + continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list <> 4 = not visible at the creation + } + if (empty($perms)) { + continue; // 0 = Not visible + } // Load language if required - if (!empty($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra])) $langs->load($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra]); - if ($action == 'edit_extras') - { + if (!empty($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra])) { + $langs->load($extrafields->attributes[$object->table_element]['langfile'][$tmpkeyextra]); + } + if ($action == 'edit_extras') { $value = (GETPOSTISSET("options_".$tmpkeyextra) ? GETPOST("options_".$tmpkeyextra) : $object->array_options["options_".$tmpkeyextra]); } else { - $value = $object->array_options["options_".$tmpkeyextra]; + $value = (!empty($object->array_options["options_".$tmpkeyextra]) ? $object->array_options["options_".$tmpkeyextra] : ''); //var_dump($tmpkeyextra.' - '.$value); } // Print line tr of extra field - if ($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra] == 'separate') - { + if ($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra] == 'separate') { $extrafields_collapse_num = ''; $extrafield_param = $extrafields->attributes[$object->table_element]['param'][$tmpkeyextra]; if (!empty($extrafield_param) && is_array($extrafield_param)) { @@ -112,7 +124,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] $lastseparatorkeyfound = $tmpkeyextra; } else { - print 'id)?'_'.$object->id:''); /*if ($extrafields_collapse_num && $extrafields_collapse_num_old && $extrafields_collapse_num != $extrafields_collapse_num_old) { print ' trextrafields_collapse_new'; }*/ @@ -126,7 +138,9 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] print ''; print ''; } print '
    '.$entry->nature.''.$entry->thirdparty_html.''.$entry->contact_html.''.$entry->nature.''.$entry->type.''.$entry->status.''; $tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key); - if (in_array($typeofextrafield, array('varchar', 'int', 'double')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) - { + if (in_array($typeofextrafield, array('varchar', 'int', 'double')) && empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) { $searchclass = ''; - if (in_array($typeofextrafield, array('varchar'))) $searchclass = 'searchstring'; - if (in_array($typeofextrafield, array('int', 'double'))) $searchclass = 'searchnum'; - print ''; - } elseif (in_array($typeofextrafield, array('datetime', 'timestamp'))) - { - // TODO - // Use showInputField in a particular manner to have input with a comparison operator, not input for a specific value date-hour-minutes + if (in_array($typeofextrafield, array('varchar'))) { + $searchclass = 'searchstring'; + } + if (in_array($typeofextrafield, array('int', 'double'))) { + $searchclass = 'searchnum'; + } + print ''; + } elseif (in_array($typeofextrafield, array('datetime', 'timestamp'))) { + $morecss = ''; + echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } else { // for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid') $morecss = ''; - if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) $morecss = 'maxwidth200'; - echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); + if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) { + $morecss = 'maxwidth200'; + } + echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } print '
    '; if (!empty($extrafields->attributes[$object->table_element]['help'][$tmpkeyextra])) { // You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. @@ -141,23 +155,53 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] //var_dump($user->rights); $permok = false; $keyforperm = $object->element; - if ($object->element == 'fichinter') $keyforperm = 'ficheinter'; - if (isset($user->rights->$keyforperm)) $permok = $user->rights->$keyforperm->creer || $user->rights->$keyforperm->create || $user->rights->$keyforperm->write; - if ($object->element == 'order_supplier') $permok = $user->rights->fournisseur->commande->creer; - if ($object->element == 'invoice_supplier') $permok = $user->rights->fournisseur->facture->creer; - if ($object->element == 'shipping') $permok = $user->rights->expedition->creer; - if ($object->element == 'delivery') $permok = $user->rights->expedition->delivery->creer; - if ($object->element == 'productlot') $permok = $user->rights->stock->creer; - if ($object->element == 'facturerec') $permok = $user->rights->facture->creer; - if ($object->element == 'mo') $permok = $user->rights->mrp->write; + if ($object->element == 'fichinter') { + $keyforperm = 'ficheinter'; + } + if (isset($user->rights->$keyforperm)) { + $permok = !empty($user->rights->$keyforperm->creer) || !empty($user->rights->$keyforperm->create) || !empty($user->rights->$keyforperm->write); + } + if ($object->element == 'order_supplier') { + if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { + $permok = $user->rights->fournisseur->commande->creer; + } else { + $permok = $user->rights->supplier_order->creer; + } + } + if ($object->element == 'invoice_supplier') { + if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) { + $permok = $user->rights->fournisseur->facture->creer; + } else { + $permok = $user->rights->supplier_invoice->creer; + } + } + if ($object->element == 'shipping') { + $permok = $user->rights->expedition->creer; + } + if ($object->element == 'delivery') { + $permok = $user->rights->expedition->delivery->creer; + } + if ($object->element == 'productlot') { + $permok = $user->rights->stock->creer; + } + if ($object->element == 'facturerec') { + $permok = $user->rights->facture->creer; + } + if ($object->element == 'mo') { + $permok = $user->rights->mrp->write; + } + if ($object->element == 'contact') { + $permok = $user->rights->societe->contact->creer; + } $isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0)); if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra])) && $permok && $enabled != 5 && ($action != 'edit_extras' || GETPOST('attribute') != $tmpkeyextra) - && empty($extrafields->attributes[$object->table_element]['computed'][$tmpkeyextra])) - { + && empty($extrafields->attributes[$object->table_element]['computed'][$tmpkeyextra])) { $fieldid = 'id'; - if ($object->table_element == 'societe') $fieldid = 'socid'; + if ($object->table_element == 'societe') { + $fieldid = 'socid'; + } print ''.img_edit().'
    '; @@ -165,26 +209,22 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] $html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : ''; - print ''; + print ''; // Convert date into timestamp format - if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) - { + if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) { $datenotinstring = $object->array_options['options_'.$tmpkeyextra]; // print 'X'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.'x'; - if (!is_numeric($object->array_options['options_'.$tmpkeyextra])) // For backward compatibility - { + if (!is_numeric($object->array_options['options_'.$tmpkeyextra])) { // For backward compatibility $datenotinstring = $db->jdate($datenotinstring); } //print 'x'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); $value = GETPOSTISSET("options_".$tmpkeyextra) ? dol_mktime(12, 0, 0, GETPOST("options_".$tmpkeyextra."month", 'int'), GETPOST("options_".$tmpkeyextra."day", 'int'), GETPOST("options_".$tmpkeyextra."year", 'int')) : $datenotinstring; } - if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('datetime'))) - { + if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('datetime'))) { $datenotinstring = $object->array_options['options_'.$tmpkeyextra]; // print 'X'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.'x'; - if (!is_numeric($object->array_options['options_'.$tmpkeyextra])) // For backward compatibility - { + if (!is_numeric($object->array_options['options_'.$tmpkeyextra])) { // For backward compatibility $datenotinstring = $db->jdate($datenotinstring); } //print 'x'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); @@ -192,10 +232,11 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] } //TODO Improve element and rights detection - if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'restricthtml') == $tmpkeyextra) - { + if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'restricthtml') == $tmpkeyextra) { $fieldid = 'id'; - if ($object->table_element == 'societe') $fieldid = 'socid'; + if ($object->table_element == 'societe') { + $fieldid = 'socid'; + } print '
    '; print ''; print ''; @@ -219,8 +260,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] // Add code to manage list depending on others // TODO Test/enhance this with a more generic solution - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n"; print ' + }); + use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE include_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"], 'none', 0, ($section ? $section : -1), $permtoupload, 48, null, '', 0, '', 0, $nameforformuserfile, '', $sectiondir); -} else print ' '; +} else { + print ' '; +} print '
    '; // End "Add new file" area @@ -131,15 +133,52 @@ print '
    '; // Ask confirmation of deletion of directory -if ($action == 'delete_section') -{ +if ($action == 'delete_section') { print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $ecmdir->label), 'confirm_deletesection', '', '', 1); } // End confirm +if ($action == 'confirmconvertimgwebp') { + print $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$website->ref, $langs->trans('ConfirmImgWebpCreation'), $langs->trans('ConfirmGenerateImgWebp', $object->ref), 'convertimgwebp', '', "yes", 1); + $action = 'file_manager'; +} -if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg_match('/refresh/i', $action) || $action == 'delete') -{ +if ($action == 'convertimgwebp' && $permtoadd) { + if ($module == 'medias') { + $imagefolder = $conf->website->dir_output.'/'.$websitekey.'/medias/image/'.$websitekey.'/'; + } else { + $imagefolder = $conf->ecm->dir_output; + } + + include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; + + $regeximgext = getListOfPossibleImageExt(); + + $filelist = dol_dir_list($imagefolder, "all", 1, $regeximgext); + + foreach ($filelist as $filename) { + $filepath = $filename['fullname']; + if (!(substr_compare($filepath, 'webp', -strlen('webp')) === 0)) { + if (image_format_supported($filepath) == 1) { + $filepathnoext = preg_replace("/\..*/", "", $filepath); + $result = dol_imageResizeOrCrop($filepath, 0, 0, 0, 0, 0, $filepathnoext.'.webp'); + if (!dol_is_file($result)) { + $error++; + setEventMessages($result, null, 'errors'); + } + } + } + if ($error) { + break; + } + } + if (!$error) { + setEventMessages($langs->trans('SucessConvertImgWebp'), null); + } + $action = 'file_manager'; +} + +if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg_match('/refresh/i', $action) || $action == 'delete') { $langs->load("ecm"); print ''."\n"; @@ -155,14 +194,15 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg // Manual section $htmltooltip = $langs->trans("ECMAreaDesc2"); - if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) - { + if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { // Show the link to "Root" - if ($showroot) - { + if ($showroot) { print ''; } @@ -171,7 +211,9 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg // Show filemanager tree (will be filled by a call of ajax /ecm/tpl/enablefiletreeajax.tpl.php, later, that executes ajaxdirtree.php) print '
    '; - if ($action == 'deletefile') print $form->formconfirm('eeeee', $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 'deletefile'); + if ($action == 'deletefile') { + print $form->formconfirm('eeeee', $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 'deletefile'); + } print ''; } else { // Show filtree when ajax is disabled (rare) @@ -188,7 +230,9 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg // $_GET['modulepart'], $_GET['openeddir'], $_GET['sortfield'], $_GET['sortorder'] // $_POST['dir'] $mode = 'noajax'; - if (empty($url)) $url = DOL_URL_ROOT.'/ecm/index.php'; + if (empty($url)) { + $url = DOL_URL_ROOT.'/ecm/index.php'; + } include DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirtree.php'; print ''; @@ -211,7 +255,9 @@ if (empty($action) || $action == 'editfile' || $action == 'file_manager' || preg $mode = 'noajax'; -if (empty($url)) $url = DOL_URL_ROOT.'/ecm/index.php'; +if (empty($url)) { + $url = DOL_URL_ROOT.'/ecm/index.php'; +} include DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirpreview.php'; // Show content of a directory on right side @@ -225,14 +271,15 @@ include DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirpreview.php'; // Show content of a use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) // Show filtree when ajax is enabled -{ +if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { // Show filtree when ajax is enabled //var_dump($modulepart); // Variables that may be defined: // $_GET['modulepart'], $_GET['openeddir'], $_GET['sortfield'], $_GET['sortorder'] // $_POST['dir'] // $_POST['section_dir'], $_POST['section_id'], $_POST['token'], $_POST['max_file_size'], $_POST['sendit'] - if (GETPOST('section_dir', 'alpha')) { $preopened = GETPOST('section_dir', 'alpha'); } + if (GETPOST('section_dir', 'alpha')) { + $preopened = GETPOST('section_dir', 'alpha'); + } include DOL_DOCUMENT_ROOT.'/ecm/tpl/enablefiletreeajax.tpl.php'; } diff --git a/htdocs/core/tpl/index.html b/htdocs/core/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index 2cd485a9510..62052b82cec 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -1,26 +1,35 @@ $valtotalizable) { $totalarray['pos'][$valtotalizable['pos']] = $keytotalizable; $totalarray['val'][$keytotalizable] = $valtotalizable['total']; } } // Show total line -if (isset($totalarray['pos'])) -{ +if (isset($totalarray['pos'])) { print ''; $i = 0; - while ($i < $totalarray['nbfield']) - { + while ($i < $totalarray['nbfield']) { $i++; - if (!empty($totalarray['pos'][$i])) print ''; - else { - if ($i == 1) - { - if ($num < $limit) print ''; - else print ''; - } else print ''; + if (!empty($totalarray['pos'][$i])) { + print ''; + } else { + if ($i == 1) { + if ($num < $limit) { + print ''; + } else { + print ''; + } + } else { + print ''; + } } } print ''; diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 821b423aab3..b5dc9b90be0 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2013 Laurent Destailleur +/* Copyright (C) 2009-2015 Regis Houssin + * Copyright (C) 2011-2021 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 @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -// Need global variable $title to be defined by caller (like dol_loginfunction) +// Need global variable $urllogo, $title and $titletruedolibarrversion to be defined by caller (like dol_loginfunction in security2.lib.php) // Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', 1); +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', 1); +} // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { @@ -34,18 +36,32 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; header('Cache-Control: Public, must-revalidate'); header("Content-type: text/html; charset=".$conf->file->character_set_client); -if (GETPOST('dol_hide_topmenu')) $conf->dol_hide_topmenu = 1; -if (GETPOST('dol_hide_leftmenu')) $conf->dol_hide_leftmenu = 1; -if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen = 1; -if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover = 1; -if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile = 1; +if (GETPOST('dol_hide_topmenu')) { + $conf->dol_hide_topmenu = 1; +} +if (GETPOST('dol_hide_leftmenu')) { + $conf->dol_hide_leftmenu = 1; +} +if (GETPOST('dol_optimize_smallscreen')) { + $conf->dol_optimize_smallscreen = 1; +} +if (GETPOST('dol_no_mouse_hover')) { + $conf->dol_no_mouse_hover = 1; +} +if (GETPOST('dol_use_jmobile')) { + $conf->dol_use_jmobile = 1; +} // If we force to use jmobile, then we reenable javascript -if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1; +if (!empty($conf->dol_use_jmobile)) { + $conf->use_javascript_ajax = 1; +} $php_self = dol_escape_htmltag($_SERVER['PHP_SELF']); $php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : ''; -if (!preg_match('/mainmenu=/', $php_self)) $php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home'; +if (!preg_match('/mainmenu=/', $php_self)) { + $php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home'; +} // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $arrayofjs = array( @@ -62,14 +78,20 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $titleofloginpage .= ' @ '.$titletruedolibarrversion; // $titletruedolibarrversion is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page and find true dolibarr version. $disablenofollow = 1; -if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) $disablenofollow = 0; -if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $disablenofollow = 0; +if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) { + $disablenofollow = 0; +} +if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + $disablenofollow = 0; +} print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disablenofollow); $colorbackhmenu1 = '60,70,100'; // topmenu -if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; +if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; +} $colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $conf->global->THEME_ELDY_TOPMENU_BACK1) : (empty($user->conf->THEME_ELDY_TOPMENU_BACK1) ? $colorbackhmenu1 : $user->conf->THEME_ELDY_TOPMENU_BACK1); $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' @@ -91,7 +113,9 @@ if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) { @@ -122,9 +146,13 @@ $(document).ready(function () { @@ -147,7 +175,9 @@ if ($disablenofollow) echo '';
    -global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> +global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + ?> " name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" autofocus="autofocus" /> @@ -157,7 +187,9 @@ if ($disablenofollow) echo '';
    -global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> +global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + ?> " name="password" class="flat input-icon-password minwidth150" type="password" value="" tabindex="2" autocomplete="global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE) ? 'off' : 'on'; ?>" /> @@ -167,8 +199,11 @@ if ($disablenofollow) echo ''; if ($captcha) { // Add a variable param to force not using cache (jmobile) $php_self = preg_replace('/[&\?]time=(\d+)/', '', $php_self); // Remove param time - if (preg_match('/\?/', $php_self)) $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog'); - else $php_self .= '?time='.dol_print_date(dol_now(), 'dayhourlog'); + if (preg_match('/\?/', $php_self)) { + $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog'); + } else { + $php_self .= '?time='.dol_print_date(dol_now(), 'dayhourlog'); + } // TODO: provide accessible captcha variants ?> @@ -177,7 +212,7 @@ if ($captcha) { - " class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" /> + " class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" autocomplete="off" /> @@ -190,8 +225,7 @@ if ($captcha) { if (!empty($morelogincontent)) { if (is_array($morelogincontent)) { - foreach ($morelogincontent as $format => $option) - { + foreach ($morelogincontent as $format => $option) { if ($format == 'table') { echo ''; echo $option; @@ -221,29 +255,42 @@ if (!empty($morelogincontent)) {
    '; echo '
    '; if ($forgetpasslink) { $url = DOL_URL_ROOT.'/user/passwordforgotten.php'.$moreparam; - if (!empty($conf->global->MAIN_PASSWORD_FORGOTLINK)) $url = $conf->global->MAIN_PASSWORD_FORGOTLINK; + if (!empty($conf->global->MAIN_PASSWORD_FORGOTLINK)) { + $url = $conf->global->MAIN_PASSWORD_FORGOTLINK; + } echo ''; echo $langs->trans('PasswordForgotten'); echo ''; } - if ($forgetpasslink && $helpcenterlink) echo ' - '; + if ($forgetpasslink && $helpcenterlink) { + echo ' - '; + } if ($helpcenterlink) { $url = DOL_URL_ROOT.'/support/index.php'.$moreparam; - if (!empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url = $conf->global->MAIN_HELPCENTER_LINKTOUSE; + if (!empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) { + $url = $conf->global->MAIN_HELPCENTER_LINKTOUSE; + } echo ''; echo $langs->trans('NeedHelpCenter'); echo ''; @@ -251,8 +298,7 @@ if ($forgetpasslink || $helpcenterlink) echo '
    '; } -if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication)) -{ +if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication)) { $langs->load("users"); //if (! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url= @@ -260,8 +306,9 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil echo '
    '; $url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL; - if (!empty($url)) print ''.$langs->trans("LoginUsingOpenID").''; - else { + if (!empty($url)) { + print ''.$langs->trans("LoginUsingOpenID").''; + } else { $langs->load("errors"); print ''.$langs->trans("ErrorOpenIDSetupNotComplete", 'MAIN_AUTHENTICATION_OPENID_URL').''; } @@ -282,8 +329,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil
    '; @@ -195,10 +229,18 @@ if ($object->element == 'supplier_proposal' || $object->element == 'order_suppli print ' @@ -221,11 +263,12 @@ if ((($line->info_bits & 2) != 2) && $line->special_code != 3) { // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price -} else print ' '; +} else { + print ' '; +} print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) -{ +if (!empty($conf->global->PRODUCT_USE_UNITS)) { print ''; @@ -256,8 +298,7 @@ if ($this->situation_cycle_ref) print ''; } -if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) -{ +if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) { if (!empty($user->rights->margins->creer)) { ?> margin->enabled) && empty($user->socid)) global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?> - - marque_tx, 'MT')).'%'; ?> + special_code == 3) { ?> @@ -274,8 +315,7 @@ if ($line->special_code == 3) { ?> '; $coldisplay++; - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $tooltiponprice = $langs->transcountry("TotalHT", $mysoc->country_code).'='.price($line->total_ht); $tooltiponprice .= '
    '.$langs->transcountry("TotalVAT", ($senderissupplier ? $object->thirdparty->country_code : $mysoc->country_code)).'='.price($line->total_tva); if (!$senderissupplier && is_object($object->thirdparty)) { @@ -299,8 +339,7 @@ if ($line->special_code == 3) { ?> print ''; } print price($sign * $line->total_ht); - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { print ''; } print ''; @@ -362,10 +401,4 @@ if ($action == 'selectlines') { ?> print "\n"; -//Line extrafield -if (!empty($extrafields)) -{ - print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"', 'colspan'=>$coldisplay), '', '', 1); -} - print "\n"; diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 959bf7fd6ad..c4b2ad5e3e4 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -16,8 +16,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; } @@ -30,13 +29,11 @@ print ''; print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':

    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'free')."

    \n"; -if (!empty($conf->commande->enabled)) -{ +if (!empty($conf->commande->enabled)) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'order')."
    \n"; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("orders"); print ''; print ''; @@ -44,8 +41,7 @@ if (!empty($conf->commande->enabled)) print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Order")).': '; print ''; print ''; - if (GETPOST('generate_order_ref', 'alpha')) - { + if (GETPOST('generate_order_ref', 'alpha')) { print '
    -> '; $url = getOnlinePaymentUrl(0, 'order', GETPOST('generate_order_ref', 'alpha')); print $url; @@ -55,13 +51,11 @@ if (!empty($conf->commande->enabled)) } print '
    '; } -if (!empty($conf->facture->enabled)) -{ +if (!empty($conf->facture->enabled)) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'invoice')."
    \n"; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("bills"); print ''; print ''; @@ -69,8 +63,7 @@ if (!empty($conf->facture->enabled)) print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Invoice")).': '; print ''; print ''; - if (GETPOST('generate_invoice_ref', 'alpha')) - { + if (GETPOST('generate_invoice_ref', 'alpha')) { print '
    -> '; $url = getOnlinePaymentUrl(0, 'invoice', GETPOST('generate_invoice_ref', 'alpha')); print $url; @@ -80,13 +73,11 @@ if (!empty($conf->facture->enabled)) } print '
    '; } -if (!empty($conf->contrat->enabled)) -{ +if (!empty($conf->contrat->enabled)) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'contractline')."
    \n"; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("contracts"); print ''; print ''; @@ -94,8 +85,7 @@ if (!empty($conf->contrat->enabled)) print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("ContractLine")).': '; print ''; print ''; - if (GETPOST('generate_contract_ref')) - { + if (GETPOST('generate_contract_ref')) { print '
    -> '; $url = getOnlinePaymentUrl(0, 'contractline', GETPOST('generate_contract_ref', 'alpha')); print $url; @@ -105,13 +95,11 @@ if (!empty($conf->contrat->enabled)) } print '
    '; } -if (!empty($conf->adherent->enabled)) -{ +if (!empty($conf->adherent->enabled)) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'membersubscription')."
    \n"; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("members"); print ''; print ''; @@ -119,8 +107,7 @@ if (!empty($conf->adherent->enabled)) print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Member")).': '; print ''; print ''; - if (GETPOST('generate_member_ref')) - { + if (GETPOST('generate_member_ref')) { print '
    -> '; $url = getOnlinePaymentUrl(0, 'membersubscription', GETPOST('generate_member_ref', 'alpha')); print $url; @@ -130,13 +117,11 @@ if (!empty($conf->adherent->enabled)) } print '
    '; } -if (!empty($conf->don->enabled)) -{ +if (!empty($conf->don->enabled)) { print '
    '; print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'donation')."
    \n"; - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN) && !empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $langs->load("members"); print ''; print ''; @@ -144,8 +129,7 @@ if (!empty($conf->don->enabled)) print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Don")).': '; print ''; print ''; - if (GETPOST('generate_donation_ref')) - { + if (GETPOST('generate_donation_ref')) { print '
    -> '; $url = getOnlinePaymentUrl(0, 'donation', GETPOST('generate_donation_ref', 'alpha')); print $url; @@ -156,8 +140,7 @@ if (!empty($conf->don->enabled)) print '
    '; } -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".' @@ -81,9 +98,13 @@ $(document).ready(function () { @@ -113,11 +134,14 @@ if ($disablenofollow) echo ''; @@ -126,7 +150,7 @@ if ($captcha) { - " class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" /> + " class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" autocomplete="off" /> @@ -139,8 +163,7 @@ if ($captcha) { if (!empty($morelogincontent)) { if (is_array($morelogincontent)) { - foreach ($morelogincontent as $format => $option) - { + foreach ($morelogincontent as $format => $option) { if ($format == 'table') { echo ''; echo $option; @@ -169,10 +192,18 @@ if (!empty($morelogincontent)) {
    dol_hide_topmenu)) $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_topmenu='.$conf->dol_hide_topmenu; - if (!empty($conf->dol_hide_leftmenu)) $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu; - if (!empty($conf->dol_no_mouse_hover)) $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover; - if (!empty($conf->dol_use_jmobile)) $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_use_jmobile='.$conf->dol_use_jmobile; + if (!empty($conf->dol_hide_topmenu)) { + $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_topmenu='.$conf->dol_hide_topmenu; + } + if (!empty($conf->dol_hide_leftmenu)) { + $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu; + } + if (!empty($conf->dol_no_mouse_hover)) { + $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover; + } + if (!empty($conf->dol_use_jmobile)) { + $moreparam .= (strpos($moreparam, '?') === false ? '?' : '&').'dol_use_jmobile='.$conf->dol_use_jmobile; + } print ''.$langs->trans('BackToLoginPage').''; ?> @@ -200,7 +231,7 @@ if (!empty($morelogincontent)) {
    - + @@ -210,11 +241,12 @@ if (!empty($morelogincontent)) { global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; +if (!empty($conf->global->MAIN_HTML_FOOTER)) { + print $conf->global->MAIN_HTML_FOOTER; +} if (!empty($morelogincontent) && is_array($morelogincontent)) { - foreach ($morelogincontent as $format => $option) - { + foreach ($morelogincontent as $format => $option) { if ($format == 'js') { echo "\n".''; echo $option."\n"; @@ -227,8 +259,7 @@ if (!empty($morelogincontent) && is_array($morelogincontent)) { // Google Analytics // TODO Add a hook here -if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) -{ +if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) { $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID); foreach ($tmptagarray as $tmptag) { print "\n"; @@ -249,10 +280,8 @@ if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) // TODO Replace this with a hook // Google Adsense (need Google module) -if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) -{ - if (empty($conf->dol_use_jmobile)) - { +if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) { + if (empty($conf->dol_use_jmobile)) { ?>

    '."\n"; } -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("CronDelete"), $langs->trans("CronConfirmDelete"), "confirm_delete", '', '', 1); $action = ''; @@ -290,13 +276,11 @@ if ($action == 'execute') { * Create Template */ -if (empty($object->status) && $action != 'create') -{ +if (empty($object->status) && $action != 'create') { setEventMessages($langs->trans("CronTaskInactive"), null, 'warnings'); } -if (($action == "create") || ($action == "edit")) -{ +if (($action == "create") || ($action == "edit")) { print ''; print ''."\n"; print ''."\n"; @@ -307,8 +291,11 @@ if (($action == "create") || ($action == "edit")) print ''."\n"; } - if ($action == "edit") print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron'); - else print dol_get_fiche_head(''); + if ($action == "edit") { + print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron'); + } else { + print dol_get_fiche_head(''); + } print '
    '.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['val'][$totalarray['pos'][$i]]).''.$langs->trans("Total").''; + if (is_object($form)) { + print $form->textwithpicto($langs->trans("Total"), $langs->transnoentitiesnoconv("Totalforthispage")); + } else { + print $langs->trans("Totalforthispage"); + } + print '
    '; print ($line->ref_fourn ? $line->ref_fourn : $line->ref_supplier); print ''; $coldisplay++; $positiverates = ''; -if (price2num($line->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); -if (price2num($line->total_localtax1)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); -if (price2num($line->total_localtax2)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); -if (empty($positiverates)) $positiverates = '0'; +if (price2num($line->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); +} +if (price2num($line->total_localtax1)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); +} +if (price2num($line->total_localtax2)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); +} +if (empty($positiverates)) { + $positiverates = '0'; +} print vatrate($positiverates.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), '%', $line->info_bits); //print vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits); ?>'; $label = $line->getLabelOfUnit('short'); if ($label !== '') { @@ -245,8 +288,7 @@ if (!empty($line->remise_percent) && $line->special_code != 3) { } // Fields for situation invoices -if ($this->situation_cycle_ref) -{ +if ($this->situation_cycle_ref) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; $coldisplay++; print ''.$line->situation_percent.'%'.price($sign * $tmp[0]).'pa_ht); ?> pa_ht == 0) ? 'n/a' : price(price2num($line->marge_tx, 'MT')).'%'); ?> marque_tx, 'MT')).'%'; ?>
    '; @@ -395,10 +382,8 @@ if (($action == "create") || ($action == "edit")) print $langs->trans('CronEvery').""; print ""; - if (!empty($conf->multicompany->enabled)) - { + if (!empty($conf->multicompany->enabled)) { print '"; print ""; print '"; print ""; print ""; @@ -672,19 +671,31 @@ if (($action == "create") || ($action == "edit")) print '"; print '"; print '"; print '\n"; -if ($num > 0) -{ +if ($num > 0) { // Loop on each job $now = dol_now(); $i = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); - if (empty($obj)) break; - if (!verifCond($obj->test)) continue; // Discard line with test = false + if (empty($obj)) { + break; + } + if (!verifCond($obj->test)) { + continue; // Discard line with test = false + } $object->id = $obj->rowid; $object->ref = $obj->rowid; @@ -450,8 +500,7 @@ if ($num > 0) // Label print ''; print ''; print ''; print ''; print ''; print ''; // Date start last run print ''; // Duration @@ -521,27 +588,38 @@ if ($num > 0) // Return code of last run print ''; // Output of last run print ''; print ''; @@ -553,20 +631,17 @@ if ($num > 0) print ''; diff --git a/htdocs/custom/index.html b/htdocs/custom/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/datapolicy/admin/index.html b/htdocs/datapolicy/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php index d50f544449d..a334b36929e 100644 --- a/htdocs/datapolicy/admin/setup.php +++ b/htdocs/datapolicy/admin/setup.php @@ -33,7 +33,9 @@ $langs->load('members'); $langs->load('datapolicy@datapolicy'); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -104,8 +106,7 @@ print dol_get_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy"); echo ''.$langs->trans("datapolicySetupPage").'

    '; -if ($action == 'edit') -{ +if ($action == 'edit') { print ''; print ''; print ''; @@ -113,11 +114,9 @@ if ($action == 'edit') print '
    "; print '"; $input = " unitfrequency == "60") - { + if ($object->unitfrequency == "60") { $input .= ' checked />'; } else { $input .= ' />'; @@ -448,8 +432,7 @@ if (($action == "create") || ($action == "edit")) print "
    "; print $langs->trans('CronDtStart').""; - if (!empty($object->datestart)) - { + if (!empty($object->datestart)) { print $form->selectDate($object->datestart, 'datestart', 1, 1, '', "cronform"); } else { print $form->selectDate('', 'datestart', 1, 1, '', "cronform"); @@ -499,8 +482,7 @@ if (($action == "create") || ($action == "edit")) print $langs->trans('CronDtNextLaunch'); print ' ('.$langs->trans('CronFrom').')'; print ""; - if (!empty($object->datenextrun)) - { + if (!empty($object->datenextrun)) { print $form->selectDate($object->datenextrun, 'datenextrun', 1, 1, '', "cronform"); } else { print $form->selectDate(-1, 'datenextrun', 1, 1, '', "cronform"); @@ -588,12 +570,10 @@ if (($action == "create") || ($action == "edit")) } print "
    '; print $langs->trans('Entity').""; - if (!$object->entity) - { + if (!$object->entity) { print $langs->trans("AllEntities"); } else { $mc->getInfo($object->entity); @@ -615,20 +595,32 @@ if (($action == "create") || ($action == "edit")) print '
    '; print $langs->trans('CronEvery').""; - if ($object->unitfrequency == "60") print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Minutes'); - if ($object->unitfrequency == "3600") print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Hours'); - if ($object->unitfrequency == "86400") print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Days'); - if ($object->unitfrequency == "604800") print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Weeks'); + if ($object->unitfrequency == "60") { + print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Minutes'); + } + if ($object->unitfrequency == "3600") { + print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Hours'); + } + if ($object->unitfrequency == "86400") { + print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Days'); + } + if ($object->unitfrequency == "604800") { + print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Weeks'); + } print "
    '; print $langs->trans('CronDtStart').""; - if (!empty($object->datestart)) {print $form->textwithpicto(dol_print_date($object->datestart, 'dayhoursec'), $langs->trans("CurrentTimeZone")); } + if (!empty($object->datestart)) { + print $form->textwithpicto(dol_print_date($object->datestart, 'dayhoursec'), $langs->trans("CurrentTimeZone")); + } print "
    "; print $langs->trans('CronDtEnd').""; - if (!empty($object->dateend)) {print $form->textwithpicto(dol_print_date($object->dateend, 'dayhoursec'), $langs->trans("CurrentTimeZone")); } + if (!empty($object->dateend)) { + print $form->textwithpicto(dol_print_date($object->dateend, 'dayhoursec'), $langs->trans("CurrentTimeZone")); + } print "
    "; @@ -652,12 +644,19 @@ if (($action == "create") || ($action == "edit")) print $langs->trans('CronDtNextLaunch'); print ' ('.$langs->trans('CronFrom').')'; print ""; - if (!$object->status) print $langs->trans("Disabled"); - elseif (!empty($object->datenextrun)) { print img_picto('', 'object_calendarday').' '.$form->textwithpicto(dol_print_date($object->datenextrun, 'dayhoursec'), $langs->trans("CurrentTimeZone")); } else { print $langs->trans('CronNone'); } - if ($object->status == Cronjob::STATUS_ENABLED) - { - if ($object->maxrun && $object->nbrun >= $object->maxrun) print img_warning($langs->trans("MaxRunReached")); - elseif ($object->datenextrun && $object->datenextrun < $now) print img_warning($langs->trans("Late")); + if (!$object->status) { + print $langs->trans("Disabled"); + } elseif (!empty($object->datenextrun)) { + print img_picto('', 'object_calendarday').' '.$form->textwithpicto(dol_print_date($object->datenextrun, 'dayhoursec'), $langs->trans("CurrentTimeZone")); + } else { + print $langs->trans('CronNone'); + } + if ($object->status == Cronjob::STATUS_ENABLED) { + if ($object->maxrun && $object->nbrun >= $object->maxrun) { + print img_warning($langs->trans("MaxRunReached")); + } elseif ($object->datenextrun && $object->datenextrun < $now) { + print img_warning($langs->trans("Late")); + } } print "
    '; print $langs->trans('CronDtLastLaunch').""; - if (!empty($object->datelastrun)) {print $form->textwithpicto(dol_print_date($object->datelastrun, 'dayhoursec'), $langs->trans("CurrentTimeZone")); } else {print $langs->trans('CronNone'); } + if (!empty($object->datelastrun)) { + print $form->textwithpicto(dol_print_date($object->datelastrun, 'dayhoursec'), $langs->trans("CurrentTimeZone")); + } else { + print $langs->trans('CronNone'); + } print "
    '; print $langs->trans('CronDtLastResult').""; - if (!empty($object->datelastresult)) {print $form->textwithpicto(dol_print_date($object->datelastresult, 'dayhoursec'), $langs->trans("CurrentTimeZone")); } else {print $langs->trans('CronNone'); } + if (!empty($object->datelastresult)) { + print $form->textwithpicto(dol_print_date($object->datelastresult, 'dayhoursec'), $langs->trans("CurrentTimeZone")); + } else { + print $langs->trans('CronNone'); + } print "
    '; print $langs->trans('CronLastResult').""; - if ($object->lastresult) print ''; + if ($object->lastresult) { + print ''; + } print $object->lastresult; - if ($object->lastresult) print ''; + if ($object->lastresult) { + print ''; + } print "
    '; @@ -705,11 +716,9 @@ if (($action == "create") || ($action == "edit")) print ''.$langs->trans("Edit").''; } - if ((empty($user->rights->cron->execute))) - { + if ((empty($user->rights->cron->execute))) { print ''.$langs->trans("CronExecute").''; - } elseif (empty($object->status)) - { + } elseif (empty($object->status)) { print ''.$langs->trans("CronExecute").''; } else { print ''.$langs->trans("CronExecute").''; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 9d084ec4f24..2af3b39789e 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -50,8 +50,19 @@ class Cronjob extends CommonObject */ public $entity; + /** + * @var string Job type + */ public $jobtype; + + /** + * @var string|int Date for last cron object update + */ public $tms = ''; + + /** + * @var string|int Date for cron job create + */ public $datec = ''; /** @@ -59,6 +70,9 @@ class Cronjob extends CommonObject */ public $label; + /** + * @var string Job command + */ public $command; public $classesname; public $objectname; @@ -67,20 +81,50 @@ class Cronjob extends CommonObject public $md5params; public $module_name; public $priority; + /** * @var string|int Date for last job execution */ public $datelastrun = ''; + /** * @var string|int Date for next job execution */ public $datenextrun = ''; + + /** + * @var string|int Date for end job execution + */ public $dateend = ''; + + /** + * @var string|int Date for first start job execution + */ public $datestart = ''; + + /** + * @var string|int Date for last result job execution + */ public $datelastresult = ''; + + /** + * @var string Last result from end job execution + */ public $lastresult; + + /** + * @var string Last output from end job execution + */ public $lastoutput; + + /** + * @var string Unit frequency of job execution + */ public $unitfrequency; + + /** + * @var int Frequency of job execution + */ public $frequency; /** @@ -88,6 +132,9 @@ class Cronjob extends CommonObject */ public $status; + /** + * @var int Is job processing + */ public $processing; /** @@ -100,9 +147,25 @@ class Cronjob extends CommonObject */ public $fk_user_mod; + /** + * @var int Number of run job execution + */ public $nbrun; + + /** + * @var int Maximum run job execution + */ + public $maxrun; + + /** + * @var string Libname + */ public $libname; - public $test; // A test condition to know if job is visible/qualified + + /** + * @var string A test condition to know if job is visible/qualified + */ + public $test; const STATUS_DISABLED = 0; const STATUS_ENABLED = 1; @@ -136,25 +199,66 @@ class Cronjob extends CommonObject // Clean parameters - if (isset($this->label)) $this->label = trim($this->label); - if (isset($this->jobtype)) $this->jobtype = trim($this->jobtype); - if (isset($this->command)) $this->command = trim($this->command); - if (isset($this->classesname)) $this->classesname = trim($this->classesname); - if (isset($this->objectname)) $this->objectname = trim($this->objectname); - if (isset($this->methodename)) $this->methodename = trim($this->methodename); - if (isset($this->params)) $this->params = trim($this->params); - if (isset($this->md5params)) $this->md5params = trim($this->md5params); - if (isset($this->module_name)) $this->module_name = trim($this->module_name); - if (isset($this->priority)) $this->priority = trim($this->priority); - if (isset($this->lastoutput)) $this->lastoutput = trim($this->lastoutput); - if (isset($this->lastresult)) $this->lastresult = trim($this->lastresult); - if (isset($this->unitfrequency)) $this->unitfrequency = trim($this->unitfrequency); - if (isset($this->frequency)) $this->frequency = trim($this->frequency); - if (isset($this->status)) $this->status = trim($this->status); - if (isset($this->note_private)) $this->note_private = trim($this->note_private); - if (isset($this->nbrun)) $this->nbrun = trim($this->nbrun); - if (isset($this->libname)) $this->libname = trim($this->libname); - if (isset($this->test)) $this->test = trim($this->test); + if (isset($this->label)) { + $this->label = trim($this->label); + } + if (isset($this->jobtype)) { + $this->jobtype = trim($this->jobtype); + } + if (isset($this->command)) { + $this->command = trim($this->command); + } + if (isset($this->classesname)) { + $this->classesname = trim($this->classesname); + } + if (isset($this->objectname)) { + $this->objectname = trim($this->objectname); + } + if (isset($this->methodename)) { + $this->methodename = trim($this->methodename); + } + if (isset($this->params)) { + $this->params = trim($this->params); + } + if (isset($this->md5params)) { + $this->md5params = trim($this->md5params); + } + if (isset($this->module_name)) { + $this->module_name = trim($this->module_name); + } + if (isset($this->priority)) { + $this->priority = trim($this->priority); + } + if (isset($this->lastoutput)) { + $this->lastoutput = trim($this->lastoutput); + } + if (isset($this->lastresult)) { + $this->lastresult = trim($this->lastresult); + } + if (isset($this->unitfrequency)) { + $this->unitfrequency = trim($this->unitfrequency); + } + if (isset($this->frequency)) { + $this->frequency = trim($this->frequency); + } + if (isset($this->status)) { + $this->status = trim($this->status); + } + if (isset($this->note_private)) { + $this->note_private = trim($this->note_private); + } + if (isset($this->nbrun)) { + $this->nbrun = (int) $this->nbrun; + } + if (isset($this->maxrun)) { + $this->maxrun = (int) $this->maxrun; + } + if (isset($this->libname)) { + $this->libname = trim($this->libname); + } + if (isset($this->test)) { + $this->test = trim($this->test); + } // Check parameters // Put here code to add a control on parameters values @@ -260,20 +364,20 @@ class Cronjob extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create", LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; + $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."cronjob"); } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -331,7 +435,7 @@ class Cronjob extends CommonObject $sql .= " t.test"; $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t"; if ($id > 0) { - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); } else { $sql .= " WHERE t.entity IN(0, ".getEntity('cron').")"; $sql .= " AND t.objectname = '".$this->db->escape($objectname)."'"; @@ -340,10 +444,8 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -384,7 +486,7 @@ class Cronjob extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -443,15 +545,22 @@ class Cronjob extends CommonObject $sql .= " t.test"; $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t"; $sql .= " WHERE 1 = 1"; - if ($processing >= 0) $sql .= " AND t.processing = ".(empty($processing) ? '0' : '1'); - if ($status >= 0 && $status < 2) $sql .= " AND t.status = ".(empty($status) ? '0' : '1'); - elseif ($status == 2) $sql .= " AND t.status = 2"; + if ($processing >= 0) { + $sql .= " AND t.processing = ".(empty($processing) ? '0' : '1'); + } + if ($status >= 0 && $status < 2) { + $sql .= " AND t.status = ".(empty($status) ? '0' : '1'); + } elseif ($status == 2) { + $sql .= " AND t.status = 2"; + } //Manage filter if (is_array($filter) && count($filter) > 0) { - foreach ($filter as $key => $value) - { - if ($key == 't.rowid') $sql .= ' AND '.$key.' = '.$this->db->escape($value); - else $sql .= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\''; + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sql .= ' AND '.$key.' = '.$this->db->escape($value); + } else { + $sql .= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\''; + } } } @@ -468,15 +577,12 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $line = new Cronjobline(); $obj = $this->db->fetch_object($resql); @@ -544,28 +650,70 @@ class Cronjob extends CommonObject $error = 0; // Clean parameters - if (isset($this->label)) $this->label = trim($this->label); - if (isset($this->jobtype)) $this->jobtype = trim($this->jobtype); - if (isset($this->command)) $this->command = trim($this->command); - if (isset($this->classesname)) $this->classesname = trim($this->classesname); - if (isset($this->objectname)) $this->objectname = trim($this->objectname); - if (isset($this->methodename)) $this->methodename = trim($this->methodename); - if (isset($this->params)) $this->params = trim($this->params); - if (isset($this->md5params)) $this->md5params = trim($this->md5params); - if (isset($this->module_name)) $this->module_name = trim($this->module_name); - if (isset($this->priority)) $this->priority = trim($this->priority); - if (isset($this->lastoutput)) $this->lastoutput = trim($this->lastoutput); - if (isset($this->lastresult)) $this->lastresult = trim($this->lastresult); - if (isset($this->unitfrequency)) $this->unitfrequency = trim($this->unitfrequency); - if (isset($this->frequency)) $this->frequency = trim($this->frequency); - if (isset($this->status)) $this->status = trim($this->status); - if (isset($this->note_private)) $this->note_private = trim($this->note_private); - if (isset($this->nbrun)) $this->nbrun = trim($this->nbrun); - if (isset($this->libname)) $this->libname = trim($this->libname); - if (isset($this->test)) $this->test = trim($this->test); + if (isset($this->label)) { + $this->label = trim($this->label); + } + if (isset($this->jobtype)) { + $this->jobtype = trim($this->jobtype); + } + if (isset($this->command)) { + $this->command = trim($this->command); + } + if (isset($this->classesname)) { + $this->classesname = trim($this->classesname); + } + if (isset($this->objectname)) { + $this->objectname = trim($this->objectname); + } + if (isset($this->methodename)) { + $this->methodename = trim($this->methodename); + } + if (isset($this->params)) { + $this->params = trim($this->params); + } + if (isset($this->md5params)) { + $this->md5params = trim($this->md5params); + } + if (isset($this->module_name)) { + $this->module_name = trim($this->module_name); + } + if (isset($this->priority)) { + $this->priority = trim($this->priority); + } + if (isset($this->lastoutput)) { + $this->lastoutput = trim($this->lastoutput); + } + if (isset($this->lastresult)) { + $this->lastresult = trim($this->lastresult); + } + if (isset($this->unitfrequency)) { + $this->unitfrequency = trim($this->unitfrequency); + } + if (isset($this->frequency)) { + $this->frequency = trim($this->frequency); + } + if (isset($this->status)) { + $this->status = trim($this->status); + } + if (isset($this->note_private)) { + $this->note_private = trim($this->note_private); + } + if (isset($this->nbrun)) { + $this->nbrun = trim($this->nbrun); + } + if (isset($this->libname)) { + $this->libname = trim($this->libname); + } + if (isset($this->test)) { + $this->test = trim($this->test); + } - if (empty($this->maxrun)) $this->maxrun = 0; - if (empty($this->processing)) $this->processing = 0; + if (empty($this->maxrun)) { + $this->maxrun = 0; + } + if (empty($this->processing)) { + $this->processing = 0; + } // Check parameters // Put here code to add a control on parameters values @@ -638,19 +786,19 @@ class Cronjob extends CommonObject $sql .= " maxrun=".((isset($this->maxrun) && $this->maxrun > 0) ? $this->maxrun : "0").","; $sql .= " libname=".(isset($this->libname) ? "'".$this->db->escape($this->libname)."'" : "null").","; $sql .= " test=".(isset($this->test) ? "'".$this->db->escape($this->test)."'" : "null"); - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -663,13 +811,13 @@ class Cronjob extends CommonObject } - /** - * 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) { $error = 0; @@ -677,7 +825,7 @@ class Cronjob extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."cronjob"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); @@ -687,10 +835,8 @@ class Cronjob extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -732,8 +878,7 @@ class Cronjob extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $error++; } @@ -746,8 +891,7 @@ class Cronjob extends CommonObject unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -816,7 +960,9 @@ class Cronjob extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -829,33 +975,40 @@ class Cronjob extends CommonObject $url = DOL_URL_ROOT.'/cron/card.php?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowCronJob"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = ''; $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -874,14 +1027,12 @@ class Cronjob extends CommonObject $sql = "SELECT"; $sql .= " f.rowid, f.datec, f.tms, f.fk_user_mod, f.fk_user_author"; $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as f"; - $sql .= " WHERE f.rowid = ".$id; + $sql .= " WHERE f.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; $this->date_creation = $this->db->jdate($obj->datec); @@ -921,8 +1072,7 @@ class Cronjob extends CommonObject $langs->load('cron'); - if (empty($userlogin)) - { + if (empty($userlogin)) { $this->error = "User login is mandatory"; dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); return -1; @@ -930,8 +1080,7 @@ class Cronjob extends CommonObject // Force the environment of running to the environment declared for job, so jobs launched from command line will run into correct environment // When job is ran from GUI, the environment should already be same, except if job has entity 0 (visible into all environments) - if ($conf->entity != $this->entity && $this->entity > 0) - { + if ($conf->entity != $this->entity && $this->entity > 0) { dol_syslog("We try to run a job in entity ".$this->entity." when we are in entity ".$conf->entity, LOG_WARNING); } $savcurrententity = $conf->entity; @@ -941,15 +1090,13 @@ class Cronjob extends CommonObject require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($this->db); $result = $user->fetch('', $userlogin); - if ($result < 0) - { + if ($result < 0) { $this->error = "User Error:".$user->error; dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $conf->entity = $savcurrententity; return -1; } else { - if (empty($user->id)) - { + if (empty($user->id)) { $this->error = " User user login:".$userlogin." do not exists"; dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $conf->entity = $savcurrententity; @@ -961,16 +1108,14 @@ class Cronjob extends CommonObject // Increase limit of time. Works only if we are not in safe mode $ExecTimeLimit = 600; - if (!empty($ExecTimeLimit)) - { + if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors //error_reporting(E_ALL); @set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64 error_reporting($err); } - if (!empty($MemoryLimit)) - { + if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } @@ -989,16 +1134,16 @@ class Cronjob extends CommonObject } // Run a method - if ($this->jobtype == 'method') - { + if ($this->jobtype == 'method') { // load classes - if (!$error) - { + if (!$error) { $ret = dol_include_once($this->classesname); - if ($ret === false || (!class_exists($this->objectname))) - { - if ($ret === false) $this->error = $langs->trans('CronCannotLoadClass', $this->classesname, $this->objectname); - else $this->error = $langs->trans('CronCannotLoadObject', $this->classesname, $this->objectname); + if ($ret === false || (!class_exists($this->objectname))) { + if ($ret === false) { + $this->error = $langs->transnoentitiesnoconv('CronCannotLoadClass', $this->classesname, $this->objectname); + } else { + $this->error = $langs->transnoentitiesnoconv('CronCannotLoadObject', $this->classesname, $this->objectname); + } dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; $this->lastresult = -1; @@ -1008,20 +1153,17 @@ class Cronjob extends CommonObject } // test if method exists - if (!$error) - { - if (!method_exists($this->objectname, $this->methodename)) - { - $this->error = $langs->trans('CronMethodDoesNotExists', $this->objectname, $this->methodename); + if (!$error) { + if (!method_exists($this->objectname, $this->methodename)) { + $this->error = $langs->transnoentitiesnoconv('CronMethodDoesNotExists', $this->objectname, $this->methodename); dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; $this->lastresult = -1; $retval = $this->lastresult; $error++; } - if (in_array(strtolower(trim($this->methodename)), array('executecli'))) - { - $this->error = $langs->trans('CronMethodNotAllowed', $this->methodename, $this->objectname); + if (in_array(strtolower(trim($this->methodename)), array('executecli'))) { + $this->error = $langs->transnoentitiesnoconv('CronMethodNotAllowed', $this->methodename, $this->objectname); dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; $this->lastresult = -1; @@ -1031,13 +1173,11 @@ class Cronjob extends CommonObject } // Load langs - if (!$error) - { + if (!$error) { $result = $langs->load($this->module_name); $result = $langs->load($this->module_name.'@'.$this->module_name, 0, 0, '', 0, 1); - if ($result < 0) // If technical error - { + if ($result < 0) { // If technical error dol_syslog(get_class($this)."::run_jobs Cannot load module lang file - ".$langs->error, LOG_ERR); $this->error = $langs->error; $this->lastoutput = $this->error; @@ -1047,34 +1187,39 @@ class Cronjob extends CommonObject } } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::run_jobs START ".$this->objectname."->".$this->methodename."(".$this->params.");", LOG_DEBUG); // Create Object for the called module $object = new $this->objectname($this->db); - if ($this->entity > 0) $object->entity = $this->entity; // We work on a dedicated entity + if ($this->entity > 0) { + $object->entity = $this->entity; // We work on a dedicated entity + } $params_arr = array(); if (!empty($this->params) || $this->params === '0') { $params_arr = array_map('trim', explode(",", $this->params)); } - if (!is_array($params_arr)) - { + if (!is_array($params_arr)) { $result = call_user_func(array($object, $this->methodename), $this->params); } else { $result = call_user_func_array(array($object, $this->methodename), $params_arr); } - if ($result === false || (!is_bool($result) && $result != 0)) - { + if ($result === false || (!is_bool($result) && $result != 0)) { $langs->load("errors"); $errmsg = ''; - if (!is_array($object->errors) || !in_array($object->error, $object->errors)) $errmsg .= $object->error; - if (is_array($object->errors) && count($object->errors)) $errmsg .= (($errmsg ? ', ' : '').join(', ', $object->errors)); - if (empty($errmsg)) $errmsg = $langs->trans('ErrorUnknown'); + if (!is_array($object->errors) || !in_array($object->error, $object->errors)) { + $errmsg .= $object->error; + } + if (is_array($object->errors) && count($object->errors)) { + $errmsg .= (($errmsg ? ', ' : '').join(', ', $object->errors)); + } + if (empty($errmsg)) { + $errmsg = $langs->trans('ErrorUnknown'); + } dol_syslog(get_class($this)."::run_jobs END result=".$result." error=".$errmsg, LOG_ERR); @@ -1096,8 +1241,7 @@ class Cronjob extends CommonObject //load lib $libpath = '/'.strtolower($this->module_name).'/lib/'.$this->libname; $ret = dol_include_once($libpath); - if ($ret === false) - { + if ($ret === false) { $this->error = $langs->trans('CronCannotLoadLib').': '.$libpath; dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $conf->entity = $savcurrententity; @@ -1107,8 +1251,7 @@ class Cronjob extends CommonObject // Load langs $result = $langs->load($this->module_name); $result = $langs->load($this->module_name.'@'.$this->module_name); // If this->module_name was an existing language file, this will make nothing - if ($result < 0) // If technical error - { + if ($result < 0) { // If technical error dol_syslog(get_class($this)."::run_jobs Cannot load module langs".$langs->error, LOG_ERR); $conf->entity = $savcurrententity; return -1; @@ -1116,15 +1259,13 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::run_jobs ".$this->libname."::".$this->methodename."(".$this->params.");", LOG_DEBUG); $params_arr = explode(", ", $this->params); - if (!is_array($params_arr)) - { + if (!is_array($params_arr)) { $result = call_user_func($this->methodename, $this->params); } else { $result = call_user_func_array($this->methodename, $params_arr); } - if ($result === false || (!is_bool($result) && $result != 0)) - { + if ($result === false || (!is_bool($result) && $result != 0)) { $langs->load("errors"); dol_syslog(get_class($this)."::run_jobs result=".$result, LOG_ERR); $this->error = $langs->trans('ErrorUnknown'); @@ -1140,8 +1281,7 @@ class Cronjob extends CommonObject } // Run a command line - if ($this->jobtype == 'command') - { + if ($this->jobtype == 'command') { global $dolibarr_cron_allow_cli; if (empty($dolibarr_cron_allow_cli)) { @@ -1151,10 +1291,11 @@ class Cronjob extends CommonObject $this->lastresult = $langs->trans("ErrorParameterMustBeEnabledToAllwoThisFeature", 'dolibarr_cron_allow_cli'); } else { $outputdir = $conf->cron->dir_temp; - if (empty($outputdir)) $outputdir = $conf->cronjob->dir_temp; + if (empty($outputdir)) { + $outputdir = $conf->cronjob->dir_temp; + } - if (!empty($outputdir)) - { + if (!empty($outputdir)) { dol_mkdir($outputdir); $outputfile = $outputdir.'/cronjob.'.$userlogin.'.out'; // File used with popen method @@ -1176,8 +1317,7 @@ class Cronjob extends CommonObject $this->datelastresult = dol_now(); $this->processing = 0; $result = $this->update($user); // This include begin/commit - if ($result < 0) - { + if ($result < 0) { dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $conf->entity = $savcurrententity; return -1; @@ -1204,14 +1344,12 @@ class Cronjob extends CommonObject require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($this->db); $result = $user->fetch('', $userlogin); - if ($result < 0) - { + if ($result < 0) { $this->error = "User Error : ".$user->error; dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR); return -1; } else { - if (empty($user->id)) - { + if (empty($user->id)) { $this->error = " User user login:".$userlogin." do not exists"; dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR); return -1; @@ -1220,17 +1358,17 @@ class Cronjob extends CommonObject dol_syslog(get_class($this)."::reprogram_jobs datenextrun=".$this->datenextrun." ".dol_print_date($this->datenextrun, 'dayhourrfc')." frequency=".$this->frequency." unitfrequency=".$this->unitfrequency, LOG_DEBUG); - if (empty($this->datenextrun)) - { - if (empty($this->datestart)) $this->datenextrun = $now + ($this->frequency * $this->unitfrequency); - else $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency); + if (empty($this->datenextrun)) { + if (empty($this->datestart)) { + $this->datenextrun = $now + ($this->frequency * $this->unitfrequency); + } else { + $this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency); + } } - if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0) - { + if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0) { // Loop until date is after future - while ($this->datenextrun < $now) - { + while ($this->datenextrun < $now) { $this->datenextrun += ($this->frequency * $this->unitfrequency); // TODO For exact frequency (every month, every year, ...), use instead a dol_time_plus_duree($time, $duration_value, $duration_unit) @@ -1242,19 +1380,16 @@ class Cronjob extends CommonObject // Archive job - if ($this->autodelete == 2) - { + if ($this->autodelete == 2) { if (($this->maxrun > 0 && ($this->nbrun >= $this->maxrun)) - || ($this->dateend && ($this->datenextrun > $this->dateend))) - { + || ($this->dateend && ($this->datenextrun > $this->dateend))) { $this->status = self::STATUS_ARCHIVED; dol_syslog(get_class($this)."::reprogram_jobs Job will be set to archived", LOG_ERR); } } $result = $this->update($user); - if ($result < 0) - { + if ($result < 0) { dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR); return -1; } @@ -1289,14 +1424,16 @@ class Cronjob extends CommonObject $this->labelStatus = array(); // Force reset o array because label depends on other fields $this->labelStatusShort = array(); - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load('users'); $moretext = ''; - if ($processing) $moretext = ' ('.$langs->trans("Running").')'; - elseif ($lastresult) $moretext .= ' ('.$langs->trans("Error").')'; + if ($processing) { + $moretext = ' ('.$langs->trans("Running").')'; + } elseif ($lastresult) { + $moretext .= ' ('.$langs->trans("Error").')'; + } $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled').$moretext; $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Scheduled').$moretext; @@ -1305,9 +1442,15 @@ class Cronjob extends CommonObject } $statusType = 'status4'; - if ($status == 1 && $processing) $statusType = 'status1'; - if ($status == 0) $statusType = 'status5'; - if ($this->lastresult) $statusType = 'status8'; + if ($status == 1 && $processing) { + $statusType = 'status1'; + } + if ($status == 0) { + $statusType = 'status5'; + } + if ($this->lastresult) { + $statusType = 'status8'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/cron/class/index.html b/htdocs/cron/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/cron/index.html b/htdocs/cron/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php index 98319e51295..6adc9da030e 100644 --- a/htdocs/cron/info.php +++ b/htdocs/cron/info.php @@ -30,19 +30,23 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array('admin', 'cron')); // Security check -if (!$user->rights->cron->read) accessforbidden(); +if (!$user->rights->cron->read) { + accessforbidden(); +} $id = GETPOST('id', 'int'); -$mesg = ''; +$object = new Cronjob($db); + /* * View -*/ + */ + +$form = new Form($db); // $form is required as global value into dol_banner_tab llxHeader('', $langs->trans("CronInfo")); -$object = new Cronjob($db); $object->fetch($id); $object->info($id); diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index ae7cbee0cf0..a88bcda9a66 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "cron", "bills", "members")); -if (!$user->rights->cron->read) accessforbidden(); +if (!$user->rights->cron->read) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) @@ -48,13 +50,19 @@ $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 (!$sortfield) $sortfield = 't.status,t.priority'; -if (!$sortorder) $sortorder = 'DESC,ASC'; - +if (!$sortfield) { + $sortfield = 't.status,t.priority'; +} +if (!$sortorder) { + $sortorder = 'DESC,ASC'; +} +$optioncss = GETPOST('optioncss', 'alpha'); $mode = GETPOST('mode', 'aZ09'); //Search criteria $search_status = (GETPOSTISSET('search_status') ?GETPOST('search_status', 'int') : GETPOST('status', 'int')); @@ -63,7 +71,11 @@ $search_module_name = GETPOST("search_module_name", 'alpha'); $search_lastresult = GETPOST("search_lastresult", "alpha"); $securitykey = GETPOST('securitykey', 'alpha'); -$diroutputmassaction = $conf->cronjob->dir_output.'/temp/massgeneration/'.$user->id; +$outputdir = $conf->cron->dir_output; +if (empty($outputdir)) { + $outputdir = $conf->cronjob->dir_output; +} +$diroutputmassaction = $outputdir.'/temp/massgeneration/'.$user->id; $object = new Cronjob($db); @@ -82,21 +94,25 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_status = -1; $search_lastresult = ''; @@ -104,20 +120,17 @@ if (empty($reshook)) $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')) - { + || 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 } $filter = array(); - if (!empty($search_label)) - { + if (!empty($search_label)) { $filter['t.label'] = $search_label; } // Delete jobs - if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete) - { + if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete) { //Delete cron task $object = new Cronjob($db); $object->id = $id; @@ -129,10 +142,8 @@ if (empty($reshook)) } // Execute jobs - if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute) - { - if (!empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey) - { + if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute) { + if (!empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey) { setEventMessages('Security key '.$securitykey.' is wrong', null, 'errors'); $action = ''; } else { @@ -148,12 +159,13 @@ if (empty($reshook)) // Programm next run $res = $object->reprogram_jobs($user->login, $now); - if ($res > 0) - { - if ($resrunjob >= 0) // We show the result of reprogram only if no error message already reported - { - if ($object->lastresult >= 0) setEventMessages($langs->trans("JobFinished"), null, 'mesgs'); - else setEventMessages($langs->trans("JobFinished"), null, 'errors'); + if ($res > 0) { + if ($resrunjob >= 0) { // We show the result of reprogram only if no error message already reported + if ($object->lastresult >= 0) { + setEventMessages($langs->trans("JobFinished"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("JobFinished"), null, 'errors'); + } } $action = ''; } else { @@ -162,10 +174,18 @@ if (empty($reshook)) } $param = '&search_status='.urlencode($search_status); - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($search_label) $param .= '&search_label='.urlencode($search_label); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($search_label) { + $param .= '&search_label='.urlencode($search_label); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -182,19 +202,21 @@ if (empty($reshook)) $permissiontodelete = $user->rights->cron->delete; $uploaddir = $conf->cron->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if ($permissiontoadd) - { + if ($permissiontoadd) { $tmpcron = new Cronjob($db); - foreach ($toselect as $id) - { + foreach ($toselect as $id) { $result = $tmpcron->fetch($id); - if ($result) - { + if ($result) { $result = 0; - if ($massaction == 'disable') $result = $tmpcron->setStatut(Cronjob::STATUS_DISABLED); - elseif ($massaction == 'enable') $result = $tmpcron->setStatut(Cronjob::STATUS_ENABLED); + if ($massaction == 'disable') { + $result = $tmpcron->setStatut(Cronjob::STATUS_DISABLED); + } elseif ($massaction == 'enable') { + $result = $tmpcron->setStatut(Cronjob::STATUS_ENABLED); + } //else dol_print_error($db, 'Bad value for massaction'); - if ($result < 0) setEventMessages($tmpcron->error, $tmpcron->errors, 'errors'); + if ($result < 0) { + setEventMessages($tmpcron->error, $tmpcron->errors, 'errors'); + } } else { $error++; } @@ -248,8 +270,12 @@ $sql .= " t.libname,"; $sql .= " t.test"; $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t"; $sql .= " WHERE entity IN (0,".$conf->entity.")"; -if ($search_status >= 0 && $search_status < 2 && $search_status != '') $sql .= " AND t.status = ".(empty($search_status) ? '0' : '1'); -if ($search_lastresult != '') $sql .= natural_search("t.lastresult", $search_lastresult, 1); +if ($search_status >= 0 && $search_status < 2 && $search_status != '') { + $sql .= " AND t.status = ".(empty($search_status) ? '0' : '1'); +} +if ($search_lastresult != '') { + $sql .= natural_search("t.lastresult", $search_lastresult, 1); +} //Manage filter if (is_array($filter) && count($filter) > 0) { foreach ($filter as $key => $value) { @@ -274,12 +300,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -288,44 +312,64 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if (!$result) dol_print_error($db); +if (!$result) { + dol_print_error($db); +} $num = $db->num_rows($result); $arrayofselected = is_array($toselect) ? $toselect : array(); $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_status) $param .= '&search_status='.urlencode($search_status); -if ($search_label) $param .= '&search_label='.urlencode($search_label); -if ($search_module_name) $param .= '&search_module_name='.urlencode($search_module_name); -if ($search_lastresult) $param .= '&search_lastresult='.urlencode($search_lastresult); -if ($mode) $param .= '&mode='.urlencode($mode); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($search_status) { + $param .= '&search_status='.urlencode($search_status); +} +if ($search_label) { + $param .= '&search_label='.urlencode($search_label); +} +if ($search_module_name) { + $param .= '&search_module_name='.urlencode($search_module_name); +} +if ($search_lastresult) { + $param .= '&search_lastresult='.urlencode($search_lastresult); +} +if ($mode) { + $param .= '&mode='.urlencode($mode); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $stringcurrentdate = $langs->trans("CurrentHour").': '.dol_print_date(dol_now(), 'dayhour'); -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.$param, $langs->trans("CronDelete"), $langs->trans("CronConfirmDelete"), "confirm_delete", '', '', 1); } -if ($action == 'execute') -{ +if ($action == 'execute') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&securitykey='.$securitykey.$param, $langs->trans("CronExecute"), $langs->trans("CronConfirmExecute"), "confirm_execute", '', '', 1); } // List of mass actions available $arrayofmassactions = array( -//'presend'=>$langs->trans("SendByMail"), -//'builddoc'=>$langs->trans("PDFMerge"), - 'enable'=>$langs->trans("CronStatusActiveBtn"), - 'disable'=>$langs->trans("CronStatusInactiveBtn"), +//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'enable'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("CronStatusActiveBtn"), + 'disable'=>img_picto('', 'title_close', 'class="pictofixedwidth"').$langs->trans("CronStatusInactiveBtn"), ); -if ($user->rights->mymodule->delete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->cron->delete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); if ($mode == 'modulesetup') { @@ -337,7 +381,9 @@ if ($mode == 'modulesetup') { } print ''."\n"; -if ($optioncss != '') print ''; +if ($optioncss != '') { + print ''; +} print ''; print ''; print ''; @@ -362,7 +408,9 @@ print_barre_liste($pagetitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $ $text = $langs->trans("HoursOnThisPageAreOnServerTZ").' '.$stringcurrentdate.'
    '; -if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) $text .= $langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS); +if (!empty($conf->global->CRON_WARNING_DELAY_HOURS)) { + $text .= $langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS); +} print info_admin($text); print '
    '; @@ -417,18 +465,20 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", "", $param, ' print "
    '; - if (!empty($obj->label)) - { + if (!empty($obj->label)) { $object->ref = $langs->trans($obj->label); print ''.$object->getNomUrl(0, '', 1).''; $object->ref = $obj->rowid; @@ -466,8 +515,7 @@ if ($num > 0) print ''; - if ($obj->jobtype == 'method') - { + if ($obj->jobtype == 'method') { $text = $langs->trans("CronClass"); $texttoshow = $langs->trans('CronModule').': '.$obj->module_name.'
    '; $texttoshow .= $langs->trans('CronClass').': '.$obj->classesname.'
    '; @@ -475,8 +523,7 @@ if ($num > 0) $texttoshow .= $langs->trans('CronMethod').': '.$obj->methodename; $texttoshow .= '
    '.$langs->trans('CronArgs').': '.$obj->params; $texttoshow .= '
    '.$langs->trans('Comment').': '.$langs->trans($obj->note); - } elseif ($obj->jobtype == 'command') - { + } elseif ($obj->jobtype == 'command') { $text = $langs->trans('CronCommand'); $texttoshow = $langs->trans('CronCommand').': '.dol_trunc($obj->command); $texttoshow .= '
    '.$langs->trans('CronArgs').': '.$obj->params; @@ -486,28 +533,48 @@ if ($num > 0) print '
    '; - if ($obj->unitfrequency == "60") print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Minutes'); - if ($obj->unitfrequency == "3600") print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Hours'); - if ($obj->unitfrequency == "86400") print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Days'); - if ($obj->unitfrequency == "604800") print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Weeks'); + if ($obj->unitfrequency == "60") { + print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Minutes'); + } + if ($obj->unitfrequency == "3600") { + print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Hours'); + } + if ($obj->unitfrequency == "86400") { + print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Days'); + } + if ($obj->unitfrequency == "604800") { + print $langs->trans('CronEach')." ".($obj->frequency)." ".$langs->trans('Weeks'); + } print ''; - if (!empty($obj->datestart)) { print dol_print_date($db->jdate($obj->datestart), 'dayhour', 'tzserver'); } + if (!empty($obj->datestart)) { + print dol_print_date($db->jdate($obj->datestart), 'dayhour', 'tzserver'); + } print ''; - if (!empty($obj->dateend)) { print dol_print_date($db->jdate($obj->dateend), 'dayhour', 'tzserver'); } + if (!empty($obj->dateend)) { + print dol_print_date($db->jdate($obj->dateend), 'dayhour', 'tzserver'); + } print ''; - if (!empty($obj->nbrun)) { print $obj->nbrun; } else {print '0'; } - if (!empty($obj->maxrun)) { print ' / '.$obj->maxrun.''; } + if (!empty($obj->nbrun)) { + print $obj->nbrun; + } else { + print '0'; + } + if (!empty($obj->maxrun)) { + print ' / '.$obj->maxrun.''; + } print ''; - if (!empty($datelastrun)) { print dol_print_date($datelastrun, 'dayhoursec', 'tzserver'); } + if (!empty($datelastrun)) { + print dol_print_date($datelastrun, 'dayhoursec', 'tzserver'); + } print ''; if ($obj->lastresult != '') { - if (empty($obj->lastresult)) print $obj->lastresult; - else print ''.dol_trunc($obj->lastresult).''; + if (empty($obj->lastresult)) { + print $obj->lastresult; + } else { + print ''.dol_trunc($obj->lastresult).''; + } } print ''; - if (!empty($obj->lastoutput)) {print dol_trunc(nl2br($obj->lastoutput), 50); } + if (!empty($obj->lastoutput)) { + print dol_trunc(nl2br($obj->lastoutput), 50); + } print ''; if (!empty($obj->datenextrun)) { $datenextrun = $db->jdate($obj->datenextrun); - if (empty($obj->status)) print ''; - print dol_print_date($datenextrun, 'dayhoursec'); - if ($obj->status == Cronjob::STATUS_ENABLED) - { - if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) print img_warning($langs->trans("MaxRunReached")); - elseif ($datenextrun && $datenextrun < $now) print img_warning($langs->trans("Late")); + if (empty($obj->status)) { + print ''; + } + print dol_print_date($datenextrun, 'dayhoursec'); + if ($obj->status == Cronjob::STATUS_ENABLED) { + if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) { + print img_warning($langs->trans("MaxRunReached")); + } elseif ($datenextrun && $datenextrun < $now) { + print img_warning($langs->trans("Late")); + } + } + if (empty($obj->status)) { + print ''; } - if (empty($obj->status)) print ''; } print ''; $backtopage = urlencode($_SERVER["PHP_SELF"].'?'.$param.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '')); - if ($user->rights->cron->create) - { + if ($user->rights->cron->create) { print 'trans('Edit'))."\">".img_picto($langs->trans('Edit'), 'edit')."  "; } - if ($user->rights->cron->delete) - { + if ($user->rights->cron->delete) { print 'trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'), 'delete', '', false, 0, 0, '', 'marginleftonly')."   "; } else { print "trans('NotEnoughPermissions'))."\">".img_picto($langs->trans('NotEnoughPermissions'), 'delete', '', false, 0, 0, '', 'marginleftonly')."   "; } - if ($user->rights->cron->execute) - { + if ($user->rights->cron->execute) { if (!empty($obj->status)) { print 'global->CRON_KEY) ? '' : '&securitykey='.$conf->global->CRON_KEY); @@ -579,10 +654,11 @@ if ($num > 0) } else { print ''.img_picto($langs->trans('NotEnoughPermissions'), "playdisabled", '', false, 0, 0, '', 'marginleftonly').''; } - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '   '; } print '
    '; print ''; - foreach ($arrayofparameters as $title => $tab) - { + foreach ($arrayofparameters as $title => $tab) { print ''; - foreach ($tab as $key => $val) - { + foreach ($tab as $key => $val) { print ''; // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; print ''; - print '"; + print ''; + print '"; // Note Private - print ''; - print '"; - */ + print ''; + print '"; + */ // Statut /*print ''; print '\n"; print '';*/ - if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) - { + if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) { // Entrepot $entrepot = new Entrepot($db); $entrepot->fetch($object->entrepot_id); @@ -524,8 +516,7 @@ if ($action == 'create') // Create. Seems to no be used print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '.$langs->trans($title).'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print ''; @@ -144,11 +143,9 @@ if ($action == 'edit') print ''; print ''; - foreach ($arrayofparameters as $title => $tab) - { + foreach ($arrayofparameters as $title => $tab) { print ''; - foreach ($tab as $key => $val) - { + foreach ($tab as $key => $val) { print ''; diff --git a/htdocs/datapolicy/admin/setupmail.php b/htdocs/datapolicy/admin/setupmail.php index 7076608898e..c25d4c2263d 100644 --- a/htdocs/datapolicy/admin/setupmail.php +++ b/htdocs/datapolicy/admin/setupmail.php @@ -39,8 +39,9 @@ if (GETPOST('l')) { $l = $langs->defaultlang; } // Access control -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} /* * Actions @@ -62,8 +63,9 @@ if ($action == 'setvalue' && $user->admin) { $result = dolibarr_set_const($db, $sub, GETPOST($sub), 'chaine', 0, '', $conf->entity); $sub = "DATAPOLICIESREFUSE_".$l; $result = dolibarr_set_const($db, $sub, GETPOST($sub), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } if (!$error) { $db->commit(); setEventMessage($langs->trans("SetupSaved")); diff --git a/htdocs/datapolicy/class/actions_datapolicy.class.php b/htdocs/datapolicy/class/actions_datapolicy.class.php index d6c16a6be4e..cbcaceec743 100644 --- a/htdocs/datapolicy/class/actions_datapolicy.class.php +++ b/htdocs/datapolicy/class/actions_datapolicy.class.php @@ -117,7 +117,7 @@ class ActionsDatapolicy $object->state_id = ''; $object->skype = ''; $object->country_id = ''; - $object->note_private = $object->note_private.'
    '.$langs->trans('ANONYMISER_AT', dol_print_date(time())); + $object->note_private = $object->note_private.'
    '.$langs->trans('ANONYMISER_AT', dol_print_date(time())); if ($object->update($object->id, $user, 0)) { // On supprime les contacts associé @@ -332,8 +332,7 @@ class ActionsDatapolicy global $conf, $user, $langs; $langs->load('datapolicy@datapolicy'); - if (!empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) - { + if (!empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) { $dialog = '"; diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php index 6d7b71129f7..a7ed08d7e6f 100644 --- a/htdocs/datapolicy/class/datapolicy.class.php +++ b/htdocs/datapolicy/class/datapolicy.class.php @@ -194,8 +194,9 @@ class DataPolicy $actiontypecode = 'AC_EMAIL'; $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) + if ($sendtocc) { $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc); + } $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subject); $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":"); $actionmsg = dol_concatdesc($actionmsg, $message); diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index e1d8f7c36d4..28a713fb733 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -464,43 +464,36 @@ class DataPolicyCron $this->db->begin(); - foreach ($arrayofparameters as $key => $params) - { - if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) - { + foreach ($arrayofparameters as $key => $params) { + if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) { $sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key); $resql = $this->db->query($sql); - if ($resql && $this->db->num_rows($resql) > 0) - { + if ($resql && $this->db->num_rows($resql) > 0) { $num = $this->db->num_rows($resql); $i = 0; require_once $params['file']; $object = new $params['class']($this->db); - while ($i < $num && !$error) - { + while ($i < $num && !$error) { $obj = $this->db->fetch_object($resql); $object->fetch($obj->rowid); $object->id = $obj->rowid; - if ($object->isObjectUsed($obj->rowid) > 0) // If object to clean is used - { + if ($object->isObjectUsed($obj->rowid) > 0) { // If object to clean is used foreach ($params['fields_anonym'] as $fields => $val) { $object->$fields = $val; } $result = $object->update($obj->rowid, $user); - if ($result > 0) - { + if ($result > 0) { if ($params['class'] == 'Societe') { // We delete contacts of thirdparty $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = ".$obj->rowid; $result = $this->db->query($sql); - if ($result < 0) - { + if ($result < 0) { $errormsg = $this->db->lasterror(); $error++; } @@ -516,8 +509,7 @@ class DataPolicyCron } else { $result = $object->delete($user); } - if ($result < 0) - { + if ($result < 0) { $errormsg = $object->error; $error++; } @@ -533,8 +525,7 @@ class DataPolicyCron $this->db->commit(); - if (!$error) - { + if (!$error) { $this->output = $nbupdated.' record updated, '.$nbdeleted.' record deleted'; } else { $this->error = $errormsg; diff --git a/htdocs/datapolicy/class/index.html b/htdocs/datapolicy/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/datapolicy/index.html b/htdocs/datapolicy/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/datapolicy/langs/en_US/datapolicy.lang b/htdocs/datapolicy/langs/en_US/datapolicy.lang index ad5308ce8ce..368caffcbda 100644 --- a/htdocs/datapolicy/langs/en_US/datapolicy.lang +++ b/htdocs/datapolicy/langs/en_US/datapolicy.lang @@ -19,7 +19,7 @@ Module4100Name = Data Privacy Policy Module4100Desc = Module to manage Data Privacy (Conformity with the GDPR) # -# Page d'administration +# Administration page # datapolicySetup = Module Data Privacy Policy Setup Deletion = Deletion of data @@ -39,21 +39,21 @@ DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT = Nor prospect/Nor customer DATAPOLICY_CONTACT_FOURNISSEUR = Supplier DATAPOLICY_ADHERENT = Member DATAPOLICY_Tooltip_SETUP = Type of contact - Indicate your choices for each type. -DATAPOLICYMail=Emails Setup -DATAPOLICYSUBJECTMAIL=Subject of email -DATAPOLICYCONTENTMAIL=Content of the email -DATAPOLICYSUBSITUTION=You can use the following variables in your email (LINKACCEPT allows to create a link recording the agreement of the person, LINKREFUSED makes it possible to record the refusal of the person): -DATAPOLICYACCEPT=Message after agreement -DATAPOLICYREFUSE=Message after desagreement -SendAgreementText=You can send a GDPR email to all your relevant contacts (who have not yet received an email and for which you have not registered anything about their GDPR agreement). To do this, use the following button. -SendAgreement=Send emails +DATAPOLICYMail = Emails Setup +DATAPOLICYSUBJECTMAIL = Subject of email +DATAPOLICYCONTENTMAIL = Content of the email +DATAPOLICYSUBSITUTION = You can use the following variables in your email (LINKACCEPT allows to create a link recording the agreement of the person, LINKREFUSED makes it possible to record the refusal of the person): +DATAPOLICYACCEPT = Message after agreement +DATAPOLICYREFUSE = Message after desagreement +SendAgreementText = You can send a GDPR email to all your relevant contacts (who have not yet received an email and for which you have not registered anything about their GDPR agreement). To do this, use the following button. +SendAgreement = Send emails AllAgreementSend = All emails have been sent -TXTLINKDATAPOLICYACCEPT= Text for the link "agreement" -TXTLINKDATAPOLICYREFUSE= Text for the link "desagreement" +TXTLINKDATAPOLICYACCEPT = Text for the link "agreement" +TXTLINKDATAPOLICYREFUSE = Text for the link "desagreement" # -# Extrafield +# Extrafields # DATAPOLICY_BLOCKCHECKBOX = GDPR : Processing of personal data DATAPOLICY_consentement = Consent obtained for the processing of personal data @@ -67,26 +67,26 @@ DATAPOLICY_POPUP_ANONYME_TITLE = Anonymize a thirdparty DATAPOLICY_POPUP_ANONYME_TEXTE = You can not delete this contact from Dolibarr because there are related items. In accordance with the GDPR, you will make all this data anonymous to respect your obligations. Would you like to continue ? # -# Bouton portabilité +# Button for portability # DATAPOLICY_PORTABILITE = Portability GDPR DATAPOLICY_PORTABILITE_TITLE = Export of personal data DATAPOLICY_PORTABILITE_CONFIRMATION = You want to export the personal data of this contact. Are you sure ? # -# Note ajoutés lors d'une anonymisation +# Notes added during an anonymization # ANONYMISER_AT = Anonymised the %s -#V2 -DATAPOLICYReturn=GDPR Validation +# V2 +DATAPOLICYReturn = GDPR Validation DATAPOLICY_date = Date of agreement/desagreement GDPR DATAPOLICY_send = Date sending agreement email DATAPOLICYReturn = GDPR Return DATAPOLICY_SEND = Send GDPR email MailSent = Email has been sent -#ERROR -ErrorSubjectIsRequired= Error : The subject of email is required. Indicate it in the module setup +# ERROR +ErrorSubjectIsRequired = Error : The subject of email is required. Indicate it in the module setup =Due to a technical problem, we were unable to register your choice. We apologize for that. Contact us to send us your choice. NUMBER_MONTH_BEFORE_DELETION = Number of month before deletion diff --git a/htdocs/datapolicy/lib/index.html b/htdocs/datapolicy/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/datapolicy/mailing.php b/htdocs/datapolicy/mailing.php index 40597cc3e70..7e2dccaf7d4 100644 --- a/htdocs/datapolicy/mailing.php +++ b/htdocs/datapolicy/mailing.php @@ -29,13 +29,13 @@ require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php'; $idcontact = GETPOST('idc'); if (!empty($idcontact)) { - $contact = new Contact($db); - $contact->fetch($idcontact); - DataPolicy::sendMailDataPolicyContact($contact); + $contact = new Contact($db); + $contact->fetch($idcontact); + DataPolicy::sendMailDataPolicyContact($contact); } else { - $contacts = new DataPolicy($db); - $contacts->getAllContactNotInformed(); - $contacts->getAllCompaniesNotInformed(); - $contacts->getAllAdherentsNotInformed(); - echo $langs->trans('AllAgreementSend'); + $contacts = new DataPolicy($db); + $contacts->getAllContactNotInformed(); + $contacts->getAllCompaniesNotInformed(); + $contacts->getAllAdherentsNotInformed(); + echo $langs->trans('AllAgreementSend'); } diff --git a/htdocs/datapolicy/public/index.php b/htdocs/datapolicy/public/index.php index 0930d7d07d7..104b393bf7e 100644 --- a/htdocs/datapolicy/public/index.php +++ b/htdocs/datapolicy/public/index.php @@ -22,12 +22,15 @@ * \brief datapolicy setup page. */ -if (!defined('NOLOGIN')) +if (!defined('NOLOGIN')) { define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) +} +if (!defined('NOCSRFCHECK')) { define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -if (!defined('NOREQUIREMENU')) +} +if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; diff --git a/htdocs/dav/dav.class.php b/htdocs/dav/dav.class.php index 3a73f61c70c..6ff9e58b73a 100644 --- a/htdocs/dav/dav.class.php +++ b/htdocs/dav/dav.class.php @@ -82,8 +82,7 @@ class CdavLib LEFT OUTER JOIN '.MAIN_DB_PREFIX.'user AS u ON (u.rowid=fk_element) WHERE ar.element_type=\'user\' AND fk_actioncomm=a.id) AS other_users FROM '.MAIN_DB_PREFIX.'actioncomm AS a'; - if (!$this->user->rights->societe->client->voir)//FIXME si 'voir' on voit plus de chose ? - { + if (!$this->user->rights->societe->client->voir) {//FIXME si 'voir' on voit plus de chose ? $sql .= ' LEFT OUTER JOIN '.MAIN_DB_PREFIX.'societe_commerciaux AS sc ON (a.fk_soc = sc.fk_soc AND sc.fk_user='.$this->user->id.') LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON (s.rowid = sc.fk_soc) LEFT JOIN '.MAIN_DB_PREFIX.'socpeople AS sp ON (sp.fk_soc = sc.fk_soc AND sp.rowid = a.fk_contact) @@ -100,8 +99,7 @@ class CdavLib AND a.code IN (SELECT cac.code FROM '.MAIN_DB_PREFIX.'c_actioncomm cac WHERE cac.type<>\'systemauto\') AND a.entity IN ('.getEntity('societe', 1).')'; if ($oid !== false) { - if ($ouri === false) - { + if ($ouri === false) { $sql .= ' AND a.id = '.intval($oid); } else { $sql .= ' AND (a.id = '.intval($oid).' OR ac.uuidext = \''.$this->db->escape($ouri).'\')'; @@ -130,8 +128,7 @@ class CdavLib $location = $obj->location; // contact address - if (empty($location) && !empty($obj->address)) - { + if (empty($location) && !empty($obj->address)) { $location = trim(str_replace(array("\r", "\t", "\n"), ' ', $obj->address)); $location = trim($location.', '.$obj->zip); $location = trim($location.' '.$obj->town); @@ -139,8 +136,7 @@ class CdavLib } // contact address - if (empty($location) && !empty($obj->soc_address)) - { + if (empty($location) && !empty($obj->soc_address)) { $location = trim(str_replace(array("\r", "\t", "\n"), ' ', $obj->soc_address)); $location = trim($location.', '.$obj->soc_zip); $location = trim($location.' '.$obj->soc_town); @@ -148,16 +144,17 @@ class CdavLib } $address = explode("\n", $obj->address, 2); - foreach ($address as $kAddr => $vAddr) - { + foreach ($address as $kAddr => $vAddr) { $address[$kAddr] = trim(str_replace(array("\r", "\t"), ' ', str_replace("\n", ' | ', trim($vAddr)))); } $address[] = ''; $address[] = ''; - if ($obj->percent == -1 && trim($obj->datep) != '') + if ($obj->percent == -1 && trim($obj->datep) != '') { $type = 'VEVENT'; - else $type = 'VTODO'; + } else { + $type = 'VTODO'; + } $timezone = date_default_timezone_get(); @@ -169,60 +166,72 @@ class CdavLib $caldata .= "CREATED:".gmdate('Ymd\THis', strtotime($obj->datec))."Z\n"; $caldata .= "LAST-MODIFIED:".gmdate('Ymd\THis', strtotime($obj->lastupd))."Z\n"; $caldata .= "DTSTAMP:".gmdate('Ymd\THis', strtotime($obj->lastupd))."Z\n"; - if ($obj->sourceuid == '') + if ($obj->sourceuid == '') { $caldata .= "UID:".$obj->id.'-ev-'.$calid.'-cal-'.constant('CDAV_URI_KEY')."\n"; - else $caldata .= "UID:".$obj->sourceuid."\n"; + } else { + $caldata .= "UID:".$obj->sourceuid."\n"; + } $caldata .= "SUMMARY:".$obj->label."\n"; $caldata .= "LOCATION:".$location."\n"; $caldata .= "PRIORITY:".$obj->priority."\n"; - if ($obj->fulldayevent) - { + if ($obj->fulldayevent) { $caldata .= "DTSTART;VALUE=DATE:".date('Ymd', strtotime($obj->datep))."\n"; - if ($type == 'VEVENT') - { - if (trim($obj->datep2) != '') + if ($type == 'VEVENT') { + if (trim($obj->datep2) != '') { $caldata .= "DTEND;VALUE=DATE:".date('Ymd', strtotime($obj->datep2) + 1)."\n"; - else $caldata .= "DTEND;VALUE=DATE:".date('Ymd', strtotime($obj->datep) + (25 * 3600))."\n"; - } elseif (trim($obj->datep2) != '') + } else { + $caldata .= "DTEND;VALUE=DATE:".date('Ymd', strtotime($obj->datep) + (25 * 3600))."\n"; + } + } elseif (trim($obj->datep2) != '') { $caldata .= "DUE;VALUE=DATE:".date('Ymd', strtotime($obj->datep2) + 1)."\n"; + } } else { $caldata .= "DTSTART;TZID=".$timezone.":".strtr($obj->datep, array(" "=>"T", ":"=>"", "-"=>""))."\n"; - if ($type == 'VEVENT') - { - if (trim($obj->datep2) != '') + if ($type == 'VEVENT') { + if (trim($obj->datep2) != '') { $caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep2, array(" "=>"T", ":"=>"", "-"=>""))."\n"; - else $caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep, array(" "=>"T", ":"=>"", "-"=>""))."\n"; - } elseif (trim($obj->datep2) != '') + } else { + $caldata .= "DTEND;TZID=".$timezone.":".strtr($obj->datep, array(" "=>"T", ":"=>"", "-"=>""))."\n"; + } + } elseif (trim($obj->datep2) != '') { $caldata .= "DUE;TZID=".$timezone.":".strtr($obj->datep2, array(" "=>"T", ":"=>"", "-"=>""))."\n"; + } } $caldata .= "CLASS:PUBLIC\n"; - if ($obj->transparency == 1) + if ($obj->transparency == 1) { $caldata .= "TRANSP:TRANSPARENT\n"; - else $caldata .= "TRANSP:OPAQUE\n"; + } else { + $caldata .= "TRANSP:OPAQUE\n"; + } - if ($type == 'VEVENT') + if ($type == 'VEVENT') { $caldata .= "STATUS:CONFIRMED\n"; - elseif ($obj->percent == 0) + } elseif ($obj->percent == 0) { $caldata .= "STATUS:NEEDS-ACTION\n"; - elseif ($obj->percent == 100) + } elseif ($obj->percent == 100) { $caldata .= "STATUS:COMPLETED\n"; - else { + } else { $caldata .= "STATUS:IN-PROCESS\n"; $caldata .= "PERCENT-COMPLETE:".$obj->percent."\n"; } $caldata .= "DESCRIPTION:"; $caldata .= strtr($obj->note, array("\n"=>"\\n", "\r"=>"")); - if (!empty($obj->soc_nom)) + if (!empty($obj->soc_nom)) { $caldata .= "\\n*DOLIBARR-SOC: ".$obj->soc_nom; - if (!empty($obj->soc_phone)) + } + if (!empty($obj->soc_phone)) { $caldata .= "\\n*DOLIBARR-SOC-TEL: ".$obj->soc_phone; - if (!empty($obj->firstname) || !empty($obj->lastname)) + } + if (!empty($obj->firstname) || !empty($obj->lastname)) { $caldata .= "\\n*DOLIBARR-CTC: ".trim($obj->firstname.' '.$obj->lastname); - if (!empty($obj->phone) || !empty($obj->phone_perso) || !empty($obj->phone_mobile)) + } + if (!empty($obj->phone) || !empty($obj->phone_perso) || !empty($obj->phone_mobile)) { $caldata .= "\\n*DOLIBARR-CTC-TEL: ".trim($obj->phone.' '.$obj->phone_perso.' '.$obj->phone_mobile); - if (strpos($obj->other_users, ',')) // several + } + if (strpos($obj->other_users, ',')) { // several $caldata .= "\\n*DOLIBARR-USR: ".$obj->other_users; + } $caldata .= "\n"; $caldata .= "END:".$type."\n"; @@ -243,24 +252,23 @@ class CdavLib $calid = ($calendarId * 1); $calevents = array(); - if (!$this->user->rights->agenda->myactions->read) + if (!$this->user->rights->agenda->myactions->read) { return $calevents; + } - if ($calid != $this->user->id && (!isset($this->user->rights->agenda->allactions->read) || !$this->user->rights->agenda->allactions->read)) + if ($calid != $this->user->id && (!isset($this->user->rights->agenda->allactions->read) || !$this->user->rights->agenda->allactions->read)) { return $calevents; + } $sql = $this->getSqlCalEvents($calid); $result = $this->db->query($sql); - if ($result) - { - while ($obj = $this->db->fetch_object($result)) - { + if ($result) { + while ($obj = $this->db->fetch_object($result)) { $calendardata = $this->toVCalendar($calid, $obj); - if ($bCalendarData) - { + if ($bCalendarData) { $calevents[] = array( 'calendardata' => $calendardata, 'uri' => $obj->id.'-ev-'.constant('CDAV_URI_KEY'), diff --git a/htdocs/dav/dav.lib.php b/htdocs/dav/dav.lib.php index bb4835c4d52..2861b8744bf 100644 --- a/htdocs/dav/dav.lib.php +++ b/htdocs/dav/dav.lib.php @@ -22,19 +22,21 @@ */ // define CDAV_CONTACT_TAG if not -if (!defined('CDAV_CONTACT_TAG')) -{ - if (isset($conf->global->CDAV_CONTACT_TAG)) +if (!defined('CDAV_CONTACT_TAG')) { + if (isset($conf->global->CDAV_CONTACT_TAG)) { define('CDAV_CONTACT_TAG', $conf->global->CDAV_CONTACT_TAG); - else define('CDAV_CONTACT_TAG', ''); + } else { + define('CDAV_CONTACT_TAG', ''); + } } // define CDAV_URI_KEY if not -if (!defined('CDAV_URI_KEY')) -{ - if (isset($conf->global->CDAV_URI_KEY)) +if (!defined('CDAV_URI_KEY')) { + if (isset($conf->global->CDAV_URI_KEY)) { define('CDAV_URI_KEY', $conf->global->CDAV_URI_KEY); - else define('CDAV_URI_KEY', substr(md5($_SERVER['HTTP_HOST']), 0, 8)); + } else { + define('CDAV_URI_KEY', substr(md5($_SERVER['HTTP_HOST']), 0, 8)); + } } diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index bd6df769553..c77d4d02226 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -25,12 +25,24 @@ * \brief Server DAV */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} require "../main.inc.php"; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -41,8 +53,7 @@ require_once DOL_DOCUMENT_ROOT.'/includes/sabre/autoload.php'; $user = new User($db); -if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '') -{ +if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '') { $user->fetch('', $_SERVER['PHP_AUTH_USER']); $user->getrights(); } @@ -51,17 +62,16 @@ if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] != '') $langs->loadLangs(array("main", "other")); -if (empty($conf->dav->enabled)) +if (empty($conf->dav->enabled)) { accessforbidden(); +} // Restrict API to some IPs -if (!empty($conf->global->DAV_RESTRICT_ON_IP)) -{ +if (!empty($conf->global->DAV_RESTRICT_ON_IP)) { $allowedip = explode(' ', $conf->global->DAV_RESTRICT_ON_IP); $ipremote = getUserRemoteIP(); - if (!in_array($ipremote, $allowedip)) - { + if (!in_array($ipremote, $allowedip)) { dol_syslog('Remote ip is '.$ipremote.', not into list '.$conf->global->DAV_RESTRICT_ON_IP); print 'DAV not allowed from the IP '.$ipremote; header('HTTP/1.1 503 DAV not allowed from your IP '.$ipremote); @@ -87,31 +97,30 @@ $authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $p global $conf; global $dolibarr_main_authentication, $dolibarr_auto_user; - if (empty($user->login)) - { + if (empty($user->login)) { dol_syslog("Failed to authenticate to DAV, login is not provided", LOG_WARNING); return false; } - if ($user->socid > 0) - { + if ($user->socid > 0) { dol_syslog("Failed to authenticate to DAV, use is an external user", LOG_WARNING); return false; } - if ($user->login != $username) - { + if ($user->login != $username) { dol_syslog("Failed to authenticate to DAV, login does not match the login of loaded user", LOG_WARNING); return false; } // Authentication mode - if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'dolibarr'; + if (empty($dolibarr_main_authentication)) { + $dolibarr_main_authentication = 'dolibarr'; + } // Authentication mode: forceuser - if ($dolibarr_main_authentication == 'forceuser') - { - if (empty($dolibarr_auto_user)) $dolibarr_auto_user = 'auto'; - if ($dolibarr_auto_user != $username) - { + if ($dolibarr_main_authentication == 'forceuser') { + if (empty($dolibarr_auto_user)) { + $dolibarr_auto_user = 'auto'; + } + if ($dolibarr_auto_user != $username) { dol_syslog("Warning: your instance is set to use the automatic forced login '".$dolibarr_auto_user."' that is not the requested login. DAV usage is forbidden in this mode."); return false; } @@ -120,8 +129,9 @@ $authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $p $authmode = explode(',', $dolibarr_main_authentication); $entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : (!empty($conf->entity) ? $conf->entity : 1)); - if (checkLoginPassEntity($username, $password, $entity, $authmode, 'dav') != $username) + if (checkLoginPassEntity($username, $password, $entity, $authmode, 'dav') != $username) { return false; + } return true; }); @@ -142,15 +152,13 @@ $nodes = array(); // Enable directories and features according to DAV setup // Public dir -if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) -{ +if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { $nodes[] = new \Sabre\DAV\FS\Directory($publicDir); } // Private dir $nodes[] = new \Sabre\DAV\FS\Directory($privateDir); // ECM dir -if (!empty($conf->ecm->enabled) && !empty($conf->global->DAV_ALLOW_ECM_DIR)) -{ +if (!empty($conf->ecm->enabled) && !empty($conf->global->DAV_ALLOW_ECM_DIR)) { $nodes[] = new \Sabre\DAV\FS\Directory($ecmDir); } @@ -175,14 +183,15 @@ $server = new \Sabre\DAV\Server($nodes); // If you want to run the SabreDAV server in a custom location (using mod_rewrite for instance) // You can override the baseUri here. $baseUri = DOL_URL_ROOT.'/dav/fileserver.php/'; -if (isset($baseUri)) $server->setBaseUri($baseUri); +if (isset($baseUri)) { + $server->setBaseUri($baseUri); +} // Add authentication function if ((empty($conf->global->DAV_ALLOW_PUBLIC_DIR) || !preg_match('/'.preg_quote(DOL_URL_ROOT.'/dav/fileserver.php/public', '/').'/', $_SERVER["PHP_SELF"])) && !preg_match('/^sabreAction=asset&assetName=[a-zA-Z0-9%\-\/]+\.(png|css|woff|ico|ttf)$/', $_SERVER["QUERY_STRING"]) // URL for Sabre browser resources - ) -{ + ) { //var_dump($_SERVER["QUERY_STRING"]);exit; $server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend)); } @@ -192,8 +201,7 @@ $lockPlugin = new \Sabre\DAV\Locks\Plugin($lockBackend); $server->addPlugin($lockPlugin); // Support for html frontend -if (empty($conf->global->DAV_DISABLE_BROWSER)) -{ +if (empty($conf->global->DAV_DISABLE_BROWSER)) { $browser = new \Sabre\DAV\Browser\Plugin(); $server->addPlugin($browser); } @@ -213,4 +221,6 @@ $server->addPlugin($tempFF); // And off we go! $server->exec(); -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/dav/index.html b/htdocs/dav/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/dav/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/debugbar/class/DataCollector/DolLogsCollector.php b/htdocs/debugbar/class/DataCollector/DolLogsCollector.php index 626b4ec2613..520a0a20a72 100644 --- a/htdocs/debugbar/class/DataCollector/DolLogsCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolLogsCollector.php @@ -2,6 +2,7 @@ use DebugBar\DataCollector\MessagesCollector; use Psr\Log\LogLevel; + //use ReflectionClass; /** @@ -74,15 +75,13 @@ class DolLogsCollector extends MessagesCollector $uselogfile = $conf->global->DEBUGBAR_USE_LOGFILE; - if ($uselogfile) - { + if ($uselogfile) { $this->getStorageLogs($this->path); } else { $log_levels = $this->getLevels(); foreach ($conf->logbuffer as $line) { - if ($this->nboflines >= $this->maxnboflines) - { + if ($this->nboflines >= $this->maxnboflines) { break; } foreach ($log_levels as $level_key => $level) { diff --git a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php index 5f3e43a0d60..938643802d5 100644 --- a/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php @@ -22,11 +22,11 @@ class DolRequestDataCollector extends RequestDataCollector if (isset($GLOBALS[$var])) { $arrayofvalues = $GLOBALS[$var]; - if ($var == '_COOKIE') - { - foreach ($arrayofvalues as $key => $val) - { - if (preg_match('/^DOLSESSID_/', $key)) $arrayofvalues[$key] = '*****hidden*****'; + if ($var == '_COOKIE') { + foreach ($arrayofvalues as $key => $val) { + if (preg_match('/^DOLSESSID_/', $key)) { + $arrayofvalues[$key] = '*****hidden*****'; + } } //var_dump($arrayofvalues); } diff --git a/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php b/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php index ae69b16eba7..ed5e979d539 100644 --- a/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php +++ b/htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php @@ -2,7 +2,6 @@ use \DebugBar\DataCollector\TimeDataCollector; - /** * DolTimeDataCollector class */ diff --git a/htdocs/debugbar/class/DebugBar.php b/htdocs/debugbar/class/DebugBar.php index e3f2ac159f7..15bb2360ed8 100644 --- a/htdocs/debugbar/class/DebugBar.php +++ b/htdocs/debugbar/class/DebugBar.php @@ -4,6 +4,7 @@ dol_include_once('/debugbar/class/autoloader.php'); use \DebugBar\DebugBar; use \DebugBar\DataCollector\PhpInfoCollector; + dol_include_once('/debugbar/class/DataCollector/DolMessagesCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolRequestDataCollector.php'); dol_include_once('/debugbar/class/DataCollector/DolConfigCollector.php'); diff --git a/htdocs/debugbar/index.html b/htdocs/debugbar/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index 8b0b53bd37d..69fd5a9bec0 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -34,12 +34,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) +if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->expedition_bon->enabled)) +} +if (!empty($conf->expedition_bon->enabled)) { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; -if (!empty($conf->stock->enabled)) +} +if (!empty($conf->stock->enabled)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; +} if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -48,7 +51,9 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array("sendings", "bills", 'deliveries', 'orders')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); @@ -56,7 +61,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Security check $id = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expedition', $id, 'delivery', 'delivery'); $object = new Delivery($db); @@ -84,8 +91,7 @@ $error = 0; $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks -if ($action == 'add') -{ +if ($action == 'add') { $db->begin(); $object->date_delivery = dol_now(); @@ -103,13 +109,11 @@ if ($action == 'add') $commande->fetch($object->commande_id); $commande->fetch_lines(); $num = count($commande->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $qty = "qtyl".$i; $idl = "idl".$i; $qtytouse = price2num(GETPOST($qty)); - if ($qtytouse > 0) - { + if ($qtytouse > 0) { $object->addline(GETPOST($idl), price2num($qtytouse)); } } @@ -128,17 +132,19 @@ if ($action == 'add') } elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) -) -{ +) { $result = $object->valid($user); // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -147,74 +153,70 @@ if ($action == 'add') $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } } -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->delivery->supprimer) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->delivery->supprimer) { $db->begin(); $result = $object->delete(); - if ($result > 0) - { + if ($result > 0) { $db->commit(); - if (!empty($backtopage)) header("Location: ".$backtopage); - else header("Location: ".DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'); + if (!empty($backtopage)) { + header("Location: ".$backtopage); + } else { + header("Location: ".DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'); + } exit; } else { $db->rollback(); } } -if ($action == 'setdate_delivery' && $user->rights->expedition->delivery->creer) -{ +if ($action == 'setdate_delivery' && $user->rights->expedition->delivery->creer) { $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $result = $object->setDeliveryDate($user, $datedelivery); - if ($result < 0) - { + if ($result < 0) { $mesg = '
    '.$object->error.'
    '; } -} - -// Set incoterm -elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) -{ +} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + // Set incoterm $result = $object->setIncoterms((int) GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } // Update extrafields -if ($action == 'update_extras') -{ +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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('DELIVERY_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } // Extrafields line -if ($action == 'update_extras_line') -{ +if ($action == 'update_extras_line') { $array_options = array(); $num = count($object->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); $array_options[$i] = $extrafields->getOptionalsFromPost($extralabelsline, $i); @@ -227,8 +229,7 @@ if ($action == 'update_extras_line') } $ret = $object->update_line($object->lines[$i]->id, $array_options[$i]); // extrafields update - if ($ret < 0) - { + if ($ret < 0) { $mesg = '
    '.$object->error.'
    '; $error++; } @@ -253,24 +254,20 @@ llxHeader('', $langs->trans('Delivery'), 'Livraison'); $form = new Form($db); $formfile = new FormFile($db); -if ($action == 'create') // Create. Seems to no be used -{ +if ($action == 'create') { // Create. Seems to no be used } else // View { - if ($object->id > 0) - { + if ($object->id > 0) { // Origin of a 'livraison' (delivery receipt) is ALWAYS 'expedition' (shipment). // However, origin of shipment in future may differs (commande, proposal, ...) $expedition = new Expedition($db); $result = $expedition->fetch($object->origin_id); $typeobject = $expedition->origin; // example: commande - if ($object->origin_id > 0) - { + if ($object->origin_id > 0) { $object->fetch_origin(); } - if ($object->id > 0) - { + if ($object->id > 0) { $soc = new Societe($db); $soc->fetch($object->socid); @@ -289,8 +286,7 @@ if ($action == 'create') // Create. Seems to no be used * Confirmation de la suppression * */ - if ($action == 'delete') - { + if ($action == 'delete') { $expedition_id = GETPOST("expid"); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&expid='.$expedition_id.'&backtopage='.urlencode($backtopage), $langs->trans("DeleteDeliveryReceipt"), $langs->trans("DeleteDeliveryReceiptConfirm", $object->ref), 'confirm_delete', '', '', 1); } @@ -298,8 +294,7 @@ if ($action == 'create') // Create. Seems to no be used /* * Confirmation de la validation */ - if ($action == 'valid') - { + if ($action == 'valid') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidateDeliveryReceipt"), $langs->trans("ValidateDeliveryReceiptConfirm", $object->ref), 'confirm_valid', '', '', 1); } @@ -308,13 +303,11 @@ if ($action == 'create') // Create. Seems to no be used * Delivery */ - if ($typeobject == 'commande' && $expedition->origin_id > 0 && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $expedition->origin_id > 0 && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($expedition->origin_id); } - if ($typeobject == 'propal' && $expedition->origin_id > 0 && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $expedition->origin_id > 0 && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($expedition->origin_id); } @@ -390,19 +383,18 @@ if ($action == 'create') // Create. Seems to no be used // Ref print ''; - print ''; + print ''; // Client print ''; print ''; print ""; - */ + */ // Document origine - if ($typeobject == 'commande' && $expedition->origin_id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $expedition->origin_id && !empty($conf->commande->enabled)) { print ''; $order = new Commande($db); $order->fetch($expedition->origin_id); @@ -411,8 +403,7 @@ if ($action == 'create') // Create. Seems to no be used print "\n"; print ''; } - if ($typeobject == 'propal' && $expedition->origin_id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $expedition->origin_id && !empty($conf->propal->enabled)) { $propal = new Propal($db); $propal->fetch($expedition->origin_id); print ''; @@ -433,11 +424,12 @@ if ($action == 'create') // Create. Seems to no be used print $langs->trans('DateReceived'); print ''; - if ($action != 'editdate_delivery') print ''; + if ($action != 'editdate_delivery') { + print ''; + } print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '.$langs->trans($title).'
    '; print $form->textwithpicto($langs->trans($key), $langs->trans('DATAPOLICY_Tooltip_SETUP')); print ''.($conf->global->$key == '' ? $langs->trans('None') : $valTab[$conf->global->$key]).'
    '.$langs->trans("Ref").''; - print $object->ref; - print '
    '; + print $object->ref; + print '
    '.$langs->trans("Customer").''.$soc->getNomUrl(1).'
    '.$langs->trans("RefOrder").'
    '.$langs->trans("RefProposal").'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
    '; print '
    '; - if ($action == 'editdate_delivery') - { + if ($action == 'editdate_delivery') { print ''; print ''; print ''; @@ -451,19 +443,20 @@ if ($action == 'create') // Create. Seems to no be used print '
    '; print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->expedition->delivery->creer) print ''.img_edit().''; - else print ' '; + if ($user->rights->expedition->delivery->creer) { + print ''.img_edit().''; + } else { + print ' '; + } print '
    '; print '
    '; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -473,25 +466,24 @@ if ($action == 'create') // Create. Seems to no be used /* A delivery note should be just more properties of a shipment, so notes are on shipment // Note Public - print '
    '.$langs->trans("NotePublic").''; - print nl2br($object->note_public); - print "
    '.$langs->trans("NotePublic").''; + print nl2br($object->note_public); + print "
    '.$langs->trans("NotePrivate").''; - print nl2br($object->note_private); - print "
    '.$langs->trans("NotePrivate").''; + print nl2br($object->note_private); + print "
    '.$langs->trans("Status").''.$object->getLibStatut(4)."
    '; - if ($num_prod) - { + if ($num_prod) { $i = 0; print ''; @@ -534,29 +525,30 @@ if ($action == 'create') // Create. Seems to no be used print ''; print "\n"; } - while ($i < $num_prod) - { + while ($i < $num_prod) { $parameters = array('i' => $i, 'line' => $object->lines[$i], 'num' => $num_prod); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { print ''; - if ($object->lines[$i]->fk_product > 0) - { + if ($object->lines[$i]->fk_product > 0) { $product = new Product($db); $product->fetch($object->lines[$i]->fk_product); // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && !empty($_REQUEST['lang_id'])) $newlang = $_REQUEST['lang_id']; - if (empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && !empty($_REQUEST['lang_id'])) { + $newlang = $_REQUEST['lang_id']; + } + if (empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -570,22 +562,27 @@ if ($action == 'create') // Create. Seems to no be used // Affiche ligne produit $text = ''; - if ($object->lines[$i]->fk_product_type == 1) $text .= img_object($langs->trans('ShowService'), 'service'); - else $text .= img_object($langs->trans('ShowProduct'), 'product'); + if ($object->lines[$i]->fk_product_type == 1) { + $text .= img_object($langs->trans('ShowService'), 'service'); + } else { + $text .= img_object($langs->trans('ShowProduct'), 'product'); + } $text .= ' '.$object->lines[$i]->product_ref.''; $text .= ' - '.$label; $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($object->lines[$i]->description)); //print $description; print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label) ? '
    '.dol_htmlentitiesbr($object->lines[$i]->description) : ''; } } else { print "
    '; - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; @@ -225,8 +249,7 @@ if ($resql) } print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder); } @@ -235,8 +258,7 @@ if ($resql) print_liste_field_titre(''); print "\n"; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); print ''; @@ -258,21 +280,21 @@ if ($resql) } print ""; print ''; - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print "\n"; } - print ''; + print ''; print ''; print ''; print ""; diff --git a/htdocs/don/note.php b/htdocs/don/note.php index d1bbd0642d9..2e153d73b95 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -29,8 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -45,7 +44,9 @@ $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); // Security check $socid = 0; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'don', $id, ''); $object = new Don($db); @@ -59,8 +60,7 @@ $permissionnote = $user->rights->don->creer; // Used by the include of actions_s */ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once -if ($action == 'classin' && $user->rights->don->creer) -{ +if ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); } @@ -70,14 +70,17 @@ if ($action == 'classin' && $user->rights->don->creer) */ $title = $langs->trans('Donation')." - ".$langs->trans('Notes'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; + +llxHeader('', $title, $help_url); $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new Don($db); $object->fetch($id, $ref); @@ -89,12 +92,10 @@ if ($id > 0 || !empty($ref)) $morehtmlref = '
    '; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->don->creer) - { + if ($user->rights->don->creer) { if ($action != 'classify') { // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index e827bca338d..40cf0298895 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -27,7 +27,9 @@ require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; -if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +if (!empty($conf->banque->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +} // Load translation files required by the page $langs->loadLangs(array("bills", "banks", "companies", "donations")); @@ -36,15 +38,18 @@ $langs->loadLangs(array("bills", "banks", "companies", "donations")); $id = GETPOST('rowid') ? GETPOST('rowid', 'int') : GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // TODO Add rule to restrict access payment //$result = restrictedArea($user, 'facture', $id,''); $object = new PaymentDonation($db); -if ($id > 0) -{ +if ($id > 0) { $result = $object->fetch($id); - if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); + if (!$result) { + dol_print_error($db, 'Failed to get payment id '.$id); + } } @@ -53,13 +58,11 @@ if ($id > 0) */ // Delete payment -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->don->supprimer) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->don->supprimer) { $db->begin(); $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { $db->commit(); header("Location: ".DOL_URL_ROOT."/don/index.php"); exit; @@ -93,8 +96,7 @@ print dol_get_fiche_head($head, $hselected, $langs->trans("DonationPayment"), -1 /* * Confirm deleting of the payment */ -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2); } @@ -122,10 +124,8 @@ print '
    '; // Bank account -if (!empty($conf->banque->enabled)) -{ - if ($object->bank_account) - { +if (!empty($conf->banque->enabled)) { + if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); @@ -150,12 +150,11 @@ $sql = 'SELECT d.rowid as did, d.paid, d.amount as d_amount, pd.amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'payment_donation as pd,'.MAIN_DB_PREFIX.'don as d'; $sql .= ' WHERE pd.fk_donation = d.rowid'; $sql .= ' AND d.entity = '.$conf->entity; -$sql .= ' AND pd.rowid = '.$id; +$sql .= ' AND pd.rowid = '.((int) $id); dol_syslog("don/payment/card.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -168,10 +167,8 @@ if ($resql) print ''; print "\n"; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); print ''; @@ -213,12 +210,9 @@ print dol_get_fiche_end(); */ print '
    '; -if (empty($action)) -{ - if ($user->rights->don->supprimer) - { - if (!$disable_delete) - { +if (empty($action)) { + if ($user->rights->don->supprimer) { + if (!$disable_delete) { print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; diff --git a/htdocs/don/payment/index.html b/htdocs/don/payment/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 9f944fe65b3..cf6328d15c4 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -29,9 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("bills"); -$chid = GETPOST("rowid"); +$chid = GETPOST("rowid", 'int'); $action = GETPOST('action', 'aZ09'); $amounts = array(); +$cancel = GETPOST('cancel'); // Security check $socid = 0; @@ -46,58 +47,48 @@ $object = new Don($db); * Actions */ -if ($action == 'add_payment') -{ +if ($action == 'add_payment') { $error = 0; - if ($_POST["cancel"]) - { + if ($cancel) { $loc = DOL_URL_ROOT.'/don/card.php?rowid='.$chid; header("Location: ".$loc); exit; } - $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); - if (!$_POST["paymenttype"] > 0) - { + if (!(GETPOST("paymenttype") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; } - if ($datepaid == '') - { + if ($datepaid == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !$_POST["accountid"] > 0) - { + if (!empty($conf->banque->enabled) && !(GETPOST("accountid", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $paymentid = 0; // Read possible payments - foreach ($_POST as $key => $value) - { - if (substr($key, 0, 7) == 'amount_') - { + foreach ($_POST as $key => $value) { + if (substr($key, 0, 7) == 'amount_') { $other_chid = substr($key, 7); $amounts[$other_chid] = price2num($_POST[$key]); } } - if (count($amounts) <= 0) - { + if (count($amounts) <= 0) { $error++; $errmsg = 'ErrorNoPaymentDefined'; setEventMessages($errmsg, null, 'errors'); } - if (!$error) - { + if (!$error) { $db->begin(); // Create a line of payments @@ -109,30 +100,25 @@ if ($action == 'add_payment') $payment->num_payment = GETPOST("num_payment", 'alphanohtml'); $payment->note_public = GETPOST("note_public", 'restricthtml'); - if (!$error) - { + if (!$error) { $paymentid = $payment->create($user); - if ($paymentid < 0) - { + if ($paymentid < 0) { $errmsg = $payment->error; setEventMessages($errmsg, null, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $result = $payment->addPaymentToBank($user, 'payment_donation', '(DonationPayment)', $_POST['accountid'], '', ''); - if (!$result > 0) - { + if (!$result > 0) { $errmsg = $payment->error; setEventMessages($errmsg, null, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $db->commit(); $loc = DOL_URL_ROOT.'/don/card.php?rowid='.$chid; header('Location: '.$loc); @@ -158,10 +144,9 @@ llxHeader(); $sql = "SELECT sum(p.amount) as total"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_donation as p"; -$sql .= " WHERE p.fk_donation = ".$chid; +$sql .= " WHERE p.fk_donation = ".((int) $chid); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $obj = $db->fetch_object($resql); $sumpaid = $obj->total; $db->free(); @@ -169,16 +154,14 @@ if ($resql) // Form to create donation payment -if ($action == 'create') -{ +if ($action == 'create') { $object->fetch($chid); $total = $object->amount; print load_fiche_titre($langs->trans("DoPayment")); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n".''."\n"; llxHeader($moreheadcss.$moreheadjs, $langs->trans("ECMArea"), '', '', '', '', $morejs, '', 0, 0); $head = ecm_prepare_dasboard_head(''); -print dol_get_fiche_head($head, 'index', $langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"), -1, ''); +print dol_get_fiche_head($head, 'index', '', -1, ''); // Add filemanager component diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 452f06efb0a..bcfff8aa2da 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; $langs->loadLangs(array("ecm", "companies", "other", "users", "orders", "propal", "bills", "contracts")); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ecm', 0); // Get parameters @@ -42,7 +44,9 @@ $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'aZ09'); $section = GETPOST('section', 'int') ?GETPOST('section', 'int') : GETPOST('section_id', 'int'); $module = GETPOST('module', 'alpha'); -if (!$section) $section = 0; +if (!$section) { + $section = 0; +} $section_dir = GETPOST('section_dir', 'alpha'); $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); @@ -51,20 +55,26 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "fullname"; -if ($module == 'invoice_supplier' && $sortfield == "fullname") $sortfield = "level1name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "fullname"; +} +if ($module == 'invoice_supplier' && $sortfield == "fullname") { + $sortfield = "level1name"; +} $ecmdir = new EcmDirectory($db); -if ($section) -{ +if ($section) { $result = $ecmdir->fetch($section); - if (!$result > 0) - { + if (!$result > 0) { dol_print_error($db, $ecmdir->error); exit; } @@ -81,9 +91,11 @@ $error = 0; * Actions */ +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ecmautocard', 'globalcard')); + // 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 -{ +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_doc_ref = ''; } @@ -91,15 +103,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' // Add directory -if ($action == 'add' && $user->rights->ecm->setup) -{ +if ($action == 'add' && $user->rights->ecm->setup) { $ecmdir->ref = 'NOTUSEDYET'; $ecmdir->label = GETPOST("label"); $ecmdir->description = GETPOST("desc"); $id = $ecmdir->create($user); - if ($id > 0) - { + if ($id > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -111,38 +121,38 @@ if ($action == 'add' && $user->rights->ecm->setup) } // Remove file -if ($action == 'confirm_deletefile') -{ - if (GETPOST('confirm') == 'yes') - { +if ($action == 'confirm_deletefile') { + if (GETPOST('confirm') == 'yes') { $langs->load("other"); - if ($section) - { + if ($section) { $result = $ecmdir->fetch($section); - if (!($result > 0)) - { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } $relativepath = $ecmdir->getRelativePath(); - } else $relativepath = ''; + } else { + $relativepath = ''; + } $upload_dir = $conf->ecm->dir_output.($relativepath ? '/'.$relativepath : ''); $file = $upload_dir."/".GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP). $ret = dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } $result = $ecmdir->changeNbOfFiles('-'); clearstatcache(); } - $action = 'file_manager'; + $action = 'file_manager'; } // Remove directory -if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes') -{ +if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes') { $result = $ecmdir->delete($user); setEventMessages($langs->trans("ECMSectionWasRemoved", $ecmdir->label), null, 'mesgs'); @@ -152,8 +162,7 @@ if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes') // Refresh directory view // This refresh list of dirs, not list of files (for preformance reason). List of files is refresh only if dir was not synchronized. // To refresh content of dir with cache, just open the dir in edit mode. -if ($action == 'refreshmanual') -{ +if ($action == 'refreshmanual') { $ecmdirtmp = new EcmDirectory($db); // This part of code is same than into file ecm/ajax/ecmdatabase.php TODO Remove duplicate @@ -173,20 +182,16 @@ if ($action == 'refreshmanual') // Now we compare both trees to complete missing trees into database //var_dump($disktree); //var_dump($sqltree); - foreach ($disktree as $dirdesc) // Loop on tree onto disk - { + foreach ($disktree as $dirdesc) { // Loop on tree onto disk $dirisindatabase = 0; - foreach ($sqltree as $dirsqldesc) - { - if ($conf->ecm->dir_output.'/'.$dirsqldesc['fullrelativename'] == $dirdesc['fullname']) - { + foreach ($sqltree as $dirsqldesc) { + if ($conf->ecm->dir_output.'/'.$dirsqldesc['fullrelativename'] == $dirdesc['fullname']) { $dirisindatabase = 1; break; } } - if (!$dirisindatabase) - { + if (!$dirisindatabase) { $txt = "Directory found on disk ".$dirdesc['fullname'].", not found into database so we add it"; dol_syslog($txt); //print $txt."
    \n"; @@ -196,24 +201,20 @@ if ($action == 'refreshmanual') $relativepathmissing = str_replace($diroutputslash, '', $dirdesc['fullname']); $relativepathtosearchparent = $relativepathmissing; //dol_syslog("Try to find parent id for directory ".$relativepathtosearchparent); - if (preg_match('/\//', $relativepathtosearchparent)) - //while (preg_match('/\//',$relativepathtosearchparent)) - { + if (preg_match('/\//', $relativepathtosearchparent)) { + //while (preg_match('/\//',$relativepathtosearchparent)) $relativepathtosearchparent = preg_replace('/\/[^\/]*$/', '', $relativepathtosearchparent); $txt = "Is relative parent path ".$relativepathtosearchparent." for ".$relativepathmissing." found in sql tree ?"; dol_syslog($txt); //print $txt." -> "; $parentdirisindatabase = 0; - foreach ($sqltree as $dirsqldesc) - { - if ($dirsqldesc['fullrelativename'] == $relativepathtosearchparent) - { + foreach ($sqltree as $dirsqldesc) { + if ($dirsqldesc['fullrelativename'] == $relativepathtosearchparent) { $parentdirisindatabase = $dirsqldesc['id']; break; } } - if ($parentdirisindatabase > 0) - { + if ($parentdirisindatabase > 0) { dol_syslog("Yes with id ".$parentdirisindatabase); //print "Yes with id ".$parentdirisindatabase."
    \n"; $fk_parent = $parentdirisindatabase; @@ -227,8 +228,7 @@ if ($action == 'refreshmanual') $fk_parent = 0; // Parent is root } - if ($fk_parent >= 0) - { + if ($fk_parent >= 0) { $ecmdirtmp->ref = 'NOTUSEDYET'; $ecmdirtmp->label = dol_basename($dirdesc['fullname']); $ecmdirtmp->description = ''; @@ -238,8 +238,7 @@ if ($action == 'refreshmanual') dol_syslog($txt); //print $ecmdirtmp->cachenbofdoc."
    \n";exit; $id = $ecmdirtmp->create($user); - if ($id > 0) - { + if ($id > 0) { $newdirsql = array('id'=>$id, 'id_mere'=>$ecmdirtmp->fk_parent, 'label'=>$ecmdirtmp->label, @@ -260,11 +259,9 @@ if ($action == 'refreshmanual') } // Loop now on each sql tree to check if dir exists - foreach ($sqltree as $dirdesc) // Loop on each sqltree to check dir is on disk - { + foreach ($sqltree as $dirdesc) { // Loop on each sqltree to check dir is on disk $dirtotest = $conf->ecm->dir_output.'/'.$dirdesc['fullrelativename']; - if (!dol_is_dir($dirtotest)) - { + if (!dol_is_dir($dirtotest)) { $ecmdirtmp->id = $dirdesc['id']; $ecmdirtmp->delete($user, 'databaseonly'); //exit; @@ -277,7 +274,9 @@ if ($action == 'refreshmanual') // If a directory was added, the fulltree array is not correctly completed and sorted, so we clean // it to be sure that fulltree array is not used without reloading it. - if ($adirwascreated) $sqltree = null; + if ($adirwascreated) { + $sqltree = null; + } } @@ -295,7 +294,9 @@ $moreheadjs = ''; //$morejs=array(); $morejs = array('includes/jquery/plugins/blockUI/jquery.blockUI.js', 'core/js/blockUI.js'); // Used by ecm/tpl/enabledfiletreeajax.tpl.pgp -if (empty($conf->global->MAIN_ECM_DISABLE_JS)) $morejs[] = "includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js"; +if (empty($conf->global->MAIN_ECM_DISABLE_JS)) { + $morejs[] = "includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js"; +} $moreheadjs .= ''; + +if ($projectid > 0) { + // To verify role of users + //$userAccess = $object->restrictedProjectArea($user,'read'); + $userWrite = $project->restrictedProjectArea($user, 'write'); + //$userDelete = $object->restrictedProjectArea($user,'delete'); + //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete; + + $head = project_prepare_head($project); + print dol_get_fiche_head($head, 'eventorganisation', $langs->trans("Project"), -1, ($project->public ? 'projectpub' : 'project')); + + // Project card + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
    '; + // Title + $morehtmlref .= $project->title; + // Thirdparty + if ($project->thirdparty->id > 0) { + $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$project->thirdparty->getNomUrl(1, 'project'); + } + $morehtmlref .= '
    '; + + // Define a complementary filter for search of next/prev ref. + if (!$user->rights->project->all->lire) { + $objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0); + $project->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; + } + + dol_banner_tab($project, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
    '; + print '
    '; + print '
    '; + + print '
    '.$langs->trans("QtyReceived").'
    "; - if ($object->lines[$i]->fk_product_type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($object->lines[$i]->fk_product_type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($object->lines[$i]->label)) { $text .= ' '.$object->lines[$i]->label.''; @@ -640,23 +637,18 @@ if ($action == 'create') // Create. Seems to no be used * Boutons actions */ - if ($user->socid == 0) - { + if ($user->socid == 0) { print '
    '; - if ($object->statut == 0 && $num_prod > 0) - { + if ($object->statut == 0 && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) { print ''.$langs->trans("Validate").''; } } - if ($user->rights->expedition->delivery->supprimer) - { - if ($conf->expedition_bon->enabled) - { + if ($user->rights->expedition->delivery->supprimer) { + if ($conf->expedition_bon->enabled) { print ''.$langs->trans("Delete").''; } else { print ''.$langs->trans("Delete").''; @@ -670,7 +662,7 @@ if ($action == 'create') // Create. Seems to no be used print '\n"; - if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES)) - { + if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES)) { print "".''; print "".''; print "".''; @@ -430,7 +431,9 @@ if ($action == 'create') // Country print ''; print "".''; @@ -447,7 +450,7 @@ if ($action == 'create') print ''; print ''; @@ -457,13 +460,12 @@ if ($action == 'create') print ''; print ''; } - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print "\n"; @@ -473,8 +475,7 @@ if ($action == 'create') $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } @@ -499,8 +500,7 @@ if ($action == 'create') /* */ /* ************************************************************ */ -if (!empty($id) && $action == 'edit') -{ +if (!empty($id) && $action == 'edit') { $result = $object->fetch($id); if ($result < 0) { dol_print_error($db, $object->error); exit; @@ -585,8 +585,11 @@ if (!empty($id) && $action == 'edit') } // Payment mode print "\n"; @@ -607,9 +610,8 @@ if (!empty($id) && $action == 'edit') $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', $parameters); + if (empty($reshook)) { + print $object->showOptionals($extrafields, 'edit', $parameters); } print "
    '; /* - * Documents generated + * Documents generated */ $objectref = dol_sanitizeFileName($object->ref); @@ -683,10 +675,9 @@ if ($action == 'create') // Create. Seems to no be used print $formfile->showdocuments('delivery', $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); /* - * Linked object block (of linked shipment) - */ - if ($object->origin == 'expedition') - { + * Linked object block (of linked shipment) + */ + if ($object->origin == 'expedition') { $shipment = new Expedition($db); $shipment->fetch($object->origin_id); diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 9c1e9682a10..18887a99e28 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -31,8 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} /** @@ -132,7 +136,9 @@ class Delivery extends CommonObject dol_syslog("Delivery::create"); - if (empty($this->model_pdf)) $this->model_pdf = $conf->global->DELIVERY_ADDON_PDF; + if (empty($this->model_pdf)) { + $this->model_pdf = $conf->global->DELIVERY_ADDON_PDF; + } $error = 0; @@ -176,8 +182,7 @@ class Delivery extends CommonObject dol_syslog("Delivery::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."delivery"); $numref = "(PROV".$this->id.")"; @@ -188,10 +193,8 @@ class Delivery extends CommonObject dol_syslog("Delivery::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$conf->expedition_bon->enabled) - { + if ($resql) { + if (!$conf->expedition_bon->enabled) { $commande = new Commande($this->db); $commande->id = $this->commande_id; $commande->fetch_lines(); @@ -202,38 +205,33 @@ class Delivery extends CommonObject * Inserting products into the database */ $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $origin_id = $this->lines[$i]->origin_line_id; - if (!$origin_id) $origin_id = $this->lines[$i]->commande_ligne_id; // For backward compatibility + if (!$origin_id) { + $origin_id = $this->lines[$i]->commande_ligne_id; // For backward compatibility + } - if (!$this->create_line($origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description)) - { + if (!$this->create_line($origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description)) { $error++; } } - if (!$error && $this->id && $this->origin_id) - { + if (!$error && $this->id && $this->origin_id) { $ret = $this->add_object_linked(); - if (!$ret) - { + if (!$ret) { $error++; } - if (!$conf->expedition_bon->enabled) - { + if (!$conf->expedition_bon->enabled) { // TODO standardize status uniformiser les statuts $ret = $this->setStatut(2, $this->origin_id, $this->origin); - if (!$ret) - { + if (!$ret) { $error++; } } } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -281,13 +279,11 @@ class Delivery extends CommonObject $sql .= $qty.")"; dol_syslog(get_class($this)."::create_line", LOG_DEBUG); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $error++; } - if ($error == 0) - { + if ($error == 0) { return 1; } } @@ -311,14 +307,12 @@ class Delivery extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."delivery as l"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = l.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON l.fk_incoterms = i.rowid'; - $sql .= " WHERE l.rowid = ".$id; + $sql .= " WHERE l.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -346,7 +340,9 @@ class Delivery extends CommonObject $this->label_incoterms = $obj->label_incoterms; $this->db->free($result); - if ($this->statut == 0) $this->draft = 1; + if ($this->statut == 0) { + $this->draft = 1; + } // Retrieve all extrafields // fetch optionals attributes and labels @@ -354,8 +350,7 @@ class Delivery extends CommonObject // Load lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } @@ -390,15 +385,12 @@ class Delivery extends CommonObject $error = 0; if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) - { - if (!empty($conf->global->DELIVERY_ADDON_NUMBER)) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) { + if (!empty($conf->global->DELIVERY_ADDON_NUMBER)) { // Setting the command numbering module name $modName = $conf->global->DELIVERY_ADDON_NUMBER; - if (is_readable(DOL_DOCUMENT_ROOT.'/core/modules/delivery/'.$modName.'.php')) - { + if (is_readable(DOL_DOCUMENT_ROOT.'/core/modules/delivery/'.$modName.'.php')) { require_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/'.$modName.'.php'; $now = dol_now(); @@ -408,8 +400,7 @@ class Delivery extends CommonObject $soc = new Societe($this->db); $soc->fetch($this->socid); - if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life - { + if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) { // empty should not happened, but when it occurs, the test save life $numref = $objMod->delivery_get_num($soc, $this); } else { $numref = $this->ref; @@ -424,11 +415,9 @@ class Delivery extends CommonObject $sql .= " AND entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { return 0; } } @@ -442,50 +431,47 @@ class Delivery extends CommonObject $sql .= " AND fk_statut = 0"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('DELIVERY_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'expedition/receipt/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'expedition/receipt/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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($numref); $dirsource = $conf->expedition->dir_output.'/receipt/'.$oldref; $dirdest = $conf->expedition->dir_output.'/receipt/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->expedition->dir_output.'/receipt/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -497,8 +483,7 @@ class Delivery extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $numref; $this->statut = 1; } @@ -506,8 +491,7 @@ class Delivery extends CommonObject dol_syslog(get_class($this)."::valid ok"); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -540,8 +524,7 @@ class Delivery extends CommonObject $this->lines = array(); $num = count($expedition->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $line = new DeliveryLine($this->db); $line->origin_line_id = $expedition->lines[$i]->origin_line_id; $line->label = $expedition->lines[$i]->label; @@ -583,22 +566,23 @@ class Delivery extends CommonObject global $conf; $error = 0; - if ($id > 0 && !$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used - { + if ($id > 0 && !$error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used $line = new DeliveryLine($this->db); $line->array_options = $array_options; $line->id = $id; $result = $line->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->error[] = $line->error; $error++; } } - if (!$error) return 1; - else return -1; + if (!$error) { + return 1; + } else { + return -1; + } } @@ -628,13 +612,11 @@ class Delivery extends CommonObject */ public function deleteline($lineid) { - if ($this->statut == 0) - { + if ($this->statut == 0) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."commandedet"; - $sql .= " WHERE rowid = ".$lineid; + $sql .= " WHERE rowid = ".((int) $lineid); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->update_price(); return 1; @@ -660,37 +642,31 @@ class Delivery extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."deliverydet"; $sql .= " WHERE fk_delivery = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."delivery"; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->db->commit(); // Deleting pdf folder's draft On efface le repertoire de pdf provisoire $ref = dol_sanitizeFileName($this->ref); - if (!empty($conf->expedition->dir_output)) - { + if (!empty($conf->expedition->dir_output)) { $dir = $conf->expedition->dir_output.'/receipt/'.$ref; $file = $dir.'/'.$ref.'.pdf'; - if (file_exists($file)) - { - if (!dol_delete_file($file)) - { + if (file_exists($file)) { + if (!dol_delete_file($file)) { return 0; } } - if (file_exists($dir)) - { - if (!dol_delete_dir($dir)) - { + if (file_exists($dir)) { + if (!dol_delete_dir($dir)) { $this->error = $langs->trans("ErrorCanNotDeleteDir", $dir); return 0; } @@ -699,8 +675,7 @@ class Delivery extends CommonObject // Call trigger $result = $this->call_trigger('DELIVERY_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -4; } @@ -746,16 +721,24 @@ class Delivery extends CommonObject //{ // 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'; + 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'; + } //} $linkstart = ''; $linkend = ''; - if ($withpicto) $result .= ($linkstart.img_object($label, $this->picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto) { + $result .= ($linkstart.img_object($label, $this->picto, 'class="classfortooltip"').$linkend); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } $result .= $linkstart.$this->ref.$linkend; return $result; } @@ -782,12 +765,10 @@ class Delivery extends CommonObject dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $line = new DeliveryLine($this->db); $obj = $this->db->fetch_object($resql); @@ -862,8 +843,7 @@ class Delivery extends CommonObject // phpcs:enable global $langs; - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[-1] = $langs->trans('StatusDeliveryCanceled'); @@ -875,8 +855,12 @@ class Delivery extends CommonObject } $statusType = 'status0'; - if ($status == -1) $statusType = 'status5'; - if ($status == 1) $statusType = 'status4'; + if ($status == -1) { + $statusType = 'status5'; + } + if ($status == 1) { + $statusType = 'status4'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -905,12 +889,10 @@ class Delivery extends CommonObject $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -958,16 +940,14 @@ class Delivery extends CommonObject $sqlSourceLine .= ", p.ref, p.label"; $sqlSourceLine .= " FROM ".MAIN_DB_PREFIX.$this->linkedObjectsIds[0]['type']."det as st"; $sqlSourceLine .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON st.fk_product = p.rowid"; - $sqlSourceLine .= " WHERE fk_".$this->linked_object[0]['type']." = ".$this->linked_object[0]['linkid']; + $sqlSourceLine .= " WHERE fk_".$this->linked_object[0]['type']." = ".((int) $this->linked_object[0]['linkid']); $resultSourceLine = $this->db->query($sqlSourceLine); - if ($resultSourceLine) - { + if ($resultSourceLine) { $num_lines = $this->db->num_rows($resultSourceLine); $i = 0; $resultArray = array(); - while ($i < $num_lines) - { + while ($i < $num_lines) { $objSourceLine = $this->db->fetch_object($resultSourceLine); // Get lines of sources alread delivered @@ -985,10 +965,8 @@ class Delivery extends CommonObject $result = $this->db->query($sql); $row = $this->db->fetch_row($result); - if ($objSourceLine->qty - $row[1] > 0) - { - if ($row[0] == $objSourceLine->rowid) - { + if ($objSourceLine->qty - $row[1] > 0) { + if ($row[0] == $objSourceLine->rowid) { $array[$i]['qty'] = $objSourceLine->qty - $row[1]; } else { $array[$i]['qty'] = $objSourceLine->qty; @@ -996,8 +974,7 @@ class Delivery extends CommonObject $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; $array[$i]['label'] = $objSourceLine->label ? $objSourceLine->label : $objSourceLine->description; @@ -1021,16 +998,14 @@ class Delivery extends CommonObject */ public function setDeliveryDate($user, $delivery_date) { - if ($user->rights->expedition->creer) - { + if ($user->rights->expedition->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."delivery"; $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null'); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::setDeliveryDate", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->date_delivery = $delivery_date; return 1; } else { diff --git a/htdocs/delivery/class/index.html b/htdocs/delivery/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/delivery/index.html b/htdocs/delivery/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/document.php b/htdocs/document.php index 060722e8d5b..59501cc4701 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -32,24 +32,42 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} // For direct external download link, we don't need to load/check we are into a login session -if (isset($_GET["hashp"]) && !defined("NOLOGIN")) -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (isset($_GET["hashp"]) && !defined("NOLOGIN")) { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } // Some value of modulepart can be used to get resources that are public so no login are required. -if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } /** @@ -84,17 +102,26 @@ $urlsource = GETPOST('urlsource', 'alpha'); $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity; // Security check -if (empty($modulepart) && empty($hashp)) accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); -if (empty($original_file) && empty($hashp)) accessforbidden('Bad link. Missing identification to find file (original_file or hashp)', 0, 0, 1); -if ($modulepart == 'fckeditor') $modulepart = 'medias'; // For backward compatibility +if (empty($modulepart) && empty($hashp)) { + accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); +} +if (empty($original_file) && empty($hashp)) { + accessforbidden('Bad link. Missing identification to find file (original_file or hashp)', 0, 0, 1); +} +if ($modulepart == 'fckeditor') { + $modulepart = 'medias'; // For backward compatibility +} $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} // For some module part, dir may be privates -if (in_array($modulepart, array('facture_paiement', 'unpaid'))) -{ - if (!$user->rights->societe->client->voir || $socid) $original_file = 'private/'.$user->id.'/'.$original_file; // If user has no permission to see all, output dir is specific to user +if (in_array($modulepart, array('facture_paiement', 'unpaid'))) { + if (!$user->rights->societe->client->voir || $socid) { + $original_file = 'private/'.$user->id.'/'.$original_file; // If user has no permission to see all, output dir is specific to user + } } @@ -111,25 +138,20 @@ if (in_array($modulepart, array('facture_paiement', 'unpaid'))) */ // If we have a hash public (hashp), we guess the original_file. -if (!empty($hashp)) -{ +if (!empty($hashp)) { include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', '', '', $hashp); - if ($result > 0) - { + if ($result > 0) { $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory // filepath can be 'users/X' or 'X/propale/PR11111' - if (is_numeric($tmp[0])) // If first tmp is numeric, it is subdir of company for multicompany, we take next part. - { + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. $tmp = explode('/', $tmp[1], 2); } $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path - if ($modulepart) // Not required, so often not defined, for link using public hashp parameter. - { - if ($moduleparttocheck == $modulepart) - { + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { // We remove first level of directory $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir //var_dump($original_file); exit; @@ -148,14 +170,23 @@ if (!empty($hashp)) // Define attachment (attachment=true to force choice popup 'open'/'save as') $attachment = true; -if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false; -if (isset($_GET["attachment"])) $attachment = GETPOST("attachment", 'alpha') ?true:false; -if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment = false; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = GETPOST("attachment", 'alpha') ?true:false; +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) { + $attachment = false; +} // Define mime type $type = 'application/octet-stream'; // By default -if (GETPOST('type', 'alpha')) $type = GETPOST('type', 'alpha'); -else $type = dol_mimetype($original_file); +if (GETPOST('type', 'alpha')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} // Security: Force to octet-stream if file is a dangerous file. For example when it is a .noexe file // We do not force if file is a javascript to be able to get js from website module with '; @@ -412,8 +414,7 @@ if ($action == 'create') print $form->selectyesno("public", $public_donation, 1); print "
    '.$langs->trans("Company").'
    '.$langs->trans("Lastname").'
    '.$langs->trans("Firstname").'
    '; print img_picto('', 'globe-americas', 'class="paddingrightonly"').$form->select_country(GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '
    '.$langs->trans("EMail").''.img_picto('', 'object_email', 'class="paddingrightonly"').'
    '.$langs->trans('NotePublic').''; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    '.$langs->trans('NotePrivate').''; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '
    ".$langs->trans("Project").""; $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); print "
    ".$langs->trans("PaymentMode")."\n"; - if ($object->mode_reglement_id) $selected = $object->mode_reglement_id; - else $selected = ''; + if ($object->mode_reglement_id) { + $selected = $object->mode_reglement_id; + } else { + $selected = ''; + } $form->select_types_paiements($selected, 'modepayment', 'CRDT', 0, 1); print "
    \n"; @@ -628,11 +630,9 @@ if (!empty($id) && $action == 'edit') /* Donation card in view mode */ /* */ /* ************************************************************ */ -if (!empty($id) && $action != 'edit') -{ +if (!empty($id) && $action != 'edit') { // Confirmation delete - if ($action == 'delete') - { + if ($action == 'delete') { $text = $langs->trans("ConfirmDeleteADonation"); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("DeleteADonation"), $text, "confirm_delete", '', '', 1); } @@ -658,12 +658,10 @@ if (!empty($id) && $action != 'edit') $morehtmlref = '
    '; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->don->creer) - { + if ($user->rights->don->creer) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -761,8 +759,7 @@ if (!empty($id) && $action != 'edit') //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $total = 0; print ''; @@ -770,11 +767,10 @@ if (!empty($id) && $action != 'edit') print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); print '\n"; print "\n"; @@ -819,28 +814,23 @@ if (!empty($id) && $action != 'edit') print '
    '; // Re-open - if ($permissiontoadd && $object->statut == $object::STATUS_CANCELED) - { + if ($permissiontoadd && $object->statut == $object::STATUS_CANCELED) { print ''.$langs->trans("ReOpen").''; } print ''; - if ($object->statut == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { print ''; } - if (($object->statut == $object::STATUS_DRAFT || $object->statut == $object::STATUS_VALIDATED) && $totalpaid == 0 && $object->paid == 0) - { + if (($object->statut == $object::STATUS_DRAFT || $object->statut == $object::STATUS_VALIDATED) && $totalpaid == 0 && $object->paid == 0) { print '"; } // Create payment - if ($object->statut == $object::STATUS_VALIDATED && $object->paid == 0 && $user->rights->don->creer) - { - if ($remaintopay == 0) - { + if ($object->statut == $object::STATUS_VALIDATED && $object->paid == 0 && $user->rights->don->creer) { + if ($remaintopay == 0) { print '
    '.$langs->trans('DoPayment').'
    '; } else { print ''; @@ -848,16 +838,13 @@ if (!empty($id) && $action != 'edit') } // Classify 'paid' - if ($object->statut == $object::STATUS_VALIDATED && round($remaintopay) == 0 && $object->paid == 0 && $user->rights->don->creer) - { + if ($object->statut == $object::STATUS_VALIDATED && round($remaintopay) == 0 && $object->paid == 0 && $user->rights->don->creer) { print '"; } // Delete - if ($user->rights->don->supprimer) - { - if ($object->statut == $object::STATUS_CANCELED || $object->statut == $object::STATUS_DRAFT) - { + if ($user->rights->don->supprimer) { + if ($object->statut == $object::STATUS_CANCELED || $object->statut == $object::STATUS_DRAFT) { print '"; } else { print '"; @@ -872,7 +859,7 @@ if (!empty($id) && $action != 'edit') print '
    '; /* - * Documents generes + * Generated documents */ $filename = dol_sanitizeFileName($object->id); $filedir = $conf->don->dir_output."/".dol_sanitizeFileName($object->id); @@ -889,8 +876,7 @@ if (!empty($id) && $action != 'edit') // Show online payment link $useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)); - if ($useonlinepayment) //$object->statut != Facture::STATUS_DRAFT && - { + if ($useonlinepayment) { //$object->statut != Facture::STATUS_DRAFT && print '
    '."\n"; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; print showOnlinePaymentUrl('donation', $object->ref).'
    '; diff --git a/htdocs/don/class/api_donations.class.php b/htdocs/don/class/api_donations.class.php index 18a8563fd89..2773ab62c14 100644 --- a/htdocs/don/class/api_donations.class.php +++ b/htdocs/don/class/api_donations.class.php @@ -32,7 +32,7 @@ class Donations extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid' ); @@ -103,24 +103,32 @@ class Donations extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->don->lire) { + throw new RestException(401); + } + $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; $sql = "SELECT t.rowid"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids)) $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) + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids)) { + $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."don as t"; $sql .= ' WHERE t.entity IN ('.getEntity('don').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids)) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($thirdparty_ids) $sql .= " AND t.fk_soc = ".$thirdparty_ids." "; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids)) { + $sql .= " AND t.fk_soc = sc.fk_soc"; + } + if ($thirdparty_ids) { + $sql .= " AND t.fk_soc = ".$thirdparty_ids." "; + } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -129,8 +137,7 @@ class Donations extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -141,13 +148,11 @@ class Donations extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $don_static = new Don($this->db); if ($don_static->fetch($obj->rowid)) { @@ -178,6 +183,7 @@ class Donations extends DolibarrApi if (!DolibarrApiAccess::$user->rights->don->creer) { throw new RestException(401, "Insuffisant rights"); } + // Check mandatory fields $result = $this->_validate($request_data); @@ -185,12 +191,12 @@ class Donations extends DolibarrApi $this->don->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->don->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->don->lines = $lines; + }*/ if ($this->don->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating order", array_merge(array($this->don->error), $this->don->errors)); @@ -222,12 +228,13 @@ class Donations extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->don->$field = $value; } - if ($this->don->update(DolibarrApiAccess::$user) > 0) - { + if ($this->don->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->don->error); @@ -245,6 +252,7 @@ class Donations extends DolibarrApi if (!DolibarrApiAccess::$user->rights->don->supprimer) { throw new RestException(401); } + $result = $this->don->fetch($id); if (!$result) { throw new RestException(404, 'Donation not found'); @@ -293,6 +301,7 @@ class Donations extends DolibarrApi if (!DolibarrApiAccess::$user->rights->don->creer) { throw new RestException(401); } + $result = $this->don->fetch($id); if (!$result) { throw new RestException(404, 'Donation not found'); @@ -356,8 +365,9 @@ class Donations extends DolibarrApi { $don = array(); foreach (Orders::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, $field." field missing"); + } $don[$field] = $data[$field]; } return $don; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 0717870ac42..a925cdb4ba4 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -171,8 +171,7 @@ class Don extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load("donations"); $this->labelStatus[-1] = $langs->transnoentitiesnoconv("Canceled"); @@ -186,8 +185,12 @@ class Don extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_CANCELED) $statusType = 'status9'; - if ($status == self::STATUS_PAID) $statusType = 'status6'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } + if ($status == self::STATUS_PAID) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -216,12 +219,10 @@ class Don extends CommonObject $sql .= " LIMIT 10"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_socs = $this->db->num_rows($resql); $i = 0; - while ($i < $num_socs) - { + while ($i < $num_socs) { $i++; $row = $this->db->fetch_row($resql); @@ -269,35 +270,29 @@ class Don extends CommonObject $error_string = array(); $err = 0; - if (dol_strlen(trim($this->societe)) == 0) - { - if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0) - { + if (dol_strlen(trim($this->societe)) == 0) { + if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Company').'/'.$langs->transnoentitiesnoconv('Firstname').'-'.$langs->transnoentitiesnoconv('Lastname')); $err++; } } - if (dol_strlen(trim($this->address)) == 0) - { + if (dol_strlen(trim($this->address)) == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Address')); $err++; } - if (dol_strlen(trim($this->zip)) == 0) - { + if (dol_strlen(trim($this->zip)) == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Zip')); $err++; } - if (dol_strlen(trim($this->town)) == 0) - { + if (dol_strlen(trim($this->town)) == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Town')); $err++; } - if (dol_strlen(trim($this->email)) == 0) - { + if (dol_strlen(trim($this->email)) == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('EMail')); $err++; } @@ -306,10 +301,8 @@ class Don extends CommonObject $map = range(0, 9); $len = dol_strlen($this->amount); - for ($i = 0; $i < $len; $i++) - { - if (!isset($map[substr($this->amount, $i, 1)])) - { + for ($i = 0; $i < $len; $i++) { + if (!isset($map[substr($this->amount, $i, 1)])) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Amount')); $err++; $amount_invalid = 1; @@ -317,23 +310,19 @@ class Don extends CommonObject } } - if (!$amount_invalid) - { - if ($this->amount == 0) - { + if (!$amount_invalid) { + if ($this->amount == 0) { $error_string[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Amount')); $err++; } else { - if ($this->amount < $minimum && $minimum > 0) - { + if ($this->amount < $minimum && $minimum > 0) { $error_string[] = $langs->trans('MinimumAmount', $langs->transnoentitiesnoconv('$minimum')); $err++; } } } - if ($err) - { + if ($err) { $this->errors = $error_string; return 0; } else { @@ -404,7 +393,7 @@ class Don extends CommonObject $sql .= ", ".(int) ($this->country_id > 0 ? $this->country_id : 0); $sql .= ", ".(int) $this->public; $sql .= ", ".($this->fk_project > 0 ? (int) $this->fk_project : "null"); - $sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL"); + $sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL"); $sql .= ", ".(!empty($this->note_public) ? ("'".$this->db->escape($this->note_public)."'") : "NULL"); $sql .= ", ".$user->id; $sql .= ", null"; @@ -415,16 +404,16 @@ class Don extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."don"); $ret = $this->id; - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('DON_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } else { @@ -441,14 +430,12 @@ class Don extends CommonObject } } - if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) - { + if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) { //$res = $this->setValid($user); //if ($res < 0) $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return $ret; } else { @@ -503,28 +490,25 @@ class Don extends CommonObject dol_syslog(get_class($this)."::Update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { + if ($resql) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('DON_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Update extrafield - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $this->db->commit(); $result = 1; } else { @@ -557,7 +541,7 @@ class Don extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('DON_DELETE', $user); @@ -568,39 +552,33 @@ class Don extends CommonObject } // Delete donation - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."don_extrafields"; $sql .= " WHERE fk_object=".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->lasterror(); $error++; } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."don"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->lasterror(); $error++; } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -633,20 +611,16 @@ class Don extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON cp.id = d.fk_payment"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.fk_country = c.rowid"; $sql .= " WHERE d.entity IN (".getEntity('donation').")"; - if (!empty($id)) - { - $sql .= " AND d.rowid=".$id; - } elseif (!empty($ref)) - { + if (!empty($id)) { + $sql .= " AND d.rowid=".((int) $id); + } elseif (!empty($ref)) { $sql .= " AND d.ref='".$this->db->escape($ref)."'"; } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -728,17 +702,17 @@ class Don extends CommonObject $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 1, fk_user_valid = ".$userid." WHERE rowid = ".$id." AND fk_statut = 0"; + $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 1, fk_user_valid = ".((int) $userid)." WHERE rowid = ".((int) $id)." AND fk_statut = 0"; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->affected_rows($resql)) - { + if ($resql) { + if ($this->db->affected_rows($resql)) { if (!$notrigger) { // Call trigger $result = $this->call_trigger('DON_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } @@ -761,19 +735,33 @@ class Don extends CommonObject /** * Classify the donation as paid, the donation was received * - * @param int $id id of donation - * @param int $modepayment mode of payment - * @return int <0 if KO, >0 if OK + * @deprecated + * @see setPaid() + * @param int $id id of donation + * @param int $modepayment mode of payment + * @return int <0 if KO, >0 if OK */ public function set_paid($id, $modepayment = 0) { // phpcs:enable + dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE); + return $this->setPaid($id, $modepayment); + } + + /** + * Classify the donation as paid, the donation was received + * + * @param int $id id of donation + * @param int $modepayment mode of payment + * @return int <0 if KO, >0 if OK + */ + public function setPaid($id, $modepayment = 0) + { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; - if ($modepayment) - { - $sql .= ", fk_payment=".$modepayment; + if ($modepayment) { + $sql .= ", fk_payment = ".((int) $modepayment); } - $sql .= " WHERE rowid = ".$id." AND fk_statut = 1"; + $sql .= " WHERE rowid = ".((int) $id)." AND fk_statut = 1"; $resql = $this->db->query($sql); if ($resql) { @@ -799,7 +787,7 @@ class Don extends CommonObject public function set_cancel($id) { // phpcs:enable - $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = -1 WHERE rowid = ".$id; + $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = -1 WHERE rowid = ".((int) $id); $resql = $this->db->query($sql); if ($resql) { @@ -855,12 +843,11 @@ class Don extends CommonObject $sql = "SELECT sum(amount) as total"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; - $sql .= " WHERE fk_statut = ".$param; + $sql .= " WHERE fk_statut = ".((int) $param); $sql .= " AND entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $result = $obj->total; } @@ -887,10 +874,8 @@ class Don extends CommonObject $sql .= " AND d.entity IN (".getEntity('donation').")"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["donations"] = $obj->nb; } $this->db->free($resql); @@ -915,7 +900,9 @@ class Don extends CommonObject { global $conf, $langs; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $label = img_picto('', $this->picto).' '.$langs->trans("Donation").''; @@ -926,20 +913,30 @@ class Don extends CommonObject $label .= '
    '.$langs->trans('Ref').': '.$this->id; $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); } - if ($moretitle) $label .= ' - '.$moretitle; + if ($moretitle) { + $label .= ' - '.$moretitle; + } $url = DOL_URL_ROOT.'/don/card.php?id='.$this->id; - $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'; + $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'; + } $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; + 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; @@ -956,25 +953,21 @@ class Don extends CommonObject $sql = 'SELECT d.rowid, d.datec, d.fk_user_author, d.fk_user_valid,'; $sql .= ' d.tms'; $sql .= ' FROM '.MAIN_DB_PREFIX.'don as d'; - $sql .= ' WHERE d.rowid = '.$id; + $sql .= ' WHERE d.rowid = '.((int) $id); dol_syslog(get_class($this).'::info', LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_modification = $vuser; @@ -1030,8 +1023,7 @@ class Don extends CommonObject // If selected modele is a filename template (then $modele="modelname:filename") $tmp = explode(':', $modele, 2); - if (!empty($tmp[1])) - { + if (!empty($tmp[1])) { $modele = $tmp[0]; $srctemplatepath = $tmp[1]; } @@ -1039,28 +1031,28 @@ class Don extends CommonObject // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { - foreach (array('html', 'doc', 'pdf') as $prefix) - { + if (is_array($conf->modules_parts['models'])) { + $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + } + foreach ($dirmodels as $reldir) { + foreach (array('html', 'doc', 'pdf') as $prefix) { $file = $prefix."_".preg_replace('/^html_/', '', $modele).".modules.php"; // On verifie l'emplacement du modele $file = dol_buildpath($reldir."core/modules/dons/".$file, 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $prefix.'_'.$modele; break; } } - if ($filefound) break; + if ($filefound) { + break; + } } // Charge le modele - if ($filefound) - { + if ($filefound) { require_once $file; $object = $this; @@ -1071,8 +1063,7 @@ class Don extends CommonObject // 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 ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) - { + if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0) { $outputlangs->charset_output = $sav_charset_output; // we delete preview files diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php index 684c04ead44..07eb6d6588e 100644 --- a/htdocs/don/class/donstats.class.php +++ b/htdocs/don/class/donstats.class.php @@ -84,7 +84,9 @@ class DonationStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= " AND d.entity = ".$conf->entity; - if ($this->userid > 0) $this->where .= ' WHERE c.fk_user_author = '.$this->userid; + if ($this->userid > 0) { + $this->where .= ' WHERE c.fk_user_author = '.((int) $this->userid); + } } /** diff --git a/htdocs/don/class/index.html b/htdocs/don/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 710e21f76b7..7c8bd71ccd2 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -120,25 +120,39 @@ class PaymentDonation extends CommonObject $now = dol_now(); // Validate parameters - if (!$this->datepaid) - { + if (!$this->datepaid) { $this->error = 'ErrorBadValueForParameterCreatePaymentDonation'; return -1; } // Clean parameters - if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; - if (isset($this->amount)) $this->amount = trim($this->amount); - if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - 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; + if (isset($this->fk_donation)) { + $this->fk_donation = (int) $this->fk_donation; + } + if (isset($this->amount)) { + $this->amount = trim($this->amount); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = trim($this->fk_typepayment); + } + if (isset($this->num_payment)) { + $this->num_payment = trim($this->num_payment); + } + if (isset($this->note_public)) { + $this->note_public = trim($this->note_public); + } + 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; + } $totalamount = 0; - foreach ($this->amounts as $key => $value) // How payment is dispatch - { + foreach ($this->amounts as $key => $value) { // How payment is dispatch $newvalue = price2num($value, 'MT'); $this->amounts[$key] = $newvalue; $totalamount += $newvalue; @@ -146,13 +160,14 @@ class PaymentDonation extends CommonObject $totalamount = price2num($totalamount); // Check parameters - if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + if ($totalamount == 0) { + return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + } $this->db->begin(); - if ($totalamount != 0) - { + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_donation (fk_donation, datec, datep, amount,"; $sql .= " fk_typepayment, num_payment, note, fk_user_creat, fk_bank)"; $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; @@ -163,8 +178,7 @@ class PaymentDonation extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_donation"); $this->ref = $this->id; } else { @@ -172,16 +186,16 @@ class PaymentDonation extends CommonObject } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('DONATION_PAYMENT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if ($totalamount != 0 && !$error) - { + if ($totalamount != 0 && !$error) { $this->amount = $totalamount; $this->total = $totalamount; // deprecated $this->db->commit(); @@ -220,14 +234,12 @@ class PaymentDonation extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."payment_donation 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 .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -275,14 +287,30 @@ class PaymentDonation extends CommonObject // Clean parameters - if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; - if (isset($this->amount)) $this->amount = trim($this->amount); - if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - 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; + if (isset($this->fk_donation)) { + $this->fk_donation = (int) $this->fk_donation; + } + if (isset($this->amount)) { + $this->amount = trim($this->amount); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = trim($this->fk_typepayment); + } + if (isset($this->num_payment)) { + $this->num_payment = trim($this->num_payment); + } + if (isset($this->note_public)) { + $this->note_public = trim($this->note_public); + } + 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; + } // Check parameters // Put here code to add control on parameters values @@ -311,25 +339,22 @@ class PaymentDonation extends CommonObject $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { - if (!$error && !$notrigger) - { + if (!$error) { + if (!$notrigger) { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('DONATION_PAYMENT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -356,20 +381,20 @@ class PaymentDonation extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url"; $sql .= " WHERE type='payment_donation' AND url_id=".(int) $this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_donation"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); @@ -379,25 +404,22 @@ class PaymentDonation extends CommonObject } } - if (!$error) - { - if (!$notrigger) - { - if (!$error && !$notrigger) - { + if (!$error) { + if (!$notrigger) { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('DONATION_PAYMENT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -439,21 +461,18 @@ class PaymentDonation extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $error++; } - if (!$error) - { + if (!$error) { } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -534,15 +553,16 @@ class PaymentDonation extends CommonObject $error = 0; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); $acc->fetch($accountid); $total = $this->total; - if ($mode == 'payment_donation') $amount = $total; + if ($mode == 'payment_donation') { + $amount = $total; + } // Insert payment into llx_bank $bank_line_id = $acc->addline( @@ -559,23 +579,21 @@ class PaymentDonation extends CommonObject // Update fk_bank in llx_paiement. // On connait ainsi le paiement qui a genere l'ecriture bancaire - if ($bank_line_id > 0) - { + if ($bank_line_id > 0) { $result = $this->update_fk_bank($bank_line_id); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } // Add link 'payment', 'payment_supplier', 'payment_donation' in bank_url between payment and bank transaction $url = ''; - if ($mode == 'payment_donation') $url = DOL_URL_ROOT.'/don/payment/card.php?rowid='; - if ($url) - { + if ($mode == 'payment_donation') { + $url = DOL_URL_ROOT.'/don/payment/card.php?rowid='; + } + if ($url) { $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } @@ -586,8 +604,7 @@ class PaymentDonation extends CommonObject } } - if (!$error) - { + if (!$error) { return 1; } else { return -1; @@ -609,8 +626,7 @@ class PaymentDonation extends CommonObject dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { $this->error = $this->db->error(); @@ -635,14 +651,19 @@ class PaymentDonation extends CommonObject $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->id)) - { + if (!empty($this->id)) { $link = ''; $linkend = ''; - if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + if ($withpicto) { + $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + } } return $result; diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 203ed9da97f..0bd4edbc77b 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -34,8 +34,7 @@ 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/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -50,7 +49,9 @@ $confirm = GETPOST('confirm', 'alpha'); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'don', $id, ''); @@ -59,12 +60,18 @@ $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 +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"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Don($db); @@ -78,10 +85,9 @@ $modulepart = 'don'; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; -if ($action == 'classin' && $user->rights->don->creer) -{ +if ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); } @@ -91,15 +97,18 @@ if ($action == 'classin' && $user->rights->don->creer) */ $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $title = $langs->trans('Donation')." - ".$langs->trans('Documents'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; + +llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { $object->fetch_thirdparty(); $head = donation_prepare_head($object); @@ -110,8 +119,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -119,12 +127,10 @@ if ($object->id) $morehtmlref = '
    '; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->don->creer) - { + if ($user->rights->don->creer) { if ($action != 'classify') { // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } @@ -166,7 +172,7 @@ if ($object->id) print '
    '; - */ + */ // Societe //print ""; diff --git a/htdocs/don/index.html b/htdocs/don/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/don/index.php b/htdocs/don/index.php index ce47e6ca89b..2a314068830 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -53,7 +53,8 @@ $donation_static = new Don($db); $donstatic = new Don($db); -$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'; +$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; + llxHeader('', $langs->trans("Donations"), $help_url); $nb = array(); @@ -66,12 +67,10 @@ $sql .= " GROUP BY d.fk_statut"; $sql .= " ORDER BY d.fk_statut"; $result = $db->query($sql); -if ($result) -{ +if ($result) { $i = 0; $num = $db->num_rows($result); - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $somme[$objp->fk_statut] = $objp->somme; @@ -90,25 +89,25 @@ print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation'); print '
    '; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - if (!empty($conf->don->enabled) && $user->rights->don->lire) - { +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // TODO Add a search into global search combo so we can remove this + if (!empty($conf->don->enabled) && $user->rights->don->lire) { $listofsearchfields['search_donation'] = array('text'=>'Donation'); } - if (count($listofsearchfields)) - { + if (count($listofsearchfields)) { print ''; print ''; print '
    '.$langs->trans("RefPayment").''.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans("Amount").'
    '.$langs->trans("Amount").'
    '; @@ -788,8 +784,7 @@ if (!empty($id) && $action != 'edit') $i++; } - if ($object->paid == 0) - { + if ($object->paid == 0) { print "
    ".$langs->trans("AlreadyPaid")." :".price($totalpaid)."
    ".$langs->trans("AmountExpected")." :".price($object->amount)."
    '.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
    ".$langs->trans("Company")."".$object->client->getNomUrl(1)."
    '; $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print ''; + foreach ($listofsearchfields as $key => $value) { + if ($i == 0) { + print ''; + } print ''; print ''; - if ($i == 0) print ''; + if ($i == 0) { + print ''; + } print ''; $i++; } @@ -121,7 +120,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $dataseries = array(); $colorseries = array(); -include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; +include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '
    '.$langs->trans("Search").'
    '.$langs->trans("Search").'
    '; print ''; @@ -129,17 +128,23 @@ print ''; print "\n"; $listofstatus = array(0, 1, -1, 2); -foreach ($listofstatus as $status) -{ +foreach ($listofstatus as $status) { $dataseries[] = array($donstatic->LibStatut($status, 1), (isset($nb[$status]) ? (int) $nb[$status] : 0)); - if ($status == Don::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == Don::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == Don::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; - if ($status == Don::STATUS_PAID) $colorseries[$status] = $badgeStatus6; + if ($status == Don::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Don::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Don::STATUS_CANCELED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == Don::STATUS_PAID) { + $colorseries[$status] = $badgeStatus6; + } } -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ''; $total = 0; $totalnb = 0; -foreach ($listofstatus as $status) -{ +foreach ($listofstatus as $status) { print ''; print ''; print ''; @@ -203,18 +207,15 @@ $sql .= " ORDER BY c.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '
    '.$langs->trans("Statistics").'
    '; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -165,8 +170,7 @@ print '
    '.$donstatic->LibStatut($status, 4).''.(!empty($nb[$status]) ? $nb[$status] : ' ').'
    '; print ''; print ''; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; @@ -246,7 +247,9 @@ if ($resql) } } print "
    '.$langs->trans("LastModifiedDonations", $max).'

    "; -} else dol_print_error($db); +} else { + dol_print_error($db); +} print '
    '; diff --git a/htdocs/don/info.php b/htdocs/don/info.php index 1e7e18c9baf..8d8f4065dda 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -25,8 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } @@ -39,7 +38,9 @@ $action = GETPOST('action', 'aZ09'); $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'don', $id, ''); $object = new Don($db); @@ -47,8 +48,7 @@ $object->fetch($id); /* * Actions */ -if ($action == 'classin' && $user->rights->don->creer) -{ +if ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); $object->setProject($projectid); } @@ -57,11 +57,15 @@ if ($action == 'classin' && $user->rights->don->creer) * View */ $title = $langs->trans('Donation')." - ".$langs->trans('Info'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; + +llxHeader('', $title, $help_url); $form = new Form($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $object->info($id); @@ -73,12 +77,10 @@ $linkback = ''; // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->don->creer) - { + if ($user->rights->don->creer) { if ($action != 'classify') { // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } diff --git a/htdocs/don/list.php b/htdocs/don/list.php index b81b5eaa231..0c8f51281a3 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -27,7 +27,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.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("companies", "donations")); @@ -38,12 +40,18 @@ $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 = "d.datedon"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "d.datedon"; +} $search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4"; $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); @@ -53,10 +61,11 @@ $search_name = GETPOST('search_name', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); -if (!$user->rights->don->lire) accessforbidden(); +if (!$user->rights->don->lire) { + accessforbidden(); +} -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 -{ +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_all = ""; $search_ref = ""; $search_company = ""; @@ -84,9 +93,13 @@ $fieldstosearchall = array( $donationstatic = new Don($db); $form = new Form($db); -if (!empty($conf->projet->enabled)) $projectstatic = new Project($db); +if (!empty($conf->projet->enabled)) { + $projectstatic = new Project($db); +} -llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'); +$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones|DE:Modul_Spenden'; + +llxHeader('', $langs->trans("Donations"), $help_url); // Genere requete de liste des dons $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,"; @@ -94,37 +107,32 @@ $sql .= " d.amount, d.fk_statut as status,"; $sql .= " p.rowid as pid, p.ref, p.title, p.public"; $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; $sql .= " ON p.rowid = d.fk_projet WHERE d.entity IN (".getEntity('donation').")"; -if ($search_status != '' && $search_status != '-4') -{ - $sql .= " AND d.fk_statut IN (".$db->sanitize($db->escape($search_status)).")"; +if ($search_status != '' && $search_status != '-4') { + $sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")"; } -if (trim($search_ref) != '') -{ +if (trim($search_ref) != '') { $sql .= natural_search('d.ref', $search_ref); } -if (trim($search_all) != '') -{ +if (trim($search_all) != '') { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -if (trim($search_company) != '') -{ +if (trim($search_company) != '') { $sql .= natural_search('d.societe', $search_company); } -if (trim($search_name) != '') -{ +if (trim($search_name) != '') { $sql .= natural_search(array('d.lastname', 'd.firstname'), $search_name); } -if ($search_amount) $sql .= natural_search('d.amount', $search_amount, 1); +if ($search_amount) { + $sql .= natural_search('d.amount', $search_amount, 1); +} $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -133,29 +141,45 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +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 ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($search_status && $search_status != -1) $param .= '&search_status='.urlencode($search_status); - if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); - if ($search_company) $param .= '&search_company='.urlencode($search_company); - if ($search_name) $param .= '&search_name='.urlencode($search_name); - if ($search_amount) $param .= '&search_amount='.urlencode($search_amount); + 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_status && $search_status != -1) { + $param .= '&search_status='.urlencode($search_status); + } + if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); + } + if ($search_company) { + $param .= '&search_company='.urlencode($search_company); + } + if ($search_name) { + $param .= '&search_name='.urlencode($search_name); + } + if ($search_amount) { + $param .= '&search_amount='.urlencode($search_amount); + } $newcardbutton = ''; - if ($user->rights->don->creer) - { + if ($user->rights->don->creer) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create'); } print ''."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -165,9 +189,10 @@ if ($resql) print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1); - if ($search_all) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; } @@ -194,8 +219,7 @@ if ($resql) print '
    '; print ' '; print ''; print ' '; print '
    ".$donationstatic->getFullName($langs)."'.dol_print_date($db->jdate($objp->datedon), 'day').'"; - if ($objp->pid) - { + if ($objp->pid) { $projectstatic->id = $objp->pid; $projectstatic->ref = $objp->ref; $projectstatic->id = $objp->pid; $projectstatic->public = $objp->public; $projectstatic->title = $objp->title; print $projectstatic->getNomUrl(1); - } else print ' '; + } else { + print ' '; + } print "'.price($objp->amount).''.price($objp->amount).''.$donationstatic->LibStatut($objp->status, 5).'
    '.$langs->trans('Amount').''.price($object->amount, 0, $ print '
    '.$langs->trans('Note').''.nl2br($object->note_public).'
    '.$langs->trans('PayedByThisPayment').'
    '; + + // Usage + print ''; + print ''; + + // Visibility + print ''; + + // Date start - end + print ''; + + // Budget + print ''; + + // Other attributes + $cols = 2; + $objectconf=$object; + $object = $project; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + $object = $objectconf; + + print '
    '; + print $langs->trans("Usage"); + print ''; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print 'usage_opportunity ? ' checked="checked"' : '').'"> '; + $htmltext = $langs->trans("ProjectFollowOpportunity"); + print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print '
    '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + print 'usage_task ? ' checked="checked"' : '').'"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print '
    '; + } + if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) { + print 'usage_bill_time ? ' checked="checked"' : '').'"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print '
    '; + } + if (!empty($conf->eventorganization->enabled)) { + print 'usage_organize_event ? ' checked="checked"' : '').'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } + print '
    '.$langs->trans("Visibility").''; + if ($project->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } + print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + $start = dol_print_date($project->date_start, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($project->date_end, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($object->hasDelay()) { + print img_warning("Late"); + } + print '
    '.$langs->trans("Budget").''; + if (strcmp($project->budget_amount, '')) { + print price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '; + + print '
    '; + print '
    '; + print '
    '; + print '
    '; + + print ''; + + // Description + print ''; + + // Categories + if ($conf->categorie->enabled) { + print '"; + } + + print '"; + + print '"; + + print '"; + + print '"; + + print '"; + + + print '
    '.$langs->trans("Description").''; + print nl2br($project->description); + print '
    '.$langs->trans("Categories").''; + print $form->showCategories($project->id, Categorie::TYPE_PROJECT, 1); + print "
    '; + $typeofdata = 'checkbox:'.($project->accept_conference_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + $typeofdata = 'checkbox:'.($project->accept_booth_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $project, $permissiontoadd, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $project, $permissiontoadd, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $project, $permissiontoadd, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfRegistration', 'price_registration', $project->price_registration, $project, $permissiontoadd, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $project, $permissiontoadd, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfBooth', 'price_booth', $project->price_booth, $project, $permissiontoadd, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '.$langs->trans("EventOrganizationICSLink").''; + print ''; + print "
    '; + + print '
    '; + print '
    '; + print ''; + + print '
    '; + + + print dol_get_fiche_end(); +} + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// 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.', ' : ''); + } +} +// Add fields from hooks +$parameters = array(); +$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.id = ef.fk_object)"; +} +$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as cact ON cact.id=t.fk_action AND cact.module LIKE '%@eventorganization'"; +// 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"; +} +if ($projectid > 0) { + $sql .= ' AND t.fk_project='.$project->id; +} +foreach ($search as $key => $val) { + if (array_key_exists($key, $object->fields)) { + 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) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) { + if ($search[$key] == '-1' || $search[$key] === '0') { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + } + } + } + } +} + +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, $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)) { + $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; + } +} +// 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); +} + +// 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('/eventorganization/conferenceorbooth_card.php', 1).'?id='.$id); + exit; +} + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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'; +// 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( + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$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 ''; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?action=create'.(!empty($project->id)?'&withproject=1&fk_project='.$project->id:'').(!empty($project->socid)?'&fk_soc='.$project->socid:'').'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($project->id)?'?projectid='.$project->id:''), '', $permissiontoadd); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail = "SendConferenceOrBoothRef"; +$modelmail = "conferenceorbooth"; +$objecttmp = new ConferenceOrBooth($db); +$trackid = 'xxxx'.$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'])) { + 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, $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['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\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"; + + +// 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) { + 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') { + $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'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'ref') { + print $object->getNomUrl(1, 0, '', (($projectid > 0)?'withproject':'')); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // 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 ''."\n"; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''; +} + + +$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 '
    '; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); + } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print ''; + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '
    '; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + } + print '
    '; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +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 '
    '.$langs->trans("NoRecordFound").'
    '."\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_eventorganization', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php new file mode 100644 index 00000000000..68f6c4eef13 --- /dev/null +++ b/htdocs/eventorganization/conferenceorboothattendee_card.php @@ -0,0 +1,706 @@ + + * 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 . + */ + +/** + * \file conferenceorboothattendee_card.php + * \ingroup eventorganization + * \brief Page to create/edit/view conferenceorboothattendee + */ + +require '../main.inc.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.'/eventorganization/class/conferenceorbooth.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("eventorganization", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +//$lineid = GETPOST('lineid', 'int'); + +$conf_or_booth_id = GETPOST('conforboothid', 'int'); +$withproject = GETPOST('withproject', 'int'); + +// Initialize technical objects +$object = new ConferenceOrBoothAttendee($db); +$extrafields = new ExtraFields($db); +$projectstatic = new Project($db); +$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('conferenceorboothattendeecard', 'globalcard')); // Note that conf->hooks_modules contains array + +if ($conf_or_booth_id > 0) { + $confOrBooth = new ConferenceOrBooth($db); + $result = $confOrBooth->fetch($conf_or_booth_id); + if ($result < 0) { + setEventMessages(null, $confOrBooth->errors, 'errors'); + } else { + $object->fk_actioncomm = $confOrBooth->id; + $object->fk_project = $confOrBooth->fk_project; + } +} + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$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 (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. + + +$permissiontoread = $user->rights->eventorganization->read; +$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissionnote = $user->rights->eventorganization->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1]; + +/* + * 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)) { + $error = 0; + + if (!empty($withproject)) { + $backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php?withproject=1', 1); + } else { + $backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_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_buildpath('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } + } + } + + $triggermodname = 'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_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 + 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'; + + // 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, $triggermodname); + } + if ($action == 'classin' && $permissiontoadd) { + $object->setProject(GETPOST('projectid', 'int')); + } + + // Actions to send emails + $triggersendname = 'EVENTORGANIZATION_CONFERENCEORBOOTHATTENDEE_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_CONFERENCEORBOOTHATTENDEE_TO'; + $trackid = 'conferenceorboothattendee'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; +} + + + + +/* + * View + * + * Put here all code to build page + */ + +$form = new Form($db); +$formfile = new FormFile($db); +$formproject = new FormProjets($db); + +$title = $langs->trans("ConferenceOrBoothAttendee"); +$help_url = ''; +llxHeader('', $title, $help_url); + +$result = $projectstatic->fetch($confOrBooth->fk_project); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); +} +if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); +} + +$withProjectUrl=''; +$object->project = clone $projectstatic; + +if (!empty($withproject)) { + // Tabs for project + $tab = 'eventorganisation'; + $withProjectUrl="&withproject=1"; + $head = project_prepare_head($projectstatic); + print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', ''); + + $param = ($mode == 'mine' ? '&mode=mine' : ''); + + // Project card + + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
    '; + // Title + $morehtmlref .= $projectstatic->title; + // Thirdparty + if ($projectstatic->thirdparty->id > 0) { + $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + } + $morehtmlref .= '
    '; + + // Define a complementary filter for search of next/prev ref. + if (!$user->rights->projet->all->lire) { + $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + } + + dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
    '; + print '
    '; + print '
    '; + + print ''; + + // Usage + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + print ''; + print ''; + } + + // Visibility + print ''; + + // Date start - end + print ''; + + // Budget + print ''; + + // Other attributes + $cols = 2; + //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print '
    '; + print $langs->trans("Usage"); + print ''; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowOpportunity"); + print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print '
    '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + print 'usage_task ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print '
    '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { + print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print '
    '; + } + if (!empty($conf->eventorganization->enabled)) { + print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } + print '
    '.$langs->trans("Visibility").''; + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } + print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + $start = dol_print_date($projectstatic->date_start, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($projectstatic->date_end, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '; + + print '
    '; + + print '
    '; + print '
    '; + print '
    '; + + print ''; + + // Description + print ''; + + // Categories + if ($conf->categorie->enabled) { + print '"; + } + + print '"; + + print '"; + + print '"; + + print '"; + + print '"; + + print '
    '.$langs->trans("Description").''; + print nl2br($projectstatic->description); + print '
    '.$langs->trans("Categories").''; + print $form->showCategories($projectstatic->id, 'project', 1); + print "
    '; + $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + $typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '.$langs->trans("EventOrganizationICSLink").''; + print ''; + print "
    '; + + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + + print dol_get_fiche_end(); + + print '
    '; +} + +// Part to create +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")), '', 'object_'.$object->picto); + + print '
    '; + print ''; + + if ($confOrBooth->id > 0) { + print ''; + } + + print ''; + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_fiche_head(array(), ''); + + // Set some default values + //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue'; + + print ''."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + print '
    '."\n"; + + print dol_get_fiche_end(); + + print '
    '; + print ''; + print '  '; + print ''; // Cancel for create does not post form if we don't know the backtopage + print '
    '; + + print '
    '; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("ConferenceOrBoothAttendee"), '', 'object_'.$object->picto); + + print '
    '; + print ''; + print ''; + print ''; + if ($confOrBooth->id > 0) { + print ''; + } + if ($object->fk_actioncomm > 0) { + print ''; + } + if ($backtopage) { + print ''; + } + if ($backtopageforcancel) { + print ''; + } + + print dol_get_fiche_head(); + + print ''."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + + print '
    '; + + print dol_get_fiche_end(); + + print '
    '; + print '   '; + print '
    '; + + print '
    '; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = conferenceorboothattendeePrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteConferenceOrBoothAttendee'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + 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 + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Confirmation of action xxxx + if ($action == 'xxx') { + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $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; + + + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; + + $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 '
    '; + print '
    '; + print ''."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + + print dol_get_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) { + // Show object lines + $result = $object->getLinesArray(); + + print '
    + + + + + '; + + 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 ''; + } + + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + $object->formAddObjectLine(1, $mysoc, $soc); + + $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 '
    '; + + 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'); + } + + if (empty($reshook)) { + // Send + if (empty($user->socid)) { + print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle'); + } + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&conforboothid='.$confOrBooth->id.'&action=edit', '', $permissiontoadd); + + // Clone + print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd); + + /* + if ($permissiontoadd) { + if ($object->status == $object::STATUS_ENABLED) { + print ''.$langs->trans("Disable").''."\n"; + } else { + print ''.$langs->trans("Enable").''."\n"; + } + } + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED) { + print ''.$langs->trans("Cancel").''."\n"; + } else { + print ''.$langs->trans("Re-Open").''."\n"; + } + } + */ + + // Delete (need delete permission, or if draft, just need create/modify permission) + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + } + print '
    '."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') { + print '
    '; + print ''; // ancre + + $includedocgeneration = 0; + + // Documents + if ($includedocgeneration) { + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->eventorganization->dir_output.'/'.$object->element.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $user->rights->eventorganization->conferenceorboothattendee->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->eventorganization->conferenceorboothattendee->write; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('eventorganization:ConferenceOrBoothAttendee', $object->element.'/'.$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('conferenceorboothattendee')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '
    '; + + print '
    '; + } + + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + // Presend form + $modelmail = 'conferenceorboothattendee'; + $defaulttopic = 'InformationMessage'; + $diroutput = $conf->eventorganization->dir_output; + $trackid = 'conferenceorboothattendee'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php new file mode 100644 index 00000000000..e282da6a4d9 --- /dev/null +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -0,0 +1,868 @@ + + * Copyright (C) 2021 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 . + */ + +/** + * \file conferenceorboothattendee_list.php + * \ingroup eventorganization + * \brief List page for conferenceorboothattendee + */ + +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +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.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php'; +if ($conf->categorie->enabled) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} + +// load eventorganization libraries +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; + +// for other modules +//dol_include_once('/othermodule/class/otherobject.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("eventorganization", "other")); + +$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') : 'conferenceorboothattendeelist'; // 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') + +$id = GETPOST('id', 'int'); +$conf_or_booth_id = GETPOST('conforboothid', 'int'); + +$withproject = GETPOST('withproject', 'int'); +$project_ref = GETPOST('project_ref', 'alpha'); + +$withProjectUrl=''; + +// 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 < 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; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object = new ConferenceOrBoothAttendee($db); +$extrafields = new ExtraFields($db); +$projectstatic = new Project($db); +$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('conferenceorboothattendeelist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (!$sortfield) { + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Initialize array of search criterias +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); +$search = array(); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +} + +// 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'])) { + $visible = (int) 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 +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +$permissiontoread = $user->rights->eventorganization->read; +$permissiontoadd = $user->rights->eventorganization->write; +$permissiontodelete = $user->rights->eventorganization->delete; + +// Security check +if (empty($conf->eventorganization->enabled)) { + accessforbidden('Module not enabled'); +} +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +$result = restrictedArea($user, 'eventorganization'); +if (!$permissiontoread) accessforbidden(); + + +/* + * 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 + foreach ($object->fields as $key => $val) { + $search[$key] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } + } + $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 + } + + // Mass actions + $objectclass = 'ConferenceOrBoothAttendee'; + $objectlabel = 'ConferenceOrBoothAttendee'; + $uploaddir = $conf->eventorganization->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form = new Form($db); + +$now = dol_now(); +$confOrBooth = new ConferenceOrBooth($db); +if ($conf_or_booth_id > 0) { + $result = $confOrBooth->fetch($conf_or_booth_id); + if ($result < 0) { + setEventMessages(null, $confOrBooth->errors, 'errors'); + } +} + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// 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.', ' : ''); + } +} +// Add fields from hooks +$parameters = array(); +$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"; +$sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as a on a.id=t.fk_actioncomm AND a.id=".$confOrBooth->id; +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) { + if (array_key_exists($key, $object->fields)) { + 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) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) { + if ($search[$key] == '-1' || $search[$key] === '0') { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + } + } + } + } +} +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, $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)) { + $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; + } +} +// 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); +} + +// 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('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +//$help_url="EN:Module_ConferenceOrBoothAttendee|FR:Module_ConferenceOrBoothAttendee_FR|ES:Módulo_ConferenceOrBoothAttendee"; +$help_url = ''; +$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("ConferenceOrBoothAttendee")); +$morejs = array(); +$morecss = array(); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); + +if ($confOrBooth->id > 0) { + $result = $projectstatic->fetch($confOrBooth->fk_project); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } + + $withProjectUrl=''; + $object->project = clone $projectstatic; + + if (!empty($withproject)) { + // Tabs for project + $tab = 'eventorganisation'; + $withProjectUrl="&withproject=1"; + $head = project_prepare_head($projectstatic); + print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', ''); + + $param = ($mode == 'mine' ? '&mode=mine' : ''); + + // Project card + + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '
    '; + // Title + $morehtmlref .= $projectstatic->title; + // Thirdparty + if ($projectstatic->thirdparty->id > 0) { + $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); + } + $morehtmlref .= '
    '; + + // Define a complementary filter for search of next/prev ref. + if (!$user->rights->projet->all->lire) { + $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + } + + dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
    '; + print '
    '; + print '
    '; + + print ''; + + // Usage + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { + print ''; + print ''; + } + + // Visibility + print ''; + + // Date start - end + print ''; + + // Budget + print ''; + + // Other attributes + $cols = 2; + //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + + print '
    '; + print $langs->trans("Usage"); + print ''; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowOpportunity"); + print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print '
    '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + print 'usage_task ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectFollowTasks"); + print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); + print '
    '; + } + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { + print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("ProjectBillTimeDescription"); + print $form->textwithpicto($langs->trans("BillTime"), $htmltext); + print '
    '; + } + if (!empty($conf->eventorganization->enabled)) { + print 'usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } + print '
    '.$langs->trans("Visibility").''; + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } + print '
    '.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").''; + $start = dol_print_date($projectstatic->date_start, 'day'); + print ($start ? $start : '?'); + $end = dol_print_date($projectstatic->date_end, 'day'); + print ' - '; + print ($end ? $end : '?'); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } + print '
    '.$langs->trans("Budget").''; + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } + print '
    '; + + print '
    '; + + print '
    '; + print '
    '; + print '
    '; + + print ''; + + // Description + print ''; + + // Categories + if ($conf->categorie->enabled) { + print '"; + } + + print '"; + + print '"; + + print '"; + + print '"; + + print '"; + + print '
    '.$langs->trans("Description").''; + print nl2br($projectstatic->description); + print '
    '.$langs->trans("Categories").''; + print $form->showCategories($projectstatic->id, 'project', 1); + print "
    '; + $typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + $typeofdata = 'checkbox:'.($projectstatic->accept_booth_suggestions ? ' checked="checked"' : ''); + $htmltext = $langs->trans("AllowUnknownPeopleSuggestBoothHelp"); + print $form->editfieldkey('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext); + print ''; + print $form->editfieldval('AllowUnknownPeopleSuggestBooth', 'accept_booth_suggestions', '1', $projectstatic, 0, $typeofdata, '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfRegistration', 'price_registration', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfRegistration', 'price_registration', $projectstatic->price_registration, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '; + print $form->editfieldkey('PriceOfBooth', 'price_booth', '', $projectstatic, 0, 'amount', '', 0, 0, 'projectid'); + print ''; + print $form->editfieldval('PriceOfBooth', 'price_booth', $projectstatic->price_booth, $projectstatic, 0, 'amount', '', 0, 0, '', 0, '', 'projectid'); + print "
    '.$langs->trans("EventOrganizationICSLink").''; + print ''; + print "
    '; + + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + + print dol_get_fiche_end(); + + print '
    '; + } + + $head = conferenceorboothPrepareHead($confOrBooth, $withproject); + print dol_get_fiche_head($head, 'attendees', $langs->trans("ConferenceOrBooth"), -1, $object->picto); + + + //$help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; + $title = $langs->trans("ConferenceOrBooth") . ' - ' . $langs->trans("Attendees") . ' - ' . $confOrBooth->id; + + $object_evt=$object; + $object=$confOrBooth; + + dol_banner_tab($object, 'ref', '', 0); + + print '
    '; + print '
    '; + print '
    '; + print ''."\n"; + + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + $object=$object_evt; + print '
    '; + print '
    '; + print '
    '; + + print '
    '; + + print dol_get_fiche_end(); +} + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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 ($confOrBooth->id > 0) { + $param .= '&conforboothid='.urlencode($confOrBooth->id).$withProjectUrl; +} + +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( + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$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 ''; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl), '', $permissiontoadd); + +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 = "SendConferenceOrBoothAttendeeRef"; +$modelmail = "conferenceorboothattendee"; +$objecttmp = new ConferenceOrBoothAttendee($db); +$trackid = 'xxxx'.$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'])) { + 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, $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['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\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"; + + +// 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) { + 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') { + $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'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'ref') { + print $object->getNomUrl(1, (!empty($withproject)?'conforboothidproject':'conforboothid')); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // 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 ''."\n"; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''; +} + + +$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 '
    '; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); + } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print ''; + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '
    '; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + } + print '
    '; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +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 '
    '.$langs->trans("NoRecordFound").'
    '."\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_eventorganization', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php new file mode 100644 index 00000000000..46620112311 --- /dev/null +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -0,0 +1,200 @@ + + * 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 . + */ + +/** + * \file conferenceorboothattendee_note.php + * \ingroup eventorganization + * \brief Tab for notes on ConferenceOrBoothAttendee + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +dol_include_once('/eventorganization/class/conferenceorboothattendee.class.php'); +dol_include_once('/eventorganization/lib/eventorganization_conferenceorboothattendee.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("eventorganization@eventorganization", "companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object = new ConferenceOrBoothAttendee($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->eventorganization->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('conferenceorboothattendeenote', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'eventorganization', $id); + +// 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->eventorganization->multidir_output[$object->entity]."/".$object->id; +} + +$permissionnote = $user->rights->eventorganization->conferenceorboothattendee->write; // Used by the include of actions_setnotes.inc.php +$permissiontoadd = $user->rights->eventorganization->conferenceorboothattendee->write; // Used by the include of actions_addupdatedelete.inc.php + + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + + +/* + * View + */ + +$form = new Form($db); + +//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$help_url = ''; +llxHeader('', $langs->trans('ConferenceOrBoothAttendee'), $help_url); + +if ($id > 0 || !empty($ref)) { + $object->fetch_thirdparty(); + + $head = conferenceorboothattendeePrepareHead($object); + + print dol_get_fiche_head($head, 'note', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto); + + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; + + $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 '
    '; + + + $cssclass = "titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '
    '; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/eventorganization/eventorganizationindex.php b/htdocs/eventorganization/eventorganizationindex.php new file mode 100644 index 00000000000..dc66f61daec --- /dev/null +++ b/htdocs/eventorganization/eventorganizationindex.php @@ -0,0 +1,212 @@ + + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry + * + * 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 eventorganization/eventorganizationindex.php + * \ingroup eventorganization + * \brief Home page of eventorganization top menu + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("eventorganization")); + +$action = GETPOST('action', 'aZ09'); + +$max = 5; +$now = dol_now(); + +// Security check +//$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +$result = restrictedArea($user, 'eventorganization'); + + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$form = new Form($db); +$formfile = new FormFile($db); + +$title = $langs->trans('EventOrganizationArea'); + +llxHeader('', $title, ''); + +print load_fiche_titre($langs->trans("EventOrganizationArea"), '', 'eventorganization.png@eventorganization'); + +print '
    '; + + +/* BEGIN MODULEBUILDER DRAFT MYOBJECT +// Draft MyObject +if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +{ + $langs->load("orders"); + + $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE c.fk_soc = s.rowid"; + $sql.= " AND c.fk_statut = 0"; + $sql.= " AND c.entity IN (".getEntity('commande').")"; + 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; + + $resql = $db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + + print ''; + print ''; + print ''; + + $var = true; + if ($num > 0) + { + $i = 0; + while ($i < $num) + { + + $obj = $db->fetch_object($resql); + print ''; + print ''; + print ''; + $i++; + $total += $obj->total_ttc; + } + if ($total>0) + { + + print '"; + } + } + else + { + + print ''; + } + print "
    '.$langs->trans("DraftMyObjects").($num?''.$num.'':'').'
    '; + + $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 ''; + print ''.price($obj->total_ttc).'
    '.$langs->trans("Total").''.price($total)."
    '.$langs->trans("NoOrder").'

    "; + + $db->free($resql); + } + else + { + dol_print_error($db); + } +} +END MODULEBUILDER DRAFT MYOBJECT */ + + +print '
    '; + + +$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + +/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT +// Last modified myobject +if (! empty($conf->eventorganization->enabled) && $user->rights->eventorganization->read) +{ + $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; + $sql.= " FROM ".MAIN_DB_PREFIX."eventorganization_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); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + print ''; + print ''; + print ''; + print ''; + print ''; + if ($num) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + + $myobjectstatic->id=$objp->rowid; + $myobjectstatic->ref=$objp->ref; + $myobjectstatic->label=$objp->label; + $myobjectstatic->status = $objp->status; + + print ''; + print ''; + print '"; + print '"; + print ''; + $i++; + } + + $db->free($resql); + } else { + print ''; + } + print "
    '; + print $langs->trans("BoxTitleLatestModifiedMyObjects", $max); + print ''.$langs->trans("DateModificationShort").'
    '.$myobjectstatic->getNomUrl(1).''; + print "'.dol_print_date($db->jdate($objp->tms), 'day')."
    '.$langs->trans("None").'

    "; + } +} +*/ + +print '
    '; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/zapier/img/object_hook.png b/htdocs/eventorganization/img/object_conferenceorboothattendee.png similarity index 100% rename from htdocs/zapier/img/object_hook.png rename to htdocs/eventorganization/img/object_conferenceorboothattendee.png diff --git a/htdocs/eventorganization/img/object_ttruc.png b/htdocs/eventorganization/img/object_ttruc.png new file mode 100644 index 00000000000..b421fe3c9e0 Binary files /dev/null and b/htdocs/eventorganization/img/object_ttruc.png differ diff --git a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php new file mode 100644 index 00000000000..7d6339a2ed0 --- /dev/null +++ b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php @@ -0,0 +1,137 @@ +. + */ + +/** + * \file lib/eventorganization_conferenceorbooth.lib.php + * \ingroup eventorganization + * \brief Library files with common functions for ConferenceOrBooth + */ + +/** + * Prepare array of tabs for ConferenceOrBooth + * + * @param ConferenceOrBooth $object ConferenceOrBooth + * @param int $with_project Add project id to URL + * @return array Array of tabs + */ +function conferenceorboothPrepareHead($object, $with_project = 0) +{ + global $db, $langs, $conf; + + $langs->load("eventorganization"); + + $h = 0; + $head = array(); + + $withProjectUrl=''; + if ($with_project>0) { + $withProjectUrl="&withproject=1"; + } + + $head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_card.php", 1).'?id='.$object->id.$withProjectUrl; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + $head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_contact.php", 1).'?id='.$object->id.$withProjectUrl; + $head[$h][1] = $langs->trans("ContactsAddresses"); + $head[$h][2] = 'contact'; + $h++; + + $head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_list.php", 1).'?conforboothid='.$object->id.$withProjectUrl; + $head[$h][1] = $langs->trans("Attendees"); + $head[$h][2] = 'attendees'; + // Enable caching of conf or booth count attendees + $nbAttendees = 0; + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_attendees_conferenceorbooth_'.$object->id; + $dataretrieved = dol_getcache($cachekey); + if (!is_null($dataretrieved)) { + $nbAttendees = $dataretrieved; + } else { + require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; + $attendees=new ConferenceOrBoothAttendee($db); + $result = $attendees->fetchAll('', '', 0, 0, array('t.fk_actioncomm'=>$object->id)); + if (!is_array($result) && $result<0) { + setEventMessages($attendees->error, $attendees->errors, 'errors'); + } else { + $nbAttendees = count($result); + } + dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. + } + if ($nbAttendees > 0) { + $head[$h][1] .= ''.$nbAttendees.''; + } + $h++; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->eventorganization->dir_output."/conferenceorbooth/".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_buildpath("/eventorganization/conferenceorbooth_document.php", 1).'?id='.$object->id.$withProjectUrl; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + } + $head[$h][2] = 'document'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@eventorganization:/eventorganization/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@eventorganization:/eventorganization/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorbooth@eventorganization'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorbooth@eventorganization', 'remove'); + + return $head; +} + + +/** + * Prepare array of tabs for ConferenceOrBoothAttendees + * + * @param ConferenceOrBoothAttendee $object ConferenceOrBoothAttendee + * @return array Array of tabs + */ +function conferenceorboothattendeePrepareHead($object) +{ + global $db, $langs, $conf; + + $langs->load("eventorganization"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_card.php", 1).'?id='.$object->id.'&conforboothid='.$object->fk_actioncomm; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + //TODO : Note and docuement + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorboothattendee@eventorganization'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'conferenceorboothattendee@eventorganization', 'remove'); + + return $head; +} diff --git a/htdocs/eventorganization/modulebuilder.txt b/htdocs/eventorganization/modulebuilder.txt new file mode 100644 index 00000000000..670a1774929 --- /dev/null +++ b/htdocs/eventorganization/modulebuilder.txt @@ -0,0 +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. \ No newline at end of file diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 264089ac48a..c204afcef72 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -46,9 +46,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +} +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->productbatch->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +} if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -57,25 +63,38 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); -if (!empty($conf->productbatch->enabled)) $langs->load('productbatch'); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} +if (!empty($conf->productbatch->enabled)) { + $langs->load('productbatch'); +} $origin = GETPOST('origin', 'alpha') ?GETPOST('origin', 'alpha') : 'expedition'; // Example: commande, propal $origin_id = GETPOST('id', 'int') ?GETPOST('id', 'int') : ''; $id = $origin_id; -if (empty($origin_id)) $origin_id = GETPOST('origin_id', 'int'); // Id of order or propal -if (empty($origin_id)) $origin_id = GETPOST('object_id', 'int'); // Id of order or propal +if (empty($origin_id)) { + $origin_id = GETPOST('origin_id', 'int'); // Id of order or propal +} +if (empty($origin_id)) { + $origin_id = GETPOST('object_id', 'int'); // Id of order or propal +} $ref = GETPOST('ref', 'alpha'); $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : ''; // Security check $socid = ''; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} -if ($origin == 'expedition') $result = restrictedArea($user, $origin, $id); -else { +if ($origin == 'expedition') { + $result = restrictedArea($user, $origin, $id); +} else { $result = restrictedArea($user, 'expedition'); - if (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); + if (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) { + accessforbidden(); + } } $action = GETPOST('action', 'alpha'); @@ -107,6 +126,13 @@ $permissiondellink = $user->rights->expedition->delivery->creer; // Used by the $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_deliverymin', 'int'), 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int')); +// Security check +if ($user->socid) { + $socid = $user->socid; +} + +$result = restrictedArea($user, 'expedition', $object->id, ''); + /* * Actions @@ -114,12 +140,12 @@ $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_d $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) - { +if (empty($reshook)) { + if ($cancel) { $action = ''; $object->fetch($id); // show shipment also after canceling modification } @@ -132,20 +158,17 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Reopen - if ($action == 'reopen' && $user->rights->expedition->creer) - { + if ($action == 'reopen' && $user->rights->expedition->creer) { $object->fetch($id); $result = $object->reOpen(); } // Set incoterm - if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) - { + if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } - if ($action == 'setref_customer') - { + if ($action == 'setref_customer') { $result = $object->fetch($id); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -161,34 +184,32 @@ if (empty($reshook)) } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('SHIPMENT_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } // Create shipment - if ($action == 'add' && $user->rights->expedition->creer) - { + if ($action == 'add' && $user->rights->expedition->creer) { $error = 0; - $predef = ''; $db->begin(); @@ -215,7 +236,6 @@ if (empty($reshook)) $object->fk_delivery_address = $objectsrc->fk_delivery_address; $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); $object->tracking_number = GETPOST('tracking_number', 'alpha'); - $object->ref_int = GETPOST('ref_int', 'alpha'); $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); @@ -228,8 +248,7 @@ if (empty($reshook)) $num = count($objectsrc->lines); $totalqty = 0; - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $idl = "idl".$i; $sub_qty = array(); @@ -240,14 +259,11 @@ if (empty($reshook)) $stockLocation = "ent1".$i."_0"; $qty = "qtyl".$i; - if (!empty($conf->productbatch->enabled) && $objectsrc->lines[$i]->product_tobatch) // If product need a batch number - { - if (GETPOSTISSET($batch)) - { + if (!empty($conf->productbatch->enabled) && $objectsrc->lines[$i]->product_tobatch) { // If product need a batch number + if (GETPOSTISSET($batch)) { //shipment line with batch-enable product $qty .= '_'.$j; - while (GETPOSTISSET($batch)) - { + while (GETPOSTISSET($batch)) { // save line of detail into sub_qty $sub_qty[$j]['q'] = GETPOST($qty, 'int'); // the qty we want to move for this stock record $sub_qty[$j]['id_batch'] = GETPOST($batch, 'int'); // the id into llx_product_batch of stock record to move @@ -266,9 +282,8 @@ if (empty($reshook)) $totalqty += $subtotalqty; } else { - // No detail were provided for lots - if (!empty($_POST[$qty])) - { + // No detail were provided for lots, so if a qty was provided, we can show an error. + if (GETPOST($qty)) { // We try to set an amount // Case we dont use the list of available qty for each warehouse/lot // GUI does not allow this yet @@ -278,8 +293,7 @@ if (empty($reshook)) } elseif (GETPOSTISSET($stockLocation)) { //shipment line from multiple stock locations $qty .= '_'.$j; - while (GETPOSTISSET($stockLocation)) - { + while (GETPOSTISSET($stockLocation)) { // save sub line of warehouse $stockLine[$i][$j]['qty'] = price2num(GETPOST($qty, 'alpha'), 'MS'); $stockLine[$i][$j]['warehouse_id'] = GETPOST($stockLocation, 'int'); @@ -294,7 +308,9 @@ if (empty($reshook)) } else { //var_dump(GETPOST($qty,'alpha')); var_dump($_POST); var_dump($batch);exit; //shipment line for product with no batch management and no multiple stock location - if (GETPOST($qty, 'int') > 0) $totalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); + if (GETPOST($qty, 'int') > 0) { + $totalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); + } } // Extrafields @@ -310,43 +326,38 @@ if (empty($reshook)) //var_dump($batch_line[2]); - if ($totalqty > 0) // There is at least one thing to ship - { + if ($totalqty > 0) { // There is at least one thing to ship //var_dump($_POST);exit; - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $qty = "qtyl".$i; - if (!isset($batch_line[$i])) - { + if (!isset($batch_line[$i])) { // not batch mode - if (isset($stockLine[$i])) - { + if (isset($stockLine[$i])) { //shipment from multiple stock locations $nbstockline = count($stockLine[$i]); - for ($j = 0; $j < $nbstockline; $j++) - { - if ($stockLine[$i][$j]['qty'] > 0) - { + for ($j = 0; $j < $nbstockline; $j++) { + if ($stockLine[$i][$j]['qty'] > 0) { $ret = $object->addline($stockLine[$i][$j]['warehouse_id'], $stockLine[$i][$j]['ix_l'], $stockLine[$i][$j]['qty'], $array_options[$i]); - if ($ret < 0) - { + if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } } } else { - if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) - { + if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { $ent = "entl".$i; $idl = "idl".$i; $entrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int'); - if ($entrepot_id < 0) $entrepot_id = ''; - if (!($objectsrc->lines[$i]->fk_product > 0)) $entrepot_id = 0; + if ($entrepot_id < 0) { + $entrepot_id = ''; + } + if (!($objectsrc->lines[$i]->fk_product > 0)) { + $entrepot_id = 0; + } $ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i]); - if ($ret < 0) - { + if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -354,11 +365,9 @@ if (empty($reshook)) } } else { // batch mode - if ($batch_line[$i]['qty'] > 0) - { + if ($batch_line[$i]['qty'] > 0) { $ret = $object->addline_batch($batch_line[$i], $array_options[$i]); - if ($ret < 0) - { + if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -367,13 +376,13 @@ if (empty($reshook)) } // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $ret = $object->create($user); // This create shipment (like Odoo picking) and lines of shipments. Stock movement will be done when validating shipment. - if ($ret <= 0) - { + if ($ret <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -383,8 +392,7 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $db->commit(); header("Location: card.php?id=".$object->id); exit; @@ -393,16 +401,10 @@ if (empty($reshook)) $_GET["commande_id"] = GETPOST('commande_id', 'int'); $action = 'create'; } - } - - /* - * Build a receiving receipt - */ - elseif ($action == 'create_delivery' && $conf->delivery_note->enabled && $user->rights->expedition->delivery->creer) - { + } elseif ($action == 'create_delivery' && $conf->delivery_note->enabled && $user->rights->expedition->delivery->creer) { + // Build a receiving receipt $result = $object->create_delivery($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/delivery/card.php?action=create_delivery&id='.$result); exit; } else { @@ -410,9 +412,8 @@ if (empty($reshook)) } } elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) - ) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) + ) { $object->fetch_thirdparty(); $result = $object->valid($user); @@ -421,12 +422,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } else { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -435,57 +439,47 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } } - } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->expedition->supprimer) - { + } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); $result = $object->cancel(0, $also_update_stock); - if ($result > 0) - { + if ($result > 0) { $result = $object->setStatut(-1); } else { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); $result = $object->delete(0, $also_update_stock); - if ($result > 0) - { + if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - // TODO add alternative status - /*elseif ($action == 'reopen' && (! empty($user->rights->expedition->creer) || ! empty($user->rights->expedition->shipping_advance->validate))) - { - $result = $object->setStatut(0); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - } - }*/ - - elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) - { + // TODO add alternative status + //} elseif ($action == 'reopen' && (! empty($user->rights->expedition->creer) || ! empty($user->rights->expedition->shipping_advance->validate))) + //{ + // $result = $object->setStatut(0); + // if ($result < 0) + // { + // setEventMessages($object->error, $object->errors, 'errors'); + // } + //} + } elseif ($action == 'setdate_livraison' && $user->rights->expedition->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $object->fetch($id); $result = $object->setDeliveryDate($user, $datedelivery); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Action update - elseif ( - ($action == 'settracking_number' + } elseif (($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' || $action == 'settrueWidth' @@ -493,28 +487,36 @@ if (empty($reshook)) || $action == 'settrueDepth' || $action == 'setshipping_method_id') && $user->rights->expedition->creer - ) - { + ) { + // Action update $error = 0; - if ($action == 'settracking_number') $object->tracking_number = trim(GETPOST('tracking_number', 'alpha')); - if ($action == 'settracking_url') $object->tracking_url = trim(GETPOST('tracking_url', 'int')); + if ($action == 'settracking_number') { + $object->tracking_number = trim(GETPOST('tracking_number', 'alpha')); + } + if ($action == 'settracking_url') { + $object->tracking_url = trim(GETPOST('tracking_url', 'int')); + } if ($action == 'settrueWeight') { $object->trueWeight = trim(GETPOST('trueWeight', 'int')); $object->weight_units = GETPOST('weight_units', 'int'); } - if ($action == 'settrueWidth') $object->trueWidth = trim(GETPOST('trueWidth', 'int')); + if ($action == 'settrueWidth') { + $object->trueWidth = trim(GETPOST('trueWidth', 'int')); + } if ($action == 'settrueHeight') { $object->trueHeight = trim(GETPOST('trueHeight', 'int')); $object->size_units = GETPOST('size_units', 'int'); } - if ($action == 'settrueDepth') $object->trueDepth = trim(GETPOST('trueDepth', 'int')); - if ($action == 'setshipping_method_id') $object->shipping_method_id = trim(GETPOST('shipping_method_id', 'int')); + if ($action == 'settrueDepth') { + $object->trueDepth = trim(GETPOST('trueDepth', 'int')); + } + if ($action == 'setshipping_method_id') { + $object->shipping_method_id = trim(GETPOST('shipping_method_id', 'int')); + } - if (!$error) - { - if ($object->update($user) >= 0) - { + if (!$error) { + if ($object->update($user) >= 0) { header("Location: card.php?id=".$object->id); exit; } @@ -522,17 +524,15 @@ if (empty($reshook)) } $action = ""; - } elseif ($action == 'classifybilled') - { + } elseif ($action == 'classifybilled') { $object->fetch($id); - $result = $object->set_billed(); + $result = $object->setBilled(); if ($result >= 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); } setEventMessages($object->error, $object->errors, 'errors'); - } elseif ($action == 'classifyclosed') - { + } elseif ($action == 'classifyclosed') { $object->fetch($id); $result = $object->setClosed(); if ($result >= 0) { @@ -540,37 +540,27 @@ if (empty($reshook)) exit(); } setEventMessages($object->error, $object->errors, 'errors'); - } - - /* - * delete a line - */ - elseif ($action == 'deleteline' && !empty($line_id)) - { + } elseif ($action == 'deleteline' && !empty($line_id)) { + // delete a line $object->fetch($id); $lines = $object->lines; $line = new ExpeditionLigne($db); $num_prod = count($lines); - for ($i = 0; $i < $num_prod; $i++) - { - if ($lines[$i]->id == $line_id) - { - if (count($lines[$i]->details_entrepot) > 1) - { + for ($i = 0; $i < $num_prod; $i++) { + if ($lines[$i]->id == $line_id) { + if (count($lines[$i]->details_entrepot) > 1) { // delete multi warehouse lines foreach ($lines[$i]->details_entrepot as $details_entrepot) { $line->id = $details_entrepot->line_id; - if (!$error && $line->delete($user) < 0) - { + if (!$error && $line->delete($user) < 0) { $error++; } } } else { // delete single warehouse line $line->id = $line_id; - if (!$error && $line->delete($user) < 0) - { + if (!$error && $line->delete($user) < 0) { $error++; } } @@ -584,13 +574,8 @@ if (empty($reshook)) } else { setEventMessages($line->error, $line->errors, 'errors'); } - } - - /* - * Update a line - */ - elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) - { + } elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('save')) { + // Update a line // Clean parameters $qty = 0; $entrepot_id = 0; @@ -598,10 +583,8 @@ if (empty($reshook)) $lines = $object->lines; $num_prod = count($lines); - for ($i = 0; $i < $num_prod; $i++) - { - if ($lines[$i]->id == $line_id) // we have found line to update - { + for ($i = 0; $i < $num_prod; $i++) { + if ($lines[$i]->id == $line_id) { // we have found line to update $line = new ExpeditionLigne($db); // Extrafields Lines @@ -613,28 +596,25 @@ if (empty($reshook)) } } $line->fk_product = $lines[$i]->fk_product; - if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) - { + if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { // line with lot - foreach ($lines[$i]->detail_batch as $detail_batch) - { + foreach ($lines[$i]->detail_batch as $detail_batch) { $lotStock = new Productbatch($db); $batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock; $qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id; $batch_id = GETPOST($batch, 'int'); $batch_qty = GETPOST($qty, 'int'); - if (!empty($batch_id) && ($batch_id != $detail_batch->fk_origin_stock || $batch_qty != $detail_batch->qty)) - { - if ($lotStock->fetch($batch_id) > 0 && $line->fetch($detail_batch->fk_expeditiondet) > 0) // $line is ExpeditionLine - { - if ($lines[$i]->entrepot_id != 0) - { + if (!empty($batch_id) && ($batch_id != $detail_batch->fk_origin_stock || $batch_qty != $detail_batch->qty)) { + if ($lotStock->fetch($batch_id) > 0 && $line->fetch($detail_batch->fk_expeditiondet) > 0) { // $line is ExpeditionLine + if ($lines[$i]->entrepot_id != 0) { // allow update line entrepot_id if not multi warehouse shipping $line->entrepot_id = $lotStock->warehouseid; } // detail_batch can be an object with keys, or an array of ExpeditionLineBatch - if (empty($line->detail_batch)) $line->detail_batch = new stdClass(); + if (empty($line->detail_batch)) { + $line->detail_batch = new stdClass(); + } $line->detail_batch->fk_origin_stock = $batch_id; $line->detail_batch->batch = $lotStock->batch; @@ -660,34 +640,25 @@ if (empty($reshook)) $batch_id = GETPOST($batch, 'int'); $batch_qty = GETPOST($qty, 'int'); $lineIdToAddLot = 0; - if ($batch_qty > 0 && !empty($batch_id)) - { - if ($lotStock->fetch($batch_id) > 0) - { + if ($batch_qty > 0 && !empty($batch_id)) { + if ($lotStock->fetch($batch_id) > 0) { // check if lotStock warehouse id is same as line warehouse id - if ($lines[$i]->entrepot_id > 0) - { + if ($lines[$i]->entrepot_id > 0) { // single warehouse shipment line - if ($lines[$i]->entrepot_id == $lotStock->warehouseid) - { + if ($lines[$i]->entrepot_id == $lotStock->warehouseid) { $lineIdToAddLot = $line_id; } - } elseif (count($lines[$i]->details_entrepot) > 1) - { + } elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines - foreach ($lines[$i]->details_entrepot as $detail_entrepot) - { - if ($detail_entrepot->entrepot_id == $lotStock->warehouseid) - { + foreach ($lines[$i]->details_entrepot as $detail_entrepot) { + if ($detail_entrepot->entrepot_id == $lotStock->warehouseid) { $lineIdToAddLot = $detail_entrepot->line_id; } } } - if ($lineIdToAddLot) - { + if ($lineIdToAddLot) { // add lot to existing line - if ($line->fetch($lineIdToAddLot) > 0) - { + if ($line->fetch($lineIdToAddLot) > 0) { $line->detail_batch->fk_origin_stock = $batch_id; $line->detail_batch->batch = $lotStock->batch; $line->detail_batch->entrepot_id = $lotStock->warehouseid; @@ -709,8 +680,7 @@ if (empty($reshook)) $line->detail_batch[0]->batch = $lotStock->batch; $line->detail_batch[0]->entrepot_id = $lotStock->warehouseid; $line->detail_batch[0]->qty = $batch_qty; - if ($object->create_line_batch($line, $line->array_options) < 0) - { + if ($object->create_line_batch($line, $line->array_options) < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -721,11 +691,9 @@ if (empty($reshook)) } } } else { - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { // line without lot - if ($lines[$i]->entrepot_id > 0) - { + if ($lines[$i]->entrepot_id > 0) { // single warehouse shipment line $stockLocation = "entl".$line_id; $qty = "qtyl".$line_id; @@ -738,17 +706,14 @@ if (empty($reshook)) } unset($_POST[$stockLocation]); unset($_POST[$qty]); - } elseif (count($lines[$i]->details_entrepot) > 1) - { + } elseif (count($lines[$i]->details_entrepot) > 1) { // multi warehouse shipment lines - foreach ($lines[$i]->details_entrepot as $detail_entrepot) - { + foreach ($lines[$i]->details_entrepot as $detail_entrepot) { if (!$error) { $stockLocation = "entl".$detail_entrepot->line_id; $qty = "qtyl".$detail_entrepot->line_id; $warehouse = GETPOST($stockLocation, 'int'); - if (!empty($warehouse)) - { + if (!empty($warehouse)) { $line->id = $detail_entrepot->line_id; $line->entrepot_id = $warehouse; $line->qty = GETPOST($qty, 'int'); @@ -785,10 +750,12 @@ if (empty($reshook)) // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -809,7 +776,9 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - if (empty($id)) $id = $facid; + if (empty($id)) { + $id = $facid; + } $triggersendname = 'SHIPPING_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromshipment'; @@ -822,19 +791,22 @@ if (empty($reshook)) * View */ -llxHeader('', $langs->trans('Shipment'), 'Expedition'); +$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen'; + +llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $product_static = new Product($db); $shipment_static = new Expedition($db); $warehousestatic = new Entrepot($db); -if ($action == 'create2') -{ +if ($action == 'create2') { print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); print '
    '.$langs->trans("ShipmentCreationIsDoneFromOrder"); @@ -842,31 +814,29 @@ if ($action == 'create2') } // Mode creation. -if ($action == 'create') -{ +if ($action == 'create') { $expe = new Expedition($db); print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); - if (!$origin) - { + if (!$origin) { setEventMessages($langs->trans("ErrorBadParameters"), null, 'errors'); } - if ($origin) - { + if ($origin) { $classname = ucfirst($origin); $object = new $classname($db); - if ($object->fetch($origin_id)) // This include the fetch_lines - { + if ($object->fetch($origin_id)) { // This include the fetch_lines $soc = new Societe($db); $soc->fetch($object->socid); $author = new User($db); $author->fetch($object->user_author_id); - if (!empty($conf->stock->enabled)) $entrepot = new Entrepot($db); + if (!empty($conf->stock->enabled)) { + $entrepot = new Entrepot($db); + } print '
    '; print ''; @@ -874,8 +844,7 @@ if ($action == 'create') print ''; print ''; print ''; - if (GETPOST('entrepot_id', 'int')) - { + if (GETPOST('entrepot_id', 'int')) { print ''; } @@ -885,12 +854,10 @@ if ($action == 'create') // Ref print ''; - if ($origin == 'commande' && !empty($conf->commande->enabled)) - { + if ($origin == 'commande' && !empty($conf->commande->enabled)) { print $langs->trans("RefOrder"); } - if ($origin == 'propal' && !empty($conf->propal->enabled)) - { + if ($origin == 'propal' && !empty($conf->propal->enabled)) { print $langs->trans("RefProposal"); } print ''; @@ -900,9 +867,13 @@ if ($action == 'create') // Ref client print ''; - if ($origin == 'commande') print $langs->trans('RefCustomerOrder'); - elseif ($origin == 'propal') print $langs->trans('RefCustomerOrder'); - else print $langs->trans('RefCustomer'); + if ($origin == 'commande') { + print $langs->trans('RefCustomerOrder'); + } elseif ($origin == 'propal') { + print $langs->trans('RefCustomerOrder'); + } else { + print $langs->trans('RefCustomer'); + } print ''; print ''; print ''; @@ -914,11 +885,14 @@ if ($action == 'create') print ''; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; - if (empty($projectid) && !empty($object->fk_project)) $projectid = $object->fk_project; - if ($origin == 'project') $projectid = ($originid ? $originid : 0); + if (empty($projectid) && !empty($object->fk_project)) { + $projectid = $object->fk_project; + } + if ($origin == 'project') { + $projectid = ($originid ? $originid : 0); + } $langs->load("projects"); print ''; @@ -941,16 +915,15 @@ if ($action == 'create') // Note Public print ''.$langs->trans("NotePublic").''; print ''; - $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ""; // Note Private - if ($object->note_private && !$user->socid) - { + if ($object->note_private && !$user->socid) { print ''.$langs->trans("NotePrivate").''; print ''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ""; } @@ -980,7 +953,9 @@ if ($action == 'create') print ''; $expe->fetch_delivery_methods(); print $form->selectarray("shipping_method_id", $expe->meths, GETPOST('shipping_method_id', 'int'), 1, 0, 0, "", 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print "\n"; // Tracking number @@ -1004,8 +979,7 @@ if ($action == 'create') // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; print ''; print ''; @@ -1015,12 +989,11 @@ if ($action == 'create') // Document model include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; - $liste = ModelePdfExpedition::liste_modeles($db); - if (count($liste) > 1) - { + $list = ModelePdfExpedition::liste_modeles($db); + if (count($list) > 1) { print "".$langs->trans("DefaultModel").""; print ''; - print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print $form->selectarray('model', $list, $conf->global->EXPEDITION_ADDON_PDF); print "\n"; } @@ -1037,10 +1010,11 @@ if ($action == 'create') jQuery(document).ready(function() { jQuery("#autofill").click(function() {'; $i = 0; - while ($i < $numAsked) - { + while ($i < $numAsked) { print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; - if (!empty($conf->productbatch->enabled)) print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; + if (!empty($conf->productbatch->enabled)) { + print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; + } $i++; } print '}); @@ -1055,26 +1029,22 @@ if ($action == 'create') // Load shipments already done for same order $object->loadExpeditions(); - if ($numAsked) - { + if ($numAsked) { print ''; print ''.$langs->trans("Description").''; print ''.$langs->trans("QtyOrdered").''; print ''.$langs->trans("QtyShipped").''; print ''.$langs->trans("QtyToShip"); - if (empty($conf->productbatch->enabled)) - { - print '
    '.$langs->trans("Fill").''; + if (empty($conf->productbatch->enabled)) { + print '
    '.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').$langs->trans("Fill").''; print ' / '; } else { print '
    '; } print ''.img_picto($langs->trans("Reset"), 'eraser').''; print ''; - if (!empty($conf->stock->enabled)) - { - if (empty($conf->productbatch->enabled)) - { + if (!empty($conf->stock->enabled)) { + if (empty($conf->productbatch->enabled)) { print ''.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')'; } else { print ''.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')'; @@ -1084,31 +1054,34 @@ if ($action == 'create') } $indiceAsked = 0; - while ($indiceAsked < $numAsked) - { + while ($indiceAsked < $numAsked) { $product = new Product($db); $line = $object->lines[$indiceAsked]; $parameters = array('i' => $indiceAsked, 'line' => $line, 'num' => $numAsked); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Show product and description $type = $line->product_type ? $line->product_type : $line->fk_product_type; // Try to enhance type detection using date_start and date_end for free lines where type // was not saved. - if (!empty($line->date_start)) $type = 1; - if (!empty($line->date_end)) $type = 1; + if (!empty($line->date_start)) { + $type = 1; + } + if (!empty($line->date_end)) { + $type = 1; + } print ''."\n"; print ''."\n"; // Product label - if ($line->fk_product > 0) // If predefined product - { + if ($line->fk_product > 0) { // If predefined product $product->fetch($line->fk_product); $product->load_stock('warehouseopen'); // Load all $product->stock_warehouse[idwarehouse]->detail_batch //var_dump($product->stock_warehouse[1]); @@ -1133,16 +1106,18 @@ if ($action == 'create') print_date_range($db->jdate($line->date_start), $db->jdate($line->date_end)); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print ($line->desc && $line->desc != $line->product_label) ? '
    '.dol_htmlentitiesbr($line->desc) : ''; } print ''; } else { print ""; - if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($line->label)) { $text .= ' '.$line->label.''; @@ -1171,8 +1146,7 @@ if ($action == 'create') // Qty to ship $quantityAsked = $line->qty; - if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $quantityToBeDelivered = 0; } else { $quantityToBeDelivered = $quantityAsked - $quantityDelivered; @@ -1180,37 +1154,37 @@ if ($action == 'create') $warehouse_id = GETPOST('entrepot_id', 'int'); $warehouseObject = null; - if ($warehouse_id > 0 || !($line->fk_product > 0) || empty($conf->stock->enabled)) // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection - { + if ($warehouse_id > 0 || !($line->fk_product > 0) || empty($conf->stock->enabled)) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection print ''; //ship from preselected location $stock = + $product->stock_warehouse[$warehouse_id]->real; // Convert to number $deliverableQty = min($quantityToBeDelivered, $stock); - if ($deliverableQty < 0) $deliverableQty = 0; - if (empty($conf->productbatch->enabled) || !$product->hasbatch()) - { + if ($deliverableQty < 0) { + $deliverableQty = 0; + } + if (empty($conf->productbatch->enabled) || !$product->hasbatch()) { // Quantity to send print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int'); + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if (GETPOST('qtyl'.$indiceAsked, 'int')) { + $deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int'); + } print ''; print ''; - } else print $langs->trans("NA"); + } else { + print $langs->trans("NA"); + } print ''; // Stock - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Type of product need stock change ? - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Type of product need stock change ? // Show warehouse combo list $ent = "entl".$indiceAsked; $idl = "idl".$indiceAsked; $tmpentrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : $warehouse_id; - if ($line->fk_product > 0) - { + if ($line->fk_product > 0) { print ''; $stockMin = false; @@ -1219,11 +1193,9 @@ if ($action == 'create') } print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', '', 1, $stockMin, 'stock DESC, e.ref'); - if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) - { + if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) { //print $stock.' '.$quantityToBeDelivered; - if ($stock < $quantityToBeDelivered) - { + if ($stock < $quantityToBeDelivered) { print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse } } @@ -1237,23 +1209,19 @@ if ($action == 'create') print "\n"; // Show subproducts of product - if (!empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) { $product->get_sousproduits_arbo(); $prods_arbo = $product->get_arbo_each_prod($qtyProdCom); - if (count($prods_arbo) > 0) - { - foreach ($prods_arbo as $key => $value) - { + if (count($prods_arbo) > 0) { + foreach ($prods_arbo as $key => $value) { //print $value[0]; $img = ''; - if ($value['stock'] < $value['stock_alert']) - { + if ($value['stock'] < $value['stock_alert']) { $img = img_warning($langs->trans("StockTooLow")); } print "      -> ".$value['fullpath']." - (".$value['nb'].") ".$value['nb_total']."   + (".$value['nb'].") ".$value['nb_total']."   ".$value['stock']." ".$img.""; } } @@ -1264,23 +1232,21 @@ if ($action == 'create') print ''; $staticwarehouse = new Entrepot($db); - if ($warehouse_id > 0) $staticwarehouse->fetch($warehouse_id); + if ($warehouse_id > 0) { + $staticwarehouse->fetch($warehouse_id); + } $subj = 0; // Define nb of lines suggested for this order line $nbofsuggested = 0; - if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) - { - foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) - { + if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { + foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { $nbofsuggested++; } } print ''; - if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) - { - foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) // $dbatch is instance of Productbatch - { + if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { + foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { // $dbatch is instance of Productbatch //var_dump($dbatch); $batchStock = + $dbatch->qty; // To get a numeric $deliverableQty = min($quantityToBeDelivered, $batchStock); @@ -1309,8 +1275,7 @@ if ($action == 'create') print $detail; $quantityToBeDelivered -= $deliverableQty; - if ($quantityToBeDelivered < 0) - { + if ($quantityToBeDelivered < 0) { $quantityToBeDelivered = 0; } $subj++; @@ -1329,8 +1294,7 @@ if ($action == 'create') } } else { // ship from multiple locations - if (empty($conf->productbatch->enabled) || !$product->hasbatch()) - { + if (empty($conf->productbatch->enabled) || !$product->hasbatch()) { print ''; print ''."\n"; // end line and start a new one for each warehouse @@ -1338,38 +1302,33 @@ if ($action == 'create') $subj = 0; // Define nb of lines suggested for this order line $nbofsuggested = 0; - foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) - { - if ($stock_warehouse->real > 0) - { + foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { + if ($stock_warehouse->real > 0) { $nbofsuggested++; } } $tmpwarehouseObject = new Entrepot($db); - foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) // $stock_warehouse is product_stock - { + foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { // $stock_warehouse is product_stock $tmpwarehouseObject->fetch($warehouse_id); - if ($stock_warehouse->real > 0) - { + if ($stock_warehouse->real > 0) { $stock = + $stock_warehouse->real; // Convert it to number $deliverableQty = min($quantityToBeDelivered, $stock); $deliverableQty = max(0, $deliverableQty); // Quantity to send print ''; print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print ''; print ''; - } else print $langs->trans("NA"); + } else { + print $langs->trans("NA"); + } print ''; // Stock - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print $tmpwarehouseObject->getNomUrl(0).' '; print ''; @@ -1380,8 +1339,7 @@ if ($action == 'create') print ''; } $quantityToBeDelivered -= $deliverableQty; - if ($quantityToBeDelivered < 0) - { + if ($quantityToBeDelivered < 0) { $quantityToBeDelivered = 0; } $subj++; @@ -1389,24 +1347,20 @@ if ($action == 'create') } } // Show subproducts of product (not recommanded) - if (!empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) { $product->get_sousproduits_arbo(); $prods_arbo = $product->get_arbo_each_prod($qtyProdCom); - if (count($prods_arbo) > 0) - { - foreach ($prods_arbo as $key => $value) - { + if (count($prods_arbo) > 0) { + foreach ($prods_arbo as $key => $value) { //print $value[0]; $img = ''; - if ($value['stock'] < $value['stock_alert']) - { + if ($value['stock'] < $value['stock_alert']) { $img = img_warning($langs->trans("StockTooLow")); } print ''; print "      -> ".$value['fullpath']." - (".$value['nb'].") ".$value['nb_total']."   + (".$value['nb'].") ".$value['nb_total']."   ".$value['stock']." ".$img.""; print ""; } @@ -1423,25 +1377,23 @@ if ($action == 'create') $productlotObject = new Productlot($db); // Define nb of lines suggested for this order line $nbofsuggested = 0; - foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) - { + foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) { - foreach ($stock_warehouse->detail_batch as $dbatch) - { + foreach ($stock_warehouse->detail_batch as $dbatch) { $nbofsuggested++; } } } - foreach ($product->stock_warehouse as $warehouse_id=>$stock_warehouse) - { + foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) { $tmpwarehouseObject->fetch($warehouse_id); if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) { - foreach ($stock_warehouse->detail_batch as $dbatch) - { + foreach ($stock_warehouse->detail_batch as $dbatch) { //var_dump($dbatch); $batchStock = + $dbatch->qty; // To get a numeric $deliverableQty = min($quantityToBeDelivered, $batchStock); - if ($deliverableQty < 0) $deliverableQty = 0; + if ($deliverableQty < 0) { + $deliverableQty = 0; + } print ''; print ''; print ''; @@ -1456,12 +1408,14 @@ if ($action == 'create') //print '|'.$line->fk_product.'|'.$dbatch->batch.'|
    '; print $langs->trans("Batch").': '; $result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch); - if ($result > 0) print $productlotObject->getNomUrl(1); - else print 'TableLotIncompleteRunRepairWithParamStandardEqualConfirmed'; + if ($result > 0) { + print $productlotObject->getNomUrl(1); + } else { + print 'TableLotIncompleteRunRepairWithParamStandardEqualConfirmed'; + } print ' ('.$dbatch->qty.')'; $quantityToBeDelivered -= $deliverableQty; - if ($quantityToBeDelivered < 0) - { + if ($quantityToBeDelivered < 0) { $quantityToBeDelivered = 0; } //dol_syslog('deliverableQty = '.$deliverableQty.' batchStock = '.$batchStock); @@ -1471,18 +1425,15 @@ if ($action == 'create') } } } - if ($subj == 0) // Line not shown yet, we show it - { + if ($subj == 0) { // Line not shown yet, we show it $warehouse_selected_id = GETPOST('entrepot_id', 'int'); print ''; print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $disabled = ''; - if (!empty($conf->productbatch->enabled) && $product->hasbatch()) - { + if (!empty($conf->productbatch->enabled) && $product->hasbatch()) { $disabled = 'disabled="disabled"'; } if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty. @@ -1495,16 +1446,17 @@ if ($action == 'create') print ''; print ''; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - if ($warehouse_selected_id > 0) - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if ($warehouse_selected_id > 0) { $warehouseObject = new Entrepot($db); $warehouseObject->fetch($warehouse_selected_id); print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); } else { - if ($line->fk_product) print img_warning().' '.$langs->trans("StockTooLow"); - else print ''; + if ($line->fk_product) { + print img_warning().' '.$langs->trans("StockTooLow"); + } else { + print ''; + } } } else { print $langs->trans("Service"); @@ -1515,8 +1467,7 @@ if ($action == 'create') } // Line extrafield - if (!empty($extrafields)) - { + if (!empty($extrafields)) { //var_dump($line); $colspan = 5; $expLine = new ExpeditionLigne($db); @@ -1550,21 +1501,18 @@ if ($action == 'create') dol_print_error($db); } } -} elseif ($id || $ref) -/* *************************************************************************** */ -/* */ -/* Edit and view mode */ -/* */ -/* *************************************************************************** */ -{ +} elseif ($id || $ref) { + /* *************************************************************************** */ + /* */ + /* Edit and view mode */ + /* */ + /* *************************************************************************** */ $lines = $object->lines; $num_prod = count($lines); - if ($object->id > 0) - { - if (!empty($object->origin) && $object->origin_id > 0) - { + if ($object->id > 0) { + if (!empty($object->origin) && $object->origin_id > 0) { $typeobject = $object->origin; $origin = $object->origin; $origin_id = $object->origin_id; @@ -1582,8 +1530,7 @@ if ($action == 'create') $formconfirm = ''; // Confirm deleteion - if ($action == 'delete') - { + if ($action == 'delete') { $formquestion = array(); if ($object->statut == Expedition::STATUS_CLOSED && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { $formquestion = array( @@ -1607,11 +1554,9 @@ if ($action == 'create') } // Confirmation validation - if ($action == 'valid') - { + if ($action == 'valid') { $objectref = substr($object->ref, 1, 4); - if ($objectref == 'PROV') - { + if ($objectref == 'PROV') { $numref = $object->getNextNumRef($soc); } else { $numref = $object->ref; @@ -1619,8 +1564,7 @@ if ($action == 'create') $text = $langs->trans("ConfirmValidateSending", $numref); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
    '; @@ -1630,16 +1574,18 @@ if ($action == 'create') $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateSending'), $text, 'confirm_valid', '', 0, 1); } // Confirm cancelation - if ($action == 'cancel') - { + if ($action == 'cancel') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -1651,13 +1597,11 @@ if ($action == 'create') $totalVolume = $tmparray['volume']; - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } @@ -1717,8 +1661,7 @@ if ($action == 'create') print ''; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { print ''; print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { print ''; print ''; - if ($action != 'editdate_livraison') print ''; + if ($action != 'editdate_livraison') { + print ''; + } print '
    '; print $langs->trans("RefOrder").''; @@ -1726,8 +1669,7 @@ if ($action == 'create') print "
    '; print $langs->trans("RefProposal").''; @@ -1747,11 +1689,12 @@ if ($action == 'create') print $langs->trans('DateDeliveryPlanned'); print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
    '; print ''; - if ($action == 'editdate_livraison') - { + if ($action == 'editdate_livraison') { print ''; print ''; print ''; @@ -1769,8 +1712,7 @@ if ($action == 'create') print $form->editfieldkey("Weight", 'trueWeight', $object->trueWeight, $object, $user->rights->expedition->creer); print ''; - if ($action == 'edittrueWeight') - { + if ($action == 'edittrueWeight') { print ''; print ''; print ''; @@ -1786,11 +1728,14 @@ if ($action == 'create') } // Calculated - if ($totalWeight > 0) - { - if (!empty($object->trueWeight)) print ' ('.$langs->trans("SumOfProductWeights").': '; + if ($totalWeight > 0) { + if (!empty($object->trueWeight)) { + print ' ('.$langs->trans("SumOfProductWeights").': '; + } print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); - if (!empty($object->trueWeight)) print ')'; + if (!empty($object->trueWeight)) { + print ')'; + } } print ''; @@ -1802,8 +1747,7 @@ if ($action == 'create') // Height print ''.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->rights->expedition->creer).''; - if ($action == 'edittrueHeight') - { + if ($action == 'edittrueHeight') { print ''; print ''; print ''; @@ -1833,25 +1777,27 @@ if ($action == 'create') print ''; $calculatedVolume = 0; $volumeUnit = 0; - if ($object->trueWidth && $object->trueHeight && $object->trueDepth) - { + if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { $calculatedVolume = ($object->trueWidth * $object->trueHeight * $object->trueDepth); $volumeUnit = $object->size_units * 3; } // If sending volume not defined we use sum of products - if ($calculatedVolume > 0) - { - if ($volumeUnit < 50) - { + if ($calculatedVolume > 0) { + if ($volumeUnit < 50) { print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); - } else print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); + } else { + print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); + } } - if ($totalVolume > 0) - { - if ($calculatedVolume) print ' ('.$langs->trans("SumOfProductVolumes").': '; + if ($totalVolume > 0) { + if ($calculatedVolume) { + print ' ('.$langs->trans("SumOfProductVolumes").': '; + } print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; - if ($calculatedVolume) print ')'; + if ($calculatedVolume) { + print ')'; + } } print "\n"; print ''; @@ -1875,22 +1821,24 @@ if ($action == 'create') print $langs->trans('SendingMethod'); print ''; - if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).''; + if ($action != 'editshipping_method_id') { + print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).''; + } print ''; print ''; - if ($action == 'editshipping_method_id') - { + if ($action == 'editshipping_method_id') { print ''; print ''; print ''; $object->fetch_delivery_methods(); print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print ''; print '
    '; } else { - if ($object->shipping_method_id > 0) - { + if ($object->shipping_method_id > 0) { // Get code using getLabelFromKey $code = $langs->getLabelFromKey($db, $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); print $langs->trans("SendingMethod".strtoupper($code)); @@ -1905,19 +1853,20 @@ if ($action == 'create') print ''; // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->expedition->creer) print ''.img_edit().''; - else print ' '; + if ($user->rights->expedition->creer) { + print ''.img_edit().''; + } else { + print ' '; + } print '
    '; print ''; print ''; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -1941,8 +1890,7 @@ if ($action == 'create') // Lines of products - if ($action == 'editline') - { + if ($action == 'editline') { print '
    @@ -1957,76 +1905,72 @@ if ($action == 'create') print ''; print ''; // Adds a line numbering column - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ' '; } // Product/Service print ''.$langs->trans("Products").''; // Qty print ''.$langs->trans("QtyOrdered").''; - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { print ''.$langs->trans("QtyInOtherShipments").''; } - if ($action == 'editline') - { + if ($action == 'editline') { $editColspan = 3; - if (empty($conf->stock->enabled)) $editColspan--; - if (empty($conf->productbatch->enabled)) $editColspan--; + if (empty($conf->stock->enabled)) { + $editColspan--; + } + if (empty($conf->productbatch->enabled)) { + $editColspan--; + } print ''; - if ($object->statut <= 1) - { + if ($object->statut <= 1) { print $langs->trans("QtyToShip").' - '; } else { print $langs->trans("QtyShipped").' - '; } - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print $langs->trans("WarehouseSource").' - '; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print $langs->trans("Batch"); } print ''; } else { - if ($object->statut <= 1) - { + if ($object->statut <= 1) { print ''.$langs->trans("QtyToShip").''; } else { print ''.$langs->trans("QtyShipped").''; } - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''.$langs->trans("WarehouseSource").''; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print ''.$langs->trans("Batch").''; } } print ''.$langs->trans("CalculatedWeight").''; print ''.$langs->trans("CalculatedVolume").''; //print ''.$langs->trans("Size").''; - if ($object->statut == 0) - { + if ($object->statut == 0) { print ''; print ''; } print "\n"; print ''; - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -2034,8 +1978,7 @@ if ($action == 'create') // Get list of products already sent for same source object into $alreadysent $alreadysent = array(); - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end"; $sql .= ", ed.rowid as shipmentline_id, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot"; $sql .= ", e.rowid as shipment_id, e.ref as shipment_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_expedition"; @@ -2056,16 +1999,13 @@ if ($action == 'create') dol_syslog("get list of shipment lines", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { // $obj->rowid is rowid in $origin."det" table $alreadysent[$obj->rowid][$obj->shipmentline_id] = array( 'shipment_ref'=>$obj->shipment_ref, 'shipment_id'=>$obj->shipment_id, 'warehouse'=>$obj->fk_entrepot, 'qty_shipped'=>$obj->qty_shipped, @@ -2081,33 +2021,32 @@ if ($action == 'create') print ''; // Loop on each product to send/sent - for ($i = 0; $i < $num_prod; $i++) - { + for ($i = 0; $i < $num_prod; $i++) { $parameters = array('i' => $i, 'line' => $lines[$i], 'line_id' => $line_id, 'num' => $num_prod, 'alreadysent' => $alreadysent, 'editColspan' => $editColspan, 'outputlangs' => $outputlangs); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { print ''; // id of order line print ''; // # - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''.($i + 1).''; } // Predefined product or service - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($lines[$i]->fk_product); $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $lines[$i]->product_label; - } else $label = (!empty($lines[$i]->label) ? $lines[$i]->label : $lines[$i]->product_label); + } else { + $label = (!empty($lines[$i]->label) ? $lines[$i]->label : $lines[$i]->product_label); + } print ''; @@ -2137,15 +2076,17 @@ if ($action == 'create') $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($lines[$i]->description)); print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range($lines[$i]->date_start, $lines[$i]->date_end); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '
    '.dol_htmlentitiesbr($lines[$i]->description) : ''; } print "\n"; } else { print ''; - if ($lines[$i]->product_type == Product::TYPE_SERVICE) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($lines[$i]->product_type == Product::TYPE_SERVICE) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($lines[$i]->label)) { $text .= ' '.$lines[$i]->label.''; @@ -2162,26 +2103,25 @@ if ($action == 'create') print ''.$lines[$i]->qty_asked.''; // Qty in other shipments (with shipment and warehouse used) - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { print ''; - foreach ($alreadysent as $key => $val) - { - if ($lines[$i]->fk_origin_line == $key) - { + foreach ($alreadysent as $key => $val) { + if ($lines[$i]->fk_origin_line == $key) { $j = 0; - foreach ($val as $shipmentline_id=> $shipmentline_var) - { - if ($shipmentline_var['shipment_id'] == $lines[$i]->fk_expedition) continue; // We want to show only "other shipments" + foreach ($val as $shipmentline_id => $shipmentline_var) { + if ($shipmentline_var['shipment_id'] == $lines[$i]->fk_expedition) { + continue; // We want to show only "other shipments" + } $j++; - if ($j > 1) print '
    '; + if ($j > 1) { + print '
    '; + } $shipment_static->fetch($shipmentline_var['shipment_id']); print $shipment_static->getNomUrl(1); print ' - '.$shipmentline_var['qty_shipped']; $htmltext = $langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); - if (!empty($conf->stock->enabled) && $shipmentline_var['warehouse'] > 0) - { + if (!empty($conf->stock->enabled) && $shipmentline_var['warehouse'] > 0) { $warehousestatic->fetch($shipmentline_var['warehouse']); $htmltext .= '
    '.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); } @@ -2192,22 +2132,18 @@ if ($action == 'create') print ''; } - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { // edit mode print ''; - if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) - { + if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { print ''; $line = new ExpeditionLigne($db); - foreach ($lines[$i]->detail_batch as $detail_batch) - { + foreach ($lines[$i]->detail_batch as $detail_batch) { print ''; // Qty to ship or shipped print ''; // Batch number managment - if ($lines[$i]->entrepot_id == 0) - { + if ($lines[$i]->entrepot_id == 0) { // only show lot numbers from src warehouse when shipping from multiple warehouses $line->fetch($detail_batch->fk_expeditiondet); } @@ -2221,12 +2157,9 @@ if ($action == 'create') // Batch number managment print ''; print ''; - } elseif (!empty($conf->stock->enabled)) - { - if ($lines[$i]->fk_product > 0) - { - if ($lines[$i]->entrepot_id > 0) - { + } elseif (!empty($conf->stock->enabled)) { + if ($lines[$i]->fk_product > 0) { + if ($lines[$i]->entrepot_id > 0) { print ''; print ''; // Qty to ship or shipped @@ -2236,11 +2169,9 @@ if ($action == 'create') // Batch number managment print ''; print ''; - } elseif (count($lines[$i]->details_entrepot) > 1) - { + } elseif (count($lines[$i]->details_entrepot) > 1) { print ''; - foreach ($lines[$i]->details_entrepot as $detail_entrepot) - { + foreach ($lines[$i]->details_entrepot as $detail_entrepot) { print ''; // Qty to ship or shipped print ''; @@ -2273,24 +2204,19 @@ if ($action == 'create') print ''; // Warehouse source - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; // Volume print ''; // Size //print ''; - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { print ''; - } elseif ($object->statut == Expedition::STATUS_DRAFT) - { + } elseif ($object->statut == Expedition::STATUS_DRAFT) { // edit-delete buttons print ''; // Display lines extrafields - if (!empty($rowExtrafieldsStart)) - { + if (!empty($rowExtrafieldsStart)) { print $rowExtrafieldsStart; print $rowExtrafieldsView; print $rowEnd; @@ -2375,15 +2300,20 @@ if ($action == 'create') // Display lines extrafields if (!empty($extrafields)) { $colspan = 6; - if ($origin && $origin_id > 0) $colspan++; - if (!empty($conf->productbatch->enabled)) $colspan++; - if (!empty($conf->stock->enabled)) $colspan++; + if ($origin && $origin_id > 0) { + $colspan++; + } + if (!empty($conf->productbatch->enabled)) { + $colspan++; + } + if (!empty($conf->stock->enabled)) { + $colspan++; + } $line = $lines[$i]; $line->fetch_optionals(); - if ($action == 'editline' && $line->id == $line_id) - { + if ($action == 'editline' && $line->id == $line_id) { print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked); } else { print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked); @@ -2410,20 +2340,16 @@ if ($action == 'create') * Boutons actions */ - if (($user->socid == 0) && ($action != 'presend')) - { + if (($user->socid == 0) && ($action != 'presend')) { print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($object->statut == Expedition::STATUS_DRAFT && $num_prod > 0) - { + if (empty($reshook)) { + if ($object->statut == Expedition::STATUS_DRAFT && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) { print ''.$langs->trans("Validate").''; } else { print ''.$langs->trans("Validate").''; @@ -2432,10 +2358,8 @@ if ($action == 'create') // TODO add alternative status // 0=draft, 1=validated, 2=billed, we miss a status "delivered" (only available on order) - if ($object->statut == Expedition::STATUS_CLOSED && $user->rights->expedition->creer) - { - if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - { + if ($object->statut == Expedition::STATUS_CLOSED && $user->rights->expedition->creer) { + if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? print ''.$langs->trans("ClassifyUnbilled").''; } else { print ''.$langs->trans("ReOpen").''; @@ -2444,20 +2368,18 @@ if ($action == 'create') // Send if (empty($user->socid)) { - if ($object->statut > 0) - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->expedition->shipping_advance->send) - { + if ($object->statut > 0) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->expedition->shipping_advance->send) { print ''.$langs->trans('SendMail').''; - } else print ''.$langs->trans('SendMail').''; + } else { + print ''.$langs->trans('SendMail').''; + } } } // Create bill - if (!empty($conf->facture->enabled) && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED)) - { - if ($user->rights->facture->creer) - { + if (!empty($conf->facture->enabled) && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED)) { + if ($user->rights->facture->creer) { // TODO show button only if (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) // If we do that, we must also make this option official. print ''.$langs->trans("CreateBill").''; @@ -2466,19 +2388,15 @@ if ($action == 'create') // This is just to generate a delivery receipt //var_dump($object->linkedObjectsIds['delivery']); - if ($conf->delivery_note->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->delivery->creer && empty($object->linkedObjectsIds['delivery'])) - { + if ($conf->delivery_note->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->delivery->creer && empty($object->linkedObjectsIds['delivery'])) { print ''.$langs->trans("CreateDeliveryOrder").''; } // Close - if ($object->statut == Expedition::STATUS_VALIDATED) - { - if ($user->rights->expedition->creer && $object->statut > 0 && !$object->billed) - { + if ($object->statut == Expedition::STATUS_VALIDATED) { + if ($user->rights->expedition->creer && $object->statut > 0 && !$object->billed) { $label = "Close"; $paramaction = 'classifyclosed'; // = Transferred/Received // Label here should be "Close" or "ClassifyBilled" if we decided to make bill on shipments instead of orders - if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - { + if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? $label = "ClassifyBilled"; $paramaction = 'classifybilled'; } @@ -2487,17 +2405,14 @@ if ($action == 'create') } // Cancel - if ($object->statut == Expedition::STATUS_VALIDATED) - { - if ($user->rights->expedition->supprimer) - { + if ($object->statut == Expedition::STATUS_VALIDATED) { + if ($user->rights->expedition->supprimer) { print ''.$langs->trans("Cancel").''; } } // Delete - if ($user->rights->expedition->supprimer) - { + if ($user->rights->expedition->supprimer) { print ''.$langs->trans("Delete").''; } } @@ -2510,8 +2425,7 @@ if ($action == 'create') * Documents generated */ - if ($action != 'presend' && $action != 'editline') - { + if ($action != 'presend' && $action != 'editline') { print '
    '; $objectref = dol_sanitizeFileName($object->ref); diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 22acaeaa26b..1d47921e423 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -32,7 +32,7 @@ class Shipments extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid', 'origin_id', 'origin_type', @@ -103,6 +103,10 @@ class Shipments extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->expedition->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -110,28 +114,37 @@ class Shipments extends DolibarrApi // 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 (!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) + 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."expedition 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('expedition').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { + if ($search_sale > 0) { $sql .= " AND sc.fk_user = ".$search_sale; } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -140,8 +153,7 @@ class Shipments extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -152,13 +164,11 @@ class Shipments extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $shipment_static = new Expedition($this->db); if ($shipment_static->fetch($obj->rowid)) { @@ -217,28 +227,28 @@ class Shipments extends DolibarrApi // * @return int // */ /* - public function getLines($id) - { - if(! DolibarrApiAccess::$user->rights->expedition->lire) { - throw new RestException(401); - } + public function getLines($id) + { + if(! DolibarrApiAccess::$user->rights->expedition->lire) { + throw new RestException(401); + } - $result = $this->shipment->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Shipment not found'); - } + $result = $this->shipment->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Shipment not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->shipment->getLinesArray(); - $result = array(); - foreach ($this->shipment->lines as $line) { - array_push($result,$this->_cleanObjectDatas($line)); - } - return $result; - } - */ + if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->shipment->getLinesArray(); + $result = array(); + foreach ($this->shipment->lines as $line) { + array_push($result,$this->_cleanObjectDatas($line)); + } + return $result; + } + */ // /** // * Add a line to given shipment @@ -251,56 +261,61 @@ class Shipments extends DolibarrApi // * @return int // */ /* - public function postLine($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->expedition->creer) { - throw new RestException(401); - } + public function postLine($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->expedition->creer) { + throw new RestException(401); + } - $result = $this->shipment->fetch($id); - if ( ! $result ) { - throw new RestException(404, 'Shipment not found'); - } + $result = $this->shipment->fetch($id); + if ( ! $result ) { + throw new RestException(404, 'Shipment not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->shipment->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $request_data->origin, - $request_data->origin_id, - $request_data->multicurrency_subprice - ); + if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - return $updateRes; + $request_data = (object) $request_data; - } - return false; - }*/ + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + + $updateRes = $this->shipment->addline( + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + 'HT', + 0, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $request_data->origin, + $request_data->origin_id, + $request_data->multicurrency_subprice + ); + + if ($updateRes > 0) { + return $updateRes; + + } + return false; + }*/ // /** // * Update a line to given shipment @@ -314,53 +329,58 @@ class Shipments extends DolibarrApi // * @return object // */ /* - public function putLine($id, $lineid, $request_data = null) - { - if (! DolibarrApiAccess::$user->rights->expedition->creer) { - throw new RestException(401); - } + public function putLine($id, $lineid, $request_data = null) + { + if (! DolibarrApiAccess::$user->rights->expedition->creer) { + throw new RestException(401); + } - $result = $this->shipment->fetch($id); - if ( ! $result ) { - throw new RestException(404, 'Shipment not found'); - } + $result = $this->shipment->fetch($id); + if ( ! $result ) { + throw new RestException(404, 'Shipment not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->shipment->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->date_start, - $request_data->date_end, - $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->fk_unit, - $request_data->multicurrency_subprice - ); + if( ! DolibarrApi::_checkAccessToResource('expedition',$this->shipment->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + + $updateRes = $this->shipment->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->date_start, + $request_data->date_end, + $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->fk_unit, + $request_data->multicurrency_subprice + ); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ /** * Delete a line to given shipment @@ -393,7 +413,6 @@ class Shipments extends DolibarrApi // TODO Check the lineid $lineid is a line of ojbect - $request_data = (object) $request_data; $updateRes = $this->shipment->deleteline(DolibarrApiAccess::$user, $lineid); if ($updateRes > 0) { return $this->get($id); @@ -425,12 +444,13 @@ class Shipments extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->shipment->$field = $value; } - if ($this->shipment->update(DolibarrApiAccess::$user) > 0) - { + if ($this->shipment->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->shipment->error); @@ -539,27 +559,27 @@ class Shipments extends DolibarrApi // * @throws RestException 405 // */ /* - public function setinvoiced($id) - { + public function setinvoiced($id) + { - if(! DolibarrApiAccess::$user->rights->expedition->creer) { - throw new RestException(401); - } - if(empty($id)) { - throw new RestException(400, 'Shipment ID is mandatory'); - } - $result = $this->shipment->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Shipment not found'); - } + if(! DolibarrApiAccess::$user->rights->expedition->creer) { + throw new RestException(401); + } + if(empty($id)) { + throw new RestException(400, 'Shipment ID is mandatory'); + } + $result = $this->shipment->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Shipment not found'); + } - $result = $this->shipment->classifyBilled(DolibarrApiAccess::$user); - if( $result < 0) { - throw new RestException(400, $this->shipment->error); - } - return $result; - } - */ + $result = $this->shipment->classifyBilled(DolibarrApiAccess::$user); + if( $result < 0) { + throw new RestException(400, $this->shipment->error); + } + return $result; + } + */ // /** @@ -576,35 +596,35 @@ class Shipments extends DolibarrApi // * @throws RestException 405 // */ /* - public function createShipmentFromOrder($orderid) - { + public function createShipmentFromOrder($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->expedition->lire) { - throw new RestException(401); - } - if(! DolibarrApiAccess::$user->rights->expedition->creer) { - throw new RestException(401); - } - if(empty($proposalid)) { - throw new RestException(400, 'Order ID is mandatory'); - } + if(! DolibarrApiAccess::$user->rights->expedition->lire) { + throw new RestException(401); + } + if(! DolibarrApiAccess::$user->rights->expedition->creer) { + throw new RestException(401); + } + if(empty($proposalid)) { + throw new RestException(400, 'Order ID is mandatory'); + } - $order = new Commande($this->db); - $result = $order->fetch($proposalid); - if( ! $result ) { - throw new RestException(404, 'Order not found'); - } + $order = new Commande($this->db); + $result = $order->fetch($proposalid); + if( ! $result ) { + throw new RestException(404, 'Order not found'); + } - $result = $this->shipment->createFromOrder($order, DolibarrApiAccess::$user); - if( $result < 0) { - throw new RestException(405, $this->shipment->error); - } - $this->shipment->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->shipment); - } - */ + $result = $this->shipment->createFromOrder($order, DolibarrApiAccess::$user); + if( $result < 0) { + throw new RestException(405, $this->shipment->error); + } + $this->shipment->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->shipment); + } + */ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** @@ -627,10 +647,8 @@ class Shipments extends DolibarrApi unset($object->barcode_type_label); unset($object->barcode_type_coder); - if (!empty($object->lines) && is_array($object->lines)) - { - foreach ($object->lines as $line) - { + if (!empty($object->lines) && is_array($object->lines)) { + foreach ($object->lines as $line) { unset($line->tva_tx); unset($line->vat_src_code); unset($line->total_ht); @@ -656,8 +674,9 @@ class Shipments extends DolibarrApi { $shipment = array(); foreach (Shipments::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $shipment[$field] = $data[$field]; } return $shipment; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 752da8aca04..f7c5a1d32a8 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -37,9 +37,15 @@ 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'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} +if (!empty($conf->productbatch->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; +} /** @@ -231,8 +237,7 @@ class Expedition extends CommonObject global $langs, $conf; $langs->load("sendings"); - if (!empty($conf->global->EXPEDITION_ADDON_NUMBER)) - { + if (!empty($conf->global->EXPEDITION_ADDON_NUMBER)) { $mybool = false; $file = $conf->global->EXPEDITION_ADDON_NUMBER.".php"; @@ -248,8 +253,7 @@ class Expedition extends CommonObject $mybool |= @include_once $dir.$file; } - if (!$mybool) - { + if (!$mybool) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -258,8 +262,7 @@ class Expedition extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { dol_print_error($this->db, get_class($this)."::getNextNumRef ".$obj->error); @@ -290,7 +293,9 @@ class Expedition extends CommonObject // Clean parameters $this->brouillon = 1; $this->tracking_number = dol_sanitizeFileName($this->tracking_number); - if (empty($this->fk_project)) $this->fk_project = 0; + if (empty($this->fk_project)) { + $this->fk_project = 0; + } $this->user = $user; @@ -353,8 +358,7 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."expedition"); $sql = "UPDATE ".MAIN_DB_PREFIX."expedition"; @@ -362,59 +366,49 @@ class Expedition extends CommonObject $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Insert of lines $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { - if (!isset($this->lines[$i]->detail_batch)) - { // no batch management - if (!$this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) > 0) - { + for ($i = 0; $i < $num; $i++) { + if (!isset($this->lines[$i]->detail_batch)) { // no batch management + if (!$this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) > 0) { $error++; } } else { // with batch management - if (!$this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) > 0) - { + if (!$this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) > 0) { $error++; } } } - if (!$error && $this->id && $this->origin_id) - { + if (!$error && $this->id && $this->origin_id) { $ret = $this->add_object_linked(); - if (!$ret) - { + if (!$ret) { $error++; } } // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('SHIPPING_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -465,8 +459,7 @@ class Expedition extends CommonObject $expeditionline->rang = $rang; $expeditionline->array_options = $array_options; - if (($lineId = $expeditionline->insert($user)) < 0) - { + if (($lineId = $expeditionline->insert($user)) < 0) { $this->errors[] = $expeditionline->error; } return $lineId; @@ -489,26 +482,21 @@ class Expedition extends CommonObject $tab = $line_ext->detail_batch; // create stockLocation Qty array - foreach ($tab as $detbatch) - { - if ($detbatch->entrepot_id) - { + foreach ($tab as $detbatch) { + if ($detbatch->entrepot_id) { $stockLocationQty[$detbatch->entrepot_id] += $detbatch->qty; } } // create shipment lines - foreach ($stockLocationQty as $stockLocation => $qty) - { + foreach ($stockLocationQty as $stockLocation => $qty) { $line_id = $this->create_line($stockLocation, $line_ext->origin_line_id, $qty, $line_ext->rang, $array_options); if ($line_id < 0) { $error++; } else { // create shipment batch lines for stockLocation - foreach ($tab as $detbatch) - { + foreach ($tab as $detbatch) { if ($detbatch->entrepot_id == $stockLocation) { - if (!($detbatch->create($line_id) > 0)) // Create an expeditionlinebatch - { + if (!($detbatch->create($line_id) > 0)) { // Create an expeditionlinebatch $error++; } } @@ -516,8 +504,11 @@ class Expedition extends CommonObject } } - if (!$error) return 1; - else return -1; + if (!$error) { + return 1; + } else { + return -1; + } } /** @@ -534,7 +525,9 @@ class Expedition extends CommonObject global $conf; // Check parameters - if (empty($id) && empty($ref) && empty($ref_ext)) return -1; + if (empty($id) && empty($ref) && empty($ref_ext)) { + return -1; + } $sql = "SELECT e.rowid, e.entity, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; $sql .= ", e.date_valid"; @@ -551,17 +544,23 @@ class Expedition extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_shipment_mode as s ON e.fk_shipping_method = s.rowid'; $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; - if ($id) $sql .= " AND e.rowid=".$id; - if ($ref) $sql .= " AND e.ref='".$this->db->escape($ref)."'"; - if ($ref_ext) $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; - if ($notused) $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; + if ($id) { + $sql .= " AND e.rowid = ".((int) $id); + } + if ($ref) { + $sql .= " AND e.ref='".$this->db->escape($ref)."'"; + } + if ($ref_ext) { + $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; + } + if ($notused) { + $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -581,7 +580,7 @@ class Expedition extends CommonObject $this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed $this->fk_delivery_address = $obj->fk_address; $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->shipping_method_id = $obj->fk_shipping_method; $this->shipping_method = $obj->shipping_method; $this->tracking_number = $obj->tracking_number; @@ -614,7 +613,9 @@ class Expedition extends CommonObject $this->db->free($result); - if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; + if ($this->statut == self::STATUS_DRAFT) { + $this->brouillon = 1; + } // Tracking url $this->getUrlTrackingStatus($obj->tracking_number); @@ -626,18 +627,20 @@ class Expedition extends CommonObject $this->fetch_optionals(); // Fix Get multicurrency param for transmited - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($this->multicurrency_code)) $this->multicurrency_code = $this->thirdparty->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($this->thirdparty->multicurrency_tx)) $this->multicurrency_tx = $this->thirdparty->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($this->multicurrency_code)) { + $this->multicurrency_code = $this->thirdparty->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($this->thirdparty->multicurrency_tx)) { + $this->multicurrency_tx = $this->thirdparty->multicurrency_tx; + } } /* * Lines */ $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } @@ -669,15 +672,13 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::valid"); // Protection - if ($this->statut) - { - dol_syslog(get_class($this)."::valid no draft status", LOG_WARNING); + if ($this->statut) { + dol_syslog(get_class($this)."::valid not in draft status", LOG_WARNING); return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate)))) { $this->error = 'Permission denied'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; @@ -695,8 +696,7 @@ class Expedition extends CommonObject $result = $soc->set_as_client(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life $numref = $this->getNextNumRef($soc); } else { $numref = "EXP".$this->id; @@ -715,15 +715,13 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::valid update expedition", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $error++; } // If stock increment is done on sending (recommanded choice) - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -740,31 +738,30 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { $qty = $obj->qty; } else { $qty = $obj->edbqty; } - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); //var_dump($this->lines[$i]); $mouvS = new MouvementStock($this->db); - $mouvS->origin = &$this; + $mouvS->origin = dol_clone($this, 1); - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. $result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr", $numref)); + if ($result < 0) { $error++; $this->error = $mouvS->error; @@ -794,49 +791,45 @@ class Expedition extends CommonObject // Change status of order to "shipment in process" $ret = $this->setStatut(Commande::STATUS_SHIPMENTONPROCESS, $this->origin_id, $this->origin); - - if (!$ret) - { + if (!$ret) { $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('SHIPPING_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'expedition/sending/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'expedition/sending/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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($numref); $dirsource = $conf->expedition->dir_output.'/sending/'.$oldref; $dirdest = $conf->expedition->dir_output.'/sending/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->expedition->dir_output.'/sending/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -849,14 +842,12 @@ class Expedition extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $numref; $this->statut = self::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -878,23 +869,24 @@ class Expedition extends CommonObject // phpcs:enable global $conf; - if ($conf->delivery_note->enabled) - { - if ($this->statut == self::STATUS_VALIDATED || $this->statut == self::STATUS_CLOSED) - { + if ($conf->delivery_note->enabled) { + if ($this->statut == self::STATUS_VALIDATED || $this->statut == self::STATUS_CLOSED) { // Expedition validee include_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php'; $delivery = new Delivery($this->db); $result = $delivery->create_from_sending($user, $this->id); - if ($result > 0) - { + if ($result > 0) { return $result; } else { $this->error = $delivery->error; return $result; } - } else return 0; - } else return 0; + } else { + return 0; + } + } else { + return 0; + } } /** @@ -926,8 +918,7 @@ class Expedition extends CommonObject // Copy the rang of the order line to the expedition line $line->rang = $orderline->rang; - if (!empty($conf->stock->enabled) && !empty($orderline->fk_product)) - { + if (!empty($conf->stock->enabled) && !empty($orderline->fk_product)) { $fk_product = $orderline->fk_product; if (!($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS)) { @@ -967,15 +958,15 @@ class Expedition extends CommonObject } // If product need a batch number, we should not have called this function but addline_batch instead. - if (!empty($conf->productbatch->enabled) && !empty($orderline->fk_product) && !empty($orderline->product_tobatch)) - { + if (!empty($conf->productbatch->enabled) && !empty($orderline->fk_product) && !empty($orderline->product_tobatch)) { $this->error = 'ADDLINE_WAS_CALLED_INSTEAD_OF_ADDLINEBATCH'; return -4; } // extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used $line->array_options = $array_options; + } $this->lines[$num] = $line; } @@ -994,36 +985,30 @@ class Expedition extends CommonObject global $conf, $langs; $num = count($this->lines); - if ($dbatch['qty'] > 0) - { + if ($dbatch['qty'] > 0) { $line = new ExpeditionLigne($this->db); $tab = array(); - foreach ($dbatch['detail'] as $key=>$value) - { - if ($value['q'] > 0) - { + foreach ($dbatch['detail'] as $key => $value) { + if ($value['q'] > 0) { // $value['q']=qty to move // $value['id_batch']=id into llx_product_batch of record to move //var_dump($value); $linebatch = new ExpeditionLineBatch($this->db); $ret = $linebatch->fetchFromStock($value['id_batch']); // load serial, sellby, eatby - if ($ret < 0) - { + if ($ret < 0) { $this->error = $linebatch->error; return -1; } $linebatch->qty = $value['q']; $tab[] = $linebatch; - if ($conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT) - { + if ($conf->global->STOCK_MUST_BE_ENOUGH_FOR_SHIPMENT) { require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; $prod_batch = new Productbatch($this->db); $prod_batch->fetch($value['id_batch']); - if ($prod_batch->qty < $linebatch->qty) - { + if ($prod_batch->qty < $linebatch->qty) { $langs->load("errors"); $this->errors[] = $langs->trans('ErrorStockIsNotEnoughToAddProductOnShipment', $prod_batch->fk_product); dol_syslog(get_class($this)."::addline_batch error=Product ".$prod_batch->batch.": ".$this->errorsToString(), LOG_ERR); @@ -1042,8 +1027,9 @@ class Expedition extends CommonObject $line->detail_batch = $tab; // extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used $line->array_options = $array_options; + } //var_dump($line); $this->lines[$num] = $line; @@ -1065,25 +1051,63 @@ class Expedition extends CommonObject // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->entity)) $this->entity = (int) $this->entity; - if (isset($this->ref_customer)) $this->ref_customer = trim($this->ref_customer); - if (isset($this->socid)) $this->socid = (int) $this->socid; - if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; - if (isset($this->fk_user_valid)) $this->fk_user_valid = (int) $this->fk_user_valid; - if (isset($this->fk_delivery_address)) $this->fk_delivery_address = (int) $this->fk_delivery_address; - if (isset($this->shipping_method_id)) $this->shipping_method_id = (int) $this->shipping_method_id; - if (isset($this->tracking_number)) $this->tracking_number = trim($this->tracking_number); - if (isset($this->statut)) $this->statut = (int) $this->statut; - if (isset($this->trueDepth)) $this->trueDepth = trim($this->trueDepth); - if (isset($this->trueWidth)) $this->trueWidth = trim($this->trueWidth); - if (isset($this->trueHeight)) $this->trueHeight = trim($this->trueHeight); - if (isset($this->size_units)) $this->size_units = trim($this->size_units); - if (isset($this->weight_units)) $this->weight_units = trim($this->weight_units); - if (isset($this->trueWeight)) $this->weight = trim($this->trueWeight); - 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->model_pdf)) $this->model_pdf = trim($this->model_pdf); + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->entity)) { + $this->entity = (int) $this->entity; + } + if (isset($this->ref_customer)) { + $this->ref_customer = trim($this->ref_customer); + } + if (isset($this->socid)) { + $this->socid = (int) $this->socid; + } + if (isset($this->fk_user_author)) { + $this->fk_user_author = (int) $this->fk_user_author; + } + if (isset($this->fk_user_valid)) { + $this->fk_user_valid = (int) $this->fk_user_valid; + } + if (isset($this->fk_delivery_address)) { + $this->fk_delivery_address = (int) $this->fk_delivery_address; + } + if (isset($this->shipping_method_id)) { + $this->shipping_method_id = (int) $this->shipping_method_id; + } + if (isset($this->tracking_number)) { + $this->tracking_number = trim($this->tracking_number); + } + if (isset($this->statut)) { + $this->statut = (int) $this->statut; + } + if (isset($this->trueDepth)) { + $this->trueDepth = trim($this->trueDepth); + } + if (isset($this->trueWidth)) { + $this->trueWidth = trim($this->trueWidth); + } + if (isset($this->trueHeight)) { + $this->trueHeight = trim($this->trueHeight); + } + if (isset($this->size_units)) { + $this->size_units = trim($this->size_units); + } + if (isset($this->weight_units)) { + $this->weight_units = trim($this->weight_units); + } + if (isset($this->trueWeight)) { + $this->weight = trim($this->trueWeight); + } + 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->model_pdf)) { + $this->model_pdf = trim($this->model_pdf); + } @@ -1116,29 +1140,31 @@ class Expedition extends CommonObject $sql .= " weight=".(($this->trueWeight != '') ? $this->trueWeight : "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->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "null").","; + $sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; $sql .= " entity=".$conf->entity; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('SHIPPING_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1180,15 +1206,16 @@ class Expedition extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('SHIPPING_CANCEL', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Stock control if (!$error && $conf->stock->enabled && (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || - ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) - { + ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) { require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; $langs->load("agenda"); @@ -1202,11 +1229,9 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::delete select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { dol_syslog(get_class($this)."::delete movement index ".$i); $obj = $this->db->fetch_object($resql); @@ -1215,11 +1240,9 @@ class Expedition extends CommonObject $mouvS->origin = null; // get lot/serial $lotArray = null; - if ($conf->productbatch->enabled) - { + if ($conf->productbatch->enabled) { $lotArray = ExpeditionLineBatch::fetchAll($this->db, $obj->expeditiondet_id); - if (!is_array($lotArray)) - { + if (!is_array($lotArray)) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } @@ -1228,24 +1251,23 @@ class Expedition extends CommonObject // We increment stock of product (and sub-products) // We use warehouse selected for each line $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed - if ($result < 0) - { + if ($result < 0) { $error++; $this->errors = $this->errors + $mouvS->errors; break; } } else { // We increment stock of batches // We use warehouse selected for each line - foreach ($lotArray as $lot) - { + foreach ($lotArray as $lot) { $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed - if ($result < 0) - { + if ($result < 0) { $error++; $this->errors = $this->errors + $mouvS->errors; break; } } - if ($error) break; // break for loop incase of error + if ($error) { + break; // break for loop incase of error + } } } } else { @@ -1254,71 +1276,58 @@ class Expedition extends CommonObject } // delete batch expedition line - if (!$error && $conf->productbatch->enabled) - { - if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) - { + if (!$error && $conf->productbatch->enabled) { + if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; $sql .= " WHERE fk_expedition = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } // No delete expedition - if (!$error) - { + if (!$error) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."expedition"; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - if (!empty($this->origin) && $this->origin_id > 0) - { + if ($this->db->query($sql)) { + if (!empty($this->origin) && $this->origin_id > 0) { $this->fetch_origin(); $origin = $this->origin; - if ($this->$origin->statut == Commande::STATUS_SHIPMENTONPROCESS) // If order source of shipment is "shipment in progress" - { + if ($this->$origin->statut == Commande::STATUS_SHIPMENTONPROCESS) { // If order source of shipment is "shipment in progress" // Check if there is no more shipment. If not, we can move back status of order to "validated" instead of "shipment in progress" $this->$origin->loadExpeditions(); //var_dump($this->$origin->expeditions);exit; - if (count($this->$origin->expeditions) <= 0) - { + if (count($this->$origin->expeditions) <= 0) { $this->$origin->setStatut(Commande::STATUS_VALIDATED); } } } - if (!$error) - { + if (!$error) { $this->db->commit(); // We delete PDFs $ref = dol_sanitizeFileName($this->ref); - if (!empty($conf->expedition->dir_output)) - { + if (!empty($conf->expedition->dir_output)) { $dir = $conf->expedition->dir_output.'/sending/'.$ref; $file = $dir.'/'.$ref.'.pdf'; - if (file_exists($file)) - { - if (!dol_delete_file($file)) - { + if (file_exists($file)) { + if (!dol_delete_file($file)) { return 0; } } - if (file_exists($dir)) - { - if (!dol_delete_dir_recursive($dir)) - { + if (file_exists($dir)) { + if (!dol_delete_dir_recursive($dir)) { $this->error = $langs->trans("ErrorCanNotDeleteDir", $dir); return 0; } @@ -1373,8 +1382,7 @@ class Expedition extends CommonObject // Add a protection to refuse deleting if shipment has at least one delivery $this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment - if (count($this->linkedObjectsIds) > 0) - { + if (count($this->linkedObjectsIds) > 0) { $this->error = 'ErrorThereIsSomeDeliveries'; $error++; } @@ -1382,15 +1390,16 @@ class Expedition extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('SHIPPING_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Stock control if (!$error && $conf->stock->enabled && (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || - ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) - { + ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) { require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; $langs->load("agenda"); @@ -1404,11 +1413,9 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::delete select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { dol_syslog(get_class($this)."::delete movement index ".$i); $obj = $this->db->fetch_object($resql); @@ -1417,11 +1424,9 @@ class Expedition extends CommonObject $mouvS->origin = null; // get lot/serial $lotArray = null; - if ($conf->productbatch->enabled) - { + if ($conf->productbatch->enabled) { $lotArray = ExpeditionLineBatch::fetchAll($this->db, $obj->expeditiondet_id); - if (!is_array($lotArray)) - { + if (!is_array($lotArray)) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } @@ -1430,24 +1435,23 @@ class Expedition extends CommonObject // We increment stock of product (and sub-products) // We use warehouse selected for each line $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed - if ($result < 0) - { + if ($result < 0) { $error++; $this->errors = $this->errors + $mouvS->errors; break; } } else { // We increment stock of batches // We use warehouse selected for each line - foreach ($lotArray as $lot) - { + foreach ($lotArray as $lot) { $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed - if ($result < 0) - { + if ($result < 0) { $error++; $this->errors = $this->errors + $mouvS->errors; break; } } - if ($error) break; // break for loop incase of error + if ($error) { + break; // break for loop incase of error + } } } } else { @@ -1456,16 +1460,13 @@ class Expedition extends CommonObject } // delete batch expedition line - if (!$error && $conf->productbatch->enabled) - { - if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) - { + if (!$error && $conf->productbatch->enabled) { + if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $main = MAIN_DB_PREFIX.'expeditiondet'; $ef = $main."_extrafields"; $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_expedition = ".$this->id.")"; @@ -1473,41 +1474,38 @@ class Expedition extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; $sql .= " WHERE fk_expedition = ".$this->id; - if ($this->db->query($sqlef) && $this->db->query($sql)) - { + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } // delete extrafields $res = $this->deleteExtraFields(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."expedition"; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - if (!empty($this->origin) && $this->origin_id > 0) - { + if ($this->db->query($sql)) { + if (!empty($this->origin) && $this->origin_id > 0) { $this->fetch_origin(); $origin = $this->origin; - if ($this->$origin->statut == Commande::STATUS_SHIPMENTONPROCESS) // If order source of shipment is "shipment in progress" - { + if ($this->$origin->statut == Commande::STATUS_SHIPMENTONPROCESS) { // If order source of shipment is "shipment in progress" // Check if there is no more shipment. If not, we can move back status of order to "validated" instead of "shipment in progress" $this->$origin->loadExpeditions(); //var_dump($this->$origin->expeditions);exit; - if (count($this->$origin->expeditions) <= 0) - { + if (count($this->$origin->expeditions) <= 0) { $this->$origin->setStatut(Commande::STATUS_VALIDATED); } } } - if (!$error) - { + if (!$error) { $this->db->commit(); // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive @@ -1515,21 +1513,16 @@ class Expedition extends CommonObject // We delete PDFs $ref = dol_sanitizeFileName($this->ref); - if (!empty($conf->expedition->dir_output)) - { + if (!empty($conf->expedition->dir_output)) { $dir = $conf->expedition->dir_output.'/sending/'.$ref; $file = $dir.'/'.$ref.'.pdf'; - if (file_exists($file)) - { - if (!dol_delete_file($file)) - { + if (file_exists($file)) { + if (!dol_delete_file($file)) { return 0; } } - if (file_exists($dir)) - { - if (!dol_delete_dir_recursive($dir)) - { + if (file_exists($dir)) { + if (!dol_delete_dir_recursive($dir)) { $this->error = $langs->trans("ErrorCanNotDeleteDir", $dir); return 0; } @@ -1590,8 +1583,7 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; $num = $this->db->num_rows($resql); @@ -1607,8 +1599,7 @@ class Expedition extends CommonObject $line = new ExpeditionLigne($this->db); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($originline == $obj->fk_origin_line) { @@ -1699,21 +1690,17 @@ class Expedition extends CommonObject $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - if ($originline != $obj->fk_origin_line) - { + if ($originline != $obj->fk_origin_line) { $line->detail_batch = array(); } // Detail of batch - if (!empty($conf->productbatch->enabled) && $obj->line_id > 0 && $obj->product_tobatch > 0) - { + if (!empty($conf->productbatch->enabled) && $obj->line_id > 0 && $obj->product_tobatch > 0) { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; $newdetailbatch = ExpeditionLineBatch::fetchAll($this->db, $obj->line_id, $obj->fk_product); - if (is_array($newdetailbatch)) - { - if ($originline != $obj->fk_origin_line) - { + if (is_array($newdetailbatch)) { + if ($originline != $obj->fk_origin_line) { $line->detail_batch = $newdetailbatch; } else { $line->detail_batch = array_merge($line->detail_batch, $newdetailbatch); @@ -1721,8 +1708,7 @@ class Expedition extends CommonObject } } - if ($originline != $obj->fk_origin_line) - { + if ($originline != $obj->fk_origin_line) { $this->lines[$lineindex] = $line; $lineindex++; } else { @@ -1755,8 +1741,7 @@ class Expedition extends CommonObject { global $user; - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); $line = new ExpeditionLigne($this->db); @@ -1764,8 +1749,7 @@ class Expedition extends CommonObject // For triggers $line->fetch($lineid); - if ($line->delete($user) > 0) - { + if ($line->delete($user) > 0) { //$this->update_price(1); $this->db->commit(); @@ -1803,21 +1787,24 @@ class Expedition extends CommonObject $url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id; - if ($short) return $url; + if ($short) { + return $url; + } - if ($option !== 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Shipment"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -1830,8 +1817,12 @@ class Expedition extends CommonObject $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; + 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; @@ -1865,9 +1856,15 @@ class Expedition extends CommonObject $labelStatusShort = $langs->trans($this->statutshorts[$status]); $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; - if ($status == self::STATUS_CANCELED) $statusType = 'status9'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } + if ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } + if ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -1894,12 +1891,10 @@ class Expedition extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -1936,8 +1931,7 @@ class Expedition extends CommonObject $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new ExpeditionLigne($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated @@ -1976,16 +1970,14 @@ class Expedition extends CommonObject */ public function setDeliveryDate($user, $delivery_date) { - if ($user->rights->expedition->creer) - { + if ($user->rights->expedition->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."expedition"; $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null'); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::setDeliveryDate", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->date_delivery = $delivery_date; return 1; } else { @@ -2015,10 +2007,8 @@ class Expedition extends CommonObject $sql .= " ORDER BY em.libelle ASC"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $label = $langs->trans('SendingMethod'.$obj->code); $this->meths[$obj->rowid] = ($label != 'SendingMethod'.$obj->code ? $label : $obj->label); } @@ -2042,13 +2032,13 @@ class Expedition extends CommonObject $sql = "SELECT em.rowid, em.code, em.libelle as label, em.description, em.tracking, em.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - if ($id != '') $sql .= " WHERE em.rowid=".$id; + if ($id != '') { + $sql .= " WHERE em.rowid=".((int) $id); + } $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->listmeths[$i]['rowid'] = $obj->rowid; $this->listmeths[$i]['code'] = $obj->code; $label = $langs->trans('SendingMethod'.$obj->code); @@ -2072,8 +2062,7 @@ class Expedition extends CommonObject public function update_delivery_method($id = '') { // phpcs:enable - if ($id == '') - { + if ($id == '') { $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_shipment_mode (code, libelle, description, tracking)"; $sql .= " VALUES ('".$this->db->escape($this->update['code'])."','".$this->db->escape($this->update['libelle'])."','".$this->db->escape($this->update['description'])."','".$this->db->escape($this->update['tracking'])."')"; $resql = $this->db->query($sql); @@ -2083,10 +2072,12 @@ class Expedition extends CommonObject $sql .= ",libelle='".$this->db->escape($this->update['libelle'])."'"; $sql .= ",description='".$this->db->escape($this->update['description'])."'"; $sql .= ",tracking='".$this->db->escape($this->update['tracking'])."'"; - $sql .= " WHERE rowid=".$id; + $sql .= " WHERE rowid=".((int) $id); $resql = $this->db->query($sql); } - if ($resql < 0) dol_print_error($this->db, ''); + if ($resql < 0) { + dol_print_error($this->db, ''); + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -2131,24 +2122,20 @@ class Expedition extends CommonObject */ public function getUrlTrackingStatus($value = '') { - if (!empty($this->shipping_method_id)) - { + if (!empty($this->shipping_method_id)) { $sql = "SELECT em.code, em.tracking"; $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; $sql .= " WHERE em.rowid = ".$this->shipping_method_id; $resql = $this->db->query($sql); - if ($resql) - { - if ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + if ($obj = $this->db->fetch_object($resql)) { $tracking = $obj->tracking; } } } - if (!empty($tracking) && !empty($value)) - { + if (!empty($tracking) && !empty($value)) { $url = str_replace('{TRACKID}', $value, $tracking); $this->tracking_url = sprintf(''.($value ? $value : 'url').'', $url, $url); } else { @@ -2168,8 +2155,7 @@ class Expedition extends CommonObject $error = 0; // Protection. This avoid to move stock later when we should not - if ($this->statut == self::STATUS_CLOSED) - { + if ($this->statut == self::STATUS_CLOSED) { return 0; } @@ -2179,31 +2165,26 @@ class Expedition extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Set order billed if 100% of order is shipped (qty in shipment lines match qty in order lines) - if ($this->origin == 'commande' && $this->origin_id > 0) - { + if ($this->origin == 'commande' && $this->origin_id > 0) { $order = new Commande($this->db); $order->fetch($this->origin_id); $order->loadExpeditions(self::STATUS_CLOSED); // Fill $order->expeditions = array(orderlineid => qty) $shipments_match_order = 1; - foreach ($order->lines as $line) - { + foreach ($order->lines as $line) { $lineid = $line->id; $qty = $line->qty; - if (($line->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && $order->expeditions[$lineid] != $qty) - { + if (($line->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && $order->expeditions[$lineid] != $qty) { $shipments_match_order = 0; $text = 'Qty for order line id '.$lineid.' is '.$qty.'. However in the shipments with status Expedition::STATUS_CLOSED='.self::STATUS_CLOSED.' we have qty = '.$order->expeditions[$lineid].', so we can t close order'; dol_syslog($text); break; } } - if ($shipments_match_order) - { + if ($shipments_match_order) { dol_syslog("Qty for the ".count($order->lines)." lines of order have same value for shipments with status Expedition::STATUS_CLOSED=".self::STATUS_CLOSED.', so we close order'); $order->cloture($user); } @@ -2213,8 +2194,7 @@ class Expedition extends CommonObject // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2232,26 +2212,24 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { $qty = $obj->qty; } else { $qty = $obj->edbqty; } - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record @@ -2280,8 +2258,7 @@ class Expedition extends CommonObject } // Call trigger - if (!$error) - { + if (!$error) { $result = $this->call_trigger('SHIPPING_CLOSED', $user); if ($result < 0) { $error++; @@ -2292,8 +2269,7 @@ class Expedition extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -2307,11 +2283,24 @@ class Expedition extends CommonObject /** * Classify the shipping as invoiced (used when WORKFLOW_BILL_ON_SHIPMENT is on) * + * @deprecated + * @see setBilled() * @return int <0 if ko, >0 if ok */ public function set_billed() { // phpcs:enable + dol_syslog(get_class($this)."::set_billed is deprecated, use setBilled instead", LOG_NOTICE); + return $this->setBilled(); + } + + /** + * Classify the shipping as invoiced (used when WORKFLOW_BILL_ON_SHIPMENT is on) + * + * @return int <0 if ko, >0 if ok + */ + public function setBilled() + { global $user; $error = 0; @@ -2321,8 +2310,7 @@ class Expedition extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->statut = self::STATUS_CLOSED; $this->billed = 1; @@ -2359,8 +2347,7 @@ class Expedition extends CommonObject $error = 0; // Protection. This avoid to move stock later when we should not - if ($this->statut == self::STATUS_VALIDATED) - { + if ($this->statut == self::STATUS_VALIDATED) { return 0; } @@ -2372,14 +2359,12 @@ class Expedition extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->statut = self::STATUS_VALIDATED; $this->billed = 0; // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2397,27 +2382,25 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { $qty = $obj->qty; } else { $qty = $obj->edbqty; } - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::reopen expedition movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); //var_dump($this->lines[$i]); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->edbrowid)) - { + if (empty($obj->edbrowid)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record @@ -2457,8 +2440,7 @@ class Expedition extends CommonObject $this->errors[] = $this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -2700,10 +2682,9 @@ class ExpeditionLigne extends CommonObjectLine { $sql = 'SELECT ed.rowid, ed.fk_expedition, ed.fk_entrepot, ed.fk_origin_line, ed.qty, ed.rang'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as ed'; - $sql .= ' WHERE ed.rowid = '.$rowid; + $sql .= ' WHERE ed.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); $this->id = $objp->rowid; $this->fk_expedition = $objp->fk_expedition; @@ -2736,20 +2717,20 @@ class ExpeditionLigne extends CommonObjectLine $error = 0; // Check parameters - if (empty($this->fk_expedition) || empty($this->fk_origin_line) || !is_numeric($this->qty)) - { + if (empty($this->fk_expedition) || empty($this->fk_origin_line) || !is_numeric($this->qty)) { $this->error = 'ErrorMandatoryParametersNotProvided'; return -1; } $this->db->begin(); - if (empty($this->rang)) $this->rang = 0; + if (empty($this->rang)) { + $this->rang = 0; + } // Rank to use $ranktouse = $this->rang; - if ($ranktouse == -1) - { + if ($ranktouse == -1) { $rangmax = $this->line_max($this->fk_expedition); $ranktouse = $rangmax + 1; } @@ -2770,25 +2751,20 @@ class ExpeditionLigne extends CommonObjectLine dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."expeditiondet"); - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINESHIPPING_INSERT', $user); - if ($result < 0) - { + if ($result < 0) { $error++; } // End call triggers @@ -2799,8 +2775,7 @@ class ExpeditionLigne extends CommonObjectLine return $this->id; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2828,13 +2803,11 @@ class ExpeditionLigne extends CommonObjectLine $this->db->begin(); // delete batch expedition line - if ($conf->productbatch->enabled) - { + if ($conf->productbatch->enabled) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch"; $sql .= " WHERE fk_expeditiondet = ".$this->id; - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->errors[] = $this->db->lasterror()." - sql=$sql"; $error++; } @@ -2843,24 +2816,19 @@ class ExpeditionLigne extends CommonObjectLine $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; $sql .= " WHERE rowid = ".$this->id; - if (!$error && $this->db->query($sql)) - { + if (!$error && $this->db->query($sql)) { // Remove extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->errors[] = $this->error; $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINESHIPPING_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->errors[] = $this->error; $error++; } @@ -2875,8 +2843,7 @@ class ExpeditionLigne extends CommonObjectLine $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2903,16 +2870,16 @@ class ExpeditionLigne extends CommonObjectLine $this->db->begin(); // Clean parameters - if (empty($this->qty)) $this->qty = 0; + if (empty($this->qty)) { + $this->qty = 0; + } $qty = price2num($this->qty); $remainingQty = 0; $batch = null; $batch_id = null; $expedition_batch_id = null; - if (is_array($this->detail_batch)) // array of ExpeditionLineBatch - { - if (count($this->detail_batch) > 1) - { + if (is_array($this->detail_batch)) { // array of ExpeditionLineBatch + if (count($this->detail_batch) > 1) { dol_syslog(get_class($this).'::update only possible for one batch', LOG_ERR); $this->errors[] = 'ErrorBadParameters'; $error++; @@ -2920,21 +2887,18 @@ class ExpeditionLigne extends CommonObjectLine $batch = $this->detail_batch[0]->batch; $batch_id = $this->detail_batch[0]->fk_origin_stock; $expedition_batch_id = $this->detail_batch[0]->id; - if ($this->entrepot_id != $this->detail_batch[0]->entrepot_id) - { + if ($this->entrepot_id != $this->detail_batch[0]->entrepot_id) { dol_syslog(get_class($this).'::update only possible for batch of same warehouse', LOG_ERR); $this->errors[] = 'ErrorBadParameters'; $error++; } $qty = price2num($this->detail_batch[0]->qty); } - } elseif (!empty($this->detail_batch)) - { + } elseif (!empty($this->detail_batch)) { $batch = $this->detail_batch->batch; $batch_id = $this->detail_batch->fk_origin_stock; $expedition_batch_id = $this->detail_batch->id; - if ($this->entrepot_id != $this->detail_batch->entrepot_id) - { + if ($this->entrepot_id != $this->detail_batch->entrepot_id) { dol_syslog(get_class($this).'::update only possible for batch of same warehouse', LOG_ERR); $this->errors[] = 'ErrorBadParameters'; $error++; @@ -2943,8 +2907,7 @@ class ExpeditionLigne extends CommonObjectLine } // check parameters - if (!isset($this->id) || !isset($this->entrepot_id)) - { + if (!isset($this->id) || !isset($this->entrepot_id)) { dol_syslog(get_class($this).'::update missing line id and/or warehouse id', LOG_ERR); $this->errors[] = 'ErrorMandatoryParametersNotProvided'; $error++; @@ -2953,8 +2916,7 @@ class ExpeditionLigne extends CommonObjectLine // update lot - if (!empty($batch) && $conf->productbatch->enabled) - { + if (!empty($batch) && $conf->productbatch->enabled) { dol_syslog(get_class($this)."::update expedition batch id=$expedition_batch_id, batch_id=$batch_id, batch=$batch"); if (empty($batch_id) || empty($this->fk_product)) { @@ -2965,16 +2927,13 @@ class ExpeditionLigne extends CommonObjectLine // fetch remaining lot qty require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; - if (!$error && ($lotArray = ExpeditionLineBatch::fetchAll($this->db, $this->id)) < 0) - { + if (!$error && ($lotArray = ExpeditionLineBatch::fetchAll($this->db, $this->id)) < 0) { $this->errors[] = $this->db->lasterror()." - ExpeditionLineBatch::fetchAll"; $error++; } else { // caculate new total line qty - foreach ($lotArray as $lot) - { - if ($expedition_batch_id != $lot->id) - { + foreach ($lotArray as $lot) { + if ($expedition_batch_id != $lot->id) { $remainingQty += $lot->qty; } } @@ -2985,29 +2944,24 @@ class ExpeditionLigne extends CommonObjectLine // fetch from product_lot require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; $lot = new Productlot($this->db); - if ($lot->fetch(0, $this->fk_product, $batch) < 0) - { + if ($lot->fetch(0, $this->fk_product, $batch) < 0) { $this->errors[] = $lot->errors; $error++; } - if (!$error && !empty($expedition_batch_id)) - { + if (!$error && !empty($expedition_batch_id)) { // delete lot expedition line $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet_batch"; $sql .= " WHERE fk_expeditiondet = ".$this->id; - $sql .= " AND rowid = ".$expedition_batch_id; + $sql .= " AND rowid = ".((int) $expedition_batch_id); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->errors[] = $this->db->lasterror()." - sql=$sql"; $error++; } } - if (!$error && $this->detail_batch->qty > 0) - { + if (!$error && $this->detail_batch->qty > 0) { // create lot expedition line - if (isset($lot->id)) - { + if (isset($lot->id)) { $shipmentLot = new ExpeditionLineBatch($this->db); $shipmentLot->batch = $lot->batch; $shipmentLot->eatby = $lot->eatby; @@ -3015,8 +2969,7 @@ class ExpeditionLigne extends CommonObjectLine $shipmentLot->entrepot_id = $this->detail_batch->entrepot_id; $shipmentLot->qty = $this->detail_batch->qty; $shipmentLot->fk_origin_stock = $batch_id; - if ($shipmentLot->create($this->id) < 0) - { + if ($shipmentLot->create($this->id) < 0) { $this->errors[] = $shipmentLot->errors; $error++; } @@ -3024,40 +2977,33 @@ class ExpeditionLigne extends CommonObjectLine } } } - if (!$error) - { + if (!$error) { // update line $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; $sql .= " fk_entrepot = ".($this->entrepot_id > 0 ? $this->entrepot_id : 'null'); $sql .= " , qty = ".$qty; $sql .= " WHERE rowid = ".$this->id; - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->errors[] = $this->db->lasterror()." - sql=$sql"; $error++; } } - if (!$error) - { - if (!$error) - { + if (!$error) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->errors[] = $this->error; $error++; } } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINESHIPPING_UPDATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->errors[] = $this->error; $error++; } @@ -3067,8 +3013,7 @@ class ExpeditionLigne extends CommonObjectLine $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 637f9dd749c..736cfba6e42 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -75,10 +75,8 @@ class ExpeditionLineBatch extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->sellby = $this->db->jdate($obj->sellby); @@ -126,16 +124,16 @@ class ExpeditionLineBatch extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.self::$_table_element); $this->fk_expeditiondet = $id_line_expdet; return $this->id; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -153,14 +151,11 @@ class ExpeditionLineBatch extends CommonObject */ public static function deletefromexp($db, $id_expedition) { - $id_expedition = (int) $id_expedition; - $sql = "DELETE FROM ".MAIN_DB_PREFIX.self::$_table_element; - $sql .= " WHERE fk_expeditiondet in (SELECT rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition=".$id_expedition.")"; + $sql .= " WHERE fk_expeditiondet in (SELECT rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition=".((int) $id_expedition).")"; dol_syslog(__METHOD__, LOG_DEBUG); - if ($db->query($sql)) - { + if ($db->query($sql)) { return 1; } else { return -1; @@ -185,27 +180,23 @@ class ExpeditionLineBatch extends CommonObject $sql .= " eb.batch,"; $sql .= " eb.qty,"; $sql .= " eb.fk_origin_stock"; - if ($fk_product > 0) - { + if ($fk_product > 0) { $sql .= ", pl.sellby"; $sql .= ", pl.eatby"; } $sql .= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as eb"; - if ($fk_product > 0) - { + if ($fk_product > 0) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON pl.batch = eb.batch AND pl.fk_product = ".$fk_product; } $sql .= " WHERE fk_expeditiondet=".(int) $id_line_expdet; dol_syslog(__METHOD__."", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $ret = array(); - while ($i < $num) - { + while ($i < $num) { $tmp = new self($db); $obj = $db->fetch_object($resql); diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index 49d37179eda..d25c7b52098 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -73,12 +73,15 @@ class ExpeditionStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($this->socid) - { - $this->where .= " AND c.fk_soc = ".$this->socid; + if (!$user->rights->societe->client->voir && !$this->socid) { + $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($this->socid) { + $this->where .= " AND c.fk_soc = ".((int) $this->socid); + } + if ($this->userid > 0) { + $this->where .= ' AND c.fk_user_author = '.((int) $this->userid); } - if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; } /** @@ -94,7 +97,9 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -116,7 +121,9 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -135,7 +142,9 @@ class ExpeditionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); diff --git a/htdocs/expedition/class/index.html b/htdocs/expedition/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index d15e267b285..cd9febc685d 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -41,57 +41,51 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'expedition', $id, ''); - $object = new Expedition($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); - if (!empty($object->origin)) - { + if (!empty($object->origin)) { $typeobject = $object->origin; $origin = $object->origin; $object->fetch_origin(); } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } } +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'expedition', $object->id, ''); + /* * Actions */ -if ($action == 'addcontact' && $user->rights->expedition->creer) -{ - if ($result > 0 && $id > 0) - { +if ($action == 'addcontact' && $user->rights->expedition->creer) { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); } else { @@ -100,21 +94,14 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) } setEventMessages($mesg, $mesgs, 'errors'); } -} +} elseif ($action == 'swapstatut' && $user->rights->expedition->creer) { + // bascule du statut d'un contact + $result = $objectsrc->swapContactStatus(GETPOST('ligne', 'int')); +} elseif ($action == 'deletecontact' && $user->rights->expedition->creer) { + // Efface un contact + $result = $objectsrc->delete_contact(GETPOST("lineid", 'int')); -// bascule du statut d'un contact -elseif ($action == 'swapstatut' && $user->rights->expedition->creer) -{ - $result = $objectsrc->swapContactStatus(GETPOST('ligne')); -} - -// Efface un contact -elseif ($action == 'deletecontact' && $user->rights->expedition->creer) -{ - $result = $objectsrc->delete_contact(GETPOST("lineid")); - - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -134,7 +121,10 @@ elseif ($action == 'setaddress' && $user->rights->expedition->creer) * View */ -llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:expeditions_Clients|ES:Pedidos de clientes'); + +$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen'; + +llxHeader('', $langs->trans('Order'), $help_url); $form = new Form($db); $formcompany = new FormCompany($db); @@ -149,8 +139,7 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $langs->trans("OrderCard"); $head = shipping_prepare_head($object); @@ -213,8 +202,7 @@ if ($id > 0 || !empty($ref)) print '
    '.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'
    - '.$langs->trans("NA").'
    '.$lines[$i]->qty_shipped.''; - if ($lines[$i]->entrepot_id > 0) - { + if ($lines[$i]->entrepot_id > 0) { $entrepot = new Entrepot($db); $entrepot->fetch($lines[$i]->entrepot_id); print $entrepot->getNomUrl(1); - } elseif (count($lines[$i]->details_entrepot) > 1) - { + } elseif (count($lines[$i]->details_entrepot) > 1) { $detail = ''; - foreach ($lines[$i]->details_entrepot as $detail_entrepot) - { - if ($detail_entrepot->entrepot_id > 0) - { + foreach ($lines[$i]->details_entrepot as $detail_entrepot) { + if ($detail_entrepot->entrepot_id > 0) { $entrepot = new Entrepot($db); $entrepot->fetch($detail_entrepot->entrepot_id); - $detail .= $langs->trans("DetailWarehouseFormat", $entrepot->libelle, $detail_entrepot->qty_shipped).'
    '; + $detail .= $langs->trans("DetailWarehouseFormat", $entrepot->libelle, $detail_entrepot->qty_shipped).'
    '; } } print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail); @@ -2299,17 +2225,13 @@ if ($action == 'create') } // Batch number managment - if (!empty($conf->productbatch->enabled)) - { - if (isset($lines[$i]->detail_batch)) - { + if (!empty($conf->productbatch->enabled)) { + if (isset($lines[$i]->detail_batch)) { print ''; print '
    '; - if ($lines[$i]->product_tobatch) - { + if ($lines[$i]->product_tobatch) { $detail = ''; - foreach ($lines[$i]->detail_batch as $dbatch) // $dbatch is instance of ExpeditionLineBatch - { + foreach ($lines[$i]->detail_batch as $dbatch) { // $dbatch is instance of ExpeditionLineBatch $detail .= $langs->trans("Batch").': '.$dbatch->batch; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); @@ -2333,27 +2255,31 @@ if ($action == 'create') // Weight print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); - else print ' '; + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { + print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); + } else { + print ' '; + } print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); - else print ' '; + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { + print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); + } else { + print ' '; + } print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units).''; print '
    '; print '
    '; print '
    '; print 'id.'">'.img_edit().''; @@ -2363,8 +2289,7 @@ if ($action == 'create') print '
    '; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { print '\n"; print ''; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { print ''; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $shipment->id = $obj->rowid; @@ -123,7 +108,9 @@ if ($resql) print ''.$obj->name.''; print ''; print ''; $i++; } @@ -151,17 +138,22 @@ $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping' AND el.sourcetype IN ('commande')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid AND el.sourcetype IN ('commande') AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; +} $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; +} $sql .= " AND e.fk_statut = ".Expedition::STATUS_VALIDATED; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND c.fk_soc = ".$socid; +} $sql .= " ORDER BY e.date_delivery DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -175,11 +167,9 @@ if ($resql) print ''; print ''; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $shipment->id = $obj->rowid; @@ -191,8 +181,7 @@ if ($resql) print ''; print '
    '; print '
    '; $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); @@ -224,8 +212,7 @@ if ($id > 0 || !empty($ref)) print "
    '; $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); @@ -260,10 +247,11 @@ if ($id > 0 || !empty($ref)) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); $preselectedtypeofcontact = dol_getIdFromCode($db, 'SHIPPING', 'c_type_contact', 'code', 'rowid'); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index 933763bd29a..c5e13967abc 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -45,38 +45,43 @@ $confirm = GETPOST('confirm'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref'); -// Security check -if ($user->socid) -{ - $socid = $user->socid; -} -$result = restrictedArea($user, 'expedition', $id, ''); - // Get parameters $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Expedition($db); +if ($object->fetch($id, $ref)) { + $object->fetch_thirdparty(); + $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); +} + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'expedition', $object->id, ''); + /* * Actions */ -if ($object->fetch($id)) -{ - $object->fetch_thirdparty(); - $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); -} -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 4a84bfc6718..defd1ddf9b4 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -53,19 +53,6 @@ print load_fiche_titre($langs->trans("SendingsArea"), '', 'dolly'); print '
    '; - -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - print ''; - print ''; - print '
    '; - print ''; - print ''; - print ''; - print "
    '.$langs->trans("Search").'
    '; - print $langs->trans("Shipment").':

    \n"; -} - /* * Shipments to validate */ @@ -79,19 +66,19 @@ $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) -{ +if (!$user->rights->societe->client->voir && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; $sql .= $clause." sc.fk_user = ".$user->id; $clause = " AND "; } $sql .= $clause." e.fk_statut = ".Expedition::STATUS_DRAFT; $sql .= " AND e.entity IN (".getEntity('expedition').")"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND c.fk_soc = ".$socid; +} $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); print '
    '; @@ -105,11 +92,9 @@ if ($resql) print ''; print '
    '; - if ($obj->commande_id) print ''.$obj->commande_ref.''; + if ($obj->commande_id) { + print ''.$obj->commande_ref.''; + } print '
    '.img_object($langs->trans("ShowCompany"), "company").' '.$obj->name.''; - if ($obj->commande_id > 0) - { + if ($obj->commande_id > 0) { $orderstatic->id = $obj->commande_id; $orderstatic->ref = $obj->commande_ref; print $orderstatic->getNomUrl(1); @@ -209,7 +198,9 @@ if ($resql) } print "

    "; $db->free($resql); -} else dol_print_error($db); +} else { + dol_print_error($db); +} /* * Open orders @@ -217,17 +208,22 @@ if ($resql) $sql = "SELECT c.rowid, c.ref, c.ref_client as ref_customer, c.fk_statut as status, c.facture as billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('order').")"; $sql .= " AND c.fk_statut IN (".Commande::STATUS_VALIDATED.", ".Commande::STATUS_ACCEPTED.")"; -if ($socid > 0) $sql .= " AND c.fk_soc = ".$socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($socid > 0) { + $sql .= " AND c.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 c.rowid ASC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $langs->load("orders"); $num = $db->num_rows($resql); @@ -243,11 +239,9 @@ if ($resql) print ''; print ''; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num && $i < 10) - { + while ($i < $num && $i < 10) { $obj = $db->fetch_object($resql); $orderstatic->id = $obj->rowid; @@ -284,7 +278,9 @@ if ($resql) } print "
    "; -} else dol_print_error($db); +} else { + dol_print_error($db); +} print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 20bb6f298cb..427efb02475 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -49,7 +49,9 @@ $toselect = GETPOST('toselect', 'array'); // Security check $expeditionid = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expedition', $expeditionid, ''); $search_ref_exp = GETPOST("search_ref_exp", 'alpha'); @@ -79,9 +81,15 @@ $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 (!$sortfield) $sortfield = "e.ref"; -if (!$sortorder) $sortorder = "DESC"; -if (empty($page) || $page == -1 || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 +if (!$sortfield) { + $sortfield = "e.ref"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} +if (empty($page) || $page == -1 || (empty($toselect) && $massaction === '0')) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -109,7 +117,9 @@ $fieldstosearchall = array( 'e.note_public'=>'NotePublic', 'e.tracking_number'=>"TrackingNumber", ); -if (empty($user->socid)) $fieldstosearchall["e.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["e.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -144,18 +154,23 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); */ $error = 0; -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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_categ = ''; $search_user = ''; $search_sale = ''; @@ -182,8 +197,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_categ_cus = 0; } -if (empty($reshook)) -{ +if (empty($reshook)) { $objectclass = 'Expedition'; $objectlabel = 'Sendings'; $permissiontoread = $user->rights->expedition->lire; @@ -211,7 +225,9 @@ $helpurl = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Ex llxHeader('', $langs->trans('ListOfSendings'), $helpurl); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; +if ($sall || $search_product_category > 0 || $search_user > 0) { + $sql = 'SELECT DISTINCT'; +} $sql .= " e.rowid, e.ref, e.ref_customer, e.date_expedition as date_expedition, e.weight, e.weight_units, e.date_delivery as delivery_date, e.fk_statut, e.billed, e.tracking_number,"; $sql .= " l.date_delivery as date_reception,"; $sql .= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, "; @@ -219,24 +235,34 @@ $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " e.date_creation as date_creation, e.tms as date_update,"; $sql .= " u.login"; -if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; +if ($search_categ_cus) { + $sql .= ", cc.fk_categorie, cc.fk_soc"; +} // 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."expedition as e"; -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 (e.rowid = ef.fk_object)"; +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 (e.rowid = ef.fk_object)"; +} if ($sall || $search_product_category > 0) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expeditiondet as ed ON e.rowid=ed.fk_expedition'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON pd.rowid=ed.fk_origin_line'; } -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +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."societe as s ON s.rowid = e.fk_soc"; -if (!empty($search_categ_cus)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ_cus)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; @@ -247,50 +273,91 @@ if ($search_user > 0) { // Get link to order to get the order id in eesource.fk $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as eesource ON eesource.fk_target = e.rowid AND eesource.targettype = 'shipping' AND eesource.sourcetype = 'commande'"; } // 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"; +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; -if ($socid > 0) $sql .= ' AND s.rowid = '.$socid; -if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all -{ +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$search_product_category; +} +if ($socid > 0) { + $sql .= ' AND s.rowid = '.$socid; +} +if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all $sql .= " AND e.fk_soc = sc.fk_soc"; $sql .= " AND sc.fk_user = ".$user->id; } -if ($socid) -{ +if ($socid) { $sql .= " AND e.fk_soc = ".$socid; } if ($search_status <> '' && $search_status >= 0) { $sql .= " AND e.fk_statut = ".$search_status; } -if ($search_ref_customer != '') $sql .= natural_search('e.ref_customer', $search_ref_customer); -if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND e.billed = '.$search_billed; -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 (".$search_country.')'; -if ($search_tracking) $sql .= natural_search("e.tracking_number", $search_tracking); -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; -if ($search_user > 0) -{ +if ($search_ref_customer != '') { + $sql .= natural_search('e.ref_customer', $search_ref_customer); +} +if ($search_billed != '' && $search_billed >= 0) { + $sql .= ' AND e.billed = '.$search_billed; +} +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->sanitize($search_country).')'; +} +if ($search_tracking) { + $sql .= natural_search("e.tracking_number", $search_tracking); +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; +} +if ($search_sale > 0) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; +} +if ($search_user > 0) { // The contact on a shipment is also the contact of the order. $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = eesource.fk_source AND ec.fk_socpeople = ".$db->escape($search_user); } -if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp); -if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv); -if ($search_company) $sql .= natural_search('s.nom', $search_company); -if ($search_datedelivery_start) $sql .= " AND e.date_delivery >= '".$db->idate($search_datedelivery_start)."'"; -if ($search_datedelivery_end) $sql .= " AND e.date_delivery <= '".$db->idate($search_datedelivery_end)."'"; -if ($search_datereceipt_start) $sql .= " AND l.date_delivery >= '".$db->idate($search_datereceipt_start)."'"; -if ($search_datereceipt_end) $sql .= " AND l.date_delivery <= '".$db->idate($search_datereceipt_end)."'"; -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($search_categ_cus > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); -if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL"; +if ($search_ref_exp) { + $sql .= natural_search('e.ref', $search_ref_exp); +} +if ($search_ref_liv) { + $sql .= natural_search('l.ref', $search_ref_liv); +} +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); +} +if ($search_datedelivery_start) { + $sql .= " AND e.date_delivery >= '".$db->idate($search_datedelivery_start)."'"; +} +if ($search_datedelivery_end) { + $sql .= " AND e.date_delivery <= '".$db->idate($search_datedelivery_end)."'"; +} +if ($search_datereceipt_start) { + $sql .= " AND l.date_delivery >= '".$db->idate($search_datereceipt_start)."'"; +} +if ($search_datereceipt_end) { + $sql .= " AND l.date_delivery <= '".$db->idate($search_datereceipt_end)."'"; +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($search_categ_cus > 0) { + $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +} +if ($search_categ_cus == -2) { + $sql .= " AND cc.fk_categorie IS NULL"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -303,12 +370,10 @@ $sql .= $hookmanager->resPrint; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -318,515 +383,617 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); +if (!$resql) { + dol_print_error($db); + exit; +} - $arrayofselected = is_array($toselect) ? $toselect : array(); +$num = $db->num_rows($resql); - $expedition = new Expedition($db); +$arrayofselected = is_array($toselect) ? $toselect : array(); - $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 ($search_ref_exp) $param .= "&search_ref_exp=".urlencode($search_ref_exp); - if ($search_ref_liv) $param .= "&search_ref_liv=".urlencode($search_ref_liv); - 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_company) $param .= "&search_company=".urlencode($search_company); - if ($search_tracking) $param .= "&search_tracking=".urlencode($search_tracking); - if ($search_town) $param .= '&search_town='.urlencode($search_town); - if ($search_zip) $param .= '&search_zip='.urlencode($search_zip); +$expedition = new Expedition($db); - if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); - if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); - if ($search_datereceipt_start) $param .= '&search_datereceipt_start='.urlencode($search_datereceipt_start); - if ($search_datereceipt_end) $param .= '&search_datereceipt_end='.urlencode($search_datereceipt_end); +$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 ($search_ref_exp) { + $param .= "&search_ref_exp=".urlencode($search_ref_exp); +} +if ($search_ref_liv) { + $param .= "&search_ref_liv=".urlencode($search_ref_liv); +} +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_company) { + $param .= "&search_company=".urlencode($search_company); +} +if ($search_tracking) { + $param .= "&search_tracking=".urlencode($search_tracking); +} +if ($search_town) { + $param .= '&search_town='.urlencode($search_town); +} +if ($search_zip) { + $param .= '&search_zip='.urlencode($search_zip); +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); +} - if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); - if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); - if ($search_status != '') $param .= '&search_status='.urlencode($search_status); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +if ($search_datedelivery_start) { + $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); +} +if ($search_datedelivery_end) { + $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); +} +if ($search_datereceipt_start) { + $param .= '&search_datereceipt_start='.urlencode($search_datereceipt_start); +} +if ($search_datereceipt_end) { + $param .= '&search_datereceipt_end='.urlencode($search_datereceipt_end); +} - $arrayofmassactions = array( - 'builddoc' => $langs->trans("PDFMerge"), - //'classifyclose'=>$langs->trans("Close"), TODO massive close shipment ie: when truck is charged - 'presend' => $langs->trans("SendByMail"), - ); - if (in_array($massaction, array('presend'))) $arrayofmassactions = array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); +if ($search_product_category != '') { + $param .= '&search_product_category='.urlencode($search_product_category); +} +if ($search_categ_cus > 0) { + $param .= '&search_categ_cus='.urlencode($search_categ_cus); +} +if ($search_status != '') { + $param .= '&search_status='.urlencode($search_status); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - // Currently: a sending can't create from sending list - // $url = DOL_URL_ROOT.'/expedition/card.php?action=create'; - // if (!empty($socid)) $url .= '&socid='.$socid; - // $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer); - $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '', $user->rights->expedition->creer); +$arrayofmassactions = array( + 'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'classifyclose'=>$langs->trans("Close"), TODO massive close shipment ie: when truck is charged + 'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if (in_array($massaction, array('presend'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $i = 0; - print '
    '."\n"; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; +// Currently: a sending can't create from sending list +// $url = DOL_URL_ROOT.'/expedition/card.php?action=create'; +// if (!empty($socid)) $url .= '&socid='.$socid; +// $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer); +$newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '', $user->rights->expedition->creer); - print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1); +$i = 0; +print ''."\n"; +if ($optioncss != '') { + print ''; +} +print ''; +print ''; +print ''; +print ''; +print ''; - $topicmail = "SendShippingRef"; - $modelmail = "shipping_send"; - $objecttmp = new Expedition($db); - $trackid = 'shi'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; +print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1); - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); - print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; +$topicmail = "SendShippingRef"; +$modelmail = "shipping_send"; +$objecttmp = new Expedition($db); +$trackid = 'shi'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); } + print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; +} - $moreforfilter = ''; +$moreforfilter = ''; - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); - $moreforfilter .= '
    '; - } - // If the user can view other users - if ($user->rights->user->user->lire) - { - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); - $moreforfilter .= '
    '; - } - // If the user can view prospects other than his' - 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 .= '
    '; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; - $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $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) && $user->rights->categorie->lire) - { - require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': '; - $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 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 the user can view prospects other than his' +if ($user->rights->societe->client->voir || $socid) { + $langs->load("commercial"); + $moreforfilter .= '
    '; + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user'); + $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200'); + $moreforfilter .= '
    '; +} +// If the user can view other users +if ($user->rights->user->user->lire) { + $moreforfilter .= '
    '; + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user'); + $moreforfilter .= $form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + $moreforfilter .= '
    '; +} +// If the user can view prospects other than his' +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 .= '
    '; + $tmptitle = $langs->trans('IncludingProductWithTag'); + $moreforfilter .= img_picto($tmptitle, 'category'); + //$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); + //$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'parent', 1, $tmptitle); - if (!empty($moreforfilter)) - { - print '
    '; - print $moreforfilter; - print '
    '; - } + $moreforfilter .= '
    '; +} +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $moreforfilter .= '
    '; + $tmptitle = $langs->trans('CustomersProspectsCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category'); + $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle); + $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; +} - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); - if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields +if (!empty($moreforfilter)) { + print '
    '; + print $moreforfilter; + print '
    '; +} - print '
    '; - print ''."\n"; +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields +} + +print '
    '; +print '
    '."\n"; + +// Fields title search +print ''; +// Ref +if (!empty($arrayfields['e.ref']['checked'])) { + print ''; +} +// Ref customer +if (!empty($arrayfields['e.ref_customer']['checked'])) { + print ''; +} +// Thirdparty +if (!empty($arrayfields['s.nom']['checked'])) { + print ''; +} +// Town +if (!empty($arrayfields['s.town']['checked'])) { + print ''; +} +// Zip +if (!empty($arrayfields['s.zip']['checked'])) { + print ''; +} +// State +if (!empty($arrayfields['state.nom']['checked'])) { + print ''; +} +// Country +if (!empty($arrayfields['country.code_iso']['checked'])) { + print ''; +} +// Company type +if (!empty($arrayfields['typent.code']['checked'])) { + print ''; +} +// Weight +if (!empty($arrayfields['e.weight']['checked'])) { + print ''; +} +// Date delivery planned +if (!empty($arrayfields['e.date_delivery']['checked'])) { + print ''; +} +// Tracking number +if (!empty($arrayfields['e.tracking_number']['checked'])) { + print ''; +} +if (!empty($arrayfields['l.ref']['checked'])) { + // Delivery ref + 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; +// Date creation +if (!empty($arrayfields['e.datec']['checked'])) { + print ''; +} +// Date modification +if (!empty($arrayfields['e.tms']['checked'])) { + print ''; +} +// Status +if (!empty($arrayfields['e.fk_statut']['checked'])) { + print ''; +} +// Status billed +if (!empty($arrayfields['e.billed']['checked'])) { + print ''; +} +// Action column +print ''; +print "\n"; + +print ''; +if (!empty($arrayfields['e.ref']['checked'])) { + print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['e.ref_customer']['checked'])) { + print_liste_field_titre($arrayfields['e.ref_customer']['label'], $_SERVER["PHP_SELF"], "e.ref_customer", "", $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, 'left '); +} +if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['country.code_iso']['checked'])) { + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['e.weight']['checked'])) { + print_liste_field_titre($arrayfields['e.weight']['label'], $_SERVER["PHP_SELF"], "e.weight", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['e.date_delivery']['checked'])) { + print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['e.tracking_number']['checked'])) { + print_liste_field_titre($arrayfields['e.tracking_number']['label'], $_SERVER["PHP_SELF"], "e.tracking_number", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['l.ref']['checked'])) { + print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['l.date_delivery']['checked'])) { + print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $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); +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +if (!empty($arrayfields['e.datec']['checked'])) { + print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['e.tms']['checked'])) { + print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['e.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['e.billed']['checked'])) { + print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); +} +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +print "\n"; + +$typenArray = $formcompany->typent_array(1); +$i = 0; +$totalarray = array(); +while ($i < min($num, $limit)) { + $obj = $db->fetch_object($resql); + + $shipment->id = $obj->rowid; + $shipment->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->ref = $obj->name; + $companystatic->name = $obj->name; + + $object = new Expedition($db); + $object->fetch($obj->rowid); + + print ''; - // Fields title search - print ''; // Ref - if (!empty($arrayfields['e.ref']['checked'])) - { - print ''; + if (!empty($arrayfields['e.ref']['checked'])) { + print "\n"; + if (!$i) { + $totalarray['nbfield']++; + } } + // Ref customer - if (!empty($arrayfields['e.ref_customer']['checked'])) - { - print ''; + if (!empty($arrayfields['e.ref_customer']['checked'])) { + print "\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - // Thirdparty - if (!empty($arrayfields['s.nom']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) print ''; - // Zip - if (!empty($arrayfields['s.zip']['checked'])) print ''; - // State - if (!empty($arrayfields['state.nom']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Zip + if (!empty($arrayfields['s.zip']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // State + if (!empty($arrayfields['state.nom']['checked'])) { + print "\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } - // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Weight - if (!empty($arrayfields['e.weight']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } - // Date delivery planned - if (!empty($arrayfields['e.date_delivery']['checked'])) - { - print ''; + // Date delivery planed + if (!empty($arrayfields['e.date_delivery']['checked'])) { + print '\n"; } // Tracking number - if (!empty($arrayfields['e.tracking_number']['checked'])) - { - print ''; + if (!empty($arrayfields['e.tracking_number']['checked'])) { + print '\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['l.ref']['checked'])) - { - // Delivery ref - print ''; - } - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + if (!empty($arrayfields['l.ref']['checked']) || !empty($arrayfields['l.date_delivery']['checked'])) { + $shipment->fetchObjectLinked($shipment->id, $shipment->element); + $receiving = ''; + if (is_array($shipment->linkedObjects['delivery']) && count($shipment->linkedObjects['delivery']) > 0) { + $receiving = reset($shipment->linkedObjects['delivery']); + } + + if (!empty($arrayfields['l.ref']['checked'])) { + // Ref + print ''; + } + + if (!empty($arrayfields['l.date_delivery']['checked'])) { + // Date received + print ''."\n"; + } + } + + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.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 + $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['e.datec']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['e.tms']['checked'])) - { - print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['e.fk_statut']['checked'])) - { - print ''; + if (!empty($arrayfields['e.fk_statut']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } - // Status billed - if (!empty($arrayfields['e.billed']['checked'])) - { - print ''; + // Billed + if (!empty($arrayfields['e.billed']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } + // Action column - print ''; - print "\n"; - - print ''; - if (!empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['e.ref_customer']['checked'])) print_liste_field_titre($arrayfields['e.ref_customer']['label'], $_SERVER["PHP_SELF"], "e.ref_customer", "", $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, 'left '); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['e.weight']['checked'])) print_liste_field_titre($arrayfields['e.weight']['label'], $_SERVER["PHP_SELF"], "e.weight", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['e.tracking_number']['checked'])) print_liste_field_titre($arrayfields['e.tracking_number']['label'], $_SERVER["PHP_SELF"], "e.tracking_number", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['l.ref']['checked'])) print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $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); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (!empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); - print "\n"; - - $typenArray = $formcompany->typent_array(1); - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($resql); - - $shipment->id = $obj->rowid; - $shipment->ref = $obj->ref; - - $companystatic->id = $obj->socid; - $companystatic->ref = $obj->name; - $companystatic->name = $obj->name; - - $object = new Expedition($db); - $object->fetch($obj->rowid); - - print ''; - - // Ref - if (!empty($arrayfields['e.ref']['checked'])) - { - print "\n"; - if (!$i) $totalarray['nbfield']++; + print '\n"; - if (!$i) $totalarray['nbfield']++; - } - - // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Town - if (!empty($arrayfields['s.town']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // State - if (!empty($arrayfields['state.nom']['checked'])) - { - print "\n"; - if (!$i) $totalarray['nbfield']++; - } - // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Weight - if (!empty($arrayfields['e.weight']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Date delivery planed - if (!empty($arrayfields['e.date_delivery']['checked'])) - { - print '\n"; - } - // Tracking number - if (!empty($arrayfields['e.tracking_number']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - } - - if (!empty($arrayfields['l.ref']['checked']) || !empty($arrayfields['l.date_delivery']['checked'])) - { - $shipment->fetchObjectLinked($shipment->id, $shipment->element); - $receiving = ''; - if (is_array($shipment->linkedObjects['delivery']) && count($shipment->linkedObjects['delivery']) > 0) $receiving = reset($shipment->linkedObjects['delivery']); - - if (!empty($arrayfields['l.ref']['checked'])) - { - // Ref - print ''; - } - - if (!empty($arrayfields['l.date_delivery']['checked'])) - { - // Date received - print ''."\n"; - } - } - - // 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['e.datec']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Date modification - if (!empty($arrayfields['e.tms']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Status - if (!empty($arrayfields['e.fk_statut']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Billed - if (!empty($arrayfields['e.billed']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - - // Action column - print ''; - if (!$i) $totalarray['nbfield']++; - - print "\n"; - - $i++; + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; } - $db->free($resql); - $parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, '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 ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); + print ''; + print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); + print ''; + + print ''; + print '
    '; + 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 $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 ''; +} +if (!empty($arrayfields['l.date_delivery']['checked'])) { + // Date received + print ''; + print '
    '; + print $form->selectDate($search_datereceipt_start ? $search_datereceipt_start : -1, 'search_datereceipt_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_datereceipt_end ? $search_datereceipt_end : -1, 'search_datereceipt_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + print '
    '; + print ''; + print ''; + print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1); + print ''; + print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); + print ''; +$searchpicto = $form->showFilterAndCheckAddButtons(0); +print $searchpicto; +print '
    '; - print ''; - print '"; + print $shipment->getNomUrl(1); + print "'; - print ''; - print '"; + print $obj->ref_customer; + print "'; - print ''; + + // Third party + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; + print $companystatic->getNomUrl(1); print ''; - print ''; + if (!empty($arrayfields['s.town']['checked'])) { + print ''; + print $obj->town; print ''; + print $obj->zip; + print '".$obj->state_name."'; - print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); + if (!empty($arrayfields['country.code_iso']['checked'])) { + print ''; + $tmparray = getCountry($obj->fk_pays, 'all'); + print $tmparray['label']; print ''; - 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)); + // Type ent + if (!empty($arrayfields['typent.code']['checked'])) { + print ''; + if (isset($typenArray[$obj->typent_code])) { + print $typenArray[$obj->typent_code]; + } print ''; - + if (!empty($arrayfields['e.weight']['checked'])) { + print ''; + if (empty($object->trueWeight)) { + $tmparray = $object->getTotalWeightVolume(); + print showDimensionInBestUnit($tmparray['weight'], 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); + print $form->textwithpicto('', $langs->trans('EstimatedWeight'), 1); + } else { + print $object->trueWeight; + print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : ''; + } print ''; - print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_delivery_start ? $search_delivery_start : -1, 'search_delivery_start', 0, 0, 1); - print '
    '; - print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_delivery_end ? $search_delivery_end : -1, 'search_delivery_end', 0, 0, 1); - print '
    '; - print '
    '; + print dol_print_date($db->jdate($obj->delivery_date), "dayhour"); + /*$now = time(); + if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 ) + { + }*/ + print "'; - print ''; - print ''.$obj->tracking_number."'; - print ''; - } - if (!empty($arrayfields['l.date_delivery']['checked'])) - { - // Date received - print ''; - print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_receipt_start ? $search_receipt_start : -1, 'search_receipt_start', 0, 0, 1); - print '
    '; - print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_receipt_end ? $search_receipt_end : -1, 'search_receipt_end', 0, 0, 1); - print '
    '; - print '
    '; + print !empty($receiving) ? $receiving->getNomUrl($db) : ''; + print ''; + print dol_print_date($db->jdate($obj->date_reception), "day"); + print ''; + if (!empty($arrayfields['e.datec']['checked'])) { + print ''; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; + if (!empty($arrayfields['e.tms']['checked'])) { + print ''; + print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1); - print ''.$shipment->LibStatut($obj->fk_statut, 5).''; - print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); - print ''.yn($obj->billed).''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print '
    "; - print $shipment->getNomUrl(1); - 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; } - - // Ref customer - if (!empty($arrayfields['e.ref_customer']['checked'])) - { - print ""; - print $obj->ref_customer; - print "'; - print $companystatic->getNomUrl(1); - print ''; - print $obj->town; - print ''; - print $obj->zip; - print '".$obj->state_name."'; - $tmparray = getCountry($obj->fk_pays, 'all'); - print $tmparray['label']; - print ''; - if (isset($typenArray[$obj->typent_code])) print $typenArray[$obj->typent_code]; - print ''; - if (empty($object->trueWeight)) - { - $tmparray = $object->getTotalWeightVolume(); - print showDimensionInBestUnit($tmparray['weight'], 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); - print $form->textwithpicto('', $langs->trans('EstimatedWeight'), 1); - } else { - print $object->trueWeight; - print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : ''; - } - print ''; - print dol_print_date($db->jdate($obj->delivery_date), "dayhour"); - /*$now = time(); - if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 ) - { - }*/ - print "'.$obj->tracking_number."'; - print !empty($receiving) ? $receiving->getNomUrl($db) : ''; - print ''; - print dol_print_date($db->jdate($obj->date_reception), "day"); - print ''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); - print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); - print ''.$shipment->LibStatut($obj->fk_statut, 5).''.yn($obj->billed).''; - 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 '
    "; - print "
    "; - print '
    '; - - $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->expedition->lire; - $delallowed = $user->rights->expedition->creer; - $title = ''; - - print $formfile->showdocuments('massfilesarea_sendings', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} else { - dol_print_error($db); + $i++; } +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''.$langs->trans("NoRecordFound").''; +} + +$db->free($resql); + +$parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print ""; +print ""; +print ''; + +$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->expedition->lire; +$delallowed = $user->rights->expedition->creer; +$title = ''; + +print $formfile->showdocuments('massfilesarea_sendings', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); + // End of page llxFooter(); $db->close(); diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 6397a301e59..db28e409309 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -39,39 +39,38 @@ $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -// Security check -$socid = ''; -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, $origin, $origin_id); - $object = new Expedition($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); - if (!empty($object->origin)) - { + if (!empty($object->origin)) { $typeobject = $object->origin; $origin = $object->origin; $object->fetch_origin(); } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } + + $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); } $permissionnote = $user->rights->expedition->creer; // Used by the include of actions_setnotes.inc.php +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'expedition', $object->id, ''); + /* * Actions @@ -88,8 +87,7 @@ llxHeader(); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $head = shipping_prepare_head($object); print dol_get_fiche_head($head, 'note', $langs->trans("Shipment"), -1, 'sending'); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 39772360227..80dbaf698ef 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -37,9 +37,15 @@ if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if (!empty($conf->stock->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +if (!empty($conf->stock->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; +} +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('orders', "companies", "bills", 'propal', 'deliveries', 'stocks', "productbatch", 'incoterm', 'other')); @@ -53,10 +59,13 @@ $hookmanager->initHooks(array('ordershipmentcard')); // Security check $socid = 0; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'commande', $id); $object = new Commande($db); +$shipment = new Expedition($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -65,6 +74,12 @@ $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 +// Security check +if ($user->socid) { + $socid = $user->socid; +} + +$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known @@ -74,93 +89,80 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Categorisation dans projet - if ($action == 'classin') - { - $object = new Commande($db); + if ($action == 'classin') { $object->fetch($id); $object->setProject(GETPOST('projectid', 'int')); } - if ($action == 'confirm_cloture' && GETPOST('confirm', 'alpha') == 'yes') - { - $object = new Commande($db); + if ($action == 'confirm_cloture' && GETPOST('confirm', 'alpha') == 'yes') { $object->fetch($id); $result = $object->cloture($user); - } - - // Positionne ref commande client - elseif ($action == 'setref_client' && $user->rights->commande->creer) { + } elseif ($action == 'setref_client' && $user->rights->commande->creer) { + // Positionne ref commande client $result = $object->set_ref_client($user, GETPOST('ref_client')); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'setdatedelivery' && $user->rights->commande->creer) - { + if ($action == 'setdatedelivery' && $user->rights->commande->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $object->fetch($id); $result = $object->setDeliveryDate($user, $datedelivery); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } /* - if ($action == 'setdeliveryaddress' && $user->rights->commande->creer) - { - $object = new Commande($db); - $object->fetch($id); - $object->setDeliveryAddress(GETPOST('delivery_address_id','int')); - if ($result < 0) - setEventMessages($object->error, $object->errors, 'errors'); - } - */ - if ($action == 'setmode' && $user->rights->commande->creer) + if ($action == 'setdeliveryaddress' && $user->rights->commande->creer) { $object = new Commande($db); $object->fetch($id); - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + $object->setDeliveryAddress(GETPOST('delivery_address_id','int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } + */ + if ($action == 'setmode' && $user->rights->commande->creer) { + $object->fetch($id); + $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } if ($action == 'setavailability' && $user->rights->commande->creer) { - $object = new Commande($db); $object->fetch($id); $result = $object->availability(GETPOST('availability_id')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } if ($action == 'setdemandreason' && $user->rights->commande->creer) { - $object = new Commande($db); $object->fetch($id); $result = $object->demand_reason(GETPOST('demand_reason_id')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } - if ($action == 'setconditions' && $user->rights->commande->creer) - { - $object = new Commande($db); + if ($action == 'setconditions' && $user->rights->commande->creer) { $object->fetch($id); $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - - // Set incoterm - elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) - { + } + } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -169,47 +171,46 @@ if (empty($reshook)) // shipping method if ($action == 'setshippingmethod' && $user->rights->commande->creer) { - $object = new Commande($db); $object->fetch($id); $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } // warehouse if ($action == 'setwarehouse' && $user->rights->commande->creer) { - $object = new Commande($db); $object->fetch($id); $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('SHIPMENT_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } - if ($action == 'set_thirdparty' && $user->rights->commande->creer) - { + if ($action == 'set_thirdparty' && $user->rights->commande->creer) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', '', 'date', '', $user, 'ORDER_MODIFY'); @@ -227,16 +228,16 @@ if (empty($reshook)) $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} llxHeader('', $langs->trans('OrderCard'), ''); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new Commande($db); - if ($object->fetch($id, $ref) > 0) - { + if ($object->fetch($id, $ref) > 0) { $object->loadExpeditions(1); $product_static = new Product($db); @@ -256,16 +257,18 @@ if ($id > 0 || !empty($ref)) $formconfirm = ''; // Confirm validation - if ($action == 'cloture') - { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id, $langs->trans("CloseShipment"), $langs->trans("ConfirmCloseShipment"), "confirm_cloture"); + if ($action == 'cloture') { + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".urlencode($id), $langs->trans("CloseShipment"), $langs->trans("ConfirmCloseShipment"), "confirm_cloture"); } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -283,12 +286,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '
    '.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -366,11 +367,12 @@ if ($id > 0 || !empty($ref)) print $langs->trans('DateDeliveryPlanned'); print ''; - if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; + if ($action != 'editdate_livraison') { + print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; + } print ''; print ''; - if ($action == 'editdate_livraison') - { + if ($action == 'editdate_livraison') { print '
    '; print ''; print ''; @@ -395,8 +397,9 @@ if ($id > 0 || !empty($ref)) print ''; - if ($action != 'editshippingmethod' && $user->rights->expedition->creer) + if ($action != 'editshippingmethod' && $user->rights->expedition->creer) { print ''; + } print '
    '; print $langs->trans('SendingMethod'); print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'
    '; print ''; if ($action == 'editshippingmethod') { @@ -415,8 +418,9 @@ if ($id > 0 || !empty($ref)) print ''; - if ($action != 'editwarehouse' && $user->rights->commande->creer) + if ($action != 'editwarehouse' && $user->rights->commande->creer) { print ''; + } print '
    '; print $langs->trans('Warehouse'); print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).'
    '; print ''; if ($action == 'editwarehouse') { @@ -471,8 +475,9 @@ if ($id > 0 || !empty($ref)) print ''; - if ($action != 'editavailability') + if ($action != 'editavailability') { print ''; + } print '
    '; print $langs->trans('AvailabilityPeriod'); print 'id.'">'.img_edit($langs->trans('SetAvailability'), 1).'
    '; print ''; if ($action == 'editavailability') { @@ -487,8 +492,9 @@ if ($id > 0 || !empty($ref)) print ''; - if ($action != 'editdemandreason') + if ($action != 'editdemandreason') { print ''; + } print '
    '; print $langs->trans('Source'); print 'id.'">'.img_edit($langs->trans('SetDemandReason'), 1).'
    '; print ''; if ($action == 'editdemandreason') { @@ -500,8 +506,7 @@ if ($id > 0 || !empty($ref)) $tmparray = $object->getTotalWeightVolume(); $totalWeight = $tmparray['weight']; $totalVolume = $tmparray['volume']; - if ($totalWeight || $totalVolume) - { + if ($totalWeight || $totalVolume) { print ''.$langs->trans("CalculatedWeight").''; print ''; print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); @@ -515,19 +520,20 @@ if ($id > 0 || !empty($ref)) // TODO How record was recorded OrderMode (llx_c_input_method) // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->commande->creer) print ''.img_edit().''; - else print ' '; + if ($user->rights->commande->creer) { + print ''.img_edit().''; + } else { + print ' '; + } print '
    '; print ''; print ''; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -551,8 +557,7 @@ if ($id > 0 || !empty($ref)) print ''; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) - { + if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; print ''; @@ -579,13 +584,11 @@ if ($id > 0 || !empty($ref)) print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1 print ''; print ''; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { // Localtax2 IRPF print ''; print ''; } @@ -627,8 +630,7 @@ if ($id > 0 || !empty($ref)) //print $sql; dol_syslog("shipment.php", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -637,8 +639,7 @@ if ($id > 0 || !empty($ref)) print ''; print ''; print ''; - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print ''; } else { print ''; @@ -647,32 +648,34 @@ if ($id > 0 || !empty($ref)) $toBeShipped = array(); $toBeShippedTotal = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $parameters = array('i' => $i, 'line' => $objp, 'num' => $num); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Show product and description $type = isset($objp->type) ? $objp->type : $objp->product_type; // Try to enhance type detection using date_start and date_end for free lines where type // was not saved. - if (!empty($objp->date_start)) $type = 1; - if (!empty($objp->date_end)) $type = 1; + if (!empty($objp->date_start)) { + $type = 1; + } + if (!empty($objp->date_end)) { + $type = 1; + } print ''; // Product label - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $prod = new Product($db); @@ -682,16 +685,21 @@ if ($id > 0 || !empty($ref)) $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && !empty($_REQUEST['lang_id'])) $newlang = $_REQUEST['lang_id']; - if (empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && !empty($_REQUEST['lang_id'])) { + $newlang = $_REQUEST['lang_id']; + } + if (empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label; - } else $label = (!empty($objp->label) ? $objp->label : $objp->product_label); + } else { + $label = (!empty($objp->label) ? $objp->label : $objp->product_label); + } print ''; } else { print "'; - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { $product = new Product($db); $product->fetch($objp->fk_product); $product->load_stock('warehouseopen'); } - if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && !empty($conf->stock->enabled)) - { + if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && !empty($conf->stock->enabled)) { print ''; @@ -793,8 +799,7 @@ if ($id > 0 || !empty($ref)) print "\n"; // Show subproducts lines - if ($objp->fk_product > 0 && !empty($conf->global->PRODUIT_SOUSPRODUITS)) - { + if ($objp->fk_product > 0 && !empty($conf->global->PRODUIT_SOUSPRODUITS)) { // Set tree of subproducts in product->sousprods $product->get_sousproduits_arbo(); //var_dump($product->sousprods);exit; @@ -802,19 +807,16 @@ if ($id > 0 || !empty($ref)) // Define a new tree with quantiies recalculated $prods_arbo = $product->get_arbo_each_prod($qtyProdCom); //var_dump($prods_arbo); - if (count($prods_arbo) > 0) - { - foreach ($prods_arbo as $key => $value) - { + if (count($prods_arbo) > 0) { + foreach ($prods_arbo as $key => $value) { $img = ''; - if ($value['stock'] < $value['stock_alert']) - { + if ($value['stock'] < $value['stock_alert']) { $img = img_warning($langs->trans("StockTooLow")); } print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''."\n"; } } @@ -824,8 +826,7 @@ if ($id > 0 || !empty($ref)) } $db->free($resql); - if (!$num) - { + if (!$num) { print ''; - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { //print ''; //print ''; } //print ''; diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index fcc0d26f81c..6bdc495472c 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -34,13 +34,12 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -$nowyear = strftime("%Y", dol_now()); +$nowyear = dol_print_date(dol_now(), "%Y"); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; //$startyear=$year-2; $startyear = $year - 1; @@ -49,6 +48,12 @@ $endyear = $year; // Load translation files required by the page $langs->loadLangs(array('sendings', 'other', 'companies')); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'expedition'); + /* * View @@ -71,8 +76,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/shipmentsnbinyear-'.$user->id.'-'.$year.'.png'; } else { $filenamenb = $dir.'/shipmentsnbinyear-'.$year.'.png'; @@ -80,12 +84,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -111,36 +113,36 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); if (!$user->rights->societe->client->voir || $user->socid) { - $filenameamount = $dir.'/shipmentsamountinyear-'.$user->id.'-'.$year.'.png'; + $filenameamount = $dir.'/shipmentsamountinyear-'.$user->id.'-'.$year.'.png'; } else { - $filenameamount = $dir.'/shipmentsamountinyear-'.$year.'.png'; + $filenameamount = $dir.'/shipmentsamountinyear-'.$year.'.png'; } $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); if (! $mesg) { - $px2->SetData($data); - $i=$startyear;$legend=array(); - while ($i <= $endyear) - { - $legend[]=$i; - $i++; - } - $px2->SetLegend($legend); - $px2->SetMaxValue($px2->GetCeilMaxValue()); - $px2->SetMinValue(min(0,$px2->GetFloorMinValue())); - $px2->SetWidth($WIDTH); - $px2->SetHeight($HEIGHT); - $px2->SetYLabel($langs->trans("AmountOfShipments")); - $px2->SetShading(3); - $px2->SetHorizTickIncrement(1); - $px2->mode='depth'; - $px2->SetTitle($langs->trans("AmountOfShipmentsByMonthHT")); + $px2->SetData($data); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px2->SetLegend($legend); + $px2->SetMaxValue($px2->GetCeilMaxValue()); + $px2->SetMinValue(min(0,$px2->GetFloorMinValue())); + $px2->SetWidth($WIDTH); + $px2->SetHeight($HEIGHT); + $px2->SetYLabel($langs->trans("AmountOfShipments")); + $px2->SetShading(3); + $px2->SetHorizTickIncrement(1); + $px2->mode='depth'; + $px2->SetTitle($langs->trans("AmountOfShipmentsByMonthHT")); - $px2->draw($filenameamount,$fileurlamount); + $px2->draw($filenameamount,$fileurlamount); } */ @@ -149,36 +151,36 @@ $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); if (!$user->rights->societe->client->voir || $user->socid) { - $filename_avg = $dir.'/shipmentsaverage-'.$user->id.'-'.$year.'.png'; + $filename_avg = $dir.'/shipmentsaverage-'.$user->id.'-'.$year.'.png'; } else { - $filename_avg = $dir.'/shipmentsaverage-'.$year.'.png'; + $filename_avg = $dir.'/shipmentsaverage-'.$year.'.png'; } $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); if (! $mesg) { - $px3->SetData($data); - $i=$startyear;$legend=array(); - while ($i <= $endyear) - { - $legend[]=$i; - $i++; - } - $px3->SetLegend($legend); - $px3->SetYLabel($langs->trans("AmountAverage")); - $px3->SetMaxValue($px3->GetCeilMaxValue()); - $px3->SetMinValue($px3->GetFloorMinValue()); - $px3->SetWidth($WIDTH); - $px3->SetHeight($HEIGHT); - $px3->SetShading(3); - $px3->SetHorizTickIncrement(1); - $px3->mode='depth'; - $px3->SetTitle($langs->trans("AmountAverage")); + $px3->SetData($data); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px3->SetLegend($legend); + $px3->SetYLabel($langs->trans("AmountAverage")); + $px3->SetMaxValue($px3->GetCeilMaxValue()); + $px3->SetMinValue($px3->GetFloorMinValue()); + $px3->SetWidth($WIDTH); + $px3->SetHeight($HEIGHT); + $px3->SetShading(3); + $px3->SetHorizTickIncrement(1); + $px3->mode='depth'; + $px3->SetTitle($langs->trans("AmountAverage")); - $px3->draw($filename_avg,$fileurl_avg); + $px3->draw($filename_avg,$fileurl_avg); } */ @@ -191,7 +193,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); @@ -228,8 +232,12 @@ print '
    '; print ''; // Year print '
    '; @@ -250,11 +258,9 @@ print '';*/ print ''; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { // If we have empty year + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; @@ -292,12 +298,14 @@ print '
    '; // Show graphs 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)).'
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($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).'
    '.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("KeepToShip").''.$langs->trans("RealStock").' 
    '; print ''; // ancre pour retourner sur la ligne @@ -725,16 +733,18 @@ if ($id > 0 || !empty($ref)) print_date_range($db->jdate($objp->date_start), $db->jdate($objp->date_end)); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print ($objp->description && $objp->description != $objp->product_label) ? '
    '.dol_htmlentitiesbr($objp->description) : ''; } print '
    "; - if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($objp->label)) { $text .= ' '.$objp->label.''; @@ -761,8 +771,7 @@ if ($id > 0 || !empty($ref)) // Qty remains to ship print ''; - if ($type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $toBeShipped[$objp->fk_product] = $objp->qty - $qtyAlreadyShipped; $toBeShippedTotal += $toBeShipped[$objp->fk_product]; print $toBeShipped[$objp->fk_product]; @@ -771,19 +780,16 @@ if ($id > 0 || !empty($ref)) } print ''; print $product->stock_reel; - if ($product->stock_reel < $toBeShipped[$objp->fk_product]) - { + if ($product->stock_reel < $toBeShipped[$objp->fk_product]) { print ' '.img_warning($langs->trans("StockTooLow")); } print '
          -> '.$value['fullpath'].' ('.$value['nb'].') '.$value['nb_total'].'    '.$value['stock'].' '.$img.'
    '.$langs->trans("NoArticleOfTypeProduct").'
    '; } @@ -841,18 +842,14 @@ if ($id > 0 || !empty($ref)) * Boutons Actions */ - if (empty($user->socid)) - { + if (empty($user->socid)) { print '
    '; // Bouton expedier sans gestion des stocks - if (empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) - { - if ($user->rights->expedition->creer) - { + if (empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { + if ($user->rights->expedition->creer) { print ''.$langs->trans("CreateShipment").''; - if ($toBeShippedTotal <= 0) - { + if ($toBeShippedTotal <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); } } else { @@ -865,15 +862,12 @@ if ($id > 0 || !empty($ref)) // Bouton expedier avec gestion des stocks - if (!empty($conf->stock->enabled) && $object->statut == Commande::STATUS_DRAFT) - { + if (!empty($conf->stock->enabled) && $object->statut == Commande::STATUS_DRAFT) { print $langs->trans("ValidateOrderFirstBeforeShipment"); } - if (!empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) - { - if ($user->rights->expedition->creer) - { + if (!empty($conf->stock->enabled) && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED)) { + if ($user->rights->expedition->creer) { //print load_fiche_titre($langs->trans("CreateShipment")); print '
    '; @@ -890,23 +884,20 @@ if ($id > 0 || !empty($ref)) //print '
    '; print $langs->trans("WarehouseSource"); //print ''; print $formproduct->selectWarehouses(!empty($object->warehouse_id) ? $object->warehouse_id : 'ifone', 'entrepot_id', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200'); - if (count($formproduct->cache_warehouses) <= 0) - { + if (count($formproduct->cache_warehouses) <= 0) { print '   '.$langs->trans("WarehouseSourceNotDefined").' '.$langs->trans("AddOne").''; } //print ''; print ''; - if ($toBeShippedTotal <= 0) - { + if ($toBeShippedTotal <= 0) { print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend")); } //print '
    '.$langs->trans("Year").''; - if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; - if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '
    '.$langs->trans("AmountAverage").'
    '; -if ($mesg) { print $mesg; } else { +if ($mesg) { + print $mesg; +} else { print $px1->show(); print "
    \n"; /*print $px2->show(); - print "
    \n"; - print $px3->show();*/ + print "
    \n"; + print $px3->show();*/ } print '
    '; @@ -324,17 +332,17 @@ $sql.= " GROUP BY dm DESC"; $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $row = $db->fetch_row($resql); - $nbproduct = $row[0]; - $year = $row[1]; - print ""; - print ''.$year.''.$nbproduct.''; - $i++; - } + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($resql); + $nbproduct = $row[0]; + $year = $row[1]; + print ""; + print ''.$year.''.$nbproduct.''; + $i++; + } } $db->free($resql); diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 74455d7dca2..254fd9aad90 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -29,6 +29,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $year = GETPOST('year', 'int'); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'expedition'); + /* * View diff --git a/htdocs/expedition/tpl/index.html b/htdocs/expedition/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 897e35b8813..b00d63eaba1 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.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; } @@ -37,48 +36,49 @@ $langs->load("sendings"); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - - trans("Shipment"); ?> - getNomUrl(1); ?> - - date_delivery, 'day'); ?> - "> + trans("Shipment"); ?> + getNomUrl(1); ?> + + date_delivery, 'day'); ?> + rights->expedition->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?> - getLibStatut(3); ?> - - getLibStatut(3); ?> + + element != 'commande') { ?> - ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> - id.'&action=dellink&dellinkid='.$key; ?>">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> + - - + 1) { ?> - - trans("Total"); ?> - - - - - - - - "> + trans("Total"); ?> + + + + + + + + \n"; diff --git a/htdocs/expensereport/ajax/ajaxik.php b/htdocs/expensereport/ajax/ajaxik.php index 413bc061fbf..c2cc8345671 100644 --- a/htdocs/expensereport/ajax/ajaxik.php +++ b/htdocs/expensereport/ajax/ajaxik.php @@ -17,17 +17,29 @@ */ /** - * \file htdocs/expensereport/ajax/ajaxprojet.php + * \file htdocs/expensereport/ajax/ajaxik.php * \ingroup expensereport * \brief File to return Ajax response on third parties request */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} $res = 0; require '../../main.inc.php'; @@ -37,35 +49,40 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php' // Load translation files required by the page $langs->loadlangs(array('errors', 'trips')); +$fk_expense = GETPOST('fk_expense', 'int'); +$fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat', 'int'); + +// Security check +$result = restrictedArea($user, 'expensereport', $fk_expense, 'expensereport'); + + /* * View */ top_httphead(); - -dol_syslog(join(',', $_POST)); - -$fk_expense = GETPOST('fk_expense'); -$fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat'); - - -if (empty($fk_expense) || $fk_expense < 0) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense'))); -elseif (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat'))); -else { +if (empty($fk_expense) || $fk_expense < 0) { + echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense'))); +} elseif (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) { + echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat'))); +} else { // @see ndfp.class.php:3576 (method: compute_total_km) $expense = new ExpenseReport($db); - if ($expense->fetch($fk_expense) <= 0) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'fk_expense' => $fk_expense)); - else { + if ($expense->fetch($fk_expense) <= 0) { + echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'fk_expense' => $fk_expense)); + } else { $userauthor = new User($db); - if ($userauthor->fetch($expense->fk_user_author) <= 0) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'fk_user_author' => $expense->fk_user_author)); - else { + if ($userauthor->fetch($expense->fk_user_author) <= 0) { + echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'fk_user_author' => $expense->fk_user_author)); + } else { $range = ExpenseReportIk::getRangeByUser($userauthor, $fk_c_exp_tax_cat); - if (empty($range)) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'range' => $range)); - else { + if (empty($range)) { + echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'range' => $range)); + } else { $ikoffset = price($range->ikoffset, 0, $langs, 1, -1, -1, $conf->currency); - echo json_encode(array('up' => $range->coef, 'ikoffset' => $range->ikoffset, 'title' => $langs->transnoentitiesnoconv('ExpenseRangeOffset', $offset), 'comment' => 'offset should be apply on addline or updateline')); + echo json_encode(array('up' => $range->coef, 'ikoffset' => $range->ikoffset, 'title' => $langs->transnoentitiesnoconv('ExpenseRangeOffset', $ikoffset), 'comment' => 'offset should be applied on addline or updateline')); } } } diff --git a/htdocs/expensereport/ajax/index.html b/htdocs/expensereport/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index e1e5fb34f2a..a4c565bc1be 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -67,18 +67,11 @@ $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('socid_id', $childids = $user->getAllChildIds(1); -// Security check -$id = GETPOST("id", 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'expensereport', $id, 'expensereport'); - - // Hack to use expensereport dir $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data -if (!empty($conf->multicompany->enabled) && !empty($conf->entity) && $conf->entity > 1) -{ +if (!empty($conf->multicompany->enabled) && !empty($conf->entity) && $conf->entity > 1) { $rootfordata .= '/'.$conf->entity; } $conf->expensereport->dir_output = $rootfordata.'/expensereport'; @@ -110,22 +103,29 @@ $permissionnote = $user->rights->expensereport->creer; // Used by the include of $permissiondellink = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php $permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php - $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref); - -if ($object->id > 0) -{ +if ($object->id > 0) { // Check current user can read this expense report $canread = 0; - if (!empty($user->rights->expensereport->readall)) $canread = 1; - if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->expensereport->readall)) { + $canread = 1; + } + if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } +// Security check +$id = GETPOST("id", 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'expensereport', $object->id, 'expensereport'); + /* * Actions @@ -133,14 +133,13 @@ if ($object->id > 0) $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 ($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; } @@ -160,10 +159,12 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; - if (GETPOSTISSET('sendit')) // If we just submit a file - { - if ($action == 'updateline') $action = 'editline'; // To avoid to make the updateline now - else $action = ''; // To avoid to make the addline now + if (GETPOSTISSET('sendit')) { // If we just submit a file + if ($action == 'updateline') { + $action = 'editline'; // To avoid to make the updateline now + } else { + $action = ''; // To avoid to make the addline now + } } include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once @@ -173,20 +174,16 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->expensereport->creer) - { - if (1 == 0 && !GETPOST('clone_content', 'alpha') && !GETPOST('clone_receivers', 'alpha')) - { + if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->expensereport->creer) { + if (1 == 0 && !GETPOST('clone_content', 'alpha') && !GETPOST('clone_receivers', 'alpha')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { - if ($object->id > 0) - { + if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later if it fails $orig = clone $object; $result = $object->createFromClone($user, GETPOST('fk_user_author', 'int')); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; } else { @@ -198,13 +195,11 @@ if (empty($reshook)) } } - if ($action == 'confirm_delete' && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->supprimer) - { + if ($action == 'confirm_delete' && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->supprimer) { $object = new ExpenseReport($db); $result = $object->fetch($id); $result = $object->delete($user); - if ($result >= 0) - { + if ($result >= 0) { header("Location: index.php"); exit; } else { @@ -212,8 +207,7 @@ if (empty($reshook)) } } - if ($action == 'add' && $user->rights->expensereport->creer) - { + if ($action == 'add' && $user->rights->expensereport->creer) { $error = 0; $object = new ExpenseReport($db); @@ -222,7 +216,9 @@ if (empty($reshook)) $object->date_fin = $date_end; $object->fk_user_author = GETPOST('fk_user_author', 'int'); - if (!($object->fk_user_author > 0)) $object->fk_user_author = $user->id; + if (!($object->fk_user_author > 0)) { + $object->fk_user_author = $user->id; + } // Check that expense report 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)) @@ -248,31 +244,28 @@ if (empty($reshook)) $object->note_public = GETPOST('note_public', 'restricthtml'); $object->note_private = GETPOST('note_private', 'restricthtml'); // Fill array 'array_options' with data from add form - if (!$error) - { + if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } - if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS) && $object->periode_existe($fuser, $object->date_debut, $object->date_fin)) - { + if (!$error && empty($conf->global->EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS) && $object->periode_existe($fuser, $object->date_debut, $object->date_fin)) { $error++; setEventMessages($langs->trans("ErrorDoubleDeclaration"), null, 'errors'); $action = 'create'; } - if (!$error) - { + if (!$error) { $db->begin(); $id = $object->create($user); - if ($id <= 0) - { + if ($id <= 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; @@ -284,16 +277,14 @@ if (empty($reshook)) } } - if ($action == 'update' && $user->rights->expensereport->creer) - { + if ($action == 'update' && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); $object->date_debut = $date_start; $object->date_fin = $date_end; - if ($object->status < 3) - { + if ($object->status < 3) { $object->fk_user_validator = GETPOST('fk_user_validator', 'int'); } @@ -303,8 +294,7 @@ if (empty($reshook)) $object->fk_user_modif = $user->id; $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int')); exit; } else { @@ -312,31 +302,30 @@ if (empty($reshook)) } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields - $result = $object->insertExtraFields('EXPENSEREPORT_MODIFY'); - if ($result < 0) - { + $result = $object->insertExtraFields('EXPENSEREPORT_MODIFY'); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } - if ($action == "confirm_validate" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) - { + if ($action == "confirm_validate" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) { $error = 0; $db->begin(); @@ -346,15 +335,17 @@ if (empty($reshook)) $result = $object->setValidate($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -369,8 +360,7 @@ if (empty($reshook)) $error++; } - if (!$error && $result > 0 && $object->fk_user_validator > 0) - { + if (!$error && $result > 0 && $object->fk_user_validator > 0) { $langs->load("mails"); // TO @@ -383,13 +373,14 @@ if (empty($reshook)) $expediteur->fetch($object->fk_user_author); $emailFrom = $expediteur->email; - if ($emailTo && $emailFrom) - { + if ($emailTo && $emailFrom) { $filename = array(); $filedir = array(); $mimetype = array(); // 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->transnoentities("ExpenseReportWaitingForApproval"); @@ -400,31 +391,28 @@ if (empty($reshook)) // Rebuild pdf /* - $object->setDocModel($user,""); - $resultPDF = expensereport_pdf_create($db,$id,'',"",$langs); + $object->setDocModel($user,""); + $resultPDF = expensereport_pdf_create($db,$id,'',"",$langs); - if($resultPDF): - // ATTACHMENT - array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); - array_push($filedir,$conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref) . "/" . dol_sanitizeFileName($object->ref).".pdf"); - array_push($mimetype,"application/pdf"); - */ + if($resultPDF): + // ATTACHMENT + array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); + array_push($filedir,$conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref) . "/" . dol_sanitizeFileName($object->ref).".pdf"); + array_push($mimetype,"application/pdf"); + */ // PREPARE SEND $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { + if ($mailfile) { // SEND $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); setEventMessages($mesg, null, 'mesgs'); } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $mesg = ''; $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); $mesg .= '
    '.$mailfile->error; @@ -443,8 +431,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; @@ -453,21 +440,22 @@ if (empty($reshook)) } } - if ($action == "confirm_save_from_refuse" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) - { + if ($action == "confirm_save_from_refuse" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); $result = $object->set_save_from_refuse($user); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -479,27 +467,27 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail - // TO - $destinataire = new User($db); - $destinataire->fetch($object->fk_user_validator); - $emailTo = $destinataire->email; + // TO + $destinataire = new User($db); + $destinataire->fetch($object->fk_user_validator); + $emailTo = $destinataire->email; // FROM $expediteur = new User($db); $expediteur->fetch($object->fk_user_author); $emailFrom = $expediteur->email; - if ($emailFrom && $emailTo) - { + if ($emailFrom && $emailTo) { $filename = array(); $filedir = array(); $mimetype = array(); - // 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->transnoentities("ExpenseReportWaitingForReApproval"); @@ -509,18 +497,18 @@ if (empty($reshook)) $dateRefusEx = explode(" ", $object->date_refuse); $message = $langs->transnoentities("ExpenseReportWaitingForReApprovalMessage", $dateRefusEx[0], $object->detail_refuse, $expediteur->getFullName($langs), $link); - // Rebuild pdf + // Rebuild pdf /* $object->setDocModel($user,""); $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); - if($resultPDF) - { - // ATTACHMENT - $filename=array(); $filedir=array(); $mimetype=array(); - array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); - array_push($filedir,$conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref) . "/" . dol_sanitizeFileName($object->ref_number).".pdf"); - array_push($mimetype,"application/pdf"); + if($resultPDF) + { + // ATTACHMENT + $filename=array(); $filedir=array(); $mimetype=array(); + array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); + array_push($filedir,$conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref) . "/" . dol_sanitizeFileName($object->ref_number).".pdf"); + array_push($mimetype,"application/pdf"); } */ @@ -528,20 +516,17 @@ if (empty($reshook)) // PREPARE SEND $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { + if ($mailfile) { // SEND $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); setEventMessages($mesg, null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $mesg = ''; $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); $mesg .= '
    '.$mailfile->error; @@ -564,22 +549,23 @@ if (empty($reshook)) } // Approve - if ($action == "confirm_approve" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->approve) - { + if ($action == "confirm_approve" && GETPOST("confirm", 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->approve) { $object = new ExpenseReport($db); $object->fetch($id); $result = $object->setApproved($user); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -591,109 +577,109 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail - // TO - $destinataire = new User($db); - $destinataire->fetch($object->fk_user_author); - $emailTo = $destinataire->email; + // TO + $destinataire = new User($db); + $destinataire->fetch($object->fk_user_author); + $emailTo = $destinataire->email; - // CC - $emailCC = $conf->global->NDF_CC_EMAILS; - if (empty($emailTo)) $emailTo = $emailCC; + // CC + $emailCC = $conf->global->NDF_CC_EMAILS; + if (empty($emailTo)) { + $emailTo = $emailCC; + } // FROM - $expediteur = new User($db); - $expediteur->fetch($object->fk_user_approve > 0 ? $object->fk_user_approve : $object->fk_user_validator); - $emailFrom = $expediteur->email; + $expediteur = new User($db); + $expediteur->fetch($object->fk_user_approve > 0 ? $object->fk_user_approve : $object->fk_user_validator); + $emailFrom = $expediteur->email; - if ($emailFrom && $emailTo) - { + if ($emailFrom && $emailTo) { $filename = array(); $filedir = array(); $mimetype = array(); - // 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->transnoentities("ExpenseReportApproved"); - // CONTENT - $link = $urlwithroot.'/expensereport/card.php?id='.$object->id; + // CONTENT + $link = $urlwithroot.'/expensereport/card.php?id='.$object->id; $link = ''.$link.''; - $message = $langs->transnoentities("ExpenseReportApprovedMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $link); + $message = $langs->transnoentities("ExpenseReportApprovedMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $link); - // Rebuilt pdf + // Rebuilt pdf /* - $object->setDocModel($user,""); - $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); + $object->setDocModel($user,""); + $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); - if($resultPDF - { - // ATTACHMENT - $filename=array(); $filedir=array(); $mimetype=array(); - array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); - array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); - array_push($mimetype,"application/pdf"); - } - */ + if($resultPDF + { + // ATTACHMENT + $filename=array(); $filedir=array(); $mimetype=array(); + array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); + array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); + array_push($mimetype,"application/pdf"); + } + */ $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { - // SEND - $result = $mailfile->sendfile(); - if ($result) - { - $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); - setEventMessages($mesg, null, 'mesgs'); - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } else { - $langs->load("other"); - if ($mailfile->error) - { - $mesg = ''; - $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); - $mesg .= '
    '.$mailfile->error; - setEventMessages($mesg, null, 'errors'); - } else { - setEventMessages('No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS', null, 'warnings'); - } - } - } else { - setEventMessages($mailfile->error, $mailfile->errors, 'errors'); - $action = ''; - } - } else { + if ($mailfile) { + // SEND + $result = $mailfile->sendfile(); + if ($result) { + $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); + setEventMessages($mesg, null, 'mesgs'); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + $langs->load("other"); + if ($mailfile->error) { + $mesg = ''; + $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); + $mesg .= '
    '.$mailfile->error; + setEventMessages($mesg, null, 'errors'); + } else { + setEventMessages('No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS', null, 'warnings'); + } + } + } else { + setEventMessages($mailfile->error, $mailfile->errors, 'errors'); + $action = ''; + } + } else { setEventMessages($langs->trans("NoEmailSentBadSenderOrRecipientEmail"), null, 'warnings'); $action = ''; } } else { - setEventMessages($langs->trans("FailedtoSetToApprove"), null, 'warnings'); - $action = ''; - } - } + setEventMessages($langs->trans("FailedtoSetToApprove"), null, 'warnings'); + $action = ''; + } + } - if ($action == "confirm_refuse" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->approve) - { + if ($action == "confirm_refuse" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->approve) { $object = new ExpenseReport($db); $object->fetch($id); $detailRefuse = GETPOST('detail_refuse', 'alpha'); $result = $object->setDeny($user, $detailRefuse); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -705,8 +691,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -719,53 +704,51 @@ if (empty($reshook)) $expediteur->fetch($object->fk_user_refuse); $emailFrom = $expediteur->email; - if ($emailFrom && $emailTo) - { + if ($emailFrom && $emailTo) { $filename = array(); $filedir = array(); $mimetype = array(); // 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->transnoentities("ExpenseReportRefused"); - // CONTENT - $link = $urlwithroot.'/expensereport/card.php?id='.$object->id; + // CONTENT + $link = $urlwithroot.'/expensereport/card.php?id='.$object->id; $link = ''.$link.''; $message = $langs->transnoentities("ExpenseReportRefusedMessage", $object->ref, $destinataire->getFullName($langs), $expediteur->getFullName($langs), $detailRefuse, $link); - // Rebuilt pdf + // Rebuilt pdf /* - $object->setDocModel($user,""); - $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); + $object->setDocModel($user,""); + $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); - if($resultPDF - { - // ATTACHMENT - $filename=array(); $filedir=array(); $mimetype=array(); - array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); - array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); - array_push($mimetype,"application/pdf"); - } - */ + if($resultPDF + { + // ATTACHMENT + $filename=array(); $filedir=array(); $mimetype=array(); + array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); + array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); + array_push($mimetype,"application/pdf"); + } + */ // PREPARE SEND $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { + if ($mailfile) { // SEND $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); setEventMessages($mesg, null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $mesg = ''; $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); $mesg .= '
    '.$mailfile->error; @@ -789,29 +772,28 @@ if (empty($reshook)) } //var_dump($user->id == $object->fk_user_validator);exit; - if ($action == "confirm_cancel" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) - { - if (!GETPOST('detail_cancel', 'alpha')) - { + if ($action == "confirm_cancel" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) { + if (!GETPOST('detail_cancel', 'alpha')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors'); } else { $object = new ExpenseReport($db); $object->fetch($id); - if ($user->id == $object->fk_user_valid || $user->id == $object->fk_user_author) - { + if ($user->id == $object->fk_user_valid || $user->id == $object->fk_user_author) { $detailCancel = GETPOST('detail_cancel', 'alpha'); $result = $object->set_cancel($user, $detailCancel); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -823,8 +805,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -837,13 +818,14 @@ if (empty($reshook)) $expediteur->fetch($object->fk_user_cancel); $emailFrom = $expediteur->email; - if ($emailFrom && $emailTo) - { + if ($emailFrom && $emailTo) { $filename = array(); $filedir = array(); $mimetype = array(); // 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->transnoentities("ExpenseReportCanceled"); @@ -854,36 +836,33 @@ if (empty($reshook)) // Rebuilt pdf /* - $object->setDocModel($user,""); - $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); + $object->setDocModel($user,""); + $resultPDF = expensereport_pdf_create($db,$object,'',"",$langs); - if($resultPDF - { - // ATTACHMENT - $filename=array(); $filedir=array(); $mimetype=array(); - array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); - array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); - array_push($mimetype,"application/pdf"); - } - */ + if($resultPDF + { + // ATTACHMENT + $filename=array(); $filedir=array(); $mimetype=array(); + array_push($filename,dol_sanitizeFileName($object->ref).".pdf"); + array_push($filedir, $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref)."/".dol_sanitizeFileName($object->ref).".pdf"); + array_push($mimetype,"application/pdf"); + } + */ // PREPARE SEND $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { + if ($mailfile) { // SEND $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); setEventMessages($mesg, null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $mesg = ''; $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); $mesg .= '
    '.$mailfile->error; @@ -910,23 +889,23 @@ if (empty($reshook)) } } - if ($action == "confirm_setdraft" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) - { + if ($action == "confirm_setdraft" && GETPOST('confirm', 'alpha') == "yes" && $id > 0 && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); - if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) - { + if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { $result = $object->setStatut(0); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -938,8 +917,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -950,22 +928,23 @@ if (empty($reshook)) } } - if ($action == 'set_unpaid' && $id > 0 && $user->rights->expensereport->to_paid) - { + if ($action == 'set_unpaid' && $id > 0 && $user->rights->expensereport->to_paid) { $object = new ExpenseReport($db); $object->fetch($id); - $result = $object->set_unpaid($user); + $result = $object->setUnpaid($user); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -978,22 +957,23 @@ if (empty($reshook)) } } - if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) - { + if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) { $object = new ExpenseReport($db); $object->fetch($id); - $result = $object->set_paid($id, $user); + $result = $object->setPaid($id, $user); - if ($result > 0) - { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1005,8 +985,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -1019,13 +998,14 @@ if (empty($reshook)) $expediteur->fetch($user->id); $emailFrom = $expediteur->email; - if ($emailFrom && $emailTo) - { + if ($emailFrom && $emailTo) { $filename = array(); $filedir = array(); $mimetype = array(); // 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->transnoentities("ExpenseReportPaid"); @@ -1041,20 +1021,17 @@ if (empty($reshook)) // PREPARE SEND $mailfile = new CMailFile($subject, $emailTo, $emailFrom, $message, $filedir, $mimetype, $filename, '', '', 0, -1); - if ($mailfile) - { + if ($mailfile) { // SEND $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($emailFrom, 2), $mailfile->getValidAddress($emailTo, 2)); setEventMessages($mesg, null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { $langs->load("other"); - if ($mailfile->error) - { + if ($mailfile->error) { $mesg = ''; $mesg .= $langs->trans('ErrorFailedToSendMail', $emailFrom, $emailTo); $mesg .= '
    '.$mailfile->error; @@ -1077,17 +1054,14 @@ if (empty($reshook)) } } - if ($action == "addline" && $user->rights->expensereport->creer) - { + if ($action == "addline" && $user->rights->expensereport->creer) { $error = 0; // First save uploaded file $fk_ecm_files = 0; - if (GETPOSTISSET('attachfile')) - { + if (GETPOSTISSET('attachfile')) { $arrayoffiles = GETPOST('attachfile', 'array'); - if (is_array($arrayoffiles) && !empty($arrayoffiles[0])) - { + if (is_array($arrayoffiles) && !empty($arrayoffiles[0])) { include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $relativepath = 'expensereport/'.$object->ref.'/'.$arrayoffiles[0]; $ecmfiles = new EcmFiles($db); @@ -1097,70 +1071,67 @@ if (empty($reshook)) } // if VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary. - if (empty($vatrate)) $vatrate = "0.000"; + if (empty($vatrate)) { + $vatrate = "0.000"; + } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $vatrate)); $value_unit_ht = price2num(GETPOST('value_unit_ht', 'alpha'), 'MU'); $value_unit = price2num(GETPOST('value_unit', 'alpha'), 'MU'); - if (empty($value_unit)) - { + if (empty($value_unit)) { $value_unit = price2num($value_unit_ht + ($value_unit_ht * $tmpvat / 100), 'MU'); } $fk_c_exp_tax_cat = GETPOST('fk_c_exp_tax_cat', 'int'); $qty = GETPOST('qty', 'int'); - if (empty($qty)) $qty = 1; + if (empty($qty)) { + $qty = 1; + } - if (!($fk_c_type_fees > 0)) - { + if (!($fk_c_type_fees > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $action = ''; } - if ((int) $tmpvat < 0 || $tmpvat == '') - { + if ((int) $tmpvat < 0 || $tmpvat == '') { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("VAT")), null, 'errors'); $action = ''; } // Si aucune date n'est rentrée - if (empty($date) || $date == "--") - { + if (empty($date) || $date == "--") { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } // Si aucun prix n'est rentré - if ($value_unit == 0) - { + if ($value_unit == 0) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PriceUTTC")), null, 'errors'); } // Warning if date out of range - if ($date < $object->date_debut || $date > ($object->date_fin + (24 * 3600 - 1))) - { + if ($date < $object->date_debut || $date > ($object->date_fin + (24 * 3600 - 1))) { $langs->load("errors"); setEventMessages($langs->trans("WarningDateOfLineMustBeInExpenseReportRange"), null, 'warnings'); } - if (!$error) - { + if (!$error) { $type = 0; // TODO What if service ? We should take the type product/service from the type of expense report llx_c_type_fees // Insert line $result = $object->addline($qty, $value_unit, $fk_c_type_fees, $vatrate, $date, $comments, $fk_project, $fk_c_exp_tax_cat, $type, $fk_ecm_files); - if ($result > 0) - { + if ($result > 0) { $ret = $object->fetch($object->id); // Reload to get new records if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; $newlang = GETPOST('lang_id', 'alpha'); - if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) + if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -1186,8 +1157,7 @@ if (empty($reshook)) $action = ''; } - if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) - { + if ($action == 'confirm_delete_line' && GETPOST("confirm", 'alpha') == "yes" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); @@ -1197,17 +1167,18 @@ if (empty($reshook)) $total_tva = $object_ligne->total_tva; $result = $object->deleteline(GETPOST("rowid", 'int'), $user); - if ($result >= 0) - { - if ($result > 0) - { + if ($result >= 0) { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1220,25 +1191,22 @@ if (empty($reshook)) } $object->update_totaux_del($object_ligne->total_ht, $object_ligne->total_tva); - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_GET['id']); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".GETPOST('id', 'int')); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == "updateline" && $user->rights->expensereport->creer) - { + if ($action == "updateline" && $user->rights->expensereport->creer) { $object = new ExpenseReport($db); $object->fetch($id); // First save uploaded file $fk_ecm_files = 0; - if (GETPOSTISSET('attachfile')) - { + if (GETPOSTISSET('attachfile')) { $arrayoffiles = GETPOST('attachfile', 'array'); - if (is_array($arrayoffiles) && !empty($arrayoffiles[0])) - { + if (is_array($arrayoffiles) && !empty($arrayoffiles[0])) { include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $relativepath = 'expensereport/'.$object->ref.'/'.$arrayoffiles[0]; $ecmfiles = new EcmFiles($db); @@ -1256,50 +1224,48 @@ if (empty($reshook)) $vatrate = GETPOST('vatrate', 'alpha'); // if VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary. - if (empty($vatrate)) $vatrate = "0.000"; + if (empty($vatrate)) { + $vatrate = "0.000"; + } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $vatrate)); $value_unit_ht = price2num(GETPOST('value_unit_ht', 'alpha'), 'MU'); $value_unit = price2num(GETPOST('value_unit', 'alpha'), 'MU'); - if (empty($value_unit)) - { + if (empty($value_unit)) { $value_unit = price2num($value_unit_ht + ($value_unit_ht * $tmpvat / 100), 'MU'); } - if (!GETPOST('fk_c_type_fees', 'int') > 0) - { + if (!GETPOST('fk_c_type_fees', 'int') > 0) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $action = ''; } - if ((int) $tmpvat < 0 || $tmpvat == '') - { + if ((int) $tmpvat < 0 || $tmpvat == '') { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Vat")), null, 'errors'); $action = ''; } // Warning if date out of range - if ($date < $object->date_debut || $date > ($object->date_fin + (24 * 3600 - 1))) - { + if ($date < $object->date_debut || $date > ($object->date_fin + (24 * 3600 - 1))) { $langs->load("errors"); setEventMessages($langs->trans("WarningDateOfLineMustBeInExpenseReportRange"), null, 'warnings'); } - if (!$error) - { + if (!$error) { // TODO Use update method of ExpenseReportLine $result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id, $fk_c_exp_tax_cat, $fk_ecm_files); - if ($result >= 0) - { - if ($result > 0) - { + if ($result >= 0) { + if ($result > 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1342,9 +1308,9 @@ if (empty($reshook)) */ $title = $langs->trans("ExpenseReport")." - ".$langs->trans("Card"); -$helpurl = "EN:Module_Expense_Reports"; +$help_url = "EN:Module_Expense_Reports|FR:Module_Notes_de_frais"; -llxHeader("", $title, $helpurl); +llxHeader("", $title, $help_url); $form = new Form($db); $formfile = new FormFile($db); @@ -1356,8 +1322,7 @@ $ecmfilesstatic = new EcmFiles($db); $formexpensereport = new FormExpenseReport($db); // Create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewTrip"), '', 'trip'); print ''; @@ -1390,9 +1355,13 @@ if ($action == 'create') print ''.$langs->trans("User").''; print ''; $defaultselectuser = $user->id; - if (GETPOST('fk_user_author', 'int') > 0) $defaultselectuser = GETPOST('fk_user_author', 'int'); + if (GETPOST('fk_user_author', 'int') > 0) { + $defaultselectuser = GETPOST('fk_user_author', 'int'); + } $include_users = 'hierarchyme'; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expensereport->writeall_advance)) $include_users = array(); + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expensereport->writeall_advance)) { + $include_users = array(); + } $s = $form->select_dolusers($defaultselectuser, "fk_user_author", 0, "", 0, $include_users, '', '0,'.$conf->entity); print $s; print ''; @@ -1404,11 +1373,16 @@ if ($action == 'create') print ''; $object = new ExpenseReport($db); $include_users = $object->fetch_users_approver_expensereport(); - if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateExpenseReport"); - else { + if (empty($include_users)) { + print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateExpenseReport"); + } else { $defaultselectuser = (empty($user->fk_user_expense_validator) ? $user->fk_user : $user->fk_user_expense_validator); // Will work only if supervisor has permission to approve so is inside include_users - if (!empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR)) $defaultselectuser = $conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR; // Can force default approver - if (GETPOST('fk_user_validator', 'int') > 0) $defaultselectuser = GETPOST('fk_user_validator', 'int'); + if (!empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR)) { + $defaultselectuser = $conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR; // Can force default approver + } + if (GETPOST('fk_user_validator', 'int') > 0) { + $defaultselectuser = GETPOST('fk_user_validator', 'int'); + } $s = $form->select_dolusers($defaultselectuser, "fk_user_validator", 1, "", ((empty($defaultselectuser) || empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE)) ? 0 : 1), $include_users); print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); } @@ -1416,8 +1390,7 @@ if ($action == 'create') print ''; // Payment mode - if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) - { + if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) { print ''; print ''.$langs->trans("ModePaiement").''; print ''; @@ -1431,7 +1404,7 @@ if ($action == 'create') print ''.$langs->trans('NotePublic').''; print ''; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ''; @@ -1441,7 +1414,7 @@ if ($action == 'create') print ''.$langs->trans('NotePrivate').''; print ''; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ''; } @@ -1471,13 +1444,10 @@ if ($action == 'create') $res = $object->fetch_optionals(); - if ($result > 0) - { - if (!in_array($object->fk_user_author, $user->getAllChildIds(1))) - { + if ($result > 0) { + if (!in_array($object->fk_user_author, $user->getAllChildIds(1))) { if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous) - && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) - { + && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) { print load_fiche_titre($langs->trans('TripCard'), '', 'trip'); print '
    '; @@ -1494,16 +1464,14 @@ if ($action == 'create') $head = expensereport_prepare_head($object); - if ($action == 'edit' && ($object->status < 3 || $object->status == 99)) - { + if ($action == 'edit' && ($object->status < 3 || $object->status == 99)) { print "\n"; print ''; print ''; print dol_get_fiche_head($head, 'card', $langs->trans("ExpenseReport"), 0, 'trip'); - if ($object->status == 99) - { + if ($object->status == 99) { print ''; } else { print ''; @@ -1517,8 +1485,7 @@ if ($action == 'create') print ''.$langs->trans("User").''; print ''; $userfee = new User($db); - if ($object->fk_user_author > 0) - { + if ($object->fk_user_author > 0) { $userfee->fetch($object->fk_user_author); print $userfee->getNomUrl(-1); } @@ -1542,8 +1509,7 @@ if ($action == 'create') print ''; print ''; - if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) - { + if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) { print ''; print ''.$langs->trans("ModePaiement").''; print ''; @@ -1552,8 +1518,7 @@ if ($action == 'create') print ''; } - if ($object->status < 3) - { + if ($object->status < 3) { print ''; print ''.$langs->trans("VALIDATOR").''; // Approbator print ''; @@ -1572,8 +1537,7 @@ if ($action == 'create') print ''; } - if ($object->status == 6) - { + if ($object->status == 6) { print ''; print ''.$langs->trans("AUTHORPAIEMENT").''; print ''; @@ -1604,7 +1568,9 @@ if ($action == 'create') if ($action == 'clone') { // Create an array for form $criteriaforfilter = 'hierarchyme'; - if (!empty($user->rights->expensereport->readall)) $criteriaforfilter = ''; + if (!empty($user->rights->expensereport->readall)) { + $criteriaforfilter = ''; + } $formquestion = array( 'text' => '', array('type' => 'other', 'name' => 'fk_user_author', 'label' => $langs->trans("SelectTargetUser"), 'value' => $form->select_dolusers((GETPOST('fk_user_author', 'int') > 0 ? GETPOST('fk_user_author', 'int') : $user->id), 'fk_user_author', 0, null, 0, $criteriaforfilter, '', '0', 0, 0, '', 0, '', 'maxwidth150')) @@ -1613,50 +1579,41 @@ if ($action == 'create') $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneExpenseReport', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if ($action == 'save') - { + if ($action == 'save') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("SaveTrip"), $langs->trans("ConfirmSaveTrip"), "confirm_validate", "", "", 1); } - if ($action == 'save_from_refuse') - { + if ($action == 'save_from_refuse') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("SaveTrip"), $langs->trans("ConfirmSaveTrip"), "confirm_save_from_refuse", "", "", 1); } - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete", "", "", 1); } - if ($action == 'validate') - { + if ($action == 'validate') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("ValideTrip"), $langs->trans("ConfirmValideTrip"), "confirm_approve", "", "", 1); } - if ($action == 'paid') - { + if ($action == 'paid') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("PaidTrip"), $langs->trans("ConfirmPaidTrip"), "confirm_paid", "", "", 1); } - if ($action == 'cancel') - { + if ($action == 'cancel') { $array_input = array('text'=>$langs->trans("ConfirmCancelTrip"), array('type'=>"text", 'label'=>''.$langs->trans("Comment").'', 'name'=>"detail_cancel", 'value'=>"")); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("Cancel"), "", "confirm_cancel", $array_input, "", 1); } - if ($action == 'setdraft') - { + if ($action == 'setdraft') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("BrouillonnerTrip"), $langs->trans("ConfirmBrouillonnerTrip"), "confirm_setdraft", "", "", 1); } - if ($action == 'refuse') // Deny - { + if ($action == 'refuse') { // Deny $array_input = array('text'=>$langs->trans("ConfirmRefuseTrip"), array('type'=>"text", 'label'=>$langs->trans("Comment"), 'name'=>"detail_refuse", 'value'=>"")); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("Deny"), '', "confirm_refuse", $array_input, "yes", 1); } - if ($action == 'delete_line') - { + if ($action == 'delete_line') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOST('rowid', 'int'), $langs->trans("DeleteLine"), $langs->trans("ConfirmDeleteLine"), "confirm_delete_line", '', 'yes', 1); } @@ -1676,34 +1633,34 @@ if ($action == 'create') // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($user->rights->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($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->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($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 .= '
    '; @@ -1719,12 +1676,14 @@ if ($action == 'create') print ''; print ''.$langs->trans("User").''; print ''; - if ($object->fk_user_author > 0) - { + if ($object->fk_user_author > 0) { $userauthor = new User($db); $result = $userauthor->fetch($object->fk_user_author); - if ($result < 0) dol_print_error('', $userauthor->error); - elseif ($result > 0) print $userauthor->getNomUrl(-1); + if ($result < 0) { + dol_print_error('', $userauthor->error); + } elseif ($result > 0) { + print $userauthor->getNomUrl(-1); + } } print ''; @@ -1735,8 +1694,7 @@ if ($action == 'create') print get_date_range($object->date_debut, $object->date_fin, 'day', $langs, 0); print ''; print ''; - if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) - { + if (!empty($conf->global->EXPENSEREPORT_ASK_PAYMENTMODE_ON_CREATION)) { print ''; print ''.$langs->trans("ModePaiement").''; print ''.$object->fk_c_paiement.''; @@ -1747,39 +1705,42 @@ if ($action == 'create') print ''; print ''.$langs->trans("DATE_SAVE").''; print ''.dol_print_date($object->date_valid, 'dayhour', 'tzuser'); - if ($object->status == 2 && $object->hasDelay('toapprove')) print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToApprove")); - if ($object->status == 5 && $object->hasDelay('topay')) print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToPay")); + if ($object->status == 2 && $object->hasDelay('toapprove')) { + print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToApprove")); + } + if ($object->status == 5 && $object->hasDelay('topay')) { + print ' '.img_warning($langs->trans("Late").' - '.$langs->trans("ToPay")); + } print ''; print ''; // User to inform for approval - if ($object->status <= ExpenseReport::STATUS_VALIDATED) // informed - { + if ($object->status <= ExpenseReport::STATUS_VALIDATED) { // informed print ''; print ''.$langs->trans("VALIDATOR").''; // approver print ''; - if ($object->fk_user_validator > 0) - { + if ($object->fk_user_validator > 0) { $userfee = new User($db); $result = $userfee->fetch($object->fk_user_validator); - if ($result > 0) print $userfee->getNomUrl(-1); - if (empty($userfee->email) || !isValidEmail($userfee->email)) - { + if ($result > 0) { + print $userfee->getNomUrl(-1); + } + if (empty($userfee->email) || !isValidEmail($userfee->email)) { $langs->load("errors"); print img_warning($langs->trans("ErrorBadEMail", $userfee->email)); } } print ''; - } elseif ($object->status == ExpenseReport::STATUS_CANCELED) - { + } elseif ($object->status == ExpenseReport::STATUS_CANCELED) { print ''; print ''.$langs->trans("CANCEL_USER").''; print ''; - if ($object->fk_user_cancel > 0) - { + if ($object->fk_user_cancel > 0) { $userfee = new User($db); $result = $userfee->fetch($object->fk_user_cancel); - if ($result > 0) print $userfee->getNomUrl(-1); + if ($result > 0) { + print $userfee->getNomUrl(-1); + } } print ''; @@ -1795,11 +1756,12 @@ if ($action == 'create') print ''; print ''.$langs->trans("ApprovedBy").''; print ''; - if ($object->fk_user_approve > 0) - { + if ($object->fk_user_approve > 0) { $userapp = new User($db); $result = $userapp->fetch($object->fk_user_approve); - if ($result > 0) print $userapp->getNomUrl(-1); + if ($result > 0) { + print $userapp->getNomUrl(-1); + } } print ''; @@ -1809,26 +1771,28 @@ if ($action == 'create') print ''; } - if ($object->status == 99 || !empty($object->detail_refuse)) - { + if ($object->status == 99 || !empty($object->detail_refuse)) { print ''; print ''.$langs->trans("REFUSEUR").''; print ''; $userfee = new User($db); $result = $userfee->fetch($object->fk_user_refuse); - if ($result > 0) print $userfee->getNomUrl(-1); + if ($result > 0) { + print $userfee->getNomUrl(-1); + } print ''; print ''; print ''.$langs->trans("DATE_REFUS").''; print ''.dol_print_date($object->date_refuse, 'dayhour', 'tzuser'); - if ($object->detail_refuse) print ' - '.$object->detail_refuse; + if ($object->detail_refuse) { + print ' - '.$object->detail_refuse; + } print ''; print ''; } - if ($object->status == $object::STATUS_CLOSED) - { + if ($object->status == $object::STATUS_CLOSED) { /* TODO this fields are not yet filled print ''; print ''.$langs->trans("AUTHORPAIEMENT").''; @@ -1862,11 +1826,19 @@ if ($action == 'create') print ''.$langs->trans("AmountHT").''; print ''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).''; $rowspan = 5; - if ($object->status <= ExpenseReport::STATUS_VALIDATED) $rowspan++; - elseif ($object->status == ExpenseReport::STATUS_CANCELED) $rowspan += 2; - else $rowspan += 2; - if ($object->status == ExpenseReport::STATUS_REFUSED || !empty($object->detail_refuse)) $rowspan += 2; - if ($object->status == ExpenseReport::STATUS_CLOSED) $rowspan += 2; + if ($object->status <= ExpenseReport::STATUS_VALIDATED) { + $rowspan++; + } elseif ($object->status == ExpenseReport::STATUS_CANCELED) { + $rowspan += 2; + } else { + $rowspan += 2; + } + if ($object->status == ExpenseReport::STATUS_REFUSED || !empty($object->detail_refuse)) { + $rowspan += 2; + } + if ($object->status == ExpenseReport::STATUS_CLOSED) { + $rowspan += 2; + } print ""; print ''; @@ -1914,12 +1886,10 @@ if ($action == 'create') $sql .= " ORDER BY dp"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $totalpaid = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $paymentexpensereportstatic->id = $objp->rowid; @@ -1935,8 +1905,7 @@ if ($action == 'create') print ''.dol_print_date($db->jdate($objp->dp), 'day')."\n"; $labeltype = $langs->trans("PaymentType".$objp->p_code) != ("PaymentType".$objp->p_code) ? $langs->trans("PaymentType".$objp->p_code) : $objp->payment_type; print "".$labeltype.' '.$objp->num_payment."\n"; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref; @@ -1951,8 +1920,9 @@ if ($action == 'create') } print ''; - if ($bankaccountstatic->id) + if ($bankaccountstatic->id) { print $bankaccountstatic->getNomUrl(1, 'transactions'); + } print ''; } print ''.price($objp->amount).""; @@ -1961,8 +1931,7 @@ if ($action == 'create') $totalpaid += $objp->amount; $i++; } - if (!is_null($totalpaid)) - { + if (!is_null($totalpaid)) { $totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop } @@ -1971,12 +1940,10 @@ if ($action == 'create') $cssforamountpaymentcomplete = 'amountpaymentcomplete'; - if ($object->status == ExpenseReport::STATUS_REFUSED) - { + if ($object->status == ExpenseReport::STATUS_REFUSED) { $cssforamountpaymentcomplete = 'amountpaymentneutral'; $resteapayeraffiche = 0; - } elseif ($object->paid == 0) - { + } elseif ($object->paid == 0) { $cssforamountpaymentcomplete = 'amountpaymentneutral'; } print ''.$langs->trans("AlreadyPaid").':'.price($totalpaid).''; @@ -2000,7 +1967,9 @@ if ($action == 'create') print '
    '; $actiontouse = 'updateline'; - if (($object->status == 0 || $object->status == 99) && $action != 'editline') $actiontouse = 'addline'; + if (($object->status == 0 || $object->status == 99) && $action != 'editline') { + $actiontouse = 'addline'; + } print '
    '; print ''; @@ -2011,24 +1980,26 @@ if ($action == 'create') print '
    '; print ''; - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $i = 0; $total = 0; print ''; print ''; //print ''; print ''; - if (!empty($conf->projet->enabled)) print ''; + if (!empty($conf->projet->enabled)) { + print ''; + } print ''; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) print ''; + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { + print ''; + } print ''; print ''; print ''; print ''; print ''; - if ($action != 'editline') - { + if ($action != 'editline') { print ''; print ''; } @@ -2036,18 +2007,15 @@ if ($action == 'create') print ''; // Ajout des boutons de modification/suppression - if (($object->status < 2 || $object->status == 99) && $user->rights->expensereport->creer) - { + if (($object->status < 2 || $object->status == 99) && $user->rights->expensereport->creer) { print ''; } print ''; - foreach ($object->lines as &$line) - { + foreach ($object->lines as &$line) { $numline = $i + 1; - if ($action != 'editline' || $line->rowid != GETPOST('rowid', 'int')) - { + if ($action != 'editline' || $line->rowid != GETPOST('rowid', 'int')) { print ''; // Num @@ -2059,11 +2027,9 @@ if ($action == 'create') print ''; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; // IK - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) - { + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print ''; @@ -2092,8 +2057,7 @@ if ($action == 'create') print ''; // Unit price HT print ''; - if ($action != 'editline') - { + if ($action != 'editline') { print ''; print ''; } // Column with preview print ''; // Ajout des boutons de modification/suppression - if (($object->status < ExpenseReport::STATUS_VALIDATED || $object->status == ExpenseReport::STATUS_REFUSED) && $user->rights->expensereport->creer) - { + if (($object->status < ExpenseReport::STATUS_VALIDATED || $object->status == ExpenseReport::STATUS_REFUSED) && $user->rights->expensereport->creer) { print ''; } - if ($action == 'editline' && $line->rowid == GETPOST('rowid', 'int')) - { + if ($action == 'editline' && $line->rowid == GETPOST('rowid', 'int')) { // Add line with link to add new file or attach line to an existing file $colspan = 10; - if (!empty($conf->projet->enabled)) $colspan++; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) $colspan++; + if (!empty($conf->projet->enabled)) { + $colspan++; + } + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { + $colspan++; + } print ''; @@ -2219,8 +2180,7 @@ if ($action == 'create') print ''.$langs->trans("UploadANewFileNow"); print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; - if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) - { + if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; @@ -2238,8 +2198,7 @@ if ($action == 'create') jQuery(".truploadnewfilenow").hide(); return false; });'; - if (is_array(GETPOST('attachfile', 'array')) && count(GETPOST('attachfile', 'array'))) - { + if (is_array(GETPOST('attachfile', 'array')) && count(GETPOST('attachfile', 'array'))) { print 'jQuery(".trattachnewfilenow").toggle();'."\n"; } print ' @@ -2249,11 +2208,9 @@ if ($action == 'create') print ''; $filenamelinked = ''; - if ($line->fk_ecm_files > 0) - { + if ($line->fk_ecm_files > 0) { $result = $ecmfilesstatic->fetch($line->fk_ecm_files); - if ($result > 0) - { + if ($result > 0) { $filenamelinked = $ecmfilesstatic->filename; } } @@ -2272,8 +2229,7 @@ if ($action == 'create') print ''; // Select project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; @@ -2284,8 +2240,7 @@ if ($action == 'create') print $formexpensereport->selectTypeExpenseReport($line->fk_c_type_fees, 'fk_c_type_fees'); print ''; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) - { + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print ''; // Unit price @@ -2341,17 +2296,21 @@ if ($action == 'create') // Add a new line if (($object->status == ExpenseReport::STATUS_DRAFT || $object->status == ExpenseReport::STATUS_REFUSED) && $action != 'editline' - && $user->rights->expensereport->creer) - { + && $user->rights->expensereport->creer) { $colspan = 11; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) $colspan++; - if (!empty($conf->projet->enabled)) $colspan++; - if ($action != 'editline') $colspan++; + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { + $colspan++; + } + if (!empty($conf->projet->enabled)) { + $colspan++; + } + if ($action != 'editline') { + $colspan++; + } $nbFiles = $nbLinks = 0; $arrayoffiles = array(); - if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) - { + if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; @@ -2367,8 +2326,7 @@ if ($action == 'create') print ''.$langs->trans("UploadANewFileNow"); print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; - if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) - { + if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; @@ -2386,8 +2344,7 @@ if ($action == 'create') jQuery(".truploadnewfilenow").hide(); return false; });'."\n"; - if (is_array(GETPOST('attachfile', 'array')) && count(GETPOST('attachfile', 'array')) && $action != 'updateline') - { + if (is_array(GETPOST('attachfile', 'array')) && count(GETPOST('attachfile', 'array')) && $action != 'updateline') { print 'jQuery(".trattachnewfilenow").show();'."\n"; } print ' @@ -2431,8 +2388,7 @@ if ($action == 'create') print ''; // Select project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; @@ -2443,8 +2399,7 @@ if ($action == 'create') print $formexpensereport->selectTypeExpenseReport($fk_c_type_fees, 'fk_c_type_fees', 1); print ''; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) - { + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print ''; @@ -2481,8 +2438,7 @@ if ($action == 'create') // Picture print ''; - if ($action != 'editline') - { + if ($action != 'editline') { print ''; print ''; } @@ -2499,41 +2455,38 @@ if ($action == 'create') /* JQuery for product free or predefined select */ jQuery(document).ready(function() { - jQuery("#value_unit_ht").keyup(function(event) { - console.log(event.which); // discard event tag and arrows - if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#value_unit_ht").val() != "") { - jQuery("#value_unit").val(""); - } - }); - jQuery("#value_unit").keyup(function(event) { - console.log(event.which); // discard event tag and arrows - if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#value_unit").val() != "") { - jQuery("#value_unit_ht").val(""); - } - }); + jQuery("#value_unit_ht").keyup(function(event) { + console.log(event.which); // discard event tag and arrows + if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#value_unit_ht").val() != "") { + jQuery("#value_unit").val(""); + } + }); + jQuery("#value_unit").keyup(function(event) { + console.log(event.which); // discard event tag and arrows + if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#value_unit").val() != "") { + jQuery("#value_unit_ht").val(""); + } + }); }); - '; + '; print ''; print dol_get_fiche_end(); - } // end edit or not edit - } // end of if result - else { + } + } else { dol_print_error($db); } - } //fin si id > 0 + } } /* - * Barre d'actions + * Action bar */ - print '
    '; -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { $object = new ExpenseReport($db); $object->fetch($id, $ref); @@ -2552,16 +2505,13 @@ if ($action != 'create' && $action != 'edit') * ET fk_user_author == user courant * Afficher : "Enregistrer" / "Modifier" / "Supprimer" */ - if ($user->rights->expensereport->creer && $object->status == ExpenseReport::STATUS_DRAFT) - { - if (in_array($object->fk_user_author, $user->getAllChildIds(1)) || !empty($user->rights->expensereport->writeall_advance)) - { + if ($user->rights->expensereport->creer && $object->status == ExpenseReport::STATUS_DRAFT) { + if (in_array($object->fk_user_author, $user->getAllChildIds(1)) || !empty($user->rights->expensereport->writeall_advance)) { // Modify print ''; // Validate - if (count($object->lines) > 0) - { + if (count($object->lines) > 0) { print ''; } } @@ -2572,10 +2522,8 @@ if ($action != 'create' && $action != 'edit') * ET fk_user_author == user courant * Afficher : "Enregistrer" / "Modifier" / "Supprimer" */ - if ($user->rights->expensereport->creer && $object->status == ExpenseReport::STATUS_REFUSED) - { - if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) - { + if ($user->rights->expensereport->creer && $object->status == ExpenseReport::STATUS_REFUSED) { + if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // Modify print ''; @@ -2586,10 +2534,8 @@ if ($action != 'create' && $action != 'edit') } } - if ($user->rights->expensereport->to_paid && $object->status == ExpenseReport::STATUS_APPROVED) - { - if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) - { + if ($user->rights->expensereport->to_paid && $object->status == ExpenseReport::STATUS_APPROVED) { + if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // setdraft print ''; } @@ -2600,17 +2546,14 @@ if ($action != 'create' && $action != 'edit') * ET fk_user_validator == user courant * Afficher : "Valider" / "Refuser" / "Supprimer" */ - if ($object->status == ExpenseReport::STATUS_VALIDATED) - { - if (in_array($object->fk_user_author, $user->getAllChildIds(1))) - { + if ($object->status == ExpenseReport::STATUS_VALIDATED) { + if (in_array($object->fk_user_author, $user->getAllChildIds(1))) { // set draft print ''; } } - if ($user->rights->expensereport->approve && $object->status == ExpenseReport::STATUS_VALIDATED) - { + if ($user->rights->expensereport->approve && $object->status == ExpenseReport::STATUS_VALIDATED) { //if($object->fk_user_validator==$user->id) //{ // Validate @@ -2619,8 +2562,7 @@ if ($action != 'create' && $action != 'edit') print ''; //} - if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) - { + if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // Cancel print ''; } @@ -2630,17 +2572,14 @@ if ($action != 'create' && $action != 'edit') // If status is Approved // --------------------- - if ($user->rights->expensereport->approve && $object->status == ExpenseReport::STATUS_APPROVED) - { + if ($user->rights->expensereport->approve && $object->status == ExpenseReport::STATUS_APPROVED) { print ''; } // If bank module is used - if ($user->rights->expensereport->to_paid && !empty($conf->banque->enabled) && $object->status == ExpenseReport::STATUS_APPROVED) - { + if ($user->rights->expensereport->to_paid && !empty($conf->banque->enabled) && $object->status == ExpenseReport::STATUS_APPROVED) { // Pay - if ($remaintopay == 0) - { + if ($remaintopay == 0) { print '
    '.$langs->trans('DoPayment').'
    '; } else { print ''; @@ -2648,30 +2587,25 @@ if ($action != 'create' && $action != 'edit') } // If bank module is not used - if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->status == ExpenseReport::STATUS_APPROVED) - { + if (($user->rights->expensereport->to_paid || empty($conf->banque->enabled)) && $object->status == ExpenseReport::STATUS_APPROVED) { //if ((round($remaintopay) == 0 || empty($conf->banque->enabled)) && $object->paid == 0) - if ($object->paid == 0) - { + if ($object->paid == 0) { print '"; } } - if ($user->rights->expensereport->creer && ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) && $object->status == ExpenseReport::STATUS_APPROVED) - { - // Cancel - print ''; - } - - // TODO Replace this. It should be SetUnpaid and should go back to status unpaid not canceled. - if (($user->rights->expensereport->approve || $user->rights->expensereport->to_paid) && $object->status == ExpenseReport::STATUS_CLOSED) - { + if ($user->rights->expensereport->creer && ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) && $object->status == ExpenseReport::STATUS_APPROVED) { // Cancel print ''; } - if ($user->rights->expensereport->to_paid && $object->paid && $object->status == ExpenseReport::STATUS_CLOSED) - { + // TODO Replace this. It should be SetUnpaid and should go back to status unpaid not canceled. + if (($user->rights->expensereport->approve || $user->rights->expensereport->to_paid) && $object->status == ExpenseReport::STATUS_CLOSED) { + // Cancel + print ''; + } + + if ($user->rights->expensereport->to_paid && $object->paid && $object->status == ExpenseReport::STATUS_CLOSED) { // Set unpaid print ''; } @@ -2682,12 +2616,10 @@ if ($action != 'create' && $action != 'edit') } /* If draft, validated, cancel, and user can create, he can always delete its card before it is approved */ - if ($user->rights->expensereport->creer && $user->id == $object->fk_user_author && $object->status < ExpenseReport::STATUS_APPROVED) - { + if ($user->rights->expensereport->creer && $user->id == $object->fk_user_author && $object->status < ExpenseReport::STATUS_APPROVED) { // Delete print ''; - } elseif ($user->rights->expensereport->supprimer && $object->status != ExpenseReport::STATUS_CLOSED) - { + } elseif ($user->rights->expensereport->supprimer && $object->status != ExpenseReport::STATUS_CLOSED) { // Delete print ''; } @@ -2704,8 +2636,7 @@ if (GETPOST('modelselected', 'alpha')) { $action = 'presend'; } -if ($action != 'presend') -{ +if ($action != 'presend') { /* * Generate documents */ @@ -2713,8 +2644,7 @@ if ($action != 'presend') print '
    '; print ''; // ancre - if ($user->rights->expensereport->creer && $action != 'create' && $action != 'edit') - { + if ($user->rights->expensereport->creer && $action != 'create' && $action != 'edit') { $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->expensereport->dir_output."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; @@ -2732,7 +2662,7 @@ if ($action != 'presend') $linktoelem = $form->showLinkToObjectBlock($object, null, array('expensereport')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); } - */ + */ print '
    '; // List of actions on element diff --git a/htdocs/expensereport/class/api_expensereports.class.php b/htdocs/expensereport/class/api_expensereports.class.php index aa892e50fc0..027bb148b3c 100644 --- a/htdocs/expensereport/class/api_expensereports.class.php +++ b/htdocs/expensereport/class/api_expensereports.class.php @@ -33,7 +33,7 @@ class ExpenseReports extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'fk_user_author' ); @@ -99,6 +99,10 @@ class ExpenseReports extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->expensereport->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $societe param is ignored and replaced by user's socid @@ -107,11 +111,12 @@ class ExpenseReports extends DolibarrApi $sql = "SELECT t.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t"; $sql .= ' WHERE t.entity IN ('.getEntity('expensereport').')'; - if ($user_ids) $sql .= " AND t.fk_user_author IN (".$user_ids.")"; + if ($user_ids) { + $sql .= " AND t.fk_user_author IN (".$this->db->sanitize($user_ids).")"; + } // Add sql filters - if ($sqlfilters) - { + if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } @@ -131,13 +136,11 @@ class ExpenseReports extends DolibarrApi $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $expensereport_static = new ExpenseReport($this->db); if ($expensereport_static->fetch($obj->rowid)) { @@ -165,6 +168,7 @@ class ExpenseReports extends DolibarrApi if (!DolibarrApiAccess::$user->rights->expensereport->creer) { throw new RestException(401, "Insuffisant rights"); } + // Check mandatory fields $result = $this->_validate($request_data); @@ -172,12 +176,12 @@ class ExpenseReports extends DolibarrApi $this->expensereport->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->expensereport->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->expensereport->lines = $lines; + }*/ if ($this->expensereport->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating expensereport", array_merge(array($this->expensereport->error), $this->expensereport->errors)); } @@ -195,28 +199,28 @@ class ExpenseReports extends DolibarrApi * @return int */ /* - public function getLines($id) - { - if(! DolibarrApiAccess::$user->rights->expensereport->lire) { - throw new RestException(401); - } + public function getLines($id) + { + if(! DolibarrApiAccess::$user->rights->expensereport->lire) { + throw new RestException(401); + } - $result = $this->expensereport->fetch($id); - if( ! $result ) { - throw new RestException(404, 'expensereport not found'); - } + $result = $this->expensereport->fetch($id); + if( ! $result ) { + throw new RestException(404, 'expensereport not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->expensereport->getLinesArray(); - $result = array(); - foreach ($this->expensereport->lines as $line) { - array_push($result,$this->_cleanObjectDatas($line)); - } - return $result; - } - */ + if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->expensereport->getLinesArray(); + $result = array(); + foreach ($this->expensereport->lines as $line) { + array_push($result,$this->_cleanObjectDatas($line)); + } + return $result; + } + */ /** * Add a line to given Expense Report @@ -229,56 +233,61 @@ class ExpenseReports extends DolibarrApi * @return int */ /* - public function postLine($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->expensereport->creer) { - throw new RestException(401); - } + public function postLine($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->expensereport->creer) { + throw new RestException(401); + } - $result = $this->expensereport->fetch($id); - if( ! $result ) { - throw new RestException(404, 'expensereport not found'); - } + $result = $this->expensereport->fetch($id); + if( ! $result ) { + throw new RestException(404, 'expensereport not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->expensereport->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $this->element, - $request_data->id - ); + if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - return $updateRes; + $request_data = (object) $request_data; - } - return false; - } - */ + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + + $updateRes = $this->expensereport->addline( + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + 'HT', + 0, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $this->element, + $request_data->id + ); + + if ($updateRes > 0) { + return $updateRes; + + } + return false; + } + */ /** * Update a line to given Expense Report @@ -292,53 +301,58 @@ class ExpenseReports extends DolibarrApi * @return object */ /* - public function putLine($id, $lineid, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->expensereport->creer) { - throw new RestException(401); - } + public function putLine($id, $lineid, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->expensereport->creer) { + throw new RestException(401); + } - $result = $this->expensereport->fetch($id); - if( ! $result ) { - throw new RestException(404, 'expensereport not found'); - } + $result = $this->expensereport->fetch($id); + if( ! $result ) { + throw new RestException(404, 'expensereport not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->expensereport->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->date_start, - $request_data->date_end, - $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->fk_unit - ); + if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - } - */ + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + $request_data->label = checkVal($request_data->label); + + $updateRes = $this->expensereport->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->date_start, + $request_data->date_end, + $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->fk_unit + ); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + } + */ /** * Delete a line of given Expense Report @@ -351,30 +365,30 @@ class ExpenseReports extends DolibarrApi * @return int */ /* - public function deleteLine($id, $lineid) - { - if(! DolibarrApiAccess::$user->rights->expensereport->creer) { - throw new RestException(401); - } + public function deleteLine($id, $lineid) + { + if(! DolibarrApiAccess::$user->rights->expensereport->creer) { + throw new RestException(401); + } - $result = $this->expensereport->fetch($id); - if( ! $result ) { - throw new RestException(404, 'expensereport not found'); - } + $result = $this->expensereport->fetch($id); + if( ! $result ) { + throw new RestException(404, 'expensereport not found'); + } - if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { + 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->expensereport->deleteline($lineid); - if ($updateRes == 1) { - return $this->get($id); - } - return false; - } - */ + $updateRes = $this->expensereport->deleteline($lineid); + if ($updateRes == 1) { + return $this->get($id); + } + return false; + } + */ /** * Update Expense Report general fields (won't touch lines of expensereport) @@ -403,12 +417,13 @@ class ExpenseReports extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->expensereport->$field = $value; } - if ($this->expensereport->update(DolibarrApiAccess::$user) > 0) - { + if ($this->expensereport->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->expensereport->error); @@ -427,6 +442,7 @@ class ExpenseReports extends DolibarrApi if (!DolibarrApiAccess::$user->rights->expensereport->supprimer) { throw new RestException(401); } + $result = $this->expensereport->fetch($id); if (!$result) { throw new RestException(404, 'Expense Report not found'); @@ -464,31 +480,32 @@ class ExpenseReports extends DolibarrApi * } */ /* - public function validate($id, $idwarehouse=0) - { - if(! DolibarrApiAccess::$user->rights->expensereport->creer) { - throw new RestException(401); - } - $result = $this->expensereport->fetch($id); - if( ! $result ) { - throw new RestException(404, 'expensereport not found'); - } + public function validate($id, $idwarehouse=0) + { + if(! DolibarrApiAccess::$user->rights->expensereport->creer) { + throw new RestException(401); + } - if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + $result = $this->expensereport->fetch($id); + if( ! $result ) { + throw new RestException(404, 'expensereport not found'); + } - if( ! $this->expensereport->valid(DolibarrApiAccess::$user, $idwarehouse)) { - throw new RestException(500, 'Error when validate expensereport'); - } + if( ! DolibarrApi::_checkAccessToResource('expensereport',$this->expensereport->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - return array( - 'success' => array( - 'code' => 200, - 'message' => 'expensereport validated' - ) - ); - }*/ + if( ! $this->expensereport->valid(DolibarrApiAccess::$user, $idwarehouse)) { + throw new RestException(500, 'Error when validate expensereport'); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'expensereport validated' + ) + ); + }*/ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** @@ -555,8 +572,9 @@ class ExpenseReports extends DolibarrApi { $expensereport = array(); foreach (ExpenseReports::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $expensereport[$field] = $data[$field]; } return $expensereport; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 35173044971..8ec99aa1007 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -237,14 +237,15 @@ class ExpenseReport extends CommonObject $error = 0; // Check parameters - if (empty($this->date_debut) || empty($this->date_fin)) - { + if (empty($this->date_debut) || empty($this->date_fin)) { $this->error = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Date')); return -1; } $fuserid = $this->fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for. - if (empty($fuserid)) $fuserid = $user->id; + if (empty($fuserid)) { + $fuserid = $user->id; + } $this->db->begin(); @@ -289,25 +290,20 @@ class ExpenseReport extends CommonObject $sql .= ")"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $error++; } - if (!$error) - { - if (is_array($this->lines) && count($this->lines) > 0) - { - foreach ($this->lines as $line) - { + if (!$error) { + if (is_array($this->lines) && count($this->lines) > 0) { + foreach ($this->lines as $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)) { @@ -334,8 +330,7 @@ class ExpenseReport extends CommonObject //$newndfline=new ExpenseReportLine($this->db); $newndfline->fk_expensereport = $this->id; $result = $newndfline->insert(); - if ($result < 0) - { + if ($result < 0) { $this->error = $newndfline->error; $this->errors = $newndfline->errors; $error++; @@ -345,19 +340,17 @@ class ExpenseReport extends CommonObject } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $result = $this->update_price(); - if ($result > 0) - { - if (!$notrigger) - { + if ($result > 0) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_CREATE', $user); @@ -367,8 +360,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return $this->id; } else { @@ -405,7 +397,9 @@ class ExpenseReport extends CommonObject $error = 0; - if (empty($fk_user_author)) $fk_user_author = $user->id; + if (empty($fk_user_author)) { + $fk_user_author = $user->id; + } $this->db->begin(); @@ -430,10 +424,8 @@ class ExpenseReport extends CommonObject $this->date_validation = ''; // Remove link on lines to a joined file - if (is_array($this->lines) && count($this->lines) > 0) - { - foreach ($this->lines as $key => $line) - { + if (is_array($this->lines) && count($this->lines) > 0) { + foreach ($this->lines as $key => $line) { $this->lines[$key]->fk_ecm_files = 0; } } @@ -441,25 +433,26 @@ class ExpenseReport extends CommonObject // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Hook of thirdparty module - if (is_object($hookmanager)) - { + 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 ($reshook < 0) { + $error++; + } } } unset($this->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -490,8 +483,7 @@ class ExpenseReport extends CommonObject $sql .= " , total_tva = ".$this->total_tva; $sql .= " , date_debut = '".$this->db->idate($this->date_debut)."'"; $sql .= " , date_fin = '".$this->db->idate($this->date_fin)."'"; - if ($userofexpensereport && is_object($userofexpensereport)) - { + if ($userofexpensereport && is_object($userofexpensereport)) { $sql .= " , fk_user_author = ".($userofexpensereport->id > 0 ? $userofexpensereport->id : "null"); // Note fk_user_author is not the 'author' but the guy the expense report is for. } $sql .= " , fk_user_validator = ".($this->fk_user_validator > 0 ? $this->fk_user_validator : "null"); @@ -507,10 +499,8 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if (!$notrigger) - { + if ($result) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_UPDATE', $user); @@ -520,8 +510,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -556,17 +545,18 @@ class ExpenseReport extends CommonObject $sql .= " d.fk_user_valid, d.fk_user_approve,"; $sql .= " d.fk_statut as status, d.fk_c_paiement, d.paid"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as d"; - if ($ref) $sql .= " WHERE d.ref = '".$this->db->escape($ref)."'"; - else $sql .= " WHERE d.rowid = ".$id; + if ($ref) { + $sql .= " WHERE d.ref = '".$this->db->escape($ref)."'"; + } else { + $sql .= " WHERE d.rowid = ".((int) $id); + } //$sql.= $restrict; dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $this->id = $obj->rowid; $this->ref = $obj->ref; @@ -599,13 +589,18 @@ class ExpenseReport extends CommonObject $this->fk_user_approve = $obj->fk_user_approve; $user_author = new User($this->db); - if ($this->fk_user_author > 0) $user_author->fetch($this->fk_user_author); + if ($this->fk_user_author > 0) { + $user_author->fetch($this->fk_user_author); + } $this->user_author_infos = dolGetFirstLastname($user_author->firstname, $user_author->lastname); $user_approver = new User($this->db); - if ($this->fk_user_approve > 0) $user_approver->fetch($this->fk_user_approve); - elseif ($this->fk_user_validator > 0) $user_approver->fetch($this->fk_user_validator); // For backward compatibility + if ($this->fk_user_approve > 0) { + $user_approver->fetch($this->fk_user_approve); + } elseif ($this->fk_user_validator > 0) { + $user_approver->fetch($this->fk_user_validator); // For backward compatibility + } $this->user_validator_infos = dolGetFirstLastname($user_approver->firstname, $user_approver->lastname); $this->fk_statut = $obj->status; // deprecated @@ -613,10 +608,11 @@ class ExpenseReport extends CommonObject $this->fk_c_paiement = $obj->fk_c_paiement; $this->paid = $obj->paid; - if ($this->status == self::STATUS_APPROVED || $this->status == self::STATUS_CLOSED) - { + if ($this->status == self::STATUS_APPROVED || $this->status == self::STATUS_CLOSED) { $user_valid = new User($this->db); - if ($this->fk_user_valid > 0) $user_valid->fetch($this->fk_user_valid); + if ($this->fk_user_valid > 0) { + $user_valid->fetch($this->fk_user_valid); + } $this->user_valid_infos = dolGetFirstLastname($user_valid->firstname, $user_valid->lastname); } @@ -635,6 +631,23 @@ class ExpenseReport extends CommonObject } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Classify the expense report as paid + * + * @deprecated + * @see setPaid() + * @param int $id Id of expense report + * @param user $fuser User making change + * @param int $notrigger Disable triggers + * @return int <0 if KO, >0 if OK + */ + public function set_paid($id, $fuser, $notrigger = 0) + { + // phpcs:enable + dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE); + return $this->setPaid($id, $fuser, $notrigger); + } + /** * Classify the expense report as paid * @@ -643,24 +656,20 @@ class ExpenseReport extends CommonObject * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - public function set_paid($id, $fuser, $notrigger = 0) + public function setPaid($id, $fuser, $notrigger = 0) { - // phpcs:enable $error = 0; $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."expensereport"; $sql .= " SET fk_statut = ".self::STATUS_CLOSED.", paid=1"; - $sql .= " WHERE rowid = ".$id." AND fk_statut = ".self::STATUS_APPROVED; + $sql .= " WHERE rowid = ".((int) $id)." AND fk_statut = ".self::STATUS_APPROVED; dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->affected_rows($resql)) - { - if (!$notrigger) - { + if ($resql) { + if ($this->db->affected_rows($resql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_PAID', $fuser); @@ -670,8 +679,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -743,14 +751,12 @@ class ExpenseReport extends CommonObject $sql .= " f.fk_user_valid,"; $sql .= " f.fk_user_approve"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as f"; - $sql .= " WHERE f.rowid = ".$id; + $sql .= " WHERE f.rowid = ".((int) $id); $sql .= " AND f.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -764,26 +770,22 @@ class ExpenseReport extends CommonObject $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; - if ($obj->fk_user_creation) - { + if ($obj->fk_user_creation) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_creation); $this->user_creation = $cuser; } - if ($obj->fk_user_valid) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_modification) - { + if ($obj->fk_user_modification) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modification); $this->user_modification = $muser; } - if ($obj->fk_user_approve) - { + if ($obj->fk_user_approve) { $auser = new User($this->db); $auser->fetch($obj->fk_user_approve); $this->user_approve = $auser; @@ -878,19 +880,17 @@ class ExpenseReport extends CommonObject if ($user->rights->expensereport->lire) { $sql = "SELECT de.fk_expensereport, de.date, de.comments, de.total_ht, de.total_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as de"; - $sql .= " WHERE de.fk_projet = ".$projectid; + $sql .= " WHERE de.fk_projet = ".((int) $projectid); dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; $total_HT = 0; $total_TTC = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $sql2 = "SELECT d.rowid, d.fk_user_author, d.ref, d.fk_statut as status"; @@ -937,13 +937,13 @@ class ExpenseReport extends CommonObject break; } /* - if ($status==4) return img_picto($langs->trans('StatusOrderCanceled'),'statut5'); - if ($status==1) return img_picto($langs->trans('StatusOrderDraft'),'statut0'); - if ($status==2) return img_picto($langs->trans('StatusOrderValidated'),'statut1'); - if ($status==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3'); - if ($status==5) return img_picto($langs->trans('StatusOrderToBill'),'statut4'); - if ($status==6) return img_picto($langs->trans('StatusOrderOnProcess'),'statut6'); - */ + if ($status==4) return img_picto($langs->trans('StatusOrderCanceled'),'statut5'); + if ($status==1) return img_picto($langs->trans('StatusOrderDraft'),'statut0'); + if ($status==2) return img_picto($langs->trans('StatusOrderValidated'),'statut1'); + if ($status==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3'); + if ($status==5) return img_picto($langs->trans('StatusOrderToBill'),'statut4'); + if ($status==6) return img_picto($langs->trans('StatusOrderOnProcess'),'statut6'); + */ print ''; print '
    '; @@ -973,16 +973,15 @@ class ExpenseReport extends CommonObject { $sql = 'SELECT tt.total_ht, tt.total_ttc, tt.total_tva'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as tt'; - $sql .= ' WHERE tt.'.$this->fk_element.' = '.$id; + $sql .= ' WHERE tt.'.$this->fk_element.' = '.((int) $id); $total_ht = 0; $total_tva = 0; $total_ttc = 0; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num): + while ($i < $num) : $objp = $this->db->fetch_object($result); $total_ht += $objp->total_ht; $total_tva += $objp->total_tva; @@ -994,9 +993,9 @@ class ExpenseReport extends CommonObject $sql .= " total_ht = ".$total_ht; $sql .= " , total_ttc = ".$total_ttc; $sql .= " , total_tva = ".$total_tva; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); $result = $this->db->query($sql); - if ($result): + if ($result) : $this->db->free($result); return 1; else : @@ -1033,20 +1032,17 @@ class ExpenseReport extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON de.fk_projet = p.rowid'; $sql .= ' WHERE de.'.$this->fk_element.' = '.$this->id; - if (!empty($conf->global->EXPENSEREPORT_LINES_SORTED_BY_ROWID)) - { + if (!empty($conf->global->EXPENSEREPORT_LINES_SORTED_BY_ROWID)) { $sql .= ' ORDER BY de.rang ASC, de.rowid ASC'; } else { $sql .= ' ORDER BY de.rang ASC, de.date ASC'; } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($resql); $deplig = new ExpenseReportLine($this->db); @@ -1112,15 +1108,17 @@ class ExpenseReport extends CommonObject if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSEREPORT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } // Delete extrafields of lines and lines if (!$error && !empty($this->table_element_line)) { $tabletodelete = $this->table_element_line; - //$sqlef = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete."_extrafields WHERE fk_object IN (SELECT rowid FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".$this->id.")"; - $sql = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".$this->id; + //$sqlef = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete."_extrafields WHERE fk_object IN (SELECT rowid FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".((int) $this->id).")"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete." WHERE ".$this->fk_element." = ".((int) $this->id); if (!$this->db->query($sql)) { $error++; $this->error = $this->db->lasterror(); @@ -1132,13 +1130,17 @@ class ExpenseReport extends CommonObject if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } // Removed extrafields of object @@ -1152,7 +1154,7 @@ class ExpenseReport extends CommonObject // Delete main record if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element." WHERE rowid = ".$this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element." WHERE rowid = ".((int) $this->id); $res = $this->db->query($sql); if (!$res) { $error++; @@ -1223,8 +1225,7 @@ class ExpenseReport extends CommonObject $now = dol_now(); // Protection - if ($this->status == self::STATUS_VALIDATED) - { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::valid action abandonned: already validated", LOG_WARNING); return 0; } @@ -1232,13 +1233,14 @@ class ExpenseReport extends CommonObject $this->date_valid = $now; // Required for the getNextNum later. // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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 { $num = $this->ref; } - if (empty($num) || $num < 0) return -1; + if (empty($num) || $num < 0) { + return -1; + } $this->newref = dol_sanitizeFileName($num); @@ -1253,10 +1255,8 @@ class ExpenseReport extends CommonObject $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { - if (!$error && !$notrigger) - { + if ($resql) { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_VALIDATE', $fuser); if ($result < 0) { @@ -1265,37 +1265,34 @@ class ExpenseReport extends CommonObject // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { + if (preg_match('/^[\(]?PROV/i', $this->ref)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // 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 = 'expensereport/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'expensereport/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->expensereport->dir_output.'/'.$oldref; $dirdest = $conf->expensereport->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::setValidate() rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->expensereport->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -1308,14 +1305,12 @@ class ExpenseReport extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->status = self::STATUS_VALIDATED; } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1353,16 +1348,14 @@ class ExpenseReport extends CommonObject $this->date_debut = $this->db->jdate($objp->date_debut); - if ($this->status != self::STATUS_VALIDATED) - { + if ($this->status != self::STATUS_VALIDATED) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; $sql .= " SET fk_statut = ".self::STATUS_VALIDATED; $sql .= ' WHERE rowid = '.$this->id; dol_syslog(get_class($this)."::set_save_from_refuse sql=".$sql, LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { return 1; } else { $this->error = $this->db->lasterror(); @@ -1387,18 +1380,15 @@ class ExpenseReport extends CommonObject // date approval $this->date_approve = $now; - if ($this->status != self::STATUS_APPROVED) - { + if ($this->status != self::STATUS_APPROVED) { $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_APPROVED.", fk_user_approve = ".$fuser->id.","; + $sql .= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_APPROVED.", fk_user_approve = ".((int) $fuser->id).","; $sql .= " date_approve='".$this->db->idate($this->date_approve)."'"; $sql .= ' WHERE rowid = '.$this->id; - if ($this->db->query($sql)) - { - if (!$notrigger) - { + if ($this->db->query($sql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_APPROVE', $fuser); @@ -1408,8 +1398,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1443,24 +1432,21 @@ class ExpenseReport extends CommonObject $error = 0; // date de refus - if ($this->status != self::STATUS_REFUSED) - { + if ($this->status != self::STATUS_REFUSED) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_REFUSED.", fk_user_refuse = ".$fuser->id.","; + $sql .= " SET ref = '".$this->db->escape($this->ref)."', fk_statut = ".self::STATUS_REFUSED.", fk_user_refuse = ".((int) $fuser->id).","; $sql .= " date_refuse='".$this->db->idate($now)."',"; $sql .= " detail_refuse='".$this->db->escape($details)."',"; $sql .= " fk_user_approve = NULL"; $sql .= ' WHERE rowid = '.$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->fk_statut = 99; // deprecated $this->status = 99; $this->fk_user_refuse = $fuser->id; $this->detail_refuse = $details; $this->date_refuse = $now; - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_DENY', $fuser); @@ -1470,8 +1456,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1493,6 +1478,8 @@ class ExpenseReport extends CommonObject /** * set_unpaid * + * @deprecated + * @see setUnpaid() * @param User $fuser User * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK @@ -1500,10 +1487,22 @@ class ExpenseReport extends CommonObject public function set_unpaid($fuser, $notrigger = 0) { // phpcs:enable + dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); + return $this->setUnpaid($fuser, $notrigger); + } + + /** + * set_unpaid + * + * @param User $fuser User + * @param int $notrigger Disable triggers + * @return int <0 if KO, >0 if OK + */ + public function setUnpaid($fuser, $notrigger = 0) + { $error = 0; - if ($this->paid) - { + if ($this->paid) { $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; @@ -1512,10 +1511,8 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::set_unpaid sql=".$sql, LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$notrigger) - { + if ($this->db->query($sql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_UNPAID', $fuser); @@ -1525,8 +1522,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1558,22 +1554,19 @@ class ExpenseReport extends CommonObject // phpcs:enable $error = 0; $this->date_cancel = $this->db->idate(dol_now()); - if ($this->status != self::STATUS_CANCELED) - { + if ($this->status != self::STATUS_CANCELED) { $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET fk_statut = ".self::STATUS_CANCELED.", fk_user_cancel = ".$fuser->id; + $sql .= " SET fk_statut = ".self::STATUS_CANCELED.", fk_user_cancel = ".((int) $fuser->id); $sql .= ", date_cancel='".$this->db->idate($this->date_cancel)."'"; $sql .= " ,detail_cancel='".$this->db->escape($detail)."'"; $sql .= ' WHERE rowid = '.$this->id; dol_syslog(get_class($this)."::set_cancel sql=".$sql, LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$notrigger) - { + if ($this->db->query($sql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_CANCEL', $fuser); @@ -1583,8 +1576,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1612,8 +1604,7 @@ class ExpenseReport extends CommonObject global $langs, $conf; $langs->load("trips"); - if (!empty($conf->global->EXPENSEREPORT_ADDON)) - { + if (!empty($conf->global->EXPENSEREPORT_ADDON)) { $mybool = false; $file = $conf->global->EXPENSEREPORT_ADDON.".php"; @@ -1621,8 +1612,7 @@ class ExpenseReport extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/expensereport/"); // Load file with numbering class (if found) @@ -1637,8 +1627,7 @@ class ExpenseReport extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -1671,38 +1660,50 @@ class ExpenseReport extends CommonObject $url = DOL_URL_ROOT.'/expensereport/card.php?id='.$this->id; - if ($short) return $url; + if ($short) { + return $url; + } $label = img_picto('', $this->picto).' '.$langs->trans("ExpenseReport").''; if (isset($this->status)) { $label .= ' '.$this->getLibStatut(5); } - if (!empty($this->ref)) + if (!empty($this->ref)) { $label .= '
    '.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->total_ht)) + } + 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)) + } + 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)) + } + 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 ($moretitle) { + $label .= ' - '.$moretitle; + } //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'; + 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'; + } //} $ref = $this->ref; - if (empty($ref)) $ref = $this->id; + if (empty($ref)) { + $ref = $this->id; + } $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowExpenseReport"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -1715,8 +1716,12 @@ class ExpenseReport extends CommonObject $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 .= ($max ?dol_trunc($ref, $max) : $ref); + 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 .= ($max ?dol_trunc($ref, $max) : $ref); + } $result .= $linkend; return $result; @@ -1744,7 +1749,7 @@ class ExpenseReport extends CommonObject $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - if ($result): + if ($result) : return 1; else : $this->error = $this->db->error(); @@ -1774,7 +1779,7 @@ class ExpenseReport extends CommonObject $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - if ($result): + if ($result) : return 1; else : $this->error = $this->db->error(); @@ -1803,14 +1808,25 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::addline qty=$qty, up=$up, fk_c_type_fees=$fk_c_type_fees, vatrate=$vatrate, date=$date, fk_project=$fk_project, type=$type, comments=$comments", LOG_DEBUG); - if ($this->status == self::STATUS_DRAFT) - { - if (empty($qty)) $qty = 0; - if (empty($fk_c_type_fees) || $fk_c_type_fees < 0) $fk_c_type_fees = 0; - if (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) $fk_c_exp_tax_cat = 0; - if (empty($vatrate) || $vatrate < 0) $vatrate = 0; - if (empty($date)) $date = ''; - if (empty($fk_project)) $fk_project = 0; + if ($this->status == self::STATUS_DRAFT) { + if (empty($qty)) { + $qty = 0; + } + if (empty($fk_c_type_fees) || $fk_c_type_fees < 0) { + $fk_c_type_fees = 0; + } + if (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) { + $fk_c_exp_tax_cat = 0; + } + if (empty($vatrate) || $vatrate < 0) { + $vatrate = 0; + } + if (empty($date)) { + $date = ''; + } + if (empty($fk_project)) { + $fk_project = 0; + } $qty = price2num($qty); if (!preg_match('/\s*\((.*)\)/', $vatrate)) { @@ -1826,8 +1842,7 @@ class ExpenseReport extends CommonObject $vat_src_code = ''; $reg = array(); - if (preg_match('/\s*\((.*)\)/', $vatrate, $reg)) - { + if (preg_match('/\s*\((.*)\)/', $vatrate, $reg)) { $vat_src_code = $reg[1]; $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. } @@ -1859,11 +1874,9 @@ class ExpenseReport extends CommonObject $this->checkRules($type, $seller); $result = $this->line->insert(0, true); - if ($result > 0) - { + if ($result > 0) { $result = $this->update_price(); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -1896,7 +1909,9 @@ class ExpenseReport extends CommonObject $langs->load('trips'); - if (empty($conf->global->MAIN_USE_EXPENSE_RULE)) return true; // if don't use rules + if (empty($conf->global->MAIN_USE_EXPENSE_RULE)) { + return true; // if don't use rules + } $rulestocheck = ExpenseReportRule::getAllRule($this->line->fk_c_type_fees, $this->line->date, $this->fk_user_author); @@ -1907,19 +1922,19 @@ class ExpenseReport extends CommonObject $new_current_total_ttc = $this->line->total_ttc; // check if one is violated - foreach ($rulestocheck as $rule) - { - if (in_array($rule->code_expense_rules_type, array('EX_DAY', 'EX_MON', 'EX_YEA'))) $amount_to_test = $this->line->getExpAmount($rule, $this->fk_user_author, $rule->code_expense_rules_type); - else $amount_to_test = $current_total_ttc; // EX_EXP + foreach ($rulestocheck as $rule) { + if (in_array($rule->code_expense_rules_type, array('EX_DAY', 'EX_MON', 'EX_YEA'))) { + $amount_to_test = $this->line->getExpAmount($rule, $this->fk_user_author, $rule->code_expense_rules_type); + } else { + $amount_to_test = $current_total_ttc; // EX_EXP + } $amount_to_test = $amount_to_test - $current_total_ttc + $new_current_total_ttc; // if amount as been modified by a previous rule - if ($amount_to_test > $rule->amount) - { + if ($amount_to_test > $rule->amount) { $violation++; - if ($rule->restrictive) - { + if ($rule->restrictive) { $this->error = 'ExpenseReportConstraintViolationError'; $this->errors[] = $this->error; @@ -1938,8 +1953,7 @@ class ExpenseReport extends CommonObject $this->line->rule_warning_message = implode('\n', $rule_warning_message_tab); - if ($violation > 0) - { + if ($violation > 0) { $tmp = calcul_price_total($this->line->qty, $new_current_total_ttc / $this->line->qty, 0, $this->line->vatrate, 0, 0, 0, 'TTC', 0, $type, $seller); $this->line->value_unit = $tmp[5]; @@ -1948,7 +1962,9 @@ class ExpenseReport extends CommonObject $this->line->total_tva = $tmp[1]; return false; - } else return true; + } else { + return true; + } } /** @@ -1960,11 +1976,12 @@ class ExpenseReport extends CommonObject { global $conf; - if (empty($conf->global->MAIN_USE_EXPENSE_IK)) return false; + if (empty($conf->global->MAIN_USE_EXPENSE_IK)) { + return false; + } $userauthor = new User($this->db); - if ($userauthor->fetch($this->fk_user_author) <= 0) - { + if ($userauthor->fetch($this->fk_user_author) <= 0) { $this->error = 'ErrorCantFetchUser'; $this->errors[] = 'ErrorCantFetchUser'; return false; @@ -1972,19 +1989,20 @@ class ExpenseReport extends CommonObject $range = ExpenseReportIk::getRangeByUser($userauthor, $this->line->fk_c_exp_tax_cat); - if (empty($range)) - { + if (empty($range)) { $this->error = 'ErrorNoRangeAvailable'; $this->errors[] = 'ErrorNoRangeAvailable'; return false; } - if (!empty($conf->global->MAIN_EXPENSE_APPLY_ENTIRE_OFFSET)) $ikoffset = $range->ikoffset; - else $ikoffset = $range->ikoffset / 12; // The amount of offset is a global value for the year + if (!empty($conf->global->MAIN_EXPENSE_APPLY_ENTIRE_OFFSET)) { + $ikoffset = $range->ikoffset; + } else { + $ikoffset = $range->ikoffset / 12; // The amount of offset is a global value for the year + } // Test if ikoffset has been applied for the current month - if (!$this->offsetAlreadyGiven()) - { + if (!$this->offsetAlreadyGiven()) { $new_up = $range->coef + ($ikoffset / $this->line->qty); $tmp = calcul_price_total($this->line->qty, $new_up, 0, $this->line->vatrate, 0, 0, 0, 'TTC', 0, $type, $seller); @@ -2011,14 +2029,17 @@ class ExpenseReport extends CommonObject $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees f ON (d.fk_c_type_fees = f.id AND f.code = "EX_KME")'; $sql .= ' WHERE e.fk_user_author = '.(int) $this->fk_user_author; $sql .= ' AND YEAR(d.date) = "'.dol_print_date($this->line->date, '%Y').'" AND MONTH(d.date) = "'.dol_print_date($this->line->date, '%m').'"'; - if (!empty($this->line->id)) $sql .= ' AND d.rowid <> '.$this->line->id; + if (!empty($this->line->id)) { + $sql .= ' AND d.rowid <> '.$this->line->id; + } dol_syslog(get_class($this)."::offsetAlreadyGiven sql=".$sql); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) return true; + if ($num > 0) { + return true; + } } else { dol_print_error($this->db); } @@ -2046,8 +2067,7 @@ class ExpenseReport extends CommonObject { global $user, $mysoc; - if ($this->status == self::STATUS_DRAFT || $this->status == self::STATUS_REFUSED) - { + if ($this->status == self::STATUS_DRAFT || $this->status == self::STATUS_REFUSED) { $this->db->begin(); $type = 0; // TODO What if type is service ? @@ -2061,8 +2081,7 @@ class ExpenseReport extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $vatrate, $reg)) - { + if (preg_match('/\((.*)\)/', $vatrate, $reg)) { $vat_src_code = $reg[1]; $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. } @@ -2105,10 +2124,9 @@ class ExpenseReport extends CommonObject // Select des infos sur le type fees $sql = "SELECT c.code as code_type_fees, c.label as libelle_type_fees"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees as c"; - $sql .= " WHERE c.id = ".$type_fees_id; + $sql .= " WHERE c.id = ".((int) $type_fees_id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $objp_fees = $this->db->fetch_object($resql); $this->line->type_fees_code = $objp_fees->code_type_fees; $this->line->type_fees_libelle = $objp_fees->libelle_type_fees; @@ -2118,7 +2136,7 @@ class ExpenseReport extends CommonObject // Select des informations du projet $sql = "SELECT p.ref as ref_projet, p.title as title_projet"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; - $sql .= " WHERE p.rowid = ".$projet_id; + $sql .= " WHERE p.rowid = ".((int) $projet_id); $resql = $this->db->query($sql); if ($resql) { $objp_projet = $this->db->fetch_object($resql); @@ -2131,8 +2149,7 @@ class ExpenseReport extends CommonObject $this->checkRules(); $result = $this->line->update($user); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return 1; } else { @@ -2156,12 +2173,11 @@ class ExpenseReport extends CommonObject $this->db->begin(); $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element_line; - $sql .= ' WHERE rowid = '.$rowid; + $sql .= ' WHERE rowid = '.((int) $rowid); dol_syslog(get_class($this)."::deleteline sql=".$sql); $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $this->error = $this->db->error(); dol_syslog(get_class($this)."::deleteline Error ".$this->error, LOG_ERR); $this->db->rollback(); @@ -2194,27 +2210,30 @@ class ExpenseReport extends CommonObject if ($result) { $num_rows = $this->db->num_rows($result); $i = 0; - if ($num_rows > 0) - { + if ($num_rows > 0) { $date_d_form = $date_debut; $date_f_form = $date_fin; $existe = false; - while ($i < $num_rows) - { + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); $date_d_req = $this->db->jdate($objp->date_debut); // 3 $date_f_req = $this->db->jdate($objp->date_fin); // 4 - if (!($date_f_form < $date_d_req || $date_d_form > $date_f_req)) $existe = true; + if (!($date_f_form < $date_d_req || $date_d_form > $date_f_req)) { + $existe = true; + } $i++; } - if ($existe) return 1; - else return 0; + if ($existe) { + return 1; + } else { + return 0; + } } else { return 0; } @@ -2249,11 +2268,9 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::fetch_users_approver_expensereport sql=".$sql); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num_rows = $this->db->num_rows($result); $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); $i++; @@ -2314,15 +2331,13 @@ class ExpenseReport extends CommonObject $ret = array(); $sql = "SELECT id, code, label"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees"; - $sql .= " WHERE active = ".$active; + $sql .= " WHERE active = ".((int) $active); dol_syslog(get_class($this)."::listOfTypes", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $ret[$obj->code] = (($langs->transnoentitiesnoconv($obj->code) != $obj->code) ? $langs->transnoentitiesnoconv($obj->code) : $obj->label); $i++; @@ -2350,11 +2365,10 @@ class ExpenseReport extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as ex"; $sql .= " WHERE ex.fk_statut > 0"; $sql .= " AND ex.entity IN (".getEntity('expensereport').")"; - if (empty($user->rights->expensereport->readall)) - { + if (empty($user->rights->expensereport->readall)) { $userchildids = $user->getAllChildIds(1); - $sql .= " AND (ex.fk_user_author IN (".join(',', $userchildids).")"; - $sql .= " OR ex.fk_user_validator IN (".join(',', $userchildids)."))"; + $sql .= " AND (ex.fk_user_author IN (".$this->db->sanitize(join(',', $userchildids)).")"; + $sql .= " OR ex.fk_user_validator IN (".$this->db->sanitize(join(',', $userchildids))."))"; } $resql = $this->db->query($sql); @@ -2384,30 +2398,32 @@ class ExpenseReport extends CommonObject // phpcs:enable global $conf, $langs; - if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) { + return -1; // protection pour eviter appel par utilisateur externe + } $now = dol_now(); $sql = "SELECT ex.rowid, ex.date_valid"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as ex"; - if ($option == 'toapprove') $sql .= " WHERE ex.fk_statut = ".self::STATUS_VALIDATED; - else $sql .= " WHERE ex.fk_statut = ".self::STATUS_APPROVED; + if ($option == 'toapprove') { + $sql .= " WHERE ex.fk_statut = ".self::STATUS_VALIDATED; + } else { + $sql .= " WHERE ex.fk_statut = ".self::STATUS_APPROVED; + } $sql .= " AND ex.entity IN (".getEntity('expensereport').")"; - if (empty($user->rights->expensereport->readall)) - { + if (empty($user->rights->expensereport->readall)) { $userchildids = $user->getAllChildIds(1); - $sql .= " AND (ex.fk_user_author IN (".join(',', $userchildids).")"; - $sql .= " OR ex.fk_user_validator IN (".join(',', $userchildids)."))"; + $sql .= " AND (ex.fk_user_author IN (".$this->db->sanitize(join(',', $userchildids)).")"; + $sql .= " OR ex.fk_user_validator IN (".$this->db->sanitize(join(',', $userchildids))."))"; } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $langs->load("trips"); $response = new WorkboardResponse(); - if ($option == 'toapprove') - { + if ($option == 'toapprove') { $response->warning_delay = $conf->expensereport->approve->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("ExpenseReportsToApprove"); $response->labelShort = $langs->trans("ToApprove"); @@ -2420,12 +2436,10 @@ class ExpenseReport extends CommonObject } $response->img = img_object('', "trip"); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; - if ($option == 'toapprove') - { + if ($option == 'toapprove') { if ($this->db->jdate($obj->date_valid) < ($now - $conf->expensereport->approve->warning_delay)) { $response->nbtodolate++; } @@ -2455,8 +2469,12 @@ class ExpenseReport extends CommonObject global $conf; // Only valid expenses reports - if ($option == 'toapprove' && $this->status != 2) return false; - if ($option == 'topay' && $this->status != 5) return false; + if ($option == 'toapprove' && $this->status != 2) { + return false; + } + if ($option == 'topay' && $this->status != 5) { + return false; + } $now = dol_now(); if ($option == 'toapprove') { @@ -2477,13 +2495,11 @@ class ExpenseReport extends CommonObject $type = 'expense_report'; - $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; + $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 = ".((int) $this->id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $alreadydispatched = $obj->nb; } } else { @@ -2491,8 +2507,7 @@ class ExpenseReport extends CommonObject return -1; } - if ($alreadydispatched) - { + if ($alreadydispatched) { return 1; } return 0; @@ -2514,8 +2529,7 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::getSumPayments", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $this->db->free($resql); return (empty($obj->amount) ? 0 : $obj->amount); @@ -2614,12 +2628,11 @@ class ExpenseReportLine $sql .= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id'; // Sometimes type of expense report has been removed, so we use a left join here. $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid'; - $sql .= ' WHERE fde.rowid = '.$rowid; + $sql .= ' WHERE fde.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); $this->rowid = $objp->rowid; @@ -2669,10 +2682,14 @@ class ExpenseReportLine // Clean parameters $this->comments = trim($this->comments); - if (empty($this->value_unit)) $this->value_unit = 0; + if (empty($this->value_unit)) { + $this->value_unit = 0; + } $this->qty = price2num($this->qty); $this->vatrate = price2num($this->vatrate); - if (empty($this->fk_c_exp_tax_cat)) $this->fk_c_exp_tax_cat = 0; + if (empty($this->fk_c_exp_tax_cat)) { + $this->fk_c_exp_tax_cat = 0; + } $this->db->begin(); @@ -2697,17 +2714,14 @@ class ExpenseReportLine $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'expensereport_det'); - if (!$fromaddline) - { + if (!$fromaddline) { $tmpparent = new ExpenseReport($this->db); $tmpparent->fetch($this->fk_expensereport); $result = $tmpparent->update_price(); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $tmpparent->error; $this->errors = $tmpparent->errors; @@ -2717,8 +2731,7 @@ class ExpenseReportLine $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -2744,21 +2757,25 @@ class ExpenseReportLine $sql = 'SELECT SUM(d.total_ttc) as total_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'expensereport_det d'; $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'expensereport e ON (d.fk_expensereport = e.rowid)'; - $sql .= ' WHERE e.fk_user_author = '.$fk_user; - if (!empty($this->id)) $sql .= ' AND d.rowid <> '.$this->id; + $sql .= ' WHERE e.fk_user_author = '.((int) $fk_user); + if (!empty($this->id)) { + $sql .= ' AND d.rowid <> '.$this->id; + } $sql .= ' AND d.fk_c_type_fees = '.$rule->fk_c_type_fees; - if ($mode == 'day' || $mode == 'EX_DAY') $sql .= ' AND d.date = \''.dol_print_date($this->date, '%Y-%m-%d').'\''; - elseif ($mode == 'mon' || $mode == 'EX_MON') $sql .= ' AND DATE_FORMAT(d.date, \'%Y-%m\') = \''.dol_print_date($this->date, '%Y-%m').'\''; // @todo DATE_FORMAT is forbidden - elseif ($mode == 'year' || $mode == 'EX_YEA') $sql .= ' AND DATE_FORMAT(d.date, \'%Y\') = \''.dol_print_date($this->date, '%Y').'\''; // @todo DATE_FORMAT is forbidden + if ($mode == 'day' || $mode == 'EX_DAY') { + $sql .= ' AND d.date = \''.dol_print_date($this->date, '%Y-%m-%d').'\''; + } elseif ($mode == 'mon' || $mode == 'EX_MON') { + $sql .= ' AND DATE_FORMAT(d.date, \'%Y-%m\') = \''.dol_print_date($this->date, '%Y-%m').'\''; // @todo DATE_FORMAT is forbidden + } elseif ($mode == 'year' || $mode == 'EX_YEA') { + $sql .= ' AND DATE_FORMAT(d.date, \'%Y\') = \''.dol_print_date($this->date, '%Y').'\''; // @todo DATE_FORMAT is forbidden + } dol_syslog('ExpenseReportLine::getExpAmount'); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $obj = $this->db->fetch_object($resql); $amount = (double) $obj->total_amount; } @@ -2785,7 +2802,9 @@ class ExpenseReportLine $this->comments = trim($this->comments); $this->vatrate = price2num($this->vatrate); $this->value_unit = price2num($this->value_unit); - if (empty($this->fk_c_exp_tax_cat)) $this->fk_c_exp_tax_cat = 0; + if (empty($this->fk_c_exp_tax_cat)) { + $this->fk_c_exp_tax_cat = 0; + } $this->db->begin(); @@ -2803,24 +2822,27 @@ class ExpenseReportLine $sql .= ",rule_warning_message='".$this->db->escape($this->rule_warning_message)."'"; $sql .= ",fk_c_exp_tax_cat=".$this->db->escape($this->fk_c_exp_tax_cat); $sql .= ",fk_ecm_files=".($this->fk_ecm_files > 0 ? $this->fk_ecm_files : 'null'); - if ($this->fk_c_type_fees) $sql .= ",fk_c_type_fees=".$this->db->escape($this->fk_c_type_fees); - else $sql .= ",fk_c_type_fees=null"; - if ($this->fk_project > 0) $sql .= ",fk_projet=".$this->db->escape($this->fk_project); - else $sql .= ",fk_projet=null"; + if ($this->fk_c_type_fees) { + $sql .= ",fk_c_type_fees=".$this->db->escape($this->fk_c_type_fees); + } else { + $sql .= ",fk_c_type_fees=null"; + } + if ($this->fk_project > 0) { + $sql .= ",fk_projet=".$this->db->escape($this->fk_project); + } else { + $sql .= ",fk_projet=null"; + } $sql .= " WHERE rowid = ".$this->db->escape($this->rowid ? $this->rowid : $this->id); dol_syslog("ExpenseReportLine::update sql=".$sql); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $tmpparent = new ExpenseReport($this->db); $result = $tmpparent->fetch($this->fk_expensereport); - if ($result > 0) - { + if ($result > 0) { $result = $tmpparent->update_price(); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $tmpparent->error; $this->errors = $tmpparent->errors; @@ -2835,8 +2857,7 @@ class ExpenseReportLine dol_print_error($this->db); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 55af1eb00ed..6c6623c30c7 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -111,15 +111,16 @@ class ExpenseReportIk extends CoreObject $sql = 'SELECT rowid, label, entity, active'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat'; $sql .= ' WHERE entity IN ('.getEntity('c_exp_tax_cat').')'; - if ($mode == 1) $sql .= ' AND active = 1'; - elseif ($mode == 2) $sql .= 'AND active = 0'; + if ($mode == 1) { + $sql .= ' AND active = 1'; + } elseif ($mode == 2) { + $sql .= 'AND active = 0'; + } dol_syslog(get_called_class().'::getTaxCategories sql='.$sql, LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $categories[$obj->rowid] = $obj; } } else { @@ -136,14 +137,17 @@ class ExpenseReportIk extends CoreObject * @param int $fk_c_exp_tax_cat category * @return boolean|array */ - public static function getRangeByUser(User $userauthor, $fk_c_exp_tax_cat) + public static function getRangeByUser(User $userauthor, int $fk_c_exp_tax_cat) { $default_range = (int) $userauthor->default_range; // if not defined, then 0 $ranges = self::getRangesByCategory($fk_c_exp_tax_cat); // substract 1 because array start from 0 - if (empty($ranges) || !isset($ranges[$default_range - 1])) return false; - else return $ranges[$default_range - 1]; + if (empty($ranges) || !isset($ranges[$default_range - 1])) { + return false; + } else { + return $ranges[$default_range - 1]; + } } /** @@ -153,27 +157,29 @@ class ExpenseReportIk extends CoreObject * @param int $active active * @return array */ - public static function getRangesByCategory($fk_c_exp_tax_cat, $active = 1) + public static function getRangesByCategory(int $fk_c_exp_tax_cat, $active = 1) { global $db; $ranges = array(); + dol_syslog(get_called_class().'::getRangesByCategory for fk_c_exp_tax_cat='.$fk_c_exp_tax_cat, LOG_DEBUG); + $sql = 'SELECT r.rowid FROM '.MAIN_DB_PREFIX.'c_exp_tax_range r'; - if ($active) $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'c_exp_tax_cat c ON (r.fk_c_exp_tax_cat = c.rowid)'; - $sql .= ' WHERE r.fk_c_exp_tax_cat = '.$fk_c_exp_tax_cat; - if ($active) $sql .= ' AND r.active = 1 AND c.active = 1'; + if ($active) { + $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'c_exp_tax_cat c ON (r.fk_c_exp_tax_cat = c.rowid)'; + } + $sql .= ' WHERE r.fk_c_exp_tax_cat = '.((int) $fk_c_exp_tax_cat); + if ($active) { + $sql .= ' AND r.active = 1 AND c.active = 1'; + } $sql .= ' ORDER BY r.range_ik'; - dol_syslog(get_called_class().'::getRangesByCategory sql='.$sql, LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num > 0) - { - while ($obj = $db->fetch_object($resql)) - { + if ($num > 0) { + while ($obj = $db->fetch_object($resql)) { $object = new ExpenseReportIk($db); $object->fetch($obj->rowid); @@ -207,15 +213,17 @@ class ExpenseReportIk extends CoreObject dol_syslog(get_called_class().'::getAllRanges sql='.$sql, LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $ik = new ExpenseReportIk($db); - if ($obj->fk_expense_ik > 0) $ik->fetch($obj->fk_expense_ik); + if ($obj->fk_expense_ik > 0) { + $ik->fetch($obj->fk_expense_ik); + } $obj->ik = $ik; - if (!isset($ranges[$obj->fk_c_exp_tax_cat])) $ranges[$obj->fk_c_exp_tax_cat] = array('label' => $obj->label, 'active' => $obj->cat_active, 'ranges' => array()); + if (!isset($ranges[$obj->fk_c_exp_tax_cat])) { + $ranges[$obj->fk_c_exp_tax_cat] = array('label' => $obj->label, 'active' => $obj->cat_active, 'ranges' => array()); + } $ranges[$obj->fk_c_exp_tax_cat]['ranges'][] = $obj; } } else { @@ -239,14 +247,15 @@ class ExpenseReportIk extends CoreObject $sql .= ' SELECT COUNT(*) as counted'; $sql .= ' FROM '.MAIN_DB_PREFIX.'c_exp_tax_range r'; $sql .= ' WHERE r.entity IN (0, '.$conf->entity.')'; - if ($default_c_exp_tax_cat > 0) $sql .= ' AND r.fk_c_exp_tax_cat = '.$default_c_exp_tax_cat; + if ($default_c_exp_tax_cat > 0) { + $sql .= ' AND r.fk_c_exp_tax_cat = '.$default_c_exp_tax_cat; + } $sql .= ' GROUP BY r.fk_c_exp_tax_cat'; $sql .= ') as counts'; dol_syslog(get_called_class().'::getMaxRangeNumber sql='.$sql, LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); return $obj->nbRange; } else { diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 9a172cd7563..653f030b6d2 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -156,34 +156,32 @@ class ExpenseReportRule extends CoreObject $sql = 'SELECT er.rowid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'expensereport_rules er'; $sql .= ' WHERE er.entity IN (0,'.getEntity('').')'; - if (!empty($fk_c_type_fees)) - { + if (!empty($fk_c_type_fees)) { $sql .= ' AND er.fk_c_type_fees IN (-1, '.$fk_c_type_fees.')'; } - if (!empty($date)) - { + if (!empty($date)) { $date = dol_print_date($date, '%Y-%m-%d'); $sql .= ' AND er.dates <= \''.$date.'\''; $sql .= ' AND er.datee >= \''.$date.'\''; } - if ($fk_user > 0) - { + if ($fk_user > 0) { $sql .= ' AND (er.is_for_all = 1'; $sql .= ' OR er.fk_user = '.$fk_user; - $sql .= ' OR er.fk_usergroup IN (SELECT ugu.fk_usergroup FROM '.MAIN_DB_PREFIX.'usergroup_user ugu WHERE ugu.fk_user = '.$fk_user.') )'; + $sql .= ' OR er.fk_usergroup IN (SELECT ugu.fk_usergroup FROM '.MAIN_DB_PREFIX.'usergroup_user ugu WHERE ugu.fk_user = '.((int) $fk_user).') )'; } $sql .= ' ORDER BY er.is_for_all, er.fk_usergroup, er.fk_user'; dol_syslog("ExpenseReportRule::getAllRule sql=".$sql); $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $rule = new ExpenseReportRule($db); - if ($rule->fetch($obj->rowid) > 0) $rules[$rule->id] = $rule; - else dol_print_error($db); + if ($rule->fetch($obj->rowid) > 0) { + $rules[$rule->id] = $rule; + } else { + dol_print_error($db); + } } } else { dol_print_error($db); @@ -201,11 +199,9 @@ class ExpenseReportRule extends CoreObject { include_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; - if ($this->fk_usergroup > 0) - { + if ($this->fk_usergroup > 0) { $group = new UserGroup($this->db); - if ($group->fetch($this->fk_usergroup) > 0) - { + if ($group->fetch($this->fk_usergroup) > 0) { return $group->nom; } else { $this->error = $group->error; @@ -225,11 +221,9 @@ class ExpenseReportRule extends CoreObject { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; - if ($this->fk_user > 0) - { + if ($this->fk_user > 0) { $u = new User($this->db); - if ($u->fetch($this->fk_user) > 0) - { + if ($u->fetch($this->fk_user) > 0) { return dolGetFirstLastname($u->firstname, $u->lastname); } else { $this->error = $u->error; diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index c4167e3002f..8f3574f2952 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -70,20 +70,20 @@ class ExpenseReportStats extends Stats $this->where .= ' e.entity IN ('.getEntity('expensereport').')'; //$this->where.= " AND entity = ".$conf->entity; - if ($this->socid) - { + if ($this->socid) { $this->where .= " AND e.fk_soc = ".$this->socid; } // Only me and subordinates - if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) - { + if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) { $childids = $user->getAllChildIds(); $childids[] = $user->id; - $this->where .= " AND e.fk_user_author IN (".(join(',', $childids)).")"; + $this->where .= " AND e.fk_user_author IN (".$this->db->sanitize(join(',', $childids)).")"; } - if ($this->userid > 0) $this->where .= ' AND e.fk_user_author = '.$this->userid; + if ($this->userid > 0) { + $this->where .= ' AND e.fk_user_author = '.((int) $this->userid); + } } @@ -114,7 +114,7 @@ class ExpenseReportStats extends Stats { $sql = "SELECT MONTH(".$this->db->ifsql('e.'.$this->datetouse.' IS NULL', 'e.date_create', 'e.'.$this->datetouse).") as dm, count(*)"; $sql .= " FROM ".$this->from; - $sql .= " WHERE YEAR(e.".$this->datetouse.") = ".$year; + $sql .= " WHERE YEAR(e.".$this->datetouse.") = ".((int) $year); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); diff --git a/htdocs/expensereport/class/index.html b/htdocs/expensereport/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index be8693f223e..c673316d491 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -119,19 +119,36 @@ class PaymentExpenseReport extends CommonObject } // Clean parameters - if (isset($this->fk_expensereport)) $this->fk_expensereport = trim($this->fk_expensereport); - if (isset($this->amount)) $this->amount = trim($this->amount); - if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - 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_public)) $this->note_public = trim($this->note_public); - if (isset($this->fk_bank)) $this->fk_bank = trim($this->fk_bank); - if (isset($this->fk_user_creat)) $this->fk_user_creat = trim($this->fk_user_creat); - if (isset($this->fk_user_modif)) $this->fk_user_modif = trim($this->fk_user_modif); + if (isset($this->fk_expensereport)) { + $this->fk_expensereport = trim($this->fk_expensereport); + } + if (isset($this->amount)) { + $this->amount = trim($this->amount); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = trim($this->fk_typepayment); + } + 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_public)) { + $this->note_public = trim($this->note_public); + } + if (isset($this->fk_bank)) { + $this->fk_bank = trim($this->fk_bank); + } + if (isset($this->fk_user_creat)) { + $this->fk_user_creat = trim($this->fk_user_creat); + } + if (isset($this->fk_user_modif)) { + $this->fk_user_modif = trim($this->fk_user_modif); + } $totalamount = 0; - foreach ($this->amounts as $key => $value) // How payment is dispatch - { + foreach ($this->amounts as $key => $value) { // How payment is dispatch $newvalue = price2num($value, 'MT'); $this->amounts[$key] = $newvalue; $totalamount += $newvalue; @@ -139,13 +156,14 @@ class PaymentExpenseReport extends CommonObject $totalamount = price2num($totalamount); // Check parameters - if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + if ($totalamount == 0) { + return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + } $this->db->begin(); - if ($totalamount != 0) - { + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_expensereport (fk_expensereport, datec, datep, amount,"; $sql .= " fk_typepayment, num_payment, note, fk_user_creat, fk_bank)"; $sql .= " VALUES ($this->fk_expensereport, '".$this->db->idate($now)."',"; @@ -156,16 +174,14 @@ class PaymentExpenseReport extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_expensereport"); } else { $error++; } } - if ($totalamount != 0 && !$error) - { + if ($totalamount != 0 && !$error) { $this->amount = $totalamount; $this->db->commit(); return $this->id; @@ -202,14 +218,12 @@ class PaymentExpenseReport extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."payment_expensereport 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 .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -258,14 +272,30 @@ class PaymentExpenseReport extends CommonObject // Clean parameters - if (isset($this->fk_expensereport)) $this->fk_expensereport = trim($this->fk_expensereport); - if (isset($this->amount)) $this->amount = trim($this->amount); - if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note)) $this->note = trim($this->note); - if (isset($this->fk_bank)) $this->fk_bank = trim($this->fk_bank); - if (isset($this->fk_user_creat)) $this->fk_user_creat = trim($this->fk_user_creat); - if (isset($this->fk_user_modif)) $this->fk_user_modif = trim($this->fk_user_modif); + if (isset($this->fk_expensereport)) { + $this->fk_expensereport = trim($this->fk_expensereport); + } + if (isset($this->amount)) { + $this->amount = trim($this->amount); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = trim($this->fk_typepayment); + } + if (isset($this->num_payment)) { + $this->num_payment = trim($this->num_payment); + } + if (isset($this->note)) { + $this->note = trim($this->note); + } + if (isset($this->fk_bank)) { + $this->fk_bank = trim($this->fk_bank); + } + if (isset($this->fk_user_creat)) { + $this->fk_user_creat = trim($this->fk_user_creat); + } + if (isset($this->fk_user_modif)) { + $this->fk_user_modif = trim($this->fk_user_modif); + } // Check parameters @@ -287,19 +317,19 @@ class PaymentExpenseReport extends CommonObject $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -327,20 +357,20 @@ class PaymentExpenseReport extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url"; $sql .= " WHERE type='payment_expensereport' AND url_id=".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_expensereport"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); @@ -351,10 +381,8 @@ class PaymentExpenseReport extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -396,8 +424,7 @@ class PaymentExpenseReport extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $error++; } @@ -405,8 +432,7 @@ class PaymentExpenseReport extends CommonObject unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -487,8 +513,7 @@ class PaymentExpenseReport extends CommonObject $error = 0; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); @@ -497,7 +522,9 @@ class PaymentExpenseReport extends CommonObject //Fix me field $total = $this->amount; - if ($mode == 'payment_expensereport') $amount = $total; + if ($mode == 'payment_expensereport') { + $amount = $total; + } // Insert payment into llx_bank $bank_line_id = $acc->addline( @@ -514,35 +541,30 @@ class PaymentExpenseReport extends CommonObject // Update fk_bank in llx_paiement. // On connait ainsi le paiement qui a genere l'ecriture bancaire - if ($bank_line_id > 0) - { + if ($bank_line_id > 0) { $result = $this->update_fk_bank($bank_line_id); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } // Add link 'payment', 'payment_supplier', 'payment_expensereport' in bank_url between payment and bank transaction $url = ''; - if ($mode == 'payment_expensereport') $url = DOL_URL_ROOT.'/expensereport/payment/card.php?rowid='; - if ($url) - { + if ($mode == 'payment_expensereport') { + $url = DOL_URL_ROOT.'/expensereport/payment/card.php?rowid='; + } + if ($url) { $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } } // Add link 'user' in bank_url between user and bank transaction - if (!$error) - { - foreach ($this->amounts as $key => $value) // We should have always same user but we loop in case of. - { - if ($mode == 'payment_expensereport') - { + if (!$error) { + foreach ($this->amounts as $key => $value) { // We should have always same user but we loop in case of. + if ($mode == 'payment_expensereport') { $fuser = new User($this->db); $fuser->fetch($key); @@ -553,8 +575,7 @@ class PaymentExpenseReport extends CommonObject $fuser->getFullName($langs), 'user' ); - if ($result <= 0) - { + if ($result <= 0) { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::addPaymentToBank '.$this->error); $error++; @@ -568,8 +589,7 @@ class PaymentExpenseReport extends CommonObject } } - if (!$error) - { + if (!$error) { return 1; } else { return -1; @@ -587,12 +607,11 @@ class PaymentExpenseReport extends CommonObject public function update_fk_bank($id_bank) { // phpcs:enable - $sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { $this->error = $this->db->error(); @@ -613,17 +632,24 @@ class PaymentExpenseReport extends CommonObject $result = ''; - if (empty($this->ref)) $this->ref = $this->label; + if (empty($this->ref)) { + $this->ref = $this->label; + } $label = $langs->trans("ShowPayment").': '.$this->ref; - if (!empty($this->id)) - { + if (!empty($this->id)) { $link = ''; $linkend = ''; - if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + if ($withpicto) { + $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + } } return $result; @@ -639,25 +665,21 @@ class PaymentExpenseReport extends CommonObject { $sql = 'SELECT e.rowid, e.datec, e.fk_user_creat, e.fk_user_modif, e.tms'; $sql .= ' FROM '.MAIN_DB_PREFIX.'payment_expensereport as e'; - $sql .= ' WHERE e.rowid = '.$id; + $sql .= ' WHERE e.rowid = '.((int) $id); dol_syslog(get_class($this).'::info', LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_creat) - { + if ($obj->fk_user_creat) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_creat); $this->user_creation = $cuser; } - if ($obj->fk_user_modif) - { + if ($obj->fk_user_modif) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modif); $this->user_modification = $muser; diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index bc03a300801..147f0842e4c 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -45,7 +45,9 @@ $confirm = GETPOST('confirm', 'alpha'); $childids = $user->getAllChildIds(1); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); @@ -54,17 +56,22 @@ $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 +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 = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $object = new ExpenseReport($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); } @@ -74,14 +81,16 @@ $modulepart = 'trip'; // 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 ($object->id > 0) -{ +if ($object->id > 0) { // Check current user can read this expense report $canread = 0; - if (!empty($user->rights->expensereport->readall)) $canread = 1; - if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->expensereport->readall)) { + $canread = 1; + } + if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } @@ -101,11 +110,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); $title = $langs->trans("ExpenseReport")." - ".$langs->trans("Documents"); -$helpurl = "EN:Module_Expense_Reports"; -llxHeader("", $title, $helpurl); +$help_url = "EN:Module_Expense_Reports|FR:Module_Notes_de_frais"; -if ($object->id) -{ +llxHeader("", $title, $help_url); + +if ($object->id) { $object->fetch_thirdparty(); $head = expensereport_prepare_head($object); @@ -124,8 +133,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 046bde4efa1..be8c735edc1 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -42,19 +42,27 @@ $langs->loadLangs(array('companies', 'users', 'trips')); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', '', ''); $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 = "d.date_create"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "d.date_create"; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -67,8 +75,8 @@ $tripandexpense_static = new ExpenseReport($db); $childids = $user->getAllChildIds(); $childids[] = $user->id; -//$help_url='EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'; -$help_url = ''; +$help_url = "EN:Module_Expense_Reports|FR:Module_Notes_de_frais"; + llxHeader('', $langs->trans("ListOfFees"), $help_url); @@ -80,22 +88,19 @@ $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."expensere $sql .= " WHERE de.fk_expensereport = d.rowid AND d.entity IN (".getEntity('expensereport').") AND de.fk_c_type_fees = tf.id"; // RESTRICT RIGHTS if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous) - && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) -{ + && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) { $childids = $user->getAllChildIds(); $childids[] = $user->id; - $sql .= " AND d.fk_user_author IN (".join(',', $childids).")\n"; + $sql .= " AND d.fk_user_author IN (".$db->sanitize(join(',', $childids)).")\n"; } $sql .= " GROUP BY tf.code, tf.label"; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $somme[$objp->code] = $objp->km; @@ -123,13 +128,11 @@ print ''; print "\n"; $listoftype = $tripandexpense_static->listOfTypes(); -foreach ($listoftype as $code => $label) -{ +foreach ($listoftype as $code => $label) { $dataseries[] = array($label, (isset($somme[$code]) ? (int) $somme[$code] : 0)); } -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print ''; print ''; print ''; - if ($num) - { + if ($num) { $total_ttc = $totalam = $total = 0; $expensereportstatic = new ExpenseReport($db); $userstatic = new User($db); - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); $expensereportstatic->id = $obj->rowid; @@ -241,7 +246,9 @@ if ($result) print ''; } print '
    '.$langs->trans('LineNb').''.$langs->trans('Piece').''.$langs->trans('Date').''.$langs->trans('Project').''.$langs->trans('Project').''.$langs->trans('Type').''.$langs->trans('CarCategory').''.$langs->trans('CarCategory').''.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').''.$langs->trans('AmountHT').''.$langs->trans('AmountTTC').''; print '
    '.dol_print_date($db->jdate($line->date), 'day').''; - if ($line->fk_project > 0) - { + if ($line->fk_project > 0) { $projecttmp->id = $line->fk_project; $projecttmp->ref = $line->projet_ref; $projecttmp->title = $line->projet_title; @@ -2079,8 +2045,7 @@ if ($action == 'create') print ''; print dol_getIdFromCode($db, $line->fk_c_exp_tax_cat, 'c_exp_tax_cat', 'rowid', 'label'); print ''.vatrate($line->vatrate, true).''; - if (!empty($line->value_unit_ht)) - { + if (!empty($line->value_unit_ht)) { print price($line->value_unit_ht); } else { $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $line->vatrate)); @@ -2106,28 +2070,26 @@ if ($action == 'create') print ''.dol_escape_htmltag($line->qty).''.price($line->total_ht).''.price($line->total_ttc).''; - if ($line->fk_ecm_files > 0) - { + if ($line->fk_ecm_files > 0) { $modulepart = 'expensereport'; $maxheightmini = 32; $result = $ecmfilesstatic->fetch($line->fk_ecm_files); - if ($result > 0) - { + if ($result > 0) { $relativepath = preg_replace('/expensereport\//', '', $ecmfilesstatic->filepath); $fileinfo = pathinfo($ecmfilesstatic->filepath.'/'.$ecmfilesstatic->filename); - if (image_format_supported($fileinfo['basename']) > 0) - { + if (image_format_supported($fileinfo['basename']) > 0) { $minifile = getImageFileNameForSize($fileinfo['basename'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original - if (!dol_is_file($conf->expensereport->dir_output.'/'.$relativepath.'/'.$minifile)) $minifile = getImageFileNameForSize($fileinfo['basename'], '_mini', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension + if (!dol_is_file($conf->expensereport->dir_output.'/'.$relativepath.'/'.$minifile)) { + $minifile = getImageFileNameForSize($fileinfo['basename'], '_mini', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension + } //print $file['path'].'/'.$minifile.'
    '; $urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.'/'.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); if (empty($urlforhref)) { @@ -2141,42 +2103,39 @@ if ($action == 'create') } else { $modulepart = 'expensereport'; $thumbshown = 0; - if (preg_match('/\.pdf$/i', $ecmfilesstatic->filename)) - { + if (preg_match('/\.pdf$/i', $ecmfilesstatic->filename)) { $filepdf = $conf->expensereport->dir_output.'/'.$relativepath.'/'.$ecmfilesstatic->filename; $fileimage = $conf->expensereport->dir_output.'/'.$relativepath.'/'.$ecmfilesstatic->filename.'_preview.png'; $relativepathimage = $relativepath.'/'.$ecmfilesstatic->filename.'_preview.png'; $pdfexists = file_exists($filepdf); - if ($pdfexists) - { + if ($pdfexists) { // Conversion du PDF en image png si fichier png non existant - if (!file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) - { - if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here. - { + if (!file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) { + if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) { // If you experience trouble with pdf thumb generation and imagick, you can disable here. include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $ret = dol_convert_file($filepdf, 'png', $fileimage, '0'); // Convert first page of PDF into a file _preview.png - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } } } - if ($pdfexists && !$error) - { + if ($pdfexists && !$error) { $heightforphotref = 70; - if (!empty($conf->dol_optimize_smallscreen)) $heightforphotref = 60; + if (!empty($conf->dol_optimize_smallscreen)) { + $heightforphotref = 60; + } // If the preview file is found - if (file_exists($fileimage)) - { + if (file_exists($fileimage)) { $thumbshown = 1; print ''; } } } - if (!$thumbshown) - { + if (!$thumbshown) { print img_mime($ecmfilesstatic->filename); } } @@ -2185,8 +2144,7 @@ if ($action == 'create') print '
    '; print 'rowid.'">'; @@ -2202,12 +2160,15 @@ if ($action == 'create') print '
    '; $formproject->select_projects(-1, $line->fk_project, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print ''; $params = array('fk_expense' => $object->id, 'fk_expense_det' => $line->rowid, 'date' => $line->dates); print $form->selectExpenseCategories($line->fk_c_exp_tax_cat, 'fk_c_exp_tax_cat', 1, array(), 'fk_c_type_fees', $userauthor->default_c_exp_tax_cat, $params); @@ -2299,7 +2254,7 @@ if ($action == 'create') // VAT print ''; - print $form->load_tva('vatrate', (isset($_POST["vatrate"]) ? $_POST["vatrate"] : $line->vatrate), $mysoc, '', 0, 0, '', false, 1); + print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $line->vatrate), $mysoc, '', 0, 0, '', false, 1); print ''; $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300'); print ''; $params = array('fk_expense' => $object->id); print $form->selectExpenseCategories('', 'fk_c_exp_tax_cat', 1, array(), 'fk_c_type_fees', $userauthor->default_c_exp_tax_cat, $params, 0); @@ -2459,7 +2414,9 @@ if ($action == 'create') // Select VAT print ''; $defaultvat = -1; - if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none'; + if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) { + $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none'; + } print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1); print '
    '.$langs->trans("Statistics").'
    '; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -168,25 +171,29 @@ $langs->load("boxes"); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut as user_status, u.photo, u.email, u.admin,"; $sql .= " d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".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"; +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 = d.fk_user_author"; // RESTRICT RIGHTS if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous) - && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) -{ + && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) { $childids = $user->getAllChildIds(); $childids[] = $user->id; - $sql .= " AND d.fk_user_author IN (".join(',', $childids).")\n"; + $sql .= " AND d.fk_user_author IN (".$db->sanitize(join(',', $childids)).")\n"; } $sql .= ' AND d.entity IN ('.getEntity('expensereport').')'; -if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if ($socid) $sql .= " AND d.fk_user_author = ".$socid; +if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= " AND d.fk_user_author = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id); +} +if ($socid) { + $sql .= " AND d.fk_user_author = ".$socid; +} $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($max, 0); $result = $db->query($sql); -if ($result) -{ +if ($result) { $var = false; $num = $db->num_rows($result); @@ -201,14 +208,12 @@ if ($result) print ''.$langs->trans("DateModificationShort").' 
    '.$langs->trans("None").'

    '; -} else dol_print_error($db); +} else { + dol_print_error($db); +} print ''; diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index 53d1531f4b9..605197d14ac 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -37,23 +37,26 @@ $ref = GETPOST('ref', 'alpha'); $childids = $user->getAllChildIds(1); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); $object = new ExpenseReport($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); } -if ($object->id > 0) -{ +if ($object->id > 0) { // Check current user can read this expense report $canread = 0; - if (!empty($user->rights->expensereport->readall)) $canread = 1; - if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->expensereport->readall)) { + $canread = 1; + } + if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } @@ -69,8 +72,7 @@ $title = $langs->trans("ExpenseReport")." - ".$langs->trans("Info"); $helpurl = "EN:Module_Expense_Reports"; llxHeader("", $title, $helpurl); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new ExpenseReport($db); $object->fetch($id, $ref); $object->info($object->id); diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 7afb464e4f4..e83899d28d1 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -7,7 +7,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Charlene Benke * Copyright (C) 2019 Juanjo Menent - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 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 @@ -54,18 +54,24 @@ $childids = $user->getAllChildIds(1); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', '', ''); $id = GETPOST('id', 'int'); // If we are on the view of a specific user -if ($id > 0) -{ +if ($id > 0) { $canread = 0; - if ($id == $user->id) $canread = 1; - if (!empty($user->rights->expensereport->readall)) $canread = 1; - if (!empty($user->rights->expensereport->lire) && in_array($id, $childids)) $canread = 1; - if (!$canread) - { + if ($id == $user->id) { + $canread = 1; + } + if (!empty($user->rights->expensereport->readall)) { + $canread = 1; + } + if (!empty($user->rights->expensereport->lire) && in_array($id, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } @@ -74,35 +80,48 @@ $diroutputmassaction = $conf->expensereport->dir_output.'/temp/massgeneration/'. // 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 +$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 (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "d.date_debut"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "d.date_debut"; +} -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$search_ref = GETPOST('search_ref', 'alpha'); -$search_user = GETPOST('search_user', 'int'); -$search_amount_ht = GETPOST('search_amount_ht', 'alpha'); -$search_amount_vat = GETPOST('search_amount_vat', 'alpha'); -$search_amount_ttc = GETPOST('search_amount_ttc', 'alpha'); -$search_status = (GETPOST('search_status', 'intcomma') != '' ?GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma')); -$month_start = GETPOST("month_start", "int"); -$year_start = GETPOST("year_start", "int"); -$day_start = GETPOST("day_start", "int"); -$day_end = GETPOST("day_end", "int"); -$month_end = GETPOST("month_end", "int"); -$year_end = GETPOST("year_end", "int"); +$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); + +$search_ref = GETPOST('search_ref', 'alpha'); +$search_user = GETPOST('search_user', 'int'); +$search_amount_ht = GETPOST('search_amount_ht', 'alpha'); +$search_amount_vat = GETPOST('search_amount_vat', 'alpha'); +$search_amount_ttc = GETPOST('search_amount_ttc', 'alpha'); +$search_status = (GETPOST('search_status', 'intcomma') != '' ?GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma')); + +$year_start = GETPOST('year_start', 'int'); +$month_start = GETPOST('month_start', 'int'); +$day_start = GETPOST('day_start', 'int'); +$year_end = GETPOST('year_end', 'int'); +$month_end = GETPOST('month_end', 'int'); +$day_end = GETPOST('day_end', 'int'); + $optioncss = GETPOST('optioncss', 'alpha'); -if ($search_status == '') $search_status = -1; -if ($search_user == '') $search_user = -1; +if ($search_status == '') { + $search_status = -1; +} +if ($search_user == '') { + $search_user = -1; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new ExpenseReport($db); @@ -123,7 +142,9 @@ $fieldstosearchall = array( 'u.firstname'=>"Firstname", 'u.login'=>"Login", ); -if (empty($user->socid)) $fieldstosearchall["d.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["d.note_private"] = "NotePrivate"; +} $arrayfields = array( 'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), @@ -151,21 +172,25 @@ $objectuser = new User($db); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_user = ""; $search_amount_ht = ""; @@ -181,8 +206,7 @@ if (empty($reshook)) $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')) - { + || 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 } @@ -216,8 +240,7 @@ $min_year = 10; // Get current user id $user_id = $user->id; -if ($id > 0) -{ +if ($id > 0) { // Charge utilisateur edite $fuser->fetch($id, '', '', 1); $fuser->getrights(); @@ -231,36 +254,51 @@ $sql .= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_v $sql .= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.email, u.statut, u.photo"; // 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."expensereport as d"; -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 (d.rowid = ef.fk_object)"; +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 (d.rowid = ef.fk_object)"; +} $sql .= ", ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE d.fk_user_author = u.rowid AND d.entity IN (".getEntity('expensereport').")"; // Search all -if (!empty($sall)) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if (!empty($sall)) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} // Ref -if (!empty($search_ref)) $sql .= natural_search('d.ref', $search_ref); +if (!empty($search_ref)) { + $sql .= natural_search('d.ref', $search_ref); +} // Date Start $sql .= dolSqlDateFilter("d.date_debut", $day_start, $month_start, $year_start); // Date End $sql .= dolSqlDateFilter("d.date_fin", $day_end, $month_end, $year_end); -if ($search_amount_ht != '') $sql .= natural_search('d.total_ht', $search_amount_ht, 1); -if ($search_amount_ttc != '') $sql .= natural_search('d.total_ttc', $search_amount_ttc, 1); +if ($search_amount_ht != '') { + $sql .= natural_search('d.total_ht', $search_amount_ht, 1); +} +if ($search_amount_ttc != '') { + $sql .= natural_search('d.total_ttc', $search_amount_ttc, 1); +} // User -if ($search_user != '' && $search_user >= 0) $sql .= " AND u.rowid = '".$db->escape($search_user)."'"; +if ($search_user != '' && $search_user >= 0) { + $sql .= " AND u.rowid = '".$db->escape($search_user)."'"; +} // Status -if ($search_status != '' && $search_status >= 0) $sql .= " AND d.fk_statut IN (".$db->sanitize($db->escape($search_status)).")"; +if ($search_status != '' && $search_status >= 0) { + $sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")"; +} // RESTRICT RIGHTS if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous) - && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) -{ - $sql .= " AND d.fk_user_author IN (".join(',', $childids).")\n"; + && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance))) { + $sql .= " AND d.fk_user_author IN (".$db->sanitize(join(',', $childids)).")\n"; } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -273,12 +311,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -288,48 +324,72 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 ($search_ref) $param .= "&search_ref=".urlencode($search_ref); - if ($search_user) $param .= "&search_user=".urlencode($search_user); - if ($search_amount_ht) $param .= "&search_amount_ht=".urlencode($search_amount_ht); - if ($search_amount_ttc) $param .= "&search_amount_ttc=".urlencode($search_amount_ttc); - if ($search_status >= 0) $param .= "&search_status=".urlencode($search_status); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + 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 ($search_ref) { + $param .= "&search_ref=".urlencode($search_ref); + } + if ($search_user) { + $param .= "&search_user=".urlencode($search_user); + } + if ($search_amount_ht) { + $param .= "&search_amount_ht=".urlencode($search_amount_ht); + } + if ($search_amount_ttc) { + $param .= "&search_amount_ttc=".urlencode($search_amount_ttc); + } + if ($search_status >= 0) { + $param .= "&search_status=".urlencode($search_status); + } + 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( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); - if ($user->rights->expensereport->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if ($user->rights->expensereport->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // Lines of title fields print '
    '."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; print ''; print ''; print ''; - if ($id > 0) print ''; + if ($id > 0) { + print ''; + } - if ($id > 0) // For user tab - { + if ($id > 0) { // For user tab $title = $langs->trans("User"); $linkback = ''.$langs->trans("BackToList").''; $head = user_prepare_head($fuser); @@ -340,8 +400,7 @@ if ($resql) print dol_get_fiche_end(); - if ($action != 'edit') - { + if ($action != 'edit') { print '
    '; $childids = $user->getAllChildIds(1); @@ -366,7 +425,9 @@ if ($resql) $title = $langs->trans("ListTripsAndExpenses"); $url = DOL_URL_ROOT.'/expensereport/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', $url, '', $user->rights->expensereport->creer); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'trip', 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -378,9 +439,10 @@ if ($resql) $trackid = 'exp'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; } @@ -388,11 +450,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '
    '; print $moreforfilter; print '
    '; @@ -407,17 +471,14 @@ if ($resql) // Filters print ''; - if (!empty($arrayfields['d.ref']['checked'])) - { + if (!empty($arrayfields['d.ref']['checked'])) { print ''; print ''; print ''; } // User - if (!empty($arrayfields['user']['checked'])) - { - if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous) - { + if (!empty($arrayfields['user']['checked'])) { + if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous) { print ''; print $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); print ''; @@ -426,8 +487,7 @@ if ($resql) } } // Date start - if (!empty($arrayfields['d.date_debut']['checked'])) - { + if (!empty($arrayfields['d.date_debut']['checked'])) { print ''; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { print ''; @@ -438,8 +498,7 @@ if ($resql) print ''; } // Date end - if (!empty($arrayfields['d.date_fin']['checked'])) - { + if (!empty($arrayfields['d.date_fin']['checked'])) { print ''; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { print ''; @@ -449,33 +508,28 @@ if ($resql) print ''; } // Date valid - if (!empty($arrayfields['d.date_valid']['checked'])) - { + if (!empty($arrayfields['d.date_valid']['checked'])) { print ''; //print ''; //$formother->select_year($year_end,'year_end',1, $min_year, $max_year); print ''; } // Date approve - if (!empty($arrayfields['d.date_approve']['checked'])) - { + if (!empty($arrayfields['d.date_approve']['checked'])) { print ''; //print ''; //$formother->select_year($year_end,'year_end',1, $min_year, $max_year); print ''; } // Amount with no tax - if (!empty($arrayfields['d.total_ht']['checked'])) - { + if (!empty($arrayfields['d.total_ht']['checked'])) { print ''; } - if (!empty($arrayfields['d.total_vat']['checked'])) - { + if (!empty($arrayfields['d.total_vat']['checked'])) { print ''; } // Amount with all taxes - if (!empty($arrayfields['d.total_ttc']['checked'])) - { + if (!empty($arrayfields['d.total_ttc']['checked'])) { print ''; } // Extra fields @@ -486,20 +540,17 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['d.date_create']['checked'])) - { + if (!empty($arrayfields['d.date_create']['checked'])) { print ''; print ''; } // Date modification - if (!empty($arrayfields['d.tms']['checked'])) - { + if (!empty($arrayfields['d.tms']['checked'])) { print ''; print ''; } // Status - if (!empty($arrayfields['d.fk_statut']['checked'])) - { + if (!empty($arrayfields['d.fk_statut']['checked'])) { print ''; $formexpensereport->selectExpensereportStatus($search_status, 'search_status', 1, 1); print ''; @@ -513,24 +564,48 @@ if ($resql) print "\n"; print ''; - if (!empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "d.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['user']['checked'])) print_liste_field_titre($arrayfields['user']['label'], $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['d.date_debut']['checked'])) print_liste_field_titre($arrayfields['d.date_debut']['label'], $_SERVER["PHP_SELF"], "d.date_debut", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['d.date_fin']['checked'])) print_liste_field_titre($arrayfields['d.date_fin']['label'], $_SERVER["PHP_SELF"], "d.date_fin", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['d.date_valid']['checked'])) print_liste_field_titre($arrayfields['d.date_valid']['label'], $_SERVER["PHP_SELF"], "d.date_valid", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['d.date_approve']['checked'])) print_liste_field_titre($arrayfields['d.date_approve']['label'], $_SERVER["PHP_SELF"], "d.date_approve", "", $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['d.total_ht']['checked'])) print_liste_field_titre($arrayfields['d.total_ht']['label'], $_SERVER["PHP_SELF"], "d.total_ht", "", $param, 'align="right"', $sortfield, $sortorder); - if (!empty($arrayfields['d.total_vat']['checked'])) print_liste_field_titre($arrayfields['d.total_vat']['label'], $_SERVER["PHP_SELF"], "d.total_tva", "", $param, 'align="right"', $sortfield, $sortorder); - if (!empty($arrayfields['d.total_ttc']['checked'])) print_liste_field_titre($arrayfields['d.total_ttc']['label'], $_SERVER["PHP_SELF"], "d.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder); + if (!empty($arrayfields['d.ref']['checked'])) { + print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "d.ref", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['user']['checked'])) { + print_liste_field_titre($arrayfields['user']['label'], $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.date_debut']['checked'])) { + print_liste_field_titre($arrayfields['d.date_debut']['label'], $_SERVER["PHP_SELF"], "d.date_debut", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.date_fin']['checked'])) { + print_liste_field_titre($arrayfields['d.date_fin']['label'], $_SERVER["PHP_SELF"], "d.date_fin", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.date_valid']['checked'])) { + print_liste_field_titre($arrayfields['d.date_valid']['label'], $_SERVER["PHP_SELF"], "d.date_valid", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.date_approve']['checked'])) { + print_liste_field_titre($arrayfields['d.date_approve']['label'], $_SERVER["PHP_SELF"], "d.date_approve", "", $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['d.total_ht']['label'], $_SERVER["PHP_SELF"], "d.total_ht", "", $param, 'align="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.total_vat']['checked'])) { + print_liste_field_titre($arrayfields['d.total_vat']['label'], $_SERVER["PHP_SELF"], "d.total_tva", "", $param, 'align="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['d.total_ttc']['label'], $_SERVER["PHP_SELF"], "d.total_ttc", "", $param, 'align="right"', $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['d.date_create']['checked'])) print_liste_field_titre($arrayfields['d.date_create']['label'], $_SERVER["PHP_SELF"], "d.date_create", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (!empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (!empty($arrayfields['d.fk_statut']['checked'])) print_liste_field_titre($arrayfields['d.fk_statut']['label'], $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder); + if (!empty($arrayfields['d.date_create']['checked'])) { + print_liste_field_titre($arrayfields['d.date_create']['label'], $_SERVER["PHP_SELF"], "d.date_create", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.tms']['checked'])) { + print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + } + if (!empty($arrayfields['d.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['d.fk_statut']['label'], $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; @@ -541,12 +616,16 @@ if ($resql) $expensereportstatic = new ExpenseReport($db); $usertmp = new User($db); - if ($num > 0) - { + if ($num > 0) { $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + $totalarray['nbfield'] = 0; + $totalarray['val'] = array(); + $totalarray['val']['d.total_ht'] = 0; + $totalarray['val']['d.total_tva'] = 0; + $totalarray['val']['d.total_ttc'] = 0; + $totalarray['totalizable'] = array(); + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $expensereportstatic->id = $obj->rowid; @@ -572,10 +651,13 @@ if ($resql) print ''; // Warning late icon and note print ''; - if ($expensereportstatic->status == 2 && $expensereportstatic->hasDelay('toappove')) print img_warning($langs->trans("Late")); - if ($expensereportstatic->status == 5 && $expensereportstatic->hasDelay('topay')) print img_warning($langs->trans("Late")); - if (!empty($obj->note_private) || !empty($obj->note_public)) - { + if ($expensereportstatic->status == 2 && $expensereportstatic->hasDelay('toappove')) { + print img_warning($langs->trans("Late")); + } + if ($expensereportstatic->status == 5 && $expensereportstatic->hasDelay('topay')) { + print img_warning($langs->trans("Late")); + } + if (!empty($obj->note_private) || !empty($obj->note_public)) { print ' '; print ''.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').''; print ''; @@ -589,7 +671,9 @@ if ($resql) print ''; print ''; print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // User if (!empty($arrayfields['user']['checked'])) { @@ -603,50 +687,69 @@ if ($resql) $usertmp->email = $obj->email; print $usertmp->getNomUrl(-1); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Start date if (!empty($arrayfields['d.date_debut']['checked'])) { print ''.($obj->date_debut > 0 ? dol_print_date($db->jdate($obj->date_debut), 'day') : '').''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // End date if (!empty($arrayfields['d.date_fin']['checked'])) { print ''.($obj->date_fin > 0 ? dol_print_date($db->jdate($obj->date_fin), 'day') : '').''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date validation if (!empty($arrayfields['d.date_valid']['checked'])) { print ''.($obj->date_valid > 0 ? dol_print_date($db->jdate($obj->date_valid), 'day') : '').''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date approval if (!empty($arrayfields['d.date_approve']['checked'])) { print ''.($obj->date_approve > 0 ? dol_print_date($db->jdate($obj->date_approve), 'day') : '').''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['d.total_ht']['checked'])) - { + if (!empty($arrayfields['d.total_ht']['checked'])) { print ''.price($obj->total_ht)."\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'd.total_ht'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'd.total_ht'; + } $totalarray['val']['d.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['d.total_vat']['checked'])) - { + if (!empty($arrayfields['d.total_vat']['checked'])) { print ''.price($obj->total_tva)."\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'd.total_tva'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'd.total_tva'; + } $totalarray['val']['d.total_tva'] += $obj->total_tva; } // Amount TTC - if (!empty($arrayfields['d.total_ttc']['checked'])) - { + if (!empty($arrayfields['d.total_ttc']['checked'])) { print ''.price($obj->total_ttc)."\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'd.total_ttc'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'd.total_ttc'; + } $totalarray['val']['d.total_ttc'] += $obj->total_ttc; } @@ -658,37 +761,43 @@ if ($resql) print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['d.date_create']['checked'])) - { + if (!empty($arrayfields['d.date_create']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_create), 'dayhour'); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['d.tms']['checked'])) - { + if (!empty($arrayfields['d.tms']['checked'])) { print ''; print dol_print_date($db->jdate($obj->date_modif), 'dayhour'); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['d.fk_statut']['checked'])) - { + if (!empty($arrayfields['d.fk_statut']['checked'])) { print ''.$expensereportstatic->getLibStatut(5).''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print ''; } print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; @@ -700,7 +809,11 @@ if ($resql) } } else { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print ''.$langs->trans("NoRecordFound").''; } @@ -718,10 +831,11 @@ if ($resql) print ''."\n"; - if (empty($id)) - { + if (empty($id)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index ebb66ce42fd..b0156c6a475 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -41,26 +41,29 @@ $childids = $user->getAllChildIds(1); // Security check $socid = 0; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); $object = new ExpenseReport($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); } $permissionnote = $user->rights->expensereport->creer; // Used by the include of actions_setnotes.inc.php -if ($object->id > 0) -{ +if ($object->id > 0) { // Check current user can read this expense report $canread = 0; - if (!empty($user->rights->expensereport->readall)) $canread = 1; - if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->expensereport->readall)) { + $canread = 1; + } + if (!empty($user->rights->expensereport->lire) && in_array($object->fk_user_author, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } @@ -82,8 +85,7 @@ llxHeader("", $title, $helpurl); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new ExpenseReport($db); $object->fetch($id, $ref); $object->info($object->id); diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 14c95f2d68a..7b86f295b5b 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -26,7 +26,9 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/expensereport/modules_expensereport.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; -if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +if (!empty($conf->banque->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'companies', 'trips')); @@ -36,16 +38,19 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // TODO Add rule to restrict access payment //$result = restrictedArea($user, 'facture', $id,''); $object = new PaymentExpenseReport($db); -if ($id > 0) -{ +if ($id > 0) { $result = $object->fetch($id); - if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); + if (!$result) { + dol_print_error($db, 'Failed to get payment id '.$id); + } } @@ -54,13 +59,11 @@ if ($id > 0) */ // Delete payment -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expensereport->supprimer) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expensereport->supprimer) { $db->begin(); $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { $db->commit(); header("Location: ".DOL_URL_ROOT."/expensereport/index.php"); exit; @@ -86,8 +89,7 @@ print dol_get_fiche_head($head, 'payment', $langs->trans("ExpenseReportPayment") /* * Confirm deleting of the payment */ -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2); } @@ -118,14 +120,11 @@ print ''.$langs->trans('Note').''.nl2 $disable_delete = 0; // Bank account -if (!empty($conf->banque->enabled)) -{ - if ($object->bank_account) - { +if (!empty($conf->banque->enabled)) { + if ($object->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); - if ($bankline->rappro) - { + if ($bankline->rappro) { $disable_delete = 1; $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment")); } @@ -163,12 +162,11 @@ $sql = 'SELECT er.rowid as eid, er.paid, er.total_ttc, per.amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'payment_expensereport as per,'.MAIN_DB_PREFIX.'expensereport as er'; $sql .= ' WHERE per.fk_expensereport = er.rowid'; $sql .= ' AND er.entity IN ('.getEntity('expensereport').')'; -$sql .= ' AND per.rowid = '.$id; +$sql .= ' AND per.rowid = '.((int) $id); dol_syslog("expensereport/payment/card.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -186,10 +184,8 @@ if ($resql) print ''.$langs->trans('Status').''; print "\n"; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); print ''; @@ -216,8 +212,7 @@ if ($resql) print "\n"; - if ($objp->paid == 1) // If at least one invoice is paid, disable delete - { + if ($objp->paid == 1) { // If at least one invoice is paid, disable delete $disable_delete = 2; $title_button = $langs->trans("CantRemovePaymentWithOneInvoicePaid"); } @@ -242,12 +237,9 @@ if ($resql) */ print '
    '; -if ($action == '') -{ - if ($user->rights->expensereport->supprimer) - { - if (!$disable_delete) - { +if ($action == '') { + if ($user->rights->expensereport->supprimer) { + if (!$disable_delete) { print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; diff --git a/htdocs/expensereport/payment/index.html b/htdocs/expensereport/payment/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index fdaeaf68977..b7057af86fc 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -36,11 +36,11 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $amounts = array(); $accountid = GETPOST('accountid', 'int'); +$cancel = GETPOST('cancel'); // Security check $socid = 0; -if ($user->socid > 0) -{ +if ($user->socid > 0) { $socid = $user->socid; } @@ -49,12 +49,10 @@ if ($user->socid > 0) * Actions */ -if ($action == 'add_payment') -{ +if ($action == 'add_payment') { $error = 0; - if ($_POST["cancel"]) - { + if ($cancel) { $loc = DOL_URL_ROOT.'/expensereport/card.php?id='.$id; header("Location: ".$loc); exit; @@ -62,53 +60,44 @@ if ($action == 'add_payment') $expensereport = new ExpenseReport($db); $result = $expensereport->fetch($id, $ref); - if (!$result) - { + if (!$result) { $error++; setEventMessages($expensereport->error, $expensereport->errors, 'errors'); } - $datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); - if (!($_POST["fk_typepayment"] > 0)) - { + if (!(GETPOST("fk_typepayment", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; } - if ($datepaid == '') - { + if ($datepaid == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !($accountid > 0)) - { + if (!empty($conf->banque->enabled) && !($accountid > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $paymentid = 0; $total = 0; // Read possible payments - foreach ($_POST as $key => $value) - { - if (substr($key, 0, 7) == 'amount_') - { + foreach ($_POST as $key => $value) { + if (substr($key, 0, 7) == 'amount_') { $amounts[$expensereport->fk_user_author] = price2num($_POST[$key]); $total += price2num($_POST[$key]); } } - if (count($amounts) <= 0) - { + if (count($amounts) <= 0) { $error++; $errmsg = 'ErrorNoPaymentDefined'; } - if (!$error) - { + if (!$error) { $db->begin(); // Create a line of payments @@ -121,21 +110,17 @@ if ($action == 'add_payment') $payment->num_payment = GETPOST("num_payment", 'alphanothtml'); $payment->note_public = GETPOST("note_public", 'restricthtml'); - if (!$error) - { + if (!$error) { $paymentid = $payment->create($user); - if ($paymentid < 0) - { + if ($paymentid < 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $result = $payment->addPaymentToBank($user, 'payment_expensereport', '(ExpenseReportPayment)', $accountid, '', ''); - if (!$result > 0) - { + if (!$result > 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } @@ -144,7 +129,7 @@ if ($action == 'add_payment') if (!$error) { $payment->fetch($paymentid); if ($expensereport->total_ttc - $payment->amount == 0) { - $result = $expensereport->set_paid($expensereport->id, $user); + $result = $expensereport->setPaid($expensereport->id, $user); if (!$result > 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; @@ -152,8 +137,7 @@ if ($action == 'add_payment') } } - if (!$error) - { + if (!$error) { $db->commit(); $loc = DOL_URL_ROOT.'/expensereport/card.php?id='.$id; header('Location: '.$loc); @@ -178,8 +162,7 @@ $form = new Form($db); // Form to create expense report payment -if ($action == 'create' || empty($action)) -{ +if ($action == 'create' || empty($action)) { $expensereport = new ExpenseReport($db); $expensereport->fetch($id, $ref); @@ -223,11 +206,10 @@ if ($action == 'create' || empty($action)) $sql = "SELECT sum(p.amount) as total"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p, ".MAIN_DB_PREFIX."expensereport as e"; - $sql .= " WHERE p.fk_expensereport = e.rowid AND p.fk_expensereport = ".$id; + $sql .= " WHERE p.fk_expensereport = e.rowid AND p.fk_expensereport = ".((int) $id); $sql .= ' AND e.entity IN ('.getEntity('expensereport').')'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $sumpaid = $obj->total; $db->free(); @@ -257,8 +239,7 @@ if ($action == 'create' || empty($action)) print "\n"; print ''; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print ''; print ''.$langs->trans('AccountToDebit').''; print ''; @@ -299,8 +280,7 @@ if ($action == 'create' || empty($action)) $total = 0; $totalrecu = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $expensereport; print ''; @@ -310,12 +290,12 @@ if ($action == 'create' || empty($action)) print ''.price($sumpaid).""; print ''.price($objp->total_ttc - $sumpaid).""; print ''; - if ($sumpaid < $objp->total_ttc) - { + if ($sumpaid < $objp->total_ttc) { $namef = "amount_".$objp->id; $nameRemain = "remain_".$objp->id; // autofill remainder amount - if (!empty($conf->use_javascript_ajax)) // autofill remainder amount + if (!empty($conf->use_javascript_ajax)) { // autofill remainder amount print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->total_ttc - $sumpaid)."'"); // autofill remainder amount + } $remaintopay = $objp->total_ttc - $sumpaid; // autofill remainder amount print ''; // autofill remainder amount print ''; @@ -331,8 +311,7 @@ if ($action == 'create' || empty($action)) $totalrecu += $objp->am; $i++; } - if ($i > 1) - { + if ($i > 1) { // Print total print ''; print ''.$langs->trans("Total").':'; diff --git a/htdocs/expensereport/stats/index.html b/htdocs/expensereport/stats/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index f3a3e263fa7..87bac2dde1a 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -38,16 +38,19 @@ $mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer'; $object_status = GETPOST('object_status', 'intcomma'); $userid = GETPOST('userid', 'int'); -$socid = GETPOST('socid', 'int'); if ($socid < 0) $socid = 0; +$socid = GETPOST('socid', 'int'); if ($socid < 0) { + $socid = 0; +} $id = GETPOST('id', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'expensereport', $id, ''); $nowyear = strftime("%Y", dol_now()); @@ -75,7 +78,9 @@ print load_fiche_titre($title, '', 'trip'); dol_mkdir($dir); $stats = new ExpenseReportStats($db, $socid, $userid); -if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND e.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; +if ($object_status != '' && $object_status >= -1) { + $stats->where .= ' AND e.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; +} // Build graphic number of object // $data = array(array('Lib',val1,val2,val3),...) @@ -88,12 +93,10 @@ $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=tripsexpensesstats&file $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -120,12 +123,10 @@ $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=tripsexpensesstats& $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -146,25 +147,30 @@ if (!$mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) -{ +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'; + 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 { $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'; + 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'; + } } $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -189,7 +195,9 @@ $arrayyears = array(); foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; @@ -223,7 +231,9 @@ print ''; // User print ''.$langs->trans("User").''; $include = ''; -if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $include = 'hierarchy'; +if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) { + $include = 'hierarchy'; +} print $form->select_dolusers($userid, 'userid', 1, '', 0, $include, '', 0, 0, 0, '', 0, '', 'maxwidth300'); print ''; // Status @@ -235,7 +245,9 @@ print ''; print ''; print $form->textwithpicto($langs->trans("Year"), $langs->trans("DateValidation")); print ''; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print ''; @@ -254,11 +266,9 @@ print ''.$langs->trans("AmountAverage").''; print ''; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while ($year && $oldyear > $year + 1) - { // If we have empty year + while ($year && $oldyear > $year + 1) { // If we have empty year $oldyear--; print ''; @@ -287,7 +297,9 @@ print '
    '; // Show graphs print ''; diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index 04bb2a71990..640f4c17b5d 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -1,7 +1,6 @@ global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) -{ +if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print ''."\n"; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -12,23 +11,20 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) $nbFiles = count($arrayoffiles); $nbLinks = Link::count($db, $object->element, $object->id); - if ($nbFiles > 0) - { + if ($nbFiles > 0) { print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; print ' > - - + + "; diff --git a/htdocs/exports/class/index.html b/htdocs/exports/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index c80ee4d248f..b3d0cf49a32 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -54,14 +54,14 @@ $entitytoicon = array( 'subscription' => 'payment', 'payment' => 'payment', 'tax' => 'generic', - 'tax_type' => 'generic', - 'other' => 'generic', + 'tax_type' => 'generic', + 'other' => 'generic', 'account' => 'account', 'product' => 'product', 'virtualproduct'=>'product', 'subproduct' => 'product', 'product_supplier_ref' => 'product', - 'stock' => 'stock', + 'stock' => 'stock', 'warehouse' => 'stock', 'batch' => 'stock', 'stockbatch' => 'stock', @@ -154,22 +154,24 @@ $upload_dir = $conf->export->dir_temp.'/'.$user->id; //$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1); $usefilters = 1; +// Security check +$result = restrictedArea($user, 'export'); + /* * Actions */ -if ($action == 'selectfield') // Selection of field at step 2 -{ +if ($action == 'selectfield') { // Selection of field at step 2 $fieldsarray = $objexport->array_export_fields[0]; $fieldsentitiesarray = $objexport->array_export_entities[0]; $fieldsdependenciesarray = $objexport->array_export_dependencies[0]; - if ($field == 'all') - { - foreach ($fieldsarray as $key=>$val) - { - if (!empty($array_selected[$key])) continue; // If already selected, check next + if ($field == 'all') { + foreach ($fieldsarray as $key => $val) { + if (!empty($array_selected[$key])) { + continue; // If already selected, check next + } $array_selected[$key] = count($array_selected) + 1; //print_r($array_selected); $_SESSION["export_selected_fields"] = $array_selected; @@ -180,29 +182,30 @@ if ($action == 'selectfield') // Selection of field at step 2 $array_selected[$field] = count($array_selected) + 1; // We tag the key $field as "selected" // We check if there is a dependency to activate /*var_dump($field); - var_dump($fieldsentitiesarray[$field]); - var_dump($fieldsdependenciesarray);*/ + var_dump($fieldsentitiesarray[$field]); + var_dump($fieldsdependenciesarray);*/ $listofdependencies = array(); - if (!empty($fieldsentitiesarray[$field]) && !empty($fieldsdependenciesarray[$fieldsentitiesarray[$field]])) - { + if (!empty($fieldsentitiesarray[$field]) && !empty($fieldsdependenciesarray[$fieldsentitiesarray[$field]])) { // We found a dependency on the type of field $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])) - { + if (is_array($tmp)) { + $listofdependencies = $tmp; + } else { + $listofdependencies = array($tmp); + } + } 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')) - if (is_array($tmp)) $listofdependencies = $tmp; - else $listofdependencies = array($tmp); + if (is_array($tmp)) { + $listofdependencies = $tmp; + } else { + $listofdependencies = array($tmp); + } } - if (count($listofdependencies)) - { - foreach ($listofdependencies as $fieldid) - { - if (empty($array_selected[$fieldid])) - { + if (count($listofdependencies)) { + foreach ($listofdependencies as $fieldid) { + if (empty($array_selected[$fieldid])) { $array_selected[$fieldid] = count($array_selected) + 1; // We tag the key $fieldid as "selected" $warnings[] = $langs->trans("ExportFieldAutomaticallyAdded", $langs->transnoentitiesnoconv($fieldsarray[$fieldid])); } @@ -214,10 +217,8 @@ if ($action == 'selectfield') // Selection of field at step 2 setEventMessages($warnings, null, 'warnings'); } } -if ($action == 'unselectfield') -{ - if ($_GET["field"] == 'all') - { +if ($action == 'unselectfield') { + if ($_GET["field"] == 'all') { $array_selected = array(); $_SESSION["export_selected_fields"] = $array_selected; } else { @@ -226,8 +227,7 @@ if ($action == 'unselectfield') asort($array_selected); $i = 0; $array_selected_save = $array_selected; - foreach ($array_selected as $code=>$value) - { + foreach ($array_selected as $code => $value) { $i++; $array_selected[$code] = $i; //print "x $code x $i y
    "; @@ -236,52 +236,48 @@ if ($action == 'unselectfield') } } -if ($action == 'downfield' || $action == 'upfield') -{ +if ($action == 'downfield' || $action == 'upfield') { $pos = $array_selected[$_GET["field"]]; - if ($action == 'downfield') $newpos = $pos + 1; - if ($action == 'upfield') $newpos = $pos - 1; + if ($action == 'downfield') { + $newpos = $pos + 1; + } + if ($action == 'upfield') { + $newpos = $pos - 1; + } // Recherche code avec qui switcher $newcode = ""; - foreach ($array_selected as $code=>$value) - { - if ($value == $newpos) - { + foreach ($array_selected as $code => $value) { + if ($value == $newpos) { $newcode = $code; break; } } //print("Switch pos=$pos (code=".$_GET["field"].") and newpos=$newpos (code=$newcode)"); - if ($newcode) // Si newcode trouve (protection contre resoumission de page) - { + if ($newcode) { // Si newcode trouve (protection contre resoumission de page) $array_selected[$_GET["field"]] = $newpos; $array_selected[$newcode] = $pos; $_SESSION["export_selected_fields"] = $array_selected; } } -if ($step == 1 || $action == 'cleanselect') -{ +if ($step == 1 || $action == 'cleanselect') { $_SESSION["export_selected_fields"] = array(); $_SESSION["export_filtered_fields"] = array(); $array_selected = array(); $array_filtervalue = array(); } -if ($action == 'builddoc') -{ +if ($action == 'builddoc') { $max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined $max_time = @ini_get("max_execution_time"); - if ($max_time && $max_time < $max_execution_time_for_importexport) - { + if ($max_time && $max_time < $max_execution_time_for_importexport) { dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 } // Build export file $result = $objexport->build_file($user, GETPOST('model', 'alpha'), $datatoexport, $array_selected, $array_filtervalue); - if ($result < 0) - { + if ($result < 0) { setEventMessages($objexport->error, $objexport->errors, 'errors'); $sqlusedforexport = $objexport->sqlusedforexport; } else { @@ -291,47 +287,46 @@ if ($action == 'builddoc') } // Delete file -if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes') -{ +if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes') { $file = $upload_dir."/".GETPOST('file'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret = dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + } header('Location: '.$_SERVER["PHP_SELF"].'?step='.$step.'&datatoexport='.$datatoexport); exit; } -if ($action == 'deleteprof') -{ - if (GETPOST("id", 'int')) - { +if ($action == 'deleteprof') { + if (GETPOST("id", 'int')) { $objexport->fetch(GETPOST('id', 'int')); $result = $objexport->delete($user); } } // TODO The export for filter is not yet implemented (old code created conflicts with step 2). We must use same way of working and same combo list of predefined export than step 2. -if ($action == 'add_export_model') -{ - if ($export_name) - { +if ($action == 'add_export_model') { + if ($export_name) { asort($array_selected); // Set save string $hexa = ''; - foreach ($array_selected as $key=>$val) - { - if ($hexa) $hexa .= ','; + foreach ($array_selected as $key => $val) { + if ($hexa) { + $hexa .= ','; + } $hexa .= $key; } $hexafiltervalue = ''; - if (!empty($array_filtervalue) && is_array($array_filtervalue)) - { - foreach ($array_filtervalue as $key=>$val) - { - if ($hexafiltervalue) $hexafiltervalue .= ','; + if (!empty($array_filtervalue) && is_array($array_filtervalue)) { + foreach ($array_filtervalue as $key => $val) { + if ($hexafiltervalue) { + $hexafiltervalue .= ','; + } $hexafiltervalue .= $key.'='.$val; } } @@ -342,14 +337,15 @@ if ($action == 'add_export_model') $objexport->hexafiltervalue = $hexafiltervalue; $result = $objexport->create($user); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("ExportModelSaved", $objexport->model_name), null, 'mesgs'); } else { $langs->load("errors"); - if ($objexport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') + 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 { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportModelName")), null, 'errors'); @@ -357,8 +353,7 @@ if ($action == 'add_export_model') } // Reload a predefined export model -if ($step == 2 && $action == 'select_model') -{ +if ($step == 2 && $action == 'select_model') { $_SESSION["export_selected_fields"] = array(); $_SESSION["export_filtered_fields"] = array(); @@ -366,12 +361,10 @@ if ($step == 2 && $action == 'select_model') $array_filtervalue = array(); $result = $objexport->fetch($exportmodelid); - if ($result > 0) - { + if ($result > 0) { $fieldsarray = preg_split("/,(?! [^(]*\))/", $objexport->hexa); $i = 1; - foreach ($fieldsarray as $val) - { + foreach ($fieldsarray as $val) { $array_selected[$val] = $i; $i++; } @@ -379,8 +372,7 @@ if ($step == 2 && $action == 'select_model') $fieldsarrayvalue = explode(',', $objexport->hexafiltervalue); $i = 1; - foreach ($fieldsarrayvalue as $val) - { + foreach ($fieldsarrayvalue as $val) { $tmp = explode('=', $val); $array_filtervalue[$tmp[0]] = $tmp[1]; $i++; @@ -390,21 +382,20 @@ if ($step == 2 && $action == 'select_model') } // Get form with filters -if ($step == 4 && $action == 'submitFormField') -{ +if ($step == 4 && $action == 'submitFormField') { // on boucle sur les champs selectionne pour recuperer la valeur - if (is_array($objexport->array_export_TypeFields[0])) - { + if (is_array($objexport->array_export_TypeFields[0])) { $_SESSION["export_filtered_fields"] = array(); - foreach ($objexport->array_export_TypeFields[0] as $code => $type) // $code: s.fieldname $value: Text|Boolean|List:ccc - { + foreach ($objexport->array_export_TypeFields[0] as $code => $type) { // $code: s.fieldname $value: Text|Boolean|List:ccc $newcode = (string) preg_replace('/\./', '_', $code); //print 'xxx'.$code."=".$newcode."=".$type."=".$_POST[$newcode]."\n
    "; $filterqualified = 1; - if (!GETPOSTISSET($newcode) || GETPOST($newcode, 'restricthtml') == '') $filterqualified = 0; - elseif (preg_match('/^List/', $type) && (is_numeric(GETPOST($newcode, 'restricthtml')) && GETPOST($newcode, 'restricthtml') <= 0)) $filterqualified = 0; - if ($filterqualified) - { + if (!GETPOSTISSET($newcode) || GETPOST($newcode, 'restricthtml') == '') { + $filterqualified = 0; + } elseif (preg_match('/^List/', $type) && (is_numeric(GETPOST($newcode, 'restricthtml')) && GETPOST($newcode, 'restricthtml') <= 0)) { + $filterqualified = 0; + } + if ($filterqualified) { //print 'Filter on '.$newcode.' type='.$type.' value='.$_POST[$newcode]."\n"; $objexport->array_export_FilterValue[0][$code] = GETPOST($newcode, 'restricthtml'); } @@ -419,8 +410,7 @@ if ($step == 4 && $action == 'submitFormField') * View */ -if ($step == 1 || !$datatoexport) -{ +if ($step == 1 || !$datatoexport) { llxHeader('', $langs->trans("NewExport"), 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'); $h = 0; @@ -443,13 +433,11 @@ if ($step == 1 || !$datatoexport) print ''; print ''; - if (count($objexport->array_export_module)) - { + if (count($objexport->array_export_module)) { asort($objexport->array_export_code_for_sort); //var_dump($objexport->array_export_code_for_sort); //$sortedarrayofmodules = dol_sort_array($objexport->array_export_module, 'module_position', 'asc', 0, 0, 1); - foreach ($objexport->array_export_code_for_sort as $key => $value) - { + foreach ($objexport->array_export_code_for_sort as $key => $value) { print ''; + print ''; } } else { print ''; @@ -477,8 +465,7 @@ if ($step == 1 || !$datatoexport) print ''; } -if ($step == 2 && $datatoexport) -{ +if ($step == 2 && $datatoexport) { llxHeader('', $langs->trans("NewExport"), 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'); $h = 0; @@ -505,14 +492,14 @@ if ($step == 2 && $datatoexport) print $objexport->array_export_module[0]->getName(); print ''; - // Lot de donnees a exporter - print ''; - print ''; + // Lot de donnees a exporter + 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/expensereport/tpl/expensereport_addfile.tpl.php b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php index 9b2cd49faec..c27136ebd38 100644 --- a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php @@ -9,11 +9,9 @@ $permission = $user->rights->expensereport->creer; // We define var to enable the feature to add prefix of uploaded files $savingdocmask = ''; -if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) -{ +if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) { //var_dump($modulepart); - if (in_array($modulepart, array('facture_fournisseur', 'commande_fournisseur', 'facture', 'commande', 'propal', 'supplier_proposal', 'ficheinter', 'contract', 'expedition', 'project', 'project_task', 'expensereport', 'tax', 'produit', 'product_batch'))) - { + if (in_array($modulepart, array('facture_fournisseur', 'commande_fournisseur', 'facture', 'commande', 'propal', 'supplier_proposal', 'ficheinter', 'contract', 'expedition', 'project', 'project_task', 'expensereport', 'tax', 'produit', 'product_batch'))) { $savingdocmask = dol_sanitizeFileName($object->ref).'-__file__'; } } @@ -35,6 +33,6 @@ $formfile->form_attach_new_file( 'accept', '', 1 - ); +); print '
    '; //print ''.$langs->trans("AttachTheNewLineToTheDocument").'
    '; $modulepart = 'expensereport'; $maxheightmini = 48; $relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/'; $filei = 0; - foreach ($arrayoffiles as $file) - { + foreach ($arrayoffiles as $file) { $urlforhref = array(); $filei++; print '
    '; $fileinfo = pathinfo($file['fullname']); - if (image_format_supported($file['name']) > 0) - { + if (image_format_supported($file['name']) > 0) { $minifile = getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case however) than original //print $file['path'].'/'.$minifile.'
    '; $urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); @@ -46,8 +42,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) $error = 0; $thumbshown = ''; - if (preg_match('/\.pdf$/i', $file['name'])) - { + if (preg_match('/\.pdf$/i', $file['name'])) { $urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); $filepdf = $conf->expensereport->dir_output.'/'.$relativepath.$file['name']; @@ -56,27 +51,26 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) $pdfexists = file_exists($filepdf); - if ($pdfexists) - { + if ($pdfexists) { // Conversion du PDF en image png si fichier png non existant - if (!file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) - { - if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here. - { + if (!file_exists($fileimage) || (filemtime($fileimage) < filemtime($filepdf))) { + if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) { // If you experience trouble with pdf thumb generation and imagick, you can disable here. include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $ret = dol_convert_file($filepdf, 'png', $fileimage, '0'); // Convert first page of PDF into a file _preview.png - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } } } - if ($pdfexists && !$error) - { + if ($pdfexists && !$error) { $heightforphotref = 70; - if (!empty($conf->dol_optimize_smallscreen)) $heightforphotref = 60; + if (!empty($conf->dol_optimize_smallscreen)) { + $heightforphotref = 60; + } // If the preview file is found - if (file_exists($fileimage)) - { + if (file_exists($fileimage)) { $thumbshown = ''; } } @@ -98,10 +92,8 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) //var_dump(GETPOST($file['relativename'])); var_dump($file['relativename']); var_dump($_FILES['userfile']['name']); // If a file was just uploaded, we check to preselect it if (is_array($_FILES['userfile']['name'])) { - foreach ($_FILES['userfile']['name'] as $tmpfile) - { - if ($file['relativename'] == (GETPOST('savingdocmask', 'alpha') ? dol_sanitizeFileName($object->ref.'-') : '').$tmpfile) - { + foreach ($_FILES['userfile']['name'] as $tmpfile) { + if ($file['relativename'] == (GETPOST('savingdocmask', 'alpha') ? dol_sanitizeFileName($object->ref.'-') : '').$tmpfile) { $checked = ' checked'; break; } elseif ($file['relativename'] && in_array($file['relativename'], GETPOST('attachfile', 'array'))) { @@ -111,8 +103,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) } } // If we edit a line already linked, then $filenamelinked is defined to the filename (without path) of linked file - if (!empty($filenamelinked) && $filenamelinked == $file['relativename']) - { + if (!empty($filenamelinked) && $filenamelinked == $file['relativename']) { $checked = ' checked'; } print '
    '; diff --git a/htdocs/expensereport/tpl/index.html b/htdocs/expensereport/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php index a0ef7c353c6..31c5526903b 100644 --- a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -18,8 +18,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; } @@ -35,13 +34,12 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $var = true; $total = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { ?>
    trans("ExpenseReport"); ?>getNomUrl(1); ?>getNomUrl(1); ?> date_debut, 'day'); ?> rights->expensereport->lire) { diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index e4725db3946..8c1bf9642b1 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -96,50 +96,49 @@ class Export $modulesdir = dolGetModulesDirs(); - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { // Search available exports $handle = @opendir(dol_osencode($dir)); - if (is_resource($handle)) - { + if (is_resource($handle)) { // Search module files - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { $reg = array(); - if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) - { + if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) { $modulename = $reg[1]; // Defined if module is enabled $enabled = true; $part = strtolower(preg_replace('/^mod/i', '', $modulename)); - if ($part == 'propale') $part = 'propal'; - if (empty($conf->$part->enabled)) $enabled = false; + if ($part == 'propale') { + $part = 'propal'; + } + if (empty($conf->$part->enabled)) { + $enabled = false; + } - if ($enabled) - { + if ($enabled) { // Loading Class $file = $dir.$modulename.".class.php"; $classname = $modulename; require_once $file; $module = new $classname($this->db); - if (isset($module->export_code) && is_array($module->export_code)) - { - foreach ($module->export_code as $r => $value) - { + if (isset($module->export_code) && is_array($module->export_code)) { + foreach ($module->export_code as $r => $value) { //print $i.'-'.$filter.'-'.$modulename.'-'.join(',',$module->export_code).'
    '; - if ($filter && ($filter != $module->export_code[$r])) continue; + if ($filter && ($filter != $module->export_code[$r])) { + continue; + } // Test if condition to show are ok - if (!empty($module->export_enabled[$r]) && !verifCond($module->export_enabled[$r])) continue; + if (!empty($module->export_enabled[$r]) && !verifCond($module->export_enabled[$r])) { + continue; + } // Test if permissions are ok $bool = true; - if (isset($module->export_permission)) - { - foreach ($module->export_permission[$r] as $val) - { + if (isset($module->export_permission)) { + foreach ($module->export_permission[$r] as $val) { $perm = $val; //print_r("$perm[0]-$perm[1]-$perm[2]
    "); if (!empty($perm[2])) { @@ -147,8 +146,12 @@ class Export } else { $bool = isset($user->rights->{$perm[0]}->{$perm[1]}) ? $user->rights->{$perm[0]}->{$perm[1]} : false; } - if ($perm[0] == 'user' && $user->admin) $bool = true; - if (!$bool) break; + if ($perm[0] == 'user' && $user->admin) { + $bool = true; + } + if (!$bool) { + break; + } } } //print $bool." $perm[0]"."
    "; @@ -158,10 +161,8 @@ class Export // { // Charge fichier lang en rapport $langtoload = $module->getLangFilesArray(); - if (is_array($langtoload)) - { - foreach ($langtoload as $key) - { + if (is_array($langtoload)) { + foreach ($langtoload as $key) { $langs->load($key); } } @@ -234,12 +235,18 @@ class Export $i = 0; //print_r($array_selected); - foreach ($this->array_export_fields[$indice] as $key => $value) - { - if (!array_key_exists($key, $array_selected)) continue; // Field not selected - if (preg_match('/^none\./', $key)) continue; // A field that must not appears into SQL - if ($i > 0) $sql .= ', '; - else $i++; + foreach ($this->array_export_fields[$indice] as $key => $value) { + if (!array_key_exists($key, $array_selected)) { + continue; // Field not selected + } + if (preg_match('/^none\./', $key)) { + continue; // A field that must not appears into SQL + } + if ($i > 0) { + $sql .= ', '; + } else { + $i++; + } if (strpos($key, ' as ') === false) { $newfield = $key.' as '.str_replace(array('.', '-', '(', ')'), '_', $key); @@ -252,14 +259,16 @@ class Export $sql .= $this->array_export_sql_end[$indice]; // Add the WHERE part. Filtering into sql if a filtering array is provided - if (is_array($array_filterValue) && !empty($array_filterValue)) - { + if (is_array($array_filterValue) && !empty($array_filterValue)) { $sqlWhere = ''; // Loop on each condition to add - foreach ($array_filterValue as $key => $value) - { - if (preg_match('/GROUP_CONCAT/i', $key)) continue; - if ($value != '') $sqlWhere .= " and ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]); + foreach ($array_filterValue as $key => $value) { + if (preg_match('/GROUP_CONCAT/i', $key)) { + continue; + } + if ($value != '') { + $sqlWhere .= " and ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]); + } } $sql .= $sqlWhere; } @@ -268,12 +277,12 @@ class Export $sql .= $this->array_export_sql_order[$indice]; // Add the HAVING part. - if (is_array($array_filterValue) && !empty($array_filterValue)) - { + if (is_array($array_filterValue) && !empty($array_filterValue)) { // Loop on each condition to add - foreach ($array_filterValue as $key => $value) - { - if (preg_match('/GROUP_CONCAT/i', $key) and $value != '') $sql .= " HAVING ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]); + foreach ($array_filterValue as $key => $value) { + if (preg_match('/GROUP_CONCAT/i', $key) and $value != '') { + $sql .= " HAVING ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]); + } } } @@ -297,37 +306,41 @@ class Export // build the input field on depend of the type of file switch ($InfoFieldList[0]) { case 'Text': - if (!(strpos($ValueField, '%') === false)) + if (!(strpos($ValueField, '%') === false)) { $szFilterQuery .= " ".$NameField." LIKE '".$ValueField."'"; - else $szFilterQuery .= " ".$NameField." = '".$ValueField."'"; + } else { + $szFilterQuery .= " ".$NameField." = '".$ValueField."'"; + } break; case 'Date': - if (strpos($ValueField, "+") > 0) - { + if (strpos($ValueField, "+") > 0) { // mode plage $ValueArray = explode("+", $ValueField); $szFilterQuery = "(".$this->conditionDate($NameField, trim($ValueArray[0]), ">="); $szFilterQuery .= " AND ".$this->conditionDate($NameField, trim($ValueArray[1]), "<=").")"; } else { - if (is_numeric(substr($ValueField, 0, 1))) + 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': break; case 'Numeric': // si le signe - - if (strpos($ValueField, "+") > 0) - { + if (strpos($ValueField, "+") > 0) { // mode plage $ValueArray = explode("+", $ValueField); $szFilterQuery = "(".$NameField.">=".$ValueArray[0]; $szFilterQuery .= " AND ".$NameField."<=".$ValueArray[1].")"; } else { - if (is_numeric(substr($ValueField, 0, 1))) + 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': @@ -335,12 +348,14 @@ class Export break; case 'Status': case 'List': - if (is_numeric($ValueField)) + if (is_numeric($ValueField)) { $szFilterQuery = " ".$NameField."=".$ValueField; - else { - if (!(strpos($ValueField, '%') === false)) + } else { + if (!(strpos($ValueField, '%') === false)) { $szFilterQuery = " ".$NameField." LIKE '".$ValueField."'"; - else $szFilterQuery = " ".$NameField." = '".$ValueField."'"; + } else { + $szFilterQuery = " ".$NameField." = '".$ValueField."'"; + } } break; default: @@ -361,9 +376,13 @@ class Export public function conditionDate($Field, $Value, $Sens) { // 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; + 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; + } return $Condition; } @@ -385,8 +404,7 @@ class Export $InfoFieldList = explode(":", $TypeField); // build the input field on depend of the type of file - switch ($InfoFieldList[0]) - { + switch ($InfoFieldList[0]) { case 'Text': case 'Date': $szFilterField = ''; @@ -403,15 +421,21 @@ class Export case 'Boolean': $szFilterField = '"; break; @@ -422,51 +446,50 @@ class Export // 3 : Name of field with key (if it is not "rowid"). Used this field as key for combo list. // 4 : Name of element for getEntity(). - if (!empty($InfoFieldList[3])) + 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'; + 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'; + } $sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[1]; if (!empty($InfoFieldList[4])) { $sql .= ' WHERE entity IN ('.getEntity($InfoFieldList[4]).')'; } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $szFilterField = '"; $this->db->free($resql); - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } break; } @@ -542,8 +567,7 @@ class Export dol_syslog(__METHOD__." ".$model.", ".$datatoexport.", ".implode(",", $array_selected)); // Check parameters or context properties - if (empty($this->array_export_fields) || !is_array($this->array_export_fields)) - { + if (empty($this->array_export_fields) || !is_array($this->array_export_fields)) { $this->error = "ErrorBadParameter"; dol_syslog($this->error, LOG_ERR); return -1; @@ -556,22 +580,20 @@ class Export require_once $dir.$file; $objmodel = new $classname($this->db); - if (!empty($sqlquery)) $sql = $sqlquery; - else { + if (!empty($sqlquery)) { + $sql = $sqlquery; + } else { // Define value for indice from $datatoexport $foundindice = 0; - foreach ($this->array_export_code as $key => $dataset) - { - if ($datatoexport == $dataset) - { + foreach ($this->array_export_code as $key => $dataset) { + if ($datatoexport == $dataset) { $indice = $key; $foundindice++; //print "Found indice = ".$indice." for dataset=".$datatoexport."\n"; break; } } - if (empty($foundindice)) - { + if (empty($foundindice)) { $this->error = "ErrorBadParameter can't find dataset ".$datatoexport." into preload arrays this->array_export_code"; return -1; } @@ -582,13 +604,11 @@ class Export $this->sqlusedforexport = $sql; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { //$this->array_export_label[$indice] if (!empty($conf->global->EXPORT_PREFIX_SPEC)) { $filename = $conf->global->EXPORT_PREFIX_SPEC."_".$datatoexport; - } - else { + } else { $filename = "export_".$datatoexport; } $filename .= '.'.$objmodel->getDriverExtension(); @@ -600,55 +620,48 @@ class Export dol_mkdir($dirname); $result = $objmodel->open_file($dirname."/".$filename, $outputlangs); - if ($result >= 0) - { + if ($result >= 0) { // Genere en-tete $objmodel->write_header($outputlangs); // Genere ligne de titre $objmodel->write_title($this->array_export_fields[$indice], $array_selected, $outputlangs, isset($this->array_export_TypeFields[$indice]) ? $this->array_export_TypeFields[$indice] : null); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { // Process special operations - if (!empty($this->array_export_special[$indice])) - { - foreach ($this->array_export_special[$indice] as $key => $value) - { - if (!array_key_exists($key, $array_selected)) continue; // Field not selected + if (!empty($this->array_export_special[$indice])) { + foreach ($this->array_export_special[$indice] as $key => $value) { + if (!array_key_exists($key, $array_selected)) { + continue; // Field not selected + } // Operation NULLIFNEG - if ($this->array_export_special[$indice][$key] == 'NULLIFNEG') - { + if ($this->array_export_special[$indice][$key] == 'NULLIFNEG') { //$alias=$this->array_export_alias[$indice][$key]; $alias = str_replace(array('.', '-', '(', ')'), '_', $key); - if ($obj->$alias < 0) $obj->$alias = ''; - } - // Operation ZEROIFNEG - elseif ($this->array_export_special[$indice][$key] == 'ZEROIFNEG') - { + if ($obj->$alias < 0) { + $obj->$alias = ''; + } + } elseif ($this->array_export_special[$indice][$key] == 'ZEROIFNEG') { + // Operation ZEROIFNEG //$alias=$this->array_export_alias[$indice][$key]; $alias = str_replace(array('.', '-', '(', ')'), '_', $key); - if ($obj->$alias < 0) $obj->$alias = '0'; - } - // Operation GETNUMOPENDAYS (for Holiday module) - elseif ($this->array_export_special[$indice][$key] == 'getNumOpenDays') - { + if ($obj->$alias < 0) { + $obj->$alias = '0'; + } + } elseif ($this->array_export_special[$indice][$key] == 'getNumOpenDays') { + // Operation GETNUMOPENDAYS (for Holiday module) include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; //$alias=$this->array_export_alias[$indice][$key]; $alias = str_replace(array('.', '-', '(', ')'), '_', $key); $obj->$alias = num_open_day(dol_stringtotime($obj->d_date_debut, 1), dol_stringtotime($obj->d_date_fin, 1), 0, 1, $obj->d_halfday, $mysoc->country_code); - } - // Operation INVOICEREMAINTOPAY - elseif ($this->array_export_special[$indice][$key] == 'getRemainToPay') - { + } elseif ($this->array_export_special[$indice][$key] == 'getRemainToPay') { + // Operation INVOICEREMAINTOPAY //$alias=$this->array_export_alias[$indice][$key]; $alias = str_replace(array('.', '-', '(', ')'), '_', $key); $remaintopay = ''; - if ($obj->f_rowid > 0) - { + if ($obj->f_rowid > 0) { global $tmpobjforcomputecall; - if (!is_object($tmpobjforcomputecall)) - { + if (!is_object($tmpobjforcomputecall)) { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $tmpobjforcomputecall = new Facture($this->db); } @@ -725,8 +738,7 @@ class Export dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -751,11 +763,9 @@ class Export dol_syslog("Export::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { $this->id = $obj->rowid; $this->model_name = $obj->label; $this->datatoexport = $obj->type; @@ -788,19 +798,19 @@ class Export $error = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."export_model"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -829,12 +839,10 @@ class Export $sql .= " ORDER BY rowid"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $keyModel = array_search($obj->type, $this->array_export_code); print "
     
    '; //print img_object($objexport->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' '; print $objexport->array_export_module[$key]->getName(); @@ -464,9 +452,9 @@ if ($step == 1 || !$datatoexport) if ($objexport->array_export_perms[$key]) { print ''.img_picto($langs->trans("NewExport"), 'next', 'class="fa-15x"').''; } else { - print $langs->trans("NotEnoughPermissions"); + print ''.$langs->trans("NotEnoughPermissions").''; } - print '
    '.$langs->trans("NoExportableData").'
    '.$langs->trans("DatasetToExport").''; - $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); - print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; - print $objexport->array_export_label[0]; - print '
    '.$langs->trans("DatasetToExport").''; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; + print $objexport->array_export_label[0]; + print '
    '; print '
    '; @@ -568,8 +555,7 @@ if ($step == 2 && $datatoexport) $i = 0; - foreach ($fieldsarray as $code=>$label) - { + foreach ($fieldsarray as $code => $label) { print ''; $i++; @@ -583,8 +569,7 @@ if ($step == 2 && $datatoexport) //print $code.'-'.$label.'-'.$entity; $tmparray = explode(':', $entityicon); - if (count($tmparray) >= 2) - { + if (count($tmparray) >= 2) { $entityicon = $tmparray[0]; $entitylang = $tmparray[1]; } @@ -595,27 +580,22 @@ if ($step == 2 && $datatoexport) $tablename = getablenamefromfield($code, $sqlmaxforexport); $htmltext = ''.$langs->trans("Name").": ".$text.'
    '; - if (!empty($objexport->array_export_special[0][$code])) - { + if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
    "; } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
    "; } - if (!empty($objexport->array_export_examplevalues[0][$code])) - { + if (!empty($objexport->array_export_examplevalues[0][$code])) { $htmltext .= ''.$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].'
    '; } - if (!empty($objexport->array_export_TypeFields[0][$code])) - { + if (!empty($objexport->array_export_TypeFields[0][$code])) { $htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].'
    '; } - if (!empty($objexport->array_export_help[0][$code])) - { + if (!empty($objexport->array_export_help[0][$code])) { $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).'
    '; } - if (isset($array_selected[$code]) && $array_selected[$code]) - { + if (isset($array_selected[$code]) && $array_selected[$code]) { // Selected fields print ' '; print ''.img_left('default', 0, 'style="max-width: 20px"').''; @@ -642,15 +622,13 @@ if ($step == 2 && $datatoexport) print '
    '; /* - * Barre d'action - */ + * Action bar + */ print '
    '; - if (count($array_selected)) - { + if (count($array_selected)) { // If filters exist - if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) - { + if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { print ''.$langs->trans("NextStep").''; } else { print ''.$langs->trans("NextStep").''; @@ -662,10 +640,8 @@ if ($step == 2 && $datatoexport) print '
    '; } -if ($step == 3 && $datatoexport) -{ - if (count($array_selected) < 1) // This occurs when going back to page after sessecion expired - { +if ($step == 3 && $datatoexport) { + if (count($array_selected) < 1) { // This occurs when going back to page after sessecion expired // Switch to step 2 header("Location: ".DOL_URL_ROOT.'/exports/export.php?step=2&datatoexport='.$datatoexport); exit; @@ -713,8 +689,7 @@ if ($step == 3 && $datatoexport) // Nbre champs exportes print ''.$langs->trans("ExportedFields").''; $list = ''; - foreach ($array_selected as $code=>$value) - { + foreach ($array_selected as $code => $value) { $list .= (!empty($list) ? ', ' : ''); $list .= (isset($objexport->array_export_fields[0][$code]) ? $langs->trans($objexport->array_export_fields[0][$code]) : ''); } @@ -755,8 +730,7 @@ if ($step == 3 && $datatoexport) $i = 0; // on boucle sur les champs - foreach ($fieldsarray as $code => $label) - { + foreach ($fieldsarray as $code => $label) { print ''; $i++; @@ -767,8 +741,7 @@ if ($step == 3 && $datatoexport) print ''; // If value of entityicon=entitylang='icon:Label' $tmparray = explode(':', $entityicon); - if (count($tmparray) >= 2) - { + if (count($tmparray) >= 2) { $entityicon = $tmparray[0]; $entitylang = $tmparray[1]; } @@ -782,22 +755,18 @@ if ($step == 3 && $datatoexport) $tablename = getablenamefromfield($code, $sqlmaxforexport); $htmltext = ''.$langs->trans("Name").': '.$text.'
    '; - if (!empty($objexport->array_export_special[0][$code])) - { + if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
    "; } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
    "; } - if (!empty($objexport->array_export_examplevalues[0][$code])) - { + if (!empty($objexport->array_export_examplevalues[0][$code])) { $htmltext .= ''.$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].'
    '; } - if (!empty($objexport->array_export_TypeFields[0][$code])) - { + if (!empty($objexport->array_export_TypeFields[0][$code])) { $htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].'
    '; } - if (!empty($objexport->array_export_help[0][$code])) - { + if (!empty($objexport->array_export_help[0][$code])) { $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).'
    '; } @@ -807,11 +776,9 @@ if ($step == 3 && $datatoexport) // Filter value print ''; - if (!empty($Typefieldsarray[$code])) // Example: Text, List:c_country:label:rowid, Number, Boolean - { + if (!empty($Typefieldsarray[$code])) { // Example: Text, List:c_country:label:rowid, Number, Boolean $szInfoFiltre = $objexport->genDocFilter($Typefieldsarray[$code]); - if ($szInfoFiltre) // Is there an info help for this filter ? - { + if ($szInfoFiltre) { // Is there an info help for this filter ? $tmp = $objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter); print $form->textwithpicto($tmp, $szInfoFiltre); } else { @@ -829,7 +796,7 @@ if ($step == 3 && $datatoexport) print '
    '; /* - * Barre d'action + * Action bar */ print '
    '; // il n'est pas obligatoire de filtrer les champs @@ -837,10 +804,8 @@ if ($step == 3 && $datatoexport) print '
    '; } -if ($step == 4 && $datatoexport) -{ - if (count($array_selected) < 1) // This occurs when going back to page after sessecion expired - { +if ($step == 4 && $datatoexport) { + if (count($array_selected) < 1) { // This occurs when going back to page after sessecion expired // Switch to step 2 header("Location: ".DOL_URL_ROOT.'/exports/export.php?step=2&datatoexport='.$datatoexport); exit; @@ -862,8 +827,7 @@ if ($step == 4 && $datatoexport) $h++; // If filters exist - if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) - { + if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][1] = $langs->trans("Step")." 3"; $h++; @@ -888,20 +852,19 @@ if ($step == 4 && $datatoexport) print $objexport->array_export_module[0]->getName(); print ''; - // Lot de donnees a exporter - print ''.$langs->trans("DatasetToExport").''; - print ''; + // Lot de donnees a exporter + print ''.$langs->trans("DatasetToExport").''; + print ''; $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); - print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; - print $objexport->array_export_label[0]; - print ''; + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; + print $objexport->array_export_label[0]; + print ''; // List of exported fields print ''.$langs->trans("ExportedFields").''; $list = ''; - foreach ($array_selected as $code=>$value) - { + foreach ($array_selected as $code => $value) { $list .= (!empty($list) ? ', ' : ''); $list .= $langs->trans($objexport->array_export_fields[0][$code]); } @@ -909,19 +872,18 @@ if ($step == 4 && $datatoexport) print ''; // List of filtered fiels - if (isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) - { + if (isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { print ''.$langs->trans("FilteredFields").''; $list = ''; - if (!empty($array_filtervalue)) - { - foreach ($array_filtervalue as $code=>$value) - { - if (isset($objexport->array_export_fields[0][$code])) - { + if (!empty($array_filtervalue)) { + foreach ($array_filtervalue as $code => $value) { + if (isset($objexport->array_export_fields[0][$code])) { $list .= ($list ? ', ' : ''); - if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); - else $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) { + $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); + } else { + $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + } } } } @@ -949,8 +911,7 @@ if ($step == 4 && $datatoexport) //print ''.$langs->trans("FieldsTitle").''; print ''; - foreach ($array_selected as $code=>$value) - { + foreach ($array_selected as $code => $value) { print ''; $entity = (!empty($objexport->array_export_entities[0][$code]) ? $objexport->array_export_entities[0][$code] : $objexport->array_export_icon[0]); @@ -960,8 +921,7 @@ if ($step == 4 && $datatoexport) print ''; // If value of entityicon=entitylang='icon:Label' $tmparray = explode(':', $entityicon); - if (count($tmparray) >= 2) - { + if (count($tmparray) >= 2) { $entityicon = $tmparray[0]; $entitylang = $tmparray[1]; } @@ -974,22 +934,18 @@ if ($step == 4 && $datatoexport) $tablename = getablenamefromfield($code, $sqlmaxforexport); $htmltext = ''.$langs->trans("Name").': '.$text.'
    '; - if (!empty($objexport->array_export_special[0][$code])) - { + if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
    "; } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
    "; } - if (!empty($objexport->array_export_examplevalues[0][$code])) - { + if (!empty($objexport->array_export_examplevalues[0][$code])) { $htmltext .= ''.$langs->trans("SourceExample").': '.$objexport->array_export_examplevalues[0][$code].'
    '; } - if (!empty($objexport->array_export_TypeFields[0][$code])) - { + if (!empty($objexport->array_export_TypeFields[0][$code])) { $htmltext .= ''.$langs->trans("Type").': '.$objexport->array_export_TypeFields[0][$code].'
    '; } - if (!empty($objexport->array_export_help[0][$code])) - { + if (!empty($objexport->array_export_help[0][$code])) { $htmltext .= ''.$langs->trans("Help").': '.$langs->trans($objexport->array_export_help[0][$code]).'
    '; } @@ -1001,8 +957,12 @@ if ($step == 4 && $datatoexport) print ''; print $value.' '; print ''; - if ($value < count($array_selected)) print ''.img_down().''; - if ($value > 1) print ''.img_up().''; + if ($value < count($array_selected)) { + print ''.img_down().''; + } + if ($value > 1) { + print ''.img_up().''; + } print ''; //print ' '; @@ -1017,13 +977,11 @@ if ($step == 4 && $datatoexport) print ''; /* - * Barre d'action - * - */ + * Action bar + */ print '
    '; - if (count($array_selected)) - { + if (count($array_selected)) { print ''.$langs->trans("NextStep").''; } @@ -1031,8 +989,7 @@ if ($step == 4 && $datatoexport) // Area for profils export - if (count($array_selected)) - { + if (count($array_selected)) { print '
    '; print '
    '; @@ -1062,15 +1019,15 @@ if ($step == 4 && $datatoexport) $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."export_model"; $sql .= " WHERE type = '".$db->escape($datatoexport)."'"; - if (empty($conf->global->EXPORTS_SHARE_MODELS))$sql .= " AND fk_user=".$user->id; + if (empty($conf->global->EXPORTS_SHARE_MODELS)) { + $sql .= " AND fk_user=".$user->id; + } $sql .= " ORDER BY rowid"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print ''; print $obj->label; @@ -1092,10 +1049,8 @@ if ($step == 4 && $datatoexport) } } -if ($step == 5 && $datatoexport) -{ - if (count($array_selected) < 1) // This occurs when going back to page after sessecion expired - { +if ($step == 5 && $datatoexport) { + if (count($array_selected) < 1) { // This occurs when going back to page after sessecion expired // Switch to step 2 header("Location: ".DOL_URL_ROOT.'/exports/export.php?step=2&datatoexport='.$datatoexport); exit; @@ -1117,8 +1072,7 @@ if ($step == 5 && $datatoexport) $h++; // si le filtrage est parametre pour l'export ou pas - if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) - { + if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][1] = $langs->trans("Step")." 3"; $h++; @@ -1137,10 +1091,9 @@ if ($step == 5 && $datatoexport) print dol_get_fiche_head($head, $hselected, '', -2); /* - * Confirmation suppression fichier - */ - if ($action == 'remove_file') - { + * Confirmation suppression fichier + */ + if ($action == 'remove_file') { print $form->formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } @@ -1156,39 +1109,37 @@ if ($step == 5 && $datatoexport) print $objexport->array_export_module[0]->getName(); print ''; - // Dataset to export - print ''.$langs->trans("DatasetToExport").''; - print ''; - $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); - print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; - print $objexport->array_export_label[0]; - print ''; + // Dataset to export + print ''.$langs->trans("DatasetToExport").''; + print ''; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; + print $objexport->array_export_label[0]; + print ''; // List of exported fields print ''.$langs->trans("ExportedFields").''; $list = ''; - foreach ($array_selected as $code=>$label) - { + foreach ($array_selected as $code => $label) { $list .= (!empty($list) ? ', ' : ''); $list .= $langs->trans($objexport->array_export_fields[0][$code]); } print ''.$list.''; // List of filtered fields - if (isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) - { + if (isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { print ''.$langs->trans("FilteredFields").''; $list = ''; - if (!empty($array_filtervalue)) - { - foreach ($array_filtervalue as $code=>$value) - { - if (isset($objexport->array_export_fields[0][$code])) - { + if (!empty($array_filtervalue)) { + foreach ($array_filtervalue as $code => $value) { + if (isset($objexport->array_export_fields[0][$code])) { $list .= ($list ? ', ' : ''); - if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); - else $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) { + $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); + } else { + $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + } } } } @@ -1211,10 +1162,8 @@ if ($step == 5 && $datatoexport) $liste = $objmodelexport->liste_modeles($db); $listeall = $liste; - foreach ($listeall as $key => $val) - { - if (preg_match('/__\(Disabled\)__/', $listeall[$key])) - { + foreach ($listeall as $key => $val) { + if (preg_match('/__\(Disabled\)__/', $listeall[$key])) { $listeall[$key] = preg_replace('/__\(Disabled\)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $listeall[$key]); unset($liste[$key]); } @@ -1237,13 +1186,14 @@ if ($step == 5 && $datatoexport) print '
    '; - if ($sqlusedforexport && $user->admin) - { + if ($sqlusedforexport && $user->admin) { print info_admin($langs->trans("SQLUsedForExport").':
    '.$sqlusedforexport, 0, 0, 1, '', 'TechnicalInformation'); } - if (!is_dir($conf->export->dir_temp)) dol_mkdir($conf->export->dir_temp); + if (!is_dir($conf->export->dir_temp)) { + dol_mkdir($conf->export->dir_temp); + } // Show existing generated documents // NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste @@ -1273,8 +1223,9 @@ function getablenamefromfield($code, $sqlmaxforexport) $newsql = preg_replace('/^(.*) FROM /i', '', $newsql); // Remove part before the FROM $newsql = preg_replace('/WHERE (.*)$/i', '', $newsql); // Remove part after the WHERE so we have now only list of table aliases in a string. We must keep the ' ' before WHERE - if (preg_match($regexstring, $newsql, $reg)) - { + if (preg_match($regexstring, $newsql, $reg)) { return $reg[1]; // The tablename - } else return ''; + } else { + return ''; + } } diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 79655a19b2f..3ba5e0a3591 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -27,11 +27,12 @@ require_once DOL_DOCUMENT_ROOT.'/exports/class/export.class.php'; // Load translation files required by the page $langs->load("exports"); +$export = new Export($db); +$export->load_arrays($user); + // Security check $result = restrictedArea($user, 'export'); -$export = new Export($db); -$export->load_arrays($user); /* * View @@ -39,7 +40,10 @@ $export->load_arrays($user); $form = new Form($db); -llxHeader('', $langs->trans("ExportsArea"), 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'); + +$help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'; + +llxHeader('', $langs->trans("ExportsArea"), $help_url); print load_fiche_titre($langs->trans("ExportsArea")); @@ -48,8 +52,7 @@ print '
    '; print '
    '; -if (count($export->array_export_code)) -{ +if (count($export->array_export_code)) { print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer); } print '
    '; @@ -71,10 +74,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; $model = new ModeleExports($db); $liste = $model->liste_modeles($db); // This is not a static method for exports because method load non static properties -foreach ($liste as $key => $val) -{ - if (preg_match('/__\(Disabled\)__/', $liste[$key])) - { +foreach ($liste as $key => $val) { + if (preg_match('/__\(Disabled\)__/', $liste[$key])) { $liste[$key] = preg_replace('/__\(Disabled\)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $liste[$key]); } diff --git a/htdocs/externalsite/admin/index.html b/htdocs/externalsite/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/index.php similarity index 79% rename from htdocs/externalsite/admin/externalsite.php rename to htdocs/externalsite/admin/index.php index 66c6d265dec..a9a41c5e555 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/index.php @@ -21,42 +21,49 @@ */ /** - * \file htdocs/externalsite/admin/externalsite.php + * \file htdocs/externalsite/admin/index.php * \ingroup externalsite - * \brief Page de configuration du module externalsite + * \brief Page to setup module external site */ -if (!defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti CSRF attack test +if (!defined('NOSCANPOSTFORINJECTION')) { + define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti CSRF attack test +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'externalsite')); -$def = array(); - $action = GETPOST('action', 'aZ09'); + +/* + * Actions + */ + // Sauvegardes parametres -if ($action == 'update') -{ +if ($action == 'update') { $i = 0; $db->begin(); - $label = GETPOST('EXTERNALSITE_LABEL', 'alpha'); - $exturl = GETPOST('EXTERNALSITE_URL', 'restricthtml'); + $label = GETPOST('EXTERNALSITE_LABEL', 'alphanohtml'); + + $exturl = GETPOST('EXTERNALSITE_URL', 'none'); + $exturl = dol_string_onlythesehtmltags($exturl, 1, 1, 0, 1); + $exturl = trim(dol_string_onlythesehtmlattributes($exturl)); $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); - if ($i >= 2) - { + if ($i >= 2) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -76,7 +83,7 @@ $linkback = ''; -print $langs->trans("Module100Desc")."
    \n"; +print ''.$langs->trans("Module100Desc")."
    \n"; print '
    '; print '
    '; @@ -101,7 +108,12 @@ 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 4827d832af4..04b48ba3cad 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -44,35 +44,29 @@ $keyforcontent = GETPOST('keyforcontent', 'aZ09'); * View */ -if (empty($keyforcontent) && empty($conf->global->EXTERNALSITE_URL)) -{ +if (empty($keyforcontent) && empty($conf->global->EXTERNALSITE_URL)) { llxHeader(); print '
    '.$langs->trans('ExternalSiteModuleNotComplete').'
    '; llxFooter(); exit; } -if (!empty($keyforcontent)) -{ +if (!empty($keyforcontent)) { llxHeader(); print '
    '; if (!preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent) - && !preg_match('/EXTERNAL_SITE_URL_/', $keyforcontent)) - { + && !preg_match('/EXTERNAL_SITE_URL_/', $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 { - if (preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent)) - { + 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 " @@ -80,17 +74,17 @@ if (!empty($keyforcontent)) global->MAIN_MENU_INVERT)?"rows":"cols")."=\"".$heightforframes.",*\" border=0 framespacing=0 frameborder=0> - + "; print ''; print " - - <body> + <noframes> + <body> - </body> - + + @@ -111,8 +105,7 @@ if (!empty($keyforcontent)) print '<div>'; llxFooter(); } else { - if (preg_match('/^\//', $conf->global->EXTERNALSITE_URL) || preg_match('/^http/i', $conf->global->EXTERNALSITE_URL)) - { + if (preg_match('/^\//', $conf->global->EXTERNALSITE_URL) || preg_match('/^http/i', $conf->global->EXTERNALSITE_URL)) { print " <html> <head> diff --git a/htdocs/externalsite/index.html b/htdocs/externalsite/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 0fa5a930f05..552d9f70c97 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -39,13 +39,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'fichinter'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index f648548c3b4..439cad6c532 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -39,13 +39,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'fichinterdet'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +82,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/fichinter/admin/index.html b/htdocs/fichinter/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index f245084f8db..26ea2cfaaa8 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -8,7 +8,7 @@ * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2016-2018 Charlie Benke <charlie@patas-monkey.com> - * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,39 +52,48 @@ $langs->loadLangs(array("interventions", "admin", "compta", "bills")); // Security check $id = (GETPOST('fichinterid', 'int') ?GETPOST('fichinterid', 'int') : GETPOST('id', 'int')); $action = GETPOST('action', 'aZ09'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $objecttype = 'fichinter_rec'; -if ($action == "create" || $action == "add") $objecttype = ''; +if ($action == "create" || $action == "add") { + $objecttype = ''; +} $result = restrictedArea($user, 'ficheinter', $id, $objecttype); -if ($page == -1) +if ($page == -1) { $page = 0; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; -if ($sortorder == "") +$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +if ($sortorder == "") { $sortorder = "DESC"; +} -if ($sortfield == "") +if ($sortfield == "") { $sortfield = "f.datec"; +} $object = new FichinterRec($db); $extrafields = new ExtraFields($db); $arrayfields = array( - 'f.titre'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 'f.fk_contrat'=>array('label'=>$langs->trans("Contract"), 'checked'=>1), - 'f.duree'=>array('label'=>$langs->trans("Duration"), 'checked'=>1), - 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>1), - 'f.frequency'=>array('label'=>$langs->trans("RecurringInvoiceTemplate"), 'checked'=>1), - 'f.nb_gen_done'=>array('label'=>$langs->trans("NbOfGenerationDone"), 'checked'=>1), - 'f.date_last_gen'=>array('label'=>$langs->trans("DateLastGeneration"), 'checked'=>1), - 'f.date_when'=>array('label'=>$langs->trans("NextDateToExecution"), 'checked'=>1), - 'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + 'f.titre'=>array('label'=>"Ref", 'checked'=>1), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 'f.fk_contrat'=>array('label'=>"Contract", 'checked'=>1), + 'f.duree'=>array('label'=>"Duration", 'checked'=>1), + 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1), + 'f.frequency'=>array('label'=>"RecurringInvoiceTemplate", 'checked'=>1), + 'f.nb_gen_done'=>array('label'=>"NbOfGenerationDoneShort", 'checked'=>1), + 'f.date_last_gen'=>array('label'=>"DateLastGeneration", 'checked'=>1), + 'f.date_when'=>array('label'=>"NextDateToExecution", 'checked'=>1), + 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), ); @@ -212,7 +221,9 @@ if ($action == 'add') { // Set next date of execution $object->fetch($id); $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); + if (!empty($date)) { + $object->setNextDate($date); + } } elseif ($action == 'setnb_gen_max' && $user->rights->ficheinter->creer) { // Set max period $object->fetch($id); @@ -224,7 +235,9 @@ if ($action == 'add') { * View */ -llxHeader('', $langs->trans("RepeatableIntervention"), 'ch-fichinter.html#s-fac-fichinter-rec'); +$help_url = ''; + +llxHeader('', $langs->trans("RepeatableIntervention"), $help_url); $form = new Form($db); $companystatic = new Societe($db); @@ -259,8 +272,12 @@ if ($action == 'create') { print dol_get_fiche_head(); $rowspan = 4; - if (!empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++; - if (!empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++; + if (!empty($conf->projet->enabled) && $object->fk_project > 0) { + $rowspan++; + } + if (!empty($conf->contrat->enabled) && $object->fk_contrat > 0) { + $rowspan++; + } print '<table class="border centpercent">'; @@ -563,15 +580,13 @@ if ($action == 'create') { print '<div class="ficheaddleft">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'; - $title = $langs->trans("Recurrence"); print load_fiche_titre($title, '', 'calendar'); print '<table class="border centpercent">'; // if "frequency" is empty or = 0, the reccurence is disabled - print '<tr><td style="width: 50%">'; + print '<tr><td class="titlefield">'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('Frequency'); print '</td>'; @@ -593,9 +608,11 @@ if ($action == 'create') { print '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; print '</tr></table></form>'; } else { - if ($object->frequency > 0) + if ($object->frequency > 0) { print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); - else print $langs->trans("NotARecurringInterventionalTemplate"); + } else { + print $langs->trans("NotARecurringInterventionalTemplate"); + } } print '</td></tr>'; @@ -617,12 +634,16 @@ if ($action == 'create') { print '<tr><td>'; 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 '</td><td>'; 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 '</td>'; print '</tr>'; @@ -640,7 +661,7 @@ if ($action == 'create') { print '<table class="border centpercent">'; // Nb of generation already done - print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>'; + print '<tr><td class="titlefield">'.$langs->trans("NbOfGenerationOfRecordDone").'</td>'; print '<td>'; print $object->nb_gen_done ? $object->nb_gen_done : '0'; print '</td>'; @@ -686,13 +707,19 @@ if ($action == 'create') { $i = 0; while ($i < $num) { // Show product and description - if (isset($object->lines[$i]->product_type)) + 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; - if (!empty($objp->date_end)) $type = 1; + if (!empty($objp->date_start)) { + $type = 1; + } + if (!empty($objp->date_end)) { + $type = 1; + } // Show line print '<tr class="oddeven">'; @@ -707,8 +734,8 @@ if ($action == 'create') { } print '</table>'; - /** - * Barre d'actions + /* + * Action bar */ print '<div class="tabsAction">'; @@ -725,7 +752,9 @@ if ($action == 'create') { print $langs->trans('Delete').'</a></div>'; } print '</div>'; - } else print $langs->trans("ErrorRecordNotFound"); + } else { + print $langs->trans("ErrorRecordNotFound"); + } } else { /* * List mode @@ -741,14 +770,24 @@ if ($action == 'create') { } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND f.entity = ".$conf->entity; - if ($socid) $sql .= " AND s.rowid = ".$socid; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if ($search_ref) $sql .= natural_search('f.titre', $search_ref); - if ($search_societe) $sql .= natural_search('s.nom', $search_societe); - if ($search_frequency == '1') $sql .= ' AND f.frequency > 0'; - if ($search_frequency == '0') $sql .= ' AND (f.frequency IS NULL or f.frequency = 0)'; + if ($search_ref) { + $sql .= natural_search('f.titre', $search_ref); + } + if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); + } + if ($search_frequency == '1') { + $sql .= ' AND f.frequency > 0'; + } + if ($search_frequency == '0') { + $sql .= ' AND (f.frequency IS NULL or f.frequency = 0)'; + } //$sql .= " ORDER BY $sortfield $sortorder, rowid DESC "; @@ -776,7 +815,7 @@ if ($action == 'create') { print_liste_field_titre("Duration", $_SERVER['PHP_SELF'], 'f.duree', '', '', 'width="50px"', $sortfield, $sortorder, 'right '); // Recurring or not print_liste_field_titre("Frequency", $_SERVER['PHP_SELF'], "f.frequency", "", "", 'width="100px"', $sortfield, $sortorder, 'center '); - print_liste_field_titre("NbOfGenerationDone", $_SERVER['PHP_SELF'], "f.nb_gen_done", "", "", 'width="100px"', $sortfield, $sortorder, 'center '); + print_liste_field_titre("NbOfGenerationDoneShort", $_SERVER['PHP_SELF'], "f.nb_gen_done", "", "", 'width="100px"', $sortfield, $sortorder, 'center '); print_liste_field_titre("DateLastGeneration", $_SERVER['PHP_SELF'], "f.date_last_gen", "", "", 'width="100px"', $sortfield, $sortorder, 'center '); print_liste_field_titre("NextDateToIntervention", $_SERVER['PHP_SELF'], "f.date_when", "", "", 'width="100px"', $sortfield, $sortorder, 'center '); print '<th width="100px"></th>'; @@ -853,8 +892,12 @@ if ($action == 'create') { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=createfrommodel'; print '&socid='.$objp->socid.'&id='.$objp->fich_rec.'">'; print $langs->trans("CreateFichInter").'</a>'; - } else print $langs->trans("DateIsNotEnough"); - } else print "&nbsp;"; + } else { + print $langs->trans("DateIsNotEnough"); + } + } else { + print "&nbsp;"; + } print "</td>"; @@ -863,7 +906,7 @@ if ($action == 'create') { } } } else { - print '<tr class="oddeven"><td colspan="10">'.$langs->trans("NoneF").'</td></tr>'; + print '<tr class="oddeven"><td colspan="10"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; } print "</table>"; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 0b919c3eb4b..88c5a1cefc0 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -36,18 +36,15 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -if ($conf->contrat->enabled) -{ +if ($conf->contrat->enabled) { require_once DOL_DOCUMENT_ROOT."/core/class/html.formcontract.class.php"; require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"; } -if (!empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".$conf->global->FICHEINTER_ADDON.".php")) -{ +if (!empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".$conf->global->FICHEINTER_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT."/core/modules/fichinter/mod_".$conf->global->FICHEINTER_ADDON.'.php'; } require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -75,7 +72,9 @@ $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -87,11 +86,14 @@ $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); // Load object -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret > 0) $ret = $object->fetch_thirdparty(); - if ($ret < 0) dol_print_error('', $object->error); + if ($ret > 0) { + $ret = $object->fetch_thirdparty(); + } + if ($ret < 0) { + dol_print_error('', $object->error); + } } $permissionnote = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php @@ -106,14 +108,13 @@ $error = 0; $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 ($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; } @@ -125,20 +126,16 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->ficheinter->creer) - { - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { + if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->ficheinter->creer) { + if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { - if ($object->id > 0) - { + if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later $orig = clone $object; $result = $object->createFromClone($user, $socid); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; } else { @@ -150,21 +147,21 @@ if (empty($reshook)) } } - if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer) - { + if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setValid($user); - if ($result >= 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if ($result >= 0) { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $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)) - { + 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); } @@ -178,15 +175,17 @@ if (empty($reshook)) } } elseif ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setDraft($user); - if ($result >= 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if ($result >= 0) { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $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 ($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); @@ -200,6 +199,7 @@ if (empty($reshook)) $mesg = $object->error; } } elseif ($action == 'add' && $user->rights->ficheinter->creer) { + $selectedLines = GETPOST('toselect', 'array'); $object->socid = $socid; $object->duration = (int) GETPOST('duration', 'int'); $object->fk_project = (int) GETPOST('projectid', 'int'); @@ -211,16 +211,13 @@ if (empty($reshook)) $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); - if ($object->socid > 0) - { + if ($object->socid > 0) { // If creation from another object of another module (Example: origin=propal, originid=1) - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin', 'alphanohtml'); - if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs)) { $element = $regs[1]; $subelement = $regs[2]; } @@ -241,8 +238,7 @@ if (empty($reshook)) // Possibility to add external linked objects with hooks $object->linked_objects[$object->origin] = $object->origin_id; - if (is_array($_POST['other_linked_objects']) && !empty($_POST['other_linked_objects'])) - { + if (is_array($_POST['other_linked_objects']) && !empty($_POST['other_linked_objects'])) { $object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']); } @@ -260,8 +256,7 @@ if (empty($reshook)) $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -269,12 +264,10 @@ if (empty($reshook)) dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $srcobject->fetch_thirdparty(); $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } @@ -282,16 +275,18 @@ if (empty($reshook)) if (is_array($lines)) { $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { + if (!in_array($lines[$i]->id, $selectedLines)) { + continue; // Skip unselected lines + } + $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : Product::TYPE_PRODUCT); if ($product_type == Product::TYPE_SERVICE || !empty($conf->global->FICHINTER_PRINT_PRODUCTS)) { //only services except if config includes products $duration = 3600; // Default to one hour // Predefined products & services - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { $prod = new Product($db); $prod->id = $lines[$i]->fk_product; @@ -302,8 +297,12 @@ if (empty($reshook)) $prod->fetch($lines[$i]->fk_product); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $srcobject->thirdparty->default_lang; + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $srcobject->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -364,12 +363,11 @@ if (empty($reshook)) $id, $desc, $date_intervention, - $duration, - $array_options + $duration, + $array_options ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -392,16 +390,14 @@ if (empty($reshook)) $action = 'create'; } - if (!$error) - { + if (!$error) { // Extrafields $array_options = $extrafields->getOptionalsFromPost($object->table_element); $object->array_options = $array_options; $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { $id = $result; // Force raffraichissement sur fiche venant d'etre cree } else { $langs->load("errors"); @@ -426,22 +422,19 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Set into a project - elseif ($action == 'classin' && $user->rights->ficheinter->creer) - { + } elseif ($action == 'classin' && $user->rights->ficheinter->creer) { + // Set into a project $result = $object->setProject(GETPOST('projectid', 'int')); - if ($result < 0) dol_print_error($db, $object->error); - } - - // Set into a contract - elseif ($action == 'setcontract' && $user->rights->contrat->creer) - { + if ($result < 0) { + dol_print_error($db, $object->error); + } + } elseif ($action == 'setcontract' && $user->rights->contrat->creer) { + // Set into a contract $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) - { + if ($result < 0) { + dol_print_error($db, $object->error); + } + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) { $result = $object->delete($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -449,32 +442,26 @@ 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); - } - - // Add line - elseif ($action == "addline" && $user->rights->ficheinter->creer) - { - if (!GETPOST('np_desc', 'restricthtml') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) - { + if ($result < 0) { + dol_print_error($db, $object->error); + } + } elseif ($action == "addline" && $user->rights->ficheinter->creer) { + // Add line + if (!GETPOST('np_desc', 'restricthtml') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")); $error++; } - if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && !GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) - { + if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && !GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Duration")); $error++; } - if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && GETPOST('durationhour', 'int') >= 24 && GETPOST('durationmin', 'int') > 0) - { + if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && GETPOST('durationhour', 'int') >= 24 && GETPOST('durationmin', 'int') > 0) { $mesg = $langs->trans("ErrorValueTooHigh"); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); $desc = GETPOST('np_desc', 'restricthtml'); @@ -497,19 +484,23 @@ if (empty($reshook)) // Define output language $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)) - { + 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); } - if ($result >= 0) - { + if ($result >= 0) { $db->commit(); - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $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 { @@ -517,64 +508,44 @@ if (empty($reshook)) $db->rollback(); } } - } - - // Classify Billed - elseif ($action == 'classifybilled' && $user->rights->ficheinter->creer) - { - $result = $object->setStatut(2); + } elseif ($action == 'classifybilled' && $user->rights->ficheinter->creer) { + // Classify Billed + $result = $object->setStatut(Fichinter::STATUS_BILLED); if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Classify unbilled - elseif ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) - { - $result = $object->setStatut(1); - if ($result > 0) - { + } elseif ($action == 'classifyunbilled' && $user->rights->ficheinter->creer) { + // Classify unbilled + $result = $object->setStatut(Fichinter::STATUS_VALIDATED); + if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else { $mesg = $object->error; } - } - - // Classify Done - elseif ($action == 'classifydone' && $user->rights->ficheinter->creer) - { - $result = $object->setStatut(3); - if ($result > 0) - { + } elseif ($action == 'classifydone' && $user->rights->ficheinter->creer) { + // Classify Done + $result = $object->setStatut(Fichinter::STATUS_CLOSED); + 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) - { + } elseif ($action == 'confirm_reopen' && $user->rights->ficheinter->creer) { + // Reopen $result = $object->setStatut(Fichinter::STATUS_VALIDATED); - if ($result > 0) - { + if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else { + } else { $mesg = $object->error; } - } - - /* - * Mise a jour d'une ligne d'intervention - */ - elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save', 'alpha') == $langs->trans("Save")) { + } elseif ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST('save', 'alpha') == $langs->trans("Save")) { + // Mise a jour d'une ligne d'intervention $objectline = new FichinterLigne($db); if ($objectline->fetch($lineid) <= 0) { dol_print_error($db); @@ -609,33 +580,32 @@ if (empty($reshook)) // Define output language $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 ($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); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $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; - } - - /* - * Supprime une ligne d'intervention AVEC confirmation - */ - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->ficheinter->creer) { + // Supprime une ligne d'intervention AVEC confirmation $objectline = new FichinterLigne($db); - if ($objectline->fetch($lineid) <= 0) - { + if ($objectline->fetch($lineid) <= 0) { dol_print_error($db); exit; } $result = $objectline->deleteline($user); - if ($object->fetch($objectline->fk_fichinter) <= 0) - { + if ($object->fetch($objectline->fk_fichinter) <= 0) { dol_print_error($db); exit; } @@ -643,52 +613,61 @@ if (empty($reshook)) // Define output language $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)) - { + 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); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); - } - - /* - * Set position of lines - */ - elseif ($action == 'up' && $user->rights->ficheinter->creer) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + fichinter_create($db, $object, $object->model_pdf, $outputlangs); + } + } elseif ($action == 'up' && $user->rights->ficheinter->creer) { + // Set position of lines $object->line_up($lineid); // Define output language $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)) - { + 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); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $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); // Define output language $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)) - { + 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); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $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; @@ -708,66 +687,55 @@ if (empty($reshook)) $permissiontoadd = $user->rights->ficheinter->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('INTERVENTION_MODIFY'); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->ficheinter->creer) - { - if ($action == 'addcontact') - { - if ($result > 0 && $id > 0) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->ficheinter->creer) { + if ($action == 'addcontact') { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); } else { $mesg = $object->error; } } - } - - // bascule du statut d'un contact - elseif ($action == 'swapstatut') - { + } elseif ($action == 'swapstatut') { + // bascule du statut d'un contact $result = $object->swapContactStatus(GETPOST('ligne', 'int')); - } - - // Efface un contact - elseif ($action == 'deletecontact') - { + } elseif ($action == 'deletecontact') { + // Efface un contact $result = $object->delete_contact(GETPOST('lineid', 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -784,13 +752,19 @@ if (empty($reshook)) $form = new Form($db); $formfile = new FormFile($db); -if ($conf->contrat->enabled) $formcontract = new FormContract($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if ($conf->contrat->enabled) { + $formcontract = new FormContract($db); +} +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} -llxHeader('', $langs->trans("Intervention")); -if ($action == 'create') -{ +$help_url = 'EN:Module_Interventions'; + +llxHeader('', $langs->trans("Intervention"), $help_url); + +if ($action == 'create') { // Create new intervention $soc = new Societe($db); @@ -803,21 +777,20 @@ if ($action == 'create') dol_htmloutput_mesg($mesg); } - if ($socid) $res = $soc->fetch($socid); + if ($socid) { + $res = $soc->fetch($socid); + } - if (GETPOST('origin', 'alphanohtml') && GETPOST('originid', 'int')) - { + if (GETPOST('origin', 'alphanohtml') && GETPOST('originid', 'int')) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin', 'alphanohtml'); - if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs)) - { + if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs)) { $element = $regs[1]; $subelement = $regs[2]; } - if ($element == 'project') - { + if ($element == 'project') { $projectid = GETPOST('originid', 'int'); } else { // For compatibility @@ -836,8 +809,7 @@ if ($action == 'create') $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch(GETPOST('originid')); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) - { + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); $lines = $objectsrc->lines; } @@ -857,8 +829,7 @@ if ($action == 'create') $projectid = GETPOST('projectid', 'int'); } - if (!$conf->global->FICHEINTER_ADDON) - { + if (!$conf->global->FICHEINTER_ADDON) { dol_print_error($db, $langs->trans("Error")." ".$langs->trans("Error_FICHEINTER_ADDON_NotDefined")); exit; } @@ -871,8 +842,7 @@ if ($action == 'create') //$modFicheinter = new $obj; //$numpr = $modFicheinter->getNextValue($soc, $object); - if ($socid > 0) - { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); @@ -897,35 +867,31 @@ if ($action == 'create') print '</td></tr>'; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); $langs->load("project"); print '<tr><td>'.$langs->trans("Project").'</td><td>'; /* 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'); - */ + if ($societe->fournisseur==1) + $numprojet=select_projects(-1, GETPOST("projectid", 'int'), 'projectid'); + else + $numprojet=select_projects($societe->id, GETPOST("projectid", 'int'), 'projectid'); + */ $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid'); - if ($numprojet == 0) - { + if ($numprojet == 0) { print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>'; } print '</td></tr>'; } // Contract - if ($conf->contrat->enabled) - { + if ($conf->contrat->enabled) { $langs->load("contracts"); print '<tr><td>'.$langs->trans("Contract").'</td><td>'; $numcontrat = $formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1, 1); - if ($numcontrat == 0) - { + if ($numcontrat == 0) { print ' &nbsp; <a href="'.DOL_URL_ROOT.'/contrat/card.php?socid='.$soc->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddContract").'"></span></a>'; } print '</td></tr>'; @@ -943,18 +909,17 @@ if ($action == 'create') print '<tr>'; print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); //print '<textarea name="note_public" cols="80" rows="'.ROWS_3.'">'.$note_public.'</textarea>'; print '</td></tr>'; // Private note - if (empty($user->socid)) - { + if (empty($user->socid)) { print '<tr>'; print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); //print '<textarea name="note_private" cols="80" rows="'.ROWS_3.'">'.$note_private.'</textarea>'; print '</td></tr>'; @@ -964,47 +929,46 @@ if ($action == 'create') $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } // Show link to origin object - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { $newclassname = $classname; - if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; + if ($newclassname == 'Propal') { + $newclassname = 'CommercialProposal'; + } print '<tr><td>'.$langs->trans($newclassname).'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>'; // Amount /* Hide amount because we only copy services so amount may differ than source - print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>'; - print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE - { - print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>"; - } + print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>'; + print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>"; + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE + { + print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>"; + } - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF - { - print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>"; - } + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF + { + print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>"; + } - print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>"; + print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>"; - if (!empty($conf->multicurrency->enabled)) - { - print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; - print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; - print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; - } - */ + if (!empty($conf->multicurrency->enabled)) + { + print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; + print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; + print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; + } + */ } print '</table>'; - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; } elseif ($origin == 'project' && !empty($projectid)) { @@ -1019,8 +983,6 @@ if ($action == 'create') print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">'; print '</div>'; - print '</form>'; - // Show origin lines if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { $title = $langs->trans('Services'); @@ -1032,14 +994,15 @@ if ($action == 'create') print '</table>'; } + + print '</form>'; } else { print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print dol_get_fiche_head(''); - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; } elseif ($origin == 'project' && !empty($projectid)) { @@ -1063,11 +1026,10 @@ if ($action == 'create') print '</form>'; } -} elseif ($id > 0 || !empty($ref)) -{ +} elseif ($id > 0 || !empty($ref)) { /* * Affichage en mode visu - */ + */ $object->fetch($id, $ref); $object->fetch_thirdparty(); @@ -1088,21 +1050,17 @@ if ($action == 'create') $formconfirm = ''; // Confirm deletion of intervention - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete', '', 0, 1); } // Confirm validation - if ($action == 'validate') - { + if ($action == 'validate') { // on verifie si l'objet est en numerotation provisoire $ref = substr($object->ref, 1, 4); - if ($ref == 'PROV') - { + if ($ref == 'PROV') { $numref = $object->getNextNumRef($soc); - if (empty($numref)) - { + if (empty($numref)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -1115,20 +1073,17 @@ if ($action == 'create') } // Confirm back to draft - if ($action == 'modify') - { + if ($action == 'modify') { $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') - { + 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') - { + if ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.$lineid, $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline', '', 0, 1); } @@ -1146,12 +1101,14 @@ if ($action == 'create') $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneIntervention', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if (!$formconfirm) - { + if (!$formconfirm) { $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } } // Print form confirm @@ -1169,12 +1126,10 @@ if ($action == 'create') // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->ficheinter->creer) - { + if ($user->rights->ficheinter->creer) { if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; } @@ -1212,8 +1167,7 @@ if ($action == 'create') print '<table class="border tableforfield" width="100%">'; - if (!empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) - { + if (!empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) { // Date Start print '<tr><td class="titlefield">'.$langs->trans("Dateo").'</td>'; print '<td>'; @@ -1245,8 +1199,7 @@ if ($action == 'create') print '</tr>'; // Contract - if ($conf->contrat->enabled) - { + if ($conf->contrat->enabled) { $langs->load('contracts'); print '<tr>'; print '<td>'; @@ -1254,21 +1207,18 @@ if ($action == 'create') print '<table class="nobordernopadding centpercent"><tr><td>'; print $langs->trans('Contract'); print '</td>'; - if ($action != 'contrat') - { + if ($action != 'contrat') { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=contrat&amp;id='.$object->id.'">'; print img_edit($langs->trans('SetContract'), 1); print '</a></td>'; } print '</tr></table>'; print '</td><td>'; - if ($action == 'contrat') - { + if ($action == 'contrat') { $formcontract = new Formcontract($db); $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1, 1); } else { - if ($object->fk_contrat) - { + if ($object->fk_contrat) { $contratstatic = new Contrat($db); $contratstatic->fetch($object->fk_contrat); //print '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$selected.'">'.$projet->title.'</a>'; @@ -1294,8 +1244,7 @@ if ($action == 'create') print '<table class="border tableforfield centpercent">'; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) - { + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) { // Duration print '<tr><td class="titlefield">'.$langs->trans("TotalDuration").'</td>'; print '<td>'.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>'; @@ -1311,23 +1260,20 @@ if ($action == 'create') print '<div class="clearboth"></div><br>'; - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $blocname = 'notes'; $title = $langs->trans('Notes'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } // Line of interventions - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) - { + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) { print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="addinter" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; @@ -1349,13 +1295,11 @@ if ($action == 'create') $sql .= ' ORDER BY ft.rang ASC, ft.date ASC, ft.rowid'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { + if ($num) { print '<br>'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -1397,8 +1341,7 @@ if ($action == 'create') print "</td>\n"; // Icon to edit and delete - if ($object->statut == 0 && $user->rights->ficheinter->creer) - { + if ($object->statut == 0 && $user->rights->ficheinter->creer) { print '<td class="center">'; print '<a class="editfielda marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;line_id='.$objp->rowid.'#'.$objp->rowid.'">'; print img_edit(); @@ -1407,16 +1350,13 @@ if ($action == 'create') print img_delete(); print '</a></td>'; print '<td class="center">'; - if ($num > 1) - { - if ($i > 0) - { + if ($num > 1) { + if ($i > 0) { print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=up&amp;line_id='.$objp->rowid.'">'; print img_up(); print '</a>'; } - if ($i < $num - 1) - { + if ($i < $num - 1) { print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=down&amp;line_id='.$objp->rowid.'">'; print img_down(); print '</a>'; @@ -1440,8 +1380,7 @@ if ($action == 'create') } // Line in update mode - if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && GETPOST('line_id', 'int') == $objp->rowid) - { + if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && GETPOST('line_id', 'int') == $objp->rowid) { print '<tr class="oddeven nohover">'; // No. @@ -1471,8 +1410,9 @@ if ($action == 'create') print '<td class="right">'; if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { $selectmode = 'select'; - if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) + if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) { $selectmode = 'text'; + } $form->select_duration('duration', $objp->duree, 0, $selectmode); } print '</td>'; @@ -1497,10 +1437,8 @@ if ($action == 'create') $db->free($resql); // Add new line - if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline' && empty($conf->global->FICHINTER_DISABLE_DETAILS)) - { - if (!$num) - { + if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline' && empty($conf->global->FICHINTER_DISABLE_DETAILS)) { + if (!$num) { print '<br>'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -1515,7 +1453,7 @@ if ($action == 'create') print $langs->trans('Description').'</td>'; print '<td class="center">'.$langs->trans('Date').'</td>'; print '<td class="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION) ? $langs->trans('Duration') : '').'</td>'; - print '<td colspan="3">&nbsp;</td>'; + print '<td colspan="3">&nbsp;</td>'; print "</tr>\n"; } @@ -1573,16 +1511,20 @@ if ($action == 'create') print $lineadd->showOptionals($extrafields, 'edit', array('colspan'=>5)); - if (!$num) print '</table>'; + if (!$num) { + print '</table>'; + } } - if ($num) print '</table>'; + if ($num) { + print '</table>'; + } } else { dol_print_error($db); } print '</form>'."\n"; - } + } print dol_get_fiche_end(); @@ -1598,10 +1540,8 @@ if ($action == 'create') $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($user->socid == 0) - { + 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))) { @@ -1612,31 +1552,33 @@ if ($action == 'create') } // 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))) - { + 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 '<div class="inline-block divButAction"><a class="butAction" href="card.php?id='.$object->id.'&action=modify">'; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) print $langs->trans("Modify"); - else print $langs->trans("SetToDraft"); + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) { + print $langs->trans("Modify"); + } else { + print $langs->trans("SetToDraft"); + } print '</a></div>'; } // Reopen - if ($object->statut >= Fichinter::STATUS_CLOSED) - { - if ($user->rights->ficheinter->creer) - { + if ($object->statut >= Fichinter::STATUS_CLOSED) { + if ($user->rights->ficheinter->creer) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans('Reopen').'</a></div>'; - } else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Reopen').'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Reopen').'</a></div>'; + } } // Send if (empty($user->socid)) { - if ($object->statut > Fichinter::STATUS_DRAFT) - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) - { + if ($object->statut > Fichinter::STATUS_DRAFT) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; - } else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a></div>'; + } } } @@ -1648,30 +1590,30 @@ if ($action == 'create') } // Proposal - if ($conf->service->enabled && !empty($conf->propal->enabled) && $object->statut > Fichinter::STATUS_DRAFT) - { + if ($conf->service->enabled && !empty($conf->propal->enabled) && $object->statut > Fichinter::STATUS_DRAFT) { $langs->load("propal"); - if ($object->statut < Fichinter::STATUS_BILLED) - { - if ($user->rights->propal->creer) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddProp").'</a></div>'; - else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddProp").'</a></div>'; + if ($object->statut < Fichinter::STATUS_BILLED) { + if ($user->rights->propal->creer) { + print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddProp").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddProp").'</a></div>'; + } } } // Invoicing - if (!empty($conf->facture->enabled) && $object->statut > Fichinter::STATUS_DRAFT) - { + if (!empty($conf->facture->enabled) && $object->statut > Fichinter::STATUS_DRAFT) { $langs->load("bills"); - if ($object->statut < Fichinter::STATUS_BILLED) - { - if ($user->rights->facture->creer) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddBill").'</a></div>'; - else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddBill").'</a></div>'; + if ($object->statut < Fichinter::STATUS_BILLED) { + if ($user->rights->facture->creer) { + print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddBill").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddBill").'</a></div>'; + } } - if (!empty($conf->global->FICHINTER_CLASSIFY_BILLED)) // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 - { - if ($object->statut != Fichinter::STATUS_BILLED) - { + if (!empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 + if ($object->statut != Fichinter::STATUS_BILLED) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifybilled">'.$langs->trans("InterventionClassifyBilled").'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifyunbilled">'.$langs->trans("InterventionClassifyUnBilled").'</a></div>'; @@ -1680,8 +1622,7 @@ if ($action == 'create') } // 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 '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifydone">'.$langs->trans("InterventionClassifyDone").'</a></div>'; } @@ -1691,8 +1632,7 @@ if ($action == 'create') } // Delete - if (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) - { + if (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) { print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'"'; print '>'.$langs->trans('Delete').'</a></div>'; } @@ -1702,8 +1642,7 @@ if ($action == 'create') print '</div>'; - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; /* diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php index 7046a61e2d5..423bb31f348 100644 --- a/htdocs/fichinter/class/api_interventions.class.php +++ b/htdocs/fichinter/class/api_interventions.class.php @@ -32,7 +32,7 @@ class Interventions extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid', 'fk_project', 'description', @@ -41,7 +41,7 @@ class Interventions extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDSLINE = array( + public static $FIELDSLINE = array( 'description', 'date', 'duree', @@ -110,6 +110,10 @@ class Interventions extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->ficheinter->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -117,27 +121,37 @@ class Interventions extends DolibarrApi // 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 (!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) + 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."fichinter 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('intervention').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter if ($search_sale > 0) { - $sql .= " AND sc.fk_user = ".$search_sale; + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -146,8 +160,7 @@ class Interventions extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -158,13 +171,11 @@ class Interventions extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $fichinter_static = new Fichinter($this->db); if ($fichinter_static->fetch($obj->rowid)) { @@ -216,28 +227,28 @@ class Interventions extends DolibarrApi * @return int */ /* TODO - public function getLines($id) - { - if(! DolibarrApiAccess::$user->rights->ficheinter->lire) { - throw new RestException(401); - } + public function getLines($id) + { + if(! DolibarrApiAccess::$user->rights->ficheinter->lire) { + throw new RestException(401); + } - $result = $this->fichinter->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Intervention not found'); - } + $result = $this->fichinter->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Intervention not found'); + } - if( ! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->fichinter->getLinesArray(); - $result = array(); - foreach ($this->fichinter->lines as $line) { - array_push($result,$this->_cleanObjectDatas($line)); - } - return $result; - } - */ + if( ! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->fichinter->getLinesArray(); + $result = array(); + foreach ($this->fichinter->lines as $line) { + array_push($result,$this->_cleanObjectDatas($line)); + } + return $result; + } + */ /** * Add a line to given intervention @@ -270,11 +281,11 @@ class Interventions extends DolibarrApi } $updateRes = $this->fichinter->addLine( - DolibarrApiAccess::$user, - $id, - $this->fichinter->description, - $this->fichinter->date, - $this->fichinter->duree + DolibarrApiAccess::$user, + $id, + $this->fichinter->description, + $this->fichinter->date, + $this->fichinter->duree ); if ($updateRes > 0) { @@ -369,8 +380,7 @@ class Interventions extends DolibarrApi */ public function closeFichinter($id) { - if (!DolibarrApiAccess::$user->rights->ficheinter->creer) - { + if (!DolibarrApiAccess::$user->rights->ficheinter->creer) { throw new RestException(401, "Insuffisant rights"); } $result = $this->fichinter->fetch($id); @@ -408,8 +418,9 @@ class Interventions extends DolibarrApi { $fichinter = array(); foreach (Interventions::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $fichinter[$field] = $data[$field]; } return $fichinter; @@ -447,8 +458,9 @@ class Interventions extends DolibarrApi { $fichinter = array(); foreach (Interventions::$FIELDSLINE as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $fichinter[$field] = $data[$field]; } return $fichinter; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 39ac094132a..1c1c1ab37be 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -204,8 +204,7 @@ class Fichinter extends CommonObject $sql = "SELECT count(fi.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as fi"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON fi.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -213,10 +212,8 @@ class Fichinter extends CommonObject $sql .= " ".$clause." fi.entity IN (".getEntity('intervention').")"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["interventions"] = $obj->nb; } $this->db->free($resql); @@ -244,21 +241,20 @@ class Fichinter extends CommonObject dol_syslog(get_class($this)."::create ref=".$this->ref); // Check parameters - if (!empty($this->ref)) // We check that ref is not already used - { + if (!empty($this->ref)) { // We check that ref is not already used $result = self::isExistingObject($this->element, 0, $this->ref); // Check ref is not yet used - if ($result > 0) - { + if ($result > 0) { $this->error = 'ErrorRefAlreadyExists'; dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); $this->db->rollback(); return -1; } } - if (!is_numeric($this->duration)) $this->duration = 0; + if (!is_numeric($this->duration)) { + $this->duration = 0; + } - if ($this->socid <= 0) - { + if ($this->socid <= 0) { $this->error = 'ErrorBadParameterForFunc'; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; @@ -304,42 +300,42 @@ class Fichinter extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."fichinter"); - if ($this->id) - { + if ($this->id) { $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."fichinter SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX."fichinter SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) $error++; + if (!$resql) { + $error++; + } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } // Add linked object - if (!$error && $this->origin && $this->origin_id) - { + if (!$error && $this->origin && $this->origin_id) { $ret = $this->add_object_linked(); - if (!$ret) dol_print_error($this->db); + if (!$ret) { + dol_print_error($this->db); + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('FICHINTER_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } @@ -370,14 +366,14 @@ class Fichinter extends CommonObject { global $conf; - if (!is_numeric($this->duration)) { - $this->duration = 0; - } - if (!dol_strlen($this->fk_project)) { - $this->fk_project = 0; - } + if (!is_numeric($this->duration)) { + $this->duration = 0; + } + if (!dol_strlen($this->fk_project)) { + $this->fk_project = 0; + } - $error = 0; + $error = 0; $this->db->begin(); @@ -391,22 +387,20 @@ class Fichinter extends CommonObject $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::update", LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$error) - { + if ($this->db->query($sql)) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('FICHINTER_MODIFY', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } + if ($result < 0) { + $error++; $this->db->rollback(); return -1; + } // End call triggers } @@ -437,14 +431,14 @@ 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=".((int) $rowid); + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -470,7 +464,9 @@ class Fichinter extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); - if ($this->statut == 0) $this->brouillon = 1; + if ($this->statut == 0) { + $this->brouillon = 1; + } // Retrieve extrafields $this->fetch_optionals(); @@ -479,8 +475,7 @@ class Fichinter extends CommonObject * Lines */ $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } $this->db->free($resql); @@ -505,8 +500,7 @@ class Fichinter extends CommonObject $error = 0; // Protection - if ($this->statut <= self::STATUS_DRAFT) - { + if ($this->statut <= self::STATUS_DRAFT) { return 0; } @@ -519,8 +513,7 @@ class Fichinter extends CommonObject $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { if (!$error) { $this->oldcopy = clone $this; } @@ -528,7 +521,9 @@ class Fichinter extends CommonObject if (!$error) { // Call trigger $result = $this->call_trigger('FICHINTER_UNVALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { @@ -560,15 +555,13 @@ class Fichinter extends CommonObject $error = 0; - if ($this->statut != 1) - { + if ($this->statut != 1) { $this->db->begin(); $now = dol_now(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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 { $num = $this->ref; @@ -586,51 +579,48 @@ class Fichinter extends CommonObject dol_syslog(get_class($this)."::setValid", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('FICHINTER_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { + if (preg_match('/^[\(]?PROV/i', $this->ref)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // 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 = 'ficheinter/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'ficheinter/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->ficheinter->dir_output.'/'.$oldref; $dirdest = $conf->ficheinter->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::setValid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->ficheinter->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -643,8 +633,7 @@ class Fichinter extends CommonObject } // Set new ref and define current statut - if (!$error) - { + if (!$error) { $this->ref = $num; $this->statut = 1; $this->brouillon = 0; @@ -740,8 +729,7 @@ class Fichinter extends CommonObject { // phpcs:enable // Init/load array of translation of status - if (empty($this->statuts) || empty($this->statuts_short) || empty($this->statuts_logo)) - { + if (empty($this->statuts) || empty($this->statuts_short) || empty($this->statuts_logo)) { global $langs; $langs->load("fichinter"); @@ -785,19 +773,20 @@ class Fichinter extends CommonObject $url = DOL_URL_ROOT.'/fichinter/card.php?id='.$this->id; - if ($option !== 'nolink') - { + 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'; - } + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowIntervention"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -817,16 +806,23 @@ class Fichinter extends CommonObject $linkend = '</a>'; $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; + 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; global $action; $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; - else $result .= $hookmanager->resPrint; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -844,8 +840,7 @@ class Fichinter extends CommonObject global $conf, $db, $langs; $langs->load("interventions"); - if (!empty($conf->global->FICHEINTER_ADDON)) - { + if (!empty($conf->global->FICHEINTER_ADDON)) { $mybool = false; $file = "mod_".$conf->global->FICHEINTER_ADDON.".php"; @@ -870,8 +865,7 @@ class Fichinter extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { dol_print_error($db, "Fichinter::getNextNumRef ".$obj->error); @@ -902,13 +896,11 @@ class Fichinter extends CommonObject $sql .= " f.fk_user_modif as fk_user_modification,"; $sql .= " f.fk_user_valid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; - $sql .= " WHERE f.rowid = ".$id; + $sql .= " WHERE f.rowid = ".((int) $id); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -921,14 +913,12 @@ class Fichinter extends CommonObject $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; - if ($obj->fk_user_valid) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_modification) - { + if ($obj->fk_user_modification) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modification); $this->user_modification = $muser; @@ -956,27 +946,27 @@ class Fichinter extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('FICHINTER_DELETE', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } + if ($result < 0) { + $error++; $this->db->rollback(); return -1; + } // End call triggers } // Delete linked object - if (!$error) - { + if (!$error) { $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } // Delete linked contacts - if (!$error) - { + if (!$error) { $res = $this->delete_linked_contact(); - if ($res < 0) - { + if ($res < 0) { $this->error = 'ErrorFailToDeleteLinkedContact'; $error++; } @@ -988,62 +978,61 @@ class Fichinter extends CommonObject $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = ".$this->id.")"; $resql = $this->db->query($sql); - if (!$resql) $error++; + if (!$resql) { + $error++; + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet"; $sql .= " WHERE fk_fichinter = ".$this->id; $resql = $this->db->query($sql); - if (!$resql) $error++; + if (!$resql) { + $error++; + } } - if (!$error) - { + if (!$error) { // Remove extrafields $res = $this->deleteExtraFields(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Delete object $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter"; $sql .= " WHERE rowid = ".$this->id; dol_syslog("Fichinter::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) $error++; + if (!$resql) { + $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(); // Remove directory with files $fichinterref = dol_sanitizeFileName($this->ref); - if ($conf->ficheinter->dir_output) - { + if ($conf->ficheinter->dir_output) { $dir = $conf->ficheinter->dir_output."/".$fichinterref; $file = $conf->ficheinter->dir_output."/".$fichinterref."/".$fichinterref.".pdf"; - if (file_exists($file)) - { + if (file_exists($file)) { dol_delete_preview($this); - if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers - { + if (!dol_delete_file($file, 0, 0, 0, $this)) { // For triggers $langs->load("errors"); $this->error = $langs->trans("ErrorFailToDeleteFile", $file); return 0; } } - if (file_exists($dir)) - { - if (!dol_delete_dir_recursive($dir)) - { + if (file_exists($dir)) { + if (!dol_delete_dir_recursive($dir)) { $langs->load("errors"); $this->error = $langs->trans("ErrorFailToDeleteDir", $dir); return 0; @@ -1052,8 +1041,7 @@ class Fichinter extends CommonObject } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1075,15 +1063,13 @@ class Fichinter extends CommonObject // phpcs:enable global $conf; - if ($user->rights->ficheinter->creer) - { + if ($user->rights->ficheinter->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter "; $sql .= " SET datei = '".$this->db->idate($date_delivery)."'"; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND fk_statut = 0"; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->date_delivery = $date_delivery; return 1; } else { @@ -1107,15 +1093,13 @@ class Fichinter extends CommonObject // phpcs:enable global $conf; - if ($user->rights->ficheinter->creer) - { + if ($user->rights->ficheinter->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter "; $sql .= " SET description = '".$this->db->escape($description)."',"; $sql .= " fk_user_modif = ".$user->id; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->description = $description; return 1; } else { @@ -1140,14 +1124,12 @@ class Fichinter extends CommonObject // phpcs:enable global $conf; - if ($user->rights->ficheinter->creer) - { + if ($user->rights->ficheinter->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter "; $sql .= " SET fk_contrat = ".((int) $contractid); $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->fk_contrat = $contractid; return 1; } else { @@ -1176,19 +1158,18 @@ class Fichinter extends CommonObject $this->db->begin(); // get extrafields so they will be clone - foreach ($this->lines as $line) + foreach ($this->lines as $line) { $line->fetch_optionals(); + } // Load source object $objFrom = clone $this; // Change socid if needed - if (!empty($socid) && $socid != $this->socid) - { + if (!empty($socid) && $socid != $this->socid) { $objsoc = new Societe($this->db); - if ($objsoc->fetch($socid) > 0) - { + if ($objsoc->fetch($socid) > 0) { $this->socid = $objsoc->id; //$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); //$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); @@ -1213,31 +1194,31 @@ class Fichinter extends CommonObject // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Add lines because it is not included into create function - foreach ($this->lines as $line) - { + foreach ($this->lines as $line) { $this->addline($user, $this->id, $line->desc, $line->datei, $line->duration); } // Hook of thirdparty module - if (is_object($hookmanager)) - { + 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 ($reshook < 0) { + $error++; + } } } unset($this->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1262,8 +1243,7 @@ class Fichinter extends CommonObject { dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration"); - if ($this->statut == 0) - { + if ($this->statut == 0) { $this->db->begin(); // Insertion ligne @@ -1280,8 +1260,7 @@ class Fichinter extends CommonObject $result = $line->insert($user); - if ($result >= 0) - { + if ($result >= 0) { $this->db->commit(); return 1; } else { @@ -1317,8 +1296,7 @@ class Fichinter extends CommonObject $this->duration = 0; $nbp = 25; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new FichinterLigne($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->datei = ($now - 3600 * (1 + $xnbp)); @@ -1348,12 +1326,10 @@ class Fichinter extends CommonObject dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($resql); $line = new FichinterLigne($this->db); @@ -1462,12 +1438,11 @@ class FichinterLigne extends CommonObjectLine $sql = 'SELECT ft.rowid, ft.fk_fichinter, ft.description, ft.duree, ft.rang,'; $sql .= ' ft.date as datei'; $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; - $sql .= ' WHERE ft.rowid = '.$rowid; + $sql .= ' WHERE ft.rowid = '.((int) $rowid); dol_syslog("FichinterLigne::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); $this->rowid = $objp->rowid; $this->id = $objp->rowid; @@ -1503,14 +1478,12 @@ class FichinterLigne extends CommonObjectLine $this->db->begin(); $rangToUse = $this->rang; - if ($rangToUse == -1) - { + if ($rangToUse == -1) { // Recupere rang max de la ligne d'intervention dans $rangmax $sql = 'SELECT max(rang) as max FROM '.MAIN_DB_PREFIX.'fichinterdet'; $sql .= ' WHERE fk_fichinter ='.$this->fk_fichinter; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $rangToUse = $obj->max + 1; } else { @@ -1532,16 +1505,13 @@ class FichinterLigne extends CommonObjectLine dol_syslog("FichinterLigne::insert", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'fichinterdet'); $this->rowid = $this->id; - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } @@ -1549,15 +1519,15 @@ class FichinterLigne extends CommonObjectLine $result = $this->update_total(); - if ($result > 0) - { + if ($result > 0) { $this->rang = $rangToUse; - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINEFICHINTER_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } @@ -1602,31 +1572,27 @@ class FichinterLigne extends CommonObjectLine dol_syslog("FichinterLigne::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$error) - { + if ($resql) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } $result = $this->update_total(); - if ($result > 0) - { - if (!$notrigger) - { + if ($result > 0) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINEFICHINTER_UPDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error) - { + if (!$error) { $this->db->commit(); return $result; } else { @@ -1656,26 +1622,26 @@ class FichinterLigne extends CommonObjectLine $sql = "SELECT SUM(duree) as total_duration, min(date) as dateo, max(date) as datee "; $sql .= " FROM ".MAIN_DB_PREFIX."fichinterdet"; - $sql .= " WHERE fk_fichinter=".$this->fk_fichinter; + $sql .= " WHERE fk_fichinter=".((int) $this->fk_fichinter); dol_syslog("FichinterLigne::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $total_duration = 0; - if (!empty($obj->total_duration)) $total_duration = $obj->total_duration; + if (!empty($obj->total_duration)) { + $total_duration = $obj->total_duration; + } $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter"; - $sql .= " SET duree = ".$total_duration; + $sql .= " SET duree = ".((int) $total_duration); $sql .= " , dateo = ".(!empty($obj->dateo) ? "'".$this->db->idate($obj->dateo)."'" : "null"); $sql .= " , datee = ".(!empty($obj->datee) ? "'".$this->db->idate($obj->datee)."'" : "null"); - $sql .= " WHERE rowid = ".$this->fk_fichinter; + $sql .= " WHERE rowid = ".((int) $this->fk_fichinter); dol_syslog("FichinterLigne::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -1703,8 +1669,7 @@ class FichinterLigne extends CommonObjectLine $error = 0; - if ($this->statut == 0) - { + if ($this->statut == 0) { dol_syslog(get_class($this)."::deleteline lineid=".$this->id); $this->db->begin(); @@ -1718,16 +1683,15 @@ class FichinterLigne extends CommonObjectLine $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $result = $this->update_total(); - if ($result > 0) - { - if (!$notrigger) - { + if ($result > 0) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINEFICHINTER_DELETE', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } + if ($result < 0) { + $error++; $this->db->rollback(); return -1; + } // End call triggers } diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 418e1232bb8..4fe35c32a2c 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -214,8 +214,8 @@ class FichinterRec extends Fichinter $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); /* - * Lines - */ + * Lines + */ $num = count($fichintsrc->lines); for ($i = 0; $i < $num; $i++) { //var_dump($fichintsrc->lines[$i]); @@ -239,13 +239,14 @@ class FichinterRec extends Fichinter $fichintsrc->lines[$i]->fk_unit ); - if ($result_insert < 0) + if ($result_insert < 0) { $error++; + } } - if ($error) + if ($error) { $this->db->rollback(); - else { + } else { $this->db->commit(); return $this->id; } @@ -277,8 +278,11 @@ class FichinterRec extends Fichinter $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)."'"; + 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); @@ -421,17 +425,19 @@ class FichinterRec extends Fichinter */ public function delete($rowid = 0, $notrigger = 0, $idwarehouse = -1) { - if (empty($rowid)) $rowid = $this->id; + 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; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet_rec WHERE fk_fichinter = ".((int) $rowid); dol_syslog($sql); if ($this->db->query($sql)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter_rec WHERE rowid = ".$rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter_rec WHERE rowid = ".((int) $rowid); dol_syslog($sql); if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); @@ -481,14 +487,20 @@ class FichinterRec extends Fichinter include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Check parameters - if ($type < 0) return -1; + 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; + if (!$qty) { + $qty = 1; + } + if (!$info_bits) { + $info_bits = 0; + } $pu_ht = price2num($pu_ht); $pu_ttc = price2num($pu_ttc); if (!preg_match('/\((.*)\)/', $txtva)) { @@ -623,7 +635,9 @@ class FichinterRec extends Fichinter $url = DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$this->id; - if ($short) return $url; + if ($short) { + return $url; + } $picto = 'intervention'; @@ -709,7 +723,9 @@ class FichinterRec extends Fichinter dol_syslog(get_class($this)."::setFrequencyAndUnit", LOG_DEBUG); if ($this->db->query($sql)) { $this->frequency = $frequency; - if (!empty($unit)) $this->unit_frequency = $unit; + if (!empty($unit)) { + $this->unit_frequency = $unit; + } return 1; } else { dol_print_error($this->db); @@ -732,13 +748,17 @@ class FichinterRec extends Fichinter } $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'; + 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++; + if ($increment_nb_gen_done > 0) { + $this->nb_gen_done++; + } return 1; } else { dol_print_error($this->db); @@ -759,11 +779,13 @@ class FichinterRec extends Fichinter return -1; } - if (empty($nb)) $nb = 0; + if (empty($nb)) { + $nb = 0; + } $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET nb_gen_max = '.$nb; - $sql .= ' WHERE rowid = '.$this->id; + $sql .= ' SET nb_gen_max = '.((int) $nb); + $sql .= ' WHERE rowid = '.((int) $this->id); dol_syslog(get_class($this)."::setMaxPeriod", LOG_DEBUG); if ($this->db->query($sql)) { @@ -789,8 +811,8 @@ class FichinterRec extends Fichinter } $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET auto_validate = '.$validate; - $sql .= ' WHERE rowid = '.$this->id; + $sql .= ' SET auto_validate = '.((int) $validate); + $sql .= ' WHERE rowid = '.((int) $this->id); dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); if ($this->db->query($sql)) { @@ -818,8 +840,9 @@ class FichinterRec extends Fichinter $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) + if ($this->nb_gen_max == $this->nb_gen_done + 1) { $sql .= ' , statut = 1'; + } $sql .= ' WHERE rowid = '.$this->id; diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 5df841bf6f2..297aeca7760 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -64,8 +64,7 @@ class FichinterStats extends Stats $this->userid = $userid; $this->cachefilesuffix = $mode; - if ($mode == 'customer') - { + if ($mode == 'customer') { $object = new Fichinter($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; @@ -73,14 +72,17 @@ class FichinterStats extends Stats $this->field_line = '0'; //$this->where.= " AND c.fk_statut > 0"; // Not draft and not cancelled } - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$this->socid) { + $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); + } $this->where .= ($this->where ? ' AND ' : '')."c.entity IN (".getEntity('fichinter').')'; - if ($this->socid) - { - $this->where .= " AND c.fk_soc = ".$this->socid; + if ($this->socid) { + $this->where .= " AND c.fk_soc = ".((int) $this->socid); + } + if ($this->userid > 0) { + $this->where .= ' AND c.fk_user_author = '.((int) $this->userid); } - if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; } /** @@ -96,7 +98,9 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -118,7 +122,9 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -139,7 +145,9 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -161,7 +169,9 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%m') as dm, 0"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.date_valid BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -181,7 +191,9 @@ class FichinterStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, 0 as total, 0 as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); diff --git a/htdocs/fichinter/class/index.html b/htdocs/fichinter/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index bace3d10231..7957479e611 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -39,13 +39,14 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); $result = $object->fetch($id, $ref); -if (!$result) -{ +if (!$result) { print 'Record not found'; exit; } @@ -54,17 +55,14 @@ if (!$result) * Adding a new contact */ -if ($action == 'addcontact' && $user->rights->ficheinter->creer) -{ - if ($result > 0 && $id > 0) - { +if ($action == 'addcontact' && $user->rights->ficheinter->creer) { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -77,21 +75,14 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer) setEventMessages($mesg, null, 'errors'); } -} - -// Toggle the status of a contact -elseif ($action == 'swapstatut' && $user->rights->ficheinter->creer) -{ +} elseif ($action == 'swapstatut' && $user->rights->ficheinter->creer) { + // Toggle the status of a contact $result = $object->swapContactStatus(GETPOST('ligne', 'int')); -} - -// Deletes a contact -elseif ($action == 'deletecontact' && $user->rights->ficheinter->creer) -{ +} elseif ($action == 'deletecontact' && $user->rights->ficheinter->creer) { + // Deletes a contact $result = $object->delete_contact(GETPOST('lineid', 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -114,8 +105,7 @@ llxHeader('', $langs->trans("Intervention")); // Mode vue et edition -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = fichinter_prepare_head($object); @@ -133,12 +123,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->ficheinter->creer) - { + if ($user->rights->ficheinter->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; @@ -174,15 +162,20 @@ if ($id > 0 || !empty($ref)) print '<br>'; - if (!empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser = 1; - if (!empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_THIPARTY)) $hideaddcontactforthirdparty = 1; + if (!empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_USER)) { + $hideaddcontactforuser = 1; + } + if (!empty($conf->global->FICHINTER_HIDE_ADD_CONTACT_THIPARTY)) { + $hideaddcontactforthirdparty = 1; + } // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 0795072fa55..576e6be0e5e 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -47,7 +47,9 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); @@ -56,12 +58,18 @@ $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 +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"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Fichinter($db); @@ -75,7 +83,7 @@ $modulepart = 'fichinter'; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -86,8 +94,7 @@ $form = new Form($db); llxHeader('', $langs->trans("Intervention")); -if ($object->id) -{ +if ($object->id) { $object->fetch_thirdparty(); $head = fichinter_prepare_head($object); @@ -98,8 +105,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -115,12 +121,10 @@ if ($object->id) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 3ea69f8d185..2d69046b4ba 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -30,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -if (!$user->rights->ficheinter->lire) accessforbidden(); +if (!$user->rights->ficheinter->lire) { + accessforbidden(); +} $hookmanager = new HookManager($db); @@ -42,8 +44,7 @@ $langs->load("interventions"); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -66,21 +67,6 @@ print load_fiche_titre($langs->trans("InterventionsArea"), '', 'intervention'); print '<div class="fichecenter"><div class="fichethirdleft">'; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - // Search ficheinter - $var = false; - print '<form method="post" action="'.DOL_URL_ROOT.'/fichinter/list.php">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; - print '<tr class="oddeven"><td>'; - print $langs->trans("Intervention").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; - print "</table></div></form><br>\n"; -} - - /* * Statistics */ @@ -88,15 +74,20 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $sql = "SELECT count(f.rowid), f.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."fichinter as f"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.fk_soc = s.rowid"; -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; +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) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -106,15 +97,15 @@ if ($resql) $vals = array(); $bool = false; // -1=Canceled, 0=Draft, 1=Validated, 2=Accepted/On process, 3=Closed (Sent/Received, billed or not) - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); - if ($row) - { + if ($row) { //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) { $bool = (!empty($row[2]) ?true:false); - if (!isset($vals[$row[1].$bool])) $vals[$row[1].$bool] = 0; + if (!isset($vals[$row[1].$bool])) { + $vals[$row[1].$bool] = 0; + } $vals[$row[1].$bool] += $row[0]; $totalinprocess += $row[0]; } @@ -124,26 +115,35 @@ if ($resql) } $db->free($resql); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n"; $listofstatus = array(0, 1, 3); $bool = false; - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array($fichinterstatic->LibStatut($status, $bool, 1), (isset($vals[$status.$bool]) ? (int) $vals[$status.$bool] : 0)); - if ($status == 3 && !$bool) $bool = true; - else $bool = false; + if ($status == 3 && !$bool) { + $bool = true; + } else { + $bool = false; + } - if ($status == Fichinter::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == Fichinter::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == Fichinter::STATUS_BILLED) $colorseries[$status] = $badgeStatus4; - if ($status == Fichinter::STATUS_CLOSED) $colorseries[$status] = $badgeStatus6; + if ($status == Fichinter::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Fichinter::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Fichinter::STATUS_BILLED) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == Fichinter::STATUS_CLOSED) { + $colorseries[$status] = $badgeStatus6; + } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr class="impair"><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -160,10 +160,8 @@ if ($resql) print '</td></tr>'; } $bool = false; - foreach ($listofstatus as $status) - { - if (!$conf->use_javascript_ajax) - { + foreach ($listofstatus as $status) { + if (!$conf->use_javascript_ajax) { print '<tr class="oddeven">'; print '<td>'.$fichinterstatic->LibStatut($status, $bool, 0).'</td>'; print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' '; @@ -171,8 +169,11 @@ if ($resql) print '</a>'; print '</td>'; print "</tr>\n"; - if ($status == 3 && !$bool) $bool = true; - else $bool = false; + if ($status == 3 && !$bool) { + $bool = true; + } else { + $bool = false; + } } } //if ($totalinprocess != $total) @@ -187,32 +188,34 @@ if ($resql) /* * Draft orders */ -if (!empty($conf->ficheinter->enabled)) -{ +if (!empty($conf->ficheinter->enabled)) { $sql = "SELECT f.rowid, f.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.fk_statut = 0"; - 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; + 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; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="2">'.$langs->trans("DraftFichinter").'</th></tr>'; $langs->load("fichinter"); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; print '<td class="nowrap">'; @@ -239,29 +242,32 @@ $sql = "SELECT f.rowid, f.ref, f.fk_statut, f.date_valid as datec, f.tms as date $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.fk_soc = s.rowid"; //$sql.= " AND c.fk_statut > 2"; -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; +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($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="4">'.$langs->trans("LastModifiedInterventions", $max).'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -296,29 +302,35 @@ if ($resql) } } print "</table></div><br>"; -} else dol_print_error($db); +} else { + dol_print_error($db); +} /* * interventions to process */ -if (!empty($conf->ficheinter->enabled)) -{ +if (!empty($conf->ficheinter->enabled)) { $sql = "SELECT f.rowid, f.ref, f.fk_statut, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.fk_statut = 1"; - 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; + 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.rowid DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '<div class="div-table-responsive-no-min">'; @@ -326,11 +338,9 @@ if (!empty($conf->ficheinter->enabled)) print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("FichinterToProcess").' <a href="'.DOL_URL_ROOT.'/fichinter/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>'; - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; print '<td class="nowrap" width="20%">'; @@ -366,7 +376,9 @@ if (!empty($conf->ficheinter->enabled)) } print "</table></div><br>"; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } print '</div></div></div>'; diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index a53c69b77bd..39ac695f84e 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -40,13 +40,14 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); -if (!$object->fetch($id, $ref) > 0) -{ +if (!$object->fetch($id, $ref) > 0) { dol_print_error($db); exit; } @@ -77,15 +78,14 @@ $morehtmlref = '<div class="refidno">'; // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { - if ($action != 'classify') + if ($user->rights->commande->creer) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a7b127a4f07..165ccd11458 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -32,13 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; +if (!empty($conf->projet->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +} +if (!empty($conf->contrat->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('companies', 'bills', 'interventions')); -if (!empty($conf->projet->enabled)) $langs->load("projects"); -if (!empty($conf->contrat->enabled)) $langs->load("contracts"); +if (!empty($conf->projet->enabled)) { + $langs->load("projects"); +} +if (!empty($conf->contrat->enabled)) { + $langs->load("contracts"); +} $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -59,7 +67,9 @@ $socid = GETPOST('socid', 'int'); // Security check $id = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $diroutputmassaction = $conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id; @@ -68,14 +78,17 @@ $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 +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 = "f.ref"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.ref"; } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -97,8 +110,12 @@ $fieldstosearchall = array( '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['fd.description']); +if (empty($user->socid)) { + $fieldstosearchall["f.note_private"] = "NotePrivate"; +} +if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) { + unset($fieldstosearchall['fd.description']); +} // Definition of fields for list $arrayfields = array( @@ -127,21 +144,25 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_company = ""; $search_projet_ref = ""; @@ -187,10 +208,8 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $atleastonefieldinlines = 0; -foreach ($arrayfields as $tmpkey => $tmpval) -{ - if (preg_match('/^fd\./', $tmpkey) && !empty($arrayfields[$tmpkey]['checked'])) - { +foreach ($arrayfields as $tmpkey => $tmpval) { + if (preg_match('/^fd\./', $tmpkey) && !empty($arrayfields[$tmpkey]['checked'])) { $atleastonefieldinlines++; break; } @@ -198,7 +217,9 @@ 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_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,"; +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)) { $sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title"; @@ -208,7 +229,9 @@ if (!empty($conf->contrat->enabled)) { } // 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(); @@ -221,13 +244,22 @@ if (!empty($conf->projet->enabled)) { if (!empty($conf->contrat->enabled)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid"; } -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 (f.rowid = ef.fk_object)"; -if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; +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 (f.rowid = ef.fk_object)"; +} +if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) +{ + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; +} // 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 (!$user->rights->societe->client->voir && empty($socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && empty($socid)) +{ + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.fk_soc = s.rowid"; @@ -244,16 +276,21 @@ if ($search_contrat_ref) { $sql .= natural_search('c.ref', $search_contrat_ref); } if ($search_desc) { - if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= natural_search(array('f.description', 'fd.description'), $search_desc); - else $sql .= natural_search(array('f.description'), $search_desc); + if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) { + $sql .= natural_search(array('f.description', 'fd.description'), $search_desc); + } else { + $sql .= natural_search(array('f.description'), $search_desc); + } } if ($search_status != '' && $search_status >= 0) { $sql .= ' AND f.fk_statut = '.urlencode($search_status); } -if (!$user->rights->societe->client->voir && empty($socid)) +if (!$user->rights->societe->client->voir && empty($socid)) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if ($socid) - $sql .= " AND s.rowid = ".$socid; +} +if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); +} if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -271,12 +308,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -286,52 +321,80 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($socid > 0) - { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); - if (empty($search_company)) $search_company = $soc->name; + if (empty($search_company)) { + $search_company = $soc->name; + } } $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) $param .= "&socid=".urlencode($socid); - if ($search_ref) $param .= "&search_ref=".urlencode($search_ref); - if ($search_company) $param .= "&search_company=".urlencode($search_company); - if ($search_desc) $param .= "&search_desc=".urlencode($search_desc); - if ($search_status != '' && $search_status > -1) $param .= "&search_status=".urlencode($search_status); - if ($show_files) $param .= '&show_files='.urlencode($show_files); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + 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) { + $param .= "&socid=".urlencode($socid); + } + if ($search_ref) { + $param .= "&search_ref=".urlencode($search_ref); + } + if ($search_company) { + $param .= "&search_company=".urlencode($search_company); + } + if ($search_desc) { + $param .= "&search_desc=".urlencode($search_desc); + } + if ($search_status != '' && $search_status > -1) { + $param .= "&search_status=".urlencode($search_status); + } + if ($show_files) { + $param .= '&show_files='.urlencode($show_files); + } + 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( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), ); - if ($user->rights->ficheinter->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if ($user->rights->ficheinter->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; $url = DOL_URL_ROOT.'/fichinter/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + 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 '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -347,9 +410,10 @@ if ($resql) $trackid = 'int'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -357,48 +421,47 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; } - if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['f.ref']['checked'])) - { + if (!empty($arrayfields['f.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="8">'; print '</td>'; } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">'; print '</td>'; } - if (!empty($arrayfields['pr.ref']['checked'])) - { + if (!empty($arrayfields['pr.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_projet_ref" value="'.$search_projet_ref.'" size="8">'; print '</td>'; } - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_contrat_ref" value="'.$search_contrat_ref.'" size="8">'; print '</td>'; } - if (!empty($arrayfields['f.description']['checked'])) - { + if (!empty($arrayfields['f.description']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">'; print '</td>'; @@ -410,51 +473,45 @@ if ($resql) $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['f.datec']['checked'])) - { + if (!empty($arrayfields['f.datec']['checked'])) { // Date creation print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['f.tms']['checked'])) - { + if (!empty($arrayfields['f.tms']['checked'])) { // Date modification print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['f.note_public']['checked'])) - { + if (!empty($arrayfields['f.note_public']['checked'])) { // Note public print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['f.note_private']['checked'])) - { + if (!empty($arrayfields['f.note_private']['checked'])) { // Note private print '<td class="liste_titre">'; print '</td>'; } // Status - if (!empty($arrayfields['f.fk_statut']['checked'])) - { + if (!empty($arrayfields['f.fk_statut']['checked'])) { print '<td class="liste_titre right">'; $tmp = $objectstatic->LibStatut(0); // To load $this->statuts_short $liststatus = $objectstatic->statuts_short; - if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 + if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { + unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 + } print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); print '</td>'; } // Fields of detail line - if (!empty($arrayfields['fd.description']['checked'])) - { + if (!empty($arrayfields['fd.description']['checked'])) { print '<td class="liste_titre">&nbsp;</td>'; } - if (!empty($arrayfields['fd.date']['checked'])) - { + if (!empty($arrayfields['fd.date']['checked'])) { print '<td class="liste_titre">&nbsp;</td>'; } - if (!empty($arrayfields['fd.duree']['checked'])) - { + if (!empty($arrayfields['fd.duree']['checked'])) { print '<td class="liste_titre">&nbsp;</td>'; } print '<td class="liste_titre maxwidthsearch">'; @@ -465,33 +522,58 @@ if ($resql) print "</tr>\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.description']['checked'])) print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['f.ref']['checked'])) { + print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['pr.ref']['checked'])) { + print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['c.ref']['checked'])) { + print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.description']['checked'])) { + print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $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['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 '); - if (!empty($arrayfields['fd.duree']['checked'])) print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right '); + 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 '); + } + if (!empty($arrayfields['fd.duree']['checked'])) { + print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; $total = 0; $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $objectstatic->id = $obj->rowid; @@ -508,8 +590,7 @@ if ($resql) print '<tr class="oddeven">'; - if (!empty($arrayfields['f.ref']['checked'])) - { + if (!empty($arrayfields['f.ref']['checked'])) { print "<td>"; print '<table class="nobordernopadding"><tr class="nocellnopadd">'; @@ -520,15 +601,13 @@ if ($resql) // Warning $warnornote = ''; //if ($obj->fk_statut == 1 && $db->jdate($obj->dfv) < ($now - $conf->fichinter->warning_delay)) $warnornote.=img_warning($langs->trans("Late")); - if (!empty($obj->note_private)) - { + if (!empty($obj->note_private)) { $warnornote .= ($warnornote ? ' ' : ''); $warnornote .= '<span class="note">'; $warnornote .= '<a href="note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').'</a>'; $warnornote .= '</span>'; } - if ($warnornote) - { + if ($warnornote) { print '<td style="min-width: 20px" class="nobordernopadding nowrap">'; print $warnornote; print '</td>'; @@ -543,17 +622,19 @@ if ($resql) print '</td></tr></table>'; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td>'; print $companystatic->getNomUrl(1, '', 44); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['pr.ref']['checked'])) - { + if (!empty($arrayfields['pr.ref']['checked'])) { print '<td>'; $projetstatic->id = $obj->projet_id; $projetstatic->ref = $obj->projet_ref; @@ -562,10 +643,11 @@ if ($resql) print $projetstatic->getNomUrl(1, ''); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print '<td>'; $contratstatic->id = $obj->contrat_id; $contratstatic->ref = $obj->contrat_ref; @@ -575,12 +657,15 @@ if ($resql) print $contratstatic->getNomUrl(1, ''); print '</td>'; } - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['f.description']['checked'])) - { + if (!empty($arrayfields['f.description']['checked'])) { print '<td>'.dol_trunc(dolGetFirstLineOfText($obj->description), 48).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -590,71 +675,84 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['f.datec']['checked'])) - { + if (!empty($arrayfields['f.datec']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['f.tms']['checked'])) - { + if (!empty($arrayfields['f.tms']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note public - if (!empty($arrayfields['f.note_public']['checked'])) - { + if (!empty($arrayfields['f.note_public']['checked'])) { print '<td class="center">'; print dol_escape_htmltag($obj->note_public); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note private - if (!empty($arrayfields['f.note_private']['checked'])) - { + if (!empty($arrayfields['f.note_private']['checked'])) { print '<td class="center">'; print dol_escape_htmltag($obj->note_private); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['f.fk_statut']['checked'])) - { + if (!empty($arrayfields['f.fk_statut']['checked'])) { print '<td class="right">'.$objectstatic->getLibStatut(5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Fields of detail of line - if (!empty($arrayfields['fd.description']['checked'])) - { + if (!empty($arrayfields['fd.description']['checked'])) { print '<td>'.dolGetFirstLineOfText($obj->descriptiondetail).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['fd.date']['checked'])) - { + if (!empty($arrayfields['fd.date']['checked'])) { print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'dayhour')."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['fd.duree']['checked'])) - { + if (!empty($arrayfields['fd.duree']['checked'])) { print '<td class="right">'.convertSecondToTime($obj->duree, 'allhourmin').'</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'fd.duree'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'fd.duree'; + } $totalarray['val']['fd.duree'] += $obj->duree; } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; @@ -677,7 +775,9 @@ if ($resql) print "</form>\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index dddbe79e33e..fcc790bf8c2 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -39,7 +39,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); @@ -62,8 +64,7 @@ llxHeader('', $langs->trans("Intervention")); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = fichinter_prepare_head($object); @@ -80,12 +81,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { + if ($user->rights->commande->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 19e7f86d8a0..29a5f9976b0 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -30,13 +30,14 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $mode = 'customer'; -if (!$user->rights->ficheinter->lire) accessforbidden(); +if (!$user->rights->ficheinter->lire) { + accessforbidden(); +} $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -70,15 +71,16 @@ 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->sanitize($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); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +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 { @@ -88,12 +90,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -115,8 +115,7 @@ if (!$mesg) $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +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 { @@ -126,12 +125,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -152,8 +149,7 @@ if (!$mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) -{ +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 { @@ -163,12 +159,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -196,7 +190,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); @@ -236,13 +232,19 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; print '<tr><td class="left">'.$langs->trans("Status").'</td><td class="left">'; $tmp = $objectstatic->LibStatut(0); // To load $this->statuts_short $liststatus = $objectstatic->statuts_short; - if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 +if (empty($conf->global->FICHINTER_CLASSIFY_BILLED)) { + unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 +} print $form->selectarray('object_status', $liststatus, $object_status, 1, 0, 0, '', 1); print '</td></tr>'; // Year print '<tr><td class="left">'.$langs->trans("Year").'</td><td class="left">'; - if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; - if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -265,11 +267,9 @@ print '<td class="right">%</td>'; print '</tr>'; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; @@ -307,12 +307,14 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; // Show graphs print '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; -if ($mesg) { print $mesg; } else { +if ($mesg) { + print $mesg; +} else { print $px1->show(); /*print "<br>\n"; - print $px2->show(); - print "<br>\n"; - print $px3->show();*/ + print $px2->show(); + print "<br>\n"; + print $px3->show();*/ } print '</td></tr></table>'; diff --git a/htdocs/fichinter/tpl/index.html b/htdocs/fichinter/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index b483e877e5e..ba754ec3321 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -16,8 +16,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; } @@ -36,17 +35,18 @@ $langs->load("interventions"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>"> + <tr class="<?php echo $trclass; ?>"> <td><?php echo $langs->trans("Intervention"); ?></td> - <td><?php echo $objectlink->getNomUrl(1); ?></td> - <td></td> + <td><?php echo $objectlink->getNomUrl(1); ?></td> + <td></td> <td class="center"><?php echo dol_print_date($objectlink->datev, 'day'); ?></td> <td></td> <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 7a68d2c3099..e479b1430a1 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,14 +30,19 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (!defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (!defined('DOL_VERSION')) define('DOL_VERSION', '13.0.2'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (!defined('DOL_APPLICATION_TITLE')) { + define('DOL_APPLICATION_TITLE', 'Dolibarr'); +} +if (!defined('DOL_VERSION')) { + define('DOL_VERSION', '14.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)); +if (!defined('EURO')) { + define('EURO', chr(128)); +} // Define syslog constants -if (!defined('LOG_DEBUG')) -{ +if (!defined('LOG_DEBUG')) { if (!function_exists("syslog")) { // For PHP versions without syslog (like running on Windows OS) define('LOG_EMERG', 0); @@ -52,7 +57,9 @@ if (!defined('LOG_DEBUG')) } // End of common declaration part -if (defined('DOL_INC_FOR_VERSION_ERROR')) return; +if (defined('DOL_INC_FOR_VERSION_ERROR')) { + return; +} // Define vars @@ -73,15 +80,13 @@ $conffiletoshow = "htdocs/conf/conf.php"; // Include configuration $result = @include_once $conffile; // Keep @ because with some error reporting this break the redirect done when file not found -if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done and we are in a web session -{ - if (!empty($_SERVER["CONTEXT_PREFIX"])) // CONTEXT_PREFIX and CONTEXT_DOCUMENT_ROOT are not defined on all apache versions - { +if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) { // If install not done and we are in a web session + if (!empty($_SERVER["CONTEXT_PREFIX"])) { // CONTEXT_PREFIX and CONTEXT_DOCUMENT_ROOT are not defined on all apache versions $path = $_SERVER["CONTEXT_PREFIX"]; // example '/dolibarr/' when using an apache alias. - if (!preg_match('/\/$/', $path)) $path .= '/'; - } - elseif (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) - { + if (!preg_match('/\/$/', $path)) { + $path .= '/'; + } + } elseif (preg_match('/index\.php/', $_SERVER['PHP_SELF'])) { // When we ask index.php, we MUST BE SURE that $path is '' at the end. This is required to make install process // when using apache alias like '/dolibarr/' that point to htdocs. // Note: If calling page was an index.php not into htdocs (ie comm/index.php, ...), then this redirect will fails, @@ -94,11 +99,16 @@ if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done $TDir = explode('/', $_SERVER['PHP_SELF']); $path = ''; $i = count($TDir); - while ($i--) - { - if (empty($TDir[$i]) || $TDir[$i] == 'htdocs') break; - if ($TDir[$i] == 'dolibarr') break; - if (substr($TDir[$i], -4, 4) == '.php') continue; + while ($i--) { + if (empty($TDir[$i]) || $TDir[$i] == 'htdocs') { + break; + } + if ($TDir[$i] == 'dolibarr') { + break; + } + if (substr($TDir[$i], -4, 4) == '.php') { + continue; + } $path .= '../'; } @@ -109,15 +119,16 @@ if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done } // Force PHP error_reporting setup (Dolibarr may report warning without this) -if (!empty($dolibarr_strict_mode)) -{ +if (!empty($dolibarr_strict_mode)) { error_reporting(E_ALL | E_STRICT); } else { error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED)); } // Disable php display errors -if (!empty($dolibarr_main_prod)) ini_set('display_errors', 'Off'); +if (!empty($dolibarr_main_prod)) { + ini_set('display_errors', 'Off'); +} // Clean parameters $dolibarr_main_data_root = trim($dolibarr_main_data_root); @@ -126,39 +137,63 @@ $dolibarr_main_url_root_alt = (empty($dolibarr_main_url_root_alt) ? '' : trim($d $dolibarr_main_document_root = trim($dolibarr_main_document_root); $dolibarr_main_document_root_alt = (empty($dolibarr_main_document_root_alt) ? '' : trim($dolibarr_main_document_root_alt)); -if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port = 3306; // For compatibility with old configs, if not defined, we take 'mysql' type -if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type = 'mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type +if (empty($dolibarr_main_db_port)) { + $dolibarr_main_db_port = 3306; // For compatibility with old configs, if not defined, we take 'mysql' type +} +if (empty($dolibarr_main_db_type)) { + $dolibarr_main_db_type = 'mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type +} // Mysql driver support has been removed in favor of mysqli -if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli'; -if (empty($dolibarr_main_db_prefix)) $dolibarr_main_db_prefix = 'llx_'; -if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set = ($dolibarr_main_db_type == 'mysqli' ? 'utf8' : ''); // Old installation -if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation = ($dolibarr_main_db_type == 'mysqli' ? 'utf8_unicode_ci' : ''); // Old installation -if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; -if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; -if (empty($dolibarr_main_limit_users)) $dolibarr_main_limit_users = 0; -if (empty($dolibarr_mailing_limit_sendbyweb)) $dolibarr_mailing_limit_sendbyweb = 0; -if (empty($dolibarr_mailing_limit_sendbycli)) $dolibarr_mailing_limit_sendbycli = 0; -if (empty($dolibarr_strict_mode)) $dolibarr_strict_mode = 0; // For debug in php strict mode +if ($dolibarr_main_db_type == 'mysql') { + $dolibarr_main_db_type = 'mysqli'; +} +if (empty($dolibarr_main_db_prefix)) { + $dolibarr_main_db_prefix = 'llx_'; +} +if (empty($dolibarr_main_db_character_set)) { + $dolibarr_main_db_character_set = ($dolibarr_main_db_type == 'mysqli' ? 'utf8' : ''); // Old installation +} +if (empty($dolibarr_main_db_collation)) { + $dolibarr_main_db_collation = ($dolibarr_main_db_type == 'mysqli' ? 'utf8_unicode_ci' : ''); // Old installation +} +if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; +} +if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; +} +if (empty($dolibarr_main_limit_users)) { + $dolibarr_main_limit_users = 0; +} +if (empty($dolibarr_mailing_limit_sendbyweb)) { + $dolibarr_mailing_limit_sendbyweb = 0; +} +if (empty($dolibarr_mailing_limit_sendbycli)) { + $dolibarr_mailing_limit_sendbycli = 0; +} +if (empty($dolibarr_strict_mode)) { + $dolibarr_strict_mode = 0; // For debug in php strict mode +} // Security: CSRF protection // This test check if referrer ($_SERVER['HTTP_REFERER']) is same web site than Dolibarr ($_SERVER['HTTP_HOST']) -// when we post forms (we allow GET to allow direct link to access a particular page). +// when we post forms (we allow GET and HEAD to accept direct link from a particular page). // Note about $_SERVER[HTTP_HOST/SERVER_NAME]: http://shiflett.org/blog/2006/mar/server-name-versus-http-host -// See also option $conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN for a stronger CSRF protection. -if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) -{ - if (!empty($_SERVER['REQUEST_METHOD']) && !in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD')) && !empty($_SERVER['HTTP_HOST'])) - { +// See also CSRF protections done into main.inc.php +if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) { + if (!empty($_SERVER['REQUEST_METHOD']) && !in_array($_SERVER['REQUEST_METHOD'], array('GET', 'HEAD')) && !empty($_SERVER['HTTP_HOST'])) { $csrfattack = false; - if (empty($_SERVER['HTTP_REFERER'])) $csrfattack = true; // An evil browser was used - else { + if (empty($_SERVER['HTTP_REFERER'])) { + $csrfattack = true; // An evil browser was used + } 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; + if ((empty($tmpa['host']) ? $tmpa['path'] : $tmpa['host']) != (empty($tmpb['host']) ? $tmpb['path'] : $tmpb['host'])) { + $csrfattack = true; + } } - if ($csrfattack) - { + if ($csrfattack) { //print 'NOCSRFCHECK='.defined('NOCSRFCHECK').' REQUEST_METHOD='.$_SERVER['REQUEST_METHOD'].' HTTP_HOST='.$_SERVER['HTTP_HOST'].' HTTP_REFERER='.$_SERVER['HTTP_REFERER']; // Note: We can't use dol_escape_htmltag here to escape output because lib functions.lib.ph is not yet loaded. print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n"; @@ -168,21 +203,23 @@ if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) } // Another test is done later on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on. } -if (empty($dolibarr_main_db_host)) -{ +if (empty($dolibarr_main_db_host) && !defined('NOREQUIREDB')) { print '<div class="center">Dolibarr setup is not yet complete.<br><br>'."\n"; print '<a href="install/index.php">Click here to finish Dolibarr install process</a> ...</div>'."\n"; die; } -if (empty($dolibarr_main_url_root)) -{ +if (empty($dolibarr_main_url_root) && !defined('NOREQUIREVIRTUALURL')) { print 'Value for parameter \'dolibarr_main_url_root\' is not defined in your \'htdocs\conf\conf.php\' file.<br>'."\n"; print 'You must add this parameter with your full Dolibarr root Url (Example: http://myvirtualdomain/ or http://mydomain/mydolibarrurl/)'."\n"; die; } -if (empty($dolibarr_main_data_root)) -{ - // Si repertoire documents non defini, on utilise celui par defaut + +if (empty($dolibarr_main_document_root_alt)) { + $dolibarr_main_document_root_alt = $dolibarr_main_document_root.'/custom'; +} + +if (empty($dolibarr_main_data_root)) { + // If directory not defined, we use the default hardcoded value $dolibarr_main_data_root = str_replace("/htdocs", "", $dolibarr_main_document_root); $dolibarr_main_data_root .= "/documents"; } @@ -204,14 +241,14 @@ if (!empty($_SERVER["DOCUMENT_ROOT"])) { $paths = explode('/', str_replace('\\', '/', $_SERVER["SCRIPT_NAME"])); // C) Value reported by web server, to say full path on filesystem of a file. Ex: /dolibarr/htdocs/admin/system/phpinfo.php // Try to detect if $_SERVER["DOCUMENT_ROOT"]+start of $_SERVER["SCRIPT_NAME"] is $dolibarr_main_document_root. If yes, relative url to add before dol files is this start part. $concatpath = ''; -foreach ($paths as $tmppath) // We check to find (B+start of C)=A -{ - if (empty($tmppath)) continue; +foreach ($paths as $tmppath) { // We check to find (B+start of C)=A + if (empty($tmppath)) { + continue; + } $concatpath .= '/'.$tmppath; //if ($tmppath) $concatpath.='/'.$tmppath; //print $_SERVER["SCRIPT_NAME"].'-'.$pathroot.'-'.$concatpath.'-'.$real_dolibarr_main_document_root.'-'.realpath($pathroot.$concatpath).'<br>'; - if ($real_dolibarr_main_document_root == @realpath($pathroot.$concatpath)) // @ avoid warning when safe_mode is on. - { + if ($real_dolibarr_main_document_root == @realpath($pathroot.$concatpath)) { // @ avoid warning when safe_mode is on. //print "Found relative url = ".$concatpath; $tmp3 = $concatpath; $found = 1; @@ -220,14 +257,21 @@ foreach ($paths as $tmppath) // We check to find (B+start of C)=A //else print "Not found yet for concatpath=".$concatpath."<br>\n"; } //print "found=".$found." dolibarr_main_url_root=".$dolibarr_main_url_root."\n"; -if (!$found) $tmp = $dolibarr_main_url_root; // If autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT). -else $tmp = 'http'.(((empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') && (empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] != 443)) ? '' : 's').'://'.$_SERVER["SERVER_NAME"].((empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == 80 || $_SERVER["SERVER_PORT"] == 443) ? '' : ':'.$_SERVER["SERVER_PORT"]).($tmp3 ? (preg_match('/^\//', $tmp3) ? '' : '/').$tmp3 : ''); +if (!$found) { + $tmp = $dolibarr_main_url_root; // If autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT). +} else { + $tmp = 'http'.(((empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') && (empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] != 443)) ? '' : 's').'://'.$_SERVER["SERVER_NAME"].((empty($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == 80 || $_SERVER["SERVER_PORT"] == 443) ? '' : ':'.$_SERVER["SERVER_PORT"]).($tmp3 ? (preg_match('/^\//', $tmp3) ? '' : '/').$tmp3 : ''); +} //print "tmp1=".$tmp1." tmp2=".$tmp2." tmp3=".$tmp3." tmp=".$tmp."\n"; -if (!empty($dolibarr_main_force_https)) $tmp = preg_replace('/^http:/i', 'https:', $tmp); +if (!empty($dolibarr_main_force_https)) { + $tmp = preg_replace('/^http:/i', 'https:', $tmp); +} define('DOL_MAIN_URL_ROOT', $tmp); // URL absolute root (https://sss/dolibarr, ...) $uri = preg_replace('/^http(s?):\/\//i', '', constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* $suburi = strstr($uri, '/'); // $suburi contains url without domain:port -if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' +if ($suburi == '/') { + $suburi = ''; // If $suburi is /, it is now '' +} define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) //print DOL_MAIN_URL_ROOT.'-'.DOL_URL_ROOT."\n"; @@ -241,29 +285,54 @@ define('MAIN_DB_PREFIX', $dolibarr_main_db_prefix); * To use other version than embeded libraries, define here constant to path. Use '' to use include class path autodetect. */ // 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('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/tecnickcom/tcpdf/' : $dolibarr_lib_TCPDF_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('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('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('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('TCPDF_PATH')) { + define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/tecnickcom/tcpdf/' : $dolibarr_lib_TCPDF_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('PHPEXCELNEW_PATH')) { + define('PHPEXCELNEW_PATH', (!isset($dolibarr_lib_PHPEXCELNEW_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/' : (empty($dolibarr_lib_PHPEXCELNEW_PATH) ? '' : $dolibarr_lib_PHPEXCELNEW_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.'/')); +} // 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)); } +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)); +} /* * Include functions */ -if (!defined('ADODB_DATE_VERSION')) include_once ADODB_PATH.'adodb-time.inc.php'; +if (!defined('ADODB_DATE_VERSION')) { + include_once ADODB_PATH.'adodb-time.inc.php'; +} -if (!file_exists(DOL_DOCUMENT_ROOT."/core/lib/functions.lib.php")) -{ +if (!file_exists(DOL_DOCUMENT_ROOT."/core/lib/functions.lib.php")) { print "Error: Dolibarr config file content seems to be not correctly defined.<br>\n"; print "Please run dolibarr setup by calling page <b>/install</b>.<br>\n"; exit; diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index 0c0d8f42c9e..e0cd9beff0c 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -22,10 +22,18 @@ * \brief File to return an Ajax response to get list of possible prices for margin calculation */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; @@ -46,47 +54,45 @@ top_httphead(); //print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; -if ($idprod > 0) -{ +if ($idprod > 0) { $producttmp = new ProductFournisseur($db); $producttmp->fetch($idprod); $sorttouse = 's.nom, pfp.quantity, pfp.price'; - if (GETPOST('bestpricefirst')) $sorttouse = 'pfp.unitprice, s.nom, pfp.quantity, pfp.price'; + if (GETPOST('bestpricefirst')) { + $sorttouse = 'pfp.unitprice, s.nom, pfp.quantity, pfp.price'; + } $productSupplierArray = $producttmp->list_product_fournisseur_price($idprod, $sorttouse); // We list all price per supplier, and then firstly with the lower quantity. So we can choose first one with enough quantity into list. - if (is_array($productSupplierArray)) - { - foreach ($productSupplierArray as $productSupplier) - { + if (is_array($productSupplierArray)) { + foreach ($productSupplierArray as $productSupplier) { $price = $productSupplier->fourn_price * (1 - $productSupplier->fourn_remise_percent / 100); $unitprice = $productSupplier->fourn_unitprice * (1 - $productSupplier->fourn_remise_percent / 100); $title = $productSupplier->fourn_name.' - '.$productSupplier->fourn_ref.' - '; - if ($productSupplier->fourn_qty == 1) - { + if ($productSupplier->fourn_qty == 1) { $title .= price($price, 0, $langs, 0, 0, -1, $conf->currency)."/"; } $title .= $productSupplier->fourn_qty.' '.($productSupplier->fourn_qty == 1 ? $langs->trans("Unit") : $langs->trans("Units")); - if ($productSupplier->fourn_qty > 1) - { + if ($productSupplier->fourn_qty > 1) { $title .= " - "; $title .= price($unitprice, 0, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit"); $price = $unitprice; } $label = price($price, 0, $langs, 0, 0, -1, $conf->currency)."/".$langs->trans("Unit"); - if ($productSupplier->fourn_ref) $label .= ' ('.$productSupplier->fourn_ref.')'; + if ($productSupplier->fourn_ref) { + $label .= ' ('.$productSupplier->fourn_ref.')'; + } $prices[] = array("id" => $productSupplier->product_fourn_price_id, "price" => price2num($price, 0, '', 0), "label" => $label, "title" => $title); // For price field, we must use price2num(), for label or title, price() } } // After best supplier prices and before costprice - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { // Add price for pmp $price = $producttmp->pmp; $prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price, 0, $langs, 0, 0, -1, $conf->currency)); // For price field, we must use price2num(), for label or title, price() diff --git a/htdocs/fourn/ajax/index.html b/htdocs/fourn/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 807996ddd1c..66de187bfe7 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -7,6 +7,7 @@ * Copyright (C) 2014 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,8 +36,12 @@ require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +if (!empty($conf->adherent->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +} +if (!empty($conf->categorie->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} // Load translation files required by page $langs->loadLangs(array( @@ -53,7 +58,9 @@ $cancelbutton = GETPOST('cancel', 'alpha'); // Security check $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); -if ($user->socid) $id = $user->socid; +if ($user->socid) { + $id = $user->socid; +} $result = restrictedArea($user, 'societe&fournisseur', $id, '&societe', '', 'rowid'); $object = new Fournisseur($db); @@ -81,44 +88,48 @@ if ($object->id > 0) { $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancelbutton) - { +if (empty($reshook)) { + if ($cancelbutton) { $action = ""; } - if ($action == 'setsupplieraccountancycode') - { + if ($action == 'setsupplieraccountancycode') { $result = $object->fetch($id); - $object->code_compta_fournisseur = $_POST["supplieraccountancycode"]; + $object->code_compta_fournisseur = GETPOST("supplieraccountancycode"); $result = $object->update($object->id, $user, 1, 0, 1); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // terms of the settlement - if ($action == 'setconditions' && $user->rights->societe->creer) - { + if ($action == 'setconditions' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentTerms(GETPOST('cond_reglement_supplier_id', 'int')); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } } // mode de reglement - if ($action == 'setmode' && $user->rights->societe->creer) - { + if ($action == 'setmode' && $user->rights->societe->creer) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_supplier_id', 'int')); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } } // update supplier order min amount - if ($action == 'setsupplier_order_min_amount') - { + if ($action == 'setsupplier_order_min_amount') { $object->fetch($id); $object->supplier_order_min_amount = price2num(GETPOST('supplier_order_min_amount', 'alpha')); $result = $object->update($object->id, $user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } if ($action == 'update_extras') { @@ -129,15 +140,20 @@ if (empty($reshook)) // Fill array 'array_options' with data from update form $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; - - if (!$error) - { - $result = $object->insertExtraFields('COMPANY_MODIFY'); - if ($result < 0) $error++; + if ($ret < 0) { + $error++; } - if ($error) $action = 'edit_extras'; + if (!$error) { + $result = $object->insertExtraFields('COMPANY_MODIFY'); + if ($result < 0) { + $error++; + } + } + + if ($error) { + $action = 'edit_extras'; + } } } @@ -149,17 +165,19 @@ if (empty($reshook)) $contactstatic = new Contact($db); $form = new Form($db); -if ($id > 0 && empty($object->id)) -{ +if ($id > 0 && empty($object->id)) { // Load data of third party $res = $object->fetch($id); - if ($object->id <= 0) dol_print_error($db, $object->error); + if ($object->id <= 0) { + dol_print_error($db, $object->error); + } } -if ($object->id > 0) -{ +if ($object->id > 0) { $title = $langs->trans("ThirdParty")." - ".$langs->trans('Supplier'); - if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$langs->trans('Supplier'); + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$langs->trans('Supplier'); + } $help_url = ''; llxHeader('', $title, $help_url); @@ -177,24 +195,27 @@ if ($object->id > 0) print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="underbanner clearboth"></div>'; - print '<table width="100%" class="border">'; + print '<table class="border centpercent tableforfield">'; - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + // Type Prospect/Customer/Supplier + print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>'; + print $object->getTypeUrl(1); + print '</td></tr>'; + + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->fournisseur) - { + if ($object->fournisseur) { print '<tr>'; - print '<td class="titlefield">'.$langs->trans("SupplierCode").'</td><td>'; - print $object->code_fournisseur; - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } - print '</td>'; - print '</tr>'; + print '<td class="titlefield">'.$langs->trans("SupplierCode").'</td><td>'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } + print '</td>'; + print '</tr>'; $langs->load('compta'); print '<tr>'; @@ -216,14 +237,12 @@ if ($object->id > 0) print '</tr>'; // Local Taxes - if ($mysoc->useLocalTax(1)) - { + if ($mysoc->useLocalTax(1)) { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax1_assuj); print '</td></tr>'; } - if ($mysoc->useLocalTax(2)) - { + if ($mysoc->useLocalTax(2)) { print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax2_assuj); print '</td></tr>'; @@ -231,7 +250,7 @@ if ($object->id > 0) // TVA Intra print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td>'; - print $object->tva_intra; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->tva_intra)); print '</td></tr>'; // Default terms of the settlement @@ -241,11 +260,12 @@ if ($object->id > 0) print '<table width="100%" class="nobordernopadding"><tr><td>'; print $langs->trans('PaymentConditions'); print '<td>'; - if (($action != 'editconditions') && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; + if (($action != 'editconditions') && $user->rights->societe->creer) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; - if ($action == 'editconditions') - { + 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 { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_supplier_id, 'none'); @@ -258,11 +278,12 @@ if ($object->id > 0) print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans('PaymentMode'); print '<td>'; - if (($action != 'editmode') && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; + if (($action != 'editmode') && $user->rights->societe->creer) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; - if ($action == 'editmode') - { + 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 { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->mode_reglement_supplier_id, 'none'); @@ -275,8 +296,7 @@ if ($object->id > 0) print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans("CustomerRelativeDiscountShort"); print '<td><td class="right">'; - if ($user->rights->societe->creer && !$user->socid > 0) - { + if ($user->rights->societe->creer && !$user->socid > 0) { print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>'; } print '</td></tr></table>'; @@ -289,22 +309,24 @@ if ($object->id > 0) print '<tr><td class="nowrap">'; print $langs->trans("CustomerAbsoluteDiscountShort"); print '<td><td class="right">'; - if ($user->rights->societe->creer && !$user->socid > 0) - { + if ($user->rights->societe->creer && !$user->socid > 0) { print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.img_edit($langs->trans("Modify")).'</a>'; } print '</td></tr></table>'; print '</td>'; print '<td>'; $amount_discount = $object->getAvailableDiscounts('', '', 0, 1); - if ($amount_discount < 0) dol_print_error($db, $object->error); - if ($amount_discount > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.price($amount_discount, 1, $langs, 1, -1, -1, $conf->currency).'</a>'; + if ($amount_discount < 0) { + dol_print_error($db, $object->error); + } + if ($amount_discount > 0) { + print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.price($amount_discount, 1, $langs, 1, -1, -1, $conf->currency).'</a>'; + } //else print $langs->trans("DiscountNone"); print '</td>'; print '</tr>'; - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { print '<tr class="nowrap">'; print '<td>'; print $form->editfieldkey("OrderMinAmount", 'supplier_order_min_amount', $object->supplier_order_min_amount, $object, $user->rights->societe->creer); @@ -316,8 +338,7 @@ if ($object->id > 0) } // Categories - if (!empty($conf->categorie->enabled)) - { + if (!empty($conf->categorie->enabled)) { $langs->load("categories"); print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>'; print '<td>'; @@ -330,16 +351,14 @@ if ($object->id > 0) include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Module Adherent - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $langs->load("members"); $langs->load("users"); print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<td>'; $adh = new Adherent($db); $result = $adh->fetch('', '', $object->id); - if ($result > 0) - { + if ($result > 0) { $adh->ref = $adh->getFullName($langs); print $adh->getNomUrl(1); } else { @@ -366,8 +385,7 @@ if ($object->id > 0) $boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="border boxtable boxtablenobottom boxtablenotop" width="100%">'; $boxstat .= '<tr class="impair nohover"><td colspan="2" class="tdboxstats nohover">'; - if ($conf->supplier_proposal->enabled) - { + if ($conf->supplier_proposal->enabled) { // Box proposals $tmp = $object->getOutstandingProposals('supplier'); $outstandingOpened = $tmp['opened']; @@ -376,16 +394,19 @@ if ($object->id > 0) $text = $langs->trans("OverAllSupplierProposals"); $link = DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id; $icon = 'bill'; - if ($link) $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + if ($link) { + $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + } $boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; $boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; $boxstat .= '<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; $boxstat .= '</div>'; - if ($link) $boxstat .= '</a>'; + if ($link) { + $boxstat .= '</a>'; + } } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { // Box proposals $tmp = $object->getOutstandingOrders('supplier'); $outstandingOpened = $tmp['opened']; @@ -394,16 +415,19 @@ if ($object->id > 0) $text = $langs->trans("OverAllOrders"); $link = DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id; $icon = 'bill'; - if ($link) $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + if ($link) { + $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + } $boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; $boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; $boxstat .= '<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; $boxstat .= '</div>'; - if ($link) $boxstat .= '</a>'; + if ($link) { + $boxstat .= '</a>'; + } } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { $tmp = $object->getOutstandingBills('supplier'); $outstandingOpened = $tmp['opened']; $outstandingTotal = $tmp['total_ht']; @@ -412,23 +436,31 @@ if ($object->id > 0) $text = $langs->trans("OverAllInvoices"); $link = DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->id; $icon = 'bill'; - if ($link) $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + if ($link) { + $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + } $boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; $boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; $boxstat .= '<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; $boxstat .= '</div>'; - if ($link) $boxstat .= '</a>'; + if ($link) { + $boxstat .= '</a>'; + } // Box outstanding bill $text = $langs->trans("CurrentOutstandingBill"); $link = DOL_URL_ROOT.'/fourn/recap-fourn.php?socid='.$object->id; $icon = 'bill'; - if ($link) $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + if ($link) { + $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + } $boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; $boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; $boxstat .= '<span class="boxstatsindicator'.($outstandingOpened > 0 ? ' amountremaintopay' : '').'">'.price($outstandingOpened, 1, $langs, 1, -1, -1, $conf->currency).$warn.'</span>'; $boxstat .= '</div>'; - if ($link) $boxstat .= '</a>'; + if ($link) { + $boxstat .= '</a>'; + } $tmp = $object->getOutstandingBills('supplier', 1); $outstandingOpenedLate = $tmp['opened']; @@ -436,12 +468,16 @@ if ($object->id > 0) $text = $langs->trans("CurrentOutstandingBillLate"); $link = DOL_URL_ROOT.'/fourn/recap-fourn.php?socid='.$object->id; $icon = 'bill'; - if ($link) $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + if ($link) { + $boxstat .= '<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">'; + } $boxstat .= '<div class="boxstats" title="'.dol_escape_htmltag($text).'">'; $boxstat .= '<span class="boxstatstext">'.img_object("", $icon).' <span>'.$text.'</span></span><br>'; $boxstat .= '<span class="boxstatsindicator'.($outstandingOpenedLate > 0 ? ' amountremaintopay' : '').'">'.price($outstandingOpenedLate, 1, $langs, 1, -1, -1, $conf->currency).$warn.'</span>'; $boxstat .= '</div>'; - if ($link) $boxstat .= '</a>'; + if ($link) { + $boxstat .= '</a>'; + } } } @@ -463,16 +499,15 @@ if ($object->id > 0) print '</tr>'; print '</table>'; print '<br>'; - */ + */ /* * List of products */ - if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) - { + if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { $langs->load("products"); //Query from product/liste.php - $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity,'; + $sql = 'SELECT p.rowid, p.ref, p.label, p.fk_product_type, p.entity, p.tosell as status, p.tobuy as status_buy, p.tobatch as status_batch,'; $sql .= ' pfp.tms, pfp.ref_fourn as supplier_ref, pfp.price, pfp.quantity, pfp.unitprice'; $sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pfp.fk_product"; @@ -482,7 +517,9 @@ if ($object->id > 0) $sql .= $db->plimit($MAXLIST); $query = $db->query($sql); - if (!$query) dol_print_error($db); + if (!$query) { + dol_print_error($db); + } $num = $db->num_rows($query); @@ -493,17 +530,18 @@ if ($object->id > 0) print '</a></td></tr>'; $return = array(); - if ($num > 0) - { + if ($num > 0) { $productstatic = new Product($db); - while ($objp = $db->fetch_object($query)) - { + while ($objp = $db->fetch_object($query)) { $productstatic->id = $objp->rowid; $productstatic->ref = $objp->ref; $productstatic->label = $objp->label; $productstatic->type = $objp->fk_product_type; $productstatic->entity = $objp->entity; + $productstatic->status = $objp->status; + $productstatic->status_buy = $objp->status_buy; + $productstatic->status_batch = $objp->status_batch; print '<tr class="oddeven">'; print '<td class="nowrap">'; @@ -518,11 +556,9 @@ if ($object->id > 0) //print '<td class="right" class="nowrap">'.dol_print_date($objp->tms, 'day').'</td>'; print '<td class="right">'; //print (isset($objp->unitprice) ? price($objp->unitprice) : ''); - if (isset($objp->price)) - { + if (isset($objp->price)) { print price($objp->price); - if ($objp->quantity > 1) - { + if ($objp->quantity > 1) { print ' / '; print $objp->quantity; } @@ -541,11 +577,10 @@ if ($object->id > 0) */ $proposalstatic = new SupplierProposal($db); - if ($user->rights->supplier_proposal->lire) - { + if ($user->rights->supplier_proposal->lire) { $langs->loadLangs(array("supplier_proposal")); - $sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total as total_ttc"; + $sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.total_tva, p.total_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p "; $sql .= " WHERE p.fk_soc =".$object->id; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; @@ -553,13 +588,11 @@ if ($object->id > 0) $sql .= " ".$db->plimit($MAXLIST); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { print '<table class="noborder centpercent lastrecordtable">'; print '<tr class="liste_titre">'; @@ -571,8 +604,7 @@ if ($object->id > 0) print '</td></tr>'; } - while ($i < $num && $i <= $MAXLIST) - { + while ($i < $num && $i <= $MAXLIST) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -585,8 +617,7 @@ if ($object->id > 0) print $proposalstatic->getNomUrl(1); print '</td>'; print '<td class="center" width="80">'; - if ($obj->dc) - { + if ($obj->dc) { print dol_print_date($db->jdate($obj->dc), 'day'); } else { print "-"; @@ -598,7 +629,9 @@ if ($object->id > 0) } $db->free($resql); - if ($num > 0) print "</table>"; + if ($num > 0) { + print "</table>"; + } } else { dol_print_error($db); } @@ -609,8 +642,7 @@ if ($object->id > 0) */ $orderstatic = new CommandeFournisseur($db); - if ($user->rights->fournisseur->commande->lire) - { + if ($user->rights->fournisseur->commande->lire) { // TODO move to DAO class // Check if there are supplier orders billable $sql2 = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_supplier,'; @@ -621,12 +653,11 @@ if ($object->id > 0) $sql2 .= " AND c.entity IN (".getEntity('commande_fournisseur').")"; $sql2 .= ' AND s.rowid = '.$object->id; // Show orders we can bill - if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) - { + if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) { $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->sanitize($db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)).")"; + $sql2 .= " AND c.fk_statut IN (".$db->sanitize($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS).")"; } $sql2 .= " AND c.billed = 0"; // Find order that are not already invoiced @@ -646,25 +677,22 @@ if ($object->id > 0) $sql .= " WHERE p.fk_soc =".$object->id; $sql .= " AND p.entity IN (".getEntity('commande_fournisseur').")"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $object_count = $db->fetch_object($resql); $num = $object_count->total; } - $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total_ttc"; + $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut, p.total_ht, p.total_tva, p.total_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p"; $sql .= " WHERE p.fk_soc =".$object->id; $sql .= " AND p.entity IN (".getEntity('commande_fournisseur').")"; $sql .= " ORDER BY p.date_commande DESC"; $sql .= " ".$db->plimit($MAXLIST); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; - if ($num > 0) - { + if ($num > 0) { print '<table class="noborder centpercent lastrecordtable">'; print '<tr class="liste_titre">'; @@ -676,8 +704,7 @@ if ($object->id > 0) print '</td></tr>'; } - while ($i < $num && $i < $MAXLIST) - { + while ($i < $num && $i < $MAXLIST) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -690,8 +717,7 @@ if ($object->id > 0) print $orderstatic->getNomUrl(1); print '</td>'; print '<td class="center" width="80">'; - if ($obj->dc) - { + if ($obj->dc) { print dol_print_date($db->jdate($obj->dc), 'day'); } else { print "-"; @@ -703,7 +729,9 @@ if ($object->id > 0) } $db->free($resql); - if ($num > 0) print "</table>"; + if ($num > 0) { + print "</table>"; + } } else { dol_print_error($db); } @@ -716,8 +744,7 @@ if ($object->id > 0) $langs->load('bills'); $facturestatic = new FactureFournisseur($db); - if ($user->rights->fournisseur->facture->lire) - { + if ($user->rights->fournisseur->facture->lire) { // TODO move to DAO class $sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,'; $sql .= ' SUM(pf.amount) as am'; @@ -728,12 +755,10 @@ if ($object->id > 0) $sql .= ' GROUP BY f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef,f.total_ht,f.total_tva,f.total_ttc,f.paye'; $sql .= ' ORDER BY f.datef DESC'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { print '<table class="noborder centpercent lastrecordtable">'; print '<tr class="liste_titre">'; @@ -744,8 +769,7 @@ if ($object->id > 0) print '</td></tr>'; } - while ($i < min($num, $MAXLIST)) - { + while ($i < min($num, $MAXLIST)) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -772,7 +796,9 @@ if ($object->id > 0) $i++; } $db->free($resql); - if ($num > 0) print '</table>'; + if ($num > 0) { + print '</table>'; + } } else { dol_print_error($db); } @@ -785,22 +811,19 @@ if ($object->id > 0) /* - * Barre d'actions + * Action bar */ print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($object->status != 1) - { + if (empty($reshook)) { + if ($object->status != 1) { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("ThirdPartyIsClosed").'</a></div>'; } - if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer) - { + if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->creer) { $langs->load("supplier_proposal"); if ($object->status == 1) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddSupplierProposal").'</a>'; @@ -809,8 +832,7 @@ if ($object->id > 0) } } - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { $langs->load("orders"); if ($object->status == 1) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddOrder").'</a>'; @@ -819,21 +841,20 @@ if ($object->id > 0) } } - if ($user->rights->fournisseur->facture->creer) - { - if (!empty($orders2invoice) && $orders2invoice > 0) - { + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { + if (!empty($orders2invoice) && $orders2invoice > 0) { if ($object->status == 1) { // Company is open print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'&search_billed=0&autoselectall=1">'.$langs->trans("CreateInvoiceForThisSupplier").'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>'; } - } else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("NoOrdersToInvoice").' ('.$langs->trans("WithReceptionFinished").')').'" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.dol_escape_js($langs->trans("NoOrdersToInvoice").' ('.$langs->trans("WithReceptionFinished").')').'" href="#">'.$langs->trans("CreateInvoiceForThisCustomer").'</a></div>'; + } } - if ($user->rights->fournisseur->facture->creer) - { + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { $langs->load("bills"); if ($object->status == 1) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddBill").'</a>'; @@ -843,10 +864,8 @@ if ($object->id > 0) } // Add action - if (!empty($conf->agenda->enabled) && !empty($conf->global->MAIN_REPEATTASKONEACHTAB) && $object->status == 1) - { - if ($user->rights->agenda->myactions->create) - { + if (!empty($conf->agenda->enabled) && !empty($conf->global->MAIN_REPEATTASKONEACHTAB) && $object->status == 1) { + if ($user->rights->agenda->myactions->create) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&socid='.$object->id.'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butAction" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddAction").'</a>'; @@ -857,15 +876,13 @@ if ($object->id > 0) print '</div>'; - if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) - { + if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) { print '<br>'; // List of contacts show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); } - if (!empty($conf->global->MAIN_REPEATTASKONEACHTAB)) - { + if (!empty($conf->global->MAIN_REPEATTASKONEACHTAB)) { print load_fiche_titre($langs->trans("ActionsOnCompany"), '', ''); // List of todo actions diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 247434be7a8..55518997d5e 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -34,7 +34,7 @@ class SupplierInvoices extends DolibarrApi * * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid', ); @@ -102,6 +102,10 @@ class SupplierInvoices extends DolibarrApi { global $db; + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -109,20 +113,32 @@ class SupplierInvoices extends DolibarrApi // 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; + 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"; + 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"; + 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 + 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 (".$this->db->sanitize($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') { @@ -142,10 +158,8 @@ class SupplierInvoices extends DolibarrApi $sql .= " AND sc.fk_user = ".$search_sale; } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -154,8 +168,7 @@ class SupplierInvoices extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -168,8 +181,7 @@ class SupplierInvoices extends DolibarrApi $i = 0; $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $invoice_static = new FactureFournisseur($this->db); if ($invoice_static->fetch($obj->rowid)) { @@ -244,12 +256,15 @@ class SupplierInvoices extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->invoice->$field = $value; } - if ($this->invoice->update($id, DolibarrApiAccess::$user)) + if ($this->invoice->update($id, DolibarrApiAccess::$user)) { return $this->get($id); + } return false; } @@ -279,8 +294,7 @@ class SupplierInvoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($this->invoice->delete(DolibarrApiAccess::$user) < 0) - { + if ($this->invoice->delete(DolibarrApiAccess::$user) < 0) { throw new RestException(500); } @@ -459,16 +473,14 @@ class SupplierInvoices extends DolibarrApi $paiement->note_public = $comment; $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) - { + 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) - { + if ($result < 0) { $this->db->rollback(); throw new RestException(400, 'Add payment to bank error : '.$paiement->error); } @@ -534,8 +546,12 @@ class SupplierInvoices extends DolibarrApi 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; + $request_data->description = checkVal($request_data->description, 'restricthtml'); + $request_data->ref_supplier = checkVal($request_data->ref_supplier); + $updateRes = $this->invoice->addline( $request_data->description, $request_data->pu_ht, @@ -549,7 +565,7 @@ class SupplierInvoices extends DolibarrApi $request_data->date_end, $request_data->ventil, $request_data->info_bits, - 'HT', + $request_data->price_base_type ? $request_data->price_base_type : 'HT', $request_data->product_type, $request_data->rang, false, @@ -597,7 +613,12 @@ class SupplierInvoices extends DolibarrApi 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; + + $request_data->description = checkVal($request_data->description, 'restricthtml'); + $request_data->ref_supplier = checkVal($request_data->ref_supplier); + $updateRes = $this->invoice->updateline( $lineid, $request_data->description, @@ -607,7 +628,7 @@ class SupplierInvoices extends DolibarrApi $request_data->localtax2_tx, $request_data->qty, $request_data->fk_product, - 'HT', + $request_data->price_base_type ? $request_data->price_base_type : 'HT', $request_data->info_bits, $request_data->product_type, $request_data->remise_percent, @@ -706,8 +727,9 @@ class SupplierInvoices extends DolibarrApi { $invoice = array(); foreach (SupplierInvoices::$FIELDS as $field) { - if (!isset($data[$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 fe74a763eba..c20efa2e651 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -32,7 +32,7 @@ class SupplierOrders extends DolibarrApi * * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid' ); @@ -101,6 +101,10 @@ class SupplierOrders extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->fournisseur->commande->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -108,41 +112,70 @@ class SupplierOrders extends DolibarrApi // 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 (!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) + 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."commande_fournisseur 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 + } - if (!empty($product_ids)) $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; // We need this table joined to the select in order to filter by product + if (!empty($product_ids)) { + $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; // We need this table joined to the select in order to filter by product + } $sql .= ' WHERE t.entity IN ('.getEntity('supplier_order').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if (!empty($product_ids)) $sql .= " AND cd.fk_commande = t.rowid AND cd.fk_product IN (".$product_ids.")"; - 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 ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) { + $sql .= " AND t.fk_soc = sc.fk_soc"; + } + if (!empty($product_ids)) { + $sql .= " AND cd.fk_commande = t.rowid AND cd.fk_product IN (".$this->db->sanitize($product_ids).")"; + } + if ($socids) { + $sql .= " AND t.fk_soc IN (".$this->db->sanitize($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 == 'validated') $sql .= " AND t.fk_statut IN (1)"; - if ($status == 'approved') $sql .= " AND t.fk_statut IN (2)"; - if ($status == 'running') $sql .= " AND t.fk_statut IN (3)"; - if ($status == 'received_start') $sql .= " AND t.fk_statut IN (4)"; - if ($status == 'received_end') $sql .= " AND t.fk_statut IN (5)"; - if ($status == 'cancelled') $sql .= " AND t.fk_statut IN (6,7)"; - if ($status == 'refused') $sql .= " AND t.fk_statut IN (9)"; + if ($status == 'draft') { + $sql .= " AND t.fk_statut IN (0)"; + } + if ($status == 'validated') { + $sql .= " AND t.fk_statut IN (1)"; + } + if ($status == 'approved') { + $sql .= " AND t.fk_statut IN (2)"; + } + if ($status == 'running') { + $sql .= " AND t.fk_statut IN (3)"; + } + if ($status == 'received_start') { + $sql .= " AND t.fk_statut IN (4)"; + } + if ($status == 'received_end') { + $sql .= " AND t.fk_statut IN (5)"; + } + if ($status == 'cancelled') { + $sql .= " AND t.fk_statut IN (6,7)"; + } + if ($status == 'refused') { + $sql .= " AND t.fk_statut IN (9)"; + } // Insert sale filter - if ($search_sale > 0) - { + if ($search_sale > 0) { $sql .= " AND sc.fk_user = ".$search_sale; } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -151,8 +184,7 @@ class SupplierOrders extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -161,13 +193,11 @@ class SupplierOrders extends DolibarrApi } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $i = 0; $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $order_static = new CommandeFournisseur($this->db); if ($order_static->fetch($obj->rowid)) { @@ -194,7 +224,7 @@ class SupplierOrders extends DolibarrApi */ public function post($request_data = null) { - if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) { throw new RestException(401, "Insuffisant rights"); } // Check mandatory fields @@ -207,13 +237,13 @@ class SupplierOrders extends DolibarrApi $this->order->date = dol_now(); } /* We keep lines as an array - if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->order->lines = $lines; - }*/ + if (isset($request_data["lines"])) { + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->order->lines = $lines; + }*/ if ($this->order->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating order", array_merge(array($this->order->error), $this->order->errors)); @@ -230,7 +260,7 @@ class SupplierOrders extends DolibarrApi */ public function put($id, $request_data = null) { - if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) { throw new RestException(401); } @@ -244,12 +274,15 @@ class SupplierOrders extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->order->$field = $value; } - if ($this->order->update($id, DolibarrApiAccess::$user)) + if ($this->order->update(DolibarrApiAccess::$user)) { return $this->get($id); + } return false; } @@ -307,7 +340,7 @@ class SupplierOrders extends DolibarrApi */ public function validate($id, $idwarehouse = 0, $notrigger = 0) { - if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) { throw new RestException(401); } $result = $this->order->fetch($id); @@ -368,8 +401,9 @@ class SupplierOrders extends DolibarrApi { $order = array(); foreach (SupplierOrders::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $order[$field] = $data[$field]; } return $order; diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index 877f24803a5..1ab1095a191 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -62,12 +62,10 @@ class Fournisseur extends Societe $sql .= " WHERE cf.fk_soc = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num == 1) - { + if ($num == 1) { $row = $this->db->fetch_row($resql); $this->single_open_commande = $row[0]; @@ -91,8 +89,7 @@ class Fournisseur extends Societe $sql .= " AND pfp.fk_soc = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); return $obj->nb; } else { @@ -116,8 +113,7 @@ class Fournisseur extends Societe $sql = "SELECT count(s.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -126,10 +122,8 @@ class Fournisseur extends Societe $sql .= " AND s.entity IN (".getEntity('societe').")"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["suppliers"] = $obj->nb; } $this->db->free($resql); @@ -158,8 +152,7 @@ class Fournisseur extends Societe dol_syslog("Fournisseur::CreateCategory", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { dol_syslog("Fournisseur::CreateCategory : Success"); return 0; } else { @@ -185,17 +178,19 @@ class Fournisseur extends Societe $sql = "SELECT s.rowid, s.nom as name"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE s.fournisseur = 1"; $sql .= " AND s.entity IN (".getEntity('societe').")"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$user->socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $arr[$obj->rowid] = $obj->name; } } else { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6c99b9ffe10..331e211e5ac 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -34,7 +34,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/commonorder.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +if (!empty($conf->productbatch->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +} require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; /** @@ -204,7 +206,7 @@ class CommandeFournisseur extends CommonOrder '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), + 'total_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), @@ -303,9 +305,11 @@ class CommandeFournisseur extends CommonOrder global $conf; // Check parameters - if (empty($id) && empty($ref)) return -1; + 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 = "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.total_tva,"; $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,"; @@ -324,18 +328,21 @@ class CommandeFournisseur extends CommonOrder $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=".((int) $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) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if (!$obj) - { + if (!$obj) { $this->error = 'Bill with id '.$id.' not found'; dol_syslog(get_class($this).'::fetch '.$this->error); return 0; @@ -356,7 +363,7 @@ class CommandeFournisseur extends CommonOrder $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_tva = $obj->total_tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total_ttc; @@ -409,14 +416,15 @@ class CommandeFournisseur extends CommonOrder // fetch optionals attributes and labels $this->fetch_optionals(); - if ($this->statut == 0) $this->brouillon = 1; + if ($this->statut == 0) { + $this->brouillon = 1; + } /* - * Lines - */ + * Lines + */ $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -1; } else { return 1; @@ -449,26 +457,28 @@ class CommandeFournisseur extends CommonOrder $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)) + 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 .= " 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)) + 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'; + 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) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $line = new CommandeFournisseurLigne($this->db); @@ -505,8 +515,7 @@ class CommandeFournisseur extends CommonOrder $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)) - { + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { $line->fk_fournprice = $objp->fk_pfp; $line->packaging = $objp->packaging; } @@ -562,76 +571,71 @@ class CommandeFournisseur extends CommonOrder 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(); + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && (!empty($user->rights->fournisseur->commande->creer) || !empty($user->rights->supplier_order->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 - { + // 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 { $num = $this->ref; } - $this->newref = dol_sanitizeFileName($num); + $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) - { + $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++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 (!$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)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $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) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -643,15 +647,13 @@ class CommandeFournisseur extends CommonOrder } } - if (!$error) - { + if (!$error) { $result = 1; $this->statut = self::STATUS_VALIDATED; $this->ref = $num; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -696,8 +698,11 @@ class CommandeFournisseur extends CommonOrder $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'; + 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 @@ -737,10 +742,12 @@ class CommandeFournisseur extends CommonOrder if ($billed) { $billedtext = ' - '.$langs->trans("Billed"); } - if ($status == 5 && $billed) $statusClass = 'status6'; + if ($status == 5 && $billed) { + $statusClass = 'status6'; + } - $statusLong = $langs->trans($this->statuts[$status]).$billedtext; - $statusShort = $langs->trans($this->statutshort[$status]); + $statusLong = $langs->transnoentitiesnoconv($this->statuts[$status]).$billedtext; + $statusShort = $langs->transnoentitiesnoconv($this->statutshort[$status]); return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); } @@ -792,19 +799,20 @@ class CommandeFournisseur extends CommonOrder $picto = 'order'; $url = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id; - if ($option !== 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowOrder"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -817,15 +825,17 @@ class CommandeFournisseur extends CommonOrder $linkend = '</a>'; $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; + 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) - { + if ($addlinktonotes) { $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { + if ($txttoshow) { $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1); $result .= ' <span class="note inline-block">'; $result .= '<a href="'.DOL_URL_ROOT.'/fourn/commande/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">'; @@ -853,8 +863,7 @@ class CommandeFournisseur extends CommonOrder global $db, $langs, $conf; $langs->load("orders"); - if (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER)) - { + if (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER)) { $mybool = false; $file = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER.'.php'; @@ -878,8 +887,7 @@ class CommandeFournisseur extends CommonOrder $obj = new $classname(); $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -900,8 +908,7 @@ class CommandeFournisseur extends CommonOrder { $error = 0; - if ($this->billed) - { + if ($this->billed) { return 0; } @@ -910,18 +917,17 @@ class CommandeFournisseur extends CommonOrder $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) - { + if ($this->db->query($sql)) { + if (!$error) { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_CLASSIFY_BILLED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->billed = 1; $this->db->commit(); @@ -955,8 +961,7 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::approve"); - if ($user->rights->fournisseur->commande->approuver) - { + if ($user->rights->fournisseur->commande->approuver) { $now = dol_now(); $this->db->begin(); @@ -966,8 +971,7 @@ class CommandeFournisseur extends CommonOrder $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 - { + 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 { $num = $this->ref; @@ -980,14 +984,11 @@ class CommandeFournisseur extends CommonOrder $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; $sql .= " SET ref='".$this->db->escape($num)."',"; - if (empty($secondlevel)) // standard or first level approval - { + 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)) - { + 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)'; } @@ -996,67 +997,72 @@ class CommandeFournisseur extends CommonOrder { $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 + 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; + 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; - 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 - { + 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)) - { + 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++) - { + for ($i = 0; $i < $cpt; $i++) { // Product with reference - if ($this->lines[$i]->fk_product > 0) - { + 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'); + 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++; } + 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++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->ref = $this->newref; - if ($movetoapprovestatus) $this->statut = self::STATUS_ACCEPTED; - else $this->statut = self::STATUS_VALIDATED; - if (empty($secondlevel)) // standard or first level approval - { + if ($movetoapprovestatus) { + $this->statut = self::STATUS_ACCEPTED; + } else { + $this->statut = self::STATUS_VALIDATED; + } + if (empty($secondlevel)) { // standard or first level approval $this->date_approve = $now; $this->user_approve_id = $user->id; } else // request a second level approval @@ -1096,26 +1102,24 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::refuse"); $result = 0; - if ($user->rights->fournisseur->commande->approuver) - { + 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; - if ($this->db->query($sql)) - { + 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) - { + if ($result < 0) { $error++; $this->db->rollback(); - } else $this->db->commit(); + } else { + $this->db->commit(); + } // End call triggers } } else { @@ -1148,26 +1152,25 @@ class CommandeFournisseur extends CommonOrder //dol_syslog("CommandeFournisseur::Cancel"); $result = 0; - if ($user->rights->fournisseur->commande->commander) - { + if ($user->rights->fournisseur->commande->commander) { $statut = self::STATUS_CANCELED; $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".$statut; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".((int) $statut); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::cancel", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $result = 0; // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_CANCEL', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if ($error == 0) - { + if ($error == 0) { $this->db->commit(); return 1; } else { @@ -1200,21 +1203,21 @@ class CommandeFournisseur extends CommonOrder global $langs; dol_syslog(get_class($this)."::commande"); $error = 0; - if ($user->rights->fournisseur->commande->commander) - { + if ($user->rights->fournisseur->commande->commander) { $this->db->begin(); $newnoteprivate = $this->note_private; - if ($comment) $newnoteprivate = dol_concatdesc($newnoteprivate, $langs->trans("Comment").': '.$comment); + 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 .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::commande", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->statut = self::STATUS_ORDERSENT; $this->methode_commande_id = $methode; $this->date_commande = $date; @@ -1222,7 +1225,9 @@ class CommandeFournisseur extends CommonOrder // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_SUBMIT', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } else { $error++; @@ -1230,8 +1235,7 @@ class CommandeFournisseur extends CommonOrder $this->errors[] = $this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->db->commit(); } else { $this->db->rollback(); @@ -1264,17 +1268,23 @@ class CommandeFournisseur extends CommonOrder // set tmp vars $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; + } $delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date; // Clean parameters - if (empty($this->source)) $this->source = 0; + 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); - else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) { + list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date); + } else { + $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; $this->fk_multicurrency = 0; $this->multicurrency_tx = 1; @@ -1306,7 +1316,7 @@ class CommandeFournisseur extends CommonOrder $sql .= ", multicurrency_tx"; $sql .= ") "; $sql .= " VALUES ("; - $sql .= "''"; + $sql .= "'(PROV)'"; $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; $sql .= ", '".$this->db->escape($this->note_private)."'"; $sql .= ", '".$this->db->escape($this->note_public)."'"; @@ -1330,16 +1340,14 @@ class CommandeFournisseur extends CommonOrder $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { + 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++) - { + 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 @@ -1363,9 +1371,8 @@ class CommandeFournisseur extends CommonOrder $this->lines[$i]->date_end, $this->lines[$i]->array_options, $this->lines[$i]->fk_unit - ); - if ($result < 0) - { + ); + 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; @@ -1374,32 +1381,24 @@ class CommandeFournisseur extends CommonOrder $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; $sql .= " SET ref='(PROV".$this->id.")'"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Add link with price request and supplier order - if ($this->id) - { + if ($this->id) { $this->ref = "(PROV".$this->id.")"; - 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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { dol_print_error($this->db); $error++; } @@ -1408,8 +1407,7 @@ class CommandeFournisseur extends CommonOrder { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { + if (!$ret) { dol_print_error($this->db); $error++; } @@ -1418,18 +1416,17 @@ class CommandeFournisseur extends CommonOrder } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_CREATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -1451,14 +1448,118 @@ class CommandeFournisseur extends CommonOrder } } + /** + * Update Supplier Order + * + * @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 $user, $notrigger = 0) + { + global $conf; + + $error = 0; + + // Clean parameters + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->ref_supplier)) { + $this->ref_supplier = trim($this->ref_supplier); + } + 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->model_pdf)) { + $this->model_pdf = trim($this->model_pdf); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." 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 .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; + $sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").","; + $sql .= " date_commande=".(strval($this->date_commande) != '' ? "'".$this->db->idate($this->date_commande)."'" : 'null').","; + $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; + $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; + $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; + $sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").","; + $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "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->user_author_id) ? $this->user_author_id : "null").","; + $sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "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 .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; + $sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').","; + //$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").","; + $sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").","; + //$sql .= " fk_input_reason=".($this->demand_reason_id > 0 ? $this->demand_reason_id : "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=".((int) $this->id); + + $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) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_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; + } + } + /** * 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 + * @param int $notrigger Disable all triggers * @return int New id of clone */ - public function createFromClone(User $user, $socid = 0) + public function createFromClone(User $user, $socid = 0, $notrigger = 0) { global $conf, $user, $hookmanager; @@ -1467,19 +1568,18 @@ class CommandeFournisseur extends CommonOrder $this->db->begin(); // get extrafields so they will be clone - foreach ($this->lines as $line) + foreach ($this->lines as $line) { $line->fetch_optionals(); + } // Load source object $objFrom = clone $this; // Change socid if needed - if (!empty($socid) && $socid != $this->socid) - { + if (!empty($socid) && $socid != $this->socid) { $objsoc = new Societe($this->db); - if ($objsoc->fetch($socid) > 0) - { + if ($objsoc->fetch($socid) > 0) { $this->socid = $objsoc->id; $this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); $this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); @@ -1506,26 +1606,27 @@ class CommandeFournisseur extends CommonOrder // Create clone $this->context['createfromclone'] = 'createfromclone'; - $result = $this->create($user); - if ($result < 0) $error++; + $result = $this->create($user, $notrigger); + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Hook of thirdparty module - if (is_object($hookmanager)) - { + 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 ($reshook < 0) { + $error++; + } } } unset($this->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1568,17 +1669,28 @@ class CommandeFournisseur extends CommonOrder 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) - { + if ($this->statut == self::STATUS_DRAFT) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters - if (empty($qty)) $qty = 0; - if (!$info_bits) $info_bits = 0; - if (empty($txtva)) $txtva = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; - if (empty($remise_percent)) $remise_percent = 0; + if (empty($qty)) { + $qty = 0; + } + if (!$info_bits) { + $info_bits = 0; + } + if (empty($txtva)) { + $txtva = 0; + } + if (empty($txlocaltax1)) { + $txlocaltax1 = 0; + } + if (empty($txlocaltax2)) { + $txlocaltax2 = 0; + } + if (empty($remise_percent)) { + $remise_percent = 0; + } $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -1590,8 +1702,7 @@ class CommandeFournisseur extends CommonOrder } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { $pu = $pu_ht; } else { $pu = $pu_ttc; @@ -1599,12 +1710,13 @@ class CommandeFournisseur extends CommonOrder $desc = trim($desc); // Check parameters - if ($qty < 0 && !$fk_product) - { + if ($qty < 0 && !$fk_product) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")); return -1; } - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); $this->error = $langs->trans('ErrorStartDateGreaterEnd'); @@ -1632,15 +1744,15 @@ class CommandeFournisseur extends CommonOrder // 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 === '')) - { + 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 ($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 - { + 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(); @@ -1649,16 +1761,14 @@ class CommandeFournisseur extends CommonOrder //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price return -1; } - if ($result == -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) - { + if ($result < -1) { $this->error = $prod->error; $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); @@ -1695,8 +1805,7 @@ class CommandeFournisseur extends CommonOrder // Clean vat code $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -1783,15 +1892,15 @@ class CommandeFournisseur extends CommonOrder } $result = $this->line->insert($notrigger); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + 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) - { + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -1833,24 +1942,23 @@ class CommandeFournisseur extends CommonOrder 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) - { + if ($entrepot <= 0) { $this->error = 'ErrorBadValueForParameterWarehouse'; return -1; } - if ($qty == 0) - { + 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 + 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(); - if (($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY || $this->statut == self::STATUS_RECEIVED_COMPLETELY)) - { + 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"; @@ -1861,15 +1969,12 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::dispatchProduct", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { + if ($resql) { + if (!$notrigger) { global $conf, $langs, $user; // Call trigger $result = $this->call_trigger('LINEORDER_SUPPLIER_DISPATCH', $user); - if ($result < 0) - { + if ($result < 0) { $error++; } // End call triggers @@ -1880,16 +1985,13 @@ class CommandeFournisseur extends CommonOrder } // 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)) - { + 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) - { + 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) - { + if ($result < 0) { $this->error = $mouv->error; $this->errors = $mouv->errors; dol_syslog(get_class($this)."::dispatchProduct ".$this->error." ".join(',', $this->errors), LOG_ERR); @@ -1898,8 +2000,7 @@ class CommandeFournisseur extends CommonOrder } } - if ($error == 0) - { + if ($error == 0) { $this->db->commit(); return 1; } else { @@ -1921,17 +2022,14 @@ class CommandeFournisseur extends CommonOrder */ public function deleteline($idline, $notrigger = 0) { - if ($this->statut == 0) - { + if ($this->statut == 0) { $line = new CommandeFournisseurLigne($this->db); - if ($line->fetch($idline) <= 0) - { + if ($line->fetch($idline) <= 0) { return 0; } - if ($line->delete($notrigger) > 0) - { + if ($line->delete($notrigger) > 0) { $this->update_price(); return 1; } else { @@ -1960,12 +2058,10 @@ class CommandeFournisseur extends CommonOrder $this->db->begin(); - if (empty($notrigger)) - { + if (empty($notrigger)) { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->errors[] = 'ErrorWhenRunningTrigger'; dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); @@ -1978,8 +2074,7 @@ class CommandeFournisseur extends CommonOrder $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)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $this->errors[] = $this->db->lasterror(); $error++; @@ -1987,8 +2082,7 @@ class CommandeFournisseur extends CommonOrder $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)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $this->errors[] = $this->db->lasterror(); $error++; @@ -1996,10 +2090,8 @@ class CommandeFournisseur extends CommonOrder $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) - { + if ($resql = $this->db->query($sql)) { + if ($this->db->affected_rows($resql) < 1) { $this->error = $this->db->lasterror(); $this->errors[] = $this->db->lasterror(); $error++; @@ -2011,11 +2103,9 @@ class CommandeFournisseur extends CommonOrder } // Remove extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->error = 'FailToDeleteExtraFields'; $this->errors[] = 'FailToDeleteExtraFields'; $error++; @@ -2031,31 +2121,25 @@ class CommandeFournisseur extends CommonOrder $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) - { + 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 - { + 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)) - { + if (file_exists($dir)) { $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->error = 'ErrorFailToDeleteDir'; $this->errors[] = 'ErrorFailToDeleteDir'; $error++; @@ -2064,8 +2148,7 @@ class CommandeFournisseur extends CommonOrder } } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG); $this->db->commit(); return 1; @@ -2090,13 +2173,11 @@ class CommandeFournisseur extends CommonOrder $sql .= " WHERE active = 1"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $this->db->num_rows($resql); $this->methodes_commande = array(); - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_row($resql); $this->methodes_commande[$row[0]] = $row[1]; @@ -2130,20 +2211,19 @@ class CommandeFournisseur extends CommonOrder $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e ON cfd.fk_entrepot = e.rowid"; $sql .= " WHERE cfd.fk_commande = ".$this->id; $sql .= " AND cfd.fk_product = p.rowid"; - if ($status >= 0) $sql .= " AND cfd.status = ".$status; + if ($status >= 0) { + $sql .= " AND cfd.status = ".$status; + } $sql .= " ORDER BY cfd.rowid ASC"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($resql); - if ($objp) - { + if ($objp) { $ret[] = array( 'id' => $objp->dispatchedlineid, 'productid' => $objp->fk_product, @@ -2154,7 +2234,9 @@ 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; } @@ -2180,39 +2262,37 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::Livraison"); - if ($user->rights->fournisseur->commande->receptionner) - { + 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 { + 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; } // Some checks to accept the record - if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) - { + 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')) - { + if (!$error && ($type == 'tot')) { $dispatchedlinearray = $this->getDispachedLines(0); - if (count($dispatchedlinearray) > 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) - { + 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) - { + if (count($dispatchedlinearray) > 0) { $result = -1; $error++; $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionDenied'; @@ -2223,19 +2303,17 @@ class CommandeFournisseur extends CommonOrder // TODO LDR01 Add a control test to accept only if ALL predefined products are received (same qty). - if (empty($error)) - { + if (empty($error)) { $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET fk_statut = ".$statut; + $sql .= " SET fk_statut = ".((int) $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) - { + if ($resql) { $result = 1; $old_statut = $this->statut; $this->statut = $statut; @@ -2243,11 +2321,12 @@ class CommandeFournisseur extends CommonOrder // Call trigger $result_trigger = $this->call_trigger('ORDER_SUPPLIER_RECEIVE', $user); - if ($result_trigger < 0) $error++; + if ($result_trigger < 0) { + $error++; + } // End call triggers - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); } else { $this->statut = $old_statut; @@ -2296,8 +2375,7 @@ class CommandeFournisseur extends CommonOrder */ public function setDeliveryDate($user, $delivery_date, $notrigger = 0) { - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { $error = 0; $this->db->begin(); @@ -2308,34 +2386,31 @@ class CommandeFournisseur extends CommonOrder dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->date_livraison = $delivery_date; $this->delivery_date = $delivery_date; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2359,8 +2434,7 @@ class CommandeFournisseur extends CommonOrder public function set_id_projet($user, $id_projet, $notrigger = 0) { // phpcs:enable - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { $error = 0; $this->db->begin(); @@ -2371,34 +2445,31 @@ class CommandeFournisseur extends CommonOrder dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->error(); $error++; } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->fk_projet = $id_projet; $this->fk_project = $id_projet; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2428,13 +2499,11 @@ class CommandeFournisseur extends CommonOrder $this->lines = array(); $num = count($comclient->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $prod = new Product($this->db); $label = ''; $ref = ''; - if ($prod->fetch($comclient->lines[$i]->fk_product) > 0) - { + if ($prod->fetch($comclient->lines[$i]->fk_product) > 0) { $label = $prod->label; $ref = $prod->ref; } @@ -2445,8 +2514,7 @@ class CommandeFournisseur extends CommonOrder $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)) - { + if ($this->db->query($sql)) { $this->update_price(); } } @@ -2474,8 +2542,7 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::setStatus", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Trigger names for each status $triggerName = array(); $triggerName[0] = 'DRAFT'; @@ -2490,7 +2557,9 @@ class CommandeFournisseur extends CommonOrder // Call trigger $result = $this->call_trigger("ORDER_SUPPLIER_STATUS_".$triggerName[$status], $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } else { $error++; @@ -2498,8 +2567,7 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::setStatus ".$this->error); } - if (!$error) - { + if (!$error) { $this->statut = $status; $this->db->commit(); return 1; @@ -2540,30 +2608,47 @@ class CommandeFournisseur extends CommonOrder $error = 0; - if ($this->brouillon) - { + 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 (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; + if (!$qty) { + $qty = 1; + } $pu = price2num($pu); $pu_ht_devise = price2num($pu_ht_devise); - if (!preg_match('/\((.*)\)/', $txtva)) { - $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' - } + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); // Check parameters - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); $this->error = $langs->trans('ErrorStartDateGreaterEnd'); @@ -2582,8 +2667,7 @@ class CommandeFournisseur extends CommonOrder // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -2625,7 +2709,7 @@ class CommandeFournisseur extends CommonOrder if ($qty < $this->line->packaging) { $qty = $this->line->packaging; } else { - if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { + if (! empty($this->line->packaging) && ($qty % $this->line->packaging) > 0) { $coeff = intval($qty / $this->line->packaging) + 1; $qty = $this->line->packaging * $coeff; setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs'); @@ -2683,8 +2767,7 @@ class CommandeFournisseur extends CommonOrder // Mise a jour info denormalisees au niveau facture - if ($result >= 0) - { + if ($result >= 0) { $this->update_price('', 'auto'); $this->db->commit(); return $result; @@ -2727,8 +2810,7 @@ class CommandeFournisseur extends CommonOrder $sql .= $this->db->order("rowid", "ASC"); $sql .= $this->db->plimit(1); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $prodid = $obj->rowid; } @@ -2755,8 +2837,7 @@ class CommandeFournisseur extends CommonOrder // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new CommandeFournisseurLigne($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->qty = 1; @@ -2765,8 +2846,7 @@ class CommandeFournisseur extends CommonOrder $line->tva_tx = 19.6; $line->localtax1_tx = 0; $line->localtax2_tx = 0; - if ($xnbp == 2) - { + if ($xnbp == 2) { $line->total_ht = 50; $line->total_ttc = 59.8; $line->total_tva = 9.8; @@ -2800,20 +2880,28 @@ class CommandeFournisseur extends CommonOrder $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; + $sql .= ' WHERE c.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + 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; + 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); @@ -2844,8 +2932,7 @@ class CommandeFournisseur extends CommonOrder $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) - { + 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"; @@ -2853,10 +2940,8 @@ class CommandeFournisseur extends CommonOrder $sql .= " ".$clause." co.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["supplier_orders"] = $obj->nb; } $this->db->free($resql); @@ -2885,8 +2970,7 @@ class CommandeFournisseur extends CommonOrder $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) - { + 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"; @@ -2897,11 +2981,12 @@ class CommandeFournisseur extends CommonOrder } else { $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; } - if ($user->socid) $sql .= " AND c.fk_soc = ".$user->socid; + if ($user->socid) { + $sql .= " AND c.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $commandestatic = new CommandeFournisseur($this->db); $response = new WorkboardResponse(); @@ -2917,8 +3002,7 @@ class CommandeFournisseur extends CommonOrder $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3,4&mainmenu=commercial&leftmenu=orders_suppliers'; } - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $commandestatic->delivery_date = $this->db->jdate($obj->delivery_date); @@ -2947,27 +3031,25 @@ class CommandeFournisseur extends CommonOrder { global $db, $langs; - if ($this->methode_commande_id > 0) - { + 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 = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $string = $langs->trans($obj->code); - if ($string == $obj->code) - { + if ($string == $obj->code) { $string = $obj->label != '-' ? $obj->label : ''; } return $string; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } } return ''; @@ -3014,26 +3096,30 @@ class CommandeFournisseur extends CommonOrder */ public function getMaxDeliveryTimeDay($langs) { - if (empty($this->lines)) return ''; + if (empty($this->lines)) { + return ''; + } $obj = new ProductFournisseur($this->db); $nb = 0; - foreach ($this->lines as $line) - { - if ($line->fk_product > 0) - { + foreach ($this->lines as $line) { + if ($line->fk_product > 0) { $idp = $obj->find_min_price_product_fournisseur($line->fk_product, $line->qty); - if ($idp) - { + if ($idp) { $obj->fetch($idp); - if ($obj->delivery_time_days > $nb) $nb = $obj->delivery_time_days; + if ($obj->delivery_time_days > $nb) { + $nb = $obj->delivery_time_days; + } } } } - if ($nb === 0) return ''; - else return $nb.' '.$langs->trans('Days'); + if ($nb === 0) { + return ''; + } else { + return $nb.' '.$langs->trans('Days'); + } } /** @@ -3076,7 +3162,9 @@ class CommandeFournisseur extends CommonOrder { global $conf; - if (empty($this->delivery_date) && !empty($this->date_livraison)) $this->delivery_date = $this->date_livraison; // For backward compatibility + if (empty($this->delivery_date) && !empty($this->date_livraison)) { + $this->delivery_date = $this->date_livraison; // For backward compatibility + } if ($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY) { $now = dol_now(); @@ -3107,7 +3195,9 @@ class CommandeFournisseur extends CommonOrder { global $conf, $langs; - if (empty($this->delivery_date) && !empty($this->date_livraison)) $this->delivery_date = $this->date_livraison; // For backward compatibility + if (empty($this->delivery_date) && !empty($this->date_livraison)) { + $this->delivery_date = $this->date_livraison; // For backward compatibility + } $text = ''; @@ -3140,8 +3230,7 @@ class CommandeFournisseur extends CommonOrder { global $conf, $langs; - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) - { + 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(); @@ -3168,7 +3257,9 @@ class CommandeFournisseur extends CommonOrder } foreach ($this->lines as $line) { // Exclude lines not qualified for shipment, similar code is found into interface_20_modWrokflow for customers - if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $line->product_type > 0) continue; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $line->product_type > 0) { + continue; + } $qtywished[$line->fk_product] += $line->qty; } @@ -3178,16 +3269,14 @@ class CommandeFournisseur extends CommonOrder $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;*/ + 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) - { + 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) { @@ -3208,16 +3297,13 @@ class CommandeFournisseur extends CommonOrder $close = 0; - if (count($diff_array) > 0) - { + if (count($diff_array) > 0) { //there are some difference between the two arrays //scan the array of results - foreach ($diff_array as $key => $value) - { + foreach ($diff_array as $key => $value) { //if the quantity delivered is greater or equal to wish quantity - if ($qtydelivered[$key] >= $qtywished[$key]) - { + if ($qtydelivered[$key] >= $qtywished[$key]) { $close++; } } @@ -3277,25 +3363,31 @@ class CommandeFournisseur extends CommonOrder $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,'; + 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'; + 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; + 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) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + 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++; @@ -3396,20 +3488,20 @@ class CommandeFournisseurLigne extends CommonOrderLine $sql .= ' p.ref as product_ref, p.label as product_label, 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)) + 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'; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) + 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; + } + $sql .= ' WHERE cd.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); - if (!empty($objp)) - { + if (!empty($objp)) { $this->rowid = $objp->rowid; $this->id = $objp->rowid; $this->fk_commande = $objp->fk_commande; @@ -3440,8 +3532,7 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->product_ref = $objp->product_ref; $this->product_label = $objp->product_label; $this->product_desc = $objp->product_desc; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) - { + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { $this->packaging = $objp->packaging; $this->fk_fournprice = $objp->fk_pfp; } @@ -3485,32 +3576,63 @@ class CommandeFournisseurLigne extends CommonOrderLine 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; + 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)) - { + 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; + if ($this->product_type < 0) { + return -1; + } $this->db->begin(); @@ -3525,7 +3647,11 @@ class CommandeFournisseurLigne extends CommonOrderLine $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,"; } + 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)."',"; @@ -3553,25 +3679,23 @@ class CommandeFournisseurLigne extends CommonOrderLine dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); $this->rowid = $this->id; - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEORDER_SUPPLIER_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -3580,8 +3704,7 @@ class CommandeFournisseurLigne extends CommonOrderLine return 1; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->errors[] = ($this->errors ? ', '.$errmsg : $errmsg); } @@ -3644,32 +3767,26 @@ class CommandeFournisseurLigne extends CommonOrderLine dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $result = $this->db->query($sql); - if ($result > 0) - { - if (!$error) - { + if ($result > 0) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { global $user; // Call trigger $result = $this->call_trigger('LINEORDER_SUPPLIER_UPDATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -3699,34 +3816,31 @@ class CommandeFournisseurLigne extends CommonOrderLine // extrafields $result = $this->deleteExtraFields(); - if ($result < 0) - { + 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=".((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { + if ($resql) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('LINEORDER_SUPPLIER_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index a7abed27369..0f8b8341a3d 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -140,16 +140,36 @@ class CommandeFournisseurDispatch extends CommonObject // Clean parameters - if (isset($this->fk_commande)) $this->fk_commande = trim($this->fk_commande); - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->fk_commandefourndet)) $this->fk_commandefourndet = trim($this->fk_commandefourndet); - if (isset($this->qty)) $this->qty = trim($this->qty); - if (isset($this->fk_entrepot)) $this->fk_entrepot = trim($this->fk_entrepot); - if (isset($this->fk_user)) $this->fk_user = trim($this->fk_user); - if (isset($this->comment)) $this->comment = trim($this->comment); - if (isset($this->status)) $this->status = trim($this->status); - if (isset($this->batch)) $this->batch = trim($this->batch); - if (empty($this->datec)) $this->datec = dol_now(); + if (isset($this->fk_commande)) { + $this->fk_commande = trim($this->fk_commande); + } + if (isset($this->fk_product)) { + $this->fk_product = trim($this->fk_product); + } + if (isset($this->fk_commandefourndet)) { + $this->fk_commandefourndet = trim($this->fk_commandefourndet); + } + if (isset($this->qty)) { + $this->qty = trim($this->qty); + } + if (isset($this->fk_entrepot)) { + $this->fk_entrepot = trim($this->fk_entrepot); + } + if (isset($this->fk_user)) { + $this->fk_user = trim($this->fk_user); + } + if (isset($this->comment)) { + $this->comment = trim($this->comment); + } + if (isset($this->status)) { + $this->status = trim($this->status); + } + if (isset($this->batch)) { + $this->batch = trim($this->batch); + } + if (empty($this->datec)) { + $this->datec = dol_now(); + } // Check parameters @@ -190,16 +210,16 @@ class CommandeFournisseurDispatch extends CommonObject $this->db->begin(); - dol_syslog(__METHOD__, LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - if (!$notrigger) - { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. @@ -211,17 +231,16 @@ class CommandeFournisseurDispatch extends CommonObject } // Create extrafields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -264,15 +283,16 @@ class CommandeFournisseurDispatch extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; - if ($ref) $sql .= " WHERE t.ref = '".$ref."'"; - else $sql .= " WHERE t.rowid = ".$id; + if ($ref) { + $sql .= " WHERE t.ref = '".$ref."'"; + } else { + $sql .= " WHERE t.rowid = ".((int) $id); + } dol_syslog(get_class($this)."::fetch"); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -318,15 +338,33 @@ class CommandeFournisseurDispatch extends CommonObject // Clean parameters - if (isset($this->fk_commande)) $this->fk_commande = trim($this->fk_commande); - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->fk_commandefourndet)) $this->fk_commandefourndet = trim($this->fk_commandefourndet); - if (isset($this->qty)) $this->qty = trim($this->qty); - if (isset($this->fk_entrepot)) $this->fk_entrepot = trim($this->fk_entrepot); - if (isset($this->fk_user)) $this->fk_user = trim($this->fk_user); - if (isset($this->comment)) $this->comment = trim($this->comment); - if (isset($this->status)) $this->status = trim($this->status); - if (isset($this->batch)) $this->batch = trim($this->batch); + if (isset($this->fk_commande)) { + $this->fk_commande = trim($this->fk_commande); + } + if (isset($this->fk_product)) { + $this->fk_product = trim($this->fk_product); + } + if (isset($this->fk_commandefourndet)) { + $this->fk_commandefourndet = trim($this->fk_commandefourndet); + } + if (isset($this->qty)) { + $this->qty = trim($this->qty); + } + if (isset($this->fk_entrepot)) { + $this->fk_entrepot = trim($this->fk_entrepot); + } + if (isset($this->fk_user)) { + $this->fk_user = trim($this->fk_user); + } + if (isset($this->comment)) { + $this->comment = trim($this->comment); + } + if (isset($this->status)) { + $this->status = trim($this->status); + } + if (isset($this->batch)) { + $this->batch = trim($this->batch); + } @@ -351,40 +389,40 @@ 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=".((int) $this->id); $this->db->begin(); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$error) - { - if (empty($this->id) && !empty($this->rowid))$this->id = $this->rowid; + if (!$error) { + if (!$error) { + if (empty($this->id) && !empty($this->rowid)) { + $this->id = $this->rowid; + } $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$notrigger) - { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you $result = $this->call_trigger('LINERECEPTION_UPDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } //// End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -397,13 +435,13 @@ class CommandeFournisseurDispatch extends CommonObject } - /** - * 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; @@ -411,10 +449,8 @@ class CommandeFournisseurDispatch extends CommonObject $this->db->begin(); - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. @@ -428,28 +464,26 @@ class CommandeFournisseurDispatch extends CommonObject // Remove extrafields if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR); } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -491,21 +525,18 @@ class CommandeFournisseurDispatch extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $error++; } - if (!$error) - { + if (!$error) { } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -541,30 +572,36 @@ class CommandeFournisseurDispatch extends CommonObject global $langs; $langs->load('orders'); - if ($mode == 0) - { + if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } elseif ($mode == 1) - { + } elseif ($mode == 1) { return $langs->trans($this->statutshort[$status]); - } elseif ($mode == 2) - { + } 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 '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut0'); - elseif ($status == 1) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut4'); - elseif ($status == 2) return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } 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 '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + } elseif ($status == 1) { + return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + } elseif ($status == 2) { + return '<span class="hideonsmartphone">'.$langs->trans($this->statutshort[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } } } @@ -610,7 +647,7 @@ class CommandeFournisseurDispatch extends CommonObject { dol_syslog(__METHOD__, LOG_DEBUG); - $sql = "SELECT"; + $sql = "SELECT"; $sql .= " t.rowid,"; $sql .= " t.fk_commande,"; @@ -637,8 +674,10 @@ class CommandeFournisseurDispatch extends CommonObject $sqlwhere [] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } elseif ($key == 't.datec' || $key == 't.tms' || $key == 't.eatby' || $key == 't.sellby' || $key == 't.batch') { $sqlwhere [] = $key.' = \''.$this->db->escape($value).'\''; + } elseif ($key == 'qty') { + $sqlwhere [] = $key.' = '.((float) $value); } else { - $sqlwhere [] = $key.' = '.$this->db->escape($value); + $sqlwhere [] = $key.' = '.((int) $value); } } } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 8b02edcbbe0..8245e8ec1cc 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com> * Copyright (C) 2015-2019 Ferran Marcet <fmarcet@2byte.es> - * Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> * @@ -34,12 +34,18 @@ * \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/commonobjectline.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'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} /** * Class to manage suppliers invoices @@ -120,6 +126,19 @@ class FactureFournisseur extends CommonInvoice */ public $statut; + /** + * ! Closing after partial payment: discount_vat, badsupplier, abandon + * ! Closing when no payment: replaced, abandoned + * @var string Close code + */ + public $close_code; + + /** + * ! Comment if paid without full payment + * @var string Close note + */ + public $close_note; + /** * Set to 1 if the invoice is completely paid, otherwise is 0 * @var int @@ -158,7 +177,13 @@ class FactureFournisseur extends CommonInvoice public $amount = 0; public $remise = 0; + + /** + * @var float tva + * @deprecated Use $total_tva + */ public $tva = 0; + public $localtax1; public $localtax2; public $total_ht = 0; @@ -307,7 +332,7 @@ class FactureFournisseur extends CommonInvoice * Classified paid. * If paid partially, $this->close_code can be: * - CLOSECODE_DISCOUNTVAT - * - CLOSECODE_BADDEBT + * - CLOSECODE_BADCREDIT * If paid completelly, this->close_code will be null */ const STATUS_CLOSED = 2; @@ -315,7 +340,7 @@ class FactureFournisseur extends CommonInvoice /** * Classified abandoned and no payment done. * $this->close_code can be: - * - CLOSECODE_BADDEBT + * - CLOSECODE_BADCREDIT * - CLOSECODE_ABANDONED * - CLOSECODE_REPLACED */ @@ -350,9 +375,15 @@ class FactureFournisseur extends CommonInvoice $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; + 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; @@ -360,10 +391,12 @@ class FactureFournisseur extends CommonInvoice $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); - else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + 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); + } else { + $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; $this->fk_multicurrency = 0; $this->multicurrency_tx = 1; @@ -371,7 +404,9 @@ class FactureFournisseur extends CommonInvoice $this->db->begin(); - if (!$remise) $remise = 0; + if (!$remise) { + $remise = 0; + } $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn ("; $sql .= "ref"; @@ -423,35 +458,30 @@ class FactureFournisseur extends CommonInvoice dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + 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; + $sql = 'UPDATE '.MAIN_DB_PREFIX."facture_fourn SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) $error++; + 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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { dol_print_error($this->db); $error++; } @@ -460,8 +490,7 @@ class FactureFournisseur extends CommonInvoice { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { + if (!$ret) { dol_print_error($this->db); $error++; } @@ -469,17 +498,14 @@ class FactureFournisseur extends CommonInvoice } } - if (count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode) - { + 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) - { + 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) - { + if ($resql_insert) { $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); $this->updateline( @@ -511,20 +537,20 @@ class FactureFournisseur extends CommonInvoice } 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) - { + 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; + 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).')'; $resql_insert = $this->db->query($sql); - if ($resql_insert) - { + if ($resql_insert) { $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); $this->updateline( @@ -539,7 +565,7 @@ class FactureFournisseur extends CommonInvoice 'HT', (!empty($line->info_bits) ? $line->info_bits : ''), $line->product_type - ); + ); } else { $this->error = $this->db->lasterror(); $this->db->rollback(); @@ -550,28 +576,25 @@ class FactureFournisseur extends CommonInvoice // Update total price $result = $this->update_price(); - if ($result > 0) - { + 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) - { + if ($result < 0) { $error++; } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -584,8 +607,7 @@ class FactureFournisseur extends CommonInvoice return -3; } } else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $langs->trans('ErrorRefAlreadyExists'); $this->db->rollback(); return -1; @@ -655,15 +677,17 @@ class FactureFournisseur extends CommonInvoice $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=".((int) $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)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -685,7 +709,7 @@ class FactureFournisseur extends CommonInvoice $this->remise = $obj->remise; $this->close_code = $obj->close_code; $this->close_note = $obj->close_note; - $this->tva = $obj->tva; + $this->tva = $obj->tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; $this->total_ht = $obj->total_ht; @@ -737,11 +761,12 @@ class FactureFournisseur extends CommonInvoice // 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) - { + if ($result < 0) { $this->error = $this->db->lasterror(); return -3; } @@ -783,14 +808,11 @@ class FactureFournisseur extends CommonInvoice dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql_rows = $this->db->query($sql); - if ($resql_rows) - { + if ($resql_rows) { $num_rows = $this->db->num_rows($resql_rows); - if ($num_rows) - { + if ($num_rows) { $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $obj = $this->db->fetch_object($resql_rows); $line = new SupplierInvoiceLine($this->db); @@ -877,37 +899,95 @@ class FactureFournisseur extends CommonInvoice $error = 0; // 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 (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->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 @@ -922,7 +1002,9 @@ class FactureFournisseur extends CommonInvoice $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').","; + 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").","; @@ -946,7 +1028,7 @@ class FactureFournisseur extends CommonInvoice $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 .= " WHERE rowid=".((int) $this->id); $this->db->begin(); @@ -963,31 +1045,27 @@ class FactureFournisseur extends CommonInvoice } } - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_UPDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1019,10 +1097,8 @@ class FactureFournisseur extends CommonInvoice $remise = new DiscountAbsolute($this->db); $result = $remise->fetch($idremise); - if ($result > 0) - { - if ($remise->fk_invoice_supplier) // Protection against multiple submission - { + if ($result > 0) { + if ($remise->fk_invoice_supplier) { // Protection against multiple submission $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); $this->db->rollback(); return -5; @@ -1043,8 +1119,7 @@ class FactureFournisseur extends CommonInvoice $facligne->info_bits = 2; // Get buy/cost price of invoice that is source of discount - if ($remise->fk_invoice_supplier_source > 0) - { + if ($remise->fk_invoice_supplier_source > 0) { $srcinvoice = new FactureFournisseur($this->db); $srcinvoice->fetch($remise->fk_invoice_supplier_source); $totalcostpriceofinvoice = 0; @@ -1064,15 +1139,12 @@ class FactureFournisseur extends CommonInvoice $facligne->multicurrency_total_ttc = -$remise->multicurrency_total_ttc; $lineid = $facligne->insert(); - if ($lineid > 0) - { + if ($lineid > 0) { $result = $this->update_price(1); - if ($result > 0) - { + if ($result > 0) { // Create link between discount and invoice line $result = $remise->link_to_invoice($lineid, 0, 'supplier'); - if ($result < 0) - { + if ($result < 0) { $this->error = $remise->error; $this->db->rollback(); return -4; @@ -1117,12 +1189,10 @@ class FactureFournisseur extends CommonInvoice $error = 0; $this->db->begin(); - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -1132,7 +1202,7 @@ class FactureFournisseur extends CommonInvoice if (!$error) { // If invoice was converted into a discount not yet consumed, we remove discount $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'societe_remise_except'; - $sql .= ' WHERE fk_invoice_supplier_source = '.$rowid; + $sql .= ' WHERE fk_invoice_supplier_source = '.((int) $rowid); $sql .= ' AND fk_invoice_supplier_line IS NULL'; $resql = $this->db->query($sql); @@ -1147,7 +1217,7 @@ class FactureFournisseur extends CommonInvoice if (count($list_rowid_det)) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except'; $sql .= ' SET fk_invoice_supplier = NULL, fk_invoice_supplier_line = NULL'; - $sql .= ' WHERE fk_invoice_supplier_line IN ('.join(',', $list_rowid_det).')'; + $sql .= ' WHERE fk_invoice_supplier_line IN ('.$this->db->sanitize(join(',', $list_rowid_det)).')'; dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (!$this->db->query($sql)) { @@ -1156,18 +1226,16 @@ class FactureFournisseur extends CommonInvoice } } - if (!$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)"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM ".$main." WHERE fk_facture_fourn = ".((int) $rowid).")"; $resqlef = $this->db->query($sqlef); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.((int) $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; + if ($resqlef && $resql) { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.((int) $rowid); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql2 = $this->db->query($sql); if (!$resql2) { @@ -1178,47 +1246,43 @@ class FactureFournisseur extends CommonInvoice } } - if (!$error) - { + if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $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 - if ($conf->fournisseur->facture->dir_output) - { + 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, 'invoice_supplier').$ref; $file = $dir."/".$ref.".pdf"; - if (file_exists($file)) - { - if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers - { + if (file_exists($file)) { + if (!dol_delete_file($file, 0, 0, 0, $this)) { // For triggers $this->error = 'ErrorFailToDeleteFile'; $error++; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->error = 'ErrorFailToDeleteDir'; $error++; } @@ -1227,18 +1291,15 @@ class FactureFournisseur extends CommonInvoice } // Remove extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG); $this->db->commit(); return 1; @@ -1254,6 +1315,8 @@ class FactureFournisseur extends CommonInvoice /** * Tag invoice as a paid invoice * + * @deprecated + * @see setPaid() * @param User $user Object user * @param string $close_code Code indicates whether the class has paid in full while payment is incomplete. Not implementd yet. * @param string $close_note Comment informs if the class has been paid while payment is incomplete. Not implementd yet. @@ -1262,41 +1325,88 @@ class FactureFournisseur extends CommonInvoice public function set_paid($user, $close_code = '', $close_note = '') { // phpcs:enable - global $conf, $langs; + dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE); + return $this->setPaid($user, $close_code, $close_note); + } + + /** + * Tag invoice as a paid invoice + * + * @param User $user Object user + * @param string $close_code Code indicates whether the class has paid in full while payment is incomplete. Not implementd yet. + * @param string $close_note Comment informs if the class has been paid while payment is incomplete. Not implementd yet. + * @return int <0 si ko, >0 si ok + */ + public function setPaid($user, $close_code = '', $close_note = '') + { $error = 0; - $this->db->begin(); + if ($this->paye != 1) { + $this->db->begin(); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn'; - $sql .= ' SET paye = 1, fk_statut = '.self::STATUS_CLOSED; - $sql .= ' WHERE rowid = '.$this->id; + $now = dol_now(); - 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 + dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn SET'; + $sql .= ' fk_statut = '.self::STATUS_CLOSED; + if (!$close_code) { + $sql .= ', paye=1'; + } + if ($close_code) { + $sql .= ", close_code='".$this->db->escape($close_code)."'"; + } + if ($close_note) { + $sql .= ", close_note='".$this->db->escape($close_note)."'"; + } + $sql .= ', fk_user_closing = '.$user->id; + $sql .= ", date_closing = '".$this->db->idate($now)."'"; + $sql .= ' WHERE rowid = '.$this->id; + + $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; + } } 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; + return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag the invoice as not fully paid + trigger call BILL_UNPAYED + * Function used when a direct debit payment is refused, + * or when the invoice was canceled and reopened. + * + * @deprecated + * @see setUnpaid() + * @param User $user Object user that change status + * @return int <0 si ok, >0 si ok + */ + public function set_unpaid($user) + { + // phpcs:enable + dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); + return $this->setUnpaid($user); + } + /** * Tag the invoice as not fully paid + trigger call BILL_UNPAYED * Function used when a direct debit payment is refused, @@ -1305,34 +1415,35 @@ class FactureFournisseur extends CommonInvoice * @param User $user Object user that change status * @return int <0 si ok, >0 si ok */ - public function set_unpaid($user) + public function setUnpaid($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 .= ' SET paye=0, fk_statut='.self::STATUS_VALIDATED.', close_code=null, close_note=null'; + $sql .= ' date_closing=null,'; + $sql .= ' fk_user_closing=null'; $sql .= ' WHERE rowid = '.$this->id; dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_UNPAYED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } else { $error++; - $this->error = $this->db->lasterror(); - dol_syslog("FactureFournisseur::set_unpaid ".$this->error); + $this->error = $this->db->error(); + dol_print_error($this->db); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1341,6 +1452,64 @@ class FactureFournisseur extends CommonInvoice } } + /** + * 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 + * of no payment even if merchandises were sent). + * + * @param User $user Object user making change + * @param string $close_code Code of closing invoice (CLOSECODE_REPLACED, CLOSECODE_...) + * @param string $close_note Comment + * @return int <0 if KO, >0 if OK + */ + public function setCanceled($user, $close_code = '', $close_note = '') + { + dol_syslog(get_class($this)."::setCanceled rowid=".((int) $this->id), LOG_DEBUG); + + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn SET'; + $sql .= ' fk_statut='.self::STATUS_ABANDONED; + if ($close_code) { + $sql .= ", close_code='".$this->db->escape($close_code)."'"; + } + if ($close_note) { + $sql .= ", close_note='".$this->db->escape($close_note)."'"; + } + $sql .= ' WHERE rowid = '.$this->id; + + $resql = $this->db->query($sql); + if ($resql) { + // Bound discounts are deducted from the invoice + // as they have not been used since the invoice is abandoned. + $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except'; + $sql .= ' SET fk_invoice_supplier = NULL'; + $sql .= ' WHERE fk_invoice_supplier = '.$this->id; + + $resql = $this->db->query($sql); + if ($resql) { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_CANCEL', $user); + if ($result < 0) { + $this->db->rollback(); + return -1; + } + // End call triggers + + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->error()." sql=".$sql; + $this->db->rollback(); + return -1; + } + } else { + $this->error = $this->db->error()." sql=".$sql; + $this->db->rollback(); + return -2; + } + } + /** * Tag invoice as validated + call trigger BILL_VALIDATE * @@ -1366,19 +1535,16 @@ class FactureFournisseur extends CommonInvoice $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) - { + 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)) - { + 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) - { + if (count($this->lines) <= 0) { $langs->load("errors"); $this->error = $langs->trans("ErrorObjectMustHaveLinesToBeValidated", $this->ref); return -1; @@ -1387,11 +1553,9 @@ class FactureFournisseur extends CommonInvoice $this->db->begin(); // Define new ref - if ($force_number) - { + 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 $num = $this->getNextNumRef($this->thirdparty); } else { $num = $this->ref; @@ -1399,76 +1563,77 @@ class FactureFournisseur extends CommonInvoice $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 .= " SET ref='".$this->db->escape($num)."', fk_statut = 1, fk_user_valid = ".((int) $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) - { + 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)) - { + 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) - { + 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++; } + 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)) - { + if (!$error && empty($notrigger)) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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(); } + 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)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - if (@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) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -1481,15 +1646,13 @@ class FactureFournisseur extends CommonInvoice } // Set new ref and define current statut - if (!$error) - { + if (!$error) { $this->ref = $num; $this->statut = self::STATUS_VALIDATED; //$this->date_validation=$now; this is stored into log table } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1517,8 +1680,7 @@ class FactureFournisseur extends CommonInvoice $error = 0; - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { dol_syslog(__METHOD__." already draft status", LOG_WARNING); return 0; } @@ -1532,42 +1694,40 @@ class FactureFournisseur extends CommonInvoice $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - if ($result) - { - if (!$error) - { + 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)) - { + 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) - { + 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)); + 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)) - { + if (!$error && empty($notrigger)) { // Call trigger $result = $this->call_trigger('BILL_SUPPLIER_UNVALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if ($error == 0) - { + if ($error == 0) { $this->db->commit(); return 1; } else { @@ -1621,17 +1781,32 @@ class FactureFournisseur extends CommonInvoice 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) - { + if ($this->statut == self::STATUS_DRAFT) { // Clean parameters - if (empty($remise_percent)) $remise_percent = 0; - if (empty($qty)) $qty = 0; - if (empty($info_bits)) $info_bits = 0; - if (empty($rang)) $rang = 0; - if (empty($ventil)) $ventil = 0; - if (empty($txtva)) $txtva = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; + if (empty($remise_percent)) { + $remise_percent = 0; + } + if (empty($qty)) { + $qty = 0; + } + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($rang)) { + $rang = 0; + } + if (empty($ventil)) { + $ventil = 0; + } + if (empty($txtva)) { + $txtva = 0; + } + if (empty($txlocaltax1)) { + $txlocaltax1 = 0; + } + if (empty($txlocaltax2)) { + $txlocaltax2 = 0; + } $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -1650,15 +1825,12 @@ class FactureFournisseur extends CommonInvoice $this->db->begin(); - if ($fk_product > 0) - { - if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) - { + 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) - { + if ($prod->fetch($fk_product) > 0) { $product_type = $prod->type; $label = $prod->label; $fk_prod_fourn_price = 0; @@ -1666,16 +1838,17 @@ class FactureFournisseur extends CommonInvoice // 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 + 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) + 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 - { + 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(); @@ -1684,16 +1857,14 @@ class FactureFournisseur extends CommonInvoice //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price return -1; } - if ($result == -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) - { + if ($result < -1) { $this->error = $prod->error; $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); @@ -1718,8 +1889,7 @@ class FactureFournisseur extends CommonInvoice // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -1744,10 +1914,11 @@ class FactureFournisseur extends CommonInvoice $pu_ht_devise = $tabprice[19]; // Check parameters - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } - if ($rang < 0) - { + if ($rang < 0) { $rangmax = $this->line_max(); $rang = $rangmax + 1; } @@ -1806,15 +1977,15 @@ class FactureFournisseur extends CommonInvoice } $result = $this->line->insert($notrigger); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } // Mise a jour informations denormalisees au niveau de la facture meme $result = $this->update_price(1, 'auto', 0, $this->thirdparty); // The addline method is designed to add line from user input so total calculation with update_price must be done using 'auto' mode. - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -1871,7 +2042,9 @@ class FactureFournisseur extends CommonInvoice // Check parameters //if (! is_numeric($pu) || ! is_numeric($qty)) return -1; - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } if ($date_start && $date_end && $date_start > $date_end) { $langs->load("errors"); @@ -1880,9 +2053,15 @@ class FactureFournisseur extends CommonInvoice } // Clean parameters - if (empty($vatrate)) $vatrate = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; + if (empty($vatrate)) { + $vatrate = 0; + } + if (empty($txlocaltax1)) { + $txlocaltax1 = 0; + } + if (empty($txlocaltax2)) { + $txlocaltax2 = 0; + } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); @@ -1898,8 +2077,7 @@ class FactureFournisseur extends CommonInvoice // Clean vat code $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $vatrate, $reg)) - { + if (preg_match('/\((.*)\)/', $vatrate, $reg)) { $vat_src_code = $reg[1]; $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. } @@ -1920,10 +2098,11 @@ class FactureFournisseur extends CommonInvoice $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) - { + if ($idproduct) { $product = new Product($this->db); $result = $product->fetch($idproduct); $product_type = $product->type; @@ -2011,12 +2190,11 @@ class FactureFournisseur extends CommonInvoice // Libere remise liee a ligne de facture $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except'; $sql .= ' SET fk_invoice_supplier_line = NULL'; - $sql .= ' WHERE fk_invoice_supplier_line = '.$rowid; + $sql .= ' WHERE fk_invoice_supplier_line = '.((int) $rowid); dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -2037,8 +2215,7 @@ class FactureFournisseur extends CommonInvoice } else { $res = $this->update_price(); - if ($res > 0) - { + if ($res > 0) { $this->db->commit(); return 1; } else { @@ -2061,29 +2238,24 @@ class FactureFournisseur extends CommonInvoice $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; + $sql .= ' WHERE c.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + 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) - { + if ($obj->fk_user_modif) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modif); $this->user_modification = $muser; @@ -2124,15 +2296,15 @@ class FactureFournisseur extends CommonInvoice $sql .= " AND f.paye = 0"; // Pas classee payee completement $sql .= " AND pf.fk_paiementfourn IS NULL"; // Aucun paiement deja fait $sql .= " AND ff.fk_statut IS NULL"; // Renvoi vrai si pas facture de remplacement - if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; + if ($socid > 0) { + $sql .= " AND f.fk_soc = ".$socid; + } $sql .= " ORDER BY f.ref"; dol_syslog(get_class($this)."::list_replacable_supplier_invoices", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $return[$obj->rowid] = array( 'id' => $obj->rowid, 'ref' => $obj->ref, @@ -2172,20 +2344,23 @@ class FactureFournisseur extends CommonInvoice $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; + if ($socid > 0) { + $sql .= " AND f.fk_soc = ".$socid; + } $sql .= " ORDER BY f.ref"; dol_syslog(get_class($this)."::list_qualified_avoir_supplier_invoices", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $qualified = 0; - if ($obj->fk_statut == self::STATUS_VALIDATED) $qualified = 1; - if ($obj->fk_statut == self::STATUS_CLOSED) $qualified = 1; - if ($qualified) - { + if ($obj->fk_statut == self::STATUS_VALIDATED) { + $qualified = 1; + } + if ($obj->fk_statut == self::STATUS_CLOSED) { + $qualified = 1; + } + if ($qualified) { $paymentornot = ($obj->fk_paiementfourn ? 1 : 0); $return[$obj->rowid] = array('ref'=>$obj->ref, 'status'=>$obj->fk_statut, 'type'=>$obj->type, 'paye'=>$obj->paye, 'paymentornot'=>$paymentornot); } @@ -2212,16 +2387,21 @@ class FactureFournisseur extends CommonInvoice $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"; + 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; + 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) - { + if ($resql) { $langs->load("bills"); $now = dol_now(); @@ -2235,8 +2415,7 @@ class FactureFournisseur extends CommonInvoice $facturestatic = new FactureFournisseur($this->db); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $facturestatic->date_echeance = $this->db->jdate($obj->datefin); @@ -2276,60 +2455,88 @@ class FactureFournisseur extends CommonInvoice $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 ($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 ($short) { + return $url; + } - if ($option !== 'nolink') - { + 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'; + 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 + 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 = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("SupplierInvoice").'</u>'; - if ($this->type == self::TYPE_REPLACEMENT) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("InvoiceReplace").'</u>'; - elseif ($this->type == self::TYPE_CREDIT_NOTE) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("CreditNote").'</u>'; - elseif ($this->type == self::TYPE_DEPOSIT) $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("Deposit").'</u>'; + if ($this->type == self::TYPE_REPLACEMENT) { + $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("InvoiceReplace").'</u>'; + } elseif ($this->type == self::TYPE_CREDIT_NOTE) { + $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("CreditNote").'</u>'; + } elseif ($this->type == self::TYPE_DEPOSIT) { + $label = '<u class="paddingrightonly">'.$langs->transnoentitiesnoconv("Deposit").'</u>'; + } if (isset($this->status)) { $alreadypaid = -1; $label .= ' '.$this->getLibStatut(5, $alreadypaid); } - if (!empty($this->ref)) + if (!empty($this->ref)) { $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; - if (!empty($this->ref_supplier)) + } + if (!empty($this->ref_supplier)) { $label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier; - if (!empty($this->label)) + } + if (!empty($this->label)) { $label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label; - if (!empty($this->date)) + } + if (!empty($this->date)) { $label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->date, 'day'); - if (!empty($this->total_ht)) + } + if (!empty($this->total_ht)) { $label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) + } + if (!empty($this->total_tva)) { $label .= '<br><b>'.$langs->trans('AmountVAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) + } + if (!empty($this->total_ttc)) { $label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); - if ($moretitle) $label .= ' - '.$moretitle; + } + if ($moretitle) { + $label .= ' - '.$moretitle; + } if (isset($this->statut) && isset($this->alreadypaid)) { $label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5, $this->alreadypaid); } $ref = $this->ref; - if (empty($ref)) $ref = $this->id; + if (empty($ref)) { + $ref = $this->id; + } $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowSupplierInvoice"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -2342,15 +2549,17 @@ class FactureFournisseur extends CommonInvoice $linkend = '</a>'; $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); + 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) - { + if ($addlinktonotes) { $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { + if ($txttoshow) { $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1); $result .= ' <span class="note inline-block">'; $result .= '<a href="'.DOL_URL_ROOT.'/fourn/facture/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">'; @@ -2379,7 +2588,9 @@ class FactureFournisseur extends CommonInvoice $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'; + if (empty($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER)) { + $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER = 'mod_facture_fournisseur_cactus'; + } $mybool = false; @@ -2405,8 +2616,7 @@ class FactureFournisseur extends CommonInvoice $numref = ""; $numref = $obj->getNumRef($soc, $this, $mode); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -2440,12 +2650,10 @@ class FactureFournisseur extends CommonInvoice $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -2469,13 +2677,11 @@ class FactureFournisseur extends CommonInvoice $this->multicurrency_tx = 1; $this->multicurrency_code = $conf->currency; - if (empty($option) || $option != 'nolines') - { + if (empty($option) || $option != 'nolines') { // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new SupplierInvoiceLine($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->qty = 1; @@ -2485,8 +2691,7 @@ class FactureFournisseur extends CommonInvoice $line->tva_tx = 19.6; $line->localtax1_tx = 0; $line->localtax2_tx = 0; - if ($xnbp == 2) - { + if ($xnbp == 2) { $line->total_ht = 50; $line->total_ttc = 59.8; $line->total_tva = 9.8; @@ -2498,8 +2703,7 @@ class FactureFournisseur extends CommonInvoice $line->remise_percent = 0; } - if ($num_prods > 0) - { + if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; } @@ -2539,8 +2743,7 @@ class FactureFournisseur extends CommonInvoice $sql = "SELECT count(f.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -2548,10 +2751,8 @@ class FactureFournisseur extends CommonInvoice $sql .= " ".$clause." f.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["supplier_invoices"] = $obj->nb; } $this->db->free($resql); @@ -2600,12 +2801,14 @@ class FactureFournisseur extends CommonInvoice $object->ref_client = ''; $object->close_code = ''; $object->close_note = ''; + if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING == 1) { + $object->note_private = ''; + $object->note_public = ''; + } // 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 - { + 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]); } } @@ -2615,22 +2818,19 @@ class FactureFournisseur extends CommonInvoice $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $this->errors = $object->errors; $error++; } - if (!$error) - { + if (!$error) { } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -2658,18 +2858,15 @@ class FactureFournisseur extends CommonInvoice $outputlangs->load("products"); // Set the model on the model name to use - if (empty($modele)) - { - if (!empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) - { + if (empty($modele)) { + if (!empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) { $modele = $conf->global->INVOICE_SUPPLIER_ADDON_PDF; } else { $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation } } - if (empty($modele)) - { + if (empty($modele)) { return 0; } else { $modelpath = "core/modules/supplier_invoice/doc/"; @@ -2737,7 +2934,9 @@ class FactureFournisseur extends CommonInvoice $resql = $this->db->query($sql); if (!empty($resql)) { $obj = $this->db->fetch_object($resql); - if (!empty($obj->fk_invoice_supplier)) $isUsed = true; + if (!empty($obj->fk_invoice_supplier)) { + $isUsed = true; + } } return $isUsed; @@ -2996,7 +3195,7 @@ class SupplierInvoiceLine extends CommonObjectLine $sql .= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, 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 f.rowid = '.$rowid; + $sql .= ' WHERE f.rowid = '.((int) $rowid); $sql .= ' ORDER BY f.rang, f.rowid'; $query = $this->db->query($sql); @@ -3069,7 +3268,7 @@ class SupplierInvoiceLine extends CommonObjectLine { global $user, $conf; - dol_syslog(get_class($this)."::deleteline rowid=".$this->id, LOG_DEBUG); + dol_syslog(get_class($this)."::deleteline rowid=".((int) $this->id), LOG_DEBUG); $error = 0; @@ -3084,11 +3283,9 @@ class SupplierInvoiceLine extends CommonObjectLine $this->deleteObjectLinked(); // Remove extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } @@ -3106,8 +3303,7 @@ class SupplierInvoiceLine extends CommonObjectLine } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -3130,22 +3326,31 @@ class SupplierInvoiceLine extends CommonObjectLine $qty = price2num($this->qty); // Check parameters - if (empty($this->qty)) $this->qty = 0; + if (empty($this->qty)) { + $this->qty = 0; + } if ($this->product_type < 0) { return -1; } // Clean parameters - if (empty($this->remise_percent)) $this->remise_percent = 0; - 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->remise_percent)) { + $this->remise_percent = 0; + } + 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; + } $this->db->begin(); - if (empty($this->fk_product)) - { + if (empty($this->fk_product)) { $fk_product = "null"; } else { $fk_product = $this->fk_product; @@ -3202,17 +3407,14 @@ class SupplierInvoiceLine extends CommonObjectLine $this->rowid = $this->id; $error = 0; - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { global $langs, $user; // Call trigger @@ -3248,41 +3450,78 @@ class SupplierInvoiceLine extends CommonObjectLine // 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->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) - { + if ($this->product_type < 0) { $this->error = 'ErrorProductTypeMustBe0orMore'; return -1; } - if (!empty($this->fk_product)) - { + if (!empty($this->fk_product)) { // Check product exists $result = Product::isExistingObject('product', $this->fk_product); - if ($result <= 0) - { + if ($result <= 0) { $this->error = 'ErrorProductIdDoesNotExists'; return -1; } @@ -3338,26 +3577,21 @@ class SupplierInvoiceLine extends CommonObjectLine $sql .= ')'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); $this->rowid = $this->id; // backward compatibility - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINEBILL_SUPPLIER_CREATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -2; } @@ -3396,8 +3630,7 @@ class SupplierInvoiceLine extends CommonObjectLine dol_syslog("FactureFournisseurLigne.class.php::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 7849df7f6bb..21b4ec377a2 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com> * * This program is free software; you can redistribute it and/or modify @@ -164,18 +164,16 @@ class ProductFournisseur extends Product $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " WHERE fk_product = ".$this->id." AND fk_soc = ".$id_fourn; + $sql .= " WHERE fk_product = ".$this->id." AND fk_soc = ".((int) $id_fourn); dol_syslog(get_class($this)."::remove_fournisseur", LOG_DEBUG); $resql2 = $this->db->query($sql); - if (!$resql2) - { + if (!$resql2) { $this->error = $this->db->lasterror(); $ok = 0; } - if ($ok) - { + if ($ok) { $this->db->commit(); return 1; } else { @@ -203,18 +201,18 @@ class ProductFournisseur extends Product // Call trigger $result = $this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (empty($error)) - { + if (empty($error)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(get_class($this)."::remove_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $error++; } @@ -266,15 +264,28 @@ class ProductFournisseur extends Product //global $mysoc; // Clean parameter - if (empty($qty)) $qty = 0; - if (empty($buyprice)) $buyprice = 0; - if (empty($charges)) $charges = 0; - if (empty($availability)) $availability = 0; - if (empty($remise_percent)) $remise_percent = 0; - if (empty($supplier_reputation) || $supplier_reputation == -1) $supplier_reputation = ''; - if ($delivery_time_days != '' && !is_numeric($delivery_time_days)) $delivery_time_days = ''; - if ($price_base_type == 'TTC') - { + if (empty($qty)) { + $qty = 0; + } + if (empty($buyprice)) { + $buyprice = 0; + } + if (empty($charges)) { + $charges = 0; + } + if (empty($availability)) { + $availability = 0; + } + if (empty($remise_percent)) { + $remise_percent = 0; + } + if (empty($supplier_reputation) || $supplier_reputation == -1) { + $supplier_reputation = ''; + } + if ($delivery_time_days != '' && !is_numeric($delivery_time_days)) { + $delivery_time_days = ''; + } + if ($price_base_type == 'TTC') { $ttx = $tva_tx; $buyprice = $buyprice / (1 + ($ttx / 100)); } @@ -283,10 +294,13 @@ class ProductFournisseur extends Product $multicurrency_unitBuyPrice = null; $fk_multicurrency = null; if (!empty($conf->multicurrency->enabled)) { - if (empty($multicurrency_tx)) $multicurrency_tx = 1; - if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0; - if ($multicurrency_price_base_type == 'TTC') - { + if (empty($multicurrency_tx)) { + $multicurrency_tx = 1; + } + if (empty($multicurrency_buyprice)) { + $multicurrency_buyprice = 0; + } + if ($multicurrency_price_base_type == 'TTC') { $ttx = $tva_tx; $multicurrency_buyprice = $multicurrency_buyprice / (1 + ($ttx / 100)); } @@ -309,8 +323,7 @@ class ProductFournisseur extends Product $newvat = $tva_tx; - if (count($localtaxes_array) > 0) - { + if (count($localtaxes_array) > 0) { $localtaxtype1 = $localtaxes_array['0']; $localtax1 = $localtaxes_array['1']; $localtaxtype2 = $localtaxes_array['2']; @@ -321,26 +334,26 @@ class ProductFournisseur extends Product $localtaxtype2 = '0'; $localtax2 = get_localtax($newvat, 2); } - if (empty($localtax1)) $localtax1 = 0; // If = '' then = 0 - if (empty($localtax2)) $localtax2 = 0; // If = '' then = 0 + if (empty($localtax1)) { + $localtax1 = 0; // If = '' then = 0 + } + if (empty($localtax2)) { + $localtax2 = 0; // If = '' then = 0 + } // Check parameters - if ($buyprice != '' && !is_numeric($buyprice)) - { + if ($buyprice != '' && !is_numeric($buyprice)) { } $this->db->begin(); - if ($this->product_fourn_price_id > 0) - { + if ($this->product_fourn_price_id > 0) { // check if price already logged, if not first log current price $logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id); - if (is_array($logPrices) && count($logPrices) == 0) - { + if (is_array($logPrices) && count($logPrices) == 0) { $currentPfp = new self($this->db); $result = $currentPfp->fetch_product_fournisseur_price($this->product_fourn_price_id); - if ($result > 0 && $currentPfp->fourn_price != 0) - { + if ($result > 0 && $currentPfp->fourn_price != 0) { $currentPfpUser = new User($this->db); $result = $currentPfpUser->fetch($currentPfp->user_id); if ($result > 0) { @@ -359,15 +372,15 @@ class ProductFournisseur extends Product } } $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " SET fk_user = ".$user->id." ,"; + $sql .= " SET fk_user = ".((int) $user->id)." ,"; $sql .= " ref_fourn = '".$this->db->escape($ref_fourn)."',"; $sql .= " desc_fourn = '".$this->db->escape($desc_fourn)."',"; - $sql .= " price = ".$buyprice.","; - $sql .= " quantity = ".$qty.","; - $sql .= " remise_percent = ".$remise_percent.","; - $sql .= " remise = ".$remise.","; - $sql .= " unitprice = ".$unitBuyPrice.","; - $sql .= " fk_availability = ".$availability.","; + $sql .= " price = ".((float) $buyprice).","; + $sql .= " quantity = ".((float) $qty).","; + $sql .= " remise_percent = ".((float) $remise_percent).","; + $sql .= " remise = ".((float) $remise).","; + $sql .= " unitprice = ".((float) $unitBuyPrice).","; + $sql .= " fk_availability = ".((int) $availability).","; $sql .= " multicurrency_price = ".(isset($multicurrency_buyprice) ? "'".$this->db->escape(price2num($multicurrency_buyprice))."'" : 'null').","; $sql .= " multicurrency_unitprice = ".(isset($multicurrency_unitBuyPrice) ? "'".$this->db->escape(price2num($multicurrency_unitBuyPrice))."'" : 'null').","; $sql .= " multicurrency_tx = ".(isset($multicurrency_tx) ? "'".$this->db->escape($multicurrency_tx)."'" : '1').","; @@ -381,33 +394,34 @@ class ProductFournisseur extends Product //$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 - $sql .= " delivery_time_days = ".($delivery_time_days != '' ? $delivery_time_days : 'null').","; + $sql .= " info_bits = ".((int) $newnpr).","; + $sql .= " charges = ".((float) $charges).","; // deprecated + $sql .= " delivery_time_days = ".($delivery_time_days != '' ? ((int) $delivery_time_days) : 'null').","; $sql .= " supplier_reputation = ".(empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'").","; $sql .= " barcode = ".(empty($barcode) ? 'NULL' : "'".$this->db->escape($barcode)."'").","; $sql .= " fk_barcode_type = ".(empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'"); - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", packaging = ".(empty($packaging) ? 1 : $packaging); - $sql .= " WHERE rowid = ".$this->product_fourn_price_id; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $sql .= ", packaging = ".(empty($packaging) ? 1 : $packaging); + } + $sql .= " WHERE rowid = ".((int) $this->product_fourn_price_id); // TODO Add price_base_type and price_ttc dol_syslog(get_class($this).'::update_buyprice update knowing id of line = product_fourn_price_id = '.$this->product_fourn_price_id, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger $result = $this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (!$error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) - { + if (!$error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) { $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code); if ($result < 0) { $error++; } } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return $this->product_fourn_price_id; } else { @@ -424,14 +438,16 @@ class ProductFournisseur extends Product // Delete price for this quantity $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " WHERE fk_soc = ".$fourn->id." AND ref_fourn = '".$this->db->escape($ref_fourn)."' AND quantity = ".$qty." AND entity = ".$conf->entity; + $sql .= " WHERE fk_soc = ".$fourn->id." AND ref_fourn = '".$this->db->escape($ref_fourn)."' AND quantity = ".((float) $qty)." AND entity = ".$conf->entity; $resql = $this->db->query($sql); if ($resql) { // Add price for this quantity to supplier $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price("; $sql .= " multicurrency_price, multicurrency_unitprice, multicurrency_tx, fk_multicurrency, multicurrency_code,"; $sql .= "datec, fk_product, fk_soc, ref_fourn, desc_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, fk_availability, default_vat_code, info_bits, entity, delivery_time_days, supplier_reputation, barcode, fk_barcode_type)"; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", packaging"; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $sql .= ", packaging"; + } $sql .= " values("; $sql .= (isset($multicurrency_buyprice) ? "'".$this->db->escape(price2num($multicurrency_buyprice))."'" : 'null').","; $sql .= (isset($multicurrency_unitBuyPrice) ? "'".$this->db->escape(price2num($multicurrency_unitBuyPrice))."'" : 'null').","; @@ -459,7 +475,9 @@ class ProductFournisseur extends Product $sql .= (empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'").","; $sql .= (empty($barcode) ? 'NULL' : "'".$this->db->escape($barcode)."'").","; $sql .= (empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'"); - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", ".(empty($this->packaging) ? 1 : $this->db->escape($this->packaging)); + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $sql .= ", ".(empty($this->packaging) ? 1 : $this->db->escape($this->packaging)); + } $sql .= ")"; $this->product_fourn_price_id = 0; @@ -483,8 +501,9 @@ class ProductFournisseur extends Product if (!$error) { // Call trigger $result = $this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_CREATE', $user); - if ($result < 0) + if ($result < 0) { $error++; + } // End call triggers if (empty($error)) { @@ -532,11 +551,9 @@ class ProductFournisseur extends Product dol_syslog(get_class($this)."::fetch_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $this->product_fourn_price_id = $rowid; $this->id = $obj->fk_product; @@ -578,18 +595,18 @@ class ProductFournisseur extends Product if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { $this->packaging = $obj->packaging; - if ($this->packaging < $this->fourn_qty) $this->packaging = $this->fourn_qty; + if ($this->packaging < $this->fourn_qty) { + $this->packaging = $this->fourn_qty; + } } - if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) - { + if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) { $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProductSupplier($this); if ($price_result >= 0) { $this->fourn_price = $price_result; //recalculation of unitprice, as probably the price changed... - if ($this->fourn_qty != 0) - { + if ($this->fourn_qty != 0) { $this->fourn_unitprice = price2num($this->fourn_price / $this->fourn_qty, 'MU'); } else { $this->fourn_unitprice = ""; @@ -617,9 +634,10 @@ class ProductFournisseur extends Product * @param string $sortorder Sort order * @param int $limit Limit * @param int $offset Offset + * @param int $socid Filter on a third party id * @return array Array of Products with new properties to define supplier price */ - public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0) + public function list_product_fournisseur_price($prodid, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0, $socid = 0) { // phpcs:enable global $conf; @@ -629,24 +647,28 @@ class ProductFournisseur extends Product $sql .= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,"; $sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,"; $sql .= " pfp.barcode, pfp.fk_barcode_type"; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", pfp.packaging"; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $sql .= ", pfp.packaging"; + } $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")"; $sql .= " AND pfp.fk_soc = s.rowid AND pfp.fk_product = p.rowid"; - $sql .= " AND s.status=1"; // only enabled company selected - $sql .= " AND pfp.fk_product = ".$prodid; - if (empty($sortfield)) $sql .= " ORDER BY s.nom, pfp.quantity, pfp.price"; - else $sql .= $this->db->order($sortfield, $sortorder); + $sql .= ($socid > 0 ? ' AND pfp.fk_soc = '.((int) $socid) : ''); + $sql .= " AND s.status = 1"; // only enabled company selected + $sql .= " AND pfp.fk_product = ".((int) $prodid); + if (empty($sortfield)) { + $sql .= " ORDER BY s.nom, pfp.quantity, pfp.price"; + } else { + $sql .= $this->db->order($sortfield, $sortorder); + } $sql .= $this->db->plimit($limit, $offset); dol_syslog(get_class($this)."::list_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { //define base attribute $prodfourn = new ProductFournisseur($this->db); @@ -683,7 +705,9 @@ class ProductFournisseur extends Product if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { $prodfourn->packaging = $record["packaging"]; - if ($prodfourn->packaging < $prodfourn->fourn_qty) $prodfourn->packaging = $prodfourn->fourn_qty; + if ($prodfourn->packaging < $prodfourn->fourn_qty) { + $prodfourn->packaging = $prodfourn->fourn_qty; + } } if (!empty($conf->barcode->enabled)) { @@ -700,10 +724,8 @@ class ProductFournisseur extends Product } } - if (!isset($prodfourn->fourn_unitprice)) - { - if ($prodfourn->fourn_qty != 0) - { + if (!isset($prodfourn->fourn_unitprice)) { + if ($prodfourn->fourn_qty != 0) { $prodfourn->fourn_unitprice = price2num($prodfourn->fourn_price / $prodfourn->fourn_qty, 'MU'); } else { $prodfourn->fourn_unitprice = ""; @@ -735,8 +757,7 @@ class ProductFournisseur extends Product // phpcs:enable global $conf; - if (empty($prodid)) - { + if (empty($prodid)) { dol_syslog("Warning function find_min_price_product_fournisseur were called with prodid empty. May be a bug.", LOG_WARNING); return 0; } @@ -771,30 +792,30 @@ class ProductFournisseur extends Product $sql .= " AND pfp.fk_product = ".$prodid; $sql .= " AND pfp.fk_soc = s.rowid"; $sql .= " AND s.status = 1"; // only enabled society - if ($qty > 0) $sql .= " AND pfp.quantity <= ".$qty; - if ($socid > 0) $sql .= ' AND pfp.fk_soc = '.$socid; + if ($qty > 0) { + $sql .= " AND pfp.quantity <= ".$qty; + } + if ($socid > 0) { + $sql .= ' AND pfp.fk_soc = '.$socid; + } dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $record_array = array(); //Store each record to array for later search of min - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { $record_array[] = $record; } - if (count($record_array) == 0) - { + if (count($record_array) == 0) { $this->db->free($resql); return 0; } else { $min = -1; - foreach ($record_array as $record) - { + foreach ($record_array as $record) { $fourn_price = $record["price"]; // discount calculated buy price $fourn_unitprice = $record["unitprice"] * (1 - $record["remise_percent"] / 100) - $record["remise"]; @@ -809,16 +830,14 @@ class ProductFournisseur extends Product $price_result = $priceparser->parseProductSupplier($prod_supplier); if ($price_result >= 0) { $fourn_price = price2num($price_result, 'MU'); - if ($record["quantity"] != 0) - { + if ($record["quantity"] != 0) { $fourn_unitprice = price2num($fourn_price / $record["quantity"], 'MU'); } else { $fourn_unitprice = $fourn_price; } } } - if ($fourn_unitprice < $min || $min == -1) - { + if ($fourn_unitprice < $min || $min == -1) { $this->product_fourn_price_id = $record["product_fourn_price_id"]; $this->ref_supplier = $record["ref_fourn"]; $this->ref_fourn = $record["ref_fourn"]; // deprecated @@ -868,14 +887,13 @@ class ProductFournisseur extends Product $expression_id = $expression_id != 0 ? $expression_id : 'NULL'; $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " SET fk_supplier_price_expression = ".$expression_id; - $sql .= " WHERE rowid = ".$this->product_fourn_price_id; + $sql .= " SET fk_supplier_price_expression = ".((int) $expression_id); + $sql .= " WHERE rowid = ".((int) $this->product_fourn_price_id); dol_syslog(get_class($this)."::setSupplierPriceExpression", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -936,7 +954,9 @@ class ProductFournisseur extends Product } $out .= '</table>'; } else { - $out = ($showunitprice ?price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise).' '.$langs->trans("HT").' &nbsp; (' : '').($showsuptitle ? $langs->trans("Supplier").': ' : '').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / '.$langs->trans("SupplierRef").': '.$this->fourn_ref.($showunitprice ? ')' : ''); + $out = ($showunitprice ? price($this->fourn_unitprice * (1 - $this->fourn_remise_percent / 100) + $this->fourn_remise).' '.$langs->trans("HT").' &nbsp; <span class="opacitymedium">(</span>' : ''); + $out .= ($showsuptitle ? '<span class="opacitymedium">'.$langs->trans("Supplier").'</span>: ' : '').$this->getSocNomUrl(1, 'supplier', $maxlen, $notooltip).' / <span class="opacitymedium">'.$langs->trans("SupplierRef").'</span>: '.$this->ref_supplier; + $out .= ($showunitprice ? '<span class="opacitymedium">)</span>' : ''); } return $out; } @@ -982,18 +1002,19 @@ class ProductFournisseur extends Product $sql .= " AND pfpl.fk_user = u.rowid"; $sql .= " AND pfp.rowid = pfpl.fk_product_fournisseur"; $sql .= " AND pfpl.fk_product_fournisseur = ".$product_fourn_price_id; - if (empty($sortfield)) $sql .= " ORDER BY pfpl.datec"; - else $sql .= $this->db->order($sortfield, $sortorder); + if (empty($sortfield)) { + $sql .= " ORDER BY pfpl.datec"; + } else { + $sql .= $this->db->order($sortfield, $sortorder); + } $sql .= $this->db->plimit($limit, $offset); dol_syslog(get_class($this)."::list_product_fournisseur_price_log", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $tmparray = array(); $tmparray['rowid'] = $obj->rowid; $tmparray['supplier_ref'] = $obj->supplier_ref; @@ -1038,7 +1059,7 @@ class ProductFournisseur extends Product //$out .= '<td class="liste_titre right">'.$langs->trans("QtyMin").'</td>'; $out .= '<td class="liste_titre">'.$langs->trans("User").'</td></tr>'; foreach ($productFournLogList as $productFournLog) { - $out .= '<tr><td class="right">'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'</td>'; + $out .= '<tr><td>'.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').'</td>'; $out .= '<td class="right">'.price($productFournLog['price'], 0, $langs, 1, -1, -1, $conf->currency); if ($productFournLog['multicurrency_code'] != $conf->currency) { $out .= ' ('.price($productFournLog['multicurrency_price'], 0, $langs, 1, -1, -1, $productFournLog['multicurrency_code']).')'; @@ -1068,9 +1089,12 @@ class ProductFournisseur extends Product { global $db, $conf, $langs; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; + $label = ''; if (!empty($this->entity)) { $tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80); @@ -1109,8 +1133,7 @@ class ProductFournisseur extends Product $label .= '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode; } - if ($this->type == Product::TYPE_PRODUCT) - { + if ($this->type == Product::TYPE_PRODUCT) { if ($this->weight) { $label .= "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units); } @@ -1124,7 +1147,9 @@ class ProductFournisseur extends Product if ($this->height) { $labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Height").'</b>: '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units); } - if ($labelsize) $label .= "<br>".$labelsize; + if ($labelsize) { + $label .= "<br>".$labelsize; + } $labelsurfacevolume = ""; if ($this->surface) { @@ -1133,7 +1158,9 @@ class ProductFournisseur extends Product if ($this->volume) { $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units); } - if ($labelsurfacevolume) $label .= "<br>".$labelsurfacevolume; + if ($labelsurfacevolume) { + $label .= "<br>".$labelsurfacevolume; + } } if (!empty($conf->accounting->enabled) && $this->status) { @@ -1158,33 +1185,40 @@ class ProductFournisseur extends Product $url = dol_buildpath('/product/fournisseurs.php', 1).'?id='.$this->id.'&action=add_price&socid='.$this->fourn_id.'&rowid='.$this->product_fourn_price_id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("SupplierRef"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : ''); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : ''); + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); diff --git a/htdocs/fourn/class/index.html b/htdocs/fourn/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 78bfa6ebff2..9f17f522bdd 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -98,20 +98,19 @@ class PaiementFourn extends Paiement $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 .= ' WHERE p.entity IN ('.getEntity('facture_fourn').')'; - if ($id > 0) - $sql .= ' AND p.rowid = '.$id; - elseif ($ref) - $sql .= ' AND p.ref = '.$ref; - elseif ($fk_bank) - $sql .= ' AND p.fk_bank = '.$fk_bank; + if ($id > 0) { + $sql .= ' AND p.rowid = '.((int) $id); + } elseif ($ref) { + $sql .= " AND p.ref = '".$this->db->escape($ref)."'"; + } elseif ($fk_bank > 0) { + $sql .= ' AND p.fk_bank = '.((int) $fk_bank); + } //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -166,8 +165,7 @@ class PaiementFourn extends Paiement dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($way == 'dolibarr') - { + if ($way == 'dolibarr') { $amounts = &$this->amounts; $amounts_to_update = &$this->multicurrency_amounts; } else { @@ -175,8 +173,7 @@ class PaiementFourn extends Paiement $amounts_to_update = &$this->amounts; } - foreach ($amounts as $key => $value) - { + foreach ($amounts as $key => $value) { $value_converted = Multicurrency::getAmountConversionFromInvoiceRate($key, $value ? $value : 0, $way, 'facture_fourn'); $totalamount_converted += $value_converted; $amounts_to_update[$key] = price2num($value_converted, 'MT'); @@ -190,13 +187,11 @@ class PaiementFourn extends Paiement $this->db->begin(); - if ($totalamount <> 0) // On accepte les montants negatifs - { + if ($totalamount <> 0) { // On accepte les montants negatifs $ref = $this->getNextNumRef(is_object($thirdparty) ? $thirdparty : ''); $now = dol_now(); - if ($way == 'dolibarr') - { + if ($way == 'dolibarr') { $total = $totalamount; $mtotal = $totalamount_converted; // Maybe use price2num with MT for the converted value } else { @@ -210,28 +205,23 @@ class PaiementFourn extends Paiement $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) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'paiementfourn'); // Insere tableau des montants / factures - foreach ($this->amounts as $key => $amount) - { + foreach ($this->amounts as $key => $amount) { $facid = $key; - if (is_numeric($amount) && $amount <> 0) - { + if (is_numeric($amount) && $amount <> 0) { $amount = price2num($amount); $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn_facturefourn (fk_facturefourn, fk_paiementfourn, amount, multicurrency_amount)'; $sql .= ' VALUES ('.$facid.','.$this->id.',\''.$amount.'\', \''.$this->multicurrency_amounts[$key].'\')'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $invoice = new FactureFournisseur($this->db); $invoice->fetch($facid); // If we want to closed paid invoices - if ($closepaidinvoices) - { + if ($closepaidinvoices) { $paiement = $invoice->getSommePaiement(); //$creditnotes=$invoice->getSumCreditNotesUsed(); $creditnotes = 0; @@ -239,18 +229,20 @@ class PaiementFourn extends Paiement $deposits = 0; $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); $remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT'); - if ($remaintopay == 0) - { - $result = $invoice->set_paid($user, '', ''); - } else dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing."); + if ($remaintopay == 0) { + $result = $invoice->setPaid($user, '', ''); + } else { + dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing."); + } } // Regenerate documents of invoices - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $newlang = ''; $outputlangs = $langs; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $invoice->thirdparty->default_lang; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + $newlang = $invoice->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -271,11 +263,12 @@ class PaiementFourn extends Paiement } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('PAYMENT_SUPPLIER_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } else { @@ -288,8 +281,7 @@ class PaiementFourn extends Paiement $error++; } - if ($totalamount <> 0 && $error == 0) // On accepte les montants negatifs - { + if ($totalamount <> 0 && $error == 0) { // On accepte les montants negatifs $this->amount = $total; $this->total = $total; $this->multicurrency_amount = $mtotal; @@ -322,10 +314,8 @@ class PaiementFourn extends Paiement // Verifier si paiement porte pas sur une facture a l'etat payee // Si c'est le cas, on refuse la suppression $billsarray = $this->getBillsArray('paye=1'); - if (is_array($billsarray)) - { - if (count($billsarray)) - { + if (is_array($billsarray)) { + if (count($billsarray)) { $this->error = "ErrorCantDeletePaymentSharedWithPayedInvoice"; $this->db->rollback(); return -1; @@ -337,12 +327,10 @@ class PaiementFourn extends Paiement // Verifier si paiement ne porte pas sur ecriture bancaire rapprochee // Si c'est le cas, on refuse le delete - if ($bank_line_id) - { + if ($bank_line_id) { $accline = new AccountLine($this->db); $accline->fetch($bank_line_id); - if ($accline->rappro) - { + if ($accline->rappro) { $this->error = "ErrorCantDeletePaymentReconciliated"; $this->db->rollback(); return -3; @@ -353,41 +341,34 @@ class PaiementFourn extends Paiement $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn'; $sql .= ' WHERE fk_paiementfourn = '.$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiementfourn'; $sql .= ' WHERE rowid = '.$this->id; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $this->error = $this->db->error(); $this->db->rollback(); return -3; } // Supprimer l'ecriture bancaire si paiement lie a ecriture - if ($bank_line_id) - { + if ($bank_line_id) { $accline = new AccountLine($this->db); $result = $accline->fetch($bank_line_id); - if ($result > 0) // If result = 0, record not found, we don't try to delete - { + if ($result > 0) { // If result = 0, record not found, we don't try to delete $result = $accline->delete($user); } - if ($result < 0) - { + if ($result < 0) { $this->error = $accline->error; $this->db->rollback(); return -4; } } - if (!$notrigger) - { + if (!$notrigger) { // Appel des triggers $result = $this->call_trigger('PAYMENT_SUPPLIER_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -413,25 +394,21 @@ class PaiementFourn extends Paiement { $sql = 'SELECT c.rowid, datec, fk_user_author as fk_user_creat, tms'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as c'; - $sql .= ' WHERE c.rowid = '.$id; + $sql .= ' WHERE c.rowid = '.((int) $id); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; - if ($obj->fk_user_creat) - { + if ($obj->fk_user_creat) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_creat); $this->user_creation = $cuser; } - if ($obj->fk_user_modif) - { + if ($obj->fk_user_modif) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modif); $this->user_modification = $muser; @@ -456,18 +433,18 @@ class PaiementFourn extends Paiement $sql = 'SELECT fk_facturefourn'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id; - if ($filter) $sql .= ' AND '.$filter; + if ($filter) { + $sql .= ' AND '.$filter; + } dol_syslog(get_class($this).'::getBillsArray', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $this->db->num_rows($resql); $billsarray = array(); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $billsarray[$i] = $obj->fk_facturefourn; $i++; @@ -552,9 +529,10 @@ class PaiementFourn extends Paiement * @param string $option Sur quoi pointe le lien * @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more CSS * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0) + public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0, $morecss = '') { global $langs; @@ -564,20 +542,41 @@ class PaiementFourn extends Paiement $reg = array(); if (preg_match('/^\((.*)\)$/i', $text, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant - if ($reg[1] == 'paiement') $reg[1] = 'Payment'; + if ($reg[1] == 'paiement') { + $reg[1] = 'Payment'; + } $text = $langs->trans($reg[1]); } - $label = '<u>'.$langs->trans("Payment").'</u><br>'; + $label = img_picto('', $this->picto).' <u>'.$langs->trans("Payment").'</u><br>'; $label .= '<strong>'.$langs->trans("Ref").':</strong> '.$text; - if ($this->datepaye ? $this->datepaye : $this->date) $label .= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); + if ($this->datepaye ? $this->datepaye : $this->date) { + $label .= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour', 'tzuser'); + } - $linkstart = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; + $linkclose = ''; + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { + $label = $langs->trans("Payment"); + $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 = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$this->id.'"'; + $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; return $result; @@ -622,12 +621,15 @@ class PaiementFourn extends Paiement $langs->load("bills"); // Clean parameters (if not defined or using deprecated value) - if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan'; - elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'brodator') $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_brodator'; - elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'bronan') $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan'; + if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) { + $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan'; + } elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'brodator') { + $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_brodator'; + } elseif ($conf->global->SUPPLIER_PAYMENT_ADDON == 'bronan') { + $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan'; + } - if (!empty($conf->global->SUPPLIER_PAYMENT_ADDON)) - { + if (!empty($conf->global->SUPPLIER_PAYMENT_ADDON)) { $mybool = false; $file = $conf->global->SUPPLIER_PAYMENT_ADDON.".php"; @@ -640,8 +642,7 @@ class PaiementFourn extends Paiement $dir = dol_buildpath($reldir."core/modules/supplier_payment/"); // Load file with numbering class (if found) - if (is_file($dir.$file) && is_readable($dir.$file)) - { + if (is_file($dir.$file) && is_readable($dir.$file)) { $mybool |= include_once $dir.$file; } } @@ -706,18 +707,15 @@ class PaiementFourn extends Paiement $langs->load("suppliers"); // Set the model on the model name to use - if (empty($modele)) - { - if (!empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)) - { + if (empty($modele)) { + if (!empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)) { $modele = $conf->global->SUPPLIER_PAYMENT_ADDON_PDF; } else { $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation } } - if (empty($modele)) - { + if (empty($modele)) { return 0; } else { $modelpath = "core/modules/supplier_payment/doc/"; @@ -738,12 +736,9 @@ class PaiementFourn extends Paiement global $conf; $way = 'dolibarr'; - if (!empty($conf->multicurrency->enabled)) - { - foreach ($this->multicurrency_amounts as $value) - { - if (!empty($value)) // one value found then payment is in invoice currency - { + if (!empty($conf->multicurrency->enabled)) { + foreach ($this->multicurrency_amounts as $value) { + if (!empty($value)) { // one value found then payment is in invoice currency $way = 'customer'; break; } @@ -766,14 +761,11 @@ class PaiementFourn extends Paiement // phpcs:enable require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; - if (empty($force_thirdparty_id)) - { + if (empty($force_thirdparty_id)) { $billsarray = $this->getBillsArray(); // From payment, the fk_soc isn't available, we should load the first supplier invoice to get him - if (!empty($billsarray)) - { + if (!empty($billsarray)) { $supplier_invoice = new FactureFournisseur($this->db); - if ($supplier_invoice->fetch($billsarray[0]) > 0) - { + if ($supplier_invoice->fetch($billsarray[0]) > 0) { $force_thirdparty_id = $supplier_invoice->fk_soc; } } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 8367e04ef10..e33b9de48c1 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -41,10 +41,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; -if (!empty($conf->supplier_proposal->enabled)) +if (!empty($conf->supplier_proposal->enabled)) { require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; -if (!empty($conf->product->enabled)) +} +if (!empty($conf->product->enabled)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +} if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -56,7 +58,9 @@ if (!empty($conf->variants->enabled)) { } $langs->loadLangs(array('admin', 'orders', 'sendings', 'companies', 'bills', 'propal', 'receptions', 'supplier_proposal', 'deliveries', 'products', 'stocks', 'productbatch')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -80,7 +84,9 @@ $datelivraison = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int' // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -93,41 +99,47 @@ $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); // Load object -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret < 0) dol_print_error($db, $object->error); + 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) -{ + if ($ret < 0) { + dol_print_error($db, $object->error); + } +} elseif (!empty($socid) && $socid > 0) { $fourn = new Fournisseur($db); $ret = $fourn->fetch($socid); - if ($ret < 0) dol_print_error($db, $object->error); + if ($ret < 0) { + dol_print_error($db, $object->error); + } $object->socid = $fourn->id; $ret = $object->fetch_thirdparty(); - if ($ret < 0) dol_print_error($db, $object->error); + if ($ret < 0) { + dol_print_error($db, $object->error); + } } // Common permissions -$usercanread = $user->rights->fournisseur->commande->lire; -$usercancreate = $user->rights->fournisseur->commande->creer; -$usercandelete = $user->rights->fournisseur->commande->supprimer; +$usercanread = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire); +$usercancreate = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); +$usercandelete = ($user->rights->fournisseur->commande->supprimer || $user->rights->supplier_order->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))); +$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; +$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 +$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 /* @@ -136,14 +148,13 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addupdated $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 ($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; } @@ -156,67 +167,69 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once - if ($action == 'setref_supplier' && $usercancreate) - { + 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'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // Set incoterm - if ($action == 'set_incoterms' && $usercancreate) - { + 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'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // payment conditions - if ($action == 'setconditions' && $usercancreate) - { + if ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // payment mode - if ($action == 'setmode' && $usercancreate) - { + 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' && $usercancreate) { + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } elseif ($action == 'setmulticurrencycode' && $usercancreate) { + // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } // bank account - if ($action == 'setbankaccount' && $usercancreate) - { + if ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // date of delivery - if ($action == 'setdate_livraison' && $usercancreate) - { + if ($action == 'setdate_livraison' && $usercancreate) { $result = $object->setDeliveryDate($user, $datelivraison); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // Set project - if ($action == 'classin' && $usercancreate) - { + if ($action == 'classin' && $usercancreate) { $result = $object->setProject($projectid); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + 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' && $usercancreate && $object->statut == CommandeFournisseur::STATUS_DRAFT) - { + 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(); @@ -229,8 +242,9 @@ if (empty($reshook)) $res = $db->query($sql); - if (!$res) $db->rollback(); - else { + if (!$res) { + $db->rollback(); + } else { $db->commit(); // Replace prices for each lines by new supplier prices @@ -275,38 +289,44 @@ if (empty($reshook)) exit; } - if ($action == 'setremisepercent' && $usercancreate) - { - $result = $object->set_remise($user, $_POST['remise_percent']); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($action == 'setremisepercent' && $usercancreate) { + $result = $object->set_remise($user, price2num(GETPOST('remise_percent'))); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } - if ($action == 'reopen') // no test on permission here, permission to use will depends on status - { - if (in_array($object->statut, array(1, 2, 3, 4, 5, 6, 7, 9))) - { - if ($object->statut == 1) $newstatus = 0; // Validated->Draft - elseif ($object->statut == 2) $newstatus = 0; // Approved->Draft - elseif ($object->statut == 3) $newstatus = 2; // Ordered->Approved - elseif ($object->statut == 4) $newstatus = 3; - elseif ($object->statut == 5) - { + if ($action == 'reopen') { // no test on permission here, permission to use will depends on status + if (in_array($object->statut, array(1, 2, 3, 4, 5, 6, 7, 9))) { + if ($object->statut == 1) { + $newstatus = 0; // Validated->Draft + } elseif ($object->statut == 2) { + $newstatus = 0; // Approved->Draft + } elseif ($object->statut == 3) { + $newstatus = 2; // Ordered->Approved + } elseif ($object->statut == 4) { + $newstatus = 3; + } elseif ($object->statut == 5) { //$newstatus=2; // Ordered // TODO Can we set it to submited ? //$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 == 7) $newstatus = 3; // Canceled->Process running - elseif ($object->statut == 9) $newstatus = 1; // Refused->Validated - else $newstatus = 2; + } 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; + } //print "old status = ".$object->statut.' new status = '.$newstatus; $db->begin(); $result = $object->setStatus($user, $newstatus); - if ($result > 0) - { + if ($result > 0) { // Currently the "Re-open" also remove the billed flag because there is no button "Set unpaid" yet. $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; $sql .= ' SET billed = 0'; @@ -314,8 +334,7 @@ if (empty($reshook)) $resql = $db->query($sql); - if ($newstatus == 0) - { + if ($newstatus == 0) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; $sql .= ' SET fk_user_approve = null, fk_user_approve2 = null, date_approve = null, date_approve2 = null'; $sql .= ' WHERE rowid = '.$object->id; @@ -338,8 +357,7 @@ if (empty($reshook)) /* * Classify supplier order as billed */ - if ($action == 'classifybilled' && $usercancreate) - { + if ($action == 'classifybilled' && $usercancreate) { $ret = $object->classifyBilled($user); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -347,8 +365,7 @@ if (empty($reshook)) } // Add a product line - if ($action == 'addline' && $usercancreate) - { + if ($action == 'addline' && $usercancreate) { $db->begin(); $langs->load('errors'); @@ -360,8 +377,7 @@ if (empty($reshook)) $date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $prod_entry_mode = GETPOST('prod_entry_mode'); - if ($prod_entry_mode == 'free') - { + if ($prod_entry_mode == 'free') { $idprod = 0; $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); @@ -372,7 +388,7 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = GETPOST('remise_percent'.$predef); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields @@ -386,28 +402,23 @@ if (empty($reshook)) } } - if ($prod_entry_mode == 'free' && GETPOST('price_ht') < 0 && $qty < 0) - { + if ($prod_entry_mode == 'free' && GETPOST('price_ht') < 0 && $qty < 0) { setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPrice'), $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && !GETPOST('idprodfournprice') && GETPOST('type') < 0) - { + if ($prod_entry_mode == 'free' && !GETPOST('idprodfournprice') && GETPOST('type') < 0) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') // Unit price can be 0 but not '' - { + if ($prod_entry_mode == 'free' && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') { // Unit price can be 0 but not '' setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('UnitPrice')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && !GETPOST('dp_desc')) - { + if ($prod_entry_mode == 'free' && !GETPOST('dp_desc')) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error++; } - if (GETPOST('qty', 'int') == '') - { + if (GETPOST('qty', 'int') == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } @@ -426,56 +437,54 @@ if (empty($reshook)) } } - if ($prod_entry_mode != 'free' && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' - { + if ($prod_entry_mode != 'free' && empty($error)) { // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' $productsupplier = new ProductFournisseur($db); $idprod = 0; - if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') { + $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + } $reg = array(); - if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) - { + if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) { $idprod = $reg[1]; $res = $productsupplier->fetch($idprod); // Load product from its id // Call to init some price properties of $productsupplier // So if a supplier price already exists for another thirdparty (first one found), we use it as reference price - if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) - { + if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) { $fksoctosearch = 0; $productsupplier->get_buyprice(0, -1, $idprod, 'none', $fksoctosearch); // We force qty to -1 to be sure to find if a supplier price exist - if ($productsupplier->fourn_socid != $socid) // The price we found is for another supplier, so we clear supplier price - { + if ($productsupplier->fourn_socid != $socid) { // The price we found is for another supplier, so we clear supplier price $productsupplier->ref_supplier = ''; } } 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 $idprod = $productsupplier->get_buyprice(GETPOST('idprodfournprice', 'alpha'), $qtytosearch); $res = $productsupplier->fetch($idprod); } - if ($idprod > 0) - { + if ($idprod > 0) { $label = $productsupplier->label; // Define output language if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) + } + if (empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $desc = (!empty($productsupplier->multilangs [$outputlangs->defaultlang] ["description"])) ? $productsupplier->multilangs [$outputlangs->defaultlang] ["description"] : $productsupplier->description; + $desc = (!empty($productsupplier->multilangs[$outputlangs->defaultlang]["description"])) ? $productsupplier->multilangs[$outputlangs->defaultlang]["description"] : $productsupplier->description; } else { $desc = $productsupplier->description; } @@ -484,7 +493,17 @@ if (empty($reshook)) $desc = $productsupplier->desc_supplier; } - if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time + if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc=''; + } + + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { + $desc = $product_desc; + } + if (!empty($product_desc) && trim($product_desc) != trim($desc)) { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } $type = $productsupplier->type; if ($price_ht != '' || $price_ht_devise != '') { @@ -508,11 +527,15 @@ if (empty($reshook)) $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); $tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr); - if (empty($pu)) $pu = 0; // If pu is '' or null, we force to have a numeric value + if (empty($pu)) { + $pu = 0; // If pu is '' or null, we force to have a numeric value + } $result = $object->addline( $desc, @@ -539,22 +562,19 @@ if (empty($reshook)) 0 ); } - if ($idprod == -99 || $idprod == 0) - { + if ($idprod == -99 || $idprod == 0) { // Product not selected $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors'); } - if ($idprod == -1) - { + if ($idprod == -1) { // Quantity too low $error++; $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); $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); @@ -572,8 +592,7 @@ if (empty($reshook)) $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - if ($price_ht !== '') - { + if ($price_ht !== '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -586,19 +605,21 @@ if (empty($reshook)) } //print "xx".$tva_tx; exit; - if (!$error && $result > 0) - { + if (!$error && $result > 0) { $db->commit(); $ret = $object->fetch($object->id); // Reload to get new records // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -607,7 +628,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } unset($_POST ['prod_entry_mode']); @@ -652,17 +675,17 @@ if (empty($reshook)) /* * Updating a line in the order */ - if ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) - { + if ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { $db->begin(); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - if ($lineid) - { + if ($lineid) { $line = new CommandeFournisseurLigne($db); $res = $line->fetch($lineid); - if (!$res) dol_print_error($db); + if (!$res) { + dol_print_error($db); + } } $productsupplier = new ProductFournisseur($db); @@ -686,14 +709,12 @@ if (empty($reshook)) $localtax1_rate = get_localtax($vat_rate, 1, $mysoc, $object->thirdparty); $localtax2_rate = get_localtax($vat_rate, 2, $mysoc, $object->thirdparty); - if (GETPOST('price_ht') != '') - { + if (GETPOST('price_ht') != '') { $price_base_type = 'HT'; $ht = price2num(GETPOST('price_ht'), '', 2); } else { $vatratecleaned = $vat_rate; - if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" - { + if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) { // If vat is "xx (yy)" $vatratecleaned = trim($reg[1]); $vatratecode = $reg[2]; } @@ -717,21 +738,21 @@ if (empty($reshook)) $result = $object->updateline( $lineid, - $_POST['product_desc'], + GETPOST('product_desc', 'restricthtml'), $ht, - GETPOST('qty', 'int'), - $_POST['remise_percent'], + price2num(GETPOST('qty'), 'MS'), + price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, $price_base_type, 0, - isset($_POST["type"]) ? $_POST["type"] : $line->product_type, + GETPOSTISSET("type") ? GETPOST("type") : $line->product_type, false, $date_start, $date_end, $array_options, - $_POST['units'], + GETPOST('units'), $pu_ht_devise, GETPOST('fourn_ref', 'alpha') ); @@ -763,15 +784,17 @@ if (empty($reshook)) unset($_POST['date_endmonth']); unset($_POST['date_endyear']); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -780,7 +803,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } $db->commit(); @@ -793,20 +818,20 @@ if (empty($reshook)) } // Remove a product line - if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) - { + if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $db->begin(); $result = $object->deleteline($lineid); - if ($result > 0) - { + if ($result > 0) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -833,21 +858,22 @@ if (empty($reshook)) } // Validate - if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) - { + if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $db->begin(); $object->date_commande = dol_now(); $result = $object->valid($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -867,8 +893,7 @@ if (empty($reshook)) } // 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) && $usercanapprove && !(!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 } @@ -879,41 +904,39 @@ if (empty($reshook)) } } - if (($action == 'confirm_approve' || $action == 'confirm_approve2') && $confirm == 'yes' && $usercanapprove) - { + if (($action == 'confirm_approve' || $action == 'confirm_approve2') && $confirm == 'yes' && $usercanapprove) { $db->begin(); $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); + 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 = $object->hasProductsOrServices(1); } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) // warning name of option should be STOCK_CALCULATE_ON_SUPPLIER_APPROVE_ORDER - { - if (!$idwarehouse || $idwarehouse == -1) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) { // warning name of option should be STOCK_CALCULATE_ON_SUPPLIER_APPROVE_ORDER + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; } } - if (!$error) - { + if (!$error) { $result = $object->approve($user, $idwarehouse, ($action == 'confirm_approve2' ? 1 : 0)); - if ($result > 0) - { + if ($result > 0) { 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 ($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); @@ -936,11 +959,9 @@ if (empty($reshook)) } } - if ($action == 'confirm_refuse' && $confirm == 'yes' && $usercanapprove) - { + if ($action == 'confirm_refuse' && $confirm == 'yes' && $usercanapprove) { $result = $object->refuse($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; } else { @@ -958,19 +979,20 @@ if (empty($reshook)) } } - if ($action == 'confirm_commande' && $confirm == 'yes' && $usercanorder) - { + if ($action == 'confirm_commande' && $confirm == 'yes' && $usercanorder) { $db->begin(); $result = $object->commande($user, GETPOST("datecommande"), GETPOST("methode", 'int'), GETPOST('comment', 'alphanohtml')); - if ($result > 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if ($result > 0) { + 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 ($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); @@ -994,11 +1016,9 @@ if (empty($reshook)) } - if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) - { + if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php?restore_lastsearch_values=1'); exit; } else { @@ -1007,19 +1027,15 @@ if (empty($reshook)) } // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) - { - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { + if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { - if ($object->id > 0) - { + if ($object->id > 0) { $orig = clone $object; $result = $object->createFromClone($user, $socid); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; } else { @@ -1032,22 +1048,18 @@ if (empty($reshook)) } // Set status of reception (complete, partial, ...) - if ($action == 'livraison' && $usercanreceived) - { + if ($action == 'livraison' && $usercanreceived) { $db->begin(); - if (GETPOST("type") != '') - { + if (GETPOST("type") != '') { $date_liv = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $result = $object->Livraison($user, $date_liv, GETPOST("type"), GETPOST("comment")); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($result > 0) - { + if ($result > 0) { $langs->load("deliveries"); setEventMessages($langs->trans("DeliveryStateSaved"), null); $action = ''; - } elseif ($result == -3) - { + } elseif ($result == -3) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -1066,11 +1078,9 @@ if (empty($reshook)) } } - if ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanorder) - { + if ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanorder) { $result = $object->cancel($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; } else { @@ -1093,55 +1103,51 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'update_extras') - { + if ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $object->insertExtraFields('ORDER_SUPPLIER_MODIFY'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } /* * Create an order */ - if ($action == 'add' && $usercancreate) - { - $error = 0; + if ($action == 'add' && $usercancreate) { + $error = 0; $selectedLines = GETPOST('toselect', 'array'); - if ($socid < 1) - { + if ($socid < 1) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); $action = 'create'; $error++; } - if (!$error) - { + if (!$error) { $db->begin(); // Creation commande $object->ref_supplier = GETPOST('refsupplier'); $object->socid = $socid; - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); + $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); $object->fk_account = GETPOST('fk_account', 'int'); $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); @@ -1151,26 +1157,23 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); - $object->fk_project = GETPOST('projectid'); + $object->fk_project = GETPOST('projectid', 'int'); // Fill array 'array_options' with data from add form - if (!$error) - { + if (!$error) { $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; - } + if ($ret < 0) { + $error++; + } + } - if (!$error) - { - // If creation from another object of another module (Example: origin=propal, originid=1) - if (!empty($origin) && !empty($originid)) - { - if ($origin == 'propal' || $origin == 'proposal') - { + if (!$error) { + // If creation from another object of another module (Example: origin=propal, originid=1) + if (!empty($origin) && !empty($originid)) { + if ($origin == 'propal' || $origin == 'proposal') { $classname = 'Propal'; $element = 'comm/propal'; $subelement = 'propal'; - } elseif ($origin == 'order' || $origin == 'commande') - { + } elseif ($origin == 'order' || $origin == 'commande') { $classname = 'Commande'; $element = $subelement = 'commande'; } else { @@ -1190,23 +1193,20 @@ if (empty($reshook)) } $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $srcobject = new $classname($db); dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $tmpdate = ($srcobject->delivery_date ? $srcobject->delivery_date : $srcobject->date_livraison); $object->setDeliveryDate($user, $tmpdate); $object->set_id_projet($user, $srcobject->fk_project); $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } @@ -1214,10 +1214,10 @@ if (empty($reshook)) $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { - if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0 || !in_array($lines[$i]->id, $selectedLines)) + for ($i = 0; $i < $num; $i++) { + if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0 || !in_array($lines[$i]->id, $selectedLines)) { continue; + } $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->product_desc); @@ -1229,20 +1229,17 @@ if (empty($reshook)) } // Extrafields - if (method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if - { + if (method_exists($lines[$i], 'fetch_optionals')) { // For avoid conflicts if $lines[$i]->fetch_optionals(); $array_option = $lines[$i]->array_options; } $ref_supplier = ''; $product_fourn_price_id = 0; - if ($origin == "commande") - { + if ($origin == "commande") { $productsupplier = new ProductFournisseur($db); $result = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty, $srcobject->socid); - if ($result > 0) - { + if ($result > 0) { $ref_supplier = $productsupplier->ref_supplier; $product_fourn_price_id = $productsupplier->product_fourn_price_id; } @@ -1253,8 +1250,7 @@ if (empty($reshook)) $tva_tx = $lines[$i]->tva_tx; - if ($origin == "commande") - { + if ($origin == "commande") { $soc = new societe($db); $soc->fetch($socid); $tva_tx = get_default_tva($soc, $mysoc, $lines[$i]->fk_product, $product_fourn_price_id); @@ -1303,8 +1299,9 @@ if (empty($reshook)) $parameters = array('objFrom' => $srcobject); $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been - if ($reshook < 0) + if ($reshook < 0) { $error++; + } } else { setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error++; @@ -1314,31 +1311,28 @@ if (empty($reshook)) $error++; } } else { - $id = $object->create($user); - if ($id < 0) - { + $id = $object->create($user); + if ($id < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - if ($error) - { + if ($error) { $langs->load("errors"); $db->rollback(); $action = 'create'; $_GET['socid'] = $_POST['socid']; } else { $db->commit(); - header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".urlencode($id)); exit; } } } - if ($action == 'webservice' && GETPOST('mode', 'alpha') == "send" && !GETPOST('cancel', 'alpha')) - { + if ($action == 'webservice' && GETPOST('mode', 'alpha') == "send" && !GETPOST('cancel', 'alpha')) { $ws_url = $object->thirdparty->webservices_url; $ws_key = $object->thirdparty->webservices_key; $ws_user = GETPOST('ws_user', 'alpha'); @@ -1376,13 +1370,11 @@ if (empty($reshook)) //Prepare the order lines from order $order_lines = array(); - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $ws_parameters = array('authentication' => $ws_authentication, 'id' => '', 'ref' => $line->ref_supplier); $result_product = $soapclient_product->call("getProductOrService", $ws_parameters, $ws_ns, ''); - if ($result_product["result"]["result_code"] == "OK") - { + if ($result_product["result"]["result_code"] == "OK") { $order_lines[] = array( 'desc' => $line->product_desc, 'type' => $line->product_type, @@ -1413,11 +1405,9 @@ if (empty($reshook)) $ws_parameters = array('authentication'=>$ws_authentication, 'order' => $order); $result_order = $soapclient_order->call("createOrder", $ws_parameters, $ws_ns, ''); - if (empty($result_order["result"]["result_code"])) //No result, check error str - { + 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 { setEventMessages($langs->trans("RemoteOrderRef")." ".$result_order["ref"], null, 'mesgs'); @@ -1425,45 +1415,33 @@ if (empty($reshook)) } } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) - { - if ($action == 'addcontact') - { - if ($object->id > 0) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { + if ($action == 'addcontact') { + if ($object->id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } + } elseif ($action == 'swapstatut' && $object->id > 0) { + // bascule du statut d'un contact + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); + } elseif ($action == 'deletecontact' && $object->id > 0) { + // Efface un contact + $result = $object->delete_contact(GETPOST("lineid", 'int')); - // bascule du statut d'un contact - elseif ($action == 'swapstatut' && $object->id > 0) - { - $result = $object->swapContactStatus(GETPOST('ligne')); - } - - // Efface un contact - elseif ($action == 'deletecontact' && $object->id > 0) - { - $result = $object->delete_contact($_GET["lineid"]); - - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -1482,15 +1460,16 @@ $form = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); $productstatic = new Product($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +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') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans('NewOrderSupplier'), '', 'supplier_order'); dol_htmloutput_events(); @@ -1498,14 +1477,12 @@ if ($action == 'create') $currency_code = $conf->currency; $societe = ''; - if ($socid > 0) - { + if ($socid > 0) { $societe = new Societe($db); $societe->fetch($socid); } - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; $regs = array(); @@ -1514,12 +1491,10 @@ if ($action == 'create') $subelement = $regs[2]; } - if ($origin == 'propal' || $origin == 'proposal') - { + if ($origin == 'propal' || $origin == 'proposal') { $classname = 'Propal'; $element = 'comm/propal'; $subelement = 'propal'; - } elseif ($origin == 'order' || $origin == 'commande') - { + } elseif ($origin == 'order' || $origin == 'commande') { $classname = 'Commande'; $element = $subelement = 'commande'; } else { @@ -1532,8 +1507,9 @@ if ($action == 'create') $objectsrc = new $classname($db); $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); + } $objectsrc->fetch_thirdparty(); // Replicate extrafields @@ -1556,10 +1532,13 @@ if ($action == 'create') $datedelivery = (!empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : (!empty($objectsrc->delivery_date) ? $objectsrc->delivery_date : '')); - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($objectsrc->multicurrency_code)) { + $currency_code = $objectsrc->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) { + $currency_tx = $objectsrc->multicurrency_tx; + } } $note_private = $object->getDefaultCreateValueFor('note_private', (!empty($objectsrc->note_private) ? $objectsrc->note_private : null)); @@ -1571,15 +1550,21 @@ if ($action == 'create') $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; - if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code; + if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) { + $currency_code = $societe->multicurrency_code; + } $note_private = $object->getDefaultCreateValueFor('note_private'); $note_public = $object->getDefaultCreateValueFor('note_public'); } // If not defined, set default value from constant - if (empty($cond_reglement_id) && !empty($conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_TERM_ID)) $cond_reglement_id = $conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_TERM_ID; - if (empty($mode_reglement_id) && !empty($conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID)) $mode_reglement_id = $conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID; + if (empty($cond_reglement_id) && !empty($conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_TERM_ID)) { + $cond_reglement_id = $conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_TERM_ID; + } + if (empty($mode_reglement_id) && !empty($conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID)) { + $mode_reglement_id = $conf->global->SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID; + } print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -1588,7 +1573,9 @@ if ($action == 'create') print '<input type="hidden" name="remise_percent" value="'.$soc->remise_supplier_percent.'">'; print '<input type="hidden" name="origin" value="'.$origin.'">'; print '<input type="hidden" name="originid" value="'.$originid.'">'; - if (!empty($currency_tx)) print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">'; + if (!empty($currency_tx)) { + print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">'; + } print dol_get_fiche_head(''); @@ -1601,15 +1588,13 @@ if ($action == 'create') print '<tr><td class="fieldrequired">'.$langs->trans('Supplier').'</td>'; print '<td>'; - if ($socid > 0) - { + if ($socid > 0) { print $societe->getNomUrl(1); print '<input type="hidden" name="socid" value="'.$socid.'">'; } else { print img_picto('', 'company').$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)) - { + if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) { print '<script> $(document).ready(function() { $("#socid").change(function() { @@ -1624,8 +1609,7 @@ if ($action == 'create') } print '</td>'; - if ($societe->id > 0) - { + if ($societe->id > 0) { // Discounts for third party print '<tr><td>'.$langs->trans('Discounts').'</td><td>'; @@ -1659,13 +1643,14 @@ if ($action == 'create') print '</td>'; print '<td>'; $usehourmin = 0; - if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 1; + if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) { + $usehourmin = 1; + } print $form->selectDate($datelivraison ? $datelivraison : -1, 'liv_', $usehourmin, $usehourmin, '', "set"); print '</td></tr>'; // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && !empty($conf->banque->enabled)) { $langs->load("bank"); print '<tr><td>'.$langs->trans('BankAccount').'</td><td>'; print img_picto('', 'bank_account', 'class="paddingrightonly"'); @@ -1674,8 +1659,7 @@ if ($action == 'create') } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); $langs->load('projects'); @@ -1686,8 +1670,7 @@ if ($action == 'create') } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $fkincoterms = (!empty($object->fk_incoterms) ? $object->fk_incoterms : ($socid > 0 ? $societe->fk_incoterms : '')); $locincoterms = (!empty($object->location_incoterms) ? $object->location_incoterms : ($socid > 0 ? $societe->location_incoterms : '')); print '<tr>'; @@ -1698,8 +1681,7 @@ if ($action == 'create') } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; print '<td class="maxwidthonsmartphone">'; @@ -1709,7 +1691,7 @@ if ($action == 'create') print '<tr><td>'.$langs->trans('NotePublic').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_public', isset($note_public) ? $note_public : GETPOST('note_public', 'restricthtml'), '', 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, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '</td>'; //print '<textarea name="note_public" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea>'; @@ -1717,7 +1699,7 @@ if ($action == 'create') print '<tr><td>'.$langs->trans('NotePrivate').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_private', isset($note_private) ? $note_private : GETPOST('note_private', 'restricthtml'), '', 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, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '</td>'; //print '<td><textarea name="note_private" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>'; @@ -1736,20 +1718,17 @@ if ($action == 'create') print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE - { + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 RE print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>"; } - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF - { + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 IRPF print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>"; } print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>"; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva).'</td></tr>'; print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc).'</td></tr>'; @@ -1761,8 +1740,7 @@ if ($action == 'create') $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -1780,8 +1758,7 @@ if ($action == 'create') // Show origin lines - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { $title = $langs->trans('ProductsAndServices'); print load_fiche_titre($title); @@ -1797,7 +1774,9 @@ if ($action == 'create') $societe = new Fournisseur($db); $result = $societe->fetch($object->socid); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } $author = new User($db); $author->fetch($object->user_author_id); @@ -1814,14 +1793,12 @@ if ($action == 'create') $formconfirm = ''; // Confirmation de la suppression de la commande - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); } // Clone confirmation - if ($action == 'clone') - { + if ($action == 'clone') { // Create an array for form $formquestion = array( array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.fournisseur=1)')) @@ -1831,24 +1808,22 @@ if ($action == 'create') } // Confirmation de la validation - if ($action == 'valid') - { + if ($action == 'valid') { $object->date_commande = dol_now(); // We check if number is temporary number - if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) // empty should not happened, but when it occurs, the test save life - { + 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) - { + if ($newref < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } else { $text = $langs->trans('ConfirmValidateOrder', $newref); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '<br>'; @@ -1860,24 +1835,23 @@ if ($action == 'create') } // Confirm approval - if ($action == 'approve' || $action == 'approve2') - { + if ($action == 'approve' || $action == 'approve2') { $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } $formquestion = array(); - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $qualified_for_stock_change) { $langs->load("stocks"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( //'text' => $langs->trans("ConfirmClone"), //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -1886,8 +1860,7 @@ if ($action == 'create') ); } $text = $langs->trans("ConfirmApproveThisOrder", $object->ref); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '<br>'; @@ -1898,34 +1871,33 @@ if ($action == 'create') } // Confirmation de la desapprobation - if ($action == 'refuse') - { + if ($action == 'refuse') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", '', 0, 1); } // Confirmation de l'annulation - if ($action == 'cancel') - { + if ($action == 'cancel') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("Cancel"), $langs->trans("ConfirmCancelThisOrder", $object->ref), "confirm_cancel", '', 0, 1); } // Confirmation de l'envoi de la commande - if ($action == 'commande') - { + if ($action == 'commande') { $date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"), $langs->trans("ConfirmMakeOrder", dol_print_date($date_com, 'day')), "confirm_commande", '', 0, 2); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".GETPOST("methodecommande")."&comment=".urlencode(GETPOST("comment")), $langs->trans("MakeOrder"), $langs->trans("ConfirmMakeOrder", dol_print_date($date_com, 'day')), "confirm_commande", '', 0, 2); } // Confirmation to delete line - if ($action == 'ask_deleteline') - { + if ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -1955,7 +1927,9 @@ if ($action == 'create') $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=edit_thirdparty&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetThirdParty')).'</a>'; } $morehtmlref .= ' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)'; + } } // Project @@ -1963,8 +1937,9 @@ if ($action == 'create') $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; if ($usercancreate) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -2001,8 +1976,7 @@ if ($action == 'create') print '<table class="border tableforfield centpercent">'; // Date - if ($object->methode_commande_id > 0) - { + if ($object->methode_commande_id > 0) { print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>'; print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin) : ''; if ($object->hasDelay() && !empty($object->date_delivery) && !empty($object->date_commande)) { @@ -2010,8 +1984,7 @@ if ($action == 'create') } print "</td></tr>"; - if ($object->methode_commande) - { + if ($object->methode_commande) { print '<tr><td>'.$langs->trans("Method").'</td><td>'.$object->getInputMethod().'</td></tr>'; } } @@ -2050,11 +2023,12 @@ if ($action == 'create') print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">'; print $langs->trans('PaymentConditions'); print '<td>'; - if ($action != 'editconditions') print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; + if ($action != 'editconditions') { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; - if ($action == 'editconditions') - { + if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); @@ -2068,11 +2042,12 @@ if ($action == 'create') print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">'; print $langs->trans('PaymentMode'); print '</td>'; - if ($action != 'editmode') print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; + if ($action != 'editmode') { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; - if ($action == 'editmode') - { + if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'DBIT', 1, 1); } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); @@ -2080,16 +2055,16 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Multicurrency code print '<tr>'; print '<td>'; print '<table class="nobordernopadding centpercent"><tr><td>'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencycode&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; if ($action == 'editmulticurrencycode') { @@ -2100,16 +2075,16 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency rate - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print '<tr>'; print '<td>'; print '<table class="nobordernopadding centpercent"><tr>'; print '<td>'; print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { @@ -2130,14 +2105,14 @@ if ($action == 'create') } // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && !empty($conf->banque->enabled)) { print '<tr><td class="nowrap">'; print '<table class="nobordernopadding centpercent"><tr><td class="nowrap">'; print $langs->trans('BankAccount'); print '<td>'; - if ($action != 'editbankaccount' && $usercancreate) + if ($action != 'editbankaccount' && $usercancreate) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; if ($action == 'editbankaccount') { @@ -2160,22 +2135,27 @@ if ($action == 'create') print '<table class="nobordernopadding centpercent"><tr><td>'; print $langs->trans('DateDeliveryPlanned'); print '</td>'; - if ($action != 'editdate_livraison') print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; + if ($action != 'editdate_livraison') { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; - if ($action == 'editdate_livraison') - { + if ($action == 'editdate_livraison') { print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="setdate_livraison">'; $usehourmin = 0; - if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 1; + if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) { + $usehourmin = 1; + } print $form->selectDate($object->delivery_date ? $object->delivery_date : -1, 'liv_', $usehourmin, $usehourmin, '', "setdate_livraison"); print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } else { $usehourmin = 'day'; - if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 'dayhour'; + if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) { + $usehourmin = 'dayhour'; + } print $object->delivery_date ? dol_print_date($object->delivery_date, $usehourmin) : '&nbsp;'; if ($object->hasDelay() && !empty($object->delivery_date)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); @@ -2184,19 +2164,20 @@ if ($action == 'create') print '</td></tr>'; // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr><td>'; print '<table class="nobordernopadding centpercent"><tr><td>'; print $langs->trans('IncotermLabel'); print '<td><td class="right">'; - if ($usercancreate) print '<a class="editfielda" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; - else print '&nbsp;'; + if ($usercancreate) { + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; + } else { + print '&nbsp;'; + } print '</td></tr></table>'; print '</td>'; print '<td>'; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { 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); @@ -2216,8 +2197,7 @@ if ($action == 'create') print '<table class="border tableforfield centpercent">'; - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { // Multicurrency Amount HT print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).'</td>'; print '<td class="nowrap">'.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; @@ -2248,14 +2228,12 @@ if ($action == 'create') print '</tr>'; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) //Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; print '<td>'.price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency).'</td>'; print '</tr>'; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) //Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; print '<td>'.price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency).'</td>'; print '</tr>'; @@ -2269,7 +2247,7 @@ if ($action == 'create') // Margin Infos /*if (! empty($conf->margin->enabled)) { - $formmargin->displayMarginInfos($object); + $formmargin->displayMarginInfos($object); }*/ @@ -2279,15 +2257,13 @@ if ($action == 'create') print '<div class="clearboth"></div><br>'; - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $blocname = 'notes'; $title = $langs->trans('Notes'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; @@ -2299,7 +2275,7 @@ if ($action == 'create') //$result = $object->getLinesArray(); - print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST"> + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> <input type="hidden" name="token" value="'.newToken().'"> <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> <input type="hidden" name="mode" value=""> @@ -2318,19 +2294,20 @@ if ($action == 'create') global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax; $forceall = 1; $dateSelector = 0; $inputalsopricewithtax = 1; $senderissupplier = 2; // $senderissupplier=2 is same than 1 but disable test on minimum qty and disable autofill qty with minimum. - if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) $senderissupplier = 1; + if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) { + $senderissupplier = 1; + } // Show object lines - if (!empty($object->lines)) + if (!empty($object->lines)) { $ret = $object->printObjectLines($action, $societe, $mysoc, $lineid, 1); + } $num = count($object->lines); // Form to add new line - if ($object->statut == CommandeFournisseur::STATUS_DRAFT && $usercancreate) - { - if ($action != 'editline') - { + if ($object->statut == CommandeFournisseur::STATUS_DRAFT && $usercancreate) { + if ($action != 'editline') { // Add free products/services $object->formAddObjectLine(1, $societe, $mysoc); @@ -2348,24 +2325,22 @@ if ($action == 'create') * Boutons actions */ - if ($user->socid == 0 && $action != 'editline' && $action != 'delete') - { + if ($user->socid == 0 && $action != 'editline' && $action != 'delete') { print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { $object->fetchObjectLinked(); // Links are used to show or not button, so we load them now. // Validate - if ($object->statut == 0 && $num > 0) - { - if ($usercanvalidate) - { + if ($object->statut == 0 && $num > 0) { + if ($usercanvalidate) { $tmpbuttonlabel = $langs->trans('Validate'); - if ($usercanapprove && 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 '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=valid">'; print $tmpbuttonlabel; @@ -2379,21 +2354,16 @@ if ($action == 'create') }*/ // Modify - if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) - { - if ($usercanorder) - { + if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { + if ($usercanorder) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("Modify").'</a>'; } } // Approve - if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) - { - 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)) - { + if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { + 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 '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("FirstApprovalAlreadyDone")).'">'.$langs->trans("ApproveOrder").'</a>'; } else { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=approve">'.$langs->trans("ApproveOrder").'</a>'; @@ -2404,14 +2374,10 @@ if ($action == 'create') } // Second approval (if option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set) - if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) - { - if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) - { - if ($usercanapprovesecond) - { - if (!empty($object->user_approve_id2)) - { + if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) { + if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { + if ($usercanapprovesecond) { + if (!empty($object->user_approve_id2)) { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("SecondApprovalAlreadyDone")).'">'.$langs->trans("Approve2Order").'</a>'; } else { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=approve2">'.$langs->trans("Approve2Order").'</a>'; @@ -2423,10 +2389,8 @@ if ($action == 'create') } // Refuse - if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) - { - if ($usercanapprove || $usercanapprovesecond) - { + if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { + if ($usercanapprove || $usercanapprovesecond) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=refuse">'.$langs->trans("RefuseOrder").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans("RefuseOrder").'</a>'; @@ -2435,54 +2399,46 @@ if ($action == 'create') // Send 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 ($usercanorder) - { + if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5)) || !empty($conf->global->SUPPLIER_ORDER_SENDBYEMAIL_FOR_ALL_STATUS)) { + if ($usercanorder) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'; } } } // Reopen - if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED))) - { + if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED))) { $buttonshown = 0; - if (!$buttonshown && $usercanapprove) - { + 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)) - { + || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER_ONLY) && $user->id == $object->user_approve_id)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("Disapprove").'</a>'; $buttonshown++; } } - if (!$buttonshown && $usercanapprovesecond && !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)) - { + || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER2_ONLY) && $user->id == $object->user_approve_id2)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("Disapprove").'</a>'; } } } - if (in_array($object->statut, array(3, 4, 5, 6, 7, 9))) - { - if ($usercanorder) - { + if (in_array($object->statut, array(3, 4, 5, 6, 7, 9))) { + if ($usercanorder) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("ReOpen").'</a>'; } } // Ship - if (!empty($conf->stock->enabled) && (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE))) - { + if (!empty($conf->stock->enabled) && (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE))) { $labelofbutton = $langs->trans('ReceiveProducts'); - if ($conf->reception->enabled) $labelofbutton = $langs->trans("CreateReception"); + if ($conf->reception->enabled) { + $labelofbutton = $langs->trans("CreateReception"); + } if (in_array($object->statut, array(3, 4, 5))) { - if ($conf->fournisseur->enabled && $usercanreceived) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $usercanreceived) { print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/dispatch.php?id='.$object->id.'">'.$labelofbutton.'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$labelofbutton.'</a></div>'; @@ -2490,10 +2446,8 @@ if ($action == 'create') } } - if ($object->statut == CommandeFournisseur::STATUS_ACCEPTED) - { - if ($usercanorder) - { + if ($object->statut == CommandeFournisseur::STATUS_ACCEPTED) { + if ($usercanorder) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=makeorder#makeorder">'.$langs->trans("MakeOrder").'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("MakeOrder").'</a></div>'; @@ -2501,10 +2455,8 @@ if ($action == 'create') } // Classify received (this does not record reception) - if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) - { - if ($usercanreceived) - { + if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) { + if ($usercanreceived) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifyreception#classifyreception">'.$langs->trans("ClassifyReception").'</a></div>'; } } @@ -2512,26 +2464,20 @@ if ($action == 'create') // Create bill //if (! empty($conf->facture->enabled)) //{ - if (!empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled - { - if ($user->rights->fournisseur->facture->creer) - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) { // statut 2 means approved, 7 means canceled + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; } } //} // Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not) - if ($usercancreate && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved - { - if (empty($conf->facture->enabled)) - { + if ($usercancreate && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) { // statut 2 means approved + if (empty($conf->facture->enabled)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>'; } else { - if (!empty($object->linkedObjectsIds['invoice_supplier'])) - { - if ($user->rights->fournisseur->facture->creer) - { + if (!empty($object->linkedObjectsIds['invoice_supplier'])) { + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifybilled">'.$langs->trans("ClassifyBilled").'</a>'; } } else { @@ -2541,29 +2487,24 @@ if ($action == 'create') } // Create a remote order using WebService only if module is activated - if (!empty($conf->syncsupplierwebservices->enabled) && $object->statut >= 2) // 2 means accepted - { + if (!empty($conf->syncsupplierwebservices->enabled) && $object->statut >= 2) { // 2 means accepted print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=webservice&amp;mode=init">'.$langs->trans('CreateRemoteOrder').'</a>'; } // Clone - if ($usercancreate) - { + if ($usercancreate) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$object->socid.'&amp;action=clone&amp;object=order">'.$langs->trans("ToClone").'</a>'; } // Cancel - if ($object->statut == 2) - { - if ($usercanorder) - { + if ($object->statut == 2) { + if ($usercanorder) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=cancel">'.$langs->trans("CancelOrder").'</a>'; } } // Delete - if (!empty($usercandelete) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($usercancreate))) - { + if (!empty($usercandelete) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($usercancreate))) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans("Delete").'</a>'; } } @@ -2572,8 +2513,7 @@ if ($action == 'create') - if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') - { + if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') { // Set status to ordered (action=commande) print '<!-- form to record supplier order -->'."\n"; print '<form name="commande" id="makeorder" action="card.php?id='.$object->id.'&amp;action=commande" method="POST">'; @@ -2585,7 +2525,9 @@ if ($action == 'create') //print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("ToOrder").'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("OrderDate").'</td><td>'; $date_com = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - if (empty($date_com)) $date_com = dol_now(); + if (empty($date_com)) { + $date_com = dol_now(); + } print $form->selectDate($date_com, '', 1, 1, '', "commande", 1, 1); print '</td></tr>'; @@ -2606,8 +2548,7 @@ if ($action == 'create') print "<br>"; } - if ($action != 'makeorder') - { + if ($action != 'makeorder') { print '<div class="fichecenter"><div class="fichehalfleft">'; // Generated documents @@ -2628,10 +2569,8 @@ if ($action == 'create') print '</div><div class="fichehalfright"><div class="ficheaddleft">'; - if ($action == 'classifyreception') - { - if ($usercanreceived && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) - { + if ($action == 'classifyreception') { + if ($usercanreceived && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) { // Set status to received (action=livraison) print '<!-- form to record purchase order received -->'."\n"; print '<form id="classifyreception" action="card.php?id='.$object->id.'" method="post">'; @@ -2676,8 +2615,7 @@ if ($action == 'create') /* * Action webservice */ - if ($action == 'webservice' && GETPOST('mode', 'alpha') != "send" && !GETPOST('cancel', 'alpha')) - { + if ($action == 'webservice' && GETPOST('mode', 'alpha') != "send" && !GETPOST('cancel', 'alpha')) { $mode = GETPOST('mode', 'alpha'); $ws_url = $object->thirdparty->webservices_url; $ws_key = $object->thirdparty->webservices_key; @@ -2706,8 +2644,7 @@ if ($action == 'create') $mode = "init"; } - if ($mode == "init") - { + if ($mode == "init") { //Table/form header print '<table class="border centpercent">'; print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; @@ -2715,8 +2652,7 @@ if ($action == 'create') print '<input type="hidden" name="action" value="webservice">'; print '<input type="hidden" name="mode" value="check">'; - if ($error_occurred) - { + if ($error_occurred) { print "<br>".$langs->trans("ErrorOccurredReviseAndRetry")."<br>"; print '<input class="button button-cancel" type="submit" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; } else { @@ -2739,8 +2675,7 @@ if ($action == 'create') //End table/form print '</form>'; print '</table>'; - } elseif ($mode == "check") - { + } elseif ($mode == "check") { $ws_entity = ''; $ws_thirdparty = ''; $error_occurred = false; @@ -2755,14 +2690,12 @@ if ($action == 'create') $result_user = $soapclient_user->call("getUser", $ws_parameters, $ws_ns, ''); $user_status_code = $result_user["result"]["result_code"]; - if ($user_status_code == "OK") - { + if ($user_status_code == "OK") { //Fill the variables $ws_entity = $result_user["user"]["entity"]; $ws_authentication['entity'] = $ws_entity; $ws_thirdparty = $result_user["user"]["fk_thirdparty"]; - if (empty($ws_thirdparty)) - { + if (empty($ws_thirdparty)) { setEventMessages($langs->trans("RemoteUserMissingAssociatedSoc"), null, 'errors'); $error_occurred = true; } else { @@ -2782,8 +2715,7 @@ if ($action == 'create') } $ws_parameters = array('authentication' => $ws_authentication, 'id' => '', 'ref' => $ref_supplier); $result_product = $soapclient_product->call("getProductOrService", $ws_parameters, $ws_ns, ''); - if (!$result_product) - { + if (!$result_product) { setEventMessages($line_id.$langs->trans("SOAPError")." ".$soapclient_product->error_str." - ".$soapclient_product->response, null, 'errors'); $error_occurred = true; break; @@ -2791,13 +2723,10 @@ if ($action == 'create') // Check the result code $status_code = $result_product["result"]["result_code"]; - if (empty($status_code)) //No result, check error str - { + 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 - { - if ($status_code == "NOT_FOUND") - { + } elseif ($status_code != "OK") { //Something went wrong + if ($status_code == "NOT_FOUND") { setEventMessages($line_id.$langs->trans("SupplierMissingRef")." '".$ref_supplier."'", null, 'warnings'); } else { setEventMessages($line_id.$langs->trans("ResponseNonOK")." '".$status_code."' - '".$result_product["result"]["result_label"]."'", null, 'errors'); @@ -2813,10 +2742,8 @@ if ($action == 'create') $product_fourn = new ProductFournisseur($db); $product_fourn_list = $product_fourn->list_product_fournisseur_price($line->fk_product); - if (count($product_fourn_list) > 0) - { - foreach ($product_fourn_list as $product_fourn_line) - { + if (count($product_fourn_list) > 0) { + foreach ($product_fourn_list as $product_fourn_line) { //Only accept the line where the supplier is the same at this order and has the same ref if ($product_fourn_line->fourn_id == $object->socid && $product_fourn_line->fourn_ref == $ref_supplier) { $local_price = price($product_fourn_line->fourn_price); @@ -2834,12 +2761,10 @@ if ($action == 'create') } } } - } 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 { @@ -2856,8 +2781,7 @@ if ($action == 'create') print '<input type="hidden" name="ws_password" value="'.$ws_password.'">'; print '<input type="hidden" name="ws_entity" value="'.$ws_entity.'">'; print '<input type="hidden" name="ws_thirdparty" value="'.$ws_thirdparty.'">'; - if ($error_occurred) - { + if ($error_occurred) { print "<br>".$langs->trans("ErrorOccurredReviseAndRetry")."<br>"; } else { print '<input class="button" type="submit" id="ws_submit" name="ws_submit" value="'.$langs->trans("Confirm").'">'; diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 3e52f35d8bb..f52aa20d494 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -41,7 +41,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); $object = new CommandeFournisseur($db); @@ -51,55 +53,43 @@ $object = new CommandeFournisseur($db); * Add a new contact */ -if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer) -{ +if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Toggle the status of a contact -elseif ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { + // Toggle the status of a contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } -} - -// Deleting a contact -elseif ($action == 'deletecontact' && $user->rights->fournisseur->commande->creer) -{ +} elseif ($action == 'deletecontact' && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { + // Deleting a contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -123,12 +113,10 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $langs->trans("OrderCard"); - if ($object->fetch($id, $ref) > 0) - { + if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); $head = ordersupplier_prepare_head($object); @@ -145,12 +133,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 13989286e33..b183092972e 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -40,14 +40,16 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class 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)) +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", "orders", "sendings", "companies", "deliveries", "products", "stocks", "receptions")); -if (!empty($conf->productbatch->enabled)) +if (!empty($conf->productbatch->enabled)) { $langs->load('productbatch'); +} // Security check $id = GETPOST("id", 'int'); @@ -58,8 +60,9 @@ $fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -if ($user->socid) +if ($user->socid) { $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); if (empty($conf->stock->enabled)) { @@ -70,8 +73,9 @@ $hookmanager->initHooks(array('ordersupplierdispatch')); // Recuperation de l'id de projet $projectid = 0; -if ($_GET["projectid"]) +if ($_GET["projectid"]) { $projectid = GETPOST("projectid", 'int'); +} $object = new CommandeFournisseur($db); @@ -93,25 +97,24 @@ if ($id > 0 || !empty($ref)) { $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if ($action == 'checkdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) -{ +if ($action == 'checkdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) { $error = 0; $supplierorderdispatch = new CommandeFournisseurDispatch($db); $db->begin(); $result = $supplierorderdispatch->fetch($lineid); - if (!$result) - { + if (!$result) { $error++; setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); $action = ''; } - if (!$error) - { + if (!$error) { $result = $supplierorderdispatch->setStatut(1); if ($result < 0) { setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); @@ -120,8 +123,7 @@ if ($action == 'checkdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_ } } - if (!$error) - { + if (!$error) { $result = $object->calcAndSetStatusDispatch($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -129,31 +131,27 @@ if ($action == 'checkdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_ $action = ''; } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } } -if ($action == 'uncheckdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) -{ +if ($action == 'uncheckdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) { $error = 0; $supplierorderdispatch = new CommandeFournisseurDispatch($db); $db->begin(); $result = $supplierorderdispatch->fetch($lineid); - if (!$result) - { + if (!$result) { $error++; setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); $action = ''; } - if (!$error) - { + if (!$error) { $result = $supplierorderdispatch->setStatut(0); if ($result < 0) { setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); @@ -161,8 +159,7 @@ if ($action == 'uncheckdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCE $action = ''; } } - if (!$error) - { + if (!$error) { $result = $object->calcAndSetStatusDispatch($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -170,31 +167,27 @@ if ($action == 'uncheckdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCE $action = ''; } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } } -if ($action == 'denydispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) -{ +if ($action == 'denydispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))) { $error = 0; $supplierorderdispatch = new CommandeFournisseurDispatch($db); $db->begin(); $result = $supplierorderdispatch->fetch($lineid); - if (!$result) - { + if (!$result) { $error++; setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); $action = ''; } - if (!$error) - { + if (!$error) { $result = $supplierorderdispatch->setStatut(2); if ($result < 0) { setEventMessages($supplierorderdispatch->error, $supplierorderdispatch->errors, 'errors'); @@ -202,8 +195,7 @@ if ($action == 'denydispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_P $action = ''; } } - if (!$error) - { + if (!$error) { $result = $object->calcAndSetStatusDispatch($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -211,8 +203,7 @@ if ($action == 'denydispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_P $action = ''; } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -225,12 +216,10 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $db->begin(); $pos = 0; - foreach ($_POST as $key => $value) - { + foreach ($_POST as $key => $value) { // without batch module enabled $reg = array(); - if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) - { + if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $pos++; // $numline=$reg[2] + 1; // line of product @@ -238,7 +227,9 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $prod = "product_".$reg[1].'_'.$reg[2]; $qty = "qty_".$reg[1].'_'.$reg[2]; $ent = "entrepot_".$reg[1].'_'.$reg[2]; - if (empty(GETPOST($ent))) $ent = $fk_default_warehouse; + if (empty(GETPOST($ent))) { + $ent = $fk_default_warehouse; + } $pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount $fk_commandefourndet = "fk_commandefourndet_".$reg[1].'_'.$reg[2]; @@ -293,8 +284,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) } } // with batch module enabled - if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) - { + if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $pos++; // eat-by date dispatch @@ -398,14 +388,12 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) } // Remove a dispatched line -if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->commande->receptionner) -{ +if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->commande->receptionner) { $db->begin(); $supplierorderdispatch = new CommandeFournisseurDispatch($db); $result = $supplierorderdispatch->fetch($lineid); - if ($result > 0) - { + if ($result > 0) { $qty = $supplierorderdispatch->qty; $entrepot = $supplierorderdispatch->fk_entrepot; $product = $supplierorderdispatch->fk_product; @@ -417,48 +405,39 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fourn $result = $supplierorderdispatch->delete($user); } - if ($result < 0) - { + if ($result < 0) { $errors = $object->errors; $error++; - } - else { + } 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)) - { + if ($entrepot > 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { $mouv = new MouvementStock($db); - if ($product > 0) - { + if ($product > 0) { $mouv->origin = &$object; $result = $mouv->livraison($user, $product, $entrepot, $qty, $price, $comment, '', $eatby, $sellby, $batch); - if ($result < 0) - { + if ($result < 0) { $errors = $mouv->errors; $error++; } } } } - if ($error > 0) - { + if ($error > 0) { $db->rollback(); setEventMessages($error, $errors, 'errors'); - } - else { + } else { $db->commit(); } } // Update a dispatched line -if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionner) -{ +if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionner) { $db->begin(); $error = 0; $supplierorderdispatch = new CommandeFournisseurDispatch($db); $result = $supplierorderdispatch->fetch($lineid); - if ($result > 0) - { + if ($result > 0) { $qty = $supplierorderdispatch->qty; $entrepot = $supplierorderdispatch->fk_entrepot; $product = $supplierorderdispatch->fk_product; @@ -472,30 +451,23 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne $supplierorderdispatch->fk_entrepot = GETPOST('fk_entrepot'); $result = $supplierorderdispatch->update($user); } - if ($result < 0) - { + if ($result < 0) { $error++; $errors = $supplierorderdispatch->errors; - } - else { + } 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)) - { + if ($entrepot > 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { $mouv = new MouvementStock($db); - if ($product > 0) - { + if ($product > 0) { $mouv->origin = &$object; $result = $mouv->livraison($user, $product, $entrepot, $qty, $price, $comment, '', $eatby, $sellby, $batch); - if ($result < 0) - { + if ($result < 0) { $errors = $mouv->errors; $error++; - } - else { + } else { $mouv->origin = &$object; $result = $mouv->reception($user, $product, $supplierorderdispatch->fk_entrepot, $supplierorderdispatch->qty, $price, $comment, $eatby, $sellby, $batch); - if ($result < 0) - { + if ($result < 0) { $errors = $mouv->errors; $error++; } @@ -503,12 +475,10 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne } } } - if ($error > 0) - { + if ($error > 0) { $db->rollback(); setEventMessages($error, $errors, 'errors'); - } - else { + } else { $db->commit(); } } @@ -525,7 +495,9 @@ $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("OrderDispatch"), $help_url, '', 0, 0, array('/fourn/js/lib_dispatch.js.php')); +$morejs = array('/fourn/js/lib_dispatch.js.php'); + +llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, $morejs); if ($id > 0 || !empty($ref)) { $soc = new Societe($db); @@ -542,8 +514,7 @@ if ($id > 0 || !empty($ref)) { $formconfirm = ''; // Confirmation to delete line - if ($action == 'ask_deleteline') - { + 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); } @@ -551,8 +522,11 @@ if ($id > 0 || !empty($ref)) { $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -568,12 +542,10 @@ if ($id > 0 || !empty($ref)) { // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; @@ -641,8 +613,9 @@ if ($id > 0 || !empty($ref)) { print '<br>'; $disabled = 1; - if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) + if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { $disabled = 0; + } // Line of orders if ($object->statut <= CommandeFournisseur::STATUS_ACCEPTED || $object->statut >= CommandeFournisseur::STATUS_CANCELED) { @@ -651,8 +624,7 @@ if ($id > 0 || !empty($ref)) { if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY - || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) - { + || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $formproduct->loadWarehouses(); @@ -660,12 +632,18 @@ if ($id > 0 || !empty($ref)) { $listwarehouses = $entrepot->list_array(1); - if (empty($conf->reception->enabled))print '<form method="POST" action="dispatch.php?id='.$object->id.'">'; - else print '<form method="post" action="'.dol_buildpath('/reception/card.php', 1).'?originid='.$object->id.'&origin=supplierorder">'; + if (empty($conf->reception->enabled)) { + print '<form method="POST" action="dispatch.php?id='.$object->id.'">'; + } else { + print '<form method="post" action="'.dol_buildpath('/reception/card.php', 1).'?originid='.$object->id.'&origin=supplierorder">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; - if (empty($conf->reception->enabled))print '<input type="hidden" name="action" value="dispatch">'; - else print '<input type="hidden" name="action" value="create">'; + if (empty($conf->reception->enabled)) { + print '<input type="hidden" name="action" value="dispatch">'; + } else { + print '<input type="hidden" name="action" value="create">'; + } print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; @@ -704,14 +682,17 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + 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"; $sql .= " WHERE l.fk_commande = ".$object->id; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $sql .= " AND l.product_type = 0"; + } // Enable hooks to alter the SQL query (WHERE) $parameters = array(); @@ -721,7 +702,9 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $sql .= $hookmanager->resPrint; $sql .= " GROUP BY p.ref, p.label, p.tobatch, p.fk_default_warehouse, l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product @@ -783,7 +766,9 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print "</tr>\n"; @@ -801,8 +786,9 @@ if ($id > 0 || !empty($ref)) { $nbfreeproduct++; } else { $remaintodispatch = price2num($objp->qty - ((float) $products_dispatched[$objp->rowid]), 5); // Calculation of dispatched - if ($remaintodispatch < 0) + if ($remaintodispatch < 0) { $remaintodispatch = 0; + } if ($remaintodispatch || empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) { $nbproduct++; @@ -856,8 +842,9 @@ if ($id > 0 || !empty($ref)) { // Define unit price for PMP calculation $up_ht_disc = $objp->subprice; - if (!empty($objp->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) + if (!empty($objp->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) { $up_ht_disc = price2num($up_ht_disc * (100 - $objp->remise_percent) / 100, 'MU'); + } // Supplier ref print '<td class="right">'.$objp->sref.'</td>'; @@ -868,7 +855,7 @@ if ($id > 0 || !empty($ref)) { // Already dispatched print '<td class="right">'.$products_dispatched[$objp->rowid].'</td>'; - if (!empty($conf->productbatch->enabled) && $objp->tobatch == 1) { + if (!empty($conf->productbatch->enabled) && $objp->tobatch > 0) { $type = 'batch'; print '<td class="right">'; print '</td>'; // Qty to dispatch @@ -890,7 +877,9 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print '</tr>'; @@ -901,8 +890,7 @@ if ($id > 0 || !empty($ref)) { print '<input name="product_batch'.$suffix.'" type="hidden" value="'.$objp->fk_product.'">'; print '<!-- This is a up (may include discount or not depending on STOCK_EXCLUDE_DISCOUNT_FOR_PMP. will be used for PMP calculation) -->'; - if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! - { + if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) { // Not tested ! print $langs->trans("BuyingPrice").': <input class="maxwidth75" name="pu'.$suffix.'" type="text" value="'.price2num($up_ht_disc, 'MU').'">'; } else { print '<input class="maxwidth75" name="pu'.$suffix.'" type="hidden" value="'.price2num($up_ht_disc, 'MU').'">'; @@ -925,7 +913,7 @@ if ($id > 0 || !empty($ref)) { print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, '', '', 1, ''); print '</td>'; } - print '<td colspan="3">&nbsp</td>'; // Supplier ref + Qty ordered + qty already dispatched + print '<td colspan="3">&nbsp;</td>'; // Supplier ref + Qty ordered + qty already dispatched } else { $type = 'dispatch'; $colspan = 7; @@ -951,7 +939,9 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print '</tr>'; @@ -962,8 +952,7 @@ if ($id > 0 || !empty($ref)) { print '<input name="product'.$suffix.'" type="hidden" value="'.$objp->fk_product.'">'; print '<!-- This is a up (may include discount or not depending on STOCK_EXCLUDE_DISCOUNT_FOR_PMP. will be used for PMP calculation) -->'; - if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! - { + if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) { // Not tested ! print $langs->trans("BuyingPrice").': <input class="maxwidth75" name="pu'.$suffix.'" type="text" value="'.price2num($up_ht_disc, 'MU').'">'; } else { print '<input class="maxwidth75" name="pu'.$suffix.'" type="hidden" value="'.price2num($up_ht_disc, 'MU').'">'; @@ -978,7 +967,7 @@ if ($id > 0 || !empty($ref)) { print '</td>'; print '<td>'; - if (!empty($conf->productbatch->enabled) && $objp->tobatch == 1) { + if (!empty($conf->productbatch->enabled) && $objp->tobatch > 0) { $type = 'batch'; print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"'); } else { @@ -1028,7 +1017,9 @@ if ($id > 0 || !empty($ref)) { $object, $action ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print "</tr>\n"; @@ -1044,20 +1035,18 @@ if ($id > 0 || !empty($ref)) { print "</table>\n"; print '</div>'; - if ($nbproduct) - { + if ($nbproduct) { $checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll')); print '<div class="center">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { if (empty($conf->reception->enabled)) { print $langs->trans("Comment").' : '; print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="'; - print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref); + print GETPOSTISSET("comment") ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref); // print ' / '.$object->ref_supplier; // Not yet available print '" class="flat"><br>'; @@ -1067,8 +1056,9 @@ if ($id > 0 || !empty($ref)) { $dispatchBt = empty($conf->reception->enabled) ? $langs->trans("Receive") : $langs->trans("CreateReception"); print '<br><input type="submit" class="button" name="dispatch" value="'.dol_escape_htmltag($dispatchBt).'"'; - if (count($listwarehouses) <= 0) + if (count($listwarehouses) <= 0) { print ' disabled'; + } print '>'; } print '</div>'; @@ -1077,9 +1067,11 @@ if ($id > 0 || !empty($ref)) { // Message if nothing to dispatch if (!$nbproduct) { print "<br>\n"; - if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) + if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) { print '<div class="opacitymedium">'.$langs->trans("NoPredefinedProductToDispatch").'</div>'; // No predefined line at all - else print '<div class="opacitymedium">'.$langs->trans("NoMorePredefinedProductToDispatch").'</div>'; // No predefined line that remain to be dispatched. + } else { + print '<div class="opacitymedium">'.$langs->trans("NoMorePredefinedProductToDispatch").'</div>'; // No predefined line that remain to be dispatched. + } } print '</form>'; @@ -1111,12 +1103,16 @@ if ($id > 0 || !empty($ref)) { $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"; + 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"; + 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; $sql .= " AND cfd.fk_product = p.rowid"; $sql .= " ORDER BY cfd.rowid ASC"; @@ -1135,7 +1131,9 @@ if ($id > 0 || !empty($ref)) { print '<table id="dispatch_received_products" class="noborder centpercent">'; print '<tr class="liste_titre">'; - if ($conf->reception->enabled)print '<td>'.$langs->trans("Reception").'</td>'; + if ($conf->reception->enabled) { + print '<td>'.$langs->trans("Reception").'</td>'; + } print '<td>'.$langs->trans("Product").'</td>'; print '<td>'.$langs->trans("DateCreation").'</td>'; @@ -1167,9 +1165,8 @@ if ($id > 0 || !empty($ref)) { while ($i < $num) { $objp = $db->fetch_object($resql); - if ($action == 'editline' && $lineid == $objp->dispatchlineid) - { - print '<form name="editdispatchedlines" id="editdispatchedlines" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#line_'.GETPOST('lineid').'" method="POST"> + if ($action == 'editline' && $lineid == $objp->dispatchlineid) { + print '<form name="editdispatchedlines" id="editdispatchedlines" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#line_'.GETPOST('lineid', 'int').'" method="POST"> <input type="hidden" name="token" value="'.newToken().'"> <input type="hidden" name="action" value="updateline"> <input type="hidden" name="mode" value=""> @@ -1217,11 +1214,9 @@ if ($id > 0 || !empty($ref)) { // Qty print '<td class="right">'; - if ($action == 'editline' && $lineid == $objp->dispatchlineid) - { + if ($action == 'editline' && $lineid == $objp->dispatchlineid) { print '<input style="width: 50px;" type="number" min="1" name="qty" value="'.$objp->qty.'" />'; - } - else { + } else { print $objp->qty; } print '<input type="hidden" name="price" value="'.$objp->subprice.'" />'; @@ -1229,8 +1224,7 @@ if ($id > 0 || !empty($ref)) { // Warehouse print '<td>'; - if ($action == 'editline' && $lineid == $objp->dispatchlineid) - { + 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) { @@ -1239,8 +1233,7 @@ if ($id > 0 || !empty($ref)) { $langs->load("errors"); print $langs->trans("ErrorNoWarehouseDefined"); } - } - else { + } else { $warehouse_static->id = $objp->warehouse_id; $warehouse_static->libelle = $objp->entrepot; print $warehouse_static->getNomUrl(1); @@ -1260,8 +1253,7 @@ if ($id > 0 || !empty($ref)) { // Add button to check/uncheck disaptching print '<td class="center">'; - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))) - { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))) { if (empty($objp->status)) { print '<a class="button buttonRefused" href="#">'.$langs->trans("Approve").'</a>'; print '<a class="button buttonRefused" href="#">'.$langs->trans("Deny").'</a>'; @@ -1271,8 +1263,9 @@ if ($id > 0 || !empty($ref)) { } } else { $disabled = ''; - if ($object->statut == 5) + if ($object->statut == 5) { $disabled = 1; + } if (empty($objp->status)) { print '<a class="button'.($disabled ? ' buttonRefused' : '').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=checkdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Approve").'</a>'; print '<a class="button'.($disabled ? ' buttonRefused' : '').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=denydispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Deny").'</a>'; @@ -1295,8 +1288,7 @@ if ($id > 0 || !empty($ref)) { print '</td>'; } - if ($action != 'editline' || $lineid != $objp->dispatchlineid) - { + if ($action != 'editline' || $lineid != $objp->dispatchlineid) { print '<td class="linecoledit center">'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;lineid='.$objp->dispatchlineid.'#line_'.$objp->dispatchlineid.'">'; print img_edit(); @@ -1308,8 +1300,7 @@ if ($id > 0 || !empty($ref)) { print img_delete(); print '</a>'; print '</td>'; - } - else { + } else { print '<td class="center valignmiddle">'; print '<input type="submit" class="button button-save" id="savelinebutton" name="save" value="'.$langs->trans("Save").'" />'; print '</td>'; @@ -1320,7 +1311,9 @@ if ($id > 0 || !empty($ref)) { print "</tr>\n"; - if ($action == 'editline' && $lineid == $objp->dispatchlineid) print '</form>'; + if ($action == 'editline' && $lineid == $objp->dispatchlineid) { + print '</form>'; + } $i++; } diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index ef37ad16241..f3dc1d26496 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -47,7 +47,9 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); // Get parameters @@ -55,17 +57,22 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new CommandeFournisseur($db); -if ($object->fetch($id, $ref) < 0) -{ +if ($object->fetch($id, $ref) < 0) { dol_print_error($db); exit; } @@ -78,7 +85,7 @@ $object->fetch_thirdparty(); * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -87,8 +94,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); -if ($object->id > 0) -{ +if ($object->id > 0) { $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $langs->trans("Order"), $help_url); @@ -105,8 +111,7 @@ if ($object->id > 0) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -121,12 +126,10 @@ if ($object->id > 0) // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; @@ -173,8 +176,8 @@ if ($object->id > 0) $modulepart = 'commande_fournisseur'; - $permission = $user->rights->fournisseur->commande->creer; - $permtoedit = $user->rights->fournisseur->commande->creer; + $permission = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); + $permtoedit = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); $param = '&id='.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 1e9e69fb8cd..eef851c6d73 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -32,7 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; // Security check $orderid = GETPOST('orderid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); $hookmanager = new HookManager($db); @@ -58,20 +60,6 @@ print load_fiche_titre($langs->trans("SuppliersOrdersArea"), '', 'supplier_order print '<div class="fichecenter"><div class="fichethirdleft">'; - -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - print '<form method="post" action="list.php">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; - print '<tr class="oddeven"><td>'; - print $langs->trans("SupplierOrder").':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; - print "</table></div></form><br>\n"; -} - - /* * Statistics */ @@ -79,16 +67,21 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $sql = "SELECT count(cf.rowid) as nb, fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE cf.fk_soc = s.rowid"; $sql .= " AND cf.entity IN (".getEntity('supplier_order').")"; -if ($user->socid) $sql .= ' AND cf.fk_soc = '.$user->socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($user->socid) { + $sql .= ' AND cf.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 cf.fk_statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -98,11 +91,9 @@ if ($resql) // 0=Draft -> 1=Validated -> 2=Approved -> 3=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 - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $vals[($obj->status == CommandeFournisseur::STATUS_CANCELED_AFTER_ORDER ? CommandeFournisseur::STATUS_CANCELED : $obj->status)] = $obj->nb; $total += $obj->nb; @@ -111,35 +102,48 @@ if ($resql) } $db->free($resql); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'</th></tr>'; print "</tr>\n"; $listofstatus = array(0, 1, 2, 3, 4, 5, 6, 9); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array($commandestatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == CommandeFournisseur::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == CommandeFournisseur::STATUS_VALIDATED) $colorseries[$status] = '-'.$badgeStatus1; - if ($status == CommandeFournisseur::STATUS_ACCEPTED) $colorseries[$status] = $badgeStatus1; - if ($status == CommandeFournisseur::STATUS_REFUSED) $colorseries[$status] = $badgeStatus9; - if ($status == CommandeFournisseur::STATUS_ORDERSENT) $colorseries[$status] = $badgeStatus4; - if ($status == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) $colorseries[$status] = '-'.$badgeStatus4; - if ($status == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) $colorseries[$status] = $badgeStatus6; - if ($status == CommandeFournisseur::STATUS_CANCELED || $status == CommandeFournisseur::STATUS_CANCELED_AFTER_ORDER) $colorseries[$status] = $badgeStatus9; + if ($status == CommandeFournisseur::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == CommandeFournisseur::STATUS_VALIDATED) { + $colorseries[$status] = '-'.$badgeStatus1; + } + if ($status == CommandeFournisseur::STATUS_ACCEPTED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == CommandeFournisseur::STATUS_REFUSED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == CommandeFournisseur::STATUS_ORDERSENT) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) { + $colorseries[$status] = '-'.$badgeStatus4; + } + if ($status == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) { + $colorseries[$status] = $badgeStatus6; + } + if ($status == CommandeFournisseur::STATUS_CANCELED || $status == CommandeFournisseur::STATUS_CANCELED_AFTER_ORDER) { + $colorseries[$status] = $badgeStatus9; + } - if (!$conf->use_javascript_ajax) - { + if (!$conf->use_javascript_ajax) { print '<tr class="oddeven">'; print '<td>'.$commandestatic->LibStatut($status, 0).'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr class="impair"><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -168,32 +172,34 @@ if ($resql) * Draft orders */ -if (!empty($conf->fournisseur->enabled)) -{ +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { $sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity("supplier_order").")"; // Thirdparty sharing is mandatory with supplier order sharing $sql .= " AND c.fk_statut = 0"; - if (!empty($socid)) $sql .= " AND c.fk_soc = ".$socid; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!empty($socid)) { + $sql .= " AND c.fk_soc = ".$socid; + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="2">'.$langs->trans("DraftOrders").'</th></tr>'; $langs->load("orders"); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -218,8 +224,7 @@ if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_T } $sql .= " u.rowid, u.lastname, u.firstname, u.email, u.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; -if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) -{ +if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; @@ -230,8 +235,7 @@ if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_T $sql .= " AND u.fk_soc IS NULL"; // An external user can not approved $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -240,16 +244,14 @@ if ($resql) print '<tr class="liste_titre"><th>'.$langs->trans("UserWithApproveOrderGrant").'</th>'; print "</tr>\n"; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $userstatic = new User($db); $userstatic->id = $obj->rowid; $userstatic->getrights('fournisseur'); - if (!empty($userstatic->rights->fournisseur->commande->approuver)) - { + if (!empty($userstatic->rights->fournisseur->commande->approuver)) { print '<tr class="oddeven">'; print '<td>'; $userstatic->lastname = $obj->lastname; @@ -281,29 +283,32 @@ $max = 5; $sql = "SELECT c.rowid, c.ref, c.fk_statut as status, c.tms, c.billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; //$sql.= " AND c.fk_statut > 2"; -if (!empty($socid)) $sql .= " AND c.fk_soc = ".$socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if (!empty($socid)) { + $sql .= " AND c.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 c.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="4">'.$langs->trans("LastModifiedOrders", $max).'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -338,7 +343,9 @@ if ($resql) } } print "</table></div><br>"; -} 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 a50cbbdad39..9260dab0b42 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -44,17 +44,24 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = 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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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_OBJECTS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECTS)); } @@ -62,10 +69,14 @@ $search_agenda_label = GETPOST('search_agenda_label'); // Security check $socid = 0; -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); -if (!$user->rights->fournisseur->commande->lire) accessforbidden(); +if (!$user->rights->fournisseur->commande->lire) { + accessforbidden(); +} @@ -76,11 +87,12 @@ if (!$user->rights->fournisseur->commande->lire) accessforbidden(); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // 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 -{ +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 $actioncode = ''; $search_agenda_label = ''; } @@ -94,15 +106,16 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $form = new Form($db); $object = new CommandeFournisseur($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); $object->info($object->id); } $title = $langs->trans("SupplierOrder").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +} $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $title, $help_url); @@ -125,12 +138,10 @@ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_ // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; @@ -181,18 +192,15 @@ print dol_get_fiche_end(); $out = ''; $permok = $user->rights->agenda->myactions->create; -if ($permok) -{ +if ($permok) { $out .= '&originid='.$object->id.'&origin=order_supplier'; } print '<div class="tabsAction">'; -if (!empty($conf->agenda->enabled)) -{ - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { +if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; @@ -202,18 +210,21 @@ if (!empty($conf->agenda->enabled)) print '</div>'; -if (!empty($object->id)) -{ +if (!empty($object->id)) { $param = '&id='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print load_fiche_titre($langs->trans("ActionsOnOrder"), '', ''); // List of actions on element /*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - $somethingshown = $formactions->showactions($object,'project',0);*/ + $formactions=new FormActions($db); + $somethingshown = $formactions->showactions($object,'project',0);*/ // List of todo actions //show_actions_todo($conf,$langs,$db,$object,null,0,$actioncode); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index f06542ab143..1515429199a 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -78,12 +78,12 @@ $optioncss = GETPOST('optioncss', 'alpha'); $socid = GETPOST('socid', 'int'); $search_sale = GETPOST('search_sale', 'int'); $search_total_ht = GETPOST('search_total_ht', 'alpha'); -$search_total_vat = GETPOST('search_total_vat', 'alpha'); +$search_total_tva = GETPOST('search_total_tva', 'alpha'); $search_total_ttc = GETPOST('search_total_ttc', 'alpha'); $search_multicurrency_code = GETPOST('search_multicurrency_code', 'alpha'); $search_multicurrency_tx = GETPOST('search_multicurrency_tx', 'alpha'); $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); -$search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); +$search_multicurrency_montant_tva = GETPOST('search_multicurrency_montant_tva', 'alpha'); $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $search_billed = GETPOST('search_billed', 'int'); @@ -99,7 +99,9 @@ if (is_array(GETPOST('search_status', 'intcomma'))) { // Security check $orderid = GETPOST('orderid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); $diroutputmassaction = $conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id; @@ -108,14 +110,22 @@ $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 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 +if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = 'cf.ref'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'cf.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} -if ($search_status == '') $search_status = -1; +if ($search_status == '') { + $search_status = -1; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new CommandeFournisseur($db); @@ -138,7 +148,9 @@ $fieldstosearchall = array( 's.town'=>"Town", 'cf.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["cf.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["cf.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -155,12 +167,12 @@ $arrayfields = array( 'cf.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1), 'cf.date_livraison'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), 'cf.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), - 'cf.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'cf.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0), 'cf.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), 'cf.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'cf.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'cf.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), - 'cf.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), + 'cf.multicurrency_total_tva'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'cf.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'cf.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'cf.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), @@ -180,21 +192,25 @@ $error = 0; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createsupplierbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $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 -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_categ = ''; $search_user = ''; $search_sale = ''; @@ -210,12 +226,12 @@ if (empty($reshook)) $search_type_thirdparty = ''; $search_request_author = ''; $search_total_ht = ''; - $search_total_vat = ''; + $search_total_tva = ''; $search_total_ttc = ''; $search_multicurrency_code = ''; $search_multicurrency_tx = ''; $search_multicurrency_montant_ht = ''; - $search_multicurrency_montant_vat = ''; + $search_multicurrency_montant_tva = ''; $search_multicurrency_montant_ttc = ''; $search_project_ref = ''; $search_status = -1; @@ -231,8 +247,7 @@ if (empty($reshook)) $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')) - { + || 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 } @@ -244,9 +259,8 @@ if (empty($reshook)) $uploaddir = $conf->fournisseur->commande->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - // TODO Move this into mass action include - if ($massaction == 'confirm_createsupplierbills') - { + // Mass action to generate vendor bills + if ($massaction == 'confirm_createsupplierbills') { $orders = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('validate_invoices', 'int'); @@ -255,27 +269,33 @@ if (empty($reshook)) $TFactThird = array(); $nb_bills_created = 0; + $lastid = 0; + $lastref = ''; $db->begin(); foreach ($orders as $id_order) { $cmd = new CommandeFournisseur($db); - if ($cmd->fetch($id_order) <= 0) continue; + if ($cmd->fetch($id_order) <= 0) { + continue; + } $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 { + 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 { $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; + if (empty($createbills_onebythird)) { + $objecttmp->ref_client = $cmd->ref_client; + } $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - if (empty($datefacture)) - { + if (empty($datefacture)) { $datefacture = dol_now(); } @@ -285,11 +305,14 @@ if (empty($reshook)) $res = $objecttmp->create($user); - if ($res > 0) $nb_bills_created++; + if ($res > 0) { + $nb_bills_created++; + $lastref = $objecttmp->ref; + $lastid = $objecttmp->id; + } } - if ($objecttmp->id > 0) - { + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; $sql .= "fk_source"; $sql .= ", sourcetype"; @@ -302,16 +325,13 @@ if (empty($reshook)) $sql .= ", '".$db->escape($objecttmp->element)."'"; $sql .= ")"; - if (!$db->query($sql)) - { + if (!$db->query($sql)) { $erorr++; } - if (!$error) - { + if (!$error) { $lines = $cmd->lines; - if (empty($lines) && method_exists($cmd, 'fetch_lines')) - { + if (empty($lines) && method_exists($cmd, 'fetch_lines')) { $cmd->fetch_lines(); $lines = $cmd->lines; } @@ -319,11 +339,9 @@ if (empty($reshook)) $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); - if ($lines[$i]->subprice < 0) - { + if ($lines[$i]->subprice < 0) { // Negative line, we create a discount line $discount = new DiscountAbsolute($db); $discount->fk_soc = $objecttmp->socid; @@ -334,8 +352,7 @@ if (empty($reshook)) $discount->fk_user = $user->id; $discount->description = $desc; $discountid = $discount->create($user); - if ($discountid > 0) - { + if ($discountid > 0) { $result = $objecttmp->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); } else { @@ -348,17 +365,28 @@ if (empty($reshook)) $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; + 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; + 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) - { + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { $fk_parent_line = 0; } $result = $objecttmp->addline( @@ -386,8 +414,7 @@ if (empty($reshook)) $lines[$i]->special_code, $fk_parent_line ); - if ($result > 0) - { + if ($result > 0) { $lineid = $result; } else { $lineid = 0; @@ -395,8 +422,7 @@ if (empty($reshook)) break; } // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { + if ($result > 0 && $lines[$i]->product_type == 9) { $fk_parent_line = $result; } } @@ -406,8 +432,11 @@ 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] = $objecttmp; - else $TFact[$objecttmp->id] = $objecttmp; + if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) { + $TFactThird[$cmd->socid] = $objecttmp; + } else { + $TFact[$objecttmp->id] = $objecttmp; + } } // Build doc with all invoices @@ -417,11 +446,9 @@ if (empty($reshook)) if (!$error && $validate_invoices) { $massaction = $action = 'builddoc'; - foreach ($TAllFact as &$objecttmp) - { + foreach ($TAllFact as &$objecttmp) { $objecttmp->validate($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; @@ -432,43 +459,93 @@ if (empty($reshook)) // Fac builddoc $donotredirect = 1; $upload_dir = $conf->fournisseur->facture->dir_output; - $permissiontoadd = $user->rights->fournisseur->facture->creer; + $permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); //include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } $massaction = $action = 'confirm_createsupplierbills'; } - if (!$error) - { + if (!$error) { $db->commit(); - setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + + if ($nb_bills_created == 1) { + $texttoshow = $langs->trans('BillXCreated', '{s1}'); + $texttoshow = str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?id='.urlencode($lastid).'">'.$lastref.'</a>', $texttoshow); + setEventMessages($texttoshow, null, 'mesgs'); + } else { + setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + } // 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); + 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_tva != '') { + $param .= '&search_total_tva='.urlencode($search_total_tva); + } + 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; @@ -499,8 +576,7 @@ $formother = new FormOther($db); $formcompany = new FormCompany($db); $title = $langs->trans("ListOfSupplierOrders"); -if ($socid > 0) -{ +if ($socid > 0) { $fourn = new Fournisseur($db); $fourn->fetch($socid); $title .= ' - '.$fourn->name; @@ -514,26 +590,32 @@ if ($socid > 0) elseif ($search_status == '6,7') $title .= ' - '.$langs->trans("StatusOrderCanceled"); elseif (is_numeric($search_status) && $search_status >= 0) $title .= ' - '.$commandestatic->LibStatut($search_status); }*/ -if ($search_billed > 0) $title .= ' - '.$langs->trans("Billed"); +if ($search_billed > 0) { + $title .= ' - '.$langs->trans("Billed"); +} //$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; $help_url = ''; // llxHeader('',$title,$help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; +if ($sall || $search_product_category > 0 || $search_user > 0) { + $sql = 'SELECT DISTINCT'; +} $sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; -$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,"; -$sql .= ' cf.fk_multicurrency, cf.multicurrency_code, cf.multicurrency_tx, cf.multicurrency_total_ht, cf.multicurrency_total_tva as multicurrency_total_vat, cf.multicurrency_total_ttc,'; +$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,"; +$sql .= ' cf.fk_multicurrency, cf.multicurrency_code, cf.multicurrency_tx, cf.multicurrency_total_ht, cf.multicurrency_total_tva, cf.multicurrency_total_ttc,'; $sql .= ' cf.date_creation as date_creation, cf.tms as date_update,'; $sql .= ' cf.note_public, cf.note_private,'; $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,"; $sql .= " u.firstname, u.lastname, u.photo, u.login, u.email as user_email"; // 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(); @@ -544,15 +626,22 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; -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 (cf.rowid = ef.fk_object)"; -if ($sall || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet as pd ON cf.rowid=pd.fk_commande'; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +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 (cf.rowid = ef.fk_object)"; +} +if ($sall || $search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet as pd ON cf.rowid=pd.fk_commande'; +} +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 cf.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cf.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"; -if ($search_user > 0) -{ +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } @@ -561,39 +650,93 @@ $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object $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; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if ($search_ref) $sql .= natural_search('cf.ref', $search_ref); -if ($search_refsupp) $sql .= natural_search("cf.ref_supplier", $search_refsupp); -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($search_company) $sql .= natural_search('s.nom', $search_company); -if ($search_request_author) $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_request_author); -if ($search_billed != '' && $search_billed >= 0) $sql .= " AND cf.billed = ".$db->escape($search_billed); -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; +if ($socid > 0) { + $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 ($search_ref) { + $sql .= natural_search('cf.ref', $search_ref); +} +if ($search_refsupp) { + $sql .= natural_search("cf.ref_supplier", $search_refsupp); +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); +} +if ($search_request_author) { + $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_request_author); +} +if ($search_billed != '' && $search_billed >= 0) { + $sql .= " AND cf.billed = ".$db->escape($search_billed); +} +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') !== '') +if (GETPOST('statut', 'intcomma') !== '') { $sql .= " AND cf.fk_statut IN (".$db->sanitize($db->escape($db->escape(GETPOST('statut', 'intcomma')))).")"; -if ($search_status != '' && $search_status != '-1') +} +if ($search_status != '' && $search_status != '-1') { $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->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); -if ($search_total_ht != '') $sql .= natural_search('cf.total_ht', $search_total_ht, 1); -if ($search_total_vat != '') $sql .= natural_search('cf.tva', $search_total_vat, 1); -if ($search_total_ttc != '') $sql .= natural_search('cf.total_ttc', $search_total_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND cf.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; -if ($search_multicurrency_tx != '') $sql .= natural_search('cf.multicurrency_tx', $search_multicurrency_tx, 1); -if ($search_multicurrency_montant_ht != '') $sql .= natural_search('cf.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); -if ($search_multicurrency_montant_vat != '') $sql .= natural_search('cf.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); -if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('cf.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); -if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_ref); +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->sanitize($db->escape($search_country)).')'; +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $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); +} +if ($search_total_ht != '') { + $sql .= natural_search('cf.total_ht', $search_total_ht, 1); +} +if ($search_total_tva != '') { + $sql .= natural_search('cf.total_tva', $search_total_tva, 1); +} +if ($search_total_ttc != '') { + $sql .= natural_search('cf.total_ttc', $search_total_ttc, 1); +} +if ($search_multicurrency_code != '') { + $sql .= ' AND cf.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; +} +if ($search_multicurrency_tx != '') { + $sql .= natural_search('cf.multicurrency_tx', $search_multicurrency_tx, 1); +} +if ($search_multicurrency_montant_ht != '') { + $sql .= natural_search('cf.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); +} +if ($search_multicurrency_montant_tva != '') { + $sql .= natural_search('cf.multicurrency_total_tva', $search_multicurrency_montant_tva, 1); +} +if ($search_multicurrency_montant_ttc != '') { + $sql .= natural_search('cf.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); +} +if ($search_project_ref != '') { + $sql .= natural_search("p.ref", $search_project_ref); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -605,12 +748,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -620,14 +761,12 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/fourn/commande/card.php?id='.$id); @@ -637,35 +776,97 @@ if ($resql) llxHeader('', $title, $help_url); $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 ($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); - if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); - if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); - if ($search_refsupp) $param .= "&search_refsupp=".urlencode($search_refsupp); - if ($search_status != '' && $search_status != '-1') $param .= "&search_status=".urlencode($search_status); - if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref); - if ($search_billed != '') $param .= "&search_billed=".urlencode($search_billed); - if ($show_files) $param .= '&show_files='.urlencode($show_files); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + 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); + } + if ($search_multicurrency_montant_tva != '') { + $param .= '&search_multicurrency_montant_tva='.urlencode($search_multicurrency_montant_tva); + } + if ($search_multicurrency_montant_ttc != '') { + $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); + } + if ($search_refsupp) { + $param .= "&search_refsupp=".urlencode($search_refsupp); + } + if ($search_status != '' && $search_status != '-1') { + $param .= "&search_status=".urlencode($search_status); + } + if ($search_project_ref >= 0) { + $param .= "&search_project_ref=".urlencode($search_project_ref); + } + if ($search_billed != '') { + $param .= "&search_billed=".urlencode($search_billed); + } + if ($show_files) { + $param .= '&show_files='.urlencode($show_files); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); + } + // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -675,22 +876,32 @@ if ($resql) // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); - if ($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); - if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { + $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); + } + if ($user->rights->fournisseur->commande->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete', 'createbills'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $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); + if (!empty($socid)) { + $url .= '&socid='.$socid; + } + $newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)); // Lines of title fields print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -707,8 +918,7 @@ if ($resql) $trackid = 'sord'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($massaction == 'createbills') - { + if ($massaction == 'createbills') { //var_dump($_REQUEST); print '<input type="hidden" name="massaction" value="confirm_createsupplierbills">'; @@ -747,48 +957,48 @@ if ($resql) print '<br>'; } - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } $moreforfilter = ''; // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { + if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); $moreforfilter .= '</div>'; } // If the user can view other users - if ($user->rights->user->user->lire) - { + if ($user->rights->user->user->lire) { $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '</div>'; } // If the user can view prospects other than his' - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($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 .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; + $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '</div>'; } $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -813,126 +1023,116 @@ if ($resql) print '<tr class="liste_titre_filter">'; // Ref - if (!empty($arrayfields['cf.ref']['checked'])) - { + if (!empty($arrayfields['cf.ref']['checked'])) { print '<td class="liste_titre"><input size="8" type="text" class="flat maxwidth75" name="search_ref" value="'.$search_ref.'"></td>'; } // Ref customer - if (!empty($arrayfields['cf.ref_supplier']['checked'])) - { + if (!empty($arrayfields['cf.ref_supplier']['checked'])) { print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_refsupp" value="'.$search_refsupp.'"></td>'; } // Project ref - if (!empty($arrayfields['p.project_ref']['checked'])) - { + if (!empty($arrayfields['p.project_ref']['checked'])) { print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_project_ref" value="'.$search_project_ref.'"></td>'; } // Request author - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" size="6" name="search_request_author" value="'.$search_request_author.'">'; print '</td>'; } // Thirpdarty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_company" value="'.$search_company.'"></td>'; } // Town - if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>'; + if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>'; + } // Zip - if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_zip" value="'.$search_zip.'"></td>'; + if (!empty($arrayfields['s.zip']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_zip" value="'.$search_zip.'"></td>'; + } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat maxwidth50" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '</td>'; } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="liste_titre center">'; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print '</td>'; } // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print '</td>'; } // Date order - if (!empty($arrayfields['cf.date_commande']['checked'])) - { + if (!empty($arrayfields['cf.date_commande']['checked'])) { print '<td class="liste_titre nowraponall center">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_orderday" value="'.$search_orderday.'">'; + } print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_ordermonth" value="'.$search_ordermonth.'">'; $formother->select_year($search_orderyear ? $search_orderyear : -1, 'search_orderyear', 1, 20, 5); print '</td>'; } // Date delivery - if (!empty($arrayfields['cf.date_livraison']['checked'])) - { + if (!empty($arrayfields['cf.date_livraison']['checked'])) { print '<td class="liste_titre nowraponall center">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">'; + } print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliverymonth" value="'.$search_deliverymonth.'">'; $formother->select_year($search_deliveryyear ? $search_deliveryyear : -1, 'search_deliveryyear', 1, 20, 5); print '</td>'; } - if (!empty($arrayfields['cf.total_ht']['checked'])) - { + if (!empty($arrayfields['cf.total_ht']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_total_ht" value="'.$search_total_ht.'">'; print '</td>'; } - if (!empty($arrayfields['cf.total_vat']['checked'])) - { + if (!empty($arrayfields['cf.total_tva']['checked'])) { // Amount print '<td class="liste_titre right">'; - print '<input class="flat" type="text" size="5" name="search_total_vat" value="'.$search_total_vat.'">'; + print '<input class="flat" type="text" size="5" name="search_total_tva" value="'.$search_total_tva.'">'; print '</td>'; } - if (!empty($arrayfields['cf.total_ttc']['checked'])) - { + if (!empty($arrayfields['cf.total_ttc']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">'; print '</td>'; } - if (!empty($arrayfields['cf.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_code']['checked'])) { // Currency print '<td class="liste_titre">'; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print '</td>'; } - if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) { // Currency rate print '<td class="liste_titre">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).'">'; print '</td>'; } - if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">'; print '</td>'; } - if (!empty($arrayfields['cf.multicurrency_total_vat']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_total_tva']['checked'])) { // Amount print '<td class="liste_titre right">'; - print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">'; + print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_tva" value="'.dol_escape_htmltag($search_multicurrency_montant_tva).'">'; print '</td>'; } - if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">'; @@ -946,27 +1146,23 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['cf.datec']['checked'])) - { + if (!empty($arrayfields['cf.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['cf.tms']['checked'])) - { + if (!empty($arrayfields['cf.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Status - if (!empty($arrayfields['cf.fk_statut']['checked'])) - { + if (!empty($arrayfields['cf.fk_statut']['checked'])) { print '<td class="liste_titre right">'; $formorder->selectSupplierOrderStatus($search_status, 1, 'search_status'); print '</td>'; } // Status billed - if (!empty($arrayfields['cf.billed']['checked'])) - { + if (!empty($arrayfields['cf.billed']['checked'])) { print '<td class="liste_titre center">'; print $form->selectyesno('search_billed', $search_billed, 1, 0, 1, 1); print '</td>'; @@ -981,37 +1177,87 @@ if ($resql) // Fields title print '<tr class="liste_titre">'; - 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, '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); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['cf.fk_author']['checked'])) print_liste_field_titre($arrayfields['cf.fk_author']['label'], $_SERVER["PHP_SELF"], "cf.fk_author", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['cf.date_commande']['checked'])) print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['cf.date_livraison']['checked'])) print_liste_field_titre($arrayfields['cf.date_livraison']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['cf.total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['cf.total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.total_vat']['label'], $_SERVER["PHP_SELF"], "cf.tva", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['cf.total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['cf.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_code', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_tx', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['cf.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + 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, '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); + } + if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['country.code_iso']['checked'])) { + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['cf.fk_author']['checked'])) { + print_liste_field_titre($arrayfields['cf.fk_author']['label'], $_SERVER["PHP_SELF"], "cf.fk_author", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['cf.date_commande']['checked'])) { + print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['cf.date_livraison']['checked'])) { + print_liste_field_titre($arrayfields['cf.date_livraison']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['cf.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['cf.total_tva']['checked'])) { + print_liste_field_titre($arrayfields['cf.total_tva']['label'], $_SERVER["PHP_SELF"], "cf.total_tva", "", $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['cf.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['cf.multicurrency_code']['checked'])) { + print_liste_field_titre($arrayfields['cf.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_code', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) { + print_liste_field_titre($arrayfields['cf.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_tx', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) { + print_liste_field_titre($arrayfields['cf.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['cf.multicurrency_total_tva']['checked'])) { + print_liste_field_titre($arrayfields['cf.multicurrency_total_tva']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['cf.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'cf.multicurrency_total_ttc', '', $param, 'class="right"', $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['cf.datec']['checked'])) print_liste_field_titre($arrayfields['cf.datec']['label'], $_SERVER["PHP_SELF"], "cf.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['cf.tms']['checked'])) print_liste_field_titre($arrayfields['cf.tms']['label'], $_SERVER["PHP_SELF"], "cf.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['cf.fk_statut']['checked'])) print_liste_field_titre($arrayfields['cf.fk_statut']['label'], $_SERVER["PHP_SELF"], "cf.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['cf.billed']['checked'])) print_liste_field_titre($arrayfields['cf.billed']['label'], $_SERVER["PHP_SELF"], 'cf.billed', '', $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['cf.datec']['checked'])) { + print_liste_field_titre($arrayfields['cf.datec']['label'], $_SERVER["PHP_SELF"], "cf.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + } + if (!empty($arrayfields['cf.tms']['checked'])) { + print_liste_field_titre($arrayfields['cf.tms']['label'], $_SERVER["PHP_SELF"], "cf.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + } + if (!empty($arrayfields['cf.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['cf.fk_statut']['label'], $_SERVER["PHP_SELF"], "cf.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['cf.billed']['checked'])) { + print_liste_field_titre($arrayfields['cf.billed']['label'], $_SERVER["PHP_SELF"], 'cf.billed', '', $param, '', $sortfield, $sortorder, 'center '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; @@ -1026,8 +1272,7 @@ if ($resql) $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $notshippable = 0; @@ -1051,8 +1296,7 @@ if ($resql) print '<tr class="oddeven">'; // Ref - if (!empty($arrayfields['cf.ref']['checked'])) - { + if (!empty($arrayfields['cf.ref']['checked'])) { print '<td class="nowrap">'; // Picto + Ref @@ -1063,24 +1307,30 @@ if ($resql) print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); print '</td>'."\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref Supplier - if (!empty($arrayfields['cf.ref_supplier']['checked'])) - { + if (!empty($arrayfields['cf.ref_supplier']['checked'])) { print '<td>'.$obj->ref_supplier.'</td>'."\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project - if (!empty($arrayfields['p.project_ref']['checked'])) - { + if (!empty($arrayfields['p.project_ref']['checked'])) { $projectstatic->id = $obj->project_id; $projectstatic->ref = $obj->project_ref; $projectstatic->title = $obj->project_title; print '<td>'; - if ($obj->project_id > 0) print $projectstatic->getNomUrl(1); + if ($obj->project_id > 0) { + print $projectstatic->getNomUrl(1); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Author $userstatic->id = $obj->fk_user_author; @@ -1089,68 +1339,78 @@ if ($resql) $userstatic->login = $obj->login; $userstatic->photo = $obj->photo; $userstatic->email = $obj->user_email; - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { print '<td class="tdoverflowmax150">'; - if ($userstatic->id) print $userstatic->getNomUrl(1); + if ($userstatic->id) { + print $userstatic->getNomUrl(1); + } print "</td>"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Thirdparty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="tdoverflowmax150">'; $thirdpartytmp->id = $obj->socid; $thirdpartytmp->name = $obj->name; $thirdpartytmp->email = $obj->email; print $thirdpartytmp->getNomUrl(1, 'supplier'); print '</td>'."\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.town']['checked'])) { print '<td>'; print $obj->town; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print '<td>'; print $obj->zip; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "<td>".$obj->state_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="center">'; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="center">'; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (count($typenArray) == 0) { + $typenArray = $formcompany->typent_array(1); + } print $typenArray[$obj->typent_code]; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Order date - if (!empty($arrayfields['cf.date_commande']['checked'])) - { + if (!empty($arrayfields['cf.date_commande']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_commande), 'day'); if ($objectstatic->statut != $objectstatic::STATUS_ORDERSENT && $objectstatic->statut != $objectstatic::STATUS_RECEIVED_PARTIALLY) { @@ -1159,11 +1419,12 @@ if ($resql) } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Plannned date of delivery - if (!empty($arrayfields['cf.date_livraison']['checked'])) - { + if (!empty($arrayfields['cf.date_livraison']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_livraison), 'day'); if ($objectstatic->statut == $objectstatic::STATUS_ORDERSENT || $objectstatic->statut == $objectstatic::STATUS_RECEIVED_PARTIALLY) { @@ -1172,65 +1433,81 @@ if ($resql) } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['cf.total_ht']['checked'])) - { - print '<td class="right">'.price($obj->total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ht'; + if (!empty($arrayfields['cf.total_ht']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ht'; + } $totalarray['val']['cf.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['cf.total_vat']['checked'])) - { - print '<td class="right">'.price($obj->total_tva)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_vat'; - $totalarray['val']['cf.total_vat'] += $obj->total_tva; + if (!empty($arrayfields['cf.total_tva']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_tva)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_tva'; + } + $totalarray['val']['cf.total_tva'] += $obj->total_tva; } // Amount TTC - if (!empty($arrayfields['cf.total_ttc']['checked'])) - { - print '<td class="right">'.price($obj->total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ttc'; + if (!empty($arrayfields['cf.total_ttc']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'cf.total_ttc'; + } $totalarray['val']['cf.total_ttc'] += $obj->total_ttc; } // Currency - if (!empty($arrayfields['cf.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_code']['checked'])) { print '<td class="nowrap">'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency rate - if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['cf.multicurrency_tx']['checked'])) { print '<td class="nowrap">'; $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['cf.multicurrency_total_ht']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount VAT - if (!empty($arrayfields['cf.multicurrency_total_vat']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_vat)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['cf.multicurrency_total_tva']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_tva)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount TTC - if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['cf.multicurrency_total_ttc']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -1240,44 +1517,51 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['cf.datec']['checked'])) - { + if (!empty($arrayfields['cf.datec']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['cf.tms']['checked'])) - { + if (!empty($arrayfields['cf.tms']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['cf.fk_statut']['checked'])) - { + if (!empty($arrayfields['cf.fk_statut']['checked'])) { print '<td class="right nowrap">'.$objectstatic->LibStatut($obj->fk_statut, 5, $obj->billed).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Billed - if (!empty($arrayfields['cf.billed']['checked'])) - { + if (!empty($arrayfields['cf.billed']['checked'])) { print '<td class="center">'.yn($obj->billed).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; @@ -1301,15 +1585,17 @@ if ($resql) print '</form>'."\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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('&amp;', '&', $param); $filedir = $diroutputmassaction; - $genallowed = $user->rights->fournisseur->commande->lire; - $delallowed = $user->rights->fournisseur->commande->creer; + $genallowed = ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire); + $delallowed = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); print $formfile->showdocuments('massfilesarea_supplier_order', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } else { diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index dea5ad69afa..c4cc134fee7 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -40,13 +40,15 @@ $ref = GETPOST('ref'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); $object = new CommandeFournisseur($db); $object->fetch($id, $ref); -$permissionnote = $user->rights->fournisseur->commande->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php /* @@ -72,10 +74,8 @@ $form = new Form($db); $now = dol_now(); -if ($id > 0 || !empty($ref)) -{ - if ($result >= 0) - { +if ($id > 0 || !empty($ref)) { + if ($result >= 0) { $object->fetch_thirdparty(); $author = new User($db); @@ -97,12 +97,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/fourn/commande/tpl/index.html b/htdocs/fourn/commande/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index 57dfb90e3fd..a152ca26ff1 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.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; } @@ -37,41 +36,41 @@ $langs->load("orders"); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>"> - <td><?php echo $langs->trans("SupplierOrder"); ?></td> - <td><a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowOrder"), "order").' '.$objectlink->ref; ?></a></td> - <td class="left"><?php echo $objectlink->ref_supplier; ?></td> - <td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td> - <td class="right"><?php + <tr class="<?php echo $trclass; ?>"> + <td><?php echo $langs->trans("SupplierOrder"); ?></td> + <td><a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowOrder"), "order").' '.$objectlink->ref; ?></a></td> + <td class="left"><?php echo $objectlink->ref_supplier; ?></td> + <td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td> + <td class="right"><?php if ($user->rights->fournisseur->commande->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?></td> - <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> - </tr> + <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> + </tr> <?php } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> - <td><?php echo $langs->trans("Total"); ?></td> - <td></td> - <td class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php + <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> + <td><?php echo $langs->trans("Total"); ?></td> + <td></td> + <td class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php } print "<!-- END PHP TEMPLATE -->\n"; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 781fd4b6e9a..82c8df6ac66 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -35,8 +35,7 @@ $langs->load("companies"); llxHeader(); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -45,12 +44,18 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "p.name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "p.name"; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -59,14 +64,20 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; */ $sql = "SELECT s.rowid as socid, s.nom as name, st.libelle as stcomm, p.rowid as cidp, p.lastname, p.firstname, p.email, p.phone"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user "; +} $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."socpeople as p, ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.fournisseur = 1"; $sql .= " AND s.rowid = p.fk_soc"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} if (dol_strlen($stcomm)) { $sql .= " AND s.fk_stcomm=$stcomm"; @@ -90,8 +101,7 @@ $sql .= " ORDER BY $sortfield $sortorder "; $sql .= $db->plimit($limit, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); @@ -107,8 +117,7 @@ if ($result) print "</tr>\n"; $i = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); print '<tr class="oddeven">'; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 80491d5edfe..e59e4583e72 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -8,8 +8,8 @@ * Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es> * * This program is free software; you can redistribute it and/or modify @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; if (!empty($conf->product->enabled)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -54,11 +55,15 @@ if (!empty($conf->projet->enabled)) { if (!empty($conf->variants->enabled)) { require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; } -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} $langs->loadLangs(array('bills', 'compta', 'suppliers', 'companies', 'products', 'banks', 'admin')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} $id = (GETPOST('facid', 'int') ? GETPOST('facid', 'int') : GETPOST('id', 'int')); $socid = GETPOST('socid', 'int'); @@ -86,34 +91,39 @@ $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); // Load object -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret < 0) dol_print_error($db, $object->error); + if ($ret < 0) { + dol_print_error($db, $object->error); + } $ret = $object->fetch_thirdparty(); - if ($ret < 0) dol_print_error($db, $object->error); + if ($ret < 0) { + dol_print_error($db, $object->error); + } } // Security check $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +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); // Common permissions -$usercanread = $user->rights->fournisseur->facture->lire; -$usercancreate = $user->rights->fournisseur->facture->creer; -$usercandelete = $user->rights->fournisseur->facture->supprimer; +$usercanread = ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire); +$usercancreate = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); +$usercandelete = ($user->rights->fournisseur->facture->supprimer || $user->rights->supplier_invoice->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_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 +$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 +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $error = 0; @@ -124,14 +134,13 @@ $error = 0; $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 ($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; } @@ -145,24 +154,23 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Link invoice to order - if (GETPOST('linkedOrder') && empty($cancel) && $id > 0) - { + if (GETPOST('linkedOrder') && empty($cancel) && $id > 0) { $object->fetch($id); $object->fetch_thirdparty(); $result = $object->add_object_linked('order_supplier', GETPOST('linkedOrder')); } // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd) - { + 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. - if (GETPOST('newsupplierref', 'alphanohtml')) $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml'); + 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) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; } else { @@ -170,15 +178,14 @@ if (empty($reshook)) setEventMessages($objectutil->error, $objectutil->errors, 'errors'); $action = ''; } - } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { + } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse'); $object->fetch($id); $object->fetch_thirdparty(); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); @@ -187,8 +194,7 @@ if (empty($reshook)) // 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) - { + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; @@ -201,12 +207,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } else { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -215,7 +224,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } } } @@ -225,25 +236,19 @@ if (empty($reshook)) $isErasable = $object->is_erasable(); - if (($usercandelete && $isErasable > 0) || ($usercancreate && $isErasable == 1)) - { + if (($usercandelete && $isErasable > 0) || ($usercancreate && $isErasable == 1)) { $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header('Location: list.php?restore_lastsearch_values=1'); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Remove a product line - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { + // Remove a product line $result = $object->deleteline($lineid); - if ($result > 0) - { + if ($result > 0) { // Define output language /*$outputlangs = $langs; $newlang = ''; @@ -267,20 +272,43 @@ if (empty($reshook)) /* Fix bug 1485 : Reset action to avoid asking again confirmation on failure */ $action = ''; } - } - - // Delete link of credit note to invoice - elseif ($action == 'unlinkdiscount' && $usercancreate) - { + } elseif ($action == 'unlinkdiscount' && $usercancreate) { + // Delete link of credit note to invoice $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); $discount->unlink_invoice(); } elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); - $result = $object->set_paid($user); + $result = $object->setPaid($user); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } + } elseif ($action == 'confirm_paid_partially' && $confirm == 'yes') { + // Classif "paid partialy" + $object->fetch($id); + $close_code = GETPOST("close_code", 'restricthtml'); + $close_note = GETPOST("close_note", 'restricthtml'); + if ($close_code) { + $result = $object->setPaid($user, $close_code, $close_note); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); + } + } elseif ($action == 'confirm_canceled' && $confirm == 'yes') { + // Classify "abandoned" + $object->fetch($id); + $close_code = GETPOST("close_code", 'restricthtml'); + $close_note = GETPOST("close_note", 'restricthtml'); + if ($close_code) { + $result = $object->setCanceled($user, $close_code, $close_note); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); + } } // Set supplier ref @@ -331,8 +359,12 @@ if (empty($reshook)) if (!$error) { $old_date_echeance = $object->date_echeance; $new_date_echeance = $object->calculate_date_lim_reglement(); - if ($new_date_echeance > $old_date_echeance) $object->date_echeance = $new_date_echeance; - if ($object->date_echeance < $object->date) $object->date_echeance = $object->date; + if ($new_date_echeance > $old_date_echeance) { + $object->date_echeance = $new_date_echeance; + } + if ($object->date_echeance < $object->date) { + $object->date_echeance = $object->date; + } $result = $object->update($user); if ($result < 0) { $error++; @@ -345,90 +377,77 @@ if (empty($reshook)) } else { $db->commit(); } - } - - // Set incoterm - elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) - { + } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { + // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); - } - - // payment mode - elseif ($action == 'setmode' && $usercancreate) - { + } elseif ($action == 'setmode' && $usercancreate) { + // payment mode $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - - // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $usercancreate) { + } elseif ($action == 'setmulticurrencycode' && $usercancreate) { + // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha')), GETPOST('calculation_mode', 'int')); - } - - // bank account - elseif ($action == 'setbankaccount' && $usercancreate) { + } elseif ($action == 'setbankaccount' && $usercancreate) { + // bank account $result = $object->setBankAccount(GETPOST('fk_account', 'int')); } - // transport mode - if ($action == 'settransportmode' && $user->rights->fournisseur->facture->creer) - { - $result = $object->setTransportMode(GETPOST('transport_mode_id', 'int')); - } - // Set label - elseif ($action == 'setlabel' && $usercancreate) - { + if ($action == 'settransportmode' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { + // transport mode + $result = $object->setTransportMode(GETPOST('transport_mode_id', 'int')); + } elseif ($action == 'setlabel' && $usercancreate) { + // Set label $object->fetch($id); $object->label = GETPOST('label'); $result = $object->update($user); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } } 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))) - { - if (empty($conf->global->INVOICE_MAX_OFFSET_IN_FUTURE)) setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings'); - else setEventMessages($langs->trans("WarningInvoiceDateTooFarInFuture"), null, 'warnings'); + if ($newdate > (dol_now() + (empty($conf->global->INVOICE_MAX_OFFSET_IN_FUTURE) ? 0 : $conf->global->INVOICE_MAX_OFFSET_IN_FUTURE))) { + if (empty($conf->global->INVOICE_MAX_OFFSET_IN_FUTURE)) { + setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings'); + } else { + setEventMessages($langs->trans("WarningInvoiceDateTooFarInFuture"), null, 'warnings'); + } } $object->fetch($id); $object->date = $newdate; $date_echence_calc = $object->calculate_date_lim_reglement(); - if (!empty($object->date_echeance) && $object->date_echeance < $date_echence_calc) - { + if (!empty($object->date_echeance) && $object->date_echeance < $date_echence_calc) { $object->date_echeance = $date_echence_calc; } - if ($object->date_echeance && $object->date_echeance < $object->date) - { + if ($object->date_echeance && $object->date_echeance < $object->date) { $object->date_echeance = $object->date; } $result = $object->update($user); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } } 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) - { + if (!empty($object->date_echeance) && $object->date_echeance < $object->date) { $object->date_echeance = $object->date; setEventMessages($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), null, 'warnings'); } $result = $object->update($user); - if ($result < 0) dol_print_error($db, $object->error); - } elseif ($action == "setabsolutediscount" && $usercancreate) - { - // POST[remise_id] or POST[remise_id_for_payment] - + if ($result < 0) { + dol_print_error($db, $object->error); + } + } elseif ($action == "setabsolutediscount" && $usercancreate) { // We use the credit to reduce amount of invoice - if (!empty($_POST["remise_id"])) { + if (GETPOST("remise_id", "int")) { $ret = $object->fetch($id); if ($ret > 0) { - $result = $object->insert_discount($_POST["remise_id"]); + $result = $object->insert_discount(GETPOST("remise_id", "int")); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -437,23 +456,20 @@ if (empty($reshook)) } } // We use the credit to reduce remain to pay - if (!empty($_POST["remise_id_for_payment"])) - { + if (GETPOST("remise_id_for_payment", "int")) { require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discount = new DiscountAbsolute($db); - $discount->fetch($_POST["remise_id_for_payment"]); + $discount->fetch(GETPOST("remise_id_for_payment", "int")); //var_dump($object->getRemainToPay(0)); //var_dump($discount->amount_ttc);exit; - if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0))) - { + if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0))) { // TODO Split the discount in 2 automatically $error++; setEventMessages($langs->trans("ErrorDiscountLargerThanRemainToPaySplitItBefore"), null, 'errors'); } - if (!$error) - { + if (!$error) { $result = $discount->link_to_invoice(0, $id); if ($result < 0) { setEventMessages($discount->error, $discount->errors, 'errors'); @@ -461,12 +477,15 @@ if (empty($reshook)) } } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -474,12 +493,12 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } - } - // Convertir en reduc - elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { + // Convertir en reduc $object->fetch($id); $object->fetch_thirdparty(); //$object->fetch_lines(); // Already done into fetch @@ -489,10 +508,13 @@ if (empty($reshook)) $result = $discountcheck->fetch(0, 0, $object->id); $canconvert = 0; - if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) $canconvert = 1; // we can convert deposit into discount if deposit is paid (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc) - if (($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_STANDARD) && $object->paye == 0 && empty($discountcheck->id)) $canconvert = 1; // we can convert credit note into discount if credit note is not refunded completely and not already converted and amount of payment is 0 (see also the real condition used as the condition to show button converttoreduc) - if ($canconvert) - { + if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) { + $canconvert = 1; // we can convert deposit into discount if deposit is paid (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc) + } + if (($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_STANDARD) && $object->paye == 0 && empty($discountcheck->id)) { + $canconvert = 1; // we can convert credit note into discount if credit note is not refunded completely and not already converted and amount of payment is 0 (see also the real condition used as the condition to show button converttoreduc) + } + if ($canconvert) { $db->begin(); $amount_ht = $amount_tva = $amount_ttc = array(); @@ -500,13 +522,16 @@ if (empty($reshook)) // Loop on each vat rate $i = 0; - foreach ($object->lines as $line) - { - if ($line->product_type < 9 && $line->total_ht != 0) // Remove lines with product_type greater than or equal to 9 - { // no need to create discount if amount is null + foreach ($object->lines as $line) { + if ($line->product_type < 9 && $line->total_ht != 0) { // Remove lines with product_type greater than or equal to 9 and no need to create discount if amount is null + $keyforvatrate = $line->tva_tx.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''); + $amount_ht[$line->tva_tx] += $line->total_ht; $amount_tva[$line->tva_tx] += $line->total_tva; $amount_ttc[$line->tva_tx] += $line->total_ttc; + $multicurrency_amount_ht[$keyforvatrate] += $line->multicurrency_total_ht; + $multicurrency_amount_tva[$keyforvatrate] += $line->multicurrency_total_tva; + $multicurrency_amount_ttc[$keyforvatrate] += $line->multicurrency_total_ttc; $i++; } } @@ -520,6 +545,9 @@ if (empty($reshook)) $amount_ht[$vatrate] = price2num($amount_ht[$vatrate] * $ratio, 'MU'); $amount_tva[$vatrate] = price2num($amount_tva[$vatrate] * $ratio, 'MU'); $amount_ttc[$vatrate] = price2num($amount_ttc[$vatrate] * $ratio, 'MU'); + $multicurrency_amount_ht[$vatrate] = price2num($multicurrency_amount_ht[$vatrate] * $ratio, 'MU'); + $multicurrency_amount_tva[$vatrate] = price2num($multicurrency_amount_tva[$vatrate] * $ratio, 'MU'); + $multicurrency_amount_ttc[$vatrate] = price2num($multicurrency_amount_ttc[$vatrate] * $ratio, 'MU'); } } } @@ -527,13 +555,13 @@ if (empty($reshook)) // Insert one discount by VAT rate category $discount = new DiscountAbsolute($db); - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { $discount->description = '(CREDIT_NOTE)'; - elseif ($object->type == FactureFournisseur::TYPE_DEPOSIT) + } elseif ($object->type == FactureFournisseur::TYPE_DEPOSIT) { $discount->description = '(DEPOSIT)'; - elseif ($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT || $object->type == FactureFournisseur::TYPE_SITUATION) + } elseif ($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT || $object->type == FactureFournisseur::TYPE_SITUATION) { $discount->description = '(EXCESS PAID)'; - else { + } else { setEventMessages($langs->trans('CantConvertToReducAnInvoiceOfThisType'), null, 'errors'); } $discount->discount_type = 1; // Supplier discount @@ -542,8 +570,7 @@ if (empty($reshook)) $error = 0; - if ($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT || $object->type == FactureFournisseur::TYPE_SITUATION) - { + if ($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT || $object->type == FactureFournisseur::TYPE_SITUATION) { // If we're on a standard invoice, we have to get excess paid to create a discount in TTC without VAT // Total payments @@ -555,7 +582,9 @@ if (empty($reshook)) $sql .= ' AND p.entity IN ('.getEntity('invoice').')'; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $res = $db->fetch_object($resql); $total_paiements = $res->total_paiements; @@ -571,43 +600,53 @@ if (empty($reshook)) while ($obj = $db->fetch_object($resql)) { $total_creditnote_and_deposit += $obj->amount_ttc; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc; $discount->amount_tva = 0; $discount->tva_tx = 0; + $discount->vat_src_code = ''; $result = $discount->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) - { - foreach ($amount_ht as $tva_tx => $xxx) - { + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) { + foreach ($amount_ht as $tva_tx => $xxx) { $discount->amount_ht = abs($amount_ht[$tva_tx]); $discount->amount_tva = abs($amount_tva[$tva_tx]); $discount->amount_ttc = abs($amount_ttc[$tva_tx]); + $discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]); + $discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]); + $discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]); + + // Clean vat code + $reg = array(); + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $tva_tx, $reg)) { + $vat_src_code = $reg[1]; + $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx); // Remove code into vatrate. + } + $discount->tva_tx = abs($tva_tx); + $discount->vat_src_code = $vat_src_code; $result = $discount->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; break; } } } - if (empty($error)) - { + if (empty($error)) { if ($object->type != FactureFournisseur::TYPE_DEPOSIT) { // Classe facture - $result = $object->set_paid($user); - if ($result >= 0) - { + $result = $object->setPaid($user); + if ($result >= 0) { $db->commit(); } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -621,15 +660,10 @@ if (empty($reshook)) $db->rollback(); } } - } - - - // Delete payment - elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) - { - $object->fetch($id); - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) - { + } elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) { + // Delete payment + $object->fetch($id); + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) { $paiementfourn = new PaiementFourn($db); $result = $paiementfourn->fetch(GETPOST('paiement_id')); if ($result > 0) { @@ -640,12 +674,11 @@ if (empty($reshook)) setEventMessages($paiementfourn->error, $paiementfourn->errors, 'errors'); } } - } - - // Create - elseif ($action == 'add' && $usercancreate) - { - if ($socid > 0) $object->socid = GETPOST('socid', 'int'); + } elseif ($action == 'add' && $usercancreate) { + // Insert new invoice in database + if ($socid > 0) { + $object->socid = GETPOST('socid', 'int'); + } $db->begin(); @@ -653,21 +686,26 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $datedue = dol_mktime(12, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int')); // Replacement invoice - if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) - { - if ($datefacture == '') - { + if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT) { + if (empty($dateinvoice)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; $error++; + } elseif ($dateinvoice > (dol_get_last_hour(dol_now()) + (empty($conf->global->INVOICE_MAX_FUTURE_DELAY) ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + $error++; + setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); + $action = 'create'; } + if (!(GETPOST('fac_replacement', 'int') > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors'); @@ -682,7 +720,7 @@ if (empty($reshook)) $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); $object->socid = GETPOST('socid', 'int'); $object->libelle = GETPOST('label', 'nohtml'); - $object->date = $datefacture; + $object->date = $dateinvoice; $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'restricthtml'); $object->note_private = GETPOST('note_private', 'restricthtml'); @@ -709,37 +747,37 @@ if (empty($reshook)) } // Credit note invoice - if (GETPOST('type') == FactureFournisseur::TYPE_CREDIT_NOTE) - { + if (GETPOST('type') == FactureFournisseur::TYPE_CREDIT_NOTE) { $sourceinvoice = GETPOST('fac_avoir', 'int'); - if (!($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) - { + if (!($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), null, 'errors'); } - if (GETPOST('socid', 'int') < 1) - { + if (GETPOST('socid', 'int') < 1) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); $action = 'create'; $error++; } - if ($datefacture == '') - { + + if (empty($dateinvoice)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; $error++; + } elseif ($dateinvoice > (dol_get_last_hour(dol_now()) + (empty($conf->global->INVOICE_MAX_FUTURE_DELAY) ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + $error++; + setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); + $action = 'create'; } - if (!GETPOST('ref_supplier')) - { + + if (!GETPOST('ref_supplier')) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('RefSupplier')), null, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; $error++; } - if (!$error) - { + if (!$error) { $tmpproject = GETPOST('projectid', 'int'); // Creation facture @@ -748,7 +786,7 @@ if (empty($reshook)) $object->socid = GETPOST('socid', 'int'); $object->libelle = GETPOST('label', 'nohtml'); $object->label = GETPOST('label', 'nohtml'); - $object->date = $datefacture; + $object->date = $dateinvoice; $object->date_echeance = $datedue; $object->note_public = GETPOST('note_public', 'restricthtml'); $object->note_private = GETPOST('note_private', 'restricthtml'); @@ -772,15 +810,12 @@ if (empty($reshook)) $error++; } - if (GETPOST('invoiceAvoirWithLines', 'int') == 1 && $id > 0) - { + if (GETPOST('invoiceAvoirWithLines', 'int') == 1 && $id > 0) { $facture_source = new FactureFournisseur($db); // fetch origin object - if ($facture_source->fetch($object->fk_facture_source) > 0) - { + if ($facture_source->fetch($object->fk_facture_source) > 0) { $fk_parent_line = 0; - foreach ($facture_source->lines as $line) - { + foreach ($facture_source->lines as $line) { // 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) { $fk_parent_line = 0; @@ -811,11 +846,9 @@ if (empty($reshook)) } } - if (GETPOST('invoiceAvoirWithPaymentRestAmount', 'int') == 1 && $id > 0) - { + if (GETPOST('invoiceAvoirWithPaymentRestAmount', 'int') == 1 && $id > 0) { $facture_source = new FactureFournisseur($db); // fetch origin object if not previously defined - if ($facture_source->fetch($object->fk_facture_source) > 0) - { + if ($facture_source->fetch($object->fk_facture_source) > 0) { $totalpaye = $facture_source->getSommePaiement(); $totalcreditnotes = $facture_source->getSumCreditNotesUsed(); $totaldeposits = $facture_source->getSumDepositsUsed(); @@ -827,62 +860,66 @@ if (empty($reshook)) } } - // Standard or deposit - if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) - { - if (GETPOST('socid', 'int') < 1) - { + // Standard invoice or Deposit invoice, created from a Predefined template invoice + if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) { + if (GETPOST('socid', 'int') < 1) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); $action = 'create'; $error++; } - if ($datefacture == '') - { + if (empty($dateinvoice)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; $error++; + } elseif ($dateinvoice > (dol_get_last_hour(dol_now()) + (empty($conf->global->INVOICE_MAX_FUTURE_DELAY) ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { + $error++; + setEventMessages($langs->trans("ErrorDateIsInFuture"), null, 'errors'); + $action = 'create'; } - if (!GETPOST('ref_supplier')) - { + + if (!GETPOST('ref_supplier')) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('RefSupplier')), null, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; $error++; } - if (!$error) - { + if (!$error) { $tmpproject = GETPOST('projectid', 'int'); - // Creation facture - $object->ref = GETPOST('ref', 'nohtml'); - $object->ref_supplier = GETPOST('ref_supplier', 'nohtml'); - $object->socid = GETPOST('socid', 'int'); - $object->libelle = GETPOST('label', 'nohtml'); - $object->date = $datefacture; - $object->date_echeance = $datedue; - $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'); - $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; - $object->fk_incoterms = GETPOST('incoterm_id', 'int'); - $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); - $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); - $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); - $object->transport_mode_id = GETPOST('transport_mode_id'); + // Creation invoice + $object->socid = GETPOST('socid', 'int'); + $object->type = GETPOST('type'); + $object->ref = GETPOST('ref', 'nohtml'); + $object->ref_supplier = GETPOST('ref_supplier', 'nohtml'); + $object->socid = GETPOST('socid', 'int'); + $object->libelle = GETPOST('label', 'nohtml'); // deprecated + $object->label = GETPOST('label', 'nohtml'); + $object->date = $dateinvoice; + $object->date_echeance = $datedue; + $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'); + $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; + $object->fk_incoterms = GETPOST('incoterm_id', 'int'); + $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + $object->transport_mode_id = GETPOST('transport_mode_id'); // Auto calculation of date due if not filled by user - if (empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement(); + if (empty($object->date_echeance)) { + $object->date_echeance = $object->calculate_date_lim_reglement(); + } $object->fetch_thirdparty(); // If creation from another object of another module - if (!$error && GETPOST('origin', 'alpha') && GETPOST('originid')) - { + if (!$error && GETPOST('origin', 'alpha') && GETPOST('originid')) { // Parse element/subelement (ex: project_task) $element = $subelement = GETPOST('origin', 'alpha'); /*if (preg_match('/^([^_]+)_([^_]+)/i',$_POST['origin'],$regs)) @@ -904,8 +941,7 @@ if (empty($reshook)) if ($element == 'order_supplier') { $element = 'fourn'; $subelement = 'fournisseur.commande'; } - if ($element == 'project') - { + if ($element == 'project') { $element = 'projet'; } $object->origin = GETPOST('origin', 'alpha'); @@ -914,25 +950,23 @@ if (empty($reshook)) require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'; $classname = ucfirst($subelement); - if ($classname == 'Fournisseur.commande') $classname = 'CommandeFournisseur'; + if ($classname == 'Fournisseur.commande') { + $classname = 'CommandeFournisseur'; + } $objectsrc = new $classname($db); $objectsrc->fetch($originid); $objectsrc->fetch_thirdparty(); - if (!empty($object->origin) && !empty($object->origin_id)) - { + if (!empty($object->origin) && !empty($object->origin_id)) { $object->linkedObjectsIds[$object->origin] = $object->origin_id; } // Add also link with order if object is reception - if ($object->origin == 'reception') - { + if ($object->origin == 'reception') { $objectsrc->fetchObjectLinked(); - if (count($objectsrc->linkedObjectsIds['order_supplier']) > 0) - { - foreach ($objectsrc->linkedObjectsIds['order_supplier'] as $key => $value) - { + if (count($objectsrc->linkedObjectsIds['order_supplier']) > 0) { + foreach ($objectsrc->linkedObjectsIds['order_supplier'] as $key => $value) { $object->linkedObjectsIds['order_supplier'] = $value; } } @@ -941,26 +975,141 @@ if (empty($reshook)) $id = $object->create($user); // Add lines - if ($id > 0) - { + if ($id > 0) { require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'; $classname = ucfirst($subelement); - if ($classname == 'Fournisseur.commande') $classname = 'CommandeFournisseur'; + if ($classname == 'Fournisseur.commande') { + $classname = 'CommandeFournisseur'; + } $srcobject = new $classname($db); $result = $srcobject->fetch(GETPOST('originid', 'int')); - if ($result > 0) - { + + // If deposit invoice - down payment with 1 line (fixed amount or percent) + if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) { + // Define the array $amountdeposit + $amountdeposit = array(); + if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA)) { + if ($typeamount == 'amount') { + $amount = $valuedeposit; + } else { + $amount = $srcobject->total_ttc * ($valuedeposit / 100); + } + + $TTotalByTva = array(); + foreach ($srcobject->lines as &$line) { + if (!empty($line->special_code)) { + continue; + } + $TTotalByTva[$line->tva_tx] += $line->total_ttc; + } + + foreach ($TTotalByTva as $tva => &$total) { + $coef = $total / $srcobject->total_ttc; // Calc coef + $am = $amount * $coef; + $amount_ttc_diff += $am; + $amountdeposit[$tva] += $am / (1 + $tva / 100); // Convert into HT for the addline + } + } else { + if ($typeamount == 'amount') { + $amountdeposit[0] = $valuedeposit; + } elseif ($typeamount == 'variable') { + if ($result > 0) { + $totalamount = 0; + $lines = $srcobject->lines; + $numlines = count($lines); + for ($i = 0; $i < $numlines; $i++) { + $qualified = 1; + if (empty($lines[$i]->qty)) { + $qualified = 0; // We discard qty=0, it is an option + } + if (!empty($lines[$i]->special_code)) { + $qualified = 0; // We discard special_code (frais port, ecotaxe, option, ...) + } + if ($qualified) { + $totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ? + $tva_tx = $lines[$i]->tva_tx; + $amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100; + } + } + + if ($totalamount == 0) { + $amountdeposit[0] = 0; + } + } else { + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + $error++; + } + } + + $amount_ttc_diff = $amountdeposit[0]; + } + + foreach ($amountdeposit as $tva => $amount) { + if (empty($amount)) { + continue; + } + + $arraylist = array( + 'amount' => 'FixAmount', + 'variable' => 'VarAmount' + ); + $descline = '(DEPOSIT)'; + //$descline.= ' - '.$langs->trans($arraylist[$typeamount]); + if ($typeamount == 'amount') { + $descline .= ' ('.price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')'; + } elseif ($typeamount == 'variable') { + $descline .= ' ('.$valuedeposit.'%)'; + } + + $descline .= ' - '.$srcobject->ref; + $result = $object->addline( + $descline, + $amount, // subprice + $tva, // vat rate + 0, // localtax1_tx + 0, // localtax2_tx + 1, // quantity + (empty($conf->global->INVOICE_PRODUCTID_DEPOSIT) ? 0 : $conf->global->INVOICE_PRODUCTID_DEPOSIT), // fk_product + 0, // remise_percent + 0, // date_start + 0, // date_end + 0, + $lines[$i]->info_bits, // info_bits + 'HT', + 0, // product_type + 1, + 0, + 0, + 0, + null, + $object->origin, + 0, + '', + $lines[$i]->special_code, + 0 + //,$langs->trans('Deposit') //Deprecated + ); + } + + $diff = $object->total_ttc - $amount_ttc_diff; + + if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0) { + $object->fetch_lines(); + $subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100); + $object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100); + } + } + + if ($result > 0) { $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } $num = count($lines); - for ($i = 0; $i < $num; $i++) // TODO handle subprice < 0 - { + for ($i = 0; $i < $num; $i++) { // TODO handle subprice < 0 $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); @@ -972,18 +1121,25 @@ if (empty($reshook)) // 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; + 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; + if ($lines[$i]->date_fin_reel) { + $date_end = $lines[$i]->date_fin_reel; + } + if ($lines[$i]->date_end) { + $date_end = $lines[$i]->date_end; + } // FIXME Missing special_code into addline and updateline methods $object->special_code = $lines[$i]->special_code; // FIXME If currency different from main currency, take multicurrency price - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { $pu = 0; $pu_currency = $lines[$i]->multicurrency_subprice; } else { @@ -1017,8 +1173,7 @@ if (empty($reshook)) $lines[$i]->special_code ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -1032,19 +1187,16 @@ if (empty($reshook)) } else { $error++; } - } elseif (!$error) - { + } elseif (!$error) { $id = $object->create($user); - if ($id < 0) - { + if ($id < 0) { $error++; } } } } - if ($error) - { + if ($error) { $langs->load("errors"); $db->rollback(); @@ -1057,8 +1209,7 @@ if (empty($reshook)) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db, $object->error, $object->errors); exit; } @@ -1067,11 +1218,8 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - - // Edit line - elseif ($action == 'updateline' && $usercancreate) - { + } elseif ($action == 'updateline' && $usercancreate) { + // Edit line $db->begin(); $object->fetch($id); @@ -1087,13 +1235,10 @@ if (empty($reshook)) $price_base_type = 'TTC'; } - if (GETPOST('productid') > 0) - { + if (GETPOST('productid') > 0) { $productsupplier = new ProductFournisseur($db); - if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) - { - if (GETPOST('productid') > 0 && $productsupplier->get_buyprice(0, price2num(GETPOST('qty')), GETPOST('productid', 'int'), 'restricthtml', GETPOST('socid', 'int')) < 0) - { + if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) { + 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'); } } @@ -1101,12 +1246,14 @@ if (empty($reshook)) $prod = new Product($db); $prod->fetch(GETPOST('productid')); $label = $prod->description; - if (trim($_POST['product_desc']) != trim($label)) $label = $_POST['product_desc']; + if (trim(GETPOST('product_desc', 'restricthtml')) != trim($label)) { + $label = GETPOST('product_desc', 'restricthtml'); + } $type = $prod->type; } else { - $label = $_POST['product_desc']; - $type = $_POST["type"] ? $_POST["type"] : 0; + $label = GETPOST('product_desc', 'restricthtml'); + $type = GETPOST("type") ? GETPOST("type") : 0; } $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); @@ -1114,16 +1261,17 @@ if (empty($reshook)) // Define info_bits $info_bits = 0; - if (preg_match('/\*/', $tva_tx)) + 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); - $remise_percent = GETPOST('remise_percent'); - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $remise_percent = price2num(GETPOST('remise_percent'), 2); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'CU'); // Extrafields Lines $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -1135,9 +1283,8 @@ 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) - { + $result = $object->updateline(GETPOST('lineid', 'int'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, price2num(GETPOST('qty'), 'MS'), GETPOST('productid', 'int'), $price_base_type, $info_bits, $type, $remise_percent, 0, $date_start, $date_end, $array_options, GETPOST('units'), $pu_ht_devise, GETPOST('fourn_ref', 'alpha')); + if ($result >= 0) { unset($_POST['label']); unset($_POST['fourn_ref']); unset($_POST['date_starthour']); @@ -1162,8 +1309,7 @@ if (empty($reshook)) $db->begin(); $ret = $object->fetch($id); - if ($ret < 0) - { + if ($ret < 0) { dol_print_error($db, $object->error); exit; } @@ -1179,8 +1325,7 @@ if (empty($reshook)) $date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $prod_entry_mode = GETPOST('prod_entry_mode'); - if ($prod_entry_mode == 'free') - { + if ($prod_entry_mode == 'free') { $idprod = 0; $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); @@ -1191,7 +1336,7 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = GETPOST('remise_percent'.$predef); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields @@ -1205,28 +1350,23 @@ if (empty($reshook)) } } - if ($prod_entry_mode == 'free' && GETPOST('price_ht') < 0 && $qty < 0) - { + if ($prod_entry_mode == 'free' && GETPOST('price_ht') < 0 && $qty < 0) { setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPrice'), $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && !GETPOST('idprodfournprice') && GETPOST('type') < 0) - { + if ($prod_entry_mode == 'free' && !GETPOST('idprodfournprice') && GETPOST('type') < 0) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') // Unit price can be 0 but not '' - { + if ($prod_entry_mode == 'free' && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') { // Unit price can be 0 but not '' setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('UnitPrice')), null, 'errors'); $error++; } - if ($prod_entry_mode == 'free' && !GETPOST('dp_desc')) - { + if ($prod_entry_mode == 'free' && !GETPOST('dp_desc')) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error++; } - if (!GETPOST('qty')) - { + if (!GETPOST('qty')) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } @@ -1245,50 +1385,57 @@ if (empty($reshook)) } } - if ($prod_entry_mode != 'free' && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' - { + if ($prod_entry_mode != 'free' && empty($error)) { // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' $productsupplier = new ProductFournisseur($db); $idprod = 0; - if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') { + $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + } $reg = array(); - if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) - { + if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) { $idprod = $reg[1]; $res = $productsupplier->fetch($idprod); // Load product from its id // Call to init some price properties of $productsupplier // So if a supplier price already exists for another thirdparty (first one found), we use it as reference price - if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) - { + if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) { $fksoctosearch = 0; $productsupplier->get_buyprice(0, -1, $idprod, 'none', $fksoctosearch); // We force qty to -1 to be sure to find if a supplier price exist - if ($productsupplier->fourn_socid != $socid) // The price we found is for another supplier, so we clear supplier price - { + if ($productsupplier->fourn_socid != $socid) { // The price we found is for another supplier, so we clear supplier price $productsupplier->ref_supplier = ''; } } 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 $idprod = $productsupplier->get_buyprice(GETPOST('idprodfournprice', 'alpha'), $qtytosearch); $res = $productsupplier->fetch($idprod); } - if ($idprod > 0) - { + if ($idprod > 0) { $label = $productsupplier->label; // if we use supplier description of the products if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) { $desc = $productsupplier->desc_supplier; - } else $desc = $productsupplier->description; + } else { + $desc = $productsupplier->description; + } - if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time + if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { + $product_desc=''; + } + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { + $desc = $product_desc; + } + if (!empty($product_desc) && trim($product_desc) != trim($desc)) { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } $type = $productsupplier->type; if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') { @@ -1310,11 +1457,15 @@ if (empty($reshook)) $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); $tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr); - if (empty($pu)) $pu = 0; // If pu is '' or null, we force to have a numeric value + if (empty($pu)) { + $pu = 0; // If pu is '' or null, we force to have a numeric value + } $result = $object->addline( $desc, @@ -1341,22 +1492,19 @@ if (empty($reshook)) '' ); } - if ($idprod == -99 || $idprod == 0) - { + if ($idprod == -99 || $idprod == 0) { // Product not selected $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")), null, 'errors'); } - if ($idprod == -1) - { + if ($idprod == -1) { // Quantity too low $error++; $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); $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); @@ -1387,17 +1535,19 @@ if (empty($reshook)) } //print "xx".$tva_tx; exit; - if (!$error && $result > 0) - { + if (!$error && $result > 0) { $db->commit(); // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1406,7 +1556,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } unset($_POST ['prod_entry_mode']); @@ -1450,12 +1602,8 @@ if (empty($reshook)) } elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $result = $object->setProject($projectid); - } - - - // Set invoice to draft status - elseif ($action == 'confirm_edit' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_edit' && $confirm == 'yes' && $usercancreate) { + // Set invoice to draft status $object->fetch($id); $totalpaye = $object->getSommePaiement(); @@ -1464,29 +1612,24 @@ if (empty($reshook)) // We check that lines of invoices are exported in accountancy $ventilExportCompta = $object->getVentilExportCompta(); - if (!$ventilExportCompta) - { + if (!$ventilExportCompta) { // On verifie si aucun paiement n'a ete effectue - if ($resteapayer == price2num($object->total_ttc, 'MT', 1) && $object->statut == FactureFournisseur::STATUS_VALIDATED) - { + if ($resteapayer == price2num($object->total_ttc, 'MT', 1) && $object->statut == FactureFournisseur::STATUS_VALIDATED) { $idwarehouse = GETPOST('idwarehouse'); $object->fetch_thirdparty(); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + 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) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) { $langs->load("stocks"); - if (!$idwarehouse || $idwarehouse == -1) - { + if (!$idwarehouse || $idwarehouse == -1) { $error++; setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; @@ -1496,12 +1639,15 @@ if (empty($reshook)) $object->setDraft($user, $idwarehouse); // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -1510,24 +1656,21 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } $action = ''; } } - } - - // Set invoice to validated/unpaid status - elseif ($action == 'reopen' && $usercancreate) - { + } elseif ($action == 'reopen' && $usercancreate) { + // Set invoice to validated/unpaid status $result = $object->fetch($id); if ($object->statut == FactureFournisseur::STATUS_CLOSED - || ($object->statut == FactureFournisseur::STATUS_ABANDONED && $object->close_code != 'replaced')) - { - $result = $object->set_unpaid($user); - if ($result > 0) - { + || ($object->statut == FactureFournisseur::STATUS_ABANDONED && $object->close_code != 'replaced')) { + $result = $object->setUnpaid($user); + if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } else { @@ -1552,91 +1695,75 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Make calculation according to calculationrule - if ($action == 'calculate') - { + if ($action == 'calculate') { $calculationrule = GETPOST('calculationrule'); $object->fetch($id); $object->fetch_thirdparty(); $result = $object->update_price(0, (($calculationrule == 'totalofround') ? '0' : '1'), 0, $object->thirdparty); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db, $result); exit; } } - if ($action == 'update_extras') - { + if ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $object->insertExtraFields('BILL_SUPPLIER_MODIFY'); - if ($result < 0) - { + if ($result < 0) { $error++; } } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) - { - if ($action == 'addcontact') - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { + if ($action == 'addcontact') { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // bascule du statut d'un contact - elseif ($action == 'swapstatut') - { - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); + } elseif ($action == 'swapstatut') { + // bascule du statut d'un contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } - } - - // Efface un contact - elseif ($action == 'deletecontact') - { + } elseif ($action == 'deletecontact') { + // Efface un contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -1655,7 +1782,9 @@ $form = new Form($db); $formfile = new FormFile($db); $bankaccountstatic = new Account($db); $paymentstatic = new PaiementFourn($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $now = dol_now(); @@ -1664,8 +1793,7 @@ $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Mód llxHeader('', $title, $helpurl); // Mode creation -if ($action == 'create') -{ +if ($action == 'create') { $facturestatic = new FactureFournisseur($db); print load_fiche_titre($langs->trans('NewBill'), '', 'supplier_invoice'); @@ -1678,7 +1806,9 @@ if ($action == 'create') if (GETPOST('socid') > 0) { $societe = new Societe($db); $societe->fetch(GETPOST('socid', 'int')); - if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code; + if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) { + $currency_code = $societe->multicurrency_code; + } } if (!empty($origin) && !empty($originid)) { @@ -1706,7 +1836,9 @@ if ($action == 'create') require_once DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'; $classname = ucfirst($subelement); - if ($classname == 'Fournisseur.commande') $classname = 'CommandeFournisseur'; + if ($classname == 'Fournisseur.commande') { + $classname = 'CommandeFournisseur'; + } $objectsrc = new $classname($db); $objectsrc->fetch($originid); $objectsrc->fetch_thirdparty(); @@ -1723,10 +1855,13 @@ if ($action == 'create') $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : ''; $transport_mode_id = (!empty($objectsrc->transport_mode_id) ? $objectsrc->transport_mode_id : (!empty($soc->transport_mode_id) ? $soc->transport_mode_id : 0)); - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($objectsrc->multicurrency_code)) { + $currency_code = $objectsrc->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) { + $currency_tx = $objectsrc->multicurrency_tx; + } } $datetmp = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); @@ -1747,7 +1882,9 @@ if ($action == 'create') $datetmp = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); $datedue = ($datetmp == '' ?-1 : $datetmp); - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + 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 @@ -1766,10 +1903,14 @@ if ($action == 'create') print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($societe->id > 0) print '<input type="hidden" name="socid" value="'.$societe->id.'">'."\n"; + if ($societe->id > 0) { + print '<input type="hidden" name="socid" value="'.$societe->id.'">'."\n"; + } print '<input type="hidden" name="origin" value="'.$origin.'">'; print '<input type="hidden" name="originid" value="'.$originid.'">'; - if (!empty($currency_tx)) print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">'; + if (!empty($currency_tx)) { + print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">'; + } print dol_get_fiche_head(); @@ -1782,16 +1923,14 @@ if ($action == 'create') print '<tr><td class="fieldrequired">'.$langs->trans('Supplier').'</td>'; print '<td>'; - if ($societe->id > 0) - { + if ($societe->id > 0) { $absolute_discount = $societe->getAvailableDiscounts('', '', 0, 1); print $societe->getNomUrl(1); print '<input type="hidden" name="socid" value="'.$societe->id.'">'; } else { print img_picto('', 'company').$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)) - { + if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) { print '<script type="text/javascript"> $(document).ready(function() { $("#socid").change(function() { @@ -1808,7 +1947,9 @@ if ($action == 'create') // Ref supplier print '<tr><td class="fieldrequired">'.$langs->trans('RefSupplier').'</td><td><input name="ref_supplier" value="'.(isset($_POST['ref_supplier']) ? $_POST['ref_supplier'] : $objectsrc->ref_supplier).'" type="text"'; - if ($societe->id > 0) print ' autofocus'; + if ($societe->id > 0) { + print ' autofocus'; + } print '></td>'; print '</tr>'; @@ -1823,40 +1964,64 @@ if ($action == 'create') print $desc; print '</div></div>'; - /* Not yet supported - if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid)))) - { - // Deposit - if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) - { + if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid)))) { + // Deposit - Down payment + if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) { print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; $tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> '; print '<script type="text/javascript" language="javascript"> jQuery(document).ready(function() { - jQuery("#typedeposit, #valuedeposit").click(function() { + jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() { + jQuery("#radio_standard").prop("checked", true); + }); + jQuery("#typedeposit, #valuedeposit").click(function() { + jQuery("#radio_deposit").prop("checked", true); + }); + jQuery("#typedeposit").change(function() { + console.log("We change type of down payment"); jQuery("#radio_deposit").prop("checked", true); + setRadioForTypeOfInvoice(); }); - }); - </script>'; + jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_template").change(function() { + setRadioForTypeOfInvoice(); + }); + function setRadioForTypeOfInvoice() { + console.log("Change radio"); + if (jQuery("#radio_deposit").prop("checked") && (jQuery("#typedeposit").val() == \'amount\' || jQuery("#typedeposit").val() == \'variable\')) { + jQuery(".checkforselect").prop("disabled", true); + jQuery(".checkforselect").prop("checked", false); + } else { + jQuery(".checkforselect").prop("disabled", false); + jQuery(".checkforselect").prop("checked", true); + } + }; + }); + </script>'; - $desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); - print '<table class="nobordernopadding"><tr><td>'; + $tmp = $tmp.'<label for="radio_deposit" >'.$langs->trans("InvoiceDeposit").'</label>'; + $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); + print '<table class="nobordernopadding"><tr>'; + print '<td>'; print $desc; print '</td>'; - if (($origin == 'propal') || ($origin == 'commande')) - { - print '<td class="nowrap" style="padding-left: 5px">'; - $arraylist = array('amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit'))); - print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); + if (($origin == 'propal') || ($origin == 'commande')) { + print '<td class="nowrap" style="padding-left: 15px">'; + $arraylist = array( + 'amount' => $langs->transnoentitiesnoconv('FixAmount', $langs->transnoentitiesnoconv('Deposit')), + 'variable' => $langs->transnoentitiesnoconv('VarAmountOneLine', $langs->transnoentitiesnoconv('Deposit')), + 'variablealllines' => $langs->transnoentitiesnoconv('VarAmountAllLines') + ); + print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit', 'aZ09'), 0, 0, 0, '', 1); + print '</td>'; + print '<td class="nowrap" style="padding-left: 5px">'; + print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="' . GETPOST('valuedeposit', 'int') . '"/>'; print '</td>'; - print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>'; } - print '</td></tr></table>'; + print '</tr></table>'; print '</div></div>'; } } - */ /* Not yet supported for supplier if ($societe->id > 0) @@ -1922,24 +2087,19 @@ if ($action == 'create') } */ - if (empty($origin)) - { - if ($societe->id > 0) - { + if (empty($origin)) { + if ($societe->id > 0) { // Credit note - if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE)) - { + if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE)) { // Show link for credit note $facids = $facturestatic->list_qualified_avoir_supplier_invoices($societe->id); - if ($facids < 0) - { + if ($facids < 0) { dol_print_error($db, $facturestatic); exit; } $optionsav = ""; $newinvoice_static = new FactureFournisseur($db); - foreach ($facids as $key => $valarray) - { + foreach ($facids as $key => $valarray) { $newinvoice_static->id = $key; $newinvoice_static->ref = $valarray ['ref']; $newinvoice_static->statut = $valarray ['status']; @@ -1947,8 +2107,9 @@ if ($action == 'create') $newinvoice_static->paye = $valarray ['paye']; $optionsav .= '<option value="'.$key.'"'; - if ($key == GETPOST('fac_avoir', 'int')) + if ($key == GETPOST('fac_avoir', 'int')) { $optionsav .= ' selected'; + } $optionsav .= '>'; $optionsav .= $newinvoice_static->ref; $optionsav .= ' ('.$newinvoice_static->getLibStatut(1, $valarray ['paymentornot']).')'; @@ -1957,7 +2118,9 @@ if ($action == 'create') print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; $tmp = '<input type="radio" id="radio_creditnote" name="type" value="2"'.(GETPOST('type') == 2 ? ' checked' : ''); - if (!$optionsav) $tmp .= ' disabled'; + if (!$optionsav) { + $tmp .= ' disabled'; + } $tmp .= '> '; // Show credit note options only if we checked credit note print '<script type="text/javascript" language="javascript"> @@ -1977,8 +2140,9 @@ if ($action == 'create') $text = $tmp.$langs->transnoentities("InvoiceAvoirAsk").' '; // $text.='<input type="text" value="">'; $text .= '<select class="flat valignmiddle" name="fac_avoir" id="fac_avoir"'; - if (!$optionsav) + if (!$optionsav) { $text .= ' disabled'; + } $text .= '>'; if ($optionsav) { $text .= '<option value="-1"></option>'; @@ -2014,8 +2178,7 @@ if ($action == 'create') print '</td></tr>'; - if ($societe->id > 0) - { + if ($societe->id > 0) { // Discounts for third party print '<tr><td>'.$langs->trans('Discounts').'</td><td>'; @@ -2051,16 +2214,14 @@ if ($action == 'create') print '</td></tr>'; // Bank Account - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '<tr><td>'.$langs->trans('BankAccount').'</td><td>'; print img_picto('', 'bank_account').$form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1, '', 0, '', 1); print '</td></tr>'; } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); $langs->load('projects'); @@ -2070,8 +2231,7 @@ if ($action == 'create') } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr>'; print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->label_incoterms, 1).'</label></td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; @@ -2080,8 +2240,7 @@ if ($action == 'create') } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; print '<td class="maxwidthonsmartphone">'; @@ -2090,8 +2249,7 @@ if ($action == 'create') } // Intracomm report - if (!empty($conf->intracommreport->enabled)) - { + if (!empty($conf->intracommreport->enabled)) { $langs->loadLangs(array("intracommreport")); print '<tr><td>'.$langs->trans('IntracommReportTransportMode').'</td><td>'; $form->selectTransportMode(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id'); @@ -2101,7 +2259,7 @@ if ($action == 'create') // Public note print '<tr><td>'.$langs->trans('NotePublic').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_public', (GETPOSTISSET('note_public') ?GETPOST('note_public', 'restricthtml') : $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, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '</td>'; // print '<td><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>'; @@ -2110,19 +2268,17 @@ if ($action == 'create') // Private note print '<tr><td>'.$langs->trans('NotePrivate').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_private', (GETPOSTISSET('note_private') ?GETPOST('note_private', 'restricthtml') : $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, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print '</td>'; // print '<td><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_5.'"></textarea></td>'; print '</tr>'; - if (empty($reshook)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print "\n<!-- ".$classname." info -->"; print "\n"; print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; @@ -2143,12 +2299,10 @@ if ($action == 'create') $invoice_supplier = $objectsrc->linkedObjects['invoice_supplier']; // count function need a array as argument (Note: the array must implement Countable too) - if (is_array($invoice_supplier)) - { + if (is_array($invoice_supplier)) { $cntinvoice = count($invoice_supplier); - if ($cntinvoice >= 1) - { + if ($cntinvoice >= 1) { setEventMessages('WarningBillExist', null, 'warnings'); echo ' ('.$langs->trans('LatestRelatedBill').end($invoice_supplier)->getNomUrl(1).')'; } @@ -2157,19 +2311,16 @@ if ($action == 'create') print '</td></tr>'; print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>"; - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) //Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>"; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) //Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>"; } print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>"; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>"; print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>"; @@ -2210,11 +2361,9 @@ if ($action == 'create') } } else { if ($id > 0 || !empty($ref)) { - /* *************************************************************************** */ - /* */ - /* Fiche en mode visu ou edition */ - /* */ - /* *************************************************************************** */ + // + // View or edit mode + // $now = dol_now(); @@ -2222,11 +2371,15 @@ if ($action == 'create') $object->fetch($id, $ref); $result = $object->fetch_thirdparty(); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } $societe = new Fournisseur($db); $result = $societe->fetch($object->socid); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } $totalpaye = $object->getSommePaiement(); $totalcreditnotes = $object->getSumCreditNotesUsed(); @@ -2240,8 +2393,7 @@ if ($action == 'create') // $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); - if ($object->paye) - { + if ($object->paye) { $resteapayer = 0; } $resteapayeraffiche = $resteapayer; @@ -2260,8 +2412,8 @@ if ($action == 'create') $absolute_creditnote = price2num($absolute_creditnote, 'MT'); /* - * View card - */ + * View card + */ $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); @@ -2271,17 +2423,20 @@ if ($action == 'create') // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { - if ($object->type == FactureFournisseur::TYPE_STANDARD) $type_fac = 'ExcessPaid'; - elseif ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $type_fac = 'CreditNote'; - elseif ($object->type == FactureFournisseur::TYPE_DEPOSIT) $type_fac = 'Deposit'; + if ($object->type == FactureFournisseur::TYPE_STANDARD) { + $type_fac = 'ExcessPaid'; + } elseif ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { + $type_fac = 'CreditNote'; + } elseif ($object->type == FactureFournisseur::TYPE_DEPOSIT) { + $type_fac = 'Deposit'; + } $text = $langs->trans('ConfirmConvertToReducSupplier', strtolower($langs->transnoentities($type_fac))); $text .= '<br>'.$langs->trans('ConfirmConvertToReducSupplier2'); $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Clone confirmation - if ($action == 'clone') - { + if ($action == 'clone') { // Create an array for form $formquestion = array( array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplier"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier), @@ -2292,8 +2447,7 @@ if ($action == 'create') } // Confirmation of validation - if ($action == 'valid') - { + if ($action == 'valid') { // We check if number is temporary number if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) { // empty should not happened, but when it occurs, the test save life @@ -2323,8 +2477,7 @@ if ($action == 'create') $qualified_for_stock_change = $object->hasProductsOrServices(1); } - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { + 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); @@ -2347,19 +2500,16 @@ if ($action == 'create') } // Confirmation edit (back to draft) - if ($action == 'edit') - { + if ($action == 'edit') { $formquestion = array(); $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + 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) - { + 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); @@ -2380,34 +2530,90 @@ if ($action == 'create') } // Confirmation set paid - if ($action == 'paid') - { + if ($action == 'paid' && $resteapayer <= 0) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } + if ($action == 'paid' && $resteapayer > 0) { + $close = array(); + // Code + $i = 0; + $close[$i]['code'] = 'discount_vat'; // escompte + $i++; + $close[$i]['code'] = 'badsupplier'; + $i++; + $close[$i]['code'] = 'other'; + $i++; + // Help + $i = 0; + $close[$i]['label'] = $langs->trans("HelpEscompte").'<br><br>'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc"); + $i++; + $close[$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadSupplierDesc"); + $i++; + $close[$i]['label'] = $langs->trans("Other"); + $i++; + // Text + $i = 0; + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); + $i++; + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); + $i++; + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("Other"), $close[$i]['label'], 1); + $i++; + // arrayreasons[code]=reason + foreach ($close as $key => $val) { + $arrayreasons[$close[$key]['code']] = $close[$key]['reason']; + } + + // Create a form table + $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300')); + // Incomplete payment. We ask if the reason is discount or other + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 310); + } + + // Confirmation of the abandoned classification + if ($action == 'canceled') { + // Code + $close[1]['code'] = 'badsupplier'; + $close[2]['code'] = 'abandon'; + // Help + $close[1]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadSupplierDesc"); + $close[2]['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); + // Text + $close[1]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadSupplier", $object->ref), $close[1]['label'], 1); + $close[2]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close[2]['label'], 1); + // arrayreasons + $arrayreasons[$close[1]['code']] = $close[1]['reason']; + $arrayreasons[$close[2]['code']] = $close[2]['reason']; + + // Create a form table + $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300')); + + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes", 1, 250); + } + // Confirmation de la suppression de la facture fournisseur - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } - if ($action == 'deletepayment') - { + 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); } - // Confirmation to delete line - if ($action == 'ask_deleteline') - { + // Confirmation to delete line + if ($action == 'ask_deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } - if (!$formconfirm) - { + if (!$formconfirm) { $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } } // Print form confirm @@ -2423,14 +2629,14 @@ if ($action == 'create') $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($usercancreate) - { + if ($usercancreate) { if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; } @@ -2474,36 +2680,34 @@ if ($action == 'create') print '<span class="badgeneutral">'; print $object->getLibType(); print '</span>'; - if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) - { + 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) - { + 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) - { + if (count($facidavoir) > 0) { print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; - foreach ($facidavoir as $id) - { - if ($i == 0) print ' '; - else print ','; + 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) - { + if (isset($facidnext) && $facidnext > 0) { $facthatreplace = new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; @@ -2558,8 +2762,7 @@ if ($action == 'create') } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editconditions') - { + if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); @@ -2586,8 +2789,7 @@ if ($action == 'create') } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editmode') - { + if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'DBIT', 1, 1); } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); @@ -2595,16 +2797,16 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Multicurrency code print '<tr>'; print '<td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_DRAFT) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencycode&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="3">'; if ($action == 'editmulticurrencycode') { @@ -2615,15 +2817,15 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency rate - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print '<tr>'; print '<td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="3">'; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { @@ -2644,14 +2846,14 @@ if ($action == 'create') } // Bank Account - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '<tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans('BankAccount'); print '<td>'; - if ($action != 'editbankaccount' && $usercancreate) + if ($action != 'editbankaccount' && $usercancreate) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="3">'; if ($action == 'editbankaccount') { @@ -2664,19 +2866,20 @@ if ($action == 'create') } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>'; print $langs->trans('IncotermLabel'); print '<td><td class="right">'; - if ($usercancreate) print '<a class="editfielda" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; - else print '&nbsp;'; + if ($usercancreate) { + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; + } else { + print '&nbsp;'; + } print '</td></tr></table>'; print '</td>'; print '<td colspan="3">'; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -2691,18 +2894,16 @@ if ($action == 'create') print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans('IntracommReportTransportMode'); print '</td>'; - if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) { + if ($action != 'editmode' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; } print '</tr></table>'; print '</td>'; print '<td>'; - if ($action == 'editmode') - { + if ($action == 'editmode') { $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'transport_mode_id', 1, 1); - } - else { + } else { $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'none'); } print '</td></tr>'; @@ -2721,8 +2922,7 @@ if ($action == 'create') print '<table class="border tableforfield centpercent">'; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) - { + if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).'</td>'; print '<td class="nowrap">'.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; @@ -2742,10 +2942,16 @@ if ($action == 'create') // Amount print '<tr><td class="titlefield">'.$langs->trans('AmountHT').'</td><td>'.price($object->total_ht, 1, $langs, 0, -1, -1, $conf->currency).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency).'<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; '; - 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; + 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; + } // Show link for "recalculate" if ($object->getVentilExportCompta() == 0) { $s = $langs->trans("ReCalculate").' '; @@ -2758,14 +2964,12 @@ if ($action == 'create') // Amount Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj == "1") //Localtax1 - { + if ($societe->localtax1_assuj == "1") { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; } - if ($societe->localtax2_assuj == "1") //Localtax2 - { + if ($societe->localtax2_assuj == "1") { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; @@ -2775,23 +2979,37 @@ if ($action == 'create') print '</table>'; /* - * List of payments - */ + * List of payments + */ $totalpaye = 0; $sign = 1; - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = - 1; + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { + $sign = - 1; + } $nbrows = 9; $nbcols = 3; - if (!empty($conf->projet->enabled)) $nbrows++; - if (!empty($conf->banque->enabled)) { $nbrows++; $nbcols++; } - if (!empty($conf->incoterm->enabled)) $nbrows++; - if (!empty($conf->multicurrency->enabled)) $nbrows += 5; + if (!empty($conf->projet->enabled)) { + $nbrows++; + } + if (!empty($conf->banque->enabled)) { + $nbrows++; $nbcols++; + } + if (!empty($conf->incoterm->enabled)) { + $nbrows++; + } + if (!empty($conf->multicurrency->enabled)) { + $nbrows += 5; + } // Local taxes - if ($societe->localtax1_assuj == "1") $nbrows++; - if ($societe->localtax2_assuj == "1") $nbrows++; + if ($societe->localtax1_assuj == "1") { + $nbrows++; + } + if ($societe->localtax2_assuj == "1") { + $nbrows++; + } $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,'; @@ -2806,8 +3024,7 @@ if ($action == 'create') $sql .= ' ORDER BY p.datep, p.tms'; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; @@ -2817,15 +3034,15 @@ if ($action == 'create') print '<td class="liste_titre">'.($object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>'; print '<td>'.$langs->trans('Date').'</td>'; print '<td>'.$langs->trans('Type').'</td>'; - if (!empty($conf->banque->enabled)) print '<td class="right">'.$langs->trans('BankAccount').'</td>'; + if (!empty($conf->banque->enabled)) { + print '<td class="right">'.$langs->trans('BankAccount').'</td>'; + } print '<td class="right">'.$langs->trans('Amount').'</td>'; print '<td width="18">&nbsp;</td>'; print '</tr>'; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($result); $paymentstatic->id = $objp->rowid; @@ -2842,8 +3059,7 @@ if ($action == 'create') print '<td>'; print $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; print '</td>'; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { $bankaccountstatic->id = $objp->baid; $bankaccountstatic->ref = $objp->baref; $bankaccountstatic->label = $objp->baref; @@ -2858,13 +3074,14 @@ if ($action == 'create') } print '<td class="right">'; - if ($objp->baid > 0) print $bankaccountstatic->getNomUrl(1, 'transactions'); + if ($objp->baid > 0) { + print $bankaccountstatic->getNomUrl(1, 'transactions'); + } print '</td>'; } print '<td class="right">'.price($sign * $objp->amount).'</td>'; print '<td class="center">'; - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) - { + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletepayment&token='.newToken().'&paiement_id='.$objp->rowid.'">'; print img_delete(); print '</a>'; @@ -2879,16 +3096,16 @@ if ($action == 'create') } /* - if ($object->paye == 0) - { - print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('AlreadyPaid').' :</td><td class="right">'.price($totalpaye).'</td><td></td></tr>'; - print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($object->total_ttc).'</td><td></td></tr>'; + if ($object->paye == 0) + { + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('AlreadyPaid').' :</td><td class="right">'.price($totalpaye).'</td><td></td></tr>'; + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("Billed").' :</td><td class="right">'.price($object->total_ttc).'</td><td></td></tr>'; - $resteapayer = $object->total_ttc - $totalpaye; + $resteapayer = $object->total_ttc - $totalpaye; - print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('RemainderToPay').' :</td>'; - print '<td class="right'.($resteapayer?' amountremaintopay':'').'">'.price($resteapayer).'</td><td></td></tr>'; - } + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('RemainderToPay').' :</td>'; + print '<td class="right'.($resteapayer?' amountremaintopay':'').'">'.price($resteapayer).'</td><td></td></tr>'; + } */ $db->free($result); @@ -2896,14 +3113,15 @@ if ($action == 'create') dol_print_error($db); } - if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) - { + if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) { // Total already paid print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<span class="opacitymedium">'; - if ($object->type != FactureFournisseur::TYPE_DEPOSIT) + if ($object->type != FactureFournisseur::TYPE_DEPOSIT) { print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else print $langs->trans('AlreadyPaid'); + } else { + print $langs->trans('AlreadyPaid'); + } print '</span>'; print '</td><td class="right"'.(($totalpaye > 0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).'</td><td>&nbsp;</td></tr>'; @@ -2930,10 +3148,12 @@ if ($action == 'create') $obj = $db->fetch_object($resql); $invoice->fetch($obj->fk_invoice_supplier_source); print '<tr><td colspan="'.$nbcols.'" class="right">'; - if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) + if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) { print $langs->trans("CreditNote").' '; - if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT) + } + if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT) { print $langs->trans("Deposit").' '; + } print $invoice->getNomUrl(0); print ' :</td>'; print '<td class="right">'.price($obj->amount_ttc).'</td>'; @@ -2941,10 +3161,12 @@ if ($action == 'create') print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>'; print '</td></tr>'; $i++; - if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) + if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) { $creditnoteamount += $obj->amount_ttc; - if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT) + } + if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT) { $depositamount += $obj->amount_ttc; + } } } else { dol_print_error($db); @@ -2984,8 +3206,9 @@ if ($action == 'create') if (($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED) && $object->close_code == 'abandon') { print '<tr><td colspan="'.$nbcols.'" class="right nowrap">'; $text = $langs->trans("HelpAbandonOther"); - if ($object->close_note) + if ($object->close_note) { $text .= '<br><br><b>'.$langs->trans("Reason").'</b>:'.$object->close_note; + } print '<span class="opacitymedium">'; print $form->textwithpicto($langs->trans("Abandoned"), $text, - 1); print '</span>'; @@ -3004,9 +3227,11 @@ if ($action == 'create') // Remainder to pay print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<span class="opacitymedium">'; - if ($resteapayeraffiche >= 0) + if ($resteapayeraffiche >= 0) { print $langs->trans('RemainderToPay'); - else print $langs->trans('ExcessPaid'); + } else { + print $langs->trans('ExcessPaid'); + } print '</span>'; print '</td>'; print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td>'; @@ -3026,9 +3251,11 @@ if ($action == 'create') // Remainder to pay back print '<tr><td colspan="'.$nbcols.'" class="right">'; print '<span class="opacitymedium">'; - if ($resteapayeraffiche <= 0) + if ($resteapayeraffiche <= 0) { print $langs->trans('RemainderToPayBack'); - else print $langs->trans('ExcessPaid'); + } else { + print $langs->trans('ExcessPaid'); + } print '</td>'; print '</span>'; print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($sign * $resteapayeraffiche).'</td>'; @@ -3049,15 +3276,13 @@ if ($action == 'create') print '<div class="clearboth"></div><br>'; - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { $blocname = 'contacts'; $title = $langs->trans('ContactsAddresses'); include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; } - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $colwidth = 20; $blocname = 'notes'; $title = $langs->trans('Notes'); @@ -3066,9 +3291,9 @@ if ($action == 'create') /* - * Lines - */ - print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">'; + * Lines + */ + print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">'; print '<input type="hidden" name="mode" value="">'; @@ -3086,19 +3311,20 @@ if ($action == 'create') $forceall = 1; $dateSelector = 0; $inputalsopricewithtax = 1; $senderissupplier = 2; // $senderissupplier=2 is same than 1 but disable test on minimum qty and disable autofill qty with minimum. //if (! empty($conf->global->SUPPLIER_INVOICE_WITH_NOPRICEDEFINED)) $senderissupplier=2; - if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) $senderissupplier = 1; + if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) { + $senderissupplier = 1; + } // Show object lines - if (!empty($object->lines)) + if (!empty($object->lines)) { $ret = $object->printObjectLines($action, $societe, $mysoc, $lineid, 1); + } $num = count($object->lines); // Form to add new line - if ($object->statut == FactureFournisseur::STATUS_DRAFT && $usercancreate) - { - if ($action != 'editline') - { + if ($object->statut == FactureFournisseur::STATUS_DRAFT && $usercancreate) { + if ($action != 'editline') { // Add free products/services $object->formAddObjectLine(1, $societe, $mysoc); @@ -3114,122 +3340,119 @@ if ($action == 'create') print dol_get_fiche_end(); - if ($action != 'presend') - { + if ($action != 'presend') { /* - * Buttons actions - */ + * Buttons actions + */ print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { // Modify a validated invoice with no payments - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'confirm_edit' && $object->getSommePaiement() == 0 && $usercancreate) - { + 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. - if ($ventilExportCompta == 0) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans('Modify').'</a></div>'; + if ($ventilExportCompta == 0) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans('Modify').'</a>'; } else { - print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Modify').'</span></div>'; + print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Modify').'</span>'; } } $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, 0, $object->id); - // Reopen a standard paid invoice + // Reopen a standard paid invoice if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT - || ($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' && $usercancreate) // Not replaced by another invoice - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans('ReOpen').'</a></div>'; + || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id)) + || ($object->type == FactureFournisseur::TYPE_DEPOSIT && 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' && $usercancreate) { // Not replaced by another invoice + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans('ReOpen').'</a>'; } else { if ($usercancreate) { - print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span></div>'; + print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('ReOpen').'</span>'; } elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { - print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip">'.$langs->trans('ReOpen').'</span></div>'; + print '<span class="butActionRefused classfortooltip">'.$langs->trans('ReOpen').'</span>'; + } + } + } + + // Validate + if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) { + if (count($object->lines)) { + if ($usercanvalidate) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=valid"'; + print '>'.$langs->trans('Validate').'</a>'; + } else { + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"'; + print '>'.$langs->trans('Validate').'</a>'; } } } // Send by mail if (empty($user->socid)) { - if (($object->statut == FactureFournisseur::STATUS_VALIDATED || $object->statut == FactureFournisseur::STATUS_CLOSED)) - { - if ($usercansend) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; - } else print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip">'.$langs->trans('SendMail').'</a></div>'; + if (($object->statut == FactureFournisseur::STATUS_VALIDATED || $object->statut == FactureFournisseur::STATUS_CLOSED)) { + if ($usercansend) { + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'; + } else { + print '<span class="butActionRefused classfortooltip">'.$langs->trans('SendMail').'</span>'; + } } } - // Make payments - if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) - { - print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&amp;action=create'.($object->fk_account > 0 ? '&amp;accountid='.$object->fk_account : '').'">'.$langs->trans('DoPayment').'</a></div>'; // 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 '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=paid"'; - print '>'.$langs->trans('ClassifyPaid').'</a></div>'; - - //print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=paid">'.$langs->trans('ClassifyPaid').'</a>'; + // Create payment + if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.DOL_URL_ROOT.'/fourn/facture/paiement.php?facid='.$object->id.'&amp;action=create'.($object->fk_account > 0 ? '&amp;accountid='.$object->fk_account : '').'">'.$langs->trans('DoPayment').'</a>'; // must use facid because id is for payment id not invoice } // Reverse back money or convert to reduction if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT || $object->type == FactureFournisseur::TYPE_STANDARD) { // For credit note only - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0) - { - if ($resteapayer == 0) - { - print '<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseRemainderToPayIsZero").'">'.$langs->trans('DoPaymentBack').'</span></div>'; + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0) { + if ($resteapayer == 0) { + print '<span class="butActionRefused classfortooltip" title="'.$langs->trans("DisabledBecauseRemainderToPayIsZero").'">'.$langs->trans('DoPaymentBack').'</span>'; } else { - print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&amp;action=create&amp;accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a></div>'; + print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/paiement.php?facid='.$object->id.'&amp;action=create&amp;accountid='.$object->fk_account.'">'.$langs->trans('DoPaymentBack').'</a>'; } } // For standard invoice with excess paid - if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertExcessPaidToReduc').'</a></div>'; + if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertExcessPaidToReduc').'</a>'; } // For credit note 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 '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReducSupplier2")).'">'.$langs->trans('ConvertToReduc').'</a></div>'; + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReducSupplier2")).'">'.$langs->trans('ConvertToReduc').'</a>'; } // For deposit invoice - if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 1 && $resteapayer == 0 && $usercancreate && empty($discount->id)) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a></div>'; + if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $usercancreate && $object->statut > 0 && empty($discount->id)) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>'; } } - // Validate - if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) - { - if (count($object->lines)) - { - if ($usercanvalidate) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=valid"'; - print '>'.$langs->trans('Validate').'</a></div>'; - } else { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"'; - print '>'.$langs->trans('Validate').'</a></div>'; + // Classify paid + if (($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && (($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $object->type != FactureFournisseur::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $resteapayer >= 0))) + || ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && empty($discount->id)) + ) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=paid">'.$langs->trans('ClassifyPaid').'</a>'; + } + + // Classify 'closed not completely paid' (possible if validated and not yet filed paid) + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $resteapayer > 0) { + if ($totalpaye > 0 || $totalcreditnotes > 0) { + // If one payment or one credit note was linked to this invoice + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=paid">'.$langs->trans('ClassifyPaidPartially').'</a>'; + } else { + if (empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED)) { + print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=canceled">'.$langs->trans('ClassifyCanceled').'</a>'; } } } @@ -3240,50 +3463,44 @@ if ($action == 'create') print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a></div>'; }*/ - // Clone - if ($action != 'edit' && $usercancreate) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=clone&amp;socid='.$object->socid.'">'.$langs->trans('ToClone').'</a></div>'; + // Create a credit note + if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $usercancreate) { + if (!$objectidnext) { + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;fac_avoir='.$object->id.'&amp;action=create&amp;type=2'.($object->fk_project > 0 ? '&amp;projectid='.$object->fk_project : '').'">'.$langs->trans("CreateCreditNote").'</a>'; + } } - // Create a credit note - if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $usercancreate) - { - if (!$objectidnext) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&amp;fac_avoir='.$object->id.'&amp;action=create&amp;type=2'.($object->fk_project > 0 ? '&amp;projectid='.$object->fk_project : '').'">'.$langs->trans("CreateCreditNote").'</a></div>'; - } + // Clone + if ($action != 'edit' && $usercancreate) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=clone&amp;socid='.$object->socid.'">'.$langs->trans('ToClone').'</a>'; } // Delete $isErasable = $object->is_erasable(); - 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) - { + 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 '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecausePayments").'">'.$langs->trans('Delete').'</a></div>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecausePayments").'">'.$langs->trans('Delete').'</a>'; } elseif ($isErasable == -3) { // Should never happen with supplier invoice - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastSituationInvoice").'">'.$langs->trans('Delete').'</a></div>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastSituationInvoice").'">'.$langs->trans('Delete').'</a>'; } elseif ($isErasable == -2) { // Should never happen with supplier invoice - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastInvoice").'">'.$langs->trans('Delete').'</a></div>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastInvoice").'">'.$langs->trans('Delete').'</a>'; } elseif ($isErasable == -1) { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Delete').'</a></div>'; - } elseif ($isErasable <= 0) // Any other cases - { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a></div>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Delete').'</a>'; + } elseif ($isErasable <= 0) { // Any other cases + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a>'; } else { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a></div>'; + print '<a class="butActionDelete'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'; } } print '</div>'; - if ($action != 'confirm_edit') - { + if ($action != 'confirm_edit') { print '<div class="fichecenter"><div class="fichehalfleft">'; /* - * Documents generes - */ + * Generated documents + */ $ref = dol_sanitizeFileName($object->ref); $subdir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref; $filedir = $conf->fournisseur->facture->dir_output.'/'.$subdir; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index d655b97c74f..236c3cd6948 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -41,7 +41,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); @@ -51,51 +53,39 @@ $object = new FactureFournisseur($db); * Ajout d'un nouveau contact */ -if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) -{ +if ($action == 'addcontact' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { $result = $object->fetch($id, $ref); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// bascule du statut d'un contact -elseif ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { + // bascule du statut d'un contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } -} - -// Efface un contact -elseif ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer) -{ +} elseif ($action == 'deletecontact' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { + // Efface un contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -124,10 +114,8 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); $alreadypaid = $object->getSommePaiement(); @@ -144,17 +132,18 @@ if ($id > 0 || !empty($ref)) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->facture->creer) - { - if ($action != 'classify') + if ($user->rights->facture->creer) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -192,36 +181,34 @@ if ($id > 0 || !empty($ref)) // Type print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td colspan="4">'; print $object->getLibType(); - if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) - { + 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) - { + 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) - { + if (count($facidavoir) > 0) { print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; - foreach ($facidavoir as $fid) - { - if ($i == 0) print ' '; - else print ','; + foreach ($facidavoir as $fid) { + if ($i == 0) { + print ' '; + } else { + print ','; + } $facavoir = new FactureFournisseur($db); $facavoir->fetch($fid); print $facavoir->getNomUrl(1); } print ')'; } - if ($facidnext > 0) - { + if ($facidnext > 0) { $facthatreplace = new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; @@ -239,14 +226,12 @@ if ($id > 0 || !empty($ref)) // Amount Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj == "1") //Localtax1 - { + if ($societe->localtax1_assuj == "1") { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; } - if ($societe->localtax2_assuj == "1") //Localtax2 - { + if ($societe->localtax2_assuj == "1") { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 36f5a45b25e..f75a8bd8ef3 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -46,7 +46,9 @@ $confirm = GETPOST('confirm', 'alpha'); $ref = GETPOST('ref', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); // Get parameters @@ -54,16 +56,21 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new FactureFournisseur($db); -if ($object->fetch($id, $ref)) -{ +if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); $ref = dol_sanitizeFileName($object->ref); $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref; @@ -74,7 +81,7 @@ if ($object->fetch($id, $ref)) * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -87,8 +94,7 @@ $title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Documents'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); -if ($object->id > 0) -{ +if ($object->id > 0) { $head = facturefourn_prepare_head($object); print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); @@ -102,17 +108,18 @@ if ($object->id > 0) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->facture->creer) - { - if ($action != 'classify') + if ($user->rights->facture->creer) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -148,16 +155,14 @@ if ($object->id > 0) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } /* * Confirm delete file */ - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } @@ -166,28 +171,27 @@ if ($object->id > 0) // Type print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>'; print $object->getLibType(); - if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) - { + 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) - { + 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) - { + if (count($facidavoir) > 0) { print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; - foreach ($facidavoir as $id) - { - if ($i == 0) print ' '; - else print ','; + foreach ($facidavoir as $id) { + if ($i == 0) { + print ' '; + } else { + print ','; + } $facavoir = new FactureFournisseur($db); $facavoir->fetch($id); print $facavoir->getNomUrl(1); @@ -215,14 +219,12 @@ if ($object->id > 0) // Amount Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($mysoc->localtax1_assuj == "1") //Localtax1 - { + if ($mysoc->localtax1_assuj == "1") { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; print '<td>'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; } - if ($mysoc->localtax2_assuj == "1") //Localtax2 - { + if ($mysoc->localtax2_assuj == "1") { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; print '<td>'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; @@ -249,14 +251,13 @@ if ($object->id > 0) $modulepart = 'facture_fournisseur'; - $permission = $user->rights->fournisseur->facture->creer; - $permtoedit = $user->rights->fournisseur->facture->creer; + $permission = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); + $permtoedit = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); $param = '&facid='.$object->id; $defaulttpldir = '/core/tpl'; $dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir)); - foreach ($dirtpls as $module => $reldir) - { + foreach ($dirtpls as $module => $reldir) { if (!empty($module)) { $tpl = dol_buildpath($reldir.'/document_actions_post_headers.tpl.php'); } else { @@ -268,7 +269,9 @@ if ($object->id > 0) } else { $res = include $tpl; // for debug } - if ($res) break; + if ($res) { + break; + } } } else { print $langs->trans('ErrorUnknown'); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php deleted file mode 100644 index 18c4bff9036..00000000000 --- a/htdocs/fourn/facture/impayees.php +++ /dev/null @@ -1,300 +0,0 @@ -<?php -/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2012 Vinicius Nogueira <viniciusvgn@gmail.com> - * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> - * - * 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/>. - */ - -/** - * \file htdocs/fourn/facture/impayees.php - * \ingroup facture - * \brief Page to list all unpaid invoices - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; - -if (!$user->rights->fournisseur->facture->lire) accessforbidden(); - -$langs->loadLangs(array("companies", "bills")); - -$socid = GETPOST('socid', 'int'); -$option = GETPOST('option'); - -// Security check -if ($user->socid > 0) -{ - $action = ''; - $socid = $user->socid; -} - -$sortfield = GETPOST("sortfield", 'alpha'); -$sortorder = GETPOST("sortorder", 'alpha'); - -$search_ref = GETPOST('search_ref', 'alpha'); -$search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); -$search_company = GETPOST('search_company', 'alpha'); -$search_amount_no_tax = GETPOST('search_amount_no_tax', 'alpha'); -$search_amount_all_tax = GETPOST('search_amount_all_tax', 'alpha'); - -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$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 = "f.date_lim_reglement"; -if (!$sortorder) $sortorder = "ASC"; - -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers -{ - $search_ref = ""; - $search_ref_supplier = ""; - $search_company = ""; - $search_amount_no_tax = ""; - $search_amount_all_tax = ""; -} - -/* - * View - */ - -$now = dol_now(); - -llxHeader('', $langs->trans("BillsSuppliersUnpaid")); - -$title = $langs->trans("BillsSuppliersUnpaid"); - -$facturestatic = new FactureFournisseur($db); -$companystatic = new Societe($db); - -if ($user->rights->fournisseur->facture->lire) -{ - $sql = "SELECT s.rowid as socid, s.nom as name,"; - $sql .= " f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc,"; - $sql .= " f.datef as df, f.date_lim_reglement as datelimite, "; - $sql .= " f.paye as paye, f.rowid as facid, f.fk_statut"; - $sql .= " ,sum(pf.amount) as am"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= ",".MAIN_DB_PREFIX."facture_fourn as f"; - $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_soc = s.rowid"; - $sql .= " AND f.paye = 0 AND f.fk_statut = 1"; - if ($option == 'late') $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; - 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; - - if (GETPOST('filtre')) - { - $filtrearr = explode(",", GETPOST('filtre')); - foreach ($filtrearr as $fil) - { - $filt = explode(":", $fil); - $sql .= " AND ".$filt[0]." = ".$filt[1]; - } - } - - if ($search_ref) - { - $sql .= " AND f.ref LIKE '%".$db->escape($search_ref)."%'"; - } - if ($search_ref_supplier) - { - $sql .= " AND f.ref_supplier LIKE '%".$db->escape($search_ref_supplier)."%'"; - } - - if ($search_company) - { - $sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'"; - } - - if ($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 = '".$db->escape($search_amount_all_tax)."'"; - } - - if (dol_strlen(GETPOST('sf_re')) > 0) - { - $sql .= " AND f.ref_supplier LIKE '%".$db->escape(GETPOST('sf_re'))."%'"; - } - - $sql .= " GROUP BY s.rowid, s.nom, f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.fk_statut"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; - $sql .= $db->order($sortfield, $sortorder); - if (!in_array("f.ref_supplier", explode(',', $sortfield))) $sql .= ", f.ref_supplier DESC"; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - - if ($socid) - { - $soc = new Societe($db); - $soc->fetch($socid); - } - - $param = ''; - if ($socid) $param .= "&socid=".$socid; - - if ($search_ref) $param .= '&amp;search_ref='.urlencode($search_ref); - if ($search_ref_supplier) $param .= '&amp;search_ref_supplier='.urlencode($search_ref_supplier); - if ($search_company) $param .= '&amp;search_company='.urlencode($search_company); - if ($search_amount_no_tax) $param .= '&amp;search_amount_no_tax='.urlencode($search_amount_no_tax); - if ($search_amount_all_tax) $param .= '&amp;search_amount_all_tax='.urlencode($search_amount_all_tax); - - $param .= ($option ? "&option=".$option : ""); - if (!empty($late)) $param .= '&late='.urlencode($late); - $urlsource = str_replace('&amp;', '&', $param); - - $titre = ($socid ? $langs->trans("BillsSuppliersUnpaidForCompany", $soc->name) : $langs->trans("BillsSuppliersUnpaid")); - - if ($option == 'late') $titre .= ' ('.$langs->trans("Late").')'; - else $titre .= ' ('.$langs->trans("All").')'; - - $link = ''; - if (empty($option)) $link = '<a href="'.$_SERVER["PHP_SELF"].'?option=late'.($socid ? '&socid='.$socid : '').'">'.$langs->trans("ShowUnpaidLateOnly").'</a>'; - elseif ($option == 'late') $link = '<a href="'.$_SERVER["PHP_SELF"].'?'.($socid ? '&socid='.$socid : '').'">'.$langs->trans("ShowUnpaidAll").'</a>'; - print load_fiche_titre($titre, $link); - - print_barre_liste('', '', $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', 0); // We don't want pagination on this page - $i = 0; - print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">'; - - print '<table class="liste centpercent">'; - print '<tr class="liste_titre">'; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "f.rowid", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("RefSupplier", $_SERVER["PHP_SELF"], "f.ref_supplier", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "f.date_lim_reglement", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("AlreadyPaid", $_SERVER["PHP_SELF"], "am", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "fk_statut,paye,am", "", $param, '', $sortfield, $sortorder, 'right '); - print "</tr>\n"; - - // Lines with filter fields - print '<tr class="liste_titre">'; - print '<td class="liste_titre">'; - print '<input class="flat" size="8" type="text" name="search_ref" value="'.$search_ref.'"></td>'; - print '<td class="liste_titre">'; - print '<input class="flat" size="8" type="text" name="search_ref_supplier" value="'.$search_ref_supplier.'"></td>'; - print '<td class="liste_titre">&nbsp;</td>'; - print '<td class="liste_titre">&nbsp;</td>'; - print '<td class="liste_titre left">'; - print '<input class="flat" type="text" size="6" name="search_company" value="'.$search_company.'">'; - print '</td><td class="liste_titre right">'; - print '<input class="flat" type="text" size="8" name="search_amount_no_tax" value="'.$search_amount_no_tax.'">'; - print '</td><td class="liste_titre right">'; - print '<input class="flat" type="text" size="8" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">'; - print '</td>'; - print '<td class="liste_titre maxwidthsearch">'; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print '</td>'; - print "</tr>\n"; - - if ($num > 0) - { - $total_ht = 0; - $total_ttc = 0; - $total_paid = 0; - - while ($i < $num) - { - $objp = $db->fetch_object($resql); - - $facturestatic->statut = $objp->fk_statut; - $facturestatic->date_echeance = $db->jdate($objp->datelimite); - - - - print '<tr class="oddeven">'; - $classname = "impayee"; - - print '<td class="nowrap">'; - $facturestatic->id = $objp->facid; - $facturestatic->ref = $objp->ref; - print $facturestatic->getNomUrl(1); - print "</td>\n"; - - print '<td class="nowrap">'.dol_trunc($objp->ref_supplier, 12).'</td>'; - - print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n"; - print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->datelimite), 'day'); - if ($facturestatic->hasDelay()) { - print img_warning($langs->trans("Late")); - } - print "</td>\n"; - - print '<td>'; - $companystatic->id = $objp->socid; - $companystatic->name = $objp->name; - print $companystatic->getNomUrl(1, 'supplier', 32); - print '</td>'; - - print "<td class=\"right\">".price($objp->total_ht)."</td>"; - print "<td class=\"right\">".price($objp->total_ttc)."</td>"; - print "<td class=\"right\">".price($objp->am)."</td>"; - - // Show invoice status - print '<td class="right nowrap">'; - print $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 5, $objp->am); - print '</td>'; - - print "</tr>\n"; - $total_ht += $objp->total_ht; - $total_ttc += $objp->total_ttc; - $total_paid += $objp->am; - - $i++; - } - - print '<tr class="liste_total">'; - print "<td colspan=\"5\" class=\"left\">".$langs->trans("Total").": </td>"; - print "<td class=\"right\"><b>".price($total_ht)."</b></td>"; - print "<td class=\"right\"><b>".price($total_ttc)."</b></td>"; - print "<td class=\"right\"><b>".price($total_paid)."</b></td>"; - print '<td class="center">&nbsp;</td>'; - print "</tr>\n"; - } - - print "</table>"; - - print '</form>'; - - $db->free($resql); - } else { - dol_print_error($db); - } -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/fourn/facture/index.html b/htdocs/fourn/facture/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 131b34bbe39..e76426f54c2 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/forun/facture/index.php + * \file htdocs/fourn/facture/index.php * \ingroup facture * \brief Home page of customer invoices area */ @@ -25,6 +25,7 @@ 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'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; // Security check restrictedArea($user, 'fournisseur', 0, '', 'facture'); @@ -34,12 +35,13 @@ $langs->loadLangs(['bills', 'boxes']); // Filter to show only result of one supplier $socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) -{ +if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + // Maximum elements of the tables $maxDraftCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; $maxLatestEditCount = 5; @@ -57,25 +59,18 @@ print '<div class="fichecenter">'; print '<div class="fichethirdleft">'; -// This is useless due to the global search combo -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) -{ - print getAreaSearchFrom(); - print '<br>'; -} - -print getPieChart($socid); +print getPurchaseInvoicePieChart($socid); print '<br>'; -print getDraftTable($maxDraftCount, $socid); +print getDraftSupplierTable($maxDraftCount, $socid); print '</div>'; print '<div class="fichetwothirdright">'; print '<div class="ficheaddleft">'; -print getLatestEditTable($maxLatestEditCount, $socid); +print getPurchaseInvoiceLatestEditTable($maxLatestEditCount, $socid); print '<br>'; -print getOpenTable($maxOpenCount, $socid); +print getPurchaseInvoiceUnpaidOpenTable($max, $socid); print '</div>'; print '</div>'; @@ -85,451 +80,3 @@ print '</div>'; // 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 = '<form method="post" action="'.DOL_URL_ROOT.'/compta/facture/list.php">'; - $result .= '<div class="div-table-responsive-no-min">'; - $result .= '<input type="hidden" name="token" value="'.newToken().'">'; - $result .= '<table class="noborder nohover centpercent">'; - - $result .= '<tr class="liste_titre">'; - $result .= '<td colspan="3">'.$langs->trans("Search").'</td>'; - $result .= '</tr>'; - - $result .= '<tr class="oddeven">'; - $result .= '<td>'.$langs->trans("Invoice").':</td><td><input type="text" class="flat" name="sall" size=18></td>'; - $result .= '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; - $result .= '</tr>'; - - $result .= "</table>"; - $result .= "</div>"; - $result .= "</form>"; - - 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 = '<div class="div-table-responsive-no-min">'; - $result .= '<table class="noborder nohover centpercent">'; - - $result .= '<tr class="liste_titre">'; - $result .= '<td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SupplierInvoice").'</td>'; - $result .= '</tr>'; - - $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 .= '<tr class="oddeven">'; - $result .= '<td>'.$objectstatic->getLibStatut(0).'</td>'; - $result .= '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; - $result .= '</tr>'; - } - } - - if ($conf->use_javascript_ajax) - { - $dolgraph = new DolGraph(); - $dolgraph->SetData($dataseries); - $dolgraph->setShowLegend(2); - $dolgraph->setShowPercent(1); - $dolgraph->SetType(['pie']); - $dolgraph->setHeight('200'); - $dolgraph->draw('idgraphthirdparties'); - - $result .= '<tr>'; - $result .= '<td align="center" colspan="2">'.$dolgraph->show($total ? 0 : 1).'</td>'; - $result .= '</tr>'; - } - - $result .= '<tr class="liste_total">'; - $result .= '<td>'.$langs->trans("Total").'</td>'; - $result .= '<td class="right">'.$total.'</td>'; - $result .= '</tr>'; - - $result .= '</table>'; - $result .= '</div>'; - - 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 = '<div class="div-table-responsive-no-min">'; - $result .= '<table class="noborder centpercent">'; - - $result .= '<tr class="liste_titre">'; - $result .= '<td colspan="3">'; - $result .= $langs->trans("SuppliersDraftInvoices"); - $result .= ' <a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?search_status=0">'; - $result .= '<span class="badge">'.$num.'</span>'; - $result .= '</a>'; - $result .= '</td>'; - $result .= '</tr>'; - - if ($num < 1) - { - $result .= '</table>'; - $result .= '</div>'; - 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 .= '<tr class="oddeven">'; - $result .= '<td class="nowrap">'.$objectstatic->getNomUrl(1).'</td>'; - $result .= '<td>'.$companystatic->getNomUrl(1, 'supplier', 24).'</td>'; - $result .= '<td class="right">'.price($obj->total_ttc).'</td>'; - $result .= '</tr>'; - - $i++; - $total += $obj->total_ttc; - } - - if ($num > $nbofloop) - { - $result .= '<tr class="liste_total">'; - $result .= '<td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop)).'</td>'; - $result .= '</tr>'; - } - elseif ($total > 0) - { - $result .= '<tr class="liste_total">'; - $result .= '<td colspan="2" class="right">'.$langs->trans("Total").'</td>'; - $result .= '<td class="right">'.price($total).'</td>'; - $result .= '</tr>'; - } - - $result .= '</table>'; - $result .= '</div>'; - 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 = '<div class="div-table-responsive-no-min">'; - $result .= '<table class="noborder centpercent">'; - $result .= '<tr class="liste_titre">'; - $result .= '<td colspan="4">'.$langs->trans("BoxTitleLastSupplierBills", $maxCount).'</td>'; - $result .= '</tr>'; - - if ($num < 1) - { - $result .= '</table>'; - $result .= '</div>'; - 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 .= '<tr width="20%" class="nowrap">'; - - $result .= '<td class="oddeven">'; - $result .= '<table class="nobordernopadding">'; - $result .= '<tr class="nocellnopadd">'; - - $result .= '<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).'</td>'; - $result .= '<td width="16" class="nobordernopadding nowrap">&nbsp;</td>'; - $result .= '<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'</td>'; - - $result .= '</tr>'; - $result .= '</table>'; - $result .= '</td>'; - - $result .= '<td>'.$companystatic->getNomUrl(1, 'supplier').'</td>'; - $result .= '<td>'.dol_print_date($db->jdate($obj->datec), 'day').'</td>'; - $result .= '<td class="right">'.$objectstatic->getLibStatut(5).'</td>'; - - $result .= '</tr>'; - - $i++; - } - - $result .= '</table>'; - $result .= '</div>'; - 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 = '<div class="div-table-responsive-no-min">'; - $result .= '<table class="noborder centpercent">'; - $result .= '<tr class="liste_titre">'; - $result .= '<td colspan="4">'; - $result .= $langs->trans("BillsCustomersUnpaid"); - $result .= ' <a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?search_status=1">'; - $result .= '<span class="badge">'.$num.'</span>'; - $result .= '</a>'; - $result .= '</td>'; - $result .= '</tr>'; - - if ($num < 1) - { - $result .= '</table>'; - $result .= '</div>'; - 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 .= '<tr class="oddeven">'; - - $result .= '<td class="nowrap" width="140">'; - $result .= '<table class="nobordernopadding">'; - $result .= '<tr class="nocellnopadd">'; - - $result .= '<td class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).'</td>'; - $result .= '<td width="18" class="nobordernopadding nowrap">'; - - if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) - { - $result .= img_warning($langs->trans("Late")); - } - - $result .= '</td>'; - - $result .= '<td width="16" align="center" class="nobordernopadding">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'</td>'; - - $result .= '</tr>'; - $result .= '</table>'; - $result .= '</td>'; - - $result .= '<td class="left">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>'; - $result .= '<td class="right">'.dol_print_date($db->jdate($obj->df), 'day').'</td>'; - $result .= '<td class="right">'.price($obj->total_ttc).'</td>'; - - $result .= '</tr>'; - - $i++; - $total += $obj->total_ttc; - } - - if ($num > $nbofloop) - { - $result .= '<tr class="liste_total">'; - $result .= '<td colspan="4" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop)).'</td>'; - $result .= '</tr>'; - } - elseif ($total > 0) - { - $result .= '<tr class="liste_total">'; - $result .= '<td colspan="2" class="right">'.$langs->trans("Total").'</td>'; - $result .= '<td align="right">'.price($total).'</td>'; - $result .= '<td>&nbsp;</td>'; - $result .= '</tr>'; - } - - $result .= '</table>'; - $result .= '</div>'; - return $result; -} diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index 69ea8839cfb..efe91880a56 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -40,7 +40,9 @@ $id = GETPOST("facid", 'int') ?GETPOST("facid", 'int') : GETPOST("id", 'int'); $ref = GETPOST("ref", 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); @@ -75,39 +77,40 @@ $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); -if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; +if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; +} // Project -if (!empty($conf->projet->enabled)) -{ - $langs->load("projects"); - $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->facture->creer) - { - if ($action != 'classify') - //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref .= '<input type="hidden" name="action" value="classin">'; - $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref .= $formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref .= '</form>'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">'; - $morehtmlref .= $proj->ref; - $morehtmlref .= '</a>'; - } else { - $morehtmlref .= ''; - } - } +if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '<br>'.$langs->trans('Project').' '; + if ($user->rights->facture->creer) { + if ($action != 'classify') { + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->thirdparty->id, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->thirdparty->id, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">'; + $morehtmlref .= $proj->ref; + $morehtmlref .= '</a>'; + } else { + $morehtmlref .= ''; + } + } } $morehtmlref .= '</div>'; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 792fb91f980..4fd45d6cff0 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -11,7 +11,7 @@ * Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> - * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,7 +44,9 @@ 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.'/projet/class/project.class.php'; -if (!$user->rights->fournisseur->facture->lire) accessforbidden(); +if (!$user->rights->fournisseur->facture->lire) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('products', 'bills', 'companies', 'projects')); @@ -60,8 +62,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'sup $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $_GET["action"] = ''; $socid = $user->socid; @@ -121,12 +122,18 @@ $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 ($page == -1 || $page == null || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } +if ($page == -1 || $page == null || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "f.datef,f.rowid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.datef,f.rowid"; +} $diroutputmassaction = $conf->fournisseur->facture->dir_output.'/temp/massgeneration/'.$user->id; @@ -150,7 +157,9 @@ $fieldstosearchall = array( 's.nom'=>"ThirdParty", 'f.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["f.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["f.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -162,7 +171,7 @@ $arrayfields = array( 'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1), 'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0), 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), + 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>-1), 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), @@ -199,19 +208,23 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha')) // All tests must be present to be compatible with all browsers - { + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha')) { // All tests must be present to be compatible with all browsers $search_all = ""; $search_user = ''; $search_sale = ''; @@ -261,18 +274,16 @@ if (empty($reshook)) // Mass actions $objectclass = 'FactureFournisseur'; $objectlabel = 'SupplierInvoices'; - $permissiontoread = $user->rights->fournisseur->facture->lire; - $permissiontoadd = $user->rights->fournisseur->facture->creer; - $permissiontodelete = $user->rights->fournisseur->facture->supprimer; + $permissiontoread = ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire); + $permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); + $permissiontodelete = ($user->rights->fournisseur->facture->supprimer || $user->rights->supplier_invoice->supprimer); $uploaddir = $conf->fournisseur->facture->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if ($massaction == 'banktransfertrequest') - { + if ($massaction == 'banktransfertrequest') { $langs->load("withdrawals"); - if (!$user->rights->paymentbybanktransfer->create) - { + if (!$user->rights->paymentbybanktransfer->create) { $error++; setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); } else { @@ -281,12 +292,10 @@ if (empty($reshook)) $arrayofselected = is_array($toselect) ? $toselect : array(); $listofbills = array(); - foreach ($arrayofselected as $toselectid) - { + foreach ($arrayofselected as $toselectid) { $objecttmp = new FactureFournisseur($db); $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $totalpaye = $objecttmp->getSommePaiement(); $totalcreditnotes = $objecttmp->getSumCreditNotesUsed(); $totaldeposits = $objecttmp->getSumDepositsUsed(); @@ -315,8 +324,7 @@ if (empty($reshook)) $rsql .= " ORDER BY pfd.date_demande DESC"; $result_sql = $db->query($rsql); - if ($result_sql) - { + if ($result_sql) { $numprlv = $db->num_rows($result_sql); } @@ -333,15 +341,12 @@ if (empty($reshook)) } //Massive withdraw request for request with no errors - if (!empty($listofbills)) - { + if (!empty($listofbills)) { $nbwithdrawrequestok = 0; - foreach ($listofbills as $aBill) - { + foreach ($listofbills as $aBill) { $db->begin(); $result = $aBill->demande_prelevement($user, $aBill->resteapayer, 'bank-transfer', 'supplier_invoice'); - if ($result > 0) - { + if ($result > 0) { $db->commit(); $nbwithdrawrequestok++; } else { @@ -349,8 +354,7 @@ if (empty($reshook)) setEventMessages($aBill->error, $aBill->errors, 'errors'); } } - if ($nbwithdrawrequestok > 0) - { + if ($nbwithdrawrequestok > 0) { setEventMessages($langs->trans("WithdrawRequestsDone", $nbwithdrawrequestok), null, 'mesgs'); } } @@ -359,6 +363,88 @@ if (empty($reshook)) } +if ($massaction == 'transfer_request') { + $langs->load("withdrawals"); + + if (!$user->rights->paymentbybanktransfer->create) { + $error++; + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); + } else { + //Checking error + $error = 0; + + $arrayofselected = is_array($toselect) ? $toselect : array(); + $listofbills = array(); + foreach ($arrayofselected as $toselectid) { + $objecttmp = new FactureFournisseur($db); + $result = $objecttmp->fetch($toselectid); + if ($result > 0) { + $totalpaye = $objecttmp->getSommePaiement(); + $totalcreditnotes = $objecttmp->getSumCreditNotesUsed(); + $totaldeposits = $objecttmp->getSumDepositsUsed(); + $objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + if ($objecttmp->paye || $objecttmp->resteapayer == 0) { + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("AlreadyPaid"), $objecttmp->errors, 'errors'); + } elseif ($objecttmp->resteapayer < 0) { + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("AmountMustBePositive"), $objecttmp->errors, 'errors'); + } + if (!($objecttmp->statut > FactureFournisseur::STATUS_DRAFT)) { + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("Draft"), $objecttmp->errors, 'errors'); + } + + $rsql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande"; + $rsql .= " , pfd.date_traite as date_traite"; + $rsql .= " , pfd.amount"; + $rsql .= " , u.rowid as user_id, u.lastname, u.firstname, u.login"; + $rsql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; + $rsql .= " , ".MAIN_DB_PREFIX."user as u"; + $rsql .= " WHERE fk_facture_fourn = ".$objecttmp->id; + $rsql .= " AND pfd.fk_user_demande = u.rowid"; + $rsql .= " AND pfd.traite = 0"; + $rsql .= " ORDER BY pfd.date_demande DESC"; + + $result_sql = $db->query($rsql); + if ($result_sql) { + $numprlv = $db->num_rows($result_sql); + } + + if ($numprlv > 0) { + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings'); + } elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'VIR') { + $error++; + setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors'); + } else { + $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done + } + } + } + + //Massive withdraw request for request with no errors + if (!empty($listofbills)) { + $nbwithdrawrequestok = 0; + foreach ($listofbills as $aBill) { + $db->begin(); + $result = $aBill->demande_prelevement($user, $aBill->resteapayer, 'bank-transfer', 'supplier_invoice'); + if ($result > 0) { + $db->commit(); + $nbwithdrawrequestok++; + } else { + $db->rollback(); + setEventMessages($aBill->error, $aBill->errors, 'errors'); + } + } + if ($nbwithdrawrequestok > 0) { + setEventMessages($langs->trans("BankTransferRequestsDone", $nbwithdrawrequestok), null, 'mesgs'); + } + } + } +} + + /* * View */ @@ -374,7 +460,9 @@ $thirdparty = new Societe($db); // llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); $sql = "SELECT"; -if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT'; +if ($search_all || $search_product_category > 0) { + $sql = 'SELECT DISTINCT'; +} $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.type, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement, f.fk_cond_reglement,"; $sql .= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_update,"; $sql .= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,"; @@ -387,13 +475,19 @@ $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " country.code as country_code,"; $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,"; $sql .= " u.login"; +if ($search_categ_sup && $search_categ_sup != '-1') { + $sql .= ", cs.fk_categorie, cs.fk_soc"; +} // We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0) // TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field. -if (!$search_all) $sql .= ', SUM(pf.amount) as dynamount_payed'; -if ($search_categ_sup) $sql .= ", cs.fk_categorie, cs.fk_soc"; +if (!$search_all) { + $sql .= ', SUM(pf.amount) as dynamount_payed'; +} // 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(); @@ -403,19 +497,30 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -if (!empty($search_categ_sup)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; +if (!empty($search_categ_sup)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; +} $sql .= ', '.MAIN_DB_PREFIX.'facture_fourn as f'; -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 (f.rowid = ef.fk_object)"; -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'; +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 (f.rowid = ef.fk_object)"; +} +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"; -if ($search_user > 0) -{ +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } @@ -425,68 +530,135 @@ $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object $sql .= $hookmanager->resPrint; $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; -if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; -if ($socid > 0) $sql .= ' AND s.rowid = '.$socid; -if ($search_ref) -{ - if (is_numeric($search_ref)) $sql .= natural_search(array('f.ref'), $search_ref); - else $sql .= natural_search('f.ref', $search_ref); +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } -if ($search_ref) $sql .= natural_search('f.ref', $search_ref); -if ($search_refsupplier) $sql .= natural_search('f.ref_supplier', $search_refsupplier); -if ($search_type != '' && $search_type >= 0) -{ - if ($search_type == '0') $sql .= " AND f.type = 0"; // standard - if ($search_type == '1') $sql .= " AND f.type = 1"; // replacement - if ($search_type == '2') $sql .= " AND f.type = 2"; // credit note - if ($search_type == '3') $sql .= " AND f.type = 3"; // deposit +if ($search_product_category > 0) { + $sql .= " AND cp.fk_categorie = ".$search_product_category; +} +if ($socid > 0) { + $sql .= ' AND s.rowid = '.$socid; +} +if ($search_ref) { + if (is_numeric($search_ref)) { + $sql .= natural_search(array('f.ref'), $search_ref); + } else { + $sql .= natural_search('f.ref', $search_ref); + } +} +if ($search_ref) { + $sql .= natural_search('f.ref', $search_ref); +} +if ($search_refsupplier) { + $sql .= natural_search('f.ref_supplier', $search_refsupplier); +} +if ($search_type != '' && $search_type >= 0) { + if ($search_type == '0') { + $sql .= " AND f.type = 0"; // standard + } + if ($search_type == '1') { + $sql .= " AND f.type = 1"; // replacement + } + if ($search_type == '2') { + $sql .= " AND f.type = 2"; // credit note + } + if ($search_type == '3') { + $sql .= " AND f.type = 3"; // deposit + } //if ($search_type == '4') $sql.=" AND f.type = 4"; // proforma //if ($search_type == '5') $sql.=" AND f.type = 5"; // situation } -if ($search_project) $sql .= natural_search('p.ref', $search_project); -if ($search_company) $sql .= natural_search('s.nom', $search_company); -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 (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -if ($search_montant_ht != '') $sql .= natural_search('f.total_ht', $search_montant_ht, 1); -if ($search_montant_vat != '') $sql .= natural_search('f.total_tva', $search_montant_vat, 1); -if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1); -if ($search_montant_localtax2 != '') $sql .= natural_search('f.localtax2', $search_montant_localtax2, 1); -if ($search_montant_ttc != '') $sql .= natural_search('f.total_ttc', $search_montant_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND f.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; -if ($search_multicurrency_tx != '') $sql .= natural_search('f.multicurrency_tx', $search_multicurrency_tx, 1); -if ($search_multicurrency_montant_ht != '') $sql .= natural_search('f.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); -if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); -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 = ".((int) $search_paymentmode); -if ($search_paymentcond > 0) $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond); +if ($search_project) { + $sql .= natural_search('p.ref', $search_project); +} +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); +} +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->sanitize($search_country).')'; +} +if ($search_type_thirdparty != '' && $search_type_thirdparty >= 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; +} +if ($search_montant_ht != '') { + $sql .= natural_search('f.total_ht', $search_montant_ht, 1); +} +if ($search_montant_vat != '') { + $sql .= natural_search('f.total_tva', $search_montant_vat, 1); +} +if ($search_montant_localtax1 != '') { + $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1); +} +if ($search_montant_localtax2 != '') { + $sql .= natural_search('f.localtax2', $search_montant_localtax2, 1); +} +if ($search_montant_ttc != '') { + $sql .= natural_search('f.total_ttc', $search_montant_ttc, 1); +} +if ($search_multicurrency_code != '') { + $sql .= ' AND f.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; +} +if ($search_multicurrency_tx != '') { + $sql .= natural_search('f.multicurrency_tx', $search_multicurrency_tx, 1); +} +if ($search_multicurrency_montant_ht != '') { + $sql .= natural_search('f.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); +} +if ($search_multicurrency_montant_vat != '') { + $sql .= natural_search('f.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); +} +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 = ".((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)."'"; -if ($search_label) $sql .= natural_search('f.libelle', $search_label); -if ($search_categ_sup > 0) $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_sup); -if ($search_categ_sup == -2) $sql .= " AND cs.fk_categorie IS NULL"; -if ($search_status != '' && $search_status >= 0) -{ +if ($option == 'late') { + $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; +} +if ($search_label) { + $sql .= natural_search('f.libelle', $search_label); +} +if ($search_categ_sup > 0) { + $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_sup); +} +if ($search_categ_sup == -2) { + $sql .= " AND cs.fk_categorie IS NULL"; +} +if ($search_status != '' && $search_status >= 0) { $sql .= " AND f.fk_statut = ".$search_status; } -if ($filter && $filter != -1) -{ +if ($filter && $filter != -1) { $aFilter = explode(',', $filter); - foreach ($aFilter as $fil) - { + foreach ($aFilter as $fil) { $filt = explode(':', $fil); $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 = ".((int) $search_sale); -if ($search_user > 0) -{ +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; } // Add where from extra fields @@ -496,8 +668,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -if (!$search_all) -{ +if (!$search_all) { $sql .= " GROUP BY f.rowid, f.ref, f.ref_supplier, f.type, f.datef, f.date_lim_reglement, f.fk_mode_reglement, f.fk_cond_reglement,"; $sql .= " f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut, f.libelle, f.datec, f.tms,"; $sql .= " f.localtax1, f.localtax2,"; @@ -510,6 +681,9 @@ if (!$search_all) $sql .= ' country.code,'; $sql .= " p.rowid, p.ref, p.title,"; $sql .= " u.login"; + if ($search_categ_sup && $search_categ_sup != '-1') { + $sql .= ", cs.fk_categorie, cs.fk_soc"; + } if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { //prevent error with sql_mode=only_full_group_by @@ -532,12 +706,10 @@ $sql .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $hookmanager->resPrin $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -547,14 +719,12 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->facid; @@ -564,46 +734,114 @@ if ($resql) llxHeader('', $langs->trans("SuppliersInvoices"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); - if ($socid) - { + if ($socid) { $soc = new Societe($db); $soc->fetch($socid); - if (empty($search_company)) $search_company = $soc->name; + if (empty($search_company)) { + $search_company = $soc->name; + } } $param = '&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($search_all) $param .= '&search_all='.urlencode($search_all); - if ($day) $param .= '&day='.urlencode($day); - if ($month) $param .= '&month='.urlencode($month); - if ($year) $param .= '&year='.urlencode($year); - if ($day_lim) $param .= '&day_lim='.urlencode($day_lim); - if ($month_lim) $param .= '&month_lim='.urlencode($month_lim); - if ($year_lim) $param .= '&year_lim='.urlencode($year_lim); - if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); - if ($search_refsupplier) $param .= '&search_refsupplier='.urlencode($search_refsupplier); - if ($search_type != '') $param .= '&search_type='.urlencode($search_type); - if ($search_label) $param .= '&search_label='.urlencode($search_label); - if ($search_company) $param .= '&search_company='.urlencode($search_company); - if ($search_login) $param .= '&search_login='.urlencode($search_login); - if ($search_montant_ht != '') $param .= '&search_montant_ht='.urlencode($search_montant_ht); - if ($search_montant_vat != '') $param .= '&search_montant_vat='.urlencode($search_montant_vat); - if ($search_montant_localtax1 != '') $param .= '&search_montant_localtax1='.urlencode($search_montant_localtax1); - if ($search_montant_localtax2 != '') $param .= '&search_montant_localtax2='.urlencode($search_montant_localtax2); - if ($search_montant_ttc != '') $param .= '&search_montant_ttc='.urlencode($search_montant_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); - if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); - if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); - if ($search_amount_no_tax) $param .= '&search_amount_no_tax='.urlencode($search_amount_no_tax); - if ($search_amount_all_tax) $param .= '&search_amount_all_tax='.urlencode($search_amount_all_tax); - if ($search_status >= 0) $param .= "&search_status=".urlencode($search_status); - if ($show_files) $param .= '&show_files='.urlencode($show_files); - if ($option) $param .= "&option=".urlencode($option); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($search_categ_sup > 0) $param .= '&search_categ_sup='.urlencode($search_categ_sup); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($search_all) { + $param .= '&search_all='.urlencode($search_all); + } + if ($day) { + $param .= '&day='.urlencode($day); + } + if ($month) { + $param .= '&month='.urlencode($month); + } + if ($year) { + $param .= '&year='.urlencode($year); + } + if ($day_lim) { + $param .= '&day_lim='.urlencode($day_lim); + } + if ($month_lim) { + $param .= '&month_lim='.urlencode($month_lim); + } + if ($year_lim) { + $param .= '&year_lim='.urlencode($year_lim); + } + if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); + } + if ($search_refsupplier) { + $param .= '&search_refsupplier='.urlencode($search_refsupplier); + } + if ($search_type != '') { + $param .= '&search_type='.urlencode($search_type); + } + if ($search_label) { + $param .= '&search_label='.urlencode($search_label); + } + if ($search_company) { + $param .= '&search_company='.urlencode($search_company); + } + if ($search_login) { + $param .= '&search_login='.urlencode($search_login); + } + if ($search_montant_ht != '') { + $param .= '&search_montant_ht='.urlencode($search_montant_ht); + } + if ($search_montant_vat != '') { + $param .= '&search_montant_vat='.urlencode($search_montant_vat); + } + if ($search_montant_localtax1 != '') { + $param .= '&search_montant_localtax1='.urlencode($search_montant_localtax1); + } + if ($search_montant_localtax2 != '') { + $param .= '&search_montant_localtax2='.urlencode($search_montant_localtax2); + } + if ($search_montant_ttc != '') { + $param .= '&search_montant_ttc='.urlencode($search_montant_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); + } + if ($search_multicurrency_montant_vat != '') { + $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); + } + if ($search_multicurrency_montant_ttc != '') { + $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); + } + if ($search_amount_no_tax) { + $param .= '&search_amount_no_tax='.urlencode($search_amount_no_tax); + } + if ($search_amount_all_tax) { + $param .= '&search_amount_all_tax='.urlencode($search_amount_all_tax); + } + if ($search_status >= 0) { + $param .= "&search_status=".urlencode($search_status); + } + if ($show_files) { + $param .= '&show_files='.urlencode($show_files); + } + if ($option) { + $param .= "&option=".urlencode($option); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_categ_sup > 0) { + $param .= '&search_categ_sup='.urlencode($search_categ_sup); + } + if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -614,27 +852,39 @@ if ($resql) // List of mass actions available $arrayofmassactions = array( - 'validate'=>$langs->trans("Validate"), - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); + if ($conf->paymentbybanktransfer->enabled) { + $langs->load("withdrawals"); + $arrayofmassactions['transfer_request'] = $langs->trans("MakeBankTransferOrder"); + } //if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); if (!empty($conf->paymentbybanktransfer->enabled) && !empty($user->rights->paymentbybanktransfer->create)) { $langs->load('withdrawals'); $arrayofmassactions['banktransfertrequest'] = $langs->trans("MakeBankTransferOrder"); } - if ($user->rights->fournisseur->facture->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); + if ($user->rights->fournisseur->facture->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete', 'createbills'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $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); + if (!empty($socid)) { + $url .= '&socid='.$socid; + } + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)); $i = 0; print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -650,8 +900,7 @@ if ($resql) $trackid = 'sinv'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($massaction == 'createbills') - { + if ($massaction == 'createbills') { //var_dump($_REQUEST); print '<input type="hidden" name="massaction" value="confirm_createbills">'; @@ -690,64 +939,65 @@ if ($resql) print '<br>'; } - if ($search_all) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } - // If the user can view prospects other than his' - $moreforfilter = ''; - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); - $moreforfilter .= '</div>'; - } // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { + $moreforfilter = ''; + if ($user->rights->societe->client->voir || $socid) { + $langs->load("commercial"); $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); - $moreforfilter .= '</div>'; + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'company', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200'); + $moreforfilter .= '</div>'; } // If the user can view prospects other than his' - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) - { + if ($user->rights->societe->client->voir || $socid) { + $moreforfilter .= '<div class="divsearchfield">'; + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + $moreforfilter .= '</div>'; + } + // If the user can view prospects other than his' + 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 .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; + $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '</div>'; } - if (!empty($conf->categorie->enabled)) - { + if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('SuppliersCategoriesShort').': '; - $moreforfilter .= $formother->select_categories('supplier', $search_categ_sup, 'search_categ_sup', 1); + $tmptitle = $langs->trans('SuppliersCategoriesShort'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('supplier', $search_categ_sup, 'search_categ_sup', 1, $tmptitle); $moreforfilter .= '</div>'; } $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if ($moreforfilter) - { - print '<div class="liste_titre liste_titre_bydiv centpercent">'; + if ($moreforfilter) { + print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; } $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); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; @@ -755,22 +1005,19 @@ if ($resql) // Line for filters print '<tr class="liste_titre_filter">'; // Ref - if (!empty($arrayfields['f.ref']['checked'])) - { + if (!empty($arrayfields['f.ref']['checked'])) { print '<td class="liste_titre left">'; print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.$search_ref.'">'; print '</td>'; } // Ref supplier - if (!empty($arrayfields['f.ref_supplier']['checked'])) - { + if (!empty($arrayfields['f.ref_supplier']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat maxwidth50" type="text" name="search_refsupplier" value="'.$search_refsupplier.'">'; print '</td>'; } // Type - if (!empty($arrayfields['f.type']['checked'])) - { + if (!empty($arrayfields['f.type']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone">'; $listtype = array( FactureFournisseur::TYPE_STANDARD=>$langs->trans("InvoiceStandard"), @@ -783,180 +1030,163 @@ if ($resql) { $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); } - */ + */ //$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order. print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100'); print '</td>'; } // Label - if (!empty($arrayfields['f.label']['checked'])) - { + if (!empty($arrayfields['f.label']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat maxwidth75" type="text" name="search_label" value="'.$search_label.'">'; print '</td>'; } // Date invoice - if (!empty($arrayfields['f.datef']['checked'])) - { + if (!empty($arrayfields['f.datef']['checked'])) { print '<td class="liste_titre nowraponall center">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day" value="'.dol_escape_htmltag($day).'">'; + } print '<input class="flat width25 valignmiddle" type="text" size="1" maxlength="2" name="month" value="'.$month.'">'; $formother->select_year($year ? $year : -1, 'year', 1, 20, 5); print '</td>'; } // Date due - if (!empty($arrayfields['f.date_lim_reglement']['checked'])) - { + if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { print '<td class="liste_titre nowraponall center">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day_lim" value="'.dol_escape_htmltag($day_lim).'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="day_lim" value="'.dol_escape_htmltag($day_lim).'">'; + } print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month_lim" value="'.$month_lim.'">'; $formother->select_year($year_lim ? $year_lim : -1, 'year_lim', 1, 20, 5); - print '<br><input type="checkbox" name="option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Late"); + print '<br><input type="checkbox" class="paddingright paddingleft" name="option" id="option" value="late"'.($option == 'late' ? ' checked' : '').'><label for="option">'.$langs->trans("Late").'</label>'; print '</td>'; } // Project - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_project" value="'.$search_project.'"></td>'; } // Thirpdarty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company" value="'.$search_company.'"></td>'; } // Town - if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>'; + if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>'; + } // Zip - if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre center"><input class="flat maxwidth50" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'"></td>'; + if (!empty($arrayfields['s.zip']['checked'])) { + print '<td class="liste_titre center"><input class="flat maxwidth50" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'"></td>'; + } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '</td>'; } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="liste_titre center">'; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print '</td>'; } // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print '</td>'; } // Condition of payment - if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) - { + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { print '<td class="liste_titre left">'; $form->select_conditions_paiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100'); print '</td>'; } // Payment mode - if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) - { + if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print '<td class="liste_titre left">'; $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 20, 1, 'maxwidth100'); print '</td>'; } - if (!empty($arrayfields['f.total_ht']['checked'])) - { + if (!empty($arrayfields['f.total_ht']['checked'])) { // Amount without tax print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">'; print '</td>'; } - if (!empty($arrayfields['f.total_vat']['checked'])) - { + if (!empty($arrayfields['f.total_vat']['checked'])) { // Amount vat print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">'; print '</td>'; } - if (!empty($arrayfields['f.total_localtax1']['checked'])) - { + if (!empty($arrayfields['f.total_localtax1']['checked'])) { // Amount tax 1 print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">'; print '</td>'; } - if (!empty($arrayfields['f.total_localtax2']['checked'])) - { + if (!empty($arrayfields['f.total_localtax2']['checked'])) { // Amount tax 2 - print '<td class="liste_titre right">'; + print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">'; print '</td>'; } - if (!empty($arrayfields['f.total_ttc']['checked'])) - { + if (!empty($arrayfields['f.total_ttc']['checked'])) { // Amount inc tac print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">'; print '</td>'; } - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { // Author print '<td class="liste_titre" align="center">'; print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">'; print '</td>'; } - if (!empty($arrayfields['dynamount_payed']['checked'])) - { + if (!empty($arrayfields['dynamount_payed']['checked'])) { print '<td class="liste_titre right">'; print '</td>'; } - if (!empty($arrayfields['rtp']['checked'])) - { + if (!empty($arrayfields['rtp']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['f.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_code']['checked'])) { // Currency print '<td class="liste_titre">'; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print '</td>'; } - if (!empty($arrayfields['f.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { // Currency rate print '<td class="liste_titre">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).'">'; print '</td>'; } - if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">'; print '</td>'; } - if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">'; print '</td>'; } - if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">'; print '</td>'; } - if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) - { + if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['multicurrency_rtp']['checked'])) - { + if (!empty($arrayfields['multicurrency_rtp']['checked'])) { print '<td class="liste_titre right">'; print '</td>'; } @@ -968,20 +1198,17 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['f.datec']['checked'])) - { + if (!empty($arrayfields['f.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['f.tms']['checked'])) - { + if (!empty($arrayfields['f.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Status - if (!empty($arrayfields['f.fk_statut']['checked'])) - { + if (!empty($arrayfields['f.fk_statut']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone right">'; $liststatus = array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); @@ -996,45 +1223,111 @@ if ($resql) print "</tr>\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER['PHP_SELF'], 'f.ref,f.rowid', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['f.ref_supplier']['label'], $_SERVER["PHP_SELF"], 'f.ref_supplier', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.type']['checked'])) print_liste_field_titre($arrayfields['f.type']['label'], $_SERVER["PHP_SELF"], 'f.type', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.label']['checked'])) print_liste_field_titre($arrayfields['f.label']['label'], $_SERVER['PHP_SELF'], "f.libelle,f.rowid", '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.datef']['checked'])) print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER['PHP_SELF'], 'f.datef,f.rowid', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['f.date_lim_reglement']['checked'])) print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, '', $sortfield, $sortorder, 'center '); - 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['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder, 'center '); - 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 '); - if (!empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); - if (!empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['f.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_code', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_tx', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['multicurrency_dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['multicurrency_rtp']['checked'])) print_liste_field_titre($arrayfields['multicurrency_rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); + if (!empty($arrayfields['f.ref']['checked'])) { + print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER['PHP_SELF'], 'f.ref,f.rowid', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.ref_supplier']['checked'])) { + print_liste_field_titre($arrayfields['f.ref_supplier']['label'], $_SERVER["PHP_SELF"], 'f.ref_supplier', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.type']['checked'])) { + print_liste_field_titre($arrayfields['f.type']['label'], $_SERVER["PHP_SELF"], 'f.type', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.label']['checked'])) { + print_liste_field_titre($arrayfields['f.label']['label'], $_SERVER['PHP_SELF'], "f.libelle,f.rowid", '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.datef']['checked'])) { + print_liste_field_titre($arrayfields['f.datef']['label'], $_SERVER['PHP_SELF'], 'f.datef,f.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { + print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, '', $sortfield, $sortorder, 'center '); + } + 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['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder, 'center '); + } + 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.total_tva', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['f.total_localtax1']['checked'])) { + print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['f.total_localtax2']['checked'])) { + print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['f.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); + } + if (!empty($arrayfields['dynamount_payed']['checked'])) { + print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['rtp']['checked'])) { + print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['f.multicurrency_code']['checked'])) { + print_liste_field_titre($arrayfields['f.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_code', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { + print_liste_field_titre($arrayfields['f.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_tx', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { + print_liste_field_titre($arrayfields['f.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) { + print_liste_field_titre($arrayfields['f.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['f.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) { + print_liste_field_titre($arrayfields['multicurrency_dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['multicurrency_rtp']['checked'])) { + print_liste_field_titre($arrayfields['multicurrency_rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $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['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.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, '', $sortfield, $sortorder, 'right '); + 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.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; @@ -1043,12 +1336,10 @@ if ($resql) $projectstatic = new Project($db); $userstatic = new User($db); - if ($num > 0) - { + if ($num > 0) { $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $datelimit = $db->jdate($obj->datelimite); @@ -1102,8 +1393,7 @@ if ($resql) } print '<tr class="oddeven">'; - if (!empty($arrayfields['f.ref']['checked'])) - { + if (!empty($arrayfields['f.ref']['checked'])) { print '<td class="nowrap">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">'; @@ -1118,253 +1408,301 @@ if ($resql) print '</td></tr></table>'; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Supplier ref - if (!empty($arrayfields['f.ref_supplier']['checked'])) - { - print '<td class="nowrap tdoverflowmax200">'; + if (!empty($arrayfields['f.ref_supplier']['checked'])) { + print '<td class="nowrap tdoverflowmax150" title="'.dol_escape_htmltag($obj->ref_supplier).'">'; print $obj->ref_supplier; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type - if (!empty($arrayfields['f.type']['checked'])) - { + if (!empty($arrayfields['f.type']['checked'])) { print '<td class="nowrap">'; print $facturestatic->getLibType(); print "</td>"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label - if (!empty($arrayfields['f.label']['checked'])) - { + if (!empty($arrayfields['f.label']['checked'])) { print '<td class="nowrap">'; print $obj->label; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date - if (!empty($arrayfields['f.datef']['checked'])) - { + if (!empty($arrayfields['f.datef']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->datef), 'day'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date limit - if (!empty($arrayfields['f.date_lim_reglement']['checked'])) - { + if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { print '<td class="center nowrap">'.dol_print_date($datelimit, 'day'); - if ($facturestatic->hasDelay()) - { + if ($facturestatic->hasDelay()) { print img_warning($langs->trans('Late')); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="nowrap">'; - if ($obj->project_id > 0) - { + if ($obj->project_id > 0) { $projectstatic->id = $obj->project_id; $projectstatic->ref = $obj->project_ref; $projectstatic->title = $obj->project_label; print $projectstatic->getNomUrl(1); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="tdoverflowmax200">'; print $thirdparty->getNomUrl(1, 'supplier'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.town']['checked'])) { print '<td class="nocellnopadd">'; print $obj->town; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print '<td class="nocellnopadd center">'; print $obj->zip; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "<td>".$obj->state_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="center">'; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="center">'; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (empty($typenArray)) { + $typenArray = $formcompany->typent_array(1); + } print $typenArray[$obj->typent_code]; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Payment condition - if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) - { - print '<td>'; + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { + print '<td class="tdoverflowmax125">'; $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', '', -1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Payment mode - if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) - { - print '<td>'; + if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { + print '<td class="tdoverflowmax125">'; $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['f.total_ht']['checked'])) - { - print '<td class="right nowrap">'.price($obj->total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; + if (!empty($arrayfields['f.total_ht']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; + } $totalarray['val']['f.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['f.total_vat']['checked'])) - { - print '<td class="right nowrap">'.price($obj->total_vat)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat'; + if (!empty($arrayfields['f.total_vat']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->total_vat)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat'; + } $totalarray['val']['f.total_vat'] += $obj->total_vat; } // Amount LocalTax1 - if (!empty($arrayfields['f.total_localtax1']['checked'])) - { - print '<td class="right nowrap">'.price($obj->total_localtax1)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1'; + if (!empty($arrayfields['f.total_localtax1']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->total_localtax1)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1'; + } $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1; } // Amount LocalTax2 - if (!empty($arrayfields['f.total_localtax2']['checked'])) - { - print '<td class="right nowrap">'.price($obj->total_localtax2)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2'; + if (!empty($arrayfields['f.total_localtax2']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->total_localtax2)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2'; + } $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2; } // Amount TTC - if (!empty($arrayfields['f.total_ttc']['checked'])) - { - print '<td class="right nowrap">'.price($obj->total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc'; + if (!empty($arrayfields['f.total_ttc']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc'; + } $totalarray['val']['f.total_ttc'] += $obj->total_ttc; } // Author - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; print '<td align="center">'; - if ($userstatic->id) print $userstatic->getLoginUrl(1); - else print '&nbsp;'; + if ($userstatic->id) { + print $userstatic->getLoginUrl(1); + } else { + print '&nbsp;'; + } print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['dynamount_payed']['checked'])) - { - print '<td class="right nowrap">'.(!empty($totalpay) ?price($totalpay, 0, $langs) : '&nbsp;').'</td>'; // TODO Use a denormalized field - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; + if (!empty($arrayfields['dynamount_payed']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.(!empty($totalpay) ?price($totalpay, 0, $langs) : '').'</span></td>'; // TODO Use a denormalized field + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; + } $totalarray['val']['totalam'] += $totalpay; } - if (!empty($arrayfields['rtp']['checked'])) - { + if (!empty($arrayfields['rtp']['checked'])) { print '<td class="right nowrap">'.(!empty($remaintopay) ?price($remaintopay, 0, $langs) : '&nbsp;').'</td>'; // TODO Use a denormalized field - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'rtp'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'rtp'; + } $totalarray['val']['rtp'] += $remaintopay; } // Currency - if (!empty($arrayfields['f.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_code']['checked'])) { print '<td class="nowrap">'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency rate - if (!empty($arrayfields['f.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { print '<td class="nowrap">'; $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount VAT - if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_vat)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_vat)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount TTC - if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) - { - print '<td class="right nowrap">'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : '&nbsp;').'</td>'; // TODO Use a denormalized field - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : '').'</span></td>'; // TODO Use a denormalized field + if (!$i) { + $totalarray['nbfield']++; + } } // Pending amount - if (!empty($arrayfields['multicurrency_rtp']['checked'])) - { - print '<td class="right nowrap">'; - print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : '&nbsp;'); - print '</td>'; // TODO Use a denormalized field - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['multicurrency_rtp']['checked'])) { + print '<td class="right nowrap"><span class="amount">'; + print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : ''); + print '</span></td>'; // TODO Use a denormalized field + if (!$i) { + $totalarray['nbfield']++; + } } @@ -1374,41 +1712,48 @@ if ($resql) $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['f.datec']['checked'])) - { + if (!empty($arrayfields['f.datec']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['f.tms']['checked'])) - { + if (!empty($arrayfields['f.tms']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['f.fk_statut']['checked'])) - { + if (!empty($arrayfields['f.fk_statut']['checked'])) { print '<td class="right nowrap">'; print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type); print "</td>"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->facid, $arrayofselected)) $selected = 1; + if (in_array($obj->facid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->facid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->facid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; @@ -1431,7 +1776,9 @@ if ($resql) print "</form>\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index c98ad3ba1d8..2f749af54f7 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -40,13 +40,15 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); $object->fetch($id, $ref); -$permissionnote = $user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); // Used by the include of actions_setnotes.inc.php /* @@ -56,11 +58,12 @@ $permissionnote = $user->rights->fournisseur->facture->creer; // Used by the inc include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once // Set label -if ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) -{ +if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { $object->label = $_POST['label']; $result = $object->update($user); - if ($result < 0) dol_print_error($db); + if ($result < 0) { + dol_print_error($db); + } } @@ -74,8 +77,7 @@ $title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Notes'); $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; llxHeader('', $title, $helpurl); -if ($object->id > 0) -{ +if ($object->id > 0) { $object->fetch_thirdparty(); $alreadypaid = $object->getSommePaiement(); @@ -94,14 +96,14 @@ if ($object->id > 0) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { + if ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer) { if ($action != 'classify') { // $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; @@ -143,36 +145,34 @@ if ($object->id > 0) // Type print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td>'; print $object->getLibType(); - if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) - { + 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) - { + 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) - { + if (count($facidavoir) > 0) { print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; - foreach ($facidavoir as $fid) - { - if ($i == 0) print ' '; - else print ','; + foreach ($facidavoir as $fid) { + if ($i == 0) { + print ' '; + } else { + print ','; + } $facavoir = new FactureFournisseur($db); $facavoir->fetch($fid); print $facavoir->getNomUrl(1); } print ')'; } - if ($facidnext > 0) - { + if ($facidnext > 0) { $facthatreplace = new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; @@ -190,14 +190,12 @@ 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 ($societe->localtax1_assuj == "1") { //Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; } - if ($societe->localtax2_assuj == "1") //Localtax2 - { + if ($societe->localtax2_assuj == "1") { //Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>'; print '<td>'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>'; print '</tr>'; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index a7619cd84ac..1efb8fce26b 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -9,7 +9,7 @@ * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,15 +42,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'bills', 'banks', 'compta')); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); -$facid = GETPOST('facid', 'int'); -$socid = GETPOST('socid', 'int'); +$facid = GETPOST('facid', 'int'); +$socid = GETPOST('socid', 'int'); $accountid = GETPOST('accountid', 'int'); $day = GETPOST('day', 'int'); -$month = GETPOST('month', 'int'); +$month = GETPOST('month', 'int'); $year = GETPOST('year', 'int'); $search_ref = GETPOST("search_ref", "alpha"); @@ -64,12 +64,18 @@ $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 (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.rowid"; +} $amounts = array(); $amountsresttopay = array(); @@ -79,8 +85,7 @@ $multicurrency_amounts = array(); $multicurrency_amountsresttopay = array(); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $socid = $user->socid; } @@ -103,8 +108,7 @@ $arrayfields = array(); * 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 -{ +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 = ""; @@ -119,12 +123,12 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm == 'yes')) - { +if (empty($reshook)) { + if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm == 'yes')) { $error = 0; $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); @@ -135,10 +139,8 @@ if (empty($reshook)) // Generate payment array and check if there is payment higher than invoice and payment date before invoice date $tmpinvoice = new FactureFournisseur($db); - foreach ($_POST as $key => $value) - { - if (substr($key, 0, 7) == 'amount_') - { + foreach ($_POST as $key => $value) { + if (substr($key, 0, 7) == 'amount_') { $cursorfacid = substr($key, 7); $amounts[$cursorfacid] = price2num(GETPOST($key)); if (!empty($amounts[$cursorfacid])) { @@ -150,19 +152,18 @@ if (empty($reshook)) } } $result = $tmpinvoice->fetch($cursorfacid); - if ($result <= 0) dol_print_error($db); + if ($result <= 0) { + dol_print_error($db); + } $amountsresttopay[$cursorfacid] = price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement()); - if ($amounts[$cursorfacid]) - { + if ($amounts[$cursorfacid]) { // Check amount - if ($amounts[$cursorfacid] && (abs($amounts[$cursorfacid]) > abs($amountsresttopay[$cursorfacid]))) - { + if ($amounts[$cursorfacid] && (abs($amounts[$cursorfacid]) > abs($amountsresttopay[$cursorfacid]))) { $addwarning = 1; $formquestion['text'] = img_warning($langs->trans("PaymentHigherThanReminderToPaySupplier")).' '.$langs->trans("HelpPaymentHigherThanReminderToPaySupplier"); } // Check date - if ($datepaye && ($datepaye < $tmpinvoice->date)) - { + if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); //$error++; setEventMessages($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye, 'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), null, 'warnings'); @@ -170,26 +171,26 @@ 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] = (GETPOST($key) ? price2num(GETPOST($key)) : 0); $multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid]; - if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++; + if (!empty($multicurrency_amounts[$cursorfacid])) { + $atleastonepaymentnotnull++; + } $result = $tmpinvoice->fetch($cursorfacid); - if ($result <= 0) dol_print_error($db); + if ($result <= 0) { + dol_print_error($db); + } $multicurrency_amountsresttopay[$cursorfacid] = price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement(1)); - if ($multicurrency_amounts[$cursorfacid]) - { + if ($multicurrency_amounts[$cursorfacid]) { // Check amount - if ($multicurrency_amounts[$cursorfacid] && (abs($multicurrency_amounts[$cursorfacid]) > abs($multicurrency_amountsresttopay[$cursorfacid]))) - { + if ($multicurrency_amounts[$cursorfacid] && (abs($multicurrency_amounts[$cursorfacid]) > abs($multicurrency_amountsresttopay[$cursorfacid]))) { $addwarning = 1; $formquestion['text'] = img_warning($langs->trans("PaymentHigherThanReminderToPaySupplier")).' '.$langs->trans("HelpPaymentHigherThanReminderToPaySupplier"); } // Check date - if ($datepaye && ($datepaye < $tmpinvoice->date)) - { + if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); //$error++; setEventMessages($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye, 'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), null, 'warnings'); @@ -201,37 +202,31 @@ if (empty($reshook)) } // Check parameters - if ($_POST['paiementid'] <= 0) - { + if ($_POST['paiementid'] <= 0) { setEventMessages($langs->transnoentities('ErrorFieldRequired', $langs->transnoentities('PaymentMode')), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { // If bank module is on, account is required to enter a payment - if (GETPOST('accountid') <= 0) - { + if (GETPOST('accountid') <= 0) { setEventMessages($langs->transnoentities('ErrorFieldRequired', $langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } } - if (empty($totalpayment) && empty($multicurrency_totalpayment) && empty($atleastonepaymentnotnull)) - { + if (empty($totalpayment) && empty($multicurrency_totalpayment) && empty($atleastonepaymentnotnull)) { setEventMessages($langs->transnoentities('ErrorFieldRequired', $langs->trans('PaymentAmount')), null, 'errors'); $error++; } - if (empty($datepaye)) - { + if (empty($datepaye)) { setEventMessages($langs->transnoentities('ErrorFieldRequired', $langs->transnoentities('Date')), null, 'errors'); $error++; } // Check if payments in both currency - if ($totalpayment > 0 && $multicurrency_totalpayment > 0) - { + if ($totalpayment > 0 && $multicurrency_totalpayment > 0) { setEventMessages($langs->transnoentities('ErrorPaymentInBothCurrency'), null, 'errors'); $error++; } @@ -240,10 +235,8 @@ if (empty($reshook)) /* * Action add_paiement */ - if ($action == 'add_paiement') - { - if ($error) - { + if ($action == 'add_paiement') { + if ($error) { $action = 'create'; } // All the next of this action is displayed at the page's bottom. @@ -253,30 +246,25 @@ if (empty($reshook)) /* * Action confirm_paiement */ - if ($action == 'confirm_paiement' && $confirm == 'yes') - { + if ($action == 'confirm_paiement' && $confirm == 'yes') { $error = 0; $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); // Clean parameters amount if payment is for a credit note - foreach ($amounts as $key => $value) // How payment is dispatched - { + foreach ($amounts as $key => $value) { // How payment is dispatched $tmpinvoice = new FactureFournisseur($db); $tmpinvoice->fetch($key); - if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) - { + if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) { $newvalue = price2num($value, 'MT'); $amounts[$key] = - abs($newvalue); } } - foreach ($multicurrency_amounts as $key => $value) // How payment is dispatched - { + foreach ($multicurrency_amounts as $key => $value) { // How payment is dispatched $tmpinvoice = new FactureFournisseur($db); $tmpinvoice->fetch($key); - if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) - { + if ($tmpinvoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) { $newvalue = price2num($value, 'MT'); $multicurrency_amounts[$key] = - abs($newvalue); } @@ -286,12 +274,13 @@ if (empty($reshook)) //var_dump($multicurrency_amounts); //exit; - if (!$error) - { + if (!$error) { $db->begin(); $thirdparty = new Societe($db); - if ($socid > 0) $thirdparty->fetch($socid); + if ($socid > 0) { + $thirdparty->fetch($socid); + } // Creation of payment line $paiement = new PaiementFourn($db); @@ -305,43 +294,42 @@ if (empty($reshook)) $paiement->num_payment = $paiement->num_payment; $paiement->note_private = $paiement->note_private; - if (!$error) - { + if (!$error) { $paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices') == 'on' ? 1 : 0), $thirdparty); - if ($paiement_id < 0) - { + if ($paiement_id < 0) { setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $result = $paiement->addPaymentToBank($user, 'payment_supplier', '(SupplierInvoicePayment)', $accountid, '', ''); - if ($result < 0) - { + if ($result < 0) { setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $db->commit(); // If payment dispatching on more than one invoice, we stay on summary page, otherwise go on invoice card $invoiceid = 0; - foreach ($paiement->amounts as $key => $amount) - { + foreach ($paiement->amounts as $key => $amount) { $facid = $key; - if (is_numeric($amount) && $amount <> 0) - { - if ($invoiceid != 0) $invoiceid = -1; // There is more than one invoice payed by this payment - else $invoiceid = $facid; + if (is_numeric($amount) && $amount <> 0) { + if ($invoiceid != 0) { + $invoiceid = -1; // There is more than one invoice payed by this payment + } else { + $invoiceid = $facid; + } } } - if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$invoiceid; - else $loc = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$paiement_id; + if ($invoiceid > 0) { + $loc = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$invoiceid; + } else { + $loc = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$paiement_id; + } header('Location: '.$loc); exit; } else { @@ -364,8 +352,7 @@ $invoicesupplierstatic = new FactureFournisseur($db); llxHeader('', $langs->trans('ListPayment')); -if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paiement') -{ +if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paiement') { $object = new FactureFournisseur($db); $result = $object->fetch($facid); @@ -374,26 +361,29 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql = 'SELECT s.nom as name, s.rowid as socid,'; $sql .= ' f.rowid, f.ref, f.ref_supplier, f.total_ttc as total, f.fk_mode_reglement, f.fk_account'; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'facture_fourn as f'; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + 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.rowid = '.$facid; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $db->fetch_object($resql); $total = $obj->total; print load_fiche_titre($langs->trans('DoPayment')); // Add realtime total information - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n".'<script type="text/javascript" language="javascript">'; print '$(document).ready(function () { @@ -409,6 +399,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } function callForResult(imgId) { + console.log("callForResult Calculate total of payment"); var json = {}; var form = $("#payment_form"); @@ -445,6 +436,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } }); } + callForResult(); $("#payment_form").find("input.amount").change(function() { callForResult(); }); @@ -489,9 +481,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<tr><td class="fieldrequired">'.$langs->trans('PaymentMode').'</td><td>'; $form->select_types_paiements(empty($_POST['paiementid']) ? $obj->fk_mode_reglement : $_POST['paiementid'], 'paiementid'); print '</td>'; - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>'; + print img_picto('', 'bank_account', 'class="pictofixedwidth"'); $form->select_comptes(empty($accountid) ? $obj->fk_account : $accountid, 'accountid', 0, '', 2); print '</td></tr>'; } else { @@ -508,11 +500,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $parameters = array('facid'=>$facid, 'ref'=>$ref, 'objcanvas'=>$objcanvas); $reshook = $hookmanager->executeHooks('paymentsupplierinvoices', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; - if (empty($reshook)) - { + if (empty($reshook)) { /* - * All unpaid supplier invoices - */ + * All unpaid supplier invoices + */ $sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ht, f.total_ttc,'; $sql .= ' f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc,'; $sql .= ' f.datef as df, f.date_lim_reglement as dlr,'; @@ -523,8 +514,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql .= ' AND f.fk_soc = '.$object->socid; $sql .= ' AND f.paye = 0'; $sql .= ' AND f.fk_statut = 1'; // Status=0 => unvalidated, Status=2 => canceled - if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) - { + if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) { $sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation } else { $sql .= ' AND f.type = 2'; // If paying back a credit note, we show all credit notes @@ -535,11 +525,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql .= ' ORDER BY f.datef ASC, f.ref ASC'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $i = 0; print '<br>'; @@ -562,26 +550,31 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<td>'.$langs->trans('RefSupplier').'</td>'; print '<td class="center">'.$langs->trans('Date').'</td>'; print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td>'.$langs->trans('Currency').'</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>'; + if (!empty($conf->multicurrency->enabled)) { + print '<td>'.$langs->trans('Currency').'</td>'; + print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>'; + print '<td class="right">'.$langs->trans('MulticurrencyAlreadyPaid').'</td>'; + print '<td class="right">'.$langs->trans('MulticurrencyRemainderToPay').'</td>'; + } print '<td class="right">'.$langs->trans('AmountTTC').'</td>'; print '<td class="right">'.$langs->trans('AlreadyPaid').'</td>'; print '<td class="right">'.$langs->trans('RemainderToPay').'</td>'; print '<td class="center">'.$langs->trans('PaymentAmount').'</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td class="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>'; + if (!empty($conf->multicurrency->enabled)) { + print '<td class="center">'.$langs->trans('MulticurrencyPaymentAmount').'</td>'; + } print '</tr>'; $total = 0; $total_ttc = 0; $totalrecu = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $sign = 1; - if ($objp->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1; + if ($objp->type == FactureFournisseur::TYPE_CREDIT_NOTE) { + $sign = -1; + } $invoice = new FactureFournisseur($db); $invoice->fetch($objp->facid); @@ -596,8 +589,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT'); // Multicurrency Price - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $multicurrency_payment = $invoice->getSommePaiement(1); $multicurrency_creditnotes = $invoice->getSumCreditNotesUsed(1); $multicurrency_deposits = $invoice->getSumDepositsUsed(1); @@ -616,8 +608,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<td>'.$objp->ref_supplier.'</td>'; // Date - if ($objp->df > 0) - { + if ($objp->df > 0) { print '<td class="center nowraponall">'; print dol_print_date($db->jdate($objp->df), 'day').'</td>'; } else { @@ -625,13 +616,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } // Date Max Payment - if ($objp->dlr > 0) - { + if ($objp->dlr > 0) { print '<td class="center nowraponall">'; print dol_print_date($db->jdate($objp->dlr), 'day'); - if ($invoice->hasDelay()) - { + if ($invoice->hasDelay()) { print img_warning($langs->trans('Late')); } @@ -641,28 +630,24 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Currency print '<td class="center">'.$objp->multicurrency_code."</td>\n"; print '<td class="right">'; - if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) - { + if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { print price($objp->multicurrency_total_ttc); } print '</td>'; print '<td class="right">'; - if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) - { + if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { print price($objp->multicurrency_am); } print '</td>'; print '<td class="right">'; - if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) - { + if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { print price($objp->multicurrency_total_ttc - $objp->multicurrency_am); } print '</td>'; @@ -671,8 +656,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<td class="right">'.price($sign * $objp->total_ttc).'</td>'; print '<td class="right">'.price($sign * $objp->am); - if ($creditnotes) print '+'.price($creditnotes); - if ($deposits) print '+'.price($deposits); + if ($creditnotes) { + print '+'.price($creditnotes); + } + if ($deposits) { + print '+'.price($deposits); + } print '</td>'; print '<td class="right">'.price($sign * $remaintopay).'</td>'; @@ -683,33 +672,31 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $namef = 'amount_'.$objp->facid; $nameRemain = 'remain_'.$objp->facid; - if ($action != 'add_paiement') - { - if (!empty($conf->use_javascript_ajax)) + if ($action != 'add_paiement') { + if (!empty($conf->use_javascript_ajax)) { print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); + } print '<input type="hidden" class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">'; - print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; + print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult(); } else { print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>'; - print '<input type="hidden" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; + print '<input type="hidden" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult(); } print "</td>"; // Multicurrency Price - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<td class="right">'; // Add remind multicurrency amount $namef = 'multicurrency_amount_'.$objp->facid; $nameRemain = 'multicurrency_remain_'.$objp->facid; - if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) - { - if ($action != 'add_paiement') - { - if (!empty($conf->use_javascript_ajax)) + if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) { + if ($action != 'add_paiement') { + if (!empty($conf->use_javascript_ajax)) { print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'"); + } print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">'; print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">'; } else { @@ -728,23 +715,30 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $totalrecudeposits += $deposits; $i++; } - if ($i > 1) - { + if ($i > 1) { // Print total print '<tr class="liste_total">'; print '<td colspan="4" class="left">'.$langs->trans('TotalTTC').':</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td>&nbsp;</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td>&nbsp;</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td>&nbsp;</td>'; - if (!empty($conf->multicurrency->enabled)) print '<td>&nbsp;</td>'; + if (!empty($conf->multicurrency->enabled)) { + print '<td>&nbsp;</td>'; + print '<td>&nbsp;</td>'; + print '<td>&nbsp;</td>'; + print '<td>&nbsp;</td>'; + } print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>'; print '<td class="right"><b>'.price($sign * $totalrecu); - if ($totalrecucreditnote) print '+'.price($totalrecucreditnote); - if ($totalrecudeposits) print '+'.price($totalrecudeposits); + if ($totalrecucreditnote) { + print '+'.price($totalrecucreditnote); + } + if ($totalrecudeposits) { + print '+'.price($totalrecudeposits); + } print '</b></td>'; print '<td class="right"><b>'.price($sign * price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>'; print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled - if (!empty($conf->multicurrency->enabled)) print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>'; + if (!empty($conf->multicurrency->enabled)) { + print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>'; + } print "</tr>\n"; } print "</table>\n"; @@ -758,25 +752,23 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } // Save Button - if ($action != 'add_paiement') - { + if ($action != 'add_paiement') { print '<br><div class="center"><input type="checkbox" checked name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically"); print '<br><input type="submit" class="button" value="'.$langs->trans('ToMakePayment').'"></div>'; } // Form to confirm payment - if ($action == 'add_paiement') - { + if ($action == 'add_paiement') { $preselectedchoice = $addwarning ? 'no' : 'yes'; print '<br>'; - if (!empty($totalpayment)) $text = $langs->trans('ConfirmSupplierPayment', price($totalpayment), $langs->trans("Currency".$conf->currency)); - if (!empty($multicurrency_totalpayment)) - { + if (!empty($totalpayment)) { + $text = $langs->trans('ConfirmSupplierPayment', price($totalpayment), $langs->trans("Currency".$conf->currency)); + } + if (!empty($multicurrency_totalpayment)) { $text .= '<br>'.$langs->trans('ConfirmSupplierPayment', price($multicurrency_totalpayment), $langs->trans("paymentInInvoiceCurrency")); } - if (GETPOST('closepaidinvoices')) - { + if (GETPOST('closepaidinvoices')) { $text .= '<br>'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print '<input type="hidden" name="closepaidinvoices" value="'.GETPOST('closepaidinvoices').'">'; } @@ -785,7 +777,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '</form>'; } - } 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 9ae7970d7db..fe2bb78008d 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -32,36 +32,39 @@ $langs->loadLangs(array('bills')); // Security check $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $action = GETPOST('action', 'aZ09'); $socid = 0; -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } $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 +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 = GETPOST("year", 'int'); -if (!$year) { $year = date("Y"); } +if (!$year) { + $year = date("Y"); +} /* * Actions */ -if ($action == 'builddoc') -{ +if ($action == 'builddoc') { $rap = new pdf_paiement_fourn($db); $outputlangs = $langs; - if (GETPOST('lang_id', 'aZ09')) - { + if (GETPOST('lang_id', 'aZ09')) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang(GETPOST('lang_id', 'aZ09')); } @@ -69,8 +72,7 @@ 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, GETPOST("remonth", 'int'), GETPOST("reyear", 'int'), $outputlangs) > 0) - { + if ($rap->write_file($dir, GETPOST("remonth", 'int'), GETPOST("reyear", 'int'), $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; } else { $outputlangs->charset_output = $sav_charset_output; @@ -114,15 +116,11 @@ clearstatcache(); // Show link on other years $linkforyear = array(); $found = 0; -if (is_dir($dir)) -{ +if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (is_dir($dir.'/'.$file) && !preg_match('/^\./', $file) && is_numeric($file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (is_dir($dir.'/'.$file) && !preg_match('/^\./', $file) && is_numeric($file)) { $found = 1; $linkforyear[] = $file; } @@ -130,18 +128,17 @@ if (is_dir($dir)) } } asort($linkforyear); -foreach ($linkforyear as $cursoryear) -{ +foreach ($linkforyear as $cursoryear) { print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$cursoryear.'">'.$cursoryear.'</a> &nbsp;'; } -if ($year) -{ - if (is_dir($dir.'/'.$year)) - { +if ($year) { + if (is_dir($dir.'/'.$year)) { $handle = opendir($dir.'/'.$year); - if ($found) print '<br>'; + if ($found) { + print '<br>'; + } print '<br>'; print '<table width="100%" class="noborder">'; print '<tr class="liste_titre">'; @@ -150,12 +147,9 @@ if ($year) print '<td class="right">'.$langs->trans("Date").'</td>'; print '</tr>'; - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/^supplier_payment/i', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^supplier_payment/i', $file)) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; print '<tr class="oddeven"><td><a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart=facture_fournisseur&amp;file=payments/'.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a>'.$formfile->showPreview($file, 'facture_fournisseur', 'payments/'.$relativepath, 0).'</td>'; diff --git a/htdocs/fourn/facture/tpl/index.html b/htdocs/fourn/facture/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 4456d27c539..c3ca301ed45 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -19,8 +19,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; } @@ -38,24 +37,26 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("bills"); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>"> - <td><?php echo $langs->trans("SupplierInvoice"); ?></td> - <td><a href="<?php echo DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowBill"), "bill").' '.$objectlink->ref; ?></a></td> - <td class="left"><?php echo $objectlink->ref_supplier; ?></td> - <td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td> - <td class="right"><?php + <tr class="<?php echo $trclass; ?>"> + <td><?php echo $langs->trans("SupplierInvoice"); ?></td> + <td><a href="<?php echo DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowBill"), "bill").' '.$objectlink->ref; ?></a></td> + <td class="left"><?php echo $objectlink->ref_supplier; ?></td> + <td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td> + <td class="right"><?php if ($user->rights->fournisseur->facture->lire) { $sign = 1; - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) $sign = -1; - if ($objectlink->statut != 3) - { + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { + $sign = -1; + } + if ($objectlink->statut != 3) { // If not abandonned $total = $total + $sign * $objectlink->total_ht; echo price($objectlink->total_ht); @@ -63,24 +64,23 @@ foreach ($linkedObjectBlock as $key => $objectlink) echo '<strike>'.price($objectlink->total_ht).'</strike>'; } } ?></td> - <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> - </tr> - <?php + <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> + </tr> + <?php } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> - <td><?php echo $langs->trans("Total"); ?></td> - <td></td> - <td class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php + <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> + <td><?php echo $langs->trans("Total"); ?></td> + <td></td> + <td class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php } print "<!-- END PHP TEMPLATE -->\n"; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 5d82021bf3c..4a761ea8b70 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -32,7 +32,9 @@ $langs->loadLangs(array("suppliers", "orders", "companies")); // Security check $socid = GETPOST("socid", 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, ''); @@ -58,15 +60,18 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; $sql = "SELECT count(cf.rowid), cf.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; +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 cf.fk_soc = s.rowid "; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; +} $sql .= " AND cf.entity = ".$conf->entity; $sql .= " GROUP BY cf.fk_statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -74,8 +79,7 @@ if ($resql) print '<tr class="liste_titre"><td>'.$langs->trans("Orders").'</td><td class="center">'.$langs->trans("Nb").'</td><td>&nbsp;</td>'; print "</tr>\n"; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); print '<tr class="oddeven">'; @@ -95,35 +99,37 @@ if ($resql) // Draft orders -if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) -{ +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { $langs->load("orders"); $sql = "SELECT cf.rowid, cf.ref, cf.total_ttc,"; $sql .= " s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; + 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 cf.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; + } $sql .= " AND cf.entity = ".$conf->entity; $sql .= " AND cf.fk_statut = 0"; - if ($socid) $sql .= " AND cf.fk_soc = ".$socid; + if ($socid) { + $sql .= " AND cf.fk_soc = ".$socid; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $total = 0; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<td colspan="3">'.$langs->trans("DraftOrders").'<span class="badge marginleftonlyshort">'.$num.'</span></td></tr>'; $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven"><td class="nowrap">'; @@ -141,8 +147,7 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP $i++; $total += $obj->total_ttc; } - if ($total > 0) - { + if ($total > 0) { print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>"; } print "</table>"; @@ -152,34 +157,36 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP } // Draft invoices -if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) -{ +if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $sql = "SELECT ff.ref_supplier, ff.rowid, ff.total_ttc, ff.type"; $sql .= ", s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; + 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 s.rowid = ff.fk_soc"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; + } $sql .= " AND ff.entity = ".$conf->entity; $sql .= " AND ff.fk_statut = 0"; - if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if ($socid) { + $sql .= " AND f.fk_soc = ".$socid; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<td colspan="3">'.$langs->trans("DraftBills").'<span class="badge marginleftonlyshort">'.$num.'</span></td></tr>'; $i = 0; $tot_ttc = 0; - while ($i < $num && $i < 20) - { + while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); print '<tr class="oddeven"><td class="nowrap">'; @@ -226,18 +233,23 @@ $sql = "SELECT s.rowid as socid, s.nom as name, s.town, s.datec, s.tms, s.prefix $sql .= ", st.libelle as stcomm"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.fk_stcomm = st.id"; $sql .= " AND s.fournisseur = 1"; $sql .= " AND s.entity IN (".getEntity('societe').")"; -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; +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); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $langs->load("boxes"); $num = $db->num_rows($resql); $i = 0; @@ -248,8 +260,7 @@ if ($resql) print '<td class="right">'.$langs->trans("DateModification")."</td>\n"; print "</tr>\n"; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td><a href="card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowSupplier"), "company").'</a>'; print "&nbsp;<a href=\"card.php?socid=".$obj->socid."\">".$obj->name."</a></td>\n"; @@ -271,8 +282,7 @@ if ($resql) $companystatic->LoadSupplierCateg(); $categstatic = new Categorie($db); -if (count($companystatic->SupplierCategories)) -{ +if (count($companystatic->SupplierCategories)) { print '<br>'; print '<table class="liste centpercent">'; @@ -280,8 +290,7 @@ if (count($companystatic->SupplierCategories)) print $langs->trans("Category"); print "</td></tr>\n"; - foreach ($companystatic->SupplierCategories as $rowid => $label) - { + foreach ($companystatic->SupplierCategories as $rowid => $label) { print '<tr class="oddeven">'."\n"; print '<td>'; $categstatic->id = $rowid; diff --git a/htdocs/fourn/js/lib_dispatch.js.php b/htdocs/fourn/js/lib_dispatch.js.php index b4090e8a34d..fd15894b4ec 100644 --- a/htdocs/fourn/js/lib_dispatch.js.php +++ b/htdocs/fourn/js/lib_dispatch.js.php @@ -21,13 +21,27 @@ * \brief File that include javascript functions used for dispatching qty/stock/lot */ -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -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('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', 1); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} session_cache_limiter('public'); @@ -36,8 +50,11 @@ require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} ?> /** @@ -76,9 +93,7 @@ function addDispatchLine(index, type, mode) if (qtyOrdered <= 1) { window.alert("Quantity can't be split"); - } - if (qtyDispatched < qtyOrdered) - { + } else if (qtyDispatched < qtyOrdered) { //replace tr suffix nbr $row.html($row.html().replace(/_0_/g,"_"+nbrTrs+"_")); //create new select2 to avoid duplicate id of cloned one diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index a69b450fa84..ccc29105e4f 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -39,6 +39,8 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $object = new PaiementFourn($db); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('supplierpaymentcard', 'globalcard')); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. @@ -46,7 +48,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // Now check also permission on thirdparty of invoices of payments. Thirdparty were loaded by the fetch_object before based on first invoice. // It should be enough because all payments are done on invoices of the same thirdparty. if ($socid && $socid != $object->thirdparty->id) { @@ -58,14 +62,12 @@ if ($socid && $socid != $object->thirdparty->id) { * Actions */ -if ($action == 'setnote' && $user->rights->fournisseur->facture->creer) -{ +if ($action == 'setnote' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { $db->begin(); $object->fetch($id); $result = $object->update_note(GETPOST('note', 'restricthtml')); - if ($result > 0) - { + if ($result > 0) { $db->commit(); $action = ''; } else { @@ -74,14 +76,12 @@ if ($action == 'setnote' && $user->rights->fournisseur->facture->creer) } } -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->facture->supprimer) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->facture->supprimer) { $db->begin(); $object->fetch($id); $result = $object->delete(); - if ($result > 0) - { + if ($result > 0) { $db->commit(); header('Location: '.DOL_URL_ROOT.'/fourn/paiement/list.php'); exit; @@ -92,15 +92,13 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisse } if ($action == 'confirm_validate' && $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->facture->creer) || !empty($user->rights->supplier_invoice->creer))) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate))) -) -{ +) { $db->begin(); $object->fetch($id); - if ($object->validate() >= 0) - { + if ($object->validate() >= 0) { $db->commit(); header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; @@ -110,25 +108,21 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && } } -if ($action == 'setnum_paiement' && !empty($_POST['num_paiement'])) -{ +if ($action == 'setnum_paiement' && !empty($_POST['num_paiement'])) { $object->fetch($id); $res = $object->update_num($_POST['num_paiement']); - if ($res === 0) - { + if ($res === 0) { setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs'); } else { setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors'); } } -if ($action == 'setdatep' && !empty($_POST['datepday'])) -{ +if ($action == 'setdatep' && !empty($_POST['datepday'])) { $object->fetch($id); $datepaye = dol_mktime(GETPOST('datephour', 'int'), GETPOST('datepmin', 'int'), GETPOST('datepsec', 'int'), GETPOST('datepmonth', 'int'), GETPOST('datepday', 'int'), GETPOST('datepyear', 'int')); $res = $object->update_date($datepaye); - if ($res === 0) - { + if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); } else { setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors'); @@ -157,21 +151,18 @@ $head = payment_supplier_prepare_head($object); print dol_get_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment'); -if ($result > 0) -{ +if ($result > 0) { /* * Confirmation of payment's delete */ - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete'); } /* * Confirmation of payment's validation */ - if ($action == 'validate') - { + if ($action == 'validate') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_validate'); } @@ -187,13 +178,13 @@ if ($result > 0) /*print '<tr>'; print '<td width="20%">'.$langs->trans('Ref').'</td><td>'; - print $form->showrefnav($object,'id','',1,'rowid','ref'); + print $form->showrefnav($object,'id','',1,'rowid','ref'); print '</td></tr>';*/ // Date of payment - print '<tr><td class="titlefield">'.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td>'; + print '<tr><td class="titlefield">'.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)).'</td>'; print '<td>'; - print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); + print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); print '</td></tr>'; // Payment mode @@ -209,28 +200,24 @@ if ($result > 0) print '<td>'; print $form->editfieldval("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded')); print '</td></tr>'; - */ + */ // Amount print '<tr><td>'.$langs->trans('Amount').'</td>'; print '<td>'.price($object->amount, '', $langs, 0, 0, -1, $conf->currency).'</td></tr>'; - if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) - { + if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { print '<tr><td>'.$langs->trans('Status').'</td>'; print '<td>'.$object->getLibStatut(4).'</td></tr>'; } $allow_delete = 1; // Bank account - if (!empty($conf->banque->enabled)) - { - if ($object->fk_account) - { + if (!empty($conf->banque->enabled)) { + if ($object->fk_account) { $bankline = new AccountLine($db); $bankline->fetch($object->bank_line); - if ($bankline->rappro) - { + if ($bankline->rappro) { $allow_delete = 0; $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment")); } @@ -254,9 +241,9 @@ if ($result > 0) } // Note - print '<tr><td>'.$form->editfieldkey("Comments", 'note', $object->note, $object, $user->rights->fournisseur->facture->creer).'</td>'; + print '<tr><td>'.$form->editfieldkey("Comments", 'note', $object->note, $object, ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)).'</td>'; print '<td>'; - print $form->editfieldval("Note", 'note', $object->note, $object, $user->rights->fournisseur->facture->creer, 'textarea'); + print $form->editfieldval("Note", 'note', $object->note, $object, ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), 'textarea'); print '</td></tr>'; print '</table>'; @@ -274,8 +261,7 @@ if ($result > 0) $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiementfourn = '.$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -291,12 +277,10 @@ if ($result > 0) print '<td class="right">'.$langs->trans('Status').'</td>'; print "</tr>\n"; - if ($num > 0) - { + if ($num > 0) { $facturestatic = new FactureFournisseur($db); - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $facturestatic->id = $objp->facid; @@ -326,8 +310,7 @@ if ($result > 0) print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'</td>'; print "</tr>\n"; - if ($objp->paye == 1) - { + if ($objp->paye == 1) { $allow_delete = 0; $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid")); } @@ -351,23 +334,17 @@ if ($result > 0) */ print '<div class="tabsAction">'; - if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) - { - if ($user->socid == 0 && $object->statut == 0 && $action == '') - { - 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))) - { + if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { + if ($user->socid == 0 && $object->statut == 0 && $action == '') { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && (!empty($user->rights->fournisseur->facture->creer) || !empty($user->rights->supplier_invoice->creer))) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate))) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=validate">'.$langs->trans('Valid').'</a>'; } } } - if ($user->socid == 0 && $action == '') - { - if ($user->rights->fournisseur->facture->supprimer) - { - if ($allow_delete) - { + if ($user->socid == 0 && $action == '') { + if ($user->rights->fournisseur->facture->supprimer) { + if ($allow_delete) { print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$title_button.'">'.$langs->trans('Delete').'</a>'; @@ -379,17 +356,15 @@ if ($result > 0) print '<div class="fichecenter"><div class="fichehalfleft">'; - // Documents generes - + // Generated documents include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php'; $modellist = ModelePDFSuppliersPayments::liste_modeles($db); - if (is_array($modellist)) - { + if (is_array($modellist)) { $ref = dol_sanitizeFileName($object->ref); $filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id; - $genallowed = $user->rights->fournisseur->facture->lire; - $delallowed = $user->rights->fournisseur->facture->creer; + $genallowed = ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire); + $delallowed = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); $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); diff --git a/htdocs/fourn/paiement/index.html b/htdocs/fourn/paiement/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/fourn/paiement/info.php b/htdocs/fourn/paiement/info.php index 9ff0a86931e..8032b2b418f 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -40,7 +40,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // Now check also permission on thirdparty of invoices of payments. Thirdparty were loaded by the fetch_object before based on first invoice. // It should be enough because all payments are done on invoices of the same thirdparty. if ($socid && $socid != $object->thirdparty->id) { diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index f61d1795cba..ecd572e1046 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -9,7 +9,7 @@ * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com> * Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es> * @@ -28,39 +28,22 @@ */ /** - * \file htdocs/fourn/paiment/list.php + * \file htdocs/fourn/paiement/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'); +$massaction = GETPOST('massaction', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'vendorpaymentlist'; +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'vendorpaymentlist'; $socid = GETPOST('socid', 'int'); @@ -79,13 +62,19 @@ $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.datep"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.datep"; +} $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : GETPOST('sall')); @@ -112,13 +101,34 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); $hookmanager->initHooks(array('paymentsupplierlist')); $object = new PaiementFourn($db); +// 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 ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_invoice->enabled)) { + accessforbidden(); +} +if (!$user->rights->fournisseur->facture->lire || !$user->rights->supplier_invoice->lire) { + accessforbidden(); +} + + /* -* Actions -*/ + * 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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; @@ -151,7 +161,9 @@ $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'; +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'; @@ -161,26 +173,47 @@ $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'; +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); +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='.((int) $search_bank_account); - -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +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 = '.((int) $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.ref, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, s.email, c.code, c.libelle, ba.rowid, ba.label'; -if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user'; +if (!$user->rights->societe->client->voir) { + $sql .= ', sc.fk_soc, sc.fk_user'; +} $sql .= $db->order($sortfield, $sortorder); @@ -208,24 +241,48 @@ $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 (!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); +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 '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="list">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; @@ -235,9 +292,10 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; 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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -245,8 +303,11 @@ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} if ($moreforfilter) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; @@ -256,7 +317,9 @@ if ($moreforfilter) { $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); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '<div class="div-table-responsive">'; print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : '').'">'; @@ -273,7 +336,9 @@ if (!empty($arrayfields['p.ref']['checked'])) { // Filter: Date if (!empty($arrayfields['p.datep']['checked'])) { print '<td class="liste_titre center">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_day" value="'.dol_escape_htmltag($search_day).'">'; + } print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_month" value="'.dol_escape_htmltag($search_month).'">'; $formother->select_year($search_year ? $search_year : -1, 'search_year', 1, 20, 5); print '</td>'; @@ -327,14 +392,30 @@ print '</td>'; print '</tr>'; print '<tr class="liste_titre">'; -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 '); +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); @@ -369,21 +450,29 @@ while ($i < min($num, $limit)) { // No if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { print '<td>'.(($offset * $limit) + $i).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="nowrap">'.$paymentfournstatic->getNomUrl(1).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date if (!empty($arrayfields['p.datep']['checked'])) { $dateformatforpayment = 'day'; - if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; + if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) { + $dateformatforpayment = 'dayhour'; + } print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Thirdparty @@ -393,43 +482,57 @@ while ($i < min($num, $limit)) { print $companystatic->getNomUrl(1, '', 24); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + 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 '<td>'.$payment_type.' '.dol_trunc($objp->num_paiement, 32).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Cheque number (fund transfer) if (!empty($arrayfields['p.num_paiement']['checked'])) { print '<td>'.$objp->num_paiement.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Account - if (!empty($arrayfields['ba.label']['checked'])) - { + if (!empty($arrayfields['ba.label']['checked'])) { print '<td>'; - if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).'</a>'; - else print '&nbsp;'; + if ($objp->bid) { + print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).'</a>'; + } else { + print '&nbsp;'; + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount if (!empty($arrayfields['p.amount']['checked'])) { - print '<td class="right">'.price($objp->pamount).'</td>'; - if (!$i) $totalarray['nbfield']++; + print '<td class="right"><span class="amount">'.price($objp->pamount).'</span></td>'; + if (!$i) { + $totalarray['nbfield']++; + } $totalarray['pos'][$checkedCount] = 'amount'; $totalarray['val']['amount'] += $objp->pamount; } // Buttons print '<td></td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'; $i++; diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 468352c72fe..f411d70af25 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -33,7 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; $langs->loadLangs(array("products", "suppliers")); -if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden(); +if (!$user->rights->produit->lire && !$user->rights->service->lire) { + accessforbidden(); +} $sref = GETPOST('sref', 'alphanohtml'); $sRefSupplier = GETPOST('srefsupplier'); @@ -46,15 +48,23 @@ $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 +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 = "p.ref"; // Set here default search field -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "p.ref"; // Set here default search field +} +if (!$sortorder) { + $sortorder = "ASC"; +} $fourn_id = GETPOST('fourn_id', 'intcomma'); -if ($user->socid) $fourn_id = $user->socid; +if ($user->socid) { + $fourn_id = $user->socid; +} $catid = GETPOST('catid', 'intcomma'); @@ -71,22 +81,26 @@ $extrafields = new ExtraFields($db); * Put here all code to do according to value of "action" parameter */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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 $sref = ''; $sRefSupplier = ''; $snom = ''; @@ -109,8 +123,7 @@ $companystatic = new Societe($db); $title = $langs->trans("ProductsAndServices"); -if ($fourn_id) -{ +if ($fourn_id) { $supplier = new Fournisseur($db); $supplier->fetch($fourn_id); } @@ -118,12 +131,16 @@ if ($fourn_id) $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->mymodule->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); @@ -133,54 +150,52 @@ $sql .= " s.rowid as socid, s.nom as name"; // Add fields to SELECT from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; -if ($catid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid"; +if ($catid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON p.rowid = ppf.fk_product"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ppf.fk_soc = s.rowid"; $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($sRefSupplier) -{ +if ($sRefSupplier) { $sql .= natural_search('ppf.ref_fourn', $sRefSupplier); } -if (GETPOST('type')) -{ +if (GETPOST('type')) { $sql .= " AND p.fk_product_type = ".GETPOST('type', 'int'); } -if ($sref) -{ +if ($sref) { $sql .= natural_search('p.ref', $sref); } -if ($snom) -{ +if ($snom) { $sql .= natural_search('p.label', $snom); } -if ($catid) -{ +if ($catid) { $sql .= " AND cp.fk_categorie = ".$catid; } -if ($fourn_id > 0) -{ +if ($fourn_id > 0) { $sql .= " AND ppf.fk_soc = ".$fourn_id; } // Add WHERE filters from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $sql .= $hookmanager->resPrint; $sql .= $db->order($sortfield, $sortorder); // Count total nb of records without orderby and limit $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -190,30 +205,32 @@ $sql .= $db->plimit($limit + 1, $offset); dol_syslog("fourn/product/list.php:", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num == 1 && (GETPOST("mode") == 'search')) - { + if ($num == 1 && (GETPOST("mode") == 'search')) { $objp = $db->fetch_object($resql); header("Location: ".DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); exit; } - if (!empty($supplier->id)) $texte = $langs->trans("ListOfSupplierProductForSupplier", $supplier->name); - else $texte = $langs->trans("List"); + if (!empty($supplier->id)) { + $texte = $langs->trans("ListOfSupplierProductForSupplier", $supplier->name); + } else { + $texte = $langs->trans("List"); + } llxHeader("", "", $texte); $param = "&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type) ? "&amp;type=".$type : "").(empty($sRefSupplier) ? "" : "&amp;srefsupplier=".$sRefSupplier); - if ($optioncss != '') $param .= '&optioncss='.$optioncss; + if ($optioncss != '') { + $param .= '&optioncss='.$optioncss; + } print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); - if (!empty($catid)) - { + if (!empty($catid)) { print "<div id='ways'>"; $c = new Categorie($db); $ways = $c->print_all_ways(' &gt; ', 'fourn/product/list.php'); @@ -222,9 +239,13 @@ if ($resql) } print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; - if ($fourn_id > 0) print '<input type="hidden" name="fourn_id" value="'.$fourn_id.'">'; + if ($fourn_id > 0) { + print '<input type="hidden" name="fourn_id" value="'.$fourn_id.'">'; + } print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="page" value="'.$page.'">'; @@ -256,7 +277,9 @@ if ($resql) // add filters from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print '<td class="liste_titre maxwidthsearch">'; $searchpicto = $form->showFilterButtons(); @@ -276,13 +299,14 @@ if ($resql) // add header cells from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print_liste_field_titre('', $_SERVER["PHP_SELF"]); print "</tr>\n"; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); $productstatic->id = $objp->rowid; @@ -307,7 +331,9 @@ if ($resql) $companystatic->name = $objp->name; $companystatic->id = $objp->socid; print '<td>'; - if ($companystatic->id > 0) print $companystatic->getNomUrl(1, 'supplier'); + if ($companystatic->id > 0) { + print $companystatic->getNomUrl(1, 'supplier'); + } print '</td>'; print '<td class="right">'.(isset($objp->price) ? price($objp->price) : '').'</td>'; @@ -319,7 +345,9 @@ if ($resql) // add additional columns from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print $hookmanager->resPrint; print '<td class="right"></td>'; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 736a7bf4f90..adeaf7b1447 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -32,8 +32,7 @@ $langs->loadLangs(array('bills', 'companies')); // Security check $socid = GETPOST("socid", 'int'); -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -51,22 +50,20 @@ $userstatic = new User($db); llxHeader(); -if ($socid > 0) -{ +if ($socid > 0) { $societe = new Societe($db); $societe->fetch($socid); /* - * Affichage onglets - */ + * Affichage onglets + */ $head = societe_prepare_head($societe); print dol_get_fiche_head($head, 'supplier', $langs->trans("ThirdParty"), 0, 'company'); dol_banner_tab($societe, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); print dol_get_fiche_end(); - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->facture->lire) - { + if ((!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { // Invoice list print load_fiche_titre($langs->trans("SupplierPreview")); @@ -76,14 +73,13 @@ if ($socid > 0) $sql .= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; $sql .= " u.login, u.rowid as userid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$societe->id; + $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".((int) $societe->id); $sql .= " AND f.entity IN (".getEntity("facture_fourn").")"; // Recognition of the entity attributed to this invoice for Multicompany $sql .= " AND f.fk_user_valid = u.rowid"; $sql .= " ORDER BY f.datef DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '<tr class="liste_titre">'; @@ -96,22 +92,19 @@ if ($socid > 0) print '<td>&nbsp;</td>'; print '</tr>'; - if (!$num > 0) - { + if (!$num > 0) { print '<tr><td colspan="7">'.$langs->trans("NoInvoice").'</td></tr>'; } $solde = 0; // Boucle sur chaque facture - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $objf = $db->fetch_object($resql); $fac = new FactureFournisseur($db); $ret = $fac->fetch($objf->facid); - if ($ret < 0) - { + if ($ret < 0) { print $fac->error."<br>"; continue; } @@ -144,13 +137,11 @@ if ($socid > 0) $sql .= " AND pf.fk_facturefourn = ".$fac->id; $resqlp = $db->query($sql); - if ($resqlp) - { + if ($resqlp) { $nump = $db->num_rows($resqlp); $j = 0; - while ($j < $nump) - { + while ($j < $nump) { $objp = $db->fetch_object($resqlp); // print '<tr class="oddeven">'; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 6a51d6d0a88..12ee32a496f 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -28,7 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->loadLangs(array("admin", "ftp")); // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $def = array(); $lastftpentry = 0; @@ -45,36 +47,33 @@ $entry = GETPOST('numero_entry', 'alpha'); $sql = "select MAX(name) as name from ".MAIN_DB_PREFIX."const"; $sql .= " WHERE name like 'FTP_SERVER_%'"; $result = $db->query($sql); -if ($result) -{ +if ($result) { $obj = $db->fetch_object($result); preg_match('/([0-9]+)$/i', $obj->name, $reg); - if ($reg[1]) $lastftpentry = $reg[1]; + if ($reg[1]) { + $lastftpentry = $reg[1]; + } } else { dol_print_error($db); } -if ($action == 'add' || GETPOST('modify', 'alpha')) -{ - $ftp_name = "FTP_NAME_".$entry; // $_POST["numero_entry"]; - $ftp_server = "FTP_SERVER_".$entry; //$_POST["numero_entry"]; +if ($action == 'add' || GETPOST('modify', 'alpha')) { + $ftp_name = "FTP_NAME_".$entry; + $ftp_server = "FTP_SERVER_".$entry; $error = 0; - if (!GETPOST("$ftp_name", 'alpha')) - { + if (!GETPOST("$ftp_name", 'alpha')) { $error = 1; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); } - if (!GETPOST("$ftp_server", 'alpha')) - { + if (!GETPOST("$ftp_server", 'alpha')) { $error = 1; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Server")), null, 'errors'); } - if (!$error) - { + if (!$error) { $ftp_port = "FTP_PORT_".$entry; $ftp_user = "FTP_USER_".$entry; $ftp_password = "FTP_PASSWORD_".$entry; @@ -83,14 +82,23 @@ if ($action == 'add' || GETPOST('modify', 'alpha')) $db->begin(); $result1 = dolibarr_set_const($db, "FTP_PORT_".$entry, GETPOST($ftp_port, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result1) $result2 = dolibarr_set_const($db, "FTP_SERVER_".$entry, GETPOST($ftp_server, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result2) $result3 = dolibarr_set_const($db, "FTP_USER_".$entry, GETPOST($ftp_user, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result3) $result4 = dolibarr_set_const($db, "FTP_PASSWORD_".$entry, GETPOST($ftp_password, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result4) $result5 = dolibarr_set_const($db, "FTP_NAME_".$entry, GETPOST($ftp_name, 'alpha'), 'chaine', 0, '', $conf->entity); - if ($result5) $result6 = dolibarr_set_const($db, "FTP_PASSIVE_".$entry, GETPOST($ftp_passive, 'alpha'), 'chaine', 0, '', $conf->entity); + if ($result1) { + $result2 = dolibarr_set_const($db, "FTP_SERVER_".$entry, GETPOST($ftp_server, 'alpha'), 'chaine', 0, '', $conf->entity); + } + if ($result2) { + $result3 = dolibarr_set_const($db, "FTP_USER_".$entry, GETPOST($ftp_user, 'alpha'), 'chaine', 0, '', $conf->entity); + } + if ($result3) { + $result4 = dolibarr_set_const($db, "FTP_PASSWORD_".$entry, GETPOST($ftp_password, 'alpha'), 'chaine', 0, '', $conf->entity); + } + if ($result4) { + $result5 = dolibarr_set_const($db, "FTP_NAME_".$entry, GETPOST($ftp_name, 'alpha'), 'chaine', 0, '', $conf->entity); + } + if ($result5) { + $result6 = dolibarr_set_const($db, "FTP_PASSIVE_".$entry, GETPOST($ftp_passive, 'alpha'), 'chaine', 0, '', $conf->entity); + } - if ($result1 && $result2 && $result3 && $result4 && $result5 && $result6) - { + if ($result1 && $result2 && $result3 && $result4 && $result5 && $result6) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -101,21 +109,28 @@ if ($action == 'add' || GETPOST('modify', 'alpha')) } } -if (GETPOST('delete', 'alpha')) -{ - if ($entry) - { +if (GETPOST('delete', 'alpha')) { + if ($entry) { $db->begin(); $result1 = dolibarr_del_const($db, "FTP_PORT_".$entry, $conf->entity); - if ($result1) $result2 = dolibarr_del_const($db, "FTP_SERVER_".$entry, $conf->entity); - if ($result2) $result3 = dolibarr_del_const($db, "FTP_USER_".$entry, $conf->entity); - if ($result3) $result4 = dolibarr_del_const($db, "FTP_PASSWORD_".$entry, $conf->entity); - if ($result4) $result5 = dolibarr_del_const($db, "FTP_NAME_".$entry, $conf->entity); - if ($result4) $result6 = dolibarr_del_const($db, "FTP_PASSIVE_".$entry, $conf->entity); + if ($result1) { + $result2 = dolibarr_del_const($db, "FTP_SERVER_".$entry, $conf->entity); + } + if ($result2) { + $result3 = dolibarr_del_const($db, "FTP_USER_".$entry, $conf->entity); + } + if ($result3) { + $result4 = dolibarr_del_const($db, "FTP_PASSWORD_".$entry, $conf->entity); + } + if ($result4) { + $result5 = dolibarr_del_const($db, "FTP_NAME_".$entry, $conf->entity); + } + if ($result4) { + $result6 = dolibarr_del_const($db, "FTP_PASSIVE_".$entry, $conf->entity); + } - if ($result1 && $result2 && $result3 && $result4 && $result5 && $result6) - { + if ($result1 && $result2 && $result3 && $result4 && $result5 && $result6) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]); exit; @@ -133,14 +148,16 @@ if (GETPOST('delete', 'alpha')) $form = new Form($db); -llxHeader(); + +$help_url = 'EN:Module_FTP_En|FR:Module_FTP|ES:Módulo_FTP'; + +llxHeader('', 'FTP', $help_url); $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans("FTPClientSetup"), $linkback, 'title_setup'); print '<br>'; -if (!function_exists('ftp_connect')) -{ +if (!function_exists('ftp_connect')) { print $langs->trans("FTPFeatureNotSupportedByYourPHP"); } else { // Formulaire ajout @@ -186,7 +203,9 @@ if (!function_exists('ftp_connect')) print '<tr class="impair">'; print '<td>'.$langs->trans("FTPPassiveMode").'</td>'; $defaultpassive = GETPOST("FTP_PASSIVE_".($lastftpentry + 1)); - if (!isset($_POST["FTP_PASSIVE_".($lastftpentry + 1)])) $defaultpassive = empty($conf->global->FTP_SUGGEST_PASSIVE_BYDEFAULT) ? 0 : 1; + if (!GETPOSTISSET("FTP_PASSIVE_".($lastftpentry + 1))) { + $defaultpassive = empty($conf->global->FTP_SUGGEST_PASSIVE_BYDEFAULT) ? 0 : 1; + } print '<td>'.$form->selectyesno('FTP_PASSIVE_'.($lastftpentry + 1), $defaultpassive, 2).'</td>'; print '<td>'.$langs->trans("No").'</td>'; print '</tr>'; @@ -211,15 +230,14 @@ if (!function_exists('ftp_connect')) dol_syslog("ftpclient select ftp setup", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); + $reg = array(); preg_match('/([0-9]+)$/i', $obj->name, $reg); $idrss = $reg[0]; //print "x".join(',',$reg)."=".$obj->name."=".$idrss; diff --git a/htdocs/ftp/admin/index.html b/htdocs/ftp/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 51a8028e1f3..6a97265b050 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -32,13 +32,17 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; $langs->loadLangs(array('ftp', 'companies', 'other')); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'ftp', ''); // Get parameters $action = GETPOST('action', 'aZ09'); $section = GETPOST('section'); -if (!$section) $section = '/'; +if (!$section) { + $section = '/'; +} $numero_ftp = GETPOST("numero_ftp"); /* if (! $numero_ftp) $numero_ftp=1; */ $file = GETPOST("file"); @@ -51,12 +55,18 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "label"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "label"; +} $s_ftp_name = 'FTP_NAME_'.$numero_ftp; $s_ftp_server = 'FTP_SERVER_'.$numero_ftp; @@ -66,7 +76,9 @@ $s_ftp_password = 'FTP_PASSWORD_'.$numero_ftp; $s_ftp_passive = 'FTP_PASSIVE_'.$numero_ftp; $ftp_name = $conf->global->$s_ftp_name; $ftp_server = $conf->global->$s_ftp_server; -$ftp_port = $conf->global->$s_ftp_port; if (empty($ftp_port)) $ftp_port = 21; +$ftp_port = $conf->global->$s_ftp_port; if (empty($ftp_port)) { + $ftp_port = 21; +} $ftp_user = $conf->global->$s_ftp_user; $ftp_password = $conf->global->$s_ftp_password; $ftp_passive = $conf->global->$s_ftp_passive; @@ -83,29 +95,24 @@ $mesg = ''; */ // Submit file -if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) -{ +if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $result = $ecmdir->fetch(GETPOST("section", 'int')); - if (!$result > 0) - { + if (!$result > 0) { dol_print_error($db, $ecmdir->error); exit; } $relativepath = $ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; - if (dol_mkdir($upload_dir) >= 0) - { + if (dol_mkdir($upload_dir) >= 0) { $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir."/".dol_unescapefile($_FILES['userfile']['name']), 0); - if (is_numeric($resupload) && $resupload > 0) - { + if (is_numeric($resupload) && $resupload > 0) { $result = $ecmdir->changeNbOfFiles('+'); } else { $langs->load("errors"); - if ($resupload < 0) // Unknown error - { + if ($resupload < 0) { // Unknown error setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) { // Files infected by a virus @@ -116,22 +123,20 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) } } } else { - // Echec transfert (fichier depassant la limite ?) + // Transfer failure (file exceeding the limit ?) $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCreateDir", $upload_dir), null, 'errors'); } } // Action ajout d'un rep -if ($action == 'add' && $user->rights->ftp->setup) -{ +if ($action == 'add' && $user->rights->ftp->setup) { $ecmdir->ref = GETPOST("ref"); $ecmdir->label = GETPOST("label"); $ecmdir->description = GETPOST("desc"); $id = $ecmdir->create($user); - if ($id > 0) - { + if ($id > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -141,11 +146,9 @@ if ($action == 'add' && $user->rights->ftp->setup) } // Remove 1 file -if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') -{ +if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') { // set up a connection or die - if (!$conn_id) - { + if (!$conn_id) { $newsectioniso = utf8_decode($section); $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive); $conn_id = $resultarray['conn_id']; @@ -153,11 +156,9 @@ if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') $mesg = $resultarray['mesg']; } - if ($conn_id && $ok && !$mesg) - { + if ($conn_id && $ok && !$mesg) { $newsection = $section; - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + 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 } @@ -175,8 +176,7 @@ if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') } else { $result = @ftp_delete($conn_id, $newremotefileiso); } - if ($result) - { + if ($result) { setEventMessages($langs->trans("FileWasRemoved", $file), null, 'mesgs'); } else { dol_syslog("ftp/index.php ftp_delete", LOG_ERR); @@ -192,11 +192,9 @@ if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') } // Delete several lines at once -if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $langs->trans("Delete")) -{ +if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $langs->trans("Delete")) { // set up a connection or die - if (!$conn_id) - { + if (!$conn_id) { $newsectioniso = utf8_decode($section); $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive); $conn_id = $resultarray['conn_id']; @@ -204,19 +202,15 @@ if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $lang $mesg = $resultarray['mesg']; } - if ($conn_id && $ok && !$mesg) - { - foreach (GETPOST('const', 'array') as $const) - { - if ($const["check"]) // Is checkbox checked - { + if ($conn_id && $ok && !$mesg) { + foreach (GETPOST('const', 'array') as $const) { + if ($const["check"]) { // Is checkbox checked $langs->load("other"); // Remote file $file = $const["file"]; $newsection = $const["section"]; - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + 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; @@ -229,8 +223,7 @@ if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $lang } else { $result = @ftp_delete($conn_id, $newremotefileiso); } - if ($result) - { + if ($result) { setEventMessages($langs->trans("FileWasRemoved", $file), null, 'mesgs'); } else { dol_syslog("ftp/index.php ftp_delete n files", LOG_ERR); @@ -248,11 +241,9 @@ if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $lang } // Remove directory -if ($action == 'confirm_deletesection' && $confirm == 'yes') -{ +if ($action == 'confirm_deletesection' && $confirm == 'yes') { // set up a connection or die - if (!$conn_id) - { + if (!$conn_id) { $newsectioniso = utf8_decode($section); $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive); $conn_id = $resultarray['conn_id']; @@ -260,11 +251,9 @@ if ($action == 'confirm_deletesection' && $confirm == 'yes') $mesg = $resultarray['mesg']; } - if ($conn_id && $ok && !$mesg) - { + if ($conn_id && $ok && !$mesg) { $newsection = $section; - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + 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 } @@ -278,8 +267,7 @@ if ($action == 'confirm_deletesection' && $confirm == 'yes') } else { $result = @ftp_rmdir($conn_id, $newremotefileiso); } - if ($result) - { + if ($result) { setEventMessages($langs->trans("DirWasRemoved", $file), null, 'mesgs'); } else { setEventMessages($langs->trans("FTPFailedToRemoveDir", $file), null, 'errors'); @@ -294,11 +282,9 @@ if ($action == 'confirm_deletesection' && $confirm == 'yes') } // Download directory -if ($action == 'download') -{ +if ($action == 'download') { // set up a connection or die - if (!$conn_id) - { + if (!$conn_id) { $newsectioniso = utf8_decode($section); $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso, $ftp_passive); $conn_id = $resultarray['conn_id']; @@ -306,14 +292,12 @@ if ($action == 'download') $mesg = $resultarray['mesg']; } - if ($conn_id && $ok && !$mesg) - { + if ($conn_id && $ok && !$mesg) { // Local file $localfile = tempnam($download_dir, 'dol_'); $newsection = $section; - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + 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 } @@ -327,23 +311,31 @@ if ($action == 'download') } else { $result = ftp_get($conn_id, $localfile, $newremotefileiso, FTP_BINARY); } - if ($result) - { - if (!empty($conf->global->MAIN_UMASK)) - @chmod($localfile, octdec($conf->global->MAIN_UMASK)); + if ($result) { + if (!empty($conf->global->MAIN_UMASK)) { + @chmod($localfile, octdec($conf->global->MAIN_UMASK)); + } // Define mime type $type = 'application/octet-stream'; - if (GETPOSTISSET("type")) $type = GETPOST("type"); - else $type = dol_mimetype($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 ($type) header('Content-Type: '.$type); - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); - else header('Content-Disposition: inline; filename="'.$filename.'"'); + if ($type) { + header('Content-Type: '.$type); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } // Ajout directives pour resoudre bug IE header('Cache-Control: Public, must-revalidate'); @@ -374,8 +366,7 @@ if ($action == 'download') llxHeader(); // Add logic to shoow/hide buttons -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { ?> <script type="text/javascript"> jQuery(document).ready(function() { @@ -411,21 +402,17 @@ print load_fiche_titre($langs->trans("FTPArea")); print $langs->trans("FTPAreaDesc")."<br>"; -if (!function_exists('ftp_connect')) -{ +if (!function_exists('ftp_connect')) { print $langs->trans("FTPFeatureNotSupportedByYourPHP"); } else { - if (!empty($ftp_server)) - { + if (!empty($ftp_server)) { // Confirm remove file - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.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') - { + if ($action == 'delete_section') { print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'&section='.urlencode(GETPOST('section')).'&file='.urlencode(GETPOST('file')), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $ecmdir->label), 'confirm_deletesection', '', '', 1); } @@ -443,11 +430,11 @@ if (!function_exists('ftp_connect')) print '</a> '; // For other directories $i = 0; - foreach ($sectionarray as $val) - { - if (empty($val)) continue; // Discard first and last entry that should be empty as section start/end with / - if ($i > 0) - { + foreach ($sectionarray as $val) { + if (empty($val)) { + continue; // Discard first and last entry that should be empty as section start/end with / + } + if ($i > 0) { print ' / '; $newsection .= '/'; } @@ -476,14 +463,15 @@ if (!function_exists('ftp_connect')) print '<td class="liste_titre center">'.$langs->trans("Group").'</td>'."\n"; print '<td class="liste_titre center">'.$langs->trans("Permissions").'</td>'."\n"; print '<td class="liste_titre nowrap right">'; - if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a> '; + if ($conf->use_javascript_ajax) { + print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a> '; + } print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual&numero_ftp='.$numero_ftp.($section ? '&section='.urlencode($section) : '').'">'.img_picto($langs->trans("Refresh"), 'refresh').'</a>&nbsp;'; print '</td>'."\n"; print '</tr>'."\n"; // set up a connection or die - if (empty($conn_id)) - { + if (empty($conn_id)) { $resultarray = dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section, $ftp_passive); $conn_id = $resultarray['conn_id']; @@ -491,8 +479,7 @@ if (!function_exists('ftp_connect')) $mesg = $resultarray['mesg']; } - if ($ok) - { + if ($ok) { //$type = ftp_systype($conn_id); $newsection = $section; @@ -500,8 +487,7 @@ if (!function_exists('ftp_connect')) //$newsection='/home'; // List content of directory ($newsection = '/', '/home', ...) - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { if ($newsection == '/') { //$newsection = '/./'; $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 @@ -511,8 +497,7 @@ if (!function_exists('ftp_connect')) //$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) - { + foreach ($contents as $i => $key) { $buff[$i] = "---------- - root root 1234 Aug 01 2000 ".$key; } } else { @@ -525,31 +510,32 @@ if (!function_exists('ftp_connect')) $nboflines = count($contents); $rawlisthasfailed = false; $i = 0; - while ($i < $nboflines && $i < 1000) - { + while ($i < $nboflines && $i < 1000) { $vals = preg_split('@ +@', utf8_encode($buff[$i]), 9); //$vals=preg_split('@ +@','drwxr-xr-x 2 root root 4096 Aug 30 2008 backup_apollon1',9); //var_dump($vals); $file = $vals[8]; - if (empty($file)) - { + if (empty($file)) { $rawlisthasfailed = true; $file = utf8_encode($contents[$i]); } - if ($file == '.' || ($file == '..' && $section == '/')) - { + if ($file == '.' || ($file == '..' && $section == '/')) { $i++; continue; } // Is it a directory ? $is_directory = 0; - if ($file == '..') $is_directory = 1; - elseif (!$rawlisthasfailed) - { - if (preg_match('/^d/', $vals[0])) $is_directory = 1; - if (preg_match('/^l/', $vals[0])) $is_link = 1; + if ($file == '..') { + $is_directory = 1; + } elseif (!$rawlisthasfailed) { + if (preg_match('/^d/', $vals[0])) { + $is_directory = 1; + } + if (preg_match('/^l/', $vals[0])) { + $is_link = 1; + } } else { // Remote file $filename = $file; @@ -569,14 +555,21 @@ if (!function_exists('ftp_connect')) print '<td>'; $newsection = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; $newsection = preg_replace('@[\\\/][^\\\/]+[\\\/]\.\.$@', '/', $newsection); // Change aaa/xxx/.. to new aaa - if ($is_directory) print '<a href="'.$_SERVER["PHP_SELF"].'?section='.urlencode($newsection).'&numero_ftp='.$numero_ftp.'">'; + if ($is_directory) { + print '<a href="'.$_SERVER["PHP_SELF"].'?section='.urlencode($newsection).'&numero_ftp='.$numero_ftp.'">'; + } print dol_escape_htmltag($file); - if ($is_directory) print '</a>'; + if ($is_directory) { + print '</a>'; + } print '</td>'; // Size print '<td class="center nowrap">'; - if (!$is_directory && !$is_link) print $vals[4]; - else print '&nbsp;'; + if (!$is_directory && !$is_link) { + print $vals[4]; + } else { + print '&nbsp;'; + } print '</td>'; // Date print '<td class="center nowrap">'; @@ -596,12 +589,13 @@ if (!function_exists('ftp_connect')) print '</td>'; // Action print '<td class="right nowrap" width="64">'; - if ($is_directory) - { - if ($file != '..') print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_section&token='.newToken().'&numero_ftp='.$numero_ftp.'&section='.urlencode($section).'&file='.urlencode($file).'">'.img_delete().'</a>'; - else print '&nbsp;'; - } elseif ($is_link) - { + if ($is_directory) { + if ($file != '..') { + print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_section&token='.newToken().'&numero_ftp='.$numero_ftp.'&section='.urlencode($section).'&file='.urlencode($file).'">'.img_delete().'</a>'; + } else { + print '&nbsp;'; + } + } elseif ($is_link) { $newfile = $file; $newfile = preg_replace('/ ->.*/', '', $newfile); print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&numero_ftp='.$numero_ftp.'&section='.urlencode($section).'&file='.urlencode($newfile).'">'.img_delete().'</a>'; @@ -624,8 +618,7 @@ if (!function_exists('ftp_connect')) print "</table>"; - if (!$ok) - { + if (!$ok) { print $mesg.'<br>'."\n"; setEventMessages($mesg, null, 'errors'); } @@ -650,19 +643,16 @@ if (!function_exists('ftp_connect')) $foundsetup = false; $MAXFTP = 20; $i = 1; - while ($i <= $MAXFTP) - { + while ($i <= $MAXFTP) { $paramkey = 'FTP_NAME_'.$i; //print $paramkey; - if (!empty($conf->global->$paramkey)) - { + if (!empty($conf->global->$paramkey)) { $foundsetup = true; break; } $i++; } - if (!$foundsetup) - { + if (!$foundsetup) { print $langs->trans("SetupOfFTPClientModuleNotComplete"); } else { print $langs->trans("ChooseAFTPEntryIntoMenu"); @@ -673,12 +663,9 @@ if (!function_exists('ftp_connect')) print '<br>'; // Close FTP connection -if ($conn_id) -{ - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { - } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) - { +if ($conn_id) { + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) { ftp_close($conn_id); } else { ftp_close($conn_id); @@ -709,14 +696,12 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect $ok = 1; $conn_id = null; - if (!is_numeric($ftp_port)) - { + if (!is_numeric($ftp_port)) { $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServer", $ftp_server, $ftp_port); $ok = 0; } - if ($ok) - { + if ($ok) { $connecttimeout = (empty($conf->global->FTP_CONNECT_TIMEOUT) ? 40 : $conf->global->FTP_CONNECT_TIMEOUT); if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { dol_syslog('Try to connect with ssh2_ftp'); @@ -728,15 +713,11 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect dol_syslog('Try to connect with ftp_connect'); $conn_id = ftp_connect($ftp_server, $ftp_port, $connecttimeout); } - if ($conn_id || $tmp_conn_id) - { - if ($ftp_user) - { - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + if ($conn_id || $tmp_conn_id) { + if ($ftp_user) { + 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)) - { + if (ssh2_auth_password($tmp_conn_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login //if ($ftp_passive) ftp_pasv($conn_id, true); @@ -744,31 +725,31 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect $newsectioniso = utf8_decode($section); //ftp_chdir($conn_id, $newsectioniso); $conn_id = ssh2_sftp($tmp_conn_id); - if (!$conn_id) - { + if (!$conn_id) { dol_syslog('Failed to connect to SFTP after sssh authentication', LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToSFTPAfterSSHAuthentication"); - $ok = 0; + $ok = 0; $error++; } } else { dol_syslog('Failed to connect to FTP with login '.$ftp_user, LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); - $ok = 0; + $ok = 0; $error++; } } else { - if (ftp_login($conn_id, $ftp_user, $ftp_password)) - { + if (ftp_login($conn_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login - if ($ftp_passive) ftp_pasv($conn_id, true); + if ($ftp_passive) { + ftp_pasv($conn_id, true); + } // Change the dir $newsectioniso = utf8_decode($section); ftp_chdir($conn_id, $newsectioniso); } else { $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); - $ok = 0; + $ok = 0; $error++; } } @@ -794,8 +775,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect */ function ftp_isdir($connect_id, $dir) { - if (@ftp_chdir($connect_id, $dir)) - { + if (@ftp_chdir($connect_id, $dir)) { ftp_cdup($connect_id); return 1; } else { diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 510a08fe274..bab0655b4c2 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -6,6 +6,7 @@ * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de> * * 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 @@ -51,14 +52,16 @@ $fuserid = (GETPOST('fuserid', 'int') ?GETPOST('fuserid', 'int') : $user->id); // Load translation files required by the page $langs->loadLangs(array("other", "holiday", "mails")); +$error = 0; + $now = dol_now(); $childids = $user->getAllChildIds(1); $morefilter = ''; -if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) $morefilter = 'AND employee = 1'; - -$error = 0; +if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) { + $morefilter = 'AND employee = 1'; +} $object = new Holiday($db); @@ -67,31 +70,43 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -if (($id > 0) || $ref) -{ +if (($id > 0) || $ref) { $object->fetch($id, $ref); // Check current user can read this leave request $canread = 0; - if (!empty($user->rights->holiday->readall)) $canread = 1; - if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->holiday->readall)) { + $canread = 1; + } + if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } $cancreate = 0; -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; +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; -if (!empty($user->rights->holiday->delete)) $candelete = 1; -if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) $candelete = 1; +if (!empty($user->rights->holiday->delete)) { + $candelete = 1; +} +if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) { + $candelete = 1; +} // Protection if external user -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'holiday', $object->id, 'holiday'); @@ -101,14 +116,13 @@ $result = restrictedArea($user, 'holiday', $object->id, 'holiday'); $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 ($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; } @@ -116,18 +130,15 @@ if (empty($reshook)) } // Add leave request - if ($action == 'add') - { + if ($action == 'add') { // If no right to create a request - if (!$cancreate) - { + if (!$cancreate) { $error++; setEventMessages($langs->trans('CantCreateCP'), null, 'errors'); $action = 'create'; } - if (!$error) - { + if (!$error) { $object = new Holiday($db); $db->begin(); @@ -140,9 +151,13 @@ if (empty($reshook)) $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; + 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', 'restricthtml')); @@ -165,30 +180,26 @@ if (empty($reshook)) } // If no type - if ($type <= 0) - { + if ($type <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error++; $action = 'create'; } // If no start date - if (empty($date_debut)) - { + if (empty($date_debut)) { setEventMessages($langs->trans("NoDateDebut"), null, 'errors'); $error++; $action = 'create'; } // If no end date - if (empty($date_fin)) - { + if (empty($date_fin)) { setEventMessages($langs->trans("NoDateFin"), null, 'errors'); $error++; $action = 'create'; } // If start date after end date - if ($date_debut > $date_fin) - { + if ($date_debut > $date_fin) { setEventMessages($langs->trans("ErrorEndDateCP"), null, 'errors'); $error++; $action = 'create'; @@ -196,8 +207,7 @@ if (empty($reshook)) // Check if there is already holiday for this period $verifCP = $object->verifDateHolidayCP($fuserid, $date_debut, $date_fin, $halfday); - if (!$verifCP) - { + if (!$verifCP) { setEventMessages($langs->trans("alreadyCPexist"), null, 'errors'); $error++; $action = 'create'; @@ -205,24 +215,21 @@ if (empty($reshook)) // 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) - { + if ($nbopenedday < 0.5) { setEventMessages($langs->trans("ErrorDureeCP"), null, 'errors'); // No working day $error++; $action = 'create'; } // If no validator designated - if ($valideur < 1) - { + if ($valideur < 1) { setEventMessages($langs->transnoentitiesnoconv('InvalidValidatorCP'), null, 'errors'); $error++; } $result = 0; - if (!$error) - { + if (!$error) { $object->fk_user = $fuserid; $object->description = $description; $object->fk_validator = $valideur; @@ -232,16 +239,14 @@ if (empty($reshook)) $object->halfday = $halfday; $result = $object->create($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } // If no SQL error we redirect to the request card - if (!$error) - { + if (!$error) { $db->commit(); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -252,20 +257,17 @@ if (empty($reshook)) } } - if ($action == 'update' && GETPOSTISSET('savevalidator') && !empty($user->rights->holiday->approve)) - { + if ($action == 'update' && GETPOSTISSET('savevalidator') && !empty($user->rights->holiday->approve)) { $object->fetch($id); $object->oldcopy = dol_clone($object); $object->fk_validator = GETPOST('valideur', 'int'); - if ($object->fk_validator != $object->oldcopy->fk_validator) - { + if ($object->fk_validator != $object->oldcopy->fk_validator) { $verif = $object->update($user); - if ($verif <= 0) - { + if ($verif <= 0) { setEventMessages($object->error, $object->errors, 'warnings'); $action = 'editvalidator'; } else { @@ -277,8 +279,7 @@ if (empty($reshook)) $action = ''; } - if ($action == 'update' && !GETPOSTISSET('savevalidator')) - { + if ($action == 'update' && !GETPOSTISSET('savevalidator')) { $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); @@ -286,13 +287,16 @@ if (empty($reshook)) $starthalfday = GETPOST('starthalfday'); $endhalfday = GETPOST('endhalfday'); $halfday = 0; - if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday = 2; - elseif ($starthalfday == 'afternoon') $halfday = -1; - elseif ($endhalfday == 'morning') $halfday = 1; + if ($starthalfday == 'afternoon' && $endhalfday == 'morning') { + $halfday = 2; + } elseif ($starthalfday == 'afternoon') { + $halfday = -1; + } elseif ($endhalfday == 'morning') { + $halfday = 1; + } // If no right to modify a request - if (!$user->rights->holiday->write) - { + if (!$user->rights->holiday->write) { setEventMessages($langs->trans("CantUpdate"), null, 'errors'); header('Location: '.$_SERVER["PHP_SELF"].'?action=create'); exit; @@ -301,11 +305,9 @@ if (empty($reshook)) $object->fetch($id); // If under validation - if ($object->statut == Holiday::STATUS_DRAFT) - { + if ($object->statut == Holiday::STATUS_DRAFT) { // If this is the requestor or has read/write rights - if ($cancreate) - { + if ($cancreate) { $valideur = GETPOST('valideur', 'int'); $description = trim(GETPOST('description', 'restricthtml')); @@ -335,8 +337,7 @@ if (empty($reshook)) // 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) - { + if ($nbopenedday < 0.5) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=DureeHoliday'); exit; } @@ -350,8 +351,7 @@ if (empty($reshook)) // Update $verif = $object->update($user); - if ($verif <= 0) - { + if ($verif <= 0) { setEventMessages($object->error, $object->errors, 'warnings'); $action = 'edit'; } else { @@ -369,8 +369,7 @@ if (empty($reshook)) } // If delete of request - if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights->holiday->delete) - { + if ($action == 'confirm_delete' && GETPOST('confirm') == 'yes' && $user->rights->holiday->delete) { $error = 0; $db->begin(); @@ -378,11 +377,9 @@ if (empty($reshook)) $object->fetch($id); // 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) - { + 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) - { + if ($candelete) { $result = $object->delete($user); } else { $error++; @@ -391,8 +388,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); header('Location: list.php?restore_lastsearch_values=1'); exit; @@ -402,29 +398,25 @@ if (empty($reshook)) } // Action validate (+ send email for approval) - if ($action == 'confirm_send') - { + if ($action == 'confirm_send') { $object->fetch($id); // If draft and owner of leave - if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) - { + if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) { $object->oldcopy = dol_clone($object); $object->statut = Holiday::STATUS_VALIDATED; $verif = $object->validate($user); - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if ($verif > 0) - { + // If no SQL error, we redirect to the request form + if ($verif > 0) { // To $destinataire = new User($db); $destinataire->fetch($object->fk_validator); $emailTo = $destinataire->email; - if (!$emailTo) - { + 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; @@ -438,7 +430,9 @@ if (empty($reshook)) // 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"); @@ -453,22 +447,18 @@ if (empty($reshook)) $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) - { + // option to warn the validator in case of too short delay + 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')) - { + // option to notify the validator if the balance is less than the request + 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)) - { + if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) { $message .= "\n"; $message .= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n"; } @@ -484,11 +474,10 @@ if (empty($reshook)) $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail + // Sending the email $result = $mail->sendfile(); - if (!$result) - { + if (!$result) { setEventMessages($mail->error, $mail->errors, 'warnings'); $action = ''; } else { @@ -502,37 +491,35 @@ if (empty($reshook)) } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('HOLIDAY_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } // Approve leave request - if ($action == 'confirm_valid') - { + if ($action == 'confirm_valid') { $object->fetch($id); // If status is waiting approval and approver is also user - if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) - { + if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) { $object->oldcopy = dol_clone($object); $object->date_valid = dol_now(); @@ -542,46 +529,40 @@ if (empty($reshook)) $db->begin(); $verif = $object->approve($user); - if ($verif <= 0) - { + 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) - { + // If no SQL error, we redirect to the request form + 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 + // The modification is added to the LOG $result = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages(null, $object->errors, 'errors'); } - //Update balance + // Update balance $result = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages(null, $object->errors, 'errors'); } } - if (!$error) - { + if (!$error) { // To $destinataire = new User($db); $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; - if (!$emailTo) - { + if (!$emailTo) { dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); } else { // From @@ -592,7 +573,9 @@ if (empty($reshook)) // 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("HolidaysValidated"); @@ -611,23 +594,21 @@ if (empty($reshook)) $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail + // Sending email $result = $mail->sendfile(); - if (!$result) - { + 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) - { + if (!$error) { $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; } else { $db->rollback(); $action = ''; @@ -635,15 +616,12 @@ if (empty($reshook)) } } - if ($action == 'confirm_refuse' && GETPOST('confirm', 'alpha') == 'yes') - { - if (!empty($_POST['detail_refuse'])) - { + if ($action == 'confirm_refuse' && GETPOST('confirm', 'alpha') == 'yes') { + if (!empty($_POST['detail_refuse'])) { $object->fetch($id); - // Si statut en attente de validation et valideur = utilisateur - if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) - { + // If status pending validation and validator = user + 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; @@ -652,22 +630,19 @@ if (empty($reshook)) $db->begin(); $verif = $object->update($user); - if ($verif <= 0) - { + 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) - { + // If no SQL error, we redirect to the request form + if (!$error) { // To $destinataire = new User($db); $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; - if (!$emailTo) - { + if (!$emailTo) { dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); } else { // From @@ -678,7 +653,9 @@ if (empty($reshook)) // 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("HolidaysRefused"); @@ -698,11 +675,10 @@ if (empty($reshook)) $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail + // sending email $result = $mail->sendfile(); - if (!$result) - { + if (!$result) { setEventMessages($mail->error, $mail->errors, 'warnings'); // Show error, but do no make rollback, so $error is not set to 1 $action = ''; } @@ -711,8 +687,7 @@ if (empty($reshook)) $action = ''; } - if (!$error) - { + if (!$error) { $db->commit(); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -729,9 +704,8 @@ if (empty($reshook)) } - // Si Validation de la demande - if ($action == 'confirm_draft' && GETPOST('confirm') == 'yes') - { + // If the request is validated + if ($action == 'confirm_draft' && GETPOST('confirm') == 'yes') { $error = 0; $object->fetch($id); @@ -740,14 +714,12 @@ if (empty($reshook)) $object->statut = Holiday::STATUS_DRAFT; $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($langs->trans('ErrorBackToDraft').' '.$object->error, $object->errors, 'errors'); } - if (!$error) - { + if (!$error) { $db->commit(); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -757,17 +729,15 @@ if (empty($reshook)) } } - // Si confirmation of cancellation - if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') - { + // If confirmation of cancellation + if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') { $error = 0; $object->fetch($id); - // Si statut en attente de validation et valideur = valideur ou utilisateur, ou droits de faire pour les autres + // If status pending validation and validator = validator or user, or rights to do for others 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)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)))) { $db->begin(); $oldstatus = $object->statut; @@ -777,44 +747,39 @@ if (empty($reshook)) $result = $object->update($user); - if ($result >= 0 && $oldstatus == Holiday::STATUS_APPROVED) // holiday was already validated, status 3, so we must increase back the balance - { + 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); - // On ajoute la modification dans le LOG + // The modification is added to the LOG $result1 = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $object->fk_type); - // Mise à jour du solde + // Update of the balance $result2 = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); - if ($result1 < 0 || $result2 < 0) - { + if ($result1 < 0 || $result2 < 0) { $error++; setEventMessages($langs->trans('ErrorCantDeleteCP').' '.$object->error, $object->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if (!$error && $result > 0) - { + // If no SQL error, we redirect to the request form + if (!$error && $result > 0) { // To $destinataire = new User($db); $destinataire->fetch($object->fk_user); $emailTo = $destinataire->email; - if (!$emailTo) - { + if (!$emailTo) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } @@ -827,12 +792,14 @@ if (empty($reshook)) // 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"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; + $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"; @@ -845,11 +812,10 @@ if (empty($reshook)) $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail + // sending email $result = $mail->sendfile(); - if (!$result) - { + if (!$result) { setEventMessages($mail->error, $mail->errors, 'warnings'); $action = ''; } else { @@ -888,13 +854,13 @@ $object = new Holiday($db); $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon")); -llxHeader('', $langs->trans('CPTitreMenu')); +$help_url = 'EN:Module_Holiday'; -if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') -{ +llxHeader('', $langs->trans('CPTitreMenu'), $help_url); + +if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { // 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)))) - { + 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 @@ -903,28 +869,28 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') // Error management if (GETPOST('error')) { switch (GETPOST('error')) { - case 'datefin' : + case 'datefin': $errors[] = $langs->trans('ErrorEndDateCP'); break; - case 'SQL_Create' : + case 'SQL_Create': $errors[] = $langs->trans('ErrorSQLCreateCP').' <b>'.htmlentities($_GET['msg']).'</b>'; break; - case 'CantCreate' : + case 'CantCreate': $errors[] = $langs->trans('CantCreateCP'); break; - case 'Valideur' : + case 'Valideur': $errors[] = $langs->trans('InvalidValidatorCP'); break; - case 'nodatedebut' : + case 'nodatedebut': $errors[] = $langs->trans('NoDateDebut'); break; - case 'nodatefin' : + case 'nodatefin': $errors[] = $langs->trans('NoDateFin'); break; - case 'DureeHoliday' : + case 'DureeHoliday': $errors[] = $langs->trans('ErrorDureeCP'); break; - case 'alreadyCP' : + case 'alreadyCP': $errors[] = $langs->trans('alreadyCPexist'); break; } @@ -977,8 +943,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $out = ''; $typeleaves = $object->getTypes(1, 1); - foreach ($typeleaves as $key => $val) - { + foreach ($typeleaves as $key => $val) { $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; @@ -1005,8 +970,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<td class="titlefield fieldrequired">'.$langs->trans("User").'</td>'; print '<td>'; - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) - { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { print img_picto('', 'user').$form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'minwidth200 maxwidth500'); //print '<input type="hidden" name="fuserid" value="'.($fuserid?$fuserid:$user->id).'">'; } else { @@ -1021,14 +985,15 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<td>'; $typeleaves = $object->getTypes(1, -1); $arraytypeleaves = array(); - foreach ($typeleaves as $key => $val) - { + 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, 0, 0, '', 0, 0, 0, '', '', true); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; print '</tr>'; @@ -1078,8 +1043,12 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') 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'); + 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, '', '0,'.$conf->entity, 0, 0, '', 0, '', 'minwidth200 maxwidth500'); print img_picto('', 'user').$form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); } @@ -1120,8 +1089,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '</div>'; } else { // Affichage de la fiche d'une demande de congés payés - if (($id > 0) || $ref) - { + if (($id > 0) || $ref) { $result = $object->fetch($id, $ref); $valideur = new User($db); @@ -1133,35 +1101,33 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') //print load_fiche_titre($langs->trans('TitreRequestCP')); // Si il y a une erreur - if (GETPOST('error')) - { - switch (GETPOST('error')) - { - case 'datefin' : + if (GETPOST('error')) { + switch (GETPOST('error')) { + case 'datefin': $errors[] = $langs->transnoentitiesnoconv('ErrorEndDateCP'); break; - case 'SQL_Create' : + case 'SQL_Create': $errors[] = $langs->transnoentitiesnoconv('ErrorSQLCreateCP').' '.$_GET['msg']; break; - case 'CantCreate' : + case 'CantCreate': $errors[] = $langs->transnoentitiesnoconv('CantCreateCP'); break; - case 'Valideur' : + case 'Valideur': $errors[] = $langs->transnoentitiesnoconv('InvalidValidatorCP'); break; - case 'nodatedebut' : + case 'nodatedebut': $errors[] = $langs->transnoentitiesnoconv('NoDateDebut'); break; - case 'nodatefin' : + case 'nodatefin': $errors[] = $langs->transnoentitiesnoconv('NoDateFin'); break; - case 'DureeHoliday' : + case 'DureeHoliday': $errors[] = $langs->transnoentitiesnoconv('ErrorDureeCP'); break; - case 'NoMotifRefuse' : + case 'NoMotifRefuse': $errors[] = $langs->transnoentitiesnoconv('NoMotifRefuseCP'); break; - case 'mail' : + case 'mail': $errors[] = $langs->transnoentitiesnoconv('ErrorMailNotSend')."\n".$_GET['error_content']; break; } @@ -1170,13 +1136,13 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') } // On vérifie si l'utilisateur à le droit de lire cette demande - if ($cancreate) - { + 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 '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'" />'."\n"; @@ -1218,8 +1184,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning'; $endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon'; - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td class="nowrap">'; print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); @@ -1242,8 +1207,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '</tr>'; } - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td class="nowrap">'; print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); @@ -1272,8 +1236,12 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $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 .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); - if ($includesunday) $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + if ($includesaturday) { + $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); + } + if ($includesunday) { + $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + } print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); print '</td>'; print '<td>'; @@ -1281,8 +1249,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '</td>'; print '</tr>'; - if ($object->statut == Holiday::STATUS_REFUSED) - { + if ($object->statut == Holiday::STATUS_REFUSED) { print '<tr>'; print '<td>'.$langs->trans('DetailRefusCP').'</td>'; print '<td>'.$object->detail_refuse.'</td>'; @@ -1290,8 +1257,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') } // Description - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td>'.$langs->trans('DescCP').'</td>'; print '<td>'.nl2br($object->description).'</td>'; @@ -1321,8 +1287,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<table class="border tableforfield centpercent">'."\n"; print '<tbody>'; - if (!empty($object->fk_user_create)) - { + if (!empty($object->fk_user_create)) { $userCreate = new User($db); $userCreate->fetch($object->fk_user_create); print '<tr>'; @@ -1335,13 +1300,15 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') if (!$edit && $action != 'editvalidator') { print '<tr>'; print '<td class="titlefield">'; - if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) print $langs->trans('ApprovedBy'); - else print $langs->trans('ReviewedByCP'); + if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) { + print $langs->trans('ApprovedBy'); + } else { + print $langs->trans('ReviewedByCP'); + } print '</td>'; print '<td>'.$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) - { + if (is_array($include_users) && in_array($user->id, $include_users) && $object->statut == Holiday::STATUS_VALIDATED) { print '<a class="editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editvalidator">'.img_edit($langs->trans("Edit")).'</a>'; } print '</td>'; @@ -1351,18 +1318,17 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; print '<td>'; $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. - { + 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 { + 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') - { + if ($action == 'editvalidator') { print '<input type="submit" class="button button-save" name="savevalidator" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; } @@ -1405,52 +1371,42 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') // Confirmation messages - if ($action == 'delete') - { - if ($user->rights->holiday->delete) - { + 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) - { + 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') - { + 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') - { + 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') - { + 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') - { + 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) - { + if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) { + if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) { print '<div class="center">'; - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) - { + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) { print '<input type="submit" value="'.$langs->trans("Save").'" class="button button-save">'; } print '</div>'; @@ -1459,24 +1415,19 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '</form>'; } - if (!$edit) - { + if (!$edit) { // Buttons for actions print '<div class="tabsAction">'; - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) - { + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) { print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit" class="butAction">'.$langs->trans("EditCP").'</a>'; } - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) // If draft - { + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) { // If draft print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sendToValidate" class="butAction">'.$langs->trans("Validate").'</a>'; } - if ($object->statut == Holiday::STATUS_VALIDATED) // If validated - { - if ($user->id == $object->fk_validator) - { + if ($object->statut == Holiday::STATUS_VALIDATED) { // If validated + if ($user->id == $object->fk_validator) { print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid" class="butAction">'.$langs->trans("Approve").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse" class="butAction">'.$langs->trans("ActionRefuseCP").'</a>'; } else { @@ -1484,17 +1435,17 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<a href="#" class="butActionRefused classfortooltip" title="'.$langs->trans("NotTheAssignedApprover").'">'.$langs->trans("ActionRefuseCP").'</a>'; } } - 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 '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel" class="butAction">'.$langs->trans("ActionCancelCP").'</a>'; - else print '<a href="#" class="butActionRefused classfortooltip" title="'.$langs->trans("HolidayStarted").'">'.$langs->trans("ActionCancelCP").'</a>'; + 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 '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel" class="butAction">'.$langs->trans("ActionCancelCP").'</a>'; + } else { + print '<a href="#" class="butActionRefused classfortooltip" title="'.$langs->trans("HolidayStarted").'">'.$langs->trans("ActionCancelCP").'</a>'; + } } - if ($cancreate && $object->statut == Holiday::STATUS_CANCELED) - { + if ($cancreate && $object->statut == Holiday::STATUS_CANCELED) { print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=backtodraft" class="butAction">'.$langs->trans("SetToDraft").'</a>'; } - if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused - { + if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) { // If draft or canceled or refused print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>'; } @@ -1519,8 +1470,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -1563,4 +1513,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') // End of page llxFooter(); -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index f61c0a66ca8..ffd394a35b3 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2012-2016 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -170,13 +170,11 @@ class Holiday extends CommonObject global $langs, $conf; $langs->load("order"); - if (empty($conf->global->HOLIDAY_ADDON)) - { + if (empty($conf->global->HOLIDAY_ADDON)) { $conf->global->HOLIDAY_ADDON = 'mod_holiday_madonna'; } - if (!empty($conf->global->HOLIDAY_ADDON)) - { + if (!empty($conf->global->HOLIDAY_ADDON)) { $mybool = false; $file = $conf->global->HOLIDAY_ADDON.".php"; @@ -184,16 +182,14 @@ class Holiday extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/holiday/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -201,8 +197,7 @@ class Holiday extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($objsoc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -230,8 +225,7 @@ class Holiday extends CommonObject // Check nb of users into table llx_holiday_users and update with empty lines //if ($result > 0) $result = $this->verifNbUsers($this->countActiveUsersWithoutCP(), $this->getConfCP('nbUser')); - if ($result >= 0) - { + if ($result >= 0) { $this->db->commit(); return 1; } else { @@ -255,9 +249,15 @@ class Holiday extends CommonObject $now = dol_now(); // Check parameters - if (empty($this->fk_user) || !is_numeric($this->fk_user) || $this->fk_user < 0) { $this->error = "ErrorBadParameterFkUser"; return -1; } - if (empty($this->fk_validator) || !is_numeric($this->fk_validator) || $this->fk_validator < 0) { $this->error = "ErrorBadParameterFkValidator"; return -1; } - if (empty($this->fk_type) || !is_numeric($this->fk_type) || $this->fk_type < 0) { $this->error = "ErrorBadParameterFkType"; return -1; } + if (empty($this->fk_user) || !is_numeric($this->fk_user) || $this->fk_user < 0) { + $this->error = "ErrorBadParameterFkUser"; return -1; + } + if (empty($this->fk_validator) || !is_numeric($this->fk_validator) || $this->fk_validator < 0) { + $this->error = "ErrorBadParameterFkValidator"; return -1; + } + if (empty($this->fk_type) || !is_numeric($this->fk_type) || $this->fk_type < 0) { + $this->error = "ErrorBadParameterFkType"; return -1; + } // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday("; @@ -296,32 +296,33 @@ class Holiday extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday"); - if ($this->id) - { + if ($this->id) { // update ref $initialref = '(PROV'.$this->id.')'; - if (!empty($this->ref)) $initialref = $this->ref; + if (!empty($this->ref)) { + $initialref = $this->ref; + } - $sql = 'UPDATE '.MAIN_DB_PREFIX."holiday SET ref='".$this->db->escape($initialref)."' WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { + $sql = 'UPDATE '.MAIN_DB_PREFIX."holiday SET ref='".$this->db->escape($initialref)."' WHERE rowid=".((int) $this->id); + if ($this->db->query($sql)) { $this->ref = $initialref; - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('HOLIDAY_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } @@ -329,10 +330,8 @@ class Holiday extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -380,15 +379,16 @@ class Holiday extends CommonObject $sql .= " cp.fk_type,"; $sql .= " cp.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as cp"; - if ($id > 0) $sql .= " WHERE cp.rowid = ".$id; - else $sql .= " WHERE cp.ref = '".$this->db->escape($ref)."'"; + if ($id > 0) { + $sql .= " WHERE cp.rowid = ".((int) $id); + } else { + $sql .= " WHERE cp.ref = '".$this->db->escape($ref)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -479,7 +479,7 @@ class Holiday extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua"; $sql .= " WHERE cp.entity IN (".getEntity('holiday').")"; $sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid"; // Hack pour la recherche sur le tableau - $sql .= " AND cp.fk_user IN (".$user_id.")"; + $sql .= " AND cp.fk_user IN (".$this->db->sanitize($user_id).")"; // Selection filter if (!empty($filter)) { @@ -693,8 +693,7 @@ class Holiday extends CommonObject $error = 0; // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref) || $this->ref == $this->id)) - { + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref) || $this->ref == $this->id)) { $num = $this->getNextNumRef(null); } else { $num = $this->ref; @@ -719,22 +718,20 @@ class Holiday extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('HOLIDAY_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::validate ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -831,22 +828,20 @@ class Holiday extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('HOLIDAY_APPROVE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::approve ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -942,22 +937,20 @@ class Holiday extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('HOLIDAY_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -983,7 +976,7 @@ class Holiday extends CommonObject $error = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."holiday"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); @@ -993,22 +986,20 @@ class Holiday extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('HOLIDAY_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1037,60 +1028,67 @@ class Holiday extends CommonObject { $this->fetchByUser($fk_user, '', ''); - foreach ($this->holiday as $infos_CP) - { - if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays - if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays + foreach ($this->holiday as $infos_CP) { + if ($infos_CP['statut'] == 4) { + continue; // ignore not validated holidays + } + if ($infos_CP['statut'] == 5) { + continue; // ignore not validated holidays + } /* var_dump("--"); var_dump("old: ".dol_print_date($infos_CP['date_debut'],'dayhour').' '.dol_print_date($infos_CP['date_fin'],'dayhour').' '.$infos_CP['halfday']); var_dump("new: ".dol_print_date($dateStart,'dayhour').' '.dol_print_date($dateEnd,'dayhour').' '.$halfday); */ - if ($halfday == 0) - { - if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) - { + if ($halfday == 0) { + if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) { return false; } - if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) - { + if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) { 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']) - { - if ($dateStart < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) return false; + if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) { + if ($dateStart < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) { + return false; + } } - if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) - { - if ($dateStart < $dateEnd) return false; - if ($dateEnd < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) return false; + if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) { + 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']) - { - if ($dateStart < $dateEnd) return false; - if ($dateStart > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) return false; + if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) { + if ($dateStart < $dateEnd) { + return false; + } + if ($dateStart > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) { + return false; + } } - if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) - { - if ($dateEnd > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) return false; + if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) { + 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']) - { - if ($dateStart < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) return false; + if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) { + if ($dateStart < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) { + return false; + } } - if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) - { - if ($dateEnd > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) return false; + if ($dateEnd <= $infos_CP['date_fin'] && $dateEnd >= $infos_CP['date_debut']) { + if ($dateEnd > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) { + return false; + } } } else { dol_print_error('', 'Bad value of parameter halfday when calling function verifDateHolidayCP'); @@ -1123,18 +1121,17 @@ 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->sanitize($this->db->escape($status)).")"; + if ($status != '-1') { + $sql .= " AND cp.statut IN (".$this->db->sanitize($status).")"; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); // Note, we can have 2 records if on is morning and the other one is afternoon - if ($num_rows > 0) - { + if ($num_rows > 0) { $arrayofrecord = array(); $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $obj = $this->db->fetch_object($resql); // Note: $obj->halfday is 0:Full days, 2:Sart afternoon end morning, -1:Start afternoon, 1:End morning @@ -1144,27 +1141,39 @@ class Holiday extends CommonObject // We found a record, user is on holiday by default, so is not available is true. $isavailablemorning = true; - foreach ($arrayofrecord as $record) - { - if ($timestamp == $record['date_start'] && $record['halfday'] == 2) continue; - if ($timestamp == $record['date_start'] && $record['halfday'] == -1) continue; + foreach ($arrayofrecord as $record) { + if ($timestamp == $record['date_start'] && $record['halfday'] == 2) { + continue; + } + if ($timestamp == $record['date_start'] && $record['halfday'] == -1) { + continue; + } $isavailablemorning = false; break; } $isavailableafternoon = true; - foreach ($arrayofrecord as $record) - { - if ($timestamp == $record['date_end'] && $record['halfday'] == 2) continue; - if ($timestamp == $record['date_end'] && $record['halfday'] == 1) continue; + foreach ($arrayofrecord as $record) { + if ($timestamp == $record['date_end'] && $record['halfday'] == 2) { + continue; + } + if ($timestamp == $record['date_end'] && $record['halfday'] == 1) { + continue; + } $isavailableafternoon = false; break; } } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } $result = array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon); - if (!$isavailablemorning) $result['morning_reason'] = 'leave_request'; - if (!$isavailableafternoon) $result['afternoon_reason'] = 'leave_request'; + if (!$isavailablemorning) { + $result['morning_reason'] = 'leave_request'; + } + if (!$isavailableafternoon) { + $result['afternoon_reason'] = 'leave_request'; + } return $result; } @@ -1174,9 +1183,10 @@ class Holiday extends CommonObject * * @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only * @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 * @return string String with URL */ - public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1, $notooltip = 0) { global $langs; @@ -1194,16 +1204,24 @@ class Holiday extends CommonObject //{ // 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'; + 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'; + } //} $linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkend = '</a>'; $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; + 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; @@ -1233,8 +1251,7 @@ class Holiday extends CommonObject public function LibStatut($status, $mode = 0, $startdate = '') { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('DraftCP'); @@ -1250,11 +1267,21 @@ class Holiday extends CommonObject } $statusType = 'status6'; - if (!empty($startdate) && $startdate > dol_now()) $statusType = 'status4'; - if ($status == self::STATUS_DRAFT) $statusType = 'status0'; - if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_CANCELED) $statusType = 'status5'; - if ($status == self::STATUS_REFUSED) $statusType = 'status5'; + if (!empty($startdate) && $startdate > dol_now()) { + $statusType = 'status4'; + } + if ($status == self::STATUS_DRAFT) { + $statusType = 'status0'; + } + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status1'; + } + if ($status == self::STATUS_CANCELED) { + $statusType = 'status5'; + } + if ($status == self::STATUS_REFUSED) { + $statusType = 'status5'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -1338,15 +1365,12 @@ class Holiday extends CommonObject if ($result) { $obj = $this->db->fetch_object($result); // Return value - if (empty($obj)) - { - if ($createifnotfound) - { + if (empty($obj)) { + if ($createifnotfound) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_config(name, value)"; $sql .= " VALUES('".$this->db->escape($name)."', '".$this->db->escape($createifnotfound)."')"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { return $createifnotfound; } else { $this->error = $this->db->lasterror(); @@ -1379,8 +1403,7 @@ class Holiday extends CommonObject $error = 0; - if (empty($userID) && empty($nbHoliday) && empty($fk_type)) - { + if (empty($userID) && empty($nbHoliday) && empty($fk_type)) { $langs->load("holiday"); // Si mise à jour pour tout le monde en début de mois @@ -1395,8 +1418,7 @@ class Holiday extends CommonObject //print 'month: '.$month.' lastUpdate:'.$lastUpdate.' monthLastUpdate:'.$monthLastUpdate;exit; // Si la date du mois n'est pas la même que celle sauvegardée, on met à jour le timestamp - if ($month != $monthLastUpdate) - { + if ($month != $monthLastUpdate) { $this->db->begin(); $users = $this->fetchUsers(false, false); @@ -1412,7 +1434,9 @@ class Holiday extends CommonObject // Update each user counter foreach ($users as $userCounter) { $nbDaysToAdd = (isset($typeleaves[$userCounter['type']]['newByMonth']) ? $typeleaves[$userCounter['type']]['newByMonth'] : 0); - if (empty($nbDaysToAdd)) continue; + if (empty($nbDaysToAdd)) { + continue; + } dol_syslog("We update leave type id ".$userCounter['type']." for user id ".$userCounter['rowid'], LOG_DEBUG); @@ -1424,15 +1448,13 @@ class Holiday extends CommonObject $result = $this->updateSoldeCP($userCounter['rowid'], $newSolde, $userCounter['type'], $langs->trans('HolidaysMonthlyUpdate')); - if ($result < 0) - { + if ($result < 0) { $error++; break; } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1449,19 +1471,16 @@ class Holiday extends CommonObject $sql = "SELECT nb_holiday FROM ".MAIN_DB_PREFIX."holiday_users"; $sql .= " WHERE fk_user = ".(int) $userID." AND fk_type = ".(int) $fk_type; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { // Update for user $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_users SET"; $sql .= " nb_holiday = ".$nbHoliday; $sql .= " WHERE fk_user = ".(int) $userID." AND fk_type = ".(int) $fk_type; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $error++; $this->errors[] = $this->db->lasterror(); } @@ -1471,8 +1490,7 @@ class Holiday extends CommonObject $sql .= $nbHoliday; $sql .= ", ".(int) $userID.", ".(int) $fk_type.")"; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $error++; $this->errors[] = $this->db->lasterror(); } @@ -1482,8 +1500,7 @@ class Holiday extends CommonObject $error++; } - if (!$error) - { + if (!$error) { return 1; } else { return -1; @@ -1527,19 +1544,19 @@ class Holiday extends CommonObject public function createCPusers($single = false, $userid = '') { // do we have to add balance for all users ? - if (!$single) - { + if (!$single) { dol_syslog(get_class($this).'::createCPusers'); $arrayofusers = $this->fetchUsers(false, true); - foreach ($arrayofusers as $users) - { + foreach ($arrayofusers as $users) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_users"; $sql .= " (fk_user, nb_holiday)"; $sql .= " VALUES (".((int) $users['rowid'])."', '0')"; $resql = $this->db->query($sql); - if (!$resql) dol_print_error($this->db); + if (!$resql) { + dol_print_error($this->db); + } } } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_users"; @@ -1547,7 +1564,9 @@ class Holiday extends CommonObject $sql .= " VALUES (".((int) $userid)."', '0')"; $resql = $this->db->query($sql); - if (!$resql) dol_print_error($this->db); + if (!$resql) { + dol_print_error($this->db); + } } } @@ -1579,16 +1598,20 @@ class Holiday extends CommonObject $sql = "SELECT nb_holiday"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday_users"; $sql .= " WHERE fk_user = ".(int) $user_id; - if ($fk_type > 0) $sql .= " AND fk_type = ".(int) $fk_type; + if ($fk_type > 0) { + $sql .= " AND fk_type = ".(int) $fk_type; + } dol_syslog(get_class($this).'::getCPforUser user_id='.$user_id.' type_id='.$fk_type, LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); //return number_format($obj->nb_holiday,2); - if ($obj) return $obj->nb_holiday; - else return null; + if ($obj) { + return $obj->nb_holiday; + } else { + return null; + } } else { return null; } @@ -1608,10 +1631,8 @@ class Holiday extends CommonObject dol_syslog(get_class($this)."::fetchUsers", LOG_DEBUG); - if ($stringlist) - { - if ($type) - { + if ($stringlist) { + if ($type) { // If user of Dolibarr $sql = "SELECT"; if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { @@ -1620,8 +1641,7 @@ class Holiday extends CommonObject $sql .= " u.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; @@ -1630,7 +1650,9 @@ class Holiday extends CommonObject $sql .= " WHERE u.entity IN (".getEntity('user').")"; } $sql .= " AND u.statut > 0"; - if ($filters) $sql .= $filters; + if ($filters) { + $sql .= $filters; + } $resql = $this->db->query($sql); @@ -1641,8 +1663,7 @@ class Holiday extends CommonObject $stringlist = ''; // Boucles du listage des utilisateurs - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($i == 0) { @@ -1665,7 +1686,9 @@ class Holiday extends CommonObject $sql = "SELECT DISTINCT cpu.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE cpu.fk_user = u.rowid"; - if ($filters) $sql .= $filters; + if ($filters) { + $sql .= $filters; + } $resql = $this->db->query($sql); @@ -1676,8 +1699,7 @@ class Holiday extends CommonObject $stringlist = ''; // Boucles du listage des utilisateurs - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($i == 0) { @@ -1699,8 +1721,7 @@ class Holiday extends CommonObject } else { // Si faux donc return array // List for Dolibarr users - if ($type) - { + if ($type) { // If user of Dolibarr $sql = "SELECT"; if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { @@ -1709,8 +1730,7 @@ class Holiday extends CommonObject $sql .= " u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; @@ -1720,13 +1740,14 @@ class Holiday extends CommonObject } $sql .= " AND u.statut > 0"; - if ($filters) $sql .= $filters; + if ($filters) { + $sql .= $filters; + } $resql = $this->db->query($sql); // Si pas d'erreur SQL - if ($resql) - { + if ($resql) { $i = 0; $tab_result = $this->holiday; $num = $this->db->num_rows($resql); @@ -1761,20 +1782,20 @@ class Holiday extends CommonObject $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"; $sql .= " WHERE cpu.fk_user = u.rowid"; - if ($filters) $sql .= $filters; + if ($filters) { + $sql .= $filters; + } $resql = $this->db->query($sql); // Si pas d'erreur SQL - if ($resql) - { + if ($resql) { $i = 0; $tab_result = $this->holiday; $num = $this->db->num_rows($resql); // Boucles du listage des utilisateurs - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $tab_result[$i]['rowid'] = $obj->rowid; // rowid of user @@ -1827,11 +1848,9 @@ class Holiday extends CommonObject dol_syslog(get_class($this)."::fetch_users_approver_holiday sql=".$sql); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num_rows = $this->db->num_rows($result); $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); $i++; @@ -1888,7 +1907,9 @@ class Holiday extends CommonObject */ public function verifNbUsers($userDolibarrWithoutCP, $userCP) { - if (empty($userCP)) $userCP = 0; + if (empty($userCP)) { + $userCP = 0; + } dol_syslog(get_class($this).'::verifNbUsers userDolibarr='.$userDolibarrWithoutCP.' userCP='.$userCP); return 1; } @@ -1914,7 +1935,9 @@ class Holiday extends CommonObject $new_solde = price2num($new_solde, 5); //print "$prev_solde == $new_solde"; - if ($prev_solde == $new_solde) return 0; + if ($prev_solde == $new_solde) { + return 0; + } $this->db->begin(); @@ -1938,21 +1961,17 @@ class Holiday extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->optRowid = $this->db->last_insert_id(MAIN_DB_PREFIX."holiday_logs"); } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::addLogCP ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -2050,24 +2069,27 @@ class Holiday extends CommonObject $sql = "SELECT rowid, code, label, affect, delay, newByMonth"; $sql .= " FROM ".MAIN_DB_PREFIX."c_holiday_types"; - $sql .= " WHERE (fk_country IS NULL OR fk_country = ".$mysoc->country_id.')'; - if ($active >= 0) $sql .= " AND active = ".((int) $active); - if ($affect >= 0) $sql .= " AND affect = ".((int) $affect); + $sql .= " WHERE (fk_country IS NULL OR fk_country = ".((int) $mysoc->country_id).')'; + if ($active >= 0) { + $sql .= " AND active = ".((int) $active); + } + if ($affect >= 0) { + $sql .= " AND affect = ".((int) $affect); + } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); - if ($num) - { - while ($obj = $this->db->fetch_object($result)) - { + if ($num) { + while ($obj = $this->db->fetch_object($result)) { $types[$obj->rowid] = array('rowid'=> $obj->rowid, 'code'=> $obj->code, 'label'=>$obj->label, 'affect'=>$obj->affect, 'delay'=>$obj->delay, 'newByMonth'=>$obj->newByMonth); } return $types; } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } return array(); } @@ -2095,14 +2117,12 @@ class Holiday extends CommonObject $sql .= " f.fk_validator as fk_user_approve,"; $sql .= " f.fk_user_refuse as fk_user_refuse"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as f"; - $sql .= " WHERE f.rowid = ".$id; + $sql .= " WHERE f.rowid = ".((int) $id); $sql .= " AND f.entity = ".$conf->entity; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -2116,26 +2136,22 @@ class Holiday extends CommonObject $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; - if ($obj->fk_user_creation) - { + if ($obj->fk_user_creation) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_creation); $this->user_creation = $cuser; } - if ($obj->fk_user_valid) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_modification) - { + if ($obj->fk_user_modification) { $muser = new User($this->db); $muser->fetch($obj->fk_user_modification); $this->user_modification = $muser; } - if ($obj->fk_user_approve) - { + if ($obj->fk_user_approve) { $auser = new User($this->db); $auser->fetch($obj->fk_user_approve); $this->user_approve = $auser; @@ -2191,11 +2207,10 @@ class Holiday extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."holiday as h"; $sql .= " WHERE h.statut > 1"; $sql .= " AND h.entity IN (".getEntity('holiday').")"; - if (empty($user->rights->expensereport->readall)) - { + if (empty($user->rights->expensereport->readall)) { $userchildids = $user->getAllChildIds(1); - $sql .= " AND (h.fk_user IN (".join(',', $userchildids).")"; - $sql .= " OR h.fk_validator IN (".join(',', $userchildids)."))"; + $sql .= " AND (h.fk_user IN (".$this->db->sanitize(join(',', $userchildids)).")"; + $sql .= " OR h.fk_validator IN (".$this->db->sanitize(join(',', $userchildids))."))"; } $resql = $this->db->query($sql); @@ -2224,7 +2239,9 @@ class Holiday extends CommonObject // phpcs:enable global $conf, $langs; - if ($user->socid) return -1; // protection pour eviter appel par utilisateur externe + if ($user->socid) { + return -1; // protection pour eviter appel par utilisateur externe + } $now = dol_now(); @@ -2232,16 +2249,14 @@ class Holiday extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."holiday as h"; $sql .= " WHERE h.statut = 2"; $sql .= " AND h.entity IN (".getEntity('holiday').")"; - if (empty($user->rights->expensereport->read_all)) - { + if (empty($user->rights->expensereport->read_all)) { $userchildids = $user->getAllChildIds(1); - $sql .= " AND (h.fk_user IN (".join(',', $userchildids).")"; - $sql .= " OR h.fk_validator IN (".join(',', $userchildids)."))"; + $sql .= " AND (h.fk_user IN (".$this->db->sanitize(join(',', $userchildids)).")"; + $sql .= " OR h.fk_validator IN (".$this->db->sanitize(join(',', $userchildids))."))"; } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $langs->load("members"); $response = new WorkboardResponse(); @@ -2251,8 +2266,7 @@ class Holiday extends CommonObject $response->url = DOL_URL_ROOT.'/holiday/list.php?search_statut=2&amp;mainmenu=hrm&amp;leftmenu=holiday'; $response->img = img_object('', "holiday"); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; if ($this->db->jdate($obj->date_debut) < ($now - $conf->holiday->approve->warning_delay)) { diff --git a/htdocs/holiday/class/index.html b/htdocs/holiday/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index d3a2f23019f..b3d2c25adda 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -44,19 +44,29 @@ $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 +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 = "t.rowid"; // Set here default search field -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.rowid"; // Set here default search field +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Protection if external user -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} // If the user does not have perm to read the page -if (empty($user->rights->holiday->read)) accessforbidden(); +if (empty($user->rights->holiday->read)) { + accessforbidden(); +} // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array @@ -65,8 +75,7 @@ $extrafields = new ExtraFields($db); $holiday = new Holiday($db); -if (empty($conf->holiday->enabled)) -{ +if (empty($conf->holiday->enabled)) { llxHeader('', $langs->trans('CPTitreMenu')); print '<div class="tabBar">'; print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>'; @@ -81,21 +90,25 @@ if (empty($conf->holiday->enabled)) * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_name = ''; $search_supervisor = ''; $toselect = ''; @@ -104,17 +117,16 @@ if (empty($reshook)) // Mass actions /* - $objectclass='Skeleton'; - $objectlabel='Skeleton'; - $permissiontoread = $user->rights->skeleton->read; - $permissiontodelete = $user->rights->skeleton->delete; - $uploaddir = $conf->skeleton->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - */ + $objectclass='Skeleton'; + $objectlabel='Skeleton'; + $permissiontoread = $user->rights->skeleton->read; + $permissiontodelete = $user->rights->skeleton->delete; + $uploaddir = $conf->skeleton->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + */ // Si il y a une action de mise à jour - if ($action == 'update' && isset($_POST['update_cp'])) - { + if ($action == 'update' && isset($_POST['update_cp'])) { $error = 0; $typeleaves = $holiday->getTypes(1, 1); @@ -122,13 +134,11 @@ if (empty($reshook)) $userID = array_keys($_POST['update_cp']); $userID = $userID[0]; - foreach ($typeleaves as $key => $val) - { + foreach ($typeleaves as $key => $val) { $userValue = $_POST['nb_holiday_'.$val['rowid']]; $userValue = $userValue[$userID]; - if (!empty($userValue) || (string) $userValue == '0') - { + if (!empty($userValue) || (string) $userValue == '0') { $userValue = price2num($userValue, 5); } else { $userValue = ''; @@ -138,37 +148,36 @@ if (empty($reshook)) $comment = ((isset($_POST['note_holiday'][$userID]) && !empty($_POST['note_holiday'][$userID])) ? ' ('.$_POST['note_holiday'][$userID].')' : ''); //print 'holiday: '.$val['rowid'].'-'.$userValue; - if ($userValue != '') - { + if ($userValue != '') { // We add the modification to the log (must be before update of sold because we read current value of sold) $result = $holiday->addLogCP($user->id, $userID, $langs->transnoentitiesnoconv('ManualUpdate').$comment, $userValue, $val['rowid']); - if ($result < 0) - { + if ($result < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); $error++; } // Update of the days of the employee $result = $holiday->updateSoldeCP($userID, $userValue, $val['rowid']); - if ($result < 0) - { + if ($result < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); $error++; } // If it first update of balance, we set date to avoid to have sold incremented by new month /* - $now=dol_now(); - $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; - $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'"; - $sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init. - dol_syslog('define_holiday update lastUpdate entry', LOG_DEBUG); - $result = $db->query($sql); - */ + $now=dol_now(); + $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; + $sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'"; + $sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init. + dol_syslog('define_holiday update lastUpdate entry', LOG_DEBUG); + $result = $db->query($sql); + */ } } - if (!$error) setEventMessages('UpdateConfCPOK', '', 'mesgs'); + if (!$error) { + setEventMessages('UpdateConfCPOK', '', 'mesgs'); + } } } @@ -191,7 +200,9 @@ if ($result < 0) { print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="update">'; @@ -217,35 +228,36 @@ $filters = ''; // Filter on array of ids of all childs $userchilds = array(); -if (empty($user->rights->holiday->readall)) -{ +if (empty($user->rights->holiday->readall)) { $userchilds = $user->getAllChildIds(1); - $filters .= ' AND u.rowid IN ('.join(', ', $userchilds).')'; + $filters .= ' AND u.rowid IN ('.$db->sanitize(join(', ', $userchilds)).')'; } if (!empty($search_name)) { $filters .= natural_search(array('u.firstname', 'u.lastname'), $search_name); } -if ($search_supervisor > 0) $filters .= natural_search(array('u.fk_user'), $search_supervisor, 2); +if ($search_supervisor > 0) { + $filters .= natural_search(array('u.fk_user'), $search_supervisor, 2); +} $filters .= ' AND employee = 1'; // Only employee users are visible $listUsers = $holiday->fetchUsers(false, true, $filters); -if (is_numeric($listUsers) && $listUsers < 0) -{ +if (is_numeric($listUsers) && $listUsers < 0) { setEventMessages($holiday->error, $holiday->errors, 'errors'); } $i = 0; -if (count($typeleaves) == 0) -{ +if (count($typeleaves) == 0) { //print '<div class="info">'; print $langs->trans("NoLeaveWithCounterDefined")."<br>\n"; print $langs->trans("GoIntoDictionaryHolidayTypes"); //print '</div>'; } else { $canedit = 0; - if (!empty($user->rights->holiday->define_holiday)) $canedit = 1; + if (!empty($user->rights->holiday->define_holiday)) { + $canedit = 1; + } $moreforfilter = ''; @@ -263,10 +275,8 @@ if (count($typeleaves) == 0) print '</td>'; // Type of leave request - if (count($typeleaves)) - { - foreach ($typeleaves as $key => $val) - { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { print '<td class="liste_titre" style="text-align:center"></td>'; } } else { @@ -285,10 +295,8 @@ if (count($typeleaves) == 0) print '<tr class="liste_titre">'; print_liste_field_titre('Employee', $_SERVER["PHP_SELF"]); print_liste_field_titre('Supervisor', $_SERVER["PHP_SELF"]); - if (count($typeleaves)) - { - foreach ($typeleaves as $key => $val) - { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); } @@ -301,12 +309,12 @@ if (count($typeleaves) == 0) $usersupervisor = new User($db); - foreach ($listUsers as $users) - { + foreach ($listUsers as $users) { // If user has not permission to edit/read all, we must see only subordinates - if (empty($user->rights->holiday->readall)) - { - if (($users['rowid'] != $user->id) && (!in_array($users['rowid'], $userchilds))) continue; // This user is not into hierarchy of current user, we hide it. + if (empty($user->rights->holiday->readall)) { + if (($users['rowid'] != $user->id) && (!in_array($users['rowid'], $userchilds))) { + continue; // This user is not into hierarchy of current user, we hide it. + } } $userstatic->id = $users['rowid']; @@ -318,7 +326,9 @@ if (count($typeleaves) == 0) $userstatic->employee = $users['employee']; $userstatic->fk_user = $users['fk_user']; - if ($userstatic->fk_user > 0) $usersupervisor->fetch($userstatic->fk_user); + if ($userstatic->fk_user > 0) { + $usersupervisor->fetch($userstatic->fk_user); + } print '<tr class="oddeven">'; @@ -329,21 +339,26 @@ if (count($typeleaves) == 0) // Supervisor print '<td>'; - if ($userstatic->fk_user > 0) print $usersupervisor->getNomUrl(-1); + if ($userstatic->fk_user > 0) { + print $usersupervisor->getNomUrl(-1); + } print '</td>'; // Amount for each type - if (count($typeleaves)) - { - foreach ($typeleaves as $key => $val) - { + if (count($typeleaves)) { + foreach ($typeleaves as $key => $val) { $nbtoshow = ''; - if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') $nbtoshow = price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5); + if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') { + $nbtoshow = price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5); + } //var_dump($users['rowid'].' - '.$val['rowid']); print '<td style="text-align:center">'; - if ($canedit) print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>'; - else print $nbtoshow; + if ($canedit) { + print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>'; + } else { + print $nbtoshow; + } //print ' '.$langs->trans('days'); print '</td>'."\n"; } @@ -353,13 +368,14 @@ if (count($typeleaves) == 0) // Note print '<td>'; - if ($canedit) print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>'; + if ($canedit) { + print '<input type="text"'.($canedit ? '' : ' disabled="disabled"').' class="maxwidthonsmartphone" value="" name="note_holiday['.$users['rowid'].']" size="30"/>'; + } print '</td>'; // Button modify print '<td>'; - if (!empty($user->rights->holiday->define_holiday)) // Allowed to set the balance of any user - { + if (!empty($user->rights->holiday->define_holiday)) { // Allowed to set the balance of any user print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Save")).'" class="button smallpaddingimp"/>'; } print '</td>'."\n"; diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 732c4471763..d1be99b0446 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -44,35 +44,89 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'holiday', $id, 'holiday'); - // Get parameters $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 +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 = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} +$childids = $user->getAllChildIds(1); + +$morefilter = ''; +if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) { + $morefilter = 'AND employee = 1'; +} + $object = new Holiday($db); -$object->fetch($id, $ref); + +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +if (($id > 0) || $ref) { + $object->fetch($id, $ref); + + // Check current user can read this leave request + $canread = 0; + if (!empty($user->rights->holiday->readall)) { + $canread = 1; + } + if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) { + $canread = 1; + } + if (!$canread) { + accessforbidden(); + } +} + +/*$cancreate = 0; + +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; +if (!empty($user->rights->holiday->delete)) { + $candelete = 1; +} +if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) { + $candelete = 1; +} +*/ $upload_dir = $conf->holiday->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, ''); $modulepart = 'holiday'; +// Protection if external user +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'holiday', $object->id, 'holiday'); + + /* * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -86,8 +140,7 @@ $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->t llxHeader("", "", $langs->trans("InterventionCard")); -if ($object->id) -{ +if ($object->id) { $valideur = new User($db); $valideur->fetch($object->fk_validator); @@ -102,8 +155,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -138,8 +190,7 @@ if ($object->id) $starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning'; $endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon'; - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td>'; print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); @@ -162,8 +213,7 @@ if ($object->id) print '</tr>'; } - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td>'; print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); @@ -192,15 +242,18 @@ if ($object->id) $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 .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); - if ($includesunday) $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + if ($includesaturday) { + $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); + } + if ($includesunday) { + $htmlhelp .= '<br>'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + } print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); print '</td>'; print '<td>'.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).'</td>'; print '</tr>'; - if ($object->statut == 5) - { + if ($object->statut == 5) { print '<tr>'; print '<td>'.$langs->trans('DetailRefusCP').'</td>'; print '<td>'.$object->detail_refuse.'</td>'; @@ -208,8 +261,7 @@ if ($object->id) } // Description - if (!$edit) - { + if (!$edit) { print '<tr>'; print '<td>'.$langs->trans('DescCP').'</td>'; print '<td>'.nl2br($object->description).'</td>'; @@ -227,67 +279,67 @@ if ($object->id) print '</tbody>'; print '</table>'."\n"; /* - print '</div>'; - print '<div class="fichehalfright">'; - print '<div class="ficheaddleft">'; + print '</div>'; + print '<div class="fichehalfright">'; + print '<div class="ficheaddleft">'; - print '<div class="underbanner clearboth"></div>'; + print '<div class="underbanner clearboth"></div>'; // Info workflow - print '<table class="border tableforfield centpercent">'."\n"; - print '<tbody>'; + print '<table class="border tableforfield centpercent">'."\n"; + print '<tbody>'; - if (! empty($object->fk_user_create)) - { - $userCreate=new User($db); - $userCreate->fetch($object->fk_user_create); - print '<tr>'; - print '<td class="titlefield">'.$langs->trans('RequestByCP').'</td>'; - print '<td>'.$userCreate->getNomUrl(-1).'</td>'; - print '</tr>'; - } + if (! empty($object->fk_user_create)) + { + $userCreate=new User($db); + $userCreate->fetch($object->fk_user_create); + print '<tr>'; + print '<td class="titlefield">'.$langs->trans('RequestByCP').'</td>'; + print '<td>'.$userCreate->getNomUrl(-1).'</td>'; + print '</tr>'; + } - if (!$edit) { - print '<tr>'; - print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; - print '<td>'.$valideur->getNomUrl(-1).'</td>'; - print '</tr>'; - } else { - print '<tr>'; - print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; - print '<td>'; + if (!$edit) { + print '<tr>'; + print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; + print '<td>'.$valideur->getNomUrl(-1).'</td>'; + print '</tr>'; + } else { + print '<tr>'; + print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; + print '<td>'; print $form->select_dolusers($object->fk_user, "valideur", 1, ($user->admin ? '' : array($user->id))); // By default, hierarchical parent - print '</td>'; - print '</tr>'; - } + print '</td>'; + print '</tr>'; + } - print '<tr>'; - print '<td>'.$langs->trans('DateCreation').'</td>'; - print '<td>'.dol_print_date($object->date_create,'dayhour').'</td>'; - print '</tr>'; - if ($object->statut == 3) { - print '<tr>'; - print '<td>'.$langs->trans('DateValidCP').'</td>'; - print '<td>'.dol_print_date($object->date_valid,'dayhour').'</td>'; - print '</tr>'; - } - if ($object->statut == 4) { - print '<tr>'; - print '<td>'.$langs->trans('DateCancelCP').'</td>'; - print '<td>'.dol_print_date($object->date_cancel,'dayhour').'</td>'; - print '</tr>'; - } - if ($object->statut == 5) { - print '<tr>'; - print '<td>'.$langs->trans('DateRefusCP').'</td>'; - print '<td>'.dol_print_date($object->date_refuse,'dayhour').'</td>'; - print '</tr>'; - } - print '</tbody>'; - print '</table>'; + print '<tr>'; + print '<td>'.$langs->trans('DateCreation').'</td>'; + print '<td>'.dol_print_date($object->date_create,'dayhour').'</td>'; + print '</tr>'; + if ($object->statut == 3) { + print '<tr>'; + print '<td>'.$langs->trans('DateValidCP').'</td>'; + print '<td>'.dol_print_date($object->date_valid,'dayhour').'</td>'; + print '</tr>'; + } + if ($object->statut == 4) { + print '<tr>'; + print '<td>'.$langs->trans('DateCancelCP').'</td>'; + print '<td>'.dol_print_date($object->date_cancel,'dayhour').'</td>'; + print '</tr>'; + } + if ($object->statut == 5) { + print '<tr>'; + print '<td>'.$langs->trans('DateRefusCP').'</td>'; + print '<td>'.dol_print_date($object->date_refuse,'dayhour').'</td>'; + print '</tr>'; + } + print '</tbody>'; + print '</table>'; - print '</div>'; - print '</div>'; */ + print '</div>'; + print '</div>'; */ print '</div>'; print '<div class="clearboth"></div>'; diff --git a/htdocs/holiday/img/index.html b/htdocs/holiday/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/holiday/index.html b/htdocs/holiday/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/holiday/info.php b/htdocs/holiday/info.php index 2209143001c..3ec95e61a52 100644 --- a/htdocs/holiday/info.php +++ b/htdocs/holiday/info.php @@ -34,30 +34,43 @@ $langs->load("holiday"); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); + $childids = $user->getAllChildIds(1); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'holiday', $id, 'holiday'); - -$object = new Holiday($db); -if (!$object->fetch($id, $ref) > 0) -{ - dol_print_error($db); +$morefilter = ''; +if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) { + $morefilter = 'AND employee = 1'; } -if ($object->id > 0) -{ - // Check current user can read this expense report +$object = new Holiday($db); + +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +if (($id > 0) || $ref) { + $object->fetch($id, $ref); + + // Check current user can read this leave request $canread = 0; - if (!empty($user->rights->holiday->readall)) $canread = 1; - if (!empty($user->rights->holiday->lire) && in_array($object->fk_user_author, $childids)) $canread = 1; - if (!$canread) - { + if (!empty($user->rights->holiday->readall)) { + $canread = 1; + } + if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'holiday', $object->id, 'holiday'); + /* * View @@ -69,8 +82,7 @@ $title = $langs->trans("Holiday")." - ".$langs->trans("Info"); $helpurl = ""; llxHeader("", $title, $helpurl); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new Holiday($db); $object->fetch($id, $ref); $object->info($object->id); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index cb8da24052b..b00abadb9c3 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2020 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012-2016 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; $langs->loadLangs(array('users', 'other', 'holiday', 'hrm')); // Protection if external user -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); // The action 'add', 'create', 'edit', 'update', 'view', ... $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) @@ -51,7 +53,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'holidaylist'; // 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') +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $id = GETPOST('id', 'int'); @@ -59,21 +61,24 @@ $childids = $user->getAllChildIds(1); // Security check $socid = 0; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } $result = restrictedArea($user, 'holiday', '', ''); // If we are on the view of a specific user -if ($id > 0) -{ +if ($id > 0) { $canread = 0; - if ($id == $user->id) $canread = 1; - if (!empty($user->rights->holiday->readall)) $canread = 1; - if (!empty($user->rights->holiday->read) && in_array($id, $childids)) $canread = 1; - if (!$canread) - { + if ($id == $user->id) { + $canread = 1; + } + if (!empty($user->rights->holiday->readall)) { + $canread = 1; + } + if (!empty($user->rights->holiday->read) && in_array($id, $childids)) { + $canread = 1; + } + if (!$canread) { accessforbidden(); } } @@ -86,12 +91,18 @@ $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 +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 = "cp.rowid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "cp.rowid"; +} $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST('search_ref', 'alphanohtml'); @@ -145,8 +156,7 @@ $arrayfields = array( // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; -if (empty($conf->holiday->enabled)) -{ +if (empty($conf->holiday->enabled)) { llxHeader('', $langs->trans('CPTitreMenu')); print '<div class="tabBar">'; print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>'; @@ -160,21 +170,25 @@ if (empty($conf->holiday->enabled)) * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_month_create = ""; $search_year_create = ""; @@ -190,8 +204,7 @@ if (empty($reshook)) $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')) - { + || 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 } @@ -230,8 +243,7 @@ $min_year = 10; // Get current user id $user_id = $user->id; -if ($id > 0) -{ +if ($id > 0) { // Charge utilisateur edite $fuser->fetch($id, '', '', 1); $fuser->getrights(); @@ -282,21 +294,29 @@ $sql .= " ua.statut as validator_status,"; $sql .= " ua.photo as validator_photo"; // 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."holiday as cp"; -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 (cp.rowid = ef.fk_object)"; +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 (cp.rowid = ef.fk_object)"; +} $sql .= ", ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua"; $sql .= " WHERE cp.entity IN (".getEntity('holiday').")"; $sql .= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau // Search all -if (!empty($sall)) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if (!empty($sall)) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} // Ref -if (!empty($search_ref)) $sql .= natural_search("cp.ref", $search_ref); +if (!empty($search_ref)) { + $sql .= natural_search("cp.ref", $search_ref); +} // Start date $sql .= dolSqlDateFilter("cp.date_debut", $search_day_start, $search_month_start, $search_year_start); // End date @@ -320,8 +340,12 @@ if (!empty($search_status) && $search_status != -1) { $sql .= " AND cp.statut = '".$db->escape($search_status)."'\n"; } -if (empty($user->rights->holiday->readall)) $sql .= ' AND cp.fk_user IN ('.join(',', $childids).')'; -if ($id > 0) $sql .= " AND cp.fk_user IN (".$id.")"; +if (empty($user->rights->holiday->readall)) { + $sql .= ' AND cp.fk_user IN ('.$db->sanitize(join(',', $childids)).')'; +} +if ($id > 0) { + $sql .= " AND cp.fk_user IN (".$db->sanitize($id).")"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -334,12 +358,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -350,56 +372,96 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 ($search_day_create) $param .= '&search_day_create='.urlencode($search_day_create); - if ($search_month_create) $param .= '&search_month_create='.urlencode($search_month_create); - if ($search_year_create) $param .= '&search_year_create='.urlencode($search_year_create); - if ($search_day_start) $param .= '&search_day_start='.urlencode($search_day_start); - if ($search_month_start) $param .= '&search_month_start='.urlencode($search_month_start); - if ($search_year_start) $param .= '&search_year_start='.urlencode($search_year_start); - if ($search_day_end) $param .= '&search_day_end='.urlencode($search_day_end); - if ($search_month_end) $param .= '&search_month_end='.urlencode($search_month_end); - if ($search_year_end) $param .= '&search_year_end='.urlencode($search_year_end); - 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_status > 0) $param .= '&search_status='.urlencode($search_status); + 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 ($search_day_create) { + $param .= '&search_day_create='.urlencode($search_day_create); + } + if ($search_month_create) { + $param .= '&search_month_create='.urlencode($search_month_create); + } + if ($search_year_create) { + $param .= '&search_year_create='.urlencode($search_year_create); + } + if ($search_day_start) { + $param .= '&search_day_start='.urlencode($search_day_start); + } + if ($search_month_start) { + $param .= '&search_month_start='.urlencode($search_month_start); + } + if ($search_year_start) { + $param .= '&search_year_start='.urlencode($search_year_start); + } + if ($search_day_end) { + $param .= '&search_day_end='.urlencode($search_day_end); + } + if ($search_month_end) { + $param .= '&search_month_end='.urlencode($search_month_end); + } + if ($search_year_end) { + $param .= '&search_year_end='.urlencode($search_year_end); + } + 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_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'; // List of mass actions available $arrayofmassactions = array( - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); - if ($user->rights->holiday->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if (!empty($user->rights->holiday->delete)) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // Lines of title fields print '<form id="searchFormList" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="'.($action == 'edit' ? 'update' : 'list').'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; - if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">'; + if ($id > 0) { + print '<input type="hidden" name="id" value="'.$id.'">'; + } - if ($id > 0) // For user tab - { + if ($id > 0) { // For user tab $title = $langs->trans("User"); $linkback = '<a href="'.DOL_URL_ROOT.'/user/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $head = user_prepare_head($fuser); @@ -408,8 +470,7 @@ if ($resql) dol_banner_tab($fuser, 'id', $linkback, $user->rights->user->user->lire || $user->admin); - if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { + if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) { print '<div class="underbanner clearboth"></div>'; print '<br>'; @@ -425,8 +486,7 @@ if ($resql) $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) - { + if ($canedit) { print '<a href="'.DOL_URL_ROOT.'/holiday/card.php?action=create&fuserid='.$user_id.'" class="butAction">'.$langs->trans("AddCP").'</a>'; } @@ -445,9 +505,10 @@ if ($resql) $trackid = 'leav'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -455,11 +516,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -471,7 +534,9 @@ if ($resql) $include = ''; - if (empty($user->rights->holiday->readall)) $include = 'hierarchyme'; // Can see only its hierarchyl + if (empty($user->rights->holiday->readall)) { + $include = 'hierarchyme'; // Can see only its hierarchyl + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; @@ -480,23 +545,22 @@ if ($resql) // Filters print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['cp.ref']['checked'])) - { + if (!empty($arrayfields['cp.ref']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['cp.fk_user']['checked'])) - { + if (!empty($arrayfields['cp.fk_user']['checked'])) { $morefilter = ''; - if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) $morefilter = 'AND employee = 1'; + if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) { + $morefilter = 'AND employee = 1'; + } // User $disabled = 0; // If into the tab holiday of a user ($id is set in such a case) - if ($id && !GETPOSTISSET('search_employee')) - { + if ($id && !GETPOSTISSET('search_employee')) { $search_employee = $id; $disabled = 1; } @@ -507,16 +571,16 @@ if ($resql) } // Approver - if (!empty($arrayfields['cp.fk_validator']['checked'])) - { - if ($user->rights->holiday->readall) - { + if (!empty($arrayfields['cp.fk_validator']['checked'])) { + if ($user->rights->holiday->readall) { print '<td class="liste_titre maxwidthonsmartphone left">'; $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; + 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, '', 'maxwidth150'); print '</td>'; } else { @@ -525,16 +589,14 @@ if ($resql) } // Type - if (!empty($arrayfields['cp.fk_type']['checked'])) - { + if (!empty($arrayfields['cp.fk_type']['checked'])) { print '<td class="liste_titre">'; if (empty($mysoc->country_id)) { setEventMessages(null, array($langs->trans("ErrorSetACountryFirst"), $langs->trans("CompanyFoundation")), 'errors'); } else { $typeleaves = $holidaystatic->getTypes(1, -1); $arraytypeleaves = array(); - foreach ($typeleaves as $key => $val) - { + 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; @@ -545,14 +607,12 @@ if ($resql) } // Duration - if (!empty($arrayfields['duration']['checked'])) - { + if (!empty($arrayfields['duration']['checked'])) { print '<td class="liste_titre">&nbsp;</td>'; } // Start date - if (!empty($arrayfields['cp.date_debut']['checked'])) - { + if (!empty($arrayfields['cp.date_debut']['checked'])) { print '<td class="liste_titre center nowraponall">'; print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month_start" value="'.dol_escape_htmltag($search_month_start).'">'; $formother->select_year($search_year_start, 'search_year_start', 1, $min_year, $max_year); @@ -560,8 +620,7 @@ if ($resql) } // End date - if (!empty($arrayfields['cp.date_fin']['checked'])) - { + if (!empty($arrayfields['cp.date_fin']['checked'])) { print '<td class="liste_titre center nowraponall">'; print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month_end" value="'.dol_escape_htmltag($search_month_end).'">'; $formother->select_year($search_year_end, 'search_year_end', 1, $min_year, $max_year); @@ -576,8 +635,7 @@ if ($resql) print $hookmanager->resPrint; // Create date - if (!empty($arrayfields['cp.date_create']['checked'])) - { + if (!empty($arrayfields['cp.date_create']['checked'])) { print '<td class="liste_titre center nowraponall">'; print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month_create" value="'.dol_escape_htmltag($search_month_create).'">'; $formother->select_year($search_year_create, 'search_year_create', 1, $min_year, 0); @@ -585,8 +643,7 @@ if ($resql) } // Create date - if (!empty($arrayfields['cp.tms']['checked'])) - { + if (!empty($arrayfields['cp.tms']['checked'])) { print '<td class="liste_titre center nowraponall">'; print '<input class="flat valignmiddle maxwidth25" type="text" maxlength="2" name="search_month_update" value="'.dol_escape_htmltag($search_month_update).'">'; $formother->select_year($search_year_update, 'search_year_update', 1, $min_year, 0); @@ -594,8 +651,7 @@ if ($resql) } // Status - if (!empty($arrayfields['cp.statut']['checked'])) - { + if (!empty($arrayfields['cp.statut']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone maxwidth200 right">'; $object->selectStatutCP($search_status, 'search_status'); print '</td>'; @@ -610,22 +666,42 @@ if ($resql) print "</tr>\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['cp.ref']['checked'])) print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder); - 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 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 '); + if (!empty($arrayfields['cp.ref']['checked'])) { + print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder); + } + 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 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 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['cp.date_create']['checked'])) print_liste_field_titre($arrayfields['cp.date_create']['label'], $_SERVER["PHP_SELF"], "cp.date_create", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['cp.tms']['checked'])) print_liste_field_titre($arrayfields['cp.tms']['label'], $_SERVER["PHP_SELF"], "cp.tms", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['cp.statut']['checked'])) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['cp.date_create']['checked'])) { + print_liste_field_titre($arrayfields['cp.date_create']['label'], $_SERVER["PHP_SELF"], "cp.date_create", "", $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['cp.tms']['checked'])) { + print_liste_field_titre($arrayfields['cp.tms']['label'], $_SERVER["PHP_SELF"], "cp.tms", "", $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['cp.statut']['checked'])) { + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "</tr>\n"; @@ -637,8 +713,7 @@ if ($resql) $langs->load("errors"); print '<tr class="oddeven opacitymediuem"><td colspan="10">'.$langs->trans("NotEnoughPermissions").'</td></tr>'; $result = 0; - } elseif ($num > 0 && !empty($mysoc->country_id)) - { + } elseif ($num > 0 && !empty($mysoc->country_id)) { // Lines $userstatic = new User($db); $approbatorstatic = new User($db); @@ -647,8 +722,7 @@ if ($resql) $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); // Leave request @@ -684,54 +758,61 @@ if ($resql) print '<tr class="oddeven">'; - if (!empty($arrayfields['cp.ref']['checked'])) - { + if (!empty($arrayfields['cp.ref']['checked'])) { print '<td class="nowraponall">'; print $holidaystatic->getNomUrl(1, 1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.fk_user']['checked'])) - { + if (!empty($arrayfields['cp.fk_user']['checked'])) { print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1, 'leave').'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.fk_validator']['checked'])) - { + if (!empty($arrayfields['cp.fk_validator']['checked'])) { print '<td class="tdoverflowmax150">'.$approbatorstatic->getNomUrl(-1).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.fk_type']['checked'])) - { + if (!empty($arrayfields['cp.fk_type']['checked'])) { print '<td>'; $labeltypeleavetoshow = ($langs->trans($typeleaves[$obj->fk_type]['code']) != $typeleaves[$obj->fk_type]['code'] ? $langs->trans($typeleaves[$obj->fk_type]['code']) : $typeleaves[$obj->fk_type]['label']); print empty($typeleaves[$obj->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved", $obj->fk_type) : $labeltypeleavetoshow; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['duration']['checked'])) - { + if (!empty($arrayfields['duration']['checked'])) { print '<td class="right">'; $nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday); print $nbopenedday.' '.$langs->trans('DurationDays'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.date_debut']['checked'])) - { + if (!empty($arrayfields['cp.date_debut']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_debut), 'day'); print ' <span class="opacitymedium nowraponall">('.$langs->trans($listhalfday[$starthalfday]).')</span>'; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.date_fin']['checked'])) - { + if (!empty($arrayfields['cp.date_fin']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_fin), 'day'); print ' <span class="opacitymedium nowraponall">('.$langs->trans($listhalfday[$endhalfday]).')</span>'; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -742,32 +823,38 @@ if ($resql) print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['cp.date_create']['checked'])) - { + if (!empty($arrayfields['cp.date_create']['checked'])) { print '<td style="text-align: center;">'.dol_print_date($date, 'dayhour').'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.tms']['checked'])) - { + if (!empty($arrayfields['cp.tms']['checked'])) { print '<td style="text-align: center;">'.dol_print_date($date_modif, 'dayhour').'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['cp.statut']['checked'])) - { + if (!empty($arrayfields['cp.statut']['checked'])) { print '<td class="right nowrap">'.$holidaystatic->getLibStatut(5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -776,10 +863,13 @@ if ($resql) } // Si il n'y a pas d'enregistrement suite à une recherche - if ($num == 0) - { + if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -815,8 +905,7 @@ function showMyBalance($holiday, $user_id) $out = ''; $nb_holiday = 0; $typeleaves = $holiday->getTypes(1, 1); - foreach ($typeleaves as $key => $val) - { + foreach ($typeleaves as $key => $val) { $nb_type = $holiday->getCPforUser($user_id, $val['rowid']); $nb_holiday += $nb_type; $out .= ' - '.$val['label'].': <strong>'.($nb_type ?price2num($nb_type) : 0).'</strong><br>'; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index b83d957b27f..62991a6e0ee 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -36,8 +36,7 @@ $langs->loadLangs(array("holiday")); // Security check $socid = 0; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } @@ -57,8 +56,12 @@ $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'alpha'); -if (!$sortfield) $sortfield = "cp.rowid"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "cp.rowid"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $hookmanager->initHooks(array('leavemovementlist')); @@ -69,21 +72,25 @@ $arrayofmassactions = array(); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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 = ''; @@ -97,8 +104,7 @@ if (empty($reshook)) || GETPOST('button_removefilter', 'alpha') || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') - || GETPOST('button_search', 'alpha')) - { + || GETPOST('button_search', 'alpha')) { $massaction = ''; } } @@ -141,16 +147,23 @@ $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)."')"; -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); +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->sanitize($search_type).')'; +} +if (!empty($search_description)) { + $sql .= natural_search('cp.description', $search_description); +} $sql .= $db->order($sortfield, $sortorder); $resql = $db->query($sql); -if (empty($resql)) -{ +if (empty($resql)) { dol_print_error($db); exit; } @@ -158,15 +171,29 @@ 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); +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 '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -215,8 +242,7 @@ if (!empty($arrayfields['cp.fk_user']['checked'])) { if (!empty($arrayfields['ct.label']['checked'])) { $typeleaves = $holidaystatic->getTypes(1, -1); $arraytypeleaves = array(); - foreach ($typeleaves as $key => $val) - { + foreach ($typeleaves as $key => $val) { $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); $arraytypeleaves[$val['rowid']] = $labeltoshow; } @@ -226,12 +252,24 @@ if (!empty($arrayfields['ct.label']['checked'])) { print '</td>'; } -if (!empty($arrayfields['cp.date_debut']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['cp.date_fin']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['used_days']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['date_start_month']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['date_end_month']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['used_days_month']['checked'])) print '<td class="liste_titre"></td>'; +if (!empty($arrayfields['cp.date_debut']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['cp.date_fin']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['used_days']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['date_start_month']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['date_end_month']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['used_days_month']['checked'])) { + print '<td class="liste_titre"></td>'; +} // Filter: Description if (!empty($arrayfields['cp.description']['checked'])) { @@ -248,26 +286,43 @@ print '</td>'; print '</tr>'; print '<tr class="liste_titre">'; -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); +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 '</tr>'; -if ($num == 0) -{ +if ($num == 0) { print '<tr><td colspan="10" class="opacitymedium">'.$langs->trans('None').'</td></tr>'; -} -else { - while ($obj = $db->fetch_object($resql)) - { +} else { + while ($obj = $db->fetch_object($resql)) { $user = new User($db); $user->fetch($obj->fk_user); @@ -289,19 +344,25 @@ else { // Set date_start_gmt and date_end_gmt that are date to show for the selected month $date_start_inmonth = $db->jdate($obj->date_debut, true); $date_end_inmonth = $db->jdate($obj->date_fin, true); - if ($tmpstart['year'] < $search_year || $tmpstart['mon'] < $search_month) - { + if ($tmpstart['year'] < $search_year || $tmpstart['mon'] < $search_month) { $date_start_inmonth = dol_get_first_day($search_year, $search_month, true); $starthalfdayinmonth = 'morning'; - if ($halfdayinmonth == 2) $halfdayinmonth = 1; - if ($halfdayinmonth == -1) $halfdayinmonth = 0; + if ($halfdayinmonth == 2) { + $halfdayinmonth = 1; + } + if ($halfdayinmonth == -1) { + $halfdayinmonth = 0; + } } - if ($tmpend['year'] > $search_year || $tmpend['mon'] > $search_month) - { + if ($tmpend['year'] > $search_year || $tmpend['mon'] > $search_month) { $date_end_inmonth = dol_get_last_day($search_year, $search_month, true) - ((24 * 3600) - 1); $endhalfdayinmonth = 'afternoon'; - if ($halfdayinmonth == 2) $halfdayinmonth = -1; - if ($halfdayinmonth == 1) $halfdayinmonth = 0; + if ($halfdayinmonth == 2) { + $halfdayinmonth = -1; + } + if ($halfdayinmonth == 1) { + $halfdayinmonth = 0; + } } // Leave request @@ -310,42 +371,50 @@ else { print '<tr class="oddeven">'; - if (!empty($arrayfields['cp.ref']['checked'])) print '<td>'.$holidaystatic->getNomUrl(1, 1).'</td>'; - if (!empty($arrayfields['cp.fk_user']['checked'])) print '<td>'.$user->getFullName($langs).'</td>'; - if (!empty($arrayfields['ct.label']['checked'])) print '<td>'.$obj->label.'</td>'; + if (!empty($arrayfields['cp.ref']['checked'])) { + print '<td>'.$holidaystatic->getNomUrl(1, 1).'</td>'; + } + if (!empty($arrayfields['cp.fk_user']['checked'])) { + print '<td>'.$user->getFullName($langs).'</td>'; + } + if (!empty($arrayfields['ct.label']['checked'])) { + print '<td>'.$obj->label.'</td>'; + } - if (!empty($arrayfields['cp.date_debut']['checked'])) - { + if (!empty($arrayfields['cp.date_debut']['checked'])) { print '<td class="center">'.dol_print_date($db->jdate($obj->date_debut), 'day'); print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$starthalfday]).')</span>'; print '</td>'; } - if (!empty($arrayfields['cp.date_fin']['checked'])) - { + if (!empty($arrayfields['cp.date_fin']['checked'])) { print '<td class="center">'.dol_print_date($db->jdate($obj->date_fin), 'day'); print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$endhalfday]).')</span>'; print '</td>'; } - if (!empty($arrayfields['used_days']['checked'])) print '<td class="right">'.num_open_day($date_start, $date_end, 0, 1, $obj->halfday).'</td>'; + if (!empty($arrayfields['used_days']['checked'])) { + print '<td class="right">'.num_open_day($date_start, $date_end, 0, 1, $obj->halfday).'</td>'; + } - if (!empty($arrayfields['date_start_month']['checked'])) - { + if (!empty($arrayfields['date_start_month']['checked'])) { print '<td class="center">'.dol_print_date($date_start_inmonth, 'day'); print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$starthalfdayinmonth]).')</span>'; print '</td>'; } - if (!empty($arrayfields['date_end_month']['checked'])) - { + if (!empty($arrayfields['date_end_month']['checked'])) { print '<td class="center">'.dol_print_date($date_end_inmonth, 'day'); print ' <span class="opacitymedium">('.$langs->trans($listhalfday[$endhalfdayinmonth]).')</span>'; print '</td>'; } - if (!empty($arrayfields['used_days_month']['checked'])) print '<td class="right">'.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).'</td>'; - if (!empty($arrayfields['cp.description']['checked'])) print '<td class="maxwidth300">'.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).'</td>'; + if (!empty($arrayfields['used_days_month']['checked'])) { + print '<td class="right">'.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).'</td>'; + } + if (!empty($arrayfields['cp.description']['checked'])) { + print '<td class="maxwidth300">'.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).'</td>'; + } print '<td></td>'; print '</tr>'; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 2f2e223c87c..a2ecbe1e8b3 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -61,15 +61,23 @@ $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 +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 = "cpl.rowid"; -if (!$sortorder) $sortorder = "DESC"; +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->readall) accessforbidden(); +if (!$user->rights->holiday->readall) { + accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('users', 'other', 'holiday')); @@ -83,8 +91,7 @@ $hookmanager->initHooks(array('leavemovementlist')); // Note that conf->hooks_mo $arrayfields = array(); $arrayofmassactions = array(); -if (empty($conf->holiday->enabled)) -{ +if (empty($conf->holiday->enabled)) { llxHeader('', $langs->trans('CPTitreMenu')); print '<div class="tabBar">'; print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>'; @@ -98,12 +105,18 @@ if (empty($conf->holiday->enabled)) * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { // Selection of new fields @@ -129,8 +142,7 @@ if (empty($reshook)) { || GETPOST('button_removefilter', 'alpha') || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') - || GETPOST('button_search', 'alpha')) - { + || GETPOST('button_search', 'alpha')) { $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation } @@ -184,13 +196,27 @@ if (!empty($search_year) && $search_year > 0) { $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); +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); @@ -214,20 +240,44 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 (!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); +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 '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -348,23 +398,40 @@ print '</td>'; print '</tr>'; print '<tr class="liste_titre">'; -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 '); +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 '</tr>'; // TODO: $i = 0; $i = 1; -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { //TODO: $obj = $db->fetch_object($resql); $obj = next($object->logs); diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index a777ada50f9..f5baeee4027 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -27,11 +27,19 @@ require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'hrm')); -if (!$user->admin) - accessforbidden(); - $error = 0; +$permissiontoread = $user->admin; +$permissiontoadd = $user->admin; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); +if (empty($conf->hrm->enabled)) accessforbidden(); +if (empty($permissiontoread)) accessforbidden(); + /* * Actions @@ -47,13 +55,19 @@ $error = 0; $form = new Form($db); $establishmenttmp = new Establishment($db); -llxHeader('', $langs->trans("Establishments")); +$title = $langs->trans('Establishments'); + +llxHeader('', $title, ''); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortorder = GETPOST("sortorder", 'alpha'); $sortfield = GETPOST("sortfield", 'alpha'); -if (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "e.rowid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "e.rowid"; +} if (empty($page) || $page == -1) { $page = 0; @@ -68,19 +82,20 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans("HRMSetup"), $linkback); +$newcardbutton = dolGetButtonTitle($langs->trans('NewEstablishment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/hrm/establishment/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + // Configuration header $head = hrm_admin_prepare_head(); -print dol_get_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user"); +print dol_get_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user", 0, $newcardbutton); -$sql = "SELECT e.rowid, e.label, e.address, e.zip, e.town, e.status"; +$sql = "SELECT e.rowid, e.rowid as ref, 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); $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -95,12 +110,10 @@ if ($result) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.status", "", "", '', $sortfield, $sortorder, 'right '); print "</tr>\n"; - if ($num > 0) - { + if ($num > 0) { $establishmentstatic = new Establishment($db); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); $establishmentstatic->id = $obj->rowid; @@ -133,11 +146,6 @@ if ($result) print dol_get_fiche_end(); -// Buttons -print '<div class="tabsAction">'; -print '<a class="butAction" href="'.DOL_URL_ROOT.'/hrm/establishment/card.php?action=create">'.$langs->trans("NewEstablishment").'</a>'; -print '</div>'; - // End of page llxFooter(); $db->close(); diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index 4648c2d690a..455035a6b53 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -27,9 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'hrm')); -if (!$user->admin) - accessforbidden(); - $action = GETPOST('action', 'aZ09'); // Other parameters HRM_* @@ -37,9 +34,22 @@ $list = array( // 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example ); +$permissiontoread = $user->admin; +$permissiontoadd = $user->admin; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); +if (empty($conf->hrm->enabled)) accessforbidden(); +if (empty($permissiontoread)) accessforbidden(); + + /* * Actions */ + if ($action == 'update') { $error = 0; @@ -63,7 +73,10 @@ if ($action == 'update') { * View */ -llxHeader('', $langs->trans('Parameters')); + +$title = $langs->trans('Parameters'); + +llxHeader('', $title, ''); $form = new Form($db); @@ -88,9 +101,7 @@ print '<td colspan="3">'.$langs->trans('Parameters').'</td>'; print "</tr>\n"; foreach ($list as $key) { - $var = !$var; - - print '<tr '.$bc[$var].' class="value">'; + print '<tr class="oddeven value">'; // Param $label = $langs->trans($key); diff --git a/htdocs/hrm/admin/index.html b/htdocs/hrm/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index dc97787ae6e..c63ab29a14a 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -58,7 +58,7 @@ class Establishment extends CommonObject /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'building'; + public $picto = 'establishment'; /** * @var int ID @@ -180,7 +180,9 @@ class Establishment extends CommonObject $this->zip = trim($this->zip); $this->town = trim($this->town); - if (empty($this->ref)) $this->ref = '(PROV)'; + if (empty($this->ref)) { + $this->ref = '(PROV)'; + } $this->db->begin(); @@ -248,8 +250,7 @@ class Establishment extends CommonObject global $langs; // Check parameters - if (empty($this->label)) - { + if (empty($this->label)) { $this->error = 'ErrorBadParameter'; return -1; } @@ -292,12 +293,11 @@ class Establishment extends CommonObject $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 .= " WHERE e.rowid = ".$id; + $sql .= " WHERE e.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -330,12 +330,11 @@ class Establishment extends CommonObject { $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."establishment WHERE rowid = ".$id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."establishment WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->db->commit(); return 1; } else { @@ -367,8 +366,7 @@ class Establishment extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_OPEN] = $langs->trans('Open'); @@ -378,8 +376,12 @@ class Establishment extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_OPEN) $statusType = 'status4'; - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + if ($status == self::STATUS_OPEN) { + $statusType = 'status4'; + } + if ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -395,27 +397,23 @@ class Establishment extends CommonObject { $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; + $sql .= ' WHERE e.rowid = '.((int) $id); dol_syslog(get_class($this)."::fetch info", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; $this->date_creation = $this->db->jdate($obj->datec); - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_mod) { $muser = new User($this->db); $muser->fetch($obj->fk_user_mod); $this->user_modification = $muser; @@ -430,28 +428,92 @@ class Establishment extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return a link to the object card (with optionaly the picto) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @return string String with URL + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @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) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { - global $langs; + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; - $link = '<a href="'.DOL_URL_ROOT.'/hrm/establishment/card.php?id='.$this->id.'">'; - $linkend = '</a>'; + $label = img_picto('', $this->picto).' <u>'.$langs->trans("Establishment").'</u>'; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } + $label .= '<br>'; + $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; - $picto = 'building'; + $url = DOL_URL_ROOT.'/hrm/establishment/card.php?id='.$this->id; - $label = '<u>'.$langs->trans("Establishment").'</u>'; - $label .= '<br>'.$langs->trans("Label").': '.$this->label; + 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("Establishment"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } + + if ($option == 'nolink') { + $linkstart = '<span'; + } else { + $linkstart = '<a href="'.$url.'"'; + } + $linkstart .= $linkclose.'>'; + if ($option == 'nolink') { + $linkend = '</span>'; + } else { + $linkend = '</a>'; + } + + $result .= $linkstart; + + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + + if ($withpicto != 2) { + $result .= $this->ref; + } + + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('establishmentdao')); + $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; + } - if ($withpicto) $result .= ($link.img_object($label, $picto).$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.$this->label.$linkend; return $result; } @@ -465,10 +527,14 @@ class Establishment extends CommonObject global $mysoc; // We return country code of bank account - if (!empty($this->country_code)) return $this->country_code; + 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; + if (!empty($mysoc->country_code)) { + return $mysoc->country_code; + } return ''; } diff --git a/htdocs/hrm/class/index.html b/htdocs/hrm/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 15fd44e2c3b..caec6191d0d 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -19,6 +19,7 @@ * \file htdocs/hrm/establishment/card.php * \brief Page to show an establishment */ + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php'; @@ -28,9 +29,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'hrm')); -// Security check -if (!$user->admin) accessforbidden(); - $error = 0; $action = GETPOST('action', 'aZ09'); @@ -44,47 +42,55 @@ static $tmpstatus2label = array( '1'=>'OpenEtablishment' ); $status2label = array(''); -foreach ($tmpstatus2label as $key => $val) $status2label[$key] = $langs->trans($val); +foreach ($tmpstatus2label as $key => $val) { + $status2label[$key] = $langs->trans($val); +} $object = new Establishment($db); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once +$permissiontoread = $user->admin; +$permissiontoadd = $user->admin; // Used by the include of actions_addupdatedelete.inc.php +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1]; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0); +if (empty($conf->hrm->enabled)) accessforbidden(); +if (empty($permissiontoread)) accessforbidden(); + /* * Actions */ -if ($action == 'confirm_delete' && $confirm == "yes") -{ +if ($action == 'confirm_delete' && $confirm == "yes") { $result = $object->delete($id); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ../admin/admin_establishment.php"); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } -} elseif ($action == 'add') -{ - if (!$cancel) - { +} elseif ($action == 'add') { + if (!$cancel) { $error = 0; $object->label = GETPOST('label', 'alpha'); - if (empty($object->label)) - { + 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'); - $object->country_id = $_POST["country_id"]; + $object->zip = GETPOST('zipcode', 'alpha'); + $object->town = GETPOST('town', 'alpha'); + $object->country_id = GETPOST("country_id", 'int'); $object->status = GETPOST('status', 'int'); $object->fk_user_author = $user->id; $object->datec = dol_now(); @@ -92,8 +98,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -106,11 +111,8 @@ if ($action == 'confirm_delete' && $confirm == "yes") header("Location: ../admin/admin_establishment.php"); exit; } -} - -// Update record -elseif ($action == 'update') -{ +} elseif ($action == 'update') { + // Update record $error = 0; if (!$cancel) { @@ -120,8 +122,7 @@ elseif ($action == 'update') $error++; } - if (empty($error)) - { + if (empty($error)) { $object->label = GETPOST('label', 'alphanohtml'); $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); @@ -133,8 +134,7 @@ elseif ($action == 'update') $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']); exit; } else { @@ -159,8 +159,7 @@ $formcompany = new FormCompany($db); /* * Action create */ -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewEstablishment")); print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; @@ -174,7 +173,7 @@ if ($action == 'create') // Name print '<tr>'; print '<td>'.$form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).'</td>'; - print '<td><input name="label" id="label" value="'.GETPOST("label", "alphanohtml").'"></td>'; + print '<td><input name="label" id="label" value="'.GETPOST("label", "alphanohtml").'" autofocus></td>'; print '</tr>'; // Entity @@ -228,7 +227,9 @@ if ($action == 'create') print '<td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>'; print '<td class="maxwidthonsmartphone">'; print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : ($object->country_id ? $object->country_id : $mysoc->country_id), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; print '</tr>'; @@ -253,16 +254,13 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { $result = $object->fetch($id); - if ($result > 0) - { + if ($result > 0) { $head = establishment_prepare_head($object); - if ($action == 'edit') - { - print dol_get_fiche_head($head, 'card', $langs->trans("Establishment"), 0, 'building'); + if ($action == 'edit') { + print dol_get_fiche_head($head, 'card', $langs->trans("Establishment"), 0, $object->picto); print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -284,12 +282,12 @@ if (($id || $ref) && $action == 'edit') // Entity /* - if (! empty($conf->multicompany->enabled)) { - print '<tr><td>'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).'</td>'; + if (! empty($conf->multicompany->enabled)) { + print '<tr><td>'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).'</td>'; print '<td class="maxwidthonsmartphone">'; print $object->entity > 0 ? $object->entity : $conf->entity; - print '</td></tr>'; - }*/ + print '</td></tr>'; + }*/ // Address print '<tr><td>'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>'; @@ -313,7 +311,9 @@ if (($id || $ref) && $action == 'edit') print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>'; print '<td class="maxwidthonsmartphone">'; print $form->select_country($object->country_id, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; print '</tr>'; @@ -334,19 +334,19 @@ if (($id || $ref) && $action == 'edit') print '</form>'; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = establishment_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("Establishment"), -1, 'building'); + print dol_get_fiche_head($head, 'card', $langs->trans("Establishment"), -1, $object->picto); // Confirmation to delete - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteEstablishment"), $langs->trans("ConfirmDeleteEstablishment"), "confirm_delete"); } @@ -404,8 +404,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr>'; print '<td>'.$langs->trans("Country").'</td>'; print '<td>'; - if ($object->country_id > 0) - { + if ($object->country_id > 0) { $img = picto_from_langcode($object->country_code); print $img ? $img.' ' : ''; print getCountry($object->getCountryCode(), 0, $db); @@ -421,9 +420,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); /* - * Barre d'actions - */ - + * Action bar + */ print '<div class="tabsAction">'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>'; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$id.'">'.$langs->trans('Delete').'</a>'; diff --git a/htdocs/hrm/establishment/index.html b/htdocs/hrm/establishment/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 3185f897958..517b76de93a 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -37,7 +37,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -47,12 +49,18 @@ $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical objects $object = new Establishment($db); @@ -64,14 +72,21 @@ $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; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; +} + +$permissiontoread = $user->admin; +$permissiontoadd = $user->rights->hrm->write; // Used by the include of actions_addupdatedelete.inc.php +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1]; // 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 +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +if (empty($conf->hrm->enabled)) accessforbidden(); +if (empty($permissiontoread)) accessforbidden(); /* @@ -80,20 +95,19 @@ $permissiontoadd = $user->rights->hrm->write; // Used by the include of 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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -107,18 +121,19 @@ if (empty($reshook)) $form = new Form($db); -if ($object->id > 0) -{ +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"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = establishment_prepare_head($object); - print dol_get_fiche_head($head, 'info', $langs->trans("Establishment"), -1, 'building'); + print dol_get_fiche_head($head, 'info', $langs->trans("Establishment"), -1, $object->picto); // Object card // ------------------------------------------------------------ diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index f0bbb442acc..09485357956 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2012-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,8 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; 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'; +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'; @@ -47,9 +52,13 @@ $langs->loadLangs(array('users', 'holidays', 'trips', 'boxes')); $socid = GETPOST("socid", "int"); // Protection if external user -if ($user->socid > 0) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} -if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete = 1; +if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { + $setupcompanynotcomplete = 1; +} $holiday = new Holiday($db); $holidaystatic = new Holiday($db); @@ -63,8 +72,7 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; */ // Update sold -if (!empty($conf->holiday->enabled) && !empty($setupcompanynotcomplete)) -{ +if (!empty($conf->holiday->enabled) && !empty($setupcompanynotcomplete)) { $result = $holiday->updateBalance(); } @@ -76,13 +84,14 @@ if (!empty($conf->holiday->enabled) && !empty($setupcompanynotcomplete)) $childids = $user->getAllChildIds(); $childids[] = $user->id; -llxHeader('', $langs->trans('HRMArea')); +$title = $langs->trans('HRMArea'); + +llxHeader('', $title, ''); print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm'); -if (!empty($setupcompanynotcomplete)) -{ +if (!empty($setupcompanynotcomplete)) { $langs->load("errors"); $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete")); print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit').'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>'; @@ -94,36 +103,34 @@ if (!empty($setupcompanynotcomplete)) print '<div class="fichecenter"><div class="fichethirdleft">'; -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) - { +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) - { + 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) - { + if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { $langs->load("trips"); $listofsearchfields['search_expensereport'] = array('text'=>'ExpenseReport'); } - if (count($listofsearchfields)) - { + if (count($listofsearchfields)) { print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder nohover centpercent">'; $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; + foreach ($listofsearchfields as $key => $value) { + if ($i == 0) { + print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; + } print '<tr '.$bc[false].'>'; print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; - if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; + if ($i == 0) { + print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; + } print '</tr>'; $i++; } @@ -135,10 +142,8 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles } -if (!empty($conf->holiday->enabled)) -{ - if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { +if (!empty($conf->holiday->enabled)) { + if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) { $user_id = $user->id; print '<div class="div-table-responsive-no-min">'; @@ -148,9 +153,9 @@ if (!empty($conf->holiday->enabled)) print '<td colspan="3">'; $out = ''; + $nb_holiday = 0; $typeleaves = $holiday->getTypes(1, 1); - foreach ($typeleaves as $key => $val) - { + foreach ($typeleaves as $key => $val) { $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>'; @@ -161,8 +166,7 @@ if (!empty($conf->holiday->enabled)) print '</td>'; print '</tr>'; print '</table></div><br>'; - } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) - { + } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'<br>'; } } @@ -173,22 +177,22 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; // Latest leave requests -if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) -{ +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 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->readall)) $sql .= ' AND x.fk_user IN ('.join(',', $childids).')'; + if (empty($user->rights->holiday->readall)) { + $sql .= ' AND x.fk_user IN ('.$db->sanitize(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) - { + if ($result) { $var = false; $num = $db->num_rows($result); @@ -208,10 +212,8 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) print '<th>'.$langs->trans("to").'</th>'; print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; print '</tr>'; - if ($num) - { - while ($i < $num && $i < $max) - { + if ($num) { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); $holidaystatic->id = $obj->rowid; @@ -248,28 +250,30 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) print '</table>'; print '</div>'; print '<br>'; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } // Latest expense report -if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) -{ +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 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"; $sql .= " AND x.entity = ".$conf->entity; - if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) $sql .= ' AND x.fk_user_author IN ('.join(',', $childids).')'; + if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) { + $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(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) - { + if ($result) { $num = $db->num_rows($result); $i = 0; @@ -281,14 +285,12 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) print '<th class="right">'.$langs->trans("TotalTTC").'</th>'; print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; print '</tr>'; - if ($num) - { + if ($num) { $total_ttc = $totalam = $total = 0; $expensereportstatic = new ExpenseReport($db); $userstatic = new User($db); - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); $expensereportstatic->id = $obj->rowid; @@ -320,26 +322,32 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) print '</table>'; print '</div>'; print '<br>'; - } else dol_print_error($db); + } else { + dol_print_error($db); + } } // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) -{ +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"; + 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"; + 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) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -351,10 +359,8 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme print '</th>'; print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; print '</tr>'; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $objp = $db->fetch_object($resql); $staticrecruitmentcandidature->id = $objp->rowid; $staticrecruitmentcandidature->ref = $objp->ref; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index 19b71cb8cd3..567aaf754a8 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2020 Ahmad Jamaly Rabib <rabib@metroworks.co.jp> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,15 +88,17 @@ class Import $modulesdir = dolGetModulesDirs(); // Load list of modules - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { $handle = @opendir(dol_osencode($dir)); - if (!is_resource($handle)) continue; + if (!is_resource($handle)) { + continue; + } // Search module files - while (($file = readdir($handle)) !== false) - { - if (!preg_match("/^(mod.*)\.class\.php/i", $file, $reg)) continue; + while (($file = readdir($handle)) !== false) { + if (!preg_match("/^(mod.*)\.class\.php/i", $file, $reg)) { + continue; + } $modulename = $reg[1]; @@ -103,10 +106,16 @@ class Import $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 ($part === 'propale') { + $part = 'propal'; + } + if (empty($conf->$part->enabled)) { + $enabled = false; + } - if (empty($enabled)) continue; + if (empty($enabled)) { + continue; + } // Init load class $file = $dir."/".$modulename.".class.php"; @@ -114,11 +123,11 @@ class Import require_once $file; $module = new $classname($this->db); - if (isset($module->import_code) && is_array($module->import_code)) - { - foreach ($module->import_code as $r => $value) - { - if ($filter && ($filter != $module->import_code[$r])) continue; + if (isset($module->import_code) && is_array($module->import_code)) { + foreach ($module->import_code as $r => $value) { + if ($filter && ($filter != $module->import_code[$r])) { + continue; + } // Test if permissions are ok /*$perm=$module->import_permission[$r][0]; @@ -137,10 +146,8 @@ class Import // Load lang file $langtoload = $module->getLangFilesArray(); - if (is_array($langtoload)) - { - foreach ($langtoload as $key) - { + if (is_array($langtoload)) { + foreach ($langtoload as $key) { $langs->load($key); } } @@ -160,15 +167,15 @@ class Import // Array of fields to import (key=field, value=label) $this->array_import_fields[$i] = $module->import_fields_array[$r]; // Array of hidden fields to import (key=field, value=label) - $this->array_import_fieldshidden[$i] = $module->import_fieldshidden_array[$r]; + $this->array_import_fieldshidden[$i] = (isset($module->import_fieldshidden_array[$r]) ? $module->import_fieldshidden_array[$r] : ''); // Tableau des entites a exporter (cle=champ, valeur=entite) $this->array_import_entities[$i] = $module->import_entities_array[$r]; // Tableau des alias a exporter (cle=champ, valeur=alias) - $this->array_import_regex[$i] = $module->import_regex_array[$r]; + $this->array_import_regex[$i] = (isset($module->import_regex_array[$r]) ? $module->import_regex_array[$r] : ''); // Array of columns allowed as UPDATE options - $this->array_import_updatekeys[$i] = $module->import_updatekeys_array[$r]; + $this->array_import_updatekeys[$i] = (isset($module->import_updatekeys_array[$r]) ? $module->import_updatekeys_array[$r] : ''); // Array of examples - $this->array_import_examplevalues[$i] = $module->import_examplevalues_array[$r]; + $this->array_import_examplevalues[$i] = (isset($module->import_examplevalues_array[$r]) ? $module->import_examplevalues_array[$r] : ''); // Tableau des regles de conversion d'une valeur depuis une autre source (cle=champ, valeur=tableau des regles) $this->array_import_convertvalue[$i] = (isset($module->import_convertvalue_array[$r]) ? $module->import_convertvalue_array[$r] : ''); // Sql request to run after import @@ -246,9 +253,15 @@ class Import dol_syslog("Import.class.php::create"); // Check parameters - if (empty($this->model_name)) { $this->error = 'ErrorWrongParameters'; return -1; } - if (empty($this->datatoimport)) { $this->error = 'ErrorWrongParameters'; return -1; } - if (empty($this->hexa)) { $this->error = 'ErrorWrongParameters'; return -1; } + if (empty($this->model_name)) { + $this->error = 'ErrorWrongParameters'; return -1; + } + if (empty($this->datatoimport)) { + $this->error = 'ErrorWrongParameters'; return -1; + } + if (empty($this->hexa)) { + $this->error = 'ErrorWrongParameters'; return -1; + } $this->db->begin(); @@ -259,8 +272,7 @@ class Import dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -285,11 +297,9 @@ class Import dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); - if ($obj) - { + if ($obj) { $this->id = $obj->rowid; $this->hexa = $obj->field; $this->model_name = $obj->label; @@ -319,32 +329,30 @@ class Import $error = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."import_model"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { /* Not used. This is not a business object. To convert it we must herit from CommonObject - // Call trigger - $result=$this->call_trigger('IMPORT_DELETE',$user); - if ($result < 0) $error++; - // End call triggers - */ + // Call trigger + $result=$this->call_trigger('IMPORT_DELETE',$user); + if ($result < 0) $error++; + // End call triggers + */ } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } diff --git a/htdocs/imports/class/index.html b/htdocs/imports/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index 7e7cec1707e..a50a2fc9996 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -21,7 +21,9 @@ * \brief Show example of import file */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if 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) +} /** @@ -58,8 +60,7 @@ $format = GETPOST('format'); $langs->load("exports"); // Check exportkey -if (empty($datatoimport)) -{ +if (empty($datatoimport)) { $user->getrights(); llxHeader(); @@ -81,23 +82,30 @@ $fieldstarget = $objimport->array_import_fields[0]; $valuestarget = $objimport->array_import_examplevalues[0]; $attachment = true; -if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; +if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; +} //$attachment = false; $contenttype = dol_mimetype($format); -if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; +if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; +} //$contenttype='text/plain'; $outputencoding = 'UTF-8'; -if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); -if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); +if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); +} +if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); +} // List of targets fields $headerlinefields = array(); $contentlinevalues = array(); $i = 0; -foreach ($fieldstarget as $code=>$label) -{ +foreach ($fieldstarget as $code => $label) { $withoutstar = preg_replace('/\*/', '', $fieldstarget[$code]); $headerlinefields[] = $langs->transnoentities($withoutstar).($withoutstar != $fieldstarget[$code] ? '*' : '').' ('.$code.')'; $contentlinevalues[] = $valuestarget[$code]; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 344ede7d0cd..0783e6352a4 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -41,61 +41,61 @@ $result = restrictedArea($user, 'import'); // Map icons, array duplicated in export.php, was not synchronized, TODO put it somewhere only once $entitytoicon = array( 'invoice' => 'bill', - 'invoice_line' => 'bill', + 'invoice_line' => 'bill', 'order' => 'order', - 'order_line' => 'order', + 'order_line' => 'order', 'propal' => 'propal', - 'propal_line' => 'propal', + 'propal_line' => 'propal', 'intervention' => 'intervention', - 'inter_line' => 'intervention', + 'inter_line' => 'intervention', 'member' => 'user', - 'member_type' => 'group', - 'subscription' => 'payment', - 'payment' => 'payment', + 'member_type' => 'group', + 'subscription' => 'payment', + 'payment' => 'payment', 'tax' => 'bill', - 'tax_type' => 'generic', - 'other' => 'generic', + 'tax_type' => 'generic', + 'other' => 'generic', 'account' => 'account', 'product' => 'product', - 'virtualproduct'=>'product', + 'virtualproduct'=>'product', 'subproduct' => 'product', 'product_supplier_ref' => 'product', - 'stock' => 'stock', + 'stock' => 'stock', 'warehouse' => 'stock', 'batch' => 'stock', 'stockbatch' => 'stock', 'category' => 'category', 'shipment' => 'sending', - 'shipment_line'=> 'sending', - 'reception'=> 'sending', - 'reception_line'=> 'sending', + 'shipment_line'=> 'sending', + 'reception'=> 'sending', + 'reception_line'=> 'sending', 'expensereport'=> 'trip', - 'expensereport_line'=> 'trip', + 'expensereport_line'=> 'trip', 'holiday' => 'holiday', - 'contract_line' => 'contract', - 'translation' => 'generic', - 'bomm' => 'bom', - 'bomline' => 'bom' + 'contract_line' => 'contract', + 'translation' => 'generic', + 'bomm' => 'bom', + 'bomline' => 'bom' ); // Translation code, array duplicated in export.php, was not synchronized, TODO put it somewhere only once $entitytolang = array( 'user' => 'User', 'company' => 'Company', - 'contact' => 'Contact', + 'contact' => 'Contact', 'invoice' => 'Bill', - 'invoice_line' => 'InvoiceLine', + 'invoice_line' => 'InvoiceLine', 'order' => 'Order', - 'order_line' => 'OrderLine', - 'propal' => 'Proposal', - 'propal_line' => 'ProposalLine', + 'order_line' => 'OrderLine', + 'propal' => 'Proposal', + 'propal_line' => 'ProposalLine', 'intervention' => 'Intervention', - 'inter_line' => 'InterLine', + 'inter_line' => 'InterLine', 'member' => 'Member', - 'member_type' => 'MemberType', - 'subscription' => 'Subscription', + 'member_type' => 'MemberType', + 'subscription' => 'Subscription', 'tax' => 'SocialContribution', - 'tax_type' => 'DictionarySocialContributions', + 'tax_type' => 'DictionarySocialContributions', 'account' => 'BankTransactions', 'payment' => 'Payment', 'product' => 'Product', @@ -103,28 +103,28 @@ $entitytolang = array( 'subproduct' => 'SubProduct', 'product_supplier_ref' => 'SupplierPrices', 'service' => 'Service', - 'stock' => 'Stock', + 'stock' => 'Stock', 'movement' => 'StockMovement', 'batch' => 'Batch', 'stockbatch' => 'StockDetailPerBatch', 'warehouse' => 'Warehouse', 'category' => 'Category', 'other' => 'Other', - 'trip' => 'TripsAndExpenses', - 'shipment' => 'Shipments', - 'shipment_line'=> 'ShipmentLine', - 'project' => 'Projects', - 'projecttask' => 'Tasks', - 'task_time' => 'TaskTimeSpent', + 'trip' => 'TripsAndExpenses', + 'shipment' => 'Shipments', + 'shipment_line'=> 'ShipmentLine', + 'project' => 'Projects', + 'projecttask' => 'Tasks', + 'task_time' => 'TaskTimeSpent', 'action' => 'Event', 'expensereport'=> 'ExpenseReport', 'expensereport_line'=> 'ExpenseReportLine', 'holiday' => 'TitreRequestCP', 'contract' => 'Contract', - 'contract_line'=> 'ContractLine', - 'translation' => 'Translation', - 'bom' => 'BOM', - 'bomline' => 'BOMLine' + 'contract_line'=> 'ContractLine', + 'translation' => 'Translation', + 'bom' => 'BOM', + 'bomline' => 'BOMLine' ); $datatoimport = GETPOST('datatoimport'); @@ -155,13 +155,11 @@ $formfile = new FormFile($db); $serialized_array_match_file_to_database = isset($_SESSION["dol_array_match_file_to_database"]) ? $_SESSION["dol_array_match_file_to_database"] : ''; $array_match_file_to_database = array(); $fieldsarray = explode(',', $serialized_array_match_file_to_database); -foreach ($fieldsarray as $elem) -{ +foreach ($fieldsarray as $elem) { $tabelem = explode('=', $elem, 2); $key = $tabelem[0]; $val = (isset($tabelem[1]) ? $tabelem[1] : ''); - if ($key && $val) - { + if ($key && $val) { $array_match_file_to_database[$key] = $val; } } @@ -196,37 +194,32 @@ if ($action=='downfield' || $action=='upfield') } } */ -if ($action == 'builddoc') -{ +if ($action == 'builddoc') { // Build import file $result = $objimport->build_file($user, GETPOST('model', 'alpha'), $datatoimport, $array_match_file_to_database); - if ($result < 0) - { + if ($result < 0) { setEventMessages($objimport->error, $objimport->errors, 'errors'); } else { setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs'); } } -if ($action == 'deleteprof') -{ - if (GETPOST("id", 'int')) - { +if ($action == 'deleteprof') { + if (GETPOST("id", 'int')) { $objimport->fetch(GETPOST("id", 'int')); $result = $objimport->delete($user); } } // Save import config to database -if ($action == 'add_import_model') -{ - if ($import_name) - { +if ($action == 'add_import_model') { + if ($import_name) { // Set save string $hexa = ''; - foreach ($array_match_file_to_database as $key=>$val) - { - if ($hexa) $hexa .= ','; + foreach ($array_match_file_to_database as $key => $val) { + if ($hexa) { + $hexa .= ','; + } $hexa .= $key.'='.$val; } @@ -235,13 +228,11 @@ if ($action == 'add_import_model') $objimport->hexa = $hexa; $result = $objimport->create($user); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("ImportModelSaved", $objimport->model_name), null, 'mesgs'); } else { $langs->load("errors"); - if ($objimport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($objimport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("ErrorImportDuplicateProfil"), null, 'errors'); } else { setEventMessages($objimport->error, null, 'errors'); @@ -252,16 +243,13 @@ if ($action == 'add_import_model') } } -if ($step == 3 && $datatoimport) -{ - if (GETPOST('sendit') && !empty($conf->global->MAIN_UPLOAD_DOC)) - { +if ($step == 3 && $datatoimport) { + if (GETPOST('sendit') && !empty($conf->global->MAIN_UPLOAD_DOC)) { dol_mkdir($conf->import->dir_temp); $nowyearmonth = dol_print_date(dol_now(), '%Y%m%d%H%M%S'); $fullpath = $conf->import->dir_temp."/".$nowyearmonth.'-'.$_FILES['userfile']['name']; - if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $fullpath, 1) > 0) - { + if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $fullpath, 1) > 0) { dol_syslog("File ".$fullpath." was added for import"); } else { $langs->load("errors"); @@ -270,25 +258,30 @@ if ($step == 3 && $datatoimport) } // Delete file - if ($action == 'confirm_deletefile' && $confirm == 'yes') - { + if ($action == 'confirm_deletefile' && $confirm == 'yes') { $langs->load("other"); $param = '&datatoimport='.urlencode($datatoimport).'&format='.urlencode($format); - if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); - if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); + 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); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } Header('Location: '.$_SERVER["PHP_SELF"].'?step='.$step.$param); exit; } } -if ($step == 4 && $action == 'select_model') -{ +if ($step == 4 && $action == 'select_model') { // Reinit match arrays $_SESSION["dol_array_match_file_to_database"] = ''; $serialized_array_match_file_to_database = ''; @@ -297,17 +290,14 @@ if ($step == 4 && $action == 'select_model') // Load model from $importmodelid and set $array_match_file_to_database // and $_SESSION["dol_array_match_file_to_database"] $result = $objimport->fetch($importmodelid); - if ($result > 0) - { + if ($result > 0) { $serialized_array_match_file_to_database = $objimport->hexa; $fieldsarray = explode(',', $serialized_array_match_file_to_database); - foreach ($fieldsarray as $elem) - { + foreach ($fieldsarray as $elem) { $tabelem = explode('=', $elem); $key = $tabelem[0]; $val = $tabelem[1]; - if ($key && $val) - { + if ($key && $val) { $array_match_file_to_database[$key] = $val; } } @@ -315,11 +305,10 @@ if ($step == 4 && $action == 'select_model') } } -if ($action == 'saveorder') -{ +if ($action == 'saveorder') { // Enregistrement de la position des champs - dol_syslog("boxorder=".$_GET['boxorder']." datatoimport=".$_GET["datatoimport"], LOG_DEBUG); - $part = explode(':', $_GET['boxorder']); + dol_syslog("boxorder=".GETPOST('boxorder')." datatoimport=".GETPOST("datatoimport"), LOG_DEBUG); + $part = explode(':', GETPOST('boxorder')); $colonne = $part[0]; $list = $part[1]; dol_syslog('column='.$colonne.' list='.$list); @@ -332,15 +321,12 @@ if ($action == 'saveorder') $array_match_file_to_database = array(); $fieldsarray = explode(',', $list); $pos = 0; - foreach ($fieldsarray as $fieldnb) // For each elem in list. fieldnb start from 1 to ... - { + foreach ($fieldsarray as $fieldnb) { // For each elem in list. fieldnb start from 1 to ... // Get name of database fields at position $pos and put it into $namefield $posbis = 0; $namefield = ''; - foreach ($fieldstarget as $key => $val) // key: val: - { + foreach ($fieldstarget as $key => $val) { // key: val: //dol_syslog('AjaxImport key='.$key.' val='.$val); - if ($posbis < $pos) - { + if ($posbis < $pos) { $posbis++; continue; } @@ -351,10 +337,11 @@ if ($action == 'saveorder') break; } - if ($fieldnb && $namefield) - { + if ($fieldnb && $namefield) { $array_match_file_to_database[$fieldnb] = $namefield; - if ($serialized_array_match_file_to_database) $serialized_array_match_file_to_database .= ','; + if ($serialized_array_match_file_to_database) { + $serialized_array_match_file_to_database .= ','; + } $serialized_array_match_file_to_database .= ($fieldnb.'='.$namefield); } @@ -374,21 +361,31 @@ if ($action == 'saveorder') */ +$help_url = 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'; + + // STEP 1: Page to select dataset to import -if ($step == 1 || !$datatoimport) -{ +if ($step == 1 || !$datatoimport) { // Clean saved file-database matching $serialized_array_match_file_to_database = ''; $array_match_file_to_database = array(); $_SESSION["dol_array_match_file_to_database"] = ''; $param = ''; - if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); - if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); - if ($separator) $param .= '&separator='.urlencode($separator); - if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + if ($separator) { + $param .= '&separator='.urlencode($separator); + } + if ($enclosure) { + $param .= '&enclosure='.urlencode($enclosure); + } - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 1); @@ -405,16 +402,16 @@ if ($step == 1 || !$datatoimport) print '<td>&nbsp;</td>'; print '</tr>'; - if (count($objimport->array_import_module)) - { + if (count($objimport->array_import_module)) { $sortedarrayofmodules = dol_sort_array($objimport->array_import_module, 'position_of_profile', 'asc', 0, 0, 1); - foreach ($sortedarrayofmodules as $key => $value) - { + foreach ($sortedarrayofmodules as $key => $value) { //var_dump($key.' '.$value['position_of_profile'].' '.$value['import_code'].' '.$objimport->array_import_module[$key]['module']->getName().' '.$objimport->array_import_code[$key]); print '<tr class="oddeven"><td>'; $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"); + if (in_array($objimport->array_import_code[$key], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td><td>'; $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[$key]); @@ -422,8 +419,7 @@ if ($step == 1 || !$datatoimport) print img_object($objimport->array_import_module[$key]['module']->getName(), $entityicon).' '; print $objimport->array_import_label[$key]; print '</td><td style="text-align: right">'; - if ($objimport->array_import_perms[$key]) - { + if ($objimport->array_import_perms[$key]) { print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=2&datatoimport='.$objimport->array_import_code[$key].$param.'">'.img_picto($langs->trans("NewImport"), 'next', 'class="fa-15x"').'</a>'; } else { print $langs->trans("NotEnoughPermissions"); @@ -441,15 +437,22 @@ if ($step == 1 || !$datatoimport) // STEP 2: Page to select input format file -if ($step == 2 && $datatoimport) -{ +if ($step == 2 && $datatoimport) { $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); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + if ($separator) { + $param .= '&separator='.urlencode($separator); + } + if ($enclosure) { + $param .= '&enclosure='.urlencode($enclosure); + } - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 2); @@ -465,7 +468,9 @@ if ($step == 2 && $datatoimport) print '<td>'; $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"); + if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td></tr>'; @@ -487,12 +492,16 @@ if ($step == 2 && $datatoimport) print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">'; + print '<br>'; + print '<span class="opacitymedium">'; $s = $langs->trans("ChooseFormatOfFileToImport", '{s1}'); $s = str_replace('{s1}', img_picto('', 'next'), $s); print $s; print '</span><br><br>'; + print '<br>'; + print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; @@ -502,14 +511,15 @@ if ($step == 2 && $datatoimport) print '<tr class="liste_titre"><td colspan="6">'; print $langs->trans("FileMustHaveOneOfFollowingFormat"); print '</td></tr>'; - $liste = $objmodelimport->liste_modeles($db); - foreach ($liste as $key) - { + $list = $objmodelimport->liste_modeles($db); + foreach ($list as $key) { print '<tr class="oddeven">'; print '<td width="16">'.img_picto_common($key, $objmodelimport->getPictoForKey($key)).'</td>'; $text = $objmodelimport->getDriverDescForKey($key); print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).'</td>'; - print '<td style="text-align:center"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a></td>'; + print '<td style="text-align:center">'; + print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>'; + print '</td>'; // Action button print '<td style="text-align:right">'; print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=3&format='.$key.$param.'">'.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15x"').'</a>'; @@ -525,17 +535,24 @@ if ($step == 2 && $datatoimport) // STEP 3: Page to select file -if ($step == 3 && $datatoimport) -{ +if ($step == 3 && $datatoimport) { $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); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + if ($separator) { + $param .= '&separator='.urlencode($separator); + } + if ($enclosure) { + $param .= '&enclosure='.urlencode($enclosure); + } - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 3); @@ -544,8 +561,7 @@ if ($step == 3 && $datatoimport) /* * Confirm delete file */ - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); } @@ -559,7 +575,9 @@ if ($step == 3 && $datatoimport) print '<td>'; $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"); + if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td></tr>'; @@ -575,7 +593,7 @@ if ($step == 3 && $datatoimport) print '</table>'; print '</div>'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -586,8 +604,8 @@ if ($step == 3 && $datatoimport) print '<td>'; $text = $objmodelimport->getDriverDescForKey($format); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text); - print '</td><td style="text-align:right" class="nowrap"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>'; - + print '</td><td style="text-align:right" class="nowrap">'; + print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>'; print '</td></tr>'; print '</table>'; @@ -635,33 +653,45 @@ if ($step == 3 && $datatoimport) $out = (empty($conf->global->MAIN_UPLOAD_DOC) ? ' disabled' : ''); print '<input type="submit" class="button" value="'.$langs->trans("AddFile").'"'.$out.' name="sendit">'; $out = ''; - if (!empty($conf->global->MAIN_UPLOAD_DOC)) - { + if (!empty($conf->global->MAIN_UPLOAD_DOC)) { $max = $conf->global->MAIN_UPLOAD_DOC; // In Kb $maxphp = @ini_get('upload_max_filesize'); // In unknown - if (preg_match('/k$/i', $maxphp)) $maxphp = $maxphp * 1; - if (preg_match('/m$/i', $maxphp)) $maxphp = $maxphp * 1024; - if (preg_match('/g$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024; - if (preg_match('/t$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024 * 1024; + if (preg_match('/k$/i', $maxphp)) { + $maxphp = $maxphp * 1; + } + if (preg_match('/m$/i', $maxphp)) { + $maxphp = $maxphp * 1024; + } + if (preg_match('/g$/i', $maxphp)) { + $maxphp = $maxphp * 1024 * 1024; + } + if (preg_match('/t$/i', $maxphp)) { + $maxphp = $maxphp * 1024 * 1024 * 1024; + } $maxphp2 = @ini_get('post_max_size'); // In unknown - if (preg_match('/k$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1; - if (preg_match('/m$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024; - if (preg_match('/g$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024; - if (preg_match('/t$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024 * 1024; + if (preg_match('/k$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1; + } + if (preg_match('/m$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024; + } + if (preg_match('/g$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024 * 1024; + } + if (preg_match('/t$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024 * 1024 * 1024; + } // Now $max and $maxphp and $maxphp2 are in Kb $maxmin = $max; $maxphptoshow = $maxphptoshowparam = ''; - if ($maxphp > 0) - { + if ($maxphp > 0) { $maxmin = min($max, $maxphp); $maxphptoshow = $maxphp; $maxphptoshowparam = 'upload_max_filesize'; } - if ($maxphp2 > 0) - { + if ($maxphp2 > 0) { $maxmin = min($max, $maxphp2); - if ($maxphp2 < $maxphp) - { + if ($maxphp2 < $maxphp) { $maxphptoshow = $maxphp2; $maxphptoshowparam = 'post_max_size'; } @@ -679,20 +709,22 @@ if ($step == 3 && $datatoimport) // Search available imports $filearray = dol_dir_list($conf->import->dir_temp, 'files', 0, '', '', 'name', SORT_DESC); - if (count($filearray) > 0) - { + if (count($filearray) > 0) { $dir = $conf->import->dir_temp; // Search available files to import $i = 0; - foreach ($filearray as $key => $val) - { + foreach ($filearray as $key => $val) { $file = $val['name']; // readdir return value in ISO and we want UTF8 in memory - if (!utf8_check($file)) $file = utf8_encode($file); + if (!utf8_check($file)) { + $file = utf8_encode($file); + } - if (preg_match('/^\./', $file)) continue; + if (preg_match('/^\./', $file)) { + continue; + } $modulepart = 'import'; $urlsource = $_SERVER["PHP_SELF"].'?step='.$step.$param.'&filetoimport='.urlencode($filetoimport); @@ -728,10 +760,9 @@ if ($step == 3 && $datatoimport) // STEP 4: Page to make matching between source file and database fields -if ($step == 4 && $datatoimport) -{ +if ($step == 4 && $datatoimport) { $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); // Create classe to use for import $dir = DOL_DOCUMENT_ROOT."/core/modules/import/"; @@ -739,14 +770,12 @@ if ($step == 4 && $datatoimport) $classname = "Import".ucfirst($model); require_once $dir.$file; $obj = new $classname($db, $datatoimport); - if ($model == 'csv') - { + if ($model == 'csv') { $obj->separator = $separator; $obj->enclosure = $enclosure; } if ($model == 'xlsx') { - if (!preg_match('/\.xlsx$/i', $filetoimport)) - { + if (!preg_match('/\.xlsx$/i', $filetoimport)) { $langs->load("errors"); $param = '&datatoimport='.$datatoimport.'&format='.$format; setEventMessages($langs->trans("ErrorFileMustHaveFormat", $model), null, 'errors'); @@ -762,14 +791,12 @@ if ($step == 4 && $datatoimport) // Load source fields in input file $fieldssource = array(); $result = $obj->import_open_file($conf->import->dir_temp.'/'.$filetoimport, $langs); - if ($result >= 0) - { + if ($result >= 0) { // Read first line $arrayrecord = $obj->import_read_record(); // Put into array fieldssource starting with 1. $i = 1; - foreach ($arrayrecord as $key => $val) - { + foreach ($arrayrecord as $key => $val) { $fieldssource[$i]['example1'] = dol_trunc($val['val'], 24); $i++; } @@ -784,29 +811,26 @@ if ($step == 4 && $datatoimport) //var_dump($array_match_file_to_database); // Is it a first time in page (if yes, we must initialize array_match_file_to_database) - if (count($array_match_file_to_database) == 0) - { + if (count($array_match_file_to_database) == 0) { // This is first input in screen, we need to define // $array_match_file_to_database // $serialized_array_match_file_to_database // $_SESSION["dol_array_match_file_to_database"] $pos = 1; $num = count($fieldssource); - while ($pos <= $num) - { - if ($num >= 1 && $pos <= $num) - { + while ($pos <= $num) { + if ($num >= 1 && $pos <= $num) { $posbis = 1; - foreach ($fieldstarget as $key => $val) - { - if ($posbis < $pos) - { + foreach ($fieldstarget as $key => $val) { + if ($posbis < $pos) { $posbis++; continue; } // We found the key of targets that is at position pos $array_match_file_to_database[$pos] = $key; - if ($serialized_array_match_file_to_database) $serialized_array_match_file_to_database .= ','; + if ($serialized_array_match_file_to_database) { + $serialized_array_match_file_to_database .= ','; + } $serialized_array_match_file_to_database .= ($pos.'='.$key); break; } @@ -825,12 +849,20 @@ 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='.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); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + if ($separator) { + $param .= '&separator='.urlencode($separator); + } + if ($enclosure) { + $param .= '&enclosure='.urlencode($enclosure); + } - llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); + llxHeader('', $langs->trans("NewImport"), $help_url); $head = import_prepare_head($param, 4); @@ -846,7 +878,9 @@ if ($step == 4 && $datatoimport) print '<td>'; $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"); + if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td></tr>'; @@ -862,7 +896,7 @@ if ($step == 4 && $datatoimport) print '</table>'; print '</div>'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -954,8 +988,7 @@ if ($step == 4 && $datatoimport) $fieldsplaced = array(); $valforsourcefieldnb = array(); $listofkeys = array(); - foreach ($array_match_file_to_database as $key => $val) - { + foreach ($array_match_file_to_database as $key => $val) { $listofkeys[$key] = 1; } @@ -965,8 +998,7 @@ if ($step == 4 && $datatoimport) // List of source fields $var = true; $lefti = 1; - foreach ($array_match_file_to_database as $key => $val) - { + foreach ($array_match_file_to_database as $key => $val) { $var = !$var; show_elem($fieldssource, $key, $val, $var); // key is field number in source file //print '> '.$lefti.'-'.$key.'-'.$val; @@ -975,15 +1007,16 @@ if ($step == 4 && $datatoimport) $valforsourcefieldnb[$lefti] = $key; $lefti++; - if ($lefti > count($fieldstarget)) break; // Other fields are in the not imported area + if ($lefti > count($fieldstarget)) { + break; // Other fields are in the not imported area + } } //var_dump($valforsourcefieldnb); // Complete source fields from count($fieldssource)+1 to count($fieldstarget) $more = 1; $num = count($fieldssource); - while ($lefti <= $num) - { + while ($lefti <= $num) { $var = !$var; $newkey = getnewkey($fieldssource, $listofkeys); show_elem($fieldssource, $newkey, '', $var); // key start after field number in source file @@ -1005,8 +1038,7 @@ if ($step == 4 && $datatoimport) $mandatoryfieldshavesource = true; print '<table width="100%" class="nobordernopadding">'; - foreach ($fieldstarget as $code=>$label) - { + foreach ($fieldstarget as $code => $label) { print '<tr class="oddeven" style="height:'.$height.'">'; $i++; @@ -1023,11 +1055,12 @@ if ($step == 4 && $datatoimport) $newlabel = preg_replace('/\*$/', '', $label); $text = $langs->trans($newlabel); $more = ''; - if (preg_match('/\*$/', $label)) - { + if (preg_match('/\*$/', $label)) { $text = '<span class="fieldrequired">'.$text.'</span>'; $more = ((!empty($valforsourcefieldnb[$i]) && $valforsourcefieldnb[$i] <= count($fieldssource)) ? '' : img_warning($langs->trans("FieldNeedSource"))); - if ($mandatoryfieldshavesource) $mandatoryfieldshavesource = (!empty($valforsourcefieldnb[$i]) && ($valforsourcefieldnb[$i] <= count($fieldssource))); + if ($mandatoryfieldshavesource) { + $mandatoryfieldshavesource = (!empty($valforsourcefieldnb[$i]) && ($valforsourcefieldnb[$i] <= count($fieldssource))); + } //print 'xx'.($i).'-'.$valforsourcefieldnb[$i].'-'.$mandatoryfieldshavesource; } print $text; @@ -1037,43 +1070,54 @@ if ($step == 4 && $datatoimport) $filecolumn = $array_match_database_to_file[$code]; // Source field info $htmltext = '<b><u>'.$langs->trans("FieldSource").'</u></b><br>'; - if ($filecolumn > count($fieldssource)) $htmltext .= $langs->trans("DataComeFromNoWhere").'<br>'; - else { - if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion - { + if ($filecolumn > count($fieldssource)) { + $htmltext .= $langs->trans("DataComeFromNoWhere").'<br>'; + } else { + if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion $filecolumntoshow = $filecolumn; $htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'<br>'; } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).'<br>'; - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).'<br>'; + if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { + $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).'<br>'; + } + if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { + $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).'<br>'; + } } } // Source required $htmltext .= $langs->trans("SourceRequired").': <b>'.yn(preg_match('/\*$/', $label)).'</b><br>'; $example = $objimport->array_import_examplevalues[0][$code]; // Example - if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion - { - if ($example) $htmltext .= $langs->trans("SourceExample").': <b>'.$example.'</b><br>'; + if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion + if ($example) { + $htmltext .= $langs->trans("SourceExample").': <b>'.$example.'</b><br>'; + } } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("SourceExample").': <b>'.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'</b><br>'; - elseif ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("SourceExample").': <b>'.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'</b><br>'; - elseif ($example) $htmltext .= $langs->trans("SourceExample").': <b>'.$example.'</b><br>'; + if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { + $htmltext .= $langs->trans("SourceExample").': <b>'.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'</b><br>'; + } elseif ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { + $htmltext .= $langs->trans("SourceExample").': <b>'.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'</b><br>'; + } elseif ($example) { + $htmltext .= $langs->trans("SourceExample").': <b>'.$example.'</b><br>'; + } } // Format control rule - if (!empty($objimport->array_import_regex[0][$code])) - { + if (!empty($objimport->array_import_regex[0][$code])) { $htmltext .= $langs->trans("FormatControlRule").': <b>'.$objimport->array_import_regex[0][$code].'</b><br>'; } $htmltext .= '<br>'; // Target field info $htmltext .= '<b><u>'.$langs->trans("FieldTarget").'</u></b><br>'; - if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion - { + if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion $htmltext .= $langs->trans("DataIsInsertedInto").'<br>'; } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("DataIDSourceIsInsertedInto").'<br>'; - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("DataCodeIDSourceIsInsertedInto").'<br>'; + if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { + $htmltext .= $langs->trans("DataIDSourceIsInsertedInto").'<br>'; + } + if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { + $htmltext .= $langs->trans("DataCodeIDSourceIsInsertedInto").'<br>'; + } } $htmltext .= $langs->trans("FieldTitle").": <b>".$langs->trans($newlabel)."</b><br>"; $htmltext .= $langs->trans("Table")." -> ".$langs->trans("Field").': <b>'.$tablename." -> ".preg_replace('/^.*\./', '', $code)."</b><br>"; @@ -1096,10 +1140,8 @@ if ($step == 4 && $datatoimport) print '<div id="right" class="connectedSortable">'."\n"; $nbofnotimportedfields = 0; - foreach ($fieldssource as $key => $val) - { - if (empty($fieldsplaced[$key])) - { + foreach ($fieldssource as $key => $val) { + if (empty($fieldsplaced[$key])) { // $nbofnotimportedfields++; show_elem($fieldssource, $key, '', $var, 'nostyle'); @@ -1122,8 +1164,7 @@ if ($step == 4 && $datatoimport) print '</td>'; print '<td width="50%">'; $i = 0; - while ($i < $nbofnotimportedfields) - { + while ($i < $nbofnotimportedfields) { // Print empty cells show_elem('', '', 'none', $var, 'nostyle'); $i++; @@ -1134,8 +1175,7 @@ if ($step == 4 && $datatoimport) print '</div>'; - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<script type="text/javascript" language="javascript">'; print 'jQuery(function() { jQuery("#left, #right").sortable({ @@ -1172,14 +1212,12 @@ if ($step == 4 && $datatoimport) } /* - * Barre d'action + * Action bar */ print '<div class="tabsAction">'; - if (count($array_match_file_to_database)) - { - if ($mandatoryfieldshavesource) - { + if (count($array_match_file_to_database)) { + if ($mandatoryfieldshavesource) { print '<a class="butAction" href="import.php?step=5'.$param.'&filetoimport='.urlencode($filetoimport).'">'.$langs->trans("NextStep").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("SomeMandatoryFieldHaveNoSource")).'">'.$langs->trans("NextStep").'</a>'; @@ -1190,8 +1228,7 @@ if ($step == 4 && $datatoimport) // Area for profils import - if (count($array_match_file_to_database)) - { + if (count($array_match_file_to_database)) { print '<br>'."\n"; print '<!-- Area to add new import profile -->'."\n"; print '<div class="marginbottomonly"><span class="opacitymedium">'.$langs->trans("SaveImportModel").'</span></div>'; @@ -1226,12 +1263,10 @@ if ($step == 4 && $datatoimport) $sql .= " WHERE type = '".$db->escape($datatoimport)."'"; $sql .= " ORDER BY rowid"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven"><td>'; print $obj->label; @@ -1253,18 +1288,16 @@ if ($step == 4 && $datatoimport) // STEP 5: Summary of choices and launch simulation -if ($step == 5 && $datatoimport) -{ +if ($step == 5 && $datatoimport) { $max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined $max_time = @ini_get("max_execution_time"); - if ($max_time && $max_time < $max_execution_time_for_importexport) - { + if ($max_time && $max_time < $max_execution_time_for_importexport) { dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 } $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); // Create classe to use for import $dir = DOL_DOCUMENT_ROOT."/core/modules/import/"; @@ -1281,14 +1314,12 @@ if ($step == 5 && $datatoimport) $fieldssource = array(); $result = $obj->import_open_file($conf->import->dir_temp.'/'.$filetoimport, $langs); - if ($result >= 0) - { + if ($result >= 0) { // Read first line $arrayrecord = $obj->import_read_record(); // Put into array fieldssource starting with 1. $i = 1; - foreach ($arrayrecord as $key => $val) - { + foreach ($arrayrecord as $key => $val) { $fieldssource[$i]['example1'] = dol_trunc($val['val'], 24); $i++; } @@ -1299,9 +1330,15 @@ if ($step == 5 && $datatoimport) $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='.urlencode($excludefirstline); - if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); - if (!empty($updatekeys)) $param .= '&updatekeys[]='.implode('&updatekeys[]=', $updatekeys); + 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&oacute;dulo_Importaciones'); @@ -1325,7 +1362,9 @@ if ($step == 5 && $datatoimport) print '<td>'; $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"); + if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td></tr>'; @@ -1341,7 +1380,7 @@ if ($step == 5 && $datatoimport) print '</table>'; print '</div>'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -1384,8 +1423,7 @@ if ($step == 5 && $datatoimport) print '<tr><td>'; print $langs->trans("ImportFromToLine"); print '</td><td>'; - if ($action == 'launchsimu') - { + if ($action == 'launchsimu') { print '<input type="number" class="maxwidth50" name="excludefirstlinebis" disabled="disabled" value="'.$excludefirstline.'">'; print '<input type="hidden" name="excludefirstline" value="'.$excludefirstline.'">'; } else { @@ -1393,15 +1431,16 @@ if ($step == 5 && $datatoimport) print $form->textwithpicto("", $langs->trans("SetThisValueTo2ToExcludeFirstLine")); } print ' - '; - if ($action == 'launchsimu') - { + if ($action == 'launchsimu') { print '<input type="text" class="maxwidth50" name="endatlinenbbis" disabled="disabled" value="'.$endatlinenb.'">'; print '<input type="hidden" name="endatlinenb" value="'.$endatlinenb.'">'; } else { print '<input type="text" class="maxwidth50" name="endatlinenb" value="'.$endatlinenb.'">'; print $form->textwithpicto("", $langs->trans("KeepEmptyToGoToEndOfFile")); } - if ($action == 'launchsimu') print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>'; + if ($action == 'launchsimu') { + print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>'; + } print '</td></tr>'; // Keys for data UPDATE (not INSERT of new data) @@ -1409,8 +1448,7 @@ if ($step == 5 && $datatoimport) print $langs->trans("KeysToUseForUpdates"); print '</td><td>'; if ($action == 'launchsimu') { - if (count($updatekeys)) - { + if (count($updatekeys)) { print $form->multiselectarray('updatekeysbis', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%', 'disabled'); } else { print '<span class="opacitymedium">'.$langs->trans("NoUpdateAttempt").'</span> &nbsp; -'; @@ -1420,8 +1458,7 @@ if ($step == 5 && $datatoimport) } print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>'; } else { - if (is_array($objimport->array_import_updatekeys[0]) && count($objimport->array_import_updatekeys[0])) - { //TODO dropdown UL is created inside nested SPANS + if (is_array($objimport->array_import_updatekeys[0]) && count($objimport->array_import_updatekeys[0])) { //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 { @@ -1437,7 +1474,7 @@ if ($step == 5 && $datatoimport) print '</div>'; - print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', ''); + print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', 'file-import'); print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -1450,21 +1487,22 @@ if ($step == 5 && $datatoimport) print '</td><td>'; $listtables = array(); $sort_array_match_file_to_database = $array_match_file_to_database; - foreach ($array_match_file_to_database as $code=>$label) - { + foreach ($array_match_file_to_database as $code => $label) { //var_dump($fieldssource); - if ($code > count($fieldssource)) continue; + if ($code > count($fieldssource)) { + continue; + } //print $code.'-'.$label; $alias = preg_replace('/(\..*)$/i', '', $label); $listtables[$alias] = $objimport->array_import_tables[0][$alias]; } - if (count($listtables)) - { + if (count($listtables)) { $newval = ''; //ksort($listtables); - foreach ($listtables as $val) - { - if ($newval) print ', '; + foreach ($listtables as $val) { + if ($newval) { + print ', '; + } $newval = $val; // Link to Dolibarr wiki pages /*$helppagename='EN:Table_'.$newval; @@ -1479,7 +1517,9 @@ if ($step == 5 && $datatoimport) }*/ print $newval; } - } else print $langs->trans("Error"); + } else { + print $langs->trans("Error"); + } print '</td></tr>'; // Fields imported @@ -1491,11 +1531,12 @@ if ($step == 5 && $datatoimport) $sort_array_match_file_to_database = $array_match_file_to_database; ksort($sort_array_match_file_to_database); //var_dump($sort_array_match_file_to_database); - foreach ($sort_array_match_file_to_database as $code=>$label) - { + foreach ($sort_array_match_file_to_database as $code => $label) { $i++; //var_dump($fieldssource); - if ($code > count($fieldssource)) continue; + if ($code > count($fieldssource)) { + continue; + } //print $code.'-'.$label; $alias = preg_replace('/(\..*)$/i', '', $label); $listfields[$i] = $langs->trans("Field").' '.$code.'->'.$label; @@ -1509,8 +1550,7 @@ if ($step == 5 && $datatoimport) print dol_get_fiche_end(); - if ($action != 'launchsimu') - { + if ($action != 'launchsimu') { // Show import id print '<br><span class="opacitymedium">'; print $langs->trans("NowClickToTestTheImport", $langs->transnoentitiesnoconv("RunSimulateImportFile")).'</span><br>'; @@ -1518,8 +1558,7 @@ if ($step == 5 && $datatoimport) // Actions print '<div class="center">'; - if ($user->rights->import->run) - { + if ($user->rights->import->run) { print '<input type="submit" class="butAction" value="'.$langs->trans("RunSimulateImportFile").'">'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("RunSimulateImportFile").'</a>'; @@ -1544,34 +1583,41 @@ if ($step == 5 && $datatoimport) $nbok = 0; $pathfile = $conf->import->dir_temp.'/'.$filetoimport; $result = $obj->import_open_file($pathfile, $langs); - if ($result > 0) - { + if ($result > 0) { global $tablewithentity_cache; $tablewithentity_cache = array(); $sourcelinenb = 0; $endoffile = 0; // Loop on each input file record - while (($sourcelinenb < $nboflines) && !$endoffile) - { + while (($sourcelinenb < $nboflines) && !$endoffile) { $sourcelinenb++; // Read line and store it into $arrayrecord //dol_syslog("line ".$sourcelinenb.' - '.$nboflines.' - '.$excludefirstline.' - '.$endatlinenb); $arrayrecord = $obj->import_read_record(); - if ($arrayrecord === false) - { + if ($arrayrecord === false) { $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines. Ensure the complete string is delimited correctly when there is a separator character in the text string.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); $endoffile++; continue; } - if ($excludefirstline && ($sourcelinenb < $excludefirstline)) continue; - if ($endatlinenb && ($sourcelinenb > $endatlinenb)) break; + if ($excludefirstline && ($sourcelinenb < $excludefirstline)) { + continue; + } + if ($endatlinenb && ($sourcelinenb > $endatlinenb)) { + break; + } // Run import $result = $obj->import_insert($arrayrecord, $array_match_file_to_database, $objimport, count($fieldssource), $importid, $updatekeys); - if (count($obj->errors)) $arrayoferrors[$sourcelinenb] = $obj->errors; - if (count($obj->warnings)) $arrayofwarnings[$sourcelinenb] = $obj->warnings; - if (!count($obj->errors) && !count($obj->warnings)) $nbok++; + if (count($obj->errors)) { + $arrayoferrors[$sourcelinenb] = $obj->errors; + } + if (count($obj->warnings)) { + $arrayofwarnings[$sourcelinenb] = $obj->warnings; + } + if (!count($obj->errors) && !count($obj->warnings)) { + $nbok++; + } } // Close file $obj->import_close_file(); @@ -1583,15 +1629,12 @@ if ($step == 5 && $datatoimport) // Run the sql after import if defined //var_dump($objimport->array_import_run_sql_after[0]); - if (!empty($objimport->array_import_run_sql_after[0]) && is_array($objimport->array_import_run_sql_after[0])) - { + if (!empty($objimport->array_import_run_sql_after[0]) && is_array($objimport->array_import_run_sql_after[0])) { $i = 0; - foreach ($objimport->array_import_run_sql_after[0] as $sqlafterimport) - { + foreach ($objimport->array_import_run_sql_after[0] as $sqlafterimport) { $i++; $resqlafterimport = $db->query($sqlafterimport); - if (!$resqlafterimport) - { + if (!$resqlafterimport) { $arrayoferrors['none'][] = array('lib'=>$langs->trans("Error running final request: ".$sqlafterimport)); $error++; } @@ -1607,25 +1650,23 @@ if ($step == 5 && $datatoimport) print $langs->trans("NbInsert", empty($obj->nbinsert) ? 0 : $obj->nbinsert).'<br>'; print $langs->trans("NbUpdate", empty($obj->nbupdate) ? 0 : $obj->nbupdate).'<br><br>'; print '</div>'; - } else print $langs->trans("NbOfLinesOK", $nbok).'<br><br>'; + } else { + print $langs->trans("NbOfLinesOK", $nbok).'<br><br>'; + } // Show Errors //var_dump($arrayoferrors); - if (count($arrayoferrors)) - { + if (count($arrayoferrors)) { print img_error().' <b>'.$langs->trans("ErrorsOnXLines", count($arrayoferrors)).'</b><br>'; print '<table width="100%" class="border"><tr><td>'; - foreach ($arrayoferrors as $key => $val) - { + foreach ($arrayoferrors as $key => $val) { $nboferrors++; - if ($nboferrors > $maxnboferrors) - { + if ($nboferrors > $maxnboferrors) { print $langs->trans("TooMuchErrors", (count($arrayoferrors) - $nboferrors))."<br>"; break; } print '* '.$langs->trans("Line").' '.$key.'<br>'; - foreach ($val as $i => $err) - { + foreach ($val as $i => $err) { print ' &nbsp; &nbsp; > '.$err['lib'].'<br>'; } } @@ -1635,21 +1676,17 @@ if ($step == 5 && $datatoimport) // Show Warnings //var_dump($arrayoferrors); - if (count($arrayofwarnings)) - { + if (count($arrayofwarnings)) { print img_warning().' <b>'.$langs->trans("WarningsOnXLines", count($arrayofwarnings)).'</b><br>'; print '<table width="100%" class="border"><tr><td>'; - foreach ($arrayofwarnings as $key => $val) - { + foreach ($arrayofwarnings as $key => $val) { $nbofwarnings++; - if ($nbofwarnings > $maxnbofwarnings) - { + if ($nbofwarnings > $maxnbofwarnings) { print $langs->trans("TooMuchWarnings", (count($arrayofwarnings) - $nbofwarnings))."<br>"; break; } print ' * '.$langs->trans("Line").' '.$key.'<br>'; - foreach ($val as $i => $err) - { + foreach ($val as $i => $err) { print ' &nbsp; &nbsp; > '.$err['lib'].'<br>'; } } @@ -1662,17 +1699,17 @@ if ($step == 5 && $datatoimport) print '<div class="center">'; print '<span class="opacitymedium">'.$langs->trans("NowClickToRunTheImport", $langs->transnoentitiesnoconv("RunImportFile")).'</span><br>'; - if (empty($nboferrors)) print $langs->trans("DataLoadedWithId", $importid).'<br>'; + if (empty($nboferrors)) { + print $langs->trans("DataLoadedWithId", $importid).'<br>'; + } print '</div>'; print '<br>'; // Actions print '<div class="center">'; - if ($user->rights->import->run) - { - if (empty($nboferrors)) - { + if ($user->rights->import->run) { + if (empty($nboferrors)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import&step=6&importid='.$importid.$param.'">'.$langs->trans("RunImportFile").'</a>'; } else { //print '<input type="submit" class="butAction" value="'.dol_escape_htmltag($langs->trans("RunSimulateImportFile")).'">'; @@ -1692,18 +1729,16 @@ if ($step == 5 && $datatoimport) // STEP 6: Real import -if ($step == 6 && $datatoimport) -{ +if ($step == 6 && $datatoimport) { $max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined $max_time = @ini_get("max_execution_time"); - if ($max_time && $max_time < $max_execution_time_for_importexport) - { + if ($max_time && $max_time < $max_execution_time_for_importexport) { dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 } $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); $importid = GETPOST("importid", 'alphanohtml'); @@ -1721,14 +1756,12 @@ if ($step == 6 && $datatoimport) // Load source fields in input file $fieldssource = array(); $result = $obj->import_open_file($conf->import->dir_temp.'/'.$filetoimport, $langs); - if ($result >= 0) - { + if ($result >= 0) { // Read first line $arrayrecord = $obj->import_read_record(); // Put into array fieldssource starting with 1. $i = 1; - foreach ($arrayrecord as $key => $val) - { + foreach ($arrayrecord as $key => $val) { $fieldssource[$i]['example1'] = dol_trunc($val['val'], 24); $i++; } @@ -1738,10 +1771,18 @@ if ($step == 6 && $datatoimport) $nboflines = (!empty($_GET["nboflines"]) ? $_GET["nboflines"] : dol_count_nb_of_line($conf->import->dir_temp.'/'.$filetoimport)); $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); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + if ($separator) { + $param .= '&separator='.urlencode($separator); + } + if ($enclosure) { + $param .= '&enclosure='.urlencode($enclosure); + } llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); @@ -1759,7 +1800,9 @@ if ($step == 6 && $datatoimport) print '<td>'; $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"); + if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) { + $titleofmodule = $langs->trans("ProductOrService"); + } print $titleofmodule; print '</td></tr>'; @@ -1775,7 +1818,7 @@ if ($step == 6 && $datatoimport) print '</table>'; print '</div>'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); + print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export'); print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -1838,28 +1881,28 @@ if ($step == 6 && $datatoimport) print '<b>'.$langs->trans("InformationOnTargetTables").'</b>'; print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; - print '<table width="100%" class="border">'; - //print '<tr><td colspan="2"><b>'.$langs->trans("InformationOnTargetTables").'</b></td></tr>'; + print '<table class="border centpercent">'; // Tables imported print '<tr><td width="25%">'; print $langs->trans("TablesTarget"); print '</td><td>'; $listtables = array(); - foreach ($array_match_file_to_database as $code=>$label) - { + foreach ($array_match_file_to_database as $code => $label) { //var_dump($fieldssource); - if ($code > count($fieldssource)) continue; + if ($code > count($fieldssource)) { + continue; + } //print $code.'-'.$label; $alias = preg_replace('/(\..*)$/i', '', $label); $listtables[$alias] = $objimport->array_import_tables[0][$alias]; } - if (count($listtables)) - { + if (count($listtables)) { $newval = ''; - foreach ($listtables as $val) - { - if ($newval) print ', '; + foreach ($listtables as $val) { + if ($newval) { + print ', '; + } $newval = $val; // Link to Dolibarr wiki pages /*$helppagename='EN:Table_'.$newval; @@ -1874,7 +1917,9 @@ if ($step == 6 && $datatoimport) }*/ print $newval; } - } else print $langs->trans("Error"); + } else { + print $langs->trans("Error"); + } print '</td></tr>'; // Fields imported @@ -1885,11 +1930,12 @@ if ($step == 6 && $datatoimport) $sort_array_match_file_to_database = $array_match_file_to_database; ksort($sort_array_match_file_to_database); //var_dump($sort_array_match_file_to_database); - foreach ($sort_array_match_file_to_database as $code=>$label) - { + foreach ($sort_array_match_file_to_database as $code => $label) { $i++; //var_dump($fieldssource); - if ($code > count($fieldssource)) continue; + if ($code > count($fieldssource)) { + continue; + } //print $code.'-'.$label; $alias = preg_replace('/(\..*)$/i', '', $label); $listfields[$i] = $langs->trans("Field").' '.$code.'->'.$label; @@ -1918,31 +1964,38 @@ if ($step == 6 && $datatoimport) $nbok = 0; $pathfile = $conf->import->dir_temp.'/'.$filetoimport; $result = $obj->import_open_file($pathfile, $langs); - if ($result > 0) - { + if ($result > 0) { global $tablewithentity_cache; $tablewithentity_cache = array(); $sourcelinenb = 0; $endoffile = 0; - while ($sourcelinenb < $nboflines && !$endoffile) - { + while ($sourcelinenb < $nboflines && !$endoffile) { $sourcelinenb++; $arrayrecord = $obj->import_read_record(); - if ($arrayrecord === false) - { + if ($arrayrecord === false) { $arrayofwarnings[$sourcelinenb][0] = array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines.', 'type'=>'EOF_RECORD_ON_SEVERAL_LINES'); $endoffile++; continue; } - if ($excludefirstline && ($sourcelinenb < $excludefirstline)) continue; - if ($endatlinenb && ($sourcelinenb > $endatlinenb)) break; + if ($excludefirstline && ($sourcelinenb < $excludefirstline)) { + continue; + } + if ($endatlinenb && ($sourcelinenb > $endatlinenb)) { + break; + } // Run import $result = $obj->import_insert($arrayrecord, $array_match_file_to_database, $objimport, count($fieldssource), $importid, $updatekeys); - if (count($obj->errors)) $arrayoferrors[$sourcelinenb] = $obj->errors; - if (count($obj->warnings)) $arrayofwarnings[$sourcelinenb] = $obj->warnings; - if (!count($obj->errors) && !count($obj->warnings)) $nbok++; + if (count($obj->errors)) { + $arrayoferrors[$sourcelinenb] = $obj->errors; + } + if (count($obj->warnings)) { + $arrayofwarnings[$sourcelinenb] = $obj->warnings; + } + if (!count($obj->errors) && !count($obj->warnings)) { + $nbok++; + } } // Close file $obj->import_close_file(); @@ -1950,29 +2003,30 @@ if ($step == 6 && $datatoimport) print $langs->trans("ErrorFailedToOpenFile", $pathfile); } - if (count($arrayoferrors) > 0) $db->rollback(); // We force rollback because this was errors. - else { + if (count($arrayoferrors) > 0) { + $db->rollback(); // We force rollback because this was errors. + } else { $error = 0; // Run the sql after import if defined //var_dump($objimport->array_import_run_sql_after[0]); - if (!empty($objimport->array_import_run_sql_after[0]) && is_array($objimport->array_import_run_sql_after[0])) - { + if (!empty($objimport->array_import_run_sql_after[0]) && is_array($objimport->array_import_run_sql_after[0])) { $i = 0; - foreach ($objimport->array_import_run_sql_after[0] as $sqlafterimport) - { + foreach ($objimport->array_import_run_sql_after[0] as $sqlafterimport) { $i++; $resqlafterimport = $db->query($sqlafterimport); - if (!$resqlafterimport) - { + if (!$resqlafterimport) { $arrayoferrors['none'][] = array('lib'=>$langs->trans("Error running final request: ".$sqlafterimport)); $error++; } } } - if (!$error) $db->commit(); // We can commit if no errors. - else $db->rollback(); + if (!$error) { + $db->commit(); // We can commit if no errors. + } else { + $db->rollback(); + } } print dol_get_fiche_end(); @@ -2028,8 +2082,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') print '<table summary="boxtable'.$pos.'" width="100%" class="nobordernopadding">'."\n"; } - if ($pos && $pos > count($fieldssource)) // No fields - { + if ($pos && $pos > count($fieldssource)) { // No fields print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">'; print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; print img_picto(($pos > 0 ? $langs->trans("MoveField", $pos) : ''), 'grip_title', 'class="boxhandle" style="cursor:move;"'); @@ -2038,8 +2091,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') print $langs->trans("NoFields"); print '</td>'; print '</tr>'; - } elseif ($key == 'none') // Empty line - { + } elseif ($key == 'none') { // Empty line print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">'; print '<td class="nocellnopadding" width="16" style="font-weight: normal">'; print '&nbsp;'; @@ -2058,9 +2110,10 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') print '<td style="font-weight: normal">'; print $langs->trans("Field").' '.$pos; $example = $fieldssource[$pos]['example1']; - if ($example) - { - if (!utf8_check($example)) $example = utf8_encode($example); + if ($example) { + if (!utf8_check($example)) { + $example = utf8_encode($example); + } print ' (<i>'.$example.'</i>)'; } print '</td>'; @@ -2086,15 +2139,16 @@ function getnewkey(&$fieldssource, &$listofkey) $i = count($fieldssource) + 1; // Max number of key $maxkey = 0; - foreach ($listofkey as $key=>$val) - { + foreach ($listofkey as $key => $val) { $maxkey = max($maxkey, $key); } // Found next empty key - while ($i <= $maxkey) - { - if (empty($listofkey[$i])) break; - else $i++; + while ($i <= $maxkey) { + if (empty($listofkey[$i])) { + break; + } else { + $i++; + } } $listofkey[$i] = 1; diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 4c556325b05..ac3d2b23f69 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -27,8 +27,9 @@ require_once DOL_DOCUMENT_ROOT.'/imports/class/import.class.php'; // Load translation files required by the page $langs->load("exports"); -if (!$user->socid == 0) - accessforbidden(); +if (!$user->socid == 0) { + accessforbidden(); +} $import = new Import($db); $import->load_arrays($user); @@ -49,8 +50,7 @@ print '<br>'; print '<div class="center">'; -if (count($import->array_import_code)) -{ +if (count($import->array_import_code)) { print dolGetButtonTitle($langs->trans('NewImport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/imports/import.php?leftmenu=import'); } print '</div>'; @@ -68,10 +68,9 @@ print '</tr>'; include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php'; $model = new ModeleImports(); -$liste = $model->liste_modeles($db); +$list = $model->liste_modeles($db); -foreach ($liste as $key) -{ +foreach ($list as $key) { print '<tr class="oddeven">'; print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>'; $text = $model->getDriverDescForKey($key); diff --git a/htdocs/includes/adodbtime/index.html b/htdocs/includes/adodbtime/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/includes/index.html b/htdocs/includes/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index d269cd5e5dc..91fec8d998e 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -820,11 +820,17 @@ IMG; // Export to PDF using LibreOffice if ($conf->global->MAIN_ODT_AS_PDF == 'libreoffice') { + dol_mkdir($conf->user->dir_temp); // We must be sure the directory exists and is writable + + // We delete and recreate a subdir because the soffice may have change pemrissions on it + dol_delete_dir_recursive($conf->user->dir_temp.'/odtaspdf'); + dol_mkdir($conf->user->dir_temp.'/odtaspdf'); + // Install prerequisites: apt install soffice libreoffice-common libreoffice-writer // using windows libreoffice that must be in path // using linux/mac libreoffice that must be in path // Note PHP Config "fastcgi.impersonate=0" must set to 0 - Default is 1 - $command ='soffice --headless -env:UserInstallation=file:"//'.$conf->user->dir_temp.'" --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name); + $command ='soffice --headless -env:UserInstallation=file:\''.$conf->user->dir_temp.'/odtaspdf\' --convert-to pdf --outdir '. escapeshellarg(dirname($name)). " ".escapeshellarg($name); } elseif (preg_match('/unoconv/', $conf->global->MAIN_ODT_AS_PDF)) { @@ -907,16 +913,20 @@ IMG; { dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG); $filename=''; $linenum=0; - if (headers_sent($filename, $linenum)) { - throw new OdfException("headers already sent ($filename at $linenum)"); + + if (php_sapi_name() != 'cli') { // If we are in a web context (not into CLI context) + if (headers_sent($filename, $linenum)) { + throw new OdfException("headers already sent ($filename at $linenum)"); + } + + if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $name=preg_replace('/\.od(x|t)/i', '', $name); + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="'.$name.'.pdf"'); + readfile($name.".pdf"); + } } - if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $name=preg_replace('/\.od(x|t)/i', '', $name); - header('Content-type: application/pdf'); - header('Content-Disposition: attachment; filename="'.$name.'.pdf"'); - readfile($name.".pdf"); - } if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE)) { unlink($name); @@ -925,7 +935,7 @@ IMG; dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG); dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr, true), LOG_DEBUG); - if ($retval==126) { + if ($retval == 126) { throw new OdfException('Permission execute convert script : ' . $command); } else { diff --git a/htdocs/includes/parsedown/Parsedown.php b/htdocs/includes/parsedown/Parsedown.php index df718bce111..cc110c318c8 100644 --- a/htdocs/includes/parsedown/Parsedown.php +++ b/htdocs/includes/parsedown/Parsedown.php @@ -1182,7 +1182,7 @@ class Parsedown 'src' => $Link['element']['attributes']['href'], 'alt' => $Link['element']['text'], // @CHANGE LDR - 'class' => $Link['element']['attributes']['class'] + 'class' => (!empty($Link['element']['attributes']['class']) ? $Link['element']['attributes']['class'] : '') ), ), ); diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/IReader.php b/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/IReader.php deleted file mode 100644 index e35c4ee6255..00000000000 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/IReader.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace PhpOffice\PhpSpreadsheet\Reader; - -interface IReader -{ - /** - * IReader constructor. - */ - public function __construct(); - - /** - * Can the current IReader read the file? - * - * @param string $pFilename - * - * @return bool - */ - public function canRead($pFilename); - - /** - * Loads PhpSpreadsheet from file. - * - * @param string $pFilename - * - * @throws Exception - * - * @return \PhpOffice\PhpSpreadsheet\Spreadsheet - */ - public function load($pFilename); -} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/IWriter.php b/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/IWriter.php deleted file mode 100644 index 9ce45a1946a..00000000000 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/IWriter.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace PhpOffice\PhpSpreadsheet\Writer; - -use PhpOffice\PhpSpreadsheet\Spreadsheet; - -interface IWriter -{ - /** - * IWriter constructor. - * - * @param Spreadsheet $spreadsheet - */ - public function __construct(Spreadsheet $spreadsheet); - - /** - * Save PhpSpreadsheet to file. - * - * @param string $pFilename Name of the file to save - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - */ - public function save($pFilename); -} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Calculation.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Calculation.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php index 4f9ef639883..ae06d654dce 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Calculation.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php @@ -117,7 +117,7 @@ class Calculation /** * An array of the nested cell references accessed by the calculation engine, used for the debug log. * - * @var array of string + * @var CyclicReferenceStack */ private $cyclicReferenceStack; @@ -1945,6 +1945,11 @@ class Calculation 'functionCall' => [MathTrig::class, 'SUMXMY2'], 'argumentCount' => '2', ], + 'SWITCH' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'statementSwitch'], + 'argumentCount' => '3+', + ], 'SYD' => [ 'category' => Category::CATEGORY_FINANCIAL, 'functionCall' => [Financial::class, 'SYD'], @@ -2207,8 +2212,8 @@ class Calculation private static function loadLocales() { $localeFileDirectory = __DIR__ . '/locale/'; - foreach (glob($localeFileDirectory . '/*', GLOB_ONLYDIR) as $filename) { - $filename = substr($filename, strlen($localeFileDirectory) + 1); + foreach (glob($localeFileDirectory . '*', GLOB_ONLYDIR) as $filename) { + $filename = substr($filename, strlen($localeFileDirectory)); if ($filename != 'en') { self::$validLocaleLanguages[] = $filename; } @@ -2413,7 +2418,6 @@ class Calculation if (strpos($locale, '_') !== false) { list($language) = explode('_', $locale); } - if (count(self::$validLocaleLanguages) == 1) { self::loadLocales(); } @@ -2704,7 +2708,7 @@ class Calculation * @param Cell $pCell Cell to calculate * @param bool $resetLog Flag indicating whether the debug log should be reset or not * - * @throws Exception + * @throws \PhpOffice\PhpSpreadsheet\Exception * * @return mixed */ @@ -2808,7 +2812,7 @@ class Calculation * @param string $cellID Address of the cell to calculate * @param Cell $pCell Cell to calculate * - * @throws Exception + * @throws \PhpOffice\PhpSpreadsheet\Exception * * @return mixed */ @@ -2892,6 +2896,15 @@ class Calculation { $cellValue = null; + // Quote-Prefixed cell values cannot be formulae, but are treated as strings + if ($pCell !== null && $pCell->getStyle()->getQuotePrefix() === true) { + return self::wrapResult((string) $formula); + } + + if (preg_match('/^=\s*cmd\s*\|/miu', $formula) !== 0) { + return self::wrapResult($formula); + } + // Basic validation that this is indeed a formula // We simply return the cell value if not $formula = trim($formula); diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Category.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Category.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Database.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Database.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/DateTime.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/DateTime.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engine/Logger.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engine/Logger.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engineering.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Engineering.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Exception.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Exception.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/ExceptionHandler.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/ExceptionHandler.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Financial.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Financial.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/FormulaParser.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/FormulaParser.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/FormulaToken.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/FormulaToken.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Functions.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Functions.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Logical.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php similarity index 83% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Logical.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php index c36e3fca74f..3e6c5e74177 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Logical.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php @@ -273,6 +273,60 @@ class Logical return ($condition) ? $returnIfTrue : $returnIfFalse; } + /** + * STATEMENT_SWITCH. + * + * Returns corresponding with first match (any data type such as a string, numeric, date, etc). + * + * Excel Function: + * =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default]) + * + * Expression + * The expression to compare to a list of values. + * value1, value2, ... value_n + * A list of values that are compared to expression. The SWITCH function is looking for the first value that matches the expression. + * result1, result2, ... result_n + * A list of results. The SWITCH function returns the corresponding result when a value matches expression. + * default + * Optional. It is the default to return if expression does not match any of the values (value1, value2, ... value_n). + * + * @category Logical Functions + * + * @param mixed $arguments Statement arguments + * + * @return mixed The value of matched expression + */ + public static function statementSwitch(...$arguments) + { + $result = Functions::VALUE(); + + if (count($arguments) > 0) { + $targetValue = Functions::flattenSingleValue($arguments[0]); + $argc = count($arguments) - 1; + $switchCount = floor($argc / 2); + $switchSatisfied = false; + $hasDefaultClause = $argc % 2 !== 0; + $defaultClause = $argc % 2 === 0 ? null : $arguments[count($arguments) - 1]; + + if ($switchCount) { + for ($index = 0; $index < $switchCount; ++$index) { + if ($targetValue == $arguments[$index * 2 + 1]) { + $result = $arguments[$index * 2 + 2]; + $switchSatisfied = true; + + break; + } + } + } + + if (!$switchSatisfied) { + $result = $hasDefaultClause ? $defaultClause : Functions::NA(); + } + } + + return $result; + } + /** * IFERROR. * diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/LookupRef.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/LookupRef.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php index 2a3c5582108..e6b0f3203f8 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/LookupRef.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php @@ -4,6 +4,7 @@ namespace PhpOffice\PhpSpreadsheet\Calculation; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Shared\StringHelper; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; class LookupRef @@ -473,8 +474,9 @@ class LookupRef $lookupValue = Functions::flattenSingleValue($lookupValue); $matchType = ($matchType === null) ? 1 : (int) Functions::flattenSingleValue($matchType); + $initialLookupValue = $lookupValue; // MATCH is not case sensitive - $lookupValue = strtolower($lookupValue); + $lookupValue = StringHelper::strToLower($lookupValue); // Lookup_value type has to be number, text, or logical values if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) { @@ -502,7 +504,7 @@ class LookupRef } // Convert strings to lowercase for case-insensitive testing if (is_string($lookupArrayValue)) { - $lookupArray[$i] = strtolower($lookupArrayValue); + $lookupArray[$i] = StringHelper::strToLower($lookupArrayValue); } if (($lookupArrayValue === null) && (($matchType == 1) || ($matchType == -1))) { $lookupArray = array_slice($lookupArray, 0, $i - 1); @@ -522,9 +524,13 @@ class LookupRef if ($matchType == 0 || $matchType == 1) { foreach ($lookupArray as $i => $lookupArrayValue) { - if (($matchType == 0) && ($lookupArrayValue == $lookupValue)) { + $onlyNumeric = is_numeric($lookupArrayValue) && is_numeric($lookupValue); + $onlyNumericExactMatch = $onlyNumeric && $lookupArrayValue == $lookupValue; + $nonOnlyNumericExactMatch = !$onlyNumeric && $lookupArrayValue === $lookupValue; + $exactMatch = $onlyNumericExactMatch || $nonOnlyNumericExactMatch; + if (($matchType == 0) && $exactMatch) { // exact match - return ++$i; + return $i + 1; } elseif (($matchType == 1) && ($lookupArrayValue <= $lookupValue)) { $i = array_search($i, $keySet); @@ -661,7 +667,9 @@ class LookupRef { reset($a); $firstColumn = key($a); - if (($aLower = strtolower($a[$firstColumn])) == ($bLower = strtolower($b[$firstColumn]))) { + $aLower = StringHelper::strToLower($a[$firstColumn]); + $bLower = StringHelper::strToLower($b[$firstColumn]); + if ($aLower == $bLower) { return 0; } @@ -707,11 +715,14 @@ class LookupRef uasort($lookup_array, ['self', 'vlookupSort']); } + $lookupLower = StringHelper::strToLower($lookup_value); $rowNumber = $rowValue = false; foreach ($lookup_array as $rowKey => $rowData) { + $firstLower = StringHelper::strToLower($rowData[$firstColumn]); + // break if we have passed possible keys if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) || - (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && (strtolower($rowData[$firstColumn]) > strtolower($lookup_value)))) { + (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && ($firstLower > $lookupLower))) { break; } // remember the last key, but only if datatypes match @@ -719,17 +730,15 @@ class LookupRef (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]))) { if ($not_exact_match) { $rowNumber = $rowKey; - $rowValue = $rowData[$firstColumn]; continue; - } elseif ((strtolower($rowData[$firstColumn]) == strtolower($lookup_value)) + } elseif (($firstLower == $lookupLower) // Spreadsheets software returns first exact match, // we have sorted and we might have broken key orders // we want the first one (by its initial index) && (($rowNumber == false) || ($rowKey < $rowNumber)) ) { $rowNumber = $rowKey; - $rowValue = $rowData[$firstColumn]; } } } @@ -782,8 +791,11 @@ class LookupRef // break if we have passed possible keys $bothNumeric = is_numeric($lookup_value) && is_numeric($rowData); $bothNotNumeric = !is_numeric($lookup_value) && !is_numeric($rowData); + $lookupLower = StringHelper::strToLower($lookup_value); + $rowDataLower = StringHelper::strToLower($rowData); + if (($bothNumeric && $rowData > $lookup_value) || - ($bothNotNumeric && strtolower($rowData) > strtolower($lookup_value))) { + ($bothNotNumeric && $rowDataLower > $lookupLower)) { break; } @@ -793,7 +805,7 @@ class LookupRef $rowNumber = $rowKey; continue; - } elseif (strtolower($rowData) === strtolower($lookup_value) + } elseif ($rowDataLower === $lookupLower && ($rowNumber === null || $rowKey < $rowNumber) ) { $rowNumber = $rowKey; diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/MathTrig.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/MathTrig.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php index 9170196bae5..a06f3a384c9 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/MathTrig.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php @@ -1224,11 +1224,12 @@ class MathTrig } $testCondition = '=' . $arg . $condition; + $sumValue = array_key_exists($key, $sumArgs) ? $sumArgs[$key] : 0; - if (is_numeric($sumArgs[$key]) && + if (is_numeric($sumValue) && Calculation::getInstance()->_calculateFormulaValue($testCondition)) { // Is it a value within our criteria and only numeric can be added to the result - $returnValue += $sumArgs[$key]; + $returnValue += $sumValue; } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Statistical.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Statistical.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/TextData.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/TextData.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Token/Stack.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/Token/Stack.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/functionlist.txt b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/functionlist.txt rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt index ee87c17f63c..4a5cd265ba8 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/functionlist.txt +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt @@ -337,6 +337,7 @@ SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 +SWITCH SYD T TAN diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/bg/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/bg/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/bg/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/bg/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/cs/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/cs/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/cs/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/cs/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/da/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/da/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/da/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/da/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/de/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/de/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/de/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/de/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/en/uk/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/en/uk/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/es/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/es/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/es/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/es/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fi/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fi/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fi/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fi/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fr/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fr/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fr/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/fr/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/hu/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/hu/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/hu/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/hu/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/it/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/it/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/it/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/it/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/nl/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/nl/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/nl/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/nl/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/no/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/no/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/no/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/no/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pl/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pl/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pl/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pl/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/br/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/br/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/br/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/br/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/pt/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/ru/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/ru/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/ru/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/ru/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/sv/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/sv/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/sv/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/sv/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/tr/config b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/tr/config rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/tr/functions b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Calculation/locale/tr/functions rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/AdvancedValueBinder.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/AdvancedValueBinder.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php index efb8e5ef368..4052c23cb97 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/AdvancedValueBinder.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php @@ -16,6 +16,8 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder * @param Cell $cell Cell to bind value to * @param mixed $value Value to bind in cell * + * @throws \PhpOffice\PhpSpreadsheet\Exception + * * @return bool */ public function bindValue(Cell $cell, $value = null) diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Cell.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Cell.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php index 416b4a9909b..813eee4a091 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Cell.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php @@ -523,7 +523,7 @@ class Cell /** * If this cell is in a merge range, then return the range. * - * @return string + * @return false|string */ public function getMergeRange() { diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Coordinate.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Coordinate.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php index 12e3b689727..5e20ec6d9dc 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Coordinate.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php @@ -157,14 +157,12 @@ abstract class Coordinate } // Build range - $imploded = []; $counter = count($pRange); for ($i = 0; $i < $counter; ++$i) { $pRange[$i] = implode(':', $pRange[$i]); } - $imploded = implode(',', $pRange); - return $imploded; + return implode(',', $pRange); } /** diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataType.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataType.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataType.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataType.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataValidation.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidation.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataValidation.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidation.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataValidator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DataValidator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DefaultValueBinder.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php similarity index 97% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DefaultValueBinder.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php index 7cbb6cca27f..0e6433a4ec8 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/DefaultValueBinder.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php @@ -14,6 +14,8 @@ class DefaultValueBinder implements IValueBinder * @param Cell $cell Cell to bind value to * @param mixed $value Value to bind in cell * + * @throws \PhpOffice\PhpSpreadsheet\Exception + * * @return bool */ public function bindValue(Cell $cell, $value) diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Hyperlink.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/Hyperlink.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Cell/IValueBinder.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IValueBinder.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Cell/IValueBinder.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IValueBinder.php diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/StringValueBinder.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/StringValueBinder.php new file mode 100644 index 00000000000..0552677f295 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/StringValueBinder.php @@ -0,0 +1,31 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Cell; + +use PhpOffice\PhpSpreadsheet\Shared\StringHelper; + +class StringValueBinder implements IValueBinder +{ + /** + * Bind value to a cell. + * + * @param Cell $cell Cell to bind value to + * @param mixed $value Value to bind in cell + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + * + * @return bool + */ + public function bindValue(Cell $cell, $value) + { + // sanitize UTF-8 strings + if (is_string($value)) { + $value = StringHelper::sanitizeUTF8($value); + } + + $cell->setValueExplicit((string) $value, DataType::TYPE_STRING); + + // Done! + return true; + } +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Axis.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Axis.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php index 52f70431453..3d1dd22262d 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Axis.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php @@ -365,10 +365,10 @@ class Axis extends Properties } /** - * Set Shadow Properties from Maped Values. + * Set Shadow Properties from Mapped Values. * * @param array $properties_map - * @param * $reference + * @param mixed &$reference * * @return Axis */ diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Chart.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Chart.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/DataSeries.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeries.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/DataSeries.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeries.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/DataSeriesValues.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/DataSeriesValues.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Exception.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Exception.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/GridLines.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/GridLines.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/GridLines.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/GridLines.php index 6e9e39dcf50..8cc83e5540c 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/GridLines.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/GridLines.php @@ -319,7 +319,7 @@ class GridLines extends Properties * Set Shadow Properties Values. * * @param array $properties_map - * @param * $reference + * @param mixed &$reference * * @return GridLines */ @@ -439,7 +439,7 @@ class GridLines extends Properties { if ($size !== null) { $this->activateObject(); - $softEdges['size'] = (string) $this->getExcelPointsWidth($size); + $this->softEdges['size'] = (string) $this->getExcelPointsWidth($size); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Layout.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Layout.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php index fb5a53a063e..a8a96d2f1cb 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Layout.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php @@ -175,13 +175,13 @@ class Layout /** * Set X-Mode. * - * @param X-Mode $value + * @param string $value * * @return Layout */ public function setXMode($value) { - $this->xMode = $value; + $this->xMode = (string) $value; return $this; } @@ -199,13 +199,13 @@ class Layout /** * Set Y-Mode. * - * @param Y-Mode $value + * @param string $value * * @return Layout */ public function setYMode($value) { - $this->yMode = $value; + $this->yMode = (string) $value; return $this; } @@ -223,13 +223,13 @@ class Layout /** * Set X-Position. * - * @param X-Position $value + * @param float $value * * @return Layout */ public function setXPosition($value) { - $this->xPos = $value; + $this->xPos = (float) $value; return $this; } @@ -247,13 +247,13 @@ class Layout /** * Set Y-Position. * - * @param Y-Position $value + * @param float $value * * @return Layout */ public function setYPosition($value) { - $this->yPos = $value; + $this->yPos = (float) $value; return $this; } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Legend.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Legend.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/PlotArea.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/PlotArea.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Properties.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Properties.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Properties.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Properties.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/IRenderer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/IRenderer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/IRenderer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/IRenderer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/JpGraph.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/JpGraph.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraph.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/Polyfill.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/Polyfill.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Renderer/Polyfill.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/Polyfill.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Title.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Title.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Chart/Title.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Title.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Collection/Cells.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Collection/Cells.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php index 80a43220988..84c3d3009ca 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Collection/Cells.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php @@ -241,7 +241,7 @@ class Cells */ public function getHighestColumn($row = null) { - if ($row == null) { + if ($row === null) { $colRow = $this->getHighestRowAndColumn(); return $colRow['column']; @@ -259,7 +259,7 @@ class Cells $columnList[] = Coordinate::columnIndexFromString($c); } - return Coordinate::stringFromColumnIndex(max($columnList) + 1); + return Coordinate::stringFromColumnIndex(max($columnList)); } /** @@ -272,7 +272,7 @@ class Cells */ public function getHighestRow($column = null) { - if ($column == null) { + if ($column === null) { $colRow = $this->getHighestRowAndColumn(); return $colRow['row']; diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Collection/CellsFactory.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Collection/CellsFactory.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Collection/Memory.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Memory.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Collection/Memory.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Memory.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Comment.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Comment.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Comment.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Comment.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Document/Properties.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Document/Properties.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php index bbac96d92a8..1a432db0497 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Document/Properties.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php @@ -418,7 +418,7 @@ class Properties * * @param string $propertyName * - * @return string + * @return mixed */ public function getCustomPropertyValue($propertyName) { diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Document/Security.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Security.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Document/Security.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Security.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Exception.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Exception.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Exception.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Exception.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/HashTable.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/HashTable.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/HashTable.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/HashTable.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Html.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Html.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Migrator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Migrator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Sample.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Helper/Sample.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/IComparable.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IComparable.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/IComparable.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IComparable.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/IOFactory.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IOFactory.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/IOFactory.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IOFactory.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/NamedRange.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedRange.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/NamedRange.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedRange.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/BaseReader.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php similarity index 52% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/BaseReader.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php index c191c3f8d8e..f7af1557fff 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/BaseReader.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php @@ -55,27 +55,16 @@ abstract class BaseReader implements IReader */ protected $securityScanner; - /** - * Read data only? - * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. - * If false (the default) it will read data and formatting. - * - * @return bool - */ + public function __construct() + { + $this->readFilter = new DefaultReadFilter(); + } + public function getReadDataOnly() { return $this->readDataOnly; } - /** - * Set read data only - * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. - * Set to false (the default) to advise the Reader to read both data and formatting for cells. - * - * @param bool $pValue - * - * @return IReader - */ public function setReadDataOnly($pValue) { $this->readDataOnly = (bool) $pValue; @@ -83,27 +72,11 @@ abstract class BaseReader implements IReader return $this; } - /** - * Read empty cells? - * If this is true (the default), then the Reader will read data values for all cells, irrespective of value. - * If false it will not read data for cells containing a null value or an empty string. - * - * @return bool - */ public function getReadEmptyCells() { return $this->readEmptyCells; } - /** - * Set read empty cells - * Set to true (the default) to advise the Reader read data values for all cells, irrespective of value. - * Set to false to advise the Reader to ignore cells containing a null value or an empty string. - * - * @param bool $pValue - * - * @return IReader - */ public function setReadEmptyCells($pValue) { $this->readEmptyCells = (bool) $pValue; @@ -111,29 +84,11 @@ abstract class BaseReader implements IReader return $this; } - /** - * Read charts in workbook? - * If this is true, then the Reader will include any charts that exist in the workbook. - * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. - * If false (the default) it will ignore any charts defined in the workbook file. - * - * @return bool - */ public function getIncludeCharts() { return $this->includeCharts; } - /** - * Set read charts in workbook - * Set to true, to advise the Reader to include any charts that exist in the workbook. - * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. - * Set to false (the default) to discard charts. - * - * @param bool $pValue - * - * @return IReader - */ public function setIncludeCharts($pValue) { $this->includeCharts = (bool) $pValue; @@ -141,27 +96,11 @@ abstract class BaseReader implements IReader return $this; } - /** - * Get which sheets to load - * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null - * indicating that all worksheets in the workbook should be loaded. - * - * @return mixed - */ public function getLoadSheetsOnly() { return $this->loadSheetsOnly; } - /** - * Set which sheets to load. - * - * @param mixed $value - * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. - * If NULL, then it tells the Reader to read all worksheets in the workbook - * - * @return IReader - */ public function setLoadSheetsOnly($value) { if ($value === null) { @@ -173,12 +112,6 @@ abstract class BaseReader implements IReader return $this; } - /** - * Set all sheets to load - * Tells the Reader to load all worksheets from the workbook. - * - * @return IReader - */ public function setLoadAllSheets() { $this->loadSheetsOnly = null; @@ -186,23 +119,11 @@ abstract class BaseReader implements IReader return $this; } - /** - * Read filter. - * - * @return IReadFilter - */ public function getReadFilter() { return $this->readFilter; } - /** - * Set read filter. - * - * @param IReadFilter $pValue - * - * @return IReader - */ public function setReadFilter(IReadFilter $pValue) { $this->readFilter = $pValue; @@ -210,7 +131,7 @@ abstract class BaseReader implements IReader return $this; } - public function getSecuritySCanner() + public function getSecurityScanner() { if (property_exists($this, 'securityScanner')) { return $this->securityScanner; diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Csv.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Csv.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php index 25f244c1181..81ca1a8cf3e 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Csv.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php @@ -62,7 +62,7 @@ class Csv extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); } /** @@ -143,7 +143,7 @@ class Csv extends BaseReader return; } - return $this->skipBOM(); + $this->skipBOM(); } /** @@ -155,7 +155,7 @@ class Csv extends BaseReader return; } - $potentialDelimiters = [',', ';', "\t", '|', ':', ' ']; + $potentialDelimiters = [',', ';', "\t", '|', ':', ' ', '~']; $counts = []; foreach ($potentialDelimiters as $delimiter) { $counts[$delimiter] = []; @@ -184,8 +184,9 @@ class Csv extends BaseReader // If number of lines is 0, nothing to infer : fall back to the default if ($numberLines === 0) { $this->delimiter = reset($potentialDelimiters); + $this->skipBOM(); - return $this->skipBOM(); + return; } // Calculate the mean square deviations for each delimiter (ignoring delimiters that haven't been found consistently) @@ -230,7 +231,7 @@ class Csv extends BaseReader $this->delimiter = reset($potentialDelimiters); } - return $this->skipBOM(); + $this->skipBOM(); } /** @@ -254,15 +255,13 @@ class Csv extends BaseReader $line = $line . $newLine; // Drop everything that is enclosed to avoid counting false positives in enclosures - $enclosure = preg_quote($this->enclosure, '/'); - $line = preg_replace('/(' . $enclosure . '.*' . $enclosure . ')/U', '', $line); + $enclosure = '(?<!' . preg_quote($this->escapeCharacter, '/') . ')' + . preg_quote($this->enclosure, '/'); + $line = preg_replace('/(' . $enclosure . '.*' . $enclosure . ')/Us', '', $line); // See if we have any enclosures left in the line - $matches = []; - preg_match('/(' . $enclosure . ')/', $line, $matches); - - // if we still have an enclosure then we need to read the next line aswell - if (count($matches) > 0) { + // if we still have an enclosure then we need to read the next line as well + if (preg_match('/(' . $enclosure . ')/', $line) > 0) { $line = $this->getNextLine($line); } @@ -547,7 +546,8 @@ class Csv extends BaseReader fclose($this->fileHandle); // Trust file extension if any - if (strtolower(pathinfo($pFilename, PATHINFO_EXTENSION)) === 'csv') { + $extension = strtolower(pathinfo($pFilename, PATHINFO_EXTENSION)); + if (in_array($extension, ['csv', 'tsv'])) { return true; } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/DefaultReadFilter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/DefaultReadFilter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Exception.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Exception.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Exception.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Exception.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Gnumeric.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Gnumeric.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php index 16f1925a738..7445ef1bf25 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Gnumeric.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -36,7 +36,7 @@ class Gnumeric extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); $this->referenceHelper = ReferenceHelper::getInstance(); $this->securityScanner = XmlScanner::getInstance($this); } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Html.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php similarity index 67% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Html.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php index d9f25a3166d..2e823f03bb5 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Html.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php @@ -12,6 +12,9 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Border; use PhpOffice\PhpSpreadsheet\Style\Color; use PhpOffice\PhpSpreadsheet\Style\Fill; +use PhpOffice\PhpSpreadsheet\Style\Font; +use PhpOffice\PhpSpreadsheet\Style\Style; +use PhpOffice\PhpSpreadsheet\Worksheet\Drawing; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; /** PhpSpreadsheet root directory */ @@ -96,6 +99,26 @@ class Html extends BaseReader ], ], ], // Bottom border + 'strong' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'b' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'i' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic + 'em' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic ]; protected $rowspan = []; @@ -105,7 +128,7 @@ class Html extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); $this->securityScanner = XmlScanner::getInstance($this); } @@ -295,11 +318,9 @@ class Html extends BaseReader switch ($child->nodeName) { case 'meta': foreach ($attributeArray as $attributeName => $attributeValue) { - switch ($attributeName) { - case 'content': - // TODO - // Extract character set, so we can convert to UTF-8 if required - break; + // Extract character set, so we can convert to UTF-8 if required + if ($attributeName === 'charset') { + $this->setInputEncoding($attributeValue); } } $this->processDomElement($child, $sheet, $row, $column, $cellContent); @@ -334,6 +355,10 @@ class Html extends BaseReader $cellContent .= ' '; } + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + break; case 'hr': $this->flushCell($sheet, $column, $row, $cellContent); @@ -423,6 +448,10 @@ class Html extends BaseReader $column = 'A'; } + break; + case 'img': + $this->insertImage($sheet, $column, $row, $attributeArray); + break; case 'table': $this->flushCell($sheet, $column, $row, $cellContent); @@ -448,6 +477,11 @@ class Html extends BaseReader $column = $this->getTableStartColumn(); $cellContent = ''; $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + ++$row; break; @@ -501,6 +535,27 @@ class Html extends BaseReader ] ); } + + if (isset($attributeArray['width'])) { + $sheet->getColumnDimension($column)->setWidth($attributeArray['width']); + } + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + + if (isset($attributeArray['align'])) { + $sheet->getStyle($column . $row)->getAlignment()->setHorizontal($attributeArray['align']); + } + + if (isset($attributeArray['valign'])) { + $sheet->getStyle($column . $row)->getAlignment()->setVertical($attributeArray['valign']); + } + + if (isset($attributeArray['data-format'])) { + $sheet->getStyle($column . $row)->getNumberFormat()->setFormatCode($attributeArray['data-format']); + } + ++$column; break; @@ -608,36 +663,271 @@ class Html extends BaseReader return; } - $supported_styles = ['background-color', 'color']; + $cellStyle = $sheet->getStyle($column . $row); // add color styles (background & text) from dom element,currently support : td & th, using ONLY inline css style with RGB color $styles = explode(';', $attributeArray['style']); foreach ($styles as $st) { $value = explode(':', $st); + $styleName = isset($value[0]) ? trim($value[0]) : null; + $styleValue = isset($value[1]) ? trim($value[1]) : null; - if (empty(trim($value[0])) || !in_array(trim($value[0]), $supported_styles)) { + if (!$styleName) { continue; } - //check if has #, so we can get clean hex - if (substr(trim($value[1]), 0, 1) == '#') { - $style_color = substr(trim($value[1]), 1); - } - - if (empty($style_color)) { - continue; - } - - switch (trim($value[0])) { + switch ($styleName) { + case 'background': case 'background-color': - $sheet->getStyle($column . $row)->applyFromArray(['fill' => ['fillType' => Fill::FILL_SOLID, 'color' => ['rgb' => "{$style_color}"]]]); + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['fill' => ['fillType' => Fill::FILL_SOLID, 'color' => ['rgb' => $styleColor]]]); break; case 'color': - $sheet->getStyle($column . $row)->applyFromArray(['font' => ['color' => ['rgb' => "{$style_color}"]]]); + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['font' => ['color' => ['rgb' => $styleColor]]]); + + break; + + case 'border': + $this->setBorderStyle($cellStyle, $styleValue, 'allBorders'); + + break; + + case 'border-top': + $this->setBorderStyle($cellStyle, $styleValue, 'top'); + + break; + + case 'border-bottom': + $this->setBorderStyle($cellStyle, $styleValue, 'bottom'); + + break; + + case 'border-left': + $this->setBorderStyle($cellStyle, $styleValue, 'left'); + + break; + + case 'border-right': + $this->setBorderStyle($cellStyle, $styleValue, 'right'); + + break; + + case 'font-size': + $cellStyle->getFont()->setSize( + (float) $styleValue + ); + + break; + + case 'font-weight': + if ($styleValue === 'bold' || $styleValue >= 500) { + $cellStyle->getFont()->setBold(true); + } + + break; + + case 'font-style': + if ($styleValue === 'italic') { + $cellStyle->getFont()->setItalic(true); + } + + break; + + case 'font-family': + $cellStyle->getFont()->setName(str_replace('\'', '', $styleValue)); + + break; + + case 'text-decoration': + switch ($styleValue) { + case 'underline': + $cellStyle->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + + break; + case 'line-through': + $cellStyle->getFont()->setStrikethrough(true); + + break; + } + + break; + + case 'text-align': + $cellStyle->getAlignment()->setHorizontal($styleValue); + + break; + + case 'vertical-align': + $cellStyle->getAlignment()->setVertical($styleValue); + + break; + + case 'width': + $sheet->getColumnDimension($column)->setWidth( + str_replace('px', '', $styleValue) + ); + + break; + + case 'height': + $sheet->getRowDimension($row)->setRowHeight( + str_replace('px', '', $styleValue) + ); + + break; + + case 'word-wrap': + $cellStyle->getAlignment()->setWrapText( + $styleValue === 'break-word' + ); + + break; + + case 'text-indent': + $cellStyle->getAlignment()->setIndent( + (int) str_replace(['px'], '', $styleValue) + ); break; } } } + + /** + * Check if has #, so we can get clean hex. + * + * @param $value + * + * @return null|string + */ + public function getStyleColor($value) + { + if (strpos($value, '#') === 0) { + return substr($value, 1); + } + + return null; + } + + /** + * @param Worksheet $sheet + * @param string $column + * @param int $row + * @param array $attributes + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + */ + private function insertImage(Worksheet $sheet, $column, $row, array $attributes) + { + if (!isset($attributes['src'])) { + return; + } + + $src = urldecode($attributes['src']); + $width = isset($attributes['width']) ? (float) $attributes['width'] : null; + $height = isset($attributes['height']) ? (float) $attributes['height'] : null; + $name = isset($attributes['alt']) ? (float) $attributes['alt'] : null; + + $drawing = new Drawing(); + $drawing->setPath($src); + $drawing->setWorksheet($sheet); + $drawing->setCoordinates($column . $row); + $drawing->setOffsetX(0); + $drawing->setOffsetY(10); + $drawing->setResizeProportional(true); + + if ($name) { + $drawing->setName($name); + } + + if ($width) { + $drawing->setWidth((int) $width); + } + + if ($height) { + $drawing->setHeight((int) $height); + } + + $sheet->getColumnDimension($column)->setWidth( + $drawing->getWidth() / 6 + ); + + $sheet->getRowDimension($row)->setRowHeight( + $drawing->getHeight() * 0.9 + ); + } + + /** + * Map html border style to PhpSpreadsheet border style. + * + * @param string $style + * + * @return null|string + */ + public function getBorderStyle($style) + { + switch ($style) { + case 'solid': + return Border::BORDER_THIN; + case 'dashed': + return Border::BORDER_DASHED; + case 'dotted': + return Border::BORDER_DOTTED; + case 'medium': + return Border::BORDER_MEDIUM; + case 'thick': + return Border::BORDER_THICK; + case 'none': + return Border::BORDER_NONE; + case 'dash-dot': + return Border::BORDER_DASHDOT; + case 'dash-dot-dot': + return Border::BORDER_DASHDOTDOT; + case 'double': + return Border::BORDER_DOUBLE; + case 'hair': + return Border::BORDER_HAIR; + case 'medium-dash-dot': + return Border::BORDER_MEDIUMDASHDOT; + case 'medium-dash-dot-dot': + return Border::BORDER_MEDIUMDASHDOTDOT; + case 'medium-dashed': + return Border::BORDER_MEDIUMDASHED; + case 'slant-dash-dot': + return Border::BORDER_SLANTDASHDOT; + } + + return null; + } + + /** + * @param Style $cellStyle + * @param string $styleValue + * @param string $type + */ + private function setBorderStyle(Style $cellStyle, $styleValue, $type) + { + list(, $borderStyle, $color) = explode(' ', $styleValue); + + $cellStyle->applyFromArray([ + 'borders' => [ + $type => [ + 'borderStyle' => $this->getBorderStyle($borderStyle), + 'color' => ['rgb' => $this->getStyleColor($color)], + ], + ], + ]); + } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/IReadFilter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReadFilter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/IReadFilter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReadFilter.php diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReader.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReader.php new file mode 100644 index 00000000000..70a7a200d78 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReader.php @@ -0,0 +1,137 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader; + +interface IReader +{ + /** + * IReader constructor. + */ + public function __construct(); + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename); + + /** + * Read data only? + * If this is true, then the Reader will only read data values for cells, it will not read any formatting information. + * If false (the default) it will read data and formatting. + * + * @return bool + */ + public function getReadDataOnly(); + + /** + * Set read data only + * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. + * Set to false (the default) to advise the Reader to read both data and formatting for cells. + * + * @param bool $pValue + * + * @return IReader + */ + public function setReadDataOnly($pValue); + + /** + * Read empty cells? + * If this is true (the default), then the Reader will read data values for all cells, irrespective of value. + * If false it will not read data for cells containing a null value or an empty string. + * + * @return bool + */ + public function getReadEmptyCells(); + + /** + * Set read empty cells + * Set to true (the default) to advise the Reader read data values for all cells, irrespective of value. + * Set to false to advise the Reader to ignore cells containing a null value or an empty string. + * + * @param bool $pValue + * + * @return IReader + */ + public function setReadEmptyCells($pValue); + + /** + * Read charts in workbook? + * If this is true, then the Reader will include any charts that exist in the workbook. + * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. + * If false (the default) it will ignore any charts defined in the workbook file. + * + * @return bool + */ + public function getIncludeCharts(); + + /** + * Set read charts in workbook + * Set to true, to advise the Reader to include any charts that exist in the workbook. + * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. + * Set to false (the default) to discard charts. + * + * @param bool $pValue + * + * @return IReader + */ + public function setIncludeCharts($pValue); + + /** + * Get which sheets to load + * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null + * indicating that all worksheets in the workbook should be loaded. + * + * @return mixed + */ + public function getLoadSheetsOnly(); + + /** + * Set which sheets to load. + * + * @param mixed $value + * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. + * If NULL, then it tells the Reader to read all worksheets in the workbook + * + * @return IReader + */ + public function setLoadSheetsOnly($value); + + /** + * Set all sheets to load + * Tells the Reader to load all worksheets from the workbook. + * + * @return IReader + */ + public function setLoadAllSheets(); + + /** + * Read filter. + * + * @return IReadFilter + */ + public function getReadFilter(); + + /** + * Set read filter. + * + * @param IReadFilter $pValue + * + * @return IReader + */ + public function setReadFilter(IReadFilter $pValue); + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return \PhpOffice\PhpSpreadsheet\Spreadsheet + */ + public function load($pFilename); +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Ods.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php similarity index 86% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Ods.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php index 0941f035dff..51462c2003e 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Ods.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php @@ -7,7 +7,7 @@ use DateTimeZone; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Cell\DataType; -use PhpOffice\PhpSpreadsheet\Document\Properties; +use PhpOffice\PhpSpreadsheet\Reader\Ods\Properties as DocumentProperties; use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; use PhpOffice\PhpSpreadsheet\RichText\RichText; use PhpOffice\PhpSpreadsheet\Settings; @@ -25,7 +25,7 @@ class Ods extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); $this->securityScanner = XmlScanner::getInstance($this); } @@ -52,7 +52,7 @@ class Ods extends BaseReader $stat = $zip->statName('mimetype'); if ($stat && ($stat['size'] <= 255)) { $mimeType = $zip->getFromName($stat['name']); - } elseif ($stat = $zip->statName('META-INF/manifest.xml')) { + } elseif ($zip->statName('META-INF/manifest.xml')) { $xml = simplexml_load_string( $this->securityScanner->scan($zip->getFromName('META-INF/manifest.xml')), 'SimpleXMLElement', @@ -265,7 +265,7 @@ class Ods extends BaseReader $zip = new ZipArchive(); if (!$zip->open($pFilename)) { - throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); + throw new Exception("Could not open {$pFilename} for reading! Error opening file."); } // Meta @@ -275,97 +275,13 @@ class Ods extends BaseReader 'SimpleXMLElement', Settings::getLibXmlLoaderOptions() ); + if ($xml === false) { + throw new Exception('Unable to read data from {$pFilename}'); + } + $namespacesMeta = $xml->getNamespaces(true); - $docProps = $spreadsheet->getProperties(); - $officeProperty = $xml->children($namespacesMeta['office']); - foreach ($officeProperty as $officePropertyData) { - $officePropertyDC = []; - if (isset($namespacesMeta['dc'])) { - $officePropertyDC = $officePropertyData->children($namespacesMeta['dc']); - } - foreach ($officePropertyDC as $propertyName => $propertyValue) { - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'title': - $docProps->setTitle($propertyValue); - - break; - case 'subject': - $docProps->setSubject($propertyValue); - - break; - case 'creator': - $docProps->setCreator($propertyValue); - $docProps->setLastModifiedBy($propertyValue); - - break; - case 'date': - $creationDate = strtotime($propertyValue); - $docProps->setCreated($creationDate); - $docProps->setModified($creationDate); - - break; - case 'description': - $docProps->setDescription($propertyValue); - - break; - } - } - $officePropertyMeta = []; - if (isset($namespacesMeta['dc'])) { - $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); - } - foreach ($officePropertyMeta as $propertyName => $propertyValue) { - $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']); - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'initial-creator': - $docProps->setCreator($propertyValue); - - break; - case 'keyword': - $docProps->setKeywords($propertyValue); - - break; - case 'creation-date': - $creationDate = strtotime($propertyValue); - $docProps->setCreated($creationDate); - - break; - case 'user-defined': - $propertyValueType = Properties::PROPERTY_TYPE_STRING; - foreach ($propertyValueAttributes as $key => $value) { - if ($key == 'name') { - $propertyValueName = (string) $value; - } elseif ($key == 'value-type') { - switch ($value) { - case 'date': - $propertyValue = Properties::convertProperty($propertyValue, 'date'); - $propertyValueType = Properties::PROPERTY_TYPE_DATE; - - break; - case 'boolean': - $propertyValue = Properties::convertProperty($propertyValue, 'bool'); - $propertyValueType = Properties::PROPERTY_TYPE_BOOLEAN; - - break; - case 'float': - $propertyValue = Properties::convertProperty($propertyValue, 'r4'); - $propertyValueType = Properties::PROPERTY_TYPE_FLOAT; - - break; - default: - $propertyValueType = Properties::PROPERTY_TYPE_STRING; - } - } - } - $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType); - - break; - } - } - } + (new DocumentProperties($spreadsheet))->load($xml, $namespacesMeta); // Content @@ -513,7 +429,7 @@ class Ods extends BaseReader foreach ($paragraphs as $pData) { $dataArray[] = $this->scanElementForText($pData); } - $allCellDataText = implode($dataArray, "\n"); + $allCellDataText = implode("\n", $dataArray); $type = $cellData->getAttributeNS($officeNs, 'value-type'); @@ -580,12 +496,12 @@ class Ods extends BaseReader ); $dataValue = Date::formattedPHPToExcel( - $year, - $month, - $day, - $hour, - $minute, - $second + (int) $year, + (int) $month, + (int) $day, + (int) $hour, + (int) $minute, + (int) $second ); if ($dataValue != floor($dataValue)) { diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php new file mode 100644 index 00000000000..8b6122c56e7 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php @@ -0,0 +1,136 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Ods; + +use PhpOffice\PhpSpreadsheet\Document\Properties as DocumentProperties; +use PhpOffice\PhpSpreadsheet\Spreadsheet; + +class Properties +{ + private $spreadsheet; + + public function __construct(Spreadsheet $spreadsheet) + { + $this->spreadsheet = $spreadsheet; + } + + public function load(\SimpleXMLElement $xml, $namespacesMeta) + { + $docProps = $this->spreadsheet->getProperties(); + $officeProperty = $xml->children($namespacesMeta['office']); + foreach ($officeProperty as $officePropertyData) { + /** @var \SimpleXMLElement $officePropertyData */ + $officePropertiesDC = (object) []; + if (isset($namespacesMeta['dc'])) { + $officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']); + } + $this->setCoreProperties($docProps, $officePropertiesDC); + + $officePropertyMeta = (object) []; + if (isset($namespacesMeta['dc'])) { + $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); + } + foreach ($officePropertyMeta as $propertyName => $propertyValue) { + $this->setMetaProperties($namespacesMeta, $propertyValue, $propertyName, $docProps); + } + } + } + + private function setCoreProperties(DocumentProperties $docProps, \SimpleXMLElement $officePropertyDC) + { + foreach ($officePropertyDC as $propertyName => $propertyValue) { + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'title': + $docProps->setTitle($propertyValue); + + break; + case 'subject': + $docProps->setSubject($propertyValue); + + break; + case 'creator': + $docProps->setCreator($propertyValue); + $docProps->setLastModifiedBy($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'description': + $docProps->setDescription($propertyValue); + + break; + } + } + } + + private function setMetaProperties( + $namespacesMeta, + \SimpleXMLElement $propertyValue, + $propertyName, + DocumentProperties $docProps + ) { + $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']); + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'initial-creator': + $docProps->setCreator($propertyValue); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + + break; + case 'user-defined': + $this->setUserDefinedProperty($propertyValueAttributes, $propertyValue, $docProps); + + break; + } + } + + private function setUserDefinedProperty($propertyValueAttributes, $propertyValue, DocumentProperties $docProps) + { + $propertyValueName = ''; + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + foreach ($propertyValueAttributes as $key => $value) { + if ($key == 'name') { + $propertyValueName = (string) $value; + } elseif ($key == 'value-type') { + switch ($value) { + case 'date': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'date'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_DATE; + + break; + case 'boolean': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'bool'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_BOOLEAN; + + break; + case 'float': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'r4'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_FLOAT; + + break; + default: + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + } + } + } + + $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType); + } +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Security/XmlScanner.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php similarity index 54% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Security/XmlScanner.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index b5f7ac60fdc..732f0bf612c 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -3,16 +3,10 @@ namespace PhpOffice\PhpSpreadsheet\Reader\Security; use PhpOffice\PhpSpreadsheet\Reader; +use PhpOffice\PhpSpreadsheet\Settings; class XmlScanner { - /** - * Identifies whether the thread-safe libxmlDisableEntityLoader() function is available. - * - * @var bool - */ - private $libxmlDisableEntityLoader = false; - /** * String used to identify risky xml elements. * @@ -22,10 +16,16 @@ class XmlScanner private $callback; - private function __construct($pattern = '<!DOCTYPE') + private static $libxmlDisableEntityLoaderValue; + + public function __construct($pattern = '<!DOCTYPE') { $this->pattern = $pattern; - $this->libxmlDisableEntityLoader = $this->identifyLibxmlDisableEntityLoaderAvailability(); + + $this->disableEntityLoaderCheck(); + + // A fatal error will bypass the destructor, so we register a shutdown here + register_shutdown_function([__CLASS__, 'shutdown']); } public static function getInstance(Reader\IReader $reader) @@ -43,7 +43,7 @@ class XmlScanner } } - private function identifyLibxmlDisableEntityLoaderAvailability() + public static function threadSafeLibxmlDisableEntityLoaderAvailability() { if (PHP_MAJOR_VERSION == 7) { switch (PHP_MINOR_VERSION) { @@ -61,11 +61,54 @@ class XmlScanner return false; } + private function disableEntityLoaderCheck() + { + if (Settings::getLibXmlDisableEntityLoader()) { + $libxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); + + if (self::$libxmlDisableEntityLoaderValue === null) { + self::$libxmlDisableEntityLoaderValue = $libxmlDisableEntityLoaderValue; + } + } + } + + public static function shutdown() + { + if (self::$libxmlDisableEntityLoaderValue !== null) { + libxml_disable_entity_loader(self::$libxmlDisableEntityLoaderValue); + self::$libxmlDisableEntityLoaderValue = null; + } + } + + public function __destruct() + { + self::shutdown(); + } + public function setAdditionalCallback(callable $callback) { $this->callback = $callback; } + private function toUtf8($xml) + { + $pattern = '/encoding="(.*?)"/'; + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + + if ($charset !== 'UTF-8') { + $xml = mb_convert_encoding($xml, 'UTF-8', $charset); + + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + if ($charset !== 'UTF-8') { + throw new Reader\Exception('Suspicious Double-encoded XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } + } + + return $xml; + } + /** * Scan the XML for use of <!ENTITY to prevent XXE/XEE attacks. * @@ -77,33 +120,19 @@ class XmlScanner */ public function scan($xml) { - if ($this->libxmlDisableEntityLoader) { - $previousLibxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); - } + $this->disableEntityLoaderCheck(); - $pattern = '/encoding="(.*?)"/'; - $result = preg_match($pattern, $xml, $matches); - $charset = $result ? $matches[1] : 'UTF-8'; - - if ($charset !== 'UTF-8') { - $xml = mb_convert_encoding($xml, 'UTF-8', $charset); - } + $xml = $this->toUtf8($xml); // Don't rely purely on libxml_disable_entity_loader() $pattern = '/\\0?' . implode('\\0?', str_split($this->pattern)) . '\\0?/'; - try { - if (preg_match($pattern, $xml)) { - throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); - } + if (preg_match($pattern, $xml)) { + throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } - if ($this->callback !== null && is_callable($this->callback)) { - $xml = call_user_func($this->callback, $xml); - } - } finally { - if (isset($previousLibxmlDisableEntityLoaderValue)) { - libxml_disable_entity_loader($previousLibxmlDisableEntityLoaderValue); - } + if ($this->callback !== null && is_callable($this->callback)) { + $xml = call_user_func($this->callback, $xml); } return $xml; diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Slk.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Slk.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php index 61e52334b5c..c1013c2eb22 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Slk.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php @@ -43,7 +43,7 @@ class Slk extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); } /** diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php index 514adae2743..bd2c9c1db5b 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php @@ -412,7 +412,7 @@ class Xls extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); } /** diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/ErrorCode.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/ErrorCode.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/ErrorCode.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/ErrorCode.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Escher.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Escher.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Escher.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Escher.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/MD5.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/MD5.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/MD5.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/MD5.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/RC4.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/RC4.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/RC4.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/RC4.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Style/Border.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Style/Border.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php similarity index 69% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php index 335f5d7e99c..5372fef9c13 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php @@ -4,10 +4,19 @@ namespace PhpOffice\PhpSpreadsheet\Reader; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Cell\Hyperlink; -use PhpOffice\PhpSpreadsheet\Document\Properties; use PhpOffice\PhpSpreadsheet\NamedRange; use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\AutoFilter; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Chart; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\ColumnAndRowAttributes; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\ConditionalStyles; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\DataValidations; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Hyperlinks; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\PageSetup; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Properties as PropertyReader; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\SheetViewOptions; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\SheetViews; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Styles; use PhpOffice\PhpSpreadsheet\ReferenceHelper; use PhpOffice\PhpSpreadsheet\RichText\RichText; use PhpOffice\PhpSpreadsheet\Settings; @@ -20,11 +29,9 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Border; use PhpOffice\PhpSpreadsheet\Style\Borders; use PhpOffice\PhpSpreadsheet\Style\Color; -use PhpOffice\PhpSpreadsheet\Style\Conditional; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; use PhpOffice\PhpSpreadsheet\Style\Protection; use PhpOffice\PhpSpreadsheet\Style\Style; -use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use SimpleXMLElement; @@ -52,7 +59,7 @@ class Xlsx extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); $this->referenceHelper = ReferenceHelper::getInstance(); $this->securityScanner = XmlScanner::getInstance($this); } @@ -323,60 +330,6 @@ class Xlsx extends BaseReader return $contents; } - /** - * Set Worksheet column attributes by attributes array passed. - * - * @param Worksheet $docSheet - * @param string $column A, B, ... DX, ... - * @param array $columnAttributes array of attributes (indexes are attribute name, values are value) - * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'width', ... ? - */ - private function setColumnAttributes(Worksheet $docSheet, $column, array $columnAttributes) - { - if (isset($columnAttributes['xfIndex'])) { - $docSheet->getColumnDimension($column)->setXfIndex($columnAttributes['xfIndex']); - } - if (isset($columnAttributes['visible'])) { - $docSheet->getColumnDimension($column)->setVisible($columnAttributes['visible']); - } - if (isset($columnAttributes['collapsed'])) { - $docSheet->getColumnDimension($column)->setCollapsed($columnAttributes['collapsed']); - } - if (isset($columnAttributes['outlineLevel'])) { - $docSheet->getColumnDimension($column)->setOutlineLevel($columnAttributes['outlineLevel']); - } - if (isset($columnAttributes['width'])) { - $docSheet->getColumnDimension($column)->setWidth($columnAttributes['width']); - } - } - - /** - * Set Worksheet row attributes by attributes array passed. - * - * @param Worksheet $docSheet - * @param int $row 1, 2, 3, ... 99, ... - * @param array $rowAttributes array of attributes (indexes are attribute name, values are value) - * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'rowHeight', ... ? - */ - private function setRowAttributes(Worksheet $docSheet, $row, array $rowAttributes) - { - if (isset($rowAttributes['xfIndex'])) { - $docSheet->getRowDimension($row)->setXfIndex($rowAttributes['xfIndex']); - } - if (isset($rowAttributes['visible'])) { - $docSheet->getRowDimension($row)->setVisible($rowAttributes['visible']); - } - if (isset($rowAttributes['collapsed'])) { - $docSheet->getRowDimension($row)->setCollapsed($rowAttributes['collapsed']); - } - if (isset($rowAttributes['outlineLevel'])) { - $docSheet->getRowDimension($row)->setOutlineLevel($rowAttributes['outlineLevel']); - } - if (isset($rowAttributes['rowHeight'])) { - $docSheet->getRowDimension($row)->setRowHeight($rowAttributes['rowHeight']); - } - } - /** * Loads Spreadsheet from file. * @@ -456,70 +409,20 @@ class Xlsx extends BaseReader 'SimpleXMLElement', Settings::getLibXmlLoaderOptions() ); + + $propertyReader = new PropertyReader($this->securityScanner, $excel->getProperties()); foreach ($rels->Relationship as $rel) { switch ($rel['Type']) { case 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties': - $xmlCore = simplexml_load_string( - $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")), - 'SimpleXMLElement', - Settings::getLibXmlLoaderOptions() - ); - if (is_object($xmlCore)) { - $xmlCore->registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); - $xmlCore->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/'); - $xmlCore->registerXPathNamespace('cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); - $docProps = $excel->getProperties(); - $docProps->setCreator((string) self::getArrayItem($xmlCore->xpath('dc:creator'))); - $docProps->setLastModifiedBy((string) self::getArrayItem($xmlCore->xpath('cp:lastModifiedBy'))); - $docProps->setCreated(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:created')))); //! respect xsi:type - $docProps->setModified(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:modified')))); //! respect xsi:type - $docProps->setTitle((string) self::getArrayItem($xmlCore->xpath('dc:title'))); - $docProps->setDescription((string) self::getArrayItem($xmlCore->xpath('dc:description'))); - $docProps->setSubject((string) self::getArrayItem($xmlCore->xpath('dc:subject'))); - $docProps->setKeywords((string) self::getArrayItem($xmlCore->xpath('cp:keywords'))); - $docProps->setCategory((string) self::getArrayItem($xmlCore->xpath('cp:category'))); - } + $propertyReader->readCoreProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); break; case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties': - $xmlCore = simplexml_load_string( - $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")), - 'SimpleXMLElement', - Settings::getLibXmlLoaderOptions() - ); - if (is_object($xmlCore)) { - $docProps = $excel->getProperties(); - if (isset($xmlCore->Company)) { - $docProps->setCompany((string) $xmlCore->Company); - } - if (isset($xmlCore->Manager)) { - $docProps->setManager((string) $xmlCore->Manager); - } - } + $propertyReader->readExtendedProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); break; case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties': - $xmlCore = simplexml_load_string( - $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")), - 'SimpleXMLElement', - Settings::getLibXmlLoaderOptions() - ); - if (is_object($xmlCore)) { - $docProps = $excel->getProperties(); - /** @var SimpleXMLElement $xmlProperty */ - foreach ($xmlCore as $xmlProperty) { - $cellDataOfficeAttributes = $xmlProperty->attributes(); - if (isset($cellDataOfficeAttributes['name'])) { - $propertyName = (string) $cellDataOfficeAttributes['name']; - $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); - $attributeType = $cellDataOfficeChildren->getName(); - $attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; - $attributeValue = Properties::convertProperty($attributeValue, $attributeType); - $attributeType = Properties::convertPropertyType($attributeType); - $docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); - } - } - } + $propertyReader->readCustomProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); break; //Ribbon @@ -586,8 +489,7 @@ class Xlsx extends BaseReader } } } - $styles = []; - $cellStyles = []; + $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']")); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" $xmlStyles = simplexml_load_string( @@ -595,6 +497,9 @@ class Xlsx extends BaseReader 'SimpleXMLElement', Settings::getLibXmlLoaderOptions() ); + + $styles = []; + $cellStyles = []; $numFmts = null; if ($xmlStyles && $xmlStyles->numFmts[0]) { $numFmts = $xmlStyles->numFmts[0]; @@ -674,31 +579,10 @@ class Xlsx extends BaseReader } } - $dxfs = []; - if (!$this->readDataOnly && $xmlStyles) { - // Conditional Styles - if ($xmlStyles->dxfs) { - foreach ($xmlStyles->dxfs->dxf as $dxf) { - $style = new Style(false, true); - self::readStyle($style, $dxf); - $dxfs[] = $style; - } - } - // Cell Styles - if ($xmlStyles->cellStyles) { - foreach ($xmlStyles->cellStyles->cellStyle as $cellStyle) { - if ((int) ($cellStyle['builtinId']) == 0) { - if (isset($cellStyles[(int) ($cellStyle['xfId'])])) { - // Set default style - $style = new Style(); - self::readStyle($style, $cellStyles[(int) ($cellStyle['xfId'])]); - - // normal style, currently not using it for anything - } - } - } - } - } + $styleReader = new Styles($xmlStyles); + $styleReader->setStyleBaseData(self::$theme, $styles, $cellStyles); + $dxfs = $styleReader->dxfs($this->readDataOnly); + $styles = $styleReader->styles(); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" $xmlWorkbook = simplexml_load_string( @@ -765,134 +649,19 @@ class Xlsx extends BaseReader $docSheet->setSheetState((string) $eleSheet['state']); } - if (isset($xmlSheet->sheetViews, $xmlSheet->sheetViews->sheetView)) { - if (isset($xmlSheet->sheetViews->sheetView['zoomScale'])) { - $zoomScale = (int) ($xmlSheet->sheetViews->sheetView['zoomScale']); - if ($zoomScale <= 0) { - // setZoomScale will throw an Exception if the scale is less than or equals 0 - // that is OK when manually creating documents, but we should be able to read all documents - $zoomScale = 100; - } - - $docSheet->getSheetView()->setZoomScale($zoomScale); - } - if (isset($xmlSheet->sheetViews->sheetView['zoomScaleNormal'])) { - $zoomScaleNormal = (int) ($xmlSheet->sheetViews->sheetView['zoomScaleNormal']); - if ($zoomScaleNormal <= 0) { - // setZoomScaleNormal will throw an Exception if the scale is less than or equals 0 - // that is OK when manually creating documents, but we should be able to read all documents - $zoomScaleNormal = 100; - } - - $docSheet->getSheetView()->setZoomScaleNormal($zoomScaleNormal); - } - if (isset($xmlSheet->sheetViews->sheetView['view'])) { - $docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']); - } - if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) { - $docSheet->setShowGridLines(self::boolean((string) $xmlSheet->sheetViews->sheetView['showGridLines'])); - } - if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) { - $docSheet->setShowRowColHeaders(self::boolean((string) $xmlSheet->sheetViews->sheetView['showRowColHeaders'])); - } - if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) { - $docSheet->setRightToLeft(self::boolean((string) $xmlSheet->sheetViews->sheetView['rightToLeft'])); - } - if (isset($xmlSheet->sheetViews->sheetView->pane)) { - $xSplit = 0; - $ySplit = 0; - $topLeftCell = null; - - if (isset($xmlSheet->sheetViews->sheetView->pane['xSplit'])) { - $xSplit = (int) ($xmlSheet->sheetViews->sheetView->pane['xSplit']); - } - - if (isset($xmlSheet->sheetViews->sheetView->pane['ySplit'])) { - $ySplit = (int) ($xmlSheet->sheetViews->sheetView->pane['ySplit']); - } - - if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) { - $topLeftCell = (string) $xmlSheet->sheetViews->sheetView->pane['topLeftCell']; - } - - $docSheet->freezePane(Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1), $topLeftCell); + if ($xmlSheet) { + if (isset($xmlSheet->sheetViews, $xmlSheet->sheetViews->sheetView)) { + $sheetViews = new SheetViews($xmlSheet->sheetViews->sheetView, $docSheet); + $sheetViews->load(); } - if (isset($xmlSheet->sheetViews->sheetView->selection)) { - if (isset($xmlSheet->sheetViews->sheetView->selection['sqref'])) { - $sqref = (string) $xmlSheet->sheetViews->sheetView->selection['sqref']; - $sqref = explode(' ', $sqref); - $sqref = $sqref[0]; - $docSheet->setSelectedCells($sqref); - } - } + $sheetViewOptions = new SheetViewOptions($docSheet, $xmlSheet); + $sheetViewOptions->load($this->getReadDataOnly()); + + (new ColumnAndRowAttributes($docSheet, $xmlSheet)) + ->load($this->getReadFilter(), $this->getReadDataOnly()); } - if (isset($xmlSheet->sheetPr, $xmlSheet->sheetPr->tabColor)) { - if (isset($xmlSheet->sheetPr->tabColor['rgb'])) { - $docSheet->getTabColor()->setARGB((string) $xmlSheet->sheetPr->tabColor['rgb']); - } - } - if (isset($xmlSheet->sheetPr, $xmlSheet->sheetPr['codeName'])) { - $docSheet->setCodeName((string) $xmlSheet->sheetPr['codeName'], false); - } - if (isset($xmlSheet->sheetPr, $xmlSheet->sheetPr->outlinePr)) { - if (isset($xmlSheet->sheetPr->outlinePr['summaryRight']) && - !self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryRight'])) { - $docSheet->setShowSummaryRight(false); - } else { - $docSheet->setShowSummaryRight(true); - } - - if (isset($xmlSheet->sheetPr->outlinePr['summaryBelow']) && - !self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryBelow'])) { - $docSheet->setShowSummaryBelow(false); - } else { - $docSheet->setShowSummaryBelow(true); - } - } - - if (isset($xmlSheet->sheetPr, $xmlSheet->sheetPr->pageSetUpPr)) { - if (isset($xmlSheet->sheetPr->pageSetUpPr['fitToPage']) && - !self::boolean((string) $xmlSheet->sheetPr->pageSetUpPr['fitToPage'])) { - $docSheet->getPageSetup()->setFitToPage(false); - } else { - $docSheet->getPageSetup()->setFitToPage(true); - } - } - - if (isset($xmlSheet->sheetFormatPr)) { - if (isset($xmlSheet->sheetFormatPr['customHeight']) && - self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) && - isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) { - $docSheet->getDefaultRowDimension()->setRowHeight((float) $xmlSheet->sheetFormatPr['defaultRowHeight']); - } - if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) { - $docSheet->getDefaultColumnDimension()->setWidth((float) $xmlSheet->sheetFormatPr['defaultColWidth']); - } - if (isset($xmlSheet->sheetFormatPr['zeroHeight']) && - ((string) $xmlSheet->sheetFormatPr['zeroHeight'] == '1')) { - $docSheet->getDefaultRowDimension()->setZeroHeight(true); - } - } - - if (isset($xmlSheet->printOptions) && !$this->readDataOnly) { - if (self::boolean((string) $xmlSheet->printOptions['gridLinesSet'])) { - $docSheet->setShowGridlines(true); - } - if (self::boolean((string) $xmlSheet->printOptions['gridLines'])) { - $docSheet->setPrintGridlines(true); - } - if (self::boolean((string) $xmlSheet->printOptions['horizontalCentered'])) { - $docSheet->getPageSetup()->setHorizontalCentered(true); - } - if (self::boolean((string) $xmlSheet->printOptions['verticalCentered'])) { - $docSheet->getPageSetup()->setVerticalCentered(true); - } - } - - $this->readColumnsAndRowsAttributes($xmlSheet, $docSheet); - if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) { $cIndex = 1; // Cell Start from 1 foreach ($xmlSheet->sheetData->row as $row) { @@ -972,38 +741,39 @@ class Xlsx extends BaseReader break; } - // Check for numeric values - if (is_numeric($value) && $cellDataType != 's') { - if ($value == (int) $value) { - $value = (int) $value; - } elseif ($value == (float) $value) { - $value = (float) $value; - } elseif ($value == (float) $value) { - $value = (float) $value; + // read empty cells or the cells are not empty + if ($this->readEmptyCells || ($value !== null && $value !== '')) { + // Check for numeric values + if (is_numeric($value) && $cellDataType != 's') { + if ($value == (int) $value) { + $value = (int) $value; + } elseif ($value == (float) $value) { + $value = (float) $value; + } } - } - // Rich text? - if ($value instanceof RichText && $this->readDataOnly) { - $value = $value->getPlainText(); - } + // Rich text? + if ($value instanceof RichText && $this->readDataOnly) { + $value = $value->getPlainText(); + } - $cell = $docSheet->getCell($r); - // Assign value - if ($cellDataType != '') { - $cell->setValueExplicit($value, $cellDataType); - } else { - $cell->setValue($value); - } - if ($calculatedValue !== null) { - $cell->setCalculatedValue($calculatedValue); - } + $cell = $docSheet->getCell($r); + // Assign value + if ($cellDataType != '') { + $cell->setValueExplicit($value, $cellDataType); + } else { + $cell->setValue($value); + } + if ($calculatedValue !== null) { + $cell->setCalculatedValue($calculatedValue); + } - // Style information? - if ($c['s'] && !$this->readDataOnly) { - // no style index means 0, it seems - $cell->setXfIndex(isset($styles[(int) ($c['s'])]) ? - (int) ($c['s']) : 0); + // Style information? + if ($c['s'] && !$this->readDataOnly) { + // no style index means 0, it seems + $cell->setXfIndex(isset($styles[(int) ($c['s'])]) ? + (int) ($c['s']) : 0); + } } $rowIndex += 1; } @@ -1011,49 +781,8 @@ class Xlsx extends BaseReader } } - $conditionals = []; if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { - foreach ($xmlSheet->conditionalFormatting as $conditional) { - foreach ($conditional->cfRule as $cfRule) { - if (((string) $cfRule['type'] == Conditional::CONDITION_NONE || (string) $cfRule['type'] == Conditional::CONDITION_CELLIS || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT || (string) $cfRule['type'] == Conditional::CONDITION_EXPRESSION) && isset($dxfs[(int) ($cfRule['dxfId'])])) { - $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule; - } - } - } - - foreach ($conditionals as $ref => $cfRules) { - ksort($cfRules); - $conditionalStyles = []; - foreach ($cfRules as $cfRule) { - $objConditional = new Conditional(); - $objConditional->setConditionType((string) $cfRule['type']); - $objConditional->setOperatorType((string) $cfRule['operator']); - - if ((string) $cfRule['text'] != '') { - $objConditional->setText((string) $cfRule['text']); - } - - if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) { - $objConditional->setStopIfTrue(true); - } - - if (count($cfRule->formula) > 1) { - foreach ($cfRule->formula as $formula) { - $objConditional->addCondition((string) $formula); - } - } else { - $objConditional->addCondition((string) $cfRule->formula); - } - $objConditional->setStyle(clone $dxfs[(int) ($cfRule['dxfId'])]); - $conditionalStyles[] = $objConditional; - } - - // Extract all cell references in $ref - $cellBlocks = explode(' ', str_replace('$', '', strtoupper($ref))); - foreach ($cellBlocks as $cellBlock) { - $docSheet->getStyle($cellBlock)->setConditionalStyles($conditionalStyles); - } - } + (new ConditionalStyles($docSheet, $xmlSheet, $dxfs))->load(); } $aKeys = ['sheet', 'objects', 'scenarios', 'formatCells', 'formatColumns', 'formatRows', 'insertColumns', 'insertRows', 'insertHyperlinks', 'deleteColumns', 'deleteRows', 'selectLockedCells', 'sort', 'autoFilter', 'pivotTables', 'selectUnlockedCells']; @@ -1074,103 +803,7 @@ class Xlsx extends BaseReader } if ($xmlSheet && $xmlSheet->autoFilter && !$this->readDataOnly) { - $autoFilterRange = (string) $xmlSheet->autoFilter['ref']; - if (strpos($autoFilterRange, ':') !== false) { - $autoFilter = $docSheet->getAutoFilter(); - $autoFilter->setRange($autoFilterRange); - - foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) { - $column = $autoFilter->getColumnByOffset((int) $filterColumn['colId']); - // Check for standard filters - if ($filterColumn->filters) { - $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER); - $filters = $filterColumn->filters; - if ((isset($filters['blank'])) && ($filters['blank'] == 1)) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule(null, '')->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_FILTER); - } - // Standard filters are always an OR join, so no join rule needs to be set - // Entries can be either filter elements - foreach ($filters->filter as $filterRule) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_FILTER); - } - // Or Date Group elements - foreach ($filters->dateGroupItem as $dateGroupItem) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule( - null, - [ - 'year' => (string) $dateGroupItem['year'], - 'month' => (string) $dateGroupItem['month'], - 'day' => (string) $dateGroupItem['day'], - 'hour' => (string) $dateGroupItem['hour'], - 'minute' => (string) $dateGroupItem['minute'], - 'second' => (string) $dateGroupItem['second'], - ], - (string) $dateGroupItem['dateTimeGrouping'] - ) - ->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP); - } - } - // Check for custom filters - if ($filterColumn->customFilters) { - $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER); - $customFilters = $filterColumn->customFilters; - // Custom filters can an AND or an OR join; - // and there should only ever be one or two entries - if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) { - $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND); - } - foreach ($customFilters->customFilter as $filterRule) { - $column->createRule()->setRule( - (string) $filterRule['operator'], - (string) $filterRule['val'] - ) - ->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); - } - } - // Check for dynamic filters - if ($filterColumn->dynamicFilter) { - $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); - // We should only ever have one dynamic filter - foreach ($filterColumn->dynamicFilter as $filterRule) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule( - null, - (string) $filterRule['val'], - (string) $filterRule['type'] - ) - ->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); - if (isset($filterRule['val'])) { - $column->setAttribute('val', (string) $filterRule['val']); - } - if (isset($filterRule['maxVal'])) { - $column->setAttribute('maxVal', (string) $filterRule['maxVal']); - } - } - } - // Check for dynamic filters - if ($filterColumn->top10) { - $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER); - // We should only ever have one top10 filter - foreach ($filterColumn->top10 as $filterRule) { - $column->createRule()->setRule( - (((isset($filterRule['percent'])) && ($filterRule['percent'] == 1)) - ? Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT - : Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE - ), - (string) $filterRule['val'], - (((isset($filterRule['top'])) && ($filterRule['top'] == 1)) - ? Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP - : Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM - ) - ) - ->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_TOPTENFILTER); - } - } - } - } + (new AutoFilter($docSheet, $xmlSheet))->load(); } if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->readDataOnly) { @@ -1182,124 +815,12 @@ class Xlsx extends BaseReader } } - if ($xmlSheet && $xmlSheet->pageMargins && !$this->readDataOnly) { - $docPageMargins = $docSheet->getPageMargins(); - $docPageMargins->setLeft((float) ($xmlSheet->pageMargins['left'])); - $docPageMargins->setRight((float) ($xmlSheet->pageMargins['right'])); - $docPageMargins->setTop((float) ($xmlSheet->pageMargins['top'])); - $docPageMargins->setBottom((float) ($xmlSheet->pageMargins['bottom'])); - $docPageMargins->setHeader((float) ($xmlSheet->pageMargins['header'])); - $docPageMargins->setFooter((float) ($xmlSheet->pageMargins['footer'])); - } - - if ($xmlSheet && $xmlSheet->pageSetup && !$this->readDataOnly) { - $docPageSetup = $docSheet->getPageSetup(); - - if (isset($xmlSheet->pageSetup['orientation'])) { - $docPageSetup->setOrientation((string) $xmlSheet->pageSetup['orientation']); - } - if (isset($xmlSheet->pageSetup['paperSize'])) { - $docPageSetup->setPaperSize((int) ($xmlSheet->pageSetup['paperSize'])); - } - if (isset($xmlSheet->pageSetup['scale'])) { - $docPageSetup->setScale((int) ($xmlSheet->pageSetup['scale']), false); - } - if (isset($xmlSheet->pageSetup['fitToHeight']) && (int) ($xmlSheet->pageSetup['fitToHeight']) >= 0) { - $docPageSetup->setFitToHeight((int) ($xmlSheet->pageSetup['fitToHeight']), false); - } - if (isset($xmlSheet->pageSetup['fitToWidth']) && (int) ($xmlSheet->pageSetup['fitToWidth']) >= 0) { - $docPageSetup->setFitToWidth((int) ($xmlSheet->pageSetup['fitToWidth']), false); - } - if (isset($xmlSheet->pageSetup['firstPageNumber'], $xmlSheet->pageSetup['useFirstPageNumber']) && - self::boolean((string) $xmlSheet->pageSetup['useFirstPageNumber'])) { - $docPageSetup->setFirstPageNumber((int) ($xmlSheet->pageSetup['firstPageNumber'])); - } - - $relAttributes = $xmlSheet->pageSetup->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - if (isset($relAttributes['id'])) { - $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['pageSetupRelId'] = (string) $relAttributes['id']; - } - } - - if ($xmlSheet && $xmlSheet->headerFooter && !$this->readDataOnly) { - $docHeaderFooter = $docSheet->getHeaderFooter(); - - if (isset($xmlSheet->headerFooter['differentOddEven']) && - self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])) { - $docHeaderFooter->setDifferentOddEven(true); - } else { - $docHeaderFooter->setDifferentOddEven(false); - } - if (isset($xmlSheet->headerFooter['differentFirst']) && - self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) { - $docHeaderFooter->setDifferentFirst(true); - } else { - $docHeaderFooter->setDifferentFirst(false); - } - if (isset($xmlSheet->headerFooter['scaleWithDoc']) && - !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) { - $docHeaderFooter->setScaleWithDocument(false); - } else { - $docHeaderFooter->setScaleWithDocument(true); - } - if (isset($xmlSheet->headerFooter['alignWithMargins']) && - !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) { - $docHeaderFooter->setAlignWithMargins(false); - } else { - $docHeaderFooter->setAlignWithMargins(true); - } - - $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader); - $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter); - $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader); - $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter); - $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader); - $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter); - } - - if ($xmlSheet && $xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk && !$this->readDataOnly) { - foreach ($xmlSheet->rowBreaks->brk as $brk) { - if ($brk['man']) { - $docSheet->setBreak("A$brk[id]", Worksheet::BREAK_ROW); - } - } - } - if ($xmlSheet && $xmlSheet->colBreaks && $xmlSheet->colBreaks->brk && !$this->readDataOnly) { - foreach ($xmlSheet->colBreaks->brk as $brk) { - if ($brk['man']) { - $docSheet->setBreak(Coordinate::stringFromColumnIndex((string) $brk['id'] + 1) . '1', Worksheet::BREAK_COLUMN); - } - } + if ($xmlSheet && !$this->readDataOnly) { + $unparsedLoadedData = (new PageSetup($docSheet, $xmlSheet))->load($unparsedLoadedData); } if ($xmlSheet && $xmlSheet->dataValidations && !$this->readDataOnly) { - foreach ($xmlSheet->dataValidations->dataValidation as $dataValidation) { - // Uppercase coordinate - $range = strtoupper($dataValidation['sqref']); - $rangeSet = explode(' ', $range); - foreach ($rangeSet as $range) { - $stRange = $docSheet->shrinkRangeToFit($range); - - // Extract all cell references in $range - foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $reference) { - // Create validation - $docValidation = $docSheet->getCell($reference)->getDataValidation(); - $docValidation->setType((string) $dataValidation['type']); - $docValidation->setErrorStyle((string) $dataValidation['errorStyle']); - $docValidation->setOperator((string) $dataValidation['operator']); - $docValidation->setAllowBlank($dataValidation['allowBlank'] != 0); - $docValidation->setShowDropDown($dataValidation['showDropDown'] == 0); - $docValidation->setShowInputMessage($dataValidation['showInputMessage'] != 0); - $docValidation->setShowErrorMessage($dataValidation['showErrorMessage'] != 0); - $docValidation->setErrorTitle((string) $dataValidation['errorTitle']); - $docValidation->setError((string) $dataValidation['error']); - $docValidation->setPromptTitle((string) $dataValidation['promptTitle']); - $docValidation->setPrompt((string) $dataValidation['prompt']); - $docValidation->setFormula1((string) $dataValidation->formula1); - $docValidation->setFormula2((string) $dataValidation->formula2); - } - } - } + (new DataValidations($docSheet, $xmlSheet))->load(); } // unparsed sheet AlternateContent @@ -1313,50 +834,25 @@ class Xlsx extends BaseReader } // Add hyperlinks - $hyperlinks = []; if (!$this->readDataOnly) { + $hyperlinkReader = new Hyperlinks($docSheet); // Locate hyperlink relations - if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + $relationsFileName = dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels'; + if ($zip->locateName($relationsFileName)) { //~ http://schemas.openxmlformats.org/package/2006/relationships" $relsWorksheet = simplexml_load_string( $this->securityScanner->scan( - $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + $this->getFromZipArchive($zip, $relationsFileName) ), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions() ); - foreach ($relsWorksheet->Relationship as $ele) { - if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { - $hyperlinks[(string) $ele['Id']] = (string) $ele['Target']; - } - } + $hyperlinkReader->readHyperlinks($relsWorksheet); } // Loop through hyperlinks if ($xmlSheet && $xmlSheet->hyperlinks) { - /** @var SimpleXMLElement $hyperlink */ - foreach ($xmlSheet->hyperlinks->hyperlink as $hyperlink) { - // Link url - $linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - - foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { - $cell = $docSheet->getCell($cellReference); - if (isset($linkRel['id'])) { - $hyperlinkUrl = $hyperlinks[(string) $linkRel['id']]; - if (isset($hyperlink['location'])) { - $hyperlinkUrl .= '#' . (string) $hyperlink['location']; - } - $cell->getHyperlink()->setUrl($hyperlinkUrl); - } elseif (isset($hyperlink['location'])) { - $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']); - } - - // Tooltip - if (isset($hyperlink['tooltip'])) { - $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']); - } - } - } + $hyperlinkReader->setHyperlinks($xmlSheet->hyperlinks); } } @@ -1418,12 +914,18 @@ class Xlsx extends BaseReader foreach ($vmlComments as $relName => $relPath) { // Load VML comments file $relPath = File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath); - $vmlCommentsFile = simplexml_load_string( - $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), - 'SimpleXMLElement', - Settings::getLibXmlLoaderOptions() - ); - $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + + try { + $vmlCommentsFile = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + } catch (\Throwable $ex) { + //Ignore unparsable vmlDrawings. Later they will be moved from $unparsedVmlDrawings to $unparsedLoadedData + continue; + } $shapes = $vmlCommentsFile->xpath('//v:shape'); foreach ($shapes as $shape) { @@ -1597,8 +1099,10 @@ class Xlsx extends BaseReader } } if ($xmlSheet->drawing && !$this->readDataOnly) { + $unparsedDrawings = []; foreach ($xmlSheet->drawing as $drawing) { - $fileDrawing = $drawings[(string) self::getArrayItem($drawing->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id')]; + $drawingRelId = (string) self::getArrayItem($drawing->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id'); + $fileDrawing = $drawings[$drawingRelId]; //~ http://schemas.openxmlformats.org/package/2006/relationships" $relsDrawing = simplexml_load_string( $this->securityScanner->scan( @@ -1630,10 +1134,11 @@ class Xlsx extends BaseReader $this->securityScanner->scan($this->getFromZipArchive($zip, $fileDrawing)), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions() - )->children('http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + ); + $xmlDrawingChildren = $xmlDrawing->children('http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); - if ($xmlDrawing->oneCellAnchor) { - foreach ($xmlDrawing->oneCellAnchor as $oneCellAnchor) { + if ($xmlDrawingChildren->oneCellAnchor) { + foreach ($xmlDrawingChildren->oneCellAnchor as $oneCellAnchor) { if ($oneCellAnchor->pic->blipFill) { /** @var SimpleXMLElement $blip */ $blip = $oneCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; @@ -1667,12 +1172,13 @@ class Xlsx extends BaseReader if ($outerShdw) { $shadow = $objDrawing->getShadow(); $shadow->setVisible(true); - $shadow->setBlurRadius(Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); - $shadow->setDistance(Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); - $shadow->getColor()->setRGB(self::getArrayItem($outerShdw->srgbClr->attributes(), 'val')); - $shadow->setAlpha(self::getArrayItem($outerShdw->srgbClr->alpha->attributes(), 'val') / 1000); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); } $this->readHyperLinkDrawing($objDrawing, $oneCellAnchor, $hyperlinks); @@ -1688,8 +1194,8 @@ class Xlsx extends BaseReader } } } - if ($xmlDrawing->twoCellAnchor) { - foreach ($xmlDrawing->twoCellAnchor as $twoCellAnchor) { + if ($xmlDrawingChildren->twoCellAnchor) { + foreach ($xmlDrawingChildren->twoCellAnchor as $twoCellAnchor) { if ($twoCellAnchor->pic->blipFill) { $blip = $twoCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; $xfrm = $twoCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->xfrm; @@ -1719,12 +1225,13 @@ class Xlsx extends BaseReader if ($outerShdw) { $shadow = $objDrawing->getShadow(); $shadow->setVisible(true); - $shadow->setBlurRadius(Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); - $shadow->setDistance(Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); - $shadow->getColor()->setRGB(self::getArrayItem($outerShdw->srgbClr->attributes(), 'val')); - $shadow->setAlpha(self::getArrayItem($outerShdw->srgbClr->alpha->attributes(), 'val') / 1000); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); } $this->readHyperLinkDrawing($objDrawing, $twoCellAnchor, $hyperlinks); @@ -1754,13 +1261,21 @@ class Xlsx extends BaseReader } } } + if ($relsDrawing === false && $xmlDrawing->count() == 0) { + // Save Drawing without rels and children as unparsed + $unparsedDrawings[$drawingRelId] = $xmlDrawing->asXML(); + } } // store original rId of drawing files $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'] = []; foreach ($relsWorksheet->Relationship as $ele) { if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing') { - $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'][(string) $ele['Target']] = (string) $ele['Id']; + $drawingRelId = (string) $ele['Id']; + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'][(string) $ele['Target']] = $drawingRelId; + if (isset($unparsedDrawings[$drawingRelId])) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['Drawings'][$drawingRelId] = $unparsedDrawings[$drawingRelId]; + } } } @@ -1905,7 +1420,7 @@ class Xlsx extends BaseReader if (strpos((string) $definedName, '!') !== false) { // Extract sheet name $extractedSheetName = Worksheet::extractSheetTitle((string) $definedName, true); - $extractedSheetName = $extractedSheetName[0]; + $extractedSheetName = trim($extractedSheetName[0], "'"); // Locate sheet $locatedSheet = $excel->getSheetByName($extractedSheetName); @@ -2511,94 +2026,4 @@ class Xlsx extends BaseReader return (bool) $xsdBoolean; } - - /** - * Read columns and rows attributes from XML and set them on the worksheet. - * - * @param SimpleXMLElement $xmlSheet - * @param Worksheet $docSheet - */ - private function readColumnsAndRowsAttributes(SimpleXMLElement $xmlSheet, Worksheet $docSheet) - { - $columnsAttributes = []; - $rowsAttributes = []; - if (isset($xmlSheet->cols) && !$this->readDataOnly) { - foreach ($xmlSheet->cols->col as $col) { - for ($i = (int) ($col['min']); $i <= (int) ($col['max']); ++$i) { - if ($col['style'] && !$this->readDataOnly) { - $columnsAttributes[Coordinate::stringFromColumnIndex($i)]['xfIndex'] = (int) $col['style']; - } - if (self::boolean($col['hidden'])) { - $columnsAttributes[Coordinate::stringFromColumnIndex($i)]['visible'] = false; - } - if (self::boolean($col['collapsed'])) { - $columnsAttributes[Coordinate::stringFromColumnIndex($i)]['collapsed'] = true; - } - if ($col['outlineLevel'] > 0) { - $columnsAttributes[Coordinate::stringFromColumnIndex($i)]['outlineLevel'] = (int) $col['outlineLevel']; - } - $columnsAttributes[Coordinate::stringFromColumnIndex($i)]['width'] = (float) $col['width']; - - if ((int) ($col['max']) == 16384) { - break; - } - } - } - } - - if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) { - foreach ($xmlSheet->sheetData->row as $row) { - if ($row['ht'] && !$this->readDataOnly) { - $rowsAttributes[(int) $row['r']]['rowHeight'] = (float) $row['ht']; - } - if (self::boolean($row['hidden']) && !$this->readDataOnly) { - $rowsAttributes[(int) $row['r']]['visible'] = false; - } - if (self::boolean($row['collapsed'])) { - $rowsAttributes[(int) $row['r']]['collapsed'] = true; - } - if ($row['outlineLevel'] > 0) { - $rowsAttributes[(int) $row['r']]['outlineLevel'] = (int) $row['outlineLevel']; - } - if ($row['s'] && !$this->readDataOnly) { - $rowsAttributes[(int) $row['r']]['xfIndex'] = (int) $row['s']; - } - } - } - - $readFilter = (\get_class($this->getReadFilter()) !== DefaultReadFilter::class ? $this->getReadFilter() : null); - - // set columns/rows attributes - $columnsAttributesSet = []; - $rowsAttributesSet = []; - foreach ($columnsAttributes as $coordColumn => $columnAttributes) { - if ($readFilter !== null) { - foreach ($rowsAttributes as $coordRow => $rowAttributes) { - if (!$readFilter->readCell($coordColumn, $coordRow, $docSheet->getTitle())) { - continue 2; - } - } - } - - if (!isset($columnsAttributesSet[$coordColumn])) { - $this->setColumnAttributes($docSheet, $coordColumn, $columnAttributes); - $columnsAttributesSet[$coordColumn] = true; - } - } - - foreach ($rowsAttributes as $coordRow => $rowAttributes) { - if ($readFilter !== null) { - foreach ($columnsAttributes as $coordColumn => $columnAttributes) { - if (!$readFilter->readCell($coordColumn, $coordRow, $docSheet->getTitle())) { - continue 2; - } - } - } - - if (!isset($rowsAttributesSet[$coordRow])) { - $this->setRowAttributes($docSheet, $coordRow, $rowAttributes); - $rowsAttributesSet[$coordRow] = true; - } - } - } } diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php new file mode 100644 index 00000000000..6929758dfe9 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php @@ -0,0 +1,144 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; +use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class AutoFilter +{ + private $worksheet; + + private $worksheetXml; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load() + { + $autoFilterRange = (string) $this->worksheetXml->autoFilter['ref']; + if (strpos($autoFilterRange, ':') !== false) { + $this->readAutoFilter($autoFilterRange, $this->worksheetXml); + } + } + + private function readAutoFilter($autoFilterRange, $xmlSheet) + { + $autoFilter = $this->worksheet->getAutoFilter(); + $autoFilter->setRange($autoFilterRange); + + foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) { + $column = $autoFilter->getColumnByOffset((int) $filterColumn['colId']); + // Check for standard filters + if ($filterColumn->filters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER); + $filters = $filterColumn->filters; + if ((isset($filters['blank'])) && ($filters['blank'] == 1)) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, '')->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + // Standard filters are always an OR join, so no join rule needs to be set + // Entries can be either filter elements + foreach ($filters->filter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + + // Or Date Group elements + $this->readDateRangeAutoFilter($filters, $column); + } + + // Check for custom filters + $this->readCustomAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readDynamicAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readTopTenAutoFilter($filterColumn, $column); + } + } + + private function readDateRangeAutoFilter(\SimpleXMLElement $filters, Column $column) + { + foreach ($filters->dateGroupItem as $dateGroupItem) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + [ + 'year' => (string) $dateGroupItem['year'], + 'month' => (string) $dateGroupItem['month'], + 'day' => (string) $dateGroupItem['day'], + 'hour' => (string) $dateGroupItem['hour'], + 'minute' => (string) $dateGroupItem['minute'], + 'second' => (string) $dateGroupItem['second'], + ], + (string) $dateGroupItem['dateTimeGrouping'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP); + } + } + + private function readCustomAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->customFilters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER); + $customFilters = $filterColumn->customFilters; + // Custom filters can an AND or an OR join; + // and there should only ever be one or two entries + if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) { + $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND); + } + foreach ($customFilters->customFilter as $filterRule) { + $column->createRule()->setRule( + (string) $filterRule['operator'], + (string) $filterRule['val'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); + } + } + } + + private function readDynamicAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->dynamicFilter) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); + // We should only ever have one dynamic filter + foreach ($filterColumn->dynamicFilter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + (string) $filterRule['val'], + (string) $filterRule['type'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); + if (isset($filterRule['val'])) { + $column->setAttribute('val', (string) $filterRule['val']); + } + if (isset($filterRule['maxVal'])) { + $column->setAttribute('maxVal', (string) $filterRule['maxVal']); + } + } + } + } + + private function readTopTenAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->top10) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER); + // We should only ever have one top10 filter + foreach ($filterColumn->top10 as $filterRule) { + $column->createRule()->setRule( + (((isset($filterRule['percent'])) && ($filterRule['percent'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE + ), + (string) $filterRule['val'], + (((isset($filterRule['top'])) && ($filterRule['top'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM + ) + )->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER); + } + } + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php new file mode 100644 index 00000000000..1679f01f9f1 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php @@ -0,0 +1,19 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +class BaseParserClass +{ + protected static function boolean($value) + { + if (is_object($value)) { + $value = (string) $value; + } + + if (is_numeric($value)) { + return (bool) $value; + } + + return $value === strtolower('true'); + } +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx/Chart.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx/Chart.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php new file mode 100644 index 00000000000..e901d99048e --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php @@ -0,0 +1,204 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Reader\IReadFilter; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class ColumnAndRowAttributes extends BaseParserClass +{ + private $worksheet; + + private $worksheetXml; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml = null) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * Set Worksheet column attributes by attributes array passed. + * + * @param string $columnAddress A, B, ... DX, ... + * @param array $columnAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'width', ... ? + */ + private function setColumnAttributes($columnAddress, array $columnAttributes) + { + if (isset($columnAttributes['xfIndex'])) { + $this->worksheet->getColumnDimension($columnAddress)->setXfIndex($columnAttributes['xfIndex']); + } + if (isset($columnAttributes['visible'])) { + $this->worksheet->getColumnDimension($columnAddress)->setVisible($columnAttributes['visible']); + } + if (isset($columnAttributes['collapsed'])) { + $this->worksheet->getColumnDimension($columnAddress)->setCollapsed($columnAttributes['collapsed']); + } + if (isset($columnAttributes['outlineLevel'])) { + $this->worksheet->getColumnDimension($columnAddress)->setOutlineLevel($columnAttributes['outlineLevel']); + } + if (isset($columnAttributes['width'])) { + $this->worksheet->getColumnDimension($columnAddress)->setWidth($columnAttributes['width']); + } + } + + /** + * Set Worksheet row attributes by attributes array passed. + * + * @param int $rowNumber 1, 2, 3, ... 99, ... + * @param array $rowAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'rowHeight', ... ? + */ + private function setRowAttributes($rowNumber, array $rowAttributes) + { + if (isset($rowAttributes['xfIndex'])) { + $this->worksheet->getRowDimension($rowNumber)->setXfIndex($rowAttributes['xfIndex']); + } + if (isset($rowAttributes['visible'])) { + $this->worksheet->getRowDimension($rowNumber)->setVisible($rowAttributes['visible']); + } + if (isset($rowAttributes['collapsed'])) { + $this->worksheet->getRowDimension($rowNumber)->setCollapsed($rowAttributes['collapsed']); + } + if (isset($rowAttributes['outlineLevel'])) { + $this->worksheet->getRowDimension($rowNumber)->setOutlineLevel($rowAttributes['outlineLevel']); + } + if (isset($rowAttributes['rowHeight'])) { + $this->worksheet->getRowDimension($rowNumber)->setRowHeight($rowAttributes['rowHeight']); + } + } + + /** + * @param IReadFilter $readFilter + * @param bool $readDataOnly + */ + public function load(IReadFilter $readFilter = null, $readDataOnly = false) + { + if ($this->worksheetXml === null) { + return; + } + + $columnsAttributes = []; + $rowsAttributes = []; + if (isset($this->worksheetXml->cols)) { + $columnsAttributes = $this->readColumnAttributes($this->worksheetXml->cols, $readDataOnly); + } + + if ($this->worksheetXml->sheetData && $this->worksheetXml->sheetData->row) { + $rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly); + } + + // set columns/rows attributes + $columnsAttributesAreSet = []; + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if ($readFilter === null || + !$this->isFilteredColumn($readFilter, $columnCoordinate, $rowsAttributes)) { + if (!isset($columnsAttributesAreSet[$columnCoordinate])) { + $this->setColumnAttributes($columnCoordinate, $columnAttributes); + $columnsAttributesAreSet[$columnCoordinate] = true; + } + } + } + + $rowsAttributesAreSet = []; + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if ($readFilter === null || + !$this->isFilteredRow($readFilter, $rowCoordinate, $columnsAttributes)) { + if (!isset($rowsAttributesAreSet[$rowCoordinate])) { + $this->setRowAttributes($rowCoordinate, $rowAttributes); + $rowsAttributesAreSet[$rowCoordinate] = true; + } + } + } + } + + private function isFilteredColumn(IReadFilter $readFilter, $columnCoordinate, array $rowsAttributes) + { + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readColumnAttributes(\SimpleXMLElement $worksheetCols, $readDataOnly) + { + $columnAttributes = []; + + foreach ($worksheetCols->col as $column) { + $startColumn = Coordinate::stringFromColumnIndex((int) $column['min']); + $endColumn = Coordinate::stringFromColumnIndex((int) $column['max']); + ++$endColumn; + for ($columnAddress = $startColumn; $columnAddress !== $endColumn; ++$columnAddress) { + $columnAttributes[$columnAddress] = $this->readColumnRangeAttributes($column, $readDataOnly); + + if ((int) ($column['max']) == 16384) { + break; + } + } + } + + return $columnAttributes; + } + + private function readColumnRangeAttributes(\SimpleXMLElement $column, $readDataOnly) + { + $columnAttributes = []; + + if ($column['style'] && !$readDataOnly) { + $columnAttributes['xfIndex'] = (int) $column['style']; + } + if (self::boolean($column['hidden'])) { + $columnAttributes['visible'] = false; + } + if (self::boolean($column['collapsed'])) { + $columnAttributes['collapsed'] = true; + } + if (((int) $column['outlineLevel']) > 0) { + $columnAttributes['outlineLevel'] = (int) $column['outlineLevel']; + } + $columnAttributes['width'] = (float) $column['width']; + + return $columnAttributes; + } + + private function isFilteredRow(IReadFilter $readFilter, $rowCoordinate, array $columnsAttributes) + { + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readRowAttributes(\SimpleXMLElement $worksheetRow, $readDataOnly) + { + $rowAttributes = []; + + foreach ($worksheetRow as $row) { + if ($row['ht'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['rowHeight'] = (float) $row['ht']; + } + if (self::boolean($row['hidden'])) { + $rowAttributes[(int) $row['r']]['visible'] = false; + } + if (self::boolean($row['collapsed'])) { + $rowAttributes[(int) $row['r']]['collapsed'] = true; + } + if ((int) $row['outlineLevel'] > 0) { + $rowAttributes[(int) $row['r']]['outlineLevel'] = (int) $row['outlineLevel']; + } + if ($row['s'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['xfIndex'] = (int) $row['s']; + } + } + + return $rowAttributes; + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php new file mode 100644 index 00000000000..b3de5d1cde6 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php @@ -0,0 +1,92 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Style\Conditional; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class ConditionalStyles +{ + private $worksheet; + + private $worksheetXml; + + private $dxfs; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml, array $dxfs = []) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + $this->dxfs = $dxfs; + } + + public function load() + { + $this->setConditionalStyles( + $this->worksheet, + $this->readConditionalStyles($this->worksheetXml) + ); + } + + private function readConditionalStyles($xmlSheet) + { + $conditionals = []; + foreach ($xmlSheet->conditionalFormatting as $conditional) { + foreach ($conditional->cfRule as $cfRule) { + if (((string) $cfRule['type'] == Conditional::CONDITION_NONE + || (string) $cfRule['type'] == Conditional::CONDITION_CELLIS + || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT + || (string) $cfRule['type'] == Conditional::CONDITION_EXPRESSION) + && isset($this->dxfs[(int) ($cfRule['dxfId'])])) { + $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule; + } + } + } + + return $conditionals; + } + + private function setConditionalStyles(Worksheet $worksheet, array $conditionals) + { + foreach ($conditionals as $ref => $cfRules) { + ksort($cfRules); + $conditionalStyles = $this->readStyleRules($cfRules); + + // Extract all cell references in $ref + $cellBlocks = explode(' ', str_replace('$', '', strtoupper($ref))); + foreach ($cellBlocks as $cellBlock) { + $worksheet->getStyle($cellBlock)->setConditionalStyles($conditionalStyles); + } + } + } + + private function readStyleRules($cfRules) + { + $conditionalStyles = []; + foreach ($cfRules as $cfRule) { + $objConditional = new Conditional(); + $objConditional->setConditionType((string) $cfRule['type']); + $objConditional->setOperatorType((string) $cfRule['operator']); + + if ((string) $cfRule['text'] != '') { + $objConditional->setText((string) $cfRule['text']); + } + + if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) { + $objConditional->setStopIfTrue(true); + } + + if (count($cfRule->formula) > 1) { + foreach ($cfRule->formula as $formula) { + $objConditional->addCondition((string) $formula); + } + } else { + $objConditional->addCondition((string) $cfRule->formula); + } + $objConditional->setStyle(clone $this->dxfs[(int) ($cfRule['dxfId'])]); + $conditionalStyles[] = $objConditional; + } + + return $conditionalStyles; + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php new file mode 100644 index 00000000000..4bb44129208 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php @@ -0,0 +1,50 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class DataValidations +{ + private $worksheet; + + private $worksheetXml; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load() + { + foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) { + // Uppercase coordinate + $range = strtoupper($dataValidation['sqref']); + $rangeSet = explode(' ', $range); + foreach ($rangeSet as $range) { + $stRange = $this->worksheet->shrinkRangeToFit($range); + + // Extract all cell references in $range + foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $reference) { + // Create validation + $docValidation = $this->worksheet->getCell($reference)->getDataValidation(); + $docValidation->setType((string) $dataValidation['type']); + $docValidation->setErrorStyle((string) $dataValidation['errorStyle']); + $docValidation->setOperator((string) $dataValidation['operator']); + $docValidation->setAllowBlank($dataValidation['allowBlank'] != 0); + $docValidation->setShowDropDown($dataValidation['showDropDown'] == 0); + $docValidation->setShowInputMessage($dataValidation['showInputMessage'] != 0); + $docValidation->setShowErrorMessage($dataValidation['showErrorMessage'] != 0); + $docValidation->setErrorTitle((string) $dataValidation['errorTitle']); + $docValidation->setError((string) $dataValidation['error']); + $docValidation->setPromptTitle((string) $dataValidation['promptTitle']); + $docValidation->setPrompt((string) $dataValidation['prompt']); + $docValidation->setFormula1((string) $dataValidation->formula1); + $docValidation->setFormula2((string) $dataValidation->formula2); + } + } + } + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php new file mode 100644 index 00000000000..400b272528c --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php @@ -0,0 +1,58 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class Hyperlinks +{ + private $worksheet; + + private $hyperlinks = []; + + public function __construct(Worksheet $workSheet) + { + $this->worksheet = $workSheet; + } + + public function readHyperlinks(\SimpleXMLElement $relsWorksheet) + { + foreach ($relsWorksheet->Relationship as $element) { + if ($element['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { + $this->hyperlinks[(string) $element['Id']] = (string) $element['Target']; + } + } + } + + public function setHyperlinks(\SimpleXMLElement $worksheetXml) + { + foreach ($worksheetXml->hyperlink as $hyperlink) { + $this->setHyperlink($hyperlink, $this->worksheet); + } + } + + private function setHyperlink(\SimpleXMLElement $hyperlink, Worksheet $worksheet) + { + // Link url + $linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { + $cell = $worksheet->getCell($cellReference); + if (isset($linkRel['id'])) { + $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']]; + if (isset($hyperlink['location'])) { + $hyperlinkUrl .= '#' . (string) $hyperlink['location']; + } + $cell->getHyperlink()->setUrl($hyperlinkUrl); + } elseif (isset($hyperlink['location'])) { + $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']); + } + + // Tooltip + if (isset($hyperlink['tooltip'])) { + $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']); + } + } + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php new file mode 100644 index 00000000000..6f286769c0e --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php @@ -0,0 +1,150 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class PageSetup extends BaseParserClass +{ + private $worksheet; + + private $worksheetXml; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml = null) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load(array $unparsedLoadedData) + { + if (!$this->worksheetXml) { + return $unparsedLoadedData; + } + + $this->margins($this->worksheetXml, $this->worksheet); + $unparsedLoadedData = $this->pageSetup($this->worksheetXml, $this->worksheet, $unparsedLoadedData); + $this->headerFooter($this->worksheetXml, $this->worksheet); + $this->pageBreaks($this->worksheetXml, $this->worksheet); + + return $unparsedLoadedData; + } + + private function margins(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->pageMargins) { + $docPageMargins = $worksheet->getPageMargins(); + $docPageMargins->setLeft((float) ($xmlSheet->pageMargins['left'])); + $docPageMargins->setRight((float) ($xmlSheet->pageMargins['right'])); + $docPageMargins->setTop((float) ($xmlSheet->pageMargins['top'])); + $docPageMargins->setBottom((float) ($xmlSheet->pageMargins['bottom'])); + $docPageMargins->setHeader((float) ($xmlSheet->pageMargins['header'])); + $docPageMargins->setFooter((float) ($xmlSheet->pageMargins['footer'])); + } + } + + private function pageSetup(\SimpleXMLElement $xmlSheet, Worksheet $worksheet, array $unparsedLoadedData) + { + if ($xmlSheet->pageSetup) { + $docPageSetup = $worksheet->getPageSetup(); + + if (isset($xmlSheet->pageSetup['orientation'])) { + $docPageSetup->setOrientation((string) $xmlSheet->pageSetup['orientation']); + } + if (isset($xmlSheet->pageSetup['paperSize'])) { + $docPageSetup->setPaperSize((int) ($xmlSheet->pageSetup['paperSize'])); + } + if (isset($xmlSheet->pageSetup['scale'])) { + $docPageSetup->setScale((int) ($xmlSheet->pageSetup['scale']), false); + } + if (isset($xmlSheet->pageSetup['fitToHeight']) && (int) ($xmlSheet->pageSetup['fitToHeight']) >= 0) { + $docPageSetup->setFitToHeight((int) ($xmlSheet->pageSetup['fitToHeight']), false); + } + if (isset($xmlSheet->pageSetup['fitToWidth']) && (int) ($xmlSheet->pageSetup['fitToWidth']) >= 0) { + $docPageSetup->setFitToWidth((int) ($xmlSheet->pageSetup['fitToWidth']), false); + } + if (isset($xmlSheet->pageSetup['firstPageNumber'], $xmlSheet->pageSetup['useFirstPageNumber']) && + self::boolean((string) $xmlSheet->pageSetup['useFirstPageNumber'])) { + $docPageSetup->setFirstPageNumber((int) ($xmlSheet->pageSetup['firstPageNumber'])); + } + + $relAttributes = $xmlSheet->pageSetup->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + if (isset($relAttributes['id'])) { + $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId'] = (string) $relAttributes['id']; + } + } + + return $unparsedLoadedData; + } + + private function headerFooter(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->headerFooter) { + $docHeaderFooter = $worksheet->getHeaderFooter(); + + if (isset($xmlSheet->headerFooter['differentOddEven']) && + self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])) { + $docHeaderFooter->setDifferentOddEven(true); + } else { + $docHeaderFooter->setDifferentOddEven(false); + } + if (isset($xmlSheet->headerFooter['differentFirst']) && + self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) { + $docHeaderFooter->setDifferentFirst(true); + } else { + $docHeaderFooter->setDifferentFirst(false); + } + if (isset($xmlSheet->headerFooter['scaleWithDoc']) && + !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) { + $docHeaderFooter->setScaleWithDocument(false); + } else { + $docHeaderFooter->setScaleWithDocument(true); + } + if (isset($xmlSheet->headerFooter['alignWithMargins']) && + !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) { + $docHeaderFooter->setAlignWithMargins(false); + } else { + $docHeaderFooter->setAlignWithMargins(true); + } + + $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader); + $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter); + $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader); + $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter); + $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader); + $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter); + } + } + + private function pageBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk) { + $this->rowBreaks($xmlSheet, $worksheet); + } + if ($xmlSheet->colBreaks && $xmlSheet->colBreaks->brk) { + $this->columnBreaks($xmlSheet, $worksheet); + } + } + + private function rowBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + foreach ($xmlSheet->rowBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak("A{$brk['id']}", Worksheet::BREAK_ROW); + } + } + } + + private function columnBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + foreach ($xmlSheet->colBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak( + Coordinate::stringFromColumnIndex(((int) $brk['id']) + 1) . '1', + Worksheet::BREAK_COLUMN + ); + } + } + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php new file mode 100644 index 00000000000..bc6bba2cdb2 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php @@ -0,0 +1,91 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Document\Properties as DocumentProperties; +use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; +use PhpOffice\PhpSpreadsheet\Settings; + +class Properties +{ + private $securityScanner; + + private $docProps; + + public function __construct(XmlScanner $securityScanner, DocumentProperties $docProps) + { + $this->securityScanner = $securityScanner; + $this->docProps = $docProps; + } + + private function extractPropertyData($propertyData) + { + return simplexml_load_string( + $this->securityScanner->scan($propertyData), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + } + + public function readCoreProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + $xmlCore->registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); + $xmlCore->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/'); + $xmlCore->registerXPathNamespace('cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + + $this->docProps->setCreator((string) self::getArrayItem($xmlCore->xpath('dc:creator'))); + $this->docProps->setLastModifiedBy((string) self::getArrayItem($xmlCore->xpath('cp:lastModifiedBy'))); + $this->docProps->setCreated(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:created')))); //! respect xsi:type + $this->docProps->setModified(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:modified')))); //! respect xsi:type + $this->docProps->setTitle((string) self::getArrayItem($xmlCore->xpath('dc:title'))); + $this->docProps->setDescription((string) self::getArrayItem($xmlCore->xpath('dc:description'))); + $this->docProps->setSubject((string) self::getArrayItem($xmlCore->xpath('dc:subject'))); + $this->docProps->setKeywords((string) self::getArrayItem($xmlCore->xpath('cp:keywords'))); + $this->docProps->setCategory((string) self::getArrayItem($xmlCore->xpath('cp:category'))); + } + } + + public function readExtendedProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + if (isset($xmlCore->Company)) { + $this->docProps->setCompany((string) $xmlCore->Company); + } + if (isset($xmlCore->Manager)) { + $this->docProps->setManager((string) $xmlCore->Manager); + } + } + } + + public function readCustomProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + foreach ($xmlCore as $xmlProperty) { + /** @var \SimpleXMLElement $xmlProperty */ + $cellDataOfficeAttributes = $xmlProperty->attributes(); + if (isset($cellDataOfficeAttributes['name'])) { + $propertyName = (string) $cellDataOfficeAttributes['name']; + $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + $attributeType = $cellDataOfficeChildren->getName(); + $attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; + $attributeValue = DocumentProperties::convertProperty($attributeValue, $attributeType); + $attributeType = DocumentProperties::convertPropertyType($attributeType); + $this->docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); + } + } + } + } + + private static function getArrayItem(array $array, $key = 0) + { + return isset($array[$key]) ? $array[$key] : null; + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php new file mode 100644 index 00000000000..eb61a5d306c --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php @@ -0,0 +1,124 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class SheetViewOptions extends BaseParserClass +{ + private $worksheet; + + private $worksheetXml; + + public function __construct(Worksheet $workSheet, \SimpleXMLElement $worksheetXml = null) + { + $this->worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * @param bool $readDataOnly + */ + public function load($readDataOnly = false) + { + if ($this->worksheetXml === null) { + return; + } + + if (isset($this->worksheetXml->sheetPr)) { + $this->tabColor($this->worksheetXml->sheetPr); + $this->codeName($this->worksheetXml->sheetPr); + $this->outlines($this->worksheetXml->sheetPr); + $this->pageSetup($this->worksheetXml->sheetPr); + } + + if (isset($this->worksheetXml->sheetFormatPr)) { + $this->sheetFormat($this->worksheetXml->sheetFormatPr); + } + + if (!$readDataOnly && isset($this->worksheetXml->printOptions)) { + $this->printOptions($this->worksheetXml->printOptions); + } + } + + private function tabColor(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->tabColor, $sheetPr->tabColor['rgb'])) { + $this->worksheet->getTabColor()->setARGB((string) $sheetPr->tabColor['rgb']); + } + } + + private function codeName(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr['codeName'])) { + $this->worksheet->setCodeName((string) $sheetPr['codeName'], false); + } + } + + private function outlines(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->outlinePr)) { + if (isset($sheetPr->outlinePr['summaryRight']) && + !self::boolean((string) $sheetPr->outlinePr['summaryRight'])) { + $this->worksheet->setShowSummaryRight(false); + } else { + $this->worksheet->setShowSummaryRight(true); + } + + if (isset($sheetPr->outlinePr['summaryBelow']) && + !self::boolean((string) $sheetPr->outlinePr['summaryBelow'])) { + $this->worksheet->setShowSummaryBelow(false); + } else { + $this->worksheet->setShowSummaryBelow(true); + } + } + } + + private function pageSetup(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->pageSetUpPr)) { + if (isset($sheetPr->pageSetUpPr['fitToPage']) && + !self::boolean((string) $sheetPr->pageSetUpPr['fitToPage'])) { + $this->worksheet->getPageSetup()->setFitToPage(false); + } else { + $this->worksheet->getPageSetup()->setFitToPage(true); + } + } + } + + private function sheetFormat(\SimpleXMLElement $sheetFormatPr) + { + if (isset($sheetFormatPr['customHeight']) && + self::boolean((string) $sheetFormatPr['customHeight']) && + isset($sheetFormatPr['defaultRowHeight'])) { + $this->worksheet->getDefaultRowDimension() + ->setRowHeight((float) $sheetFormatPr['defaultRowHeight']); + } + + if (isset($sheetFormatPr['defaultColWidth'])) { + $this->worksheet->getDefaultColumnDimension() + ->setWidth((float) $sheetFormatPr['defaultColWidth']); + } + + if (isset($sheetFormatPr['zeroHeight']) && + ((string) $sheetFormatPr['zeroHeight'] === '1')) { + $this->worksheet->getDefaultRowDimension()->setZeroHeight(true); + } + } + + private function printOptions(\SimpleXMLElement $printOptions) + { + if (self::boolean((string) $printOptions['gridLinesSet'])) { + $this->worksheet->setShowGridlines(true); + } + if (self::boolean((string) $printOptions['gridLines'])) { + $this->worksheet->setPrintGridlines(true); + } + if (self::boolean((string) $printOptions['horizontalCentered'])) { + $this->worksheet->getPageSetup()->setHorizontalCentered(true); + } + if (self::boolean((string) $printOptions['verticalCentered'])) { + $this->worksheet->getPageSetup()->setVerticalCentered(true); + } + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php new file mode 100644 index 00000000000..2caaec3108e --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php @@ -0,0 +1,127 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + +class SheetViews extends BaseParserClass +{ + private $sheetViewXml; + + private $worksheet; + + public function __construct(\SimpleXMLElement $sheetViewXml, Worksheet $workSheet) + { + $this->sheetViewXml = $sheetViewXml; + $this->worksheet = $workSheet; + } + + public function load() + { + $this->zoomScale(); + $this->view(); + $this->gridLines(); + $this->headers(); + $this->direction(); + + if (isset($this->sheetViewXml->pane)) { + $this->pane(); + } + if (isset($this->sheetViewXml->selection, $this->sheetViewXml->selection['sqref'])) { + $this->selection(); + } + } + + private function zoomScale() + { + if (isset($this->sheetViewXml['zoomScale'])) { + $zoomScale = (int) ($this->sheetViewXml['zoomScale']); + if ($zoomScale <= 0) { + // setZoomScale will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScale = 100; + } + + $this->worksheet->getSheetView()->setZoomScale($zoomScale); + } + + if (isset($this->sheetViewXml['zoomScaleNormal'])) { + $zoomScaleNormal = (int) ($this->sheetViewXml['zoomScaleNormal']); + if ($zoomScaleNormal <= 0) { + // setZoomScaleNormal will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScaleNormal = 100; + } + + $this->worksheet->getSheetView()->setZoomScaleNormal($zoomScaleNormal); + } + } + + private function view() + { + if (isset($this->sheetViewXml['view'])) { + $this->worksheet->getSheetView()->setView((string) $this->sheetViewXml['view']); + } + } + + private function gridLines() + { + if (isset($this->sheetViewXml['showGridLines'])) { + $this->worksheet->setShowGridLines( + self::boolean((string) $this->sheetViewXml['showGridLines']) + ); + } + } + + private function headers() + { + if (isset($this->sheetViewXml['showRowColHeaders'])) { + $this->worksheet->setShowRowColHeaders( + self::boolean((string) $this->sheetViewXml['showRowColHeaders']) + ); + } + } + + private function direction() + { + if (isset($this->sheetViewXml['rightToLeft'])) { + $this->worksheet->setRightToLeft( + self::boolean((string) $this->sheetViewXml['rightToLeft']) + ); + } + } + + private function pane() + { + $xSplit = 0; + $ySplit = 0; + $topLeftCell = null; + + if (isset($this->sheetViewXml->pane['xSplit'])) { + $xSplit = (int) ($this->sheetViewXml->pane['xSplit']); + } + + if (isset($this->sheetViewXml->pane['ySplit'])) { + $ySplit = (int) ($this->sheetViewXml->pane['ySplit']); + } + + if (isset($this->sheetViewXml->pane['topLeftCell'])) { + $topLeftCell = (string) $this->sheetViewXml->pane['topLeftCell']; + } + + $this->worksheet->freezePane( + Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1), + $topLeftCell + ); + } + + private function selection() + { + $sqref = (string) $this->sheetViewXml->selection['sqref']; + $sqref = explode(' ', $sqref); + $sqref = $sqref[0]; + + $this->worksheet->setSelectedCells($sqref); + } +} diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php new file mode 100644 index 00000000000..c06564a3d11 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -0,0 +1,265 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; + +use PhpOffice\PhpSpreadsheet\Style\Alignment; +use PhpOffice\PhpSpreadsheet\Style\Border; +use PhpOffice\PhpSpreadsheet\Style\Borders; +use PhpOffice\PhpSpreadsheet\Style\Color; +use PhpOffice\PhpSpreadsheet\Style\Fill; +use PhpOffice\PhpSpreadsheet\Style\Font; +use PhpOffice\PhpSpreadsheet\Style\Protection; +use PhpOffice\PhpSpreadsheet\Style\Style; + +class Styles extends BaseParserClass +{ + /** + * Theme instance. + * + * @var Theme + */ + private static $theme = null; + + private $styles = []; + + private $cellStyles = []; + + private $styleXml; + + public function __construct(\SimpleXMLElement $styleXml) + { + $this->styleXml = $styleXml; + } + + public function setStyleBaseData(Theme $theme = null, $styles = [], $cellStyles = []) + { + self::$theme = $theme; + $this->styles = $styles; + $this->cellStyles = $cellStyles; + } + + private static function readFontStyle(Font $fontStyle, \SimpleXMLElement $fontStyleXml) + { + $fontStyle->setName((string) $fontStyleXml->name['val']); + $fontStyle->setSize((float) $fontStyleXml->sz['val']); + + if (isset($fontStyleXml->b)) { + $fontStyle->setBold(!isset($fontStyleXml->b['val']) || self::boolean((string) $fontStyleXml->b['val'])); + } + if (isset($fontStyleXml->i)) { + $fontStyle->setItalic(!isset($fontStyleXml->i['val']) || self::boolean((string) $fontStyleXml->i['val'])); + } + if (isset($fontStyleXml->strike)) { + $fontStyle->setStrikethrough(!isset($fontStyleXml->strike['val']) || self::boolean((string) $fontStyleXml->strike['val'])); + } + $fontStyle->getColor()->setARGB(self::readColor($fontStyleXml->color)); + + if (isset($fontStyleXml->u) && !isset($fontStyleXml->u['val'])) { + $fontStyle->setUnderline(Font::UNDERLINE_SINGLE); + } elseif (isset($fontStyleXml->u, $fontStyleXml->u['val'])) { + $fontStyle->setUnderline((string) $fontStyleXml->u['val']); + } + + if (isset($fontStyleXml->vertAlign, $fontStyleXml->vertAlign['val'])) { + $verticalAlign = strtolower((string) $fontStyleXml->vertAlign['val']); + if ($verticalAlign === 'superscript') { + $fontStyle->setSuperscript(true); + } + if ($verticalAlign === 'subscript') { + $fontStyle->setSubscript(true); + } + } + } + + private static function readFillStyle(Fill $fillStyle, \SimpleXMLElement $fillStyleXml) + { + if ($fillStyleXml->gradientFill) { + /** @var \SimpleXMLElement $gradientFill */ + $gradientFill = $fillStyleXml->gradientFill[0]; + if (!empty($gradientFill['type'])) { + $fillStyle->setFillType((string) $gradientFill['type']); + } + $fillStyle->setRotation((float) ($gradientFill['degree'])); + $gradientFill->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $fillStyle->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); + $fillStyle->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); + } elseif ($fillStyleXml->patternFill) { + $patternType = (string) $fillStyleXml->patternFill['patternType'] != '' ? (string) $fillStyleXml->patternFill['patternType'] : 'solid'; + $fillStyle->setFillType($patternType); + if ($fillStyleXml->patternFill->fgColor) { + $fillStyle->getStartColor()->setARGB(self::readColor($fillStyleXml->patternFill->fgColor, true)); + } else { + $fillStyle->getStartColor()->setARGB('FF000000'); + } + if ($fillStyleXml->patternFill->bgColor) { + $fillStyle->getEndColor()->setARGB(self::readColor($fillStyleXml->patternFill->bgColor, true)); + } + } + } + + private static function readBorderStyle(Borders $borderStyle, \SimpleXMLElement $borderStyleXml) + { + $diagonalUp = self::boolean((string) $borderStyleXml['diagonalUp']); + $diagonalDown = self::boolean((string) $borderStyleXml['diagonalDown']); + if (!$diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif (!$diagonalUp && $diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } else { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + + self::readBorder($borderStyle->getLeft(), $borderStyleXml->left); + self::readBorder($borderStyle->getRight(), $borderStyleXml->right); + self::readBorder($borderStyle->getTop(), $borderStyleXml->top); + self::readBorder($borderStyle->getBottom(), $borderStyleXml->bottom); + self::readBorder($borderStyle->getDiagonal(), $borderStyleXml->diagonal); + } + + private static function readBorder(Border $border, \SimpleXMLElement $borderXml) + { + if (isset($borderXml['style'])) { + $border->setBorderStyle((string) $borderXml['style']); + } + if (isset($borderXml->color)) { + $border->getColor()->setARGB(self::readColor($borderXml->color)); + } + } + + private static function readAlignmentStyle(Alignment $alignment, \SimpleXMLElement $alignmentXml) + { + $alignment->setHorizontal((string) $alignmentXml->alignment['horizontal']); + $alignment->setVertical((string) $alignmentXml->alignment['vertical']); + + $textRotation = 0; + if ((int) $alignmentXml->alignment['textRotation'] <= 90) { + $textRotation = (int) $alignmentXml->alignment['textRotation']; + } elseif ((int) $alignmentXml->alignment['textRotation'] > 90) { + $textRotation = 90 - (int) $alignmentXml->alignment['textRotation']; + } + + $alignment->setTextRotation((int) $textRotation); + $alignment->setWrapText(self::boolean((string) $alignmentXml->alignment['wrapText'])); + $alignment->setShrinkToFit(self::boolean((string) $alignmentXml->alignment['shrinkToFit'])); + $alignment->setIndent((int) ((string) $alignmentXml->alignment['indent']) > 0 ? (int) ((string) $alignmentXml->alignment['indent']) : 0); + $alignment->setReadOrder((int) ((string) $alignmentXml->alignment['readingOrder']) > 0 ? (int) ((string) $alignmentXml->alignment['readingOrder']) : 0); + } + + private function readStyle(Style $docStyle, $style) + { + $docStyle->getNumberFormat()->setFormatCode($style->numFmt); + + if (isset($style->font)) { + self::readFontStyle($docStyle->getFont(), $style->font); + } + + if (isset($style->fill)) { + self::readFillStyle($docStyle->getFill(), $style->fill); + } + + if (isset($style->border)) { + self::readBorderStyle($docStyle->getBorders(), $style->border); + } + + if (isset($style->alignment)) { + self::readAlignmentStyle($docStyle->getAlignment(), $style->alignment); + } + + // protection + if (isset($style->protection)) { + $this->readProtectionLocked($docStyle, $style); + $this->readProtectionHidden($docStyle, $style); + } + + // top-level style settings + if (isset($style->quotePrefix)) { + $docStyle->setQuotePrefix(true); + } + } + + private function readProtectionLocked(Style $docStyle, $style) + { + if (isset($style->protection['locked'])) { + if (self::boolean((string) $style->protection['locked'])) { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private function readProtectionHidden(Style $docStyle, $style) + { + if (isset($style->protection['hidden'])) { + if (self::boolean((string) $style->protection['hidden'])) { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } elseif (isset($color['theme'])) { + if (self::$theme !== null) { + $returnColour = self::$theme->getColourByIndex((int) $color['theme']); + if (isset($color['tint'])) { + $tintAdjust = (float) $color['tint']; + $returnColour = Color::changeBrightness($returnColour, $tintAdjust); + } + + return 'FF' . $returnColour; + } + } + + return ($background) ? 'FFFFFFFF' : 'FF000000'; + } + + public function dxfs($readDataOnly = false) + { + $dxfs = []; + if (!$readDataOnly && $this->styleXml) { + // Conditional Styles + if ($this->styleXml->dxfs) { + foreach ($this->styleXml->dxfs->dxf as $dxf) { + $style = new Style(false, true); + $this->readStyle($style, $dxf); + $dxfs[] = $style; + } + } + // Cell Styles + if ($this->styleXml->cellStyles) { + foreach ($this->styleXml->cellStyles->cellStyle as $cellStyle) { + if ((int) ($cellStyle['builtinId']) == 0) { + if (isset($this->cellStyles[(int) ($cellStyle['xfId'])])) { + // Set default style + $style = new Style(); + $this->readStyle($style, $this->cellStyles[(int) ($cellStyle['xfId'])]); + + // normal style, currently not using it for anything + } + } + } + } + } + + return $dxfs; + } + + public function styles() + { + return $this->styles; + } + + private static function getArrayItem($array, $key = 0) + { + return isset($array[$key]) ? $array[$key] : null; + } +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx/Theme.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xlsx/Theme.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xml.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xml.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php index 2b7959f47c1..8ab7a9c3954 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Reader/Xml.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php @@ -41,7 +41,7 @@ class Xml extends BaseReader */ public function __construct() { - $this->readFilter = new DefaultReadFilter(); + parent::__construct(); $this->securityScanner = XmlScanner::getInstance($this); } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/ReferenceHelper.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php similarity index 98% rename from htdocs/includes/phpoffice/PhpSpreadsheet/ReferenceHelper.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php index 54bc182a8eb..13dbe042a75 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/ReferenceHelper.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php @@ -82,13 +82,13 @@ class ReferenceHelper */ public static function cellSort($a, $b) { - $ac = $bc = ''; - $ar = $br = 0; + // TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax + // [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support. + // Switch when we drop support for 5.6 + list($ac, $ar) = sscanf($a, '%[A-Z]%d'); + list($bc, $br) = sscanf($b, '%[A-Z]%d'); - sscanf($a, '%[A-Z]%d', $ac, $ar); - sscanf($b, '%[A-Z]%d', $bc, $br); - - if ($ar == $br) { + if ($ar === $br) { return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); } @@ -106,13 +106,13 @@ class ReferenceHelper */ public static function cellReverseSort($a, $b) { - $ac = $bc = ''; - $ar = $br = 0; + // TODO Scrutinizer doesn't like sscanf($a, '%[A-Z]%d', $ac, $ar), and we can't use short list() syntax + // [$ac, $ar] = sscanf($a, '%[A-Z]%d') while retaining PHP 5.6 support. + // Switch when we drop support for 5.6 + list($ac, $ar) = sscanf($a, '%[A-Z]%d'); + list($bc, $br) = sscanf($b, '%[A-Z]%d'); - sscanf($a, '%[A-Z]%d', $ac, $ar); - sscanf($b, '%[A-Z]%d', $bc, $br); - - if ($ar == $br) { + if ($ar === $br) { return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); } @@ -625,7 +625,7 @@ class ReferenceHelper * Update references within formulas. * * @param string $pFormula Formula to update - * @param int $pBefore Insert before this one + * @param string $pBefore Insert before this one * @param int $pNumCols Number of columns to insert * @param int $pNumRows Number of rows to insert * @param string $sheetName Worksheet name/title diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/RichText/ITextElement.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/ITextElement.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/RichText/ITextElement.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/ITextElement.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/RichText/RichText.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/RichText.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/RichText/RichText.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/RichText.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/RichText/Run.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/Run.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/RichText/Run.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/Run.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/RichText/TextElement.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/RichText/TextElement.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Settings.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php similarity index 70% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Settings.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php index 22196b7e0e2..c297dd682ea 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Settings.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php @@ -24,6 +24,20 @@ class Settings */ private static $libXmlLoaderOptions = null; + /** + * Allow/disallow libxml_disable_entity_loader() call when not thread safe. + * Default behaviour is to do the check, but if you're running PHP versions + * 7.2 < 7.2.1 + * 7.1 < 7.1.13 + * 7.0 < 7.0.27 + * 5.6 ANY + * then you may need to disable this check to prevent unwanted behaviour in other threads + * SECURITY WARNING: Changing this flag is not recommended. + * + * @var bool + */ + private static $libXmlDisableEntityLoader = true; + /** * The cache implementation to be used for cell collection. * @@ -101,6 +115,34 @@ class Settings return self::$libXmlLoaderOptions; } + /** + * Enable/Disable the entity loader for libxml loader. + * Allow/disallow libxml_disable_entity_loader() call when not thread safe. + * Default behaviour is to do the check, but if you're running PHP versions + * 7.2 < 7.2.1 + * 7.1 < 7.1.13 + * 7.0 < 7.0.27 + * 5.6 ANY + * then you may need to disable this check to prevent unwanted behaviour in other threads + * SECURITY WARNING: Changing this flag to false is not recommended. + * + * @param bool $state + */ + public static function setLibXmlDisableEntityLoader($state) + { + self::$libXmlDisableEntityLoader = (bool) $state; + } + + /** + * Return the state of the entity loader (disabled/enabled) for libxml loader. + * + * @return bool $state + */ + public static function getLibXmlDisableEntityLoader() + { + return self::$libXmlDisableEntityLoader; + } + /** * Sets the implementation of cache that should be used for cell collection. * diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/CodePage.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/CodePage.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/CodePage.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/CodePage.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Date.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Date.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php index 91c3ee0e2ca..5d2deb32c95 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Date.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php @@ -192,7 +192,7 @@ class Date $interval = $days . ' days'; return $baseDate->modify($interval) - ->setTime($hours, $minutes, $seconds); + ->setTime((int) $hours, (int) $minutes, (int) $seconds); } /** @@ -244,12 +244,12 @@ class Date public static function dateTimeToExcel(DateTimeInterface $dateValue) { return self::formattedPHPToExcel( - $dateValue->format('Y'), - $dateValue->format('m'), - $dateValue->format('d'), - $dateValue->format('H'), - $dateValue->format('i'), - $dateValue->format('s') + (int) $dateValue->format('Y'), + (int) $dateValue->format('m'), + (int) $dateValue->format('d'), + (int) $dateValue->format('H'), + (int) $dateValue->format('i'), + (int) $dateValue->format('s') ); } @@ -325,11 +325,12 @@ class Date */ public static function isDateTime(Cell $pCell) { - return self::isDateTimeFormat( - $pCell->getWorksheet()->getStyle( - $pCell->getCoordinate() - )->getNumberFormat() - ); + return is_numeric($pCell->getValue()) && + self::isDateTimeFormat( + $pCell->getWorksheet()->getStyle( + $pCell->getCoordinate() + )->getNumberFormat() + ); } /** diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Drawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Drawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Drawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Drawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/File.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/File.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Font.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Font.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/Matrix.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/Matrix.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/Matrix.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/Matrix.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/utils/Maths.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/JAMA/utils/Maths.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php similarity index 94% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php index 2e9ec256734..f09fbc92adc 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php @@ -537,31 +537,37 @@ class OLE /** * Returns a timestamp from an OLE container's date. * - * @param int $string A binary string with the encoded date + * @param string $oleTimestamp A binary string with the encoded date * - * @return string The timestamp corresponding to the string + * @throws ReaderException + * + * @return int The Unix timestamp corresponding to the string */ - public static function OLE2LocalDate($string) + public static function OLE2LocalDate($oleTimestamp) { - if (strlen($string) != 8) { + if (strlen($oleTimestamp) != 8) { throw new ReaderException('Expecting 8 byte string'); } - // factor used for separating numbers into 4 bytes parts - $factor = pow(2, 32); - list(, $high_part) = unpack('V', substr($string, 4, 4)); - list(, $low_part) = unpack('V', substr($string, 0, 4)); + // convert to units of 100 ns since 1601: + $unpackedTimestamp = unpack('v4', $oleTimestamp); + $timestampHigh = (float) $unpackedTimestamp[4] * 65536 + (float) $unpackedTimestamp[3]; + $timestampLow = (float) $unpackedTimestamp[2] * 65536 + (float) $unpackedTimestamp[1]; - $big_date = ($high_part * $factor) + $low_part; - // translate to seconds - $big_date /= 10000000; + // translate to seconds since 1601: + $timestampHigh /= 10000000; + $timestampLow /= 10000000; - // days from 1-1-1601 until the beggining of UNIX era + // days from 1601 to 1970: $days = 134774; - // translate to seconds from beggining of UNIX era - $big_date -= $days * 24 * 3600; + // translate to seconds since 1970: + $unixTimestamp = floor(65536.0 * 65536.0 * $timestampHigh + $timestampLow - $days * 24 * 3600 + 0.5); - return floor($big_date); + if ((int) $unixTimestamp == $unixTimestamp) { + return (int) $unixTimestamp; + } + + return $unixTimestamp >= 0.0 ? PHP_INT_MAX : PHP_INT_MIN; } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS/File.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/File.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS/File.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/File.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS/Root.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLE/PPS/Root.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLERead.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/OLERead.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/PasswordHasher.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/PasswordHasher.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/PasswordHasher.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/PasswordHasher.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/StringHelper.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/StringHelper.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/TimeZone.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/TimeZone.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/TimeZone.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/TimeZone.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/BestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/BestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php similarity index 97% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php index 03723d84d4e..5b57f4b71fe 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php @@ -113,7 +113,9 @@ class ExponentialBestFit extends BestFit */ public function __construct($yValues, $xValues = [], $const = true) { - if (parent::__construct($yValues, $xValues) !== false) { + parent::__construct($yValues, $xValues); + + if (!$this->error) { $this->exponentialRegression($yValues, $xValues, $const); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LinearBestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LinearBestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php index 367e9d6ec56..217f0964770 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LinearBestFit.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php @@ -72,7 +72,9 @@ class LinearBestFit extends BestFit */ public function __construct($yValues, $xValues = [], $const = true) { - if (parent::__construct($yValues, $xValues) !== false) { + parent::__construct($yValues, $xValues); + + if (!$this->error) { $this->linearRegression($yValues, $xValues, $const); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php index 9092cef8215..96ca2ed8794 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php @@ -81,7 +81,9 @@ class LogarithmicBestFit extends BestFit */ public function __construct($yValues, $xValues = [], $const = true) { - if (parent::__construct($yValues, $xValues) !== false) { + parent::__construct($yValues, $xValues); + + if (!$this->error) { $this->logarithmicRegression($yValues, $xValues, $const); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php similarity index 98% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php index afcf5f477e4..a1510491f73 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php @@ -182,7 +182,9 @@ class PolynomialBestFit extends BestFit */ public function __construct($order, $yValues, $xValues = [], $const = true) { - if (parent::__construct($yValues, $xValues) !== false) { + parent::__construct($yValues, $xValues); + + if (!$this->error) { if ($order < $this->valueCount) { $this->bestFitType .= '_' . $order; $this->order = $order; diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PowerBestFit.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php similarity index 97% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PowerBestFit.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php index e1b3b8297cb..4eefec8265c 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/PowerBestFit.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php @@ -105,7 +105,9 @@ class PowerBestFit extends BestFit */ public function __construct($yValues, $xValues = [], $const = true) { - if (parent::__construct($yValues, $xValues) !== false) { + parent::__construct($yValues, $xValues); + + if (!$this->error) { $this->powerRegression($yValues, $xValues, $const); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/Trend.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Trend/Trend.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/XMLWriter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/XMLWriter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Xls.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Xls.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Shared/Xls.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Xls.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Spreadsheet.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Spreadsheet.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php index 150f71b1e4f..8eadcbe8b1a 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Spreadsheet.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php @@ -715,7 +715,7 @@ class Spreadsheet * * @param string $pName Sheet name * - * @return Worksheet + * @return null|Worksheet */ public function getSheetByName($pName) { diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Alignment.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Alignment.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Border.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Border.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Borders.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Borders.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Borders.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Borders.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Color.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Color.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Conditional.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Conditional.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Fill.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Fill.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Fill.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Fill.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Font.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Font.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/NumberFormat.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php similarity index 95% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/NumberFormat.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php index b6b803787cd..37442249a50 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/NumberFormat.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php @@ -49,6 +49,8 @@ class NumberFormat extends Supervisor const FORMAT_CURRENCY_USD = '$#,##0_-'; const FORMAT_CURRENCY_EUR_SIMPLE = '#,##0.00_-"€"'; const FORMAT_CURRENCY_EUR = '#,##0_-"€"'; + const FORMAT_ACCOUNTING_USD = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'; + const FORMAT_ACCOUNTING_EUR = '_("€"* #,##0.00_);_("€"* \(#,##0.00\);_("€"* "-"??_);_(@_)'; /** * Excel built-in number formats. @@ -308,6 +310,22 @@ class NumberFormat extends Supervisor self::$builtInFormats[69] = 't# ?/?'; self::$builtInFormats[70] = 't# ??/??'; + // JPN + self::$builtInFormats[28] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[29] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[31] = 'yyyy"年"m"月"d"日"'; + self::$builtInFormats[32] = 'h"時"mm"分"'; + self::$builtInFormats[33] = 'h"時"mm"分"ss"秒"'; + self::$builtInFormats[34] = 'yyyy"年"m"月"'; + self::$builtInFormats[35] = 'm"月"d"日"'; + self::$builtInFormats[51] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[52] = 'yyyy"年"m"月"'; + self::$builtInFormats[53] = 'm"月"d"日"'; + self::$builtInFormats[54] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[55] = 'yyyy"年"m"月"'; + self::$builtInFormats[56] = 'm"月"d"日"'; + self::$builtInFormats[58] = '[$-411]ggge"年"m"月"d"日"'; + // Flip array (for faster lookups) self::$flippedBuiltInFormats = array_flip(self::$builtInFormats); } @@ -596,7 +614,7 @@ class NumberFormat extends Supervisor } // Convert any other escaped characters to quoted strings, e.g. (\T to "T") - $format = preg_replace('/(\\\([^ ]))(?=(?:[^"]|"[^"]*")*$)/u', '"${2}"', $format); + $format = preg_replace('/(\\\(((.)(?!((AM\/PM)|(A\/P))))|([^ ])))(?=(?:[^"]|"[^"]*")*$)/u', '"${2}"', $format); // Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal) $sections = preg_split('/(;)(?=(?:[^"]|"[^"]*")*$)/u', $format); diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Protection.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Protection.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Style.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Style.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Style/Supervisor.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Supervisor.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Style/Supervisor.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Supervisor.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter/Column.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/BaseDrawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/BaseDrawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/BaseDrawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/BaseDrawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/CellIterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/CellIterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Column.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Column.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Column.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Column.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnCellIterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnDimension.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnDimension.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnDimension.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnDimension.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnIterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/ColumnIterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Dimension.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php similarity index 97% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Dimension.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php index 44e66323206..697fc97efc3 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Dimension.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php @@ -64,7 +64,7 @@ abstract class Dimension */ public function setVisible($pValue) { - $this->visible = $pValue; + $this->visible = (bool) $pValue; return $this; } @@ -119,7 +119,7 @@ abstract class Dimension */ public function setCollapsed($pValue) { - $this->collapsed = $pValue; + $this->collapsed = (bool) $pValue; return $this; } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Drawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Drawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Drawing/Shadow.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/HeaderFooter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/HeaderFooter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooter.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Iterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Iterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/MemoryDrawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/MemoryDrawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/PageMargins.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/PageMargins.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/PageSetup.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/PageSetup.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Protection.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Protection.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Protection.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Protection.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Row.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Row.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Row.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Row.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowCellIterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowCellIterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php index 59ef329c8b9..8510d402a35 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowCellIterator.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -170,6 +170,16 @@ class RowCellIterator extends CellIterator return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; } + /** + * Return the current iterator position. + * + * @return int + */ + public function getCurrentColumnIndex() + { + return $this->currentColumnIndex; + } + /** * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. * diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowDimension.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowDimension.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowIterator.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/RowIterator.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/SheetView.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/SheetView.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Worksheet.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Worksheet.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php index d0224037616..1e525a3fecb 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -1096,7 +1096,7 @@ class Worksheet implements IComparable * @param string $column Return the highest data row for the specified column, * or the highest data row of any column if no column letter is passed * - * @return string Highest row number that contains data + * @return int Highest row number that contains data */ public function getHighestDataRow($column = null) { @@ -2064,7 +2064,7 @@ class Worksheet implements IComparable /** * Insert a new column, updating all possible related data. * - * @param int $pBefore Insert before this one, eg: 'A' + * @param string $pBefore Insert before this one, eg: 'A' * @param int $pNumCols Number of columns to insert * * @throws Exception diff --git a/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php new file mode 100644 index 00000000000..f13150d7eb3 --- /dev/null +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php @@ -0,0 +1,86 @@ +<?php + +namespace PhpOffice\PhpSpreadsheet\Writer; + +abstract class BaseWriter implements IWriter +{ + /** + * Write charts that are defined in the workbook? + * Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object;. + * + * @var bool + */ + protected $includeCharts = false; + + /** + * Pre-calculate formulas + * Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are + * immediately available to MS Excel or other office spreadsheet viewer when opening the file. + * + * @var bool + */ + protected $preCalculateFormulas = true; + + /** + * Use disk caching where possible? + * + * @var bool + */ + private $useDiskCaching = false; + + /** + * Disk caching directory. + * + * @var string + */ + private $diskCachingDirectory = './'; + + public function getIncludeCharts() + { + return $this->includeCharts; + } + + public function setIncludeCharts($pValue) + { + $this->includeCharts = (bool) $pValue; + + return $this; + } + + public function getPreCalculateFormulas() + { + return $this->preCalculateFormulas; + } + + public function setPreCalculateFormulas($pValue) + { + $this->preCalculateFormulas = (bool) $pValue; + + return $this; + } + + public function getUseDiskCaching() + { + return $this->useDiskCaching; + } + + public function setUseDiskCaching($pValue, $pDirectory = null) + { + $this->useDiskCaching = $pValue; + + if ($pDirectory !== null) { + if (is_dir($pDirectory)) { + $this->diskCachingDirectory = $pDirectory; + } else { + throw new Exception("Directory does not exist: $pDirectory"); + } + } + + return $this; + } + + public function getDiskCachingDirectory() + { + return $this->diskCachingDirectory; + } +} diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Csv.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Csv.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Exception.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Exception.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Html.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Html.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/BaseWriter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php similarity index 53% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/BaseWriter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php index 122783f30c6..448b532fc2a 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/BaseWriter.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php @@ -2,38 +2,16 @@ namespace PhpOffice\PhpSpreadsheet\Writer; -abstract class BaseWriter implements IWriter +use PhpOffice\PhpSpreadsheet\Spreadsheet; + +interface IWriter { /** - * Write charts that are defined in the workbook? - * Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object;. + * IWriter constructor. * - * @var bool + * @param Spreadsheet $spreadsheet */ - protected $includeCharts = false; - - /** - * Pre-calculate formulas - * Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are - * immediately available to MS Excel or other office spreadsheet viewer when opening the file. - * - * @var bool - */ - protected $preCalculateFormulas = true; - - /** - * Use disk caching where possible? - * - * @var bool - */ - private $useDiskCaching = false; - - /** - * Disk caching directory. - * - * @var string - */ - private $diskCachingDirectory = './'; + public function __construct(Spreadsheet $spreadsheet); /** * Write charts in workbook? @@ -42,10 +20,7 @@ abstract class BaseWriter implements IWriter * * @return bool */ - public function getIncludeCharts() - { - return $this->includeCharts; - } + public function getIncludeCharts(); /** * Set write charts in workbook @@ -56,12 +31,7 @@ abstract class BaseWriter implements IWriter * * @return IWriter */ - public function setIncludeCharts($pValue) - { - $this->includeCharts = (bool) $pValue; - - return $this; - } + public function setIncludeCharts($pValue); /** * Get Pre-Calculate Formulas flag @@ -73,10 +43,7 @@ abstract class BaseWriter implements IWriter * * @return bool */ - public function getPreCalculateFormulas() - { - return $this->preCalculateFormulas; - } + public function getPreCalculateFormulas(); /** * Set Pre-Calculate Formulas @@ -87,22 +54,23 @@ abstract class BaseWriter implements IWriter * * @return IWriter */ - public function setPreCalculateFormulas($pValue) - { - $this->preCalculateFormulas = (bool) $pValue; + public function setPreCalculateFormulas($pValue); - return $this; - } + /** + * Save PhpSpreadsheet to file. + * + * @param string $pFilename Name of the file to save + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + */ + public function save($pFilename); /** * Get use disk caching where possible? * * @return bool */ - public function getUseDiskCaching() - { - return $this->useDiskCaching; - } + public function getUseDiskCaching(); /** * Set use disk caching where possible? @@ -114,28 +82,12 @@ abstract class BaseWriter implements IWriter * * @return IWriter */ - public function setUseDiskCaching($pValue, $pDirectory = null) - { - $this->useDiskCaching = $pValue; - - if ($pDirectory !== null) { - if (is_dir($pDirectory)) { - $this->diskCachingDirectory = $pDirectory; - } else { - throw new Exception("Directory does not exist: $pDirectory"); - } - } - - return $this; - } + public function setUseDiskCaching($pValue, $pDirectory = null); /** * Get disk caching directory. * * @return string */ - public function getDiskCachingDirectory() - { - return $this->diskCachingDirectory; - } + public function getDiskCachingDirectory(); } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Cell/Comment.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Cell/Comment.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Content.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Content.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Meta.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Meta.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/MetaInf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/MetaInf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Mimetype.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Mimetype.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Settings.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Settings.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Settings.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Settings.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Styles.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Styles.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Thumbnails.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/Thumbnails.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/WriterPart.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/WriterPart.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Ods/WriterPart.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/WriterPart.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Dompdf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Dompdf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Mpdf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Mpdf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Tcpdf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Pdf/Tcpdf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/BIFFwriter.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/BIFFwriter.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Escher.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Escher.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Font.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Font.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Parser.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php similarity index 98% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Parser.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php index e87d09a2233..6049e32878b 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -1009,7 +1009,7 @@ class Parser break; case '>': - if ($this->lookAhead == '=') { // it's a GE token + if ($this->lookAhead === '=') { // it's a GE token break; } @@ -1018,7 +1018,7 @@ class Parser break; case '<': // it's a LE or a NE token - if (($this->lookAhead == '=') or ($this->lookAhead == '>')) { + if (($this->lookAhead === '=') or ($this->lookAhead === '>')) { break; } @@ -1027,12 +1027,12 @@ class Parser break; default: // if it's a reference A1 or $A$1 or $A1 or A$1 - if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.') and ($this->lookAhead != '!')) { + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.') and ($this->lookAhead !== '!')) { return $token; - } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) { // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) return $token; - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) { // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) return $token; } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead)) { @@ -1044,19 +1044,19 @@ class Parser } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead)) { // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 return $token; - } elseif (is_numeric($token) and (!is_numeric($token . $this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead != '!') and ($this->lookAhead != ':')) { + } elseif (is_numeric($token) and (!is_numeric($token . $this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead !== '!') and ($this->lookAhead !== ':')) { // If it's a number (check that it's not a sheet name or range) return $token; - } elseif (preg_match('/"([^"]|""){0,255}"/', $token) and $this->lookAhead != '"' and (substr_count($token, '"') % 2 == 0)) { + } elseif (preg_match('/"([^"]|""){0,255}"/', $token) and $this->lookAhead !== '"' and (substr_count($token, '"') % 2 == 0)) { // If it's a string (of maximum 255 characters) return $token; - } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) or $token == '#N/A') { + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) or $token === '#N/A') { // If it's an error code return $token; - } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $token) and ($this->lookAhead == '(')) { + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $token) and ($this->lookAhead === '(')) { // if it's a function call return $token; - } elseif (substr($token, -1) == ')') { + } elseif (substr($token, -1) === ')') { // It's an argument of some description (e.g. a named range), // precise nature yet to be determined return $token; @@ -1078,8 +1078,7 @@ class Parser { $this->currentCharacter = 0; $this->formula = $formula; - $this->lookAhead = isset($formula[1]) ? $formula[1] - : ''; + $this->lookAhead = isset($formula[1]) ? $formula[1] : ''; $this->advance(); $this->parseTree = $this->condition(); @@ -1248,10 +1247,10 @@ class Parser */ private function fact() { - if ($this->currentToken == '(') { + if ($this->currentToken === '(') { $this->advance(); // eat the "(" $result = $this->parenthesizedExpression(); - if ($this->currentToken != ')') { + if ($this->currentToken !== ')') { throw new WriterException("')' token expected."); } $this->advance(); // eat the ")" @@ -1299,7 +1298,7 @@ class Parser return $result; } elseif (is_numeric($this->currentToken)) { // If it's a number or a percent - if ($this->lookAhead == '%') { + if ($this->lookAhead === '%') { $result = $this->createTree('ptgPercent', $this->currentToken, ''); $this->advance(); // Skip the percentage operator once we've pre-built that tree } else { @@ -1331,9 +1330,9 @@ class Parser $result = ''; // initialize result $this->advance(); $this->advance(); // eat the "(" - while ($this->currentToken != ')') { + while ($this->currentToken !== ')') { if ($num_args > 0) { - if ($this->currentToken == ',' || $this->currentToken == ';') { + if ($this->currentToken === ',' || $this->currentToken === ';') { $this->advance(); // eat the "," or ";" } else { throw new WriterException("Syntax error: comma expected in function $function, arg #{$num_args}"); diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Workbook.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Workbook.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php index b463ce4a8f0..41c8e64e297 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Workbook.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -267,9 +267,7 @@ class Workbook extends BIFFwriter $this->xfWriters[] = $xfWriter; - $xfIndex = count($this->xfWriters) - 1; - - return $xfIndex; + return count($this->xfWriters) - 1; } /** @@ -319,7 +317,7 @@ class Workbook extends BIFFwriter if ($colorIndex) { $this->colors[$rgb] = $colorIndex; } else { - if (count($this->colors) == 0) { + if (count($this->colors) === 0) { $lastColor = 7; } else { $lastColor = end($this->colors); @@ -437,7 +435,7 @@ class Workbook extends BIFFwriter // Prepare part 3 of the workbook global stream, what goes after the SHEET records $part3 = ''; - if ($this->countryCode != -1) { + if ($this->countryCode !== -1) { $part3 .= $this->writeCountry(); } $part3 .= $this->writeRecalcId(); @@ -918,7 +916,7 @@ class Workbook extends BIFFwriter $record = 0x0022; // Record identifier $length = 0x0002; // Bytes to follow - $f1904 = (Date::getExcelCalendar() == Date::CALENDAR_MAC_1904) + $f1904 = (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) ? 1 : 0; // Flag for 1904 date system diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Worksheet.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Worksheet.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Xf.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xls/Xf.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php similarity index 96% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php index dd19021e46e..58897639024 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php @@ -328,6 +328,17 @@ class Xlsx extends BaseWriter $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); } + // Add unparsed drawings + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'] as $relId => $drawingXml) { + $drawingFile = array_search($relId, $unparsedLoadedData['sheets'][$sheetCodeName]['drawingOriginalIds']); + if ($drawingFile !== false) { + $drawingFile = ltrim($drawingFile, '.'); + $zip->addFromString('xl' . $drawingFile, $drawingXml); + } + } + } + // Add comment relationship parts if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { // VML Comments @@ -338,8 +349,8 @@ class Xlsx extends BaseWriter } // Add unparsed relationship parts - if (isset($unparsedLoadedData['sheets'][$this->spreadSheet->getSheet($i)->getCodeName()]['vmlDrawings'])) { - foreach ($unparsedLoadedData['sheets'][$this->spreadSheet->getSheet($i)->getCodeName()]['vmlDrawings'] as $vmlDrawing) { + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'] as $vmlDrawing) { $zip->addFromString($vmlDrawing['filePath'], $vmlDrawing['content']); } } diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Chart.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Chart.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Comments.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Comments.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/DocProps.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/DocProps.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Drawing.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Drawing.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Rels.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Rels.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/StringTable.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Style.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Style.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Theme.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Theme.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Workbook.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php similarity index 99% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Workbook.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php index e3ddb03c143..b9f8f99b71f 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Workbook.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -93,7 +93,7 @@ class Workbook extends WriterPart { $objWriter->startElement('workbookPr'); - if (Date::getExcelCalendar() == Date::CALENDAR_MAC_1904) { + if (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) { $objWriter->writeAttribute('date1904', '1'); } @@ -225,7 +225,7 @@ class Workbook extends WriterPart $objWriter->startElement('sheet'); $objWriter->writeAttribute('name', $pSheetname); $objWriter->writeAttribute('sheetId', $pSheetId); - if ($sheetState != 'visible' && $sheetState != '') { + if ($sheetState !== 'visible' && $sheetState != '') { $objWriter->writeAttribute('state', $sheetState); } $objWriter->writeAttribute('r:id', 'rId' . $pRelId); diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php similarity index 98% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Worksheet.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php index 78a62e9eca4..065eaaf1c9b 100644 --- a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/Worksheet.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -141,7 +141,7 @@ class Worksheet extends WriterPart $objWriter->startElement('sheetPr'); if ($pSheet->getParent()->hasMacros()) { //if the workbook have macros, we need to have codeName for the sheet - if ($pSheet->hasCodeName() == false) { + if (!$pSheet->hasCodeName()) { $pSheet->setCodeName($pSheet->getTitle()); } $objWriter->writeAttribute('codeName', $pSheet->getCodeName()); @@ -322,7 +322,7 @@ class Worksheet extends WriterPart } // Set Zero Height row - if ((string) $pSheet->getDefaultRowDimension()->getZeroHeight() == '1' || + if ((string) $pSheet->getDefaultRowDimension()->getZeroHeight() === '1' || strtolower((string) $pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true') { $objWriter->writeAttribute('zeroHeight', '1'); } @@ -383,7 +383,7 @@ class Worksheet extends WriterPart } // Column visibility - if ($colDimension->getVisible() == false) { + if ($colDimension->getVisible() === false) { $objWriter->writeAttribute('hidden', 'true'); } @@ -398,7 +398,7 @@ class Worksheet extends WriterPart } // Collapsed - if ($colDimension->getCollapsed() == true) { + if ($colDimension->getCollapsed() === true) { $objWriter->writeAttribute('collapsed', 'true'); } @@ -428,7 +428,7 @@ class Worksheet extends WriterPart // sheetProtection $objWriter->startElement('sheetProtection'); - if ($pSheet->getProtection()->getPassword() != '') { + if ($pSheet->getProtection()->getPassword() !== '') { $objWriter->writeAttribute('password', $pSheet->getProtection()->getPassword()); } @@ -519,6 +519,9 @@ class Worksheet extends WriterPart // Formula $objWriter->writeElement('formula', $formula); } + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0'); } $objWriter->endElement(); @@ -624,8 +627,9 @@ class Worksheet extends WriterPart $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); } - if ($hyperlink->getTooltip() != '') { + if ($hyperlink->getTooltip() !== '') { $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip()); + $objWriter->writeAttribute('display', $hyperlink->getTooltip()); } $objWriter->endElement(); @@ -991,12 +995,12 @@ class Worksheet extends WriterPart } // Row visibility - if ($rowDimension->getVisible() == false) { + if (!$rowDimension->getVisible() === true) { $objWriter->writeAttribute('hidden', 'true'); } // Collapsed - if ($rowDimension->getCollapsed() == true) { + if ($rowDimension->getCollapsed() === true) { $objWriter->writeAttribute('collapsed', 'true'); } @@ -1101,7 +1105,7 @@ class Worksheet extends WriterPart break; case 'f': // Formula $attributes = $pCell->getFormulaAttributes(); - if ($attributes['t'] == 'array') { + if ($attributes['t'] === 'array') { $objWriter->startElement('f'); $objWriter->writeAttribute('t', 'array'); $objWriter->writeAttribute('ref', $pCellAddress); @@ -1114,7 +1118,7 @@ class Worksheet extends WriterPart } if ($this->getParentWriter()->getOffice2003Compatibility() === false) { if ($this->getParentWriter()->getPreCalculateFormulas()) { - if (!is_array($calculatedValue) && substr($calculatedValue, 0, 1) != '#') { + if (!is_array($calculatedValue) && substr($calculatedValue, 0, 1) !== '#') { $objWriter->writeElement('v', StringHelper::formatNumber($calculatedValue)); } else { $objWriter->writeElement('v', '0'); @@ -1135,7 +1139,7 @@ class Worksheet extends WriterPart break; case 'e': // Error - if (substr($cellValue, 0, 1) == '=') { + if (substr($cellValue, 0, 1) === '=') { $objWriter->writeElement('f', substr($cellValue, 1)); $objWriter->writeElement('v', substr($cellValue, 1)); } else { diff --git a/htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/WriterPart.php b/htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php similarity index 100% rename from htdocs/includes/phpoffice/PhpSpreadsheet/Writer/Xlsx/WriterPart.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php diff --git a/htdocs/includes/phpoffice/autoloader.php b/htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php similarity index 81% rename from htdocs/includes/phpoffice/autoloader.php rename to htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php index 71e94e9b738..809725dfb6f 100644 --- a/htdocs/includes/phpoffice/autoloader.php +++ b/htdocs/includes/phpoffice/phpspreadsheet/src/autoloader.php @@ -5,6 +5,6 @@ spl_autoload_register(function ($class_name) { if (1 === $preg_match) { $class_name = preg_replace('/\\\/', '/', $class_name); $class_name = preg_replace('/^PhpOffice\\/PhpSpreadsheet\\//', '', $class_name); - require_once(__DIR__ . '/PhpSpreadsheet/' . $class_name . '.php'); + require_once __DIR__ . '/PhpSpreadsheet/' . $class_name . '.php'; } }); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/print.css b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/print.css index 2e6b310300b..f2e8446445c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/print.css +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/print.css @@ -1,1187 +1 @@ -/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */ -.swagger-section pre code { - display: block; - padding: 0.5em; - background: #F0F0F0; -} -.swagger-section pre code, -.swagger-section pre .subst, -.swagger-section pre .tag .title, -.swagger-section pre .lisp .title, -.swagger-section pre .clojure .built_in, -.swagger-section pre .nginx .title { - color: black; -} -.swagger-section pre .string, -.swagger-section pre .title, -.swagger-section pre .constant, -.swagger-section pre .parent, -.swagger-section pre .tag .value, -.swagger-section pre .rules .value, -.swagger-section pre .rules .value .number, -.swagger-section pre .preprocessor, -.swagger-section pre .ruby .symbol, -.swagger-section pre .ruby .symbol .string, -.swagger-section pre .aggregate, -.swagger-section pre .template_tag, -.swagger-section pre .django .variable, -.swagger-section pre .smalltalk .class, -.swagger-section pre .addition, -.swagger-section pre .flow, -.swagger-section pre .stream, -.swagger-section pre .bash .variable, -.swagger-section pre .apache .tag, -.swagger-section pre .apache .cbracket, -.swagger-section pre .tex .command, -.swagger-section pre .tex .special, -.swagger-section pre .erlang_repl .function_or_atom, -.swagger-section pre .markdown .header { - color: #800; -} -.swagger-section pre .comment, -.swagger-section pre .annotation, -.swagger-section pre .template_comment, -.swagger-section pre .diff .header, -.swagger-section pre .chunk, -.swagger-section pre .markdown .blockquote { - color: #888; -} -.swagger-section pre .number, -.swagger-section pre .date, -.swagger-section pre .regexp, -.swagger-section pre .literal, -.swagger-section pre .smalltalk .symbol, -.swagger-section pre .smalltalk .char, -.swagger-section pre .go .constant, -.swagger-section pre .change, -.swagger-section pre .markdown .bullet, -.swagger-section pre .markdown .link_url { - color: #080; -} -.swagger-section pre .label, -.swagger-section pre .javadoc, -.swagger-section pre .ruby .string, -.swagger-section pre .decorator, -.swagger-section pre .filter .argument, -.swagger-section pre .localvars, -.swagger-section pre .array, -.swagger-section pre .attr_selector, -.swagger-section pre .important, -.swagger-section pre .pseudo, -.swagger-section pre .pi, -.swagger-section pre .doctype, -.swagger-section pre .deletion, -.swagger-section pre .envvar, -.swagger-section pre .shebang, -.swagger-section pre .apache .sqbracket, -.swagger-section pre .nginx .built_in, -.swagger-section pre .tex .formula, -.swagger-section pre .erlang_repl .reserved, -.swagger-section pre .prompt, -.swagger-section pre .markdown .link_label, -.swagger-section pre .vhdl .attribute, -.swagger-section pre .clojure .attribute, -.swagger-section pre .coffeescript .property { - color: #8888ff; -} -.swagger-section pre .keyword, -.swagger-section pre .id, -.swagger-section pre .phpdoc, -.swagger-section pre .title, -.swagger-section pre .built_in, -.swagger-section pre .aggregate, -.swagger-section pre .css .tag, -.swagger-section pre .javadoctag, -.swagger-section pre .phpdoc, -.swagger-section pre .yardoctag, -.swagger-section pre .smalltalk .class, -.swagger-section pre .winutils, -.swagger-section pre .bash .variable, -.swagger-section pre .apache .tag, -.swagger-section pre .go .typename, -.swagger-section pre .tex .command, -.swagger-section pre .markdown .strong, -.swagger-section pre .request, -.swagger-section pre .status { - font-weight: bold; -} -.swagger-section pre .markdown .emphasis { - font-style: italic; -} -.swagger-section pre .nginx .built_in { - font-weight: normal; -} -.swagger-section pre .coffeescript .javascript, -.swagger-section pre .javascript .xml, -.swagger-section pre .tex .formula, -.swagger-section pre .xml .javascript, -.swagger-section pre .xml .vbscript, -.swagger-section pre .xml .css, -.swagger-section pre .xml .cdata { - opacity: 0.5; -} -.swagger-section .swagger-ui-wrap { - line-height: 1; - font-family: "Droid Sans", sans-serif; - max-width: 960px; - margin-left: auto; - margin-right: auto; - /* JSONEditor specific styling */ -} -.swagger-section .swagger-ui-wrap b, -.swagger-section .swagger-ui-wrap strong { - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap q, -.swagger-section .swagger-ui-wrap blockquote { - quotes: none; -} -.swagger-section .swagger-ui-wrap p { - line-height: 1.4em; - padding: 0 0 10px; - color: #333333; -} -.swagger-section .swagger-ui-wrap q:before, -.swagger-section .swagger-ui-wrap q:after, -.swagger-section .swagger-ui-wrap blockquote:before, -.swagger-section .swagger-ui-wrap blockquote:after { - content: none; -} -.swagger-section .swagger-ui-wrap .heading_with_menu h1, -.swagger-section .swagger-ui-wrap .heading_with_menu h2, -.swagger-section .swagger-ui-wrap .heading_with_menu h3, -.swagger-section .swagger-ui-wrap .heading_with_menu h4, -.swagger-section .swagger-ui-wrap .heading_with_menu h5, -.swagger-section .swagger-ui-wrap .heading_with_menu h6 { - display: block; - clear: none; - float: left; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - width: 60%; -} -.swagger-section .swagger-ui-wrap table { - border-collapse: collapse; - border-spacing: 0; -} -.swagger-section .swagger-ui-wrap table thead tr th { - padding: 5px; - font-size: 0.9em; - color: #666666; - border-bottom: 1px solid #999999; -} -.swagger-section .swagger-ui-wrap table tbody tr:last-child td { - border-bottom: none; -} -.swagger-section .swagger-ui-wrap table tbody tr.offset { - background-color: #f0f0f0; -} -.swagger-section .swagger-ui-wrap table tbody tr td { - padding: 6px; - font-size: 0.9em; - border-bottom: 1px solid #cccccc; - vertical-align: top; - line-height: 1.3em; -} -.swagger-section .swagger-ui-wrap ol { - margin: 0px 0 10px; - padding: 0 0 0 18px; - list-style-type: decimal; -} -.swagger-section .swagger-ui-wrap ol li { - padding: 5px 0px; - font-size: 0.9em; - color: #333333; -} -.swagger-section .swagger-ui-wrap ol, -.swagger-section .swagger-ui-wrap ul { - list-style: none; -} -.swagger-section .swagger-ui-wrap h1 a, -.swagger-section .swagger-ui-wrap h2 a, -.swagger-section .swagger-ui-wrap h3 a, -.swagger-section .swagger-ui-wrap h4 a, -.swagger-section .swagger-ui-wrap h5 a, -.swagger-section .swagger-ui-wrap h6 a { - text-decoration: none; -} -.swagger-section .swagger-ui-wrap h1 a:hover, -.swagger-section .swagger-ui-wrap h2 a:hover, -.swagger-section .swagger-ui-wrap h3 a:hover, -.swagger-section .swagger-ui-wrap h4 a:hover, -.swagger-section .swagger-ui-wrap h5 a:hover, -.swagger-section .swagger-ui-wrap h6 a:hover { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap h1 span.divider, -.swagger-section .swagger-ui-wrap h2 span.divider, -.swagger-section .swagger-ui-wrap h3 span.divider, -.swagger-section .swagger-ui-wrap h4 span.divider, -.swagger-section .swagger-ui-wrap h5 span.divider, -.swagger-section .swagger-ui-wrap h6 span.divider { - color: #aaaaaa; -} -.swagger-section .swagger-ui-wrap a { - color: #547f00; -} -.swagger-section .swagger-ui-wrap a img { - border: none; -} -.swagger-section .swagger-ui-wrap article, -.swagger-section .swagger-ui-wrap aside, -.swagger-section .swagger-ui-wrap details, -.swagger-section .swagger-ui-wrap figcaption, -.swagger-section .swagger-ui-wrap figure, -.swagger-section .swagger-ui-wrap footer, -.swagger-section .swagger-ui-wrap header, -.swagger-section .swagger-ui-wrap hgroup, -.swagger-section .swagger-ui-wrap menu, -.swagger-section .swagger-ui-wrap nav, -.swagger-section .swagger-ui-wrap section, -.swagger-section .swagger-ui-wrap summary { - display: block; -} -.swagger-section .swagger-ui-wrap pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; -} -.swagger-section .swagger-ui-wrap pre code { - line-height: 1.6em; - background: none; -} -.swagger-section .swagger-ui-wrap .content > .content-type > div > label { - clear: both; - display: block; - color: #0F6AB4; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.swagger-section .swagger-ui-wrap .content pre { - font-size: 12px; - margin-top: 5px; - padding: 5px; -} -.swagger-section .swagger-ui-wrap .icon-btn { - cursor: pointer; -} -.swagger-section .swagger-ui-wrap .info_title { - padding-bottom: 10px; - font-weight: bold; - font-size: 25px; -} -.swagger-section .swagger-ui-wrap .footer { - margin-top: 20px; -} -.swagger-section .swagger-ui-wrap p.big, -.swagger-section .swagger-ui-wrap div.big p { - font-size: 1em; - margin-bottom: 10px; -} -.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { - width: 500px !important; -} -.swagger-section .swagger-ui-wrap .info_license { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_tos { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .message-fail { - color: #cc0000; -} -.swagger-section .swagger-ui-wrap .info_url { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_email { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_name { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_description { - padding-bottom: 10px; - font-size: 15px; -} -.swagger-section .swagger-ui-wrap .markdown ol li, -.swagger-section .swagger-ui-wrap .markdown ul li { - padding: 3px 0px; - line-height: 1.4em; - color: #333333; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { - display: block; - padding: 4px; - width: auto; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { - font-size: 1.3em; -} -.swagger-section .swagger-ui-wrap table.fullwidth { - width: 100%; -} -.swagger-section .swagger-ui-wrap .model-signature { - font-family: "Droid Sans", sans-serif; - font-size: 1em; - line-height: 1.5em; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { - text-decoration: none; - color: #AAA; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { - text-decoration: underline; - color: black; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { - color: black; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap .model-signature .propType { - color: #5555aa; -} -.swagger-section .swagger-ui-wrap .model-signature pre:hover { - background-color: #ffffdd; -} -.swagger-section .swagger-ui-wrap .model-signature pre { - font-size: .85em; - line-height: 1.2em; - overflow: auto; - max-height: 200px; - cursor: pointer; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { - display: block; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { - float: left; - margin: 0 5px 5px 0; - padding: 2px 5px 2px 0; - border-right: 1px solid #ddd; -} -.swagger-section .swagger-ui-wrap .model-signature .propOpt { - color: #555; -} -.swagger-section .swagger-ui-wrap .model-signature .snippet small { - font-size: 0.75em; -} -.swagger-section .swagger-ui-wrap .model-signature .propOptKey { - font-style: italic; -} -.swagger-section .swagger-ui-wrap .model-signature .description .strong { - font-weight: bold; - color: #000; - font-size: .9em; -} -.swagger-section .swagger-ui-wrap .model-signature .description div { - font-size: 0.9em; - line-height: 1.5em; - margin-left: 1em; -} -.swagger-section .swagger-ui-wrap .model-signature .description .stronger { - font-weight: bold; - color: #000; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper { - border-spacing: 0; - position: absolute; - background-color: #ffffff; - border: 1px solid #bbbbbb; - display: none; - font-size: 11px; - max-width: 400px; - line-height: 30px; - color: black; - padding: 5px; - margin-left: 10px; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th { - text-align: center; - background-color: #eeeeee; - border: 1px solid #bbbbbb; - font-size: 11px; - color: #666666; - font-weight: bold; - padding: 5px; - line-height: 15px; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child, -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child { - display: inline; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before { - display: block; - content: ''; -} -.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child { - margin-right: -3px; -} -.swagger-section .swagger-ui-wrap .model-signature .propName { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-container { - clear: both; -} -.swagger-section .swagger-ui-wrap .body-textarea { - width: 300px; - height: 100px; - border: 1px solid #aaa; -} -.swagger-section .swagger-ui-wrap .markdown p code, -.swagger-section .swagger-ui-wrap .markdown li code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #f0f0f0; - color: black; - padding: 1px 3px; -} -.swagger-section .swagger-ui-wrap .required { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .editor_holder { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap .editor_holder label { - font-weight: normal!important; - /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ -} -.swagger-section .swagger-ui-wrap .editor_holder label.required { - font-weight: bold!important; -} -.swagger-section .swagger-ui-wrap input.parameter { - width: 300px; - border: 1px solid #aaa; -} -.swagger-section .swagger-ui-wrap h1 { - color: black; - font-size: 1.5em; - line-height: 1.3em; - padding: 10px 0 10px 0; - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .heading_with_menu { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap .heading_with_menu ul { - display: block; - clear: none; - float: right; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - margin-top: 10px; -} -.swagger-section .swagger-ui-wrap h2 { - color: black; - font-size: 1.3em; - padding: 10px 0 10px 0; -} -.swagger-section .swagger-ui-wrap h2 a { - color: black; -} -.swagger-section .swagger-ui-wrap h2 span.sub { - font-size: 0.7em; - color: #999999; - font-style: italic; -} -.swagger-section .swagger-ui-wrap h2 span.sub a { - color: #777777; -} -.swagger-section .swagger-ui-wrap span.weak { - color: #666666; -} -.swagger-section .swagger-ui-wrap .message-success { - color: #89BF04; -} -.swagger-section .swagger-ui-wrap caption, -.swagger-section .swagger-ui-wrap th, -.swagger-section .swagger-ui-wrap td { - text-align: left; - font-weight: normal; - vertical-align: middle; -} -.swagger-section .swagger-ui-wrap .code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { - font-family: "Droid Sans", sans-serif; - height: 250px; - padding: 4px; - display: block; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { - display: block; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { - display: block; - float: left; - clear: none; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { - display: block; - float: left; - clear: none; - margin: 0 5px 0 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { - color: black; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { - display: block; - clear: both; - width: auto; - padding: 0 0 3px; - color: #666666; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { - padding-left: 3px; - color: #888888; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { - margin-left: 0; - font-style: italic; - font-size: 0.9em; - margin: 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap span.blank, -.swagger-section .swagger-ui-wrap span.empty { - color: #888888; - font-style: italic; -} -.swagger-section .swagger-ui-wrap .markdown h3 { - color: #547f00; -} -.swagger-section .swagger-ui-wrap .markdown h4 { - color: #666666; -} -.swagger-section .swagger-ui-wrap .markdown pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; - margin: 0 0 10px 0; -} -.swagger-section .swagger-ui-wrap .markdown pre code { - line-height: 1.6em; -} -.swagger-section .swagger-ui-wrap div.gist { - margin: 20px 0 25px 0 !important; -} -.swagger-section .swagger-ui-wrap ul#resources { - font-family: "Droid Sans", sans-serif; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource { - border-bottom: 1px solid #dddddd; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, -.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, -.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { - color: #555555; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { - border-bottom: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { - border: 1px solid transparent; - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 14px 10px 0 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; - color: #666666; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { - color: #aaaaaa; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { - text-decoration: underline; - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { - color: #999999; - padding-left: 0; - display: block; - clear: none; - float: left; - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { - color: #999999; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { - padding-left: 10px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { - color: black; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { - text-transform: uppercase; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { - padding: 4px 0 0 10px; - display: inline-block; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { - background-image: url('../images/throbber.gif'); - width: 128px; - height: 16px; - display: block; - clear: none; - float: right; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { - outline: 2px solid black; - outline-color: #cc0000; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { - max-width: 300px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { - background-color: #f9f2e9; - border: 1px solid #f0e0ca; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { - background-color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #f0e0ca; - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { - background-color: #faf5ee; - border: 1px solid #f0e0ca; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { - color: #dcb67f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { - background-color: #fcffcd; - border: 1px solid black; - border-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #ffd20f; - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { - background-color: #fcffcd; - border: 1px solid black; - border-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { - color: #6fc992; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { - background-color: #f5e8e8; - border: 1px solid #e8c6c7; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #e8c6c7; - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - background-color: #f7eded; - border: 1px solid #e8c6c7; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { - color: #c8787a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { - background-color: #e7f6ec; - border: 1px solid #c3e8d1; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { - background-color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3e8d1; - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { - background-color: #ebf7f0; - border: 1px solid #c3e8d1; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { - color: #6fc992; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { - background-color: #FCE9E3; - border: 1px solid #F5D5C3; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { - background-color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #f0cecb; - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { - background-color: #faf0ef; - border: 1px solid #f0cecb; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { - color: #dcb67f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { - background-color: #e7f0f7; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { - background-color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3d9ec; - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { - color: #6fa5d2; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { - background-color: #e7f0f7; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { - background-color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3d9ec; - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { - color: #6fa5d2; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - border-top: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap p#colophon { - margin: 0 15px 40px 15px; - padding: 10px 0; - font-size: 0.8em; - border-top: 1px solid #dddddd; - font-family: "Droid Sans", sans-serif; - color: #999999; - font-style: italic; -} -.swagger-section .swagger-ui-wrap p#colophon a { - text-decoration: none; - color: #547f00; -} -.swagger-section .swagger-ui-wrap h3 { - color: black; - font-size: 1.1em; - padding: 10px 0 10px 0; -} -.swagger-section .swagger-ui-wrap .markdown ol, -.swagger-section .swagger-ui-wrap .markdown ul { - font-family: "Droid Sans", sans-serif; - margin: 5px 0 10px; - padding: 0 0 0 18px; - list-style-type: disc; -} -.swagger-section .swagger-ui-wrap form.form_box { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; - padding: 10px; -} -.swagger-section .swagger-ui-wrap form.form_box label { - color: #0f6ab4 !important; -} -.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { - display: block; - padding: 10px; -} -.swagger-section .swagger-ui-wrap form.form_box p.weak { - font-size: 0.8em; -} -.swagger-section .swagger-ui-wrap form.form_box p { - font-size: 0.9em; - padding: 0 0 15px; - color: #7e7b6d; -} -.swagger-section .swagger-ui-wrap form.form_box p a { - color: #646257; -} -.swagger-section .swagger-ui-wrap form.form_box p strong { - color: black; -} -.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { - padding-bottom: 0; -} -.swagger-section .title { - font-style: bold; -} -.swagger-section .secondary_form { - display: none; -} -.swagger-section .main_image { - display: block; - margin-left: auto; - margin-right: auto; -} -.swagger-section .oauth_body { - margin-left: 100px; - margin-right: 100px; -} -.swagger-section .oauth_submit { - text-align: center; -} -.swagger-section .api-popup-dialog { - z-index: 10000; - position: absolute; - width: 500px; - background: #FFF; - padding: 20px; - border: 1px solid #ccc; - border-radius: 5px; - display: none; - font-size: 13px; - color: #777; -} -.swagger-section .api-popup-dialog .api-popup-title { - font-size: 24px; - padding: 10px 0; -} -.swagger-section .api-popup-dialog .api-popup-title { - font-size: 24px; - padding: 10px 0; -} -.swagger-section .api-popup-dialog .error-msg { - padding-left: 5px; - padding-bottom: 5px; -} -.swagger-section .api-popup-dialog .api-popup-authbtn { - height: 30px; -} -.swagger-section .api-popup-dialog .api-popup-cancel { - height: 30px; -} -.swagger-section .api-popup-scopes { - padding: 10px 20px; -} -.swagger-section .api-popup-scopes li { - padding: 5px 0; - line-height: 20px; -} -.swagger-section .api-popup-scopes li input { - position: relative; - top: 2px; -} -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} -.swagger-section .api-popup-actions { - padding-top: 10px; -} -#header { - display: none; -} -.swagger-section .swagger-ui-wrap .model-signature pre { - max-height: none; -} -.swagger-section .swagger-ui-wrap .body-textarea { - width: 100px; -} -.swagger-section .swagger-ui-wrap input.parameter { - width: 100px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { - display: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints { - display: block !important; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { - display: block !important; -} +.swagger-section pre code{display:block;padding:.5em;background:#f0f0f0}.swagger-section pre .clojure .built_in,.swagger-section pre .lisp .title,.swagger-section pre .nginx .title,.swagger-section pre .subst,.swagger-section pre .tag .title,.swagger-section pre code{color:#000}.swagger-section pre .addition,.swagger-section pre .aggregate,.swagger-section pre .apache .cbracket,.swagger-section pre .apache .tag,.swagger-section pre .bash .variable,.swagger-section pre .constant,.swagger-section pre .django .variable,.swagger-section pre .erlang_repl .function_or_atom,.swagger-section pre .flow,.swagger-section pre .markdown .header,.swagger-section pre .parent,.swagger-section pre .preprocessor,.swagger-section pre .ruby .symbol,.swagger-section pre .ruby .symbol .string,.swagger-section pre .rules .value,.swagger-section pre .rules .value .number,.swagger-section pre .smalltalk .class,.swagger-section pre .stream,.swagger-section pre .string,.swagger-section pre .tag .value,.swagger-section pre .template_tag,.swagger-section pre .tex .command,.swagger-section pre .tex .special,.swagger-section pre .title{color:#800}.swagger-section pre .annotation,.swagger-section pre .chunk,.swagger-section pre .comment,.swagger-section pre .diff .header,.swagger-section pre .markdown .blockquote,.swagger-section pre .template_comment{color:#888}.swagger-section pre .change,.swagger-section pre .date,.swagger-section pre .go .constant,.swagger-section pre .literal,.swagger-section pre .markdown .bullet,.swagger-section pre .markdown .link_url,.swagger-section pre .number,.swagger-section pre .regexp,.swagger-section pre .smalltalk .char,.swagger-section pre .smalltalk .symbol{color:#080}.swagger-section pre .apache .sqbracket,.swagger-section pre .array,.swagger-section pre .attr_selector,.swagger-section pre .clojure .attribute,.swagger-section pre .coffeescript .property,.swagger-section pre .decorator,.swagger-section pre .deletion,.swagger-section pre .doctype,.swagger-section pre .envvar,.swagger-section pre .erlang_repl .reserved,.swagger-section pre .filter .argument,.swagger-section pre .important,.swagger-section pre .javadoc,.swagger-section pre .label,.swagger-section pre .localvars,.swagger-section pre .markdown .link_label,.swagger-section pre .nginx .built_in,.swagger-section pre .pi,.swagger-section pre .prompt,.swagger-section pre .pseudo,.swagger-section pre .ruby .string,.swagger-section pre .shebang,.swagger-section pre .tex .formula,.swagger-section pre .vhdl .attribute{color:#88f}.swagger-section pre .aggregate,.swagger-section pre .apache .tag,.swagger-section pre .bash .variable,.swagger-section pre .built_in,.swagger-section pre .css .tag,.swagger-section pre .go .typename,.swagger-section pre .id,.swagger-section pre .javadoctag,.swagger-section pre .keyword,.swagger-section pre .markdown .strong,.swagger-section pre .phpdoc,.swagger-section pre .request,.swagger-section pre .smalltalk .class,.swagger-section pre .status,.swagger-section pre .tex .command,.swagger-section pre .title,.swagger-section pre .winutils,.swagger-section pre .yardoctag{font-weight:700}.swagger-section pre .markdown .emphasis{font-style:italic}.swagger-section pre .nginx .built_in{font-weight:400}.swagger-section pre .coffeescript .javascript,.swagger-section pre .javascript .xml,.swagger-section pre .tex .formula,.swagger-section pre .xml .cdata,.swagger-section pre .xml .css,.swagger-section pre .xml .javascript,.swagger-section pre .xml .vbscript{opacity:.5}.swagger-section .hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0}.swagger-section .hljs,.swagger-section .hljs-subst{color:#444}.swagger-section .hljs-attribute,.swagger-section .hljs-doctag,.swagger-section .hljs-keyword,.swagger-section .hljs-meta-keyword,.swagger-section .hljs-name,.swagger-section .hljs-selector-tag{font-weight:700}.swagger-section .hljs-addition,.swagger-section .hljs-built_in,.swagger-section .hljs-bullet,.swagger-section .hljs-code,.swagger-section .hljs-literal{color:#1f811f}.swagger-section .hljs-link,.swagger-section .hljs-regexp,.swagger-section .hljs-selector-attr,.swagger-section .hljs-selector-pseudo,.swagger-section .hljs-symbol,.swagger-section .hljs-template-variable,.swagger-section .hljs-variable{color:#bc6060}.swagger-section .hljs-deletion,.swagger-section .hljs-number,.swagger-section .hljs-quote,.swagger-section .hljs-selector-class,.swagger-section .hljs-selector-id,.swagger-section .hljs-string,.swagger-section .hljs-template-tag,.swagger-section .hljs-type{color:#800}.swagger-section .hljs-section,.swagger-section .hljs-title{color:#800;font-weight:700}.swagger-section .hljs-comment{color:#888}.swagger-section .hljs-meta{color:#2b6ea1}.swagger-section .hljs-emphasis{font-style:italic}.swagger-section .hljs-strong{font-weight:700}.swagger-section .swagger-ui-wrap{line-height:1;font-family:Droid Sans,sans-serif;min-width:760px;max-width:960px;margin-left:auto;margin-right:auto}.swagger-section .swagger-ui-wrap b,.swagger-section .swagger-ui-wrap strong{font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap blockquote,.swagger-section .swagger-ui-wrap q{quotes:none}.swagger-section .swagger-ui-wrap p{line-height:1.4em;padding:0 0 10px;color:#333}.swagger-section .swagger-ui-wrap blockquote:after,.swagger-section .swagger-ui-wrap blockquote:before,.swagger-section .swagger-ui-wrap q:after,.swagger-section .swagger-ui-wrap q:before{content:none}.swagger-section .swagger-ui-wrap .heading_with_menu h1,.swagger-section .swagger-ui-wrap .heading_with_menu h2,.swagger-section .swagger-ui-wrap .heading_with_menu h3,.swagger-section .swagger-ui-wrap .heading_with_menu h4,.swagger-section .swagger-ui-wrap .heading_with_menu h5,.swagger-section .swagger-ui-wrap .heading_with_menu h6{display:block;clear:none;float:left;-ms-box-sizing:border-box;box-sizing:border-box;width:60%}.swagger-section .swagger-ui-wrap table{border-collapse:collapse;border-spacing:0}.swagger-section .swagger-ui-wrap table thead tr th{padding:5px;font-size:.9em;color:#666;border-bottom:1px solid #999}.swagger-section .swagger-ui-wrap table tbody tr:last-child td{border-bottom:none}.swagger-section .swagger-ui-wrap table tbody tr.offset{background-color:#f0f0f0}.swagger-section .swagger-ui-wrap table tbody tr td{padding:6px;font-size:.9em;border-bottom:1px solid #ccc;vertical-align:top;line-height:1.3em}.swagger-section .swagger-ui-wrap ol{margin:0 0 10px;padding:0 0 0 18px;list-style-type:decimal}.swagger-section .swagger-ui-wrap ol li{padding:5px 0;font-size:.9em;color:#333}.swagger-section .swagger-ui-wrap ol,.swagger-section .swagger-ui-wrap ul{list-style:none}.swagger-section .swagger-ui-wrap h1 a,.swagger-section .swagger-ui-wrap h2 a,.swagger-section .swagger-ui-wrap h3 a,.swagger-section .swagger-ui-wrap h4 a,.swagger-section .swagger-ui-wrap h5 a,.swagger-section .swagger-ui-wrap h6 a{text-decoration:none}.swagger-section .swagger-ui-wrap h1 a:hover,.swagger-section .swagger-ui-wrap h2 a:hover,.swagger-section .swagger-ui-wrap h3 a:hover,.swagger-section .swagger-ui-wrap h4 a:hover,.swagger-section .swagger-ui-wrap h5 a:hover,.swagger-section .swagger-ui-wrap h6 a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap h1 span.divider,.swagger-section .swagger-ui-wrap h2 span.divider,.swagger-section .swagger-ui-wrap h3 span.divider,.swagger-section .swagger-ui-wrap h4 span.divider,.swagger-section .swagger-ui-wrap h5 span.divider,.swagger-section .swagger-ui-wrap h6 span.divider{color:#aaa}.swagger-section .swagger-ui-wrap a{color:#547f00}.swagger-section .swagger-ui-wrap a img{border:none}.swagger-section .swagger-ui-wrap article,.swagger-section .swagger-ui-wrap aside,.swagger-section .swagger-ui-wrap details,.swagger-section .swagger-ui-wrap figcaption,.swagger-section .swagger-ui-wrap figure,.swagger-section .swagger-ui-wrap footer,.swagger-section .swagger-ui-wrap header,.swagger-section .swagger-ui-wrap hgroup,.swagger-section .swagger-ui-wrap menu,.swagger-section .swagger-ui-wrap nav,.swagger-section .swagger-ui-wrap section,.swagger-section .swagger-ui-wrap summary{display:block}.swagger-section .swagger-ui-wrap pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#fcf6db;border:1px solid #e5e0c6;padding:10px}.swagger-section .swagger-ui-wrap pre code{line-height:1.6em;background:none}.swagger-section .swagger-ui-wrap .content>.content-type>div>label{clear:both;display:block;color:#0f6ab4;font-size:1.1em;margin:0;padding:15px 0 5px}.swagger-section .swagger-ui-wrap .content pre{font-size:12px;margin-top:5px;padding:5px}.swagger-section .swagger-ui-wrap .icon-btn{cursor:pointer}.swagger-section .swagger-ui-wrap .info_title{padding-bottom:10px;font-weight:700;font-size:25px}.swagger-section .swagger-ui-wrap .footer{margin-top:20px}.swagger-section .swagger-ui-wrap div.big p,.swagger-section .swagger-ui-wrap p.big{font-size:1em;margin-bottom:10px}.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input,.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input{width:500px!important}.swagger-section .swagger-ui-wrap .info_license,.swagger-section .swagger-ui-wrap .info_tos{padding-bottom:5px}.swagger-section .swagger-ui-wrap .message-fail{color:#c00}.swagger-section .swagger-ui-wrap .info_email,.swagger-section .swagger-ui-wrap .info_name,.swagger-section .swagger-ui-wrap .info_url{padding-bottom:5px}.swagger-section .swagger-ui-wrap .info_description{padding-bottom:10px;font-size:15px}.swagger-section .swagger-ui-wrap .markdown ol li,.swagger-section .swagger-ui-wrap .markdown ul li{padding:3px 0;line-height:1.4em;color:#333}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input{display:block;padding:4px;width:auto;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title{font-size:1.3em}.swagger-section .swagger-ui-wrap table.fullwidth{width:100%}.swagger-section .swagger-ui-wrap .model-signature{font-family:Droid Sans,sans-serif;font-size:1em;line-height:1.5em}.swagger-section .swagger-ui-wrap .model-signature .signature-nav a{text-decoration:none;color:#aaa}.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover{text-decoration:underline;color:#000}.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected{color:#000;text-decoration:none}.swagger-section .swagger-ui-wrap .model-signature .propType{color:#55a}.swagger-section .swagger-ui-wrap .model-signature pre:hover{background-color:#ffd}.swagger-section .swagger-ui-wrap .model-signature pre{font-size:.85em;line-height:1.2em;overflow:auto;height:200px;resize:vertical;cursor:pointer}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav{display:block;min-width:230px;margin:0;padding:0}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li{float:left;margin:0 5px 5px 0;padding:2px 5px 2px 0;border-right:1px solid #ddd}.swagger-section .swagger-ui-wrap .model-signature .propOpt{color:#555}.swagger-section .swagger-ui-wrap .model-signature .snippet small{font-size:.75em}.swagger-section .swagger-ui-wrap .model-signature .propOptKey{font-style:italic}.swagger-section .swagger-ui-wrap .model-signature .description .strong{font-weight:700;color:#000;font-size:.9em}.swagger-section .swagger-ui-wrap .model-signature .description div{font-size:.9em;line-height:1.5em;margin-left:1em}.swagger-section .swagger-ui-wrap .model-signature .description .stronger{font-weight:700;color:#000}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper{border-spacing:0;position:absolute;background-color:#fff;border:1px solid #bbb;display:none;font-size:11px;max-width:400px;line-height:30px;color:#000;padding:5px;margin-left:10px}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th{text-align:center;background-color:#eee;border:1px solid #bbb;font-size:11px;color:#666;font-weight:700;padding:5px;line-height:15px}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName{font-weight:700}.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:first-child,.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:last-child{display:inline}.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:not(:first-child):before{display:block;content:''}.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown>p:only-child{margin-right:-3px}.swagger-section .swagger-ui-wrap .model-signature .propName{font-weight:700}.swagger-section .swagger-ui-wrap .model-signature .signature-container{clear:both}.swagger-section .swagger-ui-wrap .body-textarea{width:300px;height:100px;border:1px solid #aaa}.swagger-section .swagger-ui-wrap .markdown li code,.swagger-section .swagger-ui-wrap .markdown p code{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#f0f0f0;color:#000;padding:1px 3px}.swagger-section .swagger-ui-wrap .required{font-weight:700}.swagger-section .swagger-ui-wrap .editor_holder{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;font-size:.9em}.swagger-section .swagger-ui-wrap .editor_holder label{font-weight:400!important}.swagger-section .swagger-ui-wrap .editor_holder label.required{font-weight:700!important}.swagger-section .swagger-ui-wrap input.parameter{width:300px;border:1px solid #aaa}.swagger-section .swagger-ui-wrap h1{color:#000;font-size:1.5em;line-height:1.3em;padding:10px 0;font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap .heading_with_menu{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap .heading_with_menu ul{display:block;clear:none;float:right;-ms-box-sizing:border-box;box-sizing:border-box;margin-top:10px}.swagger-section .swagger-ui-wrap h2{color:#000;font-size:1.3em;padding:10px 0}.swagger-section .swagger-ui-wrap h2 a{color:#000}.swagger-section .swagger-ui-wrap h2 span.sub{font-size:.7em;color:#999;font-style:italic}.swagger-section .swagger-ui-wrap h2 span.sub a{color:#777}.swagger-section .swagger-ui-wrap span.weak{color:#666}.swagger-section .swagger-ui-wrap .message-success{color:#89bf04}.swagger-section .swagger-ui-wrap caption,.swagger-section .swagger-ui-wrap td,.swagger-section .swagger-ui-wrap th{text-align:left;font-weight:400;vertical-align:middle}.swagger-section .swagger-ui-wrap .code{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea{font-family:Droid Sans,sans-serif;height:250px;padding:4px;display:block;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select{display:block;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label{display:block;float:left;clear:none;margin:0;padding:0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input{display:block;float:left;clear:none;margin:0 5px 0 0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label{color:#000}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label{display:block;clear:both;width:auto;padding:0 0 3px;color:#666}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr{padding-left:3px;color:#888}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints{margin-left:0;font-style:italic;font-size:.9em;margin:0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons{margin:0;padding:0}.swagger-section .swagger-ui-wrap span.blank,.swagger-section .swagger-ui-wrap span.empty{color:#888;font-style:italic}.swagger-section .swagger-ui-wrap .markdown h3{color:#547f00}.swagger-section .swagger-ui-wrap .markdown h4{color:#666}.swagger-section .swagger-ui-wrap .markdown pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#fcf6db;border:1px solid #e5e0c6;padding:10px;margin:0 0 10px}.swagger-section .swagger-ui-wrap .markdown pre code{line-height:1.6em;overflow:auto}.swagger-section .swagger-ui-wrap div.gist{margin:20px 0 25px!important}.swagger-section .swagger-ui-wrap ul#resources{font-family:Droid Sans,sans-serif;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource{border-bottom:1px solid #ddd}.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a,.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a,.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a{color:#555}.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child{border-bottom:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading{border:1px solid transparent;float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options{overflow:hidden;padding:0;display:block;clear:none;float:right;margin:14px 10px 0 0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li{float:left;clear:none;margin:0;padding:2px 10px;border-right:1px solid #ddd;color:#666;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a{color:#aaa;text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover{text-decoration:underline;color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child{padding-left:0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child{padding-left:0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2{color:#999;padding-left:0;display:block;clear:none;float:left;font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a{color:#999}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation{float:none;clear:both;overflow:hidden;display:block;margin:0 0 10px;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading{float:none;clear:both;overflow:hidden;display:block;margin:0;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3{display:block;clear:none;float:left;width:auto;margin:0;padding:0;line-height:1.1em;color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path{padding-left:10px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a{color:#000;text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated{text-decoration:line-through}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a{text-transform:uppercase;text-decoration:none;color:#fff;display:inline-block;width:50px;font-size:.7em;text-align:center;padding:7px 0 4px;border-radius:2px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span{margin:0;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options{overflow:hidden;padding:0;display:block;clear:none;float:right;margin:6px 10px 0 0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li{float:left;clear:none;margin:0;padding:2px 10px;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a{text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p{color:inherit;padding:0;line-height:inherit}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .nickname{color:#aaa;padding:0;line-height:inherit}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content{border-top:none;padding:10px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;margin:0 0 20px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4{font-size:1.1em;margin:0;padding:15px 0 5px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a{padding:4px 0 0 10px;display:inline-block;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit{display:block;clear:none;float:left;padding:6px 8px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber{background-image:url(../images/throbber.gif);width:128px;height:16px;display:block;clear:none;float:right}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type=text].error{outline:2px solid #000;outline-color:#c00}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name=parameterContentType]{max-width:300px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;padding:10px;font-size:.9em;max-height:400px;overflow-y:auto}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading{background-color:#f9f2e9;border:1px solid #f0e0ca}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a{background-color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#f0e0ca;color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a{color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content{background-color:#faf5ee;border:1px solid #f0e0ca}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4{color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a{color:#dcb67f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading{background-color:#fcffcd;border:1px solid #000;border-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a{text-transform:uppercase;background-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#ffd20f;color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a{color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content{background-color:#fcffcd;border:1px solid #000;border-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4{color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a{color:#6fc992}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading{background-color:#f5e8e8;border:1px solid #e8c6c7}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a{text-transform:uppercase;background-color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#e8c6c7;color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a{color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content{background-color:#f7eded;border:1px solid #e8c6c7}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4{color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a{color:#c8787a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading{background-color:#e7f6ec;border:1px solid #c3e8d1}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a{background-color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3e8d1;color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a{color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content{background-color:#ebf7f0;border:1px solid #c3e8d1}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4{color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a{color:#6fc992}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading{background-color:#fce9e3;border:1px solid #f5d5c3}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a{background-color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#f0cecb;color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a{color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content{background-color:#faf0ef;border:1px solid #f0cecb}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4{color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a{color:#dcb67f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading{background-color:#e7f0f7;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a{background-color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3d9ec;color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content{background-color:#ebf3f9;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a{color:#6fa5d2}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading{background-color:#e7f0f7;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a{background-color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3d9ec;color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content{background-color:#ebf3f9;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a{color:#6fa5d2}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content{border-top:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child{padding-left:0}.swagger-section .swagger-ui-wrap p#colophon{margin:0 15px 40px;padding:10px 0;font-size:.8em;border-top:1px solid #ddd;font-family:Droid Sans,sans-serif;color:#999;font-style:italic}.swagger-section .swagger-ui-wrap p#colophon a{text-decoration:none;color:#547f00}.swagger-section .swagger-ui-wrap h3{color:#000;font-size:1.1em;padding:10px 0}.swagger-section .swagger-ui-wrap .markdown ol,.swagger-section .swagger-ui-wrap .markdown ul{font-family:Droid Sans,sans-serif;margin:5px 0 10px;padding:0 0 0 18px;list-style-type:disc}.swagger-section .swagger-ui-wrap form.form_box{background-color:#ebf3f9;border:1px solid #c3d9ec;padding:10px}.swagger-section .swagger-ui-wrap form.form_box label{color:#0f6ab4!important}.swagger-section .swagger-ui-wrap form.form_box input[type=submit]{display:block;padding:10px}.swagger-section .swagger-ui-wrap form.form_box p.weak{font-size:.8em}.swagger-section .swagger-ui-wrap form.form_box p{font-size:.9em;padding:0 0 15px;color:#7e7b6d}.swagger-section .swagger-ui-wrap form.form_box p a{color:#646257}.swagger-section .swagger-ui-wrap form.form_box p strong{color:#000}.swagger-section .swagger-ui-wrap .operation-status td.markdown>p:last-child{padding-bottom:0}.swagger-section .title{font-style:bold}.swagger-section .secondary_form{display:none}.swagger-section .main_image{display:block;margin-left:auto;margin-right:auto}.swagger-section .oauth_body{margin-left:100px;margin-right:100px}.swagger-section .oauth_submit{text-align:center;display:inline-block}.swagger-section .authorize-wrapper{margin:15px 0 10px}.swagger-section .authorize-wrapper_operation{float:right}.swagger-section .authorize__btn:hover{text-decoration:underline;cursor:pointer}.swagger-section .authorize__btn_operation:hover .authorize-scopes{display:block}.swagger-section .authorize-scopes{position:absolute;margin-top:20px;background:#fff;border:1px solid #ccc;border-radius:5px;display:none;font-size:13px;max-width:300px;line-height:30px;color:#000;padding:5px}.swagger-section .authorize-scopes .authorize__scope{text-decoration:none}.swagger-section .authorize__btn_operation{height:18px;vertical-align:middle;display:inline-block;background:url(../images/explorer_icons.png) no-repeat}.swagger-section .authorize__btn_operation_login{background-position:0 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section .authorize__btn_operation_logout{background-position:-30px 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section #auth_container{color:#fff;display:inline-block;border:none;padding:5px;width:87px;height:13px}.swagger-section #auth_container .authorize__btn{color:#fff}.swagger-section .auth_container{padding:0 0 10px;margin-bottom:5px;border-bottom:1px solid #ccc;font-size:.9em}.swagger-section .auth_container .auth__title{color:#547f00;font-size:1.2em}.swagger-section .auth_container .basic_auth__label{display:inline-block;width:60px}.swagger-section .auth_container .auth__description{color:#999;margin-bottom:5px}.swagger-section .auth_container .auth__button{margin-top:10px;height:30px}.swagger-section .auth_container .key_auth__field{margin:5px 0}.swagger-section .auth_container .key_auth__label{display:inline-block;width:60px}.swagger-section .api-popup-dialog{position:absolute;display:none}.swagger-section .api-popup-dialog-wrapper{z-index:2;width:500px;background:#fff;padding:20px;border:1px solid #ccc;border-radius:5px;font-size:13px;color:#777;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.swagger-section .api-popup-dialog-shadow{position:fixed;top:0;left:0;width:100%;height:100%;opacity:.2;background-color:gray;z-index:1}.swagger-section .api-popup-dialog .api-popup-title{font-size:24px;padding:10px 0}.swagger-section .api-popup-dialog .error-msg{padding-left:5px;padding-bottom:5px}.swagger-section .api-popup-dialog .api-popup-content{max-height:500px;overflow-y:auto}.swagger-section .api-popup-dialog .api-popup-authbtn,.swagger-section .api-popup-dialog .api-popup-cancel{height:30px}.swagger-section .api-popup-scopes{padding:10px 20px}.swagger-section .api-popup-scopes li{padding:5px 0;line-height:20px}.swagger-section .api-popup-scopes li input{position:relative;top:2px}.swagger-section .api-popup-scopes .api-scope-desc{padding-left:20px;font-style:italic}.swagger-section .api-popup-actions{padding-top:10px}.swagger-section fieldset{padding-bottom:10px;padding-left:20px}#header{display:none}.swagger-section .swagger-ui-wrap .model-signature pre{max-height:none}.swagger-section .swagger-ui-wrap .body-textarea,.swagger-section .swagger-ui-wrap input.parameter{width:100px}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options{display:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content{display:block!important} \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/reset.css b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/reset.css index b2b078943c4..40dc8301c57 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/reset.css +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/reset.css @@ -1,125 +1 @@ -/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { - display: block; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -blockquote, -q { - quotes: none; -} -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ''; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0} \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/screen.css b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/screen.css index ea3a4153c15..1f069f6abe3 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/screen.css +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/screen.css @@ -1,1304 +1 @@ -/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */ -.swagger-section pre code { - display: block; - padding: 0.5em; - background: #F0F0F0; -} -.swagger-section pre code, -.swagger-section pre .subst, -.swagger-section pre .tag .title, -.swagger-section pre .lisp .title, -.swagger-section pre .clojure .built_in, -.swagger-section pre .nginx .title { - color: black; -} -.swagger-section pre .string, -.swagger-section pre .title, -.swagger-section pre .constant, -.swagger-section pre .parent, -.swagger-section pre .tag .value, -.swagger-section pre .rules .value, -.swagger-section pre .rules .value .number, -.swagger-section pre .preprocessor, -.swagger-section pre .ruby .symbol, -.swagger-section pre .ruby .symbol .string, -.swagger-section pre .aggregate, -.swagger-section pre .template_tag, -.swagger-section pre .django .variable, -.swagger-section pre .smalltalk .class, -.swagger-section pre .addition, -.swagger-section pre .flow, -.swagger-section pre .stream, -.swagger-section pre .bash .variable, -.swagger-section pre .apache .tag, -.swagger-section pre .apache .cbracket, -.swagger-section pre .tex .command, -.swagger-section pre .tex .special, -.swagger-section pre .erlang_repl .function_or_atom, -.swagger-section pre .markdown .header { - color: #800; -} -.swagger-section pre .comment, -.swagger-section pre .annotation, -.swagger-section pre .template_comment, -.swagger-section pre .diff .header, -.swagger-section pre .chunk, -.swagger-section pre .markdown .blockquote { - color: #888; -} -.swagger-section pre .number, -.swagger-section pre .date, -.swagger-section pre .regexp, -.swagger-section pre .literal, -.swagger-section pre .smalltalk .symbol, -.swagger-section pre .smalltalk .char, -.swagger-section pre .go .constant, -.swagger-section pre .change, -.swagger-section pre .markdown .bullet, -.swagger-section pre .markdown .link_url { - color: #080; -} -.swagger-section pre .label, -.swagger-section pre .javadoc, -.swagger-section pre .ruby .string, -.swagger-section pre .decorator, -.swagger-section pre .filter .argument, -.swagger-section pre .localvars, -.swagger-section pre .array, -.swagger-section pre .attr_selector, -.swagger-section pre .important, -.swagger-section pre .pseudo, -.swagger-section pre .pi, -.swagger-section pre .doctype, -.swagger-section pre .deletion, -.swagger-section pre .envvar, -.swagger-section pre .shebang, -.swagger-section pre .apache .sqbracket, -.swagger-section pre .nginx .built_in, -.swagger-section pre .tex .formula, -.swagger-section pre .erlang_repl .reserved, -.swagger-section pre .prompt, -.swagger-section pre .markdown .link_label, -.swagger-section pre .vhdl .attribute, -.swagger-section pre .clojure .attribute, -.swagger-section pre .coffeescript .property { - color: #8888ff; -} -.swagger-section pre .keyword, -.swagger-section pre .id, -.swagger-section pre .phpdoc, -.swagger-section pre .title, -.swagger-section pre .built_in, -.swagger-section pre .aggregate, -.swagger-section pre .css .tag, -.swagger-section pre .javadoctag, -.swagger-section pre .phpdoc, -.swagger-section pre .yardoctag, -.swagger-section pre .smalltalk .class, -.swagger-section pre .winutils, -.swagger-section pre .bash .variable, -.swagger-section pre .apache .tag, -.swagger-section pre .go .typename, -.swagger-section pre .tex .command, -.swagger-section pre .markdown .strong, -.swagger-section pre .request, -.swagger-section pre .status { - font-weight: bold; -} -.swagger-section pre .markdown .emphasis { - font-style: italic; -} -.swagger-section pre .nginx .built_in { - font-weight: normal; -} -.swagger-section pre .coffeescript .javascript, -.swagger-section pre .javascript .xml, -.swagger-section pre .tex .formula, -.swagger-section pre .xml .javascript, -.swagger-section pre .xml .vbscript, -.swagger-section pre .xml .css, -.swagger-section pre .xml .cdata { - opacity: 0.5; -} -.swagger-section .swagger-ui-wrap { - line-height: 1; - font-family: "Droid Sans", sans-serif; - max-width: 960px; - margin-left: auto; - margin-right: auto; - /* JSONEditor specific styling */ -} -.swagger-section .swagger-ui-wrap b, -.swagger-section .swagger-ui-wrap strong { - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap q, -.swagger-section .swagger-ui-wrap blockquote { - quotes: none; -} -.swagger-section .swagger-ui-wrap p { - line-height: 1.4em; - padding: 0 0 10px; - color: #333333; -} -.swagger-section .swagger-ui-wrap q:before, -.swagger-section .swagger-ui-wrap q:after, -.swagger-section .swagger-ui-wrap blockquote:before, -.swagger-section .swagger-ui-wrap blockquote:after { - content: none; -} -.swagger-section .swagger-ui-wrap .heading_with_menu h1, -.swagger-section .swagger-ui-wrap .heading_with_menu h2, -.swagger-section .swagger-ui-wrap .heading_with_menu h3, -.swagger-section .swagger-ui-wrap .heading_with_menu h4, -.swagger-section .swagger-ui-wrap .heading_with_menu h5, -.swagger-section .swagger-ui-wrap .heading_with_menu h6 { - display: block; - clear: none; - float: left; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - width: 60%; -} -.swagger-section .swagger-ui-wrap table { - border-collapse: collapse; - border-spacing: 0; -} -.swagger-section .swagger-ui-wrap table thead tr th { - padding: 5px; - font-size: 0.9em; - color: #666666; - border-bottom: 1px solid #999999; -} -.swagger-section .swagger-ui-wrap table tbody tr:last-child td { - border-bottom: none; -} -.swagger-section .swagger-ui-wrap table tbody tr.offset { - background-color: #f0f0f0; -} -.swagger-section .swagger-ui-wrap table tbody tr td { - padding: 6px; - font-size: 0.9em; - border-bottom: 1px solid #cccccc; - vertical-align: top; - line-height: 1.3em; -} -.swagger-section .swagger-ui-wrap ol { - margin: 0px 0 10px; - padding: 0 0 0 18px; - list-style-type: decimal; -} -.swagger-section .swagger-ui-wrap ol li { - padding: 5px 0px; - font-size: 0.9em; - color: #333333; -} -.swagger-section .swagger-ui-wrap ol, -.swagger-section .swagger-ui-wrap ul { - list-style: none; -} -.swagger-section .swagger-ui-wrap h1 a, -.swagger-section .swagger-ui-wrap h2 a, -.swagger-section .swagger-ui-wrap h3 a, -.swagger-section .swagger-ui-wrap h4 a, -.swagger-section .swagger-ui-wrap h5 a, -.swagger-section .swagger-ui-wrap h6 a { - text-decoration: none; -} -.swagger-section .swagger-ui-wrap h1 a:hover, -.swagger-section .swagger-ui-wrap h2 a:hover, -.swagger-section .swagger-ui-wrap h3 a:hover, -.swagger-section .swagger-ui-wrap h4 a:hover, -.swagger-section .swagger-ui-wrap h5 a:hover, -.swagger-section .swagger-ui-wrap h6 a:hover { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap h1 span.divider, -.swagger-section .swagger-ui-wrap h2 span.divider, -.swagger-section .swagger-ui-wrap h3 span.divider, -.swagger-section .swagger-ui-wrap h4 span.divider, -.swagger-section .swagger-ui-wrap h5 span.divider, -.swagger-section .swagger-ui-wrap h6 span.divider { - color: #aaaaaa; -} -.swagger-section .swagger-ui-wrap a { - color: #547f00; -} -.swagger-section .swagger-ui-wrap a img { - border: none; -} -.swagger-section .swagger-ui-wrap article, -.swagger-section .swagger-ui-wrap aside, -.swagger-section .swagger-ui-wrap details, -.swagger-section .swagger-ui-wrap figcaption, -.swagger-section .swagger-ui-wrap figure, -.swagger-section .swagger-ui-wrap footer, -.swagger-section .swagger-ui-wrap header, -.swagger-section .swagger-ui-wrap hgroup, -.swagger-section .swagger-ui-wrap menu, -.swagger-section .swagger-ui-wrap nav, -.swagger-section .swagger-ui-wrap section, -.swagger-section .swagger-ui-wrap summary { - display: block; -} -.swagger-section .swagger-ui-wrap pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; -} -.swagger-section .swagger-ui-wrap pre code { - line-height: 1.6em; - background: none; -} -.swagger-section .swagger-ui-wrap .content > .content-type > div > label { - clear: both; - display: block; - color: #0F6AB4; - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.swagger-section .swagger-ui-wrap .content pre { - font-size: 12px; - margin-top: 5px; - padding: 5px; -} -.swagger-section .swagger-ui-wrap .icon-btn { - cursor: pointer; -} -.swagger-section .swagger-ui-wrap .info_title { - padding-bottom: 10px; - font-weight: bold; - font-size: 25px; -} -.swagger-section .swagger-ui-wrap .footer { - margin-top: 20px; -} -.swagger-section .swagger-ui-wrap p.big, -.swagger-section .swagger-ui-wrap div.big p { - font-size: 1em; - margin-bottom: 10px; -} -.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, -.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { - width: 500px !important; -} -.swagger-section .swagger-ui-wrap .info_license { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_tos { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .message-fail { - color: #cc0000; -} -.swagger-section .swagger-ui-wrap .info_url { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_email { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_name { - padding-bottom: 5px; -} -.swagger-section .swagger-ui-wrap .info_description { - padding-bottom: 10px; - font-size: 15px; -} -.swagger-section .swagger-ui-wrap .markdown ol li, -.swagger-section .swagger-ui-wrap .markdown ul li { - padding: 3px 0px; - line-height: 1.4em; - color: #333333; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { - display: block; - padding: 4px; - width: auto; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { - font-size: 1.3em; -} -.swagger-section .swagger-ui-wrap table.fullwidth { - width: 100%; -} -.swagger-section .swagger-ui-wrap .model-signature { - font-family: "Droid Sans", sans-serif; - font-size: 1em; - line-height: 1.5em; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { - text-decoration: none; - color: #AAA; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { - text-decoration: underline; - color: black; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { - color: black; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap .model-signature .propType { - color: #5555aa; -} -.swagger-section .swagger-ui-wrap .model-signature pre:hover { - background-color: #ffffdd; -} -.swagger-section .swagger-ui-wrap .model-signature pre { - font-size: .85em; - line-height: 1.2em; - overflow: auto; - max-height: 400px; - cursor: pointer; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { - display: block; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { - float: left; - margin: 0 5px 5px 0; - padding: 2px 5px 2px 0; - border-right: 1px solid #ddd; -} -.swagger-section .swagger-ui-wrap .model-signature .propOpt { - color: #555; -} -.swagger-section .swagger-ui-wrap .model-signature .snippet small { - font-size: 0.75em; -} -.swagger-section .swagger-ui-wrap .model-signature .propOptKey { - font-style: italic; -} -.swagger-section .swagger-ui-wrap .model-signature .description .strong { - font-weight: bold; - color: #000; - font-size: .9em; -} -.swagger-section .swagger-ui-wrap .model-signature .description div { - font-size: 0.9em; - line-height: 1.5em; - margin-left: 1em; -} -.swagger-section .swagger-ui-wrap .model-signature .description .stronger { - font-weight: bold; - color: #000; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper { - border-spacing: 0; - position: absolute; - background-color: #ffffff; - border: 1px solid #bbbbbb; - display: none; - font-size: 11px; - max-width: 400px; - line-height: 30px; - color: black; - padding: 5px; - margin-left: 10px; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th { - text-align: center; - background-color: #eeeeee; - border: 1px solid #bbbbbb; - font-size: 11px; - color: #666666; - font-weight: bold; - padding: 5px; - line-height: 15px; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child, -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child { - display: inline; -} -.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before { - display: block; - content: ''; -} -.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child { - margin-right: -3px; -} -.swagger-section .swagger-ui-wrap .model-signature .propName { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .model-signature .signature-container { - clear: both; -} -.swagger-section .swagger-ui-wrap .body-textarea { - width: 300px; - height: 100px; - border: 1px solid #aaa; -} -.swagger-section .swagger-ui-wrap .markdown p code, -.swagger-section .swagger-ui-wrap .markdown li code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #f0f0f0; - color: black; - padding: 1px 3px; -} -.swagger-section .swagger-ui-wrap .required { - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .editor_holder { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap .editor_holder label { - font-weight: normal!important; - /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ -} -.swagger-section .swagger-ui-wrap .editor_holder label.required { - font-weight: bold!important; -} -.swagger-section .swagger-ui-wrap input.parameter { - width: 300px; - border: 1px solid #aaa; -} -.swagger-section .swagger-ui-wrap h1 { - color: black; - font-size: 1.5em; - line-height: 1.3em; - padding: 10px 0 10px 0; - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap .heading_with_menu { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap .heading_with_menu ul { - display: block; - clear: none; - float: right; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; - margin-top: 10px; -} -.swagger-section .swagger-ui-wrap h2 { - color: black; - font-size: 1.3em; - padding: 10px 0 10px 0; -} -.swagger-section .swagger-ui-wrap h2 a { - color: black; -} -.swagger-section .swagger-ui-wrap h2 span.sub { - font-size: 0.7em; - color: #999999; - font-style: italic; -} -.swagger-section .swagger-ui-wrap h2 span.sub a { - color: #777777; -} -.swagger-section .swagger-ui-wrap span.weak { - color: #666666; -} -.swagger-section .swagger-ui-wrap .message-success { - color: #89BF04; -} -.swagger-section .swagger-ui-wrap caption, -.swagger-section .swagger-ui-wrap th, -.swagger-section .swagger-ui-wrap td { - text-align: left; - font-weight: normal; - vertical-align: middle; -} -.swagger-section .swagger-ui-wrap .code { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { - font-family: "Droid Sans", sans-serif; - height: 250px; - padding: 4px; - display: block; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { - display: block; - clear: both; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { - display: block; - float: left; - clear: none; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { - display: block; - float: left; - clear: none; - margin: 0 5px 0 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { - color: black; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { - display: block; - clear: both; - width: auto; - padding: 0 0 3px; - color: #666666; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { - padding-left: 3px; - color: #888888; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { - margin-left: 0; - font-style: italic; - font-size: 0.9em; - margin: 0; -} -.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap span.blank, -.swagger-section .swagger-ui-wrap span.empty { - color: #888888; - font-style: italic; -} -.swagger-section .swagger-ui-wrap .markdown h3 { - color: #547f00; -} -.swagger-section .swagger-ui-wrap .markdown h4 { - color: #666666; -} -.swagger-section .swagger-ui-wrap .markdown pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - padding: 10px; - margin: 0 0 10px 0; -} -.swagger-section .swagger-ui-wrap .markdown pre code { - line-height: 1.6em; -} -.swagger-section .swagger-ui-wrap div.gist { - margin: 20px 0 25px 0 !important; -} -.swagger-section .swagger-ui-wrap ul#resources { - font-family: "Droid Sans", sans-serif; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource { - border-bottom: 1px solid #dddddd; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, -.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, -.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { - color: #555555; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { - border-bottom: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { - border: 1px solid transparent; - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 14px 10px 0 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - border-right: 1px solid #dddddd; - color: #666666; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { - color: #aaaaaa; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { - text-decoration: underline; - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { - color: #999999; - padding-left: 0; - display: block; - clear: none; - float: left; - font-family: "Droid Sans", sans-serif; - font-weight: bold; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { - color: #999999; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0 0 10px; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { - float: none; - clear: both; - overflow: hidden; - display: block; - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { - display: block; - clear: none; - float: left; - width: auto; - margin: 0; - padding: 0; - line-height: 1.1em; - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { - padding-left: 10px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { - color: black; - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { - text-transform: uppercase; - text-decoration: none; - color: white; - display: inline-block; - width: 50px; - font-size: 0.7em; - text-align: center; - padding: 7px 0 4px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - -ms-border-radius: 2px; - -khtml-border-radius: 2px; - border-radius: 2px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { - margin: 0; - padding: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { - overflow: hidden; - padding: 0; - display: block; - clear: none; - float: right; - margin: 6px 10px 0 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { - float: left; - clear: none; - margin: 0; - padding: 2px 10px; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { - text-decoration: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { - border-top: none; - padding: 10px; - -moz-border-radius-bottomleft: 6px; - -webkit-border-bottom-left-radius: 6px; - -o-border-bottom-left-radius: 6px; - -ms-border-bottom-left-radius: 6px; - -khtml-border-bottom-left-radius: 6px; - border-bottom-left-radius: 6px; - -moz-border-radius-bottomright: 6px; - -webkit-border-bottom-right-radius: 6px; - -o-border-bottom-right-radius: 6px; - -ms-border-bottom-right-radius: 6px; - -khtml-border-bottom-right-radius: 6px; - border-bottom-right-radius: 6px; - margin: 0 0 20px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { - float: none; - clear: both; - overflow: hidden; - display: block; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { - padding: 4px 0 0 10px; - display: inline-block; - font-size: 0.9em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { - display: block; - clear: none; - float: left; - padding: 6px 8px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { - background-image: url('../images/throbber.gif'); - width: 128px; - height: 16px; - display: block; - clear: none; - float: right; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { - outline: 2px solid black; - outline-color: #cc0000; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { - max-width: 300px; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - padding: 10px; - font-size: 0.9em; - max-height: 400px; - overflow-y: auto; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { - background-color: #f9f2e9; - border: 1px solid #f0e0ca; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { - background-color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #f0e0ca; - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { - background-color: #faf5ee; - border: 1px solid #f0e0ca; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { - color: #c5862b; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { - color: #dcb67f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { - background-color: #fcffcd; - border: 1px solid black; - border-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #ffd20f; - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { - background-color: #fcffcd; - border: 1px solid black; - border-color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { - color: #ffd20f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { - color: #6fc992; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { - background-color: #f5e8e8; - border: 1px solid #e8c6c7; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { - text-transform: uppercase; - background-color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #e8c6c7; - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - background-color: #f7eded; - border: 1px solid #e8c6c7; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { - color: #a41e22; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { - color: #c8787a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { - background-color: #e7f6ec; - border: 1px solid #c3e8d1; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { - background-color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3e8d1; - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { - background-color: #ebf7f0; - border: 1px solid #c3e8d1; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { - color: #10a54a; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { - color: #6fc992; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { - background-color: #FCE9E3; - border: 1px solid #F5D5C3; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { - background-color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #f0cecb; - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { - background-color: #faf0ef; - border: 1px solid #f0cecb; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { - color: #D38042; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { - color: #dcb67f; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { - background-color: #e7f0f7; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { - background-color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3d9ec; - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { - color: #6fa5d2; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { - background-color: #e7f0f7; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { - background-color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { - border-right: 1px solid #dddddd; - border-right-color: #c3d9ec; - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { - color: #0f6ab4; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { - color: #6fa5d2; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { - border-top: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { - padding-right: 0; - border-right: none; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { - text-decoration: underline; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, -.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { - padding-left: 0; -} -.swagger-section .swagger-ui-wrap p#colophon { - margin: 0 15px 40px 15px; - padding: 10px 0; - font-size: 0.8em; - border-top: 1px solid #dddddd; - font-family: "Droid Sans", sans-serif; - color: #999999; - font-style: italic; -} -.swagger-section .swagger-ui-wrap p#colophon a { - text-decoration: none; - color: #547f00; -} -.swagger-section .swagger-ui-wrap h3 { - color: black; - font-size: 1.1em; - padding: 10px 0 10px 0; -} -.swagger-section .swagger-ui-wrap .markdown ol, -.swagger-section .swagger-ui-wrap .markdown ul { - font-family: "Droid Sans", sans-serif; - margin: 5px 0 10px; - padding: 0 0 0 18px; - list-style-type: disc; -} -.swagger-section .swagger-ui-wrap form.form_box { - background-color: #ebf3f9; - border: 1px solid #c3d9ec; - padding: 10px; -} -.swagger-section .swagger-ui-wrap form.form_box label { - color: #0f6ab4 !important; -} -.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { - display: block; - padding: 10px; -} -.swagger-section .swagger-ui-wrap form.form_box p.weak { - font-size: 0.8em; -} -.swagger-section .swagger-ui-wrap form.form_box p { - font-size: 0.9em; - padding: 0 0 15px; - color: #7e7b6d; -} -.swagger-section .swagger-ui-wrap form.form_box p a { - color: #646257; -} -.swagger-section .swagger-ui-wrap form.form_box p strong { - color: black; -} -.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { - padding-bottom: 0; -} -.swagger-section .title { - font-style: bold; -} -.swagger-section .secondary_form { - display: none; -} -.swagger-section .main_image { - display: block; - margin-left: auto; - margin-right: auto; -} -.swagger-section .oauth_body { - margin-left: 100px; - margin-right: 100px; -} -.swagger-section .oauth_submit { - text-align: center; -} -.swagger-section .api-popup-dialog { - z-index: 10000; - position: absolute; - width: 500px; - background: #FFF; - padding: 20px; - border: 1px solid #ccc; - border-radius: 5px; - display: none; - font-size: 13px; - color: #777; -} -.swagger-section .api-popup-dialog .api-popup-title { - font-size: 24px; - padding: 10px 0; -} -.swagger-section .api-popup-dialog .api-popup-title { - font-size: 24px; - padding: 10px 0; -} -.swagger-section .api-popup-dialog .error-msg { - padding-left: 5px; - padding-bottom: 5px; -} -.swagger-section .api-popup-dialog .api-popup-authbtn { - height: 30px; -} -.swagger-section .api-popup-dialog .api-popup-cancel { - height: 30px; -} -.swagger-section .api-popup-scopes { - padding: 10px 20px; -} -.swagger-section .api-popup-scopes li { - padding: 5px 0; - line-height: 20px; -} -.swagger-section .api-popup-scopes li input { - position: relative; - top: 2px; -} -.swagger-section .api-popup-scopes .api-scope-desc { - padding-left: 20px; - font-style: italic; -} -.swagger-section .api-popup-actions { - padding-top: 10px; -} -.swagger-section .access { - float: right; -} -.swagger-section .auth { - float: right; -} -.swagger-section .api-ic { - height: 18px; - vertical-align: middle; - display: inline-block; - background: url(../images/explorer_icons.png) no-repeat; -} -.swagger-section .api-ic .api_information_panel { - position: relative; - margin-top: 20px; - margin-left: -5px; - background: #FFF; - border: 1px solid #ccc; - border-radius: 5px; - display: none; - font-size: 13px; - max-width: 300px; - line-height: 30px; - color: black; - padding: 5px; -} -.swagger-section .api-ic .api_information_panel p .api-msg-enabled { - color: green; -} -.swagger-section .api-ic .api_information_panel p .api-msg-disabled { - color: red; -} -.swagger-section .api-ic:hover .api_information_panel { - position: absolute; - display: block; -} -.swagger-section .ic-info { - background-position: 0 0; - width: 18px; - margin-top: -6px; - margin-left: 4px; -} -.swagger-section .ic-warning { - background-position: -60px 0; - width: 18px; - margin-top: -6px; - margin-left: 4px; -} -.swagger-section .ic-error { - background-position: -30px 0; - width: 18px; - margin-top: -6px; - margin-left: 4px; -} -.swagger-section .ic-off { - background-position: -90px 0; - width: 58px; - margin-top: -4px; - cursor: pointer; -} -.swagger-section .ic-on { - background-position: -160px 0; - width: 58px; - margin-top: -4px; - cursor: pointer; -} -.swagger-section #header { - background-color: rgb(163, 188, 210); - padding: 14px; -} -.swagger-section #input_baseUrl { - width: 400px; -} -.swagger-section #api_selector { - display: block; - clear: none; - float: right; -} -.swagger-section #api_selector .input { - display: block; - clear: none; - float: left; - margin: 0 10px 0 0; -} -.swagger-section #api_selector input { - font-size: 0.9em; - padding: 3px; - margin: 0; -} -.swagger-section #input_apiKey { - width: 200px; -} -.swagger-section #explore { - display: block; - text-decoration: none; - font-weight: bold; - padding: 6px 8px; - font-size: 0.9em; - color: white; - background-color: #000000; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -o-border-radius: 4px; - -ms-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; -} -.swagger-section #explore:hover { - background-color: #a41e22; -} -.swagger-section #header #logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../../../../theme/eldy/img/favicon.ico) no-repeat left center; - padding: 20px 0 20px 40px; - color: white; -} -.swagger-section #content_message { - margin: 10px 15px; - font-style: italic; - color: #999999; -} -.swagger-section #message-bar { - min-height: 30px; - text-align: center; - padding-top: 10px; -} -.swagger-section .swagger-collapse:before { - content: "-"; -} -.swagger-section .swagger-expand:before { - content: "+"; -} - -#input_baseUrl { - display: none; -} +.swagger-section pre code{display:block;padding:.5em;background:#f0f0f0}.swagger-section pre .clojure .built_in,.swagger-section pre .lisp .title,.swagger-section pre .nginx .title,.swagger-section pre .subst,.swagger-section pre .tag .title,.swagger-section pre code{color:#000}.swagger-section pre .addition,.swagger-section pre .aggregate,.swagger-section pre .apache .cbracket,.swagger-section pre .apache .tag,.swagger-section pre .bash .variable,.swagger-section pre .constant,.swagger-section pre .django .variable,.swagger-section pre .erlang_repl .function_or_atom,.swagger-section pre .flow,.swagger-section pre .markdown .header,.swagger-section pre .parent,.swagger-section pre .preprocessor,.swagger-section pre .ruby .symbol,.swagger-section pre .ruby .symbol .string,.swagger-section pre .rules .value,.swagger-section pre .rules .value .number,.swagger-section pre .smalltalk .class,.swagger-section pre .stream,.swagger-section pre .string,.swagger-section pre .tag .value,.swagger-section pre .template_tag,.swagger-section pre .tex .command,.swagger-section pre .tex .special,.swagger-section pre .title{color:#800}.swagger-section pre .annotation,.swagger-section pre .chunk,.swagger-section pre .comment,.swagger-section pre .diff .header,.swagger-section pre .markdown .blockquote,.swagger-section pre .template_comment{color:#888}.swagger-section pre .change,.swagger-section pre .date,.swagger-section pre .go .constant,.swagger-section pre .literal,.swagger-section pre .markdown .bullet,.swagger-section pre .markdown .link_url,.swagger-section pre .number,.swagger-section pre .regexp,.swagger-section pre .smalltalk .char,.swagger-section pre .smalltalk .symbol{color:#080}.swagger-section pre .apache .sqbracket,.swagger-section pre .array,.swagger-section pre .attr_selector,.swagger-section pre .clojure .attribute,.swagger-section pre .coffeescript .property,.swagger-section pre .decorator,.swagger-section pre .deletion,.swagger-section pre .doctype,.swagger-section pre .envvar,.swagger-section pre .erlang_repl .reserved,.swagger-section pre .filter .argument,.swagger-section pre .important,.swagger-section pre .javadoc,.swagger-section pre .label,.swagger-section pre .localvars,.swagger-section pre .markdown .link_label,.swagger-section pre .nginx .built_in,.swagger-section pre .pi,.swagger-section pre .prompt,.swagger-section pre .pseudo,.swagger-section pre .ruby .string,.swagger-section pre .shebang,.swagger-section pre .tex .formula,.swagger-section pre .vhdl .attribute{color:#88f}.swagger-section pre .aggregate,.swagger-section pre .apache .tag,.swagger-section pre .bash .variable,.swagger-section pre .built_in,.swagger-section pre .css .tag,.swagger-section pre .go .typename,.swagger-section pre .id,.swagger-section pre .javadoctag,.swagger-section pre .keyword,.swagger-section pre .markdown .strong,.swagger-section pre .phpdoc,.swagger-section pre .request,.swagger-section pre .smalltalk .class,.swagger-section pre .status,.swagger-section pre .tex .command,.swagger-section pre .title,.swagger-section pre .winutils,.swagger-section pre .yardoctag{font-weight:700}.swagger-section pre .markdown .emphasis{font-style:italic}.swagger-section pre .nginx .built_in{font-weight:400}.swagger-section pre .coffeescript .javascript,.swagger-section pre .javascript .xml,.swagger-section pre .tex .formula,.swagger-section pre .xml .cdata,.swagger-section pre .xml .css,.swagger-section pre .xml .javascript,.swagger-section pre .xml .vbscript{opacity:.5}.swagger-section .hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0}.swagger-section .hljs,.swagger-section .hljs-subst{color:#444}.swagger-section .hljs-attribute,.swagger-section .hljs-doctag,.swagger-section .hljs-keyword,.swagger-section .hljs-meta-keyword,.swagger-section .hljs-name,.swagger-section .hljs-selector-tag{font-weight:700}.swagger-section .hljs-addition,.swagger-section .hljs-built_in,.swagger-section .hljs-bullet,.swagger-section .hljs-code,.swagger-section .hljs-literal{color:#1f811f}.swagger-section .hljs-link,.swagger-section .hljs-regexp,.swagger-section .hljs-selector-attr,.swagger-section .hljs-selector-pseudo,.swagger-section .hljs-symbol,.swagger-section .hljs-template-variable,.swagger-section .hljs-variable{color:#bc6060}.swagger-section .hljs-deletion,.swagger-section .hljs-number,.swagger-section .hljs-quote,.swagger-section .hljs-selector-class,.swagger-section .hljs-selector-id,.swagger-section .hljs-string,.swagger-section .hljs-template-tag,.swagger-section .hljs-type{color:#800}.swagger-section .hljs-section,.swagger-section .hljs-title{color:#800;font-weight:700}.swagger-section .hljs-comment{color:#888}.swagger-section .hljs-meta{color:#2b6ea1}.swagger-section .hljs-emphasis{font-style:italic}.swagger-section .hljs-strong{font-weight:700}.swagger-section .swagger-ui-wrap{line-height:1;font-family:Droid Sans,sans-serif;min-width:760px;max-width:960px;margin-left:auto;margin-right:auto}.swagger-section .swagger-ui-wrap b,.swagger-section .swagger-ui-wrap strong{font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap blockquote,.swagger-section .swagger-ui-wrap q{quotes:none}.swagger-section .swagger-ui-wrap p{line-height:1.4em;padding:0 0 10px;color:#333}.swagger-section .swagger-ui-wrap blockquote:after,.swagger-section .swagger-ui-wrap blockquote:before,.swagger-section .swagger-ui-wrap q:after,.swagger-section .swagger-ui-wrap q:before{content:none}.swagger-section .swagger-ui-wrap .heading_with_menu h1,.swagger-section .swagger-ui-wrap .heading_with_menu h2,.swagger-section .swagger-ui-wrap .heading_with_menu h3,.swagger-section .swagger-ui-wrap .heading_with_menu h4,.swagger-section .swagger-ui-wrap .heading_with_menu h5,.swagger-section .swagger-ui-wrap .heading_with_menu h6{display:block;clear:none;float:left;-ms-box-sizing:border-box;box-sizing:border-box;width:60%}.swagger-section .swagger-ui-wrap table{border-collapse:collapse;border-spacing:0}.swagger-section .swagger-ui-wrap table thead tr th{padding:5px;font-size:.9em;color:#666;border-bottom:1px solid #999}.swagger-section .swagger-ui-wrap table tbody tr:last-child td{border-bottom:none}.swagger-section .swagger-ui-wrap table tbody tr.offset{background-color:#f0f0f0}.swagger-section .swagger-ui-wrap table tbody tr td{padding:6px;font-size:.9em;border-bottom:1px solid #ccc;vertical-align:top;line-height:1.3em}.swagger-section .swagger-ui-wrap ol{margin:0 0 10px;padding:0 0 0 18px;list-style-type:decimal}.swagger-section .swagger-ui-wrap ol li{padding:5px 0;font-size:.9em;color:#333}.swagger-section .swagger-ui-wrap ol,.swagger-section .swagger-ui-wrap ul{list-style:none}.swagger-section .swagger-ui-wrap h1 a,.swagger-section .swagger-ui-wrap h2 a,.swagger-section .swagger-ui-wrap h3 a,.swagger-section .swagger-ui-wrap h4 a,.swagger-section .swagger-ui-wrap h5 a,.swagger-section .swagger-ui-wrap h6 a{text-decoration:none}.swagger-section .swagger-ui-wrap h1 a:hover,.swagger-section .swagger-ui-wrap h2 a:hover,.swagger-section .swagger-ui-wrap h3 a:hover,.swagger-section .swagger-ui-wrap h4 a:hover,.swagger-section .swagger-ui-wrap h5 a:hover,.swagger-section .swagger-ui-wrap h6 a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap h1 span.divider,.swagger-section .swagger-ui-wrap h2 span.divider,.swagger-section .swagger-ui-wrap h3 span.divider,.swagger-section .swagger-ui-wrap h4 span.divider,.swagger-section .swagger-ui-wrap h5 span.divider,.swagger-section .swagger-ui-wrap h6 span.divider{color:#aaa}.swagger-section .swagger-ui-wrap a{color:#547f00}.swagger-section .swagger-ui-wrap a img{border:none}.swagger-section .swagger-ui-wrap article,.swagger-section .swagger-ui-wrap aside,.swagger-section .swagger-ui-wrap details,.swagger-section .swagger-ui-wrap figcaption,.swagger-section .swagger-ui-wrap figure,.swagger-section .swagger-ui-wrap footer,.swagger-section .swagger-ui-wrap header,.swagger-section .swagger-ui-wrap hgroup,.swagger-section .swagger-ui-wrap menu,.swagger-section .swagger-ui-wrap nav,.swagger-section .swagger-ui-wrap section,.swagger-section .swagger-ui-wrap summary{display:block}.swagger-section .swagger-ui-wrap pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#fcf6db;border:1px solid #e5e0c6;padding:10px}.swagger-section .swagger-ui-wrap pre code{line-height:1.6em;background:none}.swagger-section .swagger-ui-wrap .content>.content-type>div>label{clear:both;display:block;color:#0f6ab4;font-size:1.1em;margin:0;padding:15px 0 5px}.swagger-section .swagger-ui-wrap .content pre{font-size:12px;margin-top:5px;padding:5px}.swagger-section .swagger-ui-wrap .icon-btn{cursor:pointer}.swagger-section .swagger-ui-wrap .info_title{padding-bottom:10px;font-weight:700;font-size:25px}.swagger-section .swagger-ui-wrap .footer{margin-top:20px}.swagger-section .swagger-ui-wrap div.big p,.swagger-section .swagger-ui-wrap p.big{font-size:1em;margin-bottom:10px}.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input,.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input{width:500px!important}.swagger-section .swagger-ui-wrap .info_license,.swagger-section .swagger-ui-wrap .info_tos{padding-bottom:5px}.swagger-section .swagger-ui-wrap .message-fail{color:#c00}.swagger-section .swagger-ui-wrap .info_email,.swagger-section .swagger-ui-wrap .info_name,.swagger-section .swagger-ui-wrap .info_url{padding-bottom:5px}.swagger-section .swagger-ui-wrap .info_description{padding-bottom:10px;font-size:15px}.swagger-section .swagger-ui-wrap .markdown ol li,.swagger-section .swagger-ui-wrap .markdown ul li{padding:3px 0;line-height:1.4em;color:#333}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input{display:block;padding:4px;width:auto;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title{font-size:1.3em}.swagger-section .swagger-ui-wrap table.fullwidth{width:100%}.swagger-section .swagger-ui-wrap .model-signature{font-family:Droid Sans,sans-serif;font-size:1em;line-height:1.5em}.swagger-section .swagger-ui-wrap .model-signature .signature-nav a{text-decoration:none;color:#aaa}.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover{text-decoration:underline;color:#000}.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected{color:#000;text-decoration:none}.swagger-section .swagger-ui-wrap .model-signature .propType{color:#55a}.swagger-section .swagger-ui-wrap .model-signature pre:hover{background-color:#ffd}.swagger-section .swagger-ui-wrap .model-signature pre{font-size:.85em;line-height:1.2em;overflow:auto;height:200px;resize:vertical;cursor:pointer}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav{display:block;min-width:230px;margin:0;padding:0}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li{float:left;margin:0 5px 5px 0;padding:2px 5px 2px 0;border-right:1px solid #ddd}.swagger-section .swagger-ui-wrap .model-signature .propOpt{color:#555}.swagger-section .swagger-ui-wrap .model-signature .snippet small{font-size:.75em}.swagger-section .swagger-ui-wrap .model-signature .propOptKey{font-style:italic}.swagger-section .swagger-ui-wrap .model-signature .description .strong{font-weight:700;color:#000;font-size:.9em}.swagger-section .swagger-ui-wrap .model-signature .description div{font-size:.9em;line-height:1.5em;margin-left:1em}.swagger-section .swagger-ui-wrap .model-signature .description .stronger{font-weight:700;color:#000}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper{border-spacing:0;position:absolute;background-color:#fff;border:1px solid #bbb;display:none;font-size:11px;max-width:400px;line-height:30px;color:#000;padding:5px;margin-left:10px}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th{text-align:center;background-color:#eee;border:1px solid #bbb;font-size:11px;color:#666;font-weight:700;padding:5px;line-height:15px}.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName{font-weight:700}.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:first-child,.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:last-child{display:inline}.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown>p:not(:first-child):before{display:block;content:''}.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown>p:only-child{margin-right:-3px}.swagger-section .swagger-ui-wrap .model-signature .propName{font-weight:700}.swagger-section .swagger-ui-wrap .model-signature .signature-container{clear:both}.swagger-section .swagger-ui-wrap .body-textarea{width:300px;height:100px;border:1px solid #aaa}.swagger-section .swagger-ui-wrap .markdown li code,.swagger-section .swagger-ui-wrap .markdown p code{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#f0f0f0;color:#000;padding:1px 3px}.swagger-section .swagger-ui-wrap .required{font-weight:700}.swagger-section .swagger-ui-wrap .editor_holder{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;font-size:.9em}.swagger-section .swagger-ui-wrap .editor_holder label{font-weight:400!important}.swagger-section .swagger-ui-wrap .editor_holder label.required{font-weight:700!important}.swagger-section .swagger-ui-wrap input.parameter{width:300px;border:1px solid #aaa}.swagger-section .swagger-ui-wrap h1{color:#000;font-size:1.5em;line-height:1.3em;padding:10px 0;font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap .heading_with_menu{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap .heading_with_menu ul{display:block;clear:none;float:right;-ms-box-sizing:border-box;box-sizing:border-box;margin-top:10px}.swagger-section .swagger-ui-wrap h2{color:#000;font-size:1.3em;padding:10px 0}.swagger-section .swagger-ui-wrap h2 a{color:#000}.swagger-section .swagger-ui-wrap h2 span.sub{font-size:.7em;color:#999;font-style:italic}.swagger-section .swagger-ui-wrap h2 span.sub a{color:#777}.swagger-section .swagger-ui-wrap span.weak{color:#666}.swagger-section .swagger-ui-wrap .message-success{color:#89bf04}.swagger-section .swagger-ui-wrap caption,.swagger-section .swagger-ui-wrap td,.swagger-section .swagger-ui-wrap th{text-align:left;font-weight:400;vertical-align:middle}.swagger-section .swagger-ui-wrap .code{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea{font-family:Droid Sans,sans-serif;height:250px;padding:4px;display:block;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select{display:block;clear:both}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label{display:block;float:left;clear:none;margin:0;padding:0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input{display:block;float:left;clear:none;margin:0 5px 0 0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label{color:#000}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label{display:block;clear:both;width:auto;padding:0 0 3px;color:#666}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr{padding-left:3px;color:#888}.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints{margin-left:0;font-style:italic;font-size:.9em;margin:0}.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons{margin:0;padding:0}.swagger-section .swagger-ui-wrap span.blank,.swagger-section .swagger-ui-wrap span.empty{color:#888;font-style:italic}.swagger-section .swagger-ui-wrap .markdown h3{color:#547f00}.swagger-section .swagger-ui-wrap .markdown h4{color:#666}.swagger-section .swagger-ui-wrap .markdown pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;background-color:#fcf6db;border:1px solid #e5e0c6;padding:10px;margin:0 0 10px}.swagger-section .swagger-ui-wrap .markdown pre code{line-height:1.6em;overflow:auto}.swagger-section .swagger-ui-wrap div.gist{margin:20px 0 25px!important}.swagger-section .swagger-ui-wrap ul#resources{font-family:Droid Sans,sans-serif;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource{border-bottom:1px solid #ddd}.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a,.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a,.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a{color:#555}.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child{border-bottom:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading{border:1px solid transparent;float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options{overflow:hidden;padding:0;display:block;clear:none;float:right;margin:14px 10px 0 0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li{float:left;clear:none;margin:0;padding:2px 10px;border-right:1px solid #ddd;color:#666;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a{color:#aaa;text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover{text-decoration:underline;color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child{padding-left:0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first,.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child{padding-left:0}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2{color:#999;padding-left:0;display:block;clear:none;float:left;font-family:Droid Sans,sans-serif;font-weight:700}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a{color:#999}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation{float:none;clear:both;overflow:hidden;display:block;margin:0 0 10px;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading{float:none;clear:both;overflow:hidden;display:block;margin:0;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3{display:block;clear:none;float:left;width:auto;margin:0;padding:0;line-height:1.1em;color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path{padding-left:10px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a{color:#000;text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated{text-decoration:line-through}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a{text-transform:uppercase;text-decoration:none;color:#fff;display:inline-block;width:50px;font-size:.7em;text-align:center;padding:7px 0 4px;border-radius:2px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span{margin:0;padding:0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options{overflow:hidden;padding:0;display:block;clear:none;float:right;margin:6px 10px 0 0}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li{float:left;clear:none;margin:0;padding:2px 10px;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a{text-decoration:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .markdown p{color:inherit;padding:0;line-height:inherit}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a .nickname{color:#aaa;padding:0;line-height:inherit}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content{border-top:none;padding:10px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;margin:0 0 20px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4{font-size:1.1em;margin:0;padding:15px 0 5px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header{float:none;clear:both;overflow:hidden;display:block}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a{padding:4px 0 0 10px;display:inline-block;font-size:.9em}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit{display:block;clear:none;float:left;padding:6px 8px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber{background-image:url(../images/throbber.gif);width:128px;height:16px;display:block;clear:none;float:right}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type=text].error{outline:2px solid #000;outline-color:#c00}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name=parameterContentType]{max-width:300px}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre{font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;padding:10px;font-size:.9em;max-height:400px;overflow-y:auto}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading{background-color:#f9f2e9;border:1px solid #f0e0ca}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a{background-color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#f0e0ca;color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a{color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content{background-color:#faf5ee;border:1px solid #f0e0ca}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4{color:#c5862b}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a{color:#dcb67f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading{background-color:#fcffcd;border:1px solid #000;border-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a{text-transform:uppercase;background-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#ffd20f;color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a{color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content{background-color:#fcffcd;border:1px solid #000;border-color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4{color:#ffd20f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a{color:#6fc992}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading{background-color:#f5e8e8;border:1px solid #e8c6c7}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a{text-transform:uppercase;background-color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#e8c6c7;color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a{color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content{background-color:#f7eded;border:1px solid #e8c6c7}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4{color:#a41e22}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a{color:#c8787a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading{background-color:#e7f6ec;border:1px solid #c3e8d1}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a{background-color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3e8d1;color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a{color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content{background-color:#ebf7f0;border:1px solid #c3e8d1}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4{color:#10a54a}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a{color:#6fc992}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading{background-color:#fce9e3;border:1px solid #f5d5c3}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a{background-color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#f0cecb;color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a{color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content{background-color:#faf0ef;border:1px solid #f0cecb}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4{color:#d38042}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a{color:#dcb67f}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading{background-color:#e7f0f7;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a{background-color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3d9ec;color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content{background-color:#ebf3f9;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a{color:#6fa5d2}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading{background-color:#e7f0f7;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a{background-color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li{border-right:1px solid #ddd;border-right-color:#c3d9ec;color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content{background-color:#ebf3f9;border:1px solid #c3d9ec}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4{color:#0f6ab4}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a{color:#6fa5d2}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content{border-top:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child{padding-right:0;border-right:none}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover{text-decoration:underline}.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first,.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child{padding-left:0}.swagger-section .swagger-ui-wrap p#colophon{margin:0 15px 40px;padding:10px 0;font-size:.8em;border-top:1px solid #ddd;font-family:Droid Sans,sans-serif;color:#999;font-style:italic}.swagger-section .swagger-ui-wrap p#colophon a{text-decoration:none;color:#547f00}.swagger-section .swagger-ui-wrap h3{color:#000;font-size:1.1em;padding:10px 0}.swagger-section .swagger-ui-wrap .markdown ol,.swagger-section .swagger-ui-wrap .markdown ul{font-family:Droid Sans,sans-serif;margin:5px 0 10px;padding:0 0 0 18px;list-style-type:disc}.swagger-section .swagger-ui-wrap form.form_box{background-color:#ebf3f9;border:1px solid #c3d9ec;padding:10px}.swagger-section .swagger-ui-wrap form.form_box label{color:#0f6ab4!important}.swagger-section .swagger-ui-wrap form.form_box input[type=submit]{display:block;padding:10px}.swagger-section .swagger-ui-wrap form.form_box p.weak{font-size:.8em}.swagger-section .swagger-ui-wrap form.form_box p{font-size:.9em;padding:0 0 15px;color:#7e7b6d}.swagger-section .swagger-ui-wrap form.form_box p a{color:#646257}.swagger-section .swagger-ui-wrap form.form_box p strong{color:#000}.swagger-section .swagger-ui-wrap .operation-status td.markdown>p:last-child{padding-bottom:0}.swagger-section .title{font-style:bold}.swagger-section .secondary_form{display:none}.swagger-section .main_image{display:block;margin-left:auto;margin-right:auto}.swagger-section .oauth_body{margin-left:100px;margin-right:100px}.swagger-section .oauth_submit{text-align:center;display:inline-block}.swagger-section .authorize-wrapper{margin:15px 0 10px}.swagger-section .authorize-wrapper_operation{float:right}.swagger-section .authorize__btn:hover{text-decoration:underline;cursor:pointer}.swagger-section .authorize__btn_operation:hover .authorize-scopes{display:block}.swagger-section .authorize-scopes{position:absolute;margin-top:20px;background:#fff;border:1px solid #ccc;border-radius:5px;display:none;font-size:13px;max-width:300px;line-height:30px;color:#000;padding:5px}.swagger-section .authorize-scopes .authorize__scope{text-decoration:none}.swagger-section .authorize__btn_operation{height:18px;vertical-align:middle;display:inline-block;background:url(../images/explorer_icons.png) no-repeat}.swagger-section .authorize__btn_operation_login{background-position:0 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section .authorize__btn_operation_logout{background-position:-30px 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section #auth_container{color:#fff;display:inline-block;border:none;padding:5px;width:87px;height:13px}.swagger-section #auth_container .authorize__btn{color:#fff}.swagger-section .auth_container{padding:0 0 10px;margin-bottom:5px;border-bottom:1px solid #ccc;font-size:.9em}.swagger-section .auth_container .auth__title{color:#547f00;font-size:1.2em}.swagger-section .auth_container .basic_auth__label{display:inline-block;width:60px}.swagger-section .auth_container .auth__description{color:#999;margin-bottom:5px}.swagger-section .auth_container .auth__button{margin-top:10px;height:30px}.swagger-section .auth_container .key_auth__field{margin:5px 0}.swagger-section .auth_container .key_auth__label{display:inline-block;width:60px}.swagger-section .api-popup-dialog{position:absolute;display:none}.swagger-section .api-popup-dialog-wrapper{z-index:2;width:500px;background:#fff;padding:20px;border:1px solid #ccc;border-radius:5px;font-size:13px;color:#777;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.swagger-section .api-popup-dialog-shadow{position:fixed;top:0;left:0;width:100%;height:100%;opacity:.2;background-color:gray;z-index:1}.swagger-section .api-popup-dialog .api-popup-title{font-size:24px;padding:10px 0}.swagger-section .api-popup-dialog .error-msg{padding-left:5px;padding-bottom:5px}.swagger-section .api-popup-dialog .api-popup-content{max-height:500px;overflow-y:auto}.swagger-section .api-popup-dialog .api-popup-authbtn,.swagger-section .api-popup-dialog .api-popup-cancel{height:30px}.swagger-section .api-popup-scopes{padding:10px 20px}.swagger-section .api-popup-scopes li{padding:5px 0;line-height:20px}.swagger-section .api-popup-scopes li input{position:relative;top:2px}.swagger-section .api-popup-scopes .api-scope-desc{padding-left:20px;font-style:italic}.swagger-section .api-popup-actions{padding-top:10px}.swagger-section fieldset{padding-bottom:10px;padding-left:20px}.swagger-section .access,.swagger-section .auth{float:right}.swagger-section .api-ic{height:18px;vertical-align:middle;display:inline-block;background:url(../images/explorer_icons.png) no-repeat}.swagger-section .api-ic .api_information_panel{position:relative;margin-top:20px;margin-left:-5px;background:#fff;border:1px solid #ccc;border-radius:5px;display:none;font-size:13px;max-width:300px;line-height:30px;color:#000;padding:5px}.swagger-section .api-ic .api_information_panel p .api-msg-enabled{color:green}.swagger-section .api-ic .api_information_panel p .api-msg-disabled{color:red}.swagger-section .api-ic:hover .api_information_panel{position:absolute;display:block}.swagger-section .ic-info{background-position:0 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section .ic-warning{background-position:-60px 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section .ic-error{background-position:-30px 0;width:18px;margin-top:-6px;margin-left:4px}.swagger-section .ic-off{background-position:-90px 0;width:58px;margin-top:-4px;cursor:pointer}.swagger-section .ic-on{background-position:-160px 0;width:58px;margin-top:-4px;cursor:pointer}.swagger-section #header{background-color:#89bf04;padding:9px 14px 19px;height:23px;min-width:775px}.swagger-section #input_baseUrl{width:400px}.swagger-section #api_selector{display:block;clear:none;float:right}.swagger-section #api_selector .input{display:inline-block;clear:none;margin:0 10px 0 0}.swagger-section #api_selector input{font-size:.9em;padding:3px;margin:0}.swagger-section #input_apiKey{width:200px}.swagger-section #auth_container .authorize__btn,.swagger-section #explore{display:block;text-decoration:none;font-weight:700;padding:6px 8px;font-size:.9em;color:#fff;background-color:#547f00;border-radius:4px}.swagger-section #auth_container .authorize__btn:hover,.swagger-section #explore:hover{background-color:#547f00}.swagger-section #header #logo{font-size:1.5em;font-weight:700;text-decoration:none;color:#fff}.swagger-section #header #logo .logo__img{display:block;float:left;margin-top:2px}.swagger-section #header #logo .logo__title{display:inline-block;padding:5px 0 0 10px}.swagger-section #content_message{margin:10px 15px;font-style:italic;color:#999}.swagger-section #message-bar{min-height:30px;text-align:center;padding-top:10px}.swagger-section .swagger-collapse:before{content:"-"}.swagger-section .swagger-expand:before{content:"+"}.swagger-section .error{outline-color:#c00;background-color:#f2dede} \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/style.css b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/style.css index fc21a31db54..52907e46365 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/style.css +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/style.css @@ -1,250 +1 @@ -.swagger-section #header a#logo { - font-size: 1.5em; - font-weight: bold; - text-decoration: none; - background: transparent url(../images/logo.png) no-repeat left center; - padding: 20px 0 20px 40px; -} -#text-head { - font-size: 80px; - font-family: 'Roboto', sans-serif; - color: #ffffff; - float: right; - margin-right: 20%; -} -.navbar-fixed-top .navbar-nav { - height: auto; -} -.navbar-fixed-top .navbar-brand { - height: auto; -} -.navbar-header { - height: auto; -} -.navbar-inverse { - background-color: #000; - border-color: #000; -} -#navbar-brand { - margin-left: 20%; -} -.navtext { - font-size: 10px; -} -.h1, -h1 { - font-size: 60px; -} -.navbar-default .navbar-header .navbar-brand { - color: #a2dfee; -} -/* tag titles */ -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { - color: #393939; - font-family: 'Arvo', serif; - font-size: 1.5em; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { - color: black; -} -.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { - color: #525252; - padding-left: 0px; - display: block; - clear: none; - float: left; - font-family: 'Arvo', serif; - font-weight: bold; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #0A0A0A; -} -.container1 { - width: 1500px; - margin: auto; - margin-top: 0; - background-image: url('../images/shield.png'); - background-repeat: no-repeat; - background-position: -40px -20px; - margin-bottom: 210px; -} -.container-inner { - width: 1200px; - margin: auto; - background-color: rgba(223, 227, 228, 0.75); - padding-bottom: 40px; - padding-top: 40px; - border-radius: 15px; -} -.header-content { - padding: 0; - width: 1000px; -} -.title1 { - font-size: 80px; - font-family: 'Vollkorn', serif; - color: #404040; - text-align: center; - padding-top: 40px; - padding-bottom: 100px; -} -#icon { - margin-top: -18px; -} -.subtext { - font-size: 25px; - font-style: italic; - color: #08b; - text-align: right; - padding-right: 250px; -} -.bg-primary { - background-color: #00468b; -} -.navbar-default .nav > li > a, -.navbar-default .nav > li > a:focus { - color: #08b; -} -.navbar-default .nav > li > a, -.navbar-default .nav > li > a:hover { - color: #08b; -} -.navbar-default .nav > li > a, -.navbar-default .nav > li > a:focus:hover { - color: #08b; -} -.text-faded { - font-size: 25px; - font-family: 'Vollkorn', serif; -} -.section-heading { - font-family: 'Vollkorn', serif; - font-size: 45px; - padding-bottom: 10px; -} -hr { - border-color: #00468b; - padding-bottom: 10px; -} -.description { - margin-top: 20px; - padding-bottom: 200px; -} -.description li { - font-family: 'Vollkorn', serif; - font-size: 25px; - color: #525252; - margin-left: 28%; - padding-top: 5px; -} -.gap { - margin-top: 200px; -} -.troubleshootingtext { - color: rgba(255, 255, 255, 0.7); - padding-left: 30%; -} -.troubleshootingtext li { - list-style-type: circle; - font-size: 25px; - padding-bottom: 5px; -} -.overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1000; -} -.block.response_body.json:hover { - cursor: pointer; -} -.backdrop { - color: blue; -} -#myModal { - height: 100%; -} -.modal-backdrop { - bottom: 0; - position: fixed; -} -.curl { - padding: 10px; - font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; - font-size: 0.9em; - max-height: 400px; - margin-top: 5px; - overflow-y: auto; - background-color: #fcf6db; - border: 1px solid #e5e0c6; - border-radius: 4px; -} -.curl_title { - font-size: 1.1em; - margin: 0; - padding: 15px 0 5px; - font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif; - font-weight: 500; - line-height: 1.1; -} -.footer { - display: none; -} -.swagger-section .swagger-ui-wrap h2 { - padding: 0; -} -h2 { - margin: 0; - margin-bottom: 5px; -} -.markdown p { - font-size: 15px; - font-family: 'Arvo', serif; -} -.swagger-section .swagger-ui-wrap .code { - font-size: 15px; - font-family: 'Arvo', serif; -} -.swagger-section .swagger-ui-wrap b { - font-family: 'Arvo', serif; -} -#signin:hover { - cursor: pointer; -} -.dropdown-menu { - padding: 15px; -} -.navbar-right .dropdown-menu { - left: 0; - right: auto; -} -#signinbutton { - width: 100%; - height: 32px; - font-size: 13px; - font-weight: bold; - color: #08b; -} -.navbar-default .nav > li .details { - color: #000000; - text-transform: none; - font-size: 15px; - font-weight: normal; - font-family: 'Open Sans', sans-serif; - font-style: italic; - line-height: 20px; - top: -2px; -} -.navbar-default .nav > li .details:hover { - color: black; -} -#signout { - width: 100%; - height: 32px; - font-size: 13px; - font-weight: bold; - color: #08b; -} +.swagger-section #header a#logo{font-size:1.5em;font-weight:700;text-decoration:none;padding:20px 0 20px 40px}#text-head{font-size:80px;font-family:Roboto,sans-serif;color:#fff;float:right;margin-right:20%}.navbar-fixed-top .navbar-brand,.navbar-fixed-top .navbar-nav,.navbar-header{height:auto}.navbar-inverse{background-color:#000;border-color:#000}#navbar-brand{margin-left:20%}.navtext{font-size:10px}.h1,h1{font-size:60px}.navbar-default .navbar-header .navbar-brand{color:#a2dfee}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a{color:#393939;font-family:Arvo,serif;font-size:1.5em}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2{color:#525252;padding-left:0;display:block;clear:none;float:left;font-family:Arvo,serif;font-weight:700}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#0a0a0a}.container1{width:1500px;margin:auto;margin-top:0;background-repeat:no-repeat;background-position:-40px -20px;margin-bottom:210px}.container-inner{width:1200px;margin:auto;background-color:hsla(192,8%,88%,.75);padding-bottom:40px;padding-top:40px;border-radius:15px}.header-content{padding:0;width:1000px}.title1{font-size:80px;font-family:Vollkorn,serif;color:#404040;text-align:center;padding-top:40px;padding-bottom:100px}#icon{margin-top:-18px}.subtext{font-size:25px;font-style:italic;color:#08b;text-align:right;padding-right:250px}.bg-primary{background-color:#00468b}.navbar-default .nav>li>a,.navbar-default .nav>li>a:focus,.navbar-default .nav>li>a:focus:hover,.navbar-default .nav>li>a:hover{color:#08b}.text-faded{font-size:25px;font-family:Vollkorn,serif}.section-heading{font-family:Vollkorn,serif;font-size:45px;padding-bottom:10px}hr{border-color:#00468b;padding-bottom:10px}.description{margin-top:20px;padding-bottom:200px}.description li{font-family:Vollkorn,serif;font-size:25px;color:#525252;margin-left:28%;padding-top:5px}.gap{margin-top:200px}.troubleshootingtext{color:hsla(0,0%,100%,.7);padding-left:30%}.troubleshootingtext li{list-style-type:circle;font-size:25px;padding-bottom:5px}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.block.response_body.json:hover{cursor:pointer}.backdrop{color:blue}#myModal{height:100%}.modal-backdrop{bottom:0;position:fixed}.curl{padding:10px;font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;font-size:.9em;max-height:400px;margin-top:5px;overflow-y:auto;background-color:#fcf6db;border:1px solid #e5e0c6;border-radius:4px}.curl_title{font-size:1.1em;margin:0;padding:15px 0 5px;font-family:Open Sans,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1.1}.footer{display:none}.swagger-section .swagger-ui-wrap h2{padding:0}h2{margin:0;margin-bottom:5px}.markdown p,.swagger-section .swagger-ui-wrap .code{font-size:15px;font-family:Arvo,serif}.swagger-section .swagger-ui-wrap b{font-family:Arvo,serif}#signin:hover{cursor:pointer}.dropdown-menu{padding:15px}.navbar-right .dropdown-menu{left:0;right:auto}#signinbutton{width:100%;height:32px;font-size:13px;font-weight:700;color:#08b}.navbar-default .nav>li .details{color:#000;text-transform:none;font-size:15px;font-weight:400;font-family:Open Sans,sans-serif;font-style:italic;line-height:20px;top:-2px}.navbar-default .nav>li .details:hover{color:#000}#signout{width:100%;height:32px;font-size:13px;font-weight:700;color:#08b} \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/typography.css b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/typography.css index 3235edd9503..e69de29bb2d 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/typography.css +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/css/typography.css @@ -1,14 +0,0 @@ -/* Google Font's Droid Sans */ -@font-face { - font-family: 'Droid Sans'; - font-style: normal; - font-weight: 400; - src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype'); -} -/* Google Font's Droid Sans Bold */ -@font-face { - font-family: 'Droid Sans'; - font-style: normal; - font-weight: 700; - src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype'); -} diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans-Bold.ttf b/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans-Bold.ttf index 942bbf5ba3a..036c4d135bf 100644 Binary files a/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans-Bold.ttf and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans-Bold.ttf differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans.ttf b/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans.ttf index efd1f8bbd88..e517a0c5b9d 100644 Binary files a/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans.ttf and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/fonts/DroidSans.ttf differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/explorer_icons.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/explorer_icons.png index ed9d2fffb64..be43b273940 100644 Binary files a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/explorer_icons.png and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/explorer_icons.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-16x16.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-16x16.png new file mode 100644 index 00000000000..0f7e13b0d99 Binary files /dev/null and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-16x16.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-32x32.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-32x32.png new file mode 100644 index 00000000000..b0a3352ffd3 Binary files /dev/null and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon-32x32.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon.ico b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon.ico new file mode 100644 index 00000000000..8b60bcf06a7 Binary files /dev/null and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/favicon.ico differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/logo_small.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/logo_small.png index 2ed3cf64be7..ce3908e3f27 100644 Binary files a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/logo_small.png and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/logo_small.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/pet_store_api.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/pet_store_api.png new file mode 100644 index 00000000000..1192ad8cd6a Binary files /dev/null and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/pet_store_api.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/wordnik_api.png b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/wordnik_api.png new file mode 100644 index 00000000000..dc0ddab138f Binary files /dev/null and b/htdocs/includes/restler/framework/Luracast/Restler/explorer/images/wordnik_api.png differ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html index 01fb8ee2a0e..7fedb694c17 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html @@ -1,24 +1,28 @@ - <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> - <title>REST API Explorer</title> + <meta http-equiv="x-ua-compatible" content="IE=edge"> + <title>Swagger UI</title> + <link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" /> + <link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" /> <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/> <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/> <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/> <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/> <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/> - <!-- @CHANGE LDR Remove external links <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> --> + + <script src='lib/object-assign-pollyfill.js' type='text/javascript'></script> <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script> <script src='lib/jquery.slideto.min.js' type='text/javascript'></script> <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script> <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script> - <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script> - <script src='lib/underscore-min.js' type='text/javascript'></script> + <script src='lib/handlebars-4.0.5.js' type='text/javascript'></script> + <script src='lib/lodash.min.js' type='text/javascript'></script> <script src='lib/backbone-min.js' type='text/javascript'></script> <script src='swagger-ui.js' type='text/javascript'></script> - <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script> + <script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script> + <script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script> <script src='lib/jsoneditor.min.js' type='text/javascript'></script> <script src='lib/marked.js' type='text/javascript'></script> <script src='lib/swagger-oauth.js' type='text/javascript'></script> @@ -37,6 +41,10 @@ url = "swagger.json"; } + hljs.configure({ + highlightSizeThreshold: 5000 + }); + // Pre load translate... if(window.SwaggerTranslator) { window.SwaggerTranslator.translate(); @@ -51,8 +59,8 @@ clientId: "your-client-id", clientSecret: "your-client-secret-if-required", realm: "your-realms", - appName: "your-app-name", - scopeSeparator: ",", + appName: "your-app-name", + scopeSeparator: " ", additionalQueryStringParams: {} }); } @@ -60,11 +68,7 @@ if(window.SwaggerTranslator) { window.SwaggerTranslator.translate(); } - - $('pre code').each(function(i, e) { - hljs.highlightBlock(e) - }); - + addApiKeyAuthorization(); }, onFailure: function(data) { @@ -74,8 +78,12 @@ jsonEditor: false, apisSorter: "alpha", operationsSorter: "alpha", - defaultModelRendering: 'schema', - showRequestHeaders: false + defaultModelRendering: 'model', /* example or model or schema */ + defaultModelsExpandDepth: -1, + showRequestHeaders: false, + showOperationIds: false, + displayOperationIds: false, + displayRequestDuration: true }); function addApiKeyAuthorization(){ @@ -100,13 +108,7 @@ } $('#input_apiKey').change(addApiKeyAuthorization); - - // if you have an apiKey you would like to pre-populate on the page for demonstration purposes... - /* - var apiKey = "myApiKeyXXXX123456789"; - $('#input_apiKey').val(apiKey); - */ - + window.swaggerUi.load(); function log() { @@ -118,14 +120,14 @@ </script> <style> - .info_title, .info_description, .info_contact, .info_name, .info_url, .info_email, .info_license { - display: none; + .info_title, .info_description, .info_contact, .info_name, .info_url, .info_email, .info_license, #api_info, #input_baseUrl { + display: none !important; } </style> </head> <body class="swagger-section"> -<div id='header'> +<div id="header" style="background-color: rgb(38,60,92); height: 17px;"> <div class="swagger-ui-wrap"> <a id="logo" href="#">Dolibarr REST API Explorer</a> <form id='api_selector'> diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ca.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ca.js new file mode 100644 index 00000000000..f8c815aa92c --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ca.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Advertència: Obsolet", + "Implementation Notes":"Notes d'implementació", + "Response Class":"Classe de la Resposta", + "Status":"Estatus", + "Parameters":"Paràmetres", + "Parameter":"Paràmetre", + "Value":"Valor", + "Description":"Descripció", + "Parameter Type":"Tipus del Paràmetre", + "Data Type":"Tipus de la Dada", + "Response Messages":"Missatges de la Resposta", + "HTTP Status Code":"Codi d'Estatus HTTP", + "Reason":"Raó", + "Response Model":"Model de la Resposta", + "Request URL":"URL de la Sol·licitud", + "Response Body":"Cos de la Resposta", + "Response Code":"Codi de la Resposta", + "Response Headers":"Capçaleres de la Resposta", + "Hide Response":"Amagar Resposta", + "Try it out!":"Prova-ho!", + "Show/Hide":"Mostrar/Amagar", + "List Operations":"Llista Operacions", + "Expand Operations":"Expandir Operacions", + "Raw":"Cru", + "can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru", + "Example Value":"Valor d'Exemple", + "Model Schema":"Esquema del Model", + "Model":"Model", + "apply":"aplicar", + "Username":"Nom d'usuari", + "Password":"Contrasenya", + "Terms of service":"Termes del servei", + "Created by":"Creat per", + "See more at":"Veure més en", + "Contact the developer":"Contactar amb el desenvolupador", + "api version":"versió de la api", + "Response Content Type":"Tipus de Contingut de la Resposta", + "fetching resource":"recollint recurs", + "fetching resource list":"recollins llista de recursos", + "Explore":"Explorant", + "Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.", + "Please specify the protocol for":"Si us plau, especifiqueu el protocol per a", + "Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de", + "Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI", + "Unable to read api":"No es pot llegir l'api", + "from path":"des de la ruta", + "server returned":"el servidor ha retornat" +}); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/el.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/el.js new file mode 100644 index 00000000000..fcd1ffdd5a9 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/el.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Προειδοποίηση: Έχει αποσυρθεί", + "Implementation Notes":"Σημειώσεις Υλοποίησης", + "Response Class":"Απόκριση", + "Status":"Κατάσταση", + "Parameters":"Παράμετροι", + "Parameter":"Παράμετρος", + "Value":"Τιμή", + "Description":"Περιγραφή", + "Parameter Type":"Τύπος Παραμέτρου", + "Data Type":"Τύπος Δεδομένων", + "Response Messages":"Μηνύματα Απόκρισης", + "HTTP Status Code":"Κωδικός Κατάστασης HTTP", + "Reason":"Αιτιολογία", + "Response Model":"Μοντέλο Απόκρισης", + "Request URL":"URL Αιτήματος", + "Response Body":"Σώμα Απόκρισης", + "Response Code":"Κωδικός Απόκρισης", + "Response Headers":"Επικεφαλίδες Απόκρισης", + "Hide Response":"Απόκρυψη Απόκρισης", + "Headers":"Επικεφαλίδες", + "Try it out!":"Δοκιμάστε το!", + "Show/Hide":"Εμφάνιση/Απόκρυψη", + "List Operations":"Λίστα Λειτουργιών", + "Expand Operations":"Ανάπτυξη Λειτουργιών", + "Raw":"Ακατέργαστο", + "can't parse JSON. Raw result":"αδυναμία ανάλυσης JSON. Ακατέργαστο αποτέλεσμα", + "Example Value":"Παράδειγμα Τιμής", + "Model Schema":"Σχήμα Μοντέλου", + "Model":"Μοντέλο", + "Click to set as parameter value":"Πατήστε για να θέσετε τιμή παραμέτρου", + "apply":"εφαρμογή", + "Username":"Όνομα χρήση", + "Password":"Κωδικός πρόσβασης", + "Terms of service":"Όροι χρήσης", + "Created by":"Δημιουργήθηκε από", + "See more at":"Δείτε περισσότερα στο", + "Contact the developer":"Επικοινωνήστε με τον προγραμματιστή", + "api version":"έκδοση api", + "Response Content Type":"Τύπος Περιεχομένου Απόκρισης", + "Parameter content type:":"Τύπος περιεχομένου παραμέτρου:", + "fetching resource":"παραλαβή πόρου", + "fetching resource list":"παραλαβή λίστας πόρων", + "Explore":"Εξερεύνηση", + "Show Swagger Petstore Example Apis":"Εμφάνιση Api Δειγμάτων Petstore του Swagger", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Αδυναμία ανάγνωσης από τον εξυπηρετητή. Μπορεί να μην έχει κατάλληλες ρυθμίσεις για access-control-origin.", + "Please specify the protocol for":"Παρακαλώ προσδιορίστε το πρωτόκολλο για", + "Can't read swagger JSON from":"Αδυναμία ανάγνωσης swagger JSON από", + "Finished Loading Resource Information. Rendering Swagger UI":"Ολοκλήρωση Φόρτωσης Πληροφορικών Πόρου. Παρουσίαση Swagger UI", + "Unable to read api":"Αδυναμία ανάγνωσης api", + "from path":"από το μονοπάτι", + "server returned":"ο εξυπηρετηρής επέστρεψε" +}); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/en.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/en.js index 9ccd65ad1d7..918313665db 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/en.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/en.js @@ -28,6 +28,7 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Expand Operations", "Raw":"Raw", "can't parse JSON. Raw result":"can't parse JSON. Raw result", + "Example Value":"Example Value", "Model Schema":"Model Schema", "Model":"Model", "Click to set as parameter value":"Click to set as parameter value", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/es.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/es.js index a8dff60b6a9..13fa015e6df 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/es.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/es.js @@ -27,6 +27,7 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Expandir Operaciones", "Raw":"Crudo", "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", + "Example Value":"Valor de Ejemplo", "Model Schema":"Esquema del Modelo", "Model":"Modelo", "apply":"aplicar", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/fr.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/fr.js index 2e095ad0948..388dff14bac 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/fr.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/fr.js @@ -3,7 +3,7 @@ /* jshint quotmark: double */ window.SwaggerTranslator.learn({ "Warning: Deprecated":"Avertissement : Obsolète", - "Implementation Notes":"Notes d'implementation", + "Implementation Notes":"Notes d'implémentation", "Response Class":"Classe de la réponse", "Status":"Statut", "Parameters":"Paramètres", @@ -28,6 +28,7 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Développer les opérations", "Raw":"Brut", "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut", + "Example Value":"Exemple la valeur", "Model Schema":"Définition du modèle", "Model":"Modèle", "apply":"appliquer", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/geo.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/geo.js new file mode 100644 index 00000000000..609c20d9c86 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/geo.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"ყურადღება: აღარ გამოიყენება", + "Implementation Notes":"იმპლემენტაციის აღწერა", + "Response Class":"რესპონს კლასი", + "Status":"სტატუსი", + "Parameters":"პარამეტრები", + "Parameter":"პარამეტრი", + "Value":"მნიშვნელობა", + "Description":"აღწერა", + "Parameter Type":"პარამეტრის ტიპი", + "Data Type":"მონაცემის ტიპი", + "Response Messages":"პასუხი", + "HTTP Status Code":"HTTP სტატუსი", + "Reason":"მიზეზი", + "Response Model":"რესპონს მოდელი", + "Request URL":"მოთხოვნის URL", + "Response Body":"პასუხის სხეული", + "Response Code":"პასუხის კოდი", + "Response Headers":"პასუხის ჰედერები", + "Hide Response":"დამალე პასუხი", + "Headers":"ჰედერები", + "Try it out!":"ცადე !", + "Show/Hide":"გამოჩენა/დამალვა", + "List Operations":"ოპერაციების სია", + "Expand Operations":"ოპერაციები ვრცლად", + "Raw":"ნედლი", + "can't parse JSON. Raw result":"JSON-ის დამუშავება ვერ მოხერხდა. ნედლი პასუხი", + "Example Value":"მაგალითი", + "Model Schema":"მოდელის სტრუქტურა", + "Model":"მოდელი", + "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე", + "apply":"გამოყენება", + "Username":"მოხმარებელი", + "Password":"პაროლი", + "Terms of service":"მომსახურების პირობები", + "Created by":"შექმნა", + "See more at":"ნახე ვრცლად", + "Contact the developer":"დაუკავშირდი დეველოპერს", + "api version":"api ვერსია", + "Response Content Type":"პასუხის კონტენტის ტიპი", + "Parameter content type:":"პარამეტრის კონტენტის ტიპი:", + "fetching resource":"რესურსების მიღება", + "fetching resource list":"რესურსების სიის მიღება", + "Explore":"ნახვა", + "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.", + "Please specify the protocol for":"მიუთითეთ პროტოკოლი", + "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა", + "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება", + "Unable to read api":"api წაკითხვა ვერ მოხერხდა", + "from path":"მისამართიდან", + "server returned":"სერვერმა დააბრუნა" +}); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ja.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ja.js index 3207bfc0baf..1cbeb374ac1 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ja.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ja.js @@ -26,22 +26,25 @@ window.SwaggerTranslator.learn({ "Show/Hide":"表示/非表示", "List Operations":"操作一覧", "Expand Operations":"操作の展開", - "Raw":"Raw", + "Raw":"未加工", "can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果", + "Example Value":"値の例", "Model Schema":"モデルスキーマ", "Model":"モデル", + "Click to set as parameter value":"パラメータ値と設定するにはクリック", "apply":"実行", "Username":"ユーザ名", "Password":"パスワード", "Terms of service":"サービス利用規約", "Created by":"Created by", - "See more at":"See more at", + "See more at":"詳細を見る", "Contact the developer":"開発者に連絡", "api version":"APIバージョン", "Response Content Type":"レスポンス コンテンツタイプ", + "Parameter content type:":"パラメータコンテンツタイプ:", "fetching resource":"リソースの取得", "fetching resource list":"リソース一覧の取得", - "Explore":"Explore", + "Explore":"調査", "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示", "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.", "Please specify the protocol for":"プロトコルを指定してください", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ko-kr.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ko-kr.js new file mode 100644 index 00000000000..03c7626d7f9 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ko-kr.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"경고:폐기예정됨", + "Implementation Notes":"구현 노트", + "Response Class":"응답 클래스", + "Status":"상태", + "Parameters":"매개변수들", + "Parameter":"매개변수", + "Value":"값", + "Description":"설명", + "Parameter Type":"매개변수 타입", + "Data Type":"데이터 타입", + "Response Messages":"응답 메세지", + "HTTP Status Code":"HTTP 상태 코드", + "Reason":"원인", + "Response Model":"응답 모델", + "Request URL":"요청 URL", + "Response Body":"응답 본문", + "Response Code":"응답 코드", + "Response Headers":"응답 헤더", + "Hide Response":"응답 숨기기", + "Headers":"헤더", + "Try it out!":"써보기!", + "Show/Hide":"보이기/숨기기", + "List Operations":"목록 작업", + "Expand Operations":"전개 작업", + "Raw":"원본", + "can't parse JSON. Raw result":"JSON을 파싱할수 없음. 원본결과:", + "Model Schema":"모델 스키마", + "Model":"모델", + "apply":"적용", + "Username":"사용자 이름", + "Password":"암호", + "Terms of service":"이용약관", + "Created by":"작성자", + "See more at":"추가정보:", + "Contact the developer":"개발자에게 문의", + "api version":"api버전", + "Response Content Type":"응답Content Type", + "fetching resource":"리소스 가져오기", + "fetching resource list":"리소스 목록 가져오기", + "Explore":"탐색", + "Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 읽어들일수 없습니다. access-control-origin 설정이 올바르지 않을수 있습니다.", + "Please specify the protocol for":"다음을 위한 프로토콜을 정하세요", + "Can't read swagger JSON from":"swagger JSON 을 다음으로 부터 읽을수 없습니다", + "Finished Loading Resource Information. Rendering Swagger UI":"리소스 정보 불러오기 완료. Swagger UI 랜더링", + "Unable to read api":"api를 읽을 수 없습니다.", + "from path":"다음 경로로 부터", + "server returned":"서버 응답함." +}); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ru.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ru.js index 381f1b3fd0d..592744e957f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ru.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/ru.js @@ -28,6 +28,7 @@ window.SwaggerTranslator.learn({ "Expand Operations":"Операции подробно", "Raw":"В сыром виде", "can't parse JSON. Raw result":"Не удается распарсить ответ:", + "Example Value":"Пример", "Model Schema":"Структура", "Model":"Описание", "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/translator.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/translator.js index 591f6d40943..ffb879f9a27 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/translator.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/translator.js @@ -7,7 +7,7 @@ * after <script src='lang/translator.js' type='text/javascript'></script>. * For example - <script src='lang/ru.js' type='text/javascript'></script> * - * If you wish to translate some new texsts you should do two things: + * If you wish to translate some new texts you should do two things: * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. * 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>. * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/zh-cn.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/zh-cn.js index 570319ba156..3af61ad6e4c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/zh-cn.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lang/zh-cn.js @@ -28,6 +28,8 @@ window.SwaggerTranslator.learn({ "Expand Operations":"展开操作", "Raw":"原始", "can't parse JSON. Raw result":"无法解析JSON. 原始结果", + "Example Value":"示例", + "Click to set as parameter value":"点击设置参数", "Model Schema":"模型架构", "Model":"模型", "apply":"应用", @@ -39,6 +41,7 @@ window.SwaggerTranslator.learn({ "Contact the developer":"联系开发者", "api version":"api版本", "Response Content Type":"响应Content Type", + "Parameter content type:":"参数类型:", "fetching resource":"正在获取资源", "fetching resource list":"正在获取资源列表", "Explore":"浏览", diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/backbone-min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/backbone-min.js index a3f544be6d9..8eff02e9842 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/backbone-min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/backbone-min.js @@ -1,15 +1 @@ -// Backbone.js 1.1.2 - -(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e}); - -// From http://stackoverflow.com/a/19431552 -// Compatibility override - Backbone 1.1 got rid of the 'options' binding -// automatically to views in the constructor - we need to keep that. -Backbone.View = (function(View) { - return View.extend({ - constructor: function(options) { - this.options = options || {}; - View.apply(this, arguments); - } - }); -})(Backbone.View); \ No newline at end of file +!function(t,e){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(i,n,s){t.Backbone=e(t,s,i,n)});else if("undefined"!=typeof exports){var i=require("underscore");e(t,exports,i)}else t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(this,function(t,e,i,n){var s=t.Backbone,r=[],a=(r.push,r.slice);r.splice;e.VERSION="1.1.2",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var n=this._events[t]||(this._events[t]=[]);return n.push({callback:e,context:i,ctx:i||this}),this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var s=this,r=i.once(function(){s.off(t,r),e.apply(this,arguments)});return r._callback=e,this.on(t,r,n)},off:function(t,e,n){var s,r,a,o,h,u,l,d;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events=void 0,this;for(o=t?[t]:i.keys(this._events),h=0,u=o.length;h<u;h++)if(t=o[h],a=this._events[t]){if(this._events[t]=s=[],e||n)for(l=0,d=a.length;l<d;l++)r=a[l],(e&&e!==r.callback&&e!==r.callback._callback||n&&n!==r.context)&&s.push(r);s.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=a.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t],n=this._events.all;return i&&u(i,e),n&&u(n,arguments),this},stopListening:function(t,e,n){var s=this._listeningTo;if(!s)return this;var r=!e&&!n;n||"object"!=typeof e||(n=this),t&&((s={})[t._listenId]=t);for(var a in s)t=s[a],t.off(e,n,this),(r||i.isEmpty(t._events))&&delete this._listeningTo[a];return this}},h=/\s+/,c=function(t,e,i,n){if(!i)return!0;if("object"==typeof i){for(var s in i)t[e].apply(t,[s,i[s]].concat(n));return!1}if(h.test(i)){for(var r=i.split(h),a=0,o=r.length;a<o;a++)t[e].apply(t,[r[a]].concat(n));return!1}return!0},u=function(t,e){var i,n=-1,s=t.length,r=e[0],a=e[1],o=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a,o);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},l={listenTo:"on",listenToOnce:"once"};i.each(l,function(t,e){o[e]=function(e,n,s){var r=this._listeningTo||(this._listeningTo={}),a=e._listenId||(e._listenId=i.uniqueId("l"));return r[a]=e,s||"object"!=typeof n||(s=this),e[t](n,s,this),this}}),o.bind=o.on,o.unbind=o.off,i.extend(e,o);var d=e.Model=function(t,e){var n=t||{};e||(e={}),this.cid=i.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{}),n=i.defaults({},n,i.result(this,"defaults")),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(d.prototype,o,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var s,r,a,o,h,c,u,l;if(null==t)return this;if("object"==typeof t?(r=t,n=e):(r={})[t]=e,n||(n={}),!this._validate(r,n))return!1;a=n.unset,h=n.silent,o=[],c=this._changing,this._changing=!0,c||(this._previousAttributes=i.clone(this.attributes),this.changed={}),l=this.attributes,u=this._previousAttributes,this.idAttribute in r&&(this.id=r[this.idAttribute]);for(s in r)e=r[s],i.isEqual(l[s],e)||o.push(s),i.isEqual(u[s],e)?delete this.changed[s]:this.changed[s]=e,a?delete l[s]:l[s]=e;if(!h){o.length&&(this._pending=n);for(var d=0,f=o.length;d<f;d++)this.trigger("change:"+o[d],this,l[o[d]],n)}if(c)return this;if(!h)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e,n=!1,s=this._changing?this._previousAttributes:this.attributes;for(var r in t)i.isEqual(s[r],e=t[r])||((n||(n={}))[r]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(i){return!!e.set(e.parse(i,t),t)&&(n&&n(e,i,t),void e.trigger("sync",e,i,t))},U(this,t),this.sync("read",this,t)},save:function(t,e,n){var s,r,a,o=this.attributes;if(null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e,n=i.extend({validate:!0},n),s&&!n.wait){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;s&&n.wait&&(this.attributes=i.extend({},o,s)),void 0===n.parse&&(n.parse=!0);var h=this,c=n.success;return n.success=function(t){h.attributes=o;var e=h.parse(t,n);return n.wait&&(e=i.extend(s||{},e)),!(i.isObject(e)&&!h.set(e,n))&&(c&&c(h,t,n),void h.trigger("sync",h,t,n))},U(this,n),r=this.isNew()?"create":n.patch?"patch":"update","patch"===r&&(n.attrs=s),a=this.sync(r,this,n),s&&n.wait&&(this.attributes=o),a},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&s(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;U(this,t);var r=this.sync("delete",this,t);return t.wait||s(),r},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||j();return this.isNew()?t:t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var f=["keys","values","pairs","invert","pick","omit"];i.each(f,function(t){d.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.attributes),i[t].apply(i,e)}});var p=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},g={add:!0,remove:!0,merge:!0},v={add:!0,remove:!1};i.extend(p.prototype,o,{model:d,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,v))},remove:function(t,e){var n=!i.isArray(t);t=n?[t]:i.clone(t),e||(e={});var s,r,a,o;for(s=0,r=t.length;s<r;s++)o=t[s]=this.get(t[s]),o&&(delete this._byId[o.id],delete this._byId[o.cid],a=this.indexOf(o),this.models.splice(a,1),this.length--,e.silent||(e.index=a,o.trigger("remove",o,this,e)),this._removeReference(o,e));return n?t[0]:t},set:function(t,e){e=i.defaults({},e,g),e.parse&&(t=this.parse(t,e));var n=!i.isArray(t);t=n?t?[t]:[]:i.clone(t);var s,r,a,o,h,c,u,l=e.at,f=this.model,p=this.comparator&&null==l&&e.sort!==!1,v=i.isString(this.comparator)?this.comparator:null,m=[],y=[],_={},b=e.add,w=e.merge,x=e.remove,E=!(p||!b||!x)&&[];for(s=0,r=t.length;s<r;s++){if(h=t[s]||{},a=h instanceof d?o=h:h[f.prototype.idAttribute||"id"],c=this.get(a))x&&(_[c.cid]=!0),w&&(h=h===o?o.attributes:h,e.parse&&(h=c.parse(h,e)),c.set(h,e),p&&!u&&c.hasChanged(v)&&(u=!0)),t[s]=c;else if(b){if(o=t[s]=this._prepareModel(h,e),!o)continue;m.push(o),this._addReference(o,e)}o=c||o,!E||!o.isNew()&&_[o.id]||E.push(o),_[o.id]=!0}if(x){for(s=0,r=this.length;s<r;++s)_[(o=this.models[s]).cid]||y.push(o);y.length&&this.remove(y,e)}if(m.length||E&&E.length)if(p&&(u=!0),this.length+=m.length,null!=l)for(s=0,r=m.length;s<r;s++)this.models.splice(l+s,0,m[s]);else{E&&(this.models.length=0);var k=E||m;for(s=0,r=k.length;s<r;s++)this.models.push(k[s])}if(u&&this.sort({silent:!0}),!e.silent){for(s=0,r=m.length;s<r;s++)(o=m[s]).trigger("add",o,this,e);(u||E&&E.length)&&this.trigger("sort",this,e)}return n?t[0]:t},reset:function(t,e){e||(e={});for(var n=0,s=this.models.length;n<s;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(){return a.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){return i.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var i in t)if(t[i]!==e.get(i))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),i.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(i.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e(n,i,t),n.trigger("sync",n,i,t)},U(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?i.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,s=e.success;return e.success=function(t,i){e.wait&&n.add(t,e),s&&s(t,i,e)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof d)return t;e=e?i.clone(e):{},e.collection=this;var n=new this.model(t,e);return n.validationError?(this.trigger("invalid",this,n.validationError,e),!1):n},_addReference:function(t,e){this._byId[t.cid]=t,null!=t.id&&(this._byId[t.id]=t),t.collection||(t.collection=this),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){("add"!==t&&"remove"!==t||i===this)&&("destroy"===t&&this.remove(e,n),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var m=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(m,function(t){p.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.models),i[t].apply(i,e)}});var y=["groupBy","countBy","sortBy","indexBy"];i.each(y,function(t){p.prototype[t]=function(e,n){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,n)}});var _=e.View=function(t){this.cid=i.uniqueId("view"),t||(t={}),i.extend(this,i.pick(t,w)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},b=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName","events"];i.extend(_.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,i){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],i!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=i.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(i.isFunction(n)||(n=this[t[e]]),n){var s=e.match(b),r=s[1],a=s[2];n=i.bind(n,this),r+=".delegateEvents"+this.cid,""===a?this.$el.on(r,n):this.$el.on(r,a,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"),!1);else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t["class"]=i.result(this,"className"));var n=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(n,!1)}}}),e.sync=function(t,n,s){var r=E[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:r,dataType:"json"};if(s.url||(a.url=i.result(n,"url")||j()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),s.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){a.type="POST",s.emulateJSON&&(a.data._method=r);var o=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",r),o)return o.apply(this,arguments)}}"GET"===a.type||s.emulateJSON||(a.processData=!1),"PATCH"===a.type&&x&&(a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var h=s.xhr=e.ajax(i.extend(a,s));return n.trigger("request",n,h,s),h};var x=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),E={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var k=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},T=/\((.*?)\)/g,$=/(\(\?)?:\w+/g,S=/\*\w+/g,H=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend(k.prototype,o,{initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var r=this;return e.history.route(t,function(i){var a=r._extractParameters(t,i);r.execute(s,a),r.trigger.apply(r,["route:"+n].concat(a)),r.trigger("route",n,a),e.history.trigger("route",r,n,a)}),this},execute:function(t,e){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(H,"\\$&").replace(T,"(?:$1)?").replace($,function(t,e){return e?t:"([^/?]+)"}).replace(S,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null})}});var A=e.History=function(){this.handlers=[],i.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,N=/^\/+|\/+$/g,R=/msie [\w.]+/,O=/\/$/,P=/#.*$/;A.started=!1,i.extend(A.prototype,o,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(O,"");t.indexOf(i)||(t=t.slice(i.length))}else t=this.getHash();return t.replace(I,"")},start:function(t){if(A.started)throw new Error("Backbone.history has already been started");A.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),s=document.documentMode,r=R.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);if(this.root=("/"+this.root+"/").replace(N,"/"),r&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow,this.navigate(n)}this._hasPushState?e.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!r?e.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=n;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&o.hash&&(this.fragment=this.getHash().replace(I,""),this.history.replaceState({},document.title,this.root+this.fragment))}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e!==this.fragment&&(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return t=this.fragment=this.getFragment(t),i.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0})},navigate:function(t,e){if(!A.started)return!1;e&&e!==!0||(e={trigger:!!e});var i=this.root+(t=this.getFragment(t||""));if(t=t.replace(P,""),this.fragment!==t){if(this.fragment=t,""===t&&"/"!==i&&(i=i.slice(0,-1)),this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new A;var C=function(t,e){var n,s=this;n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e);var r=function(){this.constructor=n};return r.prototype=s.prototype,n.prototype=new r,t&&i.extend(n.prototype,t),n.__super__=s.prototype,n};d.extend=p.extend=k.extend=_.extend=A.extend=C;var j=function(){throw new Error('A "url" property or function must be specified')},U=function(t,e){var i=e.error;e.error=function(n){i&&i(t,n,e),t.trigger("error",t,n,e)}};return e}),Backbone.View=function(t){return t.extend({constructor:function(e){this.options=e||{},t.apply(this,arguments)}})}(Backbone.View); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/es5-shim.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/es5-shim.js new file mode 100644 index 00000000000..4c0fcab0444 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/es5-shim.js @@ -0,0 +1 @@ +!function(t,e){"use strict";"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.returnExports=e()}(this,function(){var t,e,r=Array,n=r.prototype,o=Object,i=o.prototype,a=Function,u=a.prototype,f=String,s=f.prototype,l=Number,c=l.prototype,h=n.slice,p=n.splice,y=n.push,d=n.unshift,g=n.concat,v=n.join,b=u.call,w=u.apply,T=Math.max,m=Math.min,D=i.toString,x="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,S=Function.prototype.toString,O=/^\s*class /,j=function(t){try{var e=S.call(t),r=e.replace(/\/\/.*\n/g,""),n=r.replace(/\/\*[.\s\S]*\*\//g,""),o=n.replace(/\n/gm," ").replace(/ {2}/g," ");return O.test(o)}catch(i){return!1}},E=function(t){try{return!j(t)&&(S.call(t),!0)}catch(e){return!1}},M="[object Function]",I="[object GeneratorFunction]",t=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(x)return E(t);if(j(t))return!1;var e=D.call(t);return e===M||e===I},U=RegExp.prototype.exec,F=function(t){try{return U.call(t),!0}catch(e){return!1}},N="[object RegExp]";e=function(t){return"object"==typeof t&&(x?F(t):D.call(t)===N)};var k,C=String.prototype.valueOf,R=function(t){try{return C.call(t),!0}catch(e){return!1}},A="[object String]";k=function(t){return"string"==typeof t||"object"==typeof t&&(x?R(t):D.call(t)===A)};var $=o.defineProperty&&function(){try{var t={};o.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(r){return!1}}(),P=function(t){var e;return e=$?function(t,e,r,n){!n&&e in t||o.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(t,e,r,n){!n&&e in t||(t[e]=r)},function(r,n,o){for(var i in n)t.call(n,i)&&e(r,i,n[i],o)}}(i.hasOwnProperty),J=function(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e},Z=l.isNaN||function(t){return t!==t},z={ToInteger:function(t){var e=+t;return Z(e)?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},ToPrimitive:function(e){var r,n,o;if(J(e))return e;if(n=e.valueOf,t(n)&&(r=n.call(e),J(r)))return r;if(o=e.toString,t(o)&&(r=o.call(e),J(r)))return r;throw new TypeError},ToObject:function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return o(t)},ToUint32:function(t){return t>>>0}},G=function(){};P(u,{bind:function(e){var r=this;if(!t(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var n,i=h.call(arguments,1),u=function(){if(this instanceof n){var t=w.call(r,this,g.call(i,h.call(arguments)));return o(t)===t?t:this}return w.call(r,e,g.call(i,h.call(arguments)))},f=T(0,r.length-i.length),s=[],l=0;l<f;l++)y.call(s,"$"+l);return n=a("binder","return function ("+v.call(s,",")+"){ return binder.apply(this, arguments); }")(u),r.prototype&&(G.prototype=r.prototype,n.prototype=new G,G.prototype=null),n}});var Y=b.bind(i.hasOwnProperty),B=b.bind(i.toString),H=b.bind(h),W=w.bind(h),L=b.bind(s.slice),X=b.bind(s.split),q=b.bind(s.indexOf),K=b.bind(y),Q=b.bind(i.propertyIsEnumerable),V=b.bind(n.sort),_=r.isArray||function(t){return"[object Array]"===B(t)},tt=1!==[].unshift(0);P(n,{unshift:function(){return d.apply(this,arguments),this.length}},tt),P(r,{isArray:_});var et=o("a"),rt="a"!==et[0]||!(0 in et),nt=function(t){var e=!0,r=!0,n=!1;if(t)try{t.call("foo",function(t,r,n){"object"!=typeof n&&(e=!1)}),t.call([1],function(){"use strict";r="string"==typeof this},"x")}catch(o){n=!0}return!!t&&!n&&e&&r};P(n,{forEach:function(e){var r,n=z.ToObject(this),o=rt&&k(this)?X(this,""):n,i=-1,a=z.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i<a;)i in o&&("undefined"==typeof r?e(o[i],i,n):e.call(r,o[i],i,n))}},!nt(n.forEach)),P(n,{map:function(e){var n,o=z.ToObject(this),i=rt&&k(this)?X(this,""):o,a=z.ToUint32(i.length),u=r(a);if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.map callback must be a function");for(var f=0;f<a;f++)f in i&&("undefined"==typeof n?u[f]=e(i[f],f,o):u[f]=e.call(n,i[f],f,o));return u}},!nt(n.map)),P(n,{filter:function(e){var r,n,o=z.ToObject(this),i=rt&&k(this)?X(this,""):o,a=z.ToUint32(i.length),u=[];if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.filter callback must be a function");for(var f=0;f<a;f++)f in i&&(r=i[f],("undefined"==typeof n?e(r,f,o):e.call(n,r,f,o))&&K(u,r));return u}},!nt(n.filter)),P(n,{every:function(e){var r,n=z.ToObject(this),o=rt&&k(this)?X(this,""):n,i=z.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;a<i;a++)if(a in o&&!("undefined"==typeof r?e(o[a],a,n):e.call(r,o[a],a,n)))return!1;return!0}},!nt(n.every)),P(n,{some:function(e){var r,n=z.ToObject(this),o=rt&&k(this)?X(this,""):n,i=z.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;a<i;a++)if(a in o&&("undefined"==typeof r?e(o[a],a,n):e.call(r,o[a],a,n)))return!0;return!1}},!nt(n.some));var ot=!1;n.reduce&&(ot="object"==typeof n.reduce.call("es5",function(t,e,r,n){return n})),P(n,{reduce:function(e){var r=z.ToObject(this),n=rt&&k(this)?X(this,""):r,o=z.ToUint32(n.length);if(!t(e))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in n){i=n[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;a<o;a++)a in n&&(i=e(i,n[a],a,r));return i}},!ot);var it=!1;n.reduceRight&&(it="object"==typeof n.reduceRight.call("es5",function(t,e,r,n){return n})),P(n,{reduceRight:function(e){var r=z.ToObject(this),n=rt&&k(this)?X(this,""):r,o=z.ToUint32(n.length);if(!t(e))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in n){i=n[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(a<0)return i;do a in n&&(i=e(i,n[a],a,r));while(a--);return i}},!it);var at=n.indexOf&&[0,1].indexOf(1,2)!==-1;P(n,{indexOf:function(t){var e=rt&&k(this)?X(this,""):z.ToObject(this),r=z.ToUint32(e.length);if(0===r)return-1;var n=0;for(arguments.length>1&&(n=z.ToInteger(arguments[1])),n=n>=0?n:T(0,r+n);n<r;n++)if(n in e&&e[n]===t)return n;return-1}},at);var ut=n.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;P(n,{lastIndexOf:function(t){var e=rt&&k(this)?X(this,""):z.ToObject(this),r=z.ToUint32(e.length);if(0===r)return-1;var n=r-1;for(arguments.length>1&&(n=m(n,z.ToInteger(arguments[1]))),n=n>=0?n:r-Math.abs(n);n>=0;n--)if(n in e&&t===e[n])return n;return-1}},ut);var ft=function(){var t=[1,2],e=t.splice();return 2===t.length&&_(e)&&0===e.length}();P(n,{splice:function(t,e){return 0===arguments.length?[]:p.apply(this,arguments)}},!ft);var st=function(){var t={};return n.splice.call(t,0,0,1),1===t.length}();P(n,{splice:function(t,e){if(0===arguments.length)return[];var r=arguments;return this.length=T(z.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof e&&(r=H(arguments),r.length<2?K(r,this.length-t):r[1]=z.ToInteger(e)),p.apply(this,r)}},!st);var lt=function(){var t=new r(1e5);return t[8]="x",t.splice(1,1),7===t.indexOf("x")}(),ct=function(){var t=256,e=[];return e[t]="a",e.splice(t+1,0,"b"),"a"===e[t]}();P(n,{splice:function(t,e){for(var r,n=z.ToObject(this),o=[],i=z.ToUint32(n.length),a=z.ToInteger(t),u=a<0?T(i+a,0):m(a,i),s=m(T(z.ToInteger(e),0),i-u),l=0;l<s;)r=f(u+l),Y(n,r)&&(o[l]=n[r]),l+=1;var c,h=H(arguments,2),p=h.length;if(p<s){l=u;for(var y=i-s;l<y;)r=f(l+s),c=f(l+p),Y(n,r)?n[c]=n[r]:delete n[c],l+=1;l=i;for(var d=i-s+p;l>d;)delete n[l-1],l-=1}else if(p>s)for(l=i-s;l>u;)r=f(l+s-1),c=f(l+p-1),Y(n,r)?n[c]=n[r]:delete n[c],l-=1;l=u;for(var g=0;g<h.length;++g)n[l]=h[g],l+=1;return n.length=i-s+p,o}},!lt||!ct);var ht,pt=n.join;try{ht="1,2,3"!==Array.prototype.join.call("123",",")}catch(yt){ht=!0}ht&&P(n,{join:function(t){var e="undefined"==typeof t?",":t;return pt.call(k(this)?X(this,""):this,e)}},ht);var dt="1,2"!==[1,2].join(void 0);dt&&P(n,{join:function(t){var e="undefined"==typeof t?",":t;return pt.call(this,e)}},dt);var gt=function(t){for(var e=z.ToObject(this),r=z.ToUint32(e.length),n=0;n<arguments.length;)e[r+n]=arguments[n],n+=1;return e.length=r+n,r+n},vt=function(){var t={},e=Array.prototype.push.call(t,void 0);return 1!==e||1!==t.length||"undefined"!=typeof t[0]||!Y(t,0)}();P(n,{push:function(t){return _(this)?y.apply(this,arguments):gt.apply(this,arguments)}},vt);var bt=function(){var t=[],e=t.push(void 0);return 1!==e||1!==t.length||"undefined"!=typeof t[0]||!Y(t,0)}();P(n,{push:gt},bt),P(n,{slice:function(t,e){var r=k(this)?X(this,""):this;return W(r,arguments)}},rt);var wt=function(){try{return[1,2].sort(null),[1,2].sort({}),!0}catch(t){}return!1}(),Tt=function(){try{return[1,2].sort(/a/),!1}catch(t){}return!0}(),mt=function(){try{return[1,2].sort(void 0),!0}catch(t){}return!1}();P(n,{sort:function(e){if("undefined"==typeof e)return V(this);if(!t(e))throw new TypeError("Array.prototype.sort callback must be a function");return V(this,e)}},wt||!mt||!Tt);var Dt=!Q({toString:null},"toString"),xt=Q(function(){},"prototype"),St=!Y("x","0"),Ot=function(t){var e=t.constructor;return e&&e.prototype===t},jt={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0},Et=function(){if("undefined"==typeof window)return!1;for(var t in window)try{!jt["$"+t]&&Y(window,t)&&null!==window[t]&&"object"==typeof window[t]&&Ot(window[t])}catch(e){return!0}return!1}(),Mt=function(t){if("undefined"==typeof window||!Et)return Ot(t);try{return Ot(t)}catch(e){return!1}},It=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ut=It.length,Ft=function(t){return"[object Arguments]"===B(t)},Nt=function(e){return null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&!_(e)&&t(e.callee)},kt=Ft(arguments)?Ft:Nt;P(o,{keys:function(e){var r=t(e),n=kt(e),o=null!==e&&"object"==typeof e,i=o&&k(e);if(!o&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=[],u=xt&&r;if(i&&St||n)for(var s=0;s<e.length;++s)K(a,f(s));if(!n)for(var l in e)u&&"prototype"===l||!Y(e,l)||K(a,f(l));if(Dt)for(var c=Mt(e),h=0;h<Ut;h++){var p=It[h];c&&"constructor"===p||!Y(e,p)||K(a,p)}return a}});var Ct=o.keys&&function(){return 2===o.keys(arguments).length}(1,2),Rt=o.keys&&function(){var t=o.keys(arguments);return 1!==arguments.length||1!==t.length||1!==t[0]}(1),At=o.keys;P(o,{keys:function(t){return At(kt(t)?H(t):t)}},!Ct||Rt);var $t,Pt,Jt=0!==new Date((-0xc782b5b342b24)).getUTCMonth(),Zt=new Date((-0x55d318d56a724)),zt=new Date(14496624e5),Gt="Mon, 01 Jan -45875 11:59:59 GMT"!==Zt.toUTCString(),Yt=Zt.getTimezoneOffset();Yt<-720?($t="Tue Jan 02 -45875"!==Zt.toDateString(),Pt=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(zt.toString())):($t="Mon Jan 01 -45875"!==Zt.toDateString(),Pt=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(zt.toString()));var Bt=b.bind(Date.prototype.getFullYear),Ht=b.bind(Date.prototype.getMonth),Wt=b.bind(Date.prototype.getDate),Lt=b.bind(Date.prototype.getUTCFullYear),Xt=b.bind(Date.prototype.getUTCMonth),qt=b.bind(Date.prototype.getUTCDate),Kt=b.bind(Date.prototype.getUTCDay),Qt=b.bind(Date.prototype.getUTCHours),Vt=b.bind(Date.prototype.getUTCMinutes),_t=b.bind(Date.prototype.getUTCSeconds),te=b.bind(Date.prototype.getUTCMilliseconds),ee=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ne=function(t,e){return Wt(new Date(e,t,0))};P(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Bt(this);return t<0&&Ht(this)>11?t+1:t},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Bt(this),e=Ht(this);return t<0&&e>11?0:e},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Bt(this),e=Ht(this),r=Wt(this);if(t<0&&e>11){if(12===e)return r;var n=ne(0,t+1);return n-r+1}return r},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Lt(this);return t<0&&Xt(this)>11?t+1:t},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Lt(this),e=Xt(this);return t<0&&e>11?0:e},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Lt(this),e=Xt(this),r=qt(this);if(t<0&&e>11){if(12===e)return r;var n=ne(0,t+1);return n-r+1}return r}},Jt),P(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Kt(this),e=qt(this),r=Xt(this),n=Lt(this),o=Qt(this),i=Vt(this),a=_t(this);return ee[t]+", "+(e<10?"0"+e:e)+" "+re[r]+" "+n+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"}},Jt||Gt),P(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=this.getDay(),e=this.getDate(),r=this.getMonth(),n=this.getFullYear();return ee[t]+" "+re[r]+" "+(e<10?"0"+e:e)+" "+n}},Jt||$t),(Jt||Pt)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=this.getDay(),e=this.getDate(),r=this.getMonth(),n=this.getFullYear(),o=this.getHours(),i=this.getMinutes(),a=this.getSeconds(),u=this.getTimezoneOffset(),f=Math.floor(Math.abs(u)/60),s=Math.floor(Math.abs(u)%60);return ee[t]+" "+re[r]+" "+(e<10?"0"+e:e)+" "+n+" "+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+" GMT"+(u>0?"-":"+")+(f<10?"0"+f:f)+(s<10?"0"+s:s)},$&&o.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var oe=-621987552e5,ie="-000001",ae=Date.prototype.toISOString&&new Date(oe).toISOString().indexOf(ie)===-1,ue=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date((-1)).toISOString(),fe=b.bind(Date.prototype.getTime);P(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(fe(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var t=Lt(this),e=Xt(this);t+=Math.floor(e/12),e=(e%12+12)%12;var r=[e+1,qt(this),Qt(this),Vt(this),_t(this)];t=(t<0?"-":t>9999?"+":"")+L("00000"+Math.abs(t),0<=t&&t<=9999?-4:-6);for(var n=0;n<r.length;++n)r[n]=L("00"+r[n],-2);return t+"-"+H(r,0,2).join("-")+"T"+H(r,2).join(":")+"."+L("000"+te(this),-3)+"Z"}},ae||ue);var se=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&new Date(oe).toJSON().indexOf(ie)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(t){return!1}}();se||(Date.prototype.toJSON=function(e){var r=o(this),n=z.ToPrimitive(r);if("number"==typeof n&&!isFinite(n))return null;var i=r.toISOString;if(!t(i))throw new TypeError("toISOString property is not callable");return i.call(r)});var le=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),ce=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),he=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(he||ce||!le){var pe=Math.pow(2,31)-1,ye=Z(new Date(1970,0,1,0,0,0,pe+1).getTime());Date=function(t){var e=function(r,n,o,i,a,u,s){var l,c=arguments.length;if(this instanceof t){var h=u,p=s;if(ye&&c>=7&&s>pe){var y=Math.floor(s/pe)*pe,d=Math.floor(y/1e3);h+=d,p-=1e3*d}l=1===c&&f(r)===r?new t(e.parse(r)):c>=7?new t(r,n,o,i,a,h,p):c>=6?new t(r,n,o,i,a,h):c>=5?new t(r,n,o,i,a):c>=4?new t(r,n,o,i):c>=3?new t(r,n,o):c>=2?new t(r,n):c>=1?new t(r instanceof t?+r:r):new t}else l=t.apply(this,arguments);return J(l)||P(l,{constructor:e},!0),l},r=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),n=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(t,e){var r=e>1?1:0;return n[e]+Math.floor((t-1969+r)/4)-Math.floor((t-1901+r)/100)+Math.floor((t-1601+r)/400)+365*(t-1970)},i=function(e){var r=0,n=e;if(ye&&n>pe){var o=Math.floor(n/pe)*pe,i=Math.floor(o/1e3);r+=i,n-=1e3*i}return l(new t(1970,0,1,0,0,r,n))};for(var a in t)Y(t,a)&&(e[a]=t[a]);P(e,{now:t.now,UTC:t.UTC},!0),e.prototype=t.prototype,P(e.prototype,{constructor:e},!0);var u=function(e){var n=r.exec(e);if(n){var a,u=l(n[1]),f=l(n[2]||1)-1,s=l(n[3]||1)-1,c=l(n[4]||0),h=l(n[5]||0),p=l(n[6]||0),y=Math.floor(1e3*l(n[7]||0)),d=Boolean(n[4]&&!n[8]),g="-"===n[9]?1:-1,v=l(n[10]||0),b=l(n[11]||0),w=h>0||p>0||y>0;return c<(w?24:25)&&h<60&&p<60&&y<1e3&&f>-1&&f<12&&v<24&&b<60&&s>-1&&s<o(u,f+1)-o(u,f)&&(a=60*(24*(o(u,f)+s)+c+v*g),a=1e3*(60*(a+h+b*g)+p)+y,d&&(a=i(a)),-864e13<=a&&a<=864e13)?a:NaN}return t.parse.apply(this,arguments)};return P(e,{parse:u}),e}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var de=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),ge={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(t,e){for(var r=-1,n=e;++r<ge.size;)n+=t*ge.data[r],ge.data[r]=n%ge.base,n=Math.floor(n/ge.base)},divide:function(t){for(var e=ge.size,r=0;--e>=0;)r+=ge.data[e],ge.data[e]=Math.floor(r/t),r=r%t*ge.base},numToString:function(){for(var t=ge.size,e="";--t>=0;)if(""!==e||0===t||0!==ge.data[t]){var r=f(ge.data[t]);""===e?e=r:e+=L("0000000",0,7-r.length)+r}return e},pow:function Ae(t,e,r){return 0===e?r:e%2===1?Ae(t,e-1,r*t):Ae(t*t,e/2,r)},log:function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}},ve=function(t){var e,r,n,o,i,a,u,s;if(e=l(t),e=Z(e)?0:Math.floor(e),e<0||e>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(r=l(this),Z(r))return"NaN";if(r<=-1e21||r>=1e21)return f(r);if(n="",r<0&&(n="-",r=-r),o="0",r>1e-21)if(i=ge.log(r*ge.pow(2,69,1))-69,a=i<0?r*ge.pow(2,-i,1):r/ge.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(ge.multiply(0,a),u=e;u>=7;)ge.multiply(1e7,0),u-=7;for(ge.multiply(ge.pow(10,u,1),0),u=i-1;u>=23;)ge.divide(1<<23),u-=23;ge.divide(1<<u),ge.multiply(1,1),ge.divide(2),o=ge.numToString()}else ge.multiply(0,a),ge.multiply(1<<-i,0),o=ge.numToString()+L("0.00000000000000000000",2,2+e);return e>0?(s=o.length,o=s<=e?n+L("0.0000000000000000000",0,e-s+2)+o:n+L(o,0,s-e)+"."+L(o,s-e)):o=n+o,o};P(c,{toFixed:ve},de);var be=function(){try{return"1"===1..toPrecision(void 0)}catch(t){return!0}}(),we=c.toPrecision;P(c,{toPrecision:function(t){return"undefined"==typeof t?we.call(this):we.call(this,t)}},be),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var t="undefined"==typeof/()??/.exec("")[1],r=Math.pow(2,32)-1;s.split=function(n,o){var i=String(this);if("undefined"==typeof n&&0===o)return[];if(!e(n))return X(this,n,o);var a,u,f,s,l=[],c=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),h=0,p=new RegExp(n.source,c+"g");t||(a=new RegExp("^"+p.source+"$(?!\\s)",c));var d="undefined"==typeof o?r:z.ToUint32(o);for(u=p.exec(i);u&&(f=u.index+u[0].length,!(f>h&&(K(l,L(i,h,u.index)),!t&&u.length>1&&u[0].replace(a,function(){for(var t=1;t<arguments.length-2;t++)"undefined"==typeof arguments[t]&&(u[t]=void 0)}),u.length>1&&u.index<i.length&&y.apply(l,H(u,1)),s=u[0].length,h=f,l.length>=d)));)p.lastIndex===u.index&&p.lastIndex++,u=p.exec(i);return h===i.length?!s&&p.test("")||K(l,""):K(l,L(i,h)),l.length>d?H(l,0,d):l}}():"0".split(void 0,0).length&&(s.split=function(t,e){return"undefined"==typeof t&&0===e?[]:X(this,t,e)});var Te=s.replace,me=function(){var t=[];return"x".replace(/x(.)?/g,function(e,r){K(t,r)}),1===t.length&&"undefined"==typeof t[0]}();me||(s.replace=function(r,n){var o=t(n),i=e(r)&&/\)[*?]/.test(r.source);if(o&&i){var a=function(t){var e=arguments.length,o=r.lastIndex;r.lastIndex=0;var i=r.exec(t)||[];return r.lastIndex=o,K(i,arguments[e-2],arguments[e-1]),n.apply(this,i)};return Te.call(this,r,a)}return Te.call(this,r,n)});var De=s.substr,xe="".substr&&"b"!=="0b".substr(-1);P(s,{substr:function(t,e){var r=t;return t<0&&(r=T(this.length+t,0)),De.call(this,r,e)}},xe);var Se="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Oe="​",je="["+Se+"]",Ee=new RegExp("^"+je+je+"*"),Me=new RegExp(je+je+"*$"),Ie=s.trim&&(Se.trim()||!Oe.trim());P(s,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return f(this).replace(Ee,"").replace(Me,"")}},Ie);var Ue=b.bind(String.prototype.trim),Fe=s.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;P(s,{lastIndexOf:function(t){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var e=f(this),r=f(t),n=arguments.length>1?l(arguments[1]):NaN,o=Z(n)?1/0:z.ToInteger(n),i=m(T(o,0),e.length),a=r.length,u=i+a;u>0;){u=T(0,u-a);var s=q(L(e,u,i+a),r);if(s!==-1)return u+s}return-1}},Fe);var Ne=s.lastIndexOf;if(P(s,{lastIndexOf:function(t){return Ne.apply(this,arguments)}},1!==s.lastIndexOf.length),8===parseInt(Se+"08")&&22===parseInt(Se+"0x16")||(parseInt=function(t){var e=/^[\-+]?0[xX]/;return function(r,n){var o=Ue(String(r)),i=l(n)||(e.test(o)?16:10);return t(o,i)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(t){return function(e){var r=Ue(String(e)),n=t(r);return 0===n&&"-"===L(r,0,1)?-0:n}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var ke=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var t=this.name;"undefined"==typeof t?t="Error":"string"!=typeof t&&(t=f(t));var e=this.message;return"undefined"==typeof e?e="":"string"!=typeof e&&(e=f(e)),t?e?t+": "+e:t:e};Error.prototype.toString=ke}if($){var Ce=function(t,e){if(Q(t,e)){var r=Object.getOwnPropertyDescriptor(t,e);r.configurable&&(r.enumerable=!1,Object.defineProperty(t,e,r))}};Ce(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Ce(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Re=function(){var t="/"+this.source+"/";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),t};RegExp.prototype.toString=Re}}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-1.0.0.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-1.0.0.js deleted file mode 100644 index c70f09d1de6..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-1.0.0.js +++ /dev/null @@ -1,2278 +0,0 @@ -/* - -Copyright (C) 2011 by Yehuda Katz - -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. - -*/ - -// lib/handlebars/browser-prefix.js -var Handlebars = {}; - -(function(Handlebars, undefined) { -; -// lib/handlebars/base.js - -Handlebars.VERSION = "1.0.0"; -Handlebars.COMPILER_REVISION = 4; - -Handlebars.REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '>= 1.0.0' -}; - -Handlebars.helpers = {}; -Handlebars.partials = {}; - -var toString = Object.prototype.toString, - functionType = '[object Function]', - objectType = '[object Object]'; - -Handlebars.registerHelper = function(name, fn, inverse) { - if (toString.call(name) === objectType) { - if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); } - Handlebars.Utils.extend(this.helpers, name); - } else { - if (inverse) { fn.not = inverse; } - this.helpers[name] = fn; - } -}; - -Handlebars.registerPartial = function(name, str) { - if (toString.call(name) === objectType) { - Handlebars.Utils.extend(this.partials, name); - } else { - this.partials[name] = str; - } -}; - -Handlebars.registerHelper('helperMissing', function(arg) { - if(arguments.length === 2) { - return undefined; - } else { - throw new Error("Missing helper: '" + arg + "'"); - } -}); - -Handlebars.registerHelper('blockHelperMissing', function(context, options) { - var inverse = options.inverse || function() {}, fn = options.fn; - - var type = toString.call(context); - - if(type === functionType) { context = context.call(this); } - - if(context === true) { - return fn(this); - } else if(context === false || context == null) { - return inverse(this); - } else if(type === "[object Array]") { - if(context.length > 0) { - return Handlebars.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - return fn(context); - } -}); - -Handlebars.K = function() {}; - -Handlebars.createFrame = Object.create || function(object) { - Handlebars.K.prototype = object; - var obj = new Handlebars.K(); - Handlebars.K.prototype = null; - return obj; -}; - -Handlebars.logger = { - DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, - - methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'}, - - // can be overridden in the host environment - log: function(level, obj) { - if (Handlebars.logger.level <= level) { - var method = Handlebars.logger.methodMap[level]; - if (typeof console !== 'undefined' && console[method]) { - console[method].call(console, obj); - } - } - } -}; - -Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); }; - -Handlebars.registerHelper('each', function(context, options) { - var fn = options.fn, inverse = options.inverse; - var i = 0, ret = "", data; - - var type = toString.call(context); - if(type === functionType) { context = context.call(this); } - - if (options.data) { - data = Handlebars.createFrame(options.data); - } - - if(context && typeof context === 'object') { - if(context instanceof Array){ - for(var j = context.length; i<j; i++) { - if (data) { data.index = i; } - ret = ret + fn(context[i], { data: data }); - } - } else { - for(var key in context) { - if(context.hasOwnProperty(key)) { - if(data) { data.key = key; } - ret = ret + fn(context[key], {data: data}); - i++; - } - } - } - } - - if(i === 0){ - ret = inverse(this); - } - - return ret; -}); - -Handlebars.registerHelper('if', function(conditional, options) { - var type = toString.call(conditional); - if(type === functionType) { conditional = conditional.call(this); } - - if(!conditional || Handlebars.Utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } -}); - -Handlebars.registerHelper('unless', function(conditional, options) { - return Handlebars.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn}); -}); - -Handlebars.registerHelper('with', function(context, options) { - var type = toString.call(context); - if(type === functionType) { context = context.call(this); } - - if (!Handlebars.Utils.isEmpty(context)) return options.fn(context); -}); - -Handlebars.registerHelper('log', function(context, options) { - var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; - Handlebars.log(level, context); -}); -; -// lib/handlebars/compiler/parser.js -/* Jison generated parser */ -var handlebars = (function(){ -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"root":3,"program":4,"EOF":5,"simpleInverse":6,"statements":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"params":27,"hash":28,"dataName":29,"param":30,"STRING":31,"INTEGER":32,"BOOLEAN":33,"hashSegments":34,"hashSegment":35,"ID":36,"EQUALS":37,"DATA":38,"pathSegments":39,"SEP":40,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",31:"STRING",32:"INTEGER",33:"BOOLEAN",36:"ID",37:"EQUALS",38:"DATA",40:"SEP"}, -productions_: [0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[27,2],[27,1],[30,1],[30,1],[30,1],[30,1],[30,1],[28,1],[34,2],[34,1],[35,3],[35,3],[35,3],[35,3],[35,3],[26,1],[26,1],[26,1],[29,2],[21,1],[39,3],[39,1]], -performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { - -var $0 = $$.length - 1; -switch (yystate) { -case 1: return $$[$0-1]; -break; -case 2: this.$ = new yy.ProgramNode([], $$[$0]); -break; -case 3: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]); -break; -case 4: this.$ = new yy.ProgramNode($$[$0-1], []); -break; -case 5: this.$ = new yy.ProgramNode($$[$0]); -break; -case 6: this.$ = new yy.ProgramNode([], []); -break; -case 7: this.$ = new yy.ProgramNode([]); -break; -case 8: this.$ = [$$[$0]]; -break; -case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; -break; -case 10: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]); -break; -case 11: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]); -break; -case 12: this.$ = $$[$0]; -break; -case 13: this.$ = $$[$0]; -break; -case 14: this.$ = new yy.ContentNode($$[$0]); -break; -case 15: this.$ = new yy.CommentNode($$[$0]); -break; -case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); -break; -case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); -break; -case 18: this.$ = $$[$0-1]; -break; -case 19: - // Parsing out the '&' escape token at this level saves ~500 bytes after min due to the removal of one parser node. - this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], $$[$0-2][2] === '&'); - -break; -case 20: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true); -break; -case 21: this.$ = new yy.PartialNode($$[$0-1]); -break; -case 22: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]); -break; -case 23: -break; -case 24: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]]; -break; -case 25: this.$ = [[$$[$0-1]].concat($$[$0]), null]; -break; -case 26: this.$ = [[$$[$0-1]], $$[$0]]; -break; -case 27: this.$ = [[$$[$0]], null]; -break; -case 28: this.$ = [[$$[$0]], null]; -break; -case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; -break; -case 30: this.$ = [$$[$0]]; -break; -case 31: this.$ = $$[$0]; -break; -case 32: this.$ = new yy.StringNode($$[$0]); -break; -case 33: this.$ = new yy.IntegerNode($$[$0]); -break; -case 34: this.$ = new yy.BooleanNode($$[$0]); -break; -case 35: this.$ = $$[$0]; -break; -case 36: this.$ = new yy.HashNode($$[$0]); -break; -case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; -break; -case 38: this.$ = [$$[$0]]; -break; -case 39: this.$ = [$$[$0-2], $$[$0]]; -break; -case 40: this.$ = [$$[$0-2], new yy.StringNode($$[$0])]; -break; -case 41: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])]; -break; -case 42: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])]; -break; -case 43: this.$ = [$$[$0-2], $$[$0]]; -break; -case 44: this.$ = new yy.PartialNameNode($$[$0]); -break; -case 45: this.$ = new yy.PartialNameNode(new yy.StringNode($$[$0])); -break; -case 46: this.$ = new yy.PartialNameNode(new yy.IntegerNode($$[$0])); -break; -case 47: this.$ = new yy.DataNode($$[$0]); -break; -case 48: this.$ = new yy.IdNode($$[$0]); -break; -case 49: $$[$0-2].push({part: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2]; -break; -case 50: this.$ = [{part: $$[$0]}]; -break; -} -}, -table: [{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],25:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],25:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5],22:[1,14],23:[1,15],25:[1,16]},{17:23,18:[1,22],21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],25:[2,8]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{4:30,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{17:31,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:32,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:33,21:24,29:25,36:[1,28],38:[1,27],39:26},{21:35,26:34,31:[1,36],32:[1,37],36:[1,28],39:26},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],25:[1,16]},{17:23,21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,4],7:38,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],25:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{18:[1,39]},{18:[2,27],21:44,24:[2,27],27:40,28:41,29:48,30:42,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,28],24:[2,28]},{18:[2,48],24:[2,48],31:[2,48],32:[2,48],33:[2,48],36:[2,48],38:[2,48],40:[1,51]},{21:52,36:[1,28],39:26},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],38:[2,50],40:[2,50]},{10:53,20:[1,54]},{10:55,20:[1,54]},{18:[1,56]},{18:[1,57]},{24:[1,58]},{18:[1,59],21:60,36:[1,28],39:26},{18:[2,44],36:[2,44]},{18:[2,45],36:[2,45]},{18:[2,46],36:[2,46]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,3],22:[1,14],23:[1,15],25:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{18:[2,25],21:44,24:[2,25],28:61,29:48,30:62,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,26],24:[2,26]},{18:[2,30],24:[2,30],31:[2,30],32:[2,30],33:[2,30],36:[2,30],38:[2,30]},{18:[2,36],24:[2,36],35:63,36:[1,64]},{18:[2,31],24:[2,31],31:[2,31],32:[2,31],33:[2,31],36:[2,31],38:[2,31]},{18:[2,32],24:[2,32],31:[2,32],32:[2,32],33:[2,32],36:[2,32],38:[2,32]},{18:[2,33],24:[2,33],31:[2,33],32:[2,33],33:[2,33],36:[2,33],38:[2,33]},{18:[2,34],24:[2,34],31:[2,34],32:[2,34],33:[2,34],36:[2,34],38:[2,34]},{18:[2,35],24:[2,35],31:[2,35],32:[2,35],33:[2,35],36:[2,35],38:[2,35]},{18:[2,38],24:[2,38],36:[2,38]},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],37:[1,65],38:[2,50],40:[2,50]},{36:[1,66]},{18:[2,47],24:[2,47],31:[2,47],32:[2,47],33:[2,47],36:[2,47],38:[2,47]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{21:67,36:[1,28],39:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,68]},{18:[2,24],24:[2,24]},{18:[2,29],24:[2,29],31:[2,29],32:[2,29],33:[2,29],36:[2,29],38:[2,29]},{18:[2,37],24:[2,37],36:[2,37]},{37:[1,65]},{21:69,29:73,31:[1,70],32:[1,71],33:[1,72],36:[1,28],38:[1,27],39:26},{18:[2,49],24:[2,49],31:[2,49],32:[2,49],33:[2,49],36:[2,49],38:[2,49],40:[2,49]},{18:[1,74]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{18:[2,39],24:[2,39],36:[2,39]},{18:[2,40],24:[2,40],36:[2,40]},{18:[2,41],24:[2,41],36:[2,41]},{18:[2,42],24:[2,42],36:[2,42]},{18:[2,43],24:[2,43],36:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]}], -defaultActions: {17:[2,1]}, -parseError: function parseError(str, hash) { - throw new Error(str); -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -/* Jison generated lexer */ -var lexer = (function(){ -var lexer = ({EOF:1, -parseError:function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, -setInput:function (input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0}; - if (this.options.ranges) this.yylloc.range = [0,0]; - this.offset = 0; - return this; - }, -input:function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, -unput:function (ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length-len-1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length-1); - this.matched = this.matched.substr(0, this.matched.length-1); - - if (lines.length-1) this.yylineno -= lines.length-1; - var r = this.yylloc.range; - - this.yylloc = {first_line: this.yylloc.first_line, - last_line: this.yylineno+1, - first_column: this.yylloc.first_column, - last_column: lines ? - (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length: - this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, -more:function () { - this._more = true; - return this; - }, -less:function (n) { - this.unput(this.match.slice(n)); - }, -pastInput:function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, ""); - }, -upcomingInput:function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20-next.length); - } - return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, ""); - }, -showPosition:function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c+"^"; - }, -next:function () { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, - match, - tempMatch, - index, - col, - lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i=0;i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = {first_line: this.yylloc.last_line, - last_line: this.yylineno+1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length}; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]); - if (this.done && this._input) this.done = false; - if (token) return token; - else return; - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), - {text: "", token: null, line: this.yylineno}); - } - }, -lex:function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, -begin:function begin(condition) { - this.conditionStack.push(condition); - }, -popState:function popState() { - return this.conditionStack.pop(); - }, -_currentRules:function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules; - }, -topState:function () { - return this.conditionStack[this.conditionStack.length-2]; - }, -pushState:function begin(condition) { - this.begin(condition); - }}); -lexer.options = {}; -lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { - -var YYSTATE=YY_START -switch($avoiding_name_collisions) { -case 0: yy_.yytext = "\\"; return 14; -break; -case 1: - if(yy_.yytext.slice(-1) !== "\\") this.begin("mu"); - if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu"); - if(yy_.yytext) return 14; - -break; -case 2: return 14; -break; -case 3: - if(yy_.yytext.slice(-1) !== "\\") this.popState(); - if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1); - return 14; - -break; -case 4: yy_.yytext = yy_.yytext.substr(0, yy_.yyleng-4); this.popState(); return 15; -break; -case 5: return 25; -break; -case 6: return 16; -break; -case 7: return 20; -break; -case 8: return 19; -break; -case 9: return 19; -break; -case 10: return 23; -break; -case 11: return 22; -break; -case 12: this.popState(); this.begin('com'); -break; -case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; -break; -case 14: return 22; -break; -case 15: return 37; -break; -case 16: return 36; -break; -case 17: return 36; -break; -case 18: return 40; -break; -case 19: /*ignore whitespace*/ -break; -case 20: this.popState(); return 24; -break; -case 21: this.popState(); return 18; -break; -case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; -break; -case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31; -break; -case 24: return 38; -break; -case 25: return 33; -break; -case 26: return 33; -break; -case 27: return 32; -break; -case 28: return 36; -break; -case 29: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 36; -break; -case 30: return 'INVALID'; -break; -case 31: return 5; -break; -} -}; -lexer.rules = [/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/]; -lexer.conditions = {"mu":{"rules":[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"inclusive":false},"emu":{"rules":[3],"inclusive":false},"com":{"rules":[4],"inclusive":false},"INITIAL":{"rules":[0,1,2,31],"inclusive":true}}; -return lexer;})() -parser.lexer = lexer; -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})();; -// lib/handlebars/compiler/base.js - -Handlebars.Parser = handlebars; - -Handlebars.parse = function(input) { - - // Just return if an already-compile AST was passed in. - if(input.constructor === Handlebars.AST.ProgramNode) { return input; } - - Handlebars.Parser.yy = Handlebars.AST; - return Handlebars.Parser.parse(input); -}; -; -// lib/handlebars/compiler/ast.js -Handlebars.AST = {}; - -Handlebars.AST.ProgramNode = function(statements, inverse) { - this.type = "program"; - this.statements = statements; - if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); } -}; - -Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) { - this.type = "mustache"; - this.escaped = !unescaped; - this.hash = hash; - - var id = this.id = rawParams[0]; - var params = this.params = rawParams.slice(1); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var eligibleHelper = this.eligibleHelper = id.isSimple; - - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - this.isHelper = eligibleHelper && (params.length || hash); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. -}; - -Handlebars.AST.PartialNode = function(partialName, context) { - this.type = "partial"; - this.partialName = partialName; - this.context = context; -}; - -Handlebars.AST.BlockNode = function(mustache, program, inverse, close) { - var verifyMatch = function(open, close) { - if(open.original !== close.original) { - throw new Handlebars.Exception(open.original + " doesn't match " + close.original); - } - }; - - verifyMatch(mustache.id, close); - this.type = "block"; - this.mustache = mustache; - this.program = program; - this.inverse = inverse; - - if (this.inverse && !this.program) { - this.isInverse = true; - } -}; - -Handlebars.AST.ContentNode = function(string) { - this.type = "content"; - this.string = string; -}; - -Handlebars.AST.HashNode = function(pairs) { - this.type = "hash"; - this.pairs = pairs; -}; - -Handlebars.AST.IdNode = function(parts) { - this.type = "ID"; - - var original = "", - dig = [], - depth = 0; - - for(var i=0,l=parts.length; i<l; i++) { - var part = parts[i].part; - original += (parts[i].separator || '') + part; - - if (part === ".." || part === "." || part === "this") { - if (dig.length > 0) { throw new Handlebars.Exception("Invalid path: " + original); } - else if (part === "..") { depth++; } - else { this.isScoped = true; } - } - else { dig.push(part); } - } - - this.original = original; - this.parts = dig; - this.string = dig.join('.'); - this.depth = depth; - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - this.isSimple = parts.length === 1 && !this.isScoped && depth === 0; - - this.stringModeValue = this.string; -}; - -Handlebars.AST.PartialNameNode = function(name) { - this.type = "PARTIAL_NAME"; - this.name = name.original; -}; - -Handlebars.AST.DataNode = function(id) { - this.type = "DATA"; - this.id = id; -}; - -Handlebars.AST.StringNode = function(string) { - this.type = "STRING"; - this.original = - this.string = - this.stringModeValue = string; -}; - -Handlebars.AST.IntegerNode = function(integer) { - this.type = "INTEGER"; - this.original = - this.integer = integer; - this.stringModeValue = Number(integer); -}; - -Handlebars.AST.BooleanNode = function(bool) { - this.type = "BOOLEAN"; - this.bool = bool; - this.stringModeValue = bool === "true"; -}; - -Handlebars.AST.CommentNode = function(comment) { - this.type = "comment"; - this.comment = comment; -}; -; -// lib/handlebars/utils.js - -var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - -Handlebars.Exception = function(message) { - var tmp = Error.prototype.constructor.apply(this, arguments); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } -}; -Handlebars.Exception.prototype = new Error(); - -// Build out our basic SafeString type -Handlebars.SafeString = function(string) { - this.string = string; -}; -Handlebars.SafeString.prototype.toString = function() { - return this.string.toString(); -}; - -var escape = { - "&": "&amp;", - "<": "&lt;", - ">": "&gt;", - '"': "&quot;", - "'": "&#x27;", - "`": "&#x60;" -}; - -var badChars = /[&<>"'`]/g; -var possible = /[&<>"'`]/; - -var escapeChar = function(chr) { - return escape[chr] || "&amp;"; -}; - -Handlebars.Utils = { - extend: function(obj, value) { - for(var key in value) { - if(value.hasOwnProperty(key)) { - obj[key] = value[key]; - } - } - }, - - escapeExpression: function(string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof Handlebars.SafeString) { - return string.toString(); - } else if (string == null || string === false) { - return ""; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = string.toString(); - - if(!possible.test(string)) { return string; } - return string.replace(badChars, escapeChar); - }, - - isEmpty: function(value) { - if (!value && value !== 0) { - return true; - } else if(toString.call(value) === "[object Array]" && value.length === 0) { - return true; - } else { - return false; - } - } -}; -; -// lib/handlebars/compiler/compiler.js - -/*jshint eqnull:true*/ -var Compiler = Handlebars.Compiler = function() {}; -var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {}; - -// the foundHelper register will disambiguate helper lookup from finding a -// function in a context. This is necessary for mustache compatibility, which -// requires that context functions in blocks are evaluated by blockHelperMissing, -// and then proceed as if the resulting value was provided to blockHelperMissing. - -Compiler.prototype = { - compiler: Compiler, - - disassemble: function() { - var opcodes = this.opcodes, opcode, out = [], params, param; - - for (var i=0, l=opcodes.length; i<l; i++) { - opcode = opcodes[i]; - - if (opcode.opcode === 'DECLARE') { - out.push("DECLARE " + opcode.name + "=" + opcode.value); - } else { - params = []; - for (var j=0; j<opcode.args.length; j++) { - param = opcode.args[j]; - if (typeof param === "string") { - param = "\"" + param.replace("\n", "\\n") + "\""; - } - params.push(param); - } - out.push(opcode.opcode + " " + params.join(" ")); - } - } - - return out.join("\n"); - }, - equals: function(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || opcode.args.length !== otherOpcode.args.length) { - return false; - } - for (var j = 0; j < opcode.args.length; j++) { - if (opcode.args[j] !== otherOpcode.args[j]) { - return false; - } - } - } - - len = this.children.length; - if (other.children.length !== len) { - return false; - } - for (i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function(program, options) { - this.children = []; - this.depths = {list: []}; - this.options = options; - - // These changes will propagate to the other compiler components - var knownHelpers = this.options.knownHelpers; - this.options.knownHelpers = { - 'helperMissing': true, - 'blockHelperMissing': true, - 'each': true, - 'if': true, - 'unless': true, - 'with': true, - 'log': true - }; - if (knownHelpers) { - for (var name in knownHelpers) { - this.options.knownHelpers[name] = knownHelpers[name]; - } - } - - return this.program(program); - }, - - accept: function(node) { - return this[node.type](node); - }, - - program: function(program) { - var statements = program.statements, statement; - this.opcodes = []; - - for(var i=0, l=statements.length; i<l; i++) { - statement = statements[i]; - this[statement.type](statement); - } - this.isSimple = l === 1; - - this.depths.list = this.depths.list.sort(function(a, b) { - return a - b; - }); - - return this; - }, - - compileProgram: function(program) { - var result = new this.compiler().compile(program, this.options); - var guid = this.guid++, depth; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - - for(var i=0, l=result.depths.list.length; i<l; i++) { - depth = result.depths.list[i]; - - if(depth < 2) { continue; } - else { this.addDepth(depth - 1); } - } - - return guid; - }, - - block: function(block) { - var mustache = block.mustache, - program = block.program, - inverse = block.inverse; - - if (program) { - program = this.compileProgram(program); - } - - if (inverse) { - inverse = this.compileProgram(inverse); - } - - var type = this.classifyMustache(mustache); - - if (type === "helper") { - this.helperMustache(mustache, program, inverse); - } else if (type === "simple") { - this.simpleMustache(mustache); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue'); - } else { - this.ambiguousMustache(mustache, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - hash: function(hash) { - var pairs = hash.pairs, pair, val; - - this.opcode('pushHash'); - - for(var i=0, l=pairs.length; i<l; i++) { - pair = pairs[i]; - val = pair[1]; - - if (this.options.stringParams) { - if(val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', val.stringModeValue, val.type); - } else { - this.accept(val); - } - - this.opcode('assignToHash', pair[0]); - } - this.opcode('popHash'); - }, - - partial: function(partial) { - var partialName = partial.partialName; - this.usePartial = true; - - if(partial.context) { - this.ID(partial.context); - } else { - this.opcode('push', 'depth0'); - } - - this.opcode('invokePartial', partialName.name); - this.opcode('append'); - }, - - content: function(content) { - this.opcode('appendContent', content.string); - }, - - mustache: function(mustache) { - var options = this.options; - var type = this.classifyMustache(mustache); - - if (type === "simple") { - this.simpleMustache(mustache); - } else if (type === "helper") { - this.helperMustache(mustache); - } else { - this.ambiguousMustache(mustache); - } - - if(mustache.escaped && !options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - - ambiguousMustache: function(mustache, program, inverse) { - var id = mustache.id, - name = id.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', id.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleMustache: function(mustache) { - var id = mustache.id; - - if (id.type === 'DATA') { - this.DATA(id); - } else if (id.parts.length) { - this.ID(id); - } else { - // Simplified ID for `this` - this.addDepth(id.depth); - this.opcode('getContext', id.depth); - this.opcode('pushContext'); - } - - this.opcode('resolvePossibleLambda'); - }, - - helperMustache: function(mustache, program, inverse) { - var params = this.setupFullMustacheParams(mustache, program, inverse), - name = mustache.id.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name); - } else { - this.opcode('invokeHelper', params.length, name); - } - }, - - ID: function(id) { - this.addDepth(id.depth); - this.opcode('getContext', id.depth); - - var name = id.parts[0]; - if (!name) { - this.opcode('pushContext'); - } else { - this.opcode('lookupOnContext', id.parts[0]); - } - - for(var i=1, l=id.parts.length; i<l; i++) { - this.opcode('lookup', id.parts[i]); - } - }, - - DATA: function(data) { - this.options.data = true; - if (data.id.isScoped || data.id.depth) { - throw new Handlebars.Exception('Scoped data references are not supported: ' + data.original); - } - - this.opcode('lookupData'); - var parts = data.id.parts; - for(var i=0, l=parts.length; i<l; i++) { - this.opcode('lookup', parts[i]); - } - }, - - STRING: function(string) { - this.opcode('pushString', string.string); - }, - - INTEGER: function(integer) { - this.opcode('pushLiteral', integer.integer); - }, - - BOOLEAN: function(bool) { - this.opcode('pushLiteral', bool.bool); - }, - - comment: function() {}, - - // HELPERS - opcode: function(name) { - this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) }); - }, - - declare: function(name, value) { - this.opcodes.push({ opcode: 'DECLARE', name: name, value: value }); - }, - - addDepth: function(depth) { - if(isNaN(depth)) { throw new Error("EWOT"); } - if(depth === 0) { return; } - - if(!this.depths[depth]) { - this.depths[depth] = true; - this.depths.list.push(depth); - } - }, - - classifyMustache: function(mustache) { - var isHelper = mustache.isHelper; - var isEligible = mustache.eligibleHelper; - var options = this.options; - - // if ambiguous, we can possibly resolve the ambiguity now - if (isEligible && !isHelper) { - var name = mustache.id.parts[0]; - - if (options.knownHelpers[name]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { return "helper"; } - else if (isEligible) { return "ambiguous"; } - else { return "simple"; } - }, - - pushParams: function(params) { - var i = params.length, param; - - while(i--) { - param = params[i]; - - if(this.options.stringParams) { - if(param.depth) { - this.addDepth(param.depth); - } - - this.opcode('getContext', param.depth || 0); - this.opcode('pushStringParam', param.stringModeValue, param.type); - } else { - this[param.type](param); - } - } - }, - - setupMustacheParams: function(mustache) { - var params = mustache.params; - this.pushParams(params); - - if(mustache.hash) { - this.hash(mustache.hash); - } else { - this.opcode('emptyHash'); - } - - return params; - }, - - // this will replace setupMustacheParams when we're done - setupFullMustacheParams: function(mustache, program, inverse) { - var params = mustache.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if(mustache.hash) { - this.hash(mustache.hash); - } else { - this.opcode('emptyHash'); - } - - return params; - } -}; - -var Literal = function(value) { - this.value = value; -}; - -JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function(parent, name /* , type*/) { - if (/^[0-9]+$/.test(name)) { - return parent + "[" + name + "]"; - } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return parent + "." + name; - } - else { - return parent + "['" + name + "']"; - } - }, - - appendToBuffer: function(string) { - if (this.environment.isSimple) { - return "return " + string + ";"; - } else { - return { - appendToBuffer: true, - content: string, - toString: function() { return "buffer += " + string + ";"; } - }; - } - }, - - initializeBuffer: function() { - return this.quotedString(""); - }, - - namespace: "Handlebars", - // END PUBLIC API - - compile: function(environment, options, context, asObject) { - this.environment = environment; - this.options = options || {}; - - Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n"); - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - programs: [], - environments: [], - aliases: { } - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.registers = { list: [] }; - this.compileStack = []; - this.inlineStack = []; - - this.compileChildren(environment, options); - - var opcodes = environment.opcodes, opcode; - - this.i = 0; - - for(l=opcodes.length; this.i<l; this.i++) { - opcode = opcodes[this.i]; - - if(opcode.opcode === 'DECLARE') { - this[opcode.name] = opcode.value; - } else { - this[opcode.opcode].apply(this, opcode.args); - } - } - - return this.createFunctionContext(asObject); - }, - - nextOpcode: function() { - var opcodes = this.environment.opcodes; - return opcodes[this.i + 1]; - }, - - eat: function() { - this.i = this.i + 1; - }, - - preamble: function() { - var out = []; - - if (!this.isChild) { - var namespace = this.namespace; - - var copies = "helpers = this.merge(helpers, " + namespace + ".helpers);"; - if (this.environment.usePartial) { copies = copies + " partials = this.merge(partials, " + namespace + ".partials);"; } - if (this.options.data) { copies = copies + " data = data || {};"; } - out.push(copies); - } else { - out.push(''); - } - - if (!this.environment.isSimple) { - out.push(", buffer = " + this.initializeBuffer()); - } else { - out.push(""); - } - - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = out; - }, - - createFunctionContext: function(asObject) { - var locals = this.stackVars.concat(this.registers.list); - - if(locals.length > 0) { - this.source[1] = this.source[1] + ", " + locals.join(", "); - } - - // Generate minimizer alias mappings - if (!this.isChild) { - for (var alias in this.context.aliases) { - if (this.context.aliases.hasOwnProperty(alias)) { - this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; - } - } - } - - if (this.source[1]) { - this.source[1] = "var " + this.source[1].substring(2) + ";"; - } - - // Merge children - if (!this.isChild) { - this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; - } - - if (!this.environment.isSimple) { - this.source.push("return buffer;"); - } - - var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; - - for(var i=0, l=this.environment.depths.list.length; i<l; i++) { - params.push("depth" + this.environment.depths.list[i]); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(); - - if (!this.isChild) { - var revision = Handlebars.COMPILER_REVISION, - versions = Handlebars.REVISION_CHANGES[revision]; - source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source; - } - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + source + '}'; - Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n"); - return functionSource; - } - }, - mergeSource: function() { - // WARN: We are not handling the case where buffer is still populated as the source should - // not have buffer append operations as their final action. - var source = '', - buffer; - for (var i = 0, len = this.source.length; i < len; i++) { - var line = this.source[i]; - if (line.appendToBuffer) { - if (buffer) { - buffer = buffer + '\n + ' + line.content; - } else { - buffer = line.content; - } - } else { - if (buffer) { - source += 'buffer += ' + buffer + ';\n '; - buffer = undefined; - } - source += line + '\n '; - } - } - return source; - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function() { - this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing'; - - var params = ["depth0"]; - this.setupParams(0, params); - - this.replaceStack(function(current) { - params.splice(1, 0, current); - return "blockHelperMissing.call(" + params.join(", ") + ")"; - }); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function() { - this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing'; - - var params = ["depth0"]; - this.setupParams(0, params); - - var current = this.topStack(); - params.splice(1, 0, current); - - // Use the options value generated from the invocation - params[params.length-1] = 'options'; - - this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }"); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function(content) { - this.source.push(this.appendToBuffer(this.quotedString(content))); - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function() { - // Force anything that is inlined onto the stack so we don't have duplication - // when we examine local - this.flushInline(); - var local = this.popStack(); - this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }"); - if (this.environment.isSimple) { - this.source.push("else { " + this.appendToBuffer("''") + " }"); - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function() { - this.context.aliases.escapeExpression = 'this.escapeExpression'; - - this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")")); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function(depth) { - if(this.lastContext !== depth) { - this.lastContext = depth; - } - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function(name) { - this.push(this.nameLookup('depth' + this.lastContext, name, 'context')); - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function() { - this.pushStackLiteral('depth' + this.lastContext); - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function() { - this.context.aliases.functionType = '"function"'; - - this.replaceStack(function(current) { - return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current; - }); - }, - - // [lookup] - // - // On stack, before: value, ... - // On stack, after: value[name], ... - // - // Replace the value on the stack with the result of looking - // up `name` on `value` - lookup: function(name) { - this.replaceStack(function(current) { - return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context'); - }); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data[id], ... - // - // Push the result of looking up `id` on the current data - lookupData: function(id) { - this.push('data'); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function(string, type) { - this.pushStackLiteral('depth' + this.lastContext); - - this.pushString(type); - - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - }, - - emptyHash: function() { - this.pushStackLiteral('{}'); - - if (this.options.stringParams) { - this.register('hashTypes', '{}'); - this.register('hashContexts', '{}'); - } - }, - pushHash: function() { - this.hash = {values: [], types: [], contexts: []}; - }, - popHash: function() { - var hash = this.hash; - this.hash = undefined; - - if (this.options.stringParams) { - this.register('hashContexts', '{' + hash.contexts.join(',') + '}'); - this.register('hashTypes', '{' + hash.types.join(',') + '}'); - } - this.push('{\n ' + hash.values.join(',\n ') + '\n }'); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [push] - // - // On stack, before: ... - // On stack, after: expr, ... - // - // Push an expression onto the stack - push: function(expr) { - this.inlineStack.push(expr); - return expr; - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function(paramSize, name) { - this.context.aliases.helperMissing = 'helpers.helperMissing'; - - var helper = this.lastHelper = this.setupHelper(paramSize, name, true); - var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context'); - - this.push(helper.name + ' || ' + nonHelper); - this.replaceStack(function(name) { - return name + ' ? ' + name + '.call(' + - helper.callParams + ") " + ": helperMissing.call(" + - helper.helperMissingParams + ")"; - }); - }, - - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(helper.name + ".call(" + helper.callParams + ")"); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function(name, helperCall) { - this.context.aliases.functionType = '"function"'; - - this.pushStackLiteral('{}'); // Hash value - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context'); - var nextStack = this.nextStack(); - - this.source.push('if (' + nextStack + ' = ' + helperName + ') { ' + nextStack + ' = ' + nextStack + '.call(' + helper.callParams + '); }'); - this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }'); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function(name) { - var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"]; - - if (this.options.data) { - params.push("data"); - } - - this.context.aliases.self = "this"; - this.push("self.invokePartial(" + params.join(", ") + ")"); - }, - - // [assignToHash] - // - // On stack, before: value, hash, ... - // On stack, after: hash, ... - // - // Pops a value and hash off the stack, assigns `hash[key] = value` - // and pushes the hash back onto the stack. - assignToHash: function(key) { - var value = this.popStack(), - context, - type; - - if (this.options.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts.push("'" + key + "': " + context); - } - if (type) { - hash.types.push("'" + key + "': " + type); - } - hash.values.push("'" + key + "': (" + value + ")"); - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function(environment, options) { - var children = environment.children, child, compiler; - - for(var i=0, l=children.length; i<l; i++) { - child = children[i]; - compiler = new this.compiler(); - - var index = this.matchExistingProgram(child); - - if (index == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context); - this.context.environments[index] = child; - } else { - child.index = index; - child.name = 'program' + index; - } - } - }, - matchExistingProgram: function(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return i; - } - } - }, - - programExpression: function(guid) { - this.context.aliases.self = "this"; - - if(guid == null) { - return "self.noop"; - } - - var child = this.environment.children[guid], - depths = child.depths.list, depth; - - var programParams = [child.index, child.name, "data"]; - - for(var i=0, l = depths.length; i<l; i++) { - depth = depths[i]; - - if(depth === 1) { programParams.push("depth0"); } - else { programParams.push("depth" + (depth - 1)); } - } - - return (depths.length === 0 ? "self.program(" : "self.programWithDepth(") + programParams.join(", ") + ")"; - }, - - register: function(name, val) { - this.useRegister(name); - this.source.push(name + " = " + val + ";"); - }, - - useRegister: function(name) { - if(!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - pushStackLiteral: function(item) { - return this.push(new Literal(item)); - }, - - pushStack: function(item) { - this.flushInline(); - - var stack = this.incrStack(); - if (item) { - this.source.push(stack + " = " + item + ";"); - } - this.compileStack.push(stack); - return stack; - }, - - replaceStack: function(callback) { - var prefix = '', - inline = this.isInline(), - stack; - - // If we are currently inline then we want to merge the inline statement into the - // replacement statement via ',' - if (inline) { - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = top.value; - } else { - // Get or create the current stack name for use by the inline - var name = this.stackSlot ? this.topStackName() : this.incrStack(); - - prefix = '(' + this.push(name) + ' = ' + top + '),'; - stack = this.topStack(); - } - } else { - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (inline) { - if (this.inlineStack.length || this.compileStack.length) { - this.popStack(); - } - this.push('(' + prefix + item + ')'); - } else { - // Prevent modification of the context depth variable. Through replaceStack - if (!/^stack/.test(stack)) { - stack = this.nextStack(); - } - - this.source.push(stack + " = (" + prefix + item + ");"); - } - return stack; - }, - - nextStack: function() { - return this.pushStack(); - }, - - incrStack: function() { - this.stackSlot++; - if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); } - return this.topStackName(); - }, - topStackName: function() { - return "stack" + this.stackSlot; - }, - flushInline: function() { - var inlineStack = this.inlineStack; - if (inlineStack.length) { - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - this.pushStack(entry); - } - } - } - }, - isInline: function() { - return this.inlineStack.length; - }, - - popStack: function(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - if (!inline) { - this.stackSlot--; - } - return item; - } - }, - - topStack: function(wrapped) { - var stack = (this.isInline() ? this.inlineStack : this.compileStack), - item = stack[stack.length - 1]; - - if (!wrapped && (item instanceof Literal)) { - return item.value; - } else { - return item; - } - }, - - quotedString: function(str) { - return '"' + str - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') - .replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - setupHelper: function(paramSize, name, missingParams) { - var params = []; - this.setupParams(paramSize, params, missingParams); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - name: foundHelper, - callParams: ["depth0"].concat(params).join(", "), - helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ") - }; - }, - - // the params and contexts arguments are passed in arrays - // to fill in - setupParams: function(paramSize, params, useRegister) { - var options = [], contexts = [], types = [], param, inverse, program; - - options.push("hash:" + this.popStack()); - - inverse = this.popStack(); - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - if (!program) { - this.context.aliases.self = "this"; - program = "self.noop"; - } - - if (!inverse) { - this.context.aliases.self = "this"; - inverse = "self.noop"; - } - - options.push("inverse:" + inverse); - options.push("fn:" + program); - } - - for(var i=0; i<paramSize; i++) { - param = this.popStack(); - params.push(param); - - if(this.options.stringParams) { - types.push(this.popStack()); - contexts.push(this.popStack()); - } - } - - if (this.options.stringParams) { - options.push("contexts:[" + contexts.join(",") + "]"); - options.push("types:[" + types.join(",") + "]"); - options.push("hashContexts:hashContexts"); - options.push("hashTypes:hashTypes"); - } - - if(this.options.data) { - options.push("data:data"); - } - - options = "{" + options.join(",") + "}"; - if (useRegister) { - this.register('options', options); - params.push('options'); - } else { - params.push(options); - } - return params.join(", "); - } -}; - -var reservedWords = ( - "break else new var" + - " case finally return void" + - " catch for switch while" + - " continue function this with" + - " default if throw" + - " delete in try" + - " do instanceof typeof" + - " abstract enum int short" + - " boolean export interface static" + - " byte extends long super" + - " char final native synchronized" + - " class float package throws" + - " const goto private transient" + - " debugger implements protected volatile" + - " double import public let yield" -).split(" "); - -var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - -for(var i=0, l=reservedWords.length; i<l; i++) { - compilerWords[reservedWords[i]] = true; -} - -JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { - if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) { - return true; - } - return false; -}; - -Handlebars.precompile = function(input, options) { - if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) { - throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - var ast = Handlebars.parse(input); - var environment = new Compiler().compile(ast, options); - return new JavaScriptCompiler().compile(environment, options); -}; - -Handlebars.compile = function(input, options) { - if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) { - throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - var compiled; - function compile() { - var ast = Handlebars.parse(input); - var environment = new Compiler().compile(ast, options); - var templateSpec = new JavaScriptCompiler().compile(environment, options, undefined, true); - return Handlebars.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - return function(context, options) { - if (!compiled) { - compiled = compile(); - } - return compiled.call(this, context, options); - }; -}; - -; -// lib/handlebars/runtime.js - -Handlebars.VM = { - template: function(templateSpec) { - // Just add water - var container = { - escapeExpression: Handlebars.Utils.escapeExpression, - invokePartial: Handlebars.VM.invokePartial, - programs: [], - program: function(i, fn, data) { - var programWrapper = this.programs[i]; - if(data) { - programWrapper = Handlebars.VM.program(i, fn, data); - } else if (!programWrapper) { - programWrapper = this.programs[i] = Handlebars.VM.program(i, fn); - } - return programWrapper; - }, - merge: function(param, common) { - var ret = param || common; - - if (param && common) { - ret = {}; - Handlebars.Utils.extend(ret, common); - Handlebars.Utils.extend(ret, param); - } - return ret; - }, - programWithDepth: Handlebars.VM.programWithDepth, - noop: Handlebars.VM.noop, - compilerInfo: null - }; - - return function(context, options) { - options = options || {}; - var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data); - - var compilerInfo = container.compilerInfo || [], - compilerRevision = compilerInfo[0] || 1, - currentRevision = Handlebars.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision], - compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision]; - throw "Template was precompiled with an older version of Handlebars than the current runtime. "+ - "Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+")."; - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+ - "Please update your runtime to a newer version ("+compilerInfo[1]+")."; - } - } - - return result; - }; - }, - - programWithDepth: function(i, fn, data /*, $depth */) { - var args = Array.prototype.slice.call(arguments, 3); - - var program = function(context, options) { - options = options || {}; - - return fn.apply(this, [context, options.data || data].concat(args)); - }; - program.program = i; - program.depth = args.length; - return program; - }, - program: function(i, fn, data) { - var program = function(context, options) { - options = options || {}; - - return fn(context, options.data || data); - }; - program.program = i; - program.depth = 0; - return program; - }, - noop: function() { return ""; }, - invokePartial: function(partial, name, context, helpers, partials, data) { - var options = { helpers: helpers, partials: partials, data: data }; - - if(partial === undefined) { - throw new Handlebars.Exception("The partial " + name + " could not be found"); - } else if(partial instanceof Function) { - return partial(context, options); - } else if (!Handlebars.compile) { - throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); - } else { - partials[name] = Handlebars.compile(partial, {data: data !== undefined}); - return partials[name](context, options); - } - } -}; - -Handlebars.template = Handlebars.VM.template; -; -// lib/handlebars/browser-suffix.js -})(Handlebars); -; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-2.0.0.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-2.0.0.js deleted file mode 100644 index 53cf921d4f5..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-2.0.0.js +++ /dev/null @@ -1,28 +0,0 @@ -/*! - - handlebars v2.0.0 - -Copyright (C) 2011-2014 by Yehuda Katz - -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. - -@license -*/ -!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a){return a instanceof h?a.toString():null==a?"":a?(a=""+a,k.test(a)?a.replace(j,b):a):a+""}function e(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function f(a,b){return(a?a+".":"")+b}var g={},h=a,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var b,c=["description","fileName","lineNumber","message","name","number","stack"];return a.prototype=new Error,b=a}(),d=function(a,b){"use strict";function c(a,b){this.helpers=a||{},this.partials=b||{},d(this)}function d(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new g("Missing helper: '"+arguments[arguments.length-1].name+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse,e=c.fn;if(b===!0)return e(this);if(b===!1||null==b)return d(this);if(k(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):this.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unknown template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this.$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:this.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&&(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)return!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!f(a[c],b[c]))return!1;return!0}}var g={},h=a,i=b.isArray,j=[].slice;return g.Compiler=c,c.prototype={compiler:c,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++; -this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.accept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h=this.source[f];h.appendToBuffer?b=b?b+"\n + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n ":(c=!0,d=b+";\n "),b=void 0),d+=h+"\n ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendingContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b=g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popStack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-4.0.5.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-4.0.5.js new file mode 100644 index 00000000000..57025bc9b4a --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/handlebars-4.0.5.js @@ -0,0 +1,3 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){function e(s){if(r[s])return r[s].exports;var i=r[s]={exports:{},id:s,loaded:!1};return t[s].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function s(){var t=v();return t.compile=function(e,r){return l.compile(e,r,t)},t.precompile=function(e,r){return l.precompile(e,r,t)},t.AST=c["default"],t.Compiler=l.Compiler,t.JavaScriptCompiler=u["default"],t.Parser=h.parser,t.parse=h.parse,t}var i=r(1)["default"];e.__esModule=!0;var a=r(2),n=i(a),o=r(21),c=i(o),h=r(22),l=r(27),p=r(28),u=i(p),f=r(25),d=i(f),m=r(20),g=i(m),v=n["default"].create,y=s();y.create=s,g["default"](y),y.Visitor=d["default"],y["default"]=y,e["default"]=y,t.exports=e["default"]},function(t,e){"use strict";e["default"]=function(t){return t&&t.__esModule?t:{"default":t}},e.__esModule=!0},function(t,e,r){"use strict";function s(){var t=new o.HandlebarsEnvironment;return f.extend(t,o),t.SafeString=h["default"],t.Exception=p["default"],t.Utils=f,t.escapeExpression=f.escapeExpression,t.VM=m,t.template=function(e){return m.template(e,t)},t}var i=r(3)["default"],a=r(1)["default"];e.__esModule=!0;var n=r(4),o=i(n),c=r(18),h=a(c),l=r(6),p=a(l),u=r(5),f=i(u),d=r(19),m=i(d),g=r(20),v=a(g),y=s();y.create=s,v["default"](y),y["default"]=y,e["default"]=y,t.exports=e["default"]},function(t,e){"use strict";e["default"]=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e["default"]=t,e},e.__esModule=!0},function(t,e,r){"use strict";function s(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},c.registerDefaultHelpers(this),h.registerDefaultDecorators(this)}var i=r(1)["default"];e.__esModule=!0,e.HandlebarsEnvironment=s;var a=r(5),n=r(6),o=i(n),c=r(7),h=r(15),l=r(17),p=i(l),u="4.0.5";e.VERSION=u;var f=7;e.COMPILER_REVISION=f;var d={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};e.REVISION_CHANGES=d;var m="[object Object]";s.prototype={constructor:s,logger:p["default"],log:p["default"].log,registerHelper:function(t,e){if(a.toString.call(t)===m){if(e)throw new o["default"]("Arg not supported with multiple helpers");a.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(a.toString.call(t)===m)a.extend(this.partials,t);else{if("undefined"==typeof e)throw new o["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(a.toString.call(t)===m){if(e)throw new o["default"]("Arg not supported with multiple decorators");a.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var g=p["default"].log;e.log=g,e.createFrame=a.createFrame,e.logger=p["default"]},function(t,e){"use strict";function r(t){return l[t]}function s(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}function i(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1}function a(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return u.test(t)?t.replace(p,r):t}function n(t){return!t&&0!==t||!(!m(t)||0!==t.length)}function o(t){var e=s({},t);return e._parent=t,e}function c(t,e){return t.path=e,t}function h(t,e){return(t?t+".":"")+e}e.__esModule=!0,e.extend=s,e.indexOf=i,e.escapeExpression=a,e.isEmpty=n,e.createFrame=o,e.blockParams=c,e.appendContextPath=h;var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},p=/[&<>"'`=]/g,u=/[&<>"'`=]/,f=Object.prototype.toString;e.toString=f;var d=function(t){return"function"==typeof t};d(/x/)&&(e.isFunction=d=function(t){return"function"==typeof t&&"[object Function]"===f.call(t)}),e.isFunction=d;var m=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===f.call(t)};e.isArray=m},function(t,e){"use strict";function r(t,e){var i=e&&e.loc,a=void 0,n=void 0;i&&(a=i.start.line,n=i.start.column,t+=" - "+a+":"+n);for(var o=Error.prototype.constructor.call(this,t),c=0;c<s.length;c++)this[s[c]]=o[s[c]];Error.captureStackTrace&&Error.captureStackTrace(this,r),i&&(this.lineNumber=a,this.column=n)}e.__esModule=!0;var s=["description","fileName","lineNumber","message","name","number","stack"];r.prototype=new Error,e["default"]=r,t.exports=e["default"]},function(t,e,r){"use strict";function s(t){n["default"](t),c["default"](t),l["default"](t),u["default"](t),d["default"](t),g["default"](t),y["default"](t)}var i=r(1)["default"];e.__esModule=!0,e.registerDefaultHelpers=s;var a=r(8),n=i(a),o=r(9),c=i(o),h=r(10),l=i(h),p=r(11),u=i(p),f=r(12),d=i(f),m=r(13),g=i(m),v=r(14),y=i(v)},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5);e["default"]=function(t){t.registerHelper("blockHelperMissing",function(e,r){var i=r.inverse,a=r.fn;if(e===!0)return a(this);if(e===!1||null==e)return i(this);if(s.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):i(this);if(r.data&&r.ids){var n=s.createFrame(r.data);n.contextPath=s.appendContextPath(r.data.contextPath,r.name),r={data:n}}return a(e,r)})},t.exports=e["default"]},function(t,e,r){"use strict";var s=r(1)["default"];e.__esModule=!0;var i=r(5),a=r(6),n=s(a);e["default"]=function(t){t.registerHelper("each",function(t,e){function r(e,r,a){h&&(h.key=e,h.index=r,h.first=0===r,h.last=!!a,l&&(h.contextPath=l+e)),c+=s(t[e],{data:h,blockParams:i.blockParams([t[e],e],[l+e,null])})}if(!e)throw new n["default"]("Must pass iterator to #each");var s=e.fn,a=e.inverse,o=0,c="",h=void 0,l=void 0;if(e.data&&e.ids&&(l=i.appendContextPath(e.data.contextPath,e.ids[0])+"."),i.isFunction(t)&&(t=t.call(this)),e.data&&(h=i.createFrame(e.data)),t&&"object"==typeof t)if(i.isArray(t))for(var p=t.length;o<p;o++)o in t&&r(o,o,o===t.length-1);else{var u=void 0;for(var f in t)t.hasOwnProperty(f)&&(void 0!==u&&r(u,o-1),u=f,o++);void 0!==u&&r(u,o-1,!0)}return 0===o&&(c=a(this)),c})},t.exports=e["default"]},function(t,e,r){"use strict";var s=r(1)["default"];e.__esModule=!0;var i=r(6),a=s(i);e["default"]=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new a["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e["default"]},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5);e["default"]=function(t){t.registerHelper("if",function(t,e){return s.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||s.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,r){return t.helpers["if"].call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})},t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],s=0;s<arguments.length-1;s++)e.push(arguments[s]);var i=1;null!=r.hash.level?i=r.hash.level:r.data&&null!=r.data.level&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})},t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e["default"]},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5);e["default"]=function(t){t.registerHelper("with",function(t,e){s.isFunction(t)&&(t=t.call(this));var r=e.fn;if(s.isEmpty(t))return e.inverse(this);var i=e.data;return e.data&&e.ids&&(i=s.createFrame(e.data),i.contextPath=s.appendContextPath(e.data.contextPath,e.ids[0])),r(t,{data:i,blockParams:s.blockParams([t],[i&&i.contextPath])})})},t.exports=e["default"]},function(t,e,r){"use strict";function s(t){n["default"](t)}var i=r(1)["default"];e.__esModule=!0,e.registerDefaultDecorators=s;var a=r(16),n=i(a)},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5);e["default"]=function(t){t.registerDecorator("inline",function(t,e,r,i){var a=t;return e.partials||(e.partials={},a=function(i,a){var n=r.partials;r.partials=s.extend({},n,e.partials);var o=t(i,a);return r.partials=n,o}),e.partials[i.args[0]]=i.fn,a})},t.exports=e["default"]},function(t,e,r){"use strict";e.__esModule=!0;var s=r(5),i={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=s.indexOf(i.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=i.lookupLevel(t),"undefined"!=typeof console&&i.lookupLevel(i.level)<=t){var e=i.methodMap[t];console[e]||(e="log");for(var r=arguments.length,s=Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];console[e].apply(console,s)}}};e["default"]=i,t.exports=e["default"]},function(t,e){"use strict";function r(t){this.string=t}e.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e["default"]=r,t.exports=e["default"]},function(t,e,r){"use strict";function s(t){var e=t&&t[0]||1,r=v.COMPILER_REVISION;if(e!==r){if(e<r){var s=v.REVISION_CHANGES[r],i=v.REVISION_CHANGES[e];throw new g["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+i+").")}throw new g["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function i(t,e){function r(r,s,i){i.hash&&(s=d.extend({},s,i.hash),i.ids&&(i.ids[0]=!0)),r=e.VM.resolvePartial.call(this,r,s,i);var a=e.VM.invokePartial.call(this,r,s,i);if(null==a&&e.compile&&(i.partials[i.name]=e.compile(r,t.compilerOptions,e),a=i.partials[i.name](s,i)),null!=a){if(i.indent){for(var n=a.split("\n"),o=0,c=n.length;o<c&&(n[o]||o+1!==c);o++)n[o]=i.indent+n[o];a=n.join("\n")}return a}throw new g["default"]("The partial "+i.name+" could not be compiled when running in runtime-only mode")}function s(e){function r(e){return""+t.main(i,e,i.helpers,i.partials,n,c,o)}var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=a.data;s._setup(a),!a.partial&&t.useData&&(n=h(e,n));var o=void 0,c=t.useBlockParams?[]:void 0;return t.useDepths&&(o=a.depths?e!==a.depths[0]?[e].concat(a.depths):a.depths:[e]),(r=l(t.main,r,i,a.depths||[],n,c))(e,a)}if(!e)throw new g["default"]("No environment passed to template");if(!t||!t.main)throw new g["default"]("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var i={strict:function(t,e){if(!(e in t))throw new g["default"]('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var r=t.length,s=0;s<r;s++)if(t[s]&&null!=t[s][e])return t[s][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:d.escapeExpression,invokePartial:r,fn:function(e){var r=t[e];return r.decorator=t[e+"_d"],r},programs:[],program:function(t,e,r,s,i){var n=this.programs[t],o=this.fn(t);return e||i||s||r?n=a(this,t,o,e,r,s,i):n||(n=this.programs[t]=a(this,t,o)),n},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var r=t||e;return t&&e&&t!==e&&(r=d.extend({},e,t)),r},noop:e.VM.noop,compilerInfo:t.compiler};return s.isTop=!0,s._setup=function(r){r.partial?(i.helpers=r.helpers,i.partials=r.partials,i.decorators=r.decorators):(i.helpers=i.merge(r.helpers,e.helpers),t.usePartial&&(i.partials=i.merge(r.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=i.merge(r.decorators,e.decorators)))},s._child=function(e,r,s,n){if(t.useBlockParams&&!s)throw new g["default"]("must pass block params");if(t.useDepths&&!n)throw new g["default"]("must pass parent depths");return a(i,e,t[e],r,0,s,n)},s}function a(t,e,r,s,i,a,n){function o(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=n;return n&&e!==n[0]&&(o=[e].concat(n)),r(t,e,t.helpers,t.partials,i.data||s,a&&[i.blockParams].concat(a),o)}return o=l(r,o,t,n,s,a),o.program=e,o.depth=n?n.length:0,o.blockParams=i||0,o}function n(t,e,r){return t?t.call||r.name||(r.name=t,t=r.partials[t]):t="@partial-block"===r.name?r.data["partial-block"]:r.partials[r.name],t}function o(t,e,r){r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var s=void 0;if(r.fn&&r.fn!==c&&(r.data=v.createFrame(r.data),s=r.data["partial-block"]=r.fn,s.partials&&(r.partials=d.extend({},r.partials,s.partials))),void 0===t&&s&&(t=s),void 0===t)throw new g["default"]("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function c(){return""}function h(t,e){return e&&"root"in e||(e=e?v.createFrame(e):{},e.root=t),e}function l(t,e,r,s,i,a){if(t.decorator){var n={};e=t.decorator(e,n,r,s&&s[0],i,a,s),d.extend(e,n)}return e}var p=r(3)["default"],u=r(1)["default"];e.__esModule=!0,e.checkRevision=s,e.template=i,e.wrapProgram=a,e.resolvePartial=n,e.invokePartial=o,e.noop=c;var f=r(5),d=p(f),m=r(6),g=u(m),v=r(4)},function(t,e){(function(r){"use strict";e.__esModule=!0,e["default"]=function(t){var e="undefined"!=typeof r?r:window,s=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=s),t}},t.exports=e["default"]}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var r={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!r.helpers.scopedId(t)&&!t.depth}}};e["default"]=r,t.exports=e["default"]},function(t,e,r){"use strict";function s(t,e){if("Program"===t.type)return t;o["default"].yy=f,f.locInfo=function(t){return new f.SourceLocation(e&&e.srcName,t)};var r=new h["default"](e);return r.accept(o["default"].parse(t))}var i=r(1)["default"],a=r(3)["default"];e.__esModule=!0,e.parse=s;var n=r(23),o=i(n),c=r(24),h=i(c),l=r(26),p=a(l),u=r(5);e.parser=o["default"];var f={};u.extend(f,p)},function(t,e){"use strict";var r=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,r,s,i,a,n){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=s.prepareProgram(a[o]);break;case 3:this.$=a[o];break;case 4:this.$=a[o];break;case 5:this.$=a[o];break;case 6:this.$=a[o];break;case 7:this.$=a[o];break;case 8:this.$=a[o];break;case 9:this.$={type:"CommentStatement",value:s.stripComment(a[o]),strip:s.stripFlags(a[o],a[o]),loc:s.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:a[o],value:a[o],loc:s.locInfo(this._$)};break;case 11:this.$=s.prepareRawBlock(a[o-2],a[o-1],a[o],this._$);break;case 12:this.$={path:a[o-3],params:a[o-2],hash:a[o-1]};break;case 13:this.$=s.prepareBlock(a[o-3],a[o-2],a[o-1],a[o],!1,this._$);break;case 14:this.$=s.prepareBlock(a[o-3],a[o-2],a[o-1],a[o],!0,this._$);break;case 15:this.$={open:a[o-5],path:a[o-4],params:a[o-3],hash:a[o-2],blockParams:a[o-1],strip:s.stripFlags(a[o-5],a[o])};break;case 16:this.$={path:a[o-4],params:a[o-3],hash:a[o-2],blockParams:a[o-1],strip:s.stripFlags(a[o-5],a[o])};break;case 17:this.$={path:a[o-4],params:a[o-3],hash:a[o-2],blockParams:a[o-1],strip:s.stripFlags(a[o-5],a[o])};break;case 18:this.$={strip:s.stripFlags(a[o-1],a[o-1]),program:a[o]};break;case 19:var c=s.prepareBlock(a[o-2],a[o-1],a[o],a[o],!1,this._$),h=s.prepareProgram([c],a[o-1].loc);h.chained=!0,this.$={strip:a[o-2].strip,program:h,chain:!0};break;case 20:this.$=a[o];break;case 21:this.$={path:a[o-1],strip:s.stripFlags(a[o-2],a[o])};break;case 22:this.$=s.prepareMustache(a[o-3],a[o-2],a[o-1],a[o-4],s.stripFlags(a[o-4],a[o]),this._$);break;case 23:this.$=s.prepareMustache(a[o-3],a[o-2],a[o-1],a[o-4],s.stripFlags(a[o-4],a[o]),this._$);break;case 24:this.$={type:"PartialStatement",name:a[o-3],params:a[o-2],hash:a[o-1],indent:"",strip:s.stripFlags(a[o-4],a[o]),loc:s.locInfo(this._$)};break;case 25:this.$=s.preparePartialBlock(a[o-2],a[o-1],a[o],this._$);break;case 26:this.$={path:a[o-3],params:a[o-2],hash:a[o-1],strip:s.stripFlags(a[o-4],a[o])};break;case 27:this.$=a[o];break;case 28:this.$=a[o];break;case 29:this.$={type:"SubExpression",path:a[o-3],params:a[o-2],hash:a[o-1],loc:s.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:a[o],loc:s.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:s.id(a[o-2]),value:a[o],loc:s.locInfo(this._$)};break;case 32:this.$=s.id(a[o-1]);break;case 33:this.$=a[o];break;case 34:this.$=a[o];break;case 35:this.$={type:"StringLiteral",value:a[o],original:a[o],loc:s.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(a[o]),original:Number(a[o]),loc:s.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===a[o],original:"true"===a[o],loc:s.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:s.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:s.locInfo(this._$)};break;case 40:this.$=a[o];break;case 41:this.$=a[o];break;case 42:this.$=s.preparePath(!0,a[o],this._$);break;case 43:this.$=s.preparePath(!1,a[o],this._$);break;case 44:a[o-2].push({part:s.id(a[o]),original:a[o],separator:a[o-1]}),this.$=a[o-2];break;case 45:this.$=[{part:s.id(a[o]),original:a[o]}];break;case 46:this.$=[];break;case 47:a[o-1].push(a[o]);break;case 48:this.$=[a[o]];break;case 49:a[o-1].push(a[o]);break;case 50:this.$=[];break;case 51:a[o-1].push(a[o]);break;case 58:this.$=[];break;case 59:a[o-1].push(a[o]);break;case 64:this.$=[];break;case 65:a[o-1].push(a[o]);break;case 70:this.$=[];break;case 71:a[o-1].push(a[o]);break;case 78:this.$=[];break;case 79:a[o-1].push(a[o]);break;case 82:this.$=[];break;case 83:a[o-1].push(a[o]);break;case 86:this.$=[];break;case 87:a[o-1].push(a[o]);break;case 90:this.$=[];break;case 91:a[o-1].push(a[o]);break;case 94:this.$=[];break;case 95:a[o-1].push(a[o]);break;case 98:this.$=[a[o]];break;case 99:a[o-1].push(a[o]);break;case 100:this.$=[a[o]];break;case 101:a[o-1].push(a[o])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16], +48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=r.lexer.lex()||1,"number"!=typeof t&&(t=r.symbols_[t]||t),t}var r=this,s=[0],i=[null],a=[],n=this.table,o="",c=0,h=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;a.push(p);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,m,g,v,y,k,S,b,_={};;){if(m=s[s.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null!==f&&"undefined"!=typeof f||(f=e()),g=n[m]&&n[m][f]),"undefined"==typeof g||!g.length||!g[0]){var P="";if(!l){b=[];for(y in n[m])this.terminals_[y]&&y>2&&b.push("'"+this.terminals_[y]+"'");P=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(P,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:p,expected:b})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(g[0]){case 1:s.push(f),i.push(this.lexer.yytext),a.push(this.lexer.yylloc),s.push(g[1]),f=null,d?(f=d,d=null):(h=this.lexer.yyleng,o=this.lexer.yytext,c=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:if(k=this.productions_[g[1]][1],_.$=i[i.length-k],_._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},u&&(_._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),v=this.performAction.call(_,o,h,c,this.yy,g[1],i,a),"undefined"!=typeof v)return v;k&&(s=s.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),s.push(this.productions_[g[1]][0]),i.push(_.$),a.push(_._$),S=n[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0}},r=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===s.length?this.yylloc.first_column:0)+s[s.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,s,i;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length&&(r=this._input.match(this.rules[a[n]]),!r||e&&!(r[0].length>e[0].length)||(e=r,s=n,this.options.flex));n++);return e?(i=e[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,a[s],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,r,s){function i(t,r){return e.yytext=e.yytext.substr(t,e.yyleng-r)}switch(r){case 0:if("\\\\"===e.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=r,t.prototype=e,e.Parser=t,new t}();e.__esModule=!0,e["default"]=r},function(t,e,r){"use strict";function s(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function i(t,e,r){void 0===e&&(e=t.length);var s=t[e-1],i=t[e-2];return s?"ContentStatement"===s.type?(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(s.original):void 0:r}function a(t,e,r){void 0===e&&(e=-1);var s=t[e+1],i=t[e+2];return s?"ContentStatement"===s.type?(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(s.original):void 0:r}function n(t,e,r){var s=t[null==e?0:e+1];if(s&&"ContentStatement"===s.type&&(r||!s.rightStripped)){var i=s.value;s.value=s.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),s.rightStripped=s.value!==i}}function o(t,e,r){var s=t[null==e?t.length-1:e-1];if(s&&"ContentStatement"===s.type&&(r||!s.leftStripped)){var i=s.value;return s.value=s.value.replace(r?/\s+$/:/[ \t]+$/,""),s.leftStripped=s.value!==i,s.leftStripped}}var c=r(1)["default"];e.__esModule=!0;var h=r(25),l=c(h);s.prototype=new l["default"],s.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var s=t.body,c=0,h=s.length;c<h;c++){var l=s[c],p=this.accept(l);if(p){var u=i(s,c,r),f=a(s,c,r),d=p.openStandalone&&u,m=p.closeStandalone&&f,g=p.inlineStandalone&&u&&f;p.close&&n(s,c,!0),p.open&&o(s,c,!0),e&&g&&(n(s,c),o(s,c)&&"PartialStatement"===l.type&&(l.indent=/([ \t]+$)/.exec(s[c-1].original)[1])),e&&d&&(n((l.program||l.inverse).body),o(s,c)),e&&m&&(n(s,c),o((l.inverse||l.program).body))}}return t},s.prototype.BlockStatement=s.prototype.DecoratorBlock=s.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,s=r,c=r;if(r&&r.chained)for(s=r.body[0].program;c.chained;)c=c.body[c.body.length-1].program;var h={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:a(e.body),closeStandalone:i((s||e).body)};if(t.openStrip.close&&n(e.body,null,!0),r){var l=t.inverseStrip;l.open&&o(e.body,null,!0),l.close&&n(s.body,null,!0),t.closeStrip.open&&o(c.body,null,!0),!this.options.ignoreStandalone&&i(e.body)&&a(s.body)&&(o(e.body),n(s.body))}else t.closeStrip.open&&o(e.body,null,!0);return h},s.prototype.Decorator=s.prototype.MustacheStatement=function(t){return t.strip},s.prototype.PartialStatement=s.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e["default"]=s,t.exports=e["default"]},function(t,e,r){"use strict";function s(){this.parents=[]}function i(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function a(t){i.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function n(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}var o=r(1)["default"];e.__esModule=!0;var c=r(6),h=o(c);s.prototype={constructor:s,mutating:!1,acceptKey:function(t,e){var r=this.accept(t[e]);if(this.mutating){if(r&&!s.prototype[r.type])throw new h["default"]('Unexpected node type "'+r.type+'" found when accepting '+e+" on "+t.type);t[e]=r}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new h["default"](t.type+" requires "+e)},acceptArray:function(t){for(var e=0,r=t.length;e<r;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,r--)},accept:function(t){if(t){if(!this[t.type])throw new h["default"]("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:e!==!1?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:i,Decorator:i,BlockStatement:a,DecoratorBlock:a,PartialStatement:n,PartialBlockStatement:function(t){n.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e["default"]=s,t.exports=e["default"]},function(t,e,r){"use strict";function s(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new g["default"](t.path.original+" doesn't match "+e,r)}}function i(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function a(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t}function n(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}}function o(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function c(t,e,r){r=this.locInfo(r);for(var s=t?"@":"",i=[],a=0,n="",o=0,c=e.length;o<c;o++){var h=e[o].part,l=e[o].original!==h;if(s+=(e[o].separator||"")+h,l||".."!==h&&"."!==h&&"this"!==h)i.push(h);else{if(i.length>0)throw new g["default"]("Invalid path: "+s,{loc:r});".."===h&&(a++,n+="../")}}return{type:"PathExpression",data:t,depth:a,parts:i,original:s,loc:r}}function h(t,e,r,s,i,a){var n=s.charAt(3)||s.charAt(2),o="{"!==n&&"&"!==n,c=/\*/.test(s);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:i,loc:this.locInfo(a)}}function l(t,e,r,i){s(t,r),i=this.locInfo(i);var a={type:"Program",body:e,strip:{},loc:i};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function p(t,e,r,i,a,n){i&&i.path&&s(t,i);var o=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,h=void 0;if(r){if(o)throw new g["default"]("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=i.strip),h=r.strip,c=r.program}return a&&(a=c,c=e,e=a),{type:o?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:h,closeStrip:i&&i.strip,loc:this.locInfo(n)}}function u(t,e){if(!e&&t.length){var r=t[0].loc,s=t[t.length-1].loc;r&&s&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function f(t,e,r,i){return s(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(i)}}var d=r(1)["default"];e.__esModule=!0,e.SourceLocation=i,e.id=a,e.stripFlags=n,e.stripComment=o,e.preparePath=c,e.prepareMustache=h,e.prepareRawBlock=l,e.prepareBlock=p,e.prepareProgram=u,e.preparePartialBlock=f;var m=r(6),g=d(m)},function(t,e,r){"use strict";function s(){}function i(t,e,r){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var s=r.parse(t,e),i=(new r.Compiler).compile(s,e);return(new r.JavaScriptCompiler).compile(i,e)}function a(t,e,r){function s(){var s=r.parse(t,e),i=(new r.Compiler).compile(s,e),a=(new r.JavaScriptCompiler).compile(i,e,void 0,!0);return r.template(a)}function i(t,e){return a||(a=s()),a.call(this,t,e)}if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var a=void 0;return i._setup=function(t){return a||(a=s()),a._setup(t)},i._child=function(t,e,r,i){return a||(a=s()),a._child(t,e,r,i)},i}function n(t,e){if(t===e)return!0;if(p.isArray(t)&&p.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}}function o(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}var c=r(1)["default"];e.__esModule=!0,e.Compiler=s,e.precompile=i,e.compile=a;var h=r(6),l=c(h),p=r(5),u=r(21),f=c(u),d=[].slice;s.prototype={compiler:s,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var r=0;r<e;r++){var s=this.opcodes[r],i=t.opcodes[r];if(s.opcode!==i.opcode||!n(s.args,i.args))return!1}e=this.children.length;for(var r=0;r<e;r++)if(!this.children[r].equals(t.children[r]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var r=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},r)for(var s in r)s in r&&(e.knownHelpers[s]=r[s]);return this.accept(t)},compileProgram:function(t){var e=new this.compiler,r=e.compile(t,this.options),s=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[s]=r,this.useDepths=this.useDepths||r.useDepths,s},accept:function(t){if(!this[t.type])throw new l["default"]("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,r=e.length,s=0;s<r;s++)this.accept(e[s]);return this.options.blockParams.shift(),this.isSimple=1===r,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){o(t);var e=t.program,r=t.inverse;e=e&&this.compileProgram(e),r=r&&this.compileProgram(r);var s=this.classifySexpr(t);"helper"===s?this.helperSexpr(t,e,r):"simple"===s?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,r),this.opcode("pushProgram",e),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),r=this.setupFullMustacheParams(t,e,void 0),s=t.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,s.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var r=t.params;if(r.length>1)throw new l["default"]("Unsupported number of partial arguments: "+r.length,t);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var s=t.name.original,i="SubExpression"===t.name.type;i&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",i,s,a),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){o(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,r){var s=t.path,i=s.parts[0],a=null!=e||null!=r;this.opcode("getContext",s.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",r),s.strict=!0,this.accept(s),this.opcode("invokeAmbiguous",i,a)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,r){var s=this.setupFullMustacheParams(t,e,r),i=t.path,a=i.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",s.length,a);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+a,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",s.length,i.original,f["default"].helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],r=f["default"].helpers.scopedId(t),s=!t.depth&&!r&&this.blockParamIndex(e);s?this.opcode("lookupBlockParam",s,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,r):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,r=0,s=e.length;for(this.opcode("pushHash");r<s;r++)this.pushParam(e[r].value);for(;r--;)this.opcode("assignToHash",e[r].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:d.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=f["default"].helpers.simpleId(t.path),r=e&&!!this.blockParamIndex(t.path.parts[0]),s=!r&&f["default"].helpers.helperExpression(t),i=!r&&(s||e);if(i&&!s){var a=t.path.parts[0],n=this.options;n.knownHelpers[a]?s=!0:n.knownHelpersOnly&&(i=!1)}return s?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var e=0,r=t.length;e<r;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var r=void 0;if(!t.parts||f["default"].helpers.scopedId(t)||t.depth||(r=this.blockParamIndex(t.parts[0])),r){var s=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",r,s)}else e=t.original||e,e.replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,r,s){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",r),t.hash?this.accept(t.hash):this.opcode("emptyHash",s),i},blockParamIndex:function(t){for(var e=0,r=this.options.blockParams.length;e<r;e++){var s=this.options.blockParams[e],i=s&&p.indexOf(s,t);if(s&&i>=0)return[e,i]}}}},function(t,e,r){"use strict";function s(t){this.value=t}function i(){}function a(t,e,r,s){var i=e.popStack(),a=0,n=r.length;for(t&&n--;a<n;a++)i=e.nameLookup(i,r[a],s);return t?[e.aliasable("container.strict"),"(",i,", ",e.quotedString(r[a]),")"]:i}var n=r(1)["default"];e.__esModule=!0;var o=r(4),c=r(6),h=n(c),l=r(5),p=r(29),u=n(p);i.prototype={nameLookup:function(t,e){return i.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=o.COMPILER_REVISION,e=o.REVISION_CHANGES[t];return[t,e]},appendToBuffer:function(t,e,r){return l.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:r?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,r,s){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!s,this.name=this.environment.name,this.isChild=!!r,this.context=r||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,a=void 0,n=void 0,o=void 0,c=void 0;for(o=0,c=i.length;o<c;o++)a=i[o],this.source.currentLocation=a.loc,n=n||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=n,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),s?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var l=this.createFunctionContext(s);if(this.isChild)return l;var p={compiler:this.compilerInfo(),main:l};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var u=this.context,f=u.programs,d=u.decorators;for(o=0,c=f.length;o<c;o++)f[o]&&(p[o]=f[o],d[o]&&(p[o+"_d"]=d[o],p.useDecorators=!0));return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),s?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),e.srcName?(p=p.toStringWithSourceMap({file:e.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new u["default"](this.options.srcName),this.decorators=new u["default"](this.options.srcName)},createFunctionContext:function(t){var e="",r=this.stackVars.concat(this.registers.list);r.length>0&&(e+=", "+r.join(", "));var s=0;for(var i in this.aliases){var a=this.aliases[i];this.aliases.hasOwnProperty(i)&&a.children&&a.referenceCount>1&&(e+=", alias"+ ++s+"="+i,a.children[0]="alias"+s)}var n=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths");var o=this.mergeSource(e);return t?(n.push(o),Function.apply(this,n)):this.source.wrap(["function(",n.join(","),") {\n ",o,"}"])},mergeSource:function(t){var e=this.environment.isSimple,r=!this.forceBuffer,s=void 0,i=void 0,a=void 0,n=void 0;return this.source.each(function(t){t.appendToBuffer?(a?t.prepend(" + "):a=t,n=t):(a&&(i?a.prepend("buffer += "):s=!0,n.add(";"),a=n=void 0),i=!0,e||(r=!1))}),r?a?(a.prepend("return "),n.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(s?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),n.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(s?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(t,0,r);var s=this.popStack();r.splice(1,0,s),this.push(this.source.functionCall(e,"call",r))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var r=this.topStack();e.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,r,s){var i=0;s||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e,r)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,r){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,r)},resolvePath:function(t,e,r,s,i){var n=this;if(this.options.strict||this.options.assumeObjects)return void this.push(a(this.options.strict&&i,this,e,t));for(var o=e.length;r<o;r++)this.replaceStack(function(i){var a=n.nameLookup(i,e[r],t);return s?[" && ",a]:[" != null ? ",a," : ",i]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var r=this.nameLookup("decorators",e,"decorator"),s=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(r,"",["fn","props","container",s])," || fn;"])},invokeHelper:function(t,e,r){var s=this.popStack(),i=this.setupHelper(t,e),a=r?[i.name," || "]:"",n=["("].concat(a,s);this.options.strict||n.push(" || ",this.aliasable("helpers.helperMissing")),n.push(")"),this.push(this.source.functionCall(n,"call",i.callParams))},invokeKnownHelper:function(t,e){var r=this.setupHelper(t,e);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var r=this.popStack();this.emptyHash();var s=this.setupHelper(0,t,e),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),a=["(","(helper = ",i," || ",r,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",a,s.paramsInit?["),(",s.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",s.callParams)," : helper))"])},invokePartial:function(t,e,r){var s=[],i=this.setupParams(e,1,s);t&&(e=this.popStack(),delete i.name),r&&(i.indent=JSON.stringify(r)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?s.unshift(e):s.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i), +s.push(i),this.push(this.source.functionCall("container.invokePartial","",s))},assignToHash:function(t){var e=this.popStack(),r=void 0,s=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(s=this.popStack(),r=this.popStack());var a=this.hash;r&&(a.contexts[t]=r),s&&(a.types[t]=s),i&&(a.ids[t]=i),a.values[t]=e},pushId:function(t,e,r){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(r?" + "+JSON.stringify("."+r):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(t,e){for(var r=t.children,s=void 0,i=void 0,a=0,n=r.length;a<n;a++){s=r[a],i=new this.compiler;var o=this.matchExistingProgram(s);null==o?(this.context.programs.push(""),o=this.context.programs.length,s.index=o,s.name="program"+o,this.context.programs[o]=i.compile(s,e,this.context,!this.precompile),this.context.decorators[o]=i.decorators,this.context.environments[o]=s,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams):(s.index=o,s.name="program"+o,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams)}},matchExistingProgram:function(t){for(var e=0,r=this.context.environments.length;e<r;e++){var s=this.context.environments[e];if(s&&s.equals(t))return e}},programExpression:function(t){var e=this.environment.children[t],r=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths"),"container.program("+r.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof s||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new s(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],r=void 0,i=void 0,a=void 0;if(!this.isInline())throw new h["default"]("replaceStack on non-inline");var n=this.popStack(!0);if(n instanceof s)r=[n.value],e=["(",r],a=!0;else{i=!0;var o=this.incrStack();e=["((",this.push(o)," = ",n,")"],r=this.topStack()}var c=t.call(this,r);a||this.popStack(),i&&this.stackSlot--,this.push(e.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,r=t.length;e<r;e++){var i=t[e];if(i instanceof s)this.compileStack.push(i);else{var a=this.incrStack();this.pushSource([a," = ",i,";"]),this.compileStack.push(a)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),r=(e?this.inlineStack:this.compileStack).pop();if(!t&&r instanceof s)return r.value;if(!e){if(!this.stackSlot)throw new h["default"]("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof s?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,r){var s=[],i=this.setupHelperArgs(e,t,s,r),a=this.nameLookup("helpers",e,"helper"),n=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:s,paramsInit:i,name:a,callParams:[n].concat(s)}},setupParams:function(t,e,r){var s={},i=[],a=[],n=[],o=!r,c=void 0;o&&(r=[]),s.name=this.quotedString(t),s.hash=this.popStack(),this.trackIds&&(s.hashIds=this.popStack()),this.stringParams&&(s.hashTypes=this.popStack(),s.hashContexts=this.popStack());var h=this.popStack(),l=this.popStack();(l||h)&&(s.fn=l||"container.noop",s.inverse=h||"container.noop");for(var p=e;p--;)c=this.popStack(),r[p]=c,this.trackIds&&(n[p]=this.popStack()),this.stringParams&&(a[p]=this.popStack(),i[p]=this.popStack());return o&&(s.args=this.source.generateArray(r)),this.trackIds&&(s.ids=this.source.generateArray(n)),this.stringParams&&(s.types=this.source.generateArray(a),s.contexts=this.source.generateArray(i)),this.options.data&&(s.data="data"),this.useBlockParams&&(s.blockParams="blockParams"),s},setupHelperArgs:function(t,e,r,s){var i=this.setupParams(t,e,r);return i=this.objectLiteral(i),s?(this.useRegister("options"),r.push("options"),["options=",i]):r?(r.push(i),""):i}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=i.RESERVED_WORDS={},r=0,s=t.length;r<s;r++)e[t[r]]=!0}(),i.isValidJavaScriptVariableName=function(t){return!i.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e["default"]=i,t.exports=e["default"]},function(t,e,r){"use strict";function s(t,e,r){if(a.isArray(t)){for(var s=[],i=0,n=t.length;i<n;i++)s.push(e.wrap(t[i],r));return s}return"boolean"==typeof t||"number"==typeof t?t+"":t}function i(t){this.srcFile=t,this.source=[]}e.__esModule=!0;var a=r(5),n=void 0;try{}catch(o){}n||(n=function(t,e,r,s){this.src="",s&&this.add(s)},n.prototype={add:function(t){a.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){a.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),i.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,r=this.source.length;e<r;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new n(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof n?t:(t=s(t,this,e),new n(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,r){return r=this.generateList(r),this.wrap([t,e?"."+e+"(":"(",r,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var r in t)if(t.hasOwnProperty(r)){var i=s(t[r],this);"undefined"!==i&&e.push([this.quotedString(r),":",i])}var a=this.generateList(e);return a.prepend("{"),a.add("}"),a},generateList:function(t){for(var e=this.empty(),r=0,i=t.length;r<i;r++)r&&e.add(","),e.add(s(t[r],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e["default"]=i,t.exports=e["default"]}])}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.7.3.pack.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.7.3.pack.js deleted file mode 100644 index 9a95a75ea16..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.7.3.pack.js +++ /dev/null @@ -1 +0,0 @@ -var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack.js new file mode 100644 index 00000000000..7b00c68d365 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack.js @@ -0,0 +1 @@ +!function(e){"undefined"!=typeof exports?e(exports):(self.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return self.hljs}))}(function(e){function r(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function n(e,r){var t=e&&e.exec(r);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function c(e){var r,t,n,c=e.className+" ";if(c+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(c))return E(t[1])?t[1]:"no-highlight";for(c=c.split(/\s+/),r=0,n=c.length;n>r;r++)if(E(c[r])||a(c[r]))return c[r]}function i(e,r){var t,n={};for(t in e)n[t]=e[t];if(r)for(t in r)n[t]=r[t];return n}function o(e){var r=[];return function n(e,a){for(var c=e.firstChild;c;c=c.nextSibling)3==c.nodeType?a+=c.nodeValue.length:1==c.nodeType&&(r.push({event:"start",offset:a,node:c}),a=n(c,a),t(c).match(/br|hr|img|input/)||r.push({event:"stop",offset:a,node:c}));return a}(e,0),r}function s(e,n,a){function c(){return e.length&&n.length?e[0].offset!=n[0].offset?e[0].offset<n[0].offset?e:n:"start"==n[0].event?e:n:e.length?e:n}function i(e){function n(e){return" "+e.nodeName+'="'+r(e.value)+'"'}l+="<"+t(e)+Array.prototype.map.call(e.attributes,n).join("")+">"}function o(e){l+="</"+t(e)+">"}function s(e){("start"==e.event?i:o)(e.node)}for(var u=0,l="",f=[];e.length||n.length;){var b=c();if(l+=r(a.substr(u,b[0].offset-u)),u=b[0].offset,b==e){f.reverse().forEach(o);do s(b.splice(0,1)[0]),b=c();while(b==e&&b.length&&b[0].offset==u);f.reverse().forEach(i)}else"start"==b[0].event?f.push(b[0].node):f.pop(),s(b.splice(0,1)[0])}return l+r(a.substr(u))}function u(e){function r(e){return e&&e.source||e}function t(t,n){return new RegExp(r(t),"m"+(e.cI?"i":"")+(n?"g":""))}function n(a,c){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},s=function(r,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[r,t[1]?Number(t[1]):1]})};"string"==typeof a.k?s("keyword",a.k):Object.keys(a.k).forEach(function(e){s(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\b\w+\b/,!0),c&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=r(a.e)||"",a.eW&&c.tE&&(a.tE+=(a.e?"|":"")+c.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var u=[];a.c.forEach(function(e){e.v?e.v.forEach(function(r){u.push(i(e,r))}):u.push("self"==e?a:e)}),a.c=u,a.c.forEach(function(e){n(e,a)}),a.starts&&n(a.starts,c);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(r).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}n(e)}function l(e,t,a,c){function i(e,r){for(var t=0;t<r.c.length;t++)if(n(r.c[t].bR,e))return r.c[t]}function o(e,r){if(n(e.eR,r)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?o(e.parent,r):void 0}function s(e,r){return!a&&n(r.iR,e)}function b(e,r){var t=N.cI?r[0].toLowerCase():r[0];return e.k.hasOwnProperty(t)&&e.k[t]}function g(e,r,t,n){var a=n?"":w.classPrefix,c='<span class="'+a,i=t?"":"</span>";return c+=e+'">',c+r+i}function p(){if(!M.k)return r(B);var e="",t=0;M.lR.lastIndex=0;for(var n=M.lR.exec(B);n;){e+=r(B.substr(t,n.index-t));var a=b(M,n);a?(L+=a[1],e+=g(a[0],r(n[0]))):e+=r(n[0]),t=M.lR.lastIndex,n=M.lR.exec(B)}return e+r(B.substr(t))}function h(){var e="string"==typeof M.sL;if(e&&!y[M.sL])return r(B);var t=e?l(M.sL,B,!0,R[M.sL]):f(B,M.sL.length?M.sL:void 0);return M.r>0&&(L+=t.r),e&&(R[M.sL]=t.top),g(t.language,t.value,!1,!0)}function d(){return void 0!==M.sL?h():p()}function m(e,t){var n=e.cN?g(e.cN,"",!0):"";e.rB?(x+=n,B=""):e.eB?(x+=r(t)+n,B=""):(x+=n,B=t),M=Object.create(e,{parent:{value:M}})}function v(e,t){if(B+=e,void 0===t)return x+=d(),0;var n=i(t,M);if(n)return x+=d(),m(n,t),n.rB?0:t.length;var a=o(M,t);if(a){var c=M;c.rE||c.eE||(B+=t),x+=d();do M.cN&&(x+="</span>"),L+=M.r,M=M.parent;while(M!=a.parent);return c.eE&&(x+=r(t)),B="",a.starts&&m(a.starts,""),c.rE?0:t.length}if(s(t,M))throw new Error('Illegal lexeme "'+t+'" for mode "'+(M.cN||"<unnamed>")+'"');return B+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');u(N);var C,M=c||N,R={},x="";for(C=M;C!=N;C=C.parent)C.cN&&(x=g(C.cN,"",!0)+x);var B="",L=0;try{for(var S,A,k=0;M.t.lastIndex=k,S=M.t.exec(t),S;)A=v(t.substr(k,S.index-k),S[0]),k=S.index+A;for(v(t.substr(k)),C=M;C.parent;C=C.parent)C.cN&&(x+="</span>");return{r:L,value:x,language:e,top:M}}catch(I){if(-1!=I.message.indexOf("Illegal"))return{r:0,value:r(t)};throw I}}function f(e,t){t=t||w.languages||Object.keys(y);var n={r:0,value:r(e)},a=n;return t.forEach(function(r){if(E(r)){var t=l(r,e,!1);t.language=r,t.r>a.r&&(a=t),t.r>n.r&&(a=n,n=t)}}),a.language&&(n.second_best=a),n}function b(e){return w.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,r){return r.replace(/\t/g,w.tabReplace)})),w.useBR&&(e=e.replace(/\n/g,"<br>")),e}function g(e,r,t){var n=r?C[r]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(n)&&a.push(n),a.join(" ").trim()}function p(e){var r=c(e);if(!a(r)){var t;w.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var n=t.textContent,i=r?l(r,n,!0):f(n),u=o(t);if(u.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=i.value,i.value=s(u,o(p),n)}i.value=b(i.value),e.innerHTML=i.value,e.className=g(e.className,r,i.language),e.result={language:i.language,re:i.r},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.r})}}function h(e){w=i(w,e)}function d(){if(!d.called){d.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function m(){addEventListener("DOMContentLoaded",d,!1),addEventListener("load",d,!1)}function v(r,t){var n=y[r]=t(e);n.aliases&&n.aliases.forEach(function(e){C[e]=r})}function N(){return Object.keys(y)}function E(e){return e=(e||"").toLowerCase(),y[e]||y[C[e]]}var w={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},y={},C={};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=b,e.highlightBlock=p,e.configure=h,e.initHighlighting=d,e.initHighlightingOnLoad=m,e.registerLanguage=v,e.listLanguages=N,e.getLanguage=E,e.inherit=i,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(r,t,n){var a=e.inherit({cN:"comment",b:r,e:t,c:[]},n||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e}),hljs.registerLanguage("json",function(e){var r={literal:"true false null"},t=[e.QSM,e.CNM],n={e:",",eW:!0,eE:!0,c:t,k:r},a={b:"{",e:"}",c:[{cN:"attr",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:n}],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(n)],i:"\\S"};return t.splice(t.length,0,a,c),{c:t,k:r,i:"\\S"}}),hljs.registerLanguage("xml",function(e){var r="[A-Za-z0-9\\._:-]+",t={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},n={eW:!0,i:/</,r:0,c:[t,{cN:"attr",b:r,r:0},{b:"=",r:0,c:[{cN:"string",c:[t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[n],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[n],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},t,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},n]}]}}),hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}),hljs.registerLanguage("css",function(e){var r="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:r,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack_extended.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack_extended.js new file mode 100644 index 00000000000..162a224ddd6 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/highlight.9.1.0.pack_extended.js @@ -0,0 +1 @@ +"use strict";!function(){var h,l;h=hljs.configure,hljs.configure=function(l){var i=l.highlightSizeThreshold;hljs.highlightSizeThreshold=i===+i?i:null,h.call(this,l)},l=hljs.highlightBlock,hljs.highlightBlock=function(h){var i=h.innerHTML,g=hljs.highlightSizeThreshold;(null==g||g>i.length)&&l.call(hljs,h)}}(); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery-1.8.0.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery-1.8.0.min.js index 066d72c7e3a..e2e2b7f754f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery-1.8.0.min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery-1.8.0.min.js @@ -1,2 +1,3 @@ -/*! jQuery v@1.8.0 jquery.com | jquery.org/license */ -(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file +!function(e,t){function n(e){var t=he[e]={};return K.each(e.split(te),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(me,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:ge.test(r)?K.parseJSON(r):r)}catch(o){}K.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e)if(("data"!==t||!K.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function o(){return!1}function a(){return!0}function s(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function u(e,t,n){if(t=t||0,K.isFunction(t))return K.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return K.grep(e,function(e,r){return e===t===n});if("string"==typeof t){var r=K.grep(e,function(e){return 1===e.nodeType});if(_e.test(t))return K.filter(t,r,!n);t=K.filter(t,r)}return K.grep(e,function(e,r){return K.inArray(e,t)>=0===n})}function c(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function p(e,t){if(1===t.nodeType&&K.hasData(e)){var n,r,i,o=K._data(e),a=K._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r<i;r++)K.event.add(t,n,s[n][r])}a.data&&(a.data=K.extend({},a.data))}}function d(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),K.support.html5Clone&&e.innerHTML&&!K.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ve.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.selected=e.defaultSelected:"input"===n||"textarea"===n?t.defaultValue=e.defaultValue:"script"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(K.expando))}function h(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function g(e){Ve.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=mt.length;i--;)if(t=mt[i]+n,t in e)return t;return r}function y(e,t){return e=t||e,"none"===K.css(e,"display")||!K.contains(e.ownerDocument,e)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)n=e[o],n.style&&(i[o]=K._data(n,"olddisplay"),t?(!i[o]&&"none"===n.style.display&&(n.style.display=""),""===n.style.display&&y(n)&&(i[o]=K._data(n,"olddisplay",T(n.nodeName)))):(r=nt(n,"display"),!i[o]&&"none"!==r&&K._data(n,"olddisplay",r)));for(o=0;o<a;o++)n=e[o],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?i[o]||"":"none"));return e}function b(e,t,n){var r=ut.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function x(e,t,n,r){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,o=0;i<4;i+=2)"margin"===n&&(o+=K.css(e,n+gt[i],!0)),r?("content"===n&&(o-=parseFloat(nt(e,"padding"+gt[i]))||0),"margin"!==n&&(o-=parseFloat(nt(e,"border"+gt[i]+"Width"))||0)):(o+=parseFloat(nt(e,"padding"+gt[i]))||0,"padding"!==n&&(o+=parseFloat(nt(e,"border"+gt[i]+"Width"))||0));return o}function w(e,t,n){var r="width"===t?e.offsetWidth:e.offsetHeight,i=!0,o=K.support.boxSizing&&"border-box"===K.css(e,"boxSizing");if(r<=0){if(r=nt(e,t),(r<0||null==r)&&(r=e.style[t]),ct.test(r))return r;i=o&&(K.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+x(e,t,n||(o?"border":"content"),i)+"px"}function T(e){if(pt[e])return pt[e];var t=K("<"+e+">").appendTo(R.body),n=t.css("display");return t.remove(),"none"!==n&&""!==n||(rt=R.body.appendChild(rt||K.extend(R.createElement("iframe"),{frameBorder:0,width:0,height:0})),it&&rt.createElement||(it=(rt.contentWindow||rt.contentDocument).document,it.write("<!doctype html><html><body>"),it.close()),t=it.body.appendChild(it.createElement(e)),n=nt(t,"display"),R.body.removeChild(rt)),pt[e]=n,n}function N(e,t,n,r){var i;if(K.isArray(t))K.each(t,function(t,i){n||bt.test(e)?r(e,i):N(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==K.type(t))r(e,t);else for(i in t)N(e+"["+i+"]",t[i],n,r)}function C(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i,o,a=t.toLowerCase().split(te),s=0,l=a.length;if(K.isFunction(n))for(;s<l;s++)r=a[s],o=/^\+/.test(r),o&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[o?"unshift":"push"](n)}}function E(e,n,r,i,o,a){o=o||n.dataTypes[0],a=a||{},a[o]=!0;for(var s,l=e[o],u=0,c=l?l.length:0,f=e===Ot;u<c&&(f||!s);u++)s=l[u](n,r,i),"string"==typeof s&&(!f||a[s]?s=t:(n.dataTypes.unshift(s),s=E(e,n,r,i,s,a)));return(f||!s)&&!a["*"]&&(s=E(e,n,r,i,"*",a)),s}function k(e,n){var r,i,o=K.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&K.extend(!0,e,i)}function S(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===u[0];)u.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(o in l)if(l[o]&&l[o].test(i)){u.unshift(o);break}if(u[0]in r)a=u[0];else{for(o in r){if(!u[0]||e.converters[o+" "+u[0]]){a=o;break}s||(s=o)}a=a||s}if(a)return a!==u[0]&&u.unshift(a),r[a]}function A(e,t){var n,r,i,o,a=e.dataTypes.slice(),s=a[0],l={},u=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;i=a[++u];)if("*"!==i){if("*"!==s&&s!==i){if(n=l[s+" "+i]||l["* "+i],!n)for(r in l)if(o=r.split(" "),o[1]===i&&(n=l[s+" "+o[0]]||l["* "+o[0]])){n===!0?n=l[r]:l[r]!==!0&&(i=o[0],a.splice(u--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+s+" to "+i}}}s=i}return{state:"success",data:t}}function j(){try{return new e.XMLHttpRequest}catch(t){}}function D(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function L(){return setTimeout(function(){Ut=t},0),Ut=K.now()}function H(e,t){K.each(t,function(t,n){for(var r=(Kt[t]||[]).concat(Kt["*"]),i=0,o=r.length;i<o;i++)if(r[i].call(e,t,n))return})}function F(e,t,n){var r,i=0,o=Qt.length,a=K.Deferred().always(function(){delete s.elem}),s=function(){for(var t=Ut||L(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,o=l.tweens.length;i<o;i++)l.tweens[i].run(r);return a.notifyWith(e,[l,r,n]),r<1&&o?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:K.extend({},t),opts:K.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ut||L(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=K.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){for(var n=0,r=t?l.tweens.length:0;n<r;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),u=l.props;for(M(u,l.opts.specialEasing);i<o;i++)if(r=Qt[i].call(l,e,u,l.opts))return r;return H(l,u),K.isFunction(l.opts.start)&&l.opts.start.call(e,l),K.fx.timer(K.extend(s,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function M(e,t){var n,r,i,o,a;for(n in e)if(r=K.camelCase(n),i=t[r],o=e[n],K.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=K.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,o,a,s,l,u,c,f=this,p=e.style,d={},h=[],g=e.nodeType&&y(e);n.queue||(u=K._queueHooks(e,"fx"),null==u.unqueued&&(u.unqueued=0,c=u.empty.fire,u.empty.fire=function(){u.unqueued||c()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,K.queue(e,"fx").length||u.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===K.css(e,"display")&&"none"===K.css(e,"float")&&(K.support.inlineBlockNeedsLayout&&"inline"!==T(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",K.support.shrinkWrapBlocks||f.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Jt.exec(o)){if(delete t[r],o===(g?"hide":"show"))continue;h.push(r)}if(a=h.length)for(s=K._data(e,"fxshow")||K._data(e,"fxshow",{}),g?K(e).show():f.done(function(){K(e).hide()}),f.done(function(){var t;K.removeData(e,"fxshow",!0);for(t in d)K.style(e,t,d[t])}),r=0;r<a;r++)i=h[r],l=f.createTween(i,g?s[i]:0),d[i]=s[i]||K.style(e,i),i in s||(s[i]=l.start,g&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}function _(e,t,n,r,i){return new _.prototype.init(e,t,n,r,i)}function q(e,t){for(var n,r={height:e},i=0;i<4;i+=2-t)n=gt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e){return K.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var W,P,R=e.document,$=e.location,I=e.navigator,z=e.jQuery,X=e.$,U=Array.prototype.push,Y=Array.prototype.slice,J=Array.prototype.indexOf,V=Object.prototype.toString,G=Object.prototype.hasOwnProperty,Q=String.prototype.trim,K=function(e,t){return new K.fn.init(e,t,W)},Z=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,ee=/\S/,te=/\s+/,ne=ee.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,re=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,ie=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,oe=/^[\],:{}\s]*$/,ae=/(?:^|:|,)(?:\s*\[)+/g,se=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,le=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ue=/^-ms-/,ce=/-([\da-z])/gi,fe=function(e,t){return(t+"").toUpperCase()},pe=function(){R.addEventListener?(R.removeEventListener("DOMContentLoaded",pe,!1),K.ready()):"complete"===R.readyState&&(R.detachEvent("onreadystatechange",pe),K.ready())},de={};K.fn=K.prototype={constructor:K,init:function(e,n,r){var i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:re.exec(e),i&&(i[1]||!n)){if(i[1])return n=n instanceof K?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:R,e=K.parseHTML(i[1],a,!0),ie.test(i[1])&&K.isPlainObject(n)&&this.attr.call(e,n,!0),K.merge(this,e);if(o=R.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=R,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return K.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),K.makeArray(e,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return Y.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=K.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return K.each(this,e,t)},ready:function(e){return K.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Y.apply(this,arguments),"slice",Y.call(arguments).join(","))},map:function(e){return this.pushStack(K.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},K.fn.init.prototype=K.fn,K.extend=K.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"!=typeof s&&!K.isFunction(s)&&(s={}),u===l&&(s=this,--l);l<u;l++)if(null!=(e=arguments[l]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(K.isPlainObject(i)||(o=K.isArray(i)))?(o?(o=!1,a=r&&K.isArray(r)?r:[]):a=r&&K.isPlainObject(r)?r:{},s[n]=K.extend(c,a,i)):i!==t&&(s[n]=i));return s},K.extend({noConflict:function(t){return e.$===K&&(e.$=X),t&&e.jQuery===K&&(e.jQuery=z),K},isReady:!1,readyWait:1,holdReady:function(e){e?K.readyWait++:K.ready(!0)},ready:function(e){if(e===!0?!--K.readyWait:!K.isReady){if(!R.body)return setTimeout(K.ready,1);K.isReady=!0,e!==!0&&--K.readyWait>0||(P.resolveWith(R,[K]),K.fn.trigger&&K(R).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===K.type(e)},isArray:Array.isArray||function(e){return"array"===K.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):de[V.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==K.type(e)||e.nodeType||K.isWindow(e))return!1;try{if(e.constructor&&!G.call(e,"constructor")&&!G.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||G.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return e&&"string"==typeof e?("boolean"==typeof t&&(n=t,t=0),t=t||R,(r=ie.exec(e))?[t.createElement(r[1])]:(r=K.buildFragment([e],t,n?null:[]),K.merge([],(r.cacheable?K.clone(r.fragment):r.fragment).childNodes))):null},parseJSON:function(t){return t&&"string"==typeof t?(t=K.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):oe.test(t.replace(se,"@").replace(le,"]").replace(ae,""))?new Function("return "+t)():void K.error("Invalid JSON: "+t)):null},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&K.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&ee.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ue,"ms-").replace(ce,fe)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var i,o=0,a=e.length,s=a===t||K.isFunction(e);if(r)if(s){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;o<a&&n.apply(e[o++],r)!==!1;);else if(s){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;o<a&&n.call(e[o],o,e[o++])!==!1;);return e},trim:Q?function(e){return null==e?"":Q.call(e)}:function(e){return null==e?"":e.toString().replace(ne,"")},makeArray:function(e,t){var n,r=t||[];return null!=e&&(n=K.type(e),null==e.length||"string"===n||"function"===n||"regexp"===n||K.isWindow(e)?U.call(r,e):K.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(J)return J.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;o<r;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;o<a;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,n,r){var i,o,a=[],s=0,l=e.length,u=e instanceof K||l!==t&&"number"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||K.isArray(e));if(u)for(;s<l;s++)i=n(e[s],s,r),null!=i&&(a[a.length]=i);else for(o in e)i=n(e[o],o,r),null!=i&&(a[a.length]=i);return a.concat.apply([],a)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),K.isFunction(e)?(i=Y.call(arguments,2),o=function(){return e.apply(n,i.concat(Y.call(arguments)))},o.guid=e.guid=e.guid||o.guid||K.guid++,o):t},access:function(e,n,r,i,o,a,s){var l,u=null==r,c=0,f=e.length;if(r&&"object"==typeof r){for(c in r)K.access(e,n,c,r[c],1,a,i);o=1}else if(i!==t){if(l=s===t&&K.isFunction(i),u&&(l?(l=n,n=function(e,t,n){return l.call(K(e),n)}):(n.call(e,i),n=null)),n)for(;c<f;c++)n(e[c],r,l?i.call(e[c],c,n(e[c],r)):i,s);o=1}return o?e:u?n.call(e):f?n(e[0],r):a},now:function(){return(new Date).getTime()}}),K.ready.promise=function(t){if(!P)if(P=K.Deferred(),"complete"===R.readyState||"loading"!==R.readyState&&R.addEventListener)setTimeout(K.ready,1);else if(R.addEventListener)R.addEventListener("DOMContentLoaded",pe,!1),e.addEventListener("load",K.ready,!1);else{R.attachEvent("onreadystatechange",pe),e.attachEvent("onload",K.ready);var n=!1;try{n=null==e.frameElement&&R.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!K.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}K.ready()}}()}return P.promise(t)},K.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){de["[object "+t+"]"]=t.toLowerCase()}),W=K(R);var he={};K.Callbacks=function(e){e="string"==typeof e?he[e]||n(e):K.extend({},e);var r,i,o,a,s,l,u=[],c=!e.once&&[],f=function(t){for(r=e.memory&&t,i=!0,l=a||0,a=0,s=u.length,o=!0;u&&l<s;l++)if(u[l].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}o=!1,u&&(c?c.length&&f(c.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;!function n(t){K.each(t,function(t,r){!K.isFunction(r)||e.unique&&p.has(r)?r&&r.length&&n(r):u.push(r)})}(arguments),o?s=u.length:r&&(a=t,f(r))}return this},remove:function(){return u&&K.each(arguments,function(e,t){for(var n;(n=K.inArray(t,u,n))>-1;)u.splice(n,1),o&&(n<=s&&s--,n<=l&&l--)}),this},has:function(e){return K.inArray(e,u)>-1},empty:function(){return u=[],this},disable:function(){return u=c=r=t,this},disabled:function(){return!u},lock:function(){return c=t,r||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],u&&(!i||c)&&(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},K.extend({Deferred:function(e){var t=[["resolve","done",K.Callbacks("once memory"),"resolved"],["reject","fail",K.Callbacks("once memory"),"rejected"],["notify","progress",K.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return K.Deferred(function(n){K.each(t,function(t,r){var o=r[0],a=e[t];i[r[1]](K.isFunction(a)?function(){var e=a.apply(this,arguments);e&&K.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===i?n:this,[e])}:n[o])}),e=null}).promise()},promise:function(e){return"object"==typeof e?K.extend(e,r):r}},i={};return r.pipe=r.then,K.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=a.fire,i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=Y.call(arguments),a=o.length,s=1!==a||e&&K.isFunction(e.promise)?a:0,l=1===s?e:K.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?Y.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i<a;i++)o[i]&&K.isFunction(o[i].promise)?o[i].promise().done(u(i,r,o)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(r,o),l.promise()}}),K.support=function(){var t,n,r,i,o,a,s,l,u,c,f,p=R.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0],r.style.cssText="top:1px;float:left;opacity:.5",!n||!n.length||!r)return{};i=R.createElement("select"),o=i.appendChild(R.createElement("option")),a=p.getElementsByTagName("input")[0],t={leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:"on"===a.value,optSelected:o.selected,getSetAttribute:"t"!==p.className,enctype:!!R.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==R.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===R.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}if(!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",f=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",f)),a=R.createElement("input"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","checked"),a.setAttribute("name","t"),p.appendChild(a),s=R.createDocumentFragment(),s.appendChild(p.lastChild),t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,s.removeChild(a),s.appendChild(p),p.attachEvent)for(u in{submit:!0,change:!0,focusin:!0})l="on"+u,c=l in p,c||(p.setAttribute(l,"return;"),c="function"==typeof p[l]),t[u+"Bubbles"]=c;return K(function(){var n,r,i,o,a="padding:0;margin:0;border:0;display:block;overflow:hidden;",s=R.getElementsByTagName("body")[0];s&&(n=R.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",s.insertBefore(n,s.firstChild),r=R.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=r.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=c&&0===i[0].offsetHeight,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===r.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(r,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(r,null)||{width:"4px"}).width,o=R.createElement("div"),o.style.cssText=r.style.cssText=a,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),"undefined"!=typeof r.style.zoom&&(r.innerHTML="",r.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===r.offsetWidth,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==r.offsetWidth,n.style.zoom=1),s.removeChild(n),n=r=i=o=null)}),s.removeChild(p),n=r=i=o=a=s=p=null,t}();var ge=/^(?:\{.*\}|\[.*\])$/,me=/([A-Z])/g;K.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(K.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?K.cache[e[K.expando]]:e[K.expando],!!e&&!i(e)},data:function(e,n,r,i){if(K.acceptData(e)){var o,a,s=K.expando,l="string"==typeof n,u=e.nodeType,c=u?K.cache:e,f=u?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!l||r!==t)return f||(u?e[s]=f=K.deletedIds.pop()||++K.uuid:f=s),c[f]||(c[f]={},u||(c[f].toJSON=K.noop)),"object"!=typeof n&&"function"!=typeof n||(i?c[f]=K.extend(c[f],n):c[f].data=K.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[K.camelCase(n)]=r),l?(a=o[n],null==a&&(a=o[K.camelCase(n)])):a=o,a}},removeData:function(e,t,n){if(K.acceptData(e)){var r,o,a,s=e.nodeType,l=s?K.cache:e,u=s?e[K.expando]:K.expando;if(l[u]){if(t&&(r=n?l[u]:l[u].data)){K.isArray(t)||(t in r?t=[t]:(t=K.camelCase(t),t=t in r?[t]:t.split(" ")));for(o=0,a=t.length;o<a;o++)delete r[t[o]];if(!(n?i:K.isEmptyObject)(r))return}(n||(delete l[u].data,i(l[u])))&&(s?K.cleanData([e],!0):K.support.deleteExpando||l!=l.window?delete l[u]:l[u]=null)}}},_data:function(e,t,n){return K.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&K.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),K.fn.extend({data:function(e,n){var i,o,a,s,l,u=this[0],c=0,f=null;if(e===t){if(this.length&&(f=K.data(u),1===u.nodeType&&!K._data(u,"parsedAttrs"))){for(a=u.attributes,l=a.length;c<l;c++)s=a[c].name,0===s.indexOf("data-")&&(s=K.camelCase(s.substring(5)),r(u,s,f[s]));K._data(u,"parsedAttrs",!0)}return f}return"object"==typeof e?this.each(function(){K.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",o=i[1]+"!",K.access(this,function(n){return n===t?(f=this.triggerHandler("getData"+o,[i[0]]),f===t&&u&&(f=K.data(u,e),f=r(u,e,f)),f===t&&i[1]?this.data(i[0]):f):(i[1]=n,void this.each(function(){var t=K(this);t.triggerHandler("setData"+o,i),K.data(this,e,n),t.triggerHandler("changeData"+o,i)}))},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){K.removeData(this,e)})}}),K.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K._data(e,t),n&&(!r||K.isArray(n)?r=K._data(e,t,K.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=K.queue(e,t),r=n.shift(),i=K._queueHooks(e,t),o=function(){K.dequeue(e,t)};"inprogress"===r&&(r=n.shift()),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,o,i)),!n.length&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K._data(e,n)||K._data(e,n,{empty:K.Callbacks("once memory").add(function(){K.removeData(e,t+"queue",!0),K.removeData(e,n,!0)})})}}),K.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),arguments.length<r?K.queue(this[0],e):n===t?this:this.each(function(){var t=K.queue(this,e,n);K._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&K.dequeue(this,e)})},dequeue:function(e){return this.each(function(){K.dequeue(this,e)})},delay:function(e,t){return e=K.fx?K.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=K.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)(r=K._data(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var ye,ve,be,xe=/[\t\r\n]/g,we=/\r/g,Te=/^(?:button|input)$/i,Ne=/^(?:button|input|object|select|textarea)$/i,Ce=/^a(?:rea|)$/i,Ee=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ke=K.support.getSetAttribute;K.fn.extend({attr:function(e,t){return K.access(this,K.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){K.removeAttr(this,e)})},prop:function(e,t){return K.access(this,K.prop,e,t,arguments.length>1)},removeProp:function(e){return e=K.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a,s;if(K.isFunction(e))return this.each(function(t){K(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(te),n=0,r=this.length;n<r;n++)if(i=this[n],1===i.nodeType)if(i.className||1!==t.length){for(o=" "+i.className+" ",a=0,s=t.length;a<s;a++)~o.indexOf(" "+t[a]+" ")||(o+=t[a]+" ");i.className=K.trim(o)}else i.className=e;return this},removeClass:function(e){var n,r,i,o,a,s,l;if(K.isFunction(e))return this.each(function(t){K(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(n=(e||"").split(te),s=0,l=this.length;s<l;s++)if(i=this[s],1===i.nodeType&&i.className){for(r=(" "+i.className+" ").replace(xe," "),o=0,a=n.length;o<a;o++)for(;r.indexOf(" "+n[o]+" ")>-1;)r=r.replace(" "+n[o]+" "," ");i.className=e?K.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return K.isFunction(e)?this.each(function(n){K(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=K(this),s=t,l=e.split(te);i=l[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else"undefined"!==n&&"boolean"!==n||(this.className&&K._data(this,"__className__",this.className),this.className=this.className||e===!1?"":K._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(xe," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=K.isFunction(e),this.each(function(r){var o,a=K(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":K.isArray(o)&&(o=K.map(o,function(e){return null==e?"":e+""})),n=K.valHooks[this.type]||K.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=K.valHooks[o.type]||K.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(we,""):null==r?"":r)}}}),K.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,a=[],s=e.options,l="select-one"===e.type;if(o<0)return null;for(n=l?o:0,r=l?o+1:s.length;n<r;n++)if(i=s[n],i.selected&&(K.support.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!K.nodeName(i.parentNode,"optgroup"))){if(t=K(i).val(),l)return t;a.push(t)}return l&&!a.length&&s.length?K(s[o]).val():a},set:function(e,t){var n=K.makeArray(t);return K(e).find("option").each(function(){this.selected=K.inArray(K(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var o,a,s,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return i&&K.isFunction(K.fn[n])?K(e)[n](r):"undefined"==typeof e.getAttribute?K.prop(e,n,r):(s=1!==l||!K.isXMLDoc(e),s&&(n=n.toLowerCase(),a=K.attrHooks[n]||(Ee.test(n)?ve:ye)),r!==t?null===r?void K.removeAttr(e,n):a&&"set"in a&&s&&(o=a.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r):a&&"get"in a&&s&&null!==(o=a.get(e,n))?o:(o=e.getAttribute(n),null===o?t:o))},removeAttr:function(e,t){var n,r,i,o,a=0;if(t&&1===e.nodeType)for(r=t.split(te);a<r.length;a++)i=r[a],i&&(n=K.propFix[i]||i,o=Ee.test(i),o||K.attr(e,i,""),e.removeAttribute(ke?i:n),o&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(Te.test(e.nodeName)&&e.parentNode)K.error("type property can't be changed");else if(!K.support.radioValue&&"radio"===t&&K.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return ye&&K.nodeName(e,"button")?ye.get(e,t):t in e?e.value:null},set:function(e,t,n){return ye&&K.nodeName(e,"button")?ye.set(e,t,n):void(e.value=t)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!K.isXMLDoc(e),a&&(n=K.propFix[n]||n,o=K.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Ne.test(e.nodeName)||Ce.test(e.nodeName)&&e.href?0:t}}}}),ve={get:function(e,n){var r,i=K.prop(e,n);return i===!0||"boolean"!=typeof i&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?K.removeAttr(e,n):(r=K.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},ke||(be={name:!0,id:!0,coords:!0},ye=K.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(be[n]?""!==r.value:r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=R.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},K.each(["width","height"],function(e,t){K.attrHooks[t]=K.extend(K.attrHooks[t],{set:function(e,n){if(""===n)return e.setAttribute(t,"auto"), +n}})}),K.attrHooks.contenteditable={get:ye.get,set:function(e,t,n){""===t&&(t="false"),ye.set(e,t,n)}}),K.support.hrefNormalized||K.each(["href","src","width","height"],function(e,n){K.attrHooks[n]=K.extend(K.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null===r?t:r}})}),K.support.style||(K.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),K.support.optSelected||(K.propHooks.selected=K.extend(K.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),K.support.enctype||(K.propFix.enctype="encoding"),K.support.checkOn||K.each(["radio","checkbox"],function(){K.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),K.each(["radio","checkbox"],function(){K.valHooks[this]=K.extend(K.valHooks[this],{set:function(e,t){if(K.isArray(t))return e.checked=K.inArray(K(e).val(),t)>=0}})});var Se=/^(?:textarea|input|select)$/i,Ae=/^([^\.]*|)(?:\.(.+)|)$/,je=/(?:^|\s)hover(\.\S+|)\b/,De=/^key/,Le=/^(?:mouse|contextmenu)|click/,He=/^(?:focusinfocus|focusoutblur)$/,Fe=function(e){return K.event.special.hover?e:e.replace(je,"mouseenter$1 mouseleave$1")};K.event={add:function(e,n,r,i,o){var a,s,l,u,c,f,p,d,h,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(a=K._data(e))){for(r.handler&&(h=r,r=h.handler,o=h.selector),r.guid||(r.guid=K.guid++),l=a.events,l||(a.events=l={}),s=a.handle,s||(a.handle=s=function(e){return"undefined"==typeof K||e&&K.event.triggered===e.type?t:K.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=K.trim(Fe(n)).split(" "),u=0;u<n.length;u++)c=Ae.exec(n[u])||[],f=c[1],p=(c[2]||"").split(".").sort(),m=K.event.special[f]||{},f=(o?m.delegateType:m.bindType)||f,m=K.event.special[f]||{},d=K.extend({type:f,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,namespace:p.join(".")},h),g=l[f],g||(g=l[f]=[],g.delegateCount=0,m.setup&&m.setup.call(e,i,p,s)!==!1||(e.addEventListener?e.addEventListener(f,s,!1):e.attachEvent&&e.attachEvent("on"+f,s))),m.add&&(m.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),K.event.global[f]=!0;e=null}},global:{},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,p,d,h,g,m=K.hasData(e)&&K._data(e);if(m&&(p=m.events)){for(t=K.trim(Fe(t||"")).split(" "),o=0;o<t.length;o++)if(a=Ae.exec(t[o])||[],s=l=a[1],u=a[2],s){for(d=K.event.special[s]||{},s=(r?d.delegateType:d.bindType)||s,h=p[s]||[],c=h.length,u=u?new RegExp("(^|\\.)"+u.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,f=0;f<h.length;f++)g=h[f],(i||l===g.origType)&&(!n||n.guid===g.guid)&&(!u||u.test(g.namespace))&&(!r||r===g.selector||"**"===r&&g.selector)&&(h.splice(f--,1),g.selector&&h.delegateCount--,d.remove&&d.remove.call(e,g));0===h.length&&c!==h.length&&((!d.teardown||d.teardown.call(e,u,m.handle)===!1)&&K.removeEvent(e,s,m.handle),delete p[s])}else for(s in p)K.event.remove(e,s+t[o],n,r,!0);K.isEmptyObject(p)&&(delete m.handle,K.removeData(e,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||3!==i.nodeType&&8!==i.nodeType){var a,s,l,u,c,f,p,d,h,g,m=n.type||n,y=[];if(He.test(m+K.event.triggered))return;if(m.indexOf("!")>=0&&(m=m.slice(0,-1),s=!0),m.indexOf(".")>=0&&(y=m.split("."),m=y.shift(),y.sort()),(!i||K.event.customEvent[m])&&!K.event.global[m])return;if(n="object"==typeof n?n[K.expando]?n:new K.Event(m,n):new K.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=s,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,f=m.indexOf(":")<0?"on"+m:"",!i){a=K.cache;for(l in a)a[l].events&&a[l].events[m]&&K.event.trigger(n,r,a[l].handle.elem,!0);return}if(n.result=t,n.target||(n.target=i),r=null!=r?K.makeArray(r):[],r.unshift(n),p=K.event.special[m]||{},p.trigger&&p.trigger.apply(i,r)===!1)return;if(h=[[i,p.bindType||m]],!o&&!p.noBubble&&!K.isWindow(i)){for(g=p.delegateType||m,u=He.test(g+m)?i:i.parentNode,c=i;u;u=u.parentNode)h.push([u,g]),c=u;c===(i.ownerDocument||R)&&h.push([c.defaultView||c.parentWindow||e,g])}for(l=0;l<h.length&&!n.isPropagationStopped();l++)u=h[l][0],n.type=h[l][1],d=(K._data(u,"events")||{})[n.type]&&K._data(u,"handle"),d&&d.apply(u,r),d=f&&u[f],d&&K.acceptData(u)&&d.apply(u,r)===!1&&n.preventDefault();return n.type=m,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(i.ownerDocument,r)===!1)&&("click"!==m||!K.nodeName(i,"a"))&&K.acceptData(i)&&f&&i[m]&&("focus"!==m&&"blur"!==m||0!==n.target.offsetWidth)&&!K.isWindow(i)&&(c=i[f],c&&(i[f]=null),K.event.triggered=m,i[m](),K.event.triggered=t,c&&(i[f]=c)),n.result}},dispatch:function(n){n=K.event.fix(n||e.event);var r,i,o,a,s,l,u,c,f,p,d=(K._data(this,"events")||{})[n.type]||[],h=d.delegateCount,g=[].slice.call(arguments),m=!n.exclusive&&!n.namespace,y=K.event.special[n.type]||{},v=[];if(g[0]=n,n.delegateTarget=this,!y.preDispatch||y.preDispatch.call(this,n)!==!1){if(h&&(!n.button||"click"!==n.type))for(a=K(this),a.context=this,o=n.target;o!=this;o=o.parentNode||this)if(o.disabled!==!0||"click"!==n.type){for(l={},c=[],a[0]=o,r=0;r<h;r++)f=d[r],p=f.selector,l[p]===t&&(l[p]=a.is(p)),l[p]&&c.push(f);c.length&&v.push({elem:o,matches:c})}for(d.length>h&&v.push({elem:this,matches:d.slice(h)}),r=0;r<v.length&&!n.isPropagationStopped();r++)for(u=v[r],n.currentTarget=u.elem,i=0;i<u.matches.length&&!n.isImmediatePropagationStopped();i++)f=u.matches[i],(m||!n.namespace&&!f.namespace||n.namespace_re&&n.namespace_re.test(f.namespace))&&(n.data=f.data,n.handleObj=f,s=((K.event.special[f.origType]||{}).handle||f.handler).apply(u.elem,g),s!==t&&(n.result=s,s===!1&&(n.preventDefault(),n.stopPropagation())));return y.postDispatch&&y.postDispatch.call(this,n),n.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||R,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),!e.which&&a!==t&&(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[K.expando])return e;var t,n,r=e,i=K.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=K.Event(r),t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||R),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{ready:{setup:K.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){K.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=K.extend(new K.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?K.event.trigger(i,null,t):K.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},K.event.handle=K.event.dispatch,K.removeEvent=R.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&("undefined"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},K.Event=function(e,t){return this instanceof K.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?a:o):this.type=e,t&&K.extend(this,t),this.timeStamp=e&&e.timeStamp||K.now(),this[K.expando]=!0,void 0):new K.Event(e,t)},K.Event.prototype={preventDefault:function(){this.isDefaultPrevented=a;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=a;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a,this.stopPropagation()},isDefaultPrevented:o,isPropagationStopped:o,isImmediatePropagationStopped:o},K.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){K.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;o.selector;return i&&(i===r||K.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),K.support.submitBubbles||(K.event.special.submit={setup:function(){return!K.nodeName(this,"form")&&void K.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=K.nodeName(n,"input")||K.nodeName(n,"button")?n.form:t;r&&!K._data(r,"_submit_attached")&&(K.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),K._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&K.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return!K.nodeName(this,"form")&&void K.event.remove(this,"._submit")}}),K.support.changeBubbles||(K.event.special.change={setup:function(){return Se.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(K.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),K.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),K.event.simulate("change",this,e,!0)})),!1):void K.event.add(this,"beforeactivate._change",function(e){var t=e.target;Se.test(t.nodeName)&&!K._data(t,"_change_attached")&&(K.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&K.event.simulate("change",this.parentNode,e,!0)}),K._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return K.event.remove(this,"._change"),Se.test(this.nodeName)}}),K.support.focusinBubbles||K.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){K.event.simulate(t,e.target,K.event.fix(e),!0)};K.event.special[t]={setup:function(){0===n++&&R.addEventListener(e,r,!0)},teardown:function(){0===--n&&R.removeEventListener(e,r,!0)}}}),K.fn.extend({on:function(e,n,r,i,a){var s,l;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(l in e)this.on(l,n,r,e[l],a);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=o;else if(!i)return this;return 1===a&&(s=i,i=function(e){return K().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=K.guid++)),this.each(function(){K.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,a;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,K(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(a in e)this.off(a,n,e[a]);return this}return n!==!1&&"function"!=typeof n||(r=n,n=t),r===!1&&(r=o),this.each(function(){K.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return K(this.context).on(e,this.selector,t,n),this},die:function(e,t){return K(this.context).off(e,this.selector||"**",t),this},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)},trigger:function(e,t){return this.each(function(){K.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return K.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||K.guid++,r=0,i=function(n){var i=(K._data(this,"lastToggle"+e.guid)||0)%r;return K._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};for(i.guid=n;r<t.length;)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),K.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){K.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},De.test(t)&&(K.event.fixHooks[t]=K.event.keyHooks),Le.test(t)&&(K.event.fixHooks[t]=K.event.mouseHooks)}),function(e,t){function n(e,t,n,r){for(var i=0,o=t.length;i<o;i++)oe(e,t[i],n,r)}function r(e,t,r,i,o,a){var s,l=ae.setFilters[t.toLowerCase()];return l||oe.error(t),(e||!(s=o))&&n(e||"*",i,s=[],o),s.length>0?l(s,r,a):[]}function i(e,i,o,a,s){for(var l,u,c,f,p,d,h,g,m=0,y=s.length,v=z.POS,b=new RegExp("^"+v.source+"(?!"+C+")","i"),x=function(){for(var e=1,n=arguments.length-2;e<n;e++)arguments[e]===t&&(l[e]=t)};m<y;m++){for(v.exec(""),e=s[m],f=[],c=0,p=a;l=v.exec(e);)g=v.lastIndex=l.index+l[0].length,g>c&&(h=e.slice(c,l.index),c=g,d=[i],M.test(h)&&(p&&(d=p),p=a),(u=P.test(h))&&(h=h.slice(0,-5).replace(M,"$&*")),l.length>1&&l[0].replace(b,x),p=r(h,l[1],l[2],d,p,u));p?(f=f.concat(p),(h=e.slice(c))&&")"!==h?M.test(h)?n(h,f,o,a):oe(h,i,o,a?a.concat(p):p):T.apply(o,f)):oe(e,i,o,a)}return 1===y?o:oe.uniqueSort(o)}function o(e,t,n){for(var r,i,o,a=[],s=0,l=_.exec(e),u=!l.pop()&&!l.pop(),c=u&&e.match(O)||[""],f=ae.preFilter,p=ae.filter,d=!n&&t!==g;null!=(i=c[s])&&u;s++)for(a.push(r=[]),d&&(i=" "+i);i;){u=!1,(l=M.exec(i))&&(i=i.slice(l[0].length),u=r.push({part:l.pop().replace(F," "),captures:l}));for(o in p)(l=z[o].exec(i))&&(!f[o]||(l=f[o](l,t,n)))&&(i=i.slice(l.shift().length),u=r.push({part:o,captures:l}));if(!u)break}return u||oe.error(e),a}function a(e,t,n){var r=t.dir,i=x++;return e||(e=function(e){return e===n}),t.first?function(t,n){for(;t=t[r];)if(1===t.nodeType)return e(t,n)&&t}:function(t,n){for(var o,a=i+"."+f,s=a+"."+c;t=t[r];)if(1===t.nodeType){if((o=t[N])===s)return t.sizset;if("string"==typeof o&&0===o.indexOf(a)){if(t.sizset)return t}else{if(t[N]=s,e(t,n))return t.sizset=!0,t;t.sizset=!1}}}}function s(e,t){return e?function(n,r){var i=t(n,r);return i&&e(i===!0?n:i,r)}:t}function l(e,t,n){for(var r,i,o=0;r=e[o];o++)ae.relative[r.part]?i=a(i,ae.relative[r.part],t):(r.captures.push(t,n),i=s(i,ae.filter[r.part].apply(null,r.captures)));return i}function u(e){return function(t,n){for(var r,i=0;r=e[i];i++)if(r(t,n))return!0;return!1}}var c,f,p,d,h,g=e.document,m=g.documentElement,y="undefined",v=!1,b=!0,x=0,w=[].slice,T=[].push,N=("sizcache"+Math.random()).replace(".",""),C="[\\x20\\t\\r\\n\\f]",E="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",k=E.replace("w","w#"),S="([*^$|!~]?=)",A="\\["+C+"*("+E+")"+C+"*(?:"+S+C+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+k+")|)|)"+C+"*\\]",j=":("+E+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",D=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",L=C+"*([\\x20\\t\\r\\n\\f>+~])"+C+"*",H="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+A+"|"+j.replace(2,7)+"|[^\\\\(),])+",F=new RegExp("^"+C+"+|((?:^|[^\\\\])(?:\\\\.)*)"+C+"+$","g"),M=new RegExp("^"+L),O=new RegExp(H+"?(?="+C+"*,|$)","g"),_=new RegExp("^(?:(?!,)(?:(?:^|,)"+C+"*"+H+")*?|"+C+"*(.*?))(\\)|$)"),q=new RegExp(H.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+L,"g"),B=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,W=/[\x20\t\r\n\f]*[+~]/,P=/:not\($/,R=/h\d/i,$=/input|select|textarea|button/i,I=/\\(?!\\)/g,z={ID:new RegExp("^#("+E+")"),CLASS:new RegExp("^\\.("+E+")"),NAME:new RegExp("^\\[name=['\"]?("+E+")['\"]?\\]"),TAG:new RegExp("^("+E.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+A),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+C+"*(even|odd|(([+-]|)(\\d*)n|)"+C+"*(?:([+-]|)"+C+"*(\\d+)|))"+C+"*\\)|)","i"),POS:new RegExp(D,"ig"),needsContext:new RegExp("^"+C+"*[>+~]|"+D,"i")},X={},U=[],Y={},J=[],V=function(e){return e.sizzleFilter=!0,e},G=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}},Q=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}},Z=function(e){var t=!1,n=g.createElement("div");try{t=e(n)}catch(r){}return n=null,t},ee=Z(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),te=Z(function(e){e.id=N+0,e.innerHTML="<a name='"+N+"'></a><div name='"+N+"'></div>",m.insertBefore(e,m.firstChild);var t=g.getElementsByName&&g.getElementsByName(N).length===2+g.getElementsByName(N+0).length;return h=!g.getElementById(N),m.removeChild(e),t}),ne=Z(function(e){return e.appendChild(g.createComment("")),0===e.getElementsByTagName("*").length}),re=Z(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==y&&"#"===e.firstChild.getAttribute("href")}),ie=Z(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!(!e.getElementsByClassName||0===e.getElementsByClassName("e").length)&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length)}),oe=function(e,t,n,r){n=n||[],t=t||g;var i,o,a,s,l=t.nodeType;if(1!==l&&9!==l)return[];if(!e||"string"!=typeof e)return n;if(a=le(t),!a&&!r&&(i=B.exec(e)))if(s=i[1]){if(9===l){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&ue(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return T.apply(n,w.call(t.getElementsByTagName(e),0)),n;if((s=i[3])&&ie&&t.getElementsByClassName)return T.apply(n,w.call(t.getElementsByClassName(s),0)),n}return pe(e,t,n,r,a)},ae=oe.selectors={cacheLength:50,match:z,order:["ID","TAG"],attrHandle:{},createPseudo:V,find:{ID:h?function(e,t,n){if(typeof t.getElementById!==y&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==y&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==y&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:ne?function(e,t){if(typeof t.getElementsByTagName!==y)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if("*"===e){for(var r,i=[],o=0;r=n[o];o++)1===r.nodeType&&i.push(r);return i}return n}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(I,""),e[3]=(e[4]||e[5]||"").replace(I,""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1]?(e[2]||oe.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*("even"===e[2]||"odd"===e[2])),e[4]=+(e[6]+e[7]||"odd"===e[2])):e[2]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=e[4];return z.CHILD.test(e[0])?null:(n&&(t=_.exec(n))&&t.pop()&&(e[0]=e[0].slice(0,t[0].length-n.length-1),n=t[0].slice(0,-1)),e.splice(2,3,n||e[3]),e)}},filter:{ID:h?function(e){return e=e.replace(I,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(I,""),function(t){var n=typeof t.getAttributeNode!==y&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(I,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=X[e];return t||(t=X[e]=new RegExp("(^|"+C+")"+e+"("+C+"|$)"),U.push(e),U.length>ae.cacheLength&&delete X[U.shift()]),function(e){return t.test(e.className||typeof e.getAttribute!==y&&e.getAttribute("class")||"")}},ATTR:function(e,t,n){return t?function(r){var i=oe.attr(r,e),o=i+"";if(null==i)return"!="===t;switch(t){case"=":return o===n;case"!=":return o!==n;case"^=":return n&&0===o.indexOf(n);case"*=":return n&&o.indexOf(n)>-1;case"$=":return n&&o.substr(o.length-n.length)===n;case"~=":return(" "+o+" ").indexOf(n)>-1;case"|=":return o===n||o.substr(0,n.length+1)===n+"-"}}:function(t){return null!=oe.attr(t,e)}},CHILD:function(e,t,n,r){if("nth"===e){var i=x++;return function(e){var t,o,a=0,s=e;if(1===n&&0===r)return!0;if(t=e.parentNode,t&&(t[N]!==i||!e.sizset)){for(s=t.firstChild;s&&(1!==s.nodeType||(s.sizset=++a,s!==e));s=s.nextSibling);t[N]=i}return o=e.sizset-r,0===n?0===o:o%n===0&&o/n>=0}}return function(t){var n=t;switch(e){case"only":case"first":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if("first"===e)return!0;n=t;case"last":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t,n,r){var i=ae.pseudos[e]||ae.pseudos[e.toLowerCase()];return i||oe.error("unsupported pseudo: "+e),i.sizzleFilter?i(t,n,r):i}},pseudos:{not:V(function(e,t,n){var r=fe(e.replace(F,"$1"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!ae.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>"@"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},contains:V(function(e){return function(t){return(t.textContent||t.innerText||ce(t)).indexOf(e)>-1}}),has:V(function(e){return function(t){return oe(e,t).length>0}}),header:function(e){return R.test(e.nodeName)},text:function(e){var t,n;return"input"===e.nodeName.toLowerCase()&&"text"===(t=e.type)&&(null==(n=e.getAttribute("type"))||n.toLowerCase()===t)},radio:G("radio"),checkbox:G("checkbox"),file:G("file"),password:G("password"),image:G("image"),submit:Q("submit"),reset:Q("reset"),button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return $.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&(!!e.type||!!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){for(var r=[],i=n?1:0,o=e.length;i<o;i+=2)r.push(e[i]);return r},odd:function(e,t,n){for(var r=[],i=n?0:1,o=e.length;i<o;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);return n?e:r}}};ae.setFilters.nth=ae.setFilters.eq,ae.filters=ae.pseudos,re||(ae.attrHandle={href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}}),te&&(ae.order.push("NAME"),ae.find.NAME=function(e,t){if(typeof t.getElementsByName!==y)return t.getElementsByName(e)}),ie&&(ae.order.splice(1,0,"CLASS"),ae.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!==y&&!n)return t.getElementsByClassName(e)});try{w.call(m.childNodes,0)[0].nodeType}catch(se){w=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}var le=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},ue=oe.contains=m.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:m.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t.parentNode;return e===r||!!(r&&1===r.nodeType&&n.contains&&n.contains(r))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},ce=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=ce(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=ce(t);return n};oe.attr=function(e,t){var n,r=le(e);return r||(t=t.toLowerCase()),ae.attrHandle[t]?ae.attrHandle[t](e):ee||r?e.getAttribute(t):(n=e.getAttributeNode(t),n?"boolean"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},[0,0].sort(function(){return b=0}),m.compareDocumentPosition?p=function(e,t){return e===t?(v=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:(p=function(e,t){if(e===t)return v=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],o=[],a=e.parentNode,s=t.parentNode,l=a;if(a===s)return d(e,t);if(!a)return-1;if(!s)return 1;for(;l;)i.unshift(l),l=l.parentNode;for(l=s;l;)o.unshift(l),l=l.parentNode;n=i.length,r=o.length;for(var u=0;u<n&&u<r;u++)if(i[u]!==o[u])return d(i[u],o[u]);return u===n?d(e,o[u],-1):d(i[u],t,1)},d=function(e,t,n){if(e===t)return n;for(var r=e.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}),oe.uniqueSort=function(e){var t,n=1;if(p&&(v=b,e.sort(p),v))for(;t=e[n];n++)t===e[n-1]&&e.splice(n--,1);return e};var fe=oe.compile=function(e,t,n){var r,i,a,s=Y[e];if(s&&s.context===t)return s;for(i=o(e,t,n),a=0;r=i[a];a++)i[a]=l(r,t,n);return s=Y[e]=u(i),s.context=t,s.runs=s.dirruns=0,J.push(e),J.length>ae.cacheLength&&delete Y[J.shift()],s};oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){return oe(t,null,null,[e]).length>0};var pe=function(e,t,n,r,o){e=e.replace(F,"$1");var a,s,l,u,p,d,h,g,m,y=e.match(O),v=e.match(q),b=t.nodeType;if(z.POS.test(e))return i(e,t,n,r,y);if(r)a=w.call(r,0);else if(y&&1===y.length){if(v.length>1&&9===b&&!o&&(y=z.ID.exec(v[0]))){if(t=ae.find.ID(y[1],t,o)[0],!t)return n;e=e.slice(v.shift().length)}for(g=(y=W.exec(v[0]))&&!y.index&&t.parentNode||t,m=v.pop(),d=m.split(":not")[0],l=0,u=ae.order.length;l<u;l++)if(h=ae.order[l],y=z[h].exec(d)){if(a=ae.find[h]((y[1]||"").replace(I,""),g,o),null==a)continue;d===m&&(e=e.slice(0,e.length-m.length)+d.replace(z[h],""),e||T.apply(n,w.call(a,0)));break}}if(e)for(s=fe(e,t,o),f=s.dirruns++,null==a&&(a=ae.find.TAG("*",W.test(e)&&t.parentNode||t)),l=0;p=a[l];l++)c=s.runs++,s(p,t)&&n.push(p);return n};g.querySelectorAll&&function(){var e,t=pe,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[],o=[":active"],a=m.matchesSelector||m.mozMatchesSelector||m.webkitMatchesSelector||m.oMatchesSelector||m.msMatchesSelector;Z(function(e){e.innerHTML="<select><option selected></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+C+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),Z(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+C+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=i.length&&new RegExp(i.join("|")),pe=function(e,r,o,a,s){if(!(a||s||i&&i.test(e)))if(9===r.nodeType)try{return T.apply(o,w.call(r.querySelectorAll(e),0)),o}catch(l){}else if(1===r.nodeType&&"object"!==r.nodeName.toLowerCase()){var u=r.getAttribute("id"),c=u||N,f=W.test(e)&&r.parentNode||r;u?c=c.replace(n,"\\$&"):r.setAttribute("id",c);try{return T.apply(o,w.call(f.querySelectorAll(e.replace(O,"[id='"+c+"'] $&")),0)),o}catch(l){}finally{u||r.removeAttribute("id")}}return t(e,r,o,a,s)},a&&(Z(function(t){e=a.call(t,"div");try{a.call(t,"[test!='']:sizzle"),o.push(ae.match.PSEUDO)}catch(n){}}),o=new RegExp(o.join("|")),oe.matchesSelector=function(t,n){if(n=n.replace(r,"='$1']"),!(le(t)||o.test(n)||i&&i.test(n)))try{var s=a.call(t,n);if(s||e||t.document&&11!==t.document.nodeType)return s}catch(l){}return oe(n,null,null,[t]).length>0})}(),oe.attr=K.attr,K.find=oe,K.expr=oe.selectors,K.expr[":"]=K.expr.pseudos,K.unique=oe.uniqueSort,K.text=oe.getText,K.isXMLDoc=oe.isXML,K.contains=oe.contains}(e);var Me=/Until$/,Oe=/^(?:parents|prev(?:Until|All))/,_e=/^.[^:#\[\.,]*$/,qe=K.expr.match.needsContext,Be={children:!0,contents:!0,next:!0,prev:!0};K.fn.extend({find:function(e){var t,n,r,i,o,a,s=this;if("string"!=typeof e)return K(e).filter(function(){for(t=0,n=s.length;t<n;t++)if(K.contains(s[t],this))return!0});for(a=this.pushStack("","find",e),t=0,n=this.length;t<n;t++)if(r=a.length,K.find(e,this[t],a),t>0)for(i=r;i<a.length;i++)for(o=0;o<r;o++)if(a[o]===a[i]){a.splice(i--,1);break}return a},has:function(e){var t,n=K(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(K.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(u(this,e,!1),"not",e)},filter:function(e){return this.pushStack(u(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?qe.test(e)?K(e,this.context).index(this[0])>=0:K.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=qe.test(e)||"string"!=typeof e?K(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:K.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return o=o.length>1?K.unique(o):o,this.pushStack(o,"closest",e)},index:function(e){return e?"string"==typeof e?K.inArray(this[0],K(e)):K.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?K(e,t):K.makeArray(e&&e.nodeType?[e]:e),r=K.merge(this.get(),n);return this.pushStack(s(n[0])||s(r[0])?r:K.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),K.fn.andSelf=K.fn.addBack,K.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return K.dir(e,"parentNode")},parentsUntil:function(e,t,n){return K.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return K.dir(e,"nextSibling")},prevAll:function(e){return K.dir(e,"previousSibling")},nextUntil:function(e,t,n){return K.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return K.dir(e,"previousSibling",n)},siblings:function(e){return K.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return K.sibling(e.firstChild)},contents:function(e){return K.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:K.merge([],e.childNodes)}},function(e,t){K.fn[e]=function(n,r){var i=K.map(this,t,n);return Me.test(e)||(r=n),r&&"string"==typeof r&&(i=K.filter(r,i)),i=this.length>1&&!Be[e]?K.unique(i):i,this.length>1&&Oe.test(e)&&(i=i.reverse()),this.pushStack(i,e,Y.call(arguments).join(","))}}),K.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?K.find.matchesSelector(t[0],e)?[t[0]]:[]:K.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!K(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var We="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pe=/ jQuery\d+="(?:null|\d+)"/g,Re=/^\s+/,$e=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ie=/<([\w:]+)/,ze=/<tbody/i,Xe=/<|&#?\w+;/,Ue=/<(?:script|style|link)/i,Ye=/<(?:script|object|embed|option|style)/i,Je=new RegExp("<(?:"+We+")[\\s/>]","i"),Ve=/^(?:checkbox|radio)$/,Ge=/checked\s*(?:[^=]|=\s*.checked.)/i,Qe=/\/(java|ecma)script/i,Ke=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Ze={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},et=c(R),tt=et.appendChild(R.createElement("div")); +Ze.optgroup=Ze.option,Ze.tbody=Ze.tfoot=Ze.colgroup=Ze.caption=Ze.thead,Ze.th=Ze.td,K.support.htmlSerialize||(Ze._default=[1,"X<div>","</div>"]),K.fn.extend({text:function(e){return K.access(this,function(e){return e===t?K.text(this):this.empty().append((this[0]&&this[0].ownerDocument||R).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(K.isFunction(e))return this.each(function(t){K(this).wrapAll(e.call(this,t))});if(this[0]){var t=K(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return K.isFunction(e)?this.each(function(t){K(this).wrapInner(e.call(this,t))}):this.each(function(){var t=K(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=K.isFunction(e);return this.each(function(n){K(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){K.nodeName(this,"body")||K(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(e,this),"before",this.selector)}},after:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(this,e),"after",this.selector)}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!K.filter(e,[n]).length||(!t&&1===n.nodeType&&(K.cleanData(n.getElementsByTagName("*")),K.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&K.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return K.clone(this,e,t)})},html:function(e){return K.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Pe,""):t;if("string"==typeof e&&!Ue.test(e)&&(K.support.htmlSerialize||!Je.test(e))&&(K.support.leadingWhitespace||!Re.test(e))&&!Ze[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=e.replace($e,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},1===n.nodeType&&(K.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return s(this[0])?this.length?this.pushStack(K(K.isFunction(e)?e():e),"replaceWith",e):this:K.isFunction(e)?this.each(function(t){var n=K(this),r=n.html();n.replaceWith(e.call(this,t,r))}):("string"!=typeof e&&(e=K(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;K(this).remove(),t?K(t).before(e):K(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,o,a,s,l=0,u=e[0],c=[],p=this.length;if(!K.support.checkClone&&p>1&&"string"==typeof u&&Ge.test(u))return this.each(function(){K(this).domManip(e,n,r)});if(K.isFunction(u))return this.each(function(i){var o=K(this);e[0]=u.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){if(i=K.buildFragment(e,this,c),a=i.fragment,o=a.firstChild,1===a.childNodes.length&&(a=o),o)for(n=n&&K.nodeName(o,"tr"),s=i.cacheable||p-1;l<p;l++)r.call(n&&K.nodeName(this[l],"table")?f(this[l],"tbody"):this[l],l===s?a:K.clone(a,!0,!0));a=o=null,c.length&&K.each(c,function(e,t){t.src?K.ajax?K.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):K.error("no ajax"):K.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Ke,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),K.buildFragment=function(e,n,r){var i,o,a,s=e[0];return n=n||R,n=(n[0]||n).ownerDocument||n[0]||n,"undefined"==typeof n.createDocumentFragment&&(n=R),1===e.length&&"string"==typeof s&&s.length<512&&n===R&&"<"===s.charAt(0)&&!Ye.test(s)&&(K.support.checkClone||!Ge.test(s))&&(K.support.html5Clone||!Je.test(s))&&(o=!0,i=K.fragments[s],a=i!==t),i||(i=n.createDocumentFragment(),K.clean(e,n,i,r),o&&(K.fragments[s]=a&&i)),{fragment:i,cacheable:o}},K.fragments={},K.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){K.fn[e]=function(n){var r,i=0,o=[],a=K(n),s=a.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===s)return a[t](this[0]),this;for(;i<s;i++)r=(i>0?this.clone(!0):this).get(),K(a[i])[t](r),o=o.concat(r);return this.pushStack(o,e,a.selector)}}),K.extend({clone:function(e,t,n){var r,i,o,a;if(K.support.html5Clone||K.isXMLDoc(e)||!Je.test("<"+e.nodeName+">")?a=e.cloneNode(!0):(tt.innerHTML=e.outerHTML,tt.removeChild(a=tt.firstChild)),!(K.support.noCloneEvent&&K.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||K.isXMLDoc(e)))for(d(e,a),r=h(e),i=h(a),o=0;r[o];++o)i[o]&&d(r[o],i[o]);if(t&&(p(e,a),n))for(r=h(e),i=h(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s,l,u,f,p,d,h,m,y=0,v=[];for(t&&"undefined"!=typeof t.createDocumentFragment||(t=R),o=t===R&&et;null!=(a=e[y]);y++)if("number"==typeof a&&(a+=""),a){if("string"==typeof a)if(Xe.test(a)){for(o=o||c(t),f=f||o.appendChild(t.createElement("div")),a=a.replace($e,"<$1></$2>"),s=(Ie.exec(a)||["",""])[1].toLowerCase(),l=Ze[s]||Ze._default,u=l[0],f.innerHTML=l[1]+a+l[2];u--;)f=f.lastChild;if(!K.support.tbody)for(p=ze.test(a),d="table"!==s||p?"<table>"!==l[1]||p?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes,i=d.length-1;i>=0;--i)K.nodeName(d[i],"tbody")&&!d[i].childNodes.length&&d[i].parentNode.removeChild(d[i]);!K.support.leadingWhitespace&&Re.test(a)&&f.insertBefore(t.createTextNode(Re.exec(a)[0]),f.firstChild),a=f.childNodes,f=o.lastChild}else a=t.createTextNode(a);a.nodeType?v.push(a):v=K.merge(v,a)}if(f&&(o.removeChild(f),a=f=o=null),!K.support.appendChecked)for(y=0;null!=(a=v[y]);y++)K.nodeName(a,"input")?g(a):"undefined"!=typeof a.getElementsByTagName&&K.grep(a.getElementsByTagName("input"),g);if(n)for(h=function(e){if(!e.type||Qe.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)},y=0;null!=(a=v[y]);y++)K.nodeName(a,"script")&&h(a)||(n.appendChild(a),"undefined"!=typeof a.getElementsByTagName&&(m=K.grep(K.merge([],a.getElementsByTagName("script")),h),v.splice.apply(v,[y+1,0].concat(m)),y+=m.length));return v},cleanData:function(e,t){for(var n,r,i,o,a=0,s=K.expando,l=K.cache,u=K.support.deleteExpando,c=K.event.special;null!=(i=e[a]);a++)if((t||K.acceptData(i))&&(r=i[s],n=r&&l[r])){if(n.events)for(o in n.events)c[o]?K.event.remove(i,o):K.removeEvent(i,o,n.handle);l[r]&&(delete l[r],u?delete i[s]:i.removeAttribute?i.removeAttribute(s):i[s]=null,K.deletedIds.push(r))}}}),function(){var e,t;K.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=K.uaMatch(I.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.webkit&&(t.safari=!0),K.browser=t,K.sub=function(){function e(t,n){return new e.fn.init(t,n)}K.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function n(n,r){return r&&r instanceof K&&!(r instanceof e)&&(r=e(r)),K.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(R);return e}}();var nt,rt,it,ot=/alpha\([^)]*\)/i,at=/opacity=([^)]*)/,st=/^(top|right|bottom|left)$/,lt=/^margin/,ut=new RegExp("^("+Z+")(.*)$","i"),ct=new RegExp("^("+Z+")(?!px)[a-z%]+$","i"),ft=new RegExp("^([-+])=("+Z+")","i"),pt={},dt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:0,fontWeight:400,lineHeight:1},gt=["Top","Right","Bottom","Left"],mt=["Webkit","O","Moz","ms"],yt=K.fn.toggle;K.fn.extend({css:function(e,n){return K.access(this,function(e,n,r){return r!==t?K.style(e,n,r):K.css(e,n)},e,n,arguments.length>1)},show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e,t){var n="boolean"==typeof e;return K.isFunction(e)&&K.isFunction(t)?yt.apply(this,arguments):this.each(function(){(n?e:y(this))?K(this).show():K(this).hide()})}}),K.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nt(e,"opacity");return""===n?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":K.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=K.camelCase(n),u=e.style;if(n=K.cssProps[l]||(K.cssProps[l]=m(u,l)),s=K.cssHooks[n]||K.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=ft.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(K.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"===a&&!K.cssNumber[l]&&(r+="px"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=K.camelCase(n);return n=K.cssProps[l]||(K.cssProps[l]=m(e.style,l)),s=K.cssHooks[n]||K.cssHooks[l],s&&"get"in s&&(o=s.get(e,!0,i)),o===t&&(o=nt(e,n)),"normal"===o&&n in ht&&(o=ht[n]),r||i!==t?(a=parseFloat(o),r||K.isNumeric(a)?a||0:o):o},swap:function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=o[i];return r}}),e.getComputedStyle?nt=function(e,t){var n,r,i,o,a=getComputedStyle(e,null),s=e.style;return a&&(n=a[t],""===n&&!K.contains(e.ownerDocument.documentElement,e)&&(n=K.style(e,t)),ct.test(n)&&lt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=n,n=a.width,s.width=r,s.minWidth=i,s.maxWidth=o)),n}:R.documentElement.currentStyle&&(nt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],o=e.style;return null==i&&o&&o[t]&&(i=o[t]),ct.test(i)&&!st.test(t)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left="fontSize"===t?"1em":i,i=o.pixelLeft+"px",o.left=n,r&&(e.runtimeStyle.left=r)),""===i?"auto":i}),K.each(["height","width"],function(e,t){K.cssHooks[t]={get:function(e,n,r){if(n)return 0!==e.offsetWidth||"none"!==nt(e,"display")?w(e,t,r):K.swap(e,dt,function(){return w(e,t,r)})},set:function(e,n,r){return b(e,n,r?x(e,t,r,K.support.boxSizing&&"border-box"===K.css(e,"boxSizing")):0)}}}),K.support.opacity||(K.cssHooks.opacity={get:function(e,t){return at.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=K.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,t>=1&&""===K.trim(o.replace(ot,""))&&n.removeAttribute&&(n.removeAttribute("filter"),r&&!r.filter)||(n.filter=ot.test(o)?o.replace(ot,i):o+" "+i)}}),K(function(){K.support.reliableMarginRight||(K.cssHooks.marginRight={get:function(e,t){return K.swap(e,{display:"inline-block"},function(){if(t)return nt(e,"marginRight")})}}),!K.support.pixelPosition&&K.fn.position&&K.each(["top","left"],function(e,t){K.cssHooks[t]={get:function(e,n){if(n){var r=nt(e,t);return ct.test(r)?K(e).position()[t]+"px":r}}}})}),K.expr&&K.expr.filters&&(K.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!K.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||nt(e,"display"))},K.expr.filters.visible=function(e){return!K.expr.filters.hidden(e)}),K.each({margin:"",padding:"",border:"Width"},function(e,t){K.cssHooks[e+t]={expand:function(n){var r,i="string"==typeof n?n.split(" "):[n],o={};for(r=0;r<4;r++)o[e+gt[r]+t]=i[r]||i[r-2]||i[0];return o}},lt.test(e)||(K.cssHooks[e+t].set=b)});var vt=/%20/g,bt=/\[\]$/,xt=/\r?\n/g,wt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Tt=/^(?:select|textarea)/i;K.fn.extend({serialize:function(){return K.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?K.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Tt.test(this.nodeName)||wt.test(this.type))}).map(function(e,t){var n=K(this).val();return null==n?null:K.isArray(n)?K.map(n,function(e,n){return{name:t.name,value:e.replace(xt,"\r\n")}}):{name:t.name,value:n.replace(xt,"\r\n")}}).get()}}),K.param=function(e,n){var r,i=[],o=function(e,t){t=K.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=K.ajaxSettings&&K.ajaxSettings.traditional),K.isArray(e)||e.jquery&&!K.isPlainObject(e))K.each(e,function(){o(this.name,this.value)});else for(r in e)N(r,e[r],n,o);return i.join("&").replace(vt,"+")};var Nt,Ct,Et=/#.*$/,kt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,St=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,At=/^(?:GET|HEAD)$/,jt=/^\/\//,Dt=/\?/,Lt=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Ht=/([?&])_=[^&]*/,Ft=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Mt=K.fn.load,Ot={},_t={},qt=["*/"]+["*"];try{Nt=$.href}catch(Bt){Nt=R.createElement("a"),Nt.href="",Nt=Nt.href}Ct=Ft.exec(Nt.toLowerCase())||[],K.fn.load=function(e,n,r){if("string"!=typeof e&&Mt)return Mt.apply(this,arguments);if(!this.length)return this;var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),K.isFunction(n)?(r=n,n=t):"object"==typeof n&&(o="POST"),K.ajax({url:e,type:o,dataType:"html",data:n,complete:function(e,t){r&&s.each(r,a||[e.responseText,t,e])}}).done(function(e){a=arguments,s.html(i?K("<div>").append(e.replace(Lt,"")).find(i):e)}),this},K.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){K.fn[t]=function(e){return this.on(t,e)}}),K.each(["get","post"],function(e,n){K[n]=function(e,r,i,o){return K.isFunction(r)&&(o=o||i,i=r,r=t),K.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),K.extend({getScript:function(e,n){return K.get(e,t,n,"script")},getJSON:function(e,t,n){return K.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?k(e,K.ajaxSettings):(t=e,e=K.ajaxSettings),k(e,t),e},ajaxSettings:{url:Nt,isLocal:St.test(Ct[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":qt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":K.parseJSON,"text xml":K.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:C(Ot),ajaxTransport:C(_t),ajax:function(e,n){function r(e,n,r,a){var u,f,v,b,w,N=n;2!==x&&(x=2,l&&clearTimeout(l),s=t,o=a||"",T.readyState=e>0?4:0,r&&(b=S(p,T,r)),e>=200&&e<300||304===e?(p.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(K.lastModified[i]=w),w=T.getResponseHeader("Etag"),w&&(K.etag[i]=w)),304===e?(N="notmodified",u=!0):(u=A(p,b),N=u.state,f=u.data,v=u.error,u=!v)):(v=N,N&&!e||(N="error",e<0&&(e=0))),T.status=e,T.statusText=""+(n||N),u?g.resolveWith(d,[f,N,T]):g.rejectWith(d,[T,N,v]),T.statusCode(y),y=t,c&&h.trigger("ajax"+(u?"Success":"Error"),[T,p,u?f:v]),m.fireWith(d,[T,N]),c&&(h.trigger("ajaxComplete",[T,p]),--K.active||K.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,l,u,c,f,p=K.ajaxSetup({},n),d=p.context||p,h=d!==p&&(d.nodeType||d instanceof K)?K(d):K.event,g=K.Deferred(),m=K.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,w="canceled",T={readyState:0,setRequestHeader:function(e,t){if(!x){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},getAllResponseHeaders:function(){return 2===x?o:null},getResponseHeader:function(e){var n;if(2===x){if(!a)for(a={};n=kt.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return x||(p.mimeType=e),this},abort:function(e){return e=e||w,s&&s.abort(e),r(0,e),this}};if(g.promise(T),T.success=T.done,T.error=T.fail,T.complete=m.add,T.statusCode=function(e){if(e){var t;if(x<2)for(t in e)y[t]=[y[t],e[t]];else t=e[T.status],T.always(t)}return this},p.url=((e||p.url)+"").replace(Et,"").replace(jt,Ct[1]+"//"),p.dataTypes=K.trim(p.dataType||"*").toLowerCase().split(te),null==p.crossDomain&&(u=Ft.exec(p.url.toLowerCase()),p.crossDomain=!(!u||u[1]==Ct[1]&&u[2]==Ct[2]&&(u[3]||("http:"===u[1]?80:443))==(Ct[3]||("http:"===Ct[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=K.param(p.data,p.traditional)),E(Ot,p,n,T),2===x)return T;if(c=p.global,p.type=p.type.toUpperCase(),p.hasContent=!At.test(p.type),c&&0===K.active++&&K.event.trigger("ajaxStart"),!p.hasContent&&(p.data&&(p.url+=(Dt.test(p.url)?"&":"?")+p.data,delete p.data),i=p.url,p.cache===!1)){var N=K.now(),C=p.url.replace(Ht,"$1_="+N);p.url=C+(C===p.url?(Dt.test(p.url)?"&":"?")+"_="+N:"")}(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",p.contentType),p.ifModified&&(i=i||p.url,K.lastModified[i]&&T.setRequestHeader("If-Modified-Since",K.lastModified[i]),K.etag[i]&&T.setRequestHeader("If-None-Match",K.etag[i])),T.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)T.setRequestHeader(f,p.headers[f]);if(!p.beforeSend||p.beforeSend.call(d,T,p)!==!1&&2!==x){w="abort";for(f in{success:1,error:1,complete:1})T[f](p[f]);if(s=E(_t,p,n,T)){T.readyState=1,c&&h.trigger("ajaxSend",[T,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){T.abort("timeout")},p.timeout));try{x=1,s.send(v,r)}catch(k){if(!(x<2))throw k;r(-1,k)}}else r(-1,"No Transport");return T}return T.abort()},active:0,lastModified:{},etag:{}});var Wt=[],Pt=/\?/,Rt=/(=)\?(?=&|$)|\?\?/,$t=K.now();K.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||K.expando+"_"+$t++;return this[e]=!0,e}}),K.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.data,u=n.url,c=n.jsonp!==!1,f=c&&Rt.test(u),p=c&&!f&&"string"==typeof l&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rt.test(l);if("jsonp"===n.dataTypes[0]||f||p)return o=n.jsonpCallback=K.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a=e[o],f?n.url=u.replace(Rt,"$1"+o):p?n.data=l.replace(Rt,"$1"+o):c&&(n.url+=(Pt.test(u)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||K.error(o+" was not called"),s[0]},n.dataTypes[0]="json",e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Wt.push(o)),s&&K.isFunction(a)&&a(s[0]),s=a=t}),"script"}),K.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),K.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=R.head||R.getElementsByTagName("head")[0]||R.documentElement;return{send:function(i,o){n=R.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var It,zt=!!e.ActiveXObject&&function(){for(var e in It)It[e](0,1)},Xt=0;K.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&j()||D()}:j,function(e){K.extend(K.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(K.ajaxSettings.xhr()),K.support.ajax&&K.ajaxTransport(function(n){if(!n.crossDomain||K.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,f,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=K.noop,zt&&delete It[a]),i)4!==l.readyState&&l.abort();else{s=l.status,c=l.getAllResponseHeaders(),f={},p=l.responseXML,p&&p.documentElement&&(f.xml=p);try{f.text=l.responseText}catch(e){}try{u=l.statusText}catch(d){u=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,u,f,c)},n.async?4===l.readyState?setTimeout(r,0):(a=++Xt,zt&&(It||(It={},K(e).unload(zt)),It[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var Ut,Yt,Jt=/^(?:toggle|show|hide)$/,Vt=new RegExp("^(?:([-+])=|)("+Z+")([a-z%]*)$","i"),Gt=/queueHooks$/,Qt=[O],Kt={"*":[function(e,t){var n,r,i,o=this.createTween(e,t),a=Vt.exec(t),s=o.cur(),l=+s||0,u=1;if(a){if(n=+a[2],r=a[3]||(K.cssNumber[e]?"":"px"),"px"!==r&&l){l=K.css(o.elem,e,!0)||n||1;do i=u=u||".5",l/=u,K.style(o.elem,e,l+r),u=o.cur()/s;while(1!==u&&u!==i)}o.unit=r,o.start=l,o.end=a[1]?l+(a[1]+1)*n:n}return o}]};K.Animation=K.extend(F,{tweener:function(e,t){K.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r<i;r++)n=e[r],Kt[n]=Kt[n]||[],Kt[n].unshift(t)},prefilter:function(e,t){t?Qt.unshift(e):Qt.push(e)}}),K.Tween=_,_.prototype={constructor:_,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(K.cssNumber[n]?"":"px")},cur:function(){var e=_.propHooks[this.prop];return e&&e.get?e.get(this):_.propHooks._default.get(this)},run:function(e){var t,n=_.propHooks[this.prop];return this.pos=t=K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration),this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):_.propHooks._default.set(this),this}},_.prototype.init.prototype=_.prototype,_.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,!1,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},_.propHooks.scrollTop=_.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.each(["toggle","show","hide"],function(e,t){var n=K.fn[t];K.fn[t]=function(r,i,o){return null==r||"boolean"==typeof r||!e&&K.isFunction(r)&&K.isFunction(i)?n.apply(this,arguments):this.animate(q(t,!0),r,i,o)}}),K.fn.extend({fadeTo:function(e,t,n,r){return this.filter(y).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=K.isEmptyObject(e),o=K.speed(t,n,r),a=function(){var t=F(this,K.extend({},e),o);i&&t.stop(!0)};return i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=K.timers,a=K._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Gt.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem===this&&(null==e||o[n].queue===e)&&(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&K.dequeue(this,e)})}}),K.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){K.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),K.speed=function(e,t,n){var r=e&&"object"==typeof e?K.extend({},e):{complete:n||!n&&t||K.isFunction(e)&&e,duration:e,easing:n&&t||t&&!K.isFunction(t)&&t};return r.duration=K.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in K.fx.speeds?K.fx.speeds[r.duration]:K.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){K.isFunction(r.old)&&r.old.call(this),r.queue&&K.dequeue(this,r.queue)},r},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.timers=[],K.fx=_.prototype.init,K.fx.tick=function(){for(var e,t=K.timers,n=0;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||K.fx.stop()},K.fx.timer=function(e){e()&&K.timers.push(e)&&!Yt&&(Yt=setInterval(K.fx.tick,K.fx.interval))},K.fx.interval=13,K.fx.stop=function(){clearInterval(Yt),Yt=null},K.fx.speeds={slow:600,fast:200,_default:400},K.fx.step={},K.expr&&K.expr.filters&&(K.expr.filters.animated=function(e){return K.grep(K.timers,function(t){return e===t.elem}).length});var Zt=/^(?:body|html)$/i;K.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){K.offset.setOffset(this,e,t)});var n,r,i,o,a,s,l,u,c,f,p=this[0],d=p&&p.ownerDocument;if(d)return(i=d.body)===p?K.offset.bodyOffset(p):(r=d.documentElement,K.contains(r,p)?(n=p.getBoundingClientRect(),o=B(d),a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,l=o.pageYOffset||r.scrollTop,u=o.pageXOffset||r.scrollLeft,c=n.top+l-a,f=n.left+u-s,{top:c,left:f}):{top:0,left:0})},K.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return K.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(K.css(e,"marginTop"))||0,n+=parseFloat(K.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=K.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=K(e),s=a.offset(),l=K.css(e,"top"),u=K.css(e,"left"),c=("absolute"===r||"fixed"===r)&&K.inArray("auto",[l,u])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(l)||0,o=parseFloat(u)||0),K.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},K.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),n=this.offset(),r=Zt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(K.css(e,"marginTop"))||0,n.left-=parseFloat(K.css(e,"marginLeft"))||0,r.top+=parseFloat(K.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(K.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||R.body;e&&!Zt.test(e.nodeName)&&"static"===K.css(e,"position");)e=e.offsetParent;return e||R.body})}}),K.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);K.fn[e]=function(i){return K.access(this,function(e,i,o){var a=B(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:void(a?a.scrollTo(r?K(a).scrollLeft():o,r?o:K(a).scrollTop()):e[i]=o)},e,i,arguments.length,null)}}),K.each({Height:"height",Width:"width"},function(e,n){K.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){K.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return K.access(this,function(n,r,i){var o;return K.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?K.css(n,r,i,s):K.style(n,r,i,s)},n,a?i:t,a)}})}),e.jQuery=e.$=K,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return K})}(window); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.ba-bbq.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.ba-bbq.min.js index bcbf24834ac..78d1ff58e46 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.ba-bbq.min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.ba-bbq.min.js @@ -1,18 +1 @@ -/* - * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 - * http://benalman.com/projects/jquery-bbq-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this); -/* - * jQuery hashchange event - v1.2 - 2/11/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); \ No newline at end of file +!function(e,t){function n(e){return"string"==typeof e}function r(e){var t=g.call(arguments,1);return function(){return e.apply(this,t.concat(g.call(arguments)))}}function o(e){return e.replace(/^[^#]*#?(.*)$/,"$1")}function a(e){return e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function i(r,o,a,i,c){var u,s,p,h,d;return i!==f?(p=a.match(r?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/),d=p[3]||"",2===c&&n(i)?s=i.replace(r?R:E,""):(h=l(p[2]),i=n(i)?l[r?A:w](i):i,s=2===c?i:1===c?e.extend({},i,h):e.extend({},h,i),s=b(s),r&&(s=s.replace(m,y))),u=p[1]+(r?"#":s||!p[1]?"?":"")+s+d):u=o(a!==f?a:t[S][q]),u}function c(e,t,r){return t===f||"boolean"==typeof t?(r=t,t=b[e?A:w]()):t=n(t)?t.replace(e?R:E,""):t,l(t,r)}function u(t,r,o,a){return n(o)||"object"==typeof o||(a=o,o=r,r=f),this.each(function(){var n=e(this),i=r||v()[(this.nodeName||"").toLowerCase()]||"",c=i&&n.attr(i)||"";n.attr(i,b[t](c,o,a))})}var f,s,l,p,h,d,v,m,g=Array.prototype.slice,y=decodeURIComponent,b=e.param,$=e.bbq=e.bbq||{},x=e.event.special,j="hashchange",w="querystring",A="fragment",N="elemUrlAttr",S="location",q="href",C="src",E=/^.*\?|#.*$/g,R=/^.*\#/,U={};b[w]=r(i,0,a),b[A]=s=r(i,1,o),s.noEscape=function(t){t=t||"";var n=e.map(t.split(""),encodeURIComponent);m=new RegExp(n.join("|"),"g")},s.noEscape(",/"),e.deparam=l=function(t,n){var r={},o={"true":!0,"false":!1,"null":null};return e.each(t.replace(/\+/g," ").split("&"),function(t,a){var i,c=a.split("="),u=y(c[0]),s=r,l=0,p=u.split("]["),h=p.length-1;if(/\[/.test(p[0])&&/\]$/.test(p[h])?(p[h]=p[h].replace(/\]$/,""),p=p.shift().split("[").concat(p),h=p.length-1):h=0,2===c.length)if(i=y(c[1]),n&&(i=i&&!isNaN(i)?+i:"undefined"===i?f:o[i]!==f?o[i]:i),h)for(;l<=h;l++)u=""===p[l]?s.length:p[l],s=s[u]=l<h?s[u]||(p[l+1]&&isNaN(p[l+1])?{}:[]):i;else e.isArray(r[u])?r[u].push(i):r[u]!==f?r[u]=[r[u],i]:r[u]=i;else u&&(r[u]=n?f:"")}),r},l[w]=r(c,0),l[A]=p=r(c,1),e[N]||(e[N]=function(t){return e.extend(U,t)})({a:q,base:q,iframe:C,img:C,input:C,form:"action",link:q,script:C}),v=e[N],e.fn[w]=r(u,w),e.fn[A]=r(u,A),$.pushState=h=function(e,r){n(e)&&/^#/.test(e)&&r===f&&(r=2);var o=e!==f,a=s(t[S][q],o?e:{},o?r:2);t[S][q]=a+(/#/.test(a)?"":"#")},$.getState=d=function(e,t){return e===f||"boolean"==typeof e?p(e):p(t)[e]},$.removeState=function(t){var n={};t!==f&&(n=d(),e.each(e.isArray(t)?t:arguments,function(e,t){delete n[t]})),h(n,2)},x[j]=e.extend(x[j],{add:function(t){function n(e){var t=e[A]=s();e.getState=function(e,n){return e===f||"boolean"==typeof e?l(t,e):l(t,n)[e]},r.apply(this,arguments)}var r;return e.isFunction(t)?(r=t,n):(r=t.handler,void(t.handler=n))}})}(jQuery,this),function(e,t,n){function r(e){return e=e||t[i][u],e.replace(/^[^#]*#?(.*)$/,"$1")}var o,a=e.event.special,i="location",c="hashchange",u="href",f=e.browser,s=document.documentMode,l=f.msie&&(s===n||s<8),p="on"+c in t&&!l;e[c+"Delay"]=100,a[c]=e.extend(a[c],{setup:function(){return!p&&void e(o.start)},teardown:function(){return!p&&void e(o.stop)}}),o=function(){function n(){f=s=function(e){return e},l&&(a=e('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow,s=function(){return r(a.document[i][u])},(f=function(e,t){if(e!==t){var n=a.document;n.open().close(),n[i].hash="#"+e}})(r()))}var o,a,f,s,p={};return p.start=function(){if(!o){var a=r();f||n(),function l(){var n=r(),p=s(a);n!==a?(f(a=n,p),e(t).trigger(c)):p!==a&&(t[i][u]=t[i][u].replace(/#.*/,"")+"#"+p),o=setTimeout(l,e[c+"Delay"])}()}},p.stop=function(){a||(o&&clearTimeout(o),o=0)},p}()}(jQuery,this); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.slideto.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.slideto.min.js index ba32cff3651..b15997b9102 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.slideto.min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.slideto.min.js @@ -1 +1 @@ -(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery); +!function(i){i.fn.slideto=function(o){return o=i.extend({slide_duration:"slow",highlight_duration:3e3,highlight:!0,highlight_color:"#FFFF99"},o),this.each(function(){obj=i(this),i("body").animate({scrollTop:obj.offset().top},o.slide_duration,function(){o.highlight&&i.ui.version&&obj.effect("highlight",{color:o.highlight_color},o.highlight_duration)})})}}(jQuery); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.wiggle.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.wiggle.min.js index 2adb0d6d54a..6b4e261cc48 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.wiggle.min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jquery.wiggle.min.js @@ -1,8 +1 @@ -/* -jQuery Wiggle -Author: WonderGroup, Jordan Thomas -URL: http://labs.wondergroup.com/demos/mini-ui/index.html -License: MIT (http://en.wikipedia.org/wiki/MIT_License) -*/ -jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} -if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; \ No newline at end of file +jQuery.fn.wiggle=function(e){var a={speed:50,wiggles:3,travel:5,callback:null},e=jQuery.extend(a,e);return this.each(function(){var a=this,l=(jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative"),0);for(i=1;i<=e.wiggles;i++)jQuery(this).animate({left:"-="+e.travel},e.speed).animate({left:"+="+2*e.travel},2*e.speed).animate({left:"-="+e.travel},e.speed,function(){l++,jQuery(a).parent().hasClass("wiggle-wrap")&&jQuery(a).parent().replaceWith(a),l==e.wiggles&&jQuery.isFunction(e.callback)&&e.callback()})})}; \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/js-yaml.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/js-yaml.min.js new file mode 100644 index 00000000000..2514a410c84 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/js-yaml.min.js @@ -0,0 +1,2 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.jsyaml=t()}}(function(){var t;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}var r=t("./js-yaml/loader"),o=t("./js-yaml/dumper");e.exports.Type=t("./js-yaml/type"),e.exports.Schema=t("./js-yaml/schema"),e.exports.FAILSAFE_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.JSON_SCHEMA=t("./js-yaml/schema/json"),e.exports.CORE_SCHEMA=t("./js-yaml/schema/core"),e.exports.DEFAULT_SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_FULL_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=t("./js-yaml/exception"),e.exports.MINIMAL_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(t,e,n){"use strict";function i(t){return"undefined"==typeof t||null===t}function r(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function a(t,e){var n,i,r,o;if(e)for(o=Object.keys(e),n=0,i=o.length;i>n;n+=1)r=o[n],t[r]=e[r];return t}function s(t,e){var n,i="";for(n=0;e>n;n+=1)i+=t;return i}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}e.exports.isNothing=i,e.exports.isObject=r,e.exports.toArray=o,e.exports.repeat=s,e.exports.isNegativeZero=c,e.exports.extend=a},{}],3:[function(t,e,n){"use strict";function i(t,e){var n,i,r,o,a,s,c;if(null===e)return{};for(n={},i=Object.keys(e),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=t.compiledTypeMap[a],c&&E.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(t){var e,n,i;if(e=t.toString(16).toUpperCase(),255>=t)n="x",i=2;else if(65535>=t)n="u",i=4;else{if(!(4294967295>=t))throw new O("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-e.length)+e}function o(t){this.schema=t.schema||S,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=j.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=i(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(t,e){for(var n,i=j.repeat(" ",e),r=0,o=-1,a="",s=t.length;s>r;)o=t.indexOf("\n",r),-1===o?(n=t.slice(r),r=s):(n=t.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(t,e){return"\n"+j.repeat(" ",t.indent*e)}function c(t,e){var n,i,r;for(n=0,i=t.implicitTypes.length;i>n;n+=1)if(r=t.implicitTypes[n],r.resolve(e))return!0;return!1}function u(t){this.source=t,this.result="",this.checkpoint=0}function l(t,e,n,i){var r,o,s,l,f,m,y,g,v,x,A,b,w,k,C,j,O,S,_,I,E;if(0===e.length)return void(t.dump="''");if(-1!==et.indexOf(e))return void(t.dump="'"+e+"'");for(r=!0,o=e.length?e.charCodeAt(0):0,s=M===o||M===e.charCodeAt(e.length-1),(K===o||W===o||G===o||z===o)&&(r=!1),s?(r=!1,l=!1,f=!1):(l=!i,f=!i),m=!0,y=new u(e),g=!1,v=0,x=0,A=t.indent*n,b=t.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k<e.length;k++){if(w=e.charCodeAt(k),r){if(h(w))continue;r=!1}m&&w===P&&(m=!1),C=tt[w],j=d(w),(C||j)&&(w!==N&&w!==D&&w!==P?(l=!1,f=!1):w===N&&(g=!0,m=!1,k>0&&(O=e.charCodeAt(k-1),O===M&&(f=!1,l=!1)),l&&(S=k-v,v=k,S>x&&(x=S))),w!==D&&(m=!1),y.takeUpTo(k),y.escapeChar())}if(r&&c(t,e)&&(r=!1),_="",(l||f)&&(I=0,e.charCodeAt(e.length-1)===N&&(I+=1,e.charCodeAt(e.length-2)===N&&(I+=1)),0===I?_="-":2===I&&(_="+")),f&&b>x&&(l=!1),g||(f=!1),r)t.dump=e;else if(m)t.dump="'"+e+"'";else if(l)E=p(e,b),t.dump=">"+_+"\n"+a(E,A);else if(f)_||(e=e.replace(/\n$/,"")),t.dump="|"+_+"\n"+a(e,A);else{if(!y)throw new Error("Failed to dump scalar value");y.finish(),t.dump='"'+y.result+'"'}}function p(t,e){var n,i="",r=0,o=t.length,a=/\n+$/.exec(t);for(a&&(o=a.index+1);o>r;)n=t.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(t.slice(r,o),e),r=o):(i&&(i+="\n\n"),i+=f(t.slice(r,n),e),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(t,e){if(""===t)return t;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(t);u;)n=u.index,n-c>e&&(i=s!==c?s:n,a&&(a+="\n"),r=t.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(t);return a&&(a+="\n"),a+=c!==s&&t.length-c>e?t.slice(c,s)+"\n"+t.slice(s+1):t.slice(c)}function h(t){return F!==t&&N!==t&&T!==t&&$!==t&&V!==t&&Z!==t&&J!==t&&X!==t&&U!==t&&Y!==t&&B!==t&&L!==t&&Q!==t&&R!==t&&P!==t&&D!==t&&q!==t&&H!==t&&!tt[t]&&!d(t)}function d(t){return!(t>=32&&126>=t||133===t||t>=160&&55295>=t||t>=57344&&65533>=t||t>=65536&&1114111>=t)}function m(t,e,n){var i,r,o="",a=t.tag;for(i=0,r=n.length;r>i;i+=1)A(t,e,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function y(t,e,n,i){var r,o,a="",c=t.tag;for(r=0,o=n.length;o>r;r+=1)A(t,e+1,n[r],!0,!0)&&(i&&0===r||(a+=s(t,e)),a+="- "+t.dump);t.tag=c,t.dump=a||"[]"}function g(t,e,n){var i,r,o,a,s,c="",u=t.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(t,e,o,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+": ",A(t,e,a,!1,!1)&&(s+=t.dump,c+=s));t.tag=u,t.dump="{"+c+"}"}function v(t,e,n,i){var r,o,a,c,u,l,p="",f=t.tag,h=Object.keys(n);if(t.sortKeys===!0)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new O("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(t,e)),a=h[r],c=n[a],A(t,e+1,a,!0,!0,!0)&&(u=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,u&&(l+=t.dump&&N===t.dump.charCodeAt(0)?"?":"? "),l+=t.dump,u&&(l+=s(t,e)),A(t,e+1,c,!0,u)&&(l+=t.dump&&N===t.dump.charCodeAt(0)?":":": ",l+=t.dump,p+=l));t.tag=f,t.dump=p||"{}"}function x(t,e,n){var i,r,o,a,s,c;for(r=n?t.explicitTypes:t.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(t.tag=n?s.tag:"?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===I.call(s.represent))i=s.represent(e,c);else{if(!E.call(s.represent,c))throw new O("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](e,c)}t.dump=i}return!0}return!1}function A(t,e,n,i,r,o){t.tag=null,t.dump=n,x(t,n,!1)||x(t,n,!0);var a=I.call(t.dump);i&&(i=0>t.flowLevel||t.flowLevel>e);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=t.duplicates.indexOf(n),c=-1!==s),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&e>0)&&(r=!1),c&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&c&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(t.dump).length?(v(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(g(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===a)i&&0!==t.dump.length?(y(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(m(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==a){if(t.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+a)}"?"!==t.tag&&l(t,t.dump,e,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function b(t,e){var n,i,r=[],o=[];for(w(t,r,o),n=0,i=o.length;i>n;n+=1)e.duplicates.push(r[o[n]]);e.usedDuplicates=new Array(i)}function w(t,e,n){var i,r,o;if(null!==t&&"object"==typeof t)if(r=e.indexOf(t),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(e.push(t),Array.isArray(t))for(r=0,o=t.length;o>r;r+=1)w(t[r],e,n);else for(i=Object.keys(t),r=0,o=i.length;o>r;r+=1)w(t[i[r]],e,n)}function k(t,e){e=e||{};var n=new o(e);return b(t,n),A(n,0,t,!0,!0)?n.dump+"\n":""}function C(t,e){return k(t,j.extend({schema:_},e))}var j=t("./common"),O=t("./exception"),S=t("./schema/default_full"),_=t("./schema/default_safe"),I=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=9,N=10,T=13,M=32,L=33,D=34,U=35,q=37,Y=38,P=39,B=42,$=44,K=45,H=58,R=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,tt={};tt[0]="\\0",tt[7]="\\a",tt[8]="\\b",tt[9]="\\t",tt[10]="\\n",tt[11]="\\v",tt[12]="\\f",tt[13]="\\r",tt[27]="\\e",tt[34]='\\"',tt[92]="\\\\",tt[133]="\\N",tt[160]="\\_",tt[8232]="\\L",tt[8233]="\\P";var et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(t){var e;if(t<this.checkpoint)throw e=new Error("position should be > checkpoint"),e.position=t,e.checkpoint=this.checkpoint,e;return this.result+=this.source.slice(this.checkpoint,t),this.checkpoint=t,this},u.prototype.escapeChar=function(){var t,e;return t=this.source.charCodeAt(this.checkpoint),e=tt[t]||r(t),this.result+=e,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},e.exports.dump=k,e.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(t,e,n){"use strict";function i(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var r=t("inherit");r(i,Error),i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},e.exports=i},{inherit:31}],5:[function(t,e,n){"use strict";function i(t){return 10===t||13===t}function r(t){return 9===t||32===t}function o(t){return 9===t||32===t||10===t||13===t}function a(t){return 44===t||91===t||93===t||123===t||125===t}function s(t){var e;return t>=48&&57>=t?t-48:(e=32|t,e>=97&&102>=e?e-97+10:-1)}function c(t){return 120===t?2:117===t?4:85===t?8:0}function u(t){return t>=48&&57>=t?t-48:-1}function l(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t?"\t":9===t?"\t":110===t?"\n":118===t?"\x0B":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function p(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function f(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||H,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(t,e){return new B(e,new $(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function d(t,e){throw h(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,h(t,e))}function y(t,e,n,i){var r,o,a,s;if(n>e){if(s=t.input.slice(e,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(t,"expected valid JSON character");else X.test(s)&&d(t,"the stream contains non-printable characters");t.result+=s}}function g(t,e,n){var i,r,o,a;for(P.isObject(n)||d(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;a>o;o+=1)r=i[o],R.call(e,r)||(e[r]=n[r])}function v(t,e,n,i,r){var o,a;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(o=0,a=r.length;a>o;o+=1)g(t,e,r[o]);else g(t,e,r);else e[i]=r;return e}function x(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):d(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function A(t,e,n){for(var o=0,a=t.input.charCodeAt(t.position);0!==a;){for(;r(a);)a=t.input.charCodeAt(++t.position);if(e&&35===a)do a=t.input.charCodeAt(++t.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(x(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==n&&0!==o&&t.lineIndent<n&&m(t,"deficient indentation"),o}function b(t){var e,n=t.position;return e=t.input.charCodeAt(n),!(45!==e&&46!==e||t.input.charCodeAt(n+1)!==e||t.input.charCodeAt(n+2)!==e||(n+=3,e=t.input.charCodeAt(n),0!==e&&!o(e)))}function w(t,e){1===e?t.result+=" ":e>1&&(t.result+=P.repeat("\n",e-1))}function k(t,e,n){var s,c,u,l,p,f,h,d,m,g=t.kind,v=t.result;if(m=t.input.charCodeAt(t.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c)))return!1;for(t.kind="scalar",t.result="",u=l=t.position,p=!1;0!==m;){if(58===m){if(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=t.input.charCodeAt(t.position-1),o(s))break}else{if(t.position===t.lineStart&&b(t)||n&&a(m))break;if(i(m)){if(f=t.line,h=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=e){p=!0,m=t.input.charCodeAt(t.position);continue}t.position=l,t.line=f,t.lineStart=h,t.lineIndent=d;break}}p&&(y(t,u,l,!1),w(t,t.line-f),u=l=t.position,p=!1),r(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return y(t,u,l,!1),!!t.result||(t.kind=g,t.result=v,!1)}function C(t,e){var n,r,o;if(n=t.input.charCodeAt(t.position),39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(y(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),39!==n)return!0;r=o=t.position,t.position++}else i(n)?(y(t,r,o,!0),w(t,A(t,!1,e)),r=o=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);d(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){var n,r,o,a,u,l;if(l=t.input.charCodeAt(t.position),34!==l)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(l=t.input.charCodeAt(t.position));){if(34===l)return y(t,n,t.position,!0),t.position++,!0;if(92===l){if(y(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),i(l))A(t,!1,e);else if(256>l&&rt[l])t.result+=ot[l],t.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=t.input.charCodeAt(++t.position),(u=s(l))>=0?a=(a<<4)+u:d(t,"expected hexadecimal character");t.result+=p(a),t.position++}else d(t,"unknown escape sequence");n=r=t.position}else i(l)?(y(t,n,r,!0),w(t,A(t,!1,e)),n=r=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}d(t,"unexpected end of the stream within a double quoted scalar")}function O(t,e){var n,i,r,a,s,c,u,l,p,f,h,m=!0,y=t.tag,g=t.anchor;if(h=t.input.charCodeAt(t.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=i),h=t.input.charCodeAt(++t.position);0!==h;){if(A(t,!0,e),h=t.input.charCodeAt(t.position),h===a)return t.position++,t.tag=y,t.anchor=g,t.kind=u?"mapping":"sequence",t.result=i,!0;m||d(t,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=t.input.charCodeAt(t.position+1),o(r)&&(s=c=!0,t.position++,A(t,!0,e))),n=t.line,T(t,e,W,!1,!0),p=t.tag,l=t.result,A(t,!0,e),h=t.input.charCodeAt(t.position),!c&&t.line!==n||58!==h||(s=!0,h=t.input.charCodeAt(++t.position),A(t,!0,e),T(t,e,W,!1,!0),f=t.result),u?v(t,i,p,l,f):i.push(s?v(t,null,p,l,f):l),A(t,!0,e),h=t.input.charCodeAt(t.position),44===h?(m=!0,h=t.input.charCodeAt(++t.position)):m=!1}d(t,"unexpected end of the stream within a flow collection")}function S(t,e){var n,o,a,s,c=z,l=!1,p=e,f=0,h=!1;if(s=t.input.charCodeAt(t.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(t.kind="scalar",t.result="";0!==s;)if(s=t.input.charCodeAt(++t.position),43===s||45===s)z===c?c=43===s?Q:J:d(t,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(t,"repeat of an indentation width identifier"):(p=e+a-1,l=!0)}if(r(s)){do s=t.input.charCodeAt(++t.position);while(r(s));if(35===s)do s=t.input.charCodeAt(++t.position);while(!i(s)&&0!==s)}for(;0!==s;){for(x(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndent<p)&&32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>p&&(p=t.lineIndent),i(s))f++;else{if(t.lineIndent<p){c===Q?t.result+=P.repeat("\n",f):c===z&&l&&(t.result+="\n");break}for(o?r(s)?(h=!0,t.result+=P.repeat("\n",f+1)):h?(h=!1,t.result+=P.repeat("\n",f+1)):0===f?l&&(t.result+=" "):t.result+=P.repeat("\n",f):l?t.result+=P.repeat("\n",f+1):t.result+=P.repeat("\n",f),l=!0,f=0,n=t.position;!i(s)&&0!==s;)s=t.input.charCodeAt(++t.position);y(t,n,t.position,!1)}}return!0}function _(t,e){var n,i,r,a=t.tag,s=t.anchor,c=[],u=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=c),r=t.input.charCodeAt(t.position);0!==r&&45===r&&(i=t.input.charCodeAt(t.position+1),o(i));)if(u=!0,t.position++,A(t,!0,-1)&&t.lineIndent<=e)c.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,T(t,e,V,!1,!0),c.push(t.result),A(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)d(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!u&&(t.tag=a,t.anchor=s,t.kind="sequence",t.result=c,!0)}function I(t,e,n){var i,a,s,c,u=t.tag,l=t.anchor,p={},f=null,h=null,m=null,y=!1,g=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=p),c=t.input.charCodeAt(t.position);0!==c;){if(i=t.input.charCodeAt(t.position+1),s=t.line,63!==c&&58!==c||!o(i)){if(!T(t,n,G,!1,!0))break;if(t.line===s){for(c=t.input.charCodeAt(t.position);r(c);)c=t.input.charCodeAt(++t.position);if(58===c)c=t.input.charCodeAt(++t.position),o(c)||d(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(v(t,p,f,h,null),f=h=m=null),g=!0,y=!1,a=!1,f=t.tag,h=t.result;else{if(!g)return t.tag=u,t.anchor=l,!0;d(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!g)return t.tag=u,t.anchor=l,!0;d(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(v(t,p,f,h,null),f=h=m=null),g=!0,y=!0,a=!0):y?(y=!1,a=!0):d(t,"incomplete explicit mapping pair; a key node is missed"),t.position+=1,c=i;if((t.line===s||t.lineIndent>e)&&(T(t,e,Z,!0,a)&&(y?h=t.result:m=t.result),y||(v(t,p,f,h,m),f=h=m=null),A(t,!0,-1),c=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==c)d(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&v(t,p,f,h,null),g&&(t.tag=u,t.anchor=l,t.kind="mapping",t.result=p),g}function E(t){var e,n,i,r,a=!1,s=!1;if(r=t.input.charCodeAt(t.position),33!==r)return!1;if(null!==t.tag&&d(t,"duplication of a tag property"),r=t.input.charCodeAt(++t.position),60===r?(a=!0,r=t.input.charCodeAt(++t.position)):33===r?(s=!0,n="!!",r=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do r=t.input.charCodeAt(++t.position);while(0!==r&&62!==r);t.position<t.length?(i=t.input.slice(e,t.position),r=t.input.charCodeAt(++t.position)):d(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!o(r);)33===r&&(s?d(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),nt.test(n)||d(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),r=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),et.test(i)&&d(t,"tag suffix cannot contain flow indicator characters")}return i&&!it.test(i)&&d(t,"tag name cannot contain such characters: "+i),a?t.tag=i:R.call(t.tagMap,n)?t.tag=t.tagMap[n]+i:"!"===n?t.tag="!"+i:"!!"===n?t.tag="tag:yaml.org,2002:"+i:d(t,'undeclared tag handle "'+n+'"'),!0}function F(t){var e,n;if(n=t.input.charCodeAt(t.position),38!==n)return!1;for(null!==t.anchor&&d(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!o(n)&&!a(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function N(t){var e,n,i;if(i=t.input.charCodeAt(t.position),42!==i)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!o(i)&&!a(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(n)||d(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],A(t,!0,-1),!0}function T(t,e,n,i,r){var o,a,s,c,u,l,p,f,h=1,m=!1,y=!1;if(t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=Z===n||V===n,i&&A(t,!0,-1)&&(m=!0,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)),1===h)for(;E(t)||F(t);)A(t,!0,-1)?(m=!0,s=o,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)):s=!1;if(s&&(s=m||r),(1===h||Z===n)&&(p=W===n||G===n?e:e+1,f=t.position-t.lineStart,1===h?s&&(_(t,f)||I(t,f,p))||O(t,p)?y=!0:(a&&S(t,p)||C(t,p)||j(t,p)?y=!0:N(t)?(y=!0,(null!==t.tag||null!==t.anchor)&&d(t,"alias node should not have any properties")):k(t,p,W===n)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===h&&(y=s&&_(t,f))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(c=0,u=t.implicitTypes.length;u>c;c+=1)if(l=t.implicitTypes[c],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else R.call(t.typeMap,t.tag)?(l=t.typeMap[t.tag],null!==t.result&&l.kind!==t.kind&&d(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):d(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):d(t,"unknown tag !<"+t.tag+">");return null!==t.tag||null!==t.anchor||y}function M(t){var e,n,a,s,c=t.position,u=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(s=t.input.charCodeAt(t.position))&&(A(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==s));){for(u=!0,s=t.input.charCodeAt(++t.position),e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),a=[],n.length<1&&d(t,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=t.input.charCodeAt(++t.position);if(35===s){do s=t.input.charCodeAt(++t.position);while(0!==s&&!i(s));break}if(i(s))break;for(e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==s&&x(t),R.call(st,n)?st[n](t,n,a):m(t,'unknown document directive "'+n+'"')}return A(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,A(t,!0,-1)):u&&d(t,"directives end mark is expected"),T(t,t.lineIndent-1,Z,!1,!0),A(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(c,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&b(t)?void(46===t.input.charCodeAt(t.position)&&(t.position+=3,A(t,!0,-1))):void(t.position<t.length-1&&d(t,"end of the stream or a document separator is expected"))}function L(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new f(t,e);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)M(n);return n.documents}function D(t,e,n){var i,r,o=L(t,n);for(i=0,r=o.length;r>i;i+=1)e(o[i])}function U(t,e){var n=L(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new B("expected a single document in the stream, but found more")}}function q(t,e,n){D(t,e,P.extend({schema:K},n))}function Y(t,e){return U(t,P.extend({schema:K},e))}for(var P=t("./common"),B=t("./exception"),$=t("./mark"),K=t("./schema/default_safe"),H=t("./schema/default_full"),R=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,nt=/^(?:!|!!|![a-z\-]+!)$/i,it=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,rt=new Array(256),ot=new Array(256),at=0;256>at;at++)rt[at]=l(at)?1:0,ot[at]=l(at);var st={YAML:function(t,e,n){var i,r,o;null!==t.version&&d(t,"duplication of %YAML directive"),1!==n.length&&d(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=2>o,1!==o&&2!==o&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&d(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],nt.test(i)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),R.call(t.tagMap,i)&&d(t,'there is a previously declared suffix for "'+i+'" tag handle'),it.test(r)||d(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};e.exports.loadAll=D,e.exports.load=U,e.exports.safeLoadAll=q,e.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(t,e,n){"use strict";function i(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}var r=t("./common");i.prototype.getSnippet=function(t,e){var n,i,o,a,s;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a));)if(a+=1,a-this.position>e/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",t)+n+s+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet(),e&&(n+=":\n"+e)),n},e.exports=i},{"./common":2}],7:[function(t,e,n){"use strict";function i(t,e,n){var r=[];return t.include.forEach(function(t){n=i(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return-1===r.indexOf(e)})}function r(){function t(t){i[t.tag]=t}var e,n,i={};for(e=0,n=arguments.length;n>e;e+=1)arguments[e].forEach(t);return i}function o(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=t("./common"),s=t("./exception"),c=t("./type");o.DEFAULT=null,o.create=function(){var t,e;switch(arguments.length){case 1:t=o.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(t=a.toArray(t),e=a.toArray(e),!t.every(function(t){return t instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:t,explicit:e})},e.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./json")]})},{"../schema":7,"./json":12}],9:[function(t,e,n){"use strict";var i=t("../schema");e.exports=i.DEFAULT=new i({include:[t("./default_safe")],explicit:[t("../type/js/undefined"),t("../type/js/regexp"),t("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./core")],implicit:[t("../type/timestamp"),t("../type/merge")],explicit:[t("../type/binary"),t("../type/omap"),t("../type/pairs"),t("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({explicit:[t("../type/str"),t("../type/seq"),t("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./failsafe")],implicit:[t("../type/null"),t("../type/bool"),t("../type/int"),t("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(t,e,n){"use strict";function i(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function r(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===a.indexOf(e))throw new o('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=i(e.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var o=t("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=r},{"./exception":4}],14:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=u;for(n=0;r>n;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(0>e)return!1;i+=6}return i%8===0}function r(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(e=0;r>e;e++)e%4===0&&e&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(t){var e,n,i="",r=0,o=t.length,a=u;for(e=0;o>e;e++)e%3===0&&e&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(t){return s&&s.isBuffer(t)}var s=t("buffer").Buffer,c=t("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r, +predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var a=t("../type");e.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(t,e,n){"use strict";function i(t){return null!==t&&!!u.test(t)}function r(t){var e,n,i,r;return e=t.replace(/_/g,"").toLowerCase(),n="-"===e[0]?-1:1,r=[],0<="+-".indexOf(e[0])&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:0<=e.indexOf(":")?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)}function o(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(t))return"-0.0";return n=t.toString(10),l.test(n)?n.replace("e",".e"):n}function a(t){return"[object Number]"===Object.prototype.toString.call(t)&&(0!==t%1||s.isNegativeZero(t))}var s=t("../common"),c=t("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(t,e,n){"use strict";function i(t){return t>=48&&57>=t||t>=65&&70>=t||t>=97&&102>=t}function r(t){return t>=48&&55>=t}function o(t){return t>=48&&57>=t}function a(t){if(null===t)return!1;var e,n=t.length,a=0,s=!1;if(!n)return!1;if(e=t[a],("-"===e||"+"===e)&&(e=t[++a]),"0"===e){if(a+1===n)return!0;if(e=t[++a],"b"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if("0"!==e&&"1"!==e)return!1;s=!0}return s}if("x"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if(!i(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(!r(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(":"===e)break;if(!o(t.charCodeAt(a)))return!1;s=!0}return!!s&&(":"!==e||/^(:[0-5]?[0-9])+$/.test(t.slice(a)))}function s(t){var e,n,i=t,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),e=i[0],("-"===e||"+"===e)&&("-"===e&&(r=-1),i=i.slice(1),e=i[0]),"0"===i?0:"0"===e?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),i=0,n=1,o.forEach(function(t){i+=t*n,n*=60}),r*i):r*parseInt(i,10)}function c(t){return"[object Number]"===Object.prototype.toString.call(t)&&0===t%1&&!u.isNegativeZero(t)}var u=t("../common"),l=t("../type");e.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;try{var e="("+t+")",n=s.parse(e,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(i){return!1}}function r(t){var e,n="("+t+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(t){r.push(t.name)}),e=i.body[0].expression.body.range,new Function(r,n.slice(e[0]+1,e[1]-1))}function o(t){return t.toString()}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}var s;try{s=t("esprima")}catch(c){"undefined"!=typeof window&&(s=window.esprima)}var u=t("../../type");e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1;e=e.slice(1,e.length-i.length-1)}try{return!0}catch(r){return!1}}function r(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function o(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function a(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(t,e,n){"use strict";function i(){return!0}function r(){}function o(){return""}function a(t){return"undefined"==typeof t}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},{"../type":13}],22:[function(t,e,n){"use strict";function i(t){return"<<"===t||null===t}var r=t("../type");e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}var a=t("../type");e.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,c=[],u=t;for(e=0,n=u.length;n>e;e+=1){if(i=u[e],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(t){return null!==t?t:[]}var o=t("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;n>e;e+=1){if(i=s[e],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[e]=[r[0],i[r[0]]]}return!0}function r(t){if(null===t)return[];var e,n,i,r,o,a=t;for(o=new Array(a.length),e=0,n=a.length;n>e;e+=1)i=a[e],r=Object.keys(i),o[e]=[r[0],i[r[0]]];return o}var o=t("../type"),a=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},{"../type":13}],27:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n=t;for(e in n)if(a.call(n,e)&&null!==n[e])return!1;return!0}function r(t){return null!==t?t:{}}var o=t("../type"),a=Object.prototype.hasOwnProperty;e.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},{"../type":13}],29:[function(t,e,n){"use strict";function i(t){return null!==t&&null!==s.exec(t)}function r(t){var e,n,i,r,o,a,c,u,l,p,f=0,h=null;if(e=s.exec(t),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],a=+e[5],c=+e[6],e[7]){for(f=e[7].slice(0,3);f.length<3;)f+="0";f=+f}return e[9]&&(u=+e[10],l=+(e[11]||0),h=6e4*(60*u+l),"-"===e[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(t){return t.toISOString()}var a=t("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(t,e,n){},{}],31:[function(t,e,n){e.exports=t("./lib/inherit")},{"./lib/inherit":32}],32:[function(e,n,i){!function(e){function r(t){var e=f(t);if(v)for(var n,i=0;n=b[i++];)t.hasOwnProperty(n)&&e.push(n);return e}function o(t,e,n){for(var i,o,a=r(n),s=0,u=a.length;u>s;)"__self"!==(i=a[s++])&&(o=n[i],y(o)&&(!c||o.toString().indexOf(".__base")>-1)?e[i]=function(n,i){var r=t[n]?t[n]:"__constructor"===n?e.__self.__parent:g;return function(){var t=this.__base;this.__base=r;var e=i.apply(this,arguments);return this.__base=t,e}}(i,o):e[i]=o)}function a(t,e){for(var n,i=1;n=t[i++];)e?y(n)?s.self(e,n.prototype,n):s.self(e,n):e=y(n)?s(t[0],n.prototype,n):s(t[0],n);return e||t[0]}function s(){var t=arguments,e=m(t[0]),n=e||y(t[0]),i=n?e?a(t[0]):t[0]:u,r=t[n?1:0]||{},s=t[n?2:1],c=r.__constructor||n&&i.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:n?function(){return i.apply(this,arguments)}:function(){};if(!n)return c.prototype=r,c.prototype.__self=c.prototype.constructor=c,h(c,s);h(c,i),c.__parent=i;var l=i.prototype,f=c.prototype=p(l);return f.__self=f.constructor=c,r&&o(l,f,r),s&&o(i,c,s),c}var c=function(){}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,p=Object.create||function(t){var e=function(){};return e.prototype=t,new e},f=Object.keys||function(t){var e=[];for(var n in t)l.call(t,n)&&e.push(n);return e},h=function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);return t},d=Object.prototype.toString,m=Array.isArray||function(t){return"[object Array]"===d.call(t)},y=function(t){return"[object Function]"===d.call(t)},g=function(){},v=!0,x={toString:""};for(var A in x)x.hasOwnProperty(A)&&(v=!1);var b=v?["toString","valueOf"]:null;s.self=function(){var t=arguments,e=m(t[0]),n=e?a(t[0],t[0][0]):t[0],i=t[1],r=t[2],s=n.prototype;return i&&o(s,s,i),r&&o(n,n,r),n};var w=!0;"object"==typeof i&&(n.exports=s,w=!1),"object"==typeof modules&&(modules.define("inherit",function(t){t(s)}),w=!1),"function"==typeof t&&(t(function(t,e,n){n.exports=s}),w=!1),w&&(e.inherit=s)}(this)},{}],"/":[function(t,e,n){"use strict";var i=t("./lib/js-yaml.js");e.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jsoneditor.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jsoneditor.min.js index 343397f955f..21db1ab3e11 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jsoneditor.min.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/jsoneditor.min.js @@ -1,11 +1,5 @@ -/*! JSON Editor v0.7.22 - JSON Schema -> HTML Editor - * By Jeremy Dorn - https://github.com/jdorn/json-editor/ - * Released under the MIT license - * - * Date: 2015-08-12 - */ -!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b,c){var d=(new Date).getTime(),e=Math.max(0,16-(d-a)),f=window.setTimeout(function(){b(d+e)},e);return a=d+e,f}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)})}(),function(){Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)})}();var b=function(a){return"object"!=typeof a||a.nodeType||null!==a&&a===a.window?!1:a.constructor&&!Object.prototype.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},c=function(a){var d,e,f;for(e=1;e<arguments.length;e++){d=arguments[e];for(f in d)d.hasOwnProperty(f)&&(d[f]&&b(d[f])?(a.hasOwnProperty(f)||(a[f]={}),c(a[f],d[f])):a[f]=d[f])}return a},d=function(a,b){if(a&&"object"==typeof a){var c;if(Array.isArray(a)||"number"==typeof a.length&&a.length>0&&a.length-1 in a){for(c=0;c<a.length;c++)if(b(c,a[c])===!1)return}else if(Object.keys){var d=Object.keys(a);for(c=0;c<d.length;c++)if(b(d[c],a[d[c]])===!1)return}else for(c in a)if(a.hasOwnProperty(c)&&b(c,a[c])===!1)return}},e=function(a,b){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0),a.dispatchEvent(c)},f=function(a,b){if(!(a instanceof Element))throw new Error("element should be an instance of Element");b=c({},f.defaults.options,b||{}),this.element=a,this.options=b,this.init()};f.prototype={constructor:f,init:function(){var a=this;this.ready=!1;var b=f.defaults.themes[this.options.theme||f.defaults.theme];if(!b)throw"Unknown theme "+(this.options.theme||f.defaults.theme);this.schema=this.options.schema,this.theme=new b,this.template=this.options.template,this.refs=this.options.refs||{},this.uuid=0,this.__data={};var c=f.defaults.iconlibs[this.options.iconlib||f.defaults.iconlib];c&&(this.iconlib=new c),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.translate=this.options.translate||f.defaults.translate,this._loadExternalRefs(this.schema,function(){a._getDefinitions(a.schema),a.validator=new f.Validator(a);var b=a.getEditorClass(a.schema);a.root=a.createEditor(b,{jsoneditor:a,schema:a.schema,required:!0,container:a.root_container}),a.root.preBuild(),a.root.build(),a.root.postBuild(),a.options.startval&&a.root.setValue(a.options.startval),a.validation_results=a.validator.validate(a.root.getValue()),a.root.showValidationErrors(a.validation_results),a.ready=!0,window.requestAnimationFrame(function(){a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.root.showValidationErrors(a.validation_results),a.trigger("ready"),a.trigger("change"))})})},getValue:function(){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before getting the value";return this.root.getValue()},setValue:function(a){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before setting the value";return this.root.setValue(a),this},validate:function(a){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before validating";return 1===arguments.length?this.validator.validate(a):this.validation_results},destroy:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.destroyed=!0)},on:function(a,b){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(b),this},off:function(a,b){if(a&&b){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var c=[],d=0;d<this.callbacks[a].length;d++)this.callbacks[a][d]!==b&&c.push(this.callbacks[a][d]);this.callbacks[a]=c}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this},trigger:function(a){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var b=0;b<this.callbacks[a].length;b++)this.callbacks[a][b]();return this},setOption:function(a,b){if("show_errors"!==a)throw"Option "+a+" must be set during instantiation and cannot be changed later";return this.options.show_errors=b,this.onChange(),this},getEditorClass:function(a){var b;if(a=this.expandSchema(a),d(f.defaults.resolvers,function(c,d){var e=d(a);return e&&f.defaults.editors[e]?(b=e,!1):void 0}),!b)throw"Unknown editor for schema "+JSON.stringify(a);if(!f.defaults.editors[b])throw"Unknown editor "+b;return f.defaults.editors[b]},createEditor:function(a,b){return b=c({},a.options||{},b),new a(b)},onChange:function(){if(this.ready&&!this.firing_change){this.firing_change=!0;var a=this;return window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),"never"!==a.options.show_errors?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},compileTemplate:function(a,b){b=b||f.defaults.template;var c;if("string"==typeof b){if(!f.defaults.templates[b])throw"Unknown template engine "+b;if(c=f.defaults.templates[b](),!c)throw"Template engine "+b+" missing required library."}else c=b;if(!c)throw"No template engine set";if(!c.compile)throw"Invalid template engine set";return c.compile(a)},_data:function(a,b,c){if(3!==arguments.length)return a.hasAttribute("data-jsoneditor-"+b)?this.__data[a.getAttribute("data-jsoneditor-"+b)]:null;var d;a.hasAttribute("data-jsoneditor-"+b)?d=a.getAttribute("data-jsoneditor-"+b):(d=this.uuid++,a.setAttribute("data-jsoneditor-"+b,d)),this.__data[d]=c},registerEditor:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this},unregisterEditor:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this},getEditor:function(a){return this.editors?this.editors[a]:void 0},watch:function(a,b){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(b),this},unwatch:function(a,b){if(!this.watchlist||!this.watchlist[a])return this;if(!b)return this.watchlist[a]=null,this;for(var c=[],d=0;d<this.watchlist[a].length;d++)this.watchlist[a][d]!==b&&c.push(this.watchlist[a][d]);return this.watchlist[a]=c.length?c:null,this},notifyWatchers:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var b=0;b<this.watchlist[a].length;b++)this.watchlist[a][b]()},isEnabled:function(){return!this.root||this.root.isEnabled()},enable:function(){this.root.enable()},disable:function(){this.root.disable()},_getDefinitions:function(a,b){if(b=b||"#/definitions/",a.definitions)for(var c in a.definitions)a.definitions.hasOwnProperty(c)&&(this.refs[b+c]=a.definitions[c],a.definitions[c].definitions&&this._getDefinitions(a.definitions[c],b+c+"/definitions/"))},_getExternalRefs:function(a){var b={},c=function(a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=!0)};a.$ref&&"object"!=typeof a.$ref&&"#"!==a.$ref.substr(0,1)&&!this.refs[a.$ref]&&(b[a.$ref]=!0);for(var d in a)if(a.hasOwnProperty(d))if(a[d]&&"object"==typeof a[d]&&Array.isArray(a[d]))for(var e=0;e<a[d].length;e++)"object"==typeof a[d][e]&&c(this._getExternalRefs(a[d][e]));else a[d]&&"object"==typeof a[d]&&c(this._getExternalRefs(a[d]));return b},_loadExternalRefs:function(a,b){var c=this,e=this._getExternalRefs(a),f=0,g=0,h=!1;d(e,function(a){if(!c.refs[a]){if(!c.options.ajax)throw"Must set ajax option to true to load external ref "+a;c.refs[a]="loading",g++;var d=new XMLHttpRequest;d.open("GET",a,!0),d.onreadystatechange=function(){if(4==d.readyState){if(200!==d.status)throw window.console.log(d),"Failed to fetch ref via ajax- "+a;var e;try{e=JSON.parse(d.responseText)}catch(i){throw window.console.log(i),"Failed to parse external ref "+a}if(!e||"object"!=typeof e)throw"External ref does not contain a valid schema - "+a;c.refs[a]=e,c._loadExternalRefs(e,function(){f++,f>=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;b<a.allOf.length;b++)f=this.extendSchemas(f,this.expandSchema(a.allOf[b]));delete f.allOf}if(a["extends"]){if(Array.isArray(a["extends"]))for(b=0;b<a["extends"].length;b++)f=this.extendSchemas(f,this.expandSchema(a["extends"][b]));else f=this.extendSchemas(f,this.expandSchema(a["extends"]));delete f["extends"]}if(a.oneOf){var g=c({},f);for(delete g.oneOf,b=0;b<a.oneOf.length;b++)f.oneOf[b]=this.extendSchemas(this.expandSchema(a.oneOf[b]),g)}return this.expandRefs(f)},extendSchemas:function(a,b){a=c({},a),b=c({},b);var e=this,f={};return d(a,function(a,c){"undefined"!=typeof b[a]?"required"===a&&"object"==typeof c&&Array.isArray(c)?f.required=c.concat(b[a]).reduce(function(a,b){return a.indexOf(b)<0&&a.push(b),a},[]):"type"!==a||"string"!=typeof c&&!Array.isArray(c)?"object"==typeof c&&Array.isArray(c)?f[a]=c.filter(function(c){return-1!==b[a].indexOf(c)}):"object"==typeof c&&null!==c?f[a]=e.extendSchemas(c,b[a]):f[a]=c:("string"==typeof c&&(c=[c]),"string"==typeof b.type&&(b.type=[b.type]),f.type=c.filter(function(a){return-1!==b.type.indexOf(a)}),1===f.type.length&&"string"==typeof f.type[0]&&(f.type=f.type[0])):f[a]=c}),d(b,function(b,c){"undefined"==typeof a[b]&&(f[b]=c)}),f}},f.defaults={themes:{},templates:{},iconlibs:{},editors:{},languages:{},resolvers:[],custom_validators:[]},f.Validator=a.extend({init:function(a,b){this.jsoneditor=a,this.schema=b||this.jsoneditor.schema,this.options={},this.translate=this.jsoneditor.translate||f.defaults.translate},validate:function(a){return this._validateSchema(this.schema,a)},_validateSchema:function(a,b,e){var g,h,i,j=this,k=[],l=JSON.stringify(b);if(e=e||"root",a=c({},this.jsoneditor.expandRefs(a)),a.required&&a.required===!0){if("undefined"==typeof b)return k.push({path:e,property:"required",message:this.translate("error_notset")}),k}else if("undefined"==typeof b){if(!this.jsoneditor.options.required_by_default)return k;k.push({path:e,property:"required",message:this.translate("error_notset")})}if(a["enum"]){for(g=!1,h=0;h<a["enum"].length;h++)l===JSON.stringify(a["enum"][h])&&(g=!0);g||k.push({path:e,property:"enum",message:this.translate("error_enum")})}if(a["extends"])for(h=0;h<a["extends"].length;h++)k=k.concat(this._validateSchema(a["extends"][h],b,e));if(a.allOf)for(h=0;h<a.allOf.length;h++)k=k.concat(this._validateSchema(a.allOf[h],b,e));if(a.anyOf){for(g=!1,h=0;h<a.anyOf.length;h++)if(!this._validateSchema(a.anyOf[h],b,e).length){g=!0;break}g||k.push({path:e,property:"anyOf",message:this.translate("error_anyOf")})}if(a.oneOf){g=0;var m=[];for(h=0;h<a.oneOf.length;h++){var n=this._validateSchema(a.oneOf[h],b,e);for(n.length||g++,i=0;i<n.length;i++)n[i].path=e+".oneOf["+h+"]"+n[i].path.substr(e.length);m=m.concat(n)}1!==g&&(k.push({path:e,property:"oneOf",message:this.translate("error_oneOf",[g])}),k=k.concat(m))}if(a.not&&(this._validateSchema(a.not,b,e).length||k.push({path:e,property:"not",message:this.translate("error_not")})),a.type)if(Array.isArray(a.type)){for(g=!1,h=0;h<a.type.length;h++)if(this._checkType(a.type[h],b)){g=!0;break}g||k.push({path:e,property:"type",message:this.translate("error_type_union")})}else this._checkType(a.type,b)||k.push({path:e,property:"type",message:this.translate("error_type",[a.type])});if(a.disallow)if(Array.isArray(a.disallow)){for(g=!0,h=0;h<a.disallow.length;h++)if(this._checkType(a.disallow[h],b)){g=!1;break}g||k.push({path:e,property:"disallow",message:this.translate("error_disallow_union")})}else this._checkType(a.disallow,b)&&k.push({path:e,property:"disallow",message:this.translate("error_disallow",[a.disallow])});if("number"==typeof b)(a.multipleOf||a.divisibleBy)&&(g=b/(a.multipleOf||a.divisibleBy),g!==Math.floor(g)&&k.push({path:e,property:a.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[a.multipleOf||a.divisibleBy])})),a.hasOwnProperty("maximum")&&(a.exclusiveMaximum&&b>=a.maximum?k.push({path:e,property:"maximum",message:this.translate("error_maximum_excl",[a.maximum])}):!a.exclusiveMaximum&&b>a.maximum&&k.push({path:e,property:"maximum",message:this.translate("error_maximum_incl",[a.maximum])})),a.hasOwnProperty("minimum")&&(a.exclusiveMinimum&&b<=a.minimum?k.push({path:e,property:"minimum",message:this.translate("error_minimum_excl",[a.minimum])}):!a.exclusiveMinimum&&b<a.minimum&&k.push({path:e,property:"minimum",message:this.translate("error_minimum_incl",[a.minimum])}));else if("string"==typeof b)a.maxLength&&(b+"").length>a.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").length<a.minLength&&k.push({path:e,property:"minLength",message:this.translate(1===a.minLength?"error_notempty":"error_minLength",[a.minLength])}),a.pattern&&(new RegExp(a.pattern).test(b)||k.push({path:e,property:"pattern",message:this.translate("error_pattern")}));else if("object"==typeof b&&null!==b&&Array.isArray(b)){if(a.items)if(Array.isArray(a.items))for(h=0;h<b.length;h++)if(a.items[h])k=k.concat(this._validateSchema(a.items[h],b[h],e+"."+h));else{if(a.additionalItems===!0)break;if(!a.additionalItems){if(a.additionalItems===!1){k.push({path:e,property:"additionalItems",message:this.translate("error_additionalItems")});break}break}k=k.concat(this._validateSchema(a.additionalItems,b[h],e+"."+h))}else for(h=0;h<b.length;h++)k=k.concat(this._validateSchema(a.items,b[h],e+"."+h));if(a.maxItems&&b.length>a.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.length<a.minItems&&k.push({path:e,property:"minItems",message:this.translate("error_minItems",[a.minItems])}),a.uniqueItems){var o={};for(h=0;h<b.length;h++){if(g=JSON.stringify(b[h]),o[g]){k.push({path:e,property:"uniqueItems",message:this.translate("error_uniqueItems")});break}o[g]=!0}}}else if("object"==typeof b&&null!==b){if(a.maxProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g>a.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g<a.minProperties&&k.push({path:e,property:"minProperties",message:this.translate("error_minProperties",[a.minProperties])})}if(a.required&&Array.isArray(a.required))for(h=0;h<a.required.length;h++)"undefined"==typeof b[a.required[h]]&&k.push({path:e,property:"required",message:this.translate("error_required",[a.required[h]])});var p={};if(a.properties)for(h in a.properties)a.properties.hasOwnProperty(h)&&(p[h]=!0,k=k.concat(this._validateSchema(a.properties[h],b[h],e+"."+h)));if(a.patternProperties)for(h in a.patternProperties)if(a.patternProperties.hasOwnProperty(h)){var q=new RegExp(h);for(i in b)b.hasOwnProperty(i)&&q.test(i)&&(p[i]=!0,k=k.concat(this._validateSchema(a.patternProperties[h],b[i],e+"."+i)))}if("undefined"!=typeof a.additionalProperties||!this.jsoneditor.options.no_additional_properties||a.oneOf||a.anyOf||(a.additionalProperties=!1),"undefined"!=typeof a.additionalProperties)for(h in b)if(b.hasOwnProperty(h)&&!p[h]){if(!a.additionalProperties){k.push({path:e,property:"additionalProperties",message:this.translate("error_additional_properties",[h])});break}if(a.additionalProperties===!0)break;k=k.concat(this._validateSchema(a.additionalProperties,b[h],e+"."+h))}if(a.dependencies)for(h in a.dependencies)if(a.dependencies.hasOwnProperty(h)&&"undefined"!=typeof b[h])if(Array.isArray(a.dependencies[h]))for(i=0;i<a.dependencies[h].length;i++)"undefined"==typeof b[a.dependencies[h][i]]&&k.push({path:e,property:"dependencies",message:this.translate("error_dependency",[a.dependencies[h][i]])});else k=k.concat(this._validateSchema(a.dependencies[h],b,e))}return d(f.defaults.custom_validators,function(c,d){k=k.concat(d.call(j,a,b,e))}),k},_checkType:function(a,b){return"string"==typeof a?"string"===a?"string"==typeof b:"number"===a?"number"==typeof b:"integer"===a?"number"==typeof b&&b===Math.floor(b):"boolean"===a?"boolean"==typeof b:"array"===a?Array.isArray(b):"object"===a?null!==b&&!Array.isArray(b)&&"object"==typeof b:"null"===a?null===b:!0:!this._validateSchema(a,b).length}}),f.AbstractEditor=a.extend({onChildEditorChange:function(a){this.onChange(!0)},notify:function(){this.jsoneditor.notifyWatchers(this.path)},change:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange()},onChange:function(a){this.notify(),this.watch_listener&&this.watch_listener(),a&&this.change()},register:function(){this.jsoneditor.registerEditor(this),this.onChange()},unregister:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)},getNumColumns:function(){return 12},init:function(a){this.jsoneditor=a.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.original_schema=a.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.options=c({},this.options||{},a.schema.options||{},a),a.path||this.schema.id||(this.schema.id="root"),this.path=a.path||"root",this.formname=a.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.jsoneditor.options.form_name_root&&(this.formname=this.formname.replace(/^root\[/,this.jsoneditor.options.form_name_root+"[")),this.key=this.path.split(".").pop(),this.parent=a.parent,this.link_watchers=[],a.container&&this.setContainer(a.container)},setContainer:function(a){this.container=a,this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)},preBuild:function(){},build:function(){},postBuild:function(){this.setupWatchListeners(),this.addLinks(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.register(),this.onWatchedFieldChange()},setupWatchListeners:function(){var a=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){a.refreshWatchedFieldValues()&&a.onWatchedFieldChange()},this.register(),this.schema.hasOwnProperty("watch")){var b,c,d,e,f;for(var g in this.schema.watch)if(this.schema.watch.hasOwnProperty(g)){if(b=this.schema.watch[g],Array.isArray(b)?c=[b[0]].concat(b[1].split(".")):(c=b.split("."),a.theme.closest(a.container,'[data-schemaid="'+c[0]+'"]')||c.unshift("#")),d=c.shift(),"#"===d&&(d=a.jsoneditor.schema.id||"root"),e=a.theme.closest(a.container,'[data-schemaid="'+d+'"]'),!e)throw"Could not find ancestor node with id "+d;f=e.getAttribute("data-schemapath")+"."+c.join("."),a.jsoneditor.watch(f,a.watch_listener),a.watched[g]=f}}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))},addLinks:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.container.appendChild(this.link_holder),this.schema.links))for(var a=0;a<this.schema.links.length;a++)this.addLink(this.getLink(this.schema.links[a]))},getButton:function(a,b,c){var d="json-editor-btn-"+b;b=this.iconlib?this.iconlib.getIcon(b):null,!b&&c&&(a=c,c=null);var e=this.theme.getButton(a,b,c);return e.className+=" "+d+" ",e},setButtonText:function(a,b,c,d){return c=this.iconlib?this.iconlib.getIcon(c):null,!c&&d&&(b=d,d=null),this.theme.setButtonText(a,b,c,d)},addLink:function(a){this.link_holder&&this.link_holder.appendChild(a)},getLink:function(a){var b,c,d=a.mediaType||"application/javascript",e=d.split("/")[0],f=this.jsoneditor.compileTemplate(a.href,this.template_engine);if("image"===e){b=this.theme.getBlockLinkHolder(),c=document.createElement("a"),c.setAttribute("target","_blank");var g=document.createElement("img");this.theme.createImageLink(b,c,g),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.setAttribute("title",a.rel||d),g.setAttribute("src",d)})}else if(["audio","video"].indexOf(e)>=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var h=document.createElement(e);h.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,h),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,h.setAttribute("src",d)})}else b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a<this.header.childNodes.length;a++)if(3===this.header.childNodes[a].nodeType){this.header.childNodes[a].nodeValue=this.getHeaderText();break}}else this.header.textContent=this.getHeaderText()},getHeaderText:function(a){return this.header_text?this.header_text:a?this.schema.title:this.getTitle()},onWatchedFieldChange:function(){var a;if(this.header_template){a=c(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var b=this.header_template(a);b!==this.header_text&&(this.header_text=b,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){a=this.getWatchedFieldValues();for(var d=0;d<this.link_watchers.length;d++)this.link_watchers[d](a)}},setValue:function(a){this.value=a},getValue:function(){return this.value},refreshValue:function(){},getChildEditors:function(){return!1},destroy:function(){var a=this;this.unregister(this),d(this.watched,function(b,c){a.jsoneditor.unwatch(c,a.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null},getDefault:function(){if(this.schema["default"])return this.schema["default"];if(this.schema["enum"])return this.schema["enum"][0];var a=this.schema.type||this.schema.oneOf;if(a&&Array.isArray(a)&&(a=a[0]),a&&"object"==typeof a&&(a=a.type),a&&Array.isArray(a)&&(a=a[0]),"string"==typeof a){if("number"===a)return 0;if("boolean"===a)return!1;if("integer"===a)return 0;if("string"===a)return"";if("object"===a)return{};if("array"===a)return[]}return null},getTitle:function(){return this.schema.title||this.key},enable:function(){this.disabled=!1},disable:function(){this.disabled=!0},isEnabled:function(){return!this.disabled},isRequired:function(){return"boolean"==typeof this.schema.required?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.indexOf(this.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight<a.scrollHeight)for(b=0;a.offsetHeight<a.scrollHeight+3&&!(b>100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("<div>"+b.sceditor_instance.val()+"</div>");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0); -});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;i<f.length;i++)f[i].width+g<=12&&(!h||.5*f[i].minh<h&&2*f[i].maxh>h)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;a<f.length;a++)if(f[a].width<12){var g=!1,h=0;for(b=0;b<f[a].editors.length;b++)g===!1?g=b:f[a].editors[b].width>f[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a<f.length;a++){var i=this.theme.getGridRow();for(e.appendChild(i),b=0;b<f[a].editors.length;b++){var j=f[a].editors[b].key,k=this.editors[j];k.options.hidden?k.container.style.display="none":this.theme.setGridColumnSize(k.container,f[a].editors[b].width),i.appendChild(k.container)}}}else e=document.createElement("div"),d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){var f=c.theme.getGridRow();e.appendChild(f),d.options.hidden?d.container.style.display="none":c.theme.setGridColumnSize(d.container,12),f.appendChild(d.container)}});this.row_container.innerHTML="",this.row_container.appendChild(e)}},getPropertySchema:function(a){var b=this.schema.properties[a]||{};b=c({},b);var d=this.schema.properties[a]?!0:!1;if(this.schema.patternProperties)for(var e in this.schema.patternProperties)if(this.schema.patternProperties.hasOwnProperty(e)){var f=new RegExp(e);f.test(a)&&(b.allOf=b.allOf||[],b.allOf.push(this.schema.patternProperties[e]),d=!0)}return!d&&this.schema.additionalProperties&&"object"==typeof this.schema.additionalProperties&&(b=c({},this.schema.additionalProperties)),b},preBuild:function(){this._super(),this.editors={},this.cached_editors={};var a=this;if(this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)d(this.schema.properties,function(b,c){var d=a.jsoneditor.getEditorClass(c);a.editors[b]=a.jsoneditor.createEditor(d,{jsoneditor:a.jsoneditor,schema:c,path:a.path+"."+b,parent:a,compact:!0,required:!0}),a.editors[b].preBuild();var e=a.editors[b].options.hidden?0:a.editors[b].options.grid_columns||a.editors[b].getNumColumns();a.minwidth+=e,a.maxwidth+=e}),this.no_link_holder=!0;else{if(this.options.table)throw"Not supported yet";this.defaultProperties=this.schema.defaultProperties||Object.keys(this.schema.properties),a.maxwidth+=1,d(this.defaultProperties,function(b,c){a.addObjectProperty(c,!0),a.editors[c]&&(a.minwidth=Math.max(a.minwidth,a.editors[c].options.grid_columns||a.editors[c].getNumColumns()),a.maxwidth+=a.editors[c].options.grid_columns||a.editors[c].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(b,c){var d=a.editors[b].schema.propertyOrder,e=a.editors[c].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e})},build:function(){var a=this;if(this.options.table_row)this.editor_holder=this.container,d(this.editors,function(b,c){var d=a.theme.getTableCell();a.editor_holder.appendChild(d),c.setContainer(d),c.build(),c.postBuild(),a.editors[b].options.hidden&&(d.style.display="none"),a.editors[b].options.input_width&&(d.style.width=a.editors[b].options.input_width)});else{if(this.options.table)throw"Not supported yet";this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header),this.container.appendChild(this.title),this.container.style.position="relative",this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.style.height="170px",this.editjson_textarea.style.width="300px",this.editjson_textarea.style.display="block",this.editjson_save=this.getButton("Save","save","Save"),this.editjson_save.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.saveJSON()}),this.editjson_cancel=this.getButton("Cancel","cancel","Cancel"),this.editjson_cancel.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.style.width="295px",this.addproperty_list.style.maxHeight="160px",this.addproperty_list.style.padding="5px 0",this.addproperty_list.style.overflowY="auto",this.addproperty_list.style.overflowX="hidden",this.addproperty_list.style.paddingLeft="5px",this.addproperty_list.setAttribute("class","property-selector"),this.addproperty_add=this.getButton("add","add","add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.style.width="220px",this.addproperty_input.style.marginBottom="0",this.addproperty_input.style.display="inline-block",this.addproperty_add.addEventListener("click",function(b){if(b.preventDefault(),b.stopPropagation(),a.addproperty_input.value){if(a.editors[a.addproperty_input.value])return void window.alert("there is already a property with that name");a.addObjectProperty(a.addproperty_input.value),a.editors[a.addproperty_input.value]&&a.editors[a.addproperty_input.value].disable(),a.onChange(!0)}}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var b=document.createElement("div");b.style.clear="both",this.addproperty_holder.appendChild(b),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.editor_holder.style.paddingBottom="0",this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),this.editor_holder.appendChild(this.row_container),d(this.editors,function(b,c){var d=a.theme.getGridColumn();a.row_container.appendChild(d),c.setContainer(d),c.build(),c.postBuild()}),this.title_controls=this.theme.getHeaderButtonHolder(),this.editjson_controls=this.theme.getHeaderButtonHolder(),this.addproperty_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.title.appendChild(this.editjson_controls),this.title.appendChild(this.addproperty_controls),this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.editor_holder.style.display="",a.collapsed=!1,a.setButtonText(a.toggle_button,"","collapse","Collapse")):(a.editor_holder.style.display="none",a.collapsed=!0,a.setButtonText(a.toggle_button,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.editjson_button=this.getButton("JSON","edit","Edit JSON"),this.editjson_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.toggleEditJSON()}),this.editjson_controls.appendChild(this.editjson_button),this.editjson_controls.appendChild(this.editjson_holder),this.schema.options&&"undefined"!=typeof this.schema.options.disable_edit_json?this.schema.options.disable_edit_json&&(this.editjson_button.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_button.style.display="none"),this.addproperty_button=this.getButton("Properties","edit","Object Properties"),this.addproperty_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.toggleAddProperty()}),this.addproperty_controls.appendChild(this.addproperty_button),this.addproperty_controls.appendChild(this.addproperty_holder),this.refreshAddProperties()}this.options.table_row?(this.editor_holder=this.container,d(this.property_order,function(b,c){a.editor_holder.appendChild(a.editors[c].container)})):(this.layoutEditors(),this.layoutEditors())},showEditJSON:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left=this.editjson_button.offsetLeft+"px",this.editjson_holder.style.top=this.editjson_button.offsetTop+this.editjson_button.offsetHeight+"px",this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_button.disabled=!1,this.editing_json=!0)},hideEditJSON:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)},saveJSON:function(){if(this.editjson_holder)try{var a=JSON.parse(this.editjson_textarea.value);this.setValue(a),this.hideEditJSON()}catch(b){throw window.alert("invalid JSON"),b}},toggleEditJSON:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()},insertPropertyControlUsingPropertyOrder:function(a,b,c){var d;this.schema.properties[a]&&(d=this.schema.properties[a].propertyOrder),"number"!=typeof d&&(d=1e3),b.propertyOrder=d;for(var e=0;e<c.childNodes.length;e++){var f=c.childNodes[e];if(b.propertyOrder<f.propertyOrder){this.addproperty_list.insertBefore(b,f),b=null;break}}b&&this.addproperty_list.appendChild(b)},addPropertyCheckbox:function(a){var b,c,d,e,f=this;return b=f.theme.getCheckbox(),b.style.width="auto",d=this.schema.properties[a]&&this.schema.properties[a].title?this.schema.properties[a].title:a,c=f.theme.getCheckboxLabel(d),e=f.theme.getFormControl(c,b),e.style.paddingBottom=e.style.marginBottom=e.style.paddingTop=e.style.marginTop=0,e.style.height="auto",this.insertPropertyControlUsingPropertyOrder(a,e,this.addproperty_list),b.checked=a in this.editors,b.addEventListener("change",function(){b.checked?f.addObjectProperty(a):f.removeObjectProperty(a),f.onChange(!0)}),f.addproperty_checkboxes[a]=b,b},showAddProperty:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left=this.addproperty_button.offsetLeft+"px",this.addproperty_holder.style.top=this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight+"px",this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())},hideAddProperty:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)},toggleAddProperty:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()},removeObjectProperty:function(a){this.editors[a]&&(this.editors[a].unregister(),delete this.editors[a],this.refreshValue(),this.layoutEditors())},addObjectProperty:function(a,b){var c=this;if(!this.editors[a]){if(this.cached_editors[a]){if(this.editors[a]=this.cached_editors[a],b)return;this.editors[a].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[a]))return;var d=c.getPropertySchema(a),e=c.jsoneditor.getEditorClass(d);if(c.editors[a]=c.jsoneditor.createEditor(e,{jsoneditor:c.jsoneditor,schema:d,path:c.path+"."+a,parent:c}),c.editors[a].preBuild(),!b){var f=c.theme.getChildEditorHolder();c.editor_holder.appendChild(f),c.editors[a].setContainer(f),c.editors[a].build(),c.editors[a].postBuild()}c.cached_editors[a]=c.editors[a]}b||(c.refreshValue(),c.layoutEditors())}},onChildEditorChange:function(a){this.refreshValue(),this._super(a)},canHaveAdditionalProperties:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!this.jsoneditor.options.no_additional_properties},destroy:function(){d(this.cached_editors,function(a,b){b.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,this._super()},getValue:function(){var a=this._super();if(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)for(var b in a)a.hasOwnProperty(b)&&(a[b]||delete a[b]);return a},refreshValue:function(){this.value={};for(var a in this.editors)this.editors.hasOwnProperty(a)&&(this.value[a]=this.editors[a].getValue());this.adding_property&&this.refreshAddProperties()},refreshAddProperties:function(){if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)return void(this.addproperty_controls.style.display="none");var a,b=!1,c=!1,d=0,e=!1;for(a in this.editors)this.editors.hasOwnProperty(a)&&d++;b=this.canHaveAdditionalProperties()&&!("undefined"!=typeof this.schema.maxProperties&&d>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].register()},unregister:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].unregister()},getNumColumns:function(){var a=this.getItemInfo(0);return this.tabs_holder?Math.max(Math.min(12,a.width+2),4):a.width},enable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!1),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!1),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!1),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].enable(),this.rows[a].moveup_button&&(this.rows[a].moveup_button.disabled=!1),this.rows[a].movedown_button&&(this.rows[a].movedown_button.disabled=!1),this.rows[a].delete_button&&(this.rows[a].delete_button.disabled=!1);this._super()},disable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!0),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!0),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!0),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].disable(),this.rows[a].moveup_button&&(this.rows[a].moveup_button.disabled=!0),this.rows[a].movedown_button&&(this.rows[a].movedown_button.disabled=!0),this.rows[a].delete_button&&(this.rows[a].delete_button.disabled=!0);this._super()},preBuild:function(){this._super(),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add},build:function(){this.options.compact?(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),"tabs"===this.schema.format?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls))),this.addControls()},onChildEditorChange:function(a){this.refreshValue(),this.refreshTabs(!0),this._super(a)},getItemTitle:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var a=this.jsoneditor.expandRefs(this.schema.items);this.item_title=a.title||"item"}else this.item_title="item";return this.item_title},getItemSchema:function(a){return Array.isArray(this.schema.items)?a>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.length<this.schema.minItems;)a.push(this.getItemInfo(a.length)["default"]);this.getMax()&&a.length>this.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f<e.rows.length;f++)e.destroyRow(e.rows[f]),e.rows[f]=null;e.rows=e.rows.slice(0,a.length);var g=null;d(e.rows,function(a,b){return b.tab===e.active_tab?(g=b.tab,!1):void 0}),!g&&e.rows.length&&(g=e.rows[0].tab),e.active_tab=g,e.refreshValue(b),e.refreshTabs(!0),e.refreshTabs(),e.onChange()}},refreshValue:function(a){var b=this,c=this.value?this.value.length:0;if(this.value=[],d(this.rows,function(a,c){b.value[a]=c.getValue()}),c!==this.value.length||a){var e=this.schema.minItems&&this.schema.minItems>=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",f=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete","Delete "+c.getItemTitle()),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup","Move up"),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown","Move down"),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display;this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()), -this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].register()},unregister:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.width),3)},preBuild:function(){var a=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=a.title||"row",this.item_default=a["default"]||null,this.item_has_child_editors=a.properties||a.items,this.width=12,this._super()},build:function(){var a=this;this.table=this.theme.getTable(),this.container.appendChild(this.table),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var b=this.getElementEditor(0,!0);if(this.item_default=b.getDefault(),this.width=b.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.title=this.theme.getHeader(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.table),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.item_has_child_editors)for(var c=b.getChildEditors(),d=b.property_order||Object.keys(c),e=0;e<d.length;e++){var f=a.theme.getTableHeaderCell(c[d[e]].getTitle());c[d[e]].options.hidden&&(f.style.display="none"),a.header_row.appendChild(f)}else a.header_row.appendChild(a.theme.getTableHeaderCell(this.item_title));b.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=a.theme.getTableHeaderCell(" "),a.header_row.appendChild(this.controls_header_cell),this.addControls()},onChildEditorChange:function(a){this.refreshValue(),this._super()},getItemDefault:function(){return c({},{"default":this.item_default})["default"]},getItemTitle:function(){return this.item_title},getElementEditor:function(a,b){var d=c({},this.schema.items),e=this.jsoneditor.getEditorClass(d,this.jsoneditor),f=this.row_holder.appendChild(this.theme.getTableRow()),g=f;this.item_has_child_editors||(g=this.theme.getTableCell(),f.appendChild(g));var h=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:d,container:g,path:this.path+"."+a,parent:this,compact:!0,table_row:!0});return h.preBuild(),b||(h.build(),h.postBuild(),h.controls_cell=f.appendChild(this.theme.getTableCell()),h.row=f,h.table_controls=this.theme.getButtonHolder(),h.controls_cell.appendChild(h.table_controls),h.table_controls.style.margin=0,h.table_controls.style.padding=0),h},destroy:function(){this.innerHTML="",this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.table&&this.table.parentNode&&this.table.parentNode.removeChild(this.table),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,this._super()},setValue:function(a,b){if(a=a||[],this.schema.minItems)for(;a.length<this.schema.minItems;)a.push(this.getItemDefault());this.schema.maxItems&&a.length>this.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g<f.rows.length;g++){var h=f.rows[g].container;f.item_has_child_editors||f.rows[g].row.parentNode.removeChild(f.rows[g].row),f.rows[g].destroy(),h.parentNode&&h.parentNode.removeChild(h),f.rows[g]=null,e=!0}f.rows=f.rows.slice(0,a.length),f.refreshValue(),(e||b)&&f.refreshRowButtons(),f.onChange()}},refreshRowButtons:function(){var a=this,b=this.schema.minItems&&this.schema.minItems>=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete","Delete"),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup","Move up"),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown","Move down"),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].unregister();this.editors[this.type]&&this.editors[this.type].register()}this._super()},unregister:function(){if(this._super(),this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].unregister()},getNumColumns:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4},enable:function(){if(this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].enable();this.switcher.disabled=!1,this._super()},disable:function(){if(this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].disable();this.switcher.disabled=!0,this._super()},switchEditor:function(a){var b=this;this.editors[a]||this.buildChildEditor(a),b.type=a,b.register();var c=b.getValue();d(b.editors,function(a,d){d&&(b.type===a?(b.keep_values&&d.setValue(c,!0),d.container.style.display=""):d.container.style.display="none")}),b.refreshValue(),b.refreshHeaderText()},buildChildEditor:function(a){var b=this,d=this.types[a],e=b.theme.getChildEditorHolder();b.editor_holder.appendChild(e);var f;"string"==typeof d?(f=c({},b.schema),f.type=d):(f=c({},b.schema,d),f=b.jsoneditor.expandRefs(f),d.required&&Array.isArray(d.required)&&b.schema.required&&Array.isArray(b.schema.required)&&(f.required=b.schema.required.concat(d.required)));var g=b.jsoneditor.getEditorClass(f);b.editors[a]=b.jsoneditor.createEditor(g,{jsoneditor:b.jsoneditor,schema:f,container:e,path:b.path,parent:b,required:!0}),b.editors[a].preBuild(),b.editors[a].build(),b.editors[a].postBuild(),b.editors[a].header&&(b.editors[a].header.style.display="none"),b.editors[a].option=b.switcher_options[a],e.addEventListener("change_header_text",function(){b.refreshHeaderText()}),a!==b.type&&(e.style.display="none")},preBuild:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,"undefined"!=typeof this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),"undefined"!=typeof this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,d(this.types,function(a,b){}),delete this.schema.oneOf;else{if(this.schema.type&&"any"!==this.schema.type)Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var a=this.schema.disallow;"object"==typeof a&&Array.isArray(a)||(a=[a]);var b=[];d(this.types,function(c,d){-1===a.indexOf(d)&&b.push(d)}),this.types=b}delete this.schema.type}this.display_text=this.getDisplayText(this.types)},build:function(){var a=this,b=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.header),this.switcher=this.theme.getSwitcher(this.display_text),b.appendChild(this.switcher),this.switcher.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.switchEditor(a.display_text.indexOf(this.value)),a.onChange(!0)}),this.editor_holder=document.createElement("div"),b.appendChild(this.editor_holder),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),d(this.types,function(b,d){a.editors[b]=!1;var e;"string"==typeof d?(e=c({},a.schema),e.type=d):(e=c({},a.schema,d),d.required&&Array.isArray(d.required)&&a.schema.required&&Array.isArray(a.schema.required)&&(e.required=a.schema.required.concat(d.required))),a.validators[b]=new f.Validator(a.jsoneditor,e)}),this.switchEditor(0)},onChildEditorChange:function(a){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),this._super()},refreshHeaderText:function(){var a=this.getDisplayText(this.types);d(this.switcher_options,function(b,c){c.textContent=a[b]})},refreshValue:function(){this.value=this.editors[this.type].getValue()},setValue:function(a,b){var c=this;d(this.validators,function(b,d){return d.validate(a).length?void 0:(c.type=b,c.switcher.value=c.display_text[b],!1)}),this.switchEditor(this.type),this.editors[this.type].setValue(a,b),this.refreshValue(),c.onChange()},destroy:function(){d(this.editors,function(a,b){b&&b.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()},showValidationErrors:function(a){var b=this;this.oneOf?d(this.editors,function(e,f){if(f){var g=b.path+".oneOf["+e+"]",h=[];d(a,function(a,d){if(d.path.substr(0,g.length)===g){var e=c({},d);e.path=b.path+e.path.substr(g.length),h.push(e)}}),f.showValidationErrors(h)}}):d(this.editors,function(b,c){c&&c.showValidationErrors(a)})}}),f.defaults.editors["enum"]=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){this.container;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this["enum"]=this.schema["enum"],this.selected=0,this.select_options=[],this.html_values=[];for(var a=this,b=0;b<this["enum"].length;b++)this.select_options[b]=this.options.enum_titles[b]||"Value "+(b+1),this.html_values[b]=this.getHTML(this["enum"][b]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(){a.selected=a.select_options.indexOf(this.value),a.value=a["enum"][a.selected],a.refreshValue(),a.onChange(!0)}),this.value=this["enum"][0],this.refreshValue(),1===this["enum"].length&&(this.switcher.style.display="none")},refreshValue:function(){var a=this;a.selected=-1;var b=JSON.stringify(this.value);return d(this["enum"],function(c,d){return b===JSON.stringify(d)?(a.selected=c,!1):void 0}),a.selected<0?void a.setValue(a["enum"][0]):(this.switcher.value=this.select_options[this.selected],void(this.display_area.innerHTML=this.html_values[this.selected]))},enable:function(){this.always_disabled||(this.switcher.disabled=!1),this._super()},disable:function(){this.switcher.disabled=!0,this._super()},getHTML:function(a){var b=this;if(null===a)return"<em>null</em>";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="<div><em>"+d+"</em>: "+f+"</div>"),c+="<li>"+f+"</li>"}),c=Array.isArray(a)?"<ol>"+c+"</ol>":"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>"+c+"</ul>"}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b<this.enum_options.length;b++)a=Math.max(a,this.enum_options[b].length+4);return Math.min(12,Math.max(a/7,2))},typecast:function(a){return"boolean"===this.schema.type?!!a:"number"===this.schema.type?1*a:"integer"===this.schema.type?Math.floor(1*a):""+a},getValue:function(){return this.value},preBuild:function(){var a=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema["enum"]){var b=this.schema.options&&this.schema.options.enum_titles||[];d(this.schema["enum"],function(c,d){a.enum_options[c]=""+d,a.enum_display[c]=""+(b[c]||d),a.enum_values[c]=a.typecast(d)}),this.isRequired()||(a.enum_display.unshift(" "),a.enum_options.unshift("undefined"),a.enum_values.unshift(void 0))}else if("boolean"===this.schema.type)a.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],a.enum_options=["1",""],a.enum_values=[!0,!1],this.isRequired()||(a.enum_display.unshift(" "),a.enum_options.unshift("undefined"),a.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw"'select' editor requires the enum property to be set.";if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(h=0;h<this.schema.enumSource.length;h++)"string"==typeof this.schema.enumSource[h]?this.enumSource[h]={source:this.schema.enumSource[h]}:Array.isArray(this.schema.enumSource[h])?this.enumSource[h]=this.schema.enumSource[h]:this.enumSource[h]=c({},this.schema.enumSource[h]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(h=0;h<this.enumSource.length;h++)this.enumSource[h].value&&(this.enumSource[h].value=this.jsoneditor.compileTemplate(this.enumSource[h].value,this.template_engine)),this.enumSource[h].title&&(this.enumSource[h].title=this.jsoneditor.compileTemplate(this.enumSource[h].title,this.template_engine)),this.enumSource[h].filter&&(this.enumSource[h].filter=this.jsoneditor.compileTemplate(this.enumSource[h].filter,this.template_engine))}},build:function(){var a=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getSelectInput(this.enum_options),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),this.value=this.enum_values[0]},onInputChange:function(){var a=this.input.value,b=a;-1===this.enum_options.indexOf(a)&&(b=this.enum_options[0]),this.value=this.enum_values[this.enum_options.indexOf(a)],this.onChange(!0)},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&(this.enum_options.length>2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;e<this.enumSource.length;e++)if(Array.isArray(this.enumSource[e]))c=c.concat(this.enumSource[e]),d=d.concat(this.enumSource[e]);else{var f=[];if(f=Array.isArray(this.enumSource[e].source)?this.enumSource[e].source:a[this.enumSource[e].source]){if(this.enumSource[e].slice&&(f=Array.prototype.slice.apply(f,this.enumSource[e].slice)),this.enumSource[e].filter){var g=[];for(b=0;b<f.length;b++)this.enumSource[e].filter({i:b,item:f[b],watched:a})&&g.push(f[b]);f=g}var h=[],i=[];for(b=0;b<f.length;b++){var j=f[b];this.enumSource[e].value?i[b]=this.enumSource[e].value({i:b,item:j}):i[b]=f[b],this.enumSource[e].title?h[b]=this.enumSource[e].title({i:b,item:j}):h[b]=i[b]}c=c.concat(i),d=d.concat(h)}}var k=this.value;this.theme.setSelectOptions(this.input,c,d),this.enum_options=c,this.enum_display=d,this.enum_values=c,this.select2&&this.select2.select2("destroy"),-1!==c.indexOf(k)?(this.input.value=k,this.value=k):(this.input.value=c[0],this.value=c[0]||"",this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path)),this.setupSelect2()}this._super()},enable:function(){this.always_disabled||(this.input.disabled=!1,this.select2&&this.select2.select2("enable",!0)),this._super()},disable:function(){this.input.disabled=!0,this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),f.defaults.editors.multiselect=f.AbstractEditor.extend({preBuild:function(){this._super(),this.select_options={},this.select_values={};var a=this.jsoneditor.expandRefs(this.schema.items||{}),b=a["enum"]||[];for(this.option_keys=[],h=0;h<b.length;h++)this.sanitize(b[h])===b[h]&&(this.option_keys.push(b[h]+""),this.select_values[b[h]+""]=b[h])},build:function(){var a,b=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),!this.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},a=0;a<this.option_keys.length;a++){this.inputs[this.option_keys[a]]=this.theme.getCheckbox(),this.select_options[this.option_keys[a]]=this.inputs[this.option_keys[a]];var c=this.theme.getCheckboxLabel(this.option_keys[a]);this.controls[this.option_keys[a]]=this.theme.getFormControl(c,this.inputs[this.option_keys[a]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description)}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys),this.input.multiple=!0,this.input.size=Math.min(10,this.option_keys.length),a=0;a<this.option_keys.length;a++)this.select_options[this.option_keys[a]]=this.input.children[a];(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.control=this.theme.getFormControl(this.label,this.input,this.description)}this.container.appendChild(this.control),this.control.addEventListener("change",function(c){c.preventDefault(),c.stopPropagation();var d=[];for(a=0;a<b.option_keys.length;a++)(b.select_options[b.option_keys[a]].selected||b.select_options[b.option_keys[a]].checked)&&d.push(b.select_values[b.option_keys[a]]);b.updateValue(d),b.onChange(!0)})},setValue:function(a,b){var c;for(a=a||[],"object"!=typeof a?a=[a]:Array.isArray(a)||(a=[]),c=0;c<a.length;c++)"string"!=typeof a[c]&&(a[c]+="");for(c in this.select_options)this.select_options.hasOwnProperty(c)&&(this.select_options[c]["select"===this.input_type?"selected":"checked"]=-1!==a.indexOf(c));this.updateValue(a),this.onChange()},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2){var a=window.jQuery.extend({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){var a=b.select2.select2("val");b.value=a,b.onChange(!0)})}else this.select2=null},onInputChange:function(){this.value=this.input.value,this.onChange(!0)},postBuild:function(){this._super(),this.setupSelect2()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){var a=this.getTitle().length;for(var b in this.select_values)this.select_values.hasOwnProperty(b)&&(a=Math.max(a,(this.select_values[b]+"").length+4));return Math.min(12,Math.max(a/7,2))},updateValue:function(a){for(var b=!1,c=[],d=0;d<a.length;d++)if(this.select_options[a[d]+""]){var e=this.sanitize(this.select_values[a[d]]);c.push(e),e!==a[d]&&(b=!0)}else b=!0;return this.value=c,this.select2&&this.select2.select2("val",this.value),b},sanitize:function(a){return"number"===this.schema.items.type?1*a:"integer"===this.schema.items.type?Math.floor(1*a):""+a},enable:function(){if(!this.always_disabled){if(this.input)this.input.disabled=!1;else if(this.inputs)for(var a in this.inputs)this.inputs.hasOwnProperty(a)&&(this.inputs[a].disabled=!1);this.select2&&this.select2.select2("enable",!0)}this._super()},disable:function(){if(this.input)this.input.disabled=!0;else if(this.inputs)for(var a in this.inputs)this.inputs.hasOwnProperty(a)&&(this.inputs[a].disabled=!0);this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),f.defaults.editors.base64=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw"FileReader required for base64 editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}this.preview=this.theme.getFormInputDescription(this.schema.description),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var a=this.value.match(/^data:([^;,]+)[;,]/);if(a&&(a=a[1]),a){if(this.preview.innerHTML="<strong>Type:</strong> "+a+", <strong>Size:</strong> "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="<br>";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="<strong>Type:</strong> "+b+", <strong>Size:</strong> "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="<br>";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value, -this.preview.appendChild(d)}this.preview.innerHTML+="<br>";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a,b){var c=document.createElement("h3");return"string"==typeof a?c.textContent=a:c.appendChild(a),b&&(c.className+=" required"),c},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d<b.length;d++){var e=document.createElement("option");e.setAttribute("value",b[d]),e.textContent=c[d]||b[d],a.appendChild(e)}},getTextareaInput:function(){var a=document.createElement("textarea");return a.style=a.style||{},a.style.width="100%",a.style.height="300px",a.style.boxSizing="border-box",a},getRangeInput:function(a,b,c){var d=this.getFormInputField("range");return d.setAttribute("min",a),d.setAttribute("max",b),d.setAttribute("step",c),d},getFormInputField:function(a){var b=document.createElement("input");return b.setAttribute("type",a),b},afterInputReady:function(a){},getFormControl:function(a,b,c){var d=document.createElement("div");return d.className="form-control",a&&d.appendChild(a),"checkbox"===b.type?a.insertBefore(b,a.firstChild):d.appendChild(b),c&&d.appendChild(c),d},getIndentedPanel:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.paddingLeft="10px",a.style.marginLeft="10px",a.style.borderLeft="1px solid #ccc",a},getChildEditorHolder:function(){return document.createElement("div")},getDescription:function(a){var b=document.createElement("p");return b.innerHTML=a,b},getCheckboxDescription:function(a){return this.getDescription(a)},getFormInputDescription:function(a){return this.getDescription(a)},getHeaderButtonHolder:function(){return this.getButtonHolder()},getButtonHolder:function(){return document.createElement("div")},getButton:function(a,b,c){var d=document.createElement("button");return d.type="button",this.setButtonText(d,a,b,c),d},setButtonText:function(a,b,c,d){a.innerHTML="",c&&(a.appendChild(c),a.innerHTML+=" "),a.appendChild(document.createTextNode(b)),d&&a.setAttribute("title",d)},getTable:function(){return document.createElement("table")},getTableRow:function(){return document.createElement("tr")},getTableHead:function(){return document.createElement("thead")},getTableBody:function(){return document.createElement("tbody")},getTableHeaderCell:function(a){var b=document.createElement("th");return b.textContent=a,b},getTableCell:function(){var a=document.createElement("td");return a},getErrorMessage:function(a){var b=document.createElement("p");return b.style=b.style||{},b.style.color="red",b.appendChild(document.createTextNode(a)),b},addInputError:function(a,b){},removeInputError:function(a){},addTableRowError:function(a){},removeTableRowError:function(a){},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<div style='float: left; width: 130px;' class='tabs'></div><div class='content' style='margin-left: 130px;'></div><div style='clear:both;'></div>",a},applyStyles:function(a,b){a.style=a.style||{};for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])},closest:function(a,b){for(;a&&a!==document;){if(!g)return!1;if(a[g](b))return a;a=a.parentNode}return!1},getTab:function(a){var b=document.createElement("div");return b.appendChild(a),b.style=b.style||{},this.applyStyles(b,{border:"1px solid #ccc",borderWidth:"1px 0 1px 1px",textAlign:"center",lineHeight:"30px",borderRadius:"5px",borderBottomRightRadius:0,borderTopRightRadius:0,fontWeight:"bold",cursor:"pointer"}),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){return this.getIndentedPanel()},markTabActive:function(a){this.applyStyles(a,{opacity:1,background:"white"})},markTabInactive:function(a){this.applyStyles(a,{opacity:.5,background:""})},addTab:function(a,b){a.children[0].appendChild(b)},getBlockLink:function(){var a=document.createElement("a");return a.style.display="block",a},getBlockLinkHolder:function(){var a=document.createElement("div");return a},getLinksHolder:function(){var a=document.createElement("div");return a},createMediaLink:function(a,b,c){a.appendChild(b),c.style.width="100%",a.appendChild(c)},createImageLink:function(a,b,c){a.appendChild(b),b.appendChild(c)}}),f.defaults.themes.bootstrap2=f.AbstractTheme.extend({getRangeInput:function(a,b,c){return this._super(a,b,c)},getGridContainer:function(){var a=document.createElement("div");return a.className="container-fluid",a},getGridRow:function(){var a=document.createElement("div");return a.className="row-fluid",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="inline-block",c.style.fontWeight="bold",b&&(c.className+=" required"),c},setGridColumnSize:function(a,b){a.className="span"+b},getSelectInput:function(a){var b=this._super(a);return b.style.width="auto",b.style.maxWidth="98%",b},getFormInputField:function(a){var b=this._super(a);return b.style.width="98%",b},afterInputReady:function(a){a.controlgroup||(a.controlgroup=this.closest(a,".control-group"),a.controls=this.closest(a,".controls"),this.closest(a,".compact")&&(a.controlgroup.className=a.controlgroup.className.replace(/control-group/g,"").replace(/[ ]{2,}/g," "),a.controls.className=a.controlgroup.className.replace(/controls/g,"").replace(/[ ]{2,}/g," "),a.style.marginBottom=0))},getIndentedPanel:function(){var a=document.createElement("div");return a.className="well well-small",a},getFormInputDescription:function(a){var b=document.createElement("p");return b.className="help-inline",b.textContent=a,b},getFormControl:function(a,b,c){var d=document.createElement("div");d.className="control-group";var e=document.createElement("div");return e.className="controls",a&&"checkbox"===b.getAttribute("type")?(d.appendChild(e),a.className+=" checkbox",a.appendChild(b),e.appendChild(a),e.style.height="30px"):(a&&(a.className+=" control-label",d.appendChild(a)),e.appendChild(b),d.appendChild(e)),c&&e.appendChild(c),d},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="btn-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+=" btn btn-default",d},getTable:function(){var a=document.createElement("table");return a.className="table table-bordered",a.style.width="auto",a.style.maxWidth="none",a},addInputError:function(a,b){a.controlgroup&&a.controls&&(a.controlgroup.className+=" error",a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("p"),a.errmsg.className="help-block errormsg",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none",a.controlgroup.className=a.controlgroup.className.replace(/\s?error/g,""))},getTabHolder:function(){var a=document.createElement("div");return a.className="tabbable tabs-left",a.innerHTML="<ul class='nav nav-tabs span2' style='margin-right: 0;'></ul><div class='tab-content span10' style='overflow:visible;'></div>",a},getTab:function(a){var b=document.createElement("li"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="tab-pane active",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s?active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("div");return b.className="bar",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.className="progress progress-striped active",a.firstChild.style.width="100%")}}),f.defaults.themes.bootstrap3=f.AbstractTheme.extend({getSelectInput:function(a){var b=this._super(a);return b.className+="form-control",b},setGridColumnSize:function(a,b){a.className="col-md-"+b},afterInputReady:function(a){a.controlgroup||(a.controlgroup=this.closest(a,".form-group"),this.closest(a,".compact")&&(a.controlgroup.style.marginBottom=0))},getTextareaInput:function(){var a=document.createElement("textarea");return a.className="form-control",a},getRangeInput:function(a,b,c){return this._super(a,b,c)},getFormInputField:function(a){var b=this._super(a);return"checkbox"!==a&&(b.className+="form-control"),b},getFormControl:function(a,b,c){var d=document.createElement("div");return a&&"checkbox"===b.type?(d.className+=" checkbox",a.appendChild(b),a.style.fontSize="14px",d.style.marginTop="0",d.appendChild(a),b.style.position="relative",b.style.cssFloat="left"):(d.className+=" form-group",a&&(a.className+=" control-label",d.appendChild(a)),d.appendChild(b)),c&&d.appendChild(c),d},getIndentedPanel:function(){var a=document.createElement("div");return a.className="well well-sm",a},getFormInputDescription:function(a){var b=document.createElement("p");return b.className="help-block",b.innerHTML=a,b},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="btn-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+="btn btn-default",d},getTable:function(){var a=document.createElement("table");return a.className="table table-bordered",a.style.width="auto",a.style.maxWidth="none",a},addInputError:function(a,b){a.controlgroup&&(a.controlgroup.className+=" has-error",a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("p"),a.errmsg.className="help-block errormsg",a.controlgroup.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none",a.controlgroup.className=a.controlgroup.className.replace(/\s?has-error/g,""))},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<div class='tabs list-group col-md-2'></div><div class='col-md-10'></div>",a.className="rows",a},getTab:function(a){var b=document.createElement("a");return b.className="list-group-item",b.setAttribute("href","#"),b.appendChild(a),b},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s?active/g,"")},getProgressBar:function(){var a=0,b=100,c=0,d=document.createElement("div");d.className="progress";var e=document.createElement("div");return e.className="progress-bar",e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",c),e.setAttribute("aria-valuemin",a),e.setAttribute("aria-valuenax",b),e.innerHTML=c+"%",d.appendChild(e),d},updateProgressBar:function(a,b){if(a){var c=a.firstChild,d=b+"%";c.setAttribute("aria-valuenow",b),c.style.width=d,c.innerHTML=d}},updateProgressBarUnknown:function(a){if(a){var b=a.firstChild;a.className="progress progress-striped active",b.removeAttribute("aria-valuenow"),b.style.width="100%",b.innerHTML=""}}}),f.defaults.themes.foundation=f.AbstractTheme.extend({getChildEditorHolder:function(){var a=document.createElement("div");return a.style.marginBottom="15px",a},getSelectInput:function(a){var b=this._super(a);return b.style.minWidth="none",b.style.padding="5px",b.style.marginTop="3px",b},getSwitcher:function(a){var b=this._super(a);return b.style.paddingRight="8px",b},afterInputReady:function(a){this.closest(a,".compact")&&(a.style.marginBottom=0),a.group=this.closest(a,".form-control")},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="inline-block",b&&(c.className+=" required"),c},getFormInputField:function(a){var b=this._super(a);return b.style.width="100%",b.style.marginBottom="checkbox"===a?"0":"12px",b},getFormInputDescription:function(a){var b=document.createElement("p");return b.textContent=a,b.style.marginTop="-10px",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=document.createElement("div");return a.className="panel",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.verticalAlign="middle",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="button-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+=" small button",d},addInputError:function(a,b){a.group&&(a.group.className+=" error",a.errmsg?a.errmsg.style.display="":(a.insertAdjacentHTML("afterend",'<small class="error"></small>'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="<dl class='tabs vertical two columns'></dl><div class='tabs-content ten columns'></div>",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<dl class='tabs vertical'></dl><div class='tabs-content vertical'></div>",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="block",c.style.marginBottom="3px",c.style.fontWeight="bold",b&&(c.className+=" required"),c},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a,b){var c=document.createElement("label");return c.style.fontWeight="bold",c.style.display="block",b&&(c.className+=" required"),c.textContent=a,c},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e<b.length;e++)d=d.replace(new RegExp("\\{\\{"+e+"}}","g"),b[e]);return d},f.defaults.default_language="en",f.defaults.language=f.defaults.default_language,f.defaults.languages.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the provided pattern",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_dependency:"Must have property {{0}}"},f.plugins={ace:{theme:""},epiceditor:{},sceditor:{},select2:{}};for(var h in f.defaults.editors)f.defaults.editors.hasOwnProperty(h)&&(f.defaults.editors[h].options=f.defaults.editors.options||{});f.defaults.resolvers.unshift(function(a){return"string"!=typeof a.type?"multiple":void 0}),f.defaults.resolvers.unshift(function(a){return!a.type&&a.properties?"object":void 0}),f.defaults.resolvers.unshift(function(a){return"string"==typeof a.type?a.type:void 0}),f.defaults.resolvers.unshift(function(a){return"boolean"===a.type?"checkbox"===a.format||a.options&&a.options.checkbox?"checkbox":"select":void 0; -}),f.defaults.resolvers.unshift(function(a){return"any"===a.type?"multiple":void 0}),f.defaults.resolvers.unshift(function(a){return"string"===a.type&&a.media&&"base64"===a.media.binaryEncoding?"base64":void 0}),f.defaults.resolvers.unshift(function(a){return"string"===a.type&&"url"===a.format&&a.options&&a.options.upload===!0&&window.FileReader?"upload":void 0}),f.defaults.resolvers.unshift(function(a){return"array"==a.type&&"table"==a.format?"table":void 0}),f.defaults.resolvers.unshift(function(a){return a.enumSource?"select":void 0}),f.defaults.resolvers.unshift(function(a){if(a["enum"]){if("array"===a.type||"object"===a.type)return"enum";if("number"===a.type||"integer"===a.type||"string"===a.type)return"select"}}),f.defaults.resolvers.unshift(function(a){return"array"===a.type&&a.items&&!Array.isArray(a.items)&&a.uniqueItems&&a.items["enum"]&&["string","number","integer"].indexOf(a.items.type)>=0?"multiselect":void 0}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}(); \ No newline at end of file +!function(){var t;!function(){var e=!1,i=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return t=function(){},t.extend=function(t){function s(){!e&&this.init&&this.init.apply(this,arguments)}var r=this.prototype;e=!0;var n=new this;e=!1;for(var o in t)n[o]="function"==typeof t[o]&&"function"==typeof r[o]&&i.test(t[o])?function(t,e){return function(){var i=this._super;this._super=r[t];var s=e.apply(this,arguments);return this._super=i,s}}(o,t[o]):t[o];return s.prototype=n,s.prototype.constructor=s,s.extend=arguments.callee,s},t}(),function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}t.prototype=window.Event.prototype,window.CustomEvent=t}(),function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,i){var s=(new Date).getTime(),r=Math.max(0,16-(s-t)),n=window.setTimeout(function(){e(s+r)},r);return t=s+r,n}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})}();var e=function(t){return!("object"!=typeof t||t.nodeType||null!==t&&t===t.window)&&!(t.constructor&&!Object.prototype.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))},i=function(t){var s,r,n;for(r=1;r<arguments.length;r++){s=arguments[r];for(n in s)s.hasOwnProperty(n)&&(s[n]&&e(s[n])?(t.hasOwnProperty(n)||(t[n]={}),i(t[n],s[n])):t[n]=s[n])}return t},s=function(t,e){if(t&&"object"==typeof t){var i;if(Array.isArray(t)||"number"==typeof t.length&&t.length>0&&t.length-1 in t){for(i=0;i<t.length;i++)if(e(i,t[i])===!1)return}else if(Object.keys){var s=Object.keys(t);for(i=0;i<s.length;i++)if(e(s[i],t[s[i]])===!1)return}else for(i in t)if(t.hasOwnProperty(i)&&e(i,t[i])===!1)return}},r=function(t,e){var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!0),t.dispatchEvent(i)},n=function(t,e){if(!(t instanceof Element))throw new Error("element should be an instance of Element");e=i({},n.defaults.options,e||{}),this.element=t,this.options=e,this.init()};n.prototype={constructor:n,init:function(){var t=this;this.ready=!1;var e=n.defaults.themes[this.options.theme||n.defaults.theme];if(!e)throw"Unknown theme "+(this.options.theme||n.defaults.theme);this.schema=this.options.schema,this.theme=new e,this.template=this.options.template,this.refs=this.options.refs||{},this.uuid=0,this.__data={};var i=n.defaults.iconlibs[this.options.iconlib||n.defaults.iconlib];i&&(this.iconlib=new i),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.translate=this.options.translate||n.defaults.translate,this._loadExternalRefs(this.schema,function(){t._getDefinitions(t.schema),t.validator=new n.Validator(t);var e=t.getEditorClass(t.schema);t.root=t.createEditor(e,{jsoneditor:t,schema:t.schema,required:!0,container:t.root_container}),t.root.preBuild(),t.root.build(),t.root.postBuild(),t.options.startval&&t.root.setValue(t.options.startval),t.validation_results=t.validator.validate(t.root.getValue()),t.root.showValidationErrors(t.validation_results),t.ready=!0,window.requestAnimationFrame(function(){t.ready&&(t.validation_results=t.validator.validate(t.root.getValue()),t.root.showValidationErrors(t.validation_results),t.trigger("ready"),t.trigger("change"))})})},getValue:function(){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before getting the value";return this.root.getValue()},setValue:function(t){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before setting the value";return this.root.setValue(t),this},validate:function(t){if(!this.ready)throw"JSON Editor not ready yet. Listen for 'ready' event before validating";return 1===arguments.length?this.validator.validate(t):this.validation_results},destroy:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.destroyed=!0)},on:function(t,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this},off:function(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var i=[],s=0;s<this.callbacks[t].length;s++)this.callbacks[t][s]!==e&&i.push(this.callbacks[t][s]);this.callbacks[t]=i}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this},trigger:function(t){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var e=0;e<this.callbacks[t].length;e++)this.callbacks[t][e]();return this},setOption:function(t,e){if("show_errors"!==t)throw"Option "+t+" must be set during instantiation and cannot be changed later";return this.options.show_errors=e,this.onChange(),this},getEditorClass:function(t){var e;if(t=this.expandSchema(t),s(n.defaults.resolvers,function(i,s){var r=s(t);return r&&n.defaults.editors[r]?(e=r,!1):void 0}),!e)throw"Unknown editor for schema "+JSON.stringify(t);if(!n.defaults.editors[e])throw"Unknown editor "+e;return n.defaults.editors[e]},createEditor:function(t,e){return e=i({},t.options||{},e),new t(e)},onChange:function(){if(this.ready&&!this.firing_change){this.firing_change=!0;var t=this;return window.requestAnimationFrame(function(){t.firing_change=!1,t.ready&&(t.validation_results=t.validator.validate(t.root.getValue()),"never"!==t.options.show_errors?t.root.showValidationErrors(t.validation_results):t.root.showValidationErrors([]),t.trigger("change"))}),this}},compileTemplate:function(t,e){e=e||n.defaults.template;var i;if("string"==typeof e){if(!n.defaults.templates[e])throw"Unknown template engine "+e;if(i=n.defaults.templates[e](),!i)throw"Template engine "+e+" missing required library."}else i=e;if(!i)throw"No template engine set";if(!i.compile)throw"Invalid template engine set";return i.compile(t)},_data:function(t,e,i){if(3!==arguments.length)return t.hasAttribute("data-jsoneditor-"+e)?this.__data[t.getAttribute("data-jsoneditor-"+e)]:null;var s;t.hasAttribute("data-jsoneditor-"+e)?s=t.getAttribute("data-jsoneditor-"+e):(s=this.uuid++,t.setAttribute("data-jsoneditor-"+e,s)),this.__data[s]=i},registerEditor:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this},unregisterEditor:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this},getEditor:function(t){return this.editors?this.editors[t]:void 0},watch:function(t,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this},unwatch:function(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;for(var i=[],s=0;s<this.watchlist[t].length;s++)this.watchlist[t][s]!==e&&i.push(this.watchlist[t][s]);return this.watchlist[t]=i.length?i:null,this},notifyWatchers:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var e=0;e<this.watchlist[t].length;e++)this.watchlist[t][e]()},isEnabled:function(){return!this.root||this.root.isEnabled()},enable:function(){this.root.enable()},disable:function(){this.root.disable()},_getDefinitions:function(t,e){if(e=e||"#/definitions/",t.definitions)for(var i in t.definitions)t.definitions.hasOwnProperty(i)&&(this.refs[e+i]=t.definitions[i],t.definitions[i].definitions&&this._getDefinitions(t.definitions[i],e+i+"/definitions/"))},_getExternalRefs:function(t){var e={},i=function(t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=!0)};t.$ref&&"object"!=typeof t.$ref&&"#"!==t.$ref.substr(0,1)&&!this.refs[t.$ref]&&(e[t.$ref]=!0);for(var s in t)if(t.hasOwnProperty(s))if(t[s]&&"object"==typeof t[s]&&Array.isArray(t[s]))for(var r=0;r<t[s].length;r++)"object"==typeof t[s][r]&&i(this._getExternalRefs(t[s][r]));else t[s]&&"object"==typeof t[s]&&i(this._getExternalRefs(t[s]));return e},_loadExternalRefs:function(t,e){var i=this,r=this._getExternalRefs(t),n=0,o=0,a=!1;s(r,function(t){if(!i.refs[t]){if(!i.options.ajax)throw"Must set ajax option to true to load external ref "+t;i.refs[t]="loading",o++;var s=new XMLHttpRequest;s.open("GET",t,!0),s.onreadystatechange=function(){if(4==s.readyState){if(200!==s.status)throw window.console.log(s),"Failed to fetch ref via ajax- "+t;var r;try{r=JSON.parse(s.responseText)}catch(h){throw window.console.log(h),"Failed to parse external ref "+t}if(!r||"object"!=typeof r)throw"External ref does not contain a valid schema - "+t;i.refs[t]=r,i._loadExternalRefs(r,function(){n++,n>=o&&!a&&(a=!0,e())})}},s.send()}}),o||e()},expandRefs:function(t){for(t=i({},t);t.$ref;){var e=t.$ref;delete t.$ref,this.refs[e]||(e=decodeURIComponent(e)),t=this.extendSchemas(t,this.refs[e])}return t},expandSchema:function(t){var e,r=this,n=i({},t);if("object"==typeof t.type&&(Array.isArray(t.type)?s(t.type,function(e,i){"object"==typeof i&&(t.type[e]=r.expandSchema(i))}):t.type=r.expandSchema(t.type)),"object"==typeof t.disallow&&(Array.isArray(t.disallow)?s(t.disallow,function(e,i){"object"==typeof i&&(t.disallow[e]=r.expandSchema(i))}):t.disallow=r.expandSchema(t.disallow)),t.anyOf&&s(t.anyOf,function(e,i){t.anyOf[e]=r.expandSchema(i)}),t.dependencies&&s(t.dependencies,function(e,i){"object"!=typeof i||Array.isArray(i)||(t.dependencies[e]=r.expandSchema(i))}),t.not&&(t.not=this.expandSchema(t.not)),t.allOf){for(e=0;e<t.allOf.length;e++)n=this.extendSchemas(n,this.expandSchema(t.allOf[e]));delete n.allOf}if(t["extends"]){if(Array.isArray(t["extends"]))for(e=0;e<t["extends"].length;e++)n=this.extendSchemas(n,this.expandSchema(t["extends"][e]));else n=this.extendSchemas(n,this.expandSchema(t["extends"]));delete n["extends"]}if(t.oneOf){var o=i({},n);for(delete o.oneOf,e=0;e<t.oneOf.length;e++)n.oneOf[e]=this.extendSchemas(this.expandSchema(t.oneOf[e]),o)}return this.expandRefs(n)},extendSchemas:function(t,e){t=i({},t),e=i({},e);var r=this,n={};return s(t,function(t,i){"undefined"!=typeof e[t]?"required"===t&&"object"==typeof i&&Array.isArray(i)?n.required=i.concat(e[t]).reduce(function(t,e){return t.indexOf(e)<0&&t.push(e),t},[]):"type"!==t||"string"!=typeof i&&!Array.isArray(i)?"object"==typeof i&&Array.isArray(i)?n[t]=i.filter(function(i){return-1!==e[t].indexOf(i)}):"object"==typeof i&&null!==i?n[t]=r.extendSchemas(i,e[t]):n[t]=i:("string"==typeof i&&(i=[i]),"string"==typeof e.type&&(e.type=[e.type]),n.type=i.filter(function(t){return-1!==e.type.indexOf(t)}),1===n.type.length&&"string"==typeof n.type[0]&&(n.type=n.type[0])):n[t]=i}),s(e,function(e,i){"undefined"==typeof t[e]&&(n[e]=i)}),n}},n.defaults={themes:{},templates:{},iconlibs:{},editors:{},languages:{},resolvers:[],custom_validators:[]},n.Validator=t.extend({init:function(t,e){this.jsoneditor=t,this.schema=e||this.jsoneditor.schema,this.options={},this.translate=this.jsoneditor.translate||n.defaults.translate},validate:function(t){return this._validateSchema(this.schema,t)},_validateSchema:function(t,e,r){var o,a,h,l=this,d=[],u=JSON.stringify(e);if(r=r||"root",t=i({},this.jsoneditor.expandRefs(t)),t.required&&t.required===!0){if("undefined"==typeof e)return d.push({path:r,property:"required",message:this.translate("error_notset")}),d}else if("undefined"==typeof e){if(!this.jsoneditor.options.required_by_default)return d;d.push({path:r,property:"required",message:this.translate("error_notset")})}if(t["enum"]){for(o=!1,a=0;a<t["enum"].length;a++)u===JSON.stringify(t["enum"][a])&&(o=!0);o||d.push({path:r,property:"enum",message:this.translate("error_enum")})}if(t["extends"])for(a=0;a<t["extends"].length;a++)d=d.concat(this._validateSchema(t["extends"][a],e,r));if(t.allOf)for(a=0;a<t.allOf.length;a++)d=d.concat(this._validateSchema(t.allOf[a],e,r));if(t.anyOf){for(o=!1,a=0;a<t.anyOf.length;a++)if(!this._validateSchema(t.anyOf[a],e,r).length){o=!0;break}o||d.push({path:r,property:"anyOf",message:this.translate("error_anyOf")})}if(t.oneOf){o=0;var p=[];for(a=0;a<t.oneOf.length;a++){var c=this._validateSchema(t.oneOf[a],e,r);for(c.length||o++,h=0;h<c.length;h++)c[h].path=r+".oneOf["+a+"]"+c[h].path.substr(r.length);p=p.concat(c)}1!==o&&(d.push({path:r,property:"oneOf",message:this.translate("error_oneOf",[o])}),d=d.concat(p))}if(t.not&&(this._validateSchema(t.not,e,r).length||d.push({path:r,property:"not",message:this.translate("error_not")})),t.type)if(Array.isArray(t.type)){for(o=!1,a=0;a<t.type.length;a++)if(this._checkType(t.type[a],e)){o=!0;break}o||d.push({path:r,property:"type",message:this.translate("error_type_union")})}else this._checkType(t.type,e)||d.push({path:r,property:"type",message:this.translate("error_type",[t.type])});if(t.disallow)if(Array.isArray(t.disallow)){for(o=!0,a=0;a<t.disallow.length;a++)if(this._checkType(t.disallow[a],e)){o=!1;break}o||d.push({path:r,property:"disallow",message:this.translate("error_disallow_union")})}else this._checkType(t.disallow,e)&&d.push({path:r,property:"disallow",message:this.translate("error_disallow",[t.disallow])});if("number"==typeof e)(t.multipleOf||t.divisibleBy)&&(o=e/(t.multipleOf||t.divisibleBy),o!==Math.floor(o)&&d.push({path:r,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[t.multipleOf||t.divisibleBy])})),t.hasOwnProperty("maximum")&&(t.exclusiveMaximum&&e>=t.maximum?d.push({path:r,property:"maximum",message:this.translate("error_maximum_excl",[t.maximum])}):!t.exclusiveMaximum&&e>t.maximum&&d.push({path:r,property:"maximum",message:this.translate("error_maximum_incl",[t.maximum])})),t.hasOwnProperty("minimum")&&(t.exclusiveMinimum&&e<=t.minimum?d.push({path:r,property:"minimum",message:this.translate("error_minimum_excl",[t.minimum])}):!t.exclusiveMinimum&&e<t.minimum&&d.push({path:r,property:"minimum",message:this.translate("error_minimum_incl",[t.minimum])}));else if("string"==typeof e)t.maxLength&&(e+"").length>t.maxLength&&d.push({path:r,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength])}),t.minLength&&(e+"").length<t.minLength&&d.push({path:r,property:"minLength",message:this.translate(1===t.minLength?"error_notempty":"error_minLength",[t.minLength])}),t.pattern&&(new RegExp(t.pattern).test(e)||d.push({path:r,property:"pattern",message:this.translate("error_pattern")}));else if("object"==typeof e&&null!==e&&Array.isArray(e)){if(t.items)if(Array.isArray(t.items))for(a=0;a<e.length;a++)if(t.items[a])d=d.concat(this._validateSchema(t.items[a],e[a],r+"."+a));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:r,property:"additionalItems",message:this.translate("error_additionalItems")});break}break}d=d.concat(this._validateSchema(t.additionalItems,e[a],r+"."+a))}else for(a=0;a<e.length;a++)d=d.concat(this._validateSchema(t.items,e[a],r+"."+a));if(t.maxItems&&e.length>t.maxItems&&d.push({path:r,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems])}),t.minItems&&e.length<t.minItems&&d.push({path:r,property:"minItems",message:this.translate("error_minItems",[t.minItems])}),t.uniqueItems){var m={};for(a=0;a<e.length;a++){if(o=JSON.stringify(e[a]),m[o]){d.push({path:r,property:"uniqueItems",message:this.translate("error_uniqueItems")});break}m[o]=!0}}}else if("object"==typeof e&&null!==e){if(t.maxProperties){o=0;for(a in e)e.hasOwnProperty(a)&&o++;o>t.maxProperties&&d.push({path:r,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties])})}if(t.minProperties){o=0;for(a in e)e.hasOwnProperty(a)&&o++;o<t.minProperties&&d.push({path:r,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties])})}if(t.required&&Array.isArray(t.required))for(a=0;a<t.required.length;a++)"undefined"==typeof e[t.required[a]]&&d.push({path:r,property:"required",message:this.translate("error_required",[t.required[a]])});var f={};if(t.properties)for(a in t.properties)t.properties.hasOwnProperty(a)&&(f[a]=!0,d=d.concat(this._validateSchema(t.properties[a],e[a],r+"."+a)));if(t.patternProperties)for(a in t.patternProperties)if(t.patternProperties.hasOwnProperty(a)){var g=new RegExp(a);for(h in e)e.hasOwnProperty(h)&&g.test(h)&&(f[h]=!0,d=d.concat(this._validateSchema(t.patternProperties[a],e[h],r+"."+h)))}if("undefined"!=typeof t.additionalProperties||!this.jsoneditor.options.no_additional_properties||t.oneOf||t.anyOf||(t.additionalProperties=!1),"undefined"!=typeof t.additionalProperties)for(a in e)if(e.hasOwnProperty(a)&&!f[a]){if(!t.additionalProperties){d.push({path:r,property:"additionalProperties",message:this.translate("error_additional_properties",[a])});break}if(t.additionalProperties===!0)break;d=d.concat(this._validateSchema(t.additionalProperties,e[a],r+"."+a))}if(t.dependencies)for(a in t.dependencies)if(t.dependencies.hasOwnProperty(a)&&"undefined"!=typeof e[a])if(Array.isArray(t.dependencies[a]))for(h=0;h<t.dependencies[a].length;h++)"undefined"==typeof e[t.dependencies[a][h]]&&d.push({path:r,property:"dependencies",message:this.translate("error_dependency",[t.dependencies[a][h]])});else d=d.concat(this._validateSchema(t.dependencies[a],e,r))}return s(n.defaults.custom_validators,function(i,s){d=d.concat(s.call(l,t,e,r))}),d},_checkType:function(t,e){return"string"==typeof t?"string"===t?"string"==typeof e:"number"===t?"number"==typeof e:"integer"===t?"number"==typeof e&&e===Math.floor(e):"boolean"===t?"boolean"==typeof e:"array"===t?Array.isArray(e):"object"===t?null!==e&&!Array.isArray(e)&&"object"==typeof e:"null"!==t||null===e:!this._validateSchema(t,e).length}}),n.AbstractEditor=t.extend({onChildEditorChange:function(t){this.onChange(!0)},notify:function(){this.jsoneditor.notifyWatchers(this.path)},change:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange()},onChange:function(t){this.notify(),this.watch_listener&&this.watch_listener(),t&&this.change()},register:function(){this.jsoneditor.registerEditor(this),this.onChange()},unregister:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)},getNumColumns:function(){return 12},init:function(t){this.jsoneditor=t.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.original_schema=t.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.options=i({},this.options||{},t.schema.options||{},t),t.path||this.schema.id||(this.schema.id="root"),this.path=t.path||"root",this.formname=t.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.jsoneditor.options.form_name_root&&(this.formname=this.formname.replace(/^root\[/,this.jsoneditor.options.form_name_root+"[")),this.key=this.path.split(".").pop(),this.parent=t.parent,this.link_watchers=[],t.container&&this.setContainer(t.container)},setContainer:function(t){this.container=t,this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)},preBuild:function(){},build:function(){},postBuild:function(){this.setupWatchListeners(),this.addLinks(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.register(),this.onWatchedFieldChange()},setupWatchListeners:function(){var t=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){t.refreshWatchedFieldValues()&&t.onWatchedFieldChange()},this.register(),this.schema.hasOwnProperty("watch")){var e,i,s,r,n;for(var o in this.schema.watch)if(this.schema.watch.hasOwnProperty(o)){if(e=this.schema.watch[o],Array.isArray(e)?i=[e[0]].concat(e[1].split(".")):(i=e.split("."),t.theme.closest(t.container,'[data-schemaid="'+i[0]+'"]')||i.unshift("#")),s=i.shift(),"#"===s&&(s=t.jsoneditor.schema.id||"root"),r=t.theme.closest(t.container,'[data-schemaid="'+s+'"]'),!r)throw"Could not find ancestor node with id "+s;n=r.getAttribute("data-schemapath")+"."+i.join("."),t.jsoneditor.watch(n,t.watch_listener),t.watched[o]=n}}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))},addLinks:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.container.appendChild(this.link_holder),this.schema.links))for(var t=0;t<this.schema.links.length;t++)this.addLink(this.getLink(this.schema.links[t]))},getButton:function(t,e,i){var s="json-editor-btn-"+e;e=this.iconlib?this.iconlib.getIcon(e):null,!e&&i&&(t=i,i=null);var r=this.theme.getButton(t,e,i);return r.className+=" "+s+" ",r},setButtonText:function(t,e,i,s){return i=this.iconlib?this.iconlib.getIcon(i):null,!i&&s&&(e=s,s=null),this.theme.setButtonText(t,e,i,s)},addLink:function(t){this.link_holder&&this.link_holder.appendChild(t)},getLink:function(t){var e,i,s=t.mediaType||"application/javascript",r=s.split("/")[0],n=this.jsoneditor.compileTemplate(t.href,this.template_engine);if("image"===r){e=this.theme.getBlockLinkHolder(),i=document.createElement("a"),i.setAttribute("target","_blank");var o=document.createElement("img");this.theme.createImageLink(e,i,o),this.link_watchers.push(function(e){var s=n(e);i.setAttribute("href",s),i.setAttribute("title",t.rel||s),o.setAttribute("src",s)})}else if(["audio","video"].indexOf(r)>=0){e=this.theme.getBlockLinkHolder(),i=this.theme.getBlockLink(),i.setAttribute("target","_blank");var a=document.createElement(r);a.setAttribute("controls","controls"),this.theme.createMediaLink(e,i,a),this.link_watchers.push(function(e){var s=n(e);i.setAttribute("href",s),i.textContent=t.rel||s,a.setAttribute("src",s)})}else e=this.theme.getBlockLink(),e.setAttribute("target","_blank"),e.textContent=t.rel,this.link_watchers.push(function(i){var s=n(i);e.setAttribute("href",s),e.textContent=t.rel||s});return e},refreshWatchedFieldValues:function(){if(this.watched_values){var t={},e=!1,i=this;if(this.watched){var s,r;for(var n in this.watched)this.watched.hasOwnProperty(n)&&(r=i.jsoneditor.getEditor(this.watched[n]),s=r?r.getValue():null,i.watched_values[n]!==s&&(e=!0),t[n]=s)}return t.self=this.getValue(),this.watched_values.self!==t.self&&(e=!0),this.watched_values=t,e}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var t=0;t<this.header.childNodes.length;t++)if(3===this.header.childNodes[t].nodeType){this.header.childNodes[t].nodeValue=this.getHeaderText();break}}else this.header.textContent=this.getHeaderText()},getHeaderText:function(t){return this.header_text?this.header_text:t?this.schema.title:this.getTitle()},onWatchedFieldChange:function(){var t;if(this.header_template){t=i(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var e=this.header_template(t);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){t=this.getWatchedFieldValues();for(var s=0;s<this.link_watchers.length;s++)this.link_watchers[s](t)}},setValue:function(t){this.value=t},getValue:function(){return this.value},refreshValue:function(){},getChildEditors:function(){return!1},destroy:function(){var t=this;this.unregister(this),s(this.watched,function(e,i){t.jsoneditor.unwatch(i,t.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null},getDefault:function(){if(this.schema["default"])return this.schema["default"];if(this.schema["enum"])return this.schema["enum"][0];var t=this.schema.type||this.schema.oneOf;if(t&&Array.isArray(t)&&(t=t[0]),t&&"object"==typeof t&&(t=t.type),t&&Array.isArray(t)&&(t=t[0]),"string"==typeof t){if("number"===t)return 0;if("boolean"===t)return!1;if("integer"===t)return 0;if("string"===t)return"";if("object"===t)return{};if("array"===t)return[]}return null},getTitle:function(){return this.schema.title||this.key},enable:function(){this.disabled=!1},disable:function(){this.disabled=!0},isEnabled:function(){return!this.disabled},isRequired:function(){return"boolean"==typeof this.schema.required?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.indexOf(this.key)>-1:!!this.jsoneditor.options.required_by_default},getDisplayText:function(t){var e=[],i={};s(t,function(t,e){e.title&&(i[e.title]=i[e.title]||0,i[e.title]++),e.description&&(i[e.description]=i[e.description]||0,i[e.description]++),e.format&&(i[e.format]=i[e.format]||0,i[e.format]++),e.type&&(i[e.type]=i[e.type]||0,i[e.type]++)}),s(t,function(t,s){var r;r="string"==typeof s?s:s.title&&i[s.title]<=1?s.title:s.format&&i[s.format]<=1?s.format:s.type&&i[s.type]<=1?s.type:s.description&&i[s.description]<=1?s.descripton:s.title?s.title:s.format?s.format:s.type?s.type:s.description?s.description:JSON.stringify(s).length<50?JSON.stringify(s):"type",e.push(r)});var r={};return s(e,function(t,s){r[s]=r[s]||0,r[s]++,i[s]>1&&(e[t]=s+" "+r[s])}),e},getOption:function(t){try{throw"getOption is deprecated"}catch(e){window.console.error(e)}return this.options[t]},showValidationErrors:function(t){}}),n.defaults.editors["null"]=n.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),n.defaults.editors.string=n.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(t,e,i){if((!this.template||i)&&(null===t||"undefined"==typeof t?t="":"object"==typeof t?t=JSON.stringify(t):"string"!=typeof t&&(t=""+t),t!==this.serialized)){var s=this.sanitize(t);if(this.input.value!==s){this.input.value=s,this.sceditor_instance?this.sceditor_instance.val(s):this.epiceditor?this.epiceditor.importFile(null,s):this.ace_editor&&this.ace_editor.setValue(s);var r=i||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(r)}}},getNumColumns:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(e,t))},build:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var e=this.schema.minimum||0,i=this.schema.maximum||Math.max(100,e+1),s=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),i%this.schema.multipleOf&&(i=Math.floor(i/this.schema.multipleOf)*this.schema.multipleOf),s=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,i,s)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(e){if(e.preventDefault(),e.stopPropagation(),t.schema.template)return void(this.value=t.value);var i=this.value,s=t.sanitize(i);i!==s&&(this.value=s),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(t){if(t){var e,i=t.offsetHeight;if(t.offsetHeight<t.scrollHeight)for(e=0;t.offsetHeight<t.scrollHeight+3&&!(e>100);)e++,i++,t.style.height=i+"px";else{for(e=0;t.offsetHeight>=t.scrollHeight+3&&!(e>100);)e++,i--,t.style.height=i+"px";t.style.height=i+1+"px"}}},this.input.addEventListener("keyup",function(e){t.adjust_height(this)}),this.input.addEventListener("change",function(e){t.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var t,e=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)t=i({},{plugins:"html"===e.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},n.plugins.sceditor,e.options.sceditor_options||{}),window.jQuery(e.input).sceditor(t),e.sceditor_instance=window.jQuery(e.input).sceditor("instance"),e.sceditor_instance.blur(function(){var t=window.jQuery("<div>"+e.sceditor_instance.val()+"</div>");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",t).remove(),e.input.value=t.html(),e.value=e.input.value,e.is_dirty=!0,e.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",t=i({},n.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(t).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var t=e.epiceditor.exportFile();e.input.value=t,e.value=t,e.is_dirty=!0,e.onChange(!0)});else if(window.ace){ +var s=this.input_type;("cpp"===s||"c++"===s||"c"===s)&&(s="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),n.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+n.plugins.ace.theme),s=window.ace.require("ace/mode/"+s),s&&this.ace_editor.getSession().setMode(new s.Mode),this.ace_editor.on("change",function(){var t=e.ace_editor.getValue();e.input.value=t,e.refreshValue(),e.is_dirty=!0,e.onChange(!0)})}e.theme.afterInputReady(e.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(t){return t},onWatchedFieldChange:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),this._super()},showValidationErrors:function(t){var e=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var i=[];s(t,function(t,s){s.path===e.path&&i.push(s.message)}),i.length?this.theme.addInputError(this.input,i.join(". ")+"."):this.theme.removeInputError(this.input)}}),n.defaults.editors.number=n.defaults.editors.string.extend({sanitize:function(t){return(t+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),n.defaults.editors.integer=n.defaults.editors.number.extend({sanitize:function(t){return t+="",t.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),n.defaults.editors.object=n.AbstractEditor.extend({getDefault:function(){return i({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var t in this.editors)this.editors.hasOwnProperty(t)&&this.editors[t].register()},unregister:function(){if(this._super(),this.editors)for(var t in this.editors)this.editors.hasOwnProperty(t)&&this.editors[t].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var t in this.editors)this.editors.hasOwnProperty(t)&&this.editors[t].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var t in this.editors)this.editors.hasOwnProperty(t)&&this.editors[t].disable()},layoutEditors:function(){var t,e,i=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(t,e){var s=i.editors[t].schema.propertyOrder,r=i.editors[e].schema.propertyOrder;return"number"!=typeof s&&(s=1e3),"number"!=typeof r&&(r=1e3),s-r});var r;if("grid"===this.format){var n=[];for(s(this.property_order,function(t,e){var s=i.editors[e];if(!s.property_removed){for(var r=!1,o=s.options.hidden?0:s.options.grid_columns||s.getNumColumns(),a=s.options.hidden?0:s.container.offsetHeight,h=0;h<n.length;h++)n[h].width+o<=12&&(!a||.5*n[h].minh<a&&2*n[h].maxh>a)&&(r=h);r===!1&&(n.push({width:0,minh:999999,maxh:0,editors:[]}),r=n.length-1),n[r].editors.push({key:e,width:o,height:a}),n[r].width+=o,n[r].minh=Math.min(n[r].minh,a),n[r].maxh=Math.max(n[r].maxh,a)}}),t=0;t<n.length;t++)if(n[t].width<12){var o=!1,a=0;for(e=0;e<n[t].editors.length;e++)o===!1?o=e:n[t].editors[e].width>n[t].editors[o].width&&(o=e),n[t].editors[e].width*=12/n[t].width,n[t].editors[e].width=Math.floor(n[t].editors[e].width),a+=n[t].editors[e].width;12>a&&(n[t].editors[o].width+=12-a),n[t].width=12}if(this.layout===JSON.stringify(n))return!1;for(this.layout=JSON.stringify(n),r=document.createElement("div"),t=0;t<n.length;t++){var h=this.theme.getGridRow();for(r.appendChild(h),e=0;e<n[t].editors.length;e++){var l=n[t].editors[e].key,d=this.editors[l];d.options.hidden?d.container.style.display="none":this.theme.setGridColumnSize(d.container,n[t].editors[e].width),h.appendChild(d.container)}}}else r=document.createElement("div"),s(this.property_order,function(t,e){var s=i.editors[e];if(!s.property_removed){var n=i.theme.getGridRow();r.appendChild(n),s.options.hidden?s.container.style.display="none":i.theme.setGridColumnSize(s.container,12),n.appendChild(s.container)}});this.row_container.innerHTML="",this.row_container.appendChild(r)}},getPropertySchema:function(t){var e=this.schema.properties[t]||{};e=i({},e);var s=!!this.schema.properties[t];if(this.schema.patternProperties)for(var r in this.schema.patternProperties)if(this.schema.patternProperties.hasOwnProperty(r)){var n=new RegExp(r);n.test(t)&&(e.allOf=e.allOf||[],e.allOf.push(this.schema.patternProperties[r]),s=!0)}return!s&&this.schema.additionalProperties&&"object"==typeof this.schema.additionalProperties&&(e=i({},this.schema.additionalProperties)),e},preBuild:function(){this._super(),this.editors={},this.cached_editors={};var t=this;if(this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)s(this.schema.properties,function(e,i){var s=t.jsoneditor.getEditorClass(i);t.editors[e]=t.jsoneditor.createEditor(s,{jsoneditor:t.jsoneditor,schema:i,path:t.path+"."+e,parent:t,compact:!0,required:!0}),t.editors[e].preBuild();var r=t.editors[e].options.hidden?0:t.editors[e].options.grid_columns||t.editors[e].getNumColumns();t.minwidth+=r,t.maxwidth+=r}),this.no_link_holder=!0;else{if(this.options.table)throw"Not supported yet";this.defaultProperties=this.schema.defaultProperties||Object.keys(this.schema.properties),t.maxwidth+=1,s(this.defaultProperties,function(e,i){t.addObjectProperty(i,!0),t.editors[i]&&(t.minwidth=Math.max(t.minwidth,t.editors[i].options.grid_columns||t.editors[i].getNumColumns()),t.maxwidth+=t.editors[i].options.grid_columns||t.editors[i].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,i){var s=t.editors[e].schema.propertyOrder,r=t.editors[i].schema.propertyOrder;return"number"!=typeof s&&(s=1e3),"number"!=typeof r&&(r=1e3),s-r})},build:function(){var t=this;if(this.options.table_row)this.editor_holder=this.container,s(this.editors,function(e,i){var s=t.theme.getTableCell();t.editor_holder.appendChild(s),i.setContainer(s),i.build(),i.postBuild(),t.editors[e].options.hidden&&(s.style.display="none"),t.editors[e].options.input_width&&(s.style.width=t.editors[e].options.input_width)});else{if(this.options.table)throw"Not supported yet";this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header),this.container.appendChild(this.title),this.container.style.position="relative",this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.style.height="170px",this.editjson_textarea.style.width="300px",this.editjson_textarea.style.display="block",this.editjson_save=this.getButton("Save","save","Save"),this.editjson_save.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.saveJSON()}),this.editjson_cancel=this.getButton("Cancel","cancel","Cancel"),this.editjson_cancel.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.style.width="295px",this.addproperty_list.style.maxHeight="160px",this.addproperty_list.style.padding="5px 0",this.addproperty_list.style.overflowY="auto",this.addproperty_list.style.overflowX="hidden",this.addproperty_list.style.paddingLeft="5px",this.addproperty_list.setAttribute("class","property-selector"),this.addproperty_add=this.getButton("add","add","add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.style.width="220px",this.addproperty_input.style.marginBottom="0",this.addproperty_input.style.display="inline-block",this.addproperty_add.addEventListener("click",function(e){if(e.preventDefault(),e.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var e=document.createElement("div");e.style.clear="both",this.addproperty_holder.appendChild(e),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.editor_holder.style.paddingBottom="0",this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),this.editor_holder.appendChild(this.row_container),s(this.editors,function(e,i){var s=t.theme.getGridColumn();t.row_container.appendChild(s),i.setContainer(s),i.build(),i.postBuild()}),this.title_controls=this.theme.getHeaderButtonHolder(),this.editjson_controls=this.theme.getHeaderButtonHolder(),this.addproperty_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.title.appendChild(this.editjson_controls),this.title.appendChild(this.addproperty_controls),this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.toggle_button,"","collapse","Collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.toggle_button,"","expand","Expand"))}),this.options.collapsed&&r(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.editjson_button=this.getButton("JSON","edit","Edit JSON"),this.editjson_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.toggleEditJSON()}),this.editjson_controls.appendChild(this.editjson_button),this.editjson_controls.appendChild(this.editjson_holder),this.schema.options&&"undefined"!=typeof this.schema.options.disable_edit_json?this.schema.options.disable_edit_json&&(this.editjson_button.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_button.style.display="none"),this.addproperty_button=this.getButton("Properties","edit","Object Properties"),this.addproperty_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.toggleAddProperty()}),this.addproperty_controls.appendChild(this.addproperty_button),this.addproperty_controls.appendChild(this.addproperty_holder),this.refreshAddProperties()}this.options.table_row?(this.editor_holder=this.container,s(this.property_order,function(e,i){t.editor_holder.appendChild(t.editors[i].container)})):(this.layoutEditors(),this.layoutEditors())},showEditJSON:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left=this.editjson_button.offsetLeft+"px",this.editjson_holder.style.top=this.editjson_button.offsetTop+this.editjson_button.offsetHeight+"px",this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_button.disabled=!1,this.editing_json=!0)},hideEditJSON:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)},saveJSON:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON()}catch(e){throw window.alert("invalid JSON"),e}},toggleEditJSON:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()},insertPropertyControlUsingPropertyOrder:function(t,e,i){var s;this.schema.properties[t]&&(s=this.schema.properties[t].propertyOrder),"number"!=typeof s&&(s=1e3),e.propertyOrder=s;for(var r=0;r<i.childNodes.length;r++){var n=i.childNodes[r];if(e.propertyOrder<n.propertyOrder){this.addproperty_list.insertBefore(e,n),e=null;break}}e&&this.addproperty_list.appendChild(e)},addPropertyCheckbox:function(t){var e,i,s,r,n=this;return e=n.theme.getCheckbox(),e.style.width="auto",s=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t,i=n.theme.getCheckboxLabel(s),r=n.theme.getFormControl(i,e),r.style.paddingBottom=r.style.marginBottom=r.style.paddingTop=r.style.marginTop=0,r.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,r,this.addproperty_list),e.checked=t in this.editors,e.addEventListener("change",function(){e.checked?n.addObjectProperty(t):n.removeObjectProperty(t),n.onChange(!0)}),n.addproperty_checkboxes[t]=e,e},showAddProperty:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left=this.addproperty_button.offsetLeft+"px",this.addproperty_holder.style.top=this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight+"px",this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())},hideAddProperty:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)},toggleAddProperty:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()},removeObjectProperty:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())},addObjectProperty:function(t,e){var i=this;if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]))return;var s=i.getPropertySchema(t),r=i.jsoneditor.getEditorClass(s);if(i.editors[t]=i.jsoneditor.createEditor(r,{jsoneditor:i.jsoneditor,schema:s,path:i.path+"."+t,parent:i}),i.editors[t].preBuild(),!e){var n=i.theme.getChildEditorHolder();i.editor_holder.appendChild(n),i.editors[t].setContainer(n),i.editors[t].build(),i.editors[t].postBuild()}i.cached_editors[t]=i.editors[t]}e||(i.refreshValue(),i.layoutEditors())}},onChildEditorChange:function(t){this.refreshValue(),this._super(t)},canHaveAdditionalProperties:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!this.jsoneditor.options.no_additional_properties},destroy:function(){s(this.cached_editors,function(t,e){e.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,this._super()},getValue:function(){var t=this._super();if(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)for(var e in t)t.hasOwnProperty(e)&&(t[e]||delete t[e]);return t},refreshValue:function(){this.value={};for(var t in this.editors)this.editors.hasOwnProperty(t)&&(this.value[t]=this.editors[t].getValue());this.adding_property&&this.refreshAddProperties()},refreshAddProperties:function(){if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)return void(this.addproperty_controls.style.display="none");var t,e=!1,i=!1,s=0,r=!1;for(t in this.editors)this.editors.hasOwnProperty(t)&&s++;e=this.canHaveAdditionalProperties()&&!("undefined"!=typeof this.schema.maxProperties&&s>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(t in this.cached_editors)this.cached_editors.hasOwnProperty(t)&&(this.addPropertyCheckbox(t),this.isRequired(this.cached_editors[t])&&t in this.editors&&(this.addproperty_checkboxes[t].disabled=!0),"undefined"!=typeof this.schema.minProperties&&s<=this.schema.minProperties?(this.addproperty_checkboxes[t].disabled=this.addproperty_checkboxes[t].checked,this.addproperty_checkboxes[t].checked||(r=!0)):t in this.editors?(r=!0,i=!0):e||this.schema.properties.hasOwnProperty(t)?(this.addproperty_checkboxes[t].disabled=!1,r=!0):this.addproperty_checkboxes[t].disabled=!0);this.canHaveAdditionalProperties()&&(r=!0);for(t in this.schema.properties)this.schema.properties.hasOwnProperty(t)&&(this.cached_editors[t]||(r=!0,this.addPropertyCheckbox(t)));r?this.canHaveAdditionalProperties()?e?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(t){return"boolean"==typeof t.schema.required?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(t.key)>-1:!!this.jsoneditor.options.required_by_default},setValue:function(t,e){var i=this;t=t||{},("object"!=typeof t||Array.isArray(t))&&(t={}),s(this.cached_editors,function(s,r){"undefined"!=typeof t[s]?(i.addObjectProperty(s),r.setValue(t[s],e)):e||i.isRequired(r)?r.setValue(r.getDefault(),e):i.removeObjectProperty(s)}),s(t,function(t,s){i.cached_editors[t]||(i.addObjectProperty(t),i.editors[t]&&i.editors[t].setValue(s,e))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(t){var e=this,i=[],r=[];s(t,function(t,s){s.path===e.path?i.push(s):r.push(s)}),this.error_holder&&(i.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s(i,function(t,i){e.error_holder.appendChild(e.theme.getErrorMessage(i.message))})):this.error_holder.style.display="none"),this.options.table_row&&(i.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),s(this.editors,function(t,e){e.showValidationErrors(r)})}}),n.defaults.editors.array=n.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()},unregister:function(){if(this._super(),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()},getNumColumns:function(){var t=this.getItemInfo(0);return this.tabs_holder?Math.max(Math.min(12,t.width+2),4):t.width},enable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!1),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!1),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!1),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].enable(),this.rows[t].moveup_button&&(this.rows[t].moveup_button.disabled=!1),this.rows[t].movedown_button&&(this.rows[t].movedown_button.disabled=!1),this.rows[t].delete_button&&(this.rows[t].delete_button.disabled=!1);this._super()},disable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!0),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!0),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!0),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].disable(),this.rows[t].moveup_button&&(this.rows[t].moveup_button.disabled=!0),this.rows[t].movedown_button&&(this.rows[t].movedown_button.disabled=!0),this.rows[t].delete_button&&(this.rows[t].delete_button.disabled=!0);this._super()},preBuild:function(){this._super(),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add},build:function(){this.options.compact?(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),"tabs"===this.schema.format?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls))),this.addControls()},onChildEditorChange:function(t){this.refreshValue(),this.refreshTabs(!0),this._super(t)},getItemTitle:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=t.title||"item"}else this.item_title="item";return this.item_title},getItemSchema:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?i({},this.schema.additionalItems):void 0:i({},this.schema.items[t]):this.schema.items?i({},this.schema.items):{}},getItemInfo:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var i=JSON.stringify(e);return"undefined"!=typeof this.item_info[i]?this.item_info[i]:(e=this.jsoneditor.expandRefs(e),this.item_info[i]={title:e.title||"item","default":e["default"],width:12,child_editors:e.properties||e.items},this.item_info[i])},getElementEditor:function(t){var e=this.getItemInfo(t),i=this.getItemSchema(t);i=this.jsoneditor.expandRefs(i),i.title=e.title+" "+(t+1);var s,r=this.jsoneditor.getEditorClass(i);s=this.tabs_holder?this.theme.getTabContent():e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(s);var n=this.jsoneditor.createEditor(r,{jsoneditor:this.jsoneditor,schema:i,container:s,path:this.path+"."+t,parent:this,required:!0});return n.preBuild(),n.build(),n.postBuild(),n.title_controls||(n.array_controls=this.theme.getButtonHolder(),s.appendChild(n.array_controls)),n},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(t){if(this.rows){var e=this;s(this.rows,function(i,s){t&&(s.tab&&s.tab.parentNode&&s.tab.parentNode.removeChild(s.tab),e.destroyRow(s,!0),e.row_cache[i]=null),e.rows[i]=null}),e.rows=[],t&&(e.row_cache=[])}},destroyRow:function(t,e){var i=t.container;e?(t.destroy(),i.parentNode&&i.parentNode.removeChild(i),t.tab&&t.tab.parentNode&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),i.style.display="none",t.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(t){var e=this;s(this.rows,function(i,s){s.tab&&(t?s.tab_text.textContent=s.getHeaderText():s.tab===e.active_tab?(e.theme.markTabActive(s.tab),s.container.style.display=""):(e.theme.markTabInactive(s.tab),s.container.style.display="none"))})},setValue:function(t,e){t=t||[],Array.isArray(t)||(t=[t]);var i=JSON.stringify(t);if(i!==this.serialized){if(this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length)["default"]);this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax()));var r=this;s(t,function(t,i){r.rows[t]?r.rows[t].setValue(i,e):r.row_cache[t]?(r.rows[t]=r.row_cache[t],r.rows[t].setValue(i,e),r.rows[t].container.style.display="",r.rows[t].tab&&(r.rows[t].tab.style.display=""),r.rows[t].register()):r.addRow(i,e)});for(var n=t.length;n<r.rows.length;n++)r.destroyRow(r.rows[n]),r.rows[n]=null;r.rows=r.rows.slice(0,t.length);var o=null;s(r.rows,function(t,e){return e.tab===r.active_tab?(o=e.tab,!1):void 0}),!o&&r.rows.length&&(o=r.rows[0].tab),r.active_tab=o,r.refreshValue(e),r.refreshTabs(!0),r.refreshTabs(),r.onChange()}},refreshValue:function(t){var e=this,i=this.value?this.value.length:0;if(this.value=[],s(this.rows,function(t,i){e.value[t]=i.getValue()}),i!==this.value.length||t){var r=this.schema.minItems&&this.schema.minItems>=this.rows.length;s(this.rows,function(t,i){i.movedown_button&&(t===e.rows.length-1?i.movedown_button.style.display="none":i.movedown_button.style.display=""),i.delete_button&&(r?i.delete_button.style.display="none":i.delete_button.style.display=""),e.value[t]=i.getValue()});var n=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",r||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",n=!0)):r||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",n=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",n=!0),!this.collapsed&&n?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(t,e){var i=this,r=this.rows.length;i.rows[r]=this.getElementEditor(r),i.row_cache[r]=i.rows[r],i.tabs_holder&&(i.rows[r].tab_text=document.createElement("span"),i.rows[r].tab_text.textContent=i.rows[r].getHeaderText(),i.rows[r].tab=i.theme.getTab(i.rows[r].tab_text),i.rows[r].tab.addEventListener("click",function(t){i.active_tab=i.rows[r].tab,i.refreshTabs(),t.preventDefault(),t.stopPropagation()}),i.theme.addTab(i.tabs_holder,i.rows[r].tab));var n=i.rows[r].title_controls||i.rows[r].array_controls;i.hide_delete_buttons||(i.rows[r].delete_button=this.getButton(i.getItemTitle(),"delete","Delete "+i.getItemTitle()),i.rows[r].delete_button.className+=" delete",i.rows[r].delete_button.setAttribute("data-i",r),i.rows[r].delete_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var e=1*this.getAttribute("data-i"),r=i.getValue(),n=[],o=null;s(r,function(t,s){return t===e?void(i.rows[t].tab===i.active_tab&&(i.rows[t+1]?o=i.rows[t].tab:t&&(o=i.rows[t-1].tab))):void n.push(s)}),i.setValue(n),o&&(i.active_tab=o,i.refreshTabs()),i.onChange(!0)}),n&&n.appendChild(i.rows[r].delete_button)),r&&!i.hide_move_buttons&&(i.rows[r].moveup_button=this.getButton("","moveup","Move up"),i.rows[r].moveup_button.className+=" moveup",i.rows[r].moveup_button.setAttribute("data-i",r),i.rows[r].moveup_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var e=1*this.getAttribute("data-i");if(!(0>=e)){var s=i.getValue(),r=s[e-1];s[e-1]=s[e],s[e]=r,i.setValue(s),i.active_tab=i.rows[e-1].tab,i.refreshTabs(),i.onChange(!0)}}),n&&n.appendChild(i.rows[r].moveup_button)),i.hide_move_buttons||(i.rows[r].movedown_button=this.getButton("","movedown","Move down"),i.rows[r].movedown_button.className+=" movedown",i.rows[r].movedown_button.setAttribute("data-i",r),i.rows[r].movedown_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var e=1*this.getAttribute("data-i"),s=i.getValue();if(!(e>=s.length-1)){var r=s[e+1];s[e+1]=s[e],s[e]=r,i.setValue(s),i.active_tab=i.rows[e+1].tab,i.refreshTabs(),i.onChange(!0)}}),n&&n.appendChild(i.rows[r].movedown_button)),t&&i.rows[r].setValue(t,e),i.refreshTabs()},addControls:function(){var t=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button);var e=t.row_holder.style.display,i=t.controls.style.display;this.toggle_button.addEventListener("click",function(s){s.preventDefault(),s.stopPropagation(),t.collapsed?(t.collapsed=!1,t.panel&&(t.panel.style.display=""),t.row_holder.style.display=e,t.tabs_holder&&(t.tabs_holder.style.display=""),t.controls.style.display=i,t.setButtonText(this,"","collapse","Collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.tabs_holder&&(t.tabs_holder.style.display="none"),t.controls.style.display="none",t.panel&&(t.panel.style.display="none"),t.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&r(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();var i=t.rows.length;t.row_cache[i]?(t.rows[i]=t.row_cache[i],t.rows[i].setValue(t.rows[i].getDefault()),t.rows[i].container.style.display="",t.rows[i].tab&&(t.rows[i].tab.style.display=""),t.rows[i].register()):t.addRow(),t.active_tab=t.rows[i].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0)}),t.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()), +this.delete_last_row_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();var i=t.getValue(),s=null;t.rows.length>1&&t.rows[t.rows.length-1].tab===t.active_tab&&(s=t.rows[t.rows.length-2].tab),i.pop(),t.setValue(i),s&&(t.active_tab=s,t.refreshTabs()),t.onChange(!0)}),t.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setValue([]),t.onChange(!0)}),t.controls.appendChild(this.remove_all_rows_button),t.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(t){var e=this,i=[],r=[];s(t,function(t,s){s.path===e.path?i.push(s):r.push(s)}),this.error_holder&&(i.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",s(i,function(t,i){e.error_holder.appendChild(e.theme.getErrorMessage(i.message))})):this.error_holder.style.display="none"),s(this.rows,function(t,e){e.showValidationErrors(r)})}}),n.defaults.editors.table=n.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()},unregister:function(){if(this._super(),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.width),3)},preBuild:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t["default"]||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this._super()},build:function(){var t=this;this.table=this.theme.getTable(),this.container.appendChild(this.table),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var e=this.getElementEditor(0,!0);if(this.item_default=e.getDefault(),this.width=e.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.title=this.theme.getHeader(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.table),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.item_has_child_editors)for(var i=e.getChildEditors(),s=e.property_order||Object.keys(i),r=0;r<s.length;r++){var n=t.theme.getTableHeaderCell(i[s[r]].getTitle());i[s[r]].options.hidden&&(n.style.display="none"),t.header_row.appendChild(n)}else t.header_row.appendChild(t.theme.getTableHeaderCell(this.item_title));e.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=t.theme.getTableHeaderCell(" "),t.header_row.appendChild(this.controls_header_cell),this.addControls()},onChildEditorChange:function(t){this.refreshValue(),this._super()},getItemDefault:function(){return i({},{"default":this.item_default})["default"]},getItemTitle:function(){return this.item_title},getElementEditor:function(t,e){var s=i({},this.schema.items),r=this.jsoneditor.getEditorClass(s,this.jsoneditor),n=this.row_holder.appendChild(this.theme.getTableRow()),o=n;this.item_has_child_editors||(o=this.theme.getTableCell(),n.appendChild(o));var a=this.jsoneditor.createEditor(r,{jsoneditor:this.jsoneditor,schema:s,container:o,path:this.path+"."+t,parent:this,compact:!0,table_row:!0});return a.preBuild(),e||(a.build(),a.postBuild(),a.controls_cell=n.appendChild(this.theme.getTableCell()),a.row=n,a.table_controls=this.theme.getButtonHolder(),a.controls_cell.appendChild(a.table_controls),a.table_controls.style.margin=0,a.table_controls.style.padding=0),a},destroy:function(){this.innerHTML="",this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.table&&this.table.parentNode&&this.table.parentNode.removeChild(this.table),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,this._super()},setValue:function(t,e){if(t=t||[],this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems));var i=JSON.stringify(t);if(i!==this.serialized){var r=!1,n=this;s(t,function(t,e){n.rows[t]?n.rows[t].setValue(e):(n.addRow(e),r=!0)});for(var o=t.length;o<n.rows.length;o++){var a=n.rows[o].container;n.item_has_child_editors||n.rows[o].row.parentNode.removeChild(n.rows[o].row),n.rows[o].destroy(),a.parentNode&&a.parentNode.removeChild(a),n.rows[o]=null,r=!0}n.rows=n.rows.slice(0,t.length),n.refreshValue(),(r||e)&&n.refreshRowButtons(),n.onChange()}},refreshRowButtons:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,i=!1;s(this.rows,function(s,r){r.movedown_button&&(s===t.rows.length-1?r.movedown_button.style.display="none":(i=!0,r.movedown_button.style.display="")),r.delete_button&&(e?r.delete_button.style.display="none":(i=!0,r.delete_button.style.display="")),r.moveup_button&&(i=!0)}),s(this.rows,function(t,e){i?e.controls_cell.style.display="":e.controls_cell.style.display="none"}),i?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var r=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",r=!0)):(this.table.style.display="",e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",r=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",r=!0),r?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var t=this;this.value=[],s(this.rows,function(e,i){t.value[e]=i.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(t){var e=this,i=this.rows.length;e.rows[i]=this.getElementEditor(i);var r=e.rows[i].table_controls;this.hide_delete_buttons||(e.rows[i].delete_button=this.getButton("","delete","Delete"),e.rows[i].delete_button.className+=" delete",e.rows[i].delete_button.setAttribute("data-i",i),e.rows[i].delete_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var i=1*this.getAttribute("data-i"),r=e.getValue(),n=[];s(r,function(t,e){t!==i&&n.push(e)}),e.setValue(n),e.onChange(!0)}),r.appendChild(e.rows[i].delete_button)),i&&!this.hide_move_buttons&&(e.rows[i].moveup_button=this.getButton("","moveup","Move up"),e.rows[i].moveup_button.className+=" moveup",e.rows[i].moveup_button.setAttribute("data-i",i),e.rows[i].moveup_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var i=1*this.getAttribute("data-i");if(!(0>=i)){var s=e.getValue(),r=s[i-1];s[i-1]=s[i],s[i]=r,e.setValue(s),e.onChange(!0)}}),r.appendChild(e.rows[i].moveup_button)),this.hide_move_buttons||(e.rows[i].movedown_button=this.getButton("","movedown","Move down"),e.rows[i].movedown_button.className+=" movedown",e.rows[i].movedown_button.setAttribute("data-i",i),e.rows[i].movedown_button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var i=1*this.getAttribute("data-i"),s=e.getValue();if(!(i>=s.length-1)){var r=s[i+1];s[i+1]=s[i],s[i]=r,e.setValue(s),e.onChange(!0)}}),r.appendChild(e.rows[i].movedown_button)),t&&e.rows[i].setValue(t)},addControls:function(){var t=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.collapsed?(t.collapsed=!1,t.panel.style.display="",t.setButtonText(this,"","collapse","Collapse")):(t.collapsed=!0,t.panel.style.display="none",t.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&r(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.addRow(),t.refreshValue(),t.refreshRowButtons(),t.onChange(!0)}),t.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),this.delete_last_row_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation();var i=t.getValue();i.pop(),t.setValue(i),t.onChange(!0)}),t.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setValue([]),t.onChange(!0)}),t.controls.appendChild(this.remove_all_rows_button)}}),n.defaults.editors.multiple=n.AbstractEditor.extend({register:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}this._super()},unregister:function(){if(this._super(),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()},getNumColumns:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4},enable:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,this._super()},disable:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();this.switcher.disabled=!0,this._super()},switchEditor:function(t){var e=this;this.editors[t]||this.buildChildEditor(t),e.type=t,e.register();var i=e.getValue();s(e.editors,function(t,s){s&&(e.type===t?(e.keep_values&&s.setValue(i,!0),s.container.style.display=""):s.container.style.display="none")}),e.refreshValue(),e.refreshHeaderText()},buildChildEditor:function(t){var e=this,s=this.types[t],r=e.theme.getChildEditorHolder();e.editor_holder.appendChild(r);var n;"string"==typeof s?(n=i({},e.schema),n.type=s):(n=i({},e.schema,s),n=e.jsoneditor.expandRefs(n),s.required&&Array.isArray(s.required)&&e.schema.required&&Array.isArray(e.schema.required)&&(n.required=e.schema.required.concat(s.required)));var o=e.jsoneditor.getEditorClass(n);e.editors[t]=e.jsoneditor.createEditor(o,{jsoneditor:e.jsoneditor,schema:n,container:r,path:e.path,parent:e,required:!0}),e.editors[t].preBuild(),e.editors[t].build(),e.editors[t].postBuild(),e.editors[t].header&&(e.editors[t].header.style.display="none"),e.editors[t].option=e.switcher_options[t],r.addEventListener("change_header_text",function(){e.refreshHeaderText()}),t!==e.type&&(r.style.display="none")},preBuild:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,"undefined"!=typeof this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),"undefined"!=typeof this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,s(this.types,function(t,e){}),delete this.schema.oneOf;else{if(this.schema.type&&"any"!==this.schema.type)Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;"object"==typeof t&&Array.isArray(t)||(t=[t]);var e=[];s(this.types,function(i,s){-1===t.indexOf(s)&&e.push(s)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)},build:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.header),this.switcher=this.theme.getSwitcher(this.display_text),e.appendChild(this.switcher),this.switcher.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.switchEditor(t.display_text.indexOf(this.value)),t.onChange(!0)}),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),s(this.types,function(e,s){t.editors[e]=!1;var r;"string"==typeof s?(r=i({},t.schema),r.type=s):(r=i({},t.schema,s),s.required&&Array.isArray(s.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(r.required=t.schema.required.concat(s.required))),t.validators[e]=new n.Validator(t.jsoneditor,r)}),this.switchEditor(0)},onChildEditorChange:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),this._super()},refreshHeaderText:function(){var t=this.getDisplayText(this.types);s(this.switcher_options,function(e,i){i.textContent=t[e]})},refreshValue:function(){this.value=this.editors[this.type].getValue()},setValue:function(t,e){var i=this;s(this.validators,function(e,s){return s.validate(t).length?void 0:(i.type=e,i.switcher.value=i.display_text[e],!1)}),this.switchEditor(this.type),this.editors[this.type].setValue(t,e),this.refreshValue(),i.onChange()},destroy:function(){s(this.editors,function(t,e){e&&e.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()},showValidationErrors:function(t){var e=this;this.oneOf?s(this.editors,function(r,n){if(n){var o=e.path+".oneOf["+r+"]",a=[];s(t,function(t,s){if(s.path.substr(0,o.length)===o){var r=i({},s);r.path=e.path+r.path.substr(o.length),a.push(r)}}),n.showValidationErrors(a)}}):s(this.editors,function(e,i){i&&i.showValidationErrors(t)})}}),n.defaults.editors["enum"]=n.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){this.container,this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this["enum"]=this.schema["enum"],this.selected=0,this.select_options=[],this.html_values=[];for(var t=this,e=0;e<this["enum"].length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value "+(e+1),this.html_values[e]=this.getHTML(this["enum"][e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(){t.selected=t.select_options.indexOf(this.value),t.value=t["enum"][t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this["enum"][0],this.refreshValue(),1===this["enum"].length&&(this.switcher.style.display="none")},refreshValue:function(){var t=this;t.selected=-1;var e=JSON.stringify(this.value);return s(this["enum"],function(i,s){return e===JSON.stringify(s)?(t.selected=i,!1):void 0}),t.selected<0?void t.setValue(t["enum"][0]):(this.switcher.value=this.select_options[this.selected],void(this.display_area.innerHTML=this.html_values[this.selected]))},enable:function(){this.always_disabled||(this.switcher.disabled=!1),this._super()},disable:function(){this.switcher.disabled=!0,this._super()},getHTML:function(t){var e=this;if(null===t)return"<em>null</em>";if("object"==typeof t){var i="";return s(t,function(s,r){var n=e.getHTML(r);Array.isArray(t)||(n="<div><em>"+s+"</em>: "+n+"</div>"),i+="<li>"+n+"</li>"}),i=Array.isArray(t)?"<ol>"+i+"</ol>":"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>"+i+"</ul>"}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t},setValue:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),n.defaults.editors.select=n.AbstractEditor.extend({setValue:function(t,e){t=this.typecast(t||"");var i=t;this.enum_values.indexOf(i)<0&&(i=this.enum_values[0]),this.value!==i&&(this.input.value=this.enum_options[this.enum_values.indexOf(i)],this.select2&&this.select2.select2("val",this.input.value),this.value=i,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))},typecast:function(t){return"boolean"===this.schema.type?!!t:"number"===this.schema.type?1*t:"integer"===this.schema.type?Math.floor(1*t):""+t},getValue:function(){return this.value},preBuild:function(){var t=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema["enum"]){var e=this.schema.options&&this.schema.options.enum_titles||[];s(this.schema["enum"],function(i,s){t.enum_options[i]=""+s,t.enum_display[i]=""+(e[i]||s),t.enum_values[i]=t.typecast(s)}),this.isRequired()||(t.enum_display.unshift(" "),t.enum_options.unshift("undefined"),t.enum_values.unshift(void 0))}else if("boolean"===this.schema.type)t.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],t.enum_options=["1",""],t.enum_values=[!0,!1],this.isRequired()||(t.enum_display.unshift(" "),t.enum_options.unshift("undefined"),t.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw"'select' editor requires the enum property to be set.";if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(a=0;a<this.schema.enumSource.length;a++)"string"==typeof this.schema.enumSource[a]?this.enumSource[a]={source:this.schema.enumSource[a]}:Array.isArray(this.schema.enumSource[a])?this.enumSource[a]=this.schema.enumSource[a]:this.enumSource[a]=i({},this.schema.enumSource[a]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(a=0;a<this.enumSource.length;a++)this.enumSource[a].value&&(this.enumSource[a].value=this.jsoneditor.compileTemplate(this.enumSource[a].value,this.template_engine)),this.enumSource[a].title&&(this.enumSource[a].title=this.jsoneditor.compileTemplate(this.enumSource[a].title,this.template_engine)),this.enumSource[a].filter&&(this.enumSource[a].filter=this.jsoneditor.compileTemplate(this.enumSource[a].filter,this.template_engine))}},build:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getSelectInput(this.enum_options),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),this.value=this.enum_values[0]},onInputChange:function(){var t=this.input.value,e=t;-1===this.enum_options.indexOf(t)&&(e=this.enum_options[0]),this.value=this.enum_values[this.enum_options.indexOf(t)],this.onChange(!0)},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&(this.enum_options.length>2||this.enum_options.length&&this.enumSource)){var t=i({},n.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(t=i(t,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(t);var e=this;this.select2.on("select2-blur",function(){e.input.value=e.select2.select2("val"),e.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var t,e;if(this.enumSource){t=this.getWatchedFieldValues();for(var i=[],s=[],r=0;r<this.enumSource.length;r++)if(Array.isArray(this.enumSource[r]))i=i.concat(this.enumSource[r]),s=s.concat(this.enumSource[r]);else{var n=[];if(n=Array.isArray(this.enumSource[r].source)?this.enumSource[r].source:t[this.enumSource[r].source]){if(this.enumSource[r].slice&&(n=Array.prototype.slice.apply(n,this.enumSource[r].slice)),this.enumSource[r].filter){var o=[];for(e=0;e<n.length;e++)this.enumSource[r].filter({i:e,item:n[e],watched:t})&&o.push(n[e]);n=o}var a=[],h=[];for(e=0;e<n.length;e++){var l=n[e];this.enumSource[r].value?h[e]=this.enumSource[r].value({i:e,item:l}):h[e]=n[e],this.enumSource[r].title?a[e]=this.enumSource[r].title({i:e,item:l}):a[e]=h[e]}i=i.concat(h),s=s.concat(a)}}var d=this.value;this.theme.setSelectOptions(this.input,i,s),this.enum_options=i,this.enum_display=s,this.enum_values=i,this.select2&&this.select2.select2("destroy"),-1!==i.indexOf(d)?(this.input.value=d,this.value=d):(this.input.value=i[0],this.value=i[0]||"",this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path)),this.setupSelect2()}this._super()},enable:function(){this.always_disabled||(this.input.disabled=!1,this.select2&&this.select2.select2("enable",!0)),this._super()},disable:function(){this.input.disabled=!0,this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),n.defaults.editors.multiselect=n.AbstractEditor.extend({preBuild:function(){this._super(),this.select_options={},this.select_values={};var t=this.jsoneditor.expandRefs(this.schema.items||{}),e=t["enum"]||[];for(this.option_keys=[],a=0;a<e.length;a++)this.sanitize(e[a])===e[a]&&(this.option_keys.push(e[a]+""),this.select_values[e[a]+""]=e[a])},build:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),!this.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var i=this.theme.getCheckboxLabel(this.option_keys[t]);this.controls[this.option_keys[t]]=this.theme.getFormControl(i,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description)}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys),this.input.multiple=!0,this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.control=this.theme.getFormControl(this.label,this.input,this.description)}this.container.appendChild(this.control),this.control.addEventListener("change",function(i){i.preventDefault(),i.stopPropagation();var s=[];for(t=0;t<e.option_keys.length;t++)(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&s.push(e.select_values[e.option_keys[t]]);e.updateValue(s),e.onChange(!0)})},setValue:function(t,e){var i;for(t=t||[],"object"!=typeof t?t=[t]:Array.isArray(t)||(t=[]),i=0;i<t.length;i++)"string"!=typeof t[i]&&(t[i]+="");for(i in this.select_options)this.select_options.hasOwnProperty(i)&&(this.select_options[i]["select"===this.input_type?"selected":"checked"]=-1!==t.indexOf(i));this.updateValue(t),this.onChange()},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2){var t=window.jQuery.extend({},n.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(t=i(t,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(t);var e=this;this.select2.on("select2-blur",function(){var t=e.select2.select2("val");e.value=t,e.onChange(!0)})}else this.select2=null},onInputChange:function(){this.value=this.input.value,this.onChange(!0)},postBuild:function(){this._super(),this.setupSelect2()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){var t=this.getTitle().length;for(var e in this.select_values)this.select_values.hasOwnProperty(e)&&(t=Math.max(t,(this.select_values[e]+"").length+4));return Math.min(12,Math.max(t/7,2))},updateValue:function(t){for(var e=!1,i=[],s=0;s<t.length;s++)if(this.select_options[t[s]+""]){var r=this.sanitize(this.select_values[t[s]]);i.push(r),r!==t[s]&&(e=!0)}else e=!0;return this.value=i,this.select2&&this.select2.select2("val",this.value),e},sanitize:function(t){return"number"===this.schema.items.type?1*t:"integer"===this.schema.items.type?Math.floor(1*t):""+t},enable:function(){if(!this.always_disabled){if(this.input)this.input.disabled=!1;else if(this.inputs)for(var t in this.inputs)this.inputs.hasOwnProperty(t)&&(this.inputs[t].disabled=!1);this.select2&&this.select2.select2("enable",!0)}this._super()},disable:function(){if(this.input)this.input.disabled=!0;else if(this.inputs)for(var t in this.inputs)this.inputs.hasOwnProperty(t)&&(this.inputs[t].disabled=!0);this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),n.defaults.editors.base64=n.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var t=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw"FileReader required for base64 editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(e){if(e.preventDefault(),e.stopPropagation(),this.files&&this.files.length){var i=new FileReader;i.onload=function(e){t.value=e.target.result,t.refreshPreview(),t.onChange(!0),i=null},i.readAsDataURL(this.files[0])}})}this.preview=this.theme.getFormInputDescription(this.schema.description),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> "+t+", <strong>Size:</strong> "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===t.substr(0,5)){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),n.defaults.editors.upload=n.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var t=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(e){if(e.preventDefault(),e.stopPropagation(),this.files&&this.files.length){var i=new FileReader;i.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(),t.onChange(!0),i=null},i.readAsDataURL(this.files[0])}})}var e=this.schema.description;e||(e=""),this.preview=this.theme.getFormInputDescription(e),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var t=this,e=this.preview_value.match(/^data:([^;,]+)[;,]/);e&&(e=e[1]),e||(e="unknown");var i=this.uploader.files[0];if(this.preview.innerHTML="<strong>Type:</strong> "+e+", <strong>Size:</strong> "+i.size+" bytes","image"===e.substr(0,5)){this.preview.innerHTML+="<br>";var s=document.createElement("img");s.style.maxWidth="100%",s.style.maxHeight="100px",s.src=this.preview_value, +this.preview.appendChild(s)}this.preview.innerHTML+="<br>";var r=this.getButton("Upload","upload","Upload");this.preview.appendChild(r),r.addEventListener("click",function(e){e.preventDefault(),r.setAttribute("disabled","disabled"),t.theme.removeInputError(t.uploader),t.theme.getProgressBar&&(t.progressBar=t.theme.getProgressBar(),t.preview.appendChild(t.progressBar)),t.jsoneditor.options.upload(t.path,i,{success:function(e){t.setValue(e),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange(),t.progressBar&&t.preview.removeChild(t.progressBar),r.removeAttribute("disabled")},failure:function(e){t.theme.addInputError(t.uploader,e),t.progressBar&&t.preview.removeChild(t.progressBar),r.removeAttribute("disabled")},updateProgress:function(e){t.progressBar&&(e?t.theme.updateProgressBar(t.progressBar,e):t.theme.updateProgressBarUnknown(t.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),n.defaults.editors.checkbox=n.AbstractEditor.extend({setValue:function(t,e){this.value=!!t,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var t=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=this.checked,t.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}});var o=function(){var t=document.documentElement;return t.matches?"matches":t.webkitMatchesSelector?"webkitMatchesSelector":t.mozMatchesSelector?"mozMatchesSelector":t.msMatchesSelector?"msMatchesSelector":t.oMatchesSelector?"oMatchesSelector":void 0}();n.AbstractTheme=t.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var t=document.createElement("div");return t.style=t.style||{},t.style.cssFloat="right",t.style.marginLeft="10px",t},getModal:function(){var t=document.createElement("div");return t.style.backgroundColor="white",t.style.border="1px solid black",t.style.boxShadow="3px 3px black",t.style.position="absolute",t.style.zIndex="10",t.style.display="none",t},getGridContainer:function(){var t=document.createElement("div");return t},getGridRow:function(){var t=document.createElement("div");return t.className="row",t},getGridColumn:function(){var t=document.createElement("div");return t},setGridColumnSize:function(t,e){},getLink:function(t){var e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e},disableHeader:function(t){t.style.color="#ccc"},disableLabel:function(t){t.style.color="#ccc"},enableHeader:function(t){t.style.color=""},enableLabel:function(t){t.style.color=""},getFormInputLabel:function(t){var e=document.createElement("label");return e.appendChild(document.createTextNode(t)),e},getCheckboxLabel:function(t){var e=this.getFormInputLabel(t);return e.style.fontWeight="normal",e},getHeader:function(t,e){var i=document.createElement("h3");return"string"==typeof t?i.textContent=t:i.appendChild(t),e&&(i.className+=" required"),i},getCheckbox:function(){var t=this.getFormInputField("checkbox");return t.style.display="inline-block",t.style.width="auto",t},getMultiCheckboxHolder:function(t,e,i){var s=document.createElement("div");e&&(e.style.display="block",s.appendChild(e));for(var r in t)t.hasOwnProperty(r)&&(t[r].style.display="inline-block",t[r].style.marginRight="20px",s.appendChild(t[r]));return i&&s.appendChild(i),s},getSelectInput:function(t){var e=document.createElement("select");return t&&this.setSelectOptions(e,t),e},getSwitcher:function(t){var e=this.getSelectInput(t);return e.style.backgroundColor="transparent",e.style.display="inline-block",e.style.fontStyle="italic",e.style.fontWeight="normal",e.style.height="auto",e.style.marginBottom=0,e.style.marginLeft="5px",e.style.padding="0 0 0 3px",e.style.width="auto",e},getSwitcherOptions:function(t){return t.getElementsByTagName("option")},setSwitcherOptions:function(t,e,i){this.setSelectOptions(t,e,i)},setSelectOptions:function(t,e,i){i=i||[],t.innerHTML="";for(var s=0;s<e.length;s++){var r=document.createElement("option");r.setAttribute("value",e[s]),r.textContent=i[s]||e[s],t.appendChild(r)}},getTextareaInput:function(){var t=document.createElement("textarea");return t.style=t.style||{},t.style.width="100%",t.style.height="300px",t.style.boxSizing="border-box",t},getRangeInput:function(t,e,i){var s=this.getFormInputField("range");return s.setAttribute("min",t),s.setAttribute("max",e),s.setAttribute("step",i),s},getFormInputField:function(t){var e=document.createElement("input");return e.setAttribute("type",t),e},afterInputReady:function(t){},getFormControl:function(t,e,i){var s=document.createElement("div");return s.className="form-control",t&&s.appendChild(t),"checkbox"===e.type?t.insertBefore(e,t.firstChild):s.appendChild(e),i&&s.appendChild(i),s},getIndentedPanel:function(){var t=document.createElement("div");return t.style=t.style||{},t.style.paddingLeft="10px",t.style.marginLeft="10px",t.style.borderLeft="1px solid #ccc",t},getChildEditorHolder:function(){return document.createElement("div")},getDescription:function(t){var e=document.createElement("p");return e.innerHTML=t,e},getCheckboxDescription:function(t){return this.getDescription(t)},getFormInputDescription:function(t){return this.getDescription(t)},getHeaderButtonHolder:function(){return this.getButtonHolder()},getButtonHolder:function(){return document.createElement("div")},getButton:function(t,e,i){var s=document.createElement("button");return s.type="button",this.setButtonText(s,t,e,i),s},setButtonText:function(t,e,i,s){t.innerHTML="",i&&(t.appendChild(i),t.innerHTML+=" "),t.appendChild(document.createTextNode(e)),s&&t.setAttribute("title",s)},getTable:function(){return document.createElement("table")},getTableRow:function(){return document.createElement("tr")},getTableHead:function(){return document.createElement("thead")},getTableBody:function(){return document.createElement("tbody")},getTableHeaderCell:function(t){var e=document.createElement("th");return e.textContent=t,e},getTableCell:function(){var t=document.createElement("td");return t},getErrorMessage:function(t){var e=document.createElement("p");return e.style=e.style||{},e.style.color="red",e.appendChild(document.createTextNode(t)),e},addInputError:function(t,e){},removeInputError:function(t){},addTableRowError:function(t){},removeTableRowError:function(t){},getTabHolder:function(){var t=document.createElement("div");return t.innerHTML="<div style='float: left; width: 130px;' class='tabs'></div><div class='content' style='margin-left: 130px;'></div><div style='clear:both;'></div>",t},applyStyles:function(t,e){t.style=t.style||{};for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},closest:function(t,e){for(;t&&t!==document;){if(!o)return!1;if(t[o](e))return t;t=t.parentNode}return!1},getTab:function(t){var e=document.createElement("div");return e.appendChild(t),e.style=e.style||{},this.applyStyles(e,{border:"1px solid #ccc",borderWidth:"1px 0 1px 1px",textAlign:"center",lineHeight:"30px",borderRadius:"5px",borderBottomRightRadius:0,borderTopRightRadius:0,fontWeight:"bold",cursor:"pointer"}),e},getTabContentHolder:function(t){return t.children[1]},getTabContent:function(){return this.getIndentedPanel()},markTabActive:function(t){this.applyStyles(t,{opacity:1,background:"white"})},markTabInactive:function(t){this.applyStyles(t,{opacity:.5,background:""})},addTab:function(t,e){t.children[0].appendChild(e)},getBlockLink:function(){var t=document.createElement("a");return t.style.display="block",t},getBlockLinkHolder:function(){var t=document.createElement("div");return t},getLinksHolder:function(){var t=document.createElement("div");return t},createMediaLink:function(t,e,i){t.appendChild(e),i.style.width="100%",t.appendChild(i)},createImageLink:function(t,e,i){t.appendChild(e),e.appendChild(i)}}),n.defaults.themes.bootstrap2=n.AbstractTheme.extend({getRangeInput:function(t,e,i){return this._super(t,e,i)},getGridContainer:function(){var t=document.createElement("div");return t.className="container-fluid",t},getGridRow:function(){var t=document.createElement("div");return t.className="row-fluid",t},getFormInputLabel:function(t,e){var i=this._super(t);return i.style.display="inline-block",i.style.fontWeight="bold",e&&(i.className+=" required"),i},setGridColumnSize:function(t,e){t.className="span"+e},getSelectInput:function(t){var e=this._super(t);return e.style.width="auto",e.style.maxWidth="98%",e},getFormInputField:function(t){var e=this._super(t);return e.style.width="98%",e},afterInputReady:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".control-group"),t.controls=this.closest(t,".controls"),this.closest(t,".compact")&&(t.controlgroup.className=t.controlgroup.className.replace(/control-group/g,"").replace(/[ ]{2,}/g," "),t.controls.className=t.controlgroup.className.replace(/controls/g,"").replace(/[ ]{2,}/g," "),t.style.marginBottom=0))},getIndentedPanel:function(){var t=document.createElement("div");return t.className="well well-small",t},getFormInputDescription:function(t){var e=document.createElement("p");return e.className="help-inline",e.textContent=t,e},getFormControl:function(t,e,i){var s=document.createElement("div");s.className="control-group";var r=document.createElement("div");return r.className="controls",t&&"checkbox"===e.getAttribute("type")?(s.appendChild(r),t.className+=" checkbox",t.appendChild(e),r.appendChild(t),r.style.height="30px"):(t&&(t.className+=" control-label",s.appendChild(t)),r.appendChild(e),s.appendChild(r)),i&&r.appendChild(i),s},getHeaderButtonHolder:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t},getButtonHolder:function(){var t=document.createElement("div");return t.className="btn-group",t},getButton:function(t,e,i){var s=this._super(t,e,i);return s.className+=" btn btn-default",s},getTable:function(){var t=document.createElement("table");return t.className="table table-bordered",t.style.width="auto",t.style.maxWidth="none",t},addInputError:function(t,e){t.controlgroup&&t.controls&&(t.controlgroup.className+=" error",t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.className="help-block errormsg",t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e)},removeInputError:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.className=t.controlgroup.className.replace(/\s?error/g,""))},getTabHolder:function(){var t=document.createElement("div");return t.className="tabbable tabs-left",t.innerHTML="<ul class='nav nav-tabs span2' style='margin-right: 0;'></ul><div class='tab-content span10' style='overflow:visible;'></div>",t},getTab:function(t){var e=document.createElement("li"),i=document.createElement("a");return i.setAttribute("href","#"),i.appendChild(t),e.appendChild(i),e},getTabContentHolder:function(t){return t.children[1]},getTabContent:function(){var t=document.createElement("div");return t.className="tab-pane active",t},markTabActive:function(t){t.className+=" active"},markTabInactive:function(t){t.className=t.className.replace(/\s?active/g,"")},addTab:function(t,e){t.children[0].appendChild(e)},getProgressBar:function(){var t=document.createElement("div");t.className="progress";var e=document.createElement("div");return e.className="bar",e.style.width="0%",t.appendChild(e),t},updateProgressBar:function(t,e){t&&(t.firstChild.style.width=e+"%")},updateProgressBarUnknown:function(t){t&&(t.className="progress progress-striped active",t.firstChild.style.width="100%")}}),n.defaults.themes.bootstrap3=n.AbstractTheme.extend({getSelectInput:function(t){var e=this._super(t);return e.className+="form-control",e},setGridColumnSize:function(t,e){t.className="col-md-"+e},afterInputReady:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))},getTextareaInput:function(){var t=document.createElement("textarea");return t.className="form-control",t},getRangeInput:function(t,e,i){return this._super(t,e,i)},getFormInputField:function(t){var e=this._super(t);return"checkbox"!==t&&(e.className+="form-control"),e},getFormControl:function(t,e,i){var s=document.createElement("div");return t&&"checkbox"===e.type?(s.className+=" checkbox",t.appendChild(e),t.style.fontSize="14px",s.style.marginTop="0",s.appendChild(t),e.style.position="relative",e.style.cssFloat="left"):(s.className+=" form-group",t&&(t.className+=" control-label",s.appendChild(t)),s.appendChild(e)),i&&s.appendChild(i),s},getIndentedPanel:function(){var t=document.createElement("div");return t.className="well well-sm",t},getFormInputDescription:function(t){var e=document.createElement("p");return e.className="help-block",e.innerHTML=t,e},getHeaderButtonHolder:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t},getButtonHolder:function(){var t=document.createElement("div");return t.className="btn-group",t},getButton:function(t,e,i){var s=this._super(t,e,i);return s.className+="btn btn-default",s},getTable:function(){var t=document.createElement("table");return t.className="table table-bordered",t.style.width="auto",t.style.maxWidth="none",t},addInputError:function(t,e){t.controlgroup&&(t.controlgroup.className+=" has-error",t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.className="help-block errormsg",t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)},removeInputError:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.className=t.controlgroup.className.replace(/\s?has-error/g,""))},getTabHolder:function(){var t=document.createElement("div");return t.innerHTML="<div class='tabs list-group col-md-2'></div><div class='col-md-10'></div>",t.className="rows",t},getTab:function(t){var e=document.createElement("a");return e.className="list-group-item",e.setAttribute("href","#"),e.appendChild(t),e},markTabActive:function(t){t.className+=" active"},markTabInactive:function(t){t.className=t.className.replace(/\s?active/g,"")},getProgressBar:function(){var t=0,e=100,i=0,s=document.createElement("div");s.className="progress";var r=document.createElement("div");return r.className="progress-bar",r.setAttribute("role","progressbar"),r.setAttribute("aria-valuenow",i),r.setAttribute("aria-valuemin",t),r.setAttribute("aria-valuenax",e),r.innerHTML=i+"%",s.appendChild(r),s},updateProgressBar:function(t,e){if(t){var i=t.firstChild,s=e+"%";i.setAttribute("aria-valuenow",e),i.style.width=s,i.innerHTML=s}},updateProgressBarUnknown:function(t){if(t){var e=t.firstChild;t.className="progress progress-striped active",e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}}),n.defaults.themes.foundation=n.AbstractTheme.extend({getChildEditorHolder:function(){var t=document.createElement("div");return t.style.marginBottom="15px",t},getSelectInput:function(t){var e=this._super(t);return e.style.minWidth="none",e.style.padding="5px",e.style.marginTop="3px",e},getSwitcher:function(t){var e=this._super(t);return e.style.paddingRight="8px",e},afterInputReady:function(t){this.closest(t,".compact")&&(t.style.marginBottom=0),t.group=this.closest(t,".form-control")},getFormInputLabel:function(t,e){var i=this._super(t);return i.style.display="inline-block",e&&(i.className+=" required"),i},getFormInputField:function(t){var e=this._super(t);return e.style.width="100%",e.style.marginBottom="checkbox"===t?"0":"12px",e},getFormInputDescription:function(t){var e=document.createElement("p");return e.textContent=t,e.style.marginTop="-10px",e.style.fontStyle="italic",e},getIndentedPanel:function(){var t=document.createElement("div");return t.className="panel",t},getHeaderButtonHolder:function(){var t=this.getButtonHolder();return t.style.display="inline-block",t.style.marginLeft="10px",t.style.verticalAlign="middle",t},getButtonHolder:function(){var t=document.createElement("div");return t.className="button-group",t},getButton:function(t,e,i){var s=this._super(t,e,i);return s.className+=" small button",s},addInputError:function(t,e){t.group&&(t.group.className+=" error",t.errmsg?t.errmsg.style.display="":(t.insertAdjacentHTML("afterend",'<small class="error"></small>'),t.errmsg=t.parentNode.getElementsByClassName("error")[0]),t.errmsg.textContent=e)},removeInputError:function(t){t.errmsg&&(t.group.className=t.group.className.replace(/ error/g,""),t.errmsg.style.display="none")},getProgressBar:function(){var t=document.createElement("div");t.className="progress";var e=document.createElement("span");return e.className="meter",e.style.width="0%",t.appendChild(e),t},updateProgressBar:function(t,e){t&&(t.firstChild.style.width=e+"%")},updateProgressBarUnknown:function(t){t&&(t.firstChild.style.width="100%")}}),n.defaults.themes.foundation3=n.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var t=this._super();return t.style.fontSize=".6em",t},getFormInputLabel:function(t,e){var i=this._super(t);return i.style.fontWeight="bold",e&&(i.className+=" required"),i},getTabHolder:function(){var t=document.createElement("div");return t.className="row",t.innerHTML="<dl class='tabs vertical two columns'></dl><div class='tabs-content ten columns'></div>",t},setGridColumnSize:function(t,e){var i=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];t.className="columns "+i[e]},getTab:function(t){var e=document.createElement("dd"),i=document.createElement("a");return i.setAttribute("href","#"),i.appendChild(t),e.appendChild(i),e},getTabContentHolder:function(t){return t.children[1]},getTabContent:function(){var t=document.createElement("div");return t.className="content active",t.style.paddingLeft="5px",t},markTabActive:function(t){t.className+=" active"},markTabInactive:function(t){t.className=t.className.replace(/\s*active/g,"")},addTab:function(t,e){t.children[0].appendChild(e)}}),n.defaults.themes.foundation4=n.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var t=this._super();return t.style.fontSize=".6em",t},setGridColumnSize:function(t,e){t.className="columns large-"+e},getFormInputDescription:function(t){var e=this._super(t);return e.style.fontSize=".8rem",e},getFormInputLabel:function(t,e){var i=this._super(t);return i.style.fontWeight="bold",e&&(i.className+=" required"),i}}),n.defaults.themes.foundation5=n.defaults.themes.foundation.extend({getFormInputDescription:function(t){var e=this._super(t);return e.style.fontSize=".8rem",e},setGridColumnSize:function(t,e){t.className="columns medium-"+e},getButton:function(t,e,i){var s=this._super(t,e,i);return s.className=s.className.replace(/\s*small/g,"")+" tiny",s},getTabHolder:function(){var t=document.createElement("div");return t.innerHTML="<dl class='tabs vertical'></dl><div class='tabs-content vertical'></div>",t},getTab:function(t){var e=document.createElement("dd"),i=document.createElement("a");return i.setAttribute("href","#"),i.appendChild(t),e.appendChild(i),e},getTabContentHolder:function(t){return t.children[1]},getTabContent:function(){var t=document.createElement("div");return t.className="content active",t.style.paddingLeft="5px",t},markTabActive:function(t){t.className+=" active"},markTabInactive:function(t){t.className=t.className.replace(/\s*active/g,"")},addTab:function(t,e){t.children[0].appendChild(e)}}),n.defaults.themes.html=n.AbstractTheme.extend({getFormInputLabel:function(t,e){var i=this._super(t);return i.style.display="block",i.style.marginBottom="3px",i.style.fontWeight="bold",e&&(i.className+=" required"),i},getFormInputDescription:function(t){var e=this._super(t);return e.style.fontSize=".8em",e.style.margin=0,e.style.display="inline-block",e.style.fontStyle="italic",e},getIndentedPanel:function(){var t=this._super();return t.style.border="1px solid #ddd",t.style.padding="5px",t.style.margin="5px",t.style.borderRadius="3px",t},getChildEditorHolder:function(){var t=this._super();return t.style.marginBottom="8px",t},getHeaderButtonHolder:function(){var t=this.getButtonHolder();return t.style.display="inline-block",t.style.marginLeft="10px",t.style.fontSize=".8em",t.style.verticalAlign="middle",t},getTable:function(){var t=this._super();return t.style.borderBottom="1px solid #ccc",t.style.marginBottom="5px",t},addInputError:function(t,e){if(t.style.borderColor="red",t.errmsg)t.errmsg.style.display="block";else{var i=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",i.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))},removeInputError:function(t){t.style.borderColor="",t.errmsg&&(t.errmsg.style.display="none")},getProgressBar:function(){var t=100,e=0,i=document.createElement("progress");return i.setAttribute("max",t),i.setAttribute("value",e),i},updateProgressBar:function(t,e){t&&t.setAttribute("value",e)},updateProgressBarUnknown:function(t){t&&t.removeAttribute("value")}}),n.defaults.themes.jqueryui=n.AbstractTheme.extend({getTable:function(){var t=this._super();return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t},getTableHeaderCell:function(t){var e=this._super(t);return e.className="ui-state-active",e.style.fontWeight="bold",e},getTableCell:function(){var t=this._super();return t.className="ui-widget-content",t},getHeaderButtonHolder:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t},getFormInputDescription:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e},getFormControl:function(t,e,i){var s=this._super(t,e,i);return"checkbox"===e.type?(s.style.lineHeight="25px",s.style.padding="3px 0"):s.style.padding="4px 0 8px 0",s},getDescription:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",e.textContent=t,e},getButtonHolder:function(){var t=document.createElement("div");return t.className="ui-buttonset",t.style.fontSize=".7em",t},getFormInputLabel:function(t,e){var i=document.createElement("label");return i.style.fontWeight="bold",i.style.display="block",e&&(i.className+=" required"),i.textContent=t,i},getButton:function(t,e,i){var s=document.createElement("button");s.className="ui-button ui-widget ui-state-default ui-corner-all",e&&!t?(s.className+=" ui-button-icon-only",e.className+=" ui-button-icon-primary ui-icon-primary",s.appendChild(e)):e?(s.className+=" ui-button-text-icon-primary",e.className+=" ui-button-icon-primary ui-icon-primary",s.appendChild(e)):s.className+=" ui-button-text-only";var r=document.createElement("span");return r.className="ui-button-text",r.textContent=t||i||".",s.appendChild(r),s.setAttribute("title",i),s},setButtonText:function(t,e,i,s){t.innerHTML="",t.className="ui-button ui-widget ui-state-default ui-corner-all",i&&!e?(t.className+=" ui-button-icon-only",i.className+=" ui-button-icon-primary ui-icon-primary",t.appendChild(i)):i?(t.className+=" ui-button-text-icon-primary",i.className+=" ui-button-icon-primary ui-icon-primary",t.appendChild(i)):t.className+=" ui-button-text-only";var r=document.createElement("span");r.className="ui-button-text",r.textContent=e||s||".",t.appendChild(r),t.setAttribute("title",s)},getIndentedPanel:function(){var t=document.createElement("div");return t.className="ui-widget-content ui-corner-all",t.style.padding="1em 1.4em",t.style.marginBottom="20px",t},afterInputReady:function(t){t.controls||(t.controls=this.closest(t,".form-control"))},addInputError:function(t,e){t.controls&&(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.className="ui-state-error",t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e)},removeInputError:function(t){t.errmsg&&(t.errmsg.style.display="none")},markTabActive:function(t){t.className=t.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(t){t.className=t.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),n.AbstractIconLib=t.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:null},getIcon:function(t){var e=this.getIconClass(t);if(!e)return null;var i=document.createElement("i");return i.className=e,i}}),n.defaults.iconlibs.bootstrap2=n.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),n.defaults.iconlibs.bootstrap3=n.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),n.defaults.iconlibs.fontawesome3=n.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),n.defaults.iconlibs.fontawesome4=n.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),n.defaults.iconlibs.foundation2=n.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),n.defaults.iconlibs.foundation3=n.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),n.defaults.iconlibs.jqueryui=n.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),n.defaults.templates["default"]=function(){return{compile:function(t){var e=t.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),i=e&&e.length;if(!i)return function(){return t};for(var s=[],r=function(t){var i,r=e[t].replace(/[{}]+/g,"").trim().split("."),n=r.length;if(n>1){var o;i=function(e){for(o=e,t=0;n>t&&(o=o[r[t]]);t++);return o}}else r=r[0],i=function(t){return t[r]};s.push({s:e[t],r:i})},n=0;i>n;n++)r(n);return function(e){var r,o=t+"";for(n=0;i>n;n++)r=s[n],o=o.replace(r.s,r.r(e));return o}}}},n.defaults.templates.ejs=function(){return!!window.EJS&&{compile:function(t){var e=new window.EJS({text:t});return function(t){return e.render(t)}}}},n.defaults.templates.handlebars=function(){return window.Handlebars},n.defaults.templates.hogan=function(){return!!window.Hogan&&{compile:function(t){var e=window.Hogan.compile(t);return function(t){return e.render(t)}}}},n.defaults.templates.markup=function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(t){return function(e){return window.Mark.up(t,e)}}}},n.defaults.templates.mustache=function(){return!!window.Mustache&&{compile:function(t){return function(e){return window.Mustache.render(t,e)}}}},n.defaults.templates.swig=function(){return window.swig},n.defaults.templates.underscore=function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t,e)}}}},n.defaults.theme="html",n.defaults.template="default",n.defaults.options={},n.defaults.translate=function(t,e){var i=n.defaults.languages[n.defaults.language];if(!i)throw"Unknown language "+n.defaults.language;var s=i[t]||n.defaults.languages[n.defaults.default_language][t];if("undefined"==typeof s)throw"Unknown translate string "+t;if(e)for(var r=0;r<e.length;r++)s=s.replace(new RegExp("\\{\\{"+r+"}}","g"),e[r]);return s},n.defaults.default_language="en",n.defaults.language=n.defaults.default_language,n.defaults.languages.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the provided pattern",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_dependency:"Must have property {{0}}"},n.plugins={ace:{theme:""},epiceditor:{},sceditor:{},select2:{}};for(var a in n.defaults.editors)n.defaults.editors.hasOwnProperty(a)&&(n.defaults.editors[a].options=n.defaults.editors.options||{});n.defaults.resolvers.unshift(function(t){return"string"!=typeof t.type?"multiple":void 0}),n.defaults.resolvers.unshift(function(t){return!t.type&&t.properties?"object":void 0}),n.defaults.resolvers.unshift(function(t){return"string"==typeof t.type?t.type:void 0}),n.defaults.resolvers.unshift(function(t){return"boolean"===t.type?"checkbox"===t.format||t.options&&t.options.checkbox?"checkbox":"select":void 0; +}),n.defaults.resolvers.unshift(function(t){return"any"===t.type?"multiple":void 0}),n.defaults.resolvers.unshift(function(t){return"string"===t.type&&t.media&&"base64"===t.media.binaryEncoding?"base64":void 0}),n.defaults.resolvers.unshift(function(t){return"string"===t.type&&"url"===t.format&&t.options&&t.options.upload===!0&&window.FileReader?"upload":void 0}),n.defaults.resolvers.unshift(function(t){return"array"==t.type&&"table"==t.format?"table":void 0}),n.defaults.resolvers.unshift(function(t){return t.enumSource?"select":void 0}),n.defaults.resolvers.unshift(function(t){if(t["enum"]){if("array"===t.type||"object"===t.type)return"enum";if("number"===t.type||"integer"===t.type||"string"===t.type)return"select"}}),n.defaults.resolvers.unshift(function(t){return"array"===t.type&&t.items&&!Array.isArray(t.items)&&t.uniqueItems&&t.items["enum"]&&["string","number","integer"].indexOf(t.items.type)>=0?"multiselect":void 0}),n.defaults.resolvers.unshift(function(t){return t.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var t=window.jQuery||window.Zepto;t.jsoneditor=n.defaults,t.fn.jsoneditor=function(t){var e=this,i=this.data("jsoneditor");if("value"===t){if(!i)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return i.getValue();i.setValue(arguments[1])}else{if("validate"===t){if(!i)throw"Must initialize jsoneditor before validating";return arguments.length>1?i.validate(arguments[1]):i.validate()}"destroy"===t?i&&(i.destroy(),this.data("jsoneditor",null)):(i&&i.destroy(),i=new n(this.get(0),t),this.data("jsoneditor",i),i.on("change",function(){e.trigger("change")}),i.on("ready",function(){e.trigger("ready")}))}return this}}}(),window.JSONEditor=n}(); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/lodash.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/lodash.min.js new file mode 100644 index 00000000000..3625da8d552 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/lodash.min.js @@ -0,0 +1,2 @@ +(function(){function n(n,t){if(n!==t){var r=null===n,e=n===x,u=n===n,o=null===t,i=t===x,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n<t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return"function"==typeof n||!1}function u(n){return null==n?"":n+""}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function c(n){return Nn[n]}function a(n){return Tn[n]}function l(n,t,r){return t?n=Bn[n]:r&&(n=Dn[n]),"\\"+n}function s(n){return"\\"+Dn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&"object"==typeof n}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=P,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Pn[n]}function w(_){function Nn(n){if(h(n)&&!(Wo(n)||n instanceof zn)){if(n instanceof Pn)return n;if(eu.call(n,"__chain__")&&eu.call(n,"__wrapped__"))return qr(n)}return new Pn(n)}function Tn(){}function Pn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Cu,this.__views__=[]}function Bn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:wu(null),set:new hu};t--;)this.push(n[t])}function Mn(n,t){var r=n.data;return("string"==typeof t||de(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=De(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&!1!==t(n[r],r,n););return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function Zn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Xn(n,t){for(var r=-1,e=n.length,u=De(e);++r<e;)u[r]=t(n[r],r,n);return u}function Hn(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Qn(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function nt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function tt(n,t,r,e){return n!==x&&eu.call(e,r)?n:t}function rt(n,t,r){for(var e=-1,u=Ko(t),o=u.length;++e<o;){var i=u[e],f=n[i],c=r(f,t[i],i,n,t);(c===c?c===f:f!==f)&&(f!==x||i in n)||(n[i]=c)}return n}function et(n,t){return null==t?n:ot(t,Ko(t),n)}function ut(n,t){for(var r=-1,e=null==n,u=!e&&Sr(n),o=u?n.length:0,i=t.length,f=De(i);++r<i;){var c=t[r];f[r]=u?Ur(c,o)?n[c]:x:e?x:n[c]}return f}function ot(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function it(n,t,r){var e=typeof n;return"function"==e?t===x?n:Dt(n,t,r):null==n?Ne:"object"==e?At(n):t===x?Be(n):jt(n,t)}function ft(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==x)return f;if(!de(n))return n;if(e=Wo(n)){if(f=Ir(n),!t)return qn(n,f)}else{var c=ou.call(n),a=c==K;if(c!=Z&&c!=z&&(!a||u))return Ln[c]?Er(n,c,t):u?n:{};if(Gn(n))return u?n:{};if(f=Rr(a?{}:n),!t)return et(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Kn:gt)(n,function(e,u){f[u]=ft(e,t,r,u,n,o,i)}),f}function ct(n,t,r){if("function"!=typeof n)throw new Xe(T);return _u(function(){n.apply(x,r)},t)}function at(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=jr(),f=i===r,c=f&&t.length>=F&&wu&&hu?new Dn(t):null,a=t.length;c&&(i=Mn,f=!1,t=c);n:for(;++o<e;)if(c=n[o],f&&c===c){for(var l=a;l--;)if(t[l]===c)continue n;u.push(c)}else 0>i(t,c,0)&&u.push(c);return u}function lt(n,t){var r=!0;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,!1):void 0}),u}function _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];h(i)&&Sr(i)&&(r||Wo(i)||_e(i))?t?_t(i,t,r,e):Hn(e,i):r||(e[e.length]=i)}return e}function vt(n,t){return Du(n,t,Ee)}function gt(n,t){return Du(n,t,Ko)}function yt(n,t){return Mu(n,t,Ko)}function dt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];ye(n[i])&&(o[++u]=i)}return o}function wt(n,t,r){if(null!=n){n=Dr(n),r!==x&&r in n&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=Dr(n)[t[r++]];return r&&r==e?n:x}}function xt(n,t,r,e,u,o){if(n===t)return!0;if(null==n||null==t||!de(n)&&!h(t))return n!==n&&t!==t;n:{var i=xt,f=Wo(n),c=Wo(t),a=B,l=B;f||(a=ou.call(n),a==z?a=Z:a!=Z&&(f=je(n))),c||(l=ou.call(t),l==z?l=Z:l!=Z&&je(t));var s=a==Z&&!Gn(n),c=l==Z&&!Gn(t),l=a==l;if(!l||f||s){if(!e&&(a=s&&eu.call(n,"__wrapped__"),c=c&&eu.call(t,"__wrapped__"),a||c)){n=i(a?n.value():n,c?t.value():t,r,e,u,o);break n}if(l){for(u||(u=[]),o||(o=[]),a=u.length;a--;)if(u[a]==n){n=o[a]==t;break n}u.push(n),o.push(t),n=(f?wr:br)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=!1}else n=xr(n,t,a)}return n}function bt(n,t,r){var e=t.length,u=e,o=!r;if(null==n)return!u;for(n=Dr(n);e--;){var i=t[e];if(o&&i[2]?i[1]!==n[i[0]]:!(i[0]in n))return!1}for(;++e<u;){var i=t[e],f=i[0],c=n[f],a=i[1];if(o&&i[2]){if(c===x&&!(f in n))return!1}else if(i=r?r(c,a,f):x,i===x?!xt(a,c,r,!0):!i)return!1}return!0}function mt(n,t){var r=-1,e=Sr(n)?De(n.length):[];return zu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function At(n){var t=kr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null!=n&&(n=Dr(n),n[r]===e&&(e!==x||r in n))}}return function(n){return bt(n,t)}}function jt(n,t){var r=Wo(n),e=Wr(n)&&t===t&&!de(t),u=n+"";return n=Mr(n),function(o){if(null==o)return!1;var i=u;if(o=Dr(o),!(!r&&e||i in o)){if(o=1==n.length?o:wt(o,St(n,0,-1)),null==o)return!1;i=Gr(n),o=Dr(o)}return o[i]===t?t!==x||i in o:xt(t,o[i],x,!0)}}function kt(n,t,r,e,u){if(!de(n))return n;var o=Sr(t)&&(Wo(t)||je(t)),i=o?x:Ko(t);return Kn(i||t,function(f,c){if(i&&(c=f,f=t[c]),h(f)){e||(e=[]),u||(u=[]);n:{for(var a=c,l=e,s=u,p=l.length,_=t[a];p--;)if(l[p]==_){n[a]=s[p];break n}var p=n[a],v=r?r(p,_,a,n,t):x,g=v===x;g&&(v=_,Sr(_)&&(Wo(_)||je(_))?v=Wo(p)?p:Sr(p)?qn(p):[]:be(_)||_e(_)?v=_e(p)?Ie(p):be(p)?p:{}:g=!1),l.push(_),s.push(v),g?n[a]=kt(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[a]=v)}}else a=n[c],l=r?r(a,f,c,n,t):x,(s=l===x)&&(l=f),l===x&&(!o||c in n)||!s&&(l===l?l===a:a!==a)||(n[c]=l)}),n}function Ot(n){return function(t){return null==t?x:Dr(t)[n]}}function It(n){var t=n+"";return n=Mr(n),function(r){return wt(r,n,t)}}function Rt(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ur(e)){var u=e;vu.call(n,e,1)}}return n}function Et(n,t){return n+xu(Ru()*(t-n+1))}function Ct(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=!1,n):t(r,n,u,o)}),r}function St(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===x||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e<u;)r[e]=n[e+t];return r}function Ut(n,t){var r;return zu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function $t(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Wt(t,r,e){var u=mr(),o=-1;return r=Xn(r,function(n){return u(n)}),t=mt(t,function(n){return{a:Xn(r,function(t){return t(n)}),b:++o,c:n}}),$t(t,function(t,r){var u;n:{for(var o=-1,i=t.a,f=r.a,c=i.length,a=e.length;++o<c;)if(u=n(i[o],f[o])){if(o>=a)break n;o=e[o],u*="asc"===o||!0===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u===r,f=i&&o>=F,c=f&&wu&&hu?new Dn((void 0)):null,a=[];c?(u=Mn,i=!1):(f=!1,c=t?[]:a);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=c.length;p--;)if(c[p]===s)continue n;t&&c.push(s),a.push(l)}else 0>u(c,s,0)&&((t||f)&&c.push(s),a.push(l))}return a}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r<e;)u[r]=n[t[r]];return u}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?St(n,e?0:o,e?o+1:u):St(n,e?o+1:0,e?u:o)}function Pt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;)var o=t[e],r=o.func.apply(o.thisArg,Hn([r],o.args));return r}function zt(n,t,r){var e=0,u=n?n.length:e;if("number"==typeof t&&t===t&&u<=Uu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)&&null!==i?e=o+1:u=o}return u}return Bt(n,t,Ne,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===x;u<o;){var a=xu((u+o)/2),l=r(n[a]),s=l!==x,p=l===l;(i?p||e:f?p&&s&&(e||null!=l):c?p&&(e||s):null==l?0:e?l<=t:l<t)?u=a+1:o=a}return ku(o,Su)}function Dt(n,t,r){if("function"!=typeof n)return Ne;if(t===x)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Mt(n){var t=new cu(n.byteLength);return new gu(t).set(new gu(n)),t}function qt(n,t,r){for(var e=r.length,u=-1,o=ju(n.length-e,0),i=-1,f=t.length,c=De(f+o);++i<f;)c[i]=t[i];for(;++u<e;)c[r[u]]=n[u];for(;o--;)c[i++]=n[u++];return c}function Kt(n,t,r){for(var e=-1,u=r.length,o=-1,i=ju(n.length-u,0),f=-1,c=t.length,a=De(i+c);++o<i;)a[o]=n[o];for(i=o;++f<c;)a[i+f]=t[f];for(;++e<u;)a[i+r[e]]=n[o++];return a}function Vt(n,t){return function(r,e,u){var o=t?t():{};if(e=mr(e,u,3),Wo(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r)}}else zu(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function Zt(n){return pe(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u?r[u-2]:x,i=2<u?r[2]:x,f=1<u?r[u-1]:x;for("function"==typeof o?(o=Dt(o,f,5),u-=2):(o="function"==typeof f?f:x,u-=o?1:0),i&&$r(r[0],r[1],i)&&(o=3>u?x:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Yt(n,t){return function(r,e){var u=r?Vu(r):0;if(!Lr(u))return n(r,e);for(var o=t?u:-1,i=Dr(r);(t?o--:++o<u)&&!1!==e(i[o],o,i););return r}}function Gt(n){return function(t,r,e){var u=Dr(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){var f=e[i];if(!1===r(u[f],f,u))break}return t}}function Jt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments)}var e=Ht(n);return r}function Xt(n){return function(t){var r=-1;t=Fe(Ue(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Ht(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pu(n.prototype),t=n.apply(r,t);return de(t)?t:r}}function Qt(n){function t(r,e,u){return u&&$r(r,e,u)&&(e=x),r=dr(r,n,x,x,x,x,x,e),r.placeholder=t.placeholder,r}return t}function nr(n,t){return pe(function(r){var e=r[0];return null==e?e:(r.push(t),n.apply(x,r))})}function tr(n,t){return function(r,e,u){if(u&&$r(r,e,u)&&(e=x),e=mr(e,u,3),1==e.length){u=r=Wo(r)?r:Br(r);for(var o=e,i=-1,f=u.length,c=t,a=c;++i<f;){var l=u[i],s=+o(l);n(s,c)&&(c=s,a=l)}if(u=a,!r.length||u!==t)return u}return st(r,e,n,t)}}function rr(n,r){return function(e,u,o){return u=mr(u,o,3),Wo(e)?(u=t(e,u,r),-1<u?e[u]:x):ht(e,u,n)}}function er(n){return function(r,e,u){return r&&r.length?(e=mr(e,u,3),t(r,e,n)):-1}}function ur(n){return function(t,r,e){return r=mr(r,e,3),ht(t,r,n,!0)}}function or(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,o=De(r);n?e--:++e<r;){var i=o[u++]=arguments[e];if("function"!=typeof i)throw new Xe(T);!t&&Pn.prototype.thru&&"wrapper"==Ar(i)&&(t=new Pn([],(!0)))}for(e=t?-1:r;++e<r;){var i=o[e],u=Ar(i),f="wrapper"==u?Ku(i):x;t=f&&Fr(f[0])&&f[1]==(E|k|I|C)&&!f[4].length&&1==f[9]?t[Ar(f[0])].apply(t,f[3]):1==i.length&&Fr(i)?t[u]():t.thru(i)}return function(){var n=arguments,e=n[0];if(t&&1==n.length&&Wo(e)&&e.length>=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++u<r;)n=o[u].call(this,n);return n}}}function ir(n,t){return function(r,e,u){return"function"==typeof e&&u===x&&Wo(r)?n(r,e):t(r,Dt(e,u,3))}}function fr(n){return function(t,r,e){return("function"!=typeof r||e!==x)&&(r=Dt(r,e,3)),n(t,r,Ee)}}function cr(n){return function(t,r,e){return("function"!=typeof r||e!==x)&&(r=Dt(r,e,3)),n(t,r)}}function ar(n){return function(t,r,e){var u={};return r=mr(r,e,3),gt(t,function(t,e,o){o=r(t,e,o),e=n?o:e,t=n?t:o,u[e]=t}),u}}function lr(n){return function(t,r,e){return t=u(t),(n?t:"")+_r(t,r,e)+(n?"":t)}}function sr(n){var t=pe(function(r,e){var u=v(e,t.placeholder);return dr(r,n,x,e,u)});return t}function pr(n,t){return function(r,e,u,o){var i=3>arguments.length;return"function"==typeof e&&o===x&&Wo(r)?n(r,e,u,i):Ct(r,mr(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,c,a){function l(){for(var w=arguments.length,b=w,j=De(w);b--;)j[b]=arguments[b];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var b=l.placeholder,k=v(j,b),w=w-k.length;if(w<a){var O=f?qn(f):x,w=ju(a-w,0),E=_?k:x,k=_?x:k,C=_?j:x,j=_?x:j;return t|=_?I:R,t&=~(_?R:I),g||(t&=~(m|A)),j=[n,t,r,C,E,j,k,O,c,w],O=hr.apply(x,j),Fr(n)&&Zu(O,j),O.placeholder=b,O}}if(b=p?r:this,O=h?b[n]:n,f)for(w=j.length,E=ku(f.length,w),k=qn(j);E--;)C=f[E],j[E]=Ur(C,w)?k[C]:x;return s&&c<j.length&&(j.length=c),this&&this!==Yn&&this instanceof l&&(O=d||Ht(n)),O.apply(b,j)}var s=t&E,p=t&m,h=t&A,_=t&k,g=t&j,y=t&O,d=h?x:Ht(n);return l}function _r(n,t,r){return n=n.length,t=+t,n<t&&mu(t)?(t-=n,r=null==r?" ":r+"",$e(r,du(t/r.length)).slice(0,t)):""}function vr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,c=-1,a=e.length,l=De(a+f);++c<a;)l[c]=e[c];for(;f--;)l[c++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&m,i=Ht(n);return u}function gr(n){var t=Ve[n];return function(n,r){return(r=r===x?0:+r||0)?(r=su(10,r),t(n*r)/r):t(n)}}function yr(n){return function(t,r,e,u){var o=mr(e);return null==e&&o===it?zt(t,r,n):Bt(t,r,o(e,u,1),n)}}function dr(n,t,r,e,u,o,i,f){var c=t&A;if(!c&&"function"!=typeof n)throw new Xe(T);var a=e?e.length:0;if(a||(t&=~(I|R),e=u=x),a-=u?u.length:0,t&R){var l=e,s=u;e=u=x}var p=c?x:Ku(n);return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==E&&e==k||t==E&&e==C&&r[7].length<=p[8]||t==(E|C)&&e==k,(f<E||u)&&(t&m&&(r[2]=p[2],f|=e&m?0:j),(e=p[3])&&(u=r[3],r[3]=u?qt(u,e,p[4]):qn(e),r[4]=u?v(r[3],P):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Kt(u,e,p[6]):qn(e),r[6]=u?v(r[5],P):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&E&&(r[8]=null==r[8]?p[8]:ku(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),r[9]=null==f?c?0:n.length:ju(f-a,0)||0,n=t==m?Jt(r[0],r[2]):t!=I&&t!=(m|I)||r[4].length?hr.apply(x,r):vr.apply(x,r),(p?qu:Zu)(n,r)}function wr(n,t,r,e,u,o,i){var f=-1,c=n.length,a=t.length;if(c!=a&&(!u||a<=c))return!1;for(;++f<c;){var l=n[f],a=t[f],s=e?e(u?a:l,u?l:a,f):x;if(s!==x){if(s)continue;return!1}if(u){if(!nt(t,function(n){return l===n||r(l,n,e,u,o,i)}))return!1}else if(l!==a&&!r(l,a,e,u,o,i))return!1}return!0}function xr(n,t,r){switch(r){case D:case M:return+n==+t;case q:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:n==+t;case Y:case G:return n==t+""}return!1}function br(n,t,r,e,u,o,i){var f=Ko(n),c=f.length,a=Ko(t).length;if(c!=a&&!u)return!1;for(a=c;a--;){var l=f[a];if(!(u?l in t:eu.call(t,l)))return!1}for(var s=u;++a<c;){var l=f[a],p=n[l],h=t[l],_=e?e(u?h:p,u?p:h,l):x;if(_===x?!r(p,h,e,u,o,i):!_)return!1;s||(s="constructor"==l)}return!(!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!("function"==typeof r&&r instanceof r&&"function"==typeof e&&e instanceof e)))}function mr(n,t,r){var e=Nn.callback||Le,e=e===Le?it:e;return r?e(n,t,r):e}function Ar(n){for(var t=n.name+"",r=Fu[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function jr(n,t,e){var u=Nn.indexOf||Yr,u=u===Yr?r:u;return n?u(n,t,e):u}function kr(n){n=Ce(n);for(var t=n.length;t--;){var r,e=n[t];r=n[t][1],r=r===r&&!de(r),e[2]=r}return n}function Or(n,t){var r=null==n?x:n[t];return we(r)?r:x}function Ir(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&eu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Rr(n){return n=n.constructor,"function"==typeof n&&n instanceof n||(n=Ye),new n}function Er(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case D:case M:return new e((+n));case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return e instanceof e&&(e=Lu[t]),t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Y:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function Cr(n,t,r){return null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:wt(n,St(t,0,-1)),t=Gr(t)),t=null==n?n:n[t],null==t?x:t.apply(n,r)}function Sr(n){return null!=n&&Lr(Vu(n))}function Ur(n,t){return n="number"==typeof n||Rn.test(n)?+n:-1,t=null==t?$u:t,-1<n&&0==n%1&&n<t}function $r(n,t,r){if(!de(r))return!1;var e=typeof t;return!!("number"==e?Sr(r)&&Ur(t,r.length):"string"==e&&t in r)&&(t=r[t],n===n?n===t:t!==t)}function Wr(n,t){var r=typeof n;return!!("string"==r&&dn.test(n)||"number"==r)||!Wo(n)&&(!yn.test(n)||null!=t&&n in Dr(t))}function Fr(n){var t=Ar(n),r=Nn[t];return"function"==typeof r&&t in zn.prototype&&(n===r||(t=Ku(r),!!t&&n===t[0]))}function Lr(n){return"number"==typeof n&&-1<n&&0==n%1&&n<=$u}function Nr(n,t){return n===x?t:Fo(n,t,Nr)}function Tr(n,t){n=Dr(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Pr(n,t){var r={};return vt(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function zr(n){for(var t=Ee(n),r=t.length,e=r&&n.length,u=!!e&&Lr(e)&&(Wo(n)||_e(n)||Ae(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Ur(f,e)||eu.call(n,f))&&i.push(f)}return i}function Br(n){return null==n?[]:Sr(n)?Nn.support.unindexedChars&&Ae(n)?n.split(""):de(n)?n:Ye(n):Se(n)}function Dr(n){if(Nn.support.unindexedChars&&Ae(n)){for(var t=-1,r=n.length,e=Ye(n);++t<r;)e[t]=n.charAt(t);return e}return de(n)?n:Ye(n)}function Mr(n){if(Wo(n))return n;var t=[];return u(n).replace(wn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function qr(n){return n instanceof zn?n.clone():new Pn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Kr(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0>t?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:x}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if("number"==typeof e)e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),e<u&&(t===t?t===n[e]:n[e]!==n[e])?e:-1;return r(n,t,e||0)}function Gr(n){var t=n?n.length:0;return t?n[t-1]:x}function Jr(n){return Kr(n,1)}function Xr(n,t,e,u){if(!n||!n.length)return[];null!=t&&"boolean"!=typeof t&&(u=e,e=$r(n,t,u)?x:t,t=!1);var o=mr();if((null!=e||o!==it)&&(e=o(e,u,3)),t&&jr()===r){t=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e<u;){var c=n[e],a=t?t(c,e,n):c;e&&i===a||(i=a,f[++o]=c)}n=f}else n=Lt(n,e);return n}function Hr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Zn(n,function(n){return Sr(n)?(r=ju(n.length,r),!0):void 0});for(var e=De(r);++t<r;)e[t]=Xn(n,Ot(t));return e}function Qr(n,t,r){return n&&n.length?(n=Hr(n),null==t?n:(t=Dt(t,r,4),Xn(n,function(n){return Qn(n,t,x,!0)}))):[]}function ne(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Wo(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function te(n){return n=Nn(n),n.__chain__=!0,n}function re(n,t,r){return t.call(r,n)}function ee(n,t,r){var e=Wo(n)?Vn:lt;return r&&$r(n,t,r)&&(t=x),("function"!=typeof t||r!==x)&&(t=mr(t,r,3)),e(n,t)}function ue(n,t,r){var e=Wo(n)?Zn:pt;return t=mr(t,r,3),e(n,t)}function oe(n,t,r,e){var u=n?Vu(n):0;return Lr(u)||(n=Se(n),u=n.length),r="number"!=typeof r||e&&$r(t,r,e)?0:0>r?ju(u+r,0):r||0,"string"==typeof n||!Wo(n)&&Ae(n)?r<=u&&-1<n.indexOf(t,r):!!u&&-1<jr(n,t,r)}function ie(n,t,r){var e=Wo(n)?Xn:mt;return t=mr(t,r,3),e(n,t)}function fe(n,t,r){if(r?$r(n,t,r):null==t){n=Br(n);var e=n.length;return 0<e?n[Et(0,e-1)]:x}r=-1,n=Oe(n);var e=n.length,u=e-1;for(t=ku(0>t?0:+t||0,e);++r<t;){var e=Et(r,u),o=n[e];n[e]=n[r],n[r]=o}return n.length=t,n}function ce(n,t,r){var e=Wo(n)?nt:Ut;return r&&$r(n,t,r)&&(t=x),("function"!=typeof t||r!==x)&&(t=mr(t,r,3)),e(n,t)}function ae(n,t){var r;if("function"!=typeof t){if("function"!=typeof n)throw new Xe(T);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=x),r}}function le(n,t,r){function e(t,r){r&&au(r),c=p=h=x,t&&(_=xo(),a=n.apply(s,f),p||c||(f=s=x))}function u(){var n=t-(xo()-l);0>=n||n>t?e(h,c):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=xo(),s=this,h=g&&(p||!y),!1===v)var r=y&&!p;else{c||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(c&&(c=au(c)),_=l,a=n.apply(s,f)):c||(c=_u(o,e))}return i&&p?p=au(p):p||t===v||(p=_u(u,t)),r&&(i=!0,a=n.apply(s,f)),!i||p||c||(f=s=x),a}var f,c,a,l,s,p,h,_=0,v=!1,g=!0;if("function"!=typeof n)throw new Xe(T);if(t=0>t?0:+t||0,!0===r)var y=!0,g=!1;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&au(p),c&&au(c),_=0,c=p=h=x},i}function se(n,t){if("function"!=typeof n||t&&"function"!=typeof t)throw new Xe(T);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function pe(n,t){if("function"!=typeof n)throw new Xe(T);return t=ju(t===x?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=De(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function he(n,t){return n>t}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r="function"==typeof r?Dt(r,e,3):x)?r(n,t):x,e===x?xt(n,t,r):!!e}function ge(n){return h(n)&&"string"==typeof n.message&&ou.call(n)==q}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function we(n){return null!=n&&(ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n))}function xe(n){return"number"==typeof n||h(n)&&ou.call(n)==V}function be(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,"function"!=typeof t||t instanceof t)))return!1;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),!1}),!1!==r):(vt(n,function(n,t){r=t}),r===x||eu.call(n,r))}function me(n){return de(n)&&ou.call(n)==Y}function Ae(n){return"string"==typeof n||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return n<t}function Oe(n){var t=n?Vu(n):0;return Lr(t)?t?Nn.support.unindexedChars&&Ae(n)?n.split(""):qn(n):[]:Se(n)}function Ie(n){return ot(n,Ee(n))}function Re(n){return dt(n,Ee(n))}function Ee(n){if(null==n)return[];de(n)||(n=Ye(n));for(var t=n.length,r=Nn.support,t=t&&Lr(t)&&(Wo(n)||_e(n)||Ae(n))&&t||0,e=n.constructor,u=-1,e=ye(e)&&e.prototype||nu,o=e===n,i=De(t),f=0<t,c=r.enumErrorProps&&(n===Qe||n instanceof qe),a=r.enumPrototypes&&ye(n);++u<t;)i[u]=u+"";for(var l in n)a&&"prototype"==l||c&&("message"==l||"name"==l)||f&&Ur(l,t)||"constructor"==l&&(o||!eu.call(n,l))||i.push(l);if(r.nonEnumShadows&&n!==nu)for(t=n===tu?G:n===Qe?q:ou.call(n),r=Nu[t]||Nu[Z],t==Z&&(e=nu),t=Wn.length;t--;)l=Wn[t],u=r[l],o&&u||(u?!eu.call(n,l):n[l]===e[l])||i.push(l);return i}function Ce(n){n=Dr(n);for(var t=-1,r=Ko(n),e=r.length,u=De(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u}function Se(n){return Nt(n,Ko(n))}function Ue(n){return(n=u(n))&&n.replace(En,c).replace(mn,"")}function $e(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!mu(t))return r;do t%2&&(r+=n),t=xu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=x),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=x),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,!0))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):x;((u=u&&u.length?dt(t,u):x)?u.length:e)||(u=!1,r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=!0,e=-1,i=ye(n),f=u.length;!1===r?o=!1:de(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var c=t[r];n[r]=c,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return t.apply(n,Hn([this.value()],arguments))}}(c))}return n}function ze(){}function Be(n){return Wr(n)?Ot(n):It(n)}_=_?Jn.defaults(Yn.Object(),_,Jn.pick(Yn,$n)):Yn;var De=_.Array,Me=_.Date,qe=_.Error,Ke=_.Function,Ve=_.Math,Ze=_.Number,Ye=_.Object,Ge=_.RegExp,Je=_.String,Xe=_.TypeError,He=De.prototype,Qe=qe.prototype,nu=Ye.prototype,tu=Je.prototype,ru=Ke.prototype.toString,eu=nu.hasOwnProperty,uu=0,ou=nu.toString,iu=Yn._,fu=Ge("^"+ru.call(eu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),cu=_.ArrayBuffer,au=_.clearTimeout,lu=_.parseFloat,su=Ve.pow,pu=nu.propertyIsEnumerable,hu=Or(_,"Set"),_u=_.setTimeout,vu=He.splice,gu=_.Uint8Array,yu=Or(_,"WeakMap"),du=Ve.ceil,wu=Or(Ye,"create"),xu=Ve.floor,bu=Or(De,"isArray"),mu=_.isFinite,Au=Or(Ye,"keys"),ju=Ve.max,ku=Ve.min,Ou=Or(Me,"now"),Iu=_.parseInt,Ru=Ve.random,Eu=Ze.NEGATIVE_INFINITY,Cu=Ze.POSITIVE_INFINITY,Su=4294967294,Uu=2147483647,$u=9007199254740991,Wu=yu&&new yu,Fu={},Lu={};Lu[X]=_.Float32Array,Lu[H]=_.Float64Array,Lu[Q]=_.Int8Array,Lu[nn]=_.Int16Array,Lu[tn]=_.Int32Array,Lu[rn]=gu,Lu[en]=_.Uint8ClampedArray,Lu[un]=_.Uint16Array,Lu[on]=_.Uint32Array;var Nu={};Nu[B]=Nu[M]=Nu[V]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Nu[D]=Nu[G]={constructor:!0,toString:!0,valueOf:!0},Nu[q]=Nu[K]=Nu[Y]={constructor:!0,toString:!0},Nu[Z]={constructor:!0},Kn(Wn,function(n){for(var t in Nu)if(eu.call(Nu,t)){var r=Nu[t];r[n]=eu.call(r,n)}});var Tu=Nn.support={};!function(n){var t=function(){this.x=n},r={0:n,length:n},e=[];t.prototype={valueOf:n,y:n};for(var u in new t)e.push(u);Tu.enumErrorProps=pu.call(Qe,"message")||pu.call(Qe,"name"),Tu.enumPrototypes=pu.call(t,"prototype"),Tu.nonEnumShadows=!/valueOf/.test(e),Tu.ownLast="x"!=e[0],Tu.spliceObjects=(vu.call(r,0,1),!r[0]),Tu.unindexedChars="xx"!="x"[0]+Ye("x")[0]}(1,0),Nn.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:Nn}};var Pu=function(){function n(){}return function(t){if(de(t)){n.prototype=t;var r=new n;n.prototype=x}return r||{}}}(),zu=Yt(gt),Bu=Yt(yt,!0),Du=Gt(),Mu=Gt(!0),qu=Wu?function(n,t){return Wu.set(n,t),n}:Ne,Ku=Wu?function(n){return Wu.get(n)}:ze,Vu=Ot("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=xo(),o=W-(u-t);if(t=u,0<o){if(++n>=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?at(n,_t(t,!1,!0)):[]}),Gu=er(),Ju=er(!0),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o===r,f=[];e--;){var c=n[e]=Sr(c=n[e])?c:[];u[e]=i&&120<=c.length&&wu&&hu?new Dn(e&&c):null}var i=n[0],a=-1,l=i?i.length:0,s=u[0];n:for(;++a<l;)if(c=i[a],0>(s?Mn(s,c):o(f,c,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,c):o(n[e],c,0)))continue n}s&&s.push(c),f.push(c)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(!0),to=pe(function(n){return Lt(_t(n,!1,!0))}),ro=pe(function(n,t){return Sr(n)?at(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2<t?n[t-2]:x,e=1<t?n[t-1]:x;return 2<t&&"function"==typeof r?t-=2:(r=1<t&&"function"==typeof e?(--t,e):x,e=x),n.length=t,Qr(n,r,e)}),oo=pe(function(n){return n=_t(n),this.thru(function(t){t=Wo(t)?t:[Dr(t)];for(var r=n,e=-1,u=t.length,o=-1,i=r.length,f=De(u+i);++e<u;)f[e]=t[e];for(;++o<i;)f[e++]=r[o];return f})}),io=pe(function(n,t){return Sr(n)&&(n=Br(n)),ut(n,_t(t))}),fo=Vt(function(n,t,r){eu.call(n,r)?++n[r]:n[r]=1}),co=rr(zu),ao=rr(Bu,!0),lo=ir(Kn,zu),so=ir(function(n,t){for(var r=n.length;r--&&!1!==t(n[r],r,n););return n},Bu),po=Vt(function(n,t,r){eu.call(n,r)?n[r].push(t):n[r]=[t]}),ho=Vt(function(n,t,r){n[r]=t}),_o=pe(function(n,t,r){var e=-1,u="function"==typeof t,o=Wr(t),i=Sr(n)?De(n.length):[];return zu(n,function(n){var f=u?t:o&&null!=n?n[t]:x;i[++e]=f?f.apply(n,r):Cr(n,t,r)}),i}),vo=Vt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),go=pr(Qn,zu),yo=pr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Bu),wo=pe(function(n,t){if(null==n)return[];var r=t[2];return r&&$r(t[0],t[1],r)&&(t.length=1),Wt(n,_t(t),[])}),xo=Ou||function(){return(new Me).getTime()},bo=pe(function(n,t,r){var e=m;if(r.length)var u=v(r,bo.placeholder),e=e|I;return dr(n,e,t,r,u)}),mo=pe(function(n,t){t=t.length?_t(t):Re(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=dr(n[u],m,n)}return n}),Ao=pe(function(n,t,r){var e=m|A;if(r.length)var u=v(r,Ao.placeholder),e=e|I;return dr(t,e,n,r,u)}),jo=Qt(k),ko=Qt(O),Oo=pe(function(n,t){return ct(n,1,t)}),Io=pe(function(n,t,r){return ct(n,t,r)}),Ro=or(),Eo=or(!0),Co=pe(function(n,t){if(t=_t(t),"function"!=typeof n||!Vn(t,e))throw new Xe(T);var r=t.length;return pe(function(e){for(var u=ku(e.length,r);u--;)e[u]=t[u](e[u]);return n.apply(this,e)})}),So=sr(I),Uo=sr(R),$o=pe(function(n,t){return dr(n,C,x,x,x,_t(t))}),Wo=bu||function(n){return h(n)&&Lr(n.length)&&ou.call(n)==B},Fo=Zt(kt),Lo=Zt(function(n,t,r){return r?rt(n,t,r):et(n,t)}),No=nr(Lo,function(n,t){return n===x?t:n}),To=nr(Fo,Nr),Po=ur(gt),zo=ur(yt),Bo=fr(Du),Do=fr(Mu),Mo=cr(gt),qo=cr(yt),Ko=Au?function(n){var t=null==n?x:n.constructor;return"function"==typeof t&&t.prototype===n||("function"==typeof n?Nn.support.enumPrototypes:Sr(n))?zr(n):de(n)?Au(n):[]}:zr,Vo=ar(!0),Zo=ar(),Yo=pe(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Xn(_t(t),Je),Tr(n,at(Ee(n),t));var r=Dt(t[0],t[1],3);return Pr(n,function(n,t,e){return!r(n,t,e)})}),Go=pe(function(n,t){return null==n?{}:"function"==typeof t[0]?Pr(n,Dt(t[0],t[1],3)):Tr(n,_t(t))}),Jo=Xt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Xo=Xt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Ho=lr(),Qo=lr(!0),ni=Xt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),ti=Xt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),ri=pe(function(n,t){try{return n.apply(x,t)}catch(r){return ge(r)?r:new qe(r)}}),ei=pe(function(n,t){return function(r){return Cr(r,n,t)}}),ui=pe(function(n,t){return function(r){return Cr(n,r,t)}}),oi=gr("ceil"),ii=gr("floor"),fi=tr(he,Eu),ci=tr(ke,Cu),ai=gr("round");return Nn.prototype=Tn.prototype,Pn.prototype=Pu(Tn.prototype),Pn.prototype.constructor=Pn,zn.prototype=Pu(Tn.prototype),zn.prototype.constructor=zn,Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Bn.prototype.get=function(n){return"__proto__"==n?x:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&eu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;"string"==typeof n||de(n)?t.set.add(n):t.hash[n]=!0},se.Cache=Bn,Nn.after=function(n,t){if("function"!=typeof t){if("function"!=typeof n)throw new Xe(T);var r=n;n=t,t=r}return n=mu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=x),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,x,x,x,x,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ae,Nn.bind=bo,Nn.bindAll=mo, +Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(xu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));r<e;)o[++u]=St(n,r,r+=t);return o},Nn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},Nn.constant=function(n){return function(){return n}},Nn.countBy=fo,Nn.create=function(n,t,r){var e=Pu(n);return r&&$r(n,t,r)&&(t=x),t?et(e,t):e},Nn.curry=jo,Nn.curryRight=ko,Nn.debounce=le,Nn.defaults=No,Nn.defaultsDeep=To,Nn.defer=Oo,Nn.delay=Io,Nn.difference=Yu,Nn.drop=Kr,Nn.dropRight=Vr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Tt(n,mr(t,r,3),!0,!0):[]},Nn.dropWhile=function(n,t,r){return n&&n.length?Tt(n,mr(t,r,3),!0):[]},Nn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&"number"!=typeof r&&$r(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===x||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=ue,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&$r(n,t,r)&&(t=!1),e?_t(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?_t(n,!0):[]},Nn.flow=Ro,Nn.flowRight=Eo,Nn.forEach=lo,Nn.forEachRight=so,Nn.forIn=Bo,Nn.forInRight=Do,Nn.forOwn=Mo,Nn.forOwnRight=qo,Nn.functions=Re,Nn.groupBy=po,Nn.indexBy=ho,Nn.initial=function(n){return Vr(n,1)},Nn.intersection=Xu,Nn.invert=function(n,t,r){r&&$r(n,t,r)&&(t=x),r=-1;for(var e=Ko(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?eu.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},Nn.invoke=_o,Nn.keys=Ko,Nn.keysIn=Ee,Nn.map=ie,Nn.mapKeys=Vo,Nn.mapValues=Zo,Nn.matches=Te,Nn.matchesProperty=function(n,t){return jt(n,ft(t,!0))},Nn.memoize=se,Nn.merge=Fo,Nn.method=ei,Nn.methodOf=ui,Nn.mixin=Pe,Nn.modArgs=Co,Nn.negate=function(n){if("function"!=typeof n)throw new Xe(T);return function(){return!n.apply(this,arguments)}},Nn.omit=Yo,Nn.once=function(n){return ae(2,n)},Nn.pairs=Ce,Nn.partial=So,Nn.partialRight=Uo,Nn.partition=vo,Nn.pick=Go,Nn.pluck=function(n,t){return ie(n,Be(t))},Nn.property=Be,Nn.propertyOf=function(n){return function(t){return wt(n,Mr(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=jr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)vu.call(t,o,1);return t},Nn.pullAt=Hu,Nn.range=function(n,t,r){r&&$r(n,t,r)&&(t=r=x),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(du((t-n)/(r||1)),0);for(var u=De(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=$o,Nn.reject=function(n,t,r){var e=Wo(n)?Zn:pt;return t=mr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=mr(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return Rt(n,o),e},Nn.rest=Jr,Nn.restParam=pe,Nn.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Mr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];de(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Ur(t[e+1])?[]:{})),i=i[f]}return n},Nn.shuffle=function(n){return fe(n,Cu)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&"number"!=typeof r&&$r(n,t,r)&&(t=0,r=e),St(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&$r(n,t,r)&&(t=x);var e=-1;return t=mr(t,r,3),n=mt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),$t(n,f)},Nn.sortByAll=wo,Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&$r(t,r,e)&&(r=x),Wo(t)||(t=null==t?[]:[t]),Wo(r)||(r=null==r?[]:[r]),Wt(n,t,r))},Nn.spread=function(n){if("function"!=typeof n)throw new Xe(T);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,mr(t,r,3),!1,!0):[]},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,mr(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Xe(T);return!1===r?e=!1:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=xu(n),1>n||!mu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Nn.toArray=Oe,Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=mr(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:x)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,x,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Sr(r))var e=e?Hn(at(e,r),at(r,e)):r}return e?Lt(e):[]},Nn.zip=eo,Nn.zipObject=ne,Nn.zipWith=uo,Nn.backflow=Eo,Nn.collect=ie,Nn.compose=Eo,Nn.each=lo,Nn.eachRight=so,Nn.extend=Lo,Nn.iteratee=Le,Nn.methods=Re,Nn.object=ne,Nn.select=ue,Nn.tail=Jr,Nn.unique=Xr,Pe(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=ri,Nn.camelCase=Jo,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.ceil=oi,Nn.clone=function(n,t,r,e){return t&&"boolean"!=typeof t&&$r(n,t,r)?t=!1:"function"==typeof t&&(e=r,r=t,t=!1),"function"==typeof r?ft(n,t,Dt(r,e,3)):ft(n,t)},Nn.cloneDeep=function(n,t,r){return"function"==typeof t?ft(n,!0,Dt(t,r,3)):ft(n,!0)},Nn.deburr=Ue,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===x?e:ku(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,a):n},Nn.escapeRegExp=function(n){return(n=u(n))&&bn.test(n)?n.replace(xn,l):n||"(?:)"},Nn.every=ee,Nn.find=co,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=ao,Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return co(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?x:wt(n,Mr(t),t+""),n===x?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return!1;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:wt(n,St(t,0,-1)),null==n)return!1;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){return t=+t||0,r===x?(r=t,t=0):r=+r||0,n>=ku(t,r)&&n<ju(t,r)},Nn.isArguments=_e,Nn.isArray=Wo,Nn.isBoolean=function(n){return!0===n||!1===n||h(n)&&ou.call(n)==D},Nn.isDate=function(n){return h(n)&&ou.call(n)==M},Nn.isElement=function(n){return!!n&&1===n.nodeType&&h(n)&&!be(n)},Nn.isEmpty=function(n){return null==n||(Sr(n)&&(Wo(n)||Ae(n)||_e(n)||h(n)&&ye(n.splice))?!n.length:!Ko(n).length)},Nn.isEqual=ve,Nn.isError=ge,Nn.isFinite=function(n){return"number"==typeof n&&mu(n)},Nn.isFunction=ye,Nn.isMatch=function(n,t,r,e){return r="function"==typeof r?Dt(r,e,3):x,bt(n,kr(t),r)},Nn.isNaN=function(n){return xe(n)&&n!=+n},Nn.isNative=we,Nn.isNull=function(n){return null===n},Nn.isNumber=xe,Nn.isObject=de,Nn.isPlainObject=be,Nn.isRegExp=me,Nn.isString=Ae,Nn.isTypedArray=je,Nn.isUndefined=function(n){return n===x},Nn.kebabCase=Xo,Nn.last=Gr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if("number"==typeof r)u=(0>r?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,!0)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,!0);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ci,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=xo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&mu(t)?(e=(t-e)/2,t=xu(e),e=du(e),r=_r("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Ho,Nn.padRight=Qo,Nn.parseInt=function(n,t,r){return(r?$r(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Iu(n,t||(On.test(n)?16:10))},Nn.random=function(n,t,r){r&&$r(n,t,r)&&(t=r=x);var e=null==n,u=null==t;return null==r&&(u&&"boolean"==typeof n?(r=n,n=1):"boolean"==typeof t&&(r=t,u=!0)),e&&u&&(t=1,u=!1),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Ru(),ku(n+r*(t-n+lu("1e-"+((r+"").length-1))),t)):Et(n,t)},Nn.reduce=go,Nn.reduceRight=yo,Nn.repeat=$e,Nn.result=function(n,t,r){var e=null==n?x:Dr(n)[t];return e===x&&(null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:wt(n,St(t,0,-1)),e=null==n?x:Dr(n)[Gr(t)]),e=e===x?r:e),ye(e)?e.call(n):e},Nn.round=ai,Nn.runInContext=w,Nn.size=function(n){var t=n?Vu(n):0;return Lr(t)?t:Ko(n).length},Nn.snakeCase=ni,Nn.some=ce,Nn.sortedIndex=Qu,Nn.sortedLastIndex=no,Nn.startCase=ti,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:ku(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=x),t=mr(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=x),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt);var o,i,f=Ko(r),c=Nt(r,f),a=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,c){return e||(e=u),l+=n.slice(a,c).replace(Sn,s),r&&(o=!0,l+="'+__e("+r+")+'"),f&&(i=!0,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),a=c+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(cn,"$1").replace(an,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(x,c)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=x);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(me(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},Nn.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},Nn.uniqueId=function(n){var t=++uu;return u(n)+t},Nn.words=Fe,Nn.all=ee,Nn.any=ce,Nn.contains=oe,Nn.eq=ve,Nn.detect=co,Nn.foldl=go,Nn.foldr=yo,Nn.head=Zr,Nn.include=oe,Nn.inject=go,Pe(Nn,function(){var n={};return gt(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),!1),Nn.sample=fe,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return fe(t,n)}):fe(this.value())},Nn.VERSION=b,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Kn(["drop","take"],function(n,t){zn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new zn(this);r=null==r?1:ju(xu(r)||0,0);var u=this.clone();return e?u.__takeCount__=ku(u.__takeCount__,r):u.__views__.push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:mr(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=mr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0<n||0>t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==x&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu)},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){var t=e?[1]:arguments,o=this.__chain__,i=this.__wrapped__,f=!!this.__actions__.length,c=i instanceof zn,a=t[0],l=c||Wo(i);l&&r&&"function"==typeof a&&1!=a.length&&(c=l=!1);var s=function(n){return e&&o?u(n,1)[0]:u.apply(x,Hn([n],t))},a={func:re,args:[s],thisArg:x},f=c&&!f;return e&&!o?f?(i=i.clone(),i.__actions__.push(a),n.call(i)):u.call(x,this.value())[0]:!e&&l?(i=f?i:new zn(this),i=n.apply(i,t),i.__actions__.push(a),new Pn(i,o)):this.thru(s)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=!Tu.spliceObjects&&/^(?:pop|shift|splice)$/.test(n),u=/^(?:join|pop|replace|shift)$/.test(n),o=e?function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n}:t;Nn.prototype[n]=function(){var n=arguments;return u&&!this.__chain__?o.apply(this.value(),n):this[r](function(t){return o.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(x,A).name]=[{name:"wrapper",func:x}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,c=-1,a=f.length;++c<a;){var l=f[c],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":i-=s;break;case"take":i=ku(i,n+s);break;case"takeRight":n=ju(n,i-s)}}if(n={start:n,end:i},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=ku(n,this.__takeCount__),!e||o<F||o==n&&a==n)return Pt(t,this.__actions__);e=[];n:for(;n--&&c<a;){for(u+=r,o=-1,l=t[u];++o<f;){var p=i[o],s=p.type,p=p.iteratee(l);if(s==N)l=p;else if(!p){if(s==L)continue n;break n}}e[c++]=l}return e},Nn.prototype.chain=function(){return te(this)},Nn.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},Nn.prototype.concat=oo,Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Tn;){var e=qr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){var n=this.__wrapped__,t=function(n){return n.reverse()};return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),n=n.reverse(),n.__actions__.push({func:re,args:[t],thisArg:x}),new Pn(n,this.__chain__)):this.thru(t)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Pt(this.__wrapped__,this.__actions__)},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest,Nn}var x,b="3.10.1",m=1,A=2,j=4,k=8,O=16,I=32,R=64,E=128,C=256,S=30,U="...",$=150,W=16,F=200,L=1,N=2,T="Expected a function",P="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,cn=/\b(__p\+=)''\+/g,an=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,wn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,xn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,bn=RegExp(xn.source),mn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={};Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=!0,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=!1;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=!0,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=!1;var Nn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Tn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Pn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},zn={"function":!0,object:!0},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&"object"==typeof global&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return!1}}return function(n){return"function"!=typeof n.toString&&"string"==typeof(n+"")}}(),Jn=w();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Yn._=Jn,define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/marked.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/marked.js index c2a678d5504..c334bffeac7 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/marked.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/marked.js @@ -1,1272 +1 @@ -/** - * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked - */ - -;(function() { - -/** - * Block-Level Grammar - */ - -var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: noop, - hr: /^( *[-*_]){3,} *(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, - nptable: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, - def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, - table: noop, - paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, - text: /^[^\n]+/ -}; - -block.bullet = /(?:[*+-]|\d+\.)/; -block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; -block.item = replace(block.item, 'gm') - (/bull/g, block.bullet) - (); - -block.list = replace(block.list) - (/bull/g, block.bullet) - ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') - ('def', '\\n+(?=' + block.def.source + ')') - (); - -block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - -block._tag = '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' - + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' - + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; - -block.html = replace(block.html) - ('comment', /<!--[\s\S]*?-->/) - ('closed', /<(tag)[\s\S]+?<\/\1>/) - ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/) - (/tag/g, block._tag) - (); - -block.paragraph = replace(block.paragraph) - ('hr', block.hr) - ('heading', block.heading) - ('lheading', block.lheading) - ('blockquote', block.blockquote) - ('tag', '<' + block._tag) - ('def', block.def) - (); - -/** - * Normal Block Grammar - */ - -block.normal = merge({}, block); - -/** - * GFM Block Grammar - */ - -block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, - paragraph: /^/ -}); - -block.gfm.paragraph = replace(block.paragraph) - ('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - (); - -/** - * GFM + Tables Block Grammar - */ - -block.tables = merge({}, block.gfm, { - nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, - table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ -}); - -/** - * Block Lexer - */ - -function Lexer(options) { - this.tokens = []; - this.tokens.links = {}; - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } -} - -/** - * Expose Block Rules - */ - -Lexer.rules = block; - -/** - * Static Lex Method - */ - -Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); -}; - -/** - * Preprocessing - */ - -Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); -}; - -/** - * Lexing - */ - -Lexer.prototype.token = function(src, top, bq) { - var src = src.replace(/^ +$/gm, '') - , next - , loose - , cap - , bull - , b - , item - , space - , i - , l; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2], - text: cap[3] - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i].split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top, true); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - - this.tokens.push({ - type: 'list_start', - ordered: bull.length > 1 - }); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) +/, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (this.options.smartLists && i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull !== b && !(bull.length > 1 && b.length > 1)) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' - }); - - // Recurse. - this.token(item, false, bq); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', - text: cap[0] - }); - continue; - } - - // def - if ((!bq && top) && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.links[cap[1].toLowerCase()] = { - href: cap[2], - title: cap[3] - }; - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i] - .replace(/^ *\| *| *\| *$/g, '') - .split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; -}; - -/** - * Inline-Level Grammar - */ - -var inline = { - escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, - autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, - url: noop, - tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, - link: /^!?\[(inside)\]\(href\)/, - reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, - nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, - strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, - br: /^ {2,}\n(?!\s*$)/, - del: noop, - text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/ -}; - -inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/; -inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/; - -inline.link = replace(inline.link) - ('inside', inline._inside) - ('href', inline._href) - (); - -inline.reflink = replace(inline.reflink) - ('inside', inline._inside) - (); - -/** - * Normal Inline Grammar - */ - -inline.normal = merge({}, inline); - -/** - * Pedantic Inline Grammar - */ - -inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ -}); - -/** - * GFM Inline Grammar - */ - -inline.gfm = merge({}, inline.normal, { - escape: replace(inline.escape)('])', '~|])')(), - url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, - text: replace(inline.text) - (']|', '~]|') - ('|', '|https?://|') - () -}); - -/** - * GFM + Line Breaks Inline Grammar - */ - -inline.breaks = merge({}, inline.gfm, { - br: replace(inline.br)('{2,}', '*')(), - text: replace(inline.gfm.text)('{2,}', '*')() -}); - -/** - * Inline Lexer & Compiler - */ - -function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer; - this.renderer.options = this.options; - - if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); - } - - if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } else if (this.options.pedantic) { - this.rules = inline.pedantic; - } -} - -/** - * Expose Inline Rules - */ - -InlineLexer.rules = inline; - -/** - * Static Lexing/Compiling Method - */ - -InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); -}; - -/** - * Lexing/Compiling - */ - -InlineLexer.prototype.output = function(src) { - var out = '' - , link - , text - , href - , cap; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += cap[1]; - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = cap[1].charAt(6) === ':' - ? this.mangle(cap[1].substring(7)) - : this.mangle(cap[1]); - href = this.mangle('mailto:') + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - src = src.substring(cap[0].length); - text = escape(cap[1]); - href = text; - out += this.renderer.link(href, null, text); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^<a /i.test(cap[0])) { - this.inLink = true; - } else if (this.inLink && /^<\/a>/i.test(cap[0])) { - this.inLink = false; - } - src = src.substring(cap[0].length); - out += this.options.sanitize - ? escape(cap[0]) - : cap[0]; - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - src = src.substring(cap[0].length); - this.inLink = true; - out += this.outputLink(cap, { - href: cap[2], - title: cap[3] - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2], true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - out += escape(this.smartypants(cap[0])); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; -}; - -/** - * Compile Link - */ - -InlineLexer.prototype.outputLink = function(cap, link) { - var href = escape(link.href) - , title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); -}; - -/** - * Smartypants Transformations - */ - -InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/--/g, '\u2014') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); -}; - -/** - * Mangle Links - */ - -InlineLexer.prototype.mangle = function(text) { - var out = '' - , l = text.length - , i = 0 - , ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; -}; - -/** - * Renderer - */ - -function Renderer(options) { - this.options = options || {}; -} - -Renderer.prototype.code = function(code, lang, escaped) { - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '<pre><code>' - + (escaped ? code : escape(code, true)) - + '\n</code></pre>'; - } - - return '<pre><code class="' - + this.options.langPrefix - + escape(lang, true) - + '">' - + (escaped ? code : escape(code, true)) - + '\n</code></pre>\n'; -}; - -Renderer.prototype.blockquote = function(quote) { - return '<blockquote>\n' + quote + '</blockquote>\n'; -}; - -Renderer.prototype.html = function(html) { - return html; -}; - -Renderer.prototype.heading = function(text, level, raw) { - return '<h' - + level - + ' id="' - + this.options.headerPrefix - + raw.toLowerCase().replace(/[^\w]+/g, '-') - + '">' - + text - + '</h' - + level - + '>\n'; -}; - -Renderer.prototype.hr = function() { - return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; -}; - -Renderer.prototype.list = function(body, ordered) { - var type = ordered ? 'ol' : 'ul'; - return '<' + type + '>\n' + body + '</' + type + '>\n'; -}; - -Renderer.prototype.listitem = function(text) { - return '<li>' + text + '</li>\n'; -}; - -Renderer.prototype.paragraph = function(text) { - return '<p>' + text + '</p>\n'; -}; - -Renderer.prototype.table = function(header, body) { - return '<table>\n' - + '<thead>\n' - + header - + '</thead>\n' - + '<tbody>\n' - + body - + '</tbody>\n' - + '</table>\n'; -}; - -Renderer.prototype.tablerow = function(content) { - return '<tr>\n' + content + '</tr>\n'; -}; - -Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' style="text-align:' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '</' + type + '>\n'; -}; - -// span level renderer -Renderer.prototype.strong = function(text) { - return '<strong>' + text + '</strong>'; -}; - -Renderer.prototype.em = function(text) { - return '<em>' + text + '</em>'; -}; - -Renderer.prototype.codespan = function(text) { - return '<code>' + text + '</code>'; -}; - -Renderer.prototype.br = function() { - return this.options.xhtml ? '<br/>' : '<br>'; -}; - -Renderer.prototype.del = function(text) { - return '<del>' + text + '</del>'; -}; - -Renderer.prototype.link = function(href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0) { - return ''; - } - } - var out = '<a href="' + href + '"'; - if (title) { - out += ' title="' + title + '"'; - } - out += '>' + text + '</a>'; - return out; -}; - -Renderer.prototype.image = function(href, title, text) { - var out = '<img src="' + href + '" alt="' + text + '"'; - if (title) { - out += ' title="' + title + '"'; - } - out += this.options.xhtml ? '/>' : '>'; - return out; -}; - -/** - * Parsing & Compiling - */ - -function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer; - this.renderer = this.options.renderer; - this.renderer.options = this.options; -} - -/** - * Static Parse Method - */ - -Parser.parse = function(src, options, renderer) { - var parser = new Parser(options, renderer); - return parser.parse(src); -}; - -/** - * Parse Loop - */ - -Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options, this.renderer); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; -}; - -/** - * Next Token - */ - -Parser.prototype.next = function() { - return this.token = this.tokens.pop(); -}; - -/** - * Preview Next Token - */ - -Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; -}; - -/** - * Parse Text Tokens - */ - -Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); -}; - -/** - * Parse Current Token - */ - -Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - this.token.text); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '' - , body = '' - , i - , row - , cell - , flags - , j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - flags = { header: true, align: this.token.align[i] }; - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - var body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - var body = '' - , ordered = this.token.ordered; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered); - } - case 'list_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'loose_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - var html = !this.token.pre && !this.options.pedantic - ? this.inline.output(this.token.text) - : this.token.text; - return this.renderer.html(html); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - } -}; - -/** - * Helpers - */ - -function escape(html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;') - .replace(/</g, '&lt;') - .replace(/>/g, '&gt;') - .replace(/"/g, '&quot;') - .replace(/'/g, '&#39;'); -} - -function unescape(html) { - return html.replace(/&([#\w]+);/g, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); -} - -function replace(regex, opt) { - regex = regex.source; - opt = opt || ''; - return function self(name, val) { - if (!name) return new RegExp(regex, opt); - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return self; - }; -} - -function noop() {} -noop.exec = noop; - -function merge(obj) { - var i = 1 - , target - , key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; -} - - -/** - * Marked - */ - -function marked(src, opt, callback) { - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight - , tokens - , pending - , i = 0; - - try { - tokens = Lexer.lex(src, opt) - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/chjj/marked.'; - if ((opt || marked.defaults).silent) { - return '<p>An error occured:</p><pre>' - + escape(e.message + '', true) - + '</pre>'; - } - throw e; - } -} - -/** - * Options - */ - -marked.options = -marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; -}; - -marked.defaults = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - smartLists: false, - silent: false, - highlight: null, - langPrefix: 'lang-', - smartypants: false, - headerPrefix: '', - renderer: new Renderer, - xhtml: false -}; - -/** - * Expose - */ - -marked.Parser = Parser; -marked.parser = Parser.parse; - -marked.Renderer = Renderer; - -marked.Lexer = Lexer; -marked.lexer = Lexer.lex; - -marked.InlineLexer = InlineLexer; -marked.inlineLexer = InlineLexer.output; - -marked.parse = marked; - -if (typeof module !== 'undefined' && typeof exports === 'object') { - module.exports = marked; -} else if (typeof define === 'function' && define.amd) { - define(function() { return marked; }); -} else { - this.marked = marked; -} - -}).call(function() { - return this || (typeof window !== 'undefined' ? window : global); -}()); \ No newline at end of file +(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=u.breaks:this.rules=u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function i(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function a(t,n,i){if(i||"function"==typeof n){i||(i=n,n=null),n=h({},a.defaults,n||{});var l,o,p=n.highlight,u=0;try{l=e.lex(t,n)}catch(c){return i(c)}o=l.length;var g=function(e){if(e)return n.highlight=p,i(e);var t;try{t=r.parse(l,n)}catch(s){e=s}return n.highlight=p,e?i(e):i(null,t)};if(!p||p.length<3)return g();if(delete n.highlight,!o)return g();for(;u<l.length;u++)!function(e){return"code"!==e.type?--o||g():p(e.text,e.lang,function(t,n){return t?g(t):null==n||n===e.text?--o||g():(e.text=n,e.escaped=!0,void(--o||g()))})}(l[u])}else try{return n&&(n=h({},a.defaults,n)),r.parse(e.lex(t,n),n)}catch(c){if(c.message+="\nPlease report this to https://github.com/chjj/marked.",(n||a.defaults).silent)return"<p>An error occured:</p><pre>"+s(c.message+"",!0)+"</pre>";throw c}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u<h.align.length;u++)/^ *-+: *$/.test(h.align[u])?h.align[u]="right":/^ *:-+: *$/.test(h.align[u])?h.align[u]="center":/^ *:-+ *$/.test(h.align[u])?h.align[u]="left":h.align[u]=null;for(u=0;u<h.cells.length;u++)h.cells[u]=h.cells[u].split(/ *\| */);this.tokens.push(h)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;u<c;u++)h=i[u],a=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(a-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+a+"}","gm"),"")),this.options.smartLists&&u!==c-1&&(o=p.bullet.exec(i[u+1])[0],l===o||l.length>1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<h.align.length;u++)/^ *-+: *$/.test(h.align[u])?h.align[u]="right":/^ *:-+: *$/.test(h.align[u])?h.align[u]="center":/^ *:-+ *$/.test(h.align[u])?h.align[u]="left":h.align[u]=null;for(u=0;u<h.cells.length;u++)h.cells[u]=h.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(h)}else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var u={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};u._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,u._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=s(this.smartypants(i[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",r=e.length,s=0;s<r;s++)t=e.charCodeAt(s),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+s(t,!0)+'">'+(n?e:s(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:s(e,!0))+"\n</code></pre>"},n.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},n.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},n.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},n.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},n.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},n.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},n.prototype.strong=function(e){return"<strong>"+e+"</strong>"},n.prototype.em=function(e){return"<em>"+e+"</em>"},n.prototype.codespan=function(e){return"<code>"+e+"</code>"},n.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.prototype.del=function(e){return"<del>"+e+"</del>"},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(s){return""}if(0===r.indexOf("javascript:"))return""}var l='<a href="'+e+'"';return t&&(l+=' title="'+t+'"'),l+=">"+n+"</a>"},n.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",s=0;s<t.length;s++)n+=this.renderer.tablecell(this.inline.output(t[s]),{header:!1,align:this.token.align[s]});l+=this.renderer.tablerow(n)}return this.renderer.table(i,l);case"blockquote_start":for(var l="";"blockquote_end"!==this.next().type;)l+=this.tok();return this.renderer.blockquote(l);case"list_start":for(var l="",o=this.token.ordered;"list_end"!==this.next().type;)l+=this.tok();return this.renderer.list(l,o);case"list_item_start":for(var l="";"list_item_end"!==this.next().type;)l+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(l);case"loose_item_start":for(var l="";"list_item_end"!==this.next().type;)l+=this.tok();return this.renderer.listitem(l);case"html":var h=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(h);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},o.exec=o,a.options=a.setOptions=function(e){return h(a.defaults,e),a},a.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new n,xhtml:!1},a.Parser=r,a.parser=r.parse,a.Renderer=n,a.Lexer=e,a.lexer=e.lex,a.InlineLexer=t,a.inlineLexer=t.output,a.parse=a,"undefined"!=typeof module&&"object"==typeof exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):this.marked=a}).call(function(){return this||("undefined"!=typeof window?window:global)}()); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/object-assign-pollyfill.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/object-assign-pollyfill.js new file mode 100644 index 00000000000..b34d63c859d --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/object-assign-pollyfill.js @@ -0,0 +1 @@ +"function"!=typeof Object.assign&&!function(){Object.assign=function(n){"use strict";if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),o=1;o<arguments.length;o++){var r=arguments[o];if(void 0!==r&&null!==r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t}}(); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/sanitize-html.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/sanitize-html.min.js new file mode 100644 index 00000000000..ade25089a43 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/sanitize-html.min.js @@ -0,0 +1,4 @@ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.sanitizeHtml=t()}}(function(){return function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[o]={exports:{}};e[o][0].call(h.exports,function(t){var r=e[o][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){function n(t,e){t&&Object.keys(t).forEach(function(r){e(t[r],r)})}function i(t,e){return{}.hasOwnProperty.call(t,e)}function s(t,e,r){function h(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=d.length,this.text="",this.updateParentNodeText=function(){if(x.length){var t=x[x.length-1];t.text+=r.text}}}function l(t){return"string"!=typeof t&&(t+=""),t.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;")}function f(t,r){r=r.replace(/[\x00-\x20]+/g,""),r=r.replace(/<\!\-\-.*?\-\-\>/g,"");var n=r.match(/^([a-zA-Z]+)\:/);if(!n)return!1;var s=n[1].toLowerCase();return i(e.allowedSchemesByTag,t)?e.allowedSchemesByTag[t].indexOf(s)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(s)===-1}function p(t,e){return e?(t=t.split(/\s+/),t.filter(function(t){return e.indexOf(t)!==-1}).join(" ")):t}var d="";e?(e=a(s.defaults,e),e.parser?e.parser=a(u,e.parser):e.parser=u):(e=s.defaults,e.parser=u);var g,_,m=e.nonTextTags||["script","style","textarea"];e.allowedAttributes&&(g={},_={},n(e.allowedAttributes,function(t,e){g[e]=[];var r=[];t.forEach(function(t){t.indexOf("*")>=0?r.push(c(t).replace(/\\\*/g,".*")):g[e].push(t)}),_[e]=new RegExp("^("+r.join("|")+")$")}));var b={};n(e.allowedClasses,function(t,e){g&&(i(g,e)||(g[e]=[]),g[e].push("class")),b[e]=t});var y,v={};n(e.transformTags,function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=s.simpleTransform(t)),"*"===e?y=r:v[e]=r});var w=0,x=[],S={},E={},T=!1,A=0,k=new o.Parser({onopentag:function(t,r){if(T)return void A++;var s=new h(t,r);x.push(s);var o,a=!1,c=!!s.text;i(v,t)&&(o=v[t](t,r),s.attribs=r=o.attribs,void 0!==o.text&&(s.innerText=o.text),t!==o.tagName&&(s.name=t=o.tagName,E[w]=o.tagName)),y&&(o=y(t,r),s.attribs=r=o.attribs,t!==o.tagName&&(s.name=t=o.tagName,E[w]=o.tagName)),e.allowedTags&&e.allowedTags.indexOf(t)===-1&&(a=!0,m.indexOf(t)!==-1&&(T=!0,A=1),S[w]=!0),w++,a||(d+="<"+t,(!g||i(g,t)||g["*"])&&n(r,function(e,r){if(!g||i(g,t)&&g[t].indexOf(r)!==-1||g["*"]&&g["*"].indexOf(r)!==-1||i(_,t)&&_[t].test(r)||_["*"]&&_["*"].test(r)){if(("href"===r||"src"===r)&&f(t,e))return void delete s.attribs[r];if("class"===r&&(e=p(e,b[t]),!e.length))return void delete s.attribs[r];d+=" "+r,e.length&&(d+='="'+l(e)+'"')}else delete s.attribs[r]}),e.selfClosing.indexOf(t)!==-1?d+=" />":(d+=">",!s.innerText||c||e.textFilter||(d+=s.innerText)))},ontext:function(t){if(!T){var r,n=x[x.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"script"===r||"style"===r)d+=t;else{var i=l(t);d+=e.textFilter?e.textFilter(i):i}if(x.length){var s=x[x.length-1];s.text+=t}}},onclosetag:function(t){if(T){if(A--,A)return;T=!1}var r=x.pop();if(r){if(T=!1,w--,S[w])return delete S[w],void r.updateParentNodeText();if(E[w]&&(t=E[w],delete E[w]),e.exclusiveFilter&&e.exclusiveFilter(r))return void(d=d.substr(0,r.tagPosition));r.updateParentNodeText(),e.selfClosing.indexOf(t)===-1&&(d+="</"+t+">")}}},e.parser);return k.write(t),k.end(),d}var o=t("htmlparser2"),a=t("xtend"),c=t("regexp-quote");e.exports=s;var u={decodeEntities:!0};s.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}},s.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var s;if(r)for(s in e)i[s]=e[s];else i=e;return{tagName:t,attribs:i}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(t,e,r){"use strict";function n(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)c[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function i(t){var e,r,n,i,s,o,a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===t[a-2]?2:"="===t[a-1]?1:0,o=new h(3*a/4-s),n=s>0?a-4:a;var c=0;for(e=0,r=0;e<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===s?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,o[c++]=255&i):1===s&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}function s(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function o(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(s(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",s=[],a=16383,u=0,h=r-n;u<h;u+=a)s.push(o(t,u,u+a>h?h:u+a));return 1===n?(e=t[r-1],i+=c[e>>2],i+=c[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=c[e>>10],i+=c[e>>4&63],i+=c[e<<2&63],i+="="),s.push(i),s.join("")}r.toByteArray=i,r.fromByteArray=a;var c=[],u=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},{}],3:[function(t,e,r){},{}],4:[function(t,e,r){(function(e){"use strict";var n=t("buffer"),i=n.Buffer,s=n.SlowBuffer,o=n.kMaxLength||2147483647;r.alloc=function(t,e,r){if("function"==typeof i.alloc)return i.alloc(t,e,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof t)throw new TypeError("size must be a number");if(t>o)throw new RangeError("size is too large");var n=r,s=e;void 0===s&&(n=void 0,s=0);var a=new i(t);if("string"==typeof s)for(var c=new i(s,n),u=c.length,h=-1;++h<t;)a[h]=c[h%u];else a.fill(s);return a},r.allocUnsafe=function(t){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(t);if("number"!=typeof t)throw new TypeError("size must be a number");if(t>o)throw new RangeError("size is too large");return new i(t)},r.from=function(t,r,n){if("function"==typeof i.from&&(!e.Uint8Array||Uint8Array.from!==i.from))return i.from(t,r,n);if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("string"==typeof t)return new i(t,r);if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer){var s=r;if(1===arguments.length)return new i(t);"undefined"==typeof s&&(s=0);var o=n;if("undefined"==typeof o&&(o=t.byteLength-s),s>=t.byteLength)throw new RangeError("'offset' is out of bounds");if(o>t.byteLength-s)throw new RangeError("'length' is out of bounds");return new i(t.slice(s,s+o))}if(i.isBuffer(t)){var a=new i(t.length);return t.copy(a,0,0,t.length),a}if(t){if(Array.isArray(t)||"undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return new i(t);if("Buffer"===t.type&&Array.isArray(t.data))return new i(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(t){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(t);if("number"!=typeof t)throw new TypeError("size must be a number");if(t>=o)throw new RangeError("size is too large");return new s(t)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:5}],5:[function(t,e,r){(function(e){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,r){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return a(this,t,e,r)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?l(t,e,r):d(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,r,n){return c(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}function h(t,e){if(c(e),t=s(t,e<0?0:0|g(e)),!o.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!o.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|m(e,r);t=s(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function f(t,e){var r=e.length<0?0:0|g(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),o.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=o.prototype):t=f(t,e),t}function d(t,e){if(o.isBuffer(e)){var r=0|g(e.length);return t=s(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||J(e.length)?s(t,0):f(t,e);if("Buffer"===e.type&&$(e.data))return f(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function _(t){return+t!=t&&(t=0),o.alloc(+t)}function m(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function b(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return q(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return L(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e=255&e,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function s(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,a=t.length,c=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,c/=2,r/=2}var u;if(i){var h=-1;for(u=r;u<a;u++)if(s(t,u)===s(e,h===-1?0:u-h)){if(h===-1&&(h=u),u-h+1===c)return h*o}else h!==-1&&(u-=u-h),h=-1}else for(r+c>a&&(r=a-c),u=r;u>=0;u--){for(var l=!0,f=0;f<c;f++)if(s(t,u+f)!==s(e,f)){l=!1;break}if(l)return u}return-1}function x(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[r+o]=a}return o}function S(t,e,r,n){return Q(F(e,t.length-r),t,r,n)}function E(t,e,r,n){return Q(G(e),t,r,n)}function T(t,e,r,n){return E(t,e,r,n)}function A(t,e,r,n){return Q(X(e),t,r,n)}function k(t,e,r,n){return Q(W(e,t.length-r),t,r,n)}function L(t,e,r){return 0===e&&r===t.length?Z.fromByteArray(t):Z.fromByteArray(t.slice(e,r))}function q(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){var c,u,h,l;switch(a){case 1:s<128&&(o=s);break;case 2:c=t[i+1],128===(192&c)&&(l=(31&s)<<6|63&c,l>127&&(o=l));break;case 3:c=t[i+1],u=t[i+2],128===(192&c)&&128===(192&u)&&(l=(15&s)<<12|(63&c)<<6|63&u,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:c=t[i+1],u=t[i+2],h=t[i+3],128===(192&c)&&128===(192&u)&&128===(192&h)&&(l=(15&s)<<18|(63&c)<<12|(63&u)<<6|63&h,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return R(n)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=Y(t[s]);return i}function j(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function N(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,s){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function M(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i<s;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function I(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i<s;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function P(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||P(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,i){return i||P(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function V(t){if(t=z(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function G(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function W(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function X(t){return Z.toByteArray(V(t))}function Q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var Z=t("base64-js"),K=t("ieee754"),$=t("isarray");r.Buffer=o,r.SlowBuffer=_,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return u(null,t,e,r)},o.allocUnsafe=function(t){return h(null,t)},o.allocUnsafeSlow=function(t){return h(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!$(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=o.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=m,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?q(this,0,t):b.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var s=i-n,a=r-e,c=Math.min(s,a),u=this.slice(n,i),h=t.slice(e,r),l=0;l<c;++l)if(u[l]!==h[l]){s=u[l],a=h[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},o.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},o.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},o.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return T(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=o.prototype;else{var i=e-t;n=new o(i,(void 0));for(var s=0;s<i;++s)n[s]=this[s+t]}return n},o.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||N(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},o.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||N(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||N(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},o.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},o.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),K.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),K.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),K.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),K.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;O(this,t,e,r,i,0)}var s=1,o=0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=t/s&255;return e+r},o.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;O(this,t,e,r,i,0)}var s=r-1,o=1;for(this[e+s]=255&t;--s>=0&&(o*=256);)this[e+s]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,s=n-r;if(this===t&&r<e&&e<n)for(i=s-1;i>=0;--i)t[i+e]=this[i+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},o.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t=255&t);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var s;if("number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var a=o.isBuffer(t)?t:F(new o(t,n).toString()),c=a.length;for(s=0;s<r-e;++s)this[s+e]=a[s%c]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(t,e,r){(function(t){function e(t){return Array.isArray?Array.isArray(t):"[object Array]"===_(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function s(t){return null==t}function o(t){return"number"==typeof t}function a(t){return"string"==typeof t}function c(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===_(t)}function l(t){return"object"==typeof t&&null!==t}function f(t){return"[object Date]"===_(t)}function p(t){return"[object Error]"===_(t)||t instanceof Error}function d(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function _(t){return Object.prototype.toString.call(t)}r.isArray=e,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=s,r.isNumber=o,r.isString=a,r.isSymbol=c,r.isUndefined=u,r.isRegExp=h,r.isObject=l,r.isDate=f,r.isError=p,r.isFunction=d,r.isPrimitive=g,r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(t,e,r){function n(t,e){if(t){var r,n="";for(var i in t)r=t[i],n&&(n+=" "),n+=!r&&l[i]?i:i+'="'+(e.decodeEntities?h.encodeXML(r):r)+'"';return n}}function i(t,e){"svg"===t.name&&(e={decodeEntities:e.decodeEntities,xmlMode:!0});var r="<"+t.name,i=n(t.attribs,e);return i&&(r+=" "+i),!e.xmlMode||t.children&&0!==t.children.length?(r+=">",t.children&&(r+=d(t.children,e)),p[t.name]&&!e.xmlMode||(r+="</"+t.name+">")):r+="/>",r}function s(t){return"<"+t.data+">"}function o(t,e){var r=t.data||"";return!e.decodeEntities||t.parent&&t.parent.name in f||(r=h.encodeXML(r)),r}function a(t){return"<![CDATA["+t.children[0].data+"]]>"}function c(t){return"<!--"+t.data+"-->"}var u=t("domelementtype"),h=t("entities"),l={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},p={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=e.exports=function(t,e){Array.isArray(t)||t.cheerio||(t=[t]),e=e||{};for(var r="",n=0;n<t.length;n++){var h=t[n];r+="root"===h.type?d(h.children,e):u.isTag(h)?i(h,e):h.type===u.Directive?s(h):h.type===u.Comment?c(h):h.type===u.CDATA?a(h):o(h,e)}return r}},{domelementtype:8,entities:20}],8:[function(t,e,r){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},{}],9:[function(t,e,r){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(t){return"tag"===t.type||"script"===t.type||"style"===t.type}}},{}],10:[function(t,e,r){function n(t,e,r){"object"==typeof t?(r=e,e=t,t=null):"function"==typeof e&&(r=e,e=c),this._callback=t,this._options=e||c,this._elementCB=r,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=t("domelementtype"),s=/\s+/g,o=t("./lib/node"),a=t("./lib/element"),c={normalizeWhitespace:!1,withStartIndices:!1};n.prototype.onparserinit=function(t){this._parser=t},n.prototype.onreset=function(){n.call(this,this._callback,this._options,this._elementCB)},n.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},n.prototype._handleCallback=n.prototype.onerror=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},n.prototype.onclosetag=function(){var t=this._tagStack.pop();this._elementCB&&this._elementCB(t)},n.prototype._addDomElement=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1]; +t.next=null,this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(t.__proto__="tag"===t.type?a:o),n?(t.prev=n,n.next=t):t.prev=null,r.push(t),t.parent=e||null},n.prototype.onopentag=function(t,e){var r={type:"script"===t?i.Script:"style"===t?i.Style:i.Tag,name:t,attribs:e,children:[]};this._addDomElement(r),this._tagStack.push(r)},n.prototype.ontext=function(t){var e,r=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(e=this.dom[this.dom.length-1]).type===i.Text?r?e.data=(e.data+t).replace(s," "):e.data+=t:this._tagStack.length&&(e=this._tagStack[this._tagStack.length-1])&&(e=e.children[e.children.length-1])&&e.type===i.Text?r?e.data=(e.data+t).replace(s," "):e.data+=t:(r&&(t=t.replace(s," ")),this._addDomElement({data:t,type:i.Text}))},n.prototype.oncomment=function(t){var e=this._tagStack[this._tagStack.length-1];if(e&&e.type===i.Comment)return void(e.data+=t);var r={data:t,type:i.Comment};this._addDomElement(r),this._tagStack.push(r)},n.prototype.oncdatastart=function(){var t={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(t),this._tagStack.push(t)},n.prototype.oncommentend=n.prototype.oncdataend=function(){this._tagStack.pop()},n.prototype.onprocessinginstruction=function(t,e){this._addDomElement({name:t,data:e,type:i.Directive})},e.exports=n},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(t,e,r){var n=t("./node"),i=e.exports=Object.create(n),s={tagName:"name"};Object.keys(s).forEach(function(t){var e=s[t];Object.defineProperty(i,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},{"./node":12}],12:[function(t,e,r){var n=e.exports={get firstChild(){var t=this.children;return t&&t[0]||null},get lastChild(){var t=this.children;return t&&t[t.length-1]||null},get nodeType(){return s[this.type]||s.element}},i={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},s={element:1,text:3,cdata:4,comment:8};Object.keys(i).forEach(function(t){var e=i[t];Object.defineProperty(n,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})})},{}],13:[function(t,e,r){var n=e.exports;[t("./lib/stringify"),t("./lib/traversal"),t("./lib/manipulation"),t("./lib/querying"),t("./lib/legacy"),t("./lib/helpers")].forEach(function(t){Object.keys(t).forEach(function(e){n[e]=t[e].bind(n)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(t,e,r){r.removeSubsets=function(t){for(var e,r,n,i=t.length;--i>-1;){for(e=r=t[i],t[i]=null,n=!0;r;){if(t.indexOf(r)>-1){n=!1,t.splice(i,1);break}r=r.parent}n&&(t[i]=e)}return t};var n={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},i=r.compareDocumentPosition=function(t,e){var r,i,s,o,a,c,u=[],h=[];if(t===e)return 0;for(r=t;r;)u.unshift(r),r=r.parent;for(r=e;r;)h.unshift(r),r=r.parent;for(c=0;u[c]===h[c];)c++;return 0===c?n.DISCONNECTED:(i=u[c-1],s=i.children,o=u[c],a=h[c],s.indexOf(o)>s.indexOf(a)?i===e?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:i===t?n.PRECEDING|n.CONTAINS:n.PRECEDING)};r.uniqueSort=function(t){var e,r,s=t.length;for(t=t.slice();--s>-1;)e=t[s],r=t.indexOf(e),r>-1&&r<s&&t.splice(s,1);return t.sort(function(t,e){var r=i(t,e);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0}),t}},{}],15:[function(t,e,r){function n(t,e){return"function"==typeof e?function(r){return r.attribs&&e(r.attribs[t])}:function(r){return r.attribs&&r.attribs[t]===e}}function i(t,e){return function(r){return t(r)||e(r)}}var s=t("domelementtype"),o=r.isTag=s.isTag;r.testElement=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){if("tag_name"===r){if(!o(e)||!t.tag_name(e.name))return!1}else if("tag_type"===r){if(!t.tag_type(e.type))return!1}else if("tag_contains"===r){if(o(e)||!t.tag_contains(e.data))return!1}else if(!e.attribs||!t[r](e.attribs[r]))return!1}else;return!0};var a={tag_name:function(t){return"function"==typeof t?function(e){return o(e)&&t(e.name)}:"*"===t?o:function(e){return o(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return!o(e)&&t(e.data)}:function(e){return!o(e)&&e.data===t}}};r.getElements=function(t,e,r,s){var o=Object.keys(t).map(function(e){var r=t[e];return e in a?a[e](r):n(e,r)});return 0===o.length?[]:this.filter(o.reduce(i),e,r,s)},r.getElementById=function(t,e,r){return Array.isArray(e)||(e=[e]),this.findOne(n("id",t),e,r!==!1)},r.getElementsByTagName=function(t,e,r,n){return this.filter(a.tag_name(t),e,r,n)},r.getElementsByTagType=function(t,e,r,n){return this.filter(a.tag_type(t),e,r,n)}},{domelementtype:9}],16:[function(t,e,r){r.removeElement=function(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}},r.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var s=i.children;s[s.lastIndexOf(t)]=e}},r.appendChild=function(t,e){if(e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},r.append=function(t,e){var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(n),0,e)}}else r&&r.children.push(e)},r.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},{}],17:[function(t,e,r){function n(t,e,r,n){return Array.isArray(e)||(e=[e]),"number"==typeof n&&isFinite(n)||(n=1/0),i(t,e,r!==!1,n)}function i(t,e,r,n){for(var s,o=[],a=0,c=e.length;a<c&&!(t(e[a])&&(o.push(e[a]),--n<=0))&&(s=e[a].children,!(r&&s&&s.length>0&&(s=i(t,s,r,n),o=o.concat(s),n-=s.length,n<=0)));a++);return o}function s(t,e){for(var r=0,n=e.length;r<n;r++)if(t(e[r]))return e[r];return null}function o(t,e){for(var r=null,n=0,i=e.length;n<i&&!r;n++)u(e[n])&&(t(e[n])?r=e[n]:e[n].children.length>0&&(r=o(t,e[n].children)));return r}function a(t,e){for(var r=0,n=e.length;r<n;r++)if(u(e[r])&&(t(e[r])||e[r].children.length>0&&a(t,e[r].children)))return!0;return!1}function c(t,e){for(var r=[],n=0,i=e.length;n<i;n++)u(e[n])&&(t(e[n])&&r.push(e[n]),e[n].children.length>0&&(r=r.concat(c(t,e[n].children))));return r}var u=t("domelementtype").isTag;e.exports={filter:n,find:i,findOneChild:s,findOne:o,existsOne:a,findAll:c}},{domelementtype:9}],18:[function(t,e,r){function n(t,e){return t.children?t.children.map(function(t){return o(t,e)}).join(""):""}function i(t){return Array.isArray(t)?t.map(i).join(""):a(t)||t.type===s.CDATA?i(t.children):t.type===s.Text?t.data:""}var s=t("domelementtype"),o=t("dom-serializer"),a=s.isTag;e.exports={getInnerHTML:n,getOuterHTML:o,getText:i}},{"dom-serializer":7,domelementtype:9}],19:[function(t,e,r){var n=r.getChildren=function(t){return t.children},i=r.getParent=function(t){return t.parent};r.getSiblings=function(t){var e=i(t);return e?n(e):[t]},r.getAttributeValue=function(t,e){return t.attribs&&t.attribs[e]},r.hasAttrib=function(t,e){return!!t.attribs&&hasOwnProperty.call(t.attribs,e)},r.getName=function(t){return t.name}},{}],20:[function(t,e,r){var n=t("./lib/encode.js"),i=t("./lib/decode.js");r.decode=function(t,e){return(!e||e<=0?i.XML:i.HTML)(t)},r.decodeStrict=function(t,e){return(!e||e<=0?i.XML:i.HTMLStrict)(t)},r.encode=function(t,e){return(!e||e<=0?n.XML:n.HTML)(t)},r.encodeXML=n.XML,r.encodeHTML4=r.encodeHTML5=r.encodeHTML=n.HTML,r.decodeXML=r.decodeXMLStrict=i.XML,r.decodeHTML4=r.decodeHTML5=r.decodeHTML=i.HTML,r.decodeHTML4Strict=r.decodeHTML5Strict=r.decodeHTMLStrict=i.HTMLStrict,r.escape=n.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(t,e,r){function n(t){var e=Object.keys(t).join("|"),r=s(t);e+="|#[xX][\\da-fA-F]+|#\\d+";var n=new RegExp("&(?:"+e+");","g");return function(t){return String(t).replace(n,r)}}function i(t,e){return t<e?1:-1}function s(t){return function(e){return"#"===e.charAt(1)?u("X"===e.charAt(2)||"x"===e.charAt(2)?parseInt(e.substr(3),16):parseInt(e.substr(2),10)):t[e.slice(1,-1)]}}var o=t("../maps/entities.json"),a=t("../maps/legacy.json"),c=t("../maps/xml.json"),u=t("./decode_codepoint.js"),h=n(c),l=n(o),f=function(){function t(t){return";"!==t.substr(-1)&&(t+=";"),h(t)}for(var e=Object.keys(a).sort(i),r=Object.keys(o).sort(i),n=0,c=0;n<r.length;n++)e[c]===r[n]?(r[n]+=";?",c++):r[n]+=";";var u=new RegExp("&(?:"+r.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),h=s(o);return function(e){return String(e).replace(u,t)}}();e.exports={XML:h,HTML:f,HTMLStrict:l}},{"../maps/entities.json":25,"../maps/legacy.json":26,"../maps/xml.json":27,"./decode_codepoint.js":22}],22:[function(t,e,r){function n(t){if(t>=55296&&t<=57343||t>1114111)return"�";t in i&&(t=i[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}var i=t("../maps/decode.json");e.exports=n},{"../maps/decode.json":24}],23:[function(t,e,r){function n(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function i(t){var e=[],r=[];return Object.keys(t).forEach(function(t){1===t.length?e.push("\\"+t):r.push(t)}),r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}function s(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function o(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}function a(t,e){function r(e){return t[e]}return function(t){return t.replace(e,r).replace(d,o).replace(p,s)}}function c(t){return t.replace(g,s).replace(d,o).replace(p,s)}var u=n(t("../maps/xml.json")),h=i(u);r.XML=a(u,h);var l=n(t("../maps/entities.json")),f=i(l);r.HTML=a(l,f);var p=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=i(u);r.escape=c},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(t,e,r){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(t,e,r){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼", +ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],26:[function(t,e,r){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],27:[function(t,e,r){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function s(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!s(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,s,c,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(r=this._events[t],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),u=r.slice(),n=u.length,c=0;c<n;c++)u[c].apply(this,s);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],29:[function(t,e,r){function n(t){this._cbs=t||{},this.events=[]}e.exports=n;var i=t("./").EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this.events.push([t]),this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this.events.push([t,e]),this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this.events.push([t,e,r]),this._cbs[t]&&this._cbs[t](e,r)}}}),n.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},n.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var t=0,e=this.events.length;t<e;t++)if(this._cbs[this.events[t][0]]){var r=this.events[t].length;1===r?this._cbs[this.events[t][0]]():2===r?this._cbs[this.events[t][0]](this.events[t][1]):this._cbs[this.events[t][0]](this.events[t][1],this.events[t][2])}}},{"./":36}],30:[function(t,e,r){function n(t,e){this.init(t,e)}function i(t,e){return h.getElementsByTagName(t,e,!0)}function s(t,e){return h.getElementsByTagName(t,e,!0,1)[0]}function o(t,e,r){return h.getText(h.getElementsByTagName(t,e,r,1)).trim()}function a(t,e,r,n,i){var s=o(r,n,i);s&&(t[e]=s)}var c=t("./index.js"),u=c.DomHandler,h=c.DomUtils;t("inherits")(n,u),n.prototype.init=u;var l=function(t){return"rss"===t||"feed"===t||"rdf:RDF"===t};n.prototype.onend=function(){var t,e,r={},n=s(l,this.dom);n&&("feed"===n.name?(e=n.children,r.type="atom",a(r,"id","id",e),a(r,"title","title",e),(t=s("link",e))&&(t=t.attribs)&&(t=t.href)&&(r.link=t),a(r,"description","subtitle",e),(t=o("updated",e))&&(r.updated=new Date(t)),a(r,"author","email",e,!0),r.items=i("entry",e).map(function(t){var e,r={};return t=t.children,a(r,"id","id",t),a(r,"title","title",t),(e=s("link",t))&&(e=e.attribs)&&(e=e.href)&&(r.link=e),(e=o("summary",t)||o("content",t))&&(r.description=e),(e=o("updated",t))&&(r.pubDate=new Date(e)),r})):(e=s("channel",n.children).children,r.type=n.name.substr(0,3),r.id="",a(r,"title","title",e),a(r,"link","link",e),a(r,"description","description",e),(t=o("lastBuildDate",e))&&(r.updated=new Date(t)),a(r,"author","managingEditor",e,!0),r.items=i("item",n.children).map(function(t){var e,r={};return t=t.children,a(r,"id","guid",t),a(r,"title","title",t),a(r,"link","link",t),a(r,"description","description",t),(e=o("pubDate",t))&&(r.pubDate=new Date(e)),r}))),this.dom=r,u.prototype._handleCallback.call(this,n?null:Error("couldn't find root of feed"))},e.exports=n},{"./index.js":36,inherits:38}],31:[function(t,e,r){function n(t,e){this._options=e||{},this._cbs=t||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=t("./Tokenizer.js"),s={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},o={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:s,input:s,output:s,button:s,datalist:s,textarea:s,option:{option:!0},optgroup:{optgroup:!0}},a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},c=/\s|\//;t("inherits")(n,t("events").EventEmitter),n.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},n.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},n.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&t in o)for(var e;(e=this._stack[this._stack.length-1])in o[t];this.onclosetag(e));!this._options.xmlMode&&t in a||this._stack.push(t),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},n.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in a&&this._cbs.onclosetag(this._tagname),this._tagname=""},n.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),!this._stack.length||t in a&&!this._options.xmlMode)this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(e!==-1)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},n.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},n.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},n.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},n.prototype.onattribdata=function(t){this._attribvalue+=t},n.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},n.prototype._getInstructionName=function(t){var e=t.search(c),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},n.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},n.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},n.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},n.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},n.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},n.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},n.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},n.prototype.parseComplete=function(t){this.reset(),this.end(t)},n.prototype.write=function(t){this._tokenizer.write(t)},n.prototype.end=function(t){this._tokenizer.end(t)},n.prototype.pause=function(){this._tokenizer.pause()},n.prototype.resume=function(){this._tokenizer.resume()},n.prototype.parseChunk=n.prototype.write,n.prototype.done=n.prototype.end,e.exports=n},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(t,e,r){function n(t){this._cbs=t||{}}e.exports=n;var i=t("./").EVENTS;Object.keys(i).forEach(function(t){if(0===i[t])t="on"+t,n.prototype[t]=function(){this._cbs[t]&&this._cbs[t]()};else if(1===i[t])t="on"+t,n.prototype[t]=function(e){this._cbs[t]&&this._cbs[t](e)};else{if(2!==i[t])throw Error("wrong number of arguments");t="on"+t,n.prototype[t]=function(e,r){this._cbs[t]&&this._cbs[t](e,r)}}})},{"./":36}],33:[function(t,e,r){function n(t){s.call(this,new i(this),t)}function i(t){this.scope=t}e.exports=n;var s=t("./WritableStream.js");t("inherits")(n,s),n.prototype.readable=!0;var o=t("../").EVENTS;Object.keys(o).forEach(function(t){if(0===o[t])i.prototype["on"+t]=function(){this.scope.emit(t)};else if(1===o[t])i.prototype["on"+t]=function(e){this.scope.emit(t,e)};else{if(2!==o[t])throw Error("wrong number of arguments!");i.prototype["on"+t]=function(e,r){this.scope.emit(t,e,r)}}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(t,e,r){function n(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function i(t,e){return function(r){r===t&&(this._state=e)}}function s(t,e,r){var n=t.toLowerCase();return t===n?function(t){t===n?this._state=e:(this._state=r,this._index--)}:function(i){i===n||i===t?this._state=e:(this._state=r,this._index--)}}function o(t,e){var r=t.toLowerCase();return function(n){n===r||n===t?this._state=e:(this._state=g,this._index--)}}function a(t,e){this._state=p,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=p,this._special=gt,this._cbs=e,this._running=!0,this._ended=!1,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}e.exports=a;var c=t("entities/lib/decode_codepoint.js"),u=t("entities/maps/entities.json"),h=t("entities/maps/legacy.json"),l=t("entities/maps/xml.json"),f=0,p=f++,d=f++,g=f++,_=f++,m=f++,b=f++,y=f++,v=f++,w=f++,x=f++,S=f++,E=f++,T=f++,A=f++,k=f++,L=f++,q=f++,R=f++,C=f++,B=f++,D=f++,j=f++,N=f++,O=f++,M=f++,I=f++,P=f++,U=f++,H=f++,V=f++,z=f++,Y=f++,F=f++,G=f++,W=f++,X=f++,Q=f++,J=f++,Z=f++,K=f++,$=f++,tt=f++,et=f++,rt=f++,nt=f++,it=f++,st=f++,ot=f++,at=f++,ct=f++,ut=f++,ht=f++,lt=f++,ft=f++,pt=f++,dt=0,gt=dt++,_t=dt++,mt=dt++;a.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===gt&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=p,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeTagName=function(t){"/"===t?this._state=m:"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===t||this._special!==gt||n(t)?this._state=p:"!"===t?(this._state=k,this._sectionStart=this._index+1):"?"===t?(this._state=q,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==t&&"S"!==t?g:z,this._sectionStart=this._index)},a.prototype._stateInTagName=function(t){("/"===t||">"===t||n(t))&&(this._emitToken("onopentagname"),this._state=v,this._index--)},a.prototype._stateBeforeCloseingTagName=function(t){n(t)||(">"===t?this._state=p:this._special!==gt?"s"===t||"S"===t?this._state=Y:(this._state=p,this._index--):(this._state=b,this._sectionStart=this._index))},a.prototype._stateInCloseingTagName=function(t){(">"===t||n(t))&&(this._emitToken("onclosetag"),this._state=y,this._index--)},a.prototype._stateAfterCloseingTagName=function(t){">"===t&&(this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=p,this._sectionStart=this._index+1):"/"===t?this._state=_:n(t)||(this._state=w,this._sectionStart=this._index)},a.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=p,this._sectionStart=this._index+1):n(t)||(this._state=v,this._index--)},a.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||n(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=x,this._index--)},a.prototype._stateAfterAttributeName=function(t){"="===t?this._state=S:"/"===t||">"===t?(this._cbs.onattribend(),this._state=v,this._index--):n(t)||(this._cbs.onattribend(),this._state=w,this._sectionStart=this._index)},a.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=E,this._sectionStart=this._index+1):"'"===t?(this._state=T,this._sectionStart=this._index+1):n(t)||(this._state=A,this._sectionStart=this._index,this._index--)},a.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateInAttributeValueNoQuotes=function(t){n(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=v,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ut,this._sectionStart=this._index)},a.prototype._stateBeforeDeclaration=function(t){this._state="["===t?j:"-"===t?R:L},a.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=p,this._sectionStart=this._index+1)},a.prototype._stateBeforeComment=function(t){"-"===t?(this._state=C,this._sectionStart=this._index+1):this._state=L},a.prototype._stateInComment=function(t){"-"===t&&(this._state=B)},a.prototype._stateAfterComment1=function(t){"-"===t?this._state=D:this._state=C},a.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"-"!==t&&(this._state=C)},a.prototype._stateBeforeCdata1=s("C",N,L),a.prototype._stateBeforeCdata2=s("D",O,L),a.prototype._stateBeforeCdata3=s("A",M,L),a.prototype._stateBeforeCdata4=s("T",I,L),a.prototype._stateBeforeCdata5=s("A",P,L),a.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=U,this._sectionStart=this._index+1):(this._state=L,this._index--)},a.prototype._stateInCdata=function(t){"]"===t&&(this._state=H)},a.prototype._stateAfterCdata1=i("]",V),a.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=p,this._sectionStart=this._index+1):"]"!==t&&(this._state=U)},a.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=F:"t"===t||"T"===t?this._state=et:(this._state=g,this._index--)},a.prototype._stateBeforeSpecialEnd=function(t){this._special!==_t||"c"!==t&&"C"!==t?this._special!==mt||"t"!==t&&"T"!==t?this._state=p:this._state=st:this._state=J},a.prototype._stateBeforeScript1=o("R",G),a.prototype._stateBeforeScript2=o("I",W),a.prototype._stateBeforeScript3=o("P",X),a.prototype._stateBeforeScript4=o("T",Q),a.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||n(t))&&(this._special=_t),this._state=g,this._index--},a.prototype._stateAfterScript1=s("R",Z,p),a.prototype._stateAfterScript2=s("I",K,p),a.prototype._stateAfterScript3=s("P",$,p),a.prototype._stateAfterScript4=s("T",tt,p),a.prototype._stateAfterScript5=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-6,this._index--):this._state=p},a.prototype._stateBeforeStyle1=o("Y",rt),a.prototype._stateBeforeStyle2=o("L",nt),a.prototype._stateBeforeStyle3=o("E",it),a.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||n(t))&&(this._special=mt),this._state=g,this._index--},a.prototype._stateAfterStyle1=s("Y",ot,p),a.prototype._stateAfterStyle2=s("L",at,p),a.prototype._stateAfterStyle3=s("E",ct,p),a.prototype._stateAfterStyle4=function(t){">"===t||n(t)?(this._special=gt,this._state=b,this._sectionStart=this._index-5,this._index--):this._state=p},a.prototype._stateBeforeEntity=s("#",ht,lt),a.prototype._stateBeforeNumericEntity=s("X",pt,ft),a.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?l:u;e.hasOwnProperty(t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},a.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(h.hasOwnProperty(r))return this._emitPartial(h[r]),void(this._sectionStart+=e+1);e--}},a.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==p?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},a.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),i=parseInt(n,e);this._emitPartial(c(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},a.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},a.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},a.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===p?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},a.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},a.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);this._state===p?this._stateText(t):this._state===d?this._stateBeforeTagName(t):this._state===g?this._stateInTagName(t):this._state===m?this._stateBeforeCloseingTagName(t):this._state===b?this._stateInCloseingTagName(t):this._state===y?this._stateAfterCloseingTagName(t):this._state===_?this._stateInSelfClosingTag(t):this._state===v?this._stateBeforeAttributeName(t):this._state===w?this._stateInAttributeName(t):this._state===x?this._stateAfterAttributeName(t):this._state===S?this._stateBeforeAttributeValue(t):this._state===E?this._stateInAttributeValueDoubleQuotes(t):this._state===T?this._stateInAttributeValueSingleQuotes(t):this._state===A?this._stateInAttributeValueNoQuotes(t):this._state===k?this._stateBeforeDeclaration(t):this._state===L?this._stateInDeclaration(t):this._state===q?this._stateInProcessingInstruction(t):this._state===R?this._stateBeforeComment(t):this._state===C?this._stateInComment(t):this._state===B?this._stateAfterComment1(t):this._state===D?this._stateAfterComment2(t):this._state===j?this._stateBeforeCdata1(t):this._state===N?this._stateBeforeCdata2(t):this._state===O?this._stateBeforeCdata3(t):this._state===M?this._stateBeforeCdata4(t):this._state===I?this._stateBeforeCdata5(t):this._state===P?this._stateBeforeCdata6(t):this._state===U?this._stateInCdata(t):this._state===H?this._stateAfterCdata1(t):this._state===V?this._stateAfterCdata2(t):this._state===z?this._stateBeforeSpecial(t):this._state===Y?this._stateBeforeSpecialEnd(t):this._state===F?this._stateBeforeScript1(t):this._state===G?this._stateBeforeScript2(t):this._state===W?this._stateBeforeScript3(t):this._state===X?this._stateBeforeScript4(t):this._state===Q?this._stateBeforeScript5(t):this._state===J?this._stateAfterScript1(t):this._state===Z?this._stateAfterScript2(t):this._state===K?this._stateAfterScript3(t):this._state===$?this._stateAfterScript4(t):this._state===tt?this._stateAfterScript5(t):this._state===et?this._stateBeforeStyle1(t):this._state===rt?this._stateBeforeStyle2(t):this._state===nt?this._stateBeforeStyle3(t):this._state===it?this._stateBeforeStyle4(t):this._state===st?this._stateAfterStyle1(t):this._state===ot?this._stateAfterStyle2(t):this._state===at?this._stateAfterStyle3(t):this._state===ct?this._stateAfterStyle4(t):this._state===ut?this._stateBeforeEntity(t):this._state===ht?this._stateBeforeNumericEntity(t):this._state===lt?this._stateInNamedEntity(t):this._state===ft?this._stateInNumericEntity(t):this._state===pt?this._stateInHexEntity(t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},a.prototype.pause=function(){this._running=!1},a.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},a.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},a.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},a.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);this._state===U||this._state===H||this._state===V?this._cbs.oncdata(t):this._state===C||this._state===B||this._state===D?this._cbs.oncomment(t):this._state!==lt||this._xmlMode?this._state!==ft||this._xmlMode?this._state!==pt||this._xmlMode?this._state!==g&&this._state!==v&&this._state!==S&&this._state!==x&&this._state!==w&&this._state!==T&&this._state!==E&&this._state!==A&&this._state!==b&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},a.prototype.reset=function(){a.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},a.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},a.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},a.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},a.prototype._emitPartial=function(t){this._baseState!==p?this._cbs.onattribdata(t):this._cbs.ontext(t)}},{"entities/lib/decode_codepoint.js":22,"entities/maps/entities.json":25,"entities/maps/legacy.json":26,"entities/maps/xml.json":27}],35:[function(t,e,r){function n(t,e){var r=this._parser=new i(t,e),n=this._decoder=new o;s.call(this,{decodeStrings:!1}),this.once("finish",function(){r.end(n.end())})}e.exports=n;var i=t("./Parser.js"),s=t("stream").Writable||t("readable-stream").Writable,o=t("string_decoder").StringDecoder,a=t("buffer").Buffer;t("inherits")(n,s),s.prototype._write=function(t,e,r){t instanceof a&&(t=this._decoder.write(t)),this._parser.write(t),r()}},{"./Parser.js":31,buffer:5,inherits:38,"readable-stream":3,stream:55,string_decoder:56}],36:[function(t,e,r){function n(t,r){return delete e.exports[t],e.exports[t]=r,r}var i=t("./Parser.js"),s=t("domhandler");e.exports={Parser:i,Tokenizer:t("./Tokenizer.js"),ElementType:t("domelementtype"),DomHandler:s,get FeedHandler(){return n("FeedHandler",t("./FeedHandler.js"))},get Stream(){return n("Stream",t("./Stream.js"))},get WritableStream(){return n("WritableStream",t("./WritableStream.js")); +},get ProxyHandler(){return n("ProxyHandler",t("./ProxyHandler.js"))},get DomUtils(){return n("DomUtils",t("domutils"))},get CollectingHandler(){return n("CollectingHandler",t("./CollectingHandler.js"))},DefaultHandler:s,get RssHandler(){return n("RssHandler",this.FeedHandler)},parseDOM:function(t,e){var r=new s(e);return new i(r,e).end(t),r.dom},parseFeed:function(t,r){var n=new e.exports.FeedHandler(r);return new i(n,r).end(t),n.dom},createDomStream:function(t,e,r){var n=new s(t,e,r);return new i(n,e)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},{"./CollectingHandler.js":29,"./FeedHandler.js":30,"./Parser.js":31,"./ProxyHandler.js":32,"./Stream.js":33,"./Tokenizer.js":34,"./WritableStream.js":35,domelementtype:9,domhandler:10,domutils:13}],37:[function(t,e,r){r.read=function(t,e,r,n,i){var s,o,a=8*i-n-1,c=(1<<a)-1,u=c>>1,h=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,s=p&(1<<-h)-1,p>>=-h,h+=a;h>0;s=256*s+t[e+l],l+=f,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=256*o+t[e+l],l+=f,h-=8);if(0===s)s=1-u;else{if(s===c)return o?NaN:(p?-1:1)*(1/0);o+=Math.pow(2,n),s-=u}return(p?-1:1)*o*Math.pow(2,s-n)},r.write=function(t,e,r,n,i,s){var o,a,c,u=8*s-i-1,h=(1<<u)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),e+=o+l>=1?f/c:f*Math.pow(2,1-l),e*c>=2&&(o++,c/=2),o+l>=h?(a=0,o=h):o+l>=1?(a=(e*c-1)*Math.pow(2,i),o+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*g}},{}],38:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],39:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function i(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}e.exports=function(t){return null!=t&&(n(t)||i(t)||!!t._isBuffer)}},{}],40:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],41:[function(t,e,r){(function(t){"use strict";function r(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return t.nextTick(function(){e.apply(null,s)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=r:e.exports=t.nextTick}).call(this,t("_process"))},{_process:42}],42:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===i||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){_&&d&&(_=!1,d.length?g=d.concat(g):m=-1,g.length&&c())}function c(){if(!_){var t=s(a);_=!0;for(var e=g.length;e;){for(d=g,g=[];++m<e;)d&&d[m].run();m=-1,e=g.length}d=null,_=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function h(){}var l,f,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:i}catch(t){f=i}}();var d,g=[],_=!1,m=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];g.push(new u(t,e)),1!==g.length||_||s(c)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=h,p.addListener=h,p.once=h,p.off=h,p.removeListener=h,p.removeAllListeners=h,p.emit=h,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],43:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":44}],44:[function(t,e,r){"use strict";function n(t){return this instanceof n?(u.call(this,t),h.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||a(s,this)}function s(t){t.end()}var o=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=n;var a=t("process-nextick-args"),c=t("core-util-is");c.inherits=t("inherits");var u=t("./_stream_readable"),h=t("./_stream_writable");c.inherits(n,u);for(var l=o(h.prototype),f=0;f<l.length;f++){var p=l[f];n.prototype[p]||(n.prototype[p]=h.prototype[p])}},{"./_stream_readable":46,"./_stream_writable":48,"core-util-is":6,inherits:38,"process-nextick-args":41}],45:[function(t,e,r){"use strict";function n(t){return this instanceof n?void i.call(this,t):new n(t)}e.exports=n;var i=t("./_stream_transform"),s=t("core-util-is");s.inherits=t("inherits"),s.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":47,"core-util-is":6,inherits:38}],46:[function(t,e,r){(function(r){"use strict";function n(t,e,r){return"function"==typeof t.prependListener?t.prependListener(e,r):void(t._events&&t._events[e]?R(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r))}function i(e,r){U=U||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof U&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new P,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(I||(I=t("string_decoder/").StringDecoder),this.decoder=new I(e.encoding),this.encoding=e.encoding)}function s(e){return U=U||t("./_stream_duplex"),this instanceof s?(this._readableState=new i(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void C.call(this)):new s(e)}function o(t,e,r,n,i){var s=h(e,r);if(s)t.emit("error",s);else if(null===r)e.reading=!1,l(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var o=new Error("stream.push() after EOF");t.emit("error",o)}else if(e.endEmitted&&i){var c=new Error("stream.unshift() after end event");t.emit("error",c)}else{var u;!e.decoder||i||n||(r=e.decoder.write(r),u=!e.objectMode&&0===r.length),i||(e.reading=!1),u||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&f(t))),d(t,e)}else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function c(t){return t>=H?t=H:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function u(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=c(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function h(t,e){var r=null;return D.isBuffer(e)||"string"==typeof e||null===e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,f(t)}}function f(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(M("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?q(p,t):p(t))}function p(t){M("emit readable"),t.emit("readable"),v(t)}function d(t,e){e.readingMore||(e.readingMore=!0,q(g,t,e))}function g(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(M("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function _(t){return function(){var e=t._readableState;M("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&B(t,"data")&&(e.flowing=!0,v(t))}}function m(t){M("readable nexttick read 0"),t.read(0)}function b(t,e){e.resumeScheduled||(e.resumeScheduled=!0,q(y,t,e))}function y(t,e){e.reading||(M("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),v(t),e.flowing&&!e.reading&&t.read(0)}function v(t){var e=t._readableState;for(M("flow",e.flowing);e.flowing&&null!==t.read(););}function w(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=x(t,e.buffer,e.decoder),r}function x(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?S(t,e):E(t,e),n}function S(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(i+=o===s.length?s:s.slice(0,t),t-=o,0===t){o===s.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++n}return e.length-=n,i}function E(t,e){var r=j.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var s=n.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,0===t){o===s.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(o));break}++i}return e.length-=i,r}function T(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,q(A,e,t))}function A(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function k(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function L(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}e.exports=s;var q=t("process-nextick-args"),R=t("isarray");s.ReadableState=i;var C,B=(t("events").EventEmitter,function(t,e){return t.listeners(e).length});!function(){try{C=t("stream")}catch(e){}finally{C||(C=t("events").EventEmitter)}}();var D=t("buffer").Buffer,j=t("buffer-shims"),N=t("core-util-is");N.inherits=t("inherits");var O=t("util"),M=void 0;M=O&&O.debuglog?O.debuglog("stream"):function(){};var I,P=t("./internal/streams/BufferList");N.inherits(s,C);var U,U;s.prototype.push=function(t,e){var r=this._readableState;return r.objectMode||"string"!=typeof t||(e=e||r.defaultEncoding,e!==r.encoding&&(t=j.from(t,e),e="")),o(this,r,t,e,!1)},s.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},s.prototype.isPaused=function(){return this._readableState.flowing===!1},s.prototype.setEncoding=function(e){return I||(I=t("string_decoder/").StringDecoder),this._readableState.decoder=new I(e),this._readableState.encoding=e,this};var H=8388608;s.prototype.read=function(t){M("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return M("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?T(this):f(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&T(this),null;var n=e.needReadable;M("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,M("length less than watermark",n)),e.ended||e.reading?(n=!1,M("reading or ended",n)):n&&(M("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=u(r,e)));var i;return i=t>0?w(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&T(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(t){this.emit("error",new Error("not implemented"))},s.prototype.pipe=function(t,e){function i(t){M("onunpipe"),t===f&&o()}function s(){M("onend"),t.end()}function o(){M("cleanup"),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("drain",m),t.removeListener("error",c),t.removeListener("unpipe",i),f.removeListener("end",s),f.removeListener("end",o),f.removeListener("data",a),b=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function a(e){M("ondata"),y=!1;var r=t.write(e);!1!==r||y||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&L(p.pipes,t)!==-1)&&!b&&(M("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,y=!0),f.pause())}function c(e){M("onerror",e),l(),t.removeListener("error",c),0===B(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",h),l()}function h(){M("onfinish"),t.removeListener("close",u),l()}function l(){M("unpipe"),f.unpipe(t)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,M("pipe count=%d opts=%j",p.pipesCount,e);var d=(!e||e.end!==!1)&&t!==r.stdout&&t!==r.stderr,g=d?s:o;p.endEmitted?q(g):f.once("end",g),t.on("unpipe",i);var m=_(f);t.on("drain",m);var b=!1,y=!1;return f.on("data",a),n(t,"error",c),t.once("close",u),t.once("finish",h),t.emit("pipe",f),p.flowing||(M("pipe resume"),f.resume()),t},s.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var s=L(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},s.prototype.on=function(t,e){var r=C.prototype.on.call(this,t,e);if("data"===t)this._readableState.flowing!==!1&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&f(this,n):q(m,this))}return r},s.prototype.addListener=s.prototype.on,s.prototype.resume=function(){var t=this._readableState;return t.flowing||(M("resume"),t.flowing=!0,b(this,t)),this},s.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this},s.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(M("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(M("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)){var s=n.push(i);s||(r=!0,t.pause())}});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var s=["error","close","destroy","pause","resume"];return k(s,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){M("wrapped _read",e),r&&(r=!1,t.resume())},n},s._fromList=w}).call(this,t("_process"))},{"./_stream_duplex":44,"./internal/streams/BufferList":49,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,isarray:40,"process-nextick-args":41,"string_decoder/":56,util:3}],47:[function(t,e,r){"use strict";function n(t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&t.push(r),i(e);var s=t._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&t._read(s.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);a.call(this,t),this._transformState=new n(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t){o(e,t)}):o(e)})}function o(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}e.exports=s;var a=t("./_stream_duplex"),c=t("core-util-is");c.inherits=t("inherits"),c.inherits(s,a),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("Not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":44,"core-util-is":6,inherits:38}],48:[function(t,e,r){(function(r){"use strict";function n(){}function i(t,e,r){this.chunk=t,this.encoding=e,this.callback=r,this.next=null}function s(e,r){R=R||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof R&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){d(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}function o(e){return R=R||t("./_stream_duplex"),this instanceof o||this instanceof R?(this._writableState=new s(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),void A.call(this)):new o(e)}function a(t,e){var r=new Error("write after end");t.emit("error",r),S(e,r)}function c(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):L.isBuffer(r)||"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),S(n,s),i=!1),i}function u(t,e,r){return t.objectMode||t.decodeStrings===!1||"string"!=typeof e||(e=q.from(e,r)),e}function h(t,e,r,n,s){r=u(e,r,n),L.isBuffer(r)&&(n="buffer");var o=e.objectMode?1:r.length;e.length+=o;var a=e.length<e.highWaterMark;if(a||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest=new i(r,n,s),c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else l(t,e,!1,o,r,n,s);return a}function l(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function f(t,e,r,n,i){--e.pendingcb,r?S(i,n):i(n),t._writableState.errorEmitted=!0,t.emit("error",n)}function p(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function d(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(p(r),e)f(t,r,n,e,i);else{var s=b(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||m(t,r),n?E(g,t,r,s,i):g(t,r,s,i)}}function g(t,e,r,n){r||_(t,e),e.pendingcb--,n(),v(t,e)}function _(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function m(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0;r;)i[o]=r,r=r.next,o+=1;l(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new x(e)}else{for(;r;){var a=r.chunk,c=r.encoding,u=r.callback,h=e.objectMode?1:a.length;if(l(t,e,!1,h,a,c,u),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function b(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function y(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function v(t,e){var r=b(e);return r&&(0===e.pendingcb?(y(t,e),e.finished=!0,t.emit("finish")):y(t,e)),r}function w(t,e,r){e.ending=!0,v(t,e),r&&(e.finished?S(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function x(t){var e=this;this.next=null,this.entry=null,this.finish=function(r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}e.exports=o;var S=t("process-nextick-args"),E=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:S;o.WritableState=s;var T=t("core-util-is");T.inherits=t("inherits");var A,k={deprecate:t("util-deprecate")};!function(){try{A=t("stream")}catch(e){}finally{A||(A=t("events").EventEmitter)}}();var L=t("buffer").Buffer,q=t("buffer-shims");T.inherits(o,A);var R;s.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(s.prototype,"buffer",{get:k.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(t){}}();var R;o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(t,e,r){var i=this._writableState,s=!1;return"function"==typeof e&&(r=e,e=null),L.isBuffer(t)?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?a(this,r):c(this,i,t,r)&&(i.pendingcb++,s=h(this,i,t,e,r)),s},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||m(this,t))},o.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}}).call(this,t("_process"))},{"./_stream_duplex":44,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,"process-nextick-args":41,"util-deprecate":57}],49:[function(t,e,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(t("buffer").Buffer,t("buffer-shims"));e.exports=n,n.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},n.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},n.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},n.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),r=this.head,n=0;r;)r.data.copy(e,n),n+=r.data.length,r=r.next;return e}},{buffer:5,"buffer-shims":4}],50:[function(t,e,r){e.exports=t("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(t,e,r){(function(n){var i=function(){try{return t("stream")}catch(e){}}();r=e.exports=t("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(e.exports=i)}).call(this,t("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(t,e,r){e.exports=t("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(t,e,r){e.exports=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(t,e,r){function n(){i.call(this)}e.exports=n;var i=t("events").EventEmitter,s=t("inherits");s(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function s(){h||(h=!0,t.end())}function o(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(c(),0===i.listenerCount(this,"error"))throw t}function c(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",s),u.removeListener("close",o),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),t.removeListener("close",c)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(u.on("end",s),u.on("close",o));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",c),u.on("close",c),t.on("close",c),t.emit("pipe",u),t}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(t,e,r){function n(t){if(t&&!c(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function o(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=t("buffer").Buffer,c=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=r.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),t.copy(this.charBuffer,0,0,s),e.substring(0,i)}return e},u.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},{buffer:5}],57:[function(t,e,r){(function(t){function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(t,e,r){function n(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)i.call(r,n)&&(t[n]=r[n])}return t}e.exports=n;var i=Object.prototype.hasOwnProperty},{}]},{},[1])(1)}); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred.bundle.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred.bundle.js deleted file mode 100644 index 74d08168922..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred.bundle.js +++ /dev/null @@ -1,2765 +0,0 @@ -var require = function (file, cwd) { - var resolved = require.resolve(file, cwd || '/'); - var mod = require.modules[resolved]; - if (!mod) throw new Error( - 'Failed to resolve module ' + file + ', tried ' + resolved - ); - var res = mod._cached ? mod._cached : mod(); - return res; -} - -require.paths = []; -require.modules = {}; -require.extensions = [".js",".coffee"]; - -require._core = { - 'assert': true, - 'events': true, - 'fs': true, - 'path': true, - 'vm': true -}; - -require.resolve = (function () { - return function (x, cwd) { - if (!cwd) cwd = '/'; - - if (require._core[x]) return x; - var path = require.modules.path(); - var y = cwd || '.'; - - if (x.match(/^(?:\.\.?\/|\/)/)) { - var m = loadAsFileSync(path.resolve(y, x)) - || loadAsDirectorySync(path.resolve(y, x)); - if (m) return m; - } - - var n = loadNodeModulesSync(x, y); - if (n) return n; - - throw new Error("Cannot find module '" + x + "'"); - - function loadAsFileSync (x) { - if (require.modules[x]) { - return x; - } - - for (var i = 0; i < require.extensions.length; i++) { - var ext = require.extensions[i]; - if (require.modules[x + ext]) return x + ext; - } - } - - function loadAsDirectorySync (x) { - x = x.replace(/\/+$/, ''); - var pkgfile = x + '/package.json'; - if (require.modules[pkgfile]) { - var pkg = require.modules[pkgfile](); - var b = pkg.browserify; - if (typeof b === 'object' && b.main) { - var m = loadAsFileSync(path.resolve(x, b.main)); - if (m) return m; - } - else if (typeof b === 'string') { - var m = loadAsFileSync(path.resolve(x, b)); - if (m) return m; - } - else if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - } - } - - return loadAsFileSync(x + '/index'); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPathsSync(start); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(dir + '/' + x); - if (m) return m; - var n = loadAsDirectorySync(dir + '/' + x); - if (n) return n; - } - - var m = loadAsFileSync(x); - if (m) return m; - } - - function nodeModulesPathsSync (start) { - var parts; - if (start === '/') parts = [ '' ]; - else parts = path.normalize(start).split('/'); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; - dirs.push(dir); - } - - return dirs; - } - }; -})(); - -require.alias = function (from, to) { - var path = require.modules.path(); - var res = null; - try { - res = require.resolve(from + '/package.json', '/'); - } - catch (err) { - res = require.resolve(from, '/'); - } - var basedir = path.dirname(res); - - var keys = (Object.keys || function (obj) { - var res = []; - for (var key in obj) res.push(key) - return res; - })(require.modules); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (key.slice(0, basedir.length + 1) === basedir + '/') { - var f = key.slice(basedir.length); - require.modules[to + f] = require.modules[basedir + f]; - } - else if (key === basedir) { - require.modules[to] = require.modules[basedir]; - } - } -}; - -require.define = function (filename, fn) { - var dirname = require._core[filename] - ? '' - : require.modules.path().dirname(filename) - ; - - var require_ = function (file) { - return require(file, dirname) - }; - require_.resolve = function (name) { - return require.resolve(name, dirname); - }; - require_.modules = require.modules; - require_.define = require.define; - var module_ = { exports : {} }; - - require.modules[filename] = function () { - require.modules[filename]._cached = module_.exports; - fn.call( - module_.exports, - require_, - module_, - module_.exports, - dirname, - filename - ); - require.modules[filename]._cached = module_.exports; - return module_.exports; - }; -}; - -if (typeof process === 'undefined') process = {}; - -if (!process.nextTick) process.nextTick = (function () { - var queue = []; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canPost) { - window.addEventListener('message', function (ev) { - if (ev.source === window && ev.data === 'browserify-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - } - - return function (fn) { - if (canPost) { - queue.push(fn); - window.postMessage('browserify-tick', '*'); - } - else setTimeout(fn, 0); - }; -})(); - -if (!process.title) process.title = 'browser'; - -if (!process.binding) process.binding = function (name) { - if (name === 'evals') return require('vm') - else throw new Error('No such module') -}; - -if (!process.cwd) process.cwd = function () { return '.' }; - -require.define("path", function (require, module, exports, __dirname, __filename) { - function filter (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - if (fn(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length; i >= 0; i--) { - var last = parts[i]; - if (last == '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Regex to split a filename into [*, dir, basename, ext] -// posix version -var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { -var resolvedPath = '', - resolvedAbsolute = false; - -for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) - ? arguments[i] - : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string' || !path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; -} - -// At this point the path should be resolved to a full absolute path, but -// handle relative paths to be safe (might happen when process.cwd() fails) - -// Normalize the path -resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { -var isAbsolute = path.charAt(0) === '/', - trailingSlash = path.slice(-1) === '/'; - -// Normalize the path -path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - return p && typeof p === 'string'; - }).join('/')); -}; - - -exports.dirname = function(path) { - var dir = splitPathRe.exec(path)[1] || ''; - var isWindows = false; - if (!dir) { - // No dirname - return '.'; - } else if (dir.length === 1 || - (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { - // It is just a slash or a drive letter with a slash - return dir; - } else { - // It is a full dirname, strip trailing slash - return dir.substring(0, dir.length - 1); - } -}; - - -exports.basename = function(path, ext) { - var f = splitPathRe.exec(path)[2] || ''; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPathRe.exec(path)[3] || ''; -}; - -}); - -require.define("/shred.js", function (require, module, exports, __dirname, __filename) { - // Shred is an HTTP client library intended to simplify the use of Node's -// built-in HTTP library. In particular, we wanted to make it easier to interact -// with HTTP-based APIs. -// -// See the [examples](./examples.html) for more details. - -// Ax is a nice logging library we wrote. You can use any logger, providing it -// has `info`, `warn`, `debug`, and `error` methods that take a string. -var Ax = require("ax") - , CookieJarLib = require( "cookiejar" ) - , CookieJar = CookieJarLib.CookieJar -; - -// Shred takes some options, including a logger and request defaults. - -var Shred = function(options) { - options = (options||{}); - this.agent = options.agent; - this.defaults = options.defaults||{}; - this.log = options.logger||(new Ax({ level: "info" })); - this._sharedCookieJar = new CookieJar(); - this.logCurl = options.logCurl || false; -}; - -// Most of the real work is done in the request and reponse classes. - -Shred.Request = require("./shred/request"); -Shred.Response = require("./shred/response"); - -// The `request` method kicks off a new request, instantiating a new `Request` -// object and passing along whatever default options we were given. - -Shred.prototype = { - request: function(options) { - options.logger = this.log; - options.logCurl = options.logCurl || this.logCurl; - options.cookieJar = ( 'cookieJar' in options ) ? options.cookieJar : this._sharedCookieJar; // let them set cookieJar = null - options.agent = options.agent || this.agent; - // fill in default options - for (var key in this.defaults) { - if (this.defaults.hasOwnProperty(key) && !options[key]) { - options[key] = this.defaults[key] - } - } - return new Shred.Request(options); - } -}; - -// Define a bunch of convenience methods so that you don't have to include -// a `method` property in your request options. - -"get put post delete".split(" ").forEach(function(method) { - Shred.prototype[method] = function(options) { - options.method = method; - return this.request(options); - }; -}); - - -module.exports = Shred; - -}); - -require.define("/node_modules/ax/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"./lib/ax.js"} -}); - -require.define("/node_modules/ax/lib/ax.js", function (require, module, exports, __dirname, __filename) { - var inspect = require("util").inspect - , fs = require("fs") -; - - -// this is a quick-and-dirty logger. there are other nicer loggers out there -// but the ones i found were also somewhat involved. this one has a Ruby -// logger type interface -// -// we can easily replace this, provide the info, debug, etc. methods are the -// same. or, we can change Haiku to use a more standard node.js interface - -var format = function(level,message) { - var debug = (level=="debug"||level=="error"); - if (!message) { return message.toString(); } - if (typeof(message) == "object") { - if (message instanceof Error && debug) { - return message.stack; - } else { - return inspect(message); - } - } else { - return message.toString(); - } -}; - -var noOp = function(message) { return this; } -var makeLogger = function(level,fn) { - return function(message) { - this.stream.write(this.format(level, message)+"\n"); - return this; - } -}; - -var Logger = function(options) { - var logger = this; - var options = options||{}; - - // Default options - options.level = options.level || "info"; - options.timestamp = options.timestamp || true; - options.prefix = options.prefix || ""; - logger.options = options; - - // Allows a prefix to be added to the message. - // - // var logger = new Ax({ module: 'Haiku' }) - // logger.warn('this is going to be awesome!'); - // //=> Haiku: this is going to be awesome! - // - if (logger.options.module){ - logger.options.prefix = logger.options.module; - } - - // Write to stderr or a file - if (logger.options.file){ - logger.stream = fs.createWriteStream(logger.options.file, {"flags": "a"}); - } else { - if(process.title === "node") - logger.stream = process.stderr; - else if(process.title === "browser") - logger.stream = function () { - // Work around weird console context issue: http://code.google.com/p/chromium/issues/detail?id=48662 - return console[logger.options.level].apply(console, arguments); - }; - } - - switch(logger.options.level){ - case 'debug': - ['debug', 'info', 'warn'].forEach(function (level) { - logger[level] = Logger.writer(level); - }); - case 'info': - ['info', 'warn'].forEach(function (level) { - logger[level] = Logger.writer(level); - }); - case 'warn': - logger.warn = Logger.writer('warn'); - } -} - -// Used to define logger methods -Logger.writer = function(level){ - return function(message){ - var logger = this; - - if(process.title === "node") - logger.stream.write(logger.format(level, message) + '\n'); - else if(process.title === "browser") - logger.stream(logger.format(level, message) + '\n'); - - }; -} - - -Logger.prototype = { - info: function(){}, - debug: function(){}, - warn: function(){}, - error: Logger.writer('error'), - format: function(level, message){ - if (! message) return ''; - - var logger = this - , prefix = logger.options.prefix - , timestamp = logger.options.timestamp ? " " + (new Date().toISOString()) : "" - ; - - return (prefix + timestamp + ": " + message); - } -}; - -module.exports = Logger; - -}); - -require.define("util", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("fs", function (require, module, exports, __dirname, __filename) { - // nothing to see here... no file methods for the browser - -}); - -require.define("/node_modules/cookiejar/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"cookiejar.js"} -}); - -require.define("/node_modules/cookiejar/cookiejar.js", function (require, module, exports, __dirname, __filename) { - exports.CookieAccessInfo=CookieAccessInfo=function CookieAccessInfo(domain,path,secure,script) { - if(this instanceof CookieAccessInfo) { - this.domain=domain||undefined; - this.path=path||"/"; - this.secure=!!secure; - this.script=!!script; - return this; - } - else { - return new CookieAccessInfo(domain,path,secure,script) - } -} - -exports.Cookie=Cookie=function Cookie(cookiestr) { - if(cookiestr instanceof Cookie) { - return cookiestr; - } - else { - if(this instanceof Cookie) { - this.name = null; - this.value = null; - this.expiration_date = Infinity; - this.path = "/"; - this.domain = null; - this.secure = false; //how to define? - this.noscript = false; //httponly - if(cookiestr) { - this.parse(cookiestr) - } - return this; - } - return new Cookie(cookiestr) - } -} - -Cookie.prototype.toString = function toString() { - var str=[this.name+"="+this.value]; - if(this.expiration_date !== Infinity) { - str.push("expires="+(new Date(this.expiration_date)).toGMTString()); - } - if(this.domain) { - str.push("domain="+this.domain); - } - if(this.path) { - str.push("path="+this.path); - } - if(this.secure) { - str.push("secure"); - } - if(this.noscript) { - str.push("httponly"); - } - return str.join("; "); -} - -Cookie.prototype.toValueString = function toValueString() { - return this.name+"="+this.value; -} - -var cookie_str_splitter=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g -Cookie.prototype.parse = function parse(str) { - if(this instanceof Cookie) { - var parts=str.split(";") - , pair=parts[0].match(/([^=]+)=((?:.|\n)*)/) - , key=pair[1] - , value=pair[2]; - this.name = key; - this.value = value; - - for(var i=1;i<parts.length;i++) { - pair=parts[i].match(/([^=]+)(?:=((?:.|\n)*))?/) - , key=pair[1].trim().toLowerCase() - , value=pair[2]; - switch(key) { - case "httponly": - this.noscript = true; - break; - case "expires": - this.expiration_date = value - ? Number(Date.parse(value)) - : Infinity; - break; - case "path": - this.path = value - ? value.trim() - : ""; - break; - case "domain": - this.domain = value - ? value.trim() - : ""; - break; - case "secure": - this.secure = true; - break - } - } - - return this; - } - return new Cookie().parse(str) -} - -Cookie.prototype.matches = function matches(access_info) { - if(this.noscript && access_info.script - || this.secure && !access_info.secure - || !this.collidesWith(access_info)) { - return false - } - return true; -} - -Cookie.prototype.collidesWith = function collidesWith(access_info) { - if((this.path && !access_info.path) || (this.domain && !access_info.domain)) { - return false - } - if(this.path && access_info.path.indexOf(this.path) !== 0) { - return false; - } - if (this.domain===access_info.domain) { - return true; - } - else if(this.domain && this.domain.charAt(0)===".") - { - var wildcard=access_info.domain.indexOf(this.domain.slice(1)) - if(wildcard===-1 || wildcard!==access_info.domain.length-this.domain.length+1) { - return false; - } - } - else if(this.domain){ - return false - } - return true; -} - -exports.CookieJar=CookieJar=function CookieJar() { - if(this instanceof CookieJar) { - var cookies = {} //name: [Cookie] - - this.setCookie = function setCookie(cookie) { - cookie = Cookie(cookie); - //Delete the cookie if the set is past the current time - var remove = cookie.expiration_date <= Date.now(); - if(cookie.name in cookies) { - var cookies_list = cookies[cookie.name]; - for(var i=0;i<cookies_list.length;i++) { - var collidable_cookie = cookies_list[i]; - if(collidable_cookie.collidesWith(cookie)) { - if(remove) { - cookies_list.splice(i,1); - if(cookies_list.length===0) { - delete cookies[cookie.name] - } - return false; - } - else { - return cookies_list[i]=cookie; - } - } - } - if(remove) { - return false; - } - cookies_list.push(cookie); - return cookie; - } - else if(remove){ - return false; - } - else { - return cookies[cookie.name]=[cookie]; - } - } - //returns a cookie - this.getCookie = function getCookie(cookie_name,access_info) { - var cookies_list = cookies[cookie_name]; - for(var i=0;i<cookies_list.length;i++) { - var cookie = cookies_list[i]; - if(cookie.expiration_date <= Date.now()) { - if(cookies_list.length===0) { - delete cookies[cookie.name] - } - continue; - } - if(cookie.matches(access_info)) { - return cookie; - } - } - } - //returns a list of cookies - this.getCookies = function getCookies(access_info) { - var matches=[]; - for(var cookie_name in cookies) { - var cookie=this.getCookie(cookie_name,access_info); - if (cookie) { - matches.push(cookie); - } - } - matches.toString=function toString(){return matches.join(":");} - matches.toValueString=function() {return matches.map(function(c){return c.toValueString();}).join(';');} - return matches; - } - - return this; - } - return new CookieJar() -} - - -//returns list of cookies that were set correctly -CookieJar.prototype.setCookies = function setCookies(cookies) { - cookies=Array.isArray(cookies) - ?cookies - :cookies.split(cookie_str_splitter); - var successful=[] - for(var i=0;i<cookies.length;i++) { - var cookie = Cookie(cookies[i]); - if(this.setCookie(cookie)) { - successful.push(cookie); - } - } - return successful; -} - -}); - -require.define("/shred/request.js", function (require, module, exports, __dirname, __filename) { - // The request object encapsulates a request, creating a Node.js HTTP request and -// then handling the response. - -var HTTP = require("http") - , HTTPS = require("https") - , parseUri = require("./parseUri") - , Emitter = require('events').EventEmitter - , sprintf = require("sprintf").sprintf - , Response = require("./response") - , HeaderMixins = require("./mixins/headers") - , Content = require("./content") -; - -var STATUS_CODES = HTTP.STATUS_CODES || { - 100 : 'Continue', - 101 : 'Switching Protocols', - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 - 200 : 'OK', - 201 : 'Created', - 202 : 'Accepted', - 203 : 'Non-Authoritative Information', - 204 : 'No Content', - 205 : 'Reset Content', - 206 : 'Partial Content', - 207 : 'Multi-Status', // RFC 4918 - 300 : 'Multiple Choices', - 301 : 'Moved Permanently', - 302 : 'Moved Temporarily', - 303 : 'See Other', - 304 : 'Not Modified', - 305 : 'Use Proxy', - 307 : 'Temporary Redirect', - 400 : 'Bad Request', - 401 : 'Unauthorized', - 402 : 'Payment Required', - 403 : 'Forbidden', - 404 : 'Not Found', - 405 : 'Method Not Allowed', - 406 : 'Not Acceptable', - 407 : 'Proxy Authentication Required', - 408 : 'Request Time-out', - 409 : 'Conflict', - 410 : 'Gone', - 411 : 'Length Required', - 412 : 'Precondition Failed', - 413 : 'Request Entity Too Large', - 414 : 'Request-URI Too Large', - 415 : 'Unsupported Media Type', - 416 : 'Requested Range Not Satisfiable', - 417 : 'Expectation Failed', - 418 : 'I\'m a teapot', // RFC 2324 - 422 : 'Unprocessable Entity', // RFC 4918 - 423 : 'Locked', // RFC 4918 - 424 : 'Failed Dependency', // RFC 4918 - 425 : 'Unordered Collection', // RFC 4918 - 426 : 'Upgrade Required', // RFC 2817 - 500 : 'Internal Server Error', - 501 : 'Not Implemented', - 502 : 'Bad Gateway', - 503 : 'Service Unavailable', - 504 : 'Gateway Time-out', - 505 : 'HTTP Version not supported', - 506 : 'Variant Also Negotiates', // RFC 2295 - 507 : 'Insufficient Storage', // RFC 4918 - 509 : 'Bandwidth Limit Exceeded', - 510 : 'Not Extended' // RFC 2774 -}; - -// The Shred object itself constructs the `Request` object. You should rarely -// need to do this directly. - -var Request = function(options) { - this.log = options.logger; - this.cookieJar = options.cookieJar; - this.encoding = options.encoding; - this.logCurl = options.logCurl; - processOptions(this,options||{}); - createRequest(this); -}; - -// A `Request` has a number of properties, many of which help with details like -// URL parsing or defaulting the port for the request. - -Object.defineProperties(Request.prototype, { - -// - **url**. You can set the `url` property with a valid URL string and all the -// URL-related properties (host, port, etc.) will be automatically set on the -// request object. - - url: { - get: function() { - if (!this.scheme) { return null; } - return sprintf("%s://%s:%s%s", - this.scheme, this.host, this.port, - (this.proxy ? "/" : this.path) + - (this.query ? ("?" + this.query) : "")); - }, - set: function(_url) { - _url = parseUri(_url); - this.scheme = _url.protocol; - this.host = _url.host; - this.port = _url.port; - this.path = _url.path; - this.query = _url.query; - return this; - }, - enumerable: true - }, - -// - **headers**. Returns a hash representing the request headers. You can't set -// this directly, only get it. You can add or modify headers by using the -// `setHeader` or `setHeaders` method. This ensures that the headers are -// normalized - that is, you don't accidentally send `Content-Type` and -// `content-type` headers. Keep in mind that if you modify the returned hash, -// it will *not* modify the request headers. - - headers: { - get: function() { - return this.getHeaders(); - }, - enumerable: true - }, - -// - **port**. Unless you set the `port` explicitly or include it in the URL, it -// will default based on the scheme. - - port: { - get: function() { - if (!this._port) { - switch(this.scheme) { - case "https": return this._port = 443; - case "http": - default: return this._port = 80; - } - } - return this._port; - }, - set: function(value) { this._port = value; return this; }, - enumerable: true - }, - -// - **method**. The request method - `get`, `put`, `post`, etc. that will be -// used to make the request. Defaults to `get`. - - method: { - get: function() { - return this._method = (this._method||"GET"); - }, - set: function(value) { - this._method = value; return this; - }, - enumerable: true - }, - -// - **query**. Can be set either with a query string or a hash (object). Get -// will always return a properly escaped query string or null if there is no -// query component for the request. - - query: { - get: function() {return this._query;}, - set: function(value) { - var stringify = function (hash) { - var query = ""; - for (var key in hash) { - query += encodeURIComponent(key) + '=' + encodeURIComponent(hash[key]) + '&'; - } - // Remove the last '&' - query = query.slice(0, -1); - return query; - } - - if (value) { - if (typeof value === 'object') { - value = stringify(value); - } - this._query = value; - } else { - this._query = ""; - } - return this; - }, - enumerable: true - }, - -// - **parameters**. This will return the query parameters in the form of a hash -// (object). - - parameters: { - get: function() { return QueryString.parse(this._query||""); }, - enumerable: true - }, - -// - **content**. (Aliased as `body`.) Set this to add a content entity to the -// request. Attempts to use the `content-type` header to determine what to do -// with the content value. Get this to get back a [`Content` -// object](./content.html). - - body: { - get: function() { return this._body; }, - set: function(value) { - this._body = new Content({ - data: value, - type: this.getHeader("Content-Type") - }); - this.setHeader("Content-Type",this.content.type); - this.setHeader("Content-Length",this.content.length); - return this; - }, - enumerable: true - }, - -// - **timeout**. Used to determine how long to wait for a response. Does not -// distinguish between connect timeouts versus request timeouts. Set either in -// milliseconds or with an object with temporal attributes (hours, minutes, -// seconds) and convert it into milliseconds. Get will always return -// milliseconds. - - timeout: { - get: function() { return this._timeout; }, // in milliseconds - set: function(timeout) { - var request = this - , milliseconds = 0; - ; - if (!timeout) return this; - if (typeof timeout==="number") { milliseconds = timeout; } - else { - milliseconds = (timeout.milliseconds||0) + - (1000 * ((timeout.seconds||0) + - (60 * ((timeout.minutes||0) + - (60 * (timeout.hours||0)))))); - } - this._timeout = milliseconds; - return this; - }, - enumerable: true - } -}); - -// Alias `body` property to `content`. Since the [content object](./content.html) -// has a `body` attribute, it's preferable to use `content` since you can then -// access the raw content data using `content.body`. - -Object.defineProperty(Request.prototype,"content", - Object.getOwnPropertyDescriptor(Request.prototype, "body")); - -// The `Request` object can be pretty overwhelming to view using the built-in -// Node.js inspect method. We want to make it a bit more manageable. This -// probably goes [too far in the other -// direction](https://github.com/spire-io/shred/issues/2). - -Request.prototype.inspect = function () { - var request = this; - var headers = this.format_headers(); - var summary = ["<Shred Request> ", request.method.toUpperCase(), - request.url].join(" ") - return [ summary, "- Headers:", headers].join("\n"); -}; - -Request.prototype.format_headers = function () { - var array = [] - var headers = this._headers - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - var value = headers[key] - array.push("\t" + key + ": " + value); - } - } - return array.join("\n"); -}; - -// Allow chainable 'on's: shred.get({ ... }).on( ... ). You can pass in a -// single function, a pair (event, function), or a hash: -// { event: function, event: function } -Request.prototype.on = function (eventOrHash, listener) { - var emitter = this.emitter; - // Pass in a single argument as a function then make it the default response handler - if (arguments.length === 1 && typeof(eventOrHash) === 'function') { - emitter.on('response', eventOrHash); - } else if (arguments.length === 1 && typeof(eventOrHash) === 'object') { - for (var key in eventOrHash) { - if (eventOrHash.hasOwnProperty(key)) { - emitter.on(key, eventOrHash[key]); - } - } - } else { - emitter.on(eventOrHash, listener); - } - return this; -}; - -// Add in the header methods. Again, these ensure we don't get the same header -// multiple times with different case conventions. -HeaderMixins.gettersAndSetters(Request); - -// `processOptions` is called from the constructor to handle all the work -// associated with making sure we do our best to ensure we have a valid request. - -var processOptions = function(request,options) { - - request.log.debug("Processing request options .."); - - // We'll use `request.emitter` to manage the `on` event handlers. - request.emitter = (new Emitter); - - request.agent = options.agent; - - // Set up the handlers ... - if (options.on) { - for (var key in options.on) { - if (options.on.hasOwnProperty(key)) { - request.emitter.on(key, options.on[key]); - } - } - } - - // Make sure we were give a URL or a host - if (!options.url && !options.host) { - request.emitter.emit("request_error", - new Error("No url or url options (host, port, etc.)")); - return; - } - - // Allow for the [use of a proxy](http://www.jmarshall.com/easy/http/#proxies). - - if (options.url) { - if (options.proxy) { - request.url = options.proxy; - request.path = options.url; - } else { - request.url = options.url; - } - } - - // Set the remaining options. - request.query = options.query||options.parameters||request.query ; - request.method = options.method; - request.setHeader("user-agent",options.agent||"Shred"); - request.setHeaders(options.headers); - - if (request.cookieJar) { - var cookies = request.cookieJar.getCookies( CookieAccessInfo( request.host, request.path ) ); - if (cookies.length) { - var cookieString = request.getHeader('cookie')||''; - for (var cookieIndex = 0; cookieIndex < cookies.length; ++cookieIndex) { - if ( cookieString.length && cookieString[ cookieString.length - 1 ] != ';' ) - { - cookieString += ';'; - } - cookieString += cookies[ cookieIndex ].name + '=' + cookies[ cookieIndex ].value + ';'; - } - request.setHeader("cookie", cookieString); - } - } - - // The content entity can be set either using the `body` or `content` attributes. - if (options.body||options.content) { - request.content = options.body||options.content; - } - request.timeout = options.timeout; - -}; - -// `createRequest` is also called by the constructor, after `processOptions`. -// This actually makes the request and processes the response, so `createRequest` -// is a bit of a misnomer. - -var createRequest = function(request) { - var timeout ; - - request.log.debug("Creating request .."); - request.log.debug(request); - - var reqParams = { - host: request.host, - port: request.port, - method: request.method, - path: request.path + (request.query ? '?'+request.query : ""), - headers: request.getHeaders(), - // Node's HTTP/S modules will ignore this, but we are using the - // browserify-http module in the browser for both HTTP and HTTPS, and this - // is how you differentiate the two. - scheme: request.scheme, - // Use a provided agent. 'Undefined' is the default, which uses a global - // agent. - agent: request.agent - }; - - if (request.logCurl) { - logCurl(request); - } - - var http = request.scheme == "http" ? HTTP : HTTPS; - - // Set up the real request using the selected library. The request won't be - // sent until we call `.end()`. - request._raw = http.request(reqParams, function(response) { - request.log.debug("Received response .."); - - // We haven't timed out and we have a response, so make sure we clear the - // timeout so it doesn't fire while we're processing the response. - clearTimeout(timeout); - - // Construct a Shred `Response` object from the response. This will stream - // the response, thus the need for the callback. We can access the response - // entity safely once we're in the callback. - response = new Response(response, request, function(response) { - - // Set up some event magic. The precedence is given first to - // status-specific handlers, then to responses for a given event, and then - // finally to the more general `response` handler. In the last case, we - // need to first make sure we're not dealing with a a redirect. - var emit = function(event) { - var emitter = request.emitter; - var textStatus = STATUS_CODES[response.status] ? STATUS_CODES[response.status].toLowerCase() : null; - if (emitter.listeners(response.status).length > 0 || emitter.listeners(textStatus).length > 0) { - emitter.emit(response.status, response); - emitter.emit(textStatus, response); - } else { - if (emitter.listeners(event).length>0) { - emitter.emit(event, response); - } else if (!response.isRedirect) { - emitter.emit("response", response); - //console.warn("Request has no event listener for status code " + response.status); - } - } - }; - - // Next, check for a redirect. We simply repeat the request with the URL - // given in the `Location` header. We fire a `redirect` event. - if (response.isRedirect) { - request.log.debug("Redirecting to " - + response.getHeader("Location")); - request.url = response.getHeader("Location"); - emit("redirect"); - createRequest(request); - - // Okay, it's not a redirect. Is it an error of some kind? - } else if (response.isError) { - emit("error"); - } else { - // It looks like we're good shape. Trigger the `success` event. - emit("success"); - } - }); - }); - - // We're still setting up the request. Next, we're going to handle error cases - // where we have no response. We don't emit an error event because that event - // takes a response. We don't response handlers to have to check for a null - // value. However, we [should introduce a different event - // type](https://github.com/spire-io/shred/issues/3) for this type of error. - request._raw.on("error", function(error) { - request.emitter.emit("request_error", error); - }); - - request._raw.on("socket", function(socket) { - request.emitter.emit("socket", socket); - }); - - // TCP timeouts should also trigger the "response_error" event. - request._raw.on('socket', function () { - request._raw.socket.on('timeout', function () { - // This should trigger the "error" event on the raw request, which will - // trigger the "response_error" on the shred request. - request._raw.abort(); - }); - }); - - - // We're almost there. Next, we need to write the request entity to the - // underlying request object. - if (request.content) { - request.log.debug("Streaming body: '" + - request.content.data.slice(0,59) + "' ... "); - request._raw.write(request.content.data); - } - - // Finally, we need to set up the timeout. We do this last so that we don't - // start the clock ticking until the last possible moment. - if (request.timeout) { - timeout = setTimeout(function() { - request.log.debug("Timeout fired, aborting request ..."); - request._raw.abort(); - request.emitter.emit("timeout", request); - },request.timeout); - } - - // The `.end()` method will cause the request to fire. Technically, it might - // have already sent the headers and body. - request.log.debug("Sending request ..."); - request._raw.end(); -}; - -// Logs the curl command for the request. -var logCurl = function (req) { - var headers = req.getHeaders(); - var headerString = ""; - - for (var key in headers) { - headerString += '-H "' + key + ": " + headers[key] + '" '; - } - - var bodyString = "" - - if (req.content) { - bodyString += "-d '" + req.content.body + "' "; - } - - var query = req.query ? '?' + req.query : ""; - - console.log("curl " + - "-X " + req.method.toUpperCase() + " " + - req.scheme + "://" + req.host + ":" + req.port + req.path + query + " " + - headerString + - bodyString - ); -}; - - -module.exports = Request; - -}); - -require.define("http", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("https", function (require, module, exports, __dirname, __filename) { - // todo - -}); - -require.define("/shred/parseUri.js", function (require, module, exports, __dirname, __filename) { - // parseUri 1.2.2 -// (c) Steven Levithan <stevenlevithan.com> -// MIT License - -function parseUri (str) { - var o = parseUri.options, - m = o.parser[o.strictMode ? "strict" : "loose"].exec(str), - uri = {}, - i = 14; - - while (i--) uri[o.key[i]] = m[i] || ""; - - uri[o.q.name] = {}; - uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { - if ($1) uri[o.q.name][$1] = $2; - }); - - return uri; -}; - -parseUri.options = { - strictMode: false, - key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], - q: { - name: "queryKey", - parser: /(?:^|&)([^&=]*)=?([^&]*)/g - }, - parser: { - strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, - loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ - } -}; - -module.exports = parseUri; - -}); - -require.define("events", function (require, module, exports, __dirname, __filename) { - if (!process.EventEmitter) process.EventEmitter = function () {}; - -var EventEmitter = exports.EventEmitter = process.EventEmitter; -var isArray = typeof Array.isArray === 'function' - ? Array.isArray - : function (xs) { - return Object.toString.call(xs) === '[object Array]' - } -; - -// By default EventEmitters will print a warning if more than -// 10 listeners are added to it. This is a useful default which -// helps finding memory leaks. -// -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -var defaultMaxListeners = 10; -EventEmitter.prototype.setMaxListeners = function(n) { - if (!this._events) this._events = {}; - this._events.maxListeners = n; -}; - - -EventEmitter.prototype.emit = function(type) { - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events || !this._events.error || - (isArray(this._events.error) && !this._events.error.length)) - { - if (arguments[1] instanceof Error) { - throw arguments[1]; // Unhandled 'error' event - } else { - throw new Error("Uncaught, unspecified 'error' event."); - } - return false; - } - } - - if (!this._events) return false; - var handler = this._events[type]; - if (!handler) return false; - - if (typeof handler == 'function') { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - var args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - return true; - - } else if (isArray(handler)) { - var args = Array.prototype.slice.call(arguments, 1); - - var listeners = handler.slice(); - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - return true; - - } else { - return false; - } -}; - -// EventEmitter is defined in src/node_events.cc -// EventEmitter.prototype.emit() is also defined there. -EventEmitter.prototype.addListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('addListener only takes instances of Function'); - } - - if (!this._events) this._events = {}; - - // To avoid recursion in the case that type == "newListeners"! Before - // adding it to the listeners, first emit "newListeners". - this.emit('newListener', type, listener); - - if (!this._events[type]) { - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - } else if (isArray(this._events[type])) { - - // Check for listener leak - if (!this._events[type].warned) { - var m; - if (this._events.maxListeners !== undefined) { - m = this._events.maxListeners; - } else { - m = defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - console.trace(); - } - } - - // If we've already got an array, just append. - this._events[type].push(listener); - } else { - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - var self = this; - self.on(type, function g() { - self.removeListener(type, g); - listener.apply(this, arguments); - }); - - return this; -}; - -EventEmitter.prototype.removeListener = function(type, listener) { - if ('function' !== typeof listener) { - throw new Error('removeListener only takes instances of Function'); - } - - // does not use listeners(), so no side effect of creating _events[type] - if (!this._events || !this._events[type]) return this; - - var list = this._events[type]; - - if (isArray(list)) { - var i = list.indexOf(listener); - if (i < 0) return this; - list.splice(i, 1); - if (list.length == 0) - delete this._events[type]; - } else if (this._events[type] === listener) { - delete this._events[type]; - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - // does not use listeners(), so no side effect of creating _events[type] - if (type && this._events && this._events[type]) this._events[type] = null; - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - if (!this._events) this._events = {}; - if (!this._events[type]) this._events[type] = []; - if (!isArray(this._events[type])) { - this._events[type] = [this._events[type]]; - } - return this._events[type]; -}; - -}); - -require.define("/node_modules/sprintf/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"./lib/sprintf"} -}); - -require.define("/node_modules/sprintf/lib/sprintf.js", function (require, module, exports, __dirname, __filename) { - /** -sprintf() for JavaScript 0.7-beta1 -http://www.diveintojavascript.com/projects/javascript-sprintf - -Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of sprintf() for JavaScript nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -Changelog: -2010.11.07 - 0.7-beta1-node - - converted it to a node.js compatible module - -2010.09.06 - 0.7-beta1 - - features: vsprintf, support for named placeholders - - enhancements: format cache, reduced global namespace pollution - -2010.05.22 - 0.6: - - reverted to 0.4 and fixed the bug regarding the sign of the number 0 - Note: - Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/) - who warned me about a bug in 0.5, I discovered that the last update was - a regress. I appologize for that. - -2010.05.09 - 0.5: - - bug fix: 0 is now preceeded with a + sign - - bug fix: the sign was not at the right position on padded results (Kamal Abdali) - - switched from GPL to BSD license - -2007.10.21 - 0.4: - - unit test and patch (David Baird) - -2007.09.17 - 0.3: - - bug fix: no longer throws exception on empty paramenters (Hans Pufal) - -2007.09.11 - 0.2: - - feature: added argument swapping - -2007.04.03 - 0.1: - - initial release -**/ - -var sprintf = (function() { - function get_type(variable) { - return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase(); - } - function str_repeat(input, multiplier) { - for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */} - return output.join(''); - } - - var str_format = function() { - if (!str_format.cache.hasOwnProperty(arguments[0])) { - str_format.cache[arguments[0]] = str_format.parse(arguments[0]); - } - return str_format.format.call(null, str_format.cache[arguments[0]], arguments); - }; - - str_format.format = function(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length; - for (i = 0; i < tree_length; i++) { - node_type = get_type(parse_tree[i]); - if (node_type === 'string') { - output.push(parse_tree[i]); - } - else if (node_type === 'array') { - match = parse_tree[i]; // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor]; - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw(sprintf('[sprintf] property "%s" does not exist', match[2][k])); - } - arg = arg[match[2][k]]; - } - } - else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]]; - } - else { // positional argument (implicit) - arg = argv[cursor++]; - } - - if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) { - throw(sprintf('[sprintf] expecting number but found %s', get_type(arg))); - } - switch (match[8]) { - case 'b': arg = arg.toString(2); break; - case 'c': arg = String.fromCharCode(arg); break; - case 'd': arg = parseInt(arg, 10); break; - case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break; - case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break; - case 'o': arg = arg.toString(8); break; - case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break; - case 'u': arg = Math.abs(arg); break; - case 'x': arg = arg.toString(16); break; - case 'X': arg = arg.toString(16).toUpperCase(); break; - } - arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg); - pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' '; - pad_length = match[6] - String(arg).length; - pad = match[6] ? str_repeat(pad_character, pad_length) : ''; - output.push(match[5] ? arg + pad : pad + arg); - } - } - return output.join(''); - }; - - str_format.cache = {}; - - str_format.parse = function(fmt) { - var _fmt = fmt, match = [], parse_tree = [], arg_names = 0; - while (_fmt) { - if ((match = /^[^\x25]+/.exec(_fmt)) !== null) { - parse_tree.push(match[0]); - } - else if ((match = /^\x25{2}/.exec(_fmt)) !== null) { - parse_tree.push('%'); - } - else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1; - var field_list = [], replacement_field = match[2], field_match = []; - if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) { - field_list.push(field_match[1]); - } - else { - throw('[sprintf] huh?'); - } - } - } - else { - throw('[sprintf] huh?'); - } - match[2] = field_list; - } - else { - arg_names |= 2; - } - if (arg_names === 3) { - throw('[sprintf] mixing positional and named placeholders is not (yet) supported'); - } - parse_tree.push(match); - } - else { - throw('[sprintf] huh?'); - } - _fmt = _fmt.substring(match[0].length); - } - return parse_tree; - }; - - return str_format; -})(); - -var vsprintf = function(fmt, argv) { - argv.unshift(fmt); - return sprintf.apply(null, argv); -}; - -exports.sprintf = sprintf; -exports.vsprintf = vsprintf; -}); - -require.define("/shred/response.js", function (require, module, exports, __dirname, __filename) { - // The `Response object` encapsulates a Node.js HTTP response. - -var Content = require("./content") - , HeaderMixins = require("./mixins/headers") - , CookieJarLib = require( "cookiejar" ) - , Cookie = CookieJarLib.Cookie -; - -// Browser doesn't have zlib. -var zlib = null; -try { - zlib = require('zlib'); -} catch (e) { - console.warn("no zlib library"); -} - -// Iconv doesn't work in browser -var Iconv = null; -try { - Iconv = require('iconv-lite'); -} catch (e) { - console.warn("no iconv library"); -} - -// Construct a `Response` object. You should never have to do this directly. The -// `Request` object handles this, getting the raw response object and passing it -// in here, along with the request. The callback allows us to stream the response -// and then use the callback to let the request know when it's ready. -var Response = function(raw, request, callback) { - var response = this; - this._raw = raw; - - // The `._setHeaders` method is "private"; you can't otherwise set headers on - // the response. - this._setHeaders.call(this,raw.headers); - - // store any cookies - if (request.cookieJar && this.getHeader('set-cookie')) { - var cookieStrings = this.getHeader('set-cookie'); - var cookieObjs = [] - , cookie; - - for (var i = 0; i < cookieStrings.length; i++) { - var cookieString = cookieStrings[i]; - if (!cookieString) { - continue; - } - - if (!cookieString.match(/domain\=/i)) { - cookieString += '; domain=' + request.host; - } - - if (!cookieString.match(/path\=/i)) { - cookieString += '; path=' + request.path; - } - - try { - cookie = new Cookie(cookieString); - if (cookie) { - cookieObjs.push(cookie); - } - } catch (e) { - console.warn("Tried to set bad cookie: " + cookieString); - } - } - - request.cookieJar.setCookies(cookieObjs); - } - - this.request = request; - this.client = request.client; - this.log = this.request.log; - - // Stream the response content entity and fire the callback when we're done. - // Store the incoming data in a array of Buffers which we concatinate into one - // buffer at the end. We need to use buffers instead of strings here in order - // to preserve binary data. - var chunkBuffers = []; - var dataLength = 0; - raw.on("data", function(chunk) { - chunkBuffers.push(chunk); - dataLength += chunk.length; - }); - raw.on("end", function() { - var body; - if (typeof Buffer === 'undefined') { - // Just concatinate into a string - body = chunkBuffers.join(''); - } else { - // Initialize new buffer and add the chunks one-at-a-time. - body = new Buffer(dataLength); - for (var i = 0, pos = 0; i < chunkBuffers.length; i++) { - chunkBuffers[i].copy(body, pos); - pos += chunkBuffers[i].length; - } - } - - var setBodyAndFinish = function (body) { - response._body = new Content({ - body: body, - type: response.getHeader("Content-Type") - }); - callback(response); - } - - if (zlib && response.getHeader("Content-Encoding") === 'gzip'){ - zlib.gunzip(body, function (err, gunzippedBody) { - if (Iconv && response.request.encoding){ - body = Iconv.fromEncoding(gunzippedBody,response.request.encoding); - } else { - body = gunzippedBody.toString(); - } - setBodyAndFinish(body); - }) - } - else{ - if (response.request.encoding){ - body = Iconv.fromEncoding(body,response.request.encoding); - } - setBodyAndFinish(body); - } - }); -}; - -// The `Response` object can be pretty overwhelming to view using the built-in -// Node.js inspect method. We want to make it a bit more manageable. This -// probably goes [too far in the other -// direction](https://github.com/spire-io/shred/issues/2). - -Response.prototype = { - inspect: function() { - var response = this; - var headers = this.format_headers(); - var summary = ["<Shred Response> ", response.status].join(" ") - return [ summary, "- Headers:", headers].join("\n"); - }, - format_headers: function () { - var array = [] - var headers = this._headers - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - var value = headers[key] - array.push("\t" + key + ": " + value); - } - } - return array.join("\n"); - } -}; - -// `Response` object properties, all of which are read-only: -Object.defineProperties(Response.prototype, { - -// - **status**. The HTTP status code for the response. - status: { - get: function() { return this._raw.statusCode; }, - enumerable: true - }, - -// - **content**. The HTTP content entity, if any. Provided as a [content -// object](./content.html), which will attempt to convert the entity based upon -// the `content-type` header. The converted value is available as -// `content.data`. The original raw content entity is available as -// `content.body`. - body: { - get: function() { return this._body; } - }, - content: { - get: function() { return this.body; }, - enumerable: true - }, - -// - **isRedirect**. Is the response a redirect? These are responses with 3xx -// status and a `Location` header. - isRedirect: { - get: function() { - return (this.status>299 - &&this.status<400 - &&this.getHeader("Location")); - }, - enumerable: true - }, - -// - **isError**. Is the response an error? These are responses with status of -// 400 or greater. - isError: { - get: function() { - return (this.status === 0 || this.status > 399) - }, - enumerable: true - } -}); - -// Add in the [getters for accessing the normalized headers](./headers.js). -HeaderMixins.getters(Response); -HeaderMixins.privateSetters(Response); - -// Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes -// getAllResponseHeaders() to return {} if the response is a CORS request. -// xhr.getHeader still works correctly. -var getHeader = Response.prototype.getHeader; -Response.prototype.getHeader = function (name) { - return (getHeader.call(this,name) || - (typeof this._raw.getHeader === 'function' && this._raw.getHeader(name))); -}; - -module.exports = Response; - -}); - -require.define("/shred/content.js", function (require, module, exports, __dirname, __filename) { - -// The purpose of the `Content` object is to abstract away the data conversions -// to and from raw content entities as strings. For example, you want to be able -// to pass in a Javascript object and have it be automatically converted into a -// JSON string if the `content-type` is set to a JSON-based media type. -// Conversely, you want to be able to transparently get back a Javascript object -// in the response if the `content-type` is a JSON-based media-type. - -// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). - -// The `Content` constructor takes an options object, which *must* have either a -// `body` or `data` property and *may* have a `type` property indicating the -// media type. If there is no `type` attribute, a default will be inferred. -var Content = function(options) { - this.body = options.body; - this.data = options.data; - this.type = options.type; -}; - -Content.prototype = { - // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. - // - // toString: function() { return this.body; } - // - // Commented out, but I've forgotten why. :/ -}; - - -// `Content` objects have the following attributes: -Object.defineProperties(Content.prototype,{ - -// - **type**. Typically accessed as `content.type`, reflects the `content-type` -// header associated with the request or response. If not passed as an options -// to the constructor or set explicitly, it will infer the type the `data` -// attribute, if possible, and, failing that, will default to `text/plain`. - type: { - get: function() { - if (this._type) { - return this._type; - } else { - if (this._data) { - switch(typeof this._data) { - case "string": return "text/plain"; - case "object": return "application/json"; - } - } - } - return "text/plain"; - }, - set: function(value) { - this._type = value; - return this; - }, - enumerable: true - }, - -// - **data**. Typically accessed as `content.data`, reflects the content entity -// converted into Javascript data. This can be a string, if the `type` is, say, -// `text/plain`, but can also be a Javascript object. The conversion applied is -// based on the `processor` attribute. The `data` attribute can also be set -// directly, in which case the conversion will be done the other way, to infer -// the `body` attribute. - data: { - get: function() { - if (this._body) { - return this.processor.parser(this._body); - } else { - return this._data; - } - }, - set: function(data) { - if (this._body&&data) Errors.setDataWithBody(this); - this._data = data; - return this; - }, - enumerable: true - }, - -// - **body**. Typically accessed as `content.body`, reflects the content entity -// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the -// `data` attribute, the `body` attribute will be inferred and vice-versa. If -// you attempt to set both, an exception is raised. - body: { - get: function() { - if (this._data) { - return this.processor.stringify(this._data); - } else { - return this.processor.stringify(this._body); - } - }, - set: function(body) { - if (this._data&&body) Errors.setBodyWithData(this); - this._body = body; - return this; - }, - enumerable: true - }, - -// - **processor**. The functions that will be used to convert to/from `data` and -// `body` attributes. You can add processors. The two that are built-in are for -// `text/plain`, which is basically an identity transformation and -// `application/json` and other JSON-based media types (including custom media -// types with `+json`). You can add your own processors. See below. - processor: { - get: function() { - var processor = Content.processors[this.type]; - if (processor) { - return processor; - } else { - // Return the first processor that matches any part of the - // content type. ex: application/vnd.foobar.baz+json will match json. - var main = this.type.split(";")[0]; - var parts = main.split(/\+|\//); - for (var i=0, l=parts.length; i < l; i++) { - processor = Content.processors[parts[i]] - } - return processor || {parser:identity,stringify:toString}; - } - }, - enumerable: true - }, - -// - **length**. Typically accessed as `content.length`, returns the length in -// bytes of the raw content entity. - length: { - get: function() { - if (typeof Buffer !== 'undefined') { - return Buffer.byteLength(this.body); - } - return this.body.length; - } - } -}); - -Content.processors = {}; - -// The `registerProcessor` function allows you to add your own processors to -// convert content entities. Each processor consists of a Javascript object with -// two properties: -// - **parser**. The function used to parse a raw content entity and convert it -// into a Javascript data type. -// - **stringify**. The function used to convert a Javascript data type into a -// raw content entity. -Content.registerProcessor = function(types,processor) { - -// You can pass an array of types that will trigger this processor, or just one. -// We determine the array via duck-typing here. - if (types.forEach) { - types.forEach(function(type) { - Content.processors[type] = processor; - }); - } else { - // If you didn't pass an array, we just use what you pass in. - Content.processors[types] = processor; - } -}; - -// Register the identity processor, which is used for text-based media types. -var identity = function(x) { return x; } - , toString = function(x) { return x.toString(); } -Content.registerProcessor( - ["text/html","text/plain","text"], - { parser: identity, stringify: toString }); - -// Register the JSON processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/json; charset=utf-8","application/json","json"], - { - parser: function(string) { - return JSON.parse(string); - }, - stringify: function(data) { - return JSON.stringify(data); }}); - -// Error functions are defined separately here in an attempt to make the code -// easier to read. -var Errors = { - setDataWithBody: function(object) { - throw new Error("Attempt to set data attribute of a content object " + - "when the body attributes was already set."); - }, - setBodyWithData: function(object) { - throw new Error("Attempt to set body attribute of a content object " + - "when the data attributes was already set."); - } -} -module.exports = Content; - -}); - -require.define("/shred/mixins/headers.js", function (require, module, exports, __dirname, __filename) { - // The header mixins allow you to add HTTP header support to any object. This -// might seem pointless: why not simply use a hash? The main reason is that, per -// the [HTTP spec](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), -// headers are case-insensitive. So, for example, `content-type` is the same as -// `CONTENT-TYPE` which is the same as `Content-Type`. Since there is no way to -// overload the index operator in Javascript, using a hash to represent the -// headers means it's possible to have two conflicting values for a single -// header. -// -// The solution to this is to provide explicit methods to set or get headers. -// This also has the benefit of allowing us to introduce additional variations, -// including snake case, which we automatically convert to what Matthew King has -// dubbed "corset case" - the hyphen-separated names with initial caps: -// `Content-Type`. We use corset-case just in case we're dealing with servers -// that haven't properly implemented the spec. - -// Convert headers to corset-case. **Example:** `CONTENT-TYPE` will be converted -// to `Content-Type`. - -var corsetCase = function(string) { - return string.toLowerCase() - //.replace("_","-") - .replace(/(^|-)(\w)/g, - function(s) { return s.toUpperCase(); }); -}; - -// We suspect that `initializeHeaders` was once more complicated ... -var initializeHeaders = function(object) { - return {}; -}; - -// Access the `_headers` property using lazy initialization. **Warning:** If you -// mix this into an object that is using the `_headers` property already, you're -// going to have trouble. -var $H = function(object) { - return object._headers||(object._headers=initializeHeaders(object)); -}; - -// Hide the implementations as private functions, separate from how we expose them. - -// The "real" `getHeader` function: get the header after normalizing the name. -var getHeader = function(object,name) { - return $H(object)[corsetCase(name)]; -}; - -// The "real" `getHeader` function: get one or more headers, or all of them -// if you don't ask for any specifics. -var getHeaders = function(object,names) { - var keys = (names && names.length>0) ? names : Object.keys($H(object)); - var hash = keys.reduce(function(hash,key) { - hash[key] = getHeader(object,key); - return hash; - },{}); - // Freeze the resulting hash so you don't mistakenly think you're modifying - // the real headers. - Object.freeze(hash); - return hash; -}; - -// The "real" `setHeader` function: set a header, after normalizing the name. -var setHeader = function(object,name,value) { - $H(object)[corsetCase(name)] = value; - return object; -}; - -// The "real" `setHeaders` function: set multiple headers based on a hash. -var setHeaders = function(object,hash) { - for( var key in hash ) { setHeader(object,key,hash[key]); }; - return this; -}; - -// Here's where we actually bind the functionality to an object. These mixins work by -// exposing mixin functions. Each function mixes in a specific batch of features. -module.exports = { - - // Add getters. - getters: function(constructor) { - constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; - constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; - }, - // Add setters but as "private" methods. - privateSetters: function(constructor) { - constructor.prototype._setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype._setHeaders = function(hash) { return setHeaders(this,hash); }; - }, - // Add setters. - setters: function(constructor) { - constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; - }, - // Add both getters and setters. - gettersAndSetters: function(constructor) { - constructor.prototype.getHeader = function(name) { return getHeader(this,name); }; - constructor.prototype.getHeaders = function() { return getHeaders(this,arguments); }; - constructor.prototype.setHeader = function(key,value) { return setHeader(this,key,value); }; - constructor.prototype.setHeaders = function(hash) { return setHeaders(this,hash); }; - }, -}; - -}); - -require.define("/node_modules/iconv-lite/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {} -}); - -require.define("/node_modules/iconv-lite/index.js", function (require, module, exports, __dirname, __filename) { - // Module exports -var iconv = module.exports = { - toEncoding: function(str, encoding) { - return iconv.getCodec(encoding).toEncoding(str); - }, - fromEncoding: function(buf, encoding) { - return iconv.getCodec(encoding).fromEncoding(buf); - }, - - defaultCharUnicode: '�', - defaultCharSingleByte: '?', - - // Get correct codec for given encoding. - getCodec: function(encoding) { - var enc = encoding || "utf8"; - var codecOptions = undefined; - while (1) { - if (getType(enc) === "String") - enc = enc.replace(/[- ]/g, "").toLowerCase(); - var codec = iconv.encodings[enc]; - var type = getType(codec); - if (type === "String") { - // Link to other encoding. - codecOptions = {originalEncoding: enc}; - enc = codec; - } - else if (type === "Object" && codec.type != undefined) { - // Options for other encoding. - codecOptions = codec; - enc = codec.type; - } - else if (type === "Function") - // Codec itself. - return codec(codecOptions); - else - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - }, - - // Define basic encodings - encodings: { - internal: function(options) { - return { - toEncoding: function(str) { - return new Buffer(ensureString(str), options.originalEncoding); - }, - fromEncoding: function(buf) { - return ensureBuffer(buf).toString(options.originalEncoding); - } - }; - }, - utf8: "internal", - ucs2: "internal", - binary: "internal", - ascii: "internal", - base64: "internal", - - // Codepage single-byte encodings. - singlebyte: function(options) { - // Prepare chars if needed - if (!options.chars || (options.chars.length !== 128 && options.chars.length !== 256)) - throw new Error("Encoding '"+options.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (options.chars.length === 128) - options.chars = asciiString + options.chars; - - if (!options.charsBuf) { - options.charsBuf = new Buffer(options.chars, 'ucs2'); - } - - if (!options.revCharsBuf) { - options.revCharsBuf = new Buffer(65536); - var defChar = iconv.defaultCharSingleByte.charCodeAt(0); - for (var i = 0; i < options.revCharsBuf.length; i++) - options.revCharsBuf[i] = defChar; - for (var i = 0; i < options.chars.length; i++) - options.revCharsBuf[options.chars.charCodeAt(i)] = i; - } - - return { - toEncoding: function(str) { - str = ensureString(str); - - var buf = new Buffer(str.length); - var revCharsBuf = options.revCharsBuf; - for (var i = 0; i < str.length; i++) - buf[i] = revCharsBuf[str.charCodeAt(i)]; - - return buf; - }, - fromEncoding: function(buf) { - buf = ensureBuffer(buf); - - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var charsBuf = options.charsBuf; - var newBuf = new Buffer(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0, _len = buf.length; i < _len; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = charsBuf[idx1]; - newBuf[idx2+1] = charsBuf[idx1+1]; - } - return newBuf.toString('ucs2'); - } - }; - }, - - // Codepage double-byte encodings. - table: function(options) { - var table = options.table, key, revCharsTable = options.revCharsTable; - if (!table) { - throw new Error("Encoding '" + options.type +"' has incorect 'table' option"); - } - if(!revCharsTable) { - revCharsTable = options.revCharsTable = {}; - for (key in table) { - revCharsTable[table[key]] = parseInt(key); - } - } - - return { - toEncoding: function(str) { - str = ensureString(str); - var strLen = str.length; - var bufLen = strLen; - for (var i = 0; i < strLen; i++) - if (str.charCodeAt(i) >> 7) - bufLen++; - - var newBuf = new Buffer(bufLen), gbkcode, unicode, - defaultChar = revCharsTable[iconv.defaultCharUnicode.charCodeAt(0)]; - - for (var i = 0, j = 0; i < strLen; i++) { - unicode = str.charCodeAt(i); - if (unicode >> 7) { - gbkcode = revCharsTable[unicode] || defaultChar; - newBuf[j++] = gbkcode >> 8; //high byte; - newBuf[j++] = gbkcode & 0xFF; //low byte - } else {//ascii - newBuf[j++] = unicode; - } - } - return newBuf; - }, - fromEncoding: function(buf) { - buf = ensureBuffer(buf); - var bufLen = buf.length, strLen = 0; - for (var i = 0; i < bufLen; i++) { - strLen++; - if (buf[i] & 0x80) //the high bit is 1, so this byte is gbkcode's high byte.skip next byte - i++; - } - var newBuf = new Buffer(strLen*2), unicode, gbkcode, - defaultChar = iconv.defaultCharUnicode.charCodeAt(0); - - for (var i = 0, j = 0; i < bufLen; i++, j+=2) { - gbkcode = buf[i]; - if (gbkcode & 0x80) { - gbkcode = (gbkcode << 8) + buf[++i]; - unicode = table[gbkcode] || defaultChar; - } else { - unicode = gbkcode; - } - newBuf[j] = unicode & 0xFF; //low byte - newBuf[j+1] = unicode >> 8; //high byte - } - return newBuf.toString('ucs2'); - } - } - } - } -}; - -// Add aliases to convert functions -iconv.encode = iconv.toEncoding; -iconv.decode = iconv.fromEncoding; - -// Load other encodings from files in /encodings dir. -var encodingsDir = __dirname+"/encodings/", - fs = require('fs'); -fs.readdirSync(encodingsDir).forEach(function(file) { - if(fs.statSync(encodingsDir + file).isDirectory()) return; - var encodings = require(encodingsDir + file) - for (var key in encodings) - iconv.encodings[key] = encodings[key] -}); - -// Utilities -var asciiString = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ - ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f'; - -var ensureBuffer = function(buf) { - buf = buf || new Buffer(0); - return (buf instanceof Buffer) ? buf : new Buffer(buf.toString(), "utf8"); -} - -var ensureString = function(str) { - str = str || ""; - return (str instanceof String) ? str : str.toString((str instanceof Buffer) ? 'utf8' : undefined); -} - -var getType = function(obj) { - return Object.prototype.toString.call(obj).slice(8, -1); -} - - -}); - -require.define("/node_modules/http-browserify/package.json", function (require, module, exports, __dirname, __filename) { - module.exports = {"main":"index.js","browserify":"browser.js"} -}); - -require.define("/node_modules/http-browserify/browser.js", function (require, module, exports, __dirname, __filename) { - var http = module.exports; -var EventEmitter = require('events').EventEmitter; -var Request = require('./lib/request'); - -http.request = function (params, cb) { - if (!params) params = {}; - if (!params.host) params.host = window.location.host.split(':')[0]; - if (!params.port) params.port = window.location.port; - - var req = new Request(new xhrHttp, params); - if (cb) req.on('response', cb); - return req; -}; - -http.get = function (params, cb) { - params.method = 'GET'; - var req = http.request(params, cb); - req.end(); - return req; -}; - -var xhrHttp = (function () { - if (typeof window === 'undefined') { - throw new Error('no window object present'); - } - else if (window.XMLHttpRequest) { - return window.XMLHttpRequest; - } - else if (window.ActiveXObject) { - var axs = [ - 'Msxml2.XMLHTTP.6.0', - 'Msxml2.XMLHTTP.3.0', - 'Microsoft.XMLHTTP' - ]; - for (var i = 0; i < axs.length; i++) { - try { - var ax = new(window.ActiveXObject)(axs[i]); - return function () { - if (ax) { - var ax_ = ax; - ax = null; - return ax_; - } - else { - return new(window.ActiveXObject)(axs[i]); - } - }; - } - catch (e) {} - } - throw new Error('ajax not supported in this browser') - } - else { - throw new Error('ajax not supported in this browser'); - } -})(); - -http.STATUS_CODES = { - 100 : 'Continue', - 101 : 'Switching Protocols', - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 - 200 : 'OK', - 201 : 'Created', - 202 : 'Accepted', - 203 : 'Non-Authoritative Information', - 204 : 'No Content', - 205 : 'Reset Content', - 206 : 'Partial Content', - 207 : 'Multi-Status', // RFC 4918 - 300 : 'Multiple Choices', - 301 : 'Moved Permanently', - 302 : 'Moved Temporarily', - 303 : 'See Other', - 304 : 'Not Modified', - 305 : 'Use Proxy', - 307 : 'Temporary Redirect', - 400 : 'Bad Request', - 401 : 'Unauthorized', - 402 : 'Payment Required', - 403 : 'Forbidden', - 404 : 'Not Found', - 405 : 'Method Not Allowed', - 406 : 'Not Acceptable', - 407 : 'Proxy Authentication Required', - 408 : 'Request Time-out', - 409 : 'Conflict', - 410 : 'Gone', - 411 : 'Length Required', - 412 : 'Precondition Failed', - 413 : 'Request Entity Too Large', - 414 : 'Request-URI Too Large', - 415 : 'Unsupported Media Type', - 416 : 'Requested Range Not Satisfiable', - 417 : 'Expectation Failed', - 418 : 'I\'m a teapot', // RFC 2324 - 422 : 'Unprocessable Entity', // RFC 4918 - 423 : 'Locked', // RFC 4918 - 424 : 'Failed Dependency', // RFC 4918 - 425 : 'Unordered Collection', // RFC 4918 - 426 : 'Upgrade Required', // RFC 2817 - 500 : 'Internal Server Error', - 501 : 'Not Implemented', - 502 : 'Bad Gateway', - 503 : 'Service Unavailable', - 504 : 'Gateway Time-out', - 505 : 'HTTP Version not supported', - 506 : 'Variant Also Negotiates', // RFC 2295 - 507 : 'Insufficient Storage', // RFC 4918 - 509 : 'Bandwidth Limit Exceeded', - 510 : 'Not Extended' // RFC 2774 -}; - -}); - -require.define("/node_modules/http-browserify/lib/request.js", function (require, module, exports, __dirname, __filename) { - var EventEmitter = require('events').EventEmitter; -var Response = require('./response'); -var isSafeHeader = require('./isSafeHeader'); - -var Request = module.exports = function (xhr, params) { - var self = this; - self.xhr = xhr; - self.body = ''; - - var uri = params.host + ':' + params.port + (params.path || '/'); - - xhr.open( - params.method || 'GET', - (params.scheme || 'http') + '://' + uri, - true - ); - - if (params.headers) { - Object.keys(params.headers).forEach(function (key) { - if (!isSafeHeader(key)) return; - var value = params.headers[key]; - if (Array.isArray(value)) { - value.forEach(function (v) { - xhr.setRequestHeader(key, v); - }); - } - else xhr.setRequestHeader(key, value) - }); - } - - var res = new Response(xhr); - res.on('ready', function () { - self.emit('response', res); - }); - - xhr.onreadystatechange = function () { - res.handle(xhr); - }; -}; - -Request.prototype = new EventEmitter; - -Request.prototype.setHeader = function (key, value) { - if ((Array.isArray && Array.isArray(value)) - || value instanceof Array) { - for (var i = 0; i < value.length; i++) { - this.xhr.setRequestHeader(key, value[i]); - } - } - else { - this.xhr.setRequestHeader(key, value); - } -}; - -Request.prototype.write = function (s) { - this.body += s; -}; - -Request.prototype.end = function (s) { - if (s !== undefined) this.write(s); - this.xhr.send(this.body); -}; - -}); - -require.define("/node_modules/http-browserify/lib/response.js", function (require, module, exports, __dirname, __filename) { - var EventEmitter = require('events').EventEmitter; -var isSafeHeader = require('./isSafeHeader'); - -var Response = module.exports = function (xhr) { - this.xhr = xhr; - this.offset = 0; -}; - -Response.prototype = new EventEmitter; - -var capable = { - streaming : true, - status2 : true -}; - -function parseHeaders (xhr) { - var lines = xhr.getAllResponseHeaders().split(/\r?\n/); - var headers = {}; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (line === '') continue; - - var m = line.match(/^([^:]+):\s*(.*)/); - if (m) { - var key = m[1].toLowerCase(), value = m[2]; - - if (headers[key] !== undefined) { - if ((Array.isArray && Array.isArray(headers[key])) - || headers[key] instanceof Array) { - headers[key].push(value); - } - else { - headers[key] = [ headers[key], value ]; - } - } - else { - headers[key] = value; - } - } - else { - headers[line] = true; - } - } - return headers; -} - -Response.prototype.getHeader = function (key) { - var header = this.headers ? this.headers[key.toLowerCase()] : null; - if (header) return header; - - // Work around Mozilla bug #608735 [https://bugzil.la/608735], which causes - // getAllResponseHeaders() to return {} if the response is a CORS request. - // xhr.getHeader still works correctly. - if (isSafeHeader(key)) { - return this.xhr.getResponseHeader(key); - } - return null; -}; - -Response.prototype.handle = function () { - var xhr = this.xhr; - if (xhr.readyState === 2 && capable.status2) { - try { - this.statusCode = xhr.status; - this.headers = parseHeaders(xhr); - } - catch (err) { - capable.status2 = false; - } - - if (capable.status2) { - this.emit('ready'); - } - } - else if (capable.streaming && xhr.readyState === 3) { - try { - if (!this.statusCode) { - this.statusCode = xhr.status; - this.headers = parseHeaders(xhr); - this.emit('ready'); - } - } - catch (err) {} - - try { - this.write(); - } - catch (err) { - capable.streaming = false; - } - } - else if (xhr.readyState === 4) { - if (!this.statusCode) { - this.statusCode = xhr.status; - this.emit('ready'); - } - this.write(); - - if (xhr.error) { - this.emit('error', xhr.responseText); - } - else this.emit('end'); - } -}; - -Response.prototype.write = function () { - var xhr = this.xhr; - if (xhr.responseText.length > this.offset) { - this.emit('data', xhr.responseText.slice(this.offset)); - this.offset = xhr.responseText.length; - } -}; - -}); - -require.define("/node_modules/http-browserify/lib/isSafeHeader.js", function (require, module, exports, __dirname, __filename) { - // Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html -var unsafeHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "cookie", - "cookie2", - "content-transfer-encoding", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "set-cookie", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -module.exports = function (headerName) { - if (!headerName) return false; - return (unsafeHeaders.indexOf(headerName.toLowerCase()) === -1) -}; - -}); - -require.alias("http-browserify", "/node_modules/http"); - -require.alias("http-browserify", "/node_modules/https"); \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred/content.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred/content.js deleted file mode 100644 index b8051fedd9e..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/shred/content.js +++ /dev/null @@ -1,193 +0,0 @@ - -// The purpose of the `Content` object is to abstract away the data conversions -// to and from raw content entities as strings. For example, you want to be able -// to pass in a Javascript object and have it be automatically converted into a -// JSON string if the `content-type` is set to a JSON-based media type. -// Conversely, you want to be able to transparently get back a Javascript object -// in the response if the `content-type` is a JSON-based media-type. - -// One limitation of the current implementation is that it [assumes the `charset` is UTF-8](https://github.com/spire-io/shred/issues/5). - -// The `Content` constructor takes an options object, which *must* have either a -// `body` or `data` property and *may* have a `type` property indicating the -// media type. If there is no `type` attribute, a default will be inferred. -var Content = function(options) { - this.body = options.body; - this.data = options.data; - this.type = options.type; -}; - -Content.prototype = { - // Treat `toString()` as asking for the `content.body`. That is, the raw content entity. - // - // toString: function() { return this.body; } - // - // Commented out, but I've forgotten why. :/ -}; - - -// `Content` objects have the following attributes: -Object.defineProperties(Content.prototype,{ - -// - **type**. Typically accessed as `content.type`, reflects the `content-type` -// header associated with the request or response. If not passed as an options -// to the constructor or set explicitly, it will infer the type the `data` -// attribute, if possible, and, failing that, will default to `text/plain`. - type: { - get: function() { - if (this._type) { - return this._type; - } else { - if (this._data) { - switch(typeof this._data) { - case "string": return "text/plain"; - case "object": return "application/json"; - } - } - } - return "text/plain"; - }, - set: function(value) { - this._type = value; - return this; - }, - enumerable: true - }, - -// - **data**. Typically accessed as `content.data`, reflects the content entity -// converted into Javascript data. This can be a string, if the `type` is, say, -// `text/plain`, but can also be a Javascript object. The conversion applied is -// based on the `processor` attribute. The `data` attribute can also be set -// directly, in which case the conversion will be done the other way, to infer -// the `body` attribute. - data: { - get: function() { - if (this._body) { - return this.processor.parser(this._body); - } else { - return this._data; - } - }, - set: function(data) { - if (this._body&&data) Errors.setDataWithBody(this); - this._data = data; - return this; - }, - enumerable: true - }, - -// - **body**. Typically accessed as `content.body`, reflects the content entity -// as a UTF-8 string. It is the mirror of the `data` attribute. If you set the -// `data` attribute, the `body` attribute will be inferred and vice-versa. If -// you attempt to set both, an exception is raised. - body: { - get: function() { - if (this._data) { - return this.processor.stringify(this._data); - } else { - return this._body.toString(); - } - }, - set: function(body) { - if (this._data&&body) Errors.setBodyWithData(this); - this._body = body; - return this; - }, - enumerable: true - }, - -// - **processor**. The functions that will be used to convert to/from `data` and -// `body` attributes. You can add processors. The two that are built-in are for -// `text/plain`, which is basically an identity transformation and -// `application/json` and other JSON-based media types (including custom media -// types with `+json`). You can add your own processors. See below. - processor: { - get: function() { - var processor = Content.processors[this.type]; - if (processor) { - return processor; - } else { - // Return the first processor that matches any part of the - // content type. ex: application/vnd.foobar.baz+json will match json. - var main = this.type.split(";")[0]; - var parts = main.split(/\+|\//); - for (var i=0, l=parts.length; i < l; i++) { - processor = Content.processors[parts[i]] - } - return processor || {parser:identity,stringify:toString}; - } - }, - enumerable: true - }, - -// - **length**. Typically accessed as `content.length`, returns the length in -// bytes of the raw content entity. - length: { - get: function() { - if (typeof Buffer !== 'undefined') { - return Buffer.byteLength(this.body); - } - return this.body.length; - } - } -}); - -Content.processors = {}; - -// The `registerProcessor` function allows you to add your own processors to -// convert content entities. Each processor consists of a Javascript object with -// two properties: -// - **parser**. The function used to parse a raw content entity and convert it -// into a Javascript data type. -// - **stringify**. The function used to convert a Javascript data type into a -// raw content entity. -Content.registerProcessor = function(types,processor) { - -// You can pass an array of types that will trigger this processor, or just one. -// We determine the array via duck-typing here. - if (types.forEach) { - types.forEach(function(type) { - Content.processors[type] = processor; - }); - } else { - // If you didn't pass an array, we just use what you pass in. - Content.processors[types] = processor; - } -}; - -// Register the identity processor, which is used for text-based media types. -var identity = function(x) { return x; } - , toString = function(x) { return x.toString(); } -Content.registerProcessor( - ["text/html","text/plain","text"], - { parser: identity, stringify: toString }); - -// Register the JSON processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/json; charset=utf-8","application/json","json"], - { - parser: function(string) { - return JSON.parse(string); - }, - stringify: function(data) { - return JSON.stringify(data); }}); - -var qs = require('querystring'); -// Register the post processor, which is used for JSON-based media types. -Content.registerProcessor( - ["application/x-www-form-urlencoded"], - { parser : qs.parse, stringify : qs.stringify }); - -// Error functions are defined separately here in an attempt to make the code -// easier to read. -var Errors = { - setDataWithBody: function(object) { - throw new Error("Attempt to set data attribute of a content object " + - "when the body attributes was already set."); - }, - setBodyWithData: function(object) { - throw new Error("Attempt to set body attribute of a content object " + - "when the data attributes was already set."); - } -} -module.exports = Content; \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger-oauth.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger-oauth.js index 576fcd33bf9..7160291dc07 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger-oauth.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger-oauth.js @@ -1,338 +1 @@ -var appName; -var popupMask; -var popupDialog; -var clientId; -var realm; -var redirect_uri; -var clientSecret; -var scopeSeparator; -var additionalQueryStringParams; - -function handleLogin() { - var scopes = []; - - var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions; - if(auths) { - var key; - var defs = auths; - for(key in defs) { - var auth = defs[key]; - if(auth.type === 'oauth2' && auth.scopes) { - var scope; - if(Array.isArray(auth.scopes)) { - // 1.2 support - var i; - for(i = 0; i < auth.scopes.length; i++) { - scopes.push(auth.scopes[i]); - } - } - else { - // 2.0 support - for(scope in auth.scopes) { - scopes.push({scope: scope, description: auth.scopes[scope], OAuthSchemeKey: key}); - } - } - } - } - } - - if(window.swaggerUi.api - && window.swaggerUi.api.info) { - appName = window.swaggerUi.api.info.title; - } - - $('.api-popup-dialog').remove(); - popupDialog = $( - [ - '<div class="api-popup-dialog">', - '<div class="api-popup-title">Select OAuth2.0 Scopes</div>', - '<div class="api-popup-content">', - '<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.', - '<a href="#">Learn how to use</a>', - '</p>', - '<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>', - '<ul class="api-popup-scopes">', - '</ul>', - '<p class="error-msg"></p>', - '<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>', - '</div>', - '</div>'].join('')); - $(document.body).append(popupDialog); - - //TODO: only display applicable scopes (will need to pass them into handleLogin) - popup = popupDialog.find('ul.api-popup-scopes').empty(); - for (i = 0; i < scopes.length; i ++) { - scope = scopes[i]; - str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"' +'" oauthtype="' + scope.OAuthSchemeKey +'"/>' + '<label for="scope_' + i + '">' + scope.scope ; - if (scope.description) { - if ($.map(auths, function(n, i) { return i; }).length > 1) //if we have more than one scheme, display schemes - str += '<br/><span class="api-scope-desc">' + scope.description + ' ('+ scope.OAuthSchemeKey+')' +'</span>'; - else - str += '<br/><span class="api-scope-desc">' + scope.description + '</span>'; - } - str += '</label></li>'; - popup.append(str); - } - - var $win = $(window), - dw = $win.width(), - dh = $win.height(), - st = $win.scrollTop(), - dlgWd = popupDialog.outerWidth(), - dlgHt = popupDialog.outerHeight(), - top = (dh -dlgHt)/2 + st, - left = (dw - dlgWd)/2; - - popupDialog.css({ - top: (top < 0? 0 : top) + 'px', - left: (left < 0? 0 : left) + 'px' - }); - - popupDialog.find('button.api-popup-cancel').click(function() { - popupMask.hide(); - popupDialog.hide(); - popupDialog.empty(); - popupDialog = []; - }); - - $('button.api-popup-authbtn').unbind(); - popupDialog.find('button.api-popup-authbtn').click(function() { - popupMask.hide(); - popupDialog.hide(); - - var authSchemes = window.swaggerUi.api.authSchemes; - var host = window.location; - var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/")); - var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; - var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; - var url = null; - var scopes = [] - var o = popup.find('input:checked'); - var OAuthSchemeKeys = []; - var state; - for(k =0; k < o.length; k++) { - var scope = $(o[k]).attr('scope'); - if (scopes.indexOf(scope) === -1) - scopes.push(scope); - var OAuthSchemeKey = $(o[k]).attr('oauthtype'); - if (OAuthSchemeKeys.indexOf(OAuthSchemeKey) === -1) - OAuthSchemeKeys.push(OAuthSchemeKey); - } - - //TODO: merge not replace if scheme is different from any existing - //(needs to be aware of schemes to do so correctly) - window.enabledScopes=scopes; - - for (var key in authSchemes) { - if (authSchemes.hasOwnProperty(key) && OAuthSchemeKeys.indexOf(key) != -1) { //only look at keys that match this scope. - var flow = authSchemes[key].flow; - - if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) { - var dets = authSchemes[key]; - url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code'); - window.swaggerUi.tokenName = dets.tokenName || 'access_token'; - window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null); - state = key; - } - else if(authSchemes[key].type === 'oauth2' && flow && (flow === 'application')) { - var dets = authSchemes[key]; - window.swaggerUi.tokenName = dets.tokenName || 'access_token'; - clientCredentialsFlow(scopes, dets.tokenUrl, key); - return; - } - else if(authSchemes[key].grantTypes) { - // 1.2 support - var o = authSchemes[key].grantTypes; - for(var t in o) { - if(o.hasOwnProperty(t) && t === 'implicit') { - var dets = o[t]; - var ep = dets.loginEndpoint.url; - url = dets.loginEndpoint.url + '?response_type=token'; - window.swaggerUi.tokenName = dets.tokenName; - } - else if (o.hasOwnProperty(t) && t === 'accessCode') { - var dets = o[t]; - var ep = dets.tokenRequestEndpoint.url; - url = dets.tokenRequestEndpoint.url + '?response_type=code'; - window.swaggerUi.tokenName = dets.tokenName; - } - } - } - } - } - - redirect_uri = redirectUrl; - - url += '&redirect_uri=' + encodeURIComponent(redirectUrl); - url += '&realm=' + encodeURIComponent(realm); - url += '&client_id=' + encodeURIComponent(clientId); - url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator)); - url += '&state=' + encodeURIComponent(state); - for (var key in additionalQueryStringParams) { - url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]); - } - - window.open(url); - }); - - popupMask.show(); - popupDialog.show(); - return; -} - - -function handleLogout() { - for(key in window.swaggerUi.api.clientAuthorizations.authz){ - window.swaggerUi.api.clientAuthorizations.remove(key) - } - window.enabledScopes = null; - $('.api-ic.ic-on').addClass('ic-off'); - $('.api-ic.ic-on').removeClass('ic-on'); - - // set the info box - $('.api-ic.ic-warning').addClass('ic-error'); - $('.api-ic.ic-warning').removeClass('ic-warning'); -} - -function initOAuth(opts) { - var o = (opts||{}); - var errors = []; - - appName = (o.appName||errors.push('missing appName')); - popupMask = (o.popupMask||$('#api-common-mask')); - popupDialog = (o.popupDialog||$('.api-popup-dialog')); - clientId = (o.clientId||errors.push('missing client id')); - clientSecret = (o.clientSecret||null); - realm = (o.realm||errors.push('missing realm')); - scopeSeparator = (o.scopeSeparator||' '); - additionalQueryStringParams = (o.additionalQueryStringParams||{}); - - if(errors.length > 0){ - log('auth unable initialize oauth: ' + errors); - return; - } - - $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); - $('.api-ic').unbind(); - $('.api-ic').click(function(s) { - if($(s.target).hasClass('ic-off')) - handleLogin(); - else { - handleLogout(); - } - false; - }); -} - -function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) { - var params = { - 'client_id': clientId, - 'client_secret': clientSecret, - 'scope': scopes.join(' '), - 'grant_type': 'client_credentials' - } - $.ajax( - { - url : tokenUrl, - type: "POST", - data: params, - success:function(data, textStatus, jqXHR) - { - onOAuthComplete(data,OAuthSchemeKey); - }, - error: function(jqXHR, textStatus, errorThrown) - { - onOAuthComplete(""); - } - }); - - } - -window.processOAuthCode = function processOAuthCode(data) { - var OAuthSchemeKey = data.state; - var params = { - 'client_id': clientId, - 'code': data.code, - 'grant_type': 'authorization_code', - 'redirect_uri': redirect_uri - }; - - if (clientSecret) { - params.client_secret = clientSecret; - } - - $.ajax( - { - url : window.swaggerUi.tokenUrl, - type: "POST", - data: params, - success:function(data, textStatus, jqXHR) - { - onOAuthComplete(data, OAuthSchemeKey); - }, - error: function(jqXHR, textStatus, errorThrown) - { - onOAuthComplete(""); - } - }); -}; - -window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) { - if(token) { - if(token.error) { - var checkbox = $('input[type=checkbox],.secured') - checkbox.each(function(pos){ - checkbox[pos].checked = false; - }); - alert(token.error); - } - else { - var b = token[window.swaggerUi.tokenName]; - if (!OAuthSchemeKey){ - OAuthSchemeKey = token.state; - } - if(b){ - // if all roles are satisfied - var o = null; - $.each($('.auth .api-ic .api_information_panel'), function(k, v) { - var children = v; - if(children && children.childNodes) { - var requiredScopes = []; - $.each((children.childNodes), function (k1, v1){ - var inner = v1.innerHTML; - if(inner) - requiredScopes.push(inner); - }); - var diff = []; - for(var i=0; i < requiredScopes.length; i++) { - var s = requiredScopes[i]; - if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) { - diff.push(s); - } - } - if(diff.length > 0){ - o = v.parentNode.parentNode; - $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off'); - $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on'); - - // sorry, not all scopes are satisfied - $(o).find('.api-ic').addClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - else { - o = v.parentNode.parentNode; - $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on'); - $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off'); - - // all scopes are satisfied - $(o).find('.api-ic').addClass('ic-info'); - $(o).find('.api-ic').removeClass('ic-warning'); - $(o).find('.api-ic').removeClass('ic-error'); - } - } - }); - window.swaggerUi.api.clientAuthorizations.add(OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header')); - } - } - } -}; +function handleLogin(){var e=[],o=window.swaggerUiAuth.authSchemes||window.swaggerUiAuth.securityDefinitions;if(o){var i,n=o;for(i in n){var a=n[i];if("oauth2"===a.type&&a.scopes){var t;if(Array.isArray(a.scopes)){var p;for(p=0;p<a.scopes.length;p++)e.push(a.scopes[p])}else for(t in a.scopes)e.push({scope:t,description:a.scopes[t],OAuthSchemeKey:i})}}}for(window.swaggerUi.api&&window.swaggerUi.api.info&&(appName=window.swaggerUi.api.info.title),$(".api-popup-dialog").remove(),popupDialog=$(['<div class="api-popup-dialog">','<div class="api-popup-title">Select OAuth2.0 Scopes</div>','<div class="api-popup-content">',"<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.",'<a href="#">Learn how to use</a>',"</p>","<p><strong>"+appName+"</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>",'<ul class="api-popup-scopes">',"</ul>",'<p class="error-msg"></p>','<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>',"</div>","</div>"].join("")),$(document.body).append(popupDialog),popup=popupDialog.find("ul.api-popup-scopes").empty(),p=0;p<e.length;p++)t=e[p],str='<li><input type="checkbox" id="scope_'+p+'" scope="'+t.scope+'"" oauthtype="'+t.OAuthSchemeKey+'"/><label for="scope_'+p+'">'+t.scope,t.description&&($.map(o,function(e,o){return o}).length>1?str+='<br/><span class="api-scope-desc">'+t.description+" ("+t.OAuthSchemeKey+")</span>":str+='<br/><span class="api-scope-desc">'+t.description+"</span>"),str+="</label></li>",popup.append(str);var r=$(window),s=r.width(),c=r.height(),l=r.scrollTop(),d=popupDialog.outerWidth(),u=popupDialog.outerHeight(),h=(c-u)/2+l,g=(s-d)/2;popupDialog.css({top:(h<0?0:h)+"px",left:(g<0?0:g)+"px"}),popupDialog.find("button.api-popup-cancel").click(function(){popupMask.hide(),popupDialog.hide(),popupDialog.empty(),popupDialog=[]}),$("button.api-popup-authbtn").unbind(),popupDialog.find("button.api-popup-authbtn").click(function(){function e(e){return e.vendorExtensions["x-tokenName"]||e.tokenName}popupMask.hide(),popupDialog.hide();var o,i=window.swaggerUi.api.authSchemes,n=window.location,a=location.pathname.substring(0,location.pathname.lastIndexOf("/")),t=n.protocol+"//"+n.host+a+"/o2c.html",p=window.oAuthRedirectUrl||t,r=null,s=[],c=popup.find("input:checked"),l=[];for(k=0;k<c.length;k++){var d=$(c[k]).attr("scope");s.indexOf(d)===-1&&s.push(d);var u=$(c[k]).attr("oauthtype");l.indexOf(u)===-1&&l.push(u)}window.enabledScopes=s;for(var h in i)if(i.hasOwnProperty(h)&&l.indexOf(h)!=-1){var g=i[h].flow;if("oauth2"!==i[h].type||!g||"implicit"!==g&&"accessCode"!==g){if("oauth2"===i[h].type&&g&&"application"===g){var w=i[h];return window.swaggerUi.tokenName=e(w)||"access_token",void clientCredentialsFlow(s,w.tokenUrl,h)}if(i[h].grantTypes){var c=i[h].grantTypes;for(var f in c)if(c.hasOwnProperty(f)&&"implicit"===f){var w=c[f];w.loginEndpoint.url;r=w.loginEndpoint.url+"?response_type=token",window.swaggerUi.tokenName=e(w)}else if(c.hasOwnProperty(f)&&"accessCode"===f){var w=c[f];w.tokenRequestEndpoint.url;r=w.tokenRequestEndpoint.url+"?response_type=code",window.swaggerUi.tokenName=e(w)}}}else{var w=i[h];r=w.authorizationUrl+"?response_type="+("implicit"===g?"token":"code"),window.swaggerUi.tokenName=e(w)||"access_token",window.swaggerUi.tokenUrl="accessCode"===g?w.tokenUrl:null,o=h}}redirect_uri=p,r+="&redirect_uri="+encodeURIComponent(p),r+="&realm="+encodeURIComponent(realm),r+="&client_id="+encodeURIComponent(clientId),r+="&scope="+encodeURIComponent(s.join(scopeSeparator)),r+="&state="+encodeURIComponent(o);for(var h in additionalQueryStringParams)r+="&"+h+"="+encodeURIComponent(additionalQueryStringParams[h]);window.open(r)}),popupMask.show(),popupDialog.show()}function handleLogout(){for(key in window.swaggerUi.api.clientAuthorizations.authz)window.swaggerUi.api.clientAuthorizations.remove(key);window.enabledScopes=null,$(".api-ic.ic-on").addClass("ic-off"),$(".api-ic.ic-on").removeClass("ic-on"),$(".api-ic.ic-warning").addClass("ic-error"),$(".api-ic.ic-warning").removeClass("ic-warning")}function initOAuth(e){var o=e||{},i=[];return appName=o.appName||i.push("missing appName"),popupMask=o.popupMask||$("#api-common-mask"),popupDialog=o.popupDialog||$(".api-popup-dialog"),clientId=o.clientId||i.push("missing client id"),clientSecret=o.clientSecret||null,realm=o.realm||i.push("missing realm"),scopeSeparator=o.scopeSeparator||" ",additionalQueryStringParams=o.additionalQueryStringParams||{},i.length>0?void log("auth unable initialize oauth: "+i):($("pre code").each(function(e,o){hljs.highlightBlock(o)}),$(".api-ic").unbind(),void $(".api-ic").click(function(e){$(e.target).hasClass("ic-off")?handleLogin():handleLogout()}))}function clientCredentialsFlow(e,o,i){var n={client_id:clientId,client_secret:clientSecret,scope:e.join(" "),grant_type:"client_credentials"};$.ajax({url:o,type:"POST",data:n,success:function(e,o,n){onOAuthComplete(e,i)},error:function(e,o,i){onOAuthComplete("")}})}var appName,popupMask,popupDialog,clientId,realm,redirect_uri,clientSecret,scopeSeparator,additionalQueryStringParams;window.processOAuthCode=function(e){var o=e.state,i=window.location,n=location.pathname.substring(0,location.pathname.lastIndexOf("/")),a=i.protocol+"//"+i.host+n+"/o2c.html",t=window.oAuthRedirectUrl||a,p={client_id:clientId,code:e.code,grant_type:"authorization_code",redirect_uri:t};clientSecret&&(p.client_secret=clientSecret),$.ajax({url:window.swaggerUiAuth.tokenUrl,type:"POST",data:p,success:function(e,i,n){onOAuthComplete(e,o)},error:function(e,o,i){onOAuthComplete("")}})},window.onOAuthComplete=function(e,o){if(e)if(e.error){var i=$("input[type=checkbox],.secured");i.each(function(e){i[e].checked=!1}),alert(e.error)}else{var n=e[window.swaggerUiAuth.tokenName];if(o||(o=e.state),n){var a=null;$.each($(".auth .api-ic .api_information_panel"),function(e,o){var i=o;if(i&&i.childNodes){var n=[];$.each(i.childNodes,function(e,o){var i=o.innerHTML;i&&n.push(i)});for(var t=[],p=0;p<n.length;p++){var r=n[p];window.enabledScopes&&window.enabledScopes.indexOf(r)==-1&&t.push(r)}t.length>0?(a=o.parentNode.parentNode,$(a.parentNode).find(".api-ic.ic-on").addClass("ic-off"),$(a.parentNode).find(".api-ic.ic-on").removeClass("ic-on"),$(a).find(".api-ic").addClass("ic-warning"),$(a).find(".api-ic").removeClass("ic-error")):(a=o.parentNode.parentNode,$(a.parentNode).find(".api-ic.ic-off").addClass("ic-on"),$(a.parentNode).find(".api-ic.ic-off").removeClass("ic-off"),$(a).find(".api-ic").addClass("ic-info"),$(a).find(".api-ic").removeClass("ic-warning"),$(a).find(".api-ic").removeClass("ic-error"))}}),"undefined"!=typeof window.swaggerUi&&(window.swaggerUi.api.clientAuthorizations.add(window.swaggerUiAuth.OAuthSchemeKey,new SwaggerClient.ApiKeyAuthorization("Authorization","Bearer "+n,"header")),window.swaggerUi.load())}}}; \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger.js deleted file mode 100644 index 9e73a9b33e2..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/swagger.js +++ /dev/null @@ -1,1653 +0,0 @@ -// swagger.js -// version 2.0.39 - -var __bind = function(fn, me){ - return function(){ - return fn.apply(me, arguments); - }; -}; - -log = function(){ - log.history = log.history || []; - log.history.push(arguments); - if(this.console){ - console.log( Array.prototype.slice.call(arguments)[0] ); - } -}; - -// if you want to apply conditional formatting of parameter values -parameterMacro = function(value) { - return value; -} - -// if you want to apply conditional formatting of model property values -modelPropertyMacro = function(value) { - return value; -} - -if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function(obj, start) { - for (var i = (start || 0), j = this.length; i < j; i++) { - if (this[i] === obj) { return i; } - } - return -1; - } -} - -if (!('filter' in Array.prototype)) { - Array.prototype.filter= function(filter, that /*opt*/) { - var other= [], v; - for (var i=0, n= this.length; i<n; i++) - if (i in this && filter.call(that, v= this[i], i, this)) - other.push(v); - return other; - }; -} - -if (!('map' in Array.prototype)) { - Array.prototype.map= function(mapper, that /*opt*/) { - var other= new Array(this.length); - for (var i= 0, n= this.length; i<n; i++) - if (i in this) - other[i]= mapper.call(that, this[i], i, this); - return other; - }; -} - -Object.keys = Object.keys || (function () { - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"), - DontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - DontEnumsLength = DontEnums.length; - - return function (o) { - if (typeof o != "object" && typeof o != "function" || o === null) - throw new TypeError("Object.keys called on a non-object"); - - var result = []; - for (var name in o) { - if (hasOwnProperty.call(o, name)) - result.push(name); - } - - if (hasDontEnumBug) { - for (var i = 0; i < DontEnumsLength; i++) { - if (hasOwnProperty.call(o, DontEnums[i])) - result.push(DontEnums[i]); - } - } - - return result; - }; -})(); - -var SwaggerApi = function(url, options) { - this.isBuilt = false; - this.url = null; - this.debug = false; - this.basePath = null; - this.authorizations = null; - this.authorizationScheme = null; - this.info = null; - this.useJQuery = false; - this.modelsArray = []; - - options = (options||{}); - if (url) - if (url.url) - options = url; - else - this.url = url; - else - options = url; - - if (options.url != null) - this.url = options.url; - - if (options.success != null) - this.success = options.success; - - if (typeof options.useJQuery === 'boolean') - this.useJQuery = options.useJQuery; - - this.failure = options.failure != null ? options.failure : function() {}; - this.progress = options.progress != null ? options.progress : function() {}; - if (options.success != null) { - this.build(); - this.isBuilt = true; - } -} - -SwaggerApi.prototype.build = function() { - if(this.isBuilt) - return this; - var _this = this; - this.progress('fetching resource list: ' + this.url); - var obj = { - useJQuery: this.useJQuery, - url: this.url, - method: "get", - headers: { - accept: "application/json,application/json;charset=\"utf-8\",*/*" - }, - on: { - error: function(response) { - if (_this.url.substring(0, 4) !== 'http') { - return _this.fail('Please specify the protocol for ' + _this.url); - } else if (response.status === 0) { - return _this.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); - } else if (response.status === 404) { - return _this.fail('Can\'t read swagger JSON from ' + _this.url); - } else { - return _this.fail(response.status + ' : ' + response.statusText + ' ' + _this.url); - } - }, - response: function(resp) { - var responseObj = resp.obj || JSON.parse(resp.data); - _this.swaggerVersion = responseObj.swaggerVersion; - if (_this.swaggerVersion === "1.2") { - return _this.buildFromSpec(responseObj); - } else { - return _this.buildFrom1_1Spec(responseObj); - } - } - } - }; - var e = (typeof window !== 'undefined' ? window : exports); - e.authorizations.apply(obj); - new SwaggerHttp().execute(obj); - return this; -}; - -SwaggerApi.prototype.buildFromSpec = function(response) { - if (response.apiVersion != null) { - this.apiVersion = response.apiVersion; - } - this.apis = {}; - this.apisArray = []; - this.consumes = response.consumes; - this.produces = response.produces; - this.authSchemes = response.authorizations; - if (response.info != null) { - this.info = response.info; - } - var isApi = false; - var i; - for (i = 0; i < response.apis.length; i++) { - var api = response.apis[i]; - if (api.operations) { - var j; - for (j = 0; j < api.operations.length; j++) { - operation = api.operations[j]; - isApi = true; - } - } - } - if (response.basePath) - this.basePath = response.basePath; - else if (this.url.indexOf('?') > 0) - this.basePath = this.url.substring(0, this.url.lastIndexOf('?')); - else - this.basePath = this.url; - - if (isApi) { - var newName = response.resourcePath.replace(/\//g, ''); - this.resourcePath = response.resourcePath; - res = new SwaggerResource(response, this); - this.apis[newName] = res; - this.apisArray.push(res); - } else { - var k; - for (k = 0; k < response.apis.length; k++) { - var resource = response.apis[k]; - res = new SwaggerResource(resource, this); - this.apis[res.name] = res; - this.apisArray.push(res); - } - } - if (this.success) { - this.success(); - } - return this; -}; - -SwaggerApi.prototype.buildFrom1_1Spec = function(response) { - log("This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info"); - if (response.apiVersion != null) - this.apiVersion = response.apiVersion; - this.apis = {}; - this.apisArray = []; - this.produces = response.produces; - if (response.info != null) { - this.info = response.info; - } - var isApi = false; - for (var i = 0; i < response.apis.length; i++) { - var api = response.apis[i]; - if (api.operations) { - for (var j = 0; j < api.operations.length; j++) { - operation = api.operations[j]; - isApi = true; - } - } - } - if (response.basePath) { - this.basePath = response.basePath; - } else if (this.url.indexOf('?') > 0) { - this.basePath = this.url.substring(0, this.url.lastIndexOf('?')); - } else { - this.basePath = this.url; - } - if (isApi) { - var newName = response.resourcePath.replace(/\//g, ''); - this.resourcePath = response.resourcePath; - var res = new SwaggerResource(response, this); - this.apis[newName] = res; - this.apisArray.push(res); - } else { - for (k = 0; k < response.apis.length; k++) { - resource = response.apis[k]; - res = new SwaggerResource(resource, this); - this.apis[res.name] = res; - this.apisArray.push(res); - } - } - if (this.success) { - this.success(); - } - return this; -}; - -SwaggerApi.prototype.selfReflect = function() { - var resource, resource_name, _ref; - if (this.apis == null) { - return false; - } - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - if (resource.ready == null) { - return false; - } - } - this.setConsolidatedModels(); - this.ready = true; - if (this.success != null) { - return this.success(); - } -}; - -SwaggerApi.prototype.fail = function(message) { - this.failure(message); - throw message; -}; - -SwaggerApi.prototype.setConsolidatedModels = function() { - var model, modelName, resource, resource_name, _i, _len, _ref, _ref1, _results; - this.models = {}; - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - for (modelName in resource.models) { - if (this.models[modelName] == null) { - this.models[modelName] = resource.models[modelName]; - this.modelsArray.push(resource.models[modelName]); - } - } - } - _ref1 = this.modelsArray; - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - model = _ref1[_i]; - _results.push(model.setReferencedModels(this.models)); - } - return _results; -}; - -SwaggerApi.prototype.help = function() { - var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2; - _ref = this.apis; - for (resource_name in _ref) { - resource = _ref[resource_name]; - log(resource_name); - _ref1 = resource.operations; - for (operation_name in _ref1) { - operation = _ref1[operation_name]; - log(" " + operation.nickname); - _ref2 = operation.parameters; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - parameter = _ref2[_i]; - log(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); - } - } - } - return this; -}; - -var SwaggerResource = function(resourceObj, api) { - var _this = this; - this.api = api; - this.api = this.api; - consumes = (this.consumes | []); - produces = (this.produces | []); - this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path; - this.description = resourceObj.description; - - var parts = this.path.split("/"); - this.name = parts[parts.length - 1].replace('.{format}', ''); - this.basePath = this.api.basePath; - this.operations = {}; - this.operationsArray = []; - this.modelsArray = []; - this.models = {}; - this.rawModels = {}; - this.useJQuery = (typeof api.useJQuery !== 'undefined' ? api.useJQuery : null); - - if ((resourceObj.apis != null) && (this.api.resourcePath != null)) { - this.addApiDeclaration(resourceObj); - } else { - if (this.path == null) { - this.api.fail("SwaggerResources must have a path."); - } - if (this.path.substring(0, 4) === 'http') { - this.url = this.path.replace('{format}', 'json'); - } else { - this.url = this.api.basePath + this.path.replace('{format}', 'json'); - } - this.api.progress('fetching resource ' + this.name + ': ' + this.url); - obj = { - url: this.url, - method: "get", - useJQuery: this.useJQuery, - headers: { - accept: "application/json,application/json;charset=\"utf-8\",*/*" - }, - on: { - response: function(resp) { - var responseObj = resp.obj || JSON.parse(resp.data); - return _this.addApiDeclaration(responseObj); - }, - error: function(response) { - return _this.api.fail("Unable to read api '" + - _this.name + "' from path " + _this.url + " (server returned " + response.statusText + ")"); - } - } - }; - var e = typeof window !== 'undefined' ? window : exports; - e.authorizations.apply(obj); - new SwaggerHttp().execute(obj); - } -} - -SwaggerResource.prototype.getAbsoluteBasePath = function (relativeBasePath) { - var pos, url; - url = this.api.basePath; - pos = url.lastIndexOf(relativeBasePath); - var parts = url.split("/"); - var rootUrl = parts[0] + "//" + parts[2]; - - if(relativeBasePath.indexOf("http") === 0) - return relativeBasePath; - if(relativeBasePath === "/") - return rootUrl; - if(relativeBasePath.substring(0, 1) == "/") { - // use root + relative - return rootUrl + relativeBasePath; - } - else { - var pos = this.basePath.lastIndexOf("/"); - var base = this.basePath.substring(0, pos); - if(base.substring(base.length - 1) == "/") - return base + relativeBasePath; - else - return base + "/" + relativeBasePath; - } -}; - -SwaggerResource.prototype.addApiDeclaration = function(response) { - if (response.produces != null) - this.produces = response.produces; - if (response.consumes != null) - this.consumes = response.consumes; - if ((response.basePath != null) && response.basePath.replace(/\s/g, '').length > 0) - this.basePath = response.basePath.indexOf("http") === -1 ? this.getAbsoluteBasePath(response.basePath) : response.basePath; - - this.addModels(response.models); - if (response.apis) { - for (var i = 0 ; i < response.apis.length; i++) { - var endpoint = response.apis[i]; - this.addOperations(endpoint.path, endpoint.operations, response.consumes, response.produces); - } - } - this.api[this.name] = this; - this.ready = true; - return this.api.selfReflect(); -}; - -SwaggerResource.prototype.addModels = function(models) { - if (models != null) { - var modelName; - for (modelName in models) { - if (this.models[modelName] == null) { - var swaggerModel = new SwaggerModel(modelName, models[modelName]); - this.modelsArray.push(swaggerModel); - this.models[modelName] = swaggerModel; - this.rawModels[modelName] = models[modelName]; - } - } - var output = []; - for (var i = 0; i < this.modelsArray.length; i++) { - model = this.modelsArray[i]; - output.push(model.setReferencedModels(this.models)); - } - return output; - } -}; - -SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes, produces) { - if (ops) { - output = []; - for (var i = 0; i < ops.length; i++) { - o = ops[i]; - consumes = this.consumes; - produces = this.produces; - if (o.consumes != null) - consumes = o.consumes; - else - consumes = this.consumes; - - if (o.produces != null) - produces = o.produces; - else - produces = this.produces; - type = (o.type||o.responseClass); - - if (type === "array") { - ref = null; - if (o.items) - ref = o.items["type"] || o.items["$ref"]; - type = "array[" + ref + "]"; - } - responseMessages = o.responseMessages; - method = o.method; - if (o.httpMethod) { - method = o.httpMethod; - } - if (o.supportedContentTypes) { - consumes = o.supportedContentTypes; - } - if (o.errorResponses) { - responseMessages = o.errorResponses; - for (var j = 0; j < responseMessages.length; j++) { - r = responseMessages[j]; - r.message = r.reason; - r.reason = null; - } - } - o.nickname = this.sanitize(o.nickname); - op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations); - this.operations[op.nickname] = op; - output.push(this.operationsArray.push(op)); - } - return output; - } -}; - -SwaggerResource.prototype.sanitize = function(nickname) { - var op; - op = nickname.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_'); - op = op.replace(/((_){2,})/g, '_'); - op = op.replace(/^(_)*/g, ''); - op = op.replace(/([_])*$/g, ''); - return op; -}; - -SwaggerResource.prototype.help = function() { - var op = this.operations; - var output = []; - var operation_name; - for (operation_name in op) { - operation = op[operation_name]; - var msg = " " + operation.nickname; - for (var i = 0; i < operation.parameters; i++) { - parameter = operation.parameters[i]; - msg.concat(" " + parameter.name + (parameter.required ? ' (required)' : '') + " - " + parameter.description); - } - output.push(msg); - } - return output; -}; - -var SwaggerModel = function(modelName, obj) { - this.name = obj.id != null ? obj.id : modelName; - this.properties = []; - var propertyName; - for (propertyName in obj.properties) { - if (obj.required != null) { - var value; - for (value in obj.required) { - if (propertyName === obj.required[value]) { - obj.properties[propertyName].required = true; - } - } - } - prop = new SwaggerModelProperty(propertyName, obj.properties[propertyName]); - this.properties.push(prop); - } -} - -SwaggerModel.prototype.setReferencedModels = function(allModels) { - var results = []; - for (var i = 0; i < this.properties.length; i++) { - var property = this.properties[i]; - var type = property.type || property.dataType; - if (allModels[type] != null) - results.push(property.refModel = allModels[type]); - else if ((property.refDataType != null) && (allModels[property.refDataType] != null)) - results.push(property.refModel = allModels[property.refDataType]); - else - results.push(void 0); - } - return results; -}; - -SwaggerModel.prototype.getMockSignature = function(modelsToIgnore) { - var propertiesStr = []; - for (var i = 0; i < this.properties.length; i++) { - prop = this.properties[i]; - propertiesStr.push(prop.toString()); - } - - var strong = '<span class="strong">'; - var stronger = '<span class="stronger">'; - var strongClose = '</span>'; - var classOpen = strong + this.name + ' {' + strongClose; - var classClose = strong + '}' + strongClose; - var returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose; - if (!modelsToIgnore) - modelsToIgnore = []; - modelsToIgnore.push(this.name); - - for (var i = 0; i < this.properties.length; i++) { - prop = this.properties[i]; - if ((prop.refModel != null) && modelsToIgnore.indexOf(prop.refModel.name) === -1) { - returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(modelsToIgnore)); - } - } - return returnVal; -}; - -SwaggerModel.prototype.createJSONSample = function(modelsToIgnore) { - if(sampleModels[this.name]) { - return sampleModels[this.name]; - } - else { - var result = {}; - var modelsToIgnore = (modelsToIgnore||[]) - modelsToIgnore.push(this.name); - for (var i = 0; i < this.properties.length; i++) { - prop = this.properties[i]; - result[prop.name] = prop.getSampleValue(modelsToIgnore); - } - modelsToIgnore.pop(this.name); - return result; - } -}; - -var SwaggerModelProperty = function(name, obj) { - this.name = name; - this.dataType = obj.type || obj.dataType || obj["$ref"]; - this.isCollection = this.dataType && (this.dataType.toLowerCase() === 'array' || this.dataType.toLowerCase() === 'list' || this.dataType.toLowerCase() === 'set'); - this.descr = obj.description; - this.required = obj.required; - this.defaultValue = modelPropertyMacro(obj.defaultValue); - if (obj.items != null) { - if (obj.items.type != null) { - this.refDataType = obj.items.type; - } - if (obj.items.$ref != null) { - this.refDataType = obj.items.$ref; - } - } - this.dataTypeWithRef = this.refDataType != null ? (this.dataType + '[' + this.refDataType + ']') : this.dataType; - if (obj.allowableValues != null) { - this.valueType = obj.allowableValues.valueType; - this.values = obj.allowableValues.values; - if (this.values != null) { - this.valuesString = "'" + this.values.join("' or '") + "'"; - } - } - if (obj["enum"] != null) { - this.valueType = "string"; - this.values = obj["enum"]; - if (this.values != null) { - this.valueString = "'" + this.values.join("' or '") + "'"; - } - } -} - -SwaggerModelProperty.prototype.getSampleValue = function(modelsToIgnore) { - var result; - if ((this.refModel != null) && (modelsToIgnore.indexOf(prop.refModel.name) === -1)) { - result = this.refModel.createJSONSample(modelsToIgnore); - } else { - if (this.isCollection) { - result = this.toSampleValue(this.refDataType); - } else { - result = this.toSampleValue(this.dataType); - } - } - if (this.isCollection) { - return [result]; - } else { - return result; - } -}; - -SwaggerModelProperty.prototype.toSampleValue = function(value) { - var result; - if ((typeof this.defaultValue !== 'undefined') && this.defaultValue !== null) { - result = this.defaultValue; - } else if (value === "integer") { - result = 0; - } else if (value === "boolean") { - result = false; - } else if (value === "double" || value === "number") { - result = 0.0; - } else if (value === "string") { - result = ""; - } else { - result = value; - } - return result; -}; - -SwaggerModelProperty.prototype.toString = function() { - var req = this.required ? 'propReq' : 'propOpt'; - var str = '<span class="propName ' + req + '">' + this.name + '</span> (<span class="propType">' + this.dataTypeWithRef + '</span>'; - if (!this.required) { - str += ', <span class="propOptKey">optional</span>'; - } - str += ')'; - if (this.values != null) { - str += " = <span class='propVals'>['" + this.values.join("' or '") + "']</span>"; - } - if (this.descr != null) { - str += ': <span class="propDesc">' + this.descr + '</span>'; - } - return str; -}; - -var SwaggerOperation = function(nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations) { - var _this = this; - - var errors = []; - this.nickname = (nickname||errors.push("SwaggerOperations must have a nickname.")); - this.path = (path||errors.push("SwaggerOperation " + nickname + " is missing path.")); - this.method = (method||errors.push("SwaggerOperation " + nickname + " is missing method.")); - this.parameters = parameters != null ? parameters : []; - this.summary = summary; - this.notes = notes; - this.type = type; - this.responseMessages = (responseMessages||[]); - this.resource = (resource||errors.push("Resource is required")); - this.consumes = consumes; - this.produces = produces; - this.authorizations = authorizations; - this["do"] = __bind(this["do"], this); - - if (errors.length > 0) - this.resource.api.fail(errors); - - this.path = this.path.replace('{format}', 'json'); - this.method = this.method.toLowerCase(); - this.isGetMethod = this.method === "get"; - - this.resourceName = this.resource.name; - if(typeof this.type !== 'undefined' && this.type === 'void') - this.type = null; - else { - this.responseClassSignature = this.getSignature(this.type, this.resource.models); - this.responseSampleJSON = this.getSampleJSON(this.type, this.resource.models); - } - - for(var i = 0; i < this.parameters.length; i ++) { - var param = this.parameters[i]; - // might take this away - param.name = param.name || param.type || param.dataType; - - // for 1.1 compatibility - var type = param.type || param.dataType; - if(type === 'array') { - type = 'array[' + (param.items.$ref ? param.items.$ref : param.items.type) + ']'; - } - param.type = type; - - if(type.toLowerCase() === 'boolean') { - param.allowableValues = {}; - param.allowableValues.values = ["true", "false"]; - } - param.signature = this.getSignature(type, this.resource.models); - param.sampleJSON = this.getSampleJSON(type, this.resource.models); - - var enumValue = param["enum"]; - if(enumValue != null) { - param.isList = true; - param.allowableValues = {}; - param.allowableValues.descriptiveValues = []; - - for(var j = 0; j < enumValue.length; j++) { - var v = enumValue[j]; - if(param.defaultValue != null) { - param.allowableValues.descriptiveValues.push ({ - value: String(v), - isDefault: (v === param.defaultValue) - }); - } - else { - param.allowableValues.descriptiveValues.push ({ - value: String(v), - isDefault: false - }); - } - } - } - else if(param.allowableValues != null) { - if(param.allowableValues.valueType === "RANGE") - param.isRange = true; - else - param.isList = true; - if(param.allowableValues != null) { - param.allowableValues.descriptiveValues = []; - if(param.allowableValues.values) { - for(var j = 0; j < param.allowableValues.values.length; j++){ - var v = param.allowableValues.values[j]; - if(param.defaultValue != null) { - param.allowableValues.descriptiveValues.push ({ - value: String(v), - isDefault: (v === param.defaultValue) - }); - } - else { - param.allowableValues.descriptiveValues.push ({ - value: String(v), - isDefault: false - }); - } - } - } - } - } - param.defaultValue = parameterMacro(param.defaultValue); - } - this.resource[this.nickname] = function(args, callback, error) { - return _this["do"](args, callback, error); - }; - this.resource[this.nickname].help = function() { - return _this.help(); - }; -} - -SwaggerOperation.prototype.isListType = function(type) { - if (type && type.indexOf('[') >= 0) { - return type.substring(type.indexOf('[') + 1, type.indexOf(']')); - } else { - return void 0; - } -}; - -SwaggerOperation.prototype.getSignature = function(type, models) { - var isPrimitive, listType; - listType = this.isListType(type); - isPrimitive = ((listType != null) && models[listType]) || (models[type] != null) ? false : true; - if (isPrimitive) { - return type; - } else { - if (listType != null) { - return models[listType].getMockSignature(); - } else { - return models[type].getMockSignature(); - } - } -}; - -SwaggerOperation.prototype.getSampleJSON = function(type, models) { - var isPrimitive, listType, val; - listType = this.isListType(type); - isPrimitive = ((listType != null) && models[listType]) || (models[type] != null) ? false : true; - val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[type].createJSONSample()); - if (val) { - val = listType ? [val] : val; - if(typeof val == "string") - return val; - else if(typeof val === "object") { - var t = val; - if(val instanceof Array && val.length > 0) { - t = val[0]; - } - if(t.nodeName) { - var xmlString = new XMLSerializer().serializeToString(t); - return this.formatXml(xmlString); - } - else - return JSON.stringify(val, null, 2); - } - else - return val; - } -}; - -SwaggerOperation.prototype["do"] = function(args, opts, callback, error) { - var key, param, params, possibleParams, req, requestContentType, responseContentType, value, _i, _len, _ref; - if (args == null) { - args = {}; - } - if (opts == null) { - opts = {}; - } - requestContentType = null; - responseContentType = null; - if ((typeof args) === "function") { - error = opts; - callback = args; - args = {}; - } - if ((typeof opts) === "function") { - error = callback; - callback = opts; - } - if (error == null) { - error = function(xhr, textStatus, error) { - return log(xhr, textStatus, error); - }; - } - if (callback == null) { - callback = function(response) { - var content; - content = null; - if (response != null) { - content = response.data; - } else { - content = "no data"; - } - return log("default callback: " + content); - }; - } - params = {}; - params.headers = []; - if (args.headers != null) { - params.headers = args.headers; - delete args.headers; - } - - var possibleParams = []; - for(var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; - if(param.paramType === 'header') { - if(args[param.name]) - params.headers[param.name] = args[param.name]; - } - else if(param.paramType === 'form' || param.paramType.toLowerCase() === 'file') - possibleParams.push(param); - } - - if (args.body != null) { - params.body = args.body; - delete args.body; - } - - if (possibleParams) { - var key; - for (key in possibleParams) { - value = possibleParams[key]; - if (args[value.name]) { - params[value.name] = args[value.name]; - } - } - } - - req = new SwaggerRequest(this.method, this.urlify(args), params, opts, callback, error, this); - if (opts.mock != null) { - return req; - } else { - return true; - } -}; - -SwaggerOperation.prototype.pathJson = function() { - return this.path.replace("{format}", "json"); -}; - -SwaggerOperation.prototype.pathXml = function() { - return this.path.replace("{format}", "xml"); -}; - -SwaggerOperation.prototype.encodePathParam = function(pathParam) { - var encParts, part, parts, _i, _len; - pathParam = pathParam.toString(); - if (pathParam.indexOf("/") === -1) { - return encodeURIComponent(pathParam); - } else { - parts = pathParam.split("/"); - encParts = []; - for (_i = 0, _len = parts.length; _i < _len; _i++) { - part = parts[_i]; - encParts.push(encodeURIComponent(part)); - } - return encParts.join("/"); - } -}; - -SwaggerOperation.prototype.urlify = function(args) { - var url = this.resource.basePath + this.pathJson(); - var params = this.parameters; - for(var i = 0; i < params.length; i ++){ - var param = params[i]; - if (param.paramType === 'path') { - if(args[param.name]) { - // apply path params and remove from args - var reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi'); - url = url.replace(reg, this.encodePathParam(args[param.name])); - delete args[param.name]; - } - else - throw "" + param.name + " is a required path param."; - } - } - - var queryParams = ""; - for(var i = 0; i < params.length; i ++){ - var param = params[i]; - if(param.paramType === 'query') { - if (args[param.name] !== undefined) { - if (queryParams !== '') - queryParams += "&"; - queryParams += encodeURIComponent(param.name) + '=' + encodeURIComponent(args[param.name]); - } - } - } - if ((queryParams != null) && queryParams.length > 0) - url += '?' + queryParams; - return url; -}; - -SwaggerOperation.prototype.supportHeaderParams = function() { - return this.resource.api.supportHeaderParams; -}; - -SwaggerOperation.prototype.supportedSubmitMethods = function() { - return this.resource.api.supportedSubmitMethods; -}; - -SwaggerOperation.prototype.getQueryParams = function(args) { - return this.getMatchingParams(['query'], args); -}; - -SwaggerOperation.prototype.getHeaderParams = function(args) { - return this.getMatchingParams(['header'], args); -}; - -SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args) { - var matchingParams = {}; - var params = this.parameters; - for (var i = 0; i < params.length; i++) { - param = params[i]; - if (args && args[param.name]) - matchingParams[param.name] = args[param.name]; - } - var headers = this.resource.api.headers; - var name; - for (name in headers) { - var value = headers[name]; - matchingParams[name] = value; - } - return matchingParams; -}; - -SwaggerOperation.prototype.help = function() { - var msg = ""; - var params = this.parameters; - for (var i = 0; i < params.length; i++) { - var param = params[i]; - if (msg !== "") - msg += "\n"; - msg += "* " + param.name + (param.required ? ' (required)' : '') + " - " + param.description; - } - return msg; -}; - - -SwaggerOperation.prototype.formatXml = function(xml) { - var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len; - reg = /(>)(<)(\/*)/g; - wsexp = /[ ]*(.*)[ ]+\n/g; - contexp = /(<.+>)(.+\n)/g; - xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2'); - pad = 0; - formatted = ''; - lines = xml.split('\n'); - indent = 0; - lastType = 'other'; - transitions = { - 'single->single': 0, - 'single->closing': -1, - 'single->opening': 0, - 'single->other': 0, - 'closing->single': 0, - 'closing->closing': -1, - 'closing->opening': 0, - 'closing->other': 0, - 'opening->single': 1, - 'opening->closing': 0, - 'opening->opening': 1, - 'opening->other': 1, - 'other->single': 0, - 'other->closing': -1, - 'other->opening': 0, - 'other->other': 0 - }; - _fn = function(ln) { - var fromTo, j, key, padding, type, types, value; - types = { - single: Boolean(ln.match(/<.+\/>/)), - closing: Boolean(ln.match(/<\/.+>/)), - opening: Boolean(ln.match(/<[^!?].*>/)) - }; - type = ((function() { - var _results; - _results = []; - for (key in types) { - value = types[key]; - if (value) { - _results.push(key); - } - } - return _results; - })())[0]; - type = type === void 0 ? 'other' : type; - fromTo = lastType + '->' + type; - lastType = type; - padding = ''; - indent += transitions[fromTo]; - padding = ((function() { - var _j, _ref5, _results; - _results = []; - for (j = _j = 0, _ref5 = indent; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; j = 0 <= _ref5 ? ++_j : --_j) { - _results.push(' '); - } - return _results; - })()).join(''); - if (fromTo === 'opening->closing') { - return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n'; - } else { - return formatted += padding + ln + '\n'; - } - }; - for (_i = 0, _len = lines.length; _i < _len; _i++) { - ln = lines[_i]; - _fn(ln); - } - return formatted; -}; - -var SwaggerRequest = function(type, url, params, opts, successCallback, errorCallback, operation, execution) { - var _this = this; - var errors = []; - this.useJQuery = (typeof operation.resource.useJQuery !== 'undefined' ? operation.resource.useJQuery : null); - this.type = (type||errors.push("SwaggerRequest type is required (get/post/put/delete/patch/options).")); - this.url = (url||errors.push("SwaggerRequest url is required.")); - this.params = params; - this.opts = opts; - this.successCallback = (successCallback||errors.push("SwaggerRequest successCallback is required.")); - this.errorCallback = (errorCallback||errors.push("SwaggerRequest error callback is required.")); - this.operation = (operation||errors.push("SwaggerRequest operation is required.")); - this.execution = execution; - this.headers = (params.headers||{}); - - if(errors.length > 0) { - throw errors; - } - - this.type = this.type.toUpperCase(); - - // set request, response content type headers - var headers = this.setHeaders(params, this.operation); - var body = params.body; - - // encode the body for form submits - if (headers["Content-Type"]) { - var values = {}; - var i; - var operationParams = this.operation.parameters; - for(i = 0; i < operationParams.length; i++) { - var param = operationParams[i]; - if(param.paramType === "form") - values[param.name] = param; - } - - if(headers["Content-Type"].indexOf("application/x-www-form-urlencoded") === 0) { - var encoded = ""; - var key; - for(key in values) { - value = this.params[key]; - if(typeof value !== 'undefined'){ - if(encoded !== "") - encoded += "&"; - encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); - } - } - body = encoded; - } - else if (headers["Content-Type"].indexOf("multipart/form-data") === 0) { - // encode the body for form submits - var data = ""; - var boundary = "----SwaggerFormBoundary" + Date.now(); - var key; - for(key in values) { - value = this.params[key]; - if(typeof value !== 'undefined') { - data += '--' + boundary + '\n'; - data += 'Content-Disposition: form-data; name="' + key + '"'; - data += '\n\n'; - data += value + "\n"; - } - } - data += "--" + boundary + "--\n"; - headers["Content-Type"] = "multipart/form-data; boundary=" + boundary; - body = data; - } - } - - if (!((this.headers != null) && (this.headers.mock != null))) { - obj = { - url: this.url, - method: this.type, - headers: headers, - body: body, - useJQuery: this.useJQuery, - on: { - error: function(response) { - return _this.errorCallback(response, _this.opts.parent); - }, - redirect: function(response) { - return _this.successCallback(response, _this.opts.parent); - }, - 307: function(response) { - return _this.successCallback(response, _this.opts.parent); - }, - response: function(response) { - return _this.successCallback(response, _this.opts.parent); - } - } - }; - var e; - if (typeof window !== 'undefined') { - e = window; - } else { - e = exports; - } - status = e.authorizations.apply(obj, this.operation.authorizations); - if (opts.mock == null) { - if (status !== false) { - new SwaggerHttp().execute(obj); - } else { - obj.canceled = true; - } - } else { - return obj; - } - } -}; - -SwaggerRequest.prototype.setHeaders = function(params, operation) { - // default type - var accepts = "application/json"; - var consumes = "application/json"; - - var allDefinedParams = this.operation.parameters; - var definedFormParams = []; - var definedFileParams = []; - var body = params.body; - var headers = {}; - - // get params from the operation and set them in definedFileParams, definedFormParams, headers - var i; - for(i = 0; i < allDefinedParams.length; i++) { - var param = allDefinedParams[i]; - if(param.paramType === "form") - definedFormParams.push(param); - else if(param.paramType === "file") - definedFileParams.push(param); - else if(param.paramType === "header" && this.params.headers) { - var key = param.name; - var headerValue = this.params.headers[param.name]; - if(typeof this.params.headers[param.name] !== 'undefined') - headers[key] = headerValue; - } - } - - // if there's a body, need to set the accepts header via requestContentType - if (body && (this.type === "POST" || this.type === "PUT" || this.type === "PATCH" || this.type === "DELETE")) { - if (this.opts.requestContentType) - consumes = this.opts.requestContentType; - } else { - // if any form params, content type must be set - if(definedFormParams.length > 0) { - if(definedFileParams.length > 0) - consumes = "multipart/form-data"; - else - consumes = "application/x-www-form-urlencoded"; - } - else if (this.type === "DELETE") - body = "{}"; - else if (this.type != "DELETE") - accepts = null; - } - - if (consumes && this.operation.consumes) { - if (this.operation.consumes.indexOf(consumes) === -1) { - log("server doesn't consume " + consumes + ", try " + JSON.stringify(this.operation.consumes)); - consumes = this.operation.consumes[0]; - } - } - - if (this.opts.responseContentType) { - accepts = this.opts.responseContentType; - } else { - accepts = "application/json"; - } - if (accepts && this.operation.produces) { - if (this.operation.produces.indexOf(accepts) === -1) { - log("server can't produce " + accepts); - accepts = this.operation.produces[0]; - } - } - - if ((consumes && body !== "") || (consumes === "application/x-www-form-urlencoded")) - headers["Content-Type"] = consumes; - if (accepts) - headers["Accept"] = accepts; - return headers; -} - -SwaggerRequest.prototype.asCurl = function() { - var results = []; - if(this.headers) { - var key; - for(key in this.headers) { - results.push("--header \"" + key + ": " + this.headers[v] + "\""); - } - } - return "curl " + (results.join(" ")) + " " + this.url; -}; - -/** - * SwaggerHttp is a wrapper for executing requests - */ -var SwaggerHttp = function() {}; - -SwaggerHttp.prototype.execute = function(obj) { - if(obj && (typeof obj.useJQuery === 'boolean')) - this.useJQuery = obj.useJQuery; - else - this.useJQuery = this.isIE8(); - - if(this.useJQuery) - return new JQueryHttpClient().execute(obj); - else - return new ShredHttpClient().execute(obj); -} - -SwaggerHttp.prototype.isIE8 = function() { - var detectedIE = false; - if (typeof navigator !== 'undefined' && navigator.userAgent) { - nav = navigator.userAgent.toLowerCase(); - if (nav.indexOf('msie') !== -1) { - var version = parseInt(nav.split('msie')[1]); - if (version <= 8) { - detectedIE = true; - } - } - } - return detectedIE; -}; - -/* - * JQueryHttpClient lets a browser take advantage of JQuery's cross-browser magic. - * NOTE: when jQuery is available it will export both '$' and 'jQuery' to the global space. - * Since we are using closures here we need to alias it for internal use. - */ -var JQueryHttpClient = function(options) { - "use strict"; - if(!jQuery){ - var jQuery = window.jQuery; - } -} - -JQueryHttpClient.prototype.execute = function(obj) { - var cb = obj.on; - var request = obj; - - obj.type = obj.method; - obj.cache = false; - - obj.beforeSend = function(xhr) { - var key, results; - if (obj.headers) { - results = []; - var key; - for (key in obj.headers) { - if (key.toLowerCase() === "content-type") { - results.push(obj.contentType = obj.headers[key]); - } else if (key.toLowerCase() === "accept") { - results.push(obj.accepts = obj.headers[key]); - } else { - results.push(xhr.setRequestHeader(key, obj.headers[key])); - } - } - return results; - } - }; - - obj.data = obj.body; - obj.complete = function(response, textStatus, opts) { - var headers = {}, - headerArray = response.getAllResponseHeaders().split("\n"); - - for(var i = 0; i < headerArray.length; i++) { - var toSplit = headerArray[i].trim(); - if(toSplit.length === 0) - continue; - var separator = toSplit.indexOf(":"); - if(separator === -1) { - // Name but no value in the header - headers[toSplit] = null; - continue; - } - var name = toSplit.substring(0, separator).trim(), - value = toSplit.substring(separator + 1).trim(); - headers[name] = value; - } - - var out = { - url: request.url, - method: request.method, - status: response.status, - data: response.responseText, - headers: headers - }; - - var contentType = (headers["content-type"]||headers["Content-Type"]||null) - - if(contentType != null) { - if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) { - if(response.responseText && response.responseText !== "") - out.obj = JSON.parse(response.responseText); - else - out.obj = {} - } - } - - if(response.status >= 200 && response.status < 300) - cb.response(out); - else if(response.status === 0 || (response.status >= 400 && response.status < 599)) - cb.error(out); - else - return cb.response(out); - }; - - jQuery.support.cors = true; - return jQuery.ajax(obj); -} - -/* - * ShredHttpClient is a light-weight, node or browser HTTP client - */ -var ShredHttpClient = function(options) { - this.options = (options||{}); - this.isInitialized = false; - - var identity, toString; - - if (typeof window !== 'undefined') { - this.Shred = require("./shred"); - this.content = require("./shred/content"); - } - else - this.Shred = require("shred"); - this.shred = new this.Shred(); -} - -ShredHttpClient.prototype.initShred = function () { - this.isInitialized = true; - this.registerProcessors(this.shred); -} - -ShredHttpClient.prototype.registerProcessors = function(shred) { - var identity = function(x) { - return x; - }; - var toString = function(x) { - return x.toString(); - }; - - if (typeof window !== 'undefined') { - this.content.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], { - parser: identity, - stringify: toString - }); - } else { - this.Shred.registerProcessor(["application/json; charset=utf-8", "application/json", "json"], { - parser: identity, - stringify: toString - }); - } -} - -ShredHttpClient.prototype.execute = function(obj) { - if(!this.isInitialized) - this.initShred(); - - var cb = obj.on, res; - - var transform = function(response) { - var out = { - headers: response._headers, - url: response.request.url, - method: response.request.method, - status: response.status, - data: response.content.data - }; - - var contentType = (response._headers["content-type"]||response._headers["Content-Type"]||null) - - if(contentType != null) { - if(contentType.indexOf("application/json") == 0 || contentType.indexOf("+json") > 0) { - if(response.content.data && response.content.data !== "") - out.obj = JSON.parse(response.content.data); - else - out.obj = {} - } - } - return out; - }; - - // Transform an error into a usable response-like object - var transformError = function(error) { - var out = { - // Default to a status of 0 - The client will treat this as a generic permissions sort of error - status: 0, - data: error.message || error - }; - - if(error.code) { - out.obj = error; - - if(error.code === 'ENOTFOUND' || error.code === 'ECONNREFUSED' ) { - // We can tell the client that this should be treated as a missing resource and not as a permissions thing - out.status = 404; - } - } - - return out; - }; - - res = { - error: function(response) { - if (obj) - return cb.error(transform(response)); - }, - // Catch the Shred error raised when the request errors as it is made (i.e. No Response is coming) - request_error: function(err) { - if(obj) - return cb.error(transformError(err)); - }, - redirect: function(response) { - if (obj) - return cb.redirect(transform(response)); - }, - 307: function(response) { - if (obj) - return cb.redirect(transform(response)); - }, - response: function(response) { - if (obj) - return cb.response(transform(response)); - } - }; - if (obj) { - obj.on = res; - } - return this.shred.request(obj); -}; - -/** - * SwaggerAuthorizations applys the correct authorization to an operation being executed - */ -var SwaggerAuthorizations = function() { - this.authz = {}; -}; - -SwaggerAuthorizations.prototype.add = function(name, auth) { - this.authz[name] = auth; - return auth; -}; - -SwaggerAuthorizations.prototype.remove = function(name) { - return delete this.authz[name]; -}; - -SwaggerAuthorizations.prototype.apply = function(obj, authorizations) { - var status = null; - var key; - - // if the "authorizations" key is undefined, or has an empty array, add all keys - if(typeof authorizations === 'undefined' || Object.keys(authorizations).length == 0) { - for (key in this.authz) { - value = this.authz[key]; - result = value.apply(obj, authorizations); - if (result === true) - status = true; - } - } - else { - for(name in authorizations) { - for (key in this.authz) { - if(key == name) { - value = this.authz[key]; - result = value.apply(obj, authorizations); - if (result === true) - status = true; - } - } - } - } - - return status; -}; - -/** - * ApiKeyAuthorization allows a query param or header to be injected - */ -var ApiKeyAuthorization = function(name, value, type, delimiter) { - this.name = name; - this.value = value; - this.type = type; - this.delimiter = delimiter; -}; - -ApiKeyAuthorization.prototype.apply = function(obj, authorizations) { - if (this.type === "query") { - if (obj.url.indexOf('?') > 0) - obj.url = obj.url + "&" + this.name + "=" + this.value; - else - obj.url = obj.url + "?" + this.name + "=" + this.value; - return true; - } else if (this.type === "header") { - if(typeof obj.headers[this.name] !== 'undefined') { - if(typeof this.delimiter !== 'undefined') - obj.headers[this.name] = obj.headers[this.name] + this.delimiter + this.value; - } - else - obj.headers[this.name] = this.value; - return true; - } -}; - -var CookieAuthorization = function(cookie) { - this.cookie = cookie; -} - -CookieAuthorization.prototype.apply = function(obj, authorizations) { - obj.cookieJar = obj.cookieJar || CookieJar(); - obj.cookieJar.setCookie(this.cookie); - return true; -} - -/** - * Password Authorization is a basic auth implementation - */ -var PasswordAuthorization = function(name, username, password) { - this.name = name; - this.username = username; - this.password = password; - this._btoa = null; - if (typeof window !== 'undefined') - this._btoa = btoa; - else - this._btoa = require("btoa"); -}; - -PasswordAuthorization.prototype.apply = function(obj, authorizations) { - var base64encoder = this._btoa; - obj.headers["Authorization"] = "Basic " + base64encoder(this.username + ":" + this.password); - return true; -}; - -var e = (typeof window !== 'undefined' ? window : exports); - -var sampleModels = {}; -var cookies = {}; - -e.SampleModels = sampleModels; -e.SwaggerHttp = SwaggerHttp; -e.SwaggerRequest = SwaggerRequest; -e.authorizations = new SwaggerAuthorizations(); -e.ApiKeyAuthorization = ApiKeyAuthorization; -e.PasswordAuthorization = PasswordAuthorization; -e.CookieAuthorization = CookieAuthorization; -e.JQueryHttpClient = JQueryHttpClient; -e.ShredHttpClient = ShredHttpClient; -e.SwaggerOperation = SwaggerOperation; -e.SwaggerModel = SwaggerModel; -e.SwaggerModelProperty = SwaggerModelProperty; -e.SwaggerResource = SwaggerResource; -e.SwaggerApi = SwaggerApi; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.js deleted file mode 100644 index 11f1d96f533..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -// Underscore.js 1.7.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])<u?i=o+1:a=o}return i},h.toArray=function(n){return n?h.isArray(n)?a.call(n):n.length===+n.length?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:n.length===+n.length?n.length:h.keys(n).length},h.partition=function(n,t,r){t=h.iteratee(t,r);var e=[],u=[];return h.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},h.first=h.head=h.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},h.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.map b/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.map deleted file mode 100644 index b31e43590a0..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createIndexFinder","array","predicate","cb","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","call","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","i","key","baseCreate","result","MAX_ARRAY_INDEX","Math","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","target","fromIndex","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","max","computed","lastComputed","min","shuffle","rand","set","shuffled","random","sample","n","guard","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","idx","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","item","zip","unzip","object","sortedIndex","isNaN","lastIndexOf","from","findLastIndex","low","high","mid","floor","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WAoKC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+btD,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3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,GAAI1Q,GAAM6B,KAAKkB,QAGf,OAFA2D,GAAOhD,MAAM1D,EAAKW,WACJ,UAAT+P,GAA6B,WAATA,GAAqC,IAAf1Q,EAAIK,cAAqBL,GAAI,GACrEwE,EAAO3C,KAAM7B,MAKxBU,EAAEkE,MAAM,SAAU,OAAQ,SAAU,SAAS8L,GAC3C,GAAIhK,GAAS3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,MAAOlM,GAAO3C,KAAM6E,EAAOhD,MAAM7B,KAAKkB,SAAUpC,eAKpDD,EAAEY,UAAU+B,MAAQ,WAClB,MAAOxB,MAAKkB,UAKdrC,EAAEY,UAAUqT,QAAUjU,EAAEY,UAAUsT,OAASlU,EAAEY,UAAU+B,MAEvD3C,EAAEY,UAAUe,SAAW,WACrB,MAAO,GAAKR,KAAKkB,UAUG,kBAAX8R,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOnU,OAGX4C,KAAKzB"} \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/o2c.html b/htdocs/includes/restler/framework/Luracast/Restler/explorer/o2c.html index 88e8bf114b1..0cde1d3960b 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/o2c.html +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/o2c.html @@ -1,6 +1,6 @@ <script> var qp = null; -if(window.location.hash) { +if(/code|token|error/.test(window.location.hash)) { qp = location.hash.substring(1); } else { @@ -11,10 +11,10 @@ qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}', return key===""?value:decodeURIComponent(value) } ):{} -if (window.opener.swaggerUi.tokenUrl) +if (window.opener.swaggerUiAuth.tokenUrl) window.opener.processOAuthCode(qp); else window.opener.onOAuthComplete(qp); window.close(); -</script> \ No newline at end of file +</script> diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.js index b1c2e3f2767..5219d0335c9 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.js +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.js @@ -1,44 +1,804 @@ /** * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API - * @version v2.1.4 + * @version v2.2.10 * @link http://swagger.io * @license Apache-2.0 */ -(function(){this["Handlebars"] = this["Handlebars"] || {}; -this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {}; -this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'><label for='input_apiKey_entry'>" - + escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper))) - + "</label></div>\n <input placeholder='api_key' class='auth_input' id='input_apiKey_entry' name='apiKey' type='text'/>\n <div class='auth_submit'><a class='auth_submit_button' id='apply_api_key' href='#' data-sw-translate>apply</a></div>\n </div>\n</div>\n"; +(function(){/* jshint ignore:start */ + {(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['apikey_auth'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <span class=\"key_auth__value\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</span>\n"; +},"3":function(container,depth0,helpers,partials,data) { + return " <input placeholder=\"api_key\" class=\"auth_input input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<div class=\"key_input_container\">\n <h3 class=\"auth__title\">Api key authorization</h3>\n <div class=\"auth__description\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>\n <div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">name:</span>\n <span class=\"key_auth__value\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</span>\n </div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">in:</span>\n <span class=\"key_auth__value\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["in"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</span>\n </div>\n <div class=\"key_auth__field\">\n <span class=\"key_auth__label\">value:</span>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + " </div>\n </div>\n</div>\n"; },"useData":true}); -this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n <div class='key_input_container'>\n <div class=\"auth_label\"><label for=\"input_username\" data-sw-translate>Username</label></div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\"><label for=\"password\" data-sw-translate>Password</label></div>\n <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\">apply</a></div>\n </div>\n</div>\n\n"; - },"useData":true}); -this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <option value=\"" - + escapeExpression(lambda(depth0, depth0)) - + "\">"; - stack1 = lambda(depth0, depth0); - if (stack1 != null) { buffer += stack1; } - return buffer + "</option>\n"; -},"4":function(depth0,helpers,partials,data) { - return " <option value=\"application/json\">application/json</option>\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label data-sw-translate for=\"" - + escapeExpression(((helper = (helper = helpers.contentTypeId || (depth0 != null ? depth0.contentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"contentTypeId","hash":{},"data":data}) : helper))) +templates['auth_button'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "<a class='authorize__btn' href=\"#\">Authorize</a>\n"; +},"useData":true}); +templates['auth_button_operation'] = template({"1":function(container,depth0,helpers,partials,data) { + return " authorize__btn_operation_login\n"; +},"3":function(container,depth0,helpers,partials,data) { + return " authorize__btn_operation_logout\n"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <ul class=\"authorize-scopes\">\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </ul>\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <li class=\"authorize__scope\" title=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</li>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "<div class=\"authorize__btn authorize__btn_operation\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</div>\n"; +},"useData":true}); +templates['auth_view'] = template({"1":function(container,depth0,helpers,partials,data) { + return " <button type=\"button\" class=\"auth__button auth_submit__button\" data-sw-translate>Authorize</button>\n"; +},"3":function(container,depth0,helpers,partials,data) { + return " <button type=\"button\" class=\"auth__button auth_logout__button\" data-sw-translate>Logout</button>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "<div class=\"auth_container\">\n\n <div class=\"auth_inner\"></div>\n <div class=\"auth_submit\">\n" + + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isAuthorized : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </div>\n\n</div>\n"; +},"useData":true}); +templates['basic_auth'] = template({"1":function(container,depth0,helpers,partials,data) { + return " - authorized"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <span class=\"basic_auth__value\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.username : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</span>\n"; +},"5":function(container,depth0,helpers,partials,data) { + return " <input required placeholder=\"username\" class=\"basic_auth__username auth_input\" name=\"username\" type=\"text\"/>\n"; +},"7":function(container,depth0,helpers,partials,data) { + return " <div class=\"auth_label\">\n <span class=\"basic_auth__label\" data-sw-translate>password:</span>\n <input required placeholder=\"password\" class=\"basic_auth__password auth_input\" name=\"password\" type=\"password\"/></label>\n </div>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "<div class='basic_auth_container'>\n <h3 class=\"auth__title\">Basic authentication" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</h3>\n <form class=\"basic_input_container\">\n <div class=\"auth__description\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>\n <div class=\"auth_label\">\n <span class=\"basic_auth__label\" data-sw-translate>username:</span>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") + + " </div>\n" + + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isLogout : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </form>\n</div>\n"; +},"useData":true}); +templates['content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <option value=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</option>\n"; +},"4":function(container,depth0,helpers,partials,data) { + return " <option value=\"application/json\">application/json</option>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<label data-sw-translate for=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.contentTypeId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + "\">Response Content Type</label>\n<select name=\"contentType\" id=\"" - + escapeExpression(((helper = (helper = helpers.contentTypeId || (depth0 != null ? depth0.contentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"contentTypeId","hash":{},"data":data}) : helper))) - + "\">\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "</select>\n"; + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.contentTypeId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.produces : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + "</select>\n"; },"useData":true}); +templates['main'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <div class=\"info_title\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>\n <div class=\"info_description markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.externalDocs : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <p>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</p>\n <a href=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\" target=\"_blank\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</a>\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<div class=\"info_tos\"><a target=\"_blank\" href=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\" data-sw-translate>Terms of service</a></div>"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<div><div class='info_name' style=\"display: inline\" data-sw-translate>Created by </div> " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</div>"; +},"8":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<div class='info_url' data-sw-translate>See more at <a href=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</a></div>"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<div class='info_email'><a target=\"_parent\" href=\"mailto:" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "?subject=" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\" data-sw-translate>Contact the developer</a></div>"; +},"12":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<div class='info_license'><a target=\"_blank\" href='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.url : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.name : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</a></div>"; +},"14":function(container,depth0,helpers,partials,data) { + var stack1; + + return " , <span style=\"font-variant: small-caps\" data-sw-translate>api version</span>: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n "; +},"16":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <span style=\"float:right\"><a target=\"_blank\" href=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "/debug?url=" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\"><img id=\"validator\" src=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "?url=" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\"></a>\n </span>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "<div class='info' id='api_info'>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.info : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</div>\n<div class='container' id='resources_container'>\n <div class='authorize-wrapper'></div>\n\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.basePath : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "]\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.validatorUrl : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </h4>\n </div>\n</div>\n"; +},"useData":true}); +templates['oauth2'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<p>Authorization URL: " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.authorizationUrl : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</p>"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<p>Token URL: " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.tokenUrl : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</p>"; +},"5":function(container,depth0,helpers,partials,data) { + return " <p>Please input username and password for password flow authorization</p>\n <fieldset>\n <div><label>Username: <input class=\"oauth-username\" type=\"text\" name=\"username\"></label></div>\n <div><label>Password: <input class=\"oauth-password\" type=\"password\" name=\"password\"></label></div>\n </fieldset>\n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <p>Setup client authentication." + + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.requireClientAuthenticaiton : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</p>\n <fieldset>\n <div><label>Type:\n <select class=\"oauth-client-authentication-type\" name=\"client-authentication-type\">\n <option value=\"none\" selected>None or other</option>\n <option value=\"basic\">Basic auth</option>\n <option value=\"request-body\">Request body</option>\n </select>\n </label></div>\n <div class=\"oauth-client-authentication\" hidden>\n <div><label>ClientId: <input class=\"oauth-client-id\" type=\"text\" name=\"client-id\"></label></div>\n <div><label>Secret: <input class=\"oauth-client-secret\" type=\"text\" name=\"client-secret\"></label></div>\n </div>\n </fieldset>\n"; +},"8":function(container,depth0,helpers,partials,data) { + return "(Required)"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <li>\n <input class=\"oauth-scope\" type=\"checkbox\" data-scope=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\" oauthtype=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\"/>\n <label>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.scope : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</label><br/>\n <span class=\"api-scope-desc\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </span>\n </li>\n"; +},"11":function(container,depth0,helpers,partials,data) { + var stack1; + + return " (" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.OAuthSchemeKey : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + ")\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<div>\n <h3 class=\"auth__title\">OAuth2.0</h3>\n <p>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</p>\n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.authorizationUrl : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.tokenUrl : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n <p>flow: " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.flow : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</p>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isPasswordFlow : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.clientAuthentication : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " <p><strong> " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.appName : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + " </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n <a href=\"#\">Learn how to use</a>\n </p>\n <ul class=\"api-popup-scopes\">\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.scopes : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </ul>\n</div>"; +},"useData":true}); +templates['operation'] = template({"1":function(container,depth0,helpers,partials,data) { + return "deprecated"; +},"3":function(container,depth0,helpers,partials,data) { + return " <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <h4><span data-sw-translate>Implementation Notes</span></h4>\n <div class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>\n"; +},"7":function(container,depth0,helpers,partials,data) { + return " <div class='authorize-wrapper authorize-wrapper_operation'></div>\n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return " <div class=\"response-class\">\n <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.successCode : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + ")</h4>\n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.successDescription : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n </div>\n"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1; + + return "<div class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.successDescription : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</div>"; +},"12":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <h4 data-sw-translate>Headers</h4>\n <table class=\"headers\">\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Header</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Description</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Type</th>\n <th style=\"width: 320px; max-width: 320px\" data-sw-translate>Other</th>\n </tr>\n </thead>\n <tbody>\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </tbody>\n </table>\n"; +},"13":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <tr>\n <td>" + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "</td>\n <td>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n <td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n <td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.other : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n </tr>\n"; +},"15":function(container,depth0,helpers,partials,data) { + return " <h4 data-sw-translate>Parameters</h4>\n <table class='fullwidth parameters'>\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Value</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Description</th>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\" data-sw-translate>Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n"; +},"17":function(container,depth0,helpers,partials,data) { + return " <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth response-messages'>\n <thead>\n <tr>\n <th data-sw-translate>HTTP Status Code</th>\n <th data-sw-translate>Reason</th>\n <th data-sw-translate>Response Model</th>\n <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n </tbody>\n </table>\n"; +},"19":function(container,depth0,helpers,partials,data) { + return ""; +},"21":function(container,depth0,helpers,partials,data) { + return " <div class='sandbox_header'>\n <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"; +},"23":function(container,depth0,helpers,partials,data) { + return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3=container.escapeExpression; + + return " <ul class='operations' >\n <li class='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.method : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + " operation' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.parentId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "_" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data})) + + "/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data})) + + "' class=\"toggleOperation\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.method : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</a>\n </span>\n <span class='path'>\n <a href='#!/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data})) + + "/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data})) + + "' class=\"toggleOperation " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.deprecated : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.path : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data})) + + "/" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data})) + + "' class=\"toggleOperation\"><span class=\"markdown\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</span></a>\n </li>\n </ul>\n </div>\n <div class='content' id='" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.encodedParentId : depth0),{"name":"sanitize","hash":{},"data":data})) + + "_" + + alias3((helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.nickname : depth0),{"name":"sanitize","hash":{},"data":data})) + + "_content' style='display:none'>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.deprecated : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.security : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.parameters : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.responseMessages : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isReadOnly : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.program(21, data, 0),"data":data})) != null ? stack1 : "") + + " </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.showRequestHeaders : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"; +},"useData":true}); +templates['param'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <input type=\"file\" name='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'/>\n <div class=\"parameter-content-type\" />\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea' name='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <textarea class='body-textarea' name='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : ""); +},"10":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"11":function(container,depth0,helpers,partials,data) { + return ""; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td class='code'><label for='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</label></td>\n<td>\n\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") + + "\n</td>\n<td class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n"; +},"useData":true}); +templates['param_list'] = template({"1":function(container,depth0,helpers,partials,data) { + return " required"; +},"3":function(container,depth0,helpers,partials,data) { + return " multiple=\"multiple\""; +},"5":function(container,depth0,helpers,partials,data) { + return " required "; +},"7":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <option " + + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.hasDefault : depth0),{"name":"unless","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " value=''></option>\n"; +},"8":function(container,depth0,helpers,partials,data) { + return " selected=\"\" "; +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "\n <option " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isDefault : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " value='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "'> " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + " " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isDefault : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </option>\n\n"; +},"11":function(container,depth0,helpers,partials,data) { + return " selected=\"\" "; +},"13":function(container,depth0,helpers,partials,data) { + return " (default) "; +},"15":function(container,depth0,helpers,partials,data) { + return "<strong>"; +},"17":function(container,depth0,helpers,partials,data) { + return "</strong>"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td class='code" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "'><label for='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</label></td>\n<td>\n <select " + + ((stack1 = (helpers.isArray || (depth0 && depth0.isArray) || alias2).call(alias1,depth0,{"name":"isArray","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " class=\"parameter " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\" name=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\" id=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\">\n\n" + + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n" + + ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n </select>\n</td>\n<td class=\"markdown\">" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "</td>\n<td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; +},"useData":true}); +templates['param_readonly'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <textarea class='body-textarea' readonly='readonly' name='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</textarea>\n <div class=\"parameter-content-type\" />\n"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"6":function(container,depth0,helpers,partials,data) { + return " (empty)\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td class='code'><label for='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</label></td>\n<td>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "</td>\n<td class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; +},"useData":true}); +templates['param_readonly_required'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</textarea>\n"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"6":function(container,depth0,helpers,partials,data) { + return " (empty)\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td class='code required'><label for='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</label></td>\n<td>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") + + "</td>\n<td class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; +},"useData":true}); +templates['param_required'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <input type=\"file\" name='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'/>\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0["default"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea required' placeholder='(required)' name='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id=\"" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0["default"] : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <textarea class='body-textarea required' placeholder='(required)' name='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n"; +},"9":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.isFile : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : ""); +},"10":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <input class='parameter required' type='file' name='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'/>\n"; +},"12":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helpers.helperMissing).call(depth0 != null ? depth0 : {},depth0,{"name":"renderTextParam","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"13":function(container,depth0,helpers,partials,data) { + return ""; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td class='code required'><label for='" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.valueId : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "'>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</label></td>\n<td>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isBody : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") + + "</td>\n<td>\n <strong><span class=\"markdown\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</span></strong>\n</td>\n<td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.paramType : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; +},"useData":true}); +templates['parameter_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.consumes : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <option value=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</option>\n"; +},"4":function(container,depth0,helpers,partials,data) { + return " <option value=\"application/json\">application/json</option>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<label for=\"" + + container.escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"parameterContentTypeId","hash":{},"data":data}) : helper))) + + "\" data-sw-translate>Parameter content type:</label>\n<select name=\"parameterContentType\" id=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.parameterContentTypeId : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.consumes : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + "</select>\n"; +},"useData":true}); +templates['popup'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper; + + return "<div class=\"api-popup-dialog-wrapper\">\n <div class=\"api-popup-title\">" + + container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"title","hash":{},"data":data}) : helper))) + + "</div>\n <div class=\"api-popup-content\"></div>\n <p class=\"error-msg\"></p>\n <div class=\"api-popup-actions\">\n <button class=\"api-popup-cancel api-button gray\" type=\"button\">Cancel</button>\n </div>\n</div>\n<div class=\"api-popup-dialog-shadow\"></div>"; +},"useData":true}); +templates['resource'] = template({"1":function(container,depth0,helpers,partials,data) { + return " : "; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return " <li>\n <a href='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.url : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' data-sw-translate>Raw</a>\n </li>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, options, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, buffer = + "<div class='heading'>\n <h2>\n <a href='#!/" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' class=\"toggleEndpointList\" data-id=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.name : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</a> "; + stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : alias2),(options={"name":"summary","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data}),(typeof helper === "function" ? helper.call(alias1,options) : helper)); + if (!helpers.summary) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + return buffer + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.summary : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' id='endpointListTogger_" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "' class=\"toggleEndpointList\" data-id=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\" data-sw-translate>\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\" data-sw-translate>\n Expand Operations\n </a>\n </li>\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </ul>\n</div>\n<ul class='endpoints' id='" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.id : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "_endpoint_list' style='display:none'>\n\n</ul>\n"; +},"useData":true}); +templates['response_content_type'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.produces : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <option value=\"" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "\">" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,depth0,{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</option>\n"; +},"4":function(container,depth0,helpers,partials,data) { + return " <option value=\"application/json\">application/json</option>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "<label data-sw-translate for=\"" + + alias4(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"responseContentTypeId","hash":{},"data":data}) : helper))) + + "\">Response Content Type</label>\n<select name=\"responseContentType\" id=\"" + + alias4(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"responseContentTypeId","hash":{},"data":data}) : helper))) + + "\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.produces : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + "</select>\n"; +},"useData":true}); +templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return "\n<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n " + + container.escapeExpression((helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"sanitize","hash":{},"data":data})) + + "\n </div>\n\n <div class=\"snippet\">\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </div>\n</div>\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return " <div class=\"snippet_json\">\n <pre><code>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</code></pre>\n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n </div>\n"; +},"3":function(container,depth0,helpers,partials,data) { + return "<small class=\"notice\" data-sw-translate></small>"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}; + + return " <div class=\"snippet_xml\">\n <pre><code>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</code></pre>\n " + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.isParam : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\n </div>\n"; +},"7":function(container,depth0,helpers,partials,data) { + var stack1; + + return " " + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.signature : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.sampleJSON : depth0),"||",(depth0 != null ? depth0.sampleXML : depth0),{"name":"ifCond","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : ""); +},"useData":true}); +templates['status_code'] = template({"1":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return " <tr>\n <td>" + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "</td>\n <td>" + + ((stack1 = (helpers.sanitize || (depth0 && depth0.sanitize) || alias2).call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"sanitize","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n <td>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n </tr>\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : {}, alias2=helpers.helperMissing; + + return "<td width='15%' class='code'>" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td class=\"markdown\">" + + ((stack1 = (helpers.escape || (depth0 && depth0.escape) || alias2).call(alias1,(depth0 != null ? depth0.message : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "") + + "</td>\n<td width='50%'><span class=\"model-signature\" /></td>\n<td class=\"headers\">\n <table>\n <tbody>\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.headers : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " </tbody>\n </table>\n</td>"; +},"useData":true}); +})();} + /* jshint ignore:end */ 'use strict'; @@ -240,19 +1000,2103 @@ window.Docs = { } }; -'use strict'; +/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ -Handlebars.registerHelper('sanitize', function(html) { - // Strip the script tags from the html, and return it as a Handlebars.SafeString - html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); - return new Handlebars.SafeString(html); +// vim: ts=4 sts=4 sw=4 expandtab + +// Add semicolon to prevent IIFE from being passed as argument to concatenated code. +; + +// UMD (Universal Module Definition) +// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js +(function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } +}(this, function () { + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var $Function = Function; + var FunctionPrototype = $Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var array_join = ArrayPrototype.join; + var call = FunctionPrototype.call; + var apply = FunctionPrototype.apply; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + /* global Symbol */ + /* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; + + var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; }; + var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; }; + /* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */ + + /* inlined from http://npmjs.com/define-properties */ + var supportsDescriptors = $Object.defineProperty && (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is ES3 */ + return false; + } + }()); + var defineProperties = (function (has) { + // Define configurable, writable, and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { + return; + } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + }(ObjectPrototype.hasOwnProperty)); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = $Number.isNaN || function isActualNaN(x) { + return x !== x; + }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + } + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = apply.call( + target, + this, + array_concat.call(args, array_slice.call(arguments)) + ); + if ($Object(result) === result) { + return result; + } + return this; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return apply.call( + target, + that, + array_concat.call(args, array_slice.call(arguments)) + ); + + } + + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + } + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // use it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var arraySlice = call.bind(array_slice); + var arraySliceApply = apply.bind(array_slice); + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var pushCall = call.bind(array_push); + var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable); + var arraySort = call.bind(ArrayPrototype.sort); + + // + // Array + // ===== + // + + var isArray = $Array.isArray || function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties(ArrayPrototype, { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + } + }, hasUnshiftReturnValueBug); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (method) { + try { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call([1], function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, 'x'); + } catch (e) { + threwException = true; + } + } + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties(ArrayPrototype, { + forEach: function forEach(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + } + }, !properlyBoxesContext(ArrayPrototype.forEach)); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties(ArrayPrototype, { + map: function map(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.map)); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties(ArrayPrototype, { + filter: function filter(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) { + pushCall(result, value); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.filter)); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties(ArrayPrototype, { + every: function every(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return false; + } + } + return true; + } + }, !properlyBoxesContext(ArrayPrototype.every)); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties(ArrayPrototype, { + some: function some(callbackfn/*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return true; + } + } + return false; + } + }, !properlyBoxesContext(ArrayPrototype.some)); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduce: function reduce(callbackfn/*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + } + }, !reduceCoercesToObject); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { + return list; + }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduceRight: function reduceRight(callbackfn/*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + } + }, !reduceRightCoercesToObject); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties(ArrayPrototype, { + indexOf: function indexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + } + }, hasFirefox2IndexOfBug); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties(ArrayPrototype, { + lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + } + }, hasFirefox2LastIndexOfBug); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + }()); + defineProperties(ArrayPrototype, { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + } + }, !spliceNoopReturnsEmptyArray); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = arraySlice(arguments); + if (args.length < 2) { + pushCall(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + } + }, !spliceWorksWithEmptyObject); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + }()); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = arraySlice(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + var maxK = len - actualDeleteCount; + while (k < maxK) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + var minK = len - actualDeleteCount + itemCount; + while (k > minK) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + } + }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays); + + var originalJoin = ArrayPrototype.join; + var hasStringJoinBug; + try { + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3'; + } catch (e) { + hasStringJoinBug = true; + } + if (hasStringJoinBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep); + } + }, hasStringJoinBug); + } + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + if (hasJoinUndefinedBug) { + defineProperties(ArrayPrototype, { + join: function join(separator) { + var sep = typeof separator === 'undefined' ? ',' : separator; + return originalJoin.call(this, sep); + } + }, hasJoinUndefinedBug); + } + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + }()); + defineProperties(ArrayPrototype, { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + } + }, pushIsNotGeneric); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + }()); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // ES5 15.2.3.14 + // http://es5.github.io/#x15.4.4.10 + // Fix boxed string bug + defineProperties(ArrayPrototype, { + slice: function (start, end) { + var arr = isString(this) ? strSplit(this, '') : this; + return arraySliceApply(arr, arguments); + } + }, splitString); + + var sortIgnoresNonFunctions = (function () { + try { + [1, 2].sort(null); + [1, 2].sort({}); + return true; + } catch (e) {} + return false; + }()); + var sortThrowsOnRegex = (function () { + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'` + try { + [1, 2].sort(/a/); + return false; + } catch (e) {} + return true; + }()); + var sortIgnoresUndefined = (function () { + // applies in IE 8, for one. + try { + [1, 2].sort(undefined); + return true; + } catch (e) {} + return false; + }()); + defineProperties(ArrayPrototype, { + sort: function sort(compareFn) { + if (typeof compareFn === 'undefined') { + return arraySort(this); + } + if (!isCallable(compareFn)) { + throw new TypeError('Array.prototype.sort callback must be a function'); + } + return arraySort(this, compareFn); + } + }, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !isEnum({ 'toString': null }, 'toString'); + var hasProtoEnumBug = isEnum(function () {}, 'prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var blacklistedKeys = { + $window: true, + $console: true, + $parent: true, + $self: true, + $frame: true, + $frames: true, + $frameElement: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $external: true + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { + return false; + } + for (var k in window) { + try { + if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(object); + } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + pushCall(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + pushCall(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + pushCall(theKeys, dontEnum); + } + } + } + return theKeys; + } + }); + + var keysWorksWithArguments = $Object.keys && (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + }(1, 2)); + var keysHasArgumentsLengthBug = $Object.keys && (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + }(1)); + var originalKeys = $Object.keys; + defineProperties($Object, { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(arraySlice(object)); + } else { + return originalKeys(object); + } + } + }, !keysWorksWithArguments || keysHasArgumentsLengthBug); + + // + // Date + // ==== + // + + var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0; + var aNegativeTestDate = new Date(-1509842289600292); + var aPositiveTestDate = new Date(1449662400000); + var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT'; + var hasToDateStringFormatBug; + var hasToStringFormatBug; + var timeZoneOffset = aNegativeTestDate.getTimezoneOffset(); + if (timeZoneOffset < -720) { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875'; + hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } else { + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875'; + hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString()); + } + + var originalGetFullYear = call.bind(Date.prototype.getFullYear); + var originalGetMonth = call.bind(Date.prototype.getMonth); + var originalGetDate = call.bind(Date.prototype.getDate); + var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear); + var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth); + var originalGetUTCDate = call.bind(Date.prototype.getUTCDate); + var originalGetUTCDay = call.bind(Date.prototype.getUTCDay); + var originalGetUTCHours = call.bind(Date.prototype.getUTCHours); + var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes); + var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds); + var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds); + var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var daysInMonth = function daysInMonth(month, year) { + return originalGetDate(new Date(year, month, 0)); + }; + + defineProperties(Date.prototype, { + getFullYear: function getFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + if (year < 0 && originalGetMonth(this) > 11) { + return year + 1; + } + return year; + }, + getMonth: function getMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getDate: function getDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetFullYear(this); + var month = originalGetMonth(this); + var date = originalGetDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + }, + getUTCFullYear: function getUTCFullYear() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + if (year < 0 && originalGetUTCMonth(this) > 11) { + return year + 1; + } + return year; + }, + getUTCMonth: function getUTCMonth() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + if (year < 0 && month > 11) { + return 0; + } + return month; + }, + getUTCDate: function getUTCDate() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var year = originalGetUTCFullYear(this); + var month = originalGetUTCMonth(this); + var date = originalGetUTCDate(this); + if (year < 0 && month > 11) { + if (month === 12) { + return date; + } + var days = daysInMonth(0, year + 1); + return (days - date) + 1; + } + return date; + } + }, hasNegativeMonthYearBug); + + defineProperties(Date.prototype, { + toUTCString: function toUTCString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = originalGetUTCDay(this); + var date = originalGetUTCDate(this); + var month = originalGetUTCMonth(this); + var year = originalGetUTCFullYear(this); + var hour = originalGetUTCHours(this); + var minute = originalGetUTCMinutes(this); + var second = originalGetUTCSeconds(this); + return dayName[day] + ', ' + + (date < 10 ? '0' + date : date) + ' ' + + monthName[month] + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT'; + } + }, hasNegativeMonthYearBug || hasToUTCStringFormatBug); + + // Opera 12 has `,` + defineProperties(Date.prototype, { + toDateString: function toDateString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year; + } + }, hasNegativeMonthYearBug || hasToDateStringFormatBug); + + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + if (hasNegativeMonthYearBug || hasToStringFormatBug) { + Date.prototype.toString = function toString() { + if (!this || !(this instanceof Date)) { + throw new TypeError('this is not a Date object.'); + } + var day = this.getDay(); + var date = this.getDate(); + var month = this.getMonth(); + var year = this.getFullYear(); + var hour = this.getHours(); + var minute = this.getMinutes(); + var second = this.getSeconds(); + var timezoneOffset = this.getTimezoneOffset(); + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60); + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60); + return dayName[day] + ' ' + + monthName[month] + ' ' + + (date < 10 ? '0' + date : date) + ' ' + + year + ' ' + + (hour < 10 ? '0' + hour : hour) + ':' + + (minute < 10 ? '0' + minute : minute) + ':' + + (second < 10 ? '0' + second : second) + ' GMT' + + (timezoneOffset > 0 ? '-' : '+') + + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) + + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset); + }; + if (supportsDescriptors) { + $Object.defineProperty(Date.prototype, 'toString', { + configurable: true, + enumerable: false, + writable: true + }); + } + } + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; + var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + var getTime = call.bind(Date.prototype.getTime); + + defineProperties(Date.prototype, { + toISOString: function toISOString() { + if (!isFinite(this) || !isFinite(getTime(this))) { + // Adope Photoshop requires the second check. + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + var year = originalGetUTCFullYear(this); + + var month = originalGetUTCMonth(this); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = (month % 12 + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)]; + year = ( + (year < 0 ? '-' : (year > 9999 ? '+' : '')) + + strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6) + ); + + for (var i = 0; i < result.length; ++i) { + // pad months, days, hours, minutes, and seconds to have two digits. + result[i] = strSlice('00' + result[i], -2); + } + // pad milliseconds to have three digits. + return ( + year + '-' + arraySlice(result, 0, 2).join('-') + + 'T' + arraySlice(result, 2).join(':') + '.' + + strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z' + ); + } + }, hasNegativeDateBug || hasSafari51DateBug); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ // generic + toISOString: function () { return true; } + }); + } catch (e) { + return false; + } + }()); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + /* eslint-disable no-undef */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime()); + /* eslint-disable no-implicit-globals */ + Date = (function (NativeDate) { + /* eslint-enable no-implicit-globals */ + /* eslint-enable no-undef */ + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = length === 1 && $String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) : + length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) : + new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp('^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + + // 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$'); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties(DateShim, { + now: NativeDate.now, + UTC: NativeDate.UTC + }, true); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { + constructor: DateShim + }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && second < 60 && millisecond < 1000 && + month > -1 && month < 12 && hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month)) + ) { + result = ( + (dayFromMonth(year, month) + day) * 24 + + hour + + hourOffset * signOffset + ) * 60; + result = ( + (result + minute + minuteOffset * signOffset) * 60 + + second + ) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + }(Date)); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = NumberPrototype.toFixed && ( + (0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128' + ); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size; + var c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + } + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1)); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << (-e), 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return 1.0.toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + }()); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties(NumberPrototype, { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision); + } + }, hasToPrecisionUndefinedBug); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = String(this); + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, match, lastIndex, lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + pushCall(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, arraySlice(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + pushCall(output, ''); + } + } else { + pushCall(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output; + }; + }()); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + pushCall(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + }()); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + pushCall(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties(StringPrototype, { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + } + }, hasNegativeSubstrBug); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties(StringPrototype, { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + } + }, hasTrimWhitespaceBug); + var trim = call.bind(String.prototype.trim); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + } + }, hasLastIndexBug); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + } + }, StringPrototype.lastIndexOf.length !== 1); + + // ES-5 15.1.2.2 + /* eslint-disable radix */ + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* eslint-enable radix */ + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[\-+]?0[xX]/; + return function parseInt(str, radix) { + var string = trim(String(str)); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + }(parseInt)); + } + + // https://es5.github.io/#x15.1.2.3 + if (1 / parseFloat('-0') !== -Infinity) { + /* global parseFloat: true */ + parseFloat = (function (origParseFloat) { + return function parseFloat(string) { + var inputString = trim(String(string)); + var result = origParseFloat(inputString); + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result; + }; + }(parseFloat)); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + if (supportsDescriptors) { + var ensureNonEnumerable = function (obj, prop) { + if (isEnum(obj, prop)) { + var desc = Object.getOwnPropertyDescriptor(obj, prop); + if (desc.configurable) { + desc.enumerable = false; + Object.defineProperty(obj, prop, desc); + } + } + }; + ensureNonEnumerable(Error.prototype, 'message'); + if (Error.prototype.message !== '') { + Error.prototype.message = ''; + } + ensureNonEnumerable(Error.prototype, 'name'); + } + + if (String(/a/mig) !== '/a/gim') { + var regexToString = function toString() { + var str = '/' + this.source + '/'; + if (this.global) { + str += 'g'; + } + if (this.ignoreCase) { + str += 'i'; + } + if (this.multiline) { + str += 'm'; + } + return str; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + RegExp.prototype.toString = regexToString; + } +})); + +'use strict'; +/*jslint eqeq: true*/ + +Handlebars.registerHelper('sanitize', function (text) { + var result; + + if (text === undefined) { return ''; } + + result = sanitizeHtml(text, { + allowedTags: [ 'div', 'span', 'b', 'i', 'em', 'strong', 'a', 'br', 'table', 'tbody', 'tr', 'th', 'td' ], + allowedAttributes: { + 'div': [ 'class' ], + 'span': [ 'class' ], + 'table': [ 'class' ], + 'td': [ 'class' ], + 'th': [ 'colspan' ], + 'a': [ 'href' ] + } + }); + + return new Handlebars.SafeString(result); }); Handlebars.registerHelper('renderTextParam', function(param) { var result, type = 'text', idAtt = ''; - var paramType = param.type || param.schema.type || ''; + var paramType = param.type || param.schema && param.schema.type || ''; var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple; var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default; + var name = Handlebars.Utils.escapeExpression(param.name); + var valueId = Handlebars.Utils.escapeExpression(param.valueId); + paramType = Handlebars.Utils.escapeExpression(paramType); var dataVendorExtensions = Object.keys(param).filter(function(property) { // filter X-data- properties @@ -262,24 +3106,22 @@ Handlebars.registerHelper('renderTextParam', function(param) { return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\''; }, ''); - if (typeof defaultValue === 'undefined') { - defaultValue = ''; - } - if(param.format && param.format === 'password') { type = 'password'; } - if(param.valueId) { - idAtt = ' id=\'' + param.valueId + '\''; + if(valueId) { + idAtt = ' id=\'' + valueId + '\''; } - if (typeof defaultValue === 'string' || defaultValue instanceof String) { - defaultValue = defaultValue.replace(/'/g,'&apos;'); + if (defaultValue) { + defaultValue = sanitizeHtml(defaultValue); + } else { + defaultValue = ''; } if(isArray) { - result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions; + result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + name + '\'' + idAtt + dataVendorExtensions; result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>'; result += defaultValue + '</textarea>'; } else { @@ -288,629 +3130,52 @@ Handlebars.registerHelper('renderTextParam', function(param) { parameterClass += ' required'; } result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\''; - result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions; + result += ' name=\'' + name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions; result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>'; } return new Handlebars.SafeString(result); }); -this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div class=\"info_title\">" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) - + "</div>\n <div class=\"info_description markdown\">"; - stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0); - if (stack1 != null) { buffer += stack1; } - buffer += "</div>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " "; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n "; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n"; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return " <p>" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1), depth0)) - + "</p>\n <a href=\"" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0)) - + "\" target=\"_blank\">" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0)) - + "</a>\n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "<div class=\"info_tos\"><a href=\"" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0)) - + "\" data-sw-translate>Terms of service</a></div>"; -},"6":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "<div class='info_name' data-sw-translate>Created by " - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0)) - + "</div>"; -},"8":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "<div class='info_url' data-sw-translate>See more at <a href=\"" - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0)) - + "\">" - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0)) - + "</a></div>"; -},"10":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "<div class='info_email'><a href=\"mailto:" - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0)) - + "?subject=" - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) - + "\" data-sw-translate>Contact the developer</a></div>"; -},"12":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return "<div class='info_license'><a href='" - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.url : stack1), depth0)) - + "'>" - + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.name : stack1), depth0)) - + "</a></div>"; -},"14":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression; - return " , <span style=\"font-variant: small-caps\" data-sw-translate>api version</span>: " - + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0)) - + "\n "; -},"16":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <span style=\"float:right\"><a href=\"" - + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper))) - + "/debug?url=" - + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper))) - + "\"><img id=\"validator\" src=\"" - + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper))) - + "?url=" - + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper))) - + "\"></a>\n </span>\n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class='info' id='api_info'>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "</div>\n<div class='container' id='resources_container'>\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: " - + escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper))) - + "\n"; - stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "]\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.validatorUrl : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </h4>\n </div>\n</div>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return "deprecated"; - },"3":function(depth0,helpers,partials,data) { - return " <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n"; - },"5":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = " <h4><span data-sw-translate>Implementation Notes</span></h4>\n <div class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</div>\n"; -},"7":function(depth0,helpers,partials,data) { - return " <div class=\"auth\">\n <span class=\"api-ic ic-error\">"; - },"9":function(depth0,helpers,partials,data) { - var stack1, buffer = " <div class=\"api_information_panel\">\n"; - stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </div>\n"; -},"10":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div title='"; - stack1 = lambda((depth0 != null ? depth0.description : depth0), depth0); - if (stack1 != null) { buffer += stack1; } - return buffer + "'>" - + escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0)) - + "</div>\n"; -},"12":function(depth0,helpers,partials,data) { - return "</span></div>"; - },"14":function(depth0,helpers,partials,data) { - return " <div class='access'>\n <span class=\"api-ic ic-off\" title=\"click to authenticate\"></span>\n </div>\n"; - },"16":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> " - + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper))) - + ")</h4>\n "; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n <p><span class=\"model-signature\" /></p>\n <br/>\n <div class=\"response-content-type\" />\n\n"; -},"17":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "<div class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.successDescription || (depth0 != null ? depth0.successDescription : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successDescription","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</div>"; -},"19":function(depth0,helpers,partials,data) { - var stack1, buffer = " <h4 data-sw-translate>Headers</h4>\n <table class=\"headers\">\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Header</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Description</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Type</th>\n <th style=\"width: 320px; max-width: 320px\" data-sw-translate>Other</th>\n </tr>\n </thead>\n <tbody>\n"; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(20, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </tbody>\n </table>\n"; -},"20":function(depth0,helpers,partials,data) { - var lambda=this.lambda, escapeExpression=this.escapeExpression; - return " <tr>\n <td>" - + escapeExpression(lambda((data && data.key), depth0)) - + "</td>\n <td>" - + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0)) - + "</td>\n <td>" - + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0)) - + "</td>\n <td>" - + escapeExpression(lambda((depth0 != null ? depth0.other : depth0), depth0)) - + "</td>\n </tr>\n"; -},"22":function(depth0,helpers,partials,data) { - return " <h4 data-sw-translate>Parameters</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter</th>\n <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Value</th>\n <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Description</th>\n <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter Type</th>\n <th style=\"width: 220px; max-width: 230px\" data-sw-translate>Data Type</th>\n </tr>\n </thead>\n <tbody class=\"operation-params\">\n\n </tbody>\n </table>\n"; - },"24":function(depth0,helpers,partials,data) { - return " <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth'>\n <thead>\n <tr>\n <th data-sw-translate>HTTP Status Code</th>\n <th data-sw-translate>Reason</th>\n <th data-sw-translate>Response Model</th>\n <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n </tbody>\n </table>\n"; - },"26":function(depth0,helpers,partials,data) { - return ""; -},"28":function(depth0,helpers,partials,data) { - return " <div class='sandbox_header'>\n <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"; - },"30":function(depth0,helpers,partials,data) { - return " <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n <ul class='operations' >\n <li class='" - + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper))) - + " operation' id='" - + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper))) - + "_" - + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper))) - + "'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/" - + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper))) - + "/" - + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper))) - + "' class=\"toggleOperation\">" - + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper))) - + "</a>\n </span>\n <span class='path'>\n <a href='#!/" - + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper))) - + "/" - + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper))) - + "' class=\"toggleOperation "; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\">" - + escapeExpression(((helper = (helper = helpers.path || (depth0 != null ? depth0.path : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"path","hash":{},"data":data}) : helper))) - + "</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/" - + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper))) - + "/" - + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper))) - + "' class=\"toggleOperation\">"; - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</a>\n </li>\n </ul>\n </div>\n <div class='content' id='" - + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper))) - + "_" - + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper))) - + "_content' style='display:none'>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.description : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.oauth : depth0), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " "; - stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"if","hash":{},"fn":this.program(19, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(24, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.program(28, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(30, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return " required"; - },"3":function(depth0,helpers,partials,data) { - return " multiple=\"multiple\""; - },"5":function(depth0,helpers,partials,data) { - return " required "; - },"7":function(depth0,helpers,partials,data) { - var stack1, buffer = " <option "; - stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.hasDefault : depth0), {"name":"unless","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " value=''></option>\n"; -},"8":function(depth0,helpers,partials,data) { - return " selected=\"\" "; - },"10":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n <option "; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += " value='" - + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper))) - + "'> " - + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper))) - + " "; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </option>\n\n"; -},"11":function(depth0,helpers,partials,data) { - return " selected=\"\" "; - },"13":function(depth0,helpers,partials,data) { - return " (default) "; - },"15":function(depth0,helpers,partials,data) { - return "<strong>"; - },"17":function(depth0,helpers,partials,data) { - return "</strong>"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "'><label for='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</label></td>\n<td>\n <select "; - stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - buffer += " class=\"parameter "; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\" name=\"" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "\" id=\"" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "\">\n\n"; - stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"unless","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n"; - stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n </select>\n</td>\n<td class=\"markdown\">"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(15, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td>"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "</textarea>\n"; -},"3":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"4":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " " - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "\n"; -},"6":function(depth0,helpers,partials,data) { - return " (empty)\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'><label for='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</label></td>\n<td>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td>"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <textarea class='body-textarea' readonly='readonly' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "</textarea>\n <div class=\"parameter-content-type\" />\n"; -},"3":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"4":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " " - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "\n"; -},"6":function(depth0,helpers,partials,data) { - return " (empty)\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'><label for='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</label></td>\n<td>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td>"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <input type=\"file\" name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'/>\n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"5":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea required' placeholder='(required)' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id=\"" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "\">" - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n"; -},"7":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <textarea class='body-textarea required' placeholder='(required)' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n"; -},"9":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"10":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <input class='parameter' class='required' type='file' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'/>\n"; -},"12":function(depth0,helpers,partials,data) { - var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"13":function(depth0,helpers,partials,data) { - return ""; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'><label for='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</label></td>\n<td>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td>\n <strong><span class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</span></strong>\n</td>\n<td>"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <input type=\"file\" name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'/>\n <div class=\"parameter-content-type\" />\n"; -},"4":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"5":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <div class=\"editor_holder\"></div>\n <textarea class='body-textarea' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper))) - + "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n"; -},"7":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <textarea class='body-textarea' name='" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "' id='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'></textarea>\n <div class=\"editor_holder\"></div>\n <br />\n <div class=\"parameter-content-type\" />\n"; -},"9":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"10":function(depth0,helpers,partials,data) { - var stack1, helperMissing=helpers.helperMissing, buffer = ""; - stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data})); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"11":function(depth0,helpers,partials,data) { - return ""; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'><label for='" - + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper))) - + "'>" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</label></td>\n<td>\n\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - buffer += "\n</td>\n<td class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td>"; - stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <option value=\"" - + escapeExpression(lambda(depth0, depth0)) - + "\">"; - stack1 = lambda(depth0, depth0); - if (stack1 != null) { buffer += stack1; } - return buffer + "</option>\n"; -},"4":function(depth0,helpers,partials,data) { - return " <option value=\"application/json\">application/json</option>\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label for=\"" - + escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parameterContentTypeId","hash":{},"data":data}) : helper))) - + "\" data-sw-translate>Parameter content type:</label>\n<select name=\"parameterContentType\" id=\"" - + escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parameterContentTypeId","hash":{},"data":data}) : helper))) - + "\">\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "</select>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - return " : "; - },"3":function(depth0,helpers,partials,data) { - var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " <li>\n <a href='" - + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper))) - + "' data-sw-translate>Raw</a>\n </li>\n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class='heading'>\n <h2>\n <a href='#!/" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "' class=\"toggleEndpointList\" data-id=\"" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "\">" - + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) - + "</a> "; - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(options={"name":"summary","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper)); - if (!helpers.summary) { stack1 = blockHelperMissing.call(depth0, stack1, options); } - if (stack1 != null) { buffer += stack1; } - stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "' id='endpointListTogger_" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "' class=\"toggleEndpointList\" data-id=\"" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "\" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href='#' class=\"collapseResource\" data-id=\"" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "\" data-sw-translate>\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class=\"expandResource\" data-id=\"" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "\" data-sw-translate>\n Expand Operations\n </a>\n </li>\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </ul>\n</div>\n<ul class='endpoints' id='" - + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) - + "_endpoint_list' style='display:none'>\n\n</ul>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var stack1, buffer = ""; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer; -},"2":function(depth0,helpers,partials,data) { - var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <option value=\"" - + escapeExpression(lambda(depth0, depth0)) - + "\">"; - stack1 = lambda(depth0, depth0); - if (stack1 != null) { buffer += stack1; } - return buffer + "</option>\n"; -},"4":function(depth0,helpers,partials,data) { - return " <option value=\"application/json\">application/json</option>\n"; - },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label data-sw-translate for=\"" - + escapeExpression(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"responseContentTypeId","hash":{},"data":data}) : helper))) - + "\">Response Content Type</label>\n<select name=\"responseContentType\" id=\"" - + escapeExpression(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"responseContentTypeId","hash":{},"data":data}) : helper))) - + "\">\n"; - stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + "</select>\n"; -},"useData":true}); -this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n "; - stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>" - + escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper))) - + "</code></pre>\n <small class=\"notice\" data-sw-translate></small>\n </div>\n</div>\n\n"; -},"useData":true}); -this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { - var lambda=this.lambda, escapeExpression=this.escapeExpression; - return " <tr>\n <td>" - + escapeExpression(lambda((data && data.key), depth0)) - + "</td>\n <td>" - + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0)) - + "</td>\n <td>" - + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0)) - + "</td>\n </tr>\n"; -},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td width='15%' class='code'>" - + escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper))) - + "</td>\n<td class=\"markdown\">"; - stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper)); - if (stack1 != null) { buffer += stack1; } - buffer += "</td>\n<td width='50%'><span class=\"model-signature\" /></td>\n<td class=\"headers\">\n <table>\n <tbody>\n"; - stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); - if (stack1 != null) { buffer += stack1; } - return buffer + " </tbody>\n </table>\n</td>"; -},"useData":true}); +Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) { + + switch (operator) { + case '==': + return (v1 == v2) ? options.fn(this) : options.inverse(this); + case '===': + return (v1 === v2) ? options.fn(this) : options.inverse(this); + case '<': + return (v1 < v2) ? options.fn(this) : options.inverse(this); + case '<=': + return (v1 <= v2) ? options.fn(this) : options.inverse(this); + case '>': + return (v1 > v2) ? options.fn(this) : options.inverse(this); + case '>=': + return (v1 >= v2) ? options.fn(this) : options.inverse(this); + case '&&': + return (v1 && v2) ? options.fn(this) : options.inverse(this); + case '||': + return (v1 || v2) ? options.fn(this) : options.inverse(this); + default: + return options.inverse(this); + } +}); + +Handlebars.registerHelper('escape', function (value) { + var text = Handlebars.Utils.escapeExpression(value); + + return new Handlebars.SafeString(text); +}); + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var htmlparser=require("htmlparser2");var extend=require("xtend");var quoteRegexp=require("regexp-quote");function each(obj,cb){if(obj)Object.keys(obj).forEach(function(key){cb(obj[key],key)})}function has(obj,key){return{}.hasOwnProperty.call(obj,key)}module.exports=sanitizeHtml;function sanitizeHtml(html,options,_recursing){var result="";function Frame(tag,attribs){var that=this;this.tag=tag;this.attribs=attribs||{};this.tagPosition=result.length;this.text="";this.updateParentNodeText=function(){if(stack.length){var parentFrame=stack[stack.length-1];parentFrame.text+=that.text}}}if(!options){options=sanitizeHtml.defaults;options.parser=htmlParserDefaults}else{options=extend(sanitizeHtml.defaults,options);if(options.parser){options.parser=extend(htmlParserDefaults,options.parser)}else{options.parser=htmlParserDefaults}}var nonTextTagsArray=options.nonTextTags||["script","style","textarea"];var allowedAttributesMap;var allowedAttributesGlobMap;if(options.allowedAttributes){allowedAttributesMap={};allowedAttributesGlobMap={};each(options.allowedAttributes,function(attributes,tag){allowedAttributesMap[tag]=[];var globRegex=[];attributes.forEach(function(name){if(name.indexOf("*")>=0){globRegex.push(quoteRegexp(name).replace(/\\\*/g,".*"))}else{allowedAttributesMap[tag].push(name)}});allowedAttributesGlobMap[tag]=new RegExp("^("+globRegex.join("|")+")$")})}var allowedClassesMap={};each(options.allowedClasses,function(classes,tag){if(allowedAttributesMap){if(!has(allowedAttributesMap,tag)){allowedAttributesMap[tag]=[]}allowedAttributesMap[tag].push("class")}allowedClassesMap[tag]=classes});var transformTagsMap={};var transformTagsAll;each(options.transformTags,function(transform,tag){var transFun;if(typeof transform==="function"){transFun=transform}else if(typeof transform==="string"){transFun=sanitizeHtml.simpleTransform(transform)}if(tag==="*"){transformTagsAll=transFun}else{transformTagsMap[tag]=transFun}});var depth=0;var stack=[];var skipMap={};var transformMap={};var skipText=false;var skipTextDepth=0;var parser=new htmlparser.Parser({onopentag:function(name,attribs){if(skipText){skipTextDepth++;return}var frame=new Frame(name,attribs);stack.push(frame);var skip=false;var hasText=frame.text?true:false;var transformedTag;if(has(transformTagsMap,name)){transformedTag=transformTagsMap[name](name,attribs);frame.attribs=attribs=transformedTag.attribs;if(transformedTag.text!==undefined){frame.innerText=transformedTag.text}if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(transformTagsAll){transformedTag=transformTagsAll(name,attribs);frame.attribs=attribs=transformedTag.attribs;if(name!==transformedTag.tagName){frame.name=name=transformedTag.tagName;transformMap[depth]=transformedTag.tagName}}if(options.allowedTags&&options.allowedTags.indexOf(name)===-1){skip=true;if(nonTextTagsArray.indexOf(name)!==-1){skipText=true;skipTextDepth=1}skipMap[depth]=true}depth++;if(skip){return}result+="<"+name;if(!allowedAttributesMap||has(allowedAttributesMap,name)||allowedAttributesMap["*"]){each(attribs,function(value,a){if(!allowedAttributesMap||has(allowedAttributesMap,name)&&allowedAttributesMap[name].indexOf(a)!==-1||allowedAttributesMap["*"]&&allowedAttributesMap["*"].indexOf(a)!==-1||has(allowedAttributesGlobMap,name)&&allowedAttributesGlobMap[name].test(a)||allowedAttributesGlobMap["*"]&&allowedAttributesGlobMap["*"].test(a)){if(a==="href"||a==="src"){if(naughtyHref(name,value)){delete frame.attribs[a];return}}if(a==="class"){value=filterClasses(value,allowedClassesMap[name]);if(!value.length){delete frame.attribs[a];return}}result+=" "+a;if(value.length){result+='="'+escapeHtml(value)+'"'}}else{delete frame.attribs[a]}})}if(options.selfClosing.indexOf(name)!==-1){result+=" />"}else{result+=">";if(frame.innerText&&!hasText&&!options.textFilter){result+=frame.innerText}}},ontext:function(text){if(skipText){return}var lastFrame=stack[stack.length-1];var tag;if(lastFrame){tag=lastFrame.tag;text=lastFrame.innerText!==undefined?lastFrame.innerText:text}if(tag==="script"||tag==="style"){result+=text}else{var escaped=escapeHtml(text);if(options.textFilter){result+=options.textFilter(escaped)}else{result+=escaped}}if(stack.length){var frame=stack[stack.length-1];frame.text+=text}},onclosetag:function(name){if(skipText){skipTextDepth--;if(!skipTextDepth){skipText=false}else{return}}var frame=stack.pop();if(!frame){return}skipText=false;depth--;if(skipMap[depth]){delete skipMap[depth];frame.updateParentNodeText();return}if(transformMap[depth]){name=transformMap[depth];delete transformMap[depth]}if(options.exclusiveFilter&&options.exclusiveFilter(frame)){result=result.substr(0,frame.tagPosition);return}frame.updateParentNodeText();if(options.selfClosing.indexOf(name)!==-1){return}result+="</"+name+">"}},options.parser);parser.write(html);parser.end();return result;function escapeHtml(s){if(typeof s!=="string"){s=s+""}return s.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;")}function naughtyHref(name,href){href=href.replace(/[\x00-\x20]+/g,"");href=href.replace(/<\!\-\-.*?\-\-\>/g,"");var matches=href.match(/^([a-zA-Z]+)\:/);if(!matches){return false}var scheme=matches[1].toLowerCase();if(has(options.allowedSchemesByTag,name)){return options.allowedSchemesByTag[name].indexOf(scheme)===-1}return!options.allowedSchemes||options.allowedSchemes.indexOf(scheme)===-1}function filterClasses(classes,allowed){if(!allowed){return classes}classes=classes.split(/\s+/);return classes.filter(function(clss){return allowed.indexOf(clss)!==-1}).join(" ")}}var htmlParserDefaults={decodeEntities:true};sanitizeHtml.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}};sanitizeHtml.simpleTransform=function(newTagName,newAttribs,merge){merge=merge===undefined?true:merge;newAttribs=newAttribs||{};return function(tagName,attribs){var attrib;if(merge){for(attrib in newAttribs){attribs[attrib]=newAttribs[attrib]}}else{attribs=newAttribs}return{tagName:newTagName,attribs:attribs}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(require,module,exports){"use strict";exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;function init(){var code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i}revLookup["-".charCodeAt(0)]=62;revLookup["_".charCodeAt(0)]=63}init();function toByteArray(b64){var i,j,l,tmp,placeHolders,arr;var len=b64.length;if(len%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}placeHolders=b64[len-2]==="="?2:b64[len-1]==="="?1:0;arr=new Arr(len*3/4-placeHolders);l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3){tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)];arr[L++]=tmp>>16&255;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}if(placeHolders===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[L++]=tmp&255}else if(placeHolders===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[L++]=tmp>>8&255;arr[L++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;i<end;i+=3){tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output.push(tripletToBase64(tmp))}return output.join("")}function fromByteArray(uint8){var tmp;var len=uint8.length;var extraBytes=len%3;var output="";var parts=[];var maxChunkLength=16383;for(var i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength){parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];output+=lookup[tmp>>2];output+=lookup[tmp<<4&63];output+="=="}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];output+=lookup[tmp>>10];output+=lookup[tmp>>4&63];output+=lookup[tmp<<2&63];output+="="}parts.push(output);return parts.join("")}},{}],3:[function(require,module,exports){},{}],4:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer");var Buffer=buffer.Buffer;var SlowBuffer=buffer.SlowBuffer;var MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function alloc(size,fill,encoding){if(typeof Buffer.alloc==="function"){return Buffer.alloc(size,fill,encoding)}if(typeof encoding==="number"){throw new TypeError("encoding must not be number")}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}var enc=encoding;var _fill=fill;if(_fill===undefined){enc=undefined;_fill=0}var buf=new Buffer(size);if(typeof _fill==="string"){var fillBuf=new Buffer(_fill,enc);var flen=fillBuf.length;var i=-1;while(++i<size){buf[i]=fillBuf[i%flen]}}else{buf.fill(_fill)}return buf};exports.allocUnsafe=function allocUnsafe(size){if(typeof Buffer.allocUnsafe==="function"){return Buffer.allocUnsafe(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>MAX_LEN){throw new RangeError("size is too large")}return new Buffer(size)};exports.from=function from(value,encodingOrOffset,length){if(typeof Buffer.from==="function"&&(!global.Uint8Array||Uint8Array.from!==Buffer.from)){return Buffer.from(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof value==="string"){return new Buffer(value,encodingOrOffset)}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(arguments.length===1){return new Buffer(value)}if(typeof offset==="undefined"){offset=0}var len=length;if(typeof len==="undefined"){len=value.byteLength-offset}if(offset>=value.byteLength){throw new RangeError("'offset' is out of bounds")}if(len>value.byteLength-offset){throw new RangeError("'length' is out of bounds")}return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);value.copy(out,0,0,value.length);return out}if(value){if(Array.isArray(value)||typeof ArrayBuffer!=="undefined"&&value.buffer instanceof ArrayBuffer||"length"in value){return new Buffer(value)}if(value.type==="Buffer"&&Array.isArray(value.data)){return new Buffer(value.data)}}throw new TypeError("First argument must be a string, Buffer, "+"ArrayBuffer, Array, or array-like object.")};exports.allocUnsafeSlow=function allocUnsafeSlow(size){if(typeof Buffer.allocUnsafeSlow==="function"){return Buffer.allocUnsafeSlow(size)}if(typeof size!=="number"){throw new TypeError("size must be a number")}if(size>=MAX_LEN){throw new RangeError("size is too large")}return new SlowBuffer(size)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("isarray");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.TYPED_ARRAY_SUPPORT=global.TYPED_ARRAY_SUPPORT!==undefined?global.TYPED_ARRAY_SUPPORT:typedArraySupport();exports.kMaxLength=kMaxLength();function typedArraySupport(){try{var arr=new Uint8Array(1);arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return arr.foo()===42&&typeof arr.subarray==="function"&&arr.subarray(1,1).byteLength===0}catch(e){return false}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length){throw new RangeError("Invalid typed array length")}if(Buffer.TYPED_ARRAY_SUPPORT){that=new Uint8Array(length);that.__proto__=Buffer.prototype}else{if(that===null){that=new Buffer(length)}that.length=length}return that}function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length)}if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}Buffer.poolSize=8192;Buffer._augment=function(arr){arr.__proto__=Buffer.prototype;return arr};function from(that,value,encodingOrOffset,length){if(typeof value==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&value instanceof ArrayBuffer){return fromArrayBuffer(that,value,encodingOrOffset,length)}if(typeof value==="string"){return fromString(that,value,encodingOrOffset)}return fromObject(that,value)}Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)};if(Buffer.TYPED_ARRAY_SUPPORT){Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;if(typeof Symbol!=="undefined"&&Symbol.species&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true})}}function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be a number')}else if(size<0){throw new RangeError('"size" argument must not be negative')}}function alloc(that,size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(that,size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill)}return createBuffer(that,size)}Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)};function allocUnsafe(that,size){assertSize(size);that=createBuffer(that,size<0?0:checked(size)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<size;++i){that[i]=0}}return that}Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)};function fromString(that,string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError('"encoding" must be a valid string encoding')}var length=byteLength(string,encoding)|0;that=createBuffer(that,length);var actual=that.write(string,encoding);if(actual!==length){that=that.slice(0,actual)}return that}function fromArrayLike(that,array){var length=array.length<0?0:checked(array.length)|0;that=createBuffer(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255}return that}function fromArrayBuffer(that,array,byteOffset,length){array.byteLength;if(byteOffset<0||array.byteLength<byteOffset){throw new RangeError("'offset' is out of bounds")}if(array.byteLength<byteOffset+(length||0)){throw new RangeError("'length' is out of bounds")}if(byteOffset===undefined&&length===undefined){array=new Uint8Array(array)}else if(length===undefined){array=new Uint8Array(array,byteOffset)}else{array=new Uint8Array(array,byteOffset,length)}if(Buffer.TYPED_ARRAY_SUPPORT){that=array;that.__proto__=Buffer.prototype}else{that=fromArrayLike(that,array)}return that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=checked(obj.length)|0;that=createBuffer(that,len);if(that.length===0){return that}obj.copy(that,0,0,len);return that}if(obj){if(typeof ArrayBuffer!=="undefined"&&obj.buffer instanceof ArrayBuffer||"length"in obj){if(typeof obj.length!=="number"||isnan(obj.length)){return createBuffer(that,0)}return fromArrayLike(that,obj)}if(obj.type==="Buffer"&&isArray(obj.data)){return fromArrayLike(that,obj.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len;++i){if(a[i]!==b[i]){x=a[i];y=b[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};Buffer.concat=function concat(list,length){if(!isArray(list)){throw new TypeError('"list" argument must be an Array of Buffers')}if(list.length===0){return Buffer.alloc(0)}var i;if(length===undefined){length=0;for(i=0;i<list.length;++i){length+=list[i].length}}var buffer=Buffer.allocUnsafe(length);var pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf)){throw new TypeError('"list" argument must be an Array of Buffers')}buf.copy(buffer,pos);pos+=buf.length}return buffer};function byteLength(string,encoding){if(Buffer.isBuffer(string)){return string.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer)){return string.byteLength}if(typeof string!=="string"){string=""+string}var len=string.length;if(len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case undefined:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;i<len;i+=2){swap(this,i,i+1)}return this};Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var i=0;i<len;i+=4){swap(this,i,i+3);swap(this,i+1,i+2)}return this};Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var i=0;i<len;i+=8){swap(this,i,i+7);swap(this,i+1,i+6);swap(this,i+2,i+5);swap(this,i+3,i+4)}return this};Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target)){throw new TypeError("Argument must be a Buffer")}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i<len;++i){if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i];y=targetCopy[i];break}}if(x<y)return-1;if(y<x)return 1;return 0};function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(buffer.length===0)return-1;if(typeof byteOffset==="string"){encoding=byteOffset;byteOffset=0}else if(byteOffset>2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(isNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++){if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1)foundIndex=i;if(i-foundIndex+1===valLength)return foundIndex*indexSize}else{if(foundIndex!==-1)i-=i-foundIndex;foundIndex=-1}}}else{if(byteOffset+valLength>arrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;j<valLength;j++){if(read(arr,i+j)!==read(val,j)){found=false;break}}if(found)return i}}return-1}Buffer.prototype.includes=function includes(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1};Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,false)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;++i){var parsed=parseInt(string.substr(i*2,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}Buffer.prototype.write=function write(string,offset,length,encoding){if(offset===undefined){encoding="utf8";length=this.length;offset=0}else if(length===undefined&&typeof offset==="string"){encoding=offset;length=this.length;offset=0}else if(isFinite(offset)){offset=offset|0;if(isFinite(length)){length=length|0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i<end){var firstByte=buf[i];var codePoint=null;var bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(i<len){res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH))}return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i]&127)}return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;++i){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=this.subarray(start,end);newBuf.__proto__=Buffer.prototype}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined);for(var i=0;i<sliceLen;++i){newBuf[i]=this[i+start]}}return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}return val};Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256)){val+=this[offset+i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length); +var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value&255;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i){buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256)){if(value<0&&sub===0&&this[offset+i-1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value&255}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||this.length===0)return 0;if(targetStart<0){throw new RangeError("targetStart out of bounds")}if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart<end-start){end=target.length-targetStart+start}var len=end-start;var i;if(this===target&&start<targetStart&&targetStart<end){for(i=len-1;i>=0;--i){target[i+targetStart]=this[i+start]}}else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(i=0;i<len;++i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(val.length===1){var code=val.charCodeAt(0);if(code<256){val=code}}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}}else if(typeof val==="number"){val=val&255}if(start<0||this.length<start||this.length<end){throw new RangeError("Out of range index")}if(end<=start){return this}start=start>>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i<end;++i){this[i]=val}}else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString());var len=bytes.length;for(i=0;i<end-start;++i){this[i+start]=bytes[i%len]}}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){units=units||Infinity;var codePoint;var length=string.length;var leadSurrogate=null;var bytes=[];for(var i=0;i<length;++i){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;++i){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;++i){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length;++i){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isnan(val){return val!==val}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(require,module,exports){(function(Buffer){function isArray(arg){if(Array.isArray){return Array.isArray(arg)}return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(require,module,exports){var ElementType=require("domelementtype");var entities=require("entities");var booleanAttributes={__proto__:null,allowfullscreen:true,async:true,autofocus:true,autoplay:true,checked:true,controls:true,default:true,defer:true,disabled:true,hidden:true,ismap:true,loop:true,multiple:true,muted:true,open:true,readonly:true,required:true,reversed:true,scoped:true,seamless:true,selected:true,typemustmatch:true};var unencodedElements={__proto__:null,style:true,script:true,xmp:true,iframe:true,noembed:true,noframes:true,plaintext:true,noscript:true};function formatAttrs(attributes,opts){if(!attributes)return;var output="",value;for(var key in attributes){value=attributes[key];if(output){output+=" "}if(!value&&booleanAttributes[key]){output+=key}else{output+=key+'="'+(opts.decodeEntities?entities.encodeXML(value):value)+'"'}}return output}var singleTag={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};var render=module.exports=function(dom,opts){if(!Array.isArray(dom)&&!dom.cheerio)dom=[dom];opts=opts||{};var output="";for(var i=0;i<dom.length;i++){var elem=dom[i];if(elem.type==="root")output+=render(elem.children,opts);else if(ElementType.isTag(elem))output+=renderTag(elem,opts);else if(elem.type===ElementType.Directive)output+=renderDirective(elem);else if(elem.type===ElementType.Comment)output+=renderComment(elem);else if(elem.type===ElementType.CDATA)output+=renderCdata(elem);else output+=renderText(elem,opts)}return output};function renderTag(elem,opts){if(elem.name==="svg")opts={decodeEntities:opts.decodeEntities,xmlMode:true};var tag="<"+elem.name,attribs=formatAttrs(elem.attribs,opts);if(attribs){tag+=" "+attribs}if(opts.xmlMode&&(!elem.children||elem.children.length===0)){tag+="/>"}else{tag+=">";if(elem.children){tag+=render(elem.children,opts)}if(!singleTag[elem.name]||opts.xmlMode){tag+="</"+elem.name+">"}}return tag}function renderDirective(elem){return"<"+elem.data+">"}function renderText(elem,opts){var data=elem.data||"";if(opts.decodeEntities&&!(elem.parent&&elem.parent.name in unencodedElements)){data=entities.encodeXML(data)}return data}function renderCdata(elem){return"<![CDATA["+elem.children[0].data+"]]>"}function renderComment(elem){return"<!--"+elem.data+"-->"}},{domelementtype:8,entities:20}],8:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],9:[function(require,module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return elem.type==="tag"||elem.type==="script"||elem.type==="style"}}},{}],10:[function(require,module,exports){var ElementType=require("domelementtype");var re_whitespace=/\s+/g;var NodePrototype=require("./lib/node");var ElementPrototype=require("./lib/element");function DomHandler(callback,options,elementCB){if(typeof callback==="object"){elementCB=options;options=callback;callback=null}else if(typeof options==="function"){elementCB=options;options=defaultOpts}this._callback=callback;this._options=options||defaultOpts;this._elementCB=elementCB;this.dom=[];this._done=false;this._tagStack=[];this._parser=this._parser||null}var defaultOpts={normalizeWhitespace:false,withStartIndices:false};DomHandler.prototype.onparserinit=function(parser){this._parser=parser};DomHandler.prototype.onreset=function(){DomHandler.call(this,this._callback,this._options,this._elementCB)};DomHandler.prototype.onend=function(){if(this._done)return;this._done=true;this._parser=null;this._handleCallback(null)};DomHandler.prototype._handleCallback=DomHandler.prototype.onerror=function(error){if(typeof this._callback==="function"){this._callback(error,this.dom)}else{if(error)throw error}};DomHandler.prototype.onclosetag=function(){var elem=this._tagStack.pop();if(this._elementCB)this._elementCB(elem)};DomHandler.prototype._addDomElement=function(element){var parent=this._tagStack[this._tagStack.length-1];var siblings=parent?parent.children:this.dom;var previousSibling=siblings[siblings.length-1];element.next=null;if(this._options.withStartIndices){element.startIndex=this._parser.startIndex}if(this._options.withDomLvl1){element.__proto__=element.type==="tag"?ElementPrototype:NodePrototype}if(previousSibling){element.prev=previousSibling;previousSibling.next=element}else{element.prev=null}siblings.push(element);element.parent=parent||null};DomHandler.prototype.onopentag=function(name,attribs){var element={type:name==="script"?ElementType.Script:name==="style"?ElementType.Style:ElementType.Tag,name:name,attribs:attribs,children:[]};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.ontext=function(data){var normalize=this._options.normalizeWhitespace||this._options.ignoreWhitespace;var lastTag;if(!this._tagStack.length&&this.dom.length&&(lastTag=this.dom[this.dom.length-1]).type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(this._tagStack.length&&(lastTag=this._tagStack[this._tagStack.length-1])&&(lastTag=lastTag.children[lastTag.children.length-1])&&lastTag.type===ElementType.Text){if(normalize){lastTag.data=(lastTag.data+data).replace(re_whitespace," ")}else{lastTag.data+=data}}else{if(normalize){data=data.replace(re_whitespace," ")}this._addDomElement({data:data,type:ElementType.Text})}}};DomHandler.prototype.oncomment=function(data){var lastTag=this._tagStack[this._tagStack.length-1];if(lastTag&&lastTag.type===ElementType.Comment){lastTag.data+=data;return}var element={data:data,type:ElementType.Comment};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncdatastart=function(){var element={children:[{data:"",type:ElementType.Text}],type:ElementType.CDATA};this._addDomElement(element);this._tagStack.push(element)};DomHandler.prototype.oncommentend=DomHandler.prototype.oncdataend=function(){this._tagStack.pop()};DomHandler.prototype.onprocessinginstruction=function(name,data){this._addDomElement({name:name,data:data,type:ElementType.Directive})};module.exports=DomHandler},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(require,module,exports){var NodePrototype=require("./node");var ElementPrototype=module.exports=Object.create(NodePrototype);var domLvl1={tagName:"name"};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(ElementPrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{"./node":12}],12:[function(require,module,exports){var NodePrototype=module.exports={get firstChild(){var children=this.children;return children&&children[0]||null},get lastChild(){var children=this.children;return children&&children[children.length-1]||null},get nodeType(){return nodeTypes[this.type]||nodeTypes.element}};var domLvl1={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};var nodeTypes={element:1,text:3,cdata:4,comment:8};Object.keys(domLvl1).forEach(function(key){var shorthand=domLvl1[key];Object.defineProperty(NodePrototype,key,{get:function(){return this[shorthand]||null},set:function(val){this[shorthand]=val;return val}})})},{}],13:[function(require,module,exports){var DomUtils=module.exports;[require("./lib/stringify"),require("./lib/traversal"),require("./lib/manipulation"),require("./lib/querying"),require("./lib/legacy"),require("./lib/helpers")].forEach(function(ext){Object.keys(ext).forEach(function(key){DomUtils[key]=ext[key].bind(DomUtils)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(require,module,exports){exports.removeSubsets=function(nodes){var idx=nodes.length,node,ancestor,replace;while(--idx>-1){node=ancestor=nodes[idx];nodes[idx]=null;replace=true;while(ancestor){if(nodes.indexOf(ancestor)>-1){replace=false;nodes.splice(idx,1);break}ancestor=ancestor.parent}if(replace){nodes[idx]=node}}return nodes};var POSITION={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16};var comparePos=exports.compareDocumentPosition=function(nodeA,nodeB){var aParents=[];var bParents=[];var current,sharedParent,siblings,aSibling,bSibling,idx;if(nodeA===nodeB){return 0}current=nodeA;while(current){aParents.unshift(current);current=current.parent}current=nodeB;while(current){bParents.unshift(current);current=current.parent}idx=0;while(aParents[idx]===bParents[idx]){idx++}if(idx===0){return POSITION.DISCONNECTED}sharedParent=aParents[idx-1];siblings=sharedParent.children;aSibling=aParents[idx];bSibling=bParents[idx];if(siblings.indexOf(aSibling)>siblings.indexOf(bSibling)){if(sharedParent===nodeB){return POSITION.FOLLOWING|POSITION.CONTAINED_BY}return POSITION.FOLLOWING}else{if(sharedParent===nodeA){return POSITION.PRECEDING|POSITION.CONTAINS}return POSITION.PRECEDING}};exports.uniqueSort=function(nodes){var idx=nodes.length,node,position;nodes=nodes.slice();while(--idx>-1){node=nodes[idx];position=nodes.indexOf(node);if(position>-1&&position<idx){nodes.splice(idx,1)}}nodes.sort(function(a,b){var relative=comparePos(a,b);if(relative&POSITION.PRECEDING){return-1}else if(relative&POSITION.FOLLOWING){return 1}return 0});return nodes}},{}],15:[function(require,module,exports){var ElementType=require("domelementtype");var isTag=exports.isTag=ElementType.isTag;exports.testElement=function(options,element){for(var key in options){if(!options.hasOwnProperty(key));else if(key==="tag_name"){if(!isTag(element)||!options.tag_name(element.name)){return false}}else if(key==="tag_type"){if(!options.tag_type(element.type))return false}else if(key==="tag_contains"){if(isTag(element)||!options.tag_contains(element.data)){return false}}else if(!element.attribs||!options[key](element.attribs[key])){return false}}return true};var Checks={tag_name:function(name){if(typeof name==="function"){return function(elem){return isTag(elem)&&name(elem.name)}}else if(name==="*"){return isTag}else{return function(elem){return isTag(elem)&&elem.name===name}}},tag_type:function(type){if(typeof type==="function"){return function(elem){return type(elem.type)}}else{return function(elem){return elem.type===type}}},tag_contains:function(data){if(typeof data==="function"){return function(elem){return!isTag(elem)&&data(elem.data)}}else{return function(elem){return!isTag(elem)&&elem.data===data}}}};function getAttribCheck(attrib,value){if(typeof value==="function"){return function(elem){return elem.attribs&&value(elem.attribs[attrib])}}else{return function(elem){return elem.attribs&&elem.attribs[attrib]===value}}}function combineFuncs(a,b){return function(elem){return a(elem)||b(elem)}}exports.getElements=function(options,element,recurse,limit){var funcs=Object.keys(options).map(function(key){var value=options[key];return key in Checks?Checks[key](value):getAttribCheck(key,value)});return funcs.length===0?[]:this.filter(funcs.reduce(combineFuncs),element,recurse,limit)};exports.getElementById=function(id,element,recurse){if(!Array.isArray(element))element=[element];return this.findOne(getAttribCheck("id",id),element,recurse!==false)};exports.getElementsByTagName=function(name,element,recurse,limit){return this.filter(Checks.tag_name(name),element,recurse,limit)};exports.getElementsByTagType=function(type,element,recurse,limit){return this.filter(Checks.tag_type(type),element,recurse,limit)}},{domelementtype:9}],16:[function(require,module,exports){exports.removeElement=function(elem){if(elem.prev)elem.prev.next=elem.next;if(elem.next)elem.next.prev=elem.prev;if(elem.parent){var childs=elem.parent.children;childs.splice(childs.lastIndexOf(elem),1)}};exports.replaceElement=function(elem,replacement){var prev=replacement.prev=elem.prev;if(prev){prev.next=replacement}var next=replacement.next=elem.next;if(next){next.prev=replacement}var parent=replacement.parent=elem.parent;if(parent){var childs=parent.children;childs[childs.lastIndexOf(elem)]=replacement}};exports.appendChild=function(elem,child){child.parent=elem;if(elem.children.push(child)!==1){var sibling=elem.children[elem.children.length-2];sibling.next=child;child.prev=sibling;child.next=null}};exports.append=function(elem,next){var parent=elem.parent,currNext=elem.next;next.next=currNext;next.prev=elem;elem.next=next;next.parent=parent;if(currNext){currNext.prev=next;if(parent){var childs=parent.children;childs.splice(childs.lastIndexOf(currNext),0,next)}}else if(parent){parent.children.push(next)}};exports.prepend=function(elem,prev){var parent=elem.parent;if(parent){var childs=parent.children;childs.splice(childs.lastIndexOf(elem),0,prev)}if(elem.prev){elem.prev.next=prev}prev.parent=parent;prev.prev=elem.prev;prev.next=elem;elem.prev=prev}},{}],17:[function(require,module,exports){var isTag=require("domelementtype").isTag;module.exports={filter:filter,find:find,findOneChild:findOneChild,findOne:findOne,existsOne:existsOne,findAll:findAll};function filter(test,element,recurse,limit){if(!Array.isArray(element))element=[element];if(typeof limit!=="number"||!isFinite(limit)){limit=Infinity}return find(test,element,recurse!==false,limit)}function find(test,elems,recurse,limit){var result=[],childs;for(var i=0,j=elems.length;i<j;i++){if(test(elems[i])){result.push(elems[i]);if(--limit<=0)break}childs=elems[i].children;if(recurse&&childs&&childs.length>0){childs=find(test,childs,recurse,limit);result=result.concat(childs);limit-=childs.length;if(limit<=0)break}}return result}function findOneChild(test,elems){for(var i=0,l=elems.length;i<l;i++){if(test(elems[i]))return elems[i]}return null}function findOne(test,elems){var elem=null;for(var i=0,l=elems.length;i<l&&!elem;i++){if(!isTag(elems[i])){continue}else if(test(elems[i])){elem=elems[i]}else if(elems[i].children.length>0){elem=findOne(test,elems[i].children)}}return elem}function existsOne(test,elems){for(var i=0,l=elems.length;i<l;i++){if(isTag(elems[i])&&(test(elems[i])||elems[i].children.length>0&&existsOne(test,elems[i].children))){return true}}return false}function findAll(test,elems){var result=[];for(var i=0,j=elems.length;i<j;i++){if(!isTag(elems[i]))continue;if(test(elems[i]))result.push(elems[i]);if(elems[i].children.length>0){result=result.concat(findAll(test,elems[i].children))}}return result}},{domelementtype:9}],18:[function(require,module,exports){var ElementType=require("domelementtype"),getOuterHTML=require("dom-serializer"),isTag=ElementType.isTag;module.exports={getInnerHTML:getInnerHTML,getOuterHTML:getOuterHTML,getText:getText};function getInnerHTML(elem,opts){return elem.children?elem.children.map(function(elem){return getOuterHTML(elem,opts)}).join(""):""}function getText(elem){if(Array.isArray(elem))return elem.map(getText).join("");if(isTag(elem)||elem.type===ElementType.CDATA)return getText(elem.children);if(elem.type===ElementType.Text)return elem.data;return""}},{"dom-serializer":7,domelementtype:9}],19:[function(require,module,exports){var getChildren=exports.getChildren=function(elem){return elem.children};var getParent=exports.getParent=function(elem){return elem.parent};exports.getSiblings=function(elem){var parent=getParent(elem);return parent?getChildren(parent):[elem]};exports.getAttributeValue=function(elem,name){return elem.attribs&&elem.attribs[name]};exports.hasAttrib=function(elem,name){return!!elem.attribs&&hasOwnProperty.call(elem.attribs,name)};exports.getName=function(elem){return elem.name}},{}],20:[function(require,module,exports){var encode=require("./lib/encode.js"),decode=require("./lib/decode.js");exports.decode=function(data,level){return(!level||level<=0?decode.XML:decode.HTML)(data)};exports.decodeStrict=function(data,level){return(!level||level<=0?decode.XML:decode.HTMLStrict)(data)};exports.encode=function(data,level){return(!level||level<=0?encode.XML:encode.HTML)(data)};exports.encodeXML=encode.XML;exports.encodeHTML4=exports.encodeHTML5=exports.encodeHTML=encode.HTML;exports.decodeXML=exports.decodeXMLStrict=decode.XML;exports.decodeHTML4=exports.decodeHTML5=exports.decodeHTML=decode.HTML;exports.decodeHTML4Strict=exports.decodeHTML5Strict=exports.decodeHTMLStrict=decode.HTMLStrict;exports.escape=encode.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(require,module,exports){var entityMap=require("../maps/entities.json"),legacyMap=require("../maps/legacy.json"),xmlMap=require("../maps/xml.json"),decodeCodePoint=require("./decode_codepoint.js");var decodeXMLStrict=getStrictDecoder(xmlMap),decodeHTMLStrict=getStrictDecoder(entityMap);function getStrictDecoder(map){var keys=Object.keys(map).join("|"),replace=getReplacer(map);keys+="|#[xX][\\da-fA-F]+|#\\d+";var re=new RegExp("&(?:"+keys+");","g");return function(str){return String(str).replace(re,replace)}}var decodeHTML=function(){var legacy=Object.keys(legacyMap).sort(sorter);var keys=Object.keys(entityMap).sort(sorter);for(var i=0,j=0;i<keys.length;i++){if(legacy[j]===keys[i]){keys[i]+=";?";j++}else{keys[i]+=";"}}var re=new RegExp("&(?:"+keys.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),replace=getReplacer(entityMap);function replacer(str){if(str.substr(-1)!==";")str+=";";return replace(str)}return function(str){return String(str).replace(re,replacer)}}();function sorter(a,b){return a<b?1:-1}function getReplacer(map){return function replace(str){if(str.charAt(1)==="#"){if(str.charAt(2)==="X"||str.charAt(2)==="x"){return decodeCodePoint(parseInt(str.substr(3),16))}return decodeCodePoint(parseInt(str.substr(2),10))}return map[str.slice(1,-1)]; +}}module.exports={XML:decodeXMLStrict,HTML:decodeHTML,HTMLStrict:decodeHTMLStrict}},{"../maps/entities.json":25,"../maps/legacy.json":26,"../maps/xml.json":27,"./decode_codepoint.js":22}],22:[function(require,module,exports){var decodeMap=require("../maps/decode.json");module.exports=decodeCodePoint;function decodeCodePoint(codePoint){if(codePoint>=55296&&codePoint<=57343||codePoint>1114111){return"�"}if(codePoint in decodeMap){codePoint=decodeMap[codePoint]}var output="";if(codePoint>65535){codePoint-=65536;output+=String.fromCharCode(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}output+=String.fromCharCode(codePoint);return output}},{"../maps/decode.json":24}],23:[function(require,module,exports){var inverseXML=getInverseObj(require("../maps/xml.json")),xmlReplacer=getInverseReplacer(inverseXML);exports.XML=getInverse(inverseXML,xmlReplacer);var inverseHTML=getInverseObj(require("../maps/entities.json")),htmlReplacer=getInverseReplacer(inverseHTML);exports.HTML=getInverse(inverseHTML,htmlReplacer);function getInverseObj(obj){return Object.keys(obj).sort().reduce(function(inverse,name){inverse[obj[name]]="&"+name+";";return inverse},{})}function getInverseReplacer(inverse){var single=[],multiple=[];Object.keys(inverse).forEach(function(k){if(k.length===1){single.push("\\"+k)}else{multiple.push(k)}});multiple.unshift("["+single.join("")+"]");return new RegExp(multiple.join("|"),"g")}var re_nonASCII=/[^\0-\x7F]/g,re_astralSymbols=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function singleCharReplacer(c){return"&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"}function astralReplacer(c){var high=c.charCodeAt(0);var low=c.charCodeAt(1);var codePoint=(high-55296)*1024+low-56320+65536;return"&#x"+codePoint.toString(16).toUpperCase()+";"}function getInverse(inverse,re){function func(name){return inverse[name]}return function(data){return data.replace(re,func).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}}var re_xmlChars=getInverseReplacer(inverseXML);function escapeXML(data){return data.replace(re_xmlChars,singleCharReplacer).replace(re_astralSymbols,astralReplacer).replace(re_nonASCII,singleCharReplacer)}exports.escape=escapeXML},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(require,module,exports){module.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],26:[function(require,module,exports){module.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],27:[function(require,module,exports){module.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Uncaught, unspecified "error" event. ('+er+")");err.context=er;throw err}}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1);handler.apply(this,args)}}else if(isObject(handler)){args=Array.prototype.slice.call(arguments,1);listeners=handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){if(!isUndefined(this._maxListeners)){m=this._maxListeners}else{m=EventEmitter.defaultMaxListeners}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-- >0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1); +}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else if(listeners){while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;else if(evlistener)return evlistener.length}return 0};EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],29:[function(require,module,exports){module.exports=CollectingHandler;function CollectingHandler(cbs){this._cbs=cbs||{};this.events=[]}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;CollectingHandler.prototype[name]=function(){this.events.push([name]);if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;CollectingHandler.prototype[name]=function(a){this.events.push([name,a]);if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;CollectingHandler.prototype[name]=function(a,b){this.events.push([name,a,b]);if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}});CollectingHandler.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};CollectingHandler.prototype.restart=function(){if(this._cbs.onreset)this._cbs.onreset();for(var i=0,len=this.events.length;i<len;i++){if(this._cbs[this.events[i][0]]){var num=this.events[i].length;if(num===1){this._cbs[this.events[i][0]]()}else if(num===2){this._cbs[this.events[i][0]](this.events[i][1])}else{this._cbs[this.events[i][0]](this.events[i][1],this.events[i][2])}}}}},{"./":36}],30:[function(require,module,exports){var index=require("./index.js"),DomHandler=index.DomHandler,DomUtils=index.DomUtils;function FeedHandler(callback,options){this.init(callback,options)}require("inherits")(FeedHandler,DomHandler);FeedHandler.prototype.init=DomHandler;function getElements(what,where){return DomUtils.getElementsByTagName(what,where,true)}function getOneElement(what,where){return DomUtils.getElementsByTagName(what,where,true,1)[0]}function fetch(what,where,recurse){return DomUtils.getText(DomUtils.getElementsByTagName(what,where,recurse,1)).trim()}function addConditionally(obj,prop,what,where,recurse){var tmp=fetch(what,where,recurse);if(tmp)obj[prop]=tmp}var isValidFeed=function(value){return value==="rss"||value==="feed"||value==="rdf:RDF"};FeedHandler.prototype.onend=function(){var feed={},feedRoot=getOneElement(isValidFeed,this.dom),tmp,childs;if(feedRoot){if(feedRoot.name==="feed"){childs=feedRoot.children;feed.type="atom";addConditionally(feed,"id","id",childs);addConditionally(feed,"title","title",childs);if((tmp=getOneElement("link",childs))&&(tmp=tmp.attribs)&&(tmp=tmp.href))feed.link=tmp;addConditionally(feed,"description","subtitle",childs);if(tmp=fetch("updated",childs))feed.updated=new Date(tmp);addConditionally(feed,"author","email",childs,true);feed.items=getElements("entry",childs).map(function(item){var entry={},tmp;item=item.children;addConditionally(entry,"id","id",item);addConditionally(entry,"title","title",item);if((tmp=getOneElement("link",item))&&(tmp=tmp.attribs)&&(tmp=tmp.href))entry.link=tmp;if(tmp=fetch("summary",item)||fetch("content",item))entry.description=tmp;if(tmp=fetch("updated",item))entry.pubDate=new Date(tmp);return entry})}else{childs=getOneElement("channel",feedRoot.children).children;feed.type=feedRoot.name.substr(0,3);feed.id="";addConditionally(feed,"title","title",childs);addConditionally(feed,"link","link",childs);addConditionally(feed,"description","description",childs);if(tmp=fetch("lastBuildDate",childs))feed.updated=new Date(tmp);addConditionally(feed,"author","managingEditor",childs,true);feed.items=getElements("item",feedRoot.children).map(function(item){var entry={},tmp;item=item.children;addConditionally(entry,"id","guid",item);addConditionally(entry,"title","title",item);addConditionally(entry,"link","link",item);addConditionally(entry,"description","description",item);if(tmp=fetch("pubDate",item))entry.pubDate=new Date(tmp);return entry})}}this.dom=feed;DomHandler.prototype._handleCallback.call(this,feedRoot?null:Error("couldn't find root of feed"))};module.exports=FeedHandler},{"./index.js":36,inherits:38}],31:[function(require,module,exports){var Tokenizer=require("./Tokenizer.js");var formTags={input:true,option:true,optgroup:true,select:true,button:true,datalist:true,textarea:true};var openImpliesClose={tr:{tr:true,th:true,td:true},th:{th:true},td:{thead:true,th:true,td:true},body:{head:true,link:true,script:true},li:{li:true},p:{p:true},h1:{p:true},h2:{p:true},h3:{p:true},h4:{p:true},h5:{p:true},h6:{p:true},select:formTags,input:formTags,output:formTags,button:formTags,datalist:formTags,textarea:formTags,option:{option:true},optgroup:{optgroup:true}};var voidElements={__proto__:null,area:true,base:true,basefont:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,isindex:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,path:true,circle:true,ellipse:true,line:true,rect:true,use:true,stop:true,polyline:true,polygon:true};var re_nameEnd=/\s|\//;function Parser(cbs,options){this._options=options||{};this._cbs=cbs||{};this._tagname="";this._attribname="";this._attribvalue="";this._attribs=null;this._stack=[];this.startIndex=0;this.endIndex=null;this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode;this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode;if(this._options.Tokenizer){Tokenizer=this._options.Tokenizer}this._tokenizer=new Tokenizer(this._options,this);if(this._cbs.onparserinit)this._cbs.onparserinit(this)}require("inherits")(Parser,require("events").EventEmitter);Parser.prototype._updatePosition=function(initialOffset){if(this.endIndex===null){if(this._tokenizer._sectionStart<=initialOffset){this.startIndex=0}else{this.startIndex=this._tokenizer._sectionStart-initialOffset}}else this.startIndex=this.endIndex+1;this.endIndex=this._tokenizer.getAbsoluteIndex()};Parser.prototype.ontext=function(data){this._updatePosition(1);this.endIndex--;if(this._cbs.ontext)this._cbs.ontext(data)};Parser.prototype.onopentagname=function(name){if(this._lowerCaseTagNames){name=name.toLowerCase()}this._tagname=name;if(!this._options.xmlMode&&name in openImpliesClose){for(var el;(el=this._stack[this._stack.length-1])in openImpliesClose[name];this.onclosetag(el));}if(this._options.xmlMode||!(name in voidElements)){this._stack.push(name)}if(this._cbs.onopentagname)this._cbs.onopentagname(name);if(this._cbs.onopentag)this._attribs={}};Parser.prototype.onopentagend=function(){this._updatePosition(1);if(this._attribs){if(this._cbs.onopentag)this._cbs.onopentag(this._tagname,this._attribs);this._attribs=null}if(!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in voidElements){this._cbs.onclosetag(this._tagname)}this._tagname=""};Parser.prototype.onclosetag=function(name){this._updatePosition(1);if(this._lowerCaseTagNames){name=name.toLowerCase()}if(this._stack.length&&(!(name in voidElements)||this._options.xmlMode)){var pos=this._stack.lastIndexOf(name);if(pos!==-1){if(this._cbs.onclosetag){pos=this._stack.length-pos;while(pos--)this._cbs.onclosetag(this._stack.pop())}else this._stack.length=pos}else if(name==="p"&&!this._options.xmlMode){this.onopentagname(name);this._closeCurrentTag()}}else if(!this._options.xmlMode&&(name==="br"||name==="p")){this.onopentagname(name);this._closeCurrentTag()}};Parser.prototype.onselfclosingtag=function(){if(this._options.xmlMode||this._options.recognizeSelfClosing){this._closeCurrentTag()}else{this.onopentagend()}};Parser.prototype._closeCurrentTag=function(){var name=this._tagname;this.onopentagend();if(this._stack[this._stack.length-1]===name){if(this._cbs.onclosetag){this._cbs.onclosetag(name)}this._stack.pop()}};Parser.prototype.onattribname=function(name){if(this._lowerCaseAttributeNames){name=name.toLowerCase()}this._attribname=name};Parser.prototype.onattribdata=function(value){this._attribvalue+=value};Parser.prototype.onattribend=function(){if(this._cbs.onattribute)this._cbs.onattribute(this._attribname,this._attribvalue);if(this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)){this._attribs[this._attribname]=this._attribvalue}this._attribname="";this._attribvalue=""};Parser.prototype._getInstructionName=function(value){var idx=value.search(re_nameEnd),name=idx<0?value:value.substr(0,idx);if(this._lowerCaseTagNames){name=name.toLowerCase()}return name};Parser.prototype.ondeclaration=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("!"+name,"!"+value)}};Parser.prototype.onprocessinginstruction=function(value){if(this._cbs.onprocessinginstruction){var name=this._getInstructionName(value);this._cbs.onprocessinginstruction("?"+name,"?"+value)}};Parser.prototype.oncomment=function(value){this._updatePosition(4);if(this._cbs.oncomment)this._cbs.oncomment(value);if(this._cbs.oncommentend)this._cbs.oncommentend()};Parser.prototype.oncdata=function(value){this._updatePosition(1);if(this._options.xmlMode||this._options.recognizeCDATA){if(this._cbs.oncdatastart)this._cbs.oncdatastart();if(this._cbs.ontext)this._cbs.ontext(value);if(this._cbs.oncdataend)this._cbs.oncdataend()}else{this.oncomment("[CDATA["+value+"]]")}};Parser.prototype.onerror=function(err){if(this._cbs.onerror)this._cbs.onerror(err)};Parser.prototype.onend=function(){if(this._cbs.onclosetag){for(var i=this._stack.length;i>0;this._cbs.onclosetag(this._stack[--i]));}if(this._cbs.onend)this._cbs.onend()};Parser.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};Parser.prototype.parseComplete=function(data){this.reset();this.end(data)};Parser.prototype.write=function(chunk){this._tokenizer.write(chunk)};Parser.prototype.end=function(chunk){this._tokenizer.end(chunk)};Parser.prototype.pause=function(){this._tokenizer.pause()};Parser.prototype.resume=function(){this._tokenizer.resume()};Parser.prototype.parseChunk=Parser.prototype.write;Parser.prototype.done=Parser.prototype.end;module.exports=Parser},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(require,module,exports){module.exports=ProxyHandler;function ProxyHandler(cbs){this._cbs=cbs||{}}var EVENTS=require("./").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){name="on"+name;ProxyHandler.prototype[name]=function(){if(this._cbs[name])this._cbs[name]()}}else if(EVENTS[name]===1){name="on"+name;ProxyHandler.prototype[name]=function(a){if(this._cbs[name])this._cbs[name](a)}}else if(EVENTS[name]===2){name="on"+name;ProxyHandler.prototype[name]=function(a,b){if(this._cbs[name])this._cbs[name](a,b)}}else{throw Error("wrong number of arguments")}})},{"./":36}],33:[function(require,module,exports){module.exports=Stream;var Parser=require("./WritableStream.js");function Stream(options){Parser.call(this,new Cbs(this),options)}require("inherits")(Stream,Parser);Stream.prototype.readable=true;function Cbs(scope){this.scope=scope}var EVENTS=require("../").EVENTS;Object.keys(EVENTS).forEach(function(name){if(EVENTS[name]===0){Cbs.prototype["on"+name]=function(){this.scope.emit(name)}}else if(EVENTS[name]===1){Cbs.prototype["on"+name]=function(a){this.scope.emit(name,a)}}else if(EVENTS[name]===2){Cbs.prototype["on"+name]=function(a,b){this.scope.emit(name,a,b)}}else{throw Error("wrong number of arguments!")}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(require,module,exports){module.exports=Tokenizer;var decodeCodePoint=require("entities/lib/decode_codepoint.js"),entityMap=require("entities/maps/entities.json"),legacyMap=require("entities/maps/legacy.json"),xmlMap=require("entities/maps/xml.json"),i=0,TEXT=i++,BEFORE_TAG_NAME=i++,IN_TAG_NAME=i++,IN_SELF_CLOSING_TAG=i++,BEFORE_CLOSING_TAG_NAME=i++,IN_CLOSING_TAG_NAME=i++,AFTER_CLOSING_TAG_NAME=i++,BEFORE_ATTRIBUTE_NAME=i++,IN_ATTRIBUTE_NAME=i++,AFTER_ATTRIBUTE_NAME=i++,BEFORE_ATTRIBUTE_VALUE=i++,IN_ATTRIBUTE_VALUE_DQ=i++,IN_ATTRIBUTE_VALUE_SQ=i++,IN_ATTRIBUTE_VALUE_NQ=i++,BEFORE_DECLARATION=i++,IN_DECLARATION=i++,IN_PROCESSING_INSTRUCTION=i++,BEFORE_COMMENT=i++,IN_COMMENT=i++,AFTER_COMMENT_1=i++,AFTER_COMMENT_2=i++,BEFORE_CDATA_1=i++,BEFORE_CDATA_2=i++,BEFORE_CDATA_3=i++,BEFORE_CDATA_4=i++,BEFORE_CDATA_5=i++,BEFORE_CDATA_6=i++,IN_CDATA=i++,AFTER_CDATA_1=i++,AFTER_CDATA_2=i++,BEFORE_SPECIAL=i++,BEFORE_SPECIAL_END=i++,BEFORE_SCRIPT_1=i++,BEFORE_SCRIPT_2=i++,BEFORE_SCRIPT_3=i++,BEFORE_SCRIPT_4=i++,BEFORE_SCRIPT_5=i++,AFTER_SCRIPT_1=i++,AFTER_SCRIPT_2=i++,AFTER_SCRIPT_3=i++,AFTER_SCRIPT_4=i++,AFTER_SCRIPT_5=i++,BEFORE_STYLE_1=i++,BEFORE_STYLE_2=i++,BEFORE_STYLE_3=i++,BEFORE_STYLE_4=i++,AFTER_STYLE_1=i++,AFTER_STYLE_2=i++,AFTER_STYLE_3=i++,AFTER_STYLE_4=i++,BEFORE_ENTITY=i++,BEFORE_NUMERIC_ENTITY=i++,IN_NAMED_ENTITY=i++,IN_NUMERIC_ENTITY=i++,IN_HEX_ENTITY=i++,j=0,SPECIAL_NONE=j++,SPECIAL_SCRIPT=j++,SPECIAL_STYLE=j++;function whitespace(c){return c===" "||c==="\n"||c==="\t"||c==="\f"||c==="\r"}function characterState(char,SUCCESS){return function(c){if(c===char)this._state=SUCCESS}}function ifElseState(upper,SUCCESS,FAILURE){var lower=upper.toLowerCase();if(upper===lower){return function(c){if(c===lower){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}else{return function(c){if(c===lower||c===upper){this._state=SUCCESS}else{this._state=FAILURE;this._index--}}}}function consumeSpecialNameChar(upper,NEXT_STATE){var lower=upper.toLowerCase();return function(c){if(c===lower||c===upper){this._state=NEXT_STATE}else{this._state=IN_TAG_NAME;this._index--}}}function Tokenizer(options,cbs){this._state=TEXT;this._buffer="";this._sectionStart=0;this._index=0;this._bufferOffset=0;this._baseState=TEXT;this._special=SPECIAL_NONE;this._cbs=cbs;this._running=true;this._ended=false;this._xmlMode=!!(options&&options.xmlMode);this._decodeEntities=!!(options&&options.decodeEntities)}Tokenizer.prototype._stateText=function(c){if(c==="<"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._state=BEFORE_TAG_NAME;this._sectionStart=this._index}else if(this._decodeEntities&&this._special===SPECIAL_NONE&&c==="&"){if(this._index>this._sectionStart){this._cbs.ontext(this._getSection())}this._baseState=TEXT;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeTagName=function(c){if(c==="/"){this._state=BEFORE_CLOSING_TAG_NAME}else if(c==="<"){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(c===">"||this._special!==SPECIAL_NONE||whitespace(c)){this._state=TEXT}else if(c==="!"){this._state=BEFORE_DECLARATION;this._sectionStart=this._index+1}else if(c==="?"){this._state=IN_PROCESSING_INSTRUCTION;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&(c==="s"||c==="S")?BEFORE_SPECIAL:IN_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInTagName=function(c){if(c==="/"||c===">"||whitespace(c)){this._emitToken("onopentagname");this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateBeforeCloseingTagName=function(c){if(whitespace(c));else if(c===">"){this._state=TEXT}else if(this._special!==SPECIAL_NONE){if(c==="s"||c==="S"){this._state=BEFORE_SPECIAL_END}else{this._state=TEXT;this._index--}}else{this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInCloseingTagName=function(c){if(c===">"||whitespace(c)){this._emitToken("onclosetag");this._state=AFTER_CLOSING_TAG_NAME;this._index--}};Tokenizer.prototype._stateAfterCloseingTagName=function(c){if(c===">"){this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeAttributeName=function(c){if(c===">"){this._cbs.onopentagend();this._state=TEXT;this._sectionStart=this._index+1}else if(c==="/"){this._state=IN_SELF_CLOSING_TAG}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateInSelfClosingTag=function(c){if(c===">"){this._cbs.onselfclosingtag();this._state=TEXT;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=BEFORE_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateInAttributeName=function(c){if(c==="="||c==="/"||c===">"||whitespace(c)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=AFTER_ATTRIBUTE_NAME;this._index--}};Tokenizer.prototype._stateAfterAttributeName=function(c){if(c==="="){this._state=BEFORE_ATTRIBUTE_VALUE}else if(c==="/"||c===">"){this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(!whitespace(c)){this._cbs.onattribend();this._state=IN_ATTRIBUTE_NAME;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeAttributeValue=function(c){if(c==='"'){this._state=IN_ATTRIBUTE_VALUE_DQ;this._sectionStart=this._index+1}else if(c==="'"){this._state=IN_ATTRIBUTE_VALUE_SQ;this._sectionStart=this._index+1}else if(!whitespace(c)){this._state=IN_ATTRIBUTE_VALUE_NQ;this._sectionStart=this._index;this._index--}};Tokenizer.prototype._stateInAttributeValueDoubleQuotes=function(c){if(c==='"'){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueSingleQuotes=function(c){if(c==="'"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateInAttributeValueNoQuotes=function(c){if(whitespace(c)||c===">"){this._emitToken("onattribdata");this._cbs.onattribend();this._state=BEFORE_ATTRIBUTE_NAME;this._index--}else if(this._decodeEntities&&c==="&"){this._emitToken("onattribdata");this._baseState=this._state;this._state=BEFORE_ENTITY;this._sectionStart=this._index}};Tokenizer.prototype._stateBeforeDeclaration=function(c){this._state=c==="["?BEFORE_CDATA_1:c==="-"?BEFORE_COMMENT:IN_DECLARATION};Tokenizer.prototype._stateInDeclaration=function(c){if(c===">"){this._cbs.ondeclaration(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateInProcessingInstruction=function(c){if(c===">"){this._cbs.onprocessinginstruction(this._getSection());this._state=TEXT;this._sectionStart=this._index+1}};Tokenizer.prototype._stateBeforeComment=function(c){if(c==="-"){this._state=IN_COMMENT;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION}};Tokenizer.prototype._stateInComment=function(c){if(c==="-")this._state=AFTER_COMMENT_1};Tokenizer.prototype._stateAfterComment1=function(c){if(c==="-"){this._state=AFTER_COMMENT_2}else{this._state=IN_COMMENT}};Tokenizer.prototype._stateAfterComment2=function(c){if(c===">"){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="-"){this._state=IN_COMMENT}};Tokenizer.prototype._stateBeforeCdata1=ifElseState("C",BEFORE_CDATA_2,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata2=ifElseState("D",BEFORE_CDATA_3,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata3=ifElseState("A",BEFORE_CDATA_4,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata4=ifElseState("T",BEFORE_CDATA_5,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata5=ifElseState("A",BEFORE_CDATA_6,IN_DECLARATION);Tokenizer.prototype._stateBeforeCdata6=function(c){if(c==="["){this._state=IN_CDATA;this._sectionStart=this._index+1}else{this._state=IN_DECLARATION;this._index--}};Tokenizer.prototype._stateInCdata=function(c){if(c==="]")this._state=AFTER_CDATA_1};Tokenizer.prototype._stateAfterCdata1=characterState("]",AFTER_CDATA_2);Tokenizer.prototype._stateAfterCdata2=function(c){if(c===">"){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=TEXT;this._sectionStart=this._index+1}else if(c!=="]"){this._state=IN_CDATA}};Tokenizer.prototype._stateBeforeSpecial=function(c){if(c==="c"||c==="C"){this._state=BEFORE_SCRIPT_1}else if(c==="t"||c==="T"){this._state=BEFORE_STYLE_1}else{this._state=IN_TAG_NAME;this._index--}};Tokenizer.prototype._stateBeforeSpecialEnd=function(c){if(this._special===SPECIAL_SCRIPT&&(c==="c"||c==="C")){this._state=AFTER_SCRIPT_1}else if(this._special===SPECIAL_STYLE&&(c==="t"||c==="T")){this._state=AFTER_STYLE_1}else this._state=TEXT};Tokenizer.prototype._stateBeforeScript1=consumeSpecialNameChar("R",BEFORE_SCRIPT_2);Tokenizer.prototype._stateBeforeScript2=consumeSpecialNameChar("I",BEFORE_SCRIPT_3);Tokenizer.prototype._stateBeforeScript3=consumeSpecialNameChar("P",BEFORE_SCRIPT_4);Tokenizer.prototype._stateBeforeScript4=consumeSpecialNameChar("T",BEFORE_SCRIPT_5);Tokenizer.prototype._stateBeforeScript5=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_SCRIPT}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterScript1=ifElseState("R",AFTER_SCRIPT_2,TEXT);Tokenizer.prototype._stateAfterScript2=ifElseState("I",AFTER_SCRIPT_3,TEXT);Tokenizer.prototype._stateAfterScript3=ifElseState("P",AFTER_SCRIPT_4,TEXT);Tokenizer.prototype._stateAfterScript4=ifElseState("T",AFTER_SCRIPT_5,TEXT);Tokenizer.prototype._stateAfterScript5=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-6;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeStyle1=consumeSpecialNameChar("Y",BEFORE_STYLE_2);Tokenizer.prototype._stateBeforeStyle2=consumeSpecialNameChar("L",BEFORE_STYLE_3);Tokenizer.prototype._stateBeforeStyle3=consumeSpecialNameChar("E",BEFORE_STYLE_4);Tokenizer.prototype._stateBeforeStyle4=function(c){if(c==="/"||c===">"||whitespace(c)){this._special=SPECIAL_STYLE}this._state=IN_TAG_NAME;this._index--};Tokenizer.prototype._stateAfterStyle1=ifElseState("Y",AFTER_STYLE_2,TEXT);Tokenizer.prototype._stateAfterStyle2=ifElseState("L",AFTER_STYLE_3,TEXT);Tokenizer.prototype._stateAfterStyle3=ifElseState("E",AFTER_STYLE_4,TEXT);Tokenizer.prototype._stateAfterStyle4=function(c){if(c===">"||whitespace(c)){this._special=SPECIAL_NONE;this._state=IN_CLOSING_TAG_NAME;this._sectionStart=this._index-5;this._index--}else this._state=TEXT};Tokenizer.prototype._stateBeforeEntity=ifElseState("#",BEFORE_NUMERIC_ENTITY,IN_NAMED_ENTITY);Tokenizer.prototype._stateBeforeNumericEntity=ifElseState("X",IN_HEX_ENTITY,IN_NUMERIC_ENTITY);Tokenizer.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var entity=this._buffer.substring(this._sectionStart+1,this._index),map=this._xmlMode?xmlMap:entityMap;if(map.hasOwnProperty(entity)){this._emitPartial(map[entity]);this._sectionStart=this._index+1}}};Tokenizer.prototype._parseLegacyEntity=function(){var start=this._sectionStart+1,limit=this._index-start;if(limit>6)limit=6;while(limit>=2){var entity=this._buffer.substr(start,limit);if(legacyMap.hasOwnProperty(entity)){this._emitPartial(legacyMap[entity]);this._sectionStart+=limit+1;return}else{limit--}}};Tokenizer.prototype._stateInNamedEntity=function(c){if(c===";"){this._parseNamedEntityStrict();if(this._sectionStart+1<this._index&&!this._xmlMode){this._parseLegacyEntity()}this._state=this._baseState}else if((c<"a"||c>"z")&&(c<"A"||c>"Z")&&(c<"0"||c>"9")){if(this._xmlMode);else if(this._sectionStart+1===this._index);else if(this._baseState!==TEXT){if(c!=="="){this._parseNamedEntityStrict()}}else{this._parseLegacyEntity()}this._state=this._baseState;this._index--}};Tokenizer.prototype._decodeNumericEntity=function(offset,base){var sectionStart=this._sectionStart+offset;if(sectionStart!==this._index){var entity=this._buffer.substring(sectionStart,this._index);var parsed=parseInt(entity,base);this._emitPartial(decodeCodePoint(parsed));this._sectionStart=this._index}else{this._sectionStart--}this._state=this._baseState};Tokenizer.prototype._stateInNumericEntity=function(c){if(c===";"){this._decodeNumericEntity(2,10);this._sectionStart++}else if(c<"0"||c>"9"){if(!this._xmlMode){this._decodeNumericEntity(2,10)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._stateInHexEntity=function(c){if(c===";"){this._decodeNumericEntity(3,16);this._sectionStart++}else if((c<"a"||c>"f")&&(c<"A"||c>"F")&&(c<"0"||c>"9")){if(!this._xmlMode){this._decodeNumericEntity(3,16)}else{this._state=this._baseState}this._index--}};Tokenizer.prototype._cleanup=function(){if(this._sectionStart<0){this._buffer="";this._index=0;this._bufferOffset+=this._index}else if(this._running){if(this._state===TEXT){if(this._sectionStart!==this._index){this._cbs.ontext(this._buffer.substr(this._sectionStart))}this._buffer="";this._bufferOffset+=this._index;this._index=0}else if(this._sectionStart===this._index){this._buffer="";this._bufferOffset+=this._index;this._index=0}else{this._buffer=this._buffer.substr(this._sectionStart);this._index-=this._sectionStart;this._bufferOffset+=this._sectionStart}this._sectionStart=0}};Tokenizer.prototype.write=function(chunk){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=chunk;this._parse()};Tokenizer.prototype._parse=function(){while(this._index<this._buffer.length&&this._running){var c=this._buffer.charAt(this._index);if(this._state===TEXT){this._stateText(c)}else if(this._state===BEFORE_TAG_NAME){this._stateBeforeTagName(c)}else if(this._state===IN_TAG_NAME){this._stateInTagName(c)}else if(this._state===BEFORE_CLOSING_TAG_NAME){this._stateBeforeCloseingTagName(c)}else if(this._state===IN_CLOSING_TAG_NAME){this._stateInCloseingTagName(c)}else if(this._state===AFTER_CLOSING_TAG_NAME){this._stateAfterCloseingTagName(c)}else if(this._state===IN_SELF_CLOSING_TAG){this._stateInSelfClosingTag(c)}else if(this._state===BEFORE_ATTRIBUTE_NAME){this._stateBeforeAttributeName(c)}else if(this._state===IN_ATTRIBUTE_NAME){this._stateInAttributeName(c)}else if(this._state===AFTER_ATTRIBUTE_NAME){this._stateAfterAttributeName(c)}else if(this._state===BEFORE_ATTRIBUTE_VALUE){this._stateBeforeAttributeValue(c)}else if(this._state===IN_ATTRIBUTE_VALUE_DQ){this._stateInAttributeValueDoubleQuotes(c)}else if(this._state===IN_ATTRIBUTE_VALUE_SQ){this._stateInAttributeValueSingleQuotes(c)}else if(this._state===IN_ATTRIBUTE_VALUE_NQ){this._stateInAttributeValueNoQuotes(c)}else if(this._state===BEFORE_DECLARATION){this._stateBeforeDeclaration(c)}else if(this._state===IN_DECLARATION){this._stateInDeclaration(c)}else if(this._state===IN_PROCESSING_INSTRUCTION){this._stateInProcessingInstruction(c)}else if(this._state===BEFORE_COMMENT){this._stateBeforeComment(c)}else if(this._state===IN_COMMENT){this._stateInComment(c)}else if(this._state===AFTER_COMMENT_1){this._stateAfterComment1(c)}else if(this._state===AFTER_COMMENT_2){this._stateAfterComment2(c)}else if(this._state===BEFORE_CDATA_1){this._stateBeforeCdata1(c)}else if(this._state===BEFORE_CDATA_2){this._stateBeforeCdata2(c)}else if(this._state===BEFORE_CDATA_3){this._stateBeforeCdata3(c)}else if(this._state===BEFORE_CDATA_4){this._stateBeforeCdata4(c)}else if(this._state===BEFORE_CDATA_5){this._stateBeforeCdata5(c)}else if(this._state===BEFORE_CDATA_6){this._stateBeforeCdata6(c)}else if(this._state===IN_CDATA){this._stateInCdata(c)}else if(this._state===AFTER_CDATA_1){this._stateAfterCdata1(c)}else if(this._state===AFTER_CDATA_2){this._stateAfterCdata2(c)}else if(this._state===BEFORE_SPECIAL){this._stateBeforeSpecial(c)}else if(this._state===BEFORE_SPECIAL_END){this._stateBeforeSpecialEnd(c)}else if(this._state===BEFORE_SCRIPT_1){this._stateBeforeScript1(c)}else if(this._state===BEFORE_SCRIPT_2){this._stateBeforeScript2(c)}else if(this._state===BEFORE_SCRIPT_3){this._stateBeforeScript3(c)}else if(this._state===BEFORE_SCRIPT_4){this._stateBeforeScript4(c)}else if(this._state===BEFORE_SCRIPT_5){this._stateBeforeScript5(c)}else if(this._state===AFTER_SCRIPT_1){this._stateAfterScript1(c)}else if(this._state===AFTER_SCRIPT_2){this._stateAfterScript2(c)}else if(this._state===AFTER_SCRIPT_3){this._stateAfterScript3(c)}else if(this._state===AFTER_SCRIPT_4){this._stateAfterScript4(c)}else if(this._state===AFTER_SCRIPT_5){this._stateAfterScript5(c)}else if(this._state===BEFORE_STYLE_1){this._stateBeforeStyle1(c)}else if(this._state===BEFORE_STYLE_2){this._stateBeforeStyle2(c)}else if(this._state===BEFORE_STYLE_3){this._stateBeforeStyle3(c)}else if(this._state===BEFORE_STYLE_4){this._stateBeforeStyle4(c)}else if(this._state===AFTER_STYLE_1){this._stateAfterStyle1(c)}else if(this._state===AFTER_STYLE_2){this._stateAfterStyle2(c)}else if(this._state===AFTER_STYLE_3){this._stateAfterStyle3(c)}else if(this._state===AFTER_STYLE_4){this._stateAfterStyle4(c)}else if(this._state===BEFORE_ENTITY){this._stateBeforeEntity(c)}else if(this._state===BEFORE_NUMERIC_ENTITY){this._stateBeforeNumericEntity(c)}else if(this._state===IN_NAMED_ENTITY){this._stateInNamedEntity(c)}else if(this._state===IN_NUMERIC_ENTITY){this._stateInNumericEntity(c)}else if(this._state===IN_HEX_ENTITY){this._stateInHexEntity(c)}else{this._cbs.onerror(Error("unknown _state"),this._state)}this._index++}this._cleanup()};Tokenizer.prototype.pause=function(){this._running=false};Tokenizer.prototype.resume=function(){this._running=true;if(this._index<this._buffer.length){this._parse()}if(this._ended){this._finish()}};Tokenizer.prototype.end=function(chunk){if(this._ended)this._cbs.onerror(Error(".end() after done!"));if(chunk)this.write(chunk);this._ended=true;if(this._running)this._finish()};Tokenizer.prototype._finish=function(){if(this._sectionStart<this._index){this._handleTrailingData()}this._cbs.onend()};Tokenizer.prototype._handleTrailingData=function(){var data=this._buffer.substr(this._sectionStart);if(this._state===IN_CDATA||this._state===AFTER_CDATA_1||this._state===AFTER_CDATA_2){this._cbs.oncdata(data)}else if(this._state===IN_COMMENT||this._state===AFTER_COMMENT_1||this._state===AFTER_COMMENT_2){this._cbs.oncomment(data)}else if(this._state===IN_NAMED_ENTITY&&!this._xmlMode){this._parseLegacyEntity();if(this._sectionStart<this._index){this._state=this._baseState;this._handleTrailingData()}}else if(this._state===IN_NUMERIC_ENTITY&&!this._xmlMode){this._decodeNumericEntity(2,10);if(this._sectionStart<this._index){this._state=this._baseState;this._handleTrailingData()}}else if(this._state===IN_HEX_ENTITY&&!this._xmlMode){this._decodeNumericEntity(3,16);if(this._sectionStart<this._index){this._state=this._baseState;this._handleTrailingData()}}else if(this._state!==IN_TAG_NAME&&this._state!==BEFORE_ATTRIBUTE_NAME&&this._state!==BEFORE_ATTRIBUTE_VALUE&&this._state!==AFTER_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_NAME&&this._state!==IN_ATTRIBUTE_VALUE_SQ&&this._state!==IN_ATTRIBUTE_VALUE_DQ&&this._state!==IN_ATTRIBUTE_VALUE_NQ&&this._state!==IN_CLOSING_TAG_NAME){ +this._cbs.ontext(data)}};Tokenizer.prototype.reset=function(){Tokenizer.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)};Tokenizer.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index};Tokenizer.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)};Tokenizer.prototype._emitToken=function(name){this._cbs[name](this._getSection());this._sectionStart=-1};Tokenizer.prototype._emitPartial=function(value){if(this._baseState!==TEXT){this._cbs.onattribdata(value)}else{this._cbs.ontext(value)}}},{"entities/lib/decode_codepoint.js":22,"entities/maps/entities.json":25,"entities/maps/legacy.json":26,"entities/maps/xml.json":27}],35:[function(require,module,exports){module.exports=Stream;var Parser=require("./Parser.js"),WritableStream=require("stream").Writable||require("readable-stream").Writable,StringDecoder=require("string_decoder").StringDecoder,Buffer=require("buffer").Buffer;function Stream(cbs,options){var parser=this._parser=new Parser(cbs,options);var decoder=this._decoder=new StringDecoder;WritableStream.call(this,{decodeStrings:false});this.once("finish",function(){parser.end(decoder.end())})}require("inherits")(Stream,WritableStream);WritableStream.prototype._write=function(chunk,encoding,cb){if(chunk instanceof Buffer)chunk=this._decoder.write(chunk);this._parser.write(chunk);cb()}},{"./Parser.js":31,buffer:5,inherits:38,"readable-stream":3,stream:55,string_decoder:56}],36:[function(require,module,exports){var Parser=require("./Parser.js"),DomHandler=require("domhandler");function defineProp(name,value){delete module.exports[name];module.exports[name]=value;return value}module.exports={Parser:Parser,Tokenizer:require("./Tokenizer.js"),ElementType:require("domelementtype"),DomHandler:DomHandler,get FeedHandler(){return defineProp("FeedHandler",require("./FeedHandler.js"))},get Stream(){return defineProp("Stream",require("./Stream.js"))},get WritableStream(){return defineProp("WritableStream",require("./WritableStream.js"))},get ProxyHandler(){return defineProp("ProxyHandler",require("./ProxyHandler.js"))},get DomUtils(){return defineProp("DomUtils",require("domutils"))},get CollectingHandler(){return defineProp("CollectingHandler",require("./CollectingHandler.js"))},DefaultHandler:DomHandler,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(data,options){var handler=new DomHandler(options);new Parser(handler,options).end(data);return handler.dom},parseFeed:function(feed,options){var handler=new module.exports.FeedHandler(options);new Parser(handler,options).end(feed);return handler.dom},createDomStream:function(cb,options,elementCb){var handler=new DomHandler(cb,options,elementCb);return new Parser(handler,options)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},{"./CollectingHandler.js":29,"./FeedHandler.js":30,"./Parser.js":31,"./ProxyHandler.js":32,"./Stream.js":33,"./Tokenizer.js":34,"./WritableStream.js":35,domelementtype:9,domhandler:10,domutils:13}],37:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],38:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],39:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],40:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}},{}],41:[function(require,module,exports){(function(process){"use strict";if(!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){module.exports=nextTick}else{module.exports=process.nextTick}function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function"){throw new TypeError('"callback" argument must be a function')}var len=arguments.length;var args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function afterTickOne(){fn.call(null,arg1)});case 3:return process.nextTick(function afterTickTwo(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function afterTickThree(){fn.call(null,arg1,arg2,arg3)});default:args=new Array(len-1);i=0;while(i<args.length){args[i++]=arguments[i]}return process.nextTick(function afterTick(){fn.apply(null,args)})}}}).call(this,require("_process"))},{_process:42}],42:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],43:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":44}],44:[function(require,module,exports){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys};module.exports=Duplex;var processNextTick=require("process-nextick-args");var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);var keys=objectKeys(Writable.prototype);for(var v=0;v<keys.length;v++){var method=keys[v];if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]}function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||this._writableState.ended)return;processNextTick(onEndNT,this)}function onEndNT(self){self.end()}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}},{"./_stream_readable":46,"./_stream_writable":48,"core-util-is":6,inherits:38,"process-nextick-args":41}],45:[function(require,module,exports){"use strict";module.exports=PassThrough;var Transform=require("./_stream_transform");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":47,"core-util-is":6,inherits:38}],46:[function(require,module,exports){(function(process){"use strict";module.exports=Readable;var processNextTick=require("process-nextick-args");var isArray=require("isarray");Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");var util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util");var debug=void 0;if(debugUtil&&debugUtil.debuglog){debug=debugUtil.debuglog("stream")}else{debug=function(){}}var BufferList=require("./internal/streams/BufferList");var StringDecoder;util.inherits(Readable,Stream);function prependListener(emitter,event,fn){if(typeof emitter.prependListener==="function"){return emitter.prependListener(event,fn)}else{if(!emitter._events||!emitter._events[event])emitter.on(event,fn);else if(isArray(emitter._events[event]))emitter._events[event].unshift(fn);else emitter._events[event]=[fn,emitter._events[event]]}}var Duplex;function ReadableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.readableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.buffer=new BufferList;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.defaultEncoding=options.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);this.encoding=options.encoding}}var Duplex;function Readable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;if(options&&typeof options.read==="function")this._read=options.read;Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(!state.objectMode&&typeof chunk==="string"){encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=bufferShim.from(chunk,encoding);encoding=""}}return readableAddChunk(this,state,chunk,encoding,false)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",true)};Readable.prototype.isPaused=function(){return this._readableState.flowing===false};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er){stream.emit("error",er)}else if(chunk===null){state.reading=false;onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;if(state.decoder&&!addToFront&&!encoding){chunk=state.decoder.write(chunk);skipAdd=!state.objectMode&&chunk.length===0}if(!addToFront)state.reading=false;if(!skipAdd){if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc;return this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){if(n>=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n<state.highWaterMark){doRead=true;debug("length less than watermark",doRead)}if(state.ended||state.reading){doRead=false;debug("reading or ended",doRead)}else if(doRead){debug("do read");state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false;if(!state.reading)n=howMuchToRead(nOrig,state)}var ret;if(n>0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}else{state.length-=n}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)processNextTick(emitReadable_,stream);else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){debug("maybeReadMore read 0");stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:cleanup;if(state.endEmitted)processNextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable){debug("onunpipe");if(readable===src){cleanup()}}function onend(){debug("onend");dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=false;function cleanup(){debug("cleanup");dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",cleanup);src.removeListener("data",ondata);cleanedUp=true;if(state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain))ondrain()}var increasedAwaitDrain=false;src.on("data",ondata);function ondata(chunk){debug("ondata");increasedAwaitDrain=false;var ret=dest.write(chunk);if(false===ret&&!increasedAwaitDrain){if((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",src._readableState.awaitDrain);src._readableState.awaitDrain++;increasedAwaitDrain=true}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var _i=0;_i<len;_i++){dests[_i].emit("unpipe",this)}return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;state.pipes.splice(i,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this);return this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"){if(this._readableState.flowing!==false)this.resume()}else if(ev==="readable"){var state=this._readableState;if(!state.endEmitted&&!state.readableListening){state.readableListening=state.needReadable=true;state.emittedReadable=false;if(!state.reading){processNextTick(nReadingNextTick,this)}else if(state.length){emitReadable(this,state)}}}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self){debug("readable nexttick read 0");self.read(0)}Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=true;resume(this,state)}return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;processNextTick(resume_,stream,state)}}function resume_(stream,state){if(!state.reading){debug("resume read 0");stream.read(0)}state.resumeScheduled=false;state.awaitDrain=0;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){debug("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);while(state.flowing&&stream.read()!==null){}}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(this[i]===undefined&&typeof stream[i]==="function"){this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i)}}var events=["error","close","destroy","pause","resume"];forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))});self._read=function(n){debug("wrapped _read",n);if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;if(state.objectMode)ret=state.buffer.shift();else if(!n||n>=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=fromListPartial(n,state.buffer,state.decoder)}return ret}function fromListPartial(n,list,hasStrings){var ret;if(n<list.head.data.length){ret=list.head.data.slice(0,n);list.head.data=list.head.data.slice(n)}else if(n===list.head.data.length){ret=list.shift()}else{ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list)}return ret}function copyFromBufferString(n,list){var p=list.head;var c=1;var ret=p.data;n-=ret.length;while(p=p.next){var str=p.data;var nb=n>str.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=str.slice(nb)}break}++c}list.length-=c;return ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n);var p=list.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)list.head=p.next;else list.head=list.tail=null}else{list.head=p;p.data=buf.slice(nb)}break}++c}list.length-=c;return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!state.endEmitted){state.ended=true;processNextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i}return-1}}).call(this,require("_process"))},{"./_stream_duplex":44,"./internal/streams/BufferList":49,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,isarray:40,"process-nextick-args":41,"string_decoder/":56,util:3}],47:[function(require,module,exports){"use strict";module.exports=Transform;var Duplex=require("./_stream_duplex");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(Transform,Duplex);function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null;this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=false;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null;ts.writecb=null;if(data!==null&&data!==undefined)stream.push(data);cb(er);var rs=stream._readableState;rs.reading=false;if(rs.needReadable||rs.length<rs.highWaterMark){stream._read(rs.highWaterMark)}}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=true;this._readableState.sync=false;if(options){if(typeof options.transform==="function")this._transform=options.transform;if(typeof options.flush==="function")this._flush=options.flush}this.once("prefinish",function(){if(typeof this._flush==="function")this._flush(function(er){done(stream,er)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){this._transformState.needTransform=false;return Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("Not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;ts.writecb=cb;ts.writechunk=chunk;ts.writeencoding=encoding;if(!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming){ts.transforming=true;this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)}else{ts.needTransform=true}};function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState;var ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}},{"./_stream_duplex":44,"core-util-is":6,inherits:38}],48:[function(require,module,exports){(function(process){"use strict";module.exports=Writable;var processNextTick=require("process-nextick-args");var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")};var Stream;(function(){try{Stream=require("st"+"ream")}catch(_){}finally{if(!Stream)Stream=require("events").EventEmitter}})();var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");util.inherits(Writable,Stream);function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb;this.next=null}var Duplex;function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex");options=options||{};this.objectMode=!!options.objectMode;if(stream instanceof Duplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark;var defaultHwm=this.objectMode?16:16*1024;this.highWaterMark=hwm||hwm===0?hwm:defaultHwm;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function writableStateGetBuffer(){var current=this.bufferedRequest;var out=[];while(current){out.push(current);current=current.next}return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(_){}})();var Duplex;function Writable(options){Duplex=Duplex||require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;if(options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er);processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=true;var er=false;if(chunk===null){er=new TypeError("May not write null values to stream")}else if(!Buffer.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}if(er){stream.emit("error",er);processNextTick(cb,er);valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(validChunk(this,state,chunk,cb)){ +state.pendingcb++;ret=writeOrBuffer(this,state,chunk,encoding,cb)}return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){state.corked--;if(!state.writing&&!state.corked&&!state.finished&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding;return this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=bufferShim.from(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb);if(last){last.next=state.lastBufferedRequest}else{state.bufferedRequest=state.lastBufferedRequest}state.bufferedRequestCount+=1}else{doWrite(stream,state,false,len,chunk,encoding,cb)}return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;if(writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){--state.pendingcb;if(sync)processNextTick(cb,er);else cb(er);stream._writableState.errorEmitted=true;stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest){clearBuffer(stream,state)}if(sync){asyncWrite(afterWrite,stream,state,finished,cb)}else{afterWrite(stream,state,finished,cb)}}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--;cb();finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount;var buffer=new Array(l);var holder=state.corkedRequestsFree;holder.entry=entry;var count=0;while(entry){buffer[count]=entry;entry=entry.next;count+=1}doWrite(stream,state,true,state.length,buffer,"",holder.finish);state.pendingcb++;state.lastBufferedRequest=null;if(holder.next){state.corkedRequestsFree=holder.next;holder.next=null}else{state.corkedRequestsFree=new CorkedRequest(state)}}else{while(entry){var chunk=entry.chunk;var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,false,len,chunk,encoding,cb);entry=entry.next;if(state.writing){break}}if(entry===null)state.lastBufferedRequest=null}state.bufferedRequestCount=0;state.bufferedRequest=entry;state.bufferProcessing=false}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(typeof chunk==="function"){cb=chunk;chunk=null;encoding=null}else if(typeof encoding==="function"){cb=encoding;encoding=null}if(chunk!==null&&chunk!==undefined)this.write(chunk,encoding);if(state.corked){state.corked=1;this.uncork()}if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function prefinish(stream,state){if(!state.prefinished){state.prefinished=true;stream.emit("prefinish")}}function finishMaybe(stream,state){var need=needFinish(state);if(need){if(state.pendingcb===0){prefinish(stream,state);state.finished=true;stream.emit("finish")}else{prefinish(stream,state)}}return need}function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb){if(state.finished)processNextTick(cb);else stream.once("finish",cb)}state.ended=true;stream.writable=false}function CorkedRequest(state){var _this=this;this.next=null;this.entry=null;this.finish=function(err){var entry=_this.entry;_this.entry=null;while(entry){var cb=entry.callback;state.pendingcb--;cb(err);entry=entry.next}if(state.corkedRequestsFree){state.corkedRequestsFree.next=_this}else{state.corkedRequestsFree=_this}}}}).call(this,require("_process"))},{"./_stream_duplex":44,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,"process-nextick-args":41,"util-deprecate":57}],49:[function(require,module,exports){"use strict";var Buffer=require("buffer").Buffer;var bufferShim=require("buffer-shims");module.exports=BufferList;function BufferList(){this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length};BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length};BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret};BufferList.prototype.clear=function(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret};BufferList.prototype.concat=function(n){if(this.length===0)return bufferShim.alloc(0);if(this.length===1)return this.head.data;var ret=bufferShim.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){p.data.copy(ret,i);i+=p.data.length;p=p.next}return ret}},{buffer:5,"buffer-shims":4}],50:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(require,module,exports){(function(process){var Stream=function(){try{return require("st"+"ream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream||exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");if(!process.browser&&process.env.READABLE_STREAM==="disable"&&Stream){module.exports=Stream}}).call(this,require("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(require,module,exports){module.exports=function(string){return string.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived<this.charLength){return""}buffer=buffer.slice(available,buffer.length);charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(charCode>=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:5}],57:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],58:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target}},{}]},{},[1])(1)}); + /** * swagger-client - swagger-client is a javascript client for use with swaggering APIs. - * @version v2.1.10 + * @version v2.1.29 * @link http://swagger.io * @license Apache-2.0 */ @@ -973,7 +3238,7 @@ var _ = { }; /** - * SwaggerAuthorizations applys the correct authorization to an operation being executed + * SwaggerAuthorizations applies the correct authorization to an operation being executed */ var SwaggerAuthorizations = module.exports.SwaggerAuthorizations = function (authz) { this.authz = authz || {}; @@ -1005,6 +3270,9 @@ SwaggerAuthorizations.prototype.apply = function (obj, securities) { var applyAll = !securities; var flattenedSecurities = []; + // favor the object-level authorizations over global + var authz = obj.clientAuthorizations || this.authz; + // Securities could be [ {} ] _.each(securities, function (obj, key) { @@ -1019,7 +3287,7 @@ SwaggerAuthorizations.prototype.apply = function (obj, securities) { }); }); - _.each(this.authz, function (auth, authName) { + _.each(authz, function (auth, authName) { if(applyAll || _.includes(flattenedSecurities, authName)) { var newStatus = auth.apply(obj); status = status && !!newStatus; // logical ORs regarding status @@ -1107,7 +3375,7 @@ PasswordAuthorization.prototype.apply = function (obj) { return true; }; -},{"./helpers":4,"btoa":14,"cookiejar":19,"lodash-compat/collection/each":56,"lodash-compat/collection/includes":59,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],3:[function(require,module,exports){ +},{"./helpers":4,"btoa":13,"cookiejar":18,"lodash-compat/collection/each":52,"lodash-compat/collection/includes":55,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144}],3:[function(require,module,exports){ 'use strict'; var _ = { @@ -1153,6 +3421,7 @@ var reservedClientTags = [ 'failure', 'finish', 'help', + 'host', 'idFromOp', 'info', 'initialize', @@ -1175,7 +3444,8 @@ var reservedClientTags = [ 'tagFromLabel', 'title', 'url', - 'useJQuery' + 'useJQuery', + 'jqueryAjaxCache' ]; // We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the // following usage: 'client.apis.{tagName}' @@ -1193,7 +3463,7 @@ var reservedApiTags = [ 'path', 'tag' ]; -var supportedOperationMethods = ['head', 'options', 'get', 'post', 'put', 'patch', 'delete']; +var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put']; var SwaggerClient = module.exports = function (url, options) { this.authorizations = null; this.authorizationScheme = null; @@ -1207,8 +3477,9 @@ var SwaggerClient = module.exports = function (url, options) { this.resourceCount = 0; this.url = null; this.useJQuery = false; + this.jqueryAjaxCache = false; this.swaggerObject = {}; - this.deferredClient = Q.defer(); + this.deferredClient = undefined; this.clientAuthorizations = new auth.SwaggerAuthorizations(); @@ -1230,29 +3501,54 @@ SwaggerClient.prototype.initialize = function (url, options) { this.url = options.url; } + if(this.url && this.url.indexOf('http:') === -1 && this.url.indexOf('https:') === -1) { + // no protocol, so we can only use window if it exists + if(typeof(window) !== 'undefined' && window && window.location) { + this.url = window.location.origin + this.url; + } + } + options = options || {}; this.clientAuthorizations.add(options.authorizations); this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*'; this.defaultSuccessCallback = options.defaultSuccessCallback || null; this.defaultErrorCallback = options.defaultErrorCallback || null; this.modelPropertyMacro = options.modelPropertyMacro || null; + this.connectionAgent = options.connectionAgent || null; this.parameterMacro = options.parameterMacro || null; this.usePromise = options.usePromise || null; + // operation request timeout default + this.timeout = options.timeout || null; + // default to request timeout when not specified + this.fetchSpecTimeout = typeof options.fetchSpecTimeout !== 'undefined' ? + options.fetchSpecTimeout : options.timeout || null; + + if(this.usePromise) { + this.deferredClient = Q.defer(); + } + if (typeof options.success === 'function') { this.success = options.success; } - if (options.useJQuery) { this.useJQuery = options.useJQuery; } + if (options.jqueryAjaxCache) { + this.jqueryAjaxCache = options.jqueryAjaxCache; + } + if (options.enableCookies) { this.enableCookies = options.enableCookies; } this.options = options || {}; + // maybe don't need this? + this.options.timeout = this.timeout; + this.options.fetchSpecTimeout = this.fetchSpecTimeout; + this.supportedSubmitMethods = options.supportedSubmitMethods || []; this.failure = options.failure || function (err) { throw err; }; this.progress = options.progress || function () {}; @@ -1275,10 +3571,17 @@ SwaggerClient.prototype.build = function (mock) { var self = this; - this.progress('fetching resource list: ' + this.url + '; Please wait.'); + if (this.spec) { + this.progress('fetching resource list; Please wait.'); + } else { + this.progress('fetching resource list: ' + this.url + '; Please wait.'); + } var obj = { useJQuery: this.useJQuery, + jqueryAjaxCache: this.jqueryAjaxCache, + connectionAgent: this.connectionAgent, + enableCookies: this.enableCookies, url: this.url, method: 'get', headers: { @@ -1288,6 +3591,8 @@ SwaggerClient.prototype.build = function (mock) { error: function (response) { if (self.url.substring(0, 4) !== 'http') { return self.fail('Please specify the protocol for ' + self.url); + } else if (response.errObj && (response.errObj.code === 'ECONNABORTED' || response.errObj.message.indexOf('timeout') !== -1)) { + return self.fail('Request timed out after ' + self.fetchSpecTimeout + 'ms'); } else if (response.status === 0) { return self.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.'); } else if (response.status === 404) { @@ -1327,10 +3632,15 @@ SwaggerClient.prototype.build = function (mock) { } }; + // only set timeout when specified + if (this.fetchSpecTimeout) { + obj.timeout = this.fetchSpecTimeout; + } + if (this.spec) { self.swaggerObject = this.spec; setTimeout(function () { - new Resolver().resolve(self.spec, self.buildFromSpec, self); + new Resolver().resolve(self.spec, self.url, self.buildFromSpec, self); }, 10); } else { this.clientAuthorizations.apply(obj); @@ -1358,36 +3668,95 @@ SwaggerClient.prototype.buildFromSpec = function (response) { this.info = response.info || {}; this.produces = response.produces; this.schemes = response.schemes || []; - this.securityDefinitions = response.securityDefinitions; + this.securityDefinitions = _.cloneDeep(response.securityDefinitions); + this.security = response.security; this.title = response.title || ''; + var key, definedTags = {}, k, location, self = this, i; + if (response.externalDocs) { this.externalDocs = response.externalDocs; } // legacy support - this.authSchemes = response.securityDefinitions; + this.authSchemes = this.securityDefinitions; - var definedTags = {}; - var k; + if(this.securityDefinitions) { + for(key in this.securityDefinitions) { + var securityDefinition = this.securityDefinitions[key]; + securityDefinition.vendorExtensions = {}; + for(var ext in securityDefinition) { + helpers.extractExtensions(ext, securityDefinition); + if (ext === 'scopes') { + var scopes = securityDefinition[ext]; + if(typeof scopes === 'object') { + scopes.vendorExtensions = {}; + for (var s in scopes) { + helpers.extractExtensions(s, scopes); + if(s.indexOf('x-') === 0) { + delete scopes[s]; + } + } + } + } + } + } + } if (Array.isArray(response.tags)) { definedTags = {}; for (k = 0; k < response.tags.length; k++) { - var t = response.tags[k]; + var t = _.cloneDeep(response.tags[k]); definedTags[t.name] = t; + for(i in t) { + if(i === 'externalDocs' && typeof t[i] === 'object') { + for(var j in t[i]) { + helpers.extractExtensions(j, t[i]); + } + } + helpers.extractExtensions(i, t); + } } } - var location; if (typeof this.url === 'string') { location = this.parseUri(this.url); if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) { - this.scheme = location.scheme || 'http'; - } else if (typeof this.scheme === 'undefined') { - this.scheme = this.schemes[0] || location.scheme; + if(typeof window !== 'undefined') { + // use the window scheme + this.scheme = window.location.protocol.replace(':',''); + } + else { + this.scheme = location.scheme || 'http'; + } + } else if (typeof window !== 'undefined' && window.location.protocol.indexOf('chrome-extension') === 0) { + // if it is chrome swagger ui extension scheme then let swagger doc url scheme decide the protocol + this.scheme = location.scheme; + } else if (typeof this.scheme === 'undefined') { + if(typeof window !== 'undefined') { + var scheme = window.location.protocol.replace(':',''); + if(scheme === 'https' && this.schemes.indexOf(scheme) === -1) { + // can't call http from https served page in a browser! + helpers.log('Cannot call a http server from https inside a browser!'); + this.scheme = 'http'; + } + else if(this.schemes.indexOf(scheme) !== -1) { + this.scheme = scheme; + } + else { + if(this.schemes.indexOf('https') !== -1) { + this.scheme = 'https'; + } + else { + this.scheme = 'http'; + } + } + } + else { + this.scheme = this.schemes[0] || location.scheme; + } } if (typeof this.host === 'undefined' || this.host === '') { @@ -1409,8 +3778,6 @@ SwaggerClient.prototype.buildFromSpec = function (response) { this.definitions = response.definitions; - var key; - for (key in this.definitions) { var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro); @@ -1420,7 +3787,6 @@ SwaggerClient.prototype.buildFromSpec = function (response) { } // get paths, create functions for each operationId - var self = this; // Bind help to 'client.apis' self.apis.help = _.bind(self.help, self); @@ -1462,6 +3828,20 @@ SwaggerClient.prototype.buildFromSpec = function (response) { self.models, self.clientAuthorizations); + operationObject.connectionAgent = self.connectionAgent; + operationObject.vendorExtensions = {}; + for(i in operation) { + helpers.extractExtensions(i, operationObject, operation[i]); + } + operationObject.externalDocs = operation.externalDocs; + if(operationObject.externalDocs) { + operationObject.externalDocs = _.cloneDeep(operationObject.externalDocs); + operationObject.externalDocs.vendorExtensions = {}; + for(i in operationObject.externalDocs) { + helpers.extractExtensions(i, operationObject.externalDocs); + } + } + // bind self operation's execute command to the api _.forEach(tags, function (tag) { var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag; @@ -1499,6 +3879,7 @@ SwaggerClient.prototype.buildFromSpec = function (response) { if (!_.isUndefined(tagDef)) { operationGroup.description = tagDef.description; operationGroup.externalDocs = tagDef.externalDocs; + operationGroup.vendorExtensions = tagDef.vendorExtensions; } self[clientProperty].help = _.bind(self.help, operationGroup); @@ -1534,6 +3915,32 @@ SwaggerClient.prototype.buildFromSpec = function (response) { }); }); + // sort the apisArray according to the tags + var sortedApis = []; + _.forEach(Object.keys(definedTags), function (tag) { + var pos; + for(pos in self.apisArray) { + var _api = self.apisArray[pos]; + if(_api && tag === _api.name) { + sortedApis.push(_api); + self.apisArray[pos] = null; + } + } + }); + // add anything left + _.forEach(self.apisArray, function (api) { + if(api) { + sortedApis.push(api); + } + }); + self.apisArray = sortedApis; + + _.forEach(response.definitions, function (definitionObj, definition) { + definitionObj.id = definition.toLowerCase(); + definitionObj.name = definition; + self.modelsArray.push(definitionObj); + }); + this.isBuilt = true; if (this.usePromise) { @@ -1661,6 +4068,22 @@ SwaggerClient.prototype.setBasePath = function (basePath) { } }; +SwaggerClient.prototype.setSchemes = function (schemes) { + this.schemes = schemes; + + if(schemes && schemes.length > 0) { + if(this.apis) { + _.forEach(this.apis, function (api) { + if (api.operations) { + _.forEach(api.operations, function (operation) { + operation.scheme = schemes[0]; + }); + } + }); + } + } +}; + SwaggerClient.prototype.fail = function (message) { if (this.usePromise) { this.deferredClient.reject(message); @@ -1675,7 +4098,7 @@ SwaggerClient.prototype.fail = function (message) { } }; -},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":53,"lodash-compat/collection/find":57,"lodash-compat/collection/forEach":58,"lodash-compat/function/bind":62,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isFunction":146,"lodash-compat/lang/isObject":148,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isUndefined":152,"q":161}],4:[function(require,module,exports){ +},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":49,"lodash-compat/collection/find":53,"lodash-compat/collection/forEach":54,"lodash-compat/function/bind":58,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isFunction":142,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"q":157}],4:[function(require,module,exports){ (function (process){ 'use strict'; @@ -1701,7 +4124,7 @@ module.exports.fail = function (message) { log(message); }; -var optionHtml = module.exports.optionHtml = function (label, value) { +module.exports.optionHtml = function (label, value) { return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>'; }; @@ -1713,7 +4136,7 @@ var resolveSchema = module.exports.resolveSchema = function (schema) { return schema; }; -var simpleRef = module.exports.simpleRef = function (name) { +module.exports.simpleRef = function (name) { if (typeof name === 'undefined') { return null; } @@ -1725,28 +4148,54 @@ var simpleRef = module.exports.simpleRef = function (name) { } }; +/** + * helper to remove extensions and add them to an object + * + * @param keyname + * @param obj + */ +module.exports.extractExtensions = function (keyname, obj, value) { + if(!keyname || !obj) { + return; + } + if (typeof keyname === 'string' && keyname.indexOf('x-') === 0) { + obj.vendorExtensions = obj.vendorExtensions || {}; + if(value) { + obj.vendorExtensions[keyname] = value; + } + else { + obj.vendorExtensions[keyname] = obj[keyname]; + } + } +}; }).call(this,require('_process')) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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wvdGQ+PC90cj4nO1xufTtcblxudmFyIHJlc29sdmVTY2hlbWEgPSBtb2R1bGUuZXhwb3J0cy5yZXNvbHZlU2NoZW1hID0gZnVuY3Rpb24gKHNjaGVtYSkge1xuICBpZiAoXy5pc1BsYWluT2JqZWN0KHNjaGVtYS5zY2hlbWEpKSB7XG4gICAgc2NoZW1hID0gcmVzb2x2ZVNjaGVtYShzY2hlbWEuc2NoZW1hKTtcbiAgfVxuXG4gIHJldHVybiBzY2hlbWE7XG59O1xuXG52YXIgc2ltcGxlUmVmID0gbW9kdWxlLmV4cG9ydHMuc2ltcGxlUmVmID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgaWYgKHR5cGVvZiBuYW1lID09PSAndW5kZWZpbmVkJykge1xuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgaWYgKG5hbWUuaW5kZXhPZignIy9kZWZpbml0aW9ucy8nKSA9PT0gMCkge1xuICAgIHJldHVybiBuYW1lLnN1YnN0cmluZygnIy9kZWZpbml0aW9ucy8nLmxlbmd0aCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG5hbWU7XG4gIH1cbn07XG5cbiJdfQ== -},{"_process":13,"lodash-compat/array/indexOf":53,"lodash-compat/lang/isPlainObject":149}],5:[function(require,module,exports){ + +},{"_process":12,"lodash-compat/array/indexOf":49,"lodash-compat/lang/isPlainObject":145}],5:[function(require,module,exports){ +(function (Buffer){ 'use strict'; var helpers = require('./helpers'); var request = require('superagent'); var jsyaml = require('js-yaml'); var _ = { - isObject: require('lodash-compat/lang/isObject') + isObject: require('lodash-compat/lang/isObject'), + keys: require('lodash-compat/object/keys') }; /* * JQueryHttpClient is a light-weight, node or browser HTTP client */ -var JQueryHttpClient = function () {}; +var JQueryHttpClient = function () { + this.type = 'JQueryHttpClient'; +}; /* * SuperagentHttpClient is a light-weight, node or browser HTTP client */ -var SuperagentHttpClient = function () {}; +var SuperagentHttpClient = function () { + this.type = 'SuperagentHttpClient'; +}; /** * SwaggerHttp is a wrapper for executing requests @@ -1764,6 +4213,10 @@ SwaggerHttp.prototype.execute = function (obj, opts) { } client.opts = opts || {}; + if (opts && opts.requestAgent) { + request = opts.requestAgent; + } + // legacy support var hasJQuery = false; if(typeof window !== 'undefined') { @@ -1771,6 +4224,11 @@ SwaggerHttp.prototype.execute = function (obj, opts) { hasJQuery = true; } } + // OPTIONS support + if(obj.method.toLowerCase() === 'options' && client.type === 'SuperagentHttpClient') { + log('forcing jQuery as OPTIONS are not supported by SuperAgent'); + obj.useJQuery = true; + } if(this.isInternetExplorer() && (obj.useJQuery === false || !hasJQuery )) { throw new Error('Unsupported configuration! JQuery is required but not available'); } @@ -1779,6 +4237,7 @@ SwaggerHttp.prototype.execute = function (obj, opts) { } var success = obj.on.response; + var error = obj.on.error; var requestInterceptor = function(data) { if(opts && opts.requestInterceptor) { @@ -1789,29 +4248,50 @@ SwaggerHttp.prototype.execute = function (obj, opts) { var responseInterceptor = function(data) { if(opts && opts.responseInterceptor) { - data = opts.responseInterceptor.apply(data); + data = opts.responseInterceptor.apply(data, [obj]); } return success(data); }; - obj.on.response = function(data) { - responseInterceptor(data); + var errorInterceptor = function(data) { + if(opts && opts.responseInterceptor) { + data = opts.responseInterceptor.apply(data, [obj]); + } + error(data); }; + obj.on.error = function(data) { + errorInterceptor(data); + }; + + obj.on.response = function(data) { + if(data && data.status >= 400) { + errorInterceptor(data); + } + else { + responseInterceptor(data); + } + }; if (_.isObject(obj) && _.isObject(obj.body)) { // special processing for file uploads via jquery if (obj.body.type && obj.body.type === 'formData'){ - obj.contentType = false; - obj.processData = false; - - delete obj.headers['Content-Type']; - } else { - obj.body = JSON.stringify(obj.body); + if(opts.useJQuery) { + obj.contentType = false; + obj.processData = false; + delete obj.headers['Content-Type']; + } } } - client.execute(requestInterceptor(obj)); + obj = requestInterceptor(obj) || obj; + if (obj.beforeSend) { + obj.beforeSend(function(_obj) { + client.execute(_obj || obj); + }); + } else { + client.execute(obj); + } return (obj.deferred) ? obj.deferred.promise : obj; }; @@ -1835,34 +4315,19 @@ SwaggerHttp.prototype.isInternetExplorer = function () { }; JQueryHttpClient.prototype.execute = function (obj) { - var jq = this.jQuery || window.jQuery; + var jq = this.jQuery || (typeof window !== 'undefined' && window.jQuery); var cb = obj.on; var request = obj; + if(typeof jq === 'undefined' || jq === false) { + throw new Error('Unsupported configuration! JQuery is required but not available'); + } + obj.type = obj.method; - obj.cache = false; - delete obj.useJQuery; - - /* - obj.beforeSend = function (xhr) { - var key, results; - if (obj.headers) { - results = []; - for (key in obj.headers) { - if (key.toLowerCase() === 'content-type') { - results.push(obj.contentType = obj.headers[key]); - } else if (key.toLowerCase() === 'accept') { - results.push(obj.accepts = obj.headers[key]); - } else { - results.push(xhr.setRequestHeader(key, obj.headers[key])); - } - } - return results; - } - };*/ - + obj.cache = obj.jqueryAjaxCache; obj.data = obj.body; - + delete obj.jqueryAjaxCache; + delete obj.useJQuery; delete obj.body; obj.complete = function (response) { @@ -1927,23 +4392,74 @@ JQueryHttpClient.prototype.execute = function (obj) { SuperagentHttpClient.prototype.execute = function (obj) { var method = obj.method.toLowerCase(); + var timeout = obj.timeout; if (method === 'delete') { method = 'del'; } var headers = obj.headers || {}; + var r = request[method](obj.url); - var name; - for (name in headers) { - r.set(name, headers[name]); + + if (obj.connectionAgent) { + r.agent(obj.connectionAgent); + } + + if (timeout) { + r.timeout(timeout); } if (obj.enableCookies) { r.withCredentials(); } - if (obj.body) { - r.send(obj.body); + var accept = obj.headers.Accept; + + if(this.binaryRequest(accept)) { + r.on('request', function () { + if(this.xhr) { + this.xhr.responseType = 'blob'; + } + }); + } + + if(obj.body) { + if(_.isObject(obj.body)) { + var contentType = obj.headers['Content-Type'] || ''; + if (contentType.indexOf('multipart/form-data') === 0) { + delete headers['Content-Type']; + if({}.toString.apply(obj.body) === '[object FormData]') { + r.send(obj.body); + } + else { + var keyname, value, v; + for (keyname in obj.body) { + value = obj.body[keyname]; + if(Array.isArray(value)) { + for(v in value) { + r.field(keyname, v); + } + } + else { + r.field(keyname, value); + } + } + } + } + else if (_.isObject(obj.body)) { + // non multipart/form-data + obj.body = JSON.stringify(obj.body); + r.send(obj.body); + } + } + else { + r.send(obj.body); + } + } + + var name; + for (name in headers) { + r.set(name, headers[name]); } if(typeof r.buffer === 'function') { @@ -1970,8 +4486,8 @@ SuperagentHttpClient.prototype.execute = function (obj) { response.errObj = err; response.status = res ? res.status : 500; response.statusText = res ? res.text : err.message; - if(res.headers && res.headers['content-type']) { - if(res.headers['content-type'].indexOf('application/json') >= 0) { + if (res.headers && res.headers['content-type']) { + if (res.headers['content-type'].indexOf('application/json') >= 0) { try { response.obj = JSON.parse(response.statusText); } @@ -1985,26 +4501,36 @@ SuperagentHttpClient.prototype.execute = function (obj) { var possibleObj; // Already parsed by by superagent? - if(res.body && Object.keys(res.body).length > 0) { + if (res.body && _.keys(res.body).length > 0) { possibleObj = res.body; } else { - try { - possibleObj = jsyaml.safeLoad(res.text); - // can parse into a string... which we don't need running around in the system - possibleObj = (typeof possibleObj === 'string') ? null : possibleObj; - } catch(e) { - helpers.log('cannot parse JSON/YAML content'); - } + try { + possibleObj = jsyaml.safeLoad(res.text); + // can parse into a string... which we don't need running around in the system + possibleObj = (typeof possibleObj === 'string') ? null : possibleObj; + } catch (e) { + helpers.log('cannot parse JSON/YAML content'); + } } // null means we can't parse into object - response.obj = (typeof possibleObj === 'object') ? possibleObj : null; + if(typeof Buffer === 'function' && Buffer.isBuffer(possibleObj)) { + response.data = possibleObj; + } + else { + response.obj = (typeof possibleObj === 'object') ? possibleObj : null; + } response.status = res.status; response.statusText = res.text; cb = obj.on.response; } - response.data = response.statusText; + if (res.xhr && res.xhr.response) { + response.data = res.xhr.response; + } + else if(!response.data) { + response.data = response.statusText; + } if (cb) { cb(response); @@ -2012,21 +4538,37 @@ SuperagentHttpClient.prototype.execute = function (obj) { }); }; -},{"./helpers":4,"js-yaml":20,"lodash-compat/lang/isObject":148,"superagent":162}],6:[function(require,module,exports){ +SuperagentHttpClient.prototype. binaryRequest = function (accept) { + if(!accept) { + return false; + } + return (/^image/i).test(accept) + || (/^application\/pdf/).test(accept) + || (/^application\/octet-stream/).test(accept); +}; + +}).call(this,require("buffer").Buffer) + +},{"./helpers":4,"buffer":14,"js-yaml":19,"lodash-compat/lang/isObject":144,"lodash-compat/object/keys":149,"superagent":158}],6:[function(require,module,exports){ 'use strict'; var SwaggerHttp = require('./http'); var _ = { isObject: require('lodash-compat/lang/isObject'), cloneDeep: require('lodash-compat/lang/cloneDeep'), - isArray: require('lodash-compat/lang/isArray') + isArray: require('lodash-compat/lang/isArray'), + isString: require('lodash-compat/lang/isString') }; /** * Resolves a spec's remote references */ -var Resolver = module.exports = function () {}; +var Resolver = module.exports = function () { + this.failedUrls = []; + this.resolverCache = {}; + this.pendingUrls = {}; +}; Resolver.prototype.processAllOf = function(root, name, definition, resolutionTable, unresolvedRefs, spec) { var i, location, property; @@ -2054,7 +4596,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { callback = arg1; scope = arg2; } - var _root = root; + var _root = root, modelName; this.scope = (scope || this); this.iteration = this.iteration || 0; @@ -2066,7 +4608,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { opts.responseInterceptor = this.scope.options.responseInterceptor; } - var name, path, property, propertyName; + var name, path, property, propertyName, parameter, done, counter; var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {}; var resolutionTable = []; // store objects for dereferencing @@ -2074,18 +4616,57 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { // definitions for (name in spec.definitions) { var definition = spec.definitions[name]; - for (propertyName in definition.properties) { - property = definition.properties[propertyName]; - if(_.isArray(property.allOf)) { - this.processAllOf(root, name, property, resolutionTable, unresolvedRefs, spec); + if(definition.$ref) { + this.resolveInline(root, spec, definition, resolutionTable, unresolvedRefs, definition); + } + else { + for (propertyName in definition.properties) { + property = definition.properties[propertyName]; + if (_.isArray(property.allOf)) { + this.processAllOf(root, name, property, resolutionTable, unresolvedRefs, spec); + } + else { + this.resolveTo(root, property, resolutionTable, '/definitions'); + } + } + + if (definition.allOf) { + this.processAllOf(root, name, definition, resolutionTable, unresolvedRefs, spec); + } + } + } + + // shared parameters + spec.parameters = spec.parameters || {}; + for(name in spec.parameters) { + parameter = spec.parameters[name]; + if (parameter.in === 'body' && parameter.schema) { + if(_.isArray(parameter.schema.allOf)) { + // move to a definition + modelName = 'inline_model'; + var _name = modelName; + done = false; counter = 0; + while(!done) { + if(typeof spec.definitions[_name] === 'undefined') { + done = true; + break; + } + _name = modelName + '_' + counter; + counter ++; + } + spec.definitions[_name] = { allOf: parameter.schema.allOf }; + delete parameter.schema.allOf; + parameter.schema.$ref = '#/definitions/' + _name; + this.processAllOf(root, _name, spec.definitions[_name], resolutionTable, unresolvedRefs, spec); } else { - this.resolveTo(root, property, resolutionTable, '/definitions'); + this.resolveTo(root, parameter.schema, resolutionTable, location); } } - if(definition.allOf) { - this.processAllOf(root, name, definition, resolutionTable, unresolvedRefs, spec); + if (parameter.$ref) { + // parameter reference + this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); } } @@ -2094,78 +4675,110 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { var method, operation, responseCode; path = spec.paths[name]; - for (method in path) { - // operation reference - if(method === '$ref') { - // location = path[method]; - location = '/paths' + name; - this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location); - } - else { - operation = path[method]; - var sharedParameters = path.parameters || []; - var parameters = operation.parameters || []; - - for (i in sharedParameters) { - var parameter = sharedParameters[i]; - parameters.unshift(parameter); - } - if(method !== 'parameters' && _.isObject(operation)) { - operation.parameters = operation.parameters || parameters; + if(typeof path === 'object') { + for (method in path) { + // operation reference + if (method === '$ref') { + // location = path[method]; + location = '/paths' + name; + this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location); } + else { + operation = path[method]; + var sharedParameters = path.parameters || []; + var parameters = operation.parameters || []; - for (i in parameters) { - var parameter = parameters[i]; - location = '/paths' + name + '/' + method + '/parameters'; + sharedParameters.forEach(function(parameter) { + parameters.unshift(parameter); + }); - if (parameter.in === 'body' && parameter.schema) { - if(_.isArray(parameter.schema.allOf)) { - // move to a definition - var modelName = 'inline_model'; - var name = modelName; - var done = false; var counter = 0; - while(!done) { - if(typeof spec.definitions[name] === 'undefined') { - done = true; - break; + if (method !== 'parameters' && _.isObject(operation)) { + operation.parameters = operation.parameters || parameters; + } + + for (i in parameters) { + parameter = parameters[i]; + location = '/paths' + name + '/' + method + '/parameters'; + + if (parameter.in === 'body' && parameter.schema) { + if (_.isArray(parameter.schema.allOf)) { + // move to a definition + modelName = 'inline_model'; + name = modelName; + done = false; + counter = 0; + while (!done) { + if (typeof spec.definitions[name] === 'undefined') { + done = true; + break; + } + name = modelName + '_' + counter; + counter++; } - name = modelName + '_' + counter; - counter ++; + spec.definitions[name] = {allOf: parameter.schema.allOf}; + delete parameter.schema.allOf; + parameter.schema.$ref = '#/definitions/' + name; + this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); + } + else { + this.resolveTo(root, parameter.schema, resolutionTable, location); } - spec.definitions[name] = { allOf: parameter.schema.allOf }; - delete parameter.schema.allOf; - parameter.schema.$ref = '#/definitions/' + name; - this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); } - else { - this.resolveTo(root, parameter.schema, resolutionTable, location); + + if (parameter.$ref) { + // parameter reference + this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); } } - if (parameter.$ref) { - // parameter reference - this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref); - } - } + for (responseCode in operation.responses) { + var response = operation.responses[responseCode]; + location = '/paths' + name + '/' + method + '/responses/' + responseCode; - for (responseCode in operation.responses) { - var response = operation.responses[responseCode]; - location = '/paths' + name + '/' + method + '/responses/' + responseCode; - - if(_.isObject(response)) { - if(response.$ref) { - // response reference - this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location); - } - if (response.schema) { - this.resolveTo(root, response.schema, resolutionTable, location); + if (_.isObject(response)) { + if (response.$ref) { + // response reference + this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location); + } + if (response.schema) { + var responseObj = response; + if (_.isArray(responseObj.schema.allOf)) { + // move to a definition + modelName = 'inline_model'; + name = modelName; + done = false; + counter = 0; + while (!done) { + if (typeof spec.definitions[name] === 'undefined') { + done = true; + break; + } + name = modelName + '_' + counter; + counter++; + } + spec.definitions[name] = {allOf: responseObj.schema.allOf}; + delete responseObj.schema.allOf; + delete responseObj.schema.type; + responseObj.schema.$ref = '#/definitions/' + name; + this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec); + } + else if ('array' === responseObj.schema.type) { + if (responseObj.schema.items && responseObj.schema.items.$ref) { + // response reference + this.resolveInline(root, spec, responseObj.schema.items, resolutionTable, unresolvedRefs, location); + } + } + else { + this.resolveTo(root, response.schema, resolutionTable, location); + } + } } } } } + // clear them out to avoid multiple resolutions + path.parameters = []; } - // clear them out to avoid multiple resolutions - path.parameters = []; } var expectedCalls = 0, toResolve = []; @@ -2205,7 +4818,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { else { parts = a.key.split('#'); if(parts.length === 2) { - if(parts[0].indexOf('http://') === 0 || parts[0].indexOf('https://') === 0) { + if(parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0) { a.root = parts[0]; } location = parts[1].split('/'); @@ -2255,9 +4868,11 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { expectedCalls = toResolve.length; // resolve anything that is local + + var lock = {}; for(var ii = 0; ii < toResolve.length; ii++) { - (function(item, spec, self) { - if(item.root === null || item.root === root) { + (function(item, spec, self, lock, ii) { + if(!item.root || item.root === root) { // local resolve self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item); processedCalls += 1; @@ -2266,7 +4881,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, true); } } - else { + else if(self.failedUrls.indexOf(item.root) === -1) { var obj = { useJQuery: false, // TODO url: item.root, @@ -2277,6 +4892,11 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { on: { error: function (error) { processedCalls += 1; + console.log('failed url: ' + obj.url); + self.failedUrls.push(obj.url); + if (lock) { + delete lock[item.root]; + } unresolvedRefs[item.key] = { root: item.root, location: item.location @@ -2288,6 +4908,12 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { }, // jshint ignore:line response: function (response) { var swagger = response.obj; + if (lock) { + delete lock[item.root]; + } + if (self.resolverCache) { + self.resolverCache[item.root] = swagger; + } self.resolveItem(swagger, item.root, resolutionTable, resolvedRefs, unresolvedRefs, item); processedCalls += 1; @@ -2298,13 +4924,45 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) { } // jshint ignore:line }; + // apply timeout only when specified + if (scope && scope.fetchSpecTimeout) { + obj.timeout = scope.fetchSpecTimeout; + } + if (scope && scope.clientAuthorizations) { scope.clientAuthorizations.apply(obj); } - new SwaggerHttp().execute(obj, opts); + (function waitForUnlock() { + setTimeout(function() { + if (lock[obj.url]) { + waitForUnlock(); + } + else { + var cached = self.resolverCache[obj.url]; + if (_.isObject(cached)) { + obj.on.response({obj: cached}); + } + else { + lock[obj.url] = true; + new SwaggerHttp().execute(obj, opts); + } + } + }, 0); + })(); } - }(toResolve[ii], spec, this)); + + else { + processedCalls += 1; + unresolvedRefs[item.key] = { + root: item.root, + location: item.location + }; + if (processedCalls === expectedCalls) { + self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback); + } + } + }(toResolve[ii], spec, this, lock, ii)); } if (Object.keys(toResolve).length === 0) { @@ -2361,7 +5019,7 @@ Resolver.prototype.resolveItem = function(spec, root, resolutionTable, resolvedR Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, localResolve) { // walk resolution table and replace with resolved refs - var ref; + var ref, abs; for (ref in resolutionTable) { var item = resolutionTable[ref]; @@ -2373,7 +5031,8 @@ Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, if (localResolve !== true) { // don't retain root for local definitions for (key in resolvedTo.obj) { - var abs = this.retainRoot(resolvedTo.obj[key], item.root); + abs = this.retainRoot(key, resolvedTo.obj[key], item.root); + resolvedTo.obj[key] = abs; } } spec.definitions[resolvedTo.name] = resolvedTo.obj; @@ -2384,11 +5043,11 @@ Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, delete targetObj.$ref; for (key in resolvedTo.obj) { - var abs = resolvedTo.obj[key]; - + abs = resolvedTo.obj[key]; + if (localResolve !== true) { // don't retain root for local definitions - abs = this.retainRoot(resolvedTo.obj[key], item.root); + abs = this.retainRoot(key, resolvedTo.obj[key], item.root); } targetObj[key] = abs; } @@ -2399,6 +5058,7 @@ Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, if(existingUnresolved === 0 || this.iteration > 5) { this.resolveAllOf(spec.definitions); + this.resolverCache = null; callback.call(this.scope, spec, unresolvedRefs); } else { @@ -2462,23 +5122,94 @@ Resolver.prototype.getRefs = function(spec, obj) { return output; }; -Resolver.prototype.retainRoot = function(obj, root) { +function splitUrl(url) { + var result = {}; + var proto = /[a-z]+:\/\//i.exec(url); + if (proto) { + result.proto = proto[0].slice(0, -3); + url = url.slice(result.proto.length + 1); + } + if (url.slice(0, 2) === '//') { + result.domain = url.slice(2).split('/')[0]; + url = url.slice(2 + result.domain.length); + } + var p = url.split('#'); + if (p[0].length) { + result.path = p[0]; + } + if (p.length > 1) { + result.fragment = p.slice(1).join('#'); + } + return result; +} + +function unsplitUrl(url) { + var result = url.path; + if (result === undefined) { + result = ''; + } + if (url.fragment !== undefined) { + result += '#' + url.fragment; + } + if (url.domain !== undefined) { + if (result.slice(0, 1) === '/') { + result = result.slice(1); + } + result = '//' + url.domain + '/' + result; + if (url.proto !== undefined) { + result = url.proto + ':' + result; + } + } + return result; +} + +function joinUrl(base, rel) { + var relsp = splitUrl(rel); + if (relsp.domain !== undefined) { + return rel; + } + var result = splitUrl(base); + if (relsp.path === undefined) { + // change only fragment part + result.fragment = relsp.fragment; + } else if (relsp.path.slice(0, 1) === '/') { + // relative to domain + result.path = relsp.path; + result.fragment = relsp.fragment; + } else { + // relative to path + var path = result.path === undefined ? [] : result.path.split('/'); + var relpath = relsp.path.split('/'); + if (path.length) { + path.pop(); + } + while (relpath[0] === '..' || relpath[0] === '.') { + if (relpath[0] === '..') { + path.pop(); + } + relpath.shift(); + } + result.path = path.concat(relpath).join('/'); + result.fragment = relsp.fragment; + } + return unsplitUrl(result); +} + +Resolver.prototype.retainRoot = function(origKey, obj, root) { // walk object and look for relative $refs - for(var key in obj) { - var item = obj[key]; - if(key === '$ref' && typeof item === 'string') { - // stop and inspect - if(item.indexOf('http://') !== 0 && item.indexOf('https://') !== 0) { - if(item.indexOf('#') !== 0) { - item = '#' + item; - } - item = (root || '') + item; - obj[key] = item; + if(_.isObject(obj)) { + for(var key in obj) { + var item = obj[key]; + if (key === '$ref' && typeof item === 'string') { + obj[key] = joinUrl(root, item); + } + else if (_.isObject(item)) { + this.retainRoot(key, item, root); } } - else if(_.isObject(item)) { - this.retainRoot(item, root); - } + } + else if(_.isString(obj) && origKey === '$ref') { + obj = joinUrl(root, obj); } return obj; }; @@ -2490,6 +5221,10 @@ Resolver.prototype.retainRoot = function(obj, root) { Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) { var key = property.$ref, ref = property.$ref, i, p, p2, rs; var rootTrimmed = false; + + root = root || ''; // Guard against .split. @fehguy, you'll need to check if this logic fits + // More imporantly is how do we gracefully handle relative urls, when provided just a 'spec', not a 'url' ? + if (ref) { if(ref.indexOf('../') === 0) { // reset root @@ -2536,7 +5271,7 @@ Resolver.prototype.resolveInline = function (root, spec, property, resolutionTab location = rs[1]; } } - if (ref.indexOf('http') === 0) { + if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { if(ref.indexOf('#') >= 0) { root = ref.split('#')[0]; location = ref.split('#')[1]; @@ -2549,6 +5284,14 @@ Resolver.prototype.resolveInline = function (root, spec, property, resolutionTab } else if (ref.indexOf('#') === 0) { location = ref.split('#')[1]; resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); + } else if (ref.indexOf('/') === 0 && ref.indexOf('#') === -1) { + location = ref; + var matches = root.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i); + if(matches) { + root = matches[0] + ref.substring(1); + location = ''; + } + resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); } else { resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location}); @@ -2563,7 +5306,7 @@ Resolver.prototype.resolveTo = function (root, property, resolutionTable, locati var sp, i; var ref = property.$ref; var lroot = root; - if (typeof ref !== 'undefined') { + if ((typeof ref !== 'undefined') && (ref !== null)) { if(ref.indexOf('#') >= 0) { var parts = ref.split('#'); @@ -2572,7 +5315,7 @@ Resolver.prototype.resolveTo = function (root, property, resolutionTable, locati if(parts[0] && ref.indexOf('/') === 0) { } - else if(parts[0] && parts[0].indexOf('http') === 0) { + else if(parts[0] && (parts[0].indexOf('http:') === 0 || parts[0].indexOf('https:') === 0)) { lroot = parts[0]; ref = parts[1]; } @@ -2591,7 +5334,7 @@ Resolver.prototype.resolveTo = function (root, property, resolutionTable, locati location = parts[1]; } - else if (ref.indexOf('http://') === 0 || ref.indexOf('https://') === 0) { + else if (ref.indexOf('http:') === 0 || ref.indexOf('https:') === 0) { lroot = ref; location = ''; } @@ -2612,10 +5355,14 @@ Resolver.prototype.resolveTo = function (root, property, resolutionTable, locati var items = property.items; this.resolveTo(root, items, resolutionTable, location); } else { - if(property && property.properties) { + if(property && (property.properties || property.additionalProperties)) { var name = this.uniqueName('inline_model'); + if (property.title) { + name = this.uniqueName(property.title); + } + delete property.title; this.spec.definitions[name] = _.cloneDeep(property); - property['$ref'] = '#/definitions/' + name; + property.$ref = '#/definitions/' + name; delete property.type; delete property.properties; } @@ -2711,13 +5458,10 @@ Resolver.prototype.resolveAllOf = function(spec, obj, depth) { obj[key] = output; } } - if(_.isObject(item)) { - this.resolveAllOf(spec, item, depth + 1); - } } }; -},{"./http":5,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],7:[function(require,module,exports){ +},{"./http":5,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isString":146}],7:[function(require,module,exports){ 'use strict'; var Helpers = require('./helpers'); @@ -2735,17 +5479,11 @@ var _ = { forEach: require('lodash-compat/collection/forEach') }; -module.exports.optionHtml = optionHtml; -module.exports.typeFromJsonSchema = typeFromJsonSchema; -module.exports.getStringSignature = getStringSignature; -module.exports.schemaToHTML = schemaToHTML; -module.exports.schemaToJSON = schemaToJSON; - -function optionHtml(label, value) { +var optionHtml = module.exports.optionHtml = function (label, value) { return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>'; -} +}; -function typeFromJsonSchema(type, format) { +module.exports.typeFromJsonSchema = function (type, format) { var str; if (type === 'integer' && format === 'int32') { @@ -2771,9 +5509,9 @@ function typeFromJsonSchema(type, format) { } return str; -} +}; -function getStringSignature(obj, baseComponent) { +var getStringSignature = module.exports.getStringSignature = function (obj, baseComponent) { var str = ''; if (typeof obj.$ref !== 'undefined') { @@ -2815,9 +5553,9 @@ function getStringSignature(obj, baseComponent) { } return str; -} +}; -function schemaToJSON(schema, models, modelsToIgnore, modelPropertyMacro) { +var schemaToJSON = module.exports.schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) { // Resolve the schema (Handle nested schemas) schema = Helpers.resolveSchema(schema); @@ -2902,10 +5640,9 @@ function schemaToJSON(schema, models, modelsToIgnore, modelPropertyMacro) { } return output; -} - -function schemaToHTML(name, schema, models, modelPropertyMacro) { +}; +module.exports.schemaToHTML =function (name, schema, models, modelPropertyMacro) { var strongOpen = '<span class="strong">'; var strongClose = '</span>'; @@ -3194,7 +5931,7 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) { var cProperty = _.cloneDeep(property); var requiredClass = propertyIsRequired ? 'required' : ''; - var html = '<div' + (property.readOnly ? ' class="readOnly"' : '') + '><span class="propName ' + requiredClass + '">' + name + '</span> ('; + var html = '<span class="propName ' + requiredClass + '">' + name + '</span> ('; var model; var propDescription; @@ -3236,12 +5973,12 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) { html += ' = <span class="propVals">[\'' + cProperty.enum.join('\', \'') + '\']</span>'; } - return primitiveToOptionsHTML(cProperty, html); + return '<div' + (property.readOnly ? ' class="readOnly"' : '') + '>' + primitiveToOptionsHTML(cProperty, html); }).join(',</div>'); - } - if (contents) { - html += contents + '</div>'; + if (contents) { + html += contents + '</div>'; + } } } else { html += '<div>' + primitiveToOptionsHTML(schema, type) + '</div>'; @@ -3250,9 +5987,8 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) { return html + strongOpen + (isArray ? ']' : '}') + strongClose; } -} - -},{"./helpers":4,"lodash-compat/array/indexOf":53,"lodash-compat/collection/forEach":58,"lodash-compat/collection/map":60,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isEmpty":145,"lodash-compat/lang/isObject":148,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isUndefined":152,"lodash-compat/object/keys":153}],8:[function(require,module,exports){ +}; +},{"./helpers":4,"lodash-compat/array/indexOf":49,"lodash-compat/collection/forEach":54,"lodash-compat/collection/map":56,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"lodash-compat/object/keys":149}],8:[function(require,module,exports){ 'use strict'; var SwaggerHttp = require('./http'); @@ -3386,7 +6122,7 @@ SwaggerSpecConverter.prototype.models = function(obj, swagger) { swagger.definitions = swagger.definitions || {}; for(name in obj) { var existingModel = obj[name]; - var _enum = []; + var _required = []; var schema = { properties: {}}; var propertyName; for(propertyName in existingModel.properties) { @@ -3400,18 +6136,18 @@ SwaggerSpecConverter.prototype.models = function(obj, swagger) { property['enum'] = existingProperty['enum']; } if(typeof existingProperty.required === 'boolean' && existingProperty.required === true) { - _enum.push(propertyName); + _required.push(propertyName); } if(typeof existingProperty.required === 'string' && existingProperty.required === 'true') { - _enum.push(propertyName); + _required.push(propertyName); } schema.properties[propertyName] = property; } - if(_enum.length > 0) { - schema['enum'] = _enum; + if(_required.length > 0) { + schema.required = _required; + } else { + schema.required = existingModel.required; } - - schema.required = existingModel.required; swagger.definitions[name] = schema; } }; @@ -3725,6 +6461,12 @@ SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, opts, ca _opts.responseInterceptor = opts.responseInterceptor; } + var swaggerRequestHeaders = 'application/json'; + + if(opts && opts.swaggerRequestHeaders) { + swaggerRequestHeaders = opts.swaggerRequestHeaders; + } + if(expectedCount === 0) { this.finish(callback, swagger); } @@ -3743,9 +6485,10 @@ SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, opts, ca } var http = { url: absolutePath, - headers: {accept: 'application/json'}, + headers: { accept: swaggerRequestHeaders }, on: {}, - method: 'get' + method: 'get', + timeout: opts.timeout }; /* jshint ignore:start */ http.on.response = function(data) { @@ -3787,7 +6530,7 @@ SwaggerSpecConverter.prototype.getAbsolutePath = function(version, docLocation, } var location = docLocation; - if(path.indexOf('http://') === 0 || path.indexOf('https://') === 0) { + if(path.indexOf('http:') === 0 || path.indexOf('https:') === 0) { location = path; } else { @@ -3805,7 +6548,9 @@ SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) { var name; for(name in obj.authorizations) { var isValid = false; - var securityDefinition = {}; + var securityDefinition = { + vendorExtensions: {} + }; var definition = obj.authorizations[name]; if(definition.type === 'apiKey') { securityDefinition.type = 'apiKey'; @@ -3896,9 +6641,10 @@ SwaggerSpecConverter.prototype.finish = function (callback, obj) { callback(obj); }; -},{"./http":5,"lodash-compat/lang/isObject":148}],9:[function(require,module,exports){ +},{"./http":5,"lodash-compat/lang/isObject":144}],9:[function(require,module,exports){ 'use strict'; +var log = require('../helpers').log; var _ = { isPlainObject: require('lodash-compat/lang/isPlainObject'), isString: require('lodash-compat/lang/isString'), @@ -3911,7 +6657,7 @@ var Model = module.exports = function (name, definition, models, modelPropertyMa this.definition = definition || {}; this.isArray = definition.type === 'array'; this.models = models || {}; - this.name = definition.title || name || 'Inline Model'; + this.name = name || definition.title || 'Inline Model'; this.modelPropertyMacro = modelPropertyMacro || function (property) { return property.default; }; @@ -3919,6 +6665,7 @@ var Model = module.exports = function (name, definition, models, modelPropertyMa return this; }; +// Note! This function will be removed in 2.2.x! Model.prototype.createJSONSample = Model.prototype.getSampleValue = function (modelsToIgnore) { modelsToIgnore = modelsToIgnore || {}; @@ -3942,7 +6689,7 @@ Model.prototype.getMockSignature = function () { return SchemaMarkup.schemaToHTML(this.name, this.definition, this.models, this.modelPropertyMacro); }; -},{"../schema-markup.js":7,"js-yaml":20,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isString":150}],10:[function(require,module,exports){ +},{"../helpers":4,"../schema-markup.js":7,"js-yaml":19,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isString":146}],10:[function(require,module,exports){ 'use strict'; var _ = { @@ -3966,6 +6713,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth this.client = parent.options.client || null; this.requestInterceptor = parent.options.requestInterceptor || null; this.responseInterceptor = parent.options.responseInterceptor || null; + this.requestAgent = parent.options.requestAgent; } this.authorizations = args.security; this.basePath = parent.basePath || '/'; @@ -3974,7 +6722,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth this.produces = args.produces || parent.produces || ['application/json']; this.deprecated = args.deprecated; this.description = args.description; - this.host = parent.host || 'localhost'; + this.host = parent.host; this.method = (httpMethod || errors.push('Operation ' + operationId + ' is missing method.')); this.models = models || {}; this.nickname = (operationId || errors.push('Operations must have a nickname.')); @@ -3986,17 +6734,34 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth this.responses = (args.responses || {}); this.scheme = scheme || parent.scheme || 'http'; this.schemes = args.schemes || parent.schemes; - this.security = args.security; + this.security = args.security || parent.security; this.summary = args.summary || ''; + this.timeout = parent.timeout; this.type = null; this.useJQuery = parent.useJQuery; + this.jqueryAjaxCache = parent.jqueryAjaxCache; this.enableCookies = parent.enableCookies; + + var key; + + if(!this.host) { + if(typeof window !== 'undefined') { + this.host = window.location.host; + } + else { + this.host = 'localhost'; + } + } this.parameterMacro = parent.parameterMacro || function (operation, parameter) { return parameter.default; }; this.inlineModels = []; + if(this.basePath !== '/' && this.basePath.slice(-1) === '/') { + this.basePath = this.basePath.slice(0, -1); + } + if (typeof this.deprecated === 'string') { switch(this.deprecated.toLowerCase()) { case 'true': case 'yes': case '1': { @@ -4017,8 +6782,6 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth if (definitions) { // add to global models - var key; - for (key in definitions) { model = new Model(key, definitions[key], this.models, parent.modelPropertyMacro); @@ -4032,7 +6795,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth } for (i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; + var d, param = this.parameters[i]; // Allow macro to set the default value param.default = this.parameterMacro(this, param); @@ -4040,10 +6803,6 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth if (param.type === 'array') { param.isList = true; param.allowMultiple = true; - // the enum can be defined at the items level - //if (param.items && param.items.enum) { - // param['enum'] = param.items.enum; - //} } var innerType = this.getType(param); @@ -4054,26 +6813,31 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth param['enum'] = [true, false]; // use actual primitives } + for(key in param) { + helpers.extractExtensions(key, param); + } if(typeof param['x-example'] !== 'undefined') { - var d = param['x-example']; + d = param['x-example']; param.default = d; } if(param['x-examples']) { - var d = param['x-examples'].default; + d = param['x-examples'].default; if(typeof d !== 'undefined') { param.default = d; } } - if (typeof param['enum'] !== 'undefined') { + var enumValues = param['enum'] || (param.items && param.items['enum']); + + if (typeof enumValues !== 'undefined') { var id; param.allowableValues = {}; param.allowableValues.values = []; param.allowableValues.descriptiveValues = []; - for (id = 0; id < param['enum'].length; id++) { - var value = param['enum'][id]; + for (id = 0; id < enumValues.length; id++) { + var value = enumValues[id]; var isDefault = (value === param.default || value+'' === param.default); param.allowableValues.values.push(value); @@ -4092,12 +6856,13 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth } } + param.modelSignature = {type: innerType, definitions: this.models}; param.signature = this.getModelSignature(innerType, this.models).toString(); param.sampleJSON = this.getModelSampleJSON(innerType, this.models); param.responseClassSignature = param.signature; } - var defaultResponseCode, response, responses = this.responses; + var keyname, defaultResponseCode, response, responses = this.responses; if (responses['200']) { response = responses['200']; @@ -4125,6 +6890,30 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth defaultResponseCode = 'default'; } + for(keyname in responses) { + helpers.extractExtensions(keyname, responses); + if(typeof keyname === 'string' && keyname.indexOf('x-') === -1) { + var responseObject = responses[keyname]; + if(typeof responseObject === 'object' && typeof responseObject.headers === 'object') { + var headers = responseObject.headers; + for(var headerName in headers) { + var header = headers[headerName]; + if(typeof header === 'object') { + for(var headerKey in header) { + helpers.extractExtensions(headerKey, header); + } + } + } + } + } + } + + if (response) { + for(keyname in response) { + helpers.extractExtensions(keyname, response); + } + } + if (response && response.schema) { var resolvedModel = this.resolveModel(response.schema, definitions); var successResponse; @@ -4145,6 +6934,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth } if (successResponse) { + successResponse.vendorExtensions = response.vendorExtensions; // Attach response properties if (response.description) { successResponse.description = response.description; @@ -4367,48 +7157,59 @@ Operation.prototype.supportedSubmitMethods = function () { Operation.prototype.getHeaderParams = function (args) { var headers = this.setContentTypes(args, {}); + var headerParamsByLowerCase = {}; for (var i = 0; i < this.parameters.length; i++) { var param = this.parameters[i]; - if (typeof args[param.name] !== 'undefined') { - if (param.in === 'header') { - var value = args[param.name]; + if (param.in === 'header') { + headerParamsByLowerCase[param.name.toLowerCase()] = param; + } + } - if (Array.isArray(value)) { - value = value.toString(); - } + for (var arg in args) { + var headerParam = headerParamsByLowerCase[arg.toLowerCase()]; + if (typeof headerParam !== 'undefined') { + var value = args[arg]; - headers[param.name] = value; + if (Array.isArray(value)) { + value = value.toString(); } + + headers[headerParam.name] = value; } } return headers; }; -Operation.prototype.urlify = function (args) { +Operation.prototype.urlify = function (args, maskPasswords) { var formParams = {}; - var requestUrl = this.path; + var requestUrl = this.path.replace(/#.*/, ''); // remove URL fragment var querystring = ''; // grab params from the args, build the querystring along the way for (var i = 0; i < this.parameters.length; i++) { var param = this.parameters[i]; if (typeof args[param.name] !== 'undefined') { + var isPassword; + if(param.type === 'string' && param.format === 'password' && maskPasswords) { + isPassword = true; + } + if (param.in === 'path') { var reg = new RegExp('\{' + param.name + '\}', 'gi'); var value = args[param.name]; if (Array.isArray(value)) { - value = this.encodePathCollection(param.collectionFormat, param.name, value); + value = this.encodePathCollection(param.collectionFormat, param.name, value, isPassword); } else { - value = this.encodePathParam(value); + value = this.encodePathParam(value, isPassword); } requestUrl = requestUrl.replace(reg, value); } else if (param.in === 'query' && typeof args[param.name] !== 'undefined') { - if (querystring === '') { + if (querystring === '' && requestUrl.indexOf('?') < 0) { querystring += '?'; } else { querystring += '&'; @@ -4418,12 +7219,12 @@ Operation.prototype.urlify = function (args) { var qp = args[param.name]; if (Array.isArray(qp)) { - querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp); + querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp, isPassword); } else { - querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]); + querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name], isPassword); } } else { - querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]); + querystring += this.encodeQueryKey(param.name) + '=' + this.encodeQueryParam(args[param.name], isPassword); } } else if (param.in === 'formData') { formParams[param.name] = args[param.name]; @@ -4456,16 +7257,24 @@ Operation.prototype.getMissingParams = function (args) { }; Operation.prototype.getBody = function (headers, args, opts) { - var formParams = {}, hasFormParams, body, key, value, hasBody = false; + var formParams = {}, hasFormParams, param, body, key, value, hasBody = false; // look at each param and put form params in an object for (var i = 0; i < this.parameters.length; i++) { - var param = this.parameters[i]; + param = this.parameters[i]; if (typeof args[param.name] !== 'undefined') { + var isPassword; + if(param.type === 'string' && param.format === 'password') { + isPassword = 'password'; + } if (param.in === 'body') { body = args[param.name]; } else if (param.in === 'formData') { - formParams[param.name] = args[param.name]; + formParams[param.name] = { + param: param, + value: args[param.name], + password: isPassword + }; hasFormParams = true; } } @@ -4494,41 +7303,111 @@ Operation.prototype.getBody = function (headers, args, opts) { var encoded = ''; for (key in formParams) { - value = formParams[key]; + param = formParams[key].param; + value = formParams[key].value; + var password; + + if(opts && opts.maskPasswords) { + password = formParams[key].password; + } if (typeof value !== 'undefined') { - if (encoded !== '') { - encoded += '&'; + if (Array.isArray(value)) { + if (encoded !== '') { + encoded += '&'; + } + encoded += this.encodeQueryCollection(param.collectionFormat, key, value, password); } + else { + if (encoded !== '') { + encoded += '&'; + } - encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value); + encoded += encodeURIComponent(key) + '=' + mask(encodeURIComponent(value), password); + } } } body = encoded; } else if (isMultiPart) { - if (opts.useJQuery) { - var bodyParam = new FormData(); + var bodyParam; + if (typeof FormData === 'function') { + bodyParam = new FormData(); bodyParam.type = 'formData'; for (key in formParams) { + param = formParams[key].param; value = args[key]; if (typeof value !== 'undefined') { - // required for jquery file upload - if (value.type === 'file' && value.value) { - delete headers['Content-Type']; - + if({}.toString.apply(value) === '[object File]') { + bodyParam.append(key, value); + } + else if (value.type === 'file' && value.value) { bodyParam.append(key, value.value); } else { - bodyParam.append(key, value); + if (Array.isArray(value)) { + if(param.collectionFormat === 'multi') { + bodyParam.delete(key); + for(var v in value) { + bodyParam.append(key, value[v]); + } + } + else { + bodyParam.append(key, this.encodeQueryCollection(param.collectionFormat, key, value).split('=').slice(1).join('=')); + } + } + else { + bodyParam.append(key, value); + } } } } - body = bodyParam; } + else { + bodyParam = {}; + for (key in formParams) { + value = args[key]; + if (Array.isArray(value)) { + var delimeter; + var format = param.collectionFormat || 'multi'; + if(format === 'ssv') { + delimeter = ' '; + } + else if(format === 'pipes') { + delimeter = '|'; + } + else if(format === 'tsv') { + delimeter = '\t'; + } + else if(format === 'multi') { + bodyParam[key] = value; + break; + } + else { + delimeter = ','; + } + var data; + value.forEach(function(v) { + if(data) { + data += delimeter; + } + else { + data = ''; + } + data += v; + }); + bodyParam[key] = data; + } + else { + bodyParam[key] = value; + } + } + body = bodyParam; + } + headers['Content-Type'] = 'multipart/form-data'; } return body; @@ -4588,7 +7467,7 @@ Operation.prototype.do = function (args, opts, callback, error, parent) { **/ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { var args = arg1 || {}; - var opts = {}, success, error, deferred; + var opts = {}, success, error, deferred, timeout; if (_.isObject(arg2)) { opts = arg2; @@ -4596,10 +7475,16 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { error = arg4; } + timeout = typeof opts.timeout !== 'undefined' ? opts.timeout : this.timeout; + if(this.client) { opts.client = this.client; } + if(this.requestAgent) { + opts.requestAgent = this.requestAgent; + } + // add the request interceptor from parent, if none sent from client if(!opts.requestInterceptor && this.requestInterceptor ) { opts.requestInterceptor = this.requestInterceptor ; @@ -4621,11 +7506,14 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { error = (error || this.parent.defaultErrorCallback || helpers.log); } - if (typeof opts.useJQuery === 'undefined') { opts.useJQuery = this.useJQuery; } + if (typeof opts.jqueryAjaxCache === 'undefined') { + opts.jqueryAjaxCache = this.jqueryAjaxCache; + } + if (typeof opts.enableCookies === 'undefined') { opts.enableCookies = this.enableCookies; } @@ -4654,7 +7542,7 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; } var body = this.getBody(contentTypeHeaders, args, opts); - var url = this.urlify(args); + var url = this.urlify(args, opts.maskPasswords); if(url.indexOf('.{format}') > 0) { if(headers) { @@ -4674,8 +7562,12 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { body: body, enableCookies: opts.enableCookies, useJQuery: opts.useJQuery, + jqueryAjaxCache: opts.jqueryAjaxCache, deferred: deferred, headers: headers, + clientAuthorizations: opts.clientAuthorizations, + operation: this, + connectionAgent: this.connectionAgent, on: { response: function (response) { if (deferred) { @@ -4696,6 +7588,10 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) { } }; + if (timeout) { + obj.timeout = timeout; + } + this.clientAuthorizations.apply(obj, this.operation.security); if (opts.mock === true) { return obj; @@ -4755,18 +7651,32 @@ Operation.prototype.setContentTypes = function (args, opts) { } // if there's a body, need to set the consumes header via requestContentType + var hasBody = body || definedFileParams.length || definedFormParams.length; if (this.method === 'post' || this.method === 'put' || this.method === 'patch' || - ((this.method === 'delete' || this.method === 'get') && body) ) { + ((this.method === 'delete' || this.method === 'get') && hasBody)) { if (opts.requestContentType) { consumes = opts.requestContentType; } // if any form params, content type must be set if (definedFormParams.length > 0) { + consumes = undefined; if (opts.requestContentType) { // override if set consumes = opts.requestContentType; } else if (definedFileParams.length > 0) { // if a file, must be multipart/form-data consumes = 'multipart/form-data'; - } else { // default to x-www-from-urlencoded + } else { + if (this.consumes && this.consumes.length > 0) { + // use the consumes setting + for(var c in this.consumes) { + var chk = this.consumes[c]; + if(chk.indexOf('application/x-www-form-urlencoded') === 0 || chk.indexOf('multipart/form-data') === 0) { + consumes = chk; + } + } + } + } + if(typeof consumes === 'undefined') { + // default to x-www-from-urlencoded consumes = 'application/x-www-form-urlencoded'; } } @@ -4788,6 +7698,9 @@ Operation.prototype.setContentTypes = function (args, opts) { if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded')) { headers['Content-Type'] = consumes; } + else if(this.consumes && this.consumes.length > 0 && this.consumes[0] === 'application/x-www-form-urlencoded') { + headers['Content-Type'] = this.consumes[0]; + } if (accepts) { headers.Accept = accepts; @@ -4811,7 +7724,7 @@ Operation.prototype.matchesAccept = function(accepts) { }; Operation.prototype.asCurl = function (args1, args2) { - var opts = {mock: true}; + var opts = {mock: true, maskPasswords: true}; if (typeof args2 === 'object') { for (var argKey in args2) { opts[argKey] = args2[argKey]; @@ -4836,23 +7749,87 @@ Operation.prototype.asCurl = function (args1, args2) { results.push('--header \'' + key + ': ' + value + '\''); } } + var isFormData = false; + var isMultipart = false; + + var type = obj.headers['Content-Type']; + if(type && type.indexOf('application/x-www-form-urlencoded') === 0) { + isFormData = true; + } + else if (type && type.indexOf('multipart/form-data') === 0) { + isFormData = true; + isMultipart = true; + } if (obj.body) { var body; - if (_.isObject(obj.body)) { - body = JSON.stringify(obj.body); + if(isMultipart) { + isMultipart = true; + // add the form data + for(var i = 0; i < this.parameters.length; i++) { + var parameter = this.parameters[i]; + if(parameter.in === 'formData') { + if (!body) { + body = ''; + } + + var paramValue; + if(typeof FormData === 'function' && obj.body instanceof FormData) { + paramValue = obj.body.getAll(parameter.name); + } + else { + paramValue = obj.body[parameter.name]; + } + if (paramValue) { + if (parameter.type === 'file') { + if(paramValue.name) { + body += '-F ' + parameter.name + '=@"' + paramValue.name + '" '; + } + } + else { + if (Array.isArray(paramValue)) { + if(parameter.collectionFormat === 'multi') { + for(var v in paramValue) { + body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + mask(paramValue[v], parameter.format) + ' '; + } + } + else { + body += '-F ' + this.encodeQueryCollection(parameter.collectionFormat, parameter.name, mask(paramValue, parameter.format)) + ' '; + } + } else { + body += '-F ' + this.encodeQueryKey(parameter.name) + '=' + mask(paramValue, parameter.format) + ' '; + } + } + } + } + } + } + if(!body) { + body = JSON.stringify(obj.body); + } } else { body = obj.body; } + // escape @ => %40, ' => %27 + body = body.replace(/\'/g, '%27').replace(/\n/g, ' \\ \n '); - results.push('-d \'' + body.replace(/\'/g, '\\u0027') + '\''); + if(!isFormData) { + // escape & => %26 + body = body.replace(/&/g, '%26'); + } + if(isMultipart) { + results.push(body); + } + else { + results.push('-d \'' + body.replace(/@/g, '%40') + '\''); + } } return 'curl ' + (results.join(' ')) + ' \'' + obj.url + '\''; }; -Operation.prototype.encodePathCollection = function (type, name, value) { +Operation.prototype.encodePathCollection = function (type, name, value, maskPasswords) { var encoded = ''; var i; var separator = ''; @@ -4860,7 +7837,7 @@ Operation.prototype.encodePathCollection = function (type, name, value) { if (type === 'ssv') { separator = '%20'; } else if (type === 'tsv') { - separator = '\\t'; + separator = '%09'; } else if (type === 'pipes') { separator = '|'; } else { @@ -4869,24 +7846,25 @@ Operation.prototype.encodePathCollection = function (type, name, value) { for (i = 0; i < value.length; i++) { if (i === 0) { - encoded = this.encodeQueryParam(value[i]); + encoded = this.encodeQueryParam(value[i], maskPasswords); } else { - encoded += separator + this.encodeQueryParam(value[i]); + encoded += separator + this.encodeQueryParam(value[i], maskPasswords); } } return encoded; }; -Operation.prototype.encodeQueryCollection = function (type, name, value) { +Operation.prototype.encodeQueryCollection = function (type, name, value, maskPasswords) { var encoded = ''; var i; + type = type || 'default'; if (type === 'default' || type === 'multi') { for (i = 0; i < value.length; i++) { if (i > 0) {encoded += '&';} - encoded += this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]); + encoded += this.encodeQueryKey(name) + '=' + mask(this.encodeQueryParam(value[i]), maskPasswords); } } else { var separator = ''; @@ -4896,7 +7874,7 @@ Operation.prototype.encodeQueryCollection = function (type, name, value) { } else if (type === 'ssv') { separator = '%20'; } else if (type === 'tsv') { - separator = '\\t'; + separator = '%09'; } else if (type === 'pipes') { separator = '|'; } else if (type === 'brackets') { @@ -4904,15 +7882,14 @@ Operation.prototype.encodeQueryCollection = function (type, name, value) { if (i !== 0) { encoded += '&'; } - - encoded += this.encodeQueryParam(name) + '[]=' + this.encodeQueryParam(value[i]); + encoded += this.encodeQueryKey(name) + '[]=' + mask(this.encodeQueryParam(value[i]), maskPasswords); } } if (separator !== '') { for (i = 0; i < value.length; i++) { if (i === 0) { - encoded = this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]); + encoded = this.encodeQueryKey(name) + '=' + this.encodeQueryParam(value[i]); } else { encoded += separator + this.encodeQueryParam(value[i]); } @@ -4923,18 +7900,32 @@ Operation.prototype.encodeQueryCollection = function (type, name, value) { return encoded; }; -Operation.prototype.encodeQueryParam = function (arg) { +Operation.prototype.encodeQueryKey = function (arg) { + return encodeURIComponent(arg) + .replace('%5B','[').replace('%5D', ']').replace('%24', '$'); +}; + +Operation.prototype.encodeQueryParam = function (arg, maskPasswords) { + if(maskPasswords) { + return "******"; + } return encodeURIComponent(arg); }; /** * TODO revisit, might not want to leave '/' **/ -Operation.prototype.encodePathParam = function (pathParam) { - return encodeURIComponent(pathParam); +Operation.prototype.encodePathParam = function (pathParam, maskPasswords) { + return encodeURIComponent(pathParam, maskPasswords); }; -},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isEmpty":145,"lodash-compat/lang/isObject":148,"lodash-compat/lang/isUndefined":152,"q":161}],11:[function(require,module,exports){ +var mask = function(value, format) { + if(typeof format === 'string' && format === 'password') { + return '******'; + } + return value; +} +},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isUndefined":148,"q":157}],11:[function(require,module,exports){ 'use strict'; var OperationGroup = module.exports = function (tag, description, externalDocs, operation) { @@ -4953,8 +7944,6 @@ OperationGroup.prototype.sort = function () { },{}],12:[function(require,module,exports){ - -},{}],13:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -5014,7 +8003,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],14:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ (function (Buffer){ (function () { "use strict"; @@ -5036,8 +8025,8 @@ process.umask = function() { return 0; }; }()); }).call(this,require("buffer").Buffer) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uICgpIHtcbiAgXCJ1c2Ugc3RyaWN0XCI7XG5cbiAgZnVuY3Rpb24gYnRvYShzdHIpIHtcbiAgICB2YXIgYnVmZmVyXG4gICAgICA7XG5cbiAgICBpZiAoc3RyIGluc3RhbmNlb2YgQnVmZmVyKSB7XG4gICAgICBidWZmZXIgPSBzdHI7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJ1ZmZlciA9IG5ldyBCdWZmZXIoc3RyLnRvU3RyaW5nKCksICdiaW5hcnknKTtcbiAgICB9XG5cbiAgICByZXR1cm4gYnVmZmVyLnRvU3RyaW5nKCdiYXNlNjQnKTtcbiAgfVxuXG4gIG1vZHVsZS5leHBvcnRzID0gYnRvYTtcbn0oKSk7XG4iXX0= -},{"buffer":15}],15:[function(require,module,exports){ + +},{"buffer":14}],14:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -6572,7 +9561,7 @@ function blitBuffer (src, dst, offset, length) { return i } -},{"base64-js":16,"ieee754":17,"is-array":18}],16:[function(require,module,exports){ +},{"base64-js":15,"ieee754":16,"is-array":17}],15:[function(require,module,exports){ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; ;(function (exports) { @@ -6698,7 +9687,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; exports.fromByteArray = uint8ToBase64 }(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) -},{}],17:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -6784,7 +9773,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],18:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ /** * isArray @@ -6819,7 +9808,7 @@ module.exports = isArray || function (val) { return !! val && '[object Array]' == str.call(val); }; -},{}],19:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ /* jshint node: true */ (function () { "use strict"; @@ -7082,7 +10071,7 @@ module.exports = isArray || function (val) { }; }()); -},{}],20:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ 'use strict'; @@ -7091,7 +10080,7 @@ var yaml = require('./lib/js-yaml.js'); module.exports = yaml; -},{"./lib/js-yaml.js":21}],21:[function(require,module,exports){ +},{"./lib/js-yaml.js":20}],20:[function(require,module,exports){ 'use strict'; @@ -7132,26 +10121,24 @@ module.exports.parse = deprecated('parse'); module.exports.compose = deprecated('compose'); module.exports.addConstructor = deprecated('addConstructor'); -},{"./js-yaml/dumper":23,"./js-yaml/exception":24,"./js-yaml/loader":25,"./js-yaml/schema":27,"./js-yaml/schema/core":28,"./js-yaml/schema/default_full":29,"./js-yaml/schema/default_safe":30,"./js-yaml/schema/failsafe":31,"./js-yaml/schema/json":32,"./js-yaml/type":33}],22:[function(require,module,exports){ +},{"./js-yaml/dumper":22,"./js-yaml/exception":23,"./js-yaml/loader":24,"./js-yaml/schema":26,"./js-yaml/schema/core":27,"./js-yaml/schema/default_full":28,"./js-yaml/schema/default_safe":29,"./js-yaml/schema/failsafe":30,"./js-yaml/schema/json":31,"./js-yaml/type":32}],21:[function(require,module,exports){ 'use strict'; function isNothing(subject) { - return (typeof subject === 'undefined') || (null === subject); + return (typeof subject === 'undefined') || (subject === null); } function isObject(subject) { - return (typeof subject === 'object') && (null !== subject); + return (typeof subject === 'object') && (subject !== null); } function toArray(sequence) { - if (Array.isArray(sequence)) { - return sequence; - } else if (isNothing(sequence)) { - return []; - } + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [ sequence ]; } @@ -7184,7 +10171,7 @@ function repeat(string, count) { function isNegativeZero(number) { - return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number); + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); } @@ -7195,7 +10182,7 @@ module.exports.repeat = repeat; module.exports.isNegativeZero = isNegativeZero; module.exports.extend = extend; -},{}],23:[function(require,module,exports){ +},{}],22:[function(require,module,exports){ 'use strict'; /*eslint-disable no-use-before-define*/ @@ -7210,7 +10197,6 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty; var CHAR_TAB = 0x09; /* Tab */ var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ var CHAR_SPACE = 0x20; /* Space */ var CHAR_EXCLAMATION = 0x21; /* ! */ var CHAR_DOUBLE_QUOTE = 0x22; /* " */ @@ -7258,9 +10244,7 @@ var DEPRECATED_BOOLEANS_SYNTAX = [ function compileStyleMap(schema, map) { var result, keys, index, length, tag, style, type; - if (null === map) { - return {}; - } + if (map === null) return {}; result = {}; keys = Object.keys(map); @@ -7269,7 +10253,7 @@ function compileStyleMap(schema, map) { tag = keys[index]; style = String(map[tag]); - if ('!!' === tag.slice(0, 2)) { + if (tag.slice(0, 2) === '!!') { tag = 'tag:yaml.org,2002:' + tag.slice(2); } @@ -7307,13 +10291,15 @@ function encodeHex(character) { } function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; this.implicitTypes = this.schema.compiledImplicit; this.explicitTypes = this.schema.compiledExplicit; @@ -7325,6 +10311,7 @@ function State(options) { this.usedDuplicates = null; } +// Indents every line in a string. Empty lines (\n only) are not indented. function indentString(string, spaces) { var ind = common.repeat(' ', spaces), position = 0, @@ -7342,9 +10329,9 @@ function indentString(string, spaces) { line = string.slice(position, next + 1); position = next + 1; } - if (line.length && line !== '\n') { - result += ind; - } + + if (line.length && line !== '\n') result += ind; + result += line; } @@ -7369,347 +10356,310 @@ function testImplicitResolving(state, str) { return false; } -function StringBuilder(source) { - this.source = source; - this.result = ''; - this.checkpoint = 0; +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; } -StringBuilder.prototype.takeUpTo = function (position) { - var er; - - if (position < this.checkpoint) { - er = new Error('position should be > checkpoint'); - er.position = position; - er.checkpoint = this.checkpoint; - throw er; - } - - this.result += this.source.slice(this.checkpoint, position); - this.checkpoint = position; - return this; -}; - -StringBuilder.prototype.escapeChar = function () { - var character, esc; - - character = this.source.charCodeAt(this.checkpoint); - esc = ESCAPE_SEQUENCES[character] || encodeHex(character); - this.result += esc; - this.checkpoint += 1; - - return this; -}; - -StringBuilder.prototype.finish = function () { - if (this.source.length > this.checkpoint) { - this.takeUpTo(this.source.length); - } -}; - -function writeScalar(state, object, level, iskey) { - var simple, first, spaceWrap, folded, literal, single, double, - sawLineFeed, linePosition, longestLine, indent, max, character, - position, escapeSeq, hexEsc, previous, lineLength, modifier, - trailingLineBreaks, result; - - if (0 === object.length) { - state.dump = "''"; - return; - } - - if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { - state.dump = "'" + object + "'"; - return; - } - - simple = true; - first = object.length ? object.charCodeAt(0) : 0; - spaceWrap = (CHAR_SPACE === first || - CHAR_SPACE === object.charCodeAt(object.length - 1)); - - // Simplified check for restricted first characters - // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29 - if (CHAR_MINUS === first || - CHAR_QUESTION === first || - CHAR_COMMERCIAL_AT === first || - CHAR_GRAVE_ACCENT === first) { - simple = false; - } - - // can only use > and | if not wrapped in spaces or is not a key. - if (spaceWrap) { - simple = false; - folded = false; - literal = false; - } else { - folded = !iskey; - literal = !iskey; - } - - single = true; - double = new StringBuilder(object); - - sawLineFeed = false; - linePosition = 0; - longestLine = 0; - - indent = state.indent * level; - max = state.lineWidth; - if (max === -1) { - // Replace -1 with biggest ingeger number according to - // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5 - max = 9007199254740991; - } - - if (indent < 40) { - max -= indent; - } else { - max = 40; - } - - for (position = 0; position < object.length; position++) { - character = object.charCodeAt(position); - if (simple) { - // Characters that can never appear in the simple scalar - if (!simpleChar(character)) { - simple = false; - } else { - // Still simple. If we make it all the way through like - // this, then we can just dump the string as-is. - continue; - } - } - - if (single && character === CHAR_SINGLE_QUOTE) { - single = false; - } - - escapeSeq = ESCAPE_SEQUENCES[character]; - hexEsc = needsHexEscape(character); - - if (!escapeSeq && !hexEsc) { - continue; - } - - if (character !== CHAR_LINE_FEED && - character !== CHAR_DOUBLE_QUOTE && - character !== CHAR_SINGLE_QUOTE) { - folded = false; - literal = false; - } else if (character === CHAR_LINE_FEED) { - sawLineFeed = true; - single = false; - if (position > 0) { - previous = object.charCodeAt(position - 1); - if (previous === CHAR_SPACE) { - literal = false; - folded = false; - } - } - if (folded) { - lineLength = position - linePosition; - linePosition = position; - if (lineLength > longestLine) { - longestLine = lineLength; - } - } - } - - if (character !== CHAR_DOUBLE_QUOTE) { - single = false; - } - - double.takeUpTo(position); - double.escapeChar(); - } - - if (simple && testImplicitResolving(state, object)) { - simple = false; - } - - modifier = ''; - if (folded || literal) { - trailingLineBreaks = 0; - if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - } - } - - if (trailingLineBreaks === 0) { - modifier = '-'; - } else if (trailingLineBreaks === 2) { - modifier = '+'; - } - } - - if (literal && longestLine < max) { - folded = false; - } - - // If it's literally one line, then don't bother with the literal. - // We may still want to do a fold, though, if it's a super long line. - if (!sawLineFeed) { - literal = false; - } - - if (simple) { - state.dump = object; - } else if (single) { - state.dump = '\'' + object + '\''; - } else if (folded) { - result = fold(object, max); - state.dump = '>' + modifier + '\n' + indentString(result, indent); - } else if (literal) { - if (!modifier) { - object = object.replace(/\n$/, ''); - } - state.dump = '|' + modifier + '\n' + indentString(object, indent); - } else if (double) { - double.finish(); - state.dump = '"' + double.result + '"'; - } else { - throw new Error('Failed to dump scalar value'); - } - - return; +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); } -// The `trailing` var is a regexp match of any trailing `\n` characters. -// -// There are three cases we care about: -// -// 1. One trailing `\n` on the string. Just use `|` or `>`. -// This is the assumed default. (trailing = null) -// 2. No trailing `\n` on the string. Use `|-` or `>-` to "chomp" the end. -// 3. More than one trailing `\n` on the string. Use `|+` or `>+`. -// -// In the case of `>+`, these line breaks are *not* doubled (like the line -// breaks within the string), so it's important to only end with the exact -// same number as we started. -function fold(object, max) { - var result = '', - position = 0, - length = object.length, - trailing = /\n+$/.exec(object), - newLine; +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} - if (trailing) { - length = trailing.index + 1; - } +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} - while (position < length) { - newLine = object.indexOf('\n', position); - if (newLine > length || newLine === -1) { - if (result) { - result += '\n\n'; +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; } - result += foldLine(object.slice(position, length), max); - position = length; - } else { - if (result) { - result += '\n\n'; - } - result += foldLine(object.slice(position, newLine), max); - position = newLine + 1; + plain = plain && isPlainSafe(char); } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); } - if (trailing && trailing[0] !== '\n') { - result += trailing[0]; + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (string[0] === ' ' && indentPerLevel > 9) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; } return result; } -function foldLine(line, max) { - if (line === '') { - return line; - } +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; - var foldRe = /[^\s] [^\s]/g, - result = '', - prevMatch = 0, - foldStart = 0, - match = foldRe.exec(line), - index, - foldEnd, - folded; + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; - while (match) { - index = match.index; - - // when we cross the max len, if the previous match would've - // been ok, use that one, and carry on. If there was no previous - // match on this fold section, then just have a long line. - if (index - foldStart > max) { - if (prevMatch !== foldStart) { - foldEnd = prevMatch; - } else { - foldEnd = index; - } - - if (result) { - result += '\n'; - } - folded = line.slice(foldStart, foldEnd); - result += folded; - foldStart = foldEnd + 1; + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 } - prevMatch = index + 1; - match = foldRe.exec(line); + curr = next; } - if (result) { - result += '\n'; - } - - // if we end up with one last word at the end, then the last bit might - // be slightly bigger than we wanted, because we exited out of the loop. - if (foldStart !== prevMatch && line.length - foldStart > max) { - result += line.slice(foldStart, prevMatch) + '\n' + - line.slice(prevMatch + 1); + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); } else { - result += line.slice(foldStart); + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); } return result; } -// Returns true if character can be found in a simple scalar -function simpleChar(character) { - return CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character && - CHAR_COMMA !== character && - CHAR_LEFT_SQUARE_BRACKET !== character && - CHAR_RIGHT_SQUARE_BRACKET !== character && - CHAR_LEFT_CURLY_BRACKET !== character && - CHAR_RIGHT_CURLY_BRACKET !== character && - CHAR_SHARP !== character && - CHAR_AMPERSAND !== character && - CHAR_ASTERISK !== character && - CHAR_EXCLAMATION !== character && - CHAR_VERTICAL_LINE !== character && - CHAR_GREATER_THAN !== character && - CHAR_SINGLE_QUOTE !== character && - CHAR_DOUBLE_QUOTE !== character && - CHAR_PERCENT !== character && - CHAR_COLON !== character && - !ESCAPE_SEQUENCES[character] && - !needsHexEscape(character); -} - -// Returns true if the character code needs to be escaped. -function needsHexEscape(character) { - return !((0x00020 <= character && character <= 0x00007E) || - (0x00085 === character) || - (0x000A0 <= character && character <= 0x00D7FF) || - (0x0E000 <= character && character <= 0x00FFFD) || - (0x10000 <= character && character <= 0x10FFFF)); -} - function writeFlowSequence(state, level, object) { var _result = '', _tag = state.tag, @@ -7719,9 +10669,7 @@ function writeFlowSequence(state, level, object) { for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level, object[index], false, false)) { - if (0 !== index) { - _result += ', '; - } + if (index !== 0) _result += ', '; _result += state.dump; } } @@ -7739,7 +10687,7 @@ function writeBlockSequence(state, level, object, compact) { for (index = 0, length = object.length; index < length; index += 1) { // Write only valid elements. if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || 0 !== index) { + if (!compact || index !== 0) { _result += generateNextLine(state, level); } _result += '- ' + state.dump; @@ -7763,9 +10711,7 @@ function writeFlowMapping(state, level, object) { for (index = 0, length = objectKeyList.length; index < length; index += 1) { pairBuffer = ''; - if (0 !== index) { - pairBuffer += ', '; - } + if (index !== 0) pairBuffer += ', '; objectKey = objectKeyList[index]; objectValue = object[objectKey]; @@ -7774,9 +10720,7 @@ function writeFlowMapping(state, level, object) { continue; // Skip this pair because of invalid key; } - if (state.dump.length > 1024) { - pairBuffer += '? '; - } + if (state.dump.length > 1024) pairBuffer += '? '; pairBuffer += state.dump + ': '; @@ -7820,7 +10764,7 @@ function writeBlockMapping(state, level, object, compact) { for (index = 0, length = objectKeyList.length; index < length; index += 1) { pairBuffer = ''; - if (!compact || 0 !== index) { + if (!compact || index !== 0) { pairBuffer += generateNextLine(state, level); } @@ -7831,7 +10775,7 @@ function writeBlockMapping(state, level, object, compact) { continue; // Skip this pair because of invalid key. } - explicitPair = (null !== state.tag && '?' !== state.tag) || + explicitPair = (state.tag !== null && state.tag !== '?') || (state.dump && state.dump.length > 1024); if (explicitPair) { @@ -7877,7 +10821,7 @@ function detectType(state, object, explicit) { type = typeList[index]; if ((type.instanceOf || type.predicate) && - (!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && (!type.predicate || type.predicate(object))) { state.tag = explicit ? type.tag : '?'; @@ -7885,7 +10829,7 @@ function detectType(state, object, explicit) { if (type.represent) { style = state.styleMap[type.tag] || type.defaultStyle; - if ('[object Function]' === _toString.call(type.represent)) { + if (_toString.call(type.represent) === '[object Function]') { _result = type.represent(object, style); } else if (_hasOwnProperty.call(type.represent, style)) { _result = type.represent[style](object, style); @@ -7917,10 +10861,10 @@ function writeNode(state, level, object, block, compact, iskey) { var type = _toString.call(state.dump); if (block) { - block = (0 > state.flowLevel || state.flowLevel > level); + block = (state.flowLevel < 0 || state.flowLevel > level); } - var objectOrArray = '[object Object]' === type || '[object Array]' === type, + var objectOrArray = type === '[object Object]' || type === '[object Array]', duplicateIndex, duplicate; @@ -7929,7 +10873,7 @@ function writeNode(state, level, object, block, compact, iskey) { duplicate = duplicateIndex !== -1; } - if ((null !== state.tag && '?' !== state.tag) || duplicate || (2 !== state.indent && level > 0)) { + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { compact = false; } @@ -7939,8 +10883,8 @@ function writeNode(state, level, object, block, compact, iskey) { if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { state.usedDuplicates[duplicateIndex] = true; } - if ('[object Object]' === type) { - if (block && (0 !== Object.keys(state.dump).length)) { + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { writeBlockMapping(state, level, state.dump, compact); if (duplicate) { state.dump = '&ref_' + duplicateIndex + state.dump; @@ -7951,8 +10895,8 @@ function writeNode(state, level, object, block, compact, iskey) { state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; } } - } else if ('[object Array]' === type) { - if (block && (0 !== state.dump.length)) { + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { writeBlockSequence(state, level, state.dump, compact); if (duplicate) { state.dump = '&ref_' + duplicateIndex + state.dump; @@ -7963,18 +10907,16 @@ function writeNode(state, level, object, block, compact, iskey) { state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; } } - } else if ('[object String]' === type) { - if ('?' !== state.tag) { + } else if (type === '[object String]') { + if (state.tag !== '?') { writeScalar(state, state.dump, level, iskey); } } else { - if (state.skipInvalid) { - return false; - } + if (state.skipInvalid) return false; throw new YAMLException('unacceptable kind of an object to dump ' + type); } - if (null !== state.tag && '?' !== state.tag) { + if (state.tag !== null && state.tag !== '?') { state.dump = '!<' + state.tag + '> ' + state.dump; } } @@ -8001,10 +10943,10 @@ function inspectNode(object, objects, duplicatesIndexes) { index, length; - if (null !== object && 'object' === typeof object) { + if (object !== null && typeof object === 'object') { index = objects.indexOf(object); - if (-1 !== index) { - if (-1 === duplicatesIndexes.indexOf(index)) { + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { duplicatesIndexes.push(index); } } else { @@ -8030,11 +10972,10 @@ function dump(input, options) { var state = new State(options); - getDuplicateReferences(input, state); + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - if (writeNode(state, 0, input, true, true)) { - return state.dump + '\n'; - } return ''; } @@ -8045,15 +10986,11 @@ function safeDump(input, options) { module.exports.dump = dump; module.exports.safeDump = safeDump; -},{"./common":22,"./exception":24,"./schema/default_full":29,"./schema/default_safe":30}],24:[function(require,module,exports){ +},{"./common":21,"./exception":23,"./schema/default_full":28,"./schema/default_safe":29}],23:[function(require,module,exports){ // YAML error class. http://stackoverflow.com/questions/8458984 // 'use strict'; - -var inherits = require('inherit'); - - function YAMLException(reason, mark) { // Super constructor Error.call(this); @@ -8075,7 +11012,8 @@ function YAMLException(reason, mark) { // Inherit from Error -inherits(YAMLException, Error); +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; YAMLException.prototype.toString = function toString(compact) { @@ -8093,7 +11031,7 @@ YAMLException.prototype.toString = function toString(compact) { module.exports = YAMLException; -},{"inherit":51}],25:[function(require,module,exports){ +},{}],24:[function(require,module,exports){ 'use strict'; /*eslint-disable max-len,no-use-before-define*/ @@ -8142,11 +11080,11 @@ function is_WS_OR_EOL(c) { } function is_FLOW_INDICATOR(c) { - return 0x2C/* , */ === c || - 0x5B/* [ */ === c || - 0x5D/* ] */ === c || - 0x7B/* { */ === c || - 0x7D/* } */ === c; + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; } function fromHexCode(c) { @@ -8227,6 +11165,8 @@ function State(input, options) { this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; this.onWarning = options['onWarning'] || null; this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; this.implicitTypes = this.schema.compiledImplicit; this.typeMap = this.schema.compiledTypeMap; @@ -8273,62 +11213,62 @@ var directiveHandlers = { YAML: function handleYamlDirective(state, name, args) { - var match, major, minor; + var match, major, minor; - if (null !== state.version) { - throwError(state, 'duplication of %YAML directive'); - } + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } - if (1 !== args.length) { - throwError(state, 'YAML directive accepts exactly one argument'); - } + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (null === match) { - throwError(state, 'ill-formed argument of the YAML directive'); - } + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); - if (1 !== major) { - throwError(state, 'unacceptable YAML version of the document'); - } + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } - state.version = args[0]; - state.checkLineBreaks = (minor < 2); + state.version = args[0]; + state.checkLineBreaks = (minor < 2); - if (1 !== minor && 2 !== minor) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, TAG: function handleTagDirective(state, name, args) { - var handle, prefix; + var handle, prefix; - if (2 !== args.length) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - state.tagMap[handle] = prefix; + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } }; @@ -8343,8 +11283,8 @@ function captureSegment(state, start, end, checkJson) { _position < _length; _position += 1) { _character = _result.charCodeAt(_position); - if (!(0x09 === _character || - 0x20 <= _character && _character <= 0x10FFFF)) { + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { throwError(state, 'expected valid JSON character'); } } @@ -8356,7 +11296,7 @@ function captureSegment(state, start, end, checkJson) { } } -function mergeMappings(state, destination, source) { +function mergeMappings(state, destination, source, overridableKeys) { var sourceKeys, key, index, quantity; if (!common.isObject(source)) { @@ -8370,29 +11310,36 @@ function mergeMappings(state, destination, source) { if (!_hasOwnProperty.call(destination, key)) { destination[key] = source[key]; + overridableKeys[key] = true; } } } -function storeMappingPair(state, _result, keyTag, keyNode, valueNode) { +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) { var index, quantity; keyNode = String(keyNode); - if (null === _result) { + if (_result === null) { _result = {}; } - if ('tag:yaml.org,2002:merge' === keyTag) { + if (keyTag === 'tag:yaml.org,2002:merge') { if (Array.isArray(valueNode)) { for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index]); + mergeMappings(state, _result, valueNode[index], overridableKeys); } } else { - mergeMappings(state, _result, valueNode); + mergeMappings(state, _result, valueNode, overridableKeys); } } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + throwError(state, 'duplicated mapping key'); + } _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; } return _result; @@ -8403,11 +11350,11 @@ function readLineBreak(state) { ch = state.input.charCodeAt(state.position); - if (0x0A/* LF */ === ch) { + if (ch === 0x0A/* LF */) { state.position++; - } else if (0x0D/* CR */ === ch) { + } else if (ch === 0x0D/* CR */) { state.position++; - if (0x0A/* LF */ === state.input.charCodeAt(state.position)) { + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { state.position++; } } else { @@ -8422,15 +11369,15 @@ function skipSeparationSpace(state, allowComments, checkIndent) { var lineBreaks = 0, ch = state.input.charCodeAt(state.position); - while (0 !== ch) { + while (ch !== 0) { while (is_WHITE_SPACE(ch)) { ch = state.input.charCodeAt(++state.position); } - if (allowComments && 0x23/* # */ === ch) { + if (allowComments && ch === 0x23/* # */) { do { ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && 0 !== ch); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); } if (is_EOL(ch)) { @@ -8440,7 +11387,7 @@ function skipSeparationSpace(state, allowComments, checkIndent) { lineBreaks++; state.lineIndent = 0; - while (0x20/* Space */ === ch) { + while (ch === 0x20/* Space */) { state.lineIndent++; ch = state.input.charCodeAt(++state.position); } @@ -8449,7 +11396,7 @@ function skipSeparationSpace(state, allowComments, checkIndent) { } } - if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { throwWarning(state, 'deficient indentation'); } @@ -8464,9 +11411,9 @@ function testDocumentSeparator(state) { // Condition state.position === state.lineStart is tested // in parent on each call, for efficiency. No needs to test here again. - if ((0x2D/* - */ === ch || 0x2E/* . */ === ch) && - state.input.charCodeAt(_position + 1) === ch && - state.input.charCodeAt(_position + 2) === ch) { + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { _position += 3; @@ -8481,7 +11428,7 @@ function testDocumentSeparator(state) { } function writeFoldedLines(state, count) { - if (1 === count) { + if (count === 1) { state.result += ' '; } else if (count > 1) { state.result += common.repeat('\n', count - 1); @@ -8504,23 +11451,23 @@ function readPlainScalar(state, nodeIndent, withinFlowCollection) { ch = state.input.charCodeAt(state.position); - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - 0x23/* # */ === ch || - 0x26/* & */ === ch || - 0x2A/* * */ === ch || - 0x21/* ! */ === ch || - 0x7C/* | */ === ch || - 0x3E/* > */ === ch || - 0x27/* ' */ === ch || - 0x22/* " */ === ch || - 0x25/* % */ === ch || - 0x40/* @ */ === ch || - 0x60/* ` */ === ch) { + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { return false; } - if (0x3F/* ? */ === ch || 0x2D/* - */ === ch) { + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following) || @@ -8534,8 +11481,8 @@ function readPlainScalar(state, nodeIndent, withinFlowCollection) { captureStart = captureEnd = state.position; hasPendingContent = false; - while (0 !== ch) { - if (0x3A/* : */ === ch) { + while (ch !== 0) { + if (ch === 0x3A/* : */) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following) || @@ -8543,7 +11490,7 @@ function readPlainScalar(state, nodeIndent, withinFlowCollection) { break; } - } else if (0x23/* # */ === ch) { + } else if (ch === 0x23/* # */) { preceding = state.input.charCodeAt(state.position - 1); if (is_WS_OR_EOL(preceding)) { @@ -8604,7 +11551,7 @@ function readSingleQuotedScalar(state, nodeIndent) { ch = state.input.charCodeAt(state.position); - if (0x27/* ' */ !== ch) { + if (ch !== 0x27/* ' */) { return false; } @@ -8613,12 +11560,12 @@ function readSingleQuotedScalar(state, nodeIndent) { state.position++; captureStart = captureEnd = state.position; - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x27/* ' */ === ch) { + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { captureSegment(state, captureStart, state.position, true); ch = state.input.charCodeAt(++state.position); - if (0x27/* ' */ === ch) { + if (ch === 0x27/* ' */) { captureStart = captureEnd = state.position; state.position++; } else { @@ -8652,7 +11599,7 @@ function readDoubleQuotedScalar(state, nodeIndent) { ch = state.input.charCodeAt(state.position); - if (0x22/* " */ !== ch) { + if (ch !== 0x22/* " */) { return false; } @@ -8661,13 +11608,13 @@ function readDoubleQuotedScalar(state, nodeIndent) { state.position++; captureStart = captureEnd = state.position; - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x22/* " */ === ch) { + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { captureSegment(state, captureStart, state.position, true); state.position++; return true; - } else if (0x5C/* \ */ === ch) { + } else if (ch === 0x5C/* \ */) { captureSegment(state, captureStart, state.position, true); ch = state.input.charCodeAt(++state.position); @@ -8732,6 +11679,7 @@ function readFlowCollection(state, nodeIndent) { isPair, isExplicitPair, isMapping, + overridableKeys = {}, keyNode, keyTag, valueNode, @@ -8751,13 +11699,13 @@ function readFlowCollection(state, nodeIndent) { return false; } - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(++state.position); - while (0 !== ch) { + while (ch !== 0) { skipSeparationSpace(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); @@ -8776,7 +11724,7 @@ function readFlowCollection(state, nodeIndent) { keyTag = keyNode = valueNode = null; isPair = isExplicitPair = false; - if (0x3F/* ? */ === ch) { + if (ch === 0x3F/* ? */) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following)) { @@ -8794,7 +11742,7 @@ function readFlowCollection(state, nodeIndent) { ch = state.input.charCodeAt(state.position); - if ((isExplicitPair || state.line === _line) && 0x3A/* : */ === ch) { + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { isPair = true; ch = state.input.charCodeAt(++state.position); skipSeparationSpace(state, true, nodeIndent); @@ -8803,9 +11751,9 @@ function readFlowCollection(state, nodeIndent) { } if (isMapping) { - storeMappingPair(state, _result, keyTag, keyNode, valueNode); + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); } else if (isPair) { - _result.push(storeMappingPair(state, null, keyTag, keyNode, valueNode)); + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); } else { _result.push(keyNode); } @@ -8814,7 +11762,7 @@ function readFlowCollection(state, nodeIndent) { ch = state.input.charCodeAt(state.position); - if (0x2C/* , */ === ch) { + if (ch === 0x2C/* , */) { readNext = true; ch = state.input.charCodeAt(++state.position); } else { @@ -8829,6 +11777,7 @@ function readBlockScalar(state, nodeIndent) { var captureStart, folding, chomping = CHOMPING_CLIP, + didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, @@ -8849,12 +11798,12 @@ function readBlockScalar(state, nodeIndent) { state.kind = 'scalar'; state.result = ''; - while (0 !== ch) { + while (ch !== 0) { ch = state.input.charCodeAt(++state.position); - if (0x2B/* + */ === ch || 0x2D/* - */ === ch) { + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { if (CHOMPING_CLIP === chomping) { - chomping = (0x2B/* + */ === ch) ? CHOMPING_KEEP : CHOMPING_STRIP; + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; } else { throwError(state, 'repeat of a chomping mode identifier'); } @@ -8878,20 +11827,20 @@ function readBlockScalar(state, nodeIndent) { do { ch = state.input.charCodeAt(++state.position); } while (is_WHITE_SPACE(ch)); - if (0x23/* # */ === ch) { + if (ch === 0x23/* # */) { do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (0 !== ch)); + while (!is_EOL(ch) && (ch !== 0)); } } - while (0 !== ch) { + while (ch !== 0) { readLineBreak(state); state.lineIndent = 0; ch = state.input.charCodeAt(state.position); while ((!detectedIndent || state.lineIndent < textIndent) && - (0x20/* Space */ === ch)) { + (ch === 0x20/* Space */)) { state.lineIndent++; ch = state.input.charCodeAt(++state.position); } @@ -8910,9 +11859,9 @@ function readBlockScalar(state, nodeIndent) { // Perform the chomping. if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', emptyLines); + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); } else if (chomping === CHOMPING_CLIP) { - if (detectedIndent) { // i.e. only if the scalar is not empty. + if (didReadContent) { // i.e. only if the scalar is not empty. state.result += '\n'; } } @@ -8927,7 +11876,8 @@ function readBlockScalar(state, nodeIndent) { // Lines starting with white space characters (more-indented lines) are not folded. if (is_WHITE_SPACE(ch)) { atMoreIndented = true; - state.result += common.repeat('\n', emptyLines + 1); + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); // End of more-indented block. } else if (atMoreIndented) { @@ -8935,8 +11885,8 @@ function readBlockScalar(state, nodeIndent) { state.result += common.repeat('\n', emptyLines + 1); // Just one line break - perceive as the same line. - } else if (0 === emptyLines) { - if (detectedIndent) { // i.e. only if we have already read some scalar content. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. state.result += ' '; } @@ -8946,19 +11896,17 @@ function readBlockScalar(state, nodeIndent) { } // Literal style: just add exact number of line breaks between content lines. - } else if (detectedIndent) { - // If current line isn't the first one - count line break from the last content line. - state.result += common.repeat('\n', emptyLines + 1); } else { - // In case of the first content line - count only empty lines. - state.result += common.repeat('\n', emptyLines); + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); } + didReadContent = true; detectedIndent = true; emptyLines = 0; captureStart = state.position; - while (!is_EOL(ch) && (0 !== ch)) { + while (!is_EOL(ch) && (ch !== 0)) { ch = state.input.charCodeAt(++state.position); } @@ -8977,15 +11925,15 @@ function readBlockSequence(state, nodeIndent) { detected = false, ch; - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); - while (0 !== ch) { + while (ch !== 0) { - if (0x2D/* - */ !== ch) { + if (ch !== 0x2D/* - */) { break; } @@ -9013,7 +11961,7 @@ function readBlockSequence(state, nodeIndent) { ch = state.input.charCodeAt(state.position); - if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) { + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { throwError(state, 'bad indentation of a sequence entry'); } else if (state.lineIndent < nodeIndent) { break; @@ -9037,6 +11985,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { _tag = state.tag, _anchor = state.anchor, _result = {}, + overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, @@ -9044,13 +11993,13 @@ function readBlockMapping(state, nodeIndent, flowIndent) { detected = false, ch; - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); - while (0 !== ch) { + while (ch !== 0) { following = state.input.charCodeAt(state.position + 1); _line = state.line; // Save the current line. @@ -9058,11 +12007,11 @@ function readBlockMapping(state, nodeIndent, flowIndent) { // Explicit notation case. There are two separate blocks: // first for the key (denoted by "?") and second for the value (denoted by ":") // - if ((0x3F/* ? */ === ch || 0x3A/* : */ === ch) && is_WS_OR_EOL(following)) { + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - if (0x3F/* ? */ === ch) { + if (ch === 0x3F/* ? */) { if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); keyTag = keyNode = valueNode = null; } @@ -9094,7 +12043,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { ch = state.input.charCodeAt(++state.position); } - if (0x3A/* : */ === ch) { + if (ch === 0x3A/* : */) { ch = state.input.charCodeAt(++state.position); if (!is_WS_OR_EOL(ch)) { @@ -9102,7 +12051,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { } if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); keyTag = keyNode = valueNode = null; } @@ -9147,7 +12096,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { } if (!atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, valueNode); + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); keyTag = keyNode = valueNode = null; } @@ -9155,7 +12104,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { ch = state.input.charCodeAt(state.position); } - if (state.lineIndent > nodeIndent && (0 !== ch)) { + if (state.lineIndent > nodeIndent && (ch !== 0)) { throwError(state, 'bad indentation of a mapping entry'); } else if (state.lineIndent < nodeIndent) { break; @@ -9168,7 +12117,7 @@ function readBlockMapping(state, nodeIndent, flowIndent) { // Special case: last mapping's node contains only the key in explicit notation. if (atExplicitKey) { - storeMappingPair(state, _result, keyTag, keyNode, null); + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); } // Expose the resulting mapping. @@ -9192,21 +12141,19 @@ function readTagProperty(state) { ch = state.input.charCodeAt(state.position); - if (0x21/* ! */ !== ch) { - return false; - } + if (ch !== 0x21/* ! */) return false; - if (null !== state.tag) { + if (state.tag !== null) { throwError(state, 'duplication of a tag property'); } ch = state.input.charCodeAt(++state.position); - if (0x3C/* < */ === ch) { + if (ch === 0x3C/* < */) { isVerbatim = true; ch = state.input.charCodeAt(++state.position); - } else if (0x21/* ! */ === ch) { + } else if (ch === 0x21/* ! */) { isNamed = true; tagHandle = '!!'; ch = state.input.charCodeAt(++state.position); @@ -9219,7 +12166,7 @@ function readTagProperty(state) { if (isVerbatim) { do { ch = state.input.charCodeAt(++state.position); } - while (0 !== ch && 0x3E/* > */ !== ch); + while (ch !== 0 && ch !== 0x3E/* > */); if (state.position < state.length) { tagName = state.input.slice(_position, state.position); @@ -9228,9 +12175,9 @@ function readTagProperty(state) { throwError(state, 'unexpected end of the stream within a verbatim tag'); } } else { - while (0 !== ch && !is_WS_OR_EOL(ch)) { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (0x21/* ! */ === ch) { + if (ch === 0x21/* ! */) { if (!isNamed) { tagHandle = state.input.slice(_position - 1, state.position + 1); @@ -9265,10 +12212,10 @@ function readTagProperty(state) { } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { state.tag = state.tagMap[tagHandle] + tagName; - } else if ('!' === tagHandle) { + } else if (tagHandle === '!') { state.tag = '!' + tagName; - } else if ('!!' === tagHandle) { + } else if (tagHandle === '!!') { state.tag = 'tag:yaml.org,2002:' + tagName; } else { @@ -9284,18 +12231,16 @@ function readAnchorProperty(state) { ch = state.input.charCodeAt(state.position); - if (0x26/* & */ !== ch) { - return false; - } + if (ch !== 0x26/* & */) return false; - if (null !== state.anchor) { + if (state.anchor !== null) { throwError(state, 'duplication of an anchor property'); } ch = state.input.charCodeAt(++state.position); _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state.input.charCodeAt(++state.position); } @@ -9313,14 +12258,12 @@ function readAlias(state) { ch = state.input.charCodeAt(state.position); - if (0x2A/* * */ !== ch) { - return false; - } + if (ch !== 0x2A/* * */) return false; ch = state.input.charCodeAt(++state.position); _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state.input.charCodeAt(++state.position); } @@ -9352,6 +12295,10 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact flowIndent, blockIndent; + if (state.listener !== null) { + state.listener('open', state); + } + state.tag = null; state.anchor = null; state.kind = null; @@ -9375,7 +12322,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } } - if (1 === indentStatus) { + if (indentStatus === 1) { while (readTagProperty(state) || readAnchorProperty(state)) { if (skipSeparationSpace(state, true, -1)) { atNewLine = true; @@ -9398,7 +12345,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact allowBlockCollections = atNewLine || allowCompact; } - if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { flowIndent = parentIndent; } else { @@ -9407,7 +12354,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact blockIndent = state.position - state.lineStart; - if (1 === indentStatus) { + if (indentStatus === 1) { if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || @@ -9422,31 +12369,31 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } else if (readAlias(state)) { hasContent = true; - if (null !== state.tag || null !== state.anchor) { + if (state.tag !== null || state.anchor !== null) { throwError(state, 'alias node should not have any properties'); } } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; - if (null === state.tag) { + if (state.tag === null) { state.tag = '?'; } } - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } - } else if (0 === indentStatus) { + } else if (indentStatus === 0) { // Special case: block sequences are allowed to have same indentation level as the parent. // http://www.yaml.org/spec/1.2/spec.html#id2799784 hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); } } - if (null !== state.tag && '!' !== state.tag) { - if ('?' === state.tag) { + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { @@ -9459,7 +12406,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact if (type.resolve(state.result)) { // `state.result` updated in resolver if matched state.result = type.construct(state.result); state.tag = type.tag; - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } break; @@ -9468,7 +12415,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { type = state.typeMap[state.tag]; - if (null !== state.result && type.kind !== state.kind) { + if (state.result !== null && type.kind !== state.kind) { throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); } @@ -9476,7 +12423,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); } else { state.result = type.construct(state.result); - if (null !== state.anchor) { + if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } @@ -9485,7 +12432,10 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact } } - return null !== state.tag || null !== state.anchor || hasContent; + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; } function readDocument(state) { @@ -9501,12 +12451,12 @@ function readDocument(state) { state.tagMap = {}; state.anchorMap = {}; - while (0 !== (ch = state.input.charCodeAt(state.position))) { + while ((ch = state.input.charCodeAt(state.position)) !== 0) { skipSeparationSpace(state, true, -1); ch = state.input.charCodeAt(state.position); - if (state.lineIndent > 0 || 0x25/* % */ !== ch) { + if (state.lineIndent > 0 || ch !== 0x25/* % */) { break; } @@ -9514,7 +12464,7 @@ function readDocument(state) { ch = state.input.charCodeAt(++state.position); _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch)) { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state.input.charCodeAt(++state.position); } @@ -9525,33 +12475,29 @@ function readDocument(state) { throwError(state, 'directive name must not be less than one character in length'); } - while (0 !== ch) { + while (ch !== 0) { while (is_WHITE_SPACE(ch)) { ch = state.input.charCodeAt(++state.position); } - if (0x23/* # */ === ch) { + if (ch === 0x23/* # */) { do { ch = state.input.charCodeAt(++state.position); } - while (0 !== ch && !is_EOL(ch)); + while (ch !== 0 && !is_EOL(ch)); break; } - if (is_EOL(ch)) { - break; - } + if (is_EOL(ch)) break; _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch)) { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state.input.charCodeAt(++state.position); } directiveArgs.push(state.input.slice(_position, state.position)); } - if (0 !== ch) { - readLineBreak(state); - } + if (ch !== 0) readLineBreak(state); if (_hasOwnProperty.call(directiveHandlers, directiveName)) { directiveHandlers[directiveName](state, directiveName, directiveArgs); @@ -9562,10 +12508,10 @@ function readDocument(state) { skipSeparationSpace(state, true, -1); - if (0 === state.lineIndent && - 0x2D/* - */ === state.input.charCodeAt(state.position) && - 0x2D/* - */ === state.input.charCodeAt(state.position + 1) && - 0x2D/* - */ === state.input.charCodeAt(state.position + 2)) { + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { state.position += 3; skipSeparationSpace(state, true, -1); @@ -9585,7 +12531,7 @@ function readDocument(state) { if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (0x2E/* . */ === state.input.charCodeAt(state.position)) { + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { state.position += 3; skipSeparationSpace(state, true, -1); } @@ -9607,8 +12553,8 @@ function loadDocuments(input, options) { if (input.length !== 0) { // Add tailing `\n` if not exists - if (0x0A/* LF */ !== input.charCodeAt(input.length - 1) && - 0x0D/* CR */ !== input.charCodeAt(input.length - 1)) { + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { input += '\n'; } @@ -9623,7 +12569,7 @@ function loadDocuments(input, options) { // Use 0 as string terminator. That significantly simplifies bounds check. state.input += '\0'; - while (0x20/* Space */ === state.input.charCodeAt(state.position)) { + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { state.lineIndent += 1; state.position += 1; } @@ -9648,10 +12594,10 @@ function loadAll(input, iterator, options) { function load(input, options) { var documents = loadDocuments(input, options); - if (0 === documents.length) { + if (documents.length === 0) { /*eslint-disable no-undefined*/ return undefined; - } else if (1 === documents.length) { + } else if (documents.length === 1) { return documents[0]; } throw new YAMLException('expected a single document in the stream, but found more'); @@ -9673,7 +12619,7 @@ module.exports.load = load; module.exports.safeLoadAll = safeLoadAll; module.exports.safeLoad = safeLoad; -},{"./common":22,"./exception":24,"./mark":26,"./schema/default_full":29,"./schema/default_safe":30}],26:[function(require,module,exports){ +},{"./common":21,"./exception":23,"./mark":25,"./schema/default_full":28,"./schema/default_safe":29}],25:[function(require,module,exports){ 'use strict'; @@ -9692,9 +12638,7 @@ function Mark(name, buffer, position, line, column) { Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { var head, start, tail, end, snippet; - if (!this.buffer) { - return null; - } + if (!this.buffer) return null; indent = indent || 4; maxLength = maxLength || 75; @@ -9702,7 +12646,7 @@ Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { head = ''; start = this.position; - while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { start -= 1; if (this.position - start > (maxLength / 2 - 1)) { head = ' ... '; @@ -9714,7 +12658,7 @@ Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { tail = ''; end = this.position; - while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { end += 1; if (end - this.position > (maxLength / 2 - 1)) { tail = ' ... '; @@ -9753,7 +12697,7 @@ Mark.prototype.toString = function toString(compact) { module.exports = Mark; -},{"./common":22}],27:[function(require,module,exports){ +},{"./common":21}],26:[function(require,module,exports){ 'use strict'; /*eslint-disable max-len*/ @@ -9781,7 +12725,7 @@ function compileList(schema, name, result) { }); return result.filter(function (type, index) { - return -1 === exclude.indexOf(index); + return exclude.indexOf(index) === -1; }); } @@ -9807,7 +12751,7 @@ function Schema(definition) { this.explicit = definition.explicit || []; this.implicit.forEach(function (type) { - if (type.loadKind && 'scalar' !== type.loadKind) { + if (type.loadKind && type.loadKind !== 'scalar') { throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); } }); @@ -9825,18 +12769,18 @@ Schema.create = function createSchema() { var schemas, types; switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); } schemas = common.toArray(schemas); @@ -9859,7 +12803,7 @@ Schema.create = function createSchema() { module.exports = Schema; -},{"./common":22,"./exception":24,"./type":33}],28:[function(require,module,exports){ +},{"./common":21,"./exception":23,"./type":32}],27:[function(require,module,exports){ // Standard YAML's Core schema. // http://www.yaml.org/spec/1.2/spec.html#id2804923 // @@ -9879,7 +12823,7 @@ module.exports = new Schema({ ] }); -},{"../schema":27,"./json":32}],29:[function(require,module,exports){ +},{"../schema":26,"./json":31}],28:[function(require,module,exports){ // JS-YAML's default schema for `load` function. // It is not described in the YAML specification. // @@ -9906,7 +12850,7 @@ module.exports = Schema.DEFAULT = new Schema({ ] }); -},{"../schema":27,"../type/js/function":38,"../type/js/regexp":39,"../type/js/undefined":40,"./default_safe":30}],30:[function(require,module,exports){ +},{"../schema":26,"../type/js/function":37,"../type/js/regexp":38,"../type/js/undefined":39,"./default_safe":29}],29:[function(require,module,exports){ // JS-YAML's default schema for `safeLoad` function. // It is not described in the YAML specification. // @@ -9936,7 +12880,7 @@ module.exports = new Schema({ ] }); -},{"../schema":27,"../type/binary":34,"../type/merge":42,"../type/omap":44,"../type/pairs":45,"../type/set":47,"../type/timestamp":49,"./core":28}],31:[function(require,module,exports){ +},{"../schema":26,"../type/binary":33,"../type/merge":41,"../type/omap":43,"../type/pairs":44,"../type/set":46,"../type/timestamp":48,"./core":27}],30:[function(require,module,exports){ // Standard YAML's Failsafe schema. // http://www.yaml.org/spec/1.2/spec.html#id2802346 @@ -9955,7 +12899,7 @@ module.exports = new Schema({ ] }); -},{"../schema":27,"../type/map":41,"../type/seq":46,"../type/str":48}],32:[function(require,module,exports){ +},{"../schema":26,"../type/map":40,"../type/seq":45,"../type/str":47}],31:[function(require,module,exports){ // Standard YAML's JSON schema. // http://www.yaml.org/spec/1.2/spec.html#id2803231 // @@ -9982,7 +12926,7 @@ module.exports = new Schema({ ] }); -},{"../schema":27,"../type/bool":35,"../type/float":36,"../type/int":37,"../type/null":43,"./failsafe":31}],33:[function(require,module,exports){ +},{"../schema":26,"../type/bool":34,"../type/float":35,"../type/int":36,"../type/null":42,"./failsafe":30}],32:[function(require,module,exports){ 'use strict'; var YAMLException = require('./exception'); @@ -10007,7 +12951,7 @@ var YAML_NODE_KINDS = [ function compileStyleAliases(map) { var result = {}; - if (null !== map) { + if (map !== null) { Object.keys(map).forEach(function (style) { map[style].forEach(function (alias) { result[String(alias)] = style; @@ -10022,7 +12966,7 @@ function Type(tag, options) { options = options || {}; Object.keys(options).forEach(function (name) { - if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } }); @@ -10038,21 +12982,26 @@ function Type(tag, options) { this.defaultStyle = options['defaultStyle'] || null; this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); } } module.exports = Type; -},{"./exception":24}],34:[function(require,module,exports){ +},{"./exception":23}],33:[function(require,module,exports){ 'use strict'; /*eslint-disable no-bitwise*/ -// A trick for browserified version. -// Since we make browserifier to ignore `buffer` module, NodeBuffer will be undefined -var NodeBuffer = require('buffer').Buffer; +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + var Type = require('../type'); @@ -10061,9 +13010,7 @@ var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 function resolveYamlBinary(data) { - if (null === data) { - return false; - } + if (data === null) return false; var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; @@ -10072,10 +13019,10 @@ function resolveYamlBinary(data) { code = map.indexOf(data.charAt(idx)); // Skip CR/LF - if (code > 64) { continue; } + if (code > 64) continue; // Fail on illegal characters - if (code < 0) { return false; } + if (code < 0) return false; bitlen += 6; } @@ -10120,9 +13067,7 @@ function constructYamlBinary(data) { } // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - return new NodeBuffer(result); - } + if (NodeBuffer) return new NodeBuffer(result); return result; } @@ -10181,15 +13126,13 @@ module.exports = new Type('tag:yaml.org,2002:binary', { represent: representYamlBinary }); -},{"../type":33,"buffer":12}],35:[function(require,module,exports){ +},{"../type":32}],34:[function(require,module,exports){ 'use strict'; var Type = require('../type'); function resolveYamlBoolean(data) { - if (null === data) { - return false; - } + if (data === null) return false; var max = data.length; @@ -10204,7 +13147,7 @@ function constructYamlBoolean(data) { } function isBoolean(object) { - return '[object Boolean]' === Object.prototype.toString.call(object); + return Object.prototype.toString.call(object) === '[object Boolean]'; } module.exports = new Type('tag:yaml.org,2002:bool', { @@ -10220,7 +13163,7 @@ module.exports = new Type('tag:yaml.org,2002:bool', { defaultStyle: 'lowercase' }); -},{"../type":33}],36:[function(require,module,exports){ +},{"../type":32}],35:[function(require,module,exports){ 'use strict'; var common = require('../common'); @@ -10234,13 +13177,10 @@ var YAML_FLOAT_PATTERN = new RegExp( '|\\.(?:nan|NaN|NAN))$'); function resolveYamlFloat(data) { - if (null === data) { - return false; - } + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data)) return false; - if (!YAML_FLOAT_PATTERN.test(data)) { - return false; - } return true; } @@ -10248,20 +13188,20 @@ function constructYamlFloat(data) { var value, sign, base, digits; value = data.replace(/_/g, '').toLowerCase(); - sign = '-' === value[0] ? -1 : 1; + sign = value[0] === '-' ? -1 : 1; digits = []; - if (0 <= '+-'.indexOf(value[0])) { + if ('+-'.indexOf(value[0]) >= 0) { value = value.slice(1); } - if ('.inf' === value) { - return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - } else if ('.nan' === value) { + } else if (value === '.nan') { return NaN; - } else if (0 <= value.indexOf(':')) { + } else if (value.indexOf(':') >= 0) { value.split(':').forEach(function (v) { digits.unshift(parseFloat(v, 10)); }); @@ -10288,30 +13228,21 @@ function representYamlFloat(object, style) { if (isNaN(object)) { switch (style) { - case 'lowercase': - return '.nan'; - case 'uppercase': - return '.NAN'; - case 'camelcase': - return '.NaN'; + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; } } else if (Number.POSITIVE_INFINITY === object) { switch (style) { - case 'lowercase': - return '.inf'; - case 'uppercase': - return '.INF'; - case 'camelcase': - return '.Inf'; + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; } } else if (Number.NEGATIVE_INFINITY === object) { switch (style) { - case 'lowercase': - return '-.inf'; - case 'uppercase': - return '-.INF'; - case 'camelcase': - return '-.Inf'; + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; } } else if (common.isNegativeZero(object)) { return '-0.0'; @@ -10326,8 +13257,8 @@ function representYamlFloat(object, style) { } function isFloat(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 !== object % 1 || common.isNegativeZero(object)); + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); } module.exports = new Type('tag:yaml.org,2002:float', { @@ -10339,7 +13270,7 @@ module.exports = new Type('tag:yaml.org,2002:float', { defaultStyle: 'lowercase' }); -},{"../common":22,"../type":33}],37:[function(require,module,exports){ +},{"../common":21,"../type":32}],36:[function(require,module,exports){ 'use strict'; var common = require('../common'); @@ -10360,16 +13291,14 @@ function isDecCode(c) { } function resolveYamlInteger(data) { - if (null === data) { - return false; - } + if (data === null) return false; var max = data.length, index = 0, hasDigits = false, ch; - if (!max) { return false; } + if (!max) return false; ch = data[index]; @@ -10380,7 +13309,7 @@ function resolveYamlInteger(data) { if (ch === '0') { // 0 - if (index + 1 === max) { return true; } + if (index + 1 === max) return true; ch = data[++index]; // base 2, base 8, base 16 @@ -10391,10 +13320,8 @@ function resolveYamlInteger(data) { for (; index < max; index++) { ch = data[index]; - if (ch === '_') { continue; } - if (ch !== '0' && ch !== '1') { - return false; - } + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; hasDigits = true; } return hasDigits; @@ -10407,10 +13334,8 @@ function resolveYamlInteger(data) { for (; index < max; index++) { ch = data[index]; - if (ch === '_') { continue; } - if (!isHexCode(data.charCodeAt(index))) { - return false; - } + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; hasDigits = true; } return hasDigits; @@ -10419,10 +13344,8 @@ function resolveYamlInteger(data) { // base 8 for (; index < max; index++) { ch = data[index]; - if (ch === '_') { continue; } - if (!isOctCode(data.charCodeAt(index))) { - return false; - } + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; hasDigits = true; } return hasDigits; @@ -10432,18 +13355,18 @@ function resolveYamlInteger(data) { for (; index < max; index++) { ch = data[index]; - if (ch === '_') { continue; } - if (ch === ':') { break; } + if (ch === '_') continue; + if (ch === ':') break; if (!isDecCode(data.charCodeAt(index))) { return false; } hasDigits = true; } - if (!hasDigits) { return false; } + if (!hasDigits) return false; // if !base60 - done; - if (ch !== ':') { return true; } + if (ch !== ':') return true; // base60 almost not used, no needs to optimize return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); @@ -10459,24 +13382,17 @@ function constructYamlInteger(data) { ch = value[0]; if (ch === '-' || ch === '+') { - if (ch === '-') { sign = -1; } + if (ch === '-') sign = -1; value = value.slice(1); ch = value[0]; } - if ('0' === value) { - return 0; - } + if (value === '0') return 0; if (ch === '0') { - if (value[1] === 'b') { - return sign * parseInt(value.slice(2), 2); - } - if (value[1] === 'x') { - return sign * parseInt(value, 16); - } + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); return sign * parseInt(value, 8); - } if (value.indexOf(':') !== -1) { @@ -10500,8 +13416,8 @@ function constructYamlInteger(data) { } function isInteger(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 === object % 1 && !common.isNegativeZero(object)); + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); } module.exports = new Type('tag:yaml.org,2002:int', { @@ -10524,7 +13440,7 @@ module.exports = new Type('tag:yaml.org,2002:int', { } }); -},{"../common":22,"../type":33}],38:[function(require,module,exports){ +},{"../common":21,"../type":32}],37:[function(require,module,exports){ 'use strict'; var esprima; @@ -10537,27 +13453,27 @@ var esprima; // found too - then fail to parse. // try { - esprima = require('esprima'); + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); } catch (_) { /*global window */ - if (typeof window !== 'undefined') { esprima = window.esprima; } + if (typeof window !== 'undefined') esprima = window.esprima; } var Type = require('../../type'); function resolveJavascriptFunction(data) { - if (null === data) { - return false; - } + if (data === null) return false; try { var source = '(' + data + ')', ast = esprima.parse(source, { range: true }); - if ('Program' !== ast.type || - 1 !== ast.body.length || - 'ExpressionStatement' !== ast.body[0].type || - 'FunctionExpression' !== ast.body[0].expression.type) { + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { return false; } @@ -10575,10 +13491,10 @@ function constructJavascriptFunction(data) { params = [], body; - if ('Program' !== ast.type || - 1 !== ast.body.length || - 'ExpressionStatement' !== ast.body[0].type || - 'FunctionExpression' !== ast.body[0].expression.type) { + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { throw new Error('Failed to resolve function'); } @@ -10599,7 +13515,7 @@ function representJavascriptFunction(object /*, style*/) { } function isFunction(object) { - return '[object Function]' === Object.prototype.toString.call(object); + return Object.prototype.toString.call(object) === '[object Function]'; } module.exports = new Type('tag:yaml.org,2002:js/function', { @@ -10610,19 +13526,14 @@ module.exports = new Type('tag:yaml.org,2002:js/function', { represent: representJavascriptFunction }); -},{"../../type":33,"esprima":50}],39:[function(require,module,exports){ +},{"../../type":32}],38:[function(require,module,exports){ 'use strict'; var Type = require('../../type'); function resolveJavascriptRegExp(data) { - if (null === data) { - return false; - } - - if (0 === data.length) { - return false; - } + if (data === null) return false; + if (data.length === 0) return false; var regexp = data, tail = /\/([gim]*)$/.exec(data), @@ -10630,23 +13541,15 @@ function resolveJavascriptRegExp(data) { // if regexp starts with '/' it can have modifiers and must be properly closed // `/foo/gim` - modifiers tail can be maximum 3 chars - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; - } + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; - if (modifiers.length > 3) { return false; } + if (modifiers.length > 3) return false; // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') { return false; } - - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; } - try { - return true; - } catch (error) { - return false; - } + return true; } function constructJavascriptRegExp(data) { @@ -10655,10 +13558,8 @@ function constructJavascriptRegExp(data) { modifiers = ''; // `/foo/gim` - tail can be maximum 4 chars - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; - } + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; regexp = regexp.slice(1, regexp.length - modifiers.length - 1); } @@ -10668,23 +13569,15 @@ function constructJavascriptRegExp(data) { function representJavascriptRegExp(object /*, style*/) { var result = '/' + object.source + '/'; - if (object.global) { - result += 'g'; - } - - if (object.multiline) { - result += 'm'; - } - - if (object.ignoreCase) { - result += 'i'; - } + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; return result; } function isRegExp(object) { - return '[object RegExp]' === Object.prototype.toString.call(object); + return Object.prototype.toString.call(object) === '[object RegExp]'; } module.exports = new Type('tag:yaml.org,2002:js/regexp', { @@ -10695,7 +13588,7 @@ module.exports = new Type('tag:yaml.org,2002:js/regexp', { represent: representJavascriptRegExp }); -},{"../../type":33}],40:[function(require,module,exports){ +},{"../../type":32}],39:[function(require,module,exports){ 'use strict'; var Type = require('../../type'); @@ -10714,7 +13607,7 @@ function representJavascriptUndefined() { } function isUndefined(object) { - return 'undefined' === typeof object; + return typeof object === 'undefined'; } module.exports = new Type('tag:yaml.org,2002:js/undefined', { @@ -10725,23 +13618,23 @@ module.exports = new Type('tag:yaml.org,2002:js/undefined', { represent: representJavascriptUndefined }); -},{"../../type":33}],41:[function(require,module,exports){ +},{"../../type":32}],40:[function(require,module,exports){ 'use strict'; var Type = require('../type'); module.exports = new Type('tag:yaml.org,2002:map', { kind: 'mapping', - construct: function (data) { return null !== data ? data : {}; } + construct: function (data) { return data !== null ? data : {}; } }); -},{"../type":33}],42:[function(require,module,exports){ +},{"../type":32}],41:[function(require,module,exports){ 'use strict'; var Type = require('../type'); function resolveYamlMerge(data) { - return '<<' === data || null === data; + return data === '<<' || data === null; } module.exports = new Type('tag:yaml.org,2002:merge', { @@ -10749,15 +13642,13 @@ module.exports = new Type('tag:yaml.org,2002:merge', { resolve: resolveYamlMerge }); -},{"../type":33}],43:[function(require,module,exports){ +},{"../type":32}],42:[function(require,module,exports){ 'use strict'; var Type = require('../type'); function resolveYamlNull(data) { - if (null === data) { - return true; - } + if (data === null) return true; var max = data.length; @@ -10770,7 +13661,7 @@ function constructYamlNull() { } function isNull(object) { - return null === object; + return object === null; } module.exports = new Type('tag:yaml.org,2002:null', { @@ -10787,7 +13678,7 @@ module.exports = new Type('tag:yaml.org,2002:null', { defaultStyle: 'lowercase' }); -},{"../type":33}],44:[function(require,module,exports){ +},{"../type":32}],43:[function(require,module,exports){ 'use strict'; var Type = require('../type'); @@ -10796,9 +13687,7 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty; var _toString = Object.prototype.toString; function resolveYamlOmap(data) { - if (null === data) { - return true; - } + if (data === null) return true; var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; @@ -10807,36 +13696,26 @@ function resolveYamlOmap(data) { pair = object[index]; pairHasKey = false; - if ('[object Object]' !== _toString.call(pair)) { - return false; - } + if (_toString.call(pair) !== '[object Object]') return false; for (pairKey in pair) { if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) { - pairHasKey = true; - } else { - return false; - } + if (!pairHasKey) pairHasKey = true; + else return false; } } - if (!pairHasKey) { - return false; - } + if (!pairHasKey) return false; - if (-1 === objectKeys.indexOf(pairKey)) { - objectKeys.push(pairKey); - } else { - return false; - } + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; } return true; } function constructYamlOmap(data) { - return null !== data ? data : []; + return data !== null ? data : []; } module.exports = new Type('tag:yaml.org,2002:omap', { @@ -10845,7 +13724,7 @@ module.exports = new Type('tag:yaml.org,2002:omap', { construct: constructYamlOmap }); -},{"../type":33}],45:[function(require,module,exports){ +},{"../type":32}],44:[function(require,module,exports){ 'use strict'; var Type = require('../type'); @@ -10853,9 +13732,7 @@ var Type = require('../type'); var _toString = Object.prototype.toString; function resolveYamlPairs(data) { - if (null === data) { - return true; - } + if (data === null) return true; var index, length, pair, keys, result, object = data; @@ -10865,15 +13742,11 @@ function resolveYamlPairs(data) { for (index = 0, length = object.length; index < length; index += 1) { pair = object[index]; - if ('[object Object]' !== _toString.call(pair)) { - return false; - } + if (_toString.call(pair) !== '[object Object]') return false; keys = Object.keys(pair); - if (1 !== keys.length) { - return false; - } + if (keys.length !== 1) return false; result[index] = [ keys[0], pair[keys[0]] ]; } @@ -10882,9 +13755,7 @@ function resolveYamlPairs(data) { } function constructYamlPairs(data) { - if (null === data) { - return []; - } + if (data === null) return []; var index, length, pair, keys, result, object = data; @@ -10908,17 +13779,17 @@ module.exports = new Type('tag:yaml.org,2002:pairs', { construct: constructYamlPairs }); -},{"../type":33}],46:[function(require,module,exports){ +},{"../type":32}],45:[function(require,module,exports){ 'use strict'; var Type = require('../type'); module.exports = new Type('tag:yaml.org,2002:seq', { kind: 'sequence', - construct: function (data) { return null !== data ? data : []; } + construct: function (data) { return data !== null ? data : []; } }); -},{"../type":33}],47:[function(require,module,exports){ +},{"../type":32}],46:[function(require,module,exports){ 'use strict'; var Type = require('../type'); @@ -10926,17 +13797,13 @@ var Type = require('../type'); var _hasOwnProperty = Object.prototype.hasOwnProperty; function resolveYamlSet(data) { - if (null === data) { - return true; - } + if (data === null) return true; var key, object = data; for (key in object) { if (_hasOwnProperty.call(object, key)) { - if (null !== object[key]) { - return false; - } + if (object[key] !== null) return false; } } @@ -10944,7 +13811,7 @@ function resolveYamlSet(data) { } function constructYamlSet(data) { - return null !== data ? data : {}; + return data !== null ? data : {}; } module.exports = new Type('tag:yaml.org,2002:set', { @@ -10953,54 +13820,53 @@ module.exports = new Type('tag:yaml.org,2002:set', { construct: constructYamlSet }); -},{"../type":33}],48:[function(require,module,exports){ +},{"../type":32}],47:[function(require,module,exports){ 'use strict'; var Type = require('../type'); module.exports = new Type('tag:yaml.org,2002:str', { kind: 'scalar', - construct: function (data) { return null !== data ? data : ''; } + construct: function (data) { return data !== null ? data : ''; } }); -},{"../type":33}],49:[function(require,module,exports){ +},{"../type":32}],48:[function(require,module,exports){ 'use strict'; var Type = require('../type'); +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + var YAML_TIMESTAMP_REGEXP = new RegExp( '^([0-9][0-9][0-9][0-9])' + // [1] year '-([0-9][0-9]?)' + // [2] month '-([0-9][0-9]?)' + // [3] day - '(?:(?:[Tt]|[ \\t]+)' + // ... + '(?:[Tt]|[ \\t]+)' + // ... '([0-9][0-9]?)' + // [4] hour ':([0-9][0-9])' + // [5] minute ':([0-9][0-9])' + // [6] second '(?:\\.([0-9]*))?' + // [7] fraction '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute function resolveYamlTimestamp(data) { - if (null === data) { - return false; - } - - if (YAML_TIMESTAMP_REGEXP.exec(data) === null) { - return false; - } - - return true; + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; } function constructYamlTimestamp(data) { var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match = YAML_TIMESTAMP_REGEXP.exec(data); + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - if (null === match) { - throw new Error('Date resolve error'); - } + if (match === null) throw new Error('Date resolve error'); // match: [1] year [2] month [3] day @@ -11032,16 +13898,12 @@ function constructYamlTimestamp(data) { tz_hour = +(match[10]); tz_minute = +(match[11] || 0); delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if ('-' === match[9]) { - delta = -delta; - } + if (match[9] === '-') delta = -delta; } date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (delta) { - date.setTime(date.getTime() - delta); - } + if (delta) date.setTime(date.getTime() - delta); return date; } @@ -11058,5949 +13920,7 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', { represent: representYamlTimestamp }); -},{"../type":33}],50:[function(require,module,exports){ -/* - Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - - /* istanbul ignore next */ - if (typeof define === 'function' && define.amd) { - define(['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - FnExprTokens, - Syntax, - PlaceHolders, - Messages, - Regex, - source, - strict, - index, - lineNumber, - lineStart, - hasLineTerminator, - lastIndex, - lastLineNumber, - lastLineStart, - startIndex, - startLineNumber, - startLineStart, - scanning, - length, - lookahead, - state, - extra, - isBindingElement, - isAssignmentTarget, - firstCoverInitializedNameError; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8, - RegularExpression: 9, - Template: 10 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = '<end>'; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - TokenName[Token.RegularExpression] = 'RegularExpression'; - TokenName[Token.Template] = 'Template'; - - // A function following one of those tokens is an expression. - FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', - 'return', 'case', 'delete', 'throw', 'void', - // assignment operators - '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', - '&=', '|=', '^=', ',', - // binary/unary operators - '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', - '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', - '<=', '<', '>', '!=', '!==']; - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForOfStatement: 'ForOfStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchCase: 'SwitchCase', - SwitchStatement: 'SwitchStatement', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - - PlaceHolders = { - ArrowParameterPlaceHolder: 'ArrowParameterPlaceHolder' - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedTemplate: 'Unexpected quasi %0', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode', - TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', - ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', - DefaultRestParameter: 'Unexpected token =', - ObjectPatternAsRestParameter: 'Unexpected token {', - DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', - ConstructorSpecialMethod: 'Class constructor may not be an accessor', - DuplicateConstructor: 'A class may only have one constructor', - StaticPrototype: 'Classes may not have static property named prototype', - MissingFromClause: 'Unexpected token', - NoAsAfterImportNamespace: 'Unexpected token', - InvalidModuleSpecifier: 'Unexpected token', - IllegalImportDeclaration: 'Unexpected token', - IllegalExportDeclaration: 'Unexpected token', - DuplicateBinding: 'Duplicate binding %0' - }; - - // See also tools/generate-unicode-regex.js. - Regex = { - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart: - NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, - - // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart: - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uD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uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - /* istanbul ignore if */ - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function isDecimalDigit(ch) { - return (ch >= 0x30 && ch <= 0x39); // 0..9 - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - function octalToDecimal(ch) { - // \0 is not octal escape sequence - var octal = (ch !== '0'), code = '01234567'.indexOf(ch); - - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - - return { - code: code, - octal: octal - }; - } - - // ECMA-262 11.2 White Space - - function isWhiteSpace(ch) { - return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || - (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); - } - - // ECMA-262 11.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); - } - - // ECMA-262 11.6 Identifier Names and Identifiers - - function fromCodePoint(cp) { - return (cp < 0x10000) ? String.fromCharCode(cp) : - String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + - String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); - } - - function isIdentifierStart(ch) { - return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))); - } - - function isIdentifierPart(ch) { - return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) - (ch >= 0x41 && ch <= 0x5A) || // A..Z - (ch >= 0x61 && ch <= 0x7A) || // a..z - (ch >= 0x30 && ch <= 0x39) || // 0..9 - (ch === 0x5C) || // \ (backslash) - ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))); - } - - // ECMA-262 11.6.2.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - case 'enum': - case 'export': - case 'import': - case 'super': - return true; - default: - return false; - } - } - - function isStrictModeReservedWord(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - default: - return false; - } - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // ECMA-262 11.6.2.1 Keywords - - function isKeyword(id) { - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || - (id === 'try') || (id === 'let'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } - - // ECMA-262 11.4 Comments - - function addComment(type, value, start, end, loc) { - var comment; - - assert(typeof start === 'number', 'Comment must have valid position'); - - state.lastCommentStart = start; - - comment = { - type: type, - value: value - }; - if (extra.range) { - comment.range = [start, end]; - } - if (extra.loc) { - comment.loc = loc; - } - extra.comments.push(comment); - if (extra.attachComment) { - extra.leadingComments.push(comment); - extra.trailingComments.push(comment); - } - if (extra.tokenize) { - comment.type = comment.type + 'Comment'; - if (extra.delegate) { - comment = extra.delegate(comment); - } - extra.tokens.push(comment); - } - } - - function skipSingleLineComment(offset) { - var start, loc, ch, comment; - - start = index - offset; - loc = { - start: { - line: lineNumber, - column: index - lineStart - offset - } - }; - - while (index < length) { - ch = source.charCodeAt(index); - ++index; - if (isLineTerminator(ch)) { - hasLineTerminator = true; - if (extra.comments) { - comment = source.slice(start + offset, index - 1); - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - addComment('Line', comment, start, index - 1, loc); - } - if (ch === 13 && source.charCodeAt(index) === 10) { - ++index; - } - ++lineNumber; - lineStart = index; - return; - } - } - - if (extra.comments) { - comment = source.slice(start + offset, index); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Line', comment, start, index, loc); - } - } - - function skipMultiLineComment() { - var start, loc, ch, comment; - - if (extra.comments) { - start = index - 2; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - } - - while (index < length) { - ch = source.charCodeAt(index); - if (isLineTerminator(ch)) { - if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { - ++index; - } - hasLineTerminator = true; - ++lineNumber; - ++index; - lineStart = index; - } else if (ch === 0x2A) { - // Block comment ends with '*/'. - if (source.charCodeAt(index + 1) === 0x2F) { - ++index; - ++index; - if (extra.comments) { - comment = source.slice(start + 2, index - 2); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - } - return; - } - ++index; - } else { - ++index; - } - } - - // Ran off the end of the file - the whole thing is a comment - if (extra.comments) { - loc.end = { - line: lineNumber, - column: index - lineStart - }; - comment = source.slice(start + 2, index); - addComment('Block', comment, start, index, loc); - } - tolerateUnexpectedToken(); - } - - function skipComment() { - var ch, start; - hasLineTerminator = false; - - start = (index === 0); - while (index < length) { - ch = source.charCodeAt(index); - - if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - hasLineTerminator = true; - ++index; - if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { - ++index; - } - ++lineNumber; - lineStart = index; - start = true; - } else if (ch === 0x2F) { // U+002F is '/' - ch = source.charCodeAt(index + 1); - if (ch === 0x2F) { - ++index; - ++index; - skipSingleLineComment(2); - start = true; - } else if (ch === 0x2A) { // U+002A is '*' - ++index; - ++index; - skipMultiLineComment(); - } else { - break; - } - } else if (start && ch === 0x2D) { // U+002D is '-' - // U+003E is '>' - if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { - // '-->' is a single-line comment - index += 3; - skipSingleLineComment(3); - } else { - break; - } - } else if (ch === 0x3C) { // U+003C is '<' - if (source.slice(index + 1, index + 4) === '!--') { - ++index; // `<` - ++index; // `!` - ++index; // `-` - ++index; // `-` - skipSingleLineComment(4); - } else { - break; - } - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function scanUnicodeCodePointEscape() { - var ch, code; - - ch = source[index]; - code = 0; - - // At least, one hex digit is required. - if (ch === '}') { - throwUnexpectedToken(); - } - - while (index < length) { - ch = source[index++]; - if (!isHexDigit(ch)) { - break; - } - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } - - if (code > 0x10FFFF || ch !== '}') { - throwUnexpectedToken(); - } - - return fromCodePoint(code); - } - - function codePointAt(i) { - var cp, first, second; - - cp = source.charCodeAt(i); - if (cp >= 0xD800 && cp <= 0xDBFF) { - second = source.charCodeAt(i + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - first = cp; - cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - - return cp; - } - - function getComplexIdentifier() { - var cp, ch, id; - - cp = codePointAt(index); - id = fromCodePoint(cp); - index += id.length; - - // '\u' (U+005C, U+0075) denotes an escaped character. - if (cp === 0x5C) { - if (source.charCodeAt(index) !== 0x75) { - throwUnexpectedToken(); - } - ++index; - if (source[index] === '{') { - ++index; - ch = scanUnicodeCodePointEscape(); - } else { - ch = scanHexEscape('u'); - cp = ch.charCodeAt(0); - if (!ch || ch === '\\' || !isIdentifierStart(cp)) { - throwUnexpectedToken(); - } - } - id = ch; - } - - while (index < length) { - cp = codePointAt(index); - if (!isIdentifierPart(cp)) { - break; - } - ch = fromCodePoint(cp); - id += ch; - index += ch.length; - - // '\u' (U+005C, U+0075) denotes an escaped character. - if (cp === 0x5C) { - id = id.substr(0, id.length - 1); - if (source.charCodeAt(index) !== 0x75) { - throwUnexpectedToken(); - } - ++index; - if (source[index] === '{') { - ++index; - ch = scanUnicodeCodePointEscape(); - } else { - ch = scanHexEscape('u'); - cp = ch.charCodeAt(0); - if (!ch || ch === '\\' || !isIdentifierPart(cp)) { - throwUnexpectedToken(); - } - } - id += ch; - } - } - - return id; - } - - function getIdentifier() { - var start, ch; - - start = index++; - while (index < length) { - ch = source.charCodeAt(index); - if (ch === 0x5C) { - // Blackslash (U+005C) marks Unicode escape sequence. - index = start; - return getComplexIdentifier(); - } else if (ch >= 0xD800 && ch < 0xDFFF) { - // Need to handle surrogate pairs. - index = start; - return getComplexIdentifier(); - } - if (isIdentifierPart(ch)) { - ++index; - } else { - break; - } - } - - return source.slice(start, index); - } - - function scanIdentifier() { - var start, id, type; - - start = index; - - // Backslash (U+005C) starts an escaped character. - id = (source.charCodeAt(index) === 0x5C) ? getComplexIdentifier() : getIdentifier(); - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - type = Token.Identifier; - } else if (isKeyword(id)) { - type = Token.Keyword; - } else if (id === 'null') { - type = Token.NullLiteral; - } else if (id === 'true' || id === 'false') { - type = Token.BooleanLiteral; - } else { - type = Token.Identifier; - } - - return { - type: type, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - - // ECMA-262 11.7 Punctuators - - function scanPunctuator() { - var token, str; - - token = { - type: Token.Punctuator, - value: '', - lineNumber: lineNumber, - lineStart: lineStart, - start: index, - end: index - }; - - // Check for most common single-character punctuators. - str = source[index]; - switch (str) { - - case '(': - if (extra.tokenize) { - extra.openParenToken = extra.tokenValues.length; - } - ++index; - break; - - case '{': - if (extra.tokenize) { - extra.openCurlyToken = extra.tokenValues.length; - } - state.curlyStack.push('{'); - ++index; - break; - - case '.': - ++index; - if (source[index] === '.' && source[index + 1] === '.') { - // Spread operator: ... - index += 2; - str = '...'; - } - break; - - case '}': - ++index; - state.curlyStack.pop(); - break; - case ')': - case ';': - case ',': - case '[': - case ']': - case ':': - case '?': - case '~': - ++index; - break; - - default: - // 4-character punctuator. - str = source.substr(index, 4); - if (str === '>>>=') { - index += 4; - } else { - - // 3-character punctuators. - str = str.substr(0, 3); - if (str === '===' || str === '!==' || str === '>>>' || - str === '<<=' || str === '>>=') { - index += 3; - } else { - - // 2-character punctuators. - str = str.substr(0, 2); - if (str === '&&' || str === '||' || str === '==' || str === '!=' || - str === '+=' || str === '-=' || str === '*=' || str === '/=' || - str === '++' || str === '--' || str === '<<' || str === '>>' || - str === '&=' || str === '|=' || str === '^=' || str === '%=' || - str === '<=' || str === '>=' || str === '=>') { - index += 2; - } else { - - // 1-character punctuators. - str = source[index]; - if ('<>=!+-*%&|^/'.indexOf(str) >= 0) { - ++index; - } - } - } - } - } - - if (index === token.start) { - throwUnexpectedToken(); - } - - token.end = index; - token.value = str; - return token; - } - - // ECMA-262 11.8.3 Numeric Literals - - function scanHexLiteral(start) { - var number = ''; - - while (index < length) { - if (!isHexDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (number.length === 0) { - throwUnexpectedToken(); - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwUnexpectedToken(); - } - - return { - type: Token.NumericLiteral, - value: parseInt('0x' + number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function scanBinaryLiteral(start) { - var ch, number; - - number = ''; - - while (index < length) { - ch = source[index]; - if (ch !== '0' && ch !== '1') { - break; - } - number += source[index++]; - } - - if (number.length === 0) { - // only 0b or 0B - throwUnexpectedToken(); - } - - if (index < length) { - ch = source.charCodeAt(index); - /* istanbul ignore else */ - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwUnexpectedToken(); - } - } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 2), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function scanOctalLiteral(prefix, start) { - var number, octal; - - if (isOctalDigit(prefix)) { - octal = true; - number = '0' + source[index++]; - } else { - octal = false; - ++index; - number = ''; - } - - while (index < length) { - if (!isOctalDigit(source[index])) { - break; - } - number += source[index++]; - } - - if (!octal && number.length === 0) { - // only 0o or 0O - throwUnexpectedToken(); - } - - if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { - throwUnexpectedToken(); - } - - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - function isImplicitOctalLiteral() { - var i, ch; - - // Implicit octal, unless there is a non-octal digit. - // (Annex B.1.1 on Numeric Literals) - for (i = index + 1; i < length; ++i) { - ch = source[i]; - if (ch === '8' || ch === '9') { - return false; - } - if (!isOctalDigit(ch)) { - return true; - } - } - - return true; - } - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - // Octal number in ES6 starts with '0o'. - // Binary number in ES6 starts with '0b'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - ++index; - return scanHexLiteral(start); - } - if (ch === 'b' || ch === 'B') { - ++index; - return scanBinaryLiteral(start); - } - if (ch === 'o' || ch === 'O') { - return scanOctalLiteral(ch, start); - } - - if (isOctalDigit(ch)) { - if (isImplicitOctalLiteral()) { - return scanOctalLiteral(ch, start); - } - } - } - - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === '.') { - number += source[index++]; - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - ch = source[index]; - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - if (isDecimalDigit(source.charCodeAt(index))) { - while (isDecimalDigit(source.charCodeAt(index))) { - number += source[index++]; - } - } else { - throwUnexpectedToken(); - } - } - - if (isIdentifierStart(source.charCodeAt(index))) { - throwUnexpectedToken(); - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // ECMA-262 11.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, unescaped, octToDec, octal = false; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!ch || !isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - str += scanUnicodeCodePointEscape(); - } else { - unescaped = scanHexEscape(ch); - if (!unescaped) { - throw throwUnexpectedToken(); - } - str += unescaped; - } - break; - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - case '8': - case '9': - str += ch; - tolerateUnexpectedToken(); - break; - - default: - if (isOctalDigit(ch)) { - octToDec = octalToDecimal(ch); - - octal = octToDec.octal || octal; - str += String.fromCharCode(octToDec.code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwUnexpectedToken(); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: startLineNumber, - lineStart: startLineStart, - start: start, - end: index - }; - } - - // ECMA-262 11.8.6 Template Literal Lexical Components - - function scanTemplate() { - var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped; - - terminated = false; - tail = false; - start = index; - head = (source[index] === '`'); - rawOffset = 2; - - ++index; - - while (index < length) { - ch = source[index++]; - if (ch === '`') { - rawOffset = 1; - tail = true; - terminated = true; - break; - } else if (ch === '$') { - if (source[index] === '{') { - state.curlyStack.push('${'); - ++index; - terminated = true; - break; - } - cooked += ch; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'n': - cooked += '\n'; - break; - case 'r': - cooked += '\r'; - break; - case 't': - cooked += '\t'; - break; - case 'u': - case 'x': - if (source[index] === '{') { - ++index; - cooked += scanUnicodeCodePointEscape(); - } else { - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - cooked += unescaped; - } else { - index = restore; - cooked += ch; - } - } - break; - case 'b': - cooked += '\b'; - break; - case 'f': - cooked += '\f'; - break; - case 'v': - cooked += '\v'; - break; - - default: - if (ch === '0') { - if (isDecimalDigit(source.charCodeAt(index))) { - // Illegal: \01 \02 and so on - throwError(Messages.TemplateOctalLiteral); - } - cooked += '\0'; - } else if (isOctalDigit(ch)) { - // Illegal: \1 \2 - throwError(Messages.TemplateOctalLiteral); - } else { - cooked += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - } - } else if (isLineTerminator(ch.charCodeAt(0))) { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - lineStart = index; - cooked += '\n'; - } else { - cooked += ch; - } - } - - if (!terminated) { - throwUnexpectedToken(); - } - - if (!head) { - state.curlyStack.pop(); - } - - return { - type: Token.Template, - value: { - cooked: cooked, - raw: source.slice(start + 1, index - rawOffset) - }, - head: head, - tail: tail, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - // ECMA-262 11.8.5 Regular Expression Literals - - function testRegExp(pattern, flags) { - // The BMP character to use as a replacement for astral symbols when - // translating an ES6 "u"-flagged pattern to an ES5-compatible - // approximation. - // Note: replacing with '\uFFFF' enables false positives in unlikely - // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid - // pattern that would not be detected by this substitution. - var astralSubstitute = '\uFFFF', - tmp = pattern; - - if (flags.indexOf('u') >= 0) { - tmp = tmp - // Replace every Unicode escape sequence with the equivalent - // BMP character or a constant ASCII code point in the case of - // astral symbols. (See the above note on `astralSubstitute` - // for more information.) - .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { - var codePoint = parseInt($1 || $2, 16); - if (codePoint > 0x10FFFF) { - throwUnexpectedToken(null, Messages.InvalidRegExp); - } - if (codePoint <= 0xFFFF) { - return String.fromCharCode(codePoint); - } - return astralSubstitute; - }) - // Replace each paired surrogate with a single ASCII symbol to - // avoid throwing on regular expressions that are only valid in - // combination with the "u" flag. - .replace( - /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - astralSubstitute - ); - } - - // First, detect invalid regular expressions. - try { - RegExp(tmp); - } catch (e) { - throwUnexpectedToken(null, Messages.InvalidRegExp); - } - - // Return a regular expression object for this pattern-flag pair, or - // `null` in case the current environment doesn't support the flags it - // uses. - try { - return new RegExp(pattern, flags); - } catch (exception) { - return null; - } - } - - function scanRegExpBody() { - var ch, str, classMarker, terminated, body; - - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - classMarker = false; - terminated = false; - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch.charCodeAt(0))) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } - str += ch; - } else if (isLineTerminator(ch.charCodeAt(0))) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } - } - } - - if (!terminated) { - throwUnexpectedToken(null, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - body = str.substr(1, str.length - 2); - return { - value: body, - literal: str - }; - } - - function scanRegExpFlags() { - var ch, str, flags, restore; - - str = ''; - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch.charCodeAt(0))) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - for (str += '\\u'; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - tolerateUnexpectedToken(); - } else { - str += '\\'; - tolerateUnexpectedToken(); - } - } else { - flags += ch; - str += ch; - } - } - - return { - value: flags, - literal: str - }; - } - - function scanRegExp() { - var start, body, flags, value; - scanning = true; - - lookahead = null; - skipComment(); - start = index; - - body = scanRegExpBody(); - flags = scanRegExpFlags(); - value = testRegExp(body.value, flags.value); - scanning = false; - if (extra.tokenize) { - return { - type: Token.RegularExpression, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - lineNumber: lineNumber, - lineStart: lineStart, - start: start, - end: index - }; - } - - return { - literal: body.literal + flags.literal, - value: value, - regex: { - pattern: body.value, - flags: flags.value - }, - start: start, - end: index - }; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = scanRegExp(); - - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - /* istanbul ignore next */ - if (!extra.tokenize) { - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - regex: regex.regex, - range: [pos, index], - loc: loc - }); - } - - return regex; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - // Using the following algorithm: - // https://github.com/mozilla/sweet.js/wiki/design - - function advanceSlash() { - var regex, previous, check; - - function testKeyword(value) { - return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z'); - } - - previous = extra.tokenValues[extra.tokens.length - 1]; - regex = (previous !== null); - - switch (previous) { - case 'this': - case ']': - regex = false; - break; - - case ')': - check = extra.tokenValues[extra.openParenToken - 1]; - regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with'); - break; - - case '}': - // Dividing a function by anything makes little sense, - // but we have to check for that. - regex = false; - if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) { - // Anonymous function, e.g. function(){} /42 - check = extra.tokenValues[extra.openCurlyToken - 4]; - regex = check ? (FnExprTokens.indexOf(check) < 0) : false; - } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) { - // Named function, e.g. function f(){} /42/ - check = extra.tokenValues[extra.openCurlyToken - 5]; - regex = check ? (FnExprTokens.indexOf(check) < 0) : true; - } - } - - return regex ? collectRegex() : scanPunctuator(); - } - - function advance() { - var cp, token; - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - start: index, - end: index - }; - } - - cp = source.charCodeAt(index); - - if (isIdentifierStart(cp)) { - token = scanIdentifier(); - if (strict && isStrictModeReservedWord(token.value)) { - token.type = Token.Keyword; - } - return token; - } - - // Very common: ( and ) and ; - if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { - return scanPunctuator(); - } - - // String literal starts with single quote (U+0027) or double quote (U+0022). - if (cp === 0x27 || cp === 0x22) { - return scanStringLiteral(); - } - - // Dot (.) U+002E can also start a floating-point number, hence the need - // to check the next character. - if (cp === 0x2E) { - if (isDecimalDigit(source.charCodeAt(index + 1))) { - return scanNumericLiteral(); - } - return scanPunctuator(); - } - - if (isDecimalDigit(cp)) { - return scanNumericLiteral(); - } - - // Slash (/) U+002F can also start a regex. - if (extra.tokenize && cp === 0x2F) { - return advanceSlash(); - } - - // Template literals start with ` (U+0060) for template head - // or } (U+007D) for template middle or template tail. - if (cp === 0x60 || (cp === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) { - return scanTemplate(); - } - - // Possible identifier start in a surrogate pair. - if (cp >= 0xD800 && cp < 0xDFFF) { - cp = codePointAt(index); - if (isIdentifierStart(cp)) { - return scanIdentifier(); - } - } - - return scanPunctuator(); - } - - function collectToken() { - var loc, token, value, entry; - - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - value = source.slice(token.start, token.end); - entry = { - type: TokenName[token.type], - value: value, - range: [token.start, token.end], - loc: loc - }; - if (token.regex) { - entry.regex = { - pattern: token.regex.pattern, - flags: token.regex.flags - }; - } - if (extra.tokenValues) { - extra.tokenValues.push((entry.type === 'Punctuator' || entry.type === 'Keyword') ? entry.value : null); - } - if (extra.tokenize) { - if (!extra.range) { - delete entry.range; - } - if (!extra.loc) { - delete entry.loc; - } - if (extra.delegate) { - entry = extra.delegate(entry); - } - } - extra.tokens.push(entry); - } - - return token; - } - - function lex() { - var token; - scanning = true; - - lastIndex = index; - lastLineNumber = lineNumber; - lastLineStart = lineStart; - - skipComment(); - - token = lookahead; - - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - scanning = false; - return token; - } - - function peek() { - scanning = true; - - skipComment(); - - lastIndex = index; - lastLineNumber = lineNumber; - lastLineStart = lineStart; - - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - - lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); - scanning = false; - } - - function Position() { - this.line = startLineNumber; - this.column = startIndex - startLineStart; - } - - function SourceLocation() { - this.start = new Position(); - this.end = null; - } - - function WrappingSourceLocation(startToken) { - this.start = { - line: startToken.lineNumber, - column: startToken.start - startToken.lineStart - }; - this.end = null; - } - - function Node() { - if (extra.range) { - this.range = [startIndex, 0]; - } - if (extra.loc) { - this.loc = new SourceLocation(); - } - } - - function WrappingNode(startToken) { - if (extra.range) { - this.range = [startToken.start, 0]; - } - if (extra.loc) { - this.loc = new WrappingSourceLocation(startToken); - } - } - - WrappingNode.prototype = Node.prototype = { - - processComment: function () { - var lastChild, - innerComments, - leadingComments, - trailingComments, - bottomRight = extra.bottomRightStack, - i, - comment, - last = bottomRight[bottomRight.length - 1]; - - if (this.type === Syntax.Program) { - if (this.body.length > 0) { - return; - } - } - /** - * patch innnerComments for properties empty block - * `function a() {/** comments **\/}` - */ - - if (this.type === Syntax.BlockStatement && this.body.length === 0) { - innerComments = []; - for (i = extra.leadingComments.length - 1; i >= 0; --i) { - comment = extra.leadingComments[i]; - if (this.range[1] >= comment.range[1]) { - innerComments.unshift(comment); - extra.leadingComments.splice(i, 1); - extra.trailingComments.splice(i, 1); - } - } - if (innerComments.length) { - this.innerComments = innerComments; - //bottomRight.push(this); - return; - } - } - - if (extra.trailingComments.length > 0) { - trailingComments = []; - for (i = extra.trailingComments.length - 1; i >= 0; --i) { - comment = extra.trailingComments[i]; - if (comment.range[0] >= this.range[1]) { - trailingComments.unshift(comment); - extra.trailingComments.splice(i, 1); - } - } - extra.trailingComments = []; - } else { - if (last && last.trailingComments && last.trailingComments[0].range[0] >= this.range[1]) { - trailingComments = last.trailingComments; - delete last.trailingComments; - } - } - - // Eating the stack. - while (last && last.range[0] >= this.range[0]) { - lastChild = bottomRight.pop(); - last = bottomRight[bottomRight.length - 1]; - } - - if (lastChild) { - if (lastChild.leadingComments) { - leadingComments = []; - for (i = lastChild.leadingComments.length - 1; i >= 0; --i) { - comment = lastChild.leadingComments[i]; - if (comment.range[1] <= this.range[0]) { - leadingComments.unshift(comment); - lastChild.leadingComments.splice(i, 1); - } - } - - if (!lastChild.leadingComments.length) { - lastChild.leadingComments = undefined; - } - } - } else if (extra.leadingComments.length > 0) { - leadingComments = []; - for (i = extra.leadingComments.length - 1; i >= 0; --i) { - comment = extra.leadingComments[i]; - if (comment.range[1] <= this.range[0]) { - leadingComments.unshift(comment); - extra.leadingComments.splice(i, 1); - } - } - } - - - if (leadingComments && leadingComments.length > 0) { - this.leadingComments = leadingComments; - } - if (trailingComments && trailingComments.length > 0) { - this.trailingComments = trailingComments; - } - - bottomRight.push(this); - }, - - finish: function () { - if (extra.range) { - this.range[1] = lastIndex; - } - if (extra.loc) { - this.loc.end = { - line: lastLineNumber, - column: lastIndex - lastLineStart - }; - if (extra.source) { - this.loc.source = extra.source; - } - } - - if (extra.attachComment) { - this.processComment(); - } - }, - - finishArrayExpression: function (elements) { - this.type = Syntax.ArrayExpression; - this.elements = elements; - this.finish(); - return this; - }, - - finishArrayPattern: function (elements) { - this.type = Syntax.ArrayPattern; - this.elements = elements; - this.finish(); - return this; - }, - - finishArrowFunctionExpression: function (params, defaults, body, expression) { - this.type = Syntax.ArrowFunctionExpression; - this.id = null; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = false; - this.expression = expression; - this.finish(); - return this; - }, - - finishAssignmentExpression: function (operator, left, right) { - this.type = Syntax.AssignmentExpression; - this.operator = operator; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishAssignmentPattern: function (left, right) { - this.type = Syntax.AssignmentPattern; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishBinaryExpression: function (operator, left, right) { - this.type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : Syntax.BinaryExpression; - this.operator = operator; - this.left = left; - this.right = right; - this.finish(); - return this; - }, - - finishBlockStatement: function (body) { - this.type = Syntax.BlockStatement; - this.body = body; - this.finish(); - return this; - }, - - finishBreakStatement: function (label) { - this.type = Syntax.BreakStatement; - this.label = label; - this.finish(); - return this; - }, - - finishCallExpression: function (callee, args) { - this.type = Syntax.CallExpression; - this.callee = callee; - this.arguments = args; - this.finish(); - return this; - }, - - finishCatchClause: function (param, body) { - this.type = Syntax.CatchClause; - this.param = param; - this.body = body; - this.finish(); - return this; - }, - - finishClassBody: function (body) { - this.type = Syntax.ClassBody; - this.body = body; - this.finish(); - return this; - }, - - finishClassDeclaration: function (id, superClass, body) { - this.type = Syntax.ClassDeclaration; - this.id = id; - this.superClass = superClass; - this.body = body; - this.finish(); - return this; - }, - - finishClassExpression: function (id, superClass, body) { - this.type = Syntax.ClassExpression; - this.id = id; - this.superClass = superClass; - this.body = body; - this.finish(); - return this; - }, - - finishConditionalExpression: function (test, consequent, alternate) { - this.type = Syntax.ConditionalExpression; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - this.finish(); - return this; - }, - - finishContinueStatement: function (label) { - this.type = Syntax.ContinueStatement; - this.label = label; - this.finish(); - return this; - }, - - finishDebuggerStatement: function () { - this.type = Syntax.DebuggerStatement; - this.finish(); - return this; - }, - - finishDoWhileStatement: function (body, test) { - this.type = Syntax.DoWhileStatement; - this.body = body; - this.test = test; - this.finish(); - return this; - }, - - finishEmptyStatement: function () { - this.type = Syntax.EmptyStatement; - this.finish(); - return this; - }, - - finishExpressionStatement: function (expression) { - this.type = Syntax.ExpressionStatement; - this.expression = expression; - this.finish(); - return this; - }, - - finishForStatement: function (init, test, update, body) { - this.type = Syntax.ForStatement; - this.init = init; - this.test = test; - this.update = update; - this.body = body; - this.finish(); - return this; - }, - - finishForOfStatement: function (left, right, body) { - this.type = Syntax.ForOfStatement; - this.left = left; - this.right = right; - this.body = body; - this.finish(); - return this; - }, - - finishForInStatement: function (left, right, body) { - this.type = Syntax.ForInStatement; - this.left = left; - this.right = right; - this.body = body; - this.each = false; - this.finish(); - return this; - }, - - finishFunctionDeclaration: function (id, params, defaults, body, generator) { - this.type = Syntax.FunctionDeclaration; - this.id = id; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = generator; - this.expression = false; - this.finish(); - return this; - }, - - finishFunctionExpression: function (id, params, defaults, body, generator) { - this.type = Syntax.FunctionExpression; - this.id = id; - this.params = params; - this.defaults = defaults; - this.body = body; - this.generator = generator; - this.expression = false; - this.finish(); - return this; - }, - - finishIdentifier: function (name) { - this.type = Syntax.Identifier; - this.name = name; - this.finish(); - return this; - }, - - finishIfStatement: function (test, consequent, alternate) { - this.type = Syntax.IfStatement; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - this.finish(); - return this; - }, - - finishLabeledStatement: function (label, body) { - this.type = Syntax.LabeledStatement; - this.label = label; - this.body = body; - this.finish(); - return this; - }, - - finishLiteral: function (token) { - this.type = Syntax.Literal; - this.value = token.value; - this.raw = source.slice(token.start, token.end); - if (token.regex) { - this.regex = token.regex; - } - this.finish(); - return this; - }, - - finishMemberExpression: function (accessor, object, property) { - this.type = Syntax.MemberExpression; - this.computed = accessor === '['; - this.object = object; - this.property = property; - this.finish(); - return this; - }, - - finishMetaProperty: function (meta, property) { - this.type = Syntax.MetaProperty; - this.meta = meta; - this.property = property; - this.finish(); - return this; - }, - - finishNewExpression: function (callee, args) { - this.type = Syntax.NewExpression; - this.callee = callee; - this.arguments = args; - this.finish(); - return this; - }, - - finishObjectExpression: function (properties) { - this.type = Syntax.ObjectExpression; - this.properties = properties; - this.finish(); - return this; - }, - - finishObjectPattern: function (properties) { - this.type = Syntax.ObjectPattern; - this.properties = properties; - this.finish(); - return this; - }, - - finishPostfixExpression: function (operator, argument) { - this.type = Syntax.UpdateExpression; - this.operator = operator; - this.argument = argument; - this.prefix = false; - this.finish(); - return this; - }, - - finishProgram: function (body, sourceType) { - this.type = Syntax.Program; - this.body = body; - this.sourceType = sourceType; - this.finish(); - return this; - }, - - finishProperty: function (kind, key, computed, value, method, shorthand) { - this.type = Syntax.Property; - this.key = key; - this.computed = computed; - this.value = value; - this.kind = kind; - this.method = method; - this.shorthand = shorthand; - this.finish(); - return this; - }, - - finishRestElement: function (argument) { - this.type = Syntax.RestElement; - this.argument = argument; - this.finish(); - return this; - }, - - finishReturnStatement: function (argument) { - this.type = Syntax.ReturnStatement; - this.argument = argument; - this.finish(); - return this; - }, - - finishSequenceExpression: function (expressions) { - this.type = Syntax.SequenceExpression; - this.expressions = expressions; - this.finish(); - return this; - }, - - finishSpreadElement: function (argument) { - this.type = Syntax.SpreadElement; - this.argument = argument; - this.finish(); - return this; - }, - - finishSwitchCase: function (test, consequent) { - this.type = Syntax.SwitchCase; - this.test = test; - this.consequent = consequent; - this.finish(); - return this; - }, - - finishSuper: function () { - this.type = Syntax.Super; - this.finish(); - return this; - }, - - finishSwitchStatement: function (discriminant, cases) { - this.type = Syntax.SwitchStatement; - this.discriminant = discriminant; - this.cases = cases; - this.finish(); - return this; - }, - - finishTaggedTemplateExpression: function (tag, quasi) { - this.type = Syntax.TaggedTemplateExpression; - this.tag = tag; - this.quasi = quasi; - this.finish(); - return this; - }, - - finishTemplateElement: function (value, tail) { - this.type = Syntax.TemplateElement; - this.value = value; - this.tail = tail; - this.finish(); - return this; - }, - - finishTemplateLiteral: function (quasis, expressions) { - this.type = Syntax.TemplateLiteral; - this.quasis = quasis; - this.expressions = expressions; - this.finish(); - return this; - }, - - finishThisExpression: function () { - this.type = Syntax.ThisExpression; - this.finish(); - return this; - }, - - finishThrowStatement: function (argument) { - this.type = Syntax.ThrowStatement; - this.argument = argument; - this.finish(); - return this; - }, - - finishTryStatement: function (block, handler, finalizer) { - this.type = Syntax.TryStatement; - this.block = block; - this.guardedHandlers = []; - this.handlers = handler ? [handler] : []; - this.handler = handler; - this.finalizer = finalizer; - this.finish(); - return this; - }, - - finishUnaryExpression: function (operator, argument) { - this.type = (operator === '++' || operator === '--') ? Syntax.UpdateExpression : Syntax.UnaryExpression; - this.operator = operator; - this.argument = argument; - this.prefix = true; - this.finish(); - return this; - }, - - finishVariableDeclaration: function (declarations) { - this.type = Syntax.VariableDeclaration; - this.declarations = declarations; - this.kind = 'var'; - this.finish(); - return this; - }, - - finishLexicalDeclaration: function (declarations, kind) { - this.type = Syntax.VariableDeclaration; - this.declarations = declarations; - this.kind = kind; - this.finish(); - return this; - }, - - finishVariableDeclarator: function (id, init) { - this.type = Syntax.VariableDeclarator; - this.id = id; - this.init = init; - this.finish(); - return this; - }, - - finishWhileStatement: function (test, body) { - this.type = Syntax.WhileStatement; - this.test = test; - this.body = body; - this.finish(); - return this; - }, - - finishWithStatement: function (object, body) { - this.type = Syntax.WithStatement; - this.object = object; - this.body = body; - this.finish(); - return this; - }, - - finishExportSpecifier: function (local, exported) { - this.type = Syntax.ExportSpecifier; - this.exported = exported || local; - this.local = local; - this.finish(); - return this; - }, - - finishImportDefaultSpecifier: function (local) { - this.type = Syntax.ImportDefaultSpecifier; - this.local = local; - this.finish(); - return this; - }, - - finishImportNamespaceSpecifier: function (local) { - this.type = Syntax.ImportNamespaceSpecifier; - this.local = local; - this.finish(); - return this; - }, - - finishExportNamedDeclaration: function (declaration, specifiers, src) { - this.type = Syntax.ExportNamedDeclaration; - this.declaration = declaration; - this.specifiers = specifiers; - this.source = src; - this.finish(); - return this; - }, - - finishExportDefaultDeclaration: function (declaration) { - this.type = Syntax.ExportDefaultDeclaration; - this.declaration = declaration; - this.finish(); - return this; - }, - - finishExportAllDeclaration: function (src) { - this.type = Syntax.ExportAllDeclaration; - this.source = src; - this.finish(); - return this; - }, - - finishImportSpecifier: function (local, imported) { - this.type = Syntax.ImportSpecifier; - this.local = local || imported; - this.imported = imported; - this.finish(); - return this; - }, - - finishImportDeclaration: function (specifiers, src) { - this.type = Syntax.ImportDeclaration; - this.specifiers = specifiers; - this.source = src; - this.finish(); - return this; - }, - - finishYieldExpression: function (argument, delegate) { - this.type = Syntax.YieldExpression; - this.argument = argument; - this.delegate = delegate; - this.finish(); - return this; - } - }; - - - function recordError(error) { - var e, existing; - - for (e = 0; e < extra.errors.length; e++) { - existing = extra.errors[e]; - // Prevent duplicated error. - /* istanbul ignore next */ - if (existing.index === error.index && existing.message === error.message) { - return; - } - } - - extra.errors.push(error); - } - - function constructError(msg, column) { - var error = new Error(msg); - try { - throw error; - } catch (base) { - /* istanbul ignore else */ - if (Object.create && Object.defineProperty) { - error = Object.create(base); - Object.defineProperty(error, 'column', { value: column }); - } - } finally { - return error; - } - } - - function createError(line, pos, description) { - var msg, column, error; - - msg = 'Line ' + line + ': ' + description; - column = pos - (scanning ? lineStart : lastLineStart) + 1; - error = constructError(msg, column); - error.lineNumber = line; - error.description = description; - error.index = pos; - return error; - } - - // Throw an exception - - function throwError(messageFormat) { - var args, msg; - - args = Array.prototype.slice.call(arguments, 1); - msg = messageFormat.replace(/%(\d)/g, - function (whole, idx) { - assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - } - ); - - throw createError(lastLineNumber, lastIndex, msg); - } - - function tolerateError(messageFormat) { - var args, msg, error; - - args = Array.prototype.slice.call(arguments, 1); - /* istanbul ignore next */ - msg = messageFormat.replace(/%(\d)/g, - function (whole, idx) { - assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - } - ); - - error = createError(lineNumber, lastIndex, msg); - if (extra.errors) { - recordError(error); - } else { - throw error; - } - } - - // Throw an exception because of the token. - - function unexpectedTokenError(token, message) { - var value, msg = message || Messages.UnexpectedToken; - - if (token) { - if (!message) { - msg = (token.type === Token.EOF) ? Messages.UnexpectedEOS : - (token.type === Token.Identifier) ? Messages.UnexpectedIdentifier : - (token.type === Token.NumericLiteral) ? Messages.UnexpectedNumber : - (token.type === Token.StringLiteral) ? Messages.UnexpectedString : - (token.type === Token.Template) ? Messages.UnexpectedTemplate : - Messages.UnexpectedToken; - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - msg = Messages.UnexpectedReserved; - } else if (strict && isStrictModeReservedWord(token.value)) { - msg = Messages.StrictReservedWord; - } - } - } - - value = (token.type === Token.Template) ? token.value.raw : token.value; - } else { - value = 'ILLEGAL'; - } - - msg = msg.replace('%0', value); - - return (token && typeof token.lineNumber === 'number') ? - createError(token.lineNumber, token.start, msg) : - createError(scanning ? lineNumber : lastLineNumber, scanning ? index : lastIndex, msg); - } - - function throwUnexpectedToken(token, message) { - throw unexpectedTokenError(token, message); - } - - function tolerateUnexpectedToken(token, message) { - var error = unexpectedTokenError(token, message); - if (extra.errors) { - recordError(error); - } else { - throw error; - } - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpectedToken(token); - } - } - - /** - * @name expectCommaSeparator - * @description Quietly expect a comma when in tolerant mode, otherwise delegates - * to <code>expect(value)</code> - * @since 2.0 - */ - function expectCommaSeparator() { - var token; - - if (extra.errors) { - token = lookahead; - if (token.type === Token.Punctuator && token.value === ',') { - lex(); - } else if (token.type === Token.Punctuator && token.value === ';') { - lex(); - tolerateUnexpectedToken(token); - } else { - tolerateUnexpectedToken(token, Messages.UnexpectedToken); - } - } else { - expect(','); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpectedToken(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - return lookahead.type === Token.Punctuator && lookahead.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - return lookahead.type === Token.Keyword && lookahead.value === keyword; - } - - // Return true if the next token matches the specified contextual keyword - // (where an identifier is sometimes a keyword depending on the context) - - function matchContextualKeyword(keyword) { - return lookahead.type === Token.Identifier && lookahead.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var op; - - if (lookahead.type !== Token.Punctuator) { - return false; - } - op = lookahead.value; - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(startIndex) === 0x3B || match(';')) { - lex(); - return; - } - - if (hasLineTerminator) { - return; - } - - // FIXME(ikarienator): this is seemingly an issue in the previous location info convention. - lastIndex = startIndex; - lastLineNumber = startLineNumber; - lastLineStart = startLineStart; - - if (lookahead.type !== Token.EOF && !match('}')) { - throwUnexpectedToken(lookahead); - } - } - - // Cover grammar support. - // - // When an assignment expression position starts with an left parenthesis, the determination of the type - // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) - // or the first comma. This situation also defers the determination of all the expressions nested in the pair. - // - // There are three productions that can be parsed in a parentheses pair that needs to be determined - // after the outermost pair is closed. They are: - // - // 1. AssignmentExpression - // 2. BindingElements - // 3. AssignmentTargets - // - // In order to avoid exponential backtracking, we use two flags to denote if the production can be - // binding element or assignment target. - // - // The three productions have the relationship: - // - // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression - // - // with a single exception that CoverInitializedName when used directly in an Expression, generates - // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the - // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. - // - // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not - // effect the current flags. This means the production the parser parses is only used as an expression. Therefore - // the CoverInitializedName check is conducted. - // - // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates - // the flags outside of the parser. This means the production the parser parses is used as a part of a potential - // pattern. The CoverInitializedName check is deferred. - function isolateCoverGrammar(parser) { - var oldIsBindingElement = isBindingElement, - oldIsAssignmentTarget = isAssignmentTarget, - oldFirstCoverInitializedNameError = firstCoverInitializedNameError, - result; - isBindingElement = true; - isAssignmentTarget = true; - firstCoverInitializedNameError = null; - result = parser(); - if (firstCoverInitializedNameError !== null) { - throwUnexpectedToken(firstCoverInitializedNameError); - } - isBindingElement = oldIsBindingElement; - isAssignmentTarget = oldIsAssignmentTarget; - firstCoverInitializedNameError = oldFirstCoverInitializedNameError; - return result; - } - - function inheritCoverGrammar(parser) { - var oldIsBindingElement = isBindingElement, - oldIsAssignmentTarget = isAssignmentTarget, - oldFirstCoverInitializedNameError = firstCoverInitializedNameError, - result; - isBindingElement = true; - isAssignmentTarget = true; - firstCoverInitializedNameError = null; - result = parser(); - isBindingElement = isBindingElement && oldIsBindingElement; - isAssignmentTarget = isAssignmentTarget && oldIsAssignmentTarget; - firstCoverInitializedNameError = oldFirstCoverInitializedNameError || firstCoverInitializedNameError; - return result; - } - - // ECMA-262 13.3.3 Destructuring Binding Patterns - - function parseArrayPattern(params, kind) { - var node = new Node(), elements = [], rest, restNode; - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - if (match('...')) { - restNode = new Node(); - lex(); - params.push(lookahead); - rest = parseVariableIdentifier(kind); - elements.push(restNode.finishRestElement(rest)); - break; - } else { - elements.push(parsePatternWithDefault(params, kind)); - } - if (!match(']')) { - expect(','); - } - } - - } - - expect(']'); - - return node.finishArrayPattern(elements); - } - - function parsePropertyPattern(params, kind) { - var node = new Node(), key, keyToken, computed = match('['), init; - if (lookahead.type === Token.Identifier) { - keyToken = lookahead; - key = parseVariableIdentifier(); - if (match('=')) { - params.push(keyToken); - lex(); - init = parseAssignmentExpression(); - - return node.finishProperty( - 'init', key, false, - new WrappingNode(keyToken).finishAssignmentPattern(key, init), false, false); - } else if (!match(':')) { - params.push(keyToken); - return node.finishProperty('init', key, false, key, false, true); - } - } else { - key = parseObjectPropertyKey(); - } - expect(':'); - init = parsePatternWithDefault(params, kind); - return node.finishProperty('init', key, computed, init, false, false); - } - - function parseObjectPattern(params, kind) { - var node = new Node(), properties = []; - - expect('{'); - - while (!match('}')) { - properties.push(parsePropertyPattern(params, kind)); - if (!match('}')) { - expect(','); - } - } - - lex(); - - return node.finishObjectPattern(properties); - } - - function parsePattern(params, kind) { - if (match('[')) { - return parseArrayPattern(params, kind); - } else if (match('{')) { - return parseObjectPattern(params, kind); - } else if (matchKeyword('let')) { - if (kind === 'const' || kind === 'let') { - tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken); - } - } - - params.push(lookahead); - return parseVariableIdentifier(kind); - } - - function parsePatternWithDefault(params, kind) { - var startToken = lookahead, pattern, previousAllowYield, right; - pattern = parsePattern(params, kind); - if (match('=')) { - lex(); - previousAllowYield = state.allowYield; - state.allowYield = true; - right = isolateCoverGrammar(parseAssignmentExpression); - state.allowYield = previousAllowYield; - pattern = new WrappingNode(startToken).finishAssignmentPattern(pattern, right); - } - return pattern; - } - - // ECMA-262 12.2.5 Array Initializer - - function parseArrayInitializer() { - var elements = [], node = new Node(), restSpread; - - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else if (match('...')) { - restSpread = new Node(); - lex(); - restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression)); - - if (!match(']')) { - isAssignmentTarget = isBindingElement = false; - expect(','); - } - elements.push(restSpread); - } else { - elements.push(inheritCoverGrammar(parseAssignmentExpression)); - - if (!match(']')) { - expect(','); - } - } - } - - lex(); - - return node.finishArrayExpression(elements); - } - - // ECMA-262 12.2.6 Object Initializer - - function parsePropertyFunction(node, paramInfo, isGenerator) { - var previousStrict, body; - - isAssignmentTarget = isBindingElement = false; - - previousStrict = strict; - body = isolateCoverGrammar(parseFunctionSourceElements); - - if (strict && paramInfo.firstRestricted) { - tolerateUnexpectedToken(paramInfo.firstRestricted, paramInfo.message); - } - if (strict && paramInfo.stricted) { - tolerateUnexpectedToken(paramInfo.stricted, paramInfo.message); - } - - strict = previousStrict; - return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body, isGenerator); - } - - function parsePropertyMethodFunction() { - var params, method, node = new Node(), - previousAllowYield = state.allowYield; - - state.allowYield = false; - params = parseParams(); - state.allowYield = previousAllowYield; - - state.allowYield = false; - method = parsePropertyFunction(node, params, false); - state.allowYield = previousAllowYield; - - return method; - } - - function parseObjectPropertyKey() { - var token, node = new Node(), expr; - - token = lex(); - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - switch (token.type) { - case Token.StringLiteral: - case Token.NumericLiteral: - if (strict && token.octal) { - tolerateUnexpectedToken(token, Messages.StrictOctalLiteral); - } - return node.finishLiteral(token); - case Token.Identifier: - case Token.BooleanLiteral: - case Token.NullLiteral: - case Token.Keyword: - return node.finishIdentifier(token.value); - case Token.Punctuator: - if (token.value === '[') { - expr = isolateCoverGrammar(parseAssignmentExpression); - expect(']'); - return expr; - } - break; - } - throwUnexpectedToken(token); - } - - function lookaheadPropertyName() { - switch (lookahead.type) { - case Token.Identifier: - case Token.StringLiteral: - case Token.BooleanLiteral: - case Token.NullLiteral: - case Token.NumericLiteral: - case Token.Keyword: - return true; - case Token.Punctuator: - return lookahead.value === '['; - } - return false; - } - - // This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals, - // it might be called at a position where there is in fact a short hand identifier pattern or a data property. - // This can only be determined after we consumed up to the left parentheses. - // - // In order to avoid back tracking, it returns `null` if the position is not a MethodDefinition and the caller - // is responsible to visit other options. - function tryParseMethodDefinition(token, key, computed, node) { - var value, options, methodNode, params, - previousAllowYield = state.allowYield; - - if (token.type === Token.Identifier) { - // check for `get` and `set`; - - if (token.value === 'get' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); - expect('('); - expect(')'); - - state.allowYield = false; - value = parsePropertyFunction(methodNode, { - params: [], - defaults: [], - stricted: null, - firstRestricted: null, - message: null - }, false); - state.allowYield = previousAllowYield; - - return node.finishProperty('get', key, computed, value, false, false); - } else if (token.value === 'set' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); - expect('('); - - options = { - params: [], - defaultCount: 0, - defaults: [], - firstRestricted: null, - paramSet: {} - }; - if (match(')')) { - tolerateUnexpectedToken(lookahead); - } else { - state.allowYield = false; - parseParam(options); - state.allowYield = previousAllowYield; - if (options.defaultCount === 0) { - options.defaults = []; - } - } - expect(')'); - - state.allowYield = false; - value = parsePropertyFunction(methodNode, options, false); - state.allowYield = previousAllowYield; - - return node.finishProperty('set', key, computed, value, false, false); - } - } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyName()) { - computed = match('['); - key = parseObjectPropertyKey(); - methodNode = new Node(); - - state.allowYield = true; - params = parseParams(); - state.allowYield = previousAllowYield; - - state.allowYield = false; - value = parsePropertyFunction(methodNode, params, true); - state.allowYield = previousAllowYield; - - return node.finishProperty('init', key, computed, value, true, false); - } - - if (key && match('(')) { - value = parsePropertyMethodFunction(); - return node.finishProperty('init', key, computed, value, true, false); - } - - // Not a MethodDefinition. - return null; - } - - function parseObjectProperty(hasProto) { - var token = lookahead, node = new Node(), computed, key, maybeMethod, proto, value; - - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - } - maybeMethod = tryParseMethodDefinition(token, key, computed, node); - if (maybeMethod) { - return maybeMethod; - } - - if (!key) { - throwUnexpectedToken(lookahead); - } - - // Check for duplicated __proto__ - if (!computed) { - proto = (key.type === Syntax.Identifier && key.name === '__proto__') || - (key.type === Syntax.Literal && key.value === '__proto__'); - if (hasProto.value && proto) { - tolerateError(Messages.DuplicateProtoProperty); - } - hasProto.value |= proto; - } - - if (match(':')) { - lex(); - value = inheritCoverGrammar(parseAssignmentExpression); - return node.finishProperty('init', key, computed, value, false, false); - } - - if (token.type === Token.Identifier) { - if (match('=')) { - firstCoverInitializedNameError = lookahead; - lex(); - value = isolateCoverGrammar(parseAssignmentExpression); - return node.finishProperty('init', key, computed, - new WrappingNode(token).finishAssignmentPattern(key, value), false, true); - } - return node.finishProperty('init', key, computed, key, false, true); - } - - throwUnexpectedToken(lookahead); - } - - function parseObjectInitializer() { - var properties = [], hasProto = {value: false}, node = new Node(); - - expect('{'); - - while (!match('}')) { - properties.push(parseObjectProperty(hasProto)); - - if (!match('}')) { - expectCommaSeparator(); - } - } - - expect('}'); - - return node.finishObjectExpression(properties); - } - - function reinterpretExpressionAsPattern(expr) { - var i; - switch (expr.type) { - case Syntax.Identifier: - case Syntax.MemberExpression: - case Syntax.RestElement: - case Syntax.AssignmentPattern: - break; - case Syntax.SpreadElement: - expr.type = Syntax.RestElement; - reinterpretExpressionAsPattern(expr.argument); - break; - case Syntax.ArrayExpression: - expr.type = Syntax.ArrayPattern; - for (i = 0; i < expr.elements.length; i++) { - if (expr.elements[i] !== null) { - reinterpretExpressionAsPattern(expr.elements[i]); - } - } - break; - case Syntax.ObjectExpression: - expr.type = Syntax.ObjectPattern; - for (i = 0; i < expr.properties.length; i++) { - reinterpretExpressionAsPattern(expr.properties[i].value); - } - break; - case Syntax.AssignmentExpression: - expr.type = Syntax.AssignmentPattern; - reinterpretExpressionAsPattern(expr.left); - break; - default: - // Allow other node type for tolerant parsing. - break; - } - } - - // ECMA-262 12.2.9 Template Literals - - function parseTemplateElement(option) { - var node, token; - - if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) { - throwUnexpectedToken(); - } - - node = new Node(); - token = lex(); - - return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail); - } - - function parseTemplateLiteral() { - var quasi, quasis, expressions, node = new Node(); - - quasi = parseTemplateElement({ head: true }); - quasis = [quasi]; - expressions = []; - - while (!quasi.tail) { - expressions.push(parseExpression()); - quasi = parseTemplateElement({ head: false }); - quasis.push(quasi); - } - - return node.finishTemplateLiteral(quasis, expressions); - } - - // ECMA-262 12.2.10 The Grouping Operator - - function parseGroupExpression() { - var expr, expressions, startToken, i, params = []; - - expect('('); - - if (match(')')) { - lex(); - if (!match('=>')) { - expect('=>'); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [], - rawParams: [] - }; - } - - startToken = lookahead; - if (match('...')) { - expr = parseRestElement(params); - expect(')'); - if (!match('=>')) { - expect('=>'); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [expr] - }; - } - - isBindingElement = true; - expr = inheritCoverGrammar(parseAssignmentExpression); - - if (match(',')) { - isAssignmentTarget = false; - expressions = [expr]; - - while (startIndex < length) { - if (!match(',')) { - break; - } - lex(); - - if (match('...')) { - if (!isBindingElement) { - throwUnexpectedToken(lookahead); - } - expressions.push(parseRestElement(params)); - expect(')'); - if (!match('=>')) { - expect('=>'); - } - isBindingElement = false; - for (i = 0; i < expressions.length; i++) { - reinterpretExpressionAsPattern(expressions[i]); - } - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: expressions - }; - } - - expressions.push(inheritCoverGrammar(parseAssignmentExpression)); - } - - expr = new WrappingNode(startToken).finishSequenceExpression(expressions); - } - - - expect(')'); - - if (match('=>')) { - if (expr.type === Syntax.Identifier && expr.name === 'yield') { - return { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: [expr] - }; - } - - if (!isBindingElement) { - throwUnexpectedToken(lookahead); - } - - if (expr.type === Syntax.SequenceExpression) { - for (i = 0; i < expr.expressions.length; i++) { - reinterpretExpressionAsPattern(expr.expressions[i]); - } - } else { - reinterpretExpressionAsPattern(expr); - } - - expr = { - type: PlaceHolders.ArrowParameterPlaceHolder, - params: expr.type === Syntax.SequenceExpression ? expr.expressions : [expr] - }; - } - isBindingElement = false; - return expr; - } - - - // ECMA-262 12.2 Primary Expressions - - function parsePrimaryExpression() { - var type, token, expr, node; - - if (match('(')) { - isBindingElement = false; - return inheritCoverGrammar(parseGroupExpression); - } - - if (match('[')) { - return inheritCoverGrammar(parseArrayInitializer); - } - - if (match('{')) { - return inheritCoverGrammar(parseObjectInitializer); - } - - type = lookahead.type; - node = new Node(); - - if (type === Token.Identifier) { - if (state.sourceType === 'module' && lookahead.value === 'await') { - tolerateUnexpectedToken(lookahead); - } - expr = node.finishIdentifier(lex().value); - } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { - isAssignmentTarget = isBindingElement = false; - if (strict && lookahead.octal) { - tolerateUnexpectedToken(lookahead, Messages.StrictOctalLiteral); - } - expr = node.finishLiteral(lex()); - } else if (type === Token.Keyword) { - if (!strict && state.allowYield && matchKeyword('yield')) { - return parseNonComputedProperty(); - } - if (!strict && matchKeyword('let')) { - return node.finishIdentifier(lex().value); - } - isAssignmentTarget = isBindingElement = false; - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - if (matchKeyword('this')) { - lex(); - return node.finishThisExpression(); - } - if (matchKeyword('class')) { - return parseClassExpression(); - } - throwUnexpectedToken(lex()); - } else if (type === Token.BooleanLiteral) { - isAssignmentTarget = isBindingElement = false; - token = lex(); - token.value = (token.value === 'true'); - expr = node.finishLiteral(token); - } else if (type === Token.NullLiteral) { - isAssignmentTarget = isBindingElement = false; - token = lex(); - token.value = null; - expr = node.finishLiteral(token); - } else if (match('/') || match('/=')) { - isAssignmentTarget = isBindingElement = false; - index = startIndex; - - if (typeof extra.tokens !== 'undefined') { - token = collectRegex(); - } else { - token = scanRegExp(); - } - lex(); - expr = node.finishLiteral(token); - } else if (type === Token.Template) { - expr = parseTemplateLiteral(); - } else { - throwUnexpectedToken(lex()); - } - - return expr; - } - - // ECMA-262 12.3 Left-Hand-Side Expressions - - function parseArguments() { - var args = [], expr; - - expect('('); - - if (!match(')')) { - while (startIndex < length) { - if (match('...')) { - expr = new Node(); - lex(); - expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression)); - } else { - expr = isolateCoverGrammar(parseAssignmentExpression); - } - args.push(expr); - if (match(')')) { - break; - } - expectCommaSeparator(); - } - } - - expect(')'); - - return args; - } - - function parseNonComputedProperty() { - var token, node = new Node(); - - token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpectedToken(token); - } - - return node.finishIdentifier(token.value); - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = isolateCoverGrammar(parseExpression); - - expect(']'); - - return expr; - } - - // ECMA-262 12.3.3 The new Operator - - function parseNewExpression() { - var callee, args, node = new Node(); - - expectKeyword('new'); - - if (match('.')) { - lex(); - if (lookahead.type === Token.Identifier && lookahead.value === 'target') { - if (state.inFunctionBody) { - lex(); - return node.finishMetaProperty('new', 'target'); - } - } - throwUnexpectedToken(lookahead); - } - - callee = isolateCoverGrammar(parseLeftHandSideExpression); - args = match('(') ? parseArguments() : []; - - isAssignmentTarget = isBindingElement = false; - - return node.finishNewExpression(callee, args); - } - - // ECMA-262 12.3.4 Function Calls - - function parseLeftHandSideExpressionAllowCall() { - var quasi, expr, args, property, startToken, previousAllowIn = state.allowIn; - - startToken = lookahead; - state.allowIn = true; - - if (matchKeyword('super') && state.inFunctionBody) { - expr = new Node(); - lex(); - expr = expr.finishSuper(); - if (!match('(') && !match('.') && !match('[')) { - throwUnexpectedToken(lookahead); - } - } else { - expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); - } - - for (;;) { - if (match('.')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseNonComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); - } else if (match('(')) { - isBindingElement = false; - isAssignmentTarget = false; - args = parseArguments(); - expr = new WrappingNode(startToken).finishCallExpression(expr, args); - } else if (match('[')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); - } else if (lookahead.type === Token.Template && lookahead.head) { - quasi = parseTemplateLiteral(); - expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); - } else { - break; - } - } - state.allowIn = previousAllowIn; - - return expr; - } - - // ECMA-262 12.3 Left-Hand-Side Expressions - - function parseLeftHandSideExpression() { - var quasi, expr, property, startToken; - assert(state.allowIn, 'callee of new expression always allow in keyword.'); - - startToken = lookahead; - - if (matchKeyword('super') && state.inFunctionBody) { - expr = new Node(); - lex(); - expr = expr.finishSuper(); - if (!match('[') && !match('.')) { - throwUnexpectedToken(lookahead); - } - } else { - expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression); - } - - for (;;) { - if (match('[')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property); - } else if (match('.')) { - isBindingElement = false; - isAssignmentTarget = true; - property = parseNonComputedMember(); - expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property); - } else if (lookahead.type === Token.Template && lookahead.head) { - quasi = parseTemplateLiteral(); - expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi); - } else { - break; - } - } - return expr; - } - - // ECMA-262 12.4 Postfix Expressions - - function parsePostfixExpression() { - var expr, token, startToken = lookahead; - - expr = inheritCoverGrammar(parseLeftHandSideExpressionAllowCall); - - if (!hasLineTerminator && lookahead.type === Token.Punctuator) { - if (match('++') || match('--')) { - // ECMA-262 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - tolerateError(Messages.StrictLHSPostfix); - } - - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } - - isAssignmentTarget = isBindingElement = false; - - token = lex(); - expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr); - } - } - - return expr; - } - - // ECMA-262 12.5 Unary Operators - - function parseUnaryExpression() { - var token, expr, startToken; - - if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { - expr = parsePostfixExpression(); - } else if (match('++') || match('--')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - // ECMA-262 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - tolerateError(Messages.StrictLHSPrefix); - } - - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - isAssignmentTarget = isBindingElement = false; - } else if (match('+') || match('-') || match('~') || match('!')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - isAssignmentTarget = isBindingElement = false; - } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - startToken = lookahead; - token = lex(); - expr = inheritCoverGrammar(parseUnaryExpression); - expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr); - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - tolerateError(Messages.StrictDelete); - } - isAssignmentTarget = isBindingElement = false; - } else { - expr = parsePostfixExpression(); - } - - return expr; - } - - function binaryPrecedence(token, allowIn) { - var prec = 0; - - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return 0; - } - - switch (token.value) { - case '||': - prec = 1; - break; - - case '&&': - prec = 2; - break; - - case '|': - prec = 3; - break; - - case '^': - prec = 4; - break; - - case '&': - prec = 5; - break; - - case '==': - case '!=': - case '===': - case '!==': - prec = 6; - break; - - case '<': - case '>': - case '<=': - case '>=': - case 'instanceof': - prec = 7; - break; - - case 'in': - prec = allowIn ? 7 : 0; - break; - - case '<<': - case '>>': - case '>>>': - prec = 8; - break; - - case '+': - case '-': - prec = 9; - break; - - case '*': - case '/': - case '%': - prec = 11; - break; - - default: - break; - } - - return prec; - } - - // ECMA-262 12.6 Multiplicative Operators - // ECMA-262 12.7 Additive Operators - // ECMA-262 12.8 Bitwise Shift Operators - // ECMA-262 12.9 Relational Operators - // ECMA-262 12.10 Equality Operators - // ECMA-262 12.11 Binary Bitwise Operators - // ECMA-262 12.12 Binary Logical Operators - - function parseBinaryExpression() { - var marker, markers, expr, token, prec, stack, right, operator, left, i; - - marker = lookahead; - left = inheritCoverGrammar(parseUnaryExpression); - - token = lookahead; - prec = binaryPrecedence(token, state.allowIn); - if (prec === 0) { - return left; - } - isAssignmentTarget = isBindingElement = false; - token.prec = prec; - lex(); - - markers = [marker, lookahead]; - right = isolateCoverGrammar(parseUnaryExpression); - - stack = [left, token, right]; - - while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { - - // Reduce: make a binary expression from the three topmost entries. - while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { - right = stack.pop(); - operator = stack.pop().value; - left = stack.pop(); - markers.pop(); - expr = new WrappingNode(markers[markers.length - 1]).finishBinaryExpression(operator, left, right); - stack.push(expr); - } - - // Shift. - token = lex(); - token.prec = prec; - stack.push(token); - markers.push(lookahead); - expr = isolateCoverGrammar(parseUnaryExpression); - stack.push(expr); - } - - // Final reduce to clean-up the stack. - i = stack.length - 1; - expr = stack[i]; - markers.pop(); - while (i > 1) { - expr = new WrappingNode(markers.pop()).finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr); - i -= 2; - } - - return expr; - } - - - // ECMA-262 12.13 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent, alternate, startToken; - - startToken = lookahead; - - expr = inheritCoverGrammar(parseBinaryExpression); - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = isolateCoverGrammar(parseAssignmentExpression); - state.allowIn = previousAllowIn; - expect(':'); - alternate = isolateCoverGrammar(parseAssignmentExpression); - - expr = new WrappingNode(startToken).finishConditionalExpression(expr, consequent, alternate); - isAssignmentTarget = isBindingElement = false; - } - - return expr; - } - - // ECMA-262 14.2 Arrow Function Definitions - - function parseConciseBody() { - if (match('{')) { - return parseFunctionSourceElements(); - } - return isolateCoverGrammar(parseAssignmentExpression); - } - - function checkPatternParam(options, param) { - var i; - switch (param.type) { - case Syntax.Identifier: - validateParam(options, param, param.name); - break; - case Syntax.RestElement: - checkPatternParam(options, param.argument); - break; - case Syntax.AssignmentPattern: - checkPatternParam(options, param.left); - break; - case Syntax.ArrayPattern: - for (i = 0; i < param.elements.length; i++) { - if (param.elements[i] !== null) { - checkPatternParam(options, param.elements[i]); - } - } - break; - case Syntax.YieldExpression: - break; - default: - assert(param.type === Syntax.ObjectPattern, 'Invalid type'); - for (i = 0; i < param.properties.length; i++) { - checkPatternParam(options, param.properties[i].value); - } - break; - } - } - function reinterpretAsCoverFormalsList(expr) { - var i, len, param, params, defaults, defaultCount, options, token; - - defaults = []; - defaultCount = 0; - params = [expr]; - - switch (expr.type) { - case Syntax.Identifier: - break; - case PlaceHolders.ArrowParameterPlaceHolder: - params = expr.params; - break; - default: - return null; - } - - options = { - paramSet: {} - }; - - for (i = 0, len = params.length; i < len; i += 1) { - param = params[i]; - switch (param.type) { - case Syntax.AssignmentPattern: - params[i] = param.left; - if (param.right.type === Syntax.YieldExpression) { - if (param.right.argument) { - throwUnexpectedToken(lookahead); - } - param.right.type = Syntax.Identifier; - param.right.name = 'yield'; - delete param.right.argument; - delete param.right.delegate; - } - defaults.push(param.right); - ++defaultCount; - checkPatternParam(options, param.left); - break; - default: - checkPatternParam(options, param); - params[i] = param; - defaults.push(null); - break; - } - } - - if (strict || !state.allowYield) { - for (i = 0, len = params.length; i < len; i += 1) { - param = params[i]; - if (param.type === Syntax.YieldExpression) { - throwUnexpectedToken(lookahead); - } - } - } - - if (options.message === Messages.StrictParamDupe) { - token = strict ? options.stricted : options.firstRestricted; - throwUnexpectedToken(token, options.message); - } - - if (defaultCount === 0) { - defaults = []; - } - - return { - params: params, - defaults: defaults, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - } - - function parseArrowFunctionExpression(options, node) { - var previousStrict, previousAllowYield, body; - - if (hasLineTerminator) { - tolerateUnexpectedToken(lookahead); - } - expect('=>'); - - previousStrict = strict; - previousAllowYield = state.allowYield; - state.allowYield = true; - - body = parseConciseBody(); - - if (strict && options.firstRestricted) { - throwUnexpectedToken(options.firstRestricted, options.message); - } - if (strict && options.stricted) { - tolerateUnexpectedToken(options.stricted, options.message); - } - - strict = previousStrict; - state.allowYield = previousAllowYield; - - return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement); - } - - // ECMA-262 14.4 Yield expression - - function parseYieldExpression() { - var argument, expr, delegate, previousAllowYield; - - argument = null; - expr = new Node(); - delegate = false; - - expectKeyword('yield'); - - if (!hasLineTerminator) { - previousAllowYield = state.allowYield; - state.allowYield = false; - delegate = match('*'); - if (delegate) { - lex(); - argument = parseAssignmentExpression(); - } else { - if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) { - argument = parseAssignmentExpression(); - } - } - state.allowYield = previousAllowYield; - } - - return expr.finishYieldExpression(argument, delegate); - } - - // ECMA-262 12.14 Assignment Operators - - function parseAssignmentExpression() { - var token, expr, right, list, startToken; - - startToken = lookahead; - token = lookahead; - - if (!state.allowYield && matchKeyword('yield')) { - return parseYieldExpression(); - } - - expr = parseConditionalExpression(); - - if (expr.type === PlaceHolders.ArrowParameterPlaceHolder || match('=>')) { - isAssignmentTarget = isBindingElement = false; - list = reinterpretAsCoverFormalsList(expr); - - if (list) { - firstCoverInitializedNameError = null; - return parseArrowFunctionExpression(list, new WrappingNode(startToken)); - } - - return expr; - } - - if (matchAssign()) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInAssignment); - } - - // ECMA-262 12.1.1 - if (strict && expr.type === Syntax.Identifier) { - if (isRestrictedWord(expr.name)) { - tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); - } - if (isStrictModeReservedWord(expr.name)) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } - } - - if (!match('=')) { - isAssignmentTarget = isBindingElement = false; - } else { - reinterpretExpressionAsPattern(expr); - } - - token = lex(); - right = isolateCoverGrammar(parseAssignmentExpression); - expr = new WrappingNode(startToken).finishAssignmentExpression(token.value, expr, right); - firstCoverInitializedNameError = null; - } - - return expr; - } - - // ECMA-262 12.15 Comma Operator - - function parseExpression() { - var expr, startToken = lookahead, expressions; - - expr = isolateCoverGrammar(parseAssignmentExpression); - - if (match(',')) { - expressions = [expr]; - - while (startIndex < length) { - if (!match(',')) { - break; - } - lex(); - expressions.push(isolateCoverGrammar(parseAssignmentExpression)); - } - - expr = new WrappingNode(startToken).finishSequenceExpression(expressions); - } - - return expr; - } - - // ECMA-262 13.2 Block - - function parseStatementListItem() { - if (lookahead.type === Token.Keyword) { - switch (lookahead.value) { - case 'export': - if (state.sourceType !== 'module') { - tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration); - } - return parseExportDeclaration(); - case 'import': - if (state.sourceType !== 'module') { - tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration); - } - return parseImportDeclaration(); - case 'const': - return parseLexicalDeclaration({inFor: false}); - case 'function': - return parseFunctionDeclaration(new Node()); - case 'class': - return parseClassDeclaration(); - } - } - - if (matchKeyword('let') && isLexicalDeclaration()) { - return parseLexicalDeclaration({inFor: false}); - } - - return parseStatement(); - } - - function parseStatementList() { - var list = []; - while (startIndex < length) { - if (match('}')) { - break; - } - list.push(parseStatementListItem()); - } - - return list; - } - - function parseBlock() { - var block, node = new Node(); - - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return node.finishBlockStatement(block); - } - - // ECMA-262 13.3.2 Variable Statement - - function parseVariableIdentifier(kind) { - var token, node = new Node(); - - token = lex(); - - if (token.type === Token.Keyword && token.value === 'yield') { - if (strict) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } if (!state.allowYield) { - throwUnexpectedToken(token); - } - } else if (token.type !== Token.Identifier) { - if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictReservedWord); - } else { - if (strict || token.value !== 'let' || kind !== 'var') { - throwUnexpectedToken(token); - } - } - } else if (state.sourceType === 'module' && token.type === Token.Identifier && token.value === 'await') { - tolerateUnexpectedToken(token); - } - - return node.finishIdentifier(token.value); - } - - function parseVariableDeclaration(options) { - var init = null, id, node = new Node(), params = []; - - id = parsePattern(params, 'var'); - - // ECMA-262 12.2.1 - if (strict && isRestrictedWord(id.name)) { - tolerateError(Messages.StrictVarName); - } - - if (match('=')) { - lex(); - init = isolateCoverGrammar(parseAssignmentExpression); - } else if (id.type !== Syntax.Identifier && !options.inFor) { - expect('='); - } - - return node.finishVariableDeclarator(id, init); - } - - function parseVariableDeclarationList(options) { - var opt, list; - - opt = { inFor: options.inFor }; - list = [parseVariableDeclaration(opt)]; - - while (match(',')) { - lex(); - list.push(parseVariableDeclaration(opt)); - } - - return list; - } - - function parseVariableStatement(node) { - var declarations; - - expectKeyword('var'); - - declarations = parseVariableDeclarationList({ inFor: false }); - - consumeSemicolon(); - - return node.finishVariableDeclaration(declarations); - } - - // ECMA-262 13.3.1 Let and Const Declarations - - function parseLexicalBinding(kind, options) { - var init = null, id, node = new Node(), params = []; - - id = parsePattern(params, kind); - - // ECMA-262 12.2.1 - if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) { - tolerateError(Messages.StrictVarName); - } - - if (kind === 'const') { - if (!matchKeyword('in') && !matchContextualKeyword('of')) { - expect('='); - init = isolateCoverGrammar(parseAssignmentExpression); - } - } else if ((!options.inFor && id.type !== Syntax.Identifier) || match('=')) { - expect('='); - init = isolateCoverGrammar(parseAssignmentExpression); - } - - return node.finishVariableDeclarator(id, init); - } - - function parseBindingList(kind, options) { - var list = [parseLexicalBinding(kind, options)]; - - while (match(',')) { - lex(); - list.push(parseLexicalBinding(kind, options)); - } - - return list; - } - - - function tokenizerState() { - return { - index: index, - lineNumber: lineNumber, - lineStart: lineStart, - hasLineTerminator: hasLineTerminator, - lastIndex: lastIndex, - lastLineNumber: lastLineNumber, - lastLineStart: lastLineStart, - startIndex: startIndex, - startLineNumber: startLineNumber, - startLineStart: startLineStart, - lookahead: lookahead, - tokenCount: extra.tokens ? extra.tokens.length : 0 - }; - } - - function resetTokenizerState(ts) { - index = ts.index; - lineNumber = ts.lineNumber; - lineStart = ts.lineStart; - hasLineTerminator = ts.hasLineTerminator; - lastIndex = ts.lastIndex; - lastLineNumber = ts.lastLineNumber; - lastLineStart = ts.lastLineStart; - startIndex = ts.startIndex; - startLineNumber = ts.startLineNumber; - startLineStart = ts.startLineStart; - lookahead = ts.lookahead; - if (extra.tokens) { - extra.tokens.splice(ts.tokenCount, extra.tokens.length); - } - } - - function isLexicalDeclaration() { - var lexical, ts; - - ts = tokenizerState(); - - lex(); - lexical = (lookahead.type === Token.Identifier) || match('[') || match('{') || - matchKeyword('let') || matchKeyword('yield'); - - resetTokenizerState(ts); - - return lexical; - } - - function parseLexicalDeclaration(options) { - var kind, declarations, node = new Node(); - - kind = lex().value; - assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); - - declarations = parseBindingList(kind, options); - - consumeSemicolon(); - - return node.finishLexicalDeclaration(declarations, kind); - } - - function parseRestElement(params) { - var param, node = new Node(); - - lex(); - - if (match('{')) { - throwError(Messages.ObjectPatternAsRestParameter); - } - - params.push(lookahead); - - param = parseVariableIdentifier(); - - if (match('=')) { - throwError(Messages.DefaultRestParameter); - } - - if (!match(')')) { - throwError(Messages.ParameterAfterRestParameter); - } - - return node.finishRestElement(param); - } - - // ECMA-262 13.4 Empty Statement - - function parseEmptyStatement(node) { - expect(';'); - return node.finishEmptyStatement(); - } - - // ECMA-262 12.4 Expression Statement - - function parseExpressionStatement(node) { - var expr = parseExpression(); - consumeSemicolon(); - return node.finishExpressionStatement(expr); - } - - // ECMA-262 13.6 If statement - - function parseIfStatement(node) { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return node.finishIfStatement(test, consequent, alternate); - } - - // ECMA-262 13.7 Iteration Statements - - function parseDoWhileStatement(node) { - var body, test, oldInIteration; - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return node.finishDoWhileStatement(body, test); - } - - function parseWhileStatement(node) { - var test, body, oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return node.finishWhileStatement(test, body); - } - - function parseForStatement(node) { - var init, forIn, initSeq, initStartToken, test, update, left, right, kind, declarations, - body, oldInIteration, previousAllowIn = state.allowIn; - - init = test = update = null; - forIn = true; - - expectKeyword('for'); - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var')) { - init = new Node(); - lex(); - - state.allowIn = false; - declarations = parseVariableDeclarationList({ inFor: true }); - state.allowIn = previousAllowIn; - - if (declarations.length === 1 && matchKeyword('in')) { - init = init.finishVariableDeclaration(declarations); - lex(); - left = init; - right = parseExpression(); - init = null; - } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { - init = init.finishVariableDeclaration(declarations); - lex(); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - init = init.finishVariableDeclaration(declarations); - expect(';'); - } - } else if (matchKeyword('const') || matchKeyword('let')) { - init = new Node(); - kind = lex().value; - - if (!strict && lookahead.value === 'in') { - init = init.finishIdentifier(kind); - lex(); - left = init; - right = parseExpression(); - init = null; - } else { - state.allowIn = false; - declarations = parseBindingList(kind, {inFor: true}); - state.allowIn = previousAllowIn; - - if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) { - init = init.finishLexicalDeclaration(declarations, kind); - lex(); - left = init; - right = parseExpression(); - init = null; - } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) { - init = init.finishLexicalDeclaration(declarations, kind); - lex(); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - consumeSemicolon(); - init = init.finishLexicalDeclaration(declarations, kind); - } - } - } else { - initStartToken = lookahead; - state.allowIn = false; - init = inheritCoverGrammar(parseAssignmentExpression); - state.allowIn = previousAllowIn; - - if (matchKeyword('in')) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInForIn); - } - - lex(); - reinterpretExpressionAsPattern(init); - left = init; - right = parseExpression(); - init = null; - } else if (matchContextualKeyword('of')) { - if (!isAssignmentTarget) { - tolerateError(Messages.InvalidLHSInForLoop); - } - - lex(); - reinterpretExpressionAsPattern(init); - left = init; - right = parseAssignmentExpression(); - init = null; - forIn = false; - } else { - if (match(',')) { - initSeq = [init]; - while (match(',')) { - lex(); - initSeq.push(isolateCoverGrammar(parseAssignmentExpression)); - } - init = new WrappingNode(initStartToken).finishSequenceExpression(initSeq); - } - expect(';'); - } - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = isolateCoverGrammar(parseStatement); - - state.inIteration = oldInIteration; - - return (typeof left === 'undefined') ? - node.finishForStatement(init, test, update, body) : - forIn ? node.finishForInStatement(left, right, body) : - node.finishForOfStatement(left, right, body); - } - - // ECMA-262 13.8 The continue statement - - function parseContinueStatement(node) { - var label = null, key; - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source.charCodeAt(startIndex) === 0x3B) { - lex(); - - if (!state.inIteration) { - throwError(Messages.IllegalContinue); - } - - return node.finishContinueStatement(null); - } - - if (hasLineTerminator) { - if (!state.inIteration) { - throwError(Messages.IllegalContinue); - } - - return node.finishContinueStatement(null); - } - - if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError(Messages.IllegalContinue); - } - - return node.finishContinueStatement(label); - } - - // ECMA-262 13.9 The break statement - - function parseBreakStatement(node) { - var label = null, key; - - expectKeyword('break'); - - // Catch the very common case first: immediately a semicolon (U+003B). - if (source.charCodeAt(lastIndex) === 0x3B) { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } - - return node.finishBreakStatement(null); - } - - if (hasLineTerminator) { - if (!(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } - } else if (lookahead.type === Token.Identifier) { - label = parseVariableIdentifier(); - - key = '$' + label.name; - if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError(Messages.IllegalBreak); - } - - return node.finishBreakStatement(label); - } - - // ECMA-262 13.10 The return statement - - function parseReturnStatement(node) { - var argument = null; - - expectKeyword('return'); - - if (!state.inFunctionBody) { - tolerateError(Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source.charCodeAt(lastIndex) === 0x20) { - if (isIdentifierStart(source.charCodeAt(lastIndex + 1))) { - argument = parseExpression(); - consumeSemicolon(); - return node.finishReturnStatement(argument); - } - } - - if (hasLineTerminator) { - // HACK - return node.finishReturnStatement(null); - } - - if (!match(';')) { - if (!match('}') && lookahead.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return node.finishReturnStatement(argument); - } - - // ECMA-262 13.11 The with statement - - function parseWithStatement(node) { - var object, body; - - if (strict) { - tolerateError(Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return node.finishWithStatement(object, body); - } - - // ECMA-262 13.12 The switch statement - - function parseSwitchCase() { - var test, consequent = [], statement, node = new Node(); - - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (startIndex < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatementListItem(); - consequent.push(statement); - } - - return node.finishSwitchCase(test, consequent); - } - - function parseSwitchStatement(node) { - var discriminant, cases, clause, oldInSwitch, defaultFound; - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return node.finishSwitchStatement(discriminant, cases); - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (startIndex < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError(Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return node.finishSwitchStatement(discriminant, cases); - } - - // ECMA-262 13.14 The throw statement - - function parseThrowStatement(node) { - var argument; - - expectKeyword('throw'); - - if (hasLineTerminator) { - throwError(Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return node.finishThrowStatement(argument); - } - - // ECMA-262 13.15 The try statement - - function parseCatchClause() { - var param, params = [], paramMap = {}, key, i, body, node = new Node(); - - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpectedToken(lookahead); - } - - param = parsePattern(params); - for (i = 0; i < params.length; i++) { - key = '$' + params[i].value; - if (Object.prototype.hasOwnProperty.call(paramMap, key)) { - tolerateError(Messages.DuplicateBinding, params[i].value); - } - paramMap[key] = true; - } - - // ECMA-262 12.14.1 - if (strict && isRestrictedWord(param.name)) { - tolerateError(Messages.StrictCatchVariable); - } - - expect(')'); - body = parseBlock(); - return node.finishCatchClause(param, body); - } - - function parseTryStatement(node) { - var block, handler = null, finalizer = null; - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handler = parseCatchClause(); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (!handler && !finalizer) { - throwError(Messages.NoCatchOrFinally); - } - - return node.finishTryStatement(block, handler, finalizer); - } - - // ECMA-262 13.16 The debugger statement - - function parseDebuggerStatement(node) { - expectKeyword('debugger'); - - consumeSemicolon(); - - return node.finishDebuggerStatement(); - } - - // 13 Statements - - function parseStatement() { - var type = lookahead.type, - expr, - labeledBody, - key, - node; - - if (type === Token.EOF) { - throwUnexpectedToken(lookahead); - } - - if (type === Token.Punctuator && lookahead.value === '{') { - return parseBlock(); - } - isAssignmentTarget = isBindingElement = true; - node = new Node(); - - if (type === Token.Punctuator) { - switch (lookahead.value) { - case ';': - return parseEmptyStatement(node); - case '(': - return parseExpressionStatement(node); - default: - break; - } - } else if (type === Token.Keyword) { - switch (lookahead.value) { - case 'break': - return parseBreakStatement(node); - case 'continue': - return parseContinueStatement(node); - case 'debugger': - return parseDebuggerStatement(node); - case 'do': - return parseDoWhileStatement(node); - case 'for': - return parseForStatement(node); - case 'function': - return parseFunctionDeclaration(node); - case 'if': - return parseIfStatement(node); - case 'return': - return parseReturnStatement(node); - case 'switch': - return parseSwitchStatement(node); - case 'throw': - return parseThrowStatement(node); - case 'try': - return parseTryStatement(node); - case 'var': - return parseVariableStatement(node); - case 'while': - return parseWhileStatement(node); - case 'with': - return parseWithStatement(node); - default: - break; - } - } - - expr = parseExpression(); - - // ECMA-262 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - key = '$' + expr.name; - if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { - throwError(Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet[key] = true; - labeledBody = parseStatement(); - delete state.labelSet[key]; - return node.finishLabeledStatement(expr, labeledBody); - } - - consumeSemicolon(); - - return node.finishExpressionStatement(expr); - } - - // ECMA-262 14.1 Function Definition - - function parseFunctionSourceElements() { - var statement, body = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesisCount, - node = new Node(); - - expect('{'); - - while (startIndex < length) { - if (lookahead.type !== Token.StringLiteral) { - break; - } - token = lookahead; - - statement = parseStatementListItem(); - body.push(statement); - if (statement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - oldParenthesisCount = state.parenthesizedCount; - - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - state.parenthesizedCount = 0; - - while (startIndex < length) { - if (match('}')) { - break; - } - body.push(parseStatementListItem()); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - state.parenthesizedCount = oldParenthesisCount; - - return node.finishBlockStatement(body); - } - - function validateParam(options, param, name) { - var key = '$' + name; - if (strict) { - if (isRestrictedWord(name)) { - options.stricted = param; - options.message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = Messages.StrictParamDupe; - } - } else if (!options.firstRestricted) { - if (isRestrictedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(name)) { - options.firstRestricted = param; - options.message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = Messages.StrictParamDupe; - } - } - options.paramSet[key] = true; - } - - function parseParam(options) { - var token, param, params = [], i, def; - - token = lookahead; - if (token.value === '...') { - param = parseRestElement(params); - validateParam(options, param.argument, param.argument.name); - options.params.push(param); - options.defaults.push(null); - return false; - } - - param = parsePatternWithDefault(params); - for (i = 0; i < params.length; i++) { - validateParam(options, params[i], params[i].value); - } - - if (param.type === Syntax.AssignmentPattern) { - def = param.right; - param = param.left; - ++options.defaultCount; - } - - options.params.push(param); - options.defaults.push(def); - - return !match(')'); - } - - function parseParams(firstRestricted) { - var options; - - options = { - params: [], - defaultCount: 0, - defaults: [], - firstRestricted: firstRestricted - }; - - expect('('); - - if (!match(')')) { - options.paramSet = {}; - while (startIndex < length) { - if (!parseParam(options)) { - break; - } - expect(','); - } - } - - expect(')'); - - if (options.defaultCount === 0) { - options.defaults = []; - } - - return { - params: options.params, - defaults: options.defaults, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - } - - function parseFunctionDeclaration(node, identifierIsOptional) { - var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, - isGenerator, previousAllowYield; - - previousAllowYield = state.allowYield; - - expectKeyword('function'); - - isGenerator = match('*'); - if (isGenerator) { - lex(); - } - - if (!identifierIsOptional || !match('(')) { - token = lookahead; - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - state.allowYield = !isGenerator; - tmp = parseParams(firstRestricted); - params = tmp.params; - defaults = tmp.defaults; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwUnexpectedToken(firstRestricted, message); - } - if (strict && stricted) { - tolerateUnexpectedToken(stricted, message); - } - - strict = previousStrict; - state.allowYield = previousAllowYield; - - return node.finishFunctionDeclaration(id, params, defaults, body, isGenerator); - } - - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, tmp, - params = [], defaults = [], body, previousStrict, node = new Node(), - isGenerator, previousAllowYield; - - previousAllowYield = state.allowYield; - - expectKeyword('function'); - - isGenerator = match('*'); - if (isGenerator) { - lex(); - } - - state.allowYield = !isGenerator; - if (!match('(')) { - token = lookahead; - id = (!strict && !isGenerator && matchKeyword('yield')) ? parseNonComputedProperty() : parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - tolerateUnexpectedToken(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - tmp = parseParams(firstRestricted); - params = tmp.params; - defaults = tmp.defaults; - stricted = tmp.stricted; - firstRestricted = tmp.firstRestricted; - if (tmp.message) { - message = tmp.message; - } - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwUnexpectedToken(firstRestricted, message); - } - if (strict && stricted) { - tolerateUnexpectedToken(stricted, message); - } - strict = previousStrict; - state.allowYield = previousAllowYield; - - return node.finishFunctionExpression(id, params, defaults, body, isGenerator); - } - - // ECMA-262 14.5 Class Definitions - - function parseClassBody() { - var classBody, token, isStatic, hasConstructor = false, body, method, computed, key; - - classBody = new Node(); - - expect('{'); - body = []; - while (!match('}')) { - if (match(';')) { - lex(); - } else { - method = new Node(); - token = lookahead; - isStatic = false; - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - if (key.name === 'static' && (lookaheadPropertyName() || match('*'))) { - token = lookahead; - isStatic = true; - computed = match('['); - if (match('*')) { - lex(); - } else { - key = parseObjectPropertyKey(); - } - } - } - method = tryParseMethodDefinition(token, key, computed, method); - if (method) { - method['static'] = isStatic; // jscs:ignore requireDotNotation - if (method.kind === 'init') { - method.kind = 'method'; - } - if (!isStatic) { - if (!method.computed && (method.key.name || method.key.value.toString()) === 'constructor') { - if (method.kind !== 'method' || !method.method || method.value.generator) { - throwUnexpectedToken(token, Messages.ConstructorSpecialMethod); - } - if (hasConstructor) { - throwUnexpectedToken(token, Messages.DuplicateConstructor); - } else { - hasConstructor = true; - } - method.kind = 'constructor'; - } - } else { - if (!method.computed && (method.key.name || method.key.value.toString()) === 'prototype') { - throwUnexpectedToken(token, Messages.StaticPrototype); - } - } - method.type = Syntax.MethodDefinition; - delete method.method; - delete method.shorthand; - body.push(method); - } else { - throwUnexpectedToken(lookahead); - } - } - } - lex(); - return classBody.finishClassBody(body); - } - - function parseClassDeclaration(identifierIsOptional) { - var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; - strict = true; - - expectKeyword('class'); - - if (!identifierIsOptional || lookahead.type === Token.Identifier) { - id = parseVariableIdentifier(); - } - - if (matchKeyword('extends')) { - lex(); - superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); - } - classBody = parseClassBody(); - strict = previousStrict; - - return classNode.finishClassDeclaration(id, superClass, classBody); - } - - function parseClassExpression() { - var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict; - strict = true; - - expectKeyword('class'); - - if (lookahead.type === Token.Identifier) { - id = parseVariableIdentifier(); - } - - if (matchKeyword('extends')) { - lex(); - superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall); - } - classBody = parseClassBody(); - strict = previousStrict; - - return classNode.finishClassExpression(id, superClass, classBody); - } - - // ECMA-262 15.2 Modules - - function parseModuleSpecifier() { - var node = new Node(); - - if (lookahead.type !== Token.StringLiteral) { - throwError(Messages.InvalidModuleSpecifier); - } - return node.finishLiteral(lex()); - } - - // ECMA-262 15.2.3 Exports - - function parseExportSpecifier() { - var exported, local, node = new Node(), def; - if (matchKeyword('default')) { - // export {default} from 'something'; - def = new Node(); - lex(); - local = def.finishIdentifier('default'); - } else { - local = parseVariableIdentifier(); - } - if (matchContextualKeyword('as')) { - lex(); - exported = parseNonComputedProperty(); - } - return node.finishExportSpecifier(local, exported); - } - - function parseExportNamedDeclaration(node) { - var declaration = null, - isExportFromIdentifier, - src = null, specifiers = []; - - // non-default export - if (lookahead.type === Token.Keyword) { - // covers: - // export var f = 1; - switch (lookahead.value) { - case 'let': - case 'const': - declaration = parseLexicalDeclaration({inFor: false}); - return node.finishExportNamedDeclaration(declaration, specifiers, null); - case 'var': - case 'class': - case 'function': - declaration = parseStatementListItem(); - return node.finishExportNamedDeclaration(declaration, specifiers, null); - } - } - - expect('{'); - while (!match('}')) { - isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); - specifiers.push(parseExportSpecifier()); - if (!match('}')) { - expect(','); - if (match('}')) { - break; - } - } - } - expect('}'); - - if (matchContextualKeyword('from')) { - // covering: - // export {default} from 'foo'; - // export {foo} from 'foo'; - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - } else if (isExportFromIdentifier) { - // covering: - // export {default}; // missing fromClause - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } else { - // cover - // export {foo}; - consumeSemicolon(); - } - return node.finishExportNamedDeclaration(declaration, specifiers, src); - } - - function parseExportDefaultDeclaration(node) { - var declaration = null, - expression = null; - - // covers: - // export default ... - expectKeyword('default'); - - if (matchKeyword('function')) { - // covers: - // export default function foo () {} - // export default function () {} - declaration = parseFunctionDeclaration(new Node(), true); - return node.finishExportDefaultDeclaration(declaration); - } - if (matchKeyword('class')) { - declaration = parseClassDeclaration(true); - return node.finishExportDefaultDeclaration(declaration); - } - - if (matchContextualKeyword('from')) { - throwError(Messages.UnexpectedToken, lookahead.value); - } - - // covers: - // export default {}; - // export default []; - // export default (1 + 2); - if (match('{')) { - expression = parseObjectInitializer(); - } else if (match('[')) { - expression = parseArrayInitializer(); - } else { - expression = parseAssignmentExpression(); - } - consumeSemicolon(); - return node.finishExportDefaultDeclaration(expression); - } - - function parseExportAllDeclaration(node) { - var src; - - // covers: - // export * from 'foo'; - expect('*'); - if (!matchContextualKeyword('from')) { - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - consumeSemicolon(); - - return node.finishExportAllDeclaration(src); - } - - function parseExportDeclaration() { - var node = new Node(); - if (state.inFunctionBody) { - throwError(Messages.IllegalExportDeclaration); - } - - expectKeyword('export'); - - if (matchKeyword('default')) { - return parseExportDefaultDeclaration(node); - } - if (match('*')) { - return parseExportAllDeclaration(node); - } - return parseExportNamedDeclaration(node); - } - - // ECMA-262 15.2.2 Imports - - function parseImportSpecifier() { - // import {<foo as bar>} ...; - var local, imported, node = new Node(); - - imported = parseNonComputedProperty(); - if (matchContextualKeyword('as')) { - lex(); - local = parseVariableIdentifier(); - } - - return node.finishImportSpecifier(local, imported); - } - - function parseNamedImports() { - var specifiers = []; - // {foo, bar as bas} - expect('{'); - while (!match('}')) { - specifiers.push(parseImportSpecifier()); - if (!match('}')) { - expect(','); - if (match('}')) { - break; - } - } - } - expect('}'); - return specifiers; - } - - function parseImportDefaultSpecifier() { - // import <foo> ...; - var local, node = new Node(); - - local = parseNonComputedProperty(); - - return node.finishImportDefaultSpecifier(local); - } - - function parseImportNamespaceSpecifier() { - // import <* as foo> ...; - var local, node = new Node(); - - expect('*'); - if (!matchContextualKeyword('as')) { - throwError(Messages.NoAsAfterImportNamespace); - } - lex(); - local = parseNonComputedProperty(); - - return node.finishImportNamespaceSpecifier(local); - } - - function parseImportDeclaration() { - var specifiers = [], src, node = new Node(); - - if (state.inFunctionBody) { - throwError(Messages.IllegalImportDeclaration); - } - - expectKeyword('import'); - - if (lookahead.type === Token.StringLiteral) { - // import 'foo'; - src = parseModuleSpecifier(); - } else { - - if (match('{')) { - // import {bar} - specifiers = specifiers.concat(parseNamedImports()); - } else if (match('*')) { - // import * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (isIdentifierName(lookahead) && !matchKeyword('default')) { - // import foo - specifiers.push(parseImportDefaultSpecifier()); - if (match(',')) { - lex(); - if (match('*')) { - // import foo, * as foo - specifiers.push(parseImportNamespaceSpecifier()); - } else if (match('{')) { - // import foo, {bar} - specifiers = specifiers.concat(parseNamedImports()); - } else { - throwUnexpectedToken(lookahead); - } - } - } else { - throwUnexpectedToken(lex()); - } - - if (!matchContextualKeyword('from')) { - throwError(lookahead.value ? - Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); - } - lex(); - src = parseModuleSpecifier(); - } - - consumeSemicolon(); - return node.finishImportDeclaration(specifiers, src); - } - - // ECMA-262 15.1 Scripts - - function parseScriptBody() { - var statement, body = [], token, directive, firstRestricted; - - while (startIndex < length) { - token = lookahead; - if (token.type !== Token.StringLiteral) { - break; - } - - statement = parseStatementListItem(); - body.push(statement); - if (statement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = source.slice(token.start + 1, token.end - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (startIndex < length) { - statement = parseStatementListItem(); - /* istanbul ignore if */ - if (typeof statement === 'undefined') { - break; - } - body.push(statement); - } - return body; - } - - function parseProgram() { - var body, node; - - peek(); - node = new Node(); - - body = parseScriptBody(); - return node.finishProgram(body, state.sourceType); - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (entry.regex) { - token.regex = { - pattern: entry.regex.pattern, - flags: entry.regex.flags - }; - } - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function tokenize(code, options, delegate) { - var toString, - tokens; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - length = source.length; - lookahead = null; - state = { - allowIn: true, - allowYield: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1, - curlyStack: [] - }; - - extra = {}; - - // Options matching. - options = options || {}; - - // Of course we collect tokens here. - options.tokens = true; - extra.tokens = []; - extra.tokenValues = []; - extra.tokenize = true; - extra.delegate = delegate; - - // The following two fields are necessary to compute the Regex tokens. - extra.openParenToken = -1; - extra.openCurlyToken = -1; - - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - - try { - peek(); - if (lookahead.type === Token.EOF) { - return extra.tokens; - } - - lex(); - while (lookahead.type !== Token.EOF) { - try { - lex(); - } catch (lexError) { - if (extra.errors) { - recordError(lexError); - // We have to break on the first error - // to avoid infinite loops. - break; - } else { - throw lexError; - } - } - } - - tokens = extra.tokens; - if (typeof extra.errors !== 'undefined') { - tokens.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } - return tokens; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - startIndex = index; - startLineNumber = lineNumber; - startLineStart = lineStart; - length = source.length; - lookahead = null; - state = { - allowIn: true, - allowYield: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - lastCommentStart: -1, - curlyStack: [], - sourceType: 'script' - }; - strict = false; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; - - if (extra.loc && options.source !== null && options.source !== undefined) { - extra.source = toString(options.source); - } - - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - if (extra.attachComment) { - extra.range = true; - extra.comments = []; - extra.bottomRightStack = []; - extra.trailingComments = []; - extra.leadingComments = []; - } - if (options.sourceType === 'module') { - // very restrictive condition for now - state.sourceType = options.sourceType; - strict = true; - } - } - - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - } catch (e) { - throw e; - } finally { - extra = {}; - } - - return program; - } - - // Sync with *.json manifests. - exports.version = '2.7.1'; - - exports.tokenize = tokenize; - - exports.parse = parse; - - // Deep copy. - /* istanbul ignore next */ - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ - -},{}],51:[function(require,module,exports){ -/*! - * node-inherit - * Copyright(c) 2011 Dmitry Filatov <dfilatov@yandex-team.ru> - * MIT Licensed - */ - -module.exports = require('./lib/inherit'); - -},{"./lib/inherit":52}],52:[function(require,module,exports){ -/** - * @module inherit - * @version 2.2.2 - * @author Filatov Dmitry <dfilatov@yandex-team.ru> - * @description This module provides some syntax sugar for "class" declarations, constructors, mixins, "super" calls and static members. - */ - -(function(global) { - -var hasIntrospection = (function(){'_';}).toString().indexOf('_') > -1, - emptyBase = function() {}, - hasOwnProperty = Object.prototype.hasOwnProperty, - objCreate = Object.create || function(ptp) { - var inheritance = function() {}; - inheritance.prototype = ptp; - return new inheritance(); - }, - objKeys = Object.keys || function(obj) { - var res = []; - for(var i in obj) { - hasOwnProperty.call(obj, i) && res.push(i); - } - return res; - }, - extend = function(o1, o2) { - for(var i in o2) { - hasOwnProperty.call(o2, i) && (o1[i] = o2[i]); - } - - return o1; - }, - toStr = Object.prototype.toString, - isArray = Array.isArray || function(obj) { - return toStr.call(obj) === '[object Array]'; - }, - isFunction = function(obj) { - return toStr.call(obj) === '[object Function]'; - }, - noOp = function() {}, - needCheckProps = true, - testPropObj = { toString : '' }; - -for(var i in testPropObj) { // fucking ie hasn't toString, valueOf in for - testPropObj.hasOwnProperty(i) && (needCheckProps = false); -} - -var specProps = needCheckProps? ['toString', 'valueOf'] : null; - -function getPropList(obj) { - var res = objKeys(obj); - if(needCheckProps) { - var specProp, i = 0; - while(specProp = specProps[i++]) { - obj.hasOwnProperty(specProp) && res.push(specProp); - } - } - - return res; -} - -function override(base, res, add) { - var addList = getPropList(add), - j = 0, len = addList.length, - name, prop; - while(j < len) { - if((name = addList[j++]) === '__self') { - continue; - } - prop = add[name]; - if(isFunction(prop) && - (!hasIntrospection || prop.toString().indexOf('.__base') > -1)) { - res[name] = (function(name, prop) { - var baseMethod = base[name]? - base[name] : - name === '__constructor'? // case of inheritance from plane function - res.__self.__parent : - noOp; - return function() { - var baseSaved = this.__base; - this.__base = baseMethod; - var res = prop.apply(this, arguments); - this.__base = baseSaved; - return res; - }; - })(name, prop); - } else { - res[name] = prop; - } - } -} - -function applyMixins(mixins, res) { - var i = 1, mixin; - while(mixin = mixins[i++]) { - res? - isFunction(mixin)? - inherit.self(res, mixin.prototype, mixin) : - inherit.self(res, mixin) : - res = isFunction(mixin)? - inherit(mixins[0], mixin.prototype, mixin) : - inherit(mixins[0], mixin); - } - return res || mixins[0]; -} - -/** -* Creates class -* @exports -* @param {Function|Array} [baseClass|baseClassAndMixins] class (or class and mixins) to inherit from -* @param {Object} prototypeFields -* @param {Object} [staticFields] -* @returns {Function} class -*/ -function inherit() { - var args = arguments, - withMixins = isArray(args[0]), - hasBase = withMixins || isFunction(args[0]), - base = hasBase? withMixins? applyMixins(args[0]) : args[0] : emptyBase, - props = args[hasBase? 1 : 0] || {}, - staticProps = args[hasBase? 2 : 1], - res = props.__constructor || (hasBase && base.prototype.__constructor)? - function() { - return this.__constructor.apply(this, arguments); - } : - hasBase? - function() { - return base.apply(this, arguments); - } : - function() {}; - - if(!hasBase) { - res.prototype = props; - res.prototype.__self = res.prototype.constructor = res; - return extend(res, staticProps); - } - - extend(res, base); - - res.__parent = base; - - var basePtp = base.prototype, - resPtp = res.prototype = objCreate(basePtp); - - resPtp.__self = resPtp.constructor = res; - - props && override(basePtp, resPtp, props); - staticProps && override(base, res, staticProps); - - return res; -} - -inherit.self = function() { - var args = arguments, - withMixins = isArray(args[0]), - base = withMixins? applyMixins(args[0], args[0][0]) : args[0], - props = args[1], - staticProps = args[2], - basePtp = base.prototype; - - props && override(basePtp, basePtp, props); - staticProps && override(base, base, staticProps); - - return base; -}; - -var defineAsGlobal = true; -if(typeof exports === 'object') { - module.exports = inherit; - defineAsGlobal = false; -} - -if(typeof modules === 'object') { - modules.define('inherit', function(provide) { - provide(inherit); - }); - defineAsGlobal = false; -} - -if(typeof define === 'function') { - define(function(require, exports, module) { - module.exports = inherit; - }); - defineAsGlobal = false; -} - -defineAsGlobal && (global.inherit = inherit); - -})(this); - -},{}],53:[function(require,module,exports){ +},{"../type":32}],49:[function(require,module,exports){ var baseIndexOf = require('../internal/baseIndexOf'), binaryIndex = require('../internal/binaryIndex'); @@ -17055,7 +13975,7 @@ function indexOf(array, value, fromIndex) { module.exports = indexOf; -},{"../internal/baseIndexOf":82,"../internal/binaryIndex":96}],54:[function(require,module,exports){ +},{"../internal/baseIndexOf":78,"../internal/binaryIndex":92}],50:[function(require,module,exports){ /** * Gets the last element of `array`. * @@ -17076,7 +13996,7 @@ function last(array) { module.exports = last; -},{}],55:[function(require,module,exports){ +},{}],51:[function(require,module,exports){ var LazyWrapper = require('../internal/LazyWrapper'), LodashWrapper = require('../internal/LodashWrapper'), baseLodash = require('../internal/baseLodash'), @@ -17203,10 +14123,10 @@ lodash.prototype = baseLodash.prototype; module.exports = lodash; -},{"../internal/LazyWrapper":64,"../internal/LodashWrapper":65,"../internal/baseLodash":86,"../internal/isObjectLike":130,"../internal/wrapperClone":141,"../lang/isArray":144}],56:[function(require,module,exports){ +},{"../internal/LazyWrapper":60,"../internal/LodashWrapper":61,"../internal/baseLodash":82,"../internal/isObjectLike":126,"../internal/wrapperClone":137,"../lang/isArray":140}],52:[function(require,module,exports){ module.exports = require('./forEach'); -},{"./forEach":58}],57:[function(require,module,exports){ +},{"./forEach":54}],53:[function(require,module,exports){ var baseEach = require('../internal/baseEach'), createFind = require('../internal/createFind'); @@ -17264,7 +14184,7 @@ var find = createFind(baseEach); module.exports = find; -},{"../internal/baseEach":75,"../internal/createFind":106}],58:[function(require,module,exports){ +},{"../internal/baseEach":71,"../internal/createFind":102}],54:[function(require,module,exports){ var arrayEach = require('../internal/arrayEach'), baseEach = require('../internal/baseEach'), createForEach = require('../internal/createForEach'); @@ -17303,7 +14223,7 @@ var forEach = createForEach(arrayEach, baseEach); module.exports = forEach; -},{"../internal/arrayEach":67,"../internal/baseEach":75,"../internal/createForEach":107}],59:[function(require,module,exports){ +},{"../internal/arrayEach":63,"../internal/baseEach":71,"../internal/createForEach":103}],55:[function(require,module,exports){ var baseIndexOf = require('../internal/baseIndexOf'), getLength = require('../internal/getLength'), isArray = require('../lang/isArray'), @@ -17362,7 +14282,7 @@ function includes(collection, target, fromIndex, guard) { module.exports = includes; -},{"../internal/baseIndexOf":82,"../internal/getLength":116,"../internal/isIterateeCall":126,"../internal/isLength":129,"../lang/isArray":144,"../lang/isString":150,"../object/values":156}],60:[function(require,module,exports){ +},{"../internal/baseIndexOf":78,"../internal/getLength":112,"../internal/isIterateeCall":122,"../internal/isLength":125,"../lang/isArray":140,"../lang/isString":146,"../object/values":152}],56:[function(require,module,exports){ var arrayMap = require('../internal/arrayMap'), baseCallback = require('../internal/baseCallback'), baseMap = require('../internal/baseMap'), @@ -17432,7 +14352,7 @@ function map(collection, iteratee, thisArg) { module.exports = map; -},{"../internal/arrayMap":68,"../internal/baseCallback":71,"../internal/baseMap":87,"../lang/isArray":144}],61:[function(require,module,exports){ +},{"../internal/arrayMap":64,"../internal/baseCallback":67,"../internal/baseMap":83,"../lang/isArray":140}],57:[function(require,module,exports){ var getNative = require('../internal/getNative'); /* Native method references for those with the same name as other `lodash` methods. */ @@ -17458,7 +14378,7 @@ var now = nativeNow || function() { module.exports = now; -},{"../internal/getNative":118}],62:[function(require,module,exports){ +},{"../internal/getNative":114}],58:[function(require,module,exports){ var createWrapper = require('../internal/createWrapper'), replaceHolders = require('../internal/replaceHolders'), restParam = require('./restParam'); @@ -17516,7 +14436,7 @@ bind.placeholder = {}; module.exports = bind; -},{"../internal/createWrapper":110,"../internal/replaceHolders":136,"./restParam":63}],63:[function(require,module,exports){ +},{"../internal/createWrapper":106,"../internal/replaceHolders":132,"./restParam":59}],59:[function(require,module,exports){ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -17576,7 +14496,7 @@ function restParam(func, start) { module.exports = restParam; -},{}],64:[function(require,module,exports){ +},{}],60:[function(require,module,exports){ var baseCreate = require('./baseCreate'), baseLodash = require('./baseLodash'); @@ -17604,7 +14524,7 @@ LazyWrapper.prototype.constructor = LazyWrapper; module.exports = LazyWrapper; -},{"./baseCreate":74,"./baseLodash":86}],65:[function(require,module,exports){ +},{"./baseCreate":70,"./baseLodash":82}],61:[function(require,module,exports){ var baseCreate = require('./baseCreate'), baseLodash = require('./baseLodash'); @@ -17627,7 +14547,7 @@ LodashWrapper.prototype.constructor = LodashWrapper; module.exports = LodashWrapper; -},{"./baseCreate":74,"./baseLodash":86}],66:[function(require,module,exports){ +},{"./baseCreate":70,"./baseLodash":82}],62:[function(require,module,exports){ /** * Copies the values of `source` to `array`. * @@ -17649,7 +14569,7 @@ function arrayCopy(source, array) { module.exports = arrayCopy; -},{}],67:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ /** * A specialized version of `_.forEach` for arrays without support for callback * shorthands and `this` binding. @@ -17673,7 +14593,7 @@ function arrayEach(array, iteratee) { module.exports = arrayEach; -},{}],68:[function(require,module,exports){ +},{}],64:[function(require,module,exports){ /** * A specialized version of `_.map` for arrays without support for callback * shorthands and `this` binding. @@ -17696,7 +14616,7 @@ function arrayMap(array, iteratee) { module.exports = arrayMap; -},{}],69:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ /** * A specialized version of `_.some` for arrays without support for callback * shorthands and `this` binding. @@ -17721,7 +14641,7 @@ function arraySome(array, predicate) { module.exports = arraySome; -},{}],70:[function(require,module,exports){ +},{}],66:[function(require,module,exports){ var baseCopy = require('./baseCopy'), keys = require('../object/keys'); @@ -17742,7 +14662,7 @@ function baseAssign(object, source) { module.exports = baseAssign; -},{"../object/keys":153,"./baseCopy":73}],71:[function(require,module,exports){ +},{"../object/keys":149,"./baseCopy":69}],67:[function(require,module,exports){ var baseMatches = require('./baseMatches'), baseMatchesProperty = require('./baseMatchesProperty'), bindCallback = require('./bindCallback'), @@ -17779,7 +14699,7 @@ function baseCallback(func, thisArg, argCount) { module.exports = baseCallback; -},{"../utility/identity":158,"../utility/property":160,"./baseMatches":88,"./baseMatchesProperty":89,"./bindCallback":98}],72:[function(require,module,exports){ +},{"../utility/identity":154,"../utility/property":156,"./baseMatches":84,"./baseMatchesProperty":85,"./bindCallback":94}],68:[function(require,module,exports){ var arrayCopy = require('./arrayCopy'), arrayEach = require('./arrayEach'), baseAssign = require('./baseAssign'), @@ -17913,7 +14833,7 @@ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { module.exports = baseClone; -},{"../lang/isArray":144,"../lang/isObject":148,"./arrayCopy":66,"./arrayEach":67,"./baseAssign":70,"./baseForOwn":80,"./initCloneArray":120,"./initCloneByTag":121,"./initCloneObject":122,"./isHostObject":124}],73:[function(require,module,exports){ +},{"../lang/isArray":140,"../lang/isObject":144,"./arrayCopy":62,"./arrayEach":63,"./baseAssign":66,"./baseForOwn":76,"./initCloneArray":116,"./initCloneByTag":117,"./initCloneObject":118,"./isHostObject":120}],69:[function(require,module,exports){ /** * Copies properties of `source` to `object`. * @@ -17938,7 +14858,7 @@ function baseCopy(source, props, object) { module.exports = baseCopy; -},{}],74:[function(require,module,exports){ +},{}],70:[function(require,module,exports){ var isObject = require('../lang/isObject'); /** @@ -17963,7 +14883,7 @@ var baseCreate = (function() { module.exports = baseCreate; -},{"../lang/isObject":148}],75:[function(require,module,exports){ +},{"../lang/isObject":144}],71:[function(require,module,exports){ var baseForOwn = require('./baseForOwn'), createBaseEach = require('./createBaseEach'); @@ -17980,7 +14900,7 @@ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; -},{"./baseForOwn":80,"./createBaseEach":102}],76:[function(require,module,exports){ +},{"./baseForOwn":76,"./createBaseEach":98}],72:[function(require,module,exports){ /** * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, * without support for callback shorthands and `this` binding, which iterates @@ -18007,7 +14927,7 @@ function baseFind(collection, predicate, eachFunc, retKey) { module.exports = baseFind; -},{}],77:[function(require,module,exports){ +},{}],73:[function(require,module,exports){ /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for callback shorthands and `this` binding. @@ -18032,7 +14952,7 @@ function baseFindIndex(array, predicate, fromRight) { module.exports = baseFindIndex; -},{}],78:[function(require,module,exports){ +},{}],74:[function(require,module,exports){ var createBaseFor = require('./createBaseFor'); /** @@ -18051,7 +14971,7 @@ var baseFor = createBaseFor(); module.exports = baseFor; -},{"./createBaseFor":103}],79:[function(require,module,exports){ +},{"./createBaseFor":99}],75:[function(require,module,exports){ var baseFor = require('./baseFor'), keysIn = require('../object/keysIn'); @@ -18070,7 +14990,7 @@ function baseForIn(object, iteratee) { module.exports = baseForIn; -},{"../object/keysIn":154,"./baseFor":78}],80:[function(require,module,exports){ +},{"../object/keysIn":150,"./baseFor":74}],76:[function(require,module,exports){ var baseFor = require('./baseFor'), keys = require('../object/keys'); @@ -18089,7 +15009,7 @@ function baseForOwn(object, iteratee) { module.exports = baseForOwn; -},{"../object/keys":153,"./baseFor":78}],81:[function(require,module,exports){ +},{"../object/keys":149,"./baseFor":74}],77:[function(require,module,exports){ var toObject = require('./toObject'); /** @@ -18121,7 +15041,7 @@ function baseGet(object, path, pathKey) { module.exports = baseGet; -},{"./toObject":139}],82:[function(require,module,exports){ +},{"./toObject":135}],78:[function(require,module,exports){ var indexOfNaN = require('./indexOfNaN'); /** @@ -18150,7 +15070,7 @@ function baseIndexOf(array, value, fromIndex) { module.exports = baseIndexOf; -},{"./indexOfNaN":119}],83:[function(require,module,exports){ +},{"./indexOfNaN":115}],79:[function(require,module,exports){ var baseIsEqualDeep = require('./baseIsEqualDeep'), isObject = require('../lang/isObject'), isObjectLike = require('./isObjectLike'); @@ -18180,7 +15100,7 @@ function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { module.exports = baseIsEqual; -},{"../lang/isObject":148,"./baseIsEqualDeep":84,"./isObjectLike":130}],84:[function(require,module,exports){ +},{"../lang/isObject":144,"./baseIsEqualDeep":80,"./isObjectLike":126}],80:[function(require,module,exports){ var equalArrays = require('./equalArrays'), equalByTag = require('./equalByTag'), equalObjects = require('./equalObjects'), @@ -18285,7 +15205,7 @@ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, module.exports = baseIsEqualDeep; -},{"../lang/isArray":144,"../lang/isTypedArray":151,"./equalArrays":111,"./equalByTag":112,"./equalObjects":113,"./isHostObject":124}],85:[function(require,module,exports){ +},{"../lang/isArray":140,"../lang/isTypedArray":147,"./equalArrays":107,"./equalByTag":108,"./equalObjects":109,"./isHostObject":120}],81:[function(require,module,exports){ var baseIsEqual = require('./baseIsEqual'), toObject = require('./toObject'); @@ -18339,7 +15259,7 @@ function baseIsMatch(object, matchData, customizer) { module.exports = baseIsMatch; -},{"./baseIsEqual":83,"./toObject":139}],86:[function(require,module,exports){ +},{"./baseIsEqual":79,"./toObject":135}],82:[function(require,module,exports){ /** * The function whose prototype all chaining wrappers inherit from. * @@ -18351,7 +15271,7 @@ function baseLodash() { module.exports = baseLodash; -},{}],87:[function(require,module,exports){ +},{}],83:[function(require,module,exports){ var baseEach = require('./baseEach'), isArrayLike = require('./isArrayLike'); @@ -18376,7 +15296,7 @@ function baseMap(collection, iteratee) { module.exports = baseMap; -},{"./baseEach":75,"./isArrayLike":123}],88:[function(require,module,exports){ +},{"./baseEach":71,"./isArrayLike":119}],84:[function(require,module,exports){ var baseIsMatch = require('./baseIsMatch'), getMatchData = require('./getMatchData'), toObject = require('./toObject'); @@ -18409,7 +15329,7 @@ function baseMatches(source) { module.exports = baseMatches; -},{"./baseIsMatch":85,"./getMatchData":117,"./toObject":139}],89:[function(require,module,exports){ +},{"./baseIsMatch":81,"./getMatchData":113,"./toObject":135}],85:[function(require,module,exports){ var baseGet = require('./baseGet'), baseIsEqual = require('./baseIsEqual'), baseSlice = require('./baseSlice'), @@ -18456,7 +15376,7 @@ function baseMatchesProperty(path, srcValue) { module.exports = baseMatchesProperty; -},{"../array/last":54,"../lang/isArray":144,"./baseGet":81,"./baseIsEqual":83,"./baseSlice":93,"./isKey":127,"./isStrictComparable":131,"./toObject":139,"./toPath":140}],90:[function(require,module,exports){ +},{"../array/last":50,"../lang/isArray":140,"./baseGet":77,"./baseIsEqual":79,"./baseSlice":89,"./isKey":123,"./isStrictComparable":127,"./toObject":135,"./toPath":136}],86:[function(require,module,exports){ var toObject = require('./toObject'); /** @@ -18474,7 +15394,7 @@ function baseProperty(key) { module.exports = baseProperty; -},{"./toObject":139}],91:[function(require,module,exports){ +},{"./toObject":135}],87:[function(require,module,exports){ var baseGet = require('./baseGet'), toPath = require('./toPath'); @@ -18495,7 +15415,7 @@ function basePropertyDeep(path) { module.exports = basePropertyDeep; -},{"./baseGet":81,"./toPath":140}],92:[function(require,module,exports){ +},{"./baseGet":77,"./toPath":136}],88:[function(require,module,exports){ var identity = require('../utility/identity'), metaMap = require('./metaMap'); @@ -18514,7 +15434,7 @@ var baseSetData = !metaMap ? identity : function(func, data) { module.exports = baseSetData; -},{"../utility/identity":158,"./metaMap":133}],93:[function(require,module,exports){ +},{"../utility/identity":154,"./metaMap":129}],89:[function(require,module,exports){ /** * The base implementation of `_.slice` without an iteratee call guard. * @@ -18548,7 +15468,7 @@ function baseSlice(array, start, end) { module.exports = baseSlice; -},{}],94:[function(require,module,exports){ +},{}],90:[function(require,module,exports){ /** * Converts `value` to a string if it's not one. An empty string is returned * for `null` or `undefined` values. @@ -18563,7 +15483,7 @@ function baseToString(value) { module.exports = baseToString; -},{}],95:[function(require,module,exports){ +},{}],91:[function(require,module,exports){ /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names @@ -18587,7 +15507,7 @@ function baseValues(object, props) { module.exports = baseValues; -},{}],96:[function(require,module,exports){ +},{}],92:[function(require,module,exports){ var binaryIndexBy = require('./binaryIndexBy'), identity = require('../utility/identity'); @@ -18628,7 +15548,7 @@ function binaryIndex(array, value, retHighest) { module.exports = binaryIndex; -},{"../utility/identity":158,"./binaryIndexBy":97}],97:[function(require,module,exports){ +},{"../utility/identity":154,"./binaryIndexBy":93}],93:[function(require,module,exports){ /* Native method references for those with the same name as other `lodash` methods. */ var nativeFloor = Math.floor, nativeMin = Math.min; @@ -18687,7 +15607,7 @@ function binaryIndexBy(array, value, iteratee, retHighest) { module.exports = binaryIndexBy; -},{}],98:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ var identity = require('../utility/identity'); /** @@ -18728,7 +15648,7 @@ function bindCallback(func, thisArg, argCount) { module.exports = bindCallback; -},{"../utility/identity":158}],99:[function(require,module,exports){ +},{"../utility/identity":154}],95:[function(require,module,exports){ (function (global){ /** Native method references. */ var ArrayBuffer = global.ArrayBuffer, @@ -18752,8 +15672,8 @@ function bufferClone(buffer) { module.exports = bufferClone; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2J1ZmZlckNsb25lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBOYXRpdmUgbWV0aG9kIHJlZmVyZW5jZXMuICovXG52YXIgQXJyYXlCdWZmZXIgPSBnbG9iYWwuQXJyYXlCdWZmZXIsXG4gICAgVWludDhBcnJheSA9IGdsb2JhbC5VaW50OEFycmF5O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjbG9uZSBvZiB0aGUgZ2l2ZW4gYXJyYXkgYnVmZmVyLlxuICpcbiAqIEBwcml2YXRlXG4gKiBAcGFyYW0ge0FycmF5QnVmZmVyfSBidWZmZXIgVGhlIGFycmF5IGJ1ZmZlciB0byBjbG9uZS5cbiAqIEByZXR1cm5zIHtBcnJheUJ1ZmZlcn0gUmV0dXJucyB0aGUgY2xvbmVkIGFycmF5IGJ1ZmZlci5cbiAqL1xuZnVuY3Rpb24gYnVmZmVyQ2xvbmUoYnVmZmVyKSB7XG4gIHZhciByZXN1bHQgPSBuZXcgQXJyYXlCdWZmZXIoYnVmZmVyLmJ5dGVMZW5ndGgpLFxuICAgICAgdmlldyA9IG5ldyBVaW50OEFycmF5KHJlc3VsdCk7XG5cbiAgdmlldy5zZXQobmV3IFVpbnQ4QXJyYXkoYnVmZmVyKSk7XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gYnVmZmVyQ2xvbmU7XG4iXX0= -},{}],100:[function(require,module,exports){ + +},{}],96:[function(require,module,exports){ /* Native method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; @@ -18789,7 +15709,7 @@ function composeArgs(args, partials, holders) { module.exports = composeArgs; -},{}],101:[function(require,module,exports){ +},{}],97:[function(require,module,exports){ /* Native method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; @@ -18827,7 +15747,7 @@ function composeArgsRight(args, partials, holders) { module.exports = composeArgsRight; -},{}],102:[function(require,module,exports){ +},{}],98:[function(require,module,exports){ var getLength = require('./getLength'), isLength = require('./isLength'), toObject = require('./toObject'); @@ -18860,7 +15780,7 @@ function createBaseEach(eachFunc, fromRight) { module.exports = createBaseEach; -},{"./getLength":116,"./isLength":129,"./toObject":139}],103:[function(require,module,exports){ +},{"./getLength":112,"./isLength":125,"./toObject":135}],99:[function(require,module,exports){ var toObject = require('./toObject'); /** @@ -18889,7 +15809,7 @@ function createBaseFor(fromRight) { module.exports = createBaseFor; -},{"./toObject":139}],104:[function(require,module,exports){ +},{"./toObject":135}],100:[function(require,module,exports){ (function (global){ var createCtorWrapper = require('./createCtorWrapper'); @@ -18915,8 +15835,8 @@ function createBindWrapper(func, thisArg) { module.exports = createBindWrapper; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUJpbmRXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQ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3JhcHBlcjtcbiJdfQ== -},{"./createCtorWrapper":105}],105:[function(require,module,exports){ + +},{"./createCtorWrapper":101}],101:[function(require,module,exports){ var baseCreate = require('./baseCreate'), isObject = require('../lang/isObject'); @@ -18955,7 +15875,7 @@ function createCtorWrapper(Ctor) { module.exports = createCtorWrapper; -},{"../lang/isObject":148,"./baseCreate":74}],106:[function(require,module,exports){ +},{"../lang/isObject":144,"./baseCreate":70}],102:[function(require,module,exports){ var baseCallback = require('./baseCallback'), baseFind = require('./baseFind'), baseFindIndex = require('./baseFindIndex'), @@ -18982,7 +15902,7 @@ function createFind(eachFunc, fromRight) { module.exports = createFind; -},{"../lang/isArray":144,"./baseCallback":71,"./baseFind":76,"./baseFindIndex":77}],107:[function(require,module,exports){ +},{"../lang/isArray":140,"./baseCallback":67,"./baseFind":72,"./baseFindIndex":73}],103:[function(require,module,exports){ var bindCallback = require('./bindCallback'), isArray = require('../lang/isArray'); @@ -19004,7 +15924,7 @@ function createForEach(arrayFunc, eachFunc) { module.exports = createForEach; -},{"../lang/isArray":144,"./bindCallback":98}],108:[function(require,module,exports){ +},{"../lang/isArray":140,"./bindCallback":94}],104:[function(require,module,exports){ (function (global){ var arrayCopy = require('./arrayCopy'), composeArgs = require('./composeArgs'), @@ -19119,8 +16039,8 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials module.exports = createHybridWrapper; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUh5YnJpZFdyYXBwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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Y3JlYXRlSHlicmlkV3JhcHBlcjtcbiJdfQ== -},{"./arrayCopy":66,"./composeArgs":100,"./composeArgsRight":101,"./createCtorWrapper":105,"./isLaziable":128,"./reorder":135,"./replaceHolders":136,"./setData":137}],109:[function(require,module,exports){ + +},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./createCtorWrapper":101,"./isLaziable":124,"./reorder":131,"./replaceHolders":132,"./setData":133}],105:[function(require,module,exports){ (function (global){ var createCtorWrapper = require('./createCtorWrapper'); @@ -19167,8 +16087,8 @@ function createPartialWrapper(func, bitmask, thisArg, partials) { module.exports = createPartialWrapper; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZVBhcnRpYWxXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKiBVc2VkI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dyYXBwZXIoKSB7XG4gICAgLy8gQXZvaWQgYGFyZ3VtZW50c2Agb2JqZWN0IHVzZSBkaXNxdWFsaWZ5aW5nIG9wdGltaXphdGlvbnMgYnlcbiAgICAvLyBjb252ZXJ0aW5nIGl0IHRvIGFuIGFycmF5IGJlZm9yZSBwcm92aWRpbmcgaXQgYGZ1bmNgLlxuICAgIHZhciBhcmdzSW5kZXggPSAtMSxcbiAgICAgICAgYXJnc0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsXG4gICAgICAgIGxlZnRJbmRleCA9IC0xLFxuICAgICAgICBsZWZ0TGVuZ3RoID0gcGFydGlhbHMubGVuZ3RoLFxuICAgICAgICBhcmdzID0gQXJyYXkobGVmdExlbmd0aCArIGFyZ3NMZW5ndGgpO1xuXG4gICAgd2hpbGUgKCsrbGVmdEluZGV4IDwgbGVmdExlbmd0aCkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXhdID0gcGFydGlhbHNbbGVmdEluZGV4XTtcbiAgICB9XG4gICAgd2hpbGUgKGFyZ3NMZW5ndGgtLSkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXgrK10gPSBhcmd1bWVudHNbKythcmdzSW5kZXhdO1xuICAgIH1cbiAgICB2YXIgZm4gPSAodGhpcyAmJiB0aGlzICE9PSBnbG9iYWwgJiYgdGhpcyBpbnN0YW5jZW9mIHdyYXBwZXIpID8gQ3RvciA6IGZ1bmM7XG4gICAgcmV0dXJuIGZuLmFwcGx5KGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLCBhcmdzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVQYXJ0aWFsV3JhcHBlcjtcbiJdfQ== -},{"./createCtorWrapper":105}],110:[function(require,module,exports){ + +},{"./createCtorWrapper":101}],106:[function(require,module,exports){ var baseSetData = require('./baseSetData'), createBindWrapper = require('./createBindWrapper'), createHybridWrapper = require('./createHybridWrapper'), @@ -19256,7 +16176,7 @@ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, a module.exports = createWrapper; -},{"./baseSetData":92,"./createBindWrapper":104,"./createHybridWrapper":108,"./createPartialWrapper":109,"./getData":114,"./mergeData":132,"./setData":137}],111:[function(require,module,exports){ +},{"./baseSetData":88,"./createBindWrapper":100,"./createHybridWrapper":104,"./createPartialWrapper":105,"./getData":110,"./mergeData":128,"./setData":133}],107:[function(require,module,exports){ var arraySome = require('./arraySome'); /** @@ -19309,7 +16229,7 @@ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stack module.exports = equalArrays; -},{"./arraySome":69}],112:[function(require,module,exports){ +},{"./arraySome":65}],108:[function(require,module,exports){ /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', @@ -19359,7 +16279,7 @@ function equalByTag(object, other, tag) { module.exports = equalByTag; -},{}],113:[function(require,module,exports){ +},{}],109:[function(require,module,exports){ var keys = require('../object/keys'); /** Used for native method references. */ @@ -19428,7 +16348,7 @@ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, sta module.exports = equalObjects; -},{"../object/keys":153}],114:[function(require,module,exports){ +},{"../object/keys":149}],110:[function(require,module,exports){ var metaMap = require('./metaMap'), noop = require('../utility/noop'); @@ -19445,7 +16365,7 @@ var getData = !metaMap ? noop : function(func) { module.exports = getData; -},{"../utility/noop":159,"./metaMap":133}],115:[function(require,module,exports){ +},{"../utility/noop":155,"./metaMap":129}],111:[function(require,module,exports){ var realNames = require('./realNames'); /** @@ -19472,7 +16392,7 @@ function getFuncName(func) { module.exports = getFuncName; -},{"./realNames":134}],116:[function(require,module,exports){ +},{"./realNames":130}],112:[function(require,module,exports){ var baseProperty = require('./baseProperty'); /** @@ -19489,7 +16409,7 @@ var getLength = baseProperty('length'); module.exports = getLength; -},{"./baseProperty":90}],117:[function(require,module,exports){ +},{"./baseProperty":86}],113:[function(require,module,exports){ var isStrictComparable = require('./isStrictComparable'), pairs = require('../object/pairs'); @@ -19512,7 +16432,7 @@ function getMatchData(object) { module.exports = getMatchData; -},{"../object/pairs":155,"./isStrictComparable":131}],118:[function(require,module,exports){ +},{"../object/pairs":151,"./isStrictComparable":127}],114:[function(require,module,exports){ var isNative = require('../lang/isNative'); /** @@ -19530,7 +16450,7 @@ function getNative(object, key) { module.exports = getNative; -},{"../lang/isNative":147}],119:[function(require,module,exports){ +},{"../lang/isNative":143}],115:[function(require,module,exports){ /** * Gets the index at which the first occurrence of `NaN` is found in `array`. * @@ -19555,7 +16475,7 @@ function indexOfNaN(array, fromIndex, fromRight) { module.exports = indexOfNaN; -},{}],120:[function(require,module,exports){ +},{}],116:[function(require,module,exports){ /** Used for native method references. */ var objectProto = Object.prototype; @@ -19583,7 +16503,7 @@ function initCloneArray(array) { module.exports = initCloneArray; -},{}],121:[function(require,module,exports){ +},{}],117:[function(require,module,exports){ (function (global){ var bufferClone = require('./bufferClone'); @@ -19669,8 +16589,8 @@ function initCloneByTag(object, tag, isDeep) { module.exports = initCloneByTag; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2luaXRDbG9uZUJ5VGFnLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQU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hc2UgdWludDhUYWc6IGNhc2UgdWludDhDbGFtcGVkVGFnOiBjYXNlIHVpbnQxNlRhZzogY2FzZSB1aW50MzJUYWc6XG4gICAgICAvLyBTYWZhcmkgNSBtb2JpbGUgaW5jb3JyZWN0bHkgaGFzIGBPYmplY3RgIGFzIHRoZSBjb25zdHJ1Y3RvciBvZiB0eXBlZCBhcnJheXMuXG4gICAgICBpZiAoQ3RvciBpbnN0YW5jZW9mIEN0b3IpIHtcbiAgICAgICAgQ3RvciA9IGN0b3JCeVRhZ1t0YWddO1xuICAgICAgfVxuICAgICAgdmFyIGJ1ZmZlciA9IG9iamVjdC5idWZmZXI7XG4gICAgICByZXR1cm4gbmV3IEN0b3IoaXNEZWVwID8gYnVmZmVyQ2xvbmUoYnVmZmVyKSA6IGJ1ZmZlciwgb2JqZWN0LmJ5dGVPZmZzZXQsIG9iamVjdC5sZW5ndGgpO1xuXG4gICAgY2FzZSBudW1iZXJUYWc6XG4gICAgY2FzZSBzdHJpbmdUYWc6XG4gICAgICByZXR1cm4gbmV3IEN0b3Iob2JqZWN0KTtcblxuICAgIGNhc2UgcmVnZXhwVGFnOlxuICAgICAgdmFyIHJlc3VsdCA9IG5ldyBDdG9yKG9iamVjdC5zb3VyY2UsIHJlRmxhZ3MuZXhlYyhvYmplY3QpKTtcbiAgICAgIHJlc3VsdC5sYXN0SW5kZXggPSBvYmplY3QubGFzdEluZGV4O1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gaW5pdENsb25lQnlUYWc7XG4iXX0= -},{"./bufferClone":99}],122:[function(require,module,exports){ + +},{"./bufferClone":95}],118:[function(require,module,exports){ /** * Initializes an object clone. * @@ -19688,7 +16608,7 @@ function initCloneObject(object) { module.exports = initCloneObject; -},{}],123:[function(require,module,exports){ +},{}],119:[function(require,module,exports){ var getLength = require('./getLength'), isLength = require('./isLength'); @@ -19705,7 +16625,7 @@ function isArrayLike(value) { module.exports = isArrayLike; -},{"./getLength":116,"./isLength":129}],124:[function(require,module,exports){ +},{"./getLength":112,"./isLength":125}],120:[function(require,module,exports){ /** * Checks if `value` is a host object in IE < 9. * @@ -19728,7 +16648,7 @@ var isHostObject = (function() { module.exports = isHostObject; -},{}],125:[function(require,module,exports){ +},{}],121:[function(require,module,exports){ /** Used to detect unsigned integer values. */ var reIsUint = /^\d+$/; @@ -19754,7 +16674,7 @@ function isIndex(value, length) { module.exports = isIndex; -},{}],126:[function(require,module,exports){ +},{}],122:[function(require,module,exports){ var isArrayLike = require('./isArrayLike'), isIndex = require('./isIndex'), isObject = require('../lang/isObject'); @@ -19784,7 +16704,7 @@ function isIterateeCall(value, index, object) { module.exports = isIterateeCall; -},{"../lang/isObject":148,"./isArrayLike":123,"./isIndex":125}],127:[function(require,module,exports){ +},{"../lang/isObject":144,"./isArrayLike":119,"./isIndex":121}],123:[function(require,module,exports){ var isArray = require('../lang/isArray'), toObject = require('./toObject'); @@ -19814,7 +16734,7 @@ function isKey(value, object) { module.exports = isKey; -},{"../lang/isArray":144,"./toObject":139}],128:[function(require,module,exports){ +},{"../lang/isArray":140,"./toObject":135}],124:[function(require,module,exports){ var LazyWrapper = require('./LazyWrapper'), getData = require('./getData'), getFuncName = require('./getFuncName'), @@ -19843,7 +16763,7 @@ function isLaziable(func) { module.exports = isLaziable; -},{"../chain/lodash":55,"./LazyWrapper":64,"./getData":114,"./getFuncName":115}],129:[function(require,module,exports){ +},{"../chain/lodash":51,"./LazyWrapper":60,"./getData":110,"./getFuncName":111}],125:[function(require,module,exports){ /** * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) * of an array-like value. @@ -19865,7 +16785,7 @@ function isLength(value) { module.exports = isLength; -},{}],130:[function(require,module,exports){ +},{}],126:[function(require,module,exports){ /** * Checks if `value` is object-like. * @@ -19879,7 +16799,7 @@ function isObjectLike(value) { module.exports = isObjectLike; -},{}],131:[function(require,module,exports){ +},{}],127:[function(require,module,exports){ var isObject = require('../lang/isObject'); /** @@ -19896,7 +16816,7 @@ function isStrictComparable(value) { module.exports = isStrictComparable; -},{"../lang/isObject":148}],132:[function(require,module,exports){ +},{"../lang/isObject":144}],128:[function(require,module,exports){ var arrayCopy = require('./arrayCopy'), composeArgs = require('./composeArgs'), composeArgsRight = require('./composeArgsRight'), @@ -19987,7 +16907,7 @@ function mergeData(data, source) { module.exports = mergeData; -},{"./arrayCopy":66,"./composeArgs":100,"./composeArgsRight":101,"./replaceHolders":136}],133:[function(require,module,exports){ +},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./replaceHolders":132}],129:[function(require,module,exports){ (function (global){ var getNative = require('./getNative'); @@ -20000,14 +16920,14 @@ var metaMap = WeakMap && new WeakMap; module.exports = metaMap; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL21ldGFNYXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0TmF0aXZlID0gcmVxdWlyZSgnLi9nZXROYXRpdmUnKTtcblxuLyoqIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcy4gKi9cbnZhciBXZWFrTWFwID0gZ2V0TmF0aXZlKGdsb2JhbCwgJ1dlYWtNYXAnKTtcblxuLyoqIFVzZWQgdG8gc3RvcmUgZnVuY3Rpb24gbWV0YWRhdGEuICovXG52YXIgbWV0YU1hcCA9IFdlYWtNYXAgJiYgbmV3IFdlYWtNYXA7XG5cbm1vZHVsZS5leHBvcnRzID0gbWV0YU1hcDtcbiJdfQ== -},{"./getNative":118}],134:[function(require,module,exports){ + +},{"./getNative":114}],130:[function(require,module,exports){ /** Used to lookup unminified function names. */ var realNames = {}; module.exports = realNames; -},{}],135:[function(require,module,exports){ +},{}],131:[function(require,module,exports){ var arrayCopy = require('./arrayCopy'), isIndex = require('./isIndex'); @@ -20038,7 +16958,7 @@ function reorder(array, indexes) { module.exports = reorder; -},{"./arrayCopy":66,"./isIndex":125}],136:[function(require,module,exports){ +},{"./arrayCopy":62,"./isIndex":121}],132:[function(require,module,exports){ /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; @@ -20068,7 +16988,7 @@ function replaceHolders(array, placeholder) { module.exports = replaceHolders; -},{}],137:[function(require,module,exports){ +},{}],133:[function(require,module,exports){ var baseSetData = require('./baseSetData'), now = require('../date/now'); @@ -20111,7 +17031,7 @@ var setData = (function() { module.exports = setData; -},{"../date/now":61,"./baseSetData":92}],138:[function(require,module,exports){ +},{"../date/now":57,"./baseSetData":88}],134:[function(require,module,exports){ var isArguments = require('../lang/isArguments'), isArray = require('../lang/isArray'), isIndex = require('./isIndex'), @@ -20155,7 +17075,7 @@ function shimKeys(object) { module.exports = shimKeys; -},{"../lang/isArguments":143,"../lang/isArray":144,"../lang/isString":150,"../object/keysIn":154,"./isIndex":125,"./isLength":129}],139:[function(require,module,exports){ +},{"../lang/isArguments":139,"../lang/isArray":140,"../lang/isString":146,"../object/keysIn":150,"./isIndex":121,"./isLength":125}],135:[function(require,module,exports){ var isObject = require('../lang/isObject'), isString = require('../lang/isString'), support = require('../support'); @@ -20183,7 +17103,7 @@ function toObject(value) { module.exports = toObject; -},{"../lang/isObject":148,"../lang/isString":150,"../support":157}],140:[function(require,module,exports){ +},{"../lang/isObject":144,"../lang/isString":146,"../support":153}],136:[function(require,module,exports){ var baseToString = require('./baseToString'), isArray = require('../lang/isArray'); @@ -20213,7 +17133,7 @@ function toPath(value) { module.exports = toPath; -},{"../lang/isArray":144,"./baseToString":94}],141:[function(require,module,exports){ +},{"../lang/isArray":140,"./baseToString":90}],137:[function(require,module,exports){ var LazyWrapper = require('./LazyWrapper'), LodashWrapper = require('./LodashWrapper'), arrayCopy = require('./arrayCopy'); @@ -20233,7 +17153,7 @@ function wrapperClone(wrapper) { module.exports = wrapperClone; -},{"./LazyWrapper":64,"./LodashWrapper":65,"./arrayCopy":66}],142:[function(require,module,exports){ +},{"./LazyWrapper":60,"./LodashWrapper":61,"./arrayCopy":62}],138:[function(require,module,exports){ var baseClone = require('../internal/baseClone'), bindCallback = require('../internal/bindCallback'); @@ -20290,7 +17210,7 @@ function cloneDeep(value, customizer, thisArg) { module.exports = cloneDeep; -},{"../internal/baseClone":72,"../internal/bindCallback":98}],143:[function(require,module,exports){ +},{"../internal/baseClone":68,"../internal/bindCallback":94}],139:[function(require,module,exports){ var isArrayLike = require('../internal/isArrayLike'), isObjectLike = require('../internal/isObjectLike'); @@ -20326,7 +17246,7 @@ function isArguments(value) { module.exports = isArguments; -},{"../internal/isArrayLike":123,"../internal/isObjectLike":130}],144:[function(require,module,exports){ +},{"../internal/isArrayLike":119,"../internal/isObjectLike":126}],140:[function(require,module,exports){ var getNative = require('../internal/getNative'), isLength = require('../internal/isLength'), isObjectLike = require('../internal/isObjectLike'); @@ -20368,7 +17288,7 @@ var isArray = nativeIsArray || function(value) { module.exports = isArray; -},{"../internal/getNative":118,"../internal/isLength":129,"../internal/isObjectLike":130}],145:[function(require,module,exports){ +},{"../internal/getNative":114,"../internal/isLength":125,"../internal/isObjectLike":126}],141:[function(require,module,exports){ var isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLike = require('../internal/isArrayLike'), @@ -20417,7 +17337,7 @@ function isEmpty(value) { module.exports = isEmpty; -},{"../internal/isArrayLike":123,"../internal/isObjectLike":130,"../object/keys":153,"./isArguments":143,"./isArray":144,"./isFunction":146,"./isString":150}],146:[function(require,module,exports){ +},{"../internal/isArrayLike":119,"../internal/isObjectLike":126,"../object/keys":149,"./isArguments":139,"./isArray":140,"./isFunction":142,"./isString":146}],142:[function(require,module,exports){ var isObject = require('./isObject'); /** `Object#toString` result references. */ @@ -20457,7 +17377,7 @@ function isFunction(value) { module.exports = isFunction; -},{"./isObject":148}],147:[function(require,module,exports){ +},{"./isObject":144}],143:[function(require,module,exports){ var isFunction = require('./isFunction'), isHostObject = require('../internal/isHostObject'), isObjectLike = require('../internal/isObjectLike'); @@ -20508,7 +17428,7 @@ function isNative(value) { module.exports = isNative; -},{"../internal/isHostObject":124,"../internal/isObjectLike":130,"./isFunction":146}],148:[function(require,module,exports){ +},{"../internal/isHostObject":120,"../internal/isObjectLike":126,"./isFunction":142}],144:[function(require,module,exports){ /** * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) @@ -20538,7 +17458,7 @@ function isObject(value) { module.exports = isObject; -},{}],149:[function(require,module,exports){ +},{}],145:[function(require,module,exports){ var baseForIn = require('../internal/baseForIn'), isArguments = require('./isArguments'), isHostObject = require('../internal/isHostObject'), @@ -20620,7 +17540,7 @@ function isPlainObject(value) { module.exports = isPlainObject; -},{"../internal/baseForIn":79,"../internal/isHostObject":124,"../internal/isObjectLike":130,"../support":157,"./isArguments":143}],150:[function(require,module,exports){ +},{"../internal/baseForIn":75,"../internal/isHostObject":120,"../internal/isObjectLike":126,"../support":153,"./isArguments":139}],146:[function(require,module,exports){ var isObjectLike = require('../internal/isObjectLike'); /** `Object#toString` result references. */ @@ -20657,7 +17577,7 @@ function isString(value) { module.exports = isString; -},{"../internal/isObjectLike":130}],151:[function(require,module,exports){ +},{"../internal/isObjectLike":126}],147:[function(require,module,exports){ var isLength = require('../internal/isLength'), isObjectLike = require('../internal/isObjectLike'); @@ -20733,7 +17653,7 @@ function isTypedArray(value) { module.exports = isTypedArray; -},{"../internal/isLength":129,"../internal/isObjectLike":130}],152:[function(require,module,exports){ +},{"../internal/isLength":125,"../internal/isObjectLike":126}],148:[function(require,module,exports){ /** * Checks if `value` is `undefined`. * @@ -20756,7 +17676,7 @@ function isUndefined(value) { module.exports = isUndefined; -},{}],153:[function(require,module,exports){ +},{}],149:[function(require,module,exports){ var getNative = require('../internal/getNative'), isArrayLike = require('../internal/isArrayLike'), isObject = require('../lang/isObject'), @@ -20804,7 +17724,7 @@ var keys = !nativeKeys ? shimKeys : function(object) { module.exports = keys; -},{"../internal/getNative":118,"../internal/isArrayLike":123,"../internal/shimKeys":138,"../lang/isObject":148,"../support":157}],154:[function(require,module,exports){ +},{"../internal/getNative":114,"../internal/isArrayLike":119,"../internal/shimKeys":134,"../lang/isObject":144,"../support":153}],150:[function(require,module,exports){ var arrayEach = require('../internal/arrayEach'), isArguments = require('../lang/isArguments'), isArray = require('../lang/isArray'), @@ -20942,7 +17862,7 @@ function keysIn(object) { module.exports = keysIn; -},{"../internal/arrayEach":67,"../internal/isIndex":125,"../internal/isLength":129,"../lang/isArguments":143,"../lang/isArray":144,"../lang/isFunction":146,"../lang/isObject":148,"../lang/isString":150,"../support":157}],155:[function(require,module,exports){ +},{"../internal/arrayEach":63,"../internal/isIndex":121,"../internal/isLength":125,"../lang/isArguments":139,"../lang/isArray":140,"../lang/isFunction":142,"../lang/isObject":144,"../lang/isString":146,"../support":153}],151:[function(require,module,exports){ var keys = require('./keys'), toObject = require('../internal/toObject'); @@ -20977,7 +17897,7 @@ function pairs(object) { module.exports = pairs; -},{"../internal/toObject":139,"./keys":153}],156:[function(require,module,exports){ +},{"../internal/toObject":135,"./keys":149}],152:[function(require,module,exports){ var baseValues = require('../internal/baseValues'), keys = require('./keys'); @@ -21012,7 +17932,7 @@ function values(object) { module.exports = values; -},{"../internal/baseValues":95,"./keys":153}],157:[function(require,module,exports){ +},{"../internal/baseValues":91,"./keys":149}],153:[function(require,module,exports){ /** Used for native method references. */ var arrayProto = Array.prototype, errorProto = Error.prototype, @@ -21110,7 +18030,7 @@ var support = {}; module.exports = support; -},{}],158:[function(require,module,exports){ +},{}],154:[function(require,module,exports){ /** * This method returns the first argument provided to it. * @@ -21132,7 +18052,7 @@ function identity(value) { module.exports = identity; -},{}],159:[function(require,module,exports){ +},{}],155:[function(require,module,exports){ /** * A no-operation function that returns `undefined` regardless of the * arguments it receives. @@ -21153,7 +18073,7 @@ function noop() { module.exports = noop; -},{}],160:[function(require,module,exports){ +},{}],156:[function(require,module,exports){ var baseProperty = require('../internal/baseProperty'), basePropertyDeep = require('../internal/basePropertyDeep'), isKey = require('../internal/isKey'); @@ -21186,7 +18106,7 @@ function property(path) { module.exports = property; -},{"../internal/baseProperty":90,"../internal/basePropertyDeep":91,"../internal/isKey":127}],161:[function(require,module,exports){ +},{"../internal/baseProperty":86,"../internal/basePropertyDeep":87,"../internal/isKey":123}],157:[function(require,module,exports){ (function (process){ // vim:ts=4:sts=4:sw=4: /*! @@ -23238,15 +20158,8 @@ return Q; }); }).call(this,require('_process')) -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9xL3EuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFD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2goKSB7XG4gICAgICAgIC8qIGpzaGludCBsb29wZnVuYzogdHJ1ZSAqL1xuICAgICAgICB2YXIgdGFzaywgZG9tYWluO1xuXG4gICAgICAgIHdoaWxlIChoZWFkLm5leHQpIHtcbiAgICAgICAgICAgIGhlYWQgPSBoZWFkLm5leHQ7XG4gICAgICAgICAgICB0YXNrID0gaGVhZC50YXNrO1xuICAgICAgICAgICAgaGVhZC50YXNrID0gdm9pZCAwO1xuICAgICAgICAgICAgZG9tYWluID0gaGVhZC5kb21haW47XG5cbiAgICAgICAgICAgIGlmIChkb21haW4pIHtcbiAgICAgICAgICAgICAgICBoZWFkLmRvbWFpbiA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICBkb21haW4uZW50ZXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJ1blNpbmdsZSh0YXNrLCBkb21haW4pO1xuXG4gICAgICAgIH1cbiAgICAgICAgd2hpbGUgKGxhdGVyUXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICB0YXNrID0gbGF0ZXJRdWV1ZS5wb3AoKTtcbiAgICAgICAgICAgIHJ1blNpbmdsZSh0YXNrKTtcbiAgICAgICAgfVxuICAgICAgICBmbHVzaGluZyA9IGZhbHNlO1xuICAgIH1cbiAgICAvLyBydW5zIGEgc2luZ2xlIGZ1bmN0aW9uIGluIHRoZSBhc3luYyBxdWV1ZVxuICAgIGZ1bmN0aW9uIHJ1blNpbmdsZSh0YXNrLCBkb21haW4pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRhc2soKTtcblxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBpZiAoaXNOb2RlSlMpIHtcbiAgICAgICAgICAgICAgICAvLyBJbiBub2RlLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBjb25zaWRlcmVkIGZhdGFsIGVycm9ycy5cbiAgICAgICAgICAgICAgICAvLyBSZS10aHJvdyB0aGVtIHN5bmNocm9ub3VzbHkgdG8gaW50ZXJydXB0IGZsdXNoaW5nIVxuXG4gICAgICAgICAgICAgICAgLy8gRW5zdXJlIGNvbnRpbnVhdGlvbiBpZiB0aGUgdW5jYXVnaHQgZXhjZXB0aW9uIGlzIHN1cHByZXNzZWRcbiAgICAgICAgICAgICAgICAvLyBsaXN0ZW5pbmcgXCJ1bmNhdWdodEV4Y2VwdGlvblwiIGV2ZW50cyAoYXMgZG9tYWlucyBkb2VzKS5cbiAgICAgICAgICAgICAgICAvLyBDb250aW51ZSBpbiBuZXh0IGV2ZW50IHRvIGF2b2lkIHRpY2sgcmVjdXJzaW9uLlxuICAgICAgICAgICAgICAgIGlmIChkb21haW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmbHVzaCwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4uZW50ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aHJvdyBlO1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEluIGJyb3dzZXJzLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBub3QgZmF0YWwuXG4gICAgICAgICAgICAgICAgLy8gUmUtdGhyb3cgdGhlbSBhc3luY2hyb25vdXNseSB0byBhdm9pZCBzbG93LWRvd25zLlxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5leHRUaWNrID0gZnVuY3Rpb24gKHRh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biB0aGlzKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2lzID0gdGhpc1tpbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgrK2luZGV4ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoMSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gcmVkdWNlXG4gICAgICAgIGZvciAoOyBpbmRleCA8IGxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICAgICAgLy8gYWNjb3VudCBmb3IgdGhlIHBvc3NpYmlsaXR5IHRoYXQgdGhlIGFycmF5IGlzIHNwYXJzZVxuICAgICAgICAgICAgaWYgKGluZGV4IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICBiYXNpcyA9IGNhbGxiYWNrKGJhc2lzLCB0aGlzW2luZGV4XSwgaW5kZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBiYXNpcztcbiAgICB9XG4pO1xuXG52YXIgYXJyYXlfaW5kZXhPZiA9IHVuY3VycnlUaGlzKFxuICAgIEFycmF5LnByb3RvdHlwZS5pbmRleE9mIHx8IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAvLyBub3QgYSB2ZXJ5IGdvb2Qgc2hpbSwgYnV0IGdvb2QgZW5vdWdoIGZvciBvdXIgb25lIHVzZSBvZiBpdFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzW2ldID09PSB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9XG4pO1xuXG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I1Mi5cblxuICAgIGZ1bmN0aW9uIGJlY29tZShuZXdQcm9taXNlKSB7XG4gICAgICAgIHJlc29sdmVkUHJvbWlzZSA9IG5ld1Byb21pc2U7XG4gICAgICAgIHByb21pc2Uuc291cmNlID0gbmV3UHJvbWlzZTtcblxuICAgICAgICBhcnJheV9yZWR1Y2UobWVzc2FnZXMsIGZ1bmN0aW9uICh1bmRlZmluZWQsIG1lc3NhZ2UpIHtcbiAgICAgICAgICAgIFEubmV4dFRpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG5ld1Byb21pc2UucHJvbWlzZURpc3BhdGNoLmFwcGx5KG5ld1Byb21pc2UsIG1lc3NhZ2UpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sIHZvaWQgMCk7XG5cbiAgICAgICAgbWVzc2FnZXMgPSB2b2lkIDA7XG4gICAgICAgIHByb2dyZXNzTGlzdGVuZXJzID0gdm9pZCAwO1xuICAgIH1cblxuICAgIGRlZmVycmVkLnByb21pc2UgPSBwcm9taXNlO1xuICAgIGRlZmVycmVkLnJlc29sdmUgPSBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgaWYgKHJlc29sdmVkUHJvbWlzZSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgYmVjb21lKFEodmFsdWUpKTtcbiAgICB9O1xuXG4gICAgZGVmZXJyZWQuZnVsZmlsbCA9IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICBpZiAocmVzb2x2ZWRQcm9taXNlKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBiZWNvbWUoZnVsZmlsbCh2YWx1ZSkpO1xuICAgIH07XG4gICAgZGVmZXJyZWQucmVqZWN0ID0gZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICBpZiAocmVzb2x2ZWRQcm9taXNlKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxu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XNzZWQodmFsdWUpIDogdmFsdWU7XG4gICAgfVxuXG4gICAgUS5uZXh0VGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfZnVsZmlsbGVkKHZhbHVlKSk7XG4gICAgICAgIH0sIFwid2hlblwiLCBbZnVuY3Rpb24gKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfcmVqZWN0ZWQoZXhjZXB0aW9uKSk7XG4gICAgICAgIH1dKTtcbiAgICB9KTtcblxuICAgIC8vIFByb2dyZXNzIHByb3BhZ2F0b3IgbmVlZCB0byBiZSBhdHRhY2hlZCBpbiB0aGUgY3VycmVudCB0aWNrLlxuICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKHZvaWQgMCwgXCJ3aGVuXCIsIFt2b2lkIDAsIGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICB2YXIgbmV3VmFsdWU7XG4gICAgICAgIHZhciB0aHJldyA9IGZhbHNlO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgbmV3VmFsdWUgPSBfcHJvZ3Jlc3NlZCh2YWx1ZSk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHRocmV3ID0gdHJ1ZTtcbiAgICAgICAgICAgIGlmIChRLm9uZXJyb3IpIHtcbiAgICAgICAgICAgICAgICBRLm9uZXJyb3IoZSk7XG4gICAgICAgICAgICB9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25cIikge1xuICAgICAgICBRLm5leHRUaWNrLnJ1bkFmdGVyKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChhcnJheV9pbmRleE9mKHVuaGFuZGxlZFJlamVjdGlvbnMsIHByb21pc2UpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHByb2Nlc3MuZW1pdChcInVuaGFuZGxlZFJlamVjdGlvblwiLCByZWFzb24sIHByb21pc2UpO1xuICAgICAgICAgICAgICAgIHJlcG9ydGVkVW5oYW5kbGVkUmVqZWN0aW9ucy5wdXNoKHByb21pc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB1bmhhbmRsZWRSZWplY3Rpb25zLnB1c2gocHJvbWlzZSk7XG4gICAgaWYgKHJlYXNvbiAmJiB0eXBlb2YgcmVhc29uLnN0YWNrICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHVuaGFuZGxlZFJlYXNvbnMucHVzaChyZWFzb24uc3RhY2spO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHVuaGFuZGxlZFJlYXNvbnMucHVzaChcIihubyBzdGFjaykgXCIgKyByZWFzb24pO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gdW50cmFja1JlamVjdGlvbihwcm9taXNlKSB7XG4gICAgaWYgKCF0cmFja1VuaGFuZGxlZFJlamVjdGlvbnMpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBhdCA9IGFycmF5X2luZGV4T2YodW5oYW5kbGVkUmVqZWN0aW9ucywgcHJvbWlzZSk7XG4gICAgaWYgKGF0ICE9PSAtMSkge1xuICAgICAgICBpZiAodHlwZW9mIHByb2Nlc3MgPT09IFwib2JqZWN0XCIgJiYgdHlwZW9mIHByb2Nlc3MuZW1pdCA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICBRLm5leHRUaWNrLnJ1bkFmdGVyKGZ1bmN0aW9uICgpIHtcbiAgICAgICAg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ICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZ2VuZXJhdG9yW3ZlcmJdKGFyZyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5kb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBRKHJlc3VsdC52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4ocmVzdWx0LnZhbHVlLCBjYWxsYmFjaywgZXJyYmFjayk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBTcGlkZXJNb25rZXkgR2VuZXJhdG9yc1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FOiBSZW1vdmUgdGhpcyBjYXNlIHdoZW4gU00gZG9lcyBFUzYgZ2VuZXJhdG9ycy5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBnZW5lcmF0b3JbdmVyYl0oYXJnKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzU3RvcEl0ZXJhdGlvbihleGNlcHRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUShleGNlcHRpb24udmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChleGNlcHRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB3aGVuKHJlc3VsdCwgY2FsbGJhY2ssIGVycmJhY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iAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgKytwZW5kaW5nQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hlbihcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgtLXBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChwcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQubm90aWZ5KHsgaW5kZXg6IGluZGV4LCB2YWx1ZTogcHJvZ3Jlc3MgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCB2b2lkIDApO1xuICAgICAgICBpZiAocGVuZGluZ0NvdW50ID09PSAwKSB7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHByb21pc2VzKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICB9KTtcbn1cblxuUHJvbWlzZS5wcm90b3R5cGUuYWxsID0gZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiBhbGwodGhpcyk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGZpcnN0IHJlc29sdmVkIHByb21pc2Ugb2YgYW4gYXJyYXkuIFByaW9yIHJlamVjdGVkIHByb21pc2VzIGFyZVxu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xuXG5Qcm9taXNlLnByb3RvdHlwZS5ub2RlaWZ5ID0gZnVuY3Rpb24gKG5vZGViYWNrKSB7XG4gICAgaWYgKG5vZGViYWNrKSB7XG4gICAgICAgIHRoaXMudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIFEubmV4dFRpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG5vZGViYWNrKG51bGwsIHZhbHVlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LCBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgIFEubmV4dFRpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG5vZGViYWNrKGVycm9yKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG59O1xuXG5RLm5vQ29uZmxpY3QgPSBmdW5jdGlvbigpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJRLm5vQ29uZmxpY3Qgb25seSB3b3JrcyB3aGVuIFEgaXMgdXNlZCBhcyBhIGdsb2JhbFwiKTtcbn07XG5cbi8vIEFsbCBjb2RlIGJlZm9yZSB0aGlzIHBvaW50IHdpbGwgYmUgZmlsdGVyZWQgZnJvbSBzdGFjayB0cmFjZXMuXG52YXIgcUVuZGluZ0xpbmUgPSBjYXB0dXJlTGluZSgpO1xuXG5yZXR1cm4gUTtcblxufSk7XG4iXX0= -},{"_process":13}],162:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var Emitter = require('emitter'); -var reduce = require('reduce'); +},{"_process":12}],158:[function(require,module,exports){ /** * Root reference for iframes. */ @@ -23257,9 +20170,14 @@ if (typeof window !== 'undefined') { // Browser window } else if (typeof self !== 'undefined') { // Web Worker root = self; } else { // Other environments + console.warn("Using browser-only version of superagent in non-browser environment"); root = this; } +var Emitter = require('emitter'); +var requestBase = require('./request-base'); +var isObject = require('./is-object'); + /** * Noop. */ @@ -23267,28 +20185,10 @@ if (typeof window !== 'undefined') { // Browser window function noop(){}; /** - * Check if `obj` is a host object, - * we don't want to serialize these :) - * - * TODO: future proof, move to compoent land - * - * @param {Object} obj - * @return {Boolean} - * @api private + * Expose `request`. */ -function isHost(obj) { - var str = {}.toString.call(obj); - - switch (str) { - case '[object File]': - case '[object Blob]': - case '[object FormData]': - return true; - default: - return false; - } -} +var request = module.exports = require('./request').bind(null, Request); /** * Determine XHR. @@ -23305,7 +20205,7 @@ request.getXHR = function () { try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {} try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {} } - return false; + throw Error("Browser-only verison of superagent could not find XHR"); }; /** @@ -23320,18 +20220,6 @@ var trim = ''.trim ? function(s) { return s.trim(); } : function(s) { return s.replace(/(^\s*|\s*$)/g, ''); }; -/** - * Check if `obj` is an object. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ - -function isObject(obj) { - return obj === Object(obj); -} - /** * Serialize the given `obj`. * @@ -23344,10 +20232,8 @@ function serialize(obj) { if (!isObject(obj)) return obj; var pairs = []; for (var key in obj) { - if (null != obj[key]) { - pushEncodedKeyValuePair(pairs, key, obj[key]); - } - } + pushEncodedKeyValuePair(pairs, key, obj[key]); + } return pairs.join('&'); } @@ -23361,13 +20247,22 @@ function serialize(obj) { */ function pushEncodedKeyValuePair(pairs, key, val) { - if (Array.isArray(val)) { - return val.forEach(function(v) { - pushEncodedKeyValuePair(pairs, key, v); - }); + if (val != null) { + if (Array.isArray(val)) { + val.forEach(function(v) { + pushEncodedKeyValuePair(pairs, key, v); + }); + } else if (isObject(val)) { + for(var subkey in val) { + pushEncodedKeyValuePair(pairs, key + '[' + subkey + ']', val[subkey]); + } + } else { + pairs.push(encodeURIComponent(key) + + '=' + encodeURIComponent(val)); + } + } else if (val === null) { + pairs.push(encodeURIComponent(key)); } - pairs.push(encodeURIComponent(key) - + '=' + encodeURIComponent(val)); } /** @@ -23387,13 +20282,18 @@ function pushEncodedKeyValuePair(pairs, key, val) { function parseString(str) { var obj = {}; var pairs = str.split('&'); - var parts; var pair; + var pos; for (var i = 0, len = pairs.length; i < len; ++i) { pair = pairs[i]; - parts = pair.split('='); - obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]); + pos = pair.indexOf('='); + if (pos == -1) { + obj[decodeURIComponent(pair)] = ''; + } else { + obj[decodeURIComponent(pair.slice(0, pos))] = + decodeURIComponent(pair.slice(pos + 1)); + } } return obj; @@ -23479,6 +20379,18 @@ function parseHeader(str) { return fields; } +/** + * Check if `mime` is json or has +json structured syntax suffix. + * + * @param {String} mime + * @return {Boolean} + * @api private + */ + +function isJSON(mime) { + return /[\/+]json\b/.test(mime); +} + /** * Return the mime type for the given `str`. * @@ -23500,10 +20412,10 @@ function type(str){ */ function params(str){ - return reduce(str.split(/ *; */), function(obj, str){ - var parts = str.split(/ *= */) - , key = parts.shift() - , val = parts.shift(); + return str.split(/ *; */).reduce(function(obj, str){ + var parts = str.split(/ *= */), + key = parts.shift(), + val = parts.shift(); if (key && val) obj[key] = val; return obj; @@ -23565,15 +20477,15 @@ function Response(req, options) { ? this.xhr.responseText : null; this.statusText = this.req.xhr.statusText; - this.setStatusProperties(this.xhr.status); + this._setStatusProperties(this.xhr.status); this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders()); // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but // getResponseHeader still works. so we get content-type even if getting // other headers fails. this.header['content-type'] = this.xhr.getResponseHeader('content-type'); - this.setHeaderProperties(this.header); + this._setHeaderProperties(this.header); this.body = this.req.method != 'HEAD' - ? this.parseBody(this.text ? this.text : this.xhr.response) + ? this._parseBody(this.text ? this.text : this.xhr.response) : null; } @@ -23601,7 +20513,7 @@ Response.prototype.get = function(field){ * @api private */ -Response.prototype.setHeaderProperties = function(header){ +Response.prototype._setHeaderProperties = function(header){ // content-type var ct = this.header['content-type'] || ''; this.type = type(ct); @@ -23622,8 +20534,11 @@ Response.prototype.setHeaderProperties = function(header){ * @api private */ -Response.prototype.parseBody = function(str){ +Response.prototype._parseBody = function(str){ var parse = request.parse[this.type]; + if (!parse && isJSON(this.type)) { + parse = request.parse['application/json']; + } return parse && str && (str.length || str instanceof Object) ? parse(str) : null; @@ -23650,7 +20565,7 @@ Response.prototype.parseBody = function(str){ * @api private */ -Response.prototype.setStatusProperties = function(status){ +Response.prototype._setStatusProperties = function(status){ // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request if (status === 1223) { status = 204; @@ -23718,12 +20633,11 @@ request.Response = Response; function Request(method, url) { var self = this; - Emitter.call(this); this._query = this._query || []; this.method = method; this.url = url; - this.header = {}; - this._header = {}; + this.header = {}; // preserves header name case + this._header = {}; // coerces header names to lowercase this.on('end', function(){ var err = null; var res = null; @@ -23734,149 +20648,45 @@ function Request(method, url) { err = new Error('Parser is unable to parse the response'); err.parse = true; err.original = e; + // issue #675: return the raw response if the response parsing fails + err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null; + // issue #876: return the http status code if the response parsing fails + err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null; return self.callback(err); } self.emit('response', res); - if (err) { - return self.callback(err, res); + var new_err; + try { + if (res.status < 200 || res.status >= 300) { + new_err = new Error(res.statusText || 'Unsuccessful HTTP response'); + new_err.original = err; + new_err.response = res; + new_err.status = res.status; + } + } catch(e) { + new_err = e; // #985 touching res may cause INVALID_STATE_ERR on old Android } - if (res.status >= 200 && res.status < 300) { - return self.callback(err, res); + // #1000 don't catch errors from the callback to avoid double calling it + if (new_err) { + self.callback(new_err, res); + } else { + self.callback(null, res); } - - var new_err = new Error(res.statusText || 'Unsuccessful HTTP response'); - new_err.original = err; - new_err.response = res; - new_err.status = res.status; - - self.callback(new_err, res); }); } /** - * Mixin `Emitter`. + * Mixin `Emitter` and `requestBase`. */ Emitter(Request.prototype); - -/** - * Allow for extension - */ - -Request.prototype.use = function(fn) { - fn(this); - return this; +for (var key in requestBase) { + Request.prototype[key] = requestBase[key]; } -/** - * Set timeout to `ms`. - * - * @param {Number} ms - * @return {Request} for chaining - * @api public - */ - -Request.prototype.timeout = function(ms){ - this._timeout = ms; - return this; -}; - -/** - * Clear previous timeout. - * - * @return {Request} for chaining - * @api public - */ - -Request.prototype.clearTimeout = function(){ - this._timeout = 0; - clearTimeout(this._timer); - return this; -}; - -/** - * Abort the request, and clear potential timeout. - * - * @return {Request} - * @api public - */ - -Request.prototype.abort = function(){ - if (this.aborted) return; - this.aborted = true; - this.xhr.abort(); - this.clearTimeout(); - this.emit('abort'); - return this; -}; - -/** - * Set header `field` to `val`, or multiple fields with one object. - * - * Examples: - * - * req.get('/') - * .set('Accept', 'application/json') - * .set('X-API-Key', 'foobar') - * .end(callback); - * - * req.get('/') - * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' }) - * .end(callback); - * - * @param {String|Object} field - * @param {String} val - * @return {Request} for chaining - * @api public - */ - -Request.prototype.set = function(field, val){ - if (isObject(field)) { - for (var key in field) { - this.set(key, field[key]); - } - return this; - } - this._header[field.toLowerCase()] = val; - this.header[field] = val; - return this; -}; - -/** - * Remove header `field`. - * - * Example: - * - * req.get('/') - * .unset('User-Agent') - * .end(callback); - * - * @param {String} field - * @return {Request} for chaining - * @api public - */ - -Request.prototype.unset = function(field){ - delete this._header[field.toLowerCase()]; - delete this.header[field]; - return this; -}; - -/** - * Get case-insensitive header `field` value. - * - * @param {String} field - * @return {String} - * @api private - */ - -Request.prototype.getHeader = function(field){ - return this._header[field.toLowerCase()]; -}; - /** * Set Content-Type to `type`, mapping values from `request.types`. * @@ -23905,16 +20715,22 @@ Request.prototype.type = function(type){ }; /** - * Force given parser + * Set responseType to `val`. Presently valid responseTypes are 'blob' and + * 'arraybuffer'. * - * Sets the body parser no matter type. + * Examples: * - * @param {Function} + * req.get('/') + * .responseType('blob') + * .end(callback); + * + * @param {String} val + * @return {Request} for chaining * @api public */ -Request.prototype.parse = function(fn){ - this._parser = fn; +Request.prototype.responseType = function(val){ + this._responseType = val; return this; }; @@ -23948,13 +20764,29 @@ Request.prototype.accept = function(type){ * * @param {String} user * @param {String} pass + * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic') * @return {Request} for chaining * @api public */ -Request.prototype.auth = function(user, pass){ - var str = btoa(user + ':' + pass); - this.set('Authorization', 'Basic ' + str); +Request.prototype.auth = function(user, pass, options){ + if (!options) { + options = { + type: 'basic' + } + } + + switch (options.type) { + case 'basic': + var str = btoa(user + ':' + pass); + this.set('Authorization', 'Basic ' + str); + break; + + case 'auto': + this.username = user; + this.password = pass; + break; + } return this; }; @@ -23978,35 +20810,13 @@ Request.prototype.query = function(val){ return this; }; -/** - * Write the field `name` and `val` for "multipart/form-data" - * request bodies. - * - * ``` js - * request.post('/upload') - * .field('foo', 'bar') - * .end(callback); - * ``` - * - * @param {String} name - * @param {String|Blob|File} val - * @return {Request} for chaining - * @api public - */ - -Request.prototype.field = function(name, val){ - if (!this._formData) this._formData = new root.FormData(); - this._formData.append(name, val); - return this; -}; - /** * Queue the given `file` as an attachment to the specified `field`, * with optional `filename`. * * ``` js * request.post('/upload') - * .attach(new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"})) + * .attach('content', new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"})) * .end(callback); * ``` * @@ -24018,27 +20828,613 @@ Request.prototype.field = function(name, val){ */ Request.prototype.attach = function(field, file, filename){ - if (!this._formData) this._formData = new root.FormData(); - this._formData.append(field, file, filename); + this._getFormData().append(field, file, filename || file.name); + return this; +}; + +Request.prototype._getFormData = function(){ + if (!this._formData) { + this._formData = new root.FormData(); + } + return this._formData; +}; + +/** + * Invoke the callback with `err` and `res` + * and handle arity check. + * + * @param {Error} err + * @param {Response} res + * @api private + */ + +Request.prototype.callback = function(err, res){ + var fn = this._callback; + this.clearTimeout(); + fn(err, res); +}; + +/** + * Invoke callback with x-domain error. + * + * @api private + */ + +Request.prototype.crossDomainError = function(){ + var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.'); + err.crossDomain = true; + + err.status = this.status; + err.method = this.method; + err.url = this.url; + + this.callback(err); +}; + +/** + * Invoke callback with timeout error. + * + * @api private + */ + +Request.prototype._timeoutError = function(){ + var timeout = this._timeout; + var err = new Error('timeout of ' + timeout + 'ms exceeded'); + err.timeout = timeout; + this.callback(err); +}; + +/** + * Compose querystring to append to req.url + * + * @api private + */ + +Request.prototype._appendQueryString = function(){ + var query = this._query.join('&'); + if (query) { + this.url += ~this.url.indexOf('?') + ? '&' + query + : '?' + query; + } +}; + +/** + * Initiate request, invoking callback `fn(res)` + * with an instanceof `Response`. + * + * @param {Function} fn + * @return {Request} for chaining + * @api public + */ + +Request.prototype.end = function(fn){ + var self = this; + var xhr = this.xhr = request.getXHR(); + var timeout = this._timeout; + var data = this._formData || this._data; + + // store callback + this._callback = fn || noop; + + // state change + xhr.onreadystatechange = function(){ + if (4 != xhr.readyState) return; + + // In IE9, reads to any property (e.g. status) off of an aborted XHR will + // result in the error "Could not complete the operation due to error c00c023f" + var status; + try { status = xhr.status } catch(e) { status = 0; } + + if (0 == status) { + if (self.timedout) return self._timeoutError(); + if (self._aborted) return; + return self.crossDomainError(); + } + self.emit('end'); + }; + + // progress + var handleProgress = function(e){ + if (e.total > 0) { + e.percent = e.loaded / e.total * 100; + } + e.direction = 'download'; + self.emit('progress', e); + }; + if (this.hasListeners('progress')) { + xhr.onprogress = handleProgress; + } + try { + if (xhr.upload && this.hasListeners('progress')) { + xhr.upload.onprogress = handleProgress; + } + } catch(e) { + // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist. + // Reported here: + // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context + } + + // timeout + if (timeout && !this._timer) { + this._timer = setTimeout(function(){ + self.timedout = true; + self.abort(); + }, timeout); + } + + // querystring + this._appendQueryString(); + + // initiate request + if (this.username && this.password) { + xhr.open(this.method, this.url, true, this.username, this.password); + } else { + xhr.open(this.method, this.url, true); + } + + // CORS + if (this._withCredentials) xhr.withCredentials = true; + + // body + if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !this._isHost(data)) { + // serialize stuff + var contentType = this._header['content-type']; + var serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : '']; + if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json']; + if (serialize) data = serialize(data); + } + + // set header fields + for (var field in this.header) { + if (null == this.header[field]) continue; + xhr.setRequestHeader(field, this.header[field]); + } + + if (this._responseType) { + xhr.responseType = this._responseType; + } + + // send stuff + this.emit('request', this); + + // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing) + // We need null here if data is undefined + xhr.send(typeof data !== 'undefined' ? data : null); + return this; +}; + + +/** + * Expose `Request`. + */ + +request.Request = Request; + +/** + * GET `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.get = function(url, data, fn){ + var req = request('GET', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.query(data); + if (fn) req.end(fn); + return req; +}; + +/** + * HEAD `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.head = function(url, data, fn){ + var req = request('HEAD', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * OPTIONS query to `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.options = function(url, data, fn){ + var req = request('OPTIONS', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * DELETE `url` with optional callback `fn(res)`. + * + * @param {String} url + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +function del(url, fn){ + var req = request('DELETE', url); + if (fn) req.end(fn); + return req; +}; + +request['del'] = del; +request['delete'] = del; + +/** + * PATCH `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed} [data] + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.patch = function(url, data, fn){ + var req = request('PATCH', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * POST `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed} [data] + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.post = function(url, data, fn){ + var req = request('POST', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +/** + * PUT `url` with optional `data` and callback `fn(res)`. + * + * @param {String} url + * @param {Mixed|Function} [data] or fn + * @param {Function} [fn] + * @return {Request} + * @api public + */ + +request.put = function(url, data, fn){ + var req = request('PUT', url); + if ('function' == typeof data) fn = data, data = null; + if (data) req.send(data); + if (fn) req.end(fn); + return req; +}; + +},{"./is-object":159,"./request":161,"./request-base":160,"emitter":162}],159:[function(require,module,exports){ +/** + * Check if `obj` is an object. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isObject(obj) { + return null !== obj && 'object' === typeof obj; +} + +module.exports = isObject; + +},{}],160:[function(require,module,exports){ +/** + * Module of mixed-in functions shared between node and client code + */ +var isObject = require('./is-object'); + +/** + * Clear previous timeout. + * + * @return {Request} for chaining + * @api public + */ + +exports.clearTimeout = function _clearTimeout(){ + this._timeout = 0; + clearTimeout(this._timer); return this; }; /** - * Send `data`, defaulting the `.type()` to "json" when - * an object is given. + * Override default response body parser + * + * This function will be called to convert incoming data into request.body + * + * @param {Function} + * @api public + */ + +exports.parse = function parse(fn){ + this._parser = fn; + return this; +}; + +/** + * Override default request body serializer + * + * This function will be called to convert data set via .send or .attach into payload to send + * + * @param {Function} + * @api public + */ + +exports.serialize = function serialize(fn){ + this._serializer = fn; + return this; +}; + +/** + * Set timeout to `ms`. + * + * @param {Number} ms + * @return {Request} for chaining + * @api public + */ + +exports.timeout = function timeout(ms){ + this._timeout = ms; + return this; +}; + +/** + * Promise support + * + * @param {Function} resolve + * @param {Function} reject + * @return {Request} + */ + +exports.then = function then(resolve, reject) { + if (!this._fullfilledPromise) { + var self = this; + this._fullfilledPromise = new Promise(function(innerResolve, innerReject){ + self.end(function(err, res){ + if (err) innerReject(err); else innerResolve(res); + }); + }); + } + return this._fullfilledPromise.then(resolve, reject); +} + +/** + * Allow for extension + */ + +exports.use = function use(fn) { + fn(this); + return this; +} + + +/** + * Get request header `field`. + * Case-insensitive. + * + * @param {String} field + * @return {String} + * @api public + */ + +exports.get = function(field){ + return this._header[field.toLowerCase()]; +}; + +/** + * Get case-insensitive header `field` value. + * This is a deprecated internal API. Use `.get(field)` instead. + * + * (getHeader is no longer used internally by the superagent code base) + * + * @param {String} field + * @return {String} + * @api private + * @deprecated + */ + +exports.getHeader = exports.get; + +/** + * Set header `field` to `val`, or multiple fields with one object. + * Case-insensitive. * * Examples: * - * // querystring - * request.get('/search') - * .end(callback) + * req.get('/') + * .set('Accept', 'application/json') + * .set('X-API-Key', 'foobar') + * .end(callback); * - * // multiple data "writes" - * request.get('/search') - * .send({ search: 'query' }) - * .send({ range: '1..5' }) - * .send({ order: 'desc' }) - * .end(callback) + * req.get('/') + * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' }) + * .end(callback); + * + * @param {String|Object} field + * @param {String} val + * @return {Request} for chaining + * @api public + */ + +exports.set = function(field, val){ + if (isObject(field)) { + for (var key in field) { + this.set(key, field[key]); + } + return this; + } + this._header[field.toLowerCase()] = val; + this.header[field] = val; + return this; +}; + +/** + * Remove header `field`. + * Case-insensitive. + * + * Example: + * + * req.get('/') + * .unset('User-Agent') + * .end(callback); + * + * @param {String} field + */ +exports.unset = function(field){ + delete this._header[field.toLowerCase()]; + delete this.header[field]; + return this; +}; + +/** + * Write the field `name` and `val` for "multipart/form-data" + * request bodies. + * + * ``` js + * request.post('/upload') + * .field('foo', 'bar') + * .end(callback); + * ``` + * + * @param {String} name + * @param {String|Blob|File|Buffer|fs.ReadStream} val + * @return {Request} for chaining + * @api public + */ +exports.field = function(name, val) { + this._getFormData().append(name, val); + return this; +}; + +/** + * Abort the request, and clear potential timeout. + * + * @return {Request} + * @api public + */ +exports.abort = function(){ + if (this._aborted) { + return this; + } + this._aborted = true; + this.xhr && this.xhr.abort(); // browser + this.req && this.req.abort(); // node + this.clearTimeout(); + this.emit('abort'); + return this; +}; + +/** + * Enable transmission of cookies with x-domain requests. + * + * Note that for this to work the origin must not be + * using "Access-Control-Allow-Origin" with a wildcard, + * and also must set "Access-Control-Allow-Credentials" + * to "true". + * + * @api public + */ + +exports.withCredentials = function(){ + // This is browser-only functionality. Node side is no-op. + this._withCredentials = true; + return this; +}; + +/** + * Set the max redirects to `n`. Does noting in browser XHR implementation. + * + * @param {Number} n + * @return {Request} for chaining + * @api public + */ + +exports.redirects = function(n){ + this._maxRedirects = n; + return this; +}; + +/** + * Convert to a plain javascript object (not JSON string) of scalar properties. + * Note as this method is designed to return a useful non-this value, + * it cannot be chained. + * + * @return {Object} describing method, url, and data of this request + * @api public + */ + +exports.toJSON = function(){ + return { + method: this.method, + url: this.url, + data: this._data, + headers: this._header + }; +}; + +/** + * Check if `obj` is a host object, + * we don't want to serialize these :) + * + * TODO: future proof, move to compoent land + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +exports._isHost = function _isHost(obj) { + var str = {}.toString.call(obj); + + switch (str) { + case '[object File]': + case '[object Blob]': + case '[object FormData]': + return true; + default: + return false; + } +} + +/** + * Send `data` as the request body, defaulting the `.type()` to "json" when + * an object is given. + * + * Examples: * * // manual json * request.post('/user') @@ -24064,19 +21460,19 @@ Request.prototype.attach = function(field, file, filename){ * .end(callback) * * // defaults to x-www-form-urlencoded - * request.post('/user') - * .send('name=tobi') - * .send('species=ferret') - * .end(callback) + * request.post('/user') + * .send('name=tobi') + * .send('species=ferret') + * .end(callback) * * @param {String|Object} data * @return {Request} for chaining * @api public */ -Request.prototype.send = function(data){ +exports.send = function(data){ var obj = isObject(data); - var type = this.getHeader('Content-Type'); + var type = this._header['content-type']; // merge if (obj && isObject(this._data)) { @@ -24084,8 +21480,9 @@ Request.prototype.send = function(data){ this._data[key] = data[key]; } } else if ('string' == typeof data) { + // default to x-www-form-urlencoded if (!type) this.type('form'); - type = this.getHeader('Content-Type'); + type = this._header['content-type']; if ('application/x-www-form-urlencoded' == type) { this._data = this._data ? this._data + '&' + data @@ -24097,188 +21494,16 @@ Request.prototype.send = function(data){ this._data = data; } - if (!obj || isHost(data)) return this; + if (!obj || this._isHost(data)) return this; + + // default to json if (!type) this.type('json'); return this; }; -/** - * Invoke the callback with `err` and `res` - * and handle arity check. - * - * @param {Error} err - * @param {Response} res - * @api private - */ - -Request.prototype.callback = function(err, res){ - var fn = this._callback; - this.clearTimeout(); - fn(err, res); -}; - -/** - * Invoke callback with x-domain error. - * - * @api private - */ - -Request.prototype.crossDomainError = function(){ - var err = new Error('Origin is not allowed by Access-Control-Allow-Origin'); - err.crossDomain = true; - this.callback(err); -}; - -/** - * Invoke callback with timeout error. - * - * @api private - */ - -Request.prototype.timeoutError = function(){ - var timeout = this._timeout; - var err = new Error('timeout of ' + timeout + 'ms exceeded'); - err.timeout = timeout; - this.callback(err); -}; - -/** - * Enable transmission of cookies with x-domain requests. - * - * Note that for this to work the origin must not be - * using "Access-Control-Allow-Origin" with a wildcard, - * and also must set "Access-Control-Allow-Credentials" - * to "true". - * - * @api public - */ - -Request.prototype.withCredentials = function(){ - this._withCredentials = true; - return this; -}; - -/** - * Initiate request, invoking callback `fn(res)` - * with an instanceof `Response`. - * - * @param {Function} fn - * @return {Request} for chaining - * @api public - */ - -Request.prototype.end = function(fn){ - var self = this; - var xhr = this.xhr = request.getXHR(); - var query = this._query.join('&'); - var timeout = this._timeout; - var data = this._formData || this._data; - - // store callback - this._callback = fn || noop; - - // state change - xhr.onreadystatechange = function(){ - if (4 != xhr.readyState) return; - - // In IE9, reads to any property (e.g. status) off of an aborted XHR will - // result in the error "Could not complete the operation due to error c00c023f" - var status; - try { status = xhr.status } catch(e) { status = 0; } - - if (0 == status) { - if (self.timedout) return self.timeoutError(); - if (self.aborted) return; - return self.crossDomainError(); - } - self.emit('end'); - }; - - // progress - var handleProgress = function(e){ - if (e.total > 0) { - e.percent = e.loaded / e.total * 100; - } - self.emit('progress', e); - }; - if (this.hasListeners('progress')) { - xhr.onprogress = handleProgress; - } - try { - if (xhr.upload && this.hasListeners('progress')) { - xhr.upload.onprogress = handleProgress; - } - } catch(e) { - // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist. - // Reported here: - // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context - } - - // timeout - if (timeout && !this._timer) { - this._timer = setTimeout(function(){ - self.timedout = true; - self.abort(); - }, timeout); - } - - // querystring - if (query) { - query = request.serializeObject(query); - this.url += ~this.url.indexOf('?') - ? '&' + query - : '?' + query; - } - - // initiate request - xhr.open(this.method, this.url, true); - - // CORS - if (this._withCredentials) xhr.withCredentials = true; - - // body - if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) { - // serialize stuff - var contentType = this.getHeader('Content-Type'); - var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : '']; - if (serialize) data = serialize(data); - } - - // set header fields - for (var field in this.header) { - if (null == this.header[field]) continue; - xhr.setRequestHeader(field, this.header[field]); - } - - // send stuff - this.emit('request', this); - - // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing) - // We need null here if data is undefined - xhr.send(typeof data !== 'undefined' ? data : null); - return this; -}; - -/** - * Faux promise support - * - * @param {Function} fulfill - * @param {Function} reject - * @return {Request} - */ - -Request.prototype.then = function (fulfill, reject) { - return this.end(function(err, res) { - err ? reject(err) : fulfill(res); - }); -} - -/** - * Expose `Request`. - */ - -request.Request = Request; - +},{"./is-object":159}],161:[function(require,module,exports){ +// The node and browser modules expose versions of this with the +// appropriate constructor function bound as first argument /** * Issue a request: * @@ -24294,141 +21519,31 @@ request.Request = Request; * @api public */ -function request(method, url) { +function request(RequestConstructor, method, url) { // callback if ('function' == typeof url) { - return new Request('GET', method).end(url); + return new RequestConstructor('GET', method).end(url); } // url first - if (1 == arguments.length) { - return new Request('GET', method); + if (2 == arguments.length) { + return new RequestConstructor('GET', method); } - return new Request(method, url); + return new RequestConstructor(method, url); } -/** - * GET `url` with optional callback `fn(res)`. - * - * @param {String} url - * @param {Mixed|Function} data or fn - * @param {Function} fn - * @return {Request} - * @api public - */ - -request.get = function(url, data, fn){ - var req = request('GET', url); - if ('function' == typeof data) fn = data, data = null; - if (data) req.query(data); - if (fn) req.end(fn); - return req; -}; - -/** - * HEAD `url` with optional callback `fn(res)`. - * - * @param {String} url - * @param {Mixed|Function} data or fn - * @param {Function} fn - * @return {Request} - * @api public - */ - -request.head = function(url, data, fn){ - var req = request('HEAD', url); - if ('function' == typeof data) fn = data, data = null; - if (data) req.send(data); - if (fn) req.end(fn); - return req; -}; - -/** - * DELETE `url` with optional callback `fn(res)`. - * - * @param {String} url - * @param {Function} fn - * @return {Request} - * @api public - */ - -function del(url, fn){ - var req = request('DELETE', url); - if (fn) req.end(fn); - return req; -}; - -request.del = del; -request.delete = del; - -/** - * PATCH `url` with optional `data` and callback `fn(res)`. - * - * @param {String} url - * @param {Mixed} data - * @param {Function} fn - * @return {Request} - * @api public - */ - -request.patch = function(url, data, fn){ - var req = request('PATCH', url); - if ('function' == typeof data) fn = data, data = null; - if (data) req.send(data); - if (fn) req.end(fn); - return req; -}; - -/** - * POST `url` with optional `data` and callback `fn(res)`. - * - * @param {String} url - * @param {Mixed} data - * @param {Function} fn - * @return {Request} - * @api public - */ - -request.post = function(url, data, fn){ - var req = request('POST', url); - if ('function' == typeof data) fn = data, data = null; - if (data) req.send(data); - if (fn) req.end(fn); - return req; -}; - -/** - * PUT `url` with optional `data` and callback `fn(res)`. - * - * @param {String} url - * @param {Mixed|Function} data or fn - * @param {Function} fn - * @return {Request} - * @api public - */ - -request.put = function(url, data, fn){ - var req = request('PUT', url); - if ('function' == typeof data) fn = data, data = null; - if (data) req.send(data); - if (fn) req.end(fn); - return req; -}; - -/** - * Expose `request`. - */ - module.exports = request; -},{"emitter":163,"reduce":164}],163:[function(require,module,exports){ +},{}],162:[function(require,module,exports){ /** * Expose `Emitter`. */ -module.exports = Emitter; +if (typeof module !== 'undefined') { + module.exports = Emitter; +} /** * Initialize a new `Emitter`. @@ -24467,7 +21582,7 @@ function mixin(obj) { Emitter.prototype.on = Emitter.prototype.addEventListener = function(event, fn){ this._callbacks = this._callbacks || {}; - (this._callbacks[event] = this._callbacks[event] || []) + (this._callbacks['$' + event] = this._callbacks['$' + event] || []) .push(fn); return this; }; @@ -24483,11 +21598,8 @@ Emitter.prototype.addEventListener = function(event, fn){ */ Emitter.prototype.once = function(event, fn){ - var self = this; - this._callbacks = this._callbacks || {}; - function on() { - self.off(event, on); + this.off(event, on); fn.apply(this, arguments); } @@ -24519,12 +21631,12 @@ Emitter.prototype.removeEventListener = function(event, fn){ } // specific event - var callbacks = this._callbacks[event]; + var callbacks = this._callbacks['$' + event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { - delete this._callbacks[event]; + delete this._callbacks['$' + event]; return this; } @@ -24551,7 +21663,7 @@ Emitter.prototype.removeEventListener = function(event, fn){ Emitter.prototype.emit = function(event){ this._callbacks = this._callbacks || {}; var args = [].slice.call(arguments, 1) - , callbacks = this._callbacks[event]; + , callbacks = this._callbacks['$' + event]; if (callbacks) { callbacks = callbacks.slice(0); @@ -24573,7 +21685,7 @@ Emitter.prototype.emit = function(event){ Emitter.prototype.listeners = function(event){ this._callbacks = this._callbacks || {}; - return this._callbacks[event] || []; + return this._callbacks['$' + event] || []; }; /** @@ -24588,36 +21700,11 @@ Emitter.prototype.hasListeners = function(event){ return !! this.listeners(event).length; }; -},{}],164:[function(require,module,exports){ - -/** - * Reduce `arr` with `fn`. - * - * @param {Array} arr - * @param {Function} fn - * @param {Mixed} initial - * - * TODO: combatible error handling? - */ - -module.exports = function(arr, fn, initial){ - var idx = 0; - var len = arr.length; - var curr = arguments.length == 3 - ? initial - : arr[idx++]; - - while (idx < len) { - curr = fn.call(null, curr, arr[idx], ++idx, arr); - } - - return curr; -}; },{}]},{},[1])(1) }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9hdXRoLmpzIiwibGliL2NsaWVudC5qcyIsImxpYi9oZWxwZXJzLmpzIiwibGliL2h0dHAuanMiLCJsaWIvcmVzb2x2ZXIuanMiLCJsaWIvc2NoZW1hLW1hcmt1cC5qcyIsImxpYi9zcGVjLWNvbnZlcnRlci5qcyIsImxpYi90eXBlcy9tb2RlbC5qcyIsImxpYi90eXBlcy9vcGVyYXRpb24uanMiLCJsaWIvdHlwZXMvb3BlcmF0aW9uR3JvdXAuanMiLCJub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1yZXNvbHZlL2VtcHR5LmpzIiwibm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL3Byb2Nlc3MvYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2J1ZmZlci9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9idWZmZXIvbm9kZV9tb2R1bGVzL2Jhc2U2NC1qcy9saWIvYjY0LmpzIiwibm9kZV9tb2R1bGVzL2J1ZmZlci9ub2RlX21vZHVsZXMvaWVlZTc1NC9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9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4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKG9iai51cmwuaW5kZXhPZignPycpID4gMCkge1xuICAgICAgb2JqLnVybCA9IG9iai51cmwgKyAnJicgKyB0aGlzLm5hbWUgKyAnPScgKyB0aGlzLnZhbHVlO1xuICAgIH0gZWxzZSB7XG4gICAgICBvYmoudXJsID0gb2JqLnVybCArICc/JyArIHRoaXMubmFtZSArICc9JyArIHRoaXMudmFsdWU7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG4gIH0gZWxzZSBpZiAodGhpcy50eXBlID09PSAnaGVhZGVyJykge1xuICAgIGlmKHR5cGVvZiBvYmouaGVhZGVyc1t0aGlzLm5hbWVdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgb2JqLmhlYWRlcnNbdGhpcy5uYW1lXSA9IHRoaXMudmFsdWU7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG4gIH1cbn07XG5cbnZhciBDb29raWVBdXRob3JpemF0aW9uID0gbW9kdWxlLmV4cG9ydHMuQ29va2llQXV0aG9yaXphdGlvbiA9IGZ1bmN0aW9uIChjb29raWUpIHtcbiAgdGhpcy5jb29raWUgPSBjb29raWU7XG59O1xuXG5Db29raWVBdXRob3JpemF0aW9uLnByb3RvdHlwZS5hcHBseSA9IGZ1bmN0aW9uIChvYmopIHtcbiAgb2JqLmNvb2tpZUphciA9IG9iai5jb29raWVKYXIgfHwgbmV3IENvb2tpZUphcigpO1xuICBvYmouY29va2llSmFyLnNldENvb2tpZSh0aGlzLmNvb2tpZSk7XG5cbiAgcmV0dXJuIHRydWU7XG59O1xuXG4vKipcbiAqIFBhc3N3b3JkIEF1dGhvcml6YXRpb24gaXMgYSBiYXNpYyBhdXRoIGltcGxlbWVudGF0aW9uXG4gKi9cbnZhciBQYXNzd29yZEF1dGhvcml6YXRpb24gPSBtb2R1bGUuZXhwb3J0cy5QYXNzd29yZEF1dGhvcml6YXRpb24gPSBmdW5jdGlvbiAodXNlcm5hbWUsIHBhc3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BhcGlzIG9iamVjdFxuICAgICAgICBzZWxmLmFwaXNbYXBpUHJvcGVydHldW29wZXJhdGlvbklkXSA9IG9wZXJhdGlvbkdyb3VwW29wZXJhdGlvbklkXSA9IF8uYmluZChvcGVyYXRpb25PYmplY3QuZXhlY3V0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRpb25PYmplY3QpO1xuICAgICAgICBzZWxmLmFwaXNbYXBpUHJvcGVydHldW29wZXJhdGlvbklkXS5oZWxwID0gb3BlcmF0aW9uR3JvdXBbb3BlcmF0aW9uSWRdLmhlbHAgPSBfLmJpbmQob3BlcmF0aW9uT2JqZWN0LmhlbHAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRpb25PYmplY3QpO1xuICAgICAgICBzZWxmLmFwaXNbYXBpUHJvcGVydHldW29wZXJhdGlvbklkXS5hc0N1cmwgPSBvcGVyYXRpb25Hcm91cFtvcGVyYXRpb25JZF0uYXNDdXJsID0gXy5iaW5kKG9wZXJhdGlvbk9iamVjdC5hc0N1cmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0aW9uT2JqZWN0KTtcblxuICAgICAgICBvcGVyYXRpb25Hcm91cC5hcGlzW29wZXJhdGlvbklkXSA9IG9wZXJhdGlvbkdyb3VwLm9wZXJhdGlvbnNbb3BlcmF0aW9uSWRdID0gb3BlcmF0aW9uT2JqZWN0O1xuXG4gICAgICAgIC8vIGxlZ2FjeSBVSSBmZWF0dXJlXG4gICAgICAgIHZhciBhcGkgPSBfLmZpbmQoc2VsZi5hcGlzQXJyYXksIGZ1bmN0a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lcy5oZWFkZXJzWydjb250ZW50LXR5cGUnXSkge1xuICAgICAgICBpZihyZXMuaGVhZGVyc1snY29udGVudC10eXBlJ10uaW5kZXhPZignYXBwbGljYXRpb24vanNvbicpID49IDApIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmVzcG9uc2Uub2JqID0gSlNPTi5wYXJzZShyZXNwb25zZS5zdGF0dXNUZXh0KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHJlc3BvbnNlLm9iaiA9IG51bGw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBjYiA9IG9iai5vbi5lcnJvcjtcbiAgICB9IGVsc2UgaWYgKHJlcyAmJiBvYmoub24gJiYgb2JqLm9uLnJlc3BvbnNlKSB7XG4gICAgICB2YXIgcG9zc2libGVPYmo7XG5cbiAgICAgIC8vIEFscmVhZHkgcGFyc2VkIGJ5IGJ5IHN1cGVyYWdlbnQ/XG4gICAgICBpZihyZXMuYm9keSAmJiBPYmplY3Qua2V5cyhyZXMuYm9keSkubGVuZ3RoID4gMCkge1xuICAgICAgICBwb3NzaWJsZU9iaiA9IHJlcy5ib2R5O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcG9zc2libGVPYmogPSBqc3lhbWwuc2FmZUxvYWQocmVzLnRleHQpO1xuICAgICAgICAgICAgLy8gY2FuIHBhcnNlIGludG8gYSBzdHJpbmcuLi4gd2hpY2ggd2UgZG9uJ3QgbmVlZCBydW5uaW5nIGFyb3VuZCBpbiB0aGUgc3lzdGVtXG4gICAgICAgICAgICBwb3NzaWJsZU9iaiA9ICh0eXBlb2YgcG9zc2libGVPYmogPT09ICdzdHJpbmcnKSA/IG51bGwgOiBwb3NzaWJsZU9iajtcbiAgICAgICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgICAgIGhlbHBlcnMubG9nKCdjYW5ub3QgcGFyc2U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GF0aC5wYXJhbWV0ZXJzIHx8IFtdO1xuICAgICAgICB2YXIgcGFyYW1ldGVycyA9IG9wZXJhdGlvbi5wYXJhbWV0ZXJzIHx8IFtdO1xuXG4gICAgICAgIGZvciAoaSBpbiBzaGFyZWRQYXJhbWV0ZXJzKSB7XG4gICAgICAgICAgdmFyIHBhcmFtZXRlciA9IHNoYXJlZFBhcmFtZXRlcnNbaV07XG4gICAgICAgICAgcGFyYW1ldGVycy51bnNoaWZ0KHBhcmFtZXRlcik7XG4gICAgICAgIH1cbiAgICAgICAgaWYobWV0aG9kICE9PSAncGFyYW1ldGVycycgJiYgXy5pc09iamVjdChvcGVyYXRpb24pKSB7XG4gICAgICAgICAgb3BlcmF0aW9uLnBhcmFtZXRlcnMgPSBvcGVyYXRpb24ucGFyYW1ldGVycyB8fCBwYXJhbWV0ZXJzO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChpIGluIHBhcmFtZXRlcnMpIHtcbiAgICAgICAgICB2YXIgcGFyYW1ldGVyID0gcGFyYW1ldGVyc1tpXTtcbiAgICAgICAgICBsb2NhdGlvbiA9ICcvcGF0aHMnICsgbmFtZSArICcvJyArIG1ldGhvZCArICcvcGFyYW1ldGVycyc7XG5cbiAgICAgICAgICBpZiAocGFyYW1ldGVyLmluID09PSAnYm9keScgJiYgcGFyYW1ldGVyLnNjaGVtYSkge1xuICAgICAgICAgICAgaWYoXy5pc0FycmF5KHBhcmFtZXRlci5zY2hlbWEuYWxsT2YpKSB7XG4gICAgICAgICAgICAgIC8vIG1vdmUgdG8gYSBkZWZpbml0aW9uXG4gICAgICAgICAgICAgIHZhciBtb2RlbE5hbWUgPSAnaW5saW5lX21vZGVsJztcbiAgICAgICAgICAgICAgdmFyIG5hbWUgPSBtb2RlbE5hbWU7XG4gICAgICAgICAgICAgIHZhciBkb25lID0gZmFsc2U7IHZhciBjb3VudGVyID0gMDtcbiAgICAgICAgICAgICAgd2hpbGUoIWRvbmUpIHtcbiAgICAgICAgICAgICAgICBpZih0eXBlb2Ygc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG5hbWUgPSBtb2RlbE5hbWUgKyAnXycgKyBjb3VudGVyO1xuICAgICAgICAgICAgICAgIGNvdW50ZXIgKys7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9IHsgYWxsT2Y6IHBhcmFtZXRlci5zY2hlbWEuYWxsT2YgfTtcbiAgICAgICAgICAgICAgZGVsZXRlIHBhcmFtZXRlci5zY2hlbWEuYWxsT2Y7XG4gICAgICAgICAgICAgIHBhcmFtZXRlci5zY2hlbWEuJHJlZiA9ICcjL2RlZmluaXRpb25zLycgKyBuYW1lO1xuICAgICAgICAgICAgICB0aGlzLnByb2Nlc3NBbGxPZihyb290LCBuYW1lLCBzcGVjLmRlZmluaXRpb25zW25hbWVdLCByZXNvbHV0aW9uVGFibGUsIHVucmVzb2x2ZWRSZWZzLCBzcGVjKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLnJlc29sdmVUbyhyb290LCBwYXJhbWV0ZXIuc2NoZW1hLCByZXNvbHV0aW9uVGFibGUsIGxvY2F0aW9uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAocGFyYW1ldGVyLiRyZWYpIHtcbiAgICAgICAgICAgIC8vIHBhcmFtZXRlciByZWZlcmVuY2VcbiAgICAgICAgICAgIHRoaXMucmVzb2x2ZUlubGluZShyb290LCBzcGVjLCBwYXJhbWV0ZXIsIHJlc29sdXRpb25UYWJsZSwgdW5yZXNvbHZlZFJlZnMsIHBhcmFtZXRlci4kcmVmKTtcbiAg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hYmxlO1xuXG4gIHZhciBwYXJ0cztcbiAgZm9yKGkgPSAwOyBpIDwgYWxsLmxlbmd0aDsgaSsrKSB7XG4gICAgdmFyIGEgPSBhbGxbaV07XG4gICAgaWYocm9vdCA9PT0gYS5yb290KSB7XG4gICAgICBpZihhLnJlc29sdmVBcyA9PT0gJ3JlZicpIHtcbiAgICAgICAgLy8gcmVzb2x2ZSBhbnkgcGF0aCB3YWxraW5nXG4gICAgICAgIHZhciBqb2luZWQgPSAoKGEucm9vdCB8fCAnJykgKyAnLycgKyBhLmtleSkuc3BsaXQoJy8nKTtcbiAgICAgICAgdmFyIG5vcm1hbGl6ZWQgPSBbXTtcbiAgICAgICAgdmFyIHVybCA9ICcnO1xuICAgICAgICB2YXIgaztcblxuICAgICAgICBpZihhLmtleS5pbmRleE9mKCcuLi8nKSA+PSAwKSB7XG4gICAgICAgICAgZm9yKHZhciBqID0gMDsgaiA8IGpvaW5lZC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgaWYoam9pbmVkW2pdID09PSAnLi4nKSB7XG4gICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBub3JtYWxpemVkLnNsaWNlKDAsIG5vcm1hbGl6ZWQubGVuZ3RoLTEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIG5vcm1hbGl6ZWQucHVzaChqb2luZWRbal0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBmb3IoayA9IDA7IGsgPCBub3JtYWxpemVkLmxlbmd0aDsgayArKykge1xuICAgICAgICAgICAgaWYoayA+IDApIHtcbiAgICAgICAgICAgICAgdXJsICs9ICcvJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHVybCArPSBub3JtYWxpemVkW2tdO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyB3ZSBub3cgaGF2ZSB0byByZW1vdGUgcmVzb2x2ZSB0aGlzIGJlY2F1c2UgdGhlIHBhdGggaGFzIGNoYW5nZWRcbiAgICAgICAgICBhLnJvb3QgPSB1cmw7XG4gICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgcGFydHMgPSBhLmtleS5zcGxpdCgnIycpO1xuICAgICAgICAgIGlmKHBhcnRzLmxlbmd0aCA9PT0gMikge1xuICAgICAgICAgICAgaWYocGFydHNbMF0uaW5kZXhPZignaHR0cDovLycpID09PSAwIHx8IHBhcnRzWzBdLmluZGV4T2YoJ2h0dHBzOi8vJykgPT09IDApIHtcbiAgICAgICAgICAgICAgYS5yb290ID0gcGFydHNbMF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsb2NhdGlvbiA9IHBhcnRzWzFdLnNwbGl0KCcvJyk7XG4gICAgICAgICAgICB2YXIgcjtcbiAgICAgICAgICAgIHZhciBzID0gc3BlYztcbiAgICAgICAgICAgIGZvcihrID0gMDsgayA8IGxvY2F0aW9uLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgIHZhciBwYXJ0ID0gbG9jYXRpb25ba107XG4gICAgICAgICAgICAgIGlmKHBhcnQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgcyA9IHNbcGFydF07XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICByID0gcztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICByID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYociA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBtdXN0IHJlc29sdmUgdGhpcyB0b29cbiAgICAgICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgICA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G4gICAgICAgIHNlbGYucmVzb2x2ZUl0ZW0oc3BlYywgX3Jvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgaXRlbSk7XG4gICAgICAgIHByb2Nlc3NlZENhbGxzICs9IDE7XG5cbiAgICAgICAgaWYocHJvY2Vzc2VkQ2FsbHMgPT09IGV4cGVjdGVkQ2FsbHMpIHtcbiAgICAgICAgICBzZWxmLmZpbmlzaChzcGVjLCByb290LCByZXNvbHV0aW9uVGFibGUsIHJlc29sdmVkUmVmcywgdW5yZXNvbHZlZFJlZnMsIGNhbGxiYWNrLCB0cnVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHZhciBvYmogPSB7XG4gICAgICAgICAgdXNlSlF1ZXJ5OiBmYWxzZSwgIC8vIFRPRE9cbiAgICAgICAgICB1cmw6IGl0ZW0ucm9vdCxcbiAgICAgICAgICBtZXRob2Q6ICdnZXQnLFxuICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgIGFjY2VwdDogc2VsZi5zY29wZS5zd2FnZ2VyUmVxdWVzdEhlYWRlcnMgfHwgJ2FwcGxpY2F0aW9uL2pzb24nXG4gICAgICAgICAgfSxcbiAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICBwcm9jZXNzZWRDYWxscyArPSAxO1xuICAgICAgICAgICAgICB1bnJlc29sdmVkUmVmc1tpdGVtLmtleV0gPSB7XG4gICAgICAgICAgICAgICAgcm9vdDogaXRlbS5yb290LFxuICAgICAgICAgICAgICAgIGxvY2F0aW9uOiBpdGVtLmxvY2F0aW9uXG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgaWYgKHByb2Nlc3NlZENhbGxzID09PSBleHBlY3RlZENhbGxzKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5maW5pc2goc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ndGggPT09IDApIHtcbiAgICB0aGlzLmZpbmlzaChzcGVjLCBfcm9vdCwgcmVzb2x1dGlvblRhYmxlLCByZXNvbHZlZFJlZnMsIHVucmVzb2x2ZWRSZWZzLCBjYWxsYmFjayk7XG4gIH1cbn07XG5cblJlc29sdmVyLnByb3RvdHlwZS5yZXNvbHZlSXRlbSA9IGZ1bmN0aW9uKHNwZWMsIHJvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgaXRlbSkge1xuICB2YXIgcGF0aCA9IGl0ZW0ubG9jYXRpb247XG4gIHZhciBsb2NhdGlvbiA9IHNwZWMsIHBhcnRzID0gcGF0aC5zcGxpdCgnLycpO1xuICBpZihwYXRoICE9PSAnJykge1xuICAgIGZvciAodmFyIGogPSAwOyBqIDwgcGFydHMubGVuZ3RoOyBqKyspIHtcbiAgICAgIHZhciBzZWdtZW50ID0gcGFydHNbal07XG4gICAgICBpZiAoc2VnbWVudC5pbmRleE9mKCd+MScpICE9PSAtMSkge1xuICAgICAgICBzZWdtZW50ID0gcGFydHNbal0ucmVwbGFjZSgvfjAvZywgJ34nKS5yZXBsYWNlKC9+MS9nLCAnLycpO1xuICAgICAgICBpZiAoc2VnbWVudC5jaGFyQXQoMCkgIT09ICcvJykge1xuICAgICAgICAgIHNlZ21lbnQgPSAnLycgKyBzZWdtZW50O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodHlwZW9mIGxvY2F0aW9uID09PSAndW5kZWZpbmVkJyB8fCBsb2NhdGlvbiA9PT0gbnVsbCkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGlmIChzZWdtZW50ID09PSAnJyAmJiBqID09PSAocGFydHMubGVuZ3RoIC0gMSkgJiYgcGFydHMubGVuZ3RoID4gMSkge1xuICAgICAgICBsb2NhdGlvbiA9IG51bGw7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgaWYgKHNlZ21lbnQ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zb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgbG9jYXRpb24pIHtcbiAgdmFyIGtleSA9IHByb3BlcnR5LiRyZWYsIHJlZiA9IHByb3BlcnR5LiRyZWYsIGksIHAsIHAyLCBycztcbiAgdmFyIHJvb3RUcmltbWVkID0gZmFsc2U7XG4gIGlmIChyZWYpIHtcbiAgICBpZihyZWYuaW5kZXhPZignLi4vJykgPT09IDApIHtcbiAgICAgIC8vIHJlc2V0IHJvb3RcbiAgICAgIHAgPSByZWYuc3BsaXQoJy4uLycpO1xuICAgICAgcDIgPSByb290LnNwbGl0KCcvJyk7XG4gICAgICByZWYgPSAnJztcbiAgICAgIGZvcihpID0gMDsgaSA8IHAubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgaWYocFtpXSA9PT0gJycpIHtcbiAgICAgICAgICBwMiA9IHAyLnNsaWNlKDAsIHAyLmxlbmd0aC0xKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICByZWYgKz0gcFtpXTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcm9vdCA9ICcnO1xuICAgICAgZm9yKGkgPSAwOyBpIDwgcDIubGVuZ3RoIC0gMTsgaSsrKSB7XG4gICAgICAgIGlmKGkgPiAwKSB7IHJvb3QgKz0gJy8nOyB9XG4gICAgICAgIHJvb3QgKz0gcDJbaV07XG4gICAgICB9XG4gICAgICByb290VHJpbW1lZCA9IHRydWU7XG4gICAgfVxuICAgIGlmKHJlZi5pbmRleE9mKCcjJykgPj0gMCkge1xuICAgICAgaWYocmVmLmluZGV4T2YoJy8nKSA9PT0gMCkge1xuICAgICAgICBycyA9IHJlZi5zcGxpdCgnIycpO1xuICAgICAgICBwICA9IHJvb3Quc3BsaXQoJy8vJyk7XG4gICAgICAgIHAyID0gcFsxXS5zcGxpdCgnLycpO1xuICAgICAgICByb290ID0gcFswXSArICcvLycgKyBwMlswXSArIHJzWzBdO1xuICAgICAgICBsb2NhdGlvbiA9IHJzWzFdO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHJzID0gcmVmLnNwbGl0KCcjJyk7XG4gICAgICAgIGlmKHJzWzBdICE9PSAnJykge1xuICAgICAgICAgIHAyID0gcm9vdC5zcGxpdCgnLycpO1xuICAgICAgICAgIHAyID0gcDIuc2xpY2UoMCwgcDIubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgaWYoIXJvb3RUcmltbWVkKSB7XG4gICAgICAgICAgICByb290ID0gJyc7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHAyLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgIGlmKGsgPiAwKSB7IHJvb3QgKz0gJy8nOyB9XG4gICAgICAgICAgICAgIHJvb3QgKz0gcDJba107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJvb3QgKz0gJy8nICsgcmVmLnNwbGl0KCcjJylbMF07XG4gICAgICAgIH1cbiAgICAgICAgbG9jYXRpb24gPSByc1sxXTtcbiAgICAgIH1cbiAgICB9XG4gICAgaWYgKHJlZi5pbmRleE9mKCdodHRwJykgPT09IDApIHtcbiAgICAgIGlmKHJlZi5pbmRleE9mKCcjJykgPj0gMCkge1xuICAgICAgICByb290ID0gcmVmLnNwbGl0KCcjJylbMF07XG4gICAgICAgIGxvY2F0aW9uID0gcmVmLnNwbGl0KCcjJylbMV07XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgcm9vdCA9IHJlZjtcbiAgICAgICAgbG9jYXRpb24gPSAnJztcbiAgICAgIH1cbiAgICAgIHJlc29sdXRpb25UYWJsZS5wdXNoKHtvYmo6IHByb3BlcnR5LCByZXNvbHZlQXM6ICdpbmxpbmUnLCByb290OiByb290LCBrZXk6IGtleSwgbG9jYXRpb246IGxvY2F0aW9ufSk7XG4gICAgfSBlbHNlIGlmIChyZWYuaW5kZXhPZignIycpID09PSAwKSB7XG4gICAgICBsb2NhdGlvbiA9IHJlZi5z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F07XG4gICAgICAgIHJlZiA9IHBhcnRzWzFdO1xuICAgICAgfVxuICAgICAgZWxzZSBpZihwYXJ0c1swXSAmJiBwYXJ0c1swXS5sZW5ndGggPiAwKSB7XG4gICAgICAgIC8vIHJlbGF0aXZlIGZpbGVcbiAgICAgICAgc3AgPSByb290LnNwbGl0KCcvJyk7XG4gICAgICAgIGxyb290ID0gJyc7XG4gICAgICAgIGZvcihpID0gMDsgaSA8IHNwLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICAgIGxyb290ICs9IHNwW2ldICsgJy8nO1xuICAgICAgICB9XG4gICAgICAgIGxyb290ICs9IHBhcnRzWzBdO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG5cbiAgICAgIH1cblxuICAgICAgbG9jYXRpb24gPSBwYXJ0c1sxXTtcbiAgICB9XG4gICAgZWxzZSBpZiAocmVmLmluZGV4T2YoJ2h0dHA6Ly8nKSA9PT0gMCB8fCByZWYuaW5kZXhPZignaHR0cHM6Ly8nKSA9PT0gMCkge1xuICAgICAgbHJvb3QgPSByZWY7XG4gICAgICBsb2NhdGlvbiA9ICcnO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIC8vIHJlbGF0aXZlIGZpbGVcbiAgICAgIHNwID0gcm9vdC5zcGxpdCgnLycpO1xuICAgICAgbHJvb3QgPSAnJztcbiAgICAgIGZvcihpID0gMDsgaSA8IHNwLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICBscm9vdCArPSBzcFtpXSArICcvJztcbiAgICAgIH1cbiAgICAgIGxyb290ICs9IHJlZjtcbiAgICAgIGxvY2F0aW9uID0gJyc7XG4gICAgfVxuICAgIHJlc29sdXRpb25UYWJsZS5wdXNoKHtcbiAgICAgIG9iajogcHJvcGVydHksIHJlc29sdmVBczogJ3JlZicsIHJvb3Q6IGxyb290LCBrZXk6IHJlZiwgbG9jYXRpb246IGxvY2F0aW9uXG4gICAgfSk7XG4gIH0gZWxzZSBpZiAocHJvcGVydHkudHlwZ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UgPSAnc2VsZic7XG4gICAgICAgICAgaWYodHlwZW9mIGNvbXBvbmVudFsneC1yZXNvbHZlZC1mcm9tJ10gIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSBjb21wb25lbnRbJ3gtcmVzb2x2ZWQtZnJvbSddWzBdO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvcih2YXIgcGFydCBpbiBjb21wb25lbnQpIHtcbiAgICAgICAgICAgIGlmKCFvdXRwdXQuaGFzT3duUHJvcGVydHkocGFydCkpIHtcbiAgICAgICAgICAgICAgb3V0cHV0W3BhcnRdID0gXy5jbG9uZURlZXAoY29tcG9uZW50W3BhcnRdKTtcbiAgICAgICAgICAgICAgaWYocGFydCA9PT0gJ3Byb3BlcnRpZXMnKSB7XG4gICAgICAgICAgICAgICAgZm9yKG5hbWUgaW4gb3V0cHV0W3BhcnRdKSB7XG4gICAgICAgICAgICAgICAgICBvdXRwdXRbcGFydF1bbmFtZV1bJ3gtcmVzb2x2ZWQtZnJvbSddID0gc291cmNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIGlmKHBhcnQgPT09ICdwcm9wZXJ0aWVzJykge1xuICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0aWVzID0gY29tcG9uZW50W3BhcnRdO1xuICAgICAgICAgICAgICAgIGZvcihuYW1lIGluIHByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dC5wcm9wZXJ0aWVzW25hbWVdID0gXy5jbG9uZURlZXAocHJvcGVydGllc1tuYW1lXSk7XG4gICAgICAgICAgICAgICAgICB2YXIgcmVzb2x2ZWRGcm9tID0gcHJvcGVydGllc1tuYW1lXVsneC1yZXNvbHZlZC1mcm9tJ107XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJlc29sdmVkRnJvbSA9PT0gJ3VuZGVmaW5lZCcgfHwgcmVzb2x2ZWRGcm9tID09PSAnc2VsZicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRGcm9tID0gc291cmNlO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgb3V0cHV0LnByb3BlcnRpZXNbbmFtZV1bJ3gtcmVzb2x2ZWQtZnJvbSddID0gcmVzb2x2ZWRGcm9tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIGlmKHBhcnQgPT09ICdyZXF1aXJlZCcpIHtcbiAgICAgICAgICAgICAgICAvLyBtZXJnZSAmIGRlZHVwIHRoZSByZXF1aXJlZCBhcnJheVxuICAgICAgICAgICAgICAgIHZhciBhID0gb3V0cHV0LnJlcXVpcmVkLmNvbmNhdChjb21wb25lbnRbcGFydF0pO1xuICAgICAgICAgICAgICAgIGZvcih2YXIgayA9IDA7IGsgPCBhLmxlbmd0aDsgKytrKSB7XG4gICAgICAgICAgICAgICAgICBmb3IodmFyIGogPSBrICsgMTsgaiA8IGEubGVuZ3RoOyArK2opIHtcbiAgICAgICAgICAgICAgICAgICAgaWYoYVtrXSA9PT0gYVtqXSkgeyBhLnNwbGljZShqLS0sIDEpOyB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dC5yZXF1aXJlZCA9IGE7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSBpZihwYXJ0ID09PSAneC1yZXNvbHZlZC1mcm9tJykge1xuICAgICAgICAgICAgICAgIG91dHB1dFsneC1yZXNvbHZlZC1mcm9tJ10ucHVzaChzb3VyY2UpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IG5lZWQgdG8gbWVyZ2UgdGhpcyBwcm9wZXJ0eVxuICAgICAgICAgICAgICAgI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AgICAgICAgICAgICAgIC8vIFVzZSByZWZlcmVuY2VkIHNjaGVtYVxuICAgICAgICAgICAgICAgIGNQcm9wZXJ0eSA9IEhlbHBlcnMucmVzb2x2ZVNjaGVtYShtb2RlbC5kZWZpbml0aW9uKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBodG1sICs9IHByaW1pdGl2ZVRvSFRNTChjUHJvcGVydHkpO1xuXG4gICAgICAgICAgICBpZighcHJvcGVydHlJc1JlcXVpcmVkKSB7XG4gICAgICAgICAgICAgIGh0bWwgKz0gJywgPHNwYW4gY2xhc3M9XCJwcm9wT3B0S2V5XCI+b3B0aW9uYWw8L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYocHJvcGVydHkucmVhZE9ubHkpIHtcbiAgICAgICAgICAgICAgICBodG1sICs9ICcsIDxzcGFuIGNsYXNzPVwicHJvcFJlYWRPbmx5XCI+cmVhZCBvbmx5PC9zcGFuPic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGh0bWwgKz0gJyknO1xuXG4gICAgICAgICAgICBpZiAoIV8uaXNVbmRlZmluZWQocHJvcERlc2NyaXB0aW9uKSkge1xuICAgICAgICAgICAgICBodG1sICs9ICc6ICcgKyAnPHNwYW4gY2xhc3M9XCJwcm9wRGVzY1wiPicgKyBwcm9wRGVzY3JpcHRpb24gKyAnPC9zcGFuPic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjUHJvcGVydHkuZW51bSkge1xuICAgICAgICAgICAgICBodG1sICs9ICcgPSA8c3BhbiBjbGFzcz1cInByb3BWYWxzXCI+W1xcJycgKyBjUHJvcGVydHkuZW51bS5qb2luKCdcXCcsIFxcJycpICsgJ1xcJ108L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHByaW1pdGl2ZVRvT3B0aW9uc0hUTUwoY1Byb3BlcnR5LCBodG1sKTtc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gICAgIGlzVmFsaWQgPSB0cnVlO1xuICAgICAgfVxuICAgICAgZWxzZSBpZihkZWZpbml0aW9uLnR5cGUgPT09ICdiYXNpY0F1dGgnKSB7XG4gICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi50eXBlID0gJ2Jhc2ljQXV0aCc7XG4gICAgICAgIGlzVmFsaWQgPSB0cnVlO1xuICAgICAgfVxuICAgICAgZWxzZSBpZihkZWZpbml0aW9uLnR5cGUgPT09ICdvYXV0aDInKSB7XG4gICAgICAgIHZhciBleGlzdGluZ1Njb3BlcyA9IGRlZmluaXRpb24uc2NvcGVzIHx8IFtdO1xuICAgICAgICB2YXIgc2NvcGVzID0ge307XG4gICAgICAgIHZhciBpO1xuICAgICAgICBmb3IoaSBpbiBleGlzdGluZ1Njb3Blcykge1xuICAgICAgICAgIHZhciBzY29wZSA9IGV4aXN0aW5nU2NvcGVzW2ldO1xuICAgICAgICAgIHNjb3Blc1tzY29wZS5zY29wZV0gPSBzY29wZS5kZXNjcmlwdGlvbjtcbiAgICAgICAgfVxuICAgICAgICBzZWN1cml0eURlZmluaXRpb24udHlwZSA9ICdvYXV0aDInO1xuICAgICAgICBpZihpID4gMCkge1xuICAgICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi5zY29wZXMgPSBzY29wZXM7XG4gICAgICAgIH1cbiAgICAgICAgaWYoZGVmaW5pdGlvbi5ncmFudFR5cGVzKSB7XG4gICAgICAgICAgaWYoZGVmaW5pdGlvbi5ncmFudFR5cGVzLmltcGxpY2l0KSB7XG4gICAgICAgICAgICB2YXIgaW1wbGljaXQgPSBkZWZpbml0aW9uLmdyYW50VHlwZXMuaW1wbGljaXQ7XG4gICAgICAgICAgICBzZWN1cml0eURlZmluaXRpb24uZmxvdyA9ICdpbXBsaWNpdCc7XG4gICAgICAgICAgICBzZWN1cml0eURlZmluaXRpb24uYXV0aG9yaXphdGlvblVybCA9IGltcGxpY2l0LmxvZ2luRW5kcG9pbnQ7XG4gICAgICAgICAgICBpc1ZhbGlkID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLyoganNoaW50IGlnbm9yZTpzdGFydCAqL1xuICAgICAgICAgIGlmKGRlZmluaXRpb24uZ3JhbnRUeXBlc1snYXV0aG9yaXphdGlvbl9jb2RlJ10pIHtcbiAgICAgICAgICAgIGlmKCFzZWN1cml0eURlZmluaXRpb24uZmxvdykge1xuICAgICAgICAgICAgICAvLyBjYW5ub3Qgc2V0IGlmIGZsb3cgaXMgYWxyZWFkeSBkZWZpbmVkXG4gICAgICAgICAgICAgIHZhciBhdXRoQ29kZSA9IGRlZmluaXRpb24uZ3JhbnRUeXBlc1snYXV0aG9yaXphdGlvbl9jb2RlJ107XG4gICAgICAgICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi5mbG93ID0gJ2FjY2Vzc0NvZGUnO1xuICAgICAgICAgICAgICBzZWN1cml0eURlZmluaXRpb24uYXV0aG9yaXphdGlvblVybCA9IGF1dGhDb2RlLnRva2VuUmVxdWVzdEVuZHBvaW50LnVybDtcbiAgICAgICAgICAgICAgc2VjdXJpdHlEZWZpbml0aW9uLnRva2VuVXJsID0gYXV0aENvZGUudG9rZW5FbmRwb2ludC51cmw7XG4gICAgICAgICAgICAgIGlzVmFsaWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICAvKiBqc2hpbnQgaWdub3JlOmVuZCAqL1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZihpc1ZhbGlkKSB7XG4gICAgICAgIHN3YWdnZXIuc2VjdXJpdHlEZWZpbml0aW9ucyA9IHN3YWdnZXIuc2VjdXJpdHlEZWZpbml0aW9ucyB8fCB7fTtcbiAgICAgICAgc3dhZ2dlci5zZWN1cml0eURlZmluaXRpb25zW25hbWVdID0gc2VjdXJpdHlEZWZpbml0aW9uO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuU3dhZ2dlclNwZWNDb252ZXJ0ZXIucHJvdG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sdWUgPSBmb3JtUGFyYW1zW2tleV07XG5cbiAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIGlmIChlbmNvZGVkICE9PSAnJykge1xuICAgICAgICAgIGVuY29kZWQgKz0gJyYnO1xuICAgICAgICB9XG5cbiAgICAgICAgZW5jb2RlZCArPSBlbmNvZGVVUklDb21wb25lbnQoa2V5KSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgYm9keSA9IGVuY29kZWQ7XG4gIH0gZWxzZSBpZiAoaXNNdWx0aVBhcnQpIHtcbiAgICBpZiAob3B0cy51c2VKUXVlcnkpIHtcbiAgICAgIHZhciBib2R5UGFyYW0gPSBuZXcgRm9ybURhdGEoKTtcblxuICAgICAgYm9keVBhcmFtLnR5cGUgPSAnZm9ybURhdGEnO1xuXG4gICAgICBmb3IgKGtleSBpbiBmb3JtUGFyYW1zKSB7XG4gICAgICAgIHZhbHVlID0gYXJnc1trZXldO1xuXG4gICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgLy8gcmVxdWlyZWQgZm9yIGpxdWVyeSBmaWxlIHVwbG9hZFxuICAgICAgICAgIGlmICh2YWx1ZS50eXBlID09PSAnZmlsZScgJiYgdmFsdWUudmFsdWUpIHtcbiAgICAgICAgICAgIGRlbGV0ZSBoZWFkZXJzWydDb250ZW50LVR5cGUnXTtcblxuICAgICAgICAgICAgYm9keVBhcmFtLmFwcGVuZChrZXksIHZhbHVlLnZhbHVlKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYm9keVBhcmFtLmFwcGVuZChrZXksIHZhbHVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgYm9keSA9IGJvZHlQYXJhbTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gYm9keTt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gdGVtcENvZGVQb2ludCA9IChmaXJzdEJ5dGUgJiAweDFGKSA8PCAweDYgfCAoc2Vjb25kQnl0ZSAmIDB4M0YpXG4gICAgICAgICAgICBpZiAodGVtcENvZGVQb2ludCA+IDB4N0YpIHtcbiAgICAgICAgICAgICAgY29kZVBvaW50ID0gdGVtcENvZGVQb2ludFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgc2Vjb25kQnl0ZSA9IGJ1ZltpICsgMV1cbiAgICAgICAgICB0aGlyZEJ5dGUgPSBidWZbaSArIDJdXG4gICAgICAgICAgaWYgKChzZWNvbmRCeXRlICYgMHhDMCkgPT09IDB4ODAgJiYgKHRoaXJkQnl0ZSAmIDB4QzApID09PSAweDgwKSB7XG4gICAgICAgICAgICB0ZW1wQ29kZVBvaW50ID0gKGZpcnN0Qnl0ZSAmIDB4RikgPDwgMHhDIHwgKHNlY29uZEJ5dGUgJiAweDNGKSA8PCAweDYgfCAodGhpcmRCeXRlICYgMHgzRilcbiAgICAgICAgICAgIGlmICh0ZW1wQ29kZVBvaW50ID4gMHg3RkYgJiYgKHRlbXBDb2RlUG9pbnQgPCAweEQ4MDAgfHwgdGVtcENvZGVQb2ludCA+IDB4REZGRikpIHtcbiAgICAgICAgICAgICAgY29kZVBvaW50ID0gdGVtcENvZGVQb2ludFxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgc2Vjb25kQnl0ZSA9IGJ1ZltpICsgMV1cbiAgICAgICAgICB0aGlyZEJ5dGUgPSBidWZbaSArIDJdXG4gICAgICAgICAgZm91cnRoQnl0ZSA9IGJ1ZltpICsgM11cbiAgICAgICAgICBpZiAoKHNlY29uZEJ5dGUgJiAweEMwKSA9PT0gMHg4MCAmJiAodGhpcmRCeXRlICYgMHhDMCkgPT09IDB4ODAgJiYgKGZvdX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xuICAgICAgICAgICAgdGhpcy5uYW1lID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSBudWxsO1xuICAgICAgICAgICAgdGhpcy5leHBpcmF0aW9uX2RhdGUgPSBJbmZpbml0eTtcbiAgICAgICAgICAgIHRoaXMucGF0aCA9IFN0cmluZyhyZXF1ZXN0X3BhdGggfHwgXCIvXCIpO1xuICAgICAgICAgICAgdGhpcy5leHBsaWNpdF9wYXRoID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLmRvbWFpbiA9IHJlcXVlc3RfZG9tYWluIHx8IG51bGw7XG4gICAgICAgICAgICB0aGlzLmV4cGxpY2l0X2RvbWFpbiA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5zZWN1cmUgPSBmYWxzZTsgLy9ob3cgdG8gZGVmaW5lIGRlZmF1bHQ/XG4gICAgICAgICAgICB0aGlzLm5vc2NyaXB0ID0gZmFsc2U7IC8vaHR0cG9ubHlcbiAgICAgICAgICAgIGlmIChjb29raWVzdHIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBhcnNlKGNvb2tpZXN0ciwgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IENvb2tpZShjb29raWVzdHIsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgIH1cbiAgICBleHBvcnRzLkNvb2tpZSA9IENvb2tpZTtcblxuICAgIENvb2tpZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICAgICAgdmFyIHN0ciA9IFt0aGlzLm5hbWUgKyBcIj1cIiArIHRoaXMudmFsdWVdO1xuICAgICAgICBpZiAodGhpcy5leHBpcmF0aW9uX2RhdGUgIT09IEluZmluaXR5KSB7XG4gICAgICAgICAgICBzdHIucHVzaChcImV4cGlyZXM9XCIgKyAobmV3IERhdGUodGhpcy5leHBpcmF0aW9uX2RhdGUpKS50b0dNVFN0cmluZygpKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5kb21haW4pIHtcbiAgICAgICAgICAgIHN0ci5wdXNoKFwiZG9tYWluPVwiICsgdGhpcy5kb21haW4pO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLnBhdGgpIHtcbiAgICAgICAgICAgIHN0ci5wdXNoKFwicGF0aD1cIiArIHRoaXMucGF0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuc2VjdXJlKSB7XG4gICAgICAgICAgICBzdHIucHVzaChcInNlY3VyZVwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5ub3NjcmlwdCkge1xuICAgICAgICAgICAgc3RyLnB1c2goXCJodHRwb25seVwiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RyLmpvaW4oXCI7IFwiKTtcbiAgICB9O1xuXG4gICAgQ29va2llLnByb3RvdHlwZS50b1ZhbHVlU3RyaW5nID0gZnVuY3Rpb24gdG9WYWx1ZVN0cmluZygpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMubmFtZSArIFwiPVwiICsgdGhpcy52YWx1ZTtcbiAgICB9O1xuXG4gICAgdmFyIGNvb2tpZV9zdHJfc3BsaXR0ZXIgPSAvWzpdKD89XFxzKlthLXpBLVowLTlfXFwtXStcXHMqWz1dKS9nO1xuICAgIENvb2tpZS5wcm90b3R5cGUucGFyc2UgPSBmdW5jdGlvbiBwYXJzZShzdHIsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpIHtcbiAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDb29raWUpIHtcbiAgICAgICAgICAgIHZhciBwYXJ0cyA9IHN0ci5zcGxpdChcIjtcIikuZmlsdGVyKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gISF2YWx1ZTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBwYWlyID0gcGFydHNbMF0ubWF0Y2goLyhbXj1dKyk9KFtcXHNcXFNdKikvKSxcbiAgICAgICAgICAgICAgICBrZXkgPSBwYWlyWzFdLFxuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFpclsyXSxcbiAgICAgICAgICAgICAgICBpO1xuICAgICAgICAgICAgdGhpcy5uYW1lID0ga2V5O1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHZhbHVlO1xuXG4gICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDwgcGFydHMubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICBwYWlyID0gcGFydHNbaV0ubWF0Y2goLyhbXj1dKykoPzo9KFtcXHNcXFNdKikpPy8pO1xuICAgICAgICAgICAgICAgIGtleSA9IHBhaXJbMV0udHJpbSgpLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYWlyWzJdO1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgICAgICAgICAgY2FzZSBcImh0dHBvbmx5XCI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9zY3JpcHQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFwiZXhwaXJlc1wiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmV4cGlyYXRpb25fZGF0ZSA9IHZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBOdW1iZXIoRGF0ZS5wYXJzZSh2YWx1ZSkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcInBhdGhcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXRoID0gdmFsdWUgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLnRyaW0oKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5leHBsaWNpdF9wYXRoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcImRvbWFpblwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbWFpbiA9IHZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS50cmltKCkgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwbGljaXRfZG9tYWluID0gISF0aGlzLmRvbWFpbjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcInNlY3VyZVwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlY3VyZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0aGlzLmV4cGxpY2l0X3BhdGgpIHtcbiAgICAgICAgICAgICAgIHRoaXMucGF0aCA9IHJlcXVlc3RfcGF0aCB8fCBcIi9cIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghdGhpcy5leHBsaWNpdF9kb21haW4pIHtcbiAgICAgICAgICAgICAgIHRoaXMuZG9tYWluID0gcmVxdWVzdF9kb21haW47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgQ29va2llKCkucGFyc2Uoc3RyLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKTtcbiAgICB9O1xuXG4gICAgQ29va2llLnByb3RvdHl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uZG9tYWluLnJlcGxhY2UoL15bXFwuXS8sJycpO1xuICAgICAgICBpZiAoY29va2llX2RvbWFpbiA9PT0gYWNjZXNzX2RvbWFpbikge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvb2tpZV9kb21haW4pIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5leHBsaWNpdF9kb21haW4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7IC8vIHdlIGFscmVhZHkgY2hlY2tlZCBpZiB0aGUgZG9tYWlucyB3ZXJlIGV4YWN0bHkgdGhlIHNhbWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB3aWxkY2FyZCA9IGFjY2Vzc19kb21haW4uaW5kZXhPZihjb29raWVfZG9tYWluKTtcbiAgICAgICAgICAgIGlmICh3aWxkY2FyZCA9PT0gLTEgfHwgd2lsZGNhcmQgIT09IGFjY2Vzc19kb21haW4ubGVuZ3RoIC0gY29va2llX2RvbWFpbi5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gQ29va2llSmFyKCkge1xuICAgICAgICB2YXIgY29va2llcywgY29va2llc19saXN0LCBjb2xsaWRhYmxlX2Nvb2tpZTtcbiAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDb29raWVKYXIpIHtcbiAgICAgICAgICAgIGNvb2tpZXMgPSBPYmplY3QuY3JlYXRlKG51bGwpOyAvL25hbWU6IFtDb29raWVdXG5cbiAgICAgICAgICAgIHRoaXMuc2V0Q29va2llID0gZnVuY3Rpb24gc2V0Q29va2llKGNvb2tpZSwgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCkge1xuICAgICAgICAgICAgICAgIHZhciByZW1vdmUsIGk7XG4gICAgICAgICAgICAgICAgY29va2llID0gbmV3IENvb2tpZShjb29raWUsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgICAgICAgICAgICAgIC8vRGVsZXRlIHRoZSBjb29raWUgaWYgdGhlIHNldCBpcyBwYXN0IHRoZSBjdXJyZW50IHRpbWVcbiAgICAgICAgICAgICAgICByZW1vdmUgPSBjb29raWUuZXhwaXJhdGlvbl9kYXRlIDw9IERhdGUubm93KCk7XG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZXNbY29va2llLm5hbWVdICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29va2llc19saXN0ID0gY29va2llc1tjb29raWUubmFtZV07XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb29raWVzX2xpc3QubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxpZGFibGVfY29va2llID0gY29va2llc19saXN0W2ldO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbGxpZGFibGVfY29va2llLmNvbGxpZGVzV2l0aChjb29raWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWVzX2xpc3Quc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29va2llc19saXN0Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvb2tpZXNbY29va2llLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llc19saXN0W2ldID0gY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZXNfbGlzdC5wdXNoKGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChyZW1vdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb29raWVzW2Nvb2tpZS5uYW1lXSA9IFtjb29raWVdO1xuICAgICAgICAgICAgICAgIHJldHVybiBjb29raWVzW2Nvb2tpZS5uYW1lXTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvL3JldHVybnMgYSBjb29raWVcbiAgICAgICAgICAgIHRoaXMuZ2V0Q29va2llID0gZnVuY3Rpb24gZ2V0Q29va2llKGNvb2tpZV9uYW1lLCBhY2Nlc3NfaW5mbykge1xuICAgICAgICAgICAgICAgIHZhciBjb29raWUsIGk7XG4gICAgICAgICAgICAgICAgY29va2llc19saXN0ID0gY29va2llc1tjb29raWVfbmFtZV07XG4gICAgICAgICAgICAgICAgaWYgKCFjb29raWVzX2xpc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29va2llc19saXN0Lmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZSA9IGNvb2tpZXNfbGlzdFtpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZS5leHBpcmF0aW9uX2RhdGUgPD0gRGF0ZS5ub3coKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZXNfbGlzdC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgY29va2llc1tjb29raWUubmFtZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUubWF0Y2hlcyhhY2Nlc3NfaW5mbykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgLy9yZXR1cm5zIGEgbGlzdCBvZiBjb29raWVzXG4gICAgICAgICAgICB0aGlzLmdldENvb2tpZXMgPSBmdW5jdGlvbiBnZXRDb29raWVzKGFjY2Vzc19pbmZvKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBbXSwgY29va2llX25hbWUsIGNvb2tpZTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvb2tpZV9uYW1lIGluIGNvb2tpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29va2llID0gdGhpcy5nZXRDb29raWUoY29va2llX25hbWUsIGFjY2Vzc19pbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcy5wdXNoKGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbWF0Y2hlcy50b1N0cmluZyA9IGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcy5qb2luKFwiOlwiKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG1hdGNoZXMudG9WYWx1ZVN0cmluZyA9IGZ1bmN0aW9uIHRvVmFsdWVTdHJpbmcoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaGVzLm1hcChmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMudG9WYWx1ZVN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCc7Jyk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcztcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgQ29va2llSmFyKCk7XG4gICAgfVxuICAgIGV4cG9ydHMuQ29va2llSmFyID0gQ29va2llSmFyO1xuXG4gICAgLy9yZXR1cm5zIGxpc3Qgb2YgY29va2llcyB0aGF0IHdlcmUgc2V0IGNvcnJlY3RseS4gQ29va2llcyB0aGF0IGFyZSBleHBpcmVkIGFuZCByZW1vdmVkIGFyZSBub3QgcmV0dXJuZWQuXG4gICAgQ29va2llSmFyLnByb3RvdHlwZS5zZXRDb29raWVzID0gZnVuY3Rpb24gc2V0Q29va2llcyhjb29raWVzLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKSB7XG4gICAgICAgIGNvb2tpZXMgPSBBcnJheS5pc0FycmF5KGNvb2tpZXMpID9cbiAgICAgICAgICAgICAgICBjb29raWVzIDpcbiAgICAgICAgICAgICAgICBjb29raWVzLnNwbGl0KGNvb2tpZV9zdHJfc3BsaXR0ZXIpO1xuICAgICAgICB2YXIgc3VjY2Vzc2Z1bCA9IFtdLFxuICAgICAgICAgICAgaSxcbiAgICAgICAgICAgIGNvb2tpZTtcb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SAvXig/OiF8ISF8IVthLXpcXC1dKyEpJC9pO1xudmFyIFBBVFRFUk5fVEFHX1VSSSAgICAgICAgICAgICAgID0gL14oPzohfFteLFxcW1xcXVxce1xcfV0pKD86JVswLTlhLWZdezJ9fFswLTlhLXpcXC0jO1xcL1xcPzpAJj1cXCtcXCQsX1xcLiF+XFwqJ1xcKFxcKVxcW1xcXV0pKiQvaTtcblxuXG5mdW5jdGlvbiBpc19FT0woYykge1xuICByZXR1cm4gKGMgPT09IDB4MEEvKiBMRiAqLykgfHwgKGMgPT09IDB4MEQvKiBDUiAqLyk7XG59XG5cbmZ1bmN0aW9uIGlzX1dISVRFX1NQQUNFKGMpIHtcbiAgcmV0dXJuIChjID09PSAweDA5LyogVGFiICovKSB8fCAoYyA9PT0gMHgyMC8qIFNwYWNlICovKTtcbn1cblxuZnVuY3Rpb24gaXNfV1NfT1JfRU9MKGMpIHtcbiAgcmV0dXJuIChjID09PSAweDA5LyogVGFiICovKSB8fFxuICAgICAgICAgKGMgPT09IDB4MjAvKiBTcGFjZSAqLykgfHxcbiAgICAgICAgIChjID09PSAweDBBLyogTEYgKi8pIHx8XG4gICAgICAgICAoYyA9PT0gMHgwRC8qIENSICovKTtcbn1cblxuZnVuY3Rpb24gaXNfRkxPV19JTkRJQ0FUT1IoYykge1xuICByZXR1cm4gMHgyQy8qICwgKi8gPT09IGMgfHxcbiAgICAgICAgIDB4NUIvKiBbICovID09PSBjIHx8XG4gICAgICAgICAweDVELyogXSAqLyA9PT0gYyB8fFxuICAgICAgICAgMHg3Qi8qIHsgKi8gPT09IGMgfHxcbiAgICAgICAgIDB4N0QvKiB9ICovID09PSBjO1xufVxuXG5mdW5jdGlvbiBmcm9tSGV4Q29kZShjKSB7XG4gIHZhciBsYztcblxuICBpZiAoKDB4MzAvKiAwICovIDw9IGMpICYmIChjIDw9IDB4MzkvKiA5ICovKSkge1xuICAgIHJldHVybiBjIC0gMHgzMDtcbiAgfVxuXG4gIC8qZXNsaW50LWRpc2Fib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gICAgICB8fFxuICAgICAgaXNfRkxPV19JTkRJQ0FUT1IoY2gpICAgICAgICB8fFxuICAgICAgMHgyMy8qICMgKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgyNi8qICYgKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgyQS8qICogKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgyMS8qICEgKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHg3Qy8qIHwgKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgzRS8qID4gKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgyNy8qICcgKi8gICAgICAgICAgID09PSBjaCB8fFxuICAgICAgMHgyMi8qIFwiICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4MjUvKiAlICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4NDAvKiBAICovICAgICAgICAgICA9PT0gY2ggfHxcbiAgICAgIDB4NjAvKiBgICovICAgICAgICAgICA9PT0gY2gpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBpZiAoMHgzRi8qID8gKi8gPT09IGNoIHx8IDB4MkQvKiAtICovID09PSBjaCkge1xuICAgIGZvbGxvd2luZyA9IHN0YXRlLmlucHV0LmNoYXJDb2RlQXQoc3RhdGUucG9zaXRpb24gKyAxKTtcblxuICAgIGlmIChpc19XU19PUl9FT0woZm9sbG93aW5nKSB8fFxuICAgICAgICB3aXRoaW5GbG93Q29sbGVjdGlvbiAmJiBpc19GTE9XX0lORElDQVRPUihmb2xsb3dpbmcpKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG5cbiAgc3RhdGUua2luZCA9ICdzY2FsYXInO1xuICBzdGF0ZS5yZXN1bHQgPSAnJztcbiAgY2FwdHVyZVN0YXJ0ID0gY2FwdHVyZUVuZCA9IHN0YXRlLnBvc2l0aW9uO1xuICBoYXNQZW5kaW5nQ29udGV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KSB7XG4gICAgY2ggPSBkYXRhWysraW5kZXhdO1xuICB9XG5cbiAgaWYgKGNoID09PSAnMCcpIHtcbiAgICAvLyAwXG4gICAgaWYgKGluZGV4ICsgMSA9PT0gbWF4KSB7IHJldHVybiB0cnVlOyB9XG4gICAgY2ggPSBkYXRhWysraW5kZXhdO1xuXG4gICAgLy8gYmFzZSAyLCBiYXNlIDgsIGJhc2UgMTZcblxuICAgIGlmIChjaCA9PT0gJ2InKSB7XG4gICAgICAvLyBiYXNlIDJcbiAgICAgIGluZGV4Kys7XG5cbiAgICAgIGZvciAoOyBpbmRleCA8IG1heDsgaW5kZXgrKykge1xuICAgICAgICBjaCA9IGRhdGFbaW5kZXhdO1xuICAgICAgICBpZiAoY2ggPT09ICdfJykgeyBjb250aW51ZTsgfVxuICAgICAgICBpZiAoY2ggIT09ICcwJyAmJiBjaCAhPT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGhhc0RpZ2l0cyA9IHRydWU7XG4gICAgICB9XG4gICAgICByZXR1cm4gaGFzRGlnaXRzO1xuICAgIH1cblxuXG4gICAgaWYgKGNoID09PSAneCcpIHtcbiAgICAgIC8vIGJhc2UgMTZcbiAgICAgIGluZGV4Kys7XG5cbiAgICAgIGZvciAoOyBpbmRleCA8IG1heDsgaW5kZXgrKykge1xuICAgICAgICBjaCA9IGRhdGFbaW5kZXhdO1xuICAgICAgICBpZiAoY2ggPT09ICdfJykgeyBjb250aW51ZTsgfVxuICAgICAgICBpZiAoIWlzSGV4Q29kZShkYXRhLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBoYXNEaWdpdHMgPSB0cnVlO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGhhc0RpZ2l0cztcbiAgICB9XG5cbiAgICAvLyBiYXNlIDhcbiAgICBmb3IgKDsgaW5kZXggPCBtYXg7IGlu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gICAgIHNvdXJjZSxcbiAgICAgICAgc3RyaWN0LFxuICAgICAgICBpbmRleCxcbiAgICAgICAgbGluZU51bWJlcixcbiAgICAgICAgbGluZVN0YXJ0LFxuICAgICAgICBoYXNMaW5lVGVybWluYXRvcixcbiAgICAgICAgbGFzdEluZGV4LFxuICAgICAgICBsYXN0TGluZU51bWJlcixcbiAgICAgICAgbGFzdExpbmVTdGFydCxcbiAgICAgICAgc3RhcnRJbmRleCxcbiAgICAgICAgc3RhcnRMaW5lTnVtYmVyLFxuICAgICAgICBzdGFydExpbmVTdGFydCxcbiAgICAgICAgc2Nhbm5pbmcsXG4gICAgICAgIGxlbmd0aCxcbiAgICAgICAgbG9va2FoZWFkLFxuICAgICAgICBzdGF0ZSxcbiAgICAgICAgZXh0cmEsXG4gICAgICAgIGlzQmluZGluZ0VsZW1lbnQsXG4gICAgICAgIGlzQXNzaWdubWVudFRhcmdldCxcbiAgICAgICAgZmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yO1xuXG4gICAgVG9rZW4gPSB7XG4gICAgICAgIEJvb2xlYW5MaXRlcmFsOiAxLFxuICAgICAgICBFT0Y6IDIsXG4gICAgICAgIElkZW50aWZpZXI6IDMsXG4gICAgICAgIEtleXdvcmQ6IDQsXG4gICAgICAgIE51bGxMaXRlcmFsOiA1LFxuICAgICAgICBOdW1lcmljTGl0ZXJhbDogNixcbiAgICAgICAgUHVuY3R1YXRvcjogNyxcbiAgICAgICAgU3RyaW5nTGl0ZXJhbDogOCxcbiAgICAgICAgUmVndWxhckV4cHJlc3Npb246IDksXG4gICAgICAgIFRlbXBsYXRlOiAxMFxuICAgIH07XG5cbiAgICBUb2tlbk5hbWUgPSB7fTtcbiAgICBUb2tlbk5hbWVbVG9rZW4uQm9vbGVhbkxpdGVyYWxdID0gJ0Jvb2xlYW4nO1xuICAgIFRva2VuTmFtZVtUb2tlbi5FT0ZdID0gJzxlbmQ+JztcbiAgICBUb2tlbk5hbWVbVG9rZW4uSWRlb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aWN0TW9kZVJlc2VydmVkV29yZChpZCkge1xuICAgICAgICBzd2l0Y2ggKGlkKSB7XG4gICAgICAgIGNhc2UgJ2ltcGxlbWVudHMnOlxuICAgICAgICBjYXNlICdpbnRlcmZhY2UnOlxuICAgICAgICBjYXNlICdwYWNrYWdlJzpcbiAgICAgICAgY2FzZSAncHJpdmF0ZSc6XG4gICAgICAgIGNhc2UgJ3Byb3RlY3RlZCc6XG4gICAgICAgIGNhc2UgJ3B1YmxpYyc6XG4gICAgICAgIGNhc2UgJ3N0YXRpYyc6XG4gICAgICAgIGNhc2UgJ3lpZWxkJzpcbiAgICAgICAgY2FzZSAnbGV0JzpcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaXNSZXN0cmljdGVkV29yZChpZCkge1xuICAgICAgICByZXR1cm4gaWQgPT09ICdldmFsJyB8fCBpZCA9PT0gJ2FyZ3VtZW50cyc7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuNi4yLjEgS2V5d29yZHNcblxuICAgIGZ1bmN0aW9uIGlzS2V5d29yZChpZCkge1xuICAgICAgICBzd2l0Y2ggKGlkLmxlbmd0aCkge1xuICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAnaWYnKSB8fCAoaWQgPT09ICdpbicpIHx8IChpZCA9PT0gJ2RvJyk7XG4gICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgIHJldHVybiAoaWQgPT09ICd2YXInKSB8fCAoaWQgPT09ICdmb3InKSB8fCAoaWQgPT09ICduZXcnKSB8fFxuICAgICAgICAgICAgICAgIChpZCA9PT0gJ3RyeScpIHx8IChpZCA9PT0gJ2xldCcpO1xuICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICByZXR1cm4gKGlkID09PSAndGhpcycpIHx8IChp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9XG5cbiAgICAvLyBFQ01BLTI2MiAxMS40IENvbW1lbnRzXG5cbiAgICBmdW5jdGlvbiBhZGRDb21tZW50KHR5cGUsIHZhbHVlLCBzdGFydCwgZW5kLCBsb2MpIHtcbiAgICAgICAgdmFyIGNvbW1lbnQ7XG5cbiAgICAgICAgYXNzZXJ0KHR5cGVvZiBzdGFydCA9PT0gJ251bWJlcicsICdDb21tZW50IG11c3QgaGF2ZSB2YWxpZCBwb3NpdGlvbicpO1xuXG4gICAgICAgIHN0YXRlLmxhc3RDb21tZW50U3RhcnQgPSBzdGFydDtcblxuICAgICAgICBjb21tZW50ID0ge1xuICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgIHZhbHVlOiB2YWx1ZVxuICAgICAgICB9O1xuICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgIGNvbW1lbnQucmFuZ2UgPSBbc3RhcnQsIGVuZF07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV4dHJhLmxvYykge1xuICAgICAgICAgICAgY29tbWVudC5sb2MgPSBsb2M7XG4gICAgICAgIH1cbiAgICAgICAgZXh0cmEuY29tbWVudHMucHVzaChjb21tZW50KTtcbiAgICAgICAgaWYgKGV4dHJhLmF0dGFjaENvbW1lbnQpIHtcbiAgICAgICAgICAgIGV4dHJhLmxlYWRpbmdDb21tZW50cy5wdXNoKGNvbW1lbnQpO1xuICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cy5wdXNoKGNvbW1lbnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgY29tbWVudC50eXBlID0gY29tbWVudC50eXBlICsgJ0NvbW1lbnQnO1xuICAgICAgICAgICAgaWYgKGV4dHJhLmRlbGVnYXRlKSB7XG4gICAgICAgICAgICAgICAgY29tbWVudCA9IGV4dHJhLmRlbGVnYXRlKGNvbW1lbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXh0cmEudG9rZW5zLnB1c2goY29tbWVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBza2lwU2luZ2xlTGluZUNvbW1lbnQob2Zmc2V0KSB7XG4gICAgICAgIHZhciBzdGFydCwgbG9jLCBjaCwgY29tbWVudDtcblxuICAgICAgICBzdGFydCA9IGluZGV4IC0gb2Zmc2V0O1xuICAgICAgICBsb2MgPSB7XG4gICAgICAgICAgICBzdGFydDoge1xuICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydCAtIG9mZnNldFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2gpKSB7XG4gICAgICAgICAgICAgICAgaGFzTGluZVRlcm1pbmF0b3IgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmIChleHRyYS5jb21tZW50cykge1xuICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gc291cmNlLnNsaWNlKHN0YXJ0ICsgb2Zmc2V0LCBpbmRleCAtIDEpO1xuICAgICAgICAgICAgICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnQgLSAxXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGFkZENvbW1lbnQoJ0xpbmUnLCBjb21tZW50LCBzdGFydCwgaW5kZXggLSAxLCBsb2MpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09IDEzICYmIHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSA9PT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgIGxpbmVTdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChleHRyYS5jb21tZW50cykge1xuICAgICAgICAgICAgY29tbWVudCA9IHNvdXJjZS5zbGljZShzdGFydCArIG9mZnNldCwgaW5kZXgpO1xuICAgICAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBhZGRDb21tZW50KCdMaW5lJywgY29tbWVudCwgc3RhcnQsIGluZGV4LCBsb2MpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2tpcE11bHRpTGluZUNvbW1lbnQoKSB7XG4gICAgICAgIHZhciBzdGFydCwgbG9jLCBjaCwgY29tbWVudDtcblxuICAgICAgICBpZiAoZXh0cmEuY29tbWVudHMpIHtcbiAgICAgICAgICAgIHN0YXJ0ID0gaW5kZXggLSAyO1xuICAgICAgICAgICAgbG9jID0ge1xuICAgICAgICAgICAgICAgIHN0YXJ0OiB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnQgLSAyXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG4gICAgICAgICAgICBpZiAoaXNMaW5lVGVybWluYXRvcihjaCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09IDB4MEQgJiYgc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKSA9PT0gMHgwQSkge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBoYXNMaW5lVGVybWluYXRvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAweDJBKSB7XG4gICAgICAgICAgICAgICAgLy8gQmxvY2sgY29tbWVudCBlbmRzIHdpdGggJyovJy5cbiAgICAgICAgICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKSA9PT0gMHgyRikge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXh0cmEuY29tbWVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBzb3VyY2Uuc2xpY2Uoc3RhcnQgKyAyLCBpbmRleCAtIDIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRDb21tZW50KCdCbG9jaycsIGNvbW1lbnQsIHN0YXJ0LCBpbmRleCwgbG9jKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBSYW4gb2ZmIHRoZSBlbmQgb2YgdGhlIGZpbGUgLSB0aGUgd2hvbGUgdGhpbmcgaXMgYSBjb21tZW50XG4gICAgICAgIGlmIChleHRyYS5jb21tZW50cykge1xuICAgICAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBjb21tZW50ID0gc291cmNlLnNsaWNlKHN0YXJ0ICsgMiwgaW5kZXgpO1xuICAgICAgICAgICAgYWRkQ29tbWVudCgnQmxvY2snLCBjb21tZW50LCBzdGFydCwgaW5kZXgsIGxvYyk7XG4gICAgICAgIH1cbiAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBza2lwQ29tbWVudCgpIHtcbiAgICAgICAgdmFyIGNoLCBzdGFydDtcbiAgICAgICAgaGFzTGluZVRlcm1pbmF0b3IgPSBmYWxzZTtcblxuICAgICAgICBzdGFydCA9IChpbmRleCA9PT0gMCk7XG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG5cbiAgICAgICAgICAgIGlmIChpc1doaXRlU3BhY2UoY2gpKSB7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNMaW5lVGVybWluYXRvcihjaCkpIHtcbiAgICAgICAgICAgICAgICBoYXNMaW5lVGVybWluYXRvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09IDB4MEQgJiYgc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpID09PSAweDBBKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICBzdGFydCA9IHRydWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAweDJGKSB7IC8vIFUrMDAyRiBpcyAnLydcbiAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSk7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAweDJGKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHNraXBTaW5nbGVMaW5lQ29tbWVudCgyKTtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09IDB4MkEpIHsgIC8vIFUrMDAyQSBpcyAnKidcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgc2tpcE11bHRpTGluZUNvbW1lbnQoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0ICYmIGNoID09PSAweDJEKSB7IC8vIFUrMDAyRCBpcyAnLSdcbiAgICAgICAgICAgICAgICAvLyBVKzAwM0UgaXMgJz4nXG4gICAgICAgICAgICAgICAgaWYgKChzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDEpID09PSAweDJEKSAmJiAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAyKSA9PT0gMHgzRSkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gJy0tPicgaXMgYSBzaW5nbGUtbGluZSBjb21tZW50XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ICs9IDM7XG4gICAgICAgICAgICAgICAgICAgIHNraXBTaW5nbGVMaW5lQ29tbWVudCgzKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAweDNDKSB7IC8vIFUrMDAzQyBpcyAnPCdcbiAgICAgICAgICAgICAgICBpZiAoc291cmNlLnNsaWNlKGluZGV4ICsgMSwgaW5kZXggKyA0KSA9PT0gJyEtLScpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDsgLy8gYDxgXG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGAhYFxuICAgICAgICAgICAgICAgICAgICArK2luZGV4OyAvLyBgLWBcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDsgLy8gYC1gXG4gICAgICAgICAgICAgICAgICAgIHNraXBTaW5nbGVMaW5lQ29tbWVudCg0KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhbkhleEVzY2FwZShwcmVmaXgpIHtcbiAgICAgICAgdmFyIGksIGxlbiwgY2gsIGNvZGUgPSAwO1xuXG4gICAgICAgIGxlbiA9IChwcmVmaXggPT09ICd1JykgPyA0IDogMjtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgKytpKSB7XG4gICAgICAgICAgICBpZiAoaW5kZXggPCBsZW5ndGggJiYgaXNIZXhEaWdpdChzb3VyY2VbaW5kZXhdKSkge1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgICAgIGNvZGUgPSBjb2RlICogMTYgKyAnMDEyMzQ1Njc4OWFiY2RlZicuaW5kZXhPZihjaC50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKGNvZGUpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5Vbmljb2RlQ29kZVBvaW50RXNjYXBlKCkge1xuICAgICAgICB2YXIgY2gsIGNvZGU7XG5cbiAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICBjb2RlID0gMDtcblxuICAgICAgICAvLyBBdCBsZWFzdCwgb25lIGhleCBkaWdpdCBpcyByZXF1aXJlZC5cbiAgICAgICAgaWYgKGNoID09PSAnfScpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgaWYgKCFpc0hleERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29kZSA9IGNvZGUgKiAxNiArICcwMTIzNDU2Nzg5YWJjZGVmJy5pbmRleE9mKGNoLnRvTG93ZXJDYXNlKCkpO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KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSAhPT0gMHg3NSkge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgY2ggPSBzY2FuVW5pY29kZUNvZGVQb2ludEVzY2FwZSgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjaCA9IHNjYW5IZXhFc2NhcGUoJ3UnKTtcbiAgICAgICAgICAgICAgICBjcCA9IGNoLmNoYXJDb2RlQXQoMCk7XG4gICAgICAgICAgICAgICAgaWYgKCFjaCB8fCBjaCA9PT0gJ1xcXFwnIHx8ICFpc0lkZW50aWZpZXJTdGFydChjcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZCA9IGNoO1xuICAgICAgICB9XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjcCA9IGNvZGVQb2ludEF0KGluZGV4KTtcbiAgICAgICAgICAgIGlmICghaXNJZGVudGlmaWVyUGFydChjcCkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoID0gZnJvbUNvZGVQb2ludChjcCk7XG4gICAgICAgICAgICBpZCArPSBjaDtcbiAgICAgICAgICAgIGluZGV4ICs9IGNoLmxlbmd0aDtcblxuICAgICAgICAgICAgLy8gJ1xcdScgKFUrMDA1QywgVSswMDc1KSBkZW5vdGVzIGFuIGVzY2FwZWQgY2hhcmFjdGVyLlxuICAgICAgICAgICAgaWYgKGNwID09PSAweDVDKSB7XG4gICAgICAgICAgICAgICAgaWQgPSBpZC5zdWJzdHIoMCwgaWQubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICAgICAgaWYgKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSAhPT0gMHg3NSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgY2ggPSBzY2FuVW5pY29kZUNvZGVQb2ludEVzY2FwZSgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNoID0gc2NhbkhleEVzY2FwZSgndScpO1xuICAgICAgICAgICAgICAgICAgICBjcCA9IGNoLmNoYXJDb2RlQXQoMCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2ggfHwgY2ggPT09ICdcXFxcJyB8fCAhaXNJZGVudGlmaWVyUGFydChjcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWQgKz0gY2g7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWQ7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZ2V0SWRlbnRpZmllcigpIHtcbiAgICAgICAgdmFyIHN0YXJ0LCBjaDtcblxuICAgICAgICBzdGFydCA9IGluZGV4Kys7XG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG4gICAgICAgICAgICBpZiAoY2ggPT09IDB4NUMpIHtcbiAgICAgICAgICAgICAgICAvLyBCbGFja3NsYXNoIChVKzAwNUMpIG1hcmtzIFVuaWNvZGUgZXNjYXBlIHNlcXVlbmNlLlxuICAgICAgICAgICAgICAgIGluZGV4ID0gc3RhcnQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldENvbXBsZXhJZGVudGlmaWVyKCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID49IDB4RDgwMCAmJiBjaCA8IDB4REZGRikge1xuICAgICAgICAgICAgICAgIC8vIE5lZWQgdG8gaGFuZGxlIHN1cnJvZ2F0ZSBwYWlycy5cbiAgICAgICAgICAgICAgICBpbmRleCA9IHN0YXJ0O1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRDb21wbGV4SWRlbnRpZmllcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzSWRlbnRpZmllclBhcnQoY2gpKSB7XG4gICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gc291cmNlLnNsaWNlKHN0YXJ0LCBpbmRleCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhbklkZW50aWZpZXIoKSB7XG4gICAgICAgIHZhciBzdGFydCwgaWQsIHR5cGU7XG5cbiAgICAgICAgc3RhcnQgPSBpbmRleDtcblxuICAgICAgICAvLyBCYWNrc2xhc2ggKFUrMDA1Qykgc3RhcnRzIGFuIGVzY2FwZWQgY2hhcmFjdGVyLlxuICAgICAgICBpZCA9IChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgPT09IDB4NUMpID8gZ2V0Q29tcGxleElkZW50aWZpZXIoKSA6IGdldElkZW50aWZpZXIoKTtcblxuICAgICAgICAvLyBUaGVyZSBpcyBubyBrZXl3b3JkIG9yIGxpdGVyYWwgd2l0aCBvbmx5IG9uZSBjaGFyYWN0ZXIuXG4gICAgICAgIC8vIFRodXMsIGl0IG11c3QgYmUgYW4gaWRlbnRpZmllci5cbiAgICAgICAgaWYgKGlkLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgdHlwZSA9IFRva2VuLklkZW50aWZpZXI7XG4gICAgICAgIH0gZWxzZSBpZiAoaXNLZXl3b3JkKGlkKSkge1xuICAgICAgICAgICAgdHlwZSA9IFRva2VuLktleXdvcmQ7XG4gICAgICAgIH0gZWxzZSBpZiAoaWQgPT09ICdudWxsJykge1xuICAgICAgICAgICAgdHlwZSA9IFRva2VuLk51bGxMaXRlcmFsO1xuICAgICAgICB9IGVsc2UgaWYgKGlkID09PSAndHJ1ZScgfHwgaWQgPT09ICdmYWxzZScpIHtcbiAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5Cb29sZWFuTGl0ZXJhbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5JZGVudGlmaWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICB2YWx1ZTogaWQsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG5cbiAgICAvLyBFQ01BLTI2MiAxMS43IFB1bmN0dWF0b3JzXG5cbiAgICBmdW5jdGlvbiBzY2FuUHVuY3R1YXRvcigpIHtcbiAgICAgICAgdmFyIHRva2VuLCBzdHI7XG5cbiAgICAgICAgdG9rZW4gPSB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5QdW5jdHVhdG9yLFxuICAgICAgICAgICAgdmFsdWU6ICcnLFxuICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgc3RhcnQ6IGluZGV4LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIENoZWNrIGZvciBtb3N0IGNvbW1vbiBzaW5nbGUtY2hhcmFjdGVyIHB1bmN0dWF0b3JzLlxuICAgICAgICBzdHIgPSBzb3VyY2VbaW5kZXhdO1xuICAgICAgICBzd2l0Y2ggKHN0cikge1xuXG4gICAgICAgIGNhc2UgJygnOlxuICAgICAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEub3BlblBhcmVuVG9rZW4gPSBleHRyYS50b2tlblZhbHVlcy5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAneyc6XG4gICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHtcbiAgICAgICAgICAgICAgICBleHRyYS5vcGVuQ3VybHlUb2tlbiA9IGV4dHJhLnRva2VuVmFsdWVzLmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHN0YXRlLmN1cmx5U3RhY2sucHVzaCgneycpO1xuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJy4nOlxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAnLicgJiYgc291cmNlW2luZGV4ICsgMV0gPT09ICcuJykge1xuICAgICAgICAgICAgICAgIC8vIFNwcmVhZCBvcGVyYXRvcjogLi4uXG4gICAgICAgICAgICAgICAgaW5kZXggKz0gMjtcbiAgICAgICAgICAgICAgICBzdHIgPSAnLi4uJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ30nOlxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIHN0YXRlLmN1cmx5U3RhY2sucG9wKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnKSc6XG4gICAgICAgIGNhc2UgJzsnOlxuICAgICAgICBjYXNlICcsJzpcbiAgICAgICAgY2FzZSAnWyc6XG4gICAgICAgIGNhc2UgJ10nOlxuICAgICAgICBjYXNlICc6JzpcbiAgICAgICAgY2FzZSAnPyc6XG4gICAgICAgIGNhc2UgJ34nOlxuICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAvLyA0LWNoYXJhY3RlciBwdW5jdHVhdG9yLlxuICAgICAgICAgICAgc3RyID0gc291cmNlLnN1YnN0cihpbmRleCwgNCk7XG4gICAgICAgICAgICBpZiAoc3RyID09PSAnPj4+PScpIHtcbiAgICAgICAgICAgICAgICBpbmRleCArPSA0O1xuICAgICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgICAgIC8vIDMtY2hhcmFjdGVyIHB1bmN0dWF0b3JzLlxuICAgICAgICAgICAgICAgIHN0ciA9IHN0ci5zdWJzdHIoMCwgMyk7XG4gICAgICAgICAgICAgICAgaWYgKHN0ciA9PT0gJz09PScgfHwgc3RyID09PSAnIT09JyB8fCBzdHIgPT09ICc+Pj4nIHx8XG4gICAgICAgICAgICAgICAgICAgIHN0ciA9PT0gJzw8PScgfHwgc3RyID09PSAnPj49Jykge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCArPSAzO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gMi1jaGFyYWN0ZXIgcHVuY3R1YXRvcnMuXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IHN0ci5zdWJzdHIoMCwgMik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdHIgPT09ICcmJicgfHwgc3RyID09PSAnfHwnIHx8IHN0ciA9PT0gJz09JyB8fCBzdHIgPT09ICchPScgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9PT0gJys9JyB8fCBzdHIgPT09ICctPScgfHwgc3RyID09PSAnKj0nIHx8IHN0ciA9PT0gJy89JyB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyID09PSAnKysnIHx8IHN0ciA9PT0gJy0tJyB8fCBzdHIgPT09ICc8PCcgfHwgc3RyID09PSAnPj4nIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgPT09ICcmPScgfHwgc3RyID09PSAnfD0nIHx8IHN0ciA9PT0gJ149JyB8fCBzdHIgPT09ICclPScgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9PT0gJzw9JyB8fCBzdHIgPT09ICc+PScgfHwgc3RyID09PSAnPT4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleCArPSAyO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAxLWNoYXJhY3RlciBwdW5jdHVhdG9ycy5cbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJzw+PSErLSolJnxeLycuaW5kZXhPZihzdHIpID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGluZGV4ID09PSB0b2tlbi5zdGFydCkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRva2VuLmVuZCA9IGluZGV4O1xuICAgICAgICB0b2tlbi52YWx1ZSA9IHN0cjtcbiAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDExLjguMyBOdW1lcmljIExpdGVyYWxzXG5cbiAgICBmdW5jdGlvbiBzY2FuSGV4TGl0ZXJhbChzdGFydCkge1xuICAgICAgICB2YXIgbnVtYmVyID0gJyc7XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoIWlzSGV4RGlnaXQoc291cmNlW2luZGV4XSkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobnVtYmVyLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0lkZW50aWZpZXJTdGFydChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLk51bWVyaWNMaXRlcmFsLFxuICAgICAgICAgICAgdmFsdWU6IHBhcnNlSW50KCcweCcgKyBudW1iZXIsIDE2KSxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgIGVuZDogaW5kZXhcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuQmluYXJ5TGl0ZXJhbChzdGFydCkge1xuICAgICAgICB2YXIgY2gsIG51bWJlcjtcblxuICAgICAgICBudW1iZXIgPSAnJztcblxuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgICAgIGlmIChjaCAhPT0gJzAnICYmIGNoICE9PSAnMScpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobnVtYmVyLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgLy8gb25seSAwYiBvciAwQlxuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KGNoKSB8fCBpc0RlY2ltYWxEaWdpdChjaCkpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLk51bWVyaWNMaXRlcmFsLFxuICAgICAgICAgICAgdmFsdWU6IHBhcnNlSW50KG51bWJlciwgMiksXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2Nhbk9jdGFsTGl0ZXJhbChwcmVmaXgsIHN0YXJ0KSB7XG4gICAgICAgIHZhciBudW1iZXIsIG9jdGFsO1xuXG4gICAgICAgIGlmIChpc09jdGFsRGlnaXQocHJlZml4KSkge1xuICAgICAgICAgICAgb2N0YWwgPSB0cnVlO1xuICAgICAgICAgICAgbnVtYmVyID0gJzAnICsgc291cmNlW2luZGV4KytdO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb2N0YWwgPSBmYWxzZTtcbiAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICBudW1iZXIgPSAnJztcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKCFpc09jdGFsRGlnaXQoc291cmNlW2luZGV4XSkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW9jdGFsICYmIG51bWJlci5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIC8vIG9ubHkgMG8gb3IgME9cbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNJZGVudGlmaWVyU3RhcnQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSB8fCBpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHR5cGU6IFRva2VuLk51bWVyaWNMaXRlcmFsLFxuICAgICAgICAgICAgdmFsdWU6IHBhcnNlSW50KG51bWJlciwgOCksXG4gICAgICAgICAgICBvY3RhbDogb2N0YWwsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaXNJbXBsaWNpdE9jdGFsTGl0ZXJhbCgpIHtcbiAgICAgICAgdmFyIGksIGNoO1xuXG4gICAgICAgIC8vIEltcGxpY2l0IG9jdGFsLCB1bmxlc3MgdGhlcmUgaXMgYSBub24tb2N0YWwgZGlnaXQuXG4gICAgICAgIC8vIChBbm5leCBCLjEuMSBvbiBOdW1lcmljIExpdGVyYWxzKVxuICAgICAgICBmb3IgKGkgPSBpbmRleCArIDE7IGkgPCBsZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgY2ggPSBzb3VyY2VbaV07XG4gICAgICAgICAgICBpZiAoY2ggPT09ICc4JyB8fCBjaCA9PT0gJzknKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFpc09jdGFsRGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuTnVtZXJpY0xpdGVyYWwoKSB7XG4gICAgICAgIHZhciBudW1iZXIsIHN0YXJ0LCBjaDtcblxuICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIGFzc2VydChpc0RlY2ltYWxEaWdpdChjaC5jaGFyQ29kZUF0KDApKSB8fCAoY2ggPT09ICcuJyksXG4gICAgICAgICAgICAnTnVtZXJpYyBsaXRlcmFsIG11c3Qgc3RhcnQgd2l0aCBhIGRlY2ltYWwgZGlnaXQgb3IgYSBkZWNpbWFsIHBvaW50Jyk7XG5cbiAgICAgICAgc3RhcnQgPSBpbmRleDtcbiAgICAgICAgbnVtYmVyID0gJyc7XG4gICAgICAgIGlmIChjaCAhPT0gJy4nKSB7XG4gICAgICAgICAgICBudW1iZXIgPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG5cbiAgICAgICAgICAgIC8vIEhleCBudW1iZXIgc3RhcnRzIHdpdGggJzB4Jy5cbiAgICAgICAgICAgIC8vIE9jdGFsIG51bWJlciBzdGFydHMgd2l0aCAnMCcuXG4gICAgICAgICAgICAvLyBPY3RhbCBudW1iZXIgaW4gRVM2IHN0YXJ0cyB3aXRoICcwbycuXG4gICAgICAgICAgICAvLyBCaW5hcnkgbnVtYmVyIGluIEVTNiBzdGFydHMgd2l0aCAnMGInLlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gJzAnKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAneCcgfHwgY2ggPT09ICdYJykge1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2NhbkhleExpdGVyYWwoc3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICdiJyB8fCBjaCA9PT0gJ0InKSB7XG4gICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FuQmluYXJ5TGl0ZXJhbChzdGFydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ28nIHx8IGNoID09PSAnTycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5PY3RhbExpdGVyYWwoY2gsIHN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaXNPY3RhbERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNJbXBsaWNpdE9jdGFsTGl0ZXJhbCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2Nhbk9jdGFsTGl0ZXJhbChjaCwgc3RhcnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB3aGlsZSAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkge1xuICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoY2ggPT09ICcuJykge1xuICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIHdoaWxlIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjaCA9PT0gJ2UnIHx8IGNoID09PSAnRScpIHtcbiAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107XG5cbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJysnIHx8IGNoID09PSAnLScpIHtcbiAgICAgICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb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0ID0gaW5kZXg7XG4gICAgICAgICsraW5kZXg7XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcblxuICAgICAgICAgICAgaWYgKGNoID09PSBxdW90ZSkge1xuICAgICAgICAgICAgICAgIHF1b3RlID0gJyc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFxcXCcpIHtcbiAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgICAgICBpZiAoIWNoIHx8ICFpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY2gpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndSc6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3gnOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZVtpbmRleF0gPT09ICd7Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IHNjYW5Vbmljb2RlQ29kZVBvaW50RXNjYXBlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuZXNjYXBlZCA9IHNjYW5IZXhFc2NhcGUoY2gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdW5lc2NhcGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSB1bmVzY2FwZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbic6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcbic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAncic6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xccic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcdCc7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnYic6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcYic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZic6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xcZic7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndic6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xceDBCJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICc4JzpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc09jdGFsRGlnaXQoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2N0VG9EZWMgPSBvY3RhbFRvRGVjaW1hbChjaCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvY3RhbCA9IG9jdFRvRGVjLm9jdGFsIHx8IG9jdGFsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKG9jdFRvRGVjLmNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICsrbGluZU51bWJlcjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoID09PSAnXFxyJyAmJiBzb3VyY2VbaW5kZXhdID09PSAnXFxuJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3RyICs9IGNoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHF1b3RlICE9PSAnJykge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlOiBUb2tlbi5TdHJpbmdMaXRlcmFsLFxuICAgICAgICAgICAgdmFsdWU6IHN0cixcbiAgICAgICAgICAgIG9jdGFsOiBvY3RhbCxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IHN0YXJ0TGluZU51bWJlcixcbiAgICAgICAgICAgIGxpbmVTdGFydDogc3RhcnRMaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuOC42IFRlbXBsYXRlIExpdGVyYWwgTGV4aWNhbCBDb21wb25lbnRzXG5cbiAgICBmdW5jdGlvbiBzY2FuVGVtcGxhdGUoKSB7XG4gICAgICAgIHZhciBjb29rZWQgPSAnJywgY2gsIHN0YXJ0LCByYXdPZmZzZXQsIHRlcm1pbmF0ZWQsIGhlYWQsIHRhaWwsIHJlc3RvcmUsIHVuZXNjYXBlZDtcblxuICAgICAgICB0ZXJtaW5hdGVkID0gZmFsc2U7XG4gICAgICAgIHRhaWwgPSBmYWxzZTtcbiAgICAgICAgc3RhcnQgPSBpbmRleDtcbiAgICAgICAgaGVhZCA9IChzb3VyY2VbaW5kZXhdID09PSAnYCcpO1xuICAgICAgICByYXdPZmZzZXQgPSAyO1xuXG4gICAgICAgICsraW5kZXg7XG5cbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJ2AnKSB7XG4gICAgICAgICAgICAgICAgcmF3T2Zmc2V0ID0gMTtcbiAgICAgICAgICAgICAgICB0YWlsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0ZXJtaW5hdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICckJykge1xuICAgICAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuY3VybHlTdGFjay5wdXNoKCckeycpO1xuICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICB0ZXJtaW5hdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvb2tlZCArPSBjaDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdcXFxcJykge1xuICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdO1xuICAgICAgICAgICAgICAgIGlmICghaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ24nOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXG4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3InOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXHInO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3QnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9ICdcXHQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3UnOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICd4JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzb3VyY2VbaW5kZXhdID09PSAneycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSBzY2FuVW5pY29kZUNvZGVQb2ludEVzY2FwZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN0b3JlID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5lc2NhcGVkID0gc2NhbkhleEVzY2FwZShjaCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVuZXNjYXBlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29rZWQgKz0gdW5lc2NhcGVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcmVzdG9yZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdiJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFxiJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdmJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFxmJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICd2JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFx2JztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICcwJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElsbGVnYWw6IFxcMDEgXFwwMiBhbmQgc28gb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5UZW1wbGF0ZU9jdGFsTGl0ZXJhbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tlZCArPSAnXFwwJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNPY3RhbERpZ2l0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElsbGVnYWw6IFxcMSBcXDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLlRlbXBsYXRlT2N0YWxMaXRlcmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2VkICs9IGNoO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICArK2xpbmVOdW1iZXI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xccicgJiYgc291cmNlW2luZGV4XSA9PT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICsraW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7XG4gICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyO1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xccicgJiYgc291cmNlW2luZGV4XSA9PT0gJ1xcbicpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgY29va2VkICs9ICdcXG4nO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb29rZWQgKz0gY2g7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRlcm1pbmF0ZWQpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWhlYWQpIHtcbiAgICAgICAgICAgIHN0YXRlLmN1cmx5U3RhY2sucG9wKCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdHlwZTogVG9rZW4uVGVtcGxhdGUsXG4gICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICAgIGNvb2tlZDogY29va2VkLFxuICAgICAgICAgICAgICAgIHJhdzogc291cmNlLnNsaWNlKHN0YXJ0ICsgMSwgaW5kZXggLSByYXdPZmZzZXQpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVhZDogaGVhZCxcbiAgICAgICAgICAgIHRhaWw6IHRhaWwsXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsXG4gICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTEuOC41IFJlZ3VsYXIgRXhwcmVzc2lvbiBMaXRlcmFsc1xuXG4gICAgZnVuY3Rpb24gdGVzdFJlZ0V4cChwYXR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cm1hdGlvbi4pXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoL1xcXFx1XFx7KFswLTlhLWZBLUZdKylcXH18XFxcXHUoW2EtZkEtRjAtOV17NH0pL2csIGZ1bmN0aW9uICgkMCwgJDEsICQyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2RlUG9pbnQgPSBwYXJzZUludCgkMSB8fCAkMiwgMTYpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29kZVBvaW50ID4gMHgxMEZGRkYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKG51bGwsIE1lc3NhZ2VzLkludmFsaWRSZWdFeHApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb2RlUG9pbnQgPD0gMHhGRkZGKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlUG9pbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhc3RyYWxTdWJzdGl0dXRlO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLy8gUmVwbGFjZSBlYWNoIHBhaXJlZCBzdXJyb2dhdGUgd2l0aCBhIHNpbmdsZSBBU0NJSSBzeW1ib2wgdG9cbiAgICAgICAgICAgICAgICAvLyBhdm9pZCB0aHJvd2luZyBvbiByZWd1bGFyIGV4cHJlc3Npb25zIHRoYXQgYXJlIG9ubHkgdmFsaWQgaW5cbiAgICAgICAgICAgICAgICAvLyBjb21iaW5hdGlvbiB3aXRoIHRoZSBcInVcIiBmbGFnLlxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKFxuICAgICAgICAgICAgICAgICAgICAvW1xcdUQ4MDAtXFx1REJGRl1bXFx1REMwMC1cXHVERkZGXS9nLFxuICAgICAgICAgICAgICAgICAgICBhc3RyYWxTdWJzdGl0dXRlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZpcnN0LCBkZXRlY3QgaW52YWxpZCByZWd1bGFyIGV4cHJlc3Npb25zLlxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgUmVnRXhwKHRtcCk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKG51bGwsIE1lc3NhZ2VzLkludmFsaWRSZWdFeHApO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gUmV0dXJuIGEgcmVndWxhciBleHByZXNzaW9uIG9iamVjdCBmb3IgdGhpcyBwYXR0ZXJuLWZsYWcgcGFpciwgb3JcbiAgICAgICAgLy8gYG51bGxgIGluIGNhc2UgdGhlIGN1cnJlbnQgZW52aXJvbm1lbnQgZG9lc24ndCBzdXBwb3J0IHRoZSBmbGFncyBpdFxuICAgICAgICAvLyB1c2VzLlxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBSZWdFeHAocGF0dGVybiwgZmxhZ3MpO1xuICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gc2NhblJlZ0V4cEJvZHkoKSB7XG4gICAgICAgIHZhciBjaCwgc3RyLCBjbGFzc01hcmtlciwgdGVybWluYXRlZCwgYm9keTtcblxuICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgIGFzc2VydChjaCA9PT0gJy8nLCAnUmVndWxhciBleHByZXNzaW9uIGxpdGVyYWwgbXVzdCBzdGFydCB3aXRoIGEgc2xhc2gnKTtcbiAgICAgICAgc3RyID0gc291cmNlW2luZGV4KytdO1xuXG4gICAgICAgIGNsYXNzTWFya2VyID0gZmFsc2U7XG4gICAgICAgIHRlcm1pbmF0ZWQgPSBmYWxzZTtcbiAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTtcbiAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xcXFwnKSB7XG4gICAgICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXgrK107XG4gICAgICAgICAgICAgICAgLy8gRUNNQS0yNjIgNy44LjVcbiAgICAgICAgICAgICAgICBpZiAoaXNMaW5lVGVybWluYXRvcihjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihudWxsLCBNZXNzYWdlcy5VbnRlcm1pbmF0ZWRSZWdFeHApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzdHIgKz0gY2g7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihudWxsLCBNZXNzYWdlcy5VbnRlcm1pbmF0ZWRSZWdFeHApO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjbGFzc01hcmtlcikge1xuICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTWFya2VyID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICcvJykge1xuICAgICAgICAgICAgICAgICAgICB0ZXJtaW5hdGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1snKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTWFya2VyID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRlcm1pbmF0ZWQpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKG51bGwsIE1lc3NhZ2VzLlVudGVybWluYXRlZFJlZ0V4cCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBFeGNsdWRlIGxlYWRpbmcgYW5kIHRyYWlsaW5nIHNsYXNoLlxuICAgICAgICBib2R5ID0gc3RyLnN1YnN0cigxLCBzdHIubGVuZ3RoIC0gMik7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZTogYm9keSxcbiAgICAgICAgICAgIGxpdGVyYWw6IHN0clxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNjYW5SZWdFeHBGbGFncygpIHtcbiAgICAgICAgdmFyIGNoLCBzdHIsIGZsYWdzLCByZXN0b3JlO1xuXG4gICAgICAgIHN0ciA9ICcnO1xuICAgICAgICBmbGFncyA9ICcnO1xuICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTtcbiAgICAgICAgICAgIGlmICghaXNJZGVudGlmaWVyUGFydChjaC5jaGFyQ29kZUF0KDApKSkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICArK2luZGV4O1xuICAgICAgICAgICAgaWYgKGNoID09PSAnXFxcXCcgJiYgaW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07XG4gICAgICAgICAgICAgICAgaWYgKGNoID09PSAndScpIHtcbiAgICAgICAgICAgICAgICAgICAgKytpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgcmVzdG9yZSA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICBjaCA9IHNjYW5IZXhFc2NhcGUoJ3UnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFncyArPSBjaDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoc3RyICs9ICdcXFxcdSc7IHJlc3RvcmUgPCBpbmRleDsgKytyZXN0b3JlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IHNvdXJjZVtyZXN0b3JlXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcmVzdG9yZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzICs9ICd1JztcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXFxcXHUnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlVW5leHBlY3RlZFRva2VuKCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdcXFxcJztcbiAgICAgICAgICAgICAgICAgICAgdG9sZXJhdGVVbmV4cGVjdGVkVG9rZW4oKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZsYWdzICs9IGNoO1xuICAgICAgICAgICAgICAgIHN0ciArPSBjaDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZTogZmxhZ3MsXG4gICAgICAgICAgICBsaXRlcmFsOiBzdHJcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBzY2FuUmVnRXhwKCkge1xuICAgICAgICB2YXIgc3RhcnQsIGJvZHksIGZsYWdzLCB2YWx1ZTtcbiAgICAgICAgc2Nhbm5pbmcgPSB0cnVlO1xuXG4gICAgICAgIGxvb2thaGVhZCA9IG51bGw7XG4gICAgICAgIHNraXBDb21tZW50KCk7XG4gICAgICAgIHN0YXJ0ID0gaW5kZXg7XG5cbiAgICAgICAgYm9keSA9IHNjYW5SZWdFeHBCb2R5KCk7XG4gICAgICAgIGZsYWdzID0gc2NhblJlZ0V4cEZsYWdzKCk7XG4gICAgICAgIHZhbHVlID0gdGVzdFJlZ0V4cChib2R5LnZhbHVlLCBmbGFncy52YWx1ZSk7XG4gICAgICAgIHNjYW5uaW5nID0gZmFsc2U7XG4gICAgICAgIGlmIChleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBUb2tlbi5SZWd1bGFyRXhwcmVzc2lvbixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWUsXG4gICAgICAgICAgICAgICAgcmVnZXg6IHtcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogYm9keS52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3M6IGZsYWdzLnZhbHVlXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGxpdGVyYWw6IGJvZHkubGl0ZXJhbCArIGZsYWdzLmxpdGVyYWwsXG4gICAgICAgICAgICB2YWx1ZTogdmFsdWUsXG4gICAgICAgICAgICByZWdleDoge1xuICAgICAgICAgICAgICAgIHBhdHRlcm46IGJvZHkudmFsdWUsXG4gICAgICAgICAgICAgICAgZmxhZ3M6IGZsYWdzLnZhbHVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBpbmRleFxuICAgICAgICB9O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNvbGxlY3RSZWdleCgpIHtcbiAgICAgICAgdmFyIHBvcywgbG9jLCByZWdleCwgdG9rZW47XG5cbiAgICAgICAgc2tpcENvbW1lbnQoKTtcblxuICAgICAgICBwb3MgPSBpbmRleDtcbiAgICAgICAgbG9jID0ge1xuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICByZWdleCA9IHNjYW5SZWdFeHAoKTtcblxuICAgICAgICBsb2MuZW5kID0ge1xuICAgICAgICAgICAgbGluZTogbGluZU51bWJlcixcbiAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgfTtcblxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICBpZiAoIWV4dHJhLnRva2VuaXplKSB7XG4gICAgICAgICAgICAvLyBQb3AgdGhlIHByZXZpb3VzIHRva2VuLCB3aGljaCBpcyBsaWtlbHkgJy8nIG9yICcvPSdcbiAgICAgICAgICAgIGlmIChleHRyYS50b2tlbnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHRva2VuID0gZXh0cmEudG9rZW5zW2V4dHJhLnRva2Vucy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4ucmFuZ2VbMF0gPT09IHBvcyAmJiB0b2tlbi50eXBlID09PSAnUHVuY3R1YXRvcicpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09PSAnLycgfHwgdG9rZW4udmFsdWUgPT09ICcvPScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLnRva2Vucy5wb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXh0cmEudG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6ICdSZWd1bGFyRXhwcmVzc2lvbicsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHJlZ2V4LmxpdGVyYWwsXG4gICAgICAgICAgICAgICAgcmVnZXg6IHJlZ2V4LnJlZ2V4LFxuICAgICAgICAgICAgICAgIHJhbmdlOiBbcG9zLCBpbmRleF0sXG4gICAgICAgICAgICAgICAgbG9jOiBsb2NcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlZ2V4O1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGlzSWRlbnRpZmllck5hbWUodG9rZW4pIHtcbiAgICAgICAgcmV0dXJuIHRva2VuLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIgfHxcbiAgICAgICAgICAgIHRva2VuLnR5cGUgPT09IFRva2VuLktleXdvcmQgfHxcbiAgICAgICAgICAgIHRva2VuLnR5cGUgPT09IFRva2VuLkJvb2xlYW5MaXRlcmFsIHx8XG4gICAgICAgICAgICB0b2tlbi50eXBlID09PSBUb2tlbi5OdWxsTGl0ZXJhbDtcbiAgICB9XG5cbiAgICAvLyBVc2luZyB0aGUgZm9sbG93aW5nIGFsZ29yaXRobTpcbiAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zd2VldC5qcy93aWtpL2Rlc2lnblxuXG4gICAgZnVuY3Rpb24gYWR2YW5jZVNsYXNoKCkge1xuICAgICAgICB2YXIgcmVnZXgsIHByZXZpb3VzLCBjaGVjaztcblxuICAgICAgICBmdW5jdGlvbiB0ZXN0S2V5d29yZCh2YWx1ZSkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbHVlICYmICh2YWx1ZS5sZW5ndGggPiAxKSAmJiAodmFsdWVbMF0gPj0gJ2EnKSAmJiAodmFsdWVbMF0gPD0gJ3onKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHByZXZpb3VzID0gZXh0cmEudG9rZW5WYWx1ZXNbZXh0cmEudG9rZW5zLmxlbmd0aCAtIDFdO1xuICAgICAgICByZWdleCA9IChwcmV2aW91cyAhPT0gbnVsbCk7XG5cbiAgICAgICAgc3dpdGNoIChwcmV2aW91cykge1xuICAgICAgICBjYXNlICd0aGlzJzpcbiAgICAgICAgY2FzZSAnXSc6XG4gICAgICAgICAgICByZWdleCA9IGZhbHNlO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnKSc6XG4gICAgICAgICAgICBjaGVjayA9IGV4dHJhLnRva2VuVmFsdWVzW2V4dHJhLm9wZW5QYXJlblRva2VuIC0gMV07XG4gICAgICAgICAgICByZWdleCA9IChjaGVjayA9PT0gJ2lmJyB8fCBjaGVjayA9PT0gJ3doaWxlJyB8fCBjaGVjayA9PT0gJ2ZvcicgfHwgY2hlY2sgPT09ICd3aXRoJyk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICd9JzpcbiAgICAgICAgICAgIC8vIERpdmlkaW5nIGEgZnVuY3Rpb24gYnkgYW55dGhpbmcgbWFrZXMgbGl0dGxlIHNlbnNlLFxuICAgICAgICAgICAgLy8gYnV0IHdlIGhhdmUgdG8gY2hlY2sgZm9yIHRoYXQuXG4gICAgICAgICAgICByZWdleCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKHRlc3RLZXl3b3JkKGV4dHJhLnRva2VuVmFsdWVzW2V4dHJhLm9wZW5DdXJseVRva2VuIC0gM10pKSB7XG4gICAgICAgICAgICAgICAgLy8gQW5vbnltb3VzIGZ1bmN0aW9uLCBlLmcuIGZ1bmN0aW9uKCl7fSAvNDJcbiAgICAgICAgICAgICAgICBjaGVjayA9IGV4dHJhLnRva2VuVmFsdWVzW2V4dHJhLm9wZW5DdXJseVRva2VuIC0gNF07XG4gICAgICAgICAgICAgICAgcmVnZXggPSBjaGVjayA/IChGbkV4cHJUb2tlbnMuaW5kZXhPZihjaGVjaykgPCAwKSA6IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0ZXN0S2V5d29yZChleHRyYS50b2tlblZhbHVlc1tleHRyYS5vcGVuQ3VybHlUb2tlbiAtIDRdKSkge1xuICAgICAgICAgICAgICAgIC8vIE5hbWVkIGZ1bmN0aW9uLCBlLmcuIGZ1bmN0aW9uIGYoKXt9IC80Mi9cbiAgICAgICAgICAgICAgICBjaGVjayA9IGV4dHJhLnRva2VuVmFsdWVzW2V4dHJhLm9wZW5DdXJseVRva2VuIC0gNV07XG4gICAgICAgICAgICAgICAgcmVnZXggPSBjaGVjayA/IChGbkV4cHJUb2tlbnMuaW5kZXhPZihjaGVjaykgPCAwKSA6IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVnZXggPyBjb2xsZWN0UmVnZXgoKSA6IHNjYW5QdW5jdHVhdG9yKCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gYWR2YW5jZSgpIHtcbiAgICAgICAgdmFyIGNwLCB0b2tlbjtcblxuICAgICAgICBpZiAoaW5kZXggPj0gbGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHR5cGU6IFRva2VuLkVPRixcbiAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LFxuICAgICAgICAgICAgICAgIHN0YXJ0OiBpbmRleCxcbiAgICAgICAgICAgICAgICBlbmQ6IGluZGV4XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgY3AgPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCk7XG5cbiAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KGNwKSkge1xuICAgICAgICAgICAgdG9rZW4gPSBzY2FuSWRlbnRpZmllcigpO1xuICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQodG9rZW4udmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4udHlwZSA9IFRva2VuLktleXdvcmQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdG9rZW47XG4gICAgICAgIH1cblxuICAgICAgICAvLyBWZXJ5IGNvbW1vbjogKCBhbmQgKSBhbmQgO1xuICAgICAgICBpZiAoY3AgPT09IDB4MjggfHwgY3AgPT09IDB4MjkgfHwgY3AgPT09IDB4M0IpIHtcbiAgICAgICAgICAgIHJldHVybiBzY2FuUHVuY3R1YXRvcigpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU3RyaW5nIGxpdGVyYWwgc3RhcnRzIHdpdGggc2luZ2xlIHF1b3RlIChVKzAwMjcpIG9yIGRvdWJsZSBxdW90ZSAoVSswMDIyKS5cbiAgICAgICAgaWYgKGNwID09PSAweDI3IHx8IGNwID09PSAweDIyKSB7XG4gICAgICAgICAgICByZXR1cm4gc2NhblN0cmluZ0xpdGVyYWwoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIERvdCAoLikgVSswMDJFIGNhbiBhbHNvIHN0YXJ0IGEgZmxvYXRpbmctcG9pbnQgbnVtYmVyLCBoZW5jZSB0aGUgbmVlZFxuICAgICAgICAvLyB0byBjaGVjayB0aGUgbmV4dCBjaGFyYWN0ZXIuXG4gICAgICAgIGlmIChjcCA9PT0gMHgyRSkge1xuICAgICAgICAgICAgaWYgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5OdW1lcmljTGl0ZXJhbCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHNjYW5Qd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ICB9XG5cbiAgICBmdW5jdGlvbiBjb2xsZWN0VG9rZW4oKSB7XG4gICAgICAgIHZhciBsb2MsIHRva2VuLCB2YWx1ZSwgZW50cnk7XG5cbiAgICAgICAgbG9jID0ge1xuICAgICAgICAgICAgc3RhcnQ6IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogaW5kZXggLSBsaW5lU3RhcnRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB0b2tlbiA9IGFkdmFuY2UoKTtcbiAgICAgICAgbG9jLmVuZCA9IHtcbiAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKHRva2VuLnR5cGUgIT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgdmFsdWUgPSBzb3VyY2Uuc2xpY2UodG9rZW4uc3RhcnQsIHRva2VuLmVuZCk7XG4gICAgICAgICAgICBlbnRyeSA9IHtcbiAgICAgICAgICAgICAgICB0eXBlOiBUb2tlbk5hbWVbdG9rZW4udHlwZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICAgICAgICAgIHJhbmdlOiBbdG9rZW4uc3RhcnQsIHRva2VuLmVuZF0sXG4gICAgICAgICAgICAgICAgbG9jOiBsb2NcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAodG9rZW4ucmVnZXgpIHtcbiAgICAgICAgICAgICAgICBlbnRyeS5yZWdleCA9IHtcbiAgICAgICAgICAgICAgICAgICAgcGF0dGVybjogdG9rZW4ucmVnZXgucGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3M6IHRva2VuLnJlZ2V4LmZsYWdzXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS50b2tlblZhbHVlcykge1xuICAgICAgICAgICAgICAgIGV4dHJhLnRva2VuVmFsdWVzLnB1c2goKGVudHJ5LnR5cGUgPT09ICdQdW5jdHVhdG9yJyB8fCBlbnRyeS50eXBlID09PSAnS2V5d29yZCcpID8gZW50cnkudmFsdWUgOiBudWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChleHRyYS50b2tlbml6ZSkge1xuICAgICAgICAgICAgICAgIGlmICghZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGVudHJ5LnJhbmdlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWV4dHJhLmxvYykge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgZW50cnkubG9jO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXh0cmEuZGVsZWdhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZW50cnkgPSBleHRyYS5kZWxlZ2F0ZShlbnRyeSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXh0cmEudG9rZW5zLnB1c2goZW50cnkpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRva2VuO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGxleCgpIHtcbiAgICAgICAgdmFyIHRva2VuO1xuICAgICAgICBzY2FubmluZyA9IHRydWU7XG5cbiAgICAgICAgbGFzdEluZGV4ID0gaW5kZXg7XG4gICAgICAgIGxhc3RMaW5lTnVtYmVyID0gbGluZU51bWJlcjtcbiAgICAgICAgbGFzdExpbmVTdGFydCA9IGxpbmVTdGFydDtcblxuICAgICAgICBza2lwQ29tbWVudCgpO1xuXG4gICAgICAgIHRva2VuID0gbG9va2FoZWFkO1xuXG4gICAgICAgIHN0YXJ0SW5kZXggPSBpbmRleDtcbiAgICAgICAgc3RhcnRMaW5lTnVtYmVyID0gbGlu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gICAgfVxuXG4gICAgZnVuY3Rpb24gV3JhcHBpbmdTb3VyY2VMb2NhdGlvbihzdGFydFRva2VuKSB7XG4gICAgICAgIHRoaXMuc3RhcnQgPSB7XG4gICAgICAgICAgICBsaW5lOiBzdGFydFRva2VuLmxpbmVOdW1iZXIsXG4gICAgICAgICAgICBjb2x1bW46IHN0YXJ0VG9rZW4uc3RhcnQgLSBzdGFydFRva2VuLmxpbmVTdGFydFxuICAgICAgICB9O1xuICAgICAgICB0aGlzLmVuZCA9IG51bGw7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gTm9kZSgpIHtcbiAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7XG4gICAgICAgICAgICB0aGlzLnJhbmdlID0gW3N0YXJ0SW5kZXgsIDBdO1xuICAgICAgICB9XG4gICAgICAgIGlmIChleHRyYS5sb2MpIHtcbiAgICAgICAgICAgIHRoaXMubG9jID0gbmV3IFNvdXJjZUxvY2F0aW9uKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikge1xuICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgIHRoaXMucmFuZ2UgPSBbc3RhcnRUb2tlbi5zdGFydCwgMF07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGV4dHJhLmxvYykge1xuICAgICAgICAgICAgdGhpcy5sb2MgPSBuZXcgV3JhcHBpbmdTb3VyY2VMb2NhdGlvbihzdGFydFRva2VuKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIFdyYXBwaW5nTm9kZS5wcm90b3R5cGUgPSBOb2RlLnByb3RvdHlwZSA9IHtcblxuICAgICAgICBwcm9jZXNzQ29tbWVudDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGxhc3RDaGlsZCxcbiAgICAgICAgICAgICAgICBpbm5lckNvbW1lbnRzLFxuICAgICAgICAgICAgICAgIGxlYWRpbmdDb21tZW50cyxcbiAgICAgICAgICAgICAgICB0cmFpbGluZ0NvbW1lbnRzLFxuICAgICAgICAgICAgICAgIGJvdHRvbVJpZ2h0ID0gZXh0cmEuYm90dG9tUmlnaHRTdGFjayxcbiAgICAgICAgICAgICAgICBpLFxuICAgICAgICAgICAgICAgIGNvbW1lbnQsXG4gICAgICAgICAgICAgICAgbGFzdCA9IGJvdHRvbVJpZ2h0W2JvdHRvbVJpZ2h0Lmxlbmd0aCAtIDFdO1xuXG4gICAgICAgICAgICBpZiAodGhpcy50eXBlID09PSBTeW50YXguUHJvZ3JhbSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmJvZHkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBwYXRjaCBpbm5uZXJDb21tZW50cyBmb3IgcHJvcGVydGllcyBlbXB0eSBibG9ja1xuICAgICAgICAgICAgICogYGZ1bmN0aW9uIGEoKSB7LyoqIGNvbW1lbnRzICoqXFwvfWBcbiAgICAgICAgICAgICAqL1xuXG4gICAgICAgICAgICBpZiAodGhpcy50eXBlID09PSBTeW50YXguQmxvY2tTdGF0ZW1lbnQgJiYgdGhpcy5ib2R5Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGlubmVyQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBleHRyYS5sZWFkaW5nQ29tbWVudHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IGV4dHJhLmxlYWRpbmdDb21tZW50c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMucmFuZ2VbMV0gPj0gY29tbWVudC5yYW5nZVsxXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5uZXJDb21tZW50cy51bnNoaWZ0KGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEubGVhZGluZ0NvbW1lbnRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpbm5lckNvbW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmlubmVyQ29tbWVudHMgPSBpbm5lckNvbW1lbnRzO1xuICAgICAgICAgICAgICAgICAgICAvL2JvdHRvbVJpZ2h0LnB1c2godGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChleHRyYS50cmFpbGluZ0NvbW1lbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0cmFpbGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChpID0gZXh0cmEudHJhaWxpbmdDb21tZW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gZXh0cmEudHJhaWxpbmdDb21tZW50c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1lbnQucmFuZ2VbMF0gPj0gdGhpcy5yYW5nZVsxXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJhaWxpbmdDb21tZW50cy51bnNoaWZ0KGNvbW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAobGFzdCAmJiBsYXN0LnRyYWlsaW5nQ29tbWVudHMgJiYgbGFzdC50cmFpbGluZ0NvbW1lbnRzWzBdLnJhbmdlWzBdID49IHRoaXMucmFuZ2VbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhaWxpbmdDb21tZW50cyA9IGxhc3QudHJhaWxpbmdDb21tZW50cztcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGxhc3QudHJhaWxpbmdDb21tZW50cztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEVhdGluZyB0aGUgc3RhY2suXG4gICAgICAgICAgICB3aGlsZSAobGFzdCAmJiBsYXN0LnJhbmdlWzBdID49IHRoaXMucmFuZ2VbMF0pIHtcbiAgICAgICAgICAgICAgICBsYXN0Q2hpbGQgPSBib3R0b21SaWdodC5wb3AoKTtcbiAgICAgICAgICAgICAgICBsYXN0ID0gYm90dG9tUmlnaHRbYm90dG9tUmlnaHQubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChsYXN0Q2hpbGQpIHtcbiAgICAgICAgICAgICAgICBpZiAobGFzdENoaWxkLmxlYWRpbmdDb21tZW50cykge1xuICAgICAgICAgICAgICAgICAgICBsZWFkaW5nQ29tbWVudHMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gbGFzdENoaWxkLmxlYWRpbmdDb21tZW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IGxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5yYW5nZVsxXSA8PSB0aGlzLnJhbmdlWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVhZGluZ0NvbW1lbnRzLnVuc2hpZnQoY29tbWVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENoaWxkLmxlYWRpbmdDb21tZW50cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoIWxhc3RDaGlsZC5sZWFkaW5nQ29tbWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2hpbGQubGVhZGluZ0NvbW1lbnRzID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChleHRyYS5sZWFkaW5nQ29tbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGxlYWRpbmdDb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IGV4dHJhLmxlYWRpbmdDb21tZW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgICAgICBjb21tZW50ID0gZXh0cmEubGVhZGluZ0NvbW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5yYW5nZVsxXSA8PSB0aGlzLnJhbmdlWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZWFkaW5nQ29tbWVudHMudW5zaGlmdChjb21tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLmxlYWRpbmdDb21tZW50cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgaWYgKGxlYWRpbmdDb21tZW50cyAmJiBsZWFkaW5nQ29tbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIHRoaXMubGVhZGluZ0NvbW1lbnRzID0gbGVhZGluZ0NvbW1lbnRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRyYWlsaW5nQ29tbWVudHMgJiYgdHJhaWxpbmdDb21tZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50cmFpbGluZ0NvbW1lbnRzID0gdHJhaWxpbmdDb21tZW50cztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYm90dG9tUmlnaHQucHVzaCh0aGlzKTtcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2g6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChleHRyYS5yYW5nZSkge1xuICAgICAgICAgICAgICAgIHRoaXMucmFuZ2VbMV0gPSBsYXN0SW5kZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEubG9jKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sb2MuZW5kID0ge1xuICAgICAgICAgICAgICAgICAgICBsaW5lOiBsYXN0TGluZU51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgY29sdW1uOiBsYXN0SW5kZXggLSBsYXN0TGluZVN0YXJ0XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoZXh0cmEuc291cmNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubG9jLnNvdXJjZSA9IGV4dHJhLnNvdXJjZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChleHRyYS5hdHRhY2hDb21tZW50KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQ29tbWVudCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEFycmF5RXhwcmVzc2lvbjogZnVuY3Rpb24gKGVsZW1lbnRzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQXJyYXlFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5lbGVtZW50cyA9IGVsZW1lbnRzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEFycmF5UGF0dGVybjogZnVuY3Rpb24gKGVsZW1lbnRzKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQXJyYXlQYXR0ZXJuO1xuICAgICAgICAgICAgdGhpcy5lbGVtZW50cyA9IGVsZW1lbnRzO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEFycm93RnVuY3Rpb25FeHByZXNzaW9uOiBmdW5jdGlvbiAocGFyYW1zLCBkZWZhdWx0cywgYm9keSwgZXhwcmVzc2lvbikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkFycm93RnVuY3Rpb25FeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5pZCA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLnBhcmFtcyA9IHBhcmFtcztcbiAgICAgICAgICAgIHRoaXMuZGVmYXVsdHMgPSBkZWZhdWx0cztcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmdlbmVyYXRvciA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5leHByZXNzaW9uID0gZXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hBc3NpZ25tZW50RXhwcmVzc2lvbjogZnVuY3Rpb24gKG9wZXJhdG9yLCBsZWZ0LCByaWdodCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkFzc2lnbm1lbnRFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5vcGVyYXRvciA9IG9wZXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5sZWZ0ID0gbGVmdDtcbiAgICAgICAgICAgIHRoaXMucmlnaHQgPSByaWdodDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hBc3NpZ25tZW50UGF0dGVybjogZnVuY3Rpb24gKGxlZnQsIHJpZ2h0KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQXNzaWdubWVudFBhdHRlcm47XG4gICAgICAgICAgICB0aGlzLmxlZnQgPSBsZWZ0O1xuICAgICAgICAgICAgdGhpcy5yaWdodCA9IHJpZ2h0O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEJpbmFyeUV4cHJlc3Npb246IGZ1bmN0aW9uIChvcGVyYXRvciwgbGVmdCwgcmlnaHQpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IChvcGVyYXRvciA9PT0gJ3x8JyB8fCBvcGVyYXRvciA9PT0gJyYmJykgPyBTeW50YXguTG9naWNhbEV4cHJlc3Npb24gOiBTeW50YXguQmluYXJ5RXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMub3BlcmF0b3IgPSBvcGVyYXRvcjtcbiAgICAgICAgICAgIHRoaXMubGVmdCA9IGxlZnQ7XG4gICAgICAgICAgICB0aGlzLnJpZ2h0ID0gcmlnaHQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQmxvY2tTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQmxvY2tTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEJyZWFrU3RhdGVtZW50OiBmdW5jdGlvbiAobGFiZWwpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5CcmVha1N0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMubGFiZWwgPSBsYWJlbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDYWxsRXhwcmVzc2lvbjogZnVuY3Rpb24gKGNhbGxlZSwgYXJncykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNhbGxFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5jYWxsZWUgPSBjYWxsZWU7XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50cyA9IGFyZ3M7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ2F0Y2hDbGF1c2U6IGZ1bmN0aW9uIChwYXJhbSwgYm9keSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkNhdGNoQ2xhdXNlO1xuICAgICAgICAgICAgdGhpcy5wYXJhbSA9IHBhcmFtO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDbGFzc0JvZHk6IGZ1bmN0aW9uIChib2R5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguQ2xhc3NCb2R5O1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDbGFzc0RlY2xhcmF0aW9uOiBmdW5jdGlvbiAoaWQsIHN1cGVyQ2xhc3MsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5DbGFzc0RlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5pZCA9IGlkO1xuICAgICAgICAgICAgdGhpcy5zdXBlckNsYXNzID0gc3VwZXJDbGFzcztcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoQ2xhc3NFeHByZXNzaW9uOiBmdW5jdGlvbiAoaWQsIHN1cGVyQ2xhc3MsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5DbGFzc0V4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLmlkID0gaWQ7XG4gICAgICAgICAgICB0aGlzLnN1cGVyQ2xhc3MgPSBzdXBlckNsYXNzO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hDb25kaXRpb25hbEV4cHJlc3Npb246IGZ1bmN0aW9uICh0ZXN0LCBjb25zZXF1ZW50LCBhbHRlcm5hdGUpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Db25kaXRpb25hbEV4cHJlc3Npb247XG4gICAgICAgICAgICB0aGlzLnRlc3QgPSB0ZXN0O1xuICAgICAgICAgICAgdGhpcy5jb25zZXF1ZW50ID0gY29uc2VxdWVudDtcbiAgICAgICAgICAgIHRoaXMuYWx0ZXJuYXRlID0gYWx0ZXJuYXRlO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaENvbnRpbnVlU3RhdGVtZW50OiBmdW5jdGlvbiAobGFiZWwpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5Db250aW51ZVN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMubGFiZWwgPSBsYWJlbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hEZWJ1Z2dlclN0YXRlbWVudDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkRlYnVnZ2VyU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaERvV2hpbGVTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChib2R5LCB0ZXN0KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguRG9XaGlsZVN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYm9keSA9IGJvZHk7XG4gICAgICAgICAgICB0aGlzLnRlc3QgPSB0ZXN0O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEVtcHR5U3RhdGVtZW50OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXgu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dlbmVyYXRvcikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkZ1bmN0aW9uRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuaWQgPSBpZDtcbiAgICAgICAgICAgIHRoaXMucGFyYW1zID0gcGFyYW1zO1xuICAgICAgICAgICAgdGhpcy5kZWZhdWx0cyA9IGRlZmF1bHRzO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZ2VuZXJhdG9yID0gZ2VuZXJhdG9yO1xuICAgICAgICAgICAgdGhpcy5leHByZXNzaW9uID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoSWRlbnRpZmllcjogZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5JZGVudGlmaWVyO1xuICAgICAgICAgICAgdGhpcy5uYW1lID0gbmFtZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hJZlN0YXRlbWVudDogZnVuY3Rpb24gKHRlc3QsIGNvbnNlcXVlbnQsIGFsdGVybmF0ZSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LklmU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy50ZXN0ID0gdGVzdDtcbiAgICAgICAgICAgIHRoaXMuY29uc2VxdWVudCA9IGNvbnNlcXVlbnQ7XG4gICAgICAgICAgICB0aGlzLmFsdGVybmF0ZSA9IGFsdGVybmF0ZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hMYWJlbGVkU3RhdGVtZW50OiBmdW5jdGlvbiAobGFiZWwsIGJvZHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5MYWJlbGVkU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5sYWJlbCA9IGxhYmVsO1xuICAgICAgICAgICAgdGhpcy5ib2R5ID0gYm9keTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hMaXRlcmFsOiBmdW5jdGlvbiAodG9rZW4pIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5MaXRlcmFsO1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgdGhpcy5yYXcgPSBzb3VyY2Uuc2xpY2UodG9rZW4uc3RhcnQsIHRva2VuLmVuZCk7XG4gICAgICAgICAgICBpZiAodG9rZW4ucmVnZXgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJlZ2V4ID0gdG9rZW4ucmVnZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTWVtYmVyRXhwcmVzc2lvbjogZnVuY3Rpb24gKGFjY2Vzc29yLCBvYmplY3QsIHByb3BlcnR5KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguTWVtYmVyRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuY29tcHV0ZWQgPSBhY2Nlc3NvciA9PT0gJ1snO1xuICAgICAgICAgICAgdGhpcy5vYmplY3QgPSBvYmplY3Q7XG4gICAgICAgICAgICB0aGlzLnByb3BlcnR5ID0gcHJvcGVydHk7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTWV0YVByb3BlcnR5OiBmdW5jdGlvbiAobWV0YSwgcHJvcGVydHkpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5NZXRhUHJvcGVydHk7XG4gICAgICAgICAgICB0aGlzLm1ldGEgPSBtZXRhO1xuICAgICAgICAgICAgdGhpcy5wcm9wZXJ0eSA9IHByb3BlcnR5O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaE5ld0V4cHJlc3Npb246IGZ1bmN0aW9uIChjYWxsZWUsIGFyZ3MpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5OZXdFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5jYWxsZWUgPSBjYWxsZWU7XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50cyA9IGFyZ3M7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoT2JqZWN0RXhwcmVzc2lvbjogZnVuY3Rpb24gKHByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5PYmplY3RFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5wcm9wZXJ0aWVzID0gcHJvcGVydGllcztcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hPYmplY3RQYXR0ZXJuOiBmdW5jdGlvbiAocHJvcGVydGllcykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4Lk9iamVjdFBhdHRlcm47XG4gICAgICAgICAgICB0aGlzLnByb3BlcnRpZXMgPSB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uICAgICAgICAgICAgdGhpcy5raW5kID0ga2luZDtcbiAgICAgICAgICAgIHRoaXMubWV0aG9kID0gbWV0aG9kO1xuICAgICAgICAgICAgdGhpcy5zaG9ydGhhbmQgPSBzaG9ydGhhbmQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoUmVzdEVsZW1lbnQ6IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlJlc3RFbGVtZW50O1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFJldHVyblN0YXRlbWVudDogZnVuY3Rpb24gKGFyZ3VtZW50KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguUmV0dXJuU3RhdGVtZW50O1xuICAgICAgICAgICAgdGhpcy5hcmd1bWVudCA9IGFyZ3VtZW50O1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFNlcXVlbmNlRXhwcmVzc2lvbjogZnVuY3Rpb24gKGV4cHJlc3Npb25zKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguU2VxdWVuY2VFeHByZXNzaW9uO1xuICAgICAgICAgICAgdGhpcy5leHByZXNzaW9ucyA9IGV4cHJlc3Npb25zO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFNwcmVhZEVsZW1lbnQ6IGZ1bmN0aW9uIChhcmd1bWVud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zaW9uOiBmdW5jdGlvbiAodGFnLCBxdWFzaSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRhZ2dlZFRlbXBsYXRlRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMudGFnID0gdGFnO1xuICAgICAgICAgICAgdGhpcy5xdWFzaSA9IHF1YXNpO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFRlbXBsYXRlRWxlbWVudDogZnVuY3Rpb24gKHZhbHVlLCB0YWlsKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVGVtcGxhdGVFbGVtZW50O1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpcy50YWlsID0gdGFpbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUZW1wbGF0ZUxpdGVyYWw6IGZ1bmN0aW9uIChxdWFzaXMsIGV4cHJlc3Npb25zKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVGVtcGxhdGVMaXRlcmFsO1xuICAgICAgICAgICAgdGhpcy5xdWFzaXMgPSBxdWFzaXM7XG4gICAgICAgICAgICB0aGlzLmV4cHJlc3Npb25zID0gZXhwcmVzc2lvbnM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVGhpc0V4cHJlc3Npb246IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5UaGlzRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hUaHJvd1N0YXRlbWVudDogZnVuY3Rpb24gKGFyZ3VtZW50KSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVGhyb3dTdGF0ZW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmFyZ3VtZW50ID0gYXJndW1lbnQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoVHJ5U3RhdGVtZW50OiBmdW5jdGlvbiAoYmxvY2ssIGhhbmRsZXIsIGZpbmFsaXplcikge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlRyeVN0YXRlbWVudDtcbiAgICAgICAgICAgIHRoaXMuYmxvY2sgPSBibG9jaztcbiAgICAgICAgICAgIHRoaXMuZ3VhcmRlZEhhbmRsZXJzID0gW107XG4gICAgICAgICAgICB0aGlzLmhhbmRsZXJzID0gaGFuZGxlciA/IFtoYW5kbGVyXSA6IFtdO1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVyID0gaGFuZGxlcjtcbiAgICAgICAgICAgIHRoaXMuZmluYWxpemVyID0gZmluYWxpemVyO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFVuYXJ5RXhwcmVzc2lvbjogZnVuY3Rpb24gKG9wZXJhdG9yLCBhcmd1bWVudCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gKG9wZXJhdG9yID09PSAnKysnIHx8IG9wZXJhdG9yID09PSAnLS0nKSA/IFN5bnRheC5VcGRhdGVFeHByZXNzaW9uIDogU3ludGF4LlVuYXJ5RXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMub3BlcmF0b3IgPSBvcGVyYXRvcjtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnQgPSBhcmd1bWVudDtcbiAgICAgICAgICAgIHRoaXMucHJlZml4ID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hWYXJpYWJsZURlY2xhcmF0aW9uOiBmdW5jdGlvbiAoZGVjbGFyYXRpb25zKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuZGVjbGFyYXRpb25zID0gZGVjbGFyYXRpb25zO1xuICAgICAgICAgICAgdGhpcy5raW5kID0gJ3Zhcic7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoTGV4aWNhbERlY2xhcmF0aW9uOiBmdW5jdGlvbiAoZGVjbGFyYXRpb25zLCBraW5kKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSBTeW50YXguVmFyaWFibGVEZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuZGVjbGFyYXRpb25zID0gZGVjbGFyYXRpb25zO1xuICAgICAgICAgICAgdGhpcy5raW5kID0ga2luZDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hWYXJpYWJsZURlY2xhcmF0b3I6IGZ1bmN0aW9uIChpZCwgaW5pdCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LlZhcmlhYmxlRGVjbGFyYXRvcjtcbiAgICAgICAgICAgIHRoaXMuaWQgPSBpZDtcbiAgICAgICAgICAgIHRoaXMuaW5pdCA9IGluaXQ7XG4gICAgICAgICAgICB0aGlzLmZpbmlza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0aGlzLnR5cGUgPSBTeW50YXguSW1wb3J0RGVmYXVsdFNwZWNpZmllcjtcbiAgICAgICAgICAgIHRoaXMubG9jYWwgPSBsb2NhbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXI6IGZ1bmN0aW9uIChsb2NhbCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkltcG9ydE5hbWVzcGFjZVNwZWNpZmllcjtcbiAgICAgICAgICAgIHRoaXMubG9jYWwgPSBsb2NhbDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hFeHBvcnROYW1lZERlY2xhcmF0aW9uOiBmdW5jdGlvbiAoZGVjbGFyYXRpb24sIHNwZWNpZmllcnMsIHNyYykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkV4cG9ydE5hbWVkRGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmRlY2xhcmF0aW9uID0gZGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLnNwZWNpZmllcnMgPSBzcGVjaWZpZXJzO1xuICAgICAgICAgICAgdGhpcy5zb3VyY2UgPSBzcmM7XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uOiBmdW5jdGlvbiAoZGVjbGFyYXRpb24pIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5FeHBvcnREZWZhdWx0RGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmRlY2xhcmF0aW9uID0gZGVjbGFyYXRpb247XG4gICAgICAgICAgICB0aGlzLmZpbmlzaCgpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZmluaXNoRXhwb3J0QWxsRGVjbGFyYXRpb246IGZ1bmN0aW9uIChzcmMpIHtcbiAgICAgICAgICAgIHRoaXMudHlwZSA9IFN5bnRheC5FeHBvcnRBbGxEZWNsYXJhdGlvbjtcbiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc3JjO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaEltcG9ydFNwZWNpZmllcjogZnVuY3Rpb24gKGxvY2FsLCBpbXBvcnRlZCkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkltcG9ydFNwZWNpZmllcjtcbiAgICAgICAgICAgIHRoaXMubG9jYWwgPSBsb2NhbCB8fCBpbXBvcnRlZDtcbiAgICAgICAgICAgIHRoaXMuaW1wb3J0ZWQgPSBpbXBvcnRlZDtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSxcblxuICAgICAgICBmaW5pc2hJbXBvcnREZWNsYXJhdGlvbjogZnVuY3Rpb24gKHNwZWNpZmllcnMsIHNyYykge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LkltcG9ydERlY2xhcmF0aW9uO1xuICAgICAgICAgICAgdGhpcy5zcGVjaWZpZXJzID0gc3BlY2lmaWVycztcbiAgICAgICAgICAgIHRoaXMuc291cmNlID0gc3JjO1xuICAgICAgICAgICAgdGhpcy5maW5pc2goKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9LFxuXG4gICAgICAgIGZpbmlzaFlpZWxkRXhwcmVzc2lvbjogZnVuY3Rpb24gKGFyZ3VtZW50LCBkZWxlZ2F0ZSkge1xuICAgICAgICAgICAgdGhpcy50eXBlID0gU3ludGF4LllpZWxkRXhwcmVzc2lvbjtcbiAgICAgICAgICAgIHRoaXMuYXJndW1lbnQgPSBhcmd1bWVudDtcbiAgICAgICAgICAgIHRoaXMuZGVsZWdhdGUgPSBkZWxlZ2F0ZTtcbiAgICAgICAgICAgIHRoaXMuZmluaXNoKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgIH07XG5cblxuICAgIGZ1bmN0aW9uIHJlY29yZEVycm9yKGVycm9yKSB7XG4gICAgICAgIHZhciBlLCBleGlzdGluZztcblxuICAgICAgICBmb3IgKGUgPSAwOyBlIDwgZXh0cmEuZXJyb3JzLmxlbmd0aDsgZSsrKSB7XG4gICAgICAgICAgICBleGlzdGluZyA9IGV4dHJhLmVycm9yc1tlXTtcbiAgICAgICAgICAgIC8vIFByZXZlbnQgZHVwbGljYXRlZCBlcnJvci5cbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICBpZiAoZXhpc3RpbmcuaW5kZXggPT09IGVycm9yLmluZGV4ICYmIGV4aXN0aW5nLm1lc3NhZ2UgPT09IGVycm9yLm1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHRyYS5lcnJvcnMucHVzaChlcnJvcik7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gY29uc3RydWN0RXJyb3IobXNnLCBjb2x1bW4pIHtcbiAgICAgICAgdmFyIGVycm9yID0gbmV3IEVycm9yKG1zZyk7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfSBjYXRjaCAoYmFzZSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgICAgIGlmIChPYmplY3QuY3JlYXRlICYmIE9iamV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cHRpb24gYmVjYXVzZSBvZiB0aGUgdG9rZW4uXG5cbiAgICBmdW5jdGlvbiB1bmV4cGVjdGVkVG9rZW5FcnJvcih0b2tlbiwgbWVzc2FnZSkge1xuICAgICAgICB2YXIgdmFsdWUsIG1zZyA9IG1lc3NhZ2UgfHwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuO1xuXG4gICAgICAgIGlmICh0b2tlbikge1xuICAgICAgICAgICAgaWYgKCFtZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgbXNnID0gKHRva2VuLnR5cGUgPT09IFRva2VuLkVPRikgPyBNZXNzYWdlcy5VbmV4cGVjdGVkRU9TIDpcbiAgICAgICAgICAgICAgICAgICAgKHRva2VuLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIpID8gTWVzc2FnZXMuVW5leHBlY3RlZElkZW50aWZpZXIgOlxuICAgICAgICAgICAgICAgICAgICAodG9rZW4udHlwZSA9PT0gVG9rZW4uTnVtZXJpY0xpdGVyYWwpID8gTWVzc2FnZXMuVW5leHBlY3RlZE51bWJlciA6XG4gICAgICAgICAgICAgICAgICAgICh0b2tlbi50eXBlID09PSBUb2tlbi5TdHJpbmdMaXRlcmFsKSA/IE1lc3NhZ2VzLlVuZXhwZWN0ZWRTdHJpbmcgOlxuICAgICAgICAgICAgICAgICAgICAodG9rZW4udHlwZSA9PT0gVG9rZW4uVGVtcGxhdGUpID8gTWVzc2FnZXMuVW5leHBlY3RlZFRlbXBsYXRlIDpcbiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuO1xuXG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUgPT09IFRva2VuLktleXdvcmQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzRnV0dXJlUmVzZXJ2ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXNnID0gTWVzc2FnZXMuVW5leHBlY3RlZFJlc2VydmVkO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dldDtcbiAgICAgICAgZmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yID0gb2xkRmlyc3RDb3ZlckluaXRpYWxpemVkTmFtZUVycm9yIHx8IGZpcnN0Q292ZXJJbml0aWFsaXplZE5hbWVFcnJvcjtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy4zLjMgRGVzdHJ1Y3R1cmluZyBCaW5kaW5nIFBhdHRlcm5zXG5cbiAgICBmdW5jdGlvbiBwYXJzZUFycmF5UGF0dGVybihwYXJhbXMsIGtpbmQpIHtcbiAgICAgICAgdmFyIG5vZGUgPSBuZXcgTm9kZSgpLCBlbGVtZW50cyA9IFtdLCByZXN0LCByZXN0Tm9kZTtcbiAgICAgICAgZXhwZWN0KCdbJyk7XG5cbiAgICAgICAgd2hpbGUgKCFtYXRjaCgnXScpKSB7XG4gICAgICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgIGVsZW1lbnRzLnB1c2gobnVsbCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnLi4uJykpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdE5vZGUgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnB1c2gobG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdCA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKGtpbmQpO1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKHJlc3ROb2RlLmZpbmlzaFJlc3RFbGVtZW50KHJlc3QpKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChwYXJzZVBhdHRlcm5XaXRoRGVmYXVsdChwYXJhbXMsIGtpbmQpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnXScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICB9XG5cbiAgICAgICAgZXhwZWN0KCddJyk7XG5cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoQXJyYXlQYXR0ZXJuKGVsZW1lbnRzKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZVByb3BlcnR5UGF0dGVybihwYXJhbXMsIGtpbmQpIHtcbiAgICAgICAgdmFyIG5vZGUgPSBuZXcgTm9kZSgpLCBrZXksIGtleVRva2VuLCBjb21wdXRlZCA9IG1hdGNoKCdbJyksIGluaXQ7XG4gICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikge1xuICAgICAgICAgICAga2V5VG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICBrZXkgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuICAgICAgICAgICAgaWYgKG1hdGNoKCc9JykpIHtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaChrZXlUb2tlbik7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgaW5pdCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcblxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaFByb3BlcnR5KFxuICAgICAgICAgICAgICAgICAgICAnaW5pdCcsIGtleSwgZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIG5ldyBXcmFwcGluZ05vZGUoa2V5VG9rZW4pLmZpbmlzaEFzc2lnbm1lbnRQYXR0ZXJuKGtleSwgaW5pdCksIGZhbHNlLCBmYWxz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lbnRFeHByZXNzaW9uKTtcbiAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBwcmV2aW91c0FsbG93WWllbGQ7XG4gICAgICAgICAgICBwYXR0ZXJuID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hBc3NpZ25tZW50UGF0dGVybihwYXR0ZXJuLCByaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHBhdHRlcm47XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTIuMi41IEFycmF5IEluaXRpYWxpemVyXG5cbiAgICBmdW5jdGlvbiBwYXJzZUFycmF5SW5pdGlhbGl6ZXIoKSB7XG4gICAgICAgIHZhciBlbGVtZW50cyA9IFtdLCBub2RlID0gbmV3IE5vZGUoKSwgcmVzdFNwcmVhZDtcblxuICAgICAgICBleHBlY3QoJ1snKTtcblxuICAgICAgICB3aGlsZSAoIW1hdGNoKCddJykpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgZWxlbWVudHMucHVzaChudWxsKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJy4uLicpKSB7XG4gICAgICAgICAgICAgICAgcmVzdFNwcmVhZCA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgcmVzdFNwcmVhZC5maW5pc2hTcHJlYWRFbGVtZW50KGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnXScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7XG4gICAgICAgICAgICAgICA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AgICAgLy8gTm90ZTogVGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQgb25seSBmcm9tIHBhcnNlT2JqZWN0UHJvcGVydHkoKSwgd2hlcmVcbiAgICAgICAgLy8gRU9GIGFuZCBQdW5jdHVhdG9yIHRva2VucyBhcmUgYWxyZWFkeSBmaWx0ZXJlZCBvdXQuXG5cbiAgICAgICAgc3dpdGNoICh0b2tlbi50eXBlKSB7XG4gICAgICAgIGNhc2UgVG9rZW4uU3RyaW5nTGl0ZXJhbDpcbiAgICAgICAgY2FzZSBUb2tlbi5OdW1lcmljTGl0ZXJhbDpcbiAgICAgICAgICAgIGlmIChzdHJpY3QgJiYgdG9rZW4ub2N0YWwpIHtcbiAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RyaWN0T2N0YWxMaXRlcmFsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaExpdGVyYWwodG9rZW4pO1xuICAgICAgICBjYXNlIFRva2VuLklkZW50aWZpZXI6XG4gICAgICAgIGNhc2UgVG9rZW4uQm9vbGVhbkxpdGVyYWw6XG4gICAgICAgIGNhc2UgVG9rZW4uTnVsbExpdGVyYWw6XG4gICAgICAgIGNhc2UgVG9rZW4uS2V5d29yZDpcbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaElkZW50aWZpZXIodG9rZW4udmFsdWUpO1xuICAgICAgICBjYXNlIFRva2VuLlB1bmN0dWF0b3I6XG4gICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09ICdbJykge1xuICAgICAgICAgICAgICAgIGV4cHIgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnXScpO1xuICAgICAgICAgICAgICAgIHJldHVybiBleHByO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY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9yZGVyIHRvIGF2b2lkIGJhY2sgdHJhY2tpbmcsIGl0IHJldHVybnMgYG51bGxgIGlmIHRoZSBwb3NpdGlvbiBpcyBub3QgYSBNZXRob2REZWZpbml0aW9uIGFuZCB0aGUgY2FsbGVyXG4gICAgLy8gaXMgcmVzcG9uc2libGUgdG8gdmlzaXQgb3RoZXIgb3B0aW9ucy5cbiAgICBmdW5jdGlvbiB0cnlQYXJzZU1ldGhvZERlZmluaXRpb24odG9rZW4sIGtleSwgY29tcHV0ZWQsIG5vZGUpIHtcbiAgICAgICAgdmFyIHZhbHVlLCBvcHRpb25zLCBtZXRob2ROb2RlLCBwYXJhbXMsXG4gICAgICAgICAgICBwcmV2aW91c0FsbG93WWllbGQgPSBzdGF0ZS5hbGxvd1lpZWxkO1xuXG4gICAgICAgIGlmICh0b2tlbi50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAvLyBjaGVjayBmb3IgYGdldGAgYW5kIGBzZXRgO1xuXG4gICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09ICdnZXQnICYmIGxvb2thaGVhZFByb3BlcnR5TmFtZSgpKSB7XG4gICAgICAgICAgICAgICAgY29tcHV0ZWQgPSBtYXRjaCgnWycpO1xuICAgICAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgICAgICAgICBtZXRob2ROb2RlID0gbmV3IE5vZGUoKTtcbiAgICAgICAgICAgICAgICBleHBlY3QoJygnKTtcbiAgICAgICAgICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHBhcnNlUHJvcGVydHlGdW5jdGlvbihtZXRob2ROb2RlLCB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtczogW10sXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgc3RyaWN0ZWQ6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogbnVsbFxuICAgICAgICAgICAgICAgIH0sIGZhbHNlKTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gcHJldmlvdXNBbGxvd1lpZWxkO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcGVydHkoJ2dldCcsIGtleSwgY29tcHV0ZWQsIHZhbHVlLCBmYWxzZSwgZmFsc2UpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0b2tlbi52YWx1ZSA9PT0gJ3NldCcgJiYgbG9va2FoZWFkUHJvcGVydHlOYW1lKCkpIHtcbiAgICAgICAgICAgICAgICBjb21wdXRlZCA9IG1hdGNoKCdbJyk7XG4gICAgICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtleSgpO1xuICAgICAgICAgICAgICAgIG1ldGhvZE5vZGUgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgIGV4cGVjdCgnKCcpO1xuXG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdENvdW50OiAwLFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0czogW10sXG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1TZXQ6IHt9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJyknKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VQYXJhbShvcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHByZXZpb3VzQWxsb3dZaWVsZDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZGVmYXVsdENvdW50ID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmRlZmF1bHRzID0gW107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZXhwZWN0KCcpJyk7XG5cbiAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZVByb3BlcnR5RnVuY3Rpb24obWV0aG9kTm9kZSwgb3B0aW9ucywgZmFsc2UpO1xuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSBwcmV2aW91c0FsbG93WWllbGQ7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hQcm9wZXJ0eSgnc2V0Jywga2V5LCBjb21wdXRlZCwgdmFsdWUsIGZhbHNlLCBmYWxzZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uUHVuY3R1YXRvciAmJiB0b2tlbi52YWx1ZSA9PT0gJyonICYmIGxvb2thaGVhZFByb3BlcnR5TmFtZSgpKSB7XG4gICAgICAgICAgICBjb21wdXRlZCA9IG1hdGNoKCdbJyk7XG4gICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3BlcnR5S2V5KCk7XG4gICAgICAgICAgICBtZXRob2ROb2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICAgICAgc3RhdGUuYW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gICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGtleSA9IHBhcnNlT2JqZWN0UHJvcGVydHlLZXkoKTtcbiAgICAgICAgfVxuICAgICAgICBtYXliZU1ldGhvZCA9IHRyeVBhcnNlTWV0aG9kRGVmaW5pdGlvbih0b2tlbiwga2V5LCBjb21wdXRlZCwgbm9kZSk7XG4gICAgICAgIGlmIChtYXliZU1ldGhvZCkge1xuICAgICAgICAgICAgcmV0dXJuIG1heWJlTWV0aG9kO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFrZXkpIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDaGVjayBmb3IgZHVwbGljYXRlZCBfX3Byb3RvX19cbiAgICAgICAgaWYgKCFjb21wdXRlZCkge1xuICAgICAgICAgICAgcHJvdG8gPSAoa2V5LnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyICYmIGtleS5uYW1lID09PSAnX19wcm90b19fJykgfHxcbiAgICAgICAgICAgICAgICAoa2V5LnR5cGUgPT09IFN5bnRheC5MaXRlcmFsICYmIGtleS52YWx1ZSA9PT0gJ19fcHJvdG9fXycpO1xuICAgICAgICAgICAgaWYgKGhhc1Byb3RvLnZhbHVlICYmIHByb3RvKSB7XG4gICAgICAgICAgICAgICAgdG9sZXJhdGVFcnJvcihNZXNzYWdlcy5EdXBsaWNhdGVQcm90b1Byb3BlcnR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGhhc1Byb3RvLnZhbHVlIHw9IHByb3RvO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hdGNoKCc6JykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgdmFsdWUgPSBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvcG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ZXJ0eShoYXNQcm90bykpO1xuXG4gICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3RDb21tYVNlcGFyYXRvcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXhwZWN0KCd9Jyk7XG5cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoT2JqZWN0RXhwcmVzc2lvbihwcm9wZXJ0aWVzKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwcikge1xuICAgICAgICB2YXIgaTtcbiAgICAgICAgc3dpdGNoIChleHByLnR5cGUpIHtcbiAgICAgICAgY2FzZSBTeW50YXguSWRlbnRpZmllcjpcbiAgICAgICAgY2FzZSBTeW50YXguTWVtYmVyRXhwcmVzc2lvbjpcbiAgICAgICAgY2FzZSBTeW50YXguUmVzdEVsZW1lbnQ6XG4gICAgICAgIGNhc2UgU3ludGF4LkFzc2lnbm1lbnRQYXR0ZXJuOlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgU3ludGF4LlNwcmVhZEVsZW1lbnQ6XG4gICAgICAgICAgICBleHByLnR5cGUgPSBTeW50YXguUmVzdEVsZW1lbnQ7XG4gICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwci5hcmd1bWVudCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguQXJyYXlFeHByZXNzaW9uOlxuICAgICAgICAgICAgZXhwci50eXBlID0gU3ludGF4LkFycmF5UGF0dGVybjtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBleHByLmVsZW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4cHIuZWxlbWVudHNbaV0gIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIuZWxlbWVudHNbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5PYmplY3RFeHByZXNzaW9uOlxuICAgICAgICAgICAgZXhwci50eXBlID0gU3ludGF4Lk9iamVjdFBhdHRlcm47XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZXhwci5wcm9wZXJ0aWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIucHJvcGVydGllc1tpXS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguQXNzaWdubWVudEV4cHJlc3Npb246XG4gICAgICAgICAgICBleHByLnR5cGUgPSBTeW50YXguQXNzaWdubWVudFBhdHRlcm47XG4gICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwci5sZWZ0KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgLy8gQWxsb3cgb3RoZXIgbm9kZSB0eXBlIGZvciB0b2xlcmFudCBwYXJzaW5nLlxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4yLjkgVGVtcGxhdGUgTGl0ZXJhbHNcblxuICAgIGZ1bmN0aW9uIHBhcnNlVGVtcGxhdGVFbGVtZW50KG9wdGlvbikge1xuICAgICAgICB2YXIgbm9kZSwgdG9rZW47XG5cbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5UZW1wbGF0ZSB8fCAob3B0aW9uLmhlYWQgJiYgIWxvb2thaGVhZC5oZWFkKSkge1xuICAgICAgICAgICAgdGh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XMgPSBbXTtcblxuICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICBpZiAobWF0Y2goJyknKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCc9PicpKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCc9PicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBQbGFjZUhvbGRlcnMuQXJyb3dQYXJhbWV0ZXJQbGFjZUhvbGRlcixcbiAgICAgICAgICAgICAgICBwYXJhbXM6IFtdLFxuICAgICAgICAgICAgICAgIHJhd1BhcmFtczogW11cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICBpZiAobWF0Y2goJy4uLicpKSB7XG4gICAgICAgICAgICBleHByID0gcGFyc2VSZXN0RWxlbWVudChwYXJhbXMpO1xuICAgICAgICAgICAgZXhwZWN0KCcpJyk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCc9PicpKSB7XG4gICAgICAgICAgICAgICAgZXhwZWN0KCc9PicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBQbGFjZUhvbGRlcnMuQXJyb3dQYXJhbWV0ZXJQbGFjZUhvbGRlcixcbiAgICAgICAgICAgICAgICBwYXJhbXM6IFtleHByXVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSB0cnVlO1xuICAgICAgICBleHByID0gaW5oZXJpdENvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKTtcblxuICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gZmFsc2U7XG4gICAgICAgICAgICBleHByZXNzaW9ucyA9IFtleHByXTtcblxuICAgICAgICAgICAgd2hpbGUgKHN0YXJ0SW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxleCgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcuLi4nKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzQmluZGluZ0VsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbnMucHVzaChwYXJzZVJlc3RFbGVtZW50KHBhcmFtcykpO1xuICAgICAgICAgICAgICAgICAgICBleHBlY3QoJyknKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnPT4nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0KCc9PicpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGV4cHJlc3Npb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwcmVzc2lvbnNbaV0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBQbGFjZUhvbGRlcnMuQXJyb3dQYXJhbWV0ZXJQbGFjZUhvbGRlcixcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtczogZXhwcmVzc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBleHByZXNzaW9ucy5wdXNoKGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hTZXF1ZW5jZUV4cHJlc3Npb24oZXhwcmVzc2lvbnMpO1xuICAgICAgICB9XG5cblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICBpZiAobWF0Y2goJz0+JykpIHtcbiAgICAgICAgICAgIGlmIChleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyICYmIGV4cHIubmFtZSA9PT0gJ3lpZWxkJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFBsYWNlSG9sZGVycy5BcnJvd1BhcmFtZXRlclBsYWNlSG9sZGVyLFxuICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IFtleHByXVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghaXNCaW5kaW5nRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChleHByLnR5cGUgPT09IFN5bnRheC5TZXF1ZW5jZUV4cHJlc3Npb24pIHtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZXhwci5leHByZXNzaW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwci5leHByZXNzaW9uc1tpXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oZXhwcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGV4cHIgPSB7XG4gICAgICAgICAgICAgICAgdHlwZTogUGxhY2VIb2xkZXJzLkFycm93UGFyYW1ldGVyUGxhY2VIb2xkZXIsXG4gICAgICAgICAgICAgICAgcGFyYW1zOiBleHByLnR5cGUgPT09IFN5bnRheC5TZXF1ZW5jZUV4cHJlc3Npb24gPyBleHByLmV4cHJlc3Npb25zIDogW2V4cHJdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgcmV0dXJuIGV4cHI7XG4gICAgfVxuXG5cbiAgICAvLyBFQ01BLTI2MiAxMi4yIFByaW1hcnkgRXhwcmVzc2lvbnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlUHJpbWFyeUV4cHJlc3Npb24oKSB7XG4gICAgICAgIHZhciB0eXBlLCB0b2tlbiwgZXhwciwgbm9kZTtcblxuICAgICAgICBpZiAobWF0Y2goJygnKSkge1xuICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgcmV0dXJuIGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VHcm91cEV4cHJlc3Npb24pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgIHJldHVybiBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXJyYXlJbml0aWFsaXplcik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWF0Y2goJ3snKSkge1xuICAgICAgICAgICAgcmV0dXJuIGluaGVyaXRDb3ZlckdyYW1tYXIocGFyc2VPYmplY3RJbml0aWFsaXplcik7XG4gICAgICAgIH1cblxuICAgICAgICB0eXBlID0gbG9va2FoZWFkLnR5cGU7XG4gICAgICAgIG5vZG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AgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoSWRlbnRpZmllcihsZXgoKS52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdmdW5jdGlvbicpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRnVuY3Rpb25FeHByZXNzaW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCd0aGlzJykpIHtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hUaGlzRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29yZCgnY2xhc3MnKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUNsYXNzRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obGV4KCkpO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFRva2VuLkJvb2xlYW5MaXRlcmFsKSB7XG4gICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgdG9rZW4udmFsdWUgPSAodG9rZW4udmFsdWUgPT09ICd0cnVlJyk7XG4gICAgICAgICAgICBleHByID0gbm9kZS5maW5pc2hMaXRlcmFsKHRva2VuKTtcbiAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5OdWxsTGl0ZXJhbCkge1xuICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTtcbiAgICAgICAgICAgIHRva2VuLnZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgIGV4cHIgPSBub2RlLmZpbmlzaExpdGVyYWwodG9rZW4pO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcvJykgfHwgbWF0Y2goJy89JykpIHtcbiAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIGluZGV4ID0gc3RhcnRJbmRleDtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBleHRyYS50b2tlbnMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBjb2xsZWN0UmVnZXgoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBzY2FuUmVnRXhwKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGV4cHIgPSBub2RlLmZpbmlzaExpdGVyYWwodG9rZW4pO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09IFRva2VuLlRlbXBsYXRlKSB7XG4gICAgICAgICAgICBleHByID0gcGFyc2VUZW1wbGF0ZUxpdGVyYWwoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxleCgpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEyLjMgTGVmdC1IYW5kLVNpZGUgRXhwcmVzc2lvbnNcblxuICAgIGZ1bmN0aW9uIHBhcnNlQXJndW1lbnRzKCkge1xuICAgICAgICB2YXIgYXJncyA9IFtdLCBleHByO1xuXG4gICAgICAgIGV4cGVjdCgnKCcpO1xuXG4gICAgICAgIGlmICghbWF0Y2goJyknKSkge1xuICAgICAgICAgICAgd2hpbGUgKHN0YXJ0SW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJy4uLicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGV4cHIgPSBuZXcgTm9kZSgpO1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgZXhwci5maW5pc2hTcHJlYWRFbGVtZW50KGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbikpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGV4cHIgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhcmdzLnB1c2goZXhwcik7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcpJykpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGV4cGVjdENvbW1hU2VwYXJhdG9yKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICByZXR1cm4gYXJncztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKSB7XG4gICAgICAgIHZhciB0b2tlbiwgbm9kZSA9IG5ldyBOb2RlKCk7XG5cbiAgICAgICAgdG9rZW4gPSBsZXgoKTtcblxuICAgICAgICBpZiAoIWlzSWRlbnRpZmllck5hbWUodG9rZW4pKSB7XG4gICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hJZGVudGlmaWVyKHRva2VuLnZhbHVlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZU5vbkNvbXB1dGVkTWVtYmVyKCkge1xuICAgICAgICBleHBlY3QoJy4nKTtcblxuICAgICAgICByZXR1cm4gcGFyc2VOb25Db21wdXRlZFByb3BlcnR5KCk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VDb21wdXRlZE1lbWJlcigpIHtcbiAgICAgICAgdmFyIGV4cHI7XG5cbiAgICAgICAgZXhwZWN0KCdbJyk7XG5cbiAgICAgICAgZXhwciA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VFeHByZXNzaW9uKTtcblxuICAgICAgICBleHBlY3QoJ10nKTtcblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4zLjMgVGhlIG5ldyBPcGVyYXRvclxuXG4gICAgZnVuY3Rpb24gcGFyc2VOZXdFeHByZXNzaW9uKCkge1xuICAgICAgICB2YXIgY2FsbGVlLCBhcmdzLCBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBleHBlY3RLZXl3b3JkKCduZXcnKTtcblxuICAgICAgICBpZiAobWF0Y2goJy4nKSkge1xuICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLklkZW50aWZpZXIgJiYgbG9va2FoZWFkLnZhbHVlID09PSAndGFyZ2V0Jykge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5pbkZ1bmN0aW9uQm9keSkge1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoTWV0YVByb3BlcnR5KCduZXcnLCAndGFyZ2V0Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICA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hcihtYXRjaEtleXdvcmQoJ25ldycpID8gcGFyc2VOZXdFeHByZXNzaW9uIDogcGFyc2VQcmltYXJ5RXhwcmVzc2lvbik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKDs7KSB7XG4gICAgICAgICAgICBpZiAobWF0Y2goJy4nKSkge1xuICAgICAgICAgICAgICAgIGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gcGFyc2VOb25Db21wdXRlZE1lbWJlcigpO1xuICAgICAgICAgICAgICAgIGV4cHIgPSBuZXcgV3JhcHBpbmdOb2RlKHN0YXJ0VG9rZW4pLmZpbmlzaE1lbWJlckV4cHJlc3Npb24oJy4nLCBleHByLCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcoJykpIHtcbiAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgYXJncyA9IHBhcnNlQXJndW1lbnRzKCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoQ2FsbEV4cHJlc3Npb24oZXhwciwgYXJncyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eSA9IHBhcnNlQ29tcHV0ZWRNZW1iZXIoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShz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mZpbmlzaFN1cGVyKCk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCdbJykgJiYgIW1hdGNoKCcuJykpIHtcbiAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbihsb29rYWhlYWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZXhwciA9IGluaGVyaXRDb3ZlckdyYW1tYXIobWF0Y2hLZXl3b3JkKCduZXcnKSA/IHBhcnNlTmV3RXhwcmVzc2lvbiA6IHBhcnNlUHJpbWFyeUV4cHJlc3Npb24pO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICg7Oykge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgICAgICBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgaXNBc3NpZ25tZW50VGFyZ2V0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eSA9IHBhcnNlQ29tcHV0ZWRNZW1iZXIoKTtcbiAgICAgICAgICAgICAgICBleHByID0gbmV3IFdyYXBwaW5nTm9kZShzdGFydFRva2VuKS5maW5pc2hNZW1iZXJFeHByZXNzaW9uKCdbJywgZXhwciwgcHJvcGVydHkpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnLicpKSB7XG4gICAgICAgICAgICAgICAgaXNCaW5kaW5nRWxlbWVudCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcHJvcGVydHkgPSBwYXJzZU5vbkNvbXB1dGVkTWVtYmVyKCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoTWVtYmVyRXhwcmVzc2lvbignLicsIGV4cHIsIHByb3BlcnR5KTtcbiAgICAgICAgICAgIH0gZWxzZSB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7XG4gICAgICAgIH1cblxuICAgICAgICBzd2l0Y2ggKHRva2VuLnZhbHVlKSB7XG4gICAgICAgIGNhc2UgJ3x8JzpcbiAgICAgICAgICAgIHByZWMgPSAxO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnJiYnOlxuICAgICAgICAgICAgcHJlYyA9IDI7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICd8JzpcbiAgICAgICAgICAgIHByZWMgPSAzO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnXic6XG4gICAgICAgICAgICBwcmVjID0gNDtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJyYnOlxuICAgICAgICAgICAgcHJlYyA9IDU7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICc9PSc6XG4gICAgICAgIGNhc2UgJyE9JzpcbiAgICAgICAgY2FzZSAnPT09JzpcbiAgICAgICAgY2FzZSAnIT09JzpcbiAgICAgICAgICAgIHByZWMgPSA2O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnPCc6XG4gICAgICAgIGNhc2UgJz4nOlxuICAgICAgICBjYXNlICc8PSc6XG4gICAgICAgIGNhc2UgJz49JzpcbiAgICAgICAgY2FzZSAnaW5zdGFuY2VvZic6XG4gICAgICAgICAgICBwcmVjID0gNztcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgJ2luJzpcbiAgICAgICAgICAgIHByZWMgPSBhbGxvd0luID8gNyA6IDA7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlICc8PCc6XG4gICAgICAgIGNhc2UgJz4+JzpcbiAgICAgICAgY2FzZSAnPj4+JzpcbiAgICAgICAgICAgIHByZWMgPSA4O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnKyc6XG4gICAgICAgIGNhc2UgJy0nOlxuICAgICA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gc3RhdGUuYWxsb3dJbik7XG4gICAgICAgIGlmIChwcmVjID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gbGVmdDtcbiAgICAgICAgfVxuICAgICAgICBpc0Fzc2lnbm1lbnRUYXJnZXQgPSBpc0JpbmRpbmdFbGVtZW50ID0gZmFsc2U7XG4gICAgICAgIHRva2VuLnByZWMgPSBwcmVjO1xuICAgICAgICBsZXgoKTtcblxuICAgICAgICBtYXJrZXJzID0gW21hcmtlciwgbG9va2FoZWFkXTtcbiAgICAgICAgcmlnaHQgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlVW5hcnlFeHByZXNzaW9uKTtcblxuICAgICAgICBzdGFjayA9IFtsZWZ0LCB0b2tlbiwgcmlnaHRdO1xuXG4gICAgICAgIHdoaWxlICgocHJlYyA9IGJpbmFyeVByZWNlZGVuY2UobG9va2FoZWFkLCBzdGF0ZS5hbGxvd0luKSkgPiAwKSB7XG5cbiAgICAgICAgICAgIC8vIFJlZHVjZTogbWFrZSBhIGJpbmFyeSBleHByZXNzaW9uIGZyb20gdGhlIHRocmVlIHRvcG1vc3QgZW50cmllcy5cbiAgICAgICAgICAgIHdoaWxlICgoc3RhY2subGVuZ3RoID4gMikgJiYgKHByZWMgPD0gc3RhY2tbc3RhY2subGVuZ3RoIC0gMl0ucHJlYykpIHtcbiAgICAgICAgICAgICAgICByaWdodCA9IHN0YWNrLnBvcCgpO1xuICAgICAgICAgICAgICAgIG9wZXJhdG9yID0gc3RhY2sucG9wKCkudmFsdWU7XG4gICAgICAgICAgICAgICAgbGVmdCA9IHN0YWNrLnBvcCgpO1xuICAgICAgICAgICAgICAgIG1hcmtlcnMucG9wKCk7XG4gICAgICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUobWFya2Vyc1ttYXJrZXJzLmxlbmd0aCAtIDFdKS5maW5pc2hCaW5hcnlFeHByZXNzaW9uKG9wZXJhdG9yLCBsZWZ0LCByaWdodCk7XG4gICAgICAgICAgICAgICAgc3RhY2sucHVzaChleHByKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gU2hpZnQuXG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgdG9rZW4ucHJlYyA9IHByZWM7XG4gICAgICAgICAgICBzdGFjay5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgIG1hcmtlcnMucHVzaChsb29rYWhlYWQpO1xuICAgICAgICAgICAgZXhwciA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VVbmFyeUV4cHJlc3Npb24pO1xuICAgICAgICAgICAgc3RhY2sucHVzaChleHByKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEZpbmFsIHJlZHVjZSB0byBjbGVhbi11cCB0aGUgc3RhY2suXG4gICAgICAgIGkgPSBzdGFjay5sZW5ndGggLSAxO1xuICAgICAgICBleHByID0gc3RhY2tbaV07XG4gICAgICAgIG1hcmtlcnMucG9wKCk7XG4gICAgICAgIHdoaWxlIChpID4gMSkge1xuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUobWFya2Vycy5wb3AoKSkuZmluaXNoQmluYXJ5RXhwcmVzc2lvbihzdGFja1tpIC0gMV0udmFsdWUsIHN0YWNrW2kgLSAyXSwgZXhwcik7XG4gICAgICAgICAgICBpIC09IDI7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cblxuICAgIC8vIEVDTUEtMjYyIDEyLjEzIENvbmRpdGlvbmFsIE9wZXJhdG9yXG5cbiAgICBmdW5jdGlvbiBwYXJzZUNvbmRpdGlvbmFsRXhwcmVzc2lvbigpIHtcbiAgICAgICAgdmFyIGV4cHIsIHByZXZpb3VzQWxsb3dJbiwgY29uc2VxdWVudCwgYWx0ZXJuYXRlLCBzdGFydFRva2VuO1xuXG4gICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7XG5cbiAgICAgICAgZXhwciA9IGlu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ICAgfVxuXG4gICAgZnVuY3Rpb24gY2hlY2tQYXR0ZXJuUGFyYW0ob3B0aW9ucywgcGFyYW0pIHtcbiAgICAgICAgdmFyIGk7XG4gICAgICAgIHN3aXRjaCAocGFyYW0udHlwZSkge1xuICAgICAgICBjYXNlIFN5bnRheC5JZGVudGlmaWVyOlxuICAgICAgICAgICAgdmFsaWRhdGVQYXJhbShvcHRpb25zLCBwYXJhbSwgcGFyYW0ubmFtZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguUmVzdEVsZW1lbnQ6XG4gICAgICAgICAgICBjaGVja1BhdHRlcm5QYXJhbShvcHRpb25zLCBwYXJhbS5hcmd1bWVudCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBTeW50YXguQXNzaWdubWVudFBhdHRlcm46XG4gICAgICAgICAgICBjaGVja1BhdHRlcm5QYXJhbShvcHRpb25zLCBwYXJhbS5sZWZ0KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5BcnJheVBhdHRlcm46XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyYW0uZWxlbWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0uZWxlbWVudHNbaV0gIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2hlY2tQYXR0ZXJuUGFyYW0ob3B0aW9ucywgcGFyYW0uZWxlbWVudHNbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFN5bnRheC5ZaWVsZEV4cHJlc3Npb246XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGFzc2VydChwYXJhbS50eXBlID09PSBTeW50YXguT2JqZWN0UGF0dGVybiwgJ0ludmFsaWQgdHlwZScpO1xuICAgICAgIC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N5bnRheC5Bc3NpZ25tZW50UGF0dGVybjpcbiAgICAgICAgICAgICAgICBwYXJhbXNbaV0gPSBwYXJhbS5sZWZ0O1xuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yaWdodC50eXBlID09PSBTeW50YXguWWllbGRFeHByZXNzaW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yaWdodC5hcmd1bWVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXJhbS5yaWdodC50eXBlID0gU3ludGF4LklkZW50aWZpZXI7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtLnJpZ2h0Lm5hbWUgPSAneWllbGQnO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyYW0ucmlnaHQuYXJndW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBwYXJhbS5yaWdodC5kZWxlZ2F0ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVmYXVsdHMucHVzaChwYXJhbS5yaWdodCk7XG4gICAgICAgICAgICAgICAgKytkZWZhdWx0Q291bnQ7XG4gICAgICAgICAgICAgICAgY2hlY2tQYXR0ZXJuUGFyYW0ob3B0aW9ucywgcGFyYW0ubGVmdCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIGNoZWNrUGF0dGVyblBhcmFtKG9wdGlvbnMsIHBhcmFtKTtcbiAgICAgICAgICAgICAgICBwYXJhbXNbaV0gPSBwYXJhbTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0cy5wdXNoKG51bGwpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0cmljdCB8fCAh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TtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxNC40IFlpZWxkIGV4cHJlc3Npb25cblxuICAgIGZ1bmN0aW9uIHBhcnNlWWllbGRFeHByZXNzaW9uKCkge1xuICAgICAgICB2YXIgYXJndW1lbnQsIGV4cHIsIGRlbGVnYXRlLCBwcmV2aW91c0FsbG93WWllbGQ7XG5cbiAgICAgICAgYXJndW1lbnQgPSBudWxsO1xuICAgICAgICBleHByID0gbmV3IE5vZGUoKTtcbiAgICAgICAgZGVsZWdhdGUgPSBmYWxzZTtcblxuICAgICAgICBleHBlY3RLZXl3b3JkKCd5aWVsZCcpO1xuXG4gICAgICAgIGlmICghaGFzTGluZVRlcm1pbmF0b3IpIHtcbiAgICAgICAgICAgIHByZXZpb3VzQWxsb3dZaWVsZCA9IHN0YXRlLmFsbG93WWllbGQ7XG4gICAgICAgICAgICBzdGF0ZS5hbGxvd1lpZWxkID0gZmFsc2U7XG4gICAgICAgICAgICBkZWxlZ2F0ZSA9IG1hdGNoKCcqJyk7XG4gICAgICAgICAgICBpZiAoZGVsZWdhdGUpIHtcbiAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICBhcmd1bWVudCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKCFtYXRjaCgnOycpICYmICFtYXRjaCgnfScpICYmICFtYXRjaCgnKScpICYmIGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5FT0YpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHByZXZpb3VzQWxsb3dZaWVsZDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBleHByLmZpbmlzaFlpZWx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uXG4gICAgICAgIGlmIChtYXRjaEFzc2lnbigpKSB7XG4gICAgICAgICAgICBpZiAoIWlzQXNzaWdubWVudFRhcmdldCkge1xuICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSW52YWxpZExIU0luQXNzaWdubWVudCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEVDTUEtMjYyIDEyLjEuMVxuICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzUmVzdHJpY3RlZFdvcmQoZXhwci5uYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RyaWN0TEhTQXNzaWdubWVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQoZXhwci5uYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RyaWN0UmVzZXJ2ZWRXb3JkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghbWF0Y2goJz0nKSkge1xuICAgICAgICAgICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGV4cHIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0b2tlbiA9IGxleCgpO1xuICAgICAgICAgICAgcmlnaHQgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoQXNzaWdubWVudEV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIsIHJpZ2h0KTtcbiAgICAgICAgICAgIGZpcnN0Q292ZXJJbml0aWFsaXplZE5hbWVFcnJvciA9IG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZXhwcjtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMi4xNSBDb21tYSBPcGVyYXRvclxuXG4gICAgZnVuY3Rpb24gcGFyc2VFeHByZXNzaW9uKCkge1xuICAgICAgICB2YXIgZXhwciwgc3RhcnRUb2tlbiA9IGxvb2thaGVhZCwgZXhwcmVzc2lvbnM7XG5cbiAgICAgICAgZXhwciA9IGlzb2xhdGVDb3ZlckdyYW1tYXIocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbik7XG5cbiAgICAgICAgaWYgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgIGV4cHJlc3Npb25zID0gW2V4cHJdO1xuXG4gICAgICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmICghbWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgZXhwcmVzc2lvbnMucHVzaChpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXhwciA9IG5ldyBXcmFwcGluZ05vZGUoc3RhcnRUb2tlbikuZmluaXNoU2VxdWVuY2VFeHByZXNzaW9uKGV4cHJlc3Npb25zKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBleHByO1xuICAgIH1cblxuICAgIC8vIEV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ZXJTdGF0ZSgpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGluZGV4OiBpbmRleCxcbiAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsXG4gICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCxcbiAgICAgICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yOiBoYXNMaW5lVGVybWluYXRvcixcbiAgICAgICAgICAgIGxhc3RJbmRleDogbGFzdEluZGV4LFxuICAgICAgICAgICAgbGFzdExpbmVOdW1iZXI6IGxhc3RMaW5lTnVtYmVyLFxuICAgICAgICAgICAgbGFzdExpbmVTdGFydDogbGFzdExpbmVTdGFydCxcbiAgICAgICAgICAgIHN0YXJ0SW5kZXg6IHN0YXJ0SW5kZXgsXG4gICAgICAgICAgICBzdGFydExpbmVOdW1iZXI6IHN0YXJ0TGluZU51bWJlcixcbiAgICAgICAgICAgIHN0YXJ0TGluZVN0YXJ0OiBzdGFydExpbmVTdGFydCxcbiAgICAgICAgICAgIGxvb2thaGVhZDogbG9va2FoZWFkLFxuICAgICAgICAgICAgdG9rZW5Db3VudDogZXh0cmEudG9rZW5zID8gZXh0cmEudG9rZW5zLmxlbmd0aCA6IDBcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiByZXNldFRva2VuaXplclN0YXRlKHRzKSB7XG4gICAgICAgIGluZGV4ID0gdHMuaW5kZXg7XG4gICAgICAgIGxpbmVOdW1iZXIgPSB0cy5saW5lTnVtYmVyO1xuICAgICAgICBsaW5lU3RhcnQgPSB0cy5saW5lU3RhcnQ7XG4gICAgICAgIGhhc0xpbmVUZXJtaW5hdG9yID0gdHMuaGFzTGluZVRlcm1pbmF0b3I7XG4gICAgICAgIGxhc3RJbmRleCA9IHRzLmxhc3RJbmRleDtcbiAgICAgICAgbGFzdExpbmVOdW1iZXIgPSB0cy5sYXN0TGluZU51bWJlcjtcbiAgICAgICAgbGFzdExpbmVTdGFydCA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cbiAgICAgICAgICAgICAgICBpZiAoZGVjbGFyYXRpb25zLmxlbmd0aCA9PT0gMSAmJiBtYXRjaEtleXdvcmQoJ2luJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoVmFyaWFibGVEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgbGVmdCA9IGluaXQ7XG4gICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVjbGFyYXRpb25zLmxlbmd0aCA9PT0gMSAmJiBkZWNsYXJhdGlvbnNbMF0uaW5pdCA9PT0gbnVsbCAmJiBtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdvZicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaFZhcmlhYmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGZvckluID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoVmFyaWFibGVEZWNsYXJhdGlvbihkZWNsYXJhdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICBleHBlY3QoJzsnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoS2V5d29yZCgnY29uc3QnKSB8fCBtYXRjaEtleXdvcmQoJ2xldCcpKSB7XG4gICAgICAgICAgICAgICAgaW5pdCA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAga2luZCA9IGxleCgpLnZhbHVlO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFzdHJpY3QgJiYgbG9va2FoZWFkLnZhbHVlID09PSAnaW4nKSB7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBpbml0LmZpbmlzaElkZW50aWZpZXIoa2luZCk7XG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgaW5pdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbnMgPSBwYXJzZUJpbmRpbmdMaXN0KGtpbmQsIHtpbkZvcjogdHJ1ZX0pO1xuICAgICAgICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gcHJldmlvdXNBbGxvd0luO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkZWNsYXJhdGlvbnMubGVuZ3RoID09PSAxICYmIGRlY2xhcmF0aW9uc1swXS5pbml0ID09PSBudWxsICYmIG1hdGNoS2V5d29yZCgnaW4nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoTGV4aWNhbERlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucywga2luZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGRlY2xhcmF0aW9ucy5sZW5ndGggPT09IDEgJiYgZGVjbGFyYXRpb25zWzBdLmluaXQgPT09IG51bGwgJiYgbWF0Y2hDb250ZXh0dWFsS2V5d29yZCgnb2YnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdCA9IGluaXQuZmluaXNoTGV4aWNhbERlY2xhcmF0aW9uKGRlY2xhcmF0aW9ucywga2luZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvckluID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gaW5pdC5maW5pc2hMZXhpY2FsRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zLCBraW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaW5pdFN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGluaXQgPSBpbmhlcml0Q292ZXJHcmFtbWFyKHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24pO1xuICAgICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBwcmV2aW91c0FsbG93SW47XG5cbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdpbicpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNBc3NpZ25tZW50VGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLkludmFsaWRMSFNJbkZvckluKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICByZWludGVycHJldEV4cHJlc3Npb25Bc1BhdHRlcm4oaW5pdCk7XG4gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0O1xuICAgICAgICAgICAgICAgICAgICByaWdodCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICBpbml0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ29mJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0Fzc2lnbm1lbnRUYXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvbGVyYXRlRXJyb3IoTWVzc2FnZXMuSW52YWxpZExIU0luRm9yTG9vcCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRFeHByZXNzaW9uQXNQYXR0ZXJuKGluaXQpO1xuICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gaW5pdDtcbiAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICBmb3JJbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXRjaCgnLCcpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VxID0gW2luaXRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKG1hdGNoKCcsJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbml0U2VxLnB1c2goaXNvbGF0ZUNvdmVyR3JhbW1hcihwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpbml0ID0gbmV3IFdyYXBwaW5nTm9kZShpbml0U3RhcnRUb2tlbikuZmluaXNoU2VxdWVuY2VFeHByZXNzaW9uKGluaXRTZXEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnOycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgbGVmdCA9PT0gJ3VuZGVmaW5lZCcpIHtcblxuICAgICAgICAgICAgaWYgKCFtYXRjaCgnOycpKSB7XG4gICAgICAgICAgICAgICAgdGVzdCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZXhwZWN0KCc7Jyk7XG5cbiAgICAgICAgICAgIGlmICghbWF0Y2goJyknKSkge1xuICAgICAgICAgICAgICAgIHVwZGF0ZSA9IHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXhwZWN0KCcpJyk7XG5cbiAgICAgICAgb2xkSW5JdGVyYXRpb24gPSBzdGF0ZS5pbkl0ZXJhdGlvbjtcbiAgICAgICAgc3RhdGUuaW5JdGVyYXRpb24gPSB0cnVlO1xuXG4gICAgICAgIGJvZHkgPSBpc29sYXRlQ292ZXJHcmFtbWFyKHBhcnNlU3RhdGVtZW50KTtcblxuICAgICAgICBzdGF0ZS5pbkl0ZXJhdGlvbiA9IG9sZEluSXRlcmF0aW9uO1xuXG4gICAgICAgIHJldHVybiAodHlwZW9mIGxlZnQgPT09ICd1bmRlZmluZWQnKSA/XG4gICAgICAgICAgICAgICAgbm9kZS5maW5pc2hGb3JTdGF0ZW1lbnQoaW5pdCwgdGVzdCwgdXBkYXRlLCBib2R5KSA6XG4gICAgICAgICAgICAgICAgZm9ySW4gPyBub2RlLmZpbmlzaEZvckluU3RhdGVtZW50KGxlZnQsIHJpZ2h0LCBib2R5KSA6XG4gICAgICAgICAgICAgICAgICAgIG5vZGUuZmluaXNoRm9yT2ZTdGF0ZW1lbnQobGVmdCwgcmlnaHQsIGJvZHkpO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEzLjggVGhlIGNvbnRpbnVlIHN0YXRlbWVudFxuXG4gICAgZnVuY3Rpb24gcGFyc2VDb250aW51ZVN0YXRlbWVudChub2RlKSB7XG4gICAgICAgIHZhciBsYWJlbCA9IG51bGwsIGtleTtcblxuICAgICAgICBleHBlY3RLZXl3b3JkKCdjb250aW51ZScpO1xuXG4gICAgICAgIC8vIE9wdGltaXplIHRoZSBtb3N0IGNvbW1vbiBmb3JtOiAnY29udGludWU7Jy5cbiAgICAgICAgaWYgKHNvdXJjZS5jaGFyQ29kZUF0KHN0YXJ0SW5kZXgpID09PSAweDNCKSB7XG4gICAgICAgICAgICBsZXgoKTtcblxuICAgICAgICAgICAgaWYgKCFzdGF0ZS5pbkl0ZXJhdGlvbikge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbENvbnRpbnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoQ29udGludWVTdGF0ZW1lbnQobnVsbCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzTGluZVRlcm1pbmF0b3IpIHtcbiAgICAgICAgICAgIGlmICghc3RhdGUuaW5JdGVyYXRpb24pIHtcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLklsbGVnYWxDb250aW51ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaENvbnRpbnVlU3RhdGVtZW50KG51bGwpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICBsYWJlbCA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7XG5cbiAgICAgICAgICAgIGtleSA9ICckJyArIGxhYmVsLm5hbWU7XG4gICAgICAgICAgICBpZiAoIU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChzdGF0ZS5sYWJlbFNldCwga2V5KSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuVW5rbm93bkxhYmVsLCBsYWJlbC5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcblxuICAgICAgICBpZiAobGFiZWwgPT09IG51bGwgJiYgIXN0YXRlLmluSXRlcmF0aW9uKSB7XG4gICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLklsbGVnYWxDb250aW51ZSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hDb250aW51ZVN0YXRlbWVudChsYWJlbCk7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTMuOSBUaGUgYnJlYWsgc3RhdGVtZW50XG5cbiAgICBmdW5jdGlvbiBwYXJzZUJyZWFrU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgdmFyIGxhYmVsID0gbnVsbCwga2V5O1xuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ2JyZWFrJyk7XG5cbiAgICAgICAgLy8gQ2F0Y2ggdGhlIHZlcnkgY29tbW9uIGNhc2UgZmlyc3Q6IGltbWVkaWF0ZWx5IGEgc2VtaWNvbG9uIChVKzAwM0IpLlxuICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQobGFzdEluZGV4KSA9PT0gMHgzQikge1xuICAgICAgICAgICAgbGV4KCk7XG5cbiAgICAgICAgICAgIGlmICghKHN0YXRlLmluSXRlcmF0aW9uIHx8IHN0YXRlLmluU3dpdGNoKSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbEJyZWFrKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoQnJlYWtTdGF0ZW1lbnQobnVsbCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzTGluZVRlcm1pbmF0b3IpIHtcbiAgICAgICAgICAgIGlmICghKHN0YXRlLmluSXRlcmF0aW9uIHx8IHN0YXRlLmluU3dpdGNoKSkge1xuICAgICAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuSWxsZWdhbEJyZWFrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikge1xuICAgICAgICAgICAgbGFiZWwgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuXG4gICAgICAgICAgICBrZXkgPSAnJCcgKyBsYWJlbC5uYW1lO1xuICAgICAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc3RhdGUubGFiZWxTZXQsIGtleSkpIHtcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLlVua25vd25MYWJlbCwgbGFiZWwubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25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AgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc0xpbmVUZXJtaW5hdG9yKSB7XG4gICAgICAgICAgICAvLyBIQUNLXG4gICAgICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hSZXR1cm5TdGF0ZW1lbnQobnVsbCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIW1hdGNoKCc7JykpIHtcbiAgICAgICAgICAgIGlmICghbWF0Y2goJ30nKSAmJiBsb29rYWhlYWQudHlwZSAhPT0gVG9rZW4uRU9GKSB7XG4gICAgICAgICAgICAgICAgYXJndW1lbnQgPSBwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hSZXR1cm5TdGF0ZW1lbnQoYXJndW1lbnQpO1xuICAgIH1cblxuICAgIC8vIEVDTUEtMjYyIDEzLjExIFRoZSB3aXRoIHN0YXRlbWVudFxuXG4gICAgZnVuY3Rpb24gcGFyc2VXaXRoU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgdmFyIG9iamVjdCwgYm9keTtcblxuICAgICAgICBpZiAoc3RyaWN0KSB7XG4gICAgICAgICAgICB0b2xlcmF0ZUVycm9yKE1lc3NhZ2VzLlN0cmljdE1vZGVXaXRoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ3dpdGgnKTtcblxuICAgICAgICBleHBlY3QoJygnKTtcblxuICAgICAgICBvYmplY3QgPSBwYXJzZUV4cHJlc3Npb24oKTtcblxuICAgICAgICBleHBlY3QoJyknKTtcblxuICAgICAgICBib2R5ID0gcGFyc2VTdGF0ZW1lbnQoKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hXaXRoU3RhdGVtZW50KG9iamVjdCwgYm9keSk7XG4gICAgfVxuXG4gICAgLy8gRUNNQS0yNjIgMTMuMTIgVGhlIHN3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pO1xuXG4gICAgICAgIGRpc2NyaW1pbmFudCA9IHBhcnNlRXhwcmVzc2lvbigpO1xuXG4gICAgICAgIGV4cGVjdCgnKScpO1xuXG4gICAgICAgIGV4cGVjdCgneycpO1xuXG4gICAgICAgIGNhc2VzID0gW107XG5cbiAgICAgICAgaWYgKG1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoU3dpdGNoU3RhdGVtZW50KGRpc2NyaW1pbmFudCwgY2FzZXMpO1xuICAgICAgICB9XG5cbiAgICAgICAgb2xkSW5Td2l0Y2ggPSBzdGF0ZS5pblN3aXRjaDtcbiAgICAgICAgc3RhdGUuaW5Td2l0Y2ggPSB0cnVlO1xuICAgICAgICBkZWZhdWx0Rm91bmQgPSBmYWxzZTtcblxuICAgICAgICB3aGlsZSAoc3RhcnRJbmRleCA8IGxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKG1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNsYXVzZSA9IHBhcnNlU3dpdGNoQ2FzZSgpO1xuICAgICAgICAgICAgaWYgKGNsYXVzZS50ZXN0ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRlZmF1bHRGb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLk11bHRpcGxlRGVmYXVsdHNJblN3aXRjaCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRlZmF1bHRGb3VuZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlcy5wdXNoKGNsYXVzZSk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZS5pblN3aXRjaCA9IG9sZEluU3dpdGNoO1xuXG4gICAgICAgIGV4cGVjdCgnfScpO1xuXG4gICAgICAgIHJldHVybiBub2RlLm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XG4gICAgICAgICAgICBmaW5hbGl6ZXIgPSBwYXJzZUJsb2NrKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWhhbmRsZXIgJiYgIWZpbmFsaXplcikge1xuICAgICAgICAgICAgdGhyb3dFcnJvcihNZXNzYWdlcy5Ob0NhdGNoT3JGaW5hbGx5KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaFRyeVN0YXRlbWVudChibG9jaywgaGFuZGxlciwgZmluYWxpemVyKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxMy4xNiBUaGUgZGVidWdnZXIgc3RhdGVtZW50XG5cbiAgICBmdW5jdGlvbiBwYXJzZURlYnVnZ2VyU3RhdGVtZW50KG5vZGUpIHtcbiAgICAgICAgZXhwZWN0S2V5d29yZCgnZGVidWdnZXInKTtcblxuICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7XG5cbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoRGVidWdnZXJTdGF0ZW1lbnQoKTtcbiAgICB9XG5cbiAgICAvLyAxMyBTdGF0ZW1lbnRzXG5cbiAgICBmdW5jdGlvbiBwYXJzZVN0YXRlbWVudCgpIHtcbiAgICAgICAgdmFyIHR5cGUgPSBsb29rYWhlYWQudHlwZSxcbiAgICAgICAgICAgIGV4cHIsXG4gICAgICAgICAgICBsYWJlbGVkQm9keSxcbiAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgIG5vZGU7XG5cbiAgICAgICAgaWYgKHR5cGUgPT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4obG9va2FoZWFkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlID09PSBUb2tlbi5QdW5jdHVhdG9yICYmIGxvb2thaGVhZC52YWx1ZSA9PT0gJ3snKSB7XG4gICAgICAgICAgICByZXR1cm4gcGFyc2VCbG9jaygpO1xuICAgICAgICB9XG4gICAgICAgIGlzQXNzaWdubWVudFRhcmdldCA9IGlzQmluZGluZ0VsZW1lbnQgPSB0cnVlO1xuICAgICAgICBub2RlID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uUHVuY3R1YXRvcikge1xuICAgICAgICAgICAgc3dpdGNoIChsb29rYWhlYWQudmFsdWUpIHtcbiAgICAgICAgICAgIGNhc2UgJzsnOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUVtcHR5U3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnKCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRXhwcmVzc2lvblN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gVG9rZW4uS2V5d29yZCkge1xuICAgICAgICAgICAgc3dpdGNoIChsb29rYWhlYWQudmFsdWUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2JyZWFrJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VCcmVha1N0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2NvbnRpbnVlJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VDb250aW51ZVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2RlYnVnZ2VyJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VEZWJ1Z2dlclN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2RvJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VEb1doaWxlU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnZm9yJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VGb3JTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRnVuY3Rpb25EZWNsYXJhdGlvbihub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ2lmJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VJZlN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3JldHVybic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlUmV0dXJuU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgY2FzZSAnc3dpdGNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VTd2l0Y2hTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICd0aHJvdyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVGhyb3dTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICd0cnknOlxuICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVRyeVN0YXRlbWVudChub2RlKTtcbiAgICAgICAgICAgIGNhc2UgJ3Zhcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVmFyaWFibGVTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICd3aGlsZSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlV2hpbGVTdGF0ZW1lbnQobm9kZSk7XG4gICAgICAgICAgICBjYXNlICd3aXRoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VXaXRoU3RhdGVtZW50KG5vZGUpO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGV4cHIgPSBwYXJzZUV4cHJlc3Npb24oKTtcblxuICAgICAgICAvLyBFQ01BLTI2MiAxMi4xMiBMYWJlbGxlZCBTdGF0ZW1lbnRzXG4gIC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KGlzR2VuZXJhdG9yKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghaWRlbnRpZmllcklzT3B0aW9uYWwgfHwgIW1hdGNoKCcoJykpIHtcbiAgICAgICAgICAgIHRva2VuID0gbG9va2FoZWFkO1xuICAgICAgICAgICAgaWQgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuICAgICAgICAgICAgaWYgKHN0cmljdCkge1xuICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RyaWN0RnVuY3Rpb25OYW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdEZ1bmN0aW9uTmFtZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlzU3RyaWN0TW9kZVJlc2VydmVkV29yZCh0b2tlbi52YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkID0gdG9rZW47XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBNZXNzYWdlcy5TdHJpY3RSZXNlcnZlZFdvcmQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9ICFpc0dlbmVyYXRvcjtcbiAgICAgICAgdG1wID0gcGFyc2VQYXJhbXMoZmlyc3RSZXN0cmljdGV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dG1wLFxuICAgICAgICAgICAgcGFyYW1zID0gW10sIGRlZmF1bHRzID0gW10sIGJvZHksIHByZXZpb3VzU3RyaWN0LCBub2RlID0gbmV3IE5vZGUoKSxcbiAgICAgICAgICAgIGlzR2VuZXJhdG9yLCBwcmV2aW91c0FsbG93WWllbGQ7XG5cbiAgICAgICAgcHJldmlvdXNBbGxvd1lpZWxkID0gc3RhdGUuYWxsb3dZaWVsZDtcblxuICAgICAgICBleHBlY3RLZXl3b3JkKCdmdW5jdGlvbicpO1xuXG4gICAgICAgIGlzR2VuZXJhdG9yID0gbWF0Y2goJyonKTtcbiAgICAgICAgaWYgKGlzR2VuZXJhdG9yKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlLmFsbG93WWllbGQgPSAhaXNHZW5lcmF0b3I7XG4gICAgICAgIGlmICghbWF0Y2goJygnKSkge1xuICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICBpZCA9ICghc3RyaWN0ICYmICFpc0dlbmVyYXRvciAmJiBtYXRjaEtleXdvcmQoJ3lpZWxkJykpID8gcGFyc2VOb25Db21wdXRlZFByb3BlcnR5KCkgOiBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpO1xuICAgICAgICAgICAgaWYgKHN0cmljdCkge1xuICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2xlcmF0ZVVuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RyaWN0RnVuY3Rpb25OYW1lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKHRva2VuLnZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2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NzYWdlKTtcbiAgICAgICAgfVxuICAgICAgICBzdHJpY3QgPSBwcmV2aW91c1N0cmljdDtcbiAgICAgICAgc3RhdGUuYWxsb3dZaWVsZCA9IHByZXZpb3VzQWxsb3dZaWVsZDtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hGdW5jdGlvbkV4cHJlc3Npb24oaWQsIHBhcmFtcywgZGVmYXVsdHMsIGJvZHksIGlzR2VuZXJhdG9yKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxNC41IENsYXNzIERlZmluaXRpb25zXG5cbiAgICBmdW5jdGlvbiBwYXJzZUNsYXNzQm9keSgpIHtcbiAgICAgICAgdmFyIGNsYXNzQm9keSwgdG9rZW4sIGlzU3RhdGljLCBoYXNDb25zdHJ1Y3RvciA9IGZhbHNlLCBib2R5LCBtZXRob2QsIGNvbXB1dGVkLCBrZXk7XG5cbiAgICAgICAgY2xhc3NCb2R5ID0gbmV3IE5vZGUoKTtcblxuICAgICAgICBleHBlY3QoJ3snKTtcbiAgICAgICAgYm9keSA9IFtdO1xuICAgICAgICB3aGlsZSAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgIGlmIChtYXRjaCgnOycpKSB7XG4gICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG1ldGhvZCA9IG5ldyBOb2RlKCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICAgICAgaXNTdGF0aWMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBjb21wdXRlZCA9IG1hdGNoKCdbJyk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcqJykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV4KCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtleSgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5Lm5hbWUgPT09ICdzdGF0aWMnICYmIChsb29rYWhlYWRQcm9wZXJ0eU5hbWUoKSB8fCBtYXRjaCgnKicpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpc1N0YXRpYyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlZCA9IG1hdGNoKCdbJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3BlcnR5S2V5KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbWV0aG9kID0gdHJ5UGFyc2VNZXRob2REZWZpbml0aW9uKHRva2VuLCBrZXksIGNvbXB1dGVkLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIGlmIChtZXRob2QpIHtcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kWydzdGF0aWMnXSA9IGlzU3RhdGljOyAvLyBqc2NzOmlnbm9yZSByZXF1aXJlRG90Tm90YXRpb25cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1ldGhvZC5raW5kID09PSAnaW5pdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZC5raW5kID0gJ21ldGhvZCc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc1N0YXRpYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFtZXRob2QuY29tcHV0ZWQgJiYgKG1ldGhvZC5rZXkubmFtZSB8fCBtZXRob2Qua2V5LnZhbHVlLnRvU3RyaW5nKCkpID09PSAnY29uc3RydWN0b3InKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1ldGhvZC5raW5kICE9PSAnbWV0aG9kJyB8fCAhbWV0aG9kLm1ldGhvZCB8fCBtZXRob2QudmFsdWUuZ2VuZXJhdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKHRva2VuLCBNZXNzYWdlcy5Db25zdHJ1Y3RvclNwZWNpYWxNZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzQ29uc3RydWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkVG9rZW4odG9rZW4sIE1lc3NhZ2VzLkR1cGxpY2F0ZUNvbnN0cnVjdG9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYXNDb25zdHJ1Y3RvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZC5raW5kID0gJ2NvbnN0cnVjdG9yJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghbWV0aG9kLmNvbXB1dGVkICYmIChtZXRob2Qua2V5Lm5hbWUgfHwgbWV0aG9kLmtleS52YWx1ZS50b1N0cmluZygpKSA9PT0gJ3Byb3RvdHlwZScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWRUb2tlbih0b2tlbiwgTWVzc2FnZXMuU3RhdGljUHJvdG90eXBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXRob2QudHlwZSA9IFN5bnRheC5NZXRob2REZWZpbml0aW9uO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgbWV0aG9kLm1ldGhvZDtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG1ldGhvZC5zaG9ydGhhbmQ7XG4gICAgICAgICAgICAgICAgICAgIGJvZHkucHVzaChtZXRob2QpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxleCgpO1xuICAgICAgICByZXR1cm4gY2xhc3NCb2R5LmZpbmlzaENsYXNzQm9keShib2R5KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUNsYXNzRGVjbGFyYXRpb24oaWRlbnRpZmllcklzT3B0aW9uYWwpIHtcbiAgICAgICAgdmFyIGlkID0gbnVsbCwgc3VwZXJDbGFzcyA9IG51bGwsIGNsYXNzTm9kZSA9IG5ldyBOb2RlKCksIGNsYXNzQm9keSwgcHJldmlvdXNTdHJpY3QgPSBzdHJpY3Q7XG4gICAgICAgIHN0cmljdCA9IHRydWU7XG5cbiAgICAgICAgZXhwZWN0S2V5d29yZCgnY2xhc3MnKTtcblxuICAgICAgICBpZiAoIWlkZW50aWZpZXJJc09wdGlvbmFsIHx8IGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICBpZCA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdleHRlbmRzJykpIHtcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgc3VwZXJDb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HkoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hFeHBvcnRTcGVjaWZpZXIobG9jYWwsIGV4cG9ydGVkKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBwYXJzZUV4cG9ydE5hbWVkRGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgICB2YXIgZGVjbGFyYXRpb24gPSBudWxsLFxuICAgICAgICAgICAgaXNFeHBvcnRGcm9tSWRlbnRpZmllcixcbiAgICAgICAgICAgIHNyYyA9IG51bGwsIHNwZWNpZmllcnMgPSBbXTtcblxuICAgICAgICAvLyBub24tZGVmYXVsdCBleHBvcnRcbiAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5LZXl3b3JkKSB7XG4gICAgICAgICAgICAvLyBjb3ZlcnM6XG4gICAgICAgICAgICAvLyBleHBvcnQgdmFyIGYgPSAxO1xuICAgICAgICAgICAgc3dpdGNoIChsb29rYWhlYWQudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdsZXQnOlxuICAgICAgICAgICAgICAgIGNhc2UgJ2NvbnN0JzpcbiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb24gPSBwYXJzZUxleGljYWxEZWNsYXJhdGlvbih7aW5Gb3I6IGZhbHNlfSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaEV4cG9ydE5hbWVkRGVjbGFyYXRpb24oZGVjbGFyYXRpb24sIHNwZWNpZmllcnMsIG51bGwpO1xuICAgICAgICAgICAgICAgIGNhc2UgJ3Zhcic6XG4gICAgICAgICAgICAgICAgY2FzZSAnY2xhc3MnOlxuICAgICAgICAgICAgICAgIGNhc2UgJ2Z1bmN0aW9uJzpcbiAgICAgICAgICAgICAgICAgICAgZGVjbGFyYXRpb24gPSBwYXJzZVN0YXRlbWVudExpc3RJdGVtKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlLmZpbmlzaEV4cG9ydE5hbWVkRGVjbGFyYXRpb24oZGVjbGFyYXRpb24sIHNwZWNpZmllcnMsIG51bGwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZXhwZWN0KCd7Jyk7XG4gICAgICAgIHdoaWxlICghbWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgaXNFeHBvcnRGcm9tSWRlbnRpZmllciA9IGlzRXhwb3J0RnJvbUlkZW50aWZpZXIgfHwgbWF0Y2hLZXl3b3JkKCdkZWZhdWx0Jyk7XG4gICAgICAgICAgICBzcGVjaWZpZXJzLnB1c2gocGFyc2VFeHBvcnRTcGVjaWZpZXIoKSk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZXhwZWN0KCd9Jyk7XG5cbiAgICAgICAgaWYgKG1hdGNoQ29udGV4dHVhbEtleXdvcmQoJ2Zyb20nKSkge1xuICAgICAgICAgICAgLy8gY292ZXJpbmc6XG4gICAgICAgICAgICAvLyBleHBvcnQge2RlZmF1bHR9IGZyb20gJ2Zvbyc7XG4gICAgICAgICAgICAvLyBleHBvcnQge2Zvb30gZnJvbSAnZm9vJztcbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgc3JjID0gcGFyc2VNb2R1bGVTcGVjaWZpZXIoKTtcbiAgICAgICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcbiAgICAgICAgfSBlbHNlIGlmIChpc0V4cG9ydEZyb21JZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAvLyBjb3ZlcmluZzpcbiAgICAgICAgICAgIC8vIGV4cG9ydCB7ZGVmYXVsdH07IC8vIG1pc3NpbmcgZnJvbUNsYXVzZVxuICA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pb24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2NsYXNzJykpIHtcbiAgICAgICAgICAgIGRlY2xhcmF0aW9uID0gcGFyc2VDbGFzc0RlY2xhcmF0aW9uKHRydWUpO1xuICAgICAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoRXhwb3J0RGVmYXVsdERlY2xhcmF0aW9uKGRlY2xhcmF0aW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdmcm9tJykpIHtcbiAgICAgICAgICAgIHRocm93RXJyb3IoTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCBsb29rYWhlYWQudmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gY292ZXJzOlxuICAgICAgICAvLyBleHBvcnQgZGVmYXVsdCB7fTtcbiAgICAgICAgLy8gZXhwb3J0IGRlZmF1bHQgW107XG4gICAgICAgIC8vIGV4cG9ydCBkZWZhdWx0ICgxICsgMik7XG4gICAgICAgIGlmIChtYXRjaCgneycpKSB7XG4gICAgICAgICAgICBleHByZXNzaW9uID0gcGFyc2VPYmplY3RJbml0aWFsaXplcigpO1xuICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCdbJykpIHtcbiAgICAgICAgICAgIGV4cHJlc3Npb24gPSBwYXJzZUFycmF5SW5pdGlhbGl6ZXIoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGV4cHJlc3Npb24gPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3VtZVNlbWljb2xvbigpO1xuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24oZXhwcmVzc2lvbik7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VFeHBvcnRBbGxEZWNsYXJhdGlvbihub2RlKSB7XG4gICAgICAgIHZhciBzcmM7XG5cbiAgICAgICAgLy8gY292ZXJzOlxuICAgICAgICAvLyBleHBvcnQgKiBmcm9tICdmb28nO1xuICAgICAgICBleHBlY3QoJyonKTtcbiAgICAgICAgaWYgKCFtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdmcm9tJykpIHtcbiAgICAgICAgICAgIHRocm93RXJyb3IobG9va2FoZWFkLnZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuIDogTWVzc2FnZXMuTWlzc2luZ0Zyb21DbGF1c2UsIGxvb2thaGVhZC52YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgbGV4KCk7XG4gICAgICAgIHNyYyA9IHBhcnNlTW9kdWxlU3BlY2lmaWVyKCk7XG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcblxuICAgICAgICByZXR1cm4gbm9kZS5maW5pc2hFeHBvcnRBbGxEZWNsYXJhdGlvbihzcmMpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlRXhwb3J0RGVjbGFyYXRpb24oKSB7XG4gICAgICAgIHZhciBub2RlID0gbmV3IE5vZGUoKTtcbiAgICAgICAgaWYgKHN0YXRlLmluRnVuY3Rpb25Cb2R5KSB7XG4gICAgICAgICAgICB0aHJvd0Vycm9yKE1lc3NhZ2VzLklsbGVnYWxFeHBvcnREZWNsYXJhdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICBleHBlY3RLZXl3b3JkKCdleHBvcnQnKTtcblxuICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdkZWZhdWx0JykpIHtcbiAgICAgICAgICAgIHJldHVybiBwYXJzZUV4cG9ydERlZmF1bHREZWNsYXJhdGlvbihub2RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWF0Y2goJyonKSkge1xuICAgICAgICAgICAgcmV0dXJuIHBhcnNlRXhwb3J0QWxsRGVjbGFyYXRpb24obm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHBhcnNlRXhwb3J0TmFtZWREZWNsYXJhdGlvbihub2RlKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxNS4yLjIgSW1wb3J0c1xuXG4gICAgZnVuY3Rpb24gcGFyc2VJbXBvcnRTcGVjaWZpZXIoKSB7XG4gICAgICAgIC8vIGltcG9ydCB7PGZvbyBhcyBiYXI+fSAuLi47XG4gICAgICAgIHZhciBsb2NhbCwgaW1wb3J0ZWQsIG5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGltcG9ydGVkID0gcGFyc2VOb25Db21wdXRlZFByb3BlcnR5KCk7XG4gICAgICAgIGlmIChtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdhcycpKSB7XG4gICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgIGxvY2FsID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBub2RlLmZpbmlzaEltcG9ydFNwZWNpZmllcihsb2NhbCwgaW1wb3J0ZWQpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlTmFtZWRJbXBvcnRzKCkge1xuICAgICAgICB2YXIgc3BlY2lmaWVycyA9IFtdO1xuICAgICAgICAvLyB7Zm9vLCBiYXIgYXMgYmFzfVxuICAgICAgICBleHBlY3QoJ3snKTtcbiAgICAgICAgd2hpbGUgKCFtYXRjaCgnfScpKSB7XG4gICAgICAgICAgICBzcGVjaWZpZXJzLnB1c2gocGFyc2VJbXBvcnRTcGVjaWZpZXIoKSk7XG4gICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykpIHtcbiAgICAgICAgICAgICAgICBleHBlY3QoJywnKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJ30nKSkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZ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RXJyb3IoTWVzc2FnZXMuSWxsZWdhbEltcG9ydERlY2xhcmF0aW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGV4cGVjdEtleXdvcmQoJ2ltcG9ydCcpO1xuXG4gICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uU3RyaW5nTGl0ZXJhbCkge1xuICAgICAgICAgICAgLy8gaW1wb3J0ICdmb28nO1xuICAgICAgICAgICAgc3JjID0gcGFyc2VNb2R1bGVTcGVjaWZpZXIoKTtcbiAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgaWYgKG1hdGNoKCd7JykpIHtcbiAgICAgICAgICAgICAgICAvLyBpbXBvcnQge2Jhcn1cbiAgICAgICAgICAgICAgICBzcGVjaWZpZXJzID0gc3BlY2lmaWVycy5jb25jYXQocGFyc2VOYW1lZEltcG9ydHMoKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hdGNoKCcqJykpIHtcbiAgICAgICAgICAgICAgICAvLyBpbXBvcnQgKiBhcyBmb29cbiAgICAgICAgICAgICAgICBzcGVjaWZpZXJzLnB1c2gocGFyc2VJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXIoKSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSWRlbnRpZmllck5hbWUobG9va2FoZWFkKSAmJiAhbWF0Y2hLZXl3b3JkKCdkZWZhdWx0JykpIHtcbiAgICAgICAgICAgICAgICAvLyBpbXBvcnQgZm9vXG4gICAgICAgICAgICAgICAgc3BlY2lmaWVycy5wdXNoKHBhcnNlSW1wb3J0RGVmYXVsdFNwZWNpZmllcigpKTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2goJywnKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoKCcqJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGltcG9ydCBmb28sICogYXMgZm9vXG4gICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpZXJzLnB1c2gocGFyc2VJbXBvcnROYW1lc3BhY2VTcGVjaWZpZXIoKSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJ3snKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW1wb3J0IGZvbywge2Jhcn1cbiAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllcnMgPSBzcGVjaWZpZXJzLmNvbmNhdChwYXJzZU5hbWVkSW1wb3J0cygpKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZFRva2VuKGxleCgpKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFtYXRjaENvbnRleHR1YWxLZXl3b3JkKCdmcm9tJykpIHtcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKGxvb2thaGVhZC52YWx1ZSA/XG4gICAgICAgICAgICAgICAgICAgICAgICBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4gOiBNZXNzYWdlcy5NaXNzaW5nRnJvbUNsYXVzZSwgbG9va2FoZWFkLnZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgc3JjID0gcGFyc2VNb2R1bGVTcGVjaWZpZXIoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN1bWVTZW1pY29sb24oKTtcbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoSW1wb3J0RGVjbGFyYXRpb24oc3BlY2lmaWVycywgc3JjKTtcbiAgICB9XG5cbiAgICAvLyBFQ01BLTI2MiAxNS4xIFNjcmlwdHNc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ICAgIGlmICghZmlyc3RSZXN0cmljdGVkICYmIHRva2VuLm9jdGFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZCA9IHRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlIChzdGFydEluZGV4IDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBzdGF0ZW1lbnQgPSBwYXJzZVN0YXRlbWVudExpc3RJdGVtKCk7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygc3RhdGVtZW50ID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYm9keS5wdXNoKHN0YXRlbWVudCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGJvZHk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcGFyc2VQcm9ncmFtKCkge1xuICAgICAgICB2YXIgYm9keSwgbm9kZTtcblxuICAgICAgICBwZWVrKCk7XG4gICAgICAgIG5vZGUgPSBuZXcgTm9kZSgpO1xuXG4gICAgICAgIGJvZHkgPSBwYXJzZVNjcmlwdEJvZHkoKTtcbiAgICAgICAgcmV0dXJuIG5vZGUuZmluaXNoUHJvZ3JhbShib2R5LCBzdGF0ZS5zb3VyY2VUeXBlKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBmaWx0ZXJUb2tlbkxvY2F0aW9uKCkge1xuICAgICAgICB2YXIgaSwgZW50cnksIHRva2VuLCB0b2tlbnMgPSBbXTtcblxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZXh0cmEudG9rZW5zLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBlbnRyeSA9IGV4dHJhLnRva2Vuc1tpXTtcbiAgICAgICAgICAgIHRva2VuID0ge1xuICAgICAgICAgICAgICAgIHR5cGU6IGVudHJ5LnR5cGUsXG4gICAgICAgICAgICAgICAgdmFsdWU6IGVudHJ5LnZhbHVlXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaWYgKGVudHJ5LnJlZ2V4KSB7XG4gICAgICAgICAgICAgICAgdG9rZW4ucmVnZXggPSB7XG4gICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IGVudHJ5LnJlZ2V4LnBhdHRlcm4sXG4gICAgICAgICAgICAgICAgICAgIGZsYWdzOiBlbnRyeS5yZWdleC5mbGFnc1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHtcbiAgICAgICAgICAgICAgICB0b2tlbi5yYW5nZSA9IGVudHJ5LnJhbmdlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGV4dHJhLmxvYykge1xuICAgICAgICAgICAgICAgIHRva2VuLmxvYyA9IGVudHJ5LmxvYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGV4dHJhLnRva2VucyA9IHRva2VucztcbiAgICB9XG5cbiAgICBmdW5jdGlvbiB0b2tlbml6ZShjb2RlLCBvcHRpb25zLCBkZWxlZ2F0ZSkge1xuICAgICAgICB2YXIgdG9TdHJpbmcsXG4gICAgICAgICAgICB0b2tlbnM7XG5cbiAgICAgICAgdG9TdHJpbmcgPSBTdHJpbmc7XG4gICAgICAgIGlmICh0eXBlb2YgY29kZSAhPT0gJ3N0cmluZycgJiYgIShjb2RlIGluc3RhbmNlb2YgU3RyaW5nKSkge1xuICAgICAgICAgICAgY29kZSA9IHRvU3RyaW5nKGNvZGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgc291cmNlID0gY29kZTtcbiAgICAgICAgaW5kZXggPSAwO1xuICAgICAgICBsaW5lTnVtYmVyID0gKHNvdXJjZS5sZW5ndGggPiAwKSA/IDEgOiAwO1xuICAgICAgICBsaW5lU3RhcnQgPSAwO1xuICAgICAgICBzdGFydEluZGV4ID0gaW5kZXg7XG4gICAgICAgIHN0YXJ0TGluZU51bWJlciA9IGxpbmVOdW1iZXI7XG4gICAgICAgIHN0YXJ0TGluZVN0YXJ0ID0gbGluZVN0YXJ0O1xuICAgICAgICBsZW5ndGggPSBzb3VyY2UubGVuZ3RoO1xuICAgICAgICBsb29rYWhlYWQgPSBudWxsO1xuICAgICAgICBzdGF0ZSA9IHtcbiAgICAgICAgICAgIGFsbG93SW46IHRydWUsXG4gICAgICAgICAgICBhbGxvd1lpZWxkOiB0cnVlLFxuICAgICAgICAgICAgbGFiZWxTZXQ6IHt9LFxuICAgICAgICAgICAgaW5GdW5jdGlvbkJvZHk6IGZhbHNlLFxuICAgICAgICAgICAgaW5JdGVyYXRpb246IGZhbHNlLFxuICAgICAgICAgICAgaW5Td2l0Y2g6IGZhbHNlLFxuICAgICAgICAgICAgbGFzdENvbW1lbnRTdGFydDogLTEsXG4gICAgICAgICAgICBjdXJseVN0YWNrOiBbXVxuICAgICAgICB9O1xuXG4gICAgICAgIGV4dHJhID0ge307XG5cbiAgICAgICAgLy8gT3B0aW9ucyBtYXRjaGluZy5cbiAgICAgICAgb3B0aW9ucyA9IG9wdGlvbnMgfHwge307XG5cbiAgICAgICAgLy8gT2YgY291cnNlIHdlIGNvbGxlY3QgdG9rZW5zIGhlcmUuXG4gICAgICAgIG9wdGlvbnMudG9rZW5zID0gdHJ1ZTtcbiAgICAgICAgZXh0cmEudG9rZW5zID0gW107XG4gICAgICAgIGV4dHJhLnRva2VuVmFsdWVzID0gW107XG4gICAgICAgIGV4dHJhLnRva2VuaXplID0gdHJ1ZTtcbiAgICAgICAgZXh0cmEuZGVsZWdhdGUgPSBkZWxlZ2F0ZTtcblxuICAgICAgICAvLyBUaGUgZm9sbG93aW5nIHR3byBmaWVsZHMgYXJlIG5lY2Vzc2FyeSB0byBjb21wdXRlIHRoZSBSZWdleCB0b2tlbnMuXG4gICAgICAgIGV4dHJhLm9wZW5QYXJlblRva2VuID0gLTE7XG4gICAgICAgIGV4dHJhLm9wZW5DdXJseVRva2VuID0gLTE7XG5cbiAgICAgICAgZXh0cmEucmFuZ2UgPSAodHlwZW9mIG9wdGlvbnMucmFuZ2UgPT09ICdib29sZWFuJykgJiYgb3B0aW9ucy5yYW5nZTtcbiAgICAgICAgZXh0cmEubG9jID0gKHR5cGVvZiBvcHRpb25zLmxvYyA9PT0gJ2Jvb2xlYW4nKSAmJiBvcHRpb25zLmxvYztcblxuICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuY29tbWVudCA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMuY29tbWVudCkge1xuICAgICAgICAgICAgZXh0cmEuY29tbWVudHMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMudG9sZXJhbnQgPT09ICdib29sZWFuJyAmJiBvcHRpb25zLnRvbGVyYW50KSB7XG4gICAgICAgICAgICBleHRyYS5lcnJvcnMgPSBbXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBwZWVrKCk7XG4gICAgICAgICAgICBpZiAobG9va2FoZWFkLnR5cGUgPT09IFRva2VuLkVPRikge1xuICAgICAgICAgICAgICAgIHJldHVybiBleHRyYS50b2tlbnM7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxleCgpO1xuICAgICAgICAgICAgd2hpbGUgKGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5FT0YpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBsZXgoKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChsZXhFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXh0cmEuZXJyb3JzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZWNvcmRFcnJvcihsZXhFcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSBoYXZlIHRvIGJyZWFrIG9uIHRoZSBmaXJzdCBlcnJvclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gYXZvaWQgaW5maW5pdGUgbG9vcHMuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IGxleEVycm9yO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0b2tlbnMgPSBleHRyYS50b2tlbnM7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLmVycm9ycyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICB0b2tlbnMuZXJyb3JzID0gZXh0cmEuZXJyb3JzO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgZXh0cmEgPSB7fTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdG9rZW5zO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHBhcnNlKGNvZGUsIG9wdGlvbnMpIHtcbiAgICAgICAgdmFyIHByb2dyYW0sIHRvU3RyaW5nO1xuXG4gICAgICAgIHRvU3RyaW5nID0gU3RyaW5nO1xuICAgICAgICBpZiAodHlwZW9mIGNvZGUgIT09ICdzdHJpbmcnICYmICEoY29kZSBpbnN0YW5jZW9mIFN0cmluZykpIHtcbiAgICAgICAgICAgIGNvZGUgPSB0b1N0cmluZyhjb2RlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHNvdXJjZSA9IGNvZGU7XG4gICAgICAgIGluZGV4ID0gMDtcbiAgICAgICAgbGluZU51bWJlciA9IChzb3VyY2UubGVuZ3RoID4gMCkgPyAxIDogM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BvcHRpb25zLmF0dGFjaENvbW1lbnQ7XG5cbiAgICAgICAgICAgIGlmIChleHRyYS5sb2MgJiYgb3B0aW9ucy5zb3VyY2UgIT09IG51bGwgJiYgb3B0aW9ucy5zb3VyY2UgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGV4dHJhLnNvdXJjZSA9IHRvU3RyaW5nKG9wdGlvbnMuc291cmNlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnRva2VucyA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMudG9rZW5zKSB7XG4gICAgICAgICAgICAgICAgZXh0cmEudG9rZW5zID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuY29tbWVudCA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMuY29tbWVudCkge1xuICAgICAgICAgICAgICAgIGV4dHJhLmNvbW1lbnRzID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMudG9sZXJhbnQgPT09ICdib29sZWFuJyAmJiBvcHRpb25zLnRvbGVyYW50KSB7XG4gICAgICAgICAgICAgICAgZXh0cmEuZXJyb3JzID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXh0cmEuYXR0YWNoQ29tbWVudCkge1xuICAgICAgICAgICAgICAgIGV4dHJhLnJhbmdlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBleHRyYS5jb21tZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIGV4dHJhLmJvdHRvbVJpZ2h0U3RhY2sgPSBbXTtcbiAgICAgICAgICAgICAgICBleHRyYS50cmFpbGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICAgICAgZXh0cmEubGVhZGluZ0NvbW1lbnRzID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob3B0aW9ucy5zb3VyY2VUeXBlID09PSAnbW9kdWxlJykge1xuICAgICAgICAgICAgICAgIC8vIHZlcnkgcmVzdHJpY3RpdmUgY29uZGl0aW9uIGZvciBub3dcbiAgICAgICAgICAgICAgICBzdGF0ZS5zb3VyY2VUeXBlID0gb3B0aW9ucy5zb3VyY2VUeXBlO1xuICAgICAgICAgICAgICAgIHN0cmljdCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcHJvZ3JhbSA9IHBhcnNlUHJvZ3JhbSgpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBleHRyYS5jb21tZW50cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICBwcm9ncmFtLmNvbW1lbnRzID0gZXh0cmEuY29tbWVudHM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLnRva2VucyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICBmaWx0ZXJUb2tlbkxvY2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgcHJvZ3JhbS50b2tlbnMgPSBleHRyYS50b2tlbnM7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLmVycm9ycyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICBwcm9ncmFtLmVycm9ycyA9IGV4dHJhLmVycm9ycztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIGV4dHJhID0ge307XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcHJvZ3JhbTtcbiAgICB9XG5cbiAgICAvLyBTeW5jIHdpdGggKi5qc29uIG1hbmlmZXN0cy5cbiAgICBleHBvcnRzLnZlcnNpb24gPSAnMi43LjEnO1xuXG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vcGVydHkoc3BlY1Byb3ApICYmIHJlcy5wdXNoKHNwZWNQcm9wKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiByZXM7XG59XG5cbmZ1bmN0aW9uIG92ZXJyaWRlKGJhc2UsIHJlcywgYWRkKSB7XG4gICAgdmFyIGFkZExpc3QgPSBnZXRQcm9wTGlzdChhZGQpLFxuICAgICAgICBqID0gMCwgbGVuID0gYWRkTGlzdC5sZW5ndGgsXG4gICAgICAgIG5hbWUsIHByb3A7XG4gICAgd2hpbGUoaiA8IGxlbikge1xuICAgICAgICBpZigobmFtZSA9IGFkZExpc3RbaisrXSkgPT09ICdfX3NlbGYnKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgICBwcm9wID0gYWRkW25hbWVdO1xuICAgICAgICBpZihpc0Z1bmN0aW9uKHByb3ApICYmXG4gICAgICAgICAgICAgICAgKCFoYXNJbnRyb3NwZWN0aW9uIHx8IHByb3AudG9TdHJpbmcoKS5pbmRleE9mKCcuX19iYXNlJykgPiAtMSkpIHtcbiAgICAgICAgICAgIHJlc1tuYW1lXSA9IChmdW5jdGlvbihuYW1lLCBwcm9wKSB7XG4gICAgICAgICAgICAgICAgdmFyIGJhc2VNZXRob2QgPSBiYXNlW25hbWVdP1xuICAgICAgICAgICAgICAgICAgICAgICAgYmFzZVtuYW1lXSA6XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID09PSAnX19jb25zdHJ1Y3Rvcic/IC8vIGNhc2Ugb2YgaW5oZXJpdGFuY2UgZnJvbSBwbGFuZSBmdW5jdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5fX3NlbGYuX19wYXJlbnQgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vT3A7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYmFzZVNhdmVkID0gdGhpcy5fX2Jhc2U7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX19iYXNlID0gYmFzZU1ldGhvZDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IHByb3AuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fX2Jhc2UgPSBiYXNlU2F2ZWQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pKG5hbWUsIHByb3ApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzW25hbWVdID0gcHJvcDtcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZnVuY3Rpb24gYXBwbHlNaXhpbnMobWl4aW5zLCByZXMpIHtcbiAgICB2YXIgaSA9IDEsIG1peGluO1xuICAgIHdoaWxlKG1peGluID0gbWl4aW5zW2krK10pIHtcbiAgICAgICAgcmVzP1xuICAgICAgICAgICAgaXNGdW5jdGlvbihtaXhpbik/XG4gICAgICAgICAgICAgICAgaW5oZXJpdC5zZWxmKHJlcywgbWl4aW4ucHJvdG90eXBlLCBtaXhpbikgOlxuICAgICAgICAgICAgICAgIGluaGVyaXQuc2VsZihyZXMsIG1peGluKSA6XG4gICAgICAgICAgICByZXMgPSBpc0Z1bmN0aW9uKG1peGluKT9cbiAgICAgICAgICAgICAgICBpbmhlcml0KG1peGluc1swXSwgbWl4aW4ucHJvdG90eXBlLCBtaXhpbikgOlxuICAgICAgICAgICAgICAgIGluaGVyaXQobWl4aW5zWzBdLCBtaXhpbik7XG4gICAgfVxuICAgIHJldHVybiByZXMgfHwgbWl4aW5zWzBdO1xufVxuXG4vKipcbiogQ3JlYXRlcyBjbGFzc1xuKiBAZXhwb3J0c1xuKiBAcGFyYW0ge0Z1bmN0aW9ufEFycmF5fSBbYmFzZUNsYXNzfGJhc2VDbGFzc0FuZE1peGluc10gY2xhc3MgKG9yIGNsYXNzIGFuZCBtaXhpbnMp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5zIGEgc2luZ2xlIGZ1bmN0aW9uIGluIHRoZSBhc3luYyBxdWV1ZVxuICAgIGZ1bmN0aW9uIHJ1blNpbmdsZSh0YXNrLCBkb21haW4pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRhc2soKTtcblxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBpZiAoaXNOb2RlSlMpIHtcbiAgICAgICAgICAgICAgICAvLyBJbiBub2RlLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBjb25zaWRlcmVkIGZhdGFsIGVycm9ycy5cbiAgICAgICAgICAgICAgICAvLyBSZS10aHJvdyB0aGVtIHN5bmNocm9ub3VzbHkgdG8gaW50ZXJydXB0IGZsdXNoaW5nIVxuXG4gICAgICAgICAgICAgICAgLy8gRW5zdXJlIGNvbnRpbnVhdGlvbiBpZiB0aGUgdW5jYXVnaHQgZXhjZXB0aW9uIGlzIHN1cHByZXNzZWRcbiAgICAgICAgICAgICAgICAvLyBsaXN0ZW5pbmcgXCJ1bmNhdWdodEV4Y2VwdGlvblwiIGV2ZW50cyAoYXMgZG9tYWlucyBkb2VzKS5cbiAgICAgICAgICAgICAgICAvLyBDb250aW51ZSBpbiBuZXh0IGV2ZW50IHRvIGF2b2lkIHRpY2sgcmVjdXJzaW9uLlxuICAgICAgICAgICAgICAgIGlmIChkb21haW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmbHVzaCwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4uZW50ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aHJvdyBlO1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEluIGJyb3dzZXJzLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBub3QgZmF0YWwuXG4gICAgICAgICAgICAgICAgLy8gUmUtdGhyb3cgdGhlbSBhc3luY2hyb25vdXNseSB0byBhdm9pZCBzbG93LWRvd25zLlxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5leHRUaWNrID0gZnVuY3Rpb24gKHRhc2spIHtcbiAgICAgICAgdGFpbCA9IHRhaWwubmV4dCA9IHtcbiAgICAgICAgICAgIHRhc2s6IHRhc2ssXG4gICAgICAgICAgICBkb21haW46IGlzTm9kZUpTICYmIHByb2Nlc3MuZG9tYWluLFxuICAgICAgICAgICAgbmV4dDogbnVsbFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICghZmx1c2hpbmcpIHtcbiAgICAgICAgICAgIGZsdXNoaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHJlcXVlc3RUaWNrKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgaWYgKHR5cGVvZiBwcm9jZXNzID09PSBcIm9iamVjdFwiICYmXG4gICAgICAgIHByb2Nlc3MudG9TdHJpbmcoKSA9PT0gXCJbb2JqZWN0IHByb2Nlc3NdXCIgJiYgcHJvY2Vzcy5uZXh0VGljaykge1xuICAgICAgICAvLyBFbnN1cmUgUSBpcyBpbiBhIHJlYWwgTm9kZSBlbnZpcm9ubWVudCwgd2l0aCBhIGBwcm9jZXNzLm5leHRUaWNrYC5cbiAgICAgICAgLy8gVG8gc2VlIHRocm91Z2ggZmFrZSBOb2RlIGVudmlyb25tZW50czpcbiAgICAgICAgLy8gKiBNb2NoYSB0ZXN0IHJ1bm5lciAtIGV4cG9z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xlbmd0aCA9IHRoaXMubGVuZ3RoO1xuICAgICAgICAvLyBjb25jZXJuaW5nIHRoZSBpbml0aWFsIHZhbHVlLCBpZiBvbmUgaXMgbm90IHByb3ZpZGVkXG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAvLyBzZWVrIHRvIHRoZSBmaXJzdCB2YWx1ZSBpbiB0aGUgYXJyYXksIGFjY291bnRpbmdcbiAgICAgICAgICAgIC8vIGZvciB0aGUgcG9zc2liaWxpdHkgdGhhdCBpcyBpcyBhIHNwYXJzZSBhcnJheVxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCBpbiB0aGlzKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2lzID0gdGhpc1tpbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgrK2luZGV4ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoMSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gcmVkdWNlXG4gICAgICAgIGZvciAoOyBpbmRleCA8IGxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICAgICAgLy8gYWNjb3VudCBmb3IgdGhlIHBvc3NpYmlsaXR5IHRoYXQgdGhlIGFycmF5IGlzIHNwYXJzZVxuICAgICAgICAgICAgaWYgKGluZGV4IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICBiYXNpcyA9IGNhbGxiYWNrKGJhc2lzLCB0aGlzW2luZGV4XSwgaW5kZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBiYXNpcztcbiAgICB9XG4pO1xuXG52YXIgYXJyYXlfaW5kZXhPZiA9IHVuY3VycnlUa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tcbiAgICAgICAgdmFyIHJlc3VsdDtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGlmIChkZXNjcmlwdG9yW29wXSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGRlc2NyaXB0b3Jbb3BdLmFwcGx5KHByb21pc2UsIGFyZ3MpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBmYWxsYmFjay5jYWxsKHByb21pc2UsIG9wLCBhcmdzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICByZXN1bHQgPSByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHByb21pc2UuaW5zcGVjdCA9IGluc3BlY3Q7XG5cbiAgICAvLyBYWFggZGVwcmVjYXRlZCBgdmFsdWVPZmAgYW5kIGBleGNlcHRpb25gIHN1cHBvcnRcbiAgICBpZiAoaW5zcGVjdCkge1xuICAgICAgICB2YXIgaW5zcGVjdGVkID0gaW5zcGVjdCgpO1xuICAgICAgICBpZiAoaW5zcGVjdGVkLnN0YXRlID09PSBcInJlamVjdGVkXCIpIHtcbiAgICAgICAgICAgIHByb21pc2UuZXhjZXB0aW9uID0gaW5zcGVjdGVkLnJlYXNvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHByb21pc2UudmFsdWVPZiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBpbnNwZWN0ZWQgPSBpbnNwZWN0KCk7XG4gICAgICAgICAgICBpZiAoaW5zcGVjdGVkLnN0YXRlID09PSBcInBlbmRpbmdcIiB8fFxuICAgICAgICAgICAgICAgIGluc3BlY3RlZC5zdGF0ZSA9PT0gXCJyZWplY3RlZFwiKSB7XG4gICAgICAgICAg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ICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZWplY3RlZChleGNlcHRpb24pO1xuICAgICAgICAgICAgfSBjYXRjaCAobmV3RXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChuZXdFeGNlcHRpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBfcHJvZ3Jlc3NlZCh2YWx1ZSkge1xuICAgICAgICByZXR1cm4gdHlwZW9mIHByb2dyZXNzZWQgPT09IFwiZnVuY3Rpb25cIiA/IHByb2dyZXNzZWQodmFsdWUpIDogdmFsdWU7XG4gICAgfVxuXG4gICAgUS5uZXh0VGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfZnVsZmlsbGVkKHZhbHVlKSk7XG4gICAgICAgIH0sIFwid2hlblwiLCBbZnVuY3Rpb24gKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfcmVqZWN0ZWQoZXhjZXB0aW9uKSk7XG4gICAgICAgIH1dKTtcbiAgICB9KTtcblxuICAgIC8vIFByb2dyZXNzIHByb3BhZ2F0b3IgbmVlZCB0byBiZSBhdHRhY2hlZCBpbiB0aGUgY3VycmVudCB0aWNrLlxuICAgIHNlbGYucHJvb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UgaXQgcG9zc2libGUgdG8gdXNlIGdlbmVyYXRvcnMgaW4gZGVwbG95ZWQgYnJvd3NlcnMsIHNvXG4gICAgICAgICAgICAvLyB3ZSBhbHNvIHN1cHBvcnQgUHl0aG9uLXN0eWxlIGdlbmVyYXRvcnMuICBBdCBzb21lIHBvaW50IHdlIGNhbiByZW1vdmVcbiAgICAgICAgICAgIC8vIHRoaXMgYmxvY2suXG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgU3RvcEl0ZXJhdGlvbiA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgIC8vIEVTNiBHZW5lcmF0b3JzXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZ2VuZXJhdG9yW3ZlcmJdKGFyZyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5kb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBRKHJlc3VsdC52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4ocmVzdWx0LnZhbHVlLCBjYWxsYmFjaywgZXJyYmFjayk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBTcGlkZXJNb25rZXkgR2VuZXJhdG9yc1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FOiBSZW1vdmUgdGhpcyBjYXNlIHdoZW4gU00gZG9lcyBFUzYgZ2VuZXJhdG9ycy5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBnZW5lcmF0b3JbdmVyYl0oYXJnKT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gPSBkZWZlcigpO1xuICAgICAgICBhcnJheV9yZWR1Y2UocHJvbWlzZXMsIGZ1bmN0aW9uICh1bmRlZmluZWQsIHByb21pc2UsIGluZGV4KSB7XG4gICAgICAgICAgICB2YXIgc25hcHNob3Q7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgaXNQcm9taXNlKHByb21pc2UpICYmXG4gICAgICAgICAgICAgICAgKHNuYXBzaG90ID0gcHJvbWlzZS5pbnNwZWN0KCkpLnN0YXRlID09PSBcImZ1bGZpbGxlZFwiXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSBzbmFwc2hvdC52YWx1ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgKytwZW5kaW5nQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hlbihcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgtLXBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChwcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQubm90aWZ5KHsgaW5kZXg6IGluZGV4LCB2YWx1ZTogcHJvZ3Jlc3MgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgIC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4XTtcblxuICAgICAgICBwZW5kaW5nQ291bnQrKztcblxuICAgICAgICB3aGVuKHByb21pc2UsIG9uRnVsZmlsbGVkLCBvblJlamVjdGVkLCBvblByb2dyZXNzKTtcbiAgICAgICAgZnVuY3Rpb24gb25GdWxmaWxsZWQocmVzdWx0KSB7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gb25SZWplY3RlZCgpIHtcbiAgICAgICAgICAgIHBlbmRpbmdDb3VudC0tO1xuICAgICAgICAgICAgaWYgKHBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIFwiQ2FuJ3QgZ2V0IGZ1bGZpbGxtZW50IHZhbHVlIGZyb20gYW55IHByb21pc2UsIGFsbCBcIiArXG4gICAgICAgICAgICAgICAgICAgIFwicHJvbWlzZXMgd2VyZSByZWplY3RlZC5cIlxuICAgICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIG9uUHJvZ3Jlc3MocHJvZ3Jlc3MpIHtcbiAgICAgICAgICAgIGRlZmVycmVkLm5vdGlmeSh7XG4gICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxuICAgICAgICAgICAgICAgIHZhbHVlOiBwcm9ncmVzc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9LCB1bmRlZmluZWQpO1xuXG4gICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG59XG5cblByb21pc2UucHJvdG90eXBlLmFueSA9IGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gYW55KHRoaXMpO1xufTtcblxuLyoqXG4gKiBXYWl0cyBmb3IgYWxsIHByb21pc2VzIHRvIGJlIHNldHRsZWQsIGVpdGhlciBmdWxmaWxsZWQgb3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yJylcbiAqICAgICAgICAgLnR5cGUoJ2pzb24nKVxuICogICAgICAgICAuc2VuZCgne1wibmFtZVwiOlwidGpcIn0nKVxuICogICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqICAgICAgIC8vIGF1dG8ganNvblxuICogICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgIC5zZW5kKHsgbmFtZTogJ3RqJyB9KVxuICogICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqICAgICAgIC8vIG1hbnVhbCB4LXd3dy1mb3JtLXVybGVuY29kZWRcbiAqICAgICAgIHJlcXVlc3QucG9zdCgnL3VzZXInKVxuICogICAgICAgICAudHlwZSgnZm9ybScpXG4gKiAgICAgICAgIC5zZW5kKCduYW1lPXRqJylcbiAqICAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiAgICAgICAvLyBhdXRvIHgtd3d3LWZvcm0tdXJsZW5jb2RlZFxuICogICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgIC50eXBlKCdmb3JtJylcbiAqICAgICAgICAgLnNlbmQoeyBuYW1lOiAndGonIH0pXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gZGVmYXVsdHMgdG8geC13d3ctZm9ybS11cmxlbmNvZGVkXG4gICogICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAgKiAgICAgICAgLnNlbmQoJ25hbWU9dG9iaScpXG4gICogICAgICAgIC5zZW5kKCdzcGVjaWVzPWZlcnJldCcpXG4gICogICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogQHBhcmFtIHtTdHJpbmd8T2JqZWN0fSBkYXRhXG4gKiBAcmV0dXJuIHtSZXF1ZXN0fSBmb3IgY2hhaW5pbmdcbiAqIEBhcGkgcHVibGljXG4gKi9cblxuUmVxdWVzdC5wcm90b3R5cGUuc2VuZCA9IGZ1bmN0aW9uKGRhdGE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qL1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKGFyciwgZm4sIGluaXRpYWwpeyAgXG4gIHZhciBpZHggPSAwO1xuICB2YXIgbGVuID0gYXJyLmxlbmd0aDtcbiAgdmFyIGN1cnIgPSBhcmd1bWVudHMubGVuZ3RoID09IDNcbiAgICA/IGluaXRpYWxcbiAgICA6IGFycltpZHgrK107XG5cbiAgd2hpbGUgKGlkeCA8IGxlbikge1xuICAgIGN1cnIgPSBmbi5jYWxsKG51bGwsIGN1cnIsIGFycltpZHhdLCArK2lkeCwgYXJyKTtcbiAgfVxuICBcbiAgcmV0dXJuIGN1cnI7XG59OyJdfQ== - /*global JSONEditor*/ + + /*global JSONEditor*/ 'use strict'; window.SwaggerUi = Backbone.Router.extend({ @@ -24633,11 +21720,11 @@ window.SwaggerUi = Backbone.Router.extend({ // SwaggerUi accepts all the same options as SwaggerApi initialize: function(options) { options = options || {}; - + if (options.defaultModelRendering !== 'model') { options.defaultModelRendering = 'schema'; } - + if (!options.highlightSizeThreshold) { options.highlightSizeThreshold = 100000; } @@ -24661,7 +21748,7 @@ window.SwaggerUi = Backbone.Router.extend({ } if (typeof options.oauth2RedirectUrl === 'string') { - window.oAuthRedirectUrl = options.redirectUrl; + window.oAuthRedirectUrl = options.oauth2RedirectUrl; } // Create an empty div which contains the dom_id @@ -24721,6 +21808,10 @@ window.SwaggerUi = Backbone.Router.extend({ if (this.mainView) { this.mainView.clear(); } + + if (this.authView) { + this.authView.remove(); + } var url = this.options.url; if (url && url.indexOf('http') !== 0) { url = this.buildUrl(window.location.href.toString(), url); @@ -24752,6 +21843,7 @@ window.SwaggerUi = Backbone.Router.extend({ // This is bound to success handler for SwaggerApi // so it gets called when SwaggerApi completes loading render: function(){ + var authsModel; this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...'); this.mainView = new SwaggerUi.Views.MainView({ model: this.api, @@ -24759,6 +21851,18 @@ window.SwaggerUi = Backbone.Router.extend({ swaggerOptions: this.options, router: this }).render(); + if (!_.isEmpty(this.api.securityDefinitions)){ + authsModel = _.map(this.api.securityDefinitions, function (auth, name) { + var result = {}; + result[name] = auth; + return result; + }); + this.authView = new SwaggerUi.Views.AuthButtonView({ + data: SwaggerUi.utils.parseSecurityDefinitions(authsModel), + router: this + }); + $('#auth_container').append(this.authView.render().el); + } this.showMessage(); switch (this.options.docExpansion) { case 'full': @@ -24848,6 +21952,10 @@ window.SwaggerUi = Backbone.Router.extend({ }); window.SwaggerUi.Views = {}; +window.SwaggerUi.Models = {}; +window.SwaggerUi.Collections = {}; +window.SwaggerUi.partials = {}; +window.SwaggerUi.utils = {}; // don't break backward compatibility with previous versions and warn users to upgrade their code (function(){ @@ -24905,108 +22013,664 @@ window.SwaggerUi.Views = {}; 'use strict'; -SwaggerUi.Views.ApiKeyButton = Backbone.View.extend({ // TODO: append this to global SwaggerUi +window.SwaggerUi.utils = { + parseSecurityDefinitions: function (security, securityDefinitions) { + var auths = Object.assign({}, securityDefinitions); + var oauth2Arr = []; + var authsArr = []; + var scopes = []; + var utils = window.SwaggerUi.utils; - events:{ - 'click #apikey_button' : 'toggleApiKeyContainer', - 'click #apply_api_key' : 'applyApiKey' - }, + if (!Array.isArray(security)) { return null; } - initialize: function(opts){ - this.options = opts || {}; - this.router = this.options.router; - }, + security.forEach(function (item) { + var singleSecurity = {}; + var singleOauth2Security = {}; - render: function(){ - var template = this.template(); - $(this.el).html(template(this.model)); + for (var key in item) { + if (Array.isArray(item[key])) { + if (!auths[key]) { continue; } + auths[key] = auths[key] || {}; + if (auths[key].type === 'oauth2') { + singleOauth2Security[key] = Object.assign({}, auths[key]); + singleOauth2Security[key].scopes = Object.assign({}, auths[key].scopes); + for (var i in singleOauth2Security[key].scopes) { + if (item[key].indexOf(i) < 0) { + delete singleOauth2Security[key].scopes[i]; + } + } + singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes); + scopes = _.merge(scopes, singleOauth2Security[key].scopes); + } else { + singleSecurity[key] = Object.assign({}, auths[key]); + } + } else { + if (item[key].type === 'oauth2') { + singleOauth2Security[key] = Object.assign({}, item[key]); + singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes); + scopes = _.merge(scopes, singleOauth2Security[key].scopes); + } else { + singleSecurity[key] = item[key]; + } + } + } - return this; - }, + if (!_.isEmpty(singleSecurity)) { + authsArr.push(singleSecurity); + } + if (!_.isEmpty(singleOauth2Security)){ + oauth2Arr.push(singleOauth2Security); + } + }); - applyApiKey: function(){ - var keyAuth = new SwaggerClient.ApiKeyAuthorization( - this.model.name, - $('#input_apiKey_entry').val(), - this.model.in - ); - this.router.api.clientAuthorizations.add(this.model.name, keyAuth); - this.router.load(); - $('#apikey_container').show(); - }, + return { + auths : authsArr, + oauth2: oauth2Arr, + scopes: scopes + }; + }, - toggleApiKeyContainer: function(){ - if ($('#apikey_container').length) { + parseOauth2Scopes: function (data) { + var scopes = Object.assign({}, data); + var result = []; + var key; - var elem = $('#apikey_container').first(); + for (key in scopes) { + result.push({scope: key, description: scopes[key]}); + } - if (elem.is(':visible')){ - elem.hide(); - } else { + return result; + }, - // hide others - $('.auth_container').hide(); - elem.show(); - } + sanitize: function(html) { + // Strip the script tags from the html and inline evenhandlers + html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, ''); + html = html.replace(/(on\w+="[^"]*")*(on\w+='[^']*')*(on\w+=\w*\(\w*\))*/gi, ''); + + return html; } - }, +}; +'use strict'; - template: function(){ - return Handlebars.templates.apikey_button_view; - } +SwaggerUi.Models.ApiKeyAuthModel = Backbone.Model.extend({ + defaults: { + 'in': '', + name: '', + title: '', + value: '' + }, + + initialize: function () { + this.on('change', this.validate); + }, + + validate: function () { + var valid = !!this.get('value'); + + this.set('valid', valid); + + return valid; + } +}); +'use strict'; + +SwaggerUi.Views.ApiKeyAuthView = Backbone.View.extend({ // TODO: append this to global SwaggerUi + + events: { + 'change .input_apiKey_entry': 'apiKeyChange' + }, + + selectors: { + apikeyInput: '.input_apiKey_entry' + }, + + template: Handlebars.templates.apikey_auth, + + initialize: function(opts) { + this.options = opts || {}; + this.router = this.options.router; + }, + + render: function (){ + this.$el.html(this.template(this.model.toJSON())); + + return this; + }, + + apiKeyChange: function (e) { + var val = $(e.target).val(); + if (val) { + this.$(this.selectors.apikeyInput).removeClass('error'); + } + + this.model.set('value', val); + }, + + isValid: function () { + return this.model.validate(); + }, + + highlightInvalid: function () { + if (!this.isValid()) { + this.$(this.selectors.apikeyInput).addClass('error'); + } + } }); 'use strict'; -SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({ +SwaggerUi.Views.AuthButtonView = Backbone.View.extend({ + events: { + 'click .authorize__btn': 'authorizeBtnClick' + }, + tpls: { + popup: Handlebars.templates.popup, + authBtn: Handlebars.templates.auth_button, + authBtnOperation: Handlebars.templates.auth_button_operation + }, - initialize: function (opts) { - this.options = opts || {}; - this.router = this.options.router; - }, + initialize: function(opts) { + this.options = opts || {}; + this.options.data = this.options.data || {}; + this.isOperation = this.options.isOperation; + this.model = this.model || {}; + this.router = this.options.router; + this.auths = this.options.data.oauth2.concat(this.options.data.auths); + }, - render: function(){ - var template = this.template(); - $(this.el).html(template(this.model)); + render: function () { + var tplName = this.isOperation ? 'authBtnOperation' : 'authBtn'; - return this; - }, + this.$authEl = this.renderAuths(this.auths); + this.$el.html(this.tpls[tplName](this.model)); - events: { - 'click #basic_auth_button' : 'togglePasswordContainer', - 'click #apply_basic_auth' : 'applyPassword' - }, + return this; + }, - applyPassword: function(event){ - event.preventDefault(); - var username = $('#input_username').val(); - var password = $('#input_password').val(); - var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password); - this.router.api.clientAuthorizations.add(this.model.type, basicAuth); - this.router.load(); - $('#basic_auth_container').hide(); - }, + authorizeBtnClick: function (e) { + var authsModel; - togglePasswordContainer: function(){ - if ($('#basic_auth_container').length) { - var elem = $('#basic_auth_container').show(); - if (elem.is(':visible')){ - elem.slideUp(); - } else { - // hide others - $('.auth_container').hide(); - elem.show(); - } + e.preventDefault(); + + authsModel = { + title: 'Available authorizations', + content: this.$authEl + }; + + // The content of the popup is removed and all events unbound after clicking the 'Cancel' button of the popup. + // We'll have to re-render the contents before creating a new popup view. + this.render(); + + this.popup = new SwaggerUi.Views.PopupView({model: authsModel}); + this.popup.render(); + }, + + renderAuths: function (auths) { + var $el = $('<div>'); + var isLogout = false; + + auths.forEach(function (auth) { + var authView = new SwaggerUi.Views.AuthView({data: auth, router: this.router}); + var authEl = authView.render().el; + $el.append(authEl); + if (authView.isLogout) { + isLogout = true; + } + }, this); + + this.model.isLogout = isLogout; + + return $el; } - }, - - template: function(){ - return Handlebars.templates.basic_auth_button_view; - } }); + +'use strict'; + +SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({ + constructor: function() { + var args = Array.prototype.slice.call(arguments); + + args[0] = this.parse(args[0]); + + Backbone.Collection.apply(this, args); + }, + + add: function (model) { + var args = Array.prototype.slice.call(arguments); + + if (Array.isArray(model)) { + args[0] = _.map(model, function(val) { + return this.handleOne(val); + }, this); + } else { + args[0] = this.handleOne(model); + } + + Backbone.Collection.prototype.add.apply(this, args); + }, + + handleOne: function (model) { + var result = model; + + if (! (model instanceof Backbone.Model) ) { + switch (model.type) { + case 'oauth2': + result = new SwaggerUi.Models.Oauth2Model(model); + break; + case 'basic': + result = new SwaggerUi.Models.BasicAuthModel(model); + break; + case 'apiKey': + result = new SwaggerUi.Models.ApiKeyAuthModel(model); + break; + default: + result = new Backbone.Model(model); + } + } + + return result; + }, + + isValid: function () { + var valid = true; + + this.models.forEach(function(model) { + if (!model.validate()) { + valid = false; + } + }); + + return valid; + }, + + isAuthorized: function () { + return this.length === this.where({ isLogout: true }).length; + }, + + isPartiallyAuthorized: function () { + return this.where({ isLogout: true }).length > 0; + }, + + parse: function (data) { + var authz = {}; + + if(typeof window.swaggerUi !== 'undefined') { + authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz); + } + + return _.map(data, function (auth, name) { + var isBasic = authz[name] && auth.type === 'basic' && authz[name].username && authz[name].password; + + _.extend(auth, { + title: name + }); + + if (authz[name] || isBasic) { + _.extend(auth, { + isLogout: true, + value: isBasic ? undefined : authz[name].value, + username: isBasic ? authz[name].username : undefined, + password: isBasic ? authz[name].password : undefined, + valid: true + }); + } + + return auth; + }); + } +}); +'use strict'; + +SwaggerUi.Views.AuthsCollectionView = Backbone.View.extend({ + + initialize: function(opts) { + this.options = opts || {}; + this.options.data = this.options.data || {}; + this.router = this.options.router; + + this.collection = new SwaggerUi.Collections.AuthsCollection(opts.data); + + this.$innerEl = $('<div>'); + this.authViews = []; + }, + + render: function () { + this.collection.each(function (auth) { + this.renderOneAuth(auth); + }, this); + + this.$el.html(this.$innerEl.html() ? this.$innerEl : ''); + + return this; + }, + + renderOneAuth: function (authModel) { + var authViewEl, authView, authViewName; + var type = authModel.get('type'); + + if (type === 'apiKey') { + authViewName = 'ApiKeyAuthView'; + } else if (type === 'basic' && this.$innerEl.find('.basic_auth_container').length === 0) { + authViewName = 'BasicAuthView'; + } else if (type === 'oauth2') { + authViewName = 'Oauth2View'; + } + + if (authViewName) { + authView = new SwaggerUi.Views[authViewName]({model: authModel, router: this.router}); + authViewEl = authView.render().el; + this.authViews.push(authView); + } + + this.$innerEl.append(authViewEl); + }, + + highlightInvalid: function () { + this.authViews.forEach(function (view) { + view.highlightInvalid(); + }, this); + } + +}); + +'use strict'; + +/* global redirect_uri:true */ +/* global clientId */ +/* global scopeSeparator */ +/* global additionalQueryStringParams */ +/* global clientSecret */ +/* global onOAuthComplete */ +/* global realm */ +/*jshint unused:false*/ + +SwaggerUi.Views.AuthView = Backbone.View.extend({ + events: { + 'click .auth_submit__button': 'authorizeClick', + 'click .auth_logout__button': 'logoutClick' + }, + + tpls: { + main: Handlebars.templates.auth_view + }, + + selectors: { + innerEl: '.auth_inner', + authBtn: '.auth_submit__button' + }, + + initialize: function(opts) { + this.options = opts || {}; + opts.data = opts.data || {}; + this.router = this.options.router; + + this.authsCollectionView = new SwaggerUi.Views.AuthsCollectionView({data: opts.data}); + + this.$el.html(this.tpls.main({ + isLogout: this.authsCollectionView.collection.isAuthorized(), + isAuthorized: this.authsCollectionView.collection.isPartiallyAuthorized() + })); + this.$innerEl = this.$(this.selectors.innerEl); + this.isLogout = this.authsCollectionView.collection.isPartiallyAuthorized(); + }, + + render: function () { + this.$innerEl.html(this.authsCollectionView.render().el); + + return this; + }, + + authorizeClick: function (e) { + e.preventDefault(); + e.stopPropagation(); + + if (this.authsCollectionView.collection.isValid()) { + this.authorize(); + } else { + this.authsCollectionView.highlightInvalid(); + } + }, + + authorize: function () { + this.authsCollectionView.collection.forEach(function (auth) { + var keyAuth, basicAuth; + var type = auth.get('type'); + + if (type === 'apiKey') { + keyAuth = new SwaggerClient.ApiKeyAuthorization( + auth.get('name'), + auth.get('value'), + auth.get('in') + ); + + this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth); + } else if (type === 'basic') { + basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password')); + this.router.api.clientAuthorizations.add(auth.get('title'), basicAuth); + } else if (type === 'oauth2') { + this.handleOauth2Login(auth); + } + }, this); + + this.router.load(); + }, + + logoutClick: function (e) { + e.preventDefault(); + + this.authsCollectionView.collection.forEach(function (auth) { + window.swaggerUi.api.clientAuthorizations.remove(auth.get('title')); + }); + + this.router.load(); + }, + + // taken from lib/swagger-oauth.js + handleOauth2Login: function (auth) { + var host = window.location; + var pathname = location.pathname.substring(0, location.pathname.lastIndexOf('/')); + var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html'; + var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl; + var url = null; + var scopes = _.map(auth.get('scopes'), function (scope) { + if(scope.checked) { + return scope.scope; + } + }); + var container = window.swaggerUiAuth || (window.swaggerUiAuth = {}); + var state, dets, ep; + container.OAuthSchemeKey = auth.get('title'); + + window.enabledScopes = scopes; + var flow = auth.get('flow'); + + /** + * Returns the name of the access token parameter returned by the server. + * + * @param dets + * The authorisation scheme configuration. + * @return the name of the access token parameter + */ + function getTokenName(dets) { + return dets.vendorExtensions['x-tokenName'] || dets.tokenName; + } + + if(auth.get('type') === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) { + dets = auth.attributes; + url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code'); + container.tokenName = getTokenName(dets) || 'access_token'; + container.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null); + state = container.OAuthSchemeKey; + } + else if(auth.get('type') === 'oauth2' && flow && (flow === 'application')) { + dets = auth.attributes; + container.tokenName = getTokenName(dets) || 'access_token'; + this.clientCredentialsFlow(scopes, dets, container.OAuthSchemeKey); + return; + } + else if(auth.get('type') === 'oauth2' && flow && (flow === 'password')) { + dets = auth.attributes; + container.tokenName = getTokenName(dets) || 'access_token'; + this.passwordFlow(scopes, dets, container.OAuthSchemeKey); + return; + } + else if(auth.get('grantTypes')) { + // 1.2 support + var o = auth.get('grantTypes'); + for(var t in o) { + if(o.hasOwnProperty(t) && t === 'implicit') { + dets = o[t]; + ep = dets.loginEndpoint.url; + url = dets.loginEndpoint.url + '?response_type=token'; + container.tokenName = getTokenName(dets); + } + else if (o.hasOwnProperty(t) && t === 'accessCode') { + dets = o[t]; + ep = dets.tokenRequestEndpoint.url; + url = dets.tokenRequestEndpoint.url + '?response_type=code'; + container.tokenName = getTokenName(dets); + } + } + } + + redirect_uri = redirectUrl; + + url += '&redirect_uri=' + encodeURIComponent(redirectUrl); + url += '&realm=' + encodeURIComponent(realm); + url += '&client_id=' + encodeURIComponent(clientId); + url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator)); + url += '&state=' + encodeURIComponent(state); + for (var key in additionalQueryStringParams) { + url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]); + } + + window.open(url); + }, + + // taken from lib/swagger-oauth.js + clientCredentialsFlow: function (scopes, oauth, OAuthSchemeKey) { + this.accessTokenRequest(scopes, oauth, OAuthSchemeKey, 'client_credentials'); + }, + + passwordFlow: function (scopes, oauth, OAuthSchemeKey) { + this.accessTokenRequest(scopes, oauth, OAuthSchemeKey, 'password', { + 'username': oauth.username, + 'password': oauth.password + }); + }, + + accessTokenRequest: function (scopes, oauth, OAuthSchemeKey, grantType, params) { + params = $.extend({}, { + 'scope': scopes.join(' '), + 'grant_type': grantType + }, params); + + var headers= {}; + + switch (oauth.clientAuthenticationType) { + case 'basic': + headers.Authorization = 'Basic ' + btoa(oauth.clientId + ':' + oauth.clientSecret); + break; + case 'request-body': + params.client_id = oauth.clientId; + params.client_secret = oauth.clientSecret; + break; + } + + $.ajax({ + url : oauth.tokenUrl, + type: 'POST', + data: params, + headers: headers, + success: function (data) + { + onOAuthComplete(data, OAuthSchemeKey); + }, + error: function () + { + onOAuthComplete(''); + } + }); + } +}); + +'use strict'; + +SwaggerUi.Models.BasicAuthModel = Backbone.Model.extend({ + defaults: { + username: '', + password: '', + title: 'basic' + }, + + initialize: function () { + this.on('change', this.validate); + }, + + validate: function () { + var valid = !!this.get('password') && !!this.get('username'); + + this.set('valid', valid); + + return valid; + } +}); +'use strict'; + +SwaggerUi.Views.BasicAuthView = Backbone.View.extend({ + + initialize: function (opts) { + this.options = opts || {}; + this.router = this.options.router; + }, + + events: { + 'change .auth_input': 'inputChange' + }, + + selectors: { + usernameInput: '.basic_auth__username', + passwordInput: '.basic_auth__password' + }, + + cls: { + error: 'error' + }, + + template: Handlebars.templates.basic_auth, + + render: function(){ + $(this.el).html(this.template(this.model.toJSON())); + + return this; + }, + + inputChange: function (e) { + var $el = $(e.target); + var val = $el.val(); + var attr = $el.prop('name'); + + if (val) { + $el.removeClass(this.cls.error); + } + + this.model.set(attr, val); + }, + + isValid: function () { + return this.model.validate(); + }, + + highlightInvalid: function () { + if (!this.model.get('username')) { + this.$(this.selectors.usernameInput).addClass(this.cls.error); + } + } +}); + 'use strict'; SwaggerUi.Views.ContentTypeView = Backbone.View.extend({ @@ -25024,6 +22688,7 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({ events: { 'click #show-pet-store-icon' : 'showPetStore', 'click #explore' : 'showCustom', + 'submit #api_selector' : 'showCustom', 'keyup #input_baseUrl' : 'showCustomOnKeyup', 'keyup #input_apiKey' : 'showCustomOnKeyup' }, @@ -25048,8 +22713,7 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({ } this.trigger('update-swagger-ui', { - url: $('#input_baseUrl').val(), - apiKey: $('#input_apiKey').val() + url: $('#input_baseUrl').val() }); }, @@ -25060,7 +22724,6 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({ $('#input_baseUrl').val(url); - //$('#input_apiKey').val(apiKey); if (trigger) { this.trigger('update-swagger-ui', {url:url}); } @@ -25126,17 +22789,11 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ if ('validatorUrl' in opts.swaggerOptions) { // Validator URL specified explicitly this.model.validatorUrl = opts.swaggerOptions.validatorUrl; - } else if (this.model.url.indexOf('localhost') > 0) { + } else if (this.model.url.indexOf('localhost') > 0 || this.model.url.indexOf('127.0.0.1') > 0) { // Localhost override this.model.validatorUrl = null; } else { - // Default validator - if(window.location.protocol === 'https:') { - this.model.validatorUrl = 'https://online.swagger.io/validator'; - } - else { - this.model.validatorUrl = 'http://online.swagger.io/validator'; - } + this.model.validatorUrl = '//online.swagger.io/validator'; } // JSonEditor requires type='object' to be present on defined types, we add it if it's missing @@ -25150,26 +22807,15 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ }, - render: function(){ - if (this.model.securityDefinitions) { - for (var name in this.model.securityDefinitions) { - var auth = this.model.securityDefinitions[name]; - var button; + render: function () { + $(this.el).html(Handlebars.templates.main(this.model)); + this.info = this.$('.info')[0]; - if (auth.type === 'apiKey' && $('#apikey_button').length === 0) { - button = new SwaggerUi.Views.ApiKeyButton({model: auth, router: this.router}).render().el; - $('.auth_main_container').append(button); - } - - if (auth.type === 'basicAuth' && $('#basic_auth_button').length === 0) { - button = new SwaggerUi.Views.BasicAuthButton({model: auth, router: this.router}).render().el; - $('.auth_main_container').append(button); - } - } + if (this.info) { + this.info.addEventListener('click', this.onLinkClick, true); } - // Render the outer container for resources - $(this.el).html(Handlebars.templates.main(this.model)); + this.model.securityDefinitions = this.model.securityDefinitions || {}; // Render each resource @@ -25182,7 +22828,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ id = id + '_' + counter; counter += 1; } - resource.id = id; + resource.id = sanitizeHtml(id); resources[id] = resource; this.addResource(resource, this.model.auths); } @@ -25197,7 +22843,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ addResource: function(resource, auths){ // Render a resource and add it to resources li - resource.id = resource.id.replace(/\s/g, '_'); + resource.id = resource.id.replace(/[^a-zA-Z\d]/g, function(str) { return str.charCodeAt(0); }); // Make all definitions available at the root of the resource so that they can // be loaded by the JSonEditor @@ -25217,11 +22863,178 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ clear: function(){ $(this.el).html(''); + }, + + onLinkClick: function (e) { + var el = e.target; + + if (el.tagName === 'A' && el.href && !el.target) { + e.preventDefault(); + window.open(el.href, '_blank'); + } } }); 'use strict'; +SwaggerUi.Models.Oauth2Model = Backbone.Model.extend({ + defaults: { + scopes: {}, + isPasswordFlow: false, + clientAuthenticationType: 'none' + }, + + initialize: function () { + if(this.attributes && this.attributes.scopes) { + var attributes = _.cloneDeep(this.attributes); + var i, scopes = []; + for(i in attributes.scopes) { + var scope = attributes.scopes[i]; + if(typeof scope.description === 'string') { + scopes[scope] = attributes.scopes[i]; + scopes.push(attributes.scopes[i]); + } + } + attributes.scopes = scopes; + this.attributes = attributes; + } + + if (this.attributes && this.attributes.flow) { + var flow = this.attributes.flow; + this.set('isPasswordFlow', flow === 'password'); + this.set('requireClientAuthentication', flow === 'application'); + this.set('clientAuthentication', flow === 'password' || flow === 'application'); + } + this.on('change', this.validate); + }, + + setScopes: function (name, val) { + var auth = _.extend({}, this.attributes); + var index = _.findIndex(auth.scopes, function(o) { + return o.scope === name; + }); + auth.scopes[index].checked = val; + + this.set(auth); + this.validate(); + }, + + validate: function () { + var valid = false; + if (this.get('isPasswordFlow') && + (!this.get('username'))) { + return false; + } + + if (this.get('clientAuthenticationType') in ['basic', 'request-body'] && + (!this.get('clientId'))) { + return false; + } + + var scp = this.get('scopes'); + var idx = _.findIndex(scp, function (o) { + return o.checked === true; + }); + + if(scp.length > 0 && idx >= 0) { + valid = true; + } + + if(scp.length === 0) { + valid = true; + } + + this.set('valid', valid); + + return valid; + } +}); + +'use strict'; + +SwaggerUi.Views.Oauth2View = Backbone.View.extend({ + events: { + 'change .oauth-scope': 'scopeChange', + 'change .oauth-username': 'setUsername', + 'change .oauth-password': 'setPassword', + 'change .oauth-client-authentication-type': 'setClientAuthenticationType', + 'change .oauth-client-id': 'setClientId', + 'change .oauth-client-secret': 'setClientSecret' + }, + + template: Handlebars.templates.oauth2, + + cls: { + error: 'error' + }, + + render: function () { + this.$el.html(this.template(this.model.toJSON())); + + return this; + }, + + scopeChange: function (e) { + var val = $(e.target).prop('checked'); + var scope = $(e.target).data('scope'); + + this.model.setScopes(scope, val); + }, + + setUsername: function (e) { + var val= $(e.target).val(); + this.model.set('username', val); + if (val) { + $(e.target).removeClass(this.cls.error); + } + }, + + setPassword: function (e) { + this.model.set('password', $(e.target).val()); + }, + + setClientAuthenticationType: function (e) { + var type = $(e.target).val(); + var $el = this.$el; + this.model.set('clientAuthenticationType', type); + + switch(type) { + case 'none': + $el.find('.oauth-client-authentication').hide(); + break; + case 'basic': + case 'request-body': + $el.find('.oauth-client-id').removeClass(this.cls.error); + $el.find('.oauth-client-authentication').show(); + break; + } + }, + + setClientId: function (e) { + var val = $(e.target).val(); + this.model.set('clientId', val); + if (val) { + $(e.target).removeClass(this.cls.error); + } + }, + + setClientSecret: function (e) { + this.model.set('clientSecret', $(e.target).val()); + $(e.target).removeClass('error'); + }, + + highlightInvalid: function () { + if (!this.model.get('username')) { + this.$el.find('.oauth-username').addClass(this.cls.error); + } + + if (!this.model.get('clientId')) { + this.$el.find('.oauth-client-id').addClass(this.cls.error); + } + } +}); +'use strict'; + SwaggerUi.Views.OperationView = Backbone.View.extend({ invocationUrl: null, @@ -25232,6 +23045,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ 'click .toggleOperation' : 'toggleOperationContent', 'mouseenter .api-ic' : 'mouseEnter', 'dblclick .curl' : 'selectText', + 'change [name=responseContentType]' : 'showSnippet' }, initialize: function(opts) { @@ -25241,33 +23055,37 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ this.parentId = this.model.parentId; this.nickname = this.model.nickname; this.model.encodedParentId = encodeURIComponent(this.parentId); - + if (opts.swaggerOptions) { this.model.defaultRendering = opts.swaggerOptions.defaultModelRendering; - + if (opts.swaggerOptions.showRequestHeaders) { this.model.showRequestHeaders = true; } + + if (opts.swaggerOptions.showOperationIds) { + this.model.showOperationIds = true; + } } return this; }, selectText: function(event) { - var doc = document, - text = event.target.firstChild, - range, - selection; - if (doc.body.createTextRange) { - range = document.body.createTextRange(); - range.moveToElementText(text); - range.select(); - } else if (window.getSelection) { - selection = window.getSelection(); - range = document.createRange(); - range.selectNodeContents(text); - selection.removeAllRanges(); - selection.addRange(range); - } + var doc = document, + text = event.target.firstChild, + range, + selection; + if (doc.body.createTextRange) { + range = document.body.createTextRange(); + range.moveToElementText(text); + range.select(); + } else if (window.getSelection) { + selection = window.getSelection(); + range = document.createRange(); + range.selectNodeContents(text); + selection.removeAllRanges(); + selection.addRange(range); + } }, mouseEnter: function(e) { @@ -25304,9 +23122,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ }, // Note: copied from CoffeeScript compiled file - // TODO: redactor + // TODO: refactor render: function() { - var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value; + var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, produces, isXML, isJSON; isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0; if (!isMethodSubmissionSupported) { this.model.isReadOnly = true; @@ -25377,7 +23195,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ code: code, message: value.description, responseModel: schema, - headers: value.headers + headers: value.headers, + schema: schemaObj }); } } @@ -25385,6 +23204,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ this.model.responseMessages = []; } signatureModel = null; + produces = this.model.produces; + isXML = this.contains(produces, 'xml'); + isJSON = isXML ? this.contains(produces, 'json') : true; + if (this.model.successResponse) { successResponse = this.model.successResponse; for (key in successResponse) { @@ -25394,9 +23217,14 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ this.model.successDescription = value.description; this.model.headers = this.parseResponseHeaders(value.headers); signatureModel = { - sampleJSON: JSON.stringify(value.createJSONSample(), void 0, 2), + sampleJSON: isJSON ? JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2) : false, isParam: false, - signature: value.getMockSignature() + sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(value.name, value.definition, value.models) : false, + signature: SwaggerUi.partials.signature.getModelSignature(value.name, value.definition, value.models, value.modelPropertyMacro) + }; + } else { + signatureModel = { + signature: SwaggerUi.partials.signature.getPrimitiveSignature(value) }; } } @@ -25460,11 +23288,61 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ ref5 = this.model.responseMessages; for (q = 0, len4 = ref5.length; q < len4; q++) { statusCode = ref5[q]; + statusCode.isXML = isXML; + statusCode.isJSON = isJSON; + if (!_.isUndefined(statusCode.headers)) { + statusCode.headers = this.parseHeadersType(statusCode.headers); + } this.addStatusCode(statusCode); } + + if (Array.isArray(this.model.security)) { + var authsModel = SwaggerUi.utils.parseSecurityDefinitions(this.model.security, this.model.parent.securityDefinitions); + + authsModel.isLogout = !_.isEmpty(this.model.clientAuthorizations.authz); + this.authView = new SwaggerUi.Views.AuthButtonView({ + data: authsModel, + router: this.router, + isOperation: true, + model: { + scopes: authsModel.scopes + } + }); + this.$('.authorize-wrapper').append(this.authView.render().el); + } + + this.showSnippet(); return this; }, + parseHeadersType: function (headers) { + var map = { + 'string': { + 'date-time': 'dateTime', + 'date' : 'date' + } + }; + + _.forEach(headers, function (header) { + var value; + header = header || {}; + value = map[header.type] && map[header.type][header.format]; + if (!_.isUndefined(value)) { + header.type = value; + } + }); + + return headers; + }, + + contains: function (produces, type) { + return produces.filter(function (val) { + if (val.indexOf(type) > -1) { + return true; + } + }).length; + }, + parseResponseHeaders: function (data) { var HEADERS_SEPARATOR = '; '; var headers = _.clone(data); @@ -25497,7 +23375,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ // This is required for JsonEditor to display the root properly if(!param.schema.type){ param.schema.type = 'object'; - } + } // This is the title that will be used by JsonEditor for the root // Since we already display the parameter's name in the Parameter column // We set this to space, we can't set it to null or space otherwise JsonEditor @@ -25505,7 +23383,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ if(!param.schema.title){ param.schema.title = ' '; } - } + } var paramView = new SwaggerUi.Views.ParameterView({ model: param, @@ -25668,7 +23546,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ // wraps a jquery response as a shred response wrap: function(data) { - var h, headerArray, headers, i, l, len, o; + var h, headerArray, headers, i, l, len, o; headers = {}; headerArray = data.getAllResponseHeaders().split('\r'); for (l = 0, len = headerArray.length; l < len; l++) { @@ -25742,7 +23620,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ reg = /(>)(<)(\/*)/g; wsexp = /[ ]*(.*)[ ]+\n/g; contexp = /(<.+>)(.+\n)/g; - xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2'); + xml = xml.replace(/\r\n/g, '\n').replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2'); pad = 0; formatted = ''; lines = xml.split('\n'); @@ -25821,7 +23699,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ url = response.request.url; } var headers = response.headers; - content = jQuery.trim(content); + if(typeof content === 'string') { + content = jQuery.trim(content); + } // if server is nice, and sends content-type back, we can use it var contentType = null; @@ -25831,6 +23711,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ contentType = contentType.split(';')[0].trim(); } } + $('.response_body', $(this.el)).removeClass('json'); $('.response_body', $(this.el)).removeClass('xml'); @@ -25841,11 +23722,54 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ var pre; var code; + var skipHighlight = false; if (!content) { code = $('<code />').text('no content'); pre = $('<pre class="json" />').append(code); - // JSON + // JSON + } else if ( + contentType === 'application/octet-stream' || + headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) || + headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) || + headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) || + headers['content-description'] && (/File Transfer/).test(headers['content-description'])) { + + if ('Blob' in window) { + var type = contentType || 'text/html'; + var a = document.createElement('a'); + var href; + + if({}.toString.apply(content) === '[object Blob]') { + href = window.URL.createObjectURL(content); + } + else { + var binaryData = []; + binaryData.push(content); + href = window.URL.createObjectURL(new Blob(binaryData, {type: type})); + } + var fileName = response.url.substr(response.url.lastIndexOf('/') + 1); + var download = [type, fileName, href].join(':'); + + // Use filename from response header + var disposition = headers['content-disposition'] || headers['Content-Disposition']; + if(typeof disposition !== 'undefined') { + var responseFilename = /filename=([^;]*);?/.exec(disposition); + if(responseFilename !== null && responseFilename.length > 1) { + download = responseFilename[1]; + fileName = download; + } + } + + a.setAttribute('href', href); + a.setAttribute('download', download); + a.innerText = 'Download ' + fileName; + + pre = $('<div/>').append(a); + skipHighlight = true; + } else { + pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).'); + } } else if (contentType === 'application/json' || /\+json$/.test(contentType)) { var json = null; try { @@ -25856,58 +23780,35 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ code = $('<code />').text(json); pre = $('<pre class="json" />').append(code); - // XML + // XML } else if (contentType === 'application/xml' || /\+xml$/.test(contentType)) { code = $('<code />').text(this.formatXml(content)); pre = $('<pre class="xml" />').append(code); - // HTML + // HTML } else if (contentType === 'text/html') { code = $('<code />').html(_.escape(content)); pre = $('<pre class="xml" />').append(code); - // Plain Text + // Plain Text } else if (/text\/plain/.test(contentType)) { code = $('<code />').text(content); pre = $('<pre class="plain" />').append(code); - - // Image + // Image } else if (/^image\//.test(contentType)) { - pre = $('<img>').attr('src', url); + var urlCreator = window.URL || window.webkitURL; + var imageUrl = urlCreator.createObjectURL(content); - // Audio + pre = $('<img>').attr( 'src', imageUrl); + // Audio } else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) { pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType)); - - // Download - } else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) || - headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) || - headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) || - headers['content-description'] && (/File Transfer/).test(headers['content-description'])) { - - if ('Blob' in window) { - var type = contentType || 'text/html'; - var blob = new Blob([content], {type: type}); - var a = document.createElement('a'); - var href = window.URL.createObjectURL(blob); - var fileName = response.url.substr(response.url.lastIndexOf('/') + 1); - var download = [type, fileName, href].join(':'); - - a.setAttribute('href', href); - a.setAttribute('download', download); - a.innerText = 'Download ' + fileName; - - pre = $('<div/>').append(a); - } else { - pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).'); - } - - // Location header based redirect download } else if(headers.location || headers.Location) { + // Location header based redirect download window.location = response.url; - // Anything else (CORS) + // Anything else (CORS) } else { code = $('<code />').text(content); pre = $('<pre class="json" />').append(code); @@ -25926,22 +23827,27 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ // adds curl output var curlCommand = this.model.asCurl(this.map, {responseContentType: contentType}); curlCommand = curlCommand.replace('!', '&#33;'); - $( 'div.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>'); + $( 'div.curl', $(this.el)).html('<pre>' + _.escape(curlCommand) + '</pre>'); // only highlight the response if response is less than threshold, default state is highlight response var opts = this.options.swaggerOptions; if (opts.showRequestHeaders) { var form = $('.sandbox', $(this.el)), - map = this.getInputMap(form), - requestHeaders = this.model.getHeaderParams(map); + map = this.getInputMap(form), + requestHeaders = this.model.getHeaderParams(map); delete requestHeaders['Content-Type']; $('.request_headers', $(this.el)).html('<pre>' + _.escape(JSON.stringify(requestHeaders, null, ' ')).replace(/\n/g, '<br>') + '</pre>'); } + // Call user-defined hook + if (opts.responseHooks && opts.responseHooks[this.nickname]) { + opts.responseHooks[this.nickname](response, this); + } + var response_body_el = $('.response_body', $(this.el))[0]; // only highlight the response if response is less than threshold, default state is highlight response - if (opts.highlightSizeThreshold && typeof response.data !== 'undefined' && response.data.length > opts.highlightSizeThreshold) { + if (opts.highlightSizeThreshold && typeof response.data !== 'undefined' && response.data.length > opts.highlightSizeThreshold || skipHighlight) { return response_body_el; } else { return hljs.highlightBlock(response_body_el); @@ -25979,6 +23885,24 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ } }, + showSnippet: function () { + var contentTypeEl = this.$('[name=responseContentType]'); + var xmlSnippetEl = this.$('.operation-status .snippet_xml, .response-class .snippet_xml'); + var jsonSnippetEl = this.$('.operation-status .snippet_json, .response-class .snippet_json'); + var contentType; + + if (!contentTypeEl.length) { return; } + contentType = contentTypeEl.val(); + + if (contentType.indexOf('xml') > -1) { + xmlSnippetEl.show(); + jsonSnippetEl.hide(); + } else { + jsonSnippetEl.show(); + xmlSnippetEl.hide(); + } + }, + getParamByName: function(name) { var i; if (this.model.parameters) { @@ -26008,9 +23932,14 @@ SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({ 'use strict'; SwaggerUi.Views.ParameterView = Backbone.View.extend({ + events: { + 'change [name=parameterContentType]' : 'toggleParameterSnippet' + }, + initialize: function(){ Handlebars.registerHelper('isArray', function(param, opts) { - if (param.type.toLowerCase() === 'array' || param.allowMultiple) { + var paramType = param.type && param.type.toLowerCase(); + if (paramType === 'array' || param.allowMultiple) { return opts.fn(this); } else { return opts.inverse(this); @@ -26020,10 +23949,14 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ render: function() { var type = this.model.type || this.model.dataType; + var modelType = this.model.modelSignature.type; + var modelDefinitions = this.model.modelSignature.definitions; + var schema = this.model.schema || {}; + var consumes = this.model.consumes || []; + var sampleJSON, signatureView; if (typeof type === 'undefined') { - var schema = this.model.schema; - if (schema && schema.$ref) { + if (schema.$ref) { var ref = schema.$ref; if (ref.indexOf('#/definitions/') === 0) { type = ref.substring('#/definitions/'.length); @@ -26050,18 +23983,23 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ this.model.isList = true; } + var isXML = this.contains(consumes, 'xml'); + var isJSON = isXML ? this.contains(consumes, 'json') : true; + sampleJSON = SwaggerUi.partials.signature.createParameterJSONSample(modelType, modelDefinitions); + var template = this.template(); $(this.el).html(template(this.model)); var signatureModel = { - sampleJSON: this.model.sampleJSON, + sampleJSON: isJSON ? sampleJSON : false, + sampleXML: sampleJSON && isXML ? SwaggerUi.partials.signature.createXMLSample('', schema, modelDefinitions, true) : false, isParam: true, - signature: this.model.signature, + signature: SwaggerUi.partials.signature.getParameterModelSignature(modelType, modelDefinitions), defaultRendering: this.model.defaultRendering }; - if (this.model.sampleJSON) { - var signatureView = new SwaggerUi.Views.SignatureView({model: signatureModel, tagName: 'div'}); + if (sampleJSON) { + signatureView = new SwaggerUi.Views.SignatureView({model: signatureModel, tagName: 'div'}); $('.model-signature', $(this.el)).append(signatureView.render().el); } else { @@ -26072,12 +24010,12 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ if( this.options.swaggerOptions.jsonEditor && this.model.isBody && this.model.schema){ var $self = $(this.el); - this.model.jsonEditor = + this.model.jsonEditor = /* global JSONEditor */ new JSONEditor($('.editor_holder', $self)[0], - {schema: this.model.schema, startval : this.model.default, - ajax:true, - disable_properties:true, + {schema: this.model.schema, startval : this.model.default, + ajax:true, + disable_properties:true, disable_edit_json:true, iconlib: 'swagger' }); // This is so that the signature can send back the sample to the json editor @@ -26114,16 +24052,51 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ if (isParam) { var parameterContentTypeView = new SwaggerUi.Views.ParameterContentTypeView({model: contentTypeModel}); $('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el); + this.toggleParameterSnippet(); } else { var responseContentTypeView = new SwaggerUi.Views.ResponseContentTypeView({model: contentTypeModel}); $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el); + this.toggleResponseSnippet(); } return this; }, + contains: function (consumes, type) { + return consumes.filter(function (val) { + if (val.indexOf(type) > -1) { + return true; + } + }).length; + }, + + toggleParameterSnippet: function () { + var contentType = this.$('[name=parameterContentType]').val(); + + this.toggleSnippet(contentType); + }, + + toggleResponseSnippet: function () { + var contentEl = this.$('[name=responseContentType]'); + + if (!contentEl.length) { return; } + + this.toggleSnippet(contentEl.val()); + }, + + toggleSnippet: function (type) { + type = type || ''; + if (type.indexOf('xml') > -1) { + this.$('.snippet_xml').show(); + this.$('.snippet_json').hide(); + } else { + this.$('.snippet_json').show(); + this.$('.snippet_xml').hide(); + } + }, + // Return an appropriate template based on if the parameter is a list, readonly, required template: function(){ if (this.model.isList) { @@ -26148,6 +24121,1033 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ 'use strict'; +/* jshint -W122 */ +SwaggerUi.partials.signature = (function () { + // copy-pasted from swagger-js + var resolveSchema = function (schema) { + if (_.isPlainObject(schema.schema)) { + schema = resolveSchema(schema.schema); + } + + return schema; + }; + + // copy-pasted from swagger-js + var simpleRef = function (name) { + if (typeof name === 'undefined') { + return null; + } + + if (name.indexOf('#/definitions/') === 0) { + return name.substring('#/definitions/'.length); + } else { + return name; + } + }; + + // copy-pasted from swagger-js + var getInlineModel = function(inlineStr) { + if(/^Inline Model \d+$/.test(inlineStr) && this.inlineModels) { + var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); // + var model = this.inlineModels[id]; + return model; + } + // I'm returning null here, should I rather throw an error? + return null; + }; + + // copy-pasted from swagger-js + var formatXml = function(xml) { + var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp; + reg = /(>)(<)(\/*)/g; + wsexp = /[ ]*(.*)[ ]+\n/g; + contexp = /(<.+>)(.+\n)/g; + xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2'); + pad = 0; + formatted = ''; + lines = xml.split('\n'); + indent = 0; + lastType = 'other'; + transitions = { + 'single->single': 0, + 'single->closing': -1, + 'single->opening': 0, + 'single->other': 0, + 'closing->single': 0, + 'closing->closing': -1, + 'closing->opening': 0, + 'closing->other': 0, + 'opening->single': 1, + 'opening->closing': 0, + 'opening->opening': 1, + 'opening->other': 1, + 'other->single': 0, + 'other->closing': -1, + 'other->opening': 0, + 'other->other': 0 + }; + fn = function(ln) { + var fromTo, j, key, padding, type, types, value; + types = { + single: Boolean(ln.match(/<.+\/>/)), + closing: Boolean(ln.match(/<\/.+>/)), + opening: Boolean(ln.match(/<[^!?].*>/)) + }; + type = ((function() { + var results; + results = []; + for (key in types) { + value = types[key]; + if (value) { + results.push(key); + } + } + return results; + })())[0]; + type = type === void 0 ? 'other' : type; + fromTo = lastType + '->' + type; + lastType = type; + padding = ''; + indent += transitions[fromTo]; + padding = ((function() { + var m, ref1, results; + results = []; + for (j = m = 0, ref1 = indent; 0 <= ref1 ? m < ref1 : m > ref1; j = 0 <= ref1 ? ++m : --m) { + results.push(' '); + } + return results; + })()).join(''); + if (fromTo === 'opening->closing') { + formatted = formatted.substr(0, formatted.length - 1) + ln + '\n'; + } else { + formatted += padding + ln + '\n'; + } + }; + for (l = 0, len = lines.length; l < len; l++) { + ln = lines[l]; + fn(ln); + } + return formatted; + }; + + // copy-pasted from swagger-js + var getModelSignature = function (name, schema, models, modelPropertyMacro) { + var strongOpen = '<span class="strong">'; + var strongClose = '</span>'; + + var optionHtml = function (label, value) { + return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>'; + }; + + + // Allow for ignoring the 'name' argument.... shifting the rest + if(_.isObject(arguments[0])) { + name = void 0; + schema = arguments[0]; + models = arguments[1]; + modelPropertyMacro = arguments[2]; + } + + models = models || {}; + + // Resolve the schema (Handle nested schemas) + schema = resolveSchema(schema); + + // Return for empty object + if(_.isEmpty(schema)) { + return strongOpen + 'Empty' + strongClose; + } + + // Dereference $ref from 'models' + if(typeof schema.$ref === 'string') { + name = simpleRef(schema.$ref); + schema = models[name]; + if(typeof schema === 'undefined') + { + return strongOpen + name + ' is not defined!' + strongClose; + } + } + + if(typeof name !== 'string') { + name = schema.title || 'Inline Model'; + } + + // If we are a Model object... adjust accordingly + if(schema.definition) { + schema = schema.definition; + } + + if(typeof modelPropertyMacro !== 'function') { + modelPropertyMacro = function(prop){ + return (prop || {}).default; + }; + } + + var references = {}; + var seenModels = []; + var inlineModels = 0; + + // Generate current HTML + var html = processModel(schema, name); + + // Generate references HTML + while (_.keys(references).length > 0) { + /* jshint ignore:start */ + _.forEach(references, function (schema, name) { + var seenModel = _.indexOf(seenModels, name) > -1; + + delete references[name]; + + if (!seenModel) { + seenModels.push(name); + + html += '<br />' + processModel(schema, name); + } + }); + /* jshint ignore:end */ + } + + return html; + + + function addReference(schema, name, skipRef) { + var modelName = name; + var model; + + if (schema.$ref) { + modelName = schema.title || simpleRef(schema.$ref); + model = models[simpleRef(schema.$ref)]; + } else if (_.isUndefined(name)) { + modelName = schema.title || 'Inline Model ' + (++inlineModels); + model = {definition: schema}; + } + + if (skipRef !== true) { + references[modelName] = _.isUndefined(model) ? {} : model.definition; + } + + return modelName; + } + + function primitiveToHTML(schema) { + var html = '<span class="propType">'; + var type = schema.type || 'object'; + + if (schema.$ref) { + html += addReference(schema, simpleRef(schema.$ref)); + } else if (type === 'object') { + if (!_.isUndefined(schema.properties)) { + html += addReference(schema); + } else { + html += 'object'; + } + } else if (type === 'array') { + html += 'Array['; + + if (_.isArray(schema.items)) { + html += _.map(schema.items, addReference).join(','); + } else if (_.isPlainObject(schema.items)) { + if (_.isUndefined(schema.items.$ref)) { + if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) { + html += schema.items.type; + } else { + html += addReference(schema.items); + } + } else { + html += addReference(schema.items, simpleRef(schema.items.$ref)); + } + } else { + console.log('Array type\'s \'items\' schema is not an array or an object, cannot process'); + html += 'object'; + } + + html += ']'; + } else { + html += schema.type; + } + + html += '</span>'; + + return html; + } + + function primitiveToOptionsHTML(schema, html) { + var options = ''; + var type = schema.type || 'object'; + var isArray = type === 'array'; + + if (!_.isUndefined(schema.description)) { + html += ': ' + '<span class="propDesc">' + schema.description + '</span>'; + } + + if (schema.enum) { + html += ' = <span class="propVals">[\'' + schema.enum.join('\', \'') + '\']</span>'; + } + + if (isArray) { + if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) { + type = schema.items.type; + } else { + type = 'object'; + } + } + + if (!_.isUndefined(schema.default)) { + options += optionHtml('Default', schema.default); + } + + switch (type) { + case 'string': + if (schema.minLength) { + options += optionHtml('Min. Length', schema.minLength); + } + + if (schema.maxLength) { + options += optionHtml('Max. Length', schema.maxLength); + } + + if (schema.pattern) { + options += optionHtml('Reg. Exp.', schema.pattern); + } + break; + case 'integer': + case 'number': + if (schema.minimum) { + options += optionHtml('Min. Value', schema.minimum); + } + + if (schema.exclusiveMinimum) { + options += optionHtml('Exclusive Min.', 'true'); + } + + if (schema.maximum) { + options += optionHtml('Max. Value', schema.maximum); + } + + if (schema.exclusiveMaximum) { + options += optionHtml('Exclusive Max.', 'true'); + } + + if (schema.multipleOf) { + options += optionHtml('Multiple Of', schema.multipleOf); + } + + break; + } + + if (isArray) { + if (schema.minItems) { + options += optionHtml('Min. Items', schema.minItems); + } + + if (schema.maxItems) { + options += optionHtml('Max. Items', schema.maxItems); + } + + if (schema.uniqueItems) { + options += optionHtml('Unique Items', 'true'); + } + + if (schema.collectionFormat) { + options += optionHtml('Coll. Format', schema.collectionFormat); + } + } + + if (_.isUndefined(schema.items)) { + if (_.isArray(schema.enum)) { + var enumString; + + if (type === 'number' || type === 'integer') { + enumString = schema.enum.join(', '); + } else { + enumString = '"' + schema.enum.join('", "') + '"'; + } + + options += optionHtml('Enum', enumString); + } + } + + if (options.length > 0) { + html = '<span class="propWrap">' + html + '<table class="optionsWrapper"><tr><th colspan="2">' + type + '</th></tr>' + options + '</table></span>'; + } + + return html; + } + + function processModel(schema, name) { + var type = schema.type || 'object'; + var isArray = schema.type === 'array'; + var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose; + var contents; + + if (name) { + seenModels.push(name); + } + + if (isArray) { + if (_.isArray(schema.items)) { + html += '<div>' + _.map(schema.items, function (item) { + var type = item.type || 'object'; + + if (_.isUndefined(item.$ref)) { + if (_.indexOf(['array', 'object'], type) > -1) { + if (type === 'object' && _.isUndefined(item.properties)) { + return 'object'; + } else { + return addReference(item); + } + } else { + return primitiveToOptionsHTML(item, type); + } + } else { + return addReference(item, simpleRef(item.$ref)); + } + }).join(',</div><div>'); + } else if (_.isPlainObject(schema.items)) { + if (_.isUndefined(schema.items.$ref)) { + if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) { + if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) { + html += '<div>object</div>'; + } else { + html += '<div>' + addReference(schema.items) + '</div>'; + } + } else { + html += '<div>' + primitiveToOptionsHTML(schema.items, schema.items.type) + '</div>'; + } + } else { + html += '<div>' + addReference(schema.items, simpleRef(schema.items.$ref)) + '</div>'; + } + } else { + console.log('Array type\'s \'items\' property is not an array or an object, cannot process'); + html += '<div>object</div>'; + } + } else { + if (schema.$ref) { + html += '<div>' + addReference(schema, name) + '</div>'; + } else if (type === 'object') { + if (_.isPlainObject(schema.properties)) { + contents = _.map(schema.properties, function (property, name) { + var propertyIsRequired = (_.indexOf(schema.required, name) >= 0); + var cProperty = _.cloneDeep(property); + + var requiredClass = propertyIsRequired ? 'required' : ''; + var html = '<span class="propName ' + requiredClass + '">' + name + '</span> ('; + var model; + + // Allow macro to set the default value + cProperty.default = modelPropertyMacro(cProperty); + + // Resolve the schema (Handle nested schemas) + cProperty = resolveSchema(cProperty); + + // We need to handle property references to primitives (Issue 339) + if (!_.isUndefined(cProperty.$ref)) { + model = models[simpleRef(cProperty.$ref)]; + + if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) { + // Use referenced schema + cProperty = resolveSchema(model.definition); + } + } + + html += primitiveToHTML(cProperty); + + if(!propertyIsRequired) { + html += ', <span class="propOptKey">optional</span>'; + } + + if(property.readOnly) { + html += ', <span class="propReadOnly">read only</span>'; + } + + html += ')'; + + return '<div' + (property.readOnly ? ' class="readOnly"' : '') + '>' + primitiveToOptionsHTML(cProperty, html); + }).join(',</div>'); + } + + if (contents) { + html += contents + '</div>'; + } + } else { + html += '<div>' + primitiveToOptionsHTML(schema, type) + '</div>'; + } + } + + return html + strongOpen + (isArray ? ']' : '}') + strongClose; + } + + }; + + // copy-pasted from swagger-js + var schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) { + // Resolve the schema (Handle nested schemas) + schema = resolveSchema(schema); + + if(typeof modelPropertyMacro !== 'function') { + modelPropertyMacro = function(prop){ + return (prop || {}).default; + }; + } + + modelsToIgnore= modelsToIgnore || {}; + + var type = schema.type || 'object'; + var format = schema.format; + var model; + var output; + + if (!_.isUndefined(schema.example)) { + output = schema.example; + } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) { + output = schema.enum[0]; + } + + if (_.isUndefined(output)) { + if (schema.$ref) { + model = models[simpleRef(schema.$ref)]; + + if (!_.isUndefined(model)) { + if (_.isUndefined(modelsToIgnore[model.name])) { + modelsToIgnore[model.name] = model; + output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro); + delete modelsToIgnore[model.name]; + } else { + if (model.type === 'array') { + output = []; + } else { + output = {}; + } + } + } + } else if (!_.isUndefined(schema.default)) { + output = schema.default; + } else if (type === 'string') { + if (format === 'date-time') { + output = new Date().toISOString(); + } else if (format === 'date') { + output = new Date().toISOString().split('T')[0]; + } else { + output = 'string'; + } + } else if (type === 'integer') { + output = 0; + } else if (type === 'number') { + output = 0.0; + } else if (type === 'boolean') { + output = true; + } else if (type === 'object') { + output = {}; + + _.forEach(schema.properties, function (property, name) { + var cProperty = _.cloneDeep(property); + + // Allow macro to set the default value + cProperty.default = modelPropertyMacro(property); + + output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro); + }); + } else if (type === 'array') { + output = []; + + if (_.isArray(schema.items)) { + _.forEach(schema.items, function (item) { + output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro)); + }); + } else if (_.isPlainObject(schema.items)) { + output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro)); + } else if (_.isUndefined(schema.items)) { + output.push({}); + } else { + console.log('Array type\'s \'items\' property is not an array or an object, cannot process'); + } + } + } + + return output; + }; + + // copy-pasted from swagger-js + var createJSONSample = function (value, modelsToIgnore) { + modelsToIgnore = modelsToIgnore || {}; + + modelsToIgnore[value.name] = value; + + // Response support + if (value.examples && _.isPlainObject(value.examples)) { + value = _.cloneDeep(value); + var keys = Object.keys(value.examples); + + _.forEach(keys, function(key) { + if(key.indexOf('application/json') === 0) { + var example = value.examples[key]; + if (_.isString(example)) { + example = jsyaml.safeLoad(example); + } + value.definition.example = example; + return schemaToJSON(value.definition, example, modelsToIgnore, value.modelPropertyMacro); + } + }); + } + + if (value.examples) { + value = _.cloneDeep(value); + var example = value.examples; + if (_.isString(example)) { + example = jsyaml.safeLoad(example); + } + value.definition.example = example; + return schemaToJSON(value.definition, example, modelsToIgnore, value.modelPropertyMacro); + } + + return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro); + }; + + // copy-pasted from swagger-js + var getParameterModelSignature = function (type, definitions) { + var isPrimitive, listType; + + if (type instanceof Array) { + listType = true; + type = type[0]; + } + + // Convert undefined to string of 'undefined' + if (typeof type === 'undefined') { + type = 'undefined'; + isPrimitive = true; + + } else if (definitions[type]){ + // a model def exists? + type = definitions[type]; /* Model */ + isPrimitive = false; + + } else if (getInlineModel(type)) { + type = getInlineModel(type); /* Model */ + isPrimitive = false; + + } else { + // We default to primitive + isPrimitive = true; + } + + if (isPrimitive) { + if (listType) { + return 'Array[' + type + ']'; + } else { + return type.toString(); + } + } else { + if (listType) { + return 'Array[' + getModelSignature(type.name, type.definition, type.models, type.modelPropertyMacro) + ']'; + } else { + return getModelSignature(type.name, type.definition, type.models, type.modelPropertyMacro); + } + } + }; + + // copy-pasted from swagger-js + var createParameterJSONSample = function (type, models) { + var listType, sampleJson, innerType; + models = models || {}; + + listType = (type instanceof Array); + innerType = listType ? type[0] : type; + + if(models[innerType]) { + sampleJson = createJSONSample(models[innerType]); + } else if (getInlineModel(innerType)){ + sampleJson = createJSONSample(getInlineModel(innerType)); // may return null, if type isn't correct + } + + + if (sampleJson) { + sampleJson = listType ? [sampleJson] : sampleJson; + + if (typeof sampleJson === 'string') { + return sampleJson; + } else if (_.isObject(sampleJson)) { + var t = sampleJson; + + if (sampleJson instanceof Array && sampleJson.length > 0) { + t = sampleJson[0]; + } + + if (t.nodeName && typeof t === 'Node') { + var xmlString = new XMLSerializer().serializeToString(t); + + return formatXml(xmlString); + } else { + return JSON.stringify(sampleJson, null, 2); + } + } else { + return sampleJson; + } + } + }; + + var wrapTag = function (name, value, attrs) { + var str, attributes; + + attrs = attrs || []; + + attributes = attrs.map(function (attr) { + return ' ' + attr.name + '="' + attr.value + '"'; + }).join(''); + + if (!name) { + return getErrorMessage('Node name is not provided'); + } + + str = [ + '<', name, + attributes, + '>', + value, + '</', name, '>' + ]; + + return str.join(''); + }; + + // Commenting this funtion as the names are now determined beforehand and the prefix part is exposed as a separate function | https://github.com/swagger-api/swagger-ui/issues/2577 + /** var getName = function (name, xml) { + var result = name || ''; + + xml = xml || {}; + + if (xml.name) { + result = xml.name; + } + + if (xml.prefix) { + result = xml.prefix + ':' + result; + } + + return result; + }; + */ + + var getPrefix = function (name, xml) { + var result = name || ''; + + xml = xml || {}; + + if (xml.prefix) { + result = xml.prefix + ':' + result; + } + + return result; + }; + + var getNamespace = function (xml) { + var namespace = ''; + var name = 'xmlns'; + + xml = xml || {}; + + if (xml.namespace) { + namespace = xml.namespace; + } else { + return namespace; + } + + if (xml.prefix) { + name += ':' + xml.prefix; + } + + return { + name: name, + value: namespace + }; + }; + + var createArrayXML = function (descriptor) { + var name = descriptor.name; + var config = descriptor.config; + var definition = descriptor.definition; + var models = descriptor.models; + var value; + var items = definition.items; + var xml = definition.xml || {}; + var namespace = getNamespace(xml); + var attributes = []; + + if (!items) { return getErrorMessage(); } + var key = name; + // If there is a name specified for the array elements, use that for the array elements name | https://github.com/swagger-api/swagger-ui/issues/2577 + if(items.xml && items.xml.name) { + key = items.xml.name; + } + value = createSchemaXML(key, items, models, config); + if (namespace) { + attributes.push(namespace); + } + + if (xml.wrapped) { + value = wrapTag(name, value, attributes); + } + + return value; + }; + + var getPrimitiveSignature = function (schema) { + var type, items; + + schema = schema || {}; + items = schema.items || {}; + type = schema.type || ''; + + switch (type) { + case 'object': return 'Object is not a primitive'; + case 'array' : return 'Array[' + (items.format || items.type) + ']'; + default: return schema.format || type; + } + }; + + var createPrimitiveXML = function (descriptor) { + var name = descriptor.name; + var definition = descriptor.definition; + var primitivesMap = { + 'string': { + 'date': new Date(1).toISOString().split('T')[0], + 'date-time' : new Date(1).toISOString(), + 'default': 'string' + }, + 'integer': { + 'default': 1 + }, + 'number': { + 'default': 1.1 + }, + 'boolean': { + 'default': true + } + }; + var type = definition.type; + var format = definition.format; + var xml = definition.xml || {}; + var namespace = getNamespace(xml); + var attributes = []; + var value; + + if (_.keys(primitivesMap).indexOf(type) < 0) { return getErrorMessage(); } + + if (_.isArray(definition.enum)){ + value = definition.enum[0]; + } else { + value = definition.example || primitivesMap[type][format] || primitivesMap[type].default; + } + + if (xml.attribute) { + return {name: name, value: value}; + } + + if (namespace) { + attributes.push(namespace); + } + + return wrapTag(name, value, attributes); + }; + + function createObjectXML (descriptor) { + var name = descriptor.name; + var definition = descriptor.definition; + var config = descriptor.config; + var models = descriptor.models; + var isParam = descriptor.config.isParam; + var serializedProperties; + var attrs = []; + var properties = definition.properties; + var additionalProperties = definition.additionalProperties; + var xml = definition.xml; + var namespace = getNamespace(xml); + + if (namespace) { + attrs.push(namespace); + } + + if (!properties && !additionalProperties) { return getErrorMessage(); } + + properties = properties || {}; + + serializedProperties = _.map(properties, function (prop, key) { + var xml, result; + + if (isParam && prop.readOnly) { + return ''; + } + + xml = prop.xml || {}; + result = createSchemaXML(key, prop, models, config); + + if (xml.attribute) { + attrs.push(result); + return ''; + } + + return result; + }).join(''); + + if (additionalProperties) { + serializedProperties += '<!-- additional elements allowed -->'; + } + + return wrapTag(name, serializedProperties, attrs); + } + + function getInfiniteLoopMessage (name, loopTo) { + return wrapTag(name, '<!-- Infinite loop $ref:' + loopTo + ' -->'); + } + + function getErrorMessage (details) { + details = details ? ': ' + details : ''; + return '<!-- invalid XML' + details + ' -->'; + } + + function createSchemaXML (name, definition, models, config) { + var $ref = _.isObject(definition) ? definition.$ref : null; + var output, index; + config = config || {}; + config.modelsToIgnore = config.modelsToIgnore || []; + + var descriptor = _.isString($ref) ? getDescriptorByRef($ref, name, models, config) + : getDescriptor(name, definition, models, config); + + if (!descriptor) { + return getErrorMessage(); + } + + switch (descriptor.type) { + case 'array': + output = createArrayXML(descriptor); break; + case 'object': + output = createObjectXML(descriptor); break; + case 'loop': + output = getInfiniteLoopMessage(descriptor.name, descriptor.config.loopTo); break; + default: + output = createPrimitiveXML(descriptor); + } + + if ($ref && descriptor.type !== 'loop') { + index = config.modelsToIgnore.indexOf($ref); + if (index > -1) { + config.modelsToIgnore.splice(index, 1); + } + } + + return output; + } + + function Descriptor (name, type, definition, models, config) { + if (arguments.length < 4) { + throw new Error(); + } + this.config = config || {}; + this.config.modelsToIgnore = this.config.modelsToIgnore || []; + // name is already set by getDescriptorByRef or getDescriptor function depending on the type. Only prefix, if present is needed to be set here | https://github.com/swagger-api/swagger-ui/issues/2577 + this.name = getPrefix(name, definition.xml); + this.definition = definition; + this.models = models; + this.type = type; + } + + function getDescriptorByRef($ref, name, models, config) { + var modelType = simpleRef($ref); + var model = models[modelType] || {}; + var type = model.definition && model.definition.type ? model.definition.type : 'object'; + // If model definition xml name is present, then that will be preferred over model name. This is the case of preferring XmlElement name over XmlRootElement name if XmlElement name is provided | https://github.com/swagger-api/swagger-ui/issues/2577 + if(model.definition && model.definition.xml && model.definition.xml.name) { + name = name || model.definition.xml.name || model.name; + } + // else only model name will be considered for determination | https://github.com/swagger-api/swagger-ui/issues/2577 + else { + name = name || model.name; + } + + if (config.modelsToIgnore.indexOf($ref) > -1) { + type = 'loop'; + config.loopTo = modelType; + } else { + config.modelsToIgnore.push($ref); + } + + if (!model.definition) { + return null; + } + return new Descriptor(name, type, model.definition, models, config); + } + + function getDescriptor (name, definition, models, config){ + var type = definition.type || 'object'; + // If definition xml name is present, then that will be preferred over name | https://github.com/swagger-api/swagger-ui/issues/2577 + if(definition.xml && definition.xml.name) { + name = definition.xml.name || name; + } + if (!definition) { + return null; + } + + return new Descriptor(name, type, definition, models, config); + } + + function createXMLSample (name, definition, models, isParam) { + var prolog = '<?xml version="1.0"?>'; + + return formatXml(prolog + createSchemaXML(name, definition, models, { isParam: isParam } )); + } + + return { + getModelSignature: getModelSignature, + createJSONSample: createJSONSample, + getParameterModelSignature: getParameterModelSignature, + createParameterJSONSample: createParameterJSONSample, + createSchemaXML: createSchemaXML, + createXMLSample: createXMLSample, + getPrimitiveSignature: getPrimitiveSignature + }; + +})(); + +'use strict'; + +SwaggerUi.Views.PopupView = Backbone.View.extend({ + events: { + 'click .api-popup-cancel': 'cancelClick' + }, + + template: Handlebars.templates.popup, + className: 'api-popup-dialog', + + selectors: { + content: '.api-popup-content', + main : '#swagger-ui-container' + }, + + initialize: function(){ + this.$el.html(this.template(this.model)); + }, + + render: function () { + this.$(this.selectors.content).append(this.model.content); + $(this.selectors.main).first().append(this.el); + this.showPopup(); + + return this; + }, + + showPopup: function () { + this.$el.show(); + }, + + cancelClick: function () { + this.remove(); + } + +}); + +'use strict'; + SwaggerUi.Views.ResourceView = Backbone.View.extend({ initialize: function(opts) { opts = opts || {}; @@ -26159,6 +25159,7 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({ if (this.model.description) { this.model.summary = this.model.description; } + this.number = 0; }, render: function(){ @@ -26220,6 +25221,7 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({ Docs[fnName](e.currentTarget.getAttribute('data-id')); } }); + 'use strict'; SwaggerUi.Views.ResponseContentTypeView = Backbone.View.extend({ @@ -26237,11 +25239,11 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({ events: { 'click a.description-link' : 'switchToDescription', 'click a.snippet-link' : 'switchToSnippet', - 'mousedown .snippet' : 'snippetToTextArea' + 'mousedown .snippet_json' : 'jsonSnippetMouseDown', + 'mousedown .snippet_xml' : 'xmlSnippetMouseDown' }, initialize: function () { - }, render: function(){ @@ -26253,12 +25255,6 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({ } else { this.switchToSnippet(); } - - this.isParam = this.model.isParam; - - if (this.isParam) { - $('.notice', $(this.el)).text('Click to set as parameter value'); - } return this; }, @@ -26277,27 +25273,39 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({ switchToSnippet: function(e){ if (e) { e.preventDefault(); } - $('.description', $(this.el)).hide(); $('.snippet', $(this.el)).show(); + $('.description', $(this.el)).hide(); $('.snippet-link', $(this.el)).addClass('selected'); $('.description-link', $(this.el)).removeClass('selected'); }, // handler for snippet to text area - snippetToTextArea: function(e) { - if (this.isParam) { + snippetToTextArea: function(val) { + var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode)); + + // Fix for bug in IE 10/11 which causes placeholder text to be copied to "value" + if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) { + textArea.val(val); + // TODO move this code outside of the view and expose an event instead + if( this.model.jsonEditor && this.model.jsonEditor.isEnabled()){ + this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)); + } + } + }, + + jsonSnippetMouseDown: function (e) { + if (this.model.isParam) { if (e) { e.preventDefault(); } - var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode)); + this.snippetToTextArea(this.model.sampleJSON); + } + }, - // Fix for bug in IE 10/11 which causes placeholder text to be copied to "value" - if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) { - textArea.val(this.model.sampleJSON); - // TODO move this code outside of the view and expose an event instead - if( this.model.jsonEditor && this.model.jsonEditor.isEnabled()){ - this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)); - } - } + xmlSnippetMouseDown: function (e) { + if (this.model.isParam) { + if (e) { e.preventDefault(); } + + this.snippetToTextArea(this.model.sampleXML); } } }); @@ -26310,21 +25318,27 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({ }, render: function(){ + var responseModel, responseModelView; + var value = this.router.api.models[this.model.responseModel]; $(this.el).html(Handlebars.templates.status_code(this.model)); if (this.router.api.models.hasOwnProperty(this.model.responseModel)) { - var responseModel = { - sampleJSON: JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(), null, 2), + responseModel = { + sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2), + sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample('', this.model.schema, this.router.api.models) : false, isParam: false, - signature: this.router.api.models[this.model.responseModel].getMockSignature(), + signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models), defaultRendering: this.model.defaultRendering }; - - var responseModelView = new SwaggerUi.Views.SignatureView({model: responseModel, tagName: 'div'}); - $('.model-signature', this.$el).append(responseModelView.render().el); } else { - $('.model-signature', this.$el).html(''); + responseModel = { + signature: SwaggerUi.partials.signature.getPrimitiveSignature(this.model.schema) + }; } + + responseModelView = new SwaggerUi.Views.SignatureView({model: responseModel, tagName: 'div'}); + $('.model-signature', this.$el).append(responseModelView.render().el); return this; } });}).call(this); +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlbXBsYXRlcy5qcyIsImRvYy5qcyIsImVzNS1zaGltLmpzIiwiaGVscGVycy9oYW5kbGViYXJzLmpzIiwic2FuaXRpemUtaHRtbC5taW4uanMiLCJub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaW5kZXguanMiLCJsaWIvYXV0aC5qcyIsImxpYi9jbGllbnQuanMiLCJsaWIvaGVscGVycy5qcyIsImxpYi9odHRwLmpzIiwibGliL3Jlc29sdmVyLmpzIiwibGliL3NjaGVtYS1tYXJrdXAuanMiLCJsaWIvc3BlYy1jb252ZXJ0ZXIuanMiLCJsaWIvdHlwZXMvbW9kZWwuanMiLCJsaWIvdHlwZXMvb3BlcmF0aW9uLmpzIiwibGliL3R5cGVzL29wZXJhdGlvbkdyb3VwLmpzIiwibm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL3Byb2Nlc3MvYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2J1ZmZlci9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9idWZmZXIvbm9kZV9tb2R1bGVzL2Jhc2U2NC1qcy9saWIvYjY0LmpzIiwibm9kZV9tb2R1bGVzL2J1ZmZlci9ub2RlX21vZHVsZXMvaWVlZT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b3JjZUFzc2lnbikge1xuICAgICAgICAgICAgICAgIGlmICghZm9yY2VBc3NpZ24gJiYgKG5hbWUgaW4gb2JqZWN0KSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICRPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqZWN0LCBuYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogbWV0aG9kXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZGVmaW5lUHJvcGVydHkgPSBmdW5jdGlvbiAob2JqZWN0LCBuYW1lLCBtZXRob2QsIGZvcmNlQXNzaWduKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFmb3JjZUFzc2lnbiAmJiAobmFtZSBpbiBvYmplY3QpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb2JqZWN0W25hbWVdID0gbWV0aG9kO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gZGVmaW5lUHJvcGVydGllcyhvYmplY3QsIG1hcCwgZm9yY2VBc3NpZ24pIHtcbiAgICAgICAgICAgIGZvciAodmFyIG5hbWUgaW4gbWFwKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhhcy5jYWxsKG1hcCwgbmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmaW5lUHJvcGVydHkob2JqZWN0LCBuYW1lLCBtYXBbbmFtZV0sIGZvcmNlQXNzaWduKTtcbiAgICAgICAgICAgICAgIC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0gMCAmJiBuICE9PSAoMSAvIDApICYmIG4gIT09IC0oMSAvIDApKSB7XG4gICAgICAgICAgICAgICAgbiA9IChuID4gMCB8fCAtMSkgKiBNYXRoLmZsb29yKE1hdGguYWJzKG4pKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBuO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qIHJlcGxhY2VhYmxlIHdpdGggaHR0cHM6Ly9ucG1qcy5jb20vcGFja2FnZS9lcy1hYnN0cmFjdCBFUzUuVG9QcmltaXRpdmUgKi9cbiAgICAgICAgVG9QcmltaXRpdmU6IGZ1bmN0aW9uIFRvUHJpbWl0aXZlKGlucHV0KSB7XG4gICAgICAgICAgICB2YXIgdmFsLCB2YWx1ZU9mLCB0b1N0cjtcbiAgICAgICAgICAgIGlmIChpc1ByaW1pdGl2ZShpbnB1dCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWx1ZU9mID0gaW5wdXQudmFsdWVPZjtcbiAgICAgICAgICAgIGlmIChpc0NhbGxhYmxlKHZhbHVlT2YpKSB7XG4gICAgICAgICAgICAgICAgdmFsID0gdmFsdWVPZi5jYWxsKGlucHV0KTtcbiAgICAgICAgICAgICAgICBpZiAoaXNQcmltaXRpdmUodmFsKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRvU3RyID0gaW5wdXQudG9TdHJpbmc7XG4gICAgICAgICAgICBpZiAoaXNDYWxsYWJsZSh0b1N0cikpIHtcbiAgICAgICAgICAgICAgICB2YWwgPSB0b1N0ci5jYWxsKGlucHV0KTtcbiAgICAgICAgICAgICAgICBpZiAoaXNQcmltaXRpdmUodmFsKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgIC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BbW1RhcmdldEZ1bmN0aW9uXV1cbiAgICAgICAgICAgICAgICAgICAgLy8gICBpbnRlcm5hbCBwcm9wZXJ0eS5cbiAgICAgICAgICAgICAgICAgICAgLy8gMi4gSWYgdGFyZ2V0IGhhcyBubyBbW0NvbnN0cnVjdF1dIGludGVybmFsIG1ldGhvZCwgYVxuICAgICAgICAgICAgICAgICAgICAvLyAgIFR5cGVFcnJvciBleGNlcHRpb24gaXMgdGhyb3duLlxuICAgICAgICAgICAgICAgICAgICAvLyAzLiBMZXQgYm91bmRBcmdzIGJlIHRoZSB2YWx1ZSBvZiBGJ3MgW1tCb3VuZEFyZ3NdXSBpbnRlcm5hbFxuICAgICAgICAgICAgICAgICAgICAvLyAgIHByb3BlcnR5LlxuICAgICAgICAgICAgICAgICAgICAvLyA0LiBMZXQgYXJncyBiZSBhIG5ldyBsaXN0IGNvbnRhaW5pbmcgdGhlIHNhbWUgdmFsdWVzIGFzIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyAgIGxpc3QgYm91bmRBcmdzIGluIHRoZSBzYW1lIG9yZGVyIGZvbGxvd2VkIGJ5IHRoZSBzYW1lXG4gICAgICAgICAgICAgICAgICAgIC8vICAgdmFsdWVzIGFzIHRoZSBsaXN0IEV4dHJhQXJncyBpbiB0aGUgc2FtZSBvcmRlci5cbiAgICAgICAgICAgICAgICAgICAgLy8gNS4gUmV0dXJuIHRoZSByZXN1bHQgb2YgY2FsbGluZyB0aGUgW1tDb25zdHJ1Y3RdXSBpbnRlcm5hbFxuICAgICAgICAgICAgICAgICAgICAvLyAgIG1ldGhvZCBvZiB0YXJnZXQgcHJvdmlkaW5nIGFyZ3MgYXMgdGhlIGFyZ3VtZW50cy5cblxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gYXBwbHkuY2FsbChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9jb25jYXQuY2FsbChhcmdzLCBhcnJheV9zbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkT2JqZWN0KHJlc3VsdCkgPT09IHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcblxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIDE1LjMuNC41LjEgW1tDYWxsXV1cbiAgICAgICAgICAgICAgICAgICAgLy8gV2hlbiB0aGUgW1tDYWxsXV0gaW50ZXJuYWwgbWV0aG9kIG9mIGEgZnVuY3Rpb24gb2JqZWN0LCBGLFxuICAgICAgICAgICAgICAgICAgICAvLyB3aGljaCB3YXMgY3JlYXRlZCB1c2luZyB0aGUgYmluZCBmdW5jdGlvbiBpcyBjYWxsZWQgd2l0aCBhXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgdmFsdWUgYW5kIGEgbGlzdCBvZiBhcmd1bWVudHMgRXh0cmFBcmdzLCB0aGUgZm9sbG93aW5nXG4gICAgICAgICAgICAgICAgICAgIC8vIHN0ZXBzIGFyZSB0YWtlbjpcbiAgICAgICAgICAgICAgICAgICAgLy8gMS4gTGV0IGJvdW5kQXJncyBiZSB0aGUgdmFsdWUgb2YgRidzIFtbQm91bmRBcmdzXV0gaW50ZXJuYWxcbiAgICAgICAgICAgICAgICAgICAgLy8gICBwcm9wZXJ0eS5cbiAgICAgICAgICAgICAgICAgICAgLy8gMi4gTGV0IGJvdW5kVGhpcyBiZSB0aGUgdmFsdWUgb2YgRidzIFtbQm91bmRUaGlzXV0gaW50ZXJuYWxcbiAgICAgICAgICAgICAgICAgICAgLy8gICBwcm9wZXJ0eS5cbiAgICAgICAgICAgICAgICAgICAgLy8gMy4gTGV0IHRhcmdldCBiZSB0aGUgdmFsdWUgb2YgRidzIFtbVGFyZ2V0RnVuY3Rpb25dXSBpbnRlcm5hbFxuICAgICAgICAgICAgICAgICAgICAvLyAgIHByb3BlcnR5LlxuICAgICAgICAgICAgICAgICAgICAvLyA0LiBMZXQgYXJncyBiZSBhIG5ldyBsaXN0IGNvbnRhaW5pbmcgdGhlIHNhbWUgdmFsdWVzIGFzIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyAgIGxpc3QgYm91bmRBcmdzIGluIHRoZSBzYW1lIG9yZGVyIGZvbGxvd2VkIGJ5IHRoZSBzYW1lXG4gICAgICAgICAgICAgICAgICAgIC8vICAgdmFsdWVzIGFzIHRoZSBsaXN0IEV4dHJhQXJncyBpbiB0aGUgc2FtZSBvcmRlci5cbiAgICAgICAgICAgICAgICAgICAgLy8gNS4gUmV0dXJuIHRoZSByZXN1bHQgb2YgY2FsbGluZyB0aGUgW1tDYWxsXV0gaW50ZXJuYWwgbWV0aG9kXG4gICAgICAgICAgICAgICAgICAgIC8vICAgb2YgdGFyZ2V0IHByb3ZpZGluZyBib3VuZFRoaXMgYXMgdGhlIHRoaXMgdmFsdWUgYW5kXG4gICAgICAgICAgICAgICAgICAgIC8vICAgcHJvdmlkaW5nIGFyZ3MgYXMgdGhlIGFyZ3VtZW50cy5cblxuICAgICAgICAgICAgICAgICAgICAvLyBlcXVpdjogdGFyZ2V0LmNhbGwodGhpcywgLi4uYm91bmRBcmdzLCAuLi5hcmdzKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXBwbHkuY2FsbChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9jb25jYXQuY2FsbChhcmdzLCBhcnJheV9zbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgIC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iBieS1pbmRleCBhY2Nlc3Mgb2Ygc3RyaW5nIGNoYXJhY3RlcnMgKElFIDwgOSlcbiAgICAvLyBhbmQgZmFpbHVyZSBvZiBgMCBpbiBib3hlZFN0cmluZ2AgKFJoaW5vKVxuICAgIHZhciBib3hlZFN0cmluZyA9ICRPYmplY3QoJ2EnKTtcbiAgICB2YXIgc3BsaXRTdHJpbmcgPSBib3hlZFN0cmluZ1swXSAhPT0gJ2EnIHx8ICEoMCBpbiBib3hlZFN0cmluZyk7XG5cbiAgICB2YXIgcHJvcGVybHlCb3hlc0NvbnRleHQgPSBmdW5jdGlvbiBwcm9wZXJseUJveGVkKG1ldGhvZCkge1xuICAgICAgICAvLyBDaGVjayBub2RlIDAuNi4yMSBidWcgd2hlcmUgdGhpcmQgcGFyYW1ldGVyIGlzIG5vdCBib3hlZFxuICAgICAgICB2YXIgcHJvcGVybHlCb3hlc05vblN0cmljdCA9IHRydWU7XG4gICAgICAgIHZhciBwcm9wZXJseUJveGVzU3RyaWN0ID0gdHJ1ZTtcbiAgICAgICAgdmFyIHRocmV3RXhjZXB0aW9uID0gZmFsc2U7XG4gICAgICAgIGlmIChtZXRob2QpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbWV0aG9kLmNhbGwoJ2ZvbycsIGZ1bmN0aW9uIChfLCBfXywgY29udGV4dCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbnRleHQgIT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJseUJveGVzTm9uU3RyaWN0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIG1ldGhvZC5jYWxsKFsxXSwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgICAgICAgICAgICAgICAgcHJvcGVybHlCb3hlc1N0cmljdCA9IHR5cGVvZiB0aGlzID09PSAnc3RyaW5nJztcbiAgICAgICAgICAgICAgICB9LCAneCcpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHRocmV3RXhjZXB0aW9uID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gISFtZXRob2QgJiYgIXRocmV3RXhjZXB0aW9uICYmIHByb3Blcmx5Qm94ZXNOb25TdHJpY3QgJiYgcHJvcGVybHlCb3hlc1N0cmljdDtcbiAgICB9O1xuXG4gICAgZGVmaW5lUHJvcGVydGllcyhBcnJheVByb3RvdHlwZSwge1xuICAgICAgICBmb3JFYWNoOiBmdW5jdGlvbiBmb3JFYWNoKGNhbGxiYWNrZm4vKiwgdGhpc0FyZyovKSB7XG4gICAgICAgICAgICB2YXIgb2JqZWN0ID0gRVMuVG9PYmplY3QodGhpcyk7XG4gICAgICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIGlzU3RyaW5nKHRoaXMpID8gc3RyU3BsaXQodGhpcywgJycpIDogb2JqZWN0O1xuICAgICAgICAgICAgdmFyIGkgPSAtMTtcbiAgICAgICAgICAgIHZhciBsZW5ndGggPSBFUy5Ub1VpbnQzMihzZWxmLmxlbmd0aCk7XG4gICAgICAgICAgICB2YXIgVDtcbiAgICAgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgICAgIFQgPSBhcmd1bWVudHNbMV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIElmIG5vIGNhbGxiYWNrIGZ1bmN0aW9uIG9yIGlmIGNhbGxiYWNrIGlzIG5vdCBhIGNhbGxhYmxlIGZ1bmN0aW9uXG4gICAgICAgICAgICBpZiAoIWlzQ2FsbGFibGUoY2FsbGJhY2tmbikpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdBcnJheS5wcm90b3R5cGUuZm9yRWFjaCBjYWxsYmFjayBtdXN0IGJlIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgd2hpbGUgKCsraSA8IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSW52b2tlIHRoZSBjYWxsYmFjayBmdW5jdGlvbiB3aXRoIGNhbGwsIHBhc3NpbmcgYXJndW1lbnRzOlxuICAgICAgICAgICAgICAgICAgICAvLyBjb250ZXh0LCBwcm9wZXJ0eSB2YWx1ZSwgcHJvcGVydHkga2V5LCB0aGlzQXJnIG9iamVjdFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIFQgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuLmNhbGwoVCwgc2VsZltpXSwgaSwgb2JqZWN0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sICFwcm9wZXJseUJveGVzQ29udGV4dChBcnJheVByb3RvdHlwZS5mb3JFYWNoKSk7XG5cbiAgICAvLyBFUzUgMTUuNC40LjE5XG4gICAgLy8gaHR0cDovL2VzNS5naXRodWIuY29tLyN4MTUuNC40LjE5XG4gICAgLy8gaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4vQ29yZV9KYXZhU2NyaXB0XzEuNV9SZWZlcmVuY2UvT2JqZWN0cy9BcnJheS9tYXBcbiAgICBkZWZpbmVQcm9wZXJ0aWVzKEFycmF5UHJvdG90eXBlLCB7XG4gICAgICAgIG1hcDogZnVuY3Rpb24gbWFwKGNhbGxiYWNrZm4vKiwgdGhpc0FyZyovKSB7XG4gICAgICAgICAgICB2YXIgb2JqZWN0ID0gRVMuVG9PYmplY3QodGhpcyk7XG4gICAgICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIGlzU3RyaW5nKHRoaXMpID8gc3RyU3BsaXQodGhpcywgJycpIDogb2JqZWN0O1xuICAgICAgICAgICAgdmFyIGxlbmd0aCA9IEVTLlRvVWludDMyKHNlbGYubGVuZ3RoKTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSAkQXJyYXkobGVuZ3RoKTtcbiAgICAgICAgICAgIHZhciBUO1xuICAgICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgVCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gSWYgbm8gY2FsbGJhY2sgZnVuY3Rpb24gb3IgaWYgY2FsbGJhY2sgaXMgbm90IGEgY2FsbGFibGUgZnVuY3Rpb25cbiAgICAgICAgICAgIGlmICghaXNDYWxsYWJsZShjYWxsYmFja2ZuKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0FycmF5LnByb3RvdHlwZS5tYXAgY2FsbGJhY2sgbXVzdCBiZSBhIGZ1bmN0aW9uJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgVCA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFtpXSA9IGNhbGxiYWNrZm4oc2VsZltpXSwgaSwgb2JqZWN0KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFtpXSA9IGNhbGxiYWNrZm4uY2FsbChULCBzZWxmW2ldLCBpLCBvYmplY3QpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfVxuICAgIH0sICFwcm9wZXJseUJveGVzQ29udGV4dChBcnJheVByb3RvdHlwZS5tYXApKTtcblxuICAgIC8vIEVTNSAxNS40LjQuMjBcbiAgICAvLyBodHRwOi8vZXM1LmdpdGh1Yi5jb20vI3gxNS40LjQuMjBcbiAgICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi9Db3JlX0phdmFTY3JpcHRfMS41X1JlZmVyZW5jZS9PYmplY3RzL0FycmF5L2ZpbHRlclxuICAgIGRlZmluZVByb3BlcnRpZXMoQXJyYXlQcm90b3R5cGUsIHtcbiAgICAgICAgZmlsdGVyOiBmdW5jdGlvbiBmaWx0ZXIoY2FsbGJhY2tmbi8qLCB0aGlzQXJnKi8pIHtcbiAgICAgICAgICAgIHZhciBvYmplY3QgPSBFUy5Ub09iamVjdCh0aGlzKTtcbiAgICAgICAgICAgIHZhciBzZWxmID0gc3BsaXRTdHJpbmcgJiYgaXNTdHJpbmcodGhpcykgPyBzdHJTcGxpdCh0aGlzLCAnJykgOiBvYmplY3Q7XG4gICAgICAgICAgICB2YXIgbGVuZ3RoID0gRVMuVG9VaW50MzIoc2VsZi5sZW5ndGgpO1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IFtdO1xuICAgICAgICAgICAgdmFyIHZhbHVlO1xuICAgICAgICAgICAgdmFyIFQ7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICBUID0gYXJndW1lbnRzWzFdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBJZiBubyBjYWxsYmFjayBmdW5jdGlvbiBvciBpZiBjYWxsYmFjayBpcyBub3QgYSBjYWxsYWJsZSBmdW5jdGlvblxuICAgICAgICAgICAgaWYgKCFpc0NhbGxhYmxlKGNhbGxiYWNrZm4pKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJyYXkucHJvdG90eXBlLmZpbHRlciBjYWxsYmFjayBtdXN0IGJlIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBzZWxmW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIFQgPT09ICd1bmRlZmluZWQnID8gY2FsbGJhY2tmbih2YWx1ZSwgaSwgb2JqZWN0KSA6IGNhbGxiYWNrZm4uY2FsbChULCB2YWx1ZSwgaSwgb2JqZWN0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHVzaENhbGwocmVzdWx0LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9XG4gICAgfSwgIXByb3Blcmx5Qm94ZXNDb250ZXh0KEFycmF5UHJvdG90eXBlLmZpbHRlcikpO1xuXG4gICAgLy8gRVM1IDE1LjQuNC4xNlxuICAgIC8vIGh0dHA6Ly9lczUuZ2l0aHViLmNvbS8jeDE1LjQuNC4xNlxuICAgIC8vIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL0FycmF5L2V2ZXJ5XG4gICAgZGVmaW5lUHJvcGVydGllcyhBcnJheVByb3RvdHlwZSwge1xuICAgICAgICBldmVyeTogZnVuY3Rpb24gZXZlcnkoY2FsbGJhY2tmbi8qLCB0aGlzQXJnKi8pIHtcbiAgICAgICAgICAgIHZhciBvYmplY3QgPSBFUy5Ub09iamVjdCh0aGlzKTtcbiAgICAgICAgICAgIHZhciBzZWxmID0gc3BsaXRTdHJpbmcgJiYgaXNTdHJpbmcodGhpcykgPyBzdHJTcGxpdCh0aGlzLCAnJykgOiBvYmplY3Q7XG4gICAgICAgICAgICB2YXIgbGVuZ3RoID0gRVMuVG9VaW50MzIoc2VsZi5sZW5ndGgpO1xuICAgICAgICAgICAgdmFyIFQ7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICBUID0gYXJndW1lbnRzWzFdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBJZiBubyBjYWxsYmFjayBmdW5jdGlvbiBvciBpZiBjYWxsYmFjayBpcyBub3QgYSBjYWxsYWJsZSBmdW5jdGlvblxuICAgICAgICAgICAgaWYgKCFpc0NhbGxhYmxlKGNhbGxiYWNrZm4pKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQXJyYXkucHJvdG90eXBlLmV2ZXJ5IGNhbGxiYWNrIG11c3QgYmUgYSBmdW5jdGlvbicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGkgaW4gc2VsZiAmJiAhKHR5cGVvZiBUID09PSAndW5kZWZpbmVkJyA/IGNhbGxiYWNrZm4oc2VsZltpXSwgaSwgb2JqZWN0KSA6IGNhbGxiYWNrZm4uY2FsbChULCBzZWxmW2ldLCBpLCBvYmplY3QpKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuI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yosIGluaXRpYWxWYWx1ZSovKSB7XG4gICAgICAgICAgICB2YXIgb2JqZWN0ID0gRVMuVG9PYmplY3QodGhpcyk7XG4gICAgICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIGlzU3RyaW5nKHRoaXMpID8gc3RyU3BsaXQodGhpcywgJycpIDogb2JqZWN0O1xuICAgICAgICAgICAgdmFyIGxlbmd0aCA9IEVTLlRvVWludDMyKHNlbGYubGVuZ3RoKTtcblxuICAgICAgICAgICAgLy8gSWYgbm8gY2FsbGJhY2sgZnVuY3Rpb24gb3IgaWYgY2FsbGJhY2sgaXMgbm90IGEgY2FsbGFibGUgZnVuY3Rpb25cbiAgICAgICAgICAgIGlmICghaXNDYWxsYWJsZShjYWxsYmFja2ZuKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ0FycmF5LnByb3RvdHlwZS5yZWR1Y2UgY2FsbGJhY2sgbXVzdCBiZSBhIGZ1bmN0aW9uJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG5vIHZhbHVlIHRvIHJldHVybiBpZiBubyBpbml0aWFsIHZhbHVlIGFuZCBhbiBlbXB0eSBhcnJheVxuICAgICAgICAgICAgaWYgKGxlbmd0aCA9PT0gMCAmJiBhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigncmVkdWNlIG9mIGVtcHR5IGFycmF5IHdpdGggbm8gaW5pdGlhbCB2YWx1ZScpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgICAgICB2YXIgcmVzdWx0O1xuICAgICAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPj0gMikge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBzZWxmW2krK107XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIGFycmF5IGNvbnRhaW5zIG5vIHZhbHVlcywgbm8gaW5pdGlhbCB2YWx1ZSB0byByZXR1cm5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCsraSA+PSBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ3JlZHVjZSBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGkgaW4gc2VsZikge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBjYWxsYmFja2ZuKHJlc3VsdCwgc2VsZltpXSwgaSwgb2JqZWN0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH1cbiAgICB9LCAhcmVkdWNlQ29lcmNlc1RvT2JqZWN0KTtcblxuICAgIC8vIEVTNSAxNS40LjQuMjJcbiAgICAvLyBodHRwOi8vZXM1LmdpdGh1Yi5jb20vI3gxNS40LjQuMjJcbiAgICAvLyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi9Db3JlX0phdmFTY3JpcHRfMS41X1JlZmVyZW5jZS9PYmplY3RzL0FycmF5L3JlZHVjZVJpZ2h0XG4gICAgdmFyIHJlZHVjZVJpZ2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IHZhbHVlLCBlbXB0eSBhcnJheVxuICAgICAgICAgICAgaWYgKGxlbmd0aCA9PT0gMCAmJiBhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigncmVkdWNlUmlnaHQgb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlJyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciByZXN1bHQ7XG4gICAgICAgICAgICB2YXIgaSA9IGxlbmd0aCAtIDE7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+PSAyKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gYXJndW1lbnRzWzFdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHNlbGZbaS0tXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgYXJyYXkgY29udGFpbnMgbm8gdmFsdWVzLCBubyBpbml0aWFsIHZhbHVlIHRvIHJldHVyblxuICAgICAgICAgICAgICAgICAgICBpZiAoLS1pIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigncmVkdWNlUmlnaHQgb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGkgPCAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gY2FsbGJhY2tmbihyZXN1bHQsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoaS0tKTtcblxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfVxuICAgIH0sICFyZWR1Y2VSaWdodENvZXJjZXNUb09iamVjdCk7XG5cbiAgICAvLyBFUzUgMTUuNC40LjE0XG4gICAgLy8gaHR0cDovL2VzNS5naXRodWIuY29tLyN4MTUuNC40LjE0XG4gICAgLy8gaHR0cHM6Ly9kZXZlbG9wZXIubW96aWxsYS5vcmcvZW4vSmF2YVNjcmlwdC9SZWZlcmVuY2UvR2xvYmFsX09iamVjdHMvQXJyYXkvaW5kZXhPZlxuICAgIHZhciBoYXNGaXJlZm94MkluZGV4T2ZCdWcgPSBBcnJheVByb3RvdHlwZS5pbmRleE9mICYmIFswLCAxXS5pbmRleE9mKDEsIDIpICE9PSAtMTtcbiAgICBkZWZpbmVQcm9wZXJ0aWVzKEFycmF5UHJvdG90eXBlLCB7XG4gICAgICAgIGluZGV4T2Y6IGZ1bmN0aW9uIGluZGV4T2Yoc2VhcmNoRWxlbWVudC8qLCBmcm9tSW5kZXggKi8pIHtcbiAgICAgICAgICAgIHZhciBzZWxmID0gc3BsaXRTdHJpbmcgJiYgaXNTdHJpbmcodGhpcykgPyBzdHJTcGxpdCh0aGlzLCAnJykgOiBFUy5Ub09iamVjdCh0aGlzKTtcbiAgICAgICAgICAgIHZhciBsZW5ndGggPSBFUy5Ub1VpbnQzMihzZWxmLmxlbmd0aCk7XG5cbiAgICAgICAgICAgIGlmIChsZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhci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pdFN0cmluZyAmJiBpc1N0cmluZyh0aGlzKSA/IHN0clNwbGl0KHRoaXMsICcnKSA6IEVTLlRvT2JqZWN0KHRoaXMpO1xuICAgICAgICAgICAgdmFyIGxlbmd0aCA9IEVTLlRvVWludDMyKHNlbGYubGVuZ3RoKTtcblxuICAgICAgICAgICAgaWYgKGxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBpID0gbGVuZ3RoIC0gMTtcbiAgICAgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgICAgIGkgPSBtaW4oaSwgRVMuVG9JbnRlZ2VyKGFyZ3VtZW50c1sxXSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gaGFuZGxlIG5lZ2F0aXZlIGluZGljZXNcbiAgICAgICAgICAgIGkgPSBpID49IDAgPyBpIDogbGVuZ3RoIC0gTWF0aC5hYnMoaSk7XG4gICAgICAgICAgICBmb3IgKDsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmICYmIHNlYXJjaEVsZW1lbnQgPT09IHNlbGZbaV0pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG4gICAgfSwgaGFzRmlyZWZveDJMYXN0SW5kZXhPZkJ1Zyk7XG5cbiAgICAvLyBFUzUgMTUuNC40LjEyXG4gICAgLy8gaHR0cDovL2VzNS5naXRodWIuY29tLyN4MTUuNC40LjEyXG4gICAgdmFyIHNwbGljZU5vb3BSZXR1cm5zRW1wdHlBcnJheSA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBhID0gWzEsIDJdO1xuICAgICAgICB2YXIgcmVzdWx0ID0gYS5zcGxpY2UoKTtcbiAgICAgICAgcmV0dXJuIGEubGVuZ3RoID09PSAyICYmIGlzQXJyYXkocmVzdWx0KSAmJiByZXN1bHQubGVuZ3RoID09PSAwO1xuICAgIH0oKSk7XG4gICAgZGVmaW5lUHJvcGVydGllcyhBcnJheVByb3RvdHlwZSwge1xuICAgICAgICAvLyBTYWZhcmkgNS4wIGJ1ZyB3aGVyZSAuc3BsaWNlKCkgcmV0dXJucyB1bmRlZmluZWRcbiAgICAgICAgc3BsaWNlOiBmdW5jdGlvbiBzcGxpY2Uoc3RhcnQsIGRlbGV0ZUNvdW50KSB7XG4gICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFycmF5X3NwbGljZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSwgIXNwbGljZU5vb3BSZXR1cm5zRW1wdHlBcnJheSk7XG5cbiAgICB2YXIgc3BsaWNlV29ya3NXaXRoRW1wdHlPYmplY3QgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgb2JqID0ge307XG4gICAgICAgIEFycmF5UHJvdG90eXBlLnNwbGljZS5jYWxsKG9iaiwgMCwgMCwgMSk7XG4gICAgICAgIHJldHVybiBvYmoubGVuZ3RoID09PSAxO1xuICAgIH0oKSk7XG4gICAgZGVmaW5lUHJvcGVydGllcyhBcnJheVByb3RvdHlwZSwge1xuICAgICAgICBzcGxpY2U6IGZ1bmN0aW9uIHNwbGljZShzdGFydCwgZGVsZXRlQ291bnQpIHtcbiAgICAgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGFyZ3MgPSBhcmd1bWVudHM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0IDwgMCA/IG1heCgobGVuICsgcmVsYXRpdmVTdGFydCksIDApIDogbWluKHJlbGF0aXZlU3RhcnQsIGxlbik7XG4gICAgICAgICAgICB2YXIgYWN0dWFsRGVsZXRlQ291bnQgPSBtaW4obWF4KEVTLlRvSW50ZWdlcihkZWxldGVDb3VudCksIDApLCBsZW4gLSBhY3R1YWxTdGFydCk7XG5cbiAgICAgICAgICAgIHZhciBrID0gMDtcbiAgICAgICAgICAgIHZhciBmcm9tO1xuICAgICAgICAgICAgd2hpbGUgKGsgPCBhY3R1YWxEZWxldGVDb3VudCkge1xuICAgICAgICAgICAgICAgIGZyb20gPSAkU3RyaW5nKGFjdHVhbFN0YXJ0ICsgayk7XG4gICAgICAgICAgICAgICAgaWYgKG93bnMoTywgZnJvbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgQVtrXSA9IE9bZnJvbV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGsgKz0gMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGl0ZW1zID0gYXJyYXlTbGljZShhcmd1bWVudHMsIDIpO1xuICAgICAgICAgICAgdmFyIGl0ZW1Db3VudCA9IGl0ZW1zLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciB0bztcbiAgICAgICAgICAgIGlmIChpdGVtQ291bnQgPCBhY3R1YWxEZWxldGVDb3VudCkge1xuICAgICAgICAgICAgICAgIGsgPSBhY3R1YWxTdGFydDtcbiAgICAgICAgICAgICAgICB2YXIgbWF4SyA9IGxlbiAtIGFjdHVhbERlbGV0ZUNvdW50O1xuICAgICAgICAgICAgICAgIHdoaWxlIChrIDwgbWF4Sykge1xuICAgICAgICAgICAgICAgICAgICBmcm9tID0gJFN0cmluZyhrICsgYWN0dWFsRGVsZXRlQ291bnQpO1xuICAgICAgICAgICAgICAgICAgICB0byA9ICRTdHJpbmcoayArIGl0ZW1Db3VudCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvd25zKE8sIGZyb20pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPW3RvXSA9IE9bZnJvbV07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgT1t0b107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgayArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBrID0gbGVuO1xuICAgICAgICAgICAgICAgIHZhciBtaW5LID0gbGVuIC0gYWN0dWFsRGVsZXRlQ291bnQgKyBpdGVtQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGsgPiBtaW5LKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBPW2sgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgayAtPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbUNvdW50ID4gYWN0dWFsRGVsZXRlQ291bnQpIHtcbiAgICAgICAgICAgICAgICBrID0gbGVuIC0gYWN0dWFsRGVsZXRlQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGsgPiBhY3R1YWxTdGFydCkge1xuICAgICAgICAgICAgICAgICAgICBmcm9tID0gJFN0cmluZyhrICsgYWN0dWFsRGVsZXRlQ291bnQgLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgdG8gPSAkU3RyaW5nKGsgKyBpdGVtQ291bnQgLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG93bnMoTywgZnJvbSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE9bdG9dID0gT1tmcm9tXTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBPW3RvXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBrIC09IDE7XG4gICAgICAgICAgICAgICAgfVxuICA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hpcywgJycpIDogdGhpcywgc2VwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaGFzU3RyaW5nSm9pbkJ1Zyk7XG4gICAgfVxuXG4gICAgdmFyIGhhc0pvaW5VbmRlZmluZWRCdWcgPSBbMSwgMl0uam9pbih1bmRlZmluZWQpICE9PSAnMSwyJztcbiAgICBpZiAoaGFzSm9pblVuZGVmaW5lZEJ1Zykge1xuICAgICAgICBkZWZpbmVQcm9wZXJ0aWVzKEFycmF5UHJvdG90eXBlLCB7XG4gICAgICAgICAgICBqb2luOiBmdW5jdGlvbiBqb2luKHNlcGFyYXRvcikge1xuICAgICAgICAgICAgICAgIHZhciBzZXAgPSB0eXBlb2Ygc2VwYXJhdG9yID09PSAndW5kZWZpbmVkJyA/ICcsJyA6IHNlcGFyYXRvcjtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3JpZ2luYWxKb2luLmNhbGwodGhpcywgc2VwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaGFzSm9pblVuZGVmaW5lZEJ1Zyk7XG4gICAgfVxuXG4gICAgdmFyIHB1c2hTaGltID0gZnVuY3Rpb24gcHVzaChpdGVtKSB7XG4gICAgICAgIHZhciBPID0gRVMuVG9PYmplY3QodGhpcyk7XG4gICAgICAgIHZhciBuID0gRVMuVG9VaW50MzIoTy5sZW5ndGgpO1xuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHdoaWxlIChpIDwgYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgT1tuICsgaV0gPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICBpICs9IDE7XG4gICAgICAgIH1cbiAgICAgICAgTy5sZW5ndGggPSBuICsgaTtcbiAgICAgICAgcmV0dXJuIG4gKyBpO1xuICAgIH07XG5cbiAgICB2YXIgcHVzaElzTm90R2VuZXJpYyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBvYmogPSB7fTtcbiAgICAgICAgdmFyIHJlc3Vs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HdpbmRvdykge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAoIWJsYWNrbGlzdGVkS2V5c1snJCcgKyBrXSAmJiBvd25zKHdpbmRvdywgaykgJiYgd2luZG93W2tdICE9PSBudWxsICYmIHR5cGVvZiB3aW5kb3dba10gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgIGVxdWFsc0NvbnN0cnVjdG9yUHJvdG90eXBlKHdpbmRvd1trXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9KCkpO1xuICAgIHZhciBlcXVhbHNDb25zdHJ1Y3RvclByb3RvdHlwZUlmTm90QnVnZ3kgPSBmdW5jdGlvbiAob2JqZWN0KSB7XG4gICAgICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSAndW5kZWZpbmVkJyB8fCAhaGFzQXV0b21hdGlvbkVxdWFsaXR5QnVnKSB7XG4gICAgICAgICAgICByZXR1cm4gZXF1YWxzQ29uc3RydWN0b3JQcm90b3R5cGUob2JqZWN0KTtcbiAgICAgICAgfVxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIGVxdWFsc0NvbnN0cnVjdG9yUHJvdG90eXBlKG9iamVjdCk7XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdmFyIGRvbnRFbnVtcyA9IFtcbiAgICAgICAgJ3RvU3RyaW5nJyxcbiAgICAgICAgJ3RvTG9jYWxlU3RyaW5nJyxcbiAgICAgICAgJ3ZhbHVlT2YnLFxuICAgICAgICAnaGFzT3duUHJvcGVydHknLFxuICAgICAgICAnaXNQcm90b3R5cGVPZicsXG4gICAgICAgICdwcm9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iamVjdCwge1xuICAgICAgICBrZXlzOiBmdW5jdGlvbiBrZXlzKG9iamVjdCkge1xuICAgICAgICAgICAgdmFyIGlzRm4gPSBpc0NhbGxhYmxlKG9iamVjdCk7XG4gICAgICAgICAgICB2YXIgaXNBcmdzID0gaXNBcmd1bWVudHMob2JqZWN0KTtcbiAgICAgICAgICAgIHZhciBpc09iamVjdCA9IG9iamVjdCAhPT0gbnVsbCAmJiB0eXBlb2Ygb2JqZWN0ID09PSAnb2JqZWN0JztcbiAgICAgICAgICAgIHZhciBpc1N0ciA9IGlzT2JqZWN0ICYmIGlzU3RyaW5nKG9iamVjdCk7XG5cbiAgICAgICAgICAgIGlmICghaXNPYmplY3QgJiYgIWlzRm4gJiYgIWlzQXJncykge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ09iamVjdC5rZXlzIGNhbGxlZCBvbiBhIG5vbi1vYmplY3QnKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHRoZUtleXMgPSBbXTtcbiAgICAgICAgICAgIHZhciBza2lwUHJvdG8gPSBoYXNQcm90b0VudW1CdWcgJiYgaXNGbjtcbiAgICAgICAgICAgIGlmICgoaXNTdHIgJiYgaGFzU3RyaW5nRW51bUJ1ZykgfHwgaXNBcmdzKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBvYmplY3QubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgcHVzaENhbGwodGhlS2V5cywgJFN0cmluZyhpKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWlzQXJncykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIG5hbWUgaW4gb2JqZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghKHNraXBQcm90byAmJiBuYW1lID09PSAncHJvdG90eXBlJykgJiYgb3ducyhvYmplY3QsIG5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdXNoQ2FsbCh0aGVLZXlzLCAkU3RyaW5nKG5hbWUpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGhhc0RvbnRFbnVtQnVnKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNraXBDb25zdHJ1Y3RvciA9IGVxdWFsc0NvbnN0cnVjdG9yUHJvdG90eXBlSWZOb3RCdWdneShvYmplY3QpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgZG9udEVudW1zTGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRvbnRFbnVtID0gZG9udEVudW1zW2pdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIShza2lwQ29uc3RydWN0b3IgJiYgZG9udEVudW0gPT09ICdjb25zdHJ1Y3RvcicpICYmIG93bnMob2JqZWN0LCBkb250RW51bSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1c2hDYWxsKHRoZUtleXMsIGRvbnRFbnVtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGVLZXlzO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB2YXIga2V5c1dvcmtzV2l0aEFyZ3VtZW50cyA9ICRPYmplY3Qua2V5cyAmJiAoZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBTYWZhcmkgNS4wIGJ1Z1xuICAgICAgICByZXR1cm4gJE9iamVjdC5rZXlzKGFyZ3VtZW50cykubGVuZ3RoID09PSAyO1xuICAgIH0oMSwgMikpO1xuICAgIHZhciBrZXlzSGFzQXJndW1lbnRzTGVuZ3RoQnVnID0gJE9iamVjdC5rZXlzICYmIChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBhcmdLZXlzID0gJE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dEZWMnXTtcbiAgICB2YXIgZGF5c0luTW9udGggPSBmdW5jdGlvbiBkYXlzSW5Nb250aChtb250aCwgeWVhcikge1xuICAgICAgICByZXR1cm4gb3JpZ2luYWxHZXREYXRlKG5ldyBEYXRlKHllYXIsIG1vbnRoLCAwKSk7XG4gICAgfTtcblxuICAgIGRlZmluZVByb3BlcnRpZXMoRGF0ZS5wcm90b3R5cGUsIHtcbiAgICAgICAgZ2V0RnVsbFllYXI6IGZ1bmN0aW9uIGdldEZ1bGxZZWFyKCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzIHx8ICEodGhpcyBpbnN0YW5jZW9mIERhdGUpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigndGhpcyBpcyBub3QgYSBEYXRlIG9iamVjdC4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB5ZWFyID0gb3JpZ2luYWxHZXRGdWxsWWVhcih0aGlzKTtcbiAgICAgICAgICAgIGlmICh5ZWFyIDwgMCAmJiBvcmlnaW5hbEdldE1vbnRoKHRoaXMpID4gMTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geWVhciArIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4geWVhcjtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0TW9udGg6IGZ1bmN0aW9uIGdldE1vbnRoKCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzIHx8ICEodGhpcyBpbnN0YW5jZW9mIERhdGUpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigndGhpcyBpcyBub3QgYSBEYXRlIG9iamVjdC4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB5ZWFyID0gb3JpZ2luYWxHZXRGdWxsWWVhcih0aGlzKTtcbiAgICAgICAgICAgIHZhciBtb250aCA9IG9yaWdpbmFsR2V0TW9udGgodGhpcyk7XG4gICAgICAgICAgICBpZiAoeWVhciA8IDAgJiYgbW9udGggPiAxMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG1vbnRoO1xuICAgICAgICB9LFxuICAgICAgICBnZXREYXRlOiBmdW5jdGlvbiBnZXREYXRlKCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzIHx8ICEodGhpcyBpbnN0YW5jZW9mIERhdGUpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigndGhpcyBpcyBub3QgYSBEYXRlIG9iamVjdC4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB5ZWFyID0gb3JpZ2luYWxHZXRGdWxsWWVhcih0aGlzKTtcbiAgICAgICAgICAgIHZhciBtb250aCA9IG9yaWdpbmFsR2V0TW9udGgodGhpcyk7XG4gICAgICAgICAgICB2YXIgZGF0ZSA9IG9yaWdpbmFsR2V0RGF0ZSh0aGlzKTtcbiAgICAgICAgICAgIGlmICh5ZWFyIDwgMCAmJiBtb250aCA+IDExKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1vbnRoID09PSAxMikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGRheXMgPSBkYXlzSW5Nb250aCgwLCB5ZWFyICsgMSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChkYXlzIC0gZGF0ZSkgKyAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldFVUQ0Z1bGxZZWFyOiBmdW5jdGlvbiBnZXRVVENGdWxsWWVhcigpIHtcbiAgICAgICAgICAgIGlmICghdGhpcyB8fCAhKHRoaXMgaW5zdGFuY2VvZiBEYXRlKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ3RoaXMgaXMgbm90IGEgRGF0ZSBvYmplY3QuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgeWVhciA9IG9yaWdpbmFsR2V0VVRDRnVsbFllYXIodGhpcyk7XG4gICAgICAgICAgICBpZiAoeWVhciA8IDAgJiYgb3JpZ2luYWxHZXRVVENNb250aCh0aGlzKSA+IDExKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHllYXIgKyAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHllYXI7XG4gICAgICAgIH0sXG4gICAgICAgIGdldFVUQ01vbnRoOiBmdW5jdGlvbiBnZXRVVENNb250aCgpIHtcbiAgICAgICAgICAgIGlmICghdGhpcyB8fCAhKHRoaXMgaW5zdGFuY2VvZiBEYXRlKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ3RoaXMgaXMgbm90IGEgRGF0ZSBvYmplY3QuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgeWVhciA9IG9yaWdpbmFsR2V0VVRDRnVsbFllYXIodGhpcyk7XG4gICAgICAgICAgICB2YXIgbW9udGggPSBvcmlnaW5hbEdldFVUQ01vbnRoKHRoaXMpO1xuICAgICAgICAgICAgaWYgKHllYXIgPCAwICYmIG1vbnRoID4gMTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBtb250aDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0VVRDRGF0ZTogZnVuY3Rpb24gZ2V0VVRDRGF0ZSgpIHtcbiAgICAgICAgICAgIGlmICghdGhpcyB8fCAhKHRoaXMgaW5zdGFuY2VvZiBEYXRlKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ3RoaXMgaXMgbm90IGEgRGF0ZSBvYmplY3QuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgeWVhciA9IG9yaWdpbmFsR2V0VVRDRnVsbFllYXIodGhpcyk7XG4gICAgICAgICAgICB2YXIgbW9udGggPSBvcmlnaW5hbEdldFVUQ01vbnRoKHRoaXMpO1xuICAgICAgICAgICAgdmFyIGRhdGUgPSBvcmlnaW5hbEdldFVUQ0RhdGUodGhpcyk7XG4gICAgICAgICAgICBpZiAoeWVhciA8IDAgJiYgbW9udGggPiAxMSkge1xuICAgICAgICAgICAgICAgIGlmIChtb250aCA9PT0gMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBkYXlzID0gZGF5c0luTW9udGgoMCwgeWVhciArIDEpO1xuICAgICAgICAgICAgICAgIHJldHVybiAoZGF5cyAtIGRhdGUpICsgMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkYXRlO1xuICAgICAgICB9XG4gICAgfSwgaGFzTmVnYXRpdmVNb250aFllYXJCdWcpO1xuXG4gICAgZGVmaW5lUHJvcGVydGllcyhEYXRlLnByb3RvdHlwZSwge1xuICAgICAgICB0b1VUQ1N0cmluZzogZnVuY3Rpb24gdG9VVENTdHJpbmcoKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMgfHwgISh0aGlzIGluc3RhbmNlb2YgRGF0ZSkpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCd0aGlzIGlzIG5vdCBhIERhdGUgb2JqZWN0LicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGRheSA9IG9yaWdpbmFsR2V0VVRDRGF5KHRoaXMpO1xuICAgICAgICAgICAgdmFyIGRhdGUgPSBvcmlnaW5hbEdldFVUQ0RhdGUodGhpcyk7XG4gICAgICAgICAgICB2YXIgbW9udGggPSBvcmlnaW5hbEdldFVUQ01vbnRoKHRoaXMpO1xuICAgICAgICAgICAgdmFyIHllYXIgPSBvcmlnaW5hbEdldFVUQ0Z1bGxZZWFyKHRoaXMpO1xuICAgICAgICAgICAgdmFyIGhvdXIgPSBvcmlnaW5hbEdldFVUQ0hvdXJzKHRoaXMpO1xuICAgICAgICAgICAgdmFyIG1pbnV0ZSA9IG9yaWdpbmFsR2V0VVRDTWludXRlcyh0aGlzKTtcbiAgICAgICAgICAgIHZhciBzZWNvbmQgPSBvcmlnaW5hbEdldFVUQ1NlY29uZHModGhpcyk7XG4gICAgICAgICAgICByZXR1cm4gZGF5TmFtZVtkYXldICsgJywgJyArXG4gICAgICAgICAgICAgICAgKGRhdGUgPCAxMCA/ICcwJyArIGRhdGUgOiBkYXRlKSArICcgJyArXG4gICAgICAgICAgICAgICAgbW9udGhOYW1lW21vbnRoXSArICcgJyArXG4gICAgICAgICAgICAgICAgeWVhciArICcgJyArXG4gICAgICAgICAgICAgICAgKGhvdXIgPCAxMCA/ICcwJyArIGhvdXIgOiBob3VyKSArICc6JyArXG4gICAgICAgICAgICAgICAgKG1pbnV0ZSA8IDEwID8gJzAnICsgbWludXRlIDogbWludXRlKSArICc6JyArXG4gICAgICAgICAgICAgICAgKHNlY29uZCA8IDEwID8gJzAnICsgc2Vjb25kIDogc2Vjb25kKSArICcgR01UJztcbiAgICAgICAgfVxuICAgIH0sIGhhc05lZ2F0aXZlTW9udGhZZWFyQnVnIHx8IGhhc1RvVVRDU3RyaW5nRm9ybWF0QnVnKTtcblxuICAgIC8vIE9wZXJhIDEyIGhhcyBgLGBcbiAgICBkZWZpbmVQcm9wZXJ0aWVzKERhdGUucHJvdG90eXBlLCB7XG4gICAgICAgIHRvRGF0ZVN0cmluZzogZnVuY3Rpb24gdG9EYXRlU3RyaW5nKCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzIHx8ICEodGhpcyBpbnN0YW5jZW9mIERhdGUpKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigndGhpcyBpcyBub3QgYSBEYXRlIG9iamVjdC4nKTtcbiAgICAgICAgICAgIH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aCA9IHRoaXMuZ2V0TW9udGgoKTtcbiAgICAgICAgICAgIHZhciB5ZWFyID0gdGhpcy5nZXRGdWxsWWVhcigpO1xuICAgICAgICAgICAgdmFyIGhvdXIgPSB0aGlzLmdldEhvdXJzKCk7XG4gICAgICAgICAgICB2YXIgbWludXRlID0gdGhpcy5nZXRNaW51dGVzKCk7XG4gICAgICAgICAgICB2YXIgc2Vjb25kID0gdGhpcy5nZXRTZWNvbmRzKCk7XG4gICAgICAgICAgICB2YXIgdGltZXpvbmVPZmZzZXQgPSB0aGlzLmdldFRpbWV6b25lT2Zmc2V0KCk7XG4gICAgICAgICAgICB2YXIgaG91cnNPZmZzZXQgPSBNYXRoLmZsb29yKE1hdGguYWJzKHRpbWV6b25lT2Zmc2V0KSAvIDYwKTtcbiAgICAgICAgICAgIHZhciBtaW51dGVzT2Zmc2V0ID0gTWF0aC5mbG9vcihNYXRoLmFicyh0aW1lem9uZU9mZnNldCkgJSA2MCk7XG4gICAgICAgICAgICByZXR1cm4gZGF5TmFtZVtkYXldICsgJyAnICtcbiAgICAgICAgICAgICAgICBtb250aE5hbWVbbW9udGhdICsgJyAnICtcbiAgICAgICAgICAgICAgICAoZGF0ZSA8IDEwID8gJzAnICsgZGF0ZSA6IGRhdGUpICsgJyAnICtcbiAgICAgICAgICAgICAgICB5ZWFyICsgJyAnICtcbiAgICAgICAgICAgICAgICAoaG91ciA8IDEwID8gJzAnICsgaG91ciA6IGhvdXIpICsgJzonICtcbiAgICAgICAgICAgICAgICAobWludXRlIDwgMTAgPyAnMCcgKyBtaW51dGUgOiBtaW51dGUpICsgJzonICtcbiAgICAgICAgICAgICAgICAoc2Vjb25kIDwgMTAgPyAnMCcgKyBzZWNvbmQgOiBzZWNvbmQpICsgJyBHTVQnICtcbiAgICAgICAgICAgICAgICAodGltZXpvbmVPZmZzZXQgPiAwID8gJy0nIDogJysnKSArXG4gICAgICAgICAgICAgICAgKGhvdXJzT2Zmc2V0IDwgMTAgPyAnMCcgKyBob3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U2lnbmVkSW50QnVnICYmIGxlbmd0aCA+PSA3ICYmIG1zID4gbWF4U2FmZVVuc2lnbmVkMzJCaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdvcmsgYXJvdW5kIGEgU2FmYXJpIDgvOSBidWcgd2hlcmUgaXQgdHJlYXRzIHRoZSBzZWNvbmRzIGFzIHNpZ25lZFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1zVG9TaGlmdCA9IE1hdGguZmxvb3IobXMgLyBtYXhTYWZlVW5zaWduZWQzMkJpdCkgKiBtYXhTYWZlVW5zaWduZWQzMkJpdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzVG9TaGlmdCA9IE1hdGguZmxvb3IobXNUb1NoaWZ0IC8gMWUzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZHMgKz0gc1RvU2hpZnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBtaWxsaXMgLT0gc1RvU2hpZnQgKiAxZTM7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZGF0ZSA9IGxlbmd0aCA9PT0gMSAmJiAkU3RyaW5nKFkpID09PSBZID8gLy8gaXNTdHJpbmcoWSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGV4cGxpY2l0bHkgcGFzcyBpdCB0aHJvdWdoIHBhcnNlOlxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5hdGl2ZURhdGUoRGF0ZVNoaW0ucGFyc2UoWSkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGhhdmUgdG8gbWFudWFsbHkgbWFrZSBjYWxscyBkZXBlbmRpbmcgb24gYXJndW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxlbmd0aCBoZXJlXG4gICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGggPj0gNyA/IG5ldyBOYXRpdmVEYXRlKFksIE0sIEQsIGgsIG0sIHNlY29uZHMsIG1pbGxpcykgOlxuICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoID49IDYgPyBuZXcgTmF0aXZlRGF0ZShZLCBNLCBELCBoLCBtLCBzZWNvbmRzKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGggPj0gNSA/IG5ldyBOYXRpdmVEYXRlKFksIE0sIEQsIGgsIG0pIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCA+PSA0ID8gbmV3IE5hdGl2ZURhdGUoWSwgTSwgRCwgaCkgOlxuICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoID49IDMgPyBuZXcgTmF0aXZlRGF0ZShZLCBNLCBEKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGggPj0gMiA/IG5ldyBOYXRpdmVEYXRlKFksIE0pIDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aCA+PSAxID8gbmV3IE5hdGl2ZURhdGUoWSBpbnN0YW5jZW9mIE5hdGl2ZURhdGUgPyArWSA6IFkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5hdGl2ZURhdGUoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRlID0gTmF0aXZlRGF0ZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWlzUHJpbWl0aXZlKGRhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFByZXZlbnQgbWl4dXBzIHdpdGggdW5maXhlZCBEYXRlIG9iamVjdFxuICAgICAgICAgICAgICAgICAgICBkZWZpbmVQcm9wZXJ0aWVzKGRhdGUsIHsgY29uc3RydWN0b3I6IERhdGVTaGltIH0sIHRydWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZGF0ZTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIC8vIDE1LjkuMS4xNSBEYXRlIFRpbWUgU3RyaW5nIEZvcm1hdC5cbiAgICAgICAgICAgIHZhciBpc29EYXRlRXhwcmVzc2lvbiA9IG5ldyBSZWdFeHAoJ14nICtcbiAgICAgICAgICAgICAgICAnKFxcXFxkezR9fFsrLV1cXFxcZHs2fSknICsgLy8gZm91ci1kaWdpdCB5ZWFyIGNhcHR1cmUgb3Igc2lnbiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA2LWRpZ2l0IGV4dGVuZGVkIHllYXJcbiAgICAgICAgICAgICAgICAnKD86LShcXFxcZHsyfSknICsgLy8gb3B0aW9uYWwgbW9udGggY2FwdHVyZVxuICAgICAgICAgICAgICAgICcoPzotKFxcXFxkezJ9KScgKyAvLyBvcHRpb25hbCBkYXkgY2FwdHVyZVxuICAgICAgICAgICAgICAgICcoPzonICsgLy8gY2FwdHVyZSBob3VyczptaW51dGVzOnNlY29uZHMubWlsbGlzZWNvbmRzXG4gICAgICAgICAgICAgICAgICAgICdUKFxcXFxkezJ9KScgKyAvLyBob3VycyBjYXB0dXJlXG4gICAgICAgICAgICAgICAgICAgICc6KFxcXFxkezJ9KScgKyAvLyBtaW51dGVzIGNhcHR1cmVcbiAgICAgICAgICAgICAgICAgICAgJyg/OicgKyAvLyBvcHRpb25hbCA6c2Vjb25kcy5taWxsaXNlY29uZHNcbiAgICAgICAgICAgICAgICAgICAgICAgICc6KFxcXFxkezJ9KScgKyAvLyBzZWNvbmRzIGNhcHR1cmVcbiAgICAgICAgICAgICAgICAgICAgICAgICcoPzooXFxcXC5cXFxcZHsxLH0pKT8nICsgLy8gbWlsbGlzZWNvbmRzIGNhcHR1cmVcbiAgICAgICAgICAgICAgICAgICAgJyk/JyArXG4gICAgICAgICAgICAgICAgJygnICsgLy8gY2FwdHVyZSBVVEMgb2Zmc2V0IGNvbXBvbmVudFxuICAgICAgICAgICAgICAgICAgICAnWnwnICsgLy8gVVRDIGNhcHR1cmVcbiAgICAgICAgICAgICAgICAgICAgJyg/OicgKyAvLyBvZmZzZXQgc3BlY2lmaWVyICsvLWhvdXJzOm1pbnV0ZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICcoWy0rXSknICsgLy8gc2lnbiBjYXB0dXJlXG4gICAgICAgICAgICAgICAgICAgICAgICAnKFxcXFxkezJ9KScgKyAvLyBob3VycyBvZmZzZXQgY2FwdHVyZVxuICAgICAgICAgICAgICAgICAgICAgICAgJzooXFxcXGR7Mn0pJyArIC8vIG1pbnV0ZXMgb2Zmc2V0IGNhcHR1cmVcbiAgICAgICAgICAgICAgICAgICAgJyknICtcbiAgICAgICAgICAgICAgICAnKT8pPyk/KT8nICtcbiAgICAgICAgICAgICckJyk7XG5cbiAgICAgICAgICAgIHZhciBtb250aHMgPSBbMCwgMzEsIDU5LCA5MCwgMTIwLCAxNTEsIDE4MSwgMjEyLCAyNDMsIDI3MywgMzA0LCAzMzQsIDM2NV07XG5cbiAgICAgICAgICAgIHZhciBkYXlGcm9tTW9udGggPSBmdW5jdGlvbiBkYXlGcm9tTW9udGgoeWVhciwgbW9udGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdCA9IG1vbnRoID4gMSA/IDEgOiAwO1xuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIG1vbnRoc1ttb250aF0gK1xuICAgICAgICAgICAgICAgICAgICBNYXRoLmZsb29yKCh5ZWFyIC0gMTk2OSArIHQpIC8gNCkgLVxuICAgICAgICAgICAgICAgICAgICBNYXRoLmZsb29yKCh5ZWFyIC0gMTkwMSArIHQpIC8gMTAwKSArXG4gICAgICAgICAgICAgICAgICAgIE1hdGguZmxvb3IoKHllYXIgLSAxNjAxICsgdCkgLyA0MDApICtcbiAgICAgICAgICAgICAgICAgICAgMzY1ICogKHllYXIgLSAxOTcwKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgdG9VVEMgPSBmdW5jdGlvbiB0b1VUQyh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIHMgPSAwO1xuICAgICAgICAgICAgICAgIHZhciBtcyA9IHQ7XG4gICAgICAgICAgICAgICAgaWYgKGhhc1NhZmFyaVNpZ25lZEludEJ1ZyAmJiBtcyA+IG1heFNhZmVVbnNpZ25lZDMyQml0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHdvcmsgYXJvdW5kIGEgU2FmYXJpIDgvOSBidWcgd2hlcmUgaXQgdHJlYXRzIHRoZSBzZWNvbmRzIGFzIHNpZ25lZFxuICAgICAgICAgICAgICAgICAgICB2YXIgbXNUb1NoaWZ0ID0gTWF0aC5mbG9vcihtcyAvIG1heFNhZmVVbnNpZ25lZDMyQml0KSAqIG1heFNhZmVVbnNpZ25lZDMyQml0O1xuICAgICAgICAgICAgICAgICAgICB2YXIgc1RvU2hpZnQgPSBNYXRoLmZsb29yKG1zVG9TaGlmdCAvIDFlMyk7XG4gICAgICAgICAgICAgICAgICAgIHMgKz0gc1RvU2hpZnQ7XG4gICAgICAgICAgICAgICAgICAgIG1zIC09IHNUb1NoaWZ0ICogMWUzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gJE51bWJlcihuZXcgTmF0aXZlRGF0ZSgxOTcwLCAwLCAxLCAwLCAwLCBzLCBtcykpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgLy8gQ29weSBhbnkgY3VzdG9tIG1ldGhvZHMgYSAzcmQgcGFydHkgbGlicmFyeSBtYXkgaGF2ZSBhZGRlZFxuICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIE5hdGl2ZURhdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAob3ducyhOYXRpdmVEYXRlLCBrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIERhdGVTaGltW2tleV0gPSBOYXRpdmVEYXRlW2tleV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBDb3B5IFwibmF0aXZlXCIgbWV0aG9kcyBleHBsaWNpdGx5OyB0aGV5IG1heSBiZSBub24tZW51bWVyYWJsZVxuICAgICAgICAgICAgZGVmaW5lUHJvcGVydGllcyhEYXRlU2hpbSwge1xuICAgICAgICAgICAgICAgIG5vdzogTmF0aXZlRGF0ZS5ub3csXG4gICAgICAgICAgICAgICAgVVRDOiBOYXRpdmVEYXRlLlVUQ1xuICAgICAgICAgICAgfSwgdHJ1ZSk7XG4gICAgICAgICAgICBEYXRlU2hpbS5wcm90b3R5cGUgPSBOYXRpdmVEYXRlLnByb3RvdHlwZTtcbiAgICAgICAgICAgIGRlZmluZVByb3BlcnRpZXMoRGF0ZVNoaW0ucHJvdG90eXBlLCB7XG4gICAgICAgICAgICAgICAgY29uc3RydWN0b3I6IERhdGVTaGltXG4gICAgICAgICAgICB9LCB0cnVlKTtcblxuICAgICAgICAgICAgLy8gVXBncmFkZSBEYXRlLnBhcnNlIHRvIGhhbmRsZSBzaW1wbGlmaWVkIElTTyA4NjAxIHN0cmluZ3NcbiAgICAgICAgICAgIHZhciBwYXJzZVNoaW0gPSBmdW5jdGlvbiBwYXJzZShzdHJpbmcpIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2ggPSBpc29EYXRlRXhwcmVzc2lvbi5leGVjKHN0cmluZyk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHBhcnNlIG1vbnRocywgZGF5cywgaG91cnMsIG1pbnV0ZXMsIHNlY29uZHMsIGFuZCBtaWxsaXNlY29uZHNcbiAgICAgICAgICAgICAgICAgICAgLy8gcHJvdmlkZSBkZWZhdWx0IHZhbHVlcyBpZiBuZWNlc3NhcnlcbiAgICAgICAgICAgICAgICAgICAgLy8gcGFyc2UgdGhlIFVUQyBvZmZzZXQgY29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgIHZhciB5ZWFyID0gJE51bWJlcihtYXRjaFsxXSksXG4gICAgICAgICAgICAgICAgICAgICAgICBtb250aCA9ICROdW1iZXIobWF0Y2hbMl0gfHwgMSkgLSAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF5ID0gJE51bWJlcihtYXRjaFszXSB8fCAxKSAtIDEsXG4gICAgICAgICAgICAgICAgICAgICAgICBob3VyID0gJE51bWJlcihtYXRjaFs0XSB8fCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pbnV0ZSA9ICROdW1iZXIobWF0Y2hbNV0gfHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWNvbmQgPSAkTnVtYmVyKG1hdGNoWzZdIHx8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlsbGlzZWNvbmQgPSBNYXRoLmZsb29yKCROdW1iZXIobWF0Y2hbN10gfHwgMCkgKiAxMDAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdoZW4gdGltZSB6b25lIGlzIG1pc3NlZCwgbG9jYWwgb2Zmc2V0IHNob3VsZCBiZSB1c2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAoRVMgNS4xIGJ1ZylcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNlZSBodHRwczovL2J1Z3MuZWNtYXNjcmlwdC5vcmcvc2hvd19idWcuY2dpP2lkPTExMlxuICAgICAgICAgICAgICAgICAgICAgICAgaXNMb2NhbFRpbWUgPSBCb29sZWFuKG1hdGNoWzRdICYmICFtYXRjaFs4XSksXG4gICAgICAgICAgICAgICAgICAgICAgICBzaWduT2Zmc2V0ID0gbWF0Y2hbOV0gPT09ICctJyA/IDEgOiAtMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhvdXJPZmZzZXQgPSAkTnVtYmVyKG1hdGNoWzEwXSB8fCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pbnV0ZU9mZnNldCA9ICROdW1iZXIobWF0Y2hbMTFdIHx8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0O1xuICAgICAgICAgICAgICAgICAgICB2YXIgaGFzTWludXRlc09yU2Vjb25kc09yTWlsbGlzZWNvbmRzID0gbWludXRlID4gMCB8fCBzZWNvbmQgPiAwIHx8IG1pbGxpc2Vjb25kID4gMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgaG91ciA8IChoYXNNaW51dGVzT3JTZWNvbmRzT3JNaWxsaXNlY29uZHMgPyAyNCA6IDI1KSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgbWludXRlIDwgNjAgJiYgc2Vjb25kIDwgNjAgJiYgbWlsbGlzZWNvbmQgPCAxMDAwICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBtb250aCA+IC0xICYmIG1vbnRoIDwgMTIgJiYgaG91ck9mZnNldCA8IDI0ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBtaW51dGVPZmZzZXQgPCA2MCAmJiAvLyBkZXRlY3QgaW52YWxpZCBvZmZzZXRzXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXkgPiAtMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgZGF5IDwgKGRheUZyb21Nb250aCh5ZWFyLCBtb250aCArIDEpIC0gZGF5RnJvbU1vbnRoKHllYXIsIG1vbnRoKSlcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRheUZyb21Nb250aCh5ZWFyLCBtb250aCkgKyBkYXkpICogMjQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvdXIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvdXJPZmZzZXQgKiBzaWduT2Zmc2V0XG4gICAgICAgICAgICAgICAgICAgICAgICApICogNjA7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlc3VsdCArIG1pbnV0ZSArIG1pbnV0ZU9mZnNldCAqIHNpZ25PZmZzZXQpICogNjAgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY29uZFxuICAgICAgICAgICAgICAgICAgICAgICAgKSAqIDEwMDAgKyBtaWxsaXNlY29uZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0xvY2FsVGltZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRvVVRDKHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoLTguNjRlMTUgPD0gcmVzdWx0ICYmIHJlc3VsdCA8PSA4LjY0ZTE1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTmFOO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gTmF0aXZlRGF0ZS5wYXJzZS5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGRlZmluZVByb3BlcnRpZXMoRGF0ZVNoaW0sIHsgcGFyc2U6IHBhcnNlU2hpbSB9KTtcblxuICAgICAgICAgICAgcmV0dXJuIERhdGVTaGltO1xuICAgICAgICB9KERhdGUpKTtcbiAgICAgICAgLyogZ2xvYmFsIERhdGU6IGZhbHNlICovXG4gICAgfVxuXG4gICAgLy8gRVM1IDE1LjkuNC40XG4gICAgLy8gaHR0cDovL2VzNS5naXRodWIuY29tLyN4MTUuOS40LjRcbiAgICBpZiAoIURhdGUubm93KSB7XG4gICAgICAgIERhdGUubm93ID0gZnVuY3Rpb24gbm93KCkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBEYXR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9XG4gICAgICAgIH0sXG4gICAgICAgIGRpdmlkZTogZnVuY3Rpb24gZGl2aWRlKG4pIHtcbiAgICAgICAgICAgIHZhciBpID0gdG9GaXhlZEhlbHBlcnMuc2l6ZTtcbiAgICAgICAgICAgIHZhciBjID0gMDtcbiAgICAgICAgICAgIHdoaWxlICgtLWkgPj0gMCkge1xuICAgICAgICAgICAgICAgIGMgKz0gdG9GaXhlZEhlbHBlcnMuZGF0YVtpXTtcbiAgICAgICAgICAgICAgICB0b0ZpeGVkSGVscGVycy5kYXRhW2ldID0gTWF0aC5mbG9vcihjIC8gbik7XG4gICAgICAgICAgICAgICAgYyA9IChjICUgbikgKiB0b0ZpeGVkSGVscGVycy5iYXNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBudW1Ub1N0cmluZzogZnVuY3Rpb24gbnVtVG9TdHJpbmcoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IHRvRml4ZWRIZWxwZXJzLnNpemU7XG4gICAgICAgICAgICB2YXIgcyA9ICcnO1xuICAgICAgICAgICAgd2hpbGUgKC0taSA+PSAwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHMgIT09ICcnIHx8IGkgPT09IDAgfHwgdG9GaXhlZEhlbHBlcnMuZGF0YVtpXSAhPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdCA9ICRTdHJpbmcodG9GaXhlZEhlbHBlcnMuZGF0YVtpXSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzID09PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcyA9IHQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzICs9IHN0clNsaWNlKCcwMDAwMDAwJywgMCwgNyAtIHQubGVuZ3RoKSArIHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcztcbiAgICAgICAgfSxcbiAgICAgICAgcG93OiBmdW5jdGlvbiBwb3coeCwgbiwgYWNjKSB7XG4gICAgICAgICAgICByZXR1cm4gKG4gPT09IDAgPyBhY2MgOiAobiAlIDIgPT09IDEgPyBwb3coeCwgbiAtIDEsIGFjYyAqIHgpIDogcG93KHggKiB4LCBuIC8gMiwgYWNjKSkpO1xuICAgICAgICB9LFxuICAgICAgICBsb2c6IGZ1bmN0aW9uIGxvZyh4KSB7XG4gICAgICAgICAgICB2YXIgbiA9IDA7XG4gICAgICAgICAgICB2YXIgeDIgPSB4O1xuICAgICAgICAgICAgd2hpbGUgKHgyID49IDQwOTYpIHtcbiAgICAgICAgICAgICAgICBuICs9IDEyO1xuICAgICAgICAgICAgICAgIHgyIC89IDQwOTY7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB3aGlsZSAoeDIgPj0gMikge1xuICAgICAgICAgICAgICAgIG4gKz0gMTtcbiAgICAgICAgICAgICAgICB4MiAvPSAyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG47XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIHRvRml4ZWRTaGltID0gZnVuY3Rpb24gdG9GaXhlZChmcmFjdGlvbkRpZ2l0cykge1xuICAgICAgICB2YXIgZiwgeCwgcywgbSwgZSwgeiwgaiwgaztcblxuICAgICAgICAvLyBUZXN0IGZvciBOYU4gYW5kIHJvdW5kIGZyYWN0aW9uRGlnaXRzIGRvd25cbiAgICAgICAgZiA9ICROdW1iZXIoZnJhY3Rpb25EaWdpdHMpO1xuICAgICAgICBmID0gaXNBY3R1YWxOYU4oZikgPyAwIDogTWF0aC5mbG9vcihmKTtcblxuICAgICAgICBpZiAoZiA8IDAgfHwgZiA+IDIwKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgUmFuZ2VFcnJvcignTnVtYmVyLnRvRml4ZWQgY2FsbGVkIHdpdGggaW52YWxpZCBudW1iZXIgb2YgZGVjaW1hbHMnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHggPSAkTnVtYmVyKHRoaXMpO1xuXG4gICAgICAgIGlmIChpc0FjdHVhbE5hTih4KSkge1xuICAgICAgICAgICAgcmV0dXJuICdOYU4nO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSWYgaXQgaXMgdG9vIGJpZyBvciBzbWFsbCwgcmV0dXJuIHRoZSBzdHJpbmcgdmFsdWUgb2YgdGhlIG51bWJlclxuICAgICAgICBpZiAoeCA8PSAtMWUyMSB8fCB4ID49IDFlMjEpIHtcbiAgICAgICAgICAgIHJldHVybiAkU3RyaW5nKHgpO1xuICAgICAgICB9XG5cbiAgICAgICAgcyA9ICcnO1xuXG4gICAgICAgIGlmICh4IDwgMCkge1xuICAgICAgICAgICAgcyA9ICctJztcbiAgICAgICAgICAgIHggPSAteDtcbiAgICAgICAgfVxuXG4gICAgICAgIG0gPSAnMCc7XG5cbiAgICAgICAgaWYgKHggPiAxZS0yMSkge1xuICAgICAgICAgICAgLy8gMWUtMjEgPCB4IDwgMWUyMVxuICAgICAgICAgICAgLy8gLTcwIDwgbG9nMih4KSA8IDcwXG4gICAgICAgICAgICBlID0gdG9GaXhlZEhlbHBlcnMubG9nKHggKiB0b0ZpeGVkSGVscGVycy5wb3coMiwgNjksIDEpKSAtIDY5O1xuICAgICAgICAgICAgeiA9IChlIDwgMCA/IHggKiB0b0ZpeGVkSGVscGVycy5wb3coMiwgLWUsIDEpIDogeCAvIHRvRml4ZWRIZWxwZXJzLnBvdygyLCBlLCAxKSk7XG4gICAgICAgICAgICB6ICo9IDB4MTAwMDAwMDAwMDAwMDA7IC8vIE1hdGgucG93KDIsIDUyKTtcbiAgICAgICAgICAgIGUgPSA1MiAtIGU7XG5cbiAgICAgICAgICAgIC8vIC0xOCA8IGUgPCAxMjJcbiAgICAgICAgICAgIC8vIHggPSB6IC8gMiBeIGVcbiAgICAgICAgICAgIGlmIChlID4gMCkge1xuICAgICAgICAgICAgICAgIHRvRml4ZWRIZWxwZXJzLm11bHRpcGx5KDAsIHopO1xuICAgICAgICAgICAgICAgIGogPSBmO1xuXG4gICAgICAgICAgICAgICAgd2hpbGUgKGogPj0gNykge1xuICAgICAgICAgICAgICAgICAgICB0b0ZpeGVkSGVscGVycy5tdWx0aXBseSgxZTcsIDApO1xuICAgICAgICAgICAgICAgICAgICBqIC09IDc7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdG9GaXhlZEhlbHBlcnMubXVsdGlwbHkodG9GaXhlZEhlbHBlcnMucG93KDEwLCBqLCAxKSwgMCk7XG4gICAgICAgICAgICAgICAgaiA9IGUgLSAxO1xuXG4gICAgICAgICAgICAgICAgd2hpbGUgKGogPj0gMjMpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9GaXhlZEhlbHBlcnMuZGl2aWRlKDEgPDwgMjMpO1xuICAgICAgICAgICAgICAgICAgICBqIC09IDIzO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRvRml4ZWRIZWxwZXJzLmRpdmlkZSgxIDw8IGopO1xuICAgICAgICAgICAgICAgIHRvRml4ZWRIZWxwZXJzLm11bHRpcGx5KDEsIDEpO1xuICAgICAgICAgICAgICAgIHRvRml4ZWRIZWxwZXJzLmRpdmlkZSgyKTtcbiAgICAgICAgICAgICAgICBtID0gdG9GaXhlZEhlbHBlcnMubnVtVG9TdHJpbmcoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9GaXhlZEhlbHBlcnMubXVsdGlwbHkoMCwgeik7XG4gICAgICAgICAgICAgICAgdG9GaXhlZEhlbHBlcnMubXVsdGlwbHkoMSA8PCAoLWUpLCAwKTtcbiAgICAgICAgICAgICAgICBtID0gdG9GaXhlZEhlbHBlcnMubnVtVG9TdHJpbmcoKSArIHN0clNsaWNlKCcwLjAwMDAwMDAwMDAwMDAwMDAwMDAwJywgMiwgMiArIGYpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGYgPiAwKSB7XG4gICAgICAgICAgICBrID0gbS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChrIDw9IGYpIHtcbiAgICAgICAgICAgICAgICBtID0gcyArIHN0clNsaWNlKCcwLjAwMDAwMDAwMDAwMDAwMDAwMDAnLCAwLCBmIC0gayArIDIpICsgbTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbSA9IHMgKyBzdHJTbGljZShtLCAwLCBrIC0gZikgKyAnLicgKyBzdHJTbGljZShtLCBrIC0gZik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBtID0gcyArIG07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbTtcbiAgICB9O1xuICAgIGRlZmluZVByb3BlcnRpZXMoTnVtYmVyUHJvdG90eXBlLCB7IHRvRml4ZWQ6IHRvRml4ZWRTaGltIH0sIGhhc1RvRml4ZWRCdWdzKTtcblxuICAgIHZhciBoYXNUb1ByZWNpc2lvblVuZGVmaW5lZEJ1ZyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICByZXR1cm4gMS4wLnRvUHJlY2lzaW9uKHVuZGVmaW5lZCkgPT09ICcxJztcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICB9KCkpO1xuICAgIHZhciBvcmlnaW5hbFRvUHJlY2lzaW9uID0gTnVtYmVyUHJvdG90eXBlLnRvUHJlY2lzaW9uO1xuICAgIGRlZmluZVByb3BlcnRpZXMoTnVtYmVyUHJvdG90eXBlLCB7XG4gICAgICAgIHRvUHJlY2lzaW9uOiBmdW5jdGlvbiB0b1ByZWNpc2lvbihwcmVjaXNpb24pIHtcbiAgICAgICAgICAgIHJldHVybiB0eXBlb2YgcHJlY2lzaW9uID09PSAndW5kZWZpbmVkJyA/IG9yaWdpbmFs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pZiAodHlwZW9mIHNlcGFyYXRvciA9PT0gJ3VuZGVmaW5lZCcgJiYgbGltaXQgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIElmIGBzZXBhcmF0b3JgIGlzIG5vdCBhIHJlZ2V4LCB1c2UgbmF0aXZlIHNwbGl0XG4gICAgICAgICAgICAgICAgaWYgKCFpc1JlZ2V4KHNlcGFyYXRvcikpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0clNwbGl0KHRoaXMsIHNlcGFyYXRvciwgbGltaXQpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciBvdXRwdXQgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgZmxhZ3MgPSAoc2VwYXJhdG9yLmlnbm9yZUNhc2UgPyAnaScgOiAnJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXBhcmF0b3IubXVsdGlsaW5lID8gJ20nIDogJycpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2VwYXJhdG9yLnVuaWNvZGUgPyAndScgOiAnJykgKyAvLyBpbiBFUzZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2VwYXJhdG9yLnN0aWNreSA/ICd5JyA6ICcnKSwgLy8gRmlyZWZveCAzKyBhbmQgRVM2XG4gICAgICAgICAgICAgICAgICAgIGxhc3RMYXN0SW5kZXggPSAwLFxuICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIGBnbG9iYWxgIGFuZCBhdm9pZCBgbGFzdEluZGV4YCBpc3N1ZXMgYnkgd29ya2luZyB3aXRoIGEgY29weVxuICAgICAgICAgICAgICAgICAgICBzZXBhcmF0b3IyLCBtYXRjaCwgbGFzdEluZGV4LCBsYXN0TGVuZ3RoO1xuICAgICAgICAgICAgICAgIHZhciBzZXBhcmF0b3JDb3B5ID0gbmV3IFJlZ0V4cChzZXBhcmF0b3Iuc291cmNlLCBmbGFncyArICdnJyk7XG4gICAgICAgICAgICAgICAgaWYgKCFjb21wbGlhbnRFeGVjTnBjZykge1xuICAgICAgICAgICAgICAgICAgICAvLyBEb2Vzbid0IG5lZWQgZmxhZ3MgZ3ksIGJ1dCB0aGV5IGRvbid0IGh1cnRcbiAgICAgICAgICAgICAgICAgICAgc2VwYXJhdG9yMiA9IG5ldyBSZWdFeHAoJ14nICsgc2VwYXJhdG9yQ29weS5zb3VyY2UgKyAnJCg/IVxcXFxzKScsIGZsYWdzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLyogVmFsdWVzIGZvciBgbGltaXRgLCBwZXIgdGhlIHNwZWM6XG4gICAgICAgICAgICAgICAgICogSWYgdW5kZWZpbmVkOiA0Mjk0OTY3Mjk1IC8vIG1heFNhZmUzMkJpdEludFxuICAgICAgICAgICAgICAgICAqIElmIDAsIEluZmluaXR5LCBvciBOYU46IDBcbiAgICAgICAgICAgICAgICAgKiBJZiBwb3NpdGl2ZSBudW1iZXI6IGxpbWl0ID0gTWF0aC5mbG9vcihsaW1pdCk7IGlmIChsaW1pdCA+IDQyOTQ5NjcyOTUpIGxpbWl0IC09IDQyOTQ5NjcyOTY7XG4gICAgICAgICAgICAgICAgICogSWYgbmVnYXRpdmUgbnVtYmVyOiA0Mjk0OTY3Mjk2IC0gTWF0aC5mbG9vcihNYXRoLmFicyhsaW1pdCkpXG4gICAgICAgICAgICAgICAgICogSWYgb3RoZXI6IFR5cGUtY29udmVydCwgdGhlbiB1c2UgdGhlIGFib3ZlIHJ1bGVzXG4gICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgdmFyIHNwbGl0TGltaXQgPSB0eXBlb2YgbGltaXQgPT09ICd1bmRlZmluZWQnID8gbWF4U2FmZTMyQml0SW50IDogRVMuVG9VaW50MzIobGltaXQpO1xuICAgICAgICAgICAgICAgIG1hdGNoID0gc2VwYXJhdG9yQ29weS5leGVjKHN0cmluZyk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGBzZXBhcmF0b3JDb3B5Lmxhc3RJbmRleGAgaXMgbm90IHJlbGlhYmxlIGNyb3NzLWJyb3dzZXJcbiAgICAgICAgICAgICAgICAgICAgbGFzdEluZGV4ID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXN0SW5kZXggPiBsYXN0TGFzdEluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdXNoQ2FsbChvdXRwdXQsIHN0clNsaWNlKHN0cmluZywgbGFzdExhc3RJbmRleCwgbWF0Y2guaW5kZXgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpeCBicm93c2VycyB3aG9zZSBgZXhlY2AgbWV0aG9kcyBkb24ndCBjb25zaXN0ZW50bHkgcmV0dXJuIGB1bmRlZmluZWRgIGZvclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9ucGFydGljaXBhdGluZyBjYXB0dXJpbmcgZ3JvdXBzXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbXBsaWFudEV4ZWNOcGNnICYmIG1hdGNoLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBuby1sb29wLWZ1bmMgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaFswXS5yZXBsYWNlKHNlcGFyYXRvcjIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBhcmd1bWVudHMubGVuZ3RoIC0gMjsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFyZ3VtZW50c1tpXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaFtpXSA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGVzbGludC1lbmFibGUgbm8tbG9vcC1mdW5jICovXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2gubGVuZ3RoID4gMSAmJiBtYXRjaC5pbmRleCA8IHN0cmluZy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnJheV9wdXNoLmFwcGx5KG91dHB1dCwgYXJyYXlTbGljZShtYXRjaCwgMSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdExlbmd0aCA9IG1hdGNoWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RMYXN0SW5kZXggPSBsYXN0SW5kZXg7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3V0cHV0Lmxlbmd0aCA+PSBzcGxpdExpbWl0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlcGFyYXRvckNvcHkubGFzdEluZGV4ID09PSBtYXRjaC5pbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VwYXJhdG9yQ29weS5sYXN0SW5kZXgrKzsgLy8gQXZvaWQgYW4gaW5maW5pdGUgbG9vcFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoID0gc2VwYXJhdG9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ZhbHVlKSAmJiAoL1xcKVsqP10vKS50ZXN0KHNlYXJjaFZhbHVlLnNvdXJjZSk7XG4gICAgICAgICAgICBpZiAoIWlzRm4gfHwgIWhhc0NhcHR1cmluZ0dyb3Vwcykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdHJfcmVwbGFjZS5jYWxsKHRoaXMsIHNlYXJjaFZhbHVlLCByZXBsYWNlVmFsdWUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgd3JhcHBlZFJlcGxhY2VWYWx1ZSA9IGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG9yaWdpbmFsTGFzdEluZGV4ID0gc2VhcmNoVmFsdWUubGFzdEluZGV4O1xuICAgICAgICAgICAgICAgICAgICBzZWFyY2hWYWx1ZS5sYXN0SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IHNlYXJjaFZhbHVlLmV4ZWMobWF0Y2gpIHx8IFtdO1xuICAgICAgICAgICAgICAgICAgICBzZWFyY2hWYWx1ZS5sYXN0SW5kZXggPSBvcmlnaW5hbExhc3RJbmRleDtcbiAgICAgICAgICAgICAgICAgICAgcHVzaENhbGwoYXJncywgYXJndW1lbnRzW2xlbmd0aCAtIDJdLCBhcmd1bWVudHNbbGVuZ3RoIC0gMV0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZVZhbHVlLmFwcGx5KHRoaXMsIGFyZ3MpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmV0dXJuIHN0cl9yZXBsYWNlLmNhbGwodGhpcywgc2VhcmNoVmFsdWUsIHdyYXBwZWRSZXBsYWNlVmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cblxuICAgIC8vIEVDTUEtM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IHZhciBwb3MgPSBpc0FjdHVhbE5hTihudW1Qb3MpID8gSW5maW5pdHkgOiBFUy5Ub0ludGVnZXIobnVtUG9zKTtcbiAgICAgICAgICAgIHZhciBzdGFydCA9IG1pbihtYXgocG9zLCAwKSwgUy5sZW5ndGgpO1xuICAgICAgICAgICAgdmFyIHNlYXJjaExlbiA9IHNlYXJjaFN0ci5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgayA9IHN0YXJ0ICsgc2VhcmNoTGVuO1xuICAgICAgICAgICAgd2hpbGUgKGsgPiAwKSB7XG4gICAgICAgICAgICAgICAgayA9IG1heCgwLCBrIC0gc2VhcmNoTGVuKTtcbiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBzdHJJbmRleE9mKHN0clNsaWNlKFMsIGssIHN0YXJ0ICsgc2VhcmNoTGVuKSwgc2VhcmNoU3RyKTtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBrICsgaW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG4gICAgfSwgaGFzTGFzdEluZGV4QnVnKTtcblxuICAgIHZhciBvcmlnaW5hbExhc3RJbmRleE9mID0gU3RyaW5nUHJvdG90eXBlLmxhc3RJbmRleE9mO1xuICAgIGRlZmluZVByb3BlcnRpZXMoU3RyaW5nUHJvdG90eXBlLCB7XG4gICAgICAgIGxhc3RJbmRleE9mOiBmdW5jdGlvbiBsYXN0SW5kZXhPZihzZWFyY2hTdHJpbmcpIHtcbiAgICAgICAgICAgIHJldHVybiBvcmlnaW5hbExhc3RJbmRleE9mLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgIH1cbiAgICB9LCBTdHJpbmdQcm90b3R5cGUubGFzdEluZGV4T2YubGVuZ3RoICE9PSAxKTtcblxuICAgIC8vIEVTLTUgMTUuMS4yLj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gaWYgKHR5cGVvZiBtc2cgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgbXNnID0gJFN0cmluZyhtc2cpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFuYW1lKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghbXNnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5hbWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbmFtZSArICc6ICcgKyBtc2c7XG4gICAgICAgIH07XG4gICAgICAgIC8vIGNhbid0IHVzZSBkZWZpbmVQcm9wZXJ0aWVzIGhlcmUgYmVjYXVzZSBvZiB0b1N0cmluZyBlbnVtZXJhdGlvbiBpc3N1ZSBpbiBJRSA8PSA4XG4gICAgICAgIEVycm9yLnByb3RvdHlwZS50b1N0cmluZyA9IGVycm9yVG9TdHJpbmdTaGltO1xuICAgIH1cblxuICAgIGlmIChzdXBwb3J0c0Rlc2NyaXB0b3JzKSB7XG4gICAgICAgIHZhciBlbnN1cmVOb25FbnVtZXJhYmxlID0gZnVuY3Rpb24gKG9iaiwgcHJvcCkge1xuICAgICAgICAgICAgaWYgKGlzRW51bShvYmosIHByb3ApKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRlc2MgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iaiwgcHJvcCk7XG4gICAgICAgICAgICAgICAgaWYgKGRlc2MuY29uZmlndXJhYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlc2MuZW51bWVyYWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBkZXNjKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGVuc3VyZU5vbkVudW1lcmFibGUoRXJyb3IucHJvdG90eXBlLCAnbWVzc2FnZScpO1xuICAgICAgICBpZiAoRXJyb3IucHJvdG90eXBlLm1lc3NhZ2UgIT09ICcnKSB7XG4gICAgICAgICAgICBFcnJvci5wcm90b3R5cGUubWVzc2FnZSA9ICcnO1xuICAgICAgICB9XG4gICAgICAgIGVuc3VyZU5vbkVudW1lcmFibGUoRXJyb3IucHJvdG90eXBlLCAnbmFtZScpO1xuICAgIH1cblxuICAgIGlmIChTdHJpbmcoL2EvbWlnKSAhPT0gJy9hL2dpbScpIHtcbiAgICAgICAgdmFyIHJlZ2V4VG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICAgICAgICAgIHZhciBzdHIgPSAnLycgKyB0aGlzLnNvdXJjZSArICcvJztcbiAgICAgICAgICAgIGlmICh0aGlzLmdsb2JhbCkge1xuICAgICAgICAgICAgICAgIHN0ciArPSAnZyc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5pZ25vcmVDYXNlKSB7XG4gICAgICAgICAgICAgICAgc3RyICs9ICdpJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLm11bHRpbGluZSkge1xuICAgICAgICAgICAgICAgIHN0ciArPSAnbSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RyO1xuICAgICAgICB9O1xuICAgICAgICAvLyBjYW4ndCB1c2UgZGVmaW5lUHJvcGVydGllcyBoZXJlIGJlY2F1c2Ugb2YgdG9TdHJpbmcgZW51bWVyYXRpb24gaXNzdWUgaW4gSUUgPD0gOFxuICAgICAgICBSZWdFeHAucHJvdG90eXBlLnRvU3RyaW5nID0gcmVnZXhUb1N0cmluZztcbiAgICB9XG59KSk7XG4iLCIndXNlIHN0cmljdCc7XG4vKmpzbGludCBlcWVxOiB0cnVlKi9cblxuSGFuZGxlYmFycy5yZWdpc3RlckhlbHBlcignc2FuaXRpemUnLCBmdW5jdGlvbiAodGV4dCkge1xuICA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RoOyBpKyspIHtcbiAgICAgICAgICB2YXIga3YgPSBwYXJ0c1tpXS5zcGxpdCgnPScpO1xuICAgICAgICAgIGlmKGt2ICYmIGt2Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGlmIChrdlswXSA9PT0gdGhpcy5uYW1lKSB7XG4gICAgICAgICAgICAgIC8vIHNraXAgaXRcbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChvYmoudXJsLmluZGV4T2YoJz8nKSA+IDApIHtcbiAgICAgIG9iai51cmwgPSBvYmoudXJsICsgJyYnICsgdGhpcy5uYW1lICsgJz0nICsgdGhpcy52YWx1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgb2JqLnVybCA9IG9iai51cmwgKyAnPycgKyB0aGlzLm5hbWUgKyAnPScgKyB0aGlzLnZhbHVlO1xuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xuICB9IGVsc2UgaWYgKHRoaXMudHlwZSA9PT0gJ2hlYWRlcicpIHtcbiAgICBpZih0eXBlb2Ygb2JqLmhlYWRlcnNbdGhpcy5uYW1lXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgIG9iai5oZWFkZXJzW3RoaXMubmFtZV0gPSB0aGlzLnZhbHVlO1xuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG52YXIgQ29va2llQXV0aG9yaXphdGlvbiA9IG1vZHVsZS5leHBvcnRzLkNvb2tpZUF1dGhvcml6YXRpb24gPSBmdW5jdGlvbiAoY29va2llKSB7XG4gIHRoaXMuY29va2llID0gY29va2llO1xufTtcblxuQ29va2llQXV0aG9yaXphdGlvbi5wcm90b3R5cGUuYXBwbHkgPSBmdW5jdGlvbiAob2JqKSB7XG4gIG9iai5jb29raWVKYXIgPSBvYmouY29va2llSmFyIHx8IG5ldyBDb29raWVKYXIoKTtc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wKTtcbiAgICAgICAgICBzZWxmLmFwaXNBcnJheS5wdXNoKG5ldyBPcGVyYXRpb25Hcm91cCh0YWcsIG9wZXJhdGlvbkdyb3VwLmRlc2NyaXB0aW9uLCBvcGVyYXRpb25Hcm91cC5leHRlcm5hbERvY3MsIG9wZXJhdGlvbk9iamVjdCkpO1xuICAgICAgICB9XG5cbiAgICAgICAgb3BlcmF0aW9uSWQgPSBzZWxmLm1ha2VVbmlxdWVPcGVyYXRpb25JZChvcGVyYXRpb25JZCwgc2VsZi5hcGlzW2FwaVByb3BlcnR5XSk7XG5cbiAgICAgICAgLy8gQmluZCB0YWcgaGVscFxuICAgICAgICBpZiAoIV8uaXNGdW5jdGlvbihvcGVyYXRpb25Hcm91cC5oZWxwKSkge1xuICAgICAgICAgIG9wZXJhdGlvbkdyb3VwLmhlbHAgPSBfLmJpbmQoc2VsZi5oZWxwLCBvcGVyYXRpb25Hcm91cCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBiaW5kIHRvIHRoZSBhcGlzIG9iamVjdFxuICAgICAgICBzZWxmLmFwaXNbYXBpUHJvcGVydHldW29wZXJhdGlvbklkXSA9IG9wZXJhdGlvbkdyb3VwW29wZXJhdGlvbklkXSA9IF8uYmluZChvcGVyYXRpb25PYmplY3QuZXhlY3V0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRpb25PYmplY3QpO1xuICAgICAgICBzZWxmLmFwaXNbYXBpUHJvcGVydHldW29wZXJhdGlvbklkXS5oZWxwID0gb3BlcmF0aW9uR3JvdXBbb3BlcmF0aW9uSWRdLmhlbHAgPSBfLmJpbmQob3BlcmF0aW9uT2JqZWN0LmhlbHAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXR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T09ICdbb2JqZWN0IEZvcm1EYXRhXScpIHtcbiAgICAgICAgICByLnNlbmQob2JqLmJvZHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHZhciBrZXluYW1lLCB2YWx1ZSwgdjtcbiAgICAgICAgICBmb3IgKGtleW5hbWUgaW4gb2JqLmJvZHkpIHtcbiAgICAgICAgICAgIHZhbHVlID0gb2JqLmJvZHlba2V5bmFtZV07XG4gICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICBmb3IodiBpbiB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHIuZmllbGQoa2V5bmFtZSwgdik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICByLmZpZWxkKGtleW5hbWUsIHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKF8uaXNPYmplY3Qob2JqLmJvZHkpKSB7XG4gICAgICAgIC8vIG5vbiBtdWx0aXBhcnQvZm9ybS1kYXRhXG4gICAgICAgIG9iai5ib2R5ID0gSlNPTi5zdHJpbmdpZnkob2JqLmJvZHkpO1xuICAgICAgICByLnNlbmQob2JqLmJvZHkpO1xuICAgICAgfVxuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIHIuc2VuZChvYmouYm9keSk7XG4gICAgfVxuICB9XG5cbiAgdmFyIG5hbWU7XG4gIGZvciAobmFtZSBpbiBoZWFkZXJzKSB7XG4gICAgci5zZXQobmFtZSwgaGVhZGVyc1tuYW1lXSk7XG4gIH1cblxuICBpZih0eXBlb2Ygci5idWZmZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICByLmJ1ZmZlcigpOyAvLyBmb3JjZSBzdXBlcmFnZW50IHRvIHBvcHVsYXRlIHJlcy50ZXh0IHdpdGggdGhlIHJhdyByZXNwb25zZSBkYXRhXG4gIH1cblxuICByLmVuZChmdW5jdGlvbiAoZXJyLCByZXMpIHtcbiAgICByZXMgPSByZXMgfHwge1xuICAgICAgc3RhdHVzOiAwLFxuICAgICAgaGVhZGVyczoge2Vycm9yOiAnbm8gcmVzcG9uc2UgZnJvbSBzZXJ2ZXInfVxuICAgIH07XG4gICAgdmFyIHJlc3BvbnNlID0ge1xuICAgICAgdXJsOiBvYmoudXJsLFxuICAgICAgbWV0aG9kOiBvYmoubWV0aG9kLFxuICAgICAgaGVhZGVyczogcmVzLmhlYWRlcnNcbiAgICB9O1xuICAgIHZhciBjYjtcblxuICAgIGlmICghZXJyICYmIHJlcy5lcnJvcikge1xuICAgICAgZXJyID0gcmVzLmVycm9yO1xuICAgIH1cblxuICAgIGlmIChlcnIgJiYgb2JqLm9uICYmIG9iai5vbi5lcnJvcikge1xuICAgICAgcmVzcG9uc2UuZXJyT2JqID0gZXJyO1xuICAgICAgcmVzcG9uc2Uuc3RhdHVzID0gcmVzID8gcmVzLnN0YXR1cyA6IDUwMDtcbiAgICAgIHJlc3BvbnNlLnN0YXR1c1RleHQgPSByZXMgPyByZXMudGV4dCA6IGVyci5tZXNzYWdlO1xuICAgICAgaWYgKHJlcy5oZWFkZXJzICYmIHJlcy5oZWFkZXJzWydjb250ZW50LXR5cGUnXSkge1xuICAgICAgICBpZiAocmVzLmhlYWRlcnNbJ2NvbnRlbnQtdHlwZSddLmluZGV4T2YoJ2FwcGxpY2F0aW9uL2pzb24nKSA+PSAwKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJlc3BvbnNlLm9iaiA9IEpTT04ucGFyc2UocmVzcG9uc2Uuc3RhdHVzVGV4dCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICByZXNwb25zZS5vYmogPSBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgY2IgPSBvYmoub24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lcnNbaV07XG4gICAgICAgICAgICBsb2NhdGlvbiA9ICcvcGF0aHMnICsgbmFtZSArICcvJyArIG1ldGhvZCArICcvcGFyYW1ldGVycyc7XG5cbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXIuaW4gPT09ICdib2R5JyAmJiBwYXJhbWV0ZXIuc2NoZW1hKSB7XG4gICAgICAgICAgICAgIGlmIChfLmlzQXJyYXkocGFyYW1ldGVyLnNjaGVtYS5hbGxPZikpIHtcbiAgICAgICAgICAgICAgICAvLyBtb3ZlIHRvIGEgZGVmaW5pdGlvblxuICAgICAgICAgICAgICAgIG1vZGVsTmFtZSA9ICdpbmxpbmVfbW9kZWwnO1xuICAgICAgICAgICAgICAgIG5hbWUgPSBtb2RlbE5hbWU7XG4gICAgICAgICAgICAgICAgZG9uZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGNvdW50ZXIgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICghZG9uZSkge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzcGVjLmRlZmluaXRpb25zW25hbWVdID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBuYW1lID0gbW9kZWxOYW1lICsgJ18nICsgY291bnRlcjtcbiAgICAgICAgICAgICAgICAgIGNvdW50ZXIrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9IHthbGxPZjogcGFyYW1ldGVyLnNjaGVtYS5hbGxPZn07XG4gICAgICAgICAgICAgICAgZGVsZXRlIHBhcmFtZXRlci5zY2hlbWEuYWxsT2Y7XG4gICAgICAgICAgICAgICAgcGFyYW1ldGVyLnNjaGVtYS4kcmVmID0gJyMvZGVmaW5pdGlvbnMvJyArIG5hbWU7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQWxsT2Yocm9vdCwgbmFtZSwgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSwgcmVzb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgc3BlYyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlVG8ocm9vdCwgcGFyYW1ldGVyLnNjaGVtYSwgcmVzb2x1dGlvblRhYmxlLCBsb2NhdGlvbik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHBhcmFtZXRlci4kcmVmKSB7XG4gICAgICAgICAgICAgIC8vIHBhcmFtZXRlciByZWZlcmVuY2VcbiAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlSW5saW5lKHJvb3QsIHNwZWMsIHBhcmFtZXRlciwgcmVzb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgcGFyYW1ldGVyLiRyZWYpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvciAocmVzcG9uc2VDb2RlIGluIG9wZXJhdGlvbi5yZXNwb25zZXMpIHtcbiAgICAgICAgICAgIHZhciByZXNwb25zZSA9IG9wZXJhdGlvbi5yZXNwb25zZXNbcmVzcG9uc2VDb2RlXTtcbiAgICAgICAgICAgIGxvY2F0aW9uID0gJy9wYXRocycgKyBuYW1lICsgJy8nICsgbWV0aG9kICsgJy9yZXNwb25zZXMvJyArIHJlc3BvbnNlQ29kZTtcblxuICAgICAgICAgICAgaWYgKF8uaXNPYmplY3QocmVzcG9uc2UpKSB7XG4gICAgICAgICAgICAgIGlmIChyZXNwb25zZS4kcmVmKSB7XG4gICAgICAgICAgICAgICAgLy8gcmVzcG9uc2UgcmVmZXJlbmNlXG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlSW5saW5lKHJvb3QsIHNwZWMsIHJlc3BvbnNlLCByZXNvbHV0aW9uVGFibGUsIHVucmVzb2x2ZWRSZWZzLCBsb2NhdGlvbik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnNjaGVtYSkge1xuICAgICAgICAgICAgICAgIHZhciByZXNwb25zZU9iaiA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgICAgIGlmIChfLmlzQXJyYXkocmVzcG9uc2VPYmouc2NoZW1hLmFsbE9mKSkge1xuICAgICAgICAgICAgICAgICAgLy8gbW92ZSB0byBhIGRlZmluaXRpb25cbiAgICAgICAgICAgICAgICAgIG1vZGVsTmFtZSA9ICdpbmxpbmVfbW9kZWwnO1xuICAgICAgICAgICAgICAgICAgbmFtZSA9IG1vZGVsTmFtZTtcbiAgICAgICAgICAgICAgICAgIGRvbmUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgIGNvdW50ZXIgPSAwO1xuICAgICAgICAgICAgICAgICAgd2hpbGUgKCFkb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuYW1lID0gbW9kZWxOYW1lICsgJ18nICsgY291bnRlcjtcbiAgICAgICAgICAgICAgICAgICAgY291bnRlcisrO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9IHthbGxPZjogcmVzcG9uc2VPYmouc2NoZW1hLmFsbE9mfTtcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByZXNwb25zZU9iai5zY2hlbWEuYWxsT2Y7XG4gICAgICAgICAgICAgICAgICBkZWxldGUgcmVzcG9uc2VPYmouc2NoZW1hLnR5cGU7XG4gICAgICAgICAgICAgICAgICByZXNwb25zZU9iai5zY2hlbWEuJHJlZiA9ICcjL2RlZmluaXRpb25zLycgKyBuYW1lO1xuICAgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQWxsT2Yocm9vdCwgbmFtZSwgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSwgcmVzb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgc3BlYyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKCdhcnJheScgPT09IHJlc3BvbnNlT2JqLnNjaGVtYS50eXBlKSB7XG4gICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2VPYmouc2NoZW1hLml0ZW1zICYmIHJlc3BvbnNlT2JqLnNjaGVtYS5pdGVtcy4kcmVmKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHJlc3BvbnNlIHJlZmVyZW5jZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmVJbmxpbmUocm9vdCwgc3BlYywgcmVzcG9uc2VPYmouc2NoZW1hLml0ZW1zLCByZXNvbHV0aW9uVGFibGUsIHVucmVzb2x2ZWRSZWZzLCBsb2NhdGlvbik7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlVG8ocm9vdCwgcmVzcG9uc2Uuc2NoZW1hLCByZXNvbHV0aW9uVGFibGUsIGxvY2F0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIGNsZWFyIHRoZW0gb3V0IHRvIGF2b2lkIG11bHRpcGxlIHJlc29sdXRpb25zXG4gICAgICBwYXRoLnBhcmFtZXRlcnMgPSBbXTtcbiAgICB9XG4gIH1cblxuICB2YXIgZXhwZWN0ZWRDYWxscyA9IDAsIHRvUmVzb2x2ZSA9IFtdO1xuICAvLyBpZiB0aGUgcm9vdCBpcyBzYW1lIGFzIG9ialtpXS5yb290IHdlIGNhbiByZXNvbHZlIGxvY2FsbHlcbiAgdmFyIGFsbCA9IHJlc29sdXRpb25UYWJsZTtcblxuICB2YXIgcGFydHM7XG4gIGZvcihpID0gMDsgaSA8IGFsbC5sZW5ndGg7IGkrKykge1xuICAgIHZhciBhID0gYWxsW2ldO1xuICAgIGlmKHJvb3QgPT09IGEucm9vdCkge1xuICAgICAgaWYoYS5yZXNvbHZlQXMgPT09ICdyZWYnKSB7XG4gICAgICAgIC8vIHJlc29sdmUgYW55IHBhdGggd2Fsa2luZ1xuICAgICAgICB2YXIgam9pbmVkID0gKChhLnJvb3QgfHwgJycpICsgJy8nICsgYS5rZXkpLnNwbGl0KCcvJyk7XG4gICAgICAgIHZhciBub3JtYWxpemVkID0gW107XG4gICAgICAgIHZhciB1cmwgPSAnJztcbiAgICAgICAgdmFyIGs7XG5cbiAgICAgICAgaWYoYS5rZXkuaW5kZXhPZignLi4vJykgPj0gMCkge1xuICAgICAgICAgIGZvcih2YXIgaiA9IDA7IGogPCBqb2luZWQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmKGpvaW5lZFtqXSA9PT0gJy4uJykge1xuICAgICAgICAgICAgICBub3JtYWxpemVkID0gbm9ybWFsaXplZC5zbGljZSgwLCBub3JtYWxpemVkLmxlbmd0aC0xKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBub3JtYWxpemVkLnB1c2goam9pbmVkW2pdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgZm9yKGsgPSAwOyBrIDwgbm9ybWFsaXplZC5sZW5ndGg7IGsgKyspIHtcbiAgICAgICAgICAgIGlmKGsgPiAwKSB7XG4gICAgICAgICAgICAgIHVybCArPSAnLyc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB1cmwgKz0gbm9ybWFsaXplZFtrXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gd2Ugbm93IGhhdmUgdG8gcmVtb3RlIHJlc29sdmUgdGhpcyBiZWNhdXNlIHRoZSBwYXRoIGhhcyBjaGFuZ2VkXG4gICAgICAgICAgYS5yb290ID0gdXJsO1xuICAgICAgICAgIHRvUmVzb2x2ZS5wdXNoKGEpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIHBhcnRzID0gYS5rZXkuc3BsaXQoJyMnKTtcbiAgICAgICAgICBpZihwYXJ0cy5sZW5ndGggPT09IDIpIHtcbiAgICAgICAgICAgIGlmKHBhcnRzWzBdLmluZGV4T2YoJ2h0dHA6JykgPT09IDAgfHwgcGFydHNbMF0uaW5kZXhPZignaHR0cHM6JykgPT09IDApIHtcbiAgICAgICAgICAgICAgYS5yb290ID0gcGFydHNbMF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsb2NhdGlvbiA9IHBhcnRzWzFdLnNwbGl0KCcvJyk7XG4gICAgICAgICAgICB2YXIgcjtcbiAgICAgICAgICAgIHZhciBzID0gc3BlYztcbiAgICAgICAgICAgIGZvcihrID0gMDsgayA8IGxvY2F0aW9uLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgIHZhciBwYXJ0ID0gbG9jYXRpb25ba107XG4gICAgICAgICAgICAgIGlmKHBhcnQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgcyA9IHNbcGFydF07XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICByID0gcztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICByID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYociA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBtdXN0IHJlc29sdmUgdGhpcyB0b29cbiAgICAgICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgaWYgKGEucmVzb2x2ZUFzID09PSAnaW5saW5lJykge1xuICAgICAgICAgIGlmKGEua2V5ICYmIGEua2V5LmluZGV4T2YoJyMnKSA9PT0gLTEgJiYgYS5rZXkuY2hhckF0KDApICE9PSAnLycpIHtcbiAgICAgICAgICAgIC8vIGhhbmRsZSByZWxhdGl2ZSBzY2hlbWFcbiAgICAgICAgICAgIHBhcnRzID0gYS5yb290LnNwbGl0KCcvJyk7XG4gICAgICAgICAgICBsb2NhdGlvbiA9ICcnO1xuICAgICAgICAgICAgZm9yKGkgPSAwOyBpIDwgcGFydHMubGVuZ3RoIC0gMTsgaSsrKSB7XG4gICAgICAgICAgICAgIGxvY2F0aW9uICs9IHBhcnRzW2ldICsgJy8nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbG9jYXRpb24gKz0gYS5rZXk7XG4gICAgICAgICAgICBhLnJvb3QgPSBsb2NhdGlvbjtcbiAgICAgICAgICAgIGEubG9jYXRpb24gPSAnJztcbiAgICAgICAgICB9XG4gICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICB0b1Jlc29sdmUucHVzaChhKTtcbiAgICB9XG4gIH1cbiAgZXhwZWN0ZWRDYWxscyA9IHRvUmVzb2x2ZS5sZW5ndGg7XG5cbiAgLy8gcmVzb2x2ZSBhbnl0aGluZyB0aGF0IGlzIGxvY2FsXG5cbiAgdmFyIGxvY2sgPSB7fTtcbiAgZm9yKHZh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IGNvbnNvbGUubG9nKCdmYWlsZWQgdXJsOiAnICsgb2JqLnVybCk7XG4gICAgICAgICAgICAgIHNlbGYuZmFpbGVkVXJscy5wdXNoKG9iai51cmwpO1xuICAgICAgICAgICAgICBpZiAobG9jaykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsb2NrW2l0ZW0ucm9vdF07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdW5yZXNvbHZlZFJlZnNbaXRlbS5rZXldID0ge1xuICAgICAgICAgICAgICAgIHJvb3Q6IGl0ZW0ucm9vdCxcbiAgICAgICAgICAgICAgICBsb2NhdGlvbjogaXRlbS5sb2NhdGlvblxuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIGlmIChwcm9jZXNzZWRDYWxscyA9PT0gZXhwZWN0ZWRDYWxscykge1xuICAgICAgICAgICAgICAgIHNlbGYuZmluaXNoKHNwZWMsIF9yb290LCByZXNvbHV0aW9uVGFibGUsIHJlc29sdmVkUmVmcywgdW5yZXNvbHZlZFJlZnMsIGNhbGxiYWNrKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgIC8vIGpzaGludCBpZ25vcmU6bGluZVxuICAgICAgICAgICAgcmVzcG9uc2U6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgICB2YXIgc3dhZ2dlciA9IHJlc3BvbnNlLm9iajtcbiAgICAgICAgICAgICAgaWYgKGxvY2spIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgbG9ja1tpdGVtLnJvb3RdO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChzZWxmLnJlc29sdmVyQ2FjaGUpIHtcbiAgICAgICAgICAgICAgICBzZWxmLnJlc29sdmVyQ2FjaGVbaXRlbS5yb290XSA9IHN3YWdnZXI7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgc2VsZi5yZXNvbHZlSXRlbShzd2FnZ2VyLCBpdGVtLnJvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgaXRlbSk7XG4gICAgICAgICAgICAgIHByb2Nlc3NlZENhbGxzICs9IDE7XG5cbiAgICAgICAgICAgICAgaWYgKHByb2Nlc3NlZENhbGxzID09PSBleHBlY3RlZENhbGxzKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5maW5pc2goc3BlYywgX3Jvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgY2FsbGJhY2spO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSAvLyBqc2hpbnQgaWdub3JlOmxpbmVcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBhcHBseSB0aW1lb3V0IG9ubHkgd2hlbiBzcGVjaWZpZWRcbiAgICAgICAgaWYgKHNjb3BlICYmIHNjb3BlLmZldGNoU3BlY1RpbWVvdXQpIHtcbiAgICAgICAgICBvYmoudGltZW91dCA9IHNjb3BlLmZldGNoU3BlY1RpbWVvdXQ7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2NvcGUgJiYgc2NvcGUuY2xpZW50QXV0aG9yaXphdGlvbnMpIHtcbiAgICAgICAgICBzY29wZS5jbGllbnRBdXRob3JpemF0aW9ucy5hcHBseShvYmopO1xuICAgICAgICB9XG5cbiAgICAgICAgKGZ1bmN0aW9uIHdhaXRGb3JVbmxvY2soKSB7XG4gICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGlmIChsb2NrW29iai51cmxdKSB7XG4gICAgICAgICAgICAgIHdhaXRGb3JVbmxvY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgY2FjaGVkID0gc2VsZi5yZXNvbHZlckNhY2hlW29iai51cmxdO1xuICAgICAgICAgICAgICBpZiAoXy5pc09iamVjdChjYWN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IHJvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgaXRlbSkge1xuICB2YXIgcGF0aCA9IGl0ZW0ubG9jYXRpb247XG4gIHZhciBsb2NhdGlvbiA9IHNwZWMsIHBhcnRzID0gcGF0aC5zcGxpdCgnLycpO1xuICBpZihwYXRoICE9PSAnJykge1xuICAgIGZvciAodmFyIGogPSAwOyBqIDwgcGFydHMubGVuZ3RoOyBqKyspIHtcbiAgICAgIHZhciBzZWdtZW50ID0gcGFydHNbal07XG4gICAgICBpZiAoc2VnbWVudC5pbmRleE9mKCd+MScpICE9PSAtMSkge1xuICAgICAgICBzZWdtZW50ID0gcGFydHNbal0ucmVwbGFjZSgvfjAvZywgJ34nKS5yZXBsYWNlKC9+MS9nLCAnLycpO1xuICAgICAgICBpZiAoc2VnbWVudC5jaGFyQXQoMCkgIT09ICcvJykge1xuICAgICAgICAgIHNlZ21lbnQgPSAnLycgKyBzZWdtZW50O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodHlwZW9mIGxvY2F0aW9uID09PSAndW5kZWZpbmVkJyB8fCBsb2NhdGlvbiA9PT0gbnVsbCkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGlmIChzZWdtZW50ID09PSAnJyAmJiBqID09PSAocGFydHMubGVuZ3RoIC0gMSkgJiYgcGFydHMubGVuZ3RoID4gMSkge1xuICAgICAgICBsb2NhdGlvbiA9IG51bGw7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID4gMCkge1xuICAgICAgICBsb2NhdGlvbiA9IGxvY2F0aW9uW3NlZ21lbnRdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICB2YXIgcmVzb2x2ZWQgPSBpdGVtLmtleTtcbiAgcGFydHMgPSBpdGVtLmtleS5zcGxpdCgnLycpO1xuICB2YXIgcmVzb2x2ZWROYW1lID0gcGFydHN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NwZWMuZGVmaW5pdGlvbnMgfHwge307XG4gICAgICBpZiAoaXRlbS5yZXNvbHZlQXMgPT09ICdyZWYnKSB7XG4gICAgICAgIGlmIChsb2NhbFJlc29sdmUgIT09IHRydWUpIHtcbiAgICAgICAgICAvLyBkb24ndCByZXRhaW4gcm9vdCBmb3IgbG9jYWwgZGVmaW5pdGlvbnNcbiAgICAgICAgICBmb3IgKGtleSBpbiByZXNvbHZlZFRvLm9iaikge1xuICAgICAgICAgICAgYWJzID0gdGhpcy5yZXRhaW5Sb290KGtleSwgcmVzb2x2ZWRUby5vYmpba2V5XSwgaXRlbS5yb290KTtcbiAgICAgICAgICAgIHJlc29sdmVkVG8ub2JqW2tleV0gPSBhYnM7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHNwZWMuZGVmaW5pdGlvbnNbcmVzb2x2ZWRUby5uYW1lXSA9IHJlc29sdmVkVG8ub2JqO1xuICAgICAgICBpdGVtLm9iai4kcmVmID0gJyMvZGVmaW5pdGlvbnMvJyArIHJlc29sdmVkVG8ubmFtZTtcbiAgICAgIH0gZWxzZSBpZiAoaXRlbS5yZXNvbHZlQXMgPT09ICdpbmxpbmUnKSB7XG4gICAgICAgIHZhciB0YXJnZXRPYmogPSBpdGVtLm9iajtcbiAgICAgICAgdGFyZ2V0T2JqWyd4LXJlc29sdmVkLWZyb20nXSA9IFsgaXRlbS5rZXkgXTtcbiAgICAgICAgZGVsZXRlIHRhcmdldE9iai4kcmVmO1xuXG4gICAgICAgIGZvciAoa2V5IGluIHJlc29sdmVkVG8ub2JqKSB7XG4gICAgICAgICAgYWJzID0gcmVzb2x2ZWRUby5vYmpba2V5XTtcblxuICAgICAgICAgIGlmIChsb2NhbFJlc29sdmUgIT09IHRydWUpIHtcbiAgICAgICAgICAgIC8vIGRvbid0IHJldGFpbiByb290IGZvciBsb2NhbCBkZWZpbml0aW9uc1xuICAgICAgICAgICAgYWJzID0gdGhpcy5yZXRhaW5Sb290KGtleSwgcmVzb2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ICB9XG4gICAgICByb290VHJpbW1lZCA9IHRydWU7XG4gICAgfVxuICAgIGlmKHJlZi5pbmRleE9mKCcjJykgPj0gMCkge1xuICAgICAgaWYocmVmLmluZGV4T2YoJy8nKSA9PT0gMCkge1xuICAgICAgICBycyA9IHJlZi5zcGxpdCgnIycpO1xuICAgICAgICBwICA9IHJvb3Quc3BsaXQoJy8vJyk7XG4gICAgICAgIHAyID0gcFsxXS5zcGxpdCgnLycpO1xuICAgICAgICByb290ID0gcFswXSArICcvLycgKyBwMlswXSArIHJzWzBdO1xuICAgICAgICBsb2NhdGlvbiA9IHJzWzFdO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHJzID0gcmVmLnNwbGl0KCcjJyk7XG4gICAgICAgIGlmKHJzWzBdICE9PSAnJykge1xuICAgICAgICAgIHAyID0gcm9vdC5zcGxpdCgnLycpO1xuICAgICAgICAgIHAyID0gcDIuc2xpY2UoMCwgcDIubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgaWYoIXJvb3RUcmltbWVkKSB7XG4gICAgICAgICAgICByb290ID0gJyc7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHAyLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgIGlmKGsgPiAwKSB7IHJvb3QgKz0gJy8nOyB9XG4gICAgICAgICAgICAgIHJvb3QgKz0gcDJba107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJvb3QgKz0gJy8nICsgcmVmLnNwbGl0KCcjJylbMF07XG4gICAgICAgIH1cbiAgICAgICAgbG9jYXRpb24gPSByc1sxXTtcbiAgICAgIH1cbiAgICB9XG4gICAgaWYgKHJlZi5pbmRleE9mKCdodHRwOicpID09PSAwIHx8IHJlZi5pbmRleE9mKCdodHRwczonKSA9PT0gMCkge1xuICAgICAgaWYocmVmLmluZGV4T2YoJyMnKSA+PSAwKSB7XG4gICAgICAgIHJvb3QgPSByZWYuc3BsaXQoJyMnKVswXTtcbiAgICAgICAgbG9jYXRpb24gPSByZWYuc3BsaXQoJyMnKVsxXTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICByb290ID0gcmVmO1xuICAgICAgICBsb2NhdGlvbiA9ICcnO1xuICAgICAgfVxuICAgICAgcmVzb2x1dGlvblRhYmxlLnB1c2goe29iajogcHJvcGVydHksIHJlc29sdmVBczogJ2lubGluZScsIHJvb3Q6IHJvb3QsIGtleToga2V5LCBsb2NhdGlvbjogbG9jYXRpb259KTtcbiAgICB9IGVsc2UgaWYgKHJlZi5pbmRleE9mKCcjJykgPT09IDApIHtcbiAgICAgIGxvY2F0aW9uID0gcmVmLnNwbGl0KCcjJylbMV07XG4gICAgICByZXNvbHV0aW9uVGFibGUucHVzaCh7b2JqOiBwcm9wZXJ0eSwgcmVzb2x2ZUFzOiAnaW5saW5lJywgcm9vdDogcm9vdCwga2V5OiBrZXksIGxvY2F0aW9uOiBsb2NhdGlvbn0pO1xuICAgIH0gZWxzZSBpZiAocmVmLmluZGV4T2YoJy8nKSA9PT0gMCAmJiByZWYuaW5kZXhPZignIycpID09PSAtMSkge1xuICAgICAgbG9jYXRpb24gPSByZWY7XG4gICAgICB2YXIgbWF0Y2hlcyA9IHJvb3QubWF0Y2goL15odHRwcz9cXDpcXC9cXC8oW15cXC8/I10rKSg/OltcXC8/I118JCkvaSk7XG4gICAgICBpZihtYXRjaGVzKSB7XG4gICAgICAgIHJvb3QgPSBtYXRjaGVzWzBdICsgcmVmLnN1YnN0cmluZygxKTtcbiAgICAgICAgbG9jYXRpb24gPSAnJztcbiAgICAgIH1cbiAgICAgIHJlc29sdXRpb25UYWJsZS5wdXNoKHtvYmo6IHByb3BlcnR5LCByZXNvbHZlQXM6ICdpbmxpbmUnLCByb290OiByb290LCBrZXk6IGtleSwgbG9jYXRpb246IGxvY2F0aW9ufSk7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgcmVzb2x1dGlvblRhYmxlLnB1c2goe29iajogcHJv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ID0gJ3NlbGYnO1xuICAgICAgICAgIGlmKHR5cGVvZiBjb21wb25lbnRbJ3gtcmVzb2x2ZWQtZnJvbSddICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgc291cmNlID0gY29tcG9uZW50Wyd4LXJlc29sdmVkLWZyb20nXVswXTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBmb3IodmFyIHBhcnQgaW4gY29tcG9uZW50KSB7XG4gICAgICAgICAgICBpZighb3V0cHV0Lmhhc093blByb3BlcnR5KHBhcnQpKSB7XG4gICAgICAgICAgICAgIG91dHB1dFtwYXJ0XSA9IF8uY2xvbmVEZWVwKGNvbXBvbmVudFtwYXJ0XSk7XG4gICAgICAgICAgICAgIGlmKHBhcnQgPT09ICdwcm9wZXJ0aWVzJykge1xuICAgICAgICAgICAgICAgIGZvcihuYW1lIGluIG91dHB1dFtwYXJ0XSkge1xuICAgICAgICAgICAgICAgICAgb3V0cHV0W3BhcnRdW25hbWVdWyd4LXJlc29sdmVkLWZyb20nXSA9IHNvdXJjZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBpZihwYXJ0ID09PSAncHJvcGVydGllcycpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcGVydGllcyA9IGNvbXBvbmVudFtwYXJ0XTtcbiAgICAgICAgICAgICAgICBmb3IobmFtZSBpbiBwcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICAgICAgICBvdXRwdXQucHJvcGVydGllc1tuYW1lXSA9IF8uY2xvbmVEZWVwKHByb3BlcnRpZXNbbmFtZV0pO1xuICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVkRnJvbSA9IHByb3BlcnRpZXNbbmFtZV1bJ3gtcmVzb2x2ZWQtZnJvbSddO1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZXNvbHZlZEZyb20gPT09ICd1bmRlZmluZWQnIHx8IHJlc29sdmVkRnJvbSA9PT0gJ3NlbGYnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmVkRnJvbSA9IHNvdXJjZTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIG91dHB1dC5wcm9wZXJ0aWVzW25hbWVdWyd4LXJlc29sdmVkLWZyb20nXSA9IHJlc29sdmVkRnJvbTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSBpZihwYXJ0ID09PSAncmVxdWlyZWQnKSB7XG4gICAgICAgICAgICAgICAgLy8gbWVyZ2UgJiBkZWR1cCB0aGUgcmVxdWlyZWQgYXJyYXlcbiAgICAgICAgICAgICAgICB2YXIgYSA9IG91dHB1dC5yZXF1aXJlZC5jb25jYXQoY29tcG9uZW50W3BhcnRdKTtcbiAgICAgICAgICAgICAgICBmb3IodmFyIGsgPSAwOyBrIDwgYS5sZW5ndGg7ICsraykge1xuICAgICAgICAgICAgICAgICAgZm9yKHZhciBqID0gayArIDE7IGogPCBhLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmKGFba10gPT09IGFbal0pIHsgYS5zcGxpY2Uoai0tLCAxKTsgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvdXRwdXQucmVxdWlyZWQgPSBhO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2UgaWYocGFydCA9PT0gJ3gtcmVzb2x2ZWQtZnJvbScpIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRbJ3gtcmVzb2x2ZWQtZnJvbSddLnB1c2goc291cmNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBuZWVkIHRvIG1lcmdlIHRoaXMgcHJvcGVydHlcbiAgICAgICAgICAgICAgIC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B7XG4gICAgdmFyIHR5cGUgPSBzY2hlbWEudHlwZSB8fCAnb2JqZWN0JztcbiAgICB2YXIgaXNBcnJheSA9IHNjaGVtYS50eXBlID09PSAnYXJyYXknO1xuICAgIHZhciBodG1sID0gc3Ryb25nT3BlbiArIG5hbWUgKyAnICcgKyAoaXNBcnJheSA/ICdbJyA6ICd7JykgKyBzdHJvbmdDbG9zZTtcblxuICAgIGlmIChuYW1lKSB7XG4gICAgICBzZWVuTW9kZWxzLnB1c2gobmFtZSk7XG4gICAgfVxuXG4gICAgaWYgKGlzQXJyYXkpIHtcbiAgICAgIGlmIChfLmlzQXJyYXkoc2NoZW1hLml0ZW1zKSkge1xuICAgICAgICBodG1sICs9ICc8ZGl2PicgKyBfLm1hcChzY2hlbWEuaXRlbXMsIGZ1bmN0aW9uIChpdGVtKSB7XG4gICAgICAgICAgdmFyIHR5cGUgPSBpdGVtLnR5cGUgfHwgJ29iamVjdCc7XG5cbiAgICAgICAgICBpZiAoXy5pc1VuZGVmaW5lZChpdGVtLiRyZWYpKSB7XG4gICAgICAgICAgICBpZiAoXy5pbmRleE9mKFsnYXJyYXknLCAnb2JqZWN0J10sIHR5cGUpID4gLTEpIHtcbiAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdvYmplY3QnICYmIF8uaXNVbmRlZmluZWQoaXRlbS5wcm9wZXJ0aWVzKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnb2JqZWN0JztcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYWRkUmVmZXJlbmNlKGl0ZW0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gcHJpbWl0aXZlVG9PcHRpb25zSFRNTChpdGVtLCB0eXBlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGFkZFJlZmVyZW5jZShpdGVtL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biAgICAgICAgICAgICAgaHRtbCArPSAnLCA8c3BhbiBjbGFzcz1cInByb3BPcHRLZXlcIj5vcHRpb25hbDwvc3Bhbj4nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZihwcm9wZXJ0eS5yZWFkT25seSkge1xuICAgICAgICAgICAgICAgIGh0bWwgKz0gJywgPHNwYW4gY2xhc3M9XCJwcm9wUmVhZE9ubHlcIj5yZWFkIG9ubHk8L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaHRtbCArPSAnKSc7XG5cbiAgICAgICAgICAgIGlmICghXy5pc1VuZGVmaW5lZChwcm9wRGVzY3JpcHRpb24pKSB7XG4gICAgICAgICAgICAgIGh0bWwgKz0gJzogJyArICc8c3BhbiBjbGFzcz1cInByb3BEZXNjXCI+JyArIHByb3BEZXNjcmlwdGlvbiArICc8L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGNQcm9wZXJ0eS5lbnVtKSB7XG4gICAgICAgICAgICAgIGh0bWwgKz0gJyA9IDxzcGFuIGNsYXNzPVwicHJvcFZhbHNcIj5bXFwnJyArIGNQcm9wZXJ0eS5lbnVtLmpvaW4oJ1xcJywgXFwnJykgKyAnXFwnXTwvc3Bhbj4nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJzxkaXYnICsgKHByb3BlcnR5LnJlYWRPbmx5ID8gJyBjbGFzcz1cInJlYWRPbmx5XCInIDogJycpICsgJz4nICsgcHJpbWl0aXZlVG9PcHRpb25zSFRNTChjUHJvcGVydHksIGh0bWwpO1xuICAgICAgICAgIH0pLmpvaW4oJyw8L2Rpdj4nKTtcblxuICAgICAgICAgIGlmIChjb250ZW50cykge1xuICAgICAgICAgICAgaHRtbCArPSBjb250ZW50cyArICc8L2Rpdj4nO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaHRtbCArPSAnPGRpd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iAgICAgICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi5mbG93ID0gJ2ltcGxpY2l0JztcbiAgICAgICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi5hdXRob3JpemF0aW9uVXJsID0gaW1wbGljaXQubG9naW5FbmRwb2ludDtcbiAgICAgICAgICAgIGlzVmFsaWQgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvKiBqc2hpbnQgaWdub3JlOnN0YXJ0ICovXG4gICAgICAgICAgaWYoZGVmaW5pdGlvbi5ncmFudFR5cGVzWydhdXRob3JpemF0aW9uX2NvZGUnXSkge1xuICAgICAgICAgICAgaWYoIXNlY3VyaXR5RGVmaW5pdGlvbi5mbG93KSB7XG4gICAgICAgICAgICAgIC8vIGNhbm5vdCBzZXQgaWYgZmxvdyBpcyBhbHJlYWR5IGRlZmluZWRcbiAgICAgICAgICAgICAgdmFyIGF1dGhDb2RlID0gZGVmaW5pdGlvbi5ncmFudFR5cGVzWydhdXRob3JpemF0aW9uX2NvZGUnXTtcbiAgICAgICAgICAgICAgc2VjdXJpdHlEZWZpbml0aW9uLmZsb3cgPSAnYWNjZXNzQ29kZSc7XG4gICAgICAgICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi5hdXRob3JpemF0aW9uVXJsID0gYXV0aENvZGUudG9rZW5SZXF1ZXN0RW5kcG9pbnQudXJsO1xuICAgICAgICAgICAgICBzZWN1cml0eURlZmluaXRpb24udG9rZW5VcmwgPSBhdXRoQ29kZS50b2tlbkVuZHBvaW50LnVybDtcbiAgICAgICAgICAgICAgaXNWYWxpZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIC8qIGpzaGludCBpZ25vcmU6ZW5kICovXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmKGlzVmFsaWQpIHtcbiAgICAgICAgc3dhZ2dlci5zZWN1cml0eURlZmluaXRpb25zID0gc3dhZ2dlci5zZWN1cml0eURlZm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ykge1xuICAgICAgICAgICAgYm9keVBhcmFtLmFwcGVuZChrZXksIHZhbHVlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZWxzZSBpZiAodmFsdWUudHlwZSA9PT0gJ2ZpbGUnICYmIHZhbHVlLnZhbHVlKSB7XG4gICAgICAgICAgICBib2R5UGFyYW0uYXBwZW5kKGtleSwgdmFsdWUudmFsdWUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgaWYocGFyYW0uY29sbGVjdGlvbkZvcm1hdCA9PT0gJ211bHRpJykge1xuICAgICAgICAgICAgICAgIGJvZHlQYXJhbS5kZWxldGUoa2V5KTtcbiAgICAgICAgICAgICAgICBmb3IodmFyIHYgaW4gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgIGJvZHlQYXJhbS5hcHBlbmQoa2V5LCB2YWx1ZVt2XSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJvZHlQYXJhbS5hcHBlbmQoa2V5LCB0aGlzLmVuY29kZVF1ZXJ5Q29sbGVjdGlvbihwYXJhbS5jb2xsZWN0aW9uRm9ybWF0LCBrZXksIHZhbHVlKS5zcGxpdCgnPScpLnNsaWNlKDEpLmpvaW4oJz0nKSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBib2R5UGFyYW0uYXBwZW5kKGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgYm9keSA9IGJvZHlQYXJhbTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICBib2R5UGFyYW0gPSB7fTtcbiAgICAgIGZvciAoa2V5IGluIGZvcm1QYXJhbXMpIHtcbiAgICAgICAgdmFsdWUgPSBhcmdzW2tleV07XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgIHZhciBkZWxpbWV0ZXI7XG4gICAgICAgICAgdmFyIGZvcm1hdCA9IHBhcmFtLmNvbGxlY3Rpb25Gb3JtYXQgfHwgJ211bHRpJztcbiAgICAgICAgICBpZihmb3JtYXQgPT09ICdzc3YnKSB7XG4gICAgICAgICAgICBkZWxpbWV0ZXIgPSAnICc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYoZm9ybWF0ID09PSAncGlwZXMnKSB7XG4gICAgICAgICAgICBkZWxpbWV0ZXIgPSAnfCc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYoZm9ybWF0ID09PSAndHN2Jykge1xuICAgICAgICAgICAgZGVsaW1ldGVyID0gJ1xcdCc7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2UgaWYoZm9ybWF0ID09PSAnbXVsdGknKSB7XG4gICAgICAgICAgICBib2R5UGFyYW1ba2V5XSA9IHZhbHVlO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZGVsaW1ldGVyID0gJywnO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgZGF0YTtcbiAgICAgICAgICB2YWx1ZS5mb3JFYWNoKGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICAgIGlmKGRhdGEpIHtcbiAgICAgICAgICAgICAgZGF0YSArPSBkZWxpbWV0ZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgZGF0YSA9ICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGF0YSArPSB2O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIGJvZHlQYXJhbVtrZXldID0gZGF0YTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiA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gICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgcGFyYW1WYWx1ZTtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBGb3JtRGF0YSA9PT0gJ2Z1bmN0aW9uJyAmJiBvYmouYm9keSBpbnN0YW5jZW9mIEZvcm1EYXRhKSB7XG4gICAgICAgICAgICAgIHBhcmFtVmFsdWUgPSBvYmouYm9keS5nZXRBbGwocGFyYW1ldGVyLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIHBhcmFtVmFsdWUgPSBvYmouYm9keVtwYXJhbWV0ZXIubmFtZV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocGFyYW1WYWx1ZSkge1xuICAgICAgICAgICAgICBpZiAocGFyYW1ldGVyLnR5cGUgPT09ICdmaWxlJykge1xuICAgICAgICAgICAgICAgIGlmKHBhcmFtVmFsdWUubmFtZSkge1xuICAgICAgICAgICAgICAgICAgYm9keSArPSAnLUYgJyArIHBhcmFtZXRlci5uYW1lICsgJz1AXCInICsgcGFyYW1WYWx1ZS5uYW1lICsgJ1wiICc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHBhcmFtVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICBpZihwYXJhbWV0ZXIuY29sbGVjdGlvbkZvcm1hdCA9PT0gJ211bHRpJykge1xuICAgICAgICAgICAgICAgICAgICBmb3IodmFyIHYgaW4gcGFyYW1WYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgIGJvZHkgKz0gJy1GICcgKyB0aGlzLmVuY29kZVF1ZXJ5S2V5KHBhcmFtZXRlci5uYW1lKSArICc9JyArIG1hc2socGFyYW1WYWx1ZVt2XSwgcGFyYW1ldGVyLmZvcm1hdCkgKyAnICc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBib2R5ICs9ICctRiAnICsgdGhpcy5lbmNvZGVRdWVyeUNvbGxlY3Rpb24ocGFyYW1ldGVyLmNvbGxlY3Rpb25Gb3JtYXQsIHBhcmFtZXRlci5uYW1lLCBtYXNrKHBhcmFtVmFsdWUsIHBhcmFtZXRlci5mb3JtYXQpKSArICcgJztcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgYm9keSArPSAnLUYgJyArIHRoaXMuZW5jb2RlUXVlcnlLZXkocGFyYW1ldGVyLm5hbWUpICsgJz0nICsgbWFzayhwYXJhbVZhbHVlLCBwYXJhbWV0ZXIuZm9ybWF0KSArICcgJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmKCFib2R5KSB7XG4gICAgICAgIGJvZHkgPSBKU09OLnN0cmluZ2lmeShvYmouYm9keSk7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGJvZHkgPSBvYmouYm9keTtcbiAgICB9XG4gICAgLy8gZXNjYXBlIEAgPT4gJTQwLCAnID0+ICUyN1xuICAgIGJvZHkgPSBib2R5LnJlcGxhY2UoL1xcJy9nLCAnJTI3JykucmVwbGFjZSgvXFxuL2csICcgXFxcXCBcXG4gJyk7XG5cbiAgICBpZighaXNGb3JtRGF0YSkge1xuICAgICAgLy8gZXNjYXBlICYgPT4gJTI2XG4gICAgICBib2R5ID0gYm9keS5yZXBsYWNlKC8mL2csICclMjYnKTtcbiAgICB9XG4gICAgaWYoaXNNdWx0aXBhcnQpIHtcbiAgICAgIHJlc3VsdHMucHVzaChib2R5KTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICByZXN1bHRzLnB1c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W9uX2RhdGUgPSBJbmZpbml0eTtcbiAgICAgICAgICAgIHRoaXMucGF0aCA9IFN0cmluZyhyZXF1ZXN0X3BhdGggfHwgXCIvXCIpO1xuICAgICAgICAgICAgdGhpcy5leHBsaWNpdF9wYXRoID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLmRvbWFpbiA9IHJlcXVlc3RfZG9tYWluIHx8IG51bGw7XG4gICAgICAgICAgICB0aGlzLmV4cGxpY2l0X2RvbWFpbiA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5zZWN1cmUgPSBmYWxzZTsgLy9ob3cgdG8gZGVmaW5lIGRlZmF1bHQ/XG4gICAgICAgICAgICB0aGlzLm5vc2NyaXB0ID0gZmFsc2U7IC8vaHR0cG9ubHlcbiAgICAgICAgICAgIGlmIChjb29raWVzdHIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBhcnNlKGNvb2tpZXN0ciwgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IENvb2tpZShjb29raWVzdHIsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgIH1cbiAgICBleHBvcnRzLkNvb2tpZSA9IENvb2tpZTtcblxuICAgIENvb2tpZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICAgICAgdmFyIHN0ciA9IFt0aGlzLm5hbWUgKyBcIj1cIiArIHRoaXMudmFsdWVdO1xuICAgICAgICBpZiAodGhpcy5leHBpcmF0aW9uX2RhdGUgIT09IEluZmluaXR5KSB7XG4gICAgICAgICAgICBzdHIucHVzaChcImV4cGlyZXM9XCIgKyAobmV3IERhdGUodGhpcy5leHBpcmF0aW9uX2RhdGUpKS50b0dNVFN0cmluZygpKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5kb21haW4pIHtcbiAgICAgICAgICAgIHN0ci5wdXNoKFwiZG9tYWluPVwiICsgdGhpcy5kb21haW4pO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLnBhdGgpIHtcbiAgICAgICAgICAgIHN0ci5wdXNoKFwicGF0aD1cIiArIHRoaXMucGF0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuc2VjdXJlKSB7XG4gICAgICAgICAgICBzdHIucHVzaChcInNlY3VyZVwiKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5ub3NjcmlwdCkge1xuICAgICAgICAgICAgc3RyLnB1c2goXCJodHRwb25seVwiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RyLmpvaW4oXCI7IFwiKTtcbiAgICB9O1xuXG4gICAgQ29va2llLnByb3RvdHlwZS50b1ZhbHVlU3RyaW5nID0gZnVuY3Rpb24gdG9WYWx1ZVN0cmluZygpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMubmFtZSArIFwiPVwiICsgdGhpcy52YWx1ZTtcbiAgICB9O1xuXG4gICAgdmFyIGNvb2tpZV9zdHJfc3BsaXR0ZXIgPSAvWzpdKD89XFxzKlthLXpBLVowLTlfXFwtXStcXHMqWz1dKS9nO1xuICAgIENvb2tpZS5wcm90b3R5cGUucGFyc2UgPSBmdW5jdGlvbiBwYXJzZShzdHIsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpIHtcbiAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDb29raWUpIHtcbiAgICAgICAgICAgIHZhciBwYXJ0cyA9IHN0ci5zcGxpdChcIjtcIikuZmlsdGVyKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gISF2YWx1ZTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBwYWlyID0gcGFydHNbMF0ubWF0Y2goLyhbXj1dKyk9KFtcXHNcXFNdKikvKSxcbiAgICAgICAgICAgICAgICBrZXkgPSBwYWlyWzFdLFxuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFpclsyXSxcbiAgICAgICAgICAgICAgICBpO1xuICAgICAgICAgICAgdGhpcy5uYW1lID0ga2V5O1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHZhbHVlO1xuXG4gICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDwgcGFydHMubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICBwYWlyID0gcGFydHNbaV0ubWF0Y2goLyhbXj1dKykoPzo9KFtcXHNcXFNdKikpPy8pO1xuICAgICAgICAgICAgICAgIGtleSA9IHBhaXJbMV0udHJpbSgpLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYWlyWzJdO1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgICAgICAgICAgY2FzZSBcImh0dHBvbmx5XCI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9zY3JpcHQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFwiZXhwaXJlc1wiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmV4cGlyYXRpb25fZGF0ZSA9IHZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBOdW1iZXIoRGF0ZS5wYXJzZSh2YWx1ZSkpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcInBhdGhcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXRoID0gdmFsdWUgP1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlLnRyaW0oKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5leHBsaWNpdF9wYXRoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcImRvbWFpblwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRvbWFpbiA9IHZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS50cmltKCkgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwbGljaXRfZG9tYWluID0gISF0aGlzLmRvbWFpbjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcInNlY3VyZVwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlY3VyZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0aGlzLmV4cGxpY2l0X3BhdGgpIHtcbiAgICAgICAgICAgICAgIHRoaXMucGF0aCA9IHJlcXVlc3RfcGF0aCB8fCBcIi9cIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghdGhpcy5leHBsaWNpdF9kb21haW4pIHtcbiAgICAgICAgICAgICAgIHRoaXMuZG9tYWluID0gcmVxdWVzdF9kb21haW47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgQ29va2llKCkucGFyc2Uoc3RyLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKTtcbiAgICB9O1xuXG4gICAgQ29va2llLnByb3RvdHlwZS5tYXRjaGVzID0gZnVuY3Rpb24gbWF0Y2hlcyhhY2Nlc3NfaW5mbykge1xuICAgICAgICBpZiAodGhpcy5ub3NjcmlwdCAmJiBhY2Nlc3NfaW5mby5zY3JpcHQgfHxcbiAgICAgICAgICAgICAgICB0aGlzLnNlY3VyZSAmJiAhYWNjZXNzX2luZm8uc2VjdXJlIHx8XG4gICAgICAgICAgICAgICAgIXRoaXMuY29sbGlkZXNXaXRoKGFjY2Vzc19pbmZvKSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH07XG5cbiAgICBDb29raWUucHJvdG90eXBlLmNvbGxpZGVzV2l0aCA9IGZ1bmN0aW9uIGNvbGxpZGVzV2l0aChhY2Nlc3NfaW5mbykge1xuICAgICAgICBpZiAoKHRoaXMucGF0aCAmJiAhYWNjZXNzX2luZm8ucGF0aCkgfHwgKHRoaXMuZG9tYWluICYmICFhY2Nlc3NfaW5mby5kb21haW4pKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMucGF0aCAmJiBhY2Nlc3NfaW5mby5wYXRoLmluZGV4T2YodGhpcy5wYXRoKSAhPT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLmV4cGxpY2l0X3BhdGggJiYgYWNjZXNzX2luZm8ucGF0aC5pbmRleE9mKCB0aGlzLnBhdGggKSAhPT0gMCkge1xuICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGFjY2Vzc19kb21haW4gPSBhY2Nlc3NfaW5mby5kb21haW4gJiYgYWNjZXNzX2luZm8uZG9tYWluLnJlcGxhY2UoL15bXFwuXS8sJycpO1xuICAgICAgICB2YXIgY29va2llX2RvbWFpbiA9IHRoaXMuZG9tYWluICYmIHRoaXMuZG9tYWluLnJlcGxhY2UoL15bXFwuXS8sJycpO1xuICAgICAgICBpZiAoY29va2llX2RvbWFpbiA9PT0gYWNjZXNzX2RvbWFpbikge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvb2tpZV9kb21haW4pIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5leHBsaWNpdF9kb21haW4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7IC8vIHdlIGFscmVhZHkgY2hlY2tlZCBpZiB0aGUgZG9tYWlucyB3ZXJlIGV4YWN0bHkgdGhlIHNhbWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB3aWxkY2FyZCA9IGFjY2Vzc19kb21haW4uaW5kZXhPZihjb29raWVfZG9tYWluKTtcbiAgICAgICAgICAgIGlmICh3aWxkY2FyZCA9PT0gLTEgfHwgd2lsZGNhcmQgIT09IGFjY2Vzc19kb21haW4ubGVuZ3RoIC0gY29va2llX2RvbWFpbi5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gQ29va2llSmFyKCkge1xuICAgICAgICB2YXIgY29va2llcywgY29va2llc19saXN0LCBjb2xsaWRhYmxlX2Nvb2tpZTtcbiAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDb29raWVKYXIpIHtcbiAgICAgICAgICAgIGNvb2tpZXMgPSBPYmplY3QuY3JlYXRlKG51bGwpOyAvL25hbWU6IFtDb29raWVdXG5cbiAgICAgICAgICAgIHRoaXMuc2V0Q29va2llID0gZnVuY3Rpb24gc2V0Q29va2llKGNvb2tpZSwgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCkge1xuICAgICAgICAgICAgICAgIHZhciByZW1vdmUsIGk7XG4gICAgICAgICAgICAgICAgY29va2llID0gbmV3IENvb2tpZShjb29raWUsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgICAgICAgICAgICAgIC8vRGVsZXRlIHRoZSBjb29raWUgaWYgdGhlIHNldCBpcyBwYXN0IHRoZSBjdXJyZW50IHRpbWVcbiAgICAgICAgICAgICAgICByZW1vdmUgPSBjb29raWUuZXhwaXJhdGlvbl9kYXRlIDw9IERhdGUubm93KCk7XG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZXNbY29va2llLm5hbWVdICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29va2llc19saXN0ID0gY29va2llc1tjb29raWUubmFtZV07XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb29raWVzX2xpc3QubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxpZGFibGVfY29va2llID0gY29va2llc19saXN0W2ldO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbGxpZGFibGVfY29va2llLmNvbGxpZGVzV2l0aChjb29raWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWVzX2xpc3Quc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29va2llc19saXN0Lmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvb2tpZXNbY29va2llLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llc19saXN0W2ldID0gY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZXNfbGlzdC5wdXNoKGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChyZW1vdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb29raWVzW2Nvb2tpZS5uYW1lXSA9IFtjb29raWVdO1xuICAgICAgICAgICAgICAgIHJldHVybiBjb29raWVzW2Nvb2tpZS5uYW1lXTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvL3JldHVybnMgYSBjb29raWVcbiAgICAgICAgICAgIHRoaXMuZ2V0Q29va2llID0gZnVuY3Rpb24gZ2V0Q29va2llKGNvb2tpZV9uYW1lLCBhY2Nlc3NfaW5mbykge1xuICAgICAgICAgICAgICAgIHZhciBjb29raWUsIGk7XG4gICAgICAgICAgICAgICAgY29va2llc19saXN0ID0gY29va2llc1tjb29raWVfbmFtZV07XG4gICAgICAgICAgICAgICAgaWYgKCFjb29raWVzX2xpc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29va2llc19saXN0Lmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZSA9IGNvb2tpZXNfbGlzdFtpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZS5leHBpcmF0aW9uX2RhdGUgPD0gRGF0ZS5ub3coKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZXNfbGlzdC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgY29va2llc1tjb29raWUubmFtZV07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUubWF0Y2hlcyhhY2Nlc3NfaW5mbykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb29raWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgLy9yZXR1cm5zIGEgbGlzdCBvZiBjb29raWVzXG4gICAgICAgICAgICB0aGlzLmdldENvb2tpZXMgPSBmdW5jdGlvbiBnZXRDb29raWVzKGFjY2Vzc19pbmZvKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBbXSwgY29va2llX25hbWUsIGNvb2tpZTtcbiAgICAgICAgICAgICAgICBmb3IgKGNvb2tpZV9uYW1lIGluIGNvb2tpZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29va2llID0gdGhpcy5nZXRDb29raWUoY29va2llX25hbWUsIGFjY2Vzc19pbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcy5wdXNoKGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbWF0Y2hlcy50b1N0cmluZyA9IGZ1bmN0aW9uIHRvU3RyaW5nKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcy5qb2luKFwiOlwiKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG1hdGNoZXMudG9WYWx1ZVN0cmluZyA9IGZ1bmN0aW9uIHRvVmFsdWVTdHJpbmcoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaGVzLm1hcChmdW5jdGlvbiAoYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGMudG9WYWx1ZVN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCc7Jyk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcztcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXcgQ29va2llSmFyKCk7XG4gICAgfVxuICAgIGV4cG9ydHMuQ29va2llSmFyID0gQ29va2llSmFyO1xuXG4gICAgLy9yZXR1cm5zIGxpc3Qgb2YgY29va2llcyB0aGF0IHdlcmUgc2V0IGNvcnJlY3RseS4gQ29va2llcyB0aGF0IGFyZSBleHBpcmVkIGFuZCByZW1vdmVkIGFyZSBub3QgcmV0dXJuZWQuXG4gICAgQ29va2llSmFyLnByb3RvdHlwZS5zZXRDb29raWVzID0gZnVuY3Rpb24gc2V0Q29va2llcyhjb29raWVzLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKSB7XG4gICAgICAgIGNvb2tpZXMgPSBBcnJheS5pc0FycmF5KGNvb2tpZXMpID9cbiAgICAgICAgICAgICAgICBjb29raWVzIDpcbiAgICAgICAgICAgICAgICBjb29raWVzLnNwbGl0KGNvb2tpZV9zdHJfc3BsaXR0ZXIpO1xuICAgICAgICB2YXIgc3VjY2Vzc2Z1bCA9IFtdLFxuICAgICAgICAgICAgaSxcbiAgICAgICAgICAgIGNvb2tpZTtcbiAgICAgICAgY29va2llcyA9IGNvb2tpZXMubWFwKGZ1bmN0aW9uKGl0ZW0pe1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBDb29raWUoaXRlbSwgcmV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kZW50LCB3aXRoaW5GbG93Q29sbGVjdGlvbikge1xuICB2YXIgcHJlY2VkaW5nLFxuICAgICAgZm9sbG93aW5nLFxuICAgICAgY2FwdHVyZVN0YXJ0LFxuICAgICAgY2FwdHVyZUVuZCxcbiAgICAgIGhhc1BlbmRpbmdDb250ZW50LFxuICAgICAgX2xpbmUsXG4gICAgICBfbGluZVN0YXJ0LFxuICAgICAgX2xpbmVJbmRlbnQsXG4gICAgICBfa2luZCA9IHN0YXRlLmtpbmQsXG4gICAgICBfcmVzdWx0ID0gc3RhdGUucmVzdWx0LFxuICAgICAgY2g7XG5cbiAgY2ggPSBzdGF0ZS5pbnB1dC5jaGFyQ29kZUF0KHN0YXRlLnBvc2l0aW9uKTtcblxuICBpZiAoaXNfV1NfT1JfRU9MKGNoKSAgICAgIHx8XG4gICAgICBpc19GTE9XX0lORElDQVRPUihjaCkgfHxcbiAgICAgIGNoID09PSAweDIzLyogIyAqLyAgICB8fFxuICAgICAgY2ggPT09IDB4MjYvKiAmICovICAgIHx8XG4gICAgICBjaCA9PT0gMHgyQS8qICogKi8gICAgfHxcbiAgICAgIGNoID09PSAweDIxLyogISAqLyAgICB8fFxuICAgICAgY2ggPT09IDB4N0MvKiB8ICovICAgIHx8XG4gICAgICBjaCA9PT0gMHgzRS8qID4gKi8gICAgfHxcbiAgICAgIGNoID09PSAweDI3LyogJyAqLyAgICB8fFxuICAgICAgY2ggPT09IDB4MjIvKiBcIiAqLyAgICB8fFxuICAgICAgY2ggPT09IDB4MjUvKiAlICovICAgIHx8XG4gICAgICBjaCA9PT0gMHg0MC8qIEAgKi8gICAgfHxcbiAgICAgIGNoID09PSAweDYwLyogYCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChjaCA9PT0gMHgzRi8qID8gKi8gfHwgY2ggPT09IDB4MkQvKiAtICovKSB7XG4gICAgZm9sbG93aW5nID0gc3RhdGUuaW5wdXQuY2hhckNvZGVBdChzdGF0ZS5wb3NpdG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uXG5mdW5jdGlvbiByZXNvbHZlSmF2YXNjcmlwdEZ1bmN0aW9uKGRhdGEpIHtcbiAgaWYgKGRhdGEgPT09IG51bGwpIHJldHVybiBmYWxzZTtcblxuICB0cnkge1xuICAgIHZhciBzb3VyY2UgPSAnKCcgKyBkYXRhICsgJyknLFxuICAgICAgICBhc3QgICAgPSBlc3ByaW1hLnBhcnNlKHNvdXJjZSwgeyByYW5nZTogdHJ1ZSB9KTtcblxuICAgIGlmIChhc3QudHlwZSAgICAgICAgICAgICAgICAgICAgIT09ICdQcm9ncmFtJyAgICAgICAgICAgICB8fFxuICAgICAgICBhc3QuYm9keS5sZW5ndGggICAgICAgICAgICAgIT09IDEgICAgICAgICAgICAgICAgICAgICB8fFxuICAgICAgICBhc3QuYm9keVswXS50eXBlICAgICAgICAgICAgIT09ICdFeHByZXNzaW9uU3RhdGVtZW50JyB8fFxuICAgICAgICBhc3QuYm9keVswXS5leHByZXNzaW9uLnR5cGUgIT09ICdGdW5jdGlvbkV4cHJlc3Npb24nKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG4gIH0gY2F0Y2ggKGVycikge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxufVxuXG5mdW5jdGlvbiBjb25zdHJ1Y3RKYXZhc2NyaXB0RnVuY3Rpb24oZGF0YSkge1xuICAvKmpzbGludCBldmlsOnRydWUqL1xuXG4gIHZhciBzb3VyY2UgPSAnKCcgKyBkYXRhICsgJyknLFxuICAgICAgYXN0ICAgID0gZXNwcmltYS5wYXJzZShzb3VyY2UsIHsgcmFuZ2U6IHRydWUgfSksXG4gICAgICBwYXJhbXMgPSBbXSxcbiAgICAgIGJvZHk7XG5cbiAgaWYgKGFzdC50eXBlICAgICAgICAgICAgICAgICAgICAhPT0gJ1Byb2dyYW0nICAgICAgICAgICAgIHx8XG4gICAgICBhc3QuYm9keS5sZW5ndGggICAgICAgICAgICAgIT09IDEgICAgICAgICAg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XG59XG5cbm1vZHVsZS5leHBvcnRzID0gbmV3IFR5cGUoJ3RhZzp5YW1sLm9yZywyMDAyOnNldCcsIHtcbiAga2luZDogJ21hcHBpbmcnLFxuICByZXNvbHZlOiByZXNvbHZlWWFtbFNldCxcbiAgY29uc3RydWN0OiBjb25zdHJ1Y3RZYW1sU2V0XG59KTtcbiIsIid1c2Ugc3RyaWN0JztcblxudmFyIFR5cGUgPSByZXF1aXJlKCcuLi90eXBlJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gbmV3IFR5cGUoJ3RhZzp5YW1sLm9yZywyMDAyOnN0cicsIHtcbiAga2luZDogJ3NjYWxhcicsXG4gIGNvbnN0cnVjdDogZnVuY3Rpb24gKGRhdGEpIHsgcmV0dXJuIGRhdGEgIT09IG51bGwgPyBkYXRhIDogJyc7IH1cbn0pO1xuIiwiJ3VzZSBzdHJpY3QnO1xuXG52YXIgVHlwZSA9IHJlcXVpcmUoJy4uL3R5cGUnKTtcblxudmFyIFlBTUxfREFURV9SRUdFWFAgPSBuZXcgUmVnRXhwKFxuICAnXihbMC05XVswLTldWzAtOV1bMC05XSknICAgICAgICAgICsgLy8gWzFdIHllYXJcbiAgJy0oWzAtOV1bMC05XSknICAgICAgICAgICAgICAgICAgICArIC8vIFsyXSBtb250aFxuICAnLShbMC05XVswLTldKSQnKTsgICAgICAgICAgICAgICAgICAgLy8gWzNdIGRheVxuXG52YXIgWUFNTF9USU1FU1RBTVBfUkVHRVhQID0gbmV3IFJlZ0V4cChcbiAgJ14oWzAtOV1bMC05XVswLTldWzAtOV0pJyAgICAgICAgICArIC8vIFsxXSB5ZWFyXG4gICctKFswLTldWzAtOV0/KScgICAgICAgICAgICAgICAgICAgKyAvLyBbMl0gbW9udGhcbiAgJy0oWzAtOV1bMC05XT8pJyAgICAgICAgICAgICAgICAgICArIC8vIFszXSBkYXlcbiAgJyg/OltUdF18WyBcXFxcdF0rKScgICAgICAgICAgICAgICAgICsgLy8gLi4uXG4gICcoWzAtOV1b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4gICAgfVxuICAgIC8vIHJ1bnMgYSBzaW5nbGUgZnVuY3Rpb24gaW4gdGhlIGFzeW5jIHF1ZXVlXG4gICAgZnVuY3Rpb24gcnVuU2luZ2xlKHRhc2ssIGRvbWFpbikge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGFzaygpO1xuXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgIGlmIChpc05vZGVKUykge1xuICAgICAgICAgICAgICAgIC8vIEluIG5vZGUsIHVuY2F1Z2h0IGV4Y2VwdGlvbnMgYXJlIGNvbnNpZGVyZWQgZmF0YWwgZXJyb3JzLlxuICAgICAgICAgICAgICAgIC8vIFJlLXRocm93IHRoZW0gc3luY2hyb25vdXNseSB0byBpbnRlcnJ1cHQgZmx1c2hpbmchXG5cbiAgICAgICAgICAgICAgICAvLyBFbnN1cmUgY29udGludWF0aW9uIGlmIHRoZSB1bmNhdWdodCBleGNlcHRpb24gaXMgc3VwcHJlc3NlZFxuICAgICAgICAgICAgICAgIC8vIGxpc3RlbmluZyBcInVuY2F1Z2h0RXhjZXB0aW9uXCIgZXZlbnRzIChhcyBkb21haW5zIGRvZXMpLlxuICAgICAgICAgICAgICAgIC8vIENvbnRpbnVlIGluIG5leHQgZXZlbnQgdG8gYXZvaWQgdGljayByZWN1cnNpb24uXG4gICAgICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZsdXNoLCAwKTtcbiAgICAgICAgICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRocm93IGU7XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gSW4gYnJvd3NlcnMsIHVuY2F1Z2h0IGV4Y2VwdGlvbnMgYXJlIG5vdCBmYXRhbC5cbiAgICAgICAgICAgICAgICAvLyBSZS10aHJvdyB0aGVtIGFzeW5jaHJvbm91c2x5IHRvIGF2b2lkIHNsb3ctZG93bnMuXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgICAgICAgICAgfSwgMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZG9tYWluKSB7XG4gICAgICAgICAgICBkb21haW4uZXhpdCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgbmV4dFRpY2sgPSBmdW5jdGlvbiAodGFzaykge1xuICAgICAgICB0YWlsID0gdGFpbC5uZXh0ID0ge1xuICAgICAgICAgICAgdGFzazogdGFzayxcbiAgICAgICAgICAgIGRvbWFpbjogaXNOb2RlSlMgJiYgcHJvY2Vzcy5kb21haW4sXG4gICAgICAgICAgICBuZXh0OiBudWxsXG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKCFmbHVzaGluZykge1xuICAgICAgICAgICAgZmx1c2hpbmcgPSB0cnVlO1xuICAgICAgICAgICAgcmVxdWVzdFRpY2soKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBpZiAodHlwZW9mIHByb2Nlc3MgPT09IFwib2JqZWN0XCIgJiZcbiAgICAgICAgcHJvY2Vzcy50b1N0cmluZygpID09PSBcIltvYmplY3QgcHJvY2Vzc11cIiAmJiBwcm9jZXNzLm5leHRUaWNrKSB7XG4gICAgICAgIC8vIEVuc3VyZSBRIGlzIGluIGEgcmVhbCBOb2RlIGVudmlyb25tZW50LCB3aXRoIGEgYHByb2Nlc3MubmV4dFRpY2tgLlxuICAgICAgICAvLyBUbyBzZWUgdGhyb3VnaCBmYWtlIE5vZGUgZW52aXJvbm1lbnRzOlxuICAgICAgICAvLyAqIE1vY2hhIHRlc3QgcnVubmVyIC0g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VuZ3RoID0gdGhpcy5sZW5ndGg7XG4gICAgICAgIC8vIGNvbmNlcm5pbmcgdGhlIGluaXRpYWwgdmFsdWUsIGlmIG9uZSBpcyBub3QgcHJvdmlkZWRcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgIC8vIHNlZWsgdG8gdGhlIGZpcnN0IHZhbHVlIGluIHRoZSBhcnJheSwgYWNjb3VudGluZ1xuICAgICAgICAgICAgLy8gZm9yIHRoZSBwb3NzaWJpbGl0eSB0aGF0IGlzIGlzIGEgc3BhcnNlIGFycmF5XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgaWYgKGluZGV4IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICAgICAgYmFzaXMgPSB0aGlzW2luZGV4KytdO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCsraW5kZXggPj0gbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlICgxKTtcbiAgICAgICAgfVxuICAgICAgICAvLyByZWR1Y2VcbiAgICAgICAgZm9yICg7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAvLyBhY2NvdW50IGZvciB0aGUgcG9zc2liaWxpdHkgdGhhdCB0aGUgYXJyYXkgaXMgc3BhcnNlXG4gICAgICAgICAgICBpZiAoaW5kZXggaW4gdGhpcykge1xuICAgICAgICAgICAgICAgIGJhc2lzID0gY2FsbGJhY2soYmFzaXMsIHRoaXNbaW5kZXhdLCBpbmRleCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGJhc2lzO1xuICAgIH1cbik7XG5cbnZhciBhcnJheV9pbmRleE9mID0gdW5jdXJyeVR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uIChyZXNvbHZlLCBvcCwgYXJncykge1xuICAgICAgICB2YXIgcmVzdWx0O1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKGRlc2NyaXB0b3Jbb3BdKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZGVzY3JpcHRvcltvcF0uYXBwbHkocHJvbWlzZSwgYXJncyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGZhbGxiYWNrLmNhbGwocHJvbWlzZSwgb3AsIGFyZ3MpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IHJlamVjdChleGNlcHRpb24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXNvbHZlKSB7XG4gICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgcHJvbWlzZS5pbnNwZWN0ID0gaW5zcGVjdDtcblxuICAgIC8vIFhYWCBkZXByZWNhdGVkIGB2YWx1ZU9mYCBhbmQgYGV4Y2VwdGlvbmAgc3VwcG9ydFxuICAgIGlmIChpbnNwZWN0KSB7XG4gICAgICAgIHZhciBpbnNwZWN0ZWQgPSBpbnNwZWN0KCk7XG4gICAgICAgIGlmIChpbnNwZWN0ZWQuc3RhdGUgPT09IFwicmVqZWN0ZWRcIikge1xuICAgICAgICAgICAgcHJvbWlzZS5leGNlcHRpb24gPSBpbnNwZWN0ZWQucmVhc29uO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJvbWlzZS52YWx1ZU9mID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGluc3BlY3RlZCA9IGluc3BlY3QoKTtcbiAgICAgICAgICAgIGlmIChpbnNwZWN0ZWQuc3RhdGUgPT09IFwicGVuZGluZ1wiIHx8XG4gICAgICAgICAgICAgICAgaW5zcGVjdGVkLnN0YXRlID09PSBcInJlam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3ZSdkIGFsc29cbiAgICAgICAgICAgIC8vIGxpa2UgdG8gbWFrZSBpdCBwb3NzaWJsZSB0byB1c2UgZ2VuZXJhdG9ycyBpbiBkZXBsb3llZCBicm93c2Vycywgc29cbiAgICAgICAgICAgIC8vIHdlIGFsc28gc3VwcG9ydCBQeXRob24tc3R5bGUgZ2VuZXJhdG9ycy4gIEF0IHNvbWUgcG9pbnQgd2UgY2FuIHJlbW92ZVxuICAgICAgICAgICAgLy8gdGhpcyBibG9jay5cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBTdG9wSXRlcmF0aW9uID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICAgICAgLy8gRVM2IEdlbmVyYXRvcnNcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBnZW5lcmF0b3JbdmVyYl0oYXJnKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChleGNlcHRpb24pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LmRvbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFEocmVzdWx0LnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gd2hlbihyZXN1bHQudmFsdWUsIGNhbGxiYWNrLCBlcnJiYWNrKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFNwaWRlck1vbmtleSBHZW5lcmF0b3JzXG4gICAgICAgICAgICAgICAgLy8gRklYTUU6IFJlbW92ZSB0aGlzIGNhc2Ugd2hlbiBTTSBkb2VzIEVTNiBnZW5lcmF0b3JzLlxuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGdlbmVyYXRvclt2ZXJiXShhcmcpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdG9wSXRlcmF0aW9uKGV4Y2VwdGlvbikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBRKGV4Y2VwdGlvbi52YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KGV4Y2VwdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4ocmVzdWx0LCBjYWxsYmFjaywgZXJyYmFjayk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGdlbmVyYXRvciA9IG1ha2VHZW5lcmF0b3IuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgICAgdmFyIGNhbGxiYWNrID0gY29udGludWVyLmJpbmQoY29udGludWVyLCBcIm5leHRcIik7XG4gICAgICAgIHZhciBlcnJiYWNrID0gY29udGludWVyLmJpbmQoY29udGludWVyLCBcInRocm93XCIpO1xuICAgICAgICByZXR1cm4gY2FsbGJhY2soKTtcbiAgICB9O1xufVxuXG4vKipcbiAqIFRoZSBzcGF3biBmdW5jdGlvbiBpcyBhIHNtYWxsIHdyYXBwZXIgYXJvdW5kIGFzeW5jIHRoYXQgaW1tZWRpYXRlbHlcbiAqIGNhbGxzIHRoZSBnZW5lcmF0b3IgYW5kIGFsc28gZW5kcyB0aGUgcHJvbWlzZSBjaGFpbiwgc28gdGhhdCBhbnlcbiAqIHVuaGFuZGxlZCBlcnJvcnMgYXJlIHRocm93biBpbnN0ZWFkIG9mIGZvcndhcmRlZCB0byB0aGUgZXJyb3JcbiAqIGhhbmRsZXIuIFRoaXMgaXMgdXNlZnVsIGJlY2F1c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kZWZlcnJlZCA9IGRlZmVyKCk7XG4gICAgICAgIGFycmF5X3JlZHVjZShwcm9taXNlcywgZnVuY3Rpb24gKHVuZGVmaW5lZCwgcHJvbWlzZSwgaW5kZXgpIHtcbiAgICAgICAgICAgIHZhciBzbmFwc2hvdDtcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBpc1Byb21pc2UocHJvbWlzZSkgJiZcbiAgICAgICAgICAgICAgICAoc25hcHNob3QgPSBwcm9taXNlLmluc3BlY3QoKSkuc3RhdGUgPT09IFwiZnVsZmlsbGVkXCJcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIHByb21pc2VzW2luZGV4XSA9IHNuYXBzaG90LnZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICArK3BlbmRpbmdDb3VudDtcbiAgICAgICAgICAgICAgICB3aGVuKFxuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2VzW2luZGV4XSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC0tcGVuZGluZ0NvdW50ID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShwcm9taXNlcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdCxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHByb2dyZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5ub3RpZnkoeyBpbmRleDogaW5kZXgsIHZhbHVlOiBwcm9ncmVzcyB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG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IHZhciBwcm9taXNlID0gcHJvbWlzZXNbaW5kZXhdO1xuXG4gICAgICAgIHBlbmRpbmdDb3VudCsrO1xuXG4gICAgICAgIHdoZW4ocHJvbWlzZSwgb25GdWxmaWxsZWQsIG9uUmVqZWN0ZWQsIG9uUHJvZ3Jlc3MpO1xuICAgICAgICBmdW5jdGlvbiBvbkZ1bGZpbGxlZChyZXN1bHQpIHtcbiAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocmVzdWx0KTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBvblJlamVjdGVkKCkge1xuICAgICAgICAgICAgcGVuZGluZ0NvdW50LS07XG4gICAgICAgICAgICBpZiAocGVuZGluZ0NvdW50ID09PSAwKSB7XG4gICAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgXCJDYW4ndCBnZXQgZnVsZmlsbG1lbnQgdmFsdWUgZnJvbSBhbnkgcHJvbWlzZSwgYWxsIFwiICtcbiAgICAgICAgICAgICAgICAgICAgXCJwcm9taXNlcyB3ZXJlIHJlamVjdGVkLlwiXG4gICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gb25Qcm9ncmVzcyhwcm9ncmVzcykge1xuICAgICAgICAgICAgZGVmZXJyZWQubm90aWZ5KHtcbiAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHByb2dyZXNzXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH0sIHVuZGVmaW5lZCk7XG5cbiAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbn1cblxuUHJvbWlzZS5wcm90b3R5cGUuYW55ID0gZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiBhbnkodGhpcyk7XG59O1xuXG4vKipcbiAqIFdhaXRzIGZvciBhbGwgcHJvbWlzZXM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c3QucG9zdCgnL3VzZXInKVxuICogICAgICAgICAudHlwZSgnanNvbicpXG4gKiAgICAgICAgIC5zZW5kKCd7XCJuYW1lXCI6XCJ0alwifScpXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gYXV0byBqc29uXG4gKiAgICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAgLnNlbmQoeyBuYW1lOiAndGonIH0pXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gbWFudWFsIHgtd3d3LWZvcm0tdXJsZW5jb2RlZFxuICogICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgIC50eXBlKCdmb3JtJylcbiAqICAgICAgICAgLnNlbmQoJ25hbWU9dGonKVxuICogICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqICAgICAgIC8vIGF1dG8geC13d3ctZm9ybS11cmxlbmNvZGVkXG4gKiAgICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAgLnR5cGUoJ2Zvcm0nKVxuICogICAgICAgICAuc2VuZCh7IG5hbWU6ICd0aicgfSlcbiAqICAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiAgICAgICAvLyBkZWZhdWx0cyB0byB4LXd3dy1mb3JtLXVybGVuY29kZWRcbiAqICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgLnNlbmQoJ25hbWU9dG9iaScpXG4gKiAgICAgICAgLnNlbmQoJ3NwZWNpZXM9ZmVycmV0JylcbiAqICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqIEBwYXJhbSB7U3RyaW5nfE9iamVjdH0gZGF0YVxuICogQHJldHVybiB7UmVxdWVzdH0gZm9yIGNoYWluaW5nXG4gKiBAYXBpIHB1YmxpY1xuICovXG5cbmV4cG9ydHMuc2VuZCA9IGZ1bmN0aW9uKGRh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G4gICAgICAgICAgICB2YXIgc2luZ2xlU2VjdXJpdHkgPSB7fTtcbiAgICAgICAgICAgIHZhciBzaW5nbGVPYXV0aDJTZWN1cml0eSA9IHt9O1xuXG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gaXRlbSkge1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGl0ZW1ba2V5XSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhdXRoc1trZXldKSB7IGNvbnRpbnVlOyB9XG4gICAgICAgICAgICAgICAgICAgIGF1dGhzW2tleV0gPSBhdXRoc1trZXldIHx8IHt9O1xuICAgICAgICAgICAgICAgICAgICBpZiAoYXV0aHNba2V5XS50eXBlID09PSAnb2F1dGgyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XSA9IE9iamVjdC5hc3NpZ24oe30sIGF1dGhzW2tleV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XS5zY29wZXMgPSBPYmplY3QuYXNzaWduKHt9LCBhdXRoc1trZXldLnNjb3Blcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpIGluIHNpbmdsZU9hdXRoMlNlY3VyaXR5W2tleV0uc2NvcGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW1ba2V5XS5pbmRleE9mKGkpIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XS5zY29wZXNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XS5zY29wZXMgPSB1dGlscy5wYXJzZU9hdXRoMlNjb3BlcyhzaW5nbGVPYXV0aDJTZWN1cml0eVtrZXldLnNjb3Blcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZXMgPSBfLm1lcmdlKHNjb3Blcywgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XS5zY29wZXMpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlU2VjdXJpdHlba2V5XSA9IE9iamVjdC5hc3NpZ24oe30sIGF1dGhzW2tleV0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW1ba2V5XS50eXBlID09PSAnb2F1dGgyJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2luZ2xlT2F1dGgyU2VjdXJpdHlba2V5XSA9IE9iamVjdC5hc3NpZ24oe30sIGl0ZW1ba2V5XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaW5nbGVPYXV0aDJTZWN1cml0eVtrZXldLnNjb3BlcyA9IHV0aWxzLnBhcnNlT2F1dGgyU2NvcGVzKHNpbmdsZU9hdXRoMlNlY3VyaXR5W2tleV0uc2NvcGVzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlcyA9IF8ubWVyZ2Uoc2NvcGVzLCBzaW5nbGVPYXV0aDJTZWN1cml0eVtrZXldLnNjb3Blcyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaW5nbGVTZWN1cml0eVtrZXldID0gaXRlbVtrZXldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIV8uaXNFbXB0eShzaW5nbGVTZWN1cml0eSkpIHtcbiAgICAgICAgICAgICAgICBhdXRoc0Fyci5wdXNoKHNpbmdsZVNlY3VyaXR5KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFfLmlzRW1wdHkoc2luZ2xlT2F1dGgyU2VjdXJpdHkpKXtcbiAgICAgICAgICAgICAgICBvYXV0aDJBcnIucHVzaChzaW5nbGVPYXV0aDJTZWN1cml0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBhdXRocyA6IGF1dGhzQXJyLFxuICAgICAgICAgICAgb2F1dGgyOiBvYXV0aDJBcnIsXG4gICAgICAgICAgICBzY29wZXM6IHNjb3Blc1xuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICBwYXJzZU9hdXRoMlNjb3BlczogZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgdmFyIHNjb3BlcyA9IE9iamVjdC5hc3NpZ24oe30sIGRhdGEpO1xuICAgICAgICB2YXIgcmVzdWx0ID0gW107XG4gICAgICAgIHZhciBrZXk7XG5cbiAgICAgICAgZm9yIChrZXkgaW4gc2NvcGVzKSB7XG4gICAgICAgICAgICByZXN1bHQucHVzaCh7c2NvcGU6IGtleSwgZGVzY3JpcHRpb246IHNjb3Blc1trZXldfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH0sXG5cbiAgICBzYW5pdGl6ZTogZnVuY3Rpb24oaHRtbCkge1xuICAgICAgICAvLyBTdHJpcCB0aGUgc2NyaXB0IHRhZ3MgZnJvbSB0aGUgaHRtbCBhbmQgaW5saW5lIGV2ZW5oYW5kbGVyc1xuICAgICAgICBodG1sID0gaHRtbC5yZXBsYWNlKC88c2NyaXB0XFxiW148XSooPzooPyE8XFwvc2NyaXB0Pik8W148XSopKjxcXC9zY3JpcHQ+L2dpLCAnJyk7XG4gICAgICAgIGh0bWwgPSBodG1sLnJlcGxhY2UoLyhvblxcdys9XCJbXlwiXSpcIikqKG9uXFx3Kz0nW14nXSonKSoob25cXHcrPVxcdypcXChcXHcqXFwpKSovZ2ksICcn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G4gICAgICAgICAgICBpZiAoIW1vZGVsLnZhbGlkYXRlKCkpIHtcbiAgICAgICAgICAgICAgICB2YWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdmFsaWQ7XG4gICAgfSxcblxuICAgIGlzQXV0aG9yaXplZDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5sZW5ndGggPT09IHRoaXMud2hlcmUoeyBpc0xvZ291dDogdHJ1ZSB9KS5sZW5ndGg7XG4gICAgfSxcblxuICAgIGlzUGFydGlhbGx5QXV0aG9yaXplZDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy53aGVyZSh7IGlzTG9nb3V0OiB0cnVlIH0pLmxlbmd0aCA+IDA7XG4gICAgfSxcblxuICAgIHBhcnNlOiBmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICB2YXIgYXV0aHogPSB7fTtcblxuICAgICAgICBpZih0eXBlb2Ygd2luZG93LnN3YWdnZXJVaSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGF1dGh6ID0gT2JqZWN0LmFzc2lnbih7fSwgd2luZG93LnN3YWdnZXJVaS5hcGkuY2xpZW50QXV0aG9yaXphdGlvbnMuYXV0aHopO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIF8ubWFwKGRhdGEsIGZ1bmN0aW9uIChhdXRoLCBuYW1lKSB7XG4gICAgICAgICAgICB2YXIgaXNCYXNpYyA9IGF1dGh6W25hbWVdICYmIGF1dGgudHlwZSA9PT0gJ2Jhc2ljJyAmJiBhdXRoeltuYW1lXS51c2VybmFtZSAmJiBhdXRoeltuYW1lXS5wYXNzd29yZDtcblxuICAgICAgICAgICAgXy5leHRlbmQoYXV0aCwge1xuICAgICAgICAgICAgICAgIHRpdGxlOiBuYW1lXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKGF1dGh6W25hbWVdI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fdG9rZW4nO1xuICAgICAgICAgICAgdGhpcy5jbGllbnRDcmVkZW50aWFsc0Zsb3coc2NvcGVzLCBkZXRzLCBjb250YWluZXIuT0F1dGhTY2hlbWVLZXkpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYoYXV0aC5nZXQoJ3R5cGUnKSA9PT0gJ29hdXRoMicgJiYgZmxvdyAmJiAoZmxvdyA9PT0gJ3Bhc3N3b3JkJykpIHtcbiAgICAgICAgICAgIGRldHMgPSBhdXRoLmF0dHJpYnV0ZXM7XG4gICAgICAgICAgICBjb250YWluZXIudG9rZW5OYW1lID0gZ2V0VG9rZW5OYW1lKGRldHMpIHx8ICdhY2Nlc3NfdG9rZW4nO1xuICAgICAgICAgICAgdGhpcy5wYXNzd29yZEZsb3coc2NvcGVzLCBkZXRzLCBjb250YWluZXIuT0F1dGhTY2hlbWVLZXkpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYoYXV0aC5nZXQoJ2dyYW50VHlwZXMnKSkge1xuICAgICAgICAgICAgLy8gMS4yIHN1cHBvcnRcbiAgICAgICAgICAgIHZhciBvID0gYXV0aC5nZXQoJ2dyYW50VHlwZXMnKTtcbiAgICAgICAgICAgIGZvcih2YXIgdCBpbiBvKSB7XG4gICAgICAgICAgICAgICAgaWYoby5oYXNPd25Qcm9wZXJ0eSh0KSAmJiB0ID09PSAnaW1wbGljaXQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRldHMgPSBvW3RdO1xuICAgICAgICAgICAgICAgICAgICBlcCA9IGRldHMubG9naW5FbmRwb2ludC51cmw7XG4gICAgICAgICAgICAgICAgICAgIHVybCA9IGRldHMubG9naW5FbmRwb2ludC51cmwgKyAnP3Jlc3BvbnNlX3R5cGU9dG9rZW4nO1xuICAgICAgICAgICAgICAgICAgICBjb250YWluZXIudG9rZW5OYW1lID0gZ2V0VG9rZW5OYW1lKGRldHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChvLmhhc093blByb3BlcnR5KHQpICYmIHQgPT09ICdhY2Nlc3NDb2RlJykge1xuICAgICAgICAgICAgICAgICAgICBkZXRzID0gb1t0XTtcbiAgICAgICAgICAgICAgICAgICAgZXAgPSBkZXRzLnRva2VuUmVxdWVzdEVuZHBvaW50LnVybDtcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gZGV0cy50b2tlblJlcXVlc3RFbmRwb2ludC51cmwgKyAnP3Jlc3BvbnNlX3R5cGU9Y29kZSc7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lci50b2tlbk5hbWUgPSBnZXRUb2tlbk5hbWUoZGV0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmVkaXJlY3RfdXJpID0gcmVkaXJlY3RVcmw7XG5cbiAgICAgICAgdXJsICs9ICcmcmVkaXJlY3RfdXJpPScgKyBlbmNvZGVVUklDb21wb25lbnQocmVkaXJlY3RVcmwpO1xuICAgICAgICB1cmwgKz0gJyZyZWFsbT0nICsgZW5jb2RlVVJJQ29tcG9uZW50KHJlYWxtKTtcbiAgICAgICAgdXJsICs9ICcmY2xpZW50X2lkPScgKyBlbmNvZGVVUklDb21wb25lbnQoY2xpZW50SWQpO1xuICAgICAgICB1cmwgKz0gJyZzY29wZT0nICsgZW5jb2RlVVJJQ29tcG9uZW50KHNjb3Blcy5qb2luKHNjb3BlU2VwYXJhdG9yKSk7XG4gICAgICAgIHVybCArPSAnJnN0YXRlPScgKyBlbmNvZGVVUklDb21wb25lbnQoc3RhdGUpO1xuICAgICAgICBmb3IgKHZhciBrZXkgaW4gYWRkaXRpb25hbFF1ZXJ5U3RyaW5nUGFyYW1zKSB7XG4gICAgICAgICAgICB1cmwgKz0gJyYnICsga2V5ICsgJz0nICsgZW5jb2RlVVJJQ29tcG9uZW50KGFkZGl0aW9uYWxR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gIGNhc2UgJ2Jhc2ljJzpcbiAgICAgICAgICAgICAgICBoZWFkZXJzLkF1dGhvcml6YXRpb24gPSAnQmFzaWMgJyArIGJ0b2Eob2F1dGguY2xpZW50SWQgKyAnOicgKyBvYXV0aC5jbGllbnRTZWNyZXQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAncmVxdWVzdC1ib2R5JzpcbiAgICAgICAgICAgICAgICBwYXJhbXMuY2xpZW50X2lkID0gb2F1dGguY2xpZW50SWQ7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmNsaWVudF9zZWNyZXQgPSBvYXV0aC5jbGllbnRTZWNyZXQ7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgdXJsIDogb2F1dGgudG9rZW5VcmwsXG4gICAgICAgICAgICB0eXBlOiAnUE9TVCcsXG4gICAgICAgICAgICBkYXRhOiBwYXJhbXMsXG4gICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzLFxuICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKGRhdGEpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgb25PQXV0aENvbXBsZXRlKGRhdGEsIE9BdXRoU2NoZW1lS2V5KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlcnJvcjogZnVuY3Rpb24gKClcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBvbk9BdXRoQ29tcGxldGUoJycpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG59KTtcbiIsIid1c2Ugc3RyaWN0JztcblxuU3dhZ2dlclVpLk1vZGVscy5CYXNpY0F1dGhNb2RlbCA9IEJhY2tib25lLk1vZGVsLmV4dGVuZCh7XG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdXNlcm5hbWU6ICcnLFxuICAgICAgICBwYXNzd29yZDogJycsXG4gICAgIC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GVzID0gXy5jbG9uZURlZXAodGhpcy5hdHRyaWJ1dGVzKTtcbiAgICAgICAgICAgIHZhciBpLCBzY29wZXMgPSBbXTtcbiAgICAgICAgICAgIGZvcihpIGluIGF0dHJpYnV0ZXMuc2NvcGVzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNjb3BlID0gYXR0cmlidXRlcy5zY29wZXNbaV07XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHNjb3BlLmRlc2NyaXB0aW9uID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICBzY29wZXNbc2NvcGVdID0gYXR0cmlidXRlcy5zY29wZXNbaV07XG4gICAgICAgICAgICAgICAgICAgIHNjb3Blcy5wdXNoKGF0dHJpYnV0ZXMuc2NvcGVzW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhdHRyaWJ1dGVzLnNjb3BlcyA9IHNjb3BlcztcbiAgICAgICAgICAgIHRoaXMuYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXM7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5hdHRyaWJ1dGVzICYmIHRoaXMuYXR0cmlidXRlcy5mbG93KSB7XG4gICAgICAgICAgICB2YXIgZmxvdyA9IHRoaXMuYXR0cmlidXRlcy5mbG93O1xuICAgICAgICAgICAgdGhpcy5zZXQoJ2lzUGFzc3dvcmRGbG93JywgZmxvdyA9PT0gJ3Bhc3N3b3JkJyk7XG4gICAgICAgICAgICB0aGlzLnNldCgncmVxdWlyZUNsaWVudEF1dGhlbnRpY2F0aW9uJywgZmxvdyA9PT0gJ2FwcGxpY2F0aW9uJyk7XG4gICAgICAgICAgICB0aGlzLnNldCgnY2xpZW50QXV0aGVudGljYXRpb24nLCBmbG93ID09PSAncGFzc3dvcmQnIHx8IGZsb3cgPT09ICdhcHBsaWNhdGlvbicpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMub24oJ2NoYW5nZScsIHRoaXMudmF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WxBdXRoc1tsXTtcbiAgICAgICAgICBmb3IgKGtleSBpbiBhdXRocykge1xuICAgICAgICAgICAgZm9yIChhIGluIHRoaXMuYXV0aHMpIHtcbiAgICAgICAgICAgICAgYXV0aCA9IHRoaXMuYXV0aHNbYV07XG4gICAgICAgICAgICAgIGlmIChrZXkgPT09IGF1dGgubmFtZSkge1xuICAgICAgICAgICAgICAgIGlmIChhdXRoLnR5cGUgPT09ICdvYXV0aDInKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLm1vZGVsLm9hdXRoID0ge307XG4gICAgICAgICAgICAgICAgICB0aGlzLm1vZGVsLm9hdXRoLnNjb3BlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgcmVmMSA9IGF1dGgudmFsdWUuc2NvcGVzO1xuICAgICAgICAgICAgICAgICAgZm9yIChrIGluIHJlZjEpIHtcbiAgICAgICAgICAgICAgICAgICAgdiA9IHJlZjFba107XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlSW5kZXggPSBhdXRoc1trZXldLmluZGV4T2Yoayk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzY29wZUluZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICBvID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGU6IGssXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbjogdlxuICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5tb2RlbC5vYXV0aC5zY29wZXMucHVzaChvKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZm9yIChrIGluIG1vZGVsQXV0aHMpIHtcbiAgICAgICAgICB2ID0gbW9kZWxBdXRoc1trXTtcbiAgICAgICAgICBpZiAoayA9PT0gJ29hdXRoMicpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLm1vZGVsLm9hdXRoID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIHRoaXMubW9kZWwub2F1dGggPSB7fTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aGlzLm1vZGVsLm9hdXRoLnNjb3BlcyA9PT0gdm9pZCAwKSB7XG4gICAgICAgICAgICAgIHRoaXMubW9kZWwub2F1dGguc2NvcGVzID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKG0gPSAwLCBsZW4xID0gdi5sZW5ndGg7IG0gPCBsZW4xOyBtKyspIHtcbiAgICAgICAgICAgICAgbyA9IHZbbV07XG4gICAgICAgICAgICAgIHRoaXMubW9kZWwub2F1dGguc2NvcGVzLnB1c2gobyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIGlmICh0eXBlb2YgdGhpcy5tb2RlbC5yZXNwb25zZXMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICB0aGlzLm1vZGVsLnJlc3BvbnNlTWVzc2FnZXMgPSBbXTtcbiAgICAgIHJlZjIgPSB0aGlzLm1vZGVsLnJlc3BvbnNlcztcbiAgICAgIGZvciAoY29kZSBpbiByZWYyKSB7XG4gICAgICAgIHZhbHVlID0gcmVmMltjb2RlXTtcbiAgICAgICAgc2NoZW1hID0gbnVsbDtcbiAgICAgICAgc2NoZW1hT2JqID0gdGhpcy5tb2RlbC5yZXNwb25zZXNbY29kZV0uc2NoZW1hO1xuICAgICAgICBpZiAoc2NoZW1hT2JqICYmIHNjaGVtYU9iai4kcmVmKSB7XG4gICAgICAgICAgc2NoZW1hID0gc2NoZW1hT2JqLiRyZWY7XG4gICAgICAgICAgaWYgKHNjaGVtYS5pbmRleE9mKCcjL2RlZmluaXRpb25zLycpICE9PSAtMSkge1xuICAgICAgICAgICAgc2NoZW1hID0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gIGRpc2FibGVfZWRpdF9qc29uOnRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29ubGliOiAnc3dhZ2dlcicgfSk7XG4gICAgICAvLyBUaGlzIGlzIHNvIHRoYXQgdGhlIHNpZ25hdHVyZSBjYW4gc2VuZCBiYWNrIHRoZSBzYW1wbGUgdG8gdGhlIGpzb24gZWRpdG9yXG4gICAgICAvLyBUT0RPOiBTaWduYXR1cmVWaWV3IHNob3VsZCBleHBvc2UgYW4gZXZlbnQgXCJvblNhbXBsZUNsaWNrZWRcIiBpbnN0ZWFkXG4gICAgICBzaWduYXR1cmVNb2RlbC5qc29uRWRpdG9yID0gdGhpcy5tb2RlbC5qc29uRWRpdG9yO1xuICAgICAgJCgnLmJvZHktdGV4dGFyZWEnLCAkc2VsZikuaGlkZSgpO1xuICAgICAgJCgnLmVkaXRvcl9ob2xkZXInLCAkc2VsZikuc2hvdygpO1xuICAgICAgJCgnLnBhcmFtZXRlci1jb250ZW50LXR5cGUnLCAkc2VsZilcbiAgICAgICAgLmNoYW5nZShmdW5jdGlvbihlKXtcbiAgICAgICAgICAgIGlmKGUudGFyZ2V0LnZhbHVlID09PSAnYXBwbGljYXRpb24veG1sJyl7XG4gICAgICAgICAgICAgICQoJy5ib2R5LXRleHRhcmVhJywgJHNlbGYpLnNob3coKTtcbiAgICAgICAgICAgICAgJCgnLmVkaXRvcl9ob2xkZXInLCAkc2VsZikuaGlkZSgpO1xuICAgICAgICAgICAgICB0aGlzLm1vZGVsLmpzb25FZGl0b3IuZGlzYWJsZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICQoJy5ib2R5LXRleHRhcmVhJywgJHNlbGYpLmhpZGUoKTtcbiAgICAgICAgICAgICAgJCgnLmVkaXRvcl9ob2xkZXInLCAkc2VsZikuc2hvdygpO1xuICAgICAgICAgICAgICB0aGlzLm1vZGVsLmpzb25FZGl0b3IuZW5hYmxlKCk7XG4gICAgICAg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aW9uRm9ybWF0KSB7XG4gICAgICAgICAgb3B0aW9ucyArPSBvcHRpb25IdG1sKCdDb2xsLiBGb3JtYXQnLCBzY2hlbWEuY29sbGVjdGlvbkZvcm1hdCk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKF8uaXNVbmRlZmluZWQoc2NoZW1hLml0ZW1zKSkge1xuICAgICAgICBpZiAoXy5pc0FycmF5KHNjaGVtYS5lbnVtKSkge1xuICAgICAgICAgIHZhciBlbnVtU3RyaW5nO1xuXG4gICAgICAgICAgaWYgKHR5cGUgPT09ICdudW1iZXInIHx8IHR5cGUgPT09ICdpbnRlZ2VyJykge1xuICAgICAgICAgICAgZW51bVN0cmluZyA9IHNjaGVtYS5lbnVtLmpvaW4oJywgJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGVudW1TdHJpbmcgPSAnXCInICsgc2NoZW1hLmVudW0uam9pbignXCIsIFwiJykgKyAnXCInO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIG9wdGlvbnMgKz0gb3B0aW9uSHRtbCgnRW51bScsIGVudW1TdHJpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmxlbmd0aCA+IDApIHtcbiAgICAgICAgaHRtbCA9ICc8c3BhbiBjbGFzcz1cInByb3BXcmFwXCI+JyArIGh0bWwgKyAnPHRhYmxlIGNsYXNzPVwib3B0aW9uc1dyYXBwZXJcIj48dHI+PHRoIGNvbHNwYW49XCIyXCI+JyArIHR5cGUgKyAnPC90aD48L3RyPicgKyBvcHRpb25zICsgJzwvdGFibGU+PC9zcGFuPic7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBodG1sO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHByb2Nlc3NNb2RlbChzY2hlbWEsIG5hbWUpIHtcbiAgICAgIHZhciB0eXBlID0gc2NoZW1hLnR5cGUgfHwgJ29iamVjdCc7XG4gICAgICB2YXIgaXNBcnJheSA9IHNjaGVtYS50eXBlID09PSAnYXJyYXknO1xuICAgICAgdmFyIGh0bWwgPSBzdHJvbmdPcGVuICsgbmFtZSArICcgJyArIChpc0FycmF5ID8gJ1snIDogJ3snKSArIHN0cm9uZ0Nsb3NlO1xuICAgICAgdmFyIGNvbnRlbnRzO1xuXG4gICAgICBpZiAobmFtZSkge1xuICAgICAgICBzZWVuTW9kZWxzLnB1c2gobmFtZSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChpc0FycmF5KSB7XG4gICAgICAgIGlmIChfLmlzQXJyYXkoc2NoZW1hLml0ZW1zKSkge1xuICAgICAgICAgIGh0bWwgKz0gJzxkaXY+JyArIF8ubWFwKHNjaGVtYS5pdGVtcywgZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgIHZhciB0eXBlID0gaXRlbS50eXBlIHx8ICdvYmplY3QnO1xuXG4gICAgICAgICAgICBpZiAoXy5pc1VuZGVmaW5lZChpdGVtLiRyZWYpKSB7XG4gICAgICAgICAgICAgIGlmIChfLmluZGV4T2YoWydhcnJheScsICdvYmplY3QnXSwgdHlwZSkgPiAtMSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSAnb2JqZWN0JyAmJiBfLmlzVW5kZWZpbmVkKGl0ZW0ucHJvcGVydGllcykpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiAnb2JqZWN0JztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGFkZFJlZmVyZW5jZShpdGVtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByaW1pdGl2ZVRvT3B0aW9uc0hUTUwoaXRlbSwgdHlwZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBhZGRSZWZlcmVuY2UoaXRlbSwgc2ltcGxl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ICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmKHByb3BlcnR5LnJlYWRPbmx5KSB7XG4gICAgICAgICAgICAgICAgICBodG1sICs9ICcsIDxzcGFuIGNsYXNzPVwicHJvcFJlYWRPbmx5XCI+cmVhZCBvbmx5PC9zcGFuPic7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBodG1sICs9ICcpJztcblxuICAgICAgICAgICAgICByZXR1cm4gJzxkaXYnICsgKHByb3BlcnR5LnJlYWRPbmx5ID8gJyBjbGFzcz1cInJlYWRPbmx5XCInIDogJycpICsgJz4nICsgcHJpbWl0aXZlVG9PcHRpb25zSFRNTChjUHJvcGVydHksIGh0bWwpO1xuICAgICAgICAgICAgfSkuam9pbignLDwvZGl2PicpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChjb250ZW50cykge1xuICAgICAgICAgICAgaHRtbCArPSBjb250ZW50cyArICc8L2Rpdj4nO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBodG1sICs9ICc8ZGl2PicgKyBwcmltaXRpdmVUb09wdGlvbnNIVE1MKHNjaGVtYSwgdHlwZSkgKyAnPC9kaXY+JztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gaHRtbCArIHN0cm9uZ09wZW4gKyAoaXNBcnJheSA/ICddJyA6ICd9JykgKyBzdHJvbmdDbG9zZTtcbiAgICB9XG5cbiAgfTtcblxuICAvLyBjb3B5LXBhc3RlZCBmcm9tIHN3YWdnZXItanNcbiAgdmFyIHNjaGVtYVRvSlNPTiA9IGZ1bmN0aW9uIChzY2hlbWEsIG1vZGVscywgbW9kZWxzVG9JZ25vcmUsIG1vZGVsUHJvcGVydHlNYWNybykge1xuICAgIC8vIFJlc29sdmUgdGhlIHNjaGVtYSAoSGFuZGxlIG5lc3RlZCBzY2hlbWFzKVxuICAgIHNjaGVtYSA9IHJlc29sdmVTY2hlbWEoc2NoZW1hKTtcblxuICA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ICQoJy5tb2RlbC1zaWduYXR1cmUnLCB0aGlzLiRlbCkuYXBwZW5kKHJlc3BvbnNlTW9kZWxWaWV3LnJlbmRlcigpLmVsKTtcbiAgICByZXR1cm4gdGhpcztcbiAgfVxufSk7Il19 diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.min.js b/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.min.js new file mode 100644 index 00000000000..678d9d8c238 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/swagger-ui.min.js @@ -0,0 +1,15 @@ +(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}!function(){var e=Handlebars.template,t=Handlebars.templates=Handlebars.templates||{};t.apikey_auth=e({1:function(e,t,n,r,i){var a;return' <span class="key_auth__value">'+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</span>\n"},3:function(e,t,n,r,i){return' <input placeholder="api_key" class="auth_input input_apiKey_entry" name="apiKey" type="text"/>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'<div class="key_input_container">\n <h3 class="auth__title">Api key authorization</h3>\n <div class="auth__description">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+'</div>\n <div>\n <div class="key_auth__field">\n <span class="key_auth__label">name:</span>\n <span class="key_auth__value">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+'</span>\n </div>\n <div class="key_auth__field">\n <span class="key_auth__label">in:</span>\n <span class="key_auth__value">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t["in"]:t,{name:"escape",hash:{},data:i}))?a:"")+'</span>\n </div>\n <div class="key_auth__field">\n <span class="key_auth__label">value:</span>\n'+(null!=(a=n["if"].call(o,null!=t?t.isLogout:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:"")+" </div>\n </div>\n</div>\n"},useData:!0}),t.auth_button=e({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){return"<a class='authorize__btn' href=\"#\">Authorize</a>\n"},useData:!0}),t.auth_button_operation=e({1:function(e,t,n,r,i){return" authorize__btn_operation_login\n"},3:function(e,t,n,r,i){return" authorize__btn_operation_logout\n"},5:function(e,t,n,r,i){var a;return' <ul class="authorize-scopes">\n'+(null!=(a=n.each.call(null!=t?t:{},null!=t?t.scopes:t,{name:"each",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?a:"")+" </ul>\n"},6:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <li class="authorize__scope" title="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.description:t,{name:"escape",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.scope:t,{name:"escape",hash:{},data:i}))?a:"")+"</li>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{};return'<div class="authorize__btn authorize__btn_operation\n'+(null!=(a=n["if"].call(o,null!=t?t.isLogout:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:"")+'">\n'+(null!=(a=n["if"].call(o,null!=t?t.scopes:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?a:"")+"</div>\n"},useData:!0}),t.auth_view=e({1:function(e,t,n,r,i){return' <button type="button" class="auth__button auth_submit__button" data-sw-translate>Authorize</button>\n'},3:function(e,t,n,r,i){return' <button type="button" class="auth__button auth_logout__button" data-sw-translate>Logout</button>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{};return'<div class="auth_container">\n\n <div class="auth_inner"></div>\n <div class="auth_submit">\n'+(null!=(a=n.unless.call(o,null!=t?t.isLogout:t,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.isAuthorized:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+" </div>\n\n</div>\n"},useData:!0}),t.basic_auth=e({1:function(e,t,n,r,i){return" - authorized"},3:function(e,t,n,r,i){var a;return' <span class="basic_auth__value">'+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=t?t.username:t,{name:"escape",hash:{},data:i}))?a:"")+"</span>\n"},5:function(e,t,n,r,i){return' <input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>\n'},7:function(e,t,n,r,i){return' <div class="auth_label">\n <span class="basic_auth__label" data-sw-translate>password:</span>\n <input required placeholder="password" class="basic_auth__password auth_input" name="password" type="password"/></label>\n </div>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{};return"<div class='basic_auth_container'>\n <h3 class=\"auth__title\">Basic authentication"+(null!=(a=n["if"].call(o,null!=t?t.isLogout:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+'</h3>\n <form class="basic_input_container">\n <div class="auth__description">'+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+'</div>\n <div class="auth_label">\n <span class="basic_auth__label" data-sw-translate>username:</span>\n'+(null!=(a=n["if"].call(o,null!=t?t.isLogout:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.program(5,i,0),data:i}))?a:"")+" </div>\n"+(null!=(a=n.unless.call(o,null!=t?t.isLogout:t,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?a:"")+" </form>\n</div>\n"},useData:!0}),t.content_type=e({1:function(e,t,n,r,i){var a;return null!=(a=n.each.call(null!=t?t:{},null!=t?t.produces:t,{name:"each",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?a:""},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'\t<option value="'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+"</option>\n"},4:function(e,t,n,r,i){return' <option value="application/json">application/json</option>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'<label data-sw-translate for="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.contentTypeId:t,{name:"escape",hash:{},data:i}))?a:"")+'">Response Content Type</label>\n<select name="contentType" id="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.contentTypeId:t,{name:"escape",hash:{},data:i}))?a:"")+'">\n'+(null!=(a=n["if"].call(o,null!=t?t.produces:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?a:"")+"</select>\n"},useData:!0}),t.main=e({1:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <div class="info_title">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=(a=null!=t?t.info:t)?a.title:a,{name:"sanitize",hash:{},data:i}))?a:"")+'</div>\n <div class="info_description markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=(a=null!=t?t.info:t)?a.description:a,{name:"sanitize",hash:{},data:i}))?a:"")+"</div>\n"+(null!=(a=n["if"].call(o,null!=t?t.externalDocs:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?a:"")+" "+(null!=(a=n["if"].call(o,null!=(a=null!=t?t.info:t)?a.termsOfServiceUrl:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?a:"")+"\n "+(null!=(a=n["if"].call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.name:a,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?a:"")+"\n "+(null!=(a=n["if"].call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.url:a,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.noop,data:i}))?a:"")+"\n "+(null!=(a=n["if"].call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.email:a,{name:"if",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))?a:"")+"\n "+(null!=(a=n["if"].call(o,null!=(a=null!=t?t.info:t)?a.license:a,{name:"if",hash:{},fn:e.program(12,i,0),inverse:e.noop,data:i}))?a:"")+"\n"},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return" <p>"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=(a=null!=t?t.externalDocs:t)?a.description:a,{name:"sanitize",hash:{},data:i}))?a:"")+'</p>\n <a href="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=t?t.externalDocs:t)?a.url:a,{name:"escape",hash:{},data:i}))?a:"")+'" target="_blank">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=t?t.externalDocs:t)?a.url:a,{name:"escape",hash:{},data:i}))?a:"")+"</a>\n"},4:function(e,t,n,r,i){var a;return'<div class="info_tos"><a target="_blank" href="'+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=(a=null!=t?t.info:t)?a.termsOfServiceUrl:a,{name:"escape",hash:{},data:i}))?a:"")+'" data-sw-translate>Terms of service</a></div>'},6:function(e,t,n,r,i){var a;return"<div><div class='info_name' style=\"display: inline\" data-sw-translate>Created by </div> "+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.name:a,{name:"escape",hash:{},data:i}))?a:"")+"</div>"},8:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<div class='info_url' data-sw-translate>See more at <a href=\""+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.url:a,{name:"escape",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.url:a,{name:"escape",hash:{},data:i}))?a:"")+"</a></div>"},10:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'<div class=\'info_email\'><a target="_parent" href="mailto:'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.contact:a)?a.email:a,{name:"escape",hash:{},data:i}))?a:"")+"?subject="+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=t?t.info:t)?a.title:a,{name:"escape",hash:{},data:i}))?a:"")+'" data-sw-translate>Contact the developer</a></div>'},12:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<div class='info_license'><a target=\"_blank\" href='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.license:a)?a.url:a,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=(a=null!=(a=null!=t?t.info:t)?a.license:a)?a.name:a,{name:"escape",hash:{},data:i}))?a:"")+"</a></div>"},14:function(e,t,n,r,i){var a;return' , <span style="font-variant: small-caps" data-sw-translate>api version</span>: '+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=(a=null!=t?t.info:t)?a.version:a,{name:"escape",hash:{},data:i}))?a:"")+"\n "},16:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <span style="float:right"><a target="_blank" href="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.validatorUrl:t,{name:"escape",hash:{},data:i}))?a:"")+"/debug?url="+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.url:t,{name:"escape",hash:{},data:i}))?a:"")+'"><img id="validator" src="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.validatorUrl:t,{name:"escape",hash:{},data:i}))?a:"")+"?url="+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.url:t,{name:"escape",hash:{},data:i}))?a:"")+'"></a>\n </span>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{};return"<div class='info' id='api_info'>\n"+(null!=(a=n["if"].call(o,null!=t?t.info:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+"</div>\n<div class='container' id='resources_container'>\n <div class='authorize-wrapper'></div>\n\n <ul id='resources'></ul>\n\n <div class=\"footer\">\n <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(o,null!=t?t.basePath:t,{name:"escape",hash:{},data:i}))?a:"")+"\n"+(null!=(a=n["if"].call(o,null!=(a=null!=t?t.info:t)?a.version:a,{name:"if",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?a:"")+"]\n"+(null!=(a=n["if"].call(o,null!=t?t.validatorUrl:t,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?a:"")+" </h4>\n </div>\n</div>\n"},useData:!0}),t.oauth2=e({1:function(e,t,n,r,i){var a;return"<p>Authorization URL: "+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.authorizationUrl:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</p>"},3:function(e,t,n,r,i){var a;return"<p>Token URL: "+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.tokenUrl:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</p>"},5:function(e,t,n,r,i){return' <p>Please input username and password for password flow authorization</p>\n <fieldset>\n <div><label>Username: <input class="oauth-username" type="text" name="username"></label></div>\n <div><label>Password: <input class="oauth-password" type="password" name="password"></label></div>\n </fieldset>\n'},7:function(e,t,n,r,i){var a;return" <p>Setup client authentication."+(null!=(a=n["if"].call(null!=t?t:{},null!=t?t.requireClientAuthenticaiton:t,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.noop,data:i}))?a:"")+'</p>\n <fieldset>\n <div><label>Type:\n <select class="oauth-client-authentication-type" name="client-authentication-type">\n <option value="none" selected>None or other</option>\n <option value="basic">Basic auth</option>\n <option value="request-body">Request body</option>\n </select>\n </label></div>\n <div class="oauth-client-authentication" hidden>\n <div><label>ClientId: <input class="oauth-client-id" type="text" name="client-id"></label></div>\n <div><label>Secret: <input class="oauth-client-secret" type="text" name="client-secret"></label></div>\n </div>\n </fieldset>\n'},8:function(e,t,n,r,i){return"(Required)"},10:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <li>\n <input class="oauth-scope" type="checkbox" data-scope="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.scope:t,{name:"escape",hash:{},data:i}))?a:"")+'" oauthtype="'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.OAuthSchemeKey:t,{name:"escape",hash:{},data:i}))?a:"")+'"/>\n <label>'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.scope:t,{name:"escape",hash:{},data:i}))?a:"")+'</label><br/>\n <span class="api-scope-desc">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.description:t,{name:"escape",hash:{},data:i}))?a:"")+"\n"+(null!=(a=n["if"].call(o,null!=t?t.OAuthSchemeKey:t,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?a:"")+" </span>\n </li>\n"},11:function(e,t,n,r,i){var a;return" ("+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=t?t.OAuthSchemeKey:t,{name:"escape",hash:{},data:i}))?a:"")+")\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'<div>\n <h3 class="auth__title">OAuth2.0</h3>\n <p>'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</p>\n "+(null!=(a=n["if"].call(o,null!=t?t.authorizationUrl:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+"\n "+(null!=(a=n["if"].call(o,null!=t?t.tokenUrl:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+"\n <p>flow: "+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.flow:t,{name:"escape",hash:{},data:i}))?a:"")+"</p>\n"+(null!=(a=n["if"].call(o,null!=t?t.isPasswordFlow:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.clientAuthentication:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?a:"")+" <p><strong> "+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.appName:t,{name:"escape",hash:{},data:i}))?a:"")+' </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n <a href="#">Learn how to use</a>\n </p>\n <ul class="api-popup-scopes">\n'+(null!=(a=n.each.call(o,null!=t?t.scopes:t,{name:"each",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))?a:"")+" </ul>\n</div>"},useData:!0}),t.operation=e({1:function(e,t,n,r,i){return"deprecated"},3:function(e,t,n,r,i){return" <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n"},5:function(e,t,n,r,i){var a;return' <h4><span data-sw-translate>Implementation Notes</span></h4>\n <div class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</div>\n"},7:function(e,t,n,r,i){return" <div class='authorize-wrapper authorize-wrapper_operation'></div>\n"},9:function(e,t,n,r,i){var a,o=null!=t?t:{};return' <div class="response-class">\n <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> '+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(o,null!=t?t.successCode:t,{name:"escape",hash:{},data:i}))?a:"")+")</h4>\n "+(null!=(a=n["if"].call(o,null!=t?t.successDescription:t,{name:"if",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))?a:"")+'\n <p><span class="model-signature" /></p>\n <br/>\n <div class="response-content-type" />\n </div>\n'},10:function(e,t,n,r,i){var a;return'<div class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.successDescription:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</div>"},12:function(e,t,n,r,i){var a;return' <h4 data-sw-translate>Headers</h4>\n <table class="headers">\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Header</th>\n <th style="width: 310px; max-width: 310px" data-sw-translate>Description</th>\n <th style="width: 200px; max-width: 200px" data-sw-translate>Type</th>\n <th style="width: 320px; max-width: 320px" data-sw-translate>Other</th>\n </tr>\n </thead>\n <tbody>\n'+(null!=(a=n.each.call(null!=t?t:{},null!=t?t.headers:t,{name:"each",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?a:"")+" </tbody>\n </table>\n"},13:function(e,t,n,r,i){var a,o,s=null!=t?t:{},l=n.helperMissing;return" <tr>\n <td>"+e.escapeExpression((o=null!=(o=n.key||i&&i.key)?o:l,"function"==typeof o?o.call(s,{name:"key",hash:{},data:i}):o))+"</td>\n <td>"+(null!=(a=(n.sanitize||t&&t.sanitize||l).call(s,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</td>\n <td>"+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.type:t,{name:"escape",hash:{},data:i}))?a:"")+"</td>\n <td>"+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.other:t,{name:"escape",hash:{},data:i}))?a:"")+"</td>\n </tr>\n"},15:function(e,t,n,r,i){return' <h4 data-sw-translate>Parameters</h4>\n <table class=\'fullwidth parameters\'>\n <thead>\n <tr>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter</th>\n <th style="width: 310px; max-width: 310px" data-sw-translate>Value</th>\n <th style="width: 200px; max-width: 200px" data-sw-translate>Description</th>\n <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter Type</th>\n <th style="width: 220px; max-width: 230px" data-sw-translate>Data Type</th>\n </tr>\n </thead>\n <tbody class="operation-params">\n\n </tbody>\n </table>\n'},17:function(e,t,n,r,i){return" <div style='margin:0;padding:0;display:inline'></div>\n <h4 data-sw-translate>Response Messages</h4>\n <table class='fullwidth response-messages'>\n <thead>\n <tr>\n <th data-sw-translate>HTTP Status Code</th>\n <th data-sw-translate>Reason</th>\n <th data-sw-translate>Response Model</th>\n <th data-sw-translate>Headers</th>\n </tr>\n </thead>\n <tbody class=\"operation-status\">\n </tbody>\n </table>\n"},19:function(e,t,n,r,i){return""},21:function(e,t,n,r,i){return" <div class='sandbox_header'>\n <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n <span class='response_throbber' style='display:none'></span>\n </div>\n"},23:function(e,t,n,r,i){return" <h4 data-sw-translate>Request Headers</h4>\n <div class='block request_headers'></div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing,l=e.escapeExpression;return" <ul class='operations' >\n <li class='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.method:t,{name:"escape",hash:{},data:i}))?a:"")+" operation' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.parentId:t,{name:"escape",hash:{},data:i}))?a:"")+"_"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.nickname:t,{name:"escape",hash:{},data:i}))?a:"")+"'>\n <div class='heading'>\n <h3>\n <span class='http_method'>\n <a href='#!/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.encodedParentId:t,{name:"sanitize",hash:{},data:i}))+"/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.nickname:t,{name:"sanitize",hash:{},data:i}))+'\' class="toggleOperation">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.method:t,{name:"escape",hash:{},data:i}))?a:"")+"</a>\n </span>\n <span class='path'>\n <a href='#!/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.encodedParentId:t,{name:"sanitize",hash:{},data:i}))+"/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.nickname:t,{name:"sanitize",hash:{},data:i}))+"' class=\"toggleOperation "+(null!=(a=n["if"].call(o,null!=t?t.deprecated:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+'">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.path:t,{name:"escape",hash:{},data:i}))?a:"")+"</a>\n </span>\n </h3>\n <ul class='options'>\n <li>\n <a href='#!/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.encodedParentId:t,{name:"sanitize",hash:{},data:i}))+"/"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.nickname:t,{name:"sanitize",hash:{},data:i}))+'\' class="toggleOperation"><span class="markdown">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.summary:t,{name:"escape",hash:{},data:i}))?a:"")+"</span></a>\n </li>\n </ul>\n </div>\n <div class='content' id='"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.encodedParentId:t,{name:"sanitize",hash:{},data:i}))+"_"+l((n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.nickname:t,{name:"sanitize",hash:{},data:i}))+"_content' style='display:none'>\n"+(null!=(a=n["if"].call(o,null!=t?t.deprecated:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.security:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.type:t,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?a:"")+"\n"+(null!=(a=n["if"].call(o,null!=t?t.headers:t,{name:"if",hash:{},fn:e.program(12,i,0),inverse:e.noop,data:i}))?a:"")+"\n <form accept-charset='UTF-8' class='sandbox'>\n <div style='margin:0;padding:0;display:inline'></div>\n"+(null!=(a=n["if"].call(o,null!=t?t.parameters:t,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.responseMessages:t,{name:"if",hash:{},fn:e.program(17,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.isReadOnly:t,{name:"if",hash:{},fn:e.program(19,i,0),inverse:e.program(21,i,0),data:i}))?a:"")+" </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n"+(null!=(a=n["if"].call(o,null!=t?t.showRequestHeaders:t,{name:"if",hash:{},fn:e.program(23,i,0),inverse:e.noop,data:i}))?a:"")+" <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n"},useData:!0}),t.param=e({1:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t.isFile:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?a:""},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'\t\t\t<input type="file" name=\''+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+'\'/>\n\t\t\t<div class="parameter-content-type" />\n'},4:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t["default"]:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?a:""},5:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\t\t\t\t<div class=\"editor_holder\"></div>\n\t\t\t\t<textarea class='body-textarea' name='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t["default"]:t,{name:"escape",hash:{},data:i}))?a:"")+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\t\t\t\t<textarea class='body-textarea' name='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+'\'></textarea>\n\t\t\t\t<div class="editor_holder"></div>\n\t\t\t\t<br />\n\t\t\t\t<div class="parameter-content-type" />\n'},9:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t.isFile:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(10,i,0),data:i}))?a:""},10:function(e,t,n,r,i){var a;return null!=(a=(n.renderTextParam||t&&t.renderTextParam||n.helperMissing).call(null!=t?t:{},t,{name:"renderTextParam",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?a:""},11:function(e,t,n,r,i){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<td class='code'><label for='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"</label></td>\n<td>\n\n"+(null!=(a=n["if"].call(o,null!=t?t.isBody:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(9,i,0),data:i}))?a:"")+'\n</td>\n<td class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</td>\n<td>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.paramType:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td>\n\t<span class="model-signature"></span>\n</td>\n'},useData:!0}),t.param_list=e({1:function(e,t,n,r,i){return" required"},3:function(e,t,n,r,i){return' multiple="multiple"'},5:function(e,t,n,r,i){return" required "},7:function(e,t,n,r,i){var a;return" <option "+(null!=(a=n.unless.call(null!=t?t:{},null!=t?t.hasDefault:t,{name:"unless",hash:{},fn:e.program(8,i,0),inverse:e.noop,data:i}))?a:"")+" value=''></option>\n"},8:function(e,t,n,r,i){return' selected="" '},10:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\n <option "+(null!=(a=n["if"].call(o,null!=t?t.isDefault:t,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?a:"")+" value='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.value:t,{name:"sanitize",hash:{},data:i}))?a:"")+"'> "+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.value:t,{name:"sanitize",hash:{},data:i}))?a:"")+" "+(null!=(a=n["if"].call(o,null!=t?t.isDefault:t,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?a:"")+" </option>\n\n"},11:function(e,t,n,r,i){return' selected="" '},13:function(e,t,n,r,i){return" (default) "},15:function(e,t,n,r,i){return"<strong>"},17:function(e,t,n,r,i){return"</strong>"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o,s=null!=t?t:{},l=n.helperMissing;return"<td class='code"+(null!=(a=n["if"].call(s,null!=t?t.required:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+"'><label for='"+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.sanitize||t&&t.sanitize||l).call(s,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</label></td>\n<td>\n <select "+(null!=(a=(n.isArray||t&&t.isArray||l).call(s,t,{name:"isArray",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+' class="parameter '+(null!=(a=n["if"].call(s,null!=t?t.required:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?a:"")+'" name="'+(null!=(a=(n.sanitize||t&&t.sanitize||l).call(s,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+'" id="'+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+'">\n\n'+(null!=(a=n.unless.call(s,null!=t?t.required:t,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?a:"")+"\n"+(null!=(a=n.each.call(s,null!=(a=null!=t?t.allowableValues:t)?a.descriptiveValues:a,{name:"each",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))?a:"")+'\n </select>\n</td>\n<td class="markdown">'+(null!=(a=n["if"].call(s,null!=t?t.required:t,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(o=null!=(o=n.description||(null!=t?t.description:t))?o:l,a="function"==typeof o?o.call(s,{name:"description",hash:{},data:i}):o)?a:"")+(null!=(a=n["if"].call(s,null!=t?t.required:t,{name:"if",hash:{},fn:e.program(17,i,0),inverse:e.noop,data:i}))?a:"")+"</td>\n<td>"+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.paramType:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),t.param_readonly=e({1:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return" <textarea class='body-textarea' readonly='readonly' name='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t["default"]:t,{name:"sanitize",hash:{},data:i}))?a:"")+'</textarea>\n <div class="parameter-content-type" />\n'},3:function(e,t,n,r,i){ +var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t["default"]:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?a:""},4:function(e,t,n,r,i){var a;return" "+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t["default"]:t,{name:"sanitize",hash:{},data:i}))?a:"")+"\n"},6:function(e,t,n,r,i){return" (empty)\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<td class='code'><label for='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</label></td>\n<td>\n"+(null!=(a=n["if"].call(o,null!=t?t.isBody:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:"")+'</td>\n<td class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</td>\n<td>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.paramType:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),t.param_readonly_required=e({1:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return" <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t["default"]:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</textarea>\n"},3:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t["default"]:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?a:""},4:function(e,t,n,r,i){var a;return" "+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t["default"]:t,{name:"sanitize",hash:{},data:i}))?a:"")+"\n"},6:function(e,t,n,r,i){return" (empty)\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<td class='code required'><label for='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</label></td>\n<td>\n"+(null!=(a=n["if"].call(o,null!=t?t.isBody:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:"")+'</td>\n<td class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</td>\n<td>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.paramType:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),t.param_required=e({1:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t.isFile:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?a:""},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return'\t\t\t<input type="file" name=\''+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'/>\n"},4:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t["default"]:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?a:""},5:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\t\t\t\t<div class=\"editor_holder\"></div>\n\t\t\t\t<textarea class='body-textarea required' placeholder='(required)' name='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id=\""+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t["default"]:t,{name:"sanitize",hash:{},data:i}))?a:"")+'</textarea>\n <br />\n <div class="parameter-content-type" />\n'},7:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\t\t\t\t<textarea class='body-textarea required' placeholder='(required)' name='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+'\'></textarea>\n\t\t\t\t<div class="editor_holder"></div>\n\t\t\t\t<br />\n\t\t\t\t<div class="parameter-content-type" />\n'},9:function(e,t,n,r,i){var a;return null!=(a=n["if"].call(null!=t?t:{},null!=t?t.isFile:t,{name:"if",hash:{},fn:e.program(10,i,0),inverse:e.program(12,i,0),data:i}))?a:""},10:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"\t\t\t<input class='parameter required' type='file' name='"+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'/>\n"},12:function(e,t,n,r,i){var a;return null!=(a=(n.renderTextParam||t&&t.renderTextParam||n.helperMissing).call(null!=t?t:{},t,{name:"renderTextParam",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?a:""},13:function(e,t,n,r,i){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<td class='code required'><label for='"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.valueId:t,{name:"escape",hash:{},data:i}))?a:"")+"'>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.name:t,{name:"escape",hash:{},data:i}))?a:"")+"</label></td>\n<td>\n"+(null!=(a=n["if"].call(o,null!=t?t.isBody:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(9,i,0),data:i}))?a:"")+'</td>\n<td>\n\t<strong><span class="markdown">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</span></strong>\n</td>\n<td>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.paramType:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),t.parameter_content_type=e({1:function(e,t,n,r,i){var a;return null!=(a=n.each.call(null!=t?t:{},null!=t?t.consumes:t,{name:"each",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?a:""},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <option value="'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+"</option>\n"},4:function(e,t,n,r,i){return' <option value="application/json">application/json</option>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o,s=null!=t?t:{},l=n.helperMissing;return'<label for="'+e.escapeExpression((o=null!=(o=n.parameterContentTypeId||(null!=t?t.parameterContentTypeId:t))?o:l,"function"==typeof o?o.call(s,{name:"parameterContentTypeId",hash:{},data:i}):o))+'" data-sw-translate>Parameter content type:</label>\n<select name="parameterContentType" id="'+(null!=(a=(n.sanitize||t&&t.sanitize||l).call(s,null!=t?t.parameterContentTypeId:t,{name:"sanitize",hash:{},data:i}))?a:"")+'">\n'+(null!=(a=n["if"].call(s,null!=t?t.consumes:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?a:"")+"</select>\n"},useData:!0}),t.popup=e({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a;return'<div class="api-popup-dialog-wrapper">\n <div class="api-popup-title">'+e.escapeExpression((a=null!=(a=n.title||(null!=t?t.title:t))?a:n.helperMissing,"function"==typeof a?a.call(null!=t?t:{},{name:"title",hash:{},data:i}):a))+'</div>\n <div class="api-popup-content"></div>\n <p class="error-msg"></p>\n <div class="api-popup-actions">\n <button class="api-popup-cancel api-button gray" type="button">Cancel</button>\n </div>\n</div>\n<div class="api-popup-dialog-shadow"></div>'},useData:!0}),t.resource=e({1:function(e,t,n,r,i){return" : "},3:function(e,t,n,r,i){var a;return" <li>\n <a href='"+(null!=(a=(n.sanitize||t&&t.sanitize||n.helperMissing).call(null!=t?t:{},null!=t?t.url:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' data-sw-translate>Raw</a>\n </li>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o,s,l=null!=t?t:{},u=n.helperMissing,c="<div class='heading'>\n <h2>\n <a href='#!/"+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'\' class="toggleEndpointList" data-id="'+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.name:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</a> ";return o=null!=(o=n.summary||(null!=t?t.summary:t))?o:u,s={name:"summary",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i},a="function"==typeof o?o.call(l,s):o,n.summary||(a=n.blockHelperMissing.call(t,a,s)),null!=a&&(c+=a),c+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.summary:t,{name:"sanitize",hash:{},data:i}))?a:"")+"\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/"+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+"' id='endpointListTogger_"+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'\' class="toggleEndpointList" data-id="'+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'" data-sw-translate>Show/Hide</a>\n </li>\n <li>\n <a href=\'#\' class="collapseResource" data-id="'+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'" data-sw-translate>\n List Operations\n </a>\n </li>\n <li>\n <a href=\'#\' class="expandResource" data-id="'+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+'" data-sw-translate>\n Expand Operations\n </a>\n </li>\n'+(null!=(a=n["if"].call(l,null!=t?t.url:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+" </ul>\n</div>\n<ul class='endpoints' id='"+(null!=(a=(n.sanitize||t&&t.sanitize||u).call(l,null!=t?t.id:t,{name:"sanitize",hash:{},data:i}))?a:"")+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0}),t.response_content_type=e({1:function(e,t,n,r,i){var a;return null!=(a=n.each.call(null!=t?t:{},null!=t?t.produces:t,{name:"each",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?a:""},2:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return' <option value="'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+'">'+(null!=(a=(n.sanitize||t&&t.sanitize||s).call(o,t,{name:"sanitize",hash:{},data:i}))?a:"")+"</option>\n"},4:function(e,t,n,r,i){return' <option value="application/json">application/json</option>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o,s=null!=t?t:{},l=n.helperMissing,u="function",c=e.escapeExpression;return'<label data-sw-translate for="'+c((o=null!=(o=n.responseContentTypeId||(null!=t?t.responseContentTypeId:t))?o:l,typeof o===u?o.call(s,{name:"responseContentTypeId",hash:{},data:i}):o))+'">Response Content Type</label>\n<select name="responseContentType" id="'+c((o=null!=(o=n.responseContentTypeId||(null!=t?t.responseContentTypeId:t))?o:l,typeof o===u?o.call(s,{name:"responseContentTypeId",hash:{},data:i}):o))+'">\n'+(null!=(a=n["if"].call(s,null!=t?t.produces:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?a:"")+"</select>\n"},useData:!0}),t.signature=e({1:function(e,t,n,r,i){var a,o=null!=t?t:{};return'\n<div>\n<ul class="signature-nav">\n <li><a class="description-link" href="#" data-sw-translate>Model</a></li>\n <li><a class="snippet-link" href="#" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n <div class="description">\n '+e.escapeExpression((n.sanitize||t&&t.sanitize||n.helperMissing).call(o,null!=t?t.signature:t,{name:"sanitize",hash:{},data:i}))+'\n </div>\n\n <div class="snippet">\n'+(null!=(a=n["if"].call(o,null!=t?t.sampleJSON:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?a:"")+(null!=(a=n["if"].call(o,null!=t?t.sampleXML:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?a:"")+" </div>\n</div>\n"},2:function(e,t,n,r,i){var a,o=null!=t?t:{};return' <div class="snippet_json">\n <pre><code>'+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(o,null!=t?t.sampleJSON:t,{name:"escape",hash:{},data:i}))?a:"")+"</code></pre>\n "+(null!=(a=n["if"].call(o,null!=t?t.isParam:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+"\n </div>\n"},3:function(e,t,n,r,i){return'<small class="notice" data-sw-translate></small>'},5:function(e,t,n,r,i){var a,o=null!=t?t:{};return' <div class="snippet_xml">\n <pre><code>'+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(o,null!=t?t.sampleXML:t,{name:"escape",hash:{},data:i}))?a:"")+"</code></pre>\n "+(null!=(a=n["if"].call(o,null!=t?t.isParam:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?a:"")+"\n </div>\n"},7:function(e,t,n,r,i){var a;return" "+(null!=(a=(n.escape||t&&t.escape||n.helperMissing).call(null!=t?t:{},null!=t?t.signature:t,{name:"escape",hash:{},data:i}))?a:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a;return null!=(a=(n.ifCond||t&&t.ifCond||n.helperMissing).call(null!=t?t:{},null!=t?t.sampleJSON:t,"||",null!=t?t.sampleXML:t,{name:"ifCond",hash:{},fn:e.program(1,i,0),inverse:e.program(7,i,0),data:i}))?a:""},useData:!0}),t.status_code=e({1:function(e,t,n,r,i){var a,o,s=null!=t?t:{},l=n.helperMissing;return" <tr>\n <td>"+e.escapeExpression((o=null!=(o=n.key||i&&i.key)?o:l,"function"==typeof o?o.call(s,{name:"key",hash:{},data:i}):o))+"</td>\n <td>"+(null!=(a=(n.sanitize||t&&t.sanitize||l).call(s,null!=t?t.description:t,{name:"sanitize",hash:{},data:i}))?a:"")+"</td>\n <td>"+(null!=(a=(n.escape||t&&t.escape||l).call(s,null!=t?t.type:t,{name:"escape",hash:{},data:i}))?a:"")+"</td>\n </tr>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var a,o=null!=t?t:{},s=n.helperMissing;return"<td width='15%' class='code'>"+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.code:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td class="markdown">'+(null!=(a=(n.escape||t&&t.escape||s).call(o,null!=t?t.message:t,{name:"escape",hash:{},data:i}))?a:"")+'</td>\n<td width=\'50%\'><span class="model-signature" /></td>\n<td class="headers">\n <table>\n <tbody>\n'+(null!=(a=n.each.call(o,null!=t?t.headers:t,{name:"each",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+" </tbody>\n </table>\n</td>"},useData:!0})}(),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),Docs.expandEndpointListForResource(e))},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.returnExports=t()}(this,function(){var e,t,n=Array,r=n.prototype,i=Object,a=i.prototype,o=Function,s=o.prototype,l=String,u=l.prototype,c=Number,p=c.prototype,h=r.slice,f=r.splice,d=r.push,m=r.unshift,g=r.concat,y=r.join,v=s.call,b=s.apply,w=Math.max,_=Math.min,x=a.toString,A="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,S=Function.prototype.toString,j=/^\s*class /,E=function(e){try{var t=S.call(e),n=t.replace(/\/\/.*\n/g,""),r=n.replace(/\/\*[.\s\S]*\*\//g,""),i=r.replace(/\n/gm," ").replace(/ {2}/g," ");return j.test(i)}catch(a){return!1}},O=function(e){try{return!E(e)&&(S.call(e),!0)}catch(t){return!1}},k="[object Function]",T="[object GeneratorFunction]",e=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(A)return O(e);if(E(e))return!1;var t=x.call(e);return t===k||t===T},C=RegExp.prototype.exec,I=function(e){try{return C.call(e),!0}catch(t){return!1}},D="[object RegExp]";t=function(e){return"object"==typeof e&&(A?I(e):x.call(e)===D)};var L,M=String.prototype.valueOf,R=function(e){try{return M.call(e),!0}catch(t){return!1}},U="[object String]";L=function(e){return"string"==typeof e||"object"==typeof e&&(A?R(e):x.call(e)===U)};var P=i.defineProperty&&function(){try{var e={};i.defineProperty(e,"x",{enumerable:!1,value:e});for(var t in e)return!1;return e.x===e}catch(n){return!1}}(),q=function(e){var t;return t=P?function(e,t,n,r){!r&&t in e||i.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)},function(n,r,i){for(var a in r)e.call(r,a)&&t(n,a,r[a],i)}}(a.hasOwnProperty),B=function(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t},z=c.isNaN||function(e){return e!==e},N={ToInteger:function(e){var t=+e;return z(t)?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t},ToPrimitive:function(t){var n,r,i;if(B(t))return t;if(r=t.valueOf,e(r)&&(n=r.call(t),B(n)))return n;if(i=t.toString,e(i)&&(n=i.call(t),B(n)))return n;throw new TypeError},ToObject:function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return i(e)},ToUint32:function(e){return e>>>0}},$=function(){};q(s,{bind:function(t){var n=this;if(!e(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,a=h.call(arguments,1),s=function(){if(this instanceof r){var e=b.call(n,this,g.call(a,h.call(arguments)));return i(e)===e?e:this}return b.call(n,t,g.call(a,h.call(arguments)))},l=w(0,n.length-a.length),u=[],c=0;c<l;c++)d.call(u,"$"+c);return r=o("binder","return function ("+y.call(u,",")+"){ return binder.apply(this, arguments); }")(s),n.prototype&&($.prototype=n.prototype,r.prototype=new $,$.prototype=null),r}});var F=v.bind(a.hasOwnProperty),V=v.bind(a.toString),H=v.bind(h),Y=b.bind(h),J=v.bind(u.slice),W=v.bind(u.split),Q=v.bind(u.indexOf),G=v.bind(d),K=v.bind(a.propertyIsEnumerable),X=v.bind(r.sort),Z=n.isArray||function(e){return"[object Array]"===V(e)},ee=1!==[].unshift(0);q(r,{unshift:function(){return m.apply(this,arguments),this.length}},ee),q(n,{isArray:Z});var te=i("a"),ne="a"!==te[0]||!(0 in te),re=function(e){var t=!0,n=!0,r=!1;if(e)try{e.call("foo",function(e,n,r){"object"!=typeof r&&(t=!1)}),e.call([1],function(){"use strict";n="string"==typeof this},"x")}catch(i){r=!0}return!!e&&!r&&t&&n};q(r,{forEach:function(t){var n,r=N.ToObject(this),i=ne&&L(this)?W(this,""):r,a=-1,o=N.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++a<o;)a in i&&("undefined"==typeof n?t(i[a],a,r):t.call(n,i[a],a,r))}},!re(r.forEach)),q(r,{map:function(t){var r,i=N.ToObject(this),a=ne&&L(this)?W(this,""):i,o=N.ToUint32(a.length),s=n(o);if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.map callback must be a function");for(var l=0;l<o;l++)l in a&&("undefined"==typeof r?s[l]=t(a[l],l,i):s[l]=t.call(r,a[l],l,i));return s}},!re(r.map)),q(r,{filter:function(t){var n,r,i=N.ToObject(this),a=ne&&L(this)?W(this,""):i,o=N.ToUint32(a.length),s=[];if(arguments.length>1&&(r=arguments[1]),!e(t))throw new TypeError("Array.prototype.filter callback must be a function");for(var l=0;l<o;l++)l in a&&(n=a[l],("undefined"==typeof r?t(n,l,i):t.call(r,n,l,i))&&G(s,n));return s}},!re(r.filter)),q(r,{every:function(t){var n,r=N.ToObject(this),i=ne&&L(this)?W(this,""):r,a=N.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.every callback must be a function");for(var o=0;o<a;o++)if(o in i&&!("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r)))return!1;return!0}},!re(r.every)),q(r,{some:function(t){var n,r=N.ToObject(this),i=ne&&L(this)?W(this,""):r,a=N.ToUint32(i.length);if(arguments.length>1&&(n=arguments[1]),!e(t))throw new TypeError("Array.prototype.some callback must be a function");for(var o=0;o<a;o++)if(o in i&&("undefined"==typeof n?t(i[o],o,r):t.call(n,i[o],o,r)))return!0;return!1}},!re(r.some));var ie=!1;r.reduce&&(ie="object"==typeof r.reduce.call("es5",function(e,t,n,r){return r})),q(r,{reduce:function(t){var n=N.ToObject(this),r=ne&&L(this)?W(this,""):n,i=N.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var a,o=0;if(arguments.length>=2)a=arguments[1];else for(;;){if(o in r){a=r[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;o<i;o++)o in r&&(a=t(a,r[o],o,n));return a}},!ie);var ae=!1;r.reduceRight&&(ae="object"==typeof r.reduceRight.call("es5",function(e,t,n,r){return r})),q(r,{reduceRight:function(t){var n=N.ToObject(this),r=ne&&L(this)?W(this,""):n,i=N.ToUint32(r.length);if(!e(t))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===i&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var a,o=i-1;if(arguments.length>=2)a=arguments[1];else for(;;){if(o in r){a=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}if(o<0)return a;do o in r&&(a=t(a,r[o],o,n));while(o--);return a}},!ae);var oe=r.indexOf&&[0,1].indexOf(1,2)!==-1;q(r,{indexOf:function(e){var t=ne&&L(this)?W(this,""):N.ToObject(this),n=N.ToUint32(t.length);if(0===n)return-1;var r=0;for(arguments.length>1&&(r=N.ToInteger(arguments[1])),r=r>=0?r:w(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},oe);var se=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;q(r,{lastIndexOf:function(e){var t=ne&&L(this)?W(this,""):N.ToObject(this),n=N.ToUint32(t.length);if(0===n)return-1;var r=n-1;for(arguments.length>1&&(r=_(r,N.ToInteger(arguments[1]))),r=r>=0?r:n-Math.abs(r);r>=0;r--)if(r in t&&e===t[r])return r;return-1}},se);var le=function(){var e=[1,2],t=e.splice();return 2===e.length&&Z(t)&&0===t.length}();q(r,{splice:function(e,t){return 0===arguments.length?[]:f.apply(this,arguments)}},!le);var ue=function(){var e={};return r.splice.call(e,0,0,1),1===e.length}();q(r,{splice:function(e,t){if(0===arguments.length)return[];var n=arguments;return this.length=w(N.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof t&&(n=H(arguments),n.length<2?G(n,this.length-e):n[1]=N.ToInteger(t)),f.apply(this,n)}},!ue);var ce=function(){var e=new n(1e5);return e[8]="x",e.splice(1,1),7===e.indexOf("x")}(),pe=function(){var e=256,t=[];return t[e]="a",t.splice(e+1,0,"b"),"a"===t[e]}();q(r,{splice:function(e,t){for(var n,r=N.ToObject(this),i=[],a=N.ToUint32(r.length),o=N.ToInteger(e),s=o<0?w(a+o,0):_(o,a),u=_(w(N.ToInteger(t),0),a-s),c=0;c<u;)n=l(s+c),F(r,n)&&(i[c]=r[n]),c+=1;var p,h=H(arguments,2),f=h.length;if(f<u){c=s;for(var d=a-u;c<d;)n=l(c+u),p=l(c+f),F(r,n)?r[p]=r[n]:delete r[p],c+=1;c=a;for(var m=a-u+f;c>m;)delete r[c-1],c-=1}else if(f>u)for(c=a-u;c>s;)n=l(c+u-1),p=l(c+f-1),F(r,n)?r[p]=r[n]:delete r[p],c-=1;c=s;for(var g=0;g<h.length;++g)r[c]=h[g],c+=1;return r.length=a-u+f,i}},!ce||!pe);var he,fe=r.join;try{he="1,2,3"!==Array.prototype.join.call("123",",")}catch(de){he=!0}he&&q(r,{join:function(e){var t="undefined"==typeof e?",":e;return fe.call(L(this)?W(this,""):this,t)}},he);var me="1,2"!==[1,2].join(void 0);me&&q(r,{join:function(e){var t="undefined"==typeof e?",":e;return fe.call(this,t)}},me);var ge=function(e){for(var t=N.ToObject(this),n=N.ToUint32(t.length),r=0;r<arguments.length;)t[n+r]=arguments[r],r+=1;return t.length=n+r,n+r},ye=function(){var e={},t=Array.prototype.push.call(e,void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!F(e,0)}();q(r,{push:function(e){return Z(this)?d.apply(this,arguments):ge.apply(this,arguments)}},ye);var ve=function(){var e=[],t=e.push(void 0);return 1!==t||1!==e.length||"undefined"!=typeof e[0]||!F(e,0)}();q(r,{push:ge},ve),q(r,{slice:function(e,t){var n=L(this)?W(this,""):this;return Y(n,arguments)}},ne);var be=function(){try{return[1,2].sort(null),[1,2].sort({}),!0}catch(e){}return!1}(),we=function(){try{return[1,2].sort(/a/),!1}catch(e){}return!0}(),_e=function(){try{return[1,2].sort(void 0),!0}catch(e){}return!1}();q(r,{sort:function(t){if("undefined"==typeof t)return X(this);if(!e(t))throw new TypeError("Array.prototype.sort callback must be a function");return X(this,t)}},be||!_e||!we);var xe=!K({toString:null},"toString"),Ae=K(function(){},"prototype"),Se=!F("x","0"),je=function(e){var t=e.constructor;return t&&t.prototype===e},Ee={$window:!0,$console:!0,$parent:!0,$self:!0,$frame:!0,$frames:!0,$frameElement:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$external:!0},Oe=function(){if("undefined"==typeof window)return!1;for(var e in window)try{!Ee["$"+e]&&F(window,e)&&null!==window[e]&&"object"==typeof window[e]&&je(window[e])}catch(t){return!0}return!1}(),ke=function(e){if("undefined"==typeof window||!Oe)return je(e);try{return je(e)}catch(t){return!1}},Te=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ce=Te.length,Ie=function(e){return"[object Arguments]"===V(e)},De=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&!Z(t)&&e(t.callee)},Le=Ie(arguments)?Ie:De;q(i,{keys:function(t){var n=e(t),r=Le(t),i=null!==t&&"object"==typeof t,a=i&&L(t);if(!i&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var o=[],s=Ae&&n;if(a&&Se||r)for(var u=0;u<t.length;++u)G(o,l(u));if(!r)for(var c in t)s&&"prototype"===c||!F(t,c)||G(o,l(c));if(xe)for(var p=ke(t),h=0;h<Ce;h++){var f=Te[h];p&&"constructor"===f||!F(t,f)||G(o,f)}return o}});var Me=i.keys&&function(){return 2===i.keys(arguments).length}(1,2),Re=i.keys&&function(){var e=i.keys(arguments);return 1!==arguments.length||1!==e.length||1!==e[0]}(1),Ue=i.keys;q(i,{keys:function(e){return Ue(Le(e)?H(e):e)}},!Me||Re);var Pe,qe,Be=0!==new Date((-0xc782b5b342b24)).getUTCMonth(),ze=new Date((-0x55d318d56a724)),Ne=new Date(14496624e5),$e="Mon, 01 Jan -45875 11:59:59 GMT"!==ze.toUTCString(),Fe=ze.getTimezoneOffset();Fe<-720?(Pe="Tue Jan 02 -45875"!==ze.toDateString(),qe=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ne.toString())):(Pe="Mon Jan 01 -45875"!==ze.toDateString(),qe=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ne.toString()));var Ve=v.bind(Date.prototype.getFullYear),He=v.bind(Date.prototype.getMonth),Ye=v.bind(Date.prototype.getDate),Je=v.bind(Date.prototype.getUTCFullYear),We=v.bind(Date.prototype.getUTCMonth),Qe=v.bind(Date.prototype.getUTCDate),Ge=v.bind(Date.prototype.getUTCDay),Ke=v.bind(Date.prototype.getUTCHours),Xe=v.bind(Date.prototype.getUTCMinutes),Ze=v.bind(Date.prototype.getUTCSeconds),et=v.bind(Date.prototype.getUTCMilliseconds),tt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rt=function(e,t){return Ye(new Date(t,e,0))};q(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this);return e<0&&He(this)>11?e+1:e},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this),t=He(this);return e<0&&t>11?0:t},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ve(this),t=He(this),n=Ye(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this);return e<0&&We(this)>11?e+1:e},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=We(this);return e<0&&t>11?0:t},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Je(this),t=We(this),n=Qe(this);if(e<0&&t>11){if(12===t)return n;var r=rt(0,e+1);return r-n+1}return n}},Be),q(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=Ge(this),t=Qe(this),n=We(this),r=Je(this),i=Ke(this),a=Xe(this),o=Ze(this);return tt[e]+", "+(t<10?"0"+t:t)+" "+nt[n]+" "+r+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"}},Be||$e),q(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear();return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r}},Be||Pe),(Be||qe)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var e=this.getDay(),t=this.getDate(),n=this.getMonth(),r=this.getFullYear(),i=this.getHours(),a=this.getMinutes(),o=this.getSeconds(),s=this.getTimezoneOffset(),l=Math.floor(Math.abs(s)/60),u=Math.floor(Math.abs(s)%60); +return tt[e]+" "+nt[n]+" "+(t<10?"0"+t:t)+" "+r+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"+(s>0?"-":"+")+(l<10?"0"+l:l)+(u<10?"0"+u:u)},P&&i.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var it=-621987552e5,at="-000001",ot=Date.prototype.toISOString&&new Date(it).toISOString().indexOf(at)===-1,st=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date((-1)).toISOString(),lt=v.bind(Date.prototype.getTime);q(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(lt(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var e=Je(this),t=We(this);e+=Math.floor(t/12),t=(t%12+12)%12;var n=[t+1,Qe(this),Ke(this),Xe(this),Ze(this)];e=(e<0?"-":e>9999?"+":"")+J("00000"+Math.abs(e),0<=e&&e<=9999?-4:-6);for(var r=0;r<n.length;++r)n[r]=J("00"+n[r],-2);return e+"-"+H(n,0,2).join("-")+"T"+H(n,2).join(":")+"."+J("000"+et(this),-3)+"Z"}},ot||st);var ut=function(){try{return Date.prototype.toJSON&&null===new Date(NaN).toJSON()&&new Date(it).toJSON().indexOf(at)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(e){return!1}}();ut||(Date.prototype.toJSON=function(t){var n=i(this),r=N.ToPrimitive(n);if("number"==typeof r&&!isFinite(r))return null;var a=n.toISOString;if(!e(a))throw new TypeError("toISOString property is not callable");return a.call(n)});var ct=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),pt=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z")),ht=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(ht||pt||!ct){var ft=Math.pow(2,31)-1,dt=z(new Date(1970,0,1,0,0,0,ft+1).getTime());Date=function(e){var t=function(n,r,i,a,o,s,u){var c,p=arguments.length;if(this instanceof e){var h=s,f=u;if(dt&&p>=7&&u>ft){var d=Math.floor(u/ft)*ft,m=Math.floor(d/1e3);h+=m,f-=1e3*m}c=1===p&&l(n)===n?new e(t.parse(n)):p>=7?new e(n,r,i,a,o,h,f):p>=6?new e(n,r,i,a,o,h):p>=5?new e(n,r,i,a,o):p>=4?new e(n,r,i,a):p>=3?new e(n,r,i):p>=2?new e(n,r):p>=1?new e(n instanceof e?+n:n):new e}else c=e.apply(this,arguments);return B(c)||q(c,{constructor:t},!0),c},n=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),r=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=function(e,t){var n=t>1?1:0;return r[t]+Math.floor((e-1969+n)/4)-Math.floor((e-1901+n)/100)+Math.floor((e-1601+n)/400)+365*(e-1970)},a=function(t){var n=0,r=t;if(dt&&r>ft){var i=Math.floor(r/ft)*ft,a=Math.floor(i/1e3);n+=a,r-=1e3*a}return c(new e(1970,0,1,0,0,n,r))};for(var o in e)F(e,o)&&(t[o]=e[o]);q(t,{now:e.now,UTC:e.UTC},!0),t.prototype=e.prototype,q(t.prototype,{constructor:t},!0);var s=function(t){var r=n.exec(t);if(r){var o,s=c(r[1]),l=c(r[2]||1)-1,u=c(r[3]||1)-1,p=c(r[4]||0),h=c(r[5]||0),f=c(r[6]||0),d=Math.floor(1e3*c(r[7]||0)),m=Boolean(r[4]&&!r[8]),g="-"===r[9]?1:-1,y=c(r[10]||0),v=c(r[11]||0),b=h>0||f>0||d>0;return p<(b?24:25)&&h<60&&f<60&&d<1e3&&l>-1&&l<12&&y<24&&v<60&&u>-1&&u<i(s,l+1)-i(s,l)&&(o=60*(24*(i(s,l)+u)+p+y*g),o=1e3*(60*(o+h+v*g)+f)+d,m&&(o=a(o)),-864e13<=o&&o<=864e13)?o:NaN}return e.parse.apply(this,arguments)};return q(t,{parse:s}),t}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var mt=p.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0)),gt={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(e,t){for(var n=-1,r=t;++n<gt.size;)r+=e*gt.data[n],gt.data[n]=r%gt.base,r=Math.floor(r/gt.base)},divide:function(e){for(var t=gt.size,n=0;--t>=0;)n+=gt.data[t],gt.data[t]=Math.floor(n/e),n=n%e*gt.base},numToString:function(){for(var e=gt.size,t="";--e>=0;)if(""!==t||0===e||0!==gt.data[e]){var n=l(gt.data[e]);""===t?t=n:t+=J("0000000",0,7-n.length)+n}return t},pow:function Ut(e,t,n){return 0===t?n:t%2===1?Ut(e,t-1,n*e):Ut(e*e,t/2,n)},log:function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}},yt=function(e){var t,n,r,i,a,o,s,u;if(t=c(e),t=z(t)?0:Math.floor(t),t<0||t>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=c(this),z(n))return"NaN";if(n<=-1e21||n>=1e21)return l(n);if(r="",n<0&&(r="-",n=-n),i="0",n>1e-21)if(a=gt.log(n*gt.pow(2,69,1))-69,o=a<0?n*gt.pow(2,-a,1):n/gt.pow(2,a,1),o*=4503599627370496,a=52-a,a>0){for(gt.multiply(0,o),s=t;s>=7;)gt.multiply(1e7,0),s-=7;for(gt.multiply(gt.pow(10,s,1),0),s=a-1;s>=23;)gt.divide(1<<23),s-=23;gt.divide(1<<s),gt.multiply(1,1),gt.divide(2),i=gt.numToString()}else gt.multiply(0,o),gt.multiply(1<<-a,0),i=gt.numToString()+J("0.00000000000000000000",2,2+t);return t>0?(u=i.length,i=u<=t?r+J("0.0000000000000000000",0,t-u+2)+i:r+J(i,0,u-t)+"."+J(i,u-t)):i=r+i,i};q(p,{toFixed:yt},mt);var vt=function(){try{return"1"===1..toPrecision(void 0)}catch(e){return!0}}(),bt=p.toPrecision;q(p,{toPrecision:function(e){return"undefined"==typeof e?bt.call(this):bt.call(this,e)}},vt),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var e="undefined"==typeof/()??/.exec("")[1],n=Math.pow(2,32)-1;u.split=function(r,i){var a=String(this);if("undefined"==typeof r&&0===i)return[];if(!t(r))return W(this,r,i);var o,s,l,u,c=[],p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),h=0,f=new RegExp(r.source,p+"g");e||(o=new RegExp("^"+f.source+"$(?!\\s)",p));var m="undefined"==typeof i?n:N.ToUint32(i);for(s=f.exec(a);s&&(l=s.index+s[0].length,!(l>h&&(G(c,J(a,h,s.index)),!e&&s.length>1&&s[0].replace(o,function(){for(var e=1;e<arguments.length-2;e++)"undefined"==typeof arguments[e]&&(s[e]=void 0)}),s.length>1&&s.index<a.length&&d.apply(c,H(s,1)),u=s[0].length,h=l,c.length>=m)));)f.lastIndex===s.index&&f.lastIndex++,s=f.exec(a);return h===a.length?!u&&f.test("")||G(c,""):G(c,J(a,h)),c.length>m?H(c,0,m):c}}():"0".split(void 0,0).length&&(u.split=function(e,t){return"undefined"==typeof e&&0===t?[]:W(this,e,t)});var wt=u.replace,_t=function(){var e=[];return"x".replace(/x(.)?/g,function(t,n){G(e,n)}),1===e.length&&"undefined"==typeof e[0]}();_t||(u.replace=function(n,r){var i=e(r),a=t(n)&&/\)[*?]/.test(n.source);if(i&&a){var o=function(e){var t=arguments.length,i=n.lastIndex;n.lastIndex=0;var a=n.exec(e)||[];return n.lastIndex=i,G(a,arguments[t-2],arguments[t-1]),r.apply(this,a)};return wt.call(this,n,o)}return wt.call(this,n,r)});var xt=u.substr,At="".substr&&"b"!=="0b".substr(-1);q(u,{substr:function(e,t){var n=e;return e<0&&(n=w(this.length+e,0)),xt.call(this,n,t)}},At);var St="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",jt="​",Et="["+St+"]",Ot=new RegExp("^"+Et+Et+"*"),kt=new RegExp(Et+Et+"*$"),Tt=u.trim&&(St.trim()||!jt.trim());q(u,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return l(this).replace(Ot,"").replace(kt,"")}},Tt);var Ct=v.bind(String.prototype.trim),It=u.lastIndexOf&&"abcあい".lastIndexOf("あい",2)!==-1;q(u,{lastIndexOf:function(e){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var t=l(this),n=l(e),r=arguments.length>1?c(arguments[1]):NaN,i=z(r)?1/0:N.ToInteger(r),a=_(w(i,0),t.length),o=n.length,s=a+o;s>0;){s=w(0,s-o);var u=Q(J(t,s,a+o),n);if(u!==-1)return s+u}return-1}},It);var Dt=u.lastIndexOf;if(q(u,{lastIndexOf:function(e){return Dt.apply(this,arguments)}},1!==u.lastIndexOf.length),8===parseInt(St+"08")&&22===parseInt(St+"0x16")||(parseInt=function(e){var t=/^[\-+]?0[xX]/;return function(n,r){var i=Ct(String(n)),a=c(r)||(t.test(i)?16:10);return e(i,a)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(e){return function(t){var n=Ct(String(t)),r=e(n);return 0===r&&"-"===J(n,0,1)?-0:r}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Lt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var e=this.name;"undefined"==typeof e?e="Error":"string"!=typeof e&&(e=l(e));var t=this.message;return"undefined"==typeof t?t="":"string"!=typeof t&&(t=l(t)),e?t?e+": "+t:e:t};Error.prototype.toString=Lt}if(P){var Mt=function(e,t){if(K(e,t)){var n=Object.getOwnPropertyDescriptor(e,t);n.configurable&&(n.enumerable=!1,Object.defineProperty(e,t,n))}};Mt(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Mt(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Rt=function(){var e="/"+this.source+"/";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),e};RegExp.prototype.toString=Rt}}),Handlebars.registerHelper("sanitize",function(e){var t;return void 0===e?"":(t=sanitizeHtml(e,{allowedTags:["div","span","b","i","em","strong","a","br","table","tbody","tr","th","td"],allowedAttributes:{div:["class"],span:["class"],table:["class"],td:["class"],th:["colspan"],a:["href"]}}),new Handlebars.SafeString(t))}),Handlebars.registerHelper("renderTextParam",function(e){var t,n="text",r="",i=e.type||e.schema&&e.schema.type||"",a="array"===i.toLowerCase()||e.allowMultiple,o=a&&Array.isArray(e["default"])?e["default"].join("\n"):e["default"],s=Handlebars.Utils.escapeExpression(e.name),l=Handlebars.Utils.escapeExpression(e.valueId);i=Handlebars.Utils.escapeExpression(i);var u=Object.keys(e).filter(function(e){return null!==e.match(/^X-data-/i)}).reduce(function(t,n){return t+=" "+n.substring(2,n.length)+"='"+e[n]+"'"},"");if(e.format&&"password"===e.format&&(n="password"),l&&(r=" id='"+l+"'"),o=o?sanitizeHtml(o):"",a)t="<textarea class='body-textarea"+(e.required?" required":"")+"' name='"+s+"'"+r+u,t+=" placeholder='Provide multiple values in new lines"+(e.required?" (at least one required).":".")+"'>",t+=o+"</textarea>";else{var c="parameter";e.required&&(c+=" required"),t="<input class='"+c+"' minlength='"+(e.required?1:0)+"'",t+=" name='"+s+"' placeholder='"+(e.required?"(required)":"")+"'"+r+u,t+=" type='"+n+"' value='"+o+"'/>"}return new Handlebars.SafeString(t)}),Handlebars.registerHelper("ifCond",function(e,t,n,r){switch(t){case"==":return e==n?r.fn(this):r.inverse(this);case"===":return e===n?r.fn(this):r.inverse(this);case"<":return e<n?r.fn(this):r.inverse(this);case"<=":return e<=n?r.fn(this):r.inverse(this);case">":return e>n?r.fn(this):r.inverse(this);case">=":return e>=n?r.fn(this):r.inverse(this);case"&&":return e&&n?r.fn(this):r.inverse(this);case"||":return e||n?r.fn(this):r.inverse(this);default:return r.inverse(this)}}),Handlebars.registerHelper("escape",function(e){var t=Handlebars.Utils.escapeExpression(e);return new Handlebars.SafeString(t)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.sanitizeHtml=e()}}(function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){function r(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function i(e,t){return{}.hasOwnProperty.call(e,t)}function a(e,t,n){function c(e,t){var n=this;this.tag=e,this.attribs=t||{},this.tagPosition=d.length,this.text="",this.updateParentNodeText=function(){if(x.length){var e=x[x.length-1];e.text+=n.text}}}function p(e){return"string"!=typeof e&&(e+=""),e.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;")}function h(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!1;var a=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?t.allowedSchemesByTag[e].indexOf(a)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(a)===-1}function f(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return t.indexOf(e)!==-1}).join(" ")):e}var d="";t?(t=s(a.defaults,t),t.parser?t.parser=s(u,t.parser):t.parser=u):(t=a.defaults,t.parser=u);var m,g,y=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(m={},g={},r(t.allowedAttributes,function(e,t){m[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(l(e).replace(/\\\*/g,".*")):m[t].push(e)}),g[t]=new RegExp("^("+n.join("|")+")$")}));var v={};r(t.allowedClasses,function(e,t){m&&(i(m,t)||(m[t]=[]),m[t].push("class")),v[t]=e});var b,w={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=a.simpleTransform(e)),"*"===t?b=n:w[t]=n});var _=0,x=[],A={},S={},j=!1,E=0,O=new o.Parser({onopentag:function(e,n){if(j)return void E++;var a=new c(e,n);x.push(a);var o,s=!1,l=!!a.text;i(w,e)&&(o=w[e](e,n),a.attribs=n=o.attribs,void 0!==o.text&&(a.innerText=o.text),e!==o.tagName&&(a.name=e=o.tagName,S[_]=o.tagName)),b&&(o=b(e,n),a.attribs=n=o.attribs,e!==o.tagName&&(a.name=e=o.tagName,S[_]=o.tagName)),t.allowedTags&&t.allowedTags.indexOf(e)===-1&&(s=!0,y.indexOf(e)!==-1&&(j=!0,E=1),A[_]=!0),_++,s||(d+="<"+e,(!m||i(m,e)||m["*"])&&r(n,function(t,n){if(!m||i(m,e)&&m[e].indexOf(n)!==-1||m["*"]&&m["*"].indexOf(n)!==-1||i(g,e)&&g[e].test(n)||g["*"]&&g["*"].test(n)){if(("href"===n||"src"===n)&&h(e,t))return void delete a.attribs[n];if("class"===n&&(t=f(t,v[e]),!t.length))return void delete a.attribs[n];d+=" "+n,t.length&&(d+='="'+p(t)+'"')}else delete a.attribs[n]}),t.selfClosing.indexOf(e)!==-1?d+=" />":(d+=">",!a.innerText||l||t.textFilter||(d+=a.innerText)))},ontext:function(e){if(!j){var n,r=x[x.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)d+=e;else{var i=p(e);d+=t.textFilter?t.textFilter(i):i}if(x.length){var a=x[x.length-1];a.text+=e}}},onclosetag:function(e){if(j){if(E--,E)return;j=!1}var n=x.pop();if(n){if(j=!1,_--,A[_])return delete A[_],void n.updateParentNodeText();if(S[_]&&(e=S[_],delete S[_]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(d=d.substr(0,n.tagPosition));n.updateParentNodeText(),t.selfClosing.indexOf(e)===-1&&(d+="</"+e+">")}}},t.parser);return O.write(e),O.end(),d}var o=e("htmlparser2"),s=e("xtend"),l=e("regexp-quote");t.exports=a;var u={decodeEntities:!0};a.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}},a.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var a;if(n)for(a in t)i[a]=t[a];else i=t;return{tagName:e,attribs:i}}}},{htmlparser2:36,"regexp-quote":54,xtend:58}],2:[function(e,t,n){"use strict";function r(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)l[t]=e[t],u[e.charCodeAt(t)]=t;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function i(e){var t,n,r,i,a,o,s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new c(3*s/4-a),r=a>0?s-4:s;var l=0;for(t=0,n=0;t<r;t+=4,n+=3)i=u[e.charCodeAt(t)]<<18|u[e.charCodeAt(t+1)]<<12|u[e.charCodeAt(t+2)]<<6|u[e.charCodeAt(t+3)],o[l++]=i>>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===a?(i=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===a&&(i=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(a(r));return i.join("")}function s(e){for(var t,n=e.length,r=n%3,i="",a=[],s=16383,u=0,c=n-r;u<c;u+=s)a.push(o(e,u,u+s>c?c:u+s));return 1===r?(t=e[n-1],i+=l[t>>2],i+=l[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=l[t>>10],i+=l[t>>4&63],i+=l[t<<2&63],i+="="),a.push(i),a.join("")}n.toByteArray=i,n.fromByteArray=s;var l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){(function(t){"use strict";var r=e("buffer"),i=r.Buffer,a=r.SlowBuffer,o=r.kMaxLength||2147483647;n.alloc=function(e,t,n){if("function"==typeof i.alloc)return i.alloc(e,t,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var r=n,a=t;void 0===a&&(r=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var l=new i(a,r),u=l.length,c=-1;++c<e;)s[c]=l[c%u];else s.fill(a);return s},n.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");return new i(e)},n.from=function(e,n,r){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new i(e);"undefined"==typeof a&&(a=0);var o=r;if("undefined"==typeof o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},n.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:5}],5:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?f(e,t,n,r):"string"==typeof t?p(e,t,n):d(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}function c(e,t){if(l(t),e=a(e,t<0?0:0|m(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n);e=a(e,r);var i=e.write(t,n);return i!==r&&(e=e.slice(0,i)),e}function h(e,t){var n=t.length<0?0:0|m(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=h(e,t),e}function d(e,t){if(o.isBuffer(t)){var n=0|m(t.length);return e=a(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||G(t.length)?a(e,0):h(e,t);if("Buffer"===t.type&&Z(t.data))return h(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function y(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t=255&t,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}var u;if(i){var c=-1;for(u=n;u<s;u++)if(a(e,u)===a(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===l)return c*o}else c!==-1&&(u-=u-c),c=-1}else for(n+l>s&&(n=s-l),u=n;u>=0;u--){for(var p=!0,h=0;h<l;h++)if(a(e,u+h)!==a(t,h)){p=!1;break}if(p)return u}return-1}function x(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function A(e,t,n,r){return Q(H(t,e.length-n),e,n,r)}function S(e,t,n,r){return Q(Y(t),e,n,r)}function j(e,t,n,r){return S(e,t,n,r)}function E(e,t,n,r){return Q(W(t),e,n,r)}function O(e,t,n,r){return Q(J(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,p;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&p<1114112&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return C(r)}function C(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ee));return n}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function D(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function R(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function q(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function $(e){if(e=F(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function Y(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function J(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function W(e){return K.toByteArray($(e))}function Q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e){return e!==e}var K=e("base64-js"),X=e("ieee754"),Z=e("isarray");n.Buffer=o,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return u(null,e,t,n)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):v.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,l=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),p=0;p<l;++p)if(u[p]!==c[p]){a=u[p],s=c[p];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},o.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return A(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return j(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n), +t<e&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=o.prototype;else{var i=t-e;r=new o(i,(void 0));for(var a=0;a<i;++a)r[a]=this[a+e]}return r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),X.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),X.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),X.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),X.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;U(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=255&e;++o<n&&(a*=256);)this[t+o]=e/a&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;U(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):q(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);U(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):q(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):q(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=o.isBuffer(e)?e:H(new o(e,r).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:37,isarray:40}],6:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function l(e){return"symbol"==typeof e}function u(e){return void 0===e}function c(e){return"[object RegExp]"===g(e)}function p(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===g(e)}function f(e){return"[object Error]"===g(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function g(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=a,n.isNumber=o,n.isString=s,n.isSymbol=l,n.isUndefined=u,n.isRegExp=c,n.isObject=p,n.isDate=h,n.isError=f,n.isFunction=d,n.isPrimitive=m,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":39}],7:[function(e,t,n){function r(e,t){if(e){var n,r="";for(var i in e)n=e[i],r&&(r+=" "),r+=!n&&p[i]?i:i+'="'+(t.decodeEntities?c.encodeXML(n):n)+'"';return r}}function i(e,t){"svg"===e.name&&(t={decodeEntities:t.decodeEntities,xmlMode:!0});var n="<"+e.name,i=r(e.attribs,t);return i&&(n+=" "+i),!t.xmlMode||e.children&&0!==e.children.length?(n+=">",e.children&&(n+=d(e.children,t)),f[e.name]&&!t.xmlMode||(n+="</"+e.name+">")):n+="/>",n}function a(e){return"<"+e.data+">"}function o(e,t){var n=e.data||"";return!t.decodeEntities||e.parent&&e.parent.name in h||(n=c.encodeXML(n)),n}function s(e){return"<![CDATA["+e.children[0].data+"]]>"}function l(e){return"<!--"+e.data+"-->"}var u=e("domelementtype"),c=e("entities"),p={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,"default":!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},h={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},f={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=t.exports=function(e,t){Array.isArray(e)||e.cheerio||(e=[e]),t=t||{};for(var n="",r=0;r<e.length;r++){var c=e[r];n+="root"===c.type?d(c.children,t):u.isTag(c)?i(c,t):c.type===u.Directive?a(c):c.type===u.Comment?l(c):c.type===u.CDATA?s(c):o(c,t)}return n}},{domelementtype:8,entities:20}],8:[function(e,t,n){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},{}],9:[function(e,t,n){t.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},{}],10:[function(e,t,n){function r(e,t,n){"object"==typeof e?(n=t,t=e,e=null):"function"==typeof t&&(n=t,t=l),this._callback=e,this._options=t||l,this._elementCB=n,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=e("domelementtype"),a=/\s+/g,o=e("./lib/node"),s=e("./lib/element"),l={normalizeWhitespace:!1,withStartIndices:!1};r.prototype.onparserinit=function(e){this._parser=e},r.prototype.onreset=function(){r.call(this,this._callback,this._options,this._elementCB)},r.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},r.prototype._handleCallback=r.prototype.onerror=function(e){if("function"==typeof this._callback)this._callback(e,this.dom);else if(e)throw e},r.prototype.onclosetag=function(){var e=this._tagStack.pop();this._elementCB&&this._elementCB(e)},r.prototype._addDomElement=function(e){var t=this._tagStack[this._tagStack.length-1],n=t?t.children:this.dom,r=n[n.length-1];e.next=null,this._options.withStartIndices&&(e.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(e.__proto__="tag"===e.type?s:o),r?(e.prev=r,r.next=e):e.prev=null,n.push(e),e.parent=t||null},r.prototype.onopentag=function(e,t){var n={type:"script"===e?i.Script:"style"===e?i.Style:i.Tag,name:e,attribs:t,children:[]};this._addDomElement(n),this._tagStack.push(n)},r.prototype.ontext=function(e){var t,n=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(t=this.dom[this.dom.length-1]).type===i.Text?n?t.data=(t.data+e).replace(a," "):t.data+=e:this._tagStack.length&&(t=this._tagStack[this._tagStack.length-1])&&(t=t.children[t.children.length-1])&&t.type===i.Text?n?t.data=(t.data+e).replace(a," "):t.data+=e:(n&&(e=e.replace(a," ")),this._addDomElement({data:e,type:i.Text}))},r.prototype.oncomment=function(e){var t=this._tagStack[this._tagStack.length-1];if(t&&t.type===i.Comment)return void(t.data+=e);var n={data:e,type:i.Comment};this._addDomElement(n),this._tagStack.push(n)},r.prototype.oncdatastart=function(){var e={children:[{data:"",type:i.Text}],type:i.CDATA};this._addDomElement(e),this._tagStack.push(e)},r.prototype.oncommentend=r.prototype.oncdataend=function(){this._tagStack.pop()},r.prototype.onprocessinginstruction=function(e,t){this._addDomElement({name:e,data:t,type:i.Directive})},t.exports=r},{"./lib/element":11,"./lib/node":12,domelementtype:9}],11:[function(e,t,n){var r=e("./node"),i=t.exports=Object.create(r),a={tagName:"name"};Object.keys(a).forEach(function(e){var t=a[e];Object.defineProperty(i,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},{"./node":12}],12:[function(e,t,n){var r=t.exports={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return a[this.type]||a.element}},i={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},a={element:1,text:3,cdata:4,comment:8};Object.keys(i).forEach(function(e){var t=i[e];Object.defineProperty(r,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},{}],13:[function(e,t,n){var r=t.exports;[e("./lib/stringify"),e("./lib/traversal"),e("./lib/manipulation"),e("./lib/querying"),e("./lib/legacy"),e("./lib/helpers")].forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t].bind(r)})})},{"./lib/helpers":14,"./lib/legacy":15,"./lib/manipulation":16,"./lib/querying":17,"./lib/stringify":18,"./lib/traversal":19}],14:[function(e,t,n){n.removeSubsets=function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=n.parent}r&&(e[i]=t)}return e};var r={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},i=n.compareDocumentPosition=function(e,t){var n,i,a,o,s,l,u=[],c=[];if(e===t)return 0;for(n=e;n;)u.unshift(n),n=n.parent;for(n=t;n;)c.unshift(n),n=n.parent;for(l=0;u[l]===c[l];)l++;return 0===l?r.DISCONNECTED:(i=u[l-1],a=i.children,o=u[l],s=c[l],a.indexOf(o)>a.indexOf(s)?i===t?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:i===e?r.PRECEDING|r.CONTAINS:r.PRECEDING)};n.uniqueSort=function(e){var t,n,a=e.length;for(e=e.slice();--a>-1;)t=e[a],n=e.indexOf(t),n>-1&&n<a&&e.splice(a,1);return e.sort(function(e,t){var n=i(e,t);return n&r.PRECEDING?-1:n&r.FOLLOWING?1:0}),e}},{}],15:[function(e,t,n){function r(e,t){return"function"==typeof t?function(n){return n.attribs&&t(n.attribs[e])}:function(n){return n.attribs&&n.attribs[e]===t}}function i(e,t){return function(n){return e(n)||t(n)}}var a=e("domelementtype"),o=n.isTag=a.isTag;n.testElement=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if("tag_name"===n){if(!o(t)||!e.tag_name(t.name))return!1}else if("tag_type"===n){if(!e.tag_type(t.type))return!1}else if("tag_contains"===n){if(o(t)||!e.tag_contains(t.data))return!1}else if(!t.attribs||!e[n](t.attribs[n]))return!1}else;return!0};var s={tag_name:function(e){return"function"==typeof e?function(t){return o(t)&&e(t.name)}:"*"===e?o:function(t){return o(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return!o(t)&&e(t.data)}:function(t){return!o(t)&&t.data===e}}};n.getElements=function(e,t,n,a){var o=Object.keys(e).map(function(t){var n=e[t];return t in s?s[t](n):r(t,n)});return 0===o.length?[]:this.filter(o.reduce(i),t,n,a)},n.getElementById=function(e,t,n){return Array.isArray(t)||(t=[t]),this.findOne(r("id",e),t,n!==!1)},n.getElementsByTagName=function(e,t,n,r){return this.filter(s.tag_name(e),t,n,r)},n.getElementsByTagType=function(e,t,n,r){return this.filter(s.tag_type(e),t,n,r)}},{domelementtype:9}],16:[function(e,t,n){n.removeElement=function(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}},n.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t}},n.appendChild=function(e,t){if(t.parent=e,1!==e.children.push(t)){var n=e.children[e.children.length-2];n.next=t,t.prev=n,t.next=null}},n.append=function(e,t){var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)},n.prepend=function(e,t){var n=e.parent;if(n){var r=n.children;r.splice(r.lastIndexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},{}],17:[function(e,t,n){function r(e,t,n,r){return Array.isArray(t)||(t=[t]),"number"==typeof r&&isFinite(r)||(r=1/0),i(e,t,n!==!1,r)}function i(e,t,n,r){for(var a,o=[],s=0,l=t.length;s<l&&!(e(t[s])&&(o.push(t[s]),--r<=0))&&(a=t[s].children,!(n&&a&&a.length>0&&(a=i(e,a,n,r),o=o.concat(a),r-=a.length,r<=0)));s++);return o}function a(e,t){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return t[n];return null}function o(e,t){for(var n=null,r=0,i=t.length;r<i&&!n;r++)u(t[r])&&(e(t[r])?n=t[r]:t[r].children.length>0&&(n=o(e,t[r].children)));return n}function s(e,t){for(var n=0,r=t.length;n<r;n++)if(u(t[n])&&(e(t[n])||t[n].children.length>0&&s(e,t[n].children)))return!0;return!1}function l(e,t){for(var n=[],r=0,i=t.length;r<i;r++)u(t[r])&&(e(t[r])&&n.push(t[r]),t[r].children.length>0&&(n=n.concat(l(e,t[r].children))));return n}var u=e("domelementtype").isTag;t.exports={filter:r,find:i,findOneChild:a,findOne:o,existsOne:s,findAll:l}},{domelementtype:9}],18:[function(e,t,n){function r(e,t){return e.children?e.children.map(function(e){return o(e,t)}).join(""):""}function i(e){return Array.isArray(e)?e.map(i).join(""):s(e)||e.type===a.CDATA?i(e.children):e.type===a.Text?e.data:""}var a=e("domelementtype"),o=e("dom-serializer"),s=a.isTag;t.exports={getInnerHTML:r,getOuterHTML:o,getText:i}},{"dom-serializer":7,domelementtype:9}],19:[function(e,t,n){var r=n.getChildren=function(e){return e.children},i=n.getParent=function(e){return e.parent};n.getSiblings=function(e){var t=i(e);return t?r(t):[e]},n.getAttributeValue=function(e,t){return e.attribs&&e.attribs[t]},n.hasAttrib=function(e,t){return!!e.attribs&&hasOwnProperty.call(e.attribs,t)},n.getName=function(e){return e.name}},{}],20:[function(e,t,n){var r=e("./lib/encode.js"),i=e("./lib/decode.js");n.decode=function(e,t){return(!t||t<=0?i.XML:i.HTML)(e)},n.decodeStrict=function(e,t){return(!t||t<=0?i.XML:i.HTMLStrict)(e)},n.encode=function(e,t){return(!t||t<=0?r.XML:r.HTML)(e)},n.encodeXML=r.XML,n.encodeHTML4=n.encodeHTML5=n.encodeHTML=r.HTML,n.decodeXML=n.decodeXMLStrict=i.XML,n.decodeHTML4=n.decodeHTML5=n.decodeHTML=i.HTML,n.decodeHTML4Strict=n.decodeHTML5Strict=n.decodeHTMLStrict=i.HTMLStrict,n.escape=r.escape},{"./lib/decode.js":21,"./lib/encode.js":23}],21:[function(e,t,n){function r(e){var t=Object.keys(e).join("|"),n=a(e);t+="|#[xX][\\da-fA-F]+|#\\d+";var r=new RegExp("&(?:"+t+");","g");return function(e){return String(e).replace(r,n)}}function i(e,t){return e<t?1:-1}function a(e){return function(t){return"#"===t.charAt(1)?u("X"===t.charAt(2)||"x"===t.charAt(2)?parseInt(t.substr(3),16):parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}var o=e("../maps/entities.json"),s=e("../maps/legacy.json"),l=e("../maps/xml.json"),u=e("./decode_codepoint.js"),c=r(l),p=r(o),h=function(){function e(e){return";"!==e.substr(-1)&&(e+=";"),c(e)}for(var t=Object.keys(s).sort(i),n=Object.keys(o).sort(i),r=0,l=0;r<n.length;r++)t[l]===n[r]?(n[r]+=";?",l++):n[r]+=";";var u=new RegExp("&(?:"+n.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),c=a(o);return function(t){return String(t).replace(u,e)}}();t.exports={XML:c,HTML:h,HTMLStrict:p}},{"../maps/entities.json":25,"../maps/legacy.json":26,"../maps/xml.json":27,"./decode_codepoint.js":22}],22:[function(e,t,n){function r(e){if(e>=55296&&e<=57343||e>1114111)return"�";e in i&&(e=i[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}var i=e("../maps/decode.json");t.exports=r},{"../maps/decode.json":24}],23:[function(e,t,n){function r(e){return Object.keys(e).sort().reduce(function(t,n){return t[e[n]]="&"+n+";",t},{})}function i(e){var t=[],n=[];return Object.keys(e).forEach(function(e){1===e.length?t.push("\\"+e):n.push(e)}),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}function a(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function o(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=1024*(t-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}function s(e,t){function n(t){return e[t]}return function(e){return e.replace(t,n).replace(d,o).replace(f,a)}}function l(e){return e.replace(m,a).replace(d,o).replace(f,a)}var u=r(e("../maps/xml.json")),c=i(u);n.XML=s(u,c);var p=r(e("../maps/entities.json")),h=i(p);n.HTML=s(p,h);var f=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,m=i(u);n.escape=l},{"../maps/entities.json":25,"../maps/xml.json":27}],24:[function(e,t,n){t.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],25:[function(e,t,n){t.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫", +lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],26:[function(e,t,n){t.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],27:[function(e,t,n){t.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],28:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(n=this._events[e],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;l<r;l++)u[l].apply(this,a);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],29:[function(e,t,n){function r(e){this._cbs=e||{},this.events=[]}t.exports=r;var i=e("./").EVENTS;Object.keys(i).forEach(function(e){if(0===i[e])e="on"+e,r.prototype[e]=function(){this.events.push([e]),this._cbs[e]&&this._cbs[e]()};else if(1===i[e])e="on"+e,r.prototype[e]=function(t){this.events.push([e,t]),this._cbs[e]&&this._cbs[e](t)};else{if(2!==i[e])throw Error("wrong number of arguments");e="on"+e,r.prototype[e]=function(t,n){this.events.push([e,t,n]),this._cbs[e]&&this._cbs[e](t,n)}}}),r.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},r.prototype.restart=function(){this._cbs.onreset&&this._cbs.onreset();for(var e=0,t=this.events.length;e<t;e++)if(this._cbs[this.events[e][0]]){var n=this.events[e].length;1===n?this._cbs[this.events[e][0]]():2===n?this._cbs[this.events[e][0]](this.events[e][1]):this._cbs[this.events[e][0]](this.events[e][1],this.events[e][2])}}},{"./":36}],30:[function(e,t,n){function r(e,t){this.init(e,t)}function i(e,t){return c.getElementsByTagName(e,t,!0)}function a(e,t){return c.getElementsByTagName(e,t,!0,1)[0]}function o(e,t,n){return c.getText(c.getElementsByTagName(e,t,n,1)).trim()}function s(e,t,n,r,i){var a=o(n,r,i);a&&(e[t]=a)}var l=e("./index.js"),u=l.DomHandler,c=l.DomUtils;e("inherits")(r,u),r.prototype.init=u;var p=function(e){return"rss"===e||"feed"===e||"rdf:RDF"===e};r.prototype.onend=function(){var e,t,n={},r=a(p,this.dom);r&&("feed"===r.name?(t=r.children,n.type="atom",s(n,"id","id",t),s(n,"title","title",t),(e=a("link",t))&&(e=e.attribs)&&(e=e.href)&&(n.link=e),s(n,"description","subtitle",t),(e=o("updated",t))&&(n.updated=new Date(e)),s(n,"author","email",t,!0),n.items=i("entry",t).map(function(e){var t,n={};return e=e.children,s(n,"id","id",e),s(n,"title","title",e),(t=a("link",e))&&(t=t.attribs)&&(t=t.href)&&(n.link=t),(t=o("summary",e)||o("content",e))&&(n.description=t),(t=o("updated",e))&&(n.pubDate=new Date(t)),n})):(t=a("channel",r.children).children,n.type=r.name.substr(0,3),n.id="",s(n,"title","title",t),s(n,"link","link",t),s(n,"description","description",t),(e=o("lastBuildDate",t))&&(n.updated=new Date(e)),s(n,"author","managingEditor",t,!0),n.items=i("item",r.children).map(function(e){var t,n={};return e=e.children,s(n,"id","guid",e),s(n,"title","title",e),s(n,"link","link",e),s(n,"description","description",e),(t=o("pubDate",e))&&(n.pubDate=new Date(t)),n}))),this.dom=n,u.prototype._handleCallback.call(this,r?null:Error("couldn't find root of feed"))},t.exports=r},{"./index.js":36,inherits:38}],31:[function(e,t,n){function r(e,t){this._options=t||{},this._cbs=e||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=e("./Tokenizer.js"),a={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},o={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:a,input:a,output:a,button:a,datalist:a,textarea:a,option:{option:!0},optgroup:{optgroup:!0}},s={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},l=/\s|\//;e("inherits")(r,e("events").EventEmitter),r.prototype._updatePosition=function(e){null===this.endIndex?this._tokenizer._sectionStart<=e?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},r.prototype.ontext=function(e){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(e)},r.prototype.onopentagname=function(e){if(this._lowerCaseTagNames&&(e=e.toLowerCase()),this._tagname=e,!this._options.xmlMode&&e in o)for(var t;(t=this._stack[this._stack.length-1])in o[e];this.onclosetag(t));!this._options.xmlMode&&e in s||this._stack.push(e),this._cbs.onopentagname&&this._cbs.onopentagname(e),this._cbs.onopentag&&(this._attribs={})},r.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in s&&this._cbs.onclosetag(this._tagname),this._tagname=""},r.prototype.onclosetag=function(e){if(this._updatePosition(1),this._lowerCaseTagNames&&(e=e.toLowerCase()),!this._stack.length||e in s&&!this._options.xmlMode)this._options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this._closeCurrentTag());else{var t=this._stack.lastIndexOf(e);if(t!==-1)if(this._cbs.onclosetag)for(t=this._stack.length-t;t--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=t;else"p"!==e||this._options.xmlMode||(this.onopentagname(e),this._closeCurrentTag())}},r.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},r.prototype._closeCurrentTag=function(){var e=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===e&&(this._cbs.onclosetag&&this._cbs.onclosetag(e),this._stack.pop())},r.prototype.onattribname=function(e){this._lowerCaseAttributeNames&&(e=e.toLowerCase()),this._attribname=e},r.prototype.onattribdata=function(e){this._attribvalue+=e},r.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},r.prototype._getInstructionName=function(e){var t=e.search(l),n=t<0?e:e.substr(0,t);return this._lowerCaseTagNames&&(n=n.toLowerCase()),n},r.prototype.ondeclaration=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("!"+t,"!"+e)}},r.prototype.onprocessinginstruction=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("?"+t,"?"+e)}},r.prototype.oncomment=function(e){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(e),this._cbs.oncommentend&&this._cbs.oncommentend()},r.prototype.oncdata=function(e){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(e),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+e+"]]")},r.prototype.onerror=function(e){this._cbs.onerror&&this._cbs.onerror(e)},r.prototype.onend=function(){if(this._cbs.onclosetag)for(var e=this._stack.length;e>0;this._cbs.onclosetag(this._stack[--e]));this._cbs.onend&&this._cbs.onend()},r.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},r.prototype.parseComplete=function(e){this.reset(),this.end(e)},r.prototype.write=function(e){this._tokenizer.write(e)},r.prototype.end=function(e){this._tokenizer.end(e)},r.prototype.pause=function(){this._tokenizer.pause()},r.prototype.resume=function(){this._tokenizer.resume()},r.prototype.parseChunk=r.prototype.write,r.prototype.done=r.prototype.end,t.exports=r},{"./Tokenizer.js":34,events:28,inherits:38}],32:[function(e,t,n){function r(e){this._cbs=e||{}}t.exports=r;var i=e("./").EVENTS;Object.keys(i).forEach(function(e){if(0===i[e])e="on"+e,r.prototype[e]=function(){this._cbs[e]&&this._cbs[e]()};else if(1===i[e])e="on"+e,r.prototype[e]=function(t){this._cbs[e]&&this._cbs[e](t)};else{if(2!==i[e])throw Error("wrong number of arguments");e="on"+e,r.prototype[e]=function(t,n){this._cbs[e]&&this._cbs[e](t,n)}}})},{"./":36}],33:[function(e,t,n){function r(e){a.call(this,new i(this),e)}function i(e){this.scope=e}t.exports=r;var a=e("./WritableStream.js");e("inherits")(r,a),r.prototype.readable=!0;var o=e("../").EVENTS;Object.keys(o).forEach(function(e){if(0===o[e])i.prototype["on"+e]=function(){this.scope.emit(e)};else if(1===o[e])i.prototype["on"+e]=function(t){this.scope.emit(e,t)};else{if(2!==o[e])throw Error("wrong number of arguments!");i.prototype["on"+e]=function(t,n){this.scope.emit(e,t,n)}}})},{"../":36,"./WritableStream.js":35,inherits:38}],34:[function(e,t,n){function r(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function i(e,t){return function(n){n===e&&(this._state=t)}}function a(e,t,n){var r=e.toLowerCase();return e===r?function(e){e===r?this._state=t:(this._state=n,this._index--)}:function(i){i===r||i===e?this._state=t:(this._state=n,this._index--)}}function o(e,t){var n=e.toLowerCase();return function(r){r===n||r===e?this._state=t:(this._state=m,this._index--)}}function s(e,t){this._state=f,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=f,this._special=me,this._cbs=t,this._running=!0,this._ended=!1,this._xmlMode=!(!e||!e.xmlMode),this._decodeEntities=!(!e||!e.decodeEntities)}t.exports=s;var l=e("entities/lib/decode_codepoint.js"),u=e("entities/maps/entities.json"),c=e("entities/maps/legacy.json"),p=e("entities/maps/xml.json"),h=0,f=h++,d=h++,m=h++,g=h++,y=h++,v=h++,b=h++,w=h++,_=h++,x=h++,A=h++,S=h++,j=h++,E=h++,O=h++,k=h++,T=h++,C=h++,I=h++,D=h++,L=h++,M=h++,R=h++,U=h++,P=h++,q=h++,B=h++,z=h++,N=h++,$=h++,F=h++,V=h++,H=h++,Y=h++,J=h++,W=h++,Q=h++,G=h++,K=h++,X=h++,Z=h++,ee=h++,te=h++,ne=h++,re=h++,ie=h++,ae=h++,oe=h++,se=h++,le=h++,ue=h++,ce=h++,pe=h++,he=h++,fe=h++,de=0,me=de++,ge=de++,ye=de++;s.prototype._stateText=function(e){"<"===e?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===me&&"&"===e&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=f,this._state=ue,this._sectionStart=this._index)},s.prototype._stateBeforeTagName=function(e){"/"===e?this._state=y:"<"===e?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===e||this._special!==me||r(e)?this._state=f:"!"===e?(this._state=O,this._sectionStart=this._index+1):"?"===e?(this._state=T,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==e&&"S"!==e?m:F,this._sectionStart=this._index)},s.prototype._stateInTagName=function(e){("/"===e||">"===e||r(e))&&(this._emitToken("onopentagname"),this._state=w,this._index--)},s.prototype._stateBeforeCloseingTagName=function(e){r(e)||(">"===e?this._state=f:this._special!==me?"s"===e||"S"===e?this._state=V:(this._state=f,this._index--):(this._state=v,this._sectionStart=this._index))},s.prototype._stateInCloseingTagName=function(e){(">"===e||r(e))&&(this._emitToken("onclosetag"),this._state=b,this._index--)},s.prototype._stateAfterCloseingTagName=function(e){">"===e&&(this._state=f,this._sectionStart=this._index+1)},s.prototype._stateBeforeAttributeName=function(e){">"===e?(this._cbs.onopentagend(),this._state=f,this._sectionStart=this._index+1):"/"===e?this._state=g:r(e)||(this._state=_,this._sectionStart=this._index)},s.prototype._stateInSelfClosingTag=function(e){">"===e?(this._cbs.onselfclosingtag(),this._state=f,this._sectionStart=this._index+1):r(e)||(this._state=w,this._index--)},s.prototype._stateInAttributeName=function(e){("="===e||"/"===e||">"===e||r(e))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=x,this._index--)},s.prototype._stateAfterAttributeName=function(e){"="===e?this._state=A:"/"===e||">"===e?(this._cbs.onattribend(),this._state=w,this._index--):r(e)||(this._cbs.onattribend(),this._state=_,this._sectionStart=this._index)},s.prototype._stateBeforeAttributeValue=function(e){'"'===e?(this._state=S,this._sectionStart=this._index+1):"'"===e?(this._state=j,this._sectionStart=this._index+1):r(e)||(this._state=E,this._sectionStart=this._index,this._index--)},s.prototype._stateInAttributeValueDoubleQuotes=function(e){'"'===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=w):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ue,this._sectionStart=this._index)},s.prototype._stateInAttributeValueSingleQuotes=function(e){"'"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=w):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ue,this._sectionStart=this._index)},s.prototype._stateInAttributeValueNoQuotes=function(e){r(e)||">"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=w,this._index--):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ue,this._sectionStart=this._index)},s.prototype._stateBeforeDeclaration=function(e){this._state="["===e?M:"-"===e?C:k},s.prototype._stateInDeclaration=function(e){ +">"===e&&(this._cbs.ondeclaration(this._getSection()),this._state=f,this._sectionStart=this._index+1)},s.prototype._stateInProcessingInstruction=function(e){">"===e&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=f,this._sectionStart=this._index+1)},s.prototype._stateBeforeComment=function(e){"-"===e?(this._state=I,this._sectionStart=this._index+1):this._state=k},s.prototype._stateInComment=function(e){"-"===e&&(this._state=D)},s.prototype._stateAfterComment1=function(e){"-"===e?this._state=L:this._state=I},s.prototype._stateAfterComment2=function(e){">"===e?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"-"!==e&&(this._state=I)},s.prototype._stateBeforeCdata1=a("C",R,k),s.prototype._stateBeforeCdata2=a("D",U,k),s.prototype._stateBeforeCdata3=a("A",P,k),s.prototype._stateBeforeCdata4=a("T",q,k),s.prototype._stateBeforeCdata5=a("A",B,k),s.prototype._stateBeforeCdata6=function(e){"["===e?(this._state=z,this._sectionStart=this._index+1):(this._state=k,this._index--)},s.prototype._stateInCdata=function(e){"]"===e&&(this._state=N)},s.prototype._stateAfterCdata1=i("]",$),s.prototype._stateAfterCdata2=function(e){">"===e?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=f,this._sectionStart=this._index+1):"]"!==e&&(this._state=z)},s.prototype._stateBeforeSpecial=function(e){"c"===e||"C"===e?this._state=H:"t"===e||"T"===e?this._state=te:(this._state=m,this._index--)},s.prototype._stateBeforeSpecialEnd=function(e){this._special!==ge||"c"!==e&&"C"!==e?this._special!==ye||"t"!==e&&"T"!==e?this._state=f:this._state=ae:this._state=G},s.prototype._stateBeforeScript1=o("R",Y),s.prototype._stateBeforeScript2=o("I",J),s.prototype._stateBeforeScript3=o("P",W),s.prototype._stateBeforeScript4=o("T",Q),s.prototype._stateBeforeScript5=function(e){("/"===e||">"===e||r(e))&&(this._special=ge),this._state=m,this._index--},s.prototype._stateAfterScript1=a("R",K,f),s.prototype._stateAfterScript2=a("I",X,f),s.prototype._stateAfterScript3=a("P",Z,f),s.prototype._stateAfterScript4=a("T",ee,f),s.prototype._stateAfterScript5=function(e){">"===e||r(e)?(this._special=me,this._state=v,this._sectionStart=this._index-6,this._index--):this._state=f},s.prototype._stateBeforeStyle1=o("Y",ne),s.prototype._stateBeforeStyle2=o("L",re),s.prototype._stateBeforeStyle3=o("E",ie),s.prototype._stateBeforeStyle4=function(e){("/"===e||">"===e||r(e))&&(this._special=ye),this._state=m,this._index--},s.prototype._stateAfterStyle1=a("Y",oe,f),s.prototype._stateAfterStyle2=a("L",se,f),s.prototype._stateAfterStyle3=a("E",le,f),s.prototype._stateAfterStyle4=function(e){">"===e||r(e)?(this._special=me,this._state=v,this._sectionStart=this._index-5,this._index--):this._state=f},s.prototype._stateBeforeEntity=a("#",ce,pe),s.prototype._stateBeforeNumericEntity=a("X",fe,he),s.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var e=this._buffer.substring(this._sectionStart+1,this._index),t=this._xmlMode?p:u;t.hasOwnProperty(e)&&(this._emitPartial(t[e]),this._sectionStart=this._index+1)}},s.prototype._parseLegacyEntity=function(){var e=this._sectionStart+1,t=this._index-e;for(t>6&&(t=6);t>=2;){var n=this._buffer.substr(e,t);if(c.hasOwnProperty(n))return this._emitPartial(c[n]),void(this._sectionStart+=t+1);t--}},s.prototype._stateInNamedEntity=function(e){";"===e?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(e<"a"||e>"z")&&(e<"A"||e>"Z")&&(e<"0"||e>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==f?"="!==e&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},s.prototype._decodeNumericEntity=function(e,t){var n=this._sectionStart+e;if(n!==this._index){var r=this._buffer.substring(n,this._index),i=parseInt(r,t);this._emitPartial(l(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},s.prototype._stateInNumericEntity=function(e){";"===e?(this._decodeNumericEntity(2,10),this._sectionStart++):(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},s.prototype._stateInHexEntity=function(e){";"===e?(this._decodeNumericEntity(3,16),this._sectionStart++):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},s.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._index=0,this._bufferOffset+=this._index):this._running&&(this._state===f?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},s.prototype.write=function(e){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=e,this._parse()},s.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var e=this._buffer.charAt(this._index);this._state===f?this._stateText(e):this._state===d?this._stateBeforeTagName(e):this._state===m?this._stateInTagName(e):this._state===y?this._stateBeforeCloseingTagName(e):this._state===v?this._stateInCloseingTagName(e):this._state===b?this._stateAfterCloseingTagName(e):this._state===g?this._stateInSelfClosingTag(e):this._state===w?this._stateBeforeAttributeName(e):this._state===_?this._stateInAttributeName(e):this._state===x?this._stateAfterAttributeName(e):this._state===A?this._stateBeforeAttributeValue(e):this._state===S?this._stateInAttributeValueDoubleQuotes(e):this._state===j?this._stateInAttributeValueSingleQuotes(e):this._state===E?this._stateInAttributeValueNoQuotes(e):this._state===O?this._stateBeforeDeclaration(e):this._state===k?this._stateInDeclaration(e):this._state===T?this._stateInProcessingInstruction(e):this._state===C?this._stateBeforeComment(e):this._state===I?this._stateInComment(e):this._state===D?this._stateAfterComment1(e):this._state===L?this._stateAfterComment2(e):this._state===M?this._stateBeforeCdata1(e):this._state===R?this._stateBeforeCdata2(e):this._state===U?this._stateBeforeCdata3(e):this._state===P?this._stateBeforeCdata4(e):this._state===q?this._stateBeforeCdata5(e):this._state===B?this._stateBeforeCdata6(e):this._state===z?this._stateInCdata(e):this._state===N?this._stateAfterCdata1(e):this._state===$?this._stateAfterCdata2(e):this._state===F?this._stateBeforeSpecial(e):this._state===V?this._stateBeforeSpecialEnd(e):this._state===H?this._stateBeforeScript1(e):this._state===Y?this._stateBeforeScript2(e):this._state===J?this._stateBeforeScript3(e):this._state===W?this._stateBeforeScript4(e):this._state===Q?this._stateBeforeScript5(e):this._state===G?this._stateAfterScript1(e):this._state===K?this._stateAfterScript2(e):this._state===X?this._stateAfterScript3(e):this._state===Z?this._stateAfterScript4(e):this._state===ee?this._stateAfterScript5(e):this._state===te?this._stateBeforeStyle1(e):this._state===ne?this._stateBeforeStyle2(e):this._state===re?this._stateBeforeStyle3(e):this._state===ie?this._stateBeforeStyle4(e):this._state===ae?this._stateAfterStyle1(e):this._state===oe?this._stateAfterStyle2(e):this._state===se?this._stateAfterStyle3(e):this._state===le?this._stateAfterStyle4(e):this._state===ue?this._stateBeforeEntity(e):this._state===ce?this._stateBeforeNumericEntity(e):this._state===pe?this._stateInNamedEntity(e):this._state===he?this._stateInNumericEntity(e):this._state===fe?this._stateInHexEntity(e):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},s.prototype.pause=function(){this._running=!1},s.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},s.prototype.end=function(e){this._ended&&this._cbs.onerror(Error(".end() after done!")),e&&this.write(e),this._ended=!0,this._running&&this._finish()},s.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},s.prototype._handleTrailingData=function(){var e=this._buffer.substr(this._sectionStart);this._state===z||this._state===N||this._state===$?this._cbs.oncdata(e):this._state===I||this._state===D||this._state===L?this._cbs.oncomment(e):this._state!==pe||this._xmlMode?this._state!==he||this._xmlMode?this._state!==fe||this._xmlMode?this._state!==m&&this._state!==w&&this._state!==A&&this._state!==x&&this._state!==_&&this._state!==j&&this._state!==S&&this._state!==E&&this._state!==v&&this._cbs.ontext(e):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},s.prototype.reset=function(){s.call(this,{xmlMode:this._xmlMode,decodeEntities:this._decodeEntities},this._cbs)},s.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},s.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},s.prototype._emitToken=function(e){this._cbs[e](this._getSection()),this._sectionStart=-1},s.prototype._emitPartial=function(e){this._baseState!==f?this._cbs.onattribdata(e):this._cbs.ontext(e)}},{"entities/lib/decode_codepoint.js":22,"entities/maps/entities.json":25,"entities/maps/legacy.json":26,"entities/maps/xml.json":27}],35:[function(e,t,n){function r(e,t){var n=this._parser=new i(e,t),r=this._decoder=new o;a.call(this,{decodeStrings:!1}),this.once("finish",function(){n.end(r.end())})}t.exports=r;var i=e("./Parser.js"),a=e("stream").Writable||e("readable-stream").Writable,o=e("string_decoder").StringDecoder,s=e("buffer").Buffer;e("inherits")(r,a),a.prototype._write=function(e,t,n){e instanceof s&&(e=this._decoder.write(e)),this._parser.write(e),n()}},{"./Parser.js":31,buffer:5,inherits:38,"readable-stream":3,stream:55,string_decoder:56}],36:[function(e,t,n){function r(e,n){return delete t.exports[e],t.exports[e]=n,n}var i=e("./Parser.js"),a=e("domhandler");t.exports={Parser:i,Tokenizer:e("./Tokenizer.js"),ElementType:e("domelementtype"),DomHandler:a,get FeedHandler(){return r("FeedHandler",e("./FeedHandler.js"))},get Stream(){return r("Stream",e("./Stream.js"))},get WritableStream(){return r("WritableStream",e("./WritableStream.js"))},get ProxyHandler(){return r("ProxyHandler",e("./ProxyHandler.js"))},get DomUtils(){return r("DomUtils",e("domutils"))},get CollectingHandler(){return r("CollectingHandler",e("./CollectingHandler.js"))},DefaultHandler:a,get RssHandler(){return r("RssHandler",this.FeedHandler)},parseDOM:function(e,t){var n=new a(t);return new i(n,t).end(e),n.dom},parseFeed:function(e,n){var r=new t.exports.FeedHandler(n);return new i(r,n).end(e),r.dom},createDomStream:function(e,t,n){var r=new a(e,t,n);return new i(r,t)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},{"./CollectingHandler.js":29,"./FeedHandler.js":30,"./Parser.js":31,"./ProxyHandler.js":32,"./Stream.js":33,"./Tokenizer.js":34,"./WritableStream.js":35,domelementtype:9,domhandler:10,domutils:13}],37:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,r),a-=u}return(f?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?h/l:h*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+f]=255&o,f+=d,o/=256,u-=8);e[n+f-d]|=128*m}},{}],38:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],39:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||i(e)||!!e._isBuffer)}},{}],40:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],41:[function(e,t,n){(function(e){"use strict";function n(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick(function(){t.apply(null,a)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=n:t.exports=e.nextTick}).call(this,e("_process"))},{_process:42}],42:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function o(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function s(){g&&d&&(g=!1,d.length?m=d.concat(m):y=-1,m.length&&l())}function l(){if(!g){var e=a(s);g=!0;for(var t=m.length;t;){for(d=m,m=[];++y<t;)d&&d[y].run();y=-1,t=m.length}d=null,g=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var p,h,f=t.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var d,m=[],g=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new u(e,t)),1!==m.length||g||a(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],43:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":44}],44:[function(e,t,n){"use strict";function r(e){return this instanceof r?(u.call(this,e),c.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var s=e("process-nextick-args"),l=e("core-util-is");l.inherits=e("inherits");var u=e("./_stream_readable"),c=e("./_stream_writable");l.inherits(r,u);for(var p=o(c.prototype),h=0;h<p.length;h++){var f=p[h];r.prototype[f]||(r.prototype[f]=c.prototype[f])}},{"./_stream_readable":46,"./_stream_writable":48,"core-util-is":6,inherits:38,"process-nextick-args":41}],45:[function(e,t,n){"use strict";function r(e){return this instanceof r?void i.call(this,e):new r(e)}t.exports=r;var i=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":47,"core-util-is":6,inherits:38}],46:[function(e,t,n){(function(n){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?C(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(t,n){z=z||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof z&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new B,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(q||(q=e("string_decoder/").StringDecoder),this.decoder=new q(t.encoding),this.encoding=t.encoding)}function a(t){return z=z||e("./_stream_duplex"),this instanceof a?(this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void I.call(this)):new a(t)}function o(e,t,n,r,i){var a=c(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var l=new Error("stream.unshift() after end event");e.emit("error",l)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function l(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=l(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var n=null;return L.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(P("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?T(f,e):f(e))}function f(e){P("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,T(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(P("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;P("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&D(e,"data")&&(t.flowing=!0,w(e))}}function y(e){P("readable nexttick read 0"),e.read(0)}function v(e,t){t.resumeScheduled||(t.resumeScheduled=!0,T(b,e,t))}function b(e,t){t.reading||(P("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),w(e),t.flowing&&!t.reading&&e.read(0)}function w(e){var t=e._readableState;for(P("flow",t.flowing);t.flowing&&null!==e.read(););}function _(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=x(e,t.buffer,t.decoder),n}function x(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?A(e,t):S(e,t),r}function A(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function S(e,t){var n=M.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function j(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,T(E,t,e))}function E(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function k(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=a;var T=e("process-nextick-args"),C=e("isarray");a.ReadableState=i;var I,D=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{I=e("stream")}catch(t){}finally{I||(I=e("events").EventEmitter)}}();var L=e("buffer").Buffer,M=e("buffer-shims"),R=e("core-util-is");R.inherits=e("inherits");var U=e("util"),P=void 0;P=U&&U.debuglog?U.debuglog("stream"):function(){};var q,B=e("./internal/streams/BufferList");R.inherits(a,I);var z,z;a.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=M.from(e,t),t="")),o(this,n,e,t,!1)},a.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(t){return q||(q=e("string_decoder/").StringDecoder),this._readableState.decoder=new q(t),this._readableState.encoding=t,this};var N=8388608;a.prototype.read=function(e){P("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return P("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):h(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&j(this),null;var r=t.needReadable;P("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,P("length less than watermark",r)),t.ended||t.reading?(r=!1,P("reading or ended",r)):r&&(P("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=u(n,t)));var i;return i=e>0?_(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&j(this)),null!==i&&this.emit("data",i),i},a.prototype._read=function(e){this.emit("error",new Error("not implemented"))},a.prototype.pipe=function(e,t){function i(e){P("onunpipe"),e===h&&o()}function a(){P("onend"),e.end()}function o(){P("cleanup"),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("drain",y),e.removeListener("error",l),e.removeListener("unpipe",i),h.removeListener("end",a),h.removeListener("end",o),h.removeListener("data",s),v=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function s(t){P("ondata"),b=!1;var n=e.write(t);!1!==n||b||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&k(f.pipes,e)!==-1)&&!v&&(P("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,b=!0),h.pause())}function l(t){P("onerror",t),p(),e.removeListener("error",l),0===D(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",c),p()}function c(){P("onfinish"),e.removeListener("close",u),p()}function p(){P("unpipe"),h.unpipe(e)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,P("pipe count=%d opts=%j",f.pipesCount,t);var d=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,m=d?a:o;f.endEmitted?T(m):h.once("end",m),e.on("unpipe",i);var y=g(h);e.on("drain",y);var v=!1,b=!1;return h.on("data",s),r(e,"error",l),e.once("close",u),e.once("finish",c),e.emit("pipe",h),f.flowing||(P("pipe resume"),h.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var a=k(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},a.prototype.on=function(e,t){var n=I.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&h(this,r):T(y,this))}return n},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(P("resume"),e.flowing=!0,v(this,e)),this},a.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(P("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(P("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var a=r.push(i);a||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var a=["error","close","destroy","pause","resume"];return O(a,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){P("wrapped _read",t),n&&(n=!1,e.resume())},r},a._fromList=_}).call(this,e("_process"))},{"./_stream_duplex":44,"./internal/streams/BufferList":49,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,isarray:40,"process-nextick-args":41,"string_decoder/":56,util:3}],47:[function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=a;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("Not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":44,"core-util-is":6,inherits:38}],48:[function(e,t,n){(function(n){"use strict";function r(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function a(t,n){C=C||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof C&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}function o(t){return C=C||e("./_stream_duplex"),this instanceof o||this instanceof C?(this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void E.call(this)):new o(t)}function s(e,t){var n=new Error("write after end");e.emit("error",n),A(t,n)}function l(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):k.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),A(r,a),i=!1),i}function u(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=T.from(t,n)),t}function c(e,t,n,r,a){n=u(t,n,r),k.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,r,a),l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,o,n,r,a);return s}function p(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function h(e,t,n,r,i){--t.pendingcb,n?A(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function f(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(f(n),t)h(e,n,r,t,i);else{var a=v(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),r?S(m,e,n,a,i):m(e,n,a,i)}}function m(e,t,n,r){n||g(e,t),t.pendingcb--,r(),w(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function y(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;p(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new x(t)}else{for(;n;){var s=n.chunk,l=n.encoding,u=n.callback,c=t.objectMode?1:s.length;if(p(e,t,!1,c,s,l,u),n=n.next,t.writing)break; +}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var n=v(t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),n}function _(e,t,n){t.ending=!0,w(e,t),n&&(t.finished?A(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function x(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=o;var A=e("process-nextick-args"),S=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:A;o.WritableState=a;var j=e("core-util-is");j.inherits=e("inherits");var E,O={deprecate:e("util-deprecate")};!function(){try{E=e("stream")}catch(t){}finally{E||(E=e("events").EventEmitter)}}();var k=e("buffer").Buffer,T=e("buffer-shims");j.inherits(o,E);var C;a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var C;o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,n){var i=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),k.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):l(this,i,e,n)&&(i.pendingcb++,a=c(this,i,e,t,n)),a},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,n){n(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||_(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":44,_process:42,buffer:5,"buffer-shims":4,"core-util-is":6,events:28,inherits:38,"process-nextick-args":41,"util-deprecate":57}],49:[function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},{buffer:5,"buffer-shims":4}],50:[function(e,t,n){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":45}],51:[function(e,t,n){(function(r){var i=function(){try{return e("stream")}catch(t){}}();n=t.exports=e("./lib/_stream_readable.js"),n.Stream=i||n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),!r.browser&&"disable"===r.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":44,"./lib/_stream_passthrough.js":45,"./lib/_stream_readable.js":46,"./lib/_stream_transform.js":47,"./lib/_stream_writable.js":48,_process:42}],52:[function(e,t,n){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":47}],53:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":48}],54:[function(e,t,n){t.exports=function(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}},{}],55:[function(e,t,n){function r(){i.call(this)}t.exports=r;var i=e("events").EventEmitter,a=e("inherits");a(r,i),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){u.removeListener("data",n),e.removeListener("drain",r),u.removeListener("end",a),u.removeListener("close",o),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",l),u.removeListener("close",l),e.removeListener("close",l)}var u=this;u.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(u.on("end",a),u.on("close",o));var c=!1;return u.on("error",s),e.on("error",s),u.on("end",l),u.on("close",l),e.on("close",l),e.emit("pipe",u),e}},{events:28,inherits:38,"readable-stream/duplex.js":43,"readable-stream/passthrough.js":50,"readable-stream/readable.js":51,"readable-stream/transform.js":52,"readable-stream/writable.js":53}],56:[function(e,t,n){function r(e){if(e&&!l(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,l=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:5}],57:[function(e,t,n){(function(e){function n(e,t){function n(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var i=!1;return n}function r(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(e,t,n){function r(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e}t.exports=r;var i=Object.prototype.hasOwnProperty},{}]},{},[1])(1)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var t;return function n(e,t,r){function i(o,s){if(!t[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,n,e,t,r)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e("./lib/auth"),i=e("./lib/helpers"),a=e("./lib/client"),o=function(e,t){return i.log('This is deprecated, use "new SwaggerClient" instead.'),new a(e,t)};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return this.indexOf(e,this.length-e.length)!==-1}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o,a.SchemaMarkup=e("./lib/schema-markup")},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4,"./lib/schema-markup":7}],2:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("btoa"),a=e("cookiejar").CookieJar,o={each:e("lodash-compat/collection/each"),includes:e("lodash-compat/collection/includes"),isObject:e("lodash-compat/lang/isObject"),isArray:e("lodash-compat/lang/isArray")},s=t.exports.SwaggerAuthorizations=function(e){this.authz=e||{}};s.prototype.add=function(e,t){if(o.isObject(e))for(var n in e)this.authz[n]=e[n];else"string"==typeof e&&(this.authz[e]=t);return t},s.prototype.remove=function(e){return delete this.authz[e]},s.prototype.apply=function(e,t){var n=!0,r=!t,i=[],a=e.clientAuthorizations||this.authz;return o.each(t,function(e,t){"string"==typeof t&&i.push(t),o.each(e,function(e,t){i.push(t)})}),o.each(a,function(t,a){if(r||o.includes(i,a)){var s=t.apply(e);n=n&&!!s}}),n};var l=t.exports.ApiKeyAuthorization=function(e,t,n){this.name=e,this.value=t,this.type=n};l.prototype.apply=function(e){if("query"===this.type){var t;if(e.url.indexOf("?")>0){t=e.url.substring(e.url.indexOf("?")+1);var n=t.split("&");if(n&&n.length>0)for(var r=0;r<n.length;r++){var i=n[r].split("=");if(i&&i.length>0&&i[0]===this.name)return!1}}return e.url.indexOf("?")>0?e.url=e.url+"&"+this.name+"="+this.value:e.url=e.url+"?"+this.name+"="+this.value,!0}if("header"===this.type)return"undefined"==typeof e.headers[this.name]&&(e.headers[this.name]=this.value),!0};var u=t.exports.CookieAuthorization=function(e){this.cookie=e};u.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new a,e.cookieJar.setCookie(this.cookie),!0};var c=t.exports.PasswordAuthorization=function(e,t){3===arguments.length&&(r.log("PasswordAuthorization: the 'name' argument has been removed, pass only username and password"),e=arguments[1],t=arguments[2]),this.username=e,this.password=t};c.prototype.apply=function(e){return"undefined"==typeof e.headers.Authorization&&(e.headers.Authorization="Basic "+i(this.username+":"+this.password)),!0}},{"./helpers":4,btoa:13,cookiejar:18,"lodash-compat/collection/each":52,"lodash-compat/collection/includes":55,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144}],3:[function(e,t,n){"use strict";var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isObject:e("lodash-compat/lang/isObject"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),h=e("q"),f=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","enableCookies","fail","failure","finish","help","host","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","title","url","useJQuery","jqueryAjaxCache"],d=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],m=["delete","get","head","options","patch","post","put"],g=t.exports=function(e,t){return this.authorizations=null,this.authorizationScheme=null,this.basePath=null,this.debug=!1,this.enableCookies=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,this.jqueryAjaxCache=!1,this.swaggerObject={},this.deferredClient=void 0,this.clientAuthorizations=new i.SwaggerAuthorizations,"undefined"!=typeof e?this.initialize(e,t):this};g.prototype.initialize=function(e,t){if(this.models={},this.sampleModels={},"string"==typeof e?this.url=e:r.isObject(e)&&(t=e,this.url=t.url),this.url&&this.url.indexOf("http:")===-1&&this.url.indexOf("https:")===-1&&"undefined"!=typeof window&&window&&window.location&&(this.url=window.location.origin+this.url),t=t||{},this.clientAuthorizations.add(t.authorizations),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.connectionAgent=t.connectionAgent||null,this.parameterMacro=t.parameterMacro||null,this.usePromise=t.usePromise||null,this.timeout=t.timeout||null,this.fetchSpecTimeout="undefined"!=typeof t.fetchSpecTimeout?t.fetchSpecTimeout:t.timeout||null,this.usePromise&&(this.deferredClient=h.defer()),"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),t.jqueryAjaxCache&&(this.jqueryAjaxCache=t.jqueryAjaxCache),t.enableCookies&&(this.enableCookies=t.enableCookies),this.options=t||{},this.options.timeout=this.timeout,this.options.fetchSpecTimeout=this.fetchSpecTimeout,this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(e){throw e},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),t.scheme&&(this.scheme=t.scheme),this.usePromise||"function"==typeof t.success)return this.ready=!0,this.build()},g.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.spec?this.progress("fetching resource list; Please wait."):this.progress("fetching resource list: "+this.url+"; Please wait.");var n={useJQuery:this.useJQuery,jqueryAjaxCache:this.jqueryAjaxCache,connectionAgent:this.connectionAgent,enableCookies:this.enableCookies,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return"http"!==t.url.substring(0,4)?t.fail("Please specify the protocol for "+t.url):!e.errObj||"ECONNABORTED"!==e.errObj.code&&e.errObj.message.indexOf("timeout")===-1?0===e.status?t.fail("Can't read from server. It may not have the appropriate access-control-origin settings."):404===e.status?t.fail("Can't read swagger JSON from "+t.url):t.fail(e.status+" : "+e.statusText+" "+t.url):t.fail("Request timed out after "+t.fetchSpecTimeout+"ms")},response:function(e){var n=e.obj;if(!n)return t.fail("failed to parse JSON/YAML response");if(t.swaggerVersion=n.swaggerVersion,t.swaggerObject=n,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.url,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;t.oldSwaggerObject=t.swaggerObject,r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,t.options,function(e){t.swaggerObject=e,(new u).resolve(e,t.url,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.fetchSpecTimeout&&(n.timeout=this.fetchSpecTimeout),this.spec)t.swaggerObject=this.spec,setTimeout(function(){(new u).resolve(t.spec,t.url,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this.usePromise?this.deferredClient.promise:this},g.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=r.cloneDeep(e.securityDefinitions),this.security=e.security,this.title=e.title||"";var t,n,i,u,c={},p=this;if(e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=this.securityDefinitions,this.securityDefinitions)for(t in this.securityDefinitions){var h=this.securityDefinitions[t];h.vendorExtensions={};for(var g in h)if(a.extractExtensions(g,h),"scopes"===g){var y=h[g];if("object"==typeof y){y.vendorExtensions={};for(var v in y)a.extractExtensions(v,y),0===v.indexOf("x-")&&delete y[v]}}}if(Array.isArray(e.tags))for(c={},n=0;n<e.tags.length;n++){var b=r.cloneDeep(e.tags[n]);c[b.name]=b;for(u in b){if("externalDocs"===u&&"object"==typeof b[u])for(var w in b[u])a.extractExtensions(w,b[u]);a.extractExtensions(u,b)}}if("string"==typeof this.url){if(i=this.parseUri(this.url),"undefined"==typeof this.scheme&&"undefined"==typeof this.schemes||0===this.schemes.length)"undefined"!=typeof window?this.scheme=window.location.protocol.replace(":",""):this.scheme=i.scheme||"http";else if("undefined"!=typeof window&&0===window.location.protocol.indexOf("chrome-extension"))this.scheme=i.scheme;else if("undefined"==typeof this.scheme)if("undefined"!=typeof window){var _=window.location.protocol.replace(":","");"https"===_&&this.schemes.indexOf(_)===-1?(a.log("Cannot call a http server from https inside a browser!"),this.scheme="http"):this.schemes.indexOf(_)!==-1?this.scheme=_:this.schemes.indexOf("https")!==-1?this.scheme="https":this.scheme="http"}else this.scheme=this.schemes[0]||i.scheme;"undefined"!=typeof this.host&&""!==this.host||(this.host=i.host,i.port&&(this.host=this.host+":"+i.port))}else"undefined"==typeof this.schemes||0===this.schemes.length?this.scheme="http":"undefined"==typeof this.scheme&&(this.scheme=this.schemes[0]);this.definitions=e.definitions;for(t in this.definitions){var x=new o(t,this.definitions[t],this.models,this.modelPropertyMacro);x&&(this.models[t]=x)}p.apis.help=r.bind(p.help,p),r.forEach(e.paths,function(e,t){r.isPlainObject(e)&&r.forEach(m,function(n){var i=e[n];if(!r.isUndefined(i)){if(!r.isPlainObject(i))return void a.log("The '"+n+"' operation for '"+t+"' path is not an Operation Object");var o=i.tags;!r.isUndefined(o)&&r.isArray(o)&&0!==o.length||(o=i.tags=["default"]);var h=p.idFromOp(t,n,i),m=new s(p,i.scheme,h,n,t,i,p.definitions,p.models,p.clientAuthorizations);m.connectionAgent=p.connectionAgent,m.vendorExtensions={};for(u in i)a.extractExtensions(u,m,i[u]);if(m.externalDocs=i.externalDocs,m.externalDocs){m.externalDocs=r.cloneDeep(m.externalDocs),m.externalDocs.vendorExtensions={};for(u in m.externalDocs)a.extractExtensions(u,m.externalDocs)}r.forEach(o,function(e){var t=r.indexOf(f,e)>-1?"_"+e:e,n=r.indexOf(d,e)>-1?"_"+e:e,i=p[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),n!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+n+"' instead of 'client.apis."+e+"'."),r.indexOf(d,h)>-1&&(a.log("The '"+h+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+n+"._"+h+"' instead of 'client.apis."+n+"."+h+"'."),h="_"+h,m.nickname=h),r.isUndefined(i)){i=p[t]=p.apis[n]={},i.operations={},i.label=n,i.apis={};var o=c[e];r.isUndefined(o)||(i.description=o.description,i.externalDocs=o.externalDocs,i.vendorExtensions=o.vendorExtensions),p[t].help=r.bind(p.help,i),p.apisArray.push(new l(e,i.description,i.externalDocs,m))}h=p.makeUniqueOperationId(h,p.apis[n]),r.isFunction(i.help)||(i.help=r.bind(p.help,i)),p.apis[n][h]=i[h]=r.bind(m.execute,m),p.apis[n][h].help=i[h].help=r.bind(m.help,m),p.apis[n][h].asCurl=i[h].asCurl=r.bind(m.asCurl,m),i.apis[h]=i.operations[h]=m;var s=r.find(p.apisArray,function(t){return t.tag===e});s&&s.operationsArray.push(m)})}})});var A=[];return r.forEach(Object.keys(c),function(e){var t;for(t in p.apisArray){var n=p.apisArray[t];n&&e===n.name&&(A.push(n),p.apisArray[t]=null)}}),r.forEach(p.apisArray,function(e){e&&A.push(e)}),p.apisArray=A,r.forEach(e.definitions,function(e,t){e.id=t.toLowerCase(),e.name=t,p.modelsArray.push(e)}),this.isBuilt=!0,this.usePromise?(this.isValid=!0,this.isBuilt=!0,this.deferredClient.resolve(this),this.deferredClient.promise):(this.success&&this.success(),this)},g.prototype.makeUniqueOperationId=function(e,t){for(var n=0,i=e;;){var a=!1;if(r.forEach(t.operations,function(e){e.nickname===i&&(a=!0)}),!a)return i;i=e+"_"+n,n++}return e},g.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4]?n[4].replace(":",""):void 0,host:n[11],port:n[12],path:n[15]}},g.prototype.help=function(e){var t="";return this instanceof g?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+=" * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+=" * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},g.prototype.tagFromLabel=function(e){return e},g.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},g.prototype.setHost=function(e){this.host=e,this.apis&&r.forEach(this.apis,function(t){t.operations&&r.forEach(t.operations,function(t){t.host=e})})},g.prototype.setBasePath=function(e){this.basePath=e,this.apis&&r.forEach(this.apis,function(t){t.operations&&r.forEach(t.operations,function(t){t.basePath=e})})},g.prototype.setSchemes=function(e){this.schemes=e,e&&e.length>0&&this.apis&&r.forEach(this.apis,function(t){t.operations&&r.forEach(t.operations,function(t){t.scheme=e[0]})})},g.prototype.fail=function(e){return this.usePromise?(this.deferredClient.reject(e),this.deferredClient.promise):void(this.failure?this.failure(e):this.failure(e))}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":49,"lodash-compat/collection/find":53,"lodash-compat/collection/forEach":54,"lodash-compat/function/bind":58,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isFunction":142,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,q:157}],4:[function(e,t,n){(function(n){"use strict";var r={isPlainObject:e("lodash-compat/lang/isPlainObject"),indexOf:e("lodash-compat/array/indexOf")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},t.exports.extractExtensions=function(e,t,n){e&&t&&"string"==typeof e&&0===e.indexOf("x-")&&(t.vendorExtensions=t.vendorExtensions||{},n?t.vendorExtensions[e]=n:t.vendorExtensions[e]=t[e])}}).call(this,e("_process"))},{_process:12,"lodash-compat/array/indexOf":49,"lodash-compat/lang/isPlainObject":145}],5:[function(t,n,r){(function(r){"use strict";var i=t("./helpers"),a=t("superagent"),o=t("js-yaml"),s={isObject:t("lodash-compat/lang/isObject"),keys:t("lodash-compat/object/keys")},l=function(){this.type="JQueryHttpClient"},u=function(){this.type="SuperagentHttpClient"},c=n.exports=function(){};c.prototype.execute=function(t,n){var r;r=n&&n.client?n.client:new u(n),r.opts=n||{},n&&n.requestAgent&&(a=n.requestAgent);var i=!1;if("undefined"!=typeof window&&"undefined"!=typeof window.jQuery&&(i=!0),"options"===t.method.toLowerCase()&&"SuperagentHttpClient"===r.type&&(e("forcing jQuery as OPTIONS are not supported by SuperAgent"),t.useJQuery=!0),this.isInternetExplorer()&&(t.useJQuery===!1||!i))throw new Error("Unsupported configuration! JQuery is required but not available");(t&&t.useJQuery===!0||this.isInternetExplorer()&&i)&&(r=new l(n));var o=t.on.response,c=t.on.error,p=function(e){return n&&n.requestInterceptor&&(e=n.requestInterceptor.apply(e)),e},h=function(e){return n&&n.responseInterceptor&&(e=n.responseInterceptor.apply(e,[t])),o(e)},f=function(e){n&&n.responseInterceptor&&(e=n.responseInterceptor.apply(e,[t])),c(e)};return t.on.error=function(e){f(e)},t.on.response=function(e){e&&e.status>=400?f(e):h(e)},s.isObject(t)&&s.isObject(t.body)&&t.body.type&&"formData"===t.body.type&&n.useJQuery&&(t.contentType=!1,t.processData=!1,delete t.headers["Content-Type"]),t=p(t)||t,t.beforeSend?t.beforeSend(function(e){r.execute(e||t)}):r.execute(t),t.deferred?t.deferred.promise:t},c.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(t.indexOf("msie")!==-1){var n=parseInt(t.split("msie")[1]);n<=8&&(e=!0)}}return e},l.prototype.execute=function(e){var t=this.jQuery||"undefined"!=typeof window&&window.jQuery,n=e.on,r=e;if("undefined"==typeof t||t===!1)throw new Error("Unsupported configuration! JQuery is required but not available");return e.type=e.method,e.cache=e.jqueryAjaxCache,e.data=e.body,delete e.jqueryAjaxCache,delete e.useJQuery,delete e.body,e.complete=function(e){for(var t={},a=e.getAllResponseHeaders().split("\n"),s=0;s<a.length;s++){var l=a[s].trim();if(0!==l.length){var u=l.indexOf(":");if(u!==-1){var c=l.substring(0,u).trim(),p=l.substring(u+1).trim();t[c]=p}else t[l]=null}}var h={url:r.url,method:r.method,status:e.status,statusText:e.statusText,data:e.responseText,headers:t};try{var f=e.responseJSON||o.safeLoad(e.responseText);h.obj="string"==typeof f?{}:f}catch(d){i.log("unable to parse JSON/YAML content")}if(h.obj=h.obj||null,e.status>=200&&e.status<300)n.response(h);else{if(!(0===e.status||e.status>=400&&e.status<599))return n.response(h);n.error(h)}},t.support.cors=!0,t.ajax(e)},u.prototype.execute=function(e){var t=e.method.toLowerCase(),n=e.timeout;"delete"===t&&(t="del");var l=e.headers||{},u=a[t](e.url);e.connectionAgent&&u.agent(e.connectionAgent),n&&u.timeout(n),e.enableCookies&&u.withCredentials();var c=e.headers.Accept;if(this.binaryRequest(c)&&u.on("request",function(){this.xhr&&(this.xhr.responseType="blob")}),e.body)if(s.isObject(e.body)){var p=e.headers["Content-Type"]||"";if(0===p.indexOf("multipart/form-data"))if(delete l["Content-Type"],"[object FormData]"==={}.toString.apply(e.body))u.send(e.body);else{var h,f,d;for(h in e.body)if(f=e.body[h],Array.isArray(f))for(d in f)u.field(h,d);else u.field(h,f)}else s.isObject(e.body)&&(e.body=JSON.stringify(e.body),u.send(e.body))}else u.send(e.body);var m;for(m in l)u.set(m,l[m]);"function"==typeof u.buffer&&u.buffer(),u.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var a,l={url:e.url,method:e.method,headers:n.headers};if(!t&&n.error&&(t=n.error),t&&e.on&&e.on.error){if(l.errObj=t,l.status=n?n.status:500,l.statusText=n?n.text:t.message,n.headers&&n.headers["content-type"]&&n.headers["content-type"].indexOf("application/json")>=0)try{l.obj=JSON.parse(l.statusText)}catch(u){l.obj=null}a=e.on.error}else if(n&&e.on&&e.on.response){var c;if(n.body&&s.keys(n.body).length>0)c=n.body;else try{c=o.safeLoad(n.text),c="string"==typeof c?null:c}catch(u){i.log("cannot parse JSON/YAML content")}"function"==typeof r&&r.isBuffer(c)?l.data=c:l.obj="object"==typeof c?c:null,l.status=n.status,l.statusText=n.text,a=e.on.response}n.xhr&&n.xhr.response?l.data=n.xhr.response:l.data||(l.data=l.statusText),a&&a(l)})},u.prototype.binaryRequest=function(e){return!!e&&(/^image/i.test(e)||/^application\/pdf/.test(e)||/^application\/octet-stream/.test(e))}}).call(this,t("buffer").Buffer)},{"./helpers":4,buffer:14,"js-yaml":19,"lodash-compat/lang/isObject":144,"lodash-compat/object/keys":149,superagent:158}],6:[function(e,t,n){"use strict";function r(e){var t={},n=/[a-z]+:\/\//i.exec(e);n&&(t.proto=n[0].slice(0,-3),e=e.slice(t.proto.length+1)),"//"===e.slice(0,2)&&(t.domain=e.slice(2).split("/")[0],e=e.slice(2+t.domain.length));var r=e.split("#");return r[0].length&&(t.path=r[0]),r.length>1&&(t.fragment=r.slice(1).join("#")),t}function i(e){var t=e.path;return void 0===t&&(t=""),void 0!==e.fragment&&(t+="#"+e.fragment),void 0!==e.domain&&("/"===t.slice(0,1)&&(t=t.slice(1)),t="//"+e.domain+"/"+t,void 0!==e.proto&&(t=e.proto+":"+t)),t}function a(e,t){var n=r(t);if(void 0!==n.domain)return t;var a=r(e);if(void 0===n.path)a.fragment=n.fragment;else if("/"===n.path.slice(0,1))a.path=n.path,a.fragment=n.fragment;else{var o=void 0===a.path?[]:a.path.split("/"),s=n.path.split("/");for(o.length&&o.pop();".."===s[0]||"."===s[0];)".."===s[0]&&o.pop(),s.shift();a.path=o.concat(s).join("/"),a.fragment=n.fragment}return i(a)}var o=e("./http"),s={isObject:e("lodash-compat/lang/isObject"),cloneDeep:e("lodash-compat/lang/cloneDeep"),isArray:e("lodash-compat/lang/isArray"),isString:e("lodash-compat/lang/isString")},l=t.exports=function(){this.failedUrls=[],this.resolverCache={},this.pendingUrls={}};l.prototype.processAllOf=function(e,t,n,r,i,a){var o,s,l;n["x-resolved-from"]=["#/definitions/"+t];var u=n.allOf;for(u.sort(function(e,t){return e.$ref&&t.$ref?0:e.$ref?-1:1}),o=0;o<u.length;o++)l=u[o],s="/definitions/"+t+"/allOf",this.resolveInline(e,a,l,r,i,s); +},l.prototype.resolve=function(e,t,n,r){this.spec=e;var i,a,l=t,u=n,c=r,p={};"function"==typeof t&&(l=null,u=t,c=n);var h,f=l;this.scope=c||this,this.iteration=this.iteration||0,this.scope.options&&this.scope.options.requestInterceptor&&(p.requestInterceptor=this.scope.options.requestInterceptor),this.scope.options&&this.scope.options.responseInterceptor&&(p.responseInterceptor=this.scope.options.responseInterceptor);var d,m,g,y,v,b,w,_=0,x={},A={},S=[];e.definitions=e.definitions||{};for(d in e.definitions){var j=e.definitions[d];if(j.$ref)this.resolveInline(l,e,j,S,A,j);else{for(y in j.properties)g=j.properties[y],s.isArray(g.allOf)?this.processAllOf(l,d,g,S,A,e):this.resolveTo(l,g,S,"/definitions");j.allOf&&this.processAllOf(l,d,j,S,A,e)}}e.parameters=e.parameters||{};for(d in e.parameters){if(v=e.parameters[d],"body"===v["in"]&&v.schema)if(s.isArray(v.schema.allOf)){h="inline_model";var E=h;for(b=!1,w=0;!b;){if("undefined"==typeof e.definitions[E]){b=!0;break}E=h+"_"+w,w++}e.definitions[E]={allOf:v.schema.allOf},delete v.schema.allOf,v.schema.$ref="#/definitions/"+E,this.processAllOf(l,E,e.definitions[E],S,A,e)}else this.resolveTo(l,v.schema,S,i);v.$ref&&this.resolveInline(l,e,v,S,A,v.$ref)}for(d in e.paths){var O,k,T;if(m=e.paths[d],"object"==typeof m){for(O in m)if("$ref"===O)i="/paths"+d,this.resolveInline(l,e,m,S,A,i);else{k=m[O];var C=m.parameters||[],I=k.parameters||[];C.forEach(function(e){I.unshift(e)}),"parameters"!==O&&s.isObject(k)&&(k.parameters=k.parameters||I);for(a in I){if(v=I[a],i="/paths"+d+"/"+O+"/parameters","body"===v["in"]&&v.schema)if(s.isArray(v.schema.allOf)){for(h="inline_model",d=h,b=!1,w=0;!b;){if("undefined"==typeof e.definitions[d]){b=!0;break}d=h+"_"+w,w++}e.definitions[d]={allOf:v.schema.allOf},delete v.schema.allOf,v.schema.$ref="#/definitions/"+d,this.processAllOf(l,d,e.definitions[d],S,A,e)}else this.resolveTo(l,v.schema,S,i);v.$ref&&this.resolveInline(l,e,v,S,A,v.$ref)}for(T in k.responses){var D=k.responses[T];if(i="/paths"+d+"/"+O+"/responses/"+T,s.isObject(D)&&(D.$ref&&this.resolveInline(l,e,D,S,A,i),D.schema)){var L=D;if(s.isArray(L.schema.allOf)){for(h="inline_model",d=h,b=!1,w=0;!b;){if("undefined"==typeof e.definitions[d]){b=!0;break}d=h+"_"+w,w++}e.definitions[d]={allOf:L.schema.allOf},delete L.schema.allOf,delete L.schema.type,L.schema.$ref="#/definitions/"+d,this.processAllOf(l,d,e.definitions[d],S,A,e)}else"array"===L.schema.type?L.schema.items&&L.schema.items.$ref&&this.resolveInline(l,e,L.schema.items,S,A,i):this.resolveTo(l,D.schema,S,i)}}}m.parameters=[]}}var M,R=0,U=[],P=S;for(a=0;a<P.length;a++){var q=P[a];if(l===q.root){if("ref"===q.resolveAs){var B,z=((q.root||"")+"/"+q.key).split("/"),N=[],$="";if(q.key.indexOf("../")>=0){for(var F=0;F<z.length;F++)".."===z[F]?N=N.slice(0,N.length-1):N.push(z[F]);for(B=0;B<N.length;B++)B>0&&($+="/"),$+=N[B];q.root=$,U.push(q)}else if(M=q.key.split("#"),2===M.length){0!==M[0].indexOf("http:")&&0!==M[0].indexOf("https:")||(q.root=M[0]),i=M[1].split("/");var V,H=e;for(B=0;B<i.length;B++){var Y=i[B];if(""!==Y){if(H=H[Y],"undefined"==typeof H){V=null;break}V=H}}null===V&&U.push(q)}}else if("inline"===q.resolveAs){if(q.key&&q.key.indexOf("#")===-1&&"/"!==q.key.charAt(0)){for(M=q.root.split("/"),i="",a=0;a<M.length-1;a++)i+=M[a]+"/";i+=q.key,q.root=i,q.location=""}U.push(q)}}else U.push(q)}R=U.length;for(var J={},W=0;W<U.length;W++)!function(e,t,n,r,i){if(e.root&&e.root!==l)if(n.failedUrls.indexOf(e.root)===-1){var a={useJQuery:!1,url:e.root,method:"get",headers:{accept:n.scope.swaggerRequestHeaders||"application/json"},on:{error:function(i){_+=1,console.log("failed url: "+a.url),n.failedUrls.push(a.url),r&&delete r[e.root],A[e.key]={root:e.root,location:e.location},_===R&&n.finish(t,f,S,x,A,u)},response:function(i){var a=i.obj;r&&delete r[e.root],n.resolverCache&&(n.resolverCache[e.root]=a),n.resolveItem(a,e.root,S,x,A,e),_+=1,_===R&&n.finish(t,f,S,x,A,u)}}};c&&c.fetchSpecTimeout&&(a.timeout=c.fetchSpecTimeout),c&&c.clientAuthorizations&&c.clientAuthorizations.apply(a),function h(){setTimeout(function(){if(r[a.url])h();else{var e=n.resolverCache[a.url];s.isObject(e)?a.on.response({obj:e}):(r[a.url]=!0,(new o).execute(a,p))}},0)}()}else _+=1,A[e.key]={root:e.root,location:e.location},_===R&&n.finish(t,f,S,x,A,u);else n.resolveItem(t,f,S,x,A,e),_+=1,_===R&&n.finish(t,l,S,x,A,u,!0)}(U[W],e,this,J,W);0===Object.keys(U).length&&this.finish(e,f,S,x,A,u)},l.prototype.resolveItem=function(e,t,n,r,i,a){var o=a.location,s=e,l=o.split("/");if(""!==o)for(var u=0;u<l.length;u++){var c=l[u];if(c.indexOf("~1")!==-1&&(c=l[u].replace(/~0/g,"~").replace(/~1/g,"/"),"/"!==c.charAt(0)&&(c="/"+c)),"undefined"==typeof s||null===s)break;if(""===c&&u===l.length-1&&l.length>1){s=null;break}c.length>0&&(s=s[c])}var p=a.key;l=a.key.split("/");var h=l[l.length-1];h.indexOf("#")>=0&&(h=h.split("#")[1]),null!==s&&"undefined"!=typeof s?r[p]={name:h,obj:s,key:a.key,root:a.root}:i[p]={root:a.root,location:a.location}},l.prototype.finish=function(e,t,n,r,i,a,o){var s,l;for(s in n){var u=n[s],c=u.key,p=r[c];if(p)if(e.definitions=e.definitions||{},"ref"===u.resolveAs){if(o!==!0)for(c in p.obj)l=this.retainRoot(c,p.obj[c],u.root),p.obj[c]=l;e.definitions[p.name]=p.obj,u.obj.$ref="#/definitions/"+p.name}else if("inline"===u.resolveAs){var h=u.obj;h["x-resolved-from"]=[u.key],delete h.$ref;for(c in p.obj)l=p.obj[c],o!==!0&&(l=this.retainRoot(c,p.obj[c],u.root)),h[c]=l}}var f=this.countUnresolvedRefs(e);0===f||this.iteration>5?(this.resolveAllOf(e.definitions),this.resolverCache=null,a.call(this.scope,e,i)):(this.iteration+=1,this.resolve(e,t,a,this.scope))},l.prototype.countUnresolvedRefs=function(e){var t,n=this.getRefs(e),r=[],i=[];for(t in n)0===t.indexOf("#")?r.push(t.substring(1)):i.push(t);for(t=0;t<r.length;t++)for(var a=r[t],o=a.split("/"),s=e,l=0;l<o.length;l++){var u=o[l];if(""!==u&&(s=s[u],"undefined"==typeof s)){i.push(a);break}}return i.length},l.prototype.getRefs=function(e,t){t=t||e;var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if("$ref"===r&&"string"==typeof i)n[i]=null;else if(s.isObject(i)){var a=this.getRefs(i);for(var o in a)n[o]=null}}return n},l.prototype.retainRoot=function(e,t,n){if(s.isObject(t))for(var r in t){var i=t[r];"$ref"===r&&"string"==typeof i?t[r]=a(n,i):s.isObject(i)&&this.retainRoot(r,i,n)}else s.isString(t)&&"$ref"===e&&(t=a(n,t));return t},l.prototype.resolveInline=function(e,t,n,r,i,a){var o,s,l,u,c=n.$ref,p=n.$ref,h=!1;if(e=e||"",p){if(0===p.indexOf("../")){for(s=p.split("../"),l=e.split("/"),p="",o=0;o<s.length;o++)""===s[o]?l=l.slice(0,l.length-1):p+=s[o];for(e="",o=0;o<l.length-1;o++)o>0&&(e+="/"),e+=l[o];h=!0}if(p.indexOf("#")>=0)if(0===p.indexOf("/"))u=p.split("#"),s=e.split("//"),l=s[1].split("/"),e=s[0]+"//"+l[0]+u[0],a=u[1];else{if(u=p.split("#"),""!==u[0]){if(l=e.split("/"),l=l.slice(0,l.length-1),!h){e="";for(var f=0;f<l.length;f++)f>0&&(e+="/"),e+=l[f]}e+="/"+p.split("#")[0]}a=u[1]}if(0===p.indexOf("http:")||0===p.indexOf("https:"))p.indexOf("#")>=0?(e=p.split("#")[0],a=p.split("#")[1]):(e=p,a=""),r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a});else if(0===p.indexOf("#"))a=p.split("#")[1],r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a});else if(0===p.indexOf("/")&&p.indexOf("#")===-1){a=p;var d=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);d&&(e=d[0]+p.substring(1),a=""),r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else r.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else"array"===n.type&&this.resolveTo(e,n.items,r,a)},l.prototype.resolveTo=function(e,t,n,r){var i,a,o=t.$ref,l=e;if("undefined"!=typeof o&&null!==o){if(o.indexOf("#")>=0){var u=o.split("#");if(u[0]&&0===o.indexOf("/"));else if(!u[0]||0!==u[0].indexOf("http:")&&0!==u[0].indexOf("https:")){if(u[0]&&u[0].length>0){for(i=e.split("/"),l="",a=0;a<i.length-1;a++)l+=i[a]+"/";l+=u[0]}}else l=u[0],o=u[1];r=u[1]}else if(0===o.indexOf("http:")||0===o.indexOf("https:"))l=o,r="";else{for(i=e.split("/"),l="",a=0;a<i.length-1;a++)l+=i[a]+"/";l+=o,r=""}n.push({obj:t,resolveAs:"ref",root:l,key:o,location:r})}else if("array"===t.type){var c=t.items;this.resolveTo(e,c,n,r)}else if(t&&(t.properties||t.additionalProperties)){var p=this.uniqueName("inline_model");t.title&&(p=this.uniqueName(t.title)),delete t.title,this.spec.definitions[p]=s.cloneDeep(t),t.$ref="#/definitions/"+p,delete t.type,delete t.properties}},l.prototype.uniqueName=function(e){for(var t=e,n=0;;){if(!s.isObject(this.spec.definitions[t]))return t;t=e+"_"+n,n++}},l.prototype.resolveAllOf=function(e,t,n){n=n||0,t=t||e;var r;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(null===a)throw new TypeError("Swagger 2.0 does not support null types ("+t+"). See https://github.com/swagger-api/swagger-spec/issues/229.");if("object"==typeof a&&this.resolveAllOf(e,a,n+1),a&&"undefined"!=typeof a.allOf){var o=a.allOf;if(s.isArray(o)){var l=s.cloneDeep(a);delete l.allOf,l["x-composed"]=!0,"undefined"!=typeof a["x-resolved-from"]&&(l["x-resolved-from"]=a["x-resolved-from"]);for(var u=0;u<o.length;u++){var c=o[u],p="self";"undefined"!=typeof c["x-resolved-from"]&&(p=c["x-resolved-from"][0]);for(var h in c)if(l.hasOwnProperty(h))if("properties"===h){var f=c[h];for(r in f){l.properties[r]=s.cloneDeep(f[r]);var d=f[r]["x-resolved-from"];"undefined"!=typeof d&&"self"!==d||(d=p),l.properties[r]["x-resolved-from"]=d}}else if("required"===h){for(var m=l.required.concat(c[h]),g=0;g<m.length;++g)for(var y=g+1;y<m.length;++y)m[g]===m[y]&&m.splice(y--,1);l.required=m}else"x-resolved-from"===h&&l["x-resolved-from"].push(p);else if(l[h]=s.cloneDeep(c[h]),"properties"===h)for(r in l[h])l[h][r]["x-resolved-from"]=p}t[i]=l}}}}},{"./http":5,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isString":146}],7:[function(e,t,n){"use strict";var r=e("./helpers"),i={isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined"),isArray:e("lodash-compat/lang/isArray"),isObject:e("lodash-compat/lang/isObject"),isEmpty:e("lodash-compat/lang/isEmpty"),map:e("lodash-compat/collection/map"),indexOf:e("lodash-compat/array/indexOf"),cloneDeep:e("lodash-compat/lang/cloneDeep"),keys:e("lodash-compat/object/keys"),forEach:e("lodash-compat/collection/forEach")},a=t.exports.optionHtml=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=r.simpleRef(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=o(e.items||e.$ref||{}):(n+="Array[",n+=o(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?r.simpleRef(e.$ref):e.type,n},s=t.exports.schemaToJSON=function(e,t,n,a){e=r.resolveSchema(e),"function"!=typeof a&&(a=function(e){return(e||{})["default"]}),n=n||{};var o,l,u=e.type||"object",c=e.format;return i.isUndefined(e.example)?i.isUndefined(e.items)&&i.isArray(e["enum"])&&(l=e["enum"][0]):l=e.example,i.isUndefined(l)&&(e.$ref?(o=t[r.simpleRef(e.$ref)],i.isUndefined(o)||(i.isUndefined(n[o.name])?(n[o.name]=o,l=s(o.definition,t,n,a),delete n[o.name]):l="array"===o.type?[]:{})):i.isUndefined(e["default"])?"string"===u?l="date-time"===c?(new Date).toISOString():"date"===c?(new Date).toISOString().split("T")[0]:"string":"integer"===u?l=0:"number"===u?l=0:"boolean"===u?l=!0:"object"===u?(l={},i.forEach(e.properties,function(e,r){var o=i.cloneDeep(e);o["default"]=a(e),l[r]=s(o,t,n,a)})):"array"===u&&(l=[],i.isArray(e.items)?i.forEach(e.items,function(e){l.push(s(e,t,n,a))}):i.isPlainObject(e.items)?l.push(s(e.items,t,n,a)):i.isUndefined(e.items)?l.push({}):r.log("Array type's 'items' property is not an array or an object, cannot process")):l=e["default"]),l};t.exports.schemaToHTML=function(e,t,n,o){function s(e,t,a){var o,s=t;return e.$ref?(s=e.title||r.simpleRef(e.$ref),o=n[s]):i.isUndefined(t)&&(s=e.title||"Inline Model "+ ++m,o={definition:e}),a!==!0&&(f[s]=i.isUndefined(o)?{}:o.definition),s}function l(e){var t='<span class="propType">',n=e.type||"object";return e.$ref?t+=s(e,r.simpleRef(e.$ref)):"object"===n?t+=i.isUndefined(e.properties)?"object":s(e):"array"===n?(t+="Array[",i.isArray(e.items)?t+=i.map(e.items,s).join(","):i.isPlainObject(e.items)?t+=i.isUndefined(e.items.$ref)?i.isUndefined(e.items.type)||i.indexOf(["array","object"],e.items.type)!==-1?s(e.items):e.items.type:s(e.items,r.simpleRef(e.items.$ref)):(r.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+="</span>"}function u(e,t){var n="",r=e.type||"object",o="array"===r;switch(o&&(r=i.isPlainObject(e.items)&&!i.isUndefined(e.items.type)?e.items.type:"object"),i.isUndefined(e["default"])||(n+=a("Default",e["default"])),r){case"string":e.minLength&&(n+=a("Min. Length",e.minLength)),e.maxLength&&(n+=a("Max. Length",e.maxLength)),e.pattern&&(n+=a("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=a("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=a("Exclusive Min.","true")),e.maximum&&(n+=a("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=a("Exclusive Max.","true")),e.multipleOf&&(n+=a("Multiple Of",e.multipleOf))}if(o&&(e.minItems&&(n+=a("Min. Items",e.minItems)),e.maxItems&&(n+=a("Max. Items",e.maxItems)),e.uniqueItems&&(n+=a("Unique Items","true")),e.collectionFormat&&(n+=a("Coll. Format",e.collectionFormat))),i.isUndefined(e.items)&&i.isArray(e["enum"])){var s;s="number"===r||"integer"===r?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=a("Enum",s)}return n.length>0&&(t='<span class="propWrap">'+t+'<table class="optionsWrapper"><tr><th colspan="2">'+r+"</th></tr>"+n+"</table></span>"),t}function c(e,t){var a=e.type||"object",c="array"===e.type,f=p+t+" "+(c?"[":"{")+h;if(t&&d.push(t),c)i.isArray(e.items)?f+="<div>"+i.map(e.items,function(e){var t=e.type||"object";return i.isUndefined(e.$ref)?i.indexOf(["array","object"],t)>-1?"object"===t&&i.isUndefined(e.properties)?"object":s(e):u(e,t):s(e,r.simpleRef(e.$ref))}).join(",</div><div>"):i.isPlainObject(e.items)?f+=i.isUndefined(e.items.$ref)?i.indexOf(["array","object"],e.items.type||"object")>-1?(i.isUndefined(e.items.type)||"object"===e.items.type)&&i.isUndefined(e.items.properties)?"<div>object</div>":"<div>"+s(e.items)+"</div>":"<div>"+u(e.items,e.items.type)+"</div>":"<div>"+s(e.items,r.simpleRef(e.items.$ref))+"</div>":(r.log("Array type's 'items' property is not an array or an object, cannot process"),f+="<div>object</div>");else if(e.$ref)f+="<div>"+s(e,t)+"</div>";else if("object"===a){if(i.isPlainObject(e.properties)){var m=i.map(e.properties,function(t,a){var s,c,p=i.indexOf(e.required,a)>=0,h=i.cloneDeep(t),f=p?"required":"",d='<span class="propName '+f+'">'+a+"</span> (";return h["default"]=o(h),h=r.resolveSchema(h),c=t.description||h.description,i.isUndefined(h.$ref)||(s=n[r.simpleRef(h.$ref)],i.isUndefined(s)||i.indexOf([void 0,"array","object"],s.definition.type)!==-1||(h=r.resolveSchema(s.definition))),d+=l(h),p||(d+=', <span class="propOptKey">optional</span>'),t.readOnly&&(d+=', <span class="propReadOnly">read only</span>'),d+=")",i.isUndefined(c)||(d+=': <span class="propDesc">'+c+"</span>"),h["enum"]&&(d+=' = <span class="propVals">[\''+h["enum"].join("', '")+"']</span>"),"<div"+(t.readOnly?' class="readOnly"':"")+">"+u(h,d)}).join(",</div>");m&&(f+=m+"</div>")}}else f+="<div>"+u(e,a)+"</div>";return f+p+(c?"]":"}")+h}var p='<span class="strong">',h="</span>";if(i.isObject(arguments[0])&&(e=void 0,t=arguments[0],n=arguments[1],o=arguments[2]),n=n||{},t=r.resolveSchema(t),i.isEmpty(t))return p+"Empty"+h;if("string"==typeof t.$ref&&(e=r.simpleRef(t.$ref),t=n[e],"undefined"==typeof t))return p+e+" is not defined!"+h;"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof o&&(o=function(e){return(e||{})["default"]});for(var f={},d=[],m=0,g=c(t,e);i.keys(f).length>0;)i.forEach(f,function(e,t){var n=i.indexOf(d,t)>-1;delete f[t],n||(d.push(t),g+="<br />"+c(e,t))});return g}},{"./helpers":4,"lodash-compat/array/indexOf":49,"lodash-compat/collection/forEach":54,"lodash-compat/collection/map":56,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isArray":140,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isUndefined":148,"lodash-compat/object/keys":149}],8:[function(e,t,n){"use strict";var r=e("./http"),i={isObject:e("lodash-compat/lang/isObject")},a=t.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};a.prototype.setDocumentationLocation=function(e){this.docLocation=e},a.prototype.convert=function(e,t,n,r){if(!e||!Array.isArray(e.apis))return this.finish(r,null);this.clientAuthorizations=t;var i={swagger:"2.0"};i.originalVersion=e.swaggerVersion,this.apiInfo(e,i),this.securityDefinitions(e,i),e.basePath&&this.setDocumentationLocation(e.basePath);var a,o=!1;for(a=0;a<e.apis.length;a++){var s=e.apis[a];Array.isArray(s.operations)&&(o=!0)}o?(this.declaration(e,i),this.finish(r,i)):this.resourceListing(e,i,n,r)},a.prototype.declaration=function(e,t){var n,r,a,o;if(e.apis){0===e.basePath.indexOf("http://")?(a=e.basePath.substring("http://".length),o=a.indexOf("/"),o>0?(t.host=a.substring(0,o),t.basePath=a.substring(o)):(t.host=a,t.basePath="/")):0===e.basePath.indexOf("https://")?(a=e.basePath.substring("https://".length),o=a.indexOf("/"),o>0?(t.host=a.substring(0,o),t.basePath=a.substring(o)):(t.host=a,t.basePath="/")):t.basePath=e.basePath;var s;if(e.authorizations&&(s=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),i.isObject(e))for(n in e.models){var l=e.models[n],u=l.id||n;this.modelMap[u]=n}for(r=0;r<e.apis.length;r++){var c=e.apis[r],p=c.path,h=c.operations;this.operations(p,e.resourcePath,h,s,t)}var f=e.models||{};this.models(f,t)}},a.prototype.models=function(e,t){if(i.isObject(e)){var n;t.definitions=t.definitions||{};for(n in e){var r,a=e[n],o=[],s={properties:{}};for(r in a.properties){var l=a.properties[r],u={};this.dataType(l,u),l.description&&(u.description=l.description),l["enum"]&&(u["enum"]=l["enum"]),"boolean"==typeof l.required&&l.required===!0&&o.push(r),"string"==typeof l.required&&"true"===l.required&&o.push(r),s.properties[r]=u}o.length>0?s.required=o:s.required=a.required,t.definitions[n]=s}}},a.prototype.extractTag=function(e){var t=e||"default";return 0!==t.indexOf("http:")&&0!==t.indexOf("https:")||(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},a.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1;for(a=0;a<i.tags.length;a++){var u=i.tags[a];u.name===s&&(l=!0)}for(l||i.tags.push({name:s}),a=0;a<n.length;a++){var c=n[a],p=(c.method||c.httpMethod).toLowerCase(),h={tags:[s]},f=c.authorizations;if(f&&0===Object.keys(f).length&&(f=r),"undefined"!=typeof f){var d;for(var m in f){h.security=h.security||[];var g=f[m];if(g){var y=[];for(var v in g)y.push(g[v].scope);d={},d[m]=y,h.security.push(d)}else d={},d[m]=[],h.security.push(d)}}c.consumes?h.consumes=c.consumes:i.consumes&&(h.consumes=i.consumes),c.produces?h.produces=c.produces:i.produces&&(h.produces=i.produces),c.summary&&(h.summary=c.summary),c.notes&&(h.description=c.notes),c.nickname&&(h.operationId=c.nickname),c.deprecated&&(h.deprecated=c.deprecated),this.authorizations(f,i),this.parameters(h,c.parameters,i),this.responseMessages(h,c,i),o[p]=h}i.paths[e]=o}},a.prototype.responseMessages=function(e,t){if(i.isObject(t)){var n={};this.dataType(t,n),!n.schema&&n.type&&(n={schema:n}),e.responses=e.responses||{};var r=!1;if(Array.isArray(t.responseMessages)){var a,o=t.responseMessages;for(a=0;a<o.length;a++){var s=o[a],l={description:s.message};200===s.code&&(r=!0),s.responseModel&&(l.schema={$ref:"#/definitions/"+s.responseModel}),e.responses[""+s.code]=l}}r?e.responses["default"]=n:e.responses[200]=n}},a.prototype.authorizations=function(e){!i.isObject(e)},a.prototype.parameters=function(e,t){if(Array.isArray(t)){var n;for(n=0;n<t.length;n++){var r=t[n],i={};if(i.name=r.name,i.description=r.description,i.required=r.required,i["in"]=r.paramType,"body"===i["in"]&&(i.name="body"),"form"===i["in"]&&(i["in"]="formData"),r["enum"]&&(i["enum"]=r["enum"]),r.allowMultiple===!0||"true"===r.allowMultiple){var a={};if(this.dataType(r,a),i.type="array",i.items=a,r.allowableValues){var o=r.allowableValues;"LIST"===o.valueType&&(i["enum"]=o.values)}}else this.dataType(r,i);"undefined"!=typeof r.defaultValue&&(i["default"]=r.defaultValue),e.parameters=e.parameters||[],e.parameters.push(i)}}},a.prototype.dataType=function(e,t){if(i.isObject(e)){e.minimum&&(t.minimum=e.minimum),e.maximum&&(t.maximum=e.maximum),e.format&&(t.format=e.format),"undefined"!=typeof e.defaultValue&&(t["default"]=e.defaultValue);var n=this.toJsonSchema(e);n&&(t=t||{},n.type&&(t.type=n.type),n.format&&(t.format=n.format),n.$ref&&(t.schema={$ref:n.$ref}),n.items&&(t.items=n.items))}},a.prototype.toJsonSchema=function(e){if(!e)return"object";var t=e.type||e.dataType||e.responseClass||"",n=t.toLowerCase(),r=(e.format||"").toLowerCase();if(0===n.indexOf("list[")){var i=t.substring(5,t.length-1),a=this.toJsonSchema({type:i});return{type:"array",items:a}}if("int"===n||"integer"===n&&"int32"===r)return{type:"integer",format:"int32"};if("long"===n||"integer"===n&&"int64"===r)return{type:"integer",format:"int64"};if("integer"===n)return{type:"integer",format:"int64"};if("float"===n||"number"===n&&"float"===r)return{type:"number",format:"float"};if("double"===n||"number"===n&&"double"===r)return{type:"number",format:"double"};if("string"===n&&"date-time"===r||"date"===n)return{type:"string",format:"date-time"};if("string"===n)return{type:"string"};if("file"===n)return{type:"file"};if("boolean"===n)return{type:"boolean"};if("boolean"===n)return{type:"boolean"};if("array"===n||"list"===n){if(e.items){var o=this.toJsonSchema(e.items);return{type:"array",items:o}}return{type:"array",items:{type:"object"}}}return e.$ref?{$ref:this.modelMap[e.$ref]?"#/definitions/"+this.modelMap[e.$ref]:e.$ref}:"void"===n||""===n?{}:this.modelMap[e.type]?{$ref:"#/definitions/"+this.modelMap[e.type]}:{type:e.type}},a.prototype.resourceListing=function(e,t,n,i){var a,o=0,s=this,l=e.apis.length,u=t,c={};n&&n.requestInterceptor&&(c.requestInterceptor=n.requestInterceptor),n&&n.responseInterceptor&&(c.responseInterceptor=n.responseInterceptor);var p="application/json";for(n&&n.swaggerRequestHeaders&&(p=n.swaggerRequestHeaders),0===l&&this.finish(i,t),a=0;a<l;a++){var h=e.apis[a],f=h.path,d=this.getAbsolutePath(e.swaggerVersion,this.docLocation,f);h.description&&(t.tags=t.tags||[],t.tags.push({name:this.extractTag(h.path),description:h.description||""}));var m={url:d,headers:{accept:p},on:{},method:"get",timeout:n.timeout};m.on.response=function(e){o+=1;var t=e.obj;t&&s.declaration(t,u),o===l&&s.finish(i,u)},m.on.error=function(e){console.error(e),o+=1,o===l&&s.finish(i,u)},this.clientAuthorizations&&"function"==typeof this.clientAuthorizations.apply&&this.clientAuthorizations.apply(m),(new r).execute(m,c)}},a.prototype.getAbsolutePath=function(e,t,n){if("1.0"===e&&t.endsWith(".json")){var r=t.lastIndexOf("/");r>0&&(t=t.substring(0,r))}var i=t;return 0===n.indexOf("http:")||0===n.indexOf("https:")?i=n:(t.endsWith("/")&&(i=t.substring(0,t.length-1)),i+=n),i=i.replace("{format}","json")},a.prototype.securityDefinitions=function(e,t){if(e.authorizations){var n;for(n in e.authorizations){var r=!1,i={vendorExtensions:{}},a=e.authorizations[n];if("apiKey"===a.type)i.type="apiKey",i["in"]=a.passAs,i.name=a.keyname||n,r=!0;else if("basicAuth"===a.type)i.type="basicAuth",r=!0;else if("oauth2"===a.type){var o,s=a.scopes||[],l={};for(o in s){var u=s[o];l[u.scope]=u.description}if(i.type="oauth2",o>0&&(i.scopes=l),a.grantTypes){if(a.grantTypes.implicit){var c=a.grantTypes.implicit;i.flow="implicit",i.authorizationUrl=c.loginEndpoint,r=!0}if(a.grantTypes.authorization_code&&!i.flow){var p=a.grantTypes.authorization_code;i.flow="accessCode",i.authorizationUrl=p.tokenRequestEndpoint.url,i.tokenUrl=p.tokenEndpoint.url,r=!0}}}r&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[n]=i)}}},a.prototype.apiInfo=function(e,t){if(e.info){var n=e.info;t.info={},n.contact&&(t.info.contact={},t.info.contact.email=n.contact),n.description&&(t.info.description=n.description),n.title&&(t.info.title=n.title),n.termsOfServiceUrl&&(t.info.termsOfService=n.termsOfServiceUrl),(n.license||n.licenseUrl)&&(t.license={},n.license&&(t.license.name=n.license),n.licenseUrl&&(t.license.url=n.licenseUrl))}else this.warnings.push("missing info section")},a.prototype.finish=function(e,t){e(t)}},{"./http":5,"lodash-compat/lang/isObject":144}],9:[function(e,t,n){"use strict";var r=(e("../helpers").log,{isPlainObject:e("lodash-compat/lang/isPlainObject"),isString:e("lodash-compat/lang/isString")}),i=e("../schema-markup.js"),a=e("js-yaml"),o=t.exports=function(e,t,n,r){return this.definition=t||{},this.isArray="array"===t.type,this.models=n||{},this.name=e||t.title||"Inline Model",this.modelPropertyMacro=r||function(e){return e["default"]},this};o.prototype.createJSONSample=o.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&r.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],r.isString(this.definition.example)&&(this.definition.example=a.safeLoad(this.definition.example))):this.definition.example||(this.definition.example=this.examples),i.schemaToJSON(this.definition,this.models,e,this.modelPropertyMacro)},o.prototype.getMockSignature=function(){return i.schemaToHTML(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../helpers":4,"../schema-markup.js":7,"js-yaml":19,"lodash-compat/lang/isPlainObject":145,"lodash-compat/lang/isString":146}],10:[function(e,t,n){"use strict";function r(e,t){if(i.isEmpty(t))return e[0];for(var n=0,r=t.length;n<r;n++)if(e.indexOf(t[n])>-1)return t[n];return e[0]}var i={cloneDeep:e("lodash-compat/lang/cloneDeep"),isUndefined:e("lodash-compat/lang/isUndefined"),isEmpty:e("lodash-compat/lang/isEmpty"),isObject:e("lodash-compat/lang/isObject")},a=e("../helpers"),o=e("./model"),s=e("../http"),l=e("q"),u=t.exports=function(e,t,n,r,i,s,l,u,c){var p=[];e=e||{},s=s||{},e&&e.options&&(this.client=e.options.client||null,this.requestInterceptor=e.options.requestInterceptor||null,this.responseInterceptor=e.options.responseInterceptor||null,this.requestAgent=e.options.requestAgent),this.authorizations=s.security,this.basePath=e.basePath||"/",this.clientAuthorizations=c,this.consumes=s.consumes||e.consumes||["application/json"],this.produces=s.produces||e.produces||["application/json"],this.deprecated=s.deprecated,this.description=s.description,this.host=e.host,this.method=r||p.push("Operation "+n+" is missing method."),this.models=u||{},this.nickname=n||p.push("Operations must have a nickname."),this.operation=s,this.operations={},this.parameters=null!==s?s.parameters||[]:{},this.parent=e,this.path=i||p.push("Operation "+this.nickname+" is missing path."),this.responses=s.responses||{},this.scheme=t||e.scheme||"http",this.schemes=s.schemes||e.schemes,this.security=s.security||e.security,this.summary=s.summary||"",this.timeout=e.timeout,this.type=null,this.useJQuery=e.useJQuery,this.jqueryAjaxCache=e.jqueryAjaxCache,this.enableCookies=e.enableCookies;var h;if(this.host||("undefined"!=typeof window?this.host=window.location.host:this.host="localhost"),this.parameterMacro=e.parameterMacro||function(e,t){return t["default"]},this.inlineModels=[],"/"!==this.basePath&&"/"===this.basePath.slice(-1)&&(this.basePath=this.basePath.slice(0,-1)),"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.deprecated=Boolean(this.deprecated)}var f,d;if(l)for(h in l)d=new o(h,l[h],this.models,e.modelPropertyMacro),d&&(this.models[h]=d);else l={};for(f=0;f<this.parameters.length;f++){var m,g=this.parameters[f];g["default"]=this.parameterMacro(this,g),"array"===g.type&&(g.isList=!0,g.allowMultiple=!0);var y=this.getType(g);y&&"boolean"===y.toString().toLowerCase()&&(g.allowableValues={},g.isList=!0,g["enum"]=[!0,!1]);for(h in g)a.extractExtensions(h,g);"undefined"!=typeof g["x-example"]&&(m=g["x-example"],g["default"]=m),g["x-examples"]&&(m=g["x-examples"]["default"],"undefined"!=typeof m&&(g["default"]=m));var v=g["enum"]||g.items&&g.items["enum"];if("undefined"!=typeof v){var b;for(g.allowableValues={},g.allowableValues.values=[],g.allowableValues.descriptiveValues=[],b=0;b<v.length;b++){var w=v[b],_=w===g["default"]||w+""===g["default"];g.allowableValues.values.push(w),g.allowableValues.descriptiveValues.push({value:w+"",isDefault:_})}}"array"===g.type&&(y=[y],"undefined"==typeof g.allowableValues&&(delete g.isList,delete g.allowMultiple)),g.modelSignature={type:y,definitions:this.models},g.signature=this.getModelSignature(y,this.models).toString(),g.sampleJSON=this.getModelSampleJSON(y,this.models),g.responseClassSignature=g.signature}var x,A,S,j=this.responses;j[200]?(S=j[200],A="200"):j[201]?(S=j[201],A="201"):j[202]?(S=j[202],A="202"):j[203]?(S=j[203],A="203"):j[204]?(S=j[204],A="204"):j[205]?(S=j[205],A="205"):j[206]?(S=j[206],A="206"):j["default"]&&(S=j["default"],A="default");for(x in j)if(a.extractExtensions(x,j),"string"==typeof x&&x.indexOf("x-")===-1){var E=j[x];if("object"==typeof E&&"object"==typeof E.headers){var O=E.headers;for(var k in O){var T=O[k];if("object"==typeof T)for(var C in T)a.extractExtensions(C,T)}}}if(S)for(x in S)a.extractExtensions(x,S);if(S&&S.schema){var I,D=this.resolveModel(S.schema,l);delete j[A],D?(this.successResponse={},I=this.successResponse[A]=D):S.schema.type&&"object"!==S.schema.type&&"array"!==S.schema.type?(this.successResponse={},I=this.successResponse[A]=S.schema):(this.successResponse={},I=this.successResponse[A]=new o((void 0),S.schema||{},this.models,e.modelPropertyMacro)),I&&(I.vendorExtensions=S.vendorExtensions,S.description&&(I.description=S.description),S.examples&&(I.examples=S.examples),S.headers&&(I.headers=S.headers)),this.type=S}return p.length>0&&this.resource&&this.resource.api&&this.resource.api.fail&&this.resource.api.fail(p),this};u.prototype.isDefaultArrayItemValue=function(e,t){return t["default"]&&Array.isArray(t["default"])?t["default"].indexOf(e)!==-1:e===t["default"]},u.prototype.getType=function(e){var t,n=e.type,r=e.format,i=!1;"integer"===n&&"int32"===r?t="integer":"integer"===n&&"int64"===r?t="long":"integer"===n?t="integer":"string"===n?t="date-time"===r?"date-time":"date"===r?"date":"string":"number"===n&&"float"===r?t="float":"number"===n&&"double"===r?t="double":"number"===n?t="double":"boolean"===n?t="boolean":"array"===n?(i=!0,e.items&&(t=this.getType(e.items))):"file"===n&&(t="file"),e.$ref&&(t=a.simpleRef(e.$ref));var o=e.schema;if(o){var s=o.$ref; +return s?(s=a.simpleRef(s),i?[s]:s):"object"===o.type?this.addInlineModel(o):this.getType(o)}return i?[t]:t},u.prototype.addInlineModel=function(e){var t=this.inlineModels.length,n=this.resolveModel(e,{});return n?(this.inlineModels.push(n),"Inline Model "+t):null},u.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},u.prototype.resolveModel=function(e,t){if("undefined"!=typeof e.$ref){var n=e.$ref;if(0===n.indexOf("#/definitions/")&&(n=n.substring("#/definitions/".length)),t[n])return new o(n,t[n],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||i.isUndefined(e.type)))return new o((void 0),e,this.models,this.parent.modelPropertyMacro);return null},u.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",n=0;n<this.parameters.length;n++){var r=this.parameters[n],i=r.signature;t+="\n * "+r.name+" ("+i+"): "+r.description}return"undefined"==typeof e&&a.log(t),t},u.prototype.getModelSignature=function(e,t){var n,r;return e instanceof Array&&(r=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):this.getInlineModel(e)?(e=this.getInlineModel(e),n=!1):n=!0,n?r?"Array["+e+"]":e.toString():r?"Array["+e.getMockSignature()+"]":e.getMockSignature()},u.prototype.supportHeaderParams=function(){return!0},u.prototype.supportedSubmitMethods=function(){return this.parent.supportedSubmitMethods},u.prototype.getHeaderParams=function(e){for(var t=this.setContentTypes(e,{}),n={},r=0;r<this.parameters.length;r++){var i=this.parameters[r];"header"===i["in"]&&(n[i.name.toLowerCase()]=i)}for(var a in e){var o=n[a.toLowerCase()];if("undefined"!=typeof o){var s=e[a];Array.isArray(s)&&(s=s.toString()),t[o.name]=s}}return t},u.prototype.urlify=function(e,t){for(var n={},r=this.path.replace(/#.*/,""),i="",a=0;a<this.parameters.length;a++){var o=this.parameters[a];if("undefined"!=typeof e[o.name]){var s;if("string"===o.type&&"password"===o.format&&t&&(s=!0),"path"===o["in"]){var l=new RegExp("{"+o.name+"}","gi"),u=e[o.name];u=Array.isArray(u)?this.encodePathCollection(o.collectionFormat,o.name,u,s):this.encodePathParam(u,s),r=r.replace(l,u)}else if("query"===o["in"]&&"undefined"!=typeof e[o.name])if(i+=""===i&&r.indexOf("?")<0?"?":"&","undefined"!=typeof o.collectionFormat){var c=e[o.name];i+=Array.isArray(c)?this.encodeQueryCollection(o.collectionFormat,o.name,c,s):this.encodeQueryKey(o.name)+"="+this.encodeQueryParam(e[o.name],s)}else i+=this.encodeQueryKey(o.name)+"="+this.encodeQueryParam(e[o.name],s);else"formData"===o["in"]&&(n[o.name]=e[o.name])}}var p=this.scheme+"://"+this.host;return"/"!==this.basePath&&(p+=this.basePath),p+r+i},u.prototype.getMissingParams=function(e){var t,n=[];for(t=0;t<this.parameters.length;t++){var r=this.parameters[t];r.required===!0&&"undefined"==typeof e[r.name]&&(n=r.name)}return n},u.prototype.getBody=function(e,t,n){for(var r,i,a,o,s,l={},u=!1,p=0;p<this.parameters.length;p++)if(i=this.parameters[p],"undefined"!=typeof t[i.name]){var h;"string"===i.type&&"password"===i.format&&(h="password"),"body"===i["in"]?a=t[i.name]:"formData"===i["in"]&&(l[i.name]={param:i,value:t[i.name],password:h},r=!0)}else"body"===i["in"]&&(u=!0);if(u&&"undefined"==typeof a){var f=e["Content-Type"];f&&0===f.indexOf("application/json")&&(a="{}")}var d=!1;if(e["Content-Type"]&&e["Content-Type"].indexOf("multipart/form-data")>=0&&(d=!0),r&&!d){var m="";for(o in l){i=l[o].param,s=l[o].value;var g;n&&n.maskPasswords&&(g=l[o].password),"undefined"!=typeof s&&(Array.isArray(s)?(""!==m&&(m+="&"),m+=this.encodeQueryCollection(i.collectionFormat,o,s,g)):(""!==m&&(m+="&"),m+=encodeURIComponent(o)+"="+c(encodeURIComponent(s),g)))}a=m}else if(d){var y;if("function"==typeof FormData){y=new FormData,y.type="formData";for(o in l)if(i=l[o].param,s=t[o],"undefined"!=typeof s)if("[object File]"==={}.toString.apply(s))y.append(o,s);else if("file"===s.type&&s.value)y.append(o,s.value);else if(Array.isArray(s))if("multi"===i.collectionFormat){y["delete"](o);for(var v in s)y.append(o,s[v])}else y.append(o,this.encodeQueryCollection(i.collectionFormat,o,s).split("=").slice(1).join("="));else y.append(o,s);a=y}else{y={};for(o in l)if(s=t[o],Array.isArray(s)){var b,w=i.collectionFormat||"multi";if("ssv"===w)b=" ";else if("pipes"===w)b="|";else if("tsv"===w)b="\t";else{if("multi"===w){y[o]=s;break}b=","}var _;s.forEach(function(e){_?_+=b:_="",_+=e}),y[o]=_}else y[o]=s;a=y}e["Content-Type"]="multipart/form-data"}return a},u.prototype.getModelSampleJSON=function(e,t){var n,r,a;if(t=t||{},n=e instanceof Array,a=n?e[0]:e,t[a]?r=t[a].createJSONSample():this.getInlineModel(a)&&(r=this.getInlineModel(a).createJSONSample()),r){if(r=n?[r]:r,"string"==typeof r)return r;if(i.isObject(r)){var o=r;if(r instanceof Array&&r.length>0&&(o=r[0]),o.nodeName&&"Node"==typeof o){var s=(new XMLSerializer).serializeToString(o);return this.formatXml(s)}return JSON.stringify(r,null,2)}return r}},u.prototype["do"]=function(e,t,n,r,i){return this.execute(e,t,n,r,i)},u.prototype.execute=function(e,t,n,r,o){var u,c,p,h,f=e||{},d={};i.isObject(t)&&(d=t,u=n,c=r),h="undefined"!=typeof d.timeout?d.timeout:this.timeout,this.client&&(d.client=this.client),this.requestAgent&&(d.requestAgent=this.requestAgent),!d.requestInterceptor&&this.requestInterceptor&&(d.requestInterceptor=this.requestInterceptor),!d.responseInterceptor&&this.responseInterceptor&&(d.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(u=t,c=n),this.parent.usePromise?p=l.defer():(u=u||this.parent.defaultSuccessCallback||a.log,c=c||this.parent.defaultErrorCallback||a.log),"undefined"==typeof d.useJQuery&&(d.useJQuery=this.useJQuery),"undefined"==typeof d.jqueryAjaxCache&&(d.jqueryAjaxCache=this.jqueryAjaxCache),"undefined"==typeof d.enableCookies&&(d.enableCookies=this.enableCookies);var m=this.getMissingParams(f);if(m.length>0){var g="missing required params: "+m;return a.fail(g),this.parent.usePromise?(p.reject(g),p.promise):(c(g,o),{})}var y,v=this.getHeaderParams(f),b=this.setContentTypes(f,d),w={};for(y in v)w[y]=v[y];for(y in b)w[y]=b[y];var _=this.getBody(b,f,d),x=this.urlify(f,d.maskPasswords);if(x.indexOf(".{format}")>0&&w){var A=w.Accept||w.accept;A&&A.indexOf("json")>0?x=x.replace(".{format}",".json"):A&&A.indexOf("xml")>0&&(x=x.replace(".{format}",".xml"))}var S={url:x,method:this.method.toUpperCase(),body:_,enableCookies:d.enableCookies,useJQuery:d.useJQuery,jqueryAjaxCache:d.jqueryAjaxCache,deferred:p,headers:w,clientAuthorizations:d.clientAuthorizations,operation:this,connectionAgent:this.connectionAgent,on:{response:function(e){return p?(p.resolve(e),p.promise):u(e,o)},error:function(e){return p?(p.reject(e),p.promise):c(e,o)}}};return h&&(S.timeout=h),this.clientAuthorizations.apply(S,this.operation.security),d.mock===!0?S:(new s).execute(S,d)},u.prototype.setContentTypes=function(e,t){var n,i,o=this.parameters,s=e.parameterContentType||r(this.consumes,["application/json","application/yaml"]),l=t.responseContentType||r(this.produces,["application/json","application/yaml"]),u=[],c=[],p={};for(i=0;i<o.length;i++){var h=o[i];if("formData"===h["in"])"file"===h.type?u.push(h):c.push(h);else if("header"===h["in"]&&t){var f=h.name,d=t[h.name];"undefined"!=typeof t[h.name]&&(p[f]=d)}else"body"===h["in"]&&"undefined"!=typeof e[h.name]&&(n=e[h.name])}var m=n||u.length||c.length;if("post"===this.method||"put"===this.method||"patch"===this.method||("delete"===this.method||"get"===this.method)&&m){if(t.requestContentType&&(s=t.requestContentType),c.length>0){if(s=void 0,t.requestContentType)s=t.requestContentType;else if(u.length>0)s="multipart/form-data";else if(this.consumes&&this.consumes.length>0)for(var g in this.consumes){var y=this.consumes[g];0!==y.indexOf("application/x-www-form-urlencoded")&&0!==y.indexOf("multipart/form-data")||(s=y)}"undefined"==typeof s&&(s="application/x-www-form-urlencoded")}}else s=null;return s&&this.consumes&&this.consumes.indexOf(s)===-1&&a.log("server doesn't consume "+s+", try "+JSON.stringify(this.consumes)),this.matchesAccept(l)||a.log("server can't produce "+l),s&&""!==n||"application/x-www-form-urlencoded"===s?p["Content-Type"]=s:this.consumes&&this.consumes.length>0&&"application/x-www-form-urlencoded"===this.consumes[0]&&(p["Content-Type"]=this.consumes[0]),l&&(p.Accept=l),p},u.prototype.matchesAccept=function(e){return!e||!this.produces||(this.produces.indexOf(e)!==-1||this.produces.indexOf("*/*")!==-1)},u.prototype.asCurl=function(e,t){var n={mock:!0,maskPasswords:!0};if("object"==typeof t)for(var r in t)n[r]=t[r];var a=this.execute(e,n);this.clientAuthorizations.apply(a,this.operation.security);var o=[];if(o.push("-X "+this.method.toUpperCase()),"undefined"!=typeof a.headers){var s;for(s in a.headers){var l=a.headers[s];"string"==typeof l&&(l=l.replace(/\'/g,"\\u0027")),o.push("--header '"+s+": "+l+"'")}}var u=!1,p=!1,h=a.headers["Content-Type"];if(h&&0===h.indexOf("application/x-www-form-urlencoded")?u=!0:h&&0===h.indexOf("multipart/form-data")&&(u=!0,p=!0),a.body){var f;if(i.isObject(a.body)){if(p){p=!0;for(var d=0;d<this.parameters.length;d++){var m=this.parameters[d];if("formData"===m["in"]){f||(f="");var g;if(g="function"==typeof FormData&&a.body instanceof FormData?a.body.getAll(m.name):a.body[m.name])if("file"===m.type)g.name&&(f+="-F "+m.name+'=@"'+g.name+'" ');else if(Array.isArray(g))if("multi"===m.collectionFormat)for(var y in g)f+="-F "+this.encodeQueryKey(m.name)+"="+c(g[y],m.format)+" ";else f+="-F "+this.encodeQueryCollection(m.collectionFormat,m.name,c(g,m.format))+" ";else f+="-F "+this.encodeQueryKey(m.name)+"="+c(g,m.format)+" "}}}f||(f=JSON.stringify(a.body))}else f=a.body;f=f.replace(/\'/g,"%27").replace(/\n/g," \\ \n "),u||(f=f.replace(/&/g,"%26")),p?o.push(f):o.push("-d '"+f.replace(/@/g,"%40")+"'")}return"curl "+o.join(" ")+" '"+a.url+"'"},u.prototype.encodePathCollection=function(e,t,n,r){var i,a="",o="";for(o="ssv"===e?"%20":"tsv"===e?"%09":"pipes"===e?"|":",",i=0;i<n.length;i++)0===i?a=this.encodeQueryParam(n[i],r):a+=o+this.encodeQueryParam(n[i],r);return a},u.prototype.encodeQueryCollection=function(e,t,n,r){var i,a="";if(e=e||"default","default"===e||"multi"===e)for(i=0;i<n.length;i++)i>0&&(a+="&"),a+=this.encodeQueryKey(t)+"="+c(this.encodeQueryParam(n[i]),r);else{var o="";if("csv"===e)o=",";else if("ssv"===e)o="%20";else if("tsv"===e)o="%09";else if("pipes"===e)o="|";else if("brackets"===e)for(i=0;i<n.length;i++)0!==i&&(a+="&"),a+=this.encodeQueryKey(t)+"[]="+c(this.encodeQueryParam(n[i]),r);if(""!==o)for(i=0;i<n.length;i++)0===i?a=this.encodeQueryKey(t)+"="+this.encodeQueryParam(n[i]):a+=o+this.encodeQueryParam(n[i])}return a},u.prototype.encodeQueryKey=function(e){return encodeURIComponent(e).replace("%5B","[").replace("%5D","]").replace("%24","$")},u.prototype.encodeQueryParam=function(e,t){return t?"******":encodeURIComponent(e)},u.prototype.encodePathParam=function(e,t){return encodeURIComponent(e,t)};var c=function(e,t){return"string"==typeof t&&"password"===t?"******":e}},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":138,"lodash-compat/lang/isEmpty":141,"lodash-compat/lang/isObject":144,"lodash-compat/lang/isUndefined":148,q:157}],11:[function(e,t,n){"use strict";var r=t.exports=function(e,t,n,r){this.description=t,this.externalDocs=n,this.name=e,this.operation=r,this.operationsArray=[],this.path=e,this.tag=e};r.prototype.sort=function(){}},{}],12:[function(e,t,n){function r(){if(!s){s=!0;for(var e,t=o.length;t;){e=o,o=[];for(var n=-1;++n<t;)e[n]();t=o.length}s=!1}}function i(){}var a=t.exports={},o=[],s=!1;a.nextTick=function(e){o.push(e),s||setTimeout(r,0)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],13:[function(e,t,n){(function(e){!function(){"use strict";function n(t){var n;return n=t instanceof e?t:new e(t.toString(),"binary"),n.toString("base64")}t.exports=n}()}).call(this,e("buffer").Buffer)},{buffer:14}],14:[function(e,t,n){function r(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e){return this instanceof i?(this.length=0,this.parent=void 0,"number"==typeof e?a(this,e):"string"==typeof e?o(this,e,arguments.length>1?arguments[1]:"utf8"):s(this,e)):arguments.length>1?new i(e,arguments[1]):new i(e)}function a(e,t){if(e=d(e,t<0?0:0|m(t)),!i.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;n++)e[n]=0;return e}function o(e,t,n){"string"==typeof n&&""!==n||(n="utf8");var r=0|y(t,n);return e=d(e,r),e.write(t,n),e}function s(e,t){if(i.isBuffer(t))return l(e,t);if(Q(t))return u(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return c(e,t);if(t instanceof ArrayBuffer)return p(e,t)}return t.length?h(e,t):f(e,t)}function l(e,t){var n=0|m(t.length);return e=d(e,n),t.copy(e,0,0,n),e}function u(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function c(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e,t){return i.TYPED_ARRAY_SUPPORT?(t.byteLength,e=i._augment(new Uint8Array(t))):e=c(e,new Uint8Array(t)),e}function h(e,t){var n=0|m(t.length);e=d(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e,t){var n,r=0;"Buffer"===t.type&&Q(t.data)&&(n=t.data,r=0|m(n.length)),e=d(e,r);for(var i=0;i<r;i+=1)e[i]=255&n[i];return e}function d(e,t){i.TYPED_ARRAY_SUPPORT?e=i._augment(new Uint8Array(t)):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=i.poolSize>>>1;return n&&(e.parent=G),e}function m(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var n=new i(e,t);return delete n.parent,n}function y(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return $(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),t<0&&(t=0),n>this.length&&(n=this.length),n<=t)return"";for(;;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"binary":return T(this,t,n);case"base64":return j(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function w(e,t,n,r){return Y($(t,e.length-n),e,n,r)}function _(e,t,n,r){return Y(F(t),e,n,r)}function x(e,t,n,r){return _(e,t,n,r)}function A(e,t,n,r){return Y(H(t),e,n,r)}function S(e,t,n,r){return Y(V(t,e.length-n),e,n,r)}function j(e,t,n){return 0===t&&n===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var l,u,c,p;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&p<1114112&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return O(r)}function O(e){var t=e.length;if(t<=K)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=K));return n}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;i++)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;i++)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;a++)i+=N(e[a]);return i}function I(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function D(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,a,o){if(!i.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>a||t<o)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function U(e,t,n,r,i,a){if(t>i||t<a)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(n<0)throw new RangeError("index out of range")}function P(e,t,n,r,i){return i||U(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||U(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(e,t,n,r,52,8),n+8}function B(e){if(e=z(e).replace(Z,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;o++){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function V(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);o++)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function H(e){return J.toByteArray(B(e))}function Y(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}var J=e("base64-js"),W=e("ieee754"),Q=e("is-array");n.Buffer=i,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,i.poolSize=8192;var G={};i.TYPED_ARRAY_SUPPORT=function(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}(),i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,a=0,o=Math.min(n,r);a<o&&e[a]===t[a];)++a;return a!==o&&(n=e[a],r=t[a]),n<r?-1:r<n?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Q(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new i(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var r=new i(t),a=0;for(n=0;n<e.length;n++){var o=e[n];o.copy(r,a),a+=o.length}return r},i.byteLength=y,i.prototype.length=void 0,i.prototype.parent=void 0,i.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):v.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:i.compare(this,e)},i.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,i=0;n+i<e.length;i++)if(e[n+i]===t[r===-1?0:i-r]){if(r===-1&&(r=i),i-r+1===t.length)return n+r}else r=-1;return-1}if(t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(t<0&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(i.isBuffer(e))return n(this,e,t);if("number"==typeof e)return i.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},i.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},i.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"binary":return x(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r;if(i.TYPED_ARRAY_SUPPORT)r=i._augment(this.subarray(e,t));else{var a=t-e;r=new i(a,(void 0));for(var o=0;o<a;o++)r[o]=this[o+e]}return r.length&&(r.parent=this.parent||this),r},i.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},i.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||D(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||D(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||D(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},i.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),W.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),W.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),W.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),W.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||L(this,e,t,n,Math.pow(2,8*n),0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||L(this,e,t,n,Math.pow(2,8*n),0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):M(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):R(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):R(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=0,o=1,s=e<0?1:0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=e<0?1:0;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):M(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):R(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var a,o=r-n;if(this===e&&n<t&&t<r)for(a=o-1;a>=0;a--)e[a+t]=this[a+n];else if(o<1e3||!i.TYPED_ARRAY_SUPPORT)for(a=0;a<o;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+o),t);return o},i.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),n<t)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(t<0||t>=this.length)throw new RangeError("start out of bounds");if(n<0||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;r<n;r++)this[r]=e;else{var i=$(e.toString()),a=i.length;for(r=t;r<n;r++)this[r]=i[r%a]}return this}},i.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(i.TYPED_ARRAY_SUPPORT)return new i(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t<n;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var X=i.prototype;i._augment=function(e){return e.constructor=i,e._isBuffer=!0,e._set=e.set,e.get=X.get,e.set=X.set,e.write=X.write,e.toString=X.toString,e.toLocaleString=X.toString,e.toJSON=X.toJSON,e.equals=X.equals,e.compare=X.compare,e.indexOf=X.indexOf,e.copy=X.copy,e.slice=X.slice,e.readUIntLE=X.readUIntLE,e.readUIntBE=X.readUIntBE,e.readUInt8=X.readUInt8,e.readUInt16LE=X.readUInt16LE,e.readUInt16BE=X.readUInt16BE,e.readUInt32LE=X.readUInt32LE,e.readUInt32BE=X.readUInt32BE,e.readIntLE=X.readIntLE,e.readIntBE=X.readIntBE,e.readInt8=X.readInt8,e.readInt16LE=X.readInt16LE,e.readInt16BE=X.readInt16BE,e.readInt32LE=X.readInt32LE,e.readInt32BE=X.readInt32BE,e.readFloatLE=X.readFloatLE,e.readFloatBE=X.readFloatBE,e.readDoubleLE=X.readDoubleLE,e.readDoubleBE=X.readDoubleBE,e.writeUInt8=X.writeUInt8,e.writeUIntLE=X.writeUIntLE,e.writeUIntBE=X.writeUIntBE,e.writeUInt16LE=X.writeUInt16LE,e.writeUInt16BE=X.writeUInt16BE,e.writeUInt32LE=X.writeUInt32LE,e.writeUInt32BE=X.writeUInt32BE,e.writeIntLE=X.writeIntLE,e.writeIntBE=X.writeIntBE,e.writeInt8=X.writeInt8,e.writeInt16LE=X.writeInt16LE,e.writeInt16BE=X.writeInt16BE,e.writeInt32LE=X.writeInt32LE,e.writeInt32BE=X.writeInt32BE,e.writeFloatLE=X.writeFloatLE,e.writeFloatBE=X.writeFloatBE,e.writeDoubleLE=X.writeDoubleLE,e.writeDoubleBE=X.writeDoubleBE,e.fill=X.fill,e.inspect=X.inspect,e.toArrayBuffer=X.toArrayBuffer,e};var Z=/[^+\/0-9A-Za-z-_]/g},{"base64-js":15,ieee754:16,"is-array":17}],15:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o||t===p?62:t===s||t===h?63:t<l?-1:t<l+10?t-l+26+26:t<c+26?t-c:t<u+26?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var r,i,o,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new a(3*e.length/4-l),o=l>0?e.length-4:e.length;var p=0;for(r=0,i=0;r<o;r+=4,i+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,a,o,s=e.length%3,l="";for(i=0,o=e.length-s;i<o;i+=3)a=(e[i]<<16)+(e[i+1]<<8)+e[i+2],l+=n(a);switch(s){case 1:a=e[e.length-1],l+=t(a>>2),l+=t(a<<4&63),l+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],l+=t(a>>10),l+=t(a>>4&63),l+=t(a<<2&63),l+="="}return l}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),h="_".charCodeAt(0); +e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],16:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,r),a-=u}return(f?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,p=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?h/l:h*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+f]=255&o,f+=d,o/=256,u-=8);e[n+f-d]|=128*m}},{}],17:[function(e,t,n){var r=Array.isArray,i=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],18:[function(e,t,n){!function(){"use strict";function e(t,n,r,i){return this instanceof e?(this.domain=t||void 0,this.path=n||"/",this.secure=!!r,this.script=!!i,this):new e(t,n,r,i)}function t(e,n,r){return e instanceof t?e:this instanceof t?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(r||"/"),this.explicit_path=!1,this.domain=n||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,e&&this.parse(e,n,r),this):new t(e,n,r)}function r(){var e,n,i;return this instanceof r?(e=Object.create(null),this.setCookie=function(r,a,o){var s,l;if(r=new t(r,a,o),s=r.expiration_date<=Date.now(),void 0!==e[r.name]){for(n=e[r.name],l=0;l<n.length;l+=1)if(i=n[l],i.collidesWith(r))return s?(n.splice(l,1),0===n.length&&delete e[r.name],!1):(n[l]=r,r);return!s&&(n.push(r),r)}return!s&&(e[r.name]=[r],e[r.name])},this.getCookie=function(t,r){var i,a;if(n=e[t])for(a=0;a<n.length;a+=1)if(i=n[a],i.expiration_date<=Date.now())0===n.length&&delete e[i.name];else if(i.matches(r))return i},this.getCookies=function(t){var n,r,i=[];for(n in e)r=this.getCookie(n,t),r&&i.push(r);return i.toString=function(){return i.join(":")},i.toValueString=function(){return i.map(function(e){return e.toValueString()}).join(";")},i},this):new r}n.CookieAccessInfo=e,n.Cookie=t,t.prototype.toString=function(){var e=[this.name+"="+this.value];return this.expiration_date!==1/0&&e.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&e.push("domain="+this.domain),this.path&&e.push("path="+this.path),this.secure&&e.push("secure"),this.noscript&&e.push("httponly"),e.join("; ")},t.prototype.toValueString=function(){return this.name+"="+this.value};var i=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;t.prototype.parse=function(e,n,r){if(this instanceof t){var i,a=e.split(";").filter(function(e){return!!e}),o=a[0].match(/([^=]+)=([\s\S]*)/),s=o[1],l=o[2];for(this.name=s,this.value=l,i=1;i<a.length;i+=1)switch(o=a[i].match(/([^=]+)(?:=([\s\S]*))?/),s=o[1].trim().toLowerCase(),l=o[2],s){case"httponly":this.noscript=!0;break;case"expires":this.expiration_date=l?Number(Date.parse(l)):1/0;break;case"path":this.path=l?l.trim():"",this.explicit_path=!0;break;case"domain":this.domain=l?l.trim():"",this.explicit_domain=!!this.domain;break;case"secure":this.secure=!0}return this.explicit_path||(this.path=r||"/"),this.explicit_domain||(this.domain=n),this}return(new t).parse(e,n,r)},t.prototype.matches=function(e){return!(this.noscript&&e.script||this.secure&&!e.secure||!this.collidesWith(e))},t.prototype.collidesWith=function(e){if(this.path&&!e.path||this.domain&&!e.domain)return!1;if(this.path&&0!==e.path.indexOf(this.path))return!1;if(this.explicit_path&&0!==e.path.indexOf(this.path))return!1;var t=e.domain&&e.domain.replace(/^[\.]/,""),n=this.domain&&this.domain.replace(/^[\.]/,"");if(n===t)return!0;if(n){if(!this.explicit_domain)return!1;var r=t.indexOf(n);return r!==-1&&r===t.length-n.length}return!0},n.CookieJar=r,r.prototype.setCookies=function(e,n,r){e=Array.isArray(e)?e:e.split(i);var a,o,s=[];for(e=e.map(function(e){return new t(e,n,r)}),a=0;a<e.length;a+=1)o=e[a],this.setCookie(o,n,r)&&s.push(o);return s}}()},{}],19:[function(e,t,n){"use strict";var r=e("./lib/js-yaml.js");t.exports=r},{"./lib/js-yaml.js":20}],20:[function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=e("./js-yaml/loader"),a=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=a.dump,t.exports.safeDump=a.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=r("scan"),t.exports.parse=r("parse"),t.exports.compose=r("compose"),t.exports.addConstructor=r("addConstructor")},{"./js-yaml/dumper":22,"./js-yaml/exception":23,"./js-yaml/loader":24,"./js-yaml/schema":26,"./js-yaml/schema/core":27,"./js-yaml/schema/default_full":28,"./js-yaml/schema/default_safe":29,"./js-yaml/schema/failsafe":30,"./js-yaml/schema/json":31,"./js-yaml/type":32}],21:[function(e,t,n){"use strict";function r(e){return"undefined"==typeof e||null===e}function i(e){return"object"==typeof e&&null!==e}function a(e){return Array.isArray(e)?e:r(e)?[]:[e]}function o(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function s(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r}function l(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=r,t.exports.isObject=i,t.exports.toArray=a,t.exports.repeat=s,t.exports.isNegativeZero=l,t.exports.extend=o},{}],22:[function(e,t,n){"use strict";function r(e,t){var n,r,i,a,o,s,l;if(null===t)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap[o],l&&R.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[o]=s;return n}function i(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else{if(!(e<=4294967295))throw new I("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+C.repeat("0",r-t.length)+t}function a(e){this.schema=e.schema||D,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=C.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var n,r=C.repeat(" ",t),i=0,a=-1,o="",s=e.length;i<s;)a=e.indexOf("\n",i),a===-1?(n=e.slice(i),i=s):(n=e.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(o+=r),o+=n;return o}function s(e,t){return"\n"+C.repeat(" ",e.indent*t)}function l(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function u(e){return e===q||e===U}function c(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function p(e){return c(e)&&65279!==e&&e!==Y&&e!==X&&e!==Z&&e!==te&&e!==re&&e!==W&&e!==N}function h(e){return c(e)&&65279!==e&&!u(e)&&e!==J&&e!==G&&e!==W&&e!==Y&&e!==X&&e!==Z&&e!==te&&e!==re&&e!==N&&e!==F&&e!==H&&e!==B&&e!==ne&&e!==Q&&e!==V&&e!==z&&e!==$&&e!==K&&e!==ee}function f(e,t,n,r,i){var a,o,s=!1,l=!1,f=r!==-1,d=-1,m=h(e.charCodeAt(0))&&!u(e.charCodeAt(e.length-1));if(t)for(a=0;a<e.length;a++){if(o=e.charCodeAt(a),!c(o))return ce;m=m&&p(o)}else{for(a=0;a<e.length;a++){if(o=e.charCodeAt(a),o===P)s=!0,f&&(l=l||a-d-1>r&&" "!==e[d+1],d=a);else if(!c(o))return ce;m=m&&p(o)}l=l||f&&a-d-1>r&&" "!==e[d+1]}return s||l?" "===e[0]&&n>9?ce:l?ue:le:m&&!i(e)?oe:se}function d(e,t,n,r){e.dump=function(){function i(t){return l(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&ae.indexOf(t)!==-1)return"'"+t+"'";var a=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),u=r||e.flowLevel>-1&&n>=e.flowLevel;switch(f(t,u,e.indent,s,i)){case oe:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case le:return"|"+m(t,e.indent)+g(o(t,a));case ue:return">"+m(t,e.indent)+g(o(y(t,s),a));case ce:return'"'+b(t,s)+'"';default:throw new I("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",r="\n"===e[e.length-1],i=r&&("\n"===e[e.length-2]||"\n"===e),a=i?"+":r?"":"-";return n+a+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,a=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,i.lastIndex=n,v(e.slice(0,n),t)}(),o="\n"===e[0]||" "===e[0];r=i.exec(e);){var s=r[1],l=r[2];n=" "===l[0],a+=s+(o||n||""===l?"":"\n")+v(l,t),o=n}return a}function v(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,a=0,o=0,s=0,l="";n=i.exec(e);)s=n.index,s-a>t&&(r=o>a?o:s,l+="\n"+e.slice(a,r),a=r+1),o=s;return l+="\n",l+=e.length-a>t&&o>a?e.slice(a,o)+"\n"+e.slice(o+1):e.slice(a),l.slice(1)}function b(e){for(var t,n,r="",a=0;a<e.length;a++)t=e.charCodeAt(a),n=ie[t],r+=!n&&c(t)?e[a]:n||i(t);return r}function w(e,t,n){var r,i,a="",o=e.tag;for(r=0,i=n.length;r<i;r+=1)j(e,t,n[r],!1,!1)&&(0!==r&&(a+=", "),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function _(e,t,n,r){var i,a,o="",l=e.tag;for(i=0,a=n.length;i<a;i+=1)j(e,t+1,n[i],!0,!0)&&(r&&0===i||(o+=s(e,t)),o+="- "+e.dump);e.tag=l,e.dump=o||"[]"}function x(e,t,n){var r,i,a,o,s,l="",u=e.tag,c=Object.keys(n);for(r=0,i=c.length;r<i;r+=1)s="",0!==r&&(s+=", "),a=c[r],o=n[a],j(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",j(e,t,o,!1,!1)&&(s+=e.dump,l+=s));e.tag=u,e.dump="{"+l+"}"}function A(e,t,n,r){var i,a,o,l,u,c,p="",h=e.tag,f=Object.keys(n);if(e.sortKeys===!0)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new I("sortKeys must be a boolean or a function");for(i=0,a=f.length;i<a;i+=1)c="",r&&0===i||(c+=s(e,t)),o=f[i],l=n[o],j(e,t+1,o,!0,!0,!0)&&(u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,u&&(c+=e.dump&&P===e.dump.charCodeAt(0)?"?":"? "),c+=e.dump,u&&(c+=s(e,t)),j(e,t+1,l,!0,u)&&(c+=e.dump&&P===e.dump.charCodeAt(0)?":":": ",c+=e.dump,p+=c));e.tag=h,e.dump=p||"{}"}function S(e,t,n){var r,i,a,o,s,l;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===M.call(s.represent))r=s.represent(t,l);else{if(!R.call(s.represent,l))throw new I("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');r=s.represent[l](t,l)}e.dump=r}return!0}return!1}function j(e,t,n,r,i,a){e.tag=null,e.dump=n,S(e,n,!1)||S(e,n,!0);var o=M.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,l,u="[object Object]"===o||"[object Array]"===o;if(u&&(s=e.duplicates.indexOf(n),l=s!==-1),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(i=!1),l&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&l&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===o)r&&0!==Object.keys(e.dump).length?(A(e,t,e.dump,i),l&&(e.dump="&ref_"+s+e.dump)):(x(e,t,e.dump),l&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===o)r&&0!==e.dump.length?(_(e,t,e.dump,i),l&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),l&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new I("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&d(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function E(e,t){var n,r,i=[],a=[];for(O(e,i,a),n=0,r=a.length;n<r;n+=1)t.duplicates.push(i[a[n]]);t.usedDuplicates=new Array(r)}function O(e,t,n){var r,i,a;if(null!==e&&"object"==typeof e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)O(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)O(e[r[i]],t,n)}function k(e,t){t=t||{};var n=new a(t);return n.noRefs||E(e,n),j(n,0,e,!0,!0)?n.dump+"\n":""}function T(e,t){return k(e,C.extend({schema:L},t))}var C=e("./common"),I=e("./exception"),D=e("./schema/default_full"),L=e("./schema/default_safe"),M=Object.prototype.toString,R=Object.prototype.hasOwnProperty,U=9,P=10,q=32,B=33,z=34,N=35,$=37,F=38,V=39,H=42,Y=44,J=45,W=58,Q=62,G=63,K=64,X=91,Z=93,ee=96,te=123,ne=124,re=125,ie={};ie[0]="\\0",ie[7]="\\a",ie[8]="\\b",ie[9]="\\t",ie[10]="\\n",ie[11]="\\v",ie[12]="\\f",ie[13]="\\r",ie[27]="\\e",ie[34]='\\"',ie[92]="\\\\",ie[133]="\\N",ie[160]="\\_",ie[8232]="\\L",ie[8233]="\\P";var ae=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],oe=1,se=2,le=3,ue=4,ce=5;t.exports.dump=k,t.exports.safeDump=T},{"./common":21,"./exception":23,"./schema/default_full":28,"./schema/default_safe":29}],23:[function(e,t,n){"use strict";function r(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=r},{}],24:[function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function l(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return 48<=e&&e<=57?e-48:-1}function c(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||V,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(e,t){return new N(t,new $(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw f(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,f(e,t))}function g(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),9===o||32<=o&&o<=1114111||d(e,"expected valid JSON character");else Z.test(s)&&d(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,r){var i,a,o,s;for(z.isObject(n)||d(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],H.call(t,a)||(t[a]=n[a],r[a]=!0)}function v(e,t,n,r,i,a){var o,s;if(i=String(i),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(a))for(o=0,s=a.length;o<s;o+=1)y(e,t,a[o],n);else y(e,t,a,n);else e.json||H.call(n,i)||!H.call(t,i)||d(e,"duplicated mapping key"),t[i]=a,delete n[i];return t}function b(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function w(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!r(o))break;for(b(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return n!==-1&&0!==a&&e.lineIndent<n&&m(e,"deficient indentation"),a}function _(e){var t,n=e.position;return t=e.input.charCodeAt(n),!(45!==t&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,t=e.input.charCodeAt(n),0!==t&&!a(t)))}function x(e,t){1===t?e.result+=" ":t>1&&(e.result+=z.repeat("\n",t-1))}function A(e,t,n){var s,l,u,c,p,h,f,d,m,y=e.kind,v=e.result;if(m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(l=e.input.charCodeAt(e.position+1),a(l)||n&&o(l)))return!1;for(e.kind="scalar",e.result="",u=c=e.position,p=!1;0!==m;){if(58===m){if(l=e.input.charCodeAt(e.position+1),a(l)||n&&o(l))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&_(e)||n&&o(m))break;if(r(m)){if(h=e.line,f=e.lineStart,d=e.lineIndent,w(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=c,e.line=h,e.lineStart=f,e.lineIndent=d;break}}p&&(g(e,u,c,!1),x(e,e.line-h),u=c=e.position,p=!1),i(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,c,!1),!!e.result||(e.kind=y,e.result=v,!1)}function S(e,t){var n,i,a;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=a=e.position,e.position++}else r(n)?(g(e,i,a,!0),x(e,w(e,!1,t)),i=a=e.position):e.position===e.lineStart&&_(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,i,a,o,u,c;if(c=e.input.charCodeAt(e.position),34!==c)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(c=e.input.charCodeAt(e.position));){if(34===c)return g(e,n,e.position,!0),e.position++,!0;if(92===c){if(g(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),r(c))w(e,!1,t);else if(c<256&&ie[c])e.result+=ae[c],e.position++;else if((u=l(c))>0){for(a=u,o=0;a>0;a--)c=e.input.charCodeAt(++e.position),(u=s(c))>=0?o=(o<<4)+u:d(e,"expected hexadecimal character");e.result+=p(o),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(c)?(g(e,n,i,!0),x(e,w(e,!1,t)),n=i=e.position):e.position===e.lineStart&&_(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function E(e,t){var n,r,i,o,s,l,u,c,p,h,f,m=!0,g=e.tag,y=e.anchor,b={};if(f=e.input.charCodeAt(e.position),91===f)o=93,u=!1,r=[];else{if(123!==f)return!1;o=125,u=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),f=e.input.charCodeAt(++e.position);0!==f;){if(w(e,!0,t),f=e.input.charCodeAt(e.position),f===o)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=r,!0;m||d(e,"missed comma between flow collection entries"),p=c=h=null,s=l=!1,63===f&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=l=!0,e.position++,w(e,!0,t))),n=e.line,L(e,t,Y,!1,!0),p=e.tag,c=e.result,w(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),w(e,!0,t),L(e,t,Y,!1,!0),h=e.result),u?v(e,r,b,p,c,h):s?r.push(v(e,null,b,p,c,h)):r.push(c),w(e,!0,t),f=e.input.charCodeAt(e.position),44===f?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function O(e,t){var n,a,o,s,l=G,c=!1,p=!1,h=t,f=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)G===l?l=43===s?X:K:d(e,"repeat of a chomping mode identifier");else{if(!((o=u(s))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(h=t+o-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(b(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndent<h)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!p&&e.lineIndent>h&&(h=e.lineIndent),r(s))f++;else{if(e.lineIndent<h){l===X?e.result+=z.repeat("\n",c?1+f:f):l===G&&c&&(e.result+="\n");break}for(a?i(s)?(m=!0,e.result+=z.repeat("\n",c?1+f:f)):m?(m=!1,e.result+=z.repeat("\n",f+1)):0===f?c&&(e.result+=" "):e.result+=z.repeat("\n",f):e.result+=z.repeat("\n",c?1+f:f),c=!0,p=!0,f=0,n=e.position;!r(s)&&0!==s;)s=e.input.charCodeAt(++e.position);g(e,n,e.position,!1)}}return!0}function k(e,t){var n,r,i,o=e.tag,s=e.anchor,l=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),i=e.input.charCodeAt(e.position);0!==i&&45===i&&(r=e.input.charCodeAt(e.position+1),a(r));)if(u=!0,e.position++,w(e,!0,-1)&&e.lineIndent<=t)l.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,L(e,t,W,!1,!0),l.push(e.result),w(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!u&&(e.tag=o,e.anchor=s,e.kind="sequence",e.result=l,!0)}function T(e,t,n){var r,o,s,l,u=e.tag,c=e.anchor,p={},h={},f=null,m=null,g=null,y=!1,b=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),l=e.input.charCodeAt(e.position);0!==l;){if(r=e.input.charCodeAt(e.position+1),s=e.line,63!==l&&58!==l||!a(r)){if(!L(e,n,J,!1,!0))break;if(e.line===s){for(l=e.input.charCodeAt(e.position);i(l);)l=e.input.charCodeAt(++e.position);if(58===l)l=e.input.charCodeAt(++e.position),a(l)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(v(e,p,h,f,m,null),f=m=g=null),b=!0,y=!1,o=!1,f=e.tag,m=e.result;else{if(!b)return e.tag=u,e.anchor=c,!0;d(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=c,!0;d(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===l?(y&&(v(e,p,h,f,m,null),f=m=g=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,l=r;if((e.line===s||e.lineIndent>t)&&(L(e,t,Q,!0,o)&&(y?m=e.result:g=e.result),y||(v(e,p,h,f,m,g),f=m=g=null),w(e,!0,-1),l=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==l)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&v(e,p,h,f,m,null),b&&(e.tag=u,e.anchor=c,e.kind="mapping",e.result=p),b}function C(e){var t,n,r,i,o=!1,s=!1;if(i=e.input.charCodeAt(e.position),33!==i)return!1;if(null!==e.tag&&d(e,"duplication of a tag property"),i=e.input.charCodeAt(++e.position),60===i?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(s=!0,n="!!",i=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do i=e.input.charCodeAt(++e.position);while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!a(i);)33===i&&(s?d(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ne.test(n)||d(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),te.test(r)&&d(e,"tag suffix cannot contain flow indicator characters")}return r&&!re.test(r)&&d(e,"tag name cannot contain such characters: "+r),o?e.tag=r:H.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:d(e,'undeclared tag handle "'+n+'"'),!0}function I(e){var t,n;if(n=e.input.charCodeAt(e.position),38!==n)return!1;for(null!==e.anchor&&d(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!a(n)&&!o(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function D(e){var t,n,r;if(r=e.input.charCodeAt(e.position),42!==r)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!a(r)&&!o(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||d(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],w(e,!0,-1),!0}function L(e,t,n,r,i){var a,o,s,l,u,c,p,h,f=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=Q===n||W===n,r&&w(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),1===f)for(;C(e)||I(e);)w(e,!0,-1)?(m=!0,s=a,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):s=!1;if(s&&(s=m||i),1!==f&&Q!==n||(p=Y===n||J===n?t:t+1,h=e.position-e.lineStart,1===f?s&&(k(e,h)||T(e,h,p))||E(e,p)?g=!0:(o&&O(e,p)||S(e,p)||j(e,p)?g=!0:D(e)?(g=!0,null===e.tag&&null===e.anchor||d(e,"alias node should not have any properties")):A(e,p,Y===n)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(g=s&&k(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,u=e.implicitTypes.length;l<u;l+=1)if(c=e.implicitTypes[l],c.resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else H.call(e.typeMap,e.tag)?(c=e.typeMap[e.tag],null!==e.result&&c.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function M(e){var t,n,o,s,l=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(w(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&b(e),H.call(se,n)?se[n](e,n,o):m(e,'unknown document directive "'+n+'"')}return w(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,w(e,!0,-1)):u&&d(e,"directives end mark is expected"),L(e,e.lineIndent-1,Q,!1,!0),w(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(l,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&_(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,w(e,!0,-1))):void(e.position<e.length-1&&d(e,"end of the stream or a document separator is expected"))}function R(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new h(e,t);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)M(n);return n.documents}function U(e,t,n){var r,i,a=R(e,n);for(r=0,i=a.length;r<i;r+=1)t(a[r])}function P(e,t){var n=R(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new N("expected a single document in the stream, but found more")}}function q(e,t,n){U(e,t,z.extend({schema:F},n))}function B(e,t){return P(e,z.extend({schema:F},t))}for(var z=e("./common"),N=e("./exception"),$=e("./mark"),F=e("./schema/default_safe"),V=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,Y=1,J=2,W=3,Q=4,G=1,K=2,X=3,Z=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,re=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,ie=new Array(256),ae=new Array(256),oe=0;oe<256;oe++)ie[oe]=c(oe)?1:0,ae[oe]=c(oe);var se={YAML:function(e,t,n){var r,i,a;null!==e.version&&d(e,"duplication of %YAML directive"),1!==n.length&&d(e,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===r&&d(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&d(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],ne.test(r)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,r)&&d(e,'there is a previously declared suffix for "'+r+'" tag handle'),re.test(i)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};t.exports.loadAll=U,t.exports.load=P,t.exports.safeLoadAll=q,t.exports.safeLoad=B},{"./common":21,"./exception":23,"./mark":25,"./schema/default_full":28,"./schema/default_safe":29}],25:[function(e,t,n){"use strict";function r(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}var i=e("./common");r.prototype.getSnippet=function(e,t){var n,r,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(a="",o=this.position;o<this.buffer.length&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>t/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(r,o),i.repeat(" ",e)+n+s+a+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=r},{"./common":21}],26:[function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return i.indexOf(t)===-1})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(e);return r}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=r(this,"implicit",[]),this.compiledExplicit=r(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),s=e("./exception"),l=e("./type");a.DEFAULT=null,a.create=function(){var e,t;switch(arguments.length){case 1:e=a.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1]; +break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof a}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof l}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:e,explicit:t})},t.exports=a},{"./common":21,"./exception":23,"./type":32}],27:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./json")]})},{"../schema":26,"./json":31}],28:[function(e,t,n){"use strict";var r=e("../schema");t.exports=r.DEFAULT=new r({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":26,"../type/js/function":37,"../type/js/regexp":38,"../type/js/undefined":39,"./default_safe":29}],29:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":26,"../type/binary":33,"../type/merge":41,"../type/omap":43,"../type/pairs":44,"../type/set":46,"../type/timestamp":48,"./core":27}],30:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":26,"../type/map":40,"../type/seq":45,"../type/str":47}],31:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":26,"../type/bool":34,"../type/float":35,"../type/int":36,"../type/null":42,"./failsafe":30}],32:[function(e,t,n){"use strict";function r(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(o.indexOf(t)===-1)throw new a('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=r(t.styleAliases||null),s.indexOf(this.kind)===-1)throw new a('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var a=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=i},{"./exception":23}],33:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=p;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=p,o=0,l=[];for(t=0;t<i;t++)t%4===0&&t&&(l.push(o>>16&255),l.push(o>>8&255),l.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(l.push(o>>16&255),l.push(o>>8&255),l.push(255&o)):18===n?(l.push(o>>10&255),l.push(o>>2&255)):12===n&&l.push(o>>4&255),s?new s(l):l}function a(e){var t,n,r="",i=0,a=e.length,o=p;for(t=0;t<a;t++)t%3===0&&t&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s;try{var l=e;s=l("buffer").Buffer}catch(u){}var c=e("../type"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../type":32}],34:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function a(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":32}],35:[function(e,t,n){"use strict";function r(e){return null!==e&&!!u.test(e)}function i(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function a(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),c.test(n)?n.replace("e",".e"):n}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=e("../common"),l=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),c=/^[-+]?[0-9]+e/;t.exports=new l("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a,defaultStyle:"lowercase"})},{"../common":21,"../type":32}],36:[function(e,t,n){"use strict";function r(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}function o(e){if(null===e)return!1;var t,n=e.length,o=0,s=!1;if(!n)return!1;if(t=e[o],"-"!==t&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===n)return!0;if(t=e[++o],"b"===t){for(o++;o<n;o++)if(t=e[o],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(o++;o<n;o++)if(t=e[o],"_"!==t){if(!r(e.charCodeAt(o)))return!1;s=!0}return s}for(;o<n;o++)if(t=e[o],"_"!==t){if(!i(e.charCodeAt(o)))return!1;s=!0}return s}for(;o<n;o++)if(t=e[o],"_"!==t){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return!!s&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(o)))}function s(e){var t,n,r=e,i=1,a=[];return r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),t=r[0],"-"!==t&&"+"!==t||("-"===t&&(i=-1),r=r.slice(1),t=r[0]),"0"===r?0:"0"===t?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):r.indexOf(":")!==-1?(r.split(":").forEach(function(e){a.unshift(parseInt(e,10))}),r=0,n=1,a.forEach(function(e){r+=e*n,n*=60}),i*r):i*parseInt(r,10)}function l(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1===0&&!u.isNegativeZero(e)}var u=e("../common"),c=e("../type");t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:s,predicate:l,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":21,"../type":32}],37:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(r){return!1}}function i(e){var t,n="("+e+")",r=s.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function a(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{var l=e;s=l("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var c=e("../../type");t.exports=new c("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":32}],38:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":32}],39:[function(e,t,n){"use strict";function r(){return!0}function i(){}function a(){return""}function o(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":32}],40:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":32}],41:[function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},{"../type":32}],42:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function a(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":32}],43:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,l=[],u=e;for(t=0,n=u.length;t<n;t+=1){if(r=u[t],a=!1,"[object Object]"!==s.call(r))return!1;for(i in r)if(o.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(l.indexOf(i)!==-1)return!1;l.push(i)}return!0}function i(e){return null!==e?e:[]}var a=e("../type"),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i})},{"../type":32}],44:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],"[object Object]"!==o.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;a[t]=[i[0],r[i[0]]]}return!0}function i(e){if(null===e)return[];var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var a=e("../type"),o=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})},{"../type":32}],45:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":32}],46:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var a=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})},{"../type":32}],47:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":32}],48:[function(e,t,n){"use strict";function r(e){return null!==e&&(null!==s.exec(e)||null!==l.exec(e))}function i(e){var t,n,r,i,a,o,u,c,p,h,f=0,d=null;if(t=s.exec(e),null===t&&(t=l.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(c=+t[10],p=+(t[11]||0),d=6e4*(60*c+p),"-"===t[9]&&(d=-d)),h=new Date(Date.UTC(n,r,i,a,o,u,f)),d&&h.setTime(h.getTime()-d),h}function a(e){return e.toISOString()}var o=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),l=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:a})},{"../type":32}],49:[function(e,t,n){function r(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?o(r+n,0):n;else if(n){var s=a(e,t);return s<r&&(t===t?t===e[s]:e[s]!==e[s])?s:-1}return i(e,t,n||0)}var i=e("../internal/baseIndexOf"),a=e("../internal/binaryIndex"),o=Math.max;t.exports=r},{"../internal/baseIndexOf":78,"../internal/binaryIndex":92}],50:[function(e,t,n){function r(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=r},{}],51:[function(e,t,n){function r(e){if(l(e)&&!s(e)&&!(e instanceof i)){if(e instanceof a)return e;if(p.call(e,"__chain__")&&p.call(e,"__wrapped__"))return u(e)}return new a(e)}var i=e("../internal/LazyWrapper"),a=e("../internal/LodashWrapper"),o=e("../internal/baseLodash"),s=e("../lang/isArray"),l=e("../internal/isObjectLike"),u=e("../internal/wrapperClone"),c=Object.prototype,p=c.hasOwnProperty;r.prototype=o.prototype,t.exports=r},{"../internal/LazyWrapper":60,"../internal/LodashWrapper":61,"../internal/baseLodash":82,"../internal/isObjectLike":126,"../internal/wrapperClone":137,"../lang/isArray":140}],52:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":54}],53:[function(e,t,n){var r=e("../internal/baseEach"),i=e("../internal/createFind"),a=i(r);t.exports=a},{"../internal/baseEach":71,"../internal/createFind":102}],54:[function(e,t,n){var r=e("../internal/arrayEach"),i=e("../internal/baseEach"),a=e("../internal/createForEach"),o=a(r,i);t.exports=o},{"../internal/arrayEach":63,"../internal/baseEach":71,"../internal/createForEach":103}],55:[function(e,t,n){function r(e,t,n,r){var h=e?a(e):0;return l(h)||(e=c(e),h=e.length),n="number"!=typeof n||r&&s(t,n,r)?0:n<0?p(h+n,0):n||0,"string"==typeof e||!o(e)&&u(e)?n<=h&&e.indexOf(t,n)>-1:!!h&&i(e,t,n)>-1}var i=e("../internal/baseIndexOf"),a=e("../internal/getLength"),o=e("../lang/isArray"),s=e("../internal/isIterateeCall"),l=e("../internal/isLength"),u=e("../lang/isString"),c=e("../object/values"),p=Math.max;t.exports=r},{"../internal/baseIndexOf":78,"../internal/getLength":112,"../internal/isIterateeCall":122,"../internal/isLength":125,"../lang/isArray":140,"../lang/isString":146,"../object/values":152}],56:[function(e,t,n){function r(e,t,n){var r=s(e)?i:o;return t=a(t,n,3),r(e,t)}var i=e("../internal/arrayMap"),a=e("../internal/baseCallback"),o=e("../internal/baseMap"),s=e("../lang/isArray");t.exports=r},{"../internal/arrayMap":64,"../internal/baseCallback":67,"../internal/baseMap":83,"../lang/isArray":140}],57:[function(e,t,n){var r=e("../internal/getNative"),i=r(Date,"now"),a=i||function(){return(new Date).getTime()};t.exports=a},{"../internal/getNative":114}],58:[function(e,t,n){var r=e("../internal/createWrapper"),i=e("../internal/replaceHolders"),a=e("./restParam"),o=1,s=32,l=a(function(e,t,n){var a=o;if(n.length){var u=i(n,l.placeholder);a|=s}return r(e,a,t,n,u)});l.placeholder={},t.exports=l},{"../internal/createWrapper":106,"../internal/replaceHolders":132,"./restParam":59}],59:[function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(i);return t=a(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=a(n.length-t,0),o=Array(i);++r<i;)o[r]=n[t+r];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,n[0],o);case 2:return e.call(this,n[0],n[1],o)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=n[r];return s[t]=o,e.apply(this,s)}}var i="Expected a function",a=Math.max;t.exports=r},{}],60:[function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}var i=e("./baseCreate"),a=e("./baseLodash"),o=Number.POSITIVE_INFINITY;r.prototype=i(a.prototype),r.prototype.constructor=r,t.exports=r},{"./baseCreate":70,"./baseLodash":82}],61:[function(e,t,n){function r(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}var i=e("./baseCreate"),a=e("./baseLodash");r.prototype=i(a.prototype),r.prototype.constructor=r,t.exports=r},{"./baseCreate":70,"./baseLodash":82}],62:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],63:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=r},{}],64:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=r},{}],65:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=r},{}],66:[function(e,t,n){function r(e,t){return null==t?e:i(t,a(t),e)}var i=e("./baseCopy"),a=e("../object/keys");t.exports=r},{"../object/keys":149,"./baseCopy":69}],67:[function(e,t,n){function r(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:o(e,t,n):null==e?s:"object"==r?i(e):void 0===t?l(e):a(e,t)}var i=e("./baseMatches"),a=e("./baseMatchesProperty"),o=e("./bindCallback"),s=e("../utility/identity"),l=e("../utility/property");t.exports=r},{"../utility/identity":154,"../utility/property":156,"./baseMatches":84,"./baseMatchesProperty":85,"./bindCallback":94}],68:[function(e,t,n){function r(e,t,n,m,g,y,v){var w;if(n&&(w=g?n(e,m,g):n(e)),void 0!==w)return w;if(!f(e))return e;var _=p(e);if(_){if(w=l(e),!t)return i(e,w)}else{var A=B.call(e),S=A==b;if(A!=x&&A!=d&&(!S||g))return P[A]?u(e,A,t):g?e:{};if(h(e))return g?e:{};if(w=c(S?{}:e),!t)return o(w,e)}y||(y=[]),v||(v=[]);for(var j=y.length;j--;)if(y[j]==e)return v[j];return y.push(e),v.push(w),(_?a:s)(e,function(i,a){w[a]=r(i,t,n,a,e,y,v)}),w}var i=e("./arrayCopy"),a=e("./arrayEach"),o=e("./baseAssign"),s=e("./baseForOwn"),l=e("./initCloneArray"),u=e("./initCloneByTag"),c=e("./initCloneObject"),p=e("../lang/isArray"),h=e("./isHostObject"),f=e("../lang/isObject"),d="[object Arguments]",m="[object Array]",g="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",w="[object Map]",_="[object Number]",x="[object Object]",A="[object RegExp]",S="[object Set]",j="[object String]",E="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",U="[object Uint32Array]",P={};P[d]=P[m]=P[O]=P[g]=P[y]=P[k]=P[T]=P[C]=P[I]=P[D]=P[_]=P[x]=P[A]=P[j]=P[L]=P[M]=P[R]=P[U]=!0,P[v]=P[b]=P[w]=P[S]=P[E]=!1;var q=Object.prototype,B=q.toString;t.exports=r},{"../lang/isArray":140,"../lang/isObject":144,"./arrayCopy":62,"./arrayEach":63,"./baseAssign":66,"./baseForOwn":76,"./initCloneArray":116,"./initCloneByTag":117,"./initCloneObject":118,"./isHostObject":120}],69:[function(e,t,n){function r(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var a=t[r];n[a]=e[a]}return n}t.exports=r},{}],70:[function(e,t,n){var r=e("../lang/isObject"),i=function(){function e(){}return function(t){if(r(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();t.exports=i},{"../lang/isObject":144}],71:[function(e,t,n){var r=e("./baseForOwn"),i=e("./createBaseEach"),a=i(r);t.exports=a},{"./baseForOwn":76,"./createBaseEach":98}],72:[function(e,t,n){function r(e,t,n,r){var i;return n(e,function(e,n,a){if(t(e,n,a))return i=r?n:e,!1}),i}t.exports=r},{}],73:[function(e,t,n){function r(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}t.exports=r},{}],74:[function(e,t,n){var r=e("./createBaseFor"),i=r();t.exports=i},{"./createBaseFor":99}],75:[function(e,t,n){function r(e,t){return i(e,t,a)}var i=e("./baseFor"),a=e("../object/keysIn");t.exports=r},{"../object/keysIn":150,"./baseFor":74}],76:[function(e,t,n){function r(e,t){return i(e,t,a)}var i=e("./baseFor"),a=e("../object/keys");t.exports=r},{"../object/keys":149,"./baseFor":74}],77:[function(e,t,n){function r(e,t,n){if(null!=e){e=i(e),void 0!==n&&n in e&&(t=[n]);for(var r=0,a=t.length;null!=e&&r<a;)e=i(e)[t[r++]];return r&&r==a?e:void 0}}var i=e("./toObject");t.exports=r},{"./toObject":135}],78:[function(e,t,n){function r(e,t,n){if(t!==t)return i(e,n);for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var i=e("./indexOfNaN");t.exports=r},{"./indexOfNaN":115}],79:[function(e,t,n){function r(e,t,n,s,l,u){return e===t||(null==e||null==t||!a(e)&&!o(t)?e!==e&&t!==t:i(e,t,r,n,s,l,u))}var i=e("./baseIsEqualDeep"),a=e("../lang/isObject"),o=e("./isObjectLike");t.exports=r},{"../lang/isObject":144,"./baseIsEqualDeep":80,"./isObjectLike":126}],80:[function(e,t,n){function r(e,t,n,r,f,g,y){var v=s(e),b=s(t),w=p,_=p;v||(w=m.call(e),w==c?w=h:w!=h&&(v=u(e))),b||(_=m.call(t),_==c?_=h:_!=h&&(b=u(t)));var x=w==h&&!l(e),A=_==h&&!l(t),S=w==_;if(S&&!v&&!x)return a(e,t,w);if(!f){var j=x&&d.call(e,"__wrapped__"),E=A&&d.call(t,"__wrapped__");if(j||E)return n(j?e.value():e,E?t.value():t,r,f,g,y)}if(!S)return!1;g||(g=[]),y||(y=[]);for(var O=g.length;O--;)if(g[O]==e)return y[O]==t;g.push(e),y.push(t);var k=(v?i:o)(e,t,n,r,f,g,y);return g.pop(),y.pop(),k}var i=e("./equalArrays"),a=e("./equalByTag"),o=e("./equalObjects"),s=e("../lang/isArray"),l=e("./isHostObject"),u=e("../lang/isTypedArray"),c="[object Arguments]",p="[object Array]",h="[object Object]",f=Object.prototype,d=f.hasOwnProperty,m=f.toString;t.exports=r},{"../lang/isArray":140,"../lang/isTypedArray":147,"./equalArrays":107,"./equalByTag":108,"./equalObjects":109,"./isHostObject":120}],81:[function(e,t,n){function r(e,t,n){var r=t.length,o=r,s=!n;if(null==e)return!o;for(e=a(e);r--;){var l=t[r];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<o;){l=t[r];var u=l[0],c=e[u],p=l[1];if(s&&l[2]){if(void 0===c&&!(u in e))return!1}else{var h=n?n(c,p,u):void 0;if(!(void 0===h?i(p,c,n,!0):h))return!1}}return!0}var i=e("./baseIsEqual"),a=e("./toObject");t.exports=r},{"./baseIsEqual":79,"./toObject":135}],82:[function(e,t,n){function r(){}t.exports=r},{}],83:[function(e,t,n){function r(e,t){var n=-1,r=a(e)?Array(e.length):[];return i(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var i=e("./baseEach"),a=e("./isArrayLike");t.exports=r},{"./baseEach":71,"./isArrayLike":119}],84:[function(e,t,n){function r(e){var t=a(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e=o(e),e[n]===r&&(void 0!==r||n in e))}}return function(e){return i(e,t)}}var i=e("./baseIsMatch"),a=e("./getMatchData"),o=e("./toObject");t.exports=r},{"./baseIsMatch":81,"./getMatchData":113,"./toObject":135}],85:[function(e,t,n){function r(e,t){var n=s(e),r=l(e)&&u(t),f=e+"";return e=h(e),function(s){if(null==s)return!1;var l=f;if(s=p(s),(n||!r)&&!(l in s)){if(s=1==e.length?s:i(s,o(e,0,-1)),null==s)return!1;l=c(e),s=p(s)}return s[l]===t?void 0!==t||l in s:a(t,s[l],void 0,!0)}}var i=e("./baseGet"),a=e("./baseIsEqual"),o=e("./baseSlice"),s=e("../lang/isArray"),l=e("./isKey"),u=e("./isStrictComparable"),c=e("../array/last"),p=e("./toObject"),h=e("./toPath");t.exports=r},{"../array/last":50,"../lang/isArray":140,"./baseGet":77,"./baseIsEqual":79,"./baseSlice":89,"./isKey":123,"./isStrictComparable":127,"./toObject":135,"./toPath":136}],86:[function(e,t,n){function r(e){return function(t){return null==t?void 0:i(t)[e]}}var i=e("./toObject");t.exports=r},{"./toObject":135}],87:[function(e,t,n){function r(e){var t=e+"";return e=a(e),function(n){return i(n,e,t)}}var i=e("./baseGet"),a=e("./toPath");t.exports=r},{"./baseGet":77,"./toPath":136}],88:[function(e,t,n){var r=e("../utility/identity"),i=e("./metaMap"),a=i?function(e,t){return i.set(e,t),e}:r;t.exports=a},{"../utility/identity":154,"./metaMap":129}],89:[function(e,t,n){function r(e,t,n){var r=-1,i=e.length;t=null==t?0:+t||0,t<0&&(t=-t>i?0:i+t),n=void 0===n||n>i?i:+n||0,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=r},{}],90:[function(e,t,n){function r(e){return null==e?"":e+""}t.exports=r},{}],91:[function(e,t,n){function r(e,t){for(var n=-1,r=t.length,i=Array(r);++n<r;)i[n]=e[t[n]];return i}t.exports=r},{}],92:[function(e,t,n){function r(e,t,n){var r=0,o=e?e.length:r;if("number"==typeof t&&t===t&&o<=s){for(;r<o;){var l=r+o>>>1,u=e[l];(n?u<=t:u<t)&&null!==u?r=l+1:o=l}return o}return i(e,t,a,n)}var i=e("./binaryIndexBy"),a=e("../utility/identity"),o=4294967295,s=o>>>1;t.exports=r},{"../utility/identity":154,"./binaryIndexBy":93}],93:[function(e,t,n){function r(e,t,n,r){t=n(t);for(var o=0,l=e?e.length:0,u=t!==t,c=null===t,p=void 0===t;o<l;){var h=i((o+l)/2),f=n(e[h]),d=void 0!==f,m=f===f;if(u)var g=m||r;else g=c?m&&d&&(r||null!=f):p?m&&(r||d):null!=f&&(r?f<=t:f<t);g?o=h+1:l=h}return a(l,s)}var i=Math.floor,a=Math.min,o=4294967295,s=o-1;t.exports=r},{}],94:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return i;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)};case 5:return function(n,r,i,a,o){return e.call(t,n,r,i,a,o)}}return function(){return e.apply(t,arguments)}}var i=e("../utility/identity");t.exports=r},{"../utility/identity":154}],95:[function(e,t,n){(function(e){function n(e){var t=new r(e.byteLength),n=new i(t);return n.set(new i(e)),t}var r=e.ArrayBuffer,i=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],96:[function(e,t,n){function r(e,t,n){for(var r=n.length,a=-1,o=i(e.length-r,0),s=-1,l=t.length,u=Array(l+o);++s<l;)u[s]=t[s];for(;++a<r;)u[n[a]]=e[a];for(;o--;)u[s++]=e[a++];return u}var i=Math.max;t.exports=r},{}],97:[function(e,t,n){function r(e,t,n){for(var r=-1,a=n.length,o=-1,s=i(e.length-a,0),l=-1,u=t.length,c=Array(s+u);++o<s;)c[o]=e[o];for(var p=o;++l<u;)c[p+l]=t[l];for(;++r<a;)c[p+n[r]]=e[o++];return c}var i=Math.max;t.exports=r},{}],98:[function(e,t,n){function r(e,t){return function(n,r){var s=n?i(n):0;if(!a(s))return e(n,r);for(var l=t?s:-1,u=o(n);(t?l--:++l<s)&&r(u[l],l,u)!==!1;);return n}}var i=e("./getLength"),a=e("./isLength"),o=e("./toObject");t.exports=r},{"./getLength":112,"./isLength":125,"./toObject":135}],99:[function(e,t,n){function r(e){return function(t,n,r){for(var a=i(t),o=r(t),s=o.length,l=e?s:-1;e?l--:++l<s;){var u=o[l];if(n(a[u],u,a)===!1)break}return t}}var i=e("./toObject");t.exports=r},{"./toObject":135}],100:[function(e,t,n){(function(n){function r(e,t){function r(){var i=this&&this!==n&&this instanceof r?a:e;return i.apply(t,arguments)}var a=i(e);return r}var i=e("./createCtorWrapper");t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./createCtorWrapper":101}],101:[function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=i(e.prototype),r=e.apply(n,t);return a(r)?r:n}}var i=e("./baseCreate"),a=e("../lang/isObject");t.exports=r},{"../lang/isObject":144,"./baseCreate":70}],102:[function(e,t,n){function r(e,t){return function(n,r,l){if(r=i(r,l,3),s(n)){var u=o(n,r,t);return u>-1?n[u]:void 0}return a(n,r,e)}}var i=e("./baseCallback"),a=e("./baseFind"),o=e("./baseFindIndex"),s=e("../lang/isArray");t.exports=r},{"../lang/isArray":140,"./baseCallback":67,"./baseFind":72,"./baseFindIndex":73}],103:[function(e,t,n){function r(e,t){return function(n,r,o){return"function"==typeof r&&void 0===o&&a(n)?e(n,r):t(n,i(r,o,3))}}var i=e("./bindCallback"),a=e("../lang/isArray");t.exports=r},{"../lang/isArray":140,"./bindCallback":94}],104:[function(e,t,n){(function(n){function r(e,t,_,x,A,S,j,E,O,k){function T(){for(var d=arguments.length,m=d,g=Array(d);m--;)g[m]=arguments[m];if(x&&(g=a(g,x,A)),S&&(g=o(g,S,j)),L||R){var b=T.placeholder,P=c(g,b);if(d-=P.length,d<k){var q=E?i(E):void 0,B=w(k-d,0),z=L?P:void 0,N=L?void 0:P,$=L?g:void 0,F=L?void 0:g;t|=L?y:v,t&=~(L?v:y),M||(t&=~(h|f));var V=[e,t,_,$,z,F,N,q,O,B],H=r.apply(void 0,V);return l(e)&&p(H,V),H.placeholder=b,H}}var Y=I?_:this,J=D?Y[e]:e;return E&&(g=u(g,E)),C&&O<g.length&&(g.length=O),this&&this!==n&&this instanceof T&&(J=U||s(e)),J.apply(Y,g)}var C=t&b,I=t&h,D=t&f,L=t&m,M=t&d,R=t&g,U=D?void 0:s(e);return T}var i=e("./arrayCopy"),a=e("./composeArgs"),o=e("./composeArgsRight"),s=e("./createCtorWrapper"),l=e("./isLaziable"),u=e("./reorder"),c=e("./replaceHolders"),p=e("./setData"),h=1,f=2,d=4,m=8,g=16,y=32,v=64,b=128,w=Math.max;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./createCtorWrapper":101,"./isLaziable":124,"./reorder":131,"./replaceHolders":132,"./setData":133}],105:[function(e,t,n){(function(n){function r(e,t,r,o){function s(){for(var t=-1,i=arguments.length,a=-1,c=o.length,p=Array(c+i);++a<c;)p[a]=o[a];for(;i--;)p[a++]=arguments[++t];var h=this&&this!==n&&this instanceof s?u:e;return h.apply(l?r:this,p)}var l=t&a,u=i(e);return s}var i=e("./createCtorWrapper"),a=1;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./createCtorWrapper":101}],106:[function(e,t,n){function r(e,t,n,r,y,v,b,w){var _=t&h;if(!_&&"function"!=typeof e)throw new TypeError(m);var x=r?r.length:0;if(x||(t&=~(f|d),r=y=void 0),x-=y?y.length:0,t&d){var A=r,S=y;r=y=void 0}var j=_?void 0:l(e),E=[e,t,n,r,y,A,S,v,b,w];if(j&&(u(E,j),t=E[1],w=E[9]),E[9]=null==w?_?0:e.length:g(w-x,0)||0,t==p)var O=a(E[0],E[2]);else O=t!=f&&t!=(p|f)||E[4].length?o.apply(void 0,E):s.apply(void 0,E);var k=j?i:c;return k(O,E)}var i=e("./baseSetData"),a=e("./createBindWrapper"),o=e("./createHybridWrapper"),s=e("./createPartialWrapper"),l=e("./getData"),u=e("./mergeData"),c=e("./setData"),p=1,h=2,f=32,d=64,m="Expected a function",g=Math.max;t.exports=r},{"./baseSetData":88,"./createBindWrapper":100,"./createHybridWrapper":104,"./createPartialWrapper":105,"./getData":110,"./mergeData":128,"./setData":133}],107:[function(e,t,n){function r(e,t,n,r,a,o,s){var l=-1,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;for(;++l<u;){var p=e[l],h=t[l],f=r?r(a?h:p,a?p:h,l):void 0;if(void 0!==f){if(f)continue;return!1}if(a){if(!i(t,function(e){return p===e||n(p,e,r,a,o,s)}))return!1}else if(p!==h&&!n(p,h,r,a,o,s))return!1}return!0}var i=e("./arraySome");t.exports=r},{"./arraySome":65}],108:[function(e,t,n){function r(e,t,n){switch(n){case i:case a:return+e==+t;case o:return e.name==t.name&&e.message==t.message;case s:return e!=+e?t!=+t:e==+t;case l:case u:return e==t+""}return!1}var i="[object Boolean]",a="[object Date]",o="[object Error]",s="[object Number]",l="[object RegExp]",u="[object String]";t.exports=r},{}],109:[function(e,t,n){function r(e,t,n,r,a,s,l){var u=i(e),c=u.length,p=i(t),h=p.length; +if(c!=h&&!a)return!1;for(var f=c;f--;){var d=u[f];if(!(a?d in t:o.call(t,d)))return!1}for(var m=a;++f<c;){d=u[f];var g=e[d],y=t[d],v=r?r(a?y:g,a?g:y,d):void 0;if(!(void 0===v?n(g,y,r,a,s,l):v))return!1;m||(m="constructor"==d)}if(!m){var b=e.constructor,w=t.constructor;if(b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w))return!1}return!0}var i=e("../object/keys"),a=Object.prototype,o=a.hasOwnProperty;t.exports=r},{"../object/keys":149}],110:[function(e,t,n){var r=e("./metaMap"),i=e("../utility/noop"),a=r?function(e){return r.get(e)}:i;t.exports=a},{"../utility/noop":155,"./metaMap":129}],111:[function(e,t,n){function r(e){for(var t=e.name+"",n=i[t],r=n?n.length:0;r--;){var a=n[r],o=a.func;if(null==o||o==e)return a.name}return t}var i=e("./realNames");t.exports=r},{"./realNames":130}],112:[function(e,t,n){var r=e("./baseProperty"),i=r("length");t.exports=i},{"./baseProperty":86}],113:[function(e,t,n){function r(e){for(var t=a(e),n=t.length;n--;)t[n][2]=i(t[n][1]);return t}var i=e("./isStrictComparable"),a=e("../object/pairs");t.exports=r},{"../object/pairs":151,"./isStrictComparable":127}],114:[function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return i(n)?n:void 0}var i=e("../lang/isNative");t.exports=r},{"../lang/isNative":143}],115:[function(e,t,n){function r(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var a=e[i];if(a!==a)return i}return-1}t.exports=r},{}],116:[function(e,t,n){function r(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&a.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var i=Object.prototype,a=i.hasOwnProperty;t.exports=r},{}],117:[function(e,t,n){(function(n){function r(e,t,n){var r=e.constructor;switch(t){case c:return i(e);case a:case o:return new r((+e));case p:case h:case f:case d:case m:case g:case y:case v:case b:r instanceof r&&(r=x[t]);var _=e.buffer;return new r(n?i(_):_,e.byteOffset,e.length);case s:case u:return new r(e);case l:var A=new r(e.source,w.exec(e));A.lastIndex=e.lastIndex}return A}var i=e("./bufferClone"),a="[object Boolean]",o="[object Date]",s="[object Number]",l="[object RegExp]",u="[object String]",c="[object ArrayBuffer]",p="[object Float32Array]",h="[object Float64Array]",f="[object Int8Array]",d="[object Int16Array]",m="[object Int32Array]",g="[object Uint8Array]",y="[object Uint8ClampedArray]",v="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,_=n.Uint8Array,x={};x[p]=n.Float32Array,x[h]=n.Float64Array,x[f]=n.Int8Array,x[d]=n.Int16Array,x[m]=n.Int32Array,x[g]=_,x[y]=n.Uint8ClampedArray,x[v]=n.Uint16Array,x[b]=n.Uint32Array,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./bufferClone":95}],118:[function(e,t,n){function r(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=r},{}],119:[function(e,t,n){function r(e){return null!=e&&a(i(e))}var i=e("./getLength"),a=e("./isLength");t.exports=r},{"./getLength":112,"./isLength":125}],120:[function(e,t,n){var r=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=r},{}],121:[function(e,t,n){function r(e,t){return e="number"==typeof e||i.test(e)?+e:-1,t=null==t?a:t,e>-1&&e%1==0&&e<t}var i=/^\d+$/,a=9007199254740991;t.exports=r},{}],122:[function(e,t,n){function r(e,t,n){if(!o(n))return!1;var r=typeof t;if("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}var i=e("./isArrayLike"),a=e("./isIndex"),o=e("../lang/isObject");t.exports=r},{"../lang/isObject":144,"./isArrayLike":119,"./isIndex":121}],123:[function(e,t,n){function r(e,t){var n=typeof e;if("string"==n&&s.test(e)||"number"==n)return!0;if(i(e))return!1;var r=!o.test(e);return r||null!=t&&e in a(t)}var i=e("../lang/isArray"),a=e("./toObject"),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=r},{"../lang/isArray":140,"./toObject":135}],124:[function(e,t,n){function r(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in i.prototype))return!1;if(e===n)return!0;var r=a(n);return!!r&&e===r[0]}var i=e("./LazyWrapper"),a=e("./getData"),o=e("./getFuncName"),s=e("../chain/lodash");t.exports=r},{"../chain/lodash":51,"./LazyWrapper":60,"./getData":110,"./getFuncName":111}],125:[function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=r},{}],126:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}t.exports=r},{}],127:[function(e,t,n){function r(e){return e===e&&!i(e)}var i=e("../lang/isObject");t.exports=r},{"../lang/isObject":144}],128:[function(e,t,n){function r(e,t){var n=e[1],r=t[1],m=n|r,g=m<p,y=r==p&&n==c||r==p&&n==h&&e[7].length<=t[8]||r==(p|h)&&n==c;if(!g&&!y)return e;r&l&&(e[2]=t[2],m|=n&l?0:u);var v=t[3];if(v){var b=e[3];e[3]=b?a(b,v,t[4]):i(v),e[4]=b?s(e[3],f):i(t[4])}return v=t[5],v&&(b=e[5],e[5]=b?o(b,v,t[6]):i(v),e[6]=b?s(e[5],f):i(t[6])),v=t[7],v&&(e[7]=i(v)),r&p&&(e[8]=null==e[8]?t[8]:d(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var i=e("./arrayCopy"),a=e("./composeArgs"),o=e("./composeArgsRight"),s=e("./replaceHolders"),l=1,u=4,c=8,p=128,h=256,f="__lodash_placeholder__",d=Math.min;t.exports=r},{"./arrayCopy":62,"./composeArgs":96,"./composeArgsRight":97,"./replaceHolders":132}],129:[function(e,t,n){(function(n){var r=e("./getNative"),i=r(n,"WeakMap"),a=i&&new i;t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./getNative":114}],130:[function(e,t,n){var r={};t.exports=r},{}],131:[function(e,t,n){function r(e,t){for(var n=e.length,r=o(t.length,n),s=i(e);r--;){var l=t[r];e[r]=a(l,n)?s[l]:void 0}return e}var i=e("./arrayCopy"),a=e("./isIndex"),o=Math.min;t.exports=r},{"./arrayCopy":62,"./isIndex":121}],132:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length,a=-1,o=[];++n<r;)e[n]===t&&(e[n]=i,o[++a]=n);return o}var i="__lodash_placeholder__";t.exports=r},{}],133:[function(e,t,n){var r=e("./baseSetData"),i=e("../date/now"),a=150,o=16,s=function(){var e=0,t=0;return function(n,s){var l=i(),u=o-(l-t);if(t=l,u>0){if(++e>=a)return n}else e=0;return r(n,s)}}();t.exports=s},{"../date/now":57,"./baseSetData":88}],134:[function(e,t,n){function r(e){for(var t=u(e),n=t.length,r=n&&e.length,c=!!r&&s(r)&&(a(e)||i(e)||l(e)),h=-1,f=[];++h<n;){var d=t[h];(c&&o(d,r)||p.call(e,d))&&f.push(d)}return f}var i=e("../lang/isArguments"),a=e("../lang/isArray"),o=e("./isIndex"),s=e("./isLength"),l=e("../lang/isString"),u=e("../object/keysIn"),c=Object.prototype,p=c.hasOwnProperty;t.exports=r},{"../lang/isArguments":139,"../lang/isArray":140,"../lang/isString":146,"../object/keysIn":150,"./isIndex":121,"./isLength":125}],135:[function(e,t,n){function r(e){if(o.unindexedChars&&a(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return i(e)?e:Object(e)}var i=e("../lang/isObject"),a=e("../lang/isString"),o=e("../support");t.exports=r},{"../lang/isObject":144,"../lang/isString":146,"../support":153}],136:[function(e,t,n){function r(e){if(a(e))return e;var t=[];return i(e).replace(o,function(e,n,r,i){t.push(r?i.replace(s,"$1"):n||e)}),t}var i=e("./baseToString"),a=e("../lang/isArray"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;t.exports=r},{"../lang/isArray":140,"./baseToString":90}],137:[function(e,t,n){function r(e){return e instanceof i?e.clone():new a(e.__wrapped__,e.__chain__,o(e.__actions__))}var i=e("./LazyWrapper"),a=e("./LodashWrapper"),o=e("./arrayCopy");t.exports=r},{"./LazyWrapper":60,"./LodashWrapper":61,"./arrayCopy":62}],138:[function(e,t,n){function r(e,t,n){return"function"==typeof t?i(e,!0,a(t,n,3)):i(e,!0)}var i=e("../internal/baseClone"),a=e("../internal/bindCallback");t.exports=r},{"../internal/baseClone":68,"../internal/bindCallback":94}],139:[function(e,t,n){function r(e){return a(e)&&i(e)&&s.call(e,"callee")&&!l.call(e,"callee")}var i=e("../internal/isArrayLike"),a=e("../internal/isObjectLike"),o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;t.exports=r},{"../internal/isArrayLike":119,"../internal/isObjectLike":126}],140:[function(e,t,n){var r=e("../internal/getNative"),i=e("../internal/isLength"),a=e("../internal/isObjectLike"),o="[object Array]",s=Object.prototype,l=s.toString,u=r(Array,"isArray"),c=u||function(e){return a(e)&&i(e.length)&&l.call(e)==o};t.exports=c},{"../internal/getNative":114,"../internal/isLength":125,"../internal/isObjectLike":126}],141:[function(e,t,n){function r(e){return null==e||(o(e)&&(a(e)||u(e)||i(e)||l(e)&&s(e.splice))?!e.length:!c(e).length)}var i=e("./isArguments"),a=e("./isArray"),o=e("../internal/isArrayLike"),s=e("./isFunction"),l=e("../internal/isObjectLike"),u=e("./isString"),c=e("../object/keys");t.exports=r},{"../internal/isArrayLike":119,"../internal/isObjectLike":126,"../object/keys":149,"./isArguments":139,"./isArray":140,"./isFunction":142,"./isString":146}],142:[function(e,t,n){function r(e){return i(e)&&s.call(e)==a}var i=e("./isObject"),a="[object Function]",o=Object.prototype,s=o.toString;t.exports=r},{"./isObject":144}],143:[function(e,t,n){function r(e){return null!=e&&(i(e)?p.test(u.call(e)):o(e)&&(a(e)?p:s).test(e))}var i=e("./isFunction"),a=e("../internal/isHostObject"),o=e("../internal/isObjectLike"),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,p=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},{"../internal/isHostObject":120,"../internal/isObjectLike":126,"./isFunction":142}],144:[function(e,t,n){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=r},{}],145:[function(e,t,n){function r(e){var t;if(!s(e)||h.call(e)!=u||o(e)||a(e)||!p.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return l.ownLast?(i(e,function(e,t,r){return n=p.call(r,t),!1}),n!==!1):(i(e,function(e,t){n=t}),void 0===n||p.call(e,n))}var i=e("../internal/baseForIn"),a=e("./isArguments"),o=e("../internal/isHostObject"),s=e("../internal/isObjectLike"),l=e("../support"),u="[object Object]",c=Object.prototype,p=c.hasOwnProperty,h=c.toString;t.exports=r},{"../internal/baseForIn":75,"../internal/isHostObject":120,"../internal/isObjectLike":126,"../support":153,"./isArguments":139}],146:[function(e,t,n){function r(e){return"string"==typeof e||i(e)&&s.call(e)==a}var i=e("../internal/isObjectLike"),a="[object String]",o=Object.prototype,s=o.toString;t.exports=r},{"../internal/isObjectLike":126}],147:[function(e,t,n){function r(e){return a(e)&&i(e.length)&&!!T[I.call(e)]}var i=e("../internal/isLength"),a=e("../internal/isObjectLike"),o="[object Arguments]",s="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",p="[object Function]",h="[object Map]",f="[object Number]",d="[object Object]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",_="[object Float64Array]",x="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",j="[object Uint8Array]",E="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",T={};T[w]=T[_]=T[x]=T[A]=T[S]=T[j]=T[E]=T[O]=T[k]=!0,T[o]=T[s]=T[b]=T[l]=T[u]=T[c]=T[p]=T[h]=T[f]=T[d]=T[m]=T[g]=T[y]=T[v]=!1;var C=Object.prototype,I=C.toString;t.exports=r},{"../internal/isLength":125,"../internal/isObjectLike":126}],148:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],149:[function(e,t,n){var r=e("../internal/getNative"),i=e("../internal/isArrayLike"),a=e("../lang/isObject"),o=e("../internal/shimKeys"),s=e("../support"),l=r(Object,"keys"),u=l?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?s.enumPrototypes:i(e))?o(e):a(e)?l(e):[]}:o;t.exports=u},{"../internal/getNative":114,"../internal/isArrayLike":119,"../internal/shimKeys":134,"../lang/isObject":144,"../support":153}],150:[function(e,t,n){function r(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(o(e)||a(e)||p(e))&&t||0;for(var n=e.constructor,r=-1,i=s(n)&&n.prototype||S,f=i===e,d=Array(t),m=t>0,y=h.enumErrorProps&&(e===A||e instanceof Error),v=h.enumPrototypes&&s(e);++r<t;)d[r]=r+"";for(var w in e)v&&"prototype"==w||y&&("message"==w||"name"==w)||m&&l(w,t)||"constructor"==w&&(f||!E.call(e,w))||d.push(w);if(h.nonEnumShadows&&e!==S){var T=e===j?_:e===A?g:O.call(e),C=k[T]||k[b];for(T==b&&(i=S),t=x.length;t--;){w=x[t];var I=C[w];f&&I||(I?!E.call(e,w):e[w]===i[w])||d.push(w)}}return d}var i=e("../internal/arrayEach"),a=e("../lang/isArguments"),o=e("../lang/isArray"),s=e("../lang/isFunction"),l=e("../internal/isIndex"),u=e("../internal/isLength"),c=e("../lang/isObject"),p=e("../lang/isString"),h=e("../support"),f="[object Array]",d="[object Boolean]",m="[object Date]",g="[object Error]",y="[object Function]",v="[object Number]",b="[object Object]",w="[object RegExp]",_="[object String]",x=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],A=Error.prototype,S=Object.prototype,j=String.prototype,E=S.hasOwnProperty,O=S.toString,k={};k[f]=k[m]=k[v]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[d]=k[_]={constructor:!0,toString:!0,valueOf:!0},k[g]=k[y]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},i(x,function(e){for(var t in k)if(E.call(k,t)){var n=k[t];n[e]=E.call(n,e)}}),t.exports=r},{"../internal/arrayEach":63,"../internal/isIndex":121,"../internal/isLength":125,"../lang/isArguments":139,"../lang/isArray":140,"../lang/isFunction":142,"../lang/isObject":144,"../lang/isString":146,"../support":153}],151:[function(e,t,n){function r(e){e=a(e);for(var t=-1,n=i(e),r=n.length,o=Array(r);++t<r;){var s=n[t];o[t]=[s,e[s]]}return o}var i=e("./keys"),a=e("../internal/toObject");t.exports=r},{"../internal/toObject":135,"./keys":149}],152:[function(e,t,n){function r(e){return i(e,a(e))}var i=e("../internal/baseValues"),a=e("./keys");t.exports=r},{"../internal/baseValues":91,"./keys":149}],153:[function(e,t,n){var r=Array.prototype,i=Error.prototype,a=Object.prototype,o=a.propertyIsEnumerable,s=r.splice,l={};!function(e){var t=function(){this.x=e},n={0:e,length:e},r=[];t.prototype={valueOf:e,y:e};for(var a in new t)r.push(a);l.enumErrorProps=o.call(i,"message")||o.call(i,"name"),l.enumPrototypes=o.call(t,"prototype"),l.nonEnumShadows=!/valueOf/.test(r),l.ownLast="x"!=r[0],l.spliceObjects=(s.call(n,0,1),!n[0]),l.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=l},{}],154:[function(e,t,n){function r(e){return e}t.exports=r},{}],155:[function(e,t,n){function r(){}t.exports=r},{}],156:[function(e,t,n){function r(e){return o(e)?i(e):a(e)}var i=e("../internal/baseProperty"),a=e("../internal/basePropertyDeep"),o=e("../internal/isKey");t.exports=r},{"../internal/baseProperty":86,"../internal/basePropertyDeep":87,"../internal/isKey":123}],157:[function(e,n,r){(function(e){!function(e){"use strict";if("function"==typeof bootstrap)bootstrap("promise",e);else if("object"==typeof r&&"object"==typeof n)n.exports=e();else if("function"==typeof t&&t.amd)t(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=e}else{if("undefined"==typeof window&&"undefined"==typeof self)throw new Error("This environment was not anticipated by Q. Please file a bug.");var i="undefined"!=typeof window?window:self,a=i.Q;i.Q=e(),i.Q.noConflict=function(){return i.Q=a,this}}}(function(){"use strict";function t(e){return function(){return Q.apply(e,arguments)}}function n(e){return e===Object(e)}function r(e){return"[object StopIteration]"===re(e)||e instanceof H}function i(e,t){if($&&t.stack&&"object"==typeof e&&null!==e&&e.stack&&e.stack.indexOf(ie)===-1){for(var n=[],r=t;r;r=r.source)r.stack&&n.unshift(r.stack);n.unshift(e.stack);var i=n.join("\n"+ie+"\n");e.stack=a(i)}}function a(e){for(var t=e.split("\n"),n=[],r=0;r<t.length;++r){var i=t[r];l(i)||o(i)||!i||n.push(i)}return n.join("\n")}function o(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function s(e){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);if(t)return[t[1],Number(t[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(e);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(e);return r?[r[1],Number(r[2])]:void 0}function l(e){var t=s(e);if(!t)return!1;var n=t[0],r=t[1];return n===V&&r>=Y&&r<=ue}function u(){if($)try{throw new Error}catch(e){var t=e.stack.split("\n"),n=t[0].indexOf("@")>0?t[1]:t[2],r=s(n);if(!r)return;return V=r[0],r[1]}}function c(e,t,n){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t+" is deprecated, use "+n+" instead.",new Error("").stack),e.apply(e,arguments)}}function p(e){return e instanceof m?e:b(e)?k(e):O(e)}function h(){function e(e){t=e,a.source=e,K(n,function(t,n){p.nextTick(function(){e.promiseDispatch.apply(e,n)})},void 0),n=void 0,r=void 0}var t,n=[],r=[],i=ee(h.prototype),a=ee(m.prototype);if(a.promiseDispatch=function(e,i,a){var o=G(arguments);n?(n.push(o),"when"===i&&a[1]&&r.push(a[1])):p.nextTick(function(){t.promiseDispatch.apply(t,o)})},a.valueOf=function(){if(n)return a;var e=y(t);return v(e)&&(t=e),e},a.inspect=function(){return t?t.inspect():{state:"pending"}},p.longStackSupport&&$)try{throw new Error}catch(o){a.stack=o.stack.substring(o.stack.indexOf("\n")+1)}return i.promise=a,i.resolve=function(n){t||e(p(n))},i.fulfill=function(n){t||e(O(n))},i.reject=function(n){t||e(E(n))},i.notify=function(e){t||K(r,function(t,n){p.nextTick(function(){n(e)})},void 0)},i}function f(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=h();try{e(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}return t.promise}function d(e){return f(function(t,n){for(var r=0,i=e.length;r<i;r++)p(e[r]).then(t,n)})}function m(e,t,n){void 0===t&&(t=function(e){return E(new Error("Promise does not support operation: "+e))}),void 0===n&&(n=function(){return{state:"unknown"}});var r=ee(m.prototype);if(r.promiseDispatch=function(n,i,a){var o;try{o=e[i]?e[i].apply(r,a):t.call(r,i,a)}catch(s){o=E(s)}n&&n(o)},r.inspect=n,n){var i=n();"rejected"===i.state&&(r.exception=i.reason),r.valueOf=function(){var e=n();return"pending"===e.state||"rejected"===e.state?r:e.value}}return r}function g(e,t,n,r){return p(e).then(t,n,r)}function y(e){if(v(e)){var t=e.inspect();if("fulfilled"===t.state)return t.value}return e}function v(e){return e instanceof m}function b(e){return n(e)&&"function"==typeof e.then}function w(e){return v(e)&&"pending"===e.inspect().state}function _(e){return!v(e)||"fulfilled"===e.inspect().state}function x(e){return v(e)&&"rejected"===e.inspect().state}function A(){ae.length=0,oe.length=0,le||(le=!0)}function S(t,n){le&&("object"==typeof e&&"function"==typeof e.emit&&p.nextTick.runAfter(function(){X(oe,t)!==-1&&(e.emit("unhandledRejection",n,t),se.push(t))}),oe.push(t),n&&"undefined"!=typeof n.stack?ae.push(n.stack):ae.push("(no stack) "+n))}function j(t){if(le){var n=X(oe,t);n!==-1&&("object"==typeof e&&"function"==typeof e.emit&&p.nextTick.runAfter(function(){var r=X(se,t);r!==-1&&(e.emit("rejectionHandled",ae[n],t),se.splice(r,1))}),oe.splice(n,1),ae.splice(n,1))}}function E(e){var t=m({when:function(t){return t&&j(this),t?t(e):this}},function(){return this},function(){return{state:"rejected",reason:e}});return S(t,e),t}function O(e){return m({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},"delete":function(t){delete e[t]},post:function(t,n){return null===t||void 0===t?e.apply(void 0,n):e[t].apply(e,n)},apply:function(t,n){return e.apply(t,n)},keys:function(){return ne(e)}},void 0,function(){return{state:"fulfilled",value:e}})}function k(e){var t=h();return p.nextTick(function(){try{e.then(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}}),t.promise}function T(e){return m({isDef:function(){}},function(t,n){return R(e,t,n)},function(){return p(e).inspect()})}function C(e,t,n){return p(e).spread(t,n)}function I(e){return function(){function t(e,t){var o;if("undefined"==typeof StopIteration){try{o=n[e](t)}catch(s){return E(s)}return o.done?p(o.value):g(o.value,i,a)}try{o=n[e](t)}catch(s){return r(s)?p(s.value):E(s)}return g(o,i,a)}var n=e.apply(this,arguments),i=t.bind(t,"next"),a=t.bind(t,"throw");return i()}}function D(e){p.done(p.async(e)())}function L(e){throw new H(e)}function M(e){return function(){return C([this,U(arguments)],function(t,n){return e.apply(t,n)})}}function R(e,t,n){return p(e).dispatch(t,n)}function U(e){return g(e,function(e){var t=0,n=h();return K(e,function(r,i,a){var o;v(i)&&"fulfilled"===(o=i.inspect()).state?e[a]=o.value:(++t,g(i,function(r){e[a]=r,0===--t&&n.resolve(e)},n.reject,function(e){n.notify({index:a,value:e})}))},void 0),0===t&&n.resolve(e),n.promise})}function P(e){if(0===e.length)return p.resolve();var t=p.defer(),n=0;return K(e,function(r,i,a){function o(e){t.resolve(e)}function s(){n--,0===n&&t.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."))}function l(e){t.notify({index:a,value:e})}var u=e[a];n++,g(u,o,s,l)},void 0),t.promise}function q(e){return g(e,function(e){return e=Z(e,p),g(U(Z(e,function(e){return g(e,J,J)})),function(){return e})})}function B(e){return p(e).allSettled()}function z(e,t){return p(e).then(void 0,void 0,t)}function N(e,t){return p(e).nodeify(t)}var $=!1;try{throw new Error}catch(F){$=!!F.stack}var V,H,Y=u(),J=function(){},W=function(){function t(){for(var e,t;r.next;)r=r.next,e=r.task,r.task=void 0,t=r.domain,t&&(r.domain=void 0,t.enter()),n(e,t);for(;l.length;)e=l.pop(),n(e);a=!1}function n(e,n){try{e()}catch(r){if(s)throw n&&n.exit(),setTimeout(t,0),n&&n.enter(),r;setTimeout(function(){throw r},0)}n&&n.exit()}var r={task:void 0,next:null},i=r,a=!1,o=void 0,s=!1,l=[];if(W=function(t){i=i.next={task:t,domain:s&&e.domain,next:null},a||(a=!0,o())},"object"==typeof e&&"[object process]"===e.toString()&&e.nextTick)s=!0,o=function(){e.nextTick(t)};else if("function"==typeof setImmediate)o="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var u=new MessageChannel;u.port1.onmessage=function(){o=c,u.port1.onmessage=t,t()};var c=function(){u.port2.postMessage(0)};o=function(){setTimeout(t,0),c()}}else o=function(){setTimeout(t,0)};return W.runAfter=function(e){l.push(e),a||(a=!0,o())},W}(),Q=Function.call,G=t(Array.prototype.slice),K=t(Array.prototype.reduce||function(e,t){var n=0,r=this.length;if(1===arguments.length)for(;;){if(n in this){t=this[n++];break}if(++n>=r)throw new TypeError}for(;n<r;n++)n in this&&(t=e(t,this[n],n));return t}),X=t(Array.prototype.indexOf||function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return t;return-1}),Z=t(Array.prototype.map||function(e,t){var n=this,r=[];return K(n,function(i,a,o){r.push(e.call(t,a,o,n))},void 0),r}),ee=Object.create||function(e){function t(){}return t.prototype=e,new t},te=t(Object.prototype.hasOwnProperty),ne=Object.keys||function(e){var t=[];for(var n in e)te(e,n)&&t.push(n);return t},re=t(Object.prototype.toString);H="undefined"!=typeof ReturnValue?ReturnValue:function(e){this.value=e};var ie="From previous event:";p.resolve=p,p.nextTick=W,p.longStackSupport=!1,"object"==typeof e&&e&&e.env&&e.env.Q_DEBUG&&(p.longStackSupport=!0),p.defer=h,h.prototype.makeNodeResolver=function(){var e=this;return function(t,n){t?e.reject(t):arguments.length>2?e.resolve(G(arguments,1)):e.resolve(n)}},p.Promise=f,p.promise=f,f.race=d,f.all=U,f.reject=E,f.resolve=p,p.passByCopy=function(e){return e},m.prototype.passByCopy=function(){return this},p.join=function(e,t){return p(e).join(t)},m.prototype.join=function(e){return p([this,e]).spread(function(e,t){if(e===t)return e;throw new Error("Can't join: not the same: "+e+" "+t)})},p.race=d,m.prototype.race=function(){return this.then(p.race)},p.makePromise=m,m.prototype.toString=function(){return"[object Promise]"},m.prototype.then=function(e,t,n){function r(t){try{return"function"==typeof e?e(t):t}catch(n){return E(n)}}function a(e){if("function"==typeof t){i(e,s);try{return t(e)}catch(n){return E(n)}}return E(e)}function o(e){return"function"==typeof n?n(e):e}var s=this,l=h(),u=!1;return p.nextTick(function(){s.promiseDispatch(function(e){u||(u=!0,l.resolve(r(e)))},"when",[function(e){u||(u=!0,l.resolve(a(e)))}])}),s.promiseDispatch(void 0,"when",[void 0,function(e){var t,n=!1;try{t=o(e)}catch(r){if(n=!0,!p.onerror)throw r;p.onerror(r)}n||l.notify(t)}]),l.promise},p.tap=function(e,t){return p(e).tap(t)},m.prototype.tap=function(e){return e=p(e),this.then(function(t){return e.fcall(t).thenResolve(t)})},p.when=g,m.prototype.thenResolve=function(e){return this.then(function(){return e})},p.thenResolve=function(e,t){return p(e).thenResolve(t)},m.prototype.thenReject=function(e){return this.then(function(){throw e})},p.thenReject=function(e,t){return p(e).thenReject(t)},p.nearer=y,p.isPromise=v,p.isPromiseAlike=b,p.isPending=w,m.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=_,m.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=x,m.prototype.isRejected=function(){return"rejected"===this.inspect().state};var ae=[],oe=[],se=[],le=!0;p.resetUnhandledRejections=A,p.getUnhandledReasons=function(){return ae.slice()},p.stopUnhandledRejectionTracking=function(){A(),le=!1},A(),p.reject=E,p.fulfill=O,p.master=T,p.spread=C,m.prototype.spread=function(e,t){return this.all().then(function(t){return e.apply(void 0,t)},t)},p.async=I,p.spawn=D,p["return"]=L,p.promised=M,p.dispatch=R,m.prototype.dispatch=function(e,t){var n=this,r=h();return p.nextTick(function(){n.promiseDispatch(r.resolve,e,t)}),r.promise},p.get=function(e,t){return p(e).dispatch("get",[t])},m.prototype.get=function(e){return this.dispatch("get",[e])},p.set=function(e,t,n){return p(e).dispatch("set",[t,n])},m.prototype.set=function(e,t){return this.dispatch("set",[e,t])},p.del=p["delete"]=function(e,t){return p(e).dispatch("delete",[t])},m.prototype.del=m.prototype["delete"]=function(e){return this.dispatch("delete",[e])},p.mapply=p.post=function(e,t,n){return p(e).dispatch("post",[t,n])},m.prototype.mapply=m.prototype.post=function(e,t){return this.dispatch("post",[e,t])},p.send=p.mcall=p.invoke=function(e,t){return p(e).dispatch("post",[t,G(arguments,2)])},m.prototype.send=m.prototype.mcall=m.prototype.invoke=function(e){return this.dispatch("post",[e,G(arguments,1)])},p.fapply=function(e,t){return p(e).dispatch("apply",[void 0,t])},m.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},p["try"]=p.fcall=function(e){return p(e).dispatch("apply",[void 0,G(arguments,1)])},m.prototype.fcall=function(){return this.dispatch("apply",[void 0,G(arguments)])},p.fbind=function(e){var t=p(e),n=G(arguments,1);return function(){return t.dispatch("apply",[this,n.concat(G(arguments))])}},m.prototype.fbind=function(){var e=this,t=G(arguments);return function(){return e.dispatch("apply",[this,t.concat(G(arguments))])}},p.keys=function(e){return p(e).dispatch("keys",[])},m.prototype.keys=function(){return this.dispatch("keys",[])},p.all=U,m.prototype.all=function(){return U(this)},p.any=P,m.prototype.any=function(){return P(this)},p.allResolved=c(q,"allResolved","allSettled"),m.prototype.allResolved=function(){return q(this)},p.allSettled=B,m.prototype.allSettled=function(){return this.then(function(e){return U(Z(e,function(e){function t(){return e.inspect()}return e=p(e),e.then(t,t)}))})},p.fail=p["catch"]=function(e,t){return p(e).then(void 0,t)},m.prototype.fail=m.prototype["catch"]=function(e){return this.then(void 0,e)},p.progress=z,m.prototype.progress=function(e){return this.then(void 0,void 0,e)},p.fin=p["finally"]=function(e,t){return p(e)["finally"](t)},m.prototype.fin=m.prototype["finally"]=function(e){return e=p(e),this.then(function(t){return e.fcall().then(function(){return t})},function(t){return e.fcall().then(function(){throw t})})},p.done=function(e,t,n,r){return p(e).done(t,n,r)},m.prototype.done=function(t,n,r){var a=function(e){p.nextTick(function(){if(i(e,o),!p.onerror)throw e;p.onerror(e)})},o=t||n||r?this.then(t,n,r):this;"object"==typeof e&&e&&e.domain&&(a=e.domain.bind(a)),o.then(void 0,a)},p.timeout=function(e,t,n){return p(e).timeout(t,n)},m.prototype.timeout=function(e,t){var n=h(),r=setTimeout(function(){t&&"string"!=typeof t||(t=new Error(t||"Timed out after "+e+" ms"),t.code="ETIMEDOUT"),n.reject(t)},e);return this.then(function(e){clearTimeout(r),n.resolve(e)},function(e){clearTimeout(r),n.reject(e)},n.notify),n.promise},p.delay=function(e,t){return void 0===t&&(t=e,e=void 0),p(e).delay(t)},m.prototype.delay=function(e){return this.then(function(t){var n=h();return setTimeout(function(){n.resolve(t)},e),n.promise})},p.nfapply=function(e,t){return p(e).nfapply(t)},m.prototype.nfapply=function(e){var t=h(),n=G(e);return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},p.nfcall=function(e){var t=G(arguments,1);return p(e).nfapply(t)},m.prototype.nfcall=function(){var e=G(arguments),t=h();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},p.nfbind=p.denodeify=function(e){var t=G(arguments,1);return function(){var n=t.concat(G(arguments)),r=h();return n.push(r.makeNodeResolver()),p(e).fapply(n).fail(r.reject),r.promise}},m.prototype.nfbind=m.prototype.denodeify=function(){var e=G(arguments);return e.unshift(this),p.denodeify.apply(void 0,e)},p.nbind=function(e,t){var n=G(arguments,2);return function(){function r(){return e.apply(t,arguments)}var i=n.concat(G(arguments)),a=h();return i.push(a.makeNodeResolver()),p(r).fapply(i).fail(a.reject),a.promise}},m.prototype.nbind=function(){var e=G(arguments,0);return e.unshift(this),p.nbind.apply(void 0,e)},p.nmapply=p.npost=function(e,t,n){return p(e).npost(t,n)},m.prototype.nmapply=m.prototype.npost=function(e,t){var n=G(t||[]),r=h();return n.push(r.makeNodeResolver()),this.dispatch("post",[e,n]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(e,t){var n=G(arguments,2),r=h();return n.push(r.makeNodeResolver()),p(e).dispatch("post",[t,n]).fail(r.reject),r.promise},m.prototype.nsend=m.prototype.nmcall=m.prototype.ninvoke=function(e){var t=G(arguments,1),n=h();return t.push(n.makeNodeResolver()),this.dispatch("post",[e,t]).fail(n.reject),n.promise},p.nodeify=N,m.prototype.nodeify=function(e){return e?void this.then(function(t){p.nextTick(function(){e(null,t)})},function(t){p.nextTick(function(){e(t)})}):this},p.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var ue=u();return p})}).call(this,e("_process"))},{_process:12}],158:[function(e,t,n){function r(){}function i(e){if(!y(e))return e;var t=[];for(var n in e)a(t,n,e[n]);return t.join("&")}function a(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){a(e,t,n)});else if(y(n))for(var r in n)a(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function o(e){for(var t,n,r={},i=e.split("&"),a=0,o=i.length;a<o;++a)t=i[a],n=t.indexOf("="),n==-1?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function s(e){var t,n,r,i,a=e.split(/\r?\n/),o={};a.pop();for(var s=0,l=a.length;s<l;++s)n=a[s],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=b(n.slice(t+1)),o[r]=i;return o}function l(e){return/[\/+]json\b/.test(e)}function u(e){return e.split(/ *; */).shift()}function c(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null, +this.statusText=this.req.xhr.statusText,this._setStatusProperties(this.xhr.status),this.header=this.headers=s(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function h(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,e.statusCode=n.xhr&&n.xhr.status?n.xhr.status:null,n.callback(e)}n.emit("response",t);var i;try{(t.status<200||t.status>=300)&&(i=new Error(t.statusText||"Unsuccessful HTTP response"),i.original=e,i.response=t,i.status=t.status)}catch(r){i=r}i?n.callback(i,t):n.callback(null,t)})}function f(e,t){var n=v("DELETE",e);return t&&n.end(t),n}var d;"undefined"!=typeof window?d=window:"undefined"!=typeof self?d=self:(console.warn("Using browser-only version of superagent in non-browser environment"),d=this);var m=e("emitter"),g=e("./request-base"),y=e("./is-object"),v=t.exports=e("./request").bind(null,h);v.getXHR=function(){if(!(!d.XMLHttpRequest||d.location&&"file:"==d.location.protocol&&d.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var b="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};v.serializeObject=i,v.parseString=o,v.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},v.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},v.parse={"application/x-www-form-urlencoded":o,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=u(t);var n=c(t);for(var r in n)this[r]=n[r]},p.prototype._parseBody=function(e){var t=v.parse[this.type];return!t&&l(this.type)&&(t=v.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},v.Response=p,m(h.prototype);for(var w in g)h.prototype[w]=g[w];h.prototype.type=function(e){return this.set("Content-Type",v.types[e]||e),this},h.prototype.responseType=function(e){return this._responseType=e,this},h.prototype.accept=function(e){return this.set("Accept",v.types[e]||e),this},h.prototype.auth=function(e,t,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(e+":"+t);this.set("Authorization","Basic "+r);break;case"auto":this.username=e,this.password=t}return this},h.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,n){return this._getFormData().append(e,t,n||t.name),this},h.prototype._getFormData=function(){return this._formData||(this._formData=new d.FormData),this._formData},h.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},h.prototype.end=function(e){var t=this,n=this.xhr=v.getXHR(),i=this._timeout,a=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var o=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=o);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=o)}catch(s){}if(i&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},i)),this._appendQueryString(),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof a&&!this._isHost(a)){var u=this._header["content-type"],c=this._serializer||v.serialize[u?u.split(";")[0]:""];!c&&l(u)&&(c=v.serialize["application/json"]),c&&(a=c(a))}for(var p in this.header)null!=this.header[p]&&n.setRequestHeader(p,this.header[p]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!=typeof a?a:null),this},v.Request=h,v.get=function(e,t,n){var r=v("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},v.head=function(e,t,n){var r=v("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.options=function(e,t,n){var r=v("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.del=f,v["delete"]=f,v.patch=function(e,t,n){var r=v("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.post=function(e,t,n){var r=v("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},v.put=function(e,t,n){var r=v("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},{"./is-object":159,"./request":161,"./request-base":160,emitter:162}],159:[function(e,t,n){function r(e){return null!==e&&"object"==typeof e}t.exports=r},{}],160:[function(e,t,n){var r=e("./is-object");n.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},n.parse=function(e){return this._parser=e,this},n.serialize=function(e){return this._serializer=e,this},n.timeout=function(e){return this._timeout=e,this},n.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},n.use=function(e){return e(this),this},n.get=function(e){return this._header[e.toLowerCase()]},n.getHeader=n.get,n.set=function(e,t){if(r(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},n.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},n.field=function(e,t){return this._getFormData().append(e,t),this},n.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.withCredentials=function(){return this._withCredentials=!0,this},n.redirects=function(e){return this._maxRedirects=e,this},n.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n._isHost=function(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},n.send=function(e){var t=r(e),n=this._header["content-type"];if(t&&r(this._data))for(var i in e)this._data[i]=e[i];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)}},{"./is-object":159}],161:[function(e,t,n){function r(e,t,n){return"function"==typeof n?new e("GET",t).end(n):2==arguments.length?new e("GET",t):new e(t,n)}t.exports=r},{}],162:[function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}"undefined"!=typeof t&&(t.exports=r),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}]},{},[1])(1)}),window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},"model"!==e.defaultModelRendering&&(e.defaultModelRendering="schema"),e.highlightSizeThreshold||(e.highlightSizeThreshold=1e5),e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),"string"==typeof e.oauth2RedirectUrl&&(window.oAuthRedirectUrl=e.oauth2RedirectUrl),$("#"+this.dom_id).length||$("body").append('<div id="'+this.dom_id+'"></div>'),this.options=e,marked.setOptions({gfm:!0});var t=this;this.options.success=function(){return t.render()},this.options.progress=function(e){return t.showMessage(e)},this.options.failure=function(e){return t.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return t.updateSwaggerUi(e)}),JSONEditor.defaults.iconlibs.swagger=JSONEditor.AbstractIconLib.extend({mapping:{collapse:"collapse",expand:"expand"},icon_prefix:"swagger-"})},setOption:function(e,t){this.options[e]=t},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear(),this.authView&&this.authView.remove();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.api&&(this.options.authorizations=this.api.clientAuthorizations.authz),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){var e;switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),_.isEmpty(this.api.securityDefinitions)||(e=_.map(this.api.securityDefinitions,function(e,t){var n={};return n[t]=e,n}),this.authView=new SwaggerUi.Views.AuthButtonView({data:SwaggerUi.utils.parseSecurityDefinitions(e),router:this}),$("#auth_container").append(this.authView.render().el)),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,t){if(0===t.indexOf("/")){var n=e.split("/");return e=n[0]+"//"+n[2],e+t}var r=e.length;return e.indexOf("?")>-1&&(r=Math.min(r,e.indexOf("?"))),e.indexOf("#")>-1&&(r=Math.min(r,e.indexOf("#"))),e=e.substring(0,r),e.indexOf("/",e.length-1)!==-1?e+t:e+"/"+t},showMessage:function(e){void 0===e&&(e="");var t=$("#message-bar");t.removeClass("message-fail"),t.addClass("message-success"),t.text(e),window.SwaggerTranslator&&window.SwaggerTranslator.translate(t)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var t=$("#message-bar").text(e);return this.options.onFailure&&this.options.onFailure(e),t},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))}),$(".propDesc",".model-signature .description").each(function(){$(this).html(marked($(this).html())).addClass("markdown")})}}),window.SwaggerUi.Views={},window.SwaggerUi.Models={},window.SwaggerUi.Collections={},window.SwaggerUi.partials={},window.SwaggerUi.utils={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),function(e,t){"function"==typeof define&&define.amd?define(["b"],function(n){return e.SwaggerUi=t(n)}):"object"==typeof exports?module.exports=t(require("b")):e.SwaggerUi=t(e.b)}(this,function(){return SwaggerUi}),window.SwaggerUi.utils={parseSecurityDefinitions:function(e,t){var n=Object.assign({},t),r=[],i=[],a=[],o=window.SwaggerUi.utils;return Array.isArray(e)?(e.forEach(function(e){var t={},s={};for(var l in e)if(Array.isArray(e[l])){if(!n[l])continue;if(n[l]=n[l]||{},"oauth2"===n[l].type){s[l]=Object.assign({},n[l]),s[l].scopes=Object.assign({},n[l].scopes);for(var u in s[l].scopes)e[l].indexOf(u)<0&&delete s[l].scopes[u];s[l].scopes=o.parseOauth2Scopes(s[l].scopes),a=_.merge(a,s[l].scopes)}else t[l]=Object.assign({},n[l])}else"oauth2"===e[l].type?(s[l]=Object.assign({},e[l]),s[l].scopes=o.parseOauth2Scopes(s[l].scopes),a=_.merge(a,s[l].scopes)):t[l]=e[l];_.isEmpty(t)||i.push(t),_.isEmpty(s)||r.push(s)}),{auths:i,oauth2:r,scopes:a}):null},parseOauth2Scopes:function(e){var t,n=Object.assign({},e),r=[];for(t in n)r.push({scope:t,description:n[t]});return r},sanitize:function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),e=e.replace(/(on\w+="[^"]*")*(on\w+='[^']*')*(on\w+=\w*\(\w*\))*/gi,"")}},SwaggerUi.Models.ApiKeyAuthModel=Backbone.Model.extend({defaults:{"in":"",name:"",title:"",value:""},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("value");return this.set("valid",e),e}}),SwaggerUi.Views.ApiKeyAuthView=Backbone.View.extend({events:{"change .input_apiKey_entry":"apiKeyChange"},selectors:{apikeyInput:".input_apiKey_entry"},template:Handlebars.templates.apikey_auth,initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){return this.$el.html(this.template(this.model.toJSON())),this},apiKeyChange:function(e){var t=$(e.target).val();t&&this.$(this.selectors.apikeyInput).removeClass("error"),this.model.set("value",t)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.isValid()||this.$(this.selectors.apikeyInput).addClass("error")}}),SwaggerUi.Views.AuthButtonView=Backbone.View.extend({events:{"click .authorize__btn":"authorizeBtnClick"},tpls:{popup:Handlebars.templates.popup,authBtn:Handlebars.templates.auth_button,authBtnOperation:Handlebars.templates.auth_button_operation},initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.isOperation=this.options.isOperation,this.model=this.model||{},this.router=this.options.router,this.auths=this.options.data.oauth2.concat(this.options.data.auths)},render:function(){var e=this.isOperation?"authBtnOperation":"authBtn";return this.$authEl=this.renderAuths(this.auths),this.$el.html(this.tpls[e](this.model)),this},authorizeBtnClick:function(e){var t;e.preventDefault(),t={title:"Available authorizations",content:this.$authEl},this.render(),this.popup=new SwaggerUi.Views.PopupView({model:t}),this.popup.render()},renderAuths:function(e){var t=$("<div>"),n=!1;return e.forEach(function(e){var r=new SwaggerUi.Views.AuthView({data:e,router:this.router}),i=r.render().el;t.append(i),r.isLogout&&(n=!0)},this),this.model.isLogout=n,t}}),SwaggerUi.Collections.AuthsCollection=Backbone.Collection.extend({constructor:function(){var e=Array.prototype.slice.call(arguments);e[0]=this.parse(e[0]),Backbone.Collection.apply(this,e)},add:function(e){var t=Array.prototype.slice.call(arguments);Array.isArray(e)?t[0]=_.map(e,function(e){return this.handleOne(e)},this):t[0]=this.handleOne(e),Backbone.Collection.prototype.add.apply(this,t)},handleOne:function(e){var t=e;if(!(e instanceof Backbone.Model))switch(e.type){case"oauth2":t=new SwaggerUi.Models.Oauth2Model(e);break;case"basic":t=new SwaggerUi.Models.BasicAuthModel(e);break;case"apiKey":t=new SwaggerUi.Models.ApiKeyAuthModel(e);break;default:t=new Backbone.Model(e)}return t},isValid:function(){var e=!0;return this.models.forEach(function(t){t.validate()||(e=!1)}),e},isAuthorized:function(){return this.length===this.where({isLogout:!0}).length},isPartiallyAuthorized:function(){return this.where({isLogout:!0}).length>0},parse:function(e){var t={};return"undefined"!=typeof window.swaggerUi&&(t=Object.assign({},window.swaggerUi.api.clientAuthorizations.authz)),_.map(e,function(e,n){var r=t[n]&&"basic"===e.type&&t[n].username&&t[n].password;return _.extend(e,{title:n}),(t[n]||r)&&_.extend(e,{isLogout:!0,value:r?void 0:t[n].value,username:r?t[n].username:void 0,password:r?t[n].password:void 0,valid:!0}),e})}}),SwaggerUi.Views.AuthsCollectionView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.router=this.options.router,this.collection=new SwaggerUi.Collections.AuthsCollection(e.data),this.$innerEl=$("<div>"),this.authViews=[]},render:function(){return this.collection.each(function(e){this.renderOneAuth(e)},this),this.$el.html(this.$innerEl.html()?this.$innerEl:""),this},renderOneAuth:function(e){var t,n,r,i=e.get("type");"apiKey"===i?r="ApiKeyAuthView":"basic"===i&&0===this.$innerEl.find(".basic_auth_container").length?r="BasicAuthView":"oauth2"===i&&(r="Oauth2View"),r&&(n=new SwaggerUi.Views[r]({model:e,router:this.router}),t=n.render().el,this.authViews.push(n)),this.$innerEl.append(t)},highlightInvalid:function(){this.authViews.forEach(function(e){e.highlightInvalid()},this)}}),SwaggerUi.Views.AuthView=Backbone.View.extend({events:{"click .auth_submit__button":"authorizeClick","click .auth_logout__button":"logoutClick"},tpls:{main:Handlebars.templates.auth_view},selectors:{innerEl:".auth_inner",authBtn:".auth_submit__button"},initialize:function(e){this.options=e||{},e.data=e.data||{},this.router=this.options.router,this.authsCollectionView=new SwaggerUi.Views.AuthsCollectionView({data:e.data}),this.$el.html(this.tpls.main({isLogout:this.authsCollectionView.collection.isAuthorized(),isAuthorized:this.authsCollectionView.collection.isPartiallyAuthorized()})),this.$innerEl=this.$(this.selectors.innerEl),this.isLogout=this.authsCollectionView.collection.isPartiallyAuthorized()},render:function(){return this.$innerEl.html(this.authsCollectionView.render().el),this},authorizeClick:function(e){e.preventDefault(),e.stopPropagation(),this.authsCollectionView.collection.isValid()?this.authorize():this.authsCollectionView.highlightInvalid()},authorize:function(){this.authsCollectionView.collection.forEach(function(e){var t,n,r=e.get("type");"apiKey"===r?(t=new SwaggerClient.ApiKeyAuthorization(e.get("name"),e.get("value"),e.get("in")),this.router.api.clientAuthorizations.add(e.get("title"),t)):"basic"===r?(n=new SwaggerClient.PasswordAuthorization(e.get("username"),e.get("password")),this.router.api.clientAuthorizations.add(e.get("title"),n)):"oauth2"===r&&this.handleOauth2Login(e)},this),this.router.load()},logoutClick:function(e){e.preventDefault(),this.authsCollectionView.collection.forEach(function(e){window.swaggerUi.api.clientAuthorizations.remove(e.get("title"))}),this.router.load()},handleOauth2Login:function(e){function t(e){return e.vendorExtensions["x-tokenName"]||e.tokenName}var n,r,i,a=window.location,o=location.pathname.substring(0,location.pathname.lastIndexOf("/")),s=a.protocol+"//"+a.host+o+"/o2c.html",l=window.oAuthRedirectUrl||s,u=null,c=_.map(e.get("scopes"),function(e){if(e.checked)return e.scope}),p=window.swaggerUiAuth||(window.swaggerUiAuth={});p.OAuthSchemeKey=e.get("title"),window.enabledScopes=c;var h=e.get("flow");if("oauth2"!==e.get("type")||!h||"implicit"!==h&&"accessCode"!==h){if("oauth2"===e.get("type")&&h&&"application"===h)return r=e.attributes,p.tokenName=t(r)||"access_token",void this.clientCredentialsFlow(c,r,p.OAuthSchemeKey);if("oauth2"===e.get("type")&&h&&"password"===h)return r=e.attributes,p.tokenName=t(r)||"access_token",void this.passwordFlow(c,r,p.OAuthSchemeKey);if(e.get("grantTypes")){var f=e.get("grantTypes");for(var d in f)f.hasOwnProperty(d)&&"implicit"===d?(r=f[d],i=r.loginEndpoint.url,u=r.loginEndpoint.url+"?response_type=token",p.tokenName=t(r)):f.hasOwnProperty(d)&&"accessCode"===d&&(r=f[d],i=r.tokenRequestEndpoint.url,u=r.tokenRequestEndpoint.url+"?response_type=code",p.tokenName=t(r))}}else r=e.attributes,u=r.authorizationUrl+"?response_type="+("implicit"===h?"token":"code"),p.tokenName=t(r)||"access_token",p.tokenUrl="accessCode"===h?r.tokenUrl:null,n=p.OAuthSchemeKey;redirect_uri=l,u+="&redirect_uri="+encodeURIComponent(l),u+="&realm="+encodeURIComponent(realm),u+="&client_id="+encodeURIComponent(clientId),u+="&scope="+encodeURIComponent(c.join(scopeSeparator)),u+="&state="+encodeURIComponent(n);for(var m in additionalQueryStringParams)u+="&"+m+"="+encodeURIComponent(additionalQueryStringParams[m]);window.open(u)},clientCredentialsFlow:function(e,t,n){this.accessTokenRequest(e,t,n,"client_credentials")},passwordFlow:function(e,t,n){this.accessTokenRequest(e,t,n,"password",{username:t.username,password:t.password})},accessTokenRequest:function(e,t,n,r,i){i=$.extend({},{scope:e.join(" "),grant_type:r},i);var a={};switch(t.clientAuthenticationType){case"basic":a.Authorization="Basic "+btoa(t.clientId+":"+t.clientSecret);break;case"request-body":i.client_id=t.clientId,i.client_secret=t.clientSecret}$.ajax({url:t.tokenUrl,type:"POST",data:i,headers:a,success:function(e){onOAuthComplete(e,n)},error:function(){onOAuthComplete("")}})}}),SwaggerUi.Models.BasicAuthModel=Backbone.Model.extend({defaults:{username:"",password:"",title:"basic"},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("password")&&!!this.get("username");return this.set("valid",e),e}}),SwaggerUi.Views.BasicAuthView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},events:{"change .auth_input":"inputChange"},selectors:{usernameInput:".basic_auth__username",passwordInput:".basic_auth__password"},cls:{error:"error"},template:Handlebars.templates.basic_auth,render:function(){return $(this.el).html(this.template(this.model.toJSON())),this},inputChange:function(e){var t=$(e.target),n=t.val(),r=t.prop("name");n&&t.removeClass(this.cls.error),this.model.set(r,n)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.model.get("username")||this.$(this.selectors.usernameInput).addClass(this.cls.error)}}),SwaggerUi.Views.ContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.contentTypeId="ct"+Math.random(),$(this.el).html(Handlebars.templates.content_type(this.model)),this}}),SwaggerUi.Views.HeaderView=Backbone.View.extend({events:{"click #show-pet-store-icon":"showPetStore","click #explore":"showCustom","submit #api_selector":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},initialize:function(){},showPetStore:function(){this.trigger("update-swagger-ui",{url:"http://petstore.swagger.io/v2/swagger.json"})},showCustomOnKeyup:function(e){13===e.keyCode&&this.showCustom()},showCustom:function(e){e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val()})},update:function(e,t,n){void 0===n&&(n=!1),$("#input_baseUrl").val(e),n&&this.trigger("update-swagger-ui",{url:e})}}),SwaggerUi.Views.MainView=Backbone.View.extend({apisSorter:{alpha:function(e,t){return e.name.localeCompare(t.name)}},operationsSorters:{alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},initialize:function(e){var t,n,r,i;if(e=e||{},this.router=e.router,e.swaggerOptions.apisSorter&&(t=e.swaggerOptions.apisSorter,n=_.isFunction(t)?t:this.apisSorter[t],_.isFunction(n)&&this.model.apisArray.sort(n)),e.swaggerOptions.operationsSorter&&(t=e.swaggerOptions.operationsSorter,n=_.isFunction(t)?t:this.operationsSorters[t],_.isFunction(n)))for(r in this.model.apisArray)this.model.apisArray[r].operationsArray.sort(n);this.model.auths=[];for(r in this.model.securityDefinitions)i=this.model.securityDefinitions[r],this.model.auths.push({name:r,type:i.type,value:i});"validatorUrl"in e.swaggerOptions?this.model.validatorUrl=e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0||this.model.url.indexOf("127.0.0.1")>0?this.model.validatorUrl=null:this.model.validatorUrl="//online.swagger.io/validator";var a;for(a in this.model.definitions)this.model.definitions[a].type||(this.model.definitions[a].type="object")},render:function(){$(this.el).html(Handlebars.templates.main(this.model)),this.info=this.$(".info")[0],this.info&&this.info.addEventListener("click",this.onLinkClick,!0),this.model.securityDefinitions=this.model.securityDefinitions||{};for(var e={},t=0,n=0;n<this.model.apisArray.length;n++){for(var r=this.model.apisArray[n],i=r.name;"undefined"!=typeof e[i];)i=i+"_"+t,t+=1;r.id=sanitizeHtml(i),e[i]=r,this.addResource(r,this.model.auths)}return $(".propWrap").hover(function(){$(".optionsWrapper",$(this)).show()},function(){$(".optionsWrapper",$(this)).hide()}),this},addResource:function(e,t){e.id=e.id.replace(/[^a-zA-Z\d]/g,function(e){return e.charCodeAt(0)}),e.definitions=this.model.definitions;var n=new SwaggerUi.Views.ResourceView({model:e,router:this.router,tagName:"li",id:"resource_"+e.id,className:"resource",auths:t,swaggerOptions:this.options.swaggerOptions});$("#resources",this.el).append(n.render().el)},clear:function(){$(this.el).html("")},onLinkClick:function(e){var t=e.target;"A"===t.tagName&&t.href&&!t.target&&(e.preventDefault(),window.open(t.href,"_blank"))}}),SwaggerUi.Models.Oauth2Model=Backbone.Model.extend({defaults:{scopes:{},isPasswordFlow:!1,clientAuthenticationType:"none"},initialize:function(){if(this.attributes&&this.attributes.scopes){var e,t=_.cloneDeep(this.attributes),n=[];for(e in t.scopes){var r=t.scopes[e];"string"==typeof r.description&&(n[r]=t.scopes[e],n.push(t.scopes[e]))}t.scopes=n,this.attributes=t}if(this.attributes&&this.attributes.flow){var i=this.attributes.flow;this.set("isPasswordFlow","password"===i),this.set("requireClientAuthentication","application"===i),this.set("clientAuthentication","password"===i||"application"===i)}this.on("change",this.validate)},setScopes:function(e,t){var n=_.extend({},this.attributes),r=_.findIndex(n.scopes,function(t){return t.scope===e});n.scopes[r].checked=t,this.set(n),this.validate()},validate:function(){var e=!1;if(this.get("isPasswordFlow")&&!this.get("username"))return!1;if(this.get("clientAuthenticationType")in["basic","request-body"]&&!this.get("clientId"))return!1;var t=this.get("scopes"),n=_.findIndex(t,function(e){return e.checked===!0});return t.length>0&&n>=0&&(e=!0),0===t.length&&(e=!0),this.set("valid",e),e}}),SwaggerUi.Views.Oauth2View=Backbone.View.extend({events:{"change .oauth-scope":"scopeChange","change .oauth-username":"setUsername","change .oauth-password":"setPassword","change .oauth-client-authentication-type":"setClientAuthenticationType","change .oauth-client-id":"setClientId","change .oauth-client-secret":"setClientSecret"},template:Handlebars.templates.oauth2,cls:{error:"error"},render:function(){return this.$el.html(this.template(this.model.toJSON())),this},scopeChange:function(e){var t=$(e.target).prop("checked"),n=$(e.target).data("scope");this.model.setScopes(n,t)},setUsername:function(e){var t=$(e.target).val();this.model.set("username",t),t&&$(e.target).removeClass(this.cls.error)},setPassword:function(e){this.model.set("password",$(e.target).val())},setClientAuthenticationType:function(e){var t=$(e.target).val(),n=this.$el;switch(this.model.set("clientAuthenticationType",t),t){case"none":n.find(".oauth-client-authentication").hide();break;case"basic":case"request-body":n.find(".oauth-client-id").removeClass(this.cls.error),n.find(".oauth-client-authentication").show()}},setClientId:function(e){var t=$(e.target).val();this.model.set("clientId",t),t&&$(e.target).removeClass(this.cls.error)},setClientSecret:function(e){this.model.set("clientSecret",$(e.target).val()),$(e.target).removeClass("error")},highlightInvalid:function(){this.model.get("username")||this.$el.find(".oauth-username").addClass(this.cls.error),this.model.get("clientId")||this.$el.find(".oauth-client-id").addClass(this.cls.error)}}),SwaggerUi.Views.OperationView=Backbone.View.extend({invocationUrl:null,events:{"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","dblclick .curl":"selectText","change [name=responseContentType]":"showSnippet"},initialize:function(e){return e=e||{},this.router=e.router,this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this.model.encodedParentId=encodeURIComponent(this.parentId),e.swaggerOptions&&(this.model.defaultRendering=e.swaggerOptions.defaultModelRendering,e.swaggerOptions.showRequestHeaders&&(this.model.showRequestHeaders=!0),e.swaggerOptions.showOperationIds&&(this.model.showOperationIds=!0)),this},selectText:function(e){var t,n,r=document,i=e.target.firstChild;r.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(i),t.select()):window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(i),n.removeAllRanges(),n.addRange(t))},mouseEnter:function(e){var t=$(this.el).find(".content"),n=e.pageX,r=e.pageY,i=$(window).scrollLeft(),a=$(window).scrollTop(),o=i+$(window).width(),s=a+$(window).height(),l=t.width(),u=t.height();n+l>o&&(n=o-l),n<i&&(n=i),r+u>s&&(r=s-u),r<a&&(r=a);var c={};c.top=r,c.left=n,t.css(c)},render:function(){var e,t,n,r,i,a,o,s,l,u,c,p,h,f,d,m,g,y,v,b,w,x,A,S,j,E,O,k,T,C,I,D,L,M,R,U,P,q,B,z,N; +if(a=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,a||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.oauth=null,m=this.model.authorizations||this.model.security)if(Array.isArray(m))for(l=0,u=m.length;l<u;l++){n=m[l];for(s in n)for(e in this.auths)if(t=this.auths[e],s===t.name&&"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],A=t.value.scopes;for(o in A)P=A[o],D=n[s].indexOf(o),D>=0&&(y={scope:o,description:P},this.model.oauth.scopes.push(y))}}else for(o in m)if(P=m[o],"oauth2"===o)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),d=0,c=P.length;d<c;d++)y=P[d],this.model.oauth.scopes.push(y);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],S=this.model.responses;for(r in S)q=S[r],C=null,I=this.model.responses[r].schema,I&&I.$ref&&(C=I.$ref,C.indexOf("#/definitions/")!==-1&&(C=C.replace(/^.*#\/definitions\//,""))),this.model.responseMessages.push({code:r,message:q.description,responseModel:C,headers:q.headers,schema:I})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),L=null,B=this.model.produces,z=this.contains(B,"xml"),N=!z||this.contains(B,"json"),this.model.successResponse){R=this.model.successResponse;for(s in R)q=R[s],this.model.successCode=s,"object"==typeof q&&"function"==typeof q.createJSONSample?(this.model.successDescription=q.description,this.model.headers=this.parseResponseHeaders(q.headers),L={sampleJSON:!!N&&JSON.stringify(SwaggerUi.partials.signature.createJSONSample(q),void 0,2),isParam:!1,sampleXML:!!z&&SwaggerUi.partials.signature.createXMLSample(q.name,q.definition,q.models),signature:SwaggerUi.partials.signature.getModelSignature(q.name,q.definition,q.models,q.modelPropertyMacro)}):L={signature:SwaggerUi.partials.signature.getPrimitiveSignature(q)}}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(L={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),L?(L.defaultRendering=this.model.defaultRendering,T=new SwaggerUi.Views.SignatureView({model:L,router:this.router,tagName:"div"}),$(".model-signature",$(this.el)).append(T.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),i={isParam:!1},i.consumes=this.model.consumes,i.produces=this.model.produces,j=this.model.parameters,g=0,p=j.length;g<p;g++)b=j[g],U=b.type||b.dataType||"","undefined"==typeof U&&(C=b.schema,C&&C.$ref&&(x=C.$ref,U=0===x.indexOf("#/definitions/")?x.substring("#/definitions/".length):x)),U&&"file"===U.toLowerCase()&&(i.consumes||(i.consumes="multipart/form-data")),b.type=U;for(k=new SwaggerUi.Views.ResponseContentTypeView({model:i,router:this.router}),$(".response-content-type",$(this.el)).append(k.render().el),E=this.model.parameters,v=0,h=E.length;v<h;v++)b=E[v],this.addParameter(b,i.consumes);for(O=this.model.responseMessages,w=0,f=O.length;w<f;w++)M=O[w],M.isXML=z,M.isJSON=N,_.isUndefined(M.headers)||(M.headers=this.parseHeadersType(M.headers)),this.addStatusCode(M);if(Array.isArray(this.model.security)){var F=SwaggerUi.utils.parseSecurityDefinitions(this.model.security,this.model.parent.securityDefinitions);F.isLogout=!_.isEmpty(this.model.clientAuthorizations.authz),this.authView=new SwaggerUi.Views.AuthButtonView({data:F,router:this.router,isOperation:!0,model:{scopes:F.scopes}}),this.$(".authorize-wrapper").append(this.authView.render().el)}return this.showSnippet(),this},parseHeadersType:function(e){var t={string:{"date-time":"dateTime",date:"date"}};return _.forEach(e,function(e){var n;e=e||{},n=t[e.type]&&t[e.type][e.format],_.isUndefined(n)||(e.type=n)}),e},contains:function(e,t){return e.filter(function(e){if(e.indexOf(t)>-1)return!0}).length},parseResponseHeaders:function(e){var t="; ",n=_.clone(e);return _.forEach(n,function(e){var n=[];_.forEach(e,function(e,t){var r=["type","description"];r.indexOf(t.toLowerCase())===-1&&n.push(t+": "+e)}),n.join(t),e.other=n}),n},addParameter:function(e,t){e.consumes=t,e.defaultRendering=this.model.defaultRendering,e.schema&&($.extend(!0,e.schema,this.model.definitions[e.type]),e.schema.definitions=this.model.definitions,e.schema.type||(e.schema.type="object"),e.schema.title||(e.schema.title=" "));var n=new SwaggerUi.Views.ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly,swaggerOptions:this.options.swaggerOptions});$(".operation-params",$(this.el)).append(n.render().el)},addStatusCode:function(e){e.defaultRendering=this.model.defaultRendering;var t=new SwaggerUi.Views.StatusCodeView({model:e,tagName:"tr",router:this.router});$(".operation-status",$(this.el)).append(t.render().el)},submitOperation:function(e){var t,n,r,i,a;if(null!==e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),n.find("textarea.required:visible").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1)}),n.find("select.required").each(function(){$(this).removeClass("error"),this.selectedIndex===-1&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),t){if(i=this.getInputMap(n),r=this.isFileUpload(n),a={parent:this},this.options.swaggerOptions)for(var o in this.options.swaggerOptions)a[o]=this.options.swaggerOptions[o];var s;for(s=0;s<this.model.parameters.length;s++){var l=this.model.parameters[s];if(l.jsonEditor&&l.jsonEditor.isEnabled()){var u=l.jsonEditor.getValue();i[l.name]=JSON.stringify(u)}}return a.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),a.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),r?($(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),a.useJQuery=!0,i.parameterContentType="multipart/form-data",this.map=i,this.model.execute(i,a,this.showCompleteStatus,this.showErrorStatus,this)):(this.map=i,this.model.execute(i,a,this.showCompleteStatus,this.showErrorStatus,this))}},getInputMap:function(e){var t,n,r,i,a,o,s,l,u,c,p,h;for(t={},n=e.find("input"),r=0,i=n.length;r<i;r++)a=n[r],null!==a.value&&jQuery.trim(a.value).length>0&&(t[a.name]=a.value),"file"===a.type&&(t[a.name]=a.files[0]);for(o=e.find("textarea"),s=0,l=o.length;s<l;s++)a=o[s],u=this.getTextAreaValue(a),null!==u&&jQuery.trim(u).length>0&&(t[a.name]=u);for(c=e.find("select"),p=0,h=c.length;p<h;p++)a=c[p],u=this.getSelectedValue(a),null!==u&&jQuery.trim(u).length>0&&(t[a.name]=u);return t},isFileUpload:function(e){var t,n,r,i,a=!1;for(t=e.find("input"),n=0,r=t.length;n<r;n++)i=t[n],"file"===i.type&&(a=!0);return a},success:function(e,t){t.showCompleteStatus(e)},wrap:function(e){var t,n,r,i,a,o,s;for(r={},n=e.getAllResponseHeaders().split("\r"),a=0,o=n.length;a<o;a++)i=n[a],t=i.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(r[t[0].trim()]=t[1].trim());return s={},s.content={},s.content.data=e.responseText,s.headers=r,s.request={},s.request.url=this.invocationUrl,s.status=e.status,s},getSelectedValue:function(e){if(e.multiple){for(var t=[],n=0,r=e.options.length;n<r;n++){var i=e.options[n];i.selected&&t.push(i.value)}return t.length>0?t:null}return e.value},hideResponse:function(e){e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},showResponse:function(e){var t=JSON.stringify(e,null,"\t").replace(/\n/g,"<br>");$(".response_body",$(this.el)).html(_.escape(t))},showErrorStatus:function(e,t){t.showStatus(e)},showCompleteStatus:function(e,t){t.showStatus(e)},formatXml:function(e){var t,n,r,i,a,o,s,l,u,c,p,h,f;for(p=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(p,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),c=0,r="",l=e.split("\n"),i=0,o="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,a,s,l,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(a in u)c=u[a],c&&e.push(a);return e}()[0],l=void 0===l?"other":l,t=o+"->"+l,o=l,s="",i+=h[t],s=function(){var e,t,r;for(r=[],n=e=0,t=i;0<=t?e<t:e>t;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=s+e+"\n"},a=0,s=l.length;a<s;a++)u=l[a],n(u);return r},showStatus:function(e){var t,n;void 0===e.content?(n=e.data,t=e.url):(n=e.content.data,t=e.request.url);var r=e.headers;"string"==typeof n&&(n=jQuery.trim(n));var i=null;r&&(i=r["Content-Type"]||r["content-type"],i&&(i=i.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml");var a,o,s=function(e){var t=document.createElement("audio");return!(!t.canPlayType||!t.canPlayType(e).replace(/no/,""))},l=!1;if(n)if("application/octet-stream"===i||r["Content-Disposition"]&&/attachment/.test(r["Content-Disposition"])||r["content-disposition"]&&/attachment/.test(r["content-disposition"])||r["Content-Description"]&&/File Transfer/.test(r["Content-Description"])||r["content-description"]&&/File Transfer/.test(r["content-description"]))if("Blob"in window){var u,c=i||"text/html",p=document.createElement("a");if("[object Blob]"==={}.toString.apply(n))u=window.URL.createObjectURL(n);else{var h=[];h.push(n),u=window.URL.createObjectURL(new Blob(h,{type:c}))}var f=e.url.substr(e.url.lastIndexOf("/")+1),d=[c,f,u].join(":"),m=r["content-disposition"]||r["Content-Disposition"];if("undefined"!=typeof m){var g=/filename=([^;]*);?/.exec(m);null!==g&&g.length>1&&(d=g[1],f=d)}p.setAttribute("href",u),p.setAttribute("download",d),p.innerText="Download "+f,a=$("<div/>").append(p),l=!0}else a=$('<pre class="json" />').append("Download headers detected but your browser does not support downloading binary via XHR (Blob).");else if("application/json"===i||/\+json$/.test(i)){var y=null;try{y=JSON.stringify(JSON.parse(n),null," ")}catch(v){y="can't parse JSON. Raw result:\n\n"+n}o=$("<code />").text(y),a=$('<pre class="json" />').append(o)}else if("application/xml"===i||/\+xml$/.test(i))o=$("<code />").text(this.formatXml(n)),a=$('<pre class="xml" />').append(o);else if("text/html"===i)o=$("<code />").html(_.escape(n)),a=$('<pre class="xml" />').append(o);else if(/text\/plain/.test(i))o=$("<code />").text(n),a=$('<pre class="plain" />').append(o);else if(/^image\//.test(i)){var b=window.URL||window.webkitURL,w=b.createObjectURL(n);a=$("<img>").attr("src",w)}else/^audio\//.test(i)&&s(i)?a=$("<audio controls>").append($("<source>").attr("src",t).attr("type",i)):r.location||r.Location?window.location=e.url:(o=$("<code />").text(n),a=$('<pre class="json" />').append(o));else o=$("<code />").text("no content"),a=$('<pre class="json" />').append(o);var x=a;$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(t),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(x),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null," ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide();var A=this.model.asCurl(this.map,{responseContentType:i});A=A.replace("!","&#33;"),$("div.curl",$(this.el)).html("<pre>"+_.escape(A)+"</pre>");var S=this.options.swaggerOptions;if(S.showRequestHeaders){var j=$(".sandbox",$(this.el)),E=this.getInputMap(j),O=this.model.getHeaderParams(E);delete O["Content-Type"],$(".request_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(O,null," ")).replace(/\n/g,"<br>")+"</pre>")}S.responseHooks&&S.responseHooks[this.nickname]&&S.responseHooks[this.nickname](e,this);var k=$(".response_body",$(this.el))[0];return S.highlightSizeThreshold&&"undefined"!=typeof e.data&&e.data.length>S.highlightSizeThreshold||l?k:hljs.highlightBlock(k)},toggleOperationContent:function(e){var t=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content"));t.is(":visible")?($.bbq.pushState("#/",2),e.preventDefault(),Docs.collapseOperation(t)):Docs.expandOperation(t)},getTextAreaValue:function(e){var t,n,r,i;if(null===e.value||0===jQuery.trim(e.value).length)return null;if(t=this.getParamByName(e.name),t&&t.type&&"array"===t.type.toLowerCase()){for(n=e.value.split("\n"),r=[],i=0;i<n.length;i++)null!==n[i]&&jQuery.trim(n[i]).length>0&&r.push(n[i]);return r.length>0?r:null}return e.value},showSnippet:function(){var e,t=this.$("[name=responseContentType]"),n=this.$(".operation-status .snippet_xml, .response-class .snippet_xml"),r=this.$(".operation-status .snippet_json, .response-class .snippet_json");t.length&&(e=t.val(),e.indexOf("xml")>-1?(n.show(),r.hide()):(r.show(),n.hide()))},getParamByName:function(e){var t;if(this.model.parameters)for(t=0;t<this.model.parameters.length;t++)if(this.model.parameters[t].name===e)return this.model.parameters[t];return null}}),SwaggerUi.Views.ParameterContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.parameterContentTypeId="pct"+Math.random(),$(this.el).html(Handlebars.templates.parameter_content_type(this.model)),this}}),SwaggerUi.Views.ParameterView=Backbone.View.extend({events:{"change [name=parameterContentType]":"toggleParameterSnippet"},initialize:function(){Handlebars.registerHelper("isArray",function(e,t){var n=e.type&&e.type.toLowerCase();return"array"===n||e.allowMultiple?t.fn(this):t.inverse(this)})},render:function(){var e,t,n=this.model.type||this.model.dataType,r=this.model.modelSignature.type,i=this.model.modelSignature.definitions,a=this.model.schema||{},o=this.model.consumes||[];if("undefined"==typeof n&&a.$ref){var s=a.$ref;n=0===s.indexOf("#/definitions/")?s.substring("#/definitions/".length):s}this.model.type=n,this.model.paramType=this.model["in"]||this.model.paramType,this.model.isBody="body"===this.model.paramType||"body"===this.model["in"],this.model.isFile=n&&"file"===n.toLowerCase(),"undefined"==typeof this.model["default"]&&(this.model["default"]=this.model.defaultValue),this.model.hasDefault="undefined"!=typeof this.model["default"],this.model.valueId="m"+this.model.name+Math.random(),this.model.allowableValues&&(this.model.isList=!0);var l=this.contains(o,"xml"),u=!l||this.contains(o,"json");e=SwaggerUi.partials.signature.createParameterJSONSample(r,i);var c=this.template();$(this.el).html(c(this.model));var p={sampleJSON:!!u&&e,sampleXML:!(!e||!l)&&SwaggerUi.partials.signature.createXMLSample("",a,i,!0),isParam:!0,signature:SwaggerUi.partials.signature.getParameterModelSignature(r,i),defaultRendering:this.model.defaultRendering};e?(t=new SwaggerUi.Views.SignatureView({model:p,tagName:"div"}),$(".model-signature",$(this.el)).append(t.render().el)):$(".model-signature",$(this.el)).html(this.model.signature);var h=!1;if(this.options.swaggerOptions.jsonEditor&&this.model.isBody&&this.model.schema){var f=$(this.el);this.model.jsonEditor=new JSONEditor($(".editor_holder",f)[0],{schema:this.model.schema,startval:this.model["default"],ajax:!0,disable_properties:!0,disable_edit_json:!0,iconlib:"swagger"}),p.jsonEditor=this.model.jsonEditor,$(".body-textarea",f).hide(),$(".editor_holder",f).show(),$(".parameter-content-type",f).change(function(e){"application/xml"===e.target.value?($(".body-textarea",f).show(),$(".editor_holder",f).hide(),this.model.jsonEditor.disable()):($(".body-textarea",f).hide(),$(".editor_holder",f).show(),this.model.jsonEditor.enable())})}this.model.isBody&&(h=!0);var d={isParam:h};if(d.consumes=this.model.consumes,h){var m=new SwaggerUi.Views.ParameterContentTypeView({model:d});$(".parameter-content-type",$(this.el)).append(m.render().el),this.toggleParameterSnippet()}else{var g=new SwaggerUi.Views.ResponseContentTypeView({model:d});$(".response-content-type",$(this.el)).append(g.render().el),this.toggleResponseSnippet()}return this},contains:function(e,t){return e.filter(function(e){if(e.indexOf(t)>-1)return!0}).length},toggleParameterSnippet:function(){var e=this.$("[name=parameterContentType]").val();this.toggleSnippet(e)},toggleResponseSnippet:function(){var e=this.$("[name=responseContentType]");e.length&&this.toggleSnippet(e.val())},toggleSnippet:function(e){e=e||"",e.indexOf("xml")>-1?(this.$(".snippet_xml").show(),this.$(".snippet_json").hide()):(this.$(".snippet_json").show(),this.$(".snippet_xml").hide())},template:function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param}}),SwaggerUi.partials.signature=function(){function e(e){var t,i=e.name,a=e.definition,o=e.config,s=e.models,l=e.config.isParam,u=[],c=a.properties,p=a.additionalProperties,h=a.xml,f=b(h);return f&&u.push(f),c||p?(c=c||{},t=_.map(c,function(e,t){var n,i;return l&&e.readOnly?"":(n=e.xml||{},i=r(t,e,s,o),n.attribute?(u.push(i),""):i)}).join(""),p&&(t+="<!-- additional elements allowed -->"),y(i,t,u)):n()}function t(e,t){return y(e,"<!-- Infinite loop $ref:"+t+" -->")}function n(e){return e=e?": "+e:"","<!-- invalid XML"+e+" -->"}function r(r,i,s,l){var u,c,p=_.isObject(i)?i.$ref:null;l=l||{},l.modelsToIgnore=l.modelsToIgnore||[];var h=_.isString(p)?a(p,r,s,l):o(r,i,s,l);if(!h)return n();switch(h.type){case"array":u=w(h);break;case"object":u=e(h);break;case"loop":u=t(h.name,h.config.loopTo);break;default:u=A(h)}return p&&"loop"!==h.type&&(c=l.modelsToIgnore.indexOf(p),c>-1&&l.modelsToIgnore.splice(c,1)),u}function i(e,t,n,r,i){if(arguments.length<4)throw new Error;this.config=i||{},this.config.modelsToIgnore=this.config.modelsToIgnore||[],this.name=v(e,n.xml),this.definition=n,this.models=r,this.type=t}function a(e,t,n,r){var a=u(e),o=n[a]||{},s=o.definition&&o.definition.type?o.definition.type:"object";return t=o.definition&&o.definition.xml&&o.definition.xml.name?t||o.definition.xml.name||o.name:t||o.name,r.modelsToIgnore.indexOf(e)>-1?(s="loop",r.loopTo=a):r.modelsToIgnore.push(e),o.definition?new i(t,s,o.definition,n,r):null}function o(e,t,n,r){var a=t.type||"object";return t.xml&&t.xml.name&&(e=t.xml.name||e),t?new i(e,a,t,n,r):null}function s(e,t,n,i){var a='<?xml version="1.0"?>';return p(a+r(e,t,n,{isParam:i}))}var l=function(e){return _.isPlainObject(e.schema)&&(e=l(e.schema)),e},u=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},c=function(e){if(/^Inline Model \d+$/.test(e)&&this.inlineModels){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},p=function(e){var t,n,r,i,a,o,s,l,u,c,p,h,f;for(p=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(p,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),c=0,r="",l=e.split("\n"),i=0,o="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,a,s,l,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(a in u)c=u[a],c&&e.push(a);return e}()[0],l=void 0===l?"other":l,t=o+"->"+l,o=l,s="",i+=h[t],s=function(){var e,t,r;for(r=[],n=e=0,t=i;0<=t?e<t:e>t;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=s+e+"\n"},a=0,s=l.length;a<s;a++)u=l[a],n(u);return r},h=function(e,t,n,r){function i(e,t,r){var i,a=t;return e.$ref?(a=e.title||u(e.$ref),i=n[u(e.$ref)]):_.isUndefined(t)&&(a=e.title||"Inline Model "+ ++m,i={definition:e}),r!==!0&&(f[a]=_.isUndefined(i)?{}:i.definition),a}function a(e){var t='<span class="propType">',n=e.type||"object";return e.$ref?t+=i(e,u(e.$ref)):"object"===n?t+=_.isUndefined(e.properties)?"object":i(e):"array"===n?(t+="Array[",_.isArray(e.items)?t+=_.map(e.items,i).join(","):_.isPlainObject(e.items)?t+=_.isUndefined(e.items.$ref)?_.isUndefined(e.items.type)||_.indexOf(["array","object"],e.items.type)!==-1?i(e.items):e.items.type:i(e.items,u(e.items.$ref)):(console.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+="</span>"}function o(e,t){var n="",r=e.type||"object",i="array"===r;switch(_.isUndefined(e.description)||(t+=': <span class="propDesc">'+e.description+"</span>"),e["enum"]&&(t+=' = <span class="propVals">[\''+e["enum"].join("', '")+"']</span>"),i&&(r=_.isPlainObject(e.items)&&!_.isUndefined(e.items.type)?e.items.type:"object"),_.isUndefined(e["default"])||(n+=h("Default",e["default"])),r){case"string":e.minLength&&(n+=h("Min. Length",e.minLength)),e.maxLength&&(n+=h("Max. Length",e.maxLength)),e.pattern&&(n+=h("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=h("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=h("Exclusive Min.","true")),e.maximum&&(n+=h("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=h("Exclusive Max.","true")),e.multipleOf&&(n+=h("Multiple Of",e.multipleOf))}if(i&&(e.minItems&&(n+=h("Min. Items",e.minItems)),e.maxItems&&(n+=h("Max. Items",e.maxItems)),e.uniqueItems&&(n+=h("Unique Items","true")),e.collectionFormat&&(n+=h("Coll. Format",e.collectionFormat))),_.isUndefined(e.items)&&_.isArray(e["enum"])){var a;a="number"===r||"integer"===r?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=h("Enum",a)}return n.length>0&&(t='<span class="propWrap">'+t+'<table class="optionsWrapper"><tr><th colspan="2">'+r+"</th></tr>"+n+"</table></span>"),t}function s(e,t){var s,h=e.type||"object",f="array"===e.type,m=c+t+" "+(f?"[":"{")+p;return t&&d.push(t),f?_.isArray(e.items)?m+="<div>"+_.map(e.items,function(e){var t=e.type||"object";return _.isUndefined(e.$ref)?_.indexOf(["array","object"],t)>-1?"object"===t&&_.isUndefined(e.properties)?"object":i(e):o(e,t):i(e,u(e.$ref))}).join(",</div><div>"):_.isPlainObject(e.items)?m+=_.isUndefined(e.items.$ref)?_.indexOf(["array","object"],e.items.type||"object")>-1?(_.isUndefined(e.items.type)||"object"===e.items.type)&&_.isUndefined(e.items.properties)?"<div>object</div>":"<div>"+i(e.items)+"</div>":"<div>"+o(e.items,e.items.type)+"</div>":"<div>"+i(e.items,u(e.items.$ref))+"</div>":(console.log("Array type's 'items' property is not an array or an object, cannot process"),m+="<div>object</div>"):e.$ref?m+="<div>"+i(e,t)+"</div>":"object"===h?(_.isPlainObject(e.properties)&&(s=_.map(e.properties,function(t,i){var s,c=_.indexOf(e.required,i)>=0,p=_.cloneDeep(t),h=c?"required":"",f='<span class="propName '+h+'">'+i+"</span> (";return p["default"]=r(p),p=l(p),_.isUndefined(p.$ref)||(s=n[u(p.$ref)],_.isUndefined(s)||_.indexOf([void 0,"array","object"],s.definition.type)!==-1||(p=l(s.definition))),f+=a(p),c||(f+=', <span class="propOptKey">optional</span>'),t.readOnly&&(f+=', <span class="propReadOnly">read only</span>'),f+=")","<div"+(t.readOnly?' class="readOnly"':"")+">"+o(p,f)}).join(",</div>")),s&&(m+=s+"</div>")):m+="<div>"+o(e,h)+"</div>",m+c+(f?"]":"}")+p}var c='<span class="strong">',p="</span>",h=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};if(_.isObject(arguments[0])&&(e=void 0,t=arguments[0],n=arguments[1],r=arguments[2]),n=n||{},t=l(t),_.isEmpty(t))return c+"Empty"+p;if("string"==typeof t.$ref&&(e=u(t.$ref),t=n[e],"undefined"==typeof t))return c+e+" is not defined!"+p;"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof r&&(r=function(e){return(e||{})["default"]});for(var f={},d=[],m=0,g=s(t,e);_.keys(f).length>0;)_.forEach(f,function(e,t){var n=_.indexOf(d,t)>-1;delete f[t],n||(d.push(t),g+="<br />"+s(e,t))});return g},f=function(e,t,n,r){e=l(e),"function"!=typeof r&&(r=function(e){return(e||{})["default"]}),n=n||{};var i,a,o=e.type||"object",s=e.format;return _.isUndefined(e.example)?_.isUndefined(e.items)&&_.isArray(e["enum"])&&(a=e["enum"][0]):a=e.example,_.isUndefined(a)&&(e.$ref?(i=t[u(e.$ref)],_.isUndefined(i)||(_.isUndefined(n[i.name])?(n[i.name]=i,a=f(i.definition,t,n,r),delete n[i.name]):a="array"===i.type?[]:{})):_.isUndefined(e["default"])?"string"===o?a="date-time"===s?(new Date).toISOString():"date"===s?(new Date).toISOString().split("T")[0]:"string":"integer"===o?a=0:"number"===o?a=0:"boolean"===o?a=!0:"object"===o?(a={},_.forEach(e.properties,function(e,i){var o=_.cloneDeep(e);o["default"]=r(e),a[i]=f(o,t,n,r)})):"array"===o&&(a=[],_.isArray(e.items)?_.forEach(e.items,function(e){a.push(f(e,t,n,r))}):_.isPlainObject(e.items)?a.push(f(e.items,t,n,r)):_.isUndefined(e.items)?a.push({}):console.log("Array type's 'items' property is not an array or an object, cannot process")):a=e["default"]),a},d=function(e,t){if(t=t||{},t[e.name]=e,e.examples&&_.isPlainObject(e.examples)){e=_.cloneDeep(e);var n=Object.keys(e.examples);_.forEach(n,function(n){if(0===n.indexOf("application/json")){var r=e.examples[n];return _.isString(r)&&(r=jsyaml.safeLoad(r)),e.definition.example=r,f(e.definition,r,t,e.modelPropertyMacro)}})}if(e.examples){e=_.cloneDeep(e);var r=e.examples;return _.isString(r)&&(r=jsyaml.safeLoad(r)),e.definition.example=r,f(e.definition,r,t,e.modelPropertyMacro)}return f(e.definition,e.models,t,e.modelPropertyMacro)},m=function(e,t){var n,r;return e instanceof Array&&(r=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):c(e)?(e=c(e),n=!1):n=!0,n?r?"Array["+e+"]":e.toString():r?"Array["+h(e.name,e.definition,e.models,e.modelPropertyMacro)+"]":h(e.name,e.definition,e.models,e.modelPropertyMacro)},g=function(e,t){var n,r,i;if(t=t||{},n=e instanceof Array,i=n?e[0]:e,t[i]?r=d(t[i]):c(i)&&(r=d(c(i))),r){if(r=n?[r]:r,"string"==typeof r)return r;if(_.isObject(r)){var a=r;if(r instanceof Array&&r.length>0&&(a=r[0]),a.nodeName&&"Node"==typeof a){var o=(new XMLSerializer).serializeToString(a);return p(o)}return JSON.stringify(r,null,2)}return r}},y=function(e,t,r){var i,a;return r=r||[],a=r.map(function(e){return" "+e.name+'="'+e.value+'"'}).join(""),e?(i=["<",e,a,">",t,"</",e,">"],i.join("")):n("Node name is not provided")},v=function(e,t){var n=e||"";return t=t||{},t.prefix&&(n=t.prefix+":"+n),n},b=function(e){var t="",n="xmlns";return e=e||{},e.namespace?(t=e.namespace,e.prefix&&(n+=":"+e.prefix),{name:n,value:t}):t},w=function(e){var t,i=e.name,a=e.config,o=e.definition,s=e.models,l=o.items,u=o.xml||{},c=b(u),p=[];if(!l)return n();var h=i;return l.xml&&l.xml.name&&(h=l.xml.name),t=r(h,l,s,a),c&&p.push(c),u.wrapped&&(t=y(i,t,p)),t},x=function(e){var t,n;switch(e=e||{},n=e.items||{},t=e.type||""){case"object":return"Object is not a primitive";case"array":return"Array["+(n.format||n.type)+"]";default:return e.format||t}},A=function(e){var t,r=e.name,i=e.definition,a={string:{date:new Date(1).toISOString().split("T")[0],"date-time":new Date(1).toISOString(),"default":"string"},integer:{"default":1},number:{"default":1.1},"boolean":{"default":!0}},o=i.type,s=i.format,l=i.xml||{},u=b(l),c=[];return _.keys(a).indexOf(o)<0?n():(t=_.isArray(i["enum"])?i["enum"][0]:i.example||a[o][s]||a[o]["default"],l.attribute?{name:r,value:t}:(u&&c.push(u),y(r,t,c)))};return{getModelSignature:h,createJSONSample:d,getParameterModelSignature:m,createParameterJSONSample:g,createSchemaXML:r,createXMLSample:s,getPrimitiveSignature:x}}(),SwaggerUi.Views.PopupView=Backbone.View.extend({events:{"click .api-popup-cancel":"cancelClick"},template:Handlebars.templates.popup,className:"api-popup-dialog",selectors:{content:".api-popup-content",main:"#swagger-ui-container"},initialize:function(){this.$el.html(this.template(this.model))},render:function(){return this.$(this.selectors.content).append(this.model.content),$(this.selectors.main).first().append(this.el),this.showPopup(),this},showPopup:function(){this.$el.show()},cancelClick:function(){this.remove()}}),SwaggerUi.Views.ResourceView=Backbone.View.extend({initialize:function(e){e=e||{},this.router=e.router,this.auths=e.auths,""===this.model.description&&(this.model.description=null),this.model.description&&(this.model.summary=this.model.description),this.number=0},render:function(){var e={};$(this.el).html(Handlebars.templates.resource(this.model));for(var t=0;t<this.model.operationsArray.length;t++){for(var n=this.model.operationsArray[t],r=0,i=n.nickname;"undefined"!=typeof e[i];)i=i+"_"+r,r+=1;e[i]=n,n.nickname=i,n.parentId=this.model.id,n.definitions=this.model.definitions,this.addOperation(n)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},addOperation:function(e){e.number=this.number;var t=new SwaggerUi.Views.OperationView({model:e,router:this.router,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths});$(".endpoints",$(this.el)).append(t.render().el),this.number++},callDocs:function(e,t){t.preventDefault(),Docs[e](t.currentTarget.getAttribute("data-id"))}}),SwaggerUi.Views.ResponseContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.responseContentTypeId="rct"+Math.random(),$(this.el).html(Handlebars.templates.response_content_type(this.model)),this}}),SwaggerUi.Views.SignatureView=Backbone.View.extend({events:{"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet_json":"jsonSnippetMouseDown","mousedown .snippet_xml":"xmlSnippetMouseDown"},initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.signature(this.model)),"model"===this.model.defaultRendering?this.switchToDescription():this.switchToSnippet(),this},switchToDescription:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},switchToSnippet:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).show(),$(".description",$(this.el)).hide(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},snippetToTextArea:function(e){var t=$("textarea",$(this.el.parentNode.parentNode.parentNode));""!==$.trim(t.val())&&t.prop("placeholder")!==t.val()||(t.val(e),this.model.jsonEditor&&this.model.jsonEditor.isEnabled()&&this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)))},jsonSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleJSON))},xmlSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleXML))}}),SwaggerUi.Views.StatusCodeView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e,t,n=this.router.api.models[this.model.responseModel];return $(this.el).html(Handlebars.templates.status_code(this.model)),e=this.router.api.models.hasOwnProperty(this.model.responseModel)?{ +sampleJSON:JSON.stringify(SwaggerUi.partials.signature.createJSONSample(n),void 0,2),sampleXML:!!this.model.isXML&&SwaggerUi.partials.signature.createXMLSample("",this.model.schema,this.router.api.models),isParam:!1,signature:SwaggerUi.partials.signature.getModelSignature(this.model.responseModel,n,this.router.api.models),defaultRendering:this.model.defaultRendering}:{signature:SwaggerUi.partials.signature.getPrimitiveSignature(this.model.schema)},t=new SwaggerUi.Views.SignatureView({model:e,tagName:"div"}),$(".model-signature",this.$el).append(t.render().el),this}})}).call(this); \ No newline at end of file diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php deleted file mode 100644 index 406dbe0e8e2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php +++ /dev/null @@ -1,1431 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use Sabre\CalDAV; -use Sabre\DAV; -use Sabre\DAV\PropPatch; -use Sabre\DAV\Xml\Element\Sharee; - -abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { - - use DAV\DbTestHelperTrait; - - protected $pdo; - - function setUp() { - - $this->dropTables([ - 'calendarobjects', - 'calendars', - 'calendarinstances', - 'calendarchanges', - 'calendarsubscriptions', - 'schedulingobjects', - ]); - $this->createSchema('calendars'); - - $this->pdo = $this->getDb(); - - } - - function testConstruct() { - - $backend = new PDO($this->pdo); - $this->assertTrue($backend instanceof PDO); - - } - - /** - * @depends testConstruct - */ - function testGetCalendarsForUserNoCalendars() { - - $backend = new PDO($this->pdo); - $calendars = $backend->getCalendarsForUser('principals/user2'); - $this->assertEquals([], $calendars); - - } - - /** - * @depends testConstruct - */ - function testCreateCalendarAndFetch() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT']), - '{DAV:}displayname' => 'Hello!', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]); - $calendars = $backend->getCalendarsForUser('principals/user2'); - - $elementCheck = [ - 'uri' => 'somerandomid', - '{DAV:}displayname' => 'Hello!', - '{urn:ietf:params:xml:ns:caldav}calendar-description' => '', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - 'share-access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - ]; - - $this->assertInternalType('array', $calendars); - $this->assertEquals(1, count($calendars)); - - foreach ($elementCheck as $name => $value) { - - $this->assertArrayHasKey($name, $calendars[0]); - $this->assertEquals($value, $calendars[0][$name]); - - } - - } - - /** - * @depends testConstruct - */ - function testUpdateCalendarAndFetch() { - - $backend = new PDO($this->pdo); - - //Creating a new calendar - $newId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'myCalendar', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]); - - // Updating the calendar - $backend->updateCalendar($newId, $propPatch); - $result = $propPatch->commit(); - - // Verifying the result of the update - $this->assertTrue($result); - - // Fetching all calendars from this user - $calendars = $backend->getCalendarsForUser('principals/user2'); - - // Checking if all the information is still correct - $elementCheck = [ - 'id' => $newId, - 'uri' => 'somerandomid', - '{DAV:}displayname' => 'myCalendar', - '{urn:ietf:params:xml:ns:caldav}calendar-description' => '', - '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => '', - '{http://calendarserver.org/ns/}getctag' => 'http://sabre.io/ns/sync/2', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]; - - $this->assertInternalType('array', $calendars); - $this->assertEquals(1, count($calendars)); - - foreach ($elementCheck as $name => $value) { - - $this->assertArrayHasKey($name, $calendars[0]); - $this->assertEquals($value, $calendars[0][$name]); - - } - - } - - /** - * @depends testConstruct - * @expectedException \InvalidArgumentException - */ - function testUpdateCalendarBadId() { - - $backend = new PDO($this->pdo); - - //Creating a new calendar - $newId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'myCalendar', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]); - - // Updating the calendar - $backend->updateCalendar('raaaa', $propPatch); - - } - - /** - * @depends testUpdateCalendarAndFetch - */ - function testUpdateCalendarUnknownProperty() { - - $backend = new PDO($this->pdo); - - //Creating a new calendar - $newId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'myCalendar', - '{DAV:}yourmom' => 'wittycomment', - ]); - - // Updating the calendar - $backend->updateCalendar($newId, $propPatch); - $propPatch->commit(); - - // Verifying the result of the update - $this->assertEquals([ - '{DAV:}yourmom' => 403, - '{DAV:}displayname' => 424, - ], $propPatch->getResult()); - - } - - /** - * @depends testCreateCalendarAndFetch - */ - function testDeleteCalendar() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT']), - '{DAV:}displayname' => 'Hello!', - ]); - - $backend->deleteCalendar($returnedId); - - $calendars = $backend->getCalendarsForUser('principals/user2'); - $this->assertEquals([], $calendars); - - } - - /** - * @depends testCreateCalendarAndFetch - * @expectedException \InvalidArgumentException - */ - function testDeleteCalendarBadID() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT']), - '{DAV:}displayname' => 'Hello!', - ]); - - $backend->deleteCalendar('bad-id'); - - } - - /** - * @depends testCreateCalendarAndFetch - * @expectedException \Sabre\DAV\Exception - */ - function testCreateCalendarIncorrectComponentSet() {; - - $backend = new PDO($this->pdo); - - //Creating a new calendar - $newId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => 'blabla', - ]); - - } - - function testCreateCalendarObject() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('20120101'), - 'lastoccurence' => strtotime('20120101') + (3600 * 24), - 'componenttype' => 'VEVENT', - ], $row); - - } - function testGetMultipleObjects() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'id-1', $object); - $backend->createCalendarObject($returnedId, 'id-2', $object); - - $check = [ - [ - 'id' => 1, - 'etag' => '"' . md5($object) . '"', - 'uri' => 'id-1', - 'size' => strlen($object), - 'calendardata' => $object, - 'lastmodified' => null, - ], - [ - 'id' => 2, - 'etag' => '"' . md5($object) . '"', - 'uri' => 'id-2', - 'size' => strlen($object), - 'calendardata' => $object, - 'lastmodified' => null, - ], - ]; - - $result = $backend->getMultipleCalendarObjects($returnedId, ['id-1', 'id-2']); - - foreach ($check as $index => $props) { - - foreach ($props as $key => $expected) { - - $actual = $result[$index][$key]; - - switch ($key) { - case 'lastmodified' : - $this->assertInternalType('int', $actual); - break; - case 'calendardata' : - if (is_resource($actual)) { - $actual = stream_get_contents($actual); - } - // no break intentional - default : - $this->assertEquals($expected, $actual); - - } - - } - - } - - } - - /** - * @depends testGetMultipleObjects - * @expectedException \InvalidArgumentException - */ - function testGetMultipleObjectsBadId() { - - $backend = new PDO($this->pdo); - $backend->getMultipleCalendarObjects('bad-id', ['foo-bar']); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectNoComponent() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - } - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectDuration() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nDURATION:P2D\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('20120101'), - 'lastoccurence' => strtotime('20120101') + (3600 * 48), - 'componenttype' => 'VEVENT', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - * @expectedException \InvalidArgumentException - */ - function testCreateCalendarObjectBadId() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nDURATION:P2D\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject('bad-id', 'random-id', $object); - - } - - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectNoDTEND() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE-TIME:20120101T100000Z\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('2012-01-01 10:00:00'), - 'lastoccurence' => strtotime('2012-01-01 10:00:00'), - 'componenttype' => 'VEVENT', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectWithDTEND() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE-TIME:20120101T100000Z\r\nDTEND:20120101T110000Z\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('2012-01-01 10:00:00'), - 'lastoccurence' => strtotime('2012-01-01 11:00:00'), - 'componenttype' => 'VEVENT', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectInfiniteRecurrence() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE-TIME:20120101T100000Z\r\nRRULE:FREQ=DAILY\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('2012-01-01 10:00:00'), - 'lastoccurence' => strtotime(PDO::MAX_DATE), - 'componenttype' => 'VEVENT', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectEndingRecurrence() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE-TIME:20120101T100000Z\r\nDTEND;VALUE=DATE-TIME:20120101T110000Z\r\nUID:foo\r\nRRULE:FREQ=DAILY;COUNT=1000\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => strtotime('2012-01-01 10:00:00'), - 'lastoccurence' => strtotime('2012-01-01 11:00:00') + (3600 * 24 * 999), - 'componenttype' => 'VEVENT', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - */ - function testCreateCalendarObjectTask() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nDUE;VALUE=DATE-TIME:20120101T100000Z\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT etag, size, calendardata, firstoccurence, lastoccurence, componenttype FROM calendarobjects WHERE uri = \'random-id\''); - $row = $result->fetch(\PDO::FETCH_ASSOC); - if (is_resource($row['calendardata'])) { - $row['calendardata'] = stream_get_contents($row['calendardata']); - } - - $this->assertEquals([ - 'etag' => md5($object), - 'size' => strlen($object), - 'calendardata' => $object, - 'firstoccurence' => null, - 'lastoccurence' => null, - 'componenttype' => 'VTODO', - ], $row); - - } - - /** - * @depends testCreateCalendarObject - */ - function testGetCalendarObjects() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $data = $backend->getCalendarObjects($returnedId); - - $this->assertEquals(1, count($data)); - $data = $data[0]; - - $this->assertEquals('random-id', $data['uri']); - $this->assertEquals(strlen($object), $data['size']); - - } - - /** - * @depends testGetCalendarObjects - * @expectedException \InvalidArgumentException - */ - function testGetCalendarObjectsBadId() { - - $backend = new PDO($this->pdo); - $backend->getCalendarObjects('bad-id'); - - } - - /** - * @depends testGetCalendarObjects - * @expectedException \InvalidArgumentException - */ - function testGetCalendarObjectBadId() { - - $backend = new PDO($this->pdo); - $backend->getCalendarObject('bad-id', 'foo-bar'); - - } - - /** - * @depends testCreateCalendarObject - */ - function testGetCalendarObjectByUID() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $this->assertNull( - $backend->getCalendarObjectByUID('principals/user2', 'bar') - ); - $this->assertEquals( - 'somerandomid/random-id', - $backend->getCalendarObjectByUID('principals/user2', 'foo') - ); - - } - - /** - * @depends testCreateCalendarObject - */ - function testUpdateCalendarObject() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $object2 = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20130101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - $backend->updateCalendarObject($returnedId, 'random-id', $object2); - - $data = $backend->getCalendarObject($returnedId, 'random-id'); - - if (is_resource($data['calendardata'])) { - $data['calendardata'] = stream_get_contents($data['calendardata']); - } - - $this->assertEquals($object2, $data['calendardata']); - $this->assertEquals('random-id', $data['uri']); - - - } - - /** - * @depends testUpdateCalendarObject - * @expectedException \InvalidArgumentException - */ - function testUpdateCalendarObjectBadId() { - - $backend = new PDO($this->pdo); - $backend->updateCalendarObject('bad-id', 'object-id', 'objectdata'); - - } - - /** - * @depends testCreateCalendarObject - */ - function testDeleteCalendarObject() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - $backend->deleteCalendarObject($returnedId, 'random-id'); - - $data = $backend->getCalendarObject($returnedId, 'random-id'); - $this->assertNull($data); - - } - - /** - * @depends testDeleteCalendarObject - * @expectedException \InvalidArgumentException - */ - function testDeleteCalendarObjectBadId() { - - $backend = new PDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - $backend->deleteCalendarObject('bad-id', 'random-id'); - - } - - function testCalendarQueryNoResult() { - - $abstract = new PDO($this->pdo); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VJOURNAL', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - ], $abstract->calendarQuery([1, 1], $filters)); - - } - - /** - * @expectedException \InvalidArgumentException - * @depends testCalendarQueryNoResult - */ - function testCalendarQueryBadId() { - - $abstract = new PDO($this->pdo); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VJOURNAL', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $abstract->calendarQuery('bad-id', $filters); - - } - - function testCalendarQueryTodo() { - - $backend = new PDO($this->pdo); - $backend->createCalendarObject([1, 1], "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VTODO', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "todo", - ], $backend->calendarQuery([1, 1], $filters)); - - } - function testCalendarQueryTodoNotMatch() { - - $backend = new PDO($this->pdo); - $backend->createCalendarObject([1, 1], "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VTODO', - 'comp-filters' => [], - 'prop-filters' => [ - [ - 'name' => 'summary', - 'text-match' => null, - 'time-range' => null, - 'param-filters' => [], - 'is-not-defined' => false, - ], - ], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - ], $backend->calendarQuery([1, 1], $filters)); - - } - - function testCalendarQueryNoFilter() { - - $backend = new PDO($this->pdo); - $backend->createCalendarObject([1, 1], "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $result = $backend->calendarQuery([1, 1], $filters); - $this->assertTrue(in_array('todo', $result)); - $this->assertTrue(in_array('event', $result)); - - } - - function testCalendarQueryTimeRange() { - - $backend = new PDO($this->pdo); - $backend->createCalendarObject([1, 1], "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event2", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120103\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('20120103'), - 'end' => new \DateTime('20120104'), - ], - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "event2", - ], $backend->calendarQuery([1, 1], $filters)); - - } - function testCalendarQueryTimeRangeNoEnd() { - - $backend = new PDO($this->pdo); - $backend->createCalendarObject([1, 1], "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject([1, 1], "event2", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120103\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('20120102'), - 'end' => null, - ], - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "event2", - ], $backend->calendarQuery([1, 1], $filters)); - - } - - function testGetChanges() { - - $backend = new PDO($this->pdo); - $id = $backend->createCalendar( - 'principals/user1', - 'bla', - [] - ); - $result = $backend->getChangesForCalendar($id, null, 1); - - $this->assertEquals([ - 'syncToken' => 1, - 'modified' => [], - 'deleted' => [], - 'added' => [], - ], $result); - - $currentToken = $result['syncToken']; - - $dummyTodo = "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($id, "todo1.ics", $dummyTodo); - $backend->createCalendarObject($id, "todo2.ics", $dummyTodo); - $backend->createCalendarObject($id, "todo3.ics", $dummyTodo); - $backend->updateCalendarObject($id, "todo1.ics", $dummyTodo); - $backend->deleteCalendarObject($id, "todo2.ics"); - - $result = $backend->getChangesForCalendar($id, $currentToken, 1); - - $this->assertEquals([ - 'syncToken' => 6, - 'modified' => ["todo1.ics"], - 'deleted' => ["todo2.ics"], - 'added' => ["todo3.ics"], - ], $result); - - $result = $backend->getChangesForCalendar($id, null, 1); - - $this->assertEquals([ - 'syncToken' => 6, - 'modified' => [], - 'deleted' => [], - 'added' => ["todo1.ics", "todo3.ics"], - ], $result); - } - - /** - * @depends testGetChanges - * @expectedException \InvalidArgumentException - */ - function testGetChangesBadId() { - - $backend = new PDO($this->pdo); - $id = $backend->createCalendar( - 'principals/user1', - 'bla', - [] - ); - $backend->getChangesForCalendar('bad-id', null, 1); - - } - - function testCreateSubscriptions() { - - $props = [ - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal.ics', false), - '{DAV:}displayname' => 'cal', - '{http://apple.com/ns/ical/}refreshrate' => 'P1W', - '{http://apple.com/ns/ical/}calendar-color' => '#FF00FFFF', - '{http://calendarserver.org/ns/}subscribed-strip-todos' => true, - //'{http://calendarserver.org/ns/}subscribed-strip-alarms' => true, - '{http://calendarserver.org/ns/}subscribed-strip-attachments' => true, - ]; - - $backend = new PDO($this->pdo); - $backend->createSubscription('principals/user1', 'sub1', $props); - - $subs = $backend->getSubscriptionsForUser('principals/user1'); - - $expected = $props; - $expected['id'] = 1; - $expected['uri'] = 'sub1'; - $expected['principaluri'] = 'principals/user1'; - - unset($expected['{http://calendarserver.org/ns/}source']); - $expected['source'] = 'http://example.org/cal.ics'; - - $this->assertEquals(1, count($subs)); - foreach ($expected as $k => $v) { - $this->assertEquals($subs[0][$k], $expected[$k]); - } - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testCreateSubscriptionFail() { - - $props = [ - ]; - - $backend = new PDO($this->pdo); - $backend->createSubscription('principals/user1', 'sub1', $props); - - } - - function testUpdateSubscriptions() { - - $props = [ - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal.ics', false), - '{DAV:}displayname' => 'cal', - '{http://apple.com/ns/ical/}refreshrate' => 'P1W', - '{http://apple.com/ns/ical/}calendar-color' => '#FF00FFFF', - '{http://calendarserver.org/ns/}subscribed-strip-todos' => true, - //'{http://calendarserver.org/ns/}subscribed-strip-alarms' => true, - '{http://calendarserver.org/ns/}subscribed-strip-attachments' => true, - ]; - - $backend = new PDO($this->pdo); - $backend->createSubscription('principals/user1', 'sub1', $props); - - $newProps = [ - '{DAV:}displayname' => 'new displayname', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal2.ics', false), - ]; - - $propPatch = new DAV\PropPatch($newProps); - $backend->updateSubscription(1, $propPatch); - $result = $propPatch->commit(); - - $this->assertTrue($result); - - $subs = $backend->getSubscriptionsForUser('principals/user1'); - - $expected = array_merge($props, $newProps); - $expected['id'] = 1; - $expected['uri'] = 'sub1'; - $expected['principaluri'] = 'principals/user1'; - - unset($expected['{http://calendarserver.org/ns/}source']); - $expected['source'] = 'http://example.org/cal2.ics'; - - $this->assertEquals(1, count($subs)); - foreach ($expected as $k => $v) { - $this->assertEquals($subs[0][$k], $expected[$k]); - } - - } - - function testUpdateSubscriptionsFail() { - - $props = [ - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal.ics', false), - '{DAV:}displayname' => 'cal', - '{http://apple.com/ns/ical/}refreshrate' => 'P1W', - '{http://apple.com/ns/ical/}calendar-color' => '#FF00FFFF', - '{http://calendarserver.org/ns/}subscribed-strip-todos' => true, - //'{http://calendarserver.org/ns/}subscribed-strip-alarms' => true, - '{http://calendarserver.org/ns/}subscribed-strip-attachments' => true, - ]; - - $backend = new PDO($this->pdo); - $backend->createSubscription('principals/user1', 'sub1', $props); - - $propPatch = new DAV\PropPatch([ - '{DAV:}displayname' => 'new displayname', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal2.ics', false), - '{DAV:}unknown' => 'foo', - ]); - - $backend->updateSubscription(1, $propPatch); - $propPatch->commit(); - - $this->assertEquals([ - '{DAV:}unknown' => 403, - '{DAV:}displayname' => 424, - '{http://calendarserver.org/ns/}source' => 424, - ], $propPatch->getResult()); - - } - - function testDeleteSubscriptions() { - - $props = [ - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal.ics', false), - '{DAV:}displayname' => 'cal', - '{http://apple.com/ns/ical/}refreshrate' => 'P1W', - '{http://apple.com/ns/ical/}calendar-color' => '#FF00FFFF', - '{http://calendarserver.org/ns/}subscribed-strip-todos' => true, - //'{http://calendarserver.org/ns/}subscribed-strip-alarms' => true, - '{http://calendarserver.org/ns/}subscribed-strip-attachments' => true, - ]; - - $backend = new PDO($this->pdo); - $backend->createSubscription('principals/user1', 'sub1', $props); - - $newProps = [ - '{DAV:}displayname' => 'new displayname', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/cal2.ics', false), - ]; - - $backend->deleteSubscription(1); - - $subs = $backend->getSubscriptionsForUser('principals/user1'); - $this->assertEquals(0, count($subs)); - } - - function testSchedulingMethods() { - - $backend = new PDO($this->pdo); - - $calData = "BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n"; - - $backend->createSchedulingObject( - 'principals/user1', - 'schedule1.ics', - $calData - ); - - $expected = [ - 'calendardata' => $calData, - 'uri' => 'schedule1.ics', - 'etag' => '"' . md5($calData) . '"', - 'size' => strlen($calData) - ]; - - $result = $backend->getSchedulingObject('principals/user1', 'schedule1.ics'); - foreach ($expected as $k => $v) { - $this->assertArrayHasKey($k, $result); - if (is_resource($result[$k])) { - $result[$k] = stream_get_contents($result[$k]); - } - $this->assertEquals($v, $result[$k]); - } - - $results = $backend->getSchedulingObjects('principals/user1'); - - $this->assertEquals(1, count($results)); - $result = $results[0]; - foreach ($expected as $k => $v) { - if (is_resource($result[$k])) { - $result[$k] = stream_get_contents($result[$k]); - } - $this->assertEquals($v, $result[$k]); - } - - $backend->deleteSchedulingObject('principals/user1', 'schedule1.ics'); - $result = $backend->getSchedulingObject('principals/user1', 'schedule1.ics'); - - $this->assertNull($result); - - } - - function testGetInvites() { - - $backend = new PDO($this->pdo); - - // creating a new calendar - $backend->createCalendar('principals/user1', 'somerandomid', []); - $calendar = $backend->getCalendarsForUser('principals/user1')[0]; - - $result = $backend->getInvites($calendar['id']); - $expected = [ - new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]) - ]; - - $this->assertEquals($expected, $result); - - } - - /** - * @depends testGetInvites - * @expectedException \InvalidArgumentException - */ - function testGetInvitesBadId() { - - $backend = new PDO($this->pdo); - - // creating a new calendar - $backend->createCalendar('principals/user1', 'somerandomid', []); - $calendar = $backend->getCalendarsForUser('principals/user1')[0]; - - $backend->getInvites('bad-id'); - - } - - /** - * @depends testCreateCalendarAndFetch - */ - function testUpdateInvites() { - - $backend = new PDO($this->pdo); - - // creating a new calendar - $backend->createCalendar('principals/user1', 'somerandomid', []); - $calendar = $backend->getCalendarsForUser('principals/user1')[0]; - - $ownerSharee = new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]); - - // Add a new invite - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'properties' => ['{DAV:}displayname' => 'User 2'], - ]) - ] - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - $ownerSharee, - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'properties' => [ - '{DAV:}displayname' => 'User 2', - ], - ]) - ]; - $this->assertEquals($expected, $result); - - // Checking calendar_instances too - $expectedCalendar = [ - 'id' => [1,2], - 'principaluri' => 'principals/user2', - '{http://calendarserver.org/ns/}getctag' => 'http://sabre.io/ns/sync/1', - '{http://sabredav.org/ns}sync-token' => '1', - 'share-access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'read-only' => true, - 'share-resource-uri' => '/ns/share/1', - ]; - $calendars = $backend->getCalendarsForUser('principals/user2'); - - foreach ($expectedCalendar as $k => $v) { - $this->assertEquals( - $v, - $calendars[0][$k], - "Key " . $k . " in calendars array did not have the expected value." - ); - } - - - // Updating an invite - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]) - ] - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - $ownerSharee, - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'properties' => [ - '{DAV:}displayname' => 'User 2', - ], - ]) - ]; - $this->assertEquals($expected, $result); - - // Removing an invite - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'mailto:user@example.org', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS, - ]) - ] - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - $ownerSharee - ]; - $this->assertEquals($expected, $result); - - // Preventing the owner share from being removed - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS, - ]) - ] - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]), - ]; - $this->assertEquals($expected, $result); - - } - - /** - * @depends testUpdateInvites - * @expectedException \InvalidArgumentException - */ - function testUpdateInvitesBadId() { - - $backend = new PDO($this->pdo); - // Add a new invite - $backend->updateInvites( - 'bad-id', - [] - ); - - } - - /** - * @depends testUpdateInvites - */ - function testUpdateInvitesNoPrincipal() { - - $backend = new PDO($this->pdo); - - // creating a new calendar - $backend->createCalendar('principals/user1', 'somerandomid', []); - $calendar = $backend->getCalendarsForUser('principals/user1')[0]; - - $ownerSharee = new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]); - - // Add a new invite - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => null, - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'properties' => ['{DAV:}displayname' => 'User 2'], - ]) - ] - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - $ownerSharee, - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => null, - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_INVALID, - 'properties' => [ - '{DAV:}displayname' => 'User 2', - ], - ]) - ]; - $this->assertEquals($expected, $result, null, 0.0, 10, true); // Last argument is $canonicalize = true, which allows us to compare, ignoring the order, because it's different between MySQL and Sqlite. - - } - - /** - * @depends testUpdateInvites - */ - function testDeleteSharedCalendar() { - - $backend = new PDO($this->pdo); - - // creating a new calendar - $backend->createCalendar('principals/user1', 'somerandomid', []); - $calendar = $backend->getCalendarsForUser('principals/user1')[0]; - - $ownerSharee = new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]); - - // Add a new invite - $backend->updateInvites( - $calendar['id'], - [ - new Sharee([ - 'href' => 'mailto:user@example.org', - 'principal' => 'principals/user2', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'properties' => ['{DAV:}displayname' => 'User 2'], - ]) - ] - ); - - $expectedCalendar = [ - 'id' => [1,2], - 'principaluri' => 'principals/user2', - '{http://calendarserver.org/ns/}getctag' => 'http://sabre.io/ns/sync/1', - '{http://sabredav.org/ns}sync-token' => '1', - 'share-access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'read-only' => true, - 'share-resource-uri' => '/ns/share/1', - ]; - $calendars = $backend->getCalendarsForUser('principals/user2'); - - foreach ($expectedCalendar as $k => $v) { - $this->assertEquals( - $v, - $calendars[0][$k], - "Key " . $k . " in calendars array did not have the expected value." - ); - } - - // Removing the shared calendar. - $backend->deleteCalendar($calendars[0]['id']); - - $this->assertEquals( - [], - $backend->getCalendarsForUser('principals/user2') - ); - - $result = $backend->getInvites($calendar['id']); - $expected = [ - new Sharee([ - 'href' => 'principals/user1', - 'principal' => 'principals/user1', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_ACCEPTED, - ]), - ]; - $this->assertEquals($expected, $result); - - } - - /** - * @expectedException \Sabre\DAV\Exception\NotImplemented - */ - function testSetPublishStatus() { - - $backend = new PDO($this->pdo); - $backend->setPublishStatus([1, 1], true); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractTest.php deleted file mode 100644 index 7f642efc9ae..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractTest.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use - Sabre\DAV\PropPatch; - -class AbstractTest extends \PHPUnit_Framework_TestCase { - - function testUpdateCalendar() { - - $abstract = new AbstractMock(); - $propPatch = new PropPatch(['{DAV:}displayname' => 'anything']); - - $abstract->updateCalendar('randomid', $propPatch); - $result = $propPatch->commit(); - - $this->assertFalse($result); - - } - - function testCalendarQuery() { - - $abstract = new AbstractMock(); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - 'event1.ics', - ], $abstract->calendarQuery(1, $filters)); - - } - - function testGetCalendarObjectByUID() { - - $abstract = new AbstractMock(); - $this->assertNull( - $abstract->getCalendarObjectByUID('principal1', 'zim') - ); - $this->assertEquals( - 'cal1/event1.ics', - $abstract->getCalendarObjectByUID('principal1', 'foo') - ); - $this->assertNull( - $abstract->getCalendarObjectByUID('principal3', 'foo') - ); - $this->assertNull( - $abstract->getCalendarObjectByUID('principal1', 'shared') - ); - - } - - function testGetMultipleCalendarObjects() { - - $abstract = new AbstractMock(); - $result = $abstract->getMultipleCalendarObjects(1, [ - 'event1.ics', - 'task1.ics', - ]); - - $expected = [ - [ - 'id' => 1, - 'calendarid' => 1, - 'uri' => 'event1.ics', - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", - ], - [ - 'id' => 2, - 'calendarid' => 1, - 'uri' => 'task1.ics', - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n", - ], - ]; - - $this->assertEquals($expected, $result); - - - } - -} - -class AbstractMock extends AbstractBackend { - - function getCalendarsForUser($principalUri) { - - return [ - [ - 'id' => 1, - 'principaluri' => 'principal1', - 'uri' => 'cal1', - ], - [ - 'id' => 2, - 'principaluri' => 'principal1', - '{http://sabredav.org/ns}owner-principal' => 'principal2', - 'uri' => 'cal1', - ], - ]; - - } - function createCalendar($principalUri, $calendarUri, array $properties) { } - function deleteCalendar($calendarId) { } - function getCalendarObjects($calendarId) { - - switch ($calendarId) { - case 1: - return [ - [ - 'id' => 1, - 'calendarid' => 1, - 'uri' => 'event1.ics', - ], - [ - 'id' => 2, - 'calendarid' => 1, - 'uri' => 'task1.ics', - ], - ]; - case 2: - return [ - [ - 'id' => 3, - 'calendarid' => 2, - 'uri' => 'shared-event.ics', - ] - ]; - } - - } - - function getCalendarObject($calendarId, $objectUri) { - - switch ($objectUri) { - - case 'event1.ics' : - return [ - 'id' => 1, - 'calendarid' => 1, - 'uri' => 'event1.ics', - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", - ]; - case 'task1.ics' : - return [ - 'id' => 2, - 'calendarid' => 1, - 'uri' => 'task1.ics', - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n", - ]; - case 'shared-event.ics' : - return [ - 'id' => 3, - 'calendarid' => 2, - 'uri' => 'event1.ics', - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:shared\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", - ]; - - } - - } - function createCalendarObject($calendarId, $objectUri, $calendarData) { } - function updateCalendarObject($calendarId, $objectUri, $calendarData) { } - function deleteCalendarObject($calendarId, $objectUri) { } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php deleted file mode 100644 index cc665cd8fa3..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php +++ /dev/null @@ -1,258 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use Sabre\CalDAV; -use Sabre\DAV; - -class Mock extends AbstractBackend { - - protected $calendarData; - protected $calendars; - - function __construct(array $calendars = [], array $calendarData = []) { - - foreach ($calendars as &$calendar) { - if (!isset($calendar['id'])) { - $calendar['id'] = DAV\UUIDUtil::getUUID(); - } - } - - $this->calendars = $calendars; - $this->calendarData = $calendarData; - - } - - /** - * Returns a list of calendars for a principal. - * - * Every project is an array with the following keys: - * * id, a unique id that will be used by other functions to modify the - * calendar. This can be the same as the uri or a database key. - * * uri, which the basename of the uri with which the calendar is - * accessed. - * * principalUri. The owner of the calendar. Almost always the same as - * principalUri passed to this method. - * - * Furthermore it can contain webdav properties in clark notation. A very - * common one is '{DAV:}displayname'. - * - * @param string $principalUri - * @return array - */ - function getCalendarsForUser($principalUri) { - - $r = []; - foreach ($this->calendars as $row) { - if ($row['principaluri'] == $principalUri) { - $r[] = $row; - } - } - - return $r; - - } - - /** - * Creates a new calendar for a principal. - * - * If the creation was a success, an id must be returned that can be used to reference - * this calendar in other methods, such as updateCalendar. - * - * This function must return a server-wide unique id that can be used - * later to reference the calendar. - * - * @param string $principalUri - * @param string $calendarUri - * @param array $properties - * @return string|int - */ - function createCalendar($principalUri, $calendarUri, array $properties) { - - $id = DAV\UUIDUtil::getUUID(); - $this->calendars[] = array_merge([ - 'id' => $id, - 'principaluri' => $principalUri, - 'uri' => $calendarUri, - '{' . CalDAV\Plugin::NS_CALDAV . '}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT', 'VTODO']), - ], $properties); - - return $id; - - } - - /** - * Updates properties for a calendar. - * - * The list of mutations is stored in a Sabre\DAV\PropPatch object. - * To do the actual updates, you must tell this object which properties - * you're going to process with the handle() method. - * - * Calling the handle method is like telling the PropPatch object "I - * promise I can handle updating this property". - * - * Read the PropPatch documentation for more info and examples. - * - * @param mixed $calendarId - * @param \Sabre\DAV\PropPatch $propPatch - * @return void - */ - function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch) { - - $propPatch->handleRemaining(function($props) use ($calendarId) { - - foreach ($this->calendars as $k => $calendar) { - - if ($calendar['id'] === $calendarId) { - foreach ($props as $propName => $propValue) { - if (is_null($propValue)) { - unset($this->calendars[$k][$propName]); - } else { - $this->calendars[$k][$propName] = $propValue; - } - } - return true; - - } - - } - - }); - - } - - /** - * Delete a calendar and all it's objects - * - * @param string $calendarId - * @return void - */ - function deleteCalendar($calendarId) { - - foreach ($this->calendars as $k => $calendar) { - if ($calendar['id'] === $calendarId) { - unset($this->calendars[$k]); - } - } - - } - - /** - * Returns all calendar objects within a calendar object. - * - * Every item contains an array with the following keys: - * * id - unique identifier which will be used for subsequent updates - * * calendardata - The iCalendar-compatible calendar data - * * uri - a unique key which will be used to construct the uri. This can be any arbitrary string. - * * lastmodified - a timestamp of the last modification time - * * etag - An arbitrary string, surrounded by double-quotes. (e.g.: - * ' "abcdef"') - * * calendarid - The calendarid as it was passed to this function. - * - * Note that the etag is optional, but it's highly encouraged to return for - * speed reasons. - * - * The calendardata is also optional. If it's not returned - * 'getCalendarObject' will be called later, which *is* expected to return - * calendardata. - * - * @param string $calendarId - * @return array - */ - function getCalendarObjects($calendarId) { - - if (!isset($this->calendarData[$calendarId])) - return []; - - $objects = $this->calendarData[$calendarId]; - - foreach ($objects as $uri => &$object) { - $object['calendarid'] = $calendarId; - $object['uri'] = $uri; - $object['lastmodified'] = null; - } - return $objects; - - } - - /** - * Returns information from a single calendar object, based on it's object - * uri. - * - * The object uri is only the basename, or filename and not a full path. - * - * The returned array must have the same keys as getCalendarObjects. The - * 'calendardata' object is required here though, while it's not required - * for getCalendarObjects. - * - * This method must return null if the object did not exist. - * - * @param mixed $calendarId - * @param string $objectUri - * @return array|null - */ - function getCalendarObject($calendarId, $objectUri) { - - if (!isset($this->calendarData[$calendarId][$objectUri])) { - return null; - } - $object = $this->calendarData[$calendarId][$objectUri]; - $object['calendarid'] = $calendarId; - $object['uri'] = $objectUri; - $object['lastmodified'] = null; - return $object; - - } - - /** - * Creates a new calendar object. - * - * @param string $calendarId - * @param string $objectUri - * @param string $calendarData - * @return void - */ - function createCalendarObject($calendarId, $objectUri, $calendarData) { - - $this->calendarData[$calendarId][$objectUri] = [ - 'calendardata' => $calendarData, - 'calendarid' => $calendarId, - 'uri' => $objectUri, - ]; - return '"' . md5($calendarData) . '"'; - - } - - /** - * Updates an existing calendarobject, based on it's uri. - * - * @param string $calendarId - * @param string $objectUri - * @param string $calendarData - * @return void - */ - function updateCalendarObject($calendarId, $objectUri, $calendarData) { - - $this->calendarData[$calendarId][$objectUri] = [ - 'calendardata' => $calendarData, - 'calendarid' => $calendarId, - 'uri' => $objectUri, - ]; - return '"' . md5($calendarData) . '"'; - - } - - /** - * Deletes an existing calendar object. - * - * @param string $calendarId - * @param string $objectUri - * @return void - */ - function deleteCalendarObject($calendarId, $objectUri) { - - unset($this->calendarData[$calendarId][$objectUri]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockScheduling.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockScheduling.php deleted file mode 100644 index 3ac22f474f6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockScheduling.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -class MockScheduling extends Mock implements SchedulingSupport { - - public $schedulingObjects = []; - - /** - * Returns a single scheduling object. - * - * The returned array should contain the following elements: - * * uri - A unique basename for the object. This will be used to - * construct a full uri. - * * calendardata - The iCalendar object - * * lastmodified - The last modification date. Can be an int for a unix - * timestamp, or a PHP DateTime object. - * * etag - A unique token that must change if the object changed. - * * size - The size of the object, in bytes. - * - * @param string $principalUri - * @param string $objectUri - * @return array - */ - function getSchedulingObject($principalUri, $objectUri) { - - if (isset($this->schedulingObjects[$principalUri][$objectUri])) { - return $this->schedulingObjects[$principalUri][$objectUri]; - } - - } - - /** - * Returns all scheduling objects for the inbox collection. - * - * These objects should be returned as an array. Every item in the array - * should follow the same structure as returned from getSchedulingObject. - * - * The main difference is that 'calendardata' is optional. - * - * @param string $principalUri - * @return array - */ - function getSchedulingObjects($principalUri) { - - if (isset($this->schedulingObjects[$principalUri])) { - return array_values($this->schedulingObjects[$principalUri]); - } - return []; - - } - - /** - * Deletes a scheduling object - * - * @param string $principalUri - * @param string $objectUri - * @return void - */ - function deleteSchedulingObject($principalUri, $objectUri) { - - if (isset($this->schedulingObjects[$principalUri][$objectUri])) { - unset($this->schedulingObjects[$principalUri][$objectUri]); - } - - } - - /** - * Creates a new scheduling object. This should land in a users' inbox. - * - * @param string $principalUri - * @param string $objectUri - * @param string $objectData; - * @return void - */ - function createSchedulingObject($principalUri, $objectUri, $objectData) { - - if (!isset($this->schedulingObjects[$principalUri])) { - $this->schedulingObjects[$principalUri] = []; - } - $this->schedulingObjects[$principalUri][$objectUri] = [ - 'uri' => $objectUri, - 'calendardata' => $objectData, - 'lastmodified' => null, - 'etag' => '"' . md5($objectData) . '"', - 'size' => strlen($objectData) - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSharing.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSharing.php deleted file mode 100644 index eaf52e32f4a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSharing.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use Sabre\CalDAV\Xml\Notification\NotificationInterface; -use Sabre\DAV; - -class MockSharing extends Mock implements NotificationSupport, SharingSupport { - - private $shares = []; - private $notifications; - - function __construct(array $calendars = [], array $calendarData = [], array $notifications = []) { - - parent::__construct($calendars, $calendarData); - $this->notifications = $notifications; - - } - - /** - * Returns a list of calendars for a principal. - * - * Every project is an array with the following keys: - * * id, a unique id that will be used by other functions to modify the - * calendar. This can be the same as the uri or a database key. - * * uri, which the basename of the uri with which the calendar is - * accessed. - * * principalUri. The owner of the calendar. Almost always the same as - * principalUri passed to this method. - * - * Furthermore it can contain webdav properties in clark notation. A very - * common one is '{DAV:}displayname'. - * - * @param string $principalUri - * @return array - */ - function getCalendarsForUser($principalUri) { - - $calendars = parent::getCalendarsForUser($principalUri); - foreach ($calendars as $k => $calendar) { - - if (isset($calendar['share-access'])) { - continue; - } - if (!empty($this->shares[$calendar['id']])) { - $calendar['share-access'] = DAV\Sharing\Plugin::ACCESS_SHAREDOWNER; - } else { - $calendar['share-access'] = DAV\Sharing\Plugin::ACCESS_NOTSHARED; - } - $calendars[$k] = $calendar; - - } - return $calendars; - - } - - /** - * Returns a list of notifications for a given principal url. - * - * The returned array should only consist of implementations of - * Sabre\CalDAV\Notifications\INotificationType. - * - * @param string $principalUri - * @return array - */ - function getNotificationsForPrincipal($principalUri) { - - if (isset($this->notifications[$principalUri])) { - return $this->notifications[$principalUri]; - } - return []; - - } - - /** - * This deletes a specific notifcation. - * - * This may be called by a client once it deems a notification handled. - * - * @param string $principalUri - * @param NotificationInterface $notification - * @return void - */ - function deleteNotification($principalUri, NotificationInterface $notification) { - - foreach ($this->notifications[$principalUri] as $key => $value) { - if ($notification === $value) { - unset($this->notifications[$principalUri][$key]); - } - } - - } - - /** - * Updates the list of shares. - * - * @param mixed $calendarId - * @param \Sabre\DAV\Xml\Element\Sharee[] $sharees - * @return void - */ - function updateInvites($calendarId, array $sharees) { - - if (!isset($this->shares[$calendarId])) { - $this->shares[$calendarId] = []; - } - - foreach ($sharees as $sharee) { - - $existingKey = null; - foreach ($this->shares[$calendarId] as $k => $existingSharee) { - if ($sharee->href === $existingSharee->href) { - $existingKey = $k; - } - } - // Just making sure we're not affecting an existing copy. - $sharee = clone $sharee; - $sharee->inviteStatus = DAV\Sharing\Plugin::INVITE_NORESPONSE; - - if ($sharee->access === DAV\Sharing\Plugin::ACCESS_NOACCESS) { - // It's a removal - unset($this->shares[$calendarId][$existingKey]); - } elseif ($existingKey) { - // It's an update - $this->shares[$calendarId][$existingKey] = $sharee; - } else { - // It's an addition - $this->shares[$calendarId][] = $sharee; - } - } - - // Re-numbering keys - $this->shares[$calendarId] = array_values($this->shares[$calendarId]); - - } - - /** - * Returns the list of people whom this calendar is shared with. - * - * Every item in the returned list must be a Sharee object with at - * least the following properties set: - * $href - * $shareAccess - * $inviteStatus - * - * and optionally: - * $properties - * - * @param mixed $calendarId - * @return \Sabre\DAV\Xml\Element\Sharee[] - */ - function getInvites($calendarId) { - - if (!isset($this->shares[$calendarId])) { - return []; - } - - return $this->shares[$calendarId]; - - } - - /** - * This method is called when a user replied to a request to share. - * - * @param string href The sharee who is replying (often a mailto: address) - * @param int status One of the \Sabre\DAV\Sharing\Plugin::INVITE_* constants - * @param string $calendarUri The url to the calendar thats being shared - * @param string $inReplyTo The unique id this message is a response to - * @param string $summary A description of the reply - * @return void - */ - function shareReply($href, $status, $calendarUri, $inReplyTo, $summary = null) { - - // This operation basically doesn't do anything yet - if ($status === DAV\Sharing\Plugin::INVITE_ACCEPTED) { - return 'calendars/blabla/calendar'; - } - - } - - /** - * Publishes a calendar - * - * @param mixed $calendarId - * @param bool $value - * @return void - */ - function setPublishStatus($calendarId, $value) { - - foreach ($this->calendars as $k => $cal) { - if ($cal['id'] === $calendarId) { - if (!$value) { - unset($cal['{http://calendarserver.org/ns/}publish-url']); - } else { - $cal['{http://calendarserver.org/ns/}publish-url'] = 'http://example.org/public/ ' . $calendarId . '.ics'; - } - return; - } - } - - throw new DAV\Exception('Calendar with id "' . $calendarId . '" not found'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSubscriptionSupport.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSubscriptionSupport.php deleted file mode 100644 index adf9c8a17d6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/MockSubscriptionSupport.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use Sabre\CalDAV; -use Sabre\DAV; - -/** - * This is a mock CalDAV backend that supports subscriptions. - * - * All data is retained in memory temporarily. It's primary purpose is - * unit-tests. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class MockSubscriptionSupport extends Mock implements SubscriptionSupport { - - /** - * Subscription list - * - * @var array - */ - protected $subs = []; - - /** - * Returns a list of subscriptions for a principal. - * - * Every subscription is an array with the following keys: - * * id, a unique id that will be used by other functions to modify the - * subscription. This can be the same as the uri or a database key. - * * uri. This is just the 'base uri' or 'filename' of the subscription. - * * principaluri. The owner of the subscription. Almost always the same as - * principalUri passed to this method. - * * source. Url to the actual feed - * - * Furthermore, all the subscription info must be returned too: - * - * 1. {DAV:}displayname - * 2. {http://apple.com/ns/ical/}refreshrate - * 3. {http://calendarserver.org/ns/}subscribed-strip-todos (omit if todos - * should not be stripped). - * 4. {http://calendarserver.org/ns/}subscribed-strip-alarms (omit if alarms - * should not be stripped). - * 5. {http://calendarserver.org/ns/}subscribed-strip-attachments (omit if - * attachments should not be stripped). - * 7. {http://apple.com/ns/ical/}calendar-color - * 8. {http://apple.com/ns/ical/}calendar-order - * - * @param string $principalUri - * @return array - */ - function getSubscriptionsForUser($principalUri) { - - if (isset($this->subs[$principalUri])) { - return $this->subs[$principalUri]; - } - return []; - - } - - /** - * Creates a new subscription for a principal. - * - * If the creation was a success, an id must be returned that can be used to reference - * this subscription in other methods, such as updateSubscription. - * - * @param string $principalUri - * @param string $uri - * @param array $properties - * @return mixed - */ - function createSubscription($principalUri, $uri, array $properties) { - - $properties['uri'] = $uri; - $properties['principaluri'] = $principalUri; - $properties['source'] = $properties['{http://calendarserver.org/ns/}source']->getHref(); - - if (!isset($this->subs[$principalUri])) { - $this->subs[$principalUri] = []; - } - - $id = [$principalUri, count($this->subs[$principalUri]) + 1]; - - $properties['id'] = $id; - - $this->subs[$principalUri][] = array_merge($properties, [ - 'id' => $id, - ]); - - return $id; - - } - - /** - * Updates a subscription - * - * The list of mutations is stored in a Sabre\DAV\PropPatch object. - * To do the actual updates, you must tell this object which properties - * you're going to process with the handle() method. - * - * Calling the handle method is like telling the PropPatch object "I - * promise I can handle updating this property". - * - * Read the PropPatch documentation for more info and examples. - * - * @param mixed $subscriptionId - * @param \Sabre\DAV\PropPatch $propPatch - * @return void - */ - function updateSubscription($subscriptionId, DAV\PropPatch $propPatch) { - - $found = null; - foreach ($this->subs[$subscriptionId[0]] as &$sub) { - - if ($sub['id'][1] === $subscriptionId[1]) { - $found = & $sub; - break; - } - - } - - if (!$found) return; - - $propPatch->handleRemaining(function($mutations) use (&$found) { - foreach ($mutations as $k => $v) { - $found[$k] = $v; - } - return true; - }); - - } - - /** - * Deletes a subscription - * - * @param mixed $subscriptionId - * @return void - */ - function deleteSubscription($subscriptionId) { - - foreach ($this->subs[$subscriptionId[0]] as $index => $sub) { - - if ($sub['id'][1] === $subscriptionId[1]) { - unset($this->subs[$subscriptionId[0]][$index]); - return true; - } - - } - - return false; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOMySQLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOMySQLTest.php deleted file mode 100644 index e068ff1e78f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOMySQLTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -class PDOMySQLTest extends AbstractPDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOPgSqlTest.php deleted file mode 100644 index e20b2611249..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -class PDOPgSqlTest extends AbstractPDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOSqliteTest.php deleted file mode 100644 index 90ad5a17106..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -class PDOSqliteTest extends AbstractPDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/SimplePDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/SimplePDOTest.php deleted file mode 100644 index 3e552cfd482..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Backend/SimplePDOTest.php +++ /dev/null @@ -1,445 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Backend; - -use Sabre\CalDAV; -use Sabre\DAV; -use Sabre\DAV\PropPatch; - -class SimplePDOTest extends \PHPUnit_Framework_TestCase { - - protected $pdo; - - function setUp() { - - if (!SABRE_HASSQLITE) $this->markTestSkipped('SQLite driver is not available'); - - if (file_exists(SABRE_TEMPDIR . '/testdb.sqlite')) - unlink(SABRE_TEMPDIR . '/testdb.sqlite'); - - $pdo = new \PDO('sqlite:' . SABRE_TEMPDIR . '/testdb.sqlite'); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - $pdo->exec(<<<SQL -CREATE TABLE simple_calendars ( - id INTEGER PRIMARY KEY ASC NOT NULL, - uri TEXT NOT NULL, - principaluri TEXT NOT NULL -) -SQL - ); - $pdo->exec(<<<SQL -CREATE TABLE simple_calendarobjects ( - id INTEGER PRIMARY KEY ASC NOT NULL, - calendarid INT UNSIGNED NOT NULL, - uri TEXT NOT NULL, - calendardata TEXT -); -SQL - ); - - $this->pdo = $pdo; - - } - - function testConstruct() { - - $backend = new SimplePDO($this->pdo); - $this->assertTrue($backend instanceof SimplePDO); - - } - - /** - * @depends testConstruct - */ - function testGetCalendarsForUserNoCalendars() { - - $backend = new SimplePDO($this->pdo); - $calendars = $backend->getCalendarsForUser('principals/user2'); - $this->assertEquals([], $calendars); - - } - - /** - * @depends testConstruct - */ - function testCreateCalendarAndFetch() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT']), - '{DAV:}displayname' => 'Hello!', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]); - $calendars = $backend->getCalendarsForUser('principals/user2'); - - $elementCheck = [ - 'uri' => 'somerandomid', - ]; - - $this->assertInternalType('array', $calendars); - $this->assertEquals(1, count($calendars)); - - foreach ($elementCheck as $name => $value) { - - $this->assertArrayHasKey($name, $calendars[0]); - $this->assertEquals($value, $calendars[0][$name]); - - } - - } - - /** - * @depends testConstruct - */ - function testUpdateCalendarAndFetch() { - - $backend = new SimplePDO($this->pdo); - - //Creating a new calendar - $newId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'myCalendar', - '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Xml\Property\ScheduleCalendarTransp('transparent'), - ]); - - // Updating the calendar - $backend->updateCalendar($newId, $propPatch); - $result = $propPatch->commit(); - - // Verifying the result of the update - $this->assertFalse($result); - - } - - /** - * @depends testCreateCalendarAndFetch - */ - function testDeleteCalendar() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Xml\Property\SupportedCalendarComponentSet(['VEVENT']), - '{DAV:}displayname' => 'Hello!', - ]); - - $backend->deleteCalendar($returnedId); - - $calendars = $backend->getCalendarsForUser('principals/user2'); - $this->assertEquals([], $calendars); - - } - - function testCreateCalendarObject() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $result = $this->pdo->query('SELECT calendardata FROM simple_calendarobjects WHERE uri = "random-id"'); - $this->assertEquals([ - 'calendardata' => $object, - ], $result->fetch(\PDO::FETCH_ASSOC)); - - } - function testGetMultipleObjects() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - - $backend->createCalendarObject($returnedId, 'id-1', $object); - $backend->createCalendarObject($returnedId, 'id-2', $object); - - $check = [ - [ - 'id' => 1, - 'etag' => '"' . md5($object) . '"', - 'uri' => 'id-1', - 'size' => strlen($object), - 'calendardata' => $object, - ], - [ - 'id' => 2, - 'etag' => '"' . md5($object) . '"', - 'uri' => 'id-2', - 'size' => strlen($object), - 'calendardata' => $object, - ], - ]; - - $result = $backend->getMultipleCalendarObjects($returnedId, ['id-1', 'id-2']); - - foreach ($check as $index => $props) { - - foreach ($props as $key => $value) { - - if ($key !== 'lastmodified') { - $this->assertEquals($value, $result[$index][$key]); - } else { - $this->assertTrue(isset($result[$index][$key])); - } - - } - - } - - } - - /** - * @depends testCreateCalendarObject - */ - function testGetCalendarObjects() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $data = $backend->getCalendarObjects($returnedId); - - $this->assertEquals(1, count($data)); - $data = $data[0]; - - $this->assertEquals('random-id', $data['uri']); - $this->assertEquals(strlen($object), $data['size']); - - } - - /** - * @depends testCreateCalendarObject - */ - function testGetCalendarObjectByUID() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - - $this->assertNull( - $backend->getCalendarObjectByUID('principals/user2', 'bar') - ); - $this->assertEquals( - 'somerandomid/random-id', - $backend->getCalendarObjectByUID('principals/user2', 'foo') - ); - - } - - /** - * @depends testCreateCalendarObject - */ - function testUpdateCalendarObject() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $object2 = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20130101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - $backend->updateCalendarObject($returnedId, 'random-id', $object2); - - $data = $backend->getCalendarObject($returnedId, 'random-id'); - - $this->assertEquals($object2, $data['calendardata']); - $this->assertEquals('random-id', $data['uri']); - - - } - - - /** - * @depends testCreateCalendarObject - */ - function testDeleteCalendarObject() { - - $backend = new SimplePDO($this->pdo); - $returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []); - - $object = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"; - $backend->createCalendarObject($returnedId, 'random-id', $object); - $backend->deleteCalendarObject($returnedId, 'random-id'); - - $data = $backend->getCalendarObject($returnedId, 'random-id'); - $this->assertNull($data); - - } - - - function testCalendarQueryNoResult() { - - $abstract = new SimplePDO($this->pdo); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VJOURNAL', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - ], $abstract->calendarQuery(1, $filters)); - - } - - function testCalendarQueryTodo() { - - $backend = new SimplePDO($this->pdo); - $backend->createCalendarObject(1, "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VTODO', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "todo", - ], $backend->calendarQuery(1, $filters)); - - } - function testCalendarQueryTodoNotMatch() { - - $backend = new SimplePDO($this->pdo); - $backend->createCalendarObject(1, "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VTODO', - 'comp-filters' => [], - 'prop-filters' => [ - [ - 'name' => 'summary', - 'text-match' => null, - 'time-range' => null, - 'param-filters' => [], - 'is-not-defined' => false, - ], - ], - 'is-not-defined' => false, - 'time-range' => null, - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - ], $backend->calendarQuery(1, $filters)); - - } - - function testCalendarQueryNoFilter() { - - $backend = new SimplePDO($this->pdo); - $backend->createCalendarObject(1, "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $result = $backend->calendarQuery(1, $filters); - $this->assertTrue(in_array('todo', $result)); - $this->assertTrue(in_array('event', $result)); - - } - - function testCalendarQueryTimeRange() { - - $backend = new SimplePDO($this->pdo); - $backend->createCalendarObject(1, "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event2", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART;VALUE=DATE:20120103\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('20120103'), - 'end' => new \DateTime('20120104'), - ], - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "event2", - ], $backend->calendarQuery(1, $filters)); - - } - function testCalendarQueryTimeRangeNoEnd() { - - $backend = new SimplePDO($this->pdo); - $backend->createCalendarObject(1, "todo", "BEGIN:VCALENDAR\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120101\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - $backend->createCalendarObject(1, "event2", "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nDTSTART:20120103\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('20120102'), - 'end' => null, - ], - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $this->assertEquals([ - "event2", - ], $backend->calendarQuery(1, $filters)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeNotificationsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeNotificationsTest.php deleted file mode 100644 index 36302cc3556..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeNotificationsTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -class CalendarHomeNotificationsTest extends \PHPUnit_Framework_TestCase { - - function testGetChildrenNoSupport() { - - $backend = new Backend\Mock(); - $calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']); - - $this->assertEquals( - [], - $calendarHome->getChildren() - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\NotFound - */ - function testGetChildNoSupport() { - - $backend = new Backend\Mock(); - $calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']); - $calendarHome->getChild('notifications'); - - } - - function testGetChildren() { - - $backend = new Backend\MockSharing(); - $calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']); - - $result = $calendarHome->getChildren(); - $this->assertEquals('notifications', $result[0]->getName()); - - } - - function testGetChild() { - - $backend = new Backend\MockSharing(); - $calendarHome = new CalendarHome($backend, ['uri' => 'principals/user']); - $result = $calendarHome->getChild('notifications'); - $this->assertEquals('notifications', $result->getName()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSharedCalendarsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSharedCalendarsTest.php deleted file mode 100644 index 9079fdecd80..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSharedCalendarsTest.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; - -class CalendarHomeSharedCalendarsTest extends \PHPUnit_Framework_TestCase { - - protected $backend; - - function getInstance() { - - $calendars = [ - [ - 'id' => 1, - 'principaluri' => 'principals/user1', - ], - [ - 'id' => 2, - '{http://calendarserver.org/ns/}shared-url' => 'calendars/owner/cal1', - '{http://sabredav.org/ns}owner-principal' => 'principal/owner', - '{http://sabredav.org/ns}read-only' => false, - 'principaluri' => 'principals/user1', - ], - ]; - - $this->backend = new Backend\MockSharing( - $calendars, - [], - [] - ); - - return new CalendarHome($this->backend, [ - 'uri' => 'principals/user1' - ]); - - } - - function testSimple() { - - $instance = $this->getInstance(); - $this->assertEquals('user1', $instance->getName()); - - } - - function testGetChildren() { - - $instance = $this->getInstance(); - $children = $instance->getChildren(); - $this->assertEquals(3, count($children)); - - // Testing if we got all the objects back. - $sharedCalendars = 0; - $hasOutbox = false; - $hasNotifications = false; - - foreach ($children as $child) { - - if ($child instanceof ISharedCalendar) { - $sharedCalendars++; - } - if ($child instanceof Notifications\ICollection) { - $hasNotifications = true; - } - - } - $this->assertEquals(2, $sharedCalendars); - $this->assertTrue($hasNotifications); - - } - - function testShareReply() { - - $instance = $this->getInstance(); - $result = $instance->shareReply('uri', DAV\Sharing\Plugin::INVITE_DECLINED, 'curi', '1'); - $this->assertNull($result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSubscriptionsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSubscriptionsTest.php deleted file mode 100644 index 4a479c81602..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeSubscriptionsTest.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV\MkCol; - -class CalendarHomeSubscriptionsTest extends \PHPUnit_Framework_TestCase { - - protected $backend; - - function getInstance() { - - $props = [ - '{DAV:}displayname' => 'baz', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/test.ics'), - ]; - $principal = [ - 'uri' => 'principals/user1' - ]; - $this->backend = new Backend\MockSubscriptionSupport([], []); - $this->backend->createSubscription('principals/user1', 'uri', $props); - - return new CalendarHome($this->backend, $principal); - - } - - function testSimple() { - - $instance = $this->getInstance(); - $this->assertEquals('user1', $instance->getName()); - - } - - function testGetChildren() { - - $instance = $this->getInstance(); - $children = $instance->getChildren(); - $this->assertEquals(1, count($children)); - foreach ($children as $child) { - if ($child instanceof Subscriptions\Subscription) { - return; - } - } - $this->fail('There were no subscription nodes in the calendar home'); - - } - - function testCreateSubscription() { - - $instance = $this->getInstance(); - $rt = ['{DAV:}collection', '{http://calendarserver.org/ns/}subscribed']; - - $props = [ - '{DAV:}displayname' => 'baz', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/test2.ics'), - ]; - $instance->createExtendedCollection('sub2', new MkCol($rt, $props)); - - $children = $instance->getChildren(); - $this->assertEquals(2, count($children)); - - } - - /** - * @expectedException \Sabre\DAV\Exception\InvalidResourceType - */ - function testNoSubscriptionSupport() { - - $principal = [ - 'uri' => 'principals/user1' - ]; - $backend = new Backend\Mock([], []); - $uC = new CalendarHome($backend, $principal); - - $rt = ['{DAV:}collection', '{http://calendarserver.org/ns/}subscribed']; - - $props = [ - '{DAV:}displayname' => 'baz', - '{http://calendarserver.org/ns/}source' => new \Sabre\DAV\Xml\Property\Href('http://example.org/test2.ics'), - ]; - $uC->createExtendedCollection('sub2', new MkCol($rt, $props)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeTest.php deleted file mode 100644 index ff52ea6ad20..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarHomeTest.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; -use Sabre\DAV\MkCol; - -class CalendarHomeTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CalDAV\CalendarHome - */ - protected $usercalendars; - - /** - * @var Backend\BackendInterface - */ - protected $backend; - - function setup() { - - $this->backend = TestUtil::getBackend(); - $this->usercalendars = new CalendarHome($this->backend, [ - 'uri' => 'principals/user1' - ]); - - } - - function testSimple() { - - $this->assertEquals('user1', $this->usercalendars->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - * @depends testSimple - */ - function testGetChildNotFound() { - - $this->usercalendars->getChild('randomname'); - - } - - function testChildExists() { - - $this->assertFalse($this->usercalendars->childExists('foo')); - $this->assertTrue($this->usercalendars->childExists('UUID-123467')); - - } - - function testGetOwner() { - - $this->assertEquals('principals/user1', $this->usercalendars->getOwner()); - - } - - function testGetGroup() { - - $this->assertNull($this->usercalendars->getGroup()); - - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - ]; - $this->assertEquals($expected, $this->usercalendars->getACL()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $this->usercalendars->setACL([]); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @depends testSimple - */ - function testSetName() { - - $this->usercalendars->setName('bla'); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @depends testSimple - */ - function testDelete() { - - $this->usercalendars->delete(); - - } - - /** - * @depends testSimple - */ - function testGetLastModified() { - - $this->assertNull($this->usercalendars->getLastModified()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed - * @depends testSimple - */ - function testCreateFile() { - - $this->usercalendars->createFile('bla'); - - } - - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - * @depends testSimple - */ - function testCreateDirectory() { - - $this->usercalendars->createDirectory('bla'); - - } - - /** - * @depends testSimple - */ - function testCreateExtendedCollection() { - - $mkCol = new MkCol( - ['{DAV:}collection', '{urn:ietf:params:xml:ns:caldav}calendar'], - [] - ); - $result = $this->usercalendars->createExtendedCollection('newcalendar', $mkCol); - $this->assertNull($result); - $cals = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals(3, count($cals)); - - } - - /** - * @expectedException Sabre\DAV\Exception\InvalidResourceType - * @depends testSimple - */ - function testCreateExtendedCollectionBadResourceType() { - - $mkCol = new MkCol( - ['{DAV:}collection', '{DAV:}blabla'], - [] - ); - $this->usercalendars->createExtendedCollection('newcalendar', $mkCol); - - } - - /** - * @expectedException Sabre\DAV\Exception\InvalidResourceType - * @depends testSimple - */ - function testCreateExtendedCollectionNotACalendar() { - - $mkCol = new MkCol( - ['{DAV:}collection'], - [] - ); - $this->usercalendars->createExtendedCollection('newcalendar', $mkCol); - - } - - function testGetSupportedPrivilegesSet() { - - $this->assertNull($this->usercalendars->getSupportedPrivilegeSet()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotImplemented - */ - function testShareReplyFail() { - - $this->usercalendars->shareReply('uri', DAV\Sharing\Plugin::INVITE_DECLINED, 'curi', '1'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php deleted file mode 100644 index c92cde66133..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php +++ /dev/null @@ -1,383 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -require_once 'Sabre/CalDAV/TestUtil.php'; - -class CalendarObjectTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CalDAV\Backend_PDO - */ - protected $backend; - /** - * @var Sabre\CalDAV\Calendar - */ - protected $calendar; - protected $principalBackend; - - function setup() { - - $this->backend = TestUtil::getBackend(); - - $calendars = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals(2, count($calendars)); - $this->calendar = new Calendar($this->backend, $calendars[0]); - - } - - function teardown() { - - unset($this->calendar); - unset($this->backend); - - } - - function testSetup() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $this->assertInternalType('string', $children[0]->getName()); - $this->assertInternalType('string', $children[0]->get()); - $this->assertInternalType('string', $children[0]->getETag()); - $this->assertEquals('text/calendar; charset=utf-8', $children[0]->getContentType()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidArg1() { - - $obj = new CalendarObject( - new Backend\Mock([], []), - [], - [] - ); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidArg2() { - - $obj = new CalendarObject( - new Backend\Mock([], []), - [], - ['calendarid' => '1'] - ); - - } - - /** - * @depends testSetup - */ - function testPut() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - $newData = TestUtil::getTestCalendarData(); - - $children[0]->put($newData); - $this->assertEquals($newData, $children[0]->get()); - - } - - /** - * @depends testSetup - */ - function testPutStream() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - $newData = TestUtil::getTestCalendarData(); - - $stream = fopen('php://temp', 'r+'); - fwrite($stream, $newData); - rewind($stream); - $children[0]->put($stream); - $this->assertEquals($newData, $children[0]->get()); - - } - - - /** - * @depends testSetup - */ - function testDelete() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - $obj->delete(); - - $children2 = $this->calendar->getChildren(); - $this->assertEquals(count($children) - 1, count($children2)); - - } - - /** - * @depends testSetup - */ - function testGetLastModified() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - - $lastMod = $obj->getLastModified(); - $this->assertTrue(is_int($lastMod) || ctype_digit($lastMod) || is_null($lastMod)); - - } - - /** - * @depends testSetup - */ - function testGetSize() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - - $size = $obj->getSize(); - $this->assertInternalType('int', $size); - - } - - function testGetOwner() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - $this->assertEquals('principals/user1', $obj->getOwner()); - - } - - function testGetGroup() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - $this->assertNull($obj->getGroup()); - - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - ]; - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - $this->assertEquals($expected, $obj->getACL()); - - } - - function testDefaultACL() { - - $backend = new Backend\Mock([], []); - $calendarObject = new CalendarObject($backend, ['principaluri' => 'principals/user1'], ['calendarid' => 1, 'uri' => 'foo']); - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - ]; - $this->assertEquals($expected, $calendarObject->getACL()); - - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - $obj->setACL([]); - - } - - function testGet() { - - $children = $this->calendar->getChildren(); - $this->assertTrue($children[0] instanceof CalendarObject); - - $obj = $children[0]; - - $expected = "BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//iCal 4.0.1//EN -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:Asia/Seoul -BEGIN:DAYLIGHT -TZOFFSETFROM:+0900 -RRULE:FREQ=YEARLY;UNTIL=19880507T150000Z;BYMONTH=5;BYDAY=2SU -DTSTART:19870510T000000 -TZNAME:GMT+09:00 -TZOFFSETTO:+1000 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+1000 -DTSTART:19881009T000000 -TZNAME:GMT+09:00 -TZOFFSETTO:+0900 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20100225T154229Z -UID:39A6B5ED-DD51-4AFE-A683-C35EE3749627 -TRANSP:TRANSPARENT -SUMMARY:Something here -DTSTAMP:20100228T130202Z -DTSTART;TZID=Asia/Seoul:20100223T060000 -DTEND;TZID=Asia/Seoul:20100223T070000 -ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:lisa@example.com -SEQUENCE:2 -END:VEVENT -END:VCALENDAR"; - - - - $this->assertEquals($expected, $obj->get()); - - } - - function testGetRefetch() { - - $backend = new Backend\Mock([], [ - 1 => [ - 'foo' => [ - 'calendardata' => 'foo', - 'uri' => 'foo' - ], - ] - ]); - $obj = new CalendarObject($backend, ['id' => 1], ['uri' => 'foo']); - - $this->assertEquals('foo', $obj->get()); - - } - - function testGetEtag1() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'etag' => 'bar', - 'calendarid' => 1 - ]; - - $backend = new Backend\Mock([], []); - $obj = new CalendarObject($backend, [], $objectInfo); - - $this->assertEquals('bar', $obj->getETag()); - - } - - function testGetEtag2() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\Mock([], []); - $obj = new CalendarObject($backend, [], $objectInfo); - - $this->assertEquals('"' . md5('foo') . '"', $obj->getETag()); - - } - - function testGetSupportedPrivilegesSet() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\Mock([], []); - $obj = new CalendarObject($backend, [], $objectInfo); - $this->assertNull($obj->getSupportedPrivilegeSet()); - - } - - function testGetSize1() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\Mock([], []); - $obj = new CalendarObject($backend, [], $objectInfo); - $this->assertEquals(3, $obj->getSize()); - - } - - function testGetSize2() { - - $objectInfo = [ - 'uri' => 'foo', - 'calendarid' => 1, - 'size' => 4, - ]; - - $backend = new Backend\Mock([], []); - $obj = new CalendarObject($backend, [], $objectInfo); - $this->assertEquals(4, $obj->getSize()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php deleted file mode 100644 index ca06d8ffa7b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryVAlarmTest.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\VObject; - -class CalendarQueryVAlarmTest extends \PHPUnit_Framework_TestCase { - - /** - * This test is specifically for a time-range query on a VALARM, contained - * in a VEVENT that's recurring - */ - function testValarm() { - - $vcalendar = new VObject\Component\VCalendar(); - - $vevent = $vcalendar->createComponent('VEVENT'); - $vevent->RRULE = 'FREQ=MONTHLY'; - $vevent->DTSTART = '20120101T120000Z'; - $vevent->UID = 'bla'; - - $valarm = $vcalendar->createComponent('VALARM'); - $valarm->TRIGGER = '-P15D'; - $vevent->add($valarm); - - - $vcalendar->add($vevent); - - $filter = [ - 'name' => 'VCALENDAR', - 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ - [ - 'name' => 'VALARM', - 'is-not-defined' => false, - 'prop-filters' => [], - 'comp-filters' => [], - 'time-range' => [ - 'start' => new \DateTime('2012-05-10'), - 'end' => new \DateTime('2012-05-20'), - ], - ], - ], - ], - ], - ]; - - $validator = new CalendarQueryValidator(); - $this->assertTrue($validator->validate($vcalendar, $filter)); - - $vcalendar = new VObject\Component\VCalendar(); - - // A limited recurrence rule, should return false - $vevent = $vcalendar->createComponent('VEVENT'); - $vevent->RRULE = 'FREQ=MONTHLY;COUNT=1'; - $vevent->DTSTART = '20120101T120000Z'; - $vevent->UID = 'bla'; - - $valarm = $vcalendar->createComponent('VALARM'); - $valarm->TRIGGER = '-P15D'; - $vevent->add($valarm); - - $vcalendar->add($vevent); - - $this->assertFalse($validator->validate($vcalendar, $filter)); - } - - function testAlarmWayBefore() { - - $vcalendar = new VObject\Component\VCalendar(); - - $vevent = $vcalendar->createComponent('VEVENT'); - $vevent->DTSTART = '20120101T120000Z'; - $vevent->UID = 'bla'; - - $valarm = $vcalendar->createComponent('VALARM'); - $valarm->TRIGGER = '-P2W1D'; - $vevent->add($valarm); - - $vcalendar->add($vevent); - - $filter = [ - 'name' => 'VCALENDAR', - 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'is-not-defined' => false, - 'time-range' => null, - 'prop-filters' => [], - 'comp-filters' => [ - [ - 'name' => 'VALARM', - 'is-not-defined' => false, - 'prop-filters' => [], - 'comp-filters' => [], - 'time-range' => [ - 'start' => new \DateTime('2011-12-10'), - 'end' => new \DateTime('2011-12-20'), - ], - ], - ], - ], - ], - ]; - - $validator = new CalendarQueryValidator(); - $this->assertTrue($validator->validate($vcalendar, $filter)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php deleted file mode 100644 index f3305163bdf..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php +++ /dev/null @@ -1,829 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\VObject; - -class CalendarQueryValidatorTest extends \PHPUnit_Framework_TestCase { - - function testTopLevelFail() { - - $validator = new CalendarQueryValidator(); - $vcal = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -END:VEVENT -END:VCALENDAR -ICS; - $vcal = VObject\Reader::read($vcal); - $this->assertFalse($validator->validate($vcal, ['name' => 'VFOO'])); - - } - - /** - * @param string $icalObject - * @param array $filters - * @param int $outcome - * @dataProvider provider - */ - function testValid($icalObject, $filters, $outcome) { - - $validator = new CalendarQueryValidator(); - - // Wrapping filter in a VCALENDAR component filter, as this is always - // there anyway. - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [$filters], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $vObject = VObject\Reader::read($icalObject); - - switch ($outcome) { - case 0 : - $this->assertFalse($validator->validate($vObject, $filters)); - break; - case 1 : - $this->assertTrue($validator->validate($vObject, $filters)); - break; - case -1 : - try { - $validator->validate($vObject, $filters); - $this->fail('This test was supposed to fail'); - } catch (\Exception $e) { - // We need to test something to be valid for phpunit strict - // mode. - $this->assertTrue(true); - } catch (\Throwable $e) { - // PHP7 - $this->assertTrue(true); - } - break; - - } - - } - - function provider() { - - $blob1 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -SUMMARY:hi -END:VEVENT -END:VCALENDAR -yow; - - $blob2 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -SUMMARY:hi -BEGIN:VALARM -ACTION:DISPLAY -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob3 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -SUMMARY:hi -DTSTART;VALUE=DATE:20110704 -END:VEVENT -END:VCALENDAR -yow; - $blob4 = <<<yow -BEGIN:VCARD -VERSION:3.0 -FN:Evert -END:VCARD -yow; - - $blob5 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DTEND:20110102T120000Z -END:VEVENT -END:VCALENDAR -yow; - - $blob6 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DURATION:PT5H -END:VEVENT -END:VCALENDAR -yow; - - $blob7 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART;VALUE=DATE:20110101 -END:VEVENT -END:VCALENDAR -yow; - - $blob8 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -END:VEVENT -END:VCALENDAR -yow; - - $blob9 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -DTSTART:20110101T120000Z -DURATION:PT1H -END:VTODO -END:VCALENDAR -yow; - $blob10 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -DTSTART:20110101T120000Z -DUE:20110101T130000Z -END:VTODO -END:VCALENDAR -yow; - $blob11 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -DTSTART:20110101T120000Z -END:VTODO -END:VCALENDAR -yow; - - $blob12 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -DUE:20110101T130000Z -END:VTODO -END:VCALENDAR -yow; - - $blob13 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -COMPLETED:20110101T130000Z -CREATED:20110101T110000Z -END:VTODO -END:VCALENDAR -yow; - - $blob14 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -COMPLETED:20110101T130000Z -END:VTODO -END:VCALENDAR -yow; - - $blob15 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -CREATED:20110101T110000Z -END:VTODO -END:VCALENDAR -yow; - - - $blob16 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -END:VTODO -END:VCALENDAR -yow; - - $blob17 = <<<yow -BEGIN:VCALENDAR -BEGIN:VJOURNAL -END:VJOURNAL -END:VCALENDAR -yow; - - $blob18 = <<<yow -BEGIN:VCALENDAR -BEGIN:VJOURNAL -DTSTART:20110101T120000Z -END:VJOURNAL -END:VCALENDAR -yow; - - $blob19 = <<<yow -BEGIN:VCALENDAR -BEGIN:VJOURNAL -DTSTART;VALUE=DATE:20110101 -END:VJOURNAL -END:VCALENDAR -yow; - - $blob20 = <<<yow -BEGIN:VCALENDAR -BEGIN:VFREEBUSY -END:VFREEBUSY -END:VCALENDAR -yow; - - $blob21 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -BEGIN:VALARM -TRIGGER:-PT1H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob22 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -BEGIN:VALARM -TRIGGER;VALUE=DURATION:-PT1H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob23 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -BEGIN:VALARM -TRIGGER;VALUE=DURATION;RELATED=END:-PT1H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob24 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -BEGIN:VALARM -TRIGGER;VALUE=DURATION;RELATED=END:-PT2H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob25 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DURATION:PT1H -BEGIN:VALARM -TRIGGER;VALUE=DURATION;RELATED=END:-PT2H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob26 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DURATION:PT1H -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:20110101T110000Z -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - - $blob27 = <<<yow -BEGIN:VCALENDAR -BEGIN:VTODO -DTSTART:20110101T120000Z -DUE:20110101T130000Z -BEGIN:VALARM -TRIGGER;VALUE=DURATION;RELATED=END:-PT2H -END:VALARM -END:VTODO -END:VCALENDAR -yow; - - $blob28 = <<<yow -BEGIN:VCALENDAR -BEGIN:VJOURNAL -DTSTART:20110101T120000Z -BEGIN:VALARM -TRIGGER;VALUE=DURATION;RELATED=END:-PT2H -END:VALARM -END:VJOURNAL -END:VCALENDAR -yow; - - $blob29 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DURATION:PT1H -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:20110101T090000Z -REPEAT:2 -DURATION:PT1H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob30 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T120000Z -DURATION:PT1H -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:20110101T090000Z -DURATION:PT1H -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $blob31 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20080101T120000Z -DURATION:PT1H -RRULE:FREQ=YEARLY -END:VEVENT -END:VCALENDAR -yow; - - $blob32 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20080102T120000Z -DURATION:PT1H -RRULE:FREQ=YEARLY -END:VEVENT -END:VCALENDAR -yow; - $blob33 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART;VALUE=DATE:20120628 -RRULE:FREQ=DAILY -END:VEVENT -END:VCALENDAR -yow; - $blob34 = <<<yow -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART;VALUE=DATE:20120628 -RRULE:FREQ=DAILY -BEGIN:VALARM -TRIGGER:P52W -END:VALARM -END:VEVENT -END:VCALENDAR -yow; - - $filter1 = [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - $filter2 = $filter1; - $filter2['name'] = 'VTODO'; - - $filter3 = $filter1; - $filter3['is-not-defined'] = true; - - $filter4 = $filter1; - $filter4['name'] = 'VTODO'; - $filter4['is-not-defined'] = true; - - $filter5 = $filter1; - $filter5['comp-filters'] = [ - [ - 'name' => 'VALARM', - 'is-not-defined' => false, - 'comp-filters' => [], - 'prop-filters' => [], - 'time-range' => null, - ], - ]; - $filter6 = $filter1; - $filter6['prop-filters'] = [ - [ - 'name' => 'SUMMARY', - 'is-not-defined' => false, - 'param-filters' => [], - 'time-range' => null, - 'text-match' => null, - ], - ]; - $filter7 = $filter6; - $filter7['prop-filters'][0]['name'] = 'DESCRIPTION'; - - $filter8 = $filter6; - $filter8['prop-filters'][0]['is-not-defined'] = true; - - $filter9 = $filter7; - $filter9['prop-filters'][0]['is-not-defined'] = true; - - $filter10 = $filter5; - $filter10['prop-filters'] = $filter6['prop-filters']; - - // Param filters - $filter11 = $filter1; - $filter11['prop-filters'] = [ - [ - 'name' => 'DTSTART', - 'is-not-defined' => false, - 'param-filters' => [ - [ - 'name' => 'VALUE', - 'is-not-defined' => false, - 'text-match' => null, - ], - ], - 'time-range' => null, - 'text-match' => null, - ], - ]; - - $filter12 = $filter11; - $filter12['prop-filters'][0]['param-filters'][0]['name'] = 'TZID'; - - $filter13 = $filter11; - $filter13['prop-filters'][0]['param-filters'][0]['is-not-defined'] = true; - - $filter14 = $filter12; - $filter14['prop-filters'][0]['param-filters'][0]['is-not-defined'] = true; - - // Param text filter - $filter15 = $filter11; - $filter15['prop-filters'][0]['param-filters'][0]['text-match'] = [ - 'collation' => 'i;ascii-casemap', - 'value' => 'dAtE', - 'negate-condition' => false, - ]; - $filter16 = $filter15; - $filter16['prop-filters'][0]['param-filters'][0]['text-match']['collation'] = 'i;octet'; - - $filter17 = $filter15; - $filter17['prop-filters'][0]['param-filters'][0]['text-match']['negate-condition'] = true; - - $filter18 = $filter15; - $filter18['prop-filters'][0]['param-filters'][0]['text-match']['negate-condition'] = true; - $filter18['prop-filters'][0]['param-filters'][0]['text-match']['collation'] = 'i;octet'; - - // prop + text - $filter19 = $filter5; - $filter19['comp-filters'][0]['prop-filters'] = [ - [ - 'name' => 'action', - 'is-not-defined' => false, - 'time-range' => null, - 'param-filters' => [], - 'text-match' => [ - 'collation' => 'i;ascii-casemap', - 'value' => 'display', - 'negate-condition' => false, - ], - ], - ]; - - // Time range - $filter20 = [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 10:00:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:00:00', new \DateTimeZone('GMT')), - ], - ]; - // Time range, no end date - $filter21 = $filter20; - $filter21['time-range']['end'] = null; - - // Time range, no start date - $filter22 = $filter20; - $filter22['time-range']['start'] = null; - - // Time range, other dates - $filter23 = $filter20; - $filter23['time-range'] = [ - 'start' => new \DateTime('2011-02-01 10:00:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-02-01 13:00:00', new \DateTimeZone('GMT')), - ]; - // Time range - $filter24 = [ - 'name' => 'VTODO', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 12:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:15:00', new \DateTimeZone('GMT')), - ], - ]; - // Time range, other dates (1 month in the future) - $filter25 = $filter24; - $filter25['time-range'] = [ - 'start' => new \DateTime('2011-02-01 10:00:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-02-01 13:00:00', new \DateTimeZone('GMT')), - ]; - $filter26 = $filter24; - $filter26['time-range'] = [ - 'start' => new \DateTime('2011-01-01 11:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 12:15:00', new \DateTimeZone('GMT')), - ]; - - // Time range for VJOURNAL - $filter27 = [ - 'name' => 'VJOURNAL', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 12:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:15:00', new \DateTimeZone('GMT')), - ], - ]; - $filter28 = $filter27; - $filter28['time-range'] = [ - 'start' => new \DateTime('2011-01-01 11:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 12:15:00', new \DateTimeZone('GMT')), - ]; - // Time range for VFREEBUSY - $filter29 = [ - 'name' => 'VFREEBUSY', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 12:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:15:00', new \DateTimeZone('GMT')), - ], - ]; - // Time range filter on property - $filter30 = [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [ - [ - 'name' => 'DTSTART', - 'is-not-defined' => false, - 'param-filters' => [], - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 10:00:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:00:00', new \DateTimeZone('GMT')), - ], - 'text-match' => null, - ], - ], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - // Time range for alarm - $filter31 = [ - 'name' => 'VEVENT', - 'prop-filters' => [], - 'comp-filters' => [ - [ - 'name' => 'VALARM', - 'is-not-defined' => false, - 'comp-filters' => [], - 'prop-filters' => [], - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 10:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 11:15:00', new \DateTimeZone('GMT')), - ], - 'text-match' => null, - ], - ], - 'is-not-defined' => false, - 'time-range' => null, - ]; - $filter32 = $filter31; - $filter32['comp-filters'][0]['time-range'] = [ - 'start' => new \DateTime('2011-01-01 11:45:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 12:15:00', new \DateTimeZone('GMT')), - ]; - - $filter33 = $filter31; - $filter33['name'] = 'VTODO'; - $filter34 = $filter32; - $filter34['name'] = 'VTODO'; - $filter35 = $filter31; - $filter35['name'] = 'VJOURNAL'; - $filter36 = $filter32; - $filter36['name'] = 'VJOURNAL'; - - // Time range filter on non-datetime property - $filter37 = [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [ - [ - 'name' => 'SUMMARY', - 'is-not-defined' => false, - 'param-filters' => [], - 'time-range' => [ - 'start' => new \DateTime('2011-01-01 10:00:00', new \DateTimeZone('GMT')), - 'end' => new \DateTime('2011-01-01 13:00:00', new \DateTimeZone('GMT')), - ], - 'text-match' => null, - ], - ], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - $filter38 = [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2012-07-01 00:00:00', new \DateTimeZone('UTC')), - 'end' => new \DateTime('2012-08-01 00:00:00', new \DateTimeZone('UTC')), - ] - ]; - $filter39 = [ - 'name' => 'VEVENT', - 'comp-filters' => [ - [ - 'name' => 'VALARM', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2012-09-01 00:00:00', new \DateTimeZone('UTC')), - 'end' => new \DateTime('2012-10-01 00:00:00', new \DateTimeZone('UTC')), - ] - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - - return [ - - // Component check - - [$blob1, $filter1, 1], - [$blob1, $filter2, 0], - [$blob1, $filter3, 0], - [$blob1, $filter4, 1], - - // Subcomponent check (4) - [$blob1, $filter5, 0], - [$blob2, $filter5, 1], - - // Property checki (6) - [$blob1, $filter6, 1], - [$blob1, $filter7, 0], - [$blob1, $filter8, 0], - [$blob1, $filter9, 1], - - // Subcomponent + property (10) - [$blob2, $filter10, 1], - - // Param filter (11) - [$blob3, $filter11, 1], - [$blob3, $filter12, 0], - [$blob3, $filter13, 0], - [$blob3, $filter14, 1], - - // Param + text (15) - [$blob3, $filter15, 1], - [$blob3, $filter16, 0], - [$blob3, $filter17, 0], - [$blob3, $filter18, 1], - - // Prop + text (19) - [$blob2, $filter19, 1], - - // Incorrect object (vcard) (20) - [$blob4, $filter1, -1], - - // Time-range for event (21) - [$blob5, $filter20, 1], - [$blob6, $filter20, 1], - [$blob7, $filter20, 1], - [$blob8, $filter20, 1], - - [$blob5, $filter21, 1], - [$blob5, $filter22, 1], - - [$blob5, $filter23, 0], - [$blob6, $filter23, 0], - [$blob7, $filter23, 0], - [$blob8, $filter23, 0], - - // Time-range for todo (31) - [$blob9, $filter24, 1], - [$blob9, $filter25, 0], - [$blob9, $filter26, 1], - [$blob10, $filter24, 1], - [$blob10, $filter25, 0], - [$blob10, $filter26, 1], - - [$blob11, $filter24, 0], - [$blob11, $filter25, 0], - [$blob11, $filter26, 1], - - [$blob12, $filter24, 1], - [$blob12, $filter25, 0], - [$blob12, $filter26, 0], - - [$blob13, $filter24, 1], - [$blob13, $filter25, 0], - [$blob13, $filter26, 1], - - [$blob14, $filter24, 1], - [$blob14, $filter25, 0], - [$blob14, $filter26, 0], - - [$blob15, $filter24, 1], - [$blob15, $filter25, 1], - [$blob15, $filter26, 1], - - [$blob16, $filter24, 1], - [$blob16, $filter25, 1], - [$blob16, $filter26, 1], - - // Time-range for journals (55) - [$blob17, $filter27, 0], - [$blob17, $filter28, 0], - [$blob18, $filter27, 0], - [$blob18, $filter28, 1], - [$blob19, $filter27, 1], - [$blob19, $filter28, 1], - - // Time-range for free-busy (61) - [$blob20, $filter29, -1], - - // Time-range on property (62) - [$blob5, $filter30, 1], - [$blob3, $filter37, -1], - [$blob3, $filter30, 0], - - // Time-range on alarm in vevent (65) - [$blob21, $filter31, 1], - [$blob21, $filter32, 0], - [$blob22, $filter31, 1], - [$blob22, $filter32, 0], - [$blob23, $filter31, 1], - [$blob23, $filter32, 0], - [$blob24, $filter31, 1], - [$blob24, $filter32, 0], - [$blob25, $filter31, 1], - [$blob25, $filter32, 0], - [$blob26, $filter31, 1], - [$blob26, $filter32, 0], - - // Time-range on alarm for vtodo (77) - [$blob27, $filter33, 1], - [$blob27, $filter34, 0], - - // Time-range on alarm for vjournal (79) - [$blob28, $filter35, -1], - [$blob28, $filter36, -1], - - // Time-range on alarm with duration (81) - [$blob29, $filter31, 1], - [$blob29, $filter32, 0], - [$blob30, $filter31, 0], - [$blob30, $filter32, 0], - - // Time-range with RRULE (85) - [$blob31, $filter20, 1], - [$blob32, $filter20, 0], - - // Bug reported on mailing list, related to all-day events (87) - //array($blob33, $filter38, 1), - - // Event in timerange, but filtered alarm is in the far future (88). - [$blob34, $filter39, 0], - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarTest.php deleted file mode 100644 index df85b6ded0d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/CalendarTest.php +++ /dev/null @@ -1,256 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV\PropPatch; - -require_once 'Sabre/CalDAV/TestUtil.php'; - -class CalendarTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CalDAV\Backend\PDO - */ - protected $backend; - protected $principalBackend; - /** - * @var Sabre\CalDAV\Calendar - */ - protected $calendar; - /** - * @var array - */ - protected $calendars; - - function setup() { - - $this->backend = TestUtil::getBackend(); - - $this->calendars = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals(2, count($this->calendars)); - $this->calendar = new Calendar($this->backend, $this->calendars[0]); - - - } - - function teardown() { - - unset($this->backend); - - } - - function testSimple() { - - $this->assertEquals($this->calendars[0]['uri'], $this->calendar->getName()); - - } - - /** - * @depends testSimple - */ - function testUpdateProperties() { - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'NewName', - ]); - - $result = $this->calendar->propPatch($propPatch); - $result = $propPatch->commit(); - - $this->assertEquals(true, $result); - - $calendars2 = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals('NewName', $calendars2[0]['{DAV:}displayname']); - - } - - /** - * @depends testSimple - */ - function testGetProperties() { - - $question = [ - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set', - ]; - - $result = $this->calendar->getProperties($question); - - foreach ($question as $q) $this->assertArrayHasKey($q, $result); - - $this->assertEquals(['VEVENT', 'VTODO'], $result['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']->getValue()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - * @depends testSimple - */ - function testGetChildNotFound() { - - $this->calendar->getChild('randomname'); - - } - - /** - * @depends testSimple - */ - function testGetChildren() { - - $children = $this->calendar->getChildren(); - $this->assertEquals(1, count($children)); - - $this->assertTrue($children[0] instanceof CalendarObject); - - } - - /** - * @depends testGetChildren - */ - function testChildExists() { - - $this->assertFalse($this->calendar->childExists('foo')); - - $children = $this->calendar->getChildren(); - $this->assertTrue($this->calendar->childExists($children[0]->getName())); - } - - - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testCreateDirectory() { - - $this->calendar->createDirectory('hello'); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testSetName() { - - $this->calendar->setName('hello'); - - } - - function testGetLastModified() { - - $this->assertNull($this->calendar->getLastModified()); - - } - - function testCreateFile() { - - $file = fopen('php://memory', 'r+'); - fwrite($file, TestUtil::getTestCalendarData()); - rewind($file); - - $this->calendar->createFile('hello', $file); - - $file = $this->calendar->getChild('hello'); - $this->assertTrue($file instanceof CalendarObject); - - } - - function testCreateFileNoSupportedComponents() { - - $file = fopen('php://memory', 'r+'); - fwrite($file, TestUtil::getTestCalendarData()); - rewind($file); - - $calendar = new Calendar($this->backend, $this->calendars[1]); - $calendar->createFile('hello', $file); - - $file = $calendar->getChild('hello'); - $this->assertTrue($file instanceof CalendarObject); - - } - - function testDelete() { - - $this->calendar->delete(); - - $calendars = $this->backend->getCalendarsForUser('principals/user1'); - $this->assertEquals(1, count($calendars)); - } - - function testGetOwner() { - - $this->assertEquals('principals/user1', $this->calendar->getOwner()); - - } - - function testGetGroup() { - - $this->assertNull($this->calendar->getGroup()); - - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - [ - 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy', - 'principal' => '{DAV:}authenticated', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - ]; - $this->assertEquals($expected, $this->calendar->getACL()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $this->calendar->setACL([]); - - } - - function testGetSyncToken() { - - $this->assertNull($this->calendar->getSyncToken()); - - } - - function testGetSyncTokenNoSyncSupport() { - - $calendar = new Calendar(new Backend\Mock([], []), []); - $this->assertNull($calendar->getSyncToken()); - - } - - function testGetChanges() { - - $this->assertNull($this->calendar->getChanges(1, 1)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php deleted file mode 100644 index 9a3d47828fb..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDTest.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittests is created to find out why recurring events have wrong DTSTART value - * - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ExpandEventsDTSTARTandDTENDTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTEND;TZID=Europe/Berlin:20120207T191500 -RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3 -SUMMARY:RecurringEvents 3 times -DTSTART;TZID=Europe/Berlin:20120207T181500 -END:VEVENT -BEGIN:VEVENT -CREATED:20120207T111900Z -UID:foobar -DTEND;TZID=Europe/Berlin:20120208T191500 -SUMMARY:RecurringEvents 3 times OVERWRITTEN -DTSTART;TZID=Europe/Berlin:20120208T181500 -RECURRENCE-ID;TZID=Europe/Berlin:20120208T181500 -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testExpand() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120205T230000Z" end="20120212T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120205T230000Z" end="20120212T225959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - try { - $vObject = VObject\Reader::read($body); - } catch (VObject\ParseException $e) { - $this->fail('Could not parse object. Error:' . $e->getMessage() . ' full object: ' . $response->getBodyAsString()); - } - - // check if DTSTARTs and DTENDs are correct - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if ($child->name == 'DTSTART') { - // DTSTART has to be one of three valid values - $this->assertContains($child->getValue(), ['20120207T171500Z', '20120208T171500Z', '20120209T171500Z'], 'DTSTART is not a valid value: ' . $child->getValue()); - } elseif ($child->name == 'DTEND') { - // DTEND has to be one of three valid values - $this->assertContains($child->getValue(), ['20120207T181500Z', '20120208T181500Z', '20120209T181500Z'], 'DTEND is not a valid value: ' . $child->getValue()); - } - } - } - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php deleted file mode 100644 index efc49673f3f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDTSTARTandDTENDbyDayTest.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittests is created to find out why recurring events have wrong DTSTART value - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ExpandEventsDTSTARTandDTENDbyDayTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTEND;TZID=Europe/Berlin:20120207T191500 -RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,TH -SUMMARY:RecurringEvents on tuesday and thursday -DTSTART;TZID=Europe/Berlin:20120207T181500 -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testExpandRecurringByDayEvent() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120210T230000Z" end="20120217T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120210T230000Z" end="20120217T225959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - $this->assertEquals(2, count($vObject->VEVENT)); - - // check if DTSTARTs and DTENDs are correct - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if ($child->name == 'DTSTART') { - // DTSTART has to be one of two valid values - $this->assertContains($child->getValue(), ['20120214T171500Z', '20120216T171500Z'], 'DTSTART is not a valid value: ' . $child->getValue()); - } elseif ($child->name == 'DTEND') { - // DTEND has to be one of two valid values - $this->assertContains($child->getValue(), ['20120214T181500Z', '20120216T181500Z'], 'DTEND is not a valid value: ' . $child->getValue()); - } - } - } - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php deleted file mode 100644 index 3a22e03d4a5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsDoubleEventsTest.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittests is created to find out why certain events show up twice. - * - * Hopefully, by the time I'm done with this, I've both found the problem, and - * fixed it :) - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ExpandEventsDoubleEventsTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTEND;TZID=Europe/Berlin:20120207T191500 -RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3 -SUMMARY:RecurringEvents 3 times -DTSTART;TZID=Europe/Berlin:20120207T181500 -END:VEVENT -BEGIN:VEVENT -CREATED:20120207T111900Z -UID:foobar -DTEND;TZID=Europe/Berlin:20120208T191500 -SUMMARY:RecurringEvents 3 times OVERWRITTEN -DTSTART;TZID=Europe/Berlin:20120208T181500 -RECURRENCE-ID;TZID=Europe/Berlin:20120208T181500 -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testExpand() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120205T230000Z" end="20120212T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120205T230000Z" end="20120212T225959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - // We only expect 3 events - $this->assertEquals(3, count($vObject->VEVENT), 'We got 6 events instead of 3. Output: ' . $body); - - // TZID should be gone - $this->assertFalse(isset($vObject->VEVENT->DTSTART['TZID'])); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsFloatingTimeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsFloatingTimeTest.php deleted file mode 100644 index fba47d79ba1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ExpandEventsFloatingTimeTest.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittest is created to check if expand() works correctly with - * floating times (using calendar-timezone information). - */ -class ExpandEventsFloatingTimeTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $setupCalDAVICSExport = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'BEGIN:VCALENDAR -VERSION:2.0 -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:Europe/Berlin -BEGIN:DAYLIGHT -TZOFFSETFROM:+0100 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU -DTSTART:19810329T020000 -TZNAME:GMT+2 -TZOFFSETTO:+0200 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+0200 -RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU -DTSTART:19961027T030000 -TZNAME:GMT+1 -TZOFFSETTO:+0100 -END:STANDARD -END:VTIMEZONE -END:VCALENDAR', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -CALSCALE:GREGORIAN -BEGIN:VEVENT -CREATED:20140701T143658Z -UID:dba46fe8-1631-4d98-a575-97963c364dfe -DTEND:20141108T073000 -TRANSP:OPAQUE -SUMMARY:Floating Time event, starting 05:30am Europe/Berlin -DTSTART:20141108T053000 -DTSTAMP:20140701T143706Z -SEQUENCE:1 -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testExpandCalendarQuery() { - - $request = new HTTP\Request('REPORT', '/calendars/user1/calendar1', [ - 'Depth' => 1, - 'Content-Type' => 'application/xml', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20141107T230000Z" end="20141108T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20141107T230000Z" end="20141108T225959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - // check if DTSTARTs and DTENDs are correct - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if ($child->name == 'DTSTART') { - // DTSTART should be the UTC equivalent of given floating time - $this->assertEquals('20141108T043000Z', $child->getValue()); - } elseif ($child->name == 'DTEND') { - // DTEND should be the UTC equivalent of given floating time - $this->assertEquals('20141108T063000Z', $child->getValue()); - } - } - } - } - - function testExpandMultiGet() { - - $request = new HTTP\Request('REPORT', '/calendars/user1/calendar1', [ - 'Depth' => 1, - 'Content-Type' => 'application/xml', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20141107T230000Z" end="20141108T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <D:href>/calendars/user1/calendar1/event.ics</D:href> -</C:calendar-multiget>'); - - $response = $this->request($request); - - $this->assertEquals(207, $response->getStatus()); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - // check if DTSTARTs and DTENDs are correct - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if ($child->name == 'DTSTART') { - // DTSTART should be the UTC equivalent of given floating time - $this->assertEquals($child->getValue(), '20141108T043000Z'); - } elseif ($child->name == 'DTEND') { - // DTEND should be the UTC equivalent of given floating time - $this->assertEquals($child->getValue(), '20141108T063000Z'); - } - } - } - } - - function testExpandExport() { - - $request = new HTTP\Request('GET', '/calendars/user1/calendar1?export&start=1&end=2000000000&expand=1', [ - 'Depth' => 1, - 'Content-Type' => 'application/xml', - ]); - - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - // check if DTSTARTs and DTENDs are correct - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if ($child->name == 'DTSTART') { - // DTSTART should be the UTC equivalent of given floating time - $this->assertEquals('20141108T043000Z', $child->getValue()); - } elseif ($child->name == 'DTEND') { - // DTEND should be the UTC equivalent of given floating time - $this->assertEquals('20141108T063000Z', $child->getValue()); - } - } - } - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php deleted file mode 100644 index 7604c7f4c1b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/CalDAV/Backend/Mock.php'; -require_once 'Sabre/HTTP/ResponseMock.php'; - -class FreeBusyReportTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Plugin - */ - protected $plugin; - /** - * @var DAV\Server - */ - protected $server; - - function setUp() { - - $obj1 = <<<ics -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20111005T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ics; - - $obj2 = fopen('php://memory', 'r+'); - fwrite($obj2, <<<ics -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20121005T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ics - ); - rewind($obj2); - - $obj3 = <<<ics -BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20111006T120000 -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ics; - - $calendarData = [ - 1 => [ - 'obj1' => [ - 'calendarid' => 1, - 'uri' => 'event1.ics', - 'calendardata' => $obj1, - ], - 'obj2' => [ - 'calendarid' => 1, - 'uri' => 'event2.ics', - 'calendardata' => $obj2 - ], - 'obj3' => [ - 'calendarid' => 1, - 'uri' => 'event3.ics', - 'calendardata' => $obj3 - ] - ], - ]; - - - $caldavBackend = new Backend\Mock([], $calendarData); - - $calendar = new Calendar($caldavBackend, [ - 'id' => 1, - 'uri' => 'calendar', - 'principaluri' => 'principals/user1', - '{' . Plugin::NS_CALDAV . '}calendar-timezone' => "BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nEND:VTIMEZONE\r\nEND:VCALENDAR", - ]); - - $this->server = new DAV\Server([$calendar]); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_URI' => '/calendar', - ]); - $this->server->httpRequest = $request; - $this->server->httpResponse = new HTTP\ResponseMock(); - - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - } - - function testFreeBusyReport() { - - $reportXML = <<<XML -<?xml version="1.0"?> -<c:free-busy-query xmlns:c="urn:ietf:params:xml:ns:caldav"> - <c:time-range start="20111001T000000Z" end="20111101T000000Z" /> -</c:free-busy-query> -XML; - - $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report, null); - - $this->assertEquals(200, $this->server->httpResponse->status); - $this->assertEquals('text/calendar', $this->server->httpResponse->getHeader('Content-Type')); - $this->assertTrue(strpos($this->server->httpResponse->body, 'BEGIN:VFREEBUSY') !== false); - $this->assertTrue(strpos($this->server->httpResponse->body, '20111005T120000Z/20111005T130000Z') !== false); - $this->assertTrue(strpos($this->server->httpResponse->body, '20111006T100000Z/20111006T110000Z') !== false); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testFreeBusyReportNoTimeRange() { - - $reportXML = <<<XML -<?xml version="1.0"?> -<c:free-busy-query xmlns:c="urn:ietf:params:xml:ns:caldav"> -</c:free-busy-query> -XML; - - $report = $this->server->xml->parse($reportXML, null, $rootElem); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotImplemented - */ - function testFreeBusyReportWrongNode() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_URI' => '/', - ]); - $this->server->httpRequest = $request; - - $reportXML = <<<XML -<?xml version="1.0"?> -<c:free-busy-query xmlns:c="urn:ietf:params:xml:ns:caldav"> - <c:time-range start="20111001T000000Z" end="20111101T000000Z" /> -</c:free-busy-query> -XML; - - $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report, null); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testFreeBusyReportNoACLPlugin() { - - $this->server = new DAV\Server(); - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - $reportXML = <<<XML -<?xml version="1.0"?> -<c:free-busy-query xmlns:c="urn:ietf:params:xml:ns:caldav"> - <c:time-range start="20111001T000000Z" end="20111101T000000Z" /> -</c:free-busy-query> -XML; - - $report = $this->server->xml->parse($reportXML, null, $rootElem); - $this->plugin->report($rootElem, $report, null); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php deleted file mode 100644 index 5fd8d29a11b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/GetEventsByTimerangeTest.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; - -/** - * This unittest is created to check if queries for time-range include the start timestamp or not - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class GetEventsByTimerangeTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -CREATED:20120313T142342Z -UID:171EBEFC-C951-499D-B234-7BA7D677B45D -DTEND;TZID=Europe/Berlin:20120227T010000 -TRANSP:OPAQUE -SUMMARY:Monday 0h -DTSTART;TZID=Europe/Berlin:20120227T000000 -DTSTAMP:20120313T142416Z -SEQUENCE:4 -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testQueryTimerange() { - - $request = new HTTP\Request( - 'REPORT', - '/calendars/user1/calendar1', - [ - 'Content-Type' => 'application/xml', - 'Depth' => '1', - ] - ); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120226T220000Z" end="20120228T225959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120226T220000Z" end="20120228T225959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - $this->assertTrue(strpos($response->body, 'BEGIN:VCALENDAR') !== false); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php deleted file mode 100644 index 75412577e9b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php +++ /dev/null @@ -1,386 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; -use Sabre\VObject; - -class ICSExportPluginTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $icsExportPlugin; - - function setUp() { - - parent::setUp(); - $this->icsExportPlugin = new ICSExportPlugin(); - $this->server->addPlugin( - $this->icsExportPlugin - ); - - $id = $this->caldavBackend->createCalendar( - 'principals/admin', - 'UUID-123467', - [ - '{DAV:}displayname' => 'Hello!', - '{http://apple.com/ns/ical/}calendar-color' => '#AA0000FF', - ] - ); - - $this->caldavBackend->createCalendarObject( - $id, - 'event-1', - <<<ICS -BEGIN:VCALENDAR -BEGIN:VTIMEZONE -TZID:Europe/Amsterdam -END:VTIMEZONE -BEGIN:VEVENT -UID:event-1 -DTSTART;TZID=Europe/Amsterdam:20151020T000000 -END:VEVENT -END:VCALENDAR -ICS - ); - $this->caldavBackend->createCalendarObject( - $id, - 'todo-1', - <<<ICS -BEGIN:VCALENDAR -BEGIN:VTODO -UID:todo-1 -END:VTODO -END:VCALENDAR -ICS - ); - - - } - - function testInit() { - - $this->assertEquals( - $this->icsExportPlugin, - $this->server->getPlugin('ics-export') - ); - $this->assertEquals($this->icsExportPlugin, $this->server->getPlugin('ics-export')); - $this->assertEquals('ics-export', $this->icsExportPlugin->getPluginInfo()['name']); - - } - - function testBeforeMethod() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export' - ); - - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - - $obj = VObject\Reader::read($response->body); - - $this->assertEquals(8, count($obj->children())); - $this->assertEquals(1, count($obj->VERSION)); - $this->assertEquals(1, count($obj->CALSCALE)); - $this->assertEquals(1, count($obj->PRODID)); - $this->assertTrue(strpos((string)$obj->PRODID, DAV\Version::VERSION) !== false); - $this->assertEquals(1, count($obj->VTIMEZONE)); - $this->assertEquals(1, count($obj->VEVENT)); - $this->assertEquals("Hello!", $obj->{"X-WR-CALNAME"}); - $this->assertEquals("#AA0000FF", $obj->{"X-APPLE-CALENDAR-COLOR"}); - - } - function testBeforeMethodNoVersion() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export' - ); - DAV\Server::$exposeVersion = false; - $response = $this->request($request); - DAV\Server::$exposeVersion = true; - - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - - $obj = VObject\Reader::read($response->body); - - $this->assertEquals(8, count($obj->children())); - $this->assertEquals(1, count($obj->VERSION)); - $this->assertEquals(1, count($obj->CALSCALE)); - $this->assertEquals(1, count($obj->PRODID)); - $this->assertFalse(strpos((string)$obj->PRODID, DAV\Version::VERSION) !== false); - $this->assertEquals(1, count($obj->VTIMEZONE)); - $this->assertEquals(1, count($obj->VEVENT)); - - } - - function testBeforeMethodNoExport() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467' - ); - $response = new HTTP\Response(); - $this->assertNull($this->icsExportPlugin->httpGet($request, $response)); - - } - - function testACLIntegrationBlocked() { - - $aclPlugin = new DAVACL\Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $this->server->addPlugin( - $aclPlugin - ); - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export' - ); - - $this->request($request, 403); - - } - - function testACLIntegrationNotBlocked() { - - $aclPlugin = new DAVACL\Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $this->server->addPlugin( - $aclPlugin - ); - $this->server->addPlugin( - new Plugin() - ); - - $this->autoLogin('admin'); - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export' - ); - - $response = $this->request($request, 200); - $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - - $obj = VObject\Reader::read($response->body); - - $this->assertEquals(8, count($obj->children())); - $this->assertEquals(1, count($obj->VERSION)); - $this->assertEquals(1, count($obj->CALSCALE)); - $this->assertEquals(1, count($obj->PRODID)); - $this->assertTrue(strpos((string)$obj->PRODID, DAV\Version::VERSION) !== false); - $this->assertEquals(1, count($obj->VTIMEZONE)); - $this->assertEquals(1, count($obj->VEVENT)); - - } - - function testBadStartParam() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&start=foo' - ); - $this->request($request, 400); - - } - - function testBadEndParam() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&end=foo' - ); - $this->request($request, 400); - - } - - function testFilterStartEnd() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&start=1&end=2' - ); - $response = $this->request($request, 200); - - $obj = VObject\Reader::read($response->getBody()); - - $this->assertEquals(0, count($obj->VTIMEZONE)); - $this->assertEquals(0, count($obj->VEVENT)); - - } - - function testExpandNoStart() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&expand=1&end=2' - ); - $this->request($request, 400); - - } - - function testExpand() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&start=1&end=2000000000&expand=1' - ); - $response = $this->request($request, 200); - - $obj = VObject\Reader::read($response->getBody()); - - $this->assertEquals(0, count($obj->VTIMEZONE)); - $this->assertEquals(1, count($obj->VEVENT)); - - } - - function testJCal() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export', - ['Accept' => 'application/calendar+json'] - ); - - $response = $this->request($request, 200); - $this->assertEquals('application/calendar+json', $response->getHeader('Content-Type')); - - } - - function testJCalInUrl() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&accept=jcal' - ); - - $response = $this->request($request, 200); - $this->assertEquals('application/calendar+json', $response->getHeader('Content-Type')); - - } - - function testNegotiateDefault() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export', - ['Accept' => 'text/plain'] - ); - - $response = $this->request($request, 200); - $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - - } - - function testFilterComponentVEVENT() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&componentType=VEVENT' - ); - - $response = $this->request($request, 200); - - $obj = VObject\Reader::read($response->body); - $this->assertEquals(1, count($obj->VTIMEZONE)); - $this->assertEquals(1, count($obj->VEVENT)); - $this->assertEquals(0, count($obj->VTODO)); - - } - - function testFilterComponentVTODO() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&componentType=VTODO' - ); - - $response = $this->request($request, 200); - - $obj = VObject\Reader::read($response->body); - - $this->assertEquals(0, count($obj->VTIMEZONE)); - $this->assertEquals(0, count($obj->VEVENT)); - $this->assertEquals(1, count($obj->VTODO)); - - } - - function testFilterComponentBadComponent() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export&componentType=VVOODOO' - ); - - $response = $this->request($request, 400); - - } - - function testContentDisposition() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export' - ); - - $response = $this->request($request, 200); - $this->assertEquals('text/calendar', $response->getHeader('Content-Type')); - $this->assertEquals( - 'attachment; filename="UUID-123467-' . date('Y-m-d') . '.ics"', - $response->getHeader('Content-Disposition') - ); - - } - - function testContentDispositionJson() { - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-123467?export', - ['Accept' => 'application/calendar+json'] - ); - - $response = $this->request($request, 200); - $this->assertEquals('application/calendar+json', $response->getHeader('Content-Type')); - $this->assertEquals( - 'attachment; filename="UUID-123467-' . date('Y-m-d') . '.json"', - $response->getHeader('Content-Disposition') - ); - - } - - function testContentDispositionBadChars() { - - $this->caldavBackend->createCalendar( - 'principals/admin', - 'UUID-b_ad"(ch)ars', - [ - '{DAV:}displayname' => 'Test bad characters', - '{http://apple.com/ns/ical/}calendar-color' => '#AA0000FF', - ] - ); - - $request = new HTTP\Request( - 'GET', - '/calendars/admin/UUID-b_ad"(ch)ars?export', - ['Accept' => 'application/calendar+json'] - ); - - $response = $this->request($request, 200); - $this->assertEquals('application/calendar+json', $response->getHeader('Content-Type')); - $this->assertEquals( - 'attachment; filename="UUID-b_adchars-' . date('Y-m-d') . '.json"', - $response->getHeader('Content-Disposition') - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue166Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue166Test.php deleted file mode 100644 index a1a9b7c0443..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue166Test.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\VObject; - -class Issue166Test extends \PHPUnit_Framework_TestCase { - - function testFlaw() { - - $input = <<<HI -BEGIN:VCALENDAR -PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Asia/Pyongyang -X-LIC-LOCATION:Asia/Pyongyang -BEGIN:STANDARD -TZOFFSETFROM:+0900 -TZOFFSETTO:+0900 -TZNAME:KST -DTSTART:19700101T000000 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20111118T010857Z -LAST-MODIFIED:20111118T010937Z -DTSTAMP:20111118T010937Z -UID:a03245b3-9947-9a48-a088-863c74e0fdd8 -SUMMARY:New Event -RRULE:FREQ=YEARLY -DTSTART;TZID=Asia/Pyongyang:19960102T111500 -DTEND;TZID=Asia/Pyongyang:19960102T121500 -END:VEVENT -END:VCALENDAR -HI; - - $validator = new CalendarQueryValidator(); - - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2011-12-01'), - 'end' => new \DateTime('2012-02-01'), - ], - ], - ], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => null, - ]; - $input = VObject\Reader::read($input); - $this->assertTrue($validator->validate($input, $filters)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue172Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue172Test.php deleted file mode 100644 index e2b85c2bcdd..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue172Test.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\VObject; - -class Issue172Test extends \PHPUnit_Framework_TestCase { - - // DateTimeZone() native name: America/Los_Angeles (GMT-8 in January) - function testBuiltInTimezoneName() { - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -DTSTART;TZID=America/Los_Angeles:20120118T204500 -DTEND;TZID=America/Los_Angeles:20120118T214500 -END:VEVENT -END:VCALENDAR -HI; - $validator = new CalendarQueryValidator(); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2012-01-18 21:00:00 GMT-08:00'), - 'end' => new \DateTime('2012-01-18 21:00:00 GMT-08:00'), - ], - ], - ], - 'prop-filters' => [], - ]; - $input = VObject\Reader::read($input); - $this->assertTrue($validator->validate($input, $filters)); - } - - // Pacific Standard Time, translates to America/Los_Angeles (GMT-8 in January) - function testOutlookTimezoneName() { - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Pacific Standard Time -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:16010101T020000 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=Pacific Standard Time:20120113T100000 -DTEND;TZID=Pacific Standard Time:20120113T110000 -END:VEVENT -END:VCALENDAR -HI; - $validator = new CalendarQueryValidator(); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2012-01-13 10:30:00 GMT-08:00'), - 'end' => new \DateTime('2012-01-13 10:30:00 GMT-08:00'), - ], - ], - ], - 'prop-filters' => [], - ]; - $input = VObject\Reader::read($input); - $this->assertTrue($validator->validate($input, $filters)); - } - - // X-LIC-LOCATION, translates to America/Los_Angeles (GMT-8 in January) - function testLibICalLocationName() { - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:My own timezone name -X-LIC-LOCATION:America/Los_Angeles -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:16010101T020000 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTART;TZID=My own timezone name:20120113T100000 -DTEND;TZID=My own timezone name:20120113T110000 -END:VEVENT -END:VCALENDAR -HI; - $validator = new CalendarQueryValidator(); - $filters = [ - 'name' => 'VCALENDAR', - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new \DateTime('2012-01-13 10:30:00 GMT-08:00'), - 'end' => new \DateTime('2012-01-13 10:30:00 GMT-08:00'), - ], - ], - ], - 'prop-filters' => [], - ]; - $input = VObject\Reader::read($input); - $this->assertTrue($validator->validate($input, $filters)); - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php deleted file mode 100644 index 369e9a70c12..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue203Test.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittest is created to find out why an overwritten DAILY event has wrong DTSTART, DTEND, SUMMARY and RECURRENCEID - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Issue203Test extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:20120330T155305CEST-6585fBUVgV -DTSTAMP:20120330T135305Z -DTSTART;TZID=Europe/Berlin:20120326T155200 -DTEND;TZID=Europe/Berlin:20120326T165200 -RRULE:FREQ=DAILY;COUNT=2;INTERVAL=1 -SUMMARY:original summary -TRANSP:OPAQUE -END:VEVENT -BEGIN:VEVENT -UID:20120330T155305CEST-6585fBUVgV -DTSTAMP:20120330T135352Z -DESCRIPTION: -DTSTART;TZID=Europe/Berlin:20120328T155200 -DTEND;TZID=Europe/Berlin:20120328T165200 -RECURRENCE-ID;TZID=Europe/Berlin:20120327T155200 -SEQUENCE:1 -SUMMARY:overwritten summary -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testIssue203() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120325T220000Z" end="20120401T215959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120325T220000Z" end="20120401T215959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - $this->assertEquals(2, count($vObject->VEVENT)); - - - $expectedEvents = [ - [ - 'DTSTART' => '20120326T135200Z', - 'DTEND' => '20120326T145200Z', - 'SUMMARY' => 'original summary', - ], - [ - 'DTSTART' => '20120328T135200Z', - 'DTEND' => '20120328T145200Z', - 'SUMMARY' => 'overwritten summary', - 'RECURRENCE-ID' => '20120327T135200Z', - ] - ]; - - // try to match agains $expectedEvents array - foreach ($expectedEvents as $expectedEvent) { - - $matching = false; - - foreach ($vObject->VEVENT as $vevent) { - /** @var $vevent Sabre\VObject\Component\VEvent */ - foreach ($vevent->children() as $child) { - /** @var $child Sabre\VObject\Property */ - if (isset($expectedEvent[$child->name])) { - if ($expectedEvent[$child->name] != $child->getValue()) { - continue 2; - } - } - } - - $matching = true; - break; - } - - $this->assertTrue($matching, 'Did not find the following event in the response: ' . var_export($expectedEvent, true)); - } - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php deleted file mode 100644 index ce40a90b035..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue205Test.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; -use Sabre\VObject; - -/** - * This unittest is created to check if a VALARM TRIGGER of PT0S is supported - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Issue205Test extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:20120330T155305CEST-6585fBUVgV -DTSTAMP:20120330T135305Z -DTSTART;TZID=Europe/Berlin:20120326T155200 -DTEND;TZID=Europe/Berlin:20120326T165200 -SUMMARY:original summary -TRANSP:OPAQUE -BEGIN:VALARM -ACTION:AUDIO -ATTACH;VALUE=URI:Basso -TRIGGER:PT0S -END:VALARM -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testIssue205() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120325T220000Z" end="20120401T215959Z"/> - </C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:comp-filter name="VALARM"> - <C:time-range start="20120325T220000Z" end="20120401T215959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - $this->assertFalse(strpos($response->body, '<s:exception>Exception</s:exception>'), 'Exception occurred: ' . $response->body); - $this->assertFalse(strpos($response->body, 'Unknown or bad format'), 'DateTime unknown format Exception: ' . $response->body); - - // Everts super awesome xml parser. - $body = substr( - $response->body, - $start = strpos($response->body, 'BEGIN:VCALENDAR'), - strpos($response->body, 'END:VCALENDAR') - $start + 13 - ); - $body = str_replace('&#13;', '', $body); - - $vObject = VObject\Reader::read($body); - - $this->assertEquals(1, count($vObject->VEVENT)); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php deleted file mode 100644 index 950629fd813..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue211Test.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; - -/** - * This unittest is created to check for an endless loop in Sabre\CalDAV\CalendarQueryValidator - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Issue211Test extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:20120418T172519CEST-3510gh1hVw -DTSTAMP:20120418T152519Z -DTSTART;VALUE=DATE:20120330 -DTEND;VALUE=DATE:20120531 -EXDATE;TZID=Europe/Berlin:20120330T000000 -RRULE:FREQ=YEARLY;INTERVAL=1 -SEQUENCE:1 -SUMMARY:Birthday -TRANSP:TRANSPARENT -BEGIN:VALARM -ACTION:EMAIL -ATTENDEE:MAILTO:xxx@domain.de -DESCRIPTION:Dies ist eine Kalender Erinnerung -SUMMARY:Kalender Alarm Erinnerung -TRIGGER;VALUE=DATE-TIME:20120329T060000Z -END:VALARM -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testIssue211() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data/> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:comp-filter name="VALARM"> - <C:time-range start="20120426T220000Z" end="20120427T215959Z"/> - </C:comp-filter> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // if this assert is reached, the endless loop is gone - // There should be no matching events - $this->assertFalse(strpos('BEGIN:VEVENT', $response->body)); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php deleted file mode 100644 index c3c0b5b48a8..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue220Test.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; - -/** - * This unittest is created to check for an endless loop in CalendarQueryValidator - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Issue220Test extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -DTSTART;TZID=Europe/Berlin:20120601T180000 -SUMMARY:Brot backen -RRULE:FREQ=DAILY;INTERVAL=1;WKST=MO -TRANSP:OPAQUE -DURATION:PT20M -LAST-MODIFIED:20120601T064634Z -CREATED:20120601T064634Z -DTSTAMP:20120601T064634Z -UID:b64f14c5-dccc-4eda-947f-bdb1f763fbcd -BEGIN:VALARM -TRIGGER;VALUE=DURATION:-PT5M -ACTION:DISPLAY -DESCRIPTION:Default Event Notification -X-WR-ALARMUID:cd952c1b-b3d6-41fb-b0a6-ec3a1a5bdd58 -END:VALARM -END:VEVENT -BEGIN:VEVENT -DTSTART;TZID=Europe/Berlin:20120606T180000 -SUMMARY:Brot backen -TRANSP:OPAQUE -STATUS:CANCELLED -DTEND;TZID=Europe/Berlin:20120606T182000 -LAST-MODIFIED:20120605T094310Z -SEQUENCE:1 -RECURRENCE-ID:20120606T160000Z -UID:b64f14c5-dccc-4eda-947f-bdb1f763fbcd -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testIssue220() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data/> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:comp-filter name="VALARM"> - <C:time-range start="20120607T161646Z" end="20120612T161646Z"/> - </C:comp-filter> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - $this->assertFalse(strpos($response->body, '<s:exception>PHPUnit_Framework_Error_Warning</s:exception>'), 'Error Warning occurred: ' . $response->body); - $this->assertFalse(strpos($response->body, 'Invalid argument supplied for foreach()'), 'Invalid argument supplied for foreach(): ' . $response->body); - - $this->assertEquals(207, $response->status); - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php deleted file mode 100644 index d0783701de9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Issue228Test.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP; - -/** - * This unittest is created to check if the time-range filter is working correctly with all-day-events - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Issue228Test extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - - protected $caldavCalendars = [ - [ - 'id' => 1, - 'name' => 'Calendar', - 'principaluri' => 'principals/user1', - 'uri' => 'calendar1', - ] - ]; - - protected $caldavCalendarObjects = [ - 1 => [ - 'event.ics' => [ - 'calendardata' => 'BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:20120730T113415CEST-6804EGphkd@xxxxxx.de -DTSTAMP:20120730T093415Z -DTSTART;VALUE=DATE:20120729 -DTEND;VALUE=DATE:20120730 -SUMMARY:sunday event -TRANSP:TRANSPARENT -END:VEVENT -END:VCALENDAR -', - ], - ], - ]; - - function testIssue228() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'REQUEST_URI' => '/calendars/user1/calendar1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody('<?xml version="1.0" encoding="utf-8" ?> -<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:prop> - <C:calendar-data> - <C:expand start="20120730T095609Z" - end="20120813T095609Z"/> -</C:calendar-data> - <D:getetag/> - </D:prop> - <C:filter> - <C:comp-filter name="VCALENDAR"> - <C:comp-filter name="VEVENT"> - <C:time-range start="20120730T095609Z" end="20120813T095609Z"/> - </C:comp-filter> - </C:comp-filter> - </C:filter> -</C:calendar-query>'); - - $response = $this->request($request); - - // We must check if absolutely nothing was returned from this query. - $this->assertFalse(strpos($response->body, 'BEGIN:VCALENDAR')); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/JCalTransformTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/JCalTransformTest.php deleted file mode 100644 index f1eed177597..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/JCalTransformTest.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\HTTP\Request; -use Sabre\VObject; - -class JCalTransformTest extends \Sabre\DAVServerTest { - - use VObject\PHPUnitAssertions; - - protected $setupCalDAV = true; - protected $caldavCalendars = [ - [ - 'id' => 1, - 'principaluri' => 'principals/user1', - 'uri' => 'foo', - ] - ]; - protected $caldavCalendarObjects = [ - 1 => [ - 'bar.ics' => [ - 'uri' => 'bar.ics', - 'calendarid' => 1, - 'calendardata' => "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", - 'lastmodified' => null - ] - ], - ]; - - function testGet() { - - $headers = [ - 'Accept' => 'application/calendar+json', - ]; - $request = new Request('GET', '/calendars/user1/foo/bar.ics', $headers); - - $response = $this->request($request); - - $body = $response->getBodyAsString(); - $this->assertEquals(200, $response->getStatus(), "Incorrect status code: " . $body); - - $response = json_decode($body, true); - if (json_last_error() !== JSON_ERROR_NONE) { - $this->fail('Json decoding error: ' . json_last_error_msg()); - } - $this->assertEquals( - [ - 'vcalendar', - [], - [ - [ - 'vevent', - [], - [], - ], - ], - ], - $response - ); - - } - - function testMultiGet() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:"> - <d:prop> - <c:calendar-data content-type="application/calendar+json" /> - </d:prop> - <d:href>/calendars/user1/foo/bar.ics</d:href> -</c:calendar-multiget> -XML; - - $headers = []; - $request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml); - - $response = $this->request($request); - - $this->assertEquals(207, $response->getStatus(), 'Full rsponse: ' . $response->getBodyAsString()); - - $multiStatus = $this->server->xml->parse( - $response->getBodyAsString() - ); - - $responses = $multiStatus->getResponses(); - $this->assertEquals(1, count($responses)); - - $response = $responses[0]->getResponseProperties()[200]["{urn:ietf:params:xml:ns:caldav}calendar-data"]; - - $jresponse = json_decode($response, true); - if (json_last_error()) { - $this->fail('Json decoding error: ' . json_last_error_msg() . '. Full response: ' . $response); - } - $this->assertEquals( - [ - 'vcalendar', - [], - [ - [ - 'vevent', - [], - [], - ], - ], - ], - $jresponse - ); - - } - - function testCalendarQueryDepth1() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:"> - <d:prop> - <c:calendar-data content-type="application/calendar+json" /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $headers = [ - 'Depth' => '1', - ]; - $request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml); - - $response = $this->request($request); - - $this->assertEquals(207, $response->getStatus(), "Invalid response code. Full body: " . $response->getBodyAsString()); - - $multiStatus = $this->server->xml->parse( - $response->getBodyAsString() - ); - - $responses = $multiStatus->getResponses(); - - $this->assertEquals(1, count($responses)); - - $response = $responses[0]->getResponseProperties()[200]["{urn:ietf:params:xml:ns:caldav}calendar-data"]; - $response = json_decode($response, true); - if (json_last_error()) { - $this->fail('Json decoding error: ' . json_last_error_msg()); - } - $this->assertEquals( - [ - 'vcalendar', - [], - [ - [ - 'vevent', - [], - [], - ], - ], - ], - $response - ); - - } - - function testCalendarQueryDepth0() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:"> - <d:prop> - <c:calendar-data content-type="application/calendar+json" /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $headers = [ - 'Depth' => '0', - ]; - $request = new Request('REPORT', '/calendars/user1/foo/bar.ics', $headers, $xml); - - $response = $this->request($request); - - $this->assertEquals(207, $response->getStatus(), "Invalid response code. Full body: " . $response->getBodyAsString()); - - $multiStatus = $this->server->xml->parse( - $response->getBodyAsString() - ); - - $responses = $multiStatus->getResponses(); - - $this->assertEquals(1, count($responses)); - - $response = $responses[0]->getResponseProperties()[200]["{urn:ietf:params:xml:ns:caldav}calendar-data"]; - $response = json_decode($response, true); - if (json_last_error()) { - $this->fail('Json decoding error: ' . json_last_error_msg()); - } - $this->assertEquals( - [ - 'vcalendar', - [], - [ - [ - 'vevent', - [], - [], - ], - ], - ], - $response - ); - - } - - function testValidateICalendar() { - - $input = [ - 'vcalendar', - [], - [ - [ - 'vevent', - [ - ['uid', (object)[], 'text', 'foo'], - ['dtstart', (object)[], 'date', '2016-04-06'], - ], - [], - ], - ], - ]; - $input = json_encode($input); - $this->caldavPlugin->beforeWriteContent( - 'calendars/user1/foo/bar.ics', - $this->server->tree->getNodeForPath('calendars/user1/foo/bar.ics'), - $input, - $modified - ); - - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART;VALUE=DATE:20160406 -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $input - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php deleted file mode 100644 index 6585f85c379..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/CollectionTest.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Notifications; - -use Sabre\CalDAV; - -class CollectionTest extends \PHPUnit_Framework_TestCase { - - protected $caldavBackend; - protected $principalUri; - protected $notification; - - function getInstance() { - - $this->principalUri = 'principals/user1'; - - $this->notification = new CalDAV\Xml\Notification\SystemStatus(1, '"1"'); - - $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [ - 'principals/user1' => [ - $this->notification - ] - ]); - - return new Collection($this->caldavBackend, $this->principalUri); - - } - - function testGetChildren() { - - $col = $this->getInstance(); - $this->assertEquals('notifications', $col->getName()); - - $this->assertEquals([ - new Node($this->caldavBackend, $this->principalUri, $this->notification) - ], $col->getChildren()); - - } - - function testGetOwner() { - - $col = $this->getInstance(); - $this->assertEquals('principals/user1', $col->getOwner()); - - } - - function testGetGroup() { - - $col = $this->getInstance(); - $this->assertNull($col->getGroup()); - - } - - function testGetACL() { - - $col = $this->getInstance(); - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - ]; - - $this->assertEquals($expected, $col->getACL()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $col = $this->getInstance(); - $col->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $col = $this->getInstance(); - $this->assertNull($col->getSupportedPrivilegeSet()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php deleted file mode 100644 index 6c6e02da81a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/NodeTest.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Notifications; - -use Sabre\CalDAV; - -class NodeTest extends \PHPUnit_Framework_TestCase { - - protected $systemStatus; - protected $caldavBackend; - - function getInstance() { - - $principalUri = 'principals/user1'; - - $this->systemStatus = new CalDAV\Xml\Notification\SystemStatus(1, '"1"'); - - $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [ - 'principals/user1' => [ - $this->systemStatus - ] - ]); - - $node = new Node($this->caldavBackend, 'principals/user1', $this->systemStatus); - return $node; - - } - - function testGetId() { - - $node = $this->getInstance(); - $this->assertEquals($this->systemStatus->getId() . '.xml', $node->getName()); - - } - - function testGetEtag() { - - $node = $this->getInstance(); - $this->assertEquals('"1"', $node->getETag()); - - } - - function testGetNotificationType() { - - $node = $this->getInstance(); - $this->assertEquals($this->systemStatus, $node->getNotificationType()); - - } - - function testDelete() { - - $node = $this->getInstance(); - $node->delete(); - $this->assertEquals([], $this->caldavBackend->getNotificationsForPrincipal('principals/user1')); - - } - - function testGetGroup() { - - $node = $this->getInstance(); - $this->assertNull($node->getGroup()); - - } - - function testGetACL() { - - $node = $this->getInstance(); - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - ]; - - $this->assertEquals($expected, $node->getACL()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $node = $this->getInstance(); - $node->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $node = $this->getInstance(); - $this->assertNull($node->getSupportedPrivilegeSet()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/PluginTest.php deleted file mode 100644 index 73f256c98e7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Notifications/PluginTest.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Notifications; - -use Sabre\CalDAV; -use Sabre\CalDAV\Xml\Notification\SystemStatus; -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; -use Sabre\HTTP\Request; - -class PluginTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\DAV\Server - */ - protected $server; - /** - * @var Sabre\CalDAV\Plugin - */ - protected $plugin; - protected $response; - /** - * @var Sabre\CalDAV\Backend\PDO - */ - protected $caldavBackend; - - function setup() { - - $this->caldavBackend = new CalDAV\Backend\MockSharing(); - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - $calendars = new CalDAV\CalendarRoot($principalBackend, $this->caldavBackend); - $principals = new CalDAV\Principal\Collection($principalBackend); - - $root = new DAV\SimpleCollection('root'); - $root->addChild($calendars); - $root->addChild($principals); - - $this->server = new DAV\Server($root); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->debugExceptions = true; - $this->server->setBaseUri('/'); - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - - // Adding ACL plugin - $aclPlugin = new DAVACL\Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $this->server->addPlugin($aclPlugin); - - // CalDAV is also required. - $this->server->addPlugin(new CalDAV\Plugin()); - // Adding Auth plugin, and ensuring that we are logged in. - $authBackend = new DAV\Auth\Backend\Mock(); - $authPlugin = new DAV\Auth\Plugin($authBackend); - $this->server->addPlugin($authPlugin); - - // This forces a login - $authPlugin->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $this->response = new HTTP\ResponseMock(); - $this->server->httpResponse = $this->response; - - } - - function testSimple() { - - $this->assertEquals([], $this->plugin->getFeatures()); - $this->assertEquals('notifications', $this->plugin->getPluginName()); - $this->assertEquals( - 'notifications', - $this->plugin->getPluginInfo()['name'] - ); - - } - - function testPrincipalProperties() { - - $httpRequest = new Request('GET', '/', ['Host' => 'sabredav.org']); - $this->server->httpRequest = $httpRequest; - - $props = $this->server->getPropertiesForPath('principals/admin', [ - '{' . Plugin::NS_CALENDARSERVER . '}notification-URL', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - - $this->assertArrayHasKey('{' . Plugin::NS_CALENDARSERVER . '}notification-URL', $props[0][200]); - $prop = $props[0][200]['{' . Plugin::NS_CALENDARSERVER . '}notification-URL']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals('calendars/admin/notifications/', $prop->getHref()); - - } - - function testNotificationProperties() { - - $notification = new Node( - $this->caldavBackend, - 'principals/user1', - new SystemStatus('foo', '"1"') - ); - $propFind = new DAV\PropFind('calendars/user1/notifications', [ - '{' . Plugin::NS_CALENDARSERVER . '}notificationtype', - ]); - - $this->plugin->propFind($propFind, $notification); - - $this->assertEquals( - $notification->getNotificationType(), - $propFind->get('{' . Plugin::NS_CALENDARSERVER . '}notificationtype') - ); - - } - - function testNotificationGet() { - - $notification = new Node( - $this->caldavBackend, - 'principals/user1', - new SystemStatus('foo', '"1"') - ); - - $server = new DAV\Server([$notification]); - $caldav = new Plugin(); - - $server->httpRequest = new Request('GET', '/foo.xml'); - $httpResponse = new HTTP\ResponseMock(); - $server->httpResponse = $httpResponse; - - $server->addPlugin($caldav); - - $caldav->httpGet($server->httpRequest, $server->httpResponse); - - $this->assertEquals(200, $httpResponse->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - 'ETag' => ['"1"'], - ], $httpResponse->getHeaders()); - - $expected = -'<?xml version="1.0" encoding="UTF-8"?> -<cs:notification xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cs="http://calendarserver.org/ns/"> - <cs:systemstatus type="high"/> -</cs:notification> -'; - - $this->assertXmlStringEqualsXmlString($expected, $httpResponse->getBodyAsString()); - - } - - function testGETPassthrough() { - - $server = new DAV\Server(); - $caldav = new Plugin(); - - $httpResponse = new HTTP\ResponseMock(); - $server->httpResponse = $httpResponse; - - $server->addPlugin($caldav); - - $this->assertNull($caldav->httpGet(new HTTP\Request('GET', '/foozz'), $server->httpResponse)); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/PluginTest.php deleted file mode 100644 index 859f6aa0c4e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/PluginTest.php +++ /dev/null @@ -1,1086 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use DateTime; -use DateTimeZone; -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; - -class PluginTest extends \PHPUnit_Framework_TestCase { - - /** - * @var DAV\Server - */ - protected $server; - /** - * @var Plugin - */ - protected $plugin; - protected $response; - /** - * @var Backend\PDO - */ - protected $caldavBackend; - - function setup() { - - $caldavNS = '{urn:ietf:params:xml:ns:caldav}'; - - $this->caldavBackend = new Backend\Mock([ - [ - 'id' => 1, - 'uri' => 'UUID-123467', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'user1 calendar', - $caldavNS . 'calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', - $caldavNS . 'supported-calendar-component-set' => new Xml\Property\SupportedCalendarComponentSet(['VEVENT', 'VTODO']), - ], - [ - 'id' => 2, - 'uri' => 'UUID-123468', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'user1 calendar2', - $caldavNS . 'calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', - $caldavNS . 'supported-calendar-component-set' => new Xml\Property\SupportedCalendarComponentSet(['VEVENT', 'VTODO']), - ] - ], [ - 1 => [ - 'UUID-2345' => [ - 'calendardata' => TestUtil::getTestCalendarData(), - ] - ] - ]); - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - $principalBackend->setGroupMemberSet('principals/admin/calendar-proxy-read', ['principals/user1']); - $principalBackend->setGroupMemberSet('principals/admin/calendar-proxy-write', ['principals/user1']); - $principalBackend->addPrincipal([ - 'uri' => 'principals/admin/calendar-proxy-read', - ]); - $principalBackend->addPrincipal([ - 'uri' => 'principals/admin/calendar-proxy-write', - ]); - - $calendars = new CalendarRoot($principalBackend, $this->caldavBackend); - $principals = new Principal\Collection($principalBackend); - - $root = new DAV\SimpleCollection('root'); - $root->addChild($calendars); - $root->addChild($principals); - - $this->server = new DAV\Server($root); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->debugExceptions = true; - $this->server->setBaseUri('/'); - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - // Adding ACL plugin - $aclPlugin = new DAVACL\Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $this->server->addPlugin($aclPlugin); - - // Adding Auth plugin, and ensuring that we are logged in. - $authBackend = new DAV\Auth\Backend\Mock(); - $authBackend->setPrincipal('principals/user1'); - $authPlugin = new DAV\Auth\Plugin($authBackend); - $authPlugin->beforeMethod(new \Sabre\HTTP\Request(), new \Sabre\HTTP\Response()); - $this->server->addPlugin($authPlugin); - - // This forces a login - $authPlugin->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $this->response = new HTTP\ResponseMock(); - $this->server->httpResponse = $this->response; - - } - - function testSimple() { - - $this->assertEquals(['MKCALENDAR'], $this->plugin->getHTTPMethods('calendars/user1/randomnewcalendar')); - $this->assertEquals(['calendar-access', 'calendar-proxy'], $this->plugin->getFeatures()); - $this->assertEquals( - 'caldav', - $this->plugin->getPluginInfo()['name'] - ); - - } - - function testUnknownMethodPassThrough() { - - $request = new HTTP\Request('MKBREAKFAST', '/'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(501, $this->response->status, 'Incorrect status returned. Full response body:' . $this->response->body); - - } - - function testReportPassThrough() { - - $request = new HTTP\Request('REPORT', '/', ['Content-Type' => 'application/xml']); - $request->setBody('<?xml version="1.0"?><s:somereport xmlns:s="http://www.rooftopsolutions.nl/NS/example" />'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(415, $this->response->status); - - } - - function testMkCalendarBadLocation() { - - $request = new HTTP\Request('MKCALENDAR', '/blabla'); - - $body = '<?xml version="1.0" encoding="utf-8" ?> - <C:mkcalendar xmlns:D="DAV:" - xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:set> - <D:prop> - <D:displayname>Lisa\'s Events</D:displayname> - <C:calendar-description xml:lang="en" - >Calendar restricted to events.</C:calendar-description> - <C:supported-calendar-component-set> - <C:comp name="VEVENT"/> - </C:supported-calendar-component-set> - <C:calendar-timezone><![CDATA[BEGIN:VCALENDAR - PRODID:-//Example Corp.//CalDAV Client//EN - VERSION:2.0 - BEGIN:VTIMEZONE - TZID:US-Eastern - LAST-MODIFIED:19870101T000000Z - BEGIN:STANDARD - DTSTART:19671029T020000 - RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 - TZOFFSETFROM:-0400 - TZOFFSETTO:-0500 - TZNAME:Eastern Standard Time (US & Canada) - END:STANDARD - BEGIN:DAYLIGHT - DTSTART:19870405T020000 - RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 - TZOFFSETFROM:-0500 - TZOFFSETTO:-0400 - TZNAME:Eastern Daylight Time (US & Canada) - END:DAYLIGHT - END:VTIMEZONE - END:VCALENDAR - ]]></C:calendar-timezone> - </D:prop> - </D:set> - </C:mkcalendar>'; - - $request->setBody($body); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(403, $this->response->status); - - } - - function testMkCalendarNoParentNode() { - - $request = new HTTP\Request('MKCALENDAR', '/doesntexist/calendar'); - - $body = '<?xml version="1.0" encoding="utf-8" ?> - <C:mkcalendar xmlns:D="DAV:" - xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:set> - <D:prop> - <D:displayname>Lisa\'s Events</D:displayname> - <C:calendar-description xml:lang="en" - >Calendar restricted to events.</C:calendar-description> - <C:supported-calendar-component-set> - <C:comp name="VEVENT"/> - </C:supported-calendar-component-set> - <C:calendar-timezone><![CDATA[BEGIN:VCALENDAR - PRODID:-//Example Corp.//CalDAV Client//EN - VERSION:2.0 - BEGIN:VTIMEZONE - TZID:US-Eastern - LAST-MODIFIED:19870101T000000Z - BEGIN:STANDARD - DTSTART:19671029T020000 - RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 - TZOFFSETFROM:-0400 - TZOFFSETTO:-0500 - TZNAME:Eastern Standard Time (US & Canada) - END:STANDARD - BEGIN:DAYLIGHT - DTSTART:19870405T020000 - RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 - TZOFFSETFROM:-0500 - TZOFFSETTO:-0400 - TZNAME:Eastern Daylight Time (US & Canada) - END:DAYLIGHT - END:VTIMEZONE - END:VCALENDAR - ]]></C:calendar-timezone> - </D:prop> - </D:set> - </C:mkcalendar>'; - - $request->setBody($body); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(409, $this->response->status); - - } - - function testMkCalendarExistingCalendar() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'MKCALENDAR', - 'REQUEST_URI' => '/calendars/user1/UUID-123467', - ]); - - $body = '<?xml version="1.0" encoding="utf-8" ?> - <C:mkcalendar xmlns:D="DAV:" - xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:set> - <D:prop> - <D:displayname>Lisa\'s Events</D:displayname> - <C:calendar-description xml:lang="en" - >Calendar restricted to events.</C:calendar-description> - <C:supported-calendar-component-set> - <C:comp name="VEVENT"/> - </C:supported-calendar-component-set> - <C:calendar-timezone><![CDATA[BEGIN:VCALENDAR - PRODID:-//Example Corp.//CalDAV Client//EN - VERSION:2.0 - BEGIN:VTIMEZONE - TZID:US-Eastern - LAST-MODIFIED:19870101T000000Z - BEGIN:STANDARD - DTSTART:19671029T020000 - RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 - TZOFFSETFROM:-0400 - TZOFFSETTO:-0500 - TZNAME:Eastern Standard Time (US & Canada) - END:STANDARD - BEGIN:DAYLIGHT - DTSTART:19870405T020000 - RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 - TZOFFSETFROM:-0500 - TZOFFSETTO:-0400 - TZNAME:Eastern Daylight Time (US & Canada) - END:DAYLIGHT - END:VTIMEZONE - END:VCALENDAR - ]]></C:calendar-timezone> - </D:prop> - </D:set> - </C:mkcalendar>'; - - $request->setBody($body); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(405, $this->response->status); - - } - - function testMkCalendarSucceed() { - - $request = new HTTP\Request('MKCALENDAR', '/calendars/user1/NEWCALENDAR'); - - $timezone = 'BEGIN:VCALENDAR -PRODID:-//Example Corp.//CalDAV Client//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:US-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:Eastern Standard Time (US & Canada) -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:Eastern Daylight Time (US & Canada) -END:DAYLIGHT -END:VTIMEZONE -END:VCALENDAR'; - - $body = '<?xml version="1.0" encoding="utf-8" ?> - <C:mkcalendar xmlns:D="DAV:" - xmlns:C="urn:ietf:params:xml:ns:caldav"> - <D:set> - <D:prop> - <D:displayname>Lisa\'s Events</D:displayname> - <C:calendar-description xml:lang="en" - >Calendar restricted to events.</C:calendar-description> - <C:supported-calendar-component-set> - <C:comp name="VEVENT"/> - </C:supported-calendar-component-set> - <C:calendar-timezone><![CDATA[' . $timezone . ']]></C:calendar-timezone> - </D:prop> - </D:set> - </C:mkcalendar>'; - - $request->setBody($body); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: ' . $this->response->body); - - $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1'); - $this->assertEquals(3, count($calendars)); - - $newCalendar = null; - foreach ($calendars as $calendar) { - if ($calendar['uri'] === 'NEWCALENDAR') { - $newCalendar = $calendar; - break; - } - } - - $this->assertInternalType('array', $newCalendar); - - $keys = [ - 'uri' => 'NEWCALENDAR', - 'id' => null, - '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar restricted to events.', - '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => $timezone, - '{DAV:}displayname' => 'Lisa\'s Events', - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => null, - ]; - - foreach ($keys as $key => $value) { - - $this->assertArrayHasKey($key, $newCalendar); - - if (is_null($value)) continue; - $this->assertEquals($value, $newCalendar[$key]); - - } - $sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'; - $this->assertTrue($newCalendar[$sccs] instanceof Xml\Property\SupportedCalendarComponentSet); - $this->assertEquals(['VEVENT'], $newCalendar[$sccs]->getValue()); - - } - - function testMkCalendarEmptyBodySucceed() { - - $request = new HTTP\Request('MKCALENDAR', '/calendars/user1/NEWCALENDAR'); - - $request->setBody(''); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(201, $this->response->status, 'Invalid response code received. Full response body: ' . $this->response->body); - - $calendars = $this->caldavBackend->getCalendarsForUser('principals/user1'); - $this->assertEquals(3, count($calendars)); - - $newCalendar = null; - foreach ($calendars as $calendar) { - if ($calendar['uri'] === 'NEWCALENDAR') { - $newCalendar = $calendar; - break; - } - } - - $this->assertInternalType('array', $newCalendar); - - $keys = [ - 'uri' => 'NEWCALENDAR', - 'id' => null, - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => null, - ]; - - foreach ($keys as $key => $value) { - - $this->assertArrayHasKey($key, $newCalendar); - - if (is_null($value)) continue; - $this->assertEquals($value, $newCalendar[$key]); - - } - $sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'; - $this->assertTrue($newCalendar[$sccs] instanceof Xml\Property\SupportedCalendarComponentSet); - $this->assertEquals(['VEVENT', 'VTODO'], $newCalendar[$sccs]->getValue()); - - } - - function testMkCalendarBadXml() { - - $request = new HTTP\Request('MKCALENDAR', '/blabla'); - $body = 'This is not xml'; - - $request->setBody($body); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status); - - } - - function testPrincipalProperties() { - - $httpRequest = new HTTP\Request('FOO', '/blabla', ['Host' => 'sabredav.org']); - $this->server->httpRequest = $httpRequest; - - $props = $this->server->getPropertiesForPath('/principals/user1', [ - '{' . Plugin::NS_CALDAV . '}calendar-home-set', - '{' . Plugin::NS_CALENDARSERVER . '}calendar-proxy-read-for', - '{' . Plugin::NS_CALENDARSERVER . '}calendar-proxy-write-for', - '{' . Plugin::NS_CALENDARSERVER . '}notification-URL', - '{' . Plugin::NS_CALENDARSERVER . '}email-address-set', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-home-set', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-home-set']; - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop); - $this->assertEquals('calendars/user1/', $prop->getHref()); - - $this->assertArrayHasKey('{http://calendarserver.org/ns/}calendar-proxy-read-for', $props[0][200]); - $prop = $props[0][200]['{http://calendarserver.org/ns/}calendar-proxy-read-for']; - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop); - $this->assertEquals(['principals/admin/'], $prop->getHrefs()); - - $this->assertArrayHasKey('{http://calendarserver.org/ns/}calendar-proxy-write-for', $props[0][200]); - $prop = $props[0][200]['{http://calendarserver.org/ns/}calendar-proxy-write-for']; - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $prop); - $this->assertEquals(['principals/admin/'], $prop->getHrefs()); - - $this->assertArrayHasKey('{' . Plugin::NS_CALENDARSERVER . '}email-address-set', $props[0][200]); - $prop = $props[0][200]['{' . Plugin::NS_CALENDARSERVER . '}email-address-set']; - $this->assertInstanceOf('Sabre\\CalDAV\\Xml\\Property\\EmailAddressSet', $prop); - $this->assertEquals(['user1.sabredav@sabredav.org'], $prop->getValue()); - - } - - function testSupportedReportSetPropertyNonCalendar() { - - $props = $this->server->getPropertiesForPath('/calendars/user1', [ - '{DAV:}supported-report-set', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - $this->assertArrayHasKey('{DAV:}supported-report-set', $props[0][200]); - - $prop = $props[0][200]['{DAV:}supported-report-set']; - - $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop); - $value = [ - '{DAV:}expand-property', - '{DAV:}principal-match', - '{DAV:}principal-property-search', - '{DAV:}principal-search-property-set', - ]; - $this->assertEquals($value, $prop->getValue()); - - } - - /** - * @depends testSupportedReportSetPropertyNonCalendar - */ - function testSupportedReportSetProperty() { - - $props = $this->server->getPropertiesForPath('/calendars/user1/UUID-123467', [ - '{DAV:}supported-report-set', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - $this->assertArrayHasKey('{DAV:}supported-report-set', $props[0][200]); - - $prop = $props[0][200]['{DAV:}supported-report-set']; - - $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop); - $value = [ - '{urn:ietf:params:xml:ns:caldav}calendar-multiget', - '{urn:ietf:params:xml:ns:caldav}calendar-query', - '{urn:ietf:params:xml:ns:caldav}free-busy-query', - '{DAV:}expand-property', - '{DAV:}principal-match', - '{DAV:}principal-property-search', - '{DAV:}principal-search-property-set' - ]; - $this->assertEquals($value, $prop->getValue()); - - } - - function testSupportedReportSetUserCalendars() { - - $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin()); - - $props = $this->server->getPropertiesForPath('/calendars/user1', [ - '{DAV:}supported-report-set', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - $this->assertArrayHasKey('{DAV:}supported-report-set', $props[0][200]); - - $prop = $props[0][200]['{DAV:}supported-report-set']; - - $this->assertInstanceOf('\\Sabre\\DAV\\Xml\\Property\\SupportedReportSet', $prop); - $value = [ - '{DAV:}sync-collection', - '{DAV:}expand-property', - '{DAV:}principal-match', - '{DAV:}principal-property-search', - '{DAV:}principal-search-property-set', - ]; - $this->assertEquals($value, $prop->getValue()); - - } - - /** - * @depends testSupportedReportSetProperty - */ - function testCalendarMultiGetReport() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data />' . - ' <d:getetag />' . - '</d:prop>' . - '<d:href>/calendars/user1/UUID-123467/UUID-2345</d:href>' . - '</c:calendar-multiget>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Invalid HTTP status received. Full response body'); - - $expectedIcal = TestUtil::getTestCalendarData(); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <cal:calendar-data>$expectedIcal</cal:calendar-data> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testCalendarMultiGetReport - */ - function testCalendarMultiGetReportExpand() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20110101T000000Z" end="20111231T235959Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<d:href>/calendars/user1/UUID-123467/UUID-2345</d:href>' . - '</c:calendar-multiget>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Invalid HTTP status received. Full response body: ' . $this->response->body); - - $expectedIcal = TestUtil::getTestCalendarData(); - $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); - $expectedIcal = $expectedIcal->expand( - new DateTime('2011-01-01 00:00:00', new DateTimeZone('UTC')), - new DateTime('2011-12-31 23:59:59', new DateTimeZone('UTC')) - ); - $expectedIcal = str_replace("\r\n", "&#xD;\n", $expectedIcal->serialize()); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <cal:calendar-data>$expectedIcal</cal:calendar-data> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testSupportedReportSetProperty - * @depends testCalendarMultiGetReport - */ - function testCalendarQueryReport() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20000101T000000Z" end="20101231T235959Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - $expectedIcal = TestUtil::getTestCalendarData(); - $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); - $expectedIcal = $expectedIcal->expand( - new DateTime('2000-01-01 00:00:00', new DateTimeZone('UTC')), - new DateTime('2010-12-31 23:59:59', new DateTimeZone('UTC')) - ); - $expectedIcal = str_replace("\r\n", "&#xD;\n", $expectedIcal->serialize()); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <cal:calendar-data>$expectedIcal</cal:calendar-data> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testSupportedReportSetProperty - * @depends testCalendarMultiGetReport - */ - function testCalendarQueryReportWindowsPhone() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20000101T000000Z" end="20101231T235959Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467', [ - 'Depth' => '0', - 'User-Agent' => 'MSFT-WP/8.10.14219 (gzip)', - ]); - - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - $expectedIcal = TestUtil::getTestCalendarData(); - $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); - $expectedIcal = $expectedIcal->expand( - new DateTime('2000-01-01 00:00:00', new DateTimeZone('UTC')), - new DateTime('2010-12-31 23:59:59', new DateTimeZone('UTC')) - ); - $expectedIcal = str_replace("\r\n", "&#xD;\n", $expectedIcal->serialize()); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <cal:calendar-data>$expectedIcal</cal:calendar-data> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testSupportedReportSetProperty - * @depends testCalendarMultiGetReport - */ - function testCalendarQueryReportBadDepth() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20000101T000000Z" end="20101231T235959Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467', [ - 'Depth' => '0', - ]); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - } - - /** - * @depends testCalendarQueryReport - */ - function testCalendarQueryReportNoCalData() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467', [ - 'Depth' => '1', - ]); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testCalendarQueryReport - */ - function testCalendarQueryReportNoFilters() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data />' . - ' <d:getetag />' . - '</d:prop>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467'); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - } - - /** - * @depends testSupportedReportSetProperty - * @depends testCalendarMultiGetReport - */ - function testCalendarQueryReport1Object() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20000101T000000Z" end="20101231T235959Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467/UUID-2345', ['Depth' => '0']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - $expectedIcal = TestUtil::getTestCalendarData(); - $expectedIcal = \Sabre\VObject\Reader::read($expectedIcal); - $expectedIcal = $expectedIcal->expand( - new DateTime('2000-01-01 00:00:00', new DateTimeZone('UTC')), - new DateTime('2010-12-31 23:59:59', new DateTimeZone('UTC')) - ); - $expectedIcal = str_replace("\r\n", "&#xD;\n", $expectedIcal->serialize()); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <cal:calendar-data>$expectedIcal</cal:calendar-data> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - /** - * @depends testSupportedReportSetProperty - * @depends testCalendarMultiGetReport - */ - function testCalendarQueryReport1ObjectNoCalData() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <d:getetag />' . - '</d:prop>' . - '<c:filter>' . - ' <c:comp-filter name="VCALENDAR">' . - ' <c:comp-filter name="VEVENT" />' . - ' </c:comp-filter>' . - '</c:filter>' . - '</c:calendar-query>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1/UUID-123467/UUID-2345', ['Depth' => '0']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Received an unexpected status. Full response body: ' . $this->response->body); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:response> - <d:href>/calendars/user1/UUID-123467/UUID-2345</d:href> - <d:propstat> - <d:prop> - <d:getetag>"e207e33c10e5fb9c12cfb35b5d9116e1"</d:getetag> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $this->response->getBodyAsString()); - - } - - function testHTMLActionsPanel() { - - $output = ''; - $r = $this->server->emit('onHTMLActionsPanel', [$this->server->tree->getNodeForPath('calendars/user1'), &$output]); - $this->assertFalse($r); - - $this->assertTrue(!!strpos($output, 'Display name')); - - } - - /** - * @depends testCalendarMultiGetReport - */ - function testCalendarMultiGetReportNoEnd() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20110101T000000Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<d:href>/calendars/user1/UUID-123467/UUID-2345</d:href>' . - '</c:calendar-multiget>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testCalendarMultiGetReport - */ - function testCalendarMultiGetReportNoStart() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand end="20110101T000000Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<d:href>/calendars/user1/UUID-123467/UUID-2345</d:href>' . - '</c:calendar-multiget>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testCalendarMultiGetReport - */ - function testCalendarMultiGetReportEndBeforeStart() { - - $body = - '<?xml version="1.0"?>' . - '<c:calendar-multiget xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">' . - '<d:prop>' . - ' <c:calendar-data>' . - ' <c:expand start="20200101T000000Z" end="20110101T000000Z" />' . - ' </c:calendar-data>' . - ' <d:getetag />' . - '</d:prop>' . - '<d:href>/calendars/user1/UUID-123467/UUID-2345</d:href>' . - '</c:calendar-multiget>'; - - $request = new HTTP\Request('REPORT', '/calendars/user1', ['Depth' => '1']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(400, $this->response->status, 'Invalid HTTP status received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testSupportedReportSetPropertyNonCalendar - */ - function testCalendarProperties() { - - $ns = '{urn:ietf:params:xml:ns:caldav}'; - $props = $this->server->getProperties('calendars/user1/UUID-123467', [ - $ns . 'max-resource-size', - $ns . 'supported-calendar-data', - $ns . 'supported-collation-set', - ]); - - $this->assertEquals([ - $ns . 'max-resource-size' => 10000000, - $ns . 'supported-calendar-data' => new Xml\Property\SupportedCalendarData(), - $ns . 'supported-collation-set' => new Xml\Property\SupportedCollationSet(), - ], $props); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/CollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/CollectionTest.php deleted file mode 100644 index 23c2488257f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/CollectionTest.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Principal; - -use Sabre\DAVACL; - -class CollectionTest extends \PHPUnit_Framework_TestCase { - - function testGetChildForPrincipal() { - - $back = new DAVACL\PrincipalBackend\Mock(); - $col = new Collection($back); - $r = $col->getChildForPrincipal([ - 'uri' => 'principals/admin', - ]); - $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\User', $r); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyReadTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyReadTest.php deleted file mode 100644 index fe07f013108..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyReadTest.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Principal; - -use Sabre\DAVACL; - -class ProxyReadTest extends \PHPUnit_Framework_TestCase { - - protected $backend; - - function getInstance() { - - $backend = new DAVACL\PrincipalBackend\Mock(); - $principal = new ProxyRead($backend, [ - 'uri' => 'principal/user', - ]); - $this->backend = $backend; - return $principal; - - } - - function testGetName() { - - $i = $this->getInstance(); - $this->assertEquals('calendar-proxy-read', $i->getName()); - - } - function testGetDisplayName() { - - $i = $this->getInstance(); - $this->assertEquals('calendar-proxy-read', $i->getDisplayName()); - - } - - function testGetLastModified() { - - $i = $this->getInstance(); - $this->assertNull($i->getLastModified()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testDelete() { - - $i = $this->getInstance(); - $i->delete(); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testSetName() { - - $i = $this->getInstance(); - $i->setName('foo'); - - } - - function testGetAlternateUriSet() { - - $i = $this->getInstance(); - $this->assertEquals([], $i->getAlternateUriSet()); - - } - - function testGetPrincipalUri() { - - $i = $this->getInstance(); - $this->assertEquals('principal/user/calendar-proxy-read', $i->getPrincipalUrl()); - - } - - function testGetGroupMemberSet() { - - $i = $this->getInstance(); - $this->assertEquals([], $i->getGroupMemberSet()); - - } - - function testGetGroupMembership() { - - $i = $this->getInstance(); - $this->assertEquals([], $i->getGroupMembership()); - - } - - function testSetGroupMemberSet() { - - $i = $this->getInstance(); - $i->setGroupMemberSet(['principals/foo']); - - $expected = [ - $i->getPrincipalUrl() => ['principals/foo'] - ]; - - $this->assertEquals($expected, $this->backend->groupMembers); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyWriteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyWriteTest.php deleted file mode 100644 index 6cdb9b30e2b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/ProxyWriteTest.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Principal; - -use Sabre\DAVACL; - -class ProxyWriteTest extends ProxyReadTest { - - function getInstance() { - - $backend = new DAVACL\PrincipalBackend\Mock(); - $principal = new ProxyWrite($backend, [ - 'uri' => 'principal/user', - ]); - $this->backend = $backend; - return $principal; - - } - - function testGetName() { - - $i = $this->getInstance(); - $this->assertEquals('calendar-proxy-write', $i->getName()); - - } - function testGetDisplayName() { - - $i = $this->getInstance(); - $this->assertEquals('calendar-proxy-write', $i->getDisplayName()); - - } - - function testGetPrincipalUri() { - - $i = $this->getInstance(); - $this->assertEquals('principal/user/calendar-proxy-write', $i->getPrincipalUrl()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php deleted file mode 100644 index 420bb3b1afc..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Principal/UserTest.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Principal; - -use Sabre\DAVACL; - -class UserTest extends \PHPUnit_Framework_TestCase { - - function getInstance() { - - $backend = new DAVACL\PrincipalBackend\Mock(); - $backend->addPrincipal([ - 'uri' => 'principals/user/calendar-proxy-read', - ]); - $backend->addPrincipal([ - 'uri' => 'principals/user/calendar-proxy-write', - ]); - $backend->addPrincipal([ - 'uri' => 'principals/user/random', - ]); - return new User($backend, [ - 'uri' => 'principals/user', - ]); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testCreateFile() { - - $u = $this->getInstance(); - $u->createFile('test'); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testCreateDirectory() { - - $u = $this->getInstance(); - $u->createDirectory('test'); - - } - - function testGetChildProxyRead() { - - $u = $this->getInstance(); - $child = $u->getChild('calendar-proxy-read'); - $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyRead', $child); - - } - - function testGetChildProxyWrite() { - - $u = $this->getInstance(); - $child = $u->getChild('calendar-proxy-write'); - $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyWrite', $child); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testGetChildNotFound() { - - $u = $this->getInstance(); - $child = $u->getChild('foo'); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testGetChildNotFound2() { - - $u = $this->getInstance(); - $child = $u->getChild('random'); - - } - - function testGetChildren() { - - $u = $this->getInstance(); - $children = $u->getChildren(); - $this->assertEquals(2, count($children)); - $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyRead', $children[0]); - $this->assertInstanceOf('Sabre\\CalDAV\\Principal\\ProxyWrite', $children[1]); - - } - - function testChildExist() { - - $u = $this->getInstance(); - $this->assertTrue($u->childExists('calendar-proxy-read')); - $this->assertTrue($u->childExists('calendar-proxy-write')); - $this->assertFalse($u->childExists('foo')); - - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user/calendar-proxy-read', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user/calendar-proxy-write', - 'protected' => true, - ], - ]; - - $u = $this->getInstance(); - $this->assertEquals($expected, $u->getACL()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/DeliverNewEventTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/DeliverNewEventTest.php deleted file mode 100644 index 79e323f5c32..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/DeliverNewEventTest.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\HTTP\Request; -use Sabre\VObject; - -class DeliverNewEventTest extends \Sabre\DAVServerTest { - - public $setupCalDAV = true; - public $setupCalDAVScheduling = true; - public $setupACL = true; - public $autoLogin = 'user1'; - - function setUp() { - - parent::setUp(); - $this->caldavBackend->createCalendar( - 'principals/user1', - 'default', - [ - - ] - ); - $this->caldavBackend->createCalendar( - 'principals/user2', - 'default', - [ - - ] - ); - - } - - function testDelivery() { - - $request = new Request('PUT', '/calendars/user1/default/foo.ics'); - $request->setBody(<<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.9.1//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -CREATED:20140109T204404Z -UID:AADC6438-18CF-4B52-8DD2-EF9AD75ADE83 -DTEND;TZID=America/Toronto:20140107T110000 -TRANSP:OPAQUE -ATTENDEE;CN="Administrator";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org -ATTENDEE;CN="Roxy Kesh";CUTYPE=INDIVIDUAL;EMAIL="user2.sabredav@sabrdav.org"; - PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:user2.sabredav@sabredav.org -SUMMARY:Just testing! -DTSTART;TZID=America/Toronto:20140107T100000 -DTSTAMP:20140109T204422Z -ORGANIZER;CN="Administrator":mailto:user1.sabredav@sabredav.org -SEQUENCE:4 -END:VEVENT -END:VCALENDAR -ICS - ); - - $messages = []; - $this->server->on('schedule', function($message) use (&$messages) { - $messages[] = $message; - }); - - $response = $this->request($request); - - $this->assertEquals(201, $response->getStatus(), 'Incorrect status code received. Response body:' . $response->getBodyAsString()); - - $result = $this->request(new Request('GET', '/calendars/user1/default/foo.ics'))->getBody(); - $resultVObj = VObject\Reader::read($result); - - $this->assertEquals( - '1.2', - $resultVObj->VEVENT->ATTENDEE[1]['SCHEDULE-STATUS']->getValue() - ); - - $this->assertEquals(1, count($messages)); - $message = $messages[0]; - - $this->assertInstanceOf('\Sabre\VObject\ITip\Message', $message); - $this->assertEquals('mailto:user2.sabredav@sabredav.org', $message->recipient); - $this->assertEquals('Roxy Kesh', $message->recipientName); - $this->assertEquals('mailto:user1.sabredav@sabredav.org', $message->sender); - $this->assertEquals('Administrator', $message->senderName); - $this->assertEquals('REQUEST', $message->method); - - $this->assertEquals('REQUEST', $message->message->METHOD->getValue()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php deleted file mode 100644 index 0e0b609a11c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php +++ /dev/null @@ -1,611 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\CalDAV; -use Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp; -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; - -class FreeBusyRequestTest extends \PHPUnit_Framework_TestCase { - - protected $plugin; - protected $server; - protected $aclPlugin; - protected $request; - protected $authPlugin; - protected $caldavBackend; - - function setUp() { - - $caldavNS = '{' . CalDAV\Plugin::NS_CALDAV . '}'; - $calendars = [ - [ - 'principaluri' => 'principals/user2', - 'id' => 1, - 'uri' => 'calendar1', - $caldavNS . 'calendar-timezone' => "BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nTZID:Europe/Berlin\r\nEND:VTIMEZONE\r\nEND:VCALENDAR", - ], - [ - 'principaluri' => 'principals/user2', - 'id' => 2, - 'uri' => 'calendar2', - $caldavNS . 'schedule-calendar-transp' => new ScheduleCalendarTransp(ScheduleCalendarTransp::TRANSPARENT), - ], - ]; - $calendarobjects = [ - 1 => ['1.ics' => [ - 'uri' => '1.ics', - 'calendardata' => 'BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T130000 -DURATION:PT1H -END:VEVENT -END:VCALENDAR', - 'calendarid' => 1, - ]], - 2 => ['2.ics' => [ - 'uri' => '2.ics', - 'calendardata' => 'BEGIN:VCALENDAR -BEGIN:VEVENT -DTSTART:20110101T080000 -DURATION:PT1H -END:VEVENT -END:VCALENDAR', - 'calendarid' => 2, - ]] - - ]; - - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - $this->caldavBackend = new CalDAV\Backend\MockScheduling($calendars, $calendarobjects); - - $tree = [ - new DAVACL\PrincipalCollection($principalBackend), - new CalDAV\CalendarRoot($principalBackend, $this->caldavBackend), - ]; - - $this->request = HTTP\Sapi::createFromServerArray([ - 'CONTENT_TYPE' => 'text/calendar', - ]); - $this->response = new HTTP\ResponseMock(); - - $this->server = new DAV\Server($tree); - $this->server->httpRequest = $this->request; - $this->server->httpResponse = $this->response; - - $this->aclPlugin = new DAVACL\Plugin(); - $this->aclPlugin->allowUnauthenticatedAccess = false; - $this->server->addPlugin($this->aclPlugin); - - $authBackend = new DAV\Auth\Backend\Mock(); - $authBackend->setPrincipal('principals/user1'); - $this->authPlugin = new DAV\Auth\Plugin($authBackend); - // Forcing authentication to work. - $this->authPlugin->beforeMethod($this->request, $this->response); - $this->server->addPlugin($this->authPlugin); - - // CalDAV plugin - $this->plugin = new CalDAV\Plugin(); - $this->server->addPlugin($this->plugin); - - // Scheduling plugin - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - } - - function testWrongContentType() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/plain'] - ); - - $this->assertNull( - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse) - ); - - } - - function testNotFound() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/blabla', - ['Content-Type' => 'text/calendar'] - ); - - $this->assertNull( - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse) - ); - - } - - function testNotOutbox() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/inbox', - ['Content-Type' => 'text/calendar'] - ); - - $this->assertNull( - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse) - ); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testNoItipMethod() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -BEGIN:VFREEBUSY -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse); - - } - - /** - * @expectedException \Sabre\DAV\Exception\NotImplemented - */ - function testNoVFreeBusy() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VEVENT -END:VEVENT -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testIncorrectOrganizer() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:john@wayne.org -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testNoAttendees() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testNoDTStart() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse); - - } - - function testSucceed() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -ATTENDEE:mailto:user3.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - // Lazily making the current principal an admin. - $this->aclPlugin->adminPrincipals[] = 'principals/user1'; - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<d:href>mailto:user3.sabredav@sabredav.org</d:href>', - '<cal:request-status>2.0;Success</cal:request-status>', - '<cal:request-status>3.7;Could not find principal</cal:request-status>', - 'FREEBUSY:20110101T120000Z/20110101T130000Z', - ]; - - foreach ($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string) !== false, - 'The response body did not contain: ' . $string . 'Full response: ' . $this->response->body - ); - } - - $this->assertTrue( - strpos($this->response->body, 'FREEBUSY;FBTYPE=BUSY:20110101T080000Z/20110101T090000Z') == false, - 'The response body did contain free busy info from a transparent calendar.' - ); - - } - - /** - * Testing if the freebusy request still works, even if there are no - * calendars in the target users' account. - */ - function testSucceedNoCalendars() { - - // Deleting calendars - $this->caldavBackend->deleteCalendar(1); - $this->caldavBackend->deleteCalendar(2); - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - // Lazily making the current principal an admin. - $this->aclPlugin->adminPrincipals[] = 'principals/user1'; - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<cal:request-status>2.0;Success</cal:request-status>', - ]; - - foreach ($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string) !== false, - 'The response body did not contain: ' . $string . 'Full response: ' . $this->response->body - ); - } - - } - - function testNoCalendarHomeFound() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - // Lazily making the current principal an admin. - $this->aclPlugin->adminPrincipals[] = 'principals/user1'; - - // Removing the calendar home - $this->server->on('propFind', function(DAV\PropFind $propFind) { - - $propFind->set('{' . Plugin::NS_CALDAV . '}calendar-home-set', null, 403); - - }); - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<cal:request-status>3.7;No calendar-home-set property found</cal:request-status>', - ]; - - foreach ($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string) !== false, - 'The response body did not contain: ' . $string . 'Full response: ' . $this->response->body - ); - } - - } - - function testNoInboxFound() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - // Lazily making the current principal an admin. - $this->aclPlugin->adminPrincipals[] = 'principals/user1'; - - // Removing the inbox - $this->server->on('propFind', function(DAV\PropFind $propFind) { - - $propFind->set('{' . Plugin::NS_CALDAV . '}schedule-inbox-URL', null, 403); - - }); - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<cal:request-status>3.7;No schedule-inbox-URL property found</cal:request-status>', - ]; - - foreach ($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string) !== false, - 'The response body did not contain: ' . $string . 'Full response: ' . $this->response->body - ); - } - - } - - function testSucceedUseVAVAILABILITY() { - - $this->server->httpRequest = new HTTP\Request( - 'POST', - '/calendars/user1/outbox', - ['Content-Type' => 'text/calendar'] - ); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - // Lazily making the current principal an admin. - $this->aclPlugin->adminPrincipals[] = 'principals/user1'; - - // Adding VAVAILABILITY manually - $this->server->on('propFind', function(DAV\PropFind $propFind) { - - $propFind->handle('{' . Plugin::NS_CALDAV . '}calendar-availability', function() { - - $avail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20110101T000000Z -DTEND:20110102T000000Z -BEGIN:AVAILABLE -DTSTART:20110101T090000Z -DTEND:20110101T170000Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -ICS; - return $avail; - - }); - - }); - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<cal:request-status>2.0;Success</cal:request-status>', - 'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T080000Z/20110101T090000Z', - 'FREEBUSY:20110101T120000Z/20110101T130000Z', - 'FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T170000Z/20110101T180000Z', - ]; - - foreach ($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string) !== false, - 'The response body did not contain: ' . $string . 'Full response: ' . $this->response->body - ); - } - - } - - /* - function testNoPrivilege() { - - $this->markTestIncomplete('Currently there\'s no "no privilege" situation'); - - $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array( - 'CONTENT_TYPE' => 'text/calendar', - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - )); - - $body = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VFREEBUSY -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -DTSTART:20110101T080000Z -DTEND:20110101T180000Z -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->server->httpRequest->setBody($body); - - $this->assertFalse( - $this->plugin->httpPost($this->server->httpRequest, $this->response) - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'Content-Type' => 'application/xml', - ], $this->response->getHeaders()); - - $strings = [ - '<d:href>mailto:user2.sabredav@sabredav.org</d:href>', - '<cal:request-status>3.7;No calendar-home-set property found</cal:request-status>', - ]; - - foreach($strings as $string) { - $this->assertTrue( - strpos($this->response->body, $string)!==false, - 'The response body did not contain: ' . $string .'Full response: ' . $this->response->body - ); - } - - - }*/ - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/MockPlugin.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/MockPlugin.php deleted file mode 100644 index 02846609354..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/MockPlugin.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule\IMip; - -/** - * iMIP handler. - * - * This class is responsible for sending out iMIP messages. iMIP is the - * email-based transport for iTIP. iTIP deals with scheduling operations for - * iCalendar objects. - * - * If you want to customize the email that gets sent out, you can do so by - * extending this class and overriding the sendMessage method. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class MockPlugin extends \Sabre\CalDAV\Schedule\IMipPlugin { - - protected $emails = []; - - /** - * This function is responsible for sending the actual email. - * - * @param string $to Recipient email address - * @param string $subject Subject of the email - * @param string $body iCalendar body - * @param array $headers List of headers - * @return void - */ - protected function mail($to, $subject, $body, array $headers) { - - $this->emails[] = [ - 'to' => $to, - 'subject' => $subject, - 'body' => $body, - 'headers' => $headers, - ]; - - } - - function getSentEmails() { - - return $this->emails; - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMipPluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMipPluginTest.php deleted file mode 100644 index 7311999f5b4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/IMipPluginTest.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\DAV\Server; -use Sabre\VObject\ITip\Message; -use Sabre\VObject\Reader; - -class IMipPluginTest extends \PHPUnit_Framework_TestCase { - - function testGetPluginInfo() { - - $plugin = new IMipPlugin('system@example.com'); - $this->assertEquals( - 'imip', - $plugin->getPluginInfo()['name'] - ); - - } - - function testDeliverReply() { - - $message = new Message(); - $message->sender = 'mailto:sender@example.org'; - $message->senderName = 'Sender'; - $message->recipient = 'mailto:recipient@example.org'; - $message->recipientName = 'Recipient'; - $message->method = 'REPLY'; - - $ics = <<<ICS -BEGIN:VCALENDAR\r -METHOD:REPLY\r -BEGIN:VEVENT\r -SUMMARY:Birthday party\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - - $message->message = Reader::read($ics); - - $result = $this->schedule($message); - - $expected = [ - [ - 'to' => 'Recipient <recipient@example.org>', - 'subject' => 'Re: Birthday party', - 'body' => $ics, - 'headers' => [ - 'Reply-To: Sender <sender@example.org>', - 'From: system@example.org', - 'Content-Type: text/calendar; charset=UTF-8; method=REPLY', - 'X-Sabre-Version: ' . \Sabre\DAV\Version::VERSION, - ], - ] - ]; - - $this->assertEquals($expected, $result); - - } - - function testDeliverReplyNoMailto() { - - $message = new Message(); - $message->sender = 'mailto:sender@example.org'; - $message->senderName = 'Sender'; - $message->recipient = 'http://example.org/recipient'; - $message->recipientName = 'Recipient'; - $message->method = 'REPLY'; - - $ics = <<<ICS -BEGIN:VCALENDAR\r -METHOD:REPLY\r -BEGIN:VEVENT\r -SUMMARY:Birthday party\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - - $message->message = Reader::read($ics); - - $result = $this->schedule($message); - - $expected = []; - - $this->assertEquals($expected, $result); - - } - - function testDeliverRequest() { - - $message = new Message(); - $message->sender = 'mailto:sender@example.org'; - $message->senderName = 'Sender'; - $message->recipient = 'mailto:recipient@example.org'; - $message->recipientName = 'Recipient'; - $message->method = 'REQUEST'; - - $ics = <<<ICS -BEGIN:VCALENDAR\r -METHOD:REQUEST\r -BEGIN:VEVENT\r -SUMMARY:Birthday party\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - - $message->message = Reader::read($ics); - - $result = $this->schedule($message); - - $expected = [ - [ - 'to' => 'Recipient <recipient@example.org>', - 'subject' => 'Birthday party', - 'body' => $ics, - 'headers' => [ - 'Reply-To: Sender <sender@example.org>', - 'From: system@example.org', - 'Content-Type: text/calendar; charset=UTF-8; method=REQUEST', - 'X-Sabre-Version: ' . \Sabre\DAV\Version::VERSION, - ], - ] - ]; - - $this->assertEquals($expected, $result); - - } - - function testDeliverCancel() { - - $message = new Message(); - $message->sender = 'mailto:sender@example.org'; - $message->senderName = 'Sender'; - $message->recipient = 'mailto:recipient@example.org'; - $message->recipientName = 'Recipient'; - $message->method = 'CANCEL'; - - $ics = <<<ICS -BEGIN:VCALENDAR\r -METHOD:CANCEL\r -BEGIN:VEVENT\r -SUMMARY:Birthday party\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - - $message->message = Reader::read($ics); - - $result = $this->schedule($message); - - $expected = [ - [ - 'to' => 'Recipient <recipient@example.org>', - 'subject' => 'Cancelled: Birthday party', - 'body' => $ics, - 'headers' => [ - 'Reply-To: Sender <sender@example.org>', - 'From: system@example.org', - 'Content-Type: text/calendar; charset=UTF-8; method=CANCEL', - 'X-Sabre-Version: ' . \Sabre\DAV\Version::VERSION, - ], - ] - ]; - - $this->assertEquals($expected, $result); - $this->assertEquals('1.1', substr($message->scheduleStatus, 0, 3)); - - } - - function schedule(Message $message) { - - $plugin = new IMip\MockPlugin('system@example.org'); - - $server = new Server(); - $server->addPlugin($plugin); - $server->emit('schedule', [$message]); - - return $plugin->getSentEmails(); - - } - - function testDeliverInsignificantRequest() { - - $message = new Message(); - $message->sender = 'mailto:sender@example.org'; - $message->senderName = 'Sender'; - $message->recipient = 'mailto:recipient@example.org'; - $message->recipientName = 'Recipient'; - $message->method = 'REQUEST'; - $message->significantChange = false; - - $ics = <<<ICS -BEGIN:VCALENDAR\r -METHOD:REQUEST\r -BEGIN:VEVENT\r -SUMMARY:Birthday party\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - - $message->message = Reader::read($ics); - - $result = $this->schedule($message); - - $expected = []; - $this->assertEquals($expected, $result); - $this->assertEquals('1.0', $message->getScheduleStatus()[0]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/InboxTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/InboxTest.php deleted file mode 100644 index 01c3488afd6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/InboxTest.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\CalDAV; -use Sabre\DAV; - -class InboxTest extends \PHPUnit_Framework_TestCase { - - function testSetup() { - - $inbox = new Inbox( - new CalDAV\Backend\MockScheduling(), - 'principals/user1' - ); - $this->assertEquals('inbox', $inbox->getName()); - $this->assertEquals([], $inbox->getChildren()); - $this->assertEquals('principals/user1', $inbox->getOwner()); - $this->assertEquals(null, $inbox->getGroup()); - - $this->assertEquals([ - [ - 'privilege' => '{DAV:}read', - 'principal' => '{DAV:}authenticated', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write-properties', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}unbind', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}unbind', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{urn:ietf:params:xml:ns:caldav}schedule-deliver', - 'principal' => '{DAV:}authenticated', - 'protected' => true, - ], - ], $inbox->getACL()); - - $ok = false; - - } - - /** - * @depends testSetup - */ - function testGetChildren() { - - $backend = new CalDAV\Backend\MockScheduling(); - $inbox = new Inbox( - $backend, - 'principals/user1' - ); - - $this->assertEquals( - 0, - count($inbox->getChildren()) - ); - $backend->createSchedulingObject('principals/user1', 'schedule1.ics', "BEGIN:VCALENDAR\r\nEND:VCALENDAR"); - $this->assertEquals( - 1, - count($inbox->getChildren()) - ); - $this->assertInstanceOf('Sabre\CalDAV\Schedule\SchedulingObject', $inbox->getChildren()[0]); - $this->assertEquals( - 'schedule1.ics', - $inbox->getChildren()[0]->getName() - ); - - } - - /** - * @depends testGetChildren - */ - function testCreateFile() { - - $backend = new CalDAV\Backend\MockScheduling(); - $inbox = new Inbox( - $backend, - 'principals/user1' - ); - - $this->assertEquals( - 0, - count($inbox->getChildren()) - ); - $inbox->createFile('schedule1.ics', "BEGIN:VCALENDAR\r\nEND:VCALENDAR"); - $this->assertEquals( - 1, - count($inbox->getChildren()) - ); - $this->assertInstanceOf('Sabre\CalDAV\Schedule\SchedulingObject', $inbox->getChildren()[0]); - $this->assertEquals( - 'schedule1.ics', - $inbox->getChildren()[0]->getName() - ); - - } - - /** - * @depends testSetup - */ - function testCalendarQuery() { - - $backend = new CalDAV\Backend\MockScheduling(); - $inbox = new Inbox( - $backend, - 'principals/user1' - ); - - $this->assertEquals( - 0, - count($inbox->getChildren()) - ); - $backend->createSchedulingObject('principals/user1', 'schedule1.ics', "BEGIN:VCALENDAR\r\nEND:VCALENDAR"); - $this->assertEquals( - ['schedule1.ics'], - $inbox->calendarQuery([ - 'name' => 'VCALENDAR', - 'comp-filters' => [], - 'prop-filters' => [], - 'is-not-defined' => false - ]) - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxPostTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxPostTest.php deleted file mode 100644 index 3ab2c2288cf..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxPostTest.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\HTTP; - -class OutboxPostTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - protected $setupACL = true; - protected $autoLogin = 'user1'; - protected $setupCalDAVScheduling = true; - - function testPostPassThruNotFound() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/notfound', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - - $this->assertHTTPStatus(501, $req); - - } - - function testPostPassThruNotTextCalendar() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - ]); - - $this->assertHTTPStatus(501, $req); - - } - - function testPostPassThruNoOutBox() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - - $this->assertHTTPStatus(501, $req); - - } - - function testInvalidIcalBody() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - 'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org', - 'HTTP_RECIPIENT' => 'mailto:user2@example.org', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - $req->setBody('foo'); - - $this->assertHTTPStatus(400, $req); - - } - - function testNoVEVENT() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - 'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org', - 'HTTP_RECIPIENT' => 'mailto:user2@example.org', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - - $body = [ - 'BEGIN:VCALENDAR', - 'BEGIN:VTIMEZONE', - 'END:VTIMEZONE', - 'END:VCALENDAR', - ]; - - $req->setBody(implode("\r\n", $body)); - - $this->assertHTTPStatus(400, $req); - - } - - function testNoMETHOD() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - 'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org', - 'HTTP_RECIPIENT' => 'mailto:user2@example.org', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - - $body = [ - 'BEGIN:VCALENDAR', - 'BEGIN:VEVENT', - 'END:VEVENT', - 'END:VCALENDAR', - ]; - - $req->setBody(implode("\r\n", $body)); - - $this->assertHTTPStatus(400, $req); - - } - - function testUnsupportedMethod() { - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/outbox', - 'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org', - 'HTTP_RECIPIENT' => 'mailto:user2@example.org', - 'HTTP_CONTENT_TYPE' => 'text/calendar', - ]); - - $body = [ - 'BEGIN:VCALENDAR', - 'METHOD:PUBLISH', - 'BEGIN:VEVENT', - 'END:VEVENT', - 'END:VCALENDAR', - ]; - - $req->setBody(implode("\r\n", $body)); - - $this->assertHTTPStatus(501, $req); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php deleted file mode 100644 index 04d4b12379e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/OutboxTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\CalDAV; -use Sabre\DAV; - -class OutboxTest extends \PHPUnit_Framework_TestCase { - - function testSetup() { - - $outbox = new Outbox('principals/user1'); - $this->assertEquals('outbox', $outbox->getName()); - $this->assertEquals([], $outbox->getChildren()); - $this->assertEquals('principals/user1', $outbox->getOwner()); - $this->assertEquals(null, $outbox->getGroup()); - - $this->assertEquals([ - [ - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-send', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-send', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - ], $outbox->getACL()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginBasicTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginBasicTest.php deleted file mode 100644 index cee911b6e0b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginBasicTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -class PluginBasicTest extends \Sabre\DAVServerTest { - - public $setupCalDAV = true; - public $setupCalDAVScheduling = true; - - function testSimple() { - - $plugin = new Plugin(); - $this->assertEquals( - 'caldav-schedule', - $plugin->getPluginInfo()['name'] - ); - - } - - function testOptions() { - - $plugin = new Plugin(); - $expected = [ - 'calendar-auto-schedule', - 'calendar-availability', - ]; - $this->assertEquals($expected, $plugin->getFeatures()); - - } - - function testGetHTTPMethods() { - - $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('notfound')); - $this->assertEquals([], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1')); - $this->assertEquals(['POST'], $this->caldavSchedulePlugin->getHTTPMethods('calendars/user1/outbox')); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesTest.php deleted file mode 100644 index 2d0391893ef..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesTest.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\DAV; - -class PluginPropertiesTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - protected $setupCalDAVScheduling = true; - protected $setupPropertyStorage = true; - - function setUp() { - - parent::setUp(); - $this->caldavBackend->createCalendar( - 'principals/user1', - 'default', - [ - - ] - ); - $this->principalBackend->addPrincipal([ - 'uri' => 'principals/user1/calendar-proxy-read' - ]); - - } - - function testPrincipalProperties() { - - $props = $this->server->getPropertiesForPath('/principals/user1', [ - '{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', - '{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', - '{urn:ietf:params:xml:ns:caldav}calendar-user-address-set', - '{urn:ietf:params:xml:ns:caldav}calendar-user-type', - '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals('calendars/user1/outbox/', $prop->getHref()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals('calendars/user1/inbox/', $prop->getHref()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-user-address-set', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals(['mailto:user1.sabredav@sabredav.org', '/principals/user1/'], $prop->getHrefs()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-user-type', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-type']; - $this->assertEquals('INDIVIDUAL', $prop); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL']; - $this->assertEquals('calendars/user1/default/', $prop->getHref()); - - } - function testPrincipalPropertiesBadPrincipal() { - - $props = $this->server->getPropertiesForPath('principals/user1/calendar-proxy-read', [ - '{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', - '{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', - '{urn:ietf:params:xml:ns:caldav}calendar-user-address-set', - '{urn:ietf:params:xml:ns:caldav}calendar-user-type', - '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - $this->assertArrayHasKey(404, $props[0]); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', $props[0][404]); - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', $props[0][404]); - - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals(['/principals/user1/calendar-proxy-read/'], $prop->getHrefs()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-user-type', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-type']; - $this->assertEquals('INDIVIDUAL', $prop); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', $props[0][404]); - - } - function testNoDefaultCalendar() { - - foreach ($this->caldavBackend->getCalendarsForUser('principals/user1') as $calendar) { - $this->caldavBackend->deleteCalendar($calendar['id']); - } - $props = $this->server->getPropertiesForPath('/principals/user1', [ - '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(404, $props[0]); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', $props[0][404]); - - } - - /** - * There are two properties for availability. The server should - * automatically map the old property to the standard property. - */ - function testAvailabilityMapping() { - - $path = 'calendars/user1/inbox'; - $oldProp = '{http://calendarserver.org/ns/}calendar-availability'; - $newProp = '{urn:ietf:params:xml:ns:caldav}calendar-availability'; - $value1 = 'first value'; - $value2 = 'second value'; - - // Storing with the old name - $this->server->updateProperties($path, [ - $oldProp => $value1 - ]); - - // Retrieving with the new name - $this->assertEquals( - [$newProp => $value1], - $this->server->getProperties($path, [$newProp]) - ); - - // Storing with the new name - $this->server->updateProperties($path, [ - $newProp => $value2 - ]); - - // Retrieving with the old name - $this->assertEquals( - [$oldProp => $value2], - $this->server->getProperties($path, [$oldProp]) - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesWithSharedCalendarTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesWithSharedCalendarTest.php deleted file mode 100644 index 870f14c1447..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/PluginPropertiesWithSharedCalendarTest.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\DAV; - -class PluginPropertiesWithSharedCalendarTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - protected $setupCalDAVScheduling = true; - protected $setupCalDAVSharing = true; - - function setUp() { - - parent::setUp(); - $this->caldavBackend->createCalendar( - 'principals/user1', - 'shared', - [ - 'share-access' => DAV\Sharing\Plugin::ACCESS_READWRITE - ] - ); - $this->caldavBackend->createCalendar( - 'principals/user1', - 'default', - [ - - ] - ); - - } - - function testPrincipalProperties() { - - $props = $this->server->getPropertiesForPath('/principals/user1', [ - '{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', - '{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', - '{urn:ietf:params:xml:ns:caldav}calendar-user-address-set', - '{urn:ietf:params:xml:ns:caldav}calendar-user-type', - '{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', - ]); - - $this->assertArrayHasKey(0, $props); - $this->assertArrayHasKey(200, $props[0]); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-outbox-URL']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals('calendars/user1/outbox/', $prop->getHref()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-inbox-URL']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals('calendars/user1/inbox/', $prop->getHref()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-user-address-set', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set']; - $this->assertTrue($prop instanceof DAV\Xml\Property\Href); - $this->assertEquals(['mailto:user1.sabredav@sabredav.org', '/principals/user1/'], $prop->getHrefs()); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}calendar-user-type', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}calendar-user-type']; - $this->assertEquals('INDIVIDUAL', $prop); - - $this->assertArrayHasKey('{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL', $props[0][200]); - $prop = $props[0][200]['{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL']; - $this->assertEquals('calendars/user1/default/', $prop->getHref()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/ScheduleDeliverTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/ScheduleDeliverTest.php deleted file mode 100644 index 8123c685c76..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/ScheduleDeliverTest.php +++ /dev/null @@ -1,666 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\HTTP\Request; -use Sabre\VObject; - -class ScheduleDeliverTest extends \Sabre\DAVServerTest { - - use VObject\PHPUnitAssertions; - - public $setupCalDAV = true; - public $setupCalDAVScheduling = true; - public $setupACL = true; - public $autoLogin = 'user1'; - - public $caldavCalendars = [ - [ - 'principaluri' => 'principals/user1', - 'uri' => 'cal', - ], - [ - 'principaluri' => 'principals/user2', - 'uri' => 'cal', - ], - ]; - - function setUp() { - - $this->calendarObjectUri = '/calendars/user1/cal/object.ics'; - - parent::setUp(); - - } - - function testNewInvite() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver(null, $newObject); - $this->assertItemsInInbox('user2', 1); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - - function testNewOnWrongCollection() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->calendarObjectUri = '/calendars/user1/object.ics'; - $this->deliver(null, $newObject); - $this->assertItemsInInbox('user2', 0); - - - } - function testNewInviteSchedulingDisabled() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver(null, $newObject, true); - $this->assertItemsInInbox('user2', 0); - - } - function testUpdatedInvite() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - $oldObject = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 1); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - - } - function testUpdatedInviteSchedulingDisabled() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver($oldObject, $newObject, true); - $this->assertItemsInInbox('user2', 0); - - } - - function testUpdatedInviteWrongPath() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->calendarObjectUri = '/calendars/user1/inbox/foo.ics'; - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 0); - - } - - function testDeletedInvite() { - - $newObject = null; - - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 1); - - } - - function testDeletedInviteSchedulingDisabled() { - - $newObject = null; - - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver($oldObject, $newObject, true); - $this->assertItemsInInbox('user2', 0); - - } - - /** - * A MOVE request will trigger an unbind on a scheduling resource. - * - * However, we must not treat it as a cancellation, it just got moved to a - * different calendar. - */ - function testUnbindIgnoredOnMove() { - - $newObject = null; - - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - - $this->server->httpRequest->setMethod('MOVE'); - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 0); - - } - - function testDeletedInviteWrongUrl() { - - $newObject = null; - - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->calendarObjectUri = '/calendars/user1/inbox/foo.ics'; - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 0); - - } - - function testReply() { - - $oldObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user2.sabredav@sabredav.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org -ATTENDEE:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user3.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user2.sabredav@sabredav.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user3.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->putPath('calendars/user2/cal/foo.ics', $oldObject); - - $this->deliver($oldObject, $newObject); - $this->assertItemsInInbox('user2', 1); - $this->assertItemsInInbox('user1', 0); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER;SCHEDULE-STATUS=1.2:mailto:user2.sabredav@sabredav.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:user2.sabredav@sabredav.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user3.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - - - - function testInviteUnknownUser() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user3.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=3.7:mailto:user3.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - - function testInviteNoInboxUrl() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->server->on('propFind', function($propFind) { - $propFind->set('{' . Plugin::NS_CALDAV . '}schedule-inbox-URL', null, 403); - }); - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - - function testInviteNoCalendarHomeSet() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->server->on('propFind', function($propFind) { - $propFind->set('{' . Plugin::NS_CALDAV . '}calendar-home-set', null, 403); - }); - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - function testInviteNoDefaultCalendar() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->server->on('propFind', function($propFind) { - $propFind->set('{' . Plugin::NS_CALDAV . '}schedule-default-calendar-URL', null, 403); - }); - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - function testInviteNoScheduler() { - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->server->removeAllListeners('schedule'); - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - function testInviteNoACLPlugin() { - - $this->setupACL = false; - parent::setUp(); - - $newObject = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE:mailto:user2.sabredav@sabredav.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->deliver(null, $newObject); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20140811T230000Z -ORGANIZER:mailto:user1.sabredav@sabredav.org -ATTENDEE;SCHEDULE-STATUS=5.2:mailto:user2.sabredav@sabredav.org -DTSTAMP:**ANY** -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $newObject - ); - - } - - protected $calendarObjectUri; - - function deliver($oldObject, &$newObject, $disableScheduling = false) { - - $this->server->httpRequest->setUrl($this->calendarObjectUri); - if ($disableScheduling) { - $this->server->httpRequest->setHeader('Schedule-Reply', 'F'); - } - - if ($oldObject && $newObject) { - // update - $this->putPath($this->calendarObjectUri, $oldObject); - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $newObject); - rewind($stream); - $modified = false; - - $this->server->emit('beforeWriteContent', [ - $this->calendarObjectUri, - $this->server->tree->getNodeForPath($this->calendarObjectUri), - &$stream, - &$modified - ]); - if ($modified) { - $newObject = $stream; - } - - } elseif ($oldObject && !$newObject) { - // delete - $this->putPath($this->calendarObjectUri, $oldObject); - - $this->caldavSchedulePlugin->beforeUnbind( - $this->calendarObjectUri - ); - } else { - - // create - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $newObject); - rewind($stream); - $modified = false; - $this->server->emit('beforeCreateFile', [ - $this->calendarObjectUri, - &$stream, - $this->server->tree->getNodeForPath(dirname($this->calendarObjectUri)), - &$modified - ]); - - if ($modified) { - $newObject = $stream; - } - } - - } - - - /** - * Creates or updates a node at the specified path. - * - * This circumvents sabredav's internal server apis, so all events and - * access control is skipped. - * - * @param string $path - * @param string $data - * @return void - */ - function putPath($path, $data) { - - list($parent, $base) = \Sabre\HTTP\UrlUtil::splitPath($path); - $parentNode = $this->server->tree->getNodeForPath($parent); - - /* - if ($parentNode->childExists($base)) { - $childNode = $parentNode->getChild($base); - $childNode->put($data); - } else {*/ - $parentNode->createFile($base, $data); - //} - - } - - function assertItemsInInbox($user, $count) { - - $inboxNode = $this->server->tree->getNodeForPath('calendars/' . $user . '/inbox'); - $this->assertEquals($count, count($inboxNode->getChildren())); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/SchedulingObjectTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/SchedulingObjectTest.php deleted file mode 100644 index be83cd08110..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Schedule/SchedulingObjectTest.php +++ /dev/null @@ -1,378 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Schedule; - -use Sabre\CalDAV\Backend; - -class SchedulingObjectTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CalDAV\Backend_PDO - */ - protected $backend; - /** - * @var Sabre\CalDAV\Calendar - */ - protected $calendar; - protected $principalBackend; - - protected $data; - protected $data2; - - function setup() { - - if (!SABRE_HASSQLITE) $this->markTestSkipped('SQLite driver is not available'); - $this->backend = new Backend\MockScheduling(); - - $this->data = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VEVENT -SEQUENCE:1 -END:VEVENT -END:VCALENDAR -ICS; - $this->data = <<<ICS -BEGIN:VCALENDAR -METHOD:REQUEST -BEGIN:VEVENT -SEQUENCE:2 -END:VEVENT -END:VCALENDAR -ICS; - - $this->inbox = new Inbox($this->backend, 'principals/user1'); - $this->inbox->createFile('item1.ics', $this->data); - - } - - function teardown() { - - unset($this->inbox); - unset($this->backend); - - } - - function testSetup() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $this->assertInternalType('string', $children[0]->getName()); - $this->assertInternalType('string', $children[0]->get()); - $this->assertInternalType('string', $children[0]->getETag()); - $this->assertEquals('text/calendar; charset=utf-8', $children[0]->getContentType()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidArg1() { - - $obj = new SchedulingObject( - new Backend\MockScheduling([], []), - [], - [] - ); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidArg2() { - - $obj = new SchedulingObject( - new Backend\MockScheduling([], []), - [], - ['calendarid' => '1'] - ); - - } - - /** - * @depends testSetup - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed - */ - function testPut() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $children[0]->put(''); - - } - - /** - * @depends testSetup - */ - function testDelete() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - $obj->delete(); - - $children2 = $this->inbox->getChildren(); - $this->assertEquals(count($children) - 1, count($children2)); - - } - - /** - * @depends testSetup - */ - function testGetLastModified() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - - $lastMod = $obj->getLastModified(); - $this->assertTrue(is_int($lastMod) || ctype_digit($lastMod) || is_null($lastMod)); - - } - - /** - * @depends testSetup - */ - function testGetSize() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - - $size = $obj->getSize(); - $this->assertInternalType('int', $size); - - } - - function testGetOwner() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - $this->assertEquals('principals/user1', $obj->getOwner()); - - } - - function testGetGroup() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - $this->assertNull($obj->getGroup()); - - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - ]; - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - $this->assertEquals($expected, $obj->getACL()); - - } - - function testDefaultACL() { - - $backend = new Backend\MockScheduling([], []); - $calendarObject = new SchedulingObject($backend, ['calendarid' => 1, 'uri' => 'foo', 'principaluri' => 'principals/user1']); - $expected = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ], - ]; - $this->assertEquals($expected, $calendarObject->getACL()); - - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - $obj->setACL([]); - - } - - function testGet() { - - $children = $this->inbox->getChildren(); - $this->assertTrue($children[0] instanceof SchedulingObject); - - $obj = $children[0]; - - $this->assertEquals($this->data, $obj->get()); - - } - - function testGetRefetch() { - - $backend = new Backend\MockScheduling(); - $backend->createSchedulingObject('principals/user1', 'foo', 'foo'); - - $obj = new SchedulingObject($backend, [ - 'calendarid' => 1, - 'uri' => 'foo', - 'principaluri' => 'principals/user1', - ]); - - $this->assertEquals('foo', $obj->get()); - - } - - function testGetEtag1() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'etag' => 'bar', - 'calendarid' => 1 - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - - $this->assertEquals('bar', $obj->getETag()); - - } - - function testGetEtag2() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - - $this->assertEquals('"' . md5('foo') . '"', $obj->getETag()); - - } - - function testGetSupportedPrivilegesSet() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertNull($obj->getSupportedPrivilegeSet()); - - } - - function testGetSize1() { - - $objectInfo = [ - 'calendardata' => 'foo', - 'uri' => 'foo', - 'calendarid' => 1 - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertEquals(3, $obj->getSize()); - - } - - function testGetSize2() { - - $objectInfo = [ - 'uri' => 'foo', - 'calendarid' => 1, - 'size' => 4, - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertEquals(4, $obj->getSize()); - - } - - function testGetContentType() { - - $objectInfo = [ - 'uri' => 'foo', - 'calendarid' => 1, - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertEquals('text/calendar; charset=utf-8', $obj->getContentType()); - - } - - function testGetContentType2() { - - $objectInfo = [ - 'uri' => 'foo', - 'calendarid' => 1, - 'component' => 'VEVENT', - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertEquals('text/calendar; charset=utf-8; component=VEVENT', $obj->getContentType()); - - } - function testGetACL2() { - - $objectInfo = [ - 'uri' => 'foo', - 'calendarid' => 1, - 'acl' => [], - ]; - - $backend = new Backend\MockScheduling([], []); - $obj = new SchedulingObject($backend, $objectInfo); - $this->assertEquals([], $obj->getACL()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php deleted file mode 100644 index f71c195238c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharedCalendarTest.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV\Sharing; -use Sabre\DAV\Xml\Element\Sharee; - -class SharedCalendarTest extends \PHPUnit_Framework_TestCase { - - protected $backend; - - function getInstance(array $props = null) { - - if (is_null($props)) { - $props = [ - 'id' => 1, - '{http://calendarserver.org/ns/}shared-url' => 'calendars/owner/original', - '{http://sabredav.org/ns}owner-principal' => 'principals/owner', - '{http://sabredav.org/ns}read-only' => false, - 'share-access' => Sharing\Plugin::ACCESS_READWRITE, - 'principaluri' => 'principals/sharee', - ]; - } - - $this->backend = new Backend\MockSharing( - [$props], - [], - [] - ); - - $sharee = new Sharee(); - $sharee->href = 'mailto:removeme@example.org'; - $sharee->properties['{DAV:}displayname'] = 'To be removed'; - $sharee->access = Sharing\Plugin::ACCESS_READ; - $this->backend->updateInvites(1, [$sharee]); - - return new SharedCalendar($this->backend, $props); - - } - - function testGetInvites() { - - $sharee = new Sharee(); - $sharee->href = 'mailto:removeme@example.org'; - $sharee->properties['{DAV:}displayname'] = 'To be removed'; - $sharee->access = Sharing\Plugin::ACCESS_READ; - $sharee->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE; - - $this->assertEquals( - [$sharee], - $this->getInstance()->getInvites() - ); - - } - - function testGetOwner() { - $this->assertEquals('principals/sharee', $this->getInstance()->getOwner()); - } - - function testGetACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/sharee', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/sharee/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write-properties', - 'principal' => 'principals/sharee', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write-properties', - 'principal' => 'principals/sharee/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee/calendar-proxy-read', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy', - 'principal' => '{DAV:}authenticated', - 'protected' => true, - ], - ]; - - $this->assertEquals($expected, $this->getInstance()->getACL()); - - } - - function testGetChildACL() { - - $expected = [ - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/sharee', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}write', - 'principal' => 'principals/sharee/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/sharee/calendar-proxy-read', - 'protected' => true, - ], - - ]; - - $this->assertEquals($expected, $this->getInstance()->getChildACL()); - - } - - function testUpdateInvites() { - - $instance = $this->getInstance(); - $newSharees = [ - new Sharee(), - new Sharee() - ]; - $newSharees[0]->href = 'mailto:test@example.org'; - $newSharees[0]->properties['{DAV:}displayname'] = 'Foo Bar'; - $newSharees[0]->comment = 'Booh'; - $newSharees[0]->access = Sharing\Plugin::ACCESS_READWRITE; - - $newSharees[1]->href = 'mailto:removeme@example.org'; - $newSharees[1]->access = Sharing\Plugin::ACCESS_NOACCESS; - - $instance->updateInvites($newSharees); - - $expected = [ - clone $newSharees[0] - ]; - $expected[0]->inviteStatus = Sharing\Plugin::INVITE_NORESPONSE; - $this->assertEquals($expected, $instance->getInvites()); - - } - - function testPublish() { - - $instance = $this->getInstance(); - $this->assertNull($instance->setPublishStatus(true)); - $this->assertNull($instance->setPublishStatus(false)); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php deleted file mode 100644 index 9589176a368..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php +++ /dev/null @@ -1,396 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; -use Sabre\DAV\Xml\Element\Sharee; -use Sabre\HTTP; - -class SharingPluginTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - protected $setupCalDAVSharing = true; - protected $setupACL = true; - protected $autoLogin = 'user1'; - - function setUp() { - - $this->caldavCalendars = [ - [ - 'principaluri' => 'principals/user1', - 'id' => 1, - 'uri' => 'cal1', - ], - [ - 'principaluri' => 'principals/user1', - 'id' => 2, - 'uri' => 'cal2', - 'share-access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE, - ], - [ - 'principaluri' => 'principals/user1', - 'id' => 3, - 'uri' => 'cal3', - ], - ]; - - parent::setUp(); - - // Making the logged in user an admin, for full access: - $this->aclPlugin->adminPrincipals[] = 'principals/user2'; - - } - - function testSimple() { - - $this->assertInstanceOf('Sabre\\CalDAV\\SharingPlugin', $this->server->getPlugin('caldav-sharing')); - $this->assertEquals( - 'caldav-sharing', - $this->caldavSharingPlugin->getPluginInfo()['name'] - ); - - } - - /** - * @expectedException \LogicException - */ - function testSetupWithoutCoreSharingPlugin() { - - $server = new DAV\Server(); - $server->addPlugin( - new SharingPlugin() - ); - - } - - function testGetFeatures() { - - $this->assertEquals(['calendarserver-sharing'], $this->caldavSharingPlugin->getFeatures()); - - } - - function testBeforeGetShareableCalendar() { - - // Forcing the server to authenticate: - $this->authPlugin->beforeMethod(new HTTP\Request(), new HTTP\Response()); - $props = $this->server->getProperties('calendars/user1/cal1', [ - '{' . Plugin::NS_CALENDARSERVER . '}invite', - '{' . Plugin::NS_CALENDARSERVER . '}allowed-sharing-modes', - ]); - - $this->assertInstanceOf('Sabre\\CalDAV\\Xml\\Property\\Invite', $props['{' . Plugin::NS_CALENDARSERVER . '}invite']); - $this->assertInstanceOf('Sabre\\CalDAV\\Xml\\Property\\AllowedSharingModes', $props['{' . Plugin::NS_CALENDARSERVER . '}allowed-sharing-modes']); - - } - - function testBeforeGetSharedCalendar() { - - $props = $this->server->getProperties('calendars/user1/cal2', [ - '{' . Plugin::NS_CALENDARSERVER . '}shared-url', - '{' . Plugin::NS_CALENDARSERVER . '}invite', - ]); - - $this->assertInstanceOf('Sabre\\CalDAV\\Xml\\Property\\Invite', $props['{' . Plugin::NS_CALENDARSERVER . '}invite']); - //$this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $props['{' . Plugin::NS_CALENDARSERVER . '}shared-url']); - - } - - function testUpdateResourceType() { - - $this->caldavBackend->updateInvites(1, - [ - new Sharee([ - 'href' => 'mailto:joe@example.org', - ]) - ] - ); - $result = $this->server->updateProperties('calendars/user1/cal1', [ - '{DAV:}resourcetype' => new DAV\Xml\Property\ResourceType(['{DAV:}collection']) - ]); - - $this->assertEquals([ - '{DAV:}resourcetype' => 200 - ], $result); - - $this->assertEquals(0, count($this->caldavBackend->getInvites(1))); - - } - - function testUpdatePropertiesPassThru() { - - $result = $this->server->updateProperties('calendars/user1/cal3', [ - '{DAV:}foo' => 'bar', - ]); - - $this->assertEquals([ - '{DAV:}foo' => 200, - ], $result); - - } - - function testUnknownMethodNoPOST() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PATCH', - 'REQUEST_URI' => '/', - ]); - - $response = $this->request($request); - - $this->assertEquals(501, $response->status, $response->body); - - } - - function testUnknownMethodNoXML() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/', - 'CONTENT_TYPE' => 'text/plain', - ]); - - $response = $this->request($request); - - $this->assertEquals(501, $response->status, $response->body); - - } - - function testUnknownMethodNoNode() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/foo', - 'CONTENT_TYPE' => 'text/xml', - ]); - - $response = $this->request($request); - - $this->assertEquals(501, $response->status, $response->body); - - } - - function testShareRequest() { - - $request = new HTTP\Request('POST', '/calendars/user1/cal1', ['Content-Type' => 'text/xml']); - - $xml = <<<RRR -<?xml version="1.0"?> -<cs:share xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <cs:set> - <d:href>mailto:joe@example.org</d:href> - <cs:common-name>Joe Shmoe</cs:common-name> - <cs:read-write /> - </cs:set> - <cs:remove> - <d:href>mailto:nancy@example.org</d:href> - </cs:remove> -</cs:share> -RRR; - - $request->setBody($xml); - - $response = $this->request($request, 200); - - $this->assertEquals( - [ - new Sharee([ - 'href' => 'mailto:joe@example.org', - 'properties' => [ - '{DAV:}displayname' => 'Joe Shmoe', - ], - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_NORESPONSE, - 'comment' => '', - ]), - ], - $this->caldavBackend->getInvites(1) - ); - - // Wiping out tree cache - $this->server->tree->markDirty(''); - - // Verifying that the calendar is now marked shared. - $props = $this->server->getProperties('calendars/user1/cal1', ['{DAV:}resourcetype']); - $this->assertTrue( - $props['{DAV:}resourcetype']->is('{http://calendarserver.org/ns/}shared-owner') - ); - - } - - function testShareRequestNoShareableCalendar() { - - $request = new HTTP\Request( - 'POST', - '/calendars/user1/cal2', - ['Content-Type' => 'text/xml'] - ); - - $xml = '<?xml version="1.0"?> -<cs:share xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:"> - <cs:set> - <d:href>mailto:joe@example.org</d:href> - <cs:common-name>Joe Shmoe</cs:common-name> - <cs:read-write /> - </cs:set> - <cs:remove> - <d:href>mailto:nancy@example.org</d:href> - </cs:remove> -</cs:share> -'; - - $request->setBody($xml); - - $response = $this->request($request, 403); - - } - - function testInviteReply() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1', - 'CONTENT_TYPE' => 'text/xml', - ]); - - $xml = '<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:"> - <cs:hosturl><d:href>/principals/owner</d:href></cs:hosturl> - <cs:invite-accepted /> -</cs:invite-reply> -'; - - $request->setBody($xml); - $response = $this->request($request); - $this->assertEquals(200, $response->status, $response->body); - - } - - function testInviteBadXML() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1', - 'CONTENT_TYPE' => 'text/xml', - ]); - - $xml = '<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:"> -</cs:invite-reply> -'; - $request->setBody($xml); - $response = $this->request($request); - $this->assertEquals(400, $response->status, $response->body); - - } - - function testInviteWrongUrl() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'POST', - 'REQUEST_URI' => '/calendars/user1/cal1', - 'CONTENT_TYPE' => 'text/xml', - ]); - - $xml = '<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:"> - <cs:hosturl><d:href>/principals/owner</d:href></cs:hosturl> -</cs:invite-reply> -'; - $request->setBody($xml); - $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); - - // If the plugin did not handle this request, it must ensure that the - // body is still accessible by other plugins. - $this->assertEquals($xml, $request->getBody(true)); - - } - - function testPublish() { - - $request = new HTTP\Request('POST', '/calendars/user1/cal1', ['Content-Type' => 'text/xml']); - - $xml = '<?xml version="1.0"?> -<cs:publish-calendar xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:" /> -'; - - $request->setBody($xml); - - $response = $this->request($request); - $this->assertEquals(202, $response->status, $response->body); - - } - - - function testUnpublish() { - - $request = new HTTP\Request( - 'POST', - '/calendars/user1/cal1', - ['Content-Type' => 'text/xml'] - ); - - $xml = '<?xml version="1.0"?> -<cs:unpublish-calendar xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:" /> -'; - - $request->setBody($xml); - - $response = $this->request($request); - $this->assertEquals(200, $response->status, $response->body); - - } - - function testPublishWrongUrl() { - - $request = new HTTP\Request( - 'POST', - '/calendars/user1', - ['Content-Type' => 'text/xml'] - ); - - $xml = '<?xml version="1.0"?> -<cs:publish-calendar xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:" /> -'; - - $request->setBody($xml); - $this->request($request, 501); - - } - - function testUnpublishWrongUrl() { - - $request = new HTTP\Request( - 'POST', - '/calendars/user1', - ['Content-Type' => 'text/xml'] - ); - $xml = '<?xml version="1.0"?> -<cs:unpublish-calendar xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:" /> -'; - - $request->setBody($xml); - - $this->request($request, 501); - - } - - function testUnknownXmlDoc() { - - - $request = new HTTP\Request( - 'POST', - '/calendars/user1/cal2', - ['Content-Type' => 'text/xml'] - ); - - $xml = '<?xml version="1.0"?> -<cs:foo-bar xmlns:cs="' . Plugin::NS_CALENDARSERVER . '" xmlns:d="DAV:" />'; - - $request->setBody($xml); - - $response = $this->request($request); - $this->assertEquals(501, $response->status, $response->body); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/CreateSubscriptionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/CreateSubscriptionTest.php deleted file mode 100644 index 8ad0f8ac574..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/CreateSubscriptionTest.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Subscriptions; - -use Sabre\CalDAV; -use Sabre\HTTP\Request; - -class CreateSubscriptionTest extends \Sabre\DAVServerTest { - - protected $setupCalDAV = true; - protected $setupCalDAVSubscriptions = true; - - /** - * OS X 10.7 - 10.9.1 - */ - function testMKCOL() { - - $body = <<<XML -<A:mkcol xmlns:A="DAV:"> - <A:set> - <A:prop> - <B:subscribed-strip-attachments xmlns:B="http://calendarserver.org/ns/" /> - <B:subscribed-strip-todos xmlns:B="http://calendarserver.org/ns/" /> - <A:resourcetype> - <A:collection /> - <B:subscribed xmlns:B="http://calendarserver.org/ns/" /> - </A:resourcetype> - <E:calendar-color xmlns:E="http://apple.com/ns/ical/">#1C4587FF</E:calendar-color> - <A:displayname>Jewish holidays</A:displayname> - <C:calendar-description xmlns:C="urn:ietf:params:xml:ns:caldav">Foo</C:calendar-description> - <E:calendar-order xmlns:E="http://apple.com/ns/ical/">19</E:calendar-order> - <B:source xmlns:B="http://calendarserver.org/ns/"> - <A:href>webcal://www.example.org/</A:href> - </B:source> - <E:refreshrate xmlns:E="http://apple.com/ns/ical/">P1W</E:refreshrate> - <B:subscribed-strip-alarms xmlns:B="http://calendarserver.org/ns/" /> - </A:prop> - </A:set> -</A:mkcol> -XML; - - $headers = [ - 'Content-Type' => 'application/xml', - ]; - $request = new Request('MKCOL', '/calendars/user1/subscription1', $headers, $body); - - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus()); - $subscriptions = $this->caldavBackend->getSubscriptionsForUser('principals/user1'); - $this->assertSubscription($subscriptions[0]); - - - } - /** - * OS X 10.9.2 and up - */ - function testMKCALENDAR() { - - $body = <<<XML -<B:mkcalendar xmlns:B="urn:ietf:params:xml:ns:caldav"> - <A:set xmlns:A="DAV:"> - <A:prop> - <B:supported-calendar-component-set> - <B:comp name="VEVENT" /> - </B:supported-calendar-component-set> - <C:subscribed-strip-alarms xmlns:C="http://calendarserver.org/ns/" /> - <C:subscribed-strip-attachments xmlns:C="http://calendarserver.org/ns/" /> - <A:resourcetype> - <A:collection /> - <C:subscribed xmlns:C="http://calendarserver.org/ns/" /> - </A:resourcetype> - <D:refreshrate xmlns:D="http://apple.com/ns/ical/">P1W</D:refreshrate> - <C:source xmlns:C="http://calendarserver.org/ns/"> - <A:href>webcal://www.example.org/</A:href> - </C:source> - <D:calendar-color xmlns:D="http://apple.com/ns/ical/">#1C4587FF</D:calendar-color> - <D:calendar-order xmlns:D="http://apple.com/ns/ical/">19</D:calendar-order> - <B:calendar-description>Foo</B:calendar-description> - <C:subscribed-strip-todos xmlns:C="http://calendarserver.org/ns/" /> - <A:displayname>Jewish holidays</A:displayname> - </A:prop> - </A:set> -</B:mkcalendar> -XML; - - $headers = [ - 'Content-Type' => 'application/xml', - ]; - $request = new Request('MKCALENDAR', '/calendars/user1/subscription1', $headers, $body); - - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus()); - $subscriptions = $this->caldavBackend->getSubscriptionsForUser('principals/user1'); - $this->assertSubscription($subscriptions[0]); - - // Also seeing if it works when calling this as a PROPFIND. - $this->assertEquals([ - '{http://calendarserver.org/ns/}subscribed-strip-alarms' => '', - ], - $this->server->getProperties('calendars/user1/subscription1', ['{http://calendarserver.org/ns/}subscribed-strip-alarms']) - ); - - - } - - function assertSubscription($subscription) { - - $this->assertEquals('', $subscription['{http://calendarserver.org/ns/}subscribed-strip-attachments']); - $this->assertEquals('', $subscription['{http://calendarserver.org/ns/}subscribed-strip-todos']); - $this->assertEquals('#1C4587FF', $subscription['{http://apple.com/ns/ical/}calendar-color']); - $this->assertEquals('Jewish holidays', $subscription['{DAV:}displayname']); - $this->assertEquals('Foo', $subscription['{urn:ietf:params:xml:ns:caldav}calendar-description']); - $this->assertEquals('19', $subscription['{http://apple.com/ns/ical/}calendar-order']); - $this->assertEquals('webcal://www.example.org/', $subscription['{http://calendarserver.org/ns/}source']->getHref()); - $this->assertEquals('P1W', $subscription['{http://apple.com/ns/ical/}refreshrate']); - $this->assertEquals('subscription1', $subscription['uri']); - $this->assertEquals('principals/user1', $subscription['principaluri']); - $this->assertEquals('webcal://www.example.org/', $subscription['source']); - $this->assertEquals(['principals/user1', 1], $subscription['id']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/PluginTest.php deleted file mode 100644 index dc6d2d5f04c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/PluginTest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Subscriptions; - -use Sabre\DAV\PropFind; - -class PluginTest extends \PHPUnit_Framework_TestCase { - - function testInit() { - - $server = new \Sabre\DAV\Server(); - $plugin = new Plugin(); - - $server->addPlugin($plugin); - - $this->assertEquals( - '{http://calendarserver.org/ns/}subscribed', - $server->resourceTypeMapping['Sabre\\CalDAV\\Subscriptions\\ISubscription'] - ); - $this->assertEquals( - 'Sabre\\DAV\\Xml\\Property\\Href', - $server->xml->elementMap['{http://calendarserver.org/ns/}source'] - ); - - $this->assertEquals( - ['calendarserver-subscribed'], - $plugin->getFeatures() - ); - - $this->assertEquals( - 'subscriptions', - $plugin->getPluginInfo()['name'] - ); - - } - - function testPropFind() { - - $propName = '{http://calendarserver.org/ns/}subscribed-strip-alarms'; - $propFind = new PropFind('foo', [$propName]); - $propFind->set($propName, null, 200); - - $plugin = new Plugin(); - $plugin->propFind($propFind, new \Sabre\DAV\SimpleCollection('hi')); - - $this->assertFalse(is_null($propFind->get($propName))); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/SubscriptionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/SubscriptionTest.php deleted file mode 100644 index 559d526cd1d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Subscriptions/SubscriptionTest.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Subscriptions; - -use Sabre\DAV\PropPatch; -use Sabre\DAV\Xml\Property\Href; - -class SubscriptionTest extends \PHPUnit_Framework_TestCase { - - protected $backend; - - function getSub($override = []) { - - $caldavBackend = new \Sabre\CalDAV\Backend\MockSubscriptionSupport([], []); - - $info = [ - '{http://calendarserver.org/ns/}source' => new Href('http://example.org/src', false), - 'lastmodified' => date('2013-04-06 11:40:00'), // tomorrow is my birthday! - '{DAV:}displayname' => 'displayname', - ]; - - - $id = $caldavBackend->createSubscription('principals/user1', 'uri', array_merge($info, $override)); - $subInfo = $caldavBackend->getSubscriptionsForUser('principals/user1'); - - $this->assertEquals(1, count($subInfo)); - $subscription = new Subscription($caldavBackend, $subInfo[0]); - - $this->backend = $caldavBackend; - return $subscription; - - } - - function testValues() { - - $sub = $this->getSub(); - - $this->assertEquals('uri', $sub->getName()); - $this->assertEquals(date('2013-04-06 11:40:00'), $sub->getLastModified()); - $this->assertEquals([], $sub->getChildren()); - - $this->assertEquals( - [ - '{DAV:}displayname' => 'displayname', - '{http://calendarserver.org/ns/}source' => new Href('http://example.org/src', false), - ], - $sub->getProperties(['{DAV:}displayname', '{http://calendarserver.org/ns/}source']) - ); - - $this->assertEquals('principals/user1', $sub->getOwner()); - $this->assertNull($sub->getGroup()); - - $acl = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1/calendar-proxy-write', - 'protected' => true, - ], - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1/calendar-proxy-read', - 'protected' => true, - ] - ]; - $this->assertEquals($acl, $sub->getACL()); - - $this->assertNull($sub->getSupportedPrivilegeSet()); - - } - - function testValues2() { - - $sub = $this->getSub([ - 'lastmodified' => null, - ]); - - $this->assertEquals(null, $sub->getLastModified()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $sub = $this->getSub(); - $sub->setACL([]); - - } - - function testDelete() { - - $sub = $this->getSub(); - $sub->delete(); - - $this->assertEquals([], $this->backend->getSubscriptionsForUser('principals1/user1')); - - } - - function testUpdateProperties() { - - $sub = $this->getSub(); - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'foo', - ]); - $sub->propPatch($propPatch); - $this->assertTrue($propPatch->commit()); - - $this->assertEquals( - 'foo', - $this->backend->getSubscriptionsForUser('principals/user1')[0]['{DAV:}displayname'] - ); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testBadConstruct() { - - $caldavBackend = new \Sabre\CalDAV\Backend\MockSubscriptionSupport([], []); - new Subscription($caldavBackend, []); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/TestUtil.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/TestUtil.php deleted file mode 100644 index 673d39c0aa5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/TestUtil.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -class TestUtil { - - static function getBackend() { - - $backend = new Backend\Mock(); - $calendarId = $backend->createCalendar( - 'principals/user1', - 'UUID-123467', - [ - '{DAV:}displayname' => 'user1 calendar', - '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', - ] - ); - $backend->createCalendar( - 'principals/user1', - 'UUID-123468', - [ - '{DAV:}displayname' => 'user1 calendar2', - '{urn:ietf:params:xml:ns:caldav}calendar-description' => 'Calendar description', - '{http://apple.com/ns/ical/}calendar-order' => '1', - '{http://apple.com/ns/ical/}calendar-color' => '#FF0000', - ] - ); - $backend->createCalendarObject($calendarId, 'UUID-2345', self::getTestCalendarData()); - return $backend; - - } - - static function getTestCalendarData($type = 1) { - - $calendarData = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//iCal 4.0.1//EN -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:Asia/Seoul -BEGIN:DAYLIGHT -TZOFFSETFROM:+0900 -RRULE:FREQ=YEARLY;UNTIL=19880507T150000Z;BYMONTH=5;BYDAY=2SU -DTSTART:19870510T000000 -TZNAME:GMT+09:00 -TZOFFSETTO:+1000 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+1000 -DTSTART:19881009T000000 -TZNAME:GMT+09:00 -TZOFFSETTO:+0900 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20100225T154229Z -UID:39A6B5ED-DD51-4AFE-A683-C35EE3749627 -TRANSP:TRANSPARENT -SUMMARY:Something here -DTSTAMP:20100228T130202Z'; - - switch ($type) { - case 1 : - $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDTEND;TZID=Asia/Seoul:20100223T070000\n"; - break; - case 2 : - $calendarData .= "\nDTSTART:20100223T060000\nDTEND:20100223T070000\n"; - break; - case 3 : - $calendarData .= "\nDTSTART;VALUE=DATE:20100223\nDTEND;VALUE=DATE:20100223\n"; - break; - case 4 : - $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDURATION:PT1H\n"; - break; - case 5 : - $calendarData .= "\nDTSTART;TZID=Asia/Seoul:20100223T060000\nDURATION:-P5D\n"; - break; - case 6 : - $calendarData .= "\nDTSTART;VALUE=DATE:20100223\n"; - break; - case 7 : - $calendarData .= "\nDTSTART;VALUE=DATETIME:20100223T060000\n"; - break; - - // No DTSTART, so intentionally broken - case 'X' : - $calendarData .= "\n"; - break; - } - - - $calendarData .= 'ATTENDEE;PARTSTAT=NEEDS-ACTION:mailto:lisa@example.com -SEQUENCE:2 -END:VEVENT -END:VCALENDAR'; - - return $calendarData; - - } - - static function getTestTODO($type = 'due') { - - switch ($type) { - - case 'due' : - $extra = "DUE:20100104T000000Z"; - break; - case 'due2' : - $extra = "DUE:20060104T000000Z"; - break; - case 'due_date' : - $extra = "DUE;VALUE=DATE:20060104"; - break; - case 'due_tz' : - $extra = "DUE;TZID=Asia/Seoul:20060104T000000Z"; - break; - case 'due_dtstart' : - $extra = "DTSTART:20050223T060000Z\nDUE:20060104T000000Z"; - break; - case 'due_dtstart2' : - $extra = "DTSTART:20090223T060000Z\nDUE:20100104T000000Z"; - break; - case 'dtstart' : - $extra = 'DTSTART:20100223T060000Z'; - break; - case 'dtstart2' : - $extra = 'DTSTART:20060223T060000Z'; - break; - case 'dtstart_date' : - $extra = 'DTSTART;VALUE=DATE:20100223'; - break; - case 'dtstart_tz' : - $extra = 'DTSTART;TZID=Asia/Seoul:20100223T060000Z'; - break; - case 'dtstart_duration' : - $extra = "DTSTART:20061023T060000Z\nDURATION:PT1H"; - break; - case 'dtstart_duration2' : - $extra = "DTSTART:20101023T060000Z\nDURATION:PT1H"; - break; - case 'completed' : - $extra = 'COMPLETED:20060601T000000Z'; - break; - case 'completed2' : - $extra = 'COMPLETED:20090601T000000Z'; - break; - case 'created' : - $extra = 'CREATED:20060601T000000Z'; - break; - case 'created2' : - $extra = 'CREATED:20090601T000000Z'; - break; - case 'completedcreated' : - $extra = "CREATED:20060601T000000Z\nCOMPLETED:20070101T000000Z"; - break; - case 'completedcreated2' : - $extra = "CREATED:20090601T000000Z\nCOMPLETED:20100101T000000Z"; - break; - case 'notime' : - $extra = 'X-FILLER:oh hello'; - break; - default : - throw new Exception('Unknown type: ' . $type); - - } - - $todo = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Example Corp.//CalDAV Client//EN -BEGIN:VTODO -DTSTAMP:20060205T235335Z -' . $extra . ' -STATUS:NEEDS-ACTION -SUMMARY:Task #1 -UID:DDDEEB7915FA61233B861457@example.com -BEGIN:VALARM -ACTION:AUDIO -TRIGGER;RELATED=START:-PT10M -END:VALARM -END:VTODO -END:VCALENDAR'; - - return $todo; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php deleted file mode 100644 index 629df90c119..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/ValidateICalTest.php +++ /dev/null @@ -1,406 +0,0 @@ -<?php - -namespace Sabre\CalDAV; - -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class ValidateICalTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\DAV\Server - */ - protected $server; - /** - * @var Sabre\CalDAV\Backend\Mock - */ - protected $calBackend; - - function setUp() { - - $calendars = [ - [ - 'id' => 'calendar1', - 'principaluri' => 'principals/admin', - 'uri' => 'calendar1', - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new Xml\Property\SupportedCalendarComponentSet(['VEVENT', 'VTODO', 'VJOURNAL']), - ], - [ - 'id' => 'calendar2', - 'principaluri' => 'principals/admin', - 'uri' => 'calendar2', - '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new Xml\Property\SupportedCalendarComponentSet(['VTODO', 'VJOURNAL']), - ] - ]; - - $this->calBackend = new Backend\Mock($calendars, []); - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - - $tree = [ - new CalendarRoot($principalBackend, $this->calBackend), - ]; - - $this->server = new DAV\Server($tree); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->debugExceptions = true; - - $plugin = new Plugin(); - $this->server->addPlugin($plugin); - - $response = new HTTP\ResponseMock(); - $this->server->httpResponse = $response; - - } - - function request(HTTP\Request $request) { - - $this->server->httpRequest = $request; - $this->server->exec(); - - return $this->server->httpResponse; - - } - - function testCreateFile() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status); - - } - - function testCreateFileValid() { - - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics', - ['Prefer' => 'handling=strict'] - ); - - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -BEGIN:VEVENT -UID:foo -DTSTAMP:20160406T052348Z -DTSTART:20160706T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $request->setBody($ics); - - $response = $this->request($request); - - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5($ics) . '"'], - ], $response->getHeaders()); - - $expected = [ - 'uri' => 'blabla.ics', - 'calendardata' => $ics, - 'calendarid' => 'calendar1', - 'lastmodified' => null, - ]; - - $this->assertEquals($expected, $this->calBackend->getCalendarObject('calendar1', 'blabla.ics')); - - } - - function testCreateFileNoVersion() { - - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics', - ['Prefer' => 'handling=strict'] - ); - - $ics = <<<ICS -BEGIN:VCALENDAR -PRODID:foo -BEGIN:VEVENT -UID:foo -DTSTAMP:20160406T052348Z -DTSTART:20160706T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $request->setBody($ics); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFileNoVersionFixed() { - - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics', - ['Prefer' => 'handling=lenient'] - ); - - $ics = <<<ICS -BEGIN:VCALENDAR -PRODID:foo -BEGIN:VEVENT -UID:foo -DTSTAMP:20160406T052348Z -DTSTART:20160706T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $request->setBody($ics); - - $response = $this->request($request); - - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - 'X-Sabre-Ew-Gross' => ['iCalendar validation warning: VERSION MUST appear exactly once in a VCALENDAR component'], - ], $response->getHeaders()); - - $ics = <<<ICS -BEGIN:VCALENDAR\r -VERSION:2.0\r -PRODID:foo\r -BEGIN:VEVENT\r -UID:foo\r -DTSTAMP:20160406T052348Z\r -DTSTART:20160706T140000Z\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - $expected = [ - 'uri' => 'blabla.ics', - 'calendardata' => $ics, - 'calendarid' => 'calendar1', - 'lastmodified' => null, - ]; - - $this->assertEquals($expected, $this->calBackend->getCalendarObject('calendar1', 'blabla.ics')); - - } - - function testCreateFileNoComponents() { - - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics', - ['Prefer' => 'handling=strict'] - ); - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -END:VCALENDAR -ICS; - - $request->setBody($ics); - - $response = $this->request($request); - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFileNoUID() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFileVCard() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - $request->setBody("BEGIN:VCARD\r\nEND:VCARD\r\n"); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFile2Components() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nBEGIN:VJOURNAL\r\nUID:foo\r\nEND:VJOURNAL\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFile2UIDS() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nUID:bar\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testCreateFileWrongComponent() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nBEGIN:VFREEBUSY\r\nUID:foo\r\nEND:VFREEBUSY\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testUpdateFile() { - - $this->calBackend->createCalendarObject('calendar1', 'blabla.ics', 'foo'); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar1/blabla.ics', - ]); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status); - - } - - function testUpdateFileParsableBody() { - - $this->calBackend->createCalendarObject('calendar1', 'blabla.ics', 'foo'); - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics' - ); - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -BEGIN:VEVENT -UID:foo -DTSTAMP:20160406T052348Z -DTSTART:20160706T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $request->setBody($ics); - $response = $this->request($request); - - $this->assertEquals(204, $response->status); - - $expected = [ - 'uri' => 'blabla.ics', - 'calendardata' => $ics, - 'calendarid' => 'calendar1', - 'lastmodified' => null, - ]; - - $this->assertEquals($expected, $this->calBackend->getCalendarObject('calendar1', 'blabla.ics')); - - } - - function testCreateFileInvalidComponent() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar2/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testUpdateFileInvalidComponent() { - - $this->calBackend->createCalendarObject('calendar2', 'blabla.ics', 'foo'); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/calendars/admin/calendar2/blabla.ics', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(403, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - /** - * What we are testing here, is if we send in a latin1 character, the - * server should automatically transform this into UTF-8. - * - * More importantly. If any transformation happens, the etag must no longer - * be returned by the server. - */ - function testCreateFileModified() { - - $request = new HTTP\Request( - 'PUT', - '/calendars/admin/calendar1/blabla.ics' - ); - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -BEGIN:VEVENT -UID:foo -SUMMARY:Meeting in M\xfcnster -DTSTAMP:20160406T052348Z -DTSTART:20160706T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $request->setBody($ics); - - $response = $this->request($request); - - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - $this->assertNull($response->getHeader('ETag')); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteReplyTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteReplyTest.php deleted file mode 100644 index cd700893d67..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteReplyTest.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Notification; - -use Sabre\DAV; -use Sabre\Xml\Writer; - -class InviteReplyTest extends \PHPUnit_Framework_TestCase { - - /** - * @param array $notification - * @param string $expected - * @dataProvider dataProvider - */ - function testSerializers($notification, $expected) { - - $notification = new InviteReply($notification); - - $this->assertEquals('foo', $notification->getId()); - $this->assertEquals('"1"', $notification->getETag()); - - $simpleExpected = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:invite-reply/></cs:root>'; - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://calendarserver.org/ns/' => 'cs', - ]; - $writer->openMemory(); - $writer->startDocument('1.0', 'UTF-8'); - $writer->startElement('{http://calendarserver.org/ns/}root'); - $writer->write($notification); - $writer->endElement(); - - $this->assertEquals($simpleExpected, $writer->outputMemory()); - - $writer = new Writer(); - $writer->contextUri = '/'; - $writer->namespaceMap = [ - 'http://calendarserver.org/ns/' => 'cs', - 'DAV:' => 'd', - ]; - $writer->openMemory(); - $writer->startDocument('1.0', 'UTF-8'); - $writer->startElement('{http://calendarserver.org/ns/}root'); - $notification->xmlSerializeFull($writer); - $writer->endElement(); - - $this->assertXmlStringEqualsXmlString($expected, $writer->outputMemory()); - - - } - - function dataProvider() { - - $dtStamp = new \DateTime('2012-01-01 00:00:00 GMT'); - return [ - [ - [ - 'id' => 'foo', - 'dtStamp' => $dtStamp, - 'etag' => '"1"', - 'inReplyTo' => 'bar', - 'href' => 'mailto:foo@example.org', - 'type' => DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'hostUrl' => 'calendar' - ], -<<<FOO -<?xml version="1.0" encoding="UTF-8"?> -<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <cs:dtstamp>20120101T000000Z</cs:dtstamp> - <cs:invite-reply> - <cs:uid>foo</cs:uid> - <cs:in-reply-to>bar</cs:in-reply-to> - <d:href>mailto:foo@example.org</d:href> - <cs:invite-accepted/> - <cs:hosturl> - <d:href>/calendar</d:href> - </cs:hosturl> - </cs:invite-reply> -</cs:root> - -FOO - ], - [ - [ - 'id' => 'foo', - 'dtStamp' => $dtStamp, - 'etag' => '"1"', - 'inReplyTo' => 'bar', - 'href' => 'mailto:foo@example.org', - 'type' => DAV\Sharing\Plugin::INVITE_DECLINED, - 'hostUrl' => 'calendar', - 'summary' => 'Summary!' - ], -<<<FOO -<?xml version="1.0" encoding="UTF-8"?> -<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <cs:dtstamp>20120101T000000Z</cs:dtstamp> - <cs:invite-reply> - <cs:uid>foo</cs:uid> - <cs:in-reply-to>bar</cs:in-reply-to> - <d:href>mailto:foo@example.org</d:href> - <cs:invite-declined/> - <cs:hosturl> - <d:href>/calendar</d:href> - </cs:hosturl> - <cs:summary>Summary!</cs:summary> - </cs:invite-reply> -</cs:root> - -FOO - ], - - ]; - - } - - /** - * @expectedException InvalidArgumentException - */ - function testMissingArg() { - - new InviteReply([]); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testUnknownArg() { - - new InviteReply([ - 'foo-i-will-break' => true, - - 'id' => 1, - 'etag' => '"bla"', - 'href' => 'abc', - 'dtStamp' => 'def', - 'inReplyTo' => 'qrs', - 'type' => 'ghi', - 'hostUrl' => 'jkl', - ]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteTest.php deleted file mode 100644 index f03093916e9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/InviteTest.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Notification; - -use Sabre\CalDAV; -use Sabre\DAV; -use Sabre\Xml\Writer; - -class InviteTest extends DAV\Xml\XmlTest { - - /** - * @param array $notification - * @param string $expected - * @dataProvider dataProvider - */ - function testSerializers($notification, $expected) { - - $notification = new Invite($notification); - - $this->assertEquals('foo', $notification->getId()); - $this->assertEquals('"1"', $notification->getETag()); - - $simpleExpected = '<cs:invite-notification xmlns:d="DAV:" xmlns:cs="http://calendarserver.org/ns/" />' . "\n"; - $this->namespaceMap['http://calendarserver.org/ns/'] = 'cs'; - - $xml = $this->write($notification); - - $this->assertXmlStringEqualsXmlString($simpleExpected, $xml); - - $this->namespaceMap['urn:ietf:params:xml:ns:caldav'] = 'cal'; - $xml = $this->writeFull($notification); - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - - } - - function dataProvider() { - - $dtStamp = new \DateTime('2012-01-01 00:00:00', new \DateTimeZone('GMT')); - return [ - [ - [ - 'id' => 'foo', - 'dtStamp' => $dtStamp, - 'etag' => '"1"', - 'href' => 'mailto:foo@example.org', - 'type' => DAV\Sharing\Plugin::INVITE_ACCEPTED, - 'readOnly' => true, - 'hostUrl' => 'calendar', - 'organizer' => 'principal/user1', - 'commonName' => 'John Doe', - 'summary' => 'Awesome stuff!' - ], -<<<FOO -<?xml version="1.0" encoding="UTF-8"?> -<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:cal="urn:ietf:params:xml:ns:caldav"> - <cs:dtstamp>20120101T000000Z</cs:dtstamp> - <cs:invite-notification> - <cs:uid>foo</cs:uid> - <d:href>mailto:foo@example.org</d:href> - <cs:invite-accepted/> - <cs:hosturl> - <d:href>/calendar</d:href> - </cs:hosturl> - <cs:summary>Awesome stuff!</cs:summary> - <cs:access> - <cs:read/> - </cs:access> - <cs:organizer> - <d:href>/principal/user1</d:href> - <cs:common-name>John Doe</cs:common-name> - </cs:organizer> - <cs:organizer-cn>John Doe</cs:organizer-cn> - </cs:invite-notification> -</cs:root> - -FOO - ], - [ - [ - 'id' => 'foo', - 'dtStamp' => $dtStamp, - 'etag' => '"1"', - 'href' => 'mailto:foo@example.org', - 'type' => DAV\Sharing\Plugin::INVITE_NORESPONSE, - 'readOnly' => true, - 'hostUrl' => 'calendar', - 'organizer' => 'principal/user1', - 'firstName' => 'Foo', - 'lastName' => 'Bar', - ], -<<<FOO -<?xml version="1.0" encoding="UTF-8"?> -<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:" xmlns:cal="urn:ietf:params:xml:ns:caldav"> - <cs:dtstamp>20120101T000000Z</cs:dtstamp> - <cs:invite-notification> - <cs:uid>foo</cs:uid> - <d:href>mailto:foo@example.org</d:href> - <cs:invite-noresponse/> - <cs:hosturl> - <d:href>/calendar</d:href> - </cs:hosturl> - <cs:access> - <cs:read/> - </cs:access> - <cs:organizer> - <d:href>/principal/user1</d:href> - <cs:first-name>Foo</cs:first-name> - <cs:last-name>Bar</cs:last-name> - </cs:organizer> - <cs:organizer-first>Foo</cs:organizer-first> - <cs:organizer-last>Bar</cs:organizer-last> - </cs:invite-notification> -</cs:root> - -FOO - ], - - ]; - - } - - /** - * @expectedException InvalidArgumentException - */ - function testMissingArg() { - - new Invite([]); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testUnknownArg() { - - new Invite([ - 'foo-i-will-break' => true, - - 'id' => 1, - 'etag' => '"bla"', - 'href' => 'abc', - 'dtStamp' => 'def', - 'type' => 'ghi', - 'readOnly' => true, - 'hostUrl' => 'jkl', - 'organizer' => 'mno', - ]); - - } - - function writeFull($input) { - - $writer = new Writer(); - $writer->contextUri = '/'; - $writer->namespaceMap = $this->namespaceMap; - $writer->openMemory(); - $writer->startElement('{http://calendarserver.org/ns/}root'); - $input->xmlSerializeFull($writer); - $writer->endElement(); - return $writer->outputMemory(); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/SystemStatusTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/SystemStatusTest.php deleted file mode 100644 index 1f9034340f5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Notification/SystemStatusTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Notification; - -use Sabre\DAV; -use Sabre\Xml\Writer; - -class SystemStatusTest extends \PHPUnit_Framework_TestCase { - - /** - * @param array $notification - * @param string $expected1 - * @param string $expected2 - * @dataProvider dataProvider - */ - function testSerializers($notification, $expected1, $expected2) { - - $this->assertEquals('foo', $notification->getId()); - $this->assertEquals('"1"', $notification->getETag()); - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://calendarserver.org/ns/' => 'cs', - ]; - $writer->openMemory(); - $writer->startDocument('1.0', 'UTF-8'); - $writer->startElement('{http://calendarserver.org/ns/}root'); - $writer->write($notification); - $writer->endElement(); - $this->assertXmlStringEqualsXmlString($expected1, $writer->outputMemory()); - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://calendarserver.org/ns/' => 'cs', - 'DAV:' => 'd', - ]; - $writer->openMemory(); - $writer->startDocument('1.0', 'UTF-8'); - $writer->startElement('{http://calendarserver.org/ns/}root'); - $notification->xmlSerializeFull($writer); - $writer->endElement(); - $this->assertXmlStringEqualsXmlString($expected2, $writer->outputMemory()); - - } - - function dataProvider() { - - return [ - - [ - new SystemStatus('foo', '"1"'), - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="high"/></cs:root>' . "\n", - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="high"/></cs:root>' . "\n", - ], - [ - new SystemStatus('foo', '"1"', SystemStatus::TYPE_MEDIUM, 'bar'), - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="medium"/></cs:root>' . "\n", - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="medium"><cs:description>bar</cs:description></cs:systemstatus></cs:root>' . "\n", - ], - [ - new SystemStatus('foo', '"1"', SystemStatus::TYPE_LOW, null, 'http://example.org/'), - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/"><cs:systemstatus type="low"/></cs:root>' . "\n", - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<cs:root xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"><cs:systemstatus type="low"><d:href>http://example.org/</d:href></cs:systemstatus></cs:root>' . "\n", - ] - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/AllowedSharingModesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/AllowedSharingModesTest.php deleted file mode 100644 index 0602d4f24f4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/AllowedSharingModesTest.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; - -class AllowedSharingModesTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $sccs = new AllowedSharingModes(true, true); - $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\AllowedSharingModes', $sccs); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new AllowedSharingModes(true, true); - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs'; - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> - <d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> - <cs:can-be-shared/> - <cs:can-be-published/> -</d:root> -', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/EmailAddressSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/EmailAddressSetTest.php deleted file mode 100644 index 30651a080e4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/EmailAddressSetTest.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\DAV\Xml\XmlTest; - -class EmailAddressSetTest extends XmlTest { - - protected $namespaceMap = [ - \Sabre\CalDAV\Plugin::NS_CALENDARSERVER => 'cs', - 'DAV:' => 'd', - ]; - - function testSimple() { - - $eas = new EmailAddressSet(['foo@example.org']); - $this->assertEquals(['foo@example.org'], $eas->getValue()); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new EmailAddressSet(['foo@example.org']); - - $xml = $this->write([ - '{DAV:}root' => $property - ]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cs="' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '"> -<cs:email-address>foo@example.org</cs:email-address> -</d:root>', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/InviteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/InviteTest.php deleted file mode 100644 index 1397dcca2b7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/InviteTest.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; -use Sabre\DAV\Sharing\Plugin as SP; -use Sabre\DAV\Xml\Element\Sharee; - -class InviteTest extends DAV\Xml\XmlTest { - - function setUp() { - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs'; - - - } - - function testSimple() { - - $invite = new Invite([]); - $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\Invite', $invite); - $this->assertEquals([], $invite->getValue()); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new Invite([ - new Sharee([ - 'href' => 'mailto:thedoctor@example.org', - 'properties' => ['{DAV:}displayname' => 'The Doctor'], - 'inviteStatus' => SP::INVITE_ACCEPTED, - 'access' => SP::ACCESS_SHAREDOWNER, - ]), - new Sharee([ - 'href' => 'mailto:user1@example.org', - 'inviteStatus' => SP::INVITE_ACCEPTED, - 'access' => SP::ACCESS_READWRITE, - ]), - new Sharee([ - 'href' => 'mailto:user2@example.org', - 'properties' => ['{DAV:}displayname' => 'John Doe'], - 'inviteStatus' => SP::INVITE_DECLINED, - 'access' => SP::ACCESS_READ, - ]), - new Sharee([ - 'href' => 'mailto:user3@example.org', - 'properties' => ['{DAV:}displayname' => 'Joe Shmoe'], - 'inviteStatus' => SP::INVITE_NORESPONSE, - 'access' => SP::ACCESS_READ, - 'comment' => 'Something, something', - ]), - new Sharee([ - 'href' => 'mailto:user4@example.org', - 'properties' => ['{DAV:}displayname' => 'Hoe Boe'], - 'inviteStatus' => SP::INVITE_INVALID, - 'access' => SP::ACCESS_READ, - ]), - ]); - - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> - <cs:organizer> - <d:href>mailto:thedoctor@example.org</d:href> - <cs:common-name>The Doctor</cs:common-name> - </cs:organizer> - <cs:user> - <cs:invite-accepted/> - <cs:access> - <cs:read-write/> - </cs:access> - <d:href>mailto:user1@example.org</d:href> - </cs:user> - <cs:user> - <cs:invite-declined/> - <cs:access> - <cs:read/> - </cs:access> - <d:href>mailto:user2@example.org</d:href> - <cs:common-name>John Doe</cs:common-name> - </cs:user> - <cs:user> - <cs:invite-noresponse/> - <cs:access> - <cs:read/> - </cs:access> - <d:href>mailto:user3@example.org</d:href> - <cs:common-name>Joe Shmoe</cs:common-name> - <cs:summary>Something, something</cs:summary> - </cs:user> - <cs:user> - <cs:invite-invalid/> - <cs:access> - <cs:read/> - </cs:access> - <d:href>mailto:user4@example.org</d:href> - <cs:common-name>Hoe Boe</cs:common-name> - </cs:user> -</d:root> -', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/ScheduleCalendarTranspTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/ScheduleCalendarTranspTest.php deleted file mode 100644 index 729db4569e5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/ScheduleCalendarTranspTest.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; - -class ScheduleCalendarTranspTest extends DAV\Xml\XmlTest { - - function setUp() { - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs'; - - - } - - function testSimple() { - - $prop = new ScheduleCalendarTransp(ScheduleCalendarTransp::OPAQUE); - $this->assertEquals( - ScheduleCalendarTransp::OPAQUE, - $prop->getValue() - ); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testBadValue() { - - new ScheduleCalendarTransp('ahhh'); - - } - - /** - * @depends testSimple - */ - function testSerializeOpaque() { - - $property = new ScheduleCalendarTransp(ScheduleCalendarTransp::OPAQUE); - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> - <cal:opaque /> -</d:root> -', $xml); - - } - - /** - * @depends testSimple - */ - function testSerializeTransparent() { - - $property = new ScheduleCalendarTransp(ScheduleCalendarTransp::TRANSPARENT); - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> - <cal:transparent /> -</d:root> -', $xml); - - } - - function testUnserializeTransparent() { - - $cal = CalDAV\Plugin::NS_CALDAV; - $cs = CalDAV\Plugin::NS_CALENDARSERVER; - -$xml = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="$cal" xmlns:cs="$cs"> - <cal:transparent /> -</d:root> -XML; - - $result = $this->parse( - $xml, - ['{DAV:}root' => 'Sabre\\CalDAV\\Xml\\Property\\ScheduleCalendarTransp'] - ); - - $this->assertEquals( - new ScheduleCalendarTransp(ScheduleCalendarTransp::TRANSPARENT), - $result['value'] - ); - - } - - function testUnserializeOpaque() { - - $cal = CalDAV\Plugin::NS_CALDAV; - $cs = CalDAV\Plugin::NS_CALENDARSERVER; - -$xml = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="$cal" xmlns:cs="$cs"> - <cal:opaque /> -</d:root> -XML; - - $result = $this->parse( - $xml, - ['{DAV:}root' => 'Sabre\\CalDAV\\Xml\\Property\\ScheduleCalendarTransp'] - ); - - $this->assertEquals( - new ScheduleCalendarTransp(ScheduleCalendarTransp::OPAQUE), - $result['value'] - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarComponentSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarComponentSetTest.php deleted file mode 100644 index 1acc402d36b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarComponentSetTest.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; - -class SupportedCalendarComponentSetTest extends DAV\Xml\XmlTest { - - function setUp() { - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $this->namespaceMap[CalDAV\Plugin::NS_CALENDARSERVER] = 'cs'; - - } - - function testSimple() { - - $prop = new SupportedCalendarComponentSet(['VEVENT']); - $this->assertEquals( - ['VEVENT'], - $prop->getValue() - ); - - } - - function testMultiple() { - - $prop = new SupportedCalendarComponentSet(['VEVENT', 'VTODO']); - $this->assertEquals( - ['VEVENT', 'VTODO'], - $prop->getValue() - ); - - } - - /** - * @depends testSimple - * @depends testMultiple - */ - function testSerialize() { - - $property = new SupportedCalendarComponentSet(['VEVENT', 'VTODO']); - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '" xmlns:cs="' . CalDAV\Plugin::NS_CALENDARSERVER . '"> - <cal:comp name="VEVENT"/> - <cal:comp name="VTODO"/> -</d:root> -', $xml); - - } - - function testUnserialize() { - - $cal = CalDAV\Plugin::NS_CALDAV; - $cs = CalDAV\Plugin::NS_CALENDARSERVER; - -$xml = <<<XML -<?xml version="1.0"?> - <d:root xmlns:cal="$cal" xmlns:cs="$cs" xmlns:d="DAV:"> - <cal:comp name="VEVENT"/> - <cal:comp name="VTODO"/> - </d:root> -XML; - - $result = $this->parse( - $xml, - ['{DAV:}root' => 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet'] - ); - - $this->assertEquals( - new SupportedCalendarComponentSet(['VEVENT', 'VTODO']), - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\Xml\ParseException - */ - function testUnserializeEmpty() { - - $cal = CalDAV\Plugin::NS_CALDAV; - $cs = CalDAV\Plugin::NS_CALENDARSERVER; - -$xml = <<<XML -<?xml version="1.0"?> - <d:root xmlns:cal="$cal" xmlns:cs="$cs" xmlns:d="DAV:"> - </d:root> -XML; - - $result = $this->parse( - $xml, - ['{DAV:}root' => 'Sabre\\CalDAV\\Xml\\Property\\SupportedCalendarComponentSet'] - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarDataTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarDataTest.php deleted file mode 100644 index 442b6a059f4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCalendarDataTest.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; - -class SupportedCalendarDataTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $sccs = new SupportedCalendarData(); - $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\SupportedCalendarData', $sccs); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $property = new SupportedCalendarData(); - - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '"> -<cal:calendar-data content-type="text/calendar" version="2.0"/> -<cal:calendar-data content-type="application/calendar+json"/> -</d:root>', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCollationSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCollationSetTest.php deleted file mode 100644 index e009fb6cd85..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Property/SupportedCollationSetTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Property; - -use Sabre\CalDAV; -use Sabre\DAV; - -class SupportedCollationSetTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $scs = new SupportedCollationSet(); - $this->assertInstanceOf('Sabre\CalDAV\Xml\Property\SupportedCollationSet', $scs); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new SupportedCollationSet(); - - $this->namespaceMap[CalDAV\Plugin::NS_CALDAV] = 'cal'; - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:cal="' . CalDAV\Plugin::NS_CALDAV . '"> -<cal:supported-collation>i;ascii-casemap</cal:supported-collation> -<cal:supported-collation>i;octet</cal:supported-collation> -<cal:supported-collation>i;unicode-casemap</cal:supported-collation> -</d:root>', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/CalendarQueryReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/CalendarQueryReportTest.php deleted file mode 100644 index d5e87db854b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/CalendarQueryReportTest.php +++ /dev/null @@ -1,369 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Request; - -use DateTimeImmutable; -use DateTimeZone; -use Sabre\DAV\Xml\XmlTest; - -class CalendarQueryReportTest extends XmlTest { - - protected $elementMap = [ - '{urn:ietf:params:xml:ns:caldav}calendar-query' => 'Sabre\\CalDAV\\Xml\\Request\CalendarQueryReport', - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $result = $this->parse($xml); - $calendarQueryReport = new CalendarQueryReport(); - $calendarQueryReport->properties = [ - '{DAV:}getetag', - ]; - $calendarQueryReport->filters = [ - 'name' => 'VCALENDAR', - 'is-not-defined' => false, - 'comp-filters' => [], - 'prop-filters' => [], - 'time-range' => false, - ]; - - $this->assertEquals( - $calendarQueryReport, - $result['value'] - ); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testDeserializeNoFilter() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - </d:prop> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - function testDeserializeComplex() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data content-type="application/json+calendar" version="2.0"> - <c:expand start="20150101T000000Z" end="20160101T000000Z" /> - </c:calendar-data> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR"> - <c:comp-filter name="VEVENT"> - <c:time-range start="20150101T000000Z" end="20160101T000000Z" /> - <c:prop-filter name="UID" /> - <c:comp-filter name="VALARM"> - <c:is-not-defined /> - </c:comp-filter> - <c:prop-filter name="X-PROP"> - <c:param-filter name="X-PARAM" /> - <c:param-filter name="X-PARAM2"> - <c:is-not-defined /> - </c:param-filter> - <c:param-filter name="X-PARAM3"> - <c:text-match negate-condition="yes">hi</c:text-match> - </c:param-filter> - </c:prop-filter> - <c:prop-filter name="X-PROP2"> - <c:is-not-defined /> - </c:prop-filter> - <c:prop-filter name="X-PROP3"> - <c:time-range start="20150101T000000Z" end="20160101T000000Z" /> - </c:prop-filter> - <c:prop-filter name="X-PROP4"> - <c:text-match>Hello</c:text-match> - </c:prop-filter> - </c:comp-filter> - </c:comp-filter> - </c:filter> -</c:calendar-query> -XML; - - $result = $this->parse($xml); - $calendarQueryReport = new CalendarQueryReport(); - $calendarQueryReport->version = '2.0'; - $calendarQueryReport->contentType = 'application/json+calendar'; - $calendarQueryReport->properties = [ - '{DAV:}getetag', - '{urn:ietf:params:xml:ns:caldav}calendar-data', - ]; - $calendarQueryReport->expand = [ - 'start' => new DateTimeImmutable('2015-01-01 00:00:00', new DateTimeZone('UTC')), - 'end' => new DateTimeImmutable('2016-01-01 00:00:00', new DateTimeZone('UTC')), - ]; - $calendarQueryReport->filters = [ - 'name' => 'VCALENDAR', - 'is-not-defined' => false, - 'comp-filters' => [ - [ - 'name' => 'VEVENT', - 'is-not-defined' => false, - 'comp-filters' => [ - [ - 'name' => 'VALARM', - 'is-not-defined' => true, - 'comp-filters' => [], - 'prop-filters' => [], - 'time-range' => false, - ], - ], - 'prop-filters' => [ - [ - 'name' => 'UID', - 'is-not-defined' => false, - 'time-range' => false, - 'text-match' => null, - 'param-filters' => [], - ], - [ - 'name' => 'X-PROP', - 'is-not-defined' => false, - 'time-range' => false, - 'text-match' => null, - 'param-filters' => [ - [ - 'name' => 'X-PARAM', - 'is-not-defined' => false, - 'text-match' => null, - ], - [ - 'name' => 'X-PARAM2', - 'is-not-defined' => true, - 'text-match' => null, - ], - [ - 'name' => 'X-PARAM3', - 'is-not-defined' => false, - 'text-match' => [ - 'negate-condition' => true, - 'collation' => 'i;ascii-casemap', - 'value' => 'hi', - ], - ], - ], - ], - [ - 'name' => 'X-PROP2', - 'is-not-defined' => true, - 'time-range' => false, - 'text-match' => null, - 'param-filters' => [], - ], - [ - 'name' => 'X-PROP3', - 'is-not-defined' => false, - 'time-range' => [ - 'start' => new DateTimeImmutable('2015-01-01 00:00:00', new DateTimeZone('UTC')), - 'end' => new DateTimeImmutable('2016-01-01 00:00:00', new DateTimeZone('UTC')), - ], - 'text-match' => null, - 'param-filters' => [], - ], - [ - 'name' => 'X-PROP4', - 'is-not-defined' => false, - 'time-range' => false, - 'text-match' => [ - 'negate-condition' => false, - 'collation' => 'i;ascii-casemap', - 'value' => 'Hello', - ], - 'param-filters' => [], - ], - ], - 'time-range' => [ - 'start' => new DateTimeImmutable('2015-01-01 00:00:00', new DateTimeZone('UTC')), - 'end' => new DateTimeImmutable('2016-01-01 00:00:00', new DateTimeZone('UTC')), - ] - ], - ], - 'prop-filters' => [], - 'time-range' => false, - ]; - - $this->assertEquals( - $calendarQueryReport, - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeDoubleTopCompFilter() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data content-type="application/json+calendar" version="2.0"> - <c:expand start="20150101T000000Z" end="20160101T000000Z" /> - </c:calendar-data> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeMissingExpandEnd() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data content-type="application/json+calendar" version="2.0"> - <c:expand start="20150101T000000Z" /> - </c:calendar-data> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeExpandEndBeforeStart() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data content-type="application/json+calendar" version="2.0"> - <c:expand start="20150101T000000Z" end="20140101T000000Z" /> - </c:calendar-data> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR" /> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeTimeRangeOnVCALENDAR() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR"> - <c:time-range start="20150101T000000Z" end="20160101T000000Z" /> - </c:comp-filter> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeTimeRangeEndBeforeStart() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR"> - <c:comp-filter name="VEVENT"> - <c:time-range start="20150101T000000Z" end="20140101T000000Z" /> - </c:comp-filter> - </c:comp-filter> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeTimeRangePropEndBeforeStart() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> - <d:prop> - <d:getetag /> - <c:calendar-data /> - </d:prop> - <c:filter> - <c:comp-filter name="VCALENDAR"> - <c:comp-filter name="VEVENT"> - <c:prop-filter name="DTSTART"> - <c:time-range start="20150101T000000Z" end="20140101T000000Z" /> - </c:prop-filter> - </c:comp-filter> - </c:comp-filter> - </c:filter> -</c:calendar-query> -XML; - - $this->parse($xml); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/InviteReplyTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/InviteReplyTest.php deleted file mode 100644 index b0770899914..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/InviteReplyTest.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Request; - -use Sabre\DAV; -use Sabre\DAV\Xml\XmlTest; - -class InviteReplyTest extends XmlTest { - - protected $elementMap = [ - '{http://calendarserver.org/ns/}invite-reply' => 'Sabre\\CalDAV\\Xml\\Request\\InviteReply', - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <d:href>/principal/1</d:href> - <cs:hosturl><d:href>/calendar/1</d:href></cs:hosturl> - <cs:invite-accepted /> - <cs:in-reply-to>blabla</cs:in-reply-to> - <cs:summary>Summary</cs:summary> -</cs:invite-reply> -XML; - - $result = $this->parse($xml); - $inviteReply = new InviteReply('/principal/1', '/calendar/1', 'blabla', 'Summary', DAV\Sharing\Plugin::INVITE_ACCEPTED); - - $this->assertEquals( - $inviteReply, - $result['value'] - ); - - } - - function testDeserializeDeclined() { - - $xml = <<<XML -<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <d:href>/principal/1</d:href> - <cs:hosturl><d:href>/calendar/1</d:href></cs:hosturl> - <cs:invite-declined /> - <cs:in-reply-to>blabla</cs:in-reply-to> - <cs:summary>Summary</cs:summary> -</cs:invite-reply> -XML; - - $result = $this->parse($xml); - $inviteReply = new InviteReply('/principal/1', '/calendar/1', 'blabla', 'Summary', DAV\Sharing\Plugin::INVITE_DECLINED); - - $this->assertEquals( - $inviteReply, - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeNoHostUrl() { - - $xml = <<<XML -<?xml version="1.0"?> -<cs:invite-reply xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:"> - <d:href>/principal/1</d:href> - <cs:invite-declined /> - <cs:in-reply-to>blabla</cs:in-reply-to> - <cs:summary>Summary</cs:summary> -</cs:invite-reply> -XML; - - $this->parse($xml); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/ShareTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/ShareTest.php deleted file mode 100644 index 73a2c3a13d2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CalDAV/Xml/Request/ShareTest.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -namespace Sabre\CalDAV\Xml\Request; - -use Sabre\DAV\Xml\Element\Sharee; -use Sabre\DAV\Xml\XmlTest; - -class ShareTest extends XmlTest { - - protected $elementMap = [ - '{http://calendarserver.org/ns/}share' => 'Sabre\\CalDAV\\Xml\\Request\\Share', - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> - <CS:share xmlns:D="DAV:" - xmlns:CS="http://calendarserver.org/ns/"> - <CS:set> - <D:href>mailto:eric@example.com</D:href> - <CS:common-name>Eric York</CS:common-name> - <CS:summary>Shared workspace</CS:summary> - <CS:read-write /> - </CS:set> - <CS:remove> - <D:href>mailto:foo@bar</D:href> - </CS:remove> - </CS:share> -XML; - - $result = $this->parse($xml); - $share = new Share([ - new Sharee([ - 'href' => 'mailto:eric@example.com', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE, - 'properties' => [ - '{DAV:}displayname' => 'Eric York', - ], - 'comment' => 'Shared workspace', - ]), - new Sharee([ - 'href' => 'mailto:foo@bar', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS, - ]), - ]); - - $this->assertEquals( - $share, - $result['value'] - ); - - } - - function testDeserializeMinimal() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> - <CS:share xmlns:D="DAV:" - xmlns:CS="http://calendarserver.org/ns/"> - <CS:set> - <D:href>mailto:eric@example.com</D:href> - <CS:read /> - </CS:set> - </CS:share> -XML; - - $result = $this->parse($xml); - $share = new Share([ - new Sharee([ - 'href' => 'mailto:eric@example.com', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - ]), - ]); - - $this->assertEquals( - $share, - $result['value'] - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AbstractPluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AbstractPluginTest.php deleted file mode 100644 index 552e2ba77e5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AbstractPluginTest.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; - -abstract class AbstractPluginTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CardDAV\Plugin - */ - protected $plugin; - /** - * @var Sabre\DAV\Server - */ - protected $server; - /** - * @var Sabre\CardDAV\Backend\Mock; - */ - protected $backend; - - function setUp() { - - $this->backend = new Backend\Mock(); - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - - $tree = [ - new AddressBookRoot($principalBackend, $this->backend), - new DAVACL\PrincipalCollection($principalBackend) - ]; - - $this->plugin = new Plugin(); - $this->plugin->directories = ['directory']; - $this->server = new DAV\Server($tree); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->addPlugin($this->plugin); - $this->server->debugExceptions = true; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookHomeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookHomeTest.php deleted file mode 100644 index 871f4a457c1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookHomeTest.php +++ /dev/null @@ -1,159 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV\MkCol; - -class AddressBookHomeTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CardDAV\AddressBookHome - */ - protected $s; - protected $backend; - - function setUp() { - - $this->backend = new Backend\Mock(); - $this->s = new AddressBookHome( - $this->backend, - 'principals/user1' - ); - - } - - function testGetName() { - - $this->assertEquals('user1', $this->s->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testSetName() { - - $this->s->setName('user2'); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testDelete() { - - $this->s->delete(); - - } - - function testGetLastModified() { - - $this->assertNull($this->s->getLastModified()); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testCreateFile() { - - $this->s->createFile('bla'); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testCreateDirectory() { - - $this->s->createDirectory('bla'); - - } - - function testGetChild() { - - $child = $this->s->getChild('book1'); - $this->assertInstanceOf('Sabre\\CardDAV\\AddressBook', $child); - $this->assertEquals('book1', $child->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testGetChild404() { - - $this->s->getChild('book2'); - - } - - function testGetChildren() { - - $children = $this->s->getChildren(); - $this->assertEquals(2, count($children)); - $this->assertInstanceOf('Sabre\\CardDAV\\AddressBook', $children[0]); - $this->assertEquals('book1', $children[0]->getName()); - - } - - function testCreateExtendedCollection() { - - $resourceType = [ - '{' . Plugin::NS_CARDDAV . '}addressbook', - '{DAV:}collection', - ]; - $this->s->createExtendedCollection('book2', new MkCol($resourceType, ['{DAV:}displayname' => 'a-book 2'])); - - $this->assertEquals([ - 'id' => 'book2', - 'uri' => 'book2', - '{DAV:}displayname' => 'a-book 2', - 'principaluri' => 'principals/user1', - ], $this->backend->addressBooks[2]); - - } - - /** - * @expectedException Sabre\DAV\Exception\InvalidResourceType - */ - function testCreateExtendedCollectionInvalid() { - - $resourceType = [ - '{DAV:}collection', - ]; - $this->s->createExtendedCollection('book2', new MkCol($resourceType, ['{DAV:}displayname' => 'a-book 2'])); - - } - - - function testACLMethods() { - - $this->assertEquals('principals/user1', $this->s->getOwner()); - $this->assertNull($this->s->getGroup()); - $this->assertEquals([ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - ], $this->s->getACL()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $this->s->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $this->assertNull( - $this->s->getSupportedPrivilegeSet() - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php deleted file mode 100644 index f8da38a16dc..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php +++ /dev/null @@ -1,355 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/CardDAV/AbstractPluginTest.php'; -require_once 'Sabre/HTTP/ResponseMock.php'; - -class AddressBookQueryTest extends AbstractPluginTest { - - function testQuery() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1', - ['Depth' => '1'] - ); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="uid" /> - </c:filter> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - ], - ], - '/addressbooks/user1/book1/card2' => [ - 404 => [ - '{DAV:}getetag' => null, - ], - ] - ], $result); - - - } - - function testQueryDepth0() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1/card1', - ['Depth' => '0'] - ); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="uid" /> - </c:filter> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - ], - ], - ], $result); - - - } - - function testQueryNoMatch() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1', - ['Depth' => '1'] - ); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="email" /> - </c:filter> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([], $result); - - } - - function testQueryLimit() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/addressbooks/user1/book1', - 'HTTP_DEPTH' => '1', - ]); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="uid" /> - </c:filter> - <c:limit><c:nresults>1</c:nresults></c:limit> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - ], - ], - ], $result); - - - } - - function testJson() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1/card1', - ['Depth' => '0'] - ); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <c:address-data content-type="application/vcard+json" /> - <d:getetag /> - </d:prop> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $vobjVersion = \Sabre\VObject\Version::VERSION; - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - '{urn:ietf:params:xml:ns:carddav}address-data' => '["vcard",[["version",{},"text","4.0"],["prodid",{},"text","-\/\/Sabre\/\/Sabre VObject ' . $vobjVersion . '\/\/EN"],["uid",{},"text","12345"]]]', - ], - ], - ], $result); - - } - - function testVCard4() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1/card1', - ['Depth' => '0'] - ); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <c:address-data content-type="text/vcard" version="4.0" /> - <d:getetag /> - </d:prop> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $vobjVersion = \Sabre\VObject\Version::VERSION; - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\r\nVERSION:4.0\r\nPRODID:-//Sabre//Sabre VObject $vobjVersion//EN\r\nUID:12345\r\nEND:VCARD\r\n", - ], - ], - ], $result); - - } - - function testAddressBookDepth0() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book1', - ['Depth' => '0'] - ); - - $request->setBody( - '<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <c:address-data content-type="application/vcard+json" /> - <d:getetag /> - </d:prop> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(415, $response->status, 'Incorrect status code. Full response body:' . $response->body); - } - - function testAddressBookProperties() { - - $request = new HTTP\Request( - 'REPORT', - '/addressbooks/user1/book3', - ['Depth' => '1'] - ); - - $request->setBody( - '<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <c:address-data> - <c:prop name="FN"/> - <c:prop name="BDAY"/> - </c:address-data> - <d:getetag /> - </d:prop> -</c:addressbook-query>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([ - '/addressbooks/user1/book3/card3' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD") . '"', - '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\r\nVERSION:3.0\r\nUID:12345\r\nFN:Test-Card\r\nEND:VCARD\r\n", - ], - ], - ], $result); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookRootTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookRootTest.php deleted file mode 100644 index fc20480f2d4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookRootTest.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAVACL; - -class AddressBookRootTest extends \PHPUnit_Framework_TestCase { - - function testGetName() { - - $pBackend = new DAVACL\PrincipalBackend\Mock(); - $cBackend = new Backend\Mock(); - $root = new AddressBookRoot($pBackend, $cBackend); - $this->assertEquals('addressbooks', $root->getName()); - - } - - function testGetChildForPrincipal() { - - $pBackend = new DAVACL\PrincipalBackend\Mock(); - $cBackend = new Backend\Mock(); - $root = new AddressBookRoot($pBackend, $cBackend); - - $children = $root->getChildren(); - $this->assertEquals(3, count($children)); - - $this->assertInstanceOf('Sabre\\CardDAV\\AddressBookHome', $children[0]); - $this->assertEquals('user1', $children[0]->getName()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php deleted file mode 100644 index 1f0064dd38a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV\PropPatch; - -class AddressBookTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\DAV\DbTestHelperTrait; - - /** - * @var Sabre\CardDAV\AddressBook - */ - protected $ab; - protected $backend; - - function setUp() { - - $this->backend = new Backend\Mock(); - $this->ab = new AddressBook( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - '{DAV:}displayname' => 'd-name', - 'principaluri' => 'principals/user1', - ] - ); - - } - - function testGetName() { - - $this->assertEquals('book1', $this->ab->getName()); - - } - - function testGetChild() { - - $card = $this->ab->getChild('card1'); - $this->assertInstanceOf('Sabre\\CardDAV\\Card', $card); - $this->assertEquals('card1', $card->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testGetChildNotFound() { - - $card = $this->ab->getChild('card3'); - - } - - function testGetChildren() { - - $cards = $this->ab->getChildren(); - $this->assertEquals(2, count($cards)); - - $this->assertEquals('card1', $cards[0]->getName()); - $this->assertEquals('card2', $cards[1]->getName()); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testCreateDirectory() { - - $this->ab->createDirectory('name'); - - } - - function testCreateFile() { - - $file = fopen('php://memory', 'r+'); - fwrite($file, 'foo'); - rewind($file); - $this->ab->createFile('card2', $file); - - $this->assertEquals('foo', $this->backend->cards['foo']['card2']); - - } - - function testDelete() { - - $this->ab->delete(); - $this->assertEquals(1, count($this->backend->addressBooks)); - - } - - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testSetName() { - - $this->ab->setName('foo'); - - } - - function testGetLastModified() { - - $this->assertNull($this->ab->getLastModified()); - - } - - function testUpdateProperties() { - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'barrr', - ]); - $this->ab->propPatch($propPatch); - $this->assertTrue($propPatch->commit()); - - $this->assertEquals('barrr', $this->backend->addressBooks[0]['{DAV:}displayname']); - - } - - function testGetProperties() { - - $props = $this->ab->getProperties(['{DAV:}displayname']); - $this->assertEquals([ - '{DAV:}displayname' => 'd-name', - ], $props); - - } - - function testACLMethods() { - - $this->assertEquals('principals/user1', $this->ab->getOwner()); - $this->assertNull($this->ab->getGroup()); - $this->assertEquals([ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - ], $this->ab->getACL()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $this->ab->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $this->assertNull( - $this->ab->getSupportedPrivilegeSet() - ); - - } - - function testGetSyncTokenNoSyncSupport() { - - $this->assertNull($this->ab->getSyncToken()); - - } - function testGetChangesNoSyncSupport() { - - $this->assertNull($this->ab->getChanges(1, null)); - - } - - function testGetSyncToken() { - - $this->driver = 'sqlite'; - $this->dropTables(['addressbooks', 'cards', 'addressbookchanges']); - $this->createSchema('addressbooks'); - $backend = new Backend\PDO( - $this->getPDO() - ); - $ab = new AddressBook($backend, ['id' => 1, '{DAV:}sync-token' => 2]); - $this->assertEquals(2, $ab->getSyncToken()); - } - - function testGetSyncToken2() { - - $this->driver = 'sqlite'; - $this->dropTables(['addressbooks', 'cards', 'addressbookchanges']); - $this->createSchema('addressbooks'); - $backend = new Backend\PDO( - $this->getPDO() - ); - $ab = new AddressBook($backend, ['id' => 1, '{http://sabredav.org/ns}sync-token' => 2]); - $this->assertEquals(2, $ab->getSyncToken()); - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/AbstractPDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/AbstractPDOTest.php deleted file mode 100644 index f62bfb1ae68..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/AbstractPDOTest.php +++ /dev/null @@ -1,373 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Backend; - -use Sabre\CardDAV; -use Sabre\DAV\PropPatch; - -abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\DAV\DbTestHelperTrait; - - /** - * @var CardDAV\Backend\PDO - */ - protected $backend; - - function setUp() { - - $this->dropTables([ - 'addressbooks', - 'cards', - 'addressbookchanges', - ]); - $this->createSchema('addressbooks'); - $pdo = $this->getPDO(); - - $this->backend = new PDO($pdo); - $pdo->exec("INSERT INTO addressbooks (principaluri, displayname, uri, description, synctoken) VALUES ('principals/user1', 'book1', 'book1', 'addressbook 1', 1)"); - $pdo->exec("INSERT INTO cards (addressbookid, carddata, uri, lastmodified, etag, size) VALUES (1, 'card1', 'card1', 0, '" . md5('card1') . "', 5)"); - - } - - function testGetAddressBooksForUser() { - - $result = $this->backend->getAddressBooksForUser('principals/user1'); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'book1', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 1', - '{http://calendarserver.org/ns/}getctag' => 1, - '{http://sabredav.org/ns}sync-token' => 1 - ] - ]; - - $this->assertEquals($expected, $result); - - } - - function testUpdateAddressBookInvalidProp() { - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'updated', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'updated', - '{DAV:}foo' => 'bar', - ]); - - $this->backend->updateAddressBook(1, $propPatch); - $result = $propPatch->commit(); - - $this->assertFalse($result); - - $result = $this->backend->getAddressBooksForUser('principals/user1'); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'book1', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 1', - '{http://calendarserver.org/ns/}getctag' => 1, - '{http://sabredav.org/ns}sync-token' => 1 - ] - ]; - - $this->assertEquals($expected, $result); - - } - - function testUpdateAddressBookNoProps() { - - $propPatch = new PropPatch([ - ]); - - $this->backend->updateAddressBook(1, $propPatch); - $result = $propPatch->commit(); - $this->assertTrue($result); - - $result = $this->backend->getAddressBooksForUser('principals/user1'); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'book1', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 1', - '{http://calendarserver.org/ns/}getctag' => 1, - '{http://sabredav.org/ns}sync-token' => 1 - ] - ]; - - $this->assertEquals($expected, $result); - - - } - - function testUpdateAddressBookSuccess() { - - $propPatch = new PropPatch([ - '{DAV:}displayname' => 'updated', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'updated', - ]); - - $this->backend->updateAddressBook(1, $propPatch); - $result = $propPatch->commit(); - - $this->assertTrue($result); - - $result = $this->backend->getAddressBooksForUser('principals/user1'); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'updated', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'updated', - '{http://calendarserver.org/ns/}getctag' => 2, - '{http://sabredav.org/ns}sync-token' => 2 - ] - ]; - - $this->assertEquals($expected, $result); - - - } - - function testDeleteAddressBook() { - - $this->backend->deleteAddressBook(1); - - $this->assertEquals([], $this->backend->getAddressBooksForUser('principals/user1')); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testCreateAddressBookUnsupportedProp() { - - $this->backend->createAddressBook('principals/user1', 'book2', [ - '{DAV:}foo' => 'bar', - ]); - - } - - function testCreateAddressBookSuccess() { - - $this->backend->createAddressBook('principals/user1', 'book2', [ - '{DAV:}displayname' => 'book2', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 2', - ]); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'book1', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 1', - '{http://calendarserver.org/ns/}getctag' => 1, - '{http://sabredav.org/ns}sync-token' => 1, - ], - [ - 'id' => 2, - 'uri' => 'book2', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'book2', - '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description' => 'addressbook 2', - '{http://calendarserver.org/ns/}getctag' => 1, - '{http://sabredav.org/ns}sync-token' => 1, - ] - ]; - $result = $this->backend->getAddressBooksForUser('principals/user1'); - $this->assertEquals($expected, $result); - - } - - function testGetCards() { - - $result = $this->backend->getCards(1); - - $expected = [ - [ - 'id' => 1, - 'uri' => 'card1', - 'lastmodified' => 0, - 'etag' => '"' . md5('card1') . '"', - 'size' => 5 - ] - ]; - - $this->assertEquals($expected, $result); - - } - - function testGetCard() { - - $result = $this->backend->getCard(1, 'card1'); - - $expected = [ - 'id' => 1, - 'uri' => 'card1', - 'carddata' => 'card1', - 'lastmodified' => 0, - 'etag' => '"' . md5('card1') . '"', - 'size' => 5 - ]; - - if (is_resource($result['carddata'])) { - $result['carddata'] = stream_get_contents($result['carddata']); - } - - $this->assertEquals($expected, $result); - - } - - /** - * @depends testGetCard - */ - function testCreateCard() { - - $result = $this->backend->createCard(1, 'card2', 'data2'); - $this->assertEquals('"' . md5('data2') . '"', $result); - $result = $this->backend->getCard(1, 'card2'); - $this->assertEquals(2, $result['id']); - $this->assertEquals('card2', $result['uri']); - if (is_resource($result['carddata'])) { - $result['carddata'] = stream_get_contents($result['carddata']); - } - $this->assertEquals('data2', $result['carddata']); - - } - - /** - * @depends testCreateCard - */ - function testGetMultiple() { - - $result = $this->backend->createCard(1, 'card2', 'data2'); - $result = $this->backend->createCard(1, 'card3', 'data3'); - $check = [ - [ - 'id' => 1, - 'uri' => 'card1', - 'carddata' => 'card1', - 'lastmodified' => 0, - ], - [ - 'id' => 2, - 'uri' => 'card2', - 'carddata' => 'data2', - 'lastmodified' => time(), - ], - [ - 'id' => 3, - 'uri' => 'card3', - 'carddata' => 'data3', - 'lastmodified' => time(), - ], - ]; - - $result = $this->backend->getMultipleCards(1, ['card1', 'card2', 'card3']); - - foreach ($check as $index => $node) { - - foreach ($node as $k => $v) { - - $expected = $v; - $actual = $result[$index][$k]; - - switch ($k) { - case 'lastmodified' : - $this->assertInternalType('int', $actual); - break; - case 'carddata' : - if (is_resource($actual)) { - $actual = stream_get_contents($actual); - } - // No break intended. - default : - $this->assertEquals($expected, $actual); - break; - } - - } - - } - - - } - - /** - * @depends testGetCard - */ - function testUpdateCard() { - - $result = $this->backend->updateCard(1, 'card1', 'newdata'); - $this->assertEquals('"' . md5('newdata') . '"', $result); - - $result = $this->backend->getCard(1, 'card1'); - $this->assertEquals(1, $result['id']); - if (is_resource($result['carddata'])) { - $result['carddata'] = stream_get_contents($result['carddata']); - } - $this->assertEquals('newdata', $result['carddata']); - - } - - /** - * @depends testGetCard - */ - function testDeleteCard() { - - $this->backend->deleteCard(1, 'card1'); - $result = $this->backend->getCard(1, 'card1'); - $this->assertFalse($result); - - } - - function testGetChanges() { - - $backend = $this->backend; - $id = $backend->createAddressBook( - 'principals/user1', - 'bla', - [] - ); - $result = $backend->getChangesForAddressBook($id, null, 1); - - $this->assertEquals([ - 'syncToken' => 1, - "added" => [], - 'modified' => [], - 'deleted' => [], - ], $result); - - $currentToken = $result['syncToken']; - - $dummyCard = "BEGIN:VCARD\r\nEND:VCARD\r\n"; - - $backend->createCard($id, "card1.ics", $dummyCard); - $backend->createCard($id, "card2.ics", $dummyCard); - $backend->createCard($id, "card3.ics", $dummyCard); - $backend->updateCard($id, "card1.ics", $dummyCard); - $backend->deleteCard($id, "card2.ics"); - - $result = $backend->getChangesForAddressBook($id, $currentToken, 1); - - $this->assertEquals([ - 'syncToken' => 6, - 'modified' => ["card1.ics"], - 'deleted' => ["card2.ics"], - "added" => ["card3.ics"], - ], $result); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php deleted file mode 100644 index 8638dc74a65..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php +++ /dev/null @@ -1,258 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Backend; - -class Mock extends AbstractBackend { - - public $addressBooks; - public $cards; - - function __construct($addressBooks = null, $cards = null) { - - $this->addressBooks = $addressBooks; - $this->cards = $cards; - - if (is_null($this->addressBooks)) { - $this->addressBooks = [ - [ - 'id' => 'foo', - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'd-name', - ], - [ - 'id' => 'bar', - 'uri' => 'book3', - 'principaluri' => 'principals/user1', - '{DAV:}displayname' => 'd-name', - ], - ]; - - $card2 = fopen('php://memory', 'r+'); - fwrite($card2, "BEGIN:VCARD\nVERSION:3.0\nUID:45678\nEND:VCARD"); - rewind($card2); - $this->cards = [ - 'foo' => [ - 'card1' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD", - 'card2' => $card2, - ], - 'bar' => [ - 'card3' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD", - ], - ]; - } - - } - - - function getAddressBooksForUser($principalUri) { - - $books = []; - foreach ($this->addressBooks as $book) { - if ($book['principaluri'] === $principalUri) { - $books[] = $book; - } - } - return $books; - - } - - /** - * Updates properties for an address book. - * - * The list of mutations is stored in a Sabre\DAV\PropPatch object. - * To do the actual updates, you must tell this object which properties - * you're going to process with the handle() method. - * - * Calling the handle method is like telling the PropPatch object "I - * promise I can handle updating this property". - * - * Read the PropPatch documentation for more info and examples. - * - * @param string $addressBookId - * @param \Sabre\DAV\PropPatch $propPatch - * @return void - */ - function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) { - - foreach ($this->addressBooks as &$book) { - if ($book['id'] !== $addressBookId) - continue; - - $propPatch->handleRemaining(function($mutations) use (&$book) { - foreach ($mutations as $key => $value) { - $book[$key] = $value; - } - return true; - }); - - } - - } - - function createAddressBook($principalUri, $url, array $properties) { - - $this->addressBooks[] = array_merge($properties, [ - 'id' => $url, - 'uri' => $url, - 'principaluri' => $principalUri, - ]); - - } - - function deleteAddressBook($addressBookId) { - - foreach ($this->addressBooks as $key => $value) { - if ($value['id'] === $addressBookId) - unset($this->addressBooks[$key]); - } - unset($this->cards[$addressBookId]); - - } - - /** - * Returns all cards for a specific addressbook id. - * - * This method should return the following properties for each card: - * * carddata - raw vcard data - * * uri - Some unique url - * * lastmodified - A unix timestamp - * - * It's recommended to also return the following properties: - * * etag - A unique etag. This must change every time the card changes. - * * size - The size of the card in bytes. - * - * If these last two properties are provided, less time will be spent - * calculating them. If they are specified, you can also ommit carddata. - * This may speed up certain requests, especially with large cards. - * - * @param mixed $addressBookId - * @return array - */ - function getCards($addressBookId) { - - $cards = []; - foreach ($this->cards[$addressBookId] as $uri => $data) { - if (is_resource($data)) { - $cards[] = [ - 'uri' => $uri, - 'carddata' => $data, - ]; - } else { - $cards[] = [ - 'uri' => $uri, - 'carddata' => $data, - 'etag' => '"' . md5($data) . '"', - 'size' => strlen($data) - ]; - } - } - return $cards; - - } - - /** - * Returns a specfic card. - * - * The same set of properties must be returned as with getCards. The only - * exception is that 'carddata' is absolutely required. - * - * If the card does not exist, you must return false. - * - * @param mixed $addressBookId - * @param string $cardUri - * @return array - */ - function getCard($addressBookId, $cardUri) { - - if (!isset($this->cards[$addressBookId][$cardUri])) { - return false; - } - - $data = $this->cards[$addressBookId][$cardUri]; - return [ - 'uri' => $cardUri, - 'carddata' => $data, - 'etag' => '"' . md5($data) . '"', - 'size' => strlen($data) - ]; - - } - - /** - * Creates a new card. - * - * The addressbook id will be passed as the first argument. This is the - * same id as it is returned from the getAddressBooksForUser method. - * - * The cardUri is a base uri, and doesn't include the full path. The - * cardData argument is the vcard body, and is passed as a string. - * - * It is possible to return an ETag from this method. This ETag is for the - * newly created resource, and must be enclosed with double quotes (that - * is, the string itself must contain the double quotes). - * - * You should only return the ETag if you store the carddata as-is. If a - * subsequent GET request on the same card does not have the same body, - * byte-by-byte and you did return an ETag here, clients tend to get - * confused. - * - * If you don't return an ETag, you can just return null. - * - * @param mixed $addressBookId - * @param string $cardUri - * @param string $cardData - * @return string|null - */ - function createCard($addressBookId, $cardUri, $cardData) { - - if (is_resource($cardData)) { - $cardData = stream_get_contents($cardData); - } - $this->cards[$addressBookId][$cardUri] = $cardData; - return '"' . md5($cardData) . '"'; - - } - - /** - * Updates a card. - * - * The addressbook id will be passed as the first argument. This is the - * same id as it is returned from the getAddressBooksForUser method. - * - * The cardUri is a base uri, and doesn't include the full path. The - * cardData argument is the vcard body, and is passed as a string. - * - * It is possible to return an ETag from this method. This ETag should - * match that of the updated resource, and must be enclosed with double - * quotes (that is: the string itself must contain the actual quotes). - * - * You should only return the ETag if you store the carddata as-is. If a - * subsequent GET request on the same card does not have the same body, - * byte-by-byte and you did return an ETag here, clients tend to get - * confused. - * - * If you don't return an ETag, you can just return null. - * - * @param mixed $addressBookId - * @param string $cardUri - * @param string $cardData - * @return string|null - */ - function updateCard($addressBookId, $cardUri, $cardData) { - - if (is_resource($cardData)) { - $cardData = stream_get_contents($cardData); - } - $this->cards[$addressBookId][$cardUri] = $cardData; - return '"' . md5($cardData) . '"'; - - } - - function deleteCard($addressBookId, $cardUri) { - - unset($this->cards[$addressBookId][$cardUri]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOMySQLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOMySQLTest.php deleted file mode 100644 index c1b0e274ebd..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOMySQLTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Backend; - -class PDOMySQLTest extends AbstractPDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOPgSqlTest.php deleted file mode 100644 index 7691b7852f3..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Backend; - -class PDOPgSqlTest extends AbstractPDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php deleted file mode 100644 index b187c4d78bb..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Backend; - -class PDOSqliteTest extends AbstractPDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/CardTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/CardTest.php deleted file mode 100644 index cb7d152c341..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/CardTest.php +++ /dev/null @@ -1,210 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -class CardTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\CardDAV\Card - */ - protected $card; - /** - * @var Sabre\CardDAV\MockBackend - */ - protected $backend; - - function setUp() { - - $this->backend = new Backend\Mock(); - $this->card = new Card( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - 'principaluri' => 'principals/user1', - ], - [ - 'uri' => 'card1', - 'addressbookid' => 'foo', - 'carddata' => 'card', - ] - ); - - } - - function testGet() { - - $result = $this->card->get(); - $this->assertEquals('card', $result); - - } - function testGet2() { - - $this->card = new Card( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - 'principaluri' => 'principals/user1', - ], - [ - 'uri' => 'card1', - 'addressbookid' => 'foo', - ] - ); - $result = $this->card->get(); - $this->assertEquals("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD", $result); - - } - - - /** - * @depends testGet - */ - function testPut() { - - $file = fopen('php://memory', 'r+'); - fwrite($file, 'newdata'); - rewind($file); - $this->card->put($file); - $result = $this->card->get(); - $this->assertEquals('newdata', $result); - - } - - - function testDelete() { - - $this->card->delete(); - $this->assertEquals(1, count($this->backend->cards['foo'])); - - } - - function testGetContentType() { - - $this->assertEquals('text/vcard; charset=utf-8', $this->card->getContentType()); - - } - - function testGetETag() { - - $this->assertEquals('"' . md5('card') . '"', $this->card->getETag()); - - } - - function testGetETag2() { - - $card = new Card( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - 'principaluri' => 'principals/user1', - ], - [ - 'uri' => 'card1', - 'addressbookid' => 'foo', - 'carddata' => 'card', - 'etag' => '"blabla"', - ] - ); - $this->assertEquals('"blabla"', $card->getETag()); - - } - - function testGetLastModified() { - - $this->assertEquals(null, $this->card->getLastModified()); - - } - - function testGetSize() { - - $this->assertEquals(4, $this->card->getSize()); - $this->assertEquals(4, $this->card->getSize()); - - } - - function testGetSize2() { - - $card = new Card( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - 'principaluri' => 'principals/user1', - ], - [ - 'uri' => 'card1', - 'addressbookid' => 'foo', - 'etag' => '"blabla"', - 'size' => 4, - ] - ); - $this->assertEquals(4, $card->getSize()); - - } - - function testACLMethods() { - - $this->assertEquals('principals/user1', $this->card->getOwner()); - $this->assertNull($this->card->getGroup()); - $this->assertEquals([ - [ - 'privilege' => '{DAV:}all', - 'principal' => 'principals/user1', - 'protected' => true, - ], - ], $this->card->getACL()); - - } - function testOverrideACL() { - - $card = new Card( - $this->backend, - [ - 'uri' => 'book1', - 'id' => 'foo', - 'principaluri' => 'principals/user1', - ], - [ - 'uri' => 'card1', - 'addressbookid' => 'foo', - 'carddata' => 'card', - 'acl' => [ - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - ], - ] - ); - $this->assertEquals([ - [ - 'privilege' => '{DAV:}read', - 'principal' => 'principals/user1', - 'protected' => true, - ], - ], $card->getACL()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testSetACL() { - - $this->card->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $this->assertNull( - $this->card->getSupportedPrivilegeSet() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/IDirectoryTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/IDirectoryTest.php deleted file mode 100644 index 4796a131f87..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/IDirectoryTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; - -class IDirectoryTest extends \PHPUnit_Framework_TestCase { - - function testResourceType() { - - $tree = [ - new DirectoryMock('directory') - ]; - - $server = new DAV\Server($tree); - $plugin = new Plugin(); - $server->addPlugin($plugin); - - $props = $server->getProperties('directory', ['{DAV:}resourcetype']); - $this->assertTrue($props['{DAV:}resourcetype']->is('{' . Plugin::NS_CARDDAV . '}directory')); - - } - -} - -class DirectoryMock extends DAV\SimpleCollection implements IDirectory { - - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php deleted file mode 100644 index 2d57c6ae759..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class MultiGetTest extends AbstractPluginTest { - - function testMultiGet() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/addressbooks/user1/book1', - ]); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-multiget xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - <c:address-data /> - </d:prop> - <d:href>/addressbooks/user1/book1/card1</d:href> -</c:addressbook-multiget>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD", - ] - ] - ], $result); - - } - - function testMultiGetVCard4() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/addressbooks/user1/book1', - ]); - - $request->setBody( -'<?xml version="1.0"?> -<c:addressbook-multiget xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - <c:address-data content-type="text/vcard" version="4.0" /> - </d:prop> - <d:href>/addressbooks/user1/book1/card1</d:href> -</c:addressbook-multiget>' - ); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); - - // using the client for parsing - $client = new DAV\Client(['baseUri' => '/']); - - $result = $client->parseMultiStatus($response->body); - - $prodId = "PRODID:-//Sabre//Sabre VObject " . \Sabre\VObject\Version::VERSION . "//EN"; - - $this->assertEquals([ - '/addressbooks/user1/book1/card1' => [ - 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', - '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\r\nVERSION:4.0\r\n$prodId\r\nUID:12345\r\nEND:VCARD\r\n", - ] - ] - ], $result); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/PluginTest.php deleted file mode 100644 index 6962e7830c5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/PluginTest.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; - -class PluginTest extends AbstractPluginTest { - - function testConstruct() { - - $this->assertEquals('{' . Plugin::NS_CARDDAV . '}addressbook', $this->server->resourceTypeMapping['Sabre\\CardDAV\\IAddressBook']); - - $this->assertTrue(in_array('addressbook', $this->plugin->getFeatures())); - $this->assertEquals('carddav', $this->plugin->getPluginInfo()['name']); - - } - - function testSupportedReportSet() { - - $this->assertEquals([ - '{' . Plugin::NS_CARDDAV . '}addressbook-multiget', - '{' . Plugin::NS_CARDDAV . '}addressbook-query', - ], $this->plugin->getSupportedReportSet('addressbooks/user1/book1')); - - } - - function testSupportedReportSetEmpty() { - - $this->assertEquals([ - ], $this->plugin->getSupportedReportSet('')); - - } - - function testAddressBookHomeSet() { - - $result = $this->server->getProperties('principals/user1', ['{' . Plugin::NS_CARDDAV . '}addressbook-home-set']); - - $this->assertEquals(1, count($result)); - $this->assertTrue(isset($result['{' . Plugin::NS_CARDDAV . '}addressbook-home-set'])); - $this->assertEquals('addressbooks/user1/', $result['{' . Plugin::NS_CARDDAV . '}addressbook-home-set']->getHref()); - - } - - function testDirectoryGateway() { - - $result = $this->server->getProperties('principals/user1', ['{' . Plugin::NS_CARDDAV . '}directory-gateway']); - - $this->assertEquals(1, count($result)); - $this->assertTrue(isset($result['{' . Plugin::NS_CARDDAV . '}directory-gateway'])); - $this->assertEquals(['directory'], $result['{' . Plugin::NS_CARDDAV . '}directory-gateway']->getHrefs()); - - } - - function testReportPassThrough() { - - $this->assertNull($this->plugin->report('{DAV:}foo', new \DomDocument(), '')); - - } - - function testHTMLActionsPanel() { - - $output = ''; - $r = $this->server->emit('onHTMLActionsPanel', [$this->server->tree->getNodeForPath('addressbooks/user1'), &$output]); - $this->assertFalse($r); - - $this->assertTrue(!!strpos($output, 'Display name')); - - } - - function testAddressbookPluginProperties() { - - $ns = '{' . Plugin::NS_CARDDAV . '}'; - $propFind = new DAV\PropFind('addressbooks/user1/book1', [ - $ns . 'supported-address-data', - $ns . 'supported-collation-set', - ]); - $node = $this->server->tree->getNodeForPath('addressbooks/user1/book1'); - $this->plugin->propFindEarly($propFind, $node); - - $this->assertInstanceOf( - 'Sabre\\CardDAV\\Xml\\Property\\SupportedAddressData', - $propFind->get($ns . 'supported-address-data') - ); - $this->assertInstanceOf( - 'Sabre\\CardDAV\\Xml\\Property\\SupportedCollationSet', - $propFind->get($ns . 'supported-collation-set') - ); - - - } - - function testGetTransform() { - - $request = new \Sabre\HTTP\Request('GET', '/addressbooks/user1/book1/card1', ['Accept: application/vcard+json']); - $response = new \Sabre\HTTP\ResponseMock(); - $this->server->invokeMethod($request, $response); - - $this->assertEquals(200, $response->getStatus()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php deleted file mode 100644 index d4bc48098dc..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV\PropFind; -use Sabre\HTTP; - -class SogoStripContentTypeTest extends \Sabre\DAVServerTest { - - protected $setupCardDAV = true; - protected $carddavAddressBooks = [ - [ - 'id' => 1, - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - ], - ]; - protected $carddavCards = [ - 1 => [ - 'card1.vcf' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD", - ], - ]; - - function testDontStrip() { - - $result = $this->server->getProperties('addressbooks/user1/book1/card1.vcf', ['{DAV:}getcontenttype']); - $this->assertEquals([ - '{DAV:}getcontenttype' => 'text/vcard; charset=utf-8' - ], $result); - - } - function testStrip() { - - $this->server->httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 Lightning/1.2.1', - ]); - $result = $this->server->getProperties('addressbooks/user1/book1/card1.vcf', ['{DAV:}getcontenttype']); - $this->assertEquals([ - '{DAV:}getcontenttype' => 'text/x-vcard' - ], $result); - - } - function testDontTouchOtherMimeTypes() { - - $this->server->httpRequest = new HTTP\Request('GET', '/addressbooks/user1/book1/card1.vcf', [ - 'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 Lightning/1.2.1', - ]); - - $propFind = new PropFind('hello', ['{DAV:}getcontenttype']); - $propFind->set('{DAV:}getcontenttype', 'text/plain'); - $this->carddavPlugin->propFindLate($propFind, new \Sabre\DAV\SimpleCollection('foo')); - $this->assertEquals('text/plain', $propFind->get('{DAV:}getcontenttype')); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/TestUtil.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/TestUtil.php deleted file mode 100644 index ec8a3501e81..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/TestUtil.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -class TestUtil { - - static function getBackend() { - - $backend = new Backend\PDO(self::getSQLiteDB()); - return $backend; - - } - - static function getSQLiteDB() { - - $pdo = Backend\PDOSqliteTest::getSQLite(); - - // Inserting events through a backend class. - $backend = new Backend\PDO($pdo); - $addressbookId = $backend->createAddressBook( - 'principals/user1', - 'UUID-123467', - [ - '{DAV:}displayname' => 'user1 addressbook', - '{urn:ietf:params:xml:ns:carddav}addressbook-description' => 'AddressBook description', - ] - ); - $backend->createAddressBook( - 'principals/user1', - 'UUID-123468', - [ - '{DAV:}displayname' => 'user1 addressbook2', - '{urn:ietf:params:xml:ns:carddav}addressbook-description' => 'AddressBook description', - ] - ); - $backend->createCard($addressbookId, 'UUID-2345', self::getTestCardData()); - return $pdo; - - } - - static function deleteSQLiteDB() { - $sqliteTest = new Backend\PDOSqliteTest(); - $pdo = $sqliteTest->tearDown(); - } - - static function getTestCardData() { - - $addressbookData = 'BEGIN:VCARD -VERSION:3.0 -PRODID:-//Acme Inc.//RoadRunner 1.0//EN -FN:Wile E. Coyote -N:Coyote;Wile;Erroll;; -ORG:Acme Inc. -UID:39A6B5ED-DD51-4AFE-A683-C35EE3749627 -REV:2012-06-20T07:00:39+00:00 -END:VCARD'; - - return $addressbookData; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php deleted file mode 100644 index 82d82faddc1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\HTTP; - -class VCFExportTest extends \Sabre\DAVServerTest { - - protected $setupCardDAV = true; - protected $autoLogin = 'user1'; - protected $setupACL = true; - - protected $carddavAddressBooks = [ - [ - 'id' => 'book1', - 'uri' => 'book1', - 'principaluri' => 'principals/user1', - ] - ]; - protected $carddavCards = [ - 'book1' => [ - "card1" => "BEGIN:VCARD\r\nFN:Person1\r\nEND:VCARD\r\n", - "card2" => "BEGIN:VCARD\r\nFN:Person2\r\nEND:VCARD", - "card3" => "BEGIN:VCARD\r\nFN:Person3\r\nEND:VCARD\r\n", - "card4" => "BEGIN:VCARD\nFN:Person4\nEND:VCARD\n", - ] - ]; - - function setUp() { - - parent::setUp(); - $plugin = new VCFExportPlugin(); - $this->server->addPlugin( - $plugin - ); - - } - - function testSimple() { - - $plugin = $this->server->getPlugin('vcf-export'); - $this->assertInstanceOf('Sabre\\CardDAV\\VCFExportPlugin', $plugin); - - $this->assertEquals( - 'vcf-export', - $plugin->getPluginInfo()['name'] - ); - - } - - function testExport() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_URI' => '/addressbooks/user1/book1?export', - 'QUERY_STRING' => 'export', - 'REQUEST_METHOD' => 'GET', - ]); - - $response = $this->request($request); - $this->assertEquals(200, $response->status, $response->body); - - $expected = "BEGIN:VCARD -FN:Person1 -END:VCARD -BEGIN:VCARD -FN:Person2 -END:VCARD -BEGIN:VCARD -FN:Person3 -END:VCARD -BEGIN:VCARD -FN:Person4 -END:VCARD -"; - // We actually expected windows line endings - $expected = str_replace("\n", "\r\n", $expected); - - $this->assertEquals($expected, $response->body); - - } - - function testBrowserIntegration() { - - $plugin = $this->server->getPlugin('vcf-export'); - $actions = ''; - $addressbook = new AddressBook($this->carddavBackend, []); - $this->server->emit('browserButtonActions', ['/foo', $addressbook, &$actions]); - $this->assertContains('/foo?export', $actions); - - } - - function testContentDisposition() { - - $request = new HTTP\Request( - 'GET', - '/addressbooks/user1/book1?export' - ); - - $response = $this->request($request, 200); - $this->assertEquals('text/directory', $response->getHeader('Content-Type')); - $this->assertEquals( - 'attachment; filename="book1-' . date('Y-m-d') . '.vcf"', - $response->getHeader('Content-Disposition') - ); - - } - - function testContentDispositionBadChars() { - - $this->carddavBackend->createAddressBook( - 'principals/user1', - 'book-b_ad"(ch)ars', - [] - ); - $this->carddavBackend->createCard( - 'book-b_ad"(ch)ars', - 'card1', - "BEGIN:VCARD\r\nFN:Person1\r\nEND:VCARD\r\n" - ); - - $request = new HTTP\Request( - 'GET', - '/addressbooks/user1/book-b_ad"(ch)ars?export' - ); - - $response = $this->request($request, 200); - $this->assertEquals('text/directory', $response->getHeader('Content-Type')); - $this->assertEquals( - 'attachment; filename="book-b_adchars-' . date('Y-m-d') . '.vcf"', - $response->getHeader('Content-Disposition') - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php deleted file mode 100644 index 03c468f868f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -require_once 'Sabre/CardDAV/AbstractPluginTest.php'; - -class ValidateFilterTest extends AbstractPluginTest { - - /** - * @param string $input - * @param array $filters - * @param string $test - * @param bool $result - * @param string|null $message - * @dataProvider data - */ - function testFilter($input, $filters, $test, $result, $message = null) { - - if ($result) { - $this->assertTrue($this->plugin->validateFilters($input, $filters, $test), $message); - } else { - $this->assertFalse($this->plugin->validateFilters($input, $filters, $test), $message); - } - - } - - function data() { - - $body1 = <<<HELLO -BEGIN:VCARD -VERSION:3.0 -ORG:Company; -TITLE:Title -TEL;TYPE=IPHONE;TYPE=pref:(222) 22 22 22 -TEL;TYPE=HOME:(33) 333 66 66 -TEL;TYPE=WORK:(444) 44 44 44 -TEL;TYPE=MAIN:(55) 555 55 55 -ITEM4.TEL:(111) 11 11 11 -ITEM5.TEL:(6) 66 66 66 66 -ITEM6.TEL:(77) 777 77 77 -UID:3151DE6A-BC35-4612-B340-B53A034A2B27 -ITEM1.EMAIL:1111@111.com -ITEM2.EMAIL:bbbbb@bbbb.com -ITEM3.EMAIL:ccccc@ccccc.com -FN:First Last -N:Last;First;Middle;Dr -BDAY:1985-07-20 -ADR;TYPE=HOME:;;Street;City;;3556;Montenegro -ADR;TYPE=WORK:;;Street\\nStreet2;Harkema;;35444;Australia -URL:http://google.com -END:VCARD -HELLO; - - // Check if TITLE is defined - $filter1 = - ['name' => 'title', 'is-not-defined' => false, 'param-filters' => [], 'text-matches' => []]; - - // Check if FOO is defined - $filter2 = - ['name' => 'foo', 'is-not-defined' => false, 'param-filters' => [], 'text-matches' => []]; - - // Check if TITLE is not defined - $filter3 = - ['name' => 'title', 'is-not-defined' => true, 'param-filters' => [], 'text-matches' => []]; - - // Check if FOO is not defined - $filter4 = - ['name' => 'foo', 'is-not-defined' => true, 'param-filters' => [], 'text-matches' => []]; - - // Check if TEL[TYPE] is defined - $filter5 = - [ - 'name' => 'tel', - 'is-not-defined' => false, - 'test' => 'anyof', - 'param-filters' => [ - [ - 'name' => 'type', - 'is-not-defined' => false, - 'text-match' => null - ], - ], - 'text-matches' => [], - ]; - - // Check if TEL[FOO] is defined - $filter6 = $filter5; - $filter6['param-filters'][0]['name'] = 'FOO'; - - // Check if TEL[TYPE] is not defined - $filter7 = $filter5; - $filter7['param-filters'][0]['is-not-defined'] = true; - - // Check if TEL[FOO] is not defined - $filter8 = $filter5; - $filter8['param-filters'][0]['name'] = 'FOO'; - $filter8['param-filters'][0]['is-not-defined'] = true; - - // Combining property filters - $filter9 = $filter5; - $filter9['param-filters'][] = $filter6['param-filters'][0]; - - $filter10 = $filter5; - $filter10['param-filters'][] = $filter6['param-filters'][0]; - $filter10['test'] = 'allof'; - - // Check if URL contains 'google' - $filter11 = - [ - 'name' => 'url', - 'is-not-defined' => false, - 'test' => 'anyof', - 'param-filters' => [], - 'text-matches' => [ - [ - 'match-type' => 'contains', - 'value' => 'google', - 'negate-condition' => false, - 'collation' => 'i;octet', - ], - ], - ]; - - // Check if URL contains 'bing' - $filter12 = $filter11; - $filter12['text-matches'][0]['value'] = 'bing'; - - // Check if URL does not contain 'google' - $filter13 = $filter11; - $filter13['text-matches'][0]['negate-condition'] = true; - - // Check if URL does not contain 'bing' - $filter14 = $filter11; - $filter14['text-matches'][0]['value'] = 'bing'; - $filter14['text-matches'][0]['negate-condition'] = true; - - // Param filter with text - $filter15 = $filter5; - $filter15['param-filters'][0]['text-match'] = [ - 'match-type' => 'contains', - 'value' => 'WORK', - 'collation' => 'i;octet', - 'negate-condition' => false, - ]; - $filter16 = $filter15; - $filter16['param-filters'][0]['text-match']['negate-condition'] = true; - - - // Param filter + text filter - $filter17 = $filter5; - $filter17['test'] = 'anyof'; - $filter17['text-matches'][] = [ - 'match-type' => 'contains', - 'value' => '444', - 'collation' => 'i;octet', - 'negate-condition' => false, - ]; - - $filter18 = $filter17; - $filter18['text-matches'][0]['negate-condition'] = true; - - $filter18['test'] = 'allof'; - - return [ - - // Basic filters - [$body1, [$filter1], 'anyof',true], - [$body1, [$filter2], 'anyof',false], - [$body1, [$filter3], 'anyof',false], - [$body1, [$filter4], 'anyof',true], - - // Combinations - [$body1, [$filter1, $filter2], 'anyof',true], - [$body1, [$filter1, $filter2], 'allof',false], - [$body1, [$filter1, $filter4], 'anyof',true], - [$body1, [$filter1, $filter4], 'allof',true], - [$body1, [$filter2, $filter3], 'anyof',false], - [$body1, [$filter2, $filter3], 'allof',false], - - // Basic parameters - [$body1, [$filter5], 'anyof', true, 'TEL;TYPE is defined, so this should return true'], - [$body1, [$filter6], 'anyof', false, 'TEL;FOO is not defined, so this should return false'], - - [$body1, [$filter7], 'anyof', false, 'TEL;TYPE is defined, so this should return false'], - [$body1, [$filter8], 'anyof', true, 'TEL;TYPE is not defined, so this should return true'], - - // Combined parameters - [$body1, [$filter9], 'anyof', true], - [$body1, [$filter10], 'anyof', false], - - // Text-filters - [$body1, [$filter11], 'anyof', true], - [$body1, [$filter12], 'anyof', false], - [$body1, [$filter13], 'anyof', false], - [$body1, [$filter14], 'anyof', true], - - // Param filter with text-match - [$body1, [$filter15], 'anyof', true], - [$body1, [$filter16], 'anyof', false], - - // Param filter + text filter - [$body1, [$filter17], 'anyof', true], - [$body1, [$filter18], 'anyof', false], - [$body1, [$filter18], 'anyof', false], - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php deleted file mode 100644 index acba2cfc8f3..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php - -namespace Sabre\CardDAV; - -use Sabre\DAV; -use Sabre\DAVACL; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class ValidateVCardTest extends \PHPUnit_Framework_TestCase { - - protected $server; - protected $cardBackend; - - function setUp() { - - $addressbooks = [ - [ - 'id' => 'addressbook1', - 'principaluri' => 'principals/admin', - 'uri' => 'addressbook1', - ] - ]; - - $this->cardBackend = new Backend\Mock($addressbooks, []); - $principalBackend = new DAVACL\PrincipalBackend\Mock(); - - $tree = [ - new AddressBookRoot($principalBackend, $this->cardBackend), - ]; - - $this->server = new DAV\Server($tree); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->debugExceptions = true; - - $plugin = new Plugin(); - $this->server->addPlugin($plugin); - - $response = new HTTP\ResponseMock(); - $this->server->httpResponse = $response; - - } - - function request(HTTP\Request $request, $expectedStatus = null) { - - $this->server->httpRequest = $request; - $this->server->exec(); - - if ($expectedStatus) { - - $realStatus = $this->server->httpResponse->getStatus(); - - $msg = ''; - if ($realStatus !== $expectedStatus) { - $msg = 'Response body: ' . $this->server->httpResponse->getBodyAsString(); - } - $this->assertEquals( - $expectedStatus, - $realStatus, - $msg - ); - } - - return $this->server->httpResponse; - - } - - function testCreateFile() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/addressbooks/admin/addressbook1/blabla.vcf', - ]); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status); - - } - - function testCreateFileValid() { - - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -UID:foo -FN:Firstname LastName -N:LastName;FirstName;;; -END:VCARD -VCF; - $request->setBody($vcard); - - $response = $this->request($request, 201); - - // The custom Ew header should not be set - $this->assertNull( - $response->getHeader('X-Sabre-Ew-Gross') - ); - // Valid, non-auto-fixed responses should contain an ETag. - $this->assertTrue( - $response->getHeader('ETag') !== null, - 'We did not receive an etag' - ); - - - $expected = [ - 'uri' => 'blabla.vcf', - 'carddata' => $vcard, - 'size' => strlen($vcard), - 'etag' => '"' . md5($vcard) . '"', - ]; - - $this->assertEquals($expected, $this->cardBackend->getCard('addressbook1', 'blabla.vcf')); - - } - - /** - * This test creates an intentionally broken vCard that vobject is able - * to automatically repair. - * - * @depends testCreateFileValid - */ - function testCreateVCardAutoFix() { - - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - - // The error in this vcard is that there's not enough semi-colons in N - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -UID:foo -FN:Firstname LastName -N:LastName;FirstName;; -END:VCARD -VCF; - - $request->setBody($vcard); - - $response = $this->request($request, 201); - - // Auto-fixed vcards should NOT return an etag - $this->assertNull( - $response->getHeader('ETag') - ); - - // We should have gotten an Ew header - $this->assertNotNull( - $response->getHeader('X-Sabre-Ew-Gross') - ); - - $expectedVCard = <<<VCF -BEGIN:VCARD\r -VERSION:4.0\r -UID:foo\r -FN:Firstname LastName\r -N:LastName;FirstName;;;\r -END:VCARD\r - -VCF; - - $expected = [ - 'uri' => 'blabla.vcf', - 'carddata' => $expectedVCard, - 'size' => strlen($expectedVCard), - 'etag' => '"' . md5($expectedVCard) . '"', - ]; - - $this->assertEquals($expected, $this->cardBackend->getCard('addressbook1', 'blabla.vcf')); - - } - - /** - * This test creates an intentionally broken vCard that vobject is able - * to automatically repair. - * - * However, we're supplying a heading asking the server to treat the - * request as strict, so the server should still let the request fail. - * - * @depends testCreateFileValid - */ - function testCreateVCardStrictFail() { - - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf', - [ - 'Prefer' => 'handling=strict', - ] - ); - - // The error in this vcard is that there's not enough semi-colons in N - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -UID:foo -FN:Firstname LastName -N:LastName;FirstName;; -END:VCARD -VCF; - - $request->setBody($vcard); - $this->request($request, 415); - - } - - function testCreateFileNoUID() { - - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -FN:Firstname LastName -N:LastName;FirstName;;; -END:VCARD -VCF; - $request->setBody($vcard); - - $response = $this->request($request, 201); - - $foo = $this->cardBackend->getCard('addressbook1', 'blabla.vcf'); - $this->assertTrue( - strpos($foo['carddata'], 'UID') !== false, - print_r($foo, true) - ); - } - - function testCreateFileJson() { - - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - $request->setBody('[ "vcard" , [ [ "VERSION", {}, "text", "4.0"], [ "UID" , {}, "text", "foo" ], [ "FN", {}, "text", "FirstName LastName"] ] ]'); - - $response = $this->request($request); - - $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - $foo = $this->cardBackend->getCard('addressbook1', 'blabla.vcf'); - $this->assertEquals("BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nFN:FirstName LastName\r\nEND:VCARD\r\n", $foo['carddata']); - - } - - function testCreateFileVCalendar() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/addressbooks/admin/addressbook1/blabla.vcf', - ]); - $request->setBody("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n"); - - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: ' . $response->body); - - } - - function testUpdateFile() { - - $this->cardBackend->createCard('addressbook1', 'blabla.vcf', 'foo'); - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - - $response = $this->request($request, 415); - - } - - function testUpdateFileParsableBody() { - - $this->cardBackend->createCard('addressbook1', 'blabla.vcf', 'foo'); - $request = new HTTP\Request( - 'PUT', - '/addressbooks/admin/addressbook1/blabla.vcf' - ); - - $body = "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nFN:FirstName LastName\r\nEND:VCARD\r\n"; - $request->setBody($body); - - $response = $this->request($request, 204); - - $expected = [ - 'uri' => 'blabla.vcf', - 'carddata' => $body, - 'size' => strlen($body), - 'etag' => '"' . md5($body) . '"', - ]; - - $this->assertEquals($expected, $this->cardBackend->getCard('addressbook1', 'blabla.vcf')); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedAddressDataTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedAddressDataTest.php deleted file mode 100644 index 43abebdcec1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedAddressDataTest.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Xml\Property; - -use Sabre\CardDAV; -use Sabre\DAV; - -class SupportedAddressDataTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $property = new SupportedAddressData(); - $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedAddressData', $property); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new SupportedAddressData(); - - $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card'; - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' . -'<card:address-data-type content-type="text/vcard" version="3.0"/>' . -'<card:address-data-type content-type="text/vcard" version="4.0"/>' . -'<card:address-data-type content-type="application/vcard+json" version="4.0"/>' . -'</d:root> -', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedCollationSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedCollationSetTest.php deleted file mode 100644 index e06aff101d9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Property/SupportedCollationSetTest.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Xml\Property; - -use Sabre\CardDAV; -use Sabre\DAV; - -class SupportedCollationSetTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $property = new SupportedCollationSet(); - $this->assertInstanceOf('Sabre\CardDAV\Xml\Property\SupportedCollationSet', $property); - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $property = new SupportedCollationSet(); - - $this->namespaceMap[CardDAV\Plugin::NS_CARDDAV] = 'card'; - $xml = $this->write(['{DAV:}root' => $property]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:card="' . CardDAV\Plugin::NS_CARDDAV . '" xmlns:d="DAV:">' . -'<card:supported-collation>i;ascii-casemap</card:supported-collation>' . -'<card:supported-collation>i;octet</card:supported-collation>' . -'<card:supported-collation>i;unicode-casemap</card:supported-collation>' . -'</d:root> -', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookMultiGetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookMultiGetTest.php deleted file mode 100644 index ea2ab75ceec..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookMultiGetTest.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Xml\Request; - -use Sabre\DAV\Xml\XmlTest; - -class AddressBookMultiGetTest extends XmlTest { - - protected $elementMap = [ - '{urn:ietf:params:xml:ns:carddav}addressbook-multiget' => 'Sabre\\CardDAV\\Xml\\Request\AddressBookMultiGetReport', - ]; - - function testDeserialize() { - - /* lines look a bit odd but this triggers an XML parsing bug */ - $xml = <<<XML -<?xml version='1.0' encoding='UTF-8' ?> -<CARD:addressbook-multiget xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav"> - <prop> - <getcontenttype /> - <getetag /> - <CARD:address-data content-type="text/vcard" version="4.0" /></prop><href>/foo.vcf</href> -</CARD:addressbook-multiget> -XML; - - $result = $this->parse($xml); - $addressBookMultiGetReport = new AddressBookMultiGetReport(); - $addressBookMultiGetReport->properties = [ - '{DAV:}getcontenttype', - '{DAV:}getetag', - '{urn:ietf:params:xml:ns:carddav}address-data', - ]; - $addressBookMultiGetReport->hrefs = ['/foo.vcf']; - $addressBookMultiGetReport->contentType = 'text/vcard'; - $addressBookMultiGetReport->version = '4.0'; - $addressBookMultiGetReport->addressDataProperties = []; - - - $this->assertEquals( - $addressBookMultiGetReport, - $result['value'] - ); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookQueryReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookQueryReportTest.php deleted file mode 100644 index 3a2e4b46a0e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/CardDAV/Xml/Request/AddressBookQueryReportTest.php +++ /dev/null @@ -1,350 +0,0 @@ -<?php - -namespace Sabre\CardDAV\Xml\Request; - -use Sabre\DAV\Xml\XmlTest; - -class AddressBookQueryReportTest extends XmlTest { - - protected $elementMap = [ - '{urn:ietf:params:xml:ns:carddav}addressbook-query' => 'Sabre\\CardDAV\\Xml\\Request\AddressBookQueryReport', - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="uid" /> - </c:filter> -</c:addressbook-query> -XML; - - $result = $this->parse($xml); - $addressBookQueryReport = new AddressBookQueryReport(); - $addressBookQueryReport->properties = [ - '{DAV:}getetag', - ]; - $addressBookQueryReport->test = 'anyof'; - $addressBookQueryReport->filters = [ - [ - 'name' => 'uid', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => [], - 'text-matches' => [], - ] - ]; - - $this->assertEquals( - $addressBookQueryReport, - $result['value'] - ); - - } - - function testDeserializeAllOf() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter test="allof"> - <c:prop-filter name="uid" /> - </c:filter> -</c:addressbook-query> -XML; - - $result = $this->parse($xml); - $addressBookQueryReport = new AddressBookQueryReport(); - $addressBookQueryReport->properties = [ - '{DAV:}getetag', - ]; - $addressBookQueryReport->test = 'allof'; - $addressBookQueryReport->filters = [ - [ - 'name' => 'uid', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => [], - 'text-matches' => [], - ] - ]; - - $this->assertEquals( - $addressBookQueryReport, - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeBadTest() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter test="bad"> - <c:prop-filter name="uid" /> - </c:filter> -</c:addressbook-query> -XML; - - $this->parse($xml); - - } - - /** - * We should error on this, but KDE does this, so we chose to support it. - */ - function testDeserializeNoFilter() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> -</c:addressbook-query> -XML; - - $result = $this->parse($xml); - $addressBookQueryReport = new AddressBookQueryReport(); - $addressBookQueryReport->properties = [ - '{DAV:}getetag', - ]; - $addressBookQueryReport->test = 'anyof'; - $addressBookQueryReport->filters = []; - - $this->assertEquals( - $addressBookQueryReport, - $result['value'] - ); - - } - - function testDeserializeComplex() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - <c:address-data content-type="application/vcard+json" version="4.0" /> - </d:prop> - <c:filter> - <c:prop-filter name="uid"> - <c:is-not-defined /> - </c:prop-filter> - <c:prop-filter name="x-foo" test="allof"> - <c:param-filter name="x-param1" /> - <c:param-filter name="x-param2"> - <c:is-not-defined /> - </c:param-filter> - <c:param-filter name="x-param3"> - <c:text-match match-type="contains">Hello!</c:text-match> - </c:param-filter> - </c:prop-filter> - <c:prop-filter name="x-prop2"> - <c:text-match match-type="starts-with" negate-condition="yes">No</c:text-match> - </c:prop-filter> - </c:filter> - <c:limit><c:nresults>10</c:nresults></c:limit> -</c:addressbook-query> -XML; - - $result = $this->parse($xml); - $addressBookQueryReport = new AddressBookQueryReport(); - $addressBookQueryReport->properties = [ - '{DAV:}getetag', - '{urn:ietf:params:xml:ns:carddav}address-data', - ]; - $addressBookQueryReport->test = 'anyof'; - $addressBookQueryReport->filters = [ - [ - 'name' => 'uid', - 'test' => 'anyof', - 'is-not-defined' => true, - 'param-filters' => [], - 'text-matches' => [], - ], - [ - 'name' => 'x-foo', - 'test' => 'allof', - 'is-not-defined' => false, - 'param-filters' => [ - [ - 'name' => 'x-param1', - 'is-not-defined' => false, - 'text-match' => null, - ], - [ - 'name' => 'x-param2', - 'is-not-defined' => true, - 'text-match' => null, - ], - [ - 'name' => 'x-param3', - 'is-not-defined' => false, - 'text-match' => [ - 'negate-condition' => false, - 'value' => 'Hello!', - 'match-type' => 'contains', - 'collation' => 'i;unicode-casemap', - ], - ], - ], - 'text-matches' => [], - ], - [ - 'name' => 'x-prop2', - 'test' => 'anyof', - 'is-not-defined' => false, - 'param-filters' => [], - 'text-matches' => [ - [ - 'negate-condition' => true, - 'value' => 'No', - 'match-type' => 'starts-with', - 'collation' => 'i;unicode-casemap', - ], - ], - ] - ]; - - $addressBookQueryReport->version = '4.0'; - $addressBookQueryReport->contentType = 'application/vcard+json'; - $addressBookQueryReport->limit = 10; - - $this->assertEquals( - $addressBookQueryReport, - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeBadMatchType() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="x-foo" test="allof"> - <c:param-filter name="x-param3"> - <c:text-match match-type="bad">Hello!</c:text-match> - </c:param-filter> - </c:prop-filter> - </c:filter> -</c:addressbook-query> -XML; - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeBadMatchType2() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - <c:prop-filter name="x-prop2"> - <c:text-match match-type="bad" negate-condition="yes">No</c:text-match> - </c:prop-filter> - </c:filter> -</c:addressbook-query> -XML; - $this->parse($xml); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeDoubleFilter() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - </d:prop> - <c:filter> - </c:filter> - <c:filter> - </c:filter> -</c:addressbook-query> -XML; - $this->parse($xml); - - } - - function testDeserializeAddressbookElements() { - - $xml = <<<XML -<?xml version="1.0"?> -<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav"> - <d:prop> - <d:getetag /> - <c:address-data> - <c:prop name="VERSION"/> - <c:prop name="UID"/> - <c:prop name="NICKNAME"/> - <c:prop name="EMAIL"/> - <c:prop name="FN"/> - <c:prop name="TEL"/> - </c:address-data> - </d:prop> -</c:addressbook-query> -XML; - - $result = $this->parse($xml); - $addressBookQueryReport = new AddressBookQueryReport(); - $addressBookQueryReport->properties = [ - '{DAV:}getetag', - '{urn:ietf:params:xml:ns:carddav}address-data' - ]; - $addressBookQueryReport->filters = []; - $addressBookQueryReport->test = 'anyof'; - $addressBookQueryReport->contentType = 'text/vcard'; - $addressBookQueryReport->version = '3.0'; - $addressBookQueryReport->addressDataProperties = [ - 'VERSION', - 'UID', - 'NICKNAME', - 'EMAIL', - 'FN', - 'TEL', - ]; - - $this->assertEquals( - $addressBookQueryReport, - $result['value'] - ); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/AbstractServer.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/AbstractServer.php deleted file mode 100644 index 6a8d389a008..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/AbstractServer.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -abstract class AbstractServer extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\HTTP\ResponseMock - */ - protected $response; - protected $request; - /** - * @var Sabre\DAV\Server - */ - protected $server; - protected $tempDir = SABRE_TEMPDIR; - - function setUp() { - - $this->response = new HTTP\ResponseMock(); - $this->server = new Server($this->getRootNode()); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->httpResponse = $this->response; - $this->server->debugExceptions = true; - $this->deleteTree(SABRE_TEMPDIR, false); - file_put_contents(SABRE_TEMPDIR . '/test.txt', 'Test contents'); - mkdir(SABRE_TEMPDIR . '/dir'); - file_put_contents(SABRE_TEMPDIR . '/dir/child.txt', 'Child contents'); - - - } - - function tearDown() { - - $this->deleteTree(SABRE_TEMPDIR, false); - - } - - protected function getRootNode() { - - return new FS\Directory(SABRE_TEMPDIR); - - } - - private function deleteTree($path, $deleteRoot = true) { - - foreach (scandir($path) as $node) { - - if ($node == '.' || $node == '.svn' || $node == '..') continue; - $myPath = $path . '/' . $node; - if (is_file($myPath)) { - unlink($myPath); - } else { - $this->deleteTree($myPath); - } - - } - if ($deleteRoot) rmdir($path); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php deleted file mode 100644 index 455403affe7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBasicTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP; - -class AbstractBasicTest extends \PHPUnit_Framework_TestCase { - - function testCheckNoHeaders() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractBasicMock(); - - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckUnknownUser() { - - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_USER' => 'username', - 'PHP_AUTH_PW' => 'wrongpassword', - ]); - $response = new HTTP\Response(); - - $backend = new AbstractBasicMock(); - - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckSuccess() { - - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_USER' => 'username', - 'PHP_AUTH_PW' => 'password', - ]); - $response = new HTTP\Response(); - - $backend = new AbstractBasicMock(); - $this->assertEquals( - [true, 'principals/username'], - $backend->check($request, $response) - ); - - } - - function testRequireAuth() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractBasicMock(); - $backend->setRealm('writing unittests on a saturday night'); - $backend->challenge($request, $response); - - $this->assertEquals( - 'Basic realm="writing unittests on a saturday night"', - $response->getHeader('WWW-Authenticate') - ); - - } - -} - - -class AbstractBasicMock extends AbstractBasic { - - /** - * Validates a username and password - * - * This method should return true or false depending on if login - * succeeded. - * - * @param string $username - * @param string $password - * @return bool - */ - function validateUserPass($username, $password) { - - return ($username == 'username' && $password == 'password'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBearerTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBearerTest.php deleted file mode 100644 index c3857883007..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractBearerTest.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class AbstractBearerTest extends \PHPUnit_Framework_TestCase { - - function testCheckNoHeaders() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractBearerMock(); - - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckInvalidToken() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_AUTHORIZATION' => 'Bearer foo', - ]); - $response = new HTTP\Response(); - - $backend = new AbstractBearerMock(); - - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckSuccess() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_AUTHORIZATION' => 'Bearer valid', - ]); - $response = new HTTP\Response(); - - $backend = new AbstractBearerMock(); - $this->assertEquals( - [true, 'principals/username'], - $backend->check($request, $response) - ); - - } - - function testRequireAuth() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractBearerMock(); - $backend->setRealm('writing unittests on a saturday night'); - $backend->challenge($request, $response); - - $this->assertEquals( - 'Bearer realm="writing unittests on a saturday night"', - $response->getHeader('WWW-Authenticate') - ); - - } - -} - - -class AbstractBearerMock extends AbstractBearer { - - /** - * Validates a bearer token - * - * This method should return true or false depending on if login - * succeeded. - * - * @param string $bearerToken - * @return bool - */ - function validateBearerToken($bearerToken) { - - return 'valid' === $bearerToken ? 'principals/username' : false; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractDigestTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractDigestTest.php deleted file mode 100644 index 14c72aaa0f6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractDigestTest.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP; - -class AbstractDigestTest extends \PHPUnit_Framework_TestCase { - - function testCheckNoHeaders() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckBadGetUserInfoResponse() { - - $header = 'username=null, realm=myRealm, nonce=12345, uri=/, response=HASH, opaque=1, qop=auth, nc=1, cnonce=1'; - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_DIGEST' => $header, - ]); - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testCheckBadGetUserInfoResponse2() { - - $header = 'username=array, realm=myRealm, nonce=12345, uri=/, response=HASH, opaque=1, qop=auth, nc=1, cnonce=1'; - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_DIGEST' => $header, - ]); - - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $backend->check($request, $response); - - } - - function testCheckUnknownUser() { - - $header = 'username=false, realm=myRealm, nonce=12345, uri=/, response=HASH, opaque=1, qop=auth, nc=1, cnonce=1'; - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_DIGEST' => $header, - ]); - - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheckBadPassword() { - - $header = 'username=user, realm=myRealm, nonce=12345, uri=/, response=HASH, opaque=1, qop=auth, nc=1, cnonce=1'; - $request = HTTP\Sapi::createFromServerArray([ - 'PHP_AUTH_DIGEST' => $header, - 'REQUEST_METHOD' => 'PUT', - ]); - - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testCheck() { - - $digestHash = md5('HELLO:12345:1:1:auth:' . md5('GET:/')); - $header = 'username=user, realm=myRealm, nonce=12345, uri=/, response=' . $digestHash . ', opaque=1, qop=auth, nc=1, cnonce=1'; - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'GET', - 'PHP_AUTH_DIGEST' => $header, - 'REQUEST_URI' => '/', - ]); - - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $this->assertEquals( - [true, 'principals/user'], - $backend->check($request, $response) - ); - - } - - function testRequireAuth() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new AbstractDigestMock(); - $backend->setRealm('writing unittests on a saturday night'); - $backend->challenge($request, $response); - - $this->assertStringStartsWith( - 'Digest realm="writing unittests on a saturday night"', - $response->getHeader('WWW-Authenticate') - ); - - } - -} - - -class AbstractDigestMock extends AbstractDigest { - - function getDigestHash($realm, $userName) { - - switch ($userName) { - case 'null' : return null; - case 'false' : return false; - case 'array' : return []; - case 'user' : return 'HELLO'; - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractPDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractPDOTest.php deleted file mode 100644 index b14e9fa2ea3..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/AbstractPDOTest.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\DAV\DbTestHelperTrait; - - function setUp() { - - $this->dropTables('users'); - $this->createSchema('users'); - - $this->getPDO()->query( - "INSERT INTO users (username,digesta1) VALUES ('user','hash')" - - ); - - } - - function testConstruct() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $this->assertTrue($backend instanceof PDO); - - } - - /** - * @depends testConstruct - */ - function testUserInfo() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - - $this->assertNull($backend->getDigestHash('realm', 'blabla')); - - $expected = 'hash'; - - $this->assertEquals($expected, $backend->getDigestHash('realm', 'user')); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php deleted file mode 100644 index 29cbc216282..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/ApacheTest.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP; - -class ApacheTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $backend = new Apache(); - $this->assertInstanceOf('Sabre\DAV\Auth\Backend\Apache', $backend); - - } - - function testNoHeader() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - $backend = new Apache(); - - $this->assertFalse( - $backend->check($request, $response)[0] - ); - - } - - function testRemoteUser() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REMOTE_USER' => 'username', - ]); - $response = new HTTP\Response(); - $backend = new Apache(); - - $this->assertEquals( - [true, 'principals/username'], - $backend->check($request, $response) - ); - - } - - function testRedirectRemoteUser() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REDIRECT_REMOTE_USER' => 'username', - ]); - $response = new HTTP\Response(); - $backend = new Apache(); - - $this->assertEquals( - [true, 'principals/username'], - $backend->check($request, $response) - ); - - } - - function testRequireAuth() { - - $request = new HTTP\Request(); - $response = new HTTP\Response(); - - $backend = new Apache(); - $backend->challenge($request, $response); - - $this->assertNull( - $response->getHeader('WWW-Authenticate') - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/BasicCallBackTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/BasicCallBackTest.php deleted file mode 100644 index 167f31eab37..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/BasicCallBackTest.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP\Response; -use Sabre\HTTP\Sapi; - -class BasicCallBackTest extends \PHPUnit_Framework_TestCase { - - function testCallBack() { - - $args = []; - $callBack = function($user, $pass) use (&$args) { - - $args = [$user, $pass]; - return true; - - }; - - $backend = new BasicCallBack($callBack); - - $request = Sapi::createFromServerArray([ - 'HTTP_AUTHORIZATION' => 'Basic ' . base64_encode('foo:bar'), - ]); - $response = new Response(); - - $this->assertEquals( - [true, 'principals/foo'], - $backend->check($request, $response) - ); - - $this->assertEquals(['foo', 'bar'], $args); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php deleted file mode 100644 index f694f4806ee..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -class FileTest extends \PHPUnit_Framework_TestCase { - - function tearDown() { - - if (file_exists(SABRE_TEMPDIR . '/filebackend')) unlink(SABRE_TEMPDIR . '/filebackend'); - - } - - function testConstruct() { - - $file = new File(); - $this->assertTrue($file instanceof File); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testLoadFileBroken() { - - file_put_contents(SABRE_TEMPDIR . '/backend', 'user:realm:hash'); - $file = new File(SABRE_TEMPDIR . '/backend'); - - } - - function testLoadFile() { - - file_put_contents(SABRE_TEMPDIR . '/backend', 'user:realm:' . md5('user:realm:password')); - $file = new File(); - $file->loadFile(SABRE_TEMPDIR . '/backend'); - - $this->assertFalse($file->getDigestHash('realm', 'blabla')); - $this->assertEquals(md5('user:realm:password'), $file->getDigestHash('realm', 'user')); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php deleted file mode 100644 index 369bc249e47..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -use Sabre\HTTP\RequestInterface; -use Sabre\HTTP\ResponseInterface; - -class Mock implements BackendInterface { - - public $fail = false; - - public $invalidCheckResponse = false; - - public $principal = 'principals/admin'; - - function setPrincipal($principal) { - - $this->principal = $principal; - - } - - /** - * When this method is called, the backend must check if authentication was - * successful. - * - * The returned value must be one of the following - * - * [true, "principals/username"] - * [false, "reason for failure"] - * - * If authentication was successful, it's expected that the authentication - * backend returns a so-called principal url. - * - * Examples of a principal url: - * - * principals/admin - * principals/user1 - * principals/users/joe - * principals/uid/123457 - * - * If you don't use WebDAV ACL (RFC3744) we recommend that you simply - * return a string such as: - * - * principals/users/[username] - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @return array - */ - function check(RequestInterface $request, ResponseInterface $response) { - - if ($this->invalidCheckResponse) { - return 'incorrect!'; - } - if ($this->fail) { - return [false, "fail!"]; - } - return [true, $this->principal]; - - } - - /** - * This method is called when a user could not be authenticated, and - * authentication was required for the current request. - * - * This gives you the oppurtunity to set authentication headers. The 401 - * status code will already be set. - * - * In this case of Basic Auth, this would for example mean that the - * following header needs to be set: - * - * $response->addHeader('WWW-Authenticate', 'Basic realm=SabreDAV'); - * - * Keep in mind that in the case of multiple authentication backends, other - * WWW-Authenticate headers may already have been set, and you'll want to - * append your own WWW-Authenticate header instead of overwriting the - * existing one. - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @return void - */ - function challenge(RequestInterface $request, ResponseInterface $response) { - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOMySQLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOMySQLTest.php deleted file mode 100644 index 18f59793ad7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOMySQLTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -class PDOMySQLTest extends AbstractPDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOPgSqlTest.php deleted file mode 100644 index 79f38592d2e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -class PDOPgSqlTest extends AbstractPDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOSqliteTest.php deleted file mode 100644 index b1f382237c6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/Backend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth\Backend; - -class PDOSqliteTest extends AbstractPDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php deleted file mode 100644 index 743446127cc..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php - -namespace Sabre\DAV\Auth; - -use Sabre\DAV; -use Sabre\HTTP; - -class PluginTest extends \PHPUnit_Framework_TestCase { - - function testInit() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $plugin = new Plugin(new Backend\Mock()); - $this->assertTrue($plugin instanceof Plugin); - $fakeServer->addPlugin($plugin); - $this->assertEquals($plugin, $fakeServer->getPlugin('auth')); - $this->assertInternalType('array', $plugin->getPluginInfo()); - - } - - /** - * @depends testInit - */ - function testAuthenticate() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $plugin = new Plugin(new Backend\Mock()); - $fakeServer->addPlugin($plugin); - $this->assertTrue( - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]) - ); - - } - - /** - * @depends testInit - * @expectedException Sabre\DAV\Exception\NotAuthenticated - */ - function testAuthenticateFail() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $backend = new Backend\Mock(); - $backend->fail = true; - - $plugin = new Plugin($backend); - $fakeServer->addPlugin($plugin); - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]); - - } - - /** - * @depends testAuthenticateFail - */ - function testAuthenticateFailDontAutoRequire() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $backend = new Backend\Mock(); - $backend->fail = true; - - $plugin = new Plugin($backend); - $plugin->autoRequireLogin = false; - $fakeServer->addPlugin($plugin); - $this->assertTrue( - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]) - ); - $this->assertEquals(1, count($plugin->getLoginFailedReasons())); - - } - - /** - * @depends testAuthenticate - */ - function testMultipleBackend() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $backend1 = new Backend\Mock(); - $backend2 = new Backend\Mock(); - $backend2->fail = true; - - $plugin = new Plugin(); - $plugin->addBackend($backend1); - $plugin->addBackend($backend2); - - $fakeServer->addPlugin($plugin); - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]); - - $this->assertEquals('principals/admin', $plugin->getCurrentPrincipal()); - - } - - /** - * @depends testInit - * @expectedException Sabre\DAV\Exception - */ - function testNoAuthBackend() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - - $plugin = new Plugin(); - $fakeServer->addPlugin($plugin); - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]); - - } - /** - * @depends testInit - * @expectedException Sabre\DAV\Exception - */ - function testInvalidCheckResponse() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $backend = new Backend\Mock(); - $backend->invalidCheckResponse = true; - - $plugin = new Plugin($backend); - $fakeServer->addPlugin($plugin); - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]); - - } - - /** - * @depends testAuthenticate - */ - function testGetCurrentPrincipal() { - - $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla')); - $plugin = new Plugin(new Backend\Mock()); - $fakeServer->addPlugin($plugin); - $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()]); - $this->assertEquals('principals/admin', $plugin->getCurrentPrincipal()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php deleted file mode 100644 index ec104ec805e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/BasicNodeTest.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class BasicNodeTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testPut() { - - $file = new FileMock(); - $file->put('hi'); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testGet() { - - $file = new FileMock(); - $file->get(); - - } - - function testGetSize() { - - $file = new FileMock(); - $this->assertEquals(0, $file->getSize()); - - } - - - function testGetETag() { - - $file = new FileMock(); - $this->assertNull($file->getETag()); - - } - - function testGetContentType() { - - $file = new FileMock(); - $this->assertNull($file->getContentType()); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testDelete() { - - $file = new FileMock(); - $file->delete(); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testSetName() { - - $file = new FileMock(); - $file->setName('hi'); - - } - - function testGetLastModified() { - - $file = new FileMock(); - // checking if lastmod is within the range of a few seconds - $lastMod = $file->getLastModified(); - $compareTime = ($lastMod + 1) - time(); - $this->assertTrue($compareTime < 3); - - } - - function testGetChild() { - - $dir = new DirectoryMock(); - $file = $dir->getChild('mockfile'); - $this->assertTrue($file instanceof FileMock); - - } - - function testChildExists() { - - $dir = new DirectoryMock(); - $this->assertTrue($dir->childExists('mockfile')); - - } - - function testChildExistsFalse() { - - $dir = new DirectoryMock(); - $this->assertFalse($dir->childExists('mockfile2')); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testGetChild404() { - - $dir = new DirectoryMock(); - $file = $dir->getChild('blabla'); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testCreateFile() { - - $dir = new DirectoryMock(); - $dir->createFile('hello', 'data'); - - } - - /** - * @expectedException Sabre\DAV\Exception\Forbidden - */ - function testCreateDirectory() { - - $dir = new DirectoryMock(); - $dir->createDirectory('hello'); - - } - - function testSimpleDirectoryConstruct() { - - $dir = new SimpleCollection('simpledir', []); - $this->assertInstanceOf('Sabre\DAV\SimpleCollection', $dir); - - } - - /** - * @depends testSimpleDirectoryConstruct - */ - function testSimpleDirectoryConstructChild() { - - $file = new FileMock(); - $dir = new SimpleCollection('simpledir', [$file]); - $file2 = $dir->getChild('mockfile'); - - $this->assertEquals($file, $file2); - - } - - /** - * @expectedException Sabre\DAV\Exception - * @depends testSimpleDirectoryConstruct - */ - function testSimpleDirectoryBadParam() { - - $dir = new SimpleCollection('simpledir', ['string shouldn\'t be here']); - - } - - /** - * @depends testSimpleDirectoryConstruct - */ - function testSimpleDirectoryAddChild() { - - $file = new FileMock(); - $dir = new SimpleCollection('simpledir'); - $dir->addChild($file); - $file2 = $dir->getChild('mockfile'); - - $this->assertEquals($file, $file2); - - } - - /** - * @depends testSimpleDirectoryConstruct - * @depends testSimpleDirectoryAddChild - */ - function testSimpleDirectoryGetChildren() { - - $file = new FileMock(); - $dir = new SimpleCollection('simpledir'); - $dir->addChild($file); - - $this->assertEquals([$file], $dir->getChildren()); - - } - - /* - * @depends testSimpleDirectoryConstruct - */ - function testSimpleDirectoryGetName() { - - $dir = new SimpleCollection('simpledir'); - $this->assertEquals('simpledir', $dir->getName()); - - } - - /** - * @depends testSimpleDirectoryConstruct - * @expectedException Sabre\DAV\Exception\NotFound - */ - function testSimpleDirectoryGetChild404() { - - $dir = new SimpleCollection('simpledir'); - $dir->getChild('blabla'); - - } -} - -class DirectoryMock extends Collection { - - function getName() { - - return 'mockdir'; - - } - - function getChildren() { - - return [new FileMock()]; - - } - -} - -class FileMock extends File { - - function getName() { - - return 'mockfile'; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php deleted file mode 100644 index 54a3053ec9f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -namespace Sabre\DAV\Browser; - -use Sabre\DAV; - -require_once 'Sabre/DAV/AbstractServer.php'; -class GuessContentTypeTest extends DAV\AbstractServer { - - function setUp() { - - parent::setUp(); - \Sabre\TestUtil::clearTempDir(); - file_put_contents(SABRE_TEMPDIR . '/somefile.jpg', 'blabla'); - file_put_contents(SABRE_TEMPDIR . '/somefile.hoi', 'blabla'); - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - parent::tearDown(); - } - - function testGetProperties() { - - $properties = [ - '{DAV:}getcontenttype', - ]; - $result = $this->server->getPropertiesForPath('/somefile.jpg', $properties); - $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(404, $result[0]); - $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][404]); - - } - - /** - * @depends testGetProperties - */ - function testGetPropertiesPluginEnabled() { - - $this->server->addPlugin(new GuessContentType()); - $properties = [ - '{DAV:}getcontenttype', - ]; - $result = $this->server->getPropertiesForPath('/somefile.jpg', $properties); - $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(200, $result[0], 'We received: ' . print_r($result, true)); - $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][200]); - $this->assertEquals('image/jpeg', $result[0][200]['{DAV:}getcontenttype']); - - } - - /** - * @depends testGetPropertiesPluginEnabled - */ - function testGetPropertiesUnknown() { - - $this->server->addPlugin(new GuessContentType()); - $properties = [ - '{DAV:}getcontenttype', - ]; - $result = $this->server->getPropertiesForPath('/somefile.hoi', $properties); - $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(200, $result[0]); - $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][200]); - $this->assertEquals('application/octet-stream', $result[0][200]['{DAV:}getcontenttype']); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php deleted file mode 100644 index 33c4ede96b4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace Sabre\DAV\Browser; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class MapGetToPropFindTest extends DAV\AbstractServer { - - function setUp() { - - parent::setUp(); - $this->server->addPlugin(new MapGetToPropFind()); - - } - - function testCollectionGet() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'GET', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(''); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Incorrect status response received. Full response body: ' . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'DAV' => ['1, 3, extended-mkcol'], - 'Vary' => ['Brief,Prefer'], - ], - $this->response->getHeaders() - ); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php deleted file mode 100644 index f20c50f8637..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PluginTest.php +++ /dev/null @@ -1,186 +0,0 @@ -<?php - -namespace Sabre\DAV\Browser; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class PluginTest extends DAV\AbstractServer{ - - protected $plugin; - - function setUp() { - - parent::setUp(); - $this->server->addPlugin($this->plugin = new Plugin()); - $this->server->tree->getNodeForPath('')->createDirectory('dir2'); - - } - - function testCollectionGet() { - - $request = new HTTP\Request('GET', '/dir'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(200, $this->response->getStatus(), "Incorrect status received. Full response body: " . $this->response->getBodyAsString()); - $this->assertEquals( - [ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['text/html; charset=utf-8'], - 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"] - ], - $this->response->getHeaders() - ); - - $body = $this->response->getBodyAsString(); - $this->assertTrue(strpos($body, '<title>dir') !== false, $body); - $this->assertTrue(strpos($body, '<a href="/dir/child.txt">') !== false); - - } - - /** - * Adding the If-None-Match should have 0 effect, but it threw an error. - */ - function testCollectionGetIfNoneMatch() { - - $request = new HTTP\Request('GET', '/dir'); - $request->setHeader('If-None-Match', '"foo-bar"'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(200, $this->response->getStatus(), "Incorrect status received. Full response body: " . $this->response->getBodyAsString()); - $this->assertEquals( - [ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['text/html; charset=utf-8'], - 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"] - ], - $this->response->getHeaders() - ); - - $body = $this->response->getBodyAsString(); - $this->assertTrue(strpos($body, '<title>dir') !== false, $body); - $this->assertTrue(strpos($body, '<a href="/dir/child.txt">') !== false); - - } - function testCollectionGetRoot() { - - $request = new HTTP\Request('GET', '/'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(200, $this->response->status, "Incorrect status received. Full response body: " . $this->response->getBodyAsString()); - $this->assertEquals( - [ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['text/html; charset=utf-8'], - 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"] - ], - $this->response->getHeaders() - ); - - $body = $this->response->getBodyAsString(); - $this->assertTrue(strpos($body, '<title>/') !== false, $body); - $this->assertTrue(strpos($body, '<a href="/dir/">') !== false); - $this->assertTrue(strpos($body, '<span class="btn disabled">') !== false); - - } - - function testGETPassthru() { - - $request = new HTTP\Request('GET', '/random'); - $response = new HTTP\Response(); - $this->assertNull( - $this->plugin->httpGet($request, $response) - ); - - } - - function testPostOtherContentType() { - - $request = new HTTP\Request('POST', '/', ['Content-Type' => 'text/xml']); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(501, $this->response->status); - - } - - function testPostNoSabreAction() { - - $request = new HTTP\Request('POST', '/', ['Content-Type' => 'application/x-www-form-urlencoded']); - $request->setPostData([]); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(501, $this->response->status); - - } - - function testPostMkCol() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'POST', - 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', - ]; - $postVars = [ - 'sabreAction' => 'mkcol', - 'name' => 'new_collection', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setPostData($postVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(302, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Location' => ['/'], - ], $this->response->getHeaders()); - - $this->assertTrue(is_dir(SABRE_TEMPDIR . '/new_collection')); - - } - - function testGetAsset() { - - $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=favicon.ico'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(200, $this->response->getStatus(), 'Error: ' . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['image/vnd.microsoft.icon'], - 'Content-Length' => ['4286'], - 'Cache-Control' => ['public, max-age=1209600'], - 'Content-Security-Policy' => ["default-src 'none'; img-src 'self'; style-src 'self'; font-src 'self';"] - ], $this->response->getHeaders()); - - } - - function testGetAsset404() { - - $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=flavicon.ico'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(404, $this->response->getStatus(), 'Error: ' . $this->response->body); - - } - - function testGetAssetEscapeBasePath() { - - $request = new HTTP\Request('GET', '/?sabreAction=asset&assetName=./../assets/favicon.ico'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(404, $this->response->getStatus(), 'Error: ' . $this->response->body); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PropFindAllTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PropFindAllTest.php deleted file mode 100644 index 08c2080bbab..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Browser/PropFindAllTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -namespace Sabre\DAV\Browser; - -class PropFindAllTest extends \PHPUnit_Framework_TestCase { - - function testHandleSimple() { - - $pf = new PropFindAll('foo'); - $pf->handle('{DAV:}displayname', 'foo'); - - $this->assertEquals(200, $pf->getStatus('{DAV:}displayname')); - $this->assertEquals('foo', $pf->get('{DAV:}displayname')); - - - } - - function testHandleCallBack() { - - $pf = new PropFindAll('foo'); - $pf->handle('{DAV:}displayname', function() { return 'foo'; }); - - $this->assertEquals(200, $pf->getStatus('{DAV:}displayname')); - $this->assertEquals('foo', $pf->get('{DAV:}displayname')); - - } - - function testSet() { - - $pf = new PropFindAll('foo'); - $pf->set('{DAV:}displayname', 'foo'); - - $this->assertEquals(200, $pf->getStatus('{DAV:}displayname')); - $this->assertEquals('foo', $pf->get('{DAV:}displayname')); - - } - - function testSetNull() { - - $pf = new PropFindAll('foo'); - $pf->set('{DAV:}displayname', null); - - $this->assertEquals(404, $pf->getStatus('{DAV:}displayname')); - $this->assertEquals(null, $pf->get('{DAV:}displayname')); - - } - - function testGet404Properties() { - - $pf = new PropFindAll('foo'); - $pf->set('{DAV:}displayname', null); - $this->assertEquals( - ['{DAV:}displayname'], - $pf->get404Properties() - ); - - } - - function testGet404PropertiesNothing() { - - $pf = new PropFindAll('foo'); - $pf->set('{DAV:}displayname', 'foo'); - $this->assertEquals( - ['{http://sabredav.org/ns}idk'], - $pf->get404Properties() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientMock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientMock.php deleted file mode 100644 index 5a48b063ce8..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientMock.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP\RequestInterface; - -class ClientMock extends Client { - - public $request; - public $response; - - public $url; - public $curlSettings; - - /** - * Just making this method public - * - * @param string $url - * @return string - */ - function getAbsoluteUrl($url) { - - return parent::getAbsoluteUrl($url); - - } - - function doRequest(RequestInterface $request) { - - $this->request = $request; - return $this->response; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientTest.php deleted file mode 100644 index 687f61e2fd2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ClientTest.php +++ /dev/null @@ -1,306 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; - -require_once 'Sabre/DAV/ClientMock.php'; - -class ClientTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - if (!function_exists('curl_init')) { - $this->markTestSkipped('CURL must be installed to test the client'); - } - - } - - function testConstruct() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - $this->assertInstanceOf('Sabre\DAV\ClientMock', $client); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testConstructNoBaseUri() { - - $client = new ClientMock([]); - - } - - function testAuth() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'userName' => 'foo', - 'password' => 'bar', - ]); - - $this->assertEquals("foo:bar", $client->curlSettings[CURLOPT_USERPWD]); - $this->assertEquals(CURLAUTH_BASIC | CURLAUTH_DIGEST, $client->curlSettings[CURLOPT_HTTPAUTH]); - - } - - function testBasicAuth() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'userName' => 'foo', - 'password' => 'bar', - 'authType' => Client::AUTH_BASIC - ]); - - $this->assertEquals("foo:bar", $client->curlSettings[CURLOPT_USERPWD]); - $this->assertEquals(CURLAUTH_BASIC, $client->curlSettings[CURLOPT_HTTPAUTH]); - - } - - function testDigestAuth() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'userName' => 'foo', - 'password' => 'bar', - 'authType' => Client::AUTH_DIGEST - ]); - - $this->assertEquals("foo:bar", $client->curlSettings[CURLOPT_USERPWD]); - $this->assertEquals(CURLAUTH_DIGEST, $client->curlSettings[CURLOPT_HTTPAUTH]); - - } - - function testNTLMAuth() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'userName' => 'foo', - 'password' => 'bar', - 'authType' => Client::AUTH_NTLM - ]); - - $this->assertEquals("foo:bar", $client->curlSettings[CURLOPT_USERPWD]); - $this->assertEquals(CURLAUTH_NTLM, $client->curlSettings[CURLOPT_HTTPAUTH]); - - } - - function testProxy() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'proxy' => 'localhost:8888', - ]); - - $this->assertEquals("localhost:8888", $client->curlSettings[CURLOPT_PROXY]); - - } - - function testEncoding() { - - $client = new ClientMock([ - 'baseUri' => '/', - 'encoding' => Client::ENCODING_IDENTITY | Client::ENCODING_GZIP | Client::ENCODING_DEFLATE, - ]); - - $this->assertEquals("identity,deflate,gzip", $client->curlSettings[CURLOPT_ENCODING]); - - } - - function testPropFind() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $responseBody = <<<XML -<?xml version="1.0"?> -<multistatus xmlns="DAV:"> - <response> - <href>/foo</href> - <propstat> - <prop> - <displayname>bar</displayname> - </prop> - <status>HTTP/1.1 200 OK</status> - </propstat> - </response> -</multistatus> -XML; - - $client->response = new Response(207, [], $responseBody); - $result = $client->propFind('foo', ['{DAV:}displayname', '{urn:zim}gir']); - - $this->assertEquals(['{DAV:}displayname' => 'bar'], $result); - - $request = $client->request; - $this->assertEquals('PROPFIND', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Depth' => ['0'], - 'Content-Type' => ['application/xml'], - ], $request->getHeaders()); - - } - - /** - * @expectedException \Sabre\HTTP\ClientHttpException - */ - function testPropFindError() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $client->response = new Response(405, []); - $client->propFind('foo', ['{DAV:}displayname', '{urn:zim}gir']); - - } - - function testPropFindDepth1() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $responseBody = <<<XML -<?xml version="1.0"?> -<multistatus xmlns="DAV:"> - <response> - <href>/foo</href> - <propstat> - <prop> - <displayname>bar</displayname> - </prop> - <status>HTTP/1.1 200 OK</status> - </propstat> - </response> -</multistatus> -XML; - - $client->response = new Response(207, [], $responseBody); - $result = $client->propFind('foo', ['{DAV:}displayname', '{urn:zim}gir'], 1); - - $this->assertEquals([ - '/foo' => [ - '{DAV:}displayname' => 'bar' - ], - ], $result); - - $request = $client->request; - $this->assertEquals('PROPFIND', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Depth' => ['1'], - 'Content-Type' => ['application/xml'], - ], $request->getHeaders()); - - } - - function testPropPatch() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $responseBody = <<<XML -<?xml version="1.0"?> -<multistatus xmlns="DAV:"> - <response> - <href>/foo</href> - <propstat> - <prop> - <displayname>bar</displayname> - </prop> - <status>HTTP/1.1 200 OK</status> - </propstat> - </response> -</multistatus> -XML; - - $client->response = new Response(207, [], $responseBody); - $result = $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]); - $this->assertTrue($result); - $request = $client->request; - $this->assertEquals('PROPPATCH', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Content-Type' => ['application/xml'], - ], $request->getHeaders()); - - } - - /** - * @depends testPropPatch - * @expectedException \Sabre\HTTP\ClientHttpException - */ - function testPropPatchHTTPError() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $client->response = new Response(403, [], ''); - $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]); - - } - - /** - * @depends testPropPatch - * @expectedException Sabre\HTTP\ClientException - */ - function testPropPatchMultiStatusError() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $responseBody = <<<XML -<?xml version="1.0"?> -<multistatus xmlns="DAV:"> -<response> - <href>/foo</href> - <propstat> - <prop> - <displayname /> - </prop> - <status>HTTP/1.1 403 Forbidden</status> - </propstat> -</response> -</multistatus> -XML; - - $client->response = new Response(207, [], $responseBody); - $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]); - - } - - function testOPTIONS() { - - $client = new ClientMock([ - 'baseUri' => '/', - ]); - - $client->response = new Response(207, [ - 'DAV' => 'calendar-access, extended-mkcol', - ]); - $result = $client->options(); - - $this->assertEquals( - ['calendar-access', 'extended-mkcol'], - $result - ); - - $request = $client->request; - $this->assertEquals('OPTIONS', $request->getMethod()); - $this->assertEquals('/', $request->getUrl()); - $this->assertEquals([ - ], $request->getHeaders()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/CorePluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/CorePluginTest.php deleted file mode 100644 index 5c6f07ae80a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/CorePluginTest.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class CorePluginTest extends \PHPUnit_Framework_TestCase { - - function testGetInfo() { - - $corePlugin = new CorePlugin(); - $this->assertEquals('core', $corePlugin->getPluginInfo()['name']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/DbTestHelperTrait.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/DbTestHelperTrait.php deleted file mode 100644 index 63e35fb88ee..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/DbTestHelperTrait.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use PDO; -use PDOException; - -class DbCache { - - static $cache = []; - -} - -trait DbTestHelperTrait { - - /** - * Should be "mysql", "pgsql", "sqlite". - */ - public $driver = null; - - /** - * Returns a fully configured PDO object. - * - * @return PDO - */ - function getDb() { - - if (!$this->driver) { - throw new \Exception('You must set the $driver public property'); - } - - if (array_key_exists($this->driver, DbCache::$cache)) { - $pdo = DbCache::$cache[$this->driver]; - if ($pdo === null) { - $this->markTestSkipped($this->driver . ' was not enabled, not correctly configured or of the wrong version'); - } - return $pdo; - } - - try { - - switch ($this->driver) { - - case 'mysql' : - $pdo = new PDO(SABRE_MYSQLDSN, SABRE_MYSQLUSER, SABRE_MYSQLPASS); - break; - case 'sqlite' : - $pdo = new \PDO('sqlite:' . SABRE_TEMPDIR . '/testdb'); - break; - case 'pgsql' : - $pdo = new \PDO(SABRE_PGSQLDSN); - $version = $pdo->query('SELECT VERSION()')->fetchColumn(); - preg_match('|([0-9\.]){5,}|', $version, $matches); - $version = $matches[0]; - if (version_compare($version, '9.5.0', '<')) { - DbCache::$cache[$this->driver] = null; - $this->markTestSkipped('We require at least Postgres 9.5. This server is running ' . $version); - } - break; - - - - } - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - } catch (PDOException $e) { - - $this->markTestSkipped($this->driver . ' was not enabled or not correctly configured. Error message: ' . $e->getMessage()); - - } - - DbCache::$cache[$this->driver] = $pdo; - return $pdo; - - } - - /** - * Alias for getDb - * - * @return PDO - */ - function getPDO() { - - return $this->getDb(); - - } - - /** - * Uses .sql files from the examples directory to initialize the database. - * - * @param string $schemaName - * @return void - */ - function createSchema($schemaName) { - - $db = $this->getDb(); - - $queries = file_get_contents( - __DIR__ . '/../../../examples/sql/' . $this->driver . '.' . $schemaName . '.sql' - ); - - foreach (explode(';', $queries) as $query) { - - if (trim($query) === '') { - continue; - } - - $db->exec($query); - - } - - } - - /** - * Drops tables, if they exist - * - * @param string|string[] $tableNames - * @return void - */ - function dropTables($tableNames) { - - $tableNames = (array)$tableNames; - $db = $this->getDb(); - foreach ($tableNames as $tableName) { - $db->exec('DROP TABLE IF EXISTS ' . $tableName); - } - - - } - - function tearDown() { - - switch ($this->driver) { - - case 'sqlite' : - // Recreating sqlite, just in case - unset(DbCache::$cache[$this->driver]); - unlink(SABRE_TEMPDIR . '/testdb'); - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php deleted file mode 100644 index 174a561b537..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -namespace Sabre\DAV\Exception; - -use DOMDocument; -use Sabre\DAV; - -class LockedTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $dom = new DOMDocument('1.0'); - $dom->formatOutput = true; - $root = $dom->createElement('d:root'); - - $dom->appendChild($root); - $root->setAttribute('xmlns:d', 'DAV:'); - - $lockInfo = new DAV\Locks\LockInfo(); - $lockInfo->uri = '/foo'; - $locked = new Locked($lockInfo); - - $locked->serialize(new DAV\Server(), $root); - - $output = $dom->saveXML(); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:lock-token-submitted xmlns:d="DAV:"> - <d:href>/foo</d:href> - </d:lock-token-submitted> -</d:root> -'; - - $this->assertEquals($expected, $output); - - } - - function testSerializeAmpersand() { - - $dom = new DOMDocument('1.0'); - $dom->formatOutput = true; - $root = $dom->createElement('d:root'); - - $dom->appendChild($root); - $root->setAttribute('xmlns:d', 'DAV:'); - - $lockInfo = new DAV\Locks\LockInfo(); - $lockInfo->uri = '/foo&bar'; - $locked = new Locked($lockInfo); - - $locked->serialize(new DAV\Server(), $root); - - $output = $dom->saveXML(); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:lock-token-submitted xmlns:d="DAV:"> - <d:href>/foo&amp;bar</d:href> - </d:lock-token-submitted> -</d:root> -'; - - $this->assertEquals($expected, $output); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/PaymentRequiredTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/PaymentRequiredTest.php deleted file mode 100644 index 7142937b4c0..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/PaymentRequiredTest.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Sabre\DAV\Exception; - -class PaymentRequiredTest extends \PHPUnit_Framework_TestCase { - - function testGetHTTPCode() { - - $ex = new PaymentRequired(); - $this->assertEquals(402, $ex->getHTTPCode()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/ServiceUnavailableTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/ServiceUnavailableTest.php deleted file mode 100644 index 1cc691e6d38..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/ServiceUnavailableTest.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Sabre\DAV\Exception; - -class ServiceUnavailableTest extends \PHPUnit_Framework_TestCase { - - function testGetHTTPCode() { - - $ex = new ServiceUnavailable(); - $this->assertEquals(503, $ex->getHTTPCode()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/TooManyMatchesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/TooManyMatchesTest.php deleted file mode 100644 index 0f58e8726be..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Exception/TooManyMatchesTest.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Sabre\DAV\Exception; - -use DOMDocument; -use Sabre\DAV; - -class TooManyMatchesTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $dom = new DOMDocument('1.0'); - $dom->formatOutput = true; - $root = $dom->createElement('d:root'); - - $dom->appendChild($root); - $root->setAttribute('xmlns:d', 'DAV:'); - - $locked = new TooManyMatches(); - - $locked->serialize(new DAV\Server(), $root); - - $output = $dom->saveXML(); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:number-of-matches-within-limits xmlns:d="DAV:"/> -</d:root> -'; - - $this->assertEquals($expected, $output); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ExceptionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ExceptionTest.php deleted file mode 100644 index 0eb4f3dd878..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ExceptionTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class ExceptionTest extends \PHPUnit_Framework_TestCase { - - function testStatus() { - - $e = new Exception(); - $this->assertEquals(500, $e->getHTTPCode()); - - } - - function testExceptionStatuses() { - - $c = [ - 'Sabre\\DAV\\Exception\\NotAuthenticated' => 401, - 'Sabre\\DAV\\Exception\\InsufficientStorage' => 507, - ]; - - foreach ($c as $class => $status) { - - $obj = new $class(); - $this->assertEquals($status, $obj->getHTTPCode()); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/DirectoryTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/DirectoryTest.php deleted file mode 100644 index 097ebd26b92..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/DirectoryTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\DAV\FSExt; - -class DirectoryTest extends \PHPUnit_Framework_TestCase { - - function create() { - - return new Directory(SABRE_TEMPDIR); - - } - - function testCreate() { - - $dir = $this->create(); - $this->assertEquals(basename(SABRE_TEMPDIR), $dir->getName()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testChildExistDot() { - - $dir = $this->create(); - $dir->childExists('..'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/FileTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/FileTest.php deleted file mode 100644 index f5d65a44f96..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/FileTest.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -namespace Sabre\DAV\FSExt; - -require_once 'Sabre/TestUtil.php'; - -class FileTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - file_put_contents(SABRE_TEMPDIR . '/file.txt', 'Contents'); - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testPut() { - - $filename = SABRE_TEMPDIR . '/file.txt'; - $file = new File($filename); - $result = $file->put('New contents'); - - $this->assertEquals('New contents', file_get_contents(SABRE_TEMPDIR . '/file.txt')); - $this->assertEquals( - '"' . - sha1( - fileinode($filename) . - filesize($filename) . - filemtime($filename) - ) . '"', - $result - ); - - } - - function testRange() { - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $file->put('0000000'); - $file->patch('111', 2, 3); - - $this->assertEquals('0001110', file_get_contents(SABRE_TEMPDIR . '/file.txt')); - - } - - function testRangeStream() { - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, "222"); - rewind($stream); - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $file->put('0000000'); - $file->patch($stream, 2, 3); - - $this->assertEquals('0002220', file_get_contents(SABRE_TEMPDIR . '/file.txt')); - - } - - - function testGet() { - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $this->assertEquals('Contents', stream_get_contents($file->get())); - - } - - function testDelete() { - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $file->delete(); - - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/file.txt')); - - } - - function testGetETag() { - - $filename = SABRE_TEMPDIR . '/file.txt'; - $file = new File($filename); - $this->assertEquals( - '"' . - sha1( - fileinode($filename) . - filesize($filename) . - filemtime($filename) - ) . '"', - $file->getETag() - ); - } - - function testGetContentType() { - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $this->assertNull($file->getContentType()); - - } - - function testGetSize() { - - $file = new File(SABRE_TEMPDIR . '/file.txt'); - $this->assertEquals(8, $file->getSize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php deleted file mode 100644 index 20fca490a35..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/FSExt/ServerTest.php +++ /dev/null @@ -1,246 +0,0 @@ -<?php - -namespace Sabre\DAV\FSExt; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class ServerTest extends DAV\AbstractServer{ - - protected function getRootNode() { - - return new Directory($this->tempDir); - - } - - function testGet() { - - $request = new HTTP\Request('GET', '/test.txt'); - $filename = $this->tempDir . '/test.txt'; - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(200, $this->response->getStatus(), 'Invalid status code received.'); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [13], - 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($filename)))], - 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], - ], - $this->response->getHeaders() - ); - - - $this->assertEquals('Test contents', stream_get_contents($this->response->body)); - - } - - function testHEAD() { - - $request = new HTTP\Request('HEAD', '/test.txt'); - $filename = $this->tempDir . '/test.txt'; - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [13], - 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))], - 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('', $this->response->body); - - } - - function testPut() { - - $request = new HTTP\Request('PUT', '/testput.txt'); - $filename = $this->tempDir . '/testput.txt'; - $request->setBody('Testing new file'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], - ], $this->response->getHeaders()); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertEquals('Testing new file', file_get_contents($filename)); - - } - - function testPutAlreadyExists() { - - $request = new HTTP\Request('PUT', '/test.txt', ['If-None-Match' => '*']); - $request->setBody('Testing new file'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(412, $this->response->status); - $this->assertNotEquals('Testing new file', file_get_contents($this->tempDir . '/test.txt')); - - } - - function testMkcol() { - - $request = new HTTP\Request('MKCOL', '/testcol'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertTrue(is_dir($this->tempDir . '/testcol')); - - } - - function testPutUpdate() { - - $request = new HTTP\Request('PUT', '/test.txt'); - $request->setBody('Testing updated file'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals('0', $this->response->getHeader('Content-Length')); - - $this->assertEquals(204, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertEquals('Testing updated file', file_get_contents($this->tempDir . '/test.txt')); - - } - - function testDelete() { - - $request = new HTTP\Request('DELETE', '/test.txt'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - - $this->assertEquals(204, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertFalse(file_exists($this->tempDir . '/test.txt')); - - } - - function testDeleteDirectory() { - - mkdir($this->tempDir . '/testcol'); - file_put_contents($this->tempDir . '/testcol/test.txt', 'Hi! I\'m a file with a short lifespan'); - - $request = new HTTP\Request('DELETE', '/testcol'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - $this->assertEquals(204, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertFalse(file_exists($this->tempDir . '/testcol')); - - } - - function testOptions() { - - $request = new HTTP\Request('OPTIONS', '/'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [DAV\Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('', $this->response->body); - - } - - function testMove() { - - mkdir($this->tempDir . '/testcol'); - - $request = new HTTP\Request('MOVE', '/test.txt', ['Destination' => '/testcol/test2.txt']); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('', $this->response->body); - - $this->assertEquals([ - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [DAV\Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertTrue( - is_file($this->tempDir . '/testcol/test2.txt') - ); - - - } - - /** - * This test checks if it's possible to move a non-FSExt collection into a - * FSExt collection. - * - * The moveInto function *should* ignore the object and let sabredav itself - * execute the slow move. - */ - function testMoveOtherObject() { - - mkdir($this->tempDir . '/tree1'); - mkdir($this->tempDir . '/tree2'); - - $tree = new DAV\Tree(new DAV\SimpleCollection('root', [ - new DAV\FS\Directory($this->tempDir . '/tree1'), - new DAV\FSExt\Directory($this->tempDir . '/tree2'), - ])); - $this->server->tree = $tree; - - $request = new HTTP\Request('MOVE', '/tree1', ['Destination' => '/tree2/tree1']); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('', $this->response->body); - - $this->assertEquals([ - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [DAV\Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertTrue( - is_dir($this->tempDir . '/tree2/tree1') - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/GetIfConditionsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/GetIfConditionsTest.php deleted file mode 100644 index d41abc00a2b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/GetIfConditionsTest.php +++ /dev/null @@ -1,337 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; -require_once 'Sabre/DAV/AbstractServer.php'; - -class GetIfConditionsTest extends AbstractServer { - - function testNoConditions() { - - $request = new HTTP\Request(); - - $conditions = $this->server->getIfConditions($request); - $this->assertEquals([], $conditions); - - } - - function testLockToken() { - - $request = new HTTP\Request('GET', '/path/', ['If' => '(<opaquelocktoken:token1>)']); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'path', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - ], - - ], - - ]; - - $this->assertEquals($compare, $conditions); - - } - - function testNotLockToken() { - - $serverVars = [ - 'HTTP_IF' => '(Not <opaquelocktoken:token1>)', - 'REQUEST_URI' => '/bla' - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'bla', - 'tokens' => [ - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - ], - - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function testLockTokenUrl() { - - $serverVars = [ - 'HTTP_IF' => '<http://www.example.com/> (<opaquelocktoken:token1>)', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => '', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - ], - - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function test2LockTokens() { - - $serverVars = [ - 'HTTP_IF' => '(<opaquelocktoken:token1>) (Not <opaquelocktoken:token2>)', - 'REQUEST_URI' => '/bla', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'bla', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token2', - 'etag' => '', - ], - ], - - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function test2UriLockTokens() { - - $serverVars = [ - 'HTTP_IF' => '<http://www.example.org/node1> (<opaquelocktoken:token1>) <http://www.example.org/node2> (Not <opaquelocktoken:token2>)', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'node1', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - ], - ], - [ - 'uri' => 'node2', - 'tokens' => [ - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token2', - 'etag' => '', - ], - ], - - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function test2UriMultiLockTokens() { - - $serverVars = [ - 'HTTP_IF' => '<http://www.example.org/node1> (<opaquelocktoken:token1>) (<opaquelocktoken:token2>) <http://www.example.org/node2> (Not <opaquelocktoken:token3>)', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'node1', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '', - ], - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token2', - 'etag' => '', - ], - ], - ], - [ - 'uri' => 'node2', - 'tokens' => [ - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token3', - 'etag' => '', - ], - ], - - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function testEtag() { - - $serverVars = [ - 'HTTP_IF' => '(["etag1"])', - 'REQUEST_URI' => '/foo', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'foo', - 'tokens' => [ - [ - 'negate' => false, - 'token' => '', - 'etag' => '"etag1"', - ], - ], - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function test2Etags() { - - $serverVars = [ - 'HTTP_IF' => '<http://www.example.org/> (["etag1"]) (["etag2"])', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => '', - 'tokens' => [ - [ - 'negate' => false, - 'token' => '', - 'etag' => '"etag1"', - ], - [ - 'negate' => false, - 'token' => '', - 'etag' => '"etag2"', - ], - ], - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - - function testComplexIf() { - - $serverVars = [ - 'HTTP_IF' => '<http://www.example.org/node1> (<opaquelocktoken:token1> ["etag1"]) ' . - '(Not <opaquelocktoken:token2>) (["etag2"]) <http://www.example.org/node2> ' . - '(<opaquelocktoken:token3>) (Not <opaquelocktoken:token4>) (["etag3"])', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $conditions = $this->server->getIfConditions($request); - - $compare = [ - - [ - 'uri' => 'node1', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token1', - 'etag' => '"etag1"', - ], - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token2', - 'etag' => '', - ], - [ - 'negate' => false, - 'token' => '', - 'etag' => '"etag2"', - ], - ], - ], - [ - 'uri' => 'node2', - 'tokens' => [ - [ - 'negate' => false, - 'token' => 'opaquelocktoken:token3', - 'etag' => '', - ], - [ - 'negate' => true, - 'token' => 'opaquelocktoken:token4', - 'etag' => '', - ], - [ - 'negate' => false, - 'token' => '', - 'etag' => '"etag3"', - ], - ], - ], - - ]; - $this->assertEquals($compare, $conditions); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HTTPPreferParsingTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HTTPPreferParsingTest.php deleted file mode 100644 index cd8bee9686d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HTTPPreferParsingTest.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -class HTTPPreferParsingTest extends \Sabre\DAVServerTest { - - function testParseSimple() { - - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_PREFER' => 'return-asynch', - ]); - - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals([ - 'respond-async' => true, - 'return' => null, - 'handling' => null, - 'wait' => null, - ], $server->getHTTPPrefer()); - - } - - function testParseValue() { - - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_PREFER' => 'wait=10', - ]); - - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals([ - 'respond-async' => false, - 'return' => null, - 'handling' => null, - 'wait' => '10', - ], $server->getHTTPPrefer()); - - } - - function testParseMultiple() { - - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_PREFER' => 'return-minimal, strict,lenient', - ]); - - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals([ - 'respond-async' => false, - 'return' => 'minimal', - 'handling' => 'lenient', - 'wait' => null, - ], $server->getHTTPPrefer()); - - } - - function testParseWeirdValue() { - - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_PREFER' => 'BOOOH', - ]); - - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals([ - 'respond-async' => false, - 'return' => null, - 'handling' => null, - 'wait' => null, - 'boooh' => true, - ], $server->getHTTPPrefer()); - - } - - function testBrief() { - - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_BRIEF' => 't', - ]); - - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals([ - 'respond-async' => false, - 'return' => 'minimal', - 'handling' => null, - 'wait' => null, - ], $server->getHTTPPrefer()); - - } - - /** - * propfindMinimal - * - * @return void - */ - function testpropfindMinimal() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PROPFIND', - 'REQUEST_URI' => '/', - 'HTTP_PREFER' => 'return-minimal', - ]); - $request->setBody(<<<BLA -<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:something /> - <d:resourcetype /> - </d:prop> -</d:propfind> -BLA - ); - - $response = $this->request($request); - - $body = $response->getBodyAsString(); - - $this->assertEquals(207, $response->getStatus(), $body); - - $this->assertTrue(strpos($body, 'resourcetype') !== false, $body); - $this->assertTrue(strpos($body, 'something') === false, $body); - - } - - function testproppatchMinimal() { - - $request = new HTTP\Request('PROPPATCH', '/', ['Prefer' => 'return-minimal']); - $request->setBody(<<<BLA -<?xml version="1.0"?> -<d:propertyupdate xmlns:d="DAV:"> - <d:set> - <d:prop> - <d:something>nope!</d:something> - </d:prop> - </d:set> -</d:propertyupdate> -BLA - ); - - $this->server->on('propPatch', function($path, PropPatch $propPatch) { - - $propPatch->handle('{DAV:}something', function($props) { - return true; - }); - - }); - - $response = $this->request($request); - - $this->assertEquals(0, strlen($response->body), 'Expected empty body: ' . $response->body); - $this->assertEquals(204, $response->status); - - } - - function testproppatchMinimalError() { - - $request = new HTTP\Request('PROPPATCH', '/', ['Prefer' => 'return-minimal']); - $request->setBody(<<<BLA -<?xml version="1.0"?> -<d:propertyupdate xmlns:d="DAV:"> - <d:set> - <d:prop> - <d:something>nope!</d:something> - </d:prop> - </d:set> -</d:propertyupdate> -BLA - ); - - $response = $this->request($request); - - $body = $response->getBodyAsString(); - - $this->assertEquals(207, $response->status); - $this->assertTrue(strpos($body, 'something') !== false); - $this->assertTrue(strpos($body, '403 Forbidden') !== false, $body); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpCopyTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpCopyTest.php deleted file mode 100644 index b5e64369ef9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpCopyTest.php +++ /dev/null @@ -1,199 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the COPY request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpCopyTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'content1', - 'file2' => 'content2', - 'coll1' => [ - 'file3' => 'content3', - 'file4' => 'content4', - ] - ]); - - } - - function testCopyFile() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file5' - ]); - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus()); - $this->assertEquals('content1', $this->tree->getChild('file5')->get()); - - } - - function testCopyFileToSelf() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file1' - ]); - $response = $this->request($request); - $this->assertEquals(403, $response->getStatus()); - - } - - function testCopyFileToExisting() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file2' - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus()); - $this->assertEquals('content1', $this->tree->getChild('file2')->get()); - - } - - function testCopyFileToExistingOverwriteT() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'T', - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus()); - $this->assertEquals('content1', $this->tree->getChild('file2')->get()); - - } - - function testCopyFileToExistingOverwriteBadValue() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'B', - ]); - $response = $this->request($request); - $this->assertEquals(400, $response->getStatus()); - - } - - function testCopyFileNonExistantParent() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/notfound/file2', - ]); - $response = $this->request($request); - $this->assertEquals(409, $response->getStatus()); - - } - - function testCopyFileToExistingOverwriteF() { - - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'F', - ]); - $response = $this->request($request); - $this->assertEquals(412, $response->getStatus()); - $this->assertEquals('content2', $this->tree->getChild('file2')->get()); - - } - - function testCopyFileToExistinBlockedCreateDestination() { - - $this->server->on('beforeBind', function($path) { - - if ($path === 'file2') { - return false; - } - - }); - $request = new HTTP\Request('COPY', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'T', - ]); - $response = $this->request($request); - - // This checks if the destination file is intact. - $this->assertEquals('content2', $this->tree->getChild('file2')->get()); - - } - - function testCopyColl() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/coll2' - ]); - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus()); - $this->assertEquals('content3', $this->tree->getChild('coll2')->getChild('file3')->get()); - - } - - function testCopyCollToSelf() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/coll1' - ]); - $response = $this->request($request); - $this->assertEquals(403, $response->getStatus()); - - } - - function testCopyCollToExisting() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/file2' - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus()); - $this->assertEquals('content3', $this->tree->getChild('file2')->getChild('file3')->get()); - - } - - function testCopyCollToExistingOverwriteT() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/file2', - 'Overwrite' => 'T', - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus()); - $this->assertEquals('content3', $this->tree->getChild('file2')->getChild('file3')->get()); - - } - - function testCopyCollToExistingOverwriteF() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/file2', - 'Overwrite' => 'F', - ]); - $response = $this->request($request); - $this->assertEquals(412, $response->getStatus()); - $this->assertEquals('content2', $this->tree->getChild('file2')->get()); - - } - - function testCopyCollIntoSubtree() { - - $request = new HTTP\Request('COPY', '/coll1', [ - 'Destination' => '/coll1/subcol', - ]); - $response = $this->request($request); - $this->assertEquals(409, $response->getStatus()); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpDeleteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpDeleteTest.php deleted file mode 100644 index bd1b3315057..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpDeleteTest.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the PUT request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpDeleteTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'foo', - 'dir' => [ - 'subfile' => 'bar', - 'subfile2' => 'baz', - ], - ]); - - } - - /** - * A successful DELETE - */ - function testDelete() { - - $request = new HTTP\Request('DELETE', '/file1'); - - $response = $this->request($request); - - $this->assertEquals( - 204, - $response->getStatus(), - "Incorrect status code. Response body: " . $response->getBodyAsString() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - ], - $response->getHeaders() - ); - - } - - /** - * Deleting a Directory - */ - function testDeleteDirectory() { - - $request = new HTTP\Request('DELETE', '/dir'); - - $response = $this->request($request); - - $this->assertEquals( - 204, - $response->getStatus(), - "Incorrect status code. Response body: " . $response->getBodyAsString() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - ], - $response->getHeaders() - ); - - } - - /** - * DELETE on a node that does not exist - */ - function testDeleteNotFound() { - - $request = new HTTP\Request('DELETE', '/file2'); - $response = $this->request($request); - - $this->assertEquals( - 404, - $response->getStatus(), - "Incorrect status code. Response body: " . $response->getBodyAsString() - ); - - } - - /** - * DELETE with preconditions - */ - function testDeletePreconditions() { - - $request = new HTTP\Request('DELETE', '/file1', [ - 'If-Match' => '"' . md5('foo') . '"', - ]); - - $response = $this->request($request); - - $this->assertEquals( - 204, - $response->getStatus(), - "Incorrect status code. Response body: " . $response->getBodyAsString() - ); - - } - - /** - * DELETE with incorrect preconditions - */ - function testDeletePreconditionsFailed() { - - $request = new HTTP\Request('DELETE', '/file1', [ - 'If-Match' => '"' . md5('bar') . '"', - ]); - - $response = $this->request($request); - - $this->assertEquals( - 412, - $response->getStatus(), - "Incorrect status code. Response body: " . $response->getBodyAsString() - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpGetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpGetTest.php deleted file mode 100644 index 1eefba70657..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpGetTest.php +++ /dev/null @@ -1,158 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the GET request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpGetTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'foo', - new Mock\Collection('dir', []), - new Mock\StreamingFile('streaming', 'stream') - ]); - - } - - function testGet() { - - $request = new HTTP\Request('GET', '/file1'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Removing Last-Modified because it keeps changing. - $response->removeHeader('Last-Modified'); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [3], - 'ETag' => ['"' . md5('foo') . '"'], - ], - $response->getHeaders() - ); - - $this->assertEquals('foo', $response->getBodyAsString()); - - } - - function testGetHttp10() { - - $request = new HTTP\Request('GET', '/file1'); - $request->setHttpVersion('1.0'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Removing Last-Modified because it keeps changing. - $response->removeHeader('Last-Modified'); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [3], - 'ETag' => ['"' . md5('foo') . '"'], - ], - $response->getHeaders() - ); - - $this->assertEquals('1.0', $response->getHttpVersion()); - - $this->assertEquals('foo', $response->getBodyAsString()); - - } - - function testGet404() { - - $request = new HTTP\Request('GET', '/notfound'); - $response = $this->request($request); - - $this->assertEquals(404, $response->getStatus()); - - } - - function testGet404_aswell() { - - $request = new HTTP\Request('GET', '/file1/subfile'); - $response = $this->request($request); - - $this->assertEquals(404, $response->getStatus()); - - } - - /** - * We automatically normalize double slashes. - */ - function testGetDoubleSlash() { - - $request = new HTTP\Request('GET', '//file1'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Removing Last-Modified because it keeps changing. - $response->removeHeader('Last-Modified'); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [3], - 'ETag' => ['"' . md5('foo') . '"'], - ], - $response->getHeaders() - ); - - $this->assertEquals('foo', $response->getBodyAsString()); - - } - - function testGetCollection() { - - $request = new HTTP\Request('GET', '/dir'); - $response = $this->request($request); - - $this->assertEquals(501, $response->getStatus()); - - } - - function testGetStreaming() { - - $request = new HTTP\Request('GET', '/streaming'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Removing Last-Modified because it keeps changing. - $response->removeHeader('Last-Modified'); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - ], - $response->getHeaders() - ); - - $this->assertEquals('stream', $response->getBodyAsString()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpHeadTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpHeadTest.php deleted file mode 100644 index 2cd1c5ea3c1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpHeadTest.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the HEAD request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpHeadTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'foo', - new Mock\Collection('dir', []), - new Mock\StreamingFile('streaming', 'stream') - ]); - - } - - function testHEAD() { - - $request = new HTTP\Request('HEAD', '//file1'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - // Removing Last-Modified because it keeps changing. - $response->removeHeader('Last-Modified'); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [3], - 'ETag' => ['"' . md5('foo') . '"'], - ], - $response->getHeaders() - ); - - $this->assertEquals('', $response->getBodyAsString()); - - } - - /** - * According to the specs, HEAD should behave identical to GET. But, broken - * clients needs HEAD requests on collections to respond with a 200, so - * that's what we do. - */ - function testHEADCollection() { - - $request = new HTTP\Request('HEAD', '/dir'); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - } - - /** - * HEAD automatically internally maps to GET via a sub-request. - * The Auth plugin must not be triggered twice for these, so we'll - * test for that. - */ - function testDoubleAuth() { - - $count = 0; - - $authBackend = new Auth\Backend\BasicCallBack(function($userName, $password) use (&$count) { - $count++; - return true; - }); - $this->server->addPlugin( - new Auth\Plugin( - $authBackend - ) - ); - $request = new HTTP\Request('HEAD', '/file1', ['Authorization' => 'Basic ' . base64_encode('user:pass')]); - $response = $this->request($request); - - $this->assertEquals(200, $response->getStatus()); - - $this->assertEquals(1, $count, 'Auth was triggered twice :('); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpMoveTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpMoveTest.php deleted file mode 100644 index 52f7c674ee9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpMoveTest.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the MOVE request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpMoveTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'content1', - 'file2' => 'content2', - ]); - - } - - function testMoveToSelf() { - - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file1' - ]); - $response = $this->request($request); - $this->assertEquals(403, $response->getStatus()); - $this->assertEquals('content1', $this->tree->getChild('file1')->get()); - - } - - function testMove() { - - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file3' - ]); - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus(), print_r($response, true)); - $this->assertEquals('content1', $this->tree->getChild('file3')->get()); - $this->assertFalse($this->tree->childExists('file1')); - - } - - function testMoveToExisting() { - - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file2' - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus(), print_r($response, true)); - $this->assertEquals('content1', $this->tree->getChild('file2')->get()); - $this->assertFalse($this->tree->childExists('file1')); - - } - - function testMoveToExistingOverwriteT() { - - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'T', - ]); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus(), print_r($response, true)); - $this->assertEquals('content1', $this->tree->getChild('file2')->get()); - $this->assertFalse($this->tree->childExists('file1')); - - } - - function testMoveToExistingOverwriteF() { - - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file2', - 'Overwrite' => 'F', - ]); - $response = $this->request($request); - $this->assertEquals(412, $response->getStatus(), print_r($response, true)); - $this->assertEquals('content1', $this->tree->getChild('file1')->get()); - $this->assertEquals('content2', $this->tree->getChild('file2')->get()); - $this->assertTrue($this->tree->childExists('file1')); - $this->assertTrue($this->tree->childExists('file2')); - - } - - /** - * If we MOVE to an existing file, but a plugin prevents the original from - * being deleted, we need to make sure that the server does not delete - * the destination. - */ - function testMoveToExistingBlockedDeleteSource() { - - $this->server->on('beforeUnbind', function($path) { - - if ($path === 'file1') { - throw new \Sabre\DAV\Exception\Forbidden('uh oh'); - } - - }); - $request = new HTTP\Request('MOVE', '/file1', [ - 'Destination' => '/file2' - ]); - $response = $this->request($request); - $this->assertEquals(403, $response->getStatus(), print_r($response, true)); - $this->assertEquals('content1', $this->tree->getChild('file1')->get()); - $this->assertEquals('content2', $this->tree->getChild('file2')->get()); - $this->assertTrue($this->tree->childExists('file1')); - $this->assertTrue($this->tree->childExists('file2')); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpPutTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpPutTest.php deleted file mode 100644 index 86480b1c22a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/HttpPutTest.php +++ /dev/null @@ -1,349 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\DAVServerTest; -use Sabre\HTTP; - -/** - * Tests related to the PUT request. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class HttpPutTest extends DAVServerTest { - - /** - * Sets up the DAV tree. - * - * @return void - */ - function setUpTree() { - - $this->tree = new Mock\Collection('root', [ - 'file1' => 'foo', - ]); - - } - - /** - * A successful PUT of a new file. - */ - function testPut() { - - $request = new HTTP\Request('PUT', '/file2', [], 'hello'); - - $response = $this->request($request); - - $this->assertEquals(201, $response->getStatus(), 'Incorrect status code received. Full response body:' . $response->getBodyAsString()); - - $this->assertEquals( - 'hello', - $this->server->tree->getNodeForPath('file2')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('hello') . '"'] - ], - $response->getHeaders() - ); - - } - - /** - * A successful PUT on an existing file. - * - * @depends testPut - */ - function testPutExisting() { - - $request = new HTTP\Request('PUT', '/file1', [], 'bar'); - - $response = $this->request($request); - - $this->assertEquals(204, $response->getStatus()); - - $this->assertEquals( - 'bar', - $this->server->tree->getNodeForPath('file1')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('bar') . '"'] - ], - $response->getHeaders() - ); - - } - - /** - * PUT on existing file with If-Match: * - * - * @depends testPutExisting - */ - function testPutExistingIfMatchStar() { - - $request = new HTTP\Request( - 'PUT', - '/file1', - ['If-Match' => '*'], - 'hello' - ); - - $response = $this->request($request); - - $this->assertEquals(204, $response->getStatus()); - - $this->assertEquals( - 'hello', - $this->server->tree->getNodeForPath('file1')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('hello') . '"'] - ], - $response->getHeaders() - ); - - } - - /** - * PUT on existing file with If-Match: with a correct etag - * - * @depends testPutExisting - */ - function testPutExistingIfMatchCorrect() { - - $request = new HTTP\Request( - 'PUT', - '/file1', - ['If-Match' => '"' . md5('foo') . '"'], - 'hello' - ); - - $response = $this->request($request); - - $this->assertEquals(204, $response->status); - - $this->assertEquals( - 'hello', - $this->server->tree->getNodeForPath('file1')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('hello') . '"'], - ], - $response->getHeaders() - ); - - } - - /** - * PUT with Content-Range should be rejected. - * - * @depends testPut - */ - function testPutContentRange() { - - $request = new HTTP\Request( - 'PUT', - '/file2', - ['Content-Range' => 'bytes/100-200'], - 'hello' - ); - - $response = $this->request($request); - $this->assertEquals(400, $response->getStatus()); - - } - - /** - * PUT on non-existing file with If-None-Match: * should work. - * - * @depends testPut - */ - function testPutIfNoneMatchStar() { - - $request = new HTTP\Request( - 'PUT', - '/file2', - ['If-None-Match' => '*'], - 'hello' - ); - - $response = $this->request($request); - - $this->assertEquals(201, $response->getStatus()); - - $this->assertEquals( - 'hello', - $this->server->tree->getNodeForPath('file2')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('hello') . '"'] - ], - $response->getHeaders() - ); - - } - - /** - * PUT on non-existing file with If-Match: * should fail. - * - * @depends testPut - */ - function testPutIfMatchStar() { - - $request = new HTTP\Request( - 'PUT', - '/file2', - ['If-Match' => '*'], - 'hello' - ); - - $response = $this->request($request); - - $this->assertEquals(412, $response->getStatus()); - - } - - /** - * PUT on existing file with If-None-Match: * should fail. - * - * @depends testPut - */ - function testPutExistingIfNoneMatchStar() { - - $request = new HTTP\Request( - 'PUT', - '/file1', - ['If-None-Match' => '*'], - 'hello' - ); - $request->setBody('hello'); - - $response = $this->request($request); - - $this->assertEquals(412, $response->getStatus()); - - } - - /** - * PUT thats created in a non-collection should be rejected. - * - * @depends testPut - */ - function testPutNoParent() { - - $request = new HTTP\Request( - 'PUT', - '/file1/file2', - [], - 'hello' - ); - - $response = $this->request($request); - $this->assertEquals(409, $response->getStatus()); - - } - - /** - * Finder may sometimes make a request, which gets its content-body - * stripped. We can't always prevent this from happening, but in some cases - * we can detected this and return an error instead. - * - * @depends testPut - */ - function testFinderPutSuccess() { - - $request = new HTTP\Request( - 'PUT', - '/file2', - ['X-Expected-Entity-Length' => '5'], - 'hello' - ); - $response = $this->request($request); - - $this->assertEquals(201, $response->getStatus()); - - $this->assertEquals( - 'hello', - $this->server->tree->getNodeForPath('file2')->get() - ); - - $this->assertEquals( - [ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - 'ETag' => ['"' . md5('hello') . '"'], - ], - $response->getHeaders() - ); - - } - - /** - * Same as the last one, but in this case we're mimicing a failed request. - * - * @depends testFinderPutSuccess - */ - function testFinderPutFail() { - - $request = new HTTP\Request( - 'PUT', - '/file2', - ['X-Expected-Entity-Length' => '5'], - '' - ); - - $response = $this->request($request); - - $this->assertEquals(403, $response->getStatus()); - - } - - /** - * Plugins can intercept PUT. We need to make sure that works. - * - * @depends testPut - */ - function testPutIntercept() { - - $this->server->on('beforeBind', function($uri) { - $this->server->httpResponse->setStatus(418); - return false; - }); - - $request = new HTTP\Request('PUT', '/file2', [], 'hello'); - $response = $this->request($request); - - $this->assertEquals(418, $response->getStatus(), 'Incorrect status code received. Full response body: ' . $response->getBodyAsString()); - - $this->assertFalse( - $this->server->tree->nodeExists('file2') - ); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - ], $response->getHeaders()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Issue33Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Issue33Test.php deleted file mode 100644 index ba2cf3dc152..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Issue33Test.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/TestUtil.php'; - -class Issue33Test extends \PHPUnit_Framework_TestCase { - - function setUp() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testCopyMoveInfo() { - - $bar = new SimpleCollection('bar'); - $root = new SimpleCollection('webdav', [$bar]); - - $server = new Server($root); - $server->setBaseUri('/webdav/'); - - $serverVars = [ - 'REQUEST_URI' => '/webdav/bar', - 'HTTP_DESTINATION' => 'http://dev2.tribalos.com/webdav/%C3%A0fo%C3%B3', - 'HTTP_OVERWRITE' => 'F', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - - $server->httpRequest = $request; - - $info = $server->getCopyAndMoveInfo($request); - - $this->assertEquals('%C3%A0fo%C3%B3', urlencode($info['destination'])); - $this->assertFalse($info['destinationExists']); - $this->assertFalse($info['destinationNode']); - - } - - function testTreeMove() { - - mkdir(SABRE_TEMPDIR . '/issue33'); - $dir = new FS\Directory(SABRE_TEMPDIR . '/issue33'); - - $dir->createDirectory('bar'); - - $tree = new Tree($dir); - $tree->move('bar', urldecode('%C3%A0fo%C3%B3')); - - $node = $tree->getNodeForPath(urldecode('%C3%A0fo%C3%B3')); - $this->assertEquals(urldecode('%C3%A0fo%C3%B3'), $node->getName()); - - } - - function testDirName() { - - $dirname1 = 'bar'; - $dirname2 = urlencode('%C3%A0fo%C3%B3'); - - $this->assertTrue(dirname($dirname1) == dirname($dirname2)); - - } - - /** - * @depends testTreeMove - * @depends testCopyMoveInfo - */ - function testEverything() { - - // Request object - $serverVars = [ - 'REQUEST_METHOD' => 'MOVE', - 'REQUEST_URI' => '/webdav/bar', - 'HTTP_DESTINATION' => 'http://dev2.tribalos.com/webdav/%C3%A0fo%C3%B3', - 'HTTP_OVERWRITE' => 'F', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(''); - - $response = new HTTP\ResponseMock(); - - // Server setup - mkdir(SABRE_TEMPDIR . '/issue33'); - $dir = new FS\Directory(SABRE_TEMPDIR . '/issue33'); - - $dir->createDirectory('bar'); - - $tree = new Tree($dir); - - $server = new Server($tree); - $server->setBaseUri('/webdav/'); - - $server->httpRequest = $request; - $server->httpResponse = $response; - $server->sapi = new HTTP\SapiMock(); - $server->exec(); - - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/issue33/' . urldecode('%C3%A0fo%C3%B3'))); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/AbstractTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/AbstractTest.php deleted file mode 100644 index bbde69097a5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/AbstractTest.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -use Sabre\DAV; - -abstract class AbstractTest extends \PHPUnit_Framework_TestCase { - - /** - * @abstract - * @return AbstractBackend - */ - abstract function getBackend(); - - function testSetup() { - - $backend = $this->getBackend(); - $this->assertInstanceOf('Sabre\\DAV\\Locks\\Backend\\AbstractBackend', $backend); - - } - - /** - * @depends testSetup - */ - function testGetLocks() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->token = 'MY-UNIQUE-TOKEN'; - $lock->uri = 'someuri'; - - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - - $this->assertEquals(1, count($locks)); - $this->assertEquals('Sinterklaas', $locks[0]->owner); - $this->assertEquals('someuri', $locks[0]->uri); - - } - - /** - * @depends testGetLocks - */ - function testGetLocksParent() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->depth = DAV\Server::DEPTH_INFINITY; - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri/child', false); - - $this->assertEquals(1, count($locks)); - $this->assertEquals('Sinterklaas', $locks[0]->owner); - $this->assertEquals('someuri', $locks[0]->uri); - - } - - - /** - * @depends testGetLocks - */ - function testGetLocksParentDepth0() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->depth = 0; - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri/child', false); - - $this->assertEquals(0, count($locks)); - - } - - function testGetLocksChildren() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->depth = 0; - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri/child', $lock)); - - $locks = $backend->getLocks('someuri/child', false); - $this->assertEquals(1, count($locks)); - - $locks = $backend->getLocks('someuri', false); - $this->assertEquals(0, count($locks)); - - $locks = $backend->getLocks('someuri', true); - $this->assertEquals(1, count($locks)); - - } - - /** - * @depends testGetLocks - */ - function testLockRefresh() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri', $lock)); - /* Second time */ - - $lock->owner = 'Santa Clause'; - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - - $this->assertEquals(1, count($locks)); - - $this->assertEquals('Santa Clause', $locks[0]->owner); - $this->assertEquals('someuri', $locks[0]->uri); - - } - - /** - * @depends testGetLocks - */ - function testUnlock() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - $this->assertEquals(1, count($locks)); - - $this->assertTrue($backend->unlock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - $this->assertEquals(0, count($locks)); - - } - - /** - * @depends testUnlock - */ - function testUnlockUnknownToken() { - - $backend = $this->getBackend(); - - $lock = new DAV\Locks\LockInfo(); - $lock->owner = 'Sinterklaas'; - $lock->timeout = 60; - $lock->created = time(); - $lock->token = 'MY-UNIQUE-TOKEN'; - - $this->assertTrue($backend->lock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - $this->assertEquals(1, count($locks)); - - $lock->token = 'SOME-OTHER-TOKEN'; - $this->assertFalse($backend->unlock('someuri', $lock)); - - $locks = $backend->getLocks('someuri', false); - $this->assertEquals(1, count($locks)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/FileTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/FileTest.php deleted file mode 100644 index 537996f3bbf..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/FileTest.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -require_once 'Sabre/TestUtil.php'; - -class FileTest extends AbstractTest { - - function getBackend() { - - \Sabre\TestUtil::clearTempDir(); - $backend = new File(SABRE_TEMPDIR . '/lockdb'); - return $backend; - - } - - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/Mock.php deleted file mode 100644 index dd475807178..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/Mock.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -use Sabre\DAV\Locks\LockInfo; - -/** - * Locks Mock backend. - * - * This backend stores lock information in memory. Mainly useful for testing. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Mock extends AbstractBackend { - - /** - * Returns a list of Sabre\DAV\Locks\LockInfo objects - * - * This method should return all the locks for a particular uri, including - * locks that might be set on a parent uri. - * - * If returnChildLocks is set to true, this method should also look for - * any locks in the subtree of the uri for locks. - * - * @param string $uri - * @param bool $returnChildLocks - * @return array - */ - function getLocks($uri, $returnChildLocks) { - - $newLocks = []; - - $locks = $this->getData(); - - foreach ($locks as $lock) { - - if ($lock->uri === $uri || - //deep locks on parents - ($lock->depth != 0 && strpos($uri, $lock->uri . '/') === 0) || - - // locks on children - ($returnChildLocks && (strpos($lock->uri, $uri . '/') === 0))) { - - $newLocks[] = $lock; - - } - - } - - // Checking if we can remove any of these locks - foreach ($newLocks as $k => $lock) { - if (time() > $lock->timeout + $lock->created) unset($newLocks[$k]); - } - return $newLocks; - - } - - /** - * Locks a uri - * - * @param string $uri - * @param LockInfo $lockInfo - * @return bool - */ - function lock($uri, LockInfo $lockInfo) { - - // We're making the lock timeout 30 minutes - $lockInfo->timeout = 1800; - $lockInfo->created = time(); - $lockInfo->uri = $uri; - - $locks = $this->getData(); - - foreach ($locks as $k => $lock) { - if ( - ($lock->token == $lockInfo->token) || - (time() > $lock->timeout + $lock->created) - ) { - unset($locks[$k]); - } - } - $locks[] = $lockInfo; - $this->putData($locks); - return true; - - } - - /** - * Removes a lock from a uri - * - * @param string $uri - * @param LockInfo $lockInfo - * @return bool - */ - function unlock($uri, LockInfo $lockInfo) { - - $locks = $this->getData(); - foreach ($locks as $k => $lock) { - - if ($lock->token == $lockInfo->token) { - - unset($locks[$k]); - $this->putData($locks); - return true; - - } - } - return false; - - } - - protected $data = []; - - /** - * Loads the lockdata from the filesystem. - * - * @return array - */ - protected function getData() { - - return $this->data; - - } - - /** - * Saves the lockdata - * - * @param array $newData - * @return void - */ - protected function putData(array $newData) { - - $this->data = $newData; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOMySQLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOMySQLTest.php deleted file mode 100644 index 0ba02fc8b53..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOMySQLTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -class PDOMySQLTest extends PDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOPgSqlTest.php deleted file mode 100644 index 39ee56419a2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -class PDOPgSqlTest extends PDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOSqliteTest.php deleted file mode 100644 index 4b126dcf359..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -class PDOSqliteTest extends PDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOTest.php deleted file mode 100644 index a27eae93cef..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Backend/PDOTest.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks\Backend; - -abstract class PDOTest extends AbstractTest { - - use \Sabre\DAV\DbTestHelperTrait; - - function getBackend() { - - $this->dropTables('locks'); - $this->createSchema('locks'); - - $pdo = $this->getPDO(); - - return new PDO($pdo); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php deleted file mode 100644 index 1111db5b5c2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; -require_once 'Sabre/TestUtil.php'; - -class MSWordTest extends \PHPUnit_Framework_TestCase { - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testLockEtc() { - - mkdir(SABRE_TEMPDIR . '/mstest'); - $tree = new DAV\FS\Directory(SABRE_TEMPDIR . '/mstest'); - - $server = new DAV\Server($tree); - $server->debugExceptions = true; - $locksBackend = new Backend\File(SABRE_TEMPDIR . '/locksdb'); - $locksPlugin = new Plugin($locksBackend); - $server->addPlugin($locksPlugin); - - $response1 = new HTTP\ResponseMock(); - - $server->httpRequest = $this->getLockRequest(); - $server->httpResponse = $response1; - $server->sapi = new HTTP\SapiMock(); - $server->exec(); - - $this->assertEquals(201, $server->httpResponse->getStatus(), 'Full response body:' . $response1->getBodyAsString()); - $this->assertTrue(!!$server->httpResponse->getHeaders('Lock-Token')); - $lockToken = $server->httpResponse->getHeader('Lock-Token'); - - //sleep(10); - - $response2 = new HTTP\ResponseMock(); - - $server->httpRequest = $this->getLockRequest2(); - $server->httpResponse = $response2; - $server->exec(); - - $this->assertEquals(201, $server->httpResponse->status); - $this->assertTrue(!!$server->httpResponse->getHeaders('Lock-Token')); - - //sleep(10); - - $response3 = new HTTP\ResponseMock(); - $server->httpRequest = $this->getPutRequest($lockToken); - $server->httpResponse = $response3; - $server->exec(); - - $this->assertEquals(204, $server->httpResponse->status); - - } - - function getLockRequest() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'LOCK', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'HTTP_TIMEOUT' => 'Second-3600', - 'REQUEST_URI' => '/Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx', - ]); - - $request->setBody('<D:lockinfo xmlns:D="DAV:"> - <D:lockscope> - <D:exclusive /> - </D:lockscope> - <D:locktype> - <D:write /> - </D:locktype> - <D:owner> - <D:href>PC-Vista\User</D:href> - </D:owner> -</D:lockinfo>'); - - return $request; - - } - function getLockRequest2() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'LOCK', - 'HTTP_CONTENT_TYPE' => 'application/xml', - 'HTTP_TIMEOUT' => 'Second-3600', - 'REQUEST_URI' => '/~$Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx', - ]); - - $request->setBody('<D:lockinfo xmlns:D="DAV:"> - <D:lockscope> - <D:exclusive /> - </D:lockscope> - <D:locktype> - <D:write /> - </D:locktype> - <D:owner> - <D:href>PC-Vista\User</D:href> - </D:owner> -</D:lockinfo>'); - - return $request; - - } - - function getPutRequest($lockToken) { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx', - 'HTTP_IF' => 'If: (' . $lockToken . ')', - ]); - $request->setBody('FAKE BODY'); - return $request; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Plugin2Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Plugin2Test.php deleted file mode 100644 index 7af49079574..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/Plugin2Test.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks; - -use Sabre\HTTP\Request; - -class Plugin2Test extends \Sabre\DAVServerTest { - - public $setupLocks = true; - - function setUpTree() { - - $this->tree = new \Sabre\DAV\FS\Directory(SABRE_TEMPDIR); - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - /** - * This test first creates a file with LOCK and then deletes it. - * - * After deleting the file, the lock should no longer be in the lock - * backend. - * - * Reported in ticket #487 - */ - function testUnlockAfterDelete() { - - $body = '<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> -</D:lockinfo>'; - - $request = new Request( - 'LOCK', - '/file.txt', - [], - $body - ); - $response = $this->request($request); - $this->assertEquals(201, $response->getStatus(), $response->getBodyAsString()); - - $this->assertEquals( - 1, - count($this->locksBackend->getLocks('file.txt', true)) - ); - - $request = new Request( - 'DELETE', - '/file.txt', - [ - 'If' => '(' . $response->getHeader('Lock-Token') . ')', - ] - ); - $response = $this->request($request); - $this->assertEquals(204, $response->getStatus(), $response->getBodyAsString()); - - $this->assertEquals( - 0, - count($this->locksBackend->getLocks('file.txt', true)) - ); - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php deleted file mode 100644 index dbbf6757aad..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php +++ /dev/null @@ -1,1003 +0,0 @@ -<?php - -namespace Sabre\DAV\Locks; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class PluginTest extends DAV\AbstractServer { - - /** - * @var Plugin - */ - protected $locksPlugin; - - function setUp() { - - parent::setUp(); - $locksBackend = new Backend\File(SABRE_TEMPDIR . '/locksdb'); - $locksPlugin = new Plugin($locksBackend); - $this->server->addPlugin($locksPlugin); - $this->locksPlugin = $locksPlugin; - - } - - function testGetInfo() { - - $this->assertArrayHasKey( - 'name', - $this->locksPlugin->getPluginInfo() - ); - - } - - function testGetFeatures() { - - $this->assertEquals([2], $this->locksPlugin->getFeatures()); - - } - - function testGetHTTPMethods() { - - $this->assertEquals(['LOCK', 'UNLOCK'], $this->locksPlugin->getHTTPMethods('')); - - } - - function testLockNoBody() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(400, $this->response->status); - - } - - function testLock() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status, 'Got an incorrect status back. Response body: ' . $this->response->body); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $elements = [ - '/d:prop', - '/d:prop/d:lockdiscovery', - '/d:prop/d:lockdiscovery/d:activelock', - '/d:prop/d:lockdiscovery/d:activelock/d:locktype', - '/d:prop/d:lockdiscovery/d:activelock/d:lockroot', - '/d:prop/d:lockdiscovery/d:activelock/d:lockroot/d:href', - '/d:prop/d:lockdiscovery/d:activelock/d:locktype/d:write', - '/d:prop/d:lockdiscovery/d:activelock/d:lockscope', - '/d:prop/d:lockdiscovery/d:activelock/d:lockscope/d:exclusive', - '/d:prop/d:lockdiscovery/d:activelock/d:depth', - '/d:prop/d:lockdiscovery/d:activelock/d:owner', - '/d:prop/d:lockdiscovery/d:activelock/d:timeout', - '/d:prop/d:lockdiscovery/d:activelock/d:locktoken', - '/d:prop/d:lockdiscovery/d:activelock/d:locktoken/d:href', - ]; - - foreach ($elements as $elem) { - $data = $xml->xpath($elem); - $this->assertEquals(1, count($data), 'We expected 1 match for the xpath expression "' . $elem . '". ' . count($data) . ' were found. Full response body: ' . $this->response->body); - } - - $depth = $xml->xpath('/d:prop/d:lockdiscovery/d:activelock/d:depth'); - $this->assertEquals('infinity', (string)$depth[0]); - - $token = $xml->xpath('/d:prop/d:lockdiscovery/d:activelock/d:locktoken/d:href'); - $this->assertEquals($this->response->getHeader('Lock-Token'), '<' . (string)$token[0] . '>', 'Token in response body didn\'t match token in response header.'); - - } - - /** - * @depends testLock - */ - function testDoubleLock() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->response = new HTTP\ResponseMock(); - $this->server->httpResponse = $this->response; - - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - $this->assertEquals(423, $this->response->status, 'Full response: ' . $this->response->body); - - } - - /** - * @depends testLock - */ - function testLockRefresh() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $lockToken = $this->response->getHeader('Lock-Token'); - - $this->response = new HTTP\ResponseMock(); - $this->server->httpResponse = $this->response; - - $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . ')']); - $request->setBody(''); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - $this->assertEquals(200, $this->response->status, 'We received an incorrect status code. Full response body: ' . $this->response->getBody()); - - } - - /** - * @depends testLock - */ - function testLockRefreshBadToken() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $lockToken = $this->response->getHeader('Lock-Token'); - - $this->response = new HTTP\ResponseMock(); - $this->server->httpResponse = $this->response; - - $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . 'foobar) (<opaquelocktoken:anotherbadtoken>)']); - $request->setBody(''); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - $this->assertEquals(423, $this->response->getStatus(), 'We received an incorrect status code. Full response body: ' . $this->response->getBody()); - - } - - /** - * @depends testLock - */ - function testLockNoFile() { - - $request = new HTTP\Request('LOCK', '/notfound.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(201, $this->response->status); - - } - - /** - * @depends testLock - */ - function testUnlockNoToken() { - - $request = new HTTP\Request('UNLOCK', '/test.txt'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(400, $this->response->status); - - } - - /** - * @depends testLock - */ - function testUnlockBadToken() { - - $request = new HTTP\Request('UNLOCK', '/test.txt', ['Lock-Token' => '<opaquelocktoken:blablabla>']); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(409, $this->response->status, 'Got an incorrect status code. Full response body: ' . $this->response->body); - - } - - /** - * @depends testLock - */ - function testLockPutNoToken() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $request = new HTTP\Request('PUT', '/test.txt'); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(423, $this->response->status); - - } - - /** - * @depends testLock - */ - function testUnlock() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $this->server->httpRequest = $request; - - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->invokeMethod($request, $this->server->httpResponse); - $lockToken = $this->server->httpResponse->getHeader('Lock-Token'); - - $request = new HTTP\Request('UNLOCK', '/test.txt', ['Lock-Token' => $lockToken]); - $this->server->httpRequest = $request; - $this->server->httpResponse = new HTTP\ResponseMock(); - $this->server->invokeMethod($request, $this->server->httpResponse); - - $this->assertEquals(204, $this->server->httpResponse->status, 'Got an incorrect status code. Full response body: ' . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ], - $this->server->httpResponse->getHeaders() - ); - - - } - - /** - * @depends testLock - */ - function testUnlockWindowsBug() { - - $request = new HTTP\Request('LOCK', '/test.txt'); - $this->server->httpRequest = $request; - - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->invokeMethod($request, $this->server->httpResponse); - $lockToken = $this->server->httpResponse->getHeader('Lock-Token'); - - // See Issue 123 - $lockToken = trim($lockToken, '<>'); - - $request = new HTTP\Request('UNLOCK', '/test.txt', ['Lock-Token' => $lockToken]); - $this->server->httpRequest = $request; - $this->server->httpResponse = new HTTP\ResponseMock(); - $this->server->invokeMethod($request, $this->server->httpResponse); - - $this->assertEquals(204, $this->server->httpResponse->status, 'Got an incorrect status code. Full response body: ' . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Length' => ['0'], - ], - $this->server->httpResponse->getHeaders() - ); - - - } - - /** - * @depends testLock - */ - function testLockRetainOwner() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'LOCK', - ]); - $this->server->httpRequest = $request; - - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner>Evert</D:owner> -</D:lockinfo>'); - - $this->server->invokeMethod($request, $this->server->httpResponse); - $lockToken = $this->server->httpResponse->getHeader('Lock-Token'); - - $locks = $this->locksPlugin->getLocks('test.txt'); - $this->assertEquals(1, count($locks)); - $this->assertEquals('Evert', $locks[0]->owner); - - - } - - /** - * @depends testLock - */ - function testLockPutBadToken() { - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'PUT', - 'HTTP_IF' => '(<opaquelocktoken:token1>)', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - // $this->assertEquals('412 Precondition failed',$this->response->status); - $this->assertEquals(423, $this->response->status); - - } - - /** - * @depends testLock - */ - function testLockDeleteParent() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir', - 'REQUEST_METHOD' => 'DELETE', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(423, $this->response->status); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - /** - * @depends testLock - */ - function testLockDeleteSucceed() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'DELETE', - 'HTTP_IF' => '(' . $this->response->getHeader('Lock-Token') . ')', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(204, $this->response->status); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - - /** - * @depends testLock - */ - function testLockCopyLockSource() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'COPY', - 'HTTP_DESTINATION' => '/dir/child2.txt', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(201, $this->response->status, 'Copy must succeed if only the source is locked, but not the destination'); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - /** - * @depends testLock - */ - function testLockCopyLockDestination() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child2.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(201, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'COPY', - 'HTTP_DESTINATION' => '/dir/child2.txt', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(423, $this->response->status, 'Copy must succeed if only the source is locked, but not the destination'); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - - /** - * @depends testLock - */ - function testLockMoveLockSourceLocked() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'MOVE', - 'HTTP_DESTINATION' => '/dir/child2.txt', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(423, $this->response->status, 'Copy must succeed if only the source is locked, but not the destination'); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - - /** - * @depends testLock - */ - function testLockMoveLockSourceSucceed() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'MOVE', - 'HTTP_DESTINATION' => '/dir/child2.txt', - 'HTTP_IF' => '(' . $this->response->getHeader('Lock-Token') . ')', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(201, $this->response->status, 'A valid lock-token was provided for the source, so this MOVE operation must succeed. Full response body: ' . $this->response->body); - - } - - /** - * @depends testLock - */ - function testLockMoveLockDestination() { - - $serverVars = [ - 'REQUEST_URI' => '/dir/child2.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(201, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'MOVE', - 'HTTP_DESTINATION' => '/dir/child2.txt', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(423, $this->response->status, 'Copy must succeed if only the source is locked, but not the destination'); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - /** - * @depends testLock - */ - function testLockMoveLockParent() { - - $serverVars = [ - 'REQUEST_URI' => '/dir', - 'REQUEST_METHOD' => 'LOCK', - 'HTTP_DEPTH' => 'infinite', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/dir/child.txt', - 'REQUEST_METHOD' => 'MOVE', - 'HTTP_DESTINATION' => '/dir/child2.txt', - 'HTTP_IF' => '</dir> (' . $this->response->getHeader('Lock-Token') . ')', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(201, $this->response->status, 'We locked the parent of both the source and destination, but the move didn\'t succeed.'); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - - } - - /** - * @depends testLock - */ - function testLockPutGoodToken() { - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'LOCK', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(200, $this->response->status); - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'PUT', - 'HTTP_IF' => '(' . $this->response->getHeader('Lock-Token') . ')', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(204, $this->response->status); - - } - - /** - * @depends testLock - */ - function testLockPutUnrelatedToken() { - - $request = new HTTP\Request('LOCK', '/unrelated.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(201, $this->response->getStatus()); - - $request = new HTTP\Request( - 'PUT', - '/test.txt', - ['If' => '</unrelated.txt> (' . $this->response->getHeader('Lock-Token') . ')'] - ); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - - $this->assertEquals(204, $this->response->status); - - } - - function testPutWithIncorrectETag() { - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'PUT', - 'HTTP_IF' => '(["etag1"])', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - $this->assertEquals(412, $this->response->status); - - } - - /** - * @depends testPutWithIncorrectETag - */ - function testPutWithCorrectETag() { - - // We need an ETag-enabled file node. - $tree = new DAV\Tree(new DAV\FSExt\Directory(SABRE_TEMPDIR)); - $this->server->tree = $tree; - - $filename = SABRE_TEMPDIR . '/test.txt'; - $etag = sha1( - fileinode($filename) . - filesize($filename) . - filemtime($filename) - ); - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'PUT', - 'HTTP_IF' => '(["' . $etag . '"])', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('newbody'); - $this->server->httpRequest = $request; - $this->server->exec(); - $this->assertEquals(204, $this->response->status, 'Incorrect status received. Full response body:' . $this->response->body); - - } - - function testDeleteWithETagOnCollection() { - - $serverVars = [ - 'REQUEST_URI' => '/dir', - 'REQUEST_METHOD' => 'DELETE', - 'HTTP_IF' => '(["etag1"])', - ]; - $request = HTTP\Sapi::createFromServerArray($serverVars); - - $this->server->httpRequest = $request; - $this->server->exec(); - $this->assertEquals(412, $this->response->status); - - } - - function testGetTimeoutHeader() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_TIMEOUT' => 'second-100', - ]); - - $this->server->httpRequest = $request; - $this->assertEquals(100, $this->locksPlugin->getTimeoutHeader()); - - } - - function testGetTimeoutHeaderTwoItems() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_TIMEOUT' => 'second-5, infinite', - ]); - - $this->server->httpRequest = $request; - $this->assertEquals(5, $this->locksPlugin->getTimeoutHeader()); - - } - - function testGetTimeoutHeaderInfinite() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_TIMEOUT' => 'infinite, second-5', - ]); - - $this->server->httpRequest = $request; - $this->assertEquals(LockInfo::TIMEOUT_INFINITE, $this->locksPlugin->getTimeoutHeader()); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testGetTimeoutHeaderInvalid() { - - $request = HTTP\Sapi::createFromServerArray([ - 'HTTP_TIMEOUT' => 'yourmom', - ]); - - $this->server->httpRequest = $request; - $this->locksPlugin->getTimeoutHeader(); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/Collection.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/Collection.php deleted file mode 100644 index fded5e474a6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/Collection.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php - -namespace Sabre\DAV\Mock; - -use Sabre\DAV; - -/** - * Mock Collection. - * - * This collection quickly allows you to create trees of nodes. - * Children are specified as an array. - * - * Every key a filename, every array value is either: - * * an array, for a sub-collection - * * a string, for a file - * * An instance of \Sabre\DAV\INode. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Collection extends DAV\Collection { - - protected $name; - protected $children; - protected $parent; - - /** - * Creates the object - * - * @param string $name - * @param array $children - * @param Collection $parent - * @return void - */ - function __construct($name, array $children = [], Collection $parent = null) { - - $this->name = $name; - foreach ($children as $key => $value) { - if (is_string($value)) { - $this->children[] = new File($key, $value, $this); - } elseif (is_array($value)) { - $this->children[] = new self($key, $value, $this); - } elseif ($value instanceof \Sabre\DAV\INode) { - $this->children[] = $value; - } else { - throw new \InvalidArgumentException('Unknown value passed in $children'); - } - } - $this->parent = $parent; - - } - - /** - * Returns the name of the node. - * - * This is used to generate the url. - * - * @return string - */ - function getName() { - - return $this->name; - - } - - /** - * Creates a new file in the directory - * - * Data will either be supplied as a stream resource, or in certain cases - * as a string. Keep in mind that you may have to support either. - * - * After successful creation of the file, you may choose to return the ETag - * of the new file here. - * - * The returned ETag must be surrounded by double-quotes (The quotes should - * be part of the actual string). - * - * If you cannot accurately determine the ETag, you should not return it. - * If you don't store the file exactly as-is (you're transforming it - * somehow) you should also not return an ETag. - * - * This means that if a subsequent GET to this new file does not exactly - * return the same contents of what was submitted here, you are strongly - * recommended to omit the ETag. - * - * @param string $name Name of the file - * @param resource|string $data Initial payload - * @return null|string - */ - function createFile($name, $data = null) { - - if (is_resource($data)) { - $data = stream_get_contents($data); - } - $this->children[] = new File($name, $data, $this); - return '"' . md5($data) . '"'; - - } - - /** - * Creates a new subdirectory - * - * @param string $name - * @return void - */ - function createDirectory($name) { - - $this->children[] = new self($name); - - } - - /** - * Returns an array with all the child nodes - * - * @return \Sabre\DAV\INode[] - */ - function getChildren() { - - return $this->children; - - } - - /** - * Adds an already existing node to this collection. - * - * @param \Sabre\DAV\INode $node - */ - function addNode(\Sabre\DAV\INode $node) { - - $this->children[] = $node; - - } - - /** - * Removes a childnode from this node. - * - * @param string $name - * @return void - */ - function deleteChild($name) { - - foreach ($this->children as $key => $value) { - - if ($value->getName() == $name) { - unset($this->children[$key]); - return; - } - - } - - } - - /** - * Deletes this collection and all its children,. - * - * @return void - */ - function delete() { - - foreach ($this->getChildren() as $child) { - $this->deleteChild($child->getName()); - } - $this->parent->deleteChild($this->getName()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/File.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/File.php deleted file mode 100644 index a624b6b6bf1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/File.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php - -namespace Sabre\DAV\Mock; - -use Sabre\DAV; - -/** - * Mock File - * - * See the Collection in this directory for more details. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class File extends DAV\File { - - protected $name; - protected $contents; - protected $parent; - protected $lastModified; - - /** - * Creates the object - * - * @param string $name - * @param resource $contents - * @param Collection $parent - * @param int $lastModified - * @return void - */ - function __construct($name, $contents, Collection $parent = null, $lastModified = -1) { - - $this->name = $name; - $this->put($contents); - $this->parent = $parent; - - if ($lastModified === -1) { - $lastModified = time(); - } - - $this->lastModified = $lastModified; - - } - - /** - * Returns the name of the node. - * - * This is used to generate the url. - * - * @return string - */ - function getName() { - - return $this->name; - - } - - /** - * Changes the name of the node. - * - * @param string $name - * @return void - */ - function setName($name) { - - $this->name = $name; - - } - - /** - * Updates the data - * - * The data argument is a readable stream resource. - * - * After a successful put operation, you may choose to return an ETag. The - * etag must always be surrounded by double-quotes. These quotes must - * appear in the actual string you're returning. - * - * Clients may use the ETag from a PUT request to later on make sure that - * when they update the file, the contents haven't changed in the mean - * time. - * - * If you don't plan to store the file byte-by-byte, and you return a - * different object on a subsequent GET you are strongly recommended to not - * return an ETag, and just return null. - * - * @param resource $data - * @return string|null - */ - function put($data) { - - if (is_resource($data)) { - $data = stream_get_contents($data); - } - $this->contents = $data; - return '"' . md5($data) . '"'; - - } - - /** - * Returns the data - * - * This method may either return a string or a readable stream resource - * - * @return mixed - */ - function get() { - - return $this->contents; - - } - - /** - * Returns the ETag for a file - * - * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. - * - * Return null if the ETag can not effectively be determined - * - * @return void - */ - function getETag() { - - return '"' . md5($this->contents) . '"'; - - } - - /** - * Returns the size of the node, in bytes - * - * @return int - */ - function getSize() { - - return strlen($this->contents); - - } - - /** - * Delete the node - * - * @return void - */ - function delete() { - - $this->parent->deleteChild($this->name); - - } - - /** - * Returns the last modification time as a unix timestamp. - * If the information is not available, return null. - * - * @return int - */ - function getLastModified() { - - return $this->lastModified; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/PropertiesCollection.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/PropertiesCollection.php deleted file mode 100644 index af3fd2d3f2f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/PropertiesCollection.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -namespace Sabre\DAV\Mock; - -use Sabre\DAV\IProperties; -use Sabre\DAV\PropPatch; - -/** - * A node specifically for testing property-related operations - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class PropertiesCollection extends Collection implements IProperties { - - public $failMode = false; - - public $properties; - - /** - * Creates the object - * - * @param string $name - * @param array $children - * @param array $properties - * @return void - */ - function __construct($name, array $children, array $properties = []) { - - parent::__construct($name, $children, null); - $this->properties = $properties; - - } - - /** - * Updates properties on this node. - * - * This method received a PropPatch object, which contains all the - * information about the update. - * - * To update specific properties, call the 'handle' method on this object. - * Read the PropPatch documentation for more information. - * - * @param PropPatch $proppatch - * @return bool|array - */ - function propPatch(PropPatch $proppatch) { - - $proppatch->handleRemaining(function($updateProperties) { - - switch ($this->failMode) { - case 'updatepropsfalse' : return false; - case 'updatepropsarray' : - $r = []; - foreach ($updateProperties as $k => $v) $r[$k] = 402; - return $r; - case 'updatepropsobj' : - return new \STDClass(); - } - - }); - - } - - /** - * Returns a list of properties for this nodes. - * - * The properties list is a list of propertynames the client requested, - * encoded in clark-notation {xmlnamespace}tagname - * - * If the array is empty, it means 'all properties' were requested. - * - * Note that it's fine to liberally give properties back, instead of - * conforming to the list of requested properties. - * The Server class will filter out the extra. - * - * @param array $requestedProperties - * @return array - */ - function getProperties($requestedProperties) { - - $returnedProperties = []; - foreach ($requestedProperties as $requestedProperty) { - if (isset($this->properties[$requestedProperty])) { - $returnedProperties[$requestedProperty] = - $this->properties[$requestedProperty]; - } - } - return $returnedProperties; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/SharedNode.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/SharedNode.php deleted file mode 100644 index 503d6407095..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/SharedNode.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -namespace Sabre\DAV\Mock; - -use Sabre\DAV\Sharing\ISharedNode; -use Sabre\DAV\Sharing\Sharee; - -class SharedNode extends \Sabre\DAV\Node implements ISharedNode { - - protected $name; - protected $access; - protected $invites = []; - - function __construct($name, $access) { - - $this->name = $name; - $this->access = $access; - - } - - function getName() { - - return $this->name; - - } - - /** - * Returns the 'access level' for the instance of this shared resource. - * - * The value should be one of the Sabre\DAV\Sharing\Plugin::ACCESS_ - * constants. - * - * @return int - */ - function getShareAccess() { - - return $this->access; - - } - - /** - * This function must return a URI that uniquely identifies the shared - * resource. This URI should be identical across instances, and is - * also used in several other XML bodies to connect invites to - * resources. - * - * This may simply be a relative reference to the original shared instance, - * but it could also be a urn. As long as it's a valid URI and unique. - * - * @return string - */ - function getShareResourceUri() { - - return 'urn:example:bar'; - - } - - /** - * Updates the list of sharees. - * - * Every item must be a Sharee object. - * - * @param Sharee[] $sharees - * @return void - */ - function updateInvites(array $sharees) { - - foreach ($sharees as $sharee) { - - if ($sharee->access === \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS) { - // Removal - foreach ($this->invites as $k => $invitee) { - - if ($invitee->href = $sharee->href) { - unset($this->invites[$k]); - } - - } - - } else { - foreach ($this->invites as $k => $invitee) { - - if ($invitee->href = $sharee->href) { - if (!$sharee->inviteStatus) { - $sharee->inviteStatus = $invitee->inviteStatus; - } - // Overwriting an existing invitee - $this->invites[$k] = $sharee; - continue 2; - } - - } - if (!$sharee->inviteStatus) { - $sharee->inviteStatus = \Sabre\DAV\Sharing\Plugin::INVITE_NORESPONSE; - } - // Adding a new invitee - $this->invites[] = $sharee; - } - - } - - } - - /** - * Returns the list of people whom this resource is shared with. - * - * Every item in the returned array must be a Sharee object with - * at least the following properties set: - * - * * $href - * * $shareAccess - * * $inviteStatus - * - * and optionally: - * - * * $properties - * - * @return \Sabre\DAV\Xml\Element\Sharee[] - */ - function getInvites() { - - return $this->invites; - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/StreamingFile.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/StreamingFile.php deleted file mode 100644 index d60a49d092e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mock/StreamingFile.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\DAV\Mock; - -/** - * Mock Streaming File File - * - * Works similar to the mock file, but this one works with streams and has no - * content-length or etags. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class StreamingFile extends File { - - protected $size; - - /** - * Updates the data - * - * The data argument is a readable stream resource. - * - * After a successful put operation, you may choose to return an ETag. The - * etag must always be surrounded by double-quotes. These quotes must - * appear in the actual string you're returning. - * - * Clients may use the ETag from a PUT request to later on make sure that - * when they update the file, the contents haven't changed in the mean - * time. - * - * If you don't plan to store the file byte-by-byte, and you return a - * different object on a subsequent GET you are strongly recommended to not - * return an ETag, and just return null. - * - * @param resource $data - * @return string|null - */ - function put($data) { - - if (is_string($data)) { - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $data); - rewind($stream); - $data = $stream; - } - $this->contents = $data; - - } - - /** - * Returns the data - * - * This method may either return a string or a readable stream resource - * - * @return mixed - */ - function get() { - - return $this->contents; - - } - - /** - * Returns the ETag for a file - * - * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. - * - * Return null if the ETag can not effectively be determined - * - * @return void - */ - function getETag() { - - return null; - - } - - /** - * Returns the size of the node, in bytes - * - * @return int - */ - function getSize() { - - return $this->size; - - } - - /** - * Allows testing scripts to set the resource's file size. - * - * @param int $size - * @return void - */ - function setSize($size) { - - $this->size = $size; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/MockLogger.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/MockLogger.php deleted file mode 100644 index 03332569300..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/MockLogger.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Psr\Log\AbstractLogger; - -/** - * The MockLogger is a simple PSR-3 implementation that we can use to test - * whether things get logged correctly. - * - * @copyright Copyright (C) fruux GmbH. (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class MockLogger extends AbstractLogger { - - public $logs = []; - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * @return null - */ - function log($level, $message, array $context = []) { - - $this->logs[] = [ - $level, - $message, - $context - ]; - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mount/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mount/PluginTest.php deleted file mode 100644 index 3213fcb1b45..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Mount/PluginTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Sabre\DAV\Mount; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class PluginTest extends DAV\AbstractServer { - - function setUp() { - - parent::setUp(); - $this->server->addPlugin(new Plugin()); - - } - - function testPassThrough() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'GET', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(501, $this->response->status, 'We expected GET to not be implemented for Directories. Response body: ' . $this->response->body); - - } - - function testMountResponse() { - - $serverVars = [ - 'REQUEST_URI' => '/?mount', - 'REQUEST_METHOD' => 'GET', - 'QUERY_STRING' => 'mount', - 'HTTP_HOST' => 'example.org', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(200, $this->response->status); - - $xml = simplexml_load_string($this->response->body); - $this->assertInstanceOf('SimpleXMLElement', $xml, 'Response was not a valid xml document. The list of errors:' . print_r(libxml_get_errors(), true) . '. xml body: ' . $this->response->body . '. What type we got: ' . gettype($xml) . ' class, if object: ' . get_class($xml)); - - $xml->registerXPathNamespace('dm', 'http://purl.org/NET/webdav/mount'); - $url = $xml->xpath('//dm:url'); - $this->assertEquals('http://example.org/', (string)$url[0]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php deleted file mode 100644 index 15289ce528c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ObjectTreeTest.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php - -namespace Sabre\DAV; - -require_once 'Sabre/TestUtil.php'; - -class ObjectTreeTest extends \PHPUnit_Framework_TestCase { - - protected $tree; - - function setup() { - - \Sabre\TestUtil::clearTempDir(); - mkdir(SABRE_TEMPDIR . '/root'); - mkdir(SABRE_TEMPDIR . '/root/subdir'); - file_put_contents(SABRE_TEMPDIR . '/root/file.txt', 'contents'); - file_put_contents(SABRE_TEMPDIR . '/root/subdir/subfile.txt', 'subcontents'); - $rootNode = new FSExt\Directory(SABRE_TEMPDIR . '/root'); - $this->tree = new Tree($rootNode); - - } - - function teardown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testGetRootNode() { - - $root = $this->tree->getNodeForPath(''); - $this->assertInstanceOf('Sabre\\DAV\\FSExt\\Directory', $root); - - } - - function testGetSubDir() { - - $root = $this->tree->getNodeForPath('subdir'); - $this->assertInstanceOf('Sabre\\DAV\\FSExt\\Directory', $root); - - } - - function testCopyFile() { - - $this->tree->copy('file.txt', 'file2.txt'); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/file2.txt')); - $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/file2.txt')); - - } - - /** - * @depends testCopyFile - */ - function testCopyDirectory() { - - $this->tree->copy('subdir', 'subdir2'); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2')); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2/subfile.txt')); - $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR . '/root/subdir2/subfile.txt')); - - } - - /** - * @depends testCopyFile - */ - function testMoveFile() { - - $this->tree->move('file.txt', 'file2.txt'); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/file2.txt')); - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/file.txt')); - $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/file2.txt')); - - } - - /** - * @depends testMoveFile - */ - function testMoveFileNewParent() { - - $this->tree->move('file.txt', 'subdir/file2.txt'); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir/file2.txt')); - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/file.txt')); - $this->assertEquals('contents', file_get_contents(SABRE_TEMPDIR . '/root/subdir/file2.txt')); - - } - - /** - * @depends testCopyDirectory - */ - function testMoveDirectory() { - - $this->tree->move('subdir', 'subdir2'); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2')); - $this->assertTrue(file_exists(SABRE_TEMPDIR . '/root/subdir2/subfile.txt')); - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/root/subdir')); - $this->assertEquals('subcontents', file_get_contents(SABRE_TEMPDIR . '/root/subdir2/subfile.txt')); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PSR3Test.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PSR3Test.php deleted file mode 100644 index d30fde128a7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PSR3Test.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class PSR3Test extends \PHPUnit_Framework_TestCase { - - function testIsLoggerAware() { - - $server = new Server(); - $this->assertInstanceOf( - 'Psr\Log\LoggerAwareInterface', - $server - ); - - } - - function testGetNullLoggerByDefault() { - - $server = new Server(); - $this->assertInstanceOf( - 'Psr\Log\NullLogger', - $server->getLogger() - ); - - } - - function testSetLogger() { - - $server = new Server(); - $logger = new MockLogger(); - - $server->setLogger($logger); - - $this->assertEquals( - $logger, - $server->getLogger() - ); - - } - - /** - * Start the server, trigger an exception and see if the logger captured - * it. - */ - function testLogException() { - - $server = new Server(); - $logger = new MockLogger(); - - $server->setLogger($logger); - - // Creating a fake environment to execute http requests in. - $request = new \Sabre\HTTP\Request( - 'GET', - '/not-found', - [] - ); - $response = new \Sabre\HTTP\Response(); - - $server->httpRequest = $request; - $server->httpResponse = $response; - $server->sapi = new \Sabre\HTTP\SapiMock(); - - // Executing the request. - $server->exec(); - - // The request should have triggered a 404 status. - $this->assertEquals(404, $response->getStatus()); - - // We should also see this in the PSR-3 log. - $this->assertEquals(1, count($logger->logs)); - - $logItem = $logger->logs[0]; - - $this->assertEquals( - \Psr\Log\LogLevel::INFO, - $logItem[0] - ); - - $this->assertInstanceOf( - 'Exception', - $logItem[2]['exception'] - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/FileMock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/FileMock.php deleted file mode 100644 index eff1e7d6738..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/FileMock.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -namespace Sabre\DAV\PartialUpdate; - -use Sabre\DAV; - -class FileMock implements IPatchSupport { - - protected $data = ''; - - function put($str) { - - if (is_resource($str)) { - $str = stream_get_contents($str); - } - $this->data = $str; - - } - - /** - * Updates the file based on a range specification. - * - * The first argument is the data, which is either a readable stream - * resource or a string. - * - * The second argument is the type of update we're doing. - * This is either: - * * 1. append - * * 2. update based on a start byte - * * 3. update based on an end byte - *; - * The third argument is the start or end byte. - * - * After a successful put operation, you may choose to return an ETag. The - * etag must always be surrounded by double-quotes. These quotes must - * appear in the actual string you're returning. - * - * Clients may use the ETag from a PUT request to later on make sure that - * when they update the file, the contents haven't changed in the mean - * time. - * - * @param resource|string $data - * @param int $rangeType - * @param int $offset - * @return string|null - */ - function patch($data, $rangeType, $offset = null) { - - if (is_resource($data)) { - $data = stream_get_contents($data); - } - - switch ($rangeType) { - - case 1 : - $this->data .= $data; - break; - case 3 : - // Turn the offset into an offset-offset. - $offset = strlen($this->data) - $offset; - // No break is intentional - case 2 : - $this->data = - substr($this->data, 0, $offset) . - $data . - substr($this->data, $offset + strlen($data)); - break; - - } - - } - - function get() { - - return $this->data; - - } - - function getContentType() { - - return 'text/plain'; - - } - - function getSize() { - - return strlen($this->data); - - } - - function getETag() { - - return '"' . $this->data . '"'; - - } - - function delete() { - - throw new DAV\Exception\MethodNotAllowed(); - - } - - function setName($name) { - - throw new DAV\Exception\MethodNotAllowed(); - - } - - function getName() { - - return 'partial'; - - } - - function getLastModified() { - - return null; - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php deleted file mode 100644 index 5bd696416bb..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/PluginTest.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -namespace Sabre\DAV\PartialUpdate; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAV/PartialUpdate/FileMock.php'; - -class PluginTest extends \Sabre\DAVServerTest { - - protected $node; - protected $plugin; - - function setUp() { - - $this->node = new FileMock(); - $this->tree[] = $this->node; - - parent::setUp(); - - $this->plugin = new Plugin(); - $this->server->addPlugin($this->plugin); - - - - } - - function testInit() { - - $this->assertEquals('partialupdate', $this->plugin->getPluginName()); - $this->assertEquals(['sabredav-partialupdate'], $this->plugin->getFeatures()); - $this->assertEquals([ - 'PATCH' - ], $this->plugin->getHTTPMethods('partial')); - $this->assertEquals([ - ], $this->plugin->getHTTPMethods('')); - - } - - function testPatchNoRange() { - - $this->node->put('aaaaaaaa'); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PATCH', - 'REQUEST_URI' => '/partial', - ]); - $response = $this->request($request); - - $this->assertEquals(400, $response->status, 'Full response body:' . $response->body); - - } - - function testPatchNotSupported() { - - $this->node->put('aaaaaaaa'); - $request = new HTTP\Request('PATCH', '/', ['X-Update-Range' => '3-4']); - $request->setBody( - 'bbb' - ); - $response = $this->request($request); - - $this->assertEquals(405, $response->status, 'Full response body:' . $response->body); - - } - - function testPatchNoContentType() { - - $this->node->put('aaaaaaaa'); - $request = new HTTP\Request('PATCH', '/partial', ['X-Update-Range' => 'bytes=3-4']); - $request->setBody( - 'bbb' - ); - $response = $this->request($request); - - $this->assertEquals(415, $response->status, 'Full response body:' . $response->body); - - } - - function testPatchBadRange() { - - $this->node->put('aaaaaaaa'); - $request = new HTTP\Request('PATCH', '/partial', ['X-Update-Range' => 'bytes=3-4', 'Content-Type' => 'application/x-sabredav-partialupdate', 'Content-Length' => '3']); - $request->setBody( - 'bbb' - ); - $response = $this->request($request); - - $this->assertEquals(416, $response->status, 'Full response body:' . $response->body); - - } - - function testPatchNoLength() { - - $this->node->put('aaaaaaaa'); - $request = new HTTP\Request('PATCH', '/partial', ['X-Update-Range' => 'bytes=3-5', 'Content-Type' => 'application/x-sabredav-partialupdate']); - $request->setBody( - 'bbb' - ); - $response = $this->request($request); - - $this->assertEquals(411, $response->status, 'Full response body:' . $response->body); - - } - - function testPatchSuccess() { - - $this->node->put('aaaaaaaa'); - $request = new HTTP\Request('PATCH', '/partial', ['X-Update-Range' => 'bytes=3-5', 'Content-Type' => 'application/x-sabredav-partialupdate', 'Content-Length' => 3]); - $request->setBody( - 'bbb' - ); - $response = $this->request($request); - - $this->assertEquals(204, $response->status, 'Full response body:' . $response->body); - $this->assertEquals('aaabbbaa', $this->node->get()); - - } - - function testPatchNoEndRange() { - - $this->node->put('aaaaa'); - $request = new HTTP\Request('PATCH', '/partial', ['X-Update-Range' => 'bytes=3-', 'Content-Type' => 'application/x-sabredav-partialupdate', 'Content-Length' => '3']); - $request->setBody( - 'bbb' - ); - - $response = $this->request($request); - - $this->assertEquals(204, $response->getStatus(), 'Full response body:' . $response->getBodyAsString()); - $this->assertEquals('aaabbb', $this->node->get()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php deleted file mode 100644 index 2c627417330..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -namespace Sabre\DAV\PartialUpdate; - -use Sabre\DAV\FSExt\File; -use Sabre\DAV\Server; -use Sabre\HTTP; - -/** - * This test is an end-to-end sabredav test that goes through all - * the cases in the specification. - * - * See: http://sabre.io/dav/http-patch/ - */ -class SpecificationTest extends \PHPUnit_Framework_TestCase { - - protected $server; - - function setUp() { - - $tree = [ - new File(SABRE_TEMPDIR . '/foobar.txt') - ]; - $server = new Server($tree); - $server->debugExceptions = true; - $server->addPlugin(new Plugin()); - - $tree[0]->put('1234567890'); - - $this->server = $server; - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - /** - * @param string $headerValue - * @param string $httpStatus - * @param string $endResult - * @param int $contentLength - * - * @dataProvider data - */ - function testUpdateRange($headerValue, $httpStatus, $endResult, $contentLength = 4) { - - $headers = [ - 'Content-Type' => 'application/x-sabredav-partialupdate', - 'X-Update-Range' => $headerValue, - ]; - - if ($contentLength) { - $headers['Content-Length'] = (string)$contentLength; - } - - $request = new HTTP\Request('PATCH', '/foobar.txt', $headers, '----'); - - $request->setBody('----'); - $this->server->httpRequest = $request; - $this->server->httpResponse = new HTTP\ResponseMock(); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->exec(); - - $this->assertEquals($httpStatus, $this->server->httpResponse->status, 'Incorrect http status received: ' . $this->server->httpResponse->body); - if (!is_null($endResult)) { - $this->assertEquals($endResult, file_get_contents(SABRE_TEMPDIR . '/foobar.txt')); - } - - } - - function data() { - - return [ - // Problems - ['foo', 400, null], - ['bytes=0-3', 411, null, 0], - ['bytes=4-1', 416, null], - - ['bytes=0-3', 204, '----567890'], - ['bytes=1-4', 204, '1----67890'], - ['bytes=0-', 204, '----567890'], - ['bytes=-4', 204, '123456----'], - ['bytes=-2', 204, '12345678----'], - ['bytes=2-', 204, '12----7890'], - ['append', 204, '1234567890----'], - - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropFindTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropFindTest.php deleted file mode 100644 index ec1d616cbb9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropFindTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class PropFindTest extends \PHPUnit_Framework_TestCase { - - function testHandle() { - - $propFind = new PropFind('foo', ['{DAV:}displayname']); - $propFind->handle('{DAV:}displayname', 'foobar'); - - $this->assertEquals([ - 200 => ['{DAV:}displayname' => 'foobar'], - 404 => [], - ], $propFind->getResultForMultiStatus()); - - } - - function testHandleCallBack() { - - $propFind = new PropFind('foo', ['{DAV:}displayname']); - $propFind->handle('{DAV:}displayname', function() { return 'foobar'; }); - - $this->assertEquals([ - 200 => ['{DAV:}displayname' => 'foobar'], - 404 => [], - ], $propFind->getResultForMultiStatus()); - - } - - function testAllPropDefaults() { - - $propFind = new PropFind('foo', ['{DAV:}displayname'], 0, PropFind::ALLPROPS); - - $this->assertEquals([ - 200 => [], - ], $propFind->getResultForMultiStatus()); - - } - - function testSet() { - - $propFind = new PropFind('foo', ['{DAV:}displayname']); - $propFind->set('{DAV:}displayname', 'bar'); - - $this->assertEquals([ - 200 => ['{DAV:}displayname' => 'bar'], - 404 => [], - ], $propFind->getResultForMultiStatus()); - - } - - function testSetAllpropCustom() { - - $propFind = new PropFind('foo', ['{DAV:}displayname'], 0, PropFind::ALLPROPS); - $propFind->set('{DAV:}customproperty', 'bar'); - - $this->assertEquals([ - 200 => ['{DAV:}customproperty' => 'bar'], - ], $propFind->getResultForMultiStatus()); - - } - - function testSetUnset() { - - $propFind = new PropFind('foo', ['{DAV:}displayname']); - $propFind->set('{DAV:}displayname', 'bar'); - $propFind->set('{DAV:}displayname', null); - - $this->assertEquals([ - 200 => [], - 404 => ['{DAV:}displayname' => null], - ], $propFind->getResultForMultiStatus()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropPatchTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropPatchTest.php deleted file mode 100644 index 72dbf5345b5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropPatchTest.php +++ /dev/null @@ -1,351 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class PropPatchTest extends \PHPUnit_Framework_TestCase { - - protected $propPatch; - - function setUp() { - - $this->propPatch = new PropPatch([ - '{DAV:}displayname' => 'foo', - ]); - $this->assertEquals(['{DAV:}displayname' => 'foo'], $this->propPatch->getMutations()); - - } - - function testHandleSingleSuccess() { - - $hasRan = false; - - $this->propPatch->handle('{DAV:}displayname', function($value) use (&$hasRan) { - $hasRan = true; - $this->assertEquals('foo', $value); - return true; - }); - - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 200], $result); - - $this->assertTrue($hasRan); - - } - - function testHandleSingleFail() { - - $hasRan = false; - - $this->propPatch->handle('{DAV:}displayname', function($value) use (&$hasRan) { - $hasRan = true; - $this->assertEquals('foo', $value); - return false; - }); - - $this->assertFalse($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 403], $result); - - $this->assertTrue($hasRan); - - } - - function testHandleSingleCustomResult() { - - $hasRan = false; - - $this->propPatch->handle('{DAV:}displayname', function($value) use (&$hasRan) { - $hasRan = true; - $this->assertEquals('foo', $value); - return 201; - }); - - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 201], $result); - - $this->assertTrue($hasRan); - - } - - function testHandleSingleDeleteSuccess() { - - $hasRan = false; - - $this->propPatch = new PropPatch(['{DAV:}displayname' => null]); - $this->propPatch->handle('{DAV:}displayname', function($value) use (&$hasRan) { - $hasRan = true; - $this->assertNull($value); - return true; - }); - - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 204], $result); - - $this->assertTrue($hasRan); - - } - - - function testHandleNothing() { - - $hasRan = false; - - $this->propPatch->handle('{DAV:}foobar', function($value) use (&$hasRan) { - $hasRan = true; - }); - - $this->assertFalse($hasRan); - - } - - /** - * @depends testHandleSingleSuccess - */ - function testHandleRemaining() { - - $hasRan = false; - - $this->propPatch->handleRemaining(function($mutations) use (&$hasRan) { - $hasRan = true; - $this->assertEquals(['{DAV:}displayname' => 'foo'], $mutations); - return true; - }); - - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 200], $result); - - $this->assertTrue($hasRan); - - } - function testHandleRemainingNothingToDo() { - - $hasRan = false; - - $this->propPatch->handle('{DAV:}displayname', function() {}); - $this->propPatch->handleRemaining(function($mutations) use (&$hasRan) { - $hasRan = true; - }); - - $this->assertFalse($hasRan); - - } - - function testSetResultCode() { - - $this->propPatch->setResultCode('{DAV:}displayname', 201); - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 201], $result); - - } - - function testSetResultCodeFail() { - - $this->propPatch->setResultCode('{DAV:}displayname', 402); - $this->assertFalse($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 402], $result); - - } - - function testSetRemainingResultCode() { - - $this->propPatch->setRemainingResultCode(204); - $this->assertTrue($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 204], $result); - - } - - function testCommitNoHandler() { - - $this->assertFalse($this->propPatch->commit()); - $result = $this->propPatch->getResult(); - $this->assertEquals(['{DAV:}displayname' => 403], $result); - - } - - function testHandlerNotCalled() { - - $hasRan = false; - - $this->propPatch->setResultCode('{DAV:}displayname', 402); - $this->propPatch->handle('{DAV:}displayname', function($value) use (&$hasRan) { - $hasRan = true; - }); - - $this->propPatch->commit(); - - // The handler is not supposed to have ran - $this->assertFalse($hasRan); - - } - - function testDependencyFail() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - ]); - - $calledA = false; - $calledB = false; - - $propPatch->handle('{DAV:}a', function() use (&$calledA) { - $calledA = true; - return false; - }); - $propPatch->handle('{DAV:}b', function() use (&$calledB) { - $calledB = true; - return false; - }); - - $result = $propPatch->commit(); - $this->assertTrue($calledA); - $this->assertFalse($calledB); - - $this->assertFalse($result); - - $this->assertEquals([ - '{DAV:}a' => 403, - '{DAV:}b' => 424, - ], $propPatch->getResult()); - - } - - /** - * @expectedException \UnexpectedValueException - */ - function testHandleSingleBrokenResult() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - ]); - - $propPatch->handle('{DAV:}a', function() { - return []; - }); - $propPatch->commit(); - - } - - function testHandleMultiValueSuccess() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ]); - - $calledA = false; - - $propPatch->handle(['{DAV:}a', '{DAV:}b', '{DAV:}c'], function($properties) use (&$calledA) { - $calledA = true; - $this->assertEquals([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ], $properties); - return true; - }); - $result = $propPatch->commit(); - $this->assertTrue($calledA); - $this->assertTrue($result); - - $this->assertEquals([ - '{DAV:}a' => 200, - '{DAV:}b' => 200, - '{DAV:}c' => 204, - ], $propPatch->getResult()); - - } - - - function testHandleMultiValueFail() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ]); - - $calledA = false; - - $propPatch->handle(['{DAV:}a', '{DAV:}b', '{DAV:}c'], function($properties) use (&$calledA) { - $calledA = true; - $this->assertEquals([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ], $properties); - return false; - }); - $result = $propPatch->commit(); - $this->assertTrue($calledA); - $this->assertFalse($result); - - $this->assertEquals([ - '{DAV:}a' => 403, - '{DAV:}b' => 403, - '{DAV:}c' => 403, - ], $propPatch->getResult()); - - } - - function testHandleMultiValueCustomResult() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ]); - - $calledA = false; - - $propPatch->handle(['{DAV:}a', '{DAV:}b', '{DAV:}c'], function($properties) use (&$calledA) { - $calledA = true; - $this->assertEquals([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ], $properties); - - return [ - '{DAV:}a' => 201, - '{DAV:}b' => 204, - ]; - }); - $result = $propPatch->commit(); - $this->assertTrue($calledA); - $this->assertFalse($result); - - $this->assertEquals([ - '{DAV:}a' => 201, - '{DAV:}b' => 204, - '{DAV:}c' => 500, - ], $propPatch->getResult()); - - } - - /** - * @expectedException \UnexpectedValueException - */ - function testHandleMultiValueBroken() { - - $propPatch = new PropPatch([ - '{DAV:}a' => 'foo', - '{DAV:}b' => 'bar', - '{DAV:}c' => null, - ]); - - $propPatch->handle(['{DAV:}a', '{DAV:}b', '{DAV:}c'], function($properties) { - return 'hi'; - }); - $propPatch->commit(); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/AbstractPDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/AbstractPDOTest.php deleted file mode 100644 index a2b9987b7e5..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/AbstractPDOTest.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage\Backend; - -use Sabre\DAV\PropFind; -use Sabre\DAV\PropPatch; -use Sabre\DAV\Xml\Property\Complex; -use Sabre\DAV\Xml\Property\Href; - -abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\DAV\DbTestHelperTrait; - - function getBackend() { - - $this->dropTables('propertystorage'); - $this->createSchema('propertystorage'); - - $pdo = $this->getPDO(); - - $pdo->exec("INSERT INTO propertystorage (path, name, valuetype, value) VALUES ('dir', '{DAV:}displayname', 1, 'Directory')"); - - return new PDO($this->getPDO()); - - } - - function testPropFind() { - - $backend = $this->getBackend(); - - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $backend->propFind('dir', $propFind); - - $this->assertEquals('Directory', $propFind->get('{DAV:}displayname')); - - } - - function testPropFindNothingToDo() { - - $backend = $this->getBackend(); - - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $propFind->set('{DAV:}displayname', 'foo'); - $backend->propFind('dir', $propFind); - - $this->assertEquals('foo', $propFind->get('{DAV:}displayname')); - - } - - /** - * @depends testPropFind - */ - function testPropPatchUpdate() { - - $backend = $this->getBackend(); - - $propPatch = new PropPatch(['{DAV:}displayname' => 'bar']); - $backend->propPatch('dir', $propPatch); - $propPatch->commit(); - - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $backend->propFind('dir', $propFind); - - $this->assertEquals('bar', $propFind->get('{DAV:}displayname')); - - } - - /** - * @depends testPropPatchUpdate - */ - function testPropPatchComplex() { - - $backend = $this->getBackend(); - - $complex = new Complex('<foo xmlns="DAV:">somevalue</foo>'); - - $propPatch = new PropPatch(['{DAV:}complex' => $complex]); - $backend->propPatch('dir', $propPatch); - $propPatch->commit(); - - $propFind = new PropFind('dir', ['{DAV:}complex']); - $backend->propFind('dir', $propFind); - - $this->assertEquals($complex, $propFind->get('{DAV:}complex')); - - } - - - /** - * @depends testPropPatchComplex - */ - function testPropPatchCustom() { - - $backend = $this->getBackend(); - - $custom = new Href('/foo/bar/'); - - $propPatch = new PropPatch(['{DAV:}custom' => $custom]); - $backend->propPatch('dir', $propPatch); - $propPatch->commit(); - - $propFind = new PropFind('dir', ['{DAV:}custom']); - $backend->propFind('dir', $propFind); - - $this->assertEquals($custom, $propFind->get('{DAV:}custom')); - - } - - /** - * @depends testPropFind - */ - function testPropPatchRemove() { - - $backend = $this->getBackend(); - - $propPatch = new PropPatch(['{DAV:}displayname' => null]); - $backend->propPatch('dir', $propPatch); - $propPatch->commit(); - - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $backend->propFind('dir', $propFind); - - $this->assertEquals(null, $propFind->get('{DAV:}displayname')); - - } - - /** - * @depends testPropFind - */ - function testDelete() { - - $backend = $this->getBackend(); - $backend->delete('dir'); - - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $backend->propFind('dir', $propFind); - - $this->assertEquals(null, $propFind->get('{DAV:}displayname')); - - } - - /** - * @depends testPropFind - */ - function testMove() { - - $backend = $this->getBackend(); - // Creating a new child property. - $propPatch = new PropPatch(['{DAV:}displayname' => 'child']); - $backend->propPatch('dir/child', $propPatch); - $propPatch->commit(); - - $backend->move('dir', 'dir2'); - - // Old 'dir' - $propFind = new PropFind('dir', ['{DAV:}displayname']); - $backend->propFind('dir', $propFind); - $this->assertEquals(null, $propFind->get('{DAV:}displayname')); - - // Old 'dir/child' - $propFind = new PropFind('dir/child', ['{DAV:}displayname']); - $backend->propFind('dir/child', $propFind); - $this->assertEquals(null, $propFind->get('{DAV:}displayname')); - - // New 'dir2' - $propFind = new PropFind('dir2', ['{DAV:}displayname']); - $backend->propFind('dir2', $propFind); - $this->assertEquals('Directory', $propFind->get('{DAV:}displayname')); - - // New 'dir2/child' - $propFind = new PropFind('dir2/child', ['{DAV:}displayname']); - $backend->propFind('dir2/child', $propFind); - $this->assertEquals('child', $propFind->get('{DAV:}displayname')); - } - - /** - * @depends testPropFind - */ - function testDeepDelete() { - - $backend = $this->getBackend(); - $propPatch = new PropPatch(['{DAV:}displayname' => 'child']); - $backend->propPatch('dir/child', $propPatch); - $propPatch->commit(); - $backend->delete('dir'); - - $propFind = new PropFind('dir/child', ['{DAV:}displayname']); - $backend->propFind('dir/child', $propFind); - - $this->assertEquals(null, $propFind->get('{DAV:}displayname')); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/Mock.php deleted file mode 100644 index cf4c88fb85f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/Mock.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage\Backend; - -use Sabre\DAV\PropFind; -use Sabre\DAV\PropPatch; - -class Mock implements BackendInterface { - - public $data = []; - - /** - * Fetches properties for a path. - * - * This method received a PropFind object, which contains all the - * information about the properties that need to be fetched. - * - * Usually you would just want to call 'get404Properties' on this object, - * as this will give you the _exact_ list of properties that need to be - * fetched, and haven't yet. - * - * @param string $path - * @param PropFind $propFind - * @return void - */ - function propFind($path, PropFind $propFind) { - - if (!isset($this->data[$path])) { - return; - } - - foreach ($this->data[$path] as $name => $value) { - $propFind->set($name, $value); - } - - } - - /** - * Updates properties for a path - * - * This method received a PropPatch object, which contains all the - * information about the update. - * - * Usually you would want to call 'handleRemaining' on this object, to get; - * a list of all properties that need to be stored. - * - * @param string $path - * @param PropPatch $propPatch - * @return void - */ - function propPatch($path, PropPatch $propPatch) { - - if (!isset($this->data[$path])) { - $this->data[$path] = []; - } - $propPatch->handleRemaining(function($properties) use ($path) { - - foreach ($properties as $propName => $propValue) { - - if (is_null($propValue)) { - unset($this->data[$path][$propName]); - } else { - $this->data[$path][$propName] = $propValue; - } - return true; - - } - - }); - - } - - /** - * This method is called after a node is deleted. - * - * This allows a backend to clean up all associated properties. - * - * @param string $path - * @return void - */ - function delete($path) { - - unset($this->data[$path]); - - } - - /** - * This method is called after a successful MOVE - * - * This should be used to migrate all properties from one path to another. - * Note that entire collections may be moved, so ensure that all properties - * for children are also moved along. - * - * @param string $source - * @param string $destination - * @return void - */ - function move($source, $destination) { - - foreach ($this->data as $path => $props) { - - if ($path === $source) { - $this->data[$destination] = $props; - unset($this->data[$path]); - continue; - } - - if (strpos($path, $source . '/') === 0) { - $this->data[$destination . substr($path, strlen($source) + 1)] = $props; - unset($this->data[$path]); - } - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOMysqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOMysqlTest.php deleted file mode 100644 index b92b034df84..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOMysqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage\Backend; - -class PDOMysqlTest extends AbstractPDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOPgSqlTest.php deleted file mode 100644 index 616c2e67a6c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage\Backend; - -class PDOPgSqlTest extends AbstractPDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOSqliteTest.php deleted file mode 100644 index 20a6a09e5ba..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/Backend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage\Backend; - -class PDOSqliteTest extends AbstractPDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/PluginTest.php deleted file mode 100644 index 130f1490f17..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/PropertyStorage/PluginTest.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php - -namespace Sabre\DAV\PropertyStorage; - -class PluginTest extends \Sabre\DAVServerTest { - - protected $backend; - protected $plugin; - - protected $setupFiles = true; - - function setUp() { - - parent::setUp(); - $this->backend = new Backend\Mock(); - $this->plugin = new Plugin( - $this->backend - ); - - $this->server->addPlugin($this->plugin); - - } - - function testGetInfo() { - - $this->assertArrayHasKey( - 'name', - $this->plugin->getPluginInfo() - ); - - } - - function testSetProperty() { - - $this->server->updateProperties('', ['{DAV:}displayname' => 'hi']); - $this->assertEquals([ - '' => [ - '{DAV:}displayname' => 'hi', - ] - ], $this->backend->data); - - } - - /** - * @depends testSetProperty - */ - function testGetProperty() { - - $this->testSetProperty(); - $result = $this->server->getProperties('', ['{DAV:}displayname']); - - $this->assertEquals([ - '{DAV:}displayname' => 'hi', - ], $result); - - } - - /** - * @depends testSetProperty - */ - function testDeleteProperty() { - - $this->testSetProperty(); - $this->server->emit('afterUnbind', ['']); - $this->assertEquals([], $this->backend->data); - - } - - function testMove() { - - $this->server->tree->getNodeForPath('files')->createFile('source'); - $this->server->updateProperties('files/source', ['{DAV:}displayname' => 'hi']); - - $request = new \Sabre\HTTP\Request('MOVE', '/files/source', ['Destination' => '/files/dest']); - $this->assertHTTPStatus(201, $request); - - $result = $this->server->getProperties('/files/dest', ['{DAV:}displayname']); - - $this->assertEquals([ - '{DAV:}displayname' => 'hi', - ], $result); - - $this->server->tree->getNodeForPath('files')->createFile('source'); - $result = $this->server->getProperties('/files/source', ['{DAV:}displayname']); - - $this->assertEquals([], $result); - - } - - /** - * @depends testDeleteProperty - */ - function testSetPropertyInFilteredPath() { - - $this->plugin->pathFilter = function($path) { - - return false; - - }; - - $this->server->updateProperties('', ['{DAV:}displayname' => 'hi']); - $this->assertEquals([], $this->backend->data); - - } - - /** - * @depends testSetPropertyInFilteredPath - */ - function testGetPropertyInFilteredPath() { - - $this->testSetPropertyInFilteredPath(); - $result = $this->server->getProperties('', ['{DAV:}displayname']); - - $this->assertEquals([], $result); - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php deleted file mode 100644 index 42759647ab0..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class ServerEventsTest extends AbstractServer { - - private $tempPath; - - private $exception; - - function testAfterBind() { - - $this->server->on('afterBind', [$this, 'afterBindHandler']); - $newPath = 'afterBind'; - - $this->tempPath = ''; - $this->server->createFile($newPath, 'body'); - $this->assertEquals($newPath, $this->tempPath); - - } - - function afterBindHandler($path) { - - $this->tempPath = $path; - - } - - function testAfterResponse() { - - $mock = $this->getMockBuilder('stdClass') - ->setMethods(['afterResponseCallback']) - ->getMock(); - $mock->expects($this->once())->method('afterResponseCallback'); - - $this->server->on('afterResponse', [$mock, 'afterResponseCallback']); - - $this->server->httpRequest = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'GET', - 'REQUEST_URI' => '/test.txt', - ]); - - $this->server->exec(); - - } - - function testBeforeBindCancel() { - - $this->server->on('beforeBind', [$this, 'beforeBindCancelHandler']); - $this->assertFalse($this->server->createFile('bla', 'body')); - - // Also testing put() - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'PUT', - 'REQUEST_URI' => '/barbar', - ]); - - $this->server->httpRequest = $req; - $this->server->exec(); - - $this->assertEquals(500, $this->server->httpResponse->getStatus()); - - } - - function beforeBindCancelHandler($path) { - - return false; - - } - - function testException() { - - $this->server->on('exception', [$this, 'exceptionHandler']); - - $req = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'GET', - 'REQUEST_URI' => '/not/exisitng', - ]); - $this->server->httpRequest = $req; - $this->server->exec(); - - $this->assertInstanceOf('Sabre\\DAV\\Exception\\NotFound', $this->exception); - - } - - function exceptionHandler(Exception $exception) { - - $this->exception = $exception; - - } - - function testMethod() { - - $k = 1; - $this->server->on('method', function($request, $response) use (&$k) { - - $k += 1; - - return false; - - }); - $this->server->on('method', function($request, $response) use (&$k) { - - $k += 2; - - return false; - - }); - - try { - $this->server->invokeMethod( - new HTTP\Request('BLABLA', '/'), - new HTTP\Response(), - false - ); - } catch (Exception $e) {} - - // Fun fact, PHP 7.1 changes the order when sorting-by-callback. - $this->assertTrue($k >= 2 && $k <= 3); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerMKCOLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerMKCOLTest.php deleted file mode 100644 index 557eddbbcf6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerMKCOLTest.php +++ /dev/null @@ -1,366 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -class ServerMKCOLTest extends AbstractServer { - - function testMkcol() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(""); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertTrue(is_dir($this->tempDir . '/testcol')); - - } - - /** - * @depends testMkcol - */ - function testMKCOLUnknownBody() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody("Hello"); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(415, $this->response->status); - - } - - /** - * @depends testMkcol - */ - function testMKCOLBrokenXML() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody("Hello"); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(400, $this->response->getStatus(), $this->response->getBodyAsString()); - - } - - /** - * @depends testMkcol - */ - function testMKCOLUnknownXML() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?><html></html>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(400, $this->response->getStatus()); - - } - - /** - * @depends testMkcol - */ - function testMKCOLNoResourceType() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <displayname>Evert</displayname> - </prop> - </set> -</mkcol>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(400, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMkcol - */ - function testMKCOLIncorrectResourceType() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <resourcetype><collection /><blabla /></resourcetype> - </prop> - </set> -</mkcol>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(403, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLIncorrectResourceType - */ - function testMKCOLSuccess() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <resourcetype><collection /></resourcetype> - </prop> - </set> -</mkcol>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - - $this->assertEquals(201, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLIncorrectResourceType - */ - function testMKCOLWhiteSpaceResourceType() { - - $serverVars = [ - 'REQUEST_URI' => '/testcol', - 'REQUEST_METHOD' => 'MKCOL', - 'HTTP_CONTENT_TYPE' => 'application/xml', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody('<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <resourcetype> - <collection /> - </resourcetype> - </prop> - </set> -</mkcol>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Length' => ['0'], - ], $this->response->getHeaders()); - - $this->assertEquals(201, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLIncorrectResourceType - */ - function testMKCOLNoParent() { - - $serverVars = [ - 'REQUEST_URI' => '/testnoparent/409me', - 'REQUEST_METHOD' => 'MKCOL', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(''); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(409, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLIncorrectResourceType - */ - function testMKCOLParentIsNoCollection() { - - $serverVars = [ - 'REQUEST_URI' => '/test.txt/409me', - 'REQUEST_METHOD' => 'MKCOL', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(''); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(409, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLIncorrectResourceType - */ - function testMKCOLAlreadyExists() { - - $serverVars = [ - 'REQUEST_URI' => '/test.txt', - 'REQUEST_METHOD' => 'MKCOL', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody(''); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'], - ], $this->response->getHeaders()); - - $this->assertEquals(405, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - } - - /** - * @depends testMKCOLSuccess - * @depends testMKCOLAlreadyExists - */ - function testMKCOLAndProps() { - - $request = new HTTP\Request( - 'MKCOL', - '/testcol', - ['Content-Type' => 'application/xml'] - ); - $request->setBody('<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <resourcetype><collection /></resourcetype> - <displayname>my new collection</displayname> - </prop> - </set> -</mkcol>'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Wrong statuscode received. Full response body: ' . $this->response->body); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $responseBody = $this->response->getBodyAsString(); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:response> - <d:href>/testcol</d:href> - <d:propstat> - <d:prop> - <d:displayname /> - </d:prop> - <d:status>HTTP/1.1 403 Forbidden</d:status> - </d:propstat> - </d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $responseBody - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php deleted file mode 100644 index fa67102cc43..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPluginTest.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; -require_once 'Sabre/DAV/TestPlugin.php'; - -class ServerPluginTest extends AbstractServer { - - /** - * @var Sabre\DAV\TestPlugin - */ - protected $testPlugin; - - function setUp() { - - parent::setUp(); - - $testPlugin = new TestPlugin(); - $this->server->addPlugin($testPlugin); - $this->testPlugin = $testPlugin; - - } - - /** - */ - function testBaseClass() { - - $p = new ServerPluginMock(); - $this->assertEquals([], $p->getFeatures()); - $this->assertEquals([], $p->getHTTPMethods('')); - $this->assertEquals( - [ - 'name' => 'Sabre\DAV\ServerPluginMock', - 'description' => null, - 'link' => null - ], $p->getPluginInfo() - ); - - } - - function testOptions() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'OPTIONS', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol, drinking'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('', $this->response->body); - $this->assertEquals('OPTIONS', $this->testPlugin->beforeMethod); - - - } - - function testGetPlugin() { - - $this->assertEquals($this->testPlugin, $this->server->getPlugin(get_class($this->testPlugin))); - - } - - function testUnknownPlugin() { - - $this->assertNull($this->server->getPlugin('SomeRandomClassName')); - - } - - function testGetSupportedReportSet() { - - $this->assertEquals([], $this->testPlugin->getSupportedReportSet('/')); - - } - - function testGetPlugins() { - - $this->assertEquals( - [ - get_class($this->testPlugin) => $this->testPlugin, - 'core' => $this->server->getPlugin('core'), - ], - $this->server->getPlugins() - ); - - } - - -} - -class ServerPluginMock extends ServerPlugin { - - function initialize(Server $s) { } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPreconditionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPreconditionTest.php deleted file mode 100644 index 203cf26d9d4..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPreconditionTest.php +++ /dev/null @@ -1,344 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class ServerPreconditionsTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfMatchNoNode() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/bar', ['If-Match' => '*']); - $httpResponse = new HTTP\Response(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - */ - function testIfMatchHasNode() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-Match' => '*']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfMatchWrongEtag() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-Match' => '1234']); - $httpResponse = new HTTP\Response(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - */ - function testIfMatchCorrectEtag() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-Match' => '"abc123"']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - * Evolution sometimes uses \" instead of " for If-Match headers. - * - * @depends testIfMatchCorrectEtag - */ - function testIfMatchEvolutionEtag() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-Match' => '\\"abc123\\"']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - */ - function testIfMatchMultiple() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-Match' => '"hellothere", "abc123"']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - */ - function testIfNoneMatchNoNode() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/bar', ['If-None-Match' => '*']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfNoneMatchHasNode() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('POST', '/foo', ['If-None-Match' => '*']); - $httpResponse = new HTTP\Response(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - */ - function testIfNoneMatchWrongEtag() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('POST', '/foo', ['If-None-Match' => '"1234"']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - */ - function testIfNoneMatchWrongEtagMultiple() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('POST', '/foo', ['If-None-Match' => '"1234", "5678"']); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfNoneMatchCorrectEtag() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('POST', '/foo', ['If-None-Match' => '"abc123"']); - $httpResponse = new HTTP\Response(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfNoneMatchCorrectEtagMultiple() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('POST', '/foo', ['If-None-Match' => '"1234, "abc123"']); - $httpResponse = new HTTP\Response(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - */ - function testIfNoneMatchCorrectEtagAsGet() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = new HTTP\Request('GET', '/foo', ['If-None-Match' => '"abc123"']); - $server->httpResponse = new HTTP\ResponseMock(); - - $this->assertFalse($server->checkPreconditions($httpRequest, $server->httpResponse)); - $this->assertEquals(304, $server->httpResponse->getStatus()); - $this->assertEquals(['ETag' => ['"abc123"']], $server->httpResponse->getHeaders()); - - } - - /** - * This was a test written for issue #515. - */ - function testNoneMatchCorrectEtagEnsureSapiSent() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $server->sapi = new HTTP\SapiMock(); - HTTP\SapiMock::$sent = 0; - $httpRequest = new HTTP\Request('GET', '/foo', ['If-None-Match' => '"abc123"']); - $server->httpRequest = $httpRequest; - $server->httpResponse = new HTTP\ResponseMock(); - - $server->exec(); - - $this->assertFalse($server->checkPreconditions($httpRequest, $server->httpResponse)); - $this->assertEquals(304, $server->httpResponse->getStatus()); - $this->assertEquals([ - 'ETag' => ['"abc123"'], - 'X-Sabre-Version' => [Version::VERSION], - ], $server->httpResponse->getHeaders()); - $this->assertEquals(1, HTTP\SapiMock::$sent); - - } - - /** - */ - function testIfModifiedSinceUnModified() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_MODIFIED_SINCE' => 'Sun, 06 Nov 1994 08:49:37 GMT', - 'REQUEST_URI' => '/foo' - ]); - $server->httpResponse = new HTTP\ResponseMock(); - $this->assertFalse($server->checkPreconditions($httpRequest, $server->httpResponse)); - - $this->assertEquals(304, $server->httpResponse->status); - $this->assertEquals([ - 'Last-Modified' => ['Sat, 06 Apr 1985 23:30:00 GMT'], - ], $server->httpResponse->getHeaders()); - - } - - - /** - */ - function testIfModifiedSinceModified() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_MODIFIED_SINCE' => 'Tue, 06 Nov 1984 08:49:37 GMT', - 'REQUEST_URI' => '/foo' - ]); - - $httpResponse = new HTTP\ResponseMock(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - */ - function testIfModifiedSinceInvalidDate() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_MODIFIED_SINCE' => 'Your mother', - 'REQUEST_URI' => '/foo' - ]); - $httpResponse = new HTTP\ResponseMock(); - - // Invalid dates must be ignored, so this should return true - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - /** - */ - function testIfModifiedSinceInvalidDate2() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_MODIFIED_SINCE' => 'Sun, 06 Nov 1994 08:49:37 EST', - 'REQUEST_URI' => '/foo' - ]); - $httpResponse = new HTTP\ResponseMock(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - - /** - */ - function testIfUnmodifiedSinceUnModified() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_UNMODIFIED_SINCE' => 'Sun, 06 Nov 1994 08:49:37 GMT', - 'REQUEST_URI' => '/foo' - ]); - $httpResponse = new HTTP\Response(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - - /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed - */ - function testIfUnmodifiedSinceModified() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_UNMODIFIED_SINCE' => 'Tue, 06 Nov 1984 08:49:37 GMT', - 'REQUEST_URI' => '/foo' - ]); - $httpResponse = new HTTP\ResponseMock(); - $server->checkPreconditions($httpRequest, $httpResponse); - - } - - /** - */ - function testIfUnmodifiedSinceInvalidDate() { - - $root = new SimpleCollection('root', [new ServerPreconditionsNode()]); - $server = new Server($root); - $httpRequest = HTTP\Sapi::createFromServerArray([ - 'HTTP_IF_UNMODIFIED_SINCE' => 'Sun, 06 Nov 1984 08:49:37 CET', - 'REQUEST_URI' => '/foo' - ]); - $httpResponse = new HTTP\ResponseMock(); - $this->assertTrue($server->checkPreconditions($httpRequest, $httpResponse)); - - } - - -} - -class ServerPreconditionsNode extends File { - - function getETag() { - - return '"abc123"'; - - } - - function getLastModified() { - - /* my birthday & time, I believe */ - return strtotime('1985-04-07 01:30 +02:00'); - - } - - function getName() { - - return 'foo'; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php deleted file mode 100644 index c968e72008a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/DAV/AbstractServer.php'; - -class ServerPropsInfiniteDepthTest extends AbstractServer { - - protected function getRootNode() { - - return new FSExt\Directory(SABRE_TEMPDIR); - - } - - function setUp() { - - if (file_exists(SABRE_TEMPDIR . '../.sabredav')) unlink(SABRE_TEMPDIR . '../.sabredav'); - parent::setUp(); - file_put_contents(SABRE_TEMPDIR . '/test2.txt', 'Test contents2'); - mkdir(SABRE_TEMPDIR . '/col'); - mkdir(SABRE_TEMPDIR . '/col/col'); - file_put_contents(SABRE_TEMPDIR . 'col/col/test.txt', 'Test contents'); - $this->server->addPlugin(new Locks\Plugin(new Locks\Backend\File(SABRE_TEMPDIR . '/.locksdb'))); - $this->server->enablePropfindDepthInfinity = true; - - } - - function tearDown() { - - parent::tearDown(); - if (file_exists(SABRE_TEMPDIR . '../.locksdb')) unlink(SABRE_TEMPDIR . '../.locksdb'); - - } - - private function sendRequest($body) { - - $request = new HTTP\Request('PROPFIND', '/', ['Depth' => 'infinity']); - $request->setBody($body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - } - - function testPropFindEmptyBody() { - - $this->sendRequest(""); - - $this->assertEquals(207, $this->response->status, 'Incorrect status received. Full response body: ' . $this->response->getBodyAsString()); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'DAV' => ['1, 3, extended-mkcol, 2'], - 'Vary' => ['Brief,Prefer'], - ], - $this->response->getHeaders() - ); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - list($data) = $xml->xpath('/d:multistatus/d:response/d:href'); - $this->assertEquals('/', (string)$data, 'href element should have been /'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:resourcetype'); - // 8 resources are to be returned: /, col, col/col, col/col/test.txt, dir, dir/child.txt, test.txt and test2.txt - $this->assertEquals(8, count($data)); - - } - - function testSupportedLocks() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:supportedlock /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - - $body = $this->response->getBodyAsString(); - $this->assertEquals(207, $this->response->getStatus(), $body); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry'); - $this->assertEquals(16, count($data), 'We expected sixteen \'d:lockentry\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope'); - $this->assertEquals(16, count($data), 'We expected sixteen \'d:lockscope\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:locktype'); - $this->assertEquals(16, count($data), 'We expected sixteen \'d:locktype\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope/d:shared'); - $this->assertEquals(8, count($data), 'We expected eight \'d:shared\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope/d:exclusive'); - $this->assertEquals(8, count($data), 'We expected eight \'d:exclusive\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:locktype/d:write'); - $this->assertEquals(16, count($data), 'We expected sixteen \'d:write\' tags'); - } - - function testLockDiscovery() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:lockdiscovery /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:lockdiscovery'); - $this->assertEquals(8, count($data), 'We expected eight \'d:lockdiscovery\' tags'); - - } - - function testUnknownProperty() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:macaroni /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - $pathTests = [ - '/d:multistatus', - '/d:multistatus/d:response', - '/d:multistatus/d:response/d:propstat', - '/d:multistatus/d:response/d:propstat/d:status', - '/d:multistatus/d:response/d:propstat/d:prop', - '/d:multistatus/d:response/d:propstat/d:prop/d:macaroni', - ]; - foreach ($pathTests as $test) { - $this->assertTrue(count($xml->xpath($test)) == true, 'We expected the ' . $test . ' element to appear in the response, we got: ' . $body); - } - - $val = $xml->xpath('/d:multistatus/d:response/d:propstat/d:status'); - $this->assertEquals(8, count($val), $body); - $this->assertEquals('HTTP/1.1 404 Not Found', (string)$val[0]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsTest.php deleted file mode 100644 index 253200be7cf..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerPropsTest.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; -require_once 'Sabre/DAV/AbstractServer.php'; - -class ServerPropsTest extends AbstractServer { - - protected function getRootNode() { - - return new FSExt\Directory(SABRE_TEMPDIR); - - } - - function setUp() { - - if (file_exists(SABRE_TEMPDIR . '../.sabredav')) unlink(SABRE_TEMPDIR . '../.sabredav'); - parent::setUp(); - file_put_contents(SABRE_TEMPDIR . '/test2.txt', 'Test contents2'); - mkdir(SABRE_TEMPDIR . '/col'); - file_put_contents(SABRE_TEMPDIR . 'col/test.txt', 'Test contents'); - $this->server->addPlugin(new Locks\Plugin(new Locks\Backend\File(SABRE_TEMPDIR . '/.locksdb'))); - - } - - function tearDown() { - - parent::tearDown(); - if (file_exists(SABRE_TEMPDIR . '../.locksdb')) unlink(SABRE_TEMPDIR . '../.locksdb'); - - } - - private function sendRequest($body, $path = '/', $headers = ['Depth' => '0']) { - - $request = new HTTP\Request('PROPFIND', $path, $headers, $body); - - $this->server->httpRequest = $request; - $this->server->exec(); - - } - - function testPropFindEmptyBody() { - - $this->sendRequest(""); - $this->assertEquals(207, $this->response->status); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'DAV' => ['1, 3, extended-mkcol, 2'], - 'Vary' => ['Brief,Prefer'], - ], - $this->response->getHeaders() - ); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - list($data) = $xml->xpath('/d:multistatus/d:response/d:href'); - $this->assertEquals('/', (string)$data, 'href element should have been /'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:resourcetype'); - $this->assertEquals(1, count($data)); - - } - - function testPropFindEmptyBodyFile() { - - $this->sendRequest("", '/test2.txt', []); - $this->assertEquals(207, $this->response->status); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'DAV' => ['1, 3, extended-mkcol, 2'], - 'Vary' => ['Brief,Prefer'], - ], - $this->response->getHeaders() - ); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - list($data) = $xml->xpath('/d:multistatus/d:response/d:href'); - $this->assertEquals('/test2.txt', (string)$data, 'href element should have been /test2.txt'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength'); - $this->assertEquals(1, count($data)); - - } - - function testSupportedLocks() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:supportedlock /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry'); - $this->assertEquals(2, count($data), 'We expected two \'d:lockentry\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope'); - $this->assertEquals(2, count($data), 'We expected two \'d:lockscope\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:locktype'); - $this->assertEquals(2, count($data), 'We expected two \'d:locktype\' tags'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope/d:shared'); - $this->assertEquals(1, count($data), 'We expected a \'d:shared\' tag'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:lockscope/d:exclusive'); - $this->assertEquals(1, count($data), 'We expected a \'d:exclusive\' tag'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry/d:locktype/d:write'); - $this->assertEquals(2, count($data), 'We expected two \'d:write\' tags'); - } - - function testLockDiscovery() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:lockdiscovery /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:lockdiscovery'); - $this->assertEquals(1, count($data), 'We expected a \'d:lockdiscovery\' tag'); - - } - - function testUnknownProperty() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:macaroni /> - </d:prop> -</d:propfind>'; - - $this->sendRequest($xml); - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - $pathTests = [ - '/d:multistatus', - '/d:multistatus/d:response', - '/d:multistatus/d:response/d:propstat', - '/d:multistatus/d:response/d:propstat/d:status', - '/d:multistatus/d:response/d:propstat/d:prop', - '/d:multistatus/d:response/d:propstat/d:prop/d:macaroni', - ]; - foreach ($pathTests as $test) { - $this->assertTrue(count($xml->xpath($test)) == true, 'We expected the ' . $test . ' element to appear in the response, we got: ' . $body); - } - - $val = $xml->xpath('/d:multistatus/d:response/d:propstat/d:status'); - $this->assertEquals(1, count($val), $body); - $this->assertEquals('HTTP/1.1 404 Not Found', (string)$val[0]); - - } - - function testParsePropPatchRequest() { - - $body = '<?xml version="1.0"?> -<d:propertyupdate xmlns:d="DAV:" xmlns:s="http://sabredav.org/NS/test"> - <d:set><d:prop><s:someprop>somevalue</s:someprop></d:prop></d:set> - <d:remove><d:prop><s:someprop2 /></d:prop></d:remove> - <d:set><d:prop><s:someprop3>removeme</s:someprop3></d:prop></d:set> - <d:remove><d:prop><s:someprop3 /></d:prop></d:remove> -</d:propertyupdate>'; - - $result = $this->server->xml->parse($body); - $this->assertEquals([ - '{http://sabredav.org/NS/test}someprop' => 'somevalue', - '{http://sabredav.org/NS/test}someprop2' => null, - '{http://sabredav.org/NS/test}someprop3' => null, - ], $result->properties); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php deleted file mode 100644 index 81224d687c3..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use DateTime; -use Sabre\HTTP; - -/** - * This file tests HTTP requests that use the Range: header. - * - * @copyright Copyright (C) fruux GmbH. (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ServerRangeTest extends \Sabre\DAVServerTest { - - protected $setupFiles = true; - - /** - * We need this string a lot - */ - protected $lastModified; - - function setUp() { - - parent::setUp(); - $this->server->createFile('files/test.txt', 'Test contents'); - - $this->lastModified = HTTP\Util::toHTTPDate( - new DateTime('@' . $this->server->tree->getNodeForPath('files/test.txt')->getLastModified()) - ); - - $stream = popen('echo "Test contents"', 'r'); - $streamingFile = new Mock\StreamingFile( - 'no-seeking.txt', - $stream - ); - $streamingFile->setSize(12); - $this->server->tree->getNodeForPath('files')->addNode($streamingFile); - - } - - function testRange() { - - $request = new HTTP\Request('GET', '/files/test.txt', ['Range' => 'bytes=2-5']); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [4], - 'Content-Range' => ['bytes 2-5/13'], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - $this->assertEquals(206, $response->getStatus()); - $this->assertEquals('st c', $response->getBodyAsString()); - - } - - /** - * @depends testRange - */ - function testStartRange() { - - $request = new HTTP\Request('GET', '/files/test.txt', ['Range' => 'bytes=2-']); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [11], - 'Content-Range' => ['bytes 2-12/13'], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(206, $response->getStatus()); - $this->assertEquals('st contents', $response->getBodyAsString()); - - } - - /** - * @depends testRange - */ - function testEndRange() { - - $request = new HTTP\Request('GET', '/files/test.txt', ['Range' => 'bytes=-8']); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [8], - 'Content-Range' => ['bytes 5-12/13'], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(206, $response->getStatus()); - $this->assertEquals('contents', $response->getBodyAsString()); - - } - - /** - * @depends testRange - */ - function testTooHighRange() { - - $request = new HTTP\Request('GET', '/files/test.txt', ['Range' => 'bytes=100-200']); - $response = $this->request($request); - - $this->assertEquals(416, $response->getStatus()); - - } - - /** - * @depends testRange - */ - function testCrazyRange() { - - $request = new HTTP\Request('GET', '/files/test.txt', ['Range' => 'bytes=8-4']); - $response = $this->request($request); - - $this->assertEquals(416, $response->getStatus()); - - } - - function testNonSeekableStream() { - - $request = new HTTP\Request('GET', '/files/no-seeking.txt', ['Range' => 'bytes=2-5']); - $response = $this->request($request); - - $this->assertEquals(206, $response->getStatus(), $response); - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [4], - 'Content-Range' => ['bytes 2-5/12'], - // 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals('st c', $response->getBodyAsString()); - - } - - /** - * @depends testRange - */ - function testIfRangeEtag() { - - $request = new HTTP\Request('GET', '/files/test.txt', [ - 'Range' => 'bytes=2-5', - 'If-Range' => '"' . md5('Test contents') . '"', - ]); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [4], - 'Content-Range' => ['bytes 2-5/13'], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(206, $response->getStatus()); - $this->assertEquals('st c', $response->getBodyAsString()); - - } - - /** - * @depends testIfRangeEtag - */ - function testIfRangeEtagIncorrect() { - - $request = new HTTP\Request('GET', '/files/test.txt', [ - 'Range' => 'bytes=2-5', - 'If-Range' => '"foobar"', - ]); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [13], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals('Test contents', $response->getBodyAsString()); - - } - - /** - * @depends testIfRangeEtag - */ - function testIfRangeModificationDate() { - - $request = new HTTP\Request('GET', '/files/test.txt', [ - 'Range' => 'bytes=2-5', - 'If-Range' => 'tomorrow', - ]); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [4], - 'Content-Range' => ['bytes 2-5/13'], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(206, $response->getStatus()); - $this->assertEquals('st c', $response->getBodyAsString()); - - } - - /** - * @depends testIfRangeModificationDate - */ - function testIfRangeModificationDateModified() { - - $request = new HTTP\Request('GET', '/files/test.txt', [ - 'Range' => 'bytes=2-5', - 'If-Range' => '-2 years', - ]); - $response = $this->request($request); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [13], - 'ETag' => ['"' . md5('Test contents') . '"'], - 'Last-Modified' => [$this->lastModified], - ], - $response->getHeaders() - ); - - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals('Test contents', $response->getBodyAsString()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php deleted file mode 100644 index 043179a0051..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php +++ /dev/null @@ -1,475 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -class ServerSimpleTest extends AbstractServer{ - - function testConstructArray() { - - $nodes = [ - new SimpleCollection('hello') - ]; - - $server = new Server($nodes); - $this->assertEquals($nodes[0], $server->tree->getNodeForPath('hello')); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testConstructIncorrectObj() { - - $nodes = [ - new SimpleCollection('hello'), - new \STDClass(), - ]; - - $server = new Server($nodes); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testConstructInvalidArg() { - - $server = new Server(1); - - } - - function testOptions() { - - $request = new HTTP\Request('OPTIONS', '/'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('', $this->response->body); - - } - - function testOptionsUnmapped() { - - $request = new HTTP\Request('OPTIONS', '/unmapped'); - $this->server->httpRequest = $request; - - $this->server->exec(); - - $this->assertEquals([ - 'DAV' => ['1, 3, extended-mkcol'], - 'MS-Author-Via' => ['DAV'], - 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, MKCOL'], - 'Accept-Ranges' => ['bytes'], - 'Content-Length' => ['0'], - 'X-Sabre-Version' => [Version::VERSION], - ], $this->response->getHeaders()); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('', $this->response->body); - - } - - function testNonExistantMethod() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'BLABLA', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(501, $this->response->status); - - - } - - function testBaseUri() { - - $serverVars = [ - 'REQUEST_URI' => '/blabla/test.txt', - 'REQUEST_METHOD' => 'GET', - ]; - $filename = $this->tempDir . '/test.txt'; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->setBaseUri('/blabla/'); - $this->assertEquals('/blabla/', $this->server->getBaseUri()); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/octet-stream'], - 'Content-Length' => [13], - 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($filename)))], - 'ETag' => ['"' . sha1(fileinode($filename) . filesize($filename) . filemtime($filename)) . '"'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals('Test contents', stream_get_contents($this->response->body)); - - } - - function testBaseUriAddSlash() { - - $tests = [ - '/' => '/', - '/foo' => '/foo/', - '/foo/' => '/foo/', - '/foo/bar' => '/foo/bar/', - '/foo/bar/' => '/foo/bar/', - ]; - - foreach ($tests as $test => $result) { - $this->server->setBaseUri($test); - - $this->assertEquals($result, $this->server->getBaseUri()); - - } - - } - - function testCalculateUri() { - - $uris = [ - 'http://www.example.org/root/somepath', - '/root/somepath', - '/root/somepath/', - ]; - - $this->server->setBaseUri('/root/'); - - foreach ($uris as $uri) { - - $this->assertEquals('somepath', $this->server->calculateUri($uri)); - - } - - $this->server->setBaseUri('/root'); - - foreach ($uris as $uri) { - - $this->assertEquals('somepath', $this->server->calculateUri($uri)); - - } - - $this->assertEquals('', $this->server->calculateUri('/root')); - - } - - function testCalculateUriSpecialChars() { - - $uris = [ - 'http://www.example.org/root/%C3%A0fo%C3%B3', - '/root/%C3%A0fo%C3%B3', - '/root/%C3%A0fo%C3%B3/' - ]; - - $this->server->setBaseUri('/root/'); - - foreach ($uris as $uri) { - - $this->assertEquals("\xc3\xa0fo\xc3\xb3", $this->server->calculateUri($uri)); - - } - - $this->server->setBaseUri('/root'); - - foreach ($uris as $uri) { - - $this->assertEquals("\xc3\xa0fo\xc3\xb3", $this->server->calculateUri($uri)); - - } - - $this->server->setBaseUri('/'); - - foreach ($uris as $uri) { - - $this->assertEquals("root/\xc3\xa0fo\xc3\xb3", $this->server->calculateUri($uri)); - - } - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testCalculateUriBreakout() { - - $uri = '/path1/'; - - $this->server->setBaseUri('/path2/'); - $this->server->calculateUri($uri); - - } - - /** - */ - function testGuessBaseUri() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/root', - 'PATH_INFO' => '/root', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/index.php/', $server->guessBaseUri()); - - } - - /** - * @depends testGuessBaseUri - */ - function testGuessBaseUriPercentEncoding() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/dir/path2/path%20with%20spaces', - 'PATH_INFO' => '/dir/path2/path with spaces', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/index.php/', $server->guessBaseUri()); - - } - - /** - * @depends testGuessBaseUri - */ - /* - function testGuessBaseUriPercentEncoding2() { - - $this->markTestIncomplete('This behaviour is not yet implemented'); - $serverVars = [ - 'REQUEST_URI' => '/some%20directory+mixed/index.php/dir/path2/path%20with%20spaces', - 'PATH_INFO' => '/dir/path2/path with spaces', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/some%20directory+mixed/index.php/', $server->guessBaseUri()); - - }*/ - - function testGuessBaseUri2() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/root/', - 'PATH_INFO' => '/root/', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/index.php/', $server->guessBaseUri()); - - } - - function testGuessBaseUriNoPathInfo() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/root', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/', $server->guessBaseUri()); - - } - - function testGuessBaseUriNoPathInfo2() { - - $serverVars = [ - 'REQUEST_URI' => '/a/b/c/test.php', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/', $server->guessBaseUri()); - - } - - - /** - * @depends testGuessBaseUri - */ - function testGuessBaseUriQueryString() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/root?query_string=blabla', - 'PATH_INFO' => '/root', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $this->assertEquals('/index.php/', $server->guessBaseUri()); - - } - - /** - * @depends testGuessBaseUri - * @expectedException \Sabre\DAV\Exception - */ - function testGuessBaseUriBadConfig() { - - $serverVars = [ - 'REQUEST_URI' => '/index.php/root/heyyy', - 'PATH_INFO' => '/root', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $server = new Server(); - $server->httpRequest = $httpRequest; - - $server->guessBaseUri(); - - } - - function testTriggerException() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'FOO', - ]; - - $httpRequest = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = $httpRequest; - $this->server->on('beforeMethod', [$this, 'exceptionTrigger']); - $this->server->exec(); - - $this->assertEquals([ - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $this->assertEquals(500, $this->response->status); - - } - - function exceptionTrigger($request, $response) { - - throw new Exception('Hola'); - - } - - function testReportNotFound() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'REPORT', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->httpRequest->setBody('<?xml version="1.0"?><bla:myreport xmlns:bla="http://www.rooftopsolutions.nl/NS"></bla:myreport>'); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(415, $this->response->status, 'We got an incorrect status back. Full response body follows: ' . $this->response->body); - - } - - function testReportIntercepted() { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'REPORT', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $this->server->httpRequest = ($request); - $this->server->httpRequest->setBody('<?xml version="1.0"?><bla:myreport xmlns:bla="http://www.rooftopsolutions.nl/NS"></bla:myreport>'); - $this->server->on('report', [$this, 'reportHandler']); - $this->server->exec(); - - $this->assertEquals([ - 'X-Sabre-Version' => [Version::VERSION], - 'testheader' => ['testvalue'], - ], - $this->response->getHeaders() - ); - - $this->assertEquals(418, $this->response->status, 'We got an incorrect status back. Full response body follows: ' . $this->response->body); - - } - - function reportHandler($reportName, $result, $path) { - - if ($reportName == '{http://www.rooftopsolutions.nl/NS}myreport') { - $this->server->httpResponse->setStatus(418); - $this->server->httpResponse->setHeader('testheader', 'testvalue'); - return false; - } - else return; - - } - - function testGetPropertiesForChildren() { - - $result = $this->server->getPropertiesForChildren('', [ - '{DAV:}getcontentlength', - ]); - - $expected = [ - 'test.txt' => ['{DAV:}getcontentlength' => 13], - 'dir/' => [], - ]; - - $this->assertEquals($expected, $result); - - } - - /** - * There are certain cases where no HTTP status may be set. We need to - * intercept these and set it to a default error message. - */ - function testNoHTTPStatusSet() { - - $this->server->on('method:GET', function() { return false; }, 1); - $this->server->httpRequest = new HTTP\Request('GET', '/'); - $this->server->exec(); - $this->assertEquals(500, $this->response->getStatus()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php deleted file mode 100644 index 383f8e657ef..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/ServerUpdatePropertiesTest.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class ServerUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { - - function testUpdatePropertiesFail() { - - $tree = [ - new SimpleCollection('foo'), - ]; - $server = new Server($tree); - - $result = $server->updateProperties('foo', [ - '{DAV:}foo' => 'bar' - ]); - - $expected = [ - '{DAV:}foo' => 403, - ]; - $this->assertEquals($expected, $result); - - } - - function testUpdatePropertiesProtected() { - - $tree = [ - new SimpleCollection('foo'), - ]; - $server = new Server($tree); - - $server->on('propPatch', function($path, PropPatch $propPatch) { - $propPatch->handleRemaining(function() { return true; }); - }); - $result = $server->updateProperties('foo', [ - '{DAV:}getetag' => 'bla', - '{DAV:}foo' => 'bar' - ]); - - $expected = [ - '{DAV:}getetag' => 403, - '{DAV:}foo' => 424, - ]; - $this->assertEquals($expected, $result); - - } - - function testUpdatePropertiesEventFail() { - - $tree = [ - new SimpleCollection('foo'), - ]; - $server = new Server($tree); - $server->on('propPatch', function($path, PropPatch $propPatch) { - $propPatch->setResultCode('{DAV:}foo', 404); - $propPatch->handleRemaining(function() { return true; }); - }); - - $result = $server->updateProperties('foo', [ - '{DAV:}foo' => 'bar', - '{DAV:}foo2' => 'bla', - ]); - - $expected = [ - '{DAV:}foo' => 404, - '{DAV:}foo2' => 424, - ]; - $this->assertEquals($expected, $result); - - } - - function testUpdatePropertiesEventSuccess() { - - $tree = [ - new SimpleCollection('foo'), - ]; - $server = new Server($tree); - $server->on('propPatch', function($path, PropPatch $propPatch) { - - $propPatch->handle(['{DAV:}foo', '{DAV:}foo2'], function() { - return [ - '{DAV:}foo' => 200, - '{DAV:}foo2' => 201, - ]; - }); - - }); - - $result = $server->updateProperties('foo', [ - '{DAV:}foo' => 'bar', - '{DAV:}foo2' => 'bla', - ]); - - $expected = [ - '{DAV:}foo' => 200, - '{DAV:}foo2' => 201, - ]; - $this->assertEquals($expected, $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/PluginTest.php deleted file mode 100644 index 6aa09cac072..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/PluginTest.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php - -namespace Sabre\DAV\Sharing; - -use Sabre\DAV\Mock; -use Sabre\DAV\Xml\Property; - -class PluginTest extends \Sabre\DAVServerTest { - - protected $setupSharing = true; - protected $setupACL = true; - protected $autoLogin = 'admin'; - - function setUpTree() { - - $this->tree[] = new Mock\SharedNode( - 'shareable', - Plugin::ACCESS_READWRITE - ); - - } - - function testFeatures() { - - $this->assertEquals( - ['resource-sharing'], - $this->sharingPlugin->getFeatures() - ); - - } - - function testProperties() { - - $result = $this->server->getPropertiesForPath( - 'shareable', - ['{DAV:}share-access'] - ); - - $expected = [ - [ - 200 => [ - '{DAV:}share-access' => new Property\ShareAccess(Plugin::ACCESS_READWRITE) - ], - 404 => [], - 'href' => 'shareable', - ] - ]; - - $this->assertEquals( - $expected, - $result - ); - - } - - function testGetPluginInfo() { - - $result = $this->sharingPlugin->getPluginInfo(); - $this->assertInternalType('array', $result); - $this->assertEquals('sharing', $result['name']); - - } - - function testHtmlActionsPanel() { - - $node = new \Sabre\DAV\Mock\Collection('foo'); - $html = ''; - - $this->assertNull( - $this->sharingPlugin->htmlActionsPanel($node, $html, 'foo/bar') - ); - - $this->assertEquals( - '', - $html - ); - - $node = new \Sabre\DAV\Mock\SharedNode('foo', \Sabre\DAV\Sharing\Plugin::ACCESS_SHAREDOWNER); - $html = ''; - - $this->assertNull( - $this->sharingPlugin->htmlActionsPanel($node, $html, 'shareable') - ); - $this->assertContains( - 'Share this resource', - $html - ); - - } - - function testBrowserPostActionUnknownAction() { - - $this->assertNull($this->sharingPlugin->browserPostAction( - 'shareable', - 'foo', - [] - )); - - } - - function testBrowserPostActionSuccess() { - - $this->assertFalse($this->sharingPlugin->browserPostAction( - 'shareable', - 'share', - [ - 'access' => 'read', - 'href' => 'mailto:foo@example.org', - ] - )); - - $expected = [ - new \Sabre\DAV\Xml\Element\Sharee([ - 'href' => 'mailto:foo@example.org', - 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ, - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_NORESPONSE, - ]) - ]; - $this->assertEquals( - $expected, - $this->tree[0]->getInvites() - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testBrowserPostActionNoHref() { - - $this->sharingPlugin->browserPostAction( - 'shareable', - 'share', - [ - 'access' => 'read', - ] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testBrowserPostActionNoAccess() { - - $this->sharingPlugin->browserPostAction( - 'shareable', - 'share', - [ - 'href' => 'mailto:foo@example.org', - ] - ); - - } - - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testBrowserPostActionBadAccess() { - - $this->sharingPlugin->browserPostAction( - 'shareable', - 'share', - [ - 'href' => 'mailto:foo@example.org', - 'access' => 'bleed', - ] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testBrowserPostActionAccessDenied() { - - $this->aclPlugin->setDefaultAcl([]); - $this->sharingPlugin->browserPostAction( - 'shareable', - 'share', - [ - 'access' => 'read', - 'href' => 'mailto:foo@example.org', - ] - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/ShareResourceTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/ShareResourceTest.php deleted file mode 100644 index 959811166eb..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sharing/ShareResourceTest.php +++ /dev/null @@ -1,210 +0,0 @@ -<?php - -namespace Sabre\DAV\Sharing; - -use Sabre\DAV\Mock; -use Sabre\DAV\Xml\Element\Sharee; -use Sabre\HTTP\Request; - -class ShareResourceTest extends \Sabre\DAVServerTest { - - protected $setupSharing = true; - protected $sharingNodeMock; - - function setUpTree() { - - $this->tree[] = $this->sharingNodeMock = new Mock\SharedNode( - 'shareable', - Plugin::ACCESS_SHAREDOWNER - ); - - } - - function testShareResource() { - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:share-resource xmlns:D="DAV:"> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> - </D:sharee> -</D:share-resource> -XML; - $request = new Request('POST', '/shareable', ['Content-Type' => 'application/davsharing+xml; charset="utf-8"'], $body); - - $response = $this->request($request); - $this->assertEquals(200, $response->getStatus(), (string)$response->getBodyAsString()); - - $expected = [ - new Sharee([ - 'href' => 'mailto:eric@example.com', - 'properties' => [ - '{DAV:}displayname' => 'Eric York', - ], - 'access' => Plugin::ACCESS_READWRITE, - 'comment' => 'Shared workspace', - 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_NORESPONSE, - ]) - ]; - - $this->assertEquals( - $expected, - $this->sharingNodeMock->getInvites() - ); - - } - - /** - * @depends testShareResource - */ - function testShareResourceRemoveAccess() { - - // First we just want to execute all the actions from the first - // test. - $this->testShareResource(); - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:share-resource xmlns:D="DAV:"> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:share-access> - <D:no-access /> - </D:share-access> - </D:sharee> -</D:share-resource> -XML; - $request = new Request('POST', '/shareable', ['Content-Type' => 'application/davsharing+xml; charset="utf-8"'], $body); - - $response = $this->request($request); - $this->assertEquals(200, $response->getStatus(), (string)$response->getBodyAsString()); - - $expected = []; - - $this->assertEquals( - $expected, - $this->sharingNodeMock->getInvites() - ); - - - } - - /** - * @depends testShareResource - */ - function testShareResourceInviteProperty() { - - // First we just want to execute all the actions from the first - // test. - $this->testShareResource(); - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:propfind xmlns:D="DAV:"> - <D:prop> - <D:invite /> - <D:share-access /> - <D:share-resource-uri /> - </D:prop> -</D:propfind> -XML; - $request = new Request('PROPFIND', '/shareable', ['Content-Type' => 'application/xml'], $body); - $response = $this->request($request); - - $this->assertEquals(207, $response->getStatus()); - - $expected = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:response> - <d:href>/shareable</d:href> - <d:propstat> - <d:prop> - <d:invite> - <d:sharee> - <d:href>mailto:eric@example.com</d:href> - <d:prop> - <d:displayname>Eric York</d:displayname> - </d:prop> - <d:share-access><d:read-write /></d:share-access> - <d:invite-noresponse /> - </d:sharee> - </d:invite> - <d:share-access><d:shared-owner /></d:share-access> - <d:share-resource-uri><d:href>urn:example:bar</d:href></d:share-resource-uri> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $response->getBodyAsString()); - - } - - function testShareResourceNotFound() { - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:share-resource xmlns:D="DAV:"> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> - </D:sharee> -</D:share-resource> -XML; - $request = new Request('POST', '/not-found', ['Content-Type' => 'application/davsharing+xml; charset="utf-8"'], $body); - - $response = $this->request($request, 404); - - } - - function testShareResourceNotISharedNode() { - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:share-resource xmlns:D="DAV:"> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> - </D:sharee> -</D:share-resource> -XML; - $request = new Request('POST', '/', ['Content-Type' => 'application/davsharing+xml; charset="utf-8"'], $body); - - $response = $this->request($request, 403); - - } - - function testShareResourceUnknownDoc() { - - $body = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:blablabla xmlns:D="DAV:" /> -XML; - $request = new Request('POST', '/shareable', ['Content-Type' => 'application/davsharing+xml; charset="utf-8"'], $body); - $response = $this->request($request, 400); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SimpleFileTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SimpleFileTest.php deleted file mode 100644 index 15ccfaf9e36..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SimpleFileTest.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class SimpleFileTest extends \PHPUnit_Framework_TestCase { - - function testAll() { - - $file = new SimpleFile('filename.txt', 'contents', 'text/plain'); - - $this->assertEquals('filename.txt', $file->getName()); - $this->assertEquals('contents', $file->get()); - $this->assertEquals(8, $file->getSize()); - $this->assertEquals('"' . sha1('contents') . '"', $file->getETag()); - $this->assertEquals('text/plain', $file->getContentType()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/StringUtilTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/StringUtilTest.php deleted file mode 100644 index e98fe904884..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/StringUtilTest.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class StringUtilTest extends \PHPUnit_Framework_TestCase { - - /** - * @param string $haystack - * @param string $needle - * @param string $collation - * @param string $matchType - * @param string $result - * @throws Exception\BadRequest - * - * @dataProvider dataset - */ - function testTextMatch($haystack, $needle, $collation, $matchType, $result) { - - $this->assertEquals($result, StringUtil::textMatch($haystack, $needle, $collation, $matchType)); - - } - - function dataset() { - - return [ - ['FOOBAR', 'FOO', 'i;octet', 'contains', true], - ['FOOBAR', 'foo', 'i;octet', 'contains', false], - ['FÖÖBAR', 'FÖÖ', 'i;octet', 'contains', true], - ['FÖÖBAR', 'föö', 'i;octet', 'contains', false], - ['FOOBAR', 'FOOBAR', 'i;octet', 'equals', true], - ['FOOBAR', 'fooBAR', 'i;octet', 'equals', false], - ['FOOBAR', 'FOO', 'i;octet', 'starts-with', true], - ['FOOBAR', 'foo', 'i;octet', 'starts-with', false], - ['FOOBAR', 'BAR', 'i;octet', 'starts-with', false], - ['FOOBAR', 'bar', 'i;octet', 'starts-with', false], - ['FOOBAR', 'FOO', 'i;octet', 'ends-with', false], - ['FOOBAR', 'foo', 'i;octet', 'ends-with', false], - ['FOOBAR', 'BAR', 'i;octet', 'ends-with', true], - ['FOOBAR', 'bar', 'i;octet', 'ends-with', false], - - ['FOOBAR', 'FOO', 'i;ascii-casemap', 'contains', true], - ['FOOBAR', 'foo', 'i;ascii-casemap', 'contains', true], - ['FÖÖBAR', 'FÖÖ', 'i;ascii-casemap', 'contains', true], - ['FÖÖBAR', 'föö', 'i;ascii-casemap', 'contains', false], - ['FOOBAR', 'FOOBAR', 'i;ascii-casemap', 'equals', true], - ['FOOBAR', 'fooBAR', 'i;ascii-casemap', 'equals', true], - ['FOOBAR', 'FOO', 'i;ascii-casemap', 'starts-with', true], - ['FOOBAR', 'foo', 'i;ascii-casemap', 'starts-with', true], - ['FOOBAR', 'BAR', 'i;ascii-casemap', 'starts-with', false], - ['FOOBAR', 'bar', 'i;ascii-casemap', 'starts-with', false], - ['FOOBAR', 'FOO', 'i;ascii-casemap', 'ends-with', false], - ['FOOBAR', 'foo', 'i;ascii-casemap', 'ends-with', false], - ['FOOBAR', 'BAR', 'i;ascii-casemap', 'ends-with', true], - ['FOOBAR', 'bar', 'i;ascii-casemap', 'ends-with', true], - - ['FOOBAR', 'FOO', 'i;unicode-casemap', 'contains', true], - ['FOOBAR', 'foo', 'i;unicode-casemap', 'contains', true], - ['FÖÖBAR', 'FÖÖ', 'i;unicode-casemap', 'contains', true], - ['FÖÖBAR', 'föö', 'i;unicode-casemap', 'contains', true], - ['FOOBAR', 'FOOBAR', 'i;unicode-casemap', 'equals', true], - ['FOOBAR', 'fooBAR', 'i;unicode-casemap', 'equals', true], - ['FOOBAR', 'FOO', 'i;unicode-casemap', 'starts-with', true], - ['FOOBAR', 'foo', 'i;unicode-casemap', 'starts-with', true], - ['FOOBAR', 'BAR', 'i;unicode-casemap', 'starts-with', false], - ['FOOBAR', 'bar', 'i;unicode-casemap', 'starts-with', false], - ['FOOBAR', 'FOO', 'i;unicode-casemap', 'ends-with', false], - ['FOOBAR', 'foo', 'i;unicode-casemap', 'ends-with', false], - ['FOOBAR', 'BAR', 'i;unicode-casemap', 'ends-with', true], - ['FOOBAR', 'bar', 'i;unicode-casemap', 'ends-with', true], - ]; - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testBadCollation() { - - StringUtil::textMatch('foobar', 'foo', 'blabla', 'contains'); - - } - - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testBadMatchType() { - - StringUtil::textMatch('foobar', 'foo', 'i;octet', 'booh'); - - } - - function testEnsureUTF8_ascii() { - - $inputString = "harkema"; - $outputString = "harkema"; - - $this->assertEquals( - $outputString, - StringUtil::ensureUTF8($inputString) - ); - - } - - function testEnsureUTF8_latin1() { - - $inputString = "m\xfcnster"; - $outputString = "münster"; - - $this->assertEquals( - $outputString, - StringUtil::ensureUTF8($inputString) - ); - - } - - function testEnsureUTF8_utf8() { - - $inputString = "m\xc3\xbcnster"; - $outputString = "münster"; - - $this->assertEquals( - $outputString, - StringUtil::ensureUTF8($inputString) - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/MockSyncCollection.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/MockSyncCollection.php deleted file mode 100644 index aac1dee489b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/MockSyncCollection.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php - -namespace Sabre\DAV\Sync; - -use Sabre\DAV; - -/** - * This mocks a ISyncCollection, for unittesting. - * - * This object behaves the same as SimpleCollection. Call addChange to update - * the 'changelog' that this class uses for the collection. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class MockSyncCollection extends DAV\SimpleCollection implements ISyncCollection { - - public $changeLog = []; - - public $token = null; - - /** - * This method returns the current sync-token for this collection. - * This can be any string. - * - * If null is returned from this function, the plugin assumes there's no - * sync information available. - * - * @return string|null - */ - function getSyncToken() { - - // Will be 'null' in the first round, and will increment ever after. - return $this->token; - - } - - function addChange(array $added, array $modified, array $deleted) { - - $this->token++; - $this->changeLog[$this->token] = [ - 'added' => $added, - 'modified' => $modified, - 'deleted' => $deleted, - ]; - - } - - /** - * The getChanges method returns all the changes that have happened, since - * the specified syncToken and the current collection. - * - * This function should return an array, such as the following: - * - * array( - * 'syncToken' => 'The current synctoken', - * 'modified' => array( - * 'new.txt', - * ), - * 'deleted' => array( - * 'foo.php.bak', - * 'old.txt' - * ) - * ); - * - * The syncToken property should reflect the *current* syncToken of the - * collection, as reported getSyncToken(). This is needed here too, to - * ensure the operation is atomic. - * - * If the syncToken is specified as null, this is an initial sync, and all - * members should be reported. - * - * The modified property is an array of nodenames that have changed since - * the last token. - * - * The deleted property is an array with nodenames, that have been deleted - * from collection. - * - * The second argument is basically the 'depth' of the report. If it's 1, - * you only have to report changes that happened only directly in immediate - * descendants. If it's 2, it should also include changes from the nodes - * below the child collections. (grandchildren) - * - * The third (optional) argument allows a client to specify how many - * results should be returned at most. If the limit is not specified, it - * should be treated as infinite. - * - * If the limit (infinite or not) is higher than you're willing to return, - * you should throw a Sabre\DAV\Exception\TooMuchMatches() exception. - * - * If the syncToken is expired (due to data cleanup) or unknown, you must - * return null. - * - * The limit is 'suggestive'. You are free to ignore it. - * - * @param string $syncToken - * @param int $syncLevel - * @param int $limit - * @return array - */ - function getChanges($syncToken, $syncLevel, $limit = null) { - - // This is an initial sync - if (is_null($syncToken)) { - return [ - 'added' => array_map( - function($item) { - return $item->getName(); - }, $this->getChildren() - ), - 'modified' => [], - 'deleted' => [], - 'syncToken' => $this->getSyncToken(), - ]; - } - - if (!is_int($syncToken) && !ctype_digit($syncToken)) { - - return null; - - } - if (is_null($this->token)) return null; - - $added = []; - $modified = []; - $deleted = []; - - foreach ($this->changeLog as $token => $change) { - - if ($token > $syncToken) { - - $added = array_merge($added, $change['added']); - $modified = array_merge($modified, $change['modified']); - $deleted = array_merge($deleted, $change['deleted']); - - if ($limit) { - // If there's a limit, we may need to cut things off. - // This alghorithm is weird and stupid, but it works. - $left = $limit - (count($modified) + count($deleted)); - if ($left > 0) continue; - if ($left === 0) break; - if ($left < 0) { - $modified = array_slice($modified, 0, $left); - } - $left = $limit - (count($modified) + count($deleted)); - if ($left === 0) break; - if ($left < 0) { - $deleted = array_slice($deleted, 0, $left); - } - break; - - } - - } - - } - - return [ - 'syncToken' => $this->token, - 'added' => $added, - 'modified' => $modified, - 'deleted' => $deleted, - ]; - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/PluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/PluginTest.php deleted file mode 100644 index 6bcec8b7535..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Sync/PluginTest.php +++ /dev/null @@ -1,523 +0,0 @@ -<?php - -namespace Sabre\DAV\Sync; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once __DIR__ . '/MockSyncCollection.php'; - -class PluginTest extends \Sabre\DAVServerTest { - - protected $collection; - - function setUp() { - - parent::setUp(); - $this->server->addPlugin(new Plugin()); - - } - - function testGetInfo() { - - $this->assertArrayHasKey( - 'name', - (new Plugin())->getPluginInfo() - ); - - } - - function setUpTree() { - - $this->collection = - new MockSyncCollection('coll', [ - new DAV\SimpleFile('file1.txt', 'foo'), - new DAV\SimpleFile('file2.txt', 'bar'), - ]); - $this->tree = [ - $this->collection, - new DAV\SimpleCollection('normalcoll', []) - ]; - - } - - function testSupportedReportSet() { - - $result = $this->server->getProperties('/coll', ['{DAV:}supported-report-set']); - $this->assertFalse($result['{DAV:}supported-report-set']->has('{DAV:}sync-collection')); - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - - $result = $this->server->getProperties('/coll', ['{DAV:}supported-report-set']); - $this->assertTrue($result['{DAV:}supported-report-set']->has('{DAV:}sync-collection')); - - } - - function testGetSyncToken() { - - $result = $this->server->getProperties('/coll', ['{DAV:}sync-token']); - $this->assertFalse(isset($result['{DAV:}sync-token'])); - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - - $result = $this->server->getProperties('/coll', ['{DAV:}sync-token']); - $this->assertTrue(isset($result['{DAV:}sync-token'])); - - // non-sync-enabled collection - $this->collection->addChange(['file1.txt'], [], []); - - $result = $this->server->getProperties('/normalcoll', ['{DAV:}sync-token']); - $this->assertFalse(isset($result['{DAV:}sync-token'])); - } - - function testSyncInitialSyncCollection() { - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - - $request = new HTTP\Request('REPORT', '/coll/', ['Content-Type' => 'application/xml']); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token/> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - $this->assertEquals(207, $response->status, 'Full response body:' . $response->body); - - $multiStatus = $this->server->xml->parse($response->getBodyAsString()); - - // Checking the sync-token - $this->assertEquals( - 'http://sabre.io/ns/sync/1', - $multiStatus->getSyncToken() - ); - - $responses = $multiStatus->getResponses(); - $this->assertEquals(2, count($responses), 'We expected exactly 2 {DAV:}response'); - - $response = $responses[0]; - - $this->assertNull($response->getHttpStatus()); - $this->assertEquals('/coll/file1.txt', $response->getHref()); - $this->assertEquals([ - 200 => [ - '{DAV:}getcontentlength' => 3, - ] - ], $response->getResponseProperties()); - - $response = $responses[1]; - - $this->assertNull($response->getHttpStatus()); - $this->assertEquals('/coll/file2.txt', $response->getHref()); - $this->assertEquals([ - 200 => [ - '{DAV:}getcontentlength' => 3, - ] - ], $response->getResponseProperties()); - - } - - function testSubsequentSyncSyncCollection() { - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - // Making another change - $this->collection->addChange([], ['file2.txt'], ['file3.txt']); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token> - <D:sync-level>infinite</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - $this->assertEquals(207, $response->status, 'Full response body:' . $response->body); - - $multiStatus = $this->server->xml->parse($response->getBodyAsString()); - - // Checking the sync-token - $this->assertEquals( - 'http://sabre.io/ns/sync/2', - $multiStatus->getSyncToken() - ); - - $responses = $multiStatus->getResponses(); - $this->assertEquals(2, count($responses), 'We expected exactly 2 {DAV:}response'); - - $response = $responses[0]; - - $this->assertNull($response->getHttpStatus()); - $this->assertEquals('/coll/file2.txt', $response->getHref()); - $this->assertEquals([ - 200 => [ - '{DAV:}getcontentlength' => 3, - ] - ], $response->getResponseProperties()); - - $response = $responses[1]; - - $this->assertEquals('404', $response->getHttpStatus()); - $this->assertEquals('/coll/file3.txt', $response->getHref()); - $this->assertEquals([], $response->getResponseProperties()); - - } - - function testSubsequentSyncSyncCollectionLimit() { - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - // Making another change - $this->collection->addChange([], ['file2.txt'], ['file3.txt']); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token> - <D:sync-level>infinite</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> - <D:limit><D:nresults>1</D:nresults></D:limit> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - $this->assertEquals(207, $response->status, 'Full response body:' . $response->body); - - $multiStatus = $this->server->xml->parse( - $response->getBodyAsString() - ); - - // Checking the sync-token - $this->assertEquals( - 'http://sabre.io/ns/sync/2', - $multiStatus->getSyncToken() - ); - - $responses = $multiStatus->getResponses(); - $this->assertEquals(1, count($responses), 'We expected exactly 1 {DAV:}response'); - - $response = $responses[0]; - - $this->assertEquals('404', $response->getHttpStatus()); - $this->assertEquals('/coll/file3.txt', $response->getHref()); - $this->assertEquals([], $response->getResponseProperties()); - - } - - function testSubsequentSyncSyncCollectionDepthFallBack() { - - // Making a change - $this->collection->addChange(['file1.txt'], [], []); - // Making another change - $this->collection->addChange([], ['file2.txt'], ['file3.txt']); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - 'HTTP_DEPTH' => "1", - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - $this->assertEquals(207, $response->status, 'Full response body:' . $response->body); - - $multiStatus = $this->server->xml->parse( - $response->getBodyAsString() - ); - - // Checking the sync-token - $this->assertEquals( - 'http://sabre.io/ns/sync/2', - $multiStatus->getSyncToken() - ); - - $responses = $multiStatus->getResponses(); - $this->assertEquals(2, count($responses), 'We expected exactly 2 {DAV:}response'); - - $response = $responses[0]; - - $this->assertNull($response->getHttpStatus()); - $this->assertEquals('/coll/file2.txt', $response->getHref()); - $this->assertEquals([ - 200 => [ - '{DAV:}getcontentlength' => 3, - ] - ], $response->getResponseProperties()); - - $response = $responses[1]; - - $this->assertEquals('404', $response->getHttpStatus()); - $this->assertEquals('/coll/file3.txt', $response->getHref()); - $this->assertEquals([], $response->getResponseProperties()); - - } - - function testSyncNoSyncInfo() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token/> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(415, $response->status, 'Full response body:' . $response->body); - - } - - function testSyncNoSyncCollection() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/normalcoll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token/> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(415, $response->status, 'Full response body:' . $response->body); - - } - - function testSyncInvalidToken() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token>http://sabre.io/ns/sync/invalid</D:sync-token> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(403, $response->status, 'Full response body:' . $response->body); - - } - function testSyncInvalidTokenNoPrefix() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token>invalid</D:sync-token> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(403, $response->status, 'Full response body:' . $response->body); - - } - - function testSyncNoSyncToken() { - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-level>1</D:sync-level> - <D:prop> - <D:getcontentlength/> - </D:prop> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(400, $response->status, 'Full response body:' . $response->body); - - } - - function testSyncNoProp() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/coll/', - 'CONTENT_TYPE' => 'application/xml', - ]); - - $body = <<<BLA -<?xml version="1.0" encoding="utf-8" ?> -<D:sync-collection xmlns:D="DAV:"> - <D:sync-token /> - <D:sync-level>1</D:sync-level> -</D:sync-collection> -BLA; - - $request->setBody($body); - - $response = $this->request($request); - - // The default state has no sync-token, so this report should not yet - // be supported. - $this->assertEquals(400, $response->status, 'Full response body:' . $response->body); - - } - - function testIfConditions() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'DELETE', - 'REQUEST_URI' => '/coll/file1.txt', - 'HTTP_IF' => '</coll> (<http://sabre.io/ns/sync/1>)', - ]); - $response = $this->request($request); - - // If a 403 is thrown this works correctly. The file in questions - // doesn't allow itself to be deleted. - // If the If conditions failed, it would have been a 412 instead. - $this->assertEquals(403, $response->status); - - } - - function testIfConditionsNot() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'DELETE', - 'REQUEST_URI' => '/coll/file1.txt', - 'HTTP_IF' => '</coll> (Not <http://sabre.io/ns/sync/2>)', - ]); - $response = $this->request($request); - - // If a 403 is thrown this works correctly. The file in questions - // doesn't allow itself to be deleted. - // If the If conditions failed, it would have been a 412 instead. - $this->assertEquals(403, $response->status); - - } - - function testIfConditionsNoSyncToken() { - - $this->collection->addChange(['file1.txt'], [], []); - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'DELETE', - 'REQUEST_URI' => '/coll/file1.txt', - 'HTTP_IF' => '</coll> (<opaquelocktoken:foo>)', - ]); - $response = $this->request($request); - - $this->assertEquals(412, $response->status); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SyncTokenPropertyTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SyncTokenPropertyTest.php deleted file mode 100644 index ff139f78c41..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/SyncTokenPropertyTest.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class SyncTokenPropertyTest extends \Sabre\DAVServerTest { - - /** - * The assumption in these tests is that a PROPFIND is going on, and to - * fetch the sync-token, the event handler is just able to use the existing - * result. - * - * @param string $name - * @param mixed $value - * - * @dataProvider data - */ - function testAlreadyThere1($name, $value) { - - $propFind = new PropFind('foo', [ - '{http://calendarserver.org/ns/}getctag', - $name, - ]); - - $propFind->set($name, $value); - $corePlugin = new CorePlugin(); - $corePlugin->propFindLate($propFind, new SimpleCollection('hi')); - - $this->assertEquals("hello", $propFind->get('{http://calendarserver.org/ns/}getctag')); - - } - - /** - * In these test-cases, the plugin is forced to do a local propfind to - * fetch the items. - * - * @param string $name - * @param mixed $value - * - * @dataProvider data - */ - function testRefetch($name, $value) { - - $this->server->tree = new Tree( - new SimpleCollection('root', [ - new Mock\PropertiesCollection( - 'foo', - [], - [$name => $value] - ) - ]) - ); - $propFind = new PropFind('foo', [ - '{http://calendarserver.org/ns/}getctag', - $name, - ]); - - $corePlugin = $this->server->getPlugin('core'); - $corePlugin->propFindLate($propFind, new SimpleCollection('hi')); - - $this->assertEquals("hello", $propFind->get('{http://calendarserver.org/ns/}getctag')); - - } - - function testNoData() { - - $this->server->tree = new Tree( - new SimpleCollection('root', [ - new Mock\PropertiesCollection( - 'foo', - [], - [] - ) - ]) - ); - - $propFind = new PropFind('foo', [ - '{http://calendarserver.org/ns/}getctag', - ]); - - $corePlugin = $this->server->getPlugin('core'); - $corePlugin->propFindLate($propFind, new SimpleCollection('hi')); - - $this->assertNull($propFind->get('{http://calendarserver.org/ns/}getctag')); - - } - - function data() { - - return [ - [ - '{http://sabredav.org/ns}sync-token', - "hello" - ], - [ - '{DAV:}sync-token', - "hello" - ], - [ - '{DAV:}sync-token', - new Xml\Property\Href(Sync\Plugin::SYNCTOKEN_PREFIX . "hello", false) - ] - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php deleted file mode 100644 index 6acd6b077b8..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TemporaryFileFilterTest.php +++ /dev/null @@ -1,199 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP; - -class TemporaryFileFilterTest extends AbstractServer { - - function setUp() { - - parent::setUp(); - $plugin = new TemporaryFileFilterPlugin(SABRE_TEMPDIR . '/tff'); - $this->server->addPlugin($plugin); - - } - - function testPutNormal() { - - $request = new HTTP\Request('PUT', '/testput.txt', [], 'Testing new file'); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals('0', $this->response->getHeader('Content-Length')); - - $this->assertEquals('Testing new file', file_get_contents(SABRE_TEMPDIR . '/testput.txt')); - - } - - function testPutTemp() { - - // mimicking an OS/X resource fork - $request = new HTTP\Request('PUT', '/._testput.txt', [], 'Testing new file'); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/._testput.txt'), '._testput.txt should not exist in the regular file structure.'); - - } - - function testPutTempIfNoneMatch() { - - // mimicking an OS/X resource fork - $request = new HTTP\Request('PUT', '/._testput.txt', ['If-None-Match' => '*'], 'Testing new file'); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/._testput.txt'), '._testput.txt should not exist in the regular file structure.'); - - - $this->server->exec(); - - $this->assertEquals(412, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - } - - function testPutGet() { - - // mimicking an OS/X resource fork - $request = new HTTP\Request('PUT', '/._testput.txt', [], 'Testing new file'); - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $request = new HTTP\Request('GET', '/._testput.txt'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(200, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - 'Content-Length' => [16], - 'Content-Type' => ['application/octet-stream'], - ], $this->response->getHeaders()); - - $this->assertEquals('Testing new file', stream_get_contents($this->response->body)); - - } - - function testLockNonExistant() { - - mkdir(SABRE_TEMPDIR . '/locksdir'); - $locksBackend = new Locks\Backend\File(SABRE_TEMPDIR . '/locks'); - $locksPlugin = new Locks\Plugin($locksBackend); - $this->server->addPlugin($locksPlugin); - - // mimicking an OS/X resource fork - $request = new HTTP\Request('LOCK', '/._testput.txt'); - $request->setBody('<?xml version="1.0"?> -<D:lockinfo xmlns:D="DAV:"> - <D:lockscope><D:exclusive/></D:lockscope> - <D:locktype><D:write/></D:locktype> - <D:owner> - <D:href>http://example.org/~ejw/contact.html</D:href> - </D:owner> -</D:lockinfo>'); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(201, $this->response->status); - $this->assertEquals('application/xml; charset=utf-8', $this->response->getHeader('Content-Type')); - $this->assertTrue(preg_match('/^<opaquelocktoken:(.*)>$/', $this->response->getHeader('Lock-Token')) === 1, 'We did not get a valid Locktoken back (' . $this->response->getHeader('Lock-Token') . ')'); - $this->assertEquals('true', $this->response->getHeader('X-Sabre-Temp')); - - $this->assertFalse(file_exists(SABRE_TEMPDIR . '/._testlock.txt'), '._testlock.txt should not exist in the regular file structure.'); - - } - - function testPutDelete() { - - // mimicking an OS/X resource fork - $request = new HTTP\Request('PUT', '/._testput.txt', [], 'Testing new file'); - - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $request = new HTTP\Request('DELETE', '/._testput.txt'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals(204, $this->response->status, "Incorrect status code received. Full body:\n" . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $this->assertEquals('', $this->response->body); - - } - - function testPutPropfind() { - - // mimicking an OS/X resource fork - $request = new HTTP\Request('PUT', '/._testput.txt', [], 'Testing new file'); - $this->server->httpRequest = $request; - $this->server->exec(); - - $this->assertEquals('', $this->response->body); - $this->assertEquals(201, $this->response->status); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - ], $this->response->getHeaders()); - - $request = new HTTP\Request('PROPFIND', '/._testput.txt'); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - $this->assertEquals(207, $this->response->status, 'Incorrect status code returned. Body: ' . $this->response->body); - $this->assertEquals([ - 'X-Sabre-Temp' => ['true'], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $this->response->getHeaders()); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - list($data) = $xml->xpath('/d:multistatus/d:response/d:href'); - $this->assertEquals('/._testput.txt', (string)$data, 'href element should have been /._testput.txt'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:resourcetype'); - $this->assertEquals(1, count($data)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TestPlugin.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TestPlugin.php deleted file mode 100644 index 619ac03fd73..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TestPlugin.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Sabre\DAV; - -use Sabre\HTTP\RequestInterface; -use Sabre\HTTP\ResponseInterface; - -class TestPlugin extends ServerPlugin { - - public $beforeMethod; - - function getFeatures() { - - return ['drinking']; - - } - - function getHTTPMethods($uri) { - - return ['BEER','WINE']; - - } - - function initialize(Server $server) { - - $server->on('beforeMethod', [$this, 'beforeMethod']); - - } - - function beforeMethod(RequestInterface $request, ResponseInterface $response) { - - $this->beforeMethod = $request->getMethod(); - return true; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TreeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TreeTest.php deleted file mode 100644 index e719e38d59d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/TreeTest.php +++ /dev/null @@ -1,242 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class TreeTest extends \PHPUnit_Framework_TestCase { - - function testNodeExists() { - - $tree = new TreeMock(); - - $this->assertTrue($tree->nodeExists('hi')); - $this->assertFalse($tree->nodeExists('hello')); - - } - - function testCopy() { - - $tree = new TreeMock(); - $tree->copy('hi', 'hi2'); - - $this->assertArrayHasKey('hi2', $tree->getNodeForPath('')->newDirectories); - $this->assertEquals('foobar', $tree->getNodeForPath('hi/file')->get()); - $this->assertEquals(['test1' => 'value'], $tree->getNodeForPath('hi/file')->getProperties([])); - - } - - function testMove() { - - $tree = new TreeMock(); - $tree->move('hi', 'hi2'); - - $this->assertEquals('hi2', $tree->getNodeForPath('hi')->getName()); - $this->assertTrue($tree->getNodeForPath('hi')->isRenamed); - - } - - function testDeepMove() { - - $tree = new TreeMock(); - $tree->move('hi/sub', 'hi2'); - - $this->assertArrayHasKey('hi2', $tree->getNodeForPath('')->newDirectories); - $this->assertTrue($tree->getNodeForPath('hi/sub')->isDeleted); - - } - - function testDelete() { - - $tree = new TreeMock(); - $tree->delete('hi'); - $this->assertTrue($tree->getNodeForPath('hi')->isDeleted); - - } - - function testGetChildren() { - - $tree = new TreeMock(); - $children = $tree->getChildren(''); - $this->assertEquals(2, count($children)); - $this->assertEquals('hi', $children[0]->getName()); - - } - - function testGetMultipleNodes() { - - $tree = new TreeMock(); - $result = $tree->getMultipleNodes(['hi/sub', 'hi/file']); - $this->assertArrayHasKey('hi/sub', $result); - $this->assertArrayHasKey('hi/file', $result); - - $this->assertEquals('sub', $result['hi/sub']->getName()); - $this->assertEquals('file', $result['hi/file']->getName()); - - } - function testGetMultipleNodes2() { - - $tree = new TreeMock(); - $result = $tree->getMultipleNodes(['multi/1', 'multi/2']); - $this->assertArrayHasKey('multi/1', $result); - $this->assertArrayHasKey('multi/2', $result); - - } - -} - -class TreeMock extends Tree { - - private $nodes = []; - - function __construct() { - - $file = new TreeFileTester('file'); - $file->properties = ['test1' => 'value']; - $file->data = 'foobar'; - - parent::__construct( - new TreeDirectoryTester('root', [ - new TreeDirectoryTester('hi', [ - new TreeDirectoryTester('sub'), - $file, - ]), - new TreeMultiGetTester('multi', [ - new TreeFileTester('1'), - new TreeFileTester('2'), - new TreeFileTester('3'), - ]) - ]) - ); - - } - -} - -class TreeDirectoryTester extends SimpleCollection { - - public $newDirectories = []; - public $newFiles = []; - public $isDeleted = false; - public $isRenamed = false; - - function createDirectory($name) { - - $this->newDirectories[$name] = true; - - } - - function createFile($name, $data = null) { - - $this->newFiles[$name] = $data; - - } - - function getChild($name) { - - if (isset($this->newDirectories[$name])) return new self($name); - if (isset($this->newFiles[$name])) return new TreeFileTester($name, $this->newFiles[$name]); - return parent::getChild($name); - - } - - function childExists($name) { - - return !!$this->getChild($name); - - } - - function delete() { - - $this->isDeleted = true; - - } - - function setName($name) { - - $this->isRenamed = true; - $this->name = $name; - - } - -} - -class TreeFileTester extends File implements IProperties { - - public $name; - public $data; - public $properties; - - function __construct($name, $data = null) { - - $this->name = $name; - if (is_null($data)) $data = 'bla'; - $this->data = $data; - - } - - function getName() { - - return $this->name; - - } - - function get() { - - return $this->data; - - } - - function getProperties($properties) { - - return $this->properties; - - } - - /** - * Updates properties on this node. - * - * This method received a PropPatch object, which contains all the - * information about the update. - * - * To update specific properties, call the 'handle' method on this object. - * Read the PropPatch documentation for more information. - * - * @param PropPatch $propPatch - * @return void - */ - function propPatch(PropPatch $propPatch) { - - $this->properties = $propPatch->getMutations(); - $propPatch->setRemainingResultCode(200); - - } - -} - -class TreeMultiGetTester extends TreeDirectoryTester implements IMultiGet { - - /** - * This method receives a list of paths in it's first argument. - * It must return an array with Node objects. - * - * If any children are not found, you do not have to return them. - * - * @param array $paths - * @return array - */ - function getMultipleChildren(array $paths) { - - $result = []; - foreach ($paths as $path) { - try { - $child = $this->getChild($path); - $result[] = $child; - } catch (Exception\NotFound $e) { - // Do nothing - } - } - - return $result; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/UUIDUtilTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/UUIDUtilTest.php deleted file mode 100644 index f005ecc75f0..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/UUIDUtilTest.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -namespace Sabre\DAV; - -class UUIDUtilTest extends \PHPUnit_Framework_TestCase { - - function testValidateUUID() { - - $this->assertTrue( - UUIDUtil::validateUUID('11111111-2222-3333-4444-555555555555') - ); - $this->assertFalse( - UUIDUtil::validateUUID(' 11111111-2222-3333-4444-555555555555') - ); - $this->assertTrue( - UUIDUtil::validateUUID('ffffffff-2222-3333-4444-555555555555') - ); - $this->assertFalse( - UUIDUtil::validateUUID('fffffffg-2222-3333-4444-555555555555') - ); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/PropTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/PropTest.php deleted file mode 100644 index 7cc10650cba..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/PropTest.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Element; - -use Sabre\DAV\Xml\Property\Complex; -use Sabre\DAV\Xml\Property\Href; -use Sabre\DAV\Xml\XmlTest; - -class PropTest extends XmlTest { - - function testDeserializeSimple() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo>bar</foo> -</root> -XML; - - $expected = [ - '{DAV:}foo' => 'bar', - ]; - - $this->assertDecodeProp($input, $expected); - - } - function testDeserializeEmpty() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:" /> -XML; - - $expected = [ - ]; - - $this->assertDecodeProp($input, $expected); - - } - function testDeserializeComplex() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo><no>yes</no></foo> -</root> -XML; - - $expected = [ - '{DAV:}foo' => new Complex('<no xmlns="DAV:">yes</no>') - ]; - - $this->assertDecodeProp($input, $expected); - - } - function testDeserializeCustom() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo><href>/hello</href></foo> -</root> -XML; - - $expected = [ - '{DAV:}foo' => new Href('/hello', false) - ]; - - $elementMap = [ - '{DAV:}foo' => 'Sabre\DAV\Xml\Property\Href' - ]; - - $this->assertDecodeProp($input, $expected, $elementMap); - - } - function testDeserializeCustomCallback() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo>blabla</foo> -</root> -XML; - - $expected = [ - '{DAV:}foo' => 'zim', - ]; - - $elementMap = [ - '{DAV:}foo' => function($reader) { - $reader->next(); - return 'zim'; - } - ]; - - $this->assertDecodeProp($input, $expected, $elementMap); - - } - - /** - * @expectedException \LogicException - */ - function testDeserializeCustomBad() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo>blabla</foo> -</root> -XML; - - $expected = []; - - $elementMap = [ - '{DAV:}foo' => 'idk?', - ]; - - $this->assertDecodeProp($input, $expected, $elementMap); - - } - - /** - * @expectedException \LogicException - */ - function testDeserializeCustomBadObj() { - - $input = <<<XML -<?xml version="1.0"?> -<root xmlns="DAV:"> - <foo>blabla</foo> -</root> -XML; - - $expected = []; - - $elementMap = [ - '{DAV:}foo' => new \StdClass(), - ]; - - $this->assertDecodeProp($input, $expected, $elementMap); - - } - - function assertDecodeProp($input, array $expected, array $elementMap = []) { - - $elementMap['{DAV:}root'] = 'Sabre\DAV\Xml\Element\Prop'; - - $result = $this->parse($input, $elementMap); - $this->assertInternalType('array', $result); - $this->assertEquals($expected, $result['value']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ResponseTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ResponseTest.php deleted file mode 100644 index f19e7df7c0c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ResponseTest.php +++ /dev/null @@ -1,313 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Element; - -use Sabre\DAV; - -class ResponseTest extends DAV\Xml\XmlTest { - - function testSimple() { - - $innerProps = [ - 200 => [ - '{DAV:}displayname' => 'my file', - ], - 404 => [ - '{DAV:}owner' => null, - ] - ]; - - $property = new Response('uri', $innerProps); - - $this->assertEquals('uri', $property->getHref()); - $this->assertEquals($innerProps, $property->getResponseProperties()); - - - } - - /** - * @depends testSimple - */ - function testSerialize() { - - $innerProps = [ - 200 => [ - '{DAV:}displayname' => 'my file', - ], - 404 => [ - '{DAV:}owner' => null, - ] - ]; - - $property = new Response('uri', $innerProps); - - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <d:displayname>my file</d:displayname> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - <d:propstat> - <d:prop> - <d:owner/> - </d:prop> - <d:status>HTTP/1.1 404 Not Found</d:status> - </d:propstat> - </d:response> -</d:root> -', $xml); - - } - - /** - * This one is specifically for testing properties with no namespaces, which is legal xml - * - * @depends testSerialize - */ - function testSerializeEmptyNamespace() { - - $innerProps = [ - 200 => [ - '{}propertyname' => 'value', - ], - ]; - - $property = new Response('uri', $innerProps); - - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertEquals( -'<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <propertyname xmlns="">value</propertyname> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:root> -', $xml); - - } - - /** - * This one is specifically for testing properties with no namespaces, which is legal xml - * - * @depends testSerialize - */ - function testSerializeCustomNamespace() { - - $innerProps = [ - 200 => [ - '{http://sabredav.org/NS/example}propertyname' => 'value', - ], - ]; - - $property = new Response('uri', $innerProps); - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <x1:propertyname xmlns:x1="http://sabredav.org/NS/example">value</x1:propertyname> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:root>', $xml); - - } - - /** - * @depends testSerialize - */ - function testSerializeComplexProperty() { - - $innerProps = [ - 200 => [ - '{DAV:}link' => new DAV\Xml\Property\Href('http://sabredav.org/', false) - ], - ]; - - $property = new Response('uri', $innerProps); - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <d:link><d:href>http://sabredav.org/</d:href></d:link> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:root> -', $xml); - - } - - /** - * @depends testSerialize - * @expectedException \InvalidArgumentException - */ - function testSerializeBreak() { - - $innerProps = [ - 200 => [ - '{DAV:}link' => new \STDClass() - ], - ]; - - $property = new Response('uri', $innerProps); - $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - } - - function testDeserializeComplexProperty() { - - $xml = '<?xml version="1.0"?> -<d:response xmlns:d="DAV:"> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <d:foo>hello</d:foo> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:response> -'; - - $result = $this->parse($xml, [ - '{DAV:}response' => 'Sabre\DAV\Xml\Element\Response', - '{DAV:}foo' => function($reader) { - - $reader->next(); - return 'world'; - }, - ]); - $this->assertEquals( - new Response('/uri', [ - '200' => [ - '{DAV:}foo' => 'world', - ] - ]), - $result['value'] - ); - - } - - /** - * @depends testSimple - */ - function testSerializeUrlencoding() { - - $innerProps = [ - 200 => [ - '{DAV:}displayname' => 'my file', - ], - ]; - - $property = new Response('space here', $innerProps); - - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/space%20here</d:href> - <d:propstat> - <d:prop> - <d:displayname>my file</d:displayname> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:root> -', $xml); - - } - - /** - * @depends testSerialize - * - * The WebDAV spec _requires_ at least one DAV:propstat to appear for - * every DAV:response. In some circumstances however, there are no - * properties to encode. - * - * In those cases we MUST specify at least one DAV:propstat anyway, with - * no properties. - */ - function testSerializeNoProperties() { - - $innerProps = []; - - $property = new Response('uri', $innerProps); - $xml = $this->write(['{DAV:}root' => ['{DAV:}response' => $property]]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:response> - <d:href>/uri</d:href> - <d:propstat> - <d:prop /> - <d:status>HTTP/1.1 418 I\'m a teapot</d:status> - </d:propstat> - </d:response> -</d:root> -', $xml); - - } - - /** - * In the case of {DAV:}prop, a deserializer should never get called, if - * the property element is empty. - */ - function testDeserializeComplexPropertyEmpty() { - - $xml = '<?xml version="1.0"?> -<d:response xmlns:d="DAV:"> - <d:href>/uri</d:href> - <d:propstat> - <d:prop> - <d:foo /> - </d:prop> - <d:status>HTTP/1.1 404 Not Found</d:status> - </d:propstat> -</d:response> -'; - - $result = $this->parse($xml, [ - '{DAV:}response' => 'Sabre\DAV\Xml\Element\Response', - '{DAV:}foo' => function($reader) { - throw new \LogicException('This should never happen'); - }, - ]); - $this->assertEquals( - new Response('/uri', [ - '404' => [ - '{DAV:}foo' => null - ] - ]), - $result['value'] - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ShareeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ShareeTest.php deleted file mode 100644 index 3704d878244..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Element/ShareeTest.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Element; - -use Sabre\DAV\Sharing\Plugin; -use Sabre\DAV\Xml\XmlTest; - -class ShareeTest extends XmlTest { - - /** - * @expectedException \InvalidArgumentException - */ - function testShareeUnknownPropertyInConstructor() { - - new Sharee(['foo' => 'bar']); - - } - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:sharee xmlns:D="DAV:"> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> -</D:sharee> -XML; - - $result = $this->parse($xml, [ - '{DAV:}sharee' => 'Sabre\\DAV\\Xml\\Element\\Sharee' - ]); - - $expected = new Sharee([ - 'href' => 'mailto:eric@example.com', - 'properties' => ['{DAV:}displayname' => 'Eric York'], - 'comment' => 'Shared workspace', - 'access' => Plugin::ACCESS_READWRITE, - ]); - $this->assertEquals( - $expected, - $result['value'] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeNoHref() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:sharee xmlns:D="DAV:"> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> -</D:sharee> -XML; - - $this->parse($xml, [ - '{DAV:}sharee' => 'Sabre\\DAV\\Xml\\Element\\Sharee' - ]); - - } - - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeNoShareeAccess() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:sharee xmlns:D="DAV:"> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> -</D:sharee> -XML; - - $this->parse($xml, [ - '{DAV:}sharee' => 'Sabre\\DAV\\Xml\\Element\\Sharee' - ]); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/HrefTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/HrefTest.php deleted file mode 100644 index bf58853371e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/HrefTest.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\DAV\Xml\XmlTest; - -class HrefTest extends XmlTest { - - function testConstruct() { - - $href = new Href('path'); - $this->assertEquals('path', $href->getHref()); - - } - - function testSerialize() { - - $href = new Href('path'); - $this->assertEquals('path', $href->getHref()); - - $this->contextUri = '/bla/'; - - $xml = $this->write(['{DAV:}anything' => $href]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href>/bla/path</d:href></d:anything> -', $xml); - - } - - function testUnserialize() { - - $xml = '<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href>/bla/path</d:href></d:anything> -'; - - $result = $this->parse($xml, ['{DAV:}anything' => 'Sabre\\DAV\\Xml\\Property\\Href']); - - $href = $result['value']; - - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $href); - - $this->assertEquals('/bla/path', $href->getHref()); - - } - - function testUnserializeIncompatible() { - - $xml = '<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href2>/bla/path</d:href2></d:anything> -'; - $result = $this->parse($xml, ['{DAV:}anything' => 'Sabre\\DAV\\Xml\\Property\\Href']); - $href = $result['value']; - $this->assertNull($href); - - } - function testUnserializeEmpty() { - - $xml = '<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"></d:anything> -'; - $result = $this->parse($xml, ['{DAV:}anything' => 'Sabre\\DAV\\Xml\\Property\\Href']); - $href = $result['value']; - $this->assertNull($href); - - } - - /** - * This method tests if hrefs containing & are correctly encoded. - */ - function testSerializeEntity() { - - $href = new Href('http://example.org/?a&b', false); - $this->assertEquals('http://example.org/?a&b', $href->getHref()); - - $xml = $this->write(['{DAV:}anything' => $href]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href>http://example.org/?a&amp;b</d:href></d:anything> -', $xml); - - } - - function testToHtml() { - - $href = new Href([ - '/foo/bar', - 'foo/bar', - 'http://example.org/bar' - ]); - - $html = new HtmlOutputHelper( - '/base/', - [] - ); - - $expected = - '<a href="/foo/bar">/foo/bar</a><br />' . - '<a href="/base/foo/bar">/base/foo/bar</a><br />' . - '<a href="http://example.org/bar">http://example.org/bar</a>'; - $this->assertEquals($expected, $href->toHtml($html)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/InviteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/InviteTest.php deleted file mode 100644 index 6f8d6cc6c30..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/InviteTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV\Sharing\Plugin; -use Sabre\DAV\Xml\Element\Sharee; -use Sabre\DAV\Xml\XmlTest; - -class InviteTest extends XmlTest { - - function testSerialize() { - - $sharees = [ - new Sharee(), - new Sharee(), - new Sharee(), - new Sharee() - ]; - $sharees[0]->href = 'mailto:foo@example.org'; - $sharees[0]->properties['{DAV:}displayname'] = 'Foo Bar'; - $sharees[0]->access = Plugin::ACCESS_SHAREDOWNER; - $sharees[0]->inviteStatus = Plugin::INVITE_ACCEPTED; - - $sharees[1]->href = 'mailto:bar@example.org'; - $sharees[1]->access = Plugin::ACCESS_READ; - $sharees[1]->inviteStatus = Plugin::INVITE_DECLINED; - - $sharees[2]->href = 'mailto:baz@example.org'; - $sharees[2]->access = Plugin::ACCESS_READWRITE; - $sharees[2]->inviteStatus = Plugin::INVITE_NORESPONSE; - - $sharees[3]->href = 'mailto:zim@example.org'; - $sharees[3]->access = Plugin::ACCESS_READWRITE; - $sharees[3]->inviteStatus = Plugin::INVITE_INVALID; - - $invite = new Invite($sharees); - - $xml = $this->write(['{DAV:}root' => $invite]); - - $expected = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> -<d:sharee> - <d:href>mailto:foo@example.org</d:href> - <d:prop> - <d:displayname>Foo Bar</d:displayname> - </d:prop> - <d:share-access><d:shared-owner /></d:share-access> - <d:invite-accepted/> -</d:sharee> -<d:sharee> - <d:href>mailto:bar@example.org</d:href> - <d:prop /> - <d:share-access><d:read /></d:share-access> - <d:invite-declined/> -</d:sharee> -<d:sharee> - <d:href>mailto:baz@example.org</d:href> - <d:prop /> - <d:share-access><d:read-write /></d:share-access> - <d:invite-noresponse/> -</d:sharee> -<d:sharee> - <d:href>mailto:zim@example.org</d:href> - <d:prop /> - <d:share-access><d:read-write /></d:share-access> - <d:invite-invalid/> -</d:sharee> -</d:root> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LastModifiedTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LastModifiedTest.php deleted file mode 100644 index 669efbd4534..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LastModifiedTest.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use DateTime; -use DateTimeZone; -use Sabre\DAV\Xml\XmlTest; - -class LastModifiedTest extends XmlTest { - - function testSerializeDateTime() { - - $dt = new DateTime('2015-03-24 11:47:00', new DateTimeZone('America/Vancouver')); - $val = ['{DAV:}getlastmodified' => new GetLastModified($dt)]; - - $result = $this->write($val); - $expected = <<<XML -<?xml version="1.0"?> -<d:getlastmodified xmlns:d="DAV:">Tue, 24 Mar 2015 18:47:00 GMT</d:getlastmodified> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $result); - - } - - function testSerializeTimeStamp() { - - $dt = new DateTime('2015-03-24 11:47:00', new DateTimeZone('America/Vancouver')); - $dt = $dt->getTimeStamp(); - $val = ['{DAV:}getlastmodified' => new GetLastModified($dt)]; - - $result = $this->write($val); - $expected = <<<XML -<?xml version="1.0"?> -<d:getlastmodified xmlns:d="DAV:">Tue, 24 Mar 2015 18:47:00 GMT</d:getlastmodified> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $result); - - } - - function testDeserialize() { - - $input = <<<XML -<?xml version="1.0"?> -<d:getlastmodified xmlns:d="DAV:">Tue, 24 Mar 2015 18:47:00 GMT</d:getlastmodified> -XML; - - $elementMap = ['{DAV:}getlastmodified' => 'Sabre\DAV\Xml\Property\GetLastModified']; - $result = $this->parse($input, $elementMap); - - $this->assertEquals( - new DateTime('2015-03-24 18:47:00', new DateTimeZone('UTC')), - $result['value']->getTime() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LocalHrefTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LocalHrefTest.php deleted file mode 100644 index c3f69c929f6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LocalHrefTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\DAV\Xml\XmlTest; - -class LocalHrefTest extends XmlTest { - - function testConstruct() { - - $href = new LocalHref('path'); - $this->assertEquals('path', $href->getHref()); - - } - - function testSerialize() { - - $href = new LocalHref('path'); - $this->assertEquals('path', $href->getHref()); - - $this->contextUri = '/bla/'; - - $xml = $this->write(['{DAV:}anything' => $href]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href>/bla/path</d:href></d:anything> -', $xml); - - } - function testSerializeSpace() { - - $href = new LocalHref('path alsopath'); - $this->assertEquals('path%20alsopath', $href->getHref()); - - $this->contextUri = '/bla/'; - - $xml = $this->write(['{DAV:}anything' => $href]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:anything xmlns:d="DAV:"><d:href>/bla/path%20alsopath</d:href></d:anything> -', $xml); - - } - function testToHtml() { - - $href = new LocalHref([ - '/foo/bar', - 'foo/bar', - 'http://example.org/bar' - ]); - - $html = new HtmlOutputHelper( - '/base/', - [] - ); - - $expected = - '<a href="/foo/bar">/foo/bar</a><br />' . - '<a href="/base/foo/bar">/base/foo/bar</a><br />' . - '<a href="http://example.org/bar">http://example.org/bar</a>'; - $this->assertEquals($expected, $href->toHtml($html)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LockDiscoveryTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LockDiscoveryTest.php deleted file mode 100644 index 0ad069c4723..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/LockDiscoveryTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV\Locks\LockInfo; -use Sabre\DAV\Xml\XmlTest; - -class LockDiscoveryTest extends XmlTest { - - function testSerialize() { - - $lock = new LockInfo(); - $lock->owner = 'hello'; - $lock->token = 'blabla'; - $lock->timeout = 600; - $lock->created = strtotime('2015-03-25 19:21:00'); - $lock->scope = LockInfo::EXCLUSIVE; - $lock->depth = 0; - $lock->uri = 'hi'; - - $prop = new LockDiscovery([$lock]); - - $xml = $this->write(['{DAV:}root' => $prop]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:activelock> - <d:lockscope><d:exclusive /></d:lockscope> - <d:locktype><d:write /></d:locktype> - <d:lockroot> - <d:href>/hi</d:href> - </d:lockroot> - <d:depth>0</d:depth> - <d:timeout>Second-600</d:timeout> - <d:locktoken> - <d:href>opaquelocktoken:blabla</d:href> - </d:locktoken> - <d:owner>hello</d:owner> - - -</d:activelock> -</d:root> -', $xml); - - } - - function testSerializeShared() { - - $lock = new LockInfo(); - $lock->owner = 'hello'; - $lock->token = 'blabla'; - $lock->timeout = 600; - $lock->created = strtotime('2015-03-25 19:21:00'); - $lock->scope = LockInfo::SHARED; - $lock->depth = 0; - $lock->uri = 'hi'; - - $prop = new LockDiscovery([$lock]); - - $xml = $this->write(['{DAV:}root' => $prop]); - - $this->assertXmlStringEqualsXmlString( -'<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:activelock> - <d:lockscope><d:shared /></d:lockscope> - <d:locktype><d:write /></d:locktype> - <d:lockroot> - <d:href>/hi</d:href> - </d:lockroot> - <d:depth>0</d:depth> - <d:timeout>Second-600</d:timeout> - <d:locktoken> - <d:href>opaquelocktoken:blabla</d:href> - </d:locktoken> - <d:owner>hello</d:owner> - - -</d:activelock> -</d:root> -', $xml); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/ShareAccessTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/ShareAccessTest.php deleted file mode 100644 index 6e733dded21..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/ShareAccessTest.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV\Sharing\Plugin; -use Sabre\DAV\Xml\XmlTest; - -class ShareAccessTest extends XmlTest { - - function testSerialize() { - - $data = ['{DAV:}root' => [ - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_READ), - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_READWRITE), - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_NOTSHARED), - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_NOACCESS), - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_SHAREDOWNER), - ], - - ]]; - - $xml = $this->write($data); - - $expected = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:share-access><d:read /></d:share-access> - <d:share-access><d:read-write /></d:share-access> - <d:share-access><d:not-shared /></d:share-access> - <d:share-access><d:no-access /></d:share-access> - <d:share-access><d:shared-owner /></d:share-access> -</d:root> -XML; - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testDeserialize() { - - $input = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:share-access><d:read /></d:share-access> - <d:share-access><d:read-write /></d:share-access> - <d:share-access><d:not-shared /></d:share-access> - <d:share-access><d:no-access /></d:share-access> - <d:share-access><d:shared-owner /></d:share-access> -</d:root> -XML; - - $data = [ - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_READ), - 'attributes' => [], - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_READWRITE), - 'attributes' => [], - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_NOTSHARED), - 'attributes' => [], - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_NOACCESS), - 'attributes' => [], - ], - [ - 'name' => '{DAV:}share-access', - 'value' => new ShareAccess(Plugin::ACCESS_SHAREDOWNER), - 'attributes' => [], - ], - - ]; - - $this->assertParsedValue( - $data, - $input, - ['{DAV:}share-access' => ShareAccess::class] - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeInvalid() { - - $input = <<<XML -<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:share-access><d:foo /></d:share-access> -</d:root> -XML; - - $this->parse( - $input, - ['{DAV:}share-access' => ShareAccess::class] - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedMethodSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedMethodSetTest.php deleted file mode 100644 index 3d54acd2d9d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedMethodSetTest.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Property; - -use Sabre\DAV\Xml\XmlTest; - -class SupportedMethodSetTest extends XmlTest { - - function testSimple() { - - $cus = new SupportedMethodSet(['GET', 'PUT']); - $this->assertEquals(['GET', 'PUT'], $cus->getValue()); - - $this->assertTrue($cus->has('GET')); - $this->assertFalse($cus->has('HEAD')); - - } - - function testSerialize() { - - $cus = new SupportedMethodSet(['GET', 'PUT']); - $xml = $this->write(['{DAV:}foo' => $cus]); - - $expected = '<?xml version="1.0"?> -<d:foo xmlns:d="DAV:"> - <d:supported-method name="GET"/> - <d:supported-method name="PUT"/> -</d:foo>'; - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testSerializeHtml() { - - $cus = new SupportedMethodSet(['GET', 'PUT']); - $result = $cus->toHtml( - new \Sabre\DAV\Browser\HtmlOutputHelper('/', []) - ); - - $this->assertEquals('GET, PUT', $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedReportSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedReportSetTest.php deleted file mode 100644 index cc25697f68d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Property/SupportedReportSetTest.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -namespace Sabre\DAV\Property; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; -require_once 'Sabre/DAV/AbstractServer.php'; - -class SupportedReportSetTest extends DAV\AbstractServer { - - function sendPROPFIND($body) { - - $serverVars = [ - 'REQUEST_URI' => '/', - 'REQUEST_METHOD' => 'PROPFIND', - 'HTTP_DEPTH' => '0', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($body); - - $this->server->httpRequest = ($request); - $this->server->exec(); - - } - - /** - */ - function testNoReports() { - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:supported-report-set /> - </d:prop> -</d:propfind>'; - - $this->sendPROPFIND($xml); - - $this->assertEquals(207, $this->response->status, 'We expected a multi-status response. Full response body: ' . $this->response->body); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:prop\' element'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:supported-report-set\' element'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:status'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:status\' element'); - - $this->assertEquals('HTTP/1.1 200 OK', (string)$data[0], 'The status for this property should have been 200'); - - } - - /** - * @depends testNoReports - */ - function testCustomReport() { - - // Intercepting the report property - $this->server->on('propFind', function(DAV\PropFind $propFind, DAV\INode $node) { - if ($prop = $propFind->get('{DAV:}supported-report-set')) { - $prop->addReport('{http://www.rooftopsolutions.nl/testnamespace}myreport'); - $prop->addReport('{DAV:}anotherreport'); - } - }, 200); - - $xml = '<?xml version="1.0"?> -<d:propfind xmlns:d="DAV:"> - <d:prop> - <d:supported-report-set /> - </d:prop> -</d:propfind>'; - - $this->sendPROPFIND($xml); - - $this->assertEquals(207, $this->response->status, 'We expected a multi-status response. Full response body: ' . $this->response->body); - - $body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/", "xmlns\\1=\"urn:DAV\"", $this->response->body); - $xml = simplexml_load_string($body); - $xml->registerXPathNamespace('d', 'urn:DAV'); - $xml->registerXPathNamespace('x', 'http://www.rooftopsolutions.nl/testnamespace'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:prop\' element'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:supported-report-set\' element'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set/d:supported-report'); - $this->assertEquals(2, count($data), 'We expected 2 \'d:supported-report\' elements'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set/d:supported-report/d:report'); - $this->assertEquals(2, count($data), 'We expected 2 \'d:report\' elements'); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set/d:supported-report/d:report/x:myreport'); - $this->assertEquals(1, count($data), 'We expected 1 \'x:myreport\' element. Full body: ' . $this->response->body); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supported-report-set/d:supported-report/d:report/d:anotherreport'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:anotherreport\' element. Full body: ' . $this->response->body); - - $data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:status'); - $this->assertEquals(1, count($data), 'We expected 1 \'d:status\' element'); - - $this->assertEquals('HTTP/1.1 200 OK', (string)$data[0], 'The status for this property should have been 200'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropFindTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropFindTest.php deleted file mode 100644 index c11668b6188..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropFindTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Request; - -use Sabre\DAV\Xml\XmlTest; - -class PropFindTest extends XmlTest { - - function testDeserializeProp() { - - $xml = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:prop> - <d:hello /> - </d:prop> -</d:root> -'; - - $result = $this->parse($xml, ['{DAV:}root' => 'Sabre\\DAV\\Xml\\Request\PropFind']); - - $propFind = new PropFind(); - $propFind->properties = ['{DAV:}hello']; - - $this->assertEquals($propFind, $result['value']); - - - } - - function testDeserializeAllProp() { - - $xml = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:allprop /> -</d:root> -'; - - $result = $this->parse($xml, ['{DAV:}root' => 'Sabre\\DAV\\Xml\\Request\PropFind']); - - $propFind = new PropFind(); - $propFind->allProp = true; - - $this->assertEquals($propFind, $result['value']); - - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropPatchTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropPatchTest.php deleted file mode 100644 index 03514da5cb6..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/PropPatchTest.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Request; - -use Sabre\DAV\Xml\Property\Href; -use Sabre\DAV\Xml\XmlTest; - -class PropPatchTest extends XmlTest { - - function testSerialize() { - - $propPatch = new PropPatch(); - $propPatch->properties = [ - '{DAV:}displayname' => 'Hello!', - '{DAV:}delete-me' => null, - '{DAV:}some-url' => new Href('foo/bar') - ]; - - $result = $this->write( - ['{DAV:}propertyupdate' => $propPatch] - ); - - $expected = <<<XML -<?xml version="1.0"?> -<d:propertyupdate xmlns:d="DAV:"> - <d:set> - <d:prop> - <d:displayname>Hello!</d:displayname> - </d:prop> - </d:set> - <d:remove> - <d:prop> - <d:delete-me /> - </d:prop> - </d:remove> - <d:set> - <d:prop> - <d:some-url> - <d:href>/foo/bar</d:href> - </d:some-url> - </d:prop> - </d:set> -</d:propertyupdate> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $result - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/ShareResourceTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/ShareResourceTest.php deleted file mode 100644 index 1e6b5602de0..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/ShareResourceTest.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Request; - -use Sabre\DAV\Sharing\Plugin; -use Sabre\DAV\Xml\Element\Sharee; -use Sabre\DAV\Xml\XmlTest; - -class ShareResourceTest extends XmlTest { - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:share-resource xmlns:D="DAV:"> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:prop> - <D:displayname>Eric York</D:displayname> - </D:prop> - <D:comment>Shared workspace</D:comment> - <D:share-access> - <D:read-write /> - </D:share-access> - </D:sharee> - <D:sharee> - <D:href>mailto:eric@example.com</D:href> - <D:share-access> - <D:read /> - </D:share-access> - </D:sharee> - <D:sharee> - <D:href>mailto:wilfredo@example.com</D:href> - <D:share-access> - <D:no-access /> - </D:share-access> - </D:sharee> -</D:share-resource> -XML; - - $result = $this->parse($xml, [ - '{DAV:}share-resource' => 'Sabre\\DAV\\Xml\\Request\\ShareResource' - ]); - - $this->assertInstanceOf( - 'Sabre\\DAV\\Xml\\Request\\ShareResource', - $result['value'] - ); - - $expected = [ - new Sharee(), - new Sharee(), - new Sharee(), - ]; - - $expected[0]->href = 'mailto:eric@example.com'; - $expected[0]->properties['{DAV:}displayname'] = 'Eric York'; - $expected[0]->comment = 'Shared workspace'; - $expected[0]->access = Plugin::ACCESS_READWRITE; - - $expected[1]->href = 'mailto:eric@example.com'; - $expected[1]->access = Plugin::ACCESS_READ; - - $expected[2]->href = 'mailto:wilfredo@example.com'; - $expected[2]->access = Plugin::ACCESS_NOACCESS; - - $this->assertEquals( - $expected, - $result['value']->sharees - ); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/SyncCollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/SyncCollectionTest.php deleted file mode 100644 index bde1a103d19..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/Request/SyncCollectionTest.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml\Request; - -use Sabre\DAV\Xml\XmlTest; - -class SyncCollectionTest extends XmlTest { - - function testDeserializeProp() { - - $xml = '<?xml version="1.0"?> -<d:sync-collection xmlns:d="DAV:"> - <d:sync-token /> - <d:sync-level>1</d:sync-level> - <d:prop> - <d:foo /> - </d:prop> -</d:sync-collection> -'; - - $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport']); - - $elem = new SyncCollectionReport(); - $elem->syncLevel = 1; - $elem->properties = ['{DAV:}foo']; - - $this->assertEquals($elem, $result['value']); - - } - - - function testDeserializeLimit() { - - $xml = '<?xml version="1.0"?> -<d:sync-collection xmlns:d="DAV:"> - <d:sync-token /> - <d:sync-level>1</d:sync-level> - <d:prop> - <d:foo /> - </d:prop> - <d:limit><d:nresults>5</d:nresults></d:limit> -</d:sync-collection> -'; - - $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport']); - - $elem = new SyncCollectionReport(); - $elem->syncLevel = 1; - $elem->properties = ['{DAV:}foo']; - $elem->limit = 5; - - $this->assertEquals($elem, $result['value']); - - } - - - function testDeserializeInfinity() { - - $xml = '<?xml version="1.0"?> -<d:sync-collection xmlns:d="DAV:"> - <d:sync-token /> - <d:sync-level>infinity</d:sync-level> - <d:prop> - <d:foo /> - </d:prop> -</d:sync-collection> -'; - - $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport']); - - $elem = new SyncCollectionReport(); - $elem->syncLevel = \Sabre\DAV\Server::DEPTH_INFINITY; - $elem->properties = ['{DAV:}foo']; - - $this->assertEquals($elem, $result['value']); - - } - - /** - * @expectedException \Sabre\DAV\Exception\BadRequest - */ - function testDeserializeMissingElem() { - - $xml = '<?xml version="1.0"?> -<d:sync-collection xmlns:d="DAV:"> - <d:sync-token /> -</d:sync-collection> -'; - - $result = $this->parse($xml, ['{DAV:}sync-collection' => 'Sabre\\DAV\\Xml\\Request\\SyncCollectionReport']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/XmlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/XmlTest.php deleted file mode 100644 index 906a36085bc..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAV/Xml/XmlTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\DAV\Xml; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -abstract class XmlTest extends \PHPUnit_Framework_TestCase { - - protected $elementMap = []; - protected $namespaceMap = ['DAV:' => 'd']; - protected $contextUri = '/'; - - function write($input) { - - $writer = new Writer(); - $writer->contextUri = $this->contextUri; - $writer->namespaceMap = $this->namespaceMap; - $writer->openMemory(); - $writer->setIndent(true); - $writer->write($input); - return $writer->outputMemory(); - - } - - function parse($xml, array $elementMap = []) { - - $reader = new Reader(); - $reader->elementMap = array_merge($this->elementMap, $elementMap); - $reader->xml($xml); - return $reader->parse(); - - } - - function assertParsedValue($expected, $xml, array $elementMap = []) { - - $result = $this->parse($xml, $elementMap); - $this->assertEquals($expected, $result['value']); - - } - - function cleanUp() { - - libxml_clear_errors(); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php deleted file mode 100644 index 7d7a54d064c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ACLMethodTest.php +++ /dev/null @@ -1,337 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -class ACLMethodTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testCallback() { - - $acl = new Plugin(); - $server = new DAV\Server(); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpAcl($server->httpRequest, $server->httpResponse); - - } - - /** - /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testNotSupportedByNode() { - - $tree = [ - new DAV\SimpleCollection('test'), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request(); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - function testSuccessSimple() { - - $tree = [ - new MockACLNode('test', []), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request(); - $server->httpRequest->setUrl('/test'); - - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $this->assertFalse($acl->httpACL($server->httpRequest, $server->httpResponse)); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NotRecognizedPrincipal - */ - function testUnrecognizedPrincipal() { - - $tree = [ - new MockACLNode('test', []), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:read /></d:privilege></d:grant> - <d:principal><d:href>/principals/notfound</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NotRecognizedPrincipal - */ - function testUnrecognizedPrincipal2() { - - $tree = [ - new MockACLNode('test', []), - new DAV\SimpleCollection('principals', [ - new DAV\SimpleCollection('notaprincipal'), - ]), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:read /></d:privilege></d:grant> - <d:principal><d:href>/principals/notaprincipal</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NotSupportedPrivilege - */ - function testUnknownPrivilege() { - - $tree = [ - new MockACLNode('test', []), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:bananas /></d:privilege></d:grant> - <d:principal><d:href>/principals/notfound</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NoAbstract - */ - function testAbstractPrivilege() { - - $tree = [ - new MockACLNode('test', []), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->on('getSupportedPrivilegeSet', function($node, &$supportedPrivilegeSet) { - $supportedPrivilegeSet['{DAV:}foo'] = ['abstract' => true]; - }); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:foo /></d:privilege></d:grant> - <d:principal><d:href>/principals/foo/</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\AceConflict - */ - function testUpdateProtectedPrivilege() { - - $oldACL = [ - [ - 'principal' => 'principals/notfound', - 'privilege' => '{DAV:}write', - 'protected' => true, - ], - ]; - - $tree = [ - new MockACLNode('test', $oldACL), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:read /></d:privilege></d:grant> - <d:principal><d:href>/principals/notfound</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\AceConflict - */ - function testUpdateProtectedPrivilege2() { - - $oldACL = [ - [ - 'principal' => 'principals/notfound', - 'privilege' => '{DAV:}write', - 'protected' => true, - ], - ]; - - $tree = [ - new MockACLNode('test', $oldACL), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:write /></d:privilege></d:grant> - <d:principal><d:href>/principals/foo</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\AceConflict - */ - function testUpdateProtectedPrivilege3() { - - $oldACL = [ - [ - 'principal' => 'principals/notfound', - 'privilege' => '{DAV:}write', - 'protected' => true, - ], - ]; - - $tree = [ - new MockACLNode('test', $oldACL), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:write /></d:privilege></d:grant> - <d:principal><d:href>/principals/notfound</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - $acl->httpACL($server->httpRequest, $server->httpResponse); - - } - - function testSuccessComplex() { - - $oldACL = [ - [ - 'principal' => 'principals/foo', - 'privilege' => '{DAV:}write', - 'protected' => true, - ], - [ - 'principal' => 'principals/bar', - 'privilege' => '{DAV:}read', - ], - ]; - - $tree = [ - $node = new MockACLNode('test', $oldACL), - new DAV\SimpleCollection('principals', [ - new MockPrincipal('foo', 'principals/foo'), - new MockPrincipal('baz', 'principals/baz'), - ]), - ]; - $acl = new Plugin(); - $server = new DAV\Server($tree); - $server->httpRequest = new HTTP\Request('ACL', '/test'); - $body = '<?xml version="1.0"?> -<d:acl xmlns:d="DAV:"> - <d:ace> - <d:grant><d:privilege><d:write /></d:privilege></d:grant> - <d:principal><d:href>/principals/foo</d:href></d:principal> - <d:protected /> - </d:ace> - <d:ace> - <d:grant><d:privilege><d:write /></d:privilege></d:grant> - <d:principal><d:href>/principals/baz</d:href></d:principal> - </d:ace> -</d:acl>'; - $server->httpRequest->setBody($body); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin($acl); - - - $this->assertFalse($acl->httpAcl($server->httpRequest, $server->httpResponse)); - - $this->assertEquals([ - [ - 'principal' => 'principals/foo', - 'privilege' => '{DAV:}write', - 'protected' => true, - ], - [ - 'principal' => 'principals/baz', - 'privilege' => '{DAV:}write', - 'protected' => false, - ], - ], $node->getACL()); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AclPrincipalPropSetReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AclPrincipalPropSetReportTest.php deleted file mode 100644 index 338fe36ab0c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AclPrincipalPropSetReportTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\HTTP\Request; - -class AclPrincipalPropSetReportTest extends \Sabre\DAVServerTest { - - public $setupACL = true; - public $autoLogin = 'admin'; - - function testReport() { - - $xml = <<<XML -<?xml version="1.0"?> -<acl-principal-prop-set xmlns="DAV:"> - <prop> - <principal-URL /> - <displayname /> - </prop> -</acl-principal-prop-set> -XML; - - $request = new Request('REPORT', '/principals/user1', ['Content-Type' => 'application/xml', 'Depth' => 0]); - $request->setBody($xml); - - $response = $this->request($request, 207); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:response> - <d:href>/principals/admin/</d:href> - <d:propstat> - <d:prop> - <d:principal-URL><d:href>/principals/admin/</d:href></d:principal-URL> - <d:displayname>Admin</d:displayname> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> - </d:response> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $response->getBodyAsString() - ); - - } - - function testReportDepth1() { - - $xml = <<<XML -<?xml version="1.0"?> -<acl-principal-prop-set xmlns="DAV:"> - <principal-URL /> - <displayname /> -</acl-principal-prop-set> -XML; - - $request = new Request('REPORT', '/principals/user1', ['Content-Type' => 'application/xml', 'Depth' => 1]); - $request->setBody($xml); - - $this->request($request, 400); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php deleted file mode 100644 index f16693625b2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/AllowAccessTest.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class AllowAccessTest extends \PHPUnit_Framework_TestCase { - - /** - * @var DAV\Server - */ - protected $server; - - function setUp() { - - $nodes = [ - new DAV\Mock\Collection('testdir', [ - 'file1.txt' => 'contents', - ]), - ]; - - $this->server = new DAV\Server($nodes); - $this->server->addPlugin( - new DAV\Auth\Plugin( - new DAV\Auth\Backend\Mock() - ) - ); - // Login - $this->server->getPlugin('auth')->beforeMethod( - new \Sabre\HTTP\Request(), - new \Sabre\HTTP\Response() - ); - $aclPlugin = new Plugin(); - $this->server->addPlugin($aclPlugin); - - } - - function testGet() { - - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testGetDoesntExist() { - - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/foo'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testHEAD() { - - $this->server->httpRequest->setMethod('HEAD'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testOPTIONS() { - - $this->server->httpRequest->setMethod('OPTIONS'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testPUT() { - - $this->server->httpRequest->setMethod('PUT'); - $this->server->httpRequest->setUrl('/testdir/file1.txt'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testPROPPATCH() { - - $this->server->httpRequest->setMethod('PROPPATCH'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testCOPY() { - - $this->server->httpRequest->setMethod('COPY'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testMOVE() { - - $this->server->httpRequest->setMethod('MOVE'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testLOCK() { - - $this->server->httpRequest->setMethod('LOCK'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->assertTrue($this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse])); - - } - - function testBeforeBind() { - - $this->assertTrue($this->server->emit('beforeBind', ['testdir/file'])); - - } - - - function testBeforeUnbind() { - - $this->assertTrue($this->server->emit('beforeUnbind', ['testdir'])); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php deleted file mode 100644 index ceae9aed059..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/BlockAccessTest.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class BlockAccessTest extends \PHPUnit_Framework_TestCase { - - /** - * @var DAV\Server - */ - protected $server; - protected $plugin; - - function setUp() { - - $nodes = [ - new DAV\SimpleCollection('testdir'), - ]; - - $this->server = new DAV\Server($nodes); - $this->plugin = new Plugin(); - $this->plugin->setDefaultAcl([]); - $this->server->addPlugin( - new DAV\Auth\Plugin( - new DAV\Auth\Backend\Mock() - ) - ); - // Login - $this->server->getPlugin('auth')->beforeMethod( - new \Sabre\HTTP\Request(), - new \Sabre\HTTP\Response() - ); - $this->server->addPlugin($this->plugin); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testGet() { - - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - function testGetDoesntExist() { - - $this->server->httpRequest->setMethod('GET'); - $this->server->httpRequest->setUrl('/foo'); - - $r = $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - $this->assertTrue($r); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testHEAD() { - - $this->server->httpRequest->setMethod('HEAD'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testOPTIONS() { - - $this->server->httpRequest->setMethod('OPTIONS'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testPUT() { - - $this->server->httpRequest->setMethod('PUT'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testPROPPATCH() { - - $this->server->httpRequest->setMethod('PROPPATCH'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testCOPY() { - - $this->server->httpRequest->setMethod('COPY'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testMOVE() { - - $this->server->httpRequest->setMethod('MOVE'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testACL() { - - $this->server->httpRequest->setMethod('ACL'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testLOCK() { - - $this->server->httpRequest->setMethod('LOCK'); - $this->server->httpRequest->setUrl('/testdir'); - - $this->server->emit('beforeMethod', [$this->server->httpRequest, $this->server->httpResponse]); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testBeforeBind() { - - $this->server->emit('beforeBind', ['testdir/file']); - - } - - /** - * @expectedException Sabre\DAVACL\Exception\NeedPrivileges - */ - function testBeforeUnbind() { - - $this->server->emit('beforeUnbind', ['testdir']); - - } - - function testPropFind() { - - $propFind = new DAV\PropFind('testdir', [ - '{DAV:}displayname', - '{DAV:}getcontentlength', - '{DAV:}bar', - '{DAV:}owner', - ]); - - $r = $this->server->emit('propFind', [$propFind, new DAV\SimpleCollection('testdir')]); - $this->assertTrue($r); - - $expected = [ - 200 => [], - 404 => [], - 403 => [ - '{DAV:}displayname' => null, - '{DAV:}getcontentlength' => null, - '{DAV:}bar' => null, - '{DAV:}owner' => null, - ], - ]; - - $this->assertEquals($expected, $propFind->getResultForMultiStatus()); - - } - - function testBeforeGetPropertiesNoListing() { - - $this->plugin->hideNodesFromListings = true; - $propFind = new DAV\PropFind('testdir', [ - '{DAV:}displayname', - '{DAV:}getcontentlength', - '{DAV:}bar', - '{DAV:}owner', - ]); - - $r = $this->server->emit('propFind', [$propFind, new DAV\SimpleCollection('testdir')]); - $this->assertFalse($r); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/AceConflictTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/AceConflictTest.php deleted file mode 100644 index 1cdf2949f2e..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/AceConflictTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Exception; - -use Sabre\DAV; - -class AceConflictTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $ex = new AceConflict('message'); - - $server = new DAV\Server(); - $dom = new \DOMDocument('1.0', 'utf-8'); - $root = $dom->createElementNS('DAV:', 'd:root'); - $dom->appendChild($root); - - $ex->serialize($server, $root); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:no-ace-conflict' => 1, - ]; - - // Reloading because PHP DOM sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($dom->saveXML()); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NeedPrivilegesExceptionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NeedPrivilegesExceptionTest.php deleted file mode 100644 index b13e7722d89..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NeedPrivilegesExceptionTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Exception; - -use Sabre\DAV; - -class NeedPrivilegesExceptionTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $uri = 'foo'; - $privileges = [ - '{DAV:}read', - '{DAV:}write', - ]; - $ex = new NeedPrivileges($uri, $privileges); - - $server = new DAV\Server(); - $dom = new \DOMDocument('1.0', 'utf-8'); - $root = $dom->createElementNS('DAV:', 'd:root'); - $dom->appendChild($root); - - $ex->serialize($server, $root); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:need-privileges' => 1, - '/d:root/d:need-privileges/d:resource' => 2, - '/d:root/d:need-privileges/d:resource/d:href' => 2, - '/d:root/d:need-privileges/d:resource/d:privilege' => 2, - '/d:root/d:need-privileges/d:resource/d:privilege/d:read' => 1, - '/d:root/d:need-privileges/d:resource/d:privilege/d:write' => 1, - ]; - - // Reloading because PHP DOM sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($dom->saveXML()); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NoAbstractTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NoAbstractTest.php deleted file mode 100644 index f52b1737140..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NoAbstractTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Exception; - -use Sabre\DAV; - -class NoAbstractTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $ex = new NoAbstract('message'); - - $server = new DAV\Server(); - $dom = new \DOMDocument('1.0', 'utf-8'); - $root = $dom->createElementNS('DAV:', 'd:root'); - $dom->appendChild($root); - - $ex->serialize($server, $root); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:no-abstract' => 1, - ]; - - // Reloading because PHP DOM sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($dom->saveXML()); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotRecognizedPrincipalTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotRecognizedPrincipalTest.php deleted file mode 100644 index df89aaf84d1..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotRecognizedPrincipalTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Exception; - -use Sabre\DAV; - -class NotRecognizedPrincipalTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $ex = new NotRecognizedPrincipal('message'); - - $server = new DAV\Server(); - $dom = new \DOMDocument('1.0', 'utf-8'); - $root = $dom->createElementNS('DAV:', 'd:root'); - $dom->appendChild($root); - - $ex->serialize($server, $root); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:recognized-principal' => 1, - ]; - - // Reloading because PHP DOM sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($dom->saveXML()); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotSupportedPrivilegeTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotSupportedPrivilegeTest.php deleted file mode 100644 index 50623952be7..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Exception/NotSupportedPrivilegeTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Exception; - -use Sabre\DAV; - -class NotSupportedPrivilegeTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $ex = new NotSupportedPrivilege('message'); - - $server = new DAV\Server(); - $dom = new \DOMDocument('1.0', 'utf-8'); - $root = $dom->createElementNS('DAV:', 'd:root'); - $dom->appendChild($root); - - $ex->serialize($server, $root); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:not-supported-privilege' => 1, - ]; - - // Reloading because PHP DOM sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($dom->saveXML()); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php deleted file mode 100644 index 91de64372ab..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php +++ /dev/null @@ -1,317 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase { - - function getServer() { - - $tree = [ - new DAV\Mock\PropertiesCollection('node1', [], [ - '{http://sabredav.org/ns}simple' => 'foo', - '{http://sabredav.org/ns}href' => new DAV\Xml\Property\Href('node2'), - '{DAV:}displayname' => 'Node 1', - ]), - new DAV\Mock\PropertiesCollection('node2', [], [ - '{http://sabredav.org/ns}simple' => 'simple', - '{http://sabredav.org/ns}hreflist' => new DAV\Xml\Property\Href(['node1', 'node3']), - '{DAV:}displayname' => 'Node 2', - ]), - new DAV\Mock\PropertiesCollection('node3', [], [ - '{http://sabredav.org/ns}simple' => 'simple', - '{DAV:}displayname' => 'Node 3', - ]), - ]; - - $fakeServer = new DAV\Server($tree); - $fakeServer->sapi = new HTTP\SapiMock(); - $fakeServer->debugExceptions = true; - $fakeServer->httpResponse = new HTTP\ResponseMock(); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - // Anyone can do anything - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ] - ]); - $this->assertTrue($plugin instanceof Plugin); - - $fakeServer->addPlugin($plugin); - $this->assertEquals($plugin, $fakeServer->getPlugin('acl')); - - return $fakeServer; - - } - - function testSimple() { - - $xml = '<?xml version="1.0"?> -<d:expand-property xmlns:d="DAV:"> - <d:property name="displayname" /> - <d:property name="foo" namespace="http://www.sabredav.org/NS/2010/nonexistant" /> - <d:property name="simple" namespace="http://sabredav.org/ns" /> - <d:property name="href" namespace="http://sabredav.org/ns" /> -</d:expand-property>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/node1', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, 'Incorrect status code received. Full body: ' . $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 1, - '/d:multistatus/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat' => 2, - '/d:multistatus/d:response/d:propstat/d:prop' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:simple' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:href' => 1, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - $xml->registerXPathNamespace('s', 'http://sabredav.org/ns'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response: ' . $server->httpResponse->body); - - } - - } - - /** - * @depends testSimple - */ - function testExpand() { - - $xml = '<?xml version="1.0"?> -<d:expand-property xmlns:d="DAV:"> - <d:property name="href" namespace="http://sabredav.org/ns"> - <d:property name="displayname" /> - </d:property> -</d:expand-property>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/node1', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, 'Incorrect response status received. Full response body: ' . $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 1, - '/d:multistatus/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat' => 1, - '/d:multistatus/d:response/d:propstat/d:prop' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:response' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:response/d:propstat' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:response/d:propstat/d:prop' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:href/d:response/d:propstat/d:prop/d:displayname' => 1, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - $xml->registerXPathNamespace('s', 'http://sabredav.org/ns'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . ' Full response body: ' . $server->httpResponse->getBodyAsString()); - - } - - } - - /** - * @depends testSimple - */ - function testExpandHrefList() { - - $xml = '<?xml version="1.0"?> -<d:expand-property xmlns:d="DAV:"> - <d:property name="hreflist" namespace="http://sabredav.org/ns"> - <d:property name="displayname" /> - </d:property> -</d:expand-property>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/node2', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 1, - '/d:multistatus/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat' => 1, - '/d:multistatus/d:response/d:propstat/d:prop' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:href' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/d:displayname' => 2, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - $xml->registerXPathNamespace('s', 'http://sabredav.org/ns'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result)); - - } - - } - - /** - * @depends testExpand - */ - function testExpandDeep() { - - $xml = '<?xml version="1.0"?> -<d:expand-property xmlns:d="DAV:"> - <d:property name="hreflist" namespace="http://sabredav.org/ns"> - <d:property name="href" namespace="http://sabredav.org/ns"> - <d:property name="displayname" /> - </d:property> - <d:property name="displayname" /> - </d:property> -</d:expand-property>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/node2', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 1, - '/d:multistatus/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat' => 1, - '/d:multistatus/d:response/d:propstat/d:prop' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:href' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat' => 3, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop' => 3, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/d:displayname' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href/d:response' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href/d:response/d:href' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href/d:response/d:propstat' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href/d:response/d:propstat/d:prop' => 1, - '/d:multistatus/d:response/d:propstat/d:prop/s:hreflist/d:response/d:propstat/d:prop/s:href/d:response/d:propstat/d:prop/d:displayname' => 1, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - $xml->registerXPathNamespace('s', 'http://sabredav.org/ns'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result)); - - } - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/CollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/CollectionTest.php deleted file mode 100644 index af18e7cc057..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/CollectionTest.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace Sabre\DAVACL\FS; - -class CollectionTest extends FileTest { - - function setUp() { - - $this->path = SABRE_TEMPDIR; - $this->sut = new Collection($this->path, $this->acl, $this->owner); - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testGetChildFile() { - - file_put_contents(SABRE_TEMPDIR . '/file.txt', 'hello'); - $child = $this->sut->getChild('file.txt'); - $this->assertInstanceOf('Sabre\\DAVACL\\FS\\File', $child); - - $this->assertEquals('file.txt', $child->getName()); - $this->assertEquals($this->acl, $child->getACL()); - $this->assertEquals($this->owner, $child->getOwner()); - - } - - function testGetChildDirectory() { - - mkdir(SABRE_TEMPDIR . '/dir'); - $child = $this->sut->getChild('dir'); - $this->assertInstanceOf('Sabre\\DAVACL\\FS\\Collection', $child); - - $this->assertEquals('dir', $child->getName()); - $this->assertEquals($this->acl, $child->getACL()); - $this->assertEquals($this->owner, $child->getOwner()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/FileTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/FileTest.php deleted file mode 100644 index f57b2fa1d16..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/FileTest.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -namespace Sabre\DAVACL\FS; - -class FileTest extends \PHPUnit_Framework_TestCase { - - /** - * System under test - * - * @var File - */ - protected $sut; - - protected $path = 'foo'; - protected $acl = [ - [ - 'privilege' => '{DAV:}read', - 'principal' => '{DAV:}authenticated', - ] - ]; - - protected $owner = 'principals/evert'; - - function setUp() { - - $this->sut = new File($this->path, $this->acl, $this->owner); - - } - - function testGetOwner() { - - $this->assertEquals( - $this->owner, - $this->sut->getOwner() - ); - - } - - function testGetGroup() { - - $this->assertNull( - $this->sut->getGroup() - ); - - } - - function testGetACL() { - - $this->assertEquals( - $this->acl, - $this->sut->getACL() - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetAcl() { - - $this->sut->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $this->assertNull( - $this->sut->getSupportedPrivilegeSet() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/HomeCollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/HomeCollectionTest.php deleted file mode 100644 index 87cfc83e92c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/FS/HomeCollectionTest.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php - -namespace Sabre\DAVACL\FS; - -use Sabre\DAVACL\PrincipalBackend\Mock as PrincipalBackend; - -class HomeCollectionTest extends \PHPUnit_Framework_TestCase { - - /** - * System under test - * - * @var HomeCollection - */ - protected $sut; - - protected $path; - protected $name = 'thuis'; - - function setUp() { - - $principalBackend = new PrincipalBackend(); - - $this->path = SABRE_TEMPDIR . '/home'; - - $this->sut = new HomeCollection($principalBackend, $this->path); - $this->sut->collectionName = $this->name; - - - } - - function tearDown() { - - \Sabre\TestUtil::clearTempDir(); - - } - - function testGetName() { - - $this->assertEquals( - $this->name, - $this->sut->getName() - ); - - } - - function testGetChild() { - - $child = $this->sut->getChild('user1'); - $this->assertInstanceOf('Sabre\\DAVACL\\FS\\Collection', $child); - $this->assertEquals('user1', $child->getName()); - - $owner = 'principals/user1'; - $acl = [ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ], - ]; - - $this->assertEquals($acl, $child->getACL()); - $this->assertEquals($owner, $child->getOwner()); - - } - - function testGetOwner() { - - $this->assertNull( - $this->sut->getOwner() - ); - - } - - function testGetGroup() { - - $this->assertNull( - $this->sut->getGroup() - ); - - } - - function testGetACL() { - - $acl = [ - [ - 'principal' => '{DAV:}authenticated', - 'privilege' => '{DAV:}read', - 'protected' => true, - ] - ]; - - $this->assertEquals( - $acl, - $this->sut->getACL() - ); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetAcl() { - - $this->sut->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $this->assertNull( - $this->sut->getSupportedPrivilegeSet() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockACLNode.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockACLNode.php deleted file mode 100644 index 2d9744e293f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockACLNode.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class MockACLNode extends DAV\Node implements IACL { - - public $name; - public $acl; - - function __construct($name, array $acl = []) { - - $this->name = $name; - $this->acl = $acl; - - } - - function getName() { - - return $this->name; - - } - - function getOwner() { - - return null; - - } - - function getGroup() { - - return null; - - } - - function getACL() { - - return $this->acl; - - } - - function setACL(array $acl) { - - $this->acl = $acl; - - } - - function getSupportedPrivilegeSet() { - - return null; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockPrincipal.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockPrincipal.php deleted file mode 100644 index 934906802ed..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/MockPrincipal.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class MockPrincipal extends DAV\Node implements IPrincipal { - - public $name; - public $principalUrl; - public $groupMembership = []; - public $groupMemberSet = []; - - function __construct($name, $principalUrl, array $groupMembership = [], array $groupMemberSet = []) { - - $this->name = $name; - $this->principalUrl = $principalUrl; - $this->groupMembership = $groupMembership; - $this->groupMemberSet = $groupMemberSet; - - } - - function getName() { - - return $this->name; - - } - - function getDisplayName() { - - return $this->getName(); - - } - - function getAlternateUriSet() { - - return []; - - } - - function getPrincipalUrl() { - - return $this->principalUrl; - - } - - function getGroupMemberSet() { - - return $this->groupMemberSet; - - } - - function getGroupMemberShip() { - - return $this->groupMembership; - - } - - function setGroupMemberSet(array $groupMemberSet) { - - $this->groupMemberSet = $groupMemberSet; - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php deleted file mode 100644 index 8552448f54b..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginAdminTest.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAVACL/MockACLNode.php'; -require_once 'Sabre/HTTP/ResponseMock.php'; - -class PluginAdminTest extends \PHPUnit_Framework_TestCase { - - public $server; - - function setUp() { - - $principalBackend = new PrincipalBackend\Mock(); - - $tree = [ - new MockACLNode('adminonly', []), - new PrincipalCollection($principalBackend), - ]; - - $this->server = new DAV\Server($tree); - $this->server->sapi = new HTTP\SapiMock(); - $plugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $this->server->addPlugin($plugin); - } - - function testNoAdminAccess() { - - $plugin = new Plugin(); - $this->server->addPlugin($plugin); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'OPTIONS', - 'HTTP_DEPTH' => 1, - 'REQUEST_URI' => '/adminonly', - ]); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(403, $response->status); - - } - - /** - * @depends testNoAdminAccess - */ - function testAdminAccess() { - - $plugin = new Plugin(); - $plugin->adminPrincipals = [ - 'principals/admin', - ]; - $this->server->addPlugin($plugin); - - $request = HTTP\Sapi::createFromServerArray([ - 'REQUEST_METHOD' => 'OPTIONS', - 'HTTP_DEPTH' => 1, - 'REQUEST_URI' => '/adminonly', - ]); - - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - - $this->server->exec(); - - $this->assertEquals(200, $response->status); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php deleted file mode 100644 index fb42efba719..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php +++ /dev/null @@ -1,415 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -class PluginPropertiesTest extends \PHPUnit_Framework_TestCase { - - function testPrincipalCollectionSet() { - - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - //Anyone can do anything - $plugin->principalCollectionSet = [ - 'principals1', - 'principals2', - ]; - - $requestedProperties = [ - '{DAV:}principal-collection-set', - ]; - - $server = new DAV\Server(new DAV\SimpleCollection('root')); - $server->addPlugin($plugin); - - $result = $server->getPropertiesForPath('', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200])); - $this->assertArrayHasKey('{DAV:}principal-collection-set', $result[200]); - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $result[200]['{DAV:}principal-collection-set']); - - $expected = [ - 'principals1/', - 'principals2/', - ]; - - - $this->assertEquals($expected, $result[200]['{DAV:}principal-collection-set']->getHrefs()); - - - } - - function testCurrentUserPrincipal() { - - $fakeServer = new DAV\Server(); - $plugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $fakeServer->addPlugin($plugin); - $plugin = new Plugin(); - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - $fakeServer->addPlugin($plugin); - - - $requestedProperties = [ - '{DAV:}current-user-principal', - ]; - - $result = $fakeServer->getPropertiesForPath('', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200])); - $this->assertArrayHasKey('{DAV:}current-user-principal', $result[200]); - $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\Principal', $result[200]['{DAV:}current-user-principal']); - $this->assertEquals(Xml\Property\Principal::UNAUTHENTICATED, $result[200]['{DAV:}current-user-principal']->getType()); - - // This will force the login - $fakeServer->emit('beforeMethod', [$fakeServer->httpRequest, $fakeServer->httpResponse]); - - $result = $fakeServer->getPropertiesForPath('', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200])); - $this->assertArrayHasKey('{DAV:}current-user-principal', $result[200]); - $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\Principal', $result[200]['{DAV:}current-user-principal']); - $this->assertEquals(Xml\Property\Principal::HREF, $result[200]['{DAV:}current-user-principal']->getType()); - $this->assertEquals('principals/admin/', $result[200]['{DAV:}current-user-principal']->getHref()); - - } - - function testSupportedPrivilegeSet() { - - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - $server = new DAV\Server(); - $server->addPlugin($plugin); - - $requestedProperties = [ - '{DAV:}supported-privilege-set', - ]; - - $result = $server->getPropertiesForPath('', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200])); - $this->assertArrayHasKey('{DAV:}supported-privilege-set', $result[200]); - $this->assertInstanceOf('Sabre\\DAVACL\\Xml\\Property\\SupportedPrivilegeSet', $result[200]['{DAV:}supported-privilege-set']); - - $server = new DAV\Server(); - - $prop = $result[200]['{DAV:}supported-privilege-set']; - $result = $server->xml->write('{DAV:}root', $prop); - - $xpaths = [ - '/d:root' => 1, - '/d:root/d:supported-privilege' => 1, - '/d:root/d:supported-privilege/d:privilege' => 1, - '/d:root/d:supported-privilege/d:privilege/d:all' => 1, - '/d:root/d:supported-privilege/d:abstract' => 0, - '/d:root/d:supported-privilege/d:supported-privilege' => 2, - '/d:root/d:supported-privilege/d:supported-privilege/d:privilege' => 2, - '/d:root/d:supported-privilege/d:supported-privilege/d:privilege/d:read' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:privilege/d:write' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege' => 7, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege' => 7, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:read-acl' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:read-current-user-privilege-set' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:write-content' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:write-properties' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:bind' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:unbind' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:privilege/d:unlock' => 1, - '/d:root/d:supported-privilege/d:supported-privilege/d:supported-privilege/d:abstract' => 0, - ]; - - - // reloading because php dom sucks - $dom2 = new \DOMDocument('1.0', 'utf-8'); - $dom2->loadXML($result); - - $dxpath = new \DOMXPath($dom2); - $dxpath->registerNamespace('d', 'DAV:'); - foreach ($xpaths as $xpath => $count) { - - $this->assertEquals($count, $dxpath->query($xpath)->length, 'Looking for : ' . $xpath . ', we could only find ' . $dxpath->query($xpath)->length . ' elements, while we expected ' . $count . ' Full XML: ' . $result); - - } - - } - - function testACL() { - - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - - $nodes = [ - new MockACLNode('foo', [ - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}read', - ] - ]), - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('admin', 'principals/admin'), - ]), - - ]; - - $server = new DAV\Server($nodes); - $server->addPlugin($plugin); - $authPlugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($authPlugin); - - // Force login - $authPlugin->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $requestedProperties = [ - '{DAV:}acl', - ]; - - $result = $server->getPropertiesForPath('foo', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200]), 'The {DAV:}acl property did not return from the list. Full list: ' . print_r($result, true)); - $this->assertArrayHasKey('{DAV:}acl', $result[200]); - $this->assertInstanceOf('Sabre\\DAVACL\\Xml\Property\\Acl', $result[200]['{DAV:}acl']); - - } - - function testACLRestrictions() { - - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - - $nodes = [ - new MockACLNode('foo', [ - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}read', - ] - ]), - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('admin', 'principals/admin'), - ]), - - ]; - - $server = new DAV\Server($nodes); - $server->addPlugin($plugin); - $authPlugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($authPlugin); - - // Force login - $authPlugin->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $requestedProperties = [ - '{DAV:}acl-restrictions', - ]; - - $result = $server->getPropertiesForPath('foo', $requestedProperties); - $result = $result[0]; - - $this->assertEquals(1, count($result[200]), 'The {DAV:}acl-restrictions property did not return from the list. Full list: ' . print_r($result, true)); - $this->assertArrayHasKey('{DAV:}acl-restrictions', $result[200]); - $this->assertInstanceOf('Sabre\\DAVACL\\Xml\\Property\\AclRestrictions', $result[200]['{DAV:}acl-restrictions']); - - } - - function testAlternateUriSet() { - - $tree = [ - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('user', 'principals/user'), - ]) - ]; - - $fakeServer = new DAV\Server($tree); - //$plugin = new DAV\Auth\Plugin(new DAV\Auth\MockBackend()) - //$fakeServer->addPlugin($plugin); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - $fakeServer->addPlugin($plugin); - - $requestedProperties = [ - '{DAV:}alternate-URI-set', - ]; - $result = $fakeServer->getPropertiesForPath('principals/user', $requestedProperties); - $result = $result[0]; - - $this->assertTrue(isset($result[200])); - $this->assertTrue(isset($result[200]['{DAV:}alternate-URI-set'])); - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $result[200]['{DAV:}alternate-URI-set']); - - $this->assertEquals([], $result[200]['{DAV:}alternate-URI-set']->getHrefs()); - - } - - function testPrincipalURL() { - - $tree = [ - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('user', 'principals/user'), - ]), - ]; - - $fakeServer = new DAV\Server($tree); - //$plugin = new DAV\Auth\Plugin(new DAV\Auth\MockBackend()); - //$fakeServer->addPlugin($plugin); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - $fakeServer->addPlugin($plugin); - - $requestedProperties = [ - '{DAV:}principal-URL', - ]; - - $result = $fakeServer->getPropertiesForPath('principals/user', $requestedProperties); - $result = $result[0]; - - $this->assertTrue(isset($result[200])); - $this->assertTrue(isset($result[200]['{DAV:}principal-URL'])); - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $result[200]['{DAV:}principal-URL']); - - $this->assertEquals('principals/user/', $result[200]['{DAV:}principal-URL']->getHref()); - - } - - function testGroupMemberSet() { - - $tree = [ - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('user', 'principals/user'), - ]), - ]; - - $fakeServer = new DAV\Server($tree); - //$plugin = new DAV\Auth\Plugin(new DAV\Auth\MockBackend()); - //$fakeServer->addPlugin($plugin); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - $fakeServer->addPlugin($plugin); - - $requestedProperties = [ - '{DAV:}group-member-set', - ]; - - $result = $fakeServer->getPropertiesForPath('principals/user', $requestedProperties); - $result = $result[0]; - - $this->assertTrue(isset($result[200])); - $this->assertTrue(isset($result[200]['{DAV:}group-member-set'])); - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $result[200]['{DAV:}group-member-set']); - - $this->assertEquals([], $result[200]['{DAV:}group-member-set']->getHrefs()); - - } - - function testGroupMemberShip() { - - $tree = [ - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('user', 'principals/user'), - ]), - ]; - - $fakeServer = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $fakeServer->addPlugin($plugin); - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - - $requestedProperties = [ - '{DAV:}group-membership', - ]; - - $result = $fakeServer->getPropertiesForPath('principals/user', $requestedProperties); - $result = $result[0]; - - $this->assertTrue(isset($result[200])); - $this->assertTrue(isset($result[200]['{DAV:}group-membership'])); - $this->assertInstanceOf('Sabre\\DAV\\Xml\\Property\\Href', $result[200]['{DAV:}group-membership']); - - $this->assertEquals([], $result[200]['{DAV:}group-membership']->getHrefs()); - - } - - function testGetDisplayName() { - - $tree = [ - new DAV\SimpleCollection('principals', [ - $principal = new MockPrincipal('user', 'principals/user'), - ]), - ]; - - $fakeServer = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $fakeServer->addPlugin($plugin); - $plugin->setDefaultACL([ - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}all', - ], - ]); - - $requestedProperties = [ - '{DAV:}displayname', - ]; - - $result = $fakeServer->getPropertiesForPath('principals/user', $requestedProperties); - $result = $result[0]; - - $this->assertTrue(isset($result[200])); - $this->assertTrue(isset($result[200]['{DAV:}displayname'])); - - $this->assertEquals('user', $result[200]['{DAV:}displayname']); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php deleted file mode 100644 index 0147e6a6177..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PluginUpdatePropertiesTest.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; - -class PluginUpdatePropertiesTest extends \PHPUnit_Framework_TestCase { - - function testUpdatePropertiesPassthrough() { - - $tree = [ - new DAV\SimpleCollection('foo'), - ]; - $server = new DAV\Server($tree); - $server->addPlugin(new DAV\Auth\Plugin()); - $server->addPlugin(new Plugin()); - - $result = $server->updateProperties('foo', [ - '{DAV:}foo' => 'bar', - ]); - - $expected = [ - '{DAV:}foo' => 403, - ]; - - $this->assertEquals($expected, $result); - - } - - function testRemoveGroupMembers() { - - $tree = [ - new MockPrincipal('foo', 'foo'), - ]; - $server = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $server->addPlugin($plugin); - - $result = $server->updateProperties('foo', [ - '{DAV:}group-member-set' => null, - ]); - - $expected = [ - '{DAV:}group-member-set' => 204 - ]; - - $this->assertEquals($expected, $result); - $this->assertEquals([], $tree[0]->getGroupMemberSet()); - - } - - function testSetGroupMembers() { - - $tree = [ - new MockPrincipal('foo', 'foo'), - ]; - $server = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $server->addPlugin($plugin); - - $result = $server->updateProperties('foo', [ - '{DAV:}group-member-set' => new DAV\Xml\Property\Href(['/bar', '/baz'], true), - ]); - - $expected = [ - '{DAV:}group-member-set' => 200 - ]; - - $this->assertEquals($expected, $result); - $this->assertEquals(['bar', 'baz'], $tree[0]->getGroupMemberSet()); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testSetBadValue() { - - $tree = [ - new MockPrincipal('foo', 'foo'), - ]; - $server = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $server->addPlugin($plugin); - - $result = $server->updateProperties('foo', [ - '{DAV:}group-member-set' => new \StdClass(), - ]); - - } - - function testSetBadNode() { - - $tree = [ - new DAV\SimpleCollection('foo'), - ]; - $server = new DAV\Server($tree); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $server->addPlugin($plugin); - - $result = $server->updateProperties('foo', [ - '{DAV:}group-member-set' => new DAV\Xml\Property\Href(['/bar', '/baz'], false), - ]); - - $expected = [ - '{DAV:}group-member-set' => 403, - ]; - - $this->assertEquals($expected, $result); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php deleted file mode 100644 index 9fef3018df9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/AbstractPDOTest.php +++ /dev/null @@ -1,217 +0,0 @@ -<?php - -namespace Sabre\DAVACL\PrincipalBackend; - -use Sabre\DAV; -use Sabre\HTTP; - -abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { - - use DAV\DbTestHelperTrait; - - function setUp() { - - $this->dropTables(['principals', 'groupmembers']); - $this->createSchema('principals'); - - $pdo = $this->getPDO(); - - $pdo->query("INSERT INTO principals (uri,email,displayname) VALUES ('principals/user','user@example.org','User')"); - $pdo->query("INSERT INTO principals (uri,email,displayname) VALUES ('principals/group','group@example.org','Group')"); - - $pdo->query("INSERT INTO groupmembers (principal_id,member_id) VALUES (5,4)"); - - } - - - function testConstruct() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $this->assertTrue($backend instanceof PDO); - - } - - /** - * @depends testConstruct - */ - function testGetPrincipalsByPrefix() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - - $expected = [ - [ - 'uri' => 'principals/admin', - '{http://sabredav.org/ns}email-address' => 'admin@example.org', - '{DAV:}displayname' => 'Administrator', - ], - [ - 'uri' => 'principals/user', - '{http://sabredav.org/ns}email-address' => 'user@example.org', - '{DAV:}displayname' => 'User', - ], - [ - 'uri' => 'principals/group', - '{http://sabredav.org/ns}email-address' => 'group@example.org', - '{DAV:}displayname' => 'Group', - ], - ]; - - $this->assertEquals($expected, $backend->getPrincipalsByPrefix('principals')); - $this->assertEquals([], $backend->getPrincipalsByPrefix('foo')); - - } - - /** - * @depends testConstruct - */ - function testGetPrincipalByPath() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - - $expected = [ - 'id' => 4, - 'uri' => 'principals/user', - '{http://sabredav.org/ns}email-address' => 'user@example.org', - '{DAV:}displayname' => 'User', - ]; - - $this->assertEquals($expected, $backend->getPrincipalByPath('principals/user')); - $this->assertEquals(null, $backend->getPrincipalByPath('foo')); - - } - - function testGetGroupMemberSet() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $expected = ['principals/user']; - - $this->assertEquals($expected, $backend->getGroupMemberSet('principals/group')); - - } - - function testGetGroupMembership() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $expected = ['principals/group']; - - $this->assertEquals($expected, $backend->getGroupMembership('principals/user')); - - } - - function testSetGroupMemberSet() { - - $pdo = $this->getPDO(); - - // Start situation - $backend = new PDO($pdo); - $this->assertEquals(['principals/user'], $backend->getGroupMemberSet('principals/group')); - - // Removing all principals - $backend->setGroupMemberSet('principals/group', []); - $this->assertEquals([], $backend->getGroupMemberSet('principals/group')); - - // Adding principals again - $backend->setGroupMemberSet('principals/group', ['principals/user']); - $this->assertEquals(['principals/user'], $backend->getGroupMemberSet('principals/group')); - - - } - - function testSearchPrincipals() { - - $pdo = $this->getPDO(); - - $backend = new PDO($pdo); - - $result = $backend->searchPrincipals('principals', ['{DAV:}blabla' => 'foo']); - $this->assertEquals([], $result); - - $result = $backend->searchPrincipals('principals', ['{DAV:}displayname' => 'ou']); - $this->assertEquals(['principals/group'], $result); - - $result = $backend->searchPrincipals('principals', ['{DAV:}displayname' => 'UsEr', '{http://sabredav.org/ns}email-address' => 'USER@EXAMPLE']); - $this->assertEquals(['principals/user'], $result); - - $result = $backend->searchPrincipals('mom', ['{DAV:}displayname' => 'UsEr', '{http://sabredav.org/ns}email-address' => 'USER@EXAMPLE']); - $this->assertEquals([], $result); - - } - - function testUpdatePrincipal() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - - $propPatch = new DAV\PropPatch([ - '{DAV:}displayname' => 'pietje', - ]); - - $backend->updatePrincipal('principals/user', $propPatch); - $result = $propPatch->commit(); - - $this->assertTrue($result); - - $this->assertEquals([ - 'id' => 4, - 'uri' => 'principals/user', - '{DAV:}displayname' => 'pietje', - '{http://sabredav.org/ns}email-address' => 'user@example.org', - ], $backend->getPrincipalByPath('principals/user')); - - } - - function testUpdatePrincipalUnknownField() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - - $propPatch = new DAV\PropPatch([ - '{DAV:}displayname' => 'pietje', - '{DAV:}unknown' => 'foo', - ]); - - $backend->updatePrincipal('principals/user', $propPatch); - $result = $propPatch->commit(); - - $this->assertFalse($result); - - $this->assertEquals([ - '{DAV:}displayname' => 424, - '{DAV:}unknown' => 403 - ], $propPatch->getResult()); - - $this->assertEquals([ - 'id' => '4', - 'uri' => 'principals/user', - '{DAV:}displayname' => 'User', - '{http://sabredav.org/ns}email-address' => 'user@example.org', - ], $backend->getPrincipalByPath('principals/user')); - - } - - function testFindByUriUnknownScheme() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $this->assertNull($backend->findByUri('http://foo', 'principals')); - - } - - - function testFindByUri() { - - $pdo = $this->getPDO(); - $backend = new PDO($pdo); - $this->assertEquals( - 'principals/user', - $backend->findByUri('mailto:user@example.org', 'principals') - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php deleted file mode 100644 index 1464f4c26ab..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php - -namespace Sabre\DAVACL\PrincipalBackend; - -class Mock extends AbstractBackend { - - public $groupMembers = []; - public $principals; - - function __construct(array $principals = null) { - - $this->principals = $principals; - - if (is_null($principals)) { - - $this->principals = [ - [ - 'uri' => 'principals/user1', - '{DAV:}displayname' => 'User 1', - '{http://sabredav.org/ns}email-address' => 'user1.sabredav@sabredav.org', - '{http://sabredav.org/ns}vcard-url' => 'addressbooks/user1/book1/vcard1.vcf', - ], - [ - 'uri' => 'principals/admin', - '{DAV:}displayname' => 'Admin', - ], - [ - 'uri' => 'principals/user2', - '{DAV:}displayname' => 'User 2', - '{http://sabredav.org/ns}email-address' => 'user2.sabredav@sabredav.org', - ], - ]; - - } - - } - - function getPrincipalsByPrefix($prefix) { - - $prefix = trim($prefix, '/'); - if ($prefix) $prefix .= '/'; - $return = []; - - foreach ($this->principals as $principal) { - - if ($prefix && strpos($principal['uri'], $prefix) !== 0) continue; - - $return[] = $principal; - - } - - return $return; - - } - - function addPrincipal(array $principal) { - - $this->principals[] = $principal; - - } - - function getPrincipalByPath($path) { - - foreach ($this->getPrincipalsByPrefix('principals') as $principal) { - if ($principal['uri'] === $path) return $principal; - } - - } - - function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { - - $matches = []; - foreach ($this->getPrincipalsByPrefix($prefixPath) as $principal) { - - foreach ($searchProperties as $key => $value) { - - if (!isset($principal[$key])) { - continue 2; - } - if (mb_stripos($principal[$key], $value, 0, 'UTF-8') === false) { - continue 2; - } - - // We have a match for this searchProperty! - if ($test === 'allof') { - continue; - } else { - break; - } - - } - $matches[] = $principal['uri']; - - } - return $matches; - - } - - function getGroupMemberSet($path) { - - return isset($this->groupMembers[$path]) ? $this->groupMembers[$path] : []; - - } - - function getGroupMembership($path) { - - $membership = []; - foreach ($this->groupMembers as $group => $members) { - if (in_array($path, $members)) $membership[] = $group; - } - return $membership; - - } - - function setGroupMemberSet($path, array $members) { - - $this->groupMembers[$path] = $members; - - } - - /** - * Updates one ore more webdav properties on a principal. - * - * The list of mutations is stored in a Sabre\DAV\PropPatch object. - * To do the actual updates, you must tell this object which properties - * you're going to process with the handle() method. - * - * Calling the handle method is like telling the PropPatch object "I - * promise I can handle updating this property". - * - * Read the PropPatch documentation for more info and examples. - * - * @param string $path - * @param \Sabre\DAV\PropPatch $propPatch - */ - function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { - - $value = null; - foreach ($this->principals as $principalIndex => $value) { - if ($value['uri'] === $path) { - $principal = $value; - break; - } - } - if (!$principal) return; - - $propPatch->handleRemaining(function($mutations) use ($principal, $principalIndex) { - - foreach ($mutations as $prop => $value) { - - if (is_null($value) && isset($principal[$prop])) { - unset($principal[$prop]); - } else { - $principal[$prop] = $value; - } - - } - - $this->principals[$principalIndex] = $principal; - - return true; - - }); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOMySQLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOMySQLTest.php deleted file mode 100644 index 8779eb69f53..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOMySQLTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAVACL\PrincipalBackend; - -class PDOMySQLTest extends AbstractPDOTest { - - public $driver = 'mysql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOPgSqlTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOPgSqlTest.php deleted file mode 100644 index 302616e785c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOPgSqlTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAVACL\PrincipalBackend; - -class PDOPgSqlTest extends AbstractPDOTest { - - public $driver = 'pgsql'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOSqliteTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOSqliteTest.php deleted file mode 100644 index 48454981d54..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/PDOSqliteTest.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -namespace Sabre\DAVACL\PrincipalBackend; - -class PDOSqliteTest extends AbstractPDOTest { - - public $driver = 'sqlite'; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php deleted file mode 100644 index bcf78821bc9..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalCollectionTest.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -class PrincipalCollectionTest extends \PHPUnit_Framework_TestCase { - - function testBasic() { - - $backend = new PrincipalBackend\Mock(); - $pc = new PrincipalCollection($backend); - $this->assertTrue($pc instanceof PrincipalCollection); - - $this->assertEquals('principals', $pc->getName()); - - } - - /** - * @depends testBasic - */ - function testGetChildren() { - - $backend = new PrincipalBackend\Mock(); - $pc = new PrincipalCollection($backend); - - $children = $pc->getChildren(); - $this->assertTrue(is_array($children)); - - foreach ($children as $child) { - $this->assertTrue($child instanceof IPrincipal); - } - - } - - /** - * @depends testBasic - * @expectedException Sabre\DAV\Exception\MethodNotAllowed - */ - function testGetChildrenDisable() { - - $backend = new PrincipalBackend\Mock(); - $pc = new PrincipalCollection($backend); - $pc->disableListing = true; - - $children = $pc->getChildren(); - - } - - function testFindByUri() { - - $backend = new PrincipalBackend\Mock(); - $pc = new PrincipalCollection($backend); - $this->assertEquals('principals/user1', $pc->findByUri('mailto:user1.sabredav@sabredav.org')); - $this->assertNull($pc->findByUri('mailto:fake.user.sabredav@sabredav.org')); - $this->assertNull($pc->findByUri('')); - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalMatchTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalMatchTest.php deleted file mode 100644 index 427e37972db..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalMatchTest.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\HTTP\Request; - -class PrincipalMatchTest extends \Sabre\DAVServerTest { - - public $setupACL = true; - public $autoLogin = 'user1'; - - function testPrincipalMatch() { - - $xml = <<<XML -<?xml version="1.0"?> -<principal-match xmlns="DAV:"> - <self /> -</principal-match> -XML; - - $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); - $request->setBody($xml); - - $response = $this->request($request, 207); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:status>HTTP/1.1 200 OK</d:status> - <d:href>/principals/user1</d:href> - <d:propstat> - <d:prop/> - <d:status>HTTP/1.1 418 I'm a teapot</d:status> - </d:propstat> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $response->getBodyAsString() - ); - - } - - function testPrincipalMatchProp() { - - $xml = <<<XML -<?xml version="1.0"?> -<principal-match xmlns="DAV:"> - <self /> - <prop> - <resourcetype /> - </prop> -</principal-match> -XML; - - $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); - $request->setBody($xml); - - $response = $this->request($request, 207); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:status>HTTP/1.1 200 OK</d:status> - <d:href>/principals/user1/</d:href> - <d:propstat> - <d:prop> - <d:resourcetype><d:principal/></d:resourcetype> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $response->getBodyAsString() - ); - - } - - function testPrincipalMatchPrincipalProperty() { - - $xml = <<<XML -<?xml version="1.0"?> -<principal-match xmlns="DAV:"> - <principal-property> - <principal-URL /> - </principal-property> - <prop> - <resourcetype /> - </prop> -</principal-match> -XML; - - $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); - $request->setBody($xml); - - $response = $this->request($request, 207); - - $expected = <<<XML -<?xml version="1.0"?> -<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:status>HTTP/1.1 200 OK</d:status> - <d:href>/principals/user1/</d:href> - <d:propstat> - <d:prop> - <d:resourcetype><d:principal/></d:resourcetype> - </d:prop> - <d:status>HTTP/1.1 200 OK</d:status> - </d:propstat> -</d:multistatus> -XML; - - $this->assertXmlStringEqualsXmlString( - $expected, - $response->getBodyAsString() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php deleted file mode 100644 index 60e156d9a0a..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php +++ /dev/null @@ -1,397 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase { - - function getServer() { - - $backend = new PrincipalBackend\Mock(); - - $dir = new DAV\SimpleCollection('root'); - $principals = new PrincipalCollection($backend); - $dir->addChild($principals); - - $fakeServer = new DAV\Server($dir); - $fakeServer->sapi = new HTTP\SapiMock(); - $fakeServer->httpResponse = new HTTP\ResponseMock(); - $fakeServer->debugExceptions = true; - $plugin = new MockPlugin(); - $plugin->allowAccessToNodesWithoutACL = true; - $plugin->allowUnauthenticatedAccess = false; - - $this->assertTrue($plugin instanceof Plugin); - $fakeServer->addPlugin($plugin); - $this->assertEquals($plugin, $fakeServer->getPlugin('acl')); - - return $fakeServer; - - } - - function testDepth1() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:"> - <d:property-search> - <d:prop> - <d:displayname /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '1', - 'REQUEST_URI' => '/principals', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(400, $server->httpResponse->getStatus(), $server->httpResponse->getBodyAsString()); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - } - - - function testUnknownSearchField() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:"> - <d:property-search> - <d:prop> - <d:yourmom /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/principals', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->getStatus(), "Full body: " . $server->httpResponse->getBodyAsString()); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Vary' => ['Brief,Prefer'], - ], $server->httpResponse->getHeaders()); - - } - - function testCorrect() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:"> - <d:apply-to-principal-collection-set /> - <d:property-search> - <d:prop> - <d:displayname /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Vary' => ['Brief,Prefer'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 2, - '/d:multistatus/d:response/d:href' => 2, - '/d:multistatus/d:response/d:propstat' => 4, - '/d:multistatus/d:response/d:propstat/d:prop' => 4, - '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 2, - '/d:multistatus/d:response/d:propstat/d:status' => 4, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response body: ' . $server->httpResponse->body); - - } - - } - - function testAND() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:"> - <d:apply-to-principal-collection-set /> - <d:property-search> - <d:prop> - <d:displayname /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:property-search> - <d:prop> - <d:foo /> - </d:prop> - <d:match>bar</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Vary' => ['Brief,Prefer'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 0, - '/d:multistatus/d:response/d:href' => 0, - '/d:multistatus/d:response/d:propstat' => 0, - '/d:multistatus/d:response/d:propstat/d:prop' => 0, - '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 0, - '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 0, - '/d:multistatus/d:response/d:propstat/d:status' => 0, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response body: ' . $server->httpResponse->body); - - } - - } - function testOR() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:" test="anyof"> - <d:apply-to-principal-collection-set /> - <d:property-search> - <d:prop> - <d:displayname /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:property-search> - <d:prop> - <d:foo /> - </d:prop> - <d:match>bar</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Vary' => ['Brief,Prefer'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 2, - '/d:multistatus/d:response/d:href' => 2, - '/d:multistatus/d:response/d:propstat' => 4, - '/d:multistatus/d:response/d:propstat/d:prop' => 4, - '/d:multistatus/d:response/d:propstat/d:prop/d:displayname' => 2, - '/d:multistatus/d:response/d:propstat/d:prop/d:getcontentlength' => 2, - '/d:multistatus/d:response/d:propstat/d:status' => 4, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response body: ' . $server->httpResponse->body); - - } - - } - function testWrongUri() { - - $xml = '<?xml version="1.0"?> -<d:principal-property-search xmlns:d="DAV:"> - <d:property-search> - <d:prop> - <d:displayname /> - </d:prop> - <d:match>user</d:match> - </d:property-search> - <d:prop> - <d:displayname /> - <d:getcontentlength /> - </d:prop> -</d:principal-property-search>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - 'Vary' => ['Brief,Prefer'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:multistatus', - '/d:multistatus/d:response' => 0, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response body: ' . $server->httpResponse->body); - - } - - } -} - -class MockPlugin extends Plugin { - - function getCurrentUserPrivilegeSet($node) { - - return [ - '{DAV:}read', - '{DAV:}write', - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php deleted file mode 100644 index fa1314d108c..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/HTTP/ResponseMock.php'; - -class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase { - - function getServer() { - - $backend = new PrincipalBackend\Mock(); - - $dir = new DAV\SimpleCollection('root'); - $principals = new PrincipalCollection($backend); - $dir->addChild($principals); - - $fakeServer = new DAV\Server($dir); - $fakeServer->sapi = new HTTP\SapiMock(); - $fakeServer->httpResponse = new HTTP\ResponseMock(); - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $this->assertTrue($plugin instanceof Plugin); - $fakeServer->addPlugin($plugin); - $this->assertEquals($plugin, $fakeServer->getPlugin('acl')); - - return $fakeServer; - - } - - function testDepth1() { - - $xml = '<?xml version="1.0"?> -<d:principal-search-property-set xmlns:d="DAV:" />'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '1', - 'REQUEST_URI' => '/principals', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(400, $server->httpResponse->status); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - } - - function testDepthIncorrectXML() { - - $xml = '<?xml version="1.0"?> -<d:principal-search-property-set xmlns:d="DAV:"><d:ohell /></d:principal-search-property-set>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/principals', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(400, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - } - - function testCorrect() { - - $xml = '<?xml version="1.0"?> -<d:principal-search-property-set xmlns:d="DAV:"/>'; - - $serverVars = [ - 'REQUEST_METHOD' => 'REPORT', - 'HTTP_DEPTH' => '0', - 'REQUEST_URI' => '/principals', - ]; - - $request = HTTP\Sapi::createFromServerArray($serverVars); - $request->setBody($xml); - - $server = $this->getServer(); - $server->httpRequest = $request; - - $server->exec(); - - $this->assertEquals(200, $server->httpResponse->status, $server->httpResponse->body); - $this->assertEquals([ - 'X-Sabre-Version' => [DAV\Version::VERSION], - 'Content-Type' => ['application/xml; charset=utf-8'], - ], $server->httpResponse->getHeaders()); - - - $check = [ - '/d:principal-search-property-set', - '/d:principal-search-property-set/d:principal-search-property' => 2, - '/d:principal-search-property-set/d:principal-search-property/d:prop' => 2, - '/d:principal-search-property-set/d:principal-search-property/d:prop/d:displayname' => 1, - '/d:principal-search-property-set/d:principal-search-property/d:prop/s:email-address' => 1, - '/d:principal-search-property-set/d:principal-search-property/d:description' => 2, - ]; - - $xml = simplexml_load_string($server->httpResponse->body); - $xml->registerXPathNamespace('d', 'DAV:'); - $xml->registerXPathNamespace('s', 'http://sabredav.org/ns'); - foreach ($check as $v1 => $v2) { - - $xpath = is_int($v1) ? $v2 : $v1; - - $result = $xml->xpath($xpath); - - $count = 1; - if (!is_int($v1)) $count = $v2; - - $this->assertEquals($count, count($result), 'we expected ' . $count . ' appearances of ' . $xpath . ' . We found ' . count($result) . '. Full response body: ' . $server->httpResponse->body); - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php deleted file mode 100644 index 20622ad1757..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/PrincipalTest.php +++ /dev/null @@ -1,208 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -class PrincipalTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertTrue($principal instanceof Principal); - - } - - /** - * @expectedException Sabre\DAV\Exception - */ - function testConstructNoUri() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, []); - - } - - function testGetName() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals('admin', $principal->getName()); - - } - - function testGetDisplayName() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals('admin', $principal->getDisplayname()); - - $principal = new Principal($principalBackend, [ - 'uri' => 'principals/admin', - '{DAV:}displayname' => 'Mr. Admin' - ]); - $this->assertEquals('Mr. Admin', $principal->getDisplayname()); - - } - - function testGetProperties() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, [ - 'uri' => 'principals/admin', - '{DAV:}displayname' => 'Mr. Admin', - '{http://www.example.org/custom}custom' => 'Custom', - '{http://sabredav.org/ns}email-address' => 'admin@example.org', - ]); - - $keys = [ - '{DAV:}displayname', - '{http://www.example.org/custom}custom', - '{http://sabredav.org/ns}email-address', - ]; - $props = $principal->getProperties($keys); - - foreach ($keys as $key) $this->assertArrayHasKey($key, $props); - - $this->assertEquals('Mr. Admin', $props['{DAV:}displayname']); - - $this->assertEquals('admin@example.org', $props['{http://sabredav.org/ns}email-address']); - } - - function testUpdateProperties() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - - $propPatch = new DAV\PropPatch(['{DAV:}yourmom' => 'test']); - - $result = $principal->propPatch($propPatch); - $result = $propPatch->commit(); - $this->assertTrue($result); - - } - - function testGetPrincipalUrl() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals('principals/admin', $principal->getPrincipalUrl()); - - } - - function testGetAlternateUriSet() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, [ - 'uri' => 'principals/admin', - '{DAV:}displayname' => 'Mr. Admin', - '{http://www.example.org/custom}custom' => 'Custom', - '{http://sabredav.org/ns}email-address' => 'admin@example.org', - '{DAV:}alternate-URI-set' => [ - 'mailto:admin+1@example.org', - 'mailto:admin+2@example.org', - 'mailto:admin@example.org', - ], - ]); - - $expected = [ - 'mailto:admin+1@example.org', - 'mailto:admin+2@example.org', - 'mailto:admin@example.org', - ]; - - $this->assertEquals($expected, $principal->getAlternateUriSet()); - - } - function testGetAlternateUriSetEmpty() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, [ - 'uri' => 'principals/admin', - ]); - - $expected = []; - - $this->assertEquals($expected, $principal->getAlternateUriSet()); - - } - - function testGetGroupMemberSet() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals([], $principal->getGroupMemberSet()); - - } - function testGetGroupMembership() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals([], $principal->getGroupMembership()); - - } - - function testSetGroupMemberSet() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $principal->setGroupMemberSet(['principals/foo']); - - $this->assertEquals([ - 'principals/admin' => ['principals/foo'], - ], $principalBackend->groupMembers); - - } - - function testGetOwner() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals('principals/admin', $principal->getOwner()); - - } - - function testGetGroup() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertNull($principal->getGroup()); - - } - - function testGetACl() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertEquals([ - [ - 'privilege' => '{DAV:}all', - 'principal' => '{DAV:}owner', - 'protected' => true, - ] - ], $principal->getACL()); - - } - - /** - * @expectedException \Sabre\DAV\Exception\Forbidden - */ - function testSetACl() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $principal->setACL([]); - - } - - function testGetSupportedPrivilegeSet() { - - $principalBackend = new PrincipalBackend\Mock(); - $principal = new Principal($principalBackend, ['uri' => 'principals/admin']); - $this->assertNull($principal->getSupportedPrivilegeSet()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php deleted file mode 100644 index 2de0ba6a853..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/SimplePluginTest.php +++ /dev/null @@ -1,321 +0,0 @@ -<?php - -namespace Sabre\DAVACL; - -use Sabre\DAV; -use Sabre\HTTP; - -require_once 'Sabre/DAVACL/MockPrincipal.php'; -require_once 'Sabre/DAVACL/MockACLNode.php'; - -class SimplePluginTest extends \PHPUnit_Framework_TestCase { - - function testValues() { - - $aclPlugin = new Plugin(); - $this->assertEquals('acl', $aclPlugin->getPluginName()); - $this->assertEquals( - ['access-control', 'calendarserver-principal-property-search'], - $aclPlugin->getFeatures() - ); - - $this->assertEquals( - [ - '{DAV:}expand-property', - '{DAV:}principal-match', - '{DAV:}principal-property-search', - '{DAV:}principal-search-property-set' - ], - $aclPlugin->getSupportedReportSet('')); - - $this->assertEquals(['ACL'], $aclPlugin->getMethods('')); - - - $this->assertEquals( - 'acl', - $aclPlugin->getPluginInfo()['name'] - ); - } - - function testGetFlatPrivilegeSet() { - - $expected = [ - '{DAV:}all' => [ - 'privilege' => '{DAV:}all', - 'abstract' => false, - 'aggregates' => [ - '{DAV:}read', - '{DAV:}write', - ], - 'concrete' => '{DAV:}all', - ], - '{DAV:}read' => [ - 'privilege' => '{DAV:}read', - 'abstract' => false, - 'aggregates' => [ - '{DAV:}read-acl', - '{DAV:}read-current-user-privilege-set', - ], - 'concrete' => '{DAV:}read', - ], - '{DAV:}read-acl' => [ - 'privilege' => '{DAV:}read-acl', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}read-acl', - ], - '{DAV:}read-current-user-privilege-set' => [ - 'privilege' => '{DAV:}read-current-user-privilege-set', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}read-current-user-privilege-set', - ], - '{DAV:}write' => [ - 'privilege' => '{DAV:}write', - 'abstract' => false, - 'aggregates' => [ - '{DAV:}write-properties', - '{DAV:}write-content', - '{DAV:}unlock', - '{DAV:}bind', - '{DAV:}unbind', - ], - 'concrete' => '{DAV:}write', - ], - '{DAV:}write-properties' => [ - 'privilege' => '{DAV:}write-properties', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}write-properties', - ], - '{DAV:}write-content' => [ - 'privilege' => '{DAV:}write-content', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}write-content', - ], - '{DAV:}unlock' => [ - 'privilege' => '{DAV:}unlock', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}unlock', - ], - '{DAV:}bind' => [ - 'privilege' => '{DAV:}bind', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}bind', - ], - '{DAV:}unbind' => [ - 'privilege' => '{DAV:}unbind', - 'abstract' => false, - 'aggregates' => [], - 'concrete' => '{DAV:}unbind', - ], - - ]; - - $plugin = new Plugin(); - $plugin->allowUnauthenticatedAccess = false; - $server = new DAV\Server(); - $server->addPlugin($plugin); - $this->assertEquals($expected, $plugin->getFlatPrivilegeSet('')); - - } - - function testCurrentUserPrincipalsNotLoggedIn() { - - $acl = new Plugin(); - $acl->allowUnauthenticatedAccess = false; - $server = new DAV\Server(); - $server->addPlugin($acl); - - $this->assertEquals([], $acl->getCurrentUserPrincipals()); - - } - - function testCurrentUserPrincipalsSimple() { - - $tree = [ - - new DAV\SimpleCollection('principals', [ - new MockPrincipal('admin', 'principals/admin'), - ]) - - ]; - - $acl = new Plugin(); - $acl->allowUnauthenticatedAccess = false; - $server = new DAV\Server($tree); - $server->addPlugin($acl); - - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($auth); - - //forcing login - $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $this->assertEquals(['principals/admin'], $acl->getCurrentUserPrincipals()); - - } - - function testCurrentUserPrincipalsGroups() { - - $tree = [ - - new DAV\SimpleCollection('principals', [ - new MockPrincipal('admin', 'principals/admin', ['principals/administrators', 'principals/everyone']), - new MockPrincipal('administrators', 'principals/administrators', ['principals/groups'], ['principals/admin']), - new MockPrincipal('everyone', 'principals/everyone', [], ['principals/admin']), - new MockPrincipal('groups', 'principals/groups', [], ['principals/administrators']), - ]) - - ]; - - $acl = new Plugin(); - $acl->allowUnauthenticatedAccess = false; - $server = new DAV\Server($tree); - $server->addPlugin($acl); - - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($auth); - - //forcing login - $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $expected = [ - 'principals/admin', - 'principals/administrators', - 'principals/everyone', - 'principals/groups', - ]; - - $this->assertEquals($expected, $acl->getCurrentUserPrincipals()); - - // The second one should trigger the cache and be identical - $this->assertEquals($expected, $acl->getCurrentUserPrincipals()); - - } - - function testGetACL() { - - $acl = [ - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}read', - ], - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}write', - ], - ]; - - - $tree = [ - new MockACLNode('foo', $acl), - ]; - - $server = new DAV\Server($tree); - $aclPlugin = new Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $server->addPlugin($aclPlugin); - - $this->assertEquals($acl, $aclPlugin->getACL('foo')); - - } - - function testGetCurrentUserPrivilegeSet() { - - $acl = [ - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}read', - ], - [ - 'principal' => 'principals/user1', - 'privilege' => '{DAV:}read', - ], - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}write', - ], - ]; - - - $tree = [ - new MockACLNode('foo', $acl), - - new DAV\SimpleCollection('principals', [ - new MockPrincipal('admin', 'principals/admin'), - ]), - - ]; - - $server = new DAV\Server($tree); - $aclPlugin = new Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $server->addPlugin($aclPlugin); - - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($auth); - - //forcing login - $auth->beforeMethod(new HTTP\Request(), new HTTP\Response()); - - $expected = [ - '{DAV:}write', - '{DAV:}write-properties', - '{DAV:}write-content', - '{DAV:}unlock', - '{DAV:}write-acl', - '{DAV:}read', - '{DAV:}read-acl', - '{DAV:}read-current-user-privilege-set', - ]; - - $this->assertEquals($expected, $aclPlugin->getCurrentUserPrivilegeSet('foo')); - - } - - function testCheckPrivileges() { - - $acl = [ - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}read', - ], - [ - 'principal' => 'principals/user1', - 'privilege' => '{DAV:}read', - ], - [ - 'principal' => 'principals/admin', - 'privilege' => '{DAV:}write', - ], - ]; - - - $tree = [ - new MockACLNode('foo', $acl), - - new DAV\SimpleCollection('principals', [ - new MockPrincipal('admin', 'principals/admin'), - ]), - - ]; - - $server = new DAV\Server($tree); - $aclPlugin = new Plugin(); - $aclPlugin->allowUnauthenticatedAccess = false; - $server->addPlugin($aclPlugin); - - $auth = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock()); - $server->addPlugin($auth); - - //forcing login - //$auth->beforeMethod('GET','/'); - - $this->assertFalse($aclPlugin->checkPrivileges('foo', ['{DAV:}read'], Plugin::R_PARENT, false)); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/ACLTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/ACLTest.php deleted file mode 100644 index 7b9853fe5fe..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/ACLTest.php +++ /dev/null @@ -1,342 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\HTTP; - -class ACLTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $acl = new Acl([]); - $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\ACL', $acl); - - } - - function testSerializeEmpty() { - - $acl = new Acl([]); - $xml = (new DAV\Server())->xml->write('{DAV:}root', $acl); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" />'; - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testSerialize() { - - $privileges = [ - [ - 'principal' => 'principals/evert', - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => 'principals/foo', - 'privilege' => '{DAV:}read', - 'protected' => true, - ], - ]; - - $acl = new Acl($privileges); - $xml = (new DAV\Server())->xml->write('{DAV:}root', $acl, '/'); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:ace> - <d:principal> - <d:href>/principals/evert/</d:href> - </d:principal> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> - <d:ace> - <d:principal> - <d:href>/principals/foo/</d:href> - </d:principal> - <d:grant> - <d:privilege> - <d:read/> - </d:privilege> - </d:grant> - <d:protected/> - </d:ace> -</d:root> -'; - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testSerializeSpecialPrincipals() { - - $privileges = [ - [ - 'principal' => '{DAV:}authenticated', - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => '{DAV:}unauthenticated', - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => '{DAV:}all', - 'privilege' => '{DAV:}write', - ], - - ]; - - $acl = new Acl($privileges); - $xml = (new DAV\Server())->xml->write('{DAV:}root', $acl, '/'); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:ace> - <d:principal> - <d:authenticated/> - </d:principal> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> - <d:ace> - <d:principal> - <d:unauthenticated/> - </d:principal> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> - <d:ace> - <d:principal> - <d:all/> - </d:principal> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> -</d:root> -'; - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testUnserialize() { - - $source = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:ace> - <d:principal> - <d:href>/principals/evert/</d:href> - </d:principal> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> - <d:ace> - <d:principal> - <d:href>/principals/foo/</d:href> - </d:principal> - <d:grant> - <d:privilege> - <d:read/> - </d:privilege> - </d:grant> - <d:protected/> - </d:ace> -</d:root> -'; - - $reader = new \Sabre\Xml\Reader(); - $reader->elementMap['{DAV:}root'] = 'Sabre\DAVACL\Xml\Property\Acl'; - $reader->xml($source); - - $result = $reader->parse(); - $result = $result['value']; - - $this->assertInstanceOf('Sabre\\DAVACL\\Xml\\Property\\Acl', $result); - - $expected = [ - [ - 'principal' => '/principals/evert/', - 'protected' => false, - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => '/principals/foo/', - 'protected' => true, - 'privilege' => '{DAV:}read', - ], - ]; - - $this->assertEquals($expected, $result->getPrivileges()); - - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testUnserializeNoPrincipal() { - - $source = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:ace> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - </d:ace> -</d:root> -'; - - - $reader = new \Sabre\Xml\Reader(); - $reader->elementMap['{DAV:}root'] = 'Sabre\DAVACL\Xml\Property\Acl'; - $reader->xml($source); - - $result = $reader->parse(); - - } - - function testUnserializeOtherPrincipal() { - - $source = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:ace> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - <d:principal><d:authenticated /></d:principal> - </d:ace> - <d:ace> - <d:grant> - <d:ignoreme /> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - <d:principal><d:unauthenticated /></d:principal> - </d:ace> - <d:ace> - <d:grant> - <d:privilege> - <d:write/> - </d:privilege> - </d:grant> - <d:principal><d:all /></d:principal> - </d:ace> -</d:root> -'; - - $reader = new \Sabre\Xml\Reader(); - $reader->elementMap['{DAV:}root'] = 'Sabre\DAVACL\Xml\Property\Acl'; - $reader->xml($source); - - $result = $reader->parse(); - $result = $result['value']; - - $this->assertInstanceOf('Sabre\\DAVACL\\Xml\\Property\\Acl', $result); - - $expected = [ - [ - 'principal' => '{DAV:}authenticated', - 'protected' => false, - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => '{DAV:}unauthenticated', - 'protected' => false, - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => '{DAV:}all', - 'protected' => false, - 'privilege' => '{DAV:}write', - ], - ]; - - $this->assertEquals($expected, $result->getPrivileges()); - - } - - /** - * @expectedException Sabre\DAV\Exception\NotImplemented - */ - function testUnserializeDeny() { - - $source = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:ignore-me /> - <d:ace> - <d:deny> - <d:privilege> - <d:write/> - </d:privilege> - </d:deny> - <d:principal><d:href>/principals/evert</d:href></d:principal> - </d:ace> -</d:root> -'; - - $reader = new \Sabre\Xml\Reader(); - $reader->elementMap['{DAV:}root'] = 'Sabre\DAVACL\Xml\Property\Acl'; - $reader->xml($source); - - $result = $reader->parse(); - - } - - function testToHtml() { - - $privileges = [ - [ - 'principal' => 'principals/evert', - 'privilege' => '{DAV:}write', - ], - [ - 'principal' => 'principals/foo', - 'privilege' => '{http://example.org/ns}read', - 'protected' => true, - ], - [ - 'principal' => '{DAV:}authenticated', - 'privilege' => '{DAV:}write', - ], - ]; - - $acl = new Acl($privileges); - $html = new HtmlOutputHelper( - '/base/', - ['DAV:' => 'd'] - ); - - $expected = - '<table>' . - '<tr><th>Principal</th><th>Privilege</th><th></th></tr>' . - '<tr><td><a href="/base/principals/evert">/base/principals/evert</a></td><td><span title="{DAV:}write">d:write</span></td><td></td></tr>' . - '<tr><td><a href="/base/principals/foo">/base/principals/foo</a></td><td><span title="{http://example.org/ns}read">{http://example.org/ns}read</span></td><td>(protected)</td></tr>' . - '<tr><td><span title="{DAV:}authenticated">d:authenticated</span></td><td><span title="{DAV:}write">d:write</span></td><td></td></tr>' . - '</table>'; - - $this->assertEquals($expected, $acl->toHtml($html)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/AclRestrictionsTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/AclRestrictionsTest.php deleted file mode 100644 index 6d8b83a1285..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/AclRestrictionsTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Property; - -use Sabre\DAV; -use Sabre\HTTP; - -class AclRestrictionsTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $prop = new AclRestrictions(); - $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\AclRestrictions', $prop); - - } - - function testSerialize() { - - $prop = new AclRestrictions(); - $xml = (new DAV\Server())->xml->write('{DAV:}root', $prop); - - $expected = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"><d:grant-only/><d:no-invert/></d:root>'; - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php deleted file mode 100644 index d6e6b2d193f..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\HTTP; -use Sabre\Xml\Reader; - -class CurrentUserPrivilegeSetTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $privileges = [ - '{DAV:}read', - '{DAV:}write', - ]; - $prop = new CurrentUserPrivilegeSet($privileges); - $xml = (new DAV\Server())->xml->write('{DAV:}root', $prop); - - $expected = <<<XML -<d:root xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:privilege> - <d:read /> - </d:privilege> - <d:privilege> - <d:write /> - </d:privilege> -</d:root> -XML; - - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - } - - function testUnserialize() { - - $source = '<?xml version="1.0"?> -<d:root xmlns:d="DAV:"> - <d:privilege> - <d:write-properties /> - </d:privilege> - <d:ignoreme /> - <d:privilege> - <d:read /> - </d:privilege> -</d:root> -'; - - $result = $this->parse($source); - $this->assertTrue($result->has('{DAV:}read')); - $this->assertTrue($result->has('{DAV:}write-properties')); - $this->assertFalse($result->has('{DAV:}bind')); - - } - - function parse($xml) { - - $reader = new Reader(); - $reader->elementMap['{DAV:}root'] = 'Sabre\\DAVACL\\Xml\\Property\\CurrentUserPrivilegeSet'; - $reader->xml($xml); - $result = $reader->parse(); - return $result['value']; - - } - - function testToHtml() { - - $privileges = ['{DAV:}read', '{DAV:}write']; - - $prop = new CurrentUserPrivilegeSet($privileges); - $html = new HtmlOutputHelper( - '/base/', - ['DAV:' => 'd'] - ); - - $expected = - '<span title="{DAV:}read">d:read</span>, ' . - '<span title="{DAV:}write">d:write</span>'; - - $this->assertEquals($expected, $prop->toHtml($html)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php deleted file mode 100644 index 876d1073aaa..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\HTTP; -use Sabre\Xml\Reader; - -class PrincipalTest extends \PHPUnit_Framework_TestCase { - - function testSimple() { - - $principal = new Principal(Principal::UNAUTHENTICATED); - $this->assertEquals(Principal::UNAUTHENTICATED, $principal->getType()); - $this->assertNull($principal->getHref()); - - $principal = new Principal(Principal::AUTHENTICATED); - $this->assertEquals(Principal::AUTHENTICATED, $principal->getType()); - $this->assertNull($principal->getHref()); - - $principal = new Principal(Principal::HREF, 'admin'); - $this->assertEquals(Principal::HREF, $principal->getType()); - $this->assertEquals('admin/', $principal->getHref()); - - } - - /** - * @depends testSimple - * @expectedException Sabre\DAV\Exception - */ - function testNoHref() { - - $principal = new Principal(Principal::HREF); - - } - - /** - * @depends testSimple - */ - function testSerializeUnAuthenticated() { - - $prin = new Principal(Principal::UNAUTHENTICATED); - - $xml = (new DAV\Server())->xml->write('{DAV:}principal', $prin); - - $this->assertXmlStringEqualsXmlString(' -<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:unauthenticated/> -</d:principal>', $xml); - - } - - - /** - * @depends testSerializeUnAuthenticated - */ - function testSerializeAuthenticated() { - - $prin = new Principal(Principal::AUTHENTICATED); - $xml = (new DAV\Server())->xml->write('{DAV:}principal', $prin); - - $this->assertXmlStringEqualsXmlString(' -<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:authenticated/> -</d:principal>', $xml); - - } - - - /** - * @depends testSerializeUnAuthenticated - */ - function testSerializeHref() { - - $prin = new Principal(Principal::HREF, 'principals/admin'); - $xml = (new DAV\Server())->xml->write('{DAV:}principal', $prin, '/'); - - $this->assertXmlStringEqualsXmlString(' -<d:principal xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> -<d:href>/principals/admin/</d:href> -</d:principal>', $xml); - - } - - function testUnserializeHref() { - - $xml = '<?xml version="1.0"?> -<d:principal xmlns:d="DAV:">' . -'<d:href>/principals/admin</d:href>' . -'</d:principal>'; - - $principal = $this->parse($xml); - $this->assertEquals(Principal::HREF, $principal->getType()); - $this->assertEquals('/principals/admin/', $principal->getHref()); - - } - - function testUnserializeAuthenticated() { - - $xml = '<?xml version="1.0"?> -<d:principal xmlns:d="DAV:">' . -' <d:authenticated />' . -'</d:principal>'; - - $principal = $this->parse($xml); - $this->assertEquals(Principal::AUTHENTICATED, $principal->getType()); - - } - - function testUnserializeUnauthenticated() { - - $xml = '<?xml version="1.0"?> -<d:principal xmlns:d="DAV:">' . -' <d:unauthenticated />' . -'</d:principal>'; - - $principal = $this->parse($xml); - $this->assertEquals(Principal::UNAUTHENTICATED, $principal->getType()); - - } - - /** - * @expectedException Sabre\DAV\Exception\BadRequest - */ - function testUnserializeUnknown() { - - $xml = '<?xml version="1.0"?> -<d:principal xmlns:d="DAV:">' . -' <d:foo />' . -'</d:principal>'; - - $this->parse($xml); - - } - - function parse($xml) { - - $reader = new Reader(); - $reader->elementMap['{DAV:}principal'] = 'Sabre\\DAVACL\\Xml\\Property\\Principal'; - $reader->xml($xml); - $result = $reader->parse(); - return $result['value']; - - } - - /** - * @depends testSimple - * @dataProvider htmlProvider - */ - function testToHtml($principal, $output) { - - $html = $principal->toHtml(new HtmlOutputHelper('/', [])); - - $this->assertXmlStringEqualsXmlString( - $output, - $html - ); - - } - - /** - * Provides data for the html tests - * - * @return array - */ - function htmlProvider() { - - return [ - [ - new Principal(Principal::UNAUTHENTICATED), - '<em>unauthenticated</em>', - ], - [ - new Principal(Principal::AUTHENTICATED), - '<em>authenticated</em>', - ], - [ - new Principal(Principal::ALL), - '<em>all</em>', - ], - [ - new Principal(Principal::HREF, 'principals/admin'), - '<a href="/principals/admin/">/principals/admin/</a>', - ], - - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php deleted file mode 100644 index 749d349fc7d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Property; - -use Sabre\DAV; -use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\HTTP; - -class SupportedPrivilegeSetTest extends \PHPUnit_Framework_TestCase { - - function testSimple() { - - $prop = new SupportedPrivilegeSet([ - 'privilege' => '{DAV:}all', - ]); - $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\SupportedPrivilegeSet', $prop); - - } - - - /** - * @depends testSimple - */ - function testSerializeSimple() { - - $prop = new SupportedPrivilegeSet([]); - - $xml = (new DAV\Server())->xml->write('{DAV:}supported-privilege-set', $prop); - - $this->assertXmlStringEqualsXmlString(' -<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:supported-privilege> - <d:privilege> - <d:all/> - </d:privilege> - </d:supported-privilege> -</d:supported-privilege-set>', $xml); - - } - - /** - * @depends testSimple - */ - function testSerializeAggregate() { - - $prop = new SupportedPrivilegeSet([ - '{DAV:}read' => [], - '{DAV:}write' => [ - 'description' => 'booh', - ] - ]); - - $xml = (new DAV\Server())->xml->write('{DAV:}supported-privilege-set', $prop); - - $this->assertXmlStringEqualsXmlString(' -<d:supported-privilege-set xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> - <d:supported-privilege> - <d:privilege> - <d:all/> - </d:privilege> - <d:supported-privilege> - <d:privilege> - <d:read/> - </d:privilege> - </d:supported-privilege> - <d:supported-privilege> - <d:privilege> - <d:write/> - </d:privilege> - <d:description>booh</d:description> - </d:supported-privilege> - </d:supported-privilege> -</d:supported-privilege-set>', $xml); - - } - - function testToHtml() { - - $prop = new SupportedPrivilegeSet([ - '{DAV:}read' => [], - '{DAV:}write' => [ - 'description' => 'booh', - ], - ]); - $html = new HtmlOutputHelper( - '/base/', - ['DAV:' => 'd'] - ); - - $expected = <<<HTML -<ul class="tree"><li><span title="{DAV:}all">d:all</span> -<ul> -<li><span title="{DAV:}read">d:read</span></li> -<li><span title="{DAV:}write">d:write</span> booh</li> -</ul></li> -</ul> - -HTML; - - $this->assertEquals($expected, $prop->toHtml($html)); - - } -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/AclPrincipalPropSetReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/AclPrincipalPropSetReportTest.php deleted file mode 100644 index bae682f2155..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/AclPrincipalPropSetReportTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Request; - -class AclPrincipalPropSetReportTest extends \Sabre\DAV\Xml\XmlTest { - - protected $elementMap = [ - - '{DAV:}acl-principal-prop-set' => 'Sabre\DAVACL\Xml\Request\AclPrincipalPropSetReport', - - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> -<D:acl-principal-prop-set xmlns:D="DAV:"> - <D:prop> - <D:displayname/> - </D:prop> -</D:acl-principal-prop-set> -XML; - - $result = $this->parse($xml); - - $this->assertEquals(['{DAV:}displayname'], $result['value']->properties); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/PrincipalMatchReportTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/PrincipalMatchReportTest.php deleted file mode 100644 index 1431ab34939..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVACL/Xml/Request/PrincipalMatchReportTest.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -namespace Sabre\DAVACL\Xml\Request; - -class PrincipalMatchReportTest extends \Sabre\DAV\Xml\XmlTest { - - protected $elementMap = [ - - '{DAV:}principal-match' => 'Sabre\DAVACL\Xml\Request\PrincipalMatchReport', - - ]; - - function testDeserialize() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> - <D:principal-match xmlns:D="DAV:"> - <D:principal-property> - <D:owner/> - </D:principal-property> - </D:principal-match> -XML; - - $result = $this->parse($xml); - - $this->assertEquals(PrincipalMatchReport::PRINCIPAL_PROPERTY, $result['value']->type); - $this->assertEquals('{DAV:}owner', $result['value']->principalProperty); - - } - - function testDeserializeSelf() { - - $xml = <<<XML -<?xml version="1.0" encoding="utf-8" ?> - <D:principal-match xmlns:D="DAV:"> - <D:self /> - <D:prop> - <D:foo /> - </D:prop> - </D:principal-match> -XML; - - $result = $this->parse($xml); - - $this->assertEquals(PrincipalMatchReport::SELF, $result['value']->type); - $this->assertNull($result['value']->principalProperty); - $this->assertEquals(['{DAV:}foo'], $result['value']->properties); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVServerTest.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVServerTest.php deleted file mode 100644 index 35f240d23fa..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/DAVServerTest.php +++ /dev/null @@ -1,306 +0,0 @@ -<?php - -namespace Sabre; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; -use Sabre\HTTP\Sapi; - -/** - * This class may be used as a basis for other webdav-related unittests. - * - * This class is supposed to provide a reasonably big framework to quickly get - * a testing environment running. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -abstract class DAVServerTest extends \PHPUnit_Framework_TestCase { - - protected $setupCalDAV = false; - protected $setupCardDAV = false; - protected $setupACL = false; - protected $setupCalDAVSharing = false; - protected $setupCalDAVScheduling = false; - protected $setupCalDAVSubscriptions = false; - protected $setupCalDAVICSExport = false; - protected $setupLocks = false; - protected $setupFiles = false; - protected $setupSharing = false; - protected $setupPropertyStorage = false; - - /** - * An array with calendars. Every calendar should have - * - principaluri - * - uri - */ - protected $caldavCalendars = []; - protected $caldavCalendarObjects = []; - - protected $carddavAddressBooks = []; - protected $carddavCards = []; - - /** - * @var Sabre\DAV\Server - */ - protected $server; - protected $tree = []; - - protected $caldavBackend; - protected $carddavBackend; - protected $principalBackend; - protected $locksBackend; - protected $propertyStorageBackend; - - /** - * @var Sabre\CalDAV\Plugin - */ - protected $caldavPlugin; - - /** - * @var Sabre\CardDAV\Plugin - */ - protected $carddavPlugin; - - /** - * @var Sabre\DAVACL\Plugin - */ - protected $aclPlugin; - - /** - * @var Sabre\CalDAV\SharingPlugin - */ - protected $caldavSharingPlugin; - - /** - * CalDAV scheduling plugin - * - * @var CalDAV\Schedule\Plugin - */ - protected $caldavSchedulePlugin; - - /** - * @var Sabre\DAV\Auth\Plugin - */ - protected $authPlugin; - - /** - * @var Sabre\DAV\Locks\Plugin - */ - protected $locksPlugin; - - /** - * Sharing plugin. - * - * @var \Sabre\DAV\Sharing\Plugin - */ - protected $sharingPlugin; - - /* - * @var Sabre\DAV\PropertyStorage\Plugin - */ - protected $propertyStoragePlugin; - - /** - * If this string is set, we will automatically log in the user with this - * name. - */ - protected $autoLogin = null; - - function setUp() { - - $this->initializeEverything(); - - } - - function initializeEverything() { - - $this->setUpBackends(); - $this->setUpTree(); - - $this->server = new DAV\Server($this->tree); - $this->server->sapi = new HTTP\SapiMock(); - $this->server->debugExceptions = true; - - if ($this->setupCalDAV) { - $this->caldavPlugin = new CalDAV\Plugin(); - $this->server->addPlugin($this->caldavPlugin); - } - if ($this->setupCalDAVSharing || $this->setupSharing) { - $this->sharingPlugin = new DAV\Sharing\Plugin(); - $this->server->addPlugin($this->sharingPlugin); - } - if ($this->setupCalDAVSharing) { - $this->caldavSharingPlugin = new CalDAV\SharingPlugin(); - $this->server->addPlugin($this->caldavSharingPlugin); - } - if ($this->setupCalDAVScheduling) { - $this->caldavSchedulePlugin = new CalDAV\Schedule\Plugin(); - $this->server->addPlugin($this->caldavSchedulePlugin); - } - if ($this->setupCalDAVSubscriptions) { - $this->server->addPlugin(new CalDAV\Subscriptions\Plugin()); - } - if ($this->setupCalDAVICSExport) { - $this->caldavICSExportPlugin = new CalDAV\ICSExportPlugin(); - $this->server->addPlugin($this->caldavICSExportPlugin); - } - if ($this->setupCardDAV) { - $this->carddavPlugin = new CardDAV\Plugin(); - $this->server->addPlugin($this->carddavPlugin); - } - if ($this->setupLocks) { - $this->locksPlugin = new DAV\Locks\Plugin( - $this->locksBackend - ); - $this->server->addPlugin($this->locksPlugin); - } - if ($this->setupPropertyStorage) { - $this->propertyStoragePlugin = new DAV\PropertyStorage\Plugin( - $this->propertyStorageBackend - ); - $this->server->addPlugin($this->propertyStoragePlugin); - } - if ($this->autoLogin) { - $this->autoLogin($this->autoLogin); - } - if ($this->setupACL) { - $this->aclPlugin = new DAVACL\Plugin(); - if (!$this->autoLogin) { - $this->aclPlugin->allowUnauthenticatedAccess = false; - } - $this->aclPlugin->adminPrincipals = ['principals/admin']; - $this->server->addPlugin($this->aclPlugin); - } - - } - - /** - * Makes a request, and returns a response object. - * - * You can either pass an instance of Sabre\HTTP\Request, or an array, - * which will then be used as the _SERVER array. - * - * If $expectedStatus is set, we'll compare it with the HTTP status of - * the returned response. If it doesn't match, we'll immediately fail - * the test. - * - * @param array|\Sabre\HTTP\Request $request - * @param int $expectedStatus - * @return \Sabre\HTTP\Response - */ - function request($request, $expectedStatus = null) { - - if (is_array($request)) { - $request = HTTP\Request::createFromServerArray($request); - } - $response = new HTTP\ResponseMock(); - - $this->server->httpRequest = $request; - $this->server->httpResponse = $response; - $this->server->exec(); - - if ($expectedStatus) { - $responseBody = $expectedStatus !== $response->getStatus() ? $response->getBodyAsString() : ''; - $this->assertEquals($expectedStatus, $response->getStatus(), 'Incorrect HTTP status received for request. Response body: ' . $responseBody); - } - return $this->server->httpResponse; - - } - - /** - * This function takes a username and sets the server in a state where - * this user is logged in, and no longer requires an authentication check. - * - * @param string $userName - */ - function autoLogin($userName) { - $authBackend = new DAV\Auth\Backend\Mock(); - $authBackend->setPrincipal('principals/' . $userName); - $this->authPlugin = new DAV\Auth\Plugin($authBackend); - - // If the auth plugin already exists, we're removing its hooks: - if ($oldAuth = $this->server->getPlugin('auth')) { - $this->server->removeListener('beforeMethod', [$oldAuth, 'beforeMethod']); - } - $this->server->addPlugin($this->authPlugin); - - // This will trigger the actual login procedure - $this->authPlugin->beforeMethod(new Request(), new Response()); - } - - /** - * Override this to provide your own Tree for your test-case. - */ - function setUpTree() { - - if ($this->setupCalDAV) { - $this->tree[] = new CalDAV\CalendarRoot( - $this->principalBackend, - $this->caldavBackend - ); - } - if ($this->setupCardDAV) { - $this->tree[] = new CardDAV\AddressBookRoot( - $this->principalBackend, - $this->carddavBackend - ); - } - - if ($this->setupCalDAV) { - $this->tree[] = new CalDAV\Principal\Collection( - $this->principalBackend - ); - } elseif ($this->setupCardDAV || $this->setupACL) { - $this->tree[] = new DAVACL\PrincipalCollection( - $this->principalBackend - ); - } - if ($this->setupFiles) { - - $this->tree[] = new DAV\Mock\Collection('files'); - - } - - } - - function setUpBackends() { - - if ($this->setupCalDAVSharing && is_null($this->caldavBackend)) { - $this->caldavBackend = new CalDAV\Backend\MockSharing($this->caldavCalendars, $this->caldavCalendarObjects); - } - if ($this->setupCalDAVSubscriptions && is_null($this->caldavBackend)) { - $this->caldavBackend = new CalDAV\Backend\MockSubscriptionSupport($this->caldavCalendars, $this->caldavCalendarObjects); - } - if ($this->setupCalDAV && is_null($this->caldavBackend)) { - if ($this->setupCalDAVScheduling) { - $this->caldavBackend = new CalDAV\Backend\MockScheduling($this->caldavCalendars, $this->caldavCalendarObjects); - } else { - $this->caldavBackend = new CalDAV\Backend\Mock($this->caldavCalendars, $this->caldavCalendarObjects); - } - } - if ($this->setupCardDAV && is_null($this->carddavBackend)) { - $this->carddavBackend = new CardDAV\Backend\Mock($this->carddavAddressBooks, $this->carddavCards); - } - if ($this->setupCardDAV || $this->setupCalDAV || $this->setupACL) { - $this->principalBackend = new DAVACL\PrincipalBackend\Mock(); - } - if ($this->setupLocks) { - $this->locksBackend = new DAV\Locks\Backend\Mock(); - } - if ($this->setupPropertyStorage) { - $this->propertyStorageBackend = new DAV\PropertyStorage\Backend\Mock(); - } - - } - - - function assertHttpStatus($expectedStatus, HTTP\Request $req) { - - $resp = $this->request($req); - $this->assertEquals((int)$expectedStatus, (int)$resp->status, 'Incorrect HTTP status received: ' . $resp->body); - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/ResponseMock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/ResponseMock.php deleted file mode 100644 index eb486bf5b89..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/ResponseMock.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -/** - * HTTP Response Mock object - * - * This class exists to make the transition to sabre/http easier. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ResponseMock extends Response { - - /** - * Making these public. - */ - public $body; - public $status; - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/SapiMock.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/SapiMock.php deleted file mode 100644 index e2888a9da79..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/HTTP/SapiMock.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -/** - * HTTP Response Mock object - * - * This class exists to make the transition to sabre/http easier. - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class SapiMock extends Sapi { - - static $sent = 0; - - /** - * Overriding this so nothing is ever echo'd. - * - * @param ResponseInterface $response - * @return void - */ - static function sendResponse(ResponseInterface $response) { - - self::$sent++; - - } - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/Sabre/TestUtil.php b/htdocs/includes/sabre/sabre/dav/tests/Sabre/TestUtil.php deleted file mode 100644 index 9df94915fb2..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/Sabre/TestUtil.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Sabre; - -class TestUtil { - - /** - * This function deletes all the contents of the temporary directory. - * - * @return void - */ - static function clearTempDir() { - - self::deleteTree(SABRE_TEMPDIR, false); - - } - - - private static function deleteTree($path, $deleteRoot = true) { - - foreach (scandir($path) as $node) { - - if ($node == '.' || $node == '..') continue; - $myPath = $path . '/' . $node; - if (is_file($myPath)) { - unlink($myPath); - } else { - self::deleteTree($myPath); - } - - } - if ($deleteRoot) { - rmdir($path); - } - - } - - static function getMySQLDB() { - - try { - $pdo = new \PDO(SABRE_MYSQLDSN, SABRE_MYSQLUSER, SABRE_MYSQLPASS); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - return $pdo; - } catch (\PDOException $e) { - return null; - } - - } - - static function getSQLiteDB() { - - $pdo = new \PDO('sqlite:' . SABRE_TEMPDIR . '/pdobackend'); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - return $pdo; - - } - - static function getPgSqlDB() { - - //try { - $pdo = new \PDO(SABRE_PGSQLDSN); - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - return $pdo; - //} catch (\PDOException $e) { - // return null; - //} - - } - - -} diff --git a/htdocs/includes/sabre/sabre/dav/tests/bootstrap.php b/htdocs/includes/sabre/sabre/dav/tests/bootstrap.php deleted file mode 100644 index 26eb32aa284..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/bootstrap.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -set_include_path(__DIR__ . '/../lib/' . PATH_SEPARATOR . __DIR__ . PATH_SEPARATOR . get_include_path()); - -$autoLoader = include __DIR__ . '/../vendor/autoload.php'; - -// SabreDAV tests auto loading -$autoLoader->add('Sabre\\', __DIR__); -// VObject tests auto loading -$autoLoader->addPsr4('Sabre\\VObject\\', __DIR__ . '/../vendor/sabre/vobject/tests/VObject'); -$autoLoader->addPsr4('Sabre\\Xml\\', __DIR__ . '/../vendor/sabre/xml/tests/Sabre/Xml'); - -date_default_timezone_set('UTC'); - -$config = [ - 'SABRE_TEMPDIR' => dirname(__FILE__) . '/temp/', - 'SABRE_HASSQLITE' => in_array('sqlite', PDO::getAvailableDrivers()), - 'SABRE_HASMYSQL' => in_array('mysql', PDO::getAvailableDrivers()), - 'SABRE_HASPGSQL' => in_array('pgsql', PDO::getAvailableDrivers()), - 'SABRE_MYSQLDSN' => 'mysql:host=127.0.0.1;dbname=sabredav_test', - 'SABRE_MYSQLUSER' => 'sabredav', - 'SABRE_MYSQLPASS' => '', - 'SABRE_PGSQLDSN' => 'pgsql:host=localhost;dbname=sabredav_test;user=sabredav;password=sabredav', -]; - -if (file_exists(__DIR__ . '/config.user.php')) { - include __DIR__ . '/config.user.php'; - foreach ($userConfig as $key => $value) { - $config[$key] = $value; - } -} - -foreach ($config as $key => $value) { - if (!defined($key)) define($key, $value); -} - -if (!file_exists(SABRE_TEMPDIR)) mkdir(SABRE_TEMPDIR); -if (file_exists('.sabredav')) unlink('.sabredav'); diff --git a/htdocs/includes/sabre/sabre/dav/tests/phpcs/ruleset.xml b/htdocs/includes/sabre/sabre/dav/tests/phpcs/ruleset.xml deleted file mode 100644 index ec2c4c84b1d..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/phpcs/ruleset.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<ruleset name="sabre.php"> - <description>sabre.io codesniffer ruleset</description> - - <!-- Include the whole PSR-1 standard --> - <rule ref="PSR1" /> - - <!-- All PHP files MUST use the Unix LF (linefeed) line ending. --> - <rule ref="Generic.Files.LineEndings"> - <properties> - <property name="eolChar" value="\n"/> - </properties> - </rule> - - <!-- The closing ?> tag MUST be omitted from files containing only PHP. --> - <rule ref="Zend.Files.ClosingTag"/> - - <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> - <properties> - <property name="ignoreBlankLines" value="true"/> - </properties> - </rule> - - <!-- There MUST NOT be more than one statement per line. --> - <rule ref="Generic.Formatting.DisallowMultipleStatements"/> - - <rule ref="Generic.WhiteSpace.ScopeIndent"> - <properties> - <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/> - </properties> - </rule> - <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> - - <!-- PHP keywords MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseKeyword"/> - - <!-- The PHP constants true, false, and null MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseConstant"/> - - <!-- <rule ref="Squiz.Scope.MethodScope"/> --> - <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> - - <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. --> - <!-- - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> - <properties> - <property name="equalsSpacing" value="1"/> - </properties> - </rule> - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> - <severity>0</severity> - </rule> - --> - <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/> - -</ruleset> diff --git a/htdocs/includes/sabre/sabre/dav/tests/phpunit.xml.dist b/htdocs/includes/sabre/sabre/dav/tests/phpunit.xml.dist deleted file mode 100644 index 453fabb82ad..00000000000 --- a/htdocs/includes/sabre/sabre/dav/tests/phpunit.xml.dist +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<phpunit - colors="true" - bootstrap="bootstrap.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - beStrictAboutTestsThatDoNotTestAnything="true" - beStrictAboutOutputDuringTests="true" - beStrictAboutTestSize="true"> - - <testsuite name="sabre-event"> - <directory>../vendor/sabre/event/tests/</directory> - </testsuite> - <testsuite name="sabre-uri"> - <directory>../vendor/sabre/uri/tests/</directory> - </testsuite> - <testsuite name="sabre-xml"> - <directory>../vendor/sabre/xml/tests/Sabre/Xml/</directory> - </testsuite> - <testsuite name="sabre-http"> - <directory>../vendor/sabre/http/tests/HTTP</directory> - </testsuite> - <testsuite name="sabre-vobject"> - <directory>../vendor/sabre/vobject/tests/VObject</directory> - </testsuite> - - <testsuite name="sabre-dav"> - <directory>Sabre/DAV</directory> - </testsuite> - <testsuite name="sabre-davacl"> - <directory>Sabre/DAVACL</directory> - </testsuite> - <testsuite name="sabre-caldav"> - <directory>Sabre/CalDAV</directory> - </testsuite> - <testsuite name="sabre-carddav"> - <directory>Sabre/CardDAV</directory> - </testsuite> - - <filter> - <whitelist addUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">../lib/</directory> - </whitelist> - </filter> -</phpunit> diff --git a/htdocs/includes/sabre/sabre/event/tests/ContinueCallbackTest.php b/htdocs/includes/sabre/sabre/event/tests/ContinueCallbackTest.php deleted file mode 100644 index c469913795f..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/ContinueCallbackTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace Sabre\Event; - -class ContinueCallbackTest extends \PHPUnit_Framework_TestCase { - - function testContinueCallBack() { - - $ee = new EventEmitter(); - - $handlerCounter = 0; - $bla = function() use (&$handlerCounter) { - $handlerCounter++; - }; - $ee->on('foo', $bla); - $ee->on('foo', $bla); - $ee->on('foo', $bla); - - $continueCounter = 0; - $r = $ee->emit('foo', [], function() use (&$continueCounter) { - $continueCounter++; - return true; - }); - $this->assertTrue($r); - $this->assertEquals(3, $handlerCounter); - $this->assertEquals(2, $continueCounter); - - } - - function testContinueCallBackBreak() { - - $ee = new EventEmitter(); - - $handlerCounter = 0; - $bla = function() use (&$handlerCounter) { - $handlerCounter++; - }; - $ee->on('foo', $bla); - $ee->on('foo', $bla); - $ee->on('foo', $bla); - - $continueCounter = 0; - $r = $ee->emit('foo', [], function() use (&$continueCounter) { - $continueCounter++; - return false; - }); - $this->assertTrue($r); - $this->assertEquals(1, $handlerCounter); - $this->assertEquals(1, $continueCounter); - - } - - function testContinueCallBackBreakByHandler() { - - $ee = new EventEmitter(); - - $handlerCounter = 0; - $bla = function() use (&$handlerCounter) { - $handlerCounter++; - return false; - }; - $ee->on('foo', $bla); - $ee->on('foo', $bla); - $ee->on('foo', $bla); - - $continueCounter = 0; - $r = $ee->emit('foo', [], function() use (&$continueCounter) { - $continueCounter++; - return false; - }); - $this->assertFalse($r); - $this->assertEquals(1, $handlerCounter); - $this->assertEquals(0, $continueCounter); - - } -} diff --git a/htdocs/includes/sabre/sabre/event/tests/CoroutineTest.php b/htdocs/includes/sabre/sabre/event/tests/CoroutineTest.php deleted file mode 100644 index 6e4b666b042..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/CoroutineTest.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -namespace Sabre\Event; - -class CoroutineTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \InvalidArgumentException - */ - function testNonGenerator() { - - coroutine(function() {}); - - } - - function testBasicCoroutine() { - - $start = 0; - - coroutine(function() use (&$start) { - - $start += 1; - yield; - - }); - - $this->assertEquals(1, $start); - - } - - function testFulfilledPromise() { - - $start = 0; - $promise = new Promise(function($fulfill, $reject) { - $fulfill(2); - }); - - coroutine(function() use (&$start, $promise) { - - $start += 1; - $start += (yield $promise); - - }); - - Loop\run(); - $this->assertEquals(3, $start); - - } - - function testRejectedPromise() { - - $start = 0; - $promise = new Promise(function($fulfill, $reject) { - $reject(2); - }); - - coroutine(function() use (&$start, $promise) { - - $start += 1; - try { - $start += (yield $promise); - // This line is unreachable, but it's our control - $start += 4; - } catch (\Exception $e) { - $start += $e->getMessage(); - } - - }); - - Loop\run(); - $this->assertEquals(3, $start); - - } - - function testRejectedPromiseException() { - - $start = 0; - $promise = new Promise(function($fulfill, $reject) { - $reject(new \LogicException('2')); - }); - - coroutine(function() use (&$start, $promise) { - - $start += 1; - try { - $start += (yield $promise); - // This line is unreachable, but it's our control - $start += 4; - } catch (\LogicException $e) { - $start += $e->getMessage(); - } - - }); - - Loop\run(); - $this->assertEquals(3, $start); - - } - - function testRejectedPromiseArray() { - - $start = 0; - $promise = new Promise(function($fulfill, $reject) { - $reject([]); - }); - - coroutine(function() use (&$start, $promise) { - - $start += 1; - try { - $start += (yield $promise); - // This line is unreachable, but it's our control - $start += 4; - } catch (\Exception $e) { - $this->assertTrue(strpos($e->getMessage(), 'Promise was rejected with') === 0); - $start += 2; - } - - })->wait(); - - $this->assertEquals(3, $start); - - } - - function testFulfilledPromiseAsync() { - - $start = 0; - $promise = new Promise(); - coroutine(function() use (&$start, $promise) { - - $start += 1; - $start += (yield $promise); - - }); - Loop\run(); - - $this->assertEquals(1, $start); - - $promise->fulfill(2); - Loop\run(); - - $this->assertEquals(3, $start); - - } - - function testRejectedPromiseAsync() { - - $start = 0; - $promise = new Promise(); - coroutine(function() use (&$start, $promise) { - - $start += 1; - try { - $start += (yield $promise); - // This line is unreachable, but it's our control - $start += 4; - } catch (\Exception $e) { - $start += $e->getMessage(); - } - - }); - - $this->assertEquals(1, $start); - - $promise->reject(new \Exception(2)); - Loop\run(); - - $this->assertEquals(3, $start); - - } - - function testCoroutineException() { - - $start = 0; - coroutine(function() use (&$start) { - - $start += 1; - $start += (yield 2); - - throw new \Exception('4'); - - })->error(function($e) use (&$start) { - - $start += $e->getMessage(); - - }); - Loop\run(); - - $this->assertEquals(7, $start); - - } - - function testDeepException() { - - $start = 0; - $promise = new Promise(); - coroutine(function() use (&$start, $promise) { - - $start += 1; - $start += (yield $promise); - - })->error(function($e) use (&$start) { - - $start += $e->getMessage(); - - }); - - $this->assertEquals(1, $start); - - $promise->reject(new \Exception(2)); - Loop\run(); - - $this->assertEquals(3, $start); - - } - - function testResolveToLastYield() { - - $ok = false; - coroutine(function() { - - yield 1; - yield 2; - $hello = 'hi'; - - })->then(function($value) use (&$ok) { - $this->assertEquals(2, $value); - $ok = true; - })->error(function($reason) { - $this->fail($reason); - }); - Loop\run(); - - $this->assertTrue($ok); - - } - - function testResolveToLastYieldPromise() { - - $ok = false; - - $promise = new Promise(); - - coroutine(function() use ($promise) { - - yield 'fail'; - yield $promise; - $hello = 'hi'; - - })->then(function($value) use (&$ok) { - $ok = $value; - $this->fail($reason); - }); - - $promise->fulfill('omg it worked'); - Loop\run(); - - $this->assertEquals('omg it worked', $ok); - - } - -} diff --git a/htdocs/includes/sabre/sabre/event/tests/EventEmitterTest.php b/htdocs/includes/sabre/sabre/event/tests/EventEmitterTest.php deleted file mode 100644 index df08e9cd84a..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/EventEmitterTest.php +++ /dev/null @@ -1,318 +0,0 @@ -<?php - -namespace Sabre\Event; - -class EventEmitterTest extends \PHPUnit_Framework_TestCase { - - function testInit() { - - $ee = new EventEmitter(); - $this->assertInstanceOf('Sabre\\Event\\EventEmitter', $ee); - - } - - function testListeners() { - - $ee = new EventEmitter(); - - $callback1 = function() { }; - $callback2 = function() { }; - $ee->on('foo', $callback1, 200); - $ee->on('foo', $callback2, 100); - - $this->assertEquals([$callback2, $callback1], $ee->listeners('foo')); - - } - - /** - * @depends testInit - */ - function testHandleEvent() { - - $argResult = null; - - $ee = new EventEmitter(); - $ee->on('foo', function($arg) use (&$argResult) { - - $argResult = $arg; - - }); - - $this->assertTrue( - $ee->emit('foo', ['bar']) - ); - - $this->assertEquals('bar', $argResult); - - } - - /** - * @depends testHandleEvent - */ - function testCancelEvent() { - - $argResult = 0; - - $ee = new EventEmitter(); - $ee->on('foo', function($arg) use (&$argResult) { - - $argResult = 1; - return false; - - }); - $ee->on('foo', function($arg) use (&$argResult) { - - $argResult = 2; - - }); - - $this->assertFalse( - $ee->emit('foo', ['bar']) - ); - - $this->assertEquals(1, $argResult); - - } - - /** - * @depends testCancelEvent - */ - function testPriority() { - - $argResult = 0; - - $ee = new EventEmitter(); - $ee->on('foo', function($arg) use (&$argResult) { - - $argResult = 1; - return false; - - }); - $ee->on('foo', function($arg) use (&$argResult) { - - $argResult = 2; - return false; - - }, 1); - - $this->assertFalse( - $ee->emit('foo', ['bar']) - ); - - $this->assertEquals(2, $argResult); - - } - - /** - * @depends testPriority - */ - function testPriority2() { - - $result = []; - $ee = new EventEmitter(); - - $ee->on('foo', function() use (&$result) { - - $result[] = 'a'; - - }, 200); - $ee->on('foo', function() use (&$result) { - - $result[] = 'b'; - - }, 50); - $ee->on('foo', function() use (&$result) { - - $result[] = 'c'; - - }, 300); - $ee->on('foo', function() use (&$result) { - - $result[] = 'd'; - - }); - - $ee->emit('foo'); - $this->assertEquals(['b', 'd', 'a', 'c'], $result); - - } - - function testRemoveListener() { - - $result = false; - - $callBack = function() use (&$result) { - - $result = true; - - }; - - $ee = new EventEmitter(); - - $ee->on('foo', $callBack); - - $ee->emit('foo'); - $this->assertTrue($result); - $result = false; - - $this->assertTrue( - $ee->removeListener('foo', $callBack) - ); - - $ee->emit('foo'); - $this->assertFalse($result); - - } - - function testRemoveUnknownListener() { - - $result = false; - - $callBack = function() use (&$result) { - - $result = true; - - }; - - $ee = new EventEmitter(); - - $ee->on('foo', $callBack); - - $ee->emit('foo'); - $this->assertTrue($result); - $result = false; - - $this->assertFalse($ee->removeListener('bar', $callBack)); - - $ee->emit('foo'); - $this->assertTrue($result); - - } - - function testRemoveListenerTwice() { - - $result = false; - - $callBack = function() use (&$result) { - - $result = true; - - }; - - $ee = new EventEmitter(); - - $ee->on('foo', $callBack); - - $ee->emit('foo'); - $this->assertTrue($result); - $result = false; - - $this->assertTrue( - $ee->removeListener('foo', $callBack) - ); - $this->assertFalse( - $ee->removeListener('foo', $callBack) - ); - - $ee->emit('foo'); - $this->assertFalse($result); - - } - - function testRemoveAllListeners() { - - $result = false; - $callBack = function() use (&$result) { - - $result = true; - - }; - - $ee = new EventEmitter(); - $ee->on('foo', $callBack); - - $ee->emit('foo'); - $this->assertTrue($result); - $result = false; - - $ee->removeAllListeners('foo'); - - $ee->emit('foo'); - $this->assertFalse($result); - - } - - function testRemoveAllListenersNoArg() { - - $result = false; - - $callBack = function() use (&$result) { - - $result = true; - - }; - - - $ee = new EventEmitter(); - $ee->on('foo', $callBack); - - $ee->emit('foo'); - $this->assertTrue($result); - $result = false; - - $ee->removeAllListeners(); - - $ee->emit('foo'); - $this->assertFalse($result); - - } - - function testOnce() { - - $result = 0; - - $callBack = function() use (&$result) { - - $result++; - - }; - - $ee = new EventEmitter(); - $ee->once('foo', $callBack); - - $ee->emit('foo'); - $ee->emit('foo'); - - $this->assertEquals(1, $result); - - } - - /** - * @depends testCancelEvent - */ - function testPriorityOnce() { - - $argResult = 0; - - $ee = new EventEmitter(); - $ee->once('foo', function($arg) use (&$argResult) { - - $argResult = 1; - return false; - - }); - $ee->once('foo', function($arg) use (&$argResult) { - - $argResult = 2; - return false; - - }, 1); - - $this->assertFalse( - $ee->emit('foo', ['bar']) - ); - - $this->assertEquals(2, $argResult); - - } -} diff --git a/htdocs/includes/sabre/sabre/event/tests/Loop/FunctionsTest.php b/htdocs/includes/sabre/sabre/event/tests/Loop/FunctionsTest.php deleted file mode 100644 index 08bf306c37f..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/Loop/FunctionsTest.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php - -namespace Sabre\Event\Loop; - -class FunctionsTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - // Always creating a fresh loop object. - instance(new Loop()); - - } - - function tearDown() { - - // Removing the global loop object. - instance(null); - - } - - function testNextTick() { - - $check = 0; - nextTick(function() use (&$check) { - - $check++; - - }); - - run(); - - $this->assertEquals(1, $check); - - } - - function testTimeout() { - - $check = 0; - setTimeout(function() use (&$check) { - - $check++; - - }, 0.02); - - run(); - - $this->assertEquals(1, $check); - - } - - function testTimeoutOrder() { - - $check = []; - setTimeout(function() use (&$check) { - - $check[] = 'a'; - - }, 0.2); - setTimeout(function() use (&$check) { - - $check[] = 'b'; - - }, 0.1); - setTimeout(function() use (&$check) { - - $check[] = 'c'; - - }, 0.3); - - run(); - - $this->assertEquals(['b', 'a', 'c'], $check); - - } - - function testSetInterval() { - - $check = 0; - $intervalId = null; - $intervalId = setInterval(function() use (&$check, &$intervalId) { - - $check++; - if ($check > 5) { - clearInterval($intervalId); - } - - }, 0.02); - - run(); - $this->assertEquals(6, $check); - - } - - function testAddWriteStream() { - - $h = fopen('php://temp', 'r+'); - addWriteStream($h, function() use ($h) { - - fwrite($h, 'hello world'); - removeWriteStream($h); - - }); - run(); - rewind($h); - $this->assertEquals('hello world', stream_get_contents($h)); - - } - - function testAddReadStream() { - - $h = fopen('php://temp', 'r+'); - fwrite($h, 'hello world'); - rewind($h); - - $result = null; - - addReadStream($h, function() use ($h, &$result) { - - $result = fgets($h); - removeReadStream($h); - - }); - run(); - $this->assertEquals('hello world', $result); - - } - - function testStop() { - - $check = 0; - setTimeout(function() use (&$check) { - $check++; - }, 200); - - nextTick(function() { - stop(); - }); - run(); - - $this->assertEquals(0, $check); - - } - - function testTick() { - - $check = 0; - setTimeout(function() use (&$check) { - $check++; - }, 1); - - nextTick(function() use (&$check) { - $check++; - }); - tick(); - - $this->assertEquals(1, $check); - - } - -} diff --git a/htdocs/includes/sabre/sabre/event/tests/Loop/LoopTest.php b/htdocs/includes/sabre/sabre/event/tests/Loop/LoopTest.php deleted file mode 100644 index a9cf551bddb..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/Loop/LoopTest.php +++ /dev/null @@ -1,180 +0,0 @@ -<?php - -namespace Sabre\Event\Loop; - -class LoopTest extends \PHPUnit_Framework_TestCase { - - function testNextTick() { - - $loop = new Loop(); - $check = 0; - $loop->nextTick(function() use (&$check) { - - $check++; - - }); - - $loop->run(); - - $this->assertEquals(1, $check); - - } - - function testTimeout() { - - $loop = new Loop(); - $check = 0; - $loop->setTimeout(function() use (&$check) { - - $check++; - - }, 0.02); - - $loop->run(); - - $this->assertEquals(1, $check); - - } - - function testTimeoutOrder() { - - $loop = new Loop(); - $check = []; - $loop->setTimeout(function() use (&$check) { - - $check[] = 'a'; - - }, 0.2); - $loop->setTimeout(function() use (&$check) { - - $check[] = 'b'; - - }, 0.1); - $loop->setTimeout(function() use (&$check) { - - $check[] = 'c'; - - }, 0.3); - - $loop->run(); - - $this->assertEquals(['b', 'a', 'c'], $check); - - } - - function testSetInterval() { - - $loop = new Loop(); - $check = 0; - $intervalId = null; - $intervalId = $loop->setInterval(function() use (&$check, &$intervalId, $loop) { - - $check++; - if ($check > 5) { - $loop->clearInterval($intervalId); - } - - }, 0.02); - - $loop->run(); - $this->assertEquals(6, $check); - - } - - function testAddWriteStream() { - - $h = fopen('php://temp', 'r+'); - $loop = new Loop(); - $loop->addWriteStream($h, function() use ($h, $loop) { - - fwrite($h, 'hello world'); - $loop->removeWriteStream($h); - - }); - $loop->run(); - rewind($h); - $this->assertEquals('hello world', stream_get_contents($h)); - - } - - function testAddReadStream() { - - $h = fopen('php://temp', 'r+'); - fwrite($h, 'hello world'); - rewind($h); - - $loop = new Loop(); - - $result = null; - - $loop->addReadStream($h, function() use ($h, $loop, &$result) { - - $result = fgets($h); - $loop->removeReadStream($h); - - }); - $loop->run(); - $this->assertEquals('hello world', $result); - - } - - function testStop() { - - $check = 0; - $loop = new Loop(); - $loop->setTimeout(function() use (&$check) { - $check++; - }, 200); - - $loop->nextTick(function() use ($loop) { - $loop->stop(); - }); - $loop->run(); - - $this->assertEquals(0, $check); - - } - - function testTick() { - - $check = 0; - $loop = new Loop(); - $loop->setTimeout(function() use (&$check) { - $check++; - }, 1); - - $loop->nextTick(function() use ($loop, &$check) { - $check++; - }); - $loop->tick(); - - $this->assertEquals(1, $check); - - } - - /** - * Here we add a new nextTick function as we're in the middle of a current - * nextTick. - */ - function testNextTickStacking() { - - $loop = new Loop(); - $check = 0; - $loop->nextTick(function() use (&$check, $loop) { - - $loop->nextTick(function() use (&$check) { - - $check++; - - }); - $check++; - - }); - - $loop->run(); - - $this->assertEquals(2, $check); - - } - -} diff --git a/htdocs/includes/sabre/sabre/event/tests/Promise/FunctionsTest.php b/htdocs/includes/sabre/sabre/event/tests/Promise/FunctionsTest.php deleted file mode 100644 index 51e47ae297b..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/Promise/FunctionsTest.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php - -namespace Sabre\Event\Promise; - -use Sabre\Event\Loop; -use Sabre\Event\Promise; - -class FunctionsTest extends \PHPUnit_Framework_TestCase { - - function testAll() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\all([$promise1, $promise2])->then(function($value) use (&$finalValue) { - - $finalValue = $value; - - }); - - $promise1->fulfill(1); - Loop\run(); - $this->assertEquals(0, $finalValue); - - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals([1, 2], $finalValue); - - } - - function testAllReject() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->reject(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testAllRejectThenResolve() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testRace() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\race([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = $value; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->fulfill(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testRaceReject() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\race([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = $value; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->reject(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testResolve() { - - $finalValue = 0; - - $promise = resolve(1); - $promise->then(function($value) use (&$finalValue) { - - $finalValue = $value; - - }); - - $this->assertEquals(0, $finalValue); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - /** - * @expectedException \Exception - */ - function testResolvePromise() { - - $finalValue = 0; - - $promise = new Promise(); - $promise->reject(new \Exception('uh oh')); - - $newPromise = resolve($promise); - $newPromise->wait(); - - } - - function testReject() { - - $finalValue = 0; - - $promise = reject(1); - $promise->then(function($value) use (&$finalValue) { - - $finalValue = 'im broken'; - - }, function($reason) use (&$finalValue) { - - $finalValue = $reason; - - }); - - $this->assertEquals(0, $finalValue); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/event/tests/Promise/PromiseTest.php b/htdocs/includes/sabre/sabre/event/tests/Promise/PromiseTest.php deleted file mode 100644 index 69838397881..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/Promise/PromiseTest.php +++ /dev/null @@ -1,341 +0,0 @@ -<?php - -namespace Sabre\Event\Promise; - -use Sabre\Event\Loop; -use Sabre\Event\Promise; - -class PromiseTest extends \PHPUnit_Framework_TestCase { - - function testSuccess() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - Loop\run(); - - $this->assertEquals(3, $finalValue); - - } - - function testFail() { - - $finalValue = 0; - $promise = new Promise(); - $promise->reject(1); - - $promise->then(null, function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - Loop\run(); - - $this->assertEquals(3, $finalValue); - - } - - function testChain() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - return $finalValue; - })->then(function($value) use (&$finalValue) { - $finalValue = $value + 4; - return $finalValue; - }); - Loop\run(); - - $this->assertEquals(7, $finalValue); - - } - function testChainPromise() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $subPromise = new Promise(); - - $promise->then(function($value) use ($subPromise) { - return $subPromise; - })->then(function($value) use (&$finalValue) { - $finalValue = $value + 4; - return $finalValue; - }); - - $subPromise->fulfill(2); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testPendingResult() { - - $finalValue = 0; - $promise = new Promise(); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - - $promise->fulfill(4); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testPendingFail() { - - $finalValue = 0; - $promise = new Promise(); - - $promise->then(null, function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - - $promise->reject(4); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testExecutorSuccess() { - - $promise = (new Promise(function($success, $fail) { - - $success('hi'); - - }))->then(function($result) use (&$realResult) { - - $realResult = $result; - - }); - Loop\run(); - - $this->assertEquals('hi', $realResult); - - } - - function testExecutorFail() { - - $promise = (new Promise(function($success, $fail) { - - $fail('hi'); - - }))->then(function($result) use (&$realResult) { - - $realResult = 'incorrect'; - - }, function($reason) use (&$realResult) { - - $realResult = $reason; - - }); - Loop\run(); - - $this->assertEquals('hi', $realResult); - - } - - /** - * @expectedException \Sabre\Event\PromiseAlreadyResolvedException - */ - function testFulfillTwice() { - - $promise = new Promise(); - $promise->fulfill(1); - $promise->fulfill(1); - - } - - /** - * @expectedException \Sabre\Event\PromiseAlreadyResolvedException - */ - function testRejectTwice() { - - $promise = new Promise(); - $promise->reject(1); - $promise->reject(1); - - } - - function testFromFailureHandler() { - - $ok = 0; - $promise = new Promise(); - $promise->otherwise(function($reason) { - - $this->assertEquals('foo', $reason); - throw new \Exception('hi'); - - })->then(function() use (&$ok) { - - $ok = -1; - - }, function() use (&$ok) { - - $ok = 1; - - }); - - $this->assertEquals(0, $ok); - $promise->reject('foo'); - Loop\run(); - - $this->assertEquals(1, $ok); - - } - - function testAll() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then(function($value) use (&$finalValue) { - - $finalValue = $value; - - }); - - $promise1->fulfill(1); - Loop\run(); - $this->assertEquals(0, $finalValue); - - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals([1, 2], $finalValue); - - } - - function testAllReject() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->reject(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testAllRejectThenResolve() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testWaitResolve() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->fulfill(1); - }); - $this->assertEquals( - 1, - $promise->wait() - ); - - } - - /** - * @expectedException \LogicException - */ - function testWaitWillNeverResolve() { - - $promise = new Promise(); - $promise->wait(); - - } - - function testWaitRejectedException() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject(new \OutOfBoundsException('foo')); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('OutOfBoundsException', $e); - $this->assertEquals('foo', $e->getMessage()); - } - - } - - function testWaitRejectedScalar() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject('foo'); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('Exception', $e); - $this->assertEquals('foo', $e->getMessage()); - } - - } - - function testWaitRejectedNonScalar() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject([]); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('Exception', $e); - $this->assertEquals('Promise was rejected with reason of type: array', $e->getMessage()); - } - - } -} diff --git a/htdocs/includes/sabre/sabre/event/tests/PromiseTest.php b/htdocs/includes/sabre/sabre/event/tests/PromiseTest.php deleted file mode 100644 index 0029d898e53..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/PromiseTest.php +++ /dev/null @@ -1,386 +0,0 @@ -<?php - -namespace Sabre\Event; - -class PromiseTest extends \PHPUnit_Framework_TestCase { - - function testSuccess() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - Loop\run(); - - $this->assertEquals(3, $finalValue); - - } - - function testFail() { - - $finalValue = 0; - $promise = new Promise(); - $promise->reject(1); - - $promise->then(null, function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - Loop\run(); - - $this->assertEquals(3, $finalValue); - - } - - function testChain() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - return $finalValue; - })->then(function($value) use (&$finalValue) { - $finalValue = $value + 4; - return $finalValue; - }); - Loop\run(); - - $this->assertEquals(7, $finalValue); - - } - function testChainPromise() { - - $finalValue = 0; - $promise = new Promise(); - $promise->fulfill(1); - - $subPromise = new Promise(); - - $promise->then(function($value) use ($subPromise) { - return $subPromise; - })->then(function($value) use (&$finalValue) { - $finalValue = $value + 4; - return $finalValue; - }); - - $subPromise->fulfill(2); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testPendingResult() { - - $finalValue = 0; - $promise = new Promise(); - - $promise->then(function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - - $promise->fulfill(4); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testPendingFail() { - - $finalValue = 0; - $promise = new Promise(); - - $promise->then(null, function($value) use (&$finalValue) { - $finalValue = $value + 2; - }); - - $promise->reject(4); - Loop\run(); - - $this->assertEquals(6, $finalValue); - - } - - function testExecutorSuccess() { - - $promise = (new Promise(function($success, $fail) { - - $success('hi'); - - }))->then(function($result) use (&$realResult) { - - $realResult = $result; - - }); - Loop\run(); - - $this->assertEquals('hi', $realResult); - - } - - function testExecutorFail() { - - $promise = (new Promise(function($success, $fail) { - - $fail('hi'); - - }))->then(function($result) use (&$realResult) { - - $realResult = 'incorrect'; - - }, function($reason) use (&$realResult) { - - $realResult = $reason; - - }); - Loop\run(); - - $this->assertEquals('hi', $realResult); - - } - - /** - * @expectedException \Sabre\Event\PromiseAlreadyResolvedException - */ - function testFulfillTwice() { - - $promise = new Promise(); - $promise->fulfill(1); - $promise->fulfill(1); - - } - - /** - * @expectedException \Sabre\Event\PromiseAlreadyResolvedException - */ - function testRejectTwice() { - - $promise = new Promise(); - $promise->reject(1); - $promise->reject(1); - - } - - function testFromFailureHandler() { - - $ok = 0; - $promise = new Promise(); - $promise->otherwise(function($reason) { - - $this->assertEquals('foo', $reason); - throw new \Exception('hi'); - - })->then(function() use (&$ok) { - - $ok = -1; - - }, function() use (&$ok) { - - $ok = 1; - - }); - - $this->assertEquals(0, $ok); - $promise->reject('foo'); - Loop\run(); - - $this->assertEquals(1, $ok); - - } - - function testAll() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then(function($value) use (&$finalValue) { - - $finalValue = $value; - - }); - - $promise1->fulfill(1); - Loop\run(); - $this->assertEquals(0, $finalValue); - - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals([1, 2], $finalValue); - - } - - function testAllReject() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->reject(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testAllRejectThenResolve() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise::all([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = 'foo'; - return 'test'; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testRace() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\race([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = $value; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->fulfill(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->fulfill(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testRaceReject() { - - $promise1 = new Promise(); - $promise2 = new Promise(); - - $finalValue = 0; - Promise\race([$promise1, $promise2])->then( - function($value) use (&$finalValue) { - $finalValue = $value; - }, - function($value) use (&$finalValue) { - $finalValue = $value; - } - ); - - $promise1->reject(1); - Loop\run(); - $this->assertEquals(1, $finalValue); - $promise2->reject(2); - Loop\run(); - $this->assertEquals(1, $finalValue); - - } - - function testWaitResolve() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->fulfill(1); - }); - $this->assertEquals( - 1, - $promise->wait() - ); - - } - - /** - * @expectedException \LogicException - */ - function testWaitWillNeverResolve() { - - $promise = new Promise(); - $promise->wait(); - - } - - function testWaitRejectedException() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject(new \OutOfBoundsException('foo')); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('OutOfBoundsException', $e); - $this->assertEquals('foo', $e->getMessage()); - } - - } - - function testWaitRejectedScalar() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject('foo'); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('Exception', $e); - $this->assertEquals('foo', $e->getMessage()); - } - - } - - function testWaitRejectedNonScalar() { - - $promise = new Promise(); - Loop\nextTick(function() use ($promise) { - $promise->reject([]); - }); - try { - $promise->wait(); - $this->fail('We did not get the expected exception'); - } catch (\Exception $e) { - $this->assertInstanceOf('Exception', $e); - $this->assertEquals('Promise was rejected with reason of type: array', $e->getMessage()); - } - - } -} diff --git a/htdocs/includes/sabre/sabre/event/tests/benchmark/bench.php b/htdocs/includes/sabre/sabre/event/tests/benchmark/bench.php deleted file mode 100644 index b1e6b1d4787..00000000000 --- a/htdocs/includes/sabre/sabre/event/tests/benchmark/bench.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php - -use Sabre\Event\EventEmitter; - -include __DIR__ . '/../../vendor/autoload.php'; - -abstract class BenchMark { - - protected $startTime; - protected $iterations = 10000; - protected $totalTime; - - function setUp() { - - } - - abstract function test(); - - function go() { - - $this->setUp(); - $this->startTime = microtime(true); - $this->test(); - $this->totalTime = microtime(true) - $this->startTime; - return $this->totalTime; - - } - -} - -class OneCallBack extends BenchMark { - - protected $emitter; - protected $iterations = 100000; - - function setUp() { - - $this->emitter = new EventEmitter(); - $this->emitter->on('foo', function() { - // NOOP - }); - - } - - function test() { - - for ($i = 0;$i < $this->iterations;$i++) { - $this->emitter->emit('foo', []); - } - - } - -} - -class ManyCallBacks extends BenchMark { - - protected $emitter; - - function setUp() { - - $this->emitter = new EventEmitter(); - for ($i = 0;$i < 100;$i++) { - $this->emitter->on('foo', function() { - // NOOP - }); - } - - } - - function test() { - - for ($i = 0;$i < $this->iterations;$i++) { - $this->emitter->emit('foo', []); - } - - } - -} - -class ManyPrioritizedCallBacks extends BenchMark { - - protected $emitter; - - function setUp() { - - $this->emitter = new EventEmitter(); - for ($i = 0;$i < 100;$i++) { - $this->emitter->on('foo', function() { - }, 1000 - $i); - } - - } - - function test() { - - for ($i = 0;$i < $this->iterations;$i++) { - $this->emitter->emit('foo', []); - } - - } - -} - -$tests = [ - 'OneCallBack', - 'ManyCallBacks', - 'ManyPrioritizedCallBacks', -]; - -foreach ($tests as $test) { - - $testObj = new $test(); - $result = $testObj->go(); - echo $test . " " . $result . "\n"; - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/AWSTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/AWSTest.php deleted file mode 100644 index 650761acae3..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/AWSTest.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php - -namespace Sabre\HTTP\Auth; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; - -class AWSTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\HTTP\Response - */ - private $response; - - /** - * @var Sabre\HTTP\Request - */ - private $request; - - /** - * @var Sabre\HTTP\Auth\AWS - */ - private $auth; - - const REALM = 'SabreDAV unittest'; - - function setUp() { - - $this->response = new Response(); - $this->request = new Request(); - $this->auth = new AWS(self::REALM, $this->request, $this->response); - - } - - function testNoHeader() { - - $this->request->setMethod('GET'); - $result = $this->auth->init(); - - $this->assertFalse($result, 'No AWS Authorization header was supplied, so we should have gotten false'); - $this->assertEquals(AWS::ERR_NOAWSHEADER, $this->auth->errorCode); - - } - - function testIncorrectContentMD5() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - - $this->request->setMethod('GET'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:sig", - 'Content-MD5' => 'garbage', - ]); - $this->request->setUrl('/'); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertFalse($result); - $this->assertEquals(AWS::ERR_MD5CHECKSUMWRONG, $this->auth->errorCode); - - } - - function testNoDate() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - $content = 'thisisthebody'; - $contentMD5 = base64_encode(md5($content, true)); - - $this->request->setMethod('POST'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:sig", - 'Content-MD5' => $contentMD5, - ]); - $this->request->setUrl('/'); - $this->request->setBody($content); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertFalse($result); - $this->assertEquals(AWS::ERR_INVALIDDATEFORMAT, $this->auth->errorCode); - - } - - function testFutureDate() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - $content = 'thisisthebody'; - $contentMD5 = base64_encode(md5($content, true)); - - $date = new \DateTime('@' . (time() + (60 * 20))); - $date->setTimeZone(new \DateTimeZone('GMT')); - $date = $date->format('D, d M Y H:i:s \\G\\M\\T'); - - $this->request->setMethod('POST'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:sig", - 'Content-MD5' => $contentMD5, - 'Date' => $date, - ]); - - $this->request->setBody($content); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertFalse($result); - $this->assertEquals(AWS::ERR_REQUESTTIMESKEWED, $this->auth->errorCode); - - } - - function testPastDate() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - $content = 'thisisthebody'; - $contentMD5 = base64_encode(md5($content, true)); - - $date = new \DateTime('@' . (time() - (60 * 20))); - $date->setTimeZone(new \DateTimeZone('GMT')); - $date = $date->format('D, d M Y H:i:s \\G\\M\\T'); - - $this->request->setMethod('POST'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:sig", - 'Content-MD5' => $contentMD5, - 'Date' => $date, - ]); - - $this->request->setBody($content); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertFalse($result); - $this->assertEquals(AWS::ERR_REQUESTTIMESKEWED, $this->auth->errorCode); - - } - - function testIncorrectSignature() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - $content = 'thisisthebody'; - - $contentMD5 = base64_encode(md5($content, true)); - - $date = new \DateTime('now'); - $date->setTimeZone(new \DateTimeZone('GMT')); - $date = $date->format('D, d M Y H:i:s \\G\\M\\T'); - - $this->request->setUrl('/'); - $this->request->setMethod('POST'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:sig", - 'Content-MD5' => $contentMD5, - 'X-amz-date' => $date, - ]); - $this->request->setBody($content); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertFalse($result); - $this->assertEquals(AWS::ERR_INVALIDSIGNATURE, $this->auth->errorCode); - - } - - function testValidRequest() { - - $accessKey = 'accessKey'; - $secretKey = 'secretKey'; - $content = 'thisisthebody'; - $contentMD5 = base64_encode(md5($content, true)); - - $date = new \DateTime('now'); - $date->setTimeZone(new \DateTimeZone('GMT')); - $date = $date->format('D, d M Y H:i:s \\G\\M\\T'); - - - $sig = base64_encode($this->hmacsha1($secretKey, - "POST\n$contentMD5\n\n$date\nx-amz-date:$date\n/evert" - )); - - $this->request->setUrl('/evert'); - $this->request->setMethod('POST'); - $this->request->setHeaders([ - 'Authorization' => "AWS $accessKey:$sig", - 'Content-MD5' => $contentMD5, - 'X-amz-date' => $date, - ]); - - $this->request->setBody($content); - - $this->auth->init(); - $result = $this->auth->validate($secretKey); - - $this->assertTrue($result, 'Signature did not validate, got errorcode ' . $this->auth->errorCode); - $this->assertEquals($accessKey, $this->auth->getAccessKey()); - - } - - function test401() { - - $this->auth->requireLogin(); - $test = preg_match('/^AWS$/', $this->response->getHeader('WWW-Authenticate'), $matches); - $this->assertTrue($test == true, 'The WWW-Authenticate response didn\'t match our pattern'); - - } - - /** - * Generates an HMAC-SHA1 signature - * - * @param string $key - * @param string $message - * @return string - */ - private function hmacsha1($key, $message) { - - $blocksize = 64; - if (strlen($key) > $blocksize) - $key = pack('H*', sha1($key)); - $key = str_pad($key, $blocksize, chr(0x00)); - $ipad = str_repeat(chr(0x36), $blocksize); - $opad = str_repeat(chr(0x5c), $blocksize); - $hmac = pack('H*', sha1(($key ^ $opad) . pack('H*', sha1(($key ^ $ipad) . $message)))); - return $hmac; - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BasicTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BasicTest.php deleted file mode 100644 index 7c25e59de1b..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BasicTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\HTTP\Auth; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; - -class BasicTest extends \PHPUnit_Framework_TestCase { - - function testGetCredentials() { - - $request = new Request('GET', '/', [ - 'Authorization' => 'Basic ' . base64_encode('user:pass:bla') - ]); - - $basic = new Basic('Dagger', $request, new Response()); - - $this->assertEquals([ - 'user', - 'pass:bla', - ], $basic->getCredentials()); - - } - - function testGetInvalidCredentialsColonMissing() { - - $request = new Request('GET', '/', [ - 'Authorization' => 'Basic ' . base64_encode('userpass') - ]); - - $basic = new Basic('Dagger', $request, new Response()); - - $this->assertNull($basic->getCredentials()); - - } - - function testGetCredentialsNoheader() { - - $request = new Request('GET', '/', []); - $basic = new Basic('Dagger', $request, new Response()); - - $this->assertNull($basic->getCredentials()); - - } - - function testGetCredentialsNotBasic() { - - $request = new Request('GET', '/', [ - 'Authorization' => 'QBasic ' . base64_encode('user:pass:bla') - ]); - $basic = new Basic('Dagger', $request, new Response()); - - $this->assertNull($basic->getCredentials()); - - } - - function testRequireLogin() { - - $response = new Response(); - $basic = new Basic('Dagger', new Request(), $response); - - $basic->requireLogin(); - - $this->assertEquals('Basic realm="Dagger"', $response->getHeader('WWW-Authenticate')); - $this->assertEquals(401, $response->getStatus()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BearerTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BearerTest.php deleted file mode 100644 index ee2e9e0bd72..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/BearerTest.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -namespace Sabre\HTTP\Auth; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; - -class BearerTest extends \PHPUnit_Framework_TestCase { - - function testGetToken() { - - $request = new Request('GET', '/', [ - 'Authorization' => 'Bearer 12345' - ]); - - $bearer = new Bearer('Dagger', $request, new Response()); - - $this->assertEquals( - '12345', - $bearer->getToken() - ); - - } - - function testGetCredentialsNoheader() { - - $request = new Request('GET', '/', []); - $bearer = new Bearer('Dagger', $request, new Response()); - - $this->assertNull($bearer->getToken()); - - } - - function testGetCredentialsNotBearer() { - - $request = new Request('GET', '/', [ - 'Authorization' => 'QBearer 12345' - ]); - $bearer = new Bearer('Dagger', $request, new Response()); - - $this->assertNull($bearer->getToken()); - - } - - function testRequireLogin() { - - $response = new Response(); - $bearer = new Bearer('Dagger', new Request(), $response); - - $bearer->requireLogin(); - - $this->assertEquals('Bearer realm="Dagger"', $response->getHeader('WWW-Authenticate')); - $this->assertEquals(401, $response->getStatus()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/DigestTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/DigestTest.php deleted file mode 100644 index ffb69c76d6d..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/Auth/DigestTest.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php - -namespace Sabre\HTTP\Auth; - -use Sabre\HTTP\Request; -use Sabre\HTTP\Response; - -class DigestTest extends \PHPUnit_Framework_TestCase { - - /** - * @var Sabre\HTTP\Response - */ - private $response; - - /** - * request - * - * @var Sabre\HTTP\Request - */ - private $request; - - /** - * @var Sabre\HTTP\Auth\Digest - */ - private $auth; - - const REALM = 'SabreDAV unittest'; - - function setUp() { - - $this->response = new Response(); - $this->request = new Request(); - $this->auth = new Digest(self::REALM, $this->request, $this->response); - - - } - - function testDigest() { - - list($nonce, $opaque) = $this->getServerTokens(); - - $username = 'admin'; - $password = 12345; - $nc = '00002'; - $cnonce = uniqid(); - - $digestHash = md5( - md5($username . ':' . self::REALM . ':' . $password) . ':' . - $nonce . ':' . - $nc . ':' . - $cnonce . ':' . - 'auth:' . - md5('GET' . ':' . '/') - ); - - $this->request->setMethod('GET'); - $this->request->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . self::REALM . '", nonce="' . $nonce . '", uri="/", response="' . $digestHash . '", opaque="' . $opaque . '", qop=auth,nc=' . $nc . ',cnonce="' . $cnonce . '"'); - - $this->auth->init(); - - $this->assertEquals($username, $this->auth->getUsername()); - $this->assertEquals(self::REALM, $this->auth->getRealm()); - $this->assertTrue($this->auth->validateA1(md5($username . ':' . self::REALM . ':' . $password)), 'Authentication is deemed invalid through validateA1'); - $this->assertTrue($this->auth->validatePassword($password), 'Authentication is deemed invalid through validatePassword'); - - } - - function testInvalidDigest() { - - list($nonce, $opaque) = $this->getServerTokens(); - - $username = 'admin'; - $password = 12345; - $nc = '00002'; - $cnonce = uniqid(); - - $digestHash = md5( - md5($username . ':' . self::REALM . ':' . $password) . ':' . - $nonce . ':' . - $nc . ':' . - $cnonce . ':' . - 'auth:' . - md5('GET' . ':' . '/') - ); - - $this->request->setMethod('GET'); - $this->request->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . self::REALM . '", nonce="' . $nonce . '", uri="/", response="' . $digestHash . '", opaque="' . $opaque . '", qop=auth,nc=' . $nc . ',cnonce="' . $cnonce . '"'); - - $this->auth->init(); - - $this->assertFalse($this->auth->validateA1(md5($username . ':' . self::REALM . ':' . ($password . 'randomness'))), 'Authentication is deemed invalid through validateA1'); - - } - - function testInvalidDigest2() { - - $this->request->setMethod('GET'); - $this->request->setHeader('Authorization', 'basic blablabla'); - - $this->auth->init(); - $this->assertFalse($this->auth->validateA1(md5('user:realm:password'))); - - } - - - function testDigestAuthInt() { - - $this->auth->setQOP(Digest::QOP_AUTHINT); - list($nonce, $opaque) = $this->getServerTokens(Digest::QOP_AUTHINT); - - $username = 'admin'; - $password = 12345; - $nc = '00003'; - $cnonce = uniqid(); - - $digestHash = md5( - md5($username . ':' . self::REALM . ':' . $password) . ':' . - $nonce . ':' . - $nc . ':' . - $cnonce . ':' . - 'auth-int:' . - md5('POST' . ':' . '/' . ':' . md5('body')) - ); - - $this->request->setMethod('POST'); - $this->request->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . self::REALM . '", nonce="' . $nonce . '", uri="/", response="' . $digestHash . '", opaque="' . $opaque . '", qop=auth-int,nc=' . $nc . ',cnonce="' . $cnonce . '"'); - $this->request->setBody('body'); - - $this->auth->init(); - - $this->assertTrue($this->auth->validateA1(md5($username . ':' . self::REALM . ':' . $password)), 'Authentication is deemed invalid through validateA1'); - - } - - function testDigestAuthBoth() { - - $this->auth->setQOP(Digest::QOP_AUTHINT | Digest::QOP_AUTH); - list($nonce, $opaque) = $this->getServerTokens(Digest::QOP_AUTHINT | Digest::QOP_AUTH); - - $username = 'admin'; - $password = 12345; - $nc = '00003'; - $cnonce = uniqid(); - - $digestHash = md5( - md5($username . ':' . self::REALM . ':' . $password) . ':' . - $nonce . ':' . - $nc . ':' . - $cnonce . ':' . - 'auth-int:' . - md5('POST' . ':' . '/' . ':' . md5('body')) - ); - - $this->request->setMethod('POST'); - $this->request->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . self::REALM . '", nonce="' . $nonce . '", uri="/", response="' . $digestHash . '", opaque="' . $opaque . '", qop=auth-int,nc=' . $nc . ',cnonce="' . $cnonce . '"'); - $this->request->setBody('body'); - - $this->auth->init(); - - $this->assertTrue($this->auth->validateA1(md5($username . ':' . self::REALM . ':' . $password)), 'Authentication is deemed invalid through validateA1'); - - } - - - private function getServerTokens($qop = Digest::QOP_AUTH) { - - $this->auth->requireLogin(); - - switch ($qop) { - case Digest::QOP_AUTH : $qopstr = 'auth'; break; - case Digest::QOP_AUTHINT : $qopstr = 'auth-int'; break; - default : $qopstr = 'auth,auth-int'; break; - } - - $test = preg_match('/Digest realm="' . self::REALM . '",qop="' . $qopstr . '",nonce="([0-9a-f]*)",opaque="([0-9a-f]*)"/', - $this->response->getHeader('WWW-Authenticate'), $matches); - - $this->assertTrue($test == true, 'The WWW-Authenticate response didn\'t match our pattern. We received: ' . $this->response->getHeader('WWW-Authenticate')); - - $nonce = $matches[1]; - $opaque = $matches[2]; - - // Reset our environment - $this->setUp(); - $this->auth->setQOP($qop); - - return [$nonce,$opaque]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/ClientTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/ClientTest.php deleted file mode 100644 index ea25907df2d..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/ClientTest.php +++ /dev/null @@ -1,474 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class ClientTest extends \PHPUnit_Framework_TestCase { - - function testCreateCurlSettingsArrayGET() { - - $client = new ClientMock(); - $client->addCurlSetting(CURLOPT_POSTREDIR, 0); - - $request = new Request('GET', 'http://example.org/', ['X-Foo' => 'bar']); - - $settings = [ - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => true, - CURLOPT_POSTREDIR => 0, - CURLOPT_HTTPHEADER => ['X-Foo: bar'], - CURLOPT_NOBODY => false, - CURLOPT_URL => 'http://example.org/', - CURLOPT_CUSTOMREQUEST => 'GET', - CURLOPT_POSTFIELDS => '', - CURLOPT_PUT => false, - CURLOPT_USERAGENT => 'sabre-http/' . Version::VERSION . ' (http://sabre.io/)', - ]; - - // FIXME: CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS are currently unsupported by HHVM - // at least if this unit test fails in the future we know it is :) - if (defined('HHVM_VERSION') === false) { - $settings[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - $settings[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - - $this->assertEquals($settings, $client->createCurlSettingsArray($request)); - - } - - function testCreateCurlSettingsArrayHEAD() { - - $client = new ClientMock(); - $request = new Request('HEAD', 'http://example.org/', ['X-Foo' => 'bar']); - - - $settings = [ - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => true, - CURLOPT_NOBODY => true, - CURLOPT_CUSTOMREQUEST => 'HEAD', - CURLOPT_HTTPHEADER => ['X-Foo: bar'], - CURLOPT_URL => 'http://example.org/', - CURLOPT_POSTFIELDS => '', - CURLOPT_PUT => false, - CURLOPT_USERAGENT => 'sabre-http/' . Version::VERSION . ' (http://sabre.io/)', - ]; - - // FIXME: CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS are currently unsupported by HHVM - // at least if this unit test fails in the future we know it is :) - if (defined('HHVM_VERSION') === false) { - $settings[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - $settings[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $this->assertEquals($settings, $client->createCurlSettingsArray($request)); - - } - - function testCreateCurlSettingsArrayGETAfterHEAD() { - - $client = new ClientMock(); - $request = new Request('HEAD', 'http://example.org/', ['X-Foo' => 'bar']); - - // Parsing the settings for this method, and discarding the result. - // This will cause the client to automatically persist previous - // settings and will help us detect problems. - $client->createCurlSettingsArray($request); - - // This is the real request. - $request = new Request('GET', 'http://example.org/', ['X-Foo' => 'bar']); - - $settings = [ - CURLOPT_CUSTOMREQUEST => 'GET', - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => true, - CURLOPT_HTTPHEADER => ['X-Foo: bar'], - CURLOPT_NOBODY => false, - CURLOPT_URL => 'http://example.org/', - CURLOPT_POSTFIELDS => '', - CURLOPT_PUT => false, - CURLOPT_USERAGENT => 'sabre-http/' . Version::VERSION . ' (http://sabre.io/)', - ]; - - // FIXME: CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS are currently unsupported by HHVM - // at least if this unit test fails in the future we know it is :) - if (defined('HHVM_VERSION') === false) { - $settings[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - $settings[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $this->assertEquals($settings, $client->createCurlSettingsArray($request)); - - } - - function testCreateCurlSettingsArrayPUTStream() { - - $client = new ClientMock(); - - $h = fopen('php://memory', 'r+'); - fwrite($h, 'booh'); - $request = new Request('PUT', 'http://example.org/', ['X-Foo' => 'bar'], $h); - - $settings = [ - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => true, - CURLOPT_PUT => true, - CURLOPT_INFILE => $h, - CURLOPT_NOBODY => false, - CURLOPT_CUSTOMREQUEST => 'PUT', - CURLOPT_HTTPHEADER => ['X-Foo: bar'], - CURLOPT_URL => 'http://example.org/', - CURLOPT_USERAGENT => 'sabre-http/' . Version::VERSION . ' (http://sabre.io/)', - ]; - - // FIXME: CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS are currently unsupported by HHVM - // at least if this unit test fails in the future we know it is :) - if (defined('HHVM_VERSION') === false) { - $settings[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - $settings[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $this->assertEquals($settings, $client->createCurlSettingsArray($request)); - - } - - function testCreateCurlSettingsArrayPUTString() { - - $client = new ClientMock(); - $request = new Request('PUT', 'http://example.org/', ['X-Foo' => 'bar'], 'boo'); - - $settings = [ - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HEADER => true, - CURLOPT_NOBODY => false, - CURLOPT_POSTFIELDS => 'boo', - CURLOPT_CUSTOMREQUEST => 'PUT', - CURLOPT_HTTPHEADER => ['X-Foo: bar'], - CURLOPT_URL => 'http://example.org/', - CURLOPT_USERAGENT => 'sabre-http/' . Version::VERSION . ' (http://sabre.io/)', - ]; - - // FIXME: CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS are currently unsupported by HHVM - // at least if this unit test fails in the future we know it is :) - if (defined('HHVM_VERSION') === false) { - $settings[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - $settings[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $this->assertEquals($settings, $client->createCurlSettingsArray($request)); - - } - - function testSend() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - - $client->on('doRequest', function($request, &$response) { - $response = new Response(200); - }); - - $response = $client->send($request); - - $this->assertEquals(200, $response->getStatus()); - - } - - function testSendClientError() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - - $client->on('doRequest', function($request, &$response) { - throw new ClientException('aaah', 1); - }); - $called = false; - $client->on('exception', function() use (&$called) { - $called = true; - }); - - try { - $client->send($request); - $this->fail('send() should have thrown an exception'); - } catch (ClientException $e) { - - } - $this->assertTrue($called); - - } - - function testSendHttpError() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - - $client->on('doRequest', function($request, &$response) { - $response = new Response(404); - }); - $called = 0; - $client->on('error', function() use (&$called) { - $called++; - }); - $client->on('error:404', function() use (&$called) { - $called++; - }); - - $client->send($request); - $this->assertEquals(2, $called); - - } - - function testSendRetry() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - - $called = 0; - $client->on('doRequest', function($request, &$response) use (&$called) { - $called++; - if ($called < 3) { - $response = new Response(404); - } else { - $response = new Response(200); - } - }); - - $errorCalled = 0; - $client->on('error', function($request, $response, &$retry, $retryCount) use (&$errorCalled) { - - $errorCalled++; - $retry = true; - - }); - - $response = $client->send($request); - $this->assertEquals(3, $called); - $this->assertEquals(2, $errorCalled); - $this->assertEquals(200, $response->getStatus()); - - } - - function testHttpErrorException() { - - $client = new ClientMock(); - $client->setThrowExceptions(true); - $request = new Request('GET', 'http://example.org/'); - - $client->on('doRequest', function($request, &$response) { - $response = new Response(404); - }); - - try { - $client->send($request); - $this->fail('An exception should have been thrown'); - } catch (ClientHttpException $e) { - $this->assertEquals(404, $e->getHttpStatus()); - $this->assertInstanceOf('Sabre\HTTP\Response', $e->getResponse()); - } - - } - - function testParseCurlResult() { - - $client = new ClientMock(); - $client->on('curlStuff', function(&$return) { - - $return = [ - [ - 'header_size' => 33, - 'http_code' => 200, - ], - 0, - '', - ]; - - }); - - $body = "HTTP/1.1 200 OK\r\nHeader1:Val1\r\n\r\nFoo"; - $result = $client->parseCurlResult($body, 'foobar'); - - $this->assertEquals(Client::STATUS_SUCCESS, $result['status']); - $this->assertEquals(200, $result['http_code']); - $this->assertEquals(200, $result['response']->getStatus()); - $this->assertEquals(['Header1' => ['Val1']], $result['response']->getHeaders()); - $this->assertEquals('Foo', $result['response']->getBodyAsString()); - - } - - function testParseCurlError() { - - $client = new ClientMock(); - $client->on('curlStuff', function(&$return) { - - $return = [ - [], - 1, - 'Curl error', - ]; - - }); - - $body = "HTTP/1.1 200 OK\r\nHeader1:Val1\r\n\r\nFoo"; - $result = $client->parseCurlResult($body, 'foobar'); - - $this->assertEquals(Client::STATUS_CURLERROR, $result['status']); - $this->assertEquals(1, $result['curl_errno']); - $this->assertEquals('Curl error', $result['curl_errmsg']); - - } - - function testDoRequest() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - $client->on('curlExec', function(&$return) { - - $return = "HTTP/1.1 200 OK\r\nHeader1:Val1\r\n\r\nFoo"; - - }); - $client->on('curlStuff', function(&$return) { - - $return = [ - [ - 'header_size' => 33, - 'http_code' => 200, - ], - 0, - '', - ]; - - }); - $response = $client->doRequest($request); - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals(['Header1' => ['Val1']], $response->getHeaders()); - $this->assertEquals('Foo', $response->getBodyAsString()); - - } - - function testDoRequestCurlError() { - - $client = new ClientMock(); - $request = new Request('GET', 'http://example.org/'); - $client->on('curlExec', function(&$return) { - - $return = ""; - - }); - $client->on('curlStuff', function(&$return) { - - $return = [ - [], - 1, - 'Curl error', - ]; - - }); - - try { - $response = $client->doRequest($request); - $this->fail('This should have thrown an exception'); - } catch (ClientException $e) { - $this->assertEquals(1, $e->getCode()); - $this->assertEquals('Curl error', $e->getMessage()); - } - - } - -} - -class ClientMock extends Client { - - protected $persistedSettings = []; - - /** - * Making this method public. - * - * We are also going to persist all settings this method generates. While - * the underlying object doesn't behave exactly the same, it helps us - * simulate what curl does internally, and helps us identify problems with - * settings that are set by _some_ methods and not correctly reset by other - * methods after subsequent use. - * forces - */ - function createCurlSettingsArray(RequestInterface $request) { - - $settings = parent::createCurlSettingsArray($request); - $settings = $settings + $this->persistedSettings; - $this->persistedSettings = $settings; - return $settings; - - } - /** - * Making this method public. - */ - function parseCurlResult($response, $curlHandle) { - - return parent::parseCurlResult($response, $curlHandle); - - } - - /** - * This method is responsible for performing a single request. - * - * @param RequestInterface $request - * @return ResponseInterface - */ - function doRequest(RequestInterface $request) { - - $response = null; - $this->emit('doRequest', [$request, &$response]); - - // If nothing modified $response, we're using the default behavior. - if (is_null($response)) { - return parent::doRequest($request); - } else { - return $response; - } - - } - - /** - * Returns a bunch of information about a curl request. - * - * This method exists so it can easily be overridden and mocked. - * - * @param resource $curlHandle - * @return array - */ - protected function curlStuff($curlHandle) { - - $return = null; - $this->emit('curlStuff', [&$return]); - - // If nothing modified $return, we're using the default behavior. - if (is_null($return)) { - return parent::curlStuff($curlHandle); - } else { - return $return; - } - - } - - /** - * Calls curl_exec - * - * This method exists so it can easily be overridden and mocked. - * - * @param resource $curlHandle - * @return string - */ - protected function curlExec($curlHandle) { - - $return = null; - $this->emit('curlExec', [&$return]); - - // If nothing modified $return, we're using the default behavior. - if (is_null($return)) { - return parent::curlExec($curlHandle); - } else { - return $return; - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/FunctionsTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/FunctionsTest.php deleted file mode 100644 index a107d1f007a..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/FunctionsTest.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class FunctionsTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider getHeaderValuesData - */ - function testGetHeaderValues($input, $output) { - - $this->assertEquals( - $output, - getHeaderValues($input) - ); - - } - - function getHeaderValuesData() { - - return [ - [ - "a", - ["a"] - ], - [ - "a,b", - ["a", "b"] - ], - [ - "a, b", - ["a", "b"] - ], - [ - ["a, b"], - ["a", "b"] - ], - [ - ["a, b", "c", "d,e"], - ["a", "b", "c", "d", "e"] - ], - ]; - - } - - /** - * @dataProvider preferData - */ - function testPrefer($input, $output) { - - $this->assertEquals( - $output, - parsePrefer($input) - ); - - } - - function preferData() { - - return [ - [ - 'foo; bar', - ['foo' => true] - ], - [ - 'foo; bar=""', - ['foo' => true] - ], - [ - 'foo=""; bar', - ['foo' => true] - ], - [ - 'FOO', - ['foo' => true] - ], - [ - 'respond-async', - ['respond-async' => true] - ], - [ - - ['respond-async, wait=100', 'handling=lenient'], - ['respond-async' => true, 'wait' => 100, 'handling' => 'lenient'] - ], - [ - - ['respond-async, wait=100, handling=lenient'], - ['respond-async' => true, 'wait' => 100, 'handling' => 'lenient'] - ], - // Old values - [ - - 'return-asynch, return-representation', - ['respond-async' => true, 'return' => 'representation'], - ], - [ - - 'return-minimal', - ['return' => 'minimal'], - ], - [ - - 'strict', - ['handling' => 'strict'], - ], - [ - - 'lenient', - ['handling' => 'lenient'], - ], - // Invalid token - [ - ['foo=%bar%'], - [], - ] - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageDecoratorTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageDecoratorTest.php deleted file mode 100644 index a4052c60c0c..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageDecoratorTest.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class MessageDecoratorTest extends \PHPUnit_Framework_TestCase { - - protected $inner; - protected $outer; - - function setUp() { - - $this->inner = new Request(); - $this->outer = new RequestDecorator($this->inner); - - } - - function testBody() { - - $this->outer->setBody('foo'); - $this->assertEquals('foo', stream_get_contents($this->inner->getBodyAsStream())); - $this->assertEquals('foo', stream_get_contents($this->outer->getBodyAsStream())); - $this->assertEquals('foo', $this->inner->getBodyAsString()); - $this->assertEquals('foo', $this->outer->getBodyAsString()); - $this->assertEquals('foo', $this->inner->getBody()); - $this->assertEquals('foo', $this->outer->getBody()); - - } - - function testHeaders() { - - $this->outer->setHeaders([ - 'a' => 'b', - ]); - - $this->assertEquals(['a' => ['b']], $this->inner->getHeaders()); - $this->assertEquals(['a' => ['b']], $this->outer->getHeaders()); - - $this->outer->setHeaders([ - 'c' => 'd', - ]); - - $this->assertEquals(['a' => ['b'], 'c' => ['d']], $this->inner->getHeaders()); - $this->assertEquals(['a' => ['b'], 'c' => ['d']], $this->outer->getHeaders()); - - $this->outer->addHeaders([ - 'e' => 'f', - ]); - - $this->assertEquals(['a' => ['b'], 'c' => ['d'], 'e' => ['f']], $this->inner->getHeaders()); - $this->assertEquals(['a' => ['b'], 'c' => ['d'], 'e' => ['f']], $this->outer->getHeaders()); - } - - function testHeader() { - - $this->assertFalse($this->outer->hasHeader('a')); - $this->assertFalse($this->inner->hasHeader('a')); - $this->outer->setHeader('a', 'c'); - $this->assertTrue($this->outer->hasHeader('a')); - $this->assertTrue($this->inner->hasHeader('a')); - - $this->assertEquals('c', $this->inner->getHeader('A')); - $this->assertEquals('c', $this->outer->getHeader('A')); - - $this->outer->addHeader('A', 'd'); - - $this->assertEquals( - ['c', 'd'], - $this->inner->getHeaderAsArray('A') - ); - $this->assertEquals( - ['c', 'd'], - $this->outer->getHeaderAsArray('A') - ); - - $success = $this->outer->removeHeader('a'); - - $this->assertTrue($success); - $this->assertNull($this->inner->getHeader('A')); - $this->assertNull($this->outer->getHeader('A')); - - $this->assertFalse($this->outer->removeHeader('i-dont-exist')); - } - - function testHttpVersion() { - - $this->outer->setHttpVersion('1.0'); - - $this->assertEquals('1.0', $this->inner->getHttpVersion()); - $this->assertEquals('1.0', $this->outer->getHttpVersion()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageTest.php deleted file mode 100644 index cb5aadc416c..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/MessageTest.php +++ /dev/null @@ -1,246 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class MessageTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $message = new MessageMock(); - $this->assertInstanceOf('Sabre\HTTP\Message', $message); - - } - - function testStreamBody() { - - $body = 'foo'; - $h = fopen('php://memory', 'r+'); - fwrite($h, $body); - rewind($h); - - $message = new MessageMock(); - $message->setBody($h); - - $this->assertEquals($body, $message->getBodyAsString()); - rewind($h); - $this->assertEquals($body, stream_get_contents($message->getBodyAsStream())); - rewind($h); - $this->assertEquals($body, stream_get_contents($message->getBody())); - - } - - function testStringBody() { - - $body = 'foo'; - - $message = new MessageMock(); - $message->setBody($body); - - $this->assertEquals($body, $message->getBodyAsString()); - $this->assertEquals($body, stream_get_contents($message->getBodyAsStream())); - $this->assertEquals($body, $message->getBody()); - - } - - /** - * It's possible that streams contains more data than the Content-Length. - * - * The request object should make sure to never emit more than - * Content-Length, if Content-Length is set. - * - * This is in particular useful when respoding to range requests with - * streams that represent files on the filesystem, as it's possible to just - * seek the stream to a certain point, set the content-length and let the - * request object do the rest. - */ - function testLongStreamToStringBody() { - - $body = fopen('php://memory', 'r+'); - fwrite($body, 'abcdefg'); - fseek($body, 2); - - $message = new MessageMock(); - $message->setBody($body); - $message->setHeader('Content-Length', '4'); - - $this->assertEquals( - 'cdef', - $message->getBodyAsString() - ); - - } - - /** - * Some clients include a content-length header, but the header is empty. - * This is definitely broken behavior, but we should support it. - */ - function testEmptyContentLengthHeader() { - - $body = fopen('php://memory', 'r+'); - fwrite($body, 'abcdefg'); - fseek($body, 2); - - $message = new MessageMock(); - $message->setBody($body); - $message->setHeader('Content-Length', ''); - - $this->assertEquals( - 'cdefg', - $message->getBodyAsString() - ); - - } - - - function testGetEmptyBodyStream() { - - $message = new MessageMock(); - $body = $message->getBodyAsStream(); - - $this->assertEquals('', stream_get_contents($body)); - - } - - function testGetEmptyBodyString() { - - $message = new MessageMock(); - $body = $message->getBodyAsString(); - - $this->assertEquals('', $body); - - } - - function testHeaders() { - - $message = new MessageMock(); - $message->setHeader('X-Foo', 'bar'); - - // Testing caselessness - $this->assertEquals('bar', $message->getHeader('X-Foo')); - $this->assertEquals('bar', $message->getHeader('x-fOO')); - - $this->assertTrue( - $message->removeHeader('X-FOO') - ); - $this->assertNull($message->getHeader('X-Foo')); - $this->assertFalse( - $message->removeHeader('X-FOO') - ); - - } - - function testSetHeaders() { - - $message = new MessageMock(); - - $headers = [ - 'X-Foo' => ['1'], - 'X-Bar' => ['2'], - ]; - - $message->setHeaders($headers); - $this->assertEquals($headers, $message->getHeaders()); - - $message->setHeaders([ - 'X-Foo' => ['3', '4'], - 'X-Bar' => '5', - ]); - - $expected = [ - 'X-Foo' => ['3','4'], - 'X-Bar' => ['5'], - ]; - - $this->assertEquals($expected, $message->getHeaders()); - - } - - function testAddHeaders() { - - $message = new MessageMock(); - - $headers = [ - 'X-Foo' => ['1'], - 'X-Bar' => ['2'], - ]; - - $message->addHeaders($headers); - $this->assertEquals($headers, $message->getHeaders()); - - $message->addHeaders([ - 'X-Foo' => ['3', '4'], - 'X-Bar' => '5', - ]); - - $expected = [ - 'X-Foo' => ['1','3','4'], - 'X-Bar' => ['2','5'], - ]; - - $this->assertEquals($expected, $message->getHeaders()); - - } - - function testSendBody() { - - $message = new MessageMock(); - - // String - $message->setBody('foo'); - - // Stream - $h = fopen('php://memory', 'r+'); - fwrite($h, 'bar'); - rewind($h); - $message->setBody($h); - - $body = $message->getBody(); - rewind($body); - - $this->assertEquals('bar', stream_get_contents($body)); - - } - - function testMultipleHeaders() { - - $message = new MessageMock(); - $message->setHeader('a', '1'); - $message->addHeader('A', '2'); - - $this->assertEquals( - "1,2", - $message->getHeader('A') - ); - $this->assertEquals( - "1,2", - $message->getHeader('a') - ); - - $this->assertEquals( - ['1', '2'], - $message->getHeaderAsArray('a') - ); - $this->assertEquals( - ['1', '2'], - $message->getHeaderAsArray('A') - ); - $this->assertEquals( - [], - $message->getHeaderAsArray('B') - ); - - } - - function testHasHeaders() { - - $message = new MessageMock(); - - $this->assertFalse($message->hasHeader('X-Foo')); - $message->setHeader('X-Foo', 'Bar'); - $this->assertTrue($message->hasHeader('X-Foo')); - - } - -} - -class MessageMock extends Message { } diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestDecoratorTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestDecoratorTest.php deleted file mode 100644 index 08af48749bd..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestDecoratorTest.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class RequestDecoratorTest extends \PHPUnit_Framework_TestCase { - - protected $inner; - protected $outer; - - function setUp() { - - $this->inner = new Request(); - $this->outer = new RequestDecorator($this->inner); - - } - - function testMethod() { - - $this->outer->setMethod('FOO'); - $this->assertEquals('FOO', $this->inner->getMethod()); - $this->assertEquals('FOO', $this->outer->getMethod()); - - } - - function testUrl() { - - $this->outer->setUrl('/foo'); - $this->assertEquals('/foo', $this->inner->getUrl()); - $this->assertEquals('/foo', $this->outer->getUrl()); - - } - - function testAbsoluteUrl() { - - $this->outer->setAbsoluteUrl('http://example.org/foo'); - $this->assertEquals('http://example.org/foo', $this->inner->getAbsoluteUrl()); - $this->assertEquals('http://example.org/foo', $this->outer->getAbsoluteUrl()); - - } - - function testBaseUrl() { - - $this->outer->setBaseUrl('/foo'); - $this->assertEquals('/foo', $this->inner->getBaseUrl()); - $this->assertEquals('/foo', $this->outer->getBaseUrl()); - - } - - function testPath() { - - $this->outer->setBaseUrl('/foo'); - $this->outer->setUrl('/foo/bar'); - $this->assertEquals('bar', $this->inner->getPath()); - $this->assertEquals('bar', $this->outer->getPath()); - - } - - function testQueryParams() { - - $this->outer->setUrl('/foo?a=b&c=d&e'); - $expected = [ - 'a' => 'b', - 'c' => 'd', - 'e' => null, - ]; - - $this->assertEquals($expected, $this->inner->getQueryParameters()); - $this->assertEquals($expected, $this->outer->getQueryParameters()); - - } - - function testPostData() { - - $postData = [ - 'a' => 'b', - 'c' => 'd', - 'e' => null, - ]; - - $this->outer->setPostData($postData); - $this->assertEquals($postData, $this->inner->getPostData()); - $this->assertEquals($postData, $this->outer->getPostData()); - - } - - - function testServerData() { - - $serverData = [ - 'HTTPS' => 'On', - ]; - - $this->outer->setRawServerData($serverData); - $this->assertEquals('On', $this->inner->getRawServerValue('HTTPS')); - $this->assertEquals('On', $this->outer->getRawServerValue('HTTPS')); - - $this->assertNull($this->inner->getRawServerValue('FOO')); - $this->assertNull($this->outer->getRawServerValue('FOO')); - } - - function testToString() { - - $this->inner->setMethod('POST'); - $this->inner->setUrl('/foo/bar/'); - $this->inner->setBody('foo'); - $this->inner->setHeader('foo', 'bar'); - - $this->assertEquals((string)$this->inner, (string)$this->outer); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestTest.php deleted file mode 100644 index e3daab4d354..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/RequestTest.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class RequestTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $request = new Request('GET', '/foo', [ - 'User-Agent' => 'Evert', - ]); - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'User-Agent' => ['Evert'], - ], $request->getHeaders()); - - } - - function testGetQueryParameters() { - - $request = new Request('GET', '/foo?a=b&c&d=e'); - $this->assertEquals([ - 'a' => 'b', - 'c' => null, - 'd' => 'e', - ], $request->getQueryParameters()); - - } - - function testGetQueryParametersNoData() { - - $request = new Request('GET', '/foo'); - $this->assertEquals([], $request->getQueryParameters()); - - } - - /** - * @backupGlobals - */ - function testCreateFromPHPRequest() { - - $_SERVER['REQUEST_METHOD'] = 'PUT'; - - $request = Sapi::getRequest(); - $this->assertEquals('PUT', $request->getMethod()); - - } - - function testGetAbsoluteUrl() { - - $s = [ - 'HTTP_HOST' => 'sabredav.org', - 'REQUEST_URI' => '/foo' - ]; - - $r = Sapi::createFromServerArray($s); - - $this->assertEquals('http://sabredav.org/foo', $r->getAbsoluteUrl()); - - $s = [ - 'HTTP_HOST' => 'sabredav.org', - 'REQUEST_URI' => '/foo', - 'HTTPS' => 'on', - ]; - - $r = Sapi::createFromServerArray($s); - - $this->assertEquals('https://sabredav.org/foo', $r->getAbsoluteUrl()); - - } - - function testGetPostData() { - - $post = [ - 'bla' => 'foo', - ]; - $r = new Request(); - $r->setPostData($post); - $this->assertEquals($post, $r->getPostData()); - - } - - function testGetPath() { - - $request = new Request(); - $request->setBaseUrl('/foo'); - $request->setUrl('/foo/bar/'); - - $this->assertEquals('bar', $request->getPath()); - - } - - function testGetPathStrippedQuery() { - - $request = new Request(); - $request->setBaseUrl('/foo'); - $request->setUrl('/foo/bar/?a=b'); - - $this->assertEquals('bar', $request->getPath()); - - } - - function testGetPathMissingSlash() { - - $request = new Request(); - $request->setBaseUrl('/foo/'); - $request->setUrl('/foo'); - - $this->assertEquals('', $request->getPath()); - - } - - /** - * @expectedException \LogicException - */ - function testGetPathOutsideBaseUrl() { - - $request = new Request(); - $request->setBaseUrl('/foo/'); - $request->setUrl('/bar/'); - - $request->getPath(); - - } - - function testToString() { - - $request = new Request('PUT', '/foo/bar', ['Content-Type' => 'text/xml']); - $request->setBody('foo'); - - $expected = <<<HI -PUT /foo/bar HTTP/1.1\r -Content-Type: text/xml\r -\r -foo -HI; - $this->assertEquals($expected, (string)$request); - - } - - function testToStringAuthorization() { - - $request = new Request('PUT', '/foo/bar', ['Content-Type' => 'text/xml', 'Authorization' => 'Basic foobar']); - $request->setBody('foo'); - - $expected = <<<HI -PUT /foo/bar HTTP/1.1\r -Content-Type: text/xml\r -Authorization: Basic REDACTED\r -\r -foo -HI; - $this->assertEquals($expected, (string)$request); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testConstructorWithArray() { - - $request = new Request([]); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseDecoratorTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseDecoratorTest.php deleted file mode 100644 index 838953b3144..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseDecoratorTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class ResponseDecoratorTest extends \PHPUnit_Framework_TestCase { - - protected $inner; - protected $outer; - - function setUp() { - - $this->inner = new Response(); - $this->outer = new ResponseDecorator($this->inner); - - } - - function testStatus() { - - $this->outer->setStatus(201); - $this->assertEquals(201, $this->inner->getStatus()); - $this->assertEquals(201, $this->outer->getStatus()); - $this->assertEquals('Created', $this->inner->getStatusText()); - $this->assertEquals('Created', $this->outer->getStatusText()); - - } - - function testToString() { - - $this->inner->setStatus(201); - $this->inner->setBody('foo'); - $this->inner->setHeader('foo', 'bar'); - - $this->assertEquals((string)$this->inner, (string)$this->outer); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseTest.php deleted file mode 100644 index 117551bb969..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/ResponseTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class ResponseTest extends \PHPUnit_Framework_TestCase { - - function testConstruct() { - - $response = new Response(200, ['Content-Type' => 'text/xml']); - $this->assertEquals(200, $response->getStatus()); - $this->assertEquals('OK', $response->getStatusText()); - - } - - function testSetStatus() { - - $response = new Response(); - $response->setStatus('402 Where\'s my money?'); - $this->assertEquals(402, $response->getStatus()); - $this->assertEquals('Where\'s my money?', $response->getStatusText()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidStatus() { - - $response = new Response(1000); - - } - - function testToString() { - - $response = new Response(200, ['Content-Type' => 'text/xml']); - $response->setBody('foo'); - - $expected = <<<HI -HTTP/1.1 200 OK\r -Content-Type: text/xml\r -\r -foo -HI; - $this->assertEquals($expected, (string)$response); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/SapiTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/SapiTest.php deleted file mode 100644 index 158ce2171b9..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/SapiTest.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class SapiTest extends \PHPUnit_Framework_TestCase { - - function testConstructFromServerArray() { - - $request = Sapi::createFromServerArray([ - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'GET', - 'HTTP_USER_AGENT' => 'Evert', - 'CONTENT_TYPE' => 'text/xml', - 'CONTENT_LENGTH' => '400', - 'SERVER_PROTOCOL' => 'HTTP/1.0', - ]); - - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'User-Agent' => ['Evert'], - 'Content-Type' => ['text/xml'], - 'Content-Length' => ['400'], - ], $request->getHeaders()); - - $this->assertEquals('1.0', $request->getHttpVersion()); - - $this->assertEquals('400', $request->getRawServerValue('CONTENT_LENGTH')); - $this->assertNull($request->getRawServerValue('FOO')); - - } - - function testConstructPHPAuth() { - - $request = Sapi::createFromServerArray([ - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'GET', - 'PHP_AUTH_USER' => 'user', - 'PHP_AUTH_PW' => 'pass', - ]); - - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Authorization' => ['Basic ' . base64_encode('user:pass')], - ], $request->getHeaders()); - - } - - function testConstructPHPAuthDigest() { - - $request = Sapi::createFromServerArray([ - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'GET', - 'PHP_AUTH_DIGEST' => 'blabla', - ]); - - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Authorization' => ['Digest blabla'], - ], $request->getHeaders()); - - } - - function testConstructRedirectAuth() { - - $request = Sapi::createFromServerArray([ - 'REQUEST_URI' => '/foo', - 'REQUEST_METHOD' => 'GET', - 'REDIRECT_HTTP_AUTHORIZATION' => 'Basic bla', - ]); - - $this->assertEquals('GET', $request->getMethod()); - $this->assertEquals('/foo', $request->getUrl()); - $this->assertEquals([ - 'Authorization' => ['Basic bla'], - ], $request->getHeaders()); - - } - - /** - * @runInSeparateProcess - * - * Unfortunately we have no way of testing if the HTTP response code got - * changed. - */ - function testSend() { - - if (!function_exists('xdebug_get_headers')) { - $this->markTestSkipped('XDebug needs to be installed for this test to run'); - } - - $response = new Response(204, ['Content-Type' => 'text/xml;charset=UTF-8']); - - // Second Content-Type header. Normally this doesn't make sense. - $response->addHeader('Content-Type', 'application/xml'); - $response->setBody('foo'); - - ob_start(); - - Sapi::sendResponse($response); - $headers = xdebug_get_headers(); - - $result = ob_get_clean(); - header_remove(); - - $this->assertEquals( - [ - "Content-Type: text/xml;charset=UTF-8", - "Content-Type: application/xml", - ], - $headers - ); - - $this->assertEquals('foo', $result); - - } - - /** - * @runInSeparateProcess - * @depends testSend - */ - function testSendLimitedByContentLengthString() { - - $response = new Response(200); - - $response->addHeader('Content-Length', 19); - $response->setBody('Send this sentence. Ignore this one.'); - - ob_start(); - - Sapi::sendResponse($response); - - $result = ob_get_clean(); - header_remove(); - - $this->assertEquals('Send this sentence.', $result); - - } - - /** - * @runInSeparateProcess - * @depends testSend - */ - function testSendLimitedByContentLengthStream() { - - $response = new Response(200, ['Content-Length' => 19]); - - $body = fopen('php://memory', 'w'); - fwrite($body, 'Ignore this. Send this sentence. Ignore this too.'); - rewind($body); - fread($body, 13); - $response->setBody($body); - - ob_start(); - - Sapi::sendResponse($response); - - $result = ob_get_clean(); - header_remove(); - - $this->assertEquals('Send this sentence.', $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/URLUtilTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/URLUtilTest.php deleted file mode 100644 index a2d65a5e36d..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/URLUtilTest.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class URLUtilTest extends \PHPUnit_Framework_TestCase{ - - function testEncodePath() { - - $str = ''; - for ($i = 0;$i < 128;$i++) $str .= chr($i); - - $newStr = URLUtil::encodePath($str); - - $this->assertEquals( - '%00%01%02%03%04%05%06%07%08%09%0a%0b%0c%0d%0e%0f' . - '%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f' . - '%20%21%22%23%24%25%26%27()%2a%2b%2c-./' . - '0123456789:%3b%3c%3d%3e%3f' . - '@ABCDEFGHIJKLMNO' . - 'PQRSTUVWXYZ%5b%5c%5d%5e_' . - '%60abcdefghijklmno' . - 'pqrstuvwxyz%7b%7c%7d~%7f', - $newStr); - - $this->assertEquals($str, URLUtil::decodePath($newStr)); - - } - - function testEncodePathSegment() { - - $str = ''; - for ($i = 0;$i < 128;$i++) $str .= chr($i); - - $newStr = URLUtil::encodePathSegment($str); - - // Note: almost exactly the same as the last test, with the - // exception of the encoding of / (ascii code 2f) - $this->assertEquals( - '%00%01%02%03%04%05%06%07%08%09%0a%0b%0c%0d%0e%0f' . - '%10%11%12%13%14%15%16%17%18%19%1a%1b%1c%1d%1e%1f' . - '%20%21%22%23%24%25%26%27()%2a%2b%2c-.%2f' . - '0123456789:%3b%3c%3d%3e%3f' . - '@ABCDEFGHIJKLMNO' . - 'PQRSTUVWXYZ%5b%5c%5d%5e_' . - '%60abcdefghijklmno' . - 'pqrstuvwxyz%7b%7c%7d~%7f', - $newStr); - - $this->assertEquals($str, URLUtil::decodePathSegment($newStr)); - - } - - function testDecode() { - - $str = 'Hello%20Test+Test2.txt'; - $newStr = URLUtil::decodePath($str); - $this->assertEquals('Hello Test+Test2.txt', $newStr); - - } - - /** - * @depends testDecode - */ - function testDecodeUmlaut() { - - $str = 'Hello%C3%BC.txt'; - $newStr = URLUtil::decodePath($str); - $this->assertEquals("Hello\xC3\xBC.txt", $newStr); - - } - - /** - * @depends testDecodeUmlaut - */ - function testDecodeUmlautLatin1() { - - $str = 'Hello%FC.txt'; - $newStr = URLUtil::decodePath($str); - $this->assertEquals("Hello\xC3\xBC.txt", $newStr); - - } - - /** - * This testcase was sent by a bug reporter - * - * @depends testDecode - */ - function testDecodeAccentsWindows7() { - - $str = '/webdav/%C3%A0fo%C3%B3'; - $newStr = URLUtil::decodePath($str); - $this->assertEquals(strtolower($str), URLUtil::encodePath($newStr)); - - } - - function testSplitPath() { - - $strings = [ - - // input // expected result - '/foo/bar' => ['/foo','bar'], - '/foo/bar/' => ['/foo','bar'], - 'foo/bar/' => ['foo','bar'], - 'foo/bar' => ['foo','bar'], - 'foo/bar/baz' => ['foo/bar','baz'], - 'foo/bar/baz/' => ['foo/bar','baz'], - 'foo' => ['','foo'], - 'foo/' => ['','foo'], - '/foo/' => ['','foo'], - '/foo' => ['','foo'], - '' => [null,null], - - // UTF-8 - "/\xC3\xA0fo\xC3\xB3/bar" => ["/\xC3\xA0fo\xC3\xB3",'bar'], - "/\xC3\xA0foo/b\xC3\xBCr/" => ["/\xC3\xA0foo","b\xC3\xBCr"], - "foo/\xC3\xA0\xC3\xBCr" => ["foo","\xC3\xA0\xC3\xBCr"], - - ]; - - foreach ($strings as $input => $expected) { - - $output = URLUtil::splitPath($input); - $this->assertEquals($expected, $output, 'The expected output for \'' . $input . '\' was incorrect'); - - - } - - } - - /** - * @dataProvider resolveData - */ - function testResolve($base, $update, $expected) { - - $this->assertEquals( - $expected, - URLUtil::resolve($base, $update) - ); - - } - - function resolveData() { - - return [ - [ - 'http://example.org/foo/baz', - '/bar', - 'http://example.org/bar', - ], - [ - 'https://example.org/foo', - '//example.net/', - 'https://example.net/', - ], - [ - 'https://example.org/foo', - '?a=b', - 'https://example.org/foo?a=b', - ], - [ - '//example.org/foo', - '?a=b', - '//example.org/foo?a=b', - ], - // Ports and fragments - [ - 'https://example.org:81/foo#hey', - '?a=b#c=d', - 'https://example.org:81/foo?a=b#c=d', - ], - // Relative.. in-directory paths - [ - 'http://example.org/foo/bar', - 'bar2', - 'http://example.org/foo/bar2', - ], - // Now the base path ended with a slash - [ - 'http://example.org/foo/bar/', - 'bar2/bar3', - 'http://example.org/foo/bar/bar2/bar3', - ], - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/http/tests/HTTP/UtilTest.php b/htdocs/includes/sabre/sabre/http/tests/HTTP/UtilTest.php deleted file mode 100644 index 5659bdd2e82..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/HTTP/UtilTest.php +++ /dev/null @@ -1,206 +0,0 @@ -<?php - -namespace Sabre\HTTP; - -class UtilTest extends \PHPUnit_Framework_TestCase { - - function testParseHTTPDate() { - - $times = [ - 'Wed, 13 Oct 2010 10:26:00 GMT', - 'Wednesday, 13-Oct-10 10:26:00 GMT', - 'Wed Oct 13 10:26:00 2010', - ]; - - $expected = 1286965560; - - foreach ($times as $time) { - $result = Util::parseHTTPDate($time); - $this->assertEquals($expected, $result->format('U')); - } - - $result = Util::parseHTTPDate('Wed Oct 6 10:26:00 2010'); - $this->assertEquals(1286360760, $result->format('U')); - - } - - function testParseHTTPDateFail() { - - $times = [ - //random string - 'NOW', - // not-GMT timezone - 'Wednesday, 13-Oct-10 10:26:00 UTC', - // No space before the 6 - 'Wed Oct 6 10:26:00 2010', - // Invalid day - 'Wed Oct 0 10:26:00 2010', - 'Wed Oct 32 10:26:00 2010', - 'Wed, 0 Oct 2010 10:26:00 GMT', - 'Wed, 32 Oct 2010 10:26:00 GMT', - 'Wednesday, 32-Oct-10 10:26:00 GMT', - // Invalid hour - 'Wed, 13 Oct 2010 24:26:00 GMT', - 'Wednesday, 13-Oct-10 24:26:00 GMT', - 'Wed Oct 13 24:26:00 2010', - ]; - - foreach ($times as $time) { - $this->assertFalse(Util::parseHTTPDate($time), 'We used the string: ' . $time); - } - - } - - function testTimezones() { - - $default = date_default_timezone_get(); - date_default_timezone_set('Europe/Amsterdam'); - - $this->testParseHTTPDate(); - - date_default_timezone_set($default); - - } - - function testToHTTPDate() { - - $dt = new \DateTime('2011-12-10 12:00:00 +0200'); - - $this->assertEquals( - 'Sat, 10 Dec 2011 10:00:00 GMT', - Util::toHTTPDate($dt) - ); - - } - - /** - * @dataProvider negotiateData - */ - function testNegotiate($acceptHeader, $available, $expected) { - - $this->assertEquals( - $expected, - Util::negotiate($acceptHeader, $available) - ); - - } - - function negotiateData() { - - return [ - [ // simple - 'application/xml', - ['application/xml'], - 'application/xml', - ], - [ // no header - null, - ['application/xml'], - 'application/xml', - ], - [ // 2 options - 'application/json', - ['application/xml', 'application/json'], - 'application/json', - ], - [ // 2 choices - 'application/json, application/xml', - ['application/xml'], - 'application/xml', - ], - [ // quality - 'application/xml;q=0.2, application/json', - ['application/xml', 'application/json'], - 'application/json', - ], - [ // wildcard - 'image/jpeg, image/png, */*', - ['application/xml', 'application/json'], - 'application/xml', - ], - [ // wildcard + quality - 'image/jpeg, image/png; q=0.5, */*', - ['application/xml', 'application/json', 'image/png'], - 'application/xml', - ], - [ // no match - 'image/jpeg', - ['application/xml'], - null, - ], - [ // This is used in sabre/dav - 'text/vcard; version=4.0', - [ - // Most often used mime-type. Version 3 - 'text/x-vcard', - // The correct standard mime-type. Defaults to version 3 as - // well. - 'text/vcard', - // vCard 4 - 'text/vcard; version=4.0', - // vCard 3 - 'text/vcard; version=3.0', - // jCard - 'application/vcard+json', - ], - 'text/vcard; version=4.0', - - ], - [ // rfc7231 example 1 - 'audio/*; q=0.2, audio/basic', - [ - 'audio/pcm', - 'audio/basic', - ], - 'audio/basic', - ], - [ // Lower quality after - 'audio/pcm; q=0.2, audio/basic; q=0.1', - [ - 'audio/pcm', - 'audio/basic', - ], - 'audio/pcm', - ], - [ // Random parameter, should be ignored - 'audio/pcm; hello; q=0.2, audio/basic; q=0.1', - [ - 'audio/pcm', - 'audio/basic', - ], - 'audio/pcm', - ], - [ // No whitepace after type, should pick the one that is the most specific. - 'text/vcard;version=3.0, text/vcard', - [ - 'text/vcard', - 'text/vcard; version=3.0' - ], - 'text/vcard; version=3.0', - ], - [ // Same as last one, but order is different - 'text/vcard, text/vcard;version=3.0', - [ - 'text/vcard; version=3.0', - 'text/vcard', - ], - 'text/vcard; version=3.0', - ], - [ // Charset should be ignored here. - 'text/vcard; charset=utf-8; version=3.0, text/vcard', - [ - 'text/vcard', - 'text/vcard; version=3.0' - ], - 'text/vcard; version=3.0', - ], - [ // Undefined offset issue. - 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2', - ['application/xml', 'application/json', 'image/png'], - 'application/xml', - ], - - ]; - - } -} diff --git a/htdocs/includes/sabre/sabre/http/tests/bootstrap.php b/htdocs/includes/sabre/sabre/http/tests/bootstrap.php deleted file mode 100644 index 74931b6f118..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/bootstrap.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -date_default_timezone_set('UTC'); - -ini_set('error_reporting', E_ALL | E_STRICT | E_DEPRECATED); - -// Composer autoloader -include __DIR__ . '/../vendor/autoload.php'; diff --git a/htdocs/includes/sabre/sabre/http/tests/phpcs/ruleset.xml b/htdocs/includes/sabre/sabre/http/tests/phpcs/ruleset.xml deleted file mode 100644 index ec2c4c84b1d..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/phpcs/ruleset.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<ruleset name="sabre.php"> - <description>sabre.io codesniffer ruleset</description> - - <!-- Include the whole PSR-1 standard --> - <rule ref="PSR1" /> - - <!-- All PHP files MUST use the Unix LF (linefeed) line ending. --> - <rule ref="Generic.Files.LineEndings"> - <properties> - <property name="eolChar" value="\n"/> - </properties> - </rule> - - <!-- The closing ?> tag MUST be omitted from files containing only PHP. --> - <rule ref="Zend.Files.ClosingTag"/> - - <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> - <properties> - <property name="ignoreBlankLines" value="true"/> - </properties> - </rule> - - <!-- There MUST NOT be more than one statement per line. --> - <rule ref="Generic.Formatting.DisallowMultipleStatements"/> - - <rule ref="Generic.WhiteSpace.ScopeIndent"> - <properties> - <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/> - </properties> - </rule> - <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> - - <!-- PHP keywords MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseKeyword"/> - - <!-- The PHP constants true, false, and null MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseConstant"/> - - <!-- <rule ref="Squiz.Scope.MethodScope"/> --> - <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> - - <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. --> - <!-- - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> - <properties> - <property name="equalsSpacing" value="1"/> - </properties> - </rule> - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> - <severity>0</severity> - </rule> - --> - <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/> - -</ruleset> diff --git a/htdocs/includes/sabre/sabre/http/tests/phpunit.xml b/htdocs/includes/sabre/sabre/http/tests/phpunit.xml deleted file mode 100644 index 32d701a37f7..00000000000 --- a/htdocs/includes/sabre/sabre/http/tests/phpunit.xml +++ /dev/null @@ -1,18 +0,0 @@ -<phpunit - colors="true" - bootstrap="bootstrap.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - strict="true" - > - <testsuite name="Sabre_HTTP"> - <directory>HTTP/</directory> - </testsuite> - - <filter> - <whitelist addUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">../lib/</directory> - </whitelist> - </filter> -</phpunit> diff --git a/htdocs/includes/sabre/sabre/uri/tests/BuildTest.php b/htdocs/includes/sabre/sabre/uri/tests/BuildTest.php deleted file mode 100644 index ae4b4ba2719..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/BuildTest.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Sabre\Uri; - -class BuildTest extends \PHPUnit_Framework_TestCase{ - - /** - * @dataProvider buildUriData - */ - function testBuild($value) { - - $this->assertEquals( - $value, - build(parse_url($value)) - ); - - } - - function buildUriData() { - - return [ - ['http://example.org/'], - ['http://example.org/foo/bar'], - ['//example.org/foo/bar'], - ['/foo/bar'], - ['http://example.org:81/'], - ['http://user@example.org:81/'], - ['http://example.org:81/hi?a=b'], - ['http://example.org:81/hi?a=b#c=d'], - // [ '//example.org:81/hi?a=b#c=d'], // Currently fails due to a - // PHP bug. - ['/hi?a=b#c=d'], - ['?a=b#c=d'], - ['#c=d'], - ['file:///etc/hosts'], - ['file://localhost/etc/hosts'], - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/uri/tests/NormalizeTest.php b/htdocs/includes/sabre/sabre/uri/tests/NormalizeTest.php deleted file mode 100644 index 4dbe943205e..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/NormalizeTest.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -namespace Sabre\Uri; - -class NormalizeTest extends \PHPUnit_Framework_TestCase{ - - /** - * @dataProvider normalizeData - */ - function testNormalize($in, $out) { - - $this->assertEquals( - $out, - normalize($in) - ); - - } - - function normalizeData() { - - return [ - ['http://example.org/', 'http://example.org/'], - ['HTTP://www.EXAMPLE.com/', 'http://www.example.com/'], - ['http://example.org/%7Eevert', 'http://example.org/~evert'], - ['http://example.org/./evert', 'http://example.org/evert'], - ['http://example.org/../evert', 'http://example.org/evert'], - ['http://example.org/foo/../evert', 'http://example.org/evert'], - ['/%41', '/A'], - ['/%3F', '/%3F'], - ['/%3f', '/%3F'], - ['http://example.org', 'http://example.org/'], - ['http://example.org:/', 'http://example.org/'], - ['http://example.org:80/', 'http://example.org/'], - // See issue #6. parse_url corrupts strings like this, but only on - // macs. - //[ 'http://example.org/有词法别名.zh','http://example.org/%E6%9C%89%E8%AF%8D%E6%B3%95%E5%88%AB%E5%90%8D.zh'], - - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/uri/tests/ParseTest.php b/htdocs/includes/sabre/sabre/uri/tests/ParseTest.php deleted file mode 100644 index ab0ead2cc96..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/ParseTest.php +++ /dev/null @@ -1,179 +0,0 @@ -<?php - -namespace Sabre\Uri; - -class ParseTest extends \PHPUnit_Framework_TestCase{ - - /** - * @dataProvider parseData - */ - function testParse($in, $out) { - - $this->assertEquals( - $out, - parse($in) - ); - - } - - /** - * @dataProvider parseData - */ - function testParseFallback($in, $out) { - - $result = _parse_fallback($in); - $result = $result + [ - 'scheme' => null, - 'host' => null, - 'path' => null, - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ]; - - $this->assertEquals( - $out, - $result - ); - - } - - function parseData() { - - return [ - [ - 'http://example.org/hello?foo=bar#test', - [ - 'scheme' => 'http', - 'host' => 'example.org', - 'path' => '/hello', - 'port' => null, - 'user' => null, - 'query' => 'foo=bar', - 'fragment' => 'test' - ] - ], - // See issue #6. parse_url corrupts strings like this, but only on - // macs. - [ - 'http://example.org/有词法别名.zh', - [ - 'scheme' => 'http', - 'host' => 'example.org', - 'path' => '/%E6%9C%89%E8%AF%8D%E6%B3%95%E5%88%AB%E5%90%8D.zh', - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null - ] - ], - [ - 'ftp://user:password@ftp.example.org/', - [ - 'scheme' => 'ftp', - 'host' => 'ftp.example.org', - 'path' => '/', - 'port' => null, - 'user' => 'user', - 'pass' => 'password', - 'query' => null, - 'fragment' => null, - ] - ], - // See issue #9, parse_url doesn't like colons followed by numbers even - // though they are allowed since RFC 3986 - [ - 'http://example.org/hello:12?foo=bar#test', - [ - 'scheme' => 'http', - 'host' => 'example.org', - 'path' => '/hello:12', - 'port' => null, - 'user' => null, - 'query' => 'foo=bar', - 'fragment' => 'test' - ] - ], - [ - '/path/to/colon:34', - [ - 'scheme' => null, - 'host' => null, - 'path' => '/path/to/colon:34', - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ] - ], - // File scheme - [ - 'file:///foo/bar', - [ - 'scheme' => 'file', - 'host' => '', - 'path' => '/foo/bar', - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ] - ], - // Weird scheme with triple-slash. See Issue #11. - [ - 'vfs:///somefile', - [ - 'scheme' => 'vfs', - 'host' => '', - 'path' => '/somefile', - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ] - ], - // Examples from RFC3986 - [ - 'ldap://[2001:db8::7]/c=GB?objectClass?one', - [ - 'scheme' => 'ldap', - 'host' => '[2001:db8::7]', - 'path' => '/c=GB', - 'port' => null, - 'user' => null, - 'query' => 'objectClass?one', - 'fragment' => null, - ] - ], - [ - 'news:comp.infosystems.www.servers.unix', - [ - 'scheme' => 'news', - 'host' => null, - 'path' => 'comp.infosystems.www.servers.unix', - 'port' => null, - 'user' => null, - 'query' => null, - 'fragment' => null, - ] - ], - // Port - [ - 'http://example.org:8080/', - [ - 'scheme' => 'http', - 'host' => 'example.org', - 'path' => '/', - 'port' => 8080, - 'user' => null, - 'query' => null, - 'fragment' => null, - ] - ], - - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/uri/tests/ResolveTest.php b/htdocs/includes/sabre/sabre/uri/tests/ResolveTest.php deleted file mode 100644 index 73e4dea69d8..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/ResolveTest.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -namespace Sabre\Uri; - -class ResolveTest extends \PHPUnit_Framework_TestCase{ - - /** - * @dataProvider resolveData - */ - function testResolve($base, $update, $expected) { - - $this->assertEquals( - $expected, - resolve($base, $update) - ); - - } - - function resolveData() { - - return [ - [ - 'http://example.org/foo/baz', - '/bar', - 'http://example.org/bar', - ], - [ - 'https://example.org/foo', - '//example.net/', - 'https://example.net/', - ], - [ - 'https://example.org/foo', - '?a=b', - 'https://example.org/foo?a=b', - ], - [ - '//example.org/foo', - '?a=b', - '//example.org/foo?a=b', - ], - // Ports and fragments - [ - 'https://example.org:81/foo#hey', - '?a=b#c=d', - 'https://example.org:81/foo?a=b#c=d', - ], - // Relative.. in-directory paths - [ - 'http://example.org/foo/bar', - 'bar2', - 'http://example.org/foo/bar2', - ], - // Now the base path ended with a slash - [ - 'http://example.org/foo/bar/', - 'bar2/bar3', - 'http://example.org/foo/bar/bar2/bar3', - ], - // .. and . - [ - 'http://example.org/foo/bar/', - '../bar2/.././/bar3/', - 'http://example.org/foo//bar3/', - ], - // Only updating the fragment - [ - 'https://example.org/foo?a=b', - '#comments', - 'https://example.org/foo?a=b#comments', - ], - // Switching to mailto! - [ - 'https://example.org/foo?a=b', - 'mailto:foo@example.org', - 'mailto:foo@example.org', - ], - - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/uri/tests/SplitTest.php b/htdocs/includes/sabre/sabre/uri/tests/SplitTest.php deleted file mode 100644 index 2d73c9b255d..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/SplitTest.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Sabre\Uri; - -class SplitTest extends \PHPUnit_Framework_TestCase{ - - function testSplit() { - - $strings = [ - - // input // expected result - '/foo/bar' => ['/foo','bar'], - '/foo/bar/' => ['/foo','bar'], - 'foo/bar/' => ['foo','bar'], - 'foo/bar' => ['foo','bar'], - 'foo/bar/baz' => ['foo/bar','baz'], - 'foo/bar/baz/' => ['foo/bar','baz'], - 'foo' => ['','foo'], - 'foo/' => ['','foo'], - '/foo/' => ['','foo'], - '/foo' => ['','foo'], - '' => [null,null], - - // UTF-8 - "/\xC3\xA0fo\xC3\xB3/bar" => ["/\xC3\xA0fo\xC3\xB3",'bar'], - "/\xC3\xA0foo/b\xC3\xBCr/" => ["/\xC3\xA0foo","b\xC3\xBCr"], - "foo/\xC3\xA0\xC3\xBCr" => ["foo","\xC3\xA0\xC3\xBCr"], - - ]; - - foreach ($strings as $input => $expected) { - - $output = split($input); - $this->assertEquals($expected, $output, 'The expected output for \'' . $input . '\' was incorrect'); - - - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/uri/tests/phpcs/ruleset.xml b/htdocs/includes/sabre/sabre/uri/tests/phpcs/ruleset.xml deleted file mode 100644 index ec2c4c84b1d..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/phpcs/ruleset.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0"?> -<ruleset name="sabre.php"> - <description>sabre.io codesniffer ruleset</description> - - <!-- Include the whole PSR-1 standard --> - <rule ref="PSR1" /> - - <!-- All PHP files MUST use the Unix LF (linefeed) line ending. --> - <rule ref="Generic.Files.LineEndings"> - <properties> - <property name="eolChar" value="\n"/> - </properties> - </rule> - - <!-- The closing ?> tag MUST be omitted from files containing only PHP. --> - <rule ref="Zend.Files.ClosingTag"/> - - <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> - <properties> - <property name="ignoreBlankLines" value="true"/> - </properties> - </rule> - - <!-- There MUST NOT be more than one statement per line. --> - <rule ref="Generic.Formatting.DisallowMultipleStatements"/> - - <rule ref="Generic.WhiteSpace.ScopeIndent"> - <properties> - <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/> - </properties> - </rule> - <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> - - <!-- PHP keywords MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseKeyword"/> - - <!-- The PHP constants true, false, and null MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseConstant"/> - - <!-- <rule ref="Squiz.Scope.MethodScope"/> --> - <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> - - <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. --> - <!-- - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> - <properties> - <property name="equalsSpacing" value="1"/> - </properties> - </rule> - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> - <severity>0</severity> - </rule> - --> - <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/> - -</ruleset> diff --git a/htdocs/includes/sabre/sabre/uri/tests/phpunit.xml.dist b/htdocs/includes/sabre/sabre/uri/tests/phpunit.xml.dist deleted file mode 100644 index 338d24d3c06..00000000000 --- a/htdocs/includes/sabre/sabre/uri/tests/phpunit.xml.dist +++ /dev/null @@ -1,18 +0,0 @@ -<phpunit - colors="true" - bootstrap="../vendor/autoload.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - strict="true" - > - <testsuite name="sabre-uri"> - <directory>.</directory> - </testsuite> - - <filter> - <whitelist addUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">../lib/</directory> - </whitelist> - </filter> -</phpunit> diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/AttachIssueTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/AttachIssueTest.php deleted file mode 100644 index 68c9872bb5b..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/AttachIssueTest.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class AttachIssueTest extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $event = <<<ICS -BEGIN:VCALENDAR\r -BEGIN:VEVENT\r -ATTACH;FMTTYPE=;ENCODING=:Zm9v\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - $obj = Reader::read($event); - $this->assertEquals($event, $obj->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/BirthdayCalendarGeneratorTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/BirthdayCalendarGeneratorTest.php deleted file mode 100644 index 54c478eaf46..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/BirthdayCalendarGeneratorTest.php +++ /dev/null @@ -1,562 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class BirthdayCalendarGeneratorTest extends \PHPUnit_Framework_TestCase { - - use PHPUnitAssertions; - - function testVcardStringWithValidBirthday() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testArrayOfVcardStringsWithValidBirthdays() { - - $generator = new BirthdayCalendarGenerator(); - $input = []; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Doe;John;;Mr. -FN:John Doe -BDAY:19820210 -UID:bar -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:John Doe's Birthday -DTSTART;VALUE=DATE:19820210 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=bar;X-SABRE-VCARD-FN=John Doe:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testArrayOfVcardStringsWithValidBirthdaysViaConstructor() { - - $input = []; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Doe;John;;Mr. -FN:John Doe -BDAY:19820210 -UID:bar -END:VCARD -VCF; - - $generator = new BirthdayCalendarGenerator($input); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:John Doe's Birthday -DTSTART;VALUE=DATE:19820210 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=bar;X-SABRE-VCARD-FN=John Doe:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardObjectWithValidBirthday() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $input = Reader::read($input); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testArrayOfVcardObjectsWithValidBirthdays() { - - $generator = new BirthdayCalendarGenerator(); - $input = []; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Doe;John;;Mr. -FN:John Doe -BDAY:19820210 -UID:bar -END:VCARD -VCF; - - foreach ($input as $key => $value) { - $input[$key] = Reader::read($value); - } - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:John Doe's Birthday -DTSTART;VALUE=DATE:19820210 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=bar;X-SABRE-VCARD-FN=John Doe:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithValidBirthdayWithXAppleOmitYear() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY;X-APPLE-OMIT-YEAR=1604:1604-04-07 -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:20000407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump;X-SABRE-OMIT-YEAR=2000:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithValidBirthdayWithoutYear() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:4.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:--04-07 -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Birthday -DTSTART;VALUE=DATE:20000407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump;X-SABRE-OMIT-YEAR=2000:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithInvalidBirthday() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:foo -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithNoBirthday() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithValidBirthdayLocalized() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:**ANY** -DTSTAMP:**ANY** -SUMMARY:Forrest Gump's Geburtstag -DTSTART;VALUE=DATE:19850407 -RRULE:FREQ=YEARLY -TRANSP:TRANSPARENT -X-SABRE-BDAY;X-SABRE-VCARD-UID=foo;X-SABRE-VCARD-FN=Forrest Gump:BDAY -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $generator->setFormat('%1$s\'s Geburtstag'); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - function testVcardStringWithEmptyBirthdayProperty() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY: -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testParseException() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<FOO -BEGIN:FOO -FOO:Bar -END:FOO -FOO; - - $generator->setObjects($input); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testInvalidArgumentException() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SUMMARY:Foo -DTSTART;VALUE=DATE:19850407 -END:VEVENT -END:VCALENDAR -ICS; - - $generator->setObjects($input); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testInvalidArgumentExceptionForPartiallyInvalidArray() { - - $generator = new BirthdayCalendarGenerator(); - $input = []; - - $input[] = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -FN:Forrest Gump -BDAY:19850407 -UID:foo -END:VCARD -VCF; - $calendar = new Component\VCalendar(); - - $input = $calendar->add('VEVENT', [ - 'SUMMARY' => 'Foo', - 'DTSTART' => new \DateTime('NOW'), - ]); - - $generator->setObjects($input); - - } - - function testBrokenVcardWithoutFN() { - - $generator = new BirthdayCalendarGenerator(); - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -N:Gump;Forrest;;Mr. -BDAY:19850407 -UID:foo -END:VCARD -VCF; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -END:VCALENDAR -ICS; - - $generator->setObjects($input); - $output = $generator->getResult(); - - $this->assertVObjectEqualsVObject( - $expected, - $output - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/CliTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/CliTest.php deleted file mode 100644 index 67037873e37..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/CliTest.php +++ /dev/null @@ -1,642 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * Tests the cli. - * - * Warning: these tests are very rudimentary. - */ -class CliTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - $this->cli = new CliMock(); - $this->cli->stderr = fopen('php://memory', 'r+'); - $this->cli->stdout = fopen('php://memory', 'r+'); - - } - - function testInvalidArg() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', '--hi']) - ); - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - } - - function testQuiet() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', '-q']) - ); - $this->assertTrue($this->cli->quiet); - - rewind($this->cli->stderr); - $this->assertEquals(0, strlen(stream_get_contents($this->cli->stderr))); - - } - - function testHelp() { - - $this->assertEquals( - 0, - $this->cli->main(['vobject', '-h']) - ); - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - } - - function testFormat() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', '--format=jcard']) - ); - - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - $this->assertEquals('jcard', $this->cli->format); - - } - - function testFormatInvalid() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', '--format=foo']) - ); - - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - $this->assertNull($this->cli->format); - - } - - function testInputFormatInvalid() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', '--inputformat=foo']) - ); - - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - $this->assertNull($this->cli->format); - - } - - - function testNoInputFile() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', 'color']) - ); - - rewind($this->cli->stderr); - $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100); - - } - - function testTooManyArgs() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', 'color', 'a', 'b', 'c']) - ); - - } - - function testUnknownCommand() { - - $this->assertEquals( - 1, - $this->cli->main(['vobject', 'foo', '-']) - ); - - } - - function testConvertJson() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<ICS -BEGIN:VCARD -VERSION:3.0 -FN:Cowboy Henk -END:VCARD -ICS - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 0, - $this->cli->main(['vobject', 'convert', '--format=json', '-']) - ); - - rewind($this->cli->stdout); - $version = Version::VERSION; - $this->assertEquals( - '["vcard",[["version",{},"text","4.0"],["prodid",{},"text","-\/\/Sabre\/\/Sabre VObject ' . $version . '\/\/EN"],["fn",{},"text","Cowboy Henk"]]]', - stream_get_contents($this->cli->stdout) - ); - - } - - function testConvertJCardPretty() { - - if (version_compare(PHP_VERSION, '5.4.0') < 0) { - $this->markTestSkipped('This test required PHP 5.4.0'); - } - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<ICS -BEGIN:VCARD -VERSION:3.0 -FN:Cowboy Henk -END:VCARD -ICS - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 0, - $this->cli->main(['vobject', 'convert', '--format=jcard', '--pretty', '-']) - ); - - rewind($this->cli->stdout); - - // PHP 5.5.12 changed the output - - $expected = <<<JCARD -[ - "vcard", - [ - [ - "versi -JCARD; - - $this->assertStringStartsWith( - $expected, - stream_get_contents($this->cli->stdout) - ); - - } - - function testConvertJCalFail() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<ICS -BEGIN:VCARD -VERSION:3.0 -FN:Cowboy Henk -END:VCARD -ICS - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'convert', '--format=jcal', '--inputformat=mimedir', '-']) - ); - - } - - function testConvertMimeDir() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<JCARD -[ - "vcard", - [ - [ - "version", - { - - }, - "text", - "4.0" - ], - [ - "prodid", - { - - }, - "text", - "-\/\/Sabre\/\/Sabre VObject 3.1.0\/\/EN" - ], - [ - "fn", - { - - }, - "text", - "Cowboy Henk" - ] - ] -] -JCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 0, - $this->cli->main(['vobject', 'convert', '--format=mimedir', '--inputformat=json', '--pretty', '-']) - ); - - rewind($this->cli->stdout); - $expected = <<<VCF -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -FN:Cowboy Henk -END:VCARD - -VCF; - - $this->assertEquals( - strtr($expected, ["\n" => "\r\n"]), - stream_get_contents($this->cli->stdout) - ); - - } - - function testConvertDefaultFormats() { - - $outputFile = SABRE_TEMPDIR . 'bar.json'; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'convert', 'foo.json', $outputFile]) - ); - - $this->assertEquals('json', $this->cli->inputFormat); - $this->assertEquals('json', $this->cli->format); - - } - - function testConvertDefaultFormats2() { - - $outputFile = SABRE_TEMPDIR . 'bar.ics'; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'convert', 'foo.ics', $outputFile]) - ); - - $this->assertEquals('mimedir', $this->cli->inputFormat); - $this->assertEquals('mimedir', $this->cli->format); - - } - - function testVCard3040() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:3.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -FN:Cowboy Henk -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 0, - $this->cli->main(['vobject', 'convert', '--format=vcard40', '--pretty', '-']) - ); - - rewind($this->cli->stdout); - - $version = Version::VERSION; - $expected = <<<VCF -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject $version//EN -FN:Cowboy Henk -END:VCARD - -VCF; - - $this->assertEquals( - strtr($expected, ["\n" => "\r\n"]), - stream_get_contents($this->cli->stdout) - ); - - } - - function testVCard4030() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -FN:Cowboy Henk -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 0, - $this->cli->main(['vobject', 'convert', '--format=vcard30', '--pretty', '-']) - ); - - $version = Version::VERSION; - - rewind($this->cli->stdout); - $expected = <<<VCF -BEGIN:VCARD -VERSION:3.0 -PRODID:-//Sabre//Sabre VObject $version//EN -FN:Cowboy Henk -END:VCARD - -VCF; - - $this->assertEquals( - strtr($expected, ["\n" => "\r\n"]), - stream_get_contents($this->cli->stdout) - ); - - } - - function testVCard4021() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -FN:Cowboy Henk -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'convert', '--format=vcard21', '--pretty', '-']) - ); - - } - - function testValidate() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -UID:foo -FN:Cowboy Henk -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - $result = $this->cli->main(['vobject', 'validate', '-']); - - $this->assertEquals( - 0, - $result - ); - - } - - function testValidateFail() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCALENDAR -VERSION:2.0 -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - // vCard 2.0 is not supported yet, so this returns a failure. - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'validate', '-']) - ); - - } - - function testValidateFail2() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCALENDAR -VERSION:5.0 -END:VCALENDAR - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'validate', '-']) - ); - - } - - function testRepair() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:5.0 -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $this->assertEquals( - 2, - $this->cli->main(['vobject', 'repair', '-']) - ); - - rewind($this->cli->stdout); - $this->assertRegExp("/^BEGIN:VCARD\r\nVERSION:2.1\r\nUID:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\r\nEND:VCARD\r\n$/", stream_get_contents($this->cli->stdout)); - } - - function testRepairNothing() { - - $inputStream = fopen('php://memory', 'r+'); - - fwrite($inputStream, <<<VCARD -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject 3.1.0//EN -BEGIN:VEVENT -UID:foo -DTSTAMP:20140122T233226Z -DTSTART:20140101T120000Z -END:VEVENT -END:VCALENDAR - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $result = $this->cli->main(['vobject', 'repair', '-']); - - rewind($this->cli->stderr); - $error = stream_get_contents($this->cli->stderr); - - $this->assertEquals( - 0, - $result, - "This should have been error free. stderr output:\n" . $error - ); - - } - - /** - * Note: this is a very shallow test, doesn't dig into the actual output, - * but just makes sure there's no errors thrown. - * - * The colorizer is not a critical component, it's mostly a debugging tool. - */ - function testColorCalendar() { - - $inputStream = fopen('php://memory', 'r+'); - - $version = Version::VERSION; - - /** - * This object is not valid, but it's designed to hit every part of the - * colorizer source. - */ - fwrite($inputStream, <<<VCARD -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject {$version}//EN -BEGIN:VTIMEZONE -END:VTIMEZONE -BEGIN:VEVENT -ATTENDEE;RSVP=TRUE:mailto:foo@example.org -REQUEST-STATUS:5;foo -ATTACH:blabla -END:VEVENT -END:VCALENDAR - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $result = $this->cli->main(['vobject', 'color', '-']); - - rewind($this->cli->stderr); - $error = stream_get_contents($this->cli->stderr); - - $this->assertEquals( - 0, - $result, - "This should have been error free. stderr output:\n" . $error - ); - - } - - /** - * Note: this is a very shallow test, doesn't dig into the actual output, - * but just makes sure there's no errors thrown. - * - * The colorizer is not a critical component, it's mostly a debugging tool. - */ - function testColorVCard() { - - $inputStream = fopen('php://memory', 'r+'); - - $version = Version::VERSION; - - /** - * This object is not valid, but it's designed to hit every part of the - * colorizer source. - */ - fwrite($inputStream, <<<VCARD -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject {$version}//EN -ADR:1;2;3;4a,4b;5;6 -group.TEL:123454768 -END:VCARD - -VCARD - ); - rewind($inputStream); - $this->cli->stdin = $inputStream; - - $result = $this->cli->main(['vobject', 'color', '-']); - - rewind($this->cli->stderr); - $error = stream_get_contents($this->cli->stderr); - - $this->assertEquals( - 0, - $result, - "This should have been error free. stderr output:\n" . $error - ); - - } -} - -class CliMock extends Cli { - - public $quiet = false; - - public $format; - - public $pretty; - - public $stdin; - - public $stdout; - - public $stderr; - - public $inputFormat; - - public $outputFormat; - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/AvailableTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/AvailableTest.php deleted file mode 100644 index a13f67ac23b..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/AvailableTest.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use DateTimeImmutable; -use DateTimeZone; -use Sabre\VObject\Reader; - -/** - * We use `RFCxxx` has a placeholder for the - * https://tools.ietf.org/html/draft-daboo-calendar-availability-05 name. - */ -class AvailableTest extends \PHPUnit_Framework_TestCase { - - function testAvailableComponent() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:AVAILABLE -END:AVAILABLE -END:VCALENDAR -VCAL; - $document = Reader::read($vcal); - $this->assertInstanceOf(__NAMESPACE__ . '\Available', $document->AVAILABLE); - - } - - function testGetEffectiveStartEnd() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:AVAILABLE -DTSTART:20150717T162200Z -DTEND:20150717T172200Z -END:AVAILABLE -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $tz = new DateTimeZone('UTC'); - $this->assertEquals( - [ - new DateTimeImmutable('2015-07-17 16:22:00', $tz), - new DateTimeImmutable('2015-07-17 17:22:00', $tz), - ], - $document->AVAILABLE->getEffectiveStartEnd() - ); - - } - - function testGetEffectiveStartEndDuration() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:AVAILABLE -DTSTART:20150717T162200Z -DURATION:PT1H -END:AVAILABLE -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $tz = new DateTimeZone('UTC'); - $this->assertEquals( - [ - new DateTimeImmutable('2015-07-17 16:22:00', $tz), - new DateTimeImmutable('2015-07-17 17:22:00', $tz), - ], - $document->AVAILABLE->getEffectiveStartEnd() - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAlarmTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAlarmTest.php deleted file mode 100644 index b398e71e824..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAlarmTest.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use DateTime; -use Sabre\VObject\Reader; - -class VAlarmTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider timeRangeTestData - */ - function testInTimeRange(VAlarm $valarm, $start, $end, $outcome) { - - $this->assertEquals($outcome, $valarm->isInTimeRange($start, $end)); - - } - - function timeRangeTestData() { - - $tests = []; - - $calendar = new VCalendar(); - - // Hard date and time - $valarm1 = $calendar->createComponent('VALARM'); - $valarm1->add( - $calendar->createProperty('TRIGGER', '20120312T130000Z', ['VALUE' => 'DATE-TIME']) - ); - - $tests[] = [$valarm1, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-04-01 01:00:00'), true]; - $tests[] = [$valarm1, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-03-10 01:00:00'), false]; - - // Relation to start time of event - $valarm2 = $calendar->createComponent('VALARM'); - $valarm2->add( - $calendar->createProperty('TRIGGER', '-P1D', ['VALUE' => 'DURATION']) - ); - - $vevent2 = $calendar->createComponent('VEVENT'); - $vevent2->DTSTART = '20120313T130000Z'; - $vevent2->add($valarm2); - - $tests[] = [$valarm2, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-04-01 01:00:00'), true]; - $tests[] = [$valarm2, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-03-10 01:00:00'), false]; - - // Relation to end time of event - $valarm3 = $calendar->createComponent('VALARM'); - $valarm3->add($calendar->createProperty('TRIGGER', '-P1D', ['VALUE' => 'DURATION', 'RELATED' => 'END'])); - - $vevent3 = $calendar->createComponent('VEVENT'); - $vevent3->DTSTART = '20120301T130000Z'; - $vevent3->DTEND = '20120401T130000Z'; - $vevent3->add($valarm3); - - $tests[] = [$valarm3, new DateTime('2012-02-25 01:00:00'), new DateTime('2012-03-05 01:00:00'), false]; - $tests[] = [$valarm3, new DateTime('2012-03-25 01:00:00'), new DateTime('2012-04-05 01:00:00'), true]; - - // Relation to end time of todo - $valarm4 = $calendar->createComponent('VALARM'); - $valarm4->TRIGGER = '-P1D'; - $valarm4->TRIGGER['VALUE'] = 'DURATION'; - $valarm4->TRIGGER['RELATED'] = 'END'; - - $vtodo4 = $calendar->createComponent('VTODO'); - $vtodo4->DTSTART = '20120301T130000Z'; - $vtodo4->DUE = '20120401T130000Z'; - $vtodo4->add($valarm4); - - $tests[] = [$valarm4, new DateTime('2012-02-25 01:00:00'), new DateTime('2012-03-05 01:00:00'), false]; - $tests[] = [$valarm4, new DateTime('2012-03-25 01:00:00'), new DateTime('2012-04-05 01:00:00'), true]; - - // Relation to start time of event + repeat - $valarm5 = $calendar->createComponent('VALARM'); - $valarm5->TRIGGER = '-P1D'; - $valarm5->TRIGGER['VALUE'] = 'DURATION'; - $valarm5->REPEAT = 10; - $valarm5->DURATION = 'P1D'; - - $vevent5 = $calendar->createComponent('VEVENT'); - $vevent5->DTSTART = '20120301T130000Z'; - $vevent5->add($valarm5); - - $tests[] = [$valarm5, new DateTime('2012-03-09 01:00:00'), new DateTime('2012-03-10 01:00:00'), true]; - - // Relation to start time of event + duration, but no repeat - $valarm6 = $calendar->createComponent('VALARM'); - $valarm6->TRIGGER = '-P1D'; - $valarm6->TRIGGER['VALUE'] = 'DURATION'; - $valarm6->DURATION = 'P1D'; - - $vevent6 = $calendar->createComponent('VEVENT'); - $vevent6->DTSTART = '20120313T130000Z'; - $vevent6->add($valarm6); - - $tests[] = [$valarm6, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-04-01 01:00:00'), true]; - $tests[] = [$valarm6, new DateTime('2012-03-01 01:00:00'), new DateTime('2012-03-10 01:00:00'), false]; - - - // Relation to end time of event (DURATION instead of DTEND) - $valarm7 = $calendar->createComponent('VALARM'); - $valarm7->TRIGGER = '-P1D'; - $valarm7->TRIGGER['VALUE'] = 'DURATION'; - $valarm7->TRIGGER['RELATED'] = 'END'; - - $vevent7 = $calendar->createComponent('VEVENT'); - $vevent7->DTSTART = '20120301T130000Z'; - $vevent7->DURATION = 'P30D'; - $vevent7->add($valarm7); - - $tests[] = [$valarm7, new DateTime('2012-02-25 01:00:00'), new DateTime('2012-03-05 01:00:00'), false]; - $tests[] = [$valarm7, new DateTime('2012-03-25 01:00:00'), new DateTime('2012-04-05 01:00:00'), true]; - - // Relation to end time of event (No DTEND or DURATION) - $valarm7 = $calendar->createComponent('VALARM'); - $valarm7->TRIGGER = '-P1D'; - $valarm7->TRIGGER['VALUE'] = 'DURATION'; - $valarm7->TRIGGER['RELATED'] = 'END'; - - $vevent7 = $calendar->createComponent('VEVENT'); - $vevent7->DTSTART = '20120301T130000Z'; - $vevent7->add($valarm7); - - $tests[] = [$valarm7, new DateTime('2012-02-25 01:00:00'), new DateTime('2012-03-05 01:00:00'), true]; - $tests[] = [$valarm7, new DateTime('2012-03-25 01:00:00'), new DateTime('2012-04-05 01:00:00'), false]; - - - return $tests; - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testInTimeRangeInvalidComponent() { - - $calendar = new VCalendar(); - $valarm = $calendar->createComponent('VALARM'); - $valarm->TRIGGER = '-P1D'; - $valarm->TRIGGER['RELATED'] = 'END'; - - $vjournal = $calendar->createComponent('VJOURNAL'); - $vjournal->add($valarm); - - $valarm->isInTimeRange(new DateTime('2012-02-25 01:00:00'), new DateTime('2012-03-05 01:00:00')); - - } - - /** - * This bug was found and reported on the mailing list. - */ - function testInTimeRangeBuggy() { - -$input = <<<BLA -BEGIN:VCALENDAR -BEGIN:VTODO -DTSTAMP:20121003T064931Z -UID:b848cb9a7bb16e464a06c222ca1f8102@examle.com -STATUS:NEEDS-ACTION -DUE:20121005T000000Z -SUMMARY:Task 1 -CATEGORIES:AlarmCategory -BEGIN:VALARM -TRIGGER:-PT10M -ACTION:DISPLAY -DESCRIPTION:Task 1 -END:VALARM -END:VTODO -END:VCALENDAR -BLA; - - $vobj = Reader::read($input); - - $this->assertTrue($vobj->VTODO->VALARM->isInTimeRange(new \DateTime('2012-10-01 00:00:00'), new \DateTime('2012-11-01 00:00:00'))); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAvailabilityTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAvailabilityTest.php deleted file mode 100644 index 021100ecb88..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VAvailabilityTest.php +++ /dev/null @@ -1,490 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use DateTimeImmutable; -use DateTimeZone; -use Sabre\VObject; -use Sabre\VObject\Reader; - -/** - * We use `RFCxxx` has a placeholder for the - * https://tools.ietf.org/html/draft-daboo-calendar-availability-05 name. - */ -class VAvailabilityTest extends \PHPUnit_Framework_TestCase { - - function testVAvailabilityComponent() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -END:VAVAILABILITY -END:VCALENDAR -VCAL; - $document = Reader::read($vcal); - - $this->assertInstanceOf(__NAMESPACE__ . '\VAvailability', $document->VAVAILABILITY); - - } - - function testGetEffectiveStartEnd() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20150717T162200Z -DTEND:20150717T172200Z -END:VAVAILABILITY -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $tz = new DateTimeZone('UTC'); - $this->assertEquals( - [ - new DateTimeImmutable('2015-07-17 16:22:00', $tz), - new DateTimeImmutable('2015-07-17 17:22:00', $tz), - ], - $document->VAVAILABILITY->getEffectiveStartEnd() - ); - - } - - function testGetEffectiveStartDuration() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20150717T162200Z -DURATION:PT1H -END:VAVAILABILITY -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $tz = new DateTimeZone('UTC'); - $this->assertEquals( - [ - new DateTimeImmutable('2015-07-17 16:22:00', $tz), - new DateTimeImmutable('2015-07-17 17:22:00', $tz), - ], - $document->VAVAILABILITY->getEffectiveStartEnd() - ); - - } - - function testGetEffectiveStartEndUnbound() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -END:VAVAILABILITY -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $this->assertEquals( - [ - null, - null, - ], - $document->VAVAILABILITY->getEffectiveStartEnd() - ); - - } - - function testIsInTimeRangeUnbound() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -END:VAVAILABILITY -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $this->assertTrue( - $document->VAVAILABILITY->isInTimeRange(new DateTimeImmutable('2015-07-17'), new DateTimeImmutable('2015-07-18')) - ); - - } - - function testIsInTimeRangeOutside() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20140101T000000Z -DTEND:20140102T000000Z -END:VAVAILABILITY -END:VCALENDAR -VCAL; - - $document = Reader::read($vcal); - $this->assertFalse( - $document->VAVAILABILITY->isInTimeRange(new DateTimeImmutable('2015-07-17'), new DateTimeImmutable('2015-07-18')) - ); - - } - - function testRFCxxxSection3_1_availabilityprop_required() { - - // UID and DTSTAMP are present. - $this->assertIsValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // UID and DTSTAMP are missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // DTSTAMP is missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // UID is missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -DTSTAMP:20111005T133225Z -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - } - - function testRFCxxxSection3_1_availabilityprop_optional_once() { - - $properties = [ - 'BUSYTYPE:BUSY', - 'CLASS:PUBLIC', - 'CREATED:20111005T135125Z', - 'DESCRIPTION:Long bla bla', - 'DTSTART:20111005T020000', - 'LAST-MODIFIED:20111005T135325Z', - 'ORGANIZER:mailto:foo@example.com', - 'PRIORITY:1', - 'SEQUENCE:0', - 'SUMMARY:Bla bla', - 'URL:http://example.org/' - ]; - - // They are all present, only once. - $this->assertIsValid(Reader::read($this->template($properties))); - - // We duplicate each one to see if it fails. - foreach ($properties as $property) { - $this->assertIsNotValid(Reader::read($this->template([ - $property, - $property - ]))); - } - - } - - function testRFCxxxSection3_1_availabilityprop_dtend_duration() { - - // Only DTEND. - $this->assertIsValid(Reader::read($this->template([ - 'DTEND:21111005T133225Z' - ]))); - - // Only DURATION. - $this->assertIsValid(Reader::read($this->template([ - 'DURATION:PT1H' - ]))); - - // Both (not allowed). - $this->assertIsNotValid(Reader::read($this->template([ - 'DTEND:21111005T133225Z', - 'DURATION:PT1H' - ]))); - } - - function testAvailableSubComponent() { - - $vcal = <<<VCAL -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -BEGIN:AVAILABLE -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL; - $document = Reader::read($vcal); - - $this->assertInstanceOf(__NAMESPACE__, $document->VAVAILABILITY->AVAILABLE); - - } - - function testRFCxxxSection3_1_availableprop_required() { - - // UID, DTSTAMP and DTSTART are present. - $this->assertIsValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -UID:foo@test -DTSTAMP:20111005T133225Z -DTSTART:20111005T133225Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // UID, DTSTAMP and DTSTART are missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // UID is missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -DTSTAMP:20111005T133225Z -DTSTART:20111005T133225Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // DTSTAMP is missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -UID:foo@test -DTSTART:20111005T133225Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - // DTSTART is missing. - $this->assertIsNotValid(Reader::read( -<<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -UID:foo@test -DTSTAMP:20111005T133225Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL - )); - - } - - function testRFCxxxSection3_1_available_dtend_duration() { - - // Only DTEND. - $this->assertIsValid(Reader::read($this->templateAvailable([ - 'DTEND:21111005T133225Z' - ]))); - - // Only DURATION. - $this->assertIsValid(Reader::read($this->templateAvailable([ - 'DURATION:PT1H' - ]))); - - // Both (not allowed). - $this->assertIsNotValid(Reader::read($this->templateAvailable([ - 'DTEND:21111005T133225Z', - 'DURATION:PT1H' - ]))); - } - - function testRFCxxxSection3_1_available_optional_once() { - - $properties = [ - 'CREATED:20111005T135125Z', - 'DESCRIPTION:Long bla bla', - 'LAST-MODIFIED:20111005T135325Z', - 'RECURRENCE-ID;RANGE=THISANDFUTURE:19980401T133000Z', - 'RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR', - 'SUMMARY:Bla bla' - ]; - - // They are all present, only once. - $this->assertIsValid(Reader::read($this->templateAvailable($properties))); - - // We duplicate each one to see if it fails. - foreach ($properties as $property) { - $this->assertIsNotValid(Reader::read($this->templateAvailable([ - $property, - $property - ]))); - } - - } - function testRFCxxxSection3_2() { - - $this->assertEquals( - 'BUSY', - Reader::read($this->templateAvailable([ - 'BUSYTYPE:BUSY' - ])) - ->VAVAILABILITY - ->AVAILABLE - ->BUSYTYPE - ->getValue() - ); - - $this->assertEquals( - 'BUSY-UNAVAILABLE', - Reader::read($this->templateAvailable([ - 'BUSYTYPE:BUSY-UNAVAILABLE' - ])) - ->VAVAILABILITY - ->AVAILABLE - ->BUSYTYPE - ->getValue() - ); - - $this->assertEquals( - 'BUSY-TENTATIVE', - Reader::read($this->templateAvailable([ - 'BUSYTYPE:BUSY-TENTATIVE' - ])) - ->VAVAILABILITY - ->AVAILABLE - ->BUSYTYPE - ->getValue() - ); - - } - - protected function assertIsValid(VObject\Document $document) { - - $validationResult = $document->validate(); - if ($validationResult) { - $messages = array_map(function($item) { return $item['message']; }, $validationResult); - $this->fail('Failed to assert that the supplied document is a valid document. Validation messages: ' . implode(', ', $messages)); - } - $this->assertEmpty($document->validate()); - - } - - protected function assertIsNotValid(VObject\Document $document) { - - $this->assertNotEmpty($document->validate()); - - } - - protected function template(array $properties) { - - return $this->_template( - <<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -… -END:VAVAILABILITY -END:VCALENDAR -VCAL -, - $properties - ); - - } - - protected function templateAvailable(array $properties) { - - return $this->_template( - <<<VCAL -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//id -BEGIN:VAVAILABILITY -UID:foo@test -DTSTAMP:20111005T133225Z -BEGIN:AVAILABLE -UID:foo@test -DTSTAMP:20111005T133225Z -DTSTART:20111005T133225Z -… -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -VCAL -, - $properties - ); - - } - - protected function _template($template, array $properties) { - - return str_replace('…', implode("\r\n", $properties), $template); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCalendarTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCalendarTest.php deleted file mode 100644 index abb387d9572..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCalendarTest.php +++ /dev/null @@ -1,782 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use DateTimeZone; -use Sabre\VObject; - -class VCalendarTest extends \PHPUnit_Framework_TestCase { - - use VObject\PHPUnitAssertions; - - /** - * @dataProvider expandData - */ - function testExpand($input, $output, $timeZone = 'UTC', $start = '2011-12-01', $end = '2011-12-31') { - - $vcal = VObject\Reader::read($input); - - $timeZone = new DateTimeZone($timeZone); - - $vcal = $vcal->expand( - new \DateTime($start), - new \DateTime($end), - $timeZone - ); - - // This will normalize the output - $output = VObject\Reader::read($output)->serialize(); - - $this->assertVObjectEqualsVObject($output, $vcal->serialize()); - - } - - function expandData() { - - $tests = []; - - // No data - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -END:VCALENDAR -'; - - $output = $input; - $tests[] = [$input,$output]; - - - // Simple events - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla -SUMMARY:InExpand -DTSTART;VALUE=DATE:20111202 -END:VEVENT -BEGIN:VEVENT -UID:bla2 -SUMMARY:NotInExpand -DTSTART;VALUE=DATE:20120101 -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla -SUMMARY:InExpand -DTSTART;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - - // Removing timezone info - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Europe/Paris -END:VTIMEZONE -BEGIN:VEVENT -UID:bla4 -SUMMARY:RemoveTZ info -DTSTART;TZID=Europe/Paris:20111203T130102 -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla4 -SUMMARY:RemoveTZ info -DTSTART:20111203T120102Z -END:VEVENT -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - - // Removing timezone info from sub-components. See Issue #278 - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:Europe/Paris -END:VTIMEZONE -BEGIN:VEVENT -UID:bla4 -SUMMARY:RemoveTZ info -DTSTART;TZID=Europe/Paris:20111203T130102 -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME;TZID=America/New_York:20151209T133200 -END:VALARM -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla4 -SUMMARY:RemoveTZ info -DTSTART:20111203T120102Z -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:20151209T183200Z -END:VALARM -END:VEVENT -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - - // Recurrence rule - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111125T120000Z -DTEND:20111125T130000Z -RRULE:FREQ=WEEKLY -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111202T120000Z -DTEND:20111202T130000Z -RECURRENCE-ID:20111202T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111209T120000Z -DTEND:20111209T130000Z -RECURRENCE-ID:20111209T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111216T120000Z -DTEND:20111216T130000Z -RECURRENCE-ID:20111216T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111223T120000Z -DTEND:20111223T130000Z -RECURRENCE-ID:20111223T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule -DTSTART:20111230T120000Z -DTEND:20111230T130000Z -RECURRENCE-ID:20111230T120000Z -END:VEVENT -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - - // Recurrence rule + override - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule2 -DTSTART:20111125T120000Z -DTEND:20111125T130000Z -RRULE:FREQ=WEEKLY -END:VEVENT -BEGIN:VEVENT -UID:bla6 -RECURRENCE-ID:20111209T120000Z -DTSTART:20111209T140000Z -DTEND:20111209T150000Z -SUMMARY:Override! -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule2 -DTSTART:20111202T120000Z -DTEND:20111202T130000Z -RECURRENCE-ID:20111202T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -RECURRENCE-ID:20111209T120000Z -DTSTART:20111209T140000Z -DTEND:20111209T150000Z -SUMMARY:Override! -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule2 -DTSTART:20111216T120000Z -DTEND:20111216T130000Z -RECURRENCE-ID:20111216T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule2 -DTSTART:20111223T120000Z -DTEND:20111223T130000Z -RECURRENCE-ID:20111223T120000Z -END:VEVENT -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule2 -DTSTART:20111230T120000Z -DTEND:20111230T130000Z -RECURRENCE-ID:20111230T120000Z -END:VEVENT -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - - // Floating dates and times. - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:bla1 -DTSTART:20141112T195000 -END:VEVENT -BEGIN:VEVENT -UID:bla2 -DTSTART;VALUE=DATE:20141112 -END:VEVENT -BEGIN:VEVENT -UID:bla3 -DTSTART;VALUE=DATE:20141112 -RRULE:FREQ=DAILY;COUNT=2 -END:VEVENT -END:VCALENDAR -ICS; - - $output = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:bla1 -DTSTART:20141112T225000Z -END:VEVENT -BEGIN:VEVENT -UID:bla2 -DTSTART;VALUE=DATE:20141112 -END:VEVENT -BEGIN:VEVENT -UID:bla3 -DTSTART;VALUE=DATE:20141112 -RECURRENCE-ID;VALUE=DATE:20141112 -END:VEVENT -BEGIN:VEVENT -UID:bla3 -DTSTART;VALUE=DATE:20141113 -RECURRENCE-ID;VALUE=DATE:20141113 -END:VEVENT -END:VCALENDAR -ICS; - - $tests[] = [$input, $output, 'America/Argentina/Buenos_Aires', '2014-01-01', '2015-01-01']; - - // Recurrence rule with no valid instances - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -UID:bla6 -SUMMARY:Testing RRule3 -DTSTART:20111125T120000Z -DTEND:20111125T130000Z -RRULE:FREQ=WEEKLY;COUNT=1 -EXDATE:20111125T120000Z -END:VEVENT -END:VCALENDAR -'; - - $output = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -END:VCALENDAR -'; - - $tests[] = [$input, $output]; - return $tests; - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testBrokenEventExpand() { - - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -RRULE:FREQ=WEEKLY -DTSTART;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - $vcal = VObject\Reader::read($input); - $vcal->expand( - new \DateTime('2011-12-01'), - new \DateTime('2011-12-31') - ); - - } - - function testGetDocumentType() { - - $vcard = new VCalendar(); - $vcard->VERSION = '2.0'; - $this->assertEquals(VCalendar::ICALENDAR20, $vcard->getDocumentType()); - - } - - function testValidateCorrect() { - - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -PRODID:foo -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -DTSTAMP:20140122T233226Z -UID:foo -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals([], $vcal->validate(), 'Got an error'); - - } - - function testValidateNoVersion() { - - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -PRODID:foo -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateWrongVersion() { - - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:3.0 -PRODID:foo -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateNoProdId() { - - $input = 'BEGIN:VCALENDAR -CALSCALE:GREGORIAN -VERSION:2.0 -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateDoubleCalScale() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -CALSCALE:GREGORIAN -CALSCALE:GREGORIAN -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateDoubleMethod() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -METHOD:REQUEST -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateTwoMasterEvents() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(1, count($vcal->validate())); - - } - - function testValidateOneMasterEvent() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -RECURRENCE-ID;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - $this->assertEquals(0, count($vcal->validate())); - - } - - function testGetBaseComponent() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VEVENT -SUMMARY:test -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -RECURRENCE-ID;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - - $result = $vcal->getBaseComponent(); - $this->assertEquals('test', $result->SUMMARY->getValue()); - - } - - function testGetBaseComponentNoResult() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VEVENT -SUMMARY:test -RECURRENCE-ID;VALUE=DATE:20111202 -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -RECURRENCE-ID;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - - $result = $vcal->getBaseComponent(); - $this->assertNull($result); - - } - - function testGetBaseComponentWithFilter() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VEVENT -SUMMARY:test -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -END:VEVENT -BEGIN:VEVENT -DTSTART;VALUE=DATE:20111202 -UID:foo -DTSTAMP:20140122T234434Z -RECURRENCE-ID;VALUE=DATE:20111202 -END:VEVENT -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - - $result = $vcal->getBaseComponent('VEVENT'); - $this->assertEquals('test', $result->SUMMARY->getValue()); - - } - - function testGetBaseComponentWithFilterNoResult() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foo -METHOD:REQUEST -BEGIN:VTODO -SUMMARY:test -UID:foo -DTSTAMP:20140122T234434Z -END:VTODO -END:VCALENDAR -'; - - $vcal = VObject\Reader::read($input); - - $result = $vcal->getBaseComponent('VEVENT'); - $this->assertNull($result); - - } - - function testNoComponents() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:vobject -END:VCALENDAR -ICS; - - $this->assertValidate( - $input, - 0, - 3, - "An iCalendar object must have at least 1 component." - ); - - } - - function testCalDAVNoComponents() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:vobject -BEGIN:VTIMEZONE -TZID:America/Toronto -END:VTIMEZONE -END:VCALENDAR -ICS; - - $this->assertValidate( - $input, - VCalendar::PROFILE_CALDAV, - 3, - "A calendar object on a CalDAV server must have at least 1 component (VTODO, VEVENT, VJOURNAL)." - ); - - } - - function testCalDAVMultiUID() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:vobject -BEGIN:VEVENT -UID:foo -DTSTAMP:20150109T184500Z -DTSTART:20150109T184500Z -END:VEVENT -BEGIN:VEVENT -UID:bar -DTSTAMP:20150109T184500Z -DTSTART:20150109T184500Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertValidate( - $input, - VCalendar::PROFILE_CALDAV, - 3, - "A calendar object on a CalDAV server may only have components with the same UID." - ); - - } - - function testCalDAVMultiComponent() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:vobject -BEGIN:VEVENT -UID:foo -RECURRENCE-ID:20150109T185200Z -DTSTAMP:20150109T184500Z -DTSTART:20150109T184500Z -END:VEVENT -BEGIN:VTODO -UID:foo -DTSTAMP:20150109T184500Z -DTSTART:20150109T184500Z -END:VTODO -END:VCALENDAR -ICS; - - $this->assertValidate( - $input, - VCalendar::PROFILE_CALDAV, - 3, - "A calendar object on a CalDAV server may only have 1 type of component (VEVENT, VTODO or VJOURNAL)." - ); - - } - - function testCalDAVMETHOD() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:PUBLISH -PRODID:vobject -BEGIN:VEVENT -UID:foo -RECURRENCE-ID:20150109T185200Z -DTSTAMP:20150109T184500Z -DTSTART:20150109T184500Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertValidate( - $input, - VCalendar::PROFILE_CALDAV, - 3, - "A calendar object on a CalDAV server MUST NOT have a METHOD property." - ); - - } - - function assertValidate($ics, $options, $expectedLevel, $expectedMessage = null) { - - $vcal = VObject\Reader::read($ics); - $result = $vcal->validate($options); - - $this->assertValidateResult($result, $expectedLevel, $expectedMessage); - - } - - function assertValidateResult($input, $expectedLevel, $expectedMessage = null) { - - $messages = []; - foreach ($input as $warning) { - $messages[] = $warning['message']; - } - - if ($expectedLevel === 0) { - $this->assertEquals(0, count($input), 'No validation messages were expected. We got: ' . implode(', ', $messages)); - } else { - $this->assertEquals(1, count($input), 'We expected exactly 1 validation message, We got: ' . implode(', ', $messages)); - - $this->assertEquals($expectedMessage, $input[0]['message']); - $this->assertEquals($expectedLevel, $input[0]['level']); - } - - } - - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCardTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCardTest.php deleted file mode 100644 index baa7f490d44..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VCardTest.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use Sabre\VObject; - -class VCardTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider validateData - */ - function testValidate($input, $expectedWarnings, $expectedRepairedOutput) { - - $vcard = VObject\Reader::read($input); - - $warnings = $vcard->validate(); - - $warnMsg = []; - foreach ($warnings as $warning) { - $warnMsg[] = $warning['message']; - } - - $this->assertEquals($expectedWarnings, $warnMsg); - - $vcard->validate(VObject\Component::REPAIR); - - $this->assertEquals( - $expectedRepairedOutput, - $vcard->serialize() - ); - - } - - function validateData() { - - $tests = []; - - // Correct - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:4.0\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - [], - "BEGIN:VCARD\r\nVERSION:4.0\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - ]; - - // No VERSION - $tests[] = [ - "BEGIN:VCARD\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - [ - 'VERSION MUST appear exactly once in a VCARD component', - ], - "BEGIN:VCARD\r\nVERSION:4.0\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - ]; - - // Unknown version - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:2.2\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - [ - 'Only vcard version 4.0 (RFC6350), version 3.0 (RFC2426) or version 2.1 (icm-vcard-2.1) are supported.', - ], - "BEGIN:VCARD\r\nVERSION:2.1\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n", - ]; - - // No FN - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nEND:VCARD\r\n", - [ - 'The FN property must appear in the VCARD component exactly 1 time', - ], - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nEND:VCARD\r\n", - ]; - // No FN, N fallback - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nN:Doe;John;;;;;\r\nEND:VCARD\r\n", - [ - 'The FN property must appear in the VCARD component exactly 1 time', - ], - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nN:Doe;John;;;;;\r\nFN:John Doe\r\nEND:VCARD\r\n", - ]; - // No FN, N fallback, no first name - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nN:Doe;;;;;;\r\nEND:VCARD\r\n", - [ - 'The FN property must appear in the VCARD component exactly 1 time', - ], - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nN:Doe;;;;;;\r\nFN:Doe\r\nEND:VCARD\r\n", - ]; - - // No FN, ORG fallback - $tests[] = [ - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nORG:Acme Co.\r\nEND:VCARD\r\n", - [ - 'The FN property must appear in the VCARD component exactly 1 time', - ], - "BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nORG:Acme Co.\r\nFN:Acme Co.\r\nEND:VCARD\r\n", - ]; - return $tests; - - } - - function testGetDocumentType() { - - $vcard = new VCard([], false); - $vcard->VERSION = '2.1'; - $this->assertEquals(VCard::VCARD21, $vcard->getDocumentType()); - - $vcard = new VCard([], false); - $vcard->VERSION = '3.0'; - $this->assertEquals(VCard::VCARD30, $vcard->getDocumentType()); - - $vcard = new VCard([], false); - $vcard->VERSION = '4.0'; - $this->assertEquals(VCard::VCARD40, $vcard->getDocumentType()); - - $vcard = new VCard([], false); - $this->assertEquals(VCard::UNKNOWN, $vcard->getDocumentType()); - } - - function testGetByType() { - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -EMAIL;TYPE=home:1@example.org -EMAIL;TYPE=work:2@example.org -END:VCARD -VCF; - - $vcard = VObject\Reader::read($vcard); - $this->assertEquals('1@example.org', $vcard->getByType('EMAIL', 'home')->getValue()); - $this->assertEquals('2@example.org', $vcard->getByType('EMAIL', 'work')->getValue()); - $this->assertNull($vcard->getByType('EMAIL', 'non-existant')); - $this->assertNull($vcard->getByType('ADR', 'non-existant')); - } - - function testPreferredNoPref() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -EMAIL:1@example.org -EMAIL:2@example.org -END:VCARD -VCF; - - $vcard = VObject\Reader::read($vcard); - $this->assertEquals('1@example.org', $vcard->preferred('EMAIL')->getValue()); - - } - - function testPreferredWithPref() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -EMAIL:1@example.org -EMAIL;TYPE=PREF:2@example.org -END:VCARD -VCF; - - $vcard = VObject\Reader::read($vcard); - $this->assertEquals('2@example.org', $vcard->preferred('EMAIL')->getValue()); - - } - - function testPreferredWith40Pref() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -EMAIL:1@example.org -EMAIL;PREF=3:2@example.org -EMAIL;PREF=2:3@example.org -END:VCARD -VCF; - - $vcard = VObject\Reader::read($vcard); - $this->assertEquals('3@example.org', $vcard->preferred('EMAIL')->getValue()); - - } - - function testPreferredNotFound() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -END:VCARD -VCF; - - $vcard = VObject\Reader::read($vcard); - $this->assertNull($vcard->preferred('EMAIL')); - - } - - function testNoUIDCardDAV() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -FN:John Doe -END:VCARD -VCF; - $this->assertValidate( - $vcard, - VCARD::PROFILE_CARDDAV, - 3, - 'vCards on CardDAV servers MUST have a UID property.' - ); - - } - - function testNoUIDNoCardDAV() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -FN:John Doe -END:VCARD -VCF; - $this->assertValidate( - $vcard, - 0, - 2, - 'Adding a UID to a vCard property is recommended.' - ); - - } - function testNoUIDNoCardDAVRepair() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -FN:John Doe -END:VCARD -VCF; - $this->assertValidate( - $vcard, - VCARD::REPAIR, - 1, - 'Adding a UID to a vCard property is recommended.' - ); - - } - - function testVCard21CardDAV() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:2.1 -FN:John Doe -UID:foo -END:VCARD -VCF; - $this->assertValidate( - $vcard, - VCARD::PROFILE_CARDDAV, - 3, - 'CardDAV servers are not allowed to accept vCard 2.1.' - ); - - } - - function testVCard21NoCardDAV() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:2.1 -FN:John Doe -UID:foo -END:VCARD -VCF; - $this->assertValidate( - $vcard, - 0, - 0 - ); - - } - - function assertValidate($vcf, $options, $expectedLevel, $expectedMessage = null) { - - $vcal = VObject\Reader::read($vcf); - $result = $vcal->validate($options); - - $this->assertValidateResult($result, $expectedLevel, $expectedMessage); - - } - - function assertValidateResult($input, $expectedLevel, $expectedMessage = null) { - - $messages = []; - foreach ($input as $warning) { - $messages[] = $warning['message']; - } - - if ($expectedLevel === 0) { - $this->assertEquals(0, count($input), 'No validation messages were expected. We got: ' . implode(', ', $messages)); - } else { - $this->assertEquals(1, count($input), 'We expected exactly 1 validation message, We got: ' . implode(', ', $messages)); - - $this->assertEquals($expectedMessage, $input[0]['message']); - $this->assertEquals($expectedLevel, $input[0]['level']); - } - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VEventTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VEventTest.php deleted file mode 100644 index 11acd3f6b72..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VEventTest.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -class VEventTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider timeRangeTestData - */ - function testInTimeRange(VEvent $vevent, $start, $end, $outcome) { - - $this->assertEquals($outcome, $vevent->isInTimeRange($start, $end)); - - } - - function timeRangeTestData() { - - $tests = []; - - $calendar = new VCalendar(); - - $vevent = $calendar->createComponent('VEVENT'); - $vevent->DTSTART = '20111223T120000Z'; - $tests[] = [$vevent, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vevent2 = clone $vevent; - $vevent2->DTEND = '20111225T120000Z'; - $tests[] = [$vevent2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vevent3 = clone $vevent; - $vevent3->DURATION = 'P1D'; - $tests[] = [$vevent3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vevent4 = clone $vevent; - $vevent4->DTSTART = '20111225'; - $vevent4->DTSTART['VALUE'] = 'DATE'; - $tests[] = [$vevent4, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent4, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - // Event with no end date should be treated as lasting the entire day. - $tests[] = [$vevent4, new \DateTime('2011-12-25 16:00:00'), new \DateTime('2011-12-25 17:00:00'), true]; - // DTEND is non inclusive so all day events should not be returned on the next day. - $tests[] = [$vevent4, new \DateTime('2011-12-26 00:00:00'), new \DateTime('2011-12-26 17:00:00'), false]; - // The timezone of timerange in question also needs to be considered. - $tests[] = [$vevent4, new \DateTime('2011-12-26 00:00:00', new \DateTimeZone('Europe/Berlin')), new \DateTime('2011-12-26 17:00:00', new \DateTimeZone('Europe/Berlin')), false]; - - $vevent5 = clone $vevent; - $vevent5->DURATION = 'P1D'; - $vevent5->RRULE = 'FREQ=YEARLY'; - $tests[] = [$vevent5, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent5, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - $tests[] = [$vevent5, new \DateTime('2013-12-01'), new \DateTime('2013-12-31'), true]; - - $vevent6 = clone $vevent; - $vevent6->DTSTART = '20111225'; - $vevent6->DTSTART['VALUE'] = 'DATE'; - $vevent6->DTEND = '20111225'; - $vevent6->DTEND['VALUE'] = 'DATE'; - - $tests[] = [$vevent6, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vevent6, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - // Added this test to ensure that recurrence rules with no DTEND also - // get checked for the entire day. - $vevent7 = clone $vevent; - $vevent7->DTSTART = '20120101'; - $vevent7->DTSTART['VALUE'] = 'DATE'; - $vevent7->RRULE = 'FREQ=MONTHLY'; - $tests[] = [$vevent7, new \DateTime('2012-02-01 15:00:00'), new \DateTime('2012-02-02'), true]; - // The timezone of timerange in question should also be considered. - $tests[] = [$vevent7, new \DateTime('2012-02-02 00:00:00', new \DateTimeZone('Europe/Berlin')), new \DateTime('2012-02-03 00:00:00', new \DateTimeZone('Europe/Berlin')), false]; - - // Added this test to check recurring events that have no instances. - $vevent8 = clone $vevent; - $vevent8->DTSTART = '20130329T140000'; - $vevent8->DTEND = '20130329T153000'; - $vevent8->RRULE = ['FREQ' => 'WEEKLY', 'BYDAY' => ['FR'], 'UNTIL' => '20130412T115959Z']; - $vevent8->add('EXDATE', '20130405T140000'); - $vevent8->add('EXDATE', '20130329T140000'); - $tests[] = [$vevent8, new \DateTime('2013-03-01'), new \DateTime('2013-04-01'), false]; - - // Added this test to check recurring all day event that repeat every day - $vevent9 = clone $vevent; - $vevent9->DTSTART = '20161027'; - $vevent9->DTEND = '20161028'; - $vevent9->RRULE = 'FREQ=DAILY'; - $tests[] = [$vevent9, new \DateTime('2016-10-31'), new \DateTime('2016-12-12'), true]; - - return $tests; - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VFreeBusyTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VFreeBusyTest.php deleted file mode 100644 index 2d463fd09ad..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VFreeBusyTest.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use Sabre\VObject; -use Sabre\VObject\Reader; - -class VFreeBusyTest extends \PHPUnit_Framework_TestCase { - - function testIsFree() { - - $input = <<<BLA -BEGIN:VCALENDAR -BEGIN:VFREEBUSY -FREEBUSY;FBTYPE=FREE:20120912T000500Z/PT1H -FREEBUSY;FBTYPE=BUSY:20120912T010000Z/20120912T020000Z -FREEBUSY;FBTYPE=BUSY-TENTATIVE:20120912T020000Z/20120912T030000Z -FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20120912T030000Z/20120912T040000Z -FREEBUSY;FBTYPE=BUSY:20120912T050000Z/20120912T060000Z,20120912T080000Z/20120912T090000Z -FREEBUSY;FBTYPE=BUSY:20120912T100000Z/PT1H -END:VFREEBUSY -END:VCALENDAR -BLA; - - $obj = VObject\Reader::read($input); - $vfb = $obj->VFREEBUSY; - - $tz = new \DateTimeZone('UTC'); - - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 01:15:00', $tz), new \DateTime('2012-09-12 01:45:00', $tz))); - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 08:05:00', $tz), new \DateTime('2012-09-12 08:10:00', $tz))); - $this->assertFalse($vfb->isFree(new \DateTime('2012-09-12 10:15:00', $tz), new \DateTime('2012-09-12 10:45:00', $tz))); - - // Checking whether the end time is treated as non-inclusive - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 09:00:00', $tz), new \DateTime('2012-09-12 09:15:00', $tz))); - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 09:45:00', $tz), new \DateTime('2012-09-12 10:00:00', $tz))); - $this->assertTrue($vfb->isFree(new \DateTime('2012-09-12 11:00:00', $tz), new \DateTime('2012-09-12 12:00:00', $tz))); - - } - - function testValidate() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VFREEBUSY -UID:some-random-id -DTSTAMP:20140402T180200Z -END:VFREEBUSY -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([], $messages); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VJournalTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VJournalTest.php deleted file mode 100644 index 1a2362d4a73..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VJournalTest.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use Sabre\VObject\Component; -use Sabre\VObject\Reader; - -class VJournalTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider timeRangeTestData - */ - function testInTimeRange(VJournal $vtodo, $start, $end, $outcome) { - - $this->assertEquals($outcome, $vtodo->isInTimeRange($start, $end)); - - } - - function testValidate() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VJOURNAL -UID:12345678 -DTSTAMP:20140402T174100Z -END:VJOURNAL -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([], $messages); - - } - - function testValidateBroken() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VJOURNAL -UID:12345678 -DTSTAMP:20140402T174100Z -URL:http://example.org/ -URL:http://example.com/ -END:VJOURNAL -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals( - ["URL MUST NOT appear more than once in a VJOURNAL component"], - $messages - ); - - } - - function timeRangeTestData() { - - $calendar = new VCalendar(); - - $tests = []; - - $vjournal = $calendar->createComponent('VJOURNAL'); - $vjournal->DTSTART = '20111223T120000Z'; - $tests[] = [$vjournal, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vjournal, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vjournal2 = $calendar->createComponent('VJOURNAL'); - $vjournal2->DTSTART = '20111223'; - $vjournal2->DTSTART['VALUE'] = 'DATE'; - $tests[] = [$vjournal2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vjournal2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vjournal3 = $calendar->createComponent('VJOURNAL'); - $tests[] = [$vjournal3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), false]; - $tests[] = [$vjournal3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - return $tests; - } - - - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTimeZoneTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTimeZoneTest.php deleted file mode 100644 index f320fd3d6e8..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTimeZoneTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use Sabre\VObject\Reader; - -class VTimeZoneTest extends \PHPUnit_Framework_TestCase { - - function testValidate() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTIMEZONE -TZID:America/Toronto -END:VTIMEZONE -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([], $messages); - - } - - function testGetTimeZone() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTIMEZONE -TZID:America/Toronto -END:VTIMEZONE -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $tz = new \DateTimeZone('America/Toronto'); - - $this->assertEquals( - $tz, - $obj->VTIMEZONE->getTimeZone() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTodoTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTodoTest.php deleted file mode 100644 index 85c6e07842f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Component/VTodoTest.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php - -namespace Sabre\VObject\Component; - -use Sabre\VObject\Component; -use Sabre\VObject\Reader; - -class VTodoTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider timeRangeTestData - */ - function testInTimeRange(VTodo $vtodo, $start, $end, $outcome) { - - $this->assertEquals($outcome, $vtodo->isInTimeRange($start, $end)); - - } - - function timeRangeTestData() { - - $tests = []; - - $calendar = new VCalendar(); - - $vtodo = $calendar->createComponent('VTODO'); - $vtodo->DTSTART = '20111223T120000Z'; - $tests[] = [$vtodo, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo2 = clone $vtodo; - $vtodo2->DURATION = 'P1D'; - $tests[] = [$vtodo2, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo2, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo3 = clone $vtodo; - $vtodo3->DUE = '20111225'; - $tests[] = [$vtodo3, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo3, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo4 = $calendar->createComponent('VTODO'); - $vtodo4->DUE = '20111225'; - $tests[] = [$vtodo4, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo4, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo5 = $calendar->createComponent('VTODO'); - $vtodo5->COMPLETED = '20111225'; - $tests[] = [$vtodo5, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo5, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo6 = $calendar->createComponent('VTODO'); - $vtodo6->CREATED = '20111225'; - $tests[] = [$vtodo6, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo6, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo7 = $calendar->createComponent('VTODO'); - $vtodo7->CREATED = '20111225'; - $vtodo7->COMPLETED = '20111226'; - $tests[] = [$vtodo7, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo7, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), false]; - - $vtodo7 = $calendar->createComponent('VTODO'); - $tests[] = [$vtodo7, new \DateTime('2011-01-01'), new \DateTime('2012-01-01'), true]; - $tests[] = [$vtodo7, new \DateTime('2011-01-01'), new \DateTime('2011-11-01'), true]; - - return $tests; - - } - - function testValidate() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTODO -UID:1234-21355-123156 -DTSTAMP:20140402T183400Z -END:VTODO -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([], $messages); - - } - - function testValidateInvalid() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTODO -END:VTODO -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([ - "UID MUST appear exactly once in a VTODO component", - "DTSTAMP MUST appear exactly once in a VTODO component", - ], $messages); - - } - - function testValidateDUEDTSTARTMisMatch() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTODO -UID:FOO -DTSTART;VALUE=DATE-TIME:20140520T131600Z -DUE;VALUE=DATE:20140520 -DTSTAMP;VALUE=DATE-TIME:20140520T131600Z -END:VTODO -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([ - "The value type (DATE or DATE-TIME) must be identical for DUE and DTSTART", - ], $messages); - - } - - function testValidateDUEbeforeDTSTART() { - - $input = <<<HI -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:YoYo -BEGIN:VTODO -UID:FOO -DTSTART;VALUE=DATE:20140520 -DUE;VALUE=DATE:20140518 -DTSTAMP;VALUE=DATE-TIME:20140520T131600Z -END:VTODO -END:VCALENDAR -HI; - - $obj = Reader::read($input); - - $warnings = $obj->validate(); - $messages = []; - foreach ($warnings as $warning) { - $messages[] = $warning['message']; - } - - $this->assertEquals([ - "DUE must occur after DTSTART", - ], $messages); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ComponentTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ComponentTest.php deleted file mode 100644 index 9323a43d1c1..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ComponentTest.php +++ /dev/null @@ -1,527 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Component\VCard; - -class ComponentTest extends \PHPUnit_Framework_TestCase { - - function testIterate() { - - $comp = new VCalendar([], false); - - $sub = $comp->createComponent('VEVENT'); - $comp->add($sub); - - $sub = $comp->createComponent('VTODO'); - $comp->add($sub); - - $count = 0; - foreach ($comp->children() as $key => $subcomponent) { - - $count++; - $this->assertInstanceOf('Sabre\\VObject\\Component', $subcomponent); - - } - $this->assertEquals(2, $count); - $this->assertEquals(1, $key); - - } - - function testMagicGet() { - - $comp = new VCalendar([], false); - - $sub = $comp->createComponent('VEVENT'); - $comp->add($sub); - - $sub = $comp->createComponent('VTODO'); - $comp->add($sub); - - $event = $comp->vevent; - $this->assertInstanceOf('Sabre\\VObject\\Component', $event); - $this->assertEquals('VEVENT', $event->name); - - $this->assertInternalType('null', $comp->vjournal); - - } - - function testMagicGetGroups() { - - $comp = new VCard(); - - $sub = $comp->createProperty('GROUP1.EMAIL', '1@1.com'); - $comp->add($sub); - - $sub = $comp->createProperty('GROUP2.EMAIL', '2@2.com'); - $comp->add($sub); - - $sub = $comp->createProperty('EMAIL', '3@3.com'); - $comp->add($sub); - - $emails = $comp->email; - $this->assertEquals(3, count($emails)); - - $email1 = $comp->{"group1.email"}; - $this->assertEquals('EMAIL', $email1[0]->name); - $this->assertEquals('GROUP1', $email1[0]->group); - - $email3 = $comp->{".email"}; - $this->assertEquals('EMAIL', $email3[0]->name); - $this->assertEquals(null, $email3[0]->group); - - } - - function testMagicIsset() { - - $comp = new VCalendar(); - - $sub = $comp->createComponent('VEVENT'); - $comp->add($sub); - - $sub = $comp->createComponent('VTODO'); - $comp->add($sub); - - $this->assertTrue(isset($comp->vevent)); - $this->assertTrue(isset($comp->vtodo)); - $this->assertFalse(isset($comp->vjournal)); - - } - - function testMagicSetScalar() { - - $comp = new VCalendar(); - $comp->myProp = 'myValue'; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $comp->MYPROP); - $this->assertEquals('myValue', (string)$comp->MYPROP); - - - } - - function testMagicSetScalarTwice() { - - $comp = new VCalendar([], false); - $comp->myProp = 'myValue'; - $comp->myProp = 'myValue'; - - $this->assertEquals(1, count($comp->children())); - $this->assertInstanceOf('Sabre\\VObject\\Property', $comp->MYPROP); - $this->assertEquals('myValue', (string)$comp->MYPROP); - - } - - function testMagicSetArray() { - - $comp = new VCalendar(); - $comp->ORG = ['Acme Inc', 'Section 9']; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $comp->ORG); - $this->assertEquals(['Acme Inc', 'Section 9'], $comp->ORG->getParts()); - - } - - function testMagicSetComponent() { - - $comp = new VCalendar(); - - // Note that 'myProp' is ignored here. - $comp->myProp = $comp->createComponent('VEVENT'); - - $this->assertEquals(1, count($comp)); - - $this->assertEquals('VEVENT', $comp->VEVENT->name); - - } - - function testMagicSetTwice() { - - $comp = new VCalendar([], false); - - $comp->VEVENT = $comp->createComponent('VEVENT'); - $comp->VEVENT = $comp->createComponent('VEVENT'); - - $this->assertEquals(1, count($comp->children())); - - $this->assertEquals('VEVENT', $comp->VEVENT->name); - - } - - function testArrayAccessGet() { - - $comp = new VCalendar([], false); - - $event = $comp->createComponent('VEVENT'); - $event->summary = 'Event 1'; - - $comp->add($event); - - $event2 = clone $event; - $event2->summary = 'Event 2'; - - $comp->add($event2); - - $this->assertEquals(2, count($comp->children())); - $this->assertTrue($comp->vevent[1] instanceof Component); - $this->assertEquals('Event 2', (string)$comp->vevent[1]->summary); - - } - - function testArrayAccessExists() { - - $comp = new VCalendar(); - - $event = $comp->createComponent('VEVENT'); - $event->summary = 'Event 1'; - - $comp->add($event); - - $event2 = clone $event; - $event2->summary = 'Event 2'; - - $comp->add($event2); - - $this->assertTrue(isset($comp->vevent[0])); - $this->assertTrue(isset($comp->vevent[1])); - - } - - /** - * @expectedException LogicException - */ - function testArrayAccessSet() { - - $comp = new VCalendar(); - $comp['hey'] = 'hi there'; - - } - /** - * @expectedException LogicException - */ - function testArrayAccessUnset() { - - $comp = new VCalendar(); - unset($comp[0]); - - } - - function testAddScalar() { - - $comp = new VCalendar([], false); - - $comp->add('myprop', 'value'); - - $this->assertEquals(1, count($comp->children())); - - $bla = $comp->children()[0]; - - $this->assertTrue($bla instanceof Property); - $this->assertEquals('MYPROP', $bla->name); - $this->assertEquals('value', (string)$bla); - - } - - function testAddScalarParams() { - - $comp = new VCalendar([], false); - - $comp->add('myprop', 'value', ['param1' => 'value1']); - - $this->assertEquals(1, count($comp->children())); - - $bla = $comp->children()[0]; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $bla); - $this->assertEquals('MYPROP', $bla->name); - $this->assertEquals('value', (string)$bla); - - $this->assertEquals(1, count($bla->parameters())); - - $this->assertEquals('PARAM1', $bla->parameters['PARAM1']->name); - $this->assertEquals('value1', $bla->parameters['PARAM1']->getValue()); - - } - - - function testAddComponent() { - - $comp = new VCalendar([], false); - - $comp->add($comp->createComponent('VEVENT')); - - $this->assertEquals(1, count($comp->children())); - - $this->assertEquals('VEVENT', $comp->VEVENT->name); - - } - - function testAddComponentTwice() { - - $comp = new VCalendar([], false); - - $comp->add($comp->createComponent('VEVENT')); - $comp->add($comp->createComponent('VEVENT')); - - $this->assertEquals(2, count($comp->children())); - - $this->assertEquals('VEVENT', $comp->VEVENT->name); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testAddArgFail() { - - $comp = new VCalendar(); - $comp->add($comp->createComponent('VEVENT'), 'hello'); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testAddArgFail2() { - - $comp = new VCalendar(); - $comp->add([]); - - } - - function testMagicUnset() { - - $comp = new VCalendar([], false); - $comp->add($comp->createComponent('VEVENT')); - - unset($comp->vevent); - - $this->assertEquals(0, count($comp->children())); - - } - - - function testCount() { - - $comp = new VCalendar(); - $this->assertEquals(1, $comp->count()); - - } - - function testChildren() { - - $comp = new VCalendar([], false); - - // Note that 'myProp' is ignored here. - $comp->add($comp->createComponent('VEVENT')); - $comp->add($comp->createComponent('VTODO')); - - $r = $comp->children(); - $this->assertInternalType('array', $r); - $this->assertEquals(2, count($r)); - } - - function testGetComponents() { - - $comp = new VCalendar(); - - $comp->add($comp->createProperty('FOO', 'BAR')); - $comp->add($comp->createComponent('VTODO')); - - $r = $comp->getComponents(); - $this->assertInternalType('array', $r); - $this->assertEquals(1, count($r)); - $this->assertEquals('VTODO', $r[0]->name); - } - - function testSerialize() { - - $comp = new VCalendar([], false); - $this->assertEquals("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n", $comp->serialize()); - - } - - function testSerializeChildren() { - - $comp = new VCalendar([], false); - $event = $comp->add($comp->createComponent('VEVENT')); - unset($event->DTSTAMP, $event->UID); - $todo = $comp->add($comp->createComponent('VTODO')); - unset($todo->DTSTAMP, $todo->UID); - - $str = $comp->serialize(); - - $this->assertEquals("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nEND:VEVENT\r\nBEGIN:VTODO\r\nEND:VTODO\r\nEND:VCALENDAR\r\n", $str); - - } - - function testSerializeOrderCompAndProp() { - - $comp = new VCalendar([], false); - $comp->add($event = $comp->createComponent('VEVENT')); - $comp->add('PROP1', 'BLABLA'); - $comp->add('VERSION', '2.0'); - $comp->add($comp->createComponent('VTIMEZONE')); - - unset($event->DTSTAMP, $event->UID); - $str = $comp->serialize(); - - $this->assertEquals("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPROP1:BLABLA\r\nBEGIN:VTIMEZONE\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", $str); - - } - - function testAnotherSerializeOrderProp() { - - $prop4s = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; - - $comp = new VCard([], false); - - $comp->__set('SOMEPROP', 'FOO'); - $comp->__set('ANOTHERPROP', 'FOO'); - $comp->__set('THIRDPROP', 'FOO'); - foreach ($prop4s as $prop4) { - $comp->add('PROP4', 'FOO ' . $prop4); - } - $comp->__set('PROPNUMBERFIVE', 'FOO'); - $comp->__set('PROPNUMBERSIX', 'FOO'); - $comp->__set('PROPNUMBERSEVEN', 'FOO'); - $comp->__set('PROPNUMBEREIGHT', 'FOO'); - $comp->__set('PROPNUMBERNINE', 'FOO'); - $comp->__set('PROPNUMBERTEN', 'FOO'); - $comp->__set('VERSION', '2.0'); - $comp->__set('UID', 'FOO'); - - $str = $comp->serialize(); - - $this->assertEquals("BEGIN:VCARD\r\nVERSION:2.0\r\nSOMEPROP:FOO\r\nANOTHERPROP:FOO\r\nTHIRDPROP:FOO\r\nPROP4:FOO 1\r\nPROP4:FOO 2\r\nPROP4:FOO 3\r\nPROP4:FOO 4\r\nPROP4:FOO 5\r\nPROP4:FOO 6\r\nPROP4:FOO 7\r\nPROP4:FOO 8\r\nPROP4:FOO 9\r\nPROP4:FOO 10\r\nPROPNUMBERFIVE:FOO\r\nPROPNUMBERSIX:FOO\r\nPROPNUMBERSEVEN:FOO\r\nPROPNUMBEREIGHT:FOO\r\nPROPNUMBERNINE:FOO\r\nPROPNUMBERTEN:FOO\r\nUID:FOO\r\nEND:VCARD\r\n", $str); - - } - - function testInstantiateWithChildren() { - - $comp = new VCard([ - 'ORG' => ['Acme Inc.', 'Section 9'], - 'FN' => 'Finn The Human', - ]); - - $this->assertEquals(['Acme Inc.', 'Section 9'], $comp->ORG->getParts()); - $this->assertEquals('Finn The Human', $comp->FN->getValue()); - - } - - function testInstantiateSubComponent() { - - $comp = new VCalendar(); - $event = $comp->createComponent('VEVENT', [ - $comp->createProperty('UID', '12345'), - ]); - $comp->add($event); - - $this->assertEquals('12345', $comp->VEVENT->UID->getValue()); - - } - - function testRemoveByName() { - - $comp = new VCalendar([], false); - $comp->add('prop1', 'val1'); - $comp->add('prop2', 'val2'); - $comp->add('prop2', 'val2'); - - $comp->remove('prop2'); - $this->assertFalse(isset($comp->prop2)); - $this->assertTrue(isset($comp->prop1)); - - } - - function testRemoveByObj() { - - $comp = new VCalendar([], false); - $comp->add('prop1', 'val1'); - $prop = $comp->add('prop2', 'val2'); - - $comp->remove($prop); - $this->assertFalse(isset($comp->prop2)); - $this->assertTrue(isset($comp->prop1)); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testRemoveNotFound() { - - $comp = new VCalendar([], false); - $prop = $comp->createProperty('A', 'B'); - $comp->remove($prop); - - } - - /** - * @dataProvider ruleData - */ - function testValidateRules($componentList, $errorCount) { - - $vcard = new Component\VCard(); - - $component = new FakeComponent($vcard, 'Hi', [], $defaults = false); - foreach ($componentList as $v) { - $component->add($v, 'Hello.'); - } - - $this->assertEquals($errorCount, count($component->validate())); - - } - - function testValidateRepair() { - - $vcard = new Component\VCard(); - - $component = new FakeComponent($vcard, 'Hi', [], $defaults = false); - $component->validate(Component::REPAIR); - $this->assertEquals('yow', $component->BAR->getValue()); - - } - - function ruleData() { - - return [ - - [[], 2], - [['FOO'], 3], - [['BAR'], 1], - [['BAZ'], 1], - [['BAR','BAZ'], 0], - [['BAR','BAZ','ZIM',], 0], - [['BAR','BAZ','ZIM','GIR'], 0], - [['BAR','BAZ','ZIM','GIR','GIR'], 1], - - ]; - - } - -} - -class FakeComponent extends Component { - - function getValidationRules() { - - return [ - 'FOO' => '0', - 'BAR' => '1', - 'BAZ' => '+', - 'ZIM' => '*', - 'GIR' => '?', - ]; - - } - - function getDefaults() { - - return [ - 'BAR' => 'yow', - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/DateTimeParserTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/DateTimeParserTest.php deleted file mode 100644 index 677c2893677..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/DateTimeParserTest.php +++ /dev/null @@ -1,699 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use DateInterval; -use DateTimeImmutable; -use DateTimeZone; - -class DateTimeParserTest extends \PHPUnit_Framework_TestCase { - - function testParseICalendarDuration() { - - $this->assertEquals('+1 weeks', DateTimeParser::parseDuration('P1W', true)); - $this->assertEquals('+5 days', DateTimeParser::parseDuration('P5D', true)); - $this->assertEquals('+5 days 3 hours 50 minutes 12 seconds', DateTimeParser::parseDuration('P5DT3H50M12S', true)); - $this->assertEquals('-1 weeks 50 minutes', DateTimeParser::parseDuration('-P1WT50M', true)); - $this->assertEquals('+50 days 3 hours 2 seconds', DateTimeParser::parseDuration('+P50DT3H2S', true)); - $this->assertEquals('+0 seconds', DateTimeParser::parseDuration('+PT0S', true)); - $this->assertEquals(new DateInterval('PT0S'), DateTimeParser::parseDuration('PT0S')); - - } - - function testParseICalendarDurationDateInterval() { - - $expected = new DateInterval('P7D'); - $this->assertEquals($expected, DateTimeParser::parseDuration('P1W')); - $this->assertEquals($expected, DateTimeParser::parse('P1W')); - - $expected = new DateInterval('PT3M'); - $expected->invert = true; - $this->assertEquals($expected, DateTimeParser::parseDuration('-PT3M')); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testParseICalendarDurationFail() { - - DateTimeParser::parseDuration('P1X', true); - - } - - function testParseICalendarDateTime() { - - $dateTime = DateTimeParser::parseDateTime('20100316T141405'); - - $compare = new DateTimeImmutable('2010-03-16 14:14:05', new DateTimeZone('UTC')); - - $this->assertEquals($compare, $dateTime); - - } - - /** - * @depends testParseICalendarDateTime - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testParseICalendarDateTimeBadFormat() { - - $dateTime = DateTimeParser::parseDateTime('20100316T141405 '); - - } - - /** - * @depends testParseICalendarDateTime - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testParseICalendarDateTimeInvalidTime() { - - $dateTime = DateTimeParser::parseDateTime('20100316T251405'); - - } - - /** - * @depends testParseICalendarDateTime - */ - function testParseICalendarDateTimeUTC() { - - $dateTime = DateTimeParser::parseDateTime('20100316T141405Z'); - - $compare = new DateTimeImmutable('2010-03-16 14:14:05', new DateTimeZone('UTC')); - $this->assertEquals($compare, $dateTime); - - } - - /** - * @depends testParseICalendarDateTime - */ - function testParseICalendarDateTimeUTC2() { - - $dateTime = DateTimeParser::parseDateTime('20101211T160000Z'); - - $compare = new DateTimeImmutable('2010-12-11 16:00:00', new DateTimeZone('UTC')); - $this->assertEquals($compare, $dateTime); - - } - - /** - * @depends testParseICalendarDateTime - */ - function testParseICalendarDateTimeCustomTimeZone() { - - $dateTime = DateTimeParser::parseDateTime('20100316T141405', new DateTimeZone('Europe/Amsterdam')); - - $compare = new DateTimeImmutable('2010-03-16 14:14:05', new DateTimeZone('Europe/Amsterdam')); - $this->assertEquals($compare, $dateTime); - - } - - function testParseICalendarDate() { - - $dateTime = DateTimeParser::parseDate('20100316'); - - $expected = new DateTimeImmutable('2010-03-16 00:00:00', new DateTimeZone('UTC')); - - $this->assertEquals($expected, $dateTime); - - $dateTime = DateTimeParser::parse('20100316'); - $this->assertEquals($expected, $dateTime); - - } - - /** - * TCheck if a date with year > 4000 will not throw an exception. iOS seems to use 45001231 in yearly recurring events - */ - function testParseICalendarDateGreaterThan4000() { - - $dateTime = DateTimeParser::parseDate('45001231'); - - $expected = new DateTimeImmutable('4500-12-31 00:00:00', new DateTimeZone('UTC')); - - $this->assertEquals($expected, $dateTime); - - $dateTime = DateTimeParser::parse('45001231'); - $this->assertEquals($expected, $dateTime); - - } - - /** - * Check if a datetime with year > 4000 will not throw an exception. iOS seems to use 45001231T235959 in yearly recurring events - */ - function testParseICalendarDateTimeGreaterThan4000() { - - $dateTime = DateTimeParser::parseDateTime('45001231T235959'); - - $expected = new DateTimeImmutable('4500-12-31 23:59:59', new DateTimeZone('UTC')); - - $this->assertEquals($expected, $dateTime); - - $dateTime = DateTimeParser::parse('45001231T235959'); - $this->assertEquals($expected, $dateTime); - - } - - /** - * @depends testParseICalendarDate - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testParseICalendarDateBadFormat() { - - $dateTime = DateTimeParser::parseDate('20100316T141405'); - - } - - /** - * @depends testParseICalendarDate - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testParseICalendarDateInvalidDate() { - - $dateTime = DateTimeParser::parseDate('20101331'); - - } - - /** - * @dataProvider vcardDates - */ - function testVCardDate($input, $output) { - - $this->assertEquals( - $output, - DateTimeParser::parseVCardDateTime($input) - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testBadVCardDate() { - - DateTimeParser::parseVCardDateTime('1985---01'); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testBadVCardTime() { - - DateTimeParser::parseVCardTime('23:12:166'); - - } - - function vcardDates() { - - return [ - [ - "19961022T140000", - [ - "year" => 1996, - "month" => 10, - "date" => 22, - "hour" => 14, - "minute" => 00, - "second" => 00, - "timezone" => null - ], - ], - [ - "--1022T1400", - [ - "year" => null, - "month" => 10, - "date" => 22, - "hour" => 14, - "minute" => 00, - "second" => null, - "timezone" => null - ], - ], - [ - "---22T14", - [ - "year" => null, - "month" => null, - "date" => 22, - "hour" => 14, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "19850412", - [ - "year" => 1985, - "month" => 4, - "date" => 12, - "hour" => null, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "1985-04", - [ - "year" => 1985, - "month" => 04, - "date" => null, - "hour" => null, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "1985", - [ - "year" => 1985, - "month" => null, - "date" => null, - "hour" => null, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "--0412", - [ - "year" => null, - "month" => 4, - "date" => 12, - "hour" => null, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "---12", - [ - "year" => null, - "month" => null, - "date" => 12, - "hour" => null, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "T102200", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => 10, - "minute" => 22, - "second" => 0, - "timezone" => null - ], - ], - [ - "T1022", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => 10, - "minute" => 22, - "second" => null, - "timezone" => null - ], - ], - [ - "T10", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => 10, - "minute" => null, - "second" => null, - "timezone" => null - ], - ], - [ - "T-2200", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => null, - "minute" => 22, - "second" => 00, - "timezone" => null - ], - ], - [ - "T--00", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => null, - "minute" => null, - "second" => 00, - "timezone" => null - ], - ], - [ - "T102200Z", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => 10, - "minute" => 22, - "second" => 00, - "timezone" => 'Z' - ], - ], - [ - "T102200-0800", - [ - "year" => null, - "month" => null, - "date" => null, - "hour" => 10, - "minute" => 22, - "second" => 00, - "timezone" => '-0800' - ], - ], - - // extended format - [ - "2012-11-29T15:10:53Z", - [ - "year" => 2012, - "month" => 11, - "date" => 29, - "hour" => 15, - "minute" => 10, - "second" => 53, - "timezone" => 'Z' - ], - ], - - // with milliseconds - [ - "20121129T151053.123Z", - [ - "year" => 2012, - "month" => 11, - "date" => 29, - "hour" => 15, - "minute" => 10, - "second" => 53, - "timezone" => 'Z' - ], - ], - - // extended format with milliseconds - [ - "2012-11-29T15:10:53.123Z", - [ - "year" => 2012, - "month" => 11, - "date" => 29, - "hour" => 15, - "minute" => 10, - "second" => 53, - "timezone" => 'Z' - ], - ], - ]; - - } - - function testDateAndOrTime_DateWithYearMonthDay() { - - $this->assertDateAndOrTimeEqualsTo( - '20150128', - [ - 'year' => '2015', - 'month' => '01', - 'date' => '28' - ] - ); - - } - - function testDateAndOrTime_DateWithYearMonth() { - - $this->assertDateAndOrTimeEqualsTo( - '2015-01', - [ - 'year' => '2015', - 'month' => '01' - ] - ); - - } - - function testDateAndOrTime_DateWithMonth() { - - $this->assertDateAndOrTimeEqualsTo( - '--01', - [ - 'month' => '01' - ] - ); - - } - - function testDateAndOrTime_DateWithMonthDay() { - - $this->assertDateAndOrTimeEqualsTo( - '--0128', - [ - 'month' => '01', - 'date' => '28' - ] - ); - - } - - function testDateAndOrTime_DateWithDay() { - - $this->assertDateAndOrTimeEqualsTo( - '---28', - [ - 'date' => '28' - ] - ); - - } - - function testDateAndOrTime_TimeWithHour() { - - $this->assertDateAndOrTimeEqualsTo( - '13', - [ - 'hour' => '13' - ] - ); - - } - - function testDateAndOrTime_TimeWithHourMinute() { - - $this->assertDateAndOrTimeEqualsTo( - '1353', - [ - 'hour' => '13', - 'minute' => '53' - ] - ); - - } - - function testDateAndOrTime_TimeWithHourSecond() { - - $this->assertDateAndOrTimeEqualsTo( - '135301', - [ - 'hour' => '13', - 'minute' => '53', - 'second' => '01' - ] - - ); - - } - - function testDateAndOrTime_TimeWithMinute() { - - $this->assertDateAndOrTimeEqualsTo( - '-53', - [ - 'minute' => '53' - ] - ); - - } - - function testDateAndOrTime_TimeWithMinuteSecond() { - - $this->assertDateAndOrTimeEqualsTo( - '-5301', - [ - 'minute' => '53', - 'second' => '01' - ] - ); - - } - - function testDateAndOrTime_TimeWithSecond() { - - $this->assertTrue(true); - - /** - * This is unreachable due to a conflict between date and time pattern. - * This is an error in the specification, not in our implementation. - */ - } - - function testDateAndOrTime_TimeWithSecondZ() { - - $this->assertDateAndOrTimeEqualsTo( - '--01Z', - [ - 'second' => '01', - 'timezone' => 'Z' - ] - ); - - } - - function testDateAndOrTime_TimeWithSecondTZ() { - - $this->assertDateAndOrTimeEqualsTo( - '--01+1234', - [ - 'second' => '01', - 'timezone' => '+1234' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithYearMonthDayHour() { - - $this->assertDateAndOrTimeEqualsTo( - '20150128T13', - [ - 'year' => '2015', - 'month' => '01', - 'date' => '28', - 'hour' => '13' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithMonthDayHour() { - - $this->assertDateAndOrTimeEqualsTo( - '--0128T13', - [ - 'month' => '01', - 'date' => '28', - 'hour' => '13' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithDayHour() { - - $this->assertDateAndOrTimeEqualsTo( - '---28T13', - [ - 'date' => '28', - 'hour' => '13' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithDayHourMinute() { - - $this->assertDateAndOrTimeEqualsTo( - '---28T1353', - [ - 'date' => '28', - 'hour' => '13', - 'minute' => '53' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithDayHourMinuteSecond() { - - $this->assertDateAndOrTimeEqualsTo( - '---28T135301', - [ - 'date' => '28', - 'hour' => '13', - 'minute' => '53', - 'second' => '01' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithDayHourZ() { - - $this->assertDateAndOrTimeEqualsTo( - '---28T13Z', - [ - 'date' => '28', - 'hour' => '13', - 'timezone' => 'Z' - ] - ); - - } - - function testDateAndOrTime_DateTimeWithDayHourTZ() { - - $this->assertDateAndOrTimeEqualsTo( - '---28T13+1234', - [ - 'date' => '28', - 'hour' => '13', - 'timezone' => '+1234' - ] - ); - - } - - protected function assertDateAndOrTimeEqualsTo($date, $parts) { - - $this->assertSame( - DateTimeParser::parseVCardDateAndOrTime($date), - array_merge( - [ - 'year' => null, - 'month' => null, - 'date' => null, - 'hour' => null, - 'minute' => null, - 'second' => null, - 'timezone' => null - ], - $parts - ) - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/DocumentTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/DocumentTest.php deleted file mode 100644 index f1730fdeab1..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/DocumentTest.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class DocumentTest extends \PHPUnit_Framework_TestCase { - - function testGetDocumentType() { - - $doc = new MockDocument(); - $this->assertEquals(Document::UNKNOWN, $doc->getDocumentType()); - - } - - function testConstruct() { - - $doc = new MockDocument('VLIST'); - $this->assertEquals('VLIST', $doc->name); - - } - - function testCreateComponent() { - - $vcal = new Component\VCalendar([], false); - - $event = $vcal->createComponent('VEVENT'); - - $this->assertInstanceOf('Sabre\VObject\Component\VEvent', $event); - $vcal->add($event); - - $prop = $vcal->createProperty('X-PROP', '1234256', ['X-PARAM' => '3']); - $this->assertInstanceOf('Sabre\VObject\Property', $prop); - - $event->add($prop); - - unset( - $event->DTSTAMP, - $event->UID - ); - - $out = $vcal->serialize(); - $this->assertEquals("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nX-PROP;X-PARAM=3:1234256\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", $out); - - } - - function testCreate() { - - $vcal = new Component\VCalendar([], false); - - $event = $vcal->create('VEVENT'); - $this->assertInstanceOf('Sabre\VObject\Component\VEvent', $event); - - $prop = $vcal->create('CALSCALE'); - $this->assertInstanceOf('Sabre\VObject\Property\Text', $prop); - - } - - function testGetClassNameForPropertyValue() { - - $vcal = new Component\VCalendar([], false); - $this->assertEquals('Sabre\\VObject\\Property\\Text', $vcal->getClassNameForPropertyValue('TEXT')); - $this->assertNull($vcal->getClassNameForPropertyValue('FOO')); - - } - - function testDestroy() { - - $vcal = new Component\VCalendar([], false); - $event = $vcal->createComponent('VEVENT'); - - $this->assertInstanceOf('Sabre\VObject\Component\VEvent', $event); - $vcal->add($event); - - $prop = $vcal->createProperty('X-PROP', '1234256', ['X-PARAM' => '3']); - - $event->add($prop); - - $this->assertEquals($event, $prop->parent); - - $vcal->destroy(); - - $this->assertNull($prop->parent); - - - } - -} - - -class MockDocument extends Document { - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ElementListTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ElementListTest.php deleted file mode 100644 index e63231133ad..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ElementListTest.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class ElementListTest extends \PHPUnit_Framework_TestCase { - - function testIterate() { - - $cal = new Component\VCalendar(); - $sub = $cal->createComponent('VEVENT'); - - $elems = [ - $sub, - clone $sub, - clone $sub - ]; - - $elemList = new ElementList($elems); - - $count = 0; - foreach ($elemList as $key => $subcomponent) { - - $count++; - $this->assertInstanceOf('Sabre\\VObject\\Component', $subcomponent); - - } - $this->assertEquals(3, $count); - $this->assertEquals(2, $key); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmClientTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmClientTest.php deleted file mode 100644 index 5743d48d815..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use DateTimeImmutable; - -class EmClientTest extends \PHPUnit_Framework_TestCase { - - function testParseTz() { - - $str = 'BEGIN:VCALENDAR -X-WR-CALNAME:Blackhawks Schedule 2011-12 -X-APPLE-CALENDAR-COLOR:#E51717 -X-WR-TIMEZONE:America/Chicago -CALSCALE:GREGORIAN -PRODID:-//eM Client/4.0.13961.0 -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America/Chicago -BEGIN:DAYLIGHT -TZOFFSETFROM:-0600 -RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3 -DTSTART:20070311T020000 -TZNAME:CDT -TZOFFSETTO:-0500 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0500 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11 -DTSTART:20071104T020000 -TZNAME:CST -TZOFFSETTO:-0600 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20110624T181236Z -UID:be3bbfff-96e8-4c66-9908-ab791a62231d -DTEND;TZID="America/Chicago":20111008T223000 -TRANSP:OPAQUE -SUMMARY:Stars @ Blackhawks (Home Opener) -DTSTART;TZID="America/Chicago":20111008T193000 -DTSTAMP:20120330T013232Z -SEQUENCE:2 -X-MICROSOFT-CDO-BUSYSTATUS:BUSY -LAST-MODIFIED:20120330T013237Z -CLASS:PUBLIC -END:VEVENT -END:VCALENDAR'; - - $vObject = Reader::read($str); - $dt = $vObject->VEVENT->DTSTART->getDateTime(); - $this->assertEquals(new DateTimeImmutable('2011-10-08 19:30:00', new \DateTimeZone('America/Chicago')), $dt); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyParameterTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyParameterTest.php deleted file mode 100644 index a9e9fcc5cd9..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyParameterTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class EmptyParameterTest extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $input = <<<VCF -BEGIN:VCARD -VERSION:2.1 -N:Doe;Jon;;; -FN:Jon Doe -EMAIL;X-INTERN:foo@example.org -UID:foo -END:VCARD -VCF; - - $vcard = Reader::read($input); - - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); - $vcard = $vcard->convert(\Sabre\VObject\Document::VCARD30); - $vcard = $vcard->serialize(); - - $converted = Reader::read($vcard); - $converted->validate(); - - $this->assertTrue(isset($converted->EMAIL['X-INTERN'])); - - $version = Version::VERSION; - - $expected = <<<VCF -BEGIN:VCARD -VERSION:3.0 -PRODID:-//Sabre//Sabre VObject $version//EN -N:Doe;Jon;;; -FN:Jon Doe -EMAIL;X-INTERN=:foo@example.org -UID:foo -END:VCARD - -VCF; - - $this->assertEquals($expected, str_replace("\r", "", $vcard)); - - } - - function testVCard21Parameter() { - - $vcard = new Component\VCard([], false); - $vcard->VERSION = '2.1'; - $vcard->PHOTO = 'random_stuff'; - $vcard->PHOTO->add(null, 'BASE64'); - $vcard->UID = 'foo-bar'; - - $result = $vcard->serialize(); - $expected = [ - "BEGIN:VCARD", - "VERSION:2.1", - "PHOTO;BASE64:" . base64_encode('random_stuff'), - "UID:foo-bar", - "END:VCARD", - "", - ]; - - $this->assertEquals(implode("\r\n", $expected), $result); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyValueIssueTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyValueIssueTest.php deleted file mode 100644 index 7a34944992c..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/EmptyValueIssueTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * This test is written for Issue 68: - * - * https://github.com/fruux/sabre-vobject/issues/68 - */ -class EmptyValueIssueTest extends \PHPUnit_Framework_TestCase { - - function testDecodeValue() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -DESCRIPTION:This is a descpription\\nwith a linebreak and a \\; \\, and : -END:VEVENT -END:VCALENDAR -ICS; - - $vobj = Reader::read($input); - - // Before this bug was fixed, getValue() would return nothing. - $this->assertEquals("This is a descpription\nwith a linebreak and a ; , and :", $vobj->VEVENT->DESCRIPTION->getValue()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyDataTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyDataTest.php deleted file mode 100644 index 9b5f541b9f6..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyDataTest.php +++ /dev/null @@ -1,318 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class FreeBusyDataTest extends \PHPUnit_Framework_TestCase { - - function testGetData() { - - $fb = new FreeBusyData(100, 200); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 200, - 'type' => 'FREE', - ] - ], - $fb->getData() - ); - - } - - /** - * @depends testGetData - */ - function testAddBeginning() { - - $fb = new FreeBusyData(100, 200); - - // Overwriting the first half - $fb->add(100, 150, 'BUSY'); - - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 150, - 'type' => 'BUSY', - ], - [ - 'start' => 150, - 'end' => 200, - 'type' => 'FREE', - ] - ], - $fb->getData() - ); - - // Overwriting the first half again - $fb->add(100, 150, 'BUSY-TENTATIVE'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 150, - 'type' => 'BUSY-TENTATIVE', - ], - [ - 'start' => 150, - 'end' => 200, - 'type' => 'FREE', - ] - ], - $fb->getData() - ); - - } - - /** - * @depends testAddBeginning - */ - function testAddEnd() { - - $fb = new FreeBusyData(100, 200); - - // Overwriting the first half - $fb->add(150, 200, 'BUSY'); - - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 150, - 'type' => 'FREE', - ], - [ - 'start' => 150, - 'end' => 200, - 'type' => 'BUSY', - ], - ], - $fb->getData() - ); - - - } - - /** - * @depends testAddEnd - */ - function testAddMiddle() { - - $fb = new FreeBusyData(100, 200); - - // Overwriting the first half - $fb->add(150, 160, 'BUSY'); - - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 150, - 'type' => 'FREE', - ], - [ - 'start' => 150, - 'end' => 160, - 'type' => 'BUSY', - ], - [ - 'start' => 160, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - - } - - /** - * @depends testAddMiddle - */ - function testAddMultiple() { - - $fb = new FreeBusyData(100, 200); - - $fb->add(110, 120, 'BUSY'); - $fb->add(130, 140, 'BUSY'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 110, - 'type' => 'FREE', - ], - [ - 'start' => 110, - 'end' => 120, - 'type' => 'BUSY', - ], - [ - 'start' => 120, - 'end' => 130, - 'type' => 'FREE', - ], - [ - 'start' => 130, - 'end' => 140, - 'type' => 'BUSY', - ], - [ - 'start' => 140, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - - } - - /** - * @depends testAddMultiple - */ - function testAddMultipleOverlap() { - - $fb = new FreeBusyData(100, 200); - - $fb->add(110, 120, 'BUSY'); - $fb->add(130, 140, 'BUSY'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 110, - 'type' => 'FREE', - ], - [ - 'start' => 110, - 'end' => 120, - 'type' => 'BUSY', - ], - [ - 'start' => 120, - 'end' => 130, - 'type' => 'FREE', - ], - [ - 'start' => 130, - 'end' => 140, - 'type' => 'BUSY', - ], - [ - 'start' => 140, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - - $fb->add(115, 135, 'BUSY-TENTATIVE'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 110, - 'type' => 'FREE', - ], - [ - 'start' => 110, - 'end' => 115, - 'type' => 'BUSY', - ], - [ - 'start' => 115, - 'end' => 135, - 'type' => 'BUSY-TENTATIVE', - ], - [ - 'start' => 135, - 'end' => 140, - 'type' => 'BUSY', - ], - [ - 'start' => 140, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - } - - /** - * @depends testAddMultipleOverlap - */ - function testAddMultipleOverlapAndMerge() { - - $fb = new FreeBusyData(100, 200); - - $fb->add(110, 120, 'BUSY'); - $fb->add(130, 140, 'BUSY'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 110, - 'type' => 'FREE', - ], - [ - 'start' => 110, - 'end' => 120, - 'type' => 'BUSY', - ], - [ - 'start' => 120, - 'end' => 130, - 'type' => 'FREE', - ], - [ - 'start' => 130, - 'end' => 140, - 'type' => 'BUSY', - ], - [ - 'start' => 140, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - - $fb->add(115, 135, 'BUSY'); - - $this->assertEquals( - [ - [ - 'start' => 100, - 'end' => 110, - 'type' => 'FREE', - ], - [ - 'start' => 110, - 'end' => 140, - 'type' => 'BUSY', - ], - [ - 'start' => 140, - 'end' => 200, - 'type' => 'FREE', - ], - ], - $fb->getData() - ); - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php deleted file mode 100644 index 70e83ab2f30..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php +++ /dev/null @@ -1,751 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class FreeBusyGeneratorTest extends \PHPUnit_Framework_TestCase { - - use PHPUnitAssertions; - - function testGeneratorBaseObject() { - - $obj = new Component\VCalendar(); - $obj->METHOD = 'PUBLISH'; - - $gen = new FreeBusyGenerator(); - $gen->setObjects([]); - $gen->setBaseObject($obj); - - $result = $gen->getResult(); - - $this->assertEquals('PUBLISH', $result->METHOD->getValue()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testInvalidArg() { - - $gen = new FreeBusyGenerator( - new \DateTime('2012-01-01'), - new \DateTime('2012-12-31'), - new \StdClass() - ); - - } - - /** - * This function takes a list of objects (icalendar objects), and turns - * them into a freebusy report. - * - * Then it takes the expected output and compares it to what we actually - * got. - * - * It only generates the freebusy report for the following time-range: - * 2011-01-01 11:00:00 until 2011-01-03 11:11:11 - * - * @param string $expected - * @param array $input - * @param string|null $timeZone - * @param string $vavailability - * @return void - */ - function assertFreeBusyReport($expected, $input, $timeZone = null, $vavailability = null) { - - $gen = new FreeBusyGenerator( - new \DateTime('20110101T110000Z', new \DateTimeZone('UTC')), - new \DateTime('20110103T110000Z', new \DateTimeZone('UTC')), - $input, - $timeZone - ); - - if ($vavailability) { - if (is_string($vavailability)) { - $vavailability = Reader::read($vavailability); - } - $gen->setVAvailability($vavailability); - } - - $output = $gen->getResult(); - - // Removing DTSTAMP because it changes every time. - unset($output->VFREEBUSY->DTSTAMP); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VFREEBUSY -DTSTART:20110101T110000Z -DTEND:20110103T110000Z -$expected -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject($expected, $output); - - } - - function testSimple() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T120000Z/20110101T130000Z", - $blob - ); - - } - - function testSource() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - $h = fopen('php://memory', 'r+'); - fwrite($h, $blob); - rewind($h); - - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T120000Z/20110101T130000Z", - $h - ); - - } - - /** - * Testing TRANSP:OPAQUE - */ - function testOpaque() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar2 -TRANSP:OPAQUE -DTSTART:20110101T130000Z -DTEND:20110101T140000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T130000Z/20110101T140000Z", - $blob - ); - - } - - /** - * Testing TRANSP:TRANSPARENT - */ - function testTransparent() { - - // transparent, hidden - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar3 -TRANSP:TRANSPARENT -DTSTART:20110101T140000Z -DTEND:20110101T150000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "", - $blob - ); - - } - - /** - * Testing STATUS:CANCELLED - */ - function testCancelled() { - - // transparent, hidden - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar4 -STATUS:CANCELLED -DTSTART:20110101T160000Z -DTEND:20110101T170000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "", - $blob - ); - - } - - /** - * Testing STATUS:TENTATIVE - */ - function testTentative() { - - // tentative, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar5 -STATUS:TENTATIVE -DTSTART:20110101T180000Z -DTEND:20110101T190000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T180000Z/20110101T190000Z', - $blob - ); - - } - - /** - * Testing an event that falls outside of the report time-range. - */ - function testOutsideTimeRange() { - - // outside of time-range, hidden - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar6 -DTSTART:20110101T090000Z -DTEND:20110101T100000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - '', - $blob - ); - - } - - /** - * Testing an event that falls outside of the report time-range. - */ - function testOutsideTimeRange2() { - - // outside of time-range, hidden - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar7 -DTSTART:20110104T090000Z -DTEND:20110104T100000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - '', - $blob - ); - - } - - /** - * Testing an event that uses DURATION - */ - function testDuration() { - - // using duration, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar8 -DTSTART:20110101T190000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY:20110101T190000Z/20110101T200000Z', - $blob - ); - - } - - /** - * Testing an all-day event - */ - function testAllDay() { - - // Day-long event, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar9 -DTSTART;VALUE=DATE:20110102 -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY:20110102T000000Z/20110103T000000Z', - $blob - ); - - } - - /** - * Testing an event that has no end or duration. - */ - function testNoDuration() { - - // No duration, does not show up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar10 -DTSTART:20110101T200000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - '', - $blob - ); - - } - - /** - * Testing feeding the freebusy generator an object instead of a string. - */ - function testObject() { - - // encoded as object, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar11 -DTSTART:20110101T210000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY:20110101T210000Z/20110101T220000Z', - Reader::read($blob) - ); - - - } - - /** - * Testing feeding VFREEBUSY objects instead of VEVENT - */ - function testVFreeBusy() { - - // Freebusy. Some parts show up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VFREEBUSY -FREEBUSY:20110103T010000Z/20110103T020000Z -FREEBUSY;FBTYPE=FREE:20110103T020000Z/20110103T030000Z -FREEBUSY:20110103T030000Z/20110103T040000Z,20110103T040000Z/20110103T050000Z -FREEBUSY:20120101T000000Z/20120101T010000Z -FREEBUSY:20110103T050000Z/PT1H -END:VFREEBUSY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110103T010000Z/20110103T020000Z\n" . - 'FREEBUSY:20110103T030000Z/20110103T060000Z', - $blob - ); - - } - - function testYearlyRecurrence() { - - // Yearly recurrence rule, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar13 -DTSTART:20100101T220000Z -DTEND:20100101T230000Z -RRULE:FREQ=YEARLY -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY:20110101T220000Z/20110101T230000Z', - $blob - ); - - } - - function testYearlyRecurrenceDuration() { - - // Yearly recurrence rule + duration, shows up - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar14 -DTSTART:20100101T230000Z -DURATION:PT1H -RRULE:FREQ=YEARLY -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - 'FREEBUSY:20110101T230000Z/20110102T000000Z', - $blob - ); - - } - - function testFloatingTime() { - - // Floating time, no timezone - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20110101T120000 -DTEND:20110101T130000 -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T120000Z/20110101T130000Z", - $blob - ); - - } - - function testFloatingTimeReferenceTimeZone() { - - // Floating time + reference timezone - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20110101T120000 -DTEND:20110101T130000 -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T170000Z/20110101T180000Z", - $blob, - new \DateTimeZone('America/Toronto') - ); - - } - - function testAllDay2() { - - // All-day event, slightly outside of the VFREEBUSY range. - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART;VALUE=DATE:20110101 -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T110000Z/20110102T000000Z", - $blob - ); - - } - - function testAllDayReferenceTimeZone() { - - // All-day event + reference timezone - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART;VALUE=DATE:20110101 -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T110000Z/20110102T050000Z", - $blob, - new \DateTimeZone('America/Toronto') - ); - - } - - function testNoValidInstances() { - - // Recurrence rule with no valid instances - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20110101T100000Z -DTEND:20110103T120000Z -RRULE:FREQ=WEEKLY;COUNT=1 -EXDATE:20110101T100000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "", - $blob - ); - - } - - /** - * This VAVAILABILITY object overlaps with the time-range, but we're just - * busy the entire time. - */ - function testVAvailabilitySimple() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:lalala -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vavail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20110101T000000Z -DTEND:20120101T000000Z -BEGIN:AVAILABLE -DTSTART:20110101T000000Z -DTEND:20110101T010000Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T110000Z/20110101T120000Z\n" . - "FREEBUSY:20110101T120000Z/20110101T130000Z\n" . - "FREEBUSY;FBTYPE=BUSY-UNAVAILABLE:20110101T130000Z/20110103T110000Z", - $blob, - null, - $vavail - ); - - } - - /** - * This VAVAILABILITY object does not overlap at all with the freebusy - * report, so it should be ignored. - */ - function testVAvailabilityIrrelevant() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:lalala -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vavail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20150101T000000Z -DTEND:20160101T000000Z -BEGIN:AVAILABLE -DTSTART:20150101T000000Z -DTEND:20150101T010000Z -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T120000Z/20110101T130000Z", - $blob, - null, - $vavail - ); - - } - - /** - * This VAVAILABILITY object has a 9am-5pm AVAILABLE object for office - * hours. - */ - function testVAvailabilityOfficeHours() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:lalala -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vavail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20100101T000000Z -DTEND:20120101T000000Z -BUSYTYPE:BUSY-TENTATIVE -BEGIN:AVAILABLE -DTSTART:20101213T090000Z -DTEND:20101213T170000Z -RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR -END:AVAILABLE -END:VAVAILABILITY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T110000Z/20110101T120000Z\n" . - "FREEBUSY:20110101T120000Z/20110101T130000Z\n" . - "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T130000Z/20110103T090000Z\n", - $blob, - null, - $vavail - ); - - } - - /** - * This test has the same office hours, but has a vacation blocked off for - * the relevant time, using a higher priority. (lower number). - */ - function testVAvailabilityOfficeHoursVacation() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:lalala -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vavail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20100101T000000Z -DTEND:20120101T000000Z -BUSYTYPE:BUSY-TENTATIVE -PRIORITY:2 -BEGIN:AVAILABLE -DTSTART:20101213T090000Z -DTEND:20101213T170000Z -RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR -END:AVAILABLE -END:VAVAILABILITY -BEGIN:VAVAILABILITY -PRIORITY:1 -DTSTART:20101214T000000Z -DTEND:20110107T000000Z -BUSYTYPE:BUSY -END:VAVAILABILITY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY:20110101T110000Z/20110103T110000Z", - $blob, - null, - $vavail - ); - - } - - /** - * This test has the same input as the last, except somebody mixed up the - * PRIORITY values. - * - * The end-result is that the vacation VAVAILABILITY is completely ignored. - */ - function testVAvailabilityOfficeHoursVacation2() { - - $blob = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:lalala -DTSTART:20110101T120000Z -DTEND:20110101T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vavail = <<<ICS -BEGIN:VCALENDAR -BEGIN:VAVAILABILITY -DTSTART:20100101T000000Z -DTEND:20120101T000000Z -BUSYTYPE:BUSY-TENTATIVE -PRIORITY:1 -BEGIN:AVAILABLE -DTSTART:20101213T090000Z -DTEND:20101213T170000Z -RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR -END:AVAILABLE -END:VAVAILABILITY -BEGIN:VAVAILABILITY -PRIORITY:2 -DTSTART:20101214T000000Z -DTEND:20110107T000000Z -BUSYTYPE:BUSY -END:VAVAILABILITY -END:VCALENDAR -ICS; - - $this->assertFreeBusyReport( - "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T110000Z/20110101T120000Z\n" . - "FREEBUSY:20110101T120000Z/20110101T130000Z\n" . - "FREEBUSY;FBTYPE=BUSY-TENTATIVE:20110101T130000Z/20110103T090000Z\n", - $blob, - null, - $vavail - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/GoogleColonEscapingTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/GoogleColonEscapingTest.php deleted file mode 100644 index ee37aa8875e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/GoogleColonEscapingTest.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * Google produces vcards with a weird escaping of urls. - * - * VObject will provide a workaround for this, so end-user still get expected - * values. - */ -class GoogleColonEscapingTest extends \PHPUnit_Framework_TestCase { - - function testDecode() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -FN:Evert Pot -N:Pot;Evert;;; -EMAIL;TYPE=INTERNET;TYPE=WORK:evert@fruux.com -BDAY:1985-04-07 -item7.URL:http\://www.rooftopsolutions.nl/ -END:VCARD -VCF; - - $vobj = Reader::read($vcard); - $this->assertEquals('http://www.rooftopsolutions.nl/', $vobj->URL->getValue()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ICalendar/AttachParseTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ICalendar/AttachParseTest.php deleted file mode 100644 index 0c4fc8790e5..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ICalendar/AttachParseTest.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -namespace Sabre\VObject\ICalendar; - -use Sabre\VObject\Reader; - -class AttachParseTest extends \PHPUnit_Framework_TestCase { - - /** - * See issue #128 for more info. - */ - function testParseAttach() { - - $vcal = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/reports/r-960812.ps -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($vcal); - $prop = $vcal->VEVENT->ATTACH; - - $this->assertInstanceOf('Sabre\\VObject\\Property\\URI', $prop); - $this->assertEquals('ftp://example.com/pub/reports/r-960812.ps', $prop->getValue()); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerAttendeeReplyTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerAttendeeReplyTest.php deleted file mode 100644 index 9519ed36828..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerAttendeeReplyTest.php +++ /dev/null @@ -1,1146 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerAttendeeReplyTest extends BrokerTester { - - function testAccepted() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -SUMMARY:B-day party -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testRecurringReply() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -RRULE;FREQ=DAILY -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=One:mailto:one@example.org -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART:20140726T120000Z -RECURRENCE-ID:20140726T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART:20140724T120000Z -RECURRENCE-ID:20140724T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=TENTATIVE;CN=One:mailto:one@example.org -DTSTART:20140728T120000Z -RECURRENCE-ID:20140728T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART:20140729T120000Z -RECURRENCE-ID:20140729T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART:20140725T120000Z -RECURRENCE-ID:20140725T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140726T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140726T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140724T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140728T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140728T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=TENTATIVE;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140729T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140729T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140725T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140725T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testRecurringAllDay() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140724 -RRULE;FREQ=DAILY -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140724 -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140726 -RECURRENCE-ID;VALUE=DATE:20140726 -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140724 -RECURRENCE-ID;VALUE=DATE:20140724 -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=TENTATIVE;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140728 -RECURRENCE-ID;VALUE=DATE:20140728 -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140729 -RECURRENCE-ID;VALUE=DATE:20140729 -END:VEVENT -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140725 -RECURRENCE-ID;VALUE=DATE:20140725 -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140726 -RECURRENCE-ID;VALUE=DATE:20140726 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140724 -RECURRENCE-ID;VALUE=DATE:20140724 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140728 -RECURRENCE-ID;VALUE=DATE:20140728 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=TENTATIVE;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140729 -RECURRENCE-ID;VALUE=DATE:20140729 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140725 -RECURRENCE-ID;VALUE=DATE:20140725 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testNoChange() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $expected = []; - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testNoChangeForceSend() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;SCHEDULE-FORCE-SEND=REPLY;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - ] - - ]; - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testNoRelevantAttendee() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $expected = []; - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * In this test, an event exists in an attendees calendar. The event - * is recurring, and the attendee deletes 1 instance of the event. - * This instance shows up in EXDATE - * - * This should automatically generate a DECLINED message for that - * specific instance. - */ - function testCreateReplyByException() { - - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140811T200000Z -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140811T200000Z -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -EXDATE:20140818T200000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => null, - 'recipient' => 'mailto:organizer@example.org', - 'recipientName' => null, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140818T200000Z -RECURRENCE-ID:20140818T200000Z -ORGANIZER:mailto:organizer@example.org -ATTENDEE;PARTSTAT=DECLINED:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * This test is identical to the last, but now we're working with - * timezones. - * - * @depends testCreateReplyByException - */ - function testCreateReplyByExceptionTz() { - - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART;TZID=America/Toronto:20140811T200000 -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART;TZID=America/Toronto:20140811T200000 -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -EXDATE;TZID=America/Toronto:20140818T200000 -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => null, - 'recipient' => 'mailto:organizer@example.org', - 'recipientName' => null, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;TZID=America/Toronto:20140818T200000 -RECURRENCE-ID;TZID=America/Toronto:20140818T200000 -ORGANIZER:mailto:organizer@example.org -ATTENDEE;PARTSTAT=DECLINED:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * @depends testCreateReplyByException - */ - function testCreateReplyByExceptionAllDay() { - - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SUMMARY:Weekly meeting -UID:foobar -SEQUENCE:1 -DTSTART;VALUE=DATE:20140811 -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SUMMARY:Weekly meeting -UID:foobar -SEQUENCE:1 -DTSTART;VALUE=DATE:20140811 -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -EXDATE;VALUE=DATE:20140818 -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => null, - 'recipient' => 'mailto:organizer@example.org', - 'recipientName' => null, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140818 -SUMMARY:Weekly meeting -RECURRENCE-ID;VALUE=DATE:20140818 -ORGANIZER:mailto:organizer@example.org -ATTENDEE;PARTSTAT=DECLINED:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testDeclined() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testDeclinedCancelledEvent() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -STATUS:CANCELLED -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -STATUS:CANCELLED -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = []; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * In this test, a new exception is created by an attendee as well. - * - * Except in this case, there was already an overridden event, and the - * overridden event was marked as cancelled by the attendee. - * - * For any other attendence status, the new status would have been - * declined, but for this, no message should we sent. - */ - function testDontCreateReplyWhenEventWasDeclined() { - - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140811T200000Z -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -END:VEVENT -BEGIN:VEVENT -RECURRENCE-ID:20140818T200000Z -UID:foobar -SEQUENCE:1 -DTSTART:20140818T200000Z -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE;PARTSTAT=DECLINED:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140811T200000Z -RRULE:FREQ=WEEKLY -ORGANIZER:mailto:organizer@example.org -ATTENDEE:mailto:one@example.org -EXDATE:20140818T200000Z -END:VEVENT -END:VCALENDAR -ICS; - - $expected = []; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testScheduleAgentOnOrganizer() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;SCHEDULE-AGENT=CLIENT;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = []; - $this->parse($oldMessage, $newMessage, $expected); - - } - - function testAcceptedAllDay() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140716 -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART;VALUE=DATE:20140716 -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART;VALUE=DATE:20140716 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * This function tests an attendee updating their status to an event where - * they don't have the master event of. - * - * This is possible in cases an organizer created a recurring event, and - * invited an attendee for one instance of the event. - */ - function testReplyNoMasterEvent() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -RECURRENCE-ID:20140724T120000Z -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -RECURRENCE-ID:20140724T120000Z -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140724T120000Z -SUMMARY:Daily sprint -RECURRENCE-ID:20140724T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } - - /** - * A party crasher is an attendee that accepted an event, but was not in - * any original invite. - * - * @depends testAccepted - */ - function testPartyCrasher() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -DTSTART:20140716T120000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140717T120000Z -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -DTSTART:20140717T120000Z -RRULE:FREQ=DAILY -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -DTSTART:20140716T120000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140717T120000Z -SUMMARY:B-day party -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -DTSTART:20140717T120000Z -RRULE:FREQ=DAILY -END:VEVENT -END:VCALENDAR -ICS; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140717T120000Z -SUMMARY:B-day party -RECURRENCE-ID:20140717T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=ACCEPTED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR - -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerDeleteEventTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerDeleteEventTest.php deleted file mode 100644 index 935c451fe76..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerDeleteEventTest.php +++ /dev/null @@ -1,344 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerDeleteEventTest extends BrokerTester { - - function testOrganizerDeleteWithDtend() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = null; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - ], - - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testOrganizerDeleteWithDuration() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = null; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DURATION:PT1H -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - ], - - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DURATION:PT1H -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testAttendeeDeleteWithDtend() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = null; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:one@example.org'); - - - } - - function testAttendeeReplyWithDuration() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = null; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REPLY', - 'component' => 'VEVENT', - 'sender' => 'mailto:one@example.org', - 'senderName' => 'One', - 'recipient' => 'mailto:strunk@example.org', - 'recipientName' => 'Strunk', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -DURATION:PT1H -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;PARTSTAT=DECLINED;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:one@example.org'); - - - } - - function testAttendeeDeleteCancelledEvent() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -STATUS:CANCELLED -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = null; - - $expected = []; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:one@example.org'); - - - } - - function testNoCalendar() { - - $this->parse(null, null, [], 'mailto:one@example.org'); - - } - - function testVTodo() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VTODO -UID:foobar -SEQUENCE:1 -END:VTODO -END:VCALENDAR -ICS; - $this->parse($oldMessage, null, [], 'mailto:one@example.org'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerNewEventTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerNewEventTest.php deleted file mode 100644 index 05cf452a85c..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerNewEventTest.php +++ /dev/null @@ -1,496 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerNewEventTest extends BrokerTester { - - function testNoAttendee() { - - $message = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20140811T220000Z -DTEND:20140811T230000Z -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->parse(null, $message, []); - - } - - function testVTODO() { - - $message = <<<ICS -BEGIN:VCALENDAR -BEGIN:VTODO -UID:foobar -END:VTODO -END:VCALENDAR -ICS; - - $result = $this->parse(null, $message, []); - - } - - function testSimpleInvite() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140811T220000Z -DTEND:20140811T230000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White:mailto:white@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expectedMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -DTSTART:20140811T220000Z -DTEND:20140811T230000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White;PARTSTAT=NEEDS-ACTION:mailto:white@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:white@example.org', - 'recipientName' => 'White', - 'message' => $expectedMessage, - ], - ]; - - $this->parse(null, $message, $expected, 'mailto:strunk@example.org'); - - } - - /** - * @expectedException \Sabre\VObject\ITip\ITipException - */ - function testBrokenEventUIDMisMatch() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White:mailto:white@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White:mailto:white@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - /** - * @expectedException \Sabre\VObject\ITip\ITipException - */ - function testBrokenEventOrganizerMisMatch() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White:mailto:white@example.org -END:VEVENT -BEGIN:VEVENT -UID:foobar -ORGANIZER:mailto:foo@example.org -ATTENDEE;CN=White:mailto:white@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - - function testRecurrenceInvite() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DURATION:PT1H -RRULE:FREQ=DAILY -EXDATE:20140717T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -DTSTART:20140716T120000Z -DURATION:PT1H -RRULE:FREQ=DAILY -EXDATE:20140717T120000Z,20140718T120000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -DTSTART:20140716T120000Z -DURATION:PT1H -RRULE:FREQ=DAILY -EXDATE:20140717T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:three@example.org', - 'recipientName' => 'Three', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DURATION:PT1H -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse(null, $message, $expected, 'mailto:strunk@example.org'); - - } - - function testRecurrenceInvite2() { - - // This method tests a nearly identical path, but in this case the - // master event does not have an EXDATE. - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DTEND:20140718T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -RRULE:FREQ=DAILY -EXDATE:20140718T120000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DTEND:20140718T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:three@example.org', - 'recipientName' => 'Three', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DTEND:20140718T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse(null, $message, $expected, 'mailto:strunk@example.org'); - - } - - function testScheduleAgentClient() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140811T220000Z -DTEND:20140811T230000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=White;SCHEDULE-AGENT=CLIENT:mailto:white@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - - /** - * @expectedException Sabre\VObject\ITip\ITipException - */ - function testMultipleUID() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar2 -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DTEND:20140718T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - - /** - * @expectedException Sabre\VObject\ITip\SameOrganizerForAllComponentsException - */ - function testChangingOrganizers() { - - $message = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -RRULE:FREQ=DAILY -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140718T120000Z -ORGANIZER;CN=Strunk:mailto:ew@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140718T120000Z -DTEND:20140718T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - function testNoOrganizerHasAttendee() { - - $message = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -DTSTART:20140811T220000Z -DTEND:20140811T230000Z -ATTENDEE;CN=Two:mailto:two@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->parse(null, $message, [], 'mailto:strunk@example.org'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessMessageTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessMessageTest.php deleted file mode 100644 index 691574a8991..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessMessageTest.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerProcessMessageTest extends BrokerTester { - - function testRequestNew() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REQUEST -BEGIN:VEVENT -SEQUENCE:1 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:1 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, null, $expected); - - } - - function testRequestUpdate() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REQUEST -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -SEQUENCE:1 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testCancel() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:CANCEL -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -SEQUENCE:1 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foobar -STATUS:CANCELLED -SEQUENCE:2 -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testCancelNoExistingEvent() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:CANCEL -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = null; - $expected = null; - - $result = $this->process($itip, $old, $expected); - - } - - function testUnsupportedComponent() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VTODO -SEQUENCE:2 -UID:foobar -END:VTODO -END:VCALENDAR -ICS; - - $old = null; - $expected = null; - - $result = $this->process($itip, $old, $expected); - - } - - function testUnsupportedMethod() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:PUBLISH -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = null; - $expected = null; - - $result = $this->process($itip, $old, $expected); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessReplyTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessReplyTest.php deleted file mode 100644 index 533fdce1512..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerProcessReplyTest.php +++ /dev/null @@ -1,496 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerProcessReplyTest extends BrokerTester { - - function testReplyNoOriginal() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $old = null; - $expected = null; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyAccept() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyRequestStatus() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -UID:foobar -REQUEST-STATUS:2.3;foo-bar! -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.3:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - - function testReplyPartyCrasher() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:crasher@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -ATTENDEE;PARTSTAT=ACCEPTED:mailto:crasher@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyNewException() { - - // This is a reply to 1 instance of a recurring event. This should - // automatically create an exception. - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -RECURRENCE-ID:20140725T000000Z -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -DTSTART:20140725T000000Z -DTEND:20140725T010000Z -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -RECURRENCE-ID:20140725T000000Z -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyNewExceptionTz() { - - // This is a reply to 1 instance of a recurring event. This should - // automatically create an exception. - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -RECURRENCE-ID;TZID=America/Toronto:20140725T000000 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART;TZID=America/Toronto:20140724T000000 -DTEND;TZID=America/Toronto:20140724T010000 -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART;TZID=America/Toronto:20140724T000000 -DTEND;TZID=America/Toronto:20140724T010000 -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -DTSTART;TZID=America/Toronto:20140725T000000 -DTEND;TZID=America/Toronto:20140725T010000 -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -RECURRENCE-ID;TZID=America/Toronto:20140725T000000 -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyPartyCrashCreateExcepton() { - - // IN this test there's a recurring event that has an exception. The - // exception is missing the attendee. - // - // The attendee party crashes the instance, so it should show up in the - // resulting object. - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED;CN=Crasher!:mailto:crasher@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -RECURRENCE-ID:20140725T000000Z -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ORGANIZER:mailto:bar@example.org -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -DTSTART:20140725T000000Z -DTEND:20140725T010000Z -ORGANIZER:mailto:bar@example.org -RECURRENCE-ID:20140725T000000Z -ATTENDEE;PARTSTAT=ACCEPTED;CN=Crasher!:mailto:crasher@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyNewExceptionNoMasterEvent() { - - /** - * This iTip message would normally create a new exception, but the - * server is not able to create this new instance, because there's no - * master event to clone from. - * - * This test checks if the message is ignored. - */ - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED;CN=Crasher!:mailto:crasher@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -RECURRENCE-ID:20140725T000000Z -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -RECURRENCE-ID:20140724T000000Z -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = null; - $result = $this->process($itip, $old, $expected); - - } - - /** - * @depends testReplyAccept - */ - function testReplyAcceptUpdateRSVP() { - - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE;RSVP=TRUE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -ATTENDEE;PARTSTAT=ACCEPTED;SCHEDULE-STATUS=2.0:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - - function testReplyNewExceptionFirstOccurence() { - - // This is a reply to 1 instance of a recurring event. This should - // automatically create an exception. - $itip = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -METHOD:REPLY -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -SEQUENCE:2 -RECURRENCE-ID:20140724T000000Z -UID:foobar -END:VEVENT -END:VCALENDAR -ICS; - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -RRULE:FREQ=DAILY -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ATTENDEE:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -UID:foobar -DTSTART:20140724T000000Z -DTEND:20140724T010000Z -ATTENDEE;PARTSTAT=ACCEPTED:mailto:foo@example.org -ORGANIZER:mailto:bar@example.org -RECURRENCE-ID:20140724T000000Z -END:VEVENT -END:VCALENDAR -ICS; - - $result = $this->process($itip, $old, $expected); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTester.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTester.php deleted file mode 100644 index 6dbb517496e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTester.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -use Sabre\VObject\Reader; - -/** - * Utilities for testing the broker - * - * @copyright Copyright (C) fruux GmbH (https://fruux.com/) - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -abstract class BrokerTester extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function parse($oldMessage, $newMessage, $expected = [], $currentUser = 'mailto:one@example.org') { - - $broker = new Broker(); - $result = $broker->parseEvent($newMessage, $currentUser, $oldMessage); - - $this->assertEquals(count($expected), count($result)); - - foreach ($expected as $index => $ex) { - - $message = $result[$index]; - - foreach ($ex as $key => $val) { - - if ($key === 'message') { - $this->assertVObjectEqualsVObject( - $val, - $message->message->serialize() - ); - } else { - $this->assertEquals($val, $message->$key); - } - - } - - } - - } - - function process($input, $existingObject = null, $expected = false) { - - $version = \Sabre\VObject\Version::VERSION; - - $vcal = Reader::read($input); - - foreach ($vcal->getComponents() as $mainComponent) { - break; - } - - $message = new Message(); - $message->message = $vcal; - $message->method = isset($vcal->METHOD) ? $vcal->METHOD->getValue() : null; - $message->component = $mainComponent->name; - $message->uid = $mainComponent->UID->getValue(); - $message->sequence = isset($vcal->VEVENT[0]) ? (string)$vcal->VEVENT[0]->SEQUENCE : null; - - if ($message->method === 'REPLY') { - - $message->sender = $mainComponent->ATTENDEE->getValue(); - $message->senderName = isset($mainComponent->ATTENDEE['CN']) ? $mainComponent->ATTENDEE['CN']->getValue() : null; - $message->recipient = $mainComponent->ORGANIZER->getValue(); - $message->recipientName = isset($mainComponent->ORGANIZER['CN']) ? $mainComponent->ORGANIZER['CN'] : null; - - } - - $broker = new Broker(); - - if (is_string($existingObject)) { - $existingObject = str_replace( - '%foo%', - "VERSION:2.0\nPRODID:-//Sabre//Sabre VObject $version//EN\nCALSCALE:GREGORIAN", - $existingObject - ); - $existingObject = Reader::read($existingObject); - } - - $result = $broker->processMessage($message, $existingObject); - - if (is_null($expected)) { - $this->assertTrue(!$result); - return; - } - - $this->assertVObjectEqualsVObject( - $expected, - $result - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTimezoneInParseEventInfoWithoutMasterTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTimezoneInParseEventInfoWithoutMasterTest.php deleted file mode 100644 index 255a84e8c1e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerTimezoneInParseEventInfoWithoutMasterTest.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -use Sabre\VObject\Reader; - -class BrokerTimezoneInParseEventInfoWithoutMasterTest extends \PHPUnit_Framework_TestCase { - - function testTimezoneInParseEventInfoWithoutMaster() - { - $calendar = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.9.5//EN -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:Europe/Minsk -BEGIN:DAYLIGHT -TZOFFSETFROM:+0200 -RRULE:FREQ=YEARLY;UNTIL=20100328T000000Z;BYMONTH=3;BYDAY=-1SU -DTSTART:19930328T020000 -TZNAME:GMT+3 -TZOFFSETTO:+0300 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+0200 -DTSTART:20110327T020000 -TZNAME:GMT+3 -TZOFFSETTO:+0300 -RDATE:20110327T020000 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20160331T163031Z -UID:B9301437-417C-4136-8DB3-8D1555863791 -DTEND;TZID=Europe/Minsk:20160405T100000 -TRANSP:OPAQUE -ATTENDEE;CN=User Invitee;CUTYPE=INDIVIDUAL;EMAIL=invitee@test.com;PARTSTAT= - ACCEPTED;ROLE=REQ-PARTICIPANT:mailto:invitee@test.com -ATTENDEE;CN=User Organizer;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:organ - izer@test.com -SUMMARY:Event title -DTSTART;TZID=Europe/Minsk:20160405T090000 -DTSTAMP:20160331T164108Z -ORGANIZER;CN=User Organizer:mailto:organizer@test.com -SEQUENCE:6 -RECURRENCE-ID;TZID=Europe/Minsk:20160405T090000 -END:VEVENT -BEGIN:VEVENT -CREATED:20160331T163031Z -UID:B9301437-417C-4136-8DB3-8D1555863791 -DTEND;TZID=Europe/Minsk:20160406T100000 -TRANSP:OPAQUE -ATTENDEE;CN=User Invitee;CUTYPE=INDIVIDUAL;EMAIL=invitee@test.com;PARTSTAT= - ACCEPTED;ROLE=REQ-PARTICIPANT:mailto:invitee@test.com -ATTENDEE;CN=User Organizer;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:organ - izer@test.com -SUMMARY:Event title -DTSTART;TZID=Europe/Minsk:20160406T090000 -DTSTAMP:20160331T165845Z -ORGANIZER;CN=User Organizer:mailto:organizer@test.com -SEQUENCE:6 -RECURRENCE-ID;TZID=Europe/Minsk:20160406T090000 -END:VEVENT -END:VCALENDAR -ICS; - - $calendar = Reader::read($calendar); - $broker = new Broker(); - - $reflectionMethod = new \ReflectionMethod($broker, 'parseEventInfo'); - $reflectionMethod->setAccessible(true); - $data = $reflectionMethod->invoke($broker, $calendar); - $this->assertInstanceOf('DateTimeZone', $data['timezone']); - $this->assertEquals($data['timezone']->getName(), 'Europe/Minsk'); - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerUpdateEventTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerUpdateEventTest.php deleted file mode 100644 index bc109009e70..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/BrokerUpdateEventTest.php +++ /dev/null @@ -1,846 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class BrokerUpdateEventTest extends BrokerTester { - - function testInviteChange() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'significantChange' => false, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -ATTENDEE;CN=Three;PARTSTAT=NEEDS-ACTION:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:three@example.org', - 'recipientName' => 'Three', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -ATTENDEE;CN=Three;PARTSTAT=NEEDS-ACTION:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteChangeFromNonSchedulingToSchedulingObject() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteChangeFromSchedulingToNonSchedulingObject() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:1 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testNoAttendees() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = []; - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testRemoveInstance() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART;TZID=America/Toronto:20140716T120000 -DTEND;TZID=America/Toronto:20140716T130000 -RRULE:FREQ=WEEKLY -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART;TZID=America/Toronto:20140716T120000 -DTEND;TZID=America/Toronto:20140716T130000 -RRULE:FREQ=WEEKLY -EXDATE;TZID=America/Toronto:20140724T120000 -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -DTSTART;TZID=America/Toronto:20140716T120000 -DTEND;TZID=America/Toronto:20140716T130000 -RRULE:FREQ=WEEKLY -EXDATE;TZID=America/Toronto:20140724T120000 -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - /** - * This test is identical to the first test, except this time we change the - * DURATION property. - * - * This should ensure that the message is significant for every attendee, - */ - function testInviteChangeSignificantChange() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DURATION:PT1H -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DURATION:PT2H -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -ATTENDEE;CN=Three:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -DURATION:PT2H -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -ATTENDEE;CN=Three;PARTSTAT=NEEDS-ACTION:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:three@example.org', - 'recipientName' => 'Three', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -DURATION:PT2H -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org -ATTENDEE;CN=Three;PARTSTAT=NEEDS-ACTION:mailto:three@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteNoChange() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => false, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteNoChangeForceSend() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;SCHEDULE-FORCE-SEND=REQUEST;CN=One:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;PARTSTAT=ACCEPTED:mailto:strunk@example.org -ATTENDEE;CN=One;PARTSTAT=NEEDS-ACTION:mailto:one@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteRemoveAttendees() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -SUMMARY:foo -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -ATTENDEE;CN=Two:mailto:two@example.org -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=One:mailto:one@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - [ - 'uid' => 'foobar', - 'method' => 'CANCEL', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:two@example.org', - 'recipientName' => 'Two', - 'significantChange' => true, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:CANCEL -BEGIN:VEVENT -UID:foobar -DTSTAMP:**ANY** -SEQUENCE:2 -SUMMARY:foo -DTSTART:20140716T120000Z -DTEND:20140716T130000Z -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Two:mailto:two@example.org -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $result = $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } - - function testInviteChangeExdateOrder() { - - $oldMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.10.1//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -UID:foobar -SEQUENCE:0 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;CUTYPE=INDIVIDUAL;EMAIL=strunk@example.org;PARTSTAT=ACCE - PTED:mailto:strunk@example.org -ATTENDEE;CN=One;CUTYPE=INDIVIDUAL;EMAIL=one@example.org;PARTSTAT=ACCEPTED;R - OLE=REQ-PARTICIPANT;SCHEDULE-STATUS="1.2;Message delivered locally":mailto - :one@example.org -SUMMARY:foo -DTSTART:20141211T160000Z -DTEND:20141211T170000Z -RRULE:FREQ=WEEKLY -EXDATE:20141225T160000Z,20150101T160000Z -EXDATE:20150108T160000Z -END:VEVENT -END:VCALENDAR -ICS; - - - $newMessage = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.10.1//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;CUTYPE=INDIVIDUAL;EMAIL=strunk@example.org;PARTSTAT=ACCE - PTED:mailto:strunk@example.org -ATTENDEE;CN=One;CUTYPE=INDIVIDUAL;EMAIL=one@example.org;PARTSTAT=ACCEPTED;R - OLE=REQ-PARTICIPANT;SCHEDULE-STATUS=1.2:mailto:one@example.org -DTSTART:20141211T160000Z -DTEND:20141211T170000Z -RRULE:FREQ=WEEKLY -EXDATE:20150101T160000Z -EXDATE:20150108T160000Z,20141225T160000Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - - $expected = [ - [ - 'uid' => 'foobar', - 'method' => 'REQUEST', - 'component' => 'VEVENT', - 'sender' => 'mailto:strunk@example.org', - 'senderName' => 'Strunk', - 'recipient' => 'mailto:one@example.org', - 'recipientName' => 'One', - 'significantChange' => false, - 'message' => <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VEVENT -UID:foobar -SEQUENCE:1 -ORGANIZER;CN=Strunk:mailto:strunk@example.org -ATTENDEE;CN=Strunk;CUTYPE=INDIVIDUAL;EMAIL=strunk@example.org;PARTSTAT=ACCE - PTED:mailto:strunk@example.org -ATTENDEE;CN=One;CUTYPE=INDIVIDUAL;EMAIL=one@example.org;PARTSTAT=ACCEPTED;R - OLE=REQ-PARTICIPANT:mailto:one@example.org -DTSTART:20141211T160000Z -DTEND:20141211T170000Z -RRULE:FREQ=WEEKLY -EXDATE:20150101T160000Z -EXDATE:20150108T160000Z,20141225T160000Z -END:VEVENT -END:VCALENDAR -ICS - - ], - ]; - - $this->parse($oldMessage, $newMessage, $expected, 'mailto:strunk@example.org'); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/EvolutionTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/EvolutionTest.php deleted file mode 100644 index 3afe560d508..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/EvolutionTest.php +++ /dev/null @@ -1,2653 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class EvolutionTest extends BrokerTester { - - /** - * Evolution does things as usual a little bit differently. - * - * We're adding a seprate test just for it. - */ - function testNewEvolutionEvent() { - - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -CALSCALE:GREGORIAN -PRODID:-//Ximian//NONSGML Evolution Calendar//EN -BEGIN:VTIMEZONE -TZID:/freeassociation.sourceforge.net/Tzfile/America/Toronto -X-LIC-LOCATION:America/Toronto -BEGIN:STANDARD -TZNAME:EST -DTSTART:19691026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19700426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19701025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19710425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19711031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19720430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19721029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19730429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19731028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19740428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19741027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19750427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19751026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19760425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19761031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19770424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19771030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19780430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19781029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19790429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19791028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19800427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19801026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19810426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19811025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19820425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19821031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19830424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19831030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19840429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19841028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19850428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19851027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19860427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19861026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19870405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19871025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19880403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19881030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19890402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19891029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19900401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19901028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19910407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19911027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19920405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19921025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19930404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19931031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19940403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19941030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19950402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19951029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19960407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19961027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19970406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19971026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19980405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19991031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20000402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20001029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20010401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20011028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20020407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20021027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20030406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20031026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20040404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20041031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20050403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20051030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20060402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20061029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20070311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20071104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20080309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20081102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20090308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20091101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20100314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20101107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20110313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20111106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20120311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20121104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20130310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20131103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20140309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20141102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20150308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20151101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20160313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20161106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20170312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20171105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20180311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20181104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20190310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20191103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20200308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20201101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20210314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20211107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20220313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20221106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20230312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20231105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20240310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20241103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20250309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20251102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20260308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20261101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20270314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20271107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20280312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20281105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20290311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20291104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20300310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20301103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20310309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20311102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20320314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20321107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20330313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20331106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20340312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20341105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20350311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20351104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20360309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20361102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20370308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20371101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -UID:20140813T153116Z-12176-1000-1065-6@johnny-lubuntu -DTSTAMP:20140813T142829Z -DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:201408 - 15T110000 -DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:20140815 - T113000 -TRANSP:OPAQUE -SEQUENCE:2 -SUMMARY:Evo makes a Meeting (fruux HQ) (fruux HQ) -LOCATION:fruux HQ -CLASS:PUBLIC -ORGANIZER;SENT-BY="MAILTO:martin+johnny@fruux.com":MAILTO:martin@fruux.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE - ;SENT-BY="MAILTO:martin+johnny@fruux.com";LANGUAGE=en:MAILTO:martin@fruux. - com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= - TRUE;LANGUAGE=en:MAILTO:dominik@fruux.com -CREATED:20140813T153211Z -LAST-MODIFIED:20140813T155353Z -END:VEVENT -END:VCALENDAR -ICS; - - $version = \Sabre\VObject\Version::VERSION; - $expectedICS = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -METHOD:REQUEST -BEGIN:VTIMEZONE -TZID:/freeassociation.sourceforge.net/Tzfile/America/Toronto -X-LIC-LOCATION:America/Toronto -BEGIN:STANDARD -TZNAME:EST -DTSTART:19691026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19700426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19701025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19710425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19711031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19720430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19721029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19730429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19731028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19740428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19741027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19750427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19751026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19760425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19761031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19770424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19771030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19780430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19781029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19790429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19791028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19800427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19801026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19810426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19811025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19820425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19821031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19830424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19831030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19840429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19841028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19850428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19851027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19860427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19861026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19870405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19871025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19880403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19881030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19890402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19891029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19900401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19901028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19910407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19911027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19920405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19921025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19930404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19931031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19940403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19941030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19950402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19951029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19960407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19961027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19970406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19971026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19980405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19991031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20000402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20001029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20010401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20011028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20020407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20021027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20030406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20031026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20040404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20041031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20050403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20051030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20060402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20061029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20070311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20071104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20080309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20081102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20090308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20091101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20100314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20101107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20110313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20111106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20120311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20121104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20130310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20131103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20140309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20141102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20150308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20151101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20160313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20161106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20170312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20171105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20180311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20181104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20190310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20191103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20200308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20201101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20210314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20211107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20220313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20221106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20230312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20231105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20240310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20241103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20250309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20251102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20260308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20261101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20270314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20271107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20280312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20281105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20290311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20291104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20300310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20301103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20310309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20311102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20320314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20321107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20330313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20331106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20340312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20341105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20350311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20351104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20360309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20361102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20370308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20371101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -UID:20140813T153116Z-12176-1000-1065-6@johnny-lubuntu -DTSTAMP:20140813T142829Z -DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:201408 - 15T110000 -DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:20140815 - T113000 -TRANSP:OPAQUE -SEQUENCE:2 -SUMMARY:Evo makes a Meeting (fruux HQ) (fruux HQ) -LOCATION:fruux HQ -CLASS:PUBLIC -ORGANIZER;SENT-BY="MAILTO:martin+johnny@fruux.com":MAILTO:martin@fruux.com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE - ;SENT-BY="MAILTO:martin+johnny@fruux.com";LANGUAGE=en:MAILTO:martin@fruux. - com -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP= - TRUE;LANGUAGE=en:MAILTO:dominik@fruux.com -CREATED:20140813T153211Z -LAST-MODIFIED:20140813T155353Z -END:VEVENT -END:VCALENDAR -ICS; - - $expected = [ - [ - 'uid' => '20140813T153116Z-12176-1000-1065-6@johnny-lubuntu', - 'method' => 'REQUEST', - 'sender' => 'mailto:martin@fruux.com', - 'senderName' => null, - 'recipient' => 'mailto:dominik@fruux.com', - 'recipientName' => null, - 'message' => $expectedICS, - ] - ]; - $this->parse(null, $ics, $expected, 'mailto:martin@fruux.com'); - - } - - /** - * This is an event originally from evolution, then parsed by sabredav and - * again mangled by iCal. This triggered a few bugs related to email - * address scheme casing. - */ - function testAttendeeModify() { - - $old = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject 3.3.1//EN -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:/freeassociation.sourceforge.net/Tzfile/America/Toronto -X-LIC-LOCATION:America/Toronto -BEGIN:STANDARD -TZNAME:EST -DTSTART:19691026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19700426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19701025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19710425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19711031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19720430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19721029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19730429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19731028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19740428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19741027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19750427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19751026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19760425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19761031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19770424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19771030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19780430T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19781029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19790429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19791028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19800427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19801026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19810426T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19811025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19820425T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19821031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19830424T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19831030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19840429T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19841028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19850428T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19851027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19860427T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19861026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19870405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19871025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19880403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19881030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19890402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19891029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19900401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19901028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19910407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19911027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19920405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19921025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19930404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19931031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19940403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19941030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19950402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19951029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19960407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19961027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19970406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19971026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19980405T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19991031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20000402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20001029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20010401T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20011028T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20020407T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20021027T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20030406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20031026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20040404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20041031T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20050403T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20051030T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20060402T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20061029T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20070311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20071104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20080309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20081102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20090308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20091101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20100314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20101107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20110313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20111106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20120311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20121104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20130310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20131103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20140309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20141102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20150308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20151101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20160313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20161106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20170312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20171105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20180311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20181104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20190310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20191103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20200308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20201101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20210314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20211107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20220313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20221106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20230312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20231105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20240310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20241103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20250309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20251102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20260308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20261101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20270314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20271107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20280312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20281105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20290311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20291104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20300310T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20301103T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20310309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20311102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20320314T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20321107T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20330313T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20331106T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20340312T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20341105T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20350311T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20351104T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20360309T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20361102T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:20370308T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZNAME:EST -DTSTART:20371101T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -UID:20140813T212317Z-6646-1000-1221-23@evert-ubuntu -DTSTAMP:20140813T212221Z -DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:201408 - 13T180000 -DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/America/Toronto:20140813 - T200000 -TRANSP:OPAQUE -SEQUENCE:4 -SUMMARY:Testing evolution -LOCATION:Online -CLASS:PUBLIC -ORGANIZER:MAILTO:o@example.org -CREATED:20140813T212510Z -LAST-MODIFIED:20140813T212541Z -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE;LANGUAGE=en:MAILTO:o@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;LANGUAGE=en:MAILTO:a1@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;LANGUAGE=en:MAILTO:a2@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;LANGUAGE=en:MAILTO:a3@example.org -STATUS:CANCELLED -END:VEVENT -END:VCALENDAR -ICS; - - $new = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.9.4//EN -CALSCALE:GREGORIAN -BEGIN:VTIMEZONE -TZID:America/Toronto -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -DTSTART:20070311T020000 -TZNAME:EDT -TZOFFSETTO:-0400 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0400 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -DTSTART:20071104T020000 -TZNAME:EST -TZOFFSETTO:-0500 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -TRANSP:OPAQUE -DTEND;TZID=America/Toronto:20140813T200000 -ORGANIZER:MAILTO:o@example.org -UID:20140813T212317Z-6646-1000-1221-23@evert-ubuntu -DTSTAMP:20140813T212221Z -LOCATION:Online -STATUS:CANCELLED -SEQUENCE:4 -CLASS:PUBLIC -SUMMARY:Testing evolution -LAST-MODIFIED:20140813T212541Z -DTSTART;TZID=America/Toronto:20140813T180000 -CREATED:20140813T212510Z -ATTENDEE;CUTYPE=INDIVIDUAL;LANGUAGE=en;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:a2@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;LANGUAGE=en;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:o@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;LANGUAGE=en;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:a1@example.org -ATTENDEE;CUTYPE=INDIVIDUAL;LANGUAGE=en;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:a3@example.org -END:VEVENT -END:VCALENDAR -ICS; - - $this->parse($old, $new, [], 'mailto:a1@example.org'); - - - } - - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/MessageTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/MessageTest.php deleted file mode 100644 index 0fed7eb4a76..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ITip/MessageTest.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace Sabre\VObject\ITip; - -class MessageTest extends \PHPUnit_Framework_TestCase { - - function testNoScheduleStatus() { - - $message = new Message(); - $this->assertFalse($message->getScheduleStatus()); - - } - - function testScheduleStatus() { - - $message = new Message(); - $message->scheduleStatus = '1.2;Delivered'; - - $this->assertEquals('1.2', $message->getScheduleStatus()); - - } - - function testUnexpectedScheduleStatus() { - - $message = new Message(); - $message->scheduleStatus = '9.9.9'; - - $this->assertEquals('9.9.9', $message->getScheduleStatus()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue153Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue153Test.php deleted file mode 100644 index fca07fe9f39..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue153Test.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class Issue153Test extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $obj = Reader::read(file_get_contents(dirname(__FILE__) . '/issue153.vcf')); - $this->assertEquals('Test Benutzer', (string)$obj->FN); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue259Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue259Test.php deleted file mode 100644 index 4a73be560c2..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue259Test.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class Issue259Test extends \PHPUnit_Framework_TestCase { - - function testParsingJcalWithUntil() { - $jcalWithUntil = '["vcalendar",[],[["vevent",[["uid",{},"text","dd1f7d29"],["organizer",{"cn":"robert"},"cal-address","mailto:robert@robert.com"],["dtstart",{"tzid":"Europe/Berlin"},"date-time","2015-10-21T12:00:00"],["dtend",{"tzid":"Europe/Berlin"},"date-time","2015-10-21T13:00:00"],["transp",{},"text","OPAQUE"],["rrule",{},"recur",{"freq":"MONTHLY","until":"2016-01-01T22:00:00Z"}]],[]]]]'; - $parser = new Parser\Json(); - $parser->setInput($jcalWithUntil); - - $vcalendar = $parser->parse(); - $eventAsArray = $vcalendar->select('VEVENT'); - $event = reset($eventAsArray); - $rruleAsArray = $event->select('RRULE'); - $rrule = reset($rruleAsArray); - $this->assertNotNull($rrule); - $this->assertEquals($rrule->getValue(), 'FREQ=MONTHLY;UNTIL=20160101T220000Z'); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue36WorkAroundTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue36WorkAroundTest.php deleted file mode 100644 index e2b9caf1d9f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue36WorkAroundTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class Issue36WorkAroundTest extends \PHPUnit_Framework_TestCase { - - function testWorkaround() { - - // See https://github.com/fruux/sabre-vobject/issues/36 - $event = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -SUMMARY:Titel -SEQUENCE:1 -TRANSP:TRANSPARENT -RRULE:FREQ=YEARLY -LAST-MODIFIED:20130323T225737Z -DTSTAMP:20130323T225737Z -UID:1833bd44-188b-405c-9f85-1a12105318aa -CATEGORIES:Jubiläum -X-MOZ-GENERATION:3 -RECURRENCE-ID;RANGE=THISANDFUTURE;VALUE=DATE:20131013 -DTSTART;VALUE=DATE:20131013 -CREATED:20100721T121914Z -DURATION:P1D -END:VEVENT -END:VCALENDAR -ICS; - - $obj = Reader::read($event); - - // If this does not throw an exception, it's all good. - $it = new Recur\EventIterator($obj, '1833bd44-188b-405c-9f85-1a12105318aa'); - $this->assertInstanceOf('Sabre\\VObject\\Recur\\EventIterator', $it); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue40Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue40Test.php deleted file mode 100644 index 401cc19a05a..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue40Test.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * This test is created to handle the issues brought forward by issue 40. - * - * https://github.com/fruux/sabre-vobject/issues/40 - */ -class Issue40Test extends \PHPUnit_Framework_TestCase { - - function testEncode() { - - $card = new Component\VCard(); - $card->add('N', ['van der Harten', ['Rene', 'J.'], "", 'Sir', 'R.D.O.N.'], ['SORT-AS' => ['Harten', 'Rene']]); - - unset($card->UID); - - $expected = implode("\r\n", [ - "BEGIN:VCARD", - "VERSION:4.0", - "PRODID:-//Sabre//Sabre VObject " . Version::VERSION . '//EN', - "N;SORT-AS=Harten,Rene:van der Harten;Rene,J.;;Sir;R.D.O.N.", - "END:VCARD", - "" - ]); - - $this->assertEquals($expected, $card->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue64Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue64Test.php deleted file mode 100644 index 986a2481361..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue64Test.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class Issue64Test extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $vcard = Reader::read(file_get_contents(dirname(__FILE__) . '/issue64.vcf')); - $vcard = $vcard->convert(\Sabre\VObject\Document::VCARD30); - $vcard = $vcard->serialize(); - - $converted = Reader::read($vcard); - - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $converted); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue96Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue96Test.php deleted file mode 100644 index f0ed54804f1..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Issue96Test.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class Issue96Test extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $input = <<<VCF -BEGIN:VCARD -VERSION:2.1 -SOURCE:Yahoo Contacts (http://contacts.yahoo.com) -URL;CHARSET=utf-8;ENCODING=QUOTED-PRINTABLE:= -http://www.example.org -END:VCARD -VCF; - - $vcard = Reader::read($input, Reader::OPTION_FORGIVING); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); - $this->assertEquals("http://www.example.org", $vcard->URL->getValue()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/IssueUndefinedIndexTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/IssueUndefinedIndexTest.php deleted file mode 100644 index 6f8afe60cd7..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/IssueUndefinedIndexTest.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class IssueUndefinedIndexTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testRead() { - - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -N:Holmes;Sherlock;;; -FN:Sherlock Holmes -ORG:Acme Inc; -ADR;type=WORK;type=pref:;;, -\\n221B,Baker Street;London;;12345;United Kingdom -UID:foo -END:VCARD -VCF; - - $vcard = Reader::read($input, Reader::OPTION_FORGIVING); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCalTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCalTest.php deleted file mode 100644 index 8c437162dde..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCalTest.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class JCalTest extends \PHPUnit_Framework_TestCase { - - function testToJCal() { - - $cal = new Component\VCalendar(); - - $event = $cal->add('VEVENT', [ - "UID" => "foo", - "DTSTART" => new \DateTime("2013-05-26 18:10:00Z"), - "DURATION" => "P1D", - "CATEGORIES" => ['home', 'testing'], - "CREATED" => new \DateTime("2013-05-26 18:10:00Z"), - - "ATTENDEE" => "mailto:armin@example.org", - "GEO" => [51.96668, 7.61876], - "SEQUENCE" => 5, - "FREEBUSY" => ["20130526T210213Z/PT1H", "20130626T120000Z/20130626T130000Z"], - "URL" => "http://example.org/", - "TZOFFSETFROM" => "+0500", - "RRULE" => ['FREQ' => 'WEEKLY', 'BYDAY' => ['MO', 'TU']], - ], false); - - // Modifying DTSTART to be a date-only. - $event->dtstart['VALUE'] = 'DATE'; - $event->add("X-BOOL", true, ['VALUE' => 'BOOLEAN']); - $event->add("X-TIME", "08:00:00", ['VALUE' => 'TIME']); - $event->add("ATTACH", "attachment", ['VALUE' => 'BINARY']); - $event->add("ATTENDEE", "mailto:dominik@example.org", ["CN" => "Dominik", "PARTSTAT" => "DECLINED"]); - - $event->add('REQUEST-STATUS', ["2.0", "Success"]); - $event->add('REQUEST-STATUS', ["3.7", "Invalid Calendar User", "ATTENDEE:mailto:jsmith@example.org"]); - - $event->add('DTEND', '20150108T133000'); - - $expected = [ - "vcalendar", - [ - [ - "version", - new \StdClass(), - "text", - "2.0" - ], - [ - "prodid", - new \StdClass(), - "text", - "-//Sabre//Sabre VObject " . Version::VERSION . "//EN", - ], - [ - "calscale", - new \StdClass(), - "text", - "GREGORIAN" - ], - ], - [ - ["vevent", - [ - [ - "uid", new \StdClass(), "text", "foo", - ], - [ - "dtstart", new \StdClass(), "date", "2013-05-26", - ], - [ - "duration", new \StdClass(), "duration", "P1D", - ], - [ - "categories", new \StdClass(), "text", "home", "testing", - ], - [ - "created", new \StdClass(), "date-time", "2013-05-26T18:10:00Z", - ], - [ - "attendee", new \StdClass(), "cal-address", "mailto:armin@example.org", - ], - [ - "attendee", - (object)[ - "cn" => "Dominik", - "partstat" => "DECLINED", - ], - "cal-address", - "mailto:dominik@example.org" - ], - [ - "geo", new \StdClass(), "float", [51.96668, 7.61876], - ], - [ - "sequence", new \StdClass(), "integer", 5 - ], - [ - "freebusy", new \StdClass(), "period", ["2013-05-26T21:02:13", "PT1H"], ["2013-06-26T12:00:00", "2013-06-26T13:00:00"], - ], - [ - "url", new \StdClass(), "uri", "http://example.org/", - ], - [ - "tzoffsetfrom", new \StdClass(), "utc-offset", "+05:00", - ], - [ - "rrule", new \StdClass(), "recur", [ - 'freq' => 'WEEKLY', - 'byday' => ['MO', 'TU'], - ], - ], - [ - "x-bool", new \StdClass(), "boolean", true - ], - [ - "x-time", new \StdClass(), "time", "08:00:00", - ], - [ - "attach", new \StdClass(), "binary", base64_encode('attachment') - ], - [ - "request-status", - new \StdClass(), - "text", - ["2.0", "Success"], - ], - [ - "request-status", - new \StdClass(), - "text", - ["3.7", "Invalid Calendar User", "ATTENDEE:mailto:jsmith@example.org"], - ], - [ - 'dtend', - new \StdClass(), - "date-time", - "2015-01-08T13:30:00", - ], - ], - [], - ] - ], - ]; - - $this->assertEquals($expected, $cal->jsonSerialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCardTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCardTest.php deleted file mode 100644 index 87ff2fff885..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/JCardTest.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class JCardTest extends \PHPUnit_Framework_TestCase { - - function testToJCard() { - - $card = new Component\VCard([ - "VERSION" => "4.0", - "UID" => "foo", - "BDAY" => "19850407", - "REV" => "19951031T222710Z", - "LANG" => "nl", - "N" => ["Last", "First", "Middle", "", ""], - "item1.TEL" => "+1 555 123456", - "item1.X-AB-LABEL" => "Walkie Talkie", - "ADR" => [ - "", - "", - ["My Street", "Left Side", "Second Shack"], - "Hometown", - "PA", - "18252", - "U.S.A", - ], - ]); - - $card->add('BDAY', '1979-12-25', ['VALUE' => 'DATE', 'X-PARAM' => [1, 2]]); - $card->add('BDAY', '1979-12-25T02:00:00', ['VALUE' => 'DATE-TIME']); - - - $card->add('X-TRUNCATED', '--1225', ['VALUE' => 'DATE']); - $card->add('X-TIME-LOCAL', '123000', ['VALUE' => 'TIME']); - $card->add('X-TIME-UTC', '12:30:00Z', ['VALUE' => 'TIME']); - $card->add('X-TIME-OFFSET', '12:30:00-08:00', ['VALUE' => 'TIME']); - $card->add('X-TIME-REDUCED', '23', ['VALUE' => 'TIME']); - $card->add('X-TIME-TRUNCATED', '--30', ['VALUE' => 'TIME']); - - $card->add('X-KARMA-POINTS', '42', ['VALUE' => 'INTEGER']); - $card->add('X-GRADE', '1.3', ['VALUE' => 'FLOAT']); - - $card->add('TZ', '-0500', ['VALUE' => 'UTC-OFFSET']); - - $expected = [ - "vcard", - [ - [ - "version", - new \StdClass(), - "text", - "4.0" - ], - [ - "prodid", - new \StdClass(), - "text", - "-//Sabre//Sabre VObject " . Version::VERSION . "//EN", - ], - [ - "uid", - new \StdClass(), - "text", - "foo", - ], - [ - "bday", - new \StdClass(), - "date-and-or-time", - "1985-04-07", - ], - [ - "bday", - (object)[ - 'x-param' => [1,2], - ], - "date", - "1979-12-25", - ], - [ - "bday", - new \StdClass(), - "date-time", - "1979-12-25T02:00:00", - ], - [ - "rev", - new \StdClass(), - "timestamp", - "1995-10-31T22:27:10Z", - ], - [ - "lang", - new \StdClass(), - "language-tag", - "nl", - ], - [ - "n", - new \StdClass(), - "text", - ["Last", "First", "Middle", "", ""], - ], - [ - "tel", - (object)[ - "group" => "item1", - ], - "text", - "+1 555 123456", - ], - [ - "x-ab-label", - (object)[ - "group" => "item1", - ], - "unknown", - "Walkie Talkie", - ], - [ - "adr", - new \StdClass(), - "text", - [ - "", - "", - ["My Street", "Left Side", "Second Shack"], - "Hometown", - "PA", - "18252", - "U.S.A", - ], - ], - [ - "x-truncated", - new \StdClass(), - "date", - "--12-25", - ], - [ - "x-time-local", - new \StdClass(), - "time", - "12:30:00" - ], - [ - "x-time-utc", - new \StdClass(), - "time", - "12:30:00Z" - ], - [ - "x-time-offset", - new \StdClass(), - "time", - "12:30:00-08:00" - ], - [ - "x-time-reduced", - new \StdClass(), - "time", - "23" - ], - [ - "x-time-truncated", - new \StdClass(), - "time", - "--30" - ], - [ - "x-karma-points", - new \StdClass(), - "integer", - 42 - ], - [ - "x-grade", - new \StdClass(), - "float", - 1.3 - ], - [ - "tz", - new \StdClass(), - "utc-offset", - "-05:00", - ], - ], - ]; - - $this->assertEquals($expected, $card->jsonSerialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/LineFoldingIssueTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/LineFoldingIssueTest.php deleted file mode 100644 index 47fef1c11e7..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/LineFoldingIssueTest.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class LineFoldingIssueTest extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $event = <<<ICS -BEGIN:VCALENDAR\r -BEGIN:VEVENT\r -DESCRIPTION:TEST\\n\\n \\n\\nTEST\\n\\n \\n\\nTEST\\n\\n \\n\\nTEST\\n\\nTEST\\nTEST, TEST\r -END:VEVENT\r -END:VCALENDAR\r - -ICS; - - $obj = Reader::read($event); - $this->assertEquals($event, $obj->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ParameterTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ParameterTest.php deleted file mode 100644 index e4f973115fb..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ParameterTest.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class ParameterTest extends \PHPUnit_Framework_TestCase { - - function testSetup() { - - $cal = new Component\VCalendar(); - - $param = new Parameter($cal, 'name', 'value'); - $this->assertEquals('NAME', $param->name); - $this->assertEquals('value', $param->getValue()); - - } - - function testSetupNameLess() { - - $card = new Component\VCard(); - - $param = new Parameter($card, null, 'URL'); - $this->assertEquals('VALUE', $param->name); - $this->assertEquals('URL', $param->getValue()); - $this->assertTrue($param->noName); - - } - - function testModify() { - - $cal = new Component\VCalendar(); - - $param = new Parameter($cal, 'name', null); - $param->addValue(1); - $this->assertEquals([1], $param->getParts()); - - $param->setParts([1, 2]); - $this->assertEquals([1, 2], $param->getParts()); - - $param->addValue(3); - $this->assertEquals([1, 2, 3], $param->getParts()); - - $param->setValue(4); - $param->addValue(5); - $this->assertEquals([4, 5], $param->getParts()); - - } - - function testCastToString() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', 'value'); - $this->assertEquals('value', $param->__toString()); - $this->assertEquals('value', (string)$param); - - } - - function testCastNullToString() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', null); - $this->assertEquals('', $param->__toString()); - $this->assertEquals('', (string)$param); - - } - - function testSerialize() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', 'value'); - $this->assertEquals('NAME=value', $param->serialize()); - - } - - function testSerializeEmpty() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', null); - $this->assertEquals('NAME=', $param->serialize()); - - } - - function testSerializeComplex() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', ["val1", "val2;", "val3^", "val4\n", "val5\""]); - $this->assertEquals('NAME=val1,"val2;","val3^^","val4^n","val5^\'"', $param->serialize()); - - } - - /** - * iCal 7.0 (OSX 10.9) has major issues with the EMAIL property, when the - * value contains a plus sign, and it's not quoted. - * - * So we specifically added support for that. - */ - function testSerializePlusSign() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'EMAIL', "user+something@example.org"); - $this->assertEquals('EMAIL="user+something@example.org"', $param->serialize()); - - } - - function testIterate() { - - $cal = new Component\VCalendar(); - - $param = new Parameter($cal, 'name', [1, 2, 3, 4]); - $result = []; - - foreach ($param as $value) { - $result[] = $value; - } - - $this->assertEquals([1, 2, 3, 4], $result); - - } - - function testSerializeColon() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', 'va:lue'); - $this->assertEquals('NAME="va:lue"', $param->serialize()); - - } - - function testSerializeSemiColon() { - - $cal = new Component\VCalendar(); - $param = new Parameter($cal, 'name', 'va;lue'); - $this->assertEquals('NAME="va;lue"', $param->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/JsonTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/JsonTest.php deleted file mode 100644 index c8725dfd06a..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/JsonTest.php +++ /dev/null @@ -1,395 +0,0 @@ -<?php - -namespace Sabre\VObject\Parser; - -use - Sabre\VObject; - -class JsonTest extends \PHPUnit_Framework_TestCase { - - function testRoundTripJCard() { - - $input = [ - "vcard", - [ - [ - "version", - new \StdClass(), - "text", - "4.0" - ], - [ - "prodid", - new \StdClass(), - "text", - "-//Sabre//Sabre VObject " . VObject\Version::VERSION . "//EN", - ], - [ - "uid", - new \StdClass(), - "text", - "foo", - ], - [ - "bday", - new \StdClass(), - "date-and-or-time", - "1985-04-07", - ], - [ - "bday", - (object)[ - 'x-param' => [1,2], - ], - "date", - "1979-12-25", - ], - [ - "bday", - new \StdClass(), - "date-time", - "1979-12-25T02:00:00", - ], - [ - "rev", - new \StdClass(), - "timestamp", - "1995-10-31T22:27:10Z", - ], - [ - "lang", - new \StdClass(), - "language-tag", - "nl", - ], - [ - "n", - new \StdClass(), - "text", - ["Last", "First", "Middle", "", ""], - ], - [ - "tel", - (object)[ - "group" => "item1", - ], - "text", - "+1 555 123456", - ], - [ - "x-ab-label", - (object)[ - "group" => "item1", - ], - "unknown", - "Walkie Talkie", - ], - [ - "adr", - new \StdClass(), - "text", - [ - "", - "", - ["My Street", "Left Side", "Second Shack"], - "Hometown", - "PA", - "18252", - "U.S.A", - ], - ], - - [ - "x-truncated", - new \StdClass(), - "date", - "--12-25", - ], - [ - "x-time-local", - new \StdClass(), - "time", - "12:30:00" - ], - [ - "x-time-utc", - new \StdClass(), - "time", - "12:30:00Z" - ], - [ - "x-time-offset", - new \StdClass(), - "time", - "12:30:00-08:00" - ], - [ - "x-time-reduced", - new \StdClass(), - "time", - "23" - ], - [ - "x-time-truncated", - new \StdClass(), - "time", - "--30" - ], - [ - "x-karma-points", - new \StdClass(), - "integer", - 42 - ], - [ - "x-grade", - new \StdClass(), - "float", - 1.3 - ], - [ - "tz", - new \StdClass(), - "utc-offset", - "-05:00", - ], - ], - ]; - - $parser = new Json(json_encode($input)); - $vobj = $parser->parse(); - - $version = VObject\Version::VERSION; - - $result = $vobj->serialize(); - $expected = <<<VCF -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject $version//EN -UID:foo -BDAY:1985-04-07 -BDAY;X-PARAM=1,2;VALUE=DATE:1979-12-25 -BDAY;VALUE=DATE-TIME:1979-12-25T02:00:00 -REV:1995-10-31T22:27:10Z -LANG:nl -N:Last;First;Middle;; -item1.TEL:+1 555 123456 -item1.X-AB-LABEL:Walkie Talkie -ADR:;;My Street,Left Side,Second Shack;Hometown;PA;18252;U.S.A -X-TRUNCATED;VALUE=DATE:--12-25 -X-TIME-LOCAL;VALUE=TIME:123000 -X-TIME-UTC;VALUE=TIME:123000Z -X-TIME-OFFSET;VALUE=TIME:123000-0800 -X-TIME-REDUCED;VALUE=TIME:23 -X-TIME-TRUNCATED;VALUE=TIME:--30 -X-KARMA-POINTS;VALUE=INTEGER:42 -X-GRADE;VALUE=FLOAT:1.3 -TZ;VALUE=UTC-OFFSET:-0500 -END:VCARD - -VCF; - $this->assertEquals($expected, str_replace("\r", "", $result)); - - $this->assertEquals( - $input, - $vobj->jsonSerialize() - ); - - } - - function testRoundTripJCal() { - - $input = [ - "vcalendar", - [ - [ - "version", - new \StdClass(), - "text", - "2.0" - ], - [ - "prodid", - new \StdClass(), - "text", - "-//Sabre//Sabre VObject " . VObject\Version::VERSION . "//EN", - ], - [ - "calscale", - new \StdClass(), - "text", - "GREGORIAN" - ], - ], - [ - ["vevent", - [ - [ - "uid", new \StdClass(), "text", "foo", - ], - [ - "dtstart", new \StdClass(), "date", "2013-05-26", - ], - [ - "duration", new \StdClass(), "duration", "P1D", - ], - [ - "categories", new \StdClass(), "text", "home", "testing", - ], - [ - "created", new \StdClass(), "date-time", "2013-05-26T18:10:00Z", - ], - [ - "attach", new \StdClass(), "binary", base64_encode('attachment') - ], - [ - "attendee", new \StdClass(), "cal-address", "mailto:armin@example.org", - ], - [ - "attendee", - (object)[ - "cn" => "Dominik", - "partstat" => "DECLINED", - ], - "cal-address", - "mailto:dominik@example.org" - ], - [ - "geo", new \StdClass(), "float", [51.96668, 7.61876], - ], - [ - "sequence", new \StdClass(), "integer", 5 - ], - [ - "freebusy", new \StdClass(), "period", ["2013-05-26T21:02:13", "PT1H"], ["2013-06-26T12:00:00", "2013-06-26T13:00:00"], - ], - [ - "url", new \StdClass(), "uri", "http://example.org/", - ], - [ - "tzoffsetfrom", new \StdClass(), "utc-offset", "+05:00", - ], - [ - "rrule", new \StdClass(), "recur", [ - 'freq' => 'WEEKLY', - 'byday' => ['MO', 'TU'], - ], - ], - [ - "x-bool", new \StdClass(), "boolean", true - ], - [ - "x-time", new \StdClass(), "time", "08:00:00", - ], - [ - "request-status", - new \StdClass(), - "text", - ["2.0", "Success"], - ], - [ - "request-status", - new \StdClass(), - "text", - ["3.7", "Invalid Calendar User", "ATTENDEE:mailto:jsmith@example.org"], - ], - ], - [ - ["valarm", - [ - [ - "action", new \StdClass(), "text", "DISPLAY", - ], - ], - [], - ], - ], - ] - ], - ]; - - $parser = new Json(json_encode($input)); - $vobj = $parser->parse(); - $result = $vobj->serialize(); - - $version = VObject\Version::VERSION; - - $expected = <<<VCF -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $version//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -UID:foo -DTSTART;VALUE=DATE:20130526 -DURATION:P1D -CATEGORIES:home,testing -CREATED:20130526T181000Z -ATTACH;VALUE=BINARY:YXR0YWNobWVudA== -ATTENDEE:mailto:armin@example.org -ATTENDEE;CN=Dominik;PARTSTAT=DECLINED:mailto:dominik@example.org -GEO:51.96668;7.61876 -SEQUENCE:5 -FREEBUSY:20130526T210213/PT1H,20130626T120000/20130626T130000 -URL;VALUE=URI:http://example.org/ -TZOFFSETFROM:+0500 -RRULE:FREQ=WEEKLY;BYDAY=MO,TU -X-BOOL;VALUE=BOOLEAN:TRUE -X-TIME;VALUE=TIME:080000 -REQUEST-STATUS:2.0;Success -REQUEST-STATUS:3.7;Invalid Calendar User;ATTENDEE:mailto:jsmith@example.org -BEGIN:VALARM -ACTION:DISPLAY -END:VALARM -END:VEVENT -END:VCALENDAR - -VCF; - $this->assertEquals($expected, str_replace("\r", "", $result)); - - $this->assertEquals( - $input, - $vobj->jsonSerialize() - ); - - } - - function testParseStreamArg() { - - $input = [ - "vcard", - [ - [ - "FN", new \StdClass(), 'text', "foo", - ], - ], - ]; - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, json_encode($input)); - rewind($stream); - - $result = VObject\Reader::readJson($stream, 0); - $this->assertEquals('foo', $result->FN->getValue()); - - } - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testParseInvalidData() { - - $json = new Json(); - $input = [ - "vlist", - [ - [ - "FN", new \StdClass(), 'text', "foo", - ], - ], - ]; - - $json->parse(json_encode($input), 0); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/MimeDirTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/MimeDirTest.php deleted file mode 100644 index 63219dac2b9..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/MimeDirTest.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -namespace Sabre\VObject\Parser; - -/** - * Note that most MimeDir related tests can actually be found in the ReaderTest - * class one level up. - */ -class MimeDirTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testParseError() { - - $mimeDir = new MimeDir(); - $mimeDir->parse(fopen(__FILE__, 'a')); - - } - - function testDecodeLatin1() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -FN:umlaut u - \xFC -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $mimeDir->setCharset('ISO-8859-1'); - $vcard = $mimeDir->parse($vcard); - $this->assertEquals("umlaut u - \xC3\xBC", $vcard->FN->getValue()); - - } - - function testDecodeInlineLatin1() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:2.1 -FN;CHARSET=ISO-8859-1:umlaut u - \xFC -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $vcard = $mimeDir->parse($vcard); - $this->assertEquals("umlaut u - \xC3\xBC", $vcard->FN->getValue()); - - } - - function testIgnoreCharsetVCard30() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -FN;CHARSET=unknown:foo-bar - \xFC -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $vcard = $mimeDir->parse($vcard); - $this->assertEquals("foo-bar - \xFC", $vcard->FN->getValue()); - - } - - function testDontDecodeLatin1() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -FN:umlaut u - \xFC -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $vcard = $mimeDir->parse($vcard); - // This basically tests that we don't touch the input string if - // the encoding was set to UTF-8. The result is actually invalid - // and the validator should report this, but it tests effectively - // that we pass through the string byte-by-byte. - $this->assertEquals("umlaut u - \xFC", $vcard->FN->getValue()); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testDecodeUnsupportedCharset() { - - $mimeDir = new MimeDir(); - $mimeDir->setCharset('foobar'); - - } - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testDecodeUnsupportedInlineCharset() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:2.1 -FN;CHARSET=foobar:nothing -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $mimeDir->parse($vcard); - - } - - function testDecodeWindows1252() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:3.0 -FN:Euro \x80 -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $mimeDir->setCharset('Windows-1252'); - $vcard = $mimeDir->parse($vcard); - $this->assertEquals("Euro \xE2\x82\xAC", $vcard->FN->getValue()); - - } - - function testDecodeWindows1252Inline() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:2.1 -FN;CHARSET=Windows-1252:Euro \x80 -END:VCARD\n -VCF; - - $mimeDir = new MimeDir(); - $vcard = $mimeDir->parse($vcard); - $this->assertEquals("Euro \xE2\x82\xAC", $vcard->FN->getValue()); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/QuotedPrintableTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/QuotedPrintableTest.php deleted file mode 100644 index f40d6a677f4..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/QuotedPrintableTest.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -namespace Sabre\VObject\Parser; - -use - Sabre\VObject\Reader; - -class QuotedPrintableTest extends \PHPUnit_Framework_TestCase { - - function testReadQuotedPrintableSimple() { - - $data = "BEGIN:VCARD\r\nLABEL;ENCODING=QUOTED-PRINTABLE:Aach=65n\r\nEND:VCARD"; - - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCARD', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertEquals("Aachen", $this->getPropertyValue($result->LABEL)); - - } - - function testReadQuotedPrintableNewlineSoft() { - - $data = "BEGIN:VCARD\r\nLABEL;ENCODING=QUOTED-PRINTABLE:Aa=\r\n ch=\r\n en\r\nEND:VCARD"; - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCARD', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertEquals("Aachen", $this->getPropertyValue($result->LABEL)); - - } - - function testReadQuotedPrintableNewlineHard() { - - $data = "BEGIN:VCARD\r\nLABEL;ENCODING=QUOTED-PRINTABLE:Aachen=0D=0A=\r\n Germany\r\nEND:VCARD"; - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCARD', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertEquals("Aachen\r\nGermany", $this->getPropertyValue($result->LABEL)); - - - } - - function testReadQuotedPrintableCompatibilityMS() { - - $data = "BEGIN:VCARD\r\nLABEL;ENCODING=QUOTED-PRINTABLE:Aachen=0D=0A=\r\nDeutschland:okay\r\nEND:VCARD"; - $result = Reader::read($data, Reader::OPTION_FORGIVING); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCARD', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertEquals("Aachen\r\nDeutschland:okay", $this->getPropertyValue($result->LABEL)); - - } - - function testReadQuotesPrintableCompoundValues() { - - $data = <<<VCF -BEGIN:VCARD -VERSION:2.1 -N:Doe;John;;; -FN:John Doe -ADR;WORK;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;M=C3=BCnster = -Str. 1;M=C3=BCnster;;48143;Deutschland -END:VCARD -VCF; - - $result = Reader::read($data, Reader::OPTION_FORGIVING); - $this->assertEquals([ - '', '', 'Münster Str. 1', 'Münster', '', '48143', 'Deutschland' - ], $result->ADR->getParts()); - - - } - - private function getPropertyValue(\Sabre\VObject\Property $property) { - - return (string)$property; - - /* - $param = $property['encoding']; - if ($param !== null) { - $encoding = strtoupper((string)$param); - if ($encoding === 'QUOTED-PRINTABLE') { - $value = quoted_printable_decode($value); - } else { - throw new Exception(); - } - } - - $param = $property['charset']; - if ($param !== null) { - $charset = strtoupper((string)$param); - if ($charset !== 'UTF-8') { - $value = mb_convert_encoding($value, 'UTF-8', $charset); - } - } else { - $value = StringUtil::convertToUTF8($value); - } - - return $value; - */ - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/XmlTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/XmlTest.php deleted file mode 100644 index b8ba67d1719..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Parser/XmlTest.php +++ /dev/null @@ -1,2893 +0,0 @@ -<?php - -namespace Sabre\VObject\Parser; - -use Sabre\VObject; - -class XmlTest extends \PHPUnit_Framework_TestCase { - - use VObject\PHPUnitAssertions; - - function testRFC6321Example1() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <calscale> - <text>GREGORIAN</text> - </calscale> - <prodid> - <text>-//Example Inc.//Example Calendar//EN</text> - </prodid> - <version> - <text>2.0</text> - </version> - </properties> - <components> - <vevent> - <properties> - <dtstamp> - <date-time>2008-02-05T19:12:24Z</date-time> - </dtstamp> - <dtstart> - <date>2008-10-06</date> - </dtstart> - <summary> - <text>Planning meeting</text> - </summary> - <uid> - <text>4088E990AD89CB3DBB484909</text> - </uid> - </properties> - </vevent> - </components> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - // VERSION comes first because this is required by vCard 4.0. - 'VERSION:2.0' . "\n" . - 'CALSCALE:GREGORIAN' . "\n" . - 'PRODID:-//Example Inc.//Example Calendar//EN' . "\n" . - 'BEGIN:VEVENT' . "\n" . - 'DTSTAMP:20080205T191224Z' . "\n" . - 'DTSTART;VALUE=DATE:20081006' . "\n" . - 'SUMMARY:Planning meeting' . "\n" . - 'UID:4088E990AD89CB3DBB484909' . "\n" . - 'END:VEVENT' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - function testRFC6321Example2() { - - $xml = <<<XML -<?xml version="1.0" encoding="UTF-8" ?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <prodid> - <text>-//Example Inc.//Example Client//EN</text> - </prodid> - <version> - <text>2.0</text> - </version> - </properties> - <components> - <vtimezone> - <properties> - <last-modified> - <date-time>2004-01-10T03:28:45Z</date-time> - </last-modified> - <tzid><text>US/Eastern</text></tzid> - </properties> - <components> - <daylight> - <properties> - <dtstart> - <date-time>2000-04-04T02:00:00</date-time> - </dtstart> - <rrule> - <recur> - <freq>YEARLY</freq> - <byday>1SU</byday> - <bymonth>4</bymonth> - </recur> - </rrule> - <tzname> - <text>EDT</text> - </tzname> - <tzoffsetfrom> - <utc-offset>-05:00</utc-offset> - </tzoffsetfrom> - <tzoffsetto> - <utc-offset>-04:00</utc-offset> - </tzoffsetto> - </properties> - </daylight> - <standard> - <properties> - <dtstart> - <date-time>2000-10-26T02:00:00</date-time> - </dtstart> - <rrule> - <recur> - <freq>YEARLY</freq> - <byday>-1SU</byday> - <bymonth>10</bymonth> - </recur> - </rrule> - <tzname> - <text>EST</text> - </tzname> - <tzoffsetfrom> - <utc-offset>-04:00</utc-offset> - </tzoffsetfrom> - <tzoffsetto> - <utc-offset>-05:00</utc-offset> - </tzoffsetto> - </properties> - </standard> - </components> - </vtimezone> - <vevent> - <properties> - <dtstamp> - <date-time>2006-02-06T00:11:21Z</date-time> - </dtstamp> - <dtstart> - <parameters> - <tzid><text>US/Eastern</text></tzid> - </parameters> - <date-time>2006-01-02T12:00:00</date-time> - </dtstart> - <duration> - <duration>PT1H</duration> - </duration> - <rrule> - <recur> - <freq>DAILY</freq> - <count>5</count> - </recur> - </rrule> - <rdate> - <parameters> - <tzid><text>US/Eastern</text></tzid> - </parameters> - <period> - <start>2006-01-02T15:00:00</start> - <duration>PT2H</duration> - </period> - </rdate> - <summary> - <text>Event #2</text> - </summary> - <description> - <text>We are having a meeting all this week at 12 -pm for one hour, with an additional meeting on the first day -2 hours long.&#x0a;Please bring your own lunch for the 12 pm -meetings.</text> - </description> - <uid> - <text>00959BC664CA650E933C892C@example.com</text> - </uid> - </properties> - </vevent> - <vevent> - <properties> - <dtstamp> - <date-time>2006-02-06T00:11:21Z</date-time> - </dtstamp> - <dtstart> - <parameters> - <tzid><text>US/Eastern</text></tzid> - </parameters> - <date-time>2006-01-04T14:00:00</date-time> - </dtstart> - <duration> - <duration>PT1H</duration> - </duration> - <recurrence-id> - <parameters> - <tzid><text>US/Eastern</text></tzid> - </parameters> - <date-time>2006-01-04T12:00:00</date-time> - </recurrence-id> - <summary> - <text>Event #2 bis</text> - </summary> - <uid> - <text>00959BC664CA650E933C892C@example.com</text> - </uid> - </properties> - </vevent> - </components> - </vcalendar> -</icalendar> -XML; - - $component = VObject\Reader::readXML($xml); - $this->assertVObjectEqualsVObject( - 'BEGIN:VCALENDAR' . "\n" . - 'VERSION:2.0' . "\n" . - 'PRODID:-//Example Inc.//Example Client//EN' . "\n" . - 'BEGIN:VTIMEZONE' . "\n" . - 'LAST-MODIFIED:20040110T032845Z' . "\n" . - 'TZID:US/Eastern' . "\n" . - 'BEGIN:DAYLIGHT' . "\n" . - 'DTSTART:20000404T020000' . "\n" . - 'RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4' . "\n" . - 'TZNAME:EDT' . "\n" . - 'TZOFFSETFROM:-0500' . "\n" . - 'TZOFFSETTO:-0400' . "\n" . - 'END:DAYLIGHT' . "\n" . - 'BEGIN:STANDARD' . "\n" . - 'DTSTART:20001026T020000' . "\n" . - 'RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10' . "\n" . - 'TZNAME:EST' . "\n" . - 'TZOFFSETFROM:-0400' . "\n" . - 'TZOFFSETTO:-0500' . "\n" . - 'END:STANDARD' . "\n" . - 'END:VTIMEZONE' . "\n" . - 'BEGIN:VEVENT' . "\n" . - 'DTSTAMP:20060206T001121Z' . "\n" . - 'DTSTART;TZID=US/Eastern:20060102T120000' . "\n" . - 'DURATION:PT1H' . "\n" . - 'RRULE:FREQ=DAILY;COUNT=5' . "\n" . - 'RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H' . "\n" . - 'SUMMARY:Event #2' . "\n" . - 'DESCRIPTION:We are having a meeting all this week at 12\npm for one hour\, ' . "\n" . - ' with an additional meeting on the first day\n2 hours long.\nPlease bring y' . "\n" . - ' our own lunch for the 12 pm\nmeetings.' . "\n" . - 'UID:00959BC664CA650E933C892C@example.com' . "\n" . - 'END:VEVENT' . "\n" . - 'BEGIN:VEVENT' . "\n" . - 'DTSTAMP:20060206T001121Z' . "\n" . - 'DTSTART;TZID=US/Eastern:20060104T140000' . "\n" . - 'DURATION:PT1H' . "\n" . - 'RECURRENCE-ID;TZID=US/Eastern:20060104T120000' . "\n" . - 'SUMMARY:Event #2 bis' . "\n" . - 'UID:00959BC664CA650E933C892C@example.com' . "\n" . - 'END:VEVENT' . "\n" . - 'END:VCALENDAR' . "\n", - VObject\Writer::write($component) - ); - - } - - /** - * iCalendar Stream. - */ - function testRFC6321Section3_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar/> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'END:VCALENDAR' . "\n" - ); - } - - /** - * All components exist. - */ - function testRFC6321Section3_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <components> - <vtimezone/> - <vevent/> - <vtodo/> - <vjournal/> - <vfreebusy/> - <standard/> - <daylight/> - <valarm/> - </components> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'BEGIN:VTIMEZONE' . "\n" . - 'END:VTIMEZONE' . "\n" . - 'BEGIN:VEVENT' . "\n" . - 'END:VEVENT' . "\n" . - 'BEGIN:VTODO' . "\n" . - 'END:VTODO' . "\n" . - 'BEGIN:VJOURNAL' . "\n" . - 'END:VJOURNAL' . "\n" . - 'BEGIN:VFREEBUSY' . "\n" . - 'END:VFREEBUSY' . "\n" . - 'BEGIN:STANDARD' . "\n" . - 'END:STANDARD' . "\n" . - 'BEGIN:DAYLIGHT' . "\n" . - 'END:DAYLIGHT' . "\n" . - 'BEGIN:VALARM' . "\n" . - 'END:VALARM' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Properties, Special Cases, GEO. - */ - function testRFC6321Section3_4_1_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <geo> - <latitude>37.386013</latitude> - <longitude>-122.082932</longitude> - </geo> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'GEO:37.386013;-122.082932' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Properties, Special Cases, REQUEST-STATUS. - */ - function testRFC6321Section3_4_1_3() { - - // Example 1 of RFC5545, Section 3.8.8.3. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <request-status> - <code>2.0</code> - <description>Success</description> - </request-status> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'REQUEST-STATUS:2.0;Success' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // Example 2 of RFC5545, Section 3.8.8.3. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <request-status> - <code>3.1</code> - <description>Invalid property value</description> - <data>DTSTART:96-Apr-01</data> - </request-status> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'REQUEST-STATUS:3.1;Invalid property value;DTSTART:96-Apr-01' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // Example 3 of RFC5545, Section 3.8.8.3. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <request-status> - <code>2.8</code> - <description>Success, repeating event ignored. Scheduled as a single event.</description> - <data>RRULE:FREQ=WEEKLY;INTERVAL=2</data> - </request-status> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'REQUEST-STATUS:2.8;Success\, repeating event ignored. Scheduled as a single' . "\n" . - ' event.;RRULE:FREQ=WEEKLY\;INTERVAL=2' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // Example 4 of RFC5545, Section 3.8.8.3. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <request-status> - <code>4.1</code> - <description>Event conflict. Date-time is busy.</description> - </request-status> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'REQUEST-STATUS:4.1;Event conflict. Date-time is busy.' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // Example 5 of RFC5545, Section 3.8.8.3. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <request-status> - <code>3.7</code> - <description>Invalid calendar user</description> - <data>ATTENDEE:mailto:jsmith@example.com</data> - </request-status> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:mailto:jsmith@example.com' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Binary. - */ - function testRFC6321Section3_6_1() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <attach> - <binary>SGVsbG8gV29ybGQh</binary> - </attach> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'ATTACH:SGVsbG8gV29ybGQh' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // In vCard 4, BINARY no longer exists and is replaced by URI. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <attach> - <uri>SGVsbG8gV29ybGQh</uri> - </attach> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'ATTACH:SGVsbG8gV29ybGQh' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Boolean. - */ - function testRFC6321Section3_6_2() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <attendee> - <parameters> - <rsvp><boolean>true</boolean></rsvp> - </parameters> - <cal-address>mailto:cyrus@example.com</cal-address> - </attendee> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'ATTENDEE;RSVP=true:mailto:cyrus@example.com' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Calendar User Address. - */ - function testRFC6321Section3_6_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <attendee> - <cal-address>mailto:cyrus@example.com</cal-address> - </attendee> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'ATTENDEE:mailto:cyrus@example.com' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Date. - */ - function testRFC6321Section3_6_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <dtstart> - <date>2011-05-17</date> - </dtstart> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'DTSTART;VALUE=DATE:20110517' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Date-Time. - */ - function testRFC6321Section3_6_5() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <dtstart> - <date-time>2011-05-17T12:00:00</date-time> - </dtstart> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'DTSTART:20110517T120000' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Duration. - */ - function testRFC6321Section3_6_6() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <duration> - <duration>P1D</duration> - </duration> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'DURATION:P1D' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Float. - */ - function testRFC6321Section3_6_7() { - - // GEO uses <float /> with a positive and a non-negative numbers. - $this->testRFC6321Section3_4_1_2(); - - } - - /** - * Values, Integer. - */ - function testRFC6321Section3_6_8() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <foo> - <integer>42</integer> - </foo> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'FOO:42' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <foo> - <integer>-42</integer> - </foo> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'FOO:-42' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Period of Time. - */ - function testRFC6321Section3_6_9() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <freebusy> - <period> - <start>2011-05-17T12:00:00</start> - <duration>P1H</duration> - </period> - </freebusy> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'FREEBUSY:20110517T120000/P1H' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <freebusy> - <period> - <start>2011-05-17T12:00:00</start> - <end>2012-05-17T12:00:00</end> - </period> - </freebusy> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'FREEBUSY:20110517T120000/20120517T120000' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Recurrence Rule. - */ - function testRFC6321Section3_6_10() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rrule> - <recur> - <freq>YEARLY</freq> - <count>5</count> - <byday>-1SU</byday> - <bymonth>10</bymonth> - </recur> - </rrule> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RRULE:FREQ=YEARLY;COUNT=5;BYDAY=-1SU;BYMONTH=10' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Text. - */ - function testRFC6321Section3_6_11() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <calscale> - <text>GREGORIAN</text> - </calscale> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'CALSCALE:GREGORIAN' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, Time. - */ - function testRFC6321Section3_6_12() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <foo> - <time>12:00:00</time> - </foo> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'FOO:120000' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, URI. - */ - function testRFC6321Section3_6_13() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <attach> - <uri>http://calendar.example.com</uri> - </attach> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'ATTACH:http://calendar.example.com' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Values, UTC Offset. - */ - function testRFC6321Section3_6_14() { - - // Example 1 of RFC5545, Section 3.3.14. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <tzoffsetfrom> - <utc-offset>-05:00</utc-offset> - </tzoffsetfrom> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'TZOFFSETFROM:-0500' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - // Example 2 of RFC5545, Section 3.3.14. - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <tzoffsetfrom> - <utc-offset>+01:00</utc-offset> - </tzoffsetfrom> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'TZOFFSETFROM:+0100' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Handling Unrecognized Properties or Parameters. - */ - function testRFC6321Section5() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <x-property> - <unknown>20110512T120000Z</unknown> - </x-property> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'X-PROPERTY:20110512T120000Z' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <dtstart> - <parameters> - <x-param> - <text>PT30M</text> - </x-param> - </parameters> - <date-time>2011-05-12T13:00:00Z</date-time> - </dtstart> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'DTSTART;X-PARAM=PT30M:20110512T130000Z' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - function testRDateWithDateTime() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <date-time>2008-02-05T19:12:24Z</date-time> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE:20080205T191224Z' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <date-time>2008-02-05T19:12:24Z</date-time> - <date-time>2009-02-05T19:12:24Z</date-time> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE:20080205T191224Z,20090205T191224Z' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - function testRDateWithDate() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <date>2008-10-06</date> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE:20081006' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <date>2008-10-06</date> - <date>2009-10-06</date> - <date>2010-10-06</date> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE:20081006,20091006,20101006' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - function testRDateWithPeriod() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <parameters> - <tzid> - <text>US/Eastern</text> - </tzid> - </parameters> - <period> - <start>2006-01-02T15:00:00</start> - <duration>PT2H</duration> - </period> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - <properties> - <rdate> - <parameters> - <tzid> - <text>US/Eastern</text> - </tzid> - </parameters> - <period> - <start>2006-01-02T15:00:00</start> - <duration>PT2H</duration> - </period> - <period> - <start>2008-01-02T15:00:00</start> - <duration>PT1H</duration> - </period> - </rdate> - </properties> - </vcalendar> -</icalendar> -XML -, - 'BEGIN:VCALENDAR' . "\n" . - 'RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H,20080102T150000/PT1' . "\n" . - ' H' . "\n" . - 'END:VCALENDAR' . "\n" - ); - - } - - /** - * Basic example. - */ - function testRFC6351Basic() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <fn> - <text>J. Doe</text> - </fn> - <n> - <surname>Doe</surname> - <given>J.</given> - <additional/> - <prefix/> - <suffix/> - </n> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'FN:J. Doe' . "\n" . - 'N:Doe;J.;;;' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Example 1. - */ - function testRFC6351Example1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <fn> - <text>J. Doe</text> - </fn> - <n> - <surname>Doe</surname> - <given>J.</given> - <additional/> - <prefix/> - <suffix/> - </n> - <x-file> - <parameters> - <mediatype> - <text>image/jpeg</text> - </mediatype> - </parameters> - <unknown>alien.jpg</unknown> - </x-file> - <x1:a href="http://www.example.com" xmlns:x1="http://www.w3.org/1999/xhtml">My web page!</x1:a> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'FN:J. Doe' . "\n" . - 'N:Doe;J.;;;' . "\n" . - 'X-FILE;MEDIATYPE=image/jpeg:alien.jpg' . "\n" . - 'XML:<a xmlns="http://www.w3.org/1999/xhtml" href="http://www.example.com">M' . "\n" . - ' y web page!</a>' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Design Considerations. - */ - function testRFC6351Section5() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tel> - <parameters> - <type> - <text>voice</text> - <text>video</text> - </type> - </parameters> - <uri>tel:+1-555-555-555</uri> - </tel> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TEL;TYPE="voice,video":tel:+1-555-555-555' . "\n" . - 'END:VCARD' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tel> - <parameters> - <type> - <text>voice</text> - <text>video</text> - </type> - </parameters> - <text>tel:+1-555-555-555</text> - </tel> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TEL;TYPE="voice,video":tel:+1-555-555-555' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Design Considerations. - */ - function testRFC6351Section5Group() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tel> - <text>tel:+1-555-555-556</text> - </tel> - <group name="contact"> - <tel> - <text>tel:+1-555-555-555</text> - </tel> - <fn> - <text>Gordon</text> - </fn> - </group> - <group name="media"> - <fn> - <text>Gordon</text> - </fn> - </group> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TEL:tel:+1-555-555-556' . "\n" . - 'contact.TEL:tel:+1-555-555-555' . "\n" . - 'contact.FN:Gordon' . "\n" . - 'media.FN:Gordon' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Extensibility. - */ - function testRFC6351Section5_1_NoNamespace() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <x-my-prop> - <parameters> - <pref> - <integer>1</integer> - </pref> - </parameters> - <text>value goes here</text> - </x-my-prop> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'X-MY-PROP;PREF=1:value goes here' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.1 of Relax NG Schema: value-date. - */ - function testRFC6351ValueDateWithYearMonthDay() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>20150128</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:20150128' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.1 of Relax NG Schema: value-date. - */ - function testRFC6351ValueDateWithYearMonth() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>2015-01</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:2015-01' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.1 of Relax NG Schema: value-date. - */ - function testRFC6351ValueDateWithMonth() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--01</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--01' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.1 of Relax NG Schema: value-date. - */ - function testRFC6351ValueDateWithMonthDay() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--0128</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--0128' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.1 of Relax NG Schema: value-date. - */ - function testRFC6351ValueDateWithDay() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithHour() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>13</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:13' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithHourMinute() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>1353</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:1353' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithHourMinuteSecond() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>135301</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:135301' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithMinute() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>-53</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:-53' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithMinuteSecond() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>-5301</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:-5301' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithSecond() { - - $this->assertTrue(true); - - /* - * According to the Relax NG Schema, there is a conflict between - * value-date and value-time. The --01 syntax can only match a - * value-date because of the higher priority set in - * value-date-and-or-time. So we basically skip this test. - * - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--01</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--01' . "\n" . - 'END:VCARD' . "\n" - ); - */ - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithSecondZ() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--01Z</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--01Z' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.2 of Relax NG Schema: value-time. - */ - function testRFC6351ValueTimeWithSecondTZ() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--01+1234</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--01+1234' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithYearMonthDayHour() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>20150128T13</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:20150128T13' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithMonthDayHour() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>--0128T13</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:--0128T13' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithDayHour() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28T13</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28T13' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithDayHourMinute() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28T1353</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28T1353' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithDayHourMinuteSecond() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28T135301</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28T135301' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithDayHourZ() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28T13Z</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28T13Z' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Section 4.3.3 of Relax NG Schema: value-date-time. - */ - function testRFC6351ValueDateTimeWithDayHourTZ() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>---28T13+1234</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:---28T13+1234' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: SOURCE. - */ - function testRFC6350Section6_1_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <source> - <uri>ldap://ldap.example.com/cn=Babs%20Jensen,%20o=Babsco,%20c=US</uri> - </source> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'SOURCE:ldap://ldap.example.com/cn=Babs%20Jensen\,%20o=Babsco\,%20c=US' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: KIND. - */ - function testRFC6350Section6_1_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <kind> - <text>individual</text> - </kind> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'KIND:individual' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: FN. - */ - function testRFC6350Section6_2_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <fn> - <text>Mr. John Q. Public, Esq.</text> - </fn> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'FN:Mr. John Q. Public\, Esq.' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: N. - */ - function testRFC6350Section6_2_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <n> - <surname>Stevenson</surname> - <given>John</given> - <additional>Philip,Paul</additional> - <prefix>Dr.</prefix> - <suffix>Jr.,M.D.,A.C.P.</suffix> - </n> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'N:Stevenson;John;Philip\,Paul;Dr.;Jr.\,M.D.\,A.C.P.' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: NICKNAME. - */ - function testRFC6350Section6_2_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <nickname> - <text>Jim</text> - <text>Jimmie</text> - </nickname> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'NICKNAME:Jim,Jimmie' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: PHOTO. - */ - function testRFC6350Section6_2_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <photo> - <uri>http://www.example.com/pub/photos/jqpublic.gif</uri> - </photo> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'PHOTO:http://www.example.com/pub/photos/jqpublic.gif' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - function testRFC6350Section6_2_5() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <bday> - <date-and-or-time>19531015T231000Z</date-and-or-time> - </bday> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'BDAY:19531015T231000Z' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - function testRFC6350Section6_2_6() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <anniversary> - <date-and-or-time>19960415</date-and-or-time> - </anniversary> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'ANNIVERSARY:19960415' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: GENDER. - */ - function testRFC6350Section6_2_7() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <gender> - <sex>Jim</sex> - <text>Jimmie</text> - </gender> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'GENDER:Jim;Jimmie' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: ADR. - */ - function testRFC6350Section6_3_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <adr> - <pobox/> - <ext/> - <street>123 Main Street</street> - <locality>Any Town</locality> - <region>CA</region> - <code>91921-1234</code> - <country>U.S.A.</country> - </adr> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'ADR:;;123 Main Street;Any Town;CA;91921-1234;U.S.A.' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: TEL. - */ - function testRFC6350Section6_4_1() { - - /** - * Quoting RFC: - * > Value type: By default, it is a single free-form text value (for - * > backward compatibility with vCard 3), but it SHOULD be reset to a - * > URI value. It is expected that the URI scheme will be "tel", as - * > specified in [RFC3966], but other schemes MAY be used. - * - * So first, we test xCard/URI to vCard/URI. - * Then, we test xCard/TEXT to vCard/TEXT to xCard/TEXT. - */ - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tel> - <parameters> - <type> - <text>home</text> - </type> - </parameters> - <uri>tel:+33-01-23-45-67</uri> - </tel> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TEL;TYPE=home:tel:+33-01-23-45-67' . "\n" . - 'END:VCARD' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tel> - <parameters> - <type> - <text>home</text> - </type> - </parameters> - <text>tel:+33-01-23-45-67</text> - </tel> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TEL;TYPE=home:tel:+33-01-23-45-67' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: EMAIL. - */ - function testRFC6350Section6_4_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <email> - <parameters> - <type> - <text>work</text> - </type> - </parameters> - <text>jqpublic@xyz.example.com</text> - </email> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'EMAIL;TYPE=work:jqpublic@xyz.example.com' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: IMPP. - */ - function testRFC6350Section6_4_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <impp> - <parameters> - <pref> - <text>1</text> - </pref> - </parameters> - <uri>xmpp:alice@example.com</uri> - </impp> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'IMPP;PREF=1:xmpp:alice@example.com' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: LANG. - */ - function testRFC6350Section6_4_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <lang> - <parameters> - <type> - <text>work</text> - </type> - <pref> - <text>2</text> - </pref> - </parameters> - <language-tag>en</language-tag> - </lang> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'LANG;TYPE=work;PREF=2:en' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: TZ. - */ - function testRFC6350Section6_5_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <tz> - <text>Raleigh/North America</text> - </tz> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TZ:Raleigh/North America' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: GEO. - */ - function testRFC6350Section6_5_2() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <geo> - <uri>geo:37.386013,-122.082932</uri> - </geo> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'GEO:geo:37.386013\,-122.082932' . "\n" . - 'END:VCARD' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <geo> - <text>geo:37.386013,-122.082932</text> - </geo> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'GEO:geo:37.386013\,-122.082932' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: TITLE. - */ - function testRFC6350Section6_6_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <title> - <text>Research Scientist</text> - </title> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'TITLE:Research Scientist' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: ROLE. - */ - function testRFC6350Section6_6_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <role> - <text>Project Leader</text> - </role> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'ROLE:Project Leader' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: LOGO. - */ - function testRFC6350Section6_6_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <logo> - <uri>http://www.example.com/pub/logos/abccorp.jpg</uri> - </logo> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'LOGO:http://www.example.com/pub/logos/abccorp.jpg' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: ORG. - */ - function testRFC6350Section6_6_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <org> - <text>ABC, Inc.</text> - <text>North American Division</text> - <text>Marketing</text> - </org> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'ORG:ABC\, Inc.;North American Division;Marketing' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: MEMBER. - */ - function testRFC6350Section6_6_5() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <member> - <uri>urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af</uri> - </member> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'MEMBER:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af' . "\n" . - 'END:VCARD' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <member> - <uri>mailto:subscriber1@example.com</uri> - </member> - <member> - <uri>xmpp:subscriber2@example.com</uri> - </member> - <member> - <uri>sip:subscriber3@example.com</uri> - </member> - <member> - <uri>tel:+1-418-555-5555</uri> - </member> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'MEMBER:mailto:subscriber1@example.com' . "\n" . - 'MEMBER:xmpp:subscriber2@example.com' . "\n" . - 'MEMBER:sip:subscriber3@example.com' . "\n" . - 'MEMBER:tel:+1-418-555-5555' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: RELATED. - */ - function testRFC6350Section6_6_6() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <related> - <parameters> - <type> - <text>friend</text> - </type> - </parameters> - <uri>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6</uri> - </related> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'RELATED;TYPE=friend:urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: CATEGORIES. - */ - function testRFC6350Section6_7_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <categories> - <text>INTERNET</text> - <text>IETF</text> - <text>INDUSTRY</text> - <text>INFORMATION TECHNOLOGY</text> - </categories> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: NOTE. - */ - function testRFC6350Section6_7_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <note> - <text>Foo, bar</text> - </note> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'NOTE:Foo\, bar' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: PRODID. - */ - function testRFC6350Section6_7_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <prodid> - <text>-//ONLINE DIRECTORY//NONSGML Version 1//EN</text> - </prodid> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - function testRFC6350Section6_7_4() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <rev> - <timestamp>19951031T222710Z</timestamp> - </rev> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'REV:19951031T222710Z' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: SOUND. - */ - function testRFC6350Section6_7_5() { - - $this->assertXMLEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <sound> - <uri>CID:JOHNQPUBLIC.part8.19960229T080000.xyzMail@example.com</uri> - </sound> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'SOUND:CID:JOHNQPUBLIC.part8.19960229T080000.xyzMail@example.com' . "\n" . - 'END:VCARD' . "\n" - ); - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <sound> - <text>CID:JOHNQPUBLIC.part8.19960229T080000.xyzMail@example.com</text> - </sound> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'SOUND:CID:JOHNQPUBLIC.part8.19960229T080000.xyzMail@example.com' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: UID. - */ - function testRFC6350Section6_7_6() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <uid> - <text>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6</text> - </uid> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'UID:urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: CLIENTPIDMAP. - */ - function testRFC6350Section6_7_7() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <clientpidmap> - <sourceid>1</sourceid> - <uri>urn:uuid:3df403f4-5924-4bb7-b077-3c711d9eb34b</uri> - </clientpidmap> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'CLIENTPIDMAP:1;urn:uuid:3df403f4-5924-4bb7-b077-3c711d9eb34b' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: URL. - */ - function testRFC6350Section6_7_8() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <url> - <uri>http://example.org/restaurant.french/~chezchic.html</uri> - </url> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'URL:http://example.org/restaurant.french/~chezchic.html' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: VERSION. - */ - function testRFC6350Section6_7_9() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard/> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: KEY. - */ - function testRFC6350Section6_8_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <key> - <parameters> - <mediatype> - <text>application/pgp-keys</text> - </mediatype> - </parameters> - <text>ftp://example.com/keys/jdoe</text> - </key> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'KEY;MEDIATYPE=application/pgp-keys:ftp://example.com/keys/jdoe' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: FBURL. - */ - function testRFC6350Section6_9_1() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <fburl> - <parameters> - <pref> - <text>1</text> - </pref> - </parameters> - <uri>http://www.example.com/busy/janedoe</uri> - </fburl> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'FBURL;PREF=1:http://www.example.com/busy/janedoe' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: CALADRURI. - */ - function testRFC6350Section6_9_2() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <caladruri> - <uri>http://example.com/calendar/jdoe</uri> - </caladruri> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'CALADRURI:http://example.com/calendar/jdoe' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: CALURI. - */ - function testRFC6350Section6_9_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <caluri> - <parameters> - <pref> - <text>1</text> - </pref> - </parameters> - <uri>http://cal.example.com/calA</uri> - </caluri> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'CALURI;PREF=1:http://cal.example.com/calA' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Property: CAPURI. - */ - function testRFC6350SectionA_3() { - - $this->assertXMLReflexivelyEqualsToMimeDir( -<<<XML -<?xml version="1.0" encoding="UTF-8"?> -<vcards xmlns="urn:ietf:params:xml:ns:vcard-4.0"> - <vcard> - <capuri> - <uri>http://cap.example.com/capA</uri> - </capuri> - </vcard> -</vcards> -XML -, - 'BEGIN:VCARD' . "\n" . - 'VERSION:4.0' . "\n" . - 'CAPURI:http://cap.example.com/capA' . "\n" . - 'END:VCARD' . "\n" - ); - - } - - /** - * Check this equality: - * XML -> object model -> MIME Dir. - */ - protected function assertXMLEqualsToMimeDir($xml, $mimedir) { - - $component = VObject\Reader::readXML($xml); - $this->assertVObjectEqualsVObject($mimedir, $component); - - } - - /** - * Check this (reflexive) equality: - * XML -> object model -> MIME Dir -> object model -> XML. - */ - protected function assertXMLReflexivelyEqualsToMimeDir($xml, $mimedir) { - - $this->assertXMLEqualsToMimeDir($xml, $mimedir); - - $component = VObject\Reader::read($mimedir); - $this->assertXmlStringEqualsXmlString($xml, VObject\Writer::writeXML($component)); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BinaryTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BinaryTest.php deleted file mode 100644 index 3356b1bd11e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BinaryTest.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject; - -class BinaryTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \InvalidArgumentException - */ - function testMimeDir() { - - $vcard = new VObject\Component\VCard(['VERSION' => '3.0']); - $vcard->add('PHOTO', ['a', 'b']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BooleanTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BooleanTest.php deleted file mode 100644 index 0c885d37bbe..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/BooleanTest.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject; - -class BooleanTest extends \PHPUnit_Framework_TestCase { - - function testMimeDir() { - - $input = "BEGIN:VCARD\r\nX-AWESOME;VALUE=BOOLEAN:TRUE\r\nX-SUCKS;VALUE=BOOLEAN:FALSE\r\nEND:VCARD\r\n"; - - $vcard = VObject\Reader::read($input); - $this->assertTrue($vcard->{'X-AWESOME'}->getValue()); - $this->assertFalse($vcard->{'X-SUCKS'}->getValue()); - - $this->assertEquals('BOOLEAN', $vcard->{'X-AWESOME'}->getValueType()); - $this->assertEquals($input, $vcard->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/CompoundTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/CompoundTest.php deleted file mode 100644 index ced0d7a4c70..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/CompoundTest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject\Component\VCard; - -class CompoundTest extends \PHPUnit_Framework_TestCase { - - function testSetParts() { - - $arr = [ - 'ABC, Inc.', - 'North American Division', - 'Marketing;Sales', - ]; - - $vcard = new VCard(); - $elem = $vcard->createProperty('ORG'); - $elem->setParts($arr); - - $this->assertEquals('ABC\, Inc.;North American Division;Marketing\;Sales', $elem->getValue()); - $this->assertEquals(3, count($elem->getParts())); - $parts = $elem->getParts(); - $this->assertEquals('Marketing;Sales', $parts[2]); - - } - - function testGetParts() { - - $str = 'ABC\, Inc.;North American Division;Marketing\;Sales'; - - $vcard = new VCard(); - $elem = $vcard->createProperty('ORG'); - $elem->setRawMimeDirValue($str); - - $this->assertEquals(3, count($elem->getParts())); - $parts = $elem->getParts(); - $this->assertEquals('Marketing;Sales', $parts[2]); - } - - function testGetPartsNull() { - - $vcard = new VCard(); - $elem = $vcard->createProperty('ORG', null); - - $this->assertEquals(0, count($elem->getParts())); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/FloatTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/FloatTest.php deleted file mode 100644 index f4636518d83..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/FloatTest.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject; - -class FloatTest extends \PHPUnit_Framework_TestCase { - - function testMimeDir() { - - $input = "BEGIN:VCARD\r\nVERSION:4.0\r\nX-FLOAT;VALUE=FLOAT:0.234;1.245\r\nEND:VCARD\r\n"; - $mimeDir = new VObject\Parser\MimeDir($input); - - $result = $mimeDir->parse($input); - - $this->assertInstanceOf('Sabre\VObject\Property\FloatValue', $result->{'X-FLOAT'}); - - $this->assertEquals([ - 0.234, - 1.245, - ], $result->{'X-FLOAT'}->getParts()); - - $this->assertEquals( - $input, - $result->serialize() - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/CalAddressTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/CalAddressTest.php deleted file mode 100644 index fe2a550bffe..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/CalAddressTest.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\ICalendar; - -class CalAddressTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider values - */ - function testGetNormalizedValue($expected, $input) { - - $vobj = new \Sabre\VObject\Component\VCalendar(); - $property = $vobj->add('ATTENDEE', $input); - - $this->assertEquals( - $expected, - $property->getNormalizedValue() - ); - - } - - function values() { - - return [ - ['mailto:a@b.com', 'mailto:a@b.com'], - ['mailto:a@b.com', 'MAILTO:a@b.com'], - ['/foo/bar', '/foo/bar'], - ]; - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DateTimeTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DateTimeTest.php deleted file mode 100644 index c89cfe69bca..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DateTimeTest.php +++ /dev/null @@ -1,371 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\ICalendar; - -use Sabre\VObject\Component\VCalendar; - -class DateTimeTest extends \PHPUnit_Framework_TestCase { - - protected $vcal; - - function setUp() { - - $this->vcal = new VCalendar(); - - } - - function testSetDateTime() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt); - - $this->assertEquals('19850704T013000', (string)$elem); - $this->assertEquals('Europe/Amsterdam', (string)$elem['TZID']); - $this->assertNull($elem['VALUE']); - - $this->assertTrue($elem->hasTime()); - - } - - function testSetDateTimeLOCAL() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt, $isFloating = true); - - $this->assertEquals('19850704T013000', (string)$elem); - $this->assertNull($elem['TZID']); - - $this->assertTrue($elem->hasTime()); - } - - function testSetDateTimeUTC() { - - $tz = new \DateTimeZone('GMT'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt); - - $this->assertEquals('19850704T013000Z', (string)$elem); - $this->assertNull($elem['TZID']); - - $this->assertTrue($elem->hasTime()); - } - - function testSetDateTimeFromUnixTimestamp() { - - // When initialized from a Unix timestamp, the timezone is set to "+00:00". - $dt = new \DateTime('@489288600'); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt); - - $this->assertEquals('19850704T013000Z', (string)$elem); - $this->assertNull($elem['TZID']); - - $this->assertTrue($elem->hasTime()); - } - - function testSetDateTimeLOCALTZ() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt); - - $this->assertEquals('19850704T013000', (string)$elem); - $this->assertEquals('Europe/Amsterdam', (string)$elem['TZID']); - - $this->assertTrue($elem->hasTime()); - } - - function testSetDateTimeDATE() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem['VALUE'] = 'DATE'; - $elem->setDateTime($dt); - - $this->assertEquals('19850704', (string)$elem); - $this->assertNull($elem['TZID']); - $this->assertEquals('DATE', (string)$elem['VALUE']); - - $this->assertFalse($elem->hasTime()); - } - - function testSetValue() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTime('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setValue($dt); - - $this->assertEquals('19850704T013000', (string)$elem); - $this->assertEquals('Europe/Amsterdam', (string)$elem['TZID']); - $this->assertNull($elem['VALUE']); - - $this->assertTrue($elem->hasTime()); - - } - - function testSetValueArray() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt1 = new \DateTime('1985-07-04 01:30:00', $tz); - $dt2 = new \DateTime('1985-07-04 02:30:00', $tz); - $dt1->setTimeZone($tz); - $dt2->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setValue([$dt1, $dt2]); - - $this->assertEquals('19850704T013000,19850704T023000', (string)$elem); - $this->assertEquals('Europe/Amsterdam', (string)$elem['TZID']); - $this->assertNull($elem['VALUE']); - - $this->assertTrue($elem->hasTime()); - - } - - function testSetParts() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt1 = new \DateTime('1985-07-04 01:30:00', $tz); - $dt2 = new \DateTime('1985-07-04 02:30:00', $tz); - $dt1->setTimeZone($tz); - $dt2->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setParts([$dt1, $dt2]); - - $this->assertEquals('19850704T013000,19850704T023000', (string)$elem); - $this->assertEquals('Europe/Amsterdam', (string)$elem['TZID']); - $this->assertNull($elem['VALUE']); - - $this->assertTrue($elem->hasTime()); - - } - function testSetPartsStrings() { - - $dt1 = '19850704T013000Z'; - $dt2 = '19850704T023000Z'; - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setParts([$dt1, $dt2]); - - $this->assertEquals('19850704T013000Z,19850704T023000Z', (string)$elem); - $this->assertNull($elem['VALUE']); - - $this->assertTrue($elem->hasTime()); - - } - - - function testGetDateTimeCached() { - - $tz = new \DateTimeZone('Europe/Amsterdam'); - $dt = new \DateTimeImmutable('1985-07-04 01:30:00', $tz); - $dt->setTimeZone($tz); - - $elem = $this->vcal->createProperty('DTSTART'); - $elem->setDateTime($dt); - - $this->assertEquals($elem->getDateTime(), $dt); - - } - - function testGetDateTimeDateNULL() { - - $elem = $this->vcal->createProperty('DTSTART'); - $dt = $elem->getDateTime(); - - $this->assertNull($dt); - - } - - function testGetDateTimeDateDATE() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704'); - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 00:00:00', $dt->format('Y-m-d H:i:s')); - - } - - function testGetDateTimeDateDATEReferenceTimeZone() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704'); - - $tz = new \DateTimeZone('America/Toronto'); - $dt = $elem->getDateTime($tz); - $dt = $dt->setTimeZone(new \DateTimeZone('UTC')); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 04:00:00', $dt->format('Y-m-d H:i:s')); - - } - - function testGetDateTimeDateFloating() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000'); - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s')); - - } - - function testGetDateTimeDateFloatingReferenceTimeZone() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000'); - - $tz = new \DateTimeZone('America/Toronto'); - $dt = $elem->getDateTime($tz); - $dt = $dt->setTimeZone(new \DateTimeZone('UTC')); - - $this->assertInstanceOf('DateTimeInterface', $dt); - $this->assertEquals('1985-07-04 05:30:00', $dt->format('Y-m-d H:i:s')); - - } - - function testGetDateTimeDateUTC() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000Z'); - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s')); - $this->assertEquals('UTC', $dt->getTimeZone()->getName()); - - } - - function testGetDateTimeDateLOCALTZ() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000'); - $elem['TZID'] = 'Europe/Amsterdam'; - - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s')); - $this->assertEquals('Europe/Amsterdam', $dt->getTimeZone()->getName()); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testGetDateTimeDateInvalid() { - - $elem = $this->vcal->createProperty('DTSTART', 'bla'); - $dt = $elem->getDateTime(); - - } - - function testGetDateTimeWeirdTZ() { - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000'); - $elem['TZID'] = '/freeassociation.sourceforge.net/Tzfile/Europe/Amsterdam'; - - - $event = $this->vcal->createComponent('VEVENT'); - $event->add($elem); - - $timezone = $this->vcal->createComponent('VTIMEZONE'); - $timezone->TZID = '/freeassociation.sourceforge.net/Tzfile/Europe/Amsterdam'; - $timezone->{'X-LIC-LOCATION'} = 'Europe/Amsterdam'; - - $this->vcal->add($event); - $this->vcal->add($timezone); - - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s')); - $this->assertEquals('Europe/Amsterdam', $dt->getTimeZone()->getName()); - - } - - function testGetDateTimeBadTimeZone() { - - $default = date_default_timezone_get(); - date_default_timezone_set('Canada/Eastern'); - - $elem = $this->vcal->createProperty('DTSTART', '19850704T013000'); - $elem['TZID'] = 'Moon'; - - - $event = $this->vcal->createComponent('VEVENT'); - $event->add($elem); - - $timezone = $this->vcal->createComponent('VTIMEZONE'); - $timezone->TZID = 'Moon'; - $timezone->{'X-LIC-LOCATION'} = 'Moon'; - - - $this->vcal->add($event); - $this->vcal->add($timezone); - - $dt = $elem->getDateTime(); - - $this->assertInstanceOf('DateTimeImmutable', $dt); - $this->assertEquals('1985-07-04 01:30:00', $dt->format('Y-m-d H:i:s')); - $this->assertEquals('Canada/Eastern', $dt->getTimeZone()->getName()); - date_default_timezone_set($default); - - } - - function testUpdateValueParameter() { - - $dtStart = $this->vcal->createProperty('DTSTART', new \DateTime('2013-06-07 15:05:00')); - $dtStart['VALUE'] = 'DATE'; - - $this->assertEquals("DTSTART;VALUE=DATE:20130607\r\n", $dtStart->serialize()); - - } - - function testValidate() { - - $exDate = $this->vcal->createProperty('EXDATE', '-00011130T143000Z'); - $messages = $exDate->validate(); - $this->assertEquals(1, count($messages)); - $this->assertEquals(3, $messages[0]['level']); - - } - - /** - * This issue was discovered on the sabredav mailing list. - */ - function testCreateDatePropertyThroughAdd() { - - $vcal = new VCalendar(); - $vevent = $vcal->add('VEVENT'); - - $dtstart = $vevent->add( - 'DTSTART', - new \DateTime('2014-03-07'), - ['VALUE' => 'DATE'] - ); - - $this->assertEquals("DTSTART;VALUE=DATE:20140307\r\n", $dtstart->serialize()); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DurationTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DurationTest.php deleted file mode 100644 index 9aaaebce0a0..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/DurationTest.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\ICalendar; - -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Component\VEvent; - -class DurationTest extends \PHPUnit_Framework_TestCase { - - function testGetDateInterval() { - - $vcal = new VCalendar(); - $event = $vcal->add('VEVENT', ['DURATION' => ['PT1H']]); - - $this->assertEquals( - new \DateInterval('PT1H'), - $event->{'DURATION'}->getDateInterval() - ); - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/RecurTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/RecurTest.php deleted file mode 100644 index df95e3bc849..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/ICalendar/RecurTest.php +++ /dev/null @@ -1,453 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\ICalendar; - -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Node; -use Sabre\VObject\Reader; - -class RecurTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testParts() { - - $vcal = new VCalendar(); - $recur = $vcal->add('RRULE', 'FREQ=Daily'); - - $this->assertInstanceOf('Sabre\VObject\Property\ICalendar\Recur', $recur); - - $this->assertEquals(['FREQ' => 'DAILY'], $recur->getParts()); - $recur->setParts(['freq' => 'MONTHLY']); - - $this->assertEquals(['FREQ' => 'MONTHLY'], $recur->getParts()); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testSetValueBadVal() { - - $vcal = new VCalendar(); - $recur = $vcal->add('RRULE', 'FREQ=Daily'); - $recur->setValue(new \Exception()); - - } - - function testSetValueWithCount() { - $vcal = new VCalendar(); - $recur = $vcal->add('RRULE', 'FREQ=Daily'); - $recur->setValue(['COUNT' => 3]); - $this->assertEquals($recur->getParts()['COUNT'], 3); - } - - function testGetJSONWithCount() { - $input = 'BEGIN:VCALENDAR -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -RRULE:FREQ=DAILY;COUNT=3 -ORGANIZER;CN=robert pipo:mailto:robert@example.org -END:VEVENT -END:VCALENDAR -'; - - $vcal = Reader::read($input); - $rrule = $vcal->VEVENT->RRULE; - $count = $rrule->getJsonValue()[0]['count']; - $this->assertTrue(is_int($count)); - $this->assertEquals(3, $count); - } - - function testSetSubParts() { - - $vcal = new VCalendar(); - $recur = $vcal->add('RRULE', ['FREQ' => 'DAILY', 'BYDAY' => 'mo,tu', 'BYMONTH' => [0, 1]]); - - $this->assertEquals([ - 'FREQ' => 'DAILY', - 'BYDAY' => ['MO', 'TU'], - 'BYMONTH' => [0, 1], - ], $recur->getParts()); - - } - - function testGetJSONWithUntil() { - $input = 'BEGIN:VCALENDAR -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -RRULE:FREQ=DAILY;UNTIL=20160305T230000Z -ORGANIZER;CN=robert pipo:mailto:robert@example.org -END:VEVENT -END:VCALENDAR -'; - - $vcal = Reader::read($input); - $rrule = $vcal->VEVENT->RRULE; - $untilJsonString = $rrule->getJsonValue()[0]['until']; - $this->assertEquals('2016-03-05T23:00:00Z', $untilJsonString); - } - - - function testValidateStripEmpties() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foobar -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -RRULE:FREQ=DAILY;BYMONTH=;UNTIL=20160305T230000Z -ORGANIZER;CN=robert pipo:mailto:robert@example.org -DTSTAMP:20160312T183800Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = Reader::read($input); - $this->assertEquals( - 1, - count($vcal->validate()) - ); - $this->assertEquals( - 1, - count($vcal->validate($vcal::REPAIR)) - ); - - $expected = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foobar -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -RRULE:FREQ=DAILY;UNTIL=20160305T230000Z -ORGANIZER;CN=robert pipo:mailto:robert@example.org -DTSTAMP:20160312T183800Z -END:VEVENT -END:VCALENDAR -'; - - $this->assertVObjectEqualsVObject( - $expected, - $vcal - ); - - } - - function testValidateStripNoFreq() { - - $input = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foobar -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -RRULE:UNTIL=20160305T230000Z -ORGANIZER;CN=robert pipo:mailto:robert@example.org -DTSTAMP:20160312T183800Z -END:VEVENT -END:VCALENDAR -'; - - $vcal = Reader::read($input); - $this->assertEquals( - 1, - count($vcal->validate()) - ); - $this->assertEquals( - 1, - count($vcal->validate($vcal::REPAIR)) - ); - - $expected = 'BEGIN:VCALENDAR -VERSION:2.0 -PRODID:foobar -BEGIN:VEVENT -UID:908d53c0-e1a3-4883-b69f-530954d6bd62 -TRANSP:OPAQUE -DTSTART;TZID=Europe/Berlin:20160301T150000 -DTEND;TZID=Europe/Berlin:20160301T170000 -SUMMARY:test -ORGANIZER;CN=robert pipo:mailto:robert@example.org -DTSTAMP:20160312T183800Z -END:VEVENT -END:VCALENDAR -'; - - $this->assertVObjectEqualsVObject( - $expected, - $vcal - ); - - } - - function testValidateInvalidByMonthRruleWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(1, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24', $property->getValue()); - - } - - function testValidateInvalidByMonthRruleWithoutRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0'); - $result = $property->validate(); - - $this->assertCount(1, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0', $property->getValue()); - - } - - function testValidateInvalidByMonthRruleWithRepair2() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=bla'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(1, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24', $property->getValue()); - - } - - function testValidateInvalidByMonthRruleWithoutRepair2() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=bla'); - $result = $property->validate(); - - $this->assertCount(1, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - // Without repair the invalid BYMONTH is still there, but the value is changed to uppercase - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=BLA', $property->getValue()); - - } - - function testValidateInvalidByMonthRruleValue14WithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=14'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(1, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24', $property->getValue()); - - } - - function testValidateInvalidByMonthRruleMultipleWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0,1,2,3,4,14'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=1,2,3,4', $property->getValue()); - - } - - function testValidateOneOfManyInvalidByMonthRruleWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=bla,3,foo'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYMONTH in RRULE must have value(s) between 1 and 12!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=3', $property->getValue()); - - } - - function testValidateValidByMonthRrule() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=2,3'); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=2,3', $property->getValue()); - - } - - /** - * test for issue #336 - */ - function testValidateRruleBySecondZero() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=DAILY;BYHOUR=10;BYMINUTE=30;BYSECOND=0;UNTIL=20150616T153000Z'); - $result = $property->validate(Node::REPAIR); - - // There should be 0 warnings and the value should be unchanged - $this->assertEmpty($result); - $this->assertEquals('FREQ=DAILY;BYHOUR=10;BYMINUTE=30;BYSECOND=0;UNTIL=20150616T153000Z', $property->getValue()); - - } - - function testValidateValidByWeekNoWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYWEEKNO=11'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(0, $result); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYWEEKNO=11', $property->getValue()); - - } - - function testValidateInvalidByWeekNoWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYWEEKNO=55;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(1, $result); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYDAY=WE', $property->getValue()); - - } - - function testValidateMultipleInvalidByWeekNoWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYWEEKNO=55,2,-80;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYWEEKNO=2;BYDAY=WE', $property->getValue()); - - } - - function testValidateAllInvalidByWeekNoWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYWEEKNO=55,-80;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYDAY=WE', $property->getValue()); - - } - - function testValidateInvalidByWeekNoWithoutRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYWEEKNO=55;BYDAY=WE'); - $result = $property->validate(); - - $this->assertCount(1, $result); - $this->assertEquals('BYWEEKNO in RRULE must have value(s) from -53 to -1, or 1 to 53!', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYWEEKNO=55;BYDAY=WE', $property->getValue()); - - } - - function testValidateValidByYearDayWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYYEARDAY=119'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(0, $result); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYYEARDAY=119', $property->getValue()); - - } - - function testValidateInvalidByYearDayWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYYEARDAY=367;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(1, $result); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYDAY=WE', $property->getValue()); - - } - - function testValidateMultipleInvalidByYearDayWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYYEARDAY=380,2,-390;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYYEARDAY=2;BYDAY=WE', $property->getValue()); - - } - - function testValidateAllInvalidByYearDayWithRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYYEARDAY=455,-480;BYDAY=WE'); - $result = $property->validate(Node::REPAIR); - - $this->assertCount(2, $result); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[0]['message']); - $this->assertEquals(1, $result[0]['level']); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[1]['message']); - $this->assertEquals(1, $result[1]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYDAY=WE', $property->getValue()); - - } - - function testValidateInvalidByYearDayWithoutRepair() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('RRULE', 'FREQ=YEARLY;COUNT=6;BYYEARDAY=380;BYDAY=WE'); - $result = $property->validate(); - - $this->assertCount(1, $result); - $this->assertEquals('BYYEARDAY in RRULE must have value(s) from -366 to -1, or 1 to 366!', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - $this->assertEquals('FREQ=YEARLY;COUNT=6;BYYEARDAY=380;BYDAY=WE', $property->getValue()); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/TextTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/TextTest.php deleted file mode 100644 index 69ac8aaf181..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/TextTest.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject\Component\VCard; - -class TextTest extends \PHPUnit_Framework_TestCase { - - function assertVCard21Serialization($propValue, $expected) { - - $doc = new VCard([ - 'VERSION' => '2.1', - 'PROP' => $propValue - ], false); - - // Adding quoted-printable, because we're testing if it gets removed - // automatically. - $doc->PROP['ENCODING'] = 'QUOTED-PRINTABLE'; - $doc->PROP['P1'] = 'V1'; - - - $output = $doc->serialize(); - - - $this->assertEquals("BEGIN:VCARD\r\nVERSION:2.1\r\n$expected\r\nEND:VCARD\r\n", $output); - - } - - function testSerializeVCard21() { - - $this->assertVCard21Serialization( - 'f;oo', - 'PROP;P1=V1:f;oo' - ); - - } - - function testSerializeVCard21Array() { - - $this->assertVCard21Serialization( - ['f;oo', 'bar'], - 'PROP;P1=V1:f\;oo;bar' - ); - - } - function testSerializeVCard21Fold() { - - $this->assertVCard21Serialization( - str_repeat('x', 80), - 'PROP;P1=V1:' . str_repeat('x', 64) . "\r\n " . str_repeat('x', 16) - ); - - } - - - - function testSerializeQuotedPrintable() { - - $this->assertVCard21Serialization( - "foo\r\nbar", - 'PROP;P1=V1;ENCODING=QUOTED-PRINTABLE:foo=0D=0Abar' - ); - } - - function testSerializeQuotedPrintableFold() { - - $this->assertVCard21Serialization( - "foo\r\nbarxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - "PROP;P1=V1;ENCODING=QUOTED-PRINTABLE:foo=0D=0Abarxxxxxxxxxxxxxxxxxxxxxxxxxx=\r\n xxx" - ); - - } - - function testValidateMinimumPropValue() { - - $vcard = <<<IN -BEGIN:VCARD -VERSION:4.0 -UID:foo -FN:Hi! -N:A -END:VCARD -IN; - - $vcard = \Sabre\VObject\Reader::read($vcard); - $this->assertEquals(1, count($vcard->validate())); - - $this->assertEquals(1, count($vcard->N->getParts())); - - $vcard->validate(\Sabre\VObject\Node::REPAIR); - - $this->assertEquals(5, count($vcard->N->getParts())); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/UriTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/UriTest.php deleted file mode 100644 index 2c44d8888a4..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/UriTest.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace Sabre\VObject\Property; - -use Sabre\VObject\Reader; - -class UriTest extends \PHPUnit_Framework_TestCase { - - function testAlwaysEncodeUriVCalendar() { - - // Apple iCal has issues with URL properties that don't have - // VALUE=URI specified. We added a workaround to vobject that - // ensures VALUE=URI always appears for these. - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -URL:http://example.org/ -END:VEVENT -END:VCALENDAR -ICS; - $output = Reader::read($input)->serialize(); - $this->assertContains('URL;VALUE=URI:http://example.org/', $output); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/DateAndOrTimeTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/DateAndOrTimeTest.php deleted file mode 100644 index 7bc2c67a9e8..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/DateAndOrTimeTest.php +++ /dev/null @@ -1,269 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\VCard; - -use Sabre\VObject; -use Sabre\VObject\Reader; - -class DateAndOrTimeTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider dates - */ - function testGetJsonValue($input, $output) { - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->createProperty('BDAY', $input); - - $this->assertEquals([$output], $prop->getJsonValue()); - - } - - function dates() { - - return [ - [ - "19961022T140000", - "1996-10-22T14:00:00", - ], - [ - "--1022T1400", - "--10-22T14:00", - ], - [ - "---22T14", - "---22T14", - ], - [ - "19850412", - "1985-04-12", - ], - [ - "1985-04", - "1985-04", - ], - [ - "1985", - "1985", - ], - [ - "--0412", - "--04-12", - ], - [ - "T102200", - "T10:22:00", - ], - [ - "T1022", - "T10:22", - ], - [ - "T10", - "T10", - ], - [ - "T-2200", - "T-22:00", - ], - [ - "T102200Z", - "T10:22:00Z", - ], - [ - "T102200-0800", - "T10:22:00-0800", - ], - [ - "T--00", - "T--00", - ], - ]; - - } - - function testSetParts() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setParts([ - new \DateTime('2014-04-02 18:37:00') - ]); - - $this->assertEquals('20140402T183700Z', $prop->getValue()); - - } - - function testSetPartsDateTimeImmutable() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setParts([ - new \DateTimeImmutable('2014-04-02 18:37:00') - ]); - - $this->assertEquals('20140402T183700Z', $prop->getValue()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testSetPartsTooMany() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setParts([ - 1, - 2 - ]); - - } - - function testSetPartsString() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setParts([ - "20140402T183700Z" - ]); - - $this->assertEquals('20140402T183700Z', $prop->getValue()); - - } - - function testSetValueDateTime() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setValue( - new \DateTime('2014-04-02 18:37:00') - ); - - $this->assertEquals('20140402T183700Z', $prop->getValue()); - - } - - function testSetValueDateTimeImmutable() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setValue( - new \DateTimeImmutable('2014-04-02 18:37:00') - ); - - $this->assertEquals('20140402T183700Z', $prop->getValue()); - - } - - function testSetDateTimeOffset() { - - $vcard = new VObject\Component\VCard(); - - $prop = $vcard->createProperty('BDAY'); - $prop->setValue( - new \DateTime('2014-04-02 18:37:00', new \DateTimeZone('America/Toronto')) - ); - - $this->assertEquals('20140402T183700-0400', $prop->getValue()); - - } - - function testGetDateTime() { - - $datetime = new \DateTime('2014-04-02 18:37:00', new \DateTimeZone('America/Toronto')); - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->createProperty('BDAY', $datetime); - - $dt = $prop->getDateTime(); - $this->assertEquals('2014-04-02T18:37:00-04:00', $dt->format('c'), "For some reason this one failed. Current default timezone is: " . date_default_timezone_get()); - - } - - function testGetDate() { - - $datetime = new \DateTime('2014-04-02'); - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->createProperty('BDAY', $datetime, null, 'DATE'); - - $this->assertEquals('DATE', $prop->getValueType()); - $this->assertEquals('BDAY:20140402', rtrim($prop->serialize())); - - } - - function testGetDateIncomplete() { - - $datetime = '--0407'; - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->add('BDAY', $datetime); - - $dt = $prop->getDateTime(); - // Note: if the year changes between the last line and the next line of - // code, this test may fail. - // - // If that happens, head outside and have a drink. - $current = new \DateTime('now'); - $year = $current->format('Y'); - - $this->assertEquals($year . '0407', $dt->format('Ymd')); - - } - - function testGetDateIncompleteFromVCard() { - - $vcard = <<<VCF -BEGIN:VCARD -VERSION:4.0 -BDAY:--0407 -END:VCARD -VCF; - $vcard = Reader::read($vcard); - $prop = $vcard->BDAY; - - $dt = $prop->getDateTime(); - // Note: if the year changes between the last line and the next line of - // code, this test may fail. - // - // If that happens, head outside and have a drink. - $current = new \DateTime('now'); - $year = $current->format('Y'); - - $this->assertEquals($year . '0407', $dt->format('Ymd')); - - } - - function testValidate() { - - $datetime = '--0407'; - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->add('BDAY', $datetime); - - $this->assertEquals([], $prop->validate()); - - } - - function testValidateBroken() { - - $datetime = '123'; - - $vcard = new VObject\Component\VCard(); - $prop = $vcard->add('BDAY', $datetime); - - $this->assertEquals([[ - 'level' => 3, - 'message' => 'The supplied value (123) is not a correct DATE-AND-OR-TIME property', - 'node' => $prop, - ]], $prop->validate()); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/LanguageTagTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/LanguageTagTest.php deleted file mode 100644 index c38b6f26438..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Property/VCard/LanguageTagTest.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\VObject\Property\VCard; - -use Sabre\VObject; - -class LanguageTagTest extends \PHPUnit_Framework_TestCase { - - function testMimeDir() { - - $input = "BEGIN:VCARD\r\nVERSION:4.0\r\nLANG:nl\r\nEND:VCARD\r\n"; - $mimeDir = new VObject\Parser\MimeDir($input); - - $result = $mimeDir->parse($input); - - $this->assertInstanceOf('Sabre\VObject\Property\VCard\LanguageTag', $result->LANG); - - $this->assertEquals('nl', $result->LANG->getValue()); - - $this->assertEquals( - $input, - $result->serialize() - ); - - } - - function testChangeAndSerialize() { - - $input = "BEGIN:VCARD\r\nVERSION:4.0\r\nLANG:nl\r\nEND:VCARD\r\n"; - $mimeDir = new VObject\Parser\MimeDir($input); - - $result = $mimeDir->parse($input); - - $this->assertInstanceOf('Sabre\VObject\Property\VCard\LanguageTag', $result->LANG); - // This replicates what the vcard converter does and triggered a bug in - // the past. - $result->LANG->setValue(['de']); - - $this->assertEquals('de', $result->LANG->getValue()); - - $expected = "BEGIN:VCARD\r\nVERSION:4.0\r\nLANG:de\r\nEND:VCARD\r\n"; - $this->assertEquals( - $expected, - $result->serialize() - ); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/PropertyTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/PropertyTest.php deleted file mode 100644 index b6241ce8c02..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/PropertyTest.php +++ /dev/null @@ -1,410 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Component\VCard; - -class PropertyTest extends \PHPUnit_Framework_TestCase { - - function testToString() { - - $cal = new VCalendar(); - - $property = $cal->createProperty('propname', 'propvalue'); - $this->assertEquals('PROPNAME', $property->name); - $this->assertEquals('propvalue', $property->__toString()); - $this->assertEquals('propvalue', (string)$property); - $this->assertEquals('propvalue', $property->getValue()); - - } - - function testCreate() { - - $cal = new VCalendar(); - - $params = [ - 'param1' => 'value1', - 'param2' => 'value2', - ]; - - $property = $cal->createProperty('propname', 'propvalue', $params); - - $this->assertEquals('value1', $property['param1']->getValue()); - $this->assertEquals('value2', $property['param2']->getValue()); - - } - - function testSetValue() { - - $cal = new VCalendar(); - - $property = $cal->createProperty('propname', 'propvalue'); - $property->setValue('value2'); - - $this->assertEquals('PROPNAME', $property->name); - $this->assertEquals('value2', $property->__toString()); - - } - - function testParameterExists() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - - $this->assertTrue(isset($property['PARAMNAME'])); - $this->assertTrue(isset($property['paramname'])); - $this->assertFalse(isset($property['foo'])); - - } - - function testParameterGet() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - - $this->assertInstanceOf('Sabre\\VObject\\Parameter', $property['paramname']); - - } - - function testParameterNotExists() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - - $this->assertInternalType('null', $property['foo']); - - } - - function testParameterMultiple() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - $property->add('paramname', 'paramvalue'); - - $this->assertInstanceOf('Sabre\\VObject\\Parameter', $property['paramname']); - $this->assertEquals(2, count($property['paramname']->getParts())); - - } - - function testSetParameterAsString() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - - $this->assertEquals(1, count($property->parameters())); - $this->assertInstanceOf('Sabre\\VObject\\Parameter', $property->parameters['PARAMNAME']); - $this->assertEquals('PARAMNAME', $property->parameters['PARAMNAME']->name); - $this->assertEquals('paramvalue', $property->parameters['PARAMNAME']->getValue()); - - } - - function testUnsetParameter() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $property['paramname'] = 'paramvalue'; - - unset($property['PARAMNAME']); - $this->assertEquals(0, count($property->parameters())); - - } - - function testSerialize() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - - $this->assertEquals("PROPNAME:propvalue\r\n", $property->serialize()); - - } - - function testSerializeParam() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue', [ - 'paramname' => 'paramvalue', - 'paramname2' => 'paramvalue2', - ]); - - $this->assertEquals("PROPNAME;PARAMNAME=paramvalue;PARAMNAME2=paramvalue2:propvalue\r\n", $property->serialize()); - - } - - function testSerializeNewLine() { - - $cal = new VCalendar(); - $property = $cal->createProperty('SUMMARY', "line1\nline2"); - - $this->assertEquals("SUMMARY:line1\\nline2\r\n", $property->serialize()); - - } - - function testSerializeLongLine() { - - $cal = new VCalendar(); - $value = str_repeat('!', 200); - $property = $cal->createProperty('propname', $value); - - $expected = "PROPNAME:" . str_repeat('!', 66) . "\r\n " . str_repeat('!', 74) . "\r\n " . str_repeat('!', 60) . "\r\n"; - - $this->assertEquals($expected, $property->serialize()); - - } - - function testSerializeUTF8LineFold() { - - $cal = new VCalendar(); - $value = str_repeat('!', 65) . "\xc3\xa4bla"; // inserted umlaut-a - $property = $cal->createProperty('propname', $value); - $expected = "PROPNAME:" . str_repeat('!', 65) . "\r\n \xc3\xa4bla\r\n"; - $this->assertEquals($expected, $property->serialize()); - - } - - function testGetIterator() { - - $cal = new VCalendar(); - $it = new ElementList([]); - $property = $cal->createProperty('propname', 'propvalue'); - $property->setIterator($it); - $this->assertEquals($it, $property->getIterator()); - - } - - - function testGetIteratorDefault() { - - $cal = new VCalendar(); - $property = $cal->createProperty('propname', 'propvalue'); - $it = $property->getIterator(); - $this->assertTrue($it instanceof ElementList); - $this->assertEquals(1, count($it)); - - } - - function testAddScalar() { - - $cal = new VCalendar(); - $property = $cal->createProperty('EMAIL'); - - $property->add('myparam', 'value'); - - $this->assertEquals(1, count($property->parameters())); - - $this->assertTrue($property->parameters['MYPARAM'] instanceof Parameter); - $this->assertEquals('MYPARAM', $property->parameters['MYPARAM']->name); - $this->assertEquals('value', $property->parameters['MYPARAM']->getValue()); - - } - - function testAddParameter() { - - $cal = new VCalendar(); - $prop = $cal->createProperty('EMAIL'); - - $prop->add('MYPARAM', 'value'); - - $this->assertEquals(1, count($prop->parameters())); - $this->assertEquals('MYPARAM', $prop['myparam']->name); - - } - - function testAddParameterTwice() { - - $cal = new VCalendar(); - $prop = $cal->createProperty('EMAIL'); - - $prop->add('MYPARAM', 'value1'); - $prop->add('MYPARAM', 'value2'); - - $this->assertEquals(1, count($prop->parameters)); - $this->assertEquals(2, count($prop->parameters['MYPARAM']->getParts())); - - $this->assertEquals('MYPARAM', $prop['MYPARAM']->name); - - } - - - function testClone() { - - $cal = new VCalendar(); - $property = $cal->createProperty('EMAIL', 'value'); - $property['FOO'] = 'BAR'; - - $property2 = clone $property; - - $property['FOO'] = 'BAZ'; - $this->assertEquals('BAR', (string)$property2['FOO']); - - } - - function testCreateParams() { - - $cal = new VCalendar(); - $property = $cal->createProperty('X-PROP', 'value', [ - 'param1' => 'value1', - 'param2' => ['value2', 'value3'] - ]); - - $this->assertEquals(1, count($property['PARAM1']->getParts())); - $this->assertEquals(2, count($property['PARAM2']->getParts())); - - } - - function testValidateNonUTF8() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty('X-PROP', "Bla\x00"); - $result = $property->validate(Property::REPAIR); - - $this->assertEquals('Property contained a control character (0x00)', $result[0]['message']); - $this->assertEquals('Bla', $property->getValue()); - - } - - function testValidateControlChars() { - - $s = "chars["; - foreach ([ - 0x7F, 0x5E, 0x5C, 0x3B, 0x3A, 0x2C, 0x22, 0x20, - 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, - 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, - ] as $c) { - $s .= sprintf('%02X(%c)', $c, $c); - } - $s .= "]end"; - - $calendar = new VCalendar(); - $property = $calendar->createProperty('X-PROP', $s); - $result = $property->validate(Property::REPAIR); - - $this->assertEquals('Property contained a control character (0x7f)', $result[0]['message']); - $this->assertEquals("chars[7F()5E(^)5C(\\\\)3B(\\;)3A(:)2C(\\,)22(\")20( )1F()1E()1D()1C()1B()1A()19()18()17()16()15()14()13()12()11()10()0F()0E()0D()0C()0B()0A(\\n)09(\t)08()07()06()05()04()03()02()01()00()]end", $property->getRawMimeDirValue()); - - } - - function testValidateBadPropertyName() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty("X_*&PROP*", "Bla"); - $result = $property->validate(Property::REPAIR); - - $this->assertEquals($result[0]['message'], 'The propertyname: X_*&PROP* contains invalid characters. Only A-Z, 0-9 and - are allowed'); - $this->assertEquals('X-PROP', $property->name); - - } - - function testGetValue() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty("SUMMARY", null); - $this->assertEquals([], $property->getParts()); - $this->assertNull($property->getValue()); - - $property->setValue([]); - $this->assertEquals([], $property->getParts()); - $this->assertNull($property->getValue()); - - $property->setValue([1]); - $this->assertEquals([1], $property->getParts()); - $this->assertEquals(1, $property->getValue()); - - $property->setValue([1, 2]); - $this->assertEquals([1, 2], $property->getParts()); - $this->assertEquals('1,2', $property->getValue()); - - $property->setValue('str'); - $this->assertEquals(['str'], $property->getParts()); - $this->assertEquals('str', $property->getValue()); - } - - /** - * ElementList should reject this. - * - * @expectedException \LogicException - */ - function testArrayAccessSetInt() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty("X-PROP", null); - - $calendar->add($property); - $calendar->{'X-PROP'}[0] = 'Something!'; - - } - - /** - * ElementList should reject this. - * - * @expectedException \LogicException - */ - function testArrayAccessUnsetInt() { - - $calendar = new VCalendar(); - $property = $calendar->createProperty("X-PROP", null); - - $calendar->add($property); - unset($calendar->{'X-PROP'}[0]); - - } - - function testValidateBadEncoding() { - - $document = new VCalendar(); - $property = $document->add('X-FOO', 'value'); - $property['ENCODING'] = 'invalid'; - - $result = $property->validate(); - - $this->assertEquals('ENCODING=INVALID is not valid for this document type.', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - - } - - function testValidateBadEncodingVCard4() { - - $document = new VCard(['VERSION' => '4.0']); - $property = $document->add('X-FOO', 'value'); - $property['ENCODING'] = 'BASE64'; - - $result = $property->validate(); - - $this->assertEquals('ENCODING parameter is not valid in vCard 4.', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - - } - - function testValidateBadEncodingVCard3() { - - $document = new VCard(['VERSION' => '3.0']); - $property = $document->add('X-FOO', 'value'); - $property['ENCODING'] = 'BASE64'; - - $result = $property->validate(); - - $this->assertEquals('ENCODING=BASE64 is not valid for this document type.', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - - } - - function testValidateBadEncodingVCard21() { - - $document = new VCard(['VERSION' => '2.1']); - $property = $document->add('X-FOO', 'value'); - $property['ENCODING'] = 'B'; - - $result = $property->validate(); - - $this->assertEquals('ENCODING=B is not valid for this document type.', $result[0]['message']); - $this->assertEquals(3, $result[0]['level']); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ReaderTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/ReaderTest.php deleted file mode 100644 index 7c3217b7663..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/ReaderTest.php +++ /dev/null @@ -1,491 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class ReaderTest extends \PHPUnit_Framework_TestCase { - - function testReadComponent() { - - $data = "BEGIN:VCALENDAR\r\nEND:VCALENDAR"; - - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - function testReadStream() { - - $data = "BEGIN:VCALENDAR\r\nEND:VCALENDAR"; - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $data); - rewind($stream); - - $result = Reader::read($stream); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - function testReadComponentUnixNewLine() { - - $data = "BEGIN:VCALENDAR\nEND:VCALENDAR"; - - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - function testReadComponentLineFold() { - - $data = "BEGIN:\r\n\tVCALENDAR\r\nE\r\n ND:VCALENDAR"; - - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testReadCorruptComponent() { - - $data = "BEGIN:VCALENDAR\r\nEND:FOO"; - - $result = Reader::read($data); - - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testReadCorruptSubComponent() { - - $data = "BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nEND:FOO\r\nEND:VCALENDAR"; - - $result = Reader::read($data); - - } - - function testReadProperty() { - - $data = "BEGIN:VCALENDAR\r\nSUMMARY:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->SUMMARY; - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('SUMMARY', $result->name); - $this->assertEquals('propValue', $result->getValue()); - - } - - function testReadPropertyWithNewLine() { - - $data = "BEGIN:VCALENDAR\r\nSUMMARY:Line1\\nLine2\\NLine3\\\\Not the 4th line!\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->SUMMARY; - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('SUMMARY', $result->name); - $this->assertEquals("Line1\nLine2\nLine3\\Not the 4th line!", $result->getValue()); - - } - - function testReadMappedProperty() { - - $data = "BEGIN:VCALENDAR\r\nDTSTART:20110529\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->DTSTART; - $this->assertInstanceOf('Sabre\\VObject\\Property\\ICalendar\\DateTime', $result); - $this->assertEquals('DTSTART', $result->name); - $this->assertEquals('20110529', $result->getValue()); - - } - - function testReadMappedPropertyGrouped() { - - $data = "BEGIN:VCALENDAR\r\nfoo.DTSTART:20110529\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->DTSTART; - $this->assertInstanceOf('Sabre\\VObject\\Property\\ICalendar\\DateTime', $result); - $this->assertEquals('DTSTART', $result->name); - $this->assertEquals('20110529', $result->getValue()); - - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testReadBrokenLine() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;propValue"; - $result = Reader::read($data); - - } - - function testReadPropertyInComponent() { - - $data = [ - "BEGIN:VCALENDAR", - "PROPNAME:propValue", - "END:VCALENDAR" - ]; - - $result = Reader::read(implode("\r\n", $data)); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertInstanceOf('Sabre\\VObject\\Property', $result->children()[0]); - $this->assertEquals('PROPNAME', $result->children()[0]->name); - $this->assertEquals('propValue', $result->children()[0]->getValue()); - - } - - function testReadNestedComponent() { - - $data = [ - "BEGIN:VCALENDAR", - "BEGIN:VTIMEZONE", - "BEGIN:DAYLIGHT", - "END:DAYLIGHT", - "END:VTIMEZONE", - "END:VCALENDAR" - ]; - - $result = Reader::read(implode("\r\n", $data)); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(1, count($result->children())); - $this->assertInstanceOf('Sabre\\VObject\\Component', $result->children()[0]); - $this->assertEquals('VTIMEZONE', $result->children()[0]->name); - $this->assertEquals(1, count($result->children()[0]->children())); - $this->assertInstanceOf('Sabre\\VObject\\Component', $result->children()[0]->children()[0]); - $this->assertEquals('DAYLIGHT', $result->children()[0]->children()[0]->name); - - - } - - function testReadPropertyParameter() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=paramvalue:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals('paramvalue', $result->parameters['PARAMNAME']->getValue()); - - } - - function testReadPropertyRepeatingParameter() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;N=1;N=2;N=3,4;N=\"5\",6;N=\"7,8\";N=9,10;N=^'11^':propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('N', $result->parameters['N']->name); - $this->assertEquals('1,2,3,4,5,6,7,8,9,10,"11"', $result->parameters['N']->getValue()); - $this->assertEquals([1, 2, 3, 4, 5, 6, "7,8", 9, 10, '"11"'], $result->parameters['N']->getParts()); - - } - - function testReadPropertyRepeatingNamelessGuessedParameter() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;WORK;VOICE;PREF:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('TYPE', $result->parameters['TYPE']->name); - $this->assertEquals('WORK,VOICE,PREF', $result->parameters['TYPE']->getValue()); - $this->assertEquals(['WORK', 'VOICE', 'PREF'], $result->parameters['TYPE']->getParts()); - - } - - function testReadPropertyNoName() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PRODIGY:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('TYPE', $result->parameters['TYPE']->name); - $this->assertTrue($result->parameters['TYPE']->noName); - $this->assertEquals('PRODIGY', $result->parameters['TYPE']); - - } - - function testReadPropertyParameterExtraColon() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=paramvalue:propValue:anotherrandomstring\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue:anotherrandomstring', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals('paramvalue', $result->parameters['PARAMNAME']->getValue()); - - } - - function testReadProperty2Parameters() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=paramvalue;PARAMNAME2=paramvalue2:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(2, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals('paramvalue', $result->parameters['PARAMNAME']->getValue()); - $this->assertEquals('PARAMNAME2', $result->parameters['PARAMNAME2']->name); - $this->assertEquals('paramvalue2', $result->parameters['PARAMNAME2']->getValue()); - - } - - function testReadPropertyParameterQuoted() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=\"paramvalue\":propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals('paramvalue', $result->parameters['PARAMNAME']->getValue()); - - } - - function testReadPropertyParameterNewLines() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=paramvalue1^nvalue2^^nvalue3:propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals("paramvalue1\nvalue2^nvalue3", $result->parameters['PARAMNAME']->getValue()); - - } - - function testReadPropertyParameterQuotedColon() { - - $data = "BEGIN:VCALENDAR\r\nPROPNAME;PARAMNAME=\"param:value\":propValue\r\nEND:VCALENDAR"; - $result = Reader::read($data); - $result = $result->PROPNAME; - - $this->assertInstanceOf('Sabre\\VObject\\Property', $result); - $this->assertEquals('PROPNAME', $result->name); - $this->assertEquals('propValue', $result->getValue()); - $this->assertEquals(1, count($result->parameters())); - $this->assertEquals('PARAMNAME', $result->parameters['PARAMNAME']->name); - $this->assertEquals('param:value', $result->parameters['PARAMNAME']->getValue()); - - } - - function testReadForgiving() { - - $data = [ - "BEGIN:VCALENDAR", - "X_PROP:propValue", - "END:VCALENDAR" - ]; - - $caught = false; - try { - $result = Reader::read(implode("\r\n", $data)); - } catch (ParseException $e) { - $caught = true; - } - - $this->assertEquals(true, $caught); - - $result = Reader::read(implode("\r\n", $data), Reader::OPTION_FORGIVING); - - $expected = implode("\r\n", [ - "BEGIN:VCALENDAR", - "X_PROP:propValue", - "END:VCALENDAR", - "" - ]); - - $this->assertEquals($expected, $result->serialize()); - - } - - function testReadWithInvalidLine() { - - $data = [ - "BEGIN:VCALENDAR", - "DESCRIPTION:propValue", - "Yes, we've actually seen a file with non-idented property values on multiple lines", - "END:VCALENDAR" - ]; - - $caught = false; - try { - $result = Reader::read(implode("\r\n", $data)); - } catch (ParseException $e) { - $caught = true; - } - - $this->assertEquals(true, $caught); - - $result = Reader::read(implode("\r\n", $data), Reader::OPTION_IGNORE_INVALID_LINES); - - $expected = implode("\r\n", [ - "BEGIN:VCALENDAR", - "DESCRIPTION:propValue", - "END:VCALENDAR", - "" - ]); - - $this->assertEquals($expected, $result->serialize()); - - } - - /** - * Reported as Issue 32. - * - * @expectedException \Sabre\VObject\ParseException - */ - function testReadIncompleteFile() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:1.0 -BEGIN:VEVENT -X-FUNAMBOL-FOLDER:DEFAULT_FOLDER -X-FUNAMBOL-ALLDAY:0 -DTSTART:20111017T110000Z -DTEND:20111017T123000Z -X-MICROSOFT-CDO-BUSYSTATUS:BUSY -CATEGORIES: -LOCATION;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:Netviewer Meeting -PRIORITY:1 -STATUS:3 -X-MICROSOFT-CDO-REPLYTIME:20111017T064200Z -SUMMARY;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:Kopieren: test -CLASS:PUBLIC -AALARM: -RRULE: -X-FUNAMBOL-BILLINGINFO: -X-FUNAMBOL-COMPANIES: -X-FUNAMBOL-MILEAGE: -X-FUNAMBOL-NOAGING:0 -ATTENDEE;STATUS=NEEDS ACTION;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:'Heino' heino@test.com -ATTENDEE;STATUS=NEEDS ACTION;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:'Markus' test@test.com -ATTENDEE;STATUS=NEEDS AC -ICS; - - Reader::read($input); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testReadBrokenInput() { - - Reader::read(false); - - } - - function testReadBOM() { - - $data = chr(0xef) . chr(0xbb) . chr(0xbf) . "BEGIN:VCALENDAR\r\nEND:VCALENDAR"; - $result = Reader::read($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - function testReadXMLComponent() { - - $data = <<<XML -<?xml version="1.0" encoding="utf-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - </vcalendar> -</icalendar> -XML; - - $result = Reader::readXML($data); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - - function testReadXMLStream() { - - $data = <<<XML -<?xml version="1.0" encoding="utf-8"?> -<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0"> - <vcalendar> - </vcalendar> -</icalendar> -XML; - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $data); - rewind($stream); - - $result = Reader::readXML($stream); - - $this->assertInstanceOf('Sabre\\VObject\\Component', $result); - $this->assertEquals('VCALENDAR', $result->name); - $this->assertEquals(0, count($result->children())); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ByMonthInDailyTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ByMonthInDailyTest.php deleted file mode 100644 index 204dd36df0f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ByMonthInDailyTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use DateTime; -use Sabre\VObject\Reader; - -class ByMonthInDailyTest extends \PHPUnit_Framework_TestCase { - - /** - * This tests the expansion of dates with DAILY frequency in RRULE with BYMONTH restrictions - */ - function testExpand() { - - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//iCal 4.0.4//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -TRANSP:OPAQUE -DTEND:20070925T183000Z -UID:uuid -DTSTAMP:19700101T000000Z -LOCATION: -DESCRIPTION: -STATUS:CONFIRMED -SEQUENCE:18 -SUMMARY:Stuff -DTSTART:20070925T160000Z -CREATED:20071004T144642Z -RRULE:FREQ=DAILY;BYMONTH=9,10;BYDAY=SU -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($ics); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2013-09-28'), new DateTime('2014-09-11')); - - foreach ($vcal->VEVENT as $event) { - $dates[] = $event->DTSTART->getValue(); - } - - $expectedDates = [ - "20130929T160000Z", - "20131006T160000Z", - "20131013T160000Z", - "20131020T160000Z", - "20131027T160000Z", - "20140907T160000Z" - ]; - - $this->assertEquals($expectedDates, $dates, 'Recursed dates are restricted by month'); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/BySetPosHangTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/BySetPosHangTest.php deleted file mode 100644 index 65e38f536e8..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/BySetPosHangTest.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use DateTime; -use Sabre\VObject\Reader; - -class BySetPosHangTest extends \PHPUnit_Framework_TestCase { - - /** - * Using this iCalendar object, including BYSETPOS=-2 causes the iterator - * to hang, as reported in ticket #212. - * - * See: https://github.com/fruux/sabre-vobject/issues/212 - */ - function testExpand() { - - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject 3.4.2//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -SUMMARY:Test event 1 -DTSTART;TZID=Europe/Copenhagen:20150101T170000 -RRULE:FREQ=MONTHLY;BYDAY=TH;BYSETPOS=-2 -UID:b4071499-6fe4-418a-83b8-2b8d5ebb38e4 -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($ics); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2015-01-01'), new DateTime('2016-01-01')); - - foreach ($vcal->VEVENT as $event) { - $dates[] = $event->DTSTART->getValue(); - } - - $expectedDates = [ - "20150101T160000Z", - "20150122T160000Z", - "20150219T160000Z", - "20150319T160000Z", - "20150423T150000Z", - "20150521T150000Z", - "20150618T150000Z", - "20150723T150000Z", - "20150820T150000Z", - "20150917T150000Z", - "20151022T150000Z", - "20151119T160000Z", - "20151224T160000Z", - ]; - - $this->assertEquals($expectedDates, $dates); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php deleted file mode 100644 index 3d7b6f19c82..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTime; -use DateTimeZone; -use Sabre\VObject\Reader; - -class ExpandFloatingTimesTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20150109T090000 -DTEND:20150109T100000 -RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20191002T070000Z;BYDAY=FR -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2015-01-01'), new DateTime('2015-01-31')); - $output = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20150109T090000Z -DTEND:20150109T100000Z -RECURRENCE-ID:20150109T090000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150116T090000Z -DTEND:20150116T100000Z -RECURRENCE-ID:20150116T090000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150123T090000Z -DTEND:20150123T100000Z -RECURRENCE-ID:20150123T090000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150130T090000Z -DTEND:20150130T100000Z -RECURRENCE-ID:20150130T090000Z -END:VEVENT -END:VCALENDAR - -ICS; - $this->assertVObjectEqualsVObject($output, $vcal); - - } - - function testExpandWithReferenceTimezone() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20150109T090000 -DTEND:20150109T100000 -RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20191002T070000Z;BYDAY=FR -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand( - new DateTime('2015-01-01'), - new DateTime('2015-01-31'), - new DateTimeZone('Europe/Berlin') - ); - - $output = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20150109T080000Z -DTEND:20150109T090000Z -RECURRENCE-ID:20150109T080000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150116T080000Z -DTEND:20150116T090000Z -RECURRENCE-ID:20150116T080000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150123T080000Z -DTEND:20150123T090000Z -RECURRENCE-ID:20150123T080000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20150130T080000Z -DTEND:20150130T090000Z -RECURRENCE-ID:20150130T080000Z -END:VEVENT -END:VCALENDAR - -ICS; - $this->assertVObjectEqualsVObject($output, $vcal); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/FifthTuesdayProblemTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/FifthTuesdayProblemTest.php deleted file mode 100644 index 2029ec9c5c6..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/FifthTuesdayProblemTest.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use Sabre\VObject\Reader; -use Sabre\VObject\Recur; - -class FifthTuesdayProblemTest extends \PHPUnit_Framework_TestCase { - - /** - * A pretty slow test. Had to be marked as 'medium' for phpunit to not die - * after 1 second. Would be good to optimize later. - * - * @medium - */ - function testGetDTEnd() { - - $ics = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//iCal 4.0.4//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -TRANSP:OPAQUE -DTEND;TZID=America/New_York:20070925T170000 -UID:uuid -DTSTAMP:19700101T000000Z -LOCATION: -DESCRIPTION: -STATUS:CONFIRMED -SEQUENCE:18 -SUMMARY:Stuff -DTSTART;TZID=America/New_York:20070925T160000 -CREATED:20071004T144642Z -RRULE:FREQ=MONTHLY;INTERVAL=1;UNTIL=20071030T035959Z;BYDAY=5TU -END:VEVENT -END:VCALENDAR -ICS; - - $vObject = Reader::read($ics); - $it = new Recur\EventIterator($vObject, (string)$vObject->VEVENT->UID); - - while ($it->valid()) { - $it->next(); - } - - // If we got here, it means we were successful. The bug that was in the - // system before would fail on the 5th tuesday of the month, if the 5th - // tuesday did not exist. - $this->assertTrue(true); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/HandleRDateExpandTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/HandleRDateExpandTest.php deleted file mode 100644 index 32dcf9330f7..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/HandleRDateExpandTest.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTime; -use DateTimeImmutable; -use DateTimeZone; -use Sabre\VObject\Reader; - -/** - * This is a unittest for Issue #53. - */ -class HandleRDateExpandTest extends \PHPUnit_Framework_TestCase { - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:2CD5887F7CF4600F7A3B1F8065099E40-240BDA7121B61224 -DTSTAMP;VALUE=DATE-TIME:20151014T110604Z -CREATED;VALUE=DATE-TIME:20151014T110245Z -LAST-MODIFIED;VALUE=DATE-TIME:20151014T110541Z -DTSTART;VALUE=DATE-TIME;TZID=Europe/Berlin:20151012T020000 -DTEND;VALUE=DATE-TIME;TZID=Europe/Berlin:20151012T013000 -SUMMARY:Test -SEQUENCE:2 -RDATE;VALUE=DATE-TIME;TZID=Europe/Berlin:20151015T020000,20151017T020000,20 - 151018T020000,20151020T020000 -TRANSP:OPAQUE -CLASS:PUBLIC -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2015-01-01'), new DateTime('2015-12-01')); - - $result = iterator_to_array($vcal->VEVENT); - - $this->assertEquals(5, count($result)); - - $utc = new DateTimeZone('UTC'); - $expected = [ - new DateTimeImmutable("2015-10-12", $utc), - new DateTimeImmutable("2015-10-15", $utc), - new DateTimeImmutable("2015-10-17", $utc), - new DateTimeImmutable("2015-10-18", $utc), - new DateTimeImmutable("2015-10-20", $utc), - ]; - - $result = array_map(function($ev) {return $ev->DTSTART->getDateTime();}, $result); - $this->assertEquals($expected, $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php deleted file mode 100644 index 82278293d61..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTime; -use Sabre\VObject\Reader; - -/** - * This is a unittest for Issue #53. - */ -class IncorrectExpandTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20130711T050000Z -DTEND:20130711T053000Z -RRULE:FREQ=DAILY;INTERVAL=1;COUNT=2 -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20130719T050000Z -DTEND:20130719T053000Z -RECURRENCE-ID:20130712T050000Z -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2011-01-01'), new DateTime('2014-01-01')); - - $output = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20130711T050000Z -DTEND:20130711T053000Z -RECURRENCE-ID:20130711T050000Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTSTART:20130719T050000Z -DTEND:20130719T053000Z -RECURRENCE-ID:20130712T050000Z -END:VEVENT -END:VCALENDAR - -ICS; - $this->assertVObjectEqualsVObject($output, $vcal); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/InfiniteLoopProblemTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/InfiniteLoopProblemTest.php deleted file mode 100644 index 491b0e87970..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/InfiniteLoopProblemTest.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTimeImmutable; -use DateTimeZone; -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Recur; - -class InfiniteLoopProblemTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - $this->vcal = new VCalendar(); - - } - - /** - * This bug came from a Fruux customer. This would result in a never-ending - * request. - */ - function testFastForwardTooFar() { - - $ev = $this->vcal->createComponent('VEVENT'); - $ev->UID = 'foobar'; - $ev->DTSTART = '20090420T180000Z'; - $ev->RRULE = 'FREQ=WEEKLY;BYDAY=MO;UNTIL=20090704T205959Z;INTERVAL=1'; - - $this->assertFalse($ev->isInTimeRange(new DateTimeImmutable('2012-01-01 12:00:00'), new DateTimeImmutable('3000-01-01 00:00:00'))); - - } - - /** - * Different bug, also likely an infinite loop. - */ - function testYearlyByMonthLoop() { - - $ev = $this->vcal->createComponent('VEVENT'); - $ev->UID = 'uuid'; - $ev->DTSTART = '20120101T154500'; - $ev->DTSTART['TZID'] = 'Europe/Berlin'; - $ev->RRULE = 'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA'; - $ev->DTEND = '20120101T164500'; - $ev->DTEND['TZID'] = 'Europe/Berlin'; - - // This recurrence rule by itself is a yearly rule that should happen - // every february. - // - // The BYDAY part expands this to every day of the month, but the - // BYSETPOS limits this to only the 1st day of the month. Very crazy - // way to specify this, and could have certainly been a lot easier. - $this->vcal->add($ev); - - $it = new Recur\EventIterator($this->vcal, 'uuid'); - $it->fastForward(new DateTimeImmutable('2012-01-29 23:00:00', new DateTimeZone('UTC'))); - - $collect = []; - - while ($it->valid()) { - $collect[] = $it->getDtStart(); - if ($it->getDtStart() > new DateTimeImmutable('2013-02-05 22:59:59', new DateTimeZone('UTC'))) { - break; - } - $it->next(); - - } - - $this->assertEquals( - [new DateTimeImmutable('2012-02-01 15:45:00', new DateTimeZone('Europe/Berlin'))], - $collect - ); - - } - - /** - * Something, somewhere produced an ics with an interval set to 0. Because - * this means we increase the current day (or week, month) by 0, this also - * results in an infinite loop. - * - * @expectedException \Sabre\VObject\InvalidDataException - * @return void - */ - function testZeroInterval() { - - $ev = $this->vcal->createComponent('VEVENT'); - $ev->UID = 'uuid'; - $ev->DTSTART = '20120824T145700Z'; - $ev->RRULE = 'FREQ=YEARLY;INTERVAL=0'; - $this->vcal->add($ev); - - $it = new Recur\EventIterator($this->vcal, 'uuid'); - $it->fastForward(new DateTimeImmutable('2013-01-01 23:00:00', new DateTimeZone('UTC'))); - - // if we got this far.. it means we are no longer infinitely looping - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue26Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue26Test.php deleted file mode 100644 index df8619da579..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue26Test.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use Sabre\VObject\Reader; -use Sabre\VObject\Recur\EventIterator; - -class Issue26Test extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:bae5d57a98 -RRULE:FREQ=MONTHLY;BYDAY=0MO,0TU,0WE,0TH,0FR;INTERVAL=1 -DTSTART;VALUE=DATE:20130401 -DTEND;VALUE=DATE:20130402 -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $it = new EventIterator($vcal, 'bae5d57a98'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue48Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue48Test.php deleted file mode 100644 index 179da816dda..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue48Test.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use DateTimeImmutable; -use DateTimeZone; - -class Issue48Test extends \PHPUnit_Framework_TestCase { - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTEND;TZID=Europe/Moscow:20130710T120000 -DTSTART;TZID=Europe/Moscow:20130710T110000 -RRULE:FREQ=DAILY;UNTIL=20130712T195959Z -END:VEVENT -BEGIN:VEVENT -UID:foo -DTEND;TZID=Europe/Moscow:20130713T120000 -DTSTART;TZID=Europe/Moscow:20130713T110000 -RECURRENCE-ID;TZID=Europe/Moscow:20130711T110000 -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $it = new Recur\EventIterator($vcal, 'foo'); - - $result = iterator_to_array($it); - - $tz = new DateTimeZone('Europe/Moscow'); - - $expected = [ - new DateTimeImmutable('2013-07-10 11:00:00', $tz), - new DateTimeImmutable('2013-07-12 11:00:00', $tz), - new DateTimeImmutable('2013-07-13 11:00:00', $tz), - ]; - - $this->assertEquals($expected, $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue50Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue50Test.php deleted file mode 100644 index 193bdd878de..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/Issue50Test.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -namespace Sabre\VObject; - -use DateTimeImmutable; -use DateTimeZone; - -class Issue50Test extends \PHPUnit_Framework_TestCase { - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN -BEGIN:VTIMEZONE -TZID:Europe/Brussels -X-LIC-LOCATION:Europe/Brussels -BEGIN:DAYLIGHT -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -TZNAME:CEST -DTSTART:19700329T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -TZNAME:CET -DTSTART:19701025T030000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -CREATED:20130705T142510Z -LAST-MODIFIED:20130715T132556Z -DTSTAMP:20130715T132556Z -UID:1aef0b27-3d92-4581-829a-11999dd36724 -SUMMARY:Werken -RRULE:FREQ=DAILY;COUNT=5 -DTSTART;TZID=Europe/Brussels:20130715T090000 -DTEND;TZID=Europe/Brussels:20130715T170000 -LOCATION:Job -DESCRIPTION:Vrij -X-MOZ-GENERATION:9 -END:VEVENT -BEGIN:VEVENT -CREATED:20130715T081654Z -LAST-MODIFIED:20130715T110931Z -DTSTAMP:20130715T110931Z -UID:1aef0b27-3d92-4581-829a-11999dd36724 -SUMMARY:Werken -RECURRENCE-ID;TZID=Europe/Brussels:20130719T090000 -DTSTART;TZID=Europe/Brussels:20130719T070000 -DTEND;TZID=Europe/Brussels:20130719T150000 -SEQUENCE:1 -LOCATION:Job -DESCRIPTION:Vrij -X-MOZ-GENERATION:1 -END:VEVENT -BEGIN:VEVENT -CREATED:20130715T111654Z -LAST-MODIFIED:20130715T132556Z -DTSTAMP:20130715T132556Z -UID:1aef0b27-3d92-4581-829a-11999dd36724 -SUMMARY:Werken -RECURRENCE-ID;TZID=Europe/Brussels:20130716T090000 -DTSTART;TZID=Europe/Brussels:20130716T070000 -DTEND;TZID=Europe/Brussels:20130716T150000 -SEQUENCE:1 -LOCATION:Job -X-MOZ-GENERATION:2 -END:VEVENT -BEGIN:VEVENT -CREATED:20130715T125942Z -LAST-MODIFIED:20130715T130023Z -DTSTAMP:20130715T130023Z -UID:1aef0b27-3d92-4581-829a-11999dd36724 -SUMMARY:Werken -RECURRENCE-ID;TZID=Europe/Brussels:20130717T090000 -DTSTART;TZID=Europe/Brussels:20130717T070000 -DTEND;TZID=Europe/Brussels:20130717T150000 -SEQUENCE:1 -LOCATION:Job -X-MOZ-GENERATION:3 -END:VEVENT -BEGIN:VEVENT -CREATED:20130715T130024Z -LAST-MODIFIED:20130715T130034Z -DTSTAMP:20130715T130034Z -UID:1aef0b27-3d92-4581-829a-11999dd36724 -SUMMARY:Werken -RECURRENCE-ID;TZID=Europe/Brussels:20130718T090000 -DTSTART;TZID=Europe/Brussels:20130718T090000 -DTEND;TZID=Europe/Brussels:20130718T170000 -LOCATION:Job -X-MOZ-GENERATION:5 -DESCRIPTION:Vrij -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $it = new Recur\EventIterator($vcal, '1aef0b27-3d92-4581-829a-11999dd36724'); - - $result = []; - foreach ($it as $instance) { - - $result[] = $instance; - - } - - $tz = new DateTimeZone('Europe/Brussels'); - - $this->assertEquals([ - new DateTimeImmutable('2013-07-15 09:00:00', $tz), - new DateTimeImmutable('2013-07-16 07:00:00', $tz), - new DateTimeImmutable('2013-07-17 07:00:00', $tz), - new DateTimeImmutable('2013-07-18 09:00:00', $tz), - new DateTimeImmutable('2013-07-19 07:00:00', $tz), - ], $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MainTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MainTest.php deleted file mode 100644 index 0d8c5b188c6..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MainTest.php +++ /dev/null @@ -1,1452 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTimeImmutable; -use DateTimeZone; -use Sabre\VObject\Component\VCalendar; -use Sabre\VObject\Recur\EventIterator; - -class MainTest extends \PHPUnit_Framework_TestCase { - - function testValues() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY;BYHOUR=10;BYMINUTE=5;BYSECOND=16;BYWEEKNO=32;BYYEARDAY=100,200'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07')); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $this->assertTrue($it->isInfinite()); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - * @depends testValues - */ - function testInvalidFreq() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - $ev->RRULE = 'FREQ=SMONTHLY;INTERVAL=3;UNTIL=20111025T000000Z'; - $ev->UID = 'foo'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testVCalendarNoUID() { - - $vcal = new VCalendar(); - $it = new EventIterator($vcal); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testVCalendarInvalidUID() { - - $vcal = new VCalendar(); - $it = new EventIterator($vcal, 'foo'); - - } - - /** - * @depends testValues - */ - function testHourly() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=HOURLY;INTERVAL=3;UNTIL=20111025T000000Z'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07 12:00:00', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - $vcal->add($ev); - - $it = new EventIterator($vcal, $ev->UID); - - // Max is to prevent overflow - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07 12:00:00', $tz), - new DateTimeImmutable('2011-10-07 15:00:00', $tz), - new DateTimeImmutable('2011-10-07 18:00:00', $tz), - new DateTimeImmutable('2011-10-07 21:00:00', $tz), - new DateTimeImmutable('2011-10-08 00:00:00', $tz), - new DateTimeImmutable('2011-10-08 03:00:00', $tz), - new DateTimeImmutable('2011-10-08 06:00:00', $tz), - new DateTimeImmutable('2011-10-08 09:00:00', $tz), - new DateTimeImmutable('2011-10-08 12:00:00', $tz), - new DateTimeImmutable('2011-10-08 15:00:00', $tz), - new DateTimeImmutable('2011-10-08 18:00:00', $tz), - new DateTimeImmutable('2011-10-08 21:00:00', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testDaily() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY;INTERVAL=3;UNTIL=20111025T000000Z'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, $ev->UID); - - // Max is to prevent overflow - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2011-10-10', $tz), - new DateTimeImmutable('2011-10-13', $tz), - new DateTimeImmutable('2011-10-16', $tz), - new DateTimeImmutable('2011-10-19', $tz), - new DateTimeImmutable('2011-10-22', $tz), - new DateTimeImmutable('2011-10-25', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testNoRRULE() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, $ev->UID); - - // Max is to prevent overflow - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testDailyByDayByHour() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY;BYDAY=SA,SU;BYHOUR=6,7'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-08 06:00:00', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-08 06:00:00', $tz), - new DateTimeImmutable('2011-10-08 07:00:00', $tz), - new DateTimeImmutable('2011-10-09 06:00:00', $tz), - new DateTimeImmutable('2011-10-09 07:00:00', $tz), - new DateTimeImmutable('2011-10-15 06:00:00', $tz), - new DateTimeImmutable('2011-10-15 07:00:00', $tz), - new DateTimeImmutable('2011-10-16 06:00:00', $tz), - new DateTimeImmutable('2011-10-16 07:00:00', $tz), - new DateTimeImmutable('2011-10-22 06:00:00', $tz), - new DateTimeImmutable('2011-10-22 07:00:00', $tz), - new DateTimeImmutable('2011-10-23 06:00:00', $tz), - new DateTimeImmutable('2011-10-23 07:00:00', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testDailyByHour() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY;INTERVAL=2;BYHOUR=10,11,12,13,14,15'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2012-10-11 12:00:00', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2012-10-11 12:00:00', $tz), - new DateTimeImmutable('2012-10-11 13:00:00', $tz), - new DateTimeImmutable('2012-10-11 14:00:00', $tz), - new DateTimeImmutable('2012-10-11 15:00:00', $tz), - new DateTimeImmutable('2012-10-13 10:00:00', $tz), - new DateTimeImmutable('2012-10-13 11:00:00', $tz), - new DateTimeImmutable('2012-10-13 12:00:00', $tz), - new DateTimeImmutable('2012-10-13 13:00:00', $tz), - new DateTimeImmutable('2012-10-13 14:00:00', $tz), - new DateTimeImmutable('2012-10-13 15:00:00', $tz), - new DateTimeImmutable('2012-10-15 10:00:00', $tz), - new DateTimeImmutable('2012-10-15 11:00:00', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testDailyByDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY;INTERVAL=2;BYDAY=TU,WE,FR'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2011-10-11', $tz), - new DateTimeImmutable('2011-10-19', $tz), - new DateTimeImmutable('2011-10-21', $tz), - new DateTimeImmutable('2011-10-25', $tz), - new DateTimeImmutable('2011-11-02', $tz), - new DateTimeImmutable('2011-11-04', $tz), - new DateTimeImmutable('2011-11-08', $tz), - new DateTimeImmutable('2011-11-16', $tz), - new DateTimeImmutable('2011-11-18', $tz), - new DateTimeImmutable('2011-11-22', $tz), - new DateTimeImmutable('2011-11-30', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testWeekly() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=WEEKLY;INTERVAL=2;COUNT=10'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Max is to prevent overflow - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2011-10-21', $tz), - new DateTimeImmutable('2011-11-04', $tz), - new DateTimeImmutable('2011-11-18', $tz), - new DateTimeImmutable('2011-12-02', $tz), - new DateTimeImmutable('2011-12-16', $tz), - new DateTimeImmutable('2011-12-30', $tz), - new DateTimeImmutable('2012-01-13', $tz), - new DateTimeImmutable('2012-01-27', $tz), - new DateTimeImmutable('2012-02-10', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testWeeklyByDayByHour() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=MO;BYHOUR=8,9,10'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07 08:00:00', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 15; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07 08:00:00', $tz), - new DateTimeImmutable('2011-10-07 09:00:00', $tz), - new DateTimeImmutable('2011-10-07 10:00:00', $tz), - new DateTimeImmutable('2011-10-18 08:00:00', $tz), - new DateTimeImmutable('2011-10-18 09:00:00', $tz), - new DateTimeImmutable('2011-10-18 10:00:00', $tz), - new DateTimeImmutable('2011-10-19 08:00:00', $tz), - new DateTimeImmutable('2011-10-19 09:00:00', $tz), - new DateTimeImmutable('2011-10-19 10:00:00', $tz), - new DateTimeImmutable('2011-10-21 08:00:00', $tz), - new DateTimeImmutable('2011-10-21 09:00:00', $tz), - new DateTimeImmutable('2011-10-21 10:00:00', $tz), - new DateTimeImmutable('2011-11-01 08:00:00', $tz), - new DateTimeImmutable('2011-11-01 09:00:00', $tz), - new DateTimeImmutable('2011-11-01 10:00:00', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testWeeklyByDaySpecificHour() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07 18:00:00', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07 18:00:00', $tz), - new DateTimeImmutable('2011-10-18 18:00:00', $tz), - new DateTimeImmutable('2011-10-19 18:00:00', $tz), - new DateTimeImmutable('2011-10-21 18:00:00', $tz), - new DateTimeImmutable('2011-11-01 18:00:00', $tz), - new DateTimeImmutable('2011-11-02 18:00:00', $tz), - new DateTimeImmutable('2011-11-04 18:00:00', $tz), - new DateTimeImmutable('2011-11-15 18:00:00', $tz), - new DateTimeImmutable('2011-11-16 18:00:00', $tz), - new DateTimeImmutable('2011-11-18 18:00:00', $tz), - new DateTimeImmutable('2011-11-29 18:00:00', $tz), - new DateTimeImmutable('2011-11-30 18:00:00', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testWeeklyByDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // Grabbing the next 12 items - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2011-10-18', $tz), - new DateTimeImmutable('2011-10-19', $tz), - new DateTimeImmutable('2011-10-21', $tz), - new DateTimeImmutable('2011-11-01', $tz), - new DateTimeImmutable('2011-11-02', $tz), - new DateTimeImmutable('2011-11-04', $tz), - new DateTimeImmutable('2011-11-15', $tz), - new DateTimeImmutable('2011-11-16', $tz), - new DateTimeImmutable('2011-11-18', $tz), - new DateTimeImmutable('2011-11-29', $tz), - new DateTimeImmutable('2011-11-30', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testMonthly() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;INTERVAL=3;COUNT=5'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-12-05', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 14; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-12-05', $tz), - new DateTimeImmutable('2012-03-05', $tz), - new DateTimeImmutable('2012-06-05', $tz), - new DateTimeImmutable('2012-09-05', $tz), - new DateTimeImmutable('2012-12-05', $tz), - ], - $result - ); - - - } - - /** - * @depends testValues - */ - function testMonthlyEndOfMonth() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;INTERVAL=2;COUNT=12'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-12-31', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 14; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-12-31', $tz), - new DateTimeImmutable('2012-08-31', $tz), - new DateTimeImmutable('2012-10-31', $tz), - new DateTimeImmutable('2012-12-31', $tz), - new DateTimeImmutable('2013-08-31', $tz), - new DateTimeImmutable('2013-10-31', $tz), - new DateTimeImmutable('2013-12-31', $tz), - new DateTimeImmutable('2014-08-31', $tz), - new DateTimeImmutable('2014-10-31', $tz), - new DateTimeImmutable('2014-12-31', $tz), - new DateTimeImmutable('2015-08-31', $tz), - new DateTimeImmutable('2015-10-31', $tz), - ], - $result - ); - - - } - - /** - * @depends testValues - */ - function testMonthlyByMonthDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;INTERVAL=5;COUNT=9;BYMONTHDAY=1,31,-7'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-01-01', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 14; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-01-01', $tz), - new DateTimeImmutable('2011-01-25', $tz), - new DateTimeImmutable('2011-01-31', $tz), - new DateTimeImmutable('2011-06-01', $tz), - new DateTimeImmutable('2011-06-24', $tz), - new DateTimeImmutable('2011-11-01', $tz), - new DateTimeImmutable('2011-11-24', $tz), - new DateTimeImmutable('2012-04-01', $tz), - new DateTimeImmutable('2012-04-24', $tz), - ], - $result - ); - - } - - /** - * A pretty slow test. Had to be marked as 'medium' for phpunit to not die - * after 1 second. Would be good to optimize later. - * - * @depends testValues - * @medium - */ - function testMonthlyByDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;INTERVAL=2;COUNT=16;BYDAY=MO,-2TU,+1WE,3TH'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-01-03', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-01-03', $tz), - new DateTimeImmutable('2011-01-05', $tz), - new DateTimeImmutable('2011-01-10', $tz), - new DateTimeImmutable('2011-01-17', $tz), - new DateTimeImmutable('2011-01-18', $tz), - new DateTimeImmutable('2011-01-20', $tz), - new DateTimeImmutable('2011-01-24', $tz), - new DateTimeImmutable('2011-01-31', $tz), - new DateTimeImmutable('2011-03-02', $tz), - new DateTimeImmutable('2011-03-07', $tz), - new DateTimeImmutable('2011-03-14', $tz), - new DateTimeImmutable('2011-03-17', $tz), - new DateTimeImmutable('2011-03-21', $tz), - new DateTimeImmutable('2011-03-22', $tz), - new DateTimeImmutable('2011-03-28', $tz), - new DateTimeImmutable('2011-05-02', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testMonthlyByDayByMonthDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;COUNT=10;BYDAY=MO;BYMONTHDAY=1'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-08-01', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-08-01', $tz), - new DateTimeImmutable('2012-10-01', $tz), - new DateTimeImmutable('2013-04-01', $tz), - new DateTimeImmutable('2013-07-01', $tz), - new DateTimeImmutable('2014-09-01', $tz), - new DateTimeImmutable('2014-12-01', $tz), - new DateTimeImmutable('2015-06-01', $tz), - new DateTimeImmutable('2016-02-01', $tz), - new DateTimeImmutable('2016-08-01', $tz), - new DateTimeImmutable('2017-05-01', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testMonthlyByDayBySetPos() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=MONTHLY;COUNT=10;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,-1'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-01-03', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-01-03', $tz), - new DateTimeImmutable('2011-01-31', $tz), - new DateTimeImmutable('2011-02-01', $tz), - new DateTimeImmutable('2011-02-28', $tz), - new DateTimeImmutable('2011-03-01', $tz), - new DateTimeImmutable('2011-03-31', $tz), - new DateTimeImmutable('2011-04-01', $tz), - new DateTimeImmutable('2011-04-29', $tz), - new DateTimeImmutable('2011-05-02', $tz), - new DateTimeImmutable('2011-05-31', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testYearly() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=10;INTERVAL=3'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-01-01', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-01-01', $tz), - new DateTimeImmutable('2014-01-01', $tz), - new DateTimeImmutable('2017-01-01', $tz), - new DateTimeImmutable('2020-01-01', $tz), - new DateTimeImmutable('2023-01-01', $tz), - new DateTimeImmutable('2026-01-01', $tz), - new DateTimeImmutable('2029-01-01', $tz), - new DateTimeImmutable('2032-01-01', $tz), - new DateTimeImmutable('2035-01-01', $tz), - new DateTimeImmutable('2038-01-01', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testYearlyLeapYear() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=3'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2012-02-29', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2012-02-29', $tz), - new DateTimeImmutable('2016-02-29', $tz), - new DateTimeImmutable('2020-02-29', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testYearlyByMonth() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYMONTH=4,10'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-04-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-04-07', $tz), - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2015-04-07', $tz), - new DateTimeImmutable('2015-10-07', $tz), - new DateTimeImmutable('2019-04-07', $tz), - new DateTimeImmutable('2019-10-07', $tz), - new DateTimeImmutable('2023-04-07', $tz), - new DateTimeImmutable('2023-10-07', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testYearlyByMonthByDay() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-04-04', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-04-04', $tz), - new DateTimeImmutable('2011-04-24', $tz), - new DateTimeImmutable('2011-10-03', $tz), - new DateTimeImmutable('2011-10-30', $tz), - new DateTimeImmutable('2016-04-04', $tz), - new DateTimeImmutable('2016-04-24', $tz), - new DateTimeImmutable('2016-10-03', $tz), - new DateTimeImmutable('2016-10-30', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testFastForward() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU'; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-04-04', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - // The idea is that we're fast-forwarding too far in the future, so - // there will be no results left. - $it->fastForward(new DateTimeImmutable('2020-05-05', new DateTimeZone('UTC'))); - - $max = 20; - $result = []; - while ($item = $it->current()) { - - $result[] = $item; - $max--; - - if (!$max) break; - $it->next(); - - } - - $this->assertEquals([], $result); - - } - - /** - * @depends testValues - */ - function testFastForwardAllDayEventThatStopAtTheStartTime() { - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=DAILY'; - - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-04-04', new DateTimeZone('UTC'))); - $ev->add($dtStart); - - $dtEnd = $vcal->createProperty('DTSTART'); - $dtEnd->setDateTime(new DateTimeImmutable('2011-04-05', new DateTimeZone('UTC'))); - $ev->add($dtEnd); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $it->fastForward(new DateTimeImmutable('2011-04-05T000000', new DateTimeZone('UTC'))); - - $this->assertEquals(new DateTimeImmutable('2011-04-06'), $it->getDTStart()); - } - - /** - * @depends testValues - */ - function testComplexExclusions() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RRULE = 'FREQ=YEARLY;COUNT=10'; - $dtStart = $vcal->createProperty('DTSTART'); - - $tz = new DateTimeZone('Canada/Eastern'); - $dtStart->setDateTime(new DateTimeImmutable('2011-01-01 13:50:20', $tz)); - - $exDate1 = $vcal->createProperty('EXDATE'); - $exDate1->setDateTimes([new DateTimeImmutable('2012-01-01 13:50:20', $tz), new DateTimeImmutable('2014-01-01 13:50:20', $tz)]); - $exDate2 = $vcal->createProperty('EXDATE'); - $exDate2->setDateTimes([new DateTimeImmutable('2016-01-01 13:50:20', $tz)]); - - $ev->add($dtStart); - $ev->add($exDate1); - $ev->add($exDate2); - - $vcal->add($ev); - - $it = new EventIterator($vcal, (string)$ev->UID); - - $max = 20; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $this->assertEquals( - [ - new DateTimeImmutable('2011-01-01 13:50:20', $tz), - new DateTimeImmutable('2013-01-01 13:50:20', $tz), - new DateTimeImmutable('2015-01-01 13:50:20', $tz), - new DateTimeImmutable('2017-01-01 13:50:20', $tz), - new DateTimeImmutable('2018-01-01 13:50:20', $tz), - new DateTimeImmutable('2019-01-01 13:50:20', $tz), - new DateTimeImmutable('2020-01-01 13:50:20', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - */ - function testOverridenEvent() { - - $vcal = new VCalendar(); - - $ev1 = $vcal->createComponent('VEVENT'); - $ev1->UID = 'overridden'; - $ev1->RRULE = 'FREQ=DAILY;COUNT=10'; - $ev1->DTSTART = '20120107T120000Z'; - $ev1->SUMMARY = 'baseEvent'; - - $vcal->add($ev1); - - // ev2 overrides an event, and puts it on 2pm instead. - $ev2 = $vcal->createComponent('VEVENT'); - $ev2->UID = 'overridden'; - $ev2->{'RECURRENCE-ID'} = '20120110T120000Z'; - $ev2->DTSTART = '20120110T140000Z'; - $ev2->SUMMARY = 'Event 2'; - - $vcal->add($ev2); - - // ev3 overrides an event, and puts it 2 days and 2 hours later - $ev3 = $vcal->createComponent('VEVENT'); - $ev3->UID = 'overridden'; - $ev3->{'RECURRENCE-ID'} = '20120113T120000Z'; - $ev3->DTSTART = '20120115T140000Z'; - $ev3->SUMMARY = 'Event 3'; - - $vcal->add($ev3); - - $it = new EventIterator($vcal, 'overridden'); - - $dates = []; - $summaries = []; - while ($it->valid()) { - - $dates[] = $it->getDTStart(); - $summaries[] = (string)$it->getEventObject()->SUMMARY; - $it->next(); - - } - - $tz = new DateTimeZone('UTC'); - $this->assertEquals([ - new DateTimeImmutable('2012-01-07 12:00:00', $tz), - new DateTimeImmutable('2012-01-08 12:00:00', $tz), - new DateTimeImmutable('2012-01-09 12:00:00', $tz), - new DateTimeImmutable('2012-01-10 14:00:00', $tz), - new DateTimeImmutable('2012-01-11 12:00:00', $tz), - new DateTimeImmutable('2012-01-12 12:00:00', $tz), - new DateTimeImmutable('2012-01-14 12:00:00', $tz), - new DateTimeImmutable('2012-01-15 12:00:00', $tz), - new DateTimeImmutable('2012-01-15 14:00:00', $tz), - new DateTimeImmutable('2012-01-16 12:00:00', $tz), - ], $dates); - - $this->assertEquals([ - 'baseEvent', - 'baseEvent', - 'baseEvent', - 'Event 2', - 'baseEvent', - 'baseEvent', - 'baseEvent', - 'baseEvent', - 'Event 3', - 'baseEvent', - ], $summaries); - - } - - /** - * @depends testValues - */ - function testOverridenEvent2() { - - $vcal = new VCalendar(); - - $ev1 = $vcal->createComponent('VEVENT'); - $ev1->UID = 'overridden'; - $ev1->RRULE = 'FREQ=WEEKLY;COUNT=3'; - $ev1->DTSTART = '20120112T120000Z'; - $ev1->SUMMARY = 'baseEvent'; - - $vcal->add($ev1); - - // ev2 overrides an event, and puts it 6 days earlier instead. - $ev2 = $vcal->createComponent('VEVENT'); - $ev2->UID = 'overridden'; - $ev2->{'RECURRENCE-ID'} = '20120119T120000Z'; - $ev2->DTSTART = '20120113T120000Z'; - $ev2->SUMMARY = 'Override!'; - - $vcal->add($ev2); - - $it = new EventIterator($vcal, 'overridden'); - - $dates = []; - $summaries = []; - while ($it->valid()) { - - $dates[] = $it->getDTStart(); - $summaries[] = (string)$it->getEventObject()->SUMMARY; - $it->next(); - - } - - $tz = new DateTimeZone('UTC'); - $this->assertEquals([ - new DateTimeImmutable('2012-01-12 12:00:00', $tz), - new DateTimeImmutable('2012-01-13 12:00:00', $tz), - new DateTimeImmutable('2012-01-26 12:00:00', $tz), - - ], $dates); - - $this->assertEquals([ - 'baseEvent', - 'Override!', - 'baseEvent', - ], $summaries); - - } - - /** - * @depends testValues - */ - function testOverridenEventNoValuesExpected() { - - $vcal = new VCalendar(); - $ev1 = $vcal->createComponent('VEVENT'); - - $ev1->UID = 'overridden'; - $ev1->RRULE = 'FREQ=WEEKLY;COUNT=3'; - $ev1->DTSTART = '20120124T120000Z'; - $ev1->SUMMARY = 'baseEvent'; - - $vcal->add($ev1); - - // ev2 overrides an event, and puts it 6 days earlier instead. - $ev2 = $vcal->createComponent('VEVENT'); - $ev2->UID = 'overridden'; - $ev2->{'RECURRENCE-ID'} = '20120131T120000Z'; - $ev2->DTSTART = '20120125T120000Z'; - $ev2->SUMMARY = 'Override!'; - - $vcal->add($ev2); - - $it = new EventIterator($vcal, 'overridden'); - - $dates = []; - $summaries = []; - - // The reported problem was specifically related to the VCALENDAR - // expansion. In this parcitular case, we had to forward to the 28th of - // january. - $it->fastForward(new DateTimeImmutable('2012-01-28 23:00:00')); - - // We stop the loop when it hits the 6th of februari. Normally this - // iterator would hit 24, 25 (overriden from 31) and 7 feb but because - // we 'filter' from the 28th till the 6th, we should get 0 results. - while ($it->valid() && $it->getDTStart() < new DateTimeImmutable('2012-02-06 23:00:00')) { - - $dates[] = $it->getDTStart(); - $summaries[] = (string)$it->getEventObject()->SUMMARY; - $it->next(); - - } - - $this->assertEquals([], $dates); - $this->assertEquals([], $summaries); - - } - - /** - * @depends testValues - */ - function testRDATE() { - - $vcal = new VCalendar(); - $ev = $vcal->createComponent('VEVENT'); - - $ev->UID = 'bla'; - $ev->RDATE = [ - new DateTimeImmutable('2014-08-07', new DateTimeZone('UTC')), - new DateTimeImmutable('2014-08-08', new DateTimeZone('UTC')), - ]; - $dtStart = $vcal->createProperty('DTSTART'); - $dtStart->setDateTime(new DateTimeImmutable('2011-10-07', new DateTimeZone('UTC'))); - - $ev->add($dtStart); - - $vcal->add($ev); - - $it = new EventIterator($vcal, $ev->UID); - - // Max is to prevent overflow - $max = 12; - $result = []; - foreach ($it as $item) { - - $result[] = $item; - $max--; - - if (!$max) break; - - } - - $tz = new DateTimeZone('UTC'); - - $this->assertEquals( - [ - new DateTimeImmutable('2011-10-07', $tz), - new DateTimeImmutable('2014-08-07', $tz), - new DateTimeImmutable('2014-08-08', $tz), - ], - $result - ); - - } - - /** - * @depends testValues - * @expectedException \InvalidArgumentException - */ - function testNoMasterBadUID() { - - $vcal = new VCalendar(); - // ev2 overrides an event, and puts it on 2pm instead. - $ev2 = $vcal->createComponent('VEVENT'); - $ev2->UID = 'overridden'; - $ev2->{'RECURRENCE-ID'} = '20120110T120000Z'; - $ev2->DTSTART = '20120110T140000Z'; - $ev2->SUMMARY = 'Event 2'; - - $vcal->add($ev2); - - // ev3 overrides an event, and puts it 2 days and 2 hours later - $ev3 = $vcal->createComponent('VEVENT'); - $ev3->UID = 'overridden'; - $ev3->{'RECURRENCE-ID'} = '20120113T120000Z'; - $ev3->DTSTART = '20120115T140000Z'; - $ev3->SUMMARY = 'Event 3'; - - $vcal->add($ev3); - - $it = new EventIterator($vcal, 'broken'); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MaxInstancesTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MaxInstancesTest.php deleted file mode 100644 index 1e94032a308..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MaxInstancesTest.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTime; -use Sabre\VObject\Reader; -use Sabre\VObject\Settings; - -class MaxInstancesTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \Sabre\VObject\Recur\MaxInstancesExceededException - */ - function testExceedMaxRecurrences() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140803T120000Z -RRULE:FREQ=WEEKLY -SUMMARY:Original -END:VEVENT -END:VCALENDAR -ICS; - - $temp = Settings::$maxRecurrences; - Settings::$maxRecurrences = 4; - try { - - $vcal = Reader::read($input); - $vcal->expand(new DateTime('2014-08-01'), new DateTime('2014-09-01')); - - } finally { - Settings::$maxRecurrences = $temp; - } - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php deleted file mode 100644 index fc8c518dcda..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur\EventIterator; - -use DateTime; -use Sabre\VObject\Reader; - -class MissingOverriddenTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testExpand() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20130727T120000Z -DURATION:PT1H -RRULE:FREQ=DAILY;COUNT=2 -SUMMARY:A -END:VEVENT -BEGIN:VEVENT -RECURRENCE-ID:20130728T120000Z -UID:foo -DTSTART:20140101T120000Z -DURATION:PT1H -SUMMARY:B -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $vcal = $vcal->expand(new DateTime('2011-01-01'), new DateTime('2015-01-01')); - - $output = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foo -DTSTART:20130727T120000Z -DURATION:PT1H -SUMMARY:A -RECURRENCE-ID:20130727T120000Z -END:VEVENT -BEGIN:VEVENT -RECURRENCE-ID:20130728T120000Z -UID:foo -DTSTART:20140101T120000Z -DURATION:PT1H -SUMMARY:B -END:VEVENT -END:VCALENDAR -ICS; - $this->assertVObjectEqualsVObject($output, $vcal); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/NoInstancesTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/NoInstancesTest.php deleted file mode 100644 index 84c7ec13e61..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/NoInstancesTest.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use - Sabre\VObject\Reader; - -class NoInstancesTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \Sabre\VObject\Recur\NoInstancesException - */ - function testRecurrence() { - - $input = <<<ICS -BEGIN:VCALENDAR -PRODID:-//Google Inc//Google Calendar 70.9054//EN -VERSION:2.0 -BEGIN:VEVENT -DTSTART;TZID=Europe/Berlin:20130329T140000 -DTEND;TZID=Europe/Berlin:20130329T153000 -RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20130412T115959Z -EXDATE;TZID=Europe/Berlin:20130405T140000 -EXDATE;TZID=Europe/Berlin:20130329T140000 -DTSTAMP:20140916T201215Z -UID:foo -SEQUENCE:1 -SUMMARY:foo -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCalendar', $vcal); - - $it = new EventIterator($vcal, 'foo'); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php deleted file mode 100644 index 78c0782c877..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -namespace Sabre\VObject\RecurrenceIterator; - -use DateTime; -use Sabre\VObject\Reader; - -class OverrideFirstEventTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testOverrideFirstEvent() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140803T120000Z -RRULE:FREQ=WEEKLY -SUMMARY:Original -END:VEVENT -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140803T120000Z -DTSTART:20140803T120000Z -SUMMARY:Overridden -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $vcal = $vcal->expand(new DateTime('2014-08-01'), new DateTime('2014-09-01')); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -RECURRENCE-ID:20140803T120000Z -DTSTART:20140803T120000Z -SUMMARY:Overridden -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTART:20140810T120000Z -SUMMARY:Original -RECURRENCE-ID:20140810T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTART:20140817T120000Z -SUMMARY:Original -RECURRENCE-ID:20140817T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTART:20140824T120000Z -SUMMARY:Original -RECURRENCE-ID:20140824T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTART:20140831T120000Z -SUMMARY:Original -RECURRENCE-ID:20140831T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $vcal - ); - - - } - - function testRemoveFirstEvent() { - - $input = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140803T120000Z -RRULE:FREQ=WEEKLY -EXDATE:20140803T120000Z -SUMMARY:Original -END:VEVENT -END:VCALENDAR -ICS; - - $vcal = Reader::read($input); - $vcal = $vcal->expand(new DateTime('2014-08-01'), new DateTime('2014-08-19')); - - $expected = <<<ICS -BEGIN:VCALENDAR -VERSION:2.0 -BEGIN:VEVENT -UID:foobar -DTSTART:20140810T120000Z -SUMMARY:Original -RECURRENCE-ID:20140810T120000Z -END:VEVENT -BEGIN:VEVENT -UID:foobar -DTSTART:20140817T120000Z -SUMMARY:Original -RECURRENCE-ID:20140817T120000Z -END:VEVENT -END:VCALENDAR -ICS; - - $this->assertVObjectEqualsVObject( - $expected, - $vcal - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/SameDateForRecurringEventsTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/SameDateForRecurringEventsTest.php deleted file mode 100644 index b89f25aaa49..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/EventIterator/SameDateForRecurringEventsTest.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use Sabre\VObject\Reader; - -/** - * Testing case when overridden recurring events have same start date. - * - * Class SameDateForRecurringEventsTest - */ -class SameDateForRecurringEventsTest extends \PHPUnit_Framework_TestCase -{ - - /** - * Checking is all events iterated by EventIterator. - */ - function testAllEventsArePresentInIterator() - { - $ics = <<<ICS -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:1 -DTSTART;TZID=Europe/Kiev:20160713T110000 -DTEND;TZID=Europe/Kiev:20160713T113000 -RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3 -END:VEVENT -BEGIN:VEVENT -UID:2 -DTSTART;TZID=Europe/Kiev:20160713T110000 -DTEND;TZID=Europe/Kiev:20160713T113000 -RECURRENCE-ID;TZID=Europe/Kiev:20160714T110000 -END:VEVENT -BEGIN:VEVENT -UID:3 -DTSTART;TZID=Europe/Kiev:20160713T110000 -DTEND;TZID=Europe/Kiev:20160713T113000 -RECURRENCE-ID;TZID=Europe/Kiev:20160715T110000 -END:VEVENT -BEGIN:VEVENT -UID:4 -DTSTART;TZID=Europe/Kiev:20160713T110000 -DTEND;TZID=Europe/Kiev:20160713T113000 -RECURRENCE-ID;TZID=Europe/Kiev:20160716T110000 -END:VEVENT -END:VCALENDAR - - -ICS; - $vCalendar = Reader::read($ics); - $eventIterator = new EventIterator($vCalendar->getComponents()); - - $this->assertEquals(4, iterator_count($eventIterator), 'in ICS 4 events'); - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RDateIteratorTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RDateIteratorTest.php deleted file mode 100644 index e2852dc6986..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RDateIteratorTest.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use DateTimeImmutable; -use DateTimeZone; - -class RDateIteratorTest extends \PHPUnit_Framework_TestCase { - - function testSimple() { - - $utc = new DateTimeZone('UTC'); - $it = new RDateIterator('20140901T000000Z,20141001T000000Z', new DateTimeImmutable('2014-08-01 00:00:00', $utc)); - - $expected = [ - new DateTimeImmutable('2014-08-01 00:00:00', $utc), - new DateTimeImmutable('2014-09-01 00:00:00', $utc), - new DateTimeImmutable('2014-10-01 00:00:00', $utc), - ]; - - $this->assertEquals( - $expected, - iterator_to_array($it) - ); - - $this->assertFalse($it->isInfinite()); - - } - - function testTimezone() { - - $tz = new DateTimeZone('Europe/Berlin'); - $it = new RDateIterator('20140901T000000,20141001T000000', new DateTimeImmutable('2014-08-01 00:00:00', $tz)); - - $expected = [ - new DateTimeImmutable('2014-08-01 00:00:00', $tz), - new DateTimeImmutable('2014-09-01 00:00:00', $tz), - new DateTimeImmutable('2014-10-01 00:00:00', $tz), - ]; - - $this->assertEquals( - $expected, - iterator_to_array($it) - ); - - - $this->assertFalse($it->isInfinite()); - - } - - - function testFastForward() { - - $utc = new DateTimeZone('UTC'); - $it = new RDateIterator('20140901T000000Z,20141001T000000Z', new DateTimeImmutable('2014-08-01 00:00:00', $utc)); - - $it->fastForward(new DateTimeImmutable('2014-08-15 00:00:00')); - - $result = []; - while ($it->valid()) { - $result[] = $it->current(); - $it->next(); - } - - $expected = [ - new DateTimeImmutable('2014-09-01 00:00:00', $utc), - new DateTimeImmutable('2014-10-01 00:00:00', $utc), - ]; - - $this->assertEquals( - $expected, - $result - ); - - $this->assertFalse($it->isInfinite()); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RRuleIteratorTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RRuleIteratorTest.php deleted file mode 100644 index 84649f41f37..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Recur/RRuleIteratorTest.php +++ /dev/null @@ -1,995 +0,0 @@ -<?php - -namespace Sabre\VObject\Recur; - -use DateTime; -use DateTimeZone; - -class RRuleIteratorTest extends \PHPUnit_Framework_TestCase { - - function testHourly() { - - $this->parse( - 'FREQ=HOURLY;INTERVAL=3;COUNT=12', - '2011-10-07 12:00:00', - [ - '2011-10-07 12:00:00', - '2011-10-07 15:00:00', - '2011-10-07 18:00:00', - '2011-10-07 21:00:00', - '2011-10-08 00:00:00', - '2011-10-08 03:00:00', - '2011-10-08 06:00:00', - '2011-10-08 09:00:00', - '2011-10-08 12:00:00', - '2011-10-08 15:00:00', - '2011-10-08 18:00:00', - '2011-10-08 21:00:00', - ] - ); - - } - - function testDaily() { - - $this->parse( - 'FREQ=DAILY;INTERVAL=3;UNTIL=20111025T000000Z', - '2011-10-07', - [ - '2011-10-07 00:00:00', - '2011-10-10 00:00:00', - '2011-10-13 00:00:00', - '2011-10-16 00:00:00', - '2011-10-19 00:00:00', - '2011-10-22 00:00:00', - '2011-10-25 00:00:00', - ] - ); - - } - - function testDailyByDayByHour() { - - $this->parse( - 'FREQ=DAILY;BYDAY=SA,SU;BYHOUR=6,7', - '2011-10-08 06:00:00', - [ - '2011-10-08 06:00:00', - '2011-10-08 07:00:00', - '2011-10-09 06:00:00', - '2011-10-09 07:00:00', - '2011-10-15 06:00:00', - '2011-10-15 07:00:00', - '2011-10-16 06:00:00', - '2011-10-16 07:00:00', - '2011-10-22 06:00:00', - '2011-10-22 07:00:00', - '2011-10-23 06:00:00', - '2011-10-23 07:00:00', - ] - ); - - } - - function testDailyByHour() { - - $this->parse( - 'FREQ=DAILY;INTERVAL=2;BYHOUR=10,11,12,13,14,15', - '2012-10-11 12:00:00', - [ - '2012-10-11 12:00:00', - '2012-10-11 13:00:00', - '2012-10-11 14:00:00', - '2012-10-11 15:00:00', - '2012-10-13 10:00:00', - '2012-10-13 11:00:00', - '2012-10-13 12:00:00', - '2012-10-13 13:00:00', - '2012-10-13 14:00:00', - '2012-10-13 15:00:00', - '2012-10-15 10:00:00', - '2012-10-15 11:00:00', - ] - ); - - } - - function testDailyByDay() { - - $this->parse( - 'FREQ=DAILY;INTERVAL=2;BYDAY=TU,WE,FR', - '2011-10-07 12:00:00', - [ - '2011-10-07 12:00:00', - '2011-10-11 12:00:00', - '2011-10-19 12:00:00', - '2011-10-21 12:00:00', - '2011-10-25 12:00:00', - '2011-11-02 12:00:00', - '2011-11-04 12:00:00', - '2011-11-08 12:00:00', - '2011-11-16 12:00:00', - '2011-11-18 12:00:00', - '2011-11-22 12:00:00', - '2011-11-30 12:00:00', - ] - ); - - } - - function testDailyCount() { - - $this->parse( - 'FREQ=DAILY;COUNT=5', - '2014-08-01 18:03:00', - [ - '2014-08-01 18:03:00', - '2014-08-02 18:03:00', - '2014-08-03 18:03:00', - '2014-08-04 18:03:00', - '2014-08-05 18:03:00', - ] - ); - - } - - function testDailyByMonth() { - - $this->parse( - 'FREQ=DAILY;BYMONTH=9,10;BYDAY=SU', - '2007-10-04 16:00:00', - [ - '2013-09-29 16:00:00', - '2013-10-06 16:00:00', - '2013-10-13 16:00:00', - '2013-10-20 16:00:00', - '2013-10-27 16:00:00', - '2014-09-07 16:00:00' - ], - '2013-09-28' - ); - - } - - function testWeekly() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=2;COUNT=10', - '2011-10-07 00:00:00', - [ - '2011-10-07 00:00:00', - '2011-10-21 00:00:00', - '2011-11-04 00:00:00', - '2011-11-18 00:00:00', - '2011-12-02 00:00:00', - '2011-12-16 00:00:00', - '2011-12-30 00:00:00', - '2012-01-13 00:00:00', - '2012-01-27 00:00:00', - '2012-02-10 00:00:00', - ] - ); - - } - - function testWeeklyByDay() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=1;COUNT=4;BYDAY=MO;WKST=SA', - '2014-08-01 00:00:00', - [ - '2014-08-01 00:00:00', - '2014-08-04 00:00:00', - '2014-08-11 00:00:00', - '2014-08-18 00:00:00', - ] - ); - - } - - function testWeeklyByDay2() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU', - '2011-10-07 00:00:00', - [ - '2011-10-07 00:00:00', - '2011-10-18 00:00:00', - '2011-10-19 00:00:00', - '2011-10-21 00:00:00', - '2011-11-01 00:00:00', - '2011-11-02 00:00:00', - '2011-11-04 00:00:00', - '2011-11-15 00:00:00', - '2011-11-16 00:00:00', - '2011-11-18 00:00:00', - '2011-11-29 00:00:00', - '2011-11-30 00:00:00', - ] - ); - - } - - function testWeeklyByDayByHour() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=MO;BYHOUR=8,9,10', - '2011-10-07 08:00:00', - [ - '2011-10-07 08:00:00', - '2011-10-07 09:00:00', - '2011-10-07 10:00:00', - '2011-10-18 08:00:00', - '2011-10-18 09:00:00', - '2011-10-18 10:00:00', - '2011-10-19 08:00:00', - '2011-10-19 09:00:00', - '2011-10-19 10:00:00', - '2011-10-21 08:00:00', - '2011-10-21 09:00:00', - '2011-10-21 10:00:00', - '2011-11-01 08:00:00', - '2011-11-01 09:00:00', - '2011-11-01 10:00:00', - ] - ); - - } - - function testWeeklyByDaySpecificHour() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=2;BYDAY=TU,WE,FR;WKST=SU', - '2011-10-07 18:00:00', - [ - '2011-10-07 18:00:00', - '2011-10-18 18:00:00', - '2011-10-19 18:00:00', - '2011-10-21 18:00:00', - '2011-11-01 18:00:00', - '2011-11-02 18:00:00', - '2011-11-04 18:00:00', - '2011-11-15 18:00:00', - '2011-11-16 18:00:00', - '2011-11-18 18:00:00', - '2011-11-29 18:00:00', - '2011-11-30 18:00:00', - ] - ); - - } - - function testMonthly() { - - $this->parse( - 'FREQ=MONTHLY;INTERVAL=3;COUNT=5', - '2011-12-05 00:00:00', - [ - '2011-12-05 00:00:00', - '2012-03-05 00:00:00', - '2012-06-05 00:00:00', - '2012-09-05 00:00:00', - '2012-12-05 00:00:00', - ] - ); - - } - - function testMonlthyEndOfMonth() { - - $this->parse( - 'FREQ=MONTHLY;INTERVAL=2;COUNT=12', - '2011-12-31 00:00:00', - [ - '2011-12-31 00:00:00', - '2012-08-31 00:00:00', - '2012-10-31 00:00:00', - '2012-12-31 00:00:00', - '2013-08-31 00:00:00', - '2013-10-31 00:00:00', - '2013-12-31 00:00:00', - '2014-08-31 00:00:00', - '2014-10-31 00:00:00', - '2014-12-31 00:00:00', - '2015-08-31 00:00:00', - '2015-10-31 00:00:00', - ] - ); - - } - - function testMonthlyByMonthDay() { - - $this->parse( - 'FREQ=MONTHLY;INTERVAL=5;COUNT=9;BYMONTHDAY=1,31,-7', - '2011-01-01 00:00:00', - [ - '2011-01-01 00:00:00', - '2011-01-25 00:00:00', - '2011-01-31 00:00:00', - '2011-06-01 00:00:00', - '2011-06-24 00:00:00', - '2011-11-01 00:00:00', - '2011-11-24 00:00:00', - '2012-04-01 00:00:00', - '2012-04-24 00:00:00', - ] - ); - - } - - function testMonthlyByDay() { - - $this->parse( - 'FREQ=MONTHLY;INTERVAL=2;COUNT=16;BYDAY=MO,-2TU,+1WE,3TH', - '2011-01-03 00:00:00', - [ - '2011-01-03 00:00:00', - '2011-01-05 00:00:00', - '2011-01-10 00:00:00', - '2011-01-17 00:00:00', - '2011-01-18 00:00:00', - '2011-01-20 00:00:00', - '2011-01-24 00:00:00', - '2011-01-31 00:00:00', - '2011-03-02 00:00:00', - '2011-03-07 00:00:00', - '2011-03-14 00:00:00', - '2011-03-17 00:00:00', - '2011-03-21 00:00:00', - '2011-03-22 00:00:00', - '2011-03-28 00:00:00', - '2011-05-02 00:00:00', - ] - ); - - } - - function testMonthlyByDayByMonthDay() { - - $this->parse( - 'FREQ=MONTHLY;COUNT=10;BYDAY=MO;BYMONTHDAY=1', - '2011-08-01 00:00:00', - [ - '2011-08-01 00:00:00', - '2012-10-01 00:00:00', - '2013-04-01 00:00:00', - '2013-07-01 00:00:00', - '2014-09-01 00:00:00', - '2014-12-01 00:00:00', - '2015-06-01 00:00:00', - '2016-02-01 00:00:00', - '2016-08-01 00:00:00', - '2017-05-01 00:00:00', - ] - ); - - } - - function testMonthlyByDayBySetPos() { - - $this->parse( - 'FREQ=MONTHLY;COUNT=10;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,-1', - '2011-01-03 00:00:00', - [ - '2011-01-03 00:00:00', - '2011-01-31 00:00:00', - '2011-02-01 00:00:00', - '2011-02-28 00:00:00', - '2011-03-01 00:00:00', - '2011-03-31 00:00:00', - '2011-04-01 00:00:00', - '2011-04-29 00:00:00', - '2011-05-02 00:00:00', - '2011-05-31 00:00:00', - ] - ); - - } - - function testYearly() { - - $this->parse( - 'FREQ=YEARLY;COUNT=10;INTERVAL=3', - '2011-01-01 00:00:00', - [ - '2011-01-01 00:00:00', - '2014-01-01 00:00:00', - '2017-01-01 00:00:00', - '2020-01-01 00:00:00', - '2023-01-01 00:00:00', - '2026-01-01 00:00:00', - '2029-01-01 00:00:00', - '2032-01-01 00:00:00', - '2035-01-01 00:00:00', - '2038-01-01 00:00:00', - ] - ); - } - - function testYearlyLeapYear() { - - $this->parse( - 'FREQ=YEARLY;COUNT=3', - '2012-02-29 00:00:00', - [ - '2012-02-29 00:00:00', - '2016-02-29 00:00:00', - '2020-02-29 00:00:00', - ] - ); - } - - function testYearlyByMonth() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYMONTH=4,10', - '2011-04-07 00:00:00', - [ - '2011-04-07 00:00:00', - '2011-10-07 00:00:00', - '2015-04-07 00:00:00', - '2015-10-07 00:00:00', - '2019-04-07 00:00:00', - '2019-10-07 00:00:00', - '2023-04-07 00:00:00', - '2023-10-07 00:00:00', - ] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByMonthInvalidValue1() { - - $this->parse( - 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0', - '2011-04-07 00:00:00', - [] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByMonthInvalidValue2() { - - $this->parse( - 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=bla', - '2011-04-07 00:00:00', - [] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByMonthManyInvalidValues() { - - $this->parse( - 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=0,bla', - '2011-04-07 00:00:00', - [] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByMonthEmptyValue() { - - $this->parse( - 'FREQ=YEARLY;COUNT=6;BYMONTHDAY=24;BYMONTH=', - '2011-04-07 00:00:00', - [] - ); - - } - - function testYearlyByMonthByDay() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU', - '2011-04-04 00:00:00', - [ - '2011-04-04 00:00:00', - '2011-04-24 00:00:00', - '2011-10-03 00:00:00', - '2011-10-30 00:00:00', - '2016-04-04 00:00:00', - '2016-04-24 00:00:00', - '2016-10-03 00:00:00', - '2016-10-30 00:00:00', - ] - ); - - } - - function testYearlyByYearDay() { - - $this->parse( - 'FREQ=YEARLY;COUNT=7;INTERVAL=2;BYYEARDAY=190', - '2011-07-10 03:07:00', - [ - '2011-07-10 03:07:00', - '2013-07-10 03:07:00', - '2015-07-10 03:07:00', - '2017-07-10 03:07:00', - '2019-07-10 03:07:00', - '2021-07-10 03:07:00', - '2023-07-10 03:07:00', - ] - ); - - } - - function testYearlyByYearDayMultiple() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=3;BYYEARDAY=190,301', - '2011-07-10 14:53:11', - [ - '2011-07-10 14:53:11', - '2011-10-29 14:53:11', - '2014-07-10 14:53:11', - '2014-10-29 14:53:11', - '2017-07-10 14:53:11', - '2017-10-29 14:53:11', - '2020-07-09 14:53:11', - '2020-10-28 14:53:11', - ] - ); - - } - - function testYearlyByYearDayByDay() { - - $this->parse( - 'FREQ=YEARLY;COUNT=6;BYYEARDAY=97;BYDAY=SA', - '2001-04-07 14:53:11', - [ - '2001-04-07 14:53:11', - '2006-04-08 14:53:11', - '2012-04-07 14:53:11', - '2017-04-08 14:53:11', - '2023-04-08 14:53:11', - '2034-04-08 14:53:11', - ] - ); - - } - - function testYearlyByYearDayNegative() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;BYYEARDAY=-97,-5', - '2001-09-26 14:53:11', - [ - '2001-09-26 14:53:11', - '2001-12-27 14:53:11', - '2002-09-26 14:53:11', - '2002-12-27 14:53:11', - '2003-09-26 14:53:11', - '2003-12-27 14:53:11', - '2004-09-26 14:53:11', - '2004-12-27 14:53:11', - ] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByYearDayInvalid390() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYYEARDAY=390', - '2011-04-07 00:00:00', - [ - ] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testYearlyByYearDayInvalid0() { - - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=4;BYYEARDAY=0', - '2011-04-07 00:00:00', - [ - ] - ); - - } - - function testFastForward() { - - // The idea is that we're fast-forwarding too far in the future, so - // there will be no results left. - $this->parse( - 'FREQ=YEARLY;COUNT=8;INTERVAL=5;BYMONTH=4,10;BYDAY=1MO,-1SU', - '2011-04-04 00:00:00', - [], - '2020-05-05 00:00:00' - ); - - } - - /** - * The bug that was in the - * system before would fail on the 5th tuesday of the month, if the 5th - * tuesday did not exist. - * - * A pretty slow test. Had to be marked as 'medium' for phpunit to not die - * after 1 second. Would be good to optimize later. - * - * @medium - */ - function testFifthTuesdayProblem() { - - $this->parse( - 'FREQ=MONTHLY;INTERVAL=1;UNTIL=20071030T035959Z;BYDAY=5TU', - '2007-10-04 14:46:42', - [ - '2007-10-04 14:46:42', - ] - ); - - } - - /** - * This bug came from a Fruux customer. This would result in a never-ending - * request. - */ - function testFastFowardTooFar() { - - $this->parse( - 'FREQ=WEEKLY;BYDAY=MO;UNTIL=20090704T205959Z;INTERVAL=1', - '2009-04-20 18:00:00', - [ - '2009-04-20 18:00:00', - '2009-04-27 18:00:00', - '2009-05-04 18:00:00', - '2009-05-11 18:00:00', - '2009-05-18 18:00:00', - '2009-05-25 18:00:00', - '2009-06-01 18:00:00', - '2009-06-08 18:00:00', - '2009-06-15 18:00:00', - '2009-06-22 18:00:00', - '2009-06-29 18:00:00', - ] - ); - - } - - function testValidByWeekNo() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=20;BYDAY=TU', - '2011-02-07 00:00:00', - [ - '2011-02-07 00:00:00', - '2011-05-17 00:00:00', - '2012-05-15 00:00:00', - '2013-05-14 00:00:00', - '2014-05-13 00:00:00', - '2015-05-12 00:00:00', - '2016-05-17 00:00:00', - '2017-05-16 00:00:00', - '2018-05-15 00:00:00', - '2019-05-14 00:00:00', - '2020-05-12 00:00:00', - '2021-05-18 00:00:00', - ] - ); - - } - - function testNegativeValidByWeekNo() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=-20;BYDAY=TU,FR', - '2011-09-02 00:00:00', - [ - '2011-09-02 00:00:00', - '2012-08-07 00:00:00', - '2012-08-10 00:00:00', - '2013-08-06 00:00:00', - '2013-08-09 00:00:00', - '2014-08-05 00:00:00', - '2014-08-08 00:00:00', - '2015-08-11 00:00:00', - '2015-08-14 00:00:00', - '2016-08-09 00:00:00', - '2016-08-12 00:00:00', - '2017-08-08 00:00:00', - ] - ); - - } - - function testTwoValidByWeekNo() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=20;BYDAY=TU,FR', - '2011-09-07 09:00:00', - [ - '2011-09-07 09:00:00', - '2012-05-15 09:00:00', - '2012-05-18 09:00:00', - '2013-05-14 09:00:00', - '2013-05-17 09:00:00', - '2014-05-13 09:00:00', - '2014-05-16 09:00:00', - '2015-05-12 09:00:00', - '2015-05-15 09:00:00', - '2016-05-17 09:00:00', - '2016-05-20 09:00:00', - '2017-05-16 09:00:00', - ] - ); - - } - - function testValidByWeekNoByDayDefault() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=20', - '2011-05-16 00:00:00', - [ - '2011-05-16 00:00:00', - '2012-05-14 00:00:00', - '2013-05-13 00:00:00', - '2014-05-12 00:00:00', - '2015-05-11 00:00:00', - '2016-05-16 00:00:00', - '2017-05-15 00:00:00', - '2018-05-14 00:00:00', - '2019-05-13 00:00:00', - '2020-05-11 00:00:00', - '2021-05-17 00:00:00', - '2022-05-16 00:00:00', - ] - ); - - } - - function testMultipleValidByWeekNo() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=20,50;BYDAY=TU,FR', - '2011-01-16 00:00:00', - [ - '2011-01-16 00:00:00', - '2011-05-17 00:00:00', - '2011-05-20 00:00:00', - '2011-12-13 00:00:00', - '2011-12-16 00:00:00', - '2012-05-15 00:00:00', - '2012-05-18 00:00:00', - '2012-12-11 00:00:00', - '2012-12-14 00:00:00', - '2013-05-14 00:00:00', - '2013-05-17 00:00:00', - '2013-12-10 00:00:00', - ] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testInvalidByWeekNo() { - - $this->parse( - 'FREQ=YEARLY;BYWEEKNO=54', - '2011-05-16 00:00:00', - [ - ] - ); - - } - - /** - * This also at one point caused an infinite loop. We're keeping the test. - */ - function testYearlyByMonthLoop() { - - $this->parse( - 'FREQ=YEARLY;INTERVAL=1;UNTIL=20120203T225959Z;BYMONTH=2;BYSETPOS=1;BYDAY=SU,MO,TU,WE,TH,FR,SA', - '2012-01-01 15:45:00', - [ - '2012-02-01 15:45:00', - ], - '2012-01-29 23:00:00' - ); - - - } - - /** - * Something, somewhere produced an ics with an interval set to 0. Because - * this means we increase the current day (or week, month) by 0, this also - * results in an infinite loop. - * - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testZeroInterval() { - - $this->parse( - 'FREQ=YEARLY;INTERVAL=0', - '2012-08-24 14:57:00', - [], - '2013-01-01 23:00:00' - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testInvalidFreq() { - - $this->parse( - 'FREQ=SMONTHLY;INTERVAL=3;UNTIL=20111025T000000Z', - '2011-10-07', - [] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testByDayBadOffset() { - - $this->parse( - 'FREQ=WEEKLY;INTERVAL=1;COUNT=4;BYDAY=0MO;WKST=SA', - '2014-08-01 00:00:00', - [] - ); - - } - - function testUntilBeginHasTimezone() { - - $this->parse( - 'FREQ=WEEKLY;UNTIL=20131118T183000', - '2013-09-23 18:30:00', - [ - '2013-09-23 18:30:00', - '2013-09-30 18:30:00', - '2013-10-07 18:30:00', - '2013-10-14 18:30:00', - '2013-10-21 18:30:00', - '2013-10-28 18:30:00', - '2013-11-04 18:30:00', - '2013-11-11 18:30:00', - '2013-11-18 18:30:00', - ], - null, - 'America/New_York' - ); - - } - - function testUntilBeforeDtStart() { - - $this->parse( - 'FREQ=DAILY;UNTIL=20140101T000000Z', - '2014-08-02 00:15:00', - [ - '2014-08-02 00:15:00', - ] - ); - - } - - function testIgnoredStuff() { - - $this->parse( - 'FREQ=DAILY;BYSECOND=1;BYMINUTE=1;BYYEARDAY=1;BYWEEKNO=1;COUNT=2', - '2014-08-02 00:15:00', - [ - '2014-08-02 00:15:00', - '2014-08-03 00:15:00', - ] - ); - - } - - function testMinusFifthThursday() { - - $this->parse( - 'FREQ=MONTHLY;BYDAY=-4TH,-5TH;COUNT=4', - '2015-01-01 00:15:00', - [ - '2015-01-01 00:15:00', - '2015-01-08 00:15:00', - '2015-02-05 00:15:00', - '2015-03-05 00:15:00' - ] - ); - - } - - /** - * @expectedException \Sabre\VObject\InvalidDataException - */ - function testUnsupportedPart() { - - $this->parse( - 'FREQ=DAILY;BYWODAN=1', - '2014-08-02 00:15:00', - [] - ); - - } - - function testIteratorFunctions() { - - $parser = new RRuleIterator('FREQ=DAILY', new DateTime('2014-08-02 00:00:13')); - $parser->next(); - $this->assertEquals( - new DateTime('2014-08-03 00:00:13'), - $parser->current() - ); - $this->assertEquals( - 1, - $parser->key() - ); - - $parser->rewind(); - - $this->assertEquals( - new DateTime('2014-08-02 00:00:13'), - $parser->current() - ); - $this->assertEquals( - 0, - $parser->key() - ); - - } - - function parse($rule, $start, $expected, $fastForward = null, $tz = 'UTC') { - - $dt = new DateTime($start, new DateTimeZone($tz)); - $parser = new RRuleIterator($rule, $dt); - - if ($fastForward) { - $parser->fastForward(new DateTime($fastForward)); - } - - $result = []; - while ($parser->valid()) { - - $item = $parser->current(); - $result[] = $item->format('Y-m-d H:i:s'); - - if ($parser->isInfinite() && count($result) >= count($expected)) { - break; - } - $parser->next(); - - } - - $this->assertEquals( - $expected, - $result - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/RecurrenceIterator/UntilRespectsTimezoneTest.ics b/htdocs/includes/sabre/sabre/vobject/tests/VObject/RecurrenceIterator/UntilRespectsTimezoneTest.ics deleted file mode 100644 index 1663c783d84..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/RecurrenceIterator/UntilRespectsTimezoneTest.ics +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -X-WR-TIMEZONE:America/New_York -PRODID:-//www.churchcommunitybuilder.com//Church Community Builder//EN -CALSCALE:GREGORIAN -METHOD:PUBLISH -X-WR-CALNAME:Test Event -BEGIN:VTIMEZONE -TZID:America/New_York -X-LIC-LOCATION:America/New_York -BEGIN:DAYLIGHT -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -DTSTART:19700308T020000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -DTSTART:19701101T020000 -RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU -END:STANDARD -END:VTIMEZONE -BEGIN:VEVENT -UID:10621-1440@ccbchurch.com -DTSTART;TZID=America/New_York:20130923T183000 -DTEND;TZID=America/New_York:20130923T203000 -DTSTAMP:20131216T170211 -RRULE:FREQ=WEEKLY;UNTIL=20131118T183000 -CREATED:20130423T161111 -DESCRIPTION:Test Event ending November 11, 2013 -LAST-MODIFIED:20131126T163428 -SEQUENCE:1387231331 -SUMMARY:Test -TRANSP:OPAQUE -END:VEVENT -END:VCALENDAR diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/SlashRTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/SlashRTest.php deleted file mode 100644 index 8e9389de162..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/SlashRTest.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * This issue was pointed out in Issue 55. \r should be stripped completely - * when encoding property values. - */ -class SlashRTest extends \PHPUnit_Framework_TestCase { - - function testEncode() { - - $vcal = new Component\VCalendar(); - $prop = $vcal->add('test', "abc\r\ndef"); - $this->assertEquals("TEST:abc\\ndef\r\n", $prop->serialize()); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/ICalendarTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/ICalendarTest.php deleted file mode 100644 index ccbd5c88191..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/ICalendarTest.php +++ /dev/null @@ -1,325 +0,0 @@ -<?php - -namespace Sabre\VObject\Splitter; - -use Sabre\VObject; - -class ICalendarTest extends \PHPUnit_Framework_TestCase { - - protected $version; - - function setUp() { - $this->version = VObject\Version::VERSION; - } - - function createStream($data) { - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $data); - rewind($stream); - return $stream; - - } - - function testICalendarImportValidEvent() { - - $data = <<<EOT -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTAMP:20140122T233226Z -DTSTART:20140101T070000Z -END:VEVENT -END:VCALENDAR -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - while ($object = $objects->getNext()) { - $return .= $object->serialize(); - } - $this->assertEquals([], VObject\Reader::read($return)->validate()); - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testICalendarImportWrongType() { - - $data = <<<EOT -BEGIN:VCARD -UID:foo1 -END:VCARD -BEGIN:VCARD -UID:foo2 -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - } - - function testICalendarImportEndOfData() { - $data = <<<EOT -BEGIN:VCALENDAR -BEGIN:VEVENT -UID:foo -DTSTAMP:20140122T233226Z -END:VEVENT -END:VCALENDAR -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - while ($object = $objects->getNext()) { - $return .= $object->serialize(); - } - $this->assertNull($object = $objects->getNext()); - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testICalendarImportInvalidEvent() { - $data = <<<EOT -EOT; - $tempFile = $this->createStream($data); - $objects = new ICalendar($tempFile); - - } - - function testICalendarImportMultipleValidEvents() { - - $event[] = <<<EOT -BEGIN:VEVENT -UID:foo1 -DTSTAMP:20140122T233226Z -DTSTART:20140101T050000Z -END:VEVENT -EOT; - -$event[] = <<<EOT -BEGIN:VEVENT -UID:foo2 -DTSTAMP:20140122T233226Z -DTSTART:20140101T060000Z -END:VEVENT -EOT; - - $data = <<<EOT -BEGIN:VCALENDAR -$event[0] -$event[1] -END:VCALENDAR - -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - $i = 0; - while ($object = $objects->getNext()) { - - $expected = <<<EOT -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $this->version//EN -CALSCALE:GREGORIAN -$event[$i] -END:VCALENDAR - -EOT; - - $return .= $object->serialize(); - $expected = str_replace("\n", "\r\n", $expected); - $this->assertEquals($expected, $object->serialize()); - $i++; - } - $this->assertEquals([], VObject\Reader::read($return)->validate()); - } - - function testICalendarImportEventWithoutUID() { - - $data = <<<EOT -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $this->version//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -DTSTART:20140101T040000Z -DTSTAMP:20140122T233226Z -END:VEVENT -END:VCALENDAR - -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - while ($object = $objects->getNext()) { - $return .= $object->serialize(); - } - - $messages = VObject\Reader::read($return)->validate(); - - if ($messages) { - $messages = array_map( - function($item) { return $item['message']; }, - $messages - ); - $this->fail('Validation errors: ' . implode("\n", $messages)); - } else { - $this->assertEquals([], $messages); - } - } - - function testICalendarImportMultipleVTIMEZONESAndMultipleValidEvents() { - - $timezones = <<<EOT -BEGIN:VTIMEZONE -TZID:Europe/Berlin -BEGIN:DAYLIGHT -TZOFFSETFROM:+0100 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU -DTSTART:19810329T020000 -TZNAME:MESZ -TZOFFSETTO:+0200 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+0200 -RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU -DTSTART:19961027T030000 -TZNAME:MEZ -TZOFFSETTO:+0100 -END:STANDARD -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:Europe/London -BEGIN:DAYLIGHT -TZOFFSETFROM:+0000 -RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU -DTSTART:19810329T010000 -TZNAME:GMT+01:00 -TZOFFSETTO:+0100 -END:DAYLIGHT -BEGIN:STANDARD -TZOFFSETFROM:+0100 -RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU -DTSTART:19961027T020000 -TZNAME:GMT -TZOFFSETTO:+0000 -END:STANDARD -END:VTIMEZONE -EOT; - - $event[] = <<<EOT -BEGIN:VEVENT -UID:foo1 -DTSTAMP:20140122T232710Z -DTSTART:20140101T010000Z -END:VEVENT -EOT; - - $event[] = <<<EOT -BEGIN:VEVENT -UID:foo2 -DTSTAMP:20140122T232710Z -DTSTART:20140101T020000Z -END:VEVENT -EOT; - - $event[] = <<<EOT -BEGIN:VEVENT -UID:foo3 -DTSTAMP:20140122T232710Z -DTSTART:20140101T030000Z -END:VEVENT -EOT; - - $data = <<<EOT -BEGIN:VCALENDAR -$timezones -$event[0] -$event[1] -$event[2] -END:VCALENDAR - -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - $i = 0; - while ($object = $objects->getNext()) { - - $expected = <<<EOT -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Sabre//Sabre VObject $this->version//EN -CALSCALE:GREGORIAN -$timezones -$event[$i] -END:VCALENDAR - -EOT; - $expected = str_replace("\n", "\r\n", $expected); - - $this->assertEquals($expected, $object->serialize()); - $return .= $object->serialize(); - $i++; - - } - - $this->assertEquals([], VObject\Reader::read($return)->validate()); - } - - function testICalendarImportWithOutVTIMEZONES() { - - $data = <<<EOT -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//Apple Inc.//Mac OS X 10.8//EN -CALSCALE:GREGORIAN -BEGIN:VEVENT -CREATED:20120605T072109Z -UID:D6716295-C10F-4B20-82F9-E1A3026C7DCF -DTEND;VALUE=DATE:20120717 -TRANSP:TRANSPARENT -SUMMARY:Start Vorbereitung -DTSTART;VALUE=DATE:20120716 -DTSTAMP:20120605T072115Z -SEQUENCE:2 -BEGIN:VALARM -X-WR-ALARMUID:A99EDA6A-35EB-4446-B8BC-CDA3C60C627D -UID:A99EDA6A-35EB-4446-B8BC-CDA3C60C627D -TRIGGER:-PT15H -X-APPLE-DEFAULT-ALARM:TRUE -ATTACH;VALUE=URI:Basso -ACTION:AUDIO -END:VALARM -END:VEVENT -END:VCALENDAR - -EOT; - $tempFile = $this->createStream($data); - - $objects = new ICalendar($tempFile); - - $return = ""; - while ($object = $objects->getNext()) { - $return .= $object->serialize(); - } - - $messages = VObject\Reader::read($return)->validate(); - $this->assertEquals([], $messages); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/VCardTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/VCardTest.php deleted file mode 100644 index e19e2d8205e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/Splitter/VCardTest.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php - -namespace Sabre\VObject\Splitter; - -class VCardTest extends \PHPUnit_Framework_TestCase { - - function createStream($data) { - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $data); - rewind($stream); - return $stream; - - } - - function testVCardImportValidVCard() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $count = 0; - while ($objects->getNext()) { - $count++; - } - $this->assertEquals(1, $count); - - } - - /** - * @expectedException Sabre\VObject\ParseException - */ - function testVCardImportWrongType() { - $event[] = <<<EOT -BEGIN:VEVENT -UID:foo1 -DTSTAMP:20140122T233226Z -DTSTART:20140101T050000Z -END:VEVENT -EOT; - -$event[] = <<<EOT -BEGIN:VEVENT -UID:foo2 -DTSTAMP:20140122T233226Z -DTSTART:20140101T060000Z -END:VEVENT -EOT; - - $data = <<<EOT -BEGIN:VCALENDAR -$event[0] -$event[1] -END:VCALENDAR - -EOT; - $tempFile = $this->createStream($data); - - $splitter = new VCard($tempFile); - - while ($object = $splitter->getNext()) { - } - - } - - function testVCardImportValidVCardsWithCategories() { - $data = <<<EOT -BEGIN:VCARD -UID:card-in-foo1-and-foo2 -CATEGORIES:foo1,foo2 -END:VCARD -BEGIN:VCARD -UID:card-in-foo1 -CATEGORIES:foo1 -END:VCARD -BEGIN:VCARD -UID:card-in-foo3 -CATEGORIES:foo3 -END:VCARD -BEGIN:VCARD -UID:card-in-foo1-and-foo3 -CATEGORIES:foo1\,foo3 -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $splitter = new VCard($tempFile); - - $count = 0; - while ($object = $splitter->getNext()) { - $count++; - } - $this->assertEquals(4, $count); - - } - - function testVCardImportEndOfData() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - $object = $objects->getNext(); - - $this->assertNull($objects->getNext()); - - - } - - /** - * @expectedException \Sabre\VObject\ParseException - */ - function testVCardImportCheckInvalidArgumentException() { - $data = <<<EOT -BEGIN:FOO -END:FOO -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - while ($objects->getNext()) { } - - } - - function testVCardImportMultipleValidVCards() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $count = 0; - while ($objects->getNext()) { - $count++; - } - $this->assertEquals(2, $count); - - } - - function testImportMultipleSeparatedWithNewLines() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD - - -BEGIN:VCARD -UID:foo -END:VCARD - - -EOT; - $tempFile = $this->createStream($data); - $objects = new VCard($tempFile); - - $count = 0; - while ($objects->getNext()) { - $count++; - } - $this->assertEquals(2, $count); - } - - function testVCardImportVCardWithoutUID() { - $data = <<<EOT -BEGIN:VCARD -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $count = 0; - while ($objects->getNext()) { - $count++; - } - - $this->assertEquals(1, $count); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/StringUtilTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/StringUtilTest.php deleted file mode 100644 index 8e0bc483d15..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/StringUtilTest.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class StringUtilTest extends \PHPUnit_Framework_TestCase { - - function testNonUTF8() { - - $string = StringUtil::isUTF8(chr(0xbf)); - - $this->assertEquals(false, $string); - - } - - function testIsUTF8() { - - $string = StringUtil::isUTF8('I 💚 SabreDAV'); - - $this->assertEquals(true, $string); - - } - - function testUTF8ControlChar() { - - $string = StringUtil::isUTF8(chr(0x00)); - - $this->assertEquals(false, $string); - - } - - function testConvertToUTF8nonUTF8() { - - $string = StringUtil::convertToUTF8(chr(0xbf)); - - $this->assertEquals(utf8_encode(chr(0xbf)), $string); - - } - - function testConvertToUTF8IsUTF8() { - - $string = StringUtil::convertToUTF8('I 💚 SabreDAV'); - - $this->assertEquals('I 💚 SabreDAV', $string); - - } - - function testConvertToUTF8ControlChar() { - - $string = StringUtil::convertToUTF8(chr(0x00)); - - $this->assertEquals('', $string); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/TimeZoneUtilTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/TimeZoneUtilTest.php deleted file mode 100644 index 8d8357dc7c2..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/TimeZoneUtilTest.php +++ /dev/null @@ -1,377 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class TimeZoneUtilTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - // clearning the tz cache - TimezoneUtil::$map = null; - - } - - /** - * @dataProvider getMapping - */ - function testCorrectTZ($timezoneName) { - - try { - $tz = new \DateTimeZone($timezoneName); - $this->assertInstanceOf('DateTimeZone', $tz); - } catch (\Exception $e) { - if (strpos($e->getMessage(), "Unknown or bad timezone") !== false) { - $this->markTestSkipped($timezoneName . ' is not (yet) supported in this PHP version. Update pecl/timezonedb'); - } else { - throw $e; - } - - } - - } - - function getMapping() { - - TimeZoneUtil::loadTzMaps(); - - // PHPUNit requires an array of arrays - return array_map( - function($value) { - return [$value]; - }, - TimeZoneUtil::$map - ); - - } - - function testExchangeMap() { - - $vobj = <<<HI -BEGIN:VCALENDAR -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:foo -X-MICROSOFT-CDO-TZID:2 -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:16010101T020000 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:20120416T092149Z -DTSTART;TZID="foo":20120418T1 - 00000 -SUMMARY:Begin Unterhaltsreinigung -UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000 - 0100000008FECD2E607780649BE5A4C9EE6418CBC - 000 -END:VEVENT -END:VCALENDAR -HI; - - $tz = TimeZoneUtil::getTimeZone('foo', Reader::read($vobj)); - $ex = new \DateTimeZone('Europe/Lisbon'); - - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function testWetherMicrosoftIsStillInsane() { - - $vobj = <<<HI -BEGIN:VCALENDAR -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb -X-MICROSOFT-CDO-TZID:2 -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU -END:STANDARD -END:VTIMEZONE -END:VCALENDAR -HI; - - $tz = TimeZoneUtil::getTimeZone('(GMT+01.00) Sarajevo/Warsaw/Zagreb', Reader::read($vobj)); - $ex = new \DateTimeZone('Europe/Sarajevo'); - - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function testUnknownExchangeId() { - - $vobj = <<<HI -BEGIN:VCALENDAR -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:foo -X-MICROSOFT-CDO-TZID:2000 -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:16010101T020000 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:20120416T092149Z -DTSTART;TZID="foo":20120418T1 - 00000 -SUMMARY:Begin Unterhaltsreinigung -UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000 - 0100000008FECD2E607780649BE5A4C9EE6418CBC -DTEND;TZID="Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb":20120418T103 - 000 -END:VEVENT -END:VCALENDAR -HI; - - $tz = TimeZoneUtil::getTimeZone('foo', Reader::read($vobj)); - $ex = new \DateTimeZone(date_default_timezone_get()); - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function testWindowsTimeZone() { - - $tz = TimeZoneUtil::getTimeZone('Eastern Standard Time'); - $ex = new \DateTimeZone('America/New_York'); - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - /** - * @dataProvider getPHPTimeZoneIdentifiers - */ - function testTimeZoneIdentifiers($tzid) { - - $tz = TimeZoneUtil::getTimeZone($tzid); - $ex = new \DateTimeZone($tzid); - - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - /** - * @dataProvider getPHPTimeZoneBCIdentifiers - */ - function testTimeZoneBCIdentifiers($tzid) { - - $tz = TimeZoneUtil::getTimeZone($tzid); - $ex = new \DateTimeZone($tzid); - - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function getPHPTimeZoneIdentifiers() { - - // PHPUNit requires an array of arrays - return array_map( - function($value) { - return [$value]; - }, - \DateTimeZone::listIdentifiers() - ); - - } - - function getPHPTimeZoneBCIdentifiers() { - - // PHPUNit requires an array of arrays - return array_map( - function($value) { - return [$value]; - }, - TimeZoneUtil::getIdentifiersBC() - ); - - } - - function testTimezoneOffset() { - - $tz = TimeZoneUtil::getTimeZone('GMT-0400', null, true); - - if (version_compare(PHP_VERSION, '5.5.10', '>=') && !defined('HHVM_VERSION')) { - $ex = new \DateTimeZone('-04:00'); - } else { - $ex = new \DateTimeZone('Etc/GMT-4'); - } - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testTimezoneFail() { - - $tz = TimeZoneUtil::getTimeZone('FooBar', null, true); - - } - - function testFallBack() { - - $vobj = <<<HI -BEGIN:VCALENDAR -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:foo -BEGIN:STANDARD -DTSTART:16010101T030000 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:16010101T020000 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:20120416T092149Z -DTSTART;TZID="foo":20120418T1 - 00000 -SUMMARY:Begin Unterhaltsreinigung -UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000 - 0100000008FECD2E607780649BE5A4C9EE6418CBC - 000 -END:VEVENT -END:VCALENDAR -HI; - - $tz = TimeZoneUtil::getTimeZone('foo', Reader::read($vobj)); - $ex = new \DateTimeZone(date_default_timezone_get()); - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function testLjubljanaBug() { - - $vobj = <<<HI -BEGIN:VCALENDAR -CALSCALE:GREGORIAN -PRODID:-//Ximian//NONSGML Evolution Calendar//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana -X-LIC-LOCATION:Europe/Ljubljana -BEGIN:STANDARD -TZNAME:CET -DTSTART:19701028T030000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:+0200 -TZOFFSETTO:+0100 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:CEST -DTSTART:19700325T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 -TZOFFSETFROM:+0100 -TZOFFSETTO:+0200 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:foo -DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana: - 20121003T080000 -DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana: - 20121003T083000 -TRANSP:OPAQUE -SEQUENCE:2 -SUMMARY:testing -CREATED:20121002T172613Z -LAST-MODIFIED:20121002T172613Z -END:VEVENT -END:VCALENDAR - -HI; - - - $tz = TimeZoneUtil::getTimeZone('/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana', Reader::read($vobj)); - $ex = new \DateTimeZone('Europe/Ljubljana'); - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - function testWeirdSystemVLICs() { - -$vobj = <<<HI -BEGIN:VCALENDAR -CALSCALE:GREGORIAN -PRODID:-//Ximian//NONSGML Evolution Calendar//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT -X-LIC-LOCATION:SystemV/EST5EDT -BEGIN:STANDARD -TZNAME:EST -DTSTART:19701104T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -END:STANDARD -BEGIN:DAYLIGHT -TZNAME:EDT -DTSTART:19700311T020000 -RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -UID:20121026T021107Z-6301-1000-1-0@chAir -DTSTAMP:20120905T172126Z -DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT: - 20121026T153000 -DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT: - 20121026T160000 -TRANSP:OPAQUE -SEQUENCE:5 -SUMMARY:pick up Ibby -CLASS:PUBLIC -CREATED:20121026T021108Z -LAST-MODIFIED:20121026T021118Z -X-EVOLUTION-MOVE-CALENDAR:1 -END:VEVENT -END:VCALENDAR -HI; - - $tz = TimeZoneUtil::getTimeZone('/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT', Reader::read($vobj), true); - $ex = new \DateTimeZone('America/New_York'); - $this->assertEquals($ex->getName(), $tz->getName()); - - } - - - function testPrefixedOffsetExchangeIdentifier() - { - $tz = TimeZoneUtil::getTimeZone('(UTC-05:00) Eastern Time (US & Canada)'); - $ex = new \DateTimeZone('America/New_York'); - $this->assertEquals($ex->getName(), $tz->getName()); - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/UUIDUtilTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/UUIDUtilTest.php deleted file mode 100644 index d33a8794607..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/UUIDUtilTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class UUIDUtilTest extends \PHPUnit_Framework_TestCase { - - function testValidateUUID() { - - $this->assertTrue( - UUIDUtil::validateUUID('11111111-2222-3333-4444-555555555555') - ); - $this->assertFalse( - UUIDUtil::validateUUID(' 11111111-2222-3333-4444-555555555555') - ); - $this->assertTrue( - UUIDUtil::validateUUID('ffffffff-2222-3333-4444-555555555555') - ); - $this->assertFalse( - UUIDUtil::validateUUID('fffffffg-2222-3333-4444-555555555555') - ); - - } - - /** - * @depends testValidateUUID - */ - function testGetUUID() { - - $this->assertTrue( - UUIDUtil::validateUUID( - UUIDUtil::getUUID() - ) - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCard21Test.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCard21Test.php deleted file mode 100644 index cede1eac59f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCard21Test.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -namespace Sabre\VObject; - -/** - * Assorted vcard 2.1 tests. - */ -class VCard21Test extends \PHPUnit_Framework_TestCase { - - function testPropertyWithNoName() { - - $input = <<<VCF -BEGIN:VCARD\r -VERSION:2.1\r -EMAIL;HOME;WORK:evert@fruux.com\r -END:VCARD\r - -VCF; - - $vobj = Reader::read($input); - $output = $vobj->serialize(); - - $this->assertEquals($input, $output); - - } - - function testPropertyPadValueCount() { - - $input = <<<VCF -BEGIN:VCARD -VERSION:2.1 -N:Foo -END:VCARD - -VCF; - - $vobj = Reader::read($input); - $output = $vobj->serialize(); - - $expected = <<<VCF -BEGIN:VCARD\r -VERSION:2.1\r -N:Foo;;;;\r -END:VCARD\r - -VCF; - - - $this->assertEquals($expected, $output); - - } -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCardConverterTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCardConverterTest.php deleted file mode 100644 index 77fc37d700f..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VCardConverterTest.php +++ /dev/null @@ -1,533 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class VCardConverterTest extends \PHPUnit_Framework_TestCase { - - use \Sabre\VObject\PHPUnitAssertions; - - function testConvert30to40() { - - $input = <<<IN -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -FN;CHARSET=UTF-8:Steve -TEL;TYPE=PREF,HOME:+1 555 666 777 -ITEM1.TEL:+1 444 555 666 -ITEM1.X-ABLABEL:CustomLabel -PHOTO;ENCODING=b;TYPE=JPEG,HOME:Zm9v -PHOTO;ENCODING=b;TYPE=GIF:Zm9v -PHOTO;X-PARAM=FOO;ENCODING=b;TYPE=PNG:Zm9v -PHOTO;VALUE=URI:http://example.org/foo.png -X-ABShowAs:COMPANY -END:VCARD -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -FN:Steve -TEL;PREF=1;TYPE=HOME:+1 555 666 777 -ITEM1.TEL:+1 444 555 666 -ITEM1.X-ABLABEL:CustomLabel -PHOTO;TYPE=HOME:data:image/jpeg;base64,Zm9v -PHOTO:data:image/gif;base64,Zm9v -PHOTO;X-PARAM=FOO:data:image/png;base64,Zm9v -PHOTO:http://example.org/foo.png -KIND:ORG -END:VCARD -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testConvert40to40() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.0 -FN:Steve -TEL;PREF=1;TYPE=HOME:+1 555 666 777 -PHOTO:data:image/jpeg;base64,Zm9v -PHOTO:data:image/gif;base64,Zm9v -PHOTO;X-PARAM=FOO:data:image/png;base64,Zm9v -PHOTO:http://example.org/foo.png -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -FN:Steve -TEL;PREF=1;TYPE=HOME:+1 555 666 777 -PHOTO:data:image/jpeg;base64,Zm9v -PHOTO:data:image/gif;base64,Zm9v -PHOTO;X-PARAM=FOO:data:image/png;base64,Zm9v -PHOTO:http://example.org/foo.png -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testConvert21to40() { - - $input = <<<IN -BEGIN:VCARD -VERSION:2.1 -N:Family;Johnson -FN:Johnson Family -TEL;HOME;VOICE:555-12345-345 -ADR;HOME:;;100 Street Lane;Saubel Beach;ON;H0H0H0 -LABEL;HOME;ENCODING=QUOTED-PRINTABLE:100 Street Lane=0D=0ASaubel Beach, - ON H0H0H0 -REV:20110731T040251Z -UID:12345678 -END:VCARD -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -N:Family;Johnson;;; -FN:Johnson Family -TEL;TYPE=HOME,VOICE:555-12345-345 -ADR;TYPE=HOME:;;100 Street Lane;Saubel Beach;ON;H0H0H0; -REV:20110731T040251Z -UID:12345678 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testConvert30to30() { - - $input = <<<IN -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -FN;CHARSET=UTF-8:Steve -TEL;TYPE=PREF,HOME:+1 555 666 777 -PHOTO;ENCODING=b;TYPE=JPEG:Zm9v -PHOTO;ENCODING=b;TYPE=GIF:Zm9v -PHOTO;X-PARAM=FOO;ENCODING=b;TYPE=PNG:Zm9v -PHOTO;VALUE=URI:http://example.org/foo.png -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -FN;CHARSET=UTF-8:Steve -TEL;TYPE=PREF,HOME:+1 555 666 777 -PHOTO;ENCODING=b;TYPE=JPEG:Zm9v -PHOTO;ENCODING=b;TYPE=GIF:Zm9v -PHOTO;X-PARAM=FOO;ENCODING=b;TYPE=PNG:Zm9v -PHOTO;VALUE=URI:http://example.org/foo.png -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testConvert40to30() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.0 -PRODID:foo -FN:Steve -TEL;PREF=1;TYPE=HOME:+1 555 666 777 -PHOTO:data:image/jpeg;base64,Zm9v -PHOTO:data:image/gif,foo -PHOTO;X-PARAM=FOO:data:image/png;base64,Zm9v -PHOTO:http://example.org/foo.png -KIND:ORG -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:3.0 -FN:Steve -TEL;TYPE=PREF,HOME:+1 555 666 777 -PHOTO;ENCODING=b;TYPE=JPEG:Zm9v -PHOTO;ENCODING=b;TYPE=GIF:Zm9v -PHOTO;ENCODING=b;TYPE=PNG;X-PARAM=FOO:Zm9v -PHOTO;VALUE=URI:http://example.org/foo.png -X-ABSHOWAS:COMPANY -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testConvertGroupCard() { - - $input = <<<IN -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -X-ADDRESSBOOKSERVER-KIND:GROUP -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -KIND:GROUP -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - $input = $output; - $output = <<<OUT -BEGIN:VCARD -VERSION:3.0 -X-ADDRESSBOOKSERVER-KIND:GROUP -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testBDAYConversion() { - - $input = <<<IN -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -BDAY;X-APPLE-OMIT-YEAR=1604:1604-04-16 -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -BDAY:--04-16 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - $input = $output; - $output = <<<OUT -BEGIN:VCARD -VERSION:3.0 -BDAY;X-APPLE-OMIT-YEAR=1604:1604-04-16 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testUnknownSourceVCardVersion() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.2 -PRODID:foo -FN;CHARSET=UTF-8:Steve -TEL;TYPE=PREF,HOME:+1 555 666 777 -ITEM1.TEL:+1 444 555 666 -ITEM1.X-ABLABEL:CustomLabel -PHOTO;ENCODING=b;TYPE=JPEG,HOME:Zm9v -PHOTO;ENCODING=b;TYPE=GIF:Zm9v -PHOTO;X-PARAM=FOO;ENCODING=b;TYPE=PNG:Zm9v -PHOTO;VALUE=URI:http://example.org/foo.png -X-ABShowAs:COMPANY -END:VCARD - -IN; - - $vcard = Reader::read($input); - $vcard->convert(Document::VCARD40); - - } - - /** - * @expectedException InvalidArgumentException - */ - function testUnknownTargetVCardVersion() { - - $input = <<<IN -BEGIN:VCARD -VERSION:3.0 -PRODID:foo -END:VCARD - -IN; - - $vcard = Reader::read($input); - $vcard->convert(Document::VCARD21); - - } - - function testConvertIndividualCard() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.0 -PRODID:foo -KIND:INDIVIDUAL -END:VCARD - -IN; - - $output = <<<OUT -BEGIN:VCARD -VERSION:3.0 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - $input = $output; - $output = <<<OUT -BEGIN:VCARD -VERSION:4.0 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testAnniversary() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.0 -ITEM1.ANNIVERSARY:20081210 -END:VCARD - -IN; - - $output = <<<'OUT' -BEGIN:VCARD -VERSION:3.0 -ITEM1.X-ABDATE;VALUE=DATE-AND-OR-TIME:20081210 -ITEM1.X-ABLABEL:_$!<Anniversary>!$_ -ITEM1.X-ANNIVERSARY;VALUE=DATE-AND-OR-TIME:20081210 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - // Swapping input and output - list( - $input, - $output - ) = [ - $output, - $input - ]; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testMultipleAnniversaries() { - - $input = <<<IN -BEGIN:VCARD -VERSION:4.0 -ITEM1.ANNIVERSARY:20081210 -ITEM2.ANNIVERSARY:20091210 -ITEM3.ANNIVERSARY:20101210 -END:VCARD - -IN; - - $output = <<<'OUT' -BEGIN:VCARD -VERSION:3.0 -ITEM1.X-ABDATE;VALUE=DATE-AND-OR-TIME:20081210 -ITEM1.X-ABLABEL:_$!<Anniversary>!$_ -ITEM1.X-ANNIVERSARY;VALUE=DATE-AND-OR-TIME:20081210 -ITEM2.X-ABDATE;VALUE=DATE-AND-OR-TIME:20091210 -ITEM2.X-ABLABEL:_$!<Anniversary>!$_ -ITEM2.X-ANNIVERSARY;VALUE=DATE-AND-OR-TIME:20091210 -ITEM3.X-ABDATE;VALUE=DATE-AND-OR-TIME:20101210 -ITEM3.X-ABLABEL:_$!<Anniversary>!$_ -ITEM3.X-ANNIVERSARY;VALUE=DATE-AND-OR-TIME:20101210 -END:VCARD - -OUT; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD30); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - // Swapping input and output - list( - $input, - $output - ) = [ - $output, - $input - ]; - - $vcard = Reader::read($input); - $vcard = $vcard->convert(Document::VCARD40); - - $this->assertVObjectEqualsVObject( - $output, - $vcard - ); - - } - - function testNoLabel() { - - $input = <<<VCF -BEGIN:VCARD -VERSION:3.0 -UID:foo -N:Doe;John;;; -FN:John Doe -item1.X-ABDATE;type=pref:2008-12-11 -END:VCARD - -VCF; - - $vcard = Reader::read($input); - - $this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); - $vcard = $vcard->convert(Document::VCARD40); - $vcard = $vcard->serialize(); - - $converted = Reader::read($vcard); - $converted->validate(); - - $version = Version::VERSION; - - $expected = <<<VCF -BEGIN:VCARD -VERSION:4.0 -PRODID:-//Sabre//Sabre VObject $version//EN -UID:foo -N:Doe;John;;; -FN:John Doe -ITEM1.X-ABDATE;PREF=1:2008-12-11 -END:VCARD - -VCF; - - $this->assertEquals($expected, str_replace("\r", "", $vcard)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VersionTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/VersionTest.php deleted file mode 100644 index 956479bf2e6..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/VersionTest.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class VersionTest extends \PHPUnit_Framework_TestCase { - - function testString() { - - $v = Version::VERSION; - $this->assertEquals(-1, version_compare('2.0.0', $v)); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/WriterTest.php b/htdocs/includes/sabre/sabre/vobject/tests/VObject/WriterTest.php deleted file mode 100644 index 800e13dd054..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/WriterTest.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -namespace Sabre\VObject; - -class WriterTest extends \PHPUnit_Framework_TestCase { - - function getComponent() { - - $data = "BEGIN:VCALENDAR\r\nEND:VCALENDAR"; - return Reader::read($data); - - } - - function testWriteToMimeDir() { - - $result = Writer::write($this->getComponent()); - $this->assertEquals("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n", $result); - - } - - function testWriteToJson() { - - $result = Writer::writeJson($this->getComponent()); - $this->assertEquals('["vcalendar",[],[]]', $result); - - } - - function testWriteToXml() { - - $result = Writer::writeXml($this->getComponent()); - $this->assertEquals( - '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . - '<icalendar xmlns="urn:ietf:params:xml:ns:icalendar-2.0">' . "\n" . - ' <vcalendar/>' . "\n" . - '</icalendar>' . "\n", - $result - ); - - } - -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/issue153.vcf b/htdocs/includes/sabre/sabre/vobject/tests/VObject/issue153.vcf deleted file mode 100644 index 180949c5eb1..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/issue153.vcf +++ /dev/null @@ -1,352 +0,0 @@ -BEGIN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r/dJzWlDaLrEUh1Qbnx+628ZNZE1s9nfctxEccjpQBO9tLcy7Zjw - vfNQ31q9oee3A75qe2Yyzby5OKiutRMsjKQDg4FG4EVvEyfM5xnsD1q5bbzKHBAB9KrCJN4YMd3p - V+wt8szRZUCnYDXsWSGPz7jGI+SMVVuvErXKEWuRk9QMYqXVyLXTUyRmRcmsSC4EAO8D2pAXxbma - IMR8w7+tVdRtkUAT9ew71as7wsF2nFGsKodDOMzHo/YU0rgULe7j098qW545Gaki1FIbwzeYyzfw - EdvyqkyGSfaw+bvRcQLayqyEnAyaQHR6gi6/pXnBER0IGFHzN15rnmlXyTGRuQHByeQau2GrS20G - 9OhO3H1//VWhf6RprXbXmnrMtuYsOjNk78DkfiDQBi2rpHIVQjb1otHPnBZAMAdRVUQiW6Bgyis2 - Buq29q2nXJjn/eDsycUAOLCG8yg9zkcVCzeVIZY+cenekN0LqYRSHAHA9aLMCOTy5BlTyPegCxa6 - ltkL2+ORzxjFWbTXpLSV3Y84+XFVJvLilKjgVFMpAyBxQBq6prEF7bQSzA+ZJ97jpVRGjDbUJAB+ - U+tUywlJUdE6VteHLK3kuoDqQZ0zyAcYFAG3feVo+io90u2d13R/LyR35rm77VZNSmzC5SEj5hnH - 14/Otu+hv/FN3gTWywW4KRqQM4/OsUeFZp5miaVAc9R0oAaXWa0EUWCIjuA9PeqEMbCYM3G77oAr - bi8Gz2YDmeLc3ygev61X1CxnnuTE8TvPb9fKXigDMuIJFlBdtzHnAPSrEF0IwDCm5hw2VNRzxTWt - 0BeKVMnTIxj8KZ/ahtgY49uT7UAX7VH1K63oERVOTxiuu0ex0nS7L7chJkm+R1kwwyPQZrh4JJDw - zbVbk4/OrNpefLsnyyg5UUAf/9k= -END:VCARD diff --git a/htdocs/includes/sabre/sabre/vobject/tests/VObject/issue64.vcf b/htdocs/includes/sabre/sabre/vobject/tests/VObject/issue64.vcf deleted file mode 100644 index 611052907a2..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/VObject/iss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fZriQONjqcZ6flUtqqB1SRmMr/dJzWlDaLrEUh1Qbnx+628ZNZE1s9nfctxEccjpQBO9tLcy7Zjw - vfNQ31q9oee3A75qe2Yyzby5OKiutRMsjKQDg4FG4EVvEyfM5xnsD1q5bbzKHBAB9KrCJN4YMd3p - V+wt8szRZUCnYDXsWSGPz7jGI+SMVVuvErXKEWuRk9QMYqXVyLXTUyRmRcmsSC4EAO8D2pAXxbma - IMR8w7+tVdRtkUAT9ew71as7wsF2nFGsKodDOMzHo/YU0rgULe7j098qW545Gaki1FIbwzeYyzfw - EdvyqkyGSfaw+bvRcQLayqyEnAyaQHR6gi6/pXnBER0IGFHzN15rnmlXyTGRuQHByeQau2GrS20G - 9OhO3H1//VWhf6RprXbXmnrMtuYsOjNk78DkfiDQBi2rpHIVQjb1otHPnBZAMAdRVUQiW6Bgyis2 - Buq29q2nXJjn/eDsycUAOLCG8yg9zkcVCzeVIZY+cenekN0LqYRSHAHA9aLMCOTy5BlTyPegCxa6 - ltkL2+ORzxjFWbTXpLSV3Y84+XFVJvLilKjgVFMpAyBxQBq6prEF7bQSzA+ZJ97jpVRGjDbUJAB+ - U+tUywlJUdE6VteHLK3kuoDqQZ0zyAcYFAG3feVo+io90u2d13R/LyR35rm77VZNSmzC5SEj5hnH - 14/Otu+hv/FN3gTWywW4KRqQM4/OsUeFZp5miaVAc9R0oAaXWa0EUWCIjuA9PeqEMbCYM3G77oAr - bi8Gz2YDmeLc3ygev61X1CxnnuTE8TvPb9fKXigDMuIJFlBdtzHnAPSrEF0IwDCm5hw2VNRzxTWt - 0BeKVMnTIxj8KZ/ahtgY49uT7UAX7VH1K63oERVOTxiuu0ex0nS7L7chJkm+R1kwwyPQZrh4JJDw - zbVbk4/OrNpefLsnyyg5UUAf/9k= - -END:VCARD diff --git a/htdocs/includes/sabre/sabre/vobject/tests/bootstrap.php b/htdocs/includes/sabre/sabre/vobject/tests/bootstrap.php deleted file mode 100644 index 14281e2182e..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/bootstrap.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -date_default_timezone_set('UTC'); - -$try = [ - __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', -]; - -foreach ($try as $path) { - if (file_exists($path)) { - $autoLoader = include $path; - break; - } -} - -$autoLoader->addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); - -if (!defined('SABRE_TEMPDIR')) { - define('SABRE_TEMPDIR', __DIR__ . '/temp/'); -} - -if (!file_exists(SABRE_TEMPDIR)) { - mkdir(SABRE_TEMPDIR); -} diff --git a/htdocs/includes/sabre/sabre/vobject/tests/phpunit.xml b/htdocs/includes/sabre/sabre/vobject/tests/phpunit.xml deleted file mode 100644 index 46dad6a3d22..00000000000 --- a/htdocs/includes/sabre/sabre/vobject/tests/phpunit.xml +++ /dev/null @@ -1,23 +0,0 @@ -<phpunit - colors="true" - bootstrap="bootstrap.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - beStrictAboutTestsThatDoNotTestAnything="true" - beStrictAboutOutputDuringTests="true" - beStrictAboutTestSize="true" - > - <testsuite name="Sabre\VObject"> - <directory>VObject/</directory> - </testsuite> - - <filter> - <whitelist addUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">../lib/</directory> - <exclude> - <file>../lib/Sabre/VObject/includes.php</file> - </exclude> - </whitelist> - </filter> -</phpunit> diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ContextStackTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ContextStackTest.php deleted file mode 100644 index 71dfd3f5c0b..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ContextStackTest.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -namespace Sabre\Xml; - -/** - * Test for the ContextStackTrait - * - * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class ContextStackTest extends \PHPUnit_Framework_TestCase { - - function setUp() { - - $this->stack = $this->getMockForTrait('Sabre\\Xml\\ContextStackTrait'); - - } - - function testPushAndPull() { - - $this->stack->contextUri = '/foo/bar'; - $this->stack->elementMap['{DAV:}foo'] = 'Bar'; - $this->stack->namespaceMap['DAV:'] = 'd'; - - $this->stack->pushContext(); - - $this->assertEquals('/foo/bar', $this->stack->contextUri); - $this->assertEquals('Bar', $this->stack->elementMap['{DAV:}foo']); - $this->assertEquals('d', $this->stack->namespaceMap['DAV:']); - - $this->stack->contextUri = '/gir/zim'; - $this->stack->elementMap['{DAV:}foo'] = 'newBar'; - $this->stack->namespaceMap['DAV:'] = 'dd'; - - $this->stack->popContext(); - - $this->assertEquals('/foo/bar', $this->stack->contextUri); - $this->assertEquals('Bar', $this->stack->elementMap['{DAV:}foo']); - $this->assertEquals('d', $this->stack->namespaceMap['DAV:']); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/EnumTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/EnumTest.php deleted file mode 100644 index 2eea9bb5aaf..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/EnumTest.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -namespace Sabre\Xml\Deserializer; - -use Sabre\Xml\Service; - -class EnumTest extends \PHPUnit_Framework_TestCase { - - function testDeserialize() { - - $service = new Service(); - $service->elementMap['{urn:test}root'] = 'Sabre\Xml\Deserializer\enum'; - - $xml = <<<XML -<?xml version="1.0"?> -<root xmlns="urn:test"> - <foo1/> - <foo2/> -</root> -XML; - - $result = $service->parse($xml); - - $expected = [ - '{urn:test}foo1', - '{urn:test}foo2', - ]; - - - $this->assertEquals($expected, $result); - - - } - - function testDeserializeDefaultNamespace() { - - $service = new Service(); - $service->elementMap['{urn:test}root'] = function($reader) { - return enum($reader, 'urn:test'); - }; - - $xml = <<<XML -<?xml version="1.0"?> -<root xmlns="urn:test"> - <foo1/> - <foo2/> -</root> -XML; - - $result = $service->parse($xml); - - $expected = [ - 'foo1', - 'foo2', - ]; - - - $this->assertEquals($expected, $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/KeyValueTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/KeyValueTest.php deleted file mode 100644 index a94ff4e01a1..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/KeyValueTest.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -namespace Sabre\Xml\Deserializer; - -use - Sabre\Xml\Reader; - -class KeyValueTest extends \PHPUnit_Framework_TestCase { - - function testKeyValue() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <struct> - <elem1 /> - <elem2>hi</elem2> - <elem3 xmlns="http://sabredav.org/another-ns"> - <elem4>foo</elem4> - <elem5>foo &amp; bar</elem5> - </elem3> - </struct> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}struct' => function(Reader $reader) { - return keyValue($reader, 'http://sabredav.org/ns'); - } - ]; - $reader->xml($input); - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}struct', - 'value' => [ - 'elem1' => null, - 'elem2' => 'hi', - '{http://sabredav.org/another-ns}elem3' => [ - [ - 'name' => '{http://sabredav.org/another-ns}elem4', - 'value' => 'foo', - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/another-ns}elem5', - 'value' => 'foo & bar', - 'attributes' => [], - ], - ] - ], - 'attributes' => [], - ] - ], - 'attributes' => [], - ], $output); - } - - /** - * @expectedException \Sabre\Xml\LibXMLException - */ - function testKeyValueLoop() { - - /** - * This bug is a weird one, because it triggers an infinite loop, but - * only if the XML document is a certain size (in bytes). Removing one - * or two characters from the xml body here cause the infinite loop to - * *not* get triggered, so to properly test this bug (Issue #94), don't - * change the XML body. - */ - $invalid_xml = ' - <foo ft="PRNTING" Ppt="YES" AutoClose="YES" SkipUnverified="NO" Test="NO"> - <Package ID="1"> - <MailClass>NONE</MailClass> - <PackageType>ENVELOPE</PackageType> - <WeightOz>1</WeightOz> - <FleetType>DC</FleetType> - <Package ID="2"> - <MailClass>NONE</MailClass> - <PackageType>ENVELOPE</PackageType> - <WeightOz>1</WeightOz> - <FleetType>DC/FleetType> - </Package> - </foo>'; - $reader = new Reader(); - - $reader->xml($invalid_xml); - $reader->elementMap = [ - - '{}Package' => function($reader) { - $recipient = []; - // Borrowing a parser from the KeyValue class. - $keyValue = keyValue($reader); - - if (isset($keyValue['{}WeightOz'])){ - $recipient['referenceId'] = $keyValue['{}WeightOz']; - } - - return $recipient; - }, - ]; - - $reader->parse(); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/RepeatingElementsTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/RepeatingElementsTest.php deleted file mode 100644 index 025d997feb2..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/RepeatingElementsTest.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Sabre\Xml\Deserializer; - -use Sabre\Xml\Service; - -class RepeatingElementsTest extends \PHPUnit_Framework_TestCase { - - function testRead() { - - $service = new Service(); - $service->elementMap['{urn:test}collection'] = function($reader) { - return repeatingElements($reader, '{urn:test}item'); - }; - - $xml = <<<XML -<?xml version="1.0"?> -<collection xmlns="urn:test"> - <item>foo</item> - <item>bar</item> -</collection> -XML; - - $result = $service->parse($xml); - - $expected = [ - 'foo', - 'bar', - ]; - - $this->assertEquals($expected, $result); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/ValueObjectTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/ValueObjectTest.php deleted file mode 100644 index 2d6ce98ce4f..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Deserializer/ValueObjectTest.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php - -namespace Sabre\XML\Deserializer; - -use - Sabre\Xml\Reader; - -class ValueObjectTest extends \PHPUnit_Framework_TestCase { - - function testDeserializeValueObject() { - - $input = <<<XML -<?xml version="1.0"?> -<foo xmlns="urn:foo"> - <firstName>Harry</firstName> - <lastName>Turtle</lastName> -</foo> -XML; - - $reader = new Reader(); - $reader->xml($input); - $reader->elementMap = [ - '{urn:foo}foo' => function(Reader $reader) { - return valueObject($reader, 'Sabre\\Xml\\Deserializer\\TestVo', 'urn:foo'); - } - ]; - - $output = $reader->parse(); - - $vo = new TestVo(); - $vo->firstName = 'Harry'; - $vo->lastName = 'Turtle'; - - $expected = [ - 'name' => '{urn:foo}foo', - 'value' => $vo, - 'attributes' => [] - ]; - - $this->assertEquals( - $expected, - $output - ); - - } - - function testDeserializeValueObjectIgnoredElement() { - - $input = <<<XML -<?xml version="1.0"?> -<foo xmlns="urn:foo"> - <firstName>Harry</firstName> - <lastName>Turtle</lastName> - <email>harry@example.org</email> -</foo> -XML; - - $reader = new Reader(); - $reader->xml($input); - $reader->elementMap = [ - '{urn:foo}foo' => function(Reader $reader) { - return valueObject($reader, 'Sabre\\Xml\\Deserializer\\TestVo', 'urn:foo'); - } - ]; - - $output = $reader->parse(); - - $vo = new TestVo(); - $vo->firstName = 'Harry'; - $vo->lastName = 'Turtle'; - - $expected = [ - 'name' => '{urn:foo}foo', - 'value' => $vo, - 'attributes' => [] - ]; - - $this->assertEquals( - $expected, - $output - ); - - } - - function testDeserializeValueObjectAutoArray() { - - $input = <<<XML -<?xml version="1.0"?> -<foo xmlns="urn:foo"> - <firstName>Harry</firstName> - <lastName>Turtle</lastName> - <link>http://example.org/</link> - <link>http://example.net/</link> -</foo> -XML; - - $reader = new Reader(); - $reader->xml($input); - $reader->elementMap = [ - '{urn:foo}foo' => function(Reader $reader) { - return valueObject($reader, 'Sabre\\Xml\\Deserializer\\TestVo', 'urn:foo'); - } - ]; - - $output = $reader->parse(); - - $vo = new TestVo(); - $vo->firstName = 'Harry'; - $vo->lastName = 'Turtle'; - $vo->link = [ - 'http://example.org/', - 'http://example.net/', - ]; - - - $expected = [ - 'name' => '{urn:foo}foo', - 'value' => $vo, - 'attributes' => [] - ]; - - $this->assertEquals( - $expected, - $output - ); - - } - function testDeserializeValueObjectEmpty() { - - $input = <<<XML -<?xml version="1.0"?> -<foo xmlns="urn:foo" /> -XML; - - $reader = new Reader(); - $reader->xml($input); - $reader->elementMap = [ - '{urn:foo}foo' => function(Reader $reader) { - return valueObject($reader, 'Sabre\\Xml\\Deserializer\\TestVo', 'urn:foo'); - } - ]; - - $output = $reader->parse(); - - $vo = new TestVo(); - - $expected = [ - 'name' => '{urn:foo}foo', - 'value' => $vo, - 'attributes' => [] - ]; - - $this->assertEquals( - $expected, - $output - ); - - } - -} - -class TestVo { - - public $firstName; - public $lastName; - - public $link = []; - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/CDataTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/CDataTest.php deleted file mode 100644 index 2d12d7b2196..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/CDataTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -class CDataTest extends \PHPUnit_Framework_TestCase { - - /** - * @expectedException \LogicException - */ - function testDeserialize() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <blabla /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}blabla' => 'Sabre\\Xml\\Element\\Cdata', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - } - - function testSerialize() { - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://sabredav.org/ns' => null - ]; - $writer->openMemory(); - $writer->startDocument('1.0'); - $writer->setIndent(true); - $writer->write([ - '{http://sabredav.org/ns}root' => new Cdata('<foo&bar>'), - ]); - - $output = $writer->outputMemory(); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"><![CDATA[<foo&bar>]]></root> - -XML; - - $this->assertEquals($expected, $output); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Eater.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Eater.php deleted file mode 100644 index aaba2a01f2b..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Eater.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml; - -/** - * The intention for this reader class, is to read past the end element. This - * should trigger a ParseException - * - * @copyright Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/). - * @author Evert Pot (http://evertpot.com/) - * @license http://sabre.io/license/ Modified BSD License - */ -class Eater implements Xml\Element { - - /** - * The serialize method is called during xml writing. - * - * It should use the $writer argument to encode this object into Xml. - * - * Important note: it is not needed to create the parent element. The - * parent element is already created, and we only have to worry about - * attributes, child elements and text (if any). - * - * Important note 2: If you are writing any new elements, you are also - * responsible for closing them. - * - * @param Xml\Writer $writer - * @return void - */ - function xmlSerialize(Xml\Writer $writer) { - - $writer->startElement('{http://sabredav.org/ns}elem1'); - $writer->write('hiiii!'); - $writer->endElement(); - - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statictly, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseSubTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @param Xml\Reader $reader - * @return mixed - */ - static function xmlDeserialize(Xml\Reader $reader) { - - $reader->next(); - - $count = 1; - while ($count) { - - $reader->read(); - if ($reader->nodeType === $reader::END_ELEMENT) { - $count--; - } - - } - $reader->read(); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/ElementsTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/ElementsTest.php deleted file mode 100644 index f17f2094b2e..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/ElementsTest.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -class ElementsTest extends \PHPUnit_Framework_TestCase { - - function testDeserialize() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <listThingy> - <elem1 /> - <elem2 /> - <elem3 /> - <elem4 attr="val" /> - <elem5>content</elem5> - <elem6><subnode /></elem6> - </listThingy> - <listThingy /> - <otherThing> - <elem1 /> - <elem2 /> - <elem3 /> - </otherThing> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}listThingy' => 'Sabre\\Xml\\Element\\Elements', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}listThingy', - 'value' => [ - '{http://sabredav.org/ns}elem1', - '{http://sabredav.org/ns}elem2', - '{http://sabredav.org/ns}elem3', - '{http://sabredav.org/ns}elem4', - '{http://sabredav.org/ns}elem5', - '{http://sabredav.org/ns}elem6', - ], - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}listThingy', - 'value' => [], - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}otherThing', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => null, - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}elem2', - 'value' => null, - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}elem3', - 'value' => null, - 'attributes' => [], - ], - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - ], $output); - - } - - function testSerialize() { - - $value = [ - '{http://sabredav.org/ns}elem1', - '{http://sabredav.org/ns}elem2', - '{http://sabredav.org/ns}elem3', - '{http://sabredav.org/ns}elem4', - '{http://sabredav.org/ns}elem5', - '{http://sabredav.org/ns}elem6', - ]; - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://sabredav.org/ns' => null - ]; - $writer->openMemory(); - $writer->startDocument('1.0'); - $writer->setIndent(true); - $writer->write([ - '{http://sabredav.org/ns}root' => new Elements($value), - ]); - - $output = $writer->outputMemory(); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1/> - <elem2/> - <elem3/> - <elem4/> - <elem5/> - <elem6/> -</root> - -XML; - - $this->assertEquals($expected, $output); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/KeyValueTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/KeyValueTest.php deleted file mode 100644 index 51c87b5203d..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/KeyValueTest.php +++ /dev/null @@ -1,210 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -class KeyValueTest extends \PHPUnit_Framework_TestCase { - - function testDeserialize() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <struct> - <elem1 /> - <elem2>hi</elem2> - <elem3> - <elem4>foo</elem4> - <elem5>foo &amp; bar</elem5> - </elem3> - <elem6>Hi<!-- ignore me -->there</elem6> - </struct> - <struct /> - <otherThing> - <elem1 /> - </otherThing> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}struct' => 'Sabre\\Xml\\Element\\KeyValue', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}struct', - 'value' => [ - '{http://sabredav.org/ns}elem1' => null, - '{http://sabredav.org/ns}elem2' => 'hi', - '{http://sabredav.org/ns}elem3' => [ - [ - 'name' => '{http://sabredav.org/ns}elem4', - 'value' => 'foo', - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}elem5', - 'value' => 'foo & bar', - 'attributes' => [], - ], - ], - '{http://sabredav.org/ns}elem6' => 'Hithere', - ], - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}struct', - 'value' => [], - 'attributes' => [], - ], - [ - 'name' => '{http://sabredav.org/ns}otherThing', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => null, - 'attributes' => [], - ], - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - ], $output); - - } - - /** - * This test was added to find out why an element gets eaten by the - * SabreDAV MKCOL parser. - */ - function testElementEater() { - - $input = <<<BLA -<?xml version="1.0"?> -<mkcol xmlns="DAV:"> - <set> - <prop> - <resourcetype><collection /></resourcetype> - <displayname>bla</displayname> - </prop> - </set> -</mkcol> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{DAV:}set' => 'Sabre\\Xml\\Element\\KeyValue', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', - '{DAV:}resourcetype' => 'Sabre\\Xml\\Element\\Elements', - ]; - $reader->xml($input); - - $expected = [ - 'name' => '{DAV:}mkcol', - 'value' => [ - [ - 'name' => '{DAV:}set', - 'value' => [ - '{DAV:}prop' => [ - '{DAV:}resourcetype' => [ - '{DAV:}collection', - ], - '{DAV:}displayname' => 'bla', - ], - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - ]; - - $this->assertEquals($expected, $reader->parse()); - - } - - - function testSerialize() { - - $value = [ - '{http://sabredav.org/ns}elem1' => null, - '{http://sabredav.org/ns}elem2' => 'textValue', - '{http://sabredav.org/ns}elem3' => [ - '{http://sabredav.org/ns}elem4' => 'text2', - '{http://sabredav.org/ns}elem5' => null, - ], - '{http://sabredav.org/ns}elem6' => 'text3', - ]; - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://sabredav.org/ns' => null - ]; - $writer->openMemory(); - $writer->startDocument('1.0'); - $writer->setIndent(true); - $writer->write([ - '{http://sabredav.org/ns}root' => new KeyValue($value), - ]); - - $output = $writer->outputMemory(); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1/> - <elem2>textValue</elem2> - <elem3> - <elem4>text2</elem4> - <elem5/> - </elem3> - <elem6>text3</elem6> -</root> - -XML; - - $this->assertEquals($expected, $output); - - } - - /** - * I discovered that when there's no whitespace between elements, elements - * can get skipped. - */ - function testElementSkipProblem() { - - $input = <<<BLA -<?xml version="1.0" encoding="utf-8"?> -<root xmlns="http://sabredav.org/ns"> -<elem3>val3</elem3><elem4>val4</elem4><elem5>val5</elem5></root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}root' => 'Sabre\\Xml\\Element\\KeyValue', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - '{http://sabredav.org/ns}elem3' => 'val3', - '{http://sabredav.org/ns}elem4' => 'val4', - '{http://sabredav.org/ns}elem5' => 'val5', - ], - 'attributes' => [], - ], $output); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Mock.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Mock.php deleted file mode 100644 index f96684cb55a..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/Mock.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml; - -class Mock implements Xml\Element { - - /** - * The serialize method is called during xml writing. - * - * It should use the $writer argument to encode this object into XML. - * - * Important note: it is not needed to create the parent element. The - * parent element is already created, and we only have to worry about - * attributes, child elements and text (if any). - * - * Important note 2: If you are writing any new elements, you are also - * responsible for closing them. - * - * @param Xml\Writer $writer - * @return void - */ - function xmlSerialize(Xml\Writer $writer) { - - $writer->startElement('{http://sabredav.org/ns}elem1'); - $writer->write('hiiii!'); - $writer->endElement(); - - } - - /** - * The deserialize method is called during xml parsing. - * - * This method is called statictly, this is because in theory this method - * may be used as a type of constructor, or factory method. - * - * Often you want to return an instance of the current class, but you are - * free to return other data as well. - * - * Important note 2: You are responsible for advancing the reader to the - * next element. Not doing anything will result in a never-ending loop. - * - * If you just want to skip parsing for this element altogether, you can - * just call $reader->next(); - * - * $reader->parseSubTree() will parse the entire sub-tree, and advance to - * the next element. - * - * @param Xml\Reader $reader - * @return mixed - */ - static function xmlDeserialize(Xml\Reader $reader) { - - $reader->next(); - return 'foobar'; - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/UriTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/UriTest.php deleted file mode 100644 index 53f89ed7aae..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/UriTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -class UriTest extends \PHPUnit_Framework_TestCase { - - function testDeserialize() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <uri>/foo/bar</uri> -</root> -BLA; - - $reader = new Reader(); - $reader->contextUri = 'http://example.org/'; - $reader->elementMap = [ - '{http://sabredav.org/ns}uri' => 'Sabre\\Xml\\Element\\Uri', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $this->assertEquals( - [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}uri', - 'value' => new Uri('http://example.org/foo/bar'), - 'attributes' => [], - ] - ], - 'attributes' => [], - ], - $output - ); - - } - - function testSerialize() { - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://sabredav.org/ns' => null - ]; - $writer->openMemory(); - $writer->startDocument('1.0'); - $writer->setIndent(true); - $writer->contextUri = 'http://example.org/'; - $writer->write([ - '{http://sabredav.org/ns}root' => [ - '{http://sabredav.org/ns}uri' => new Uri('/foo/bar'), - ] - ]); - - $output = $writer->outputMemory(); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <uri>http://example.org/foo/bar</uri> -</root> - -XML; - - $this->assertEquals($expected, $output); - - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/XmlFragmentTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/XmlFragmentTest.php deleted file mode 100644 index 461cc155ca6..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Element/XmlFragmentTest.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -namespace Sabre\Xml\Element; - -use Sabre\Xml\Reader; -use Sabre\Xml\Writer; - -class XmlFragmentTest extends \PHPUnit_Framework_TestCase { - - /** - * @dataProvider xmlProvider - */ - function testDeserialize($input, $expected) { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <fragment>$input</fragment> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}fragment' => 'Sabre\\Xml\\Element\\XmlFragment', - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}fragment', - 'value' => new XmlFragment($expected), - 'attributes' => [], - ], - ], - 'attributes' => [], - ], $output); - - } - - /** - * Data provider for serialize and deserialize tests. - * - * Returns three items per test: - * - * 1. Input data for the reader. - * 2. Expected output for XmlFragment deserializer - * 3. Expected output after serializing that value again. - * - * If 3 is not set, use 1 for 3. - * - * @return void - */ - function xmlProvider() { - - return [ - [ - 'hello', - 'hello', - ], - [ - '<element>hello</element>', - '<element xmlns="http://sabredav.org/ns">hello</element>' - ], - [ - '<element foo="bar">hello</element>', - '<element xmlns="http://sabredav.org/ns" foo="bar">hello</element>' - ], - [ - '<element x1:foo="bar" xmlns:x1="http://example.org/ns">hello</element>', - '<element xmlns:x1="http://example.org/ns" xmlns="http://sabredav.org/ns" x1:foo="bar">hello</element>' - ], - [ - '<element xmlns="http://example.org/ns">hello</element>', - '<element xmlns="http://example.org/ns">hello</element>', - '<x1:element xmlns:x1="http://example.org/ns">hello</x1:element>', - ], - [ - '<element xmlns:foo="http://example.org/ns">hello</element>', - '<element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns">hello</element>', - '<element>hello</element>', - ], - [ - '<foo:element xmlns:foo="http://example.org/ns">hello</foo:element>', - '<foo:element xmlns:foo="http://example.org/ns">hello</foo:element>', - '<x1:element xmlns:x1="http://example.org/ns">hello</x1:element>', - ], - [ - '<foo:element xmlns:foo="http://example.org/ns"><child>hello</child></foo:element>', - '<foo:element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns"><child>hello</child></foo:element>', - '<x1:element xmlns:x1="http://example.org/ns"><child>hello</child></x1:element>', - ], - [ - '<foo:element xmlns:foo="http://example.org/ns"><child/></foo:element>', - '<foo:element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns"><child/></foo:element>', - '<x1:element xmlns:x1="http://example.org/ns"><child/></x1:element>', - ], - [ - '<foo:element xmlns:foo="http://example.org/ns"><child a="b"/></foo:element>', - '<foo:element xmlns:foo="http://example.org/ns" xmlns="http://sabredav.org/ns"><child a="b"/></foo:element>', - '<x1:element xmlns:x1="http://example.org/ns"><child a="b"/></x1:element>', - ], - ]; - - } - - /** - * @dataProvider xmlProvider - */ - function testSerialize($expectedFallback, $input, $expected = null) { - - if (is_null($expected)) { - $expected = $expectedFallback; - } - - $writer = new Writer(); - $writer->namespaceMap = [ - 'http://sabredav.org/ns' => null - ]; - $writer->openMemory(); - $writer->startDocument('1.0'); - //$writer->setIndent(true); - $writer->write([ - '{http://sabredav.org/ns}root' => [ - '{http://sabredav.org/ns}fragment' => new XmlFragment($input), - ], - ]); - - $output = $writer->outputMemory(); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"><fragment>$expected</fragment></root> -XML; - - $this->assertEquals($expected, $output); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/InfiteLoopTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/InfiteLoopTest.php deleted file mode 100644 index ec8a136d092..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/InfiteLoopTest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Sabre\Xml; - -class InfiteLoopTest extends \PHPUnit_Framework_TestCase { - - /** - * This particular xml body caused the parser to go into an infinite loop. - * Need to know why. - */ - function testDeserialize() { - - $body = '<?xml version="1.0"?> -<d:propertyupdate xmlns:d="DAV:" xmlns:s="http://sabredav.org/NS/test"> - <d:set><d:prop></d:prop></d:set> - <d:set><d:prop></d:prop></d:set> -</d:propertyupdate>'; - - $reader = new Reader(); - $reader->elementMap = [ - '{DAV:}set' => 'Sabre\\Xml\\Element\\KeyValue', - ]; - $reader->xml($body); - - $output = $reader->parse(); - - $this->assertEquals([ - 'name' => '{DAV:}propertyupdate', - 'value' => [ - [ - 'name' => '{DAV:}set', - 'value' => [ - '{DAV:}prop' => null, - ], - 'attributes' => [], - ], - [ - 'name' => '{DAV:}set', - 'value' => [ - '{DAV:}prop' => null, - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - ], $output); - - } - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ReaderTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ReaderTest.php deleted file mode 100644 index 8da81d1202a..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ReaderTest.php +++ /dev/null @@ -1,585 +0,0 @@ -<?php - -namespace Sabre\Xml; - -class ReaderTest extends \PHPUnit_Framework_TestCase { - - function testGetClark() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns" /> -BLA; - $reader = new Reader(); - $reader->xml($input); - - $reader->next(); - - $this->assertEquals('{http://sabredav.org/ns}root', $reader->getClark()); - - } - - function testGetClarkNoNS() { - - $input = <<<BLA -<?xml version="1.0"?> -<root /> -BLA; - $reader = new Reader(); - $reader->xml($input); - - $reader->next(); - - $this->assertEquals('{}root', $reader->getClark()); - - } - - function testGetClarkNotOnAnElement() { - - $input = <<<BLA -<?xml version="1.0"?> -<root /> -BLA; - $reader = new Reader(); - $reader->xml($input); - - $this->assertNull($reader->getClark()); - } - - function testSimple() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1 attr="val" /> - <elem2> - <elem3>Hi!</elem3> - </elem2> -</root> -BLA; - - $reader = new Reader(); - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => null, - 'attributes' => [ - 'attr' => 'val', - ], - ], - [ - 'name' => '{http://sabredav.org/ns}elem2', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem3', - 'value' => 'Hi!', - 'attributes' => [], - ], - ], - 'attributes' => [], - ], - - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - function testCDATA() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <foo><![CDATA[bar]]></foo> -</root> -BLA; - - $reader = new Reader(); - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}foo', - 'value' => 'bar', - 'attributes' => [], - ], - - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - function testSimpleNamespacedAttribute() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns" xmlns:foo="urn:foo"> - <elem1 foo:attr="val" /> -</root> -BLA; - - $reader = new Reader(); - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => null, - 'attributes' => [ - '{urn:foo}attr' => 'val', - ], - ], - ], - 'attributes' => [], - ]; - - $this->assertEquals($expected, $output); - - } - - function testMappedElement() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1 /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => 'Sabre\\Xml\\Element\\Mock' - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'foobar', - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - /** - * @expectedException \LogicException - */ - function testMappedElementBadClass() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1 /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => new \StdClass() - ]; - $reader->xml($input); - - $reader->parse(); - } - - /** - * @depends testMappedElement - */ - function testMappedElementCallBack() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1 /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => function(Reader $reader) { - $reader->next(); - return 'foobar'; - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'foobar', - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - /** - * @depends testMappedElementCallBack - */ - function testMappedElementCallBackNoNamespace() { - - $input = <<<BLA -<?xml version="1.0"?> -<root> - <elem1 /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - 'elem1' => function(Reader $reader) { - $reader->next(); - return 'foobar'; - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{}root', - 'value' => [ - [ - 'name' => '{}elem1', - 'value' => 'foobar', - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - /** - * @depends testMappedElementCallBack - */ - function testReadText() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1> - <elem2>hello </elem2> - <elem2>world</elem2> - </elem1> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => function(Reader $reader) { - return $reader->readText(); - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'hello world', - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - function testParseProblem() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => 'Sabre\\Xml\\Element\\Mock' - ]; - $reader->xml($input); - - try { - $output = $reader->parse(); - $this->fail('We expected a ParseException to be thrown'); - } catch (LibXMLException $e) { - - $this->assertInternalType('array', $e->getErrors()); - - } - - } - - /** - * @expectedException \Sabre\Xml\ParseException - */ - function testBrokenParserClass() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> -<elem1 /> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => 'Sabre\\Xml\\Element\\Eater' - ]; - $reader->xml($input); - $reader->parse(); - - - } - - /** - * Test was added for Issue #10. - * - * @expectedException Sabre\Xml\LibXMLException - */ - function testBrokenXml() { - - $input = <<<BLA -<test> -<hello> -</hello> -</sffsdf> -BLA; - - $reader = new Reader(); - $reader->xml($input); - $reader->parse(); - - } - - /** - * Test was added for Issue #45. - * - * @expectedException Sabre\Xml\LibXMLException - */ - function testBrokenXml2() { - - $input = <<<XML -<?xml version="1.0" encoding="UTF-8"?> -<definitions> - <collaboration> - <participant id="sid-A33D08EB-A2DE-448F-86FE-A2B62E98818" name="Company" processRef="sid-A0A6A196-3C9A-4C69-88F6-7ED7DDFDD264"> - <extensionElements> - <signavio:signavioMetaData metaKey="bgcolor" /> - ""Administrative w"> - <extensionElements> - <signavio:signavioMetaData metaKey="bgcolor" metaValue=""/> - </extensionElements> - </lan -XML; - $reader = new Reader(); - $reader->xml($input); - $reader->parse(); - - } - - - /** - * @depends testMappedElement - */ - function testParseInnerTree() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1> - <elem1 /> - </elem1> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => function(Reader $reader) { - - $innerTree = $reader->parseInnerTree(['{http://sabredav.org/ns}elem1' => function(Reader $reader) { - $reader->next(); - return "foobar"; - }]); - - return $innerTree; - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'foobar', - 'attributes' => [], - ] - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - /** - * @depends testParseInnerTree - */ - function testParseGetElements() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1> - <elem1 /> - </elem1> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => function(Reader $reader) { - - $innerTree = $reader->parseGetElements(['{http://sabredav.org/ns}elem1' => function(Reader $reader) { - $reader->next(); - return "foobar"; - }]); - - return $innerTree; - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'foobar', - 'attributes' => [], - ] - ], - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - /** - * @depends testParseInnerTree - */ - function testParseGetElementsNoElements() { - - $input = <<<BLA -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1> - hi - </elem1> -</root> -BLA; - - $reader = new Reader(); - $reader->elementMap = [ - '{http://sabredav.org/ns}elem1' => function(Reader $reader) { - - $innerTree = $reader->parseGetElements(['{http://sabredav.org/ns}elem1' => function(Reader $reader) { - $reader->next(); - return "foobar"; - }]); - - return $innerTree; - } - ]; - $reader->xml($input); - - $output = $reader->parse(); - - $expected = [ - 'name' => '{http://sabredav.org/ns}root', - 'value' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => [], - 'attributes' => [], - ], - ], - 'attributes' => [], - - ]; - - $this->assertEquals($expected, $output); - - } - - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/EnumTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/EnumTest.php deleted file mode 100644 index 2d26e665a2a..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/EnumTest.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -namespace Sabre\Xml\Serializer; - -use Sabre\Xml\Service; - -class EnumTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $service = new Service(); - $service->namespaceMap['urn:test'] = null; - - $xml = $service->write('{urn:test}root', function($writer) { - enum($writer, [ - '{urn:test}foo1', - '{urn:test}foo2', - ]); - }); - - $expected = <<<XML -<?xml version="1.0"?> -<root xmlns="urn:test"> - <foo1/> - <foo2/> -</root> -XML; - - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - - } - - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/RepeatingElementsTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/RepeatingElementsTest.php deleted file mode 100644 index dbca65a572a..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/Serializer/RepeatingElementsTest.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -namespace Sabre\Xml\Serializer; - -use Sabre\Xml\Service; - -class RepeatingElementsTest extends \PHPUnit_Framework_TestCase { - - function testSerialize() { - - $service = new Service(); - $service->namespaceMap['urn:test'] = null; - $xml = $service->write('{urn:test}collection', function($writer) { - repeatingElements($writer, [ - 'foo', - 'bar', - ], '{urn:test}item'); - }); - - $expected = <<<XML -<?xml version="1.0"?> -<collection xmlns="urn:test"> - <item>foo</item> - <item>bar</item> -</collection> -XML; - - - $this->assertXmlStringEqualsXmlString($expected, $xml); - - - } - - -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ServiceTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ServiceTest.php deleted file mode 100644 index e6fcf149926..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/ServiceTest.php +++ /dev/null @@ -1,328 +0,0 @@ -<?php - -namespace Sabre\Xml; - -class ServiceTest extends \PHPUnit_Framework_TestCase { - - function testGetReader() { - - $elems = [ - '{http://sabre.io/ns}test' => 'Test!', - ]; - - $util = new Service(); - $util->elementMap = $elems; - - $reader = $util->getReader(); - $this->assertInstanceOf('Sabre\\Xml\\Reader', $reader); - $this->assertEquals($elems, $reader->elementMap); - - } - - function testGetWriter() { - - $ns = [ - 'http://sabre.io/ns' => 's', - ]; - - $util = new Service(); - $util->namespaceMap = $ns; - - $writer = $util->getWriter(); - $this->assertInstanceOf('Sabre\\Xml\\Writer', $writer); - $this->assertEquals($ns, $writer->namespaceMap); - - } - - /** - * @depends testGetReader - */ - function testParse() { - - $xml = <<<XML -<root xmlns="http://sabre.io/ns"> - <child>value</child> -</root> -XML; - $util = new Service(); - $result = $util->parse($xml, null, $rootElement); - $this->assertEquals('{http://sabre.io/ns}root', $rootElement); - - $expected = [ - [ - 'name' => '{http://sabre.io/ns}child', - 'value' => 'value', - 'attributes' => [], - ] - ]; - - $this->assertEquals( - $expected, - $result - ); - - } - - /** - * @depends testGetReader - */ - function testParseStream() { - - $xml = <<<XML -<root xmlns="http://sabre.io/ns"> - <child>value</child> -</root> -XML; - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $xml); - rewind($stream); - - $util = new Service(); - $result = $util->parse($stream, null, $rootElement); - $this->assertEquals('{http://sabre.io/ns}root', $rootElement); - - $expected = [ - [ - 'name' => '{http://sabre.io/ns}child', - 'value' => 'value', - 'attributes' => [], - ] - ]; - - $this->assertEquals( - $expected, - $result - ); - - } - - /** - * @depends testGetReader - */ - function testExpect() { - - $xml = <<<XML -<root xmlns="http://sabre.io/ns"> - <child>value</child> -</root> -XML; - $util = new Service(); - $result = $util->expect('{http://sabre.io/ns}root', $xml); - - $expected = [ - [ - 'name' => '{http://sabre.io/ns}child', - 'value' => 'value', - 'attributes' => [], - ] - ]; - - $this->assertEquals( - $expected, - $result - ); - } - - /** - * @depends testGetReader - */ - function testExpectStream() { - - $xml = <<<XML -<root xmlns="http://sabre.io/ns"> - <child>value</child> -</root> -XML; - - $stream = fopen('php://memory', 'r+'); - fwrite($stream, $xml); - rewind($stream); - - $util = new Service(); - $result = $util->expect('{http://sabre.io/ns}root', $stream); - - $expected = [ - [ - 'name' => '{http://sabre.io/ns}child', - 'value' => 'value', - 'attributes' => [], - ] - ]; - - $this->assertEquals( - $expected, - $result - ); - } - - /** - * @depends testGetReader - * @expectedException \Sabre\Xml\ParseException - */ - function testExpectWrong() { - - $xml = <<<XML -<root xmlns="http://sabre.io/ns"> - <child>value</child> -</root> -XML; - $util = new Service(); - $util->expect('{http://sabre.io/ns}error', $xml); - - } - - /** - * @depends testGetWriter - */ - function testWrite() { - - $util = new Service(); - $util->namespaceMap = [ - 'http://sabre.io/ns' => 's', - ]; - $result = $util->write('{http://sabre.io/ns}root', [ - '{http://sabre.io/ns}child' => 'value', - ]); - - $expected = <<<XML -<?xml version="1.0"?> -<s:root xmlns:s="http://sabre.io/ns"> - <s:child>value</s:child> -</s:root> - -XML; - $this->assertEquals( - $expected, - $result - ); - - } - - function testMapValueObject() { - - $input = <<<XML -<?xml version="1.0"?> -<order xmlns="http://sabredav.org/ns"> - <id>1234</id> - <amount>99.99</amount> - <description>black friday deal</description> - <status> - <id>5</id> - <label>processed</label> - </status> -</order> - -XML; - - $ns = 'http://sabredav.org/ns'; - $orderService = new \Sabre\Xml\Service(); - $orderService->mapValueObject('{' . $ns . '}order', 'Sabre\Xml\Order'); - $orderService->mapValueObject('{' . $ns . '}status', 'Sabre\Xml\OrderStatus'); - $orderService->namespaceMap[$ns] = null; - - $order = $orderService->parse($input); - $expected = new Order(); - $expected->id = 1234; - $expected->amount = 99.99; - $expected->description = 'black friday deal'; - $expected->status = new OrderStatus(); - $expected->status->id = 5; - $expected->status->label = 'processed'; - - $this->assertEquals($expected, $order); - - $writtenXml = $orderService->writeValueObject($order); - $this->assertEquals($input, $writtenXml); - } - - function testMapValueObjectArrayProperty() { - - $input = <<<XML -<?xml version="1.0"?> -<order xmlns="http://sabredav.org/ns"> - <id>1234</id> - <amount>99.99</amount> - <description>black friday deal</description> - <status> - <id>5</id> - <label>processed</label> - </status> - <link>http://example.org/</link> - <link>http://example.com/</link> -</order> - -XML; - - $ns = 'http://sabredav.org/ns'; - $orderService = new \Sabre\Xml\Service(); - $orderService->mapValueObject('{' . $ns . '}order', 'Sabre\Xml\Order'); - $orderService->mapValueObject('{' . $ns . '}status', 'Sabre\Xml\OrderStatus'); - $orderService->namespaceMap[$ns] = null; - - $order = $orderService->parse($input); - $expected = new Order(); - $expected->id = 1234; - $expected->amount = 99.99; - $expected->description = 'black friday deal'; - $expected->status = new OrderStatus(); - $expected->status->id = 5; - $expected->status->label = 'processed'; - $expected->link = ['http://example.org/', 'http://example.com/']; - - $this->assertEquals($expected, $order); - - $writtenXml = $orderService->writeValueObject($order); - $this->assertEquals($input, $writtenXml); - } - - /** - * @expectedException \InvalidArgumentException - */ - function testWriteVoNotFound() { - - $service = new Service(); - $service->writeValueObject(new \StdClass()); - - } - - function testParseClarkNotation() { - - $this->assertEquals([ - 'http://sabredav.org/ns', - 'elem', - ], Service::parseClarkNotation('{http://sabredav.org/ns}elem')); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testParseClarkNotationFail() { - - Service::parseClarkNotation('http://sabredav.org/ns}elem'); - - } - -} - -/** - * asset for testMapValueObject() - * @internal - */ -class Order { - public $id; - public $amount; - public $description; - public $status; - public $empty; - public $link = []; -} - -/** - * asset for testMapValueObject() - * @internal - */ -class OrderStatus { - public $id; - public $label; -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/WriterTest.php b/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/WriterTest.php deleted file mode 100644 index 574d8023700..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/Sabre/Xml/WriterTest.php +++ /dev/null @@ -1,439 +0,0 @@ -<?php - -namespace Sabre\Xml; - -class WriterTest extends \PHPUnit_Framework_TestCase { - - protected $writer; - - function setUp() { - - $this->writer = new Writer(); - $this->writer->namespaceMap = [ - 'http://sabredav.org/ns' => 's', - ]; - $this->writer->openMemory(); - $this->writer->setIndent(true); - $this->writer->startDocument(); - - } - - function compare($input, $output) { - - $this->writer->write($input); - $this->assertEquals($output, $this->writer->outputMemory()); - - } - - - function testSimple() { - - $this->compare([ - '{http://sabredav.org/ns}root' => 'text', - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns">text</s:root> - -HI - ); - - } - - /** - * @depends testSimple - */ - function testSimpleQuotes() { - - $this->compare([ - '{http://sabredav.org/ns}root' => '"text"', - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns">&quot;text&quot;</s:root> - -HI - ); - - } - - function testSimpleAttributes() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - 'value' => 'text', - 'attributes' => [ - 'attr1' => 'attribute value', - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns" attr1="attribute value">text</s:root> - -HI - ); - - } - function testMixedSyntax() { - $this->compare([ - '{http://sabredav.org/ns}root' => [ - '{http://sabredav.org/ns}single' => 'value', - '{http://sabredav.org/ns}multiple' => [ - [ - 'name' => '{http://sabredav.org/ns}foo', - 'value' => 'bar', - ], - [ - 'name' => '{http://sabredav.org/ns}foo', - 'value' => 'foobar', - ], - ], - [ - 'name' => '{http://sabredav.org/ns}attributes', - 'value' => null, - 'attributes' => [ - 'foo' => 'bar', - ], - ], - [ - 'name' => '{http://sabredav.org/ns}verbose', - 'value' => 'syntax', - 'attributes' => [ - 'foo' => 'bar', - ], - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:single>value</s:single> - <s:multiple> - <s:foo>bar</s:foo> - <s:foo>foobar</s:foo> - </s:multiple> - <s:attributes foo="bar"/> - <s:verbose foo="bar">syntax</s:verbose> -</s:root> - -HI - ); - } - - function testNull() { - - $this->compare([ - '{http://sabredav.org/ns}root' => null, - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"/> - -HI - ); - - } - - function testArrayFormat2() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'text', - 'attributes' => [ - 'attr1' => 'attribute value', - ], - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:elem1 attr1="attribute value">text</s:elem1> -</s:root> - -HI - ); - - } - - function testArrayOfValues() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => [ - 'foo', - 'bar', - 'baz', - ], - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:elem1>foobarbaz</s:elem1> -</s:root> - -HI - ); - - } - - /** - * @depends testArrayFormat2 - */ - function testArrayFormat2NoValue() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'attributes' => [ - 'attr1' => 'attribute value', - ], - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:elem1 attr1="attribute value"/> -</s:root> - -HI - ); - - } - - function testCustomNamespace() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - '{urn:foo}elem1' => 'bar', - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <x1:elem1 xmlns:x1="urn:foo">bar</x1:elem1> -</s:root> - -HI - ); - - } - - function testEmptyNamespace() { - - // Empty namespaces are allowed, so we should support this. - $this->compare([ - '{http://sabredav.org/ns}root' => [ - '{}elem1' => 'bar', - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <elem1 xmlns="">bar</elem1> -</s:root> - -HI - ); - - } - - function testAttributes() { - - $this->compare([ - '{http://sabredav.org/ns}root' => [ - [ - 'name' => '{http://sabredav.org/ns}elem1', - 'value' => 'text', - 'attributes' => [ - 'attr1' => 'val1', - '{http://sabredav.org/ns}attr2' => 'val2', - '{urn:foo}attr3' => 'val3', - ], - ], - ], - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:elem1 attr1="val1" s:attr2="val2" x1:attr3="val3" xmlns:x1="urn:foo">text</s:elem1> -</s:root> - -HI - ); - - } - - function testBaseElement() { - - $this->compare([ - '{http://sabredav.org/ns}root' => new Element\Base('hello') - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns">hello</s:root> - -HI - ); - - } - - function testElementObj() { - - $this->compare([ - '{http://sabredav.org/ns}root' => new Element\Mock() - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:elem1>hiiii!</s:elem1> -</s:root> - -HI - ); - - } - - function testEmptyNamespacePrefix() { - - $this->writer->namespaceMap['http://sabredav.org/ns'] = null; - $this->compare([ - '{http://sabredav.org/ns}root' => new Element\Mock() - ], <<<HI -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1>hiiii!</elem1> -</root> - -HI - ); - - } - - function testEmptyNamespacePrefixEmptyString() { - - $this->writer->namespaceMap['http://sabredav.org/ns'] = ''; - $this->compare([ - '{http://sabredav.org/ns}root' => new Element\Mock() - ], <<<HI -<?xml version="1.0"?> -<root xmlns="http://sabredav.org/ns"> - <elem1>hiiii!</elem1> -</root> - -HI - ); - - } - - function testWriteElement() { - - $this->writer->writeElement("{http://sabredav.org/ns}foo", 'content'); - - $output = <<<HI -<?xml version="1.0"?> -<s:foo xmlns:s="http://sabredav.org/ns">content</s:foo> - -HI; - - $this->assertEquals($output, $this->writer->outputMemory()); - - - } - - function testWriteElementComplex() { - - $this->writer->writeElement("{http://sabredav.org/ns}foo", new Element\KeyValue(['{http://sabredav.org/ns}bar' => 'test'])); - - $output = <<<HI -<?xml version="1.0"?> -<s:foo xmlns:s="http://sabredav.org/ns"> - <s:bar>test</s:bar> -</s:foo> - -HI; - - $this->assertEquals($output, $this->writer->outputMemory()); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testWriteBadObject() { - - $this->writer->write(new \StdClass()); - - } - - function testStartElementSimple() { - - $this->writer->startElement("foo"); - $this->writer->endElement(); - - $output = <<<HI -<?xml version="1.0"?> -<foo xmlns:s="http://sabredav.org/ns"/> - -HI; - - $this->assertEquals($output, $this->writer->outputMemory()); - - } - - function testCallback() { - - $this->compare([ - '{http://sabredav.org/ns}root' => function(Writer $writer) { - $writer->text('deferred writer'); - }, - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns">deferred writer</s:root> - -HI - ); - - } - - /** - * @expectedException \InvalidArgumentException - */ - function testResource() { - - $this->compare([ - '{http://sabredav.org/ns}root' => fopen('php://memory', 'r'), - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns">deferred writer</s:root> - -HI - ); - - } - - function testClassMap() { - - $obj = (object)[ - 'key1' => 'value1', - 'key2' => 'value2', - ]; - - $this->writer->classMap['stdClass'] = function(Writer $writer, $value) { - - foreach (get_object_vars($value) as $key => $val) { - $writer->writeElement('{http://sabredav.org/ns}' . $key, $val); - } - - }; - - $this->compare([ - '{http://sabredav.org/ns}root' => $obj - ], <<<HI -<?xml version="1.0"?> -<s:root xmlns:s="http://sabredav.org/ns"> - <s:key1>value1</s:key1> - <s:key2>value2</s:key2> -</s:root> - -HI - ); - - } -} diff --git a/htdocs/includes/sabre/sabre/xml/tests/phpcs/ruleset.xml b/htdocs/includes/sabre/sabre/xml/tests/phpcs/ruleset.xml deleted file mode 100644 index 07acb89eea0..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/phpcs/ruleset.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0"?> -<ruleset name="sabre.php"> - <description>sabre.io codesniffer ruleset</description> - - <!-- Include the whole PSR-1 standard --> - <rule ref="PSR1" /> - - <!-- All PHP files MUST use the Unix LF (linefeed) line ending. --> - <rule ref="Generic.Files.LineEndings"> - <properties> - <property name="eolChar" value="\n"/> - </properties> - </rule> - - <!-- The closing ?> tag MUST be omitted from files containing only PHP. --> - <rule ref="Zend.Files.ClosingTag"/> - - <!-- There MUST NOT be trailing whitespace at the end of non-blank lines. --> - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> - <properties> - <property name="ignoreBlankLines" value="true"/> - </properties> - </rule> - - <!-- There MUST NOT be more than one statement per line. --> - <rule ref="Generic.Formatting.DisallowMultipleStatements"/> - - <rule ref="Generic.WhiteSpace.ScopeIndent"> - <properties> - <property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT"/> - </properties> - </rule> - <rule ref="Generic.WhiteSpace.DisallowTabIndent"/> - - <!-- PHP keywords MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseKeyword"/> - - <!-- The PHP constants true, false, and null MUST be in lower case. --> - <rule ref="Generic.PHP.LowerCaseConstant"/> - - <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> - - <!-- In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma. --> - <!-- - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> - <properties> - <property name="equalsSpacing" value="1"/> - </properties> - </rule> - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> - <severity>0</severity> - </rule> - --> - <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/> - -</ruleset> diff --git a/htdocs/includes/sabre/sabre/xml/tests/phpunit.xml.dist b/htdocs/includes/sabre/sabre/xml/tests/phpunit.xml.dist deleted file mode 100644 index fe8b2359aa6..00000000000 --- a/htdocs/includes/sabre/sabre/xml/tests/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ -<phpunit - colors="true" - bootstrap="../vendor/autoload.php" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - > - <testsuite name="Sabre_XML"> - <directory>Sabre/</directory> - </testsuite> - - <filter> - <whitelist addUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">../lib/</directory> - </whitelist> - </filter> -</phpunit> diff --git a/htdocs/includes/stripe/stripe-php/.coveralls.github-actions.yml b/htdocs/includes/stripe/stripe-php/.coveralls.github-actions.yml new file mode 100644 index 00000000000..40ff9a76b32 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/.coveralls.github-actions.yml @@ -0,0 +1,3 @@ +service_name: github-actions +coverage_clover: clover.xml +json_path: coveralls-upload.json diff --git a/htdocs/includes/stripe/stripe-php/.editorconfig b/htdocs/includes/stripe/stripe-php/.editorconfig index 9e93e0c4c3e..174e9120bf8 100644 --- a/htdocs/includes/stripe/stripe-php/.editorconfig +++ b/htdocs/includes/stripe/stripe-php/.editorconfig @@ -12,3 +12,9 @@ charset = utf-8 [*.{json,yml}] indent_size = 2 + +[*.neon] +indent_style = tab + +[Makefile] +indent_style = tab diff --git a/htdocs/includes/stripe/stripe-php/.gitignore b/htdocs/includes/stripe/stripe-php/.gitignore index 17b94183baf..db88f6676d7 100644 --- a/htdocs/includes/stripe/stripe-php/.gitignore +++ b/htdocs/includes/stripe/stripe-php/.gitignore @@ -1,3 +1,6 @@ +# Ignore build files +build/* + # Mac OS X dumps these all over the place. .DS_Store @@ -15,3 +18,14 @@ clover.xml # Ignore IDE's configuration files .idea + +# Ignore PHP CS Fixer local config and cache +.php_cs +.php_cs.cache + +# Ignore PHPStan local config +.phpstan.neon + +# Ignore phpDocumentor's local config and artifacts +.phpdoc/* +phpdoc.xml diff --git a/htdocs/includes/stripe/stripe-php/.php_cs.dist b/htdocs/includes/stripe/stripe-php/.php_cs.dist new file mode 100644 index 00000000000..2ebf9f3d8c4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/.php_cs.dist @@ -0,0 +1,45 @@ +<?php + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + // Rulesets + '@PSR2' => true, + '@PhpCsFixer' => true, + '@PhpCsFixer:risky' => true, + '@PHP56Migration:risky' => true, + '@PHPUnit57Migration:risky' => true, + + // Additional rules + 'fopen_flags' => true, + 'linebreak_after_opening_tag' => true, + 'native_constant_invocation' => true, + 'native_function_invocation' => true, + + // --- Diffs from @PhpCsFixer / @PhpCsFixer:risky --- + + // This is the same as the default for the @PhpCsFixer ruleset, minus + // the following values: ['include', 'include_once', 'require', + // 'require_once']. We could enable them and remove this line after + // updating codegen for the `init.php` file to be compliant. + 'blank_line_before_statement' => ['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'return', 'switch', 'throw', 'try']], + + // This is just prettier / easier to read. + 'concat_space' => ['spacing' => 'one'], + + // This causes strange ordering with codegen'd classes. We might be + // able to enable this if we update codegen to output class elements + // in the correct order. + 'ordered_class_elements' => false, + + // Keep this disabled to avoid unnecessary diffs in PHPDoc comments of + // codegen'd classes. + 'phpdoc_align' => false, + + // This is a "risky" rule that causes a bug in our codebase. + // Specifically, in `StripeObject.updateAttributes` we construct new + // `StripeObject`s for metadata. We can't use `self` there because it + // needs to be a raw `StripeObject`. + 'self_accessor' => false, + ]) +; diff --git a/htdocs/includes/stripe/stripe-php/CHANGELOG.md b/htdocs/includes/stripe/stripe-php/CHANGELOG.md index 5554f4ceb1f..4e867c82b14 100644 --- a/htdocs/includes/stripe/stripe-php/CHANGELOG.md +++ b/htdocs/includes/stripe/stripe-php/CHANGELOG.md @@ -1,732 +1,1316 @@ # Changelog +## 7.67.0 - 2020-12-09 +* [#1060](https://github.com/stripe/stripe-php/pull/1060) Improve PHPDocs for `Discount` +* [#1059](https://github.com/stripe/stripe-php/pull/1059) Upgrade PHPStan to 0.12.59 +* [#1057](https://github.com/stripe/stripe-php/pull/1057) Bump PHP-CS-Fixer and update code + +## 7.66.1 - 2020-12-01 +* [#1054](https://github.com/stripe/stripe-php/pull/1054) Improve error message for invalid keys in StripeClient + +## 7.66.0 - 2020-11-24 +* [#1053](https://github.com/stripe/stripe-php/pull/1053) Update PHPDocs + +## 7.65.0 - 2020-11-19 +* [#1050](https://github.com/stripe/stripe-php/pull/1050) Added constants for `proration_behavior` on `Subscription` + +## 7.64.0 - 2020-11-18 +* [#1049](https://github.com/stripe/stripe-php/pull/1049) Update PHPDocs + +## 7.63.0 - 2020-11-17 +* [#1048](https://github.com/stripe/stripe-php/pull/1048) Update PHPDocs +* [#1046](https://github.com/stripe/stripe-php/pull/1046) Force IPv4 resolving + +## 7.62.0 - 2020-11-09 +* [#1041](https://github.com/stripe/stripe-php/pull/1041) Add missing constants on `Event` +* [#1038](https://github.com/stripe/stripe-php/pull/1038) Update PHPDocs + +## 7.61.0 - 2020-10-20 +* [#1030](https://github.com/stripe/stripe-php/pull/1030) Add support for `jp_rn` and `ru_kpp` as a `type` on `TaxId` + +## 7.60.0 - 2020-10-15 +* [#1027](https://github.com/stripe/stripe-php/pull/1027) Warn if opts are in params + +## 7.58.0 - 2020-10-14 +* [#1026](https://github.com/stripe/stripe-php/pull/1026) Add support for the Payout Reverse API + +## 7.57.0 - 2020-09-29 +* [#1020](https://github.com/stripe/stripe-php/pull/1020) Add support for the `SetupAttempt` resource and List API + +## 7.56.0 - 2020-09-25 +* [#1019](https://github.com/stripe/stripe-php/pull/1019) Update PHPDocs + +## 7.55.0 - 2020-09-24 +* [#1018](https://github.com/stripe/stripe-php/pull/1018) Multiple API changes + * Updated PHPDocs + * Added `TYPE_CONTRIBUTION` as a constant on `BalanceTransaction` + +## 7.54.0 - 2020-09-23 +* [#1017](https://github.com/stripe/stripe-php/pull/1017) Updated PHPDoc + +## 7.53.1 - 2020-09-22 +* [#1015](https://github.com/stripe/stripe-php/pull/1015) Bugfix: don't error on systems with php_uname in disablefunctions with whitespace + +## 7.53.0 - 2020-09-21 +* [#1016](https://github.com/stripe/stripe-php/pull/1016) Updated PHPDocs + +## 7.52.0 - 2020-09-08 +* [#1010](https://github.com/stripe/stripe-php/pull/1010) Update PHPDocs + +## 7.51.0 - 2020-09-02 +* [#1007](https://github.com/stripe/stripe-php/pull/1007) Multiple API changes + * Add support for the Issuing Dispute Submit API + * Add constants for `payment_status` on Checkout `Session` +* [#1003](https://github.com/stripe/stripe-php/pull/1003) Add trim to getSignatures to allow for leading whitespace. + +## 7.50.0 - 2020-08-28 +* [#1005](https://github.com/stripe/stripe-php/pull/1005) Updated PHPDocs + +## 7.49.0 - 2020-08-19 +* [#998](https://github.com/stripe/stripe-php/pull/998) PHPDocs updated + +## 7.48.0 - 2020-08-17 +* [#997](https://github.com/stripe/stripe-php/pull/997) PHPDocs updated +* [#996](https://github.com/stripe/stripe-php/pull/996) Fixing telemetry + +## 7.47.0 - 2020-08-13 +* [#994](https://github.com/stripe/stripe-php/pull/994) Nullable balance_transactions on issuing disputes +* [#991](https://github.com/stripe/stripe-php/pull/991) Fix invalid return types in OAuthService + +## 7.46.1 - 2020-08-07 +* [#990](https://github.com/stripe/stripe-php/pull/990) PHPdoc changes + +## 7.46.0 - 2020-08-05 +* [#989](https://github.com/stripe/stripe-php/pull/989) Add support for the `PromotionCode` resource and APIs + +## 7.45.0 - 2020-07-28 +* [#981](https://github.com/stripe/stripe-php/pull/981) PHPdoc updates + +## 7.44.0 - 2020-07-20 +* [#948](https://github.com/stripe/stripe-php/pull/948) Add `first()` and `last()` functions to `Collection` + +## 7.43.0 - 2020-07-17 +* [#975](https://github.com/stripe/stripe-php/pull/975) Add support for `political_exposure` on `Person` + +## 7.42.0 - 2020-07-15 +* [#974](https://github.com/stripe/stripe-php/pull/974) Add new constants for `purpose` on `File` + +## 7.41.1 - 2020-07-15 +* [#973](https://github.com/stripe/stripe-php/pull/973) Multiple PHPDoc fixes + +## 7.41.0 - 2020-07-14 +* [#971](https://github.com/stripe/stripe-php/pull/971) Adds enum values for `billing_address_collection` on Checkout `Session` + +## 7.40.0 - 2020-07-06 +* [#964](https://github.com/stripe/stripe-php/pull/964) Add OAuthService + +## 7.39.0 - 2020-06-25 +* [#960](https://github.com/stripe/stripe-php/pull/960) Add constants for `payment_behavior` on `Subscription` + +## 7.38.0 - 2020-06-24 +* [#959](https://github.com/stripe/stripe-php/pull/959) Add multiple constants missing for `Event` + +## 7.37.2 - 2020-06-23 +* [#957](https://github.com/stripe/stripe-php/pull/957) Updated PHPDocs + +## 7.37.1 - 2020-06-11 +* [#952](https://github.com/stripe/stripe-php/pull/952) Improve PHPDoc + +## 7.37.0 - 2020-06-09 +* [#950](https://github.com/stripe/stripe-php/pull/950) Add support for `id_npwp` and `my_frp` as `type` on `TaxId` + +## 7.36.2 - 2020-06-03 +* [#946](https://github.com/stripe/stripe-php/pull/946) Update PHPDoc + +## 7.36.1 - 2020-05-28 +* [#938](https://github.com/stripe/stripe-php/pull/938) Remove extra array_keys() call. +* [#942](https://github.com/stripe/stripe-php/pull/942) fix autopagination for service methods + +## 7.36.0 - 2020-05-21 +* [#937](https://github.com/stripe/stripe-php/pull/937) Add support for `ae_trn`, `cl_tin` and `sa_vat` as `type` on `TaxId` + +## 7.35.0 - 2020-05-20 +* [#936](https://github.com/stripe/stripe-php/pull/936) Add `anticipation_repayment` as a `type` on `BalanceTransaction` + +## 7.34.0 - 2020-05-18 +* [#934](https://github.com/stripe/stripe-php/pull/934) Add support for `issuing_dispute` as a `type` on `BalanceTransaction` + +## 7.33.1 - 2020-05-15 +* [#933](https://github.com/stripe/stripe-php/pull/933) Services bugfix: convert nested null params to empty strings + +## 7.33.0 - 2020-05-14 +* [#771](https://github.com/stripe/stripe-php/pull/771) Introduce client/services API. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) contains before & after examples of the backwards-compatible changes. + +## 7.32.1 - 2020-05-13 +* [#932](https://github.com/stripe/stripe-php/pull/932) Fix multiple PHPDoc + +## 7.32.0 - 2020-05-11 +* [#931](https://github.com/stripe/stripe-php/pull/931) Add support for the `LineItem` resource and APIs + +## 7.31.0 - 2020-05-01 +* [#927](https://github.com/stripe/stripe-php/pull/927) Add support for new tax IDs + +## 7.30.0 - 2020-04-29 +* [#924](https://github.com/stripe/stripe-php/pull/924) Add support for the `Price` resource and APIs + +## 7.29.0 - 2020-04-22 +* [#920](https://github.com/stripe/stripe-php/pull/920) Add support for the `Session` resource and APIs on the `BillingPortal` namespace + +## 7.28.1 - 2020-04-10 +* [#915](https://github.com/stripe/stripe-php/pull/915) Improve PHPdocs for many classes + +## 7.28.0 - 2020-04-03 +* [#912](https://github.com/stripe/stripe-php/pull/912) Preserve backwards compatibility for typoed `TYPE_ADJUSTEMENT` enum. +* [#911](https://github.com/stripe/stripe-php/pull/911) Codegenerated PHPDoc for nested resources +* [#902](https://github.com/stripe/stripe-php/pull/902) Update docstrings for nested resources + +## 7.27.3 - 2020-03-18 +* [#899](https://github.com/stripe/stripe-php/pull/899) Convert keys to strings in `StripeObject::toArray()` + +## 7.27.2 - 2020-03-13 +* [#894](https://github.com/stripe/stripe-php/pull/894) Multiple PHPDocs changes + +## 7.27.1 - 2020-03-03 +* [#890](https://github.com/stripe/stripe-php/pull/890) Update PHPdoc + +## 7.27.0 - 2020-02-28 +* [#889](https://github.com/stripe/stripe-php/pull/889) Add new constants for `type` on `TaxId` + +## 7.26.0 - 2020-02-26 +* [#886](https://github.com/stripe/stripe-php/pull/886) Add support for listing Checkout `Session` +* [#883](https://github.com/stripe/stripe-php/pull/883) Add PHPDoc class descriptions + +## 7.25.0 - 2020-02-14 +* [#879](https://github.com/stripe/stripe-php/pull/879) Make `\Stripe\Collection` implement `\Countable` +* [#875](https://github.com/stripe/stripe-php/pull/875) Last set of PHP-CS-Fixer updates +* [#874](https://github.com/stripe/stripe-php/pull/874) Enable php_unit_internal_class rule +* [#873](https://github.com/stripe/stripe-php/pull/873) Add support for phpDocumentor in Makefile +* [#872](https://github.com/stripe/stripe-php/pull/872) Another batch of PHP-CS-Fixer rule updates +* [#871](https://github.com/stripe/stripe-php/pull/871) Fix a few PHPDoc comments +* [#870](https://github.com/stripe/stripe-php/pull/870) More PHP-CS-Fixer tweaks + +## 7.24.0 - 2020-02-10 +* [#862](https://github.com/stripe/stripe-php/pull/862) Better PHPDoc +* [#865](https://github.com/stripe/stripe-php/pull/865) Get closer to `@PhpCsFixer` standard ruleset + +## 7.23.0 - 2020-02-05 +* [#860](https://github.com/stripe/stripe-php/pull/860) Add PHPDoc types for expandable fields +* [#858](https://github.com/stripe/stripe-php/pull/858) Use `native_function_invocation` PHPStan rule +* [#857](https://github.com/stripe/stripe-php/pull/857) Update PHPDoc on nested resources +* [#855](https://github.com/stripe/stripe-php/pull/855) PHPDoc: `StripeObject` -> `ErrorObject` where appropriate +* [#837](https://github.com/stripe/stripe-php/pull/837) Autogen diff +* [#854](https://github.com/stripe/stripe-php/pull/854) Upgrade PHPStan and fix settings +* [#850](https://github.com/stripe/stripe-php/pull/850) Yet more PHPDoc updates + +## 7.22.0 - 2020-01-31 +* [#849](https://github.com/stripe/stripe-php/pull/849) Add new constants for `type` on `TaxId` +* [#843](https://github.com/stripe/stripe-php/pull/843) Even more PHPDoc fixes +* [#841](https://github.com/stripe/stripe-php/pull/841) More PHPDoc fixes + +## 7.21.1 - 2020-01-29 +* [#840](https://github.com/stripe/stripe-php/pull/840) Update phpdocs across multiple resources. + +## 7.21.0 - 2020-01-28 +* [#839](https://github.com/stripe/stripe-php/pull/839) Add support for `TYPE_ES_CIF` on `TaxId` + +## 7.20.0 - 2020-01-23 +* [#836](https://github.com/stripe/stripe-php/pull/836) Add new type values for `TaxId` + +## 7.19.1 - 2020-01-14 +* [#831](https://github.com/stripe/stripe-php/pull/831) Fix incorrect `UnexpectedValueException` instantiation + +## 7.19.0 - 2020-01-14 +* [#830](https://github.com/stripe/stripe-php/pull/830) Add support for `CreditNoteLineItem` + +## 7.18.0 - 2020-01-13 +* [#829](https://github.com/stripe/stripe-php/pull/829) Don't call php_uname function if disabled by php.ini + +## 7.17.0 - 2020-01-08 +* [#821](https://github.com/stripe/stripe-php/pull/821) Improve PHPDoc types for `ApiErrorException.get/setJsonBody()` methods + +## 7.16.0 - 2020-01-06 +* [#826](https://github.com/stripe/stripe-php/pull/826) Rename remaining `$options` to `$opts` +* [#825](https://github.com/stripe/stripe-php/pull/825) Update PHPDoc + +## 7.15.0 - 2020-01-06 +* [#824](https://github.com/stripe/stripe-php/pull/824) Add constant `TYPE_SG_UEN` to `TaxId` + +## 7.14.2 - 2019-12-04 +* [#816](https://github.com/stripe/stripe-php/pull/816) Disable autoloader when checking for `Throwable` + +## 7.14.1 - 2019-11-26 +* [#812](https://github.com/stripe/stripe-php/pull/812) Fix invalid PHPdoc on `Subscription` + +## 7.14.0 - 2019-11-26 +* [#811](https://github.com/stripe/stripe-php/pull/811) Add support for `CreditNote` preview. + +## 7.13.0 - 2019-11-19 +* [#808](https://github.com/stripe/stripe-php/pull/808) Add support for listing lines on an Invoice directly via `Invoice::allLines()` + +## 7.12.0 - 2019-11-08 + +- [#805](https://github.com/stripe/stripe-php/pull/805) Add Source::allSourceTransactions and SubscriptionItem::allUsageRecordSummaries +- [#798](https://github.com/stripe/stripe-php/pull/798) The argument of `array_key_exists` cannot be `null` +- [#803](https://github.com/stripe/stripe-php/pull/803) Removed unwanted got + +## 7.11.0 - 2019-11-06 + +- [#797](https://github.com/stripe/stripe-php/pull/797) Add support for reverse pagination + +## 7.10.0 - 2019-11-05 + +- [#795](https://github.com/stripe/stripe-php/pull/795) Add support for `Mandate` + +## 7.9.0 - 2019-11-05 + +- [#794](https://github.com/stripe/stripe-php/pull/794) Add PHPDoc to `ApiResponse` +- [#792](https://github.com/stripe/stripe-php/pull/792) Use single quotes for `OBJECT_NAME` constants + +## 7.8.0 - 2019-11-05 + +- [#790](https://github.com/stripe/stripe-php/pull/790) Mark nullable fields in PHPDoc +- [#788](https://github.com/stripe/stripe-php/pull/788) Early codegen fixes +- [#787](https://github.com/stripe/stripe-php/pull/787) Use PHPStan in Travis CI + +## 7.7.1 - 2019-10-25 + +- [#781](https://github.com/stripe/stripe-php/pull/781) Fix telemetry header +- [#780](https://github.com/stripe/stripe-php/pull/780) Contributor Convenant + +## 7.7.0 - 2019-10-23 + +- [#776](https://github.com/stripe/stripe-php/pull/776) Add `CAPABILITY_TRANSFERS` to `Account` +- [#778](https://github.com/stripe/stripe-php/pull/778) Add support for `TYPE_MX_RFC` type on `TaxId` + +## 7.6.0 - 2019-10-22 + +- [#770](https://github.com/stripe/stripe-php/pull/770) Add missing constants for Customer's `TaxId` + +## 7.5.0 - 2019-10-18 + +- [#768](https://github.com/stripe/stripe-php/pull/768) Redact API key in `RequestOptions` debug info + +## 7.4.0 - 2019-10-15 + +- [#764](https://github.com/stripe/stripe-php/pull/764) Add support for HTTP request monitoring callback + +## 7.3.1 - 2019-10-07 + +- [#755](https://github.com/stripe/stripe-php/pull/755) Respect Stripe-Should-Retry and Retry-After headers + +## 7.3.0 - 2019-10-02 + +- [#752](https://github.com/stripe/stripe-php/pull/752) Add `payment_intent.canceled` and `setup_intent.canceled` events +- [#749](https://github.com/stripe/stripe-php/pull/749) Call `toArray()` on objects only + +## 7.2.2 - 2019-09-24 + +- [#746](https://github.com/stripe/stripe-php/pull/746) Add missing decline codes + +## 7.2.1 - 2019-09-23 + +- [#744](https://github.com/stripe/stripe-php/pull/744) Added new PHPDoc + +## 7.2.0 - 2019-09-17 + +- [#738](https://github.com/stripe/stripe-php/pull/738) Added missing constants for `SetupIntent` events + +## 7.1.1 - 2019-09-16 + +- [#737](https://github.com/stripe/stripe-php/pull/737) Added new PHPDoc + +## 7.1.0 - 2019-09-13 + +- [#736](https://github.com/stripe/stripe-php/pull/736) Make `CaseInsensitiveArray` countable and traversable + +## 7.0.2 - 2019-09-06 + +- [#729](https://github.com/stripe/stripe-php/pull/729) Fix usage of `SignatureVerificationException` in PHPDoc blocks + +## 7.0.1 - 2019-09-05 + +- [#728](https://github.com/stripe/stripe-php/pull/728) Clean up Collection + +## 7.0.0 - 2019-09-03 + +Major version release. The [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-guide-for-v7) contains a detailed list of backwards-incompatible changes with upgrade instructions. + +Pull requests included in this release (cf. [#552](https://github.com/stripe/stripe-php/pull/552)) (⚠️ = breaking changes): + +- ⚠️ Drop support for PHP 5.4 ([#551](https://github.com/stripe/stripe-php/pull/551)) +- ⚠️ Drop support for PHP 5.5 ([#554](https://github.com/stripe/stripe-php/pull/554)) +- Bump dependencies ([#553](https://github.com/stripe/stripe-php/pull/553)) +- Remove `CURLFile` check ([#555](https://github.com/stripe/stripe-php/pull/555)) +- Update constant definitions for PHP >= 5.6 ([#556](https://github.com/stripe/stripe-php/pull/556)) +- ⚠️ Remove `FileUpload` alias ([#557](https://github.com/stripe/stripe-php/pull/557)) +- Remove `curl_reset` check ([#570](https://github.com/stripe/stripe-php/pull/570)) +- Use `\Stripe\<class>::class` constant instead of strings ([#643](https://github.com/stripe/stripe-php/pull/643)) +- Use `array_column` to flatten params ([#686](https://github.com/stripe/stripe-php/pull/686)) +- ⚠️ Remove deprecated methods ([#692](https://github.com/stripe/stripe-php/pull/692)) +- ⚠️ Remove `IssuerFraudRecord` ([#696](https://github.com/stripe/stripe-php/pull/696)) +- Update constructors of Stripe exception classes ([#559](https://github.com/stripe/stripe-php/pull/559)) +- Fix remaining TODOs ([#700](https://github.com/stripe/stripe-php/pull/700)) +- Use yield for autopagination ([#703](https://github.com/stripe/stripe-php/pull/703)) +- ⚠️ Rename fake magic methods and rewrite array conversion ([#704](https://github.com/stripe/stripe-php/pull/704)) +- Add `ErrorObject` to Stripe exceptions ([#705](https://github.com/stripe/stripe-php/pull/705)) +- Start using PHP CS Fixer ([#706](https://github.com/stripe/stripe-php/pull/706)) +- Update error messages for nested resource operations ([#708](https://github.com/stripe/stripe-php/pull/708)) +- Upgrade retry logic ([#707](https://github.com/stripe/stripe-php/pull/707)) +- ⚠️ `Collection` improvements / fixes ([#715](https://github.com/stripe/stripe-php/pull/715)) +- ⚠️ Modernize exceptions ([#709](https://github.com/stripe/stripe-php/pull/709)) +- Add constants for error codes ([#716](https://github.com/stripe/stripe-php/pull/716)) +- Update certificate bundle ([#717](https://github.com/stripe/stripe-php/pull/717)) +- Retry requests on a 429 that's a lock timeout ([#718](https://github.com/stripe/stripe-php/pull/718)) +- Fix `toArray()` calls ([#719](https://github.com/stripe/stripe-php/pull/719)) +- Couple of fixes for PHP 7.4 ([#725](https://github.com/stripe/stripe-php/pull/725)) + ## 6.43.1 - 2019-08-29 -* [#722](https://github.com/stripe/stripe-php/pull/722) Make `LoggerInterface::error` compatible with its PSR-3 counterpart -* [#714](https://github.com/stripe/stripe-php/pull/714) Add `pending_setup_intent` property in `Subscription` -* [#713](https://github.com/stripe/stripe-php/pull/713) Add typehint to `ApiResponse` -* [#712](https://github.com/stripe/stripe-php/pull/712) Fix comment -* [#701](https://github.com/stripe/stripe-php/pull/701) Start testing PHP 7.3 + +- [#722](https://github.com/stripe/stripe-php/pull/722) Make `LoggerInterface::error` compatible with its PSR-3 counterpart +- [#714](https://github.com/stripe/stripe-php/pull/714) Add `pending_setup_intent` property in `Subscription` +- [#713](https://github.com/stripe/stripe-php/pull/713) Add typehint to `ApiResponse` +- [#712](https://github.com/stripe/stripe-php/pull/712) Fix comment +- [#701](https://github.com/stripe/stripe-php/pull/701) Start testing PHP 7.3 ## 6.43.0 - 2019-08-09 -* [#694](https://github.com/stripe/stripe-php/pull/694) Add `SubscriptionItem::createUsageRecord` method + +- [#694](https://github.com/stripe/stripe-php/pull/694) Add `SubscriptionItem::createUsageRecord` method ## 6.42.0 - 2019-08-09 -* [#688](https://github.com/stripe/stripe-php/pull/688) Remove `SubscriptionScheduleRevision` - * Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused. + +- [#688](https://github.com/stripe/stripe-php/pull/688) Remove `SubscriptionScheduleRevision` + - Note that this is technically a breaking change, however we've chosen to release it as a minor version in light of the fact that this resource and its API methods were virtually unused. ## 6.41.0 - 2019-07-31 -* [#683](https://github.com/stripe/stripe-php/pull/683) Move the List Balance History API to `/v1/balance_transactions` + +- [#683](https://github.com/stripe/stripe-php/pull/683) Move the List Balance History API to `/v1/balance_transactions` ## 6.40.0 - 2019-06-27 -* [#675](https://github.com/stripe/stripe-php/pull/675) Add support for `SetupIntent` resource and APIs + +- [#675](https://github.com/stripe/stripe-php/pull/675) Add support for `SetupIntent` resource and APIs ## 6.39.2 - 2019-06-26 -* [#676](https://github.com/stripe/stripe-php/pull/676) Fix exception message in `CustomerBalanceTransaction::update()` + +- [#676](https://github.com/stripe/stripe-php/pull/676) Fix exception message in `CustomerBalanceTransaction::update()` ## 6.39.1 - 2019-06-25 -* [#674](https://github.com/stripe/stripe-php/pull/674) Add new constants for `collection_method` on `Invoice` + +- [#674](https://github.com/stripe/stripe-php/pull/674) Add new constants for `collection_method` on `Invoice` ## 6.39.0 - 2019-06-24 -* [#673](https://github.com/stripe/stripe-php/pull/673) Enable request latency telemetry by default + +- [#673](https://github.com/stripe/stripe-php/pull/673) Enable request latency telemetry by default ## 6.38.0 - 2019-06-17 -* [#649](https://github.com/stripe/stripe-php/pull/649) Add support for `CustomerBalanceTransaction` resource and APIs + +- [#649](https://github.com/stripe/stripe-php/pull/649) Add support for `CustomerBalanceTransaction` resource and APIs ## 6.37.2 - 2019-06-17 -* [#671](https://github.com/stripe/stripe-php/pull/671) Add new PHPDoc -* [#672](https://github.com/stripe/stripe-php/pull/672) Add constants for `submit_type` on Checkout `Session` + +- [#671](https://github.com/stripe/stripe-php/pull/671) Add new PHPDoc +- [#672](https://github.com/stripe/stripe-php/pull/672) Add constants for `submit_type` on Checkout `Session` ## 6.37.1 - 2019-06-14 -* [#670](https://github.com/stripe/stripe-php/pull/670) Add new PHPDoc + +- [#670](https://github.com/stripe/stripe-php/pull/670) Add new PHPDoc ## 6.37.0 - 2019-05-23 -* [#663](https://github.com/stripe/stripe-php/pull/663) Add support for `radar.early_fraud_warning` resource + +- [#663](https://github.com/stripe/stripe-php/pull/663) Add support for `radar.early_fraud_warning` resource ## 6.36.0 - 2019-05-22 -* [#661](https://github.com/stripe/stripe-php/pull/661) Add constants for new TaxId types -* [#662](https://github.com/stripe/stripe-php/pull/662) Add constants for BalanceTransaction types + +- [#661](https://github.com/stripe/stripe-php/pull/661) Add constants for new TaxId types +- [#662](https://github.com/stripe/stripe-php/pull/662) Add constants for BalanceTransaction types ## 6.35.2 - 2019-05-20 -* [#655](https://github.com/stripe/stripe-php/pull/655) Add constants for payment intent statuses -* [#659](https://github.com/stripe/stripe-php/pull/659) Fix PHPDoc for various nested Account actions -* [#660](https://github.com/stripe/stripe-php/pull/660) Fix various PHPDoc + +- [#655](https://github.com/stripe/stripe-php/pull/655) Add constants for payment intent statuses +- [#659](https://github.com/stripe/stripe-php/pull/659) Fix PHPDoc for various nested Account actions +- [#660](https://github.com/stripe/stripe-php/pull/660) Fix various PHPDoc ## 6.35.1 - 2019-05-20 -* [#658](https://github.com/stripe/stripe-php/pull/658) Use absolute value when checking timestamp tolerance + +- [#658](https://github.com/stripe/stripe-php/pull/658) Use absolute value when checking timestamp tolerance ## 6.35.0 - 2019-05-14 -* [#651](https://github.com/stripe/stripe-php/pull/651) Add support for the Capability resource and APIs + +- [#651](https://github.com/stripe/stripe-php/pull/651) Add support for the Capability resource and APIs ## 6.34.6 - 2019-05-13 -* [#654](https://github.com/stripe/stripe-php/pull/654) Fix typo in definition of `Event::PAYMENT_METHOD_ATTACHED` constant + +- [#654](https://github.com/stripe/stripe-php/pull/654) Fix typo in definition of `Event::PAYMENT_METHOD_ATTACHED` constant ## 6.34.5 - 2019-05-06 -* [#647](https://github.com/stripe/stripe-php/pull/647) Set the return type to static for more operations + +- [#647](https://github.com/stripe/stripe-php/pull/647) Set the return type to static for more operations ## 6.34.4 - 2019-05-06 -* [#650](https://github.com/stripe/stripe-php/pull/650) Add missing constants for Event types + +- [#650](https://github.com/stripe/stripe-php/pull/650) Add missing constants for Event types ## 6.34.3 - 2019-05-01 -* [#644](https://github.com/stripe/stripe-php/pull/644) Update return type to `static` to improve static analysis -* [#645](https://github.com/stripe/stripe-php/pull/645) Fix constant for `payment_intent.payment_failed` + +- [#644](https://github.com/stripe/stripe-php/pull/644) Update return type to `static` to improve static analysis +- [#645](https://github.com/stripe/stripe-php/pull/645) Fix constant for `payment_intent.payment_failed` ## 6.34.2 - 2019-04-26 -* [#642](https://github.com/stripe/stripe-php/pull/642) Fix an issue where existing idempotency keys would be overwritten when using automatic retries + +- [#642](https://github.com/stripe/stripe-php/pull/642) Fix an issue where existing idempotency keys would be overwritten when using automatic retries ## 6.34.1 - 2019-04-25 -* [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs + +- [#640](https://github.com/stripe/stripe-php/pull/640) Add missing phpdocs ## 6.34.0 - 2019-04-24 -* [#626](https://github.com/stripe/stripe-php/pull/626) Add support for the `TaxRate` resource and APIs -* [#639](https://github.com/stripe/stripe-php/pull/639) Fix multiple phpdoc issues + +- [#626](https://github.com/stripe/stripe-php/pull/626) Add support for the `TaxRate` resource and APIs +- [#639](https://github.com/stripe/stripe-php/pull/639) Fix multiple phpdoc issues ## 6.33.0 - 2019-04-22 -* [#630](https://github.com/stripe/stripe-php/pull/630) Add support for the `TaxId` resource and APIs + +- [#630](https://github.com/stripe/stripe-php/pull/630) Add support for the `TaxId` resource and APIs ## 6.32.1 - 2019-04-19 -* [#636](https://github.com/stripe/stripe-php/pull/636) Correct type of `$personId` in PHPDoc + +- [#636](https://github.com/stripe/stripe-php/pull/636) Correct type of `$personId` in PHPDoc ## 6.32.0 - 2019-04-18 -* [#621](https://github.com/stripe/stripe-php/pull/621) Add support for `CreditNote` + +- [#621](https://github.com/stripe/stripe-php/pull/621) Add support for `CreditNote` ## 6.31.5 - 2019-04-12 -* [#628](https://github.com/stripe/stripe-php/pull/628) Add constants for `person.*` event types -* [#628](https://github.com/stripe/stripe-php/pull/628) Add missing constants for `Account` and `Person` + +- [#628](https://github.com/stripe/stripe-php/pull/628) Add constants for `person.*` event types +- [#628](https://github.com/stripe/stripe-php/pull/628) Add missing constants for `Account` and `Person` ## 6.31.4 - 2019-04-05 -* [#624](https://github.com/stripe/stripe-php/pull/624) Fix encoding of nested parameters in multipart requests + +- [#624](https://github.com/stripe/stripe-php/pull/624) Fix encoding of nested parameters in multipart requests ## 6.31.3 - 2019-04-02 -* [#623](https://github.com/stripe/stripe-php/pull/623) Only use HTTP/2 with curl >= 7.60.0 + +- [#623](https://github.com/stripe/stripe-php/pull/623) Only use HTTP/2 with curl >= 7.60.0 ## 6.31.2 - 2019-03-25 -* [#619](https://github.com/stripe/stripe-php/pull/619) Fix PHPDoc return types for list methods for nested resources + +- [#619](https://github.com/stripe/stripe-php/pull/619) Fix PHPDoc return types for list methods for nested resources ## 6.31.1 - 2019-03-22 -* [#612](https://github.com/stripe/stripe-php/pull/612) Add a lot of constants -* [#614](https://github.com/stripe/stripe-php/pull/614) Add missing subscription status constants + +- [#612](https://github.com/stripe/stripe-php/pull/612) Add a lot of constants +- [#614](https://github.com/stripe/stripe-php/pull/614) Add missing subscription status constants ## 6.31.0 - 2019-03-18 -* [#600](https://github.com/stripe/stripe-php/pull/600) Add support for the `PaymentMethod` resource and APIs -* [#606](https://github.com/stripe/stripe-php/pull/606) Add support for retrieving a Checkout `Session` -* [#611](https://github.com/stripe/stripe-php/pull/611) Add support for deleting a Terminal `Location` and `Reader` + +- [#600](https://github.com/stripe/stripe-php/pull/600) Add support for the `PaymentMethod` resource and APIs +- [#606](https://github.com/stripe/stripe-php/pull/606) Add support for retrieving a Checkout `Session` +- [#611](https://github.com/stripe/stripe-php/pull/611) Add support for deleting a Terminal `Location` and `Reader` ## 6.30.5 - 2019-03-11 -* [#607](https://github.com/stripe/stripe-php/pull/607) Correctly handle case where a metadata key is called `metadata` + +- [#607](https://github.com/stripe/stripe-php/pull/607) Correctly handle case where a metadata key is called `metadata` ## 6.30.4 - 2019-02-27 -* [#602](https://github.com/stripe/stripe-php/pull/602) Add `subscription_schedule` to `Subscription` for PHPDoc. + +- [#602](https://github.com/stripe/stripe-php/pull/602) Add `subscription_schedule` to `Subscription` for PHPDoc. ## 6.30.3 - 2019-02-26 -* [#603](https://github.com/stripe/stripe-php/pull/603) Improve PHPDoc on the `Source` object to cover all types of Sources currently supported. + +- [#603](https://github.com/stripe/stripe-php/pull/603) Improve PHPDoc on the `Source` object to cover all types of Sources currently supported. ## 6.30.2 - 2019-02-25 -* [#601](https://github.com/stripe/stripe-php/pull/601) Fix PHPDoc across multiple resources and add support for new events. + +- [#601](https://github.com/stripe/stripe-php/pull/601) Fix PHPDoc across multiple resources and add support for new events. ## 6.30.1 - 2019-02-16 -* [#599](https://github.com/stripe/stripe-php/pull/599) Fix PHPDoc for `SubscriptionSchedule` and `SubscriptionScheduleRevision` + +- [#599](https://github.com/stripe/stripe-php/pull/599) Fix PHPDoc for `SubscriptionSchedule` and `SubscriptionScheduleRevision` ## 6.30.0 - 2019-02-12 -* [#590](https://github.com/stripe/stripe-php/pull/590) Add support for `SubscriptionSchedule` and `SubscriptionScheduleRevision` + +- [#590](https://github.com/stripe/stripe-php/pull/590) Add support for `SubscriptionSchedule` and `SubscriptionScheduleRevision` ## 6.29.3 - 2019-01-31 -* [#592](https://github.com/stripe/stripe-php/pull/592) Some more PHPDoc fixes + +- [#592](https://github.com/stripe/stripe-php/pull/592) Some more PHPDoc fixes ## 6.29.2 - 2019-01-31 -* [#591](https://github.com/stripe/stripe-php/pull/591) Fix PHPDoc for nested resources + +- [#591](https://github.com/stripe/stripe-php/pull/591) Fix PHPDoc for nested resources ## 6.29.1 - 2019-01-25 -* [#566](https://github.com/stripe/stripe-php/pull/566) Fix dangling message contents -* [#586](https://github.com/stripe/stripe-php/pull/586) Don't overwrite `CURLOPT_HTTP_VERSION` option + +- [#566](https://github.com/stripe/stripe-php/pull/566) Fix dangling message contents +- [#586](https://github.com/stripe/stripe-php/pull/586) Don't overwrite `CURLOPT_HTTP_VERSION` option ## 6.29.0 - 2019-01-23 -* [#579](https://github.com/stripe/stripe-php/pull/579) Rename `CheckoutSession` to `Session` and move it under the `Checkout` namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach. + +- [#579](https://github.com/stripe/stripe-php/pull/579) Rename `CheckoutSession` to `Session` and move it under the `Checkout` namespace. This is a breaking change, but we've reached out to affected merchants and all new merchants would use the new approach. ## 6.28.1 - 2019-01-21 -* [#580](https://github.com/stripe/stripe-php/pull/580) Properly serialize `individual` on `Account` objects + +- [#580](https://github.com/stripe/stripe-php/pull/580) Properly serialize `individual` on `Account` objects ## 6.28.0 - 2019-01-03 -* [#576](https://github.com/stripe/stripe-php/pull/576) Add support for iterating directly over `Collection` instances + +- [#576](https://github.com/stripe/stripe-php/pull/576) Add support for iterating directly over `Collection` instances ## 6.27.0 - 2018-12-21 -* [#571](https://github.com/stripe/stripe-php/pull/571) Add support for the `CheckoutSession` resource + +- [#571](https://github.com/stripe/stripe-php/pull/571) Add support for the `CheckoutSession` resource ## 6.26.0 - 2018-12-11 -* [#568](https://github.com/stripe/stripe-php/pull/568) Enable persistent connections + +- [#568](https://github.com/stripe/stripe-php/pull/568) Enable persistent connections ## 6.25.0 - 2018-12-10 -* [#567](https://github.com/stripe/stripe-php/pull/567) Add support for account links + +- [#567](https://github.com/stripe/stripe-php/pull/567) Add support for account links ## 6.24.0 - 2018-11-28 -* [#562](https://github.com/stripe/stripe-php/pull/562) Add support for the Review resource -* [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring + +- [#562](https://github.com/stripe/stripe-php/pull/562) Add support for the Review resource +- [#564](https://github.com/stripe/stripe-php/pull/564) Add event name constants for subscription schedule aborted/expiring ## 6.23.0 - 2018-11-27 -* [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar + +- [#542](https://github.com/stripe/stripe-php/pull/542) Add support for `ValueList` and `ValueListItem` for Radar ## 6.22.1 - 2018-11-20 -* [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/#549 + +- [#561](https://github.com/stripe/stripe-php/pull/561) Add cast and some docs to telemetry introduced in 6.22.0/549 ## 6.22.0 - 2018-11-15 -* [#549](https://github.com/stripe/stripe-php/pull/549) Add support for client telemetry + +- [#549](https://github.com/stripe/stripe-php/pull/549) Add support for client telemetry ## 6.21.1 - 2018-11-12 -* [#548](https://github.com/stripe/stripe-php/pull/548) Don't mutate `Exception` class properties from `OAuthBase` error + +- [#548](https://github.com/stripe/stripe-php/pull/548) Don't mutate `Exception` class properties from `OAuthBase` error ## 6.21.0 - 2018-11-08 -* [#537](https://github.com/stripe/stripe-php/pull/537) Add new API endpoints for the `Invoice` resource. + +- [#537](https://github.com/stripe/stripe-php/pull/537) Add new API endpoints for the `Invoice` resource. ## 6.20.1 - 2018-11-07 -* [#546](https://github.com/stripe/stripe-php/pull/546) Drop files from the Composer package that aren't needed in the release + +- [#546](https://github.com/stripe/stripe-php/pull/546) Drop files from the Composer package that aren't needed in the release ## 6.20.0 - 2018-10-30 -* [#536](https://github.com/stripe/stripe-php/pull/536) Add support for the `Person` resource -* [#541](https://github.com/stripe/stripe-php/pull/541) Add support for the `WebhookEndpoint` resource + +- [#536](https://github.com/stripe/stripe-php/pull/536) Add support for the `Person` resource +- [#541](https://github.com/stripe/stripe-php/pull/541) Add support for the `WebhookEndpoint` resource ## 6.19.5 - 2018-10-17 -* [#539](https://github.com/stripe/stripe-php/pull/539) Fix methods on `\Stripe\PaymentIntent` to properly pass arguments to the API. + +- [#539](https://github.com/stripe/stripe-php/pull/539) Fix methods on `\Stripe\PaymentIntent` to properly pass arguments to the API. ## 6.19.4 - 2018-10-11 -* [#534](https://github.com/stripe/stripe-php/pull/534) Fix PSR-4 autoloading for `\Stripe\FileUpload` class alias + +- [#534](https://github.com/stripe/stripe-php/pull/534) Fix PSR-4 autoloading for `\Stripe\FileUpload` class alias ## 6.19.3 - 2018-10-09 -* [#530](https://github.com/stripe/stripe-php/pull/530) Add constants for `flow` (`FLOW_*`), `status` (`STATUS_*`) and `usage` (`USAGE_*`) on `\Stripe\Source` + +- [#530](https://github.com/stripe/stripe-php/pull/530) Add constants for `flow` (`FLOW_*`), `status` (`STATUS_*`) and `usage` (`USAGE_*`) on `\Stripe\Source` ## 6.19.2 - 2018-10-08 -* [#531](https://github.com/stripe/stripe-php/pull/531) Store HTTP response headers in case-insensitive array + +- [#531](https://github.com/stripe/stripe-php/pull/531) Store HTTP response headers in case-insensitive array ## 6.19.1 - 2018-09-25 -* [#526](https://github.com/stripe/stripe-php/pull/526) Ignore null values in request parameters + +- [#526](https://github.com/stripe/stripe-php/pull/526) Ignore null values in request parameters ## 6.19.0 - 2018-09-24 -* [#523](https://github.com/stripe/stripe-php/pull/523) Add support for Stripe Terminal + +- [#523](https://github.com/stripe/stripe-php/pull/523) Add support for Stripe Terminal ## 6.18.0 - 2018-09-24 -* [#520](https://github.com/stripe/stripe-php/pull/520) Rename `\Stripe\FileUpload` to `\Stripe\File` + +- [#520](https://github.com/stripe/stripe-php/pull/520) Rename `\Stripe\FileUpload` to `\Stripe\File` ## 6.17.2 - 2018-09-18 -* [#522](https://github.com/stripe/stripe-php/pull/522) Fix warning when adding a new additional owner to an existing array + +- [#522](https://github.com/stripe/stripe-php/pull/522) Fix warning when adding a new additional owner to an existing array ## 6.17.1 - 2018-09-14 -* [#517](https://github.com/stripe/stripe-php/pull/517) Integer-index encode all sequential arrays + +- [#517](https://github.com/stripe/stripe-php/pull/517) Integer-index encode all sequential arrays ## 6.17.0 - 2018-09-05 -* [#514](https://github.com/stripe/stripe-php/pull/514) Add support for reporting resources + +- [#514](https://github.com/stripe/stripe-php/pull/514) Add support for reporting resources ## 6.16.0 - 2018-08-23 -* [#509](https://github.com/stripe/stripe-php/pull/509) Add support for usage record summaries + +- [#509](https://github.com/stripe/stripe-php/pull/509) Add support for usage record summaries ## 6.15.0 - 2018-08-03 -* [#504](https://github.com/stripe/stripe-php/pull/504) Add cancel support for topups + +- [#504](https://github.com/stripe/stripe-php/pull/504) Add cancel support for topups ## 6.14.0 - 2018-08-02 -* [#505](https://github.com/stripe/stripe-php/pull/505) Add support for file links + +- [#505](https://github.com/stripe/stripe-php/pull/505) Add support for file links ## 6.13.0 - 2018-07-31 -* [#502](https://github.com/stripe/stripe-php/pull/502) Add `isDeleted()` method to `\Stripe\StripeObject` + +- [#502](https://github.com/stripe/stripe-php/pull/502) Add `isDeleted()` method to `\Stripe\StripeObject` ## 6.12.0 - 2018-07-28 -* [#501](https://github.com/stripe/stripe-php/pull/501) Add support for scheduled query runs (`\Stripe\Sigma\ScheduledQueryRun`) for Sigma + +- [#501](https://github.com/stripe/stripe-php/pull/501) Add support for scheduled query runs (`\Stripe\Sigma\ScheduledQueryRun`) for Sigma ## 6.11.0 - 2018-07-26 -* [#500](https://github.com/stripe/stripe-php/pull/500) Add support for Stripe Issuing + +- [#500](https://github.com/stripe/stripe-php/pull/500) Add support for Stripe Issuing ## 6.10.4 - 2018-07-19 -* [#498](https://github.com/stripe/stripe-php/pull/498) Internal improvements to the `\Stripe\ApiResource.classUrl()` method + +- [#498](https://github.com/stripe/stripe-php/pull/498) Internal improvements to the `\Stripe\ApiResource.classUrl()` method ## 6.10.3 - 2018-07-16 -* [#497](https://github.com/stripe/stripe-php/pull/497) Use HTTP/2 only for HTTPS requests + +- [#497](https://github.com/stripe/stripe-php/pull/497) Use HTTP/2 only for HTTPS requests ## 6.10.2 - 2018-07-11 -* [#494](https://github.com/stripe/stripe-php/pull/494) Enable HTTP/2 support + +- [#494](https://github.com/stripe/stripe-php/pull/494) Enable HTTP/2 support ## 6.10.1 - 2018-07-10 -* [#493](https://github.com/stripe/stripe-php/pull/493) Add PHPDoc for `auto_advance` on `\Stripe\Invoice` + +- [#493](https://github.com/stripe/stripe-php/pull/493) Add PHPDoc for `auto_advance` on `\Stripe\Invoice` ## 6.10.0 - 2018-06-28 -* [#488](https://github.com/stripe/stripe-php/pull/488) Add support for `$appPartnerId` to `Stripe::setAppInfo()` + +- [#488](https://github.com/stripe/stripe-php/pull/488) Add support for `$appPartnerId` to `Stripe::setAppInfo()` ## 6.9.0 - 2018-06-28 -* [#487](https://github.com/stripe/stripe-php/pull/487) Add support for payment intents + +- [#487](https://github.com/stripe/stripe-php/pull/487) Add support for payment intents ## 6.8.2 - 2018-06-24 -* [#486](https://github.com/stripe/stripe-php/pull/486) Make `Account.deauthorize()` return the `StripeObject` from the API + +- [#486](https://github.com/stripe/stripe-php/pull/486) Make `Account.deauthorize()` return the `StripeObject` from the API ## 6.8.1 - 2018-06-13 -* [#472](https://github.com/stripe/stripe-php/pull/472) Added phpDoc for `ApiRequestor` and others, especially regarding thrown errors + +- [#472](https://github.com/stripe/stripe-php/pull/472) Added phpDoc for `ApiRequestor` and others, especially regarding thrown errors ## 6.8.0 - 2018-06-13 -* [#481](https://github.com/stripe/stripe-php/pull/481) Add new `\Stripe\Discount` and `\Stripe\OrderItem` classes, add more PHPDoc describing object attributes + +- [#481](https://github.com/stripe/stripe-php/pull/481) Add new `\Stripe\Discount` and `\Stripe\OrderItem` classes, add more PHPDoc describing object attributes ## 6.7.4 - 2018-05-29 -* [#480](https://github.com/stripe/stripe-php/pull/480) PHPDoc changes for API version 2018-05-21 and the addition of the new `CHARGE_EXPIRED` event type + +- [#480](https://github.com/stripe/stripe-php/pull/480) PHPDoc changes for API version 2018-05-21 and the addition of the new `CHARGE_EXPIRED` event type ## 6.7.3 - 2018-05-28 -* [#479](https://github.com/stripe/stripe-php/pull/479) Fix unnecessary traits on `\Stripe\InvoiceLineItem` + +- [#479](https://github.com/stripe/stripe-php/pull/479) Fix unnecessary traits on `\Stripe\InvoiceLineItem` ## 6.7.2 - 2018-05-28 -* [#471](https://github.com/stripe/stripe-php/pull/471) Add `OBJECT_NAME` constant to all API resource classes, add `\Stripe\InvoiceLineItem` class + +- [#471](https://github.com/stripe/stripe-php/pull/471) Add `OBJECT_NAME` constant to all API resource classes, add `\Stripe\InvoiceLineItem` class ## 6.7.1 - 2018-05-13 -* [#468](https://github.com/stripe/stripe-php/pull/468) Update fields in PHP docs for accuracy + +- [#468](https://github.com/stripe/stripe-php/pull/468) Update fields in PHP docs for accuracy ## 6.7.0 - 2018-05-09 -* [#466](https://github.com/stripe/stripe-php/pull/466) Add support for issuer fraud records + +- [#466](https://github.com/stripe/stripe-php/pull/466) Add support for issuer fraud records ## 6.6.0 - 2018-04-11 -* [#460](https://github.com/stripe/stripe-php/pull/460) Add support for flexible billing primitives + +- [#460](https://github.com/stripe/stripe-php/pull/460) Add support for flexible billing primitives ## 6.5.0 - 2018-04-05 -* [#461](https://github.com/stripe/stripe-php/pull/461) Don't zero keys on non-`metadata` subobjects + +- [#461](https://github.com/stripe/stripe-php/pull/461) Don't zero keys on non-`metadata` subobjects ## 6.4.2 - 2018-03-17 -* [#458](https://github.com/stripe/stripe-php/pull/458) Add PHPDoc for `account` on `\Stripe\Event` + +- [#458](https://github.com/stripe/stripe-php/pull/458) Add PHPDoc for `account` on `\Stripe\Event` ## 6.4.1 - 2018-03-02 -* [#455](https://github.com/stripe/stripe-php/pull/455) Fix namespaces in PHPDoc -* [#456](https://github.com/stripe/stripe-php/pull/456) Fix namespaces for some exceptions + +- [#455](https://github.com/stripe/stripe-php/pull/455) Fix namespaces in PHPDoc +- [#456](https://github.com/stripe/stripe-php/pull/456) Fix namespaces for some exceptions ## 6.4.0 - 2018-02-28 -* [#453](https://github.com/stripe/stripe-php/pull/453) Add constants for `reason` (`REASON_*`) and `status` (`STATUS_*`) on `\Stripe\Dispute` + +- [#453](https://github.com/stripe/stripe-php/pull/453) Add constants for `reason` (`REASON_*`) and `status` (`STATUS_*`) on `\Stripe\Dispute` ## 6.3.2 - 2018-02-27 -* [#452](https://github.com/stripe/stripe-php/pull/452) Add PHPDoc for `amount_paid` and `amount_remaining` on `\Stripe\Invoice` + +- [#452](https://github.com/stripe/stripe-php/pull/452) Add PHPDoc for `amount_paid` and `amount_remaining` on `\Stripe\Invoice` ## 6.3.1 - 2018-02-26 -* [#443](https://github.com/stripe/stripe-php/pull/443) Add event types as constants to `\Stripe\Event` class + +- [#443](https://github.com/stripe/stripe-php/pull/443) Add event types as constants to `\Stripe\Event` class ## 6.3.0 - 2018-02-23 -* [#450](https://github.com/stripe/stripe-php/pull/450) Add support for `code` attribute on all Stripe exceptions + +- [#450](https://github.com/stripe/stripe-php/pull/450) Add support for `code` attribute on all Stripe exceptions ## 6.2.0 - 2018-02-21 -* [#440](https://github.com/stripe/stripe-php/pull/440) Add support for topups -* [#442](https://github.com/stripe/stripe-php/pull/442) Fix PHPDoc for `\Stripe\Error\SignatureVerification` + +- [#440](https://github.com/stripe/stripe-php/pull/440) Add support for topups +- [#442](https://github.com/stripe/stripe-php/pull/442) Fix PHPDoc for `\Stripe\Error\SignatureVerification` ## 6.1.0 - 2018-02-12 -* [#435](https://github.com/stripe/stripe-php/pull/435) Fix header persistence on `Collection` objects -* [#436](https://github.com/stripe/stripe-php/pull/436) Introduce new `Idempotency` error class + +- [#435](https://github.com/stripe/stripe-php/pull/435) Fix header persistence on `Collection` objects +- [#436](https://github.com/stripe/stripe-php/pull/436) Introduce new `Idempotency` error class ## 6.0.0 - 2018-02-07 + Major version release. List of backwards incompatible changes to watch out for: -+ The minimum PHP version is now 5.4.0. If you're using PHP 5.3 or older, consider upgrading to a more recent version. -* `\Stripe\AttachedObject` no longer exists. Attributes that used to be instances of `\Stripe\AttachedObject` (such as `metadata`) are now instances of `\Stripe\StripeObject`. -+ Attributes that used to be PHP arrays (such as `legal_entity->additional_owners` on `\Stripe\Account` instances) are now instances of `\Stripe\StripeObject`, except when they are empty. `\Stripe\StripeObject` has array semantics so this should not be an issue unless you are actively checking types. -* `\Stripe\Collection` now derives from `\Stripe\StripeObject` rather than from `\Stripe\ApiResource`. + +- The minimum PHP version is now 5.4.0. If you're using PHP 5.3 or older, consider upgrading to a more recent version. + +* `\Stripe\AttachedObject` no longer exists. Attributes that used to be instances of `\Stripe\AttachedObject` (such as `metadata`) are now instances of `\Stripe\StripeObject`. + +- Attributes that used to be PHP arrays (such as `legal_entity->additional_owners` on `\Stripe\Account` instances) are now instances of `\Stripe\StripeObject`, except when they are empty. `\Stripe\StripeObject` has array semantics so this should not be an issue unless you are actively checking types. + +* `\Stripe\Collection` now derives from `\Stripe\StripeObject` rather than from `\Stripe\ApiResource`. Pull requests included in this release: -* [#410](https://github.com/stripe/stripe-php/pull/410) Drop support for PHP 5.3 -* [#411](https://github.com/stripe/stripe-php/pull/411) Use traits for common API operations -* [#414](https://github.com/stripe/stripe-php/pull/414) Use short array syntax -* [#404](https://github.com/stripe/stripe-php/pull/404) Fix serialization logic -* [#417](https://github.com/stripe/stripe-php/pull/417) Remove `ExternalAccount` class -* [#418](https://github.com/stripe/stripe-php/pull/418) Increase test coverage -* [#421](https://github.com/stripe/stripe-php/pull/421) Update CA bundle and add script for future updates -* [#422](https://github.com/stripe/stripe-php/pull/422) Use vendored CA bundle for all requests -* [#428](https://github.com/stripe/stripe-php/pull/428) Support for automatic request retries + +- [#410](https://github.com/stripe/stripe-php/pull/410) Drop support for PHP 5.3 +- [#411](https://github.com/stripe/stripe-php/pull/411) Use traits for common API operations +- [#414](https://github.com/stripe/stripe-php/pull/414) Use short array syntax +- [#404](https://github.com/stripe/stripe-php/pull/404) Fix serialization logic +- [#417](https://github.com/stripe/stripe-php/pull/417) Remove `ExternalAccount` class +- [#418](https://github.com/stripe/stripe-php/pull/418) Increase test coverage +- [#421](https://github.com/stripe/stripe-php/pull/421) Update CA bundle and add script for future updates +- [#422](https://github.com/stripe/stripe-php/pull/422) Use vendored CA bundle for all requests +- [#428](https://github.com/stripe/stripe-php/pull/428) Support for automatic request retries ## 5.9.2 - 2018-02-07 -* [#431](https://github.com/stripe/stripe-php/pull/431) Update PHPDoc @property tags for latest API version + +- [#431](https://github.com/stripe/stripe-php/pull/431) Update PHPDoc @property tags for latest API version ## 5.9.1 - 2018-02-06 -* [#427](https://github.com/stripe/stripe-php/pull/427) Add and update PHPDoc @property tags on all API resources + +- [#427](https://github.com/stripe/stripe-php/pull/427) Add and update PHPDoc @property tags on all API resources ## 5.9.0 - 2018-01-17 -* [#421](https://github.com/stripe/stripe-php/pull/421) Updated bundled CA certificates -* [#423](https://github.com/stripe/stripe-php/pull/423) Escape unsanitized input in OAuth example + +- [#421](https://github.com/stripe/stripe-php/pull/421) Updated bundled CA certificates +- [#423](https://github.com/stripe/stripe-php/pull/423) Escape unsanitized input in OAuth example ## 5.8.0 - 2017-12-20 -* [#403](https://github.com/stripe/stripe-php/pull/403) Add `__debugInfo()` magic method to `StripeObject` + +- [#403](https://github.com/stripe/stripe-php/pull/403) Add `__debugInfo()` magic method to `StripeObject` ## 5.7.0 - 2017-11-28 -* [#390](https://github.com/stripe/stripe-php/pull/390) Remove some unsupported API methods -* [#391](https://github.com/stripe/stripe-php/pull/391) Alphabetize the list of API resources in `Util::convertToStripeObject()` and add missing resources -* [#393](https://github.com/stripe/stripe-php/pull/393) Fix expiry date update for card sources + +- [#390](https://github.com/stripe/stripe-php/pull/390) Remove some unsupported API methods +- [#391](https://github.com/stripe/stripe-php/pull/391) Alphabetize the list of API resources in `Util::convertToStripeObject()` and add missing resources +- [#393](https://github.com/stripe/stripe-php/pull/393) Fix expiry date update for card sources ## 5.6.0 - 2017-10-31 -* [#386](https://github.com/stripe/stripe-php/pull/386) Support for exchange rates APIs + +- [#386](https://github.com/stripe/stripe-php/pull/386) Support for exchange rates APIs ## 5.5.1 - 2017-10-30 -* [#387](https://github.com/stripe/stripe-php/pull/387) Allow `personal_address_kana` and `personal_address_kanji` to be updated on an account + +- [#387](https://github.com/stripe/stripe-php/pull/387) Allow `personal_address_kana` and `personal_address_kanji` to be updated on an account ## 5.5.0 - 2017-10-27 -* [#385](https://github.com/stripe/stripe-php/pull/385) Support for listing source transactions + +- [#385](https://github.com/stripe/stripe-php/pull/385) Support for listing source transactions ## 5.4.0 - 2017-10-24 -* [#383](https://github.com/stripe/stripe-php/pull/383) Add static methods to manipulate resources from parent - * `Account` gains methods for external accounts and login links (e.g. `createExternalAccount`, `createLoginLink`) - * `ApplicationFee` gains methods for refunds - * `Customer` gains methods for sources - * `Transfer` gains methods for reversals + +- [#383](https://github.com/stripe/stripe-php/pull/383) Add static methods to manipulate resources from parent + - `Account` gains methods for external accounts and login links (e.g. `createExternalAccount`, `createLoginLink`) + - `ApplicationFee` gains methods for refunds + - `Customer` gains methods for sources + - `Transfer` gains methods for reversals ## 5.3.0 - 2017-10-11 -* [#378](https://github.com/stripe/stripe-php/pull/378) Rename source `delete` to `detach` (and deprecate the former) + +- [#378](https://github.com/stripe/stripe-php/pull/378) Rename source `delete` to `detach` (and deprecate the former) ## 5.2.3 - 2017-09-27 -* Add PHPDoc for `Card` + +- Add PHPDoc for `Card` ## 5.2.2 - 2017-09-20 -* Fix deserialization mapping of `FileUpload` objects + +- Fix deserialization mapping of `FileUpload` objects ## 5.2.1 - 2017-09-14 -* Serialized `shipping` nested attribute + +- Serialized `shipping` nested attribute ## 5.2.0 - 2017-08-29 -* Add support for `InvalidClient` OAuth error + +- Add support for `InvalidClient` OAuth error ## 5.1.3 - 2017-08-14 -* Allow `address_kana` and `address_kanji` to be updated for custom accounts + +- Allow `address_kana` and `address_kanji` to be updated for custom accounts ## 5.1.2 - 2017-08-01 -* Fix documented return type of `autoPagingIterator()` (was missing namespace) + +- Fix documented return type of `autoPagingIterator()` (was missing namespace) ## 5.1.1 - 2017-07-03 -* Fix order returns to use the right URL `/v1/order_returns` + +- Fix order returns to use the right URL `/v1/order_returns` ## 5.1.0 - 2017-06-30 -* Add support for OAuth + +- Add support for OAuth ## 5.0.0 - 2017-06-27 -* `pay` on invoice now takes params as well as opts + +- `pay` on invoice now takes params as well as opts ## 4.13.0 - 2017-06-19 -* Add support for ephemeral keys + +- Add support for ephemeral keys ## 4.12.0 - 2017-06-05 -* Clients can implement `getUserAgentInfo()` to add additional user agent information + +- Clients can implement `getUserAgentInfo()` to add additional user agent information ## 4.11.0 - 2017-06-05 -* Implement `Countable` for `AttachedObject` (`metadata` and `additional_owners`) + +- Implement `Countable` for `AttachedObject` (`metadata` and `additional_owners`) ## 4.10.0 - 2017-05-25 -* Add support for login links + +- Add support for login links ## 4.9.1 - 2017-05-10 -* Fix docs to include arrays on `$id` parameter for retrieve methods + +- Fix docs to include arrays on `$id` parameter for retrieve methods ## 4.9.0 - 2017-04-28 -* Support for checking webhook signatures + +- Support for checking webhook signatures ## 4.8.1 - 2017-04-24 -* Allow nested field `payout_schedule` to be updated + +- Allow nested field `payout_schedule` to be updated ## 4.8.0 - 2017-04-20 -* Add `\Stripe\Stripe::setLogger()` to support an external PSR-3 compatible logger + +- Add `\Stripe\Stripe::setLogger()` to support an external PSR-3 compatible logger ## 4.7.0 - 2017-04-10 -* Add support for payouts and recipient transfers + +- Add support for payouts and recipient transfers ## 4.6.0 - 2017-04-06 -* Please see 4.7.0 instead (no-op release) + +- Please see 4.7.0 instead (no-op release) ## 4.5.1 - 2017-03-22 -* Remove hard dependency on cURL + +- Remove hard dependency on cURL ## 4.5.0 - 2017-03-20 -* Support for detaching sources from customers + +- Support for detaching sources from customers ## 4.4.2 - 2017-02-27 -* Correct handling of `owner` parameter when updating sources + +- Correct handling of `owner` parameter when updating sources ## 4.4.1 - 2017-02-24 -* Correct the error check on a bad JSON decoding + +- Correct the error check on a bad JSON decoding ## 4.4.0 - 2017-01-18 -* Add support for updating sources + +- Add support for updating sources ## 4.3.0 - 2016-11-30 -* Add support for verifying sources + +- Add support for verifying sources ## 4.2.0 - 2016-11-21 -* Add retrieve method for 3-D Secure resources + +- Add retrieve method for 3-D Secure resources ## 4.1.1 - 2016-10-21 -* Add docblock with model properties for `Plan` + +- Add docblock with model properties for `Plan` ## 4.1.0 - 2016-10-18 -* Support for 403 status codes (permission denied) + +- Support for 403 status codes (permission denied) ## 4.0.1 - 2016-10-17 -* Fix transfer reversal materialization -* Fixes for some property definitions in docblocks + +- Fix transfer reversal materialization +- Fixes for some property definitions in docblocks ## 4.0.0 - 2016-09-28 -* Support for subscription items -* Drop attempt to force TLS 1.2: please note that this could be breaking if you're using old OS distributions or packages and upgraded recently (so please make sure to test your integration!) + +- Support for subscription items +- Drop attempt to force TLS 1.2: please note that this could be breaking if you're using old OS distributions or packages and upgraded recently (so please make sure to test your integration!) ## 3.23.0 - 2016-09-15 -* Add support for Apple Pay domains + +- Add support for Apple Pay domains ## 3.22.0 - 2016-09-13 -* Add `Stripe::setAppInfo` to allow plugins to register user agent information + +- Add `Stripe::setAppInfo` to allow plugins to register user agent information ## 3.21.0 - 2016-08-25 -* Add `Source` model for generic payment sources + +- Add `Source` model for generic payment sources ## 3.20.0 - 2016-08-08 -* Add `getDeclineCode` to card errors + +- Add `getDeclineCode` to card errors ## 3.19.0 - 2016-07-29 -* Opt requests directly into TLS 1.2 where OpenSSL >= 1.0.1 (see #277 for context) + +- Opt requests directly into TLS 1.2 where OpenSSL >= 1.0.1 (see #277 for context) ## 3.18.0 - 2016-07-28 -* Add new `STATUS_` constants for subscriptions + +- Add new `STATUS_` constants for subscriptions ## 3.17.1 - 2016-07-28 -* Fix auto-paging iterator so that it plays nicely with `iterator_to_array` + +- Fix auto-paging iterator so that it plays nicely with `iterator_to_array` ## 3.17.0 - 2016-07-14 -* Add field annotations to model classes for better editor hinting + +- Add field annotations to model classes for better editor hinting ## 3.16.0 - 2016-07-12 -* Add `ThreeDSecure` model for 3-D secure payments + +- Add `ThreeDSecure` model for 3-D secure payments ## 3.15.0 - 2016-06-29 -* Add static `update` method to all resources that can be changed. + +- Add static `update` method to all resources that can be changed. ## 3.14.3 - 2016-06-20 -* Make sure that cURL never sends `Expects: 100-continue`, even on large request bodies + +- Make sure that cURL never sends `Expects: 100-continue`, even on large request bodies ## 3.14.2 - 2016-06-03 -* Add `inventory` under `SKU` to list of keys that have nested data and can be updated + +- Add `inventory` under `SKU` to list of keys that have nested data and can be updated ## 3.14.1 - 2016-05-27 -* Fix some inconsistencies in PHPDoc + +- Fix some inconsistencies in PHPDoc ## 3.14.0 - 2016-05-25 -* Add support for returning Relay orders + +- Add support for returning Relay orders ## 3.13.0 - 2016-05-04 -* Add `list`, `create`, `update`, `retrieve`, and `delete` methods to the Subscription class + +- Add `list`, `create`, `update`, `retrieve`, and `delete` methods to the Subscription class ## 3.12.1 - 2016-04-07 -* Additional check on value arrays for some extra safety + +- Additional check on value arrays for some extra safety ## 3.12.0 - 2016-03-31 -* Fix bug `refreshFrom` on `StripeObject` would not take an `$opts` array -* Fix bug where `$opts` not passed to parent `save` method in `Account` -* Fix bug where non-existent variable was referenced in `reverse` in `Transfer` -* Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1 + +- Fix bug `refreshFrom` on `StripeObject` would not take an `$opts` array +- Fix bug where `$opts` not passed to parent `save` method in `Account` +- Fix bug where non-existent variable was referenced in `reverse` in `Transfer` +- Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1 ## 3.11.0 - 2016-03-22 -* Allow `CurlClient` to be initialized with default `CURLOPT_*` options + +- Allow `CurlClient` to be initialized with default `CURLOPT_*` options ## 3.10.1 - 2016-03-22 -* Fix bug where request params and options were ignored in `ApplicationFee`'s `refund.` + +- Fix bug where request params and options were ignored in `ApplicationFee`'s `refund.` ## 3.10.0 - 2016-03-15 -* Add `reject` on `Account` to support the new API feature + +- Add `reject` on `Account` to support the new API feature ## 3.9.2 - 2016-03-04 -* Fix error when an object's metadata is set more than once + +- Fix error when an object's metadata is set more than once ## 3.9.1 - 2016-02-24 -* Fix encoding behavior of nested arrays for requests (see #227) + +- Fix encoding behavior of nested arrays for requests (see #227) ## 3.9.0 - 2016-02-09 -* Add automatic pagination mechanism with `autoPagingIterator()` -* Allow global account ID to be set with `Stripe::setAccountId()` + +- Add automatic pagination mechanism with `autoPagingIterator()` +- Allow global account ID to be set with `Stripe::setAccountId()` ## 3.8.0 - 2016-02-08 -* Add `CountrySpec` model for looking up country payment information + +- Add `CountrySpec` model for looking up country payment information ## 3.7.1 - 2016-02-01 -* Update bundled CA certs + +- Update bundled CA certs ## 3.7.0 - 2016-01-27 -* Support deleting Relay products and SKUs + +- Support deleting Relay products and SKUs ## 3.6.0 - 2016-01-05 -* Allow configuration of HTTP client timeouts + +- Allow configuration of HTTP client timeouts ## 3.5.0 - 2015-12-01 -* Add a verification routine for external accounts + +- Add a verification routine for external accounts ## 3.4.0 - 2015-09-14 -* Products, SKUs, and Orders -- https://stripe.com/relay + +- Products, SKUs, and Orders -- https://stripe.com/relay ## 3.3.0 - 2015-09-11 -* Add support for 429 Rate Limit response + +- Add support for 429 Rate Limit response ## 3.2.0 - 2015-08-17 -* Add refund listing and retrieval without an associated charge + +- Add refund listing and retrieval without an associated charge ## 3.1.0 - 2015-08-03 -* Add dispute listing and retrieval -* Add support for manage account deletion + +- Add dispute listing and retrieval +- Add support for manage account deletion ## 3.0.0 - 2015-07-28 -* Rename `\Stripe\Object` to `\Stripe\StripeObject` (PHP 7 compatibility) -* Rename `getCode` and `getParam` in exceptions to `getStripeCode` and `getStripeParam` -* Add support for calling `json_encode` on Stripe objects in PHP 5.4+ -* Start supporting/testing PHP 7 + +- Rename `\Stripe\Object` to `\Stripe\StripeObject` (PHP 7 compatibility) +- Rename `getCode` and `getParam` in exceptions to `getStripeCode` and `getStripeParam` +- Add support for calling `json_encode` on Stripe objects in PHP 5.4+ +- Start supporting/testing PHP 7 ## 2.3.0 - 2015-07-06 -* Add request ID to all Stripe exceptions + +- Add request ID to all Stripe exceptions ## 2.2.0 - 2015-06-01 -* Add support for Alipay accounts as sources -* Add support for bank accounts as sources (private beta) -* Add support for bank accounts and cards as external_accounts on Account objects + +- Add support for Alipay accounts as sources +- Add support for bank accounts as sources (private beta) +- Add support for bank accounts and cards as external_accounts on Account objects ## 2.1.4 - 2015-05-13 -* Fix CA certificate file path (thanks @lphilps & @matthewarkin) + +- Fix CA certificate file path (thanks @lphilps & @matthewarkin) ## 2.1.3 - 2015-05-12 -* Fix to account updating to permit `tos_acceptance` and `personal_address` to be set properly -* Fix to Transfer reversal creation (thanks @neatness!) -* Network requests are now done through a swappable class for easier mocking + +- Fix to account updating to permit `tos_acceptance` and `personal_address` to be set properly +- Fix to Transfer reversal creation (thanks @neatness!) +- Network requests are now done through a swappable class for easier mocking ## 2.1.2 - 2015-04-10 -* Remove SSL cert revokation checking (all pre-Heartbleed certs have expired) -* Bug fixes to account updating + +- Remove SSL cert revokation checking (all pre-Heartbleed certs have expired) +- Bug fixes to account updating ## 2.1.1 - 2015-02-27 -* Support transfer reversals + +- Support transfer reversals ## 2.1.0 - 2015-02-19 -* Support new API version (2015-02-18) -* Added Bitcoin Receiever update and delete actions -* Edited tests to prefer "source" over "card" as per new API version + +- Support new API version (2015-02-18) +- Added Bitcoin Receiever update and delete actions +- Edited tests to prefer "source" over "card" as per new API version ## 2.0.1 - 2015-02-16 -* Fix to fetching endpoints that use a non-default baseUrl (`FileUpload`) + +- Fix to fetching endpoints that use a non-default baseUrl (`FileUpload`) ## 2.0.0 - 2015-02-14 -* Bumped minimum version to 5.3.3 -* Switched to Stripe namespace instead of Stripe_ class name prefiexes (thanks @chadicus!) -* Switched tests to PHPUnit (thanks @chadicus!) -* Switched style guide to PSR2 (thanks @chadicus!) -* Added $opts hash to the end of most methods: this permits passing 'idempotency_key', 'stripe_account', or 'stripe_version'. The last 2 will persist across multiple object loads. -* Added support for retrieving Account by ID + +- Bumped minimum version to 5.3.3 +- Switched to Stripe namespace instead of Stripe\_ class name prefiexes (thanks @chadicus!) +- Switched tests to PHPUnit (thanks @chadicus!) +- Switched style guide to PSR2 (thanks @chadicus!) +- Added \$opts hash to the end of most methods: this permits passing 'idempotency_key', 'stripe_account', or 'stripe_version'. The last 2 will persist across multiple object loads. +- Added support for retrieving Account by ID ## 1.18.0 - 2015-01-21 -* Support making bitcoin charges through BitcoinReceiver source object + +- Support making bitcoin charges through BitcoinReceiver source object ## 1.17.5 - 2014-12-23 -* Adding support for creating file uploads. + +- Adding support for creating file uploads. ## 1.17.4 - 2014-12-15 -* Saving objects fetched with a custom key now works (thanks @JustinHook & @jpasilan) -* Added methods for reporting charges as safe or fraudulent and for specifying the reason for refunds + +- Saving objects fetched with a custom key now works (thanks @JustinHook & @jpasilan) +- Added methods for reporting charges as safe or fraudulent and for specifying the reason for refunds ## 1.17.3 - 2014-11-06 -* Better handling of HHVM support for SSL certificate blacklist checking. + +- Better handling of HHVM support for SSL certificate blacklist checking. ## 1.17.2 - 2014-09-23 -* Coupons now are backed by a `Stripe_Coupon` instead of `Stripe_Object`, and support updating metadata -* Running operations (`create`, `retrieve`, `all`) on upcoming invoice items now works + +- Coupons now are backed by a `Stripe_Coupon` instead of `Stripe_Object`, and support updating metadata +- Running operations (`create`, `retrieve`, `all`) on upcoming invoice items now works ## 1.17.1 - 2014-07-31 -* Requests now send Content-Type header + +- Requests now send Content-Type header ## 1.17.0 - 2014-07-29 -* Application Fee refunds now a list instead of array -* HHVM now works -* Small bug fixes (thanks @bencromwell & @fastest963) -* `__toString` now returns the name of the object in addition to its JSON representation + +- Application Fee refunds now a list instead of array +- HHVM now works +- Small bug fixes (thanks @bencromwell & @fastest963) +- `__toString` now returns the name of the object in addition to its JSON representation ## 1.16.0 - 2014-06-17 -* Add metadata for refunds and disputes + +- Add metadata for refunds and disputes ## 1.15.0 - 2014-05-28 -* Support canceling transfers + +- Support canceling transfers ## 1.14.1 - 2014-05-21 -* Support cards for recipients. + +- Support cards for recipients. ## 1.13.1 - 2014-05-15 -* Fix bug in account resource where `id` wasn't in the result + +- Fix bug in account resource where `id` wasn't in the result ## 1.13.0 - 2014-04-10 -* Add support for certificate blacklisting -* Update ca bundle -* Drop support for HHVM (Temporarily) + +- Add support for certificate blacklisting +- Update ca bundle +- Drop support for HHVM (Temporarily) ## 1.12.0 - 2014-04-01 -* Add Stripe_RateLimitError for catching rate limit errors. -* Update to Zend coding style (thanks, @jpiasetz) + +- Add Stripe_RateLimitError for catching rate limit errors. +- Update to Zend coding style (thanks, @jpiasetz) ## 1.11.0 - 2014-01-29 -* Add support for multiple subscriptions per customer + +- Add support for multiple subscriptions per customer ## 1.10.1 - 2013-12-02 -* Add new ApplicationFee + +- Add new ApplicationFee ## 1.9.1 - 2013-11-08 -* Fix a bug where a null nestable object causes warnings to fire. + +- Fix a bug where a null nestable object causes warnings to fire. ## 1.9.0 - 2013-10-16 -* Add support for metadata API. + +- Add support for metadata API. ## 1.8.4 - 2013-09-18 -* Add support for closing disputes. + +- Add support for closing disputes. ## 1.8.3 - 2013-08-13 -* Add new Balance and BalanceTransaction + +- Add new Balance and BalanceTransaction ## 1.8.2 - 2013-08-12 -* Add support for unsetting attributes by updating to NULL. Setting properties to a blank string is now an error. + +- Add support for unsetting attributes by updating to NULL. Setting properties to a blank string is now an error. ## 1.8.1 - 2013-07-12 -* Add support for multiple cards API (Stripe API version 2013-07-12: https://stripe.com/docs/upgrades#2013-07-05) + +- Add support for multiple cards API (Stripe API version 2013-07-12: https://stripe.com/docs/upgrades#2013-07-05) ## 1.8.0 - 2013-04-11 -* Allow Transfers to be creatable -* Add new Recipient resource + +- Allow Transfers to be creatable +- Add new Recipient resource ## 1.7.15 - 2013-02-21 -* Add 'id' to the list of permanent object attributes + +- Add 'id' to the list of permanent object attributes ## 1.7.14 - 2013-02-20 -* Don't re-encode strings that are already encoded in UTF-8. If you were previously using plan or coupon objects with UTF-8 IDs, they may have been treated as ISO-8859-1 (Latin-1) and encoded to UTF-8 a 2nd time. You may now need to pass the IDs to utf8_encode before passing them to Stripe_Plan::retrieve or Stripe_Coupon::retrieve. -* Ensure that all input is encoded in UTF-8 before submitting it to Stripe's servers. (github issue #27) +- Don't re-encode strings that are already encoded in UTF-8. If you were previously using plan or coupon objects with UTF-8 IDs, they may have been treated as ISO-8859-1 (Latin-1) and encoded to UTF-8 a 2nd time. You may now need to pass the IDs to utf8_encode before passing them to Stripe_Plan::retrieve or Stripe_Coupon::retrieve. +- Ensure that all input is encoded in UTF-8 before submitting it to Stripe's servers. (github issue #27) ## 1.7.13 - 2013-02-01 -* Add support for passing options when retrieving Stripe objects e.g., Stripe_Charge::retrieve(array("id"=>"foo", "expand" => array("customer"))); Stripe_Charge::retrieve("foo") will continue to work + +- Add support for passing options when retrieving Stripe objects e.g., Stripe_Charge::retrieve(array("id"=>"foo", "expand" => array("customer"))); Stripe_Charge::retrieve("foo") will continue to work ## 1.7.12 - 2013-01-15 -* Add support for setting a Stripe API version override + +- Add support for setting a Stripe API version override ## 1.7.11 - 2012-12-30 -* Version bump to cleanup constants and such (fix issue #26) + +- Version bump to cleanup constants and such (fix issue #26) ## 1.7.10 - 2012-11-08 -* Add support for updating charge disputes. -* Fix bug preventing retrieval of null attributes + +- Add support for updating charge disputes. +- Fix bug preventing retrieval of null attributes ## 1.7.9 - 2012-11-08 -* Fix usage under autoloaders such as the one generated by composer (fix issue #22) + +- Fix usage under autoloaders such as the one generated by composer (fix issue #22) ## 1.7.8 - 2012-10-30 -* Add support for creating invoices. -* Add support for new invoice lines return format -* Add support for new list objects + +- Add support for creating invoices. +- Add support for new invoice lines return format +- Add support for new list objects ## 1.7.7 - 2012-09-14 -* Get all of the various version numbers in the repo in sync (no other changes) + +- Get all of the various version numbers in the repo in sync (no other changes) ## 1.7.6 - 2012-08-31 -* Add update and pay methods to Invoice resource + +- Add update and pay methods to Invoice resource ## 1.7.5 - 2012-08-23 -* Change internal function names so that Stripe_SingletonApiRequest is E_STRICT-clean (github issue #16) + +- Change internal function names so that Stripe_SingletonApiRequest is E_STRICT-clean (github issue #16) ## 1.7.4 - 2012-08-21 -* Bugfix so that Stripe objects (e.g. Customer, Charge objects) used in API calls are transparently converted to their object IDs + +- Bugfix so that Stripe objects (e.g. Customer, Charge objects) used in API calls are transparently converted to their object IDs ## 1.7.3 - 2012-08-15 -* Add new Account resource + +- Add new Account resource ## 1.7.2 - 2012-06-26 -* Make clearer that you should be including lib/Stripe.php, not test/Stripe.php (github issue #14) + +- Make clearer that you should be including lib/Stripe.php, not test/Stripe.php (github issue #14) ## 1.7.1 - 2012-05-24 -* Add missing argument to Stripe_InvalidRequestError constructor in Stripe_ApiResource::instanceUrl. Fixes a warning when Stripe_ApiResource::instanceUrl is called on a resource with no ID (fix issue #12) + +- Add missing argument to Stripe_InvalidRequestError constructor in Stripe_ApiResource::instanceUrl. Fixes a warning when Stripe_ApiResource::instanceUrl is called on a resource with no ID (fix issue #12) ## 1.7.0 - 2012-05-17 -* Support Composer and Packagist (github issue #9) -* Add new deleteDiscount method to Stripe_Customer -* Add new Transfer resource -* Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward) -* Numerous test suite improvements + +- Support Composer and Packagist (github issue #9) +- Add new deleteDiscount method to Stripe_Customer +- Add new Transfer resource +- Switch from using HTTP Basic auth to Bearer auth. (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward) +- Numerous test suite improvements diff --git a/htdocs/includes/stripe/stripe-php/CODE_OF_CONDUCT.md b/htdocs/includes/stripe/stripe-php/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..349f5a0bfd7 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/CODE_OF_CONDUCT.md @@ -0,0 +1,77 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at conduct@stripe.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq + diff --git a/htdocs/includes/stripe/stripe-php/Makefile b/htdocs/includes/stripe/stripe-php/Makefile new file mode 100644 index 00000000000..8de55c18222 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/Makefile @@ -0,0 +1,36 @@ +export PHPDOCUMENTOR_VERSION := v3.0.0-rc +export PHPSTAN_VERSION := 0.12.59 + +vendor: composer.json + composer install + +vendor/bin/phpstan: vendor + curl -sfL https://github.com/phpstan/phpstan/releases/download/$(PHPSTAN_VERSION)/phpstan.phar -o vendor/bin/phpstan + chmod +x vendor/bin/phpstan + +vendor/bin/phpdoc: vendor + curl -sfL https://github.com/phpDocumentor/phpDocumentor/releases/download/$(PHPDOCUMENTOR_VERSION)/phpDocumentor.phar -o vendor/bin/phpdoc + chmod +x vendor/bin/phpdoc + +test: vendor + vendor/bin/phpunit +.PHONY: test + +fmt: vendor + vendor/bin/php-cs-fixer fix -v --using-cache=no . +.PHONY: fmt + +fmtcheck: vendor + vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no . +.PHONY: fmtcheck + +phpdoc: vendor/bin/phpdoc + vendor/bin/phpdoc + +phpstan: vendor/bin/phpstan + php -d memory_limit=512M vendor/bin/phpstan analyse lib tests +.PHONY: phpstan + +phpstan-baseline: vendor/bin/phpstan + php -d memory_limit=512M vendor/bin/phpstan analyse lib tests --generate-baseline +.PHONY: phpstan-baseline diff --git a/htdocs/includes/stripe/stripe-php/README.md b/htdocs/includes/stripe/stripe-php/README.md index 7d1b681c087..1be6aa1beff 100644 --- a/htdocs/includes/stripe/stripe-php/README.md +++ b/htdocs/includes/stripe/stripe-php/README.md @@ -14,7 +14,7 @@ API. ## Requirements -PHP 5.4.0 and later. +PHP 5.6.0 and later. ## Composer @@ -42,9 +42,9 @@ require_once('/path/to/stripe-php/init.php'); The bindings require the following extensions in order to work properly: -- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer -- [`json`](https://secure.php.net/manual/en/book.json.php) -- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String) +- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer +- [`json`](https://secure.php.net/manual/en/book.json.php) +- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String) If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available. @@ -53,36 +53,36 @@ If you use Composer, these dependencies should be handled automatically. If you Simple usage looks like: ```php -\Stripe\Stripe::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); -$charge = \Stripe\Charge::create(['amount' => 2000, 'currency' => 'usd', 'source' => 'tok_189fqt2eZvKYlo2CTGBeg6Uq']); -echo $charge; +$stripe = new \Stripe\StripeClient('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); +$customer = $stripe->customers->create([ + 'description' => 'example customer', + 'email' => 'email@example.com', + 'payment_method' => 'pm_card_visa', +]); +echo $customer; ``` +### Client/service patterns vs legacy patterns + +You can continue to use the legacy integration patterns used prior to version [7.33.0](https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#7330---2020-05-14). Review the [migration guide](https://github.com/stripe/stripe-php/wiki/Migration-to-StripeClient-and-services-in-7.33.0) for the backwards-compatible client/services pattern changes. + ## Documentation See the [PHP API docs](https://stripe.com/docs/api/php#intro). ## Legacy Version Support +### PHP 5.4 & 5.5 + +If you are using PHP 5.4 or 5.5, you can download v6.21.1 ([zip](https://github.com/stripe/stripe-php/archive/v6.21.1.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v6.21.1.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses. + ### PHP 5.3 If you are using PHP 5.3, you can download v5.9.2 ([zip](https://github.com/stripe/stripe-php/archive/v5.9.2.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v5.9.2.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses. -### PHP 5.2 - -If you are using PHP 5.2, you can download v1.18.0 ([zip](https://github.com/stripe/stripe-php/archive/v1.18.0.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v1.18.0.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses. - -This legacy version may be included via `require_once("/path/to/stripe-php/lib/Stripe.php");`, and used like: - -```php -Stripe::setApiKey('d8e8fca2dc0f896fd7cb4cb0031ba249'); -$charge = Stripe_Charge::create(array('source' => 'tok_XXXXXXXX', 'amount' => 2000, 'currency' => 'usd')); -echo $charge; -``` - ## Custom Request Timeouts -*NOTE:* We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic. +_NOTE:_ We do not recommend decreasing the timeout for non-read-only calls (e.g. charge creation), since even if you locally timeout, the request on Stripe's side can still complete. If you are decreasing timeouts on these calls, make sure to use [idempotency tokens](https://stripe.com/docs/api/php#idempotent_requests) to avoid executing the same transaction twice as a result of timeout retry logic. To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient. @@ -129,8 +129,10 @@ end up there instead of `error_log`: You can access the data from the last API response on any object via `getLastResponse()`. ```php -$charge = \Stripe\Charge::create(['amount' => 2000, 'currency' => 'usd', 'source' => 'tok_visa']); -echo $charge->getLastResponse()->headers['Request-Id']; +$customer = $stripe->customers->create([ + 'description' => 'example customer', +]); +echo $customer->getLastResponse()->headers['Request-Id']; ``` ### SSL / TLS compatibility issues @@ -151,12 +153,12 @@ one that uses [Stripe Connect][connect], it's also possible to set a per-request key and/or account: ```php -\Stripe\Charge::all([], [ +$customers = $stripe->customers->all([],[ 'api_key' => 'sk_test_...', 'stripe_account' => 'acct_...' ]); -\Stripe\Charge::retrieve("ch_18atAXCdGbJFKhCuBAa4532Z", [ +$stripe->customers->retrieve('cus_123456789', [], [ 'api_key' => 'sk_test_...', 'stripe_account' => 'acct_...' ]); @@ -235,6 +237,12 @@ Update bundled CA certificates from the [Mozilla cURL release][curl]: ./update_certs.php ``` +The library uses [PHP CS Fixer][php-cs-fixer] for code formatting. Code must be formatted before PRs are submitted, otherwise CI will fail. Run the formatter with: + +```bash +./vendor/bin/php-cs-fixer fix -v . +``` + ## Attention plugin developers Are you writing a plugin that integrates Stripe and embeds our library? Then please use the `setAppInfo` function to identify your plugin. For example: @@ -252,6 +260,7 @@ See the "SSL / TLS compatibility issues" paragraph above for full context. If yo [composer]: https://getcomposer.org/ [connect]: https://stripe.com/connect [curl]: http://curl.haxx.se/docs/caextract.html -[psr3]: http://www.php-fig.org/psr/psr-3/ [idempotency-keys]: https://stripe.com/docs/api/php#idempotent_requests +[php-cs-fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer +[psr3]: http://www.php-fig.org/psr/psr-3/ [stripe-mock]: https://github.com/stripe/stripe-mock diff --git a/htdocs/includes/stripe/stripe-php/VERSION b/htdocs/includes/stripe/stripe-php/VERSION index eb34ef6cbc3..6a09420b3d9 100644 --- a/htdocs/includes/stripe/stripe-php/VERSION +++ b/htdocs/includes/stripe/stripe-php/VERSION @@ -1 +1 @@ -6.43.1 +7.67.0 diff --git a/htdocs/includes/stripe/stripe-php/build.php b/htdocs/includes/stripe/stripe-php/build.php index 6ce0ca38d11..37360ffef92 100755 --- a/htdocs/includes/stripe/stripe-php/build.php +++ b/htdocs/includes/stripe/stripe-php/build.php @@ -1,36 +1,25 @@ #!/usr/bin/env php <?php -chdir(dirname(__FILE__)); +\chdir(__DIR__); -$autoload = (int)$argv[1]; +$autoload = (int) $argv[1]; $returnStatus = null; if (!$autoload) { // Modify composer to not autoload Stripe - $composer = json_decode(file_get_contents('composer.json'), true); - unset($composer['autoload']); - unset($composer['require-dev']['squizlabs/php_codesniffer']); - file_put_contents('composer.json', json_encode($composer, JSON_PRETTY_PRINT)); + $composer = \json_decode(\file_get_contents('composer.json'), true); + unset($composer['autoload'], $composer['autoload-dev']); + + \file_put_contents('composer.json', \json_encode($composer, \JSON_PRETTY_PRINT)); } -passthru('composer update', $returnStatus); -if ($returnStatus !== 0) { +\passthru('composer update', $returnStatus); +if (0 !== $returnStatus) { exit(1); } -if ($autoload) { - // Only run CS on 1 of the 2 environments - passthru( - './vendor/bin/phpcs --standard=PSR2 -n lib tests *.php', - $returnStatus - ); - if ($returnStatus !== 0) { - exit(1); - } -} - $config = $autoload ? 'phpunit.xml' : 'phpunit.no_autoload.xml'; -passthru("./vendor/bin/phpunit -c $config", $returnStatus); -if ($returnStatus !== 0) { +\passthru("./vendor/bin/phpunit -c {$config}", $returnStatus); +if (0 !== $returnStatus) { exit(1); } diff --git a/htdocs/includes/stripe/stripe-php/composer.json b/htdocs/includes/stripe/stripe-php/composer.json index eb92b76fb31..17bde01c373 100644 --- a/htdocs/includes/stripe/stripe-php/composer.json +++ b/htdocs/includes/stripe/stripe-php/composer.json @@ -15,19 +15,30 @@ } ], "require": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "php-coveralls/php-coveralls": "1.*", - "squizlabs/php_codesniffer": "~2.0", - "symfony/process": "~2.8" + "phpunit/phpunit": "^5.7", + "php-coveralls/php-coveralls": "^2.1", + "squizlabs/php_codesniffer": "^3.3", + "symfony/process": "~3.4", + "friendsofphp/php-cs-fixer": "2.17.1" }, "autoload": { - "psr-4": { "Stripe\\" : "lib/" } + "psr-4": { + "Stripe\\": "lib/" + } + }, + "autoload-dev": { + "psr-4": { + "Stripe\\": [ + "tests/", + "tests/Stripe/" + ] + } }, "extra": { "branch-alias": { diff --git a/htdocs/includes/stripe/stripe-php/data/ca-certificates.crt b/htdocs/includes/stripe/stripe-php/data/ca-certificates.crt index 39ba33683c5..65be2181db5 100644 --- a/htdocs/includes/stripe/stripe-php/data/ca-certificates.crt +++ b/htdocs/includes/stripe/stripe-php/data/ca-certificates.crt @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Wed Sep 20 03:12:05 2017 GMT +## Certificate data from Mozilla as of: Wed Aug 28 03:12:10 2019 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.27. -## SHA256: 2b2dbe5244e0047e088c597998883a913f6c5fffd1cb5c0fe5a368c8466cb2ec +## SHA256: fffa309937c3be940649293f749b8207fabc6eb224e50e4bb3f2c5e44e0d6a6b ## @@ -261,47 +261,6 @@ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -----END CERTIFICATE----- -Visa eCommerce Root -=================== ------BEGIN CERTIFICATE----- -MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG -EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsI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/oAo85ADmJ7f/hC3euiInlhBx6yLt -398znM/jra6O1I7mT1GvFpLgXPYHDw== ------END CERTIFICATE----- - -Certum Root CA -============== ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK -ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla -Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u -by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x -wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL -kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ -89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K -Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P -NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq -hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ -GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg -GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ -0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS -qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== ------END CERTIFICATE----- - Comodo AAA Services root ======================== -----BEGIN CERTIFICATE----- @@ -465,60 +424,6 @@ EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH llpwrN9M -----END CERTIFICATE----- -Camerfirma Chambers of Commerce Root -==================================== ------BEGIN CERTIFICATE----- -MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i -ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx -NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp -cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn -MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC -AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU -xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH -NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW -DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV -d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud -EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v -cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P -AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh -bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD -VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz -aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi -fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD -L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN -UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n -ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 -erfutGWaIZDgqtCYvDi1czyL+Nw= ------END CERTIFICATE----- - -Camerfirma Global Chambersign Root -================================== ------BEGIN CERTIFICATE----- -MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQ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ysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh -bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA -PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y -gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ -PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4 -IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes -t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== ------END CERTIFICATE----- - XRamp Global CA Root ==================== -----BEGIN CERTIFICATE----- @@ -591,47 +496,6 @@ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcG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Kt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl -1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ -lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro -g14= ------END CERTIFICATE----- - Taiwan GRCA =========== -----BEGIN CERTIFICATE----- @@ -770,30 +634,6 @@ RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ -----END CERTIFICATE----- -DST ACES CA X6 -============== ------BEGIN CERTIFICATE----- -MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT -MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha -MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE -CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI -DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa -pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow -GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy -MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud -EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu -Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy -dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU -CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2 -5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t -Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq -nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs -vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 -oKfN5XozNmr6mis= ------END CERTIFICATE----- - SwissSign Gold CA - G2 ====================== -----BEGIN CERTIFICATE----- @@ -1036,27 +876,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- -Security Communication EV RootCA1 -================================= ------BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMC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gtQaQM+ELbmaDgcm+7XeEW -T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 ------END CERTIFICATE----- - OISTE WISeKey Global Root GA CA =============================== -----BEGIN CERTIFICATE----- @@ -1177,34 +996,6 @@ sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= -----END CERTIFICATE----- -T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 -============================================================================================================================= ------BEGIN CERTIFICATE----- -MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH -DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q -aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry -b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV -BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg -S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4 -MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl -IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF -n3TE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N+J1q2M -dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= ------END CERTIFICATE----- - certSIGN ROOT CA ================ -----BEGIN CERTIFICATE----- @@ -1452,37 +1243,6 @@ y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= -----END CERTIFICATE----- -ACEDICOM Root -============= ------BEGIN CERTIFICATE----- -MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UEAwwNQUNFRElD -T00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMB4XDTA4 -MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEWMBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoG -A1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEF -AAOCAg8AMIICCgKCAgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHk -WLn709gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7XBZXehuD -YAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5PGrjm6gSSrj0RuVFCPYew -MYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAKt0SdE3QrwqXrIhWYENiLxQSfHY9g5QYb -m8+5eaA9oiM/Qj9r+hwDezCNzmzAv+YbX79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbk -HQl/Sog4P75n/TSW9R28MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXT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mjseCNj6nOGOp -MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o -tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== ------END CERTIFICATE----- - Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- @@ -1843,37 +1603,6 @@ Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI 03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= -----END CERTIFICATE----- -Certinomis - Autorité Racine -============================ ------BEGIN CERTIFICATE----- -MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK -Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg -LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG -A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw -JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa -wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4oH3DfVS9O7cdxbwly -Lu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWerP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw -2F1MpQiD8aYkOBOo7C+ooWfHpi2GR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F6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b -WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE -wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/ -vgt2Fl43N+bYdJeimUV5 ------END CERTIFICATE----- - TWCA Root Certification Authority ================================= -----BEGIN CERTIFICATE----- @@ -2022,75 +1751,6 @@ l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl iB6XzCGcKQENZetX2fNXlrtIzYE= -----END CERTIFICATE----- -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM3WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6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oZSBTdGFydENvbSBDZXJ0aWZpY2F0 -aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93d3cuc3RhcnRzc2wuY29t -L3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBG -cmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5 -fPGFf59Jb2vKXfuM/gTFwWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWm -N3PH/UvSTa0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst0OcN -Org+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNcpRJvkrKTlMeIFw6T -tn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX -e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA -2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs -HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE -JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib -D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8= ------END CERTIFICATE----- - -StartCom Certification Authority G2 -=================================== ------BEGIN CERTIFICATE----- -MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQ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wDQYJ -KoZIhvcNAQELBQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K -2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfXUfEpY9Z1zRbk -J4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl6/2o1PXWT6RbdejF0mCy2wl+ -JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG -/+gyRr61M3Z3qAFdlsHB1b6uJcDJHgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTc -nIhT76IxW1hPkWLIwpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/Xld -blhYXzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5lIxKVCCIc -l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm -7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm -obp573PYtlNXLfbQ4ddI ------END CERTIFICATE----- - Buypass Class 2 Root CA ======================= -----BEGIN CERTIFICATE----- @@ -2197,31 +1857,6 @@ uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU dcGWxZ0= -----END CERTIFICATE----- -TURKTRUST Certificate Services Provider Root 2007 -================================================= ------BEGIN CERTIFICATE----- -MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8S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pM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I -aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO -Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb -BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK -poRq0Tl9 ------END CERTIFICATE----- - D-TRUST Root Class 3 CA 2 2009 ============================== -----BEGIN CERTIFICATE----- @@ -2271,84 +1906,6 @@ NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv w9y4AyHqnxbxLFS1 -----END CERTIFICATE----- -PSCProcert -========== ------BEGIN CERTIFICATE----- -MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1dG9yaWRhZCBk -ZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9sYW5vMQswCQYDVQQGEwJWRTEQ -MA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlzdHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lz -dGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBl -cmludGVuZGVuY2lhIGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUw -IwYJKoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEwMFoXDTIw -MTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHByb2NlcnQubmV0LnZlMQ8w -DQYDVQQHEwZDaGFjYW8xED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N -g7+mvTV+LFwxNG9s2/NkAZiqlCxB3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4q -uxtxj7mkoP3YldmvWb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1 -n8GhHVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHmpHmJWhSn -FFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXzsOfIt+FTvZLm8wyWuevo -5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bEqCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq -3TNWOByyrYDT13K9mmyZY+gAu0F2BbdbmRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5 -poLWccret9W6aAjtmcz9opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3Y -eMLEYC/HYvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km ------END CERTIFICATE----- - -CA Disig Root R1 -================ ------BEGIN CERTIFICATE----- -MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNVBAYTAlNLMRMw -EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp -ZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQyMDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sx -EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp -c2lnIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy -3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39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CXYBmCAMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85 -YmLLW1AL14FABZyb7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKS -ds+xDzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvkF7mGnjix -lAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqFa3qdnom2piiZk4hA9z7N -UaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsTQ6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJ -a7+h89n07eLw4+1knj0vllJPgFOL ------END CERTIFICATE----- - CA Disig Root R2 ================ -----BEGIN CERTIFICATE----- @@ -2752,66 +2309,6 @@ G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP 82Z+ -----END CERTIFICATE----- -WoSign -====== ------BEGIN CERTIFICATE----- -MIIFdjCCA16gAwIBAgIQXmjWEXGUY1BWAGjzPsnFkTANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNVBAMTIUNlcnRpZmljYXRpb24g -QXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMFUxCzAJ -BgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgb2YgV29TaWduMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA -vcqNrLiRFVaXe2tcesLea9mhsMMQI/qnobLMMfo+2aYpbxY94Gv4uEBf2zmoAHqLoE1UfcIiePyO -CbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIP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OQv -T8Jwg0DXJCxr5wkf09XHwQj02w47HAcLQxGEIYbpgNR12KvxAmLBsX5VYc8T1yaw15zLKYs4SgsO -kI26oQ== ------END CERTIFICATE----- - COMODO RSA Certification Authority ================================== -----BEGIN CERTIFICATE----- @@ -3116,61 +2613,6 @@ kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su -----END CERTIFICATE----- -TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 -==================================================== ------BEGIN CERTIFICATE----- -MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN -BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp -bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg -RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw -ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w -SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE -n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp -ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537 -jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m -ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP -9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV -4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH -HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI -hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo -BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq -URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl -lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8 -B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU= ------END CERTIFICATE----- - -Certinomis - Root CA -==================== ------BEGIN CERTIFICATE----- -MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK -Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg -LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx -EzARBgNVBAoTCkNlcnRp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ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw -Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX -lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ -y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9 -Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng -DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi -I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM -cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr -hkIGuUE= ------END CERTIFICATE----- - OISTE WISeKey Global Root GB CA =============================== -----BEGIN CERTIFICATE----- @@ -3193,42 +2635,6 @@ HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= -----END CERTIFICATE----- -Certification Authority of WoSign G2 -==================================== ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQayXaioidfLwPBbOxemFFRDANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxLTArBgNVBAMTJENlcnRpZmljYXRpb24g -QXV0aG9yaXR5IG9mIFdvU2lnbiBHMjAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMFgx -CzAJBgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEtMCsGA1UEAxMkQ2VydGlm -aWNhdGlvbiBBdXRob3JpdHkgb2YgV29TaWduIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAvsXEoCKASU+/2YcRxlPhuw+9YH+v9oIOH9ywjj2X4FA8jzrvZjtFB5sg+OPXJYY1kBai -XW8wGQiHC38Gsp1ij96vkqVg1CuAmlI/9ZqD6TRay9nVYlzmDuDfBpgOgHzKtB0TiGsOqCR3A9Du -W/PKaZE1OVbFbeP3PU9ekzgkyhjpJMuSA93MHD0JcOQg5PGurLtzaaNjOg9FD6FKmsLRY6zLEPg9 -5k4ot+vElbGs/V6r+kHLXZ1L3PR8du9nfwB6jdKgGlxNIuG12t12s9R23164i5jIFFTMaxeSt+BK -v0mUYQs4kI9dJGwlezt52eJ+na2fmKEG/HgUYFf47oB3sQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU+mCp62XF3RYUCE4MD42b4Pdkr2cwDQYJKoZI -hvcNAQELBQADggEBAFfDejaCnI2Y4qtAqkePx6db7XznPWZaOzG73/MWM5H8fHulwqZm46qwtyeY -P0nXYGdnPzZPSsvxFPpahygc7Y9BMsaV+X3avXtbwrAh449G3CE4Q3RM+zD4F3LBMvzIkRfEzFg3 -TgvMWvchNSiDbGAtROtSjFA9tWwS1/oJu2yySrHFieT801LYYRf+epSEj3m2M1m6D8QL4nCgS3gu -+sif/a+RZQp4OBXllxcU3fngLDT4ONCEIgDAFFEYKwLcMFrw6AF8NTojrwjkr6qOKEJJLvD1mTS+ -7Q9LGOHSJDy7XUe3IfKN0QqZjuNuPq1w4I+5ysxugTH2e5x6eeRncRg= ------END CERTIFICATE----- - -CA WoSign ECC Root -================== ------BEGIN CERTIFICATE----- -MIICCTCCAY+gAwIBAgIQaEpYcIBr8I8C+vbe6LCQkDAKBggqhkjOPQQDAzBGMQswCQYDVQQGEwJD -TjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMTEkNBIFdvU2lnbiBFQ0MgUm9v -dDAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMEYxCzAJBgNVBAYTAkNOMRowGAYDVQQK -ExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAxMSQ0EgV29TaWduIEVDQyBSb290MHYwEAYHKoZI -zj0CAQYFK4EEACIDYgAE4f2OuEMkq5Z7hcK6C62N4DrjJLnSsb6IOsq/Srj57ywvr1FQPEd1bPiU -t5v8KB7FVMxjnRZLU8HnIKvNrCXSf4/CwVqCXjCLelTOA7WRf6qU0NGKSMyCBSah1VES1ns2o0Iw -QDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUqv3VWqP2h4syhf3R -MluARZPzA7gwCgYIKoZIzj0EAwMDaAAwZQIxAOSkhLCB1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0 -Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu -a/GRspBl9JrmkO5K ------END CERTIFICATE----- - SZAFIR ROOT CA2 =============== -----BEGIN CERTIFICATE----- @@ -3333,126 +2739,6 @@ GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR -----END CERTIFICATE----- -Certplus Root CA G1 -=================== ------BEGIN CERTIFICATE----- -MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUAMD4xCzAJBgNV -BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm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Jh/k4DgYzDLDKTudQSk0YcbX8ACh -66Ryj5QXvBMsdbRX7gp8CXrc1cqh0DQT+Hern+X+2B50ioUHj3/MeXrKls3N/U/7/SMNkPX0XtPG -YX2eEeAC7gkE2Qfdpoq3DIMku4NQkv5gdRE+2J2winq14J2by5BSS7CTKtQ+FjPlnsZlFT5kOwQ/ -2wyPX1wdaR+v8+khjPPvl/aatxm2hHSco1S1cE5j2FddUyGbQJJD+tZ3VTNPZNX70Cxqjm0lpu+F -6ALEUz65noe8zDUa3qHpimOHZR4RKttjd5cUvpoUmRGywO6wT/gUITJDT5+rosuoD6o7BlXGEilX -CNQ314cnrUlZp5GrRHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWe -tUNy6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEVV/xuZDDC -VRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5g4VCXA9DO2pJNdWY9BW/ -+mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl++O/QmueD6i9a5jc2NvLi6Td11n0bt3+ -qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo= ------END CERTIFICATE----- - -Certplus Root CA G2 -=================== ------BEGIN CERTIFICATE----- -MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT -AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x -NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0 -cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA -BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN -Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD -AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud -IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV -HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl -vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw== ------END CERTIFICATE----- - -OpenTrust Root CA G1 -==================== ------BEGIN CERTIFICATE----- -MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV -BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx -MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM -CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa -Yp6bwiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX/uMftk87 -ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR077F9jAHiOH3BX2pfJLKO -YheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGPuY4zbGneWK2gDqdkVBFpRGZPTBKnjix9 -xNRbx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109S5zvE/ -bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/KyPu1svf0OnWZzsD2097+o -4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA -OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx ------END CERTIFICATE----- - -OpenTrust Root CA G2 -==================== ------BEGIN CERTIFICATE----- -MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV -BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy -MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM -CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB -AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+ -Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz -4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV -eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5J1WqIP7wt -UdGejeBSzFfdNTVY27SPJIjki9/ca1TSgSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz -3GIZ38i1MH/1PCZ1Eb3XG7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj -3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5c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Trust Root CA G3 -==================== ------BEGIN CERTIFICATE----- -MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT -AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X -DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w -ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA -IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B -ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB -/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf -BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM -BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta -3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB ------END CERTIFICATE----- - ISRG Root X1 ============ -----BEGIN CERTIFICATE----- @@ -3644,3 +2930,547 @@ lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= -----END CERTIFICATE----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C8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 +H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 +6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd ++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ +HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD +F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ +8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv +/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT +aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +TrustCor RootCert CA-1 +====================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQY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pGjOR +MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 +xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc +p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ +fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj +YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL +f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF +AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u +/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F +hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs +J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC +jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== +-----END CERTIFICATE----- + +SSL.com Root Certification Authority RSA +======================================== +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM +BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0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8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr +dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf +ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl +u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq +erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj +MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ +vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI +Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y +wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI +WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +SSL.com Root Certification Authority ECC +======================================== +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv +BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy +MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO +BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ +8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR +hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT +jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW +e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z +5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority RSA R2 +============================================== +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w +DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u +MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEQMA4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6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx +Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G +guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz +OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 +CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq +lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR +rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 +hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX +9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority ECC +=========================================== +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy +BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw +MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM +LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy +3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O +BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe +5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ +N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm +m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- + +GlobalSign Root CA - R6 +======================= +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEgMB4GA1UECxMX +R2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkds +b2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQxMjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9i +YWxTaWduIFJvb3QgQ0EgLSBSNjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFs +U2lnbjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQss +grRIxutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1kZguSgMpE +3nO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Hdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB1 +0jZpnOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T +uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK +oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t +JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GC CA +=============================== +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQswCQYDVQQGEwJD +SDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEo +MCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRa +Fw00MjA1MDkwOTU4MzNaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQL +ExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh +bCBSb290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4nieUqjFqdr +VCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4Wp2OQ0jnUsYd4XxiWD1Ab +NTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrY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sPOS+C12LOORc92 +wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om +3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNu +JLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEM +BQADggIBADiWCu49tJYeX++dnAsznyvgyv3SjgofQXSlfKqE1OXyHuY3UjKcC9FhHb8owbZEKTV1 +d5iyfNm9dKyKaOOpMQkpAWBz40d8U6iQSifvS9efk+eCNs6aaAyC58/UEBZvXw6ZXPYfcX3v73sv +fuo21pdwCxXu11xWajOl40k4DLh9+42FpLFZXvRq4d2h9mREruZRgyFmxhE+885H7pwoHyXa/6xm +ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b +gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq +4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr +tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo +pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0 +sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql +CFF1pkgl +-----END CERTIFICATE----- + +GTS Root R2 +=========== +-----BEGIN CERTIFICATE----- +MIIF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V +2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI +N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x +zPKwTdb+mciUqXWi4w== +-----END CERTIFICATE----- + +UCA Global G2 Root +================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x +NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU +cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxeYrb3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmT +oni9kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzmVHqUwCoV +8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/RVogvGjqNO7uCEeBHANBS +h6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDcC/Vkw85DvG1xudLeJ1uK6NjGruFZfc8o +LTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIjtm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/ +R+zvWr9LesGtOxdQXGLYD0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBe +KW4bHAyvj5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6DlNaBa +4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6iIis7nCs+dwp4wwc +OxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznPO6Q0ibd5Ei9Hxeepl2n8pndntd97 +8XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFIHEjMz15DD/pQwIX4wVZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo +5sOASD0Ee/ojL3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 +1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl1qnN3e92mI0A +Ds0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9 +yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX +c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo +jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk +bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x +ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn +RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A== +-----END CERTIFICATE----- + +UCA Extended Validation Root +============================ +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOe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YDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQEL +BQADggIBADaNl8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR +ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQVBcZEhrxH9cM +aVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5c6sq1WnIeJEmMX3ixzDx/BR4 +dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb ++7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW +F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi +GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc +GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi +djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr +dhh2n1ax +-----END CERTIFICATE----- + +Certigna Root CA +================ +-----BEGIN CERTIFICATE----- +MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE +BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ +MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda +MFoxCzAJBgNVBAYTAkZSMRIwEAYD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VzLzBtBgNVHR8EZjBkMC+gLaArhilodHRwOi8vY3JsLmNlcnRpZ25h +LmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYraHR0cDovL2NybC5kaGlteW90aXMuY29tL2Nl +cnRpZ25hcm9vdGNhLmNybDANBgkqhkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOIt +OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP +TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq +7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3 +4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd +8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS +6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY +tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS +aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde +E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= +-----END CERTIFICATE----- + +emSign Root CA - G1 +=================== +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET +MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl +ZDEcMBoGA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YhX3zUVxx +iN66zB+Afko= +-----END CERTIFICATE----- + +emSign ECC Root CA - G3 +======================= +-----BEGIN CERTIFICATE----- +MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG +A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg +MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4 +MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11 +ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g +RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc +58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr +MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D +CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7 +jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj +-----END CERTIFICATE----- + +emSign Root CA - C1 +=================== +-----BEGIN CERTIFICATE----- +MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx +EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDV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ATE----- + +emSign ECC Root CA - C3 +======================= +-----BEGIN CERTIFICATE----- +MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG +A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF +Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD +ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd +6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9 +SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA +B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA +MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU +ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== +-----END CERTIFICATE----- + +Hongkong Post Root CA 3 +======================= +-----BEGIN CERTIFICATE----- +MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG +A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK +Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgM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YJKoZIhvcN +AQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG7BJ8dNVI0lkUmcDrudHr9Egw +W62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCkMpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWld +y8joRTnU+kLBEUx3XZL7av9YROXrgZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov ++BS5gLNdTaqX4fnkGMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDc +eqFS3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJmOzj/2ZQw +9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+l6mc1X5VTMbeRRAc6uk7 +nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6cJfTzPV4e0hz5sy229zdcxsshTrD3mUcY +hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB +60PZ2Pierc+xYw5F9KBaLJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fq +dBb9HxEGmpv0 +-----END CERTIFICATE----- diff --git a/htdocs/includes/stripe/stripe-php/init.php b/htdocs/includes/stripe/stripe-php/init.php index 05243999637..11ac713da53 100644 --- a/htdocs/includes/stripe/stripe-php/init.php +++ b/htdocs/includes/stripe/stripe-php/init.php @@ -1,144 +1,238 @@ <?php +// File generated from our OpenAPI spec + // Stripe singleton -require(dirname(__FILE__) . '/lib/Stripe.php'); +require __DIR__ . '/lib/Stripe.php'; // Utilities -require(dirname(__FILE__) . '/lib/Util/AutoPagingIterator.php'); -require(dirname(__FILE__) . '/lib/Util/CaseInsensitiveArray.php'); -require(dirname(__FILE__) . '/lib/Util/LoggerInterface.php'); -require(dirname(__FILE__) . '/lib/Util/DefaultLogger.php'); -require(dirname(__FILE__) . '/lib/Util/RandomGenerator.php'); -require(dirname(__FILE__) . '/lib/Util/RequestOptions.php'); -require(dirname(__FILE__) . '/lib/Util/Set.php'); -require(dirname(__FILE__) . '/lib/Util/Util.php'); +require __DIR__ . '/lib/Util/CaseInsensitiveArray.php'; +require __DIR__ . '/lib/Util/LoggerInterface.php'; +require __DIR__ . '/lib/Util/DefaultLogger.php'; +require __DIR__ . '/lib/Util/RandomGenerator.php'; +require __DIR__ . '/lib/Util/RequestOptions.php'; +require __DIR__ . '/lib/Util/Set.php'; +require __DIR__ . '/lib/Util/Util.php'; +require __DIR__ . '/lib/Util/ObjectTypes.php'; // HttpClient -require(dirname(__FILE__) . '/lib/HttpClient/ClientInterface.php'); -require(dirname(__FILE__) . '/lib/HttpClient/CurlClient.php'); +require __DIR__ . '/lib/HttpClient/ClientInterface.php'; +require __DIR__ . '/lib/HttpClient/CurlClient.php'; -// Errors -require(dirname(__FILE__) . '/lib/Error/Base.php'); -require(dirname(__FILE__) . '/lib/Error/Api.php'); -require(dirname(__FILE__) . '/lib/Error/ApiConnection.php'); -require(dirname(__FILE__) . '/lib/Error/Authentication.php'); -require(dirname(__FILE__) . '/lib/Error/Card.php'); -require(dirname(__FILE__) . '/lib/Error/Idempotency.php'); -require(dirname(__FILE__) . '/lib/Error/InvalidRequest.php'); -require(dirname(__FILE__) . '/lib/Error/Permission.php'); -require(dirname(__FILE__) . '/lib/Error/RateLimit.php'); -require(dirname(__FILE__) . '/lib/Error/SignatureVerification.php'); +// Exceptions +require __DIR__ . '/lib/Exception/ExceptionInterface.php'; +require __DIR__ . '/lib/Exception/ApiErrorException.php'; +require __DIR__ . '/lib/Exception/ApiConnectionException.php'; +require __DIR__ . '/lib/Exception/AuthenticationException.php'; +require __DIR__ . '/lib/Exception/BadMethodCallException.php'; +require __DIR__ . '/lib/Exception/CardException.php'; +require __DIR__ . '/lib/Exception/IdempotencyException.php'; +require __DIR__ . '/lib/Exception/InvalidArgumentException.php'; +require __DIR__ . '/lib/Exception/InvalidRequestException.php'; +require __DIR__ . '/lib/Exception/PermissionException.php'; +require __DIR__ . '/lib/Exception/RateLimitException.php'; +require __DIR__ . '/lib/Exception/SignatureVerificationException.php'; +require __DIR__ . '/lib/Exception/UnexpectedValueException.php'; +require __DIR__ . '/lib/Exception/UnknownApiErrorException.php'; -// OAuth errors -require(dirname(__FILE__) . '/lib/Error/OAuth/OAuthBase.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/InvalidClient.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/InvalidGrant.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/InvalidRequest.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/InvalidScope.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/UnsupportedGrantType.php'); -require(dirname(__FILE__) . '/lib/Error/OAuth/UnsupportedResponseType.php'); +// OAuth exceptions +require __DIR__ . '/lib/Exception/OAuth/ExceptionInterface.php'; +require __DIR__ . '/lib/Exception/OAuth/OAuthErrorException.php'; +require __DIR__ . '/lib/Exception/OAuth/InvalidClientException.php'; +require __DIR__ . '/lib/Exception/OAuth/InvalidGrantException.php'; +require __DIR__ . '/lib/Exception/OAuth/InvalidRequestException.php'; +require __DIR__ . '/lib/Exception/OAuth/InvalidScopeException.php'; +require __DIR__ . '/lib/Exception/OAuth/UnknownOAuthErrorException.php'; +require __DIR__ . '/lib/Exception/OAuth/UnsupportedGrantTypeException.php'; +require __DIR__ . '/lib/Exception/OAuth/UnsupportedResponseTypeException.php'; // API operations -require(dirname(__FILE__) . '/lib/ApiOperations/All.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/Create.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/Delete.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/NestedResource.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/Request.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/Retrieve.php'); -require(dirname(__FILE__) . '/lib/ApiOperations/Update.php'); +require __DIR__ . '/lib/ApiOperations/All.php'; +require __DIR__ . '/lib/ApiOperations/Create.php'; +require __DIR__ . '/lib/ApiOperations/Delete.php'; +require __DIR__ . '/lib/ApiOperations/NestedResource.php'; +require __DIR__ . '/lib/ApiOperations/Request.php'; +require __DIR__ . '/lib/ApiOperations/Retrieve.php'; +require __DIR__ . '/lib/ApiOperations/Update.php'; // Plumbing -require(dirname(__FILE__) . '/lib/ApiResponse.php'); -require(dirname(__FILE__) . '/lib/RequestTelemetry.php'); -require(dirname(__FILE__) . '/lib/StripeObject.php'); -require(dirname(__FILE__) . '/lib/ApiRequestor.php'); -require(dirname(__FILE__) . '/lib/ApiResource.php'); -require(dirname(__FILE__) . '/lib/SingletonApiResource.php'); +require __DIR__ . '/lib/ApiResponse.php'; +require __DIR__ . '/lib/RequestTelemetry.php'; +require __DIR__ . '/lib/StripeObject.php'; +require __DIR__ . '/lib/ApiRequestor.php'; +require __DIR__ . '/lib/ApiResource.php'; +require __DIR__ . '/lib/SingletonApiResource.php'; +require __DIR__ . '/lib/Service/AbstractService.php'; +require __DIR__ . '/lib/Service/AbstractServiceFactory.php'; + +// StripeClient +require __DIR__ . '/lib/StripeClientInterface.php'; +require __DIR__ . '/lib/BaseStripeClient.php'; +require __DIR__ . '/lib/StripeClient.php'; // Stripe API Resources -require(dirname(__FILE__) . '/lib/Account.php'); -require(dirname(__FILE__) . '/lib/AccountLink.php'); -require(dirname(__FILE__) . '/lib/AlipayAccount.php'); -require(dirname(__FILE__) . '/lib/ApplePayDomain.php'); -require(dirname(__FILE__) . '/lib/ApplicationFee.php'); -require(dirname(__FILE__) . '/lib/ApplicationFeeRefund.php'); -require(dirname(__FILE__) . '/lib/Balance.php'); -require(dirname(__FILE__) . '/lib/BalanceTransaction.php'); -require(dirname(__FILE__) . '/lib/BankAccount.php'); -require(dirname(__FILE__) . '/lib/BitcoinReceiver.php'); -require(dirname(__FILE__) . '/lib/BitcoinTransaction.php'); -require(dirname(__FILE__) . '/lib/Capability.php'); -require(dirname(__FILE__) . '/lib/Card.php'); -require(dirname(__FILE__) . '/lib/Charge.php'); -require(dirname(__FILE__) . '/lib/Checkout/Session.php'); -require(dirname(__FILE__) . '/lib/Collection.php'); -require(dirname(__FILE__) . '/lib/CountrySpec.php'); -require(dirname(__FILE__) . '/lib/Coupon.php'); -require(dirname(__FILE__) . '/lib/CreditNote.php'); -require(dirname(__FILE__) . '/lib/Customer.php'); -require(dirname(__FILE__) . '/lib/CustomerBalanceTransaction.php'); -require(dirname(__FILE__) . '/lib/Discount.php'); -require(dirname(__FILE__) . '/lib/Dispute.php'); -require(dirname(__FILE__) . '/lib/EphemeralKey.php'); -require(dirname(__FILE__) . '/lib/Event.php'); -require(dirname(__FILE__) . '/lib/ExchangeRate.php'); -require(dirname(__FILE__) . '/lib/File.php'); -require(dirname(__FILE__) . '/lib/FileLink.php'); -require(dirname(__FILE__) . '/lib/FileUpload.php'); -require(dirname(__FILE__) . '/lib/Invoice.php'); -require(dirname(__FILE__) . '/lib/InvoiceItem.php'); -require(dirname(__FILE__) . '/lib/InvoiceLineItem.php'); -require(dirname(__FILE__) . '/lib/IssuerFraudRecord.php'); -require(dirname(__FILE__) . '/lib/Issuing/Authorization.php'); -require(dirname(__FILE__) . '/lib/Issuing/Card.php'); -require(dirname(__FILE__) . '/lib/Issuing/CardDetails.php'); -require(dirname(__FILE__) . '/lib/Issuing/Cardholder.php'); -require(dirname(__FILE__) . '/lib/Issuing/Dispute.php'); -require(dirname(__FILE__) . '/lib/Issuing/Transaction.php'); -require(dirname(__FILE__) . '/lib/LoginLink.php'); -require(dirname(__FILE__) . '/lib/Order.php'); -require(dirname(__FILE__) . '/lib/OrderItem.php'); -require(dirname(__FILE__) . '/lib/OrderReturn.php'); -require(dirname(__FILE__) . '/lib/PaymentIntent.php'); -require(dirname(__FILE__) . '/lib/PaymentMethod.php'); -require(dirname(__FILE__) . '/lib/Payout.php'); -require(dirname(__FILE__) . '/lib/Person.php'); -require(dirname(__FILE__) . '/lib/Plan.php'); -require(dirname(__FILE__) . '/lib/Product.php'); -require(dirname(__FILE__) . '/lib/Radar/EarlyFraudWarning.php'); -require(dirname(__FILE__) . '/lib/Radar/ValueList.php'); -require(dirname(__FILE__) . '/lib/Radar/ValueListItem.php'); -require(dirname(__FILE__) . '/lib/Recipient.php'); -require(dirname(__FILE__) . '/lib/RecipientTransfer.php'); -require(dirname(__FILE__) . '/lib/Refund.php'); -require(dirname(__FILE__) . '/lib/Reporting/ReportRun.php'); -require(dirname(__FILE__) . '/lib/Reporting/ReportType.php'); -require(dirname(__FILE__) . '/lib/Review.php'); -require(dirname(__FILE__) . '/lib/SetupIntent.php'); -require(dirname(__FILE__) . '/lib/SKU.php'); -require(dirname(__FILE__) . '/lib/Sigma/ScheduledQueryRun.php'); -require(dirname(__FILE__) . '/lib/Source.php'); -require(dirname(__FILE__) . '/lib/SourceTransaction.php'); -require(dirname(__FILE__) . '/lib/Subscription.php'); -require(dirname(__FILE__) . '/lib/SubscriptionItem.php'); -require(dirname(__FILE__) . '/lib/SubscriptionSchedule.php'); -require(dirname(__FILE__) . '/lib/TaxId.php'); -require(dirname(__FILE__) . '/lib/TaxRate.php'); -require(dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php'); -require(dirname(__FILE__) . '/lib/Terminal/Location.php'); -require(dirname(__FILE__) . '/lib/Terminal/Reader.php'); -require(dirname(__FILE__) . '/lib/ThreeDSecure.php'); -require(dirname(__FILE__) . '/lib/Token.php'); -require(dirname(__FILE__) . '/lib/Topup.php'); -require(dirname(__FILE__) . '/lib/Transfer.php'); -require(dirname(__FILE__) . '/lib/TransferReversal.php'); -require(dirname(__FILE__) . '/lib/UsageRecord.php'); -require(dirname(__FILE__) . '/lib/UsageRecordSummary.php'); +require __DIR__ . '/lib/Account.php'; +require __DIR__ . '/lib/AccountLink.php'; +require __DIR__ . '/lib/AlipayAccount.php'; +require __DIR__ . '/lib/ApplePayDomain.php'; +require __DIR__ . '/lib/ApplicationFee.php'; +require __DIR__ . '/lib/ApplicationFeeRefund.php'; +require __DIR__ . '/lib/Balance.php'; +require __DIR__ . '/lib/BalanceTransaction.php'; +require __DIR__ . '/lib/BankAccount.php'; +require __DIR__ . '/lib/BillingPortal/Session.php'; +require __DIR__ . '/lib/BitcoinReceiver.php'; +require __DIR__ . '/lib/BitcoinTransaction.php'; +require __DIR__ . '/lib/Capability.php'; +require __DIR__ . '/lib/Card.php'; +require __DIR__ . '/lib/Charge.php'; +require __DIR__ . '/lib/Checkout/Session.php'; +require __DIR__ . '/lib/Collection.php'; +require __DIR__ . '/lib/CountrySpec.php'; +require __DIR__ . '/lib/Coupon.php'; +require __DIR__ . '/lib/CreditNote.php'; +require __DIR__ . '/lib/CreditNoteLineItem.php'; +require __DIR__ . '/lib/Customer.php'; +require __DIR__ . '/lib/CustomerBalanceTransaction.php'; +require __DIR__ . '/lib/Discount.php'; +require __DIR__ . '/lib/Dispute.php'; +require __DIR__ . '/lib/EphemeralKey.php'; +require __DIR__ . '/lib/ErrorObject.php'; +require __DIR__ . '/lib/Event.php'; +require __DIR__ . '/lib/ExchangeRate.php'; +require __DIR__ . '/lib/File.php'; +require __DIR__ . '/lib/FileLink.php'; +require __DIR__ . '/lib/Invoice.php'; +require __DIR__ . '/lib/InvoiceItem.php'; +require __DIR__ . '/lib/InvoiceLineItem.php'; +require __DIR__ . '/lib/Issuing/Authorization.php'; +require __DIR__ . '/lib/Issuing/Card.php'; +require __DIR__ . '/lib/Issuing/CardDetails.php'; +require __DIR__ . '/lib/Issuing/Cardholder.php'; +require __DIR__ . '/lib/Issuing/Dispute.php'; +require __DIR__ . '/lib/Issuing/Transaction.php'; +require __DIR__ . '/lib/LineItem.php'; +require __DIR__ . '/lib/LoginLink.php'; +require __DIR__ . '/lib/Mandate.php'; +require __DIR__ . '/lib/Order.php'; +require __DIR__ . '/lib/OrderItem.php'; +require __DIR__ . '/lib/OrderReturn.php'; +require __DIR__ . '/lib/PaymentIntent.php'; +require __DIR__ . '/lib/PaymentMethod.php'; +require __DIR__ . '/lib/Payout.php'; +require __DIR__ . '/lib/Person.php'; +require __DIR__ . '/lib/Plan.php'; +require __DIR__ . '/lib/Price.php'; +require __DIR__ . '/lib/Product.php'; +require __DIR__ . '/lib/PromotionCode.php'; +require __DIR__ . '/lib/Radar/EarlyFraudWarning.php'; +require __DIR__ . '/lib/Radar/ValueList.php'; +require __DIR__ . '/lib/Radar/ValueListItem.php'; +require __DIR__ . '/lib/Recipient.php'; +require __DIR__ . '/lib/RecipientTransfer.php'; +require __DIR__ . '/lib/Refund.php'; +require __DIR__ . '/lib/Reporting/ReportRun.php'; +require __DIR__ . '/lib/Reporting/ReportType.php'; +require __DIR__ . '/lib/Review.php'; +require __DIR__ . '/lib/SetupAttempt.php'; +require __DIR__ . '/lib/SetupIntent.php'; +require __DIR__ . '/lib/Sigma/ScheduledQueryRun.php'; +require __DIR__ . '/lib/SKU.php'; +require __DIR__ . '/lib/Source.php'; +require __DIR__ . '/lib/SourceTransaction.php'; +require __DIR__ . '/lib/Subscription.php'; +require __DIR__ . '/lib/SubscriptionItem.php'; +require __DIR__ . '/lib/SubscriptionSchedule.php'; +require __DIR__ . '/lib/TaxId.php'; +require __DIR__ . '/lib/TaxRate.php'; +require __DIR__ . '/lib/Terminal/ConnectionToken.php'; +require __DIR__ . '/lib/Terminal/Location.php'; +require __DIR__ . '/lib/Terminal/Reader.php'; +require __DIR__ . '/lib/ThreeDSecure.php'; +require __DIR__ . '/lib/Token.php'; +require __DIR__ . '/lib/Topup.php'; +require __DIR__ . '/lib/Transfer.php'; +require __DIR__ . '/lib/TransferReversal.php'; +require __DIR__ . '/lib/UsageRecord.php'; +require __DIR__ . '/lib/UsageRecordSummary.php'; +require __DIR__ . '/lib/WebhookEndpoint.php'; + +// Services +require __DIR__ . '/lib/Service/AccountService.php'; +require __DIR__ . '/lib/Service/AccountLinkService.php'; +require __DIR__ . '/lib/Service/ApplePayDomainService.php'; +require __DIR__ . '/lib/Service/ApplicationFeeService.php'; +require __DIR__ . '/lib/Service/BalanceService.php'; +require __DIR__ . '/lib/Service/BalanceTransactionService.php'; +require __DIR__ . '/lib/Service/BillingPortal/SessionService.php'; +require __DIR__ . '/lib/Service/ChargeService.php'; +require __DIR__ . '/lib/Service/Checkout/SessionService.php'; +require __DIR__ . '/lib/Service/CountrySpecService.php'; +require __DIR__ . '/lib/Service/CouponService.php'; +require __DIR__ . '/lib/Service/CreditNoteService.php'; +require __DIR__ . '/lib/Service/CustomerService.php'; +require __DIR__ . '/lib/Service/DisputeService.php'; +require __DIR__ . '/lib/Service/EphemeralKeyService.php'; +require __DIR__ . '/lib/Service/EventService.php'; +require __DIR__ . '/lib/Service/ExchangeRateService.php'; +require __DIR__ . '/lib/Service/FileService.php'; +require __DIR__ . '/lib/Service/FileLinkService.php'; +require __DIR__ . '/lib/Service/InvoiceService.php'; +require __DIR__ . '/lib/Service/InvoiceItemService.php'; +require __DIR__ . '/lib/Service/Issuing/AuthorizationService.php'; +require __DIR__ . '/lib/Service/Issuing/CardService.php'; +require __DIR__ . '/lib/Service/Issuing/CardholderService.php'; +require __DIR__ . '/lib/Service/Issuing/DisputeService.php'; +require __DIR__ . '/lib/Service/Issuing/TransactionService.php'; +require __DIR__ . '/lib/Service/MandateService.php'; +require __DIR__ . '/lib/Service/OrderService.php'; +require __DIR__ . '/lib/Service/OrderReturnService.php'; +require __DIR__ . '/lib/Service/PaymentIntentService.php'; +require __DIR__ . '/lib/Service/PaymentMethodService.php'; +require __DIR__ . '/lib/Service/PayoutService.php'; +require __DIR__ . '/lib/Service/PlanService.php'; +require __DIR__ . '/lib/Service/PriceService.php'; +require __DIR__ . '/lib/Service/ProductService.php'; +require __DIR__ . '/lib/Service/PromotionCodeService.php'; +require __DIR__ . '/lib/Service/Radar/EarlyFraudWarningService.php'; +require __DIR__ . '/lib/Service/Radar/ValueListService.php'; +require __DIR__ . '/lib/Service/Radar/ValueListItemService.php'; +require __DIR__ . '/lib/Service/RefundService.php'; +require __DIR__ . '/lib/Service/Reporting/ReportRunService.php'; +require __DIR__ . '/lib/Service/Reporting/ReportTypeService.php'; +require __DIR__ . '/lib/Service/ReviewService.php'; +require __DIR__ . '/lib/Service/SetupAttemptService.php'; +require __DIR__ . '/lib/Service/SetupIntentService.php'; +require __DIR__ . '/lib/Service/Sigma/ScheduledQueryRunService.php'; +require __DIR__ . '/lib/Service/SkuService.php'; +require __DIR__ . '/lib/Service/SourceService.php'; +require __DIR__ . '/lib/Service/SubscriptionService.php'; +require __DIR__ . '/lib/Service/SubscriptionItemService.php'; +require __DIR__ . '/lib/Service/SubscriptionScheduleService.php'; +require __DIR__ . '/lib/Service/TaxRateService.php'; +require __DIR__ . '/lib/Service/Terminal/ConnectionTokenService.php'; +require __DIR__ . '/lib/Service/Terminal/LocationService.php'; +require __DIR__ . '/lib/Service/Terminal/ReaderService.php'; +require __DIR__ . '/lib/Service/TokenService.php'; +require __DIR__ . '/lib/Service/TopupService.php'; +require __DIR__ . '/lib/Service/TransferService.php'; +require __DIR__ . '/lib/Service/WebhookEndpointService.php'; + +// Service factories +require __DIR__ . '/lib/Service/CoreServiceFactory.php'; +require __DIR__ . '/lib/Service/BillingPortal/BillingPortalServiceFactory.php'; +require __DIR__ . '/lib/Service/Checkout/CheckoutServiceFactory.php'; +require __DIR__ . '/lib/Service/Issuing/IssuingServiceFactory.php'; +require __DIR__ . '/lib/Service/Radar/RadarServiceFactory.php'; +require __DIR__ . '/lib/Service/Reporting/ReportingServiceFactory.php'; +require __DIR__ . '/lib/Service/Sigma/SigmaServiceFactory.php'; +require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php'; // OAuth -require(dirname(__FILE__) . '/lib/OAuth.php'); +require __DIR__ . '/lib/OAuth.php'; +require __DIR__ . '/lib/OAuthErrorObject.php'; +require __DIR__ . '/lib/Service/OAuthService.php'; // Webhooks -require(dirname(__FILE__) . '/lib/Webhook.php'); -require(dirname(__FILE__) . '/lib/WebhookEndpoint.php'); -require(dirname(__FILE__) . '/lib/WebhookSignature.php'); +require __DIR__ . '/lib/Webhook.php'; +require __DIR__ . '/lib/WebhookSignature.php'; diff --git a/htdocs/includes/stripe/stripe-php/lib/Account.php b/htdocs/includes/stripe/stripe-php/lib/Account.php index 4993ca35414..4fa789f21c7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Account.php +++ b/htdocs/includes/stripe/stripe-php/lib/Account.php @@ -1,344 +1,91 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Account + * This is an object representing a Stripe account. You can retrieve it to see + * properties on the account like its current e-mail address or if the account is + * enabled yet to make live charges. * - * @property string $id - * @property string $object - * @property mixed $business_profile - * @property string $business_type - * @property mixed $capabilities - * @property bool $charges_enabled - * @property mixed $company - * @property string $country - * @property int $created - * @property string $default_currency - * @property bool $details_submitted - * @property string $email - * @property Collection $external_accounts - * @property mixed $individual - * @property StripeObject $metadata - * @property bool $payouts_enabled - * @property mixed $requirements - * @property mixed $settings - * @property mixed $tos_acceptance - * @property string $type + * Some properties, marked below, are available only to platforms that want to <a + * href="https://stripe.com/docs/connect/accounts">create and manage Express or + * Custom accounts</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\Stripe\StripeObject $business_profile Business information about the account. + * @property null|string $business_type The business type. + * @property \Stripe\StripeObject $capabilities + * @property bool $charges_enabled Whether the account can create live charges. + * @property \Stripe\StripeObject $company + * @property string $country The account's country. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $default_currency Three-letter ISO currency code representing the default currency for the account. This must be a currency that <a href="https://stripe.com/docs/payouts">Stripe supports in the account's country</a>. + * @property bool $details_submitted Whether account details have been submitted. Standard accounts cannot receive payouts before this is true. + * @property null|string $email The primary user's email address. + * @property \Stripe\Collection $external_accounts External accounts (bank accounts and debit cards) currently attached to this account + * @property \Stripe\Person $individual <p>This is an object representing a person associated with a Stripe account.</p><p>Related guide: <a href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling Identity Verification with the API</a>.</p> + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property bool $payouts_enabled Whether Stripe can send payouts to this account. + * @property \Stripe\StripeObject $requirements + * @property null|\Stripe\StripeObject $settings Options for customizing how the account functions within Stripe. + * @property \Stripe\StripeObject $tos_acceptance + * @property string $type The Stripe account type. Can be <code>standard</code>, <code>express</code>, or <code>custom</code>. */ class Account extends ApiResource { - const OBJECT_NAME = "account"; + const OBJECT_NAME = 'account'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Delete; use ApiOperations\NestedResource; + use ApiOperations\Update; + + const BUSINESS_TYPE_COMPANY = 'company'; + const BUSINESS_TYPE_GOVERNMENT_ENTITY = 'government_entity'; + const BUSINESS_TYPE_INDIVIDUAL = 'individual'; + const BUSINESS_TYPE_NON_PROFIT = 'non_profit'; + + const CAPABILITY_CARD_PAYMENTS = 'card_payments'; + const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments'; + const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments'; + const CAPABILITY_TRANSFERS = 'transfers'; + + const CAPABILITY_STATUS_ACTIVE = 'active'; + const CAPABILITY_STATUS_INACTIVE = 'inactive'; + const CAPABILITY_STATUS_PENDING = 'pending'; + + const TYPE_CUSTOM = 'custom'; + const TYPE_EXPRESS = 'express'; + const TYPE_STANDARD = 'standard'; + use ApiOperations\Retrieve { retrieve as protected _retrieve; } - use ApiOperations\Update; - - /** - * Possible string representations of an account's business type. - * @link https://stripe.com/docs/api/accounts/object#account_object-business_type - */ - const BUSINESS_TYPE_COMPANY = 'company'; - const BUSINESS_TYPE_INDIVIDUAL = 'individual'; - - /** - * Possible string representations of an account's capabilities. - * @link https://stripe.com/docs/api/accounts/object#account_object-capabilities - */ - const CAPABILITY_CARD_PAYMENTS = 'card_payments'; - const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments'; - const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments'; - - /** - * Possible string representations of an account's capability status. - * @link https://stripe.com/docs/api/accounts/object#account_object-capabilities - */ - const CAPABILITY_STATUS_ACTIVE = 'active'; - const CAPABILITY_STATUS_INACTIVE = 'inactive'; - const CAPABILITY_STATUS_PENDING = 'pending'; - - /** - * Possible string representations of an account's type. - * @link https://stripe.com/docs/api/accounts/object#account_object-type - */ - const TYPE_CUSTOM = 'custom'; - const TYPE_EXPRESS = 'express'; - const TYPE_STANDARD = 'standard'; public static function getSavedNestedResources() { static $savedNestedResources = null; - if ($savedNestedResources === null) { + if (null === $savedNestedResources) { $savedNestedResources = new Util\Set([ 'external_account', 'bank_account', ]); } + return $savedNestedResources; } - const PATH_CAPABILITIES = '/capabilities'; - const PATH_EXTERNAL_ACCOUNTS = '/external_accounts'; - const PATH_LOGIN_LINKS = '/login_links'; - const PATH_PERSONS = '/persons'; - public function instanceUrl() { - if ($this['id'] === null) { + if (null === $this['id']) { return '/v1/account'; - } else { - return parent::instanceUrl(); } - } - /** - * @param array|string|null $id The ID of the account to retrieve, or an - * options array containing an `id` key. - * @param array|string|null $opts - * - * @return Account - */ - public static function retrieve($id = null, $opts = null) - { - if (!$opts && is_string($id) && substr($id, 0, 3) === 'sk_') { - $opts = $id; - $id = null; - } - return self::_retrieve($id, $opts); - } - - /** - * @param array|null $params - * @param array|string|null $opts - * - * @return Account The rejected account. - */ - public function reject($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/reject'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $clientId - * @param array|string|null $opts - * - * @return StripeObject Object containing the response from the API. - */ - public function deauthorize($clientId = null, $opts = null) - { - $params = [ - 'client_id' => $clientId, - 'stripe_user_id' => $this->id, - ]; - return OAuth::deauthorize($params, $opts); - } - - /* - * Capabilities methods - * We can not add the capabilities() method today as the Account object already has a - * capabilities property which is a hash and not the sub-list of capabilities. - */ - - - /** - * @param string $id The ID of the account to which the capability belongs. - * @param string $capabilityId The ID of the capability to retrieve. - * @param array|null $params - * @param array|string|null $opts - * - * @return Capability - */ - public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the capability belongs. - * @param string $capabilityId The ID of the capability to update. - * @param array|null $params - * @param array|string|null $opts - * - * @return Capability - */ - public static function updateCapability($id, $capabilityId, $params = null, $opts = null) - { - return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); - } - - /** - * @param string $id The ID of the account on which to retrieve the capabilities. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of capabilities. - */ - public static function allCapabilities($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts); - } - - /** - * @param string $id The ID of the account on which to create the external account. - * @param array|null $params - * @param array|string|null $opts - * - * @return BankAccount|Card - */ - public static function createExternalAccount($id, $params = null, $opts = null) - { - return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the external account belongs. - * @param string $externalAccountId The ID of the external account to retrieve. - * @param array|null $params - * @param array|string|null $opts - * - * @return BankAccount|Card - */ - public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the external account belongs. - * @param string $externalAccountId The ID of the external account to update. - * @param array|null $params - * @param array|string|null $opts - * - * @return BankAccount|Card - */ - public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null) - { - return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the external account belongs. - * @param string $externalAccountId The ID of the external account to delete. - * @param array|null $params - * @param array|string|null $opts - * - * @return BankAccount|Card - */ - public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null) - { - return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); - } - - /** - * @param string $id The ID of the account on which to retrieve the external accounts. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of external accounts (BankAccount or Card). - */ - public static function allExternalAccounts($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); - } - - /** - * @param string $id The ID of the account on which to create the login link. - * @param array|null $params - * @param array|string|null $opts - * - * @return LoginLink - */ - public static function createLoginLink($id, $params = null, $opts = null) - { - return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts); - } - - /** - * @param array|null $params - * @param array|string|null $options - * - * @return Collection The list of persons. - */ - public function persons($params = null, $options = null) - { - $url = $this->instanceUrl() . '/persons'; - list($response, $opts) = $this->_request('get', $url, $params, $options); - $obj = Util\Util::convertToStripeObject($response, $opts); - $obj->setLastResponse($response); - return $obj; - } - - /** - * @param string $id The ID of the account on which to create the person. - * @param array|null $params - * @param array|string|null $opts - * - * @return Person - */ - public static function createPerson($id, $params = null, $opts = null) - { - return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the person belongs. - * @param string $personId The ID of the person to retrieve. - * @param array|null $params - * @param array|string|null $opts - * - * @return Person - */ - public static function retrievePerson($id, $personId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the person belongs. - * @param string $personId The ID of the person to update. - * @param array|null $params - * @param array|string|null $opts - * - * @return Person - */ - public static function updatePerson($id, $personId, $params = null, $opts = null) - { - return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); - } - - /** - * @param string $id The ID of the account to which the person belongs. - * @param string $personId The ID of the person to delete. - * @param array|null $params - * @param array|string|null $opts - * - * @return Person - */ - public static function deletePerson($id, $personId, $params = null, $opts = null) - { - return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); - } - - /** - * @param string $id The ID of the account on which to retrieve the persons. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of persons. - */ - public static function allPersons($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts); + return parent::instanceUrl(); } public function serializeParameters($force = false) @@ -359,6 +106,7 @@ class Account extends ApiResource $update['individual'] = $individual->serializeParameters($force); } } + return $update; } @@ -369,9 +117,9 @@ class Account extends ApiResource } else { $originalValue = []; } - if (($originalValue) && (count($originalValue) > count($additionalOwners))) { - throw new \InvalidArgumentException( - "You cannot delete an item from an array, you must instead set a new array" + if (($originalValue) && (\count($originalValue) > \count($additionalOwners))) { + throw new Exception\InvalidArgumentException( + 'You cannot delete an item from an array, you must instead set a new array' ); } @@ -379,14 +127,305 @@ class Account extends ApiResource foreach ($additionalOwners as $i => $v) { $update = ($v instanceof StripeObject) ? $v->serializeParameters() : $v; - if ($update !== []) { - if (!$originalValue || - !array_key_exists($i, $originalValue) || - ($update != $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) { + if ([] !== $update) { + if (!$originalValue + || !\array_key_exists($i, $originalValue) + || ($update !== $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) { $updateArr[$i] = $update; } } } + return $updateArr; } + + /** + * @param null|array|string $id the ID of the account to retrieve, or an + * options array containing an `id` key + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public static function retrieve($id = null, $opts = null) + { + if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) { + $opts = $id; + $id = null; + } + + return self::_retrieve($id, $opts); + } + + /** + * @param null|array $clientId + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\StripeObject object containing the response from the API + */ + public function deauthorize($clientId = null, $opts = null) + { + $params = [ + 'client_id' => $clientId, + 'stripe_user_id' => $this->id, + ]; + + return OAuth::deauthorize($params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of persons + */ + public function persons($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/persons'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Account the rejected account + */ + public function reject($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/reject'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /* + * Capabilities methods + * We can not add the capabilities() method today as the Account object already has a + * capabilities property which is a hash and not the sub-list of capabilities. + */ + + const PATH_CAPABILITIES = '/capabilities'; + + /** + * @param string $id the ID of the account on which to retrieve the capabilities + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of capabilities + */ + public static function allCapabilities($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_CAPABILITIES, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the capability belongs + * @param string $capabilityId the ID of the capability to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Capability + */ + public static function retrieveCapability($id, $capabilityId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the capability belongs + * @param string $capabilityId the ID of the capability to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Capability + */ + public static function updateCapability($id, $capabilityId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_CAPABILITIES, $capabilityId, $params, $opts); + } + + const PATH_EXTERNAL_ACCOUNTS = '/external_accounts'; + + /** + * @param string $id the ID of the account on which to retrieve the external accounts + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of external accounts (BankAccount or Card) + */ + public static function allExternalAccounts($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); + } + + /** + * @param string $id the ID of the account on which to create the external account + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public static function createExternalAccount($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public static function retrieveExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the external account belongs + * @param string $externalAccountId the ID of the external account to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public static function updateExternalAccount($id, $externalAccountId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts); + } + + const PATH_LOGIN_LINKS = '/login_links'; + + /** + * @param string $id the ID of the account on which to create the login link + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\LoginLink + */ + public static function createLoginLink($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_LOGIN_LINKS, $params, $opts); + } + + const PATH_PERSONS = '/persons'; + + /** + * @param string $id the ID of the account on which to retrieve the persons + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of persons + */ + public static function allPersons($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_PERSONS, $params, $opts); + } + + /** + * @param string $id the ID of the account on which to create the person + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public static function createPerson($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_PERSONS, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public static function deletePerson($id, $personId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public static function retrievePerson($id, $personId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } + + /** + * @param string $id the ID of the account to which the person belongs + * @param string $personId the ID of the person to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public static function updatePerson($id, $personId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_PERSONS, $personId, $params, $opts); + } } diff --git a/htdocs/includes/stripe/stripe-php/lib/AccountLink.php b/htdocs/includes/stripe/stripe-php/lib/AccountLink.php index 692447dbf69..24a9e68aa52 100644 --- a/htdocs/includes/stripe/stripe-php/lib/AccountLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/AccountLink.php @@ -1,20 +1,26 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class AccountLink + * Account Links are the means by which a Connect platform grants a connected + * account permission to access Stripe-hosted applications, such as Connect + * Onboarding. * - * @property string $object - * @property int $created - * @property int $expires_at - * @property string $url + * Related guide: <a + * href="https://stripe.com/docs/connect/connect-onboarding">Connect + * Onboarding</a>. * - * @package Stripe + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $expires_at The timestamp at which this account link will expire. + * @property string $url The URL for the account link. */ class AccountLink extends ApiResource { - const OBJECT_NAME = "account_link"; + const OBJECT_NAME = 'account_link'; use ApiOperations\Create; } diff --git a/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php b/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php index a79705fa4eb..1d6a5096fff 100644 --- a/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php +++ b/htdocs/includes/stripe/stripe-php/lib/AlipayAccount.php @@ -3,16 +3,14 @@ namespace Stripe; /** - * Class AlipayAccount - * - * @package Stripe + * Class AlipayAccount. * * @deprecated Alipay accounts are deprecated. Please use the sources API instead. - * @link https://stripe.com/docs/sources/alipay + * @see https://stripe.com/docs/sources/alipay */ class AlipayAccount extends ApiResource { - const OBJECT_NAME = "alipay_account"; + const OBJECT_NAME = 'alipay_account'; use ApiOperations\Delete; use ApiOperations\Update; @@ -28,44 +26,50 @@ class AlipayAccount extends ApiResource $parent = $this['customer']; $path = 'sources'; } else { - $msg = "Alipay accounts cannot be accessed without a customer ID."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Alipay accounts cannot be accessed without a customer ID.'; + + throw new Exception\UnexpectedValueException($msg); } - $parentExtn = urlencode(Util\Util::utf8($parent)); - $extn = urlencode(Util\Util::utf8($this['id'])); - return "$base/$parentExtn/$path/$extn"; + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException * * @deprecated Alipay accounts are deprecated. Please use the sources API instead. - * @link https://stripe.com/docs/sources/alipay + * @see https://stripe.com/docs/sources/alipay */ public static function retrieve($_id, $_opts = null) { - $msg = "Alipay accounts cannot be accessed without a customer ID. " . - "Retrieve an Alipay account using \$customer->sources->retrieve('alipay_account_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Alipay accounts cannot be retrieved without a customer ID. ' . + 'Retrieve an Alipay account using `Customer::retrieveSource(' . + "'customer_id', 'alipay_account_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException * * @deprecated Alipay accounts are deprecated. Please use the sources API instead. - * @link https://stripe.com/docs/sources/alipay + * @see https://stripe.com/docs/sources/alipay */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Alipay accounts cannot be accessed without a customer ID. " . - "Call save() on \$customer->sources->retrieve('alipay_account_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Alipay accounts cannot be updated without a customer ID. ' . + 'Update an Alipay account using `Customer::updateSource(' . + "'customer_id', 'alipay_account_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php index 2762748f95f..ff2955d186f 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/All.php @@ -10,8 +10,10 @@ namespace Stripe\ApiOperations; trait All { /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\Collection of ApiResources */ @@ -22,13 +24,14 @@ trait All list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); - if (!is_a($obj, 'Stripe\\Collection')) { - $class = get_class($obj); - $message = "Expected type \"Stripe\\Collection\", got \"$class\" instead"; - throw new \Stripe\Error\Api($message); + if (!($obj instanceof \Stripe\Collection)) { + throw new \Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.' + ); } $obj->setLastResponse($response); - $obj->setRequestParams($params); + $obj->setFilters($params); + return $obj; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php index 4ec66703f56..c4351321d4b 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Create.php @@ -10,10 +10,12 @@ namespace Stripe\ApiOperations; trait Create { /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $options * - * @return static The created resource. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return static the created resource */ public static function create($params = null, $options = null) { @@ -23,6 +25,7 @@ trait Create list($response, $opts) = static::_staticRequest('post', $url, $params, $options); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); + return $obj; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php index 9581765b8af..c6082ff9f4d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Delete.php @@ -10,10 +10,12 @@ namespace Stripe\ApiOperations; trait Delete { /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return static The deleted resource. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return static the deleted resource */ public function delete($params = null, $opts = null) { @@ -22,6 +24,7 @@ trait Delete $url = $this->instanceUrl(); list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php index 2122354362f..180cacd2ccc 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/NestedResource.php @@ -12,8 +12,8 @@ trait NestedResource /** * @param string $method * @param string $url - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $options * * @return \Stripe\StripeObject */ @@ -24,95 +24,112 @@ trait NestedResource list($response, $opts) = static::_staticRequest($method, $url, $params, $options); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); + return $obj; } /** * @param string $id * @param string $nestedPath - * @param string|null $nestedId + * @param null|string $nestedId * * @return string */ protected static function _nestedResourceUrl($id, $nestedPath, $nestedId = null) { $url = static::resourceUrl($id) . $nestedPath; - if ($nestedId !== null) { - $url .= "/$nestedId"; + if (null !== $nestedId) { + $url .= "/{$nestedId}"; } + return $url; } /** * @param string $id * @param string $nestedPath - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\StripeObject */ protected static function _createNestedResource($id, $nestedPath, $params = null, $options = null) { $url = static::_nestedResourceUrl($id, $nestedPath); + return self::_nestedResourceOperation('post', $url, $params, $options); } /** * @param string $id * @param string $nestedPath - * @param string|null $nestedId - * @param array|null $params - * @param array|string|null $options + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\StripeObject */ protected static function _retrieveNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) { $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + return self::_nestedResourceOperation('get', $url, $params, $options); } /** * @param string $id * @param string $nestedPath - * @param string|null $nestedId - * @param array|null $params - * @param array|string|null $options + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\StripeObject */ protected static function _updateNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) { $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + return self::_nestedResourceOperation('post', $url, $params, $options); } /** * @param string $id * @param string $nestedPath - * @param string|null $nestedId - * @param array|null $params - * @param array|string|null $options + * @param null|string $nestedId + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\StripeObject */ protected static function _deleteNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null) { $url = static::_nestedResourceUrl($id, $nestedPath, $nestedId); + return self::_nestedResourceOperation('delete', $url, $params, $options); } /** * @param string $id * @param string $nestedPath - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return \Stripe\StripeObject */ protected static function _allNestedResources($id, $nestedPath, $params = null, $options = null) { $url = static::_nestedResourceUrl($id, $nestedPath); + return self::_nestedResourceOperation('get', $url, $params, $options); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php index dd048dc5f5c..e300dc13fbb 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Request.php @@ -10,18 +10,19 @@ namespace Stripe\ApiOperations; trait Request { /** - * @param array|null|mixed $params The list of parameters to validate + * @param null|array|mixed $params The list of parameters to validate * - * @throws \Stripe\Error\Api if $params exists and is not an array + * @throws \Stripe\Exception\InvalidArgumentException if $params exists and is not an array */ protected static function _validateParams($params = null) { - if ($params && !is_array($params)) { - $message = "You must pass an array as the first argument to Stripe API " - . "method calls. (HINT: an example call to create a charge " + if ($params && !\is_array($params)) { + $message = 'You must pass an array as the first argument to Stripe API ' + . 'method calls. (HINT: an example call to create a charge ' . "would be: \"Stripe\\Charge::create(['amount' => 100, " . "'currency' => 'usd', 'source' => 'tok_1234'])\")"; - throw new \Stripe\Error\Api($message); + + throw new \Stripe\Exception\InvalidArgumentException($message); } } @@ -29,7 +30,9 @@ trait Request * @param string $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param array $params list of parameters for the request - * @param array|string|null $options + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return array tuple containing (the JSON response, $options) */ @@ -38,6 +41,7 @@ trait Request $opts = $this->_opts->merge($options); list($resp, $options) = static::_staticRequest($method, $url, $params, $opts); $this->setLastResponse($resp); + return [$resp->json, $options]; } @@ -45,7 +49,9 @@ trait Request * @param string $method HTTP method ('get', 'post', etc.) * @param string $url URL for the request * @param array $params list of parameters for the request - * @param array|string|null $options + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return array tuple containing (the JSON response, $options) */ @@ -56,6 +62,7 @@ trait Request $requestor = new \Stripe\ApiRequestor($opts->apiKey, $baseUrl); list($response, $opts->apiKey) = $requestor->request($method, $url, $params, $opts->headers); $opts->discardNonPersistentHeaders(); + return [$response, $opts]; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php index ed52296b75b..5170afb327c 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Retrieve.php @@ -11,9 +11,11 @@ namespace Stripe\ApiOperations; trait Retrieve { /** - * @param array|string $id The ID of the API resource to retrieve, - * or an options array containing an `id` key. - * @param array|string|null $opts + * @param array|string $id the ID of the API resource to retrieve, + * or an options array containing an `id` key + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails * * @return static */ @@ -22,6 +24,7 @@ trait Retrieve $opts = \Stripe\Util\RequestOptions::parse($opts); $instance = new static($id, $opts); $instance->refresh(); + return $instance; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php index e17db280faa..688f0808a79 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiOperations/Update.php @@ -11,11 +11,13 @@ namespace Stripe\ApiOperations; trait Update { /** - * @param string $id The ID of the resource to update. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the resource to update + * @param null|array $params + * @param null|array|string $opts * - * @return static The updated resource. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return static the updated resource */ public static function update($id, $params = null, $opts = null) { @@ -25,22 +27,26 @@ trait Update list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); + return $obj; } /** - * @param array|string|null $opts + * @param null|array|string $opts * - * @return static The saved resource. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return static the saved resource */ public function save($opts = null) { $params = $this->serializeParameters(); - if (count($params) > 0) { + if (\count($params) > 0) { $url = $this->instanceUrl(); list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); } + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php b/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php index 1f75a007b32..048c462c066 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiRequestor.php @@ -3,14 +3,12 @@ namespace Stripe; /** - * Class ApiRequestor - * - * @package Stripe + * Class ApiRequestor. */ class ApiRequestor { /** - * @var string|null + * @var null|string */ private $_apiKey; @@ -29,11 +27,13 @@ class ApiRequestor */ private static $requestTelemetry; + private static $OPTIONS_KEYS = ['api_key', 'idempotency_key', 'stripe_account', 'stripe_version', 'api_base']; + /** * ApiRequestor constructor. * - * @param string|null $apiKey - * @param string|null $apiBase + * @param null|string $apiKey + * @param null|string $apiBase */ public function __construct($apiKey = null, $apiBase = null) { @@ -45,77 +45,71 @@ class ApiRequestor } /** - * Creates a telemetry json blob for use in 'X-Stripe-Client-Telemetry' headers + * Creates a telemetry json blob for use in 'X-Stripe-Client-Telemetry' headers. + * * @static * * @param RequestTelemetry $requestTelemetry + * * @return string */ private static function _telemetryJson($requestTelemetry) { - $payload = array( - 'last_request_metrics' => array( + $payload = [ + 'last_request_metrics' => [ 'request_id' => $requestTelemetry->requestId, 'request_duration_ms' => $requestTelemetry->requestDuration, - )); + ], + ]; - $result = json_encode($payload); - if ($result != false) { + $result = \json_encode($payload); + if (false !== $result) { return $result; - } else { - Stripe::getLogger()->error("Serializing telemetry payload failed!"); - return "{}"; } + Stripe::getLogger()->error('Serializing telemetry payload failed!'); + + return '{}'; } /** * @static * - * @param ApiResource|bool|array|mixed $d + * @param ApiResource|array|bool|mixed $d * - * @return ApiResource|array|string|mixed + * @return ApiResource|array|mixed|string */ private static function _encodeObjects($d) { if ($d instanceof ApiResource) { return Util\Util::utf8($d->id); - } elseif ($d === true) { + } + if (true === $d) { return 'true'; - } elseif ($d === false) { + } + if (false === $d) { return 'false'; - } elseif (is_array($d)) { + } + if (\is_array($d)) { $res = []; foreach ($d as $k => $v) { $res[$k] = self::_encodeObjects($v); } + return $res; - } else { - return Util\Util::utf8($d); } + + return Util\Util::utf8($d); } /** * @param string $method * @param string $url - * @param array|null $params - * @param array|null $headers + * @param null|array $params + * @param null|array $headers * - * @return array An array whose first element is an API response and second - * element is the API key used to make the request. - * @throws Error\Api - * @throws Error\Authentication - * @throws Error\Card - * @throws Error\InvalidRequest - * @throws Error\OAuth\InvalidClient - * @throws Error\OAuth\InvalidGrant - * @throws Error\OAuth\InvalidRequest - * @throws Error\OAuth\InvalidScope - * @throws Error\OAuth\UnsupportedGrantType - * @throws Error\OAuth\UnsupportedResponseType - * @throws Error\Permission - * @throws Error\RateLimit - * @throws Error\Idempotency - * @throws Error\ApiConnection + * @throws Exception\ApiErrorException + * + * @return array tuple containing (ApiReponse, API key) */ public function request($method, $url, $params = null, $headers = null) { @@ -125,48 +119,32 @@ class ApiRequestor $this->_requestRaw($method, $url, $params, $headers); $json = $this->_interpretResponse($rbody, $rcode, $rheaders); $resp = new ApiResponse($rbody, $rcode, $rheaders, $json); + return [$resp, $myApiKey]; } /** - * @param string $rbody A JSON string. + * @param string $rbody a JSON string * @param int $rcode * @param array $rheaders * @param array $resp * - * @throws Error\InvalidRequest if the error is caused by the user. - * @throws Error\Authentication if the error is caused by a lack of - * permissions. - * @throws Error\Permission if the error is caused by insufficient - * permissions. - * @throws Error\Card if the error is the error code is 402 (payment - * required) - * @throws Error\InvalidRequest if the error is caused by the user. - * @throws Error\Idempotency if the error is caused by an idempotency key. - * @throws Error\OAuth\InvalidClient - * @throws Error\OAuth\InvalidGrant - * @throws Error\OAuth\InvalidRequest - * @throws Error\OAuth\InvalidScope - * @throws Error\OAuth\UnsupportedGrantType - * @throws Error\OAuth\UnsupportedResponseType - * @throws Error\Permission if the error is caused by insufficient - * permissions. - * @throws Error\RateLimit if the error is caused by too many requests - * hitting the API. - * @throws Error\Api otherwise. + * @throws Exception\UnexpectedValueException + * @throws Exception\ApiErrorException */ public function handleErrorResponse($rbody, $rcode, $rheaders, $resp) { - if (!is_array($resp) || !isset($resp['error'])) { - $msg = "Invalid response object from API: $rbody " - . "(HTTP response code was $rcode)"; - throw new Error\Api($msg, $rcode, $rbody, $resp, $rheaders); + if (!\is_array($resp) || !isset($resp['error'])) { + $msg = "Invalid response object from API: {$rbody} " + . "(HTTP response code was {$rcode})"; + + throw new Exception\UnexpectedValueException($msg); } $errorData = $resp['error']; $error = null; - if (is_string($errorData)) { + if (\is_string($errorData)) { $error = self::_specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorData); } if (!$error) { @@ -185,7 +163,7 @@ class ApiRequestor * @param array $resp * @param array $errorData * - * @return Error\RateLimit|Error\Idempotency|Error\InvalidRequest|Error\Authentication|Error\Card|Error\Permission|Error\Api + * @return Exception\ApiErrorException */ private static function _specificAPIError($rbody, $rcode, $rheaders, $resp, $errorData) { @@ -193,44 +171,50 @@ class ApiRequestor $param = isset($errorData['param']) ? $errorData['param'] : null; $code = isset($errorData['code']) ? $errorData['code'] : null; $type = isset($errorData['type']) ? $errorData['type'] : null; + $declineCode = isset($errorData['decline_code']) ? $errorData['decline_code'] : null; switch ($rcode) { case 400: // 'rate_limit' code is deprecated, but left here for backwards compatibility // for API versions earlier than 2015-09-08 - if ($code == 'rate_limit') { - return new Error\RateLimit($msg, $param, $rcode, $rbody, $resp, $rheaders); + if ('rate_limit' === $code) { + return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); } - if ($type == 'idempotency_error') { - return new Error\Idempotency($msg, $rcode, $rbody, $resp, $rheaders); + if ('idempotency_error' === $type) { + return Exception\IdempotencyException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); } // no break case 404: - return new Error\InvalidRequest($msg, $param, $rcode, $rbody, $resp, $rheaders); + return Exception\InvalidRequestException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); + case 401: - return new Error\Authentication($msg, $rcode, $rbody, $resp, $rheaders); + return Exception\AuthenticationException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + case 402: - return new Error\Card($msg, $param, $code, $rcode, $rbody, $resp, $rheaders); + return Exception\CardException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $declineCode, $param); + case 403: - return new Error\Permission($msg, $rcode, $rbody, $resp, $rheaders); + return Exception\PermissionException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); + case 429: - return new Error\RateLimit($msg, $param, $rcode, $rbody, $resp, $rheaders); + return Exception\RateLimitException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code, $param); + default: - return new Error\Api($msg, $rcode, $rbody, $resp, $rheaders); + return Exception\UnknownApiErrorException::factory($msg, $rcode, $rbody, $resp, $rheaders, $code); } } /** * @static * - * @param string|bool $rbody + * @param bool|string $rbody * @param int $rcode * @param array $rheaders * @param array $resp * @param string $errorCode * - * @return null|Error\OAuth\InvalidClient|Error\OAuth\InvalidGrant|Error\OAuth\InvalidRequest|Error\OAuth\InvalidScope|Error\OAuth\UnsupportedGrantType|Error\OAuth\UnsupportedResponseType + * @return Exception\OAuth\OAuthErrorException */ private static function _specificOAuthError($rbody, $rcode, $rheaders, $resp, $errorCode) { @@ -238,20 +222,26 @@ class ApiRequestor switch ($errorCode) { case 'invalid_client': - return new Error\OAuth\InvalidClient($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - case 'invalid_grant': - return new Error\OAuth\InvalidGrant($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - case 'invalid_request': - return new Error\OAuth\InvalidRequest($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - case 'invalid_scope': - return new Error\OAuth\InvalidScope($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - case 'unsupported_grant_type': - return new Error\OAuth\UnsupportedGrantType($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - case 'unsupported_response_type': - return new Error\OAuth\UnsupportedResponseType($errorCode, $description, $rcode, $rbody, $resp, $rheaders); - } + return Exception\OAuth\InvalidClientException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); - return null; + case 'invalid_grant': + return Exception\OAuth\InvalidGrantException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'invalid_request': + return Exception\OAuth\InvalidRequestException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'invalid_scope': + return Exception\OAuth\InvalidScopeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'unsupported_grant_type': + return Exception\OAuth\UnsupportedGrantTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + case 'unsupported_response_type': + return Exception\OAuth\UnsupportedResponseTypeException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + + default: + return Exception\OAuth\UnknownOAuthErrorException::factory($description, $rcode, $rbody, $resp, $rheaders, $errorCode); + } } /** @@ -263,18 +253,40 @@ class ApiRequestor */ private static function _formatAppInfo($appInfo) { - if ($appInfo !== null) { + if (null !== $appInfo) { $string = $appInfo['name']; - if ($appInfo['version'] !== null) { + if (null !== $appInfo['version']) { $string .= '/' . $appInfo['version']; } - if ($appInfo['url'] !== null) { + if (null !== $appInfo['url']) { $string .= ' (' . $appInfo['url'] . ')'; } + return $string; - } else { - return null; } + + return null; + } + + /** + * @static + * + * @param string $disabledFunctionsOutput - String value of the 'disable_function' setting, as output by \ini_get('disable_functions') + * @param string $functionName - Name of the function we are interesting in seeing whether or not it is disabled + * @param mixed $disableFunctionsOutput + * + * @return bool + */ + private static function _isDisabled($disableFunctionsOutput, $functionName) + { + $disabledFunctions = \explode(',', $disableFunctionsOutput); + foreach ($disabledFunctions as $disabledFunction) { + if (\trim($disabledFunction) === $functionName) { + return true; + } + } + + return false; } /** @@ -289,8 +301,9 @@ class ApiRequestor { $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION; - $langVersion = phpversion(); - $uname = php_uname(); + $langVersion = \PHP_VERSION; + $uname_disabled = static::_isDisabled(\ini_get('disable_functions'), 'php_uname'); + $uname = $uname_disabled ? '(disabled)' : \php_uname(); $appInfo = Stripe::getAppInfo(); $ua = [ @@ -301,31 +314,30 @@ class ApiRequestor 'uname' => $uname, ]; if ($clientInfo) { - $ua = array_merge($clientInfo, $ua); + $ua = \array_merge($clientInfo, $ua); } - if ($appInfo !== null) { + if (null !== $appInfo) { $uaString .= ' ' . self::_formatAppInfo($appInfo); $ua['application'] = $appInfo; } - $defaultHeaders = [ - 'X-Stripe-Client-User-Agent' => json_encode($ua), + return [ + 'X-Stripe-Client-User-Agent' => \json_encode($ua), 'User-Agent' => $uaString, 'Authorization' => 'Bearer ' . $apiKey, ]; - return $defaultHeaders; } /** * @param string $method * @param string $url - * @param array $params - * @param array $headers + * @param array $params + * @param array $headers + * + * @throws Exception\AuthenticationException + * @throws Exception\ApiConnectionException * * @return array - * @throws Error\Api - * @throws Error\ApiConnection - * @throws Error\Authentication */ private function _requestRaw($method, $url, $params, $headers) { @@ -339,18 +351,34 @@ class ApiRequestor . '"Stripe::setApiKey(<API-KEY>)". You can generate API keys from ' . 'the Stripe web interface. See https://stripe.com/api for ' . 'details, or email support@stripe.com if you have any questions.'; - throw new Error\Authentication($msg); + + throw new Exception\AuthenticationException($msg); } // Clients can supply arbitrary additional keys to be included in the // X-Stripe-Client-User-Agent header via the optional getUserAgentInfo() // method $clientUAInfo = null; - if (method_exists($this->httpClient(), 'getUserAgentInfo')) { + if (\method_exists($this->httpClient(), 'getUserAgentInfo')) { $clientUAInfo = $this->httpClient()->getUserAgentInfo(); } - $absUrl = $this->_apiBase.$url; + if ($params && \is_array($params)) { + $optionKeysInParams = \array_filter( + static::$OPTIONS_KEYS, + function ($key) use ($params) { + return \array_key_exists($key, $params); + } + ); + if (\count($optionKeysInParams) > 0) { + $message = \sprintf('Options found in $params: %s. Options should ' + . 'be passed in their own array after $params. (HINT: pass an ' + . 'empty array to $params if you do not have any.)', \implode(', ', $optionKeysInParams)); + \trigger_error($message, \E_USER_WARNING); + } + } + + $absUrl = $this->_apiBase . $url; $params = self::_encodeObjects($params); $defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo); if (Stripe::$apiVersion) { @@ -361,17 +389,16 @@ class ApiRequestor $defaultHeaders['Stripe-Account'] = Stripe::$accountId; } - if (Stripe::$enableTelemetry && self::$requestTelemetry != null) { - $defaultHeaders["X-Stripe-Client-Telemetry"] = self::_telemetryJson(self::$requestTelemetry); + if (Stripe::$enableTelemetry && null !== self::$requestTelemetry) { + $defaultHeaders['X-Stripe-Client-Telemetry'] = self::_telemetryJson(self::$requestTelemetry); } $hasFile = false; - $hasCurlFile = class_exists('\CURLFile', false); foreach ($params as $k => $v) { - if (is_resource($v)) { + if (\is_resource($v)) { $hasFile = true; - $params[$k] = self::_processResourceParam($v, $hasCurlFile); - } elseif ($hasCurlFile && $v instanceof \CURLFile) { + $params[$k] = self::_processResourceParam($v); + } elseif ($v instanceof \CURLFile) { $hasFile = true; } } @@ -382,7 +409,7 @@ class ApiRequestor $defaultHeaders['Content-Type'] = 'application/x-www-form-urlencoded'; } - $combinedHeaders = array_merge($defaultHeaders, $headers); + $combinedHeaders = \array_merge($defaultHeaders, $headers); $rawHeaders = []; foreach ($combinedHeaders as $header => $value) { @@ -399,7 +426,9 @@ class ApiRequestor $hasFile ); - if (array_key_exists('request-id', $rheaders)) { + if (isset($rheaders['request-id']) + && \is_string($rheaders['request-id']) + && \strlen($rheaders['request-id']) > 0) { self::$requestTelemetry = new RequestTelemetry( $rheaders['request-id'], Util\Util::currentTimeMillis() - $requestStartMs @@ -411,32 +440,28 @@ class ApiRequestor /** * @param resource $resource - * @param bool $hasCurlFile + * + * @throws Exception\InvalidArgumentException * * @return \CURLFile|string - * @throws Error\Api */ - private function _processResourceParam($resource, $hasCurlFile) + private function _processResourceParam($resource) { - if (get_resource_type($resource) !== 'stream') { - throw new Error\Api( + if ('stream' !== \get_resource_type($resource)) { + throw new Exception\InvalidArgumentException( 'Attempted to upload a resource that is not a stream' ); } - $metaData = stream_get_meta_data($resource); - if ($metaData['wrapper_type'] !== 'plainfile') { - throw new Error\Api( + $metaData = \stream_get_meta_data($resource); + if ('plainfile' !== $metaData['wrapper_type']) { + throw new Exception\InvalidArgumentException( 'Only plainfile resource streams are supported' ); } - if ($hasCurlFile) { - // We don't have the filename or mimetype, but the API doesn't care - return new \CURLFile($metaData['uri']); - } else { - return '@'.$metaData['uri']; - } + // We don't have the filename or mimetype, but the API doesn't care + return new \CURLFile($metaData['uri']); } /** @@ -444,34 +469,26 @@ class ApiRequestor * @param int $rcode * @param array $rheaders * - * @return mixed - * @throws Error\Api - * @throws Error\Authentication - * @throws Error\Card - * @throws Error\InvalidRequest - * @throws Error\OAuth\InvalidClient - * @throws Error\OAuth\InvalidGrant - * @throws Error\OAuth\InvalidRequest - * @throws Error\OAuth\InvalidScope - * @throws Error\OAuth\UnsupportedGrantType - * @throws Error\OAuth\UnsupportedResponseType - * @throws Error\Permission - * @throws Error\RateLimit - * @throws Error\Idempotency + * @throws Exception\UnexpectedValueException + * @throws Exception\ApiErrorException + * + * @return array */ private function _interpretResponse($rbody, $rcode, $rheaders) { - $resp = json_decode($rbody, true); - $jsonError = json_last_error(); - if ($resp === null && $jsonError !== JSON_ERROR_NONE) { - $msg = "Invalid response body from API: $rbody " - . "(HTTP response code was $rcode, json_last_error() was $jsonError)"; - throw new Error\Api($msg, $rcode, $rbody); + $resp = \json_decode($rbody, true); + $jsonError = \json_last_error(); + if (null === $resp && \JSON_ERROR_NONE !== $jsonError) { + $msg = "Invalid response body from API: {$rbody} " + . "(HTTP response code was {$rcode}, json_last_error() was {$jsonError})"; + + throw new Exception\UnexpectedValueException($msg, $rcode); } if ($rcode < 200 || $rcode >= 300) { $this->handleErrorResponse($rbody, $rcode, $rheaders, $resp); } + return $resp; } @@ -503,6 +520,7 @@ class ApiRequestor if (!self::$_httpClient) { self::$_httpClient = HttpClient\CurlClient::instance(); } + return self::$_httpClient; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiResource.php b/htdocs/includes/stripe/stripe-php/lib/ApiResource.php index fe594321687..521010b3f7c 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiResource.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiResource.php @@ -3,9 +3,7 @@ namespace Stripe; /** - * Class ApiResource - * - * @package Stripe + * Class ApiResource. */ abstract class ApiResource extends StripeObject { @@ -21,14 +19,15 @@ abstract class ApiResource extends StripeObject public static function getSavedNestedResources() { static $savedNestedResources = null; - if ($savedNestedResources === null) { + if (null === $savedNestedResources) { $savedNestedResources = new Util\Set(); } + return $savedNestedResources; } /** - * @var boolean A flag that can be set a behavior that will cause this + * @var bool A flag that can be set a behavior that will cause this * resource to be encoded and sent up along with an update of its parent * resource. This is usually not desirable because resources are updated * individually on their own endpoints, but there are certain cases, @@ -39,16 +38,17 @@ abstract class ApiResource extends StripeObject public function __set($k, $v) { parent::__set($k, $v); - $v = $this->$k; - if ((static::getSavedNestedResources()->includes($k)) && - ($v instanceof ApiResource)) { + $v = $this->{$k}; + if ((static::getSavedNestedResources()->includes($k)) + && ($v instanceof ApiResource)) { $v->saveWithParent = true; } - return $v; } /** - * @return ApiResource The refreshed resource. + * @throws Exception\ApiErrorException + * + * @return ApiResource the refreshed resource */ public function refresh() { @@ -63,11 +63,12 @@ abstract class ApiResource extends StripeObject ); $this->setLastResponse($response); $this->refreshFrom($response->json, $this->_opts); + return $this; } /** - * @return string The base URL for the given class. + * @return string the base URL for the given class */ public static function baseUrl() { @@ -75,35 +76,42 @@ abstract class ApiResource extends StripeObject } /** - * @return string The endpoint URL for the given class. + * @return string the endpoint URL for the given class */ public static function classUrl() { // Replace dots with slashes for namespaced resources, e.g. if the object's name is // "foo.bar", then its URL will be "/v1/foo/bars". - $base = str_replace('.', '/', static::OBJECT_NAME); - return "/v1/${base}s"; + $base = \str_replace('.', '/', static::OBJECT_NAME); + + return "/v1/{$base}s"; } /** - * @return string The instance endpoint URL for the given class. + * @param null|string $id the ID of the resource + * + * @throws Exception\UnexpectedValueException if $id is null + * + * @return string the instance endpoint URL for the given class */ public static function resourceUrl($id) { - if ($id === null) { - $class = get_called_class(); - $message = "Could not determine which URL to request: " - . "$class instance has invalid ID: $id"; - throw new Error\InvalidRequest($message, null); + if (null === $id) { + $class = static::class; + $message = 'Could not determine which URL to request: ' + . "{$class} instance has invalid ID: {$id}"; + + throw new Exception\UnexpectedValueException($message); } $id = Util\Util::utf8($id); $base = static::classUrl(); - $extn = urlencode($id); - return "$base/$extn"; + $extn = \urlencode($id); + + return "{$base}/{$extn}"; } /** - * @return string The full API URL for this API resource. + * @return string the full API URL for this API resource */ public function instanceUrl() { diff --git a/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php b/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php index acca75123e6..e7ee2e9a903 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApiResponse.php @@ -5,24 +5,35 @@ namespace Stripe; use Stripe\Util\CaseInsensitiveArray; /** - * Class ApiResponse - * - * @package Stripe + * Class ApiResponse. */ class ApiResponse { + /** + * @var null|array|CaseInsensitiveArray + */ public $headers; + + /** + * @var string + */ public $body; + + /** + * @var null|array + */ public $json; + + /** + * @var int + */ public $code; /** * @param string $body - * @param integer $code - * @param array|CaseInsensitiveArray|null $headers - * @param array|null $json - * - * @return obj An APIResponse + * @param int $code + * @param null|array|CaseInsensitiveArray $headers + * @param null|array $json */ public function __construct($body, $code, $headers, $json) { diff --git a/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php b/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php index 57687c4f2e4..5f9489d47d4 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplePayDomain.php @@ -1,15 +1,19 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class ApplePayDomain - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $domain_name + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. */ class ApplePayDomain extends ApiResource { - const OBJECT_NAME = "apple_pay_domain"; + const OBJECT_NAME = 'apple_pay_domain'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php b/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php index 4b83071ade4..88aeed64553 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplicationFee.php @@ -1,30 +1,28 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class ApplicationFee - * - * @property string $id - * @property string $object - * @property string $account - * @property int $amount - * @property int $amount_refunded - * @property string $application - * @property string $balance_transaction - * @property string $charge - * @property int $created - * @property string $currency - * @property bool $livemode - * @property string $originating_transaction - * @property bool $refunded - * @property Collection $refunds - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string|\Stripe\Account $account ID of the Stripe account this fee was taken from. + * @property int $amount Amount earned, in %s. + * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) + * @property string|\Stripe\StripeObject $application ID of the Connect application that earned the fee. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + * @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string|\Stripe\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the <code>destination</code> parameter. + * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + * @property \Stripe\Collection $refunds A list of refunds that have been applied to the fee. */ class ApplicationFee extends ApiResource { - const OBJECT_NAME = "application_fee"; + const OBJECT_NAME = 'application_fee'; use ApiOperations\All; use ApiOperations\NestedResource; @@ -33,24 +31,27 @@ class ApplicationFee extends ApiResource const PATH_REFUNDS = '/refunds'; /** - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the application fee on which to retrieve the fee refunds + * @param null|array $params + * @param null|array|string $opts * - * @return ApplicationFee The refunded application fee. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of fee refunds */ - public function refund($params = null, $opts = null) + public static function allRefunds($id, $params = null, $opts = null) { - $this->refunds->create($params, $opts); - $this->refresh(); - return $this; + return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts); } /** - * @param string|null $id The ID of the application fee on which to create the refund. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the application fee on which to create the fee refund + * @param null|array $params + * @param null|array|string $opts * - * @return ApplicationFeeRefund + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund */ public static function createRefund($id, $params = null, $opts = null) { @@ -58,12 +59,14 @@ class ApplicationFee extends ApiResource } /** - * @param string|null $id The ID of the application fee to which the refund belongs. - * @param array|null $refundId The ID of the refund to retrieve. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the application fee to which the fee refund belongs + * @param string $refundId the ID of the fee refund to retrieve + * @param null|array $params + * @param null|array|string $opts * - * @return ApplicationFeeRefund + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund */ public static function retrieveRefund($id, $refundId, $params = null, $opts = null) { @@ -71,27 +74,17 @@ class ApplicationFee extends ApiResource } /** - * @param string|null $id The ID of the application fee to which the refund belongs. - * @param array|null $refundId The ID of the refund to update. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the application fee to which the fee refund belongs + * @param string $refundId the ID of the fee refund to update + * @param null|array $params + * @param null|array|string $opts * - * @return ApplicationFeeRefund + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund */ public static function updateRefund($id, $refundId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_REFUNDS, $refundId, $params, $opts); } - - /** - * @param string|null $id The ID of the application fee on which to retrieve the refunds. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of refunds. - */ - public static function allRefunds($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_REFUNDS, $params, $opts); - } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php b/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php index b242f2024b4..dc7c34bac20 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php +++ b/htdocs/includes/stripe/stripe-php/lib/ApplicationFeeRefund.php @@ -1,40 +1,46 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class ApplicationFeeRefund + * <code>Application Fee Refund</code> objects allow you to refund an application + * fee that has previously been created but not yet refunded. Funds will be + * refunded to the Stripe account from which the fee was originally collected. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $balance_transaction - * @property int $created - * @property string $currency - * @property string $fee - * @property StripeObject $metadata + * Related guide: <a + * href="https://stripe.com/docs/connect/destination-charges#refunding-app-fee">Refunding + * Application Fees</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string|\Stripe\ApplicationFee $fee ID of the application fee that was refunded. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ class ApplicationFeeRefund extends ApiResource { - const OBJECT_NAME = "fee_refund"; + const OBJECT_NAME = 'fee_refund'; use ApiOperations\Update { save as protected _save; } /** - * @return string The API URL for this Stripe refund. + * @return string the API URL for this Stripe refund */ public function instanceUrl() { $id = $this['id']; $fee = $this['fee']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: " . - "class instance has invalid ID: $id", + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", null ); } @@ -42,15 +48,16 @@ class ApplicationFeeRefund extends ApiResource $fee = Util\Util::utf8($fee); $base = ApplicationFee::classUrl(); - $feeExtn = urlencode($fee); - $extn = urlencode($id); - return "$base/$feeExtn/refunds/$extn"; + $feeExtn = \urlencode($fee); + $extn = \urlencode($id); + + return "{$base}/{$feeExtn}/refunds/{$extn}"; } /** - * @param array|string|null $opts + * @param null|array|string $opts * - * @return ApplicationFeeRefund The saved refund. + * @return ApplicationFeeRefund the saved refund */ public function save($opts = null) { diff --git a/htdocs/includes/stripe/stripe-php/lib/Balance.php b/htdocs/includes/stripe/stripe-php/lib/Balance.php index b99871adb85..0fdc2850c41 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Balance.php +++ b/htdocs/includes/stripe/stripe-php/lib/Balance.php @@ -1,26 +1,42 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Balance + * This is an object representing your Stripe balance. You can retrieve it to see + * the balance currently on your Stripe account. * - * @property string $object - * @property array $available - * @property array $connect_reserved - * @property bool $livemode - * @property array $pending + * You can also retrieve the balance history, which contains a list of <a + * href="https://stripe.com/docs/reporting/balance-transaction-types">transactions</a> + * that contributed to the balance (charges, payouts, and so forth). * - * @package Stripe + * The available and pending amounts for each currency are broken down further by + * payment source types. + * + * Related guide: <a + * href="https://stripe.com/docs/connect/account-balances">Understanding Connect + * Account Balances</a>. + * + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the <a href="https://stripe.com/docs/api#transfers">Transfers API</a> or <a href="https://stripe.com/docs/api#payouts">Payouts API</a>. The available balance for each currency and payment type can be found in the <code>source_types</code> property. + * @property \Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the <code>source_types</code> property. + * @property \Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts. + * @property \Stripe\StripeObject $issuing + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the <code>source_types</code> property. */ class Balance extends SingletonApiResource { - const OBJECT_NAME = "balance"; + const OBJECT_NAME = 'balance'; /** - * @param array|string|null $opts + * @param null|array|string $opts * - * @return Balance + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Balance */ public static function retrieve($opts = null) { diff --git a/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php index 78805d4d448..d7ddea4303d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/BalanceTransaction.php @@ -1,65 +1,71 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class BalanceTransaction + * Balance transactions represent funds moving through your Stripe account. They're + * created for every type of transaction that comes into or flows out of your + * Stripe account balance. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $available_on - * @property int $created - * @property string $currency - * @property string $description - * @property float $exchange_rate - * @property int $fee - * @property mixed $fee_details - * @property int $net - * @property string $source - * @property string $status - * @property string $type + * Related guide: <a + * href="https://stripe.com/docs/reports/balance-transaction-types">Balance + * Transaction Types</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Gross amount of the transaction, in %s. + * @property int $available_on The date the transaction's net funds will become available in the Stripe balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the <code>amount</code> in currency A, times <code>exchange_rate</code>, would be the <code>amount</code> in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's <code>amount</code> would be <code>1000</code> and <code>currency</code> would be <code>eur</code>. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's <code>amount</code> would be <code>1234</code>, <code>currency</code> would be <code>usd</code>, and <code>exchange_rate</code> would be <code>1.234</code>. + * @property int $fee Fees (in %s) paid for this transaction. + * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in %s) paid for this transaction. + * @property int $net Net amount of the transaction, in %s. + * @property string $reporting_category <a href="https://stripe.com/docs/reports/reporting-categories">Learn more</a> about how reporting categories can help you understand balance transactions from an accounting perspective. + * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related. + * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either <code>available</code> or <code>pending</code>. + * @property string $type Transaction type: <code>adjustment</code>, <code>advance</code>, <code>advance_funding</code>, <code>anticipation_repayment</code>, <code>application_fee</code>, <code>application_fee_refund</code>, <code>charge</code>, <code>connect_collection_transfer</code>, <code>contribution</code>, <code>issuing_authorization_hold</code>, <code>issuing_authorization_release</code>, <code>issuing_dispute</code>, <code>issuing_transaction</code>, <code>payment</code>, <code>payment_failure_refund</code>, <code>payment_refund</code>, <code>payout</code>, <code>payout_cancel</code>, <code>payout_failure</code>, <code>refund</code>, <code>refund_failure</code>, <code>reserve_transaction</code>, <code>reserved_funds</code>, <code>stripe_fee</code>, <code>stripe_fx_fee</code>, <code>tax_fee</code>, <code>topup</code>, <code>topup_reversal</code>, <code>transfer</code>, <code>transfer_cancel</code>, <code>transfer_failure</code>, or <code>transfer_refund</code>. <a href="https://stripe.com/docs/reports/balance-transaction-types">Learn more</a> about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider <code>reporting_category</code> instead. */ class BalanceTransaction extends ApiResource { - const OBJECT_NAME = "balance_transaction"; + const OBJECT_NAME = 'balance_transaction'; use ApiOperations\All; use ApiOperations\Retrieve; - /** - * Possible string representations of the type of balance transaction. - * @link https://stripe.com/docs/api/balance/balance_transaction#balance_transaction_object-type - */ - const TYPE_ADJUSTMENT = 'adjustment'; - const TYPE_ADVANCE = 'advance'; - const TYPE_ADVANCE_FUNDING = 'advance_funding'; - const TYPE_APPLICATION_FEE = 'application_fee'; - const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund'; - const TYPE_CHARGE = 'charge'; - const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer'; - const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; + const TYPE_ADJUSTMENT = 'adjustment'; + const TYPE_ADVANCE = 'advance'; + const TYPE_ADVANCE_FUNDING = 'advance_funding'; + const TYPE_ANTICIPATION_REPAYMENT = 'anticipation_repayment'; + const TYPE_APPLICATION_FEE = 'application_fee'; + const TYPE_APPLICATION_FEE_REFUND = 'application_fee_refund'; + const TYPE_CHARGE = 'charge'; + const TYPE_CONNECT_COLLECTION_TRANSFER = 'connect_collection_transfer'; + const TYPE_CONTRIBUTION = 'contribution'; + const TYPE_ISSUING_AUTHORIZATION_HOLD = 'issuing_authorization_hold'; const TYPE_ISSUING_AUTHORIZATION_RELEASE = 'issuing_authorization_release'; - const TYPE_ISSUING_TRANSACTION = 'issuing_transaction'; - const TYPE_PAYMENT = 'payment'; - const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; - const TYPE_PAYMENT_REFUND = 'payment_refund'; - const TYPE_PAYOUT = 'payout'; - const TYPE_PAYOUT_CANCEL = 'payout_cancel'; - const TYPE_PAYOUT_FAILURE = 'payout_failure'; - const TYPE_REFUND = 'refund'; - const TYPE_REFUND_FAILURE = 'refund_failure'; - const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; - const TYPE_RESERVED_FUNDS = 'reserved_funds'; - const TYPE_STRIPE_FEE = 'stripe_fee'; - const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; - const TYPE_TAX_FEE = 'tax_fee'; - const TYPE_TOPUP = 'topup'; - const TYPE_TOPUP_REVERSAL = 'topup_reversal'; - const TYPE_TRANSFER = 'transfer'; - const TYPE_TRANSFER_CANCEL = 'transfer_cancel'; - const TYPE_TRANSFER_FAILURE = 'transfer_failure'; - const TYPE_TRANSFER_REFUND = 'transfer_refund'; + const TYPE_ISSUING_DISPUTE = 'issuing_dispute'; + const TYPE_ISSUING_TRANSACTION = 'issuing_transaction'; + const TYPE_PAYMENT = 'payment'; + const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; + const TYPE_PAYMENT_REFUND = 'payment_refund'; + const TYPE_PAYOUT = 'payout'; + const TYPE_PAYOUT_CANCEL = 'payout_cancel'; + const TYPE_PAYOUT_FAILURE = 'payout_failure'; + const TYPE_REFUND = 'refund'; + const TYPE_REFUND_FAILURE = 'refund_failure'; + const TYPE_RESERVE_TRANSACTION = 'reserve_transaction'; + const TYPE_RESERVED_FUNDS = 'reserved_funds'; + const TYPE_STRIPE_FEE = 'stripe_fee'; + const TYPE_STRIPE_FX_FEE = 'stripe_fx_fee'; + const TYPE_TAX_FEE = 'tax_fee'; + const TYPE_TOPUP = 'topup'; + const TYPE_TOPUP_REVERSAL = 'topup_reversal'; + const TYPE_TRANSFER = 'transfer'; + const TYPE_TRANSFER_CANCEL = 'transfer_cancel'; + const TYPE_TRANSFER_FAILURE = 'transfer_failure'; + const TYPE_TRANSFER_REFUND = 'transfer_refund'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/BankAccount.php b/htdocs/includes/stripe/stripe-php/lib/BankAccount.php index a77f3054ba5..40eca41c5f5 100644 --- a/htdocs/includes/stripe/stripe-php/lib/BankAccount.php +++ b/htdocs/includes/stripe/stripe-php/lib/BankAccount.php @@ -1,44 +1,57 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class BankAccount + * These bank accounts are payment methods on <code>Customer</code> objects. * - * @property string $id - * @property string $object - * @property string $account - * @property string $account_holder_name - * @property string $account_holder_type - * @property string $bank_name - * @property string $country - * @property string $currency - * @property string $customer - * @property bool $default_for_currency - * @property string $fingerprint - * @property string $last4 - * @property StripeObject $metadata - * @property string $routing_number - * @property string $status + * On the other hand <a + * href="https://stripe.com/docs/api#external_accounts">External Accounts</a> are + * transfer destinations on <code>Account</code> objects for <a + * href="https://stripe.com/docs/connect/custom-accounts">Custom accounts</a>. They + * can be bank accounts or debit cards as well, and are documented in the links + * above. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/payments/bank-debits-transfers">Bank Debits and + * Transfers</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\Stripe\Account $account The ID of the account that the bank account is associated with. + * @property null|string $account_holder_name The name of the person or business that owns the bank account. + * @property null|string $account_holder_type The type of entity that holds the account. This can be either <code>individual</code> or <code>company</code>. + * @property null|string[] $available_payout_methods A set of available payout methods for this bank account. Only values from this set should be passed as the <code>method</code> when creating a payout. + * @property null|string $bank_name Name of the bank associated with the routing number (e.g., <code>WELLS FARGO</code>). + * @property string $country Two-letter ISO code representing the country the bank account is located in. + * @property string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for the currency</a> paid out to the bank account. + * @property null|string|\Stripe\Customer $customer The ID of the customer that the bank account is associated with. + * @property null|bool $default_for_currency Whether this bank account is the default external account for its currency. + * @property null|string $fingerprint Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + * @property string $last4 The last four digits of the bank account number. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $routing_number The routing transit number for the bank account. + * @property string $status <p>For bank accounts, possible values are <code>new</code>, <code>validated</code>, <code>verified</code>, <code>verification_failed</code>, or <code>errored</code>. A bank account that hasn't had any activity or validation performed is <code>new</code>. If Stripe can determine that the bank account exists, its status will be <code>validated</code>. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be <code>verified</code>. If the verification failed for any reason, such as microdeposit failure, the status will be <code>verification_failed</code>. If a transfer sent to this bank account fails, we'll set the status to <code>errored</code> and will not continue to send transfers until the bank details are updated.</p><p>For external accounts, possible values are <code>new</code> and <code>errored</code>. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to <code>errored</code> and transfers are stopped until account details are updated.</p> */ class BankAccount extends ApiResource { - const OBJECT_NAME = "bank_account"; + const OBJECT_NAME = 'bank_account'; use ApiOperations\Delete; use ApiOperations\Update; /** * Possible string representations of the bank verification status. - * @link https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status + * + * @see https://stripe.com/docs/api/external_account_bank_accounts/object#account_bank_account_object-status */ - const STATUS_NEW = 'new'; - const STATUS_VALIDATED = 'validated'; - const STATUS_VERIFIED = 'verified'; + const STATUS_NEW = 'new'; + const STATUS_VALIDATED = 'validated'; + const STATUS_VERIFIED = 'verified'; const STATUS_VERIFICATION_FAILED = 'verification_failed'; - const STATUS_ERRORED = 'errored'; + const STATUS_ERRORED = 'errored'; /** * @return string The instance URL for this resource. It needs to be special @@ -55,54 +68,65 @@ class BankAccount extends ApiResource $parent = $this['account']; $path = 'external_accounts'; } else { - $msg = "Bank accounts cannot be accessed without a customer ID or account ID."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Bank accounts cannot be accessed without a customer ID or account ID.'; + + throw new Exception\UnexpectedValueException($msg, null); } - $parentExtn = urlencode(Util\Util::utf8($parent)); - $extn = urlencode(Util\Util::utf8($this['id'])); - return "$base/$parentExtn/$path/$extn"; + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Bank accounts cannot be accessed without a customer ID or account ID. " . - "Retrieve a bank account using \$customer->sources->retrieve('bank_account_id') or " . - "\$account->external_accounts->retrieve('bank_account_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Bank accounts cannot be retrieved without a customer ID or ' . + 'an account ID. Retrieve a bank account using ' . + "`Customer::retrieveSource('customer_id', " . + "'bank_account_id')` or `Account::retrieveExternalAccount(" . + "'account_id', 'bank_account_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Bank accounts cannot be accessed without a customer ID or account ID. " . - "Call save() on \$customer->sources->retrieve('bank_account_id') or " . - "\$account->external_accounts->retrieve('bank_account_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Bank accounts cannot be updated without a customer ID or an ' . + 'account ID. Update a bank account using ' . + "`Customer::updateSource('customer_id', 'bank_account_id', " . + '$updateParams)` or `Account::updateExternalAccount(' . + "'account_id', 'bank_account_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } /** - * @param array|null $params - * @param array|string|null $options - * - * @return BankAccount The verified bank account. - */ - public function verify($params = null, $options = null) + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return BankAccount the verified bank account + */ + public function verify($params = null, $opts = null) { $url = $this->instanceUrl() . '/verify'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/BaseStripeClient.php b/htdocs/includes/stripe/stripe-php/lib/BaseStripeClient.php new file mode 100644 index 00000000000..5499fe3a847 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/BaseStripeClient.php @@ -0,0 +1,269 @@ +<?php + +namespace Stripe; + +class BaseStripeClient implements StripeClientInterface +{ + /** @var string default base URL for Stripe's API */ + const DEFAULT_API_BASE = 'https://api.stripe.com'; + + /** @var string default base URL for Stripe's OAuth API */ + const DEFAULT_CONNECT_BASE = 'https://connect.stripe.com'; + + /** @var string default base URL for Stripe's Files API */ + const DEFAULT_FILES_BASE = 'https://files.stripe.com'; + + /** @var array<string, mixed> */ + private $config; + + /** @var \Stripe\Util\RequestOptions */ + private $defaultOpts; + + /** + * Initializes a new instance of the {@link BaseStripeClient} class. + * + * The constructor takes a single argument. The argument can be a string, in which case it + * should be the API key. It can also be an array with various configuration settings. + * + * Configuration settings include the following options: + * + * - api_key (null|string): the Stripe API key, to be used in regular API requests. + * - client_id (null|string): the Stripe client ID, to be used in OAuth requests. + * - stripe_account (null|string): a Stripe account ID. If set, all requests sent by the client + * will automatically use the {@code Stripe-Account} header with that account ID. + * - stripe_version (null|string): a Stripe API verion. If set, all requests sent by the client + * will include the {@code Stripe-Version} header with that API version. + * + * The following configuration settings are also available, though setting these should rarely be necessary + * (only useful if you want to send requests to a mock server like stripe-mock): + * + * - api_base (string): the base URL for regular API requests. Defaults to + * {@link DEFAULT_API_BASE}. + * - connect_base (string): the base URL for OAuth requests. Defaults to + * {@link DEFAULT_CONNECT_BASE}. + * - files_base (string): the base URL for file creation requests. Defaults to + * {@link DEFAULT_FILES_BASE}. + * + * @param array<string, mixed>|string $config the API key as a string, or an array containing + * the client configuration settings + */ + public function __construct($config = []) + { + if (\is_string($config)) { + $config = ['api_key' => $config]; + } elseif (!\is_array($config)) { + throw new \Stripe\Exception\InvalidArgumentException('$config must be a string or an array'); + } + + $config = \array_merge($this->getDefaultConfig(), $config); + $this->validateConfig($config); + + $this->config = $config; + + $this->defaultOpts = \Stripe\Util\RequestOptions::parse([ + 'stripe_account' => $config['stripe_account'], + 'stripe_version' => $config['stripe_version'], + ]); + } + + /** + * Gets the API key used by the client to send requests. + * + * @return null|string the API key used by the client to send requests + */ + public function getApiKey() + { + return $this->config['api_key']; + } + + /** + * Gets the client ID used by the client in OAuth requests. + * + * @return null|string the client ID used by the client in OAuth requests + */ + public function getClientId() + { + return $this->config['client_id']; + } + + /** + * Gets the base URL for Stripe's API. + * + * @return string the base URL for Stripe's API + */ + public function getApiBase() + { + return $this->config['api_base']; + } + + /** + * Gets the base URL for Stripe's OAuth API. + * + * @return string the base URL for Stripe's OAuth API + */ + public function getConnectBase() + { + return $this->config['connect_base']; + } + + /** + * Gets the base URL for Stripe's Files API. + * + * @return string the base URL for Stripe's Files API + */ + public function getFilesBase() + { + return $this->config['files_base']; + } + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \Stripe\StripeObject the object returned by Stripe's API + */ + public function request($method, $path, $params, $opts) + { + $opts = $this->defaultOpts->merge($opts, true); + $baseUrl = $opts->apiBase ?: $this->getApiBase(); + $requestor = new \Stripe\ApiRequestor($this->apiKeyForRequest($opts), $baseUrl); + list($response, $opts->apiKey) = $requestor->request($method, $path, $params, $opts->headers); + $opts->discardNonPersistentHeaders(); + $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \Stripe\Collection of ApiResources + */ + public function requestCollection($method, $path, $params, $opts) + { + $obj = $this->request($method, $path, $params, $opts); + if (!($obj instanceof \Stripe\Collection)) { + $received_class = \get_class($obj); + $msg = "Expected to receive `Stripe\\Collection` object from Stripe API. Instead received `{$received_class}`."; + + throw new \Stripe\Exception\UnexpectedValueException($msg); + } + $obj->setFilters($params); + + return $obj; + } + + /** + * @param \Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\AuthenticationException + * + * @return string + */ + private function apiKeyForRequest($opts) + { + $apiKey = $opts->apiKey ?: $this->getApiKey(); + + if (null === $apiKey) { + $msg = 'No API key provided. Set your API key when constructing the ' + . 'StripeClient instance, or provide it on a per-request basis ' + . 'using the `api_key` key in the $opts argument.'; + + throw new \Stripe\Exception\AuthenticationException($msg); + } + + return $apiKey; + } + + /** + * TODO: replace this with a private constant when we drop support for PHP < 5. + * + * @return array<string, mixed> + */ + private function getDefaultConfig() + { + return [ + 'api_key' => null, + 'client_id' => null, + 'stripe_account' => null, + 'stripe_version' => null, + 'api_base' => self::DEFAULT_API_BASE, + 'connect_base' => self::DEFAULT_CONNECT_BASE, + 'files_base' => self::DEFAULT_FILES_BASE, + ]; + } + + /** + * @param array<string, mixed> $config + * + * @throws \Stripe\Exception\InvalidArgumentException + */ + private function validateConfig($config) + { + // api_key + if (null !== $config['api_key'] && !\is_string($config['api_key'])) { + throw new \Stripe\Exception\InvalidArgumentException('api_key must be null or a string'); + } + + if (null !== $config['api_key'] && ('' === $config['api_key'])) { + $msg = 'api_key cannot be the empty string'; + + throw new \Stripe\Exception\InvalidArgumentException($msg); + } + + if (null !== $config['api_key'] && (\preg_match('/\s/', $config['api_key']))) { + $msg = 'api_key cannot contain whitespace'; + + throw new \Stripe\Exception\InvalidArgumentException($msg); + } + + // client_id + if (null !== $config['client_id'] && !\is_string($config['client_id'])) { + throw new \Stripe\Exception\InvalidArgumentException('client_id must be null or a string'); + } + + // stripe_account + if (null !== $config['stripe_account'] && !\is_string($config['stripe_account'])) { + throw new \Stripe\Exception\InvalidArgumentException('stripe_account must be null or a string'); + } + + // stripe_version + if (null !== $config['stripe_version'] && !\is_string($config['stripe_version'])) { + throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be null or a string'); + } + + // api_base + if (!\is_string($config['api_base'])) { + throw new \Stripe\Exception\InvalidArgumentException('api_base must be a string'); + } + + // connect_base + if (!\is_string($config['connect_base'])) { + throw new \Stripe\Exception\InvalidArgumentException('connect_base must be a string'); + } + + // files_base + if (!\is_string($config['files_base'])) { + throw new \Stripe\Exception\InvalidArgumentException('files_base must be a string'); + } + + // check absence of extra keys + $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig())); + if (!empty($extraConfigKeys)) { + // Wrap in single quote to more easily catch trailing spaces errors + $invalidKeys = "'" . \implode("', '", $extraConfigKeys) . "'"; + + throw new \Stripe\Exception\InvalidArgumentException('Found unknown key(s) in configuration array: ' . $invalidKeys); + } + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/BillingPortal/Session.php b/htdocs/includes/stripe/stripe-php/lib/BillingPortal/Session.php new file mode 100644 index 00000000000..ec01275ac4f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/BillingPortal/Session.php @@ -0,0 +1,32 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\BillingPortal; + +/** + * A session describes the instantiation of the customer portal for a particular + * customer. By visiting the session's URL, the customer can manage their + * subscriptions and billing details. For security reasons, sessions are + * short-lived and will expire if the customer does not visit the URL. Create + * sessions on-demand when customers intend to manage their subscriptions and + * billing details. + * + * Integration guide: <a + * href="https://stripe.com/docs/billing/subscriptions/integrating-customer-portal">Billing + * customer portal</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $customer The ID of the customer for this session. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property string $return_url The URL to which Stripe should send customers when they click on the link to return to your website. + * @property string $url The short-lived URL of the session giving customers access to the customer portal. + */ +class Session extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'billing_portal.session'; + + use \Stripe\ApiOperations\Create; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php b/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php index a9272dfa288..208610a0f12 100644 --- a/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php +++ b/htdocs/includes/stripe/stripe-php/lib/BitcoinReceiver.php @@ -1,18 +1,39 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class BitcoinReceiver - * - * @package Stripe - * * @deprecated Bitcoin receivers are deprecated. Please use the sources API instead. - * @link https://stripe.com/docs/sources/bitcoin + * @see https://stripe.com/docs/sources/bitcoin + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active True when this bitcoin receiver has received a non-zero amount of bitcoin. + * @property int $amount The amount of <code>currency</code> that you are collecting as payment. + * @property int $amount_received The amount of <code>currency</code> to which <code>bitcoin_amount_received</code> has been converted. + * @property int $bitcoin_amount The amount of bitcoin that the customer should send to fill the receiver. The <code>bitcoin_amount</code> is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. + * @property int $bitcoin_amount_received The amount of bitcoin that has been sent by the customer to this receiver. + * @property string $bitcoin_uri This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> to which the bitcoin will be converted. + * @property null|string $customer The customer ID of the bitcoin receiver. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string $email The customer's email address, set by the API call that creates the receiver. + * @property bool $filled This flag is initially false and updates to true when the customer sends the <code>bitcoin_amount</code> to this receiver. + * @property string $inbound_address A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $payment The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. + * @property null|string $refund_address The refund address of this bitcoin receiver. + * @property \Stripe\Collection $transactions A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. + * @property bool $uncaptured_funds This receiver contains uncaptured funds that can be used for a payment or refunded. + * @property null|bool $used_for_payment Indicate if this source is used for payment. */ class BitcoinReceiver extends ApiResource { - const OBJECT_NAME = "bitcoin_receiver"; + const OBJECT_NAME = 'bitcoin_receiver'; use ApiOperations\All; use ApiOperations\Retrieve; @@ -23,7 +44,7 @@ class BitcoinReceiver extends ApiResource */ public static function classUrl() { - return "/v1/bitcoin/receivers"; + return '/v1/bitcoin/receivers'; } /** @@ -36,13 +57,15 @@ class BitcoinReceiver extends ApiResource $base = Customer::classUrl(); $parent = $this['customer']; $path = 'sources'; - $parentExtn = urlencode(Util\Util::utf8($parent)); - $extn = urlencode(Util\Util::utf8($this['id'])); - return "$base/$parentExtn/$path/$extn"; - } else { - $base = BitcoinReceiver::classUrl(); - $extn = urlencode(Util\Util::utf8($this['id'])); - return "$base/$extn"; + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; } + + $base = BitcoinReceiver::classUrl(); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$extn}"; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php b/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php index 122be42314f..3aa7118504a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/BitcoinTransaction.php @@ -1,13 +1,19 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class BitcoinTransaction - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The amount of <code>currency</code> that the transaction was converted to in real-time. + * @property int $bitcoin_amount The amount of bitcoin contained in the transaction. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> to which this transaction was converted. + * @property string $receiver The receiver to which this transaction was sent. */ class BitcoinTransaction extends ApiResource { - const OBJECT_NAME = "bitcoin_transaction"; + const OBJECT_NAME = 'bitcoin_transaction'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Capability.php b/htdocs/includes/stripe/stripe-php/lib/Capability.php index aabf54b1f1b..3580df60b7f 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Capability.php +++ b/htdocs/includes/stripe/stripe-php/lib/Capability.php @@ -1,46 +1,46 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Capability + * This is an object representing a capability for a Stripe account. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/connect/account-capabilities">Account + * capabilities</a>. * - * @property string $id - * @property string $object - * @property string $account - * @property bool $requested - * @property int $requested_at - * @property mixed $requirements - * @property string $status + * @property string $id The identifier for the capability. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string|\Stripe\Account $account The account for which the capability enables functionality. + * @property bool $requested Whether the capability has been requested. + * @property null|int $requested_at Time at which the capability was requested. Measured in seconds since the Unix epoch. + * @property \Stripe\StripeObject $requirements + * @property string $status The status of the capability. Can be <code>active</code>, <code>inactive</code>, <code>pending</code>, or <code>unrequested</code>. */ class Capability extends ApiResource { - const OBJECT_NAME = "capability"; + const OBJECT_NAME = 'capability'; use ApiOperations\Update; - /** - * Possible string representations of a capability's status. - * @link https://stripe.com/docs/api/capabilities/object#capability_object-status - */ - const STATUS_ACTIVE = 'active'; - const STATUS_INACTIVE = 'inactive'; - const STATUS_PENDING = 'pending'; + const STATUS_ACTIVE = 'active'; + const STATUS_INACTIVE = 'inactive'; + const STATUS_PENDING = 'pending'; const STATUS_UNREQUESTED = 'unrequested'; /** - * @return string The API URL for this Stripe account reversal. + * @return string the API URL for this Stripe account reversal */ public function instanceUrl() { $id = $this['id']; $account = $this['account']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: " . - "class instance has invalid ID: $id", + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", null ); } @@ -48,35 +48,40 @@ class Capability extends ApiResource $account = Util\Util::utf8($account); $base = Account::classUrl(); - $accountExtn = urlencode($account); - $extn = urlencode($id); - return "$base/$accountExtn/capabilities/$extn"; + $accountExtn = \urlencode($account); + $extn = \urlencode($id); + + return "{$base}/{$accountExtn}/capabilities/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Capabilities cannot be accessed without an account ID. " . - "Retrieve a Capability using \$account->retrieveCapability('acap_123') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Capabilities cannot be retrieved without an account ID. ' . + 'Retrieve a capability using `Account::retrieveCapability(' . + "'account_id', 'capability_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Capabilities cannot be accessed without an account ID. " . - "Update a Capability using \$account->updateCapability('acap_123') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Capabilities cannot be updated without an account ID. ' . + 'Update a capability using `Account::updateCapability(' . + "'account_id', 'capability_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Card.php b/htdocs/includes/stripe/stripe-php/lib/Card.php index 51eb5add1c9..106cd1811a8 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Card.php +++ b/htdocs/includes/stripe/stripe-php/lib/Card.php @@ -1,71 +1,79 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Card + * You can store multiple cards on a customer in order to charge the customer + * later. You can also store multiple debit cards on a recipient in order to + * transfer to those cards later. * - * @property string $id - * @property string $object - * @property string $account - * @property string $address_city - * @property string $address_country - * @property string $address_line1 - * @property string $address_line1_check - * @property string $address_line2 - * @property string $address_state - * @property string $address_zip - * @property string $address_zip_check - * @property string[] $available_payout_methods - * @property string $brand - * @property string $country - * @property string $currency - * @property string $customer - * @property string $cvc_check - * @property bool $default_for_currency - * @property string $dynamic_last4 - * @property int $exp_month - * @property int $exp_year - * @property string $fingerprint - * @property string $funding - * @property string $last4 - * @property StripeObject $metadata - * @property string $name - * @property string $recipient - * @property string $tokenization_method + * Related guide: <a href="https://stripe.com/docs/sources/cards">Card Payments + * with Sources</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\Stripe\Account $account The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. + * @property null|string $address_city City/District/Suburb/Town/Village. + * @property null|string $address_country Billing address country, if provided when creating card. + * @property null|string $address_line1 Address line 1 (Street address/PO Box/Company name). + * @property null|string $address_line1_check If <code>address_line1</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. + * @property null|string $address_line2 Address line 2 (Apartment/Suite/Unit/Building). + * @property null|string $address_state State/County/Province/Region. + * @property null|string $address_zip ZIP or postal code. + * @property null|string $address_zip_check If <code>address_zip</code> was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. + * @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the <code>method</code> when creating a payout. + * @property string $brand Card brand. Can be <code>American Express</code>, <code>Diners Club</code>, <code>Discover</code>, <code>JCB</code>, <code>MasterCard</code>, <code>UnionPay</code>, <code>Visa</code>, or <code>Unknown</code>. + * @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + * @property null|string $currency Three-letter <a href="https://stripe.com/docs/payouts">ISO code for currency</a>. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. + * @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + * @property null|string $cvc_check If a CVC was provided, results of the check: <code>pass</code>, <code>fail</code>, <code>unavailable</code>, or <code>unchecked</code>. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see <a href="https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge">Check if a card is valid without a charge</a>. + * @property null|bool $default_for_currency Whether this card is the default external account for its currency. + * @property null|string $dynamic_last4 (For tokenized numbers only.) The last four digits of the device account number. + * @property int $exp_month Two-digit number representing the card's expiration month. + * @property int $exp_year Four-digit number representing the card's expiration year. + * @property null|string $fingerprint Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * @property string $funding Card funding type. Can be <code>credit</code>, <code>debit</code>, <code>prepaid</code>, or <code>unknown</code>. + * @property string $last4 The last four digits of the card. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name Cardholder name. + * @property null|string|\Stripe\Recipient $recipient The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. + * @property null|string $tokenization_method If the card number is tokenized, this is the method that was used. Can be <code>android_pay</code> (includes Google Pay), <code>apple_pay</code>, <code>masterpass</code>, <code>visa_checkout</code>, or null. */ class Card extends ApiResource { - const OBJECT_NAME = "card"; + const OBJECT_NAME = 'card'; use ApiOperations\Delete; use ApiOperations\Update; /** * Possible string representations of the CVC check status. - * @link https://stripe.com/docs/api/cards/object#card_object-cvc_check + * + * @see https://stripe.com/docs/api/cards/object#card_object-cvc_check */ - const CVC_CHECK_FAIL = 'fail'; - const CVC_CHECK_PASS = 'pass'; + const CVC_CHECK_FAIL = 'fail'; + const CVC_CHECK_PASS = 'pass'; const CVC_CHECK_UNAVAILABLE = 'unavailable'; - const CVC_CHECK_UNCHECKED = 'unchecked'; + const CVC_CHECK_UNCHECKED = 'unchecked'; /** * Possible string representations of the funding of the card. - * @link https://stripe.com/docs/api/cards/object#card_object-funding + * + * @see https://stripe.com/docs/api/cards/object#card_object-funding */ - const FUNDING_CREDIT = 'credit'; - const FUNDING_DEBIT = 'debit'; + const FUNDING_CREDIT = 'credit'; + const FUNDING_DEBIT = 'debit'; const FUNDING_PREPAID = 'prepaid'; const FUNDING_UNKNOWN = 'unknown'; /** * Possible string representations of the tokenization method when using Apple Pay or Google Pay. - * @link https://stripe.com/docs/api/cards/object#card_object-tokenization_method + * + * @see https://stripe.com/docs/api/cards/object#card_object-tokenization_method */ - const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay'; + const TOKENIZATION_METHOD_APPLE_PAY = 'apple_pay'; const TOKENIZATION_METHOD_GOOGLE_PAY = 'google_pay'; /** @@ -88,42 +96,47 @@ class Card extends ApiResource $parent = $this['recipient']; $path = 'cards'; } else { - $msg = "Cards cannot be accessed without a customer ID, account ID or recipient ID."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Cards cannot be accessed without a customer ID, account ID or recipient ID.'; + + throw new Exception\UnexpectedValueException($msg); } - $parentExtn = urlencode(Util\Util::utf8($parent)); - $extn = urlencode(Util\Util::utf8($this['id'])); - return "$base/$parentExtn/$path/$extn"; + $parentExtn = \urlencode(Util\Util::utf8($parent)); + $extn = \urlencode(Util\Util::utf8($this['id'])); + + return "{$base}/{$parentExtn}/{$path}/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Cards cannot be accessed without a customer, recipient or account ID. " . - "Retrieve a card using \$customer->sources->retrieve('card_id'), " . - "\$recipient->cards->retrieve('card_id'), or " . - "\$account->external_accounts->retrieve('card_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Cards cannot be retrieved without a customer ID or an ' . + 'account ID. Retrieve a card using ' . + "`Customer::retrieveSource('customer_id', 'card_id')` or " . + "`Account::retrieveExternalAccount('account_id', 'card_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Cards cannot be accessed without a customer, recipient or account ID. " . - "Call save() on \$customer->sources->retrieve('card_id'), " . - "\$recipient->cards->retrieve('card_id'), or " . - "\$account->external_accounts->retrieve('card_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Cards cannot be updated without a customer ID or an ' . + 'account ID. Update a card using ' . + "`Customer::updateSource('customer_id', 'card_id', " . + '$updateParams)` or `Account::updateExternalAccount(' . + "'account_id', 'card_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Charge.php b/htdocs/includes/stripe/stripe-php/lib/Charge.php index 0c3853c9678..799bede85cf 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Charge.php +++ b/htdocs/includes/stripe/stripe-php/lib/Charge.php @@ -1,206 +1,146 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Charge + * To charge a credit or a debit card, you create a <code>Charge</code> object. You + * can retrieve and refund individual charges as well as list all charges. Charges + * are identified by a unique, random ID. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $amount_refunded - * @property string $application - * @property string $application_fee - * @property int $application_fee_amount - * @property string $balance_transaction - * @property mixed $billing_details - * @property bool $captured - * @property int $created - * @property string $currency - * @property string $customer - * @property string $description - * @property string $destination - * @property string $dispute - * @property string $failure_code - * @property string $failure_message - * @property mixed $fraud_details - * @property string $invoice - * @property bool $livemode - * @property StripeObject $metadata - * @property string $on_behalf_of - * @property string $order - * @property mixed $outcome - * @property bool $paid - * @property string $payment_intent - * @property string $payment_method - * @property mixed $payment_method_details - * @property string $receipt_email - * @property string $receipt_number - * @property string $receipt_url - * @property bool $refunded - * @property Collection $refunds - * @property string $review - * @property mixed $shipping - * @property mixed $source - * @property string $source_transfer - * @property string $statement_descriptor - * @property string $status - * @property string $transfer - * @property mixed $transfer_data - * @property string $transfer_group + * Related guide: <a + * href="https://stripe.com/docs/payments/accept-a-payment-charges">Accept a + * payment with the Charges API</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * @property int $amount_captured Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made). + * @property int $amount_refunded Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). + * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the charge. + * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details. + * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the charge. <a href="https://stripe.com/docs/connect/direct-charges#collecting-fees">See the Connect documentation</a> for details. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + * @property \Stripe\StripeObject $billing_details + * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + * @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if <code>transfer_data</code> was specified in the charge request. + * @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed. + * @property bool $disputed Whether the charge has been disputed. + * @property null|string $failure_code Error code explaining reason for charge failure if available (see <a href="https://stripe.com/docs/api#errors">the errors section</a> for a list of codes). + * @property null|string $failure_message Message to user further explaining reason for charge failure if available. + * @property null|\Stripe\StripeObject $fraud_details Information on fraud assessments for the charge. + * @property null|string|\Stripe\Invoice $invoice ID of the invoice this charge is for if one exists. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the <a href="https://stripe.com/docs/connect/charges-transfers">Connect documentation</a> for details. + * @property null|string|\Stripe\Order $order ID of the order this charge is for if one exists. + * @property null|\Stripe\StripeObject $outcome Details about whether the payment was accepted, and why. See <a href="https://stripe.com/docs/declines">understanding declines</a> for details. + * @property bool $paid <code>true</code> if the charge succeeded, or was successfully authorized for later capture. + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this charge, if one exists. + * @property null|string $payment_method ID of the payment method used in this charge. + * @property null|\Stripe\StripeObject $payment_method_details Details about the payment method at the time of the transaction. + * @property null|string $receipt_email This is the email address that the receipt for this charge was sent to. + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this charge. This attribute will be <code>null</code> until a receipt has been sent. + * @property null|string $receipt_url This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + * @property bool $refunded Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + * @property \Stripe\Collection $refunds A list of refunds that have been applied to the charge. + * @property null|string|\Stripe\Review $review ID of the review associated with this charge if one exists. + * @property null|\Stripe\StripeObject $shipping Shipping information for the charge. + * @property null|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to <code>payment_method</code> or <code>payment_method_details</code> instead. + * @property null|string|\Stripe\Transfer $source_transfer The transfer ID which created this charge. Only present if the charge came from another Stripe account. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details. + * @property null|string $statement_descriptor For card charges, use <code>statement_descriptor_suffix</code> instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. + * @property null|string $statement_descriptor_suffix Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * @property string $status The status of the payment is either <code>succeeded</code>, <code>pending</code>, or <code>failed</code>. + * @property string|\Stripe\Transfer $transfer ID of the transfer to the <code>destination</code> account (only applicable if the charge was created using the <code>destination</code> parameter). + * @property null|\Stripe\StripeObject $transfer_data An optional dictionary including the account to automatically transfer to as part of a destination charge. <a href="https://stripe.com/docs/connect/destination-charges">See the Connect documentation</a> for details. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/charges-transfers#transfer-options">Connect documentation</a> for details. */ class Charge extends ApiResource { - const OBJECT_NAME = "charge"; + const OBJECT_NAME = 'charge'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of decline codes. - * These strings are applicable to the decline_code property of the \Stripe\Error\Card exception. - * @link https://stripe.com/docs/declines/codes - */ - const DECLINED_APPROVE_WITH_ID = 'approve_with_id'; - const DECLINED_CALL_ISSUER = 'call_issuer'; - const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported'; - const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded'; - const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported'; - const DECLINED_DO_NOT_HONOR = 'do_not_honor'; - const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again'; - const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction'; - const DECLINED_EXPIRED_CARD = 'expired_card'; - const DECLINED_FRAUDULENT = 'fraudulent'; - const DECLINED_GENERIC_DECLINE = 'generic_decline'; - const DECLINED_INCORRECT_NUMBER = 'incorrect_number'; - const DECLINED_INCORRECT_CVC = 'incorrect_cvc'; - const DECLINED_INCORRECT_PIN = 'incorrect_pin'; - const DECLINED_INCORRECT_ZIP = 'incorrect_zip'; - const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds'; - const DECLINED_INVALID_ACCOUNT = 'invalid_account'; - const DECLINED_INVALID_AMOUNT = 'invalid_amount'; - const DECLINED_INVALID_CVC = 'invalid_cvc'; - const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year'; - const DECLINED_INVALID_NUMBER = 'invalid_number'; - const DECLINED_INVALID_PIN = 'invalid_pin'; - const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available'; - const DECLINED_LOST_CARD = 'lost_card'; - const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist'; - const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available'; - const DECLINED_NO_ACTION_TAKEN = 'no_action_taken'; - const DECLINED_NOT_PERMITTED = 'not_permitted'; - const DECLINED_PICKUP_CARD = 'pickup_card'; - const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded'; - const DECLINED_PROCESSING_ERROR = 'processing_error'; - const DECLINED_REENTER_TRANSACTION = 'reenter_transaction'; - const DECLINED_RESTRICTED_CARD = 'restricted_card'; - const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations'; - const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization'; - const DECLINED_SECURITY_VIOLATION = 'security_violation'; - const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed'; - const DECLINED_STOLEN_CARD = 'stolen_card'; - const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order'; - const DECLINED_TESTMODE_DECLINE = 'testmode_decline'; - const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed'; - const DECLINED_TRY_AGAIN_LATER = 'try_again_later'; - const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded'; - - /** - * Possible string representations of the status of the charge. - * @link https://stripe.com/docs/api/charges/object#charge_object-status - */ - const STATUS_FAILED = 'failed'; - const STATUS_PENDING = 'pending'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; const STATUS_SUCCEEDED = 'succeeded'; /** - * @param array|null $params - * @param array|string|null $options + * Possible string representations of decline codes. + * These strings are applicable to the decline_code property of the \Stripe\Exception\CardException exception. * - * @return Charge The refunded charge. + * @see https://stripe.com/docs/declines/codes */ - public function refund($params = null, $options = null) - { - $url = $this->instanceUrl() . '/refund'; - list($response, $opts) = $this->_request('post', $url, $params, $options); - $this->refreshFrom($response, $opts); - return $this; - } + const DECLINED_AUTHENTICATION_REQUIRED = 'authentication_required'; + const DECLINED_APPROVE_WITH_ID = 'approve_with_id'; + const DECLINED_CALL_ISSUER = 'call_issuer'; + const DECLINED_CARD_NOT_SUPPORTED = 'card_not_supported'; + const DECLINED_CARD_VELOCITY_EXCEEDED = 'card_velocity_exceeded'; + const DECLINED_CURRENCY_NOT_SUPPORTED = 'currency_not_supported'; + const DECLINED_DO_NOT_HONOR = 'do_not_honor'; + const DECLINED_DO_NOT_TRY_AGAIN = 'do_not_try_again'; + const DECLINED_DUPLICATED_TRANSACTION = 'duplicate_transaction'; + const DECLINED_EXPIRED_CARD = 'expired_card'; + const DECLINED_FRAUDULENT = 'fraudulent'; + const DECLINED_GENERIC_DECLINE = 'generic_decline'; + const DECLINED_INCORRECT_NUMBER = 'incorrect_number'; + const DECLINED_INCORRECT_CVC = 'incorrect_cvc'; + const DECLINED_INCORRECT_PIN = 'incorrect_pin'; + const DECLINED_INCORRECT_ZIP = 'incorrect_zip'; + const DECLINED_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const DECLINED_INVALID_ACCOUNT = 'invalid_account'; + const DECLINED_INVALID_AMOUNT = 'invalid_amount'; + const DECLINED_INVALID_CVC = 'invalid_cvc'; + const DECLINED_INVALID_EXPIRY_YEAR = 'invalid_expiry_year'; + const DECLINED_INVALID_NUMBER = 'invalid_number'; + const DECLINED_INVALID_PIN = 'invalid_pin'; + const DECLINED_ISSUER_NOT_AVAILABLE = 'issuer_not_available'; + const DECLINED_LOST_CARD = 'lost_card'; + const DECLINED_MERCHANT_BLACKLIST = 'merchant_blacklist'; + const DECLINED_NEW_ACCOUNT_INFORMATION_AVAILABLE = 'new_account_information_available'; + const DECLINED_NO_ACTION_TAKEN = 'no_action_taken'; + const DECLINED_NOT_PERMITTED = 'not_permitted'; + const DECLINED_OFFLINE_PIN_REQUIRED = 'offline_pin_required'; + const DECLINED_ONLINE_OR_OFFLINE_PIN_REQUIRED = 'online_or_offline_pin_required'; + const DECLINED_PICKUP_CARD = 'pickup_card'; + const DECLINED_PIN_TRY_EXCEEDED = 'pin_try_exceeded'; + const DECLINED_PROCESSING_ERROR = 'processing_error'; + const DECLINED_REENTER_TRANSACTION = 'reenter_transaction'; + const DECLINED_RESTRICTED_CARD = 'restricted_card'; + const DECLINED_REVOCATION_OF_ALL_AUTHORIZATIONS = 'revocation_of_all_authorizations'; + const DECLINED_REVOCATION_OF_AUTHORIZATION = 'revocation_of_authorization'; + const DECLINED_SECURITY_VIOLATION = 'security_violation'; + const DECLINED_SERVICE_NOT_ALLOWED = 'service_not_allowed'; + const DECLINED_STOLEN_CARD = 'stolen_card'; + const DECLINED_STOP_PAYMENT_ORDER = 'stop_payment_order'; + const DECLINED_TESTMODE_DECLINE = 'testmode_decline'; + const DECLINED_TRANSACTION_NOT_ALLOWED = 'transaction_not_allowed'; + const DECLINED_TRY_AGAIN_LATER = 'try_again_later'; + const DECLINED_WITHDRAWAL_COUNT_LIMIT_EXCEEDED = 'withdrawal_count_limit_exceeded'; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Charge The captured charge. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Charge the captured charge */ - public function capture($params = null, $options = null) + public function capture($params = null, $opts = null) { $url = $this->instanceUrl() . '/capture'; - list($response, $opts) = $this->_request('post', $url, $params, $options); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $params - * @param array|string|null $options - * - * @deprecated Use the `save` method on the Dispute object - * - * @return array The updated dispute. - */ - public function updateDispute($params = null, $options = null) - { - $url = $this->instanceUrl() . '/dispute'; - list($response, $opts) = $this->_request('post', $url, $params, $options); - $this->refreshFrom(['dispute' => $response], $opts, true); - return $this->dispute; - } - - /** - * @param array|string|null $options - * - * @deprecated Use the `close` method on the Dispute object - * - * @return Charge The updated charge. - */ - public function closeDispute($options = null) - { - $url = $this->instanceUrl() . '/dispute/close'; - list($response, $opts) = $this->_request('post', $url, null, $options); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|string|null $opts - * - * @return Charge The updated charge. - */ - public function markAsFraudulent($opts = null) - { - $params = ['fraud_details' => ['user_report' => 'fraudulent']]; - $url = $this->instanceUrl(); list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); - return $this; - } - /** - * @param array|string|null $opts - * - * @return Charge The updated charge. - */ - public function markAsSafe($opts = null) - { - $params = ['fraud_details' => ['user_report' => 'safe']]; - $url = $this->instanceUrl(); - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php b/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php index 227dd7b6816..464a2b9a5cc 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php +++ b/htdocs/includes/stripe/stripe-php/lib/Checkout/Session.php @@ -1,39 +1,88 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Checkout; /** - * Class Session + * A Checkout Session represents your customer's session as they pay for one-time + * purchases or subscriptions through <a + * href="https://stripe.com/docs/payments/checkout">Checkout</a>. We recommend + * creating a new Session each time your customer attempts to pay. * - * @property string $id - * @property string $object - * @property string $cancel_url - * @property string $client_reference_id - * @property string $customer - * @property string $customer_email - * @property mixed $display_items - * @property bool $livemode - * @property string $payment_intent - * @property string[] $payment_method_types - * @property string $submit_type - * @property string $subscription - * @property string $success_url + * Once payment is successful, the Checkout Session will contain a reference to the + * <a href="https://stripe.com/docs/api/customers">Customer</a>, and either the + * successful <a + * href="https://stripe.com/docs/api/payment_intents">PaymentIntent</a> or an + * active <a href="https://stripe.com/docs/api/subscriptions">Subscription</a>. * - * @package Stripe + * You can create a Checkout Session on your server and pass its ID to the client + * to begin Checkout. + * + * Related guide: <a href="https://stripe.com/docs/payments/checkout/api">Checkout + * Server Quickstart</a>. + * + * @property string $id Unique identifier for the object. Used to pass to <code>redirectToCheckout</code> in Stripe.js. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|bool $allow_promotion_codes Enables user redeemable promotion codes. + * @property null|int $amount_subtotal Total of all items before discounts or taxes are applied. + * @property null|int $amount_total Total of all items after discounts and taxes are applied. + * @property null|string $billing_address_collection Describes whether Checkout should collect the customer's billing address. + * @property string $cancel_url The URL the customer will be directed to if they decide to cancel payment and return to your website. + * @property null|string $client_reference_id A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems. + * @property null|string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Customer $customer The ID of the customer for this session. For Checkout Sessions in <code>payment</code> or <code>subscription</code> mode, Checkout will create a new customer object based on information provided during the session unless an existing customer was provided when the session was created. + * @property null|string $customer_email If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file. To access information about the customer once a session is complete, use the <code>customer</code> attribute. + * @property \Stripe\Collection $line_items The line items purchased by the customer. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string $locale The IETF language tag of the locale Checkout is displayed in. If blank or <code>auto</code>, the browser's locale is used. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $mode The mode of the Checkout Session. + * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in <code>payment</code> mode. + * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. + * @property string $payment_status The payment status of the Checkout Session, one of <code>paid</code>, <code>unpaid</code>, or <code>no_payment_required</code>. You can use this value to decide when to fulfill your customer's order. + * @property null|string|\Stripe\SetupIntent $setup_intent The ID of the SetupIntent for Checkout Sessions in <code>setup</code> mode. + * @property null|\Stripe\StripeObject $shipping Shipping information for this Checkout Session. + * @property null|\Stripe\StripeObject $shipping_address_collection When set, provides configuration for Checkout to collect a shipping address from a customer. + * @property null|string $submit_type Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. <code>submit_type</code> can only be specified on Checkout Sessions in <code>payment</code> mode, but not Checkout Sessions in <code>subscription</code> or <code>setup</code> mode. + * @property null|string|\Stripe\Subscription $subscription The ID of the subscription for Checkout Sessions in <code>subscription</code> mode. + * @property string $success_url The URL the customer will be directed to after the payment or subscription creation is successful. + * @property null|\Stripe\StripeObject $total_details Tax and discount details for the computed total amount. */ class Session extends \Stripe\ApiResource { - const OBJECT_NAME = "checkout.session"; + const OBJECT_NAME = 'checkout.session'; + use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\NestedResource; use \Stripe\ApiOperations\Retrieve; + const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; + const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; + + const PAYMENT_STATUS_NO_PAYMENT_REQUIRED = 'no_payment_required'; + const PAYMENT_STATUS_PAID = 'paid'; + const PAYMENT_STATUS_UNPAID = 'unpaid'; + + const SUBMIT_TYPE_AUTO = 'auto'; + const SUBMIT_TYPE_BOOK = 'book'; + const SUBMIT_TYPE_DONATE = 'donate'; + const SUBMIT_TYPE_PAY = 'pay'; + + const PATH_LINE_ITEMS = '/line_items'; + /** - * Possible string representations of submit type. - * @link https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-submit_type + * @param string $id the ID of the session on which to retrieve the items + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of items */ - const SUBMIT_TYPE_AUTO = 'auto'; - const SUBMIT_TYPE_BOOK = 'book'; - const SUBMIT_TYPE_DONATE = 'donate'; - const SUBMIT_TYPE_PAY = 'pay'; + public static function allLineItems($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINE_ITEMS, $params, $opts); + } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Collection.php b/htdocs/includes/stripe/stripe-php/lib/Collection.php index 38d3835ff03..899299d3dad 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Collection.php +++ b/htdocs/includes/stripe/stripe-php/lib/Collection.php @@ -3,73 +3,118 @@ namespace Stripe; /** - * Class Collection + * Class Collection. * * @property string $object * @property string $url * @property bool $has_more - * @property mixed $data - * - * @package Stripe + * @property \Stripe\StripeObject[] $data */ -class Collection extends StripeObject implements \IteratorAggregate +class Collection extends StripeObject implements \Countable, \IteratorAggregate { - const OBJECT_NAME = "list"; + const OBJECT_NAME = 'list'; use ApiOperations\Request; - protected $_requestParams = []; + /** @var array */ + protected $filters = []; /** - * @return string The base URL for the given class. + * @return string the base URL for the given class */ public static function baseUrl() { return Stripe::$apiBase; } - public function setRequestParams($params) + /** + * Returns the filters. + * + * @return array the filters + */ + public function getFilters() { - $this->_requestParams = $params; + return $this->filters; + } + + /** + * Sets the filters, removing paging options. + * + * @param array $filters the filters + */ + public function setFilters($filters) + { + $this->filters = $filters; + } + + public function offsetGet($k) + { + if (\is_string($k)) { + return parent::offsetGet($k); + } + $msg = "You tried to access the {$k} index, but Collection " . + 'types only support string keys. (HINT: List calls ' . + 'return an object with a `data` (which is the data ' . + "array). You likely want to call ->data[{$k}])"; + + throw new Exception\InvalidArgumentException($msg); } public function all($params = null, $opts = null) { + self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); list($response, $opts) = $this->_request('get', $url, $params, $opts); - $this->_requestParams = $params; - return Util\Util::convertToStripeObject($response, $opts); + $obj = Util\Util::convertToStripeObject($response, $opts); + if (!($obj instanceof \Stripe\Collection)) { + throw new \Stripe\Exception\UnexpectedValueException( + 'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.' + ); + } + $obj->setFilters($params); + + return $obj; } public function create($params = null, $opts = null) { + self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->_requestParams = $params; + return Util\Util::convertToStripeObject($response, $opts); } public function retrieve($id, $params = null, $opts = null) { + self::_validateParams($params); list($url, $params) = $this->extractPathAndUpdateParams($params); $id = Util\Util::utf8($id); - $extn = urlencode($id); + $extn = \urlencode($id); list($response, $opts) = $this->_request( 'get', - "$url/$extn", + "{$url}/{$extn}", $params, $opts ); - $this->_requestParams = $params; + return Util\Util::convertToStripeObject($response, $opts); } /** - * @return \ArrayIterator An iterator that can be used to iterate - * across objects in the current page. + * @return int the number of objects in the current page + */ + public function count() + { + return \count($this->data); + } + + /** + * @return \ArrayIterator an iterator that can be used to iterate + * across objects in the current page */ public function getIterator() { @@ -77,29 +122,158 @@ class Collection extends StripeObject implements \IteratorAggregate } /** - * @return Util\AutoPagingIterator An iterator that can be used to iterate - * across all objects across all pages. As page boundaries are + * @return \ArrayIterator an iterator that can be used to iterate + * backwards across objects in the current page + */ + public function getReverseIterator() + { + return new \ArrayIterator(\array_reverse($this->data)); + } + + /** + * @return \Generator|StripeObject[] A generator that can be used to + * iterate across all objects across all pages. As page boundaries are * encountered, the next page will be fetched automatically for * continued iteration. */ public function autoPagingIterator() { - return new Util\AutoPagingIterator($this, $this->_requestParams); + $page = $this; + + while (true) { + $filters = $this->filters ?: []; + if (\array_key_exists('ending_before', $filters) + && !\array_key_exists('starting_after', $filters)) { + foreach ($page->getReverseIterator() as $item) { + yield $item; + } + $page = $page->previousPage(); + } else { + foreach ($page as $item) { + yield $item; + } + $page = $page->nextPage(); + } + + if ($page->isEmpty()) { + break; + } + } + } + + /** + * Returns an empty collection. This is returned from {@see nextPage()} + * when we know that there isn't a next page in order to replicate the + * behavior of the API when it attempts to return a page beyond the last. + * + * @param null|array|string $opts + * + * @return Collection + */ + public static function emptyCollection($opts = null) + { + return Collection::constructFrom(['data' => []], $opts); + } + + /** + * Returns true if the page object contains no element. + * + * @return bool + */ + public function isEmpty() + { + return empty($this->data); + } + + /** + * Fetches the next page in the resource list (if there is one). + * + * This method will try to respect the limit of the current page. If none + * was given, the default limit will be fetched again. + * + * @param null|array $params + * @param null|array|string $opts + * + * @return Collection + */ + public function nextPage($params = null, $opts = null) + { + if (!$this->has_more) { + return static::emptyCollection($opts); + } + + $lastId = \end($this->data)->id; + + $params = \array_merge( + $this->filters ?: [], + ['starting_after' => $lastId], + $params ?: [] + ); + + return $this->all($params, $opts); + } + + /** + * Fetches the previous page in the resource list (if there is one). + * + * This method will try to respect the limit of the current page. If none + * was given, the default limit will be fetched again. + * + * @param null|array $params + * @param null|array|string $opts + * + * @return Collection + */ + public function previousPage($params = null, $opts = null) + { + if (!$this->has_more) { + return static::emptyCollection($opts); + } + + $firstId = $this->data[0]->id; + + $params = \array_merge( + $this->filters ?: [], + ['ending_before' => $firstId], + $params ?: [] + ); + + return $this->all($params, $opts); + } + + /** + * Gets the first item from the current page. Returns `null` if the current page is empty. + * + * @return null|\Stripe\StripeObject + */ + public function first() + { + return \count($this->data) > 0 ? $this->data[0] : null; + } + + /** + * Gets the last item from the current page. Returns `null` if the current page is empty. + * + * @return null|\Stripe\StripeObject + */ + public function last() + { + return \count($this->data) > 0 ? $this->data[\count($this->data) - 1] : null; } private function extractPathAndUpdateParams($params) { - $url = parse_url($this->url); + $url = \parse_url($this->url); if (!isset($url['path'])) { - throw new Error\Api("Could not parse list url into parts: $url"); + throw new Exception\UnexpectedValueException("Could not parse list url into parts: {$url}"); } if (isset($url['query'])) { // If the URL contains a query param, parse it out into $params so they // don't interact weirdly with each other. $query = []; - parse_str($url['query'], $query); - $params = array_merge($params ?: [], $query); + \parse_str($url['query'], $query); + $params = \array_merge($params ?: [], $query); } return [$url['path'], $params]; diff --git a/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php b/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php index ef02c340b5e..223afb316a5 100644 --- a/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php +++ b/htdocs/includes/stripe/stripe-php/lib/CountrySpec.php @@ -1,24 +1,29 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class CountrySpec + * Stripe needs to collect certain pieces of information about each account + * created. These requirements can differ depending on the account's country. The + * Country Specs API makes these rules available to your integration. * - * @property string $id - * @property string $object - * @property string $default_currency - * @property mixed $supported_bank_account_currencies - * @property string[] $supported_payment_currencies - * @property string[] $supported_payment_methods - * @property string[] $supported_transfer_countries - * @property mixed $verification_fields + * You can also view the information from this API call as <a + * href="/docs/connect/required-verification-information">an online guide</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. Represented as the ISO country code for this country. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $default_currency The default currency for this country. This applies to both payment methods and bank accounts. + * @property \Stripe\StripeObject $supported_bank_account_currencies Currencies that can be accepted in the specific country (for transfers). + * @property string[] $supported_payment_currencies Currencies that can be accepted in the specified country (for payments). + * @property string[] $supported_payment_methods Payment methods available in the specified country. You may need to enable some payment methods (e.g., <a href="https://stripe.com/docs/ach">ACH</a>) on your account before they appear in this list. The <code>stripe</code> payment method refers to <a href="https://stripe.com/docs/connect/destination-charges">charging through your platform</a>. + * @property string[] $supported_transfer_countries Countries that can accept transfers from the specified country. + * @property \Stripe\StripeObject $verification_fields */ class CountrySpec extends ApiResource { - const OBJECT_NAME = "country_spec"; + const OBJECT_NAME = 'country_spec'; use ApiOperations\All; use ApiOperations\Retrieve; diff --git a/htdocs/includes/stripe/stripe-php/lib/Coupon.php b/htdocs/includes/stripe/stripe-php/lib/Coupon.php index 76d549ad90d..41afdcfc9b7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Coupon.php +++ b/htdocs/includes/stripe/stripe-php/lib/Coupon.php @@ -1,31 +1,37 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Coupon + * A coupon contains information about a percent-off or amount-off discount you + * might want to apply to a customer. Coupons may be applied to <a + * href="https://stripe.com/docs/api#invoices">invoices</a> or <a + * href="https://stripe.com/docs/api#create_order-coupon">orders</a>. Coupons do + * not work with conventional one-off <a + * href="https://stripe.com/docs/api#create_charge">charges</a>. * - * @property string $id - * @property string $object - * @property int $amount_off - * @property int $created - * @property string $currency - * @property string $duration - * @property int $duration_in_months - * @property bool $livemode - * @property int $max_redemptions - * @property StripeObject $metadata - * @property string $name - * @property float $percent_off - * @property int $redeem_by - * @property int $times_redeemed - * @property bool $valid - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|int $amount_off Amount (in the <code>currency</code> specified) that will be taken off the subtotal of any invoices for this customer. + * @property \Stripe\StripeObject $applies_to + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency If <code>amount_off</code> has been set, the three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> of the amount to take off. + * @property string $duration One of <code>forever</code>, <code>once</code>, and <code>repeating</code>. Describes how long a customer who applies this coupon will get the discount. + * @property null|int $duration_in_months If <code>duration</code> is <code>repeating</code>, the number of months the coupon applies. Null if coupon <code>duration</code> is <code>forever</code> or <code>once</code>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|int $max_redemptions Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name Name of the coupon displayed to customers on for instance invoices or receipts. + * @property null|float $percent_off Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead. + * @property null|int $redeem_by Date after which the coupon can no longer be redeemed. + * @property int $times_redeemed Number of times this coupon has been applied to a customer. + * @property bool $valid Taking account of the above properties, whether this coupon can still be applied to a customer. */ class Coupon extends ApiResource { - const OBJECT_NAME = "coupon"; + const OBJECT_NAME = 'coupon'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/CreditNote.php b/htdocs/includes/stripe/stripe-php/lib/CreditNote.php index c81d86ee66d..cc523a9f7a6 100644 --- a/htdocs/includes/stripe/stripe-php/lib/CreditNote.php +++ b/htdocs/includes/stripe/stripe-php/lib/CreditNote.php @@ -1,73 +1,111 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class CreditNote + * Issue a credit note to adjust an invoice's amount after the invoice is + * finalized. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $customer_balance_transaction - * @property int $created - * @property string $currency - * @property string $customer - * @property string $invoice - * @property bool $livemode - * @property string $memo - * @property StripeObject $metadata - * @property string $number - * @property string $pdf - * @property string $reason - * @property string $refund - * @property string $status - * @property string $type + * Related guide: <a + * href="https://stripe.com/docs/billing/invoices/credit-notes">Credit Notes</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The integer amount in %s representing the total amount of the credit note, including tax. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string|\Stripe\Customer $customer ID of the customer. + * @property null|string|\Stripe\CustomerBalanceTransaction $customer_balance_transaction Customer balance transaction related to this credit note. + * @property int $discount_amount The integer amount in %s representing the total amount of discount that was credited. + * @property \Stripe\StripeObject[] $discount_amounts The aggregate amounts calculated per discount for all line items. + * @property string|\Stripe\Invoice $invoice ID of the invoice. + * @property \Stripe\Collection $lines Line items that make up the credit note + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string $memo Customer-facing text that appears on the credit note PDF. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $number A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. + * @property null|int $out_of_band_amount Amount that was credited outside of Stripe. + * @property string $pdf The link to download the PDF of the credit note. + * @property null|string $reason Reason for issuing this credit note, one of <code>duplicate</code>, <code>fraudulent</code>, <code>order_change</code>, or <code>product_unsatisfactory</code> + * @property null|string|\Stripe\Refund $refund Refund related to this credit note. + * @property string $status Status of this credit note, one of <code>issued</code> or <code>void</code>. Learn more about <a href="https://stripe.com/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>. + * @property int $subtotal The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. + * @property \Stripe\StripeObject[] $tax_amounts The aggregate amounts calculated per tax rate for all line items. + * @property int $total The integer amount in %s representing the total amount of the credit note, including tax and all discount. + * @property string $type Type of this credit note, one of <code>pre_payment</code> or <code>post_payment</code>. A <code>pre_payment</code> credit note means it was issued when the invoice was open. A <code>post_payment</code> credit note means it was issued when the invoice was paid. + * @property null|int $voided_at The time that the credit note was voided. */ class CreditNote extends ApiResource { - const OBJECT_NAME = "credit_note"; + const OBJECT_NAME = 'credit_note'; use ApiOperations\All; use ApiOperations\Create; + use ApiOperations\NestedResource; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the credit note reason. - * @link https://stripe.com/docs/api/credit_notes/object#credit_note_object-reason - */ - const REASON_DUPLICATE = 'duplicate'; - const REASON_FRAUDULENT = 'fraudulent'; - const REASON_ORDER_CHANGE = 'order_change'; + const REASON_DUPLICATE = 'duplicate'; + const REASON_FRAUDULENT = 'fraudulent'; + const REASON_ORDER_CHANGE = 'order_change'; const REASON_PRODUCT_UNSATISFACTORY = 'product_unsatisfactory'; - /** - * Possible string representations of the credit note status. - * @link https://stripe.com/docs/api/credit_notes/object#credit_note_object-status - */ const STATUS_ISSUED = 'issued'; - const STATUS_VOID = 'void'; + const STATUS_VOID = 'void'; - /** - * Possible string representations of the credit note type. - * @link https://stripe.com/docs/api/credit_notes/object#credit_note_object-status - */ const TYPE_POST_PAYMENT = 'post_payment'; - const TYPE_PRE_PAYMENT = 'pre_payment'; + const TYPE_PRE_PAYMENT = 'pre_payment'; /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return CreditNote The voided credit note. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote the previewed credit note + */ + public static function preview($params = null, $opts = null) + { + $url = static::classUrl() . '/preview'; + list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); + $obj = Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return CreditNote the voided credit note */ public function voidCreditNote($params = null, $opts = null) { $url = $this->instanceUrl() . '/void'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } + + const PATH_LINES = '/lines'; + + /** + * @param string $id the ID of the credit note on which to retrieve the credit note line items + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of credit note line items + */ + public static function allLines($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); + } } diff --git a/htdocs/includes/stripe/stripe-php/lib/CreditNoteLineItem.php b/htdocs/includes/stripe/stripe-php/lib/CreditNoteLineItem.php new file mode 100644 index 00000000000..254886b75d7 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/CreditNoteLineItem.php @@ -0,0 +1,26 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + * @property null|string $description Description of the item being credited. + * @property int $discount_amount The integer amount in %s representing the discount being credited for this line item. + * @property \Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item + * @property string $invoice_line_item ID of the invoice line item being credited + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|int $quantity The number of units of product being credited. + * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item + * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. + * @property string $type The type of the credit note line item, one of <code>invoice_line_item</code> or <code>custom_line_item</code>. When the type is <code>invoice_line_item</code> there is an additional <code>invoice_line_item</code> property on the resource the value of which is the id of the credited line item on the invoice. + * @property null|int $unit_amount The cost of each unit of product being credited. + * @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places. + */ +class CreditNoteLineItem extends ApiResource +{ + const OBJECT_NAME = 'credit_note_line_item'; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Customer.php b/htdocs/includes/stripe/stripe-php/lib/Customer.php index a3f7f6311da..c3a42cd8aa1 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Customer.php +++ b/htdocs/includes/stripe/stripe-php/lib/Customer.php @@ -1,39 +1,47 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Customer + * <code>Customer</code> objects allow you to perform recurring charges, and to + * track multiple charges, that are associated with the same customer. The API + * allows you to create, delete, and update your customers. You can retrieve + * individual customers as well as a list of all your customers. * - * @property string $id - * @property string $object - * @property mixed $address - * @property int $balance - * @property string $created - * @property string $currency - * @property string $default_source - * @property bool $delinquent - * @property string $description - * @property Discount $discount - * @property string $email - * @property string $invoice_prefix - * @property mixed $invoice_settings - * @property bool $livemode - * @property StripeObject $metadata - * @property string $name - * @property string $phone - * @property string[] preferred_locales - * @property mixed $shipping - * @property Collection $sources - * @property Collection $subscriptions - * @property string $tax_exempt - * @property Collection $tax_ids + * Related guide: <a + * href="https://stripe.com/docs/payments/save-during-payment">Save a card during + * payment</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\Stripe\StripeObject $address The customer's address. + * @property int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> the customer can be charged in for recurring billing purposes. + * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source <p>ID of the default payment source for the customer.</p><p>If you are using payment methods created via the PaymentMethods API, see the <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p> + * @property null|bool $delinquent <p>When the customer's latest invoice is billed by charging automatically, <code>delinquent</code> is <code>true</code> if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, <code>delinquent</code> is <code>true</code> if the invoice isn't paid by its due date.</p><p>If an invoice is marked uncollectible by <a href="https://stripe.com/docs/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't get reset to <code>false</code>.</p> + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one. + * @property null|string $email The customer's email address. + * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers. + * @property \Stripe\StripeObject $invoice_settings + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $name The customer's full name or business name. + * @property int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001. + * @property null|string $phone The customer's phone number. + * @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference. + * @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + * @property \Stripe\Collection $sources The customer's payment sources, if any. + * @property \Stripe\Collection $subscriptions The customer's current subscriptions, if any. + * @property null|string $tax_exempt Describes the customer's tax exemption status. One of <code>none</code>, <code>exempt</code>, or <code>reverse</code>. When set to <code>reverse</code>, invoice and receipt PDFs include the text <strong>&quot;Reverse charge&quot;</strong>. + * @property \Stripe\Collection $tax_ids The customer's tax IDs. */ class Customer extends ApiResource { - const OBJECT_NAME = "customer"; + const OBJECT_NAME = 'customer'; use ApiOperations\All; use ApiOperations\Create; @@ -42,236 +50,59 @@ class Customer extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the customer's type of tax exemption. - * @link https://stripe.com/docs/api/customers/object#customer_object-tax_exempt - */ - const TAX_EXEMPT_NONE = 'none'; - const TAX_EXEMPT_EXEMPT = 'exempt'; + const TAX_EXEMPT_EXEMPT = 'exempt'; + const TAX_EXEMPT_NONE = 'none'; const TAX_EXEMPT_REVERSE = 'reverse'; public static function getSavedNestedResources() { static $savedNestedResources = null; - if ($savedNestedResources === null) { + if (null === $savedNestedResources) { $savedNestedResources = new Util\Set([ 'source', ]); } + return $savedNestedResources; } - const PATH_BALANCE_TRANSACTIONS = '/balance_transactions'; - const PATH_SOURCES = '/sources'; - const PATH_TAX_IDS = '/tax_ids'; - /** - * @param array|null $params + * @param null|array $params + * @param null|array|string $opts * - * @return InvoiceItem The resulting invoice item. + * @return \Stripe\Customer the updated customer */ - public function addInvoiceItem($params = null) - { - $params = $params ?: []; - $params['customer'] = $this->id; - $ii = InvoiceItem::create($params, $this->_opts); - return $ii; - } - - /** - * @param array|null $params - * - * @return array An array of the customer's Invoices. - */ - public function invoices($params = null) - { - $params = $params ?: []; - $params['customer'] = $this->id; - $invoices = Invoice::all($params, $this->_opts); - return $invoices; - } - - /** - * @param array|null $params - * - * @return array An array of the customer's InvoiceItems. - */ - public function invoiceItems($params = null) - { - $params = $params ?: []; - $params['customer'] = $this->id; - $iis = InvoiceItem::all($params, $this->_opts); - return $iis; - } - - /** - * @param array|null $params - * - * @return array An array of the customer's Charges. - */ - public function charges($params = null) - { - $params = $params ?: []; - $params['customer'] = $this->id; - $charges = Charge::all($params, $this->_opts); - return $charges; - } - - /** - * @param array|null $params - * - * @return Subscription The updated subscription. - */ - public function updateSubscription($params = null) - { - $url = $this->instanceUrl() . '/subscription'; - list($response, $opts) = $this->_request('post', $url, $params); - $this->refreshFrom(['subscription' => $response], $opts, true); - return $this->subscription; - } - - /** - * @param array|null $params - * - * @return Subscription The cancelled subscription. - */ - public function cancelSubscription($params = null) - { - $url = $this->instanceUrl() . '/subscription'; - list($response, $opts) = $this->_request('delete', $url, $params); - $this->refreshFrom(['subscription' => $response], $opts, true); - return $this->subscription; - } - - /** - * @return Customer The updated customer. - */ - public function deleteDiscount() + public function deleteDiscount($params = null, $opts = null) { $url = $this->instanceUrl() . '/discount'; - list($response, $opts) = $this->_request('delete', $url); + list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom(['discount' => null], $opts, true); } + const PATH_BALANCE_TRANSACTIONS = '/balance_transactions'; + /** - * @param string|null $id The ID of the customer on which to create the source. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the customer on which to retrieve the customer balance transactions + * @param null|array $params + * @param null|array|string $opts * - * @return ApiResource + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of customer balance transactions */ - public static function createSource($id, $params = null, $opts = null) + public static function allBalanceTransactions($id, $params = null, $opts = null) { - return self::_createNestedResource($id, static::PATH_SOURCES, $params, $opts); + return self::_allNestedResources($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts); } /** - * @param string|null $id The ID of the customer to which the source belongs. - * @param string|null $sourceId The ID of the source to retrieve. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the customer on which to create the customer balance transaction + * @param null|array $params + * @param null|array|string $opts * - * @return ApiResource - */ - public static function retrieveSource($id, $sourceId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer to which the source belongs. - * @param string|null $sourceId The ID of the source to update. - * @param array|null $params - * @param array|string|null $opts + * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return ApiResource - */ - public static function updateSource($id, $sourceId, $params = null, $opts = null) - { - return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer to which the source belongs. - * @param string|null $sourceId The ID of the source to delete. - * @param array|null $params - * @param array|string|null $opts - * - * @return ApiResource - */ - public static function deleteSource($id, $sourceId, $params = null, $opts = null) - { - return self::_deleteNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer on which to retrieve the sources. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of sources. - */ - public static function allSources($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_SOURCES, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer on which to create the tax id. - * @param array|null $params - * @param array|string|null $opts - * - * @return ApiResource - */ - public static function createTaxId($id, $params = null, $opts = null) - { - return self::_createNestedResource($id, static::PATH_TAX_IDS, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer to which the tax id belongs. - * @param string|null $taxIdId The ID of the tax id to retrieve. - * @param array|null $params - * @param array|string|null $opts - * - * @return ApiResource - */ - public static function retrieveTaxId($id, $taxIdId, $params = null, $opts = null) - { - return self::_retrieveNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer to which the tax id belongs. - * @param string|null $taxIdId The ID of the tax id to delete. - * @param array|null $params - * @param array|string|null $opts - * - * @return ApiResource - */ - public static function deleteTaxId($id, $taxIdId, $params = null, $opts = null) - { - return self::_deleteNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer on which to retrieve the tax ids. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of tax ids. - */ - public static function allTaxIds($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_TAX_IDS, $params, $opts); - } - - /** - * @param string|null $id The ID of the customer on which to create the balance transaction. - * @param array|null $params - * @param array|string|null $opts - * - * @return ApiResource + * @return \Stripe\CustomerBalanceTransaction */ public static function createBalanceTransaction($id, $params = null, $opts = null) { @@ -279,12 +110,14 @@ class Customer extends ApiResource } /** - * @param string|null $id The ID of the customer to which the balance transaction belongs. - * @param string|null $balanceTransactionId The ID of the balance transaction to retrieve. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the customer to which the customer balance transaction belongs + * @param string $balanceTransactionId the ID of the customer balance transaction to retrieve + * @param null|array $params + * @param null|array|string $opts * - * @return ApiResource + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CustomerBalanceTransaction */ public static function retrieveBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null) { @@ -292,28 +125,152 @@ class Customer extends ApiResource } /** - * @param string|null $id The ID of the customer on which to update the balance transaction. - * @param string|null $balanceTransactionId The ID of the balance transaction to update. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the customer to which the customer balance transaction belongs + * @param string $balanceTransactionId the ID of the customer balance transaction to update + * @param null|array $params + * @param null|array|string $opts * + * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return ApiResource + * @return \Stripe\CustomerBalanceTransaction */ public static function updateBalanceTransaction($id, $balanceTransactionId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_BALANCE_TRANSACTIONS, $balanceTransactionId, $params, $opts); } + const PATH_SOURCES = '/sources'; + /** - * @param string|null $id The ID of the customer on which to retrieve the customer balance transactions. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the customer on which to retrieve the payment sources + * @param null|array $params + * @param null|array|string $opts * - * @return Collection The list of customer balance transactions. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of payment sources (AlipayAccount, BankAccount, BitcoinReceiver, Card or Source) */ - public static function allBalanceTransactions($id, $params = null, $opts = null) + public static function allSources($id, $params = null, $opts = null) { - return self::_allNestedResources($id, static::PATH_BALANCE_TRANSACTIONS, $params, $opts); + return self::_allNestedResources($id, static::PATH_SOURCES, $params, $opts); + } + + /** + * @param string $id the ID of the customer on which to create the payment source + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public static function createSource($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_SOURCES, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public static function deleteSource($id, $sourceId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public static function retrieveSource($id, $sourceId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the payment source belongs + * @param string $sourceId the ID of the payment source to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public static function updateSource($id, $sourceId, $params = null, $opts = null) + { + return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts); + } + + const PATH_TAX_IDS = '/tax_ids'; + + /** + * @param string $id the ID of the customer on which to retrieve the tax ids + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of tax ids + */ + public static function allTaxIds($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_TAX_IDS, $params, $opts); + } + + /** + * @param string $id the ID of the customer on which to create the tax id + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public static function createTaxId($id, $params = null, $opts = null) + { + return self::_createNestedResource($id, static::PATH_TAX_IDS, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the tax id belongs + * @param string $taxIdId the ID of the tax id to delete + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public static function deleteTaxId($id, $taxIdId, $params = null, $opts = null) + { + return self::_deleteNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); + } + + /** + * @param string $id the ID of the customer to which the tax id belongs + * @param string $taxIdId the ID of the tax id to retrieve + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public static function retrieveTaxId($id, $taxIdId, $params = null, $opts = null) + { + return self::_retrieveNestedResource($id, static::PATH_TAX_IDS, $taxIdId, $params, $opts); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php index 06cafcd45c6..8c306760dbc 100644 --- a/htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/CustomerBalanceTransaction.php @@ -1,52 +1,60 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class CustomerBalanceTransaction + * Each customer has a <a + * href="https://stripe.com/docs/api/customers/object#customer_object-balance"><code>balance</code></a> + * value, which denotes a debit or credit that's automatically applied to their + * next invoice upon finalization. You may modify the value directly by using the + * <a href="https://stripe.com/docs/api/customers/update">update customer API</a>, + * or by creating a Customer Balance Transaction, which increments or decrements + * the customer's <code>balance</code> by the specified <code>amount</code>. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/billing/customer/balance">Customer Balance</a> to + * learn more. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $credit_note - * @property int $created - * @property string $currency - * @property string $customer - * @property string $description - * @property int $ending_balance - * @property string $invoice - * @property bool $livemode - * @property StripeObject $metadata - * @property string $type + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's <code>balance</code>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\CreditNote $credit_note The ID of the credit note (if any) related to the transaction. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string|\Stripe\Customer $customer The ID of the customer the transaction belongs to. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property int $ending_balance The customer's <code>balance</code> after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + * @property null|string|\Stripe\Invoice $invoice The ID of the invoice (if any) related to the transaction. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $type Transaction type: <code>adjustment</code>, <code>applied_to_invoice</code>, <code>credit_note</code>, <code>initial</code>, <code>invoice_too_large</code>, <code>invoice_too_small</code>, <code>unspent_receiver_credit</code>, or <code>unapplied_from_invoice</code>. See the <a href="https://stripe.com/docs/billing/customer/balance#types">Customer Balance page</a> to learn more about transaction types. */ class CustomerBalanceTransaction extends ApiResource { - const OBJECT_NAME = "customer_balance_transaction"; + const OBJECT_NAME = 'customer_balance_transaction'; - /** - * Possible string representations of a balance transaction's type. - * @link https://stripe.com/docs/api/customers/customer_balance_transaction_object#customer_balance_transaction_object-type - */ - const TYPE_ADJUSTEMENT = 'adjustment'; - const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice'; - const TYPE_CREDIT_NOTE = 'credit_note'; - const TYPE_INITIAL = 'initial'; - const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large'; - const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small'; + const TYPE_ADJUSTMENT = 'adjustment'; + const TYPE_APPLIED_TO_INVOICE = 'applied_to_invoice'; + const TYPE_CREDIT_NOTE = 'credit_note'; + const TYPE_INITIAL = 'initial'; + const TYPE_INVOICE_TOO_LARGE = 'invoice_too_large'; + const TYPE_INVOICE_TOO_SMALL = 'invoice_too_small'; const TYPE_UNSPENT_RECEIVER_CREDIT = 'unspent_receiver_credit'; + const TYPE_ADJUSTEMENT = 'adjustment'; + /** - * @return string The API URL for this balance transaction. + * @return string the API URL for this balance transaction */ public function instanceUrl() { $id = $this['id']; $customer = $this['customer']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: class instance has invalid ID: $id", + throw new Exception\UnexpectedValueException( + "Could not determine which URL to request: class instance has invalid ID: {$id}", null ); } @@ -54,35 +62,42 @@ class CustomerBalanceTransaction extends ApiResource $customer = Util\Util::utf8($customer); $base = Customer::classUrl(); - $customerExtn = urlencode($customer); - $extn = urlencode($id); - return "$base/$customerExtn/balance_transactions/$extn"; + $customerExtn = \urlencode($customer); + $extn = \urlencode($id); + + return "{$base}/{$customerExtn}/balance_transactions/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Customer Balance Transactions cannot be accessed without a customer ID. " . - "Retrieve a balance transaction using Customer::retrieveBalanceTransaction('cus_123', 'cbtxn_123') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Customer Balance Transactions cannot be retrieved without a ' . + 'customer ID. Retrieve a Customer Balance Transaction using ' . + "`Customer::retrieveBalanceTransaction('customer_id', " . + "'balance_transaction_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Customer Balance Transactions cannot be accessed without a customer ID. " . - "Update a balance transaction using Customer::updateBalanceTransaction('cus_123', 'cbtxn_123', \$params) instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Customer Balance Transactions cannot be updated without a ' . + 'customer ID. Update a Customer Balance Transaction using ' . + "`Customer::updateBalanceTransaction('customer_id', " . + "'balance_transaction_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Discount.php b/htdocs/includes/stripe/stripe-php/lib/Discount.php index 68bfc0fd74a..18a7470d447 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Discount.php +++ b/htdocs/includes/stripe/stripe-php/lib/Discount.php @@ -3,18 +3,22 @@ namespace Stripe; /** - * Class Discount + * Class Discount. * * @property string $object - * @property Coupon $coupon - * @property string $customer - * @property int $end - * @property int $start - * @property string $subscription - * - * @package Stripe + * @property string $checkout_session The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + * @property \Stripe\Coupon $coupon Hash describing the coupon applied to create this discount. + * @property string|\Stripe\Customer $customer The ID of the customer associated with this discount. + * @property int $end If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. + * @property string $id The ID of the discount object. + * @property string $invoice The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice. + * @property string $invoice_item The invoice item id (or invoice line item id for invoice line items of type=‘subscription’) that the discount’s coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + * @property string $object String representing the object’s type. Objects of the same type share the same value. + * @property string $promotion_code The promotion code applied to create this discount. + * @property int $start Date that the coupon was applied. + * @property string $subscription The subscription that this coupon is applied to, if it is applied to a particular subscription. */ class Discount extends StripeObject { - const OBJECT_NAME = "discount"; + const OBJECT_NAME = 'discount'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Dispute.php b/htdocs/includes/stripe/stripe-php/lib/Dispute.php index 8ffc2d4cc73..5772accc531 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Dispute.php +++ b/htdocs/includes/stripe/stripe-php/lib/Dispute.php @@ -1,77 +1,82 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Dispute + * A dispute occurs when a customer questions your charge with their card issuer. + * When this happens, you're given the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. You can find more information + * about the dispute process in our <a href="/docs/disputes">Disputes and Fraud</a> + * documentation. * - * @property string $id - * @property string $object - * @property int $amount - * @property BalanceTransaction[] $balance_transactions - * @property string $charge - * @property int $created - * @property string $currency - * @property mixed $evidence - * @property mixed $evidence_details - * @property bool $is_charge_refundable - * @property bool $livemode - * @property StripeObject $metadata - * @property string $reason - * @property string $status + * Related guide: <a href="https://stripe.com/docs/disputes">Disputes and + * Fraud</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). + * @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + * @property string|\Stripe\Charge $charge ID of the charge that was disputed. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property \Stripe\StripeObject $evidence + * @property \Stripe\StripeObject $evidence_details + * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $network_reason_code Network-dependent reason code for the dispute. + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed. + * @property string $reason Reason given by cardholder for dispute. Possible values are <code>bank_cannot_process</code>, <code>check_returned</code>, <code>credit_not_processed</code>, <code>customer_initiated</code>, <code>debit_not_authorized</code>, <code>duplicate</code>, <code>fraudulent</code>, <code>general</code>, <code>incorrect_account_details</code>, <code>insufficient_funds</code>, <code>product_not_received</code>, <code>product_unacceptable</code>, <code>subscription_canceled</code>, or <code>unrecognized</code>. Read more about <a href="https://stripe.com/docs/disputes/categories">dispute reasons</a>. + * @property string $status Current status of dispute. Possible values are <code>warning_needs_response</code>, <code>warning_under_review</code>, <code>warning_closed</code>, <code>needs_response</code>, <code>under_review</code>, <code>charge_refunded</code>, <code>won</code>, or <code>lost</code>. */ class Dispute extends ApiResource { - const OBJECT_NAME = "dispute"; + const OBJECT_NAME = 'dispute'; use ApiOperations\All; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of dispute reasons. - * @link https://stripe.com/docs/api#dispute_object - */ - const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process'; - const REASON_CHECK_RETURNED = 'check_returned'; - const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed'; - const REASON_CUSTOMER_INITIATED = 'customer_initiated'; - const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; - const REASON_DUPLICATE = 'duplicate'; - const REASON_FRAUDULENT = 'fraudulent'; - const REASON_GENERAL = 'general'; + const REASON_BANK_CANNOT_PROCESS = 'bank_cannot_process'; + const REASON_CHECK_RETURNED = 'check_returned'; + const REASON_CREDIT_NOT_PROCESSED = 'credit_not_processed'; + const REASON_CUSTOMER_INITIATED = 'customer_initiated'; + const REASON_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; + const REASON_DUPLICATE = 'duplicate'; + const REASON_FRAUDULENT = 'fraudulent'; + const REASON_GENERAL = 'general'; const REASON_INCORRECT_ACCOUNT_DETAILS = 'incorrect_account_details'; - const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds'; - const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received'; - const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable'; - const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled'; - const REASON_UNRECOGNIZED = 'unrecognized'; + const REASON_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const REASON_PRODUCT_NOT_RECEIVED = 'product_not_received'; + const REASON_PRODUCT_UNACCEPTABLE = 'product_unacceptable'; + const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled'; + const REASON_UNRECOGNIZED = 'unrecognized'; - /** - * Possible string representations of dispute statuses. - * @link https://stripe.com/docs/api#dispute_object - */ - const STATUS_CHARGE_REFUNDED = 'charge_refunded'; - const STATUS_LOST = 'lost'; - const STATUS_NEEDS_RESPONSE = 'needs_response'; - const STATUS_UNDER_REVIEW = 'under_review'; - const STATUS_WARNING_CLOSED = 'warning_closed'; + const STATUS_CHARGE_REFUNDED = 'charge_refunded'; + const STATUS_LOST = 'lost'; + const STATUS_NEEDS_RESPONSE = 'needs_response'; + const STATUS_UNDER_REVIEW = 'under_review'; + const STATUS_WARNING_CLOSED = 'warning_closed'; const STATUS_WARNING_NEEDS_RESPONSE = 'warning_needs_response'; - const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review'; - const STATUS_WON = 'won'; + const STATUS_WARNING_UNDER_REVIEW = 'warning_under_review'; + const STATUS_WON = 'won'; /** - * @param array|string|null $options + * @param null|array|string $opts * - * @return Dispute The closed dispute. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Dispute the closed dispute */ - public function close($options = null) + // TODO: add $params to standardize signature + public function close($opts = null) { $url = $this->instanceUrl() . '/close'; - list($response, $opts) = $this->_request('post', $url, null, $options); + list($response, $opts) = $this->_request('post', $url, null, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php b/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php index ea4cc756ccd..253256cfd39 100644 --- a/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php +++ b/htdocs/includes/stripe/stripe-php/lib/EphemeralKey.php @@ -1,40 +1,43 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class EphemeralKey - * - * @property string $id - * @property string $object - * @property int $created - * @property int $expires - * @property bool $livemode - * @property string $secret + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $expires Time at which the key will expire. Measured in seconds since the Unix epoch. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property string $secret The key's secret. You can use this value to make authorized requests to the Stripe API. * @property array $associated_objects - * - * @package Stripe */ class EphemeralKey extends ApiResource { - const OBJECT_NAME = "ephemeral_key"; + const OBJECT_NAME = 'ephemeral_key'; use ApiOperations\Create { create as protected _create; } + use ApiOperations\Delete; /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return EphemeralKey The created key. + * @throws \Stripe\Exception\InvalidArgumentException if stripe_version is missing + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\EphemeralKey the created key */ public static function create($params = null, $opts = null) { - if (!$opts['stripe_version']) { - throw new \InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); + if (!$opts || !isset($opts['stripe_version'])) { + throw new Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); } + return self::_create($params, $opts); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/ErrorObject.php b/htdocs/includes/stripe/stripe-php/lib/ErrorObject.php new file mode 100644 index 00000000000..a9fe1a3b279 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/ErrorObject.php @@ -0,0 +1,164 @@ +<?php + +namespace Stripe; + +/** + * Class ErrorObject. + * + * @property string $charge For card errors, the ID of the failed charge. + * @property string $code For some errors that could be handled + * programmatically, a short string indicating the error code reported. + * @property string $decline_code For card errors resulting from a card issuer + * decline, a short string indicating the card issuer's reason for the + * decline if they provide one. + * @property string $doc_url A URL to more information about the error code + * reported. + * @property string $message A human-readable message providing more details + * about the error. For card errors, these messages can be shown to your + * users. + * @property string $param If the error is parameter-specific, the parameter + * related to the error. For example, you can use this to display a message + * near the correct form field. + * @property PaymentIntent $payment_intent The PaymentIntent object for errors + * returned on a request involving a PaymentIntent. + * @property PaymentMethod $payment_method The PaymentMethod object for errors + * returned on a request involving a PaymentMethod. + * @property string $payment_method_type If the error is specific to the type + * of payment method, the payment method type that had a problem. This + * field is only populated for invoice-related errors. + * @property SetupIntent $setup_intent The SetupIntent object for errors + * returned on a request involving a SetupIntent. + * @property StripeObject $source The source object for errors returned on a + * request involving a source. + * @property string $type The type of error returned. One of + * `api_connection_error`, `api_error`, `authentication_error`, + * `card_error`, `idempotency_error`, `invalid_request_error`, or + * `rate_limit_error`. + */ +class ErrorObject extends StripeObject +{ + /** + * Possible string representations of an error's code. + * + * @see https://stripe.com/docs/error-codes + */ + const CODE_ACCOUNT_ALREADY_EXISTS = 'account_already_exists'; + const CODE_ACCOUNT_COUNTRY_INVALID_ADDRESS = 'account_country_invalid_address'; + const CODE_ACCOUNT_INVALID = 'account_invalid'; + const CODE_ACCOUNT_NUMBER_INVALID = 'account_number_invalid'; + const CODE_ALIPAY_UPGRADE_REQUIRED = 'alipay_upgrade_required'; + const CODE_AMOUNT_TOO_LARGE = 'amount_too_large'; + const CODE_AMOUNT_TOO_SMALL = 'amount_too_small'; + const CODE_API_KEY_EXPIRED = 'api_key_expired'; + const CODE_BALANCE_INSUFFICIENT = 'balance_insufficient'; + const CODE_BANK_ACCOUNT_EXISTS = 'bank_account_exists'; + const CODE_BANK_ACCOUNT_UNUSABLE = 'bank_account_unusable'; + const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified'; + const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required'; + const CODE_CARD_DECLINED = 'card_declined'; + const CODE_CHARGE_ALREADY_CAPTURED = 'charge_already_captured'; + const CODE_CHARGE_ALREADY_REFUNDED = 'charge_already_refunded'; + const CODE_CHARGE_DISPUTED = 'charge_disputed'; + const CODE_CHARGE_EXCEEDS_SOURCE_LIMIT = 'charge_exceeds_source_limit'; + const CODE_CHARGE_EXPIRED_FOR_CAPTURE = 'charge_expired_for_capture'; + const CODE_COUNTRY_UNSUPPORTED = 'country_unsupported'; + const CODE_COUPON_EXPIRED = 'coupon_expired'; + const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions'; + const CODE_EMAIL_INVALID = 'email_invalid'; + const CODE_EXPIRED_CARD = 'expired_card'; + const CODE_IDEMPOTENCY_KEY_IN_USE = 'idempotency_key_in_use'; + const CODE_INCORRECT_ADDRESS = 'incorrect_address'; + const CODE_INCORRECT_CVC = 'incorrect_cvc'; + const CODE_INCORRECT_NUMBER = 'incorrect_number'; + const CODE_INCORRECT_ZIP = 'incorrect_zip'; + const CODE_INSTANT_PAYOUTS_UNSUPPORTED = 'instant_payouts_unsupported'; + const CODE_INVALID_CARD_TYPE = 'invalid_card_type'; + const CODE_INVALID_CHARGE_AMOUNT = 'invalid_charge_amount'; + const CODE_INVALID_CVC = 'invalid_cvc'; + const CODE_INVALID_EXPIRY_MONTH = 'invalid_expiry_month'; + const CODE_INVALID_EXPIRY_YEAR = 'invalid_expiry_year'; + const CODE_INVALID_NUMBER = 'invalid_number'; + const CODE_INVALID_SOURCE_USAGE = 'invalid_source_usage'; + const CODE_INVOICE_NO_CUSTOMER_LINE_ITEMS = 'invoice_no_customer_line_items'; + const CODE_INVOICE_NO_SUBSCRIPTION_LINE_ITEMS = 'invoice_no_subscription_line_items'; + const CODE_INVOICE_NOT_EDITABLE = 'invoice_not_editable'; + const CODE_INVOICE_PAYMENT_INTENT_REQUIRES_ACTION = 'invoice_payment_intent_requires_action'; + const CODE_INVOICE_UPCOMING_NONE = 'invoice_upcoming_none'; + const CODE_LIVEMODE_MISMATCH = 'livemode_mismatch'; + const CODE_LOCK_TIMEOUT = 'lock_timeout'; + const CODE_MISSING = 'missing'; + const CODE_NOT_ALLOWED_ON_STANDARD_ACCOUNT = 'not_allowed_on_standard_account'; + const CODE_ORDER_CREATION_FAILED = 'order_creation_failed'; + const CODE_ORDER_REQUIRED_SETTINGS = 'order_required_settings'; + const CODE_ORDER_STATUS_INVALID = 'order_status_invalid'; + const CODE_ORDER_UPSTREAM_TIMEOUT = 'order_upstream_timeout'; + const CODE_OUT_OF_INVENTORY = 'out_of_inventory'; + const CODE_PARAMETER_INVALID_EMPTY = 'parameter_invalid_empty'; + const CODE_PARAMETER_INVALID_INTEGER = 'parameter_invalid_integer'; + const CODE_PARAMETER_INVALID_STRING_BLANK = 'parameter_invalid_string_blank'; + const CODE_PARAMETER_INVALID_STRING_EMPTY = 'parameter_invalid_string_empty'; + const CODE_PARAMETER_MISSING = 'parameter_missing'; + const CODE_PARAMETER_UNKNOWN = 'parameter_unknown'; + const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive'; + const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure'; + const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method'; + const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter'; + const CODE_PAYMENT_INTENT_PAYMENT_ATTEMPT_FAILED = 'payment_intent_payment_attempt_failed'; + const CODE_PAYMENT_INTENT_UNEXPECTED_STATE = 'payment_intent_unexpected_state'; + const CODE_PAYMENT_METHOD_UNACTIVATED = 'payment_method_unactivated'; + const CODE_PAYMENT_METHOD_UNEXPECTED_STATE = 'payment_method_unexpected_state'; + const CODE_PAYOUTS_NOT_ALLOWED = 'payouts_not_allowed'; + const CODE_PLATFORM_API_KEY_EXPIRED = 'platform_api_key_expired'; + const CODE_POSTAL_CODE_INVALID = 'postal_code_invalid'; + const CODE_PROCESSING_ERROR = 'processing_error'; + const CODE_PRODUCT_INACTIVE = 'product_inactive'; + const CODE_RATE_LIMIT = 'rate_limit'; + const CODE_RESOURCE_ALREADY_EXISTS = 'resource_already_exists'; + const CODE_RESOURCE_MISSING = 'resource_missing'; + const CODE_ROUTING_NUMBER_INVALID = 'routing_number_invalid'; + const CODE_SECRET_KEY_REQUIRED = 'secret_key_required'; + const CODE_SEPA_UNSUPPORTED_ACCOUNT = 'sepa_unsupported_account'; + const CODE_SETUP_ATTEMPT_FAILED = 'setup_attempt_failed'; + const CODE_SETUP_INTENT_AUTHENTICATION_FAILURE = 'setup_intent_authentication_failure'; + const CODE_SETUP_INTENT_UNEXPECTED_STATE = 'setup_intent_unexpected_state'; + const CODE_SHIPPING_CALCULATION_FAILED = 'shipping_calculation_failed'; + const CODE_SKU_INACTIVE = 'sku_inactive'; + const CODE_STATE_UNSUPPORTED = 'state_unsupported'; + const CODE_TAX_ID_INVALID = 'tax_id_invalid'; + const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed'; + const CODE_TESTMODE_CHARGES_ONLY = 'testmode_charges_only'; + const CODE_TLS_VERSION_UNSUPPORTED = 'tls_version_unsupported'; + const CODE_TOKEN_ALREADY_USED = 'token_already_used'; + const CODE_TOKEN_IN_USE = 'token_in_use'; + const CODE_TRANSFERS_NOT_ALLOWED = 'transfers_not_allowed'; + const CODE_UPSTREAM_ORDER_CREATION_FAILED = 'upstream_order_creation_failed'; + const CODE_URL_INVALID = 'url_invalid'; + + /** + * Refreshes this object using the provided values. + * + * @param array $values + * @param null|array|string|Util\RequestOptions $opts + * @param bool $partial defaults to false + */ + public function refreshFrom($values, $opts, $partial = false) + { + // Unlike most other API resources, the API will omit attributes in + // error objects when they have a null value. We manually set default + // values here to facilitate generic error handling. + $values = \array_merge([ + 'charge' => null, + 'code' => null, + 'decline_code' => null, + 'doc_url' => null, + 'message' => null, + 'param' => null, + 'payment_intent' => null, + 'payment_method' => null, + 'setup_intent' => null, + 'source' => null, + 'type' => null, + ], $values); + parent::refreshFrom($values, $opts, $partial); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Event.php b/htdocs/includes/stripe/stripe-php/lib/Event.php index f9a004aa6a9..518c5d41344 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Event.php +++ b/htdocs/includes/stripe/stripe-php/lib/Event.php @@ -1,167 +1,231 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Event + * Events are our way of letting you know when something interesting happens in + * your account. When an interesting event occurs, we create a new + * <code>Event</code> object. For example, when a charge succeeds, we create a + * <code>charge.succeeded</code> event; and when an invoice payment attempt fails, + * we create an <code>invoice.payment_failed</code> event. Note that many API + * requests may cause multiple events to be created. For example, if you create a + * new subscription for a customer, you will receive both a + * <code>customer.subscription.created</code> event and a + * <code>charge.succeeded</code> event. * - * @property string $id - * @property string $object - * @property string $account - * @property string $api_version - * @property int $created - * @property mixed $data - * @property bool $livemode - * @property int $pending_webhooks - * @property mixed $request - * @property string $type + * Events occur when the state of another API resource changes. The state of that + * resource at the time of the change is embedded in the event's data field. For + * example, a <code>charge.succeeded</code> event will contain a charge, and an + * <code>invoice.payment_failed</code> event will contain an invoice. * - * @package Stripe + * As with other API resources, you can use endpoints to retrieve an <a + * href="https://stripe.com/docs/api#retrieve_event">individual event</a> or a <a + * href="https://stripe.com/docs/api#list_events">list of events</a> from the API. + * We also have a separate <a + * href="http://en.wikipedia.org/wiki/Webhook">webhooks</a> system for sending the + * <code>Event</code> objects directly to an endpoint on your server. Webhooks are + * managed in your <a href="https://dashboard.stripe.com/account/webhooks">account + * settings</a>, and our <a href="https://stripe.com/docs/webhooks">Using + * Webhooks</a> guide will help you get set up. + * + * When using <a href="https://stripe.com/docs/connect">Connect</a>, you can also + * receive notifications of events that occur in connected accounts. For these + * events, there will be an additional <code>account</code> attribute in the + * received <code>Event</code> object. + * + * <strong>NOTE:</strong> Right now, access to events through the <a + * href="https://stripe.com/docs/api#retrieve_event">Retrieve Event API</a> is + * guaranteed only for 30 days. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $account The connected account that originated the event. + * @property null|string $api_version The Stripe API version used to render <code>data</code>. <em>Note: This property is populated only for events on or after October 31, 2014</em>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \Stripe\StripeObject $data + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. + * @property null|\Stripe\StripeObject $request Information on the API request that instigated the event. + * @property string $type Description of the event (e.g., <code>invoice.created</code> or <code>charge.refunded</code>). */ class Event extends ApiResource { - const OBJECT_NAME = "event"; - - /** - * Possible string representations of event types. - * @link https://stripe.com/docs/api#event_types - */ - const ACCOUNT_UPDATED = 'account.updated'; - const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized'; - const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized'; - const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created'; - const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted'; - const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; - const APPLICATION_FEE_CREATED = 'application_fee.created'; - const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; - const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; - const BALANCE_AVAILABLE = 'balance.available'; - const CHARGE_CAPTURED = 'charge.captured'; - const CHARGE_EXPIRED = 'charge.expired'; - const CHARGE_FAILED = 'charge.failed'; - const CHARGE_PENDING = 'charge.pending'; - const CHARGE_REFUNDED = 'charge.refunded'; - const CHARGE_SUCCEEDED = 'charge.succeeded'; - const CHARGE_UPDATED = 'charge.updated'; - const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed'; - const CHARGE_DISPUTE_CREATED = 'charge.dispute.created'; - const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated'; - const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn'; - const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated'; - const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; - const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed'; - const COUPON_CREATED = 'coupon.created'; - const COUPON_DELETED = 'coupon.deleted'; - const COUPON_UPDATED = 'coupon.updated'; - const CREDIT_NOTE_CREATED = 'credit_note.created'; - const CREDIT_NOTE_UPDATED = 'credit_note.updated'; - const CREDIT_NOTE_VOIDED = 'credit_note.voided'; - const CUSTOMER_CREATED = 'customer.created'; - const CUSTOMER_DELETED = 'customer.deleted'; - const CUSTOMER_UPDATED = 'customer.updated'; - const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; - const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted'; - const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated'; - const CUSTOMER_SOURCE_CREATED = 'customer.source.created'; - const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted'; - const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring'; - const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated'; - const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created'; - const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted'; - const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end'; - const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated'; - const FILE_CREATED = 'file.created'; - const INVOICE_CREATED = 'invoice.created'; - const INVOICE_DELETED = 'invoice.deleted'; - const INVOICE_FINALIZED = 'invoice.finalized'; - const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; - const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; - const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; - const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded'; - const INVOICE_SENT = 'invoice.sent'; - const INVOICE_UPCOMING = 'invoice.upcoming'; - const INVOICE_UPDATED = 'invoice.updated'; - const INVOICE_VOIDED = 'invoice.voided'; - const INVOICEITEM_CREATED = 'invoiceitem.created'; - const INVOICEITEM_DELETED = 'invoiceitem.deleted'; - const INVOICEITEM_UPDATED = 'invoiceitem.updated'; - const ISSUER_FRAUD_RECORD_CREATED = 'issuer_fraud_record.created'; - const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; - const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; - const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; - const ISSUING_CARD_CREATED = 'issuing_card.created'; - const ISSUING_CARD_UPDATED = 'issuing_card.updated'; - const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; - const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; - const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; - const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; - const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created'; - const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated'; - const ORDER_CREATED = 'order.created'; - const ORDER_PAYMENT_FAILED = 'order.payment_failed'; - const ORDER_PAYMENT_SUCCEEDED = 'order.payment_succeeded'; - const ORDER_UPDATED = 'order.updated'; - const ORDER_RETURN_CREATED = 'order_return.created'; - const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated'; - const PAYMENT_INTENT_CREATED = 'payment_intent.created'; - const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed'; - const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded'; - const PAYMENT_METHOD_ATTACHED = 'payment_method.attached'; - const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED = 'payment_method.card_automatically_updated'; - const PAYMENT_METHOD_DETACHED = 'payment_method.detached'; - const PAYMENT_METHOD_UPDATED = 'payment_method.updated'; - const PAYOUT_CANCELED = 'payout.canceled'; - const PAYOUT_CREATED = 'payout.created'; - const PAYOUT_FAILED = 'payout.failed'; - const PAYOUT_PAID = 'payout.paid'; - const PAYOUT_UPDATED = 'payout.updated'; - const PERSON_CREATED = 'person.created'; - const PERSON_DELETED = 'person.deleted'; - const PERSON_UPDATED = 'person.updated'; - const PING = 'ping'; - const PLAN_CREATED = 'plan.created'; - const PLAN_DELETED = 'plan.deleted'; - const PLAN_UPDATED = 'plan.updated'; - const PRODUCT_CREATED = 'product.created'; - const PRODUCT_DELETED = 'product.deleted'; - const PRODUCT_UPDATED = 'product.updated'; - const RECIPIENT_CREATED = 'recipient.created'; - const RECIPIENT_DELETED = 'recipient.deleted'; - const RECIPIENT_UPDATED = 'recipient.updated'; - const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; - const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; - const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated'; - const REVIEW_CLOSED = 'review.closed'; - const REVIEW_OPENED = 'review.opened'; - const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created'; - const SKU_CREATED = 'sku.created'; - const SKU_DELETED = 'sku.deleted'; - const SKU_UPDATED = 'sku.updated'; - const SOURCE_CANCELED = 'source.canceled'; - const SOURCE_CHARGEABLE = 'source.chargeable'; - const SOURCE_FAILED = 'source.failed'; - const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification'; - const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required'; - const SOURCE_TRANSACTION_CREATED = 'source.transaction.created'; - const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated'; - const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted'; - const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled'; - const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed'; - const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created'; - const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring'; - const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released'; - const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; - const TAX_RATE_CREATED = 'tax_rate.created'; - const TAX_RATE_UPDATED = 'tax_rate.updated'; - const TOPUP_CANCELED = 'topup.canceled'; - const TOPUP_CREATED = 'topup.created'; - const TOPUP_FAILED = 'topup.failed'; - const TOPUP_REVERSED = 'topup.reversed'; - const TOPUP_SUCCEEDED = 'topup.succeeded'; - const TRANSFER_CREATED = 'transfer.created'; - const TRANSFER_REVERSED = 'transfer.reversed'; - const TRANSFER_UPDATED = 'transfer.updated'; + const OBJECT_NAME = 'event'; use ApiOperations\All; use ApiOperations\Retrieve; + + /** + * Possible string representations of event types. + * + * @see https://stripe.com/docs/api#event_types + */ + const ACCOUNT_UPDATED = 'account.updated'; + const ACCOUNT_APPLICATION_AUTHORIZED = 'account.application.authorized'; + const ACCOUNT_APPLICATION_DEAUTHORIZED = 'account.application.deauthorized'; + const ACCOUNT_EXTERNAL_ACCOUNT_CREATED = 'account.external_account.created'; + const ACCOUNT_EXTERNAL_ACCOUNT_DELETED = 'account.external_account.deleted'; + const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED = 'account.external_account.updated'; + const APPLICATION_FEE_CREATED = 'application_fee.created'; + const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; + const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; + const BALANCE_AVAILABLE = 'balance.available'; + const CAPABILITY_UPDATED = 'capability.updated'; + const CHARGE_CAPTURED = 'charge.captured'; + const CHARGE_EXPIRED = 'charge.expired'; + const CHARGE_FAILED = 'charge.failed'; + const CHARGE_PENDING = 'charge.pending'; + const CHARGE_REFUNDED = 'charge.refunded'; + const CHARGE_SUCCEEDED = 'charge.succeeded'; + const CHARGE_UPDATED = 'charge.updated'; + const CHARGE_DISPUTE_CLOSED = 'charge.dispute.closed'; + const CHARGE_DISPUTE_CREATED = 'charge.dispute.created'; + const CHARGE_DISPUTE_FUNDS_REINSTATED = 'charge.dispute.funds_reinstated'; + const CHARGE_DISPUTE_FUNDS_WITHDRAWN = 'charge.dispute.funds_withdrawn'; + const CHARGE_DISPUTE_UPDATED = 'charge.dispute.updated'; + const CHARGE_REFUND_UPDATED = 'charge.refund.updated'; + const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED = 'checkout.session.async_payment_failed'; + const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED = 'checkout.session.async_payment_succeeded'; + const CHECKOUT_SESSION_COMPLETED = 'checkout.session.completed'; + const COUPON_CREATED = 'coupon.created'; + const COUPON_DELETED = 'coupon.deleted'; + const COUPON_UPDATED = 'coupon.updated'; + const CREDIT_NOTE_CREATED = 'credit_note.created'; + const CREDIT_NOTE_UPDATED = 'credit_note.updated'; + const CREDIT_NOTE_VOIDED = 'credit_note.voided'; + const CUSTOMER_CREATED = 'customer.created'; + const CUSTOMER_DELETED = 'customer.deleted'; + const CUSTOMER_UPDATED = 'customer.updated'; + const CUSTOMER_DISCOUNT_CREATED = 'customer.discount.created'; + const CUSTOMER_DISCOUNT_DELETED = 'customer.discount.deleted'; + const CUSTOMER_DISCOUNT_UPDATED = 'customer.discount.updated'; + const CUSTOMER_SOURCE_CREATED = 'customer.source.created'; + const CUSTOMER_SOURCE_DELETED = 'customer.source.deleted'; + const CUSTOMER_SOURCE_EXPIRING = 'customer.source.expiring'; + const CUSTOMER_SOURCE_UPDATED = 'customer.source.updated'; + const CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created'; + const CUSTOMER_SUBSCRIPTION_DELETED = 'customer.subscription.deleted'; + const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED = 'customer.subscription.pending_update_applied'; + const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED = 'customer.subscription.pending_update_expired'; + const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END = 'customer.subscription.trial_will_end'; + const CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated'; + const CUSTOMER_TAX_ID_CREATED = 'customer.tax_id.created'; + const CUSTOMER_TAX_ID_DELETED = 'customer.tax_id.deleted'; + const CUSTOMER_TAX_ID_UPDATED = 'customer.tax_id.updated'; + const FILE_CREATED = 'file.created'; + const INVOICE_CREATED = 'invoice.created'; + const INVOICE_DELETED = 'invoice.deleted'; + const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; + const INVOICE_FINALIZED = 'invoice.finalized'; + const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const INVOICE_PAID = 'invoice.paid'; + const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; + const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; + const INVOICE_PAYMENT_SUCCEEDED = 'invoice.payment_succeeded'; + const INVOICE_SENT = 'invoice.sent'; + const INVOICE_UPCOMING = 'invoice.upcoming'; + const INVOICE_UPDATED = 'invoice.updated'; + const INVOICE_VOIDED = 'invoice.voided'; + const INVOICEITEM_CREATED = 'invoiceitem.created'; + const INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const INVOICEITEM_UPDATED = 'invoiceitem.updated'; + const ISSUER_FRAUD_RECORD_CREATED = 'issuer_fraud_record.created'; + const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; + const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; + const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; + const ISSUING_CARD_CREATED = 'issuing_card.created'; + const ISSUING_CARD_UPDATED = 'issuing_card.updated'; + const ISSUING_CARDHOLDER_CREATED = 'issuing_cardholder.created'; + const ISSUING_CARDHOLDER_UPDATED = 'issuing_cardholder.updated'; + const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; + const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; + const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; + const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; + const ISSUING_TRANSACTION_CREATED = 'issuing_transaction.created'; + const ISSUING_TRANSACTION_UPDATED = 'issuing_transaction.updated'; + const MANDATE_UPDATED = 'mandate.updated'; + const ORDER_CREATED = 'order.created'; + const ORDER_PAYMENT_FAILED = 'order.payment_failed'; + const ORDER_PAYMENT_SUCCEEDED = 'order.payment_succeeded'; + const ORDER_UPDATED = 'order.updated'; + const ORDER_RETURN_CREATED = 'order_return.created'; + const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED = 'payment_intent.amount_capturable_updated'; + const PAYMENT_INTENT_CANCELED = 'payment_intent.canceled'; + const PAYMENT_INTENT_CREATED = 'payment_intent.created'; + const PAYMENT_INTENT_PAYMENT_FAILED = 'payment_intent.payment_failed'; + const PAYMENT_INTENT_PROCESSING = 'payment_intent.processing'; + const PAYMENT_INTENT_REQUIRES_ACTION = 'payment_intent.requires_action'; + const PAYMENT_INTENT_SUCCEEDED = 'payment_intent.succeeded'; + const PAYMENT_METHOD_ATTACHED = 'payment_method.attached'; + const PAYMENT_METHOD_AUTOMATICALLY_UPDATED = 'payment_method.automatically_updated'; + const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED = 'payment_method.card_automatically_updated'; + const PAYMENT_METHOD_DETACHED = 'payment_method.detached'; + const PAYMENT_METHOD_UPDATED = 'payment_method.updated'; + const PAYOUT_CANCELED = 'payout.canceled'; + const PAYOUT_CREATED = 'payout.created'; + const PAYOUT_FAILED = 'payout.failed'; + const PAYOUT_PAID = 'payout.paid'; + const PAYOUT_UPDATED = 'payout.updated'; + const PERSON_CREATED = 'person.created'; + const PERSON_DELETED = 'person.deleted'; + const PERSON_UPDATED = 'person.updated'; + const PING = 'ping'; + const PLAN_CREATED = 'plan.created'; + const PLAN_DELETED = 'plan.deleted'; + const PLAN_UPDATED = 'plan.updated'; + const PRICE_CREATED = 'price.created'; + const PRICE_DELETED = 'price.deleted'; + const PRICE_UPDATED = 'price.updated'; + const PRODUCT_CREATED = 'product.created'; + const PRODUCT_DELETED = 'product.deleted'; + const PRODUCT_UPDATED = 'product.updated'; + const PROMOTION_CODE_CREATED = 'promotion_code.created'; + const PROMOTION_CODE_DELETED = 'promotion_code.deleted'; + const PROMOTION_CODE_UPDATED = 'promotion_code.updated'; + const RADAR_EARLY_FRAUD_WARNING_CREATED = 'radar.early_fraud_warning.created'; + const RADAR_EARLY_FRAUD_WARNING_UPDATED = 'radar.early_fraud_warning.updated'; + const RECIPIENT_CREATED = 'recipient.created'; + const RECIPIENT_DELETED = 'recipient.deleted'; + const RECIPIENT_UPDATED = 'recipient.updated'; + const REPORTING_REPORT_RUN_FAILED = 'reporting.report_run.failed'; + const REPORTING_REPORT_RUN_SUCCEEDED = 'reporting.report_run.succeeded'; + const REPORTING_REPORT_TYPE_UPDATED = 'reporting.report_type.updated'; + const REVIEW_CLOSED = 'review.closed'; + const REVIEW_OPENED = 'review.opened'; + const SETUP_INTENT_CANCELED = 'setup_intent.canceled'; + const SETUP_INTENT_CREATED = 'setup_intent.created'; + const SETUP_INTENT_REQUIRES_ACTION = 'setup_intent.requires_action'; + const SETUP_INTENT_SETUP_FAILED = 'setup_intent.setup_failed'; + const SETUP_INTENT_SUCCEEDED = 'setup_intent.succeeded'; + const SIGMA_SCHEDULED_QUERY_RUN_CREATED = 'sigma.scheduled_query_run.created'; + const SKU_CREATED = 'sku.created'; + const SKU_DELETED = 'sku.deleted'; + const SKU_UPDATED = 'sku.updated'; + const SOURCE_CANCELED = 'source.canceled'; + const SOURCE_CHARGEABLE = 'source.chargeable'; + const SOURCE_FAILED = 'source.failed'; + const SOURCE_MANDATE_NOTIFICATION = 'source.mandate_notification'; + const SOURCE_REFUND_ATTRIBUTES_REQUIRED = 'source.refund_attributes_required'; + const SOURCE_TRANSACTION_CREATED = 'source.transaction.created'; + const SOURCE_TRANSACTION_UPDATED = 'source.transaction.updated'; + const SUBSCRIPTION_SCHEDULE_ABORTED = 'subscription_schedule.aborted'; + const SUBSCRIPTION_SCHEDULE_CANCELED = 'subscription_schedule.canceled'; + const SUBSCRIPTION_SCHEDULE_COMPLETED = 'subscription_schedule.completed'; + const SUBSCRIPTION_SCHEDULE_CREATED = 'subscription_schedule.created'; + const SUBSCRIPTION_SCHEDULE_EXPIRING = 'subscription_schedule.expiring'; + const SUBSCRIPTION_SCHEDULE_RELEASED = 'subscription_schedule.released'; + const SUBSCRIPTION_SCHEDULE_UPDATED = 'subscription_schedule.updated'; + const TAX_RATE_CREATED = 'tax_rate.created'; + const TAX_RATE_UPDATED = 'tax_rate.updated'; + const TOPUP_CANCELED = 'topup.canceled'; + const TOPUP_CREATED = 'topup.created'; + const TOPUP_FAILED = 'topup.failed'; + const TOPUP_REVERSED = 'topup.reversed'; + const TOPUP_SUCCEEDED = 'topup.succeeded'; + const TRANSFER_CREATED = 'transfer.created'; + const TRANSFER_REVERSED = 'transfer.reversed'; + const TRANSFER_UPDATED = 'transfer.updated'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/ApiConnectionException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/ApiConnectionException.php new file mode 100644 index 00000000000..33f2ede9efc --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/ApiConnectionException.php @@ -0,0 +1,12 @@ +<?php + +namespace Stripe\Exception; + +/** + * ApiConnection is thrown in the event that the SDK can't connect to Stripe's + * servers. That can be for a variety of different reasons from a downed + * network to a bad TLS certificate. + */ +class ApiConnectionException extends ApiErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/ApiErrorException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/ApiErrorException.php new file mode 100644 index 00000000000..995a42e69b7 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/ApiErrorException.php @@ -0,0 +1,219 @@ +<?php + +namespace Stripe\Exception; + +/** + * Implements properties and methods common to all (non-SPL) Stripe exceptions. + */ +abstract class ApiErrorException extends \Exception implements ExceptionInterface +{ + protected $error; + protected $httpBody; + protected $httpHeaders; + protected $httpStatus; + protected $jsonBody; + protected $requestId; + protected $stripeCode; + + /** + * Creates a new API error exception. + * + * @param string $message the exception message + * @param null|int $httpStatus the HTTP status code + * @param null|string $httpBody the HTTP body as a string + * @param null|array $jsonBody the JSON deserialized body + * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array + * @param null|string $stripeCode the Stripe error code + * + * @return static + */ + public static function factory( + $message, + $httpStatus = null, + $httpBody = null, + $jsonBody = null, + $httpHeaders = null, + $stripeCode = null + ) { + $instance = new static($message); + $instance->setHttpStatus($httpStatus); + $instance->setHttpBody($httpBody); + $instance->setJsonBody($jsonBody); + $instance->setHttpHeaders($httpHeaders); + $instance->setStripeCode($stripeCode); + + $instance->setRequestId(null); + if ($httpHeaders && isset($httpHeaders['Request-Id'])) { + $instance->setRequestId($httpHeaders['Request-Id']); + } + + $instance->setError($instance->constructErrorObject()); + + return $instance; + } + + /** + * Gets the Stripe error object. + * + * @return null|\Stripe\ErrorObject + */ + public function getError() + { + return $this->error; + } + + /** + * Sets the Stripe error object. + * + * @param null|\Stripe\ErrorObject $error + */ + public function setError($error) + { + $this->error = $error; + } + + /** + * Gets the HTTP body as a string. + * + * @return null|string + */ + public function getHttpBody() + { + return $this->httpBody; + } + + /** + * Sets the HTTP body as a string. + * + * @param null|string $httpBody + */ + public function setHttpBody($httpBody) + { + $this->httpBody = $httpBody; + } + + /** + * Gets the HTTP headers array. + * + * @return null|array|\Stripe\Util\CaseInsensitiveArray + */ + public function getHttpHeaders() + { + return $this->httpHeaders; + } + + /** + * Sets the HTTP headers array. + * + * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders + */ + public function setHttpHeaders($httpHeaders) + { + $this->httpHeaders = $httpHeaders; + } + + /** + * Gets the HTTP status code. + * + * @return null|int + */ + public function getHttpStatus() + { + return $this->httpStatus; + } + + /** + * Sets the HTTP status code. + * + * @param null|int $httpStatus + */ + public function setHttpStatus($httpStatus) + { + $this->httpStatus = $httpStatus; + } + + /** + * Gets the JSON deserialized body. + * + * @return null|array<string, mixed> + */ + public function getJsonBody() + { + return $this->jsonBody; + } + + /** + * Sets the JSON deserialized body. + * + * @param null|array<string, mixed> $jsonBody + */ + public function setJsonBody($jsonBody) + { + $this->jsonBody = $jsonBody; + } + + /** + * Gets the Stripe request ID. + * + * @return null|string + */ + public function getRequestId() + { + return $this->requestId; + } + + /** + * Sets the Stripe request ID. + * + * @param null|string $requestId + */ + public function setRequestId($requestId) + { + $this->requestId = $requestId; + } + + /** + * Gets the Stripe error code. + * + * Cf. the `CODE_*` constants on {@see \Stripe\ErrorObject} for possible + * values. + * + * @return null|string + */ + public function getStripeCode() + { + return $this->stripeCode; + } + + /** + * Sets the Stripe error code. + * + * @param null|string $stripeCode + */ + public function setStripeCode($stripeCode) + { + $this->stripeCode = $stripeCode; + } + + /** + * Returns the string representation of the exception. + * + * @return string + */ + public function __toString() + { + $statusStr = (null === $this->getHttpStatus()) ? '' : "(Status {$this->getHttpStatus()}) "; + $idStr = (null === $this->getRequestId()) ? '' : "(Request {$this->getRequestId()}) "; + + return "{$statusStr}{$idStr}{$this->getMessage()}"; + } + + protected function constructErrorObject() + { + if (null === $this->jsonBody || !\array_key_exists('error', $this->jsonBody)) { + return null; + } + + return \Stripe\ErrorObject::constructFrom($this->jsonBody['error']); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/AuthenticationException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/AuthenticationException.php new file mode 100644 index 00000000000..9e5c718b117 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/AuthenticationException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception; + +/** + * AuthenticationException is thrown when invalid credentials are used to + * connect to Stripe's servers. + */ +class AuthenticationException extends ApiErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/BadMethodCallException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/BadMethodCallException.php new file mode 100644 index 00000000000..96bdf66952e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/BadMethodCallException.php @@ -0,0 +1,7 @@ +<?php + +namespace Stripe\Exception; + +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/CardException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/CardException.php new file mode 100644 index 00000000000..43df9c7b028 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/CardException.php @@ -0,0 +1,84 @@ +<?php + +namespace Stripe\Exception; + +/** + * CardException is thrown when a user enters a card that can't be charged for + * some reason. + */ +class CardException extends ApiErrorException +{ + protected $declineCode; + protected $stripeParam; + + /** + * Creates a new CardException exception. + * + * @param string $message the exception message + * @param null|int $httpStatus the HTTP status code + * @param null|string $httpBody the HTTP body as a string + * @param null|array $jsonBody the JSON deserialized body + * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array + * @param null|string $stripeCode the Stripe error code + * @param null|string $declineCode the decline code + * @param null|string $stripeParam the parameter related to the error + * + * @return CardException + */ + public static function factory( + $message, + $httpStatus = null, + $httpBody = null, + $jsonBody = null, + $httpHeaders = null, + $stripeCode = null, + $declineCode = null, + $stripeParam = null + ) { + $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode); + $instance->setDeclineCode($declineCode); + $instance->setStripeParam($stripeParam); + + return $instance; + } + + /** + * Gets the decline code. + * + * @return null|string + */ + public function getDeclineCode() + { + return $this->declineCode; + } + + /** + * Sets the decline code. + * + * @param null|string $declineCode + */ + public function setDeclineCode($declineCode) + { + $this->declineCode = $declineCode; + } + + /** + * Gets the parameter related to the error. + * + * @return null|string + */ + public function getStripeParam() + { + return $this->stripeParam; + } + + /** + * Sets the parameter related to the error. + * + * @param null|string $stripeParam + */ + public function setStripeParam($stripeParam) + { + $this->stripeParam = $stripeParam; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/ExceptionInterface.php b/htdocs/includes/stripe/stripe-php/lib/Exception/ExceptionInterface.php new file mode 100644 index 00000000000..c84f37de7fd --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/ExceptionInterface.php @@ -0,0 +1,22 @@ +<?php + +namespace Stripe\Exception; + +// TODO: remove this check once we drop support for PHP 5 +if (\interface_exists(\Throwable::class, false)) { + /** + * The base interface for all Stripe exceptions. + */ + interface ExceptionInterface extends \Throwable + { + } +} else { + /** + * The base interface for all Stripe exceptions. + */ + // phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses + interface ExceptionInterface + { + } + // phpcs:enable +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/IdempotencyException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/IdempotencyException.php new file mode 100644 index 00000000000..09dbf07f768 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/IdempotencyException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception; + +/** + * IdempotencyException is thrown in cases where an idempotency key was used + * improperly. + */ +class IdempotencyException extends ApiErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidArgumentException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidArgumentException.php new file mode 100644 index 00000000000..7aa3ca3d7ad --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidArgumentException.php @@ -0,0 +1,7 @@ +<?php + +namespace Stripe\Exception; + +class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidRequestException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidRequestException.php new file mode 100644 index 00000000000..ed4f8d0d498 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/InvalidRequestException.php @@ -0,0 +1,60 @@ +<?php + +namespace Stripe\Exception; + +/** + * InvalidRequestException is thrown when a request is initiated with invalid + * parameters. + */ +class InvalidRequestException extends ApiErrorException +{ + protected $stripeParam; + + /** + * Creates a new InvalidRequestException exception. + * + * @param string $message the exception message + * @param null|int $httpStatus the HTTP status code + * @param null|string $httpBody the HTTP body as a string + * @param null|array $jsonBody the JSON deserialized body + * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array + * @param null|string $stripeCode the Stripe error code + * @param null|string $stripeParam the parameter related to the error + * + * @return InvalidRequestException + */ + public static function factory( + $message, + $httpStatus = null, + $httpBody = null, + $jsonBody = null, + $httpHeaders = null, + $stripeCode = null, + $stripeParam = null + ) { + $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode); + $instance->setStripeParam($stripeParam); + + return $instance; + } + + /** + * Gets the parameter related to the error. + * + * @return null|string + */ + public function getStripeParam() + { + return $this->stripeParam; + } + + /** + * Sets the parameter related to the error. + * + * @param null|string $stripeParam + */ + public function setStripeParam($stripeParam) + { + $this->stripeParam = $stripeParam; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php new file mode 100644 index 00000000000..dd42662018c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php @@ -0,0 +1,10 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * The base interface for all Stripe OAuth exceptions. + */ +interface ExceptionInterface extends \Stripe\Exception\ExceptionInterface +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php new file mode 100644 index 00000000000..13934519773 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidClientException.php @@ -0,0 +1,12 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * InvalidClientException is thrown when the client_id does not belong to you, + * the stripe_user_id does not exist or is not connected to your application, + * or the API key mode (live or test mode) does not match the client_id mode. + */ +class InvalidClientException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php new file mode 100644 index 00000000000..898b3a77618 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidGrantException.php @@ -0,0 +1,13 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * InvalidGrantException is thrown when a specified code doesn't exist, is + * expired, has been used, or doesn't belong to you; a refresh token doesn't + * exist, or doesn't belong to you; or if an API key's mode (live or test) + * doesn't match the mode of a code or refresh token. + */ +class InvalidGrantException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php new file mode 100644 index 00000000000..59dac7c0f40 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidRequestException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * InvalidRequestException is thrown when a code, refresh token, or grant + * type parameter is not provided, but was required. + */ +class InvalidRequestException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php new file mode 100644 index 00000000000..091729d933c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/InvalidScopeException.php @@ -0,0 +1,10 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * InvalidScopeException is thrown when an invalid scope parameter is provided. + */ +class InvalidScopeException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php new file mode 100644 index 00000000000..bded3c8893b --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/OAuthErrorException.php @@ -0,0 +1,19 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * Implements properties and methods common to all (non-SPL) Stripe OAuth + * exceptions. + */ +abstract class OAuthErrorException extends \Stripe\Exception\ApiErrorException +{ + protected function constructErrorObject() + { + if (null === $this->jsonBody) { + return null; + } + + return \Stripe\OAuthErrorObject::constructFrom($this->jsonBody); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php new file mode 100644 index 00000000000..c8dba29bf0b --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php @@ -0,0 +1,12 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * UnknownApiErrorException is thrown when the client library receives an + * error from the OAuth API it doesn't know about. Receiving this error usually + * means that your client library is outdated and should be upgraded. + */ +class UnknownOAuthErrorException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php new file mode 100644 index 00000000000..418635d44c8 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * UnsupportedGrantTypeException is thrown when an unuspported grant type + * parameter is specified. + */ +class UnsupportedGrantTypeException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php new file mode 100644 index 00000000000..26742a8067d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception\OAuth; + +/** + * UnsupportedResponseTypeException is thrown when an unsupported response type + * parameter is specified. + */ +class UnsupportedResponseTypeException extends OAuthErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/PermissionException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/PermissionException.php new file mode 100644 index 00000000000..5cf5154bf55 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/PermissionException.php @@ -0,0 +1,11 @@ +<?php + +namespace Stripe\Exception; + +/** + * PermissionException is thrown in cases where access was attempted on a + * resource that wasn't allowed. + */ +class PermissionException extends ApiErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/RateLimitException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/RateLimitException.php new file mode 100644 index 00000000000..f28f450fdb8 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/RateLimitException.php @@ -0,0 +1,12 @@ +<?php + +namespace Stripe\Exception; + +/** + * RateLimitException is thrown in cases where an account is putting too much + * load on Stripe's API servers (usually by performing too many requests). + * Please back off on request rate. + */ +class RateLimitException extends InvalidRequestException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/SignatureVerificationException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/SignatureVerificationException.php new file mode 100644 index 00000000000..b08534a8fff --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/SignatureVerificationException.php @@ -0,0 +1,74 @@ +<?php + +namespace Stripe\Exception; + +/** + * SignatureVerificationException is thrown when the signature verification for + * a webhook fails. + */ +class SignatureVerificationException extends \Exception implements ExceptionInterface +{ + protected $httpBody; + protected $sigHeader; + + /** + * Creates a new SignatureVerificationException exception. + * + * @param string $message the exception message + * @param null|string $httpBody the HTTP body as a string + * @param null|string $sigHeader the `Stripe-Signature` HTTP header + * + * @return SignatureVerificationException + */ + public static function factory( + $message, + $httpBody = null, + $sigHeader = null + ) { + $instance = new static($message); + $instance->setHttpBody($httpBody); + $instance->setSigHeader($sigHeader); + + return $instance; + } + + /** + * Gets the HTTP body as a string. + * + * @return null|string + */ + public function getHttpBody() + { + return $this->httpBody; + } + + /** + * Sets the HTTP body as a string. + * + * @param null|string $httpBody + */ + public function setHttpBody($httpBody) + { + $this->httpBody = $httpBody; + } + + /** + * Gets the `Stripe-Signature` HTTP header. + * + * @return null|string + */ + public function getSigHeader() + { + return $this->sigHeader; + } + + /** + * Sets the `Stripe-Signature` HTTP header. + * + * @param null|string $sigHeader + */ + public function setSigHeader($sigHeader) + { + $this->sigHeader = $sigHeader; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/UnexpectedValueException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/UnexpectedValueException.php new file mode 100644 index 00000000000..0a629edf74d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/UnexpectedValueException.php @@ -0,0 +1,7 @@ +<?php + +namespace Stripe\Exception; + +class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Exception/UnknownApiErrorException.php b/htdocs/includes/stripe/stripe-php/lib/Exception/UnknownApiErrorException.php new file mode 100644 index 00000000000..7873bf8b64a --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Exception/UnknownApiErrorException.php @@ -0,0 +1,12 @@ +<?php + +namespace Stripe\Exception; + +/** + * UnknownApiErrorException is thrown when the client library receives an + * error from the API it doesn't know about. Receiving this error usually + * means that your client library is outdated and should be upgraded. + */ +class UnknownApiErrorException extends ApiErrorException +{ +} diff --git a/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php b/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php index 6a7e7a36a38..382253c1bee 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php +++ b/htdocs/includes/stripe/stripe-php/lib/ExchangeRate.php @@ -1,15 +1,29 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class ExchangeRate + * <code>Exchange Rate</code> objects allow you to determine the rates that Stripe + * is currently using to convert from one currency to another. Since this number is + * variable throughout the day, there are various reasons why you might want to + * know the current rate (for example, to dynamically price an item for a user with + * a default payment in a foreign currency). * - * @package Stripe + * If you want a guarantee that the charge is made with a certain exchange rate you + * expect is current, you can pass in <code>exchange_rate</code> to charges + * endpoints. If the value is no longer up to date, the charge won't go through. + * Please refer to our <a href="https://stripe.com/docs/exchange-rates">Exchange + * Rates API</a> guide for more details. + * + * @property string $id Unique identifier for the object. Represented as the three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> in lowercase. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $rates Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. */ class ExchangeRate extends ApiResource { - const OBJECT_NAME = "exchange_rate"; + const OBJECT_NAME = 'exchange_rate'; use ApiOperations\All; use ApiOperations\Retrieve; diff --git a/htdocs/includes/stripe/stripe-php/lib/File.php b/htdocs/includes/stripe/stripe-php/lib/File.php index 76109ad38cf..d73bed84218 100644 --- a/htdocs/includes/stripe/stripe-php/lib/File.php +++ b/htdocs/includes/stripe/stripe-php/lib/File.php @@ -1,37 +1,57 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class File + * This is an object representing a file hosted on Stripe's servers. The file may + * have been uploaded by yourself using the <a + * href="https://stripe.com/docs/api#create_file">create file</a> request (for + * example, when uploading dispute evidence) or it may have been created by Stripe + * (for example, the results of a <a href="#scheduled_queries">Sigma scheduled + * query</a>). * - * @property string $id - * @property string $object - * @property int $created - * @property string $filename - * @property Collection $links - * @property string $purpose - * @property int $size - * @property string $title - * @property string $type - * @property string $url + * Related guide: <a href="https://stripe.com/docs/file-upload">File Upload + * Guide</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds. + * @property null|string $filename A filename for the file, suitable for saving to a filesystem. + * @property null|\Stripe\Collection $links A list of <a href="https://stripe.com/docs/api#file_links">file links</a> that point at this file. + * @property string $purpose The <a href="https://stripe.com/docs/file-upload#uploading-a-file">purpose</a> of the uploaded file. + * @property int $size The size in bytes of the file object. + * @property null|string $title A user friendly title for the document. + * @property null|string $type The type of the file returned (e.g., <code>csv</code>, <code>pdf</code>, <code>jpg</code>, or <code>png</code>). + * @property null|string $url The URL from which the file can be downloaded using your live secret API key. */ class File extends ApiResource { + const OBJECT_NAME = 'file'; + + use ApiOperations\All; + use ApiOperations\Retrieve; + + const PURPOSE_ADDITIONAL_VERIFICATION = 'additional_verification'; + const PURPOSE_BUSINESS_ICON = 'business_icon'; + const PURPOSE_BUSINESS_LOGO = 'business_logo'; + const PURPOSE_CUSTOMER_SIGNATURE = 'customer_signature'; + const PURPOSE_DISPUTE_EVIDENCE = 'dispute_evidence'; + const PURPOSE_IDENTITY_DOCUMENT = 'identity_document'; + const PURPOSE_PCI_DOCUMENT = 'pci_document'; + const PURPOSE_TAX_DOCUMENT_USER_UPLOAD = 'tax_document_user_upload'; + // This resource can have two different object names. In latter API // versions, only `file` is used, but since stripe-php may be used with // any API version, we need to support deserializing the older // `file_upload` object into the same class. - const OBJECT_NAME = "file"; - const OBJECT_NAME_ALT = "file_upload"; + const OBJECT_NAME_ALT = 'file_upload'; - use ApiOperations\All; use ApiOperations\Create { create as protected _create; } - use ApiOperations\Retrieve; public static function classUrl() { @@ -39,24 +59,23 @@ class File extends ApiResource } /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return \Stripe\File The created resource. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\File the created file */ - public static function create($params = null, $options = null) + public static function create($params = null, $opts = null) { - $opts = \Stripe\Util\RequestOptions::parse($options); - if (is_null($opts->apiBase)) { + $opts = \Stripe\Util\RequestOptions::parse($opts); + if (null === $opts->apiBase) { $opts->apiBase = Stripe::$apiUploadBase; } // Manually flatten params, otherwise curl's multipart encoder will // choke on nested arrays. - // TODO: use array_column() once we drop support for PHP 5.4 - $flatParams = []; - foreach (\Stripe\Util\Util::flattenParams($params) as $pair) { - $flatParams[$pair[0]] = $pair[1]; - } + $flatParams = \array_column(\Stripe\Util\Util::flattenParams($params), 1, 0); + return static::_create($flatParams, $opts); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/FileLink.php b/htdocs/includes/stripe/stripe-php/lib/FileLink.php index 385971f7d82..ce3b10bde67 100644 --- a/htdocs/includes/stripe/stripe-php/lib/FileLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/FileLink.php @@ -1,25 +1,27 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class FileLink + * To share the contents of a <code>File</code> object with non-Stripe users, you + * can create a <code>FileLink</code>. <code>FileLink</code>s contain a URL that + * can be used to retrieve the contents of the file without authentication. * - * @property string $id - * @property string $object - * @property int $created - * @property bool $expired - * @property int $expires_at - * @property string $file - * @property bool $livemode - * @property StripeObject $metadata - * @property string $url - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property bool $expired Whether this link is already expired. + * @property null|int $expires_at Time at which the link expires. + * @property string|\Stripe\File $file The file object this link points to. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $url The publicly accessible URL to download the file. */ class FileLink extends ApiResource { - const OBJECT_NAME = "file_link"; + const OBJECT_NAME = 'file_link'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php b/htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php index c8d4e50fc1d..3c7861e5974 100644 --- a/htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php +++ b/htdocs/includes/stripe/stripe-php/lib/HttpClient/ClientInterface.php @@ -9,13 +9,14 @@ interface ClientInterface * @param string $absUrl The URL being requested, including domain and protocol * @param array $headers Headers to be used in the request (full strings, not KV pairs) * @param array $params KV pairs for parameters. Can be nested for arrays and hashes - * @param boolean $hasFile Whether or not $params references a file (via an @ prefix or - * CurlFile) + * @param bool $hasFile Whether or not $params references a file (via an @ prefix or + * CURLFile) * - * @throws \Stripe\Error\Api - * @throws \Stripe\Error\ApiConnection - * @return array An array whose first element is raw request body, second - * element is HTTP status code and third array of HTTP headers. + * @throws \Stripe\Exception\ApiConnectionException + * @throws \Stripe\Exception\UnexpectedValueException + * + * @return array an array whose first element is raw request body, second + * element is HTTP status code and third array of HTTP headers */ public function request($method, $absUrl, $headers, $params, $hasFile); } diff --git a/htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php b/htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php index 32a651795e7..b824518570a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php +++ b/htdocs/includes/stripe/stripe-php/lib/HttpClient/CurlClient.php @@ -2,28 +2,26 @@ namespace Stripe\HttpClient; +use Stripe\Exception; use Stripe\Stripe; -use Stripe\Error; use Stripe\Util; -// cURL constants are not defined in PHP < 5.5 - // @codingStandardsIgnoreStart // PSR2 requires all constants be upper case. Sadly, the CURL_SSLVERSION // constants do not abide by those rules. -// Note the values 1 and 6 come from their position in the enum that +// Note the values come from their position in the enums that // defines them in cURL's source code. -if (!defined('CURL_SSLVERSION_TLSv1')) { - define('CURL_SSLVERSION_TLSv1', 1); -} -if (!defined('CURL_SSLVERSION_TLSv1_2')) { - define('CURL_SSLVERSION_TLSv1_2', 6); + +// Available since PHP 5.5.19 and 5.6.3 +if (!\defined('CURL_SSLVERSION_TLSv1_2')) { + \define('CURL_SSLVERSION_TLSv1_2', 6); } // @codingStandardsIgnoreEnd -if (!defined('CURL_HTTP_VERSION_2TLS')) { - define('CURL_HTTP_VERSION_2TLS', 4); +// Available since PHP 7.0.7 and cURL 7.47.0 +if (!\defined('CURL_HTTP_VERSION_2TLS')) { + \define('CURL_HTTP_VERSION_2TLS', 4); } class CurlClient implements ClientInterface @@ -35,18 +33,24 @@ class CurlClient implements ClientInterface if (!self::$instance) { self::$instance = new self(); } + return self::$instance; } protected $defaultOptions; + /** @var \Stripe\Util\RandomGenerator */ + protected $randomGenerator; + protected $userAgentInfo; - protected $enablePersistentConnections = null; + protected $enablePersistentConnections = true; - protected $enableHttp2 = null; + protected $enableHttp2; - protected $curlHandle = null; + protected $curlHandle; + + protected $requestStatusCallback; /** * CurlClient constructor. @@ -59,7 +63,8 @@ class CurlClient implements ClientInterface * Note that request() will silently ignore a non-callable, non-array $defaultOptions, and will * throw an exception if $defaultOptions returns a non-array value. * - * @param array|callable|null $defaultOptions + * @param null|array|callable $defaultOptions + * @param null|\Stripe\Util\RandomGenerator $randomGenerator */ public function __construct($defaultOptions = null, $randomGenerator = null) { @@ -67,10 +72,6 @@ class CurlClient implements ClientInterface $this->randomGenerator = $randomGenerator ?: new Util\RandomGenerator(); $this->initUserAgentInfo(); - // TODO: curl_reset requires PHP >= 5.5.0. Once we drop support for PHP 5.4, we can simply - // initialize this to true. - $this->enablePersistentConnections = function_exists('curl_reset'); - $this->enableHttp2 = $this->canSafelyUseHttp2(); } @@ -81,9 +82,9 @@ class CurlClient implements ClientInterface public function initUserAgentInfo() { - $curlVersion = curl_version(); + $curlVersion = \curl_version(); $this->userAgentInfo = [ - 'httplib' => 'curl ' . $curlVersion['version'], + 'httplib' => 'curl ' . $curlVersion['version'], 'ssllib' => $curlVersion['ssl_version'], ]; } @@ -99,7 +100,7 @@ class CurlClient implements ClientInterface } /** - * @return boolean + * @return bool */ public function getEnablePersistentConnections() { @@ -107,7 +108,7 @@ class CurlClient implements ClientInterface } /** - * @param boolean $enable + * @param bool $enable */ public function setEnablePersistentConnections($enable) { @@ -115,7 +116,7 @@ class CurlClient implements ClientInterface } /** - * @return boolean + * @return bool */ public function getEnableHttp2() { @@ -123,13 +124,41 @@ class CurlClient implements ClientInterface } /** - * @param boolean $enable + * @param bool $enable */ public function setEnableHttp2($enable) { $this->enableHttp2 = $enable; } + /** + * @return null|callable + */ + public function getRequestStatusCallback() + { + return $this->requestStatusCallback; + } + + /** + * Sets a callback that is called after each request. The callback will + * receive the following parameters: + * <ol> + * <li>string $rbody The response body</li> + * <li>integer $rcode The response status code</li> + * <li>\Stripe\Util\CaseInsensitiveArray $rheaders The response headers</li> + * <li>integer $errno The curl error number</li> + * <li>string|null $message The curl error message</li> + * <li>boolean $shouldRetry Whether the request will be retried</li> + * <li>integer $numRetries The number of the retry attempt</li> + * </ol>. + * + * @param null|callable $requestStatusCallback + */ + public function setRequestStatusCallback($requestStatusCallback) + { + $this->requestStatusCallback = $requestStatusCallback; + } + // USER DEFINED TIMEOUTS const DEFAULT_TIMEOUT = 80; @@ -140,13 +169,15 @@ class CurlClient implements ClientInterface public function setTimeout($seconds) { - $this->timeout = (int) max($seconds, 0); + $this->timeout = (int) \max($seconds, 0); + return $this; } public function setConnectTimeout($seconds) { - $this->connectTimeout = (int) max($seconds, 0); + $this->connectTimeout = (int) \max($seconds, 0); + return $this; } @@ -164,64 +195,52 @@ class CurlClient implements ClientInterface public function request($method, $absUrl, $headers, $params, $hasFile) { - $method = strtolower($method); + $method = \strtolower($method); $opts = []; - if (is_callable($this->defaultOptions)) { // call defaultOptions callback, set options to return value - $opts = call_user_func_array($this->defaultOptions, func_get_args()); - if (!is_array($opts)) { - throw new Error\Api("Non-array value returned by defaultOptions CurlClient callback"); + if (\is_callable($this->defaultOptions)) { // call defaultOptions callback, set options to return value + $opts = \call_user_func_array($this->defaultOptions, \func_get_args()); + if (!\is_array($opts)) { + throw new Exception\UnexpectedValueException('Non-array value returned by defaultOptions CurlClient callback'); } - } elseif (is_array($this->defaultOptions)) { // set default curlopts from array + } elseif (\is_array($this->defaultOptions)) { // set default curlopts from array $opts = $this->defaultOptions; } $params = Util\Util::objectsToIds($params); - if ($method == 'get') { + if ('get' === $method) { if ($hasFile) { - throw new Error\Api( - "Issuing a GET request with a file parameter" + throw new Exception\UnexpectedValueException( + 'Issuing a GET request with a file parameter' ); } - $opts[CURLOPT_HTTPGET] = 1; - if (count($params) > 0) { + $opts[\CURLOPT_HTTPGET] = 1; + if (\count($params) > 0) { $encoded = Util\Util::encodeParameters($params); - $absUrl = "$absUrl?$encoded"; + $absUrl = "{$absUrl}?{$encoded}"; } - } elseif ($method == 'post') { - $opts[CURLOPT_POST] = 1; - $opts[CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params); - } elseif ($method == 'delete') { - $opts[CURLOPT_CUSTOMREQUEST] = 'DELETE'; - if (count($params) > 0) { + } elseif ('post' === $method) { + $opts[\CURLOPT_POST] = 1; + $opts[\CURLOPT_POSTFIELDS] = $hasFile ? $params : Util\Util::encodeParameters($params); + } elseif ('delete' === $method) { + $opts[\CURLOPT_CUSTOMREQUEST] = 'DELETE'; + if (\count($params) > 0) { $encoded = Util\Util::encodeParameters($params); - $absUrl = "$absUrl?$encoded"; + $absUrl = "{$absUrl}?{$encoded}"; } } else { - throw new Error\Api("Unrecognized method $method"); + throw new Exception\UnexpectedValueException("Unrecognized method {$method}"); } // It is only safe to retry network failures on POST requests if we // add an Idempotency-Key header - if (($method == 'post') && (Stripe::$maxNetworkRetries > 0)) { - if (!$this->hasHeader($headers, "Idempotency-Key")) { - array_push($headers, 'Idempotency-Key: ' . $this->randomGenerator->uuid()); + if (('post' === $method) && (Stripe::$maxNetworkRetries > 0)) { + if (!$this->hasHeader($headers, 'Idempotency-Key')) { + $headers[] = 'Idempotency-Key: ' . $this->randomGenerator->uuid(); } } - // Create a callback to capture HTTP headers for the response - $rheaders = new Util\CaseInsensitiveArray(); - $headerCallback = function ($curl, $header_line) use (&$rheaders) { - // Ignore the HTTP request line (HTTP/1.1 200 OK) - if (strpos($header_line, ":") === false) { - return strlen($header_line); - } - list($key, $value) = explode(":", trim($header_line), 2); - $rheaders[trim($key)] = trim($value); - return strlen($header_line); - }; - // By default for large request body sizes (> 1024 bytes), cURL will // send a request without a body and with a `Expect: 100-continue` // header, which gives the server a chance to respond with an error @@ -234,32 +253,36 @@ class CurlClient implements ClientInterface // we'll error under that condition. To compensate for that problem // for the time being, override cURL's behavior by simply always // sending an empty `Expect:` header. - array_push($headers, 'Expect: '); + $headers[] = 'Expect: '; $absUrl = Util\Util::utf8($absUrl); - $opts[CURLOPT_URL] = $absUrl; - $opts[CURLOPT_RETURNTRANSFER] = true; - $opts[CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout; - $opts[CURLOPT_TIMEOUT] = $this->timeout; - $opts[CURLOPT_HEADERFUNCTION] = $headerCallback; - $opts[CURLOPT_HTTPHEADER] = $headers; - $opts[CURLOPT_CAINFO] = Stripe::getCABundlePath(); + $opts[\CURLOPT_URL] = $absUrl; + $opts[\CURLOPT_RETURNTRANSFER] = true; + $opts[\CURLOPT_CONNECTTIMEOUT] = $this->connectTimeout; + $opts[\CURLOPT_TIMEOUT] = $this->timeout; + $opts[\CURLOPT_HTTPHEADER] = $headers; + $opts[\CURLOPT_CAINFO] = Stripe::getCABundlePath(); if (!Stripe::getVerifySslCerts()) { - $opts[CURLOPT_SSL_VERIFYPEER] = false; + $opts[\CURLOPT_SSL_VERIFYPEER] = false; } - if (!isset($opts[CURLOPT_HTTP_VERSION]) && $this->getEnableHttp2()) { + if (!isset($opts[\CURLOPT_HTTP_VERSION]) && $this->getEnableHttp2()) { // For HTTPS requests, enable HTTP/2, if supported - $opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2TLS; + $opts[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2TLS; } - list($rbody, $rcode) = $this->executeRequestWithRetries($opts, $absUrl); + // Stripe's API servers are only accessible over IPv4. Force IPv4 resolving to avoid + // potential issues (cf. https://github.com/stripe/stripe-php/issues/1045). + $opts[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; + + list($rbody, $rcode, $rheaders) = $this->executeRequestWithRetries($opts, $absUrl); return [$rbody, $rcode, $rheaders]; } /** * @param array $opts cURL options + * @param string $absUrl */ private function executeRequestWithRetries($opts, $absUrl) { @@ -268,35 +291,59 @@ class CurlClient implements ClientInterface while (true) { $rcode = 0; $errno = 0; + $message = null; + + // Create a callback to capture HTTP headers for the response + $rheaders = new Util\CaseInsensitiveArray(); + $headerCallback = function ($curl, $header_line) use (&$rheaders) { + // Ignore the HTTP request line (HTTP/1.1 200 OK) + if (false === \strpos($header_line, ':')) { + return \strlen($header_line); + } + list($key, $value) = \explode(':', \trim($header_line), 2); + $rheaders[\trim($key)] = \trim($value); + + return \strlen($header_line); + }; + $opts[\CURLOPT_HEADERFUNCTION] = $headerCallback; $this->resetCurlHandle(); - curl_setopt_array($this->curlHandle, $opts); - $rbody = curl_exec($this->curlHandle); + \curl_setopt_array($this->curlHandle, $opts); + $rbody = \curl_exec($this->curlHandle); - if ($rbody === false) { - $errno = curl_errno($this->curlHandle); - $message = curl_error($this->curlHandle); + if (false === $rbody) { + $errno = \curl_errno($this->curlHandle); + $message = \curl_error($this->curlHandle); } else { - $rcode = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE); + $rcode = \curl_getinfo($this->curlHandle, \CURLINFO_HTTP_CODE); } if (!$this->getEnablePersistentConnections()) { $this->closeCurlHandle(); } - if ($this->shouldRetry($errno, $rcode, $numRetries)) { - $numRetries += 1; - $sleepSeconds = $this->sleepTime($numRetries); - usleep(intval($sleepSeconds * 1000000)); + $shouldRetry = $this->shouldRetry($errno, $rcode, $rheaders, $numRetries); + + if (\is_callable($this->getRequestStatusCallback())) { + \call_user_func_array( + $this->getRequestStatusCallback(), + [$rbody, $rcode, $rheaders, $errno, $message, $shouldRetry, $numRetries] + ); + } + + if ($shouldRetry) { + ++$numRetries; + $sleepSeconds = $this->sleepTime($numRetries, $rheaders); + \usleep((int) ($sleepSeconds * 1000000)); } else { break; } } - if ($rbody === false) { + if (false === $rbody) { $this->handleCurlError($absUrl, $errno, $message, $numRetries); } - return [$rbody, $rcode]; + return [$rbody, $rcode, $rheaders]; } /** @@ -304,83 +351,119 @@ class CurlClient implements ClientInterface * @param int $errno * @param string $message * @param int $numRetries - * @throws Error\ApiConnection + * + * @throws Exception\ApiConnectionException */ private function handleCurlError($url, $errno, $message, $numRetries) { switch ($errno) { - case CURLE_COULDNT_CONNECT: - case CURLE_COULDNT_RESOLVE_HOST: - case CURLE_OPERATION_TIMEOUTED: - $msg = "Could not connect to Stripe ($url). Please check your " - . "internet connection and try again. If this problem persists, " + case \CURLE_COULDNT_CONNECT: + case \CURLE_COULDNT_RESOLVE_HOST: + case \CURLE_OPERATION_TIMEOUTED: + $msg = "Could not connect to Stripe ({$url}). Please check your " + . 'internet connection and try again. If this problem persists, ' . "you should check Stripe's service status at " - . "https://twitter.com/stripestatus, or"; - break; - case CURLE_SSL_CACERT: - case CURLE_SSL_PEER_CERTIFICATE: - $msg = "Could not verify Stripe's SSL certificate. Please make sure " - . "that your network is not intercepting certificates. " - . "(Try going to $url in your browser.) " - . "If this problem persists,"; - break; - default: - $msg = "Unexpected error communicating with Stripe. " - . "If this problem persists,"; - } - $msg .= " let us know at support@stripe.com."; + . 'https://twitter.com/stripestatus, or'; - $msg .= "\n\n(Network error [errno $errno]: $message)"; + break; + + case \CURLE_SSL_CACERT: + case \CURLE_SSL_PEER_CERTIFICATE: + $msg = "Could not verify Stripe's SSL certificate. Please make sure " + . 'that your network is not intercepting certificates. ' + . "(Try going to {$url} in your browser.) " + . 'If this problem persists,'; + + break; + + default: + $msg = 'Unexpected error communicating with Stripe. ' + . 'If this problem persists,'; + } + $msg .= ' let us know at support@stripe.com.'; + + $msg .= "\n\n(Network error [errno {$errno}]: {$message})"; if ($numRetries > 0) { - $msg .= "\n\nRequest was retried $numRetries times."; + $msg .= "\n\nRequest was retried {$numRetries} times."; } - throw new Error\ApiConnection($msg); + throw new Exception\ApiConnectionException($msg); } /** * Checks if an error is a problem that we should retry on. This includes both * socket errors that may represent an intermittent problem and some special * HTTP statuses. + * * @param int $errno * @param int $rcode + * @param array|\Stripe\Util\CaseInsensitiveArray $rheaders * @param int $numRetries + * * @return bool */ - private function shouldRetry($errno, $rcode, $numRetries) + private function shouldRetry($errno, $rcode, $rheaders, $numRetries) { if ($numRetries >= Stripe::getMaxNetworkRetries()) { return false; } // Retry on timeout-related problems (either on open or read). - if ($errno === CURLE_OPERATION_TIMEOUTED) { + if (\CURLE_OPERATION_TIMEOUTED === $errno) { return true; } // Destination refused the connection, the connection was reset, or a // variety of other connection failures. This could occur from a single // saturated server, so retry in case it's intermittent. - if ($errno === CURLE_COULDNT_CONNECT) { + if (\CURLE_COULDNT_CONNECT === $errno) { return true; } - // 409 conflict - if ($rcode === 409) { + // The API may ask us not to retry (eg; if doing so would be a no-op) + // or advise us to retry (eg; in cases of lock timeouts); we defer to that. + if (isset($rheaders['stripe-should-retry'])) { + if ('false' === $rheaders['stripe-should-retry']) { + return false; + } + if ('true' === $rheaders['stripe-should-retry']) { + return true; + } + } + + // 409 Conflict + if (409 === $rcode) { + return true; + } + + // Retry on 500, 503, and other internal errors. + // + // Note that we expect the stripe-should-retry header to be false + // in most cases when a 500 is returned, since our idempotency framework + // would typically replay it anyway. + if ($rcode >= 500) { return true; } return false; } - private function sleepTime($numRetries) + /** + * Provides the number of seconds to wait before retrying a request. + * + * @param int $numRetries + * @param array|\Stripe\Util\CaseInsensitiveArray $rheaders + * + * @return int + */ + private function sleepTime($numRetries, $rheaders) { // Apply exponential backoff with $initialNetworkRetryDelay on the // number of $numRetries so far as inputs. Do not allow the number to exceed // $maxNetworkRetryDelay. - $sleepSeconds = min( - Stripe::getInitialNetworkRetryDelay() * 1.0 * pow(2, $numRetries - 1), + $sleepSeconds = \min( + Stripe::getInitialNetworkRetryDelay() * 1.0 * 2 ** ($numRetries - 1), Stripe::getMaxNetworkRetryDelay() ); @@ -389,7 +472,13 @@ class CurlClient implements ClientInterface $sleepSeconds *= 0.5 * (1 + $this->randomGenerator->randFloat()); // But never sleep less than the base sleep seconds. - $sleepSeconds = max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds); + $sleepSeconds = \max(Stripe::getInitialNetworkRetryDelay(), $sleepSeconds); + + // And never sleep less than the time the API asks us to wait, assuming it's a reasonable ask. + $retryAfter = isset($rheaders['retry-after']) ? (float) ($rheaders['retry-after']) : 0.0; + if (\floor($retryAfter) === $retryAfter && $retryAfter <= Stripe::getMaxRetryAfter()) { + $sleepSeconds = \max($sleepSeconds, $retryAfter); + } return $sleepSeconds; } @@ -400,7 +489,7 @@ class CurlClient implements ClientInterface private function initCurlHandle() { $this->closeCurlHandle(); - $this->curlHandle = curl_init(); + $this->curlHandle = \curl_init(); } /** @@ -408,8 +497,8 @@ class CurlClient implements ClientInterface */ private function closeCurlHandle() { - if (!is_null($this->curlHandle)) { - curl_close($this->curlHandle); + if (null !== $this->curlHandle) { + \curl_close($this->curlHandle); $this->curlHandle = null; } } @@ -420,8 +509,8 @@ class CurlClient implements ClientInterface */ private function resetCurlHandle() { - if (!is_null($this->curlHandle) && $this->getEnablePersistentConnections()) { - curl_reset($this->curlHandle); + if (null !== $this->curlHandle && $this->getEnablePersistentConnections()) { + \curl_reset($this->curlHandle); } else { $this->initCurlHandle(); } @@ -430,14 +519,15 @@ class CurlClient implements ClientInterface /** * Indicates whether it is safe to use HTTP/2 or not. * - * @return boolean + * @return bool */ private function canSafelyUseHttp2() { // Versions of curl older than 7.60.0 don't respect GOAWAY frames // (cf. https://github.com/curl/curl/issues/2416), which Stripe use. - $curlVersion = curl_version()['version']; - return (version_compare($curlVersion, '7.60.0') >= 0); + $curlVersion = \curl_version()['version']; + + return \version_compare($curlVersion, '7.60.0') >= 0; } /** @@ -445,12 +535,13 @@ class CurlClient implements ClientInterface * * @param string[] $headers * @param string $name - * @return boolean + * + * @return bool */ private function hasHeader($headers, $name) { foreach ($headers as $header) { - if (strncasecmp($header, "{$name}: ", strlen($name) + 2) === 0) { + if (0 === \strncasecmp($header, "{$name}: ", \strlen($name) + 2)) { return true; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Invoice.php b/htdocs/includes/stripe/stripe-php/lib/Invoice.php index a309dd9e477..706da0a632a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Invoice.php +++ b/htdocs/includes/stripe/stripe-php/lib/Invoice.php @@ -1,76 +1,113 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Invoice + * Invoices are statements of amounts owed by a customer, and are either generated + * one-off, or generated periodically from a subscription. * - * @property string $id - * @property string $object - * @property string $account_country - * @property string $account_name - * @property int $amount_due - * @property int $amount_paid - * @property int $amount_remaining - * @property int $application_fee_amount - * @property int $attempt_count - * @property bool $attempted - * @property bool $auto_advance - * @property string $billing - * @property string $billing_reason - * @property string $charge - * @property string $collection_method - * @property int $created - * @property string $currency - * @property array $custom_fields - * @property string $customer - * @property mixed $customer_address - * @property string $customer_email - * @property string $customer_name - * @property string $customer_phone - * @property mixed $customer_shipping - * @property string $customer_tax_exempt - * @property array $customer_tax_ids - * @property string $default_payment_method - * @property string $default_source - * @property array $default_tax_rates - * @property string $description - * @property Discount $discount - * @property int $due_date - * @property int $ending_balance - * @property string $footer - * @property string $hosted_invoice_url - * @property string $invoice_pdf - * @property Collection $lines - * @property bool $livemode - * @property StripeObject $metadata - * @property int $next_payment_attempt - * @property string $number - * @property bool $paid - * @property string $payment_intent - * @property int $period_end - * @property int $period_start - * @property int $post_payment_credit_notes_amount - * @property int $pre_payment_credit_notes_amount - * @property string $receipt_number - * @property int $starting_balance - * @property string $statement_descriptor - * @property string $status - * @property mixed $status_transitions - * @property string $subscription - * @property int $subscription_proration_date - * @property int $subtotal - * @property int $tax - * @property mixed $threshold_reason - * @property int $total - * @property array $total_tax_amounts - * @property int $webhooks_delivered_at + * They contain <a href="https://stripe.com/docs/api#invoiceitems">invoice + * items</a>, and proration adjustments that may be caused by subscription + * upgrades/downgrades (if necessary). * - * @package Stripe + * If your invoice is configured to be billed through automatic charges, Stripe + * automatically finalizes your invoice and attempts payment. Note that finalizing + * the invoice, <a + * href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">when + * automatic</a>, does not happen immediately as the invoice is created. Stripe + * waits until one hour after the last webhook was successfully sent (or the last + * webhook timed out after failing). If you (and the platforms you may have + * connected to) have no webhooks configured, Stripe waits one hour after creation + * to finalize the invoice. + * + * If your invoice is configured to be billed by sending an email, then based on + * your <a href="https://dashboard.stripe.com/account/billing/automatic'">email + * settings</a>, Stripe will email the invoice to your customer and await payment. + * These emails can contain a link to a hosted page to pay the invoice. + * + * Stripe applies any customer credit on the account before determining the amount + * due for the invoice (i.e., the amount that will be actually charged). If the + * amount due for the invoice is less than Stripe's <a + * href="/docs/currencies#minimum-and-maximum-charge-amounts">minimum allowed + * charge per currency</a>, the invoice is automatically marked paid, and we add + * the amount due to the customer's running account balance which is applied to the + * next invoice. + * + * More details on the customer's account balance are <a + * href="https://stripe.com/docs/api/customers/object#customer_object-account_balance">here</a>. + * + * Related guide: <a href="https://stripe.com/docs/billing/invoices/sending">Send + * Invoices to Customers</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $account_country The country of the business associated with this invoice, most often the business creating the invoice. + * @property null|string $account_name The public name of the business associated with this invoice, most often the business creating the invoice. + * @property null|(string|\Stripe\TaxId)[] $account_tax_ids The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + * @property int $amount_due Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the <code>amount_due</code> may be 0. If there is a positive <code>starting_balance</code> for the invoice (the customer owes money), the <code>amount_due</code> will also take that into account. The charge that gets generated for the invoice will be for the amount specified in <code>amount_due</code>. + * @property int $amount_paid The amount, in %s, that was paid. + * @property int $amount_remaining The amount remaining, in %s, that is due. + * @property null|int $application_fee_amount The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. + * @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the <code>invoice.created</code> webhook, for example, so you might not want to display that invoice as unpaid to your users. + * @property bool $auto_advance Controls whether Stripe will perform <a href="https://stripe.com/docs/billing/invoices/workflow/#auto_advance">automatic collection</a> of the invoice. When <code>false</code>, the invoice's state will not automatically advance without an explicit action. + * @property null|string $billing_reason Indicates the reason why the invoice was created. <code>subscription_cycle</code> indicates an invoice created by a subscription advancing into a new period. <code>subscription_create</code> indicates an invoice created due to creating a subscription. <code>subscription_update</code> indicates an invoice created due to updating a subscription. <code>subscription</code> is set for all old invoices to indicate either a change to a subscription or a period advancement. <code>manual</code> is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The <code>upcoming</code> value is reserved for simulated invoices per the upcoming invoice endpoint. <code>subscription_threshold</code> indicates an invoice created due to a billing threshold being reached. + * @property null|string|\Stripe\Charge $charge ID of the latest charge generated for this invoice, if any. + * @property null|string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|\Stripe\StripeObject[] $custom_fields Custom fields displayed on the invoice. + * @property string|\Stripe\Customer $customer The ID of the customer who will be billed. + * @property null|\Stripe\StripeObject $customer_address The customer's address. Until the invoice is finalized, this field will equal <code>customer.address</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_email The customer's email. Until the invoice is finalized, this field will equal <code>customer.email</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_name The customer's name. Until the invoice is finalized, this field will equal <code>customer.name</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_phone The customer's phone number. Until the invoice is finalized, this field will equal <code>customer.phone</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|\Stripe\StripeObject $customer_shipping The customer's shipping information. Until the invoice is finalized, this field will equal <code>customer.shipping</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|string $customer_tax_exempt The customer's tax exempt status. Until the invoice is finalized, this field will equal <code>customer.tax_exempt</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|\Stripe\StripeObject[] $customer_tax_ids The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as <code>customer.tax_ids</code>. Once the invoice is finalized, this field will no longer be updated. + * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + * @property \Stripe\TaxRate[] $default_tax_rates The tax rates applied to this invoice, if any. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + * @property null|\Stripe\Discount $discount Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount. + * @property null|int $due_date The date on which payment for this invoice is due. This value will be <code>null</code> for invoices where <code>collection_method=charge_automatically</code>. + * @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + * @property null|string $footer Footer displayed on the invoice. + * @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + * @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + * @property null|\Stripe\ErrorObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + * @property \Stripe\Collection $lines The individual line items that make up the invoice. <code>lines</code> is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|int $next_payment_attempt The time at which payment will next be attempted. This value will be <code>null</code> for invoices where <code>collection_method=send_invoice</code>. + * @property null|string $number A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + * @property bool $paid Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. + * @property null|string|\Stripe\PaymentIntent $payment_intent The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + * @property int $period_end End of the usage period during which invoice items were added to this invoice. + * @property int $period_start Start of the usage period during which invoice items were added to this invoice. + * @property int $post_payment_credit_notes_amount Total amount of all post-payment credit notes issued for this invoice. + * @property int $pre_payment_credit_notes_amount Total amount of all pre-payment credit notes issued for this invoice. + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this invoice. + * @property int $starting_balance Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. + * @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement. + * @property null|string $status The status of the invoice, one of <code>draft</code>, <code>open</code>, <code>paid</code>, <code>uncollectible</code>, or <code>void</code>. <a href="https://stripe.com/docs/billing/invoices/workflow#workflow-overview">Learn more</a> + * @property \Stripe\StripeObject $status_transitions + * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any. + * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. + * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated + * @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + * @property \Stripe\StripeObject $threshold_reason + * @property int $total Total after discounts and taxes. + * @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. + * @property \Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items. + * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. */ class Invoice extends ApiResource { - const OBJECT_NAME = "invoice"; + const OBJECT_NAME = 'invoice'; use ApiOperations\All; use ApiOperations\Create; @@ -78,104 +115,38 @@ class Invoice extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the billing reason. - * @link https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason - */ - const BILLING_REASON_MANUAL = 'manual'; - const BILLING_REASON_SUBSCRIPTION = 'subscription'; - const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create'; - const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle'; - const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold'; - const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update'; - const BILLING_REASON_UPCOMING = 'upcoming'; - - /** - * Possible string representations of the `collection_method` property. - * @link https://stripe.com/docs/api/invoices/object#invoice_object-collection_method - */ - const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; - const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; - - /** - * Possible string representations of the invoice status. - * @link https://stripe.com/docs/api/invoices/object#invoice_object-status - */ - const STATUS_DRAFT = 'draft'; - const STATUS_OPEN = 'open'; - const STATUS_PAID = 'paid'; - const STATUS_UNCOLLECTIBLE = 'uncollectible'; - const STATUS_VOID = 'void'; - - /** - * Possible string representations of the `billing` property. - * @deprecated Use `collection_method` instead. - * @link https://stripe.com/docs/api/invoices/object#invoice_object-billing - */ const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically'; - const BILLING_SEND_INVOICE = 'send_invoice'; + const BILLING_SEND_INVOICE = 'send_invoice'; + + const BILLING_REASON_MANUAL = 'manual'; + const BILLING_REASON_SUBSCRIPTION = 'subscription'; + const BILLING_REASON_SUBSCRIPTION_CREATE = 'subscription_create'; + const BILLING_REASON_SUBSCRIPTION_CYCLE = 'subscription_cycle'; + const BILLING_REASON_SUBSCRIPTION_THRESHOLD = 'subscription_threshold'; + const BILLING_REASON_SUBSCRIPTION_UPDATE = 'subscription_update'; + const BILLING_REASON_UPCOMING = 'upcoming'; + + const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; + const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + + const STATUS_DELETED = 'deleted'; + const STATUS_DRAFT = 'draft'; + const STATUS_OPEN = 'open'; + const STATUS_PAID = 'paid'; + const STATUS_UNCOLLECTIBLE = 'uncollectible'; + const STATUS_VOID = 'void'; + + use ApiOperations\NestedResource; + + const PATH_LINES = '/lines'; /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return Invoice The finalized invoice. - */ - public function finalizeInvoice($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/finalize'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $params - * @param array|string|null $opts + * @throws \Stripe\Exception\ApiErrorException if the request fails * - * @return Invoice The uncollectible invoice. - */ - public function markUncollectible($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/mark_uncollectible'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $params - * @param array|string|null $opts - * - * @return Invoice The paid invoice. - */ - public function pay($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/pay'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $params - * @param array|string|null $opts - * - * @return Invoice The sent invoice. - */ - public function sendInvoice($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/send'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param array|null $params - * @param array|string|null $opts - * - * @return Invoice The upcoming invoice. + * @return \Stripe\Invoice the upcoming invoice */ public static function upcoming($params = null, $opts = null) { @@ -183,20 +154,106 @@ class Invoice extends ApiResource list($response, $opts) = static::_staticRequest('get', $url, $params, $opts); $obj = Util\Util::convertToStripeObject($response->json, $opts); $obj->setLastResponse($response); + return $obj; } /** - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the invoice on which to retrieve the lines + * @param null|array $params + * @param null|array|string $opts * - * @return Invoice The voided invoice. + * @throws StripeExceptionApiErrorException if the request fails + * + * @return \Stripe\Collection the list of lines (InvoiceLineItem) + */ + public static function allLines($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_LINES, $params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Invoice the finalized invoice + */ + public function finalizeInvoice($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/finalize'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Invoice the uncollectible invoice + */ + public function markUncollectible($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/mark_uncollectible'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Invoice the paid invoice + */ + public function pay($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/pay'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Invoice the sent invoice + */ + public function sendInvoice($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/send'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Invoice the voided invoice */ public function voidInvoice($params = null, $opts = null) { $url = $this->instanceUrl() . '/void'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php b/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php index 2f74dabec5c..6153bbf98b7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/InvoiceItem.php @@ -1,35 +1,45 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class InvoiceItem + * Sometimes you want to add a charge or credit to a customer, but actually charge + * or credit the customer's card only at the end of a regular billing cycle. This + * is useful for combining several charges (to minimize per-transaction fees), or + * for having Stripe tabulate your usage-based billing totals. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $currency - * @property string $customer - * @property int $date - * @property string $description - * @property bool $discountable - * @property string $invoice - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $period - * @property Plan $plan - * @property bool $proration - * @property int $quantity - * @property string $subscription - * @property string $subscription_item - * @property array $tax_rates - * @property int $unit_amount + * Related guide: <a + * href="https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription + * Invoices</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount (in the <code>currency</code> specified) of the invoice item. This should always be equal to <code>unit_amount * quantity</code>. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string|\Stripe\Customer $customer The ID of the customer who will be billed when this invoice item is billed. + * @property int $date Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property bool $discountable If true, discounts will apply to this invoice item. Always false for prorations. + * @property null|(string|\Stripe\Discount)[] $discounts The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount. + * @property null|string|\Stripe\Invoice $invoice The ID of the invoice this invoice item belongs to. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject $period + * @property null|\Stripe\Plan $plan If the invoice item is a proration, the plan of the subscription that the proration was computed for. + * @property null|\Stripe\Price $price The price of the invoice item. + * @property bool $proration Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + * @property int $quantity Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any. + * @property string $subscription_item The subscription item that this invoice item has been created for, if any. + * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the <code>default_tax_rates</code> on the invoice do not apply to this invoice item. + * @property null|int $unit_amount Unit amount (in the <code>currency</code> specified) of the invoice item. + * @property null|string $unit_amount_decimal Same as <code>unit_amount</code>, but contains a decimal value with at most 12 decimal places. */ class InvoiceItem extends ApiResource { - const OBJECT_NAME = "invoiceitem"; + const OBJECT_NAME = 'invoiceitem'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php b/htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php index e8e8c881d5a..e579afb6a8d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/InvoiceLineItem.php @@ -1,32 +1,33 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class InvoiceLineItem - * - * @property string $id - * @property string $object - * @property int $amount - * @property string $currency - * @property string $description - * @property bool $discountable - * @property string $invoice_item - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $period - * @property Plan $plan - * @property bool $proration - * @property int $quantity - * @property string $subscription - * @property string $subscription_item - * @property array $tax_amounts - * @property array $tax_rates - * @property string $type - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The amount, in %s. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\Stripe\StripeObject[] $discount_amounts The amount of discount calculated per discount for this line item. + * @property bool $discountable If true, discounts will apply to this line item. Always false for prorations. + * @property null|(string|\Stripe\Discount)[] $discounts The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use <code>expand[]=discounts</code> to expand each discount. + * @property string $invoice_item The ID of the <a href="https://stripe.com/docs/api/invoiceitems">invoice item</a> associated with this line item if any. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with <code>type=subscription</code> this will reflect the metadata of the subscription that caused the line item to be created. + * @property \Stripe\StripeObject $period + * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration. + * @property null|\Stripe\Price $price The price of the line item. + * @property bool $proration Whether this is a proration. + * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration. + * @property null|string $subscription The subscription that the invoice item pertains to, if any. + * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. + * @property \Stripe\StripeObject[] $tax_amounts The amount of tax calculated per tax rate for this line item + * @property \Stripe\TaxRate[] $tax_rates The tax rates which apply to the line item. + * @property string $type A string identifying the type of the source of this line item, either an <code>invoiceitem</code> or a <code>subscription</code>. */ class InvoiceLineItem extends ApiResource { - const OBJECT_NAME = "line_item"; + const OBJECT_NAME = 'line_item'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php index 9a04063d37c..22e8127553e 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/Authorization.php @@ -1,68 +1,81 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Issuing; /** - * Class Authorization + * When an <a href="https://stripe.com/docs/issuing">issued card</a> is used to + * make a purchase, an Issuing <code>Authorization</code> object is created. <a + * href="https://stripe.com/docs/issuing/purchases/authorizations">Authorizations</a> + * must be approved for the purchase to be completed successfully. * - * @property string $id - * @property string $object - * @property bool $approved - * @property string $authorization_method - * @property int $authorized_amount - * @property string $authorized_currency - * @property \Stripe\Collection $balance_transactions - * @property Card $card - * @property Cardholder $cardholder - * @property int $created - * @property int $held_amount - * @property string $held_currency - * @property bool $is_held_amount_controllable - * @property bool $livemode - * @property mixed $merchant_data - * @property \Stripe\StripeObject $metadata - * @property int $pending_authorized_amount - * @property int $pending_held_amount - * @property mixed $request_history - * @property string $status - * @property \Stripe\Collection $transactions - * @property mixed $verification_data + * Related guide: <a + * href="https://stripe.com/docs/issuing/purchases/authorizations">Issued Card + * Authorizations</a>. * - * @package Stripe\Issuing + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. + * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. + * @property bool $approved Whether the authorization has been approved. + * @property string $authorization_method How the card details were provided. + * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization. + * @property \Stripe\Issuing\Card $card You can <a href="https://stripe.com/docs/issuing/cards">create physical or virtual cards</a> that are issued to cardholders. + * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. + * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property \Stripe\StripeObject $merchant_data + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an <code>issuing_authorization.request</code> webhook. + * @property \Stripe\StripeObject[] $request_history History of every time the authorization was approved/denied (whether approved/denied by you directly or by Stripe based on your <code>spending_controls</code>). If the merchant changes the authorization by performing an <a href="https://stripe.com/docs/issuing/purchases/authorizations">incremental authorization or partial capture</a>, you can look at this field to see the previous states of the authorization. + * @property string $status The current status of the authorization in its lifecycle. + * @property \Stripe\Issuing\Transaction[] $transactions List of <a href="https://stripe.com/docs/api/issuing/transactions">transactions</a> associated with this authorization. + * @property \Stripe\StripeObject $verification_data + * @property null|string $wallet What, if any, digital wallet was used for this authorization. One of <code>apple_pay</code>, <code>google_pay</code>, or <code>samsung_pay</code>. */ class Authorization extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.authorization"; + const OBJECT_NAME = 'issuing.authorization'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Retrieve; use \Stripe\ApiOperations\Update; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Authorization The approved authorization. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Authorization the approved authorization */ - public function approve($params = null, $options = null) + public function approve($params = null, $opts = null) { $url = $this->instanceUrl() . '/approve'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Authorization The declined authorization. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Authorization the declined authorization */ - public function decline($params = null, $options = null) + public function decline($params = null, $opts = null) { $url = $this->instanceUrl() . '/decline'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php index 60cc5b4e1bf..e0ac774e75d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/Card.php @@ -1,33 +1,38 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Issuing; /** - * Class Card + * You can <a href="https://stripe.com/docs/issuing/cards">create physical or + * virtual cards</a> that are issued to cardholders. * - * @property string $id - * @property string $object - * @property mixed $authorization_controls - * @property mixed $billing - * @property string $brand - * @property Cardholder $cardholder - * @property int $created - * @property string $currency - * @property int $exp_month - * @property int $exp_year - * @property string $last4 - * @property bool $livemode - * @property \Stripe\StripeObject $metadata - * @property string $name - * @property mixed $shipping - * @property string $status - * @property string $type - * - * @package Stripe\Issuing + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $brand The brand of the card. + * @property null|string $cancellation_reason The reason why the card was canceled. + * @property \Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a Cardholder</a></p> + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint. + * @property int $exp_month The expiration month of the card. + * @property int $exp_year The expiration year of the card. + * @property string $last4 The last 4 digits of the card number. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint. + * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any. + * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any. + * @property null|string $replacement_reason The reason why the previous card needed to be replaced. + * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped. + * @property \Stripe\StripeObject $spending_controls + * @property string $status Whether authorizations can be approved on this card. + * @property string $type The type of the card. */ class Card extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.card"; + const OBJECT_NAME = 'issuing.card'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; @@ -35,17 +40,20 @@ class Card extends \Stripe\ApiResource use \Stripe\ApiOperations\Update; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return CardDetails The card details associated with that issuing card. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\CardDetails the card details associated with that issuing card */ - public function details($params = null, $options = null) + public function details($params = null, $opts = null) { $url = $this->instanceUrl() . '/details'; - list($response, $opts) = $this->_request('get', $url, $params, $options); + list($response, $opts) = $this->_request('get', $url, $params, $opts); $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); $obj->setLastResponse($response); + return $obj; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php index 65d3919caa4..98f4e0b87e5 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/CardDetails.php @@ -3,7 +3,7 @@ namespace Stripe\Issuing; /** - * Class CardDetails + * Class CardDetails. * * @property string $id * @property string $object @@ -12,10 +12,8 @@ namespace Stripe\Issuing; * @property int $exp_month * @property int $exp_year * @property string $number - * - * @package Stripe\Issuing */ class CardDetails extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.card_details"; + const OBJECT_NAME = 'issuing.card_details'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php index ed6c2920a5c..931b7ce8e30 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/Cardholder.php @@ -1,27 +1,36 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Issuing; /** - * Class Cardholder + * An Issuing <code>Cardholder</code> object represents an individual or business + * entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards. * - * @property string $id - * @property string $object - * @property mixed $billing - * @property int $created - * @property string $email - * @property bool $livemode - * @property \Stripe\StripeObject $metadata - * @property string $name - * @property string $phone_number - * @property string $status - * @property string $type + * Related guide: <a + * href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a + * Cardholder</a> * - * @package Stripe\Issuing + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $billing + * @property null|\Stripe\StripeObject $company Additional information about a <code>company</code> cardholder. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $email The cardholder's email address. + * @property null|\Stripe\StripeObject $individual Additional information about an <code>individual</code> cardholder. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The cardholder's name. This will be printed on cards issued to them. + * @property null|string $phone_number The cardholder's phone number. + * @property \Stripe\StripeObject $requirements + * @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our <a href="https://stripe.com/docs/issuing/controls/spending-controls">documentation</a> for more details. + * @property string $status Specifies whether to permit authorizations on this cardholder's cards. + * @property string $type One of <code>individual</code> or <code>company</code>. */ class Cardholder extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.cardholder"; + const OBJECT_NAME = 'issuing.cardholder'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php index d0ae0d2e98f..5f24864b453 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/Dispute.php @@ -1,30 +1,53 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Issuing; /** - * Class Dispute + * As a <a href="https://stripe.com/docs/issuing">card issuer</a>, you can dispute + * transactions that the cardholder does not recognize, suspects to be fraudulent, + * or has other issues with. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $created - * @property string $currency - * @property mixed $evidence - * @property bool $livemode - * @property \Stripe\StripeObject $metadata - * @property string $reason - * @property string $status - * @property Transaction $transaction + * Related guide: <a + * href="https://stripe.com/docs/issuing/purchases/disputes">Disputing + * Transactions</a> * - * @package Stripe\Issuing + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Disputed amount. Usually the amount of the <code>disputed_transaction</code>, but can differ (usually because of currency fluctuation). + * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency The currency the <code>disputed_transaction</code> was made in. + * @property \Stripe\StripeObject $evidence + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $status Current status of the dispute. + * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed. */ class Dispute extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.dispute"; + const OBJECT_NAME = 'issuing.dispute'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; use \Stripe\ApiOperations\Retrieve; use \Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Dispute the submited dispute + */ + public function submit($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/submit'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php b/htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php index ea90818fd25..3c44d7ec17a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/Issuing/Transaction.php @@ -1,35 +1,43 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Issuing; /** - * Class Transaction + * Any use of an <a href="https://stripe.com/docs/issuing">issued card</a> that + * results in funds entering or leaving your Stripe account, such as a completed + * purchase or refund, is represented by an Issuing <code>Transaction</code> + * object. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $authorization - * @property string $balance_transaction - * @property string $card - * @property string $cardholder - * @property int $created - * @property string $currency - * @property string $dispute - * @property bool $livemode - * @property mixed $merchant_data - * @property int $merchant_amount - * @property string $merchant_currency - * @property \Stripe\StripeObject $metadata - * @property string $type + * Related guide: <a + * href="https://stripe.com/docs/issuing/purchases/transactions">Issued Card + * Transactions</a>. * - * @package Stripe\Issuing + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. + * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in <code>currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. + * @property null|string|\Stripe\Issuing\Authorization $authorization The <code>Authorization</code> object that led to this transaction. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a> associated with this transaction. + * @property string|\Stripe\Issuing\Card $card The card used to make this transaction. + * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property int $merchant_amount The amount that the merchant will receive, denominated in <code>merchant_currency</code> and in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a>. It will be different from <code>amount</code> if the merchant is taking payment in a different currency. + * @property string $merchant_currency The currency with which the merchant is taking payment. + * @property \Stripe\StripeObject $merchant_data + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. + * @property string $type The nature of the transaction. */ class Transaction extends \Stripe\ApiResource { - const OBJECT_NAME = "issuing.transaction"; + const OBJECT_NAME = 'issuing.transaction'; use \Stripe\ApiOperations\All; - use \Stripe\ApiOperations\Create; use \Stripe\ApiOperations\Retrieve; use \Stripe\ApiOperations\Update; } diff --git a/htdocs/includes/stripe/stripe-php/lib/LineItem.php b/htdocs/includes/stripe/stripe-php/lib/LineItem.php new file mode 100644 index 00000000000..d3e55af2022 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/LineItem.php @@ -0,0 +1,26 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * A line item. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|int $amount_subtotal Total before any discounts or taxes is applied. + * @property null|int $amount_total Total after discounts and taxes. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + * @property \Stripe\StripeObject[] $discounts The discounts applied to the line item. + * @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p> + * @property null|int $quantity The quantity of products being purchased. + * @property \Stripe\StripeObject[] $taxes The taxes applied to the line item. + */ +class LineItem extends ApiResource +{ + const OBJECT_NAME = 'item'; + + use ApiOperations\All; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/LoginLink.php b/htdocs/includes/stripe/stripe-php/lib/LoginLink.php index 9f677364b17..3351356b8da 100644 --- a/htdocs/includes/stripe/stripe-php/lib/LoginLink.php +++ b/htdocs/includes/stripe/stripe-php/lib/LoginLink.php @@ -1,17 +1,15 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class LoginLink - * - * @property string $object - * @property int $created - * @property string $url - * - * @package Stripe + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $url The URL for the login link. */ class LoginLink extends ApiResource { - const OBJECT_NAME = "login_link"; + const OBJECT_NAME = 'login_link'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Mandate.php b/htdocs/includes/stripe/stripe-php/lib/Mandate.php new file mode 100644 index 00000000000..3452a014216 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Mandate.php @@ -0,0 +1,27 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * A Mandate is a record of the permission a customer has given you to debit their + * payment method. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $customer_acceptance + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $multi_use + * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method associated with this mandate. + * @property \Stripe\StripeObject $payment_method_details + * @property \Stripe\StripeObject $single_use + * @property string $status The status of the mandate, which indicates whether it can be used to initiate a payment. + * @property string $type The type of the mandate. + */ +class Mandate extends ApiResource +{ + const OBJECT_NAME = 'mandate'; + + use ApiOperations\Retrieve; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/OAuth.php b/htdocs/includes/stripe/stripe-php/lib/OAuth.php index e9a82e62a0d..7b0886e3046 100644 --- a/htdocs/includes/stripe/stripe-php/lib/OAuth.php +++ b/htdocs/includes/stripe/stripe-php/lib/OAuth.php @@ -7,19 +7,19 @@ abstract class OAuth /** * Generates a URL to Stripe's OAuth form. * - * @param array|null $params - * @param array|null $opts + * @param null|array $params + * @param null|array $opts * - * @return string The URL to Stripe's OAuth form. + * @return string the URL to Stripe's OAuth form */ public static function authorizeUrl($params = null, $opts = null) { $params = $params ?: []; - $base = ($opts && array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; + $base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; $params['client_id'] = self::_getClientId($params); - if (!array_key_exists('response_type', $params)) { + if (!\array_key_exists('response_type', $params)) { $params['response_type'] = 'code'; } $query = Util\Util::encodeParameters($params); @@ -31,14 +31,16 @@ abstract class OAuth * Use an authoriztion code to connect an account to your platform and * fetch the user's credentials. * - * @param array|null $params - * @param array|null $opts + * @param null|array $params + * @param null|array $opts * - * @return StripeObject Object containing the response from the API. + * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return StripeObject object containing the response from the API */ public static function token($params = null, $opts = null) { - $base = ($opts && array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; + $base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; $requestor = new ApiRequestor(null, $base); list($response, $apiKey) = $requestor->request( 'post', @@ -46,21 +48,24 @@ abstract class OAuth $params, null ); + return Util\Util::convertToStripeObject($response->json, $opts); } /** * Disconnects an account from your platform. * - * @param array|null $params - * @param array|null $opts + * @param null|array $params + * @param null|array $opts * - * @return StripeObject Object containing the response from the API. + * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return StripeObject object containing the response from the API */ public static function deauthorize($params = null, $opts = null) { $params = $params ?: []; - $base = ($opts && array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; + $base = ($opts && \array_key_exists('connect_base', $opts)) ? $opts['connect_base'] : Stripe::$connectBase; $requestor = new ApiRequestor(null, $base); $params['client_id'] = self::_getClientId($params); list($response, $apiKey) = $requestor->request( @@ -69,16 +74,17 @@ abstract class OAuth $params, null ); + return Util\Util::convertToStripeObject($response->json, $opts); } private static function _getClientId($params = null) { - $clientId = ($params && array_key_exists('client_id', $params)) ? $params['client_id'] : null; - if ($clientId === null) { + $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null; + if (null === $clientId) { $clientId = Stripe::getClientId(); } - if ($clientId === null) { + if (null === $clientId) { $msg = 'No client_id provided. (HINT: set your client_id using ' . '"Stripe::setClientId(<CLIENT-ID>)". You can find your client_ids ' . 'in your Stripe dashboard at ' @@ -86,8 +92,10 @@ abstract class OAuth . 'after registering your account as a platform. See ' . 'https://stripe.com/docs/connect/standard-accounts for details, ' . 'or email support@stripe.com if you have any questions.'; - throw new Error\Authentication($msg); + + throw new Exception\AuthenticationException($msg); } + return $clientId; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/OAuthErrorObject.php b/htdocs/includes/stripe/stripe-php/lib/OAuthErrorObject.php new file mode 100644 index 00000000000..620c5bb27d4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/OAuthErrorObject.php @@ -0,0 +1,31 @@ +<?php + +namespace Stripe; + +/** + * Class OAuthErrorObject. + * + * @property string $error + * @property string $error_description + */ +class OAuthErrorObject extends StripeObject +{ + /** + * Refreshes this object using the provided values. + * + * @param array $values + * @param null|array|string|Util\RequestOptions $opts + * @param bool $partial defaults to false + */ + public function refreshFrom($values, $opts, $partial = false) + { + // Unlike most other API resources, the API will omit attributes in + // error objects when they have a null value. We manually set default + // values here to facilitate generic error handling. + $values = \array_merge([ + 'error' => null, + 'error_description' => null, + ], $values); + parent::refreshFrom($values, $opts, $partial); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Order.php b/htdocs/includes/stripe/stripe-php/lib/Order.php index 1f2ce2563ac..fd3630edb8c 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Order.php +++ b/htdocs/includes/stripe/stripe-php/lib/Order.php @@ -1,39 +1,45 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Order + * Order objects are created to handle end customers' purchases of previously + * defined <a href="https://stripe.com/docs/api#products">products</a>. You can + * create, retrieve, and pay individual orders, as well as list all orders. Orders + * are identified by a unique, random ID. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $amount_returned - * @property string $application - * @property int $application_fee - * @property string $charge - * @property int $created - * @property string $currency - * @property string $customer - * @property string $email - * @property string $external_coupon_code - * @property OrderItem[] $items - * @property bool $livemode - * @property StripeObject $metadata - * @property Collection $returns - * @property string $selected_shipping_method - * @property mixed $shipping - * @property array $shipping_methods - * @property string $status - * @property mixed $status_transitions - * @property int $updated - * @property string $upstream_id + * Related guide: <a href="https://stripe.com/docs/orders">Tax, Shipping, and + * Inventory</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + * @property null|int $amount_returned The total amount that was returned to the customer. + * @property null|string $application ID of the Connect Application that created the order. + * @property null|int $application_fee A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. + * @property null|string|\Stripe\Charge $charge The ID of the payment used to pay for the order. Present if the order status is <code>paid</code>, <code>fulfilled</code>, or <code>refunded</code>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Customer $customer The customer used for the order. + * @property null|string $email The email address of the customer placing the order. + * @property string $external_coupon_code External coupon code to load for this order. + * @property \Stripe\OrderItem[] $items List of items constituting the order. An order can have up to 25 items. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\Collection $returns A list of returns that have taken place for this order. + * @property null|string $selected_shipping_method The shipping method that is currently selected for this order, if any. If present, it is equal to one of the <code>id</code>s of shipping methods in the <code>shipping_methods</code> array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. + * @property null|\Stripe\StripeObject $shipping The shipping address for the order. Present if the order is for goods to be shipped. + * @property null|\Stripe\StripeObject[] $shipping_methods A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. + * @property string $status Current order status. One of <code>created</code>, <code>paid</code>, <code>canceled</code>, <code>fulfilled</code>, or <code>returned</code>. More details in the <a href="https://stripe.com/docs/orders/guide#understanding-order-statuses">Orders Guide</a>. + * @property null|\Stripe\StripeObject $status_transitions The timestamps at which the order status was updated. + * @property null|int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @property string $upstream_id The user's order ID if it is different from the Stripe order ID. */ class Order extends ApiResource { - const OBJECT_NAME = "order"; + const OBJECT_NAME = 'order'; use ApiOperations\All; use ApiOperations\Create; @@ -41,23 +47,35 @@ class Order extends ApiResource use ApiOperations\Update; /** - * @return Order The paid order. + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\OrderReturn the newly created return + */ + public function returnOrder($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/returns'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + + return Util\Util::convertToStripeObject($response, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Order the paid order */ public function pay($params = null, $opts = null) { $url = $this->instanceUrl() . '/pay'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } - - /** - * @return OrderReturn The newly created return. - */ - public function returnOrder($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/returns'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - return Util\Util::convertToStripeObject($response, $opts); - } } diff --git a/htdocs/includes/stripe/stripe-php/lib/OrderItem.php b/htdocs/includes/stripe/stripe-php/lib/OrderItem.php index 6ef1242fc34..e2e6e39a287 100644 --- a/htdocs/includes/stripe/stripe-php/lib/OrderItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/OrderItem.php @@ -3,7 +3,7 @@ namespace Stripe; /** - * Class OrderItem + * Class OrderItem. * * @property string $object * @property int $amount @@ -12,10 +12,8 @@ namespace Stripe; * @property string $parent * @property int $quantity * @property string $type - * - * @package Stripe */ class OrderItem extends StripeObject { - const OBJECT_NAME = "order_item"; + const OBJECT_NAME = 'order_item'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php b/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php index 3b1ca8efa12..3774482d0dd 100644 --- a/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php +++ b/htdocs/includes/stripe/stripe-php/lib/OrderReturn.php @@ -1,25 +1,31 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class OrderReturn + * A return represents the full or partial return of a number of <a + * href="https://stripe.com/docs/api#order_items">order items</a>. Returns always + * belong to an order, and may optionally contain a refund. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $created - * @property string $currency - * @property OrderItem[] $items - * @property bool $livemode - * @property string $order - * @property string $refund + * Related guide: <a + * href="https://stripe.com/docs/orders/guide#handling-returns">Handling + * Returns</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property \Stripe\OrderItem[] $items The items included in this order return. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string|\Stripe\Order $order The order that this return includes items from. + * @property null|string|\Stripe\Refund $refund The ID of the refund issued for this return. */ class OrderReturn extends ApiResource { - const OBJECT_NAME = "order_return"; + const OBJECT_NAME = 'order_return'; use ApiOperations\All; use ApiOperations\Retrieve; diff --git a/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php b/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php index b70b1577899..2d204e9da4a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php +++ b/htdocs/includes/stripe/stripe-php/lib/PaymentIntent.php @@ -1,106 +1,125 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class PaymentIntent + * A PaymentIntent guides you through the process of collecting a payment from your + * customer. We recommend that you create exactly one PaymentIntent for each order + * or customer session in your system. You can reference the PaymentIntent later to + * see the history of payment attempts for a particular session. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $amount_capturable - * @property int $amount_received - * @property string $application - * @property int $application_fee_amount - * @property int $canceled_at - * @property string $cancellation_reason - * @property string $capture_method - * @property Collection $charges - * @property string $client_secret + * A PaymentIntent transitions through <a + * href="https://stripe.com/docs/payments/intents#intent-statuses">multiple + * statuses</a> throughout its lifetime as it interfaces with Stripe.js to perform + * authentication flows and ultimately creates at most one successful charge. + * + * Related guide: <a + * href="https://stripe.com/docs/payments/payment-intents">Payment Intents API</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency unit</a> (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or <a href="https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts">equivalent in charge currency</a>. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + * @property int $amount_capturable Amount that can be captured from this PaymentIntent. + * @property int $amount_received Amount that was collected by this PaymentIntent. + * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the PaymentIntent. + * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a>. + * @property null|int $canceled_at Populated when <code>status</code> is <code>canceled</code>, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + * @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (<code>duplicate</code>, <code>fraudulent</code>, <code>requested_by_customer</code>, or <code>abandoned</code>) or generated by Stripe internally (<code>failed_invoice</code>, <code>void_invoice</code>, or <code>automatic</code>). + * @property string $capture_method Controls when the funds will be captured from the customer's account. + * @property \Stripe\Collection $charges Charges that were created by this PaymentIntent, if any. + * @property null|string $client_secret <p>The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.</p><p>The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.</p><p>Refer to our docs to <a href="https://stripe.com/docs/payments/accept-a-payment?integration=elements">accept a payment</a> and learn about how <code>client_secret</code> should be handled.</p> * @property string $confirmation_method - * @property int $created - * @property string $currency - * @property string $customer - * @property string $description - * @property mixed $last_payment_error - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $next_action - * @property string $on_behalf_of - * @property string $payment_method - * @property string[] $payment_method_types - * @property string $receipt_email - * @property string $review - * @property mixed $shipping - * @property string $source - * @property string $statement_descriptor - * @property string $status - * @property mixed $transfer_data - * @property string $transfer_group - * - * @package Stripe + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Customer $customer <p>ID of the Customer this PaymentIntent belongs to, if one exists.</p><p>Payment methods attached to other Customers cannot be used with this PaymentIntent.</p><p>If present in combination with <a href="https://stripe.com/docs/api#payment_intent_object-setup_future_usage">setup_future_usage</a>, this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.</p> + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. + * @property null|\Stripe\ErrorObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the <a href="https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata">documentation</a>. + * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details. + * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent. + * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent. + * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + * @property null|string $receipt_email Email address that the receipt for the resulting payment will be sent to. If <code>receipt_email</code> is specified for a payment in live mode, a receipt will be sent regardless of your <a href="https://dashboard.stripe.com/account/emails">email settings</a>. + * @property null|string|\Stripe\Review $review ID of the review associated with this PaymentIntent, if any. + * @property null|string $setup_future_usage <p>Indicates that you intend to make future payments with this PaymentIntent's payment method.</p><p>Providing this parameter will <a href="https://stripe.com/docs/payments/save-during-payment">attach the payment method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be <a href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer after the transaction completes.</p><p>When processing card payments, Stripe also uses <code>setup_future_usage</code> to dynamically optimize your payment flow and comply with regional legislation and network rules, such as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.</p> + * @property null|\Stripe\StripeObject $shipping Shipping information for this PaymentIntent. + * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $source This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. + * @property null|string $statement_descriptor For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. + * @property null|string $statement_descriptor_suffix Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * @property string $status Status of this PaymentIntent, one of <code>requires_payment_method</code>, <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>requires_capture</code>, <code>canceled</code>, or <code>succeeded</code>. Read more about each PaymentIntent <a href="https://stripe.com/docs/payments/intents#intent-statuses">status</a>. + * @property null|\Stripe\StripeObject $transfer_data The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details. + * @property null|string $transfer_group A string that identifies the resulting payment as part of a group. See the PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for connected accounts</a> for details. */ class PaymentIntent extends ApiResource { - const OBJECT_NAME = "payment_intent"; + const OBJECT_NAME = 'payment_intent'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * These constants are possible representations of the status field. - * - * @link https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status - */ - const STATUS_CANCELED = 'canceled'; - const STATUS_PROCESSING = 'processing'; - const STATUS_REQUIRES_ACTION = 'requires_action'; - const STATUS_REQUIRES_CAPTURE = 'requires_capture'; - const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; + const STATUS_CANCELED = 'canceled'; + const STATUS_PROCESSING = 'processing'; + const STATUS_REQUIRES_ACTION = 'requires_action'; + const STATUS_REQUIRES_CAPTURE = 'requires_capture'; + const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method'; - const STATUS_SUCCEEDED = 'succeeded'; + const STATUS_SUCCEEDED = 'succeeded'; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return PaymentIntent The canceled payment intent. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return PaymentIntent the canceled payment intent */ - public function cancel($params = null, $options = null) + public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return PaymentIntent The captured payment intent. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return PaymentIntent the captured payment intent */ - public function capture($params = null, $options = null) + public function capture($params = null, $opts = null) { $url = $this->instanceUrl() . '/capture'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return PaymentIntent The confirmed payment intent. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return PaymentIntent the confirmed payment intent */ - public function confirm($params = null, $options = null) + public function confirm($params = null, $opts = null) { $url = $this->instanceUrl() . '/confirm'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php b/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php index c0557e8c394..d9c9e2b52cc 100644 --- a/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php +++ b/htdocs/includes/stripe/stripe-php/lib/PaymentMethod.php @@ -1,28 +1,49 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class PaymentMethod + * PaymentMethod objects represent your customer's payment instruments. They can be + * used with <a + * href="https://stripe.com/docs/payments/payment-intents">PaymentIntents</a> to + * collect payments or saved to Customer objects to store instrument details for + * future payments. * - * @property string $id - * @property string $object - * @property mixed $billing_details - * @property mixed $card - * @property mixed $card_present - * @property int $created - * @property string $customer - * @property mixed $ideal - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $sepa_debit - * @property string $type + * Related guides: <a + * href="https://stripe.com/docs/payments/payment-methods">Payment Methods</a> and + * <a href="https://stripe.com/docs/payments/more-payment-scenarios">More Payment + * Scenarios</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $alipay + * @property \Stripe\StripeObject $au_becs_debit + * @property \Stripe\StripeObject $bacs_debit + * @property \Stripe\StripeObject $bancontact + * @property \Stripe\StripeObject $billing_details + * @property \Stripe\StripeObject $card + * @property \Stripe\StripeObject $card_present + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customer The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + * @property \Stripe\StripeObject $eps + * @property \Stripe\StripeObject $fpx + * @property \Stripe\StripeObject $giropay + * @property \Stripe\StripeObject $grabpay + * @property \Stripe\StripeObject $ideal + * @property \Stripe\StripeObject $interac_present + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject $oxxo + * @property \Stripe\StripeObject $p24 + * @property \Stripe\StripeObject $sepa_debit + * @property \Stripe\StripeObject $sofort + * @property string $type The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. */ class PaymentMethod extends ApiResource { - const OBJECT_NAME = "payment_method"; + const OBJECT_NAME = 'payment_method'; use ApiOperations\All; use ApiOperations\Create; @@ -30,30 +51,36 @@ class PaymentMethod extends ApiResource use ApiOperations\Update; /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return PaymentMethod The attached payment method. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return PaymentMethod the attached payment method */ public function attach($params = null, $opts = null) { $url = $this->instanceUrl() . '/attach'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return PaymentMethod The detached payment method. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return PaymentMethod the detached payment method */ public function detach($params = null, $opts = null) { $url = $this->instanceUrl() . '/detach'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Payout.php b/htdocs/includes/stripe/stripe-php/lib/Payout.php index 131bd4ae06d..46f86181e4b 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Payout.php +++ b/htdocs/includes/stripe/stripe-php/lib/Payout.php @@ -1,92 +1,108 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Payout + * A <code>Payout</code> object is created when you receive funds from Stripe, or + * when you initiate a payout to either a bank account or debit card of a <a + * href="/docs/connect/bank-debit-card-payouts">connected Stripe account</a>. You + * can retrieve individual payouts, as well as list all payouts. Payouts are made + * on <a href="/docs/connect/manage-payout-schedule">varying schedules</a>, + * depending on your country and industry. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $arrival_date - * @property bool $automatic - * @property string $balance_transaction - * @property int $created - * @property string $currency - * @property string $description - * @property string $destination - * @property string $failure_balance_transaction - * @property string $failure_code - * @property string $failure_message - * @property bool $livemode - * @property StripeObject $metadata - * @property string $method - * @property string $source_type - * @property string $statement_descriptor - * @property string $status - * @property string $type + * Related guide: <a href="https://stripe.com/docs/payouts">Receiving Payouts</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount (in %s) to be transferred to your bank account or debit card. + * @property int $arrival_date Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. + * @property bool $automatic Returns <code>true</code> if the payout was created by an <a href="https://stripe.com/docs/payouts#payout-schedule">automated payout schedule</a>, and <code>false</code> if it was <a href="https://stripe.com/docs/payouts#manual-payouts">requested manually</a>. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\Stripe\BankAccount|\Stripe\Card $destination ID of the bank account or card the payout was sent to. + * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. + * @property null|string $failure_code Error code explaining reason for payout failure if available. See <a href="https://stripe.com/docs/api#payout_failures">Types of payout failures</a> for a list of failure codes. + * @property null|string $failure_message Message to user further explaining reason for payout failure if available. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $method The method used to send this payout, which can be <code>standard</code> or <code>instant</code>. <code>instant</code> is only supported for payouts to debit cards. (See <a href="https://stripe.com/blog/instant-payouts-for-marketplaces">Instant payouts for marketplaces</a> for more information.) + * @property null|string|\Stripe\Payout $original_payout If the payout reverses another, this is the ID of the original payout. + * @property null|string|\Stripe\Payout $reversed_by If the payout was reversed, this is the ID of the payout that reverses this payout. + * @property string $source_type The source balance this payout came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>. + * @property null|string $statement_descriptor Extra information about a payout to be displayed on the user's bank statement. + * @property string $status Current status of the payout: <code>paid</code>, <code>pending</code>, <code>in_transit</code>, <code>canceled</code> or <code>failed</code>. A payout is <code>pending</code> until it is submitted to the bank, when it becomes <code>in_transit</code>. The status then changes to <code>paid</code> if the transaction goes through, or to <code>failed</code> or <code>canceled</code> (within 5 business days). Some failed payouts may initially show as <code>paid</code> but then change to <code>failed</code>. + * @property string $type Can be <code>bank_account</code> or <code>card</code>. */ class Payout extends ApiResource { - const OBJECT_NAME = "payout"; + const OBJECT_NAME = 'payout'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Types of payout failure codes. - * @link https://stripe.com/docs/api#payout_failures - */ - const FAILURE_ACCOUNT_CLOSED = 'account_closed'; - const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; - const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; - const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed'; - const FAILURE_COULD_NOT_PROCESS = 'could_not_process'; - const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; - const FAILURE_DECLINED = 'declined'; + const FAILURE_ACCOUNT_CLOSED = 'account_closed'; + const FAILURE_ACCOUNT_FROZEN = 'account_frozen'; + const FAILURE_BANK_ACCOUNT_RESTRICTED = 'bank_account_restricted'; + const FAILURE_BANK_OWNERSHIP_CHANGED = 'bank_ownership_changed'; + const FAILURE_COULD_NOT_PROCESS = 'could_not_process'; + const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; + const FAILURE_DECLINED = 'declined'; const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name'; - const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds'; - const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number'; - const FAILURE_INVALID_CURRENCY = 'invalid_currency'; - const FAILURE_NO_ACCOUNT = 'no_account'; - const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; + const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds'; + const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number'; + const FAILURE_INVALID_CURRENCY = 'invalid_currency'; + const FAILURE_NO_ACCOUNT = 'no_account'; + const FAILURE_UNSUPPORTED_CARD = 'unsupported_card'; - /** - * Possible string representations of the payout methods. - * @link https://stripe.com/docs/api/payouts/object#payout_object-method - */ + const METHOD_INSTANT = 'instant'; const METHOD_STANDARD = 'standard'; - const METHOD_INSTANT = 'instant'; - /** - * Possible string representations of the status of the payout. - * @link https://stripe.com/docs/api/payouts/object#payout_object-status - */ - const STATUS_CANCELED = 'canceled'; + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; const STATUS_IN_TRANSIT = 'in_transit'; - const STATUS_FAILED = 'failed'; - const STATUS_PAID = 'paid'; - const STATUS_PENDING = 'pending'; + const STATUS_PAID = 'paid'; + const STATUS_PENDING = 'pending'; - /** - * Possible string representations of the type of payout. - * @link https://stripe.com/docs/api/payouts/object#payout_object-type - */ const TYPE_BANK_ACCOUNT = 'bank_account'; - const TYPE_CARD = 'card'; + const TYPE_CARD = 'card'; /** - * @return Payout The canceled payout. + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Payout the canceled payout */ - public function cancel() + public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Payout the reversed payout + */ + public function reverse($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/reverse'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Person.php b/htdocs/includes/stripe/stripe-php/lib/Person.php index 5540f7c5f28..151870a86f7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Person.php +++ b/htdocs/includes/stripe/stripe-php/lib/Person.php @@ -1,71 +1,70 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Person + * This is an object representing a person associated with a Stripe account. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/connect/identity-verification-api#person-information">Handling + * Identity Verification with the API</a>. * - * @property string $id - * @property string $object - * @property string $account - * @property mixed $address - * @property mixed $address_kana - * @property mixed $address_kanji - * @property int $created - * @property bool $deleted - * @property mixed $dob - * @property string $email - * @property string $first_name - * @property string $first_name_kana - * @property string $first_name_kanji - * @property string $gender - * @property bool $id_number_provided - * @property string $last_name - * @property string $last_name_kana - * @property string $last_name_kanji - * @property string $maiden_name - * @property StripeObject $metadata - * @property string $phone - * @property mixed $relationship - * @property mixed $requirements - * @property bool $ssn_last_4_provided - * @property mixed $verification + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $account The account the person is associated with. + * @property \Stripe\StripeObject $address + * @property null|\Stripe\StripeObject $address_kana The Kana variation of the person's address (Japan only). + * @property null|\Stripe\StripeObject $address_kanji The Kanji variation of the person's address (Japan only). + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \Stripe\StripeObject $dob + * @property null|string $email The person's email address. + * @property null|string $first_name The person's first name. + * @property null|string $first_name_kana The Kana variation of the person's first name (Japan only). + * @property null|string $first_name_kanji The Kanji variation of the person's first name (Japan only). + * @property null|string $gender The person's gender (International regulations require either &quot;male&quot; or &quot;female&quot;). + * @property bool $id_number_provided Whether the person's <code>id_number</code> was provided. + * @property null|string $last_name The person's last name. + * @property null|string $last_name_kana The Kana variation of the person's last name (Japan only). + * @property null|string $last_name_kanji The Kanji variation of the person's last name (Japan only). + * @property null|string $maiden_name The person's maiden name. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $phone The person's phone number. + * @property string $political_exposure Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + * @property \Stripe\StripeObject $relationship + * @property null|\Stripe\StripeObject $requirements Information about the requirements for this person, including what information needs to be collected, and by when. + * @property bool $ssn_last_4_provided Whether the last four digits of the person's Social Security number have been provided (U.S. only). + * @property \Stripe\StripeObject $verification */ class Person extends ApiResource { - const OBJECT_NAME = "person"; + const OBJECT_NAME = 'person'; use ApiOperations\Delete; use ApiOperations\Update; - /** - * Possible string representations of a person's gender. - * @link https://stripe.com/docs/api/persons/object#person_object-gender - */ - const GENDER_MALE = 'male'; const GENDER_FEMALE = 'female'; + const GENDER_MALE = 'male'; - /** - * Possible string representations of a person's verification status. - * @link https://stripe.com/docs/api/persons/object#person_object-verification-status - */ - const VERIFICATION_STATUS_PENDING = 'pending'; + const POLITICAL_EXPOSURE_EXISTING = 'existing'; + const POLITICAL_EXPOSURE_NONE = 'none'; + + const VERIFICATION_STATUS_PENDING = 'pending'; const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; - const VERIFICATION_STATUS_VERIFIED = 'verified'; + const VERIFICATION_STATUS_VERIFIED = 'verified'; /** - * @return string The API URL for this Stripe account reversal. + * @return string the API URL for this Stripe account reversal */ public function instanceUrl() { $id = $this['id']; $account = $this['account']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: " . - "class instance has invalid ID: $id", + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", null ); } @@ -73,35 +72,40 @@ class Person extends ApiResource $account = Util\Util::utf8($account); $base = Account::classUrl(); - $accountExtn = urlencode($account); - $extn = urlencode($id); - return "$base/$accountExtn/persons/$extn"; + $accountExtn = \urlencode($account); + $extn = \urlencode($id); + + return "{$base}/{$accountExtn}/persons/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Persons cannot be accessed without an account ID. " . - "Retrieve a Person using \$account->retrievePerson('person_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Persons cannot be retrieved without an account ID. Retrieve ' . + "a person using `Account::retrievePerson('account_id', " . + "'person_id')`."; + + throw new Exception\BadMethodCallException($msg); } /** * @param string $_id - * @param array|null $_params - * @param array|string|null $_options + * @param null|array $_params + * @param null|array|string $_options * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function update($_id, $_params = null, $_options = null) { - $msg = "Persons cannot be accessed without an account ID. " . - "Retrieve a Person using \$account->retrievePerson('person_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Persons cannot be updated without an account ID. Update ' . + "a person using `Account::updatePerson('account_id', " . + "'person_id', \$updateParams)`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Plan.php b/htdocs/includes/stripe/stripe-php/lib/Plan.php index 1a7ae87dda8..bff735d78a5 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Plan.php +++ b/htdocs/includes/stripe/stripe-php/lib/Plan.php @@ -1,35 +1,53 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Plan + * You can now model subscriptions more flexibly using the <a + * href="https://stripe.com/docs/api#prices">Prices API</a>. It replaces the Plans + * API and is backwards compatible to simplify your migration. * - * @package Stripe + * Plans define the base price, currency, and billing cycle for recurring purchases + * of products. <a href="https://stripe.com/docs/api#products">Products</a> help + * you track inventory or provisioning, and plans help you track pricing. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by plans. This approach lets you change + * prices without having to change your provisioning scheme. * - * @property string $id - * @property string $object - * @property bool $active - * @property string $aggregate_usage - * @property int $amount - * @property string $billing_scheme - * @property int $created - * @property string $currency - * @property string $interval - * @property int $interval_count - * @property bool $livemode - * @property StripeObject $metadata - * @property string $nickname - * @property string $product - * @property mixed $tiers - * @property string $tiers_mode - * @property mixed $transform_usage - * @property int $trial_period_days - * @property string $usage_type + * For example, you might have a single &quot;gold&quot; product that has plans for + * $10/month, $100/year, €9/month, and €90/year. + * + * Related guides: <a + * href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up + * a subscription</a> and more about <a + * href="https://stripe.com/docs/billing/prices-guide">products and prices</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the plan can be used for new purchases. + * @property null|string $aggregate_usage Specifies a usage aggregation strategy for plans of <code>usage_type=metered</code>. Allowed values are <code>sum</code> for summing up all usage during a period, <code>last_during_period</code> for using the last usage record reported within a period, <code>last_ever</code> for using the last usage record ever (across period bounds) or <code>max</code> which uses the usage record with the maximum reported usage during a period. Defaults to <code>sum</code>. + * @property null|int $amount The unit amount in %s to be charged, represented as a whole integer if possible. + * @property null|string $amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. + * @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>amount</code>) will be charged per unit in <code>quantity</code> (for plans with <code>usage_type=licensed</code>), or per unit of total usage (for plans with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string $interval The frequency at which a subscription is billed. One of <code>day</code>, <code>week</code>, <code>month</code> or <code>year</code>. + * @property int $interval_count The number of intervals (specified in the <code>interval</code> attribute) between subscription billings. For example, <code>interval=month</code> and <code>interval_count=3</code> bills every 3 months. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $nickname A brief description of the plan, hidden from customers. + * @property null|string|\Stripe\Product $product The product whose pricing this plan determines. + * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>. + * @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows. + * @property null|\Stripe\StripeObject $transform_usage Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>. + * @property null|int $trial_period_days Default number of trial days when subscribing a customer to this plan using <a href="https://stripe.com/docs/api#create_subscription-trial_from_plan"><code>trial_from_plan=true</code></a>. + * @property string $usage_type Configures how the quantity per period should be determined. Can be either <code>metered</code> or <code>licensed</code>. <code>licensed</code> automatically bills the <code>quantity</code> set when adding it to a subscription. <code>metered</code> aggregates the total usage based on usage records. Defaults to <code>licensed</code>. */ class Plan extends ApiResource { - const OBJECT_NAME = "plan"; + const OBJECT_NAME = 'plan'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Price.php b/htdocs/includes/stripe/stripe-php/lib/Price.php new file mode 100644 index 00000000000..9d3c5540e44 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Price.php @@ -0,0 +1,62 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * Prices define the unit cost, currency, and (optional) billing cycle for both + * recurring and one-time purchases of products. <a + * href="https://stripe.com/docs/api#products">Products</a> help you track + * inventory or provisioning, and prices help you track payment terms. Different + * physical goods or levels of service should be represented by products, and + * pricing options should be represented by prices. This approach lets you change + * prices without having to change your provisioning scheme. + * + * For example, you might have a single &quot;gold&quot; product that has prices + * for $10/month, $100/year, and €9 once. + * + * Related guides: <a + * href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up + * a subscription</a>, <a + * href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, + * and more about <a href="https://stripe.com/docs/billing/prices-guide">products + * and prices</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the price can be used for new purchases. + * @property string $billing_scheme Describes how to compute the price per period. Either <code>per_unit</code> or <code>tiered</code>. <code>per_unit</code> indicates that the fixed amount (specified in <code>unit_amount</code> or <code>unit_amount_decimal</code>) will be charged per unit in <code>quantity</code> (for prices with <code>usage_type=licensed</code>), or per unit of total usage (for prices with <code>usage_type=metered</code>). <code>tiered</code> indicates that the unit pricing will be computed using a tiering strategy as defined using the <code>tiers</code> and <code>tiers_mode</code> attributes. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string $lookup_key A lookup key used to retrieve prices dynamically from a static string. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string $nickname A brief description of the plan, hidden from customers. + * @property string|\Stripe\Product $product The ID of the product this price is associated with. + * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as <code>interval</code> and <code>usage_type</code>. + * @property \Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires <code>billing_scheme</code> to be set to <code>tiered</code>. See also the documentation for <code>billing_scheme</code>. + * @property null|string $tiers_mode Defines if the tiering price should be <code>graduated</code> or <code>volume</code> based. In <code>volume</code>-based tiering, the maximum quantity within a period determines the per unit price. In <code>graduated</code> tiering, pricing can change as the quantity grows. + * @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with <code>tiers</code>. + * @property string $type One of <code>one_time</code> or <code>recurring</code> depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + * @property null|int $unit_amount The unit amount in %s to be charged, represented as a whole integer if possible. + * @property null|string $unit_amount_decimal The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. + */ +class Price extends ApiResource +{ + const OBJECT_NAME = 'price'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; + + const BILLING_SCHEME_PER_UNIT = 'per_unit'; + const BILLING_SCHEME_TIERED = 'tiered'; + + const TIERS_MODE_GRADUATED = 'graduated'; + const TIERS_MODE_VOLUME = 'volume'; + + const TYPE_ONE_TIME = 'one_time'; + const TYPE_RECURRING = 'recurring'; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Product.php b/htdocs/includes/stripe/stripe-php/lib/Product.php index 6c60d20c4a7..5afe1f1373e 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Product.php +++ b/htdocs/includes/stripe/stripe-php/lib/Product.php @@ -1,35 +1,46 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Product + * Products describe the specific goods or services you offer to your customers. + * For example, you might offer a Standard and Premium version of your goods or + * service; each version would be a separate Product. They can be used in + * conjunction with <a href="https://stripe.com/docs/api#prices">Prices</a> to + * configure pricing in Checkout and Subscriptions. * - * @property string $id - * @property string $object - * @property bool $active - * @property string[] $attributes - * @property string $caption - * @property int $created - * @property string[] $deactivate_on - * @property string $description - * @property string[] $images - * @property bool $livemode - * @property StripeObject $metadata - * @property string $name - * @property mixed $package_dimensions - * @property bool $shippable - * @property string $statement_descriptor - * @property string $type - * @property string $unit_label - * @property int $updated - * @property string $url + * Related guides: <a + * href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up + * a subscription</a> or accept <a + * href="https://stripe.com/docs/payments/checkout/client#create-products">one-time + * payments with Checkout</a> and more about <a + * href="https://stripe.com/docs/billing/prices-guide">Products and Prices</a> * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the product is currently available for purchase. + * @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., <code>[&quot;color&quot;, &quot;size&quot;]</code>). + * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of <code>type=good</code>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of <code>type=good</code>. + * @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + * @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. + * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. A SKU associated with this product can override this value by having its own <code>package_dimensions</code>. Only applicable to products of <code>type=good</code>. + * @property null|bool $shippable Whether this product is a shipped good. Only applicable to products of <code>type=good</code>. + * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. + * @property string $type The type of the product. The product is either of type <code>good</code>, which is eligible for use with Orders and SKUs, or <code>service</code>, which is eligible for use with Subscriptions and Plans. + * @property null|string $unit_label A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. + * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @property null|string $url A URL of a publicly-accessible webpage for this product. Only applicable to products of <code>type=good</code>. */ class Product extends ApiResource { - const OBJECT_NAME = "product"; + const OBJECT_NAME = 'product'; use ApiOperations\All; use ApiOperations\Create; @@ -37,10 +48,6 @@ class Product extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the type of product. - * @link https://stripe.com/docs/api/service_products/object#service_product_object-type - */ - const TYPE_GOOD = 'good'; + const TYPE_GOOD = 'good'; const TYPE_SERVICE = 'service'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/PromotionCode.php b/htdocs/includes/stripe/stripe-php/lib/PromotionCode.php new file mode 100644 index 00000000000..f4bb0f4f106 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/PromotionCode.php @@ -0,0 +1,33 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * A Promotion Code represents a customer-redeemable code for a coupon. It can be + * used to create multiple codes for a single coupon. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + * @property string $code The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. + * @property \Stripe\Coupon $coupon A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to <a href="https://stripe.com/docs/api#invoices">invoices</a> or <a href="https://stripe.com/docs/api#create_order-coupon">orders</a>. Coupons do not work with conventional one-off <a href="https://stripe.com/docs/api#create_charge">charges</a>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customer The customer that this promotion code can be used by. + * @property null|int $expires_at Date at which the promotion code can no longer be redeemed. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|int $max_redemptions Maximum number of times this promotion code can be redeemed. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject $restrictions + * @property int $times_redeemed Number of times this promotion code has been used. + */ +class PromotionCode extends ApiResource +{ + const OBJECT_NAME = 'promotion_code'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php b/htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php index 5131e52fc50..eb1b351c6be 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php +++ b/htdocs/includes/stripe/stripe-php/lib/Radar/EarlyFraudWarning.php @@ -1,36 +1,37 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Radar; /** - * Class EarlyFraudWarning + * An early fraud warning indicates that the card issuer has notified us that a + * charge may be fraudulent. * - * @property string $id - * @property string $object - * @property bool $actionable - * @property string $charge - * @property int $created - * @property string $fraud_type - * @property bool $livemode + * Related guide: <a + * href="https://stripe.com/docs/disputes/measuring#early-fraud-warnings">Early + * Fraud Warnings</a>. * - * @package Stripe\Radar + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $actionable An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + * @property string|\Stripe\Charge $charge ID of the charge this early fraud warning is for, optionally expanded. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $fraud_type The type of fraud labelled by the issuer. One of <code>card_never_received</code>, <code>fraudulent_card_application</code>, <code>made_with_counterfeit_card</code>, <code>made_with_lost_card</code>, <code>made_with_stolen_card</code>, <code>misc</code>, <code>unauthorized_use_of_card</code>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. */ class EarlyFraudWarning extends \Stripe\ApiResource { - const OBJECT_NAME = "radar.early_fraud_warning"; + const OBJECT_NAME = 'radar.early_fraud_warning'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Retrieve; - /** - * Possible string representations of an early fraud warning's fraud type. - * @link https://stripe.com/docs/api/early_fraud_warnings/object#early_fraud_warning_object-fraud_type - */ - const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received'; + const FRAUD_TYPE_CARD_NEVER_RECEIVED = 'card_never_received'; const FRAUD_TYPE_FRAUDULENT_CARD_APPLICATION = 'fraudulent_card_application'; - const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card'; - const FRAUD_TYPE_MADE_WITH_LOST_CARD = 'made_with_lost_card'; - const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card'; - const FRAUD_TYPE_MISC = 'misc'; - const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card'; + const FRAUD_TYPE_MADE_WITH_COUNTERFEIT_CARD = 'made_with_counterfeit_card'; + const FRAUD_TYPE_MADE_WITH_LOST_CARD = 'made_with_lost_card'; + const FRAUD_TYPE_MADE_WITH_STOLEN_CARD = 'made_with_stolen_card'; + const FRAUD_TYPE_MISC = 'misc'; + const FRAUD_TYPE_UNAUTHORIZED_USE_OF_CARD = 'unauthorized_use_of_card'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php index d267429b272..bcbef74cd4a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php +++ b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueList.php @@ -1,28 +1,31 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Radar; /** - * Class ValueList + * Value lists allow you to group values together which can then be referenced in + * rules. * - * @property string $id - * @property string $object - * @property string $alias - * @property int $created - * @property string $created_by - * @property string $item_type - * @property Collection $list_items - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $name - * @property int $updated - * @property string $updated_by + * Related guide: <a + * href="https://stripe.com/docs/radar/lists#managing-list-items">Default Stripe + * Lists</a>. * - * @package Stripe\Radar + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $alias The name of the value list for use in rules. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $created_by The name or email address of the user who created this value list. + * @property string $item_type The type of items in the value list. One of <code>card_fingerprint</code>, <code>card_bin</code>, <code>email</code>, <code>ip_address</code>, <code>country</code>, <code>string</code>, or <code>case_sensitive_string</code>. + * @property \Stripe\Collection $list_items List of items contained within this value list. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The name of the value list. */ class ValueList extends \Stripe\ApiResource { - const OBJECT_NAME = "radar.value_list"; + const OBJECT_NAME = 'radar.value_list'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php index 42b1f10fd5d..c4ab28194b8 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/Radar/ValueListItem.php @@ -1,23 +1,28 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Radar; /** - * Class ValueListItem + * Value list items allow you to add specific values to a given Radar value list, + * which can then be used in rules. * - * @property string $id - * @property string $object - * @property int $created - * @property string $created_by - * @property string $list - * @property bool $livemode - * @property string $value + * Related guide: <a + * href="https://stripe.com/docs/radar/lists#managing-list-items">Managing List + * Items</a>. * - * @package Stripe\Radar + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $created_by The name or email address of the user who added this item to the value list. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property string $value The value of the item. + * @property string $value_list The identifier of the value list this item belongs to. */ class ValueListItem extends \Stripe\ApiResource { - const OBJECT_NAME = "radar.value_list_item"; + const OBJECT_NAME = 'radar.value_list_item'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Recipient.php b/htdocs/includes/stripe/stripe-php/lib/Recipient.php index 35a695f5084..8d5ad4c0a71 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Recipient.php +++ b/htdocs/includes/stripe/stripe-php/lib/Recipient.php @@ -1,47 +1,44 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Recipient + * With <code>Recipient</code> objects, you can transfer money from your Stripe + * account to a third-party bank account or debit card. The API allows you to + * create, delete, and update your recipients. You can retrieve individual + * recipients as well as a list of all your recipients. * - * @package Stripe + * <strong><code>Recipient</code> objects have been deprecated in favor of <a + * href="https://stripe.com/docs/connect">Connect</a>, specifically Connect's much + * more powerful <a href="https://stripe.com/docs/api#account">Account objects</a>. + * Stripe accounts that don't already use recipients can no longer begin doing so. + * Please use <code>Account</code> objects instead.</strong> * - * @property string $id - * @property string $object - * @property mixed $active_account - * @property Collection $cards - * @property int $created - * @property string $default_card - * @property string $description - * @property string $email - * @property bool $livemode - * @property StripeObject $metadata - * @property string $migrated_to - * @property string $name - * @property string $rolled_back_from - * @property string $type + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\Stripe\BankAccount $active_account Hash describing the current account on the recipient, if there is one. + * @property null|\Stripe\Collection $cards + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Card $default_card The default card to use for creating transfers to this recipient. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string $email + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\Stripe\Account $migrated_to The ID of the <a href="https://stripe.com/docs/connect/custom-accounts">Custom account</a> this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. + * @property null|string $name Full, legal name of the recipient. + * @property string|\Stripe\Account $rolled_back_from + * @property string $type Type of the recipient, one of <code>individual</code> or <code>corporation</code>. + * @property bool $verified Whether the recipient has been verified. This field is non-standard, and maybe removed in the future */ class Recipient extends ApiResource { - const OBJECT_NAME = "recipient"; + const OBJECT_NAME = 'recipient'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Delete; use ApiOperations\Retrieve; use ApiOperations\Update; - - /** - * @param array|null $params - * - * @return Collection of the Recipient's Transfers - */ - public function transfers($params = null) - { - $params = $params ?: []; - $params['recipient'] = $this->id; - $transfers = Transfer::all($params, $this->_opts); - return $transfers; - } } diff --git a/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php b/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php index 7a2ec1f3fb7..5e2d4365daa 100644 --- a/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php +++ b/htdocs/includes/stripe/stripe-php/lib/RecipientTransfer.php @@ -3,7 +3,7 @@ namespace Stripe; /** - * Class RecipientTransfer + * Class RecipientTransfer. * * @property string $id * @property string $object @@ -20,19 +20,17 @@ namespace Stripe; * @property string $failure_code * @property string $failure_message * @property bool $livemode - * @property StripeObject $metadata + * @property \Stripe\StripeObject $metadata * @property string $method * @property string $recipient - * @property mixed $reversals + * @property \Stripe\Collection $reversals * @property bool $reversed * @property string $source_type * @property string $statement_descriptor * @property string $status * @property string $type - * - * @package Stripe */ class RecipientTransfer extends ApiResource { - const OBJECT_NAME = "recipient_transfer"; + const OBJECT_NAME = 'recipient_transfer'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Refund.php b/htdocs/includes/stripe/stripe-php/lib/Refund.php index f8b4529b72e..f5e975fd83f 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Refund.php +++ b/htdocs/includes/stripe/stripe-php/lib/Refund.php @@ -1,60 +1,58 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Refund + * <code>Refund</code> objects allow you to refund a charge that has previously + * been created but not yet refunded. Funds will be refunded to the credit or debit + * card that was originally charged. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $balance_transaction - * @property string $charge - * @property int $created - * @property string $currency - * @property string $description - * @property string $failure_balance_transaction - * @property string $failure_reason - * @property StripeObject $metadata - * @property string $reason - * @property string $receipt_number - * @property string $source_transfer_reversal - * @property string $status - * @property string $transfer_reversal + * Related guide: <a href="https://stripe.com/docs/refunds">Refunds</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property null|string|\Stripe\Charge $charge ID of the charge that was refunded. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) + * @property string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are <code>lost_or_stolen_card</code>, <code>expired_or_canceled_card</code>, or <code>unknown</code>. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. + * @property null|string $reason Reason for the refund, either user-provided (<code>duplicate</code>, <code>fraudulent</code>, or <code>requested_by_customer</code>) or generated by Stripe internally (<code>expired_uncaptured_charge</code>). + * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund. + * @property null|string|\Stripe\TransferReversal $source_transfer_reversal The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. + * @property null|string $status Status of the refund. For credit card refunds, this can be <code>pending</code>, <code>succeeded</code>, or <code>failed</code>. For other types of refunds, it can be <code>pending</code>, <code>succeeded</code>, <code>failed</code>, or <code>canceled</code>. Refer to our <a href="https://stripe.com/docs/refunds#failed-refunds">refunds</a> documentation for more details. + * @property null|string|\Stripe\TransferReversal $transfer_reversal If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ class Refund extends ApiResource { - const OBJECT_NAME = "refund"; + const OBJECT_NAME = 'refund'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the failure reason. - * @link https://stripe.com/docs/api/refunds/object#refund_object-failure_reason - */ - const FAILURE_REASON = 'expired_or_canceled_card'; + const FAILURE_REASON_EXPIRED_OR_CANCELED_CARD = 'expired_or_canceled_card'; const FAILURE_REASON_LOST_OR_STOLEN_CARD = 'lost_or_stolen_card'; - const FAILURE_REASON_UNKNOWN = 'unknown'; + const FAILURE_REASON_UNKNOWN = 'unknown'; - /** - * Possible string representations of the refund reason. - * @link https://stripe.com/docs/api/refunds/object#refund_object-reason - */ - const REASON_DUPLICATE = 'duplicate'; - const REASON_FRAUDULENT = 'fraudulent'; + const REASON_DUPLICATE = 'duplicate'; + const REASON_FRAUDULENT = 'fraudulent'; const REASON_REQUESTED_BY_CUSTOMER = 'requested_by_customer'; - /** - * Possible string representations of the refund status. - * @link https://stripe.com/docs/api/refunds/object#refund_object-status - */ - const STATUS_CANCELED = 'canceled'; - const STATUS_FAILED = 'failed'; - const STATUS_PENDING = 'pending'; + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; const STATUS_SUCCEEDED = 'succeeded'; + + /** + * @deprecated use FAILURE_REASON_EXPIRED_OR_CANCELED_CARD instead + */ + const FAILURE_REASON = 'expired_or_canceled_card'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php index f79c94e34ea..458cbed6cd8 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php +++ b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportRun.php @@ -1,26 +1,35 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Reporting; /** - * Class ReportRun + * The Report Run object represents an instance of a report type generated with + * specific run parameters. Once the object is created, Stripe begins processing + * the report. When the report has finished running, it will give you a reference + * to a file where you can retrieve your results. For an overview, see <a + * href="https://stripe.com/docs/reporting/statements/api">API Access to + * Reports</a>. * - * @property string $id - * @property string $object - * @property int $created - * @property string $error - * @property bool $livemode - * @property mixed $parameters - * @property string $report_type - * @property mixed $result - * @property string $status - * @property int $succeeded_at + * Note that reports can only be run based on your live-mode data (not test-mode + * data), and thus related requests must be made with a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>. * - * @package Stripe\Reporting + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $error If something should go wrong during the run, a message about the failure (populated when <code>status=failed</code>). + * @property bool $livemode Always <code>true</code>: reports can only be run on live-mode data. + * @property \Stripe\StripeObject $parameters + * @property string $report_type The ID of the <a href="https://stripe.com/docs/reports/report-types">report type</a> to run, such as <code>&quot;balance.summary.1&quot;</code>. + * @property null|\Stripe\File $result The file object representing the result of the report run (populated when <code>status=succeeded</code>). + * @property string $status Status of this report run. This will be <code>pending</code> when the run is initially created. When the run finishes, this will be set to <code>succeeded</code> and the <code>result</code> field will be populated. Rarely, we may encounter an error, at which point this will be set to <code>failed</code> and the <code>error</code> field will be populated. + * @property null|int $succeeded_at Timestamp at which this run successfully finished (populated when <code>status=succeeded</code>). Measured in seconds since the Unix epoch. */ class ReportRun extends \Stripe\ApiResource { - const OBJECT_NAME = "reporting.report_run"; + const OBJECT_NAME = 'reporting.report_run'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php index 157b51048c9..cf753012a45 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php +++ b/htdocs/includes/stripe/stripe-php/lib/Reporting/ReportType.php @@ -1,23 +1,33 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Reporting; /** - * Class ReportType + * The Report Type resource corresponds to a particular type of report, such as the + * &quot;Activity summary&quot; or &quot;Itemized payouts&quot; reports. These + * objects are identified by an ID belonging to a set of enumerated values. See <a + * href="https://stripe.com/docs/reporting/statements/api">API Access to Reports + * documentation</a> for those Report Type IDs, along with required and optional + * parameters. * - * @property string $id - * @property string $object - * @property int $data_available_end - * @property int $data_available_start - * @property string $name - * @property int $updated - * @property string $version + * Note that reports can only be run based on your live-mode data (not test-mode + * data), and thus related requests must be made with a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>. * - * @package Stripe\Reporting + * @property string $id The <a href="https://stripe.com/docs/reporting/statements/api#available-report-types">ID of the Report Type</a>, such as <code>balance.summary.1</code>. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $data_available_end Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. + * @property int $data_available_start Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + * @property null|string[] $default_columns List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the <code>columns</code> parameter, this will be null.) + * @property string $name Human-readable name of the Report Type + * @property int $updated When this Report Type was latest updated. Measured in seconds since the Unix epoch. + * @property int $version Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. */ class ReportType extends \Stripe\ApiResource { - const OBJECT_NAME = "reporting.report_type"; + const OBJECT_NAME = 'reporting.report_type'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Retrieve; diff --git a/htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php b/htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php index f677a7f76e8..bf9074acb2a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php +++ b/htdocs/includes/stripe/stripe-php/lib/RequestTelemetry.php @@ -3,10 +3,9 @@ namespace Stripe; /** - * Class RequestTelemetry + * Class RequestTelemetry. * * Tracks client request telemetry - * @package Stripe */ class RequestTelemetry { @@ -16,8 +15,8 @@ class RequestTelemetry /** * Initialize a new telemetry object. * - * @param string $requestId The request's request ID. - * @param int $requestDuration The request's duration in milliseconds. + * @param string $requestId the request's request ID + * @param int $requestDuration the request's duration in milliseconds */ public function __construct($requestId, $requestDuration) { diff --git a/htdocs/includes/stripe/stripe-php/lib/Review.php b/htdocs/includes/stripe/stripe-php/lib/Review.php index a2fd5d06db3..606b41054d4 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Review.php +++ b/htdocs/includes/stripe/stripe-php/lib/Review.php @@ -1,30 +1,34 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Review + * Reviews can be used to supplement automated fraud detection with human + * expertise. * - * @property string $id - * @property string $object - * @property string $billing_zip - * @property string $charge - * @property string $closed_reason - * @property int $created - * @property string $ip_address - * @property mixed $ip_address_location - * @property bool $livemode - * @property bool $open - * @property string $opened_reason - * @property string $payment_intent - * @property string $reason - * @property mixed $session + * Learn more about <a href="/radar">Radar</a> and reviewing payments <a + * href="https://stripe.com/docs/radar/reviews">here</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $billing_zip The ZIP or postal code of the card used, if applicable. + * @property null|string|\Stripe\Charge $charge The charge associated with this review. + * @property null|string $closed_reason The reason the review was closed, or null if it has not yet been closed. One of <code>approved</code>, <code>refunded</code>, <code>refunded_as_fraud</code>, or <code>disputed</code>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $ip_address The IP address where the payment originated. + * @property null|\Stripe\StripeObject $ip_address_location Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property bool $open If <code>true</code>, the review needs action. + * @property string $opened_reason The reason the review was opened. One of <code>rule</code> or <code>manual</code>. + * @property string|\Stripe\PaymentIntent $payment_intent The PaymentIntent ID associated with this review, if one exists. + * @property string $reason The reason the review is currently open or closed. One of <code>rule</code>, <code>manual</code>, <code>approved</code>, <code>refunded</code>, <code>refunded_as_fraud</code>, or <code>disputed</code>. + * @property null|\Stripe\StripeObject $session Information related to the browsing session of the user who initiated the payment. */ class Review extends ApiResource { - const OBJECT_NAME = "review"; + const OBJECT_NAME = 'review'; use ApiOperations\All; use ApiOperations\Retrieve; @@ -33,25 +37,30 @@ class Review extends ApiResource * Possible string representations of the current, the opening or the closure reason of the review. * Not all of these enumeration apply to all of the ´reason´ fields. Please consult the Review object to * determine where these are apply. - * @link https://stripe.com/docs/api/radar/reviews/object + * + * @see https://stripe.com/docs/api/radar/reviews/object */ - const REASON_APPROVED = 'approved'; - const REASON_DISPUTED = 'disputed'; - const REASON_MANUAL = 'manual'; - const REASON_REFUNDED = 'refunded'; + const REASON_APPROVED = 'approved'; + const REASON_DISPUTED = 'disputed'; + const REASON_MANUAL = 'manual'; + const REASON_REFUNDED = 'refunded'; const REASON_REFUNDED_AS_FRAUD = 'refunded_as_fraud'; - const REASON_RULE = 'rule'; + const REASON_RULE = 'rule'; /** - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Review The approved review. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Review the approved review */ - public function approve($params = null, $options = null) + public function approve($params = null, $opts = null) { $url = $this->instanceUrl() . '/approve'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/SKU.php b/htdocs/includes/stripe/stripe-php/lib/SKU.php index cb3aa6f73f1..b418c6c5df7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SKU.php +++ b/htdocs/includes/stripe/stripe-php/lib/SKU.php @@ -1,30 +1,40 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class SKU + * Stores representations of <a + * href="http://en.wikipedia.org/wiki/Stock_keeping_unit">stock keeping units</a>. + * SKUs describe specific product variations, taking into account any combination + * of: attributes, currency, and cost. For example, a product may be a T-shirt, + * whereas a specific SKU represents the <code>size: large</code>, <code>color: + * red</code> version of that shirt. * - * @property string $id - * @property string $object - * @property bool $active - * @property mixed $attributes - * @property int $created - * @property string $currency - * @property string $image - * @property mixed $inventory - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $package_dimensions - * @property int $price - * @property string $product - * @property int $updated + * Can also be used to manage inventory. * - * @package Stripe + * Related guide: <a href="https://stripe.com/docs/orders">Tax, Shipping, and + * Inventory</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Whether the SKU is available for purchase. + * @property \Stripe\StripeObject $attributes A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are <code>[&quot;size&quot;, &quot;gender&quot;]</code>, a valid SKU has the following dictionary of attributes: <code>{&quot;size&quot;: &quot;Medium&quot;, &quot;gender&quot;: &quot;Unisex&quot;}</code>. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $image The URL of an image for this SKU, meant to be displayable to the customer. + * @property \Stripe\StripeObject $inventory + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this SKU for shipping purposes. + * @property int $price The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). + * @property string|\Stripe\Product $product The ID of the product this SKU is associated with. The product must be currently active. + * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. */ class SKU extends ApiResource { - const OBJECT_NAME = "sku"; + const OBJECT_NAME = 'sku'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/AbstractService.php b/htdocs/includes/stripe/stripe-php/lib/Service/AbstractService.php new file mode 100644 index 00000000000..ed092c8b84e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/AbstractService.php @@ -0,0 +1,79 @@ +<?php + +namespace Stripe\Service; + +/** + * Abstract base class for all services. + */ +abstract class AbstractService +{ + /** + * @var \Stripe\StripeClientInterface + */ + protected $client; + + /** + * Initializes a new instance of the {@link AbstractService} class. + * + * @param \Stripe\StripeClientInterface $client + */ + public function __construct($client) + { + $this->client = $client; + } + + /** + * Gets the client used by this service to send requests. + * + * @return \Stripe\StripeClientInterface + */ + public function getClient() + { + return $this->client; + } + + /** + * Translate null values to empty strings. For service methods, + * we interpret null as a request to unset the field, which + * corresponds to sending an empty string for the field to the + * API. + * + * @param null|array $params + */ + private static function formatParams($params) + { + if (null === $params) { + return null; + } + \array_walk_recursive($params, function (&$value, $key) { + if (null === $value) { + $value = ''; + } + }); + + return $params; + } + + protected function request($method, $path, $params, $opts) + { + return $this->getClient()->request($method, $path, static::formatParams($params), $opts); + } + + protected function requestCollection($method, $path, $params, $opts) + { + return $this->getClient()->requestCollection($method, $path, static::formatParams($params), $opts); + } + + protected function buildPath($basePath, ...$ids) + { + foreach ($ids as $id) { + if (null === $id || '' === \trim($id)) { + $msg = 'The resource ID cannot be null or whitespace.'; + + throw new \Stripe\Exception\InvalidArgumentException($msg); + } + } + + return \sprintf($basePath, ...\array_map('\urlencode', $ids)); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/AbstractServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/AbstractServiceFactory.php new file mode 100644 index 00000000000..4aca6868693 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/AbstractServiceFactory.php @@ -0,0 +1,59 @@ +<?php + +namespace Stripe\Service; + +/** + * Abstract base class for all service factories used to expose service + * instances through {@link \Stripe\StripeClient}. + * + * Service factories serve two purposes: + * + * 1. Expose properties for all services through the `__get()` magic method. + * 2. Lazily initialize each service instance the first time the property for + * a given service is used. + */ +abstract class AbstractServiceFactory +{ + /** @var \Stripe\StripeClientInterface */ + private $client; + + /** @var array<string, AbstractService|AbstractServiceFactory> */ + private $services; + + /** + * @param \Stripe\StripeClientInterface $client + */ + public function __construct($client) + { + $this->client = $client; + $this->services = []; + } + + /** + * @param string $name + * + * @return null|string + */ + abstract protected function getServiceClass($name); + + /** + * @param string $name + * + * @return null|AbstractService|AbstractServiceFactory + */ + public function __get($name) + { + $serviceClass = $this->getServiceClass($name); + if (null !== $serviceClass) { + if (!\array_key_exists($name, $this->services)) { + $this->services[$name] = new $serviceClass($this->client); + } + + return $this->services[$name]; + } + + \trigger_error('Undefined property: ' . static::class . '::$' . $name); + + return null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/AccountLinkService.php b/htdocs/includes/stripe/stripe-php/lib/Service/AccountLinkService.php new file mode 100644 index 00000000000..2e904923970 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/AccountLinkService.php @@ -0,0 +1,25 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class AccountLinkService extends \Stripe\Service\AbstractService +{ + /** + * Creates an AccountLink object that includes a single-use Stripe URL that the + * platform can redirect their user to in order to take them through the Connect + * Onboarding flow. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AccountLink + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/account_links', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/AccountService.php b/htdocs/includes/stripe/stripe-php/lib/Service/AccountService.php new file mode 100644 index 00000000000..c731e475e01 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/AccountService.php @@ -0,0 +1,381 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class AccountService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of accounts connected to your platform via <a + * href="/docs/connect">Connect</a>. If you’re not a platform, the list is empty. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/accounts', $params, $opts); + } + + /** + * Returns a list of capabilities associated with the account. The capabilities are + * returned sorted by creation date, with the most recent capability appearing + * first. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allCapabilities($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/capabilities', $parentId), $params, $opts); + } + + /** + * List external accounts for an account. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allExternalAccounts($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); + } + + /** + * Returns a list of people associated with the account’s legal entity. The people + * are returned sorted by creation date, with the most recent people appearing + * first. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allPersons($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); + } + + /** + * With <a href="/docs/connect">Connect</a>, you can create Stripe accounts for + * your users. To do this, you’ll first need to <a + * href="https://dashboard.stripe.com/account/applications/settings">register your + * platform</a>. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/accounts', $params, $opts); + } + + /** + * Create an external account for a given account. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public function createExternalAccount($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); + } + + /** + * Creates a single-use login link for an Express account to access their Stripe + * dashboard. + * + * <strong>You may only create login links for <a + * href="/docs/connect/express-accounts">Express accounts</a> connected to your + * platform</strong>. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\LoginLink + */ + public function createLoginLink($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/login_links', $parentId), $params, $opts); + } + + /** + * Creates a new person. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public function createPerson($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); + } + + /** + * With <a href="/docs/connect">Connect</a>, you can delete Custom or Express + * accounts you manage. + * + * Accounts created using test-mode keys can be deleted at any time. Accounts + * created using live-mode keys can only be deleted once all balances are zero. + * + * If you want to delete your own account, use the <a + * href="https://dashboard.stripe.com/account">account information tab in your + * account settings</a> instead. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } + + /** + * Delete a specified external account for a given account. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public function deleteExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Deletes an existing person’s relationship to the account’s legal entity. Any + * person with a relationship for an account can be deleted through the API, except + * if the person is the <code>account_opener</code>. If your integration is using + * the <code>executive</code> parameter, you cannot delete the only verified + * <code>executive</code> on file. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public function deletePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * With <a href="/docs/connect">Connect</a>, you may flag accounts as suspicious. + * + * Test-mode Custom and Express accounts can be rejected at any time. Accounts + * created using live-mode keys may only be rejected once all balances are zero. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public function reject($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/reject', $id), $params, $opts); + } + + /** + * Retrieves information about the specified Account Capability. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Capability + */ + public function retrieveCapability($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieve a specified external account for a given account. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public function retrieveExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves an existing person. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public function retrievePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates a connected <a href="/docs/connect/accounts">Express or Custom + * account</a> by setting the values of the parameters passed. Any parameters not + * provided are left unchanged. Most parameters can be changed only for Custom + * accounts. (These are marked <strong>Custom Only</strong> below.) Parameters + * marked <strong>Custom and Express</strong> are supported by both account types. + * + * To update your own account, use the <a + * href="https://dashboard.stripe.com/account">Dashboard</a>. Refer to our <a + * href="/docs/connect/updating-accounts">Connect</a> documentation to learn more + * about updating accounts. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } + + /** + * Updates an existing Account Capability. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Capability + */ + public function updateCapability($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the metadata, account holder name, and account holder type of a bank + * account belonging to a <a href="/docs/connect/custom-accounts">Custom + * account</a>, and optionally sets it as the default for its currency. Other bank + * account details are not editable by design. + * + * You can re-enable a disabled bank account by performing an update call without + * providing any arguments or changes. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BankAccount|\Stripe\Card + */ + public function updateExternalAccount($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates an existing person. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Person + */ + public function updatePerson($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves the details of an account. + * + * @param null|string $id + * @param null|array $params + * @param null|array|StripeUtilRequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Account + */ + public function retrieve($id = null, $params = null, $opts = null) + { + if (null === $id) { + return $this->request('get', '/v1/account', $params, $opts); + } + + return $this->request('get', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ApplePayDomainService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ApplePayDomainService.php new file mode 100644 index 00000000000..6577b6b62a5 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ApplePayDomainService.php @@ -0,0 +1,70 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ApplePayDomainService extends \Stripe\Service\AbstractService +{ + /** + * List apple pay domains. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/apple_pay/domains', $params, $opts); + } + + /** + * Create an apple pay domain. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplePayDomain + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/apple_pay/domains', $params, $opts); + } + + /** + * Delete an apple pay domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplePayDomain + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); + } + + /** + * Retrieve an apple pay domain. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplePayDomain + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ApplicationFeeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ApplicationFeeService.php new file mode 100644 index 00000000000..c05c3cd5977 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ApplicationFeeService.php @@ -0,0 +1,125 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ApplicationFeeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of application fees you’ve previously collected. The application + * fees are returned in sorted order, with the most recent fees appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/application_fees', $params, $opts); + } + + /** + * You can see a list of the refunds belonging to a specific application fee. Note + * that the 10 most recent refunds are always available by default on the + * application fee object. If you need more than those 10, you can use this API + * method and the <code>limit</code> and <code>starting_after</code> parameters to + * page through additional refunds. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allRefunds($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); + } + + /** + * Refunds an application fee that has previously been collected but not yet + * refunded. Funds will be refunded to the Stripe account from which the fee was + * originally collected. + * + * You can optionally refund only part of an application fee. You can do so + * multiple times, until the entire fee has been refunded. + * + * Once entirely refunded, an application fee can’t be refunded again. This method + * will raise an error when called on an already-refunded application fee, or when + * trying to refund more money than is left on an application fee. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund + */ + public function createRefund($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); + } + + /** + * Retrieves the details of an application fee that your account has collected. The + * same information is returned when refunding the application fee. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFee + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/application_fees/%s', $id), $params, $opts); + } + + /** + * By default, you can see the 10 most recent refunds stored directly on the + * application fee object, but you can also retrieve details about a specific + * refund stored on the application fee. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund + */ + public function retrieveRefund($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the specified application fee refund by setting the values of the + * parameters passed. Any parameters not provided will be left unchanged. + * + * This request only accepts metadata as an argument. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ApplicationFeeRefund + */ + public function updateRefund($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/BalanceService.php b/htdocs/includes/stripe/stripe-php/lib/Service/BalanceService.php new file mode 100644 index 00000000000..0f55385f138 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/BalanceService.php @@ -0,0 +1,26 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class BalanceService extends \Stripe\Service\AbstractService +{ + /** + * Retrieves the current account balance, based on the authentication that was used + * to make the request. For a sample request, see <a + * href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting + * for negative balances</a>. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Balance + */ + public function retrieve($params = null, $opts = null) + { + return $this->request('get', '/v1/balance', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/BalanceTransactionService.php b/htdocs/includes/stripe/stripe-php/lib/Service/BalanceTransactionService.php new file mode 100644 index 00000000000..fb1da501823 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/BalanceTransactionService.php @@ -0,0 +1,47 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class BalanceTransactionService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of transactions that have contributed to the Stripe account + * balance (e.g., charges, transfers, and so forth). The transactions are returned + * in sorted order, with the most recent transactions appearing first. + * + * Note that this endpoint was previously called “Balance history” and used the + * path <code>/v1/balance/history</code>. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/balance_transactions', $params, $opts); + } + + /** + * Retrieves the balance transaction with the given ID. + * + * Note that this endpoint previously used the path + * <code>/v1/balance/history/:id</code>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BalanceTransaction + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/balance_transactions/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php new file mode 100644 index 00000000000..756ae176903 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php @@ -0,0 +1,25 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\BillingPortal; + +/** + * Service factory class for API resources in the BillingPortal namespace. + * + * @property SessionService $sessions + */ +class BillingPortalServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'sessions' => SessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php b/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php new file mode 100644 index 00000000000..6b3e6026393 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/BillingPortal/SessionService.php @@ -0,0 +1,23 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\BillingPortal; + +class SessionService extends \Stripe\Service\AbstractService +{ + /** + * Creates a session of the customer portal. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\BillingPortal\Session + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/billing_portal/sessions', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ChargeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ChargeService.php new file mode 100644 index 00000000000..f5321b8ac9d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ChargeService.php @@ -0,0 +1,101 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ChargeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of charges you’ve previously created. The charges are returned in + * sorted order, with the most recent charges appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/charges', $params, $opts); + } + + /** + * Capture the payment of an existing, uncaptured, charge. This is the second half + * of the two-step payment flow, where first you <a href="#create_charge">created a + * charge</a> with the capture option set to false. + * + * Uncaptured payments expire exactly seven days after they are created. If they + * are not captured by that point in time, they will be marked as refunded and will + * no longer be capturable. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Charge + */ + public function capture($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/charges/%s/capture', $id), $params, $opts); + } + + /** + * To charge a credit card or other payment source, you create a + * <code>Charge</code> object. If your API key is in test mode, the supplied + * payment source (e.g., card) won’t actually be charged, although everything else + * will occur as if in live mode. (Stripe assumes that the charge would have + * completed successfully). + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Charge + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/charges', $params, $opts); + } + + /** + * Retrieves the details of a charge that has previously been created. Supply the + * unique charge ID that was returned from your previous request, and Stripe will + * return the corresponding charge information. The same information is returned + * when creating or refunding the charge. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Charge + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/charges/%s', $id), $params, $opts); + } + + /** + * Updates the specified charge by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Charge + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/charges/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php new file mode 100644 index 00000000000..bb26a837f6d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php @@ -0,0 +1,25 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Checkout; + +/** + * Service factory class for API resources in the Checkout namespace. + * + * @property SessionService $sessions + */ +class CheckoutServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'sessions' => SessionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/SessionService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/SessionService.php new file mode 100644 index 00000000000..9da37887844 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Checkout/SessionService.php @@ -0,0 +1,73 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Checkout; + +class SessionService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Checkout Sessions. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/checkout/sessions', $params, $opts); + } + + /** + * When retrieving a Checkout Session, there is an includable + * <strong>line_items</strong> property containing the first handful of those + * items. There is also a URL where you can retrieve the full (paginated) list of + * line items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allLineItems($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/checkout/sessions/%s/line_items', $parentId), $params, $opts); + } + + /** + * Creates a Session object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/checkout/sessions', $params, $opts); + } + + /** + * Retrieves a Session object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/CoreServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/CoreServiceFactory.php new file mode 100644 index 00000000000..e0109591d3d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/CoreServiceFactory.php @@ -0,0 +1,125 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +/** + * Service factory class for API resources in the root namespace. + * + * @property AccountLinkService $accountLinks + * @property AccountService $accounts + * @property ApplePayDomainService $applePayDomains + * @property ApplicationFeeService $applicationFees + * @property BalanceService $balance + * @property BalanceTransactionService $balanceTransactions + * @property BillingPortal\BillingPortalServiceFactory $billingPortal + * @property ChargeService $charges + * @property Checkout\CheckoutServiceFactory $checkout + * @property CountrySpecService $countrySpecs + * @property CouponService $coupons + * @property CreditNoteService $creditNotes + * @property CustomerService $customers + * @property DisputeService $disputes + * @property EphemeralKeyService $ephemeralKeys + * @property EventService $events + * @property ExchangeRateService $exchangeRates + * @property FileLinkService $fileLinks + * @property FileService $files + * @property InvoiceItemService $invoiceItems + * @property InvoiceService $invoices + * @property Issuing\IssuingServiceFactory $issuing + * @property MandateService $mandates + * @property OAuthService $oauth + * @property OrderReturnService $orderReturns + * @property OrderService $orders + * @property PaymentIntentService $paymentIntents + * @property PaymentMethodService $paymentMethods + * @property PayoutService $payouts + * @property PlanService $plans + * @property PriceService $prices + * @property ProductService $products + * @property PromotionCodeService $promotionCodes + * @property Radar\RadarServiceFactory $radar + * @property RefundService $refunds + * @property Reporting\ReportingServiceFactory $reporting + * @property ReviewService $reviews + * @property SetupAttemptService $setupAttempts + * @property SetupIntentService $setupIntents + * @property Sigma\SigmaServiceFactory $sigma + * @property SkuService $skus + * @property SourceService $sources + * @property SubscriptionItemService $subscriptionItems + * @property SubscriptionService $subscriptions + * @property SubscriptionScheduleService $subscriptionSchedules + * @property TaxRateService $taxRates + * @property Terminal\TerminalServiceFactory $terminal + * @property TokenService $tokens + * @property TopupService $topups + * @property TransferService $transfers + * @property WebhookEndpointService $webhookEndpoints + */ +class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'accountLinks' => AccountLinkService::class, + 'accounts' => AccountService::class, + 'applePayDomains' => ApplePayDomainService::class, + 'applicationFees' => ApplicationFeeService::class, + 'balance' => BalanceService::class, + 'balanceTransactions' => BalanceTransactionService::class, + 'billingPortal' => BillingPortal\BillingPortalServiceFactory::class, + 'charges' => ChargeService::class, + 'checkout' => Checkout\CheckoutServiceFactory::class, + 'countrySpecs' => CountrySpecService::class, + 'coupons' => CouponService::class, + 'creditNotes' => CreditNoteService::class, + 'customers' => CustomerService::class, + 'disputes' => DisputeService::class, + 'ephemeralKeys' => EphemeralKeyService::class, + 'events' => EventService::class, + 'exchangeRates' => ExchangeRateService::class, + 'fileLinks' => FileLinkService::class, + 'files' => FileService::class, + 'invoiceItems' => InvoiceItemService::class, + 'invoices' => InvoiceService::class, + 'issuing' => Issuing\IssuingServiceFactory::class, + 'mandates' => MandateService::class, + 'oauth' => OAuthService::class, + 'orderReturns' => OrderReturnService::class, + 'orders' => OrderService::class, + 'paymentIntents' => PaymentIntentService::class, + 'paymentMethods' => PaymentMethodService::class, + 'payouts' => PayoutService::class, + 'plans' => PlanService::class, + 'prices' => PriceService::class, + 'products' => ProductService::class, + 'promotionCodes' => PromotionCodeService::class, + 'radar' => Radar\RadarServiceFactory::class, + 'refunds' => RefundService::class, + 'reporting' => Reporting\ReportingServiceFactory::class, + 'reviews' => ReviewService::class, + 'setupAttempts' => SetupAttemptService::class, + 'setupIntents' => SetupIntentService::class, + 'sigma' => Sigma\SigmaServiceFactory::class, + 'skus' => SkuService::class, + 'sources' => SourceService::class, + 'subscriptionItems' => SubscriptionItemService::class, + 'subscriptions' => SubscriptionService::class, + 'subscriptionSchedules' => SubscriptionScheduleService::class, + 'taxRates' => TaxRateService::class, + 'terminal' => Terminal\TerminalServiceFactory::class, + 'tokens' => TokenService::class, + 'topups' => TopupService::class, + 'transfers' => TransferService::class, + 'webhookEndpoints' => WebhookEndpointService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/CountrySpecService.php b/htdocs/includes/stripe/stripe-php/lib/Service/CountrySpecService.php new file mode 100644 index 00000000000..573444fd3f4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/CountrySpecService.php @@ -0,0 +1,39 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class CountrySpecService extends \Stripe\Service\AbstractService +{ + /** + * Lists all Country Spec objects available in the API. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/country_specs', $params, $opts); + } + + /** + * Returns a Country Spec for a given Country code. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CountrySpec + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/CouponService.php b/htdocs/includes/stripe/stripe-php/lib/Service/CouponService.php new file mode 100644 index 00000000000..82a880f5361 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/CouponService.php @@ -0,0 +1,104 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class CouponService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your coupons. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/coupons', $params, $opts); + } + + /** + * You can create coupons easily via the <a + * href="https://dashboard.stripe.com/coupons">coupon management</a> page of the + * Stripe dashboard. Coupon creation is also accessible via the API if you need to + * create coupons on the fly. + * + * A coupon has either a <code>percent_off</code> or an <code>amount_off</code> and + * <code>currency</code>. If you set an <code>amount_off</code>, that amount will + * be subtracted from any invoice’s subtotal. For example, an invoice with a + * subtotal of <currency>100</currency> will have a final total of + * <currency>0</currency> if a coupon with an <code>amount_off</code> of + * <amount>200</amount> is applied to it and an invoice with a subtotal of + * <currency>300</currency> will have a final total of <currency>100</currency> if + * a coupon with an <code>amount_off</code> of <amount>200</amount> is applied to + * it. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Coupon + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/coupons', $params, $opts); + } + + /** + * You can delete coupons via the <a + * href="https://dashboard.stripe.com/coupons">coupon management</a> page of the + * Stripe dashboard. However, deleting a coupon does not affect any customers who + * have already applied the coupon; it means that new customers can’t redeem the + * coupon. You can also delete coupons via the API. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Coupon + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } + + /** + * Retrieves the coupon with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Coupon + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } + + /** + * Updates the metadata of a coupon. Other coupon details (currency, duration, + * amount_off) are, by design, not editable. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Coupon + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/CreditNoteService.php b/htdocs/includes/stripe/stripe-php/lib/Service/CreditNoteService.php new file mode 100644 index 00000000000..39807dc11a4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/CreditNoteService.php @@ -0,0 +1,156 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class CreditNoteService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of credit notes. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/credit_notes', $params, $opts); + } + + /** + * When retrieving a credit note, you’ll get a <strong>lines</strong> property + * containing the the first handful of those items. There is also a URL where you + * can retrieve the full (paginated) list of line items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allLines($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/credit_notes/%s/lines', $parentId), $params, $opts); + } + + /** + * Issue a credit note to adjust the amount of a finalized invoice. For a + * <code>status=open</code> invoice, a credit note reduces its + * <code>amount_due</code>. For a <code>status=paid</code> invoice, a credit note + * does not affect its <code>amount_due</code>. Instead, it can result in any + * combination of the following:. + * + * <ul> <li>Refund: create a new refund (using <code>refund_amount</code>) or link + * an existing refund (using <code>refund</code>).</li> <li>Customer balance + * credit: credit the customer’s balance (using <code>credit_amount</code>) which + * will be automatically applied to their next invoice when it’s finalized.</li> + * <li>Outside of Stripe credit: record the amount that is or will be credited + * outside of Stripe (using <code>out_of_band_amount</code>).</li> </ul> + * + * For post-payment credit notes the sum of the refund, credit and outside of + * Stripe amounts must equal the credit note total. + * + * You may issue multiple credit notes for an invoice. Each credit note will + * increment the invoice’s <code>pre_payment_credit_notes_amount</code> or + * <code>post_payment_credit_notes_amount</code> depending on its + * <code>status</code> at the time of credit note creation. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/credit_notes', $params, $opts); + } + + /** + * Get a preview of a credit note without creating it. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function preview($params = null, $opts = null) + { + return $this->request('get', '/v1/credit_notes/preview', $params, $opts); + } + + /** + * When retrieving a credit note preview, you’ll get a <strong>lines</strong> + * property containing the first handful of those items. This URL you can retrieve + * the full (paginated) list of line items. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function previewLines($params = null, $opts = null) + { + return $this->request('get', '/v1/credit_notes/preview/lines', $params, $opts); + } + + /** + * Retrieves the credit note object with the given identifier. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Updates an existing credit note. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s', $id), $params, $opts); + } + + /** + * Marks a credit note as void. Learn more about <a + * href="/docs/billing/invoices/credit-notes#voiding">voiding credit notes</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CreditNote + */ + public function voidCreditNote($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/credit_notes/%s/void', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/CustomerService.php b/htdocs/includes/stripe/stripe-php/lib/Service/CustomerService.php new file mode 100644 index 00000000000..fdc6a596062 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/CustomerService.php @@ -0,0 +1,353 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class CustomerService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your customers. The customers are returned sorted by creation + * date, with the most recent customers appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/customers', $params, $opts); + } + + /** + * Returns a list of transactions that updated the customer’s <a + * href="/docs/billing/customer/balance">balances</a>. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allBalanceTransactions($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); + } + + /** + * List sources for a specified customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allSources($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); + } + + /** + * Returns a list of tax IDs for a customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allTaxIds($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); + } + + /** + * Creates a new customer object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Customer + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/customers', $params, $opts); + } + + /** + * Creates an immutable transaction that updates the customer’s credit <a + * href="/docs/billing/customer/balance">balance</a>. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CustomerBalanceTransaction + */ + public function createBalanceTransaction($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); + } + + /** + * When you create a new credit card, you must specify a customer or recipient on + * which to create it. + * + * If the card’s owner has no default card, then the new card will become the + * default. However, if the owner already has a default, then it will not change. + * To change the default, you should <a href="/docs/api#update_customer">update the + * customer</a> to have a new <code>default_source</code>. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public function createSource($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); + } + + /** + * Creates a new <code>TaxID</code> object for a customer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public function createTaxId($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); + } + + /** + * Permanently deletes a customer. It cannot be undone. Also immediately cancels + * any active subscriptions on the customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Customer + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Removes the currently applied discount on a customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Customer + */ + public function deleteDiscount($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/discount', $id), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public function deleteSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Deletes an existing <code>TaxID</code> object. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public function deleteTaxId($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves the details of an existing customer. You need only supply the unique + * customer identifier that was returned upon customer creation. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Customer + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Retrieves a specific customer balance transaction that updated the customer’s <a + * href="/docs/billing/customer/balance">balances</a>. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CustomerBalanceTransaction + */ + public function retrieveBalanceTransaction($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieve a specified source for a given customer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public function retrieveSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves the <code>TaxID</code> object with the given identifier. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxId + */ + public function retrieveTaxId($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the specified customer by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. For example, if you pass the + * <strong>source</strong> parameter, that becomes the customer’s active source + * (e.g., a card) to be used for all charges in the future. When you update a + * customer to a new valid card source by passing the <strong>source</strong> + * parameter: for each of the customer’s current subscriptions, if the subscription + * bills automatically and is in the <code>past_due</code> state, then the latest + * open invoice for the subscription with automatic collection enabled will be + * retried. This retry will not count as an automatic retry, and will not affect + * the next regularly scheduled payment for the invoice. Changing the + * <strong>default_source</strong> for a customer will not trigger this behavior. + * + * This request accepts mostly the same arguments as the customer creation call. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Customer + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s', $id), $params, $opts); + } + + /** + * Most credit balance transaction fields are immutable, but you may update its + * <code>description</code> and <code>metadata</code>. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\CustomerBalanceTransaction + */ + public function updateBalanceTransaction($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public function updateSource($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source + */ + public function verifySource($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s/verify', $parentId, $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/DisputeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/DisputeService.php new file mode 100644 index 00000000000..4eb1542bf44 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/DisputeService.php @@ -0,0 +1,83 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class DisputeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your disputes. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/disputes', $params, $opts); + } + + /** + * Closing the dispute for a charge indicates that you do not have any evidence to + * submit and are essentially dismissing the dispute, acknowledging it as lost. + * + * The status of the dispute will change from <code>needs_response</code> to + * <code>lost</code>. <em>Closing a dispute is irreversible</em>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Dispute + */ + public function close($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/disputes/%s/close', $id), $params, $opts); + } + + /** + * Retrieves the dispute with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Dispute + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); + } + + /** + * When you get a dispute, contacting your customer is always the best first step. + * If that doesn’t work, you can submit evidence to help us resolve the dispute in + * your favor. You can do this in your <a + * href="https://dashboard.stripe.com/disputes">dashboard</a>, but if you prefer, + * you can use the API to submit evidence programmatically. + * + * Depending on your dispute type, different evidence fields will give you a better + * chance of winning your dispute. To figure out which evidence fields to provide, + * see our <a href="/docs/disputes/categories">guide to dispute types</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Dispute + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/disputes/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/EphemeralKeyService.php b/htdocs/includes/stripe/stripe-php/lib/Service/EphemeralKeyService.php new file mode 100644 index 00000000000..3ca14c90471 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/EphemeralKeyService.php @@ -0,0 +1,43 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class EphemeralKeyService extends \Stripe\Service\AbstractService +{ + /** + * Invalidates a short-lived API key for a given resource. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\EphemeralKey + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/ephemeral_keys/%s', $id), $params, $opts); + } + + /** + * Creates a short-lived API key for a given resource. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\EphemeralKey + */ + public function create($params = null, $opts = null) + { + if (!$opts || !isset($opts['stripe_version'])) { + throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); + } + + return $this->request('post', '/v1/ephemeral_keys', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/EventService.php b/htdocs/includes/stripe/stripe-php/lib/Service/EventService.php new file mode 100644 index 00000000000..430b35abf7c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/EventService.php @@ -0,0 +1,44 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class EventService extends \Stripe\Service\AbstractService +{ + /** + * List events, going back up to 30 days. Each event data is rendered according to + * Stripe API version at its creation time, specified in <a + * href="/docs/api/events/object">event object</a> <code>api_version</code> + * attribute (not according to your current Stripe API version or + * <code>Stripe-Version</code> header). + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/events', $params, $opts); + } + + /** + * Retrieves the details of an event. Supply the unique identifier of the event, + * which you might have received in a webhook. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Event + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/events/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ExchangeRateService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ExchangeRateService.php new file mode 100644 index 00000000000..fc78410c78a --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ExchangeRateService.php @@ -0,0 +1,41 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ExchangeRateService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of objects that contain the rates at which foreign currencies are + * converted to one another. Only shows the currencies for which Stripe supports. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/exchange_rates', $params, $opts); + } + + /** + * Retrieves the exchange rates from the given currency to every supported + * currency. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\ExchangeRate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/exchange_rates/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/FileLinkService.php b/htdocs/includes/stripe/stripe-php/lib/Service/FileLinkService.php new file mode 100644 index 00000000000..7a3a435dd26 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/FileLinkService.php @@ -0,0 +1,70 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class FileLinkService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of file links. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/file_links', $params, $opts); + } + + /** + * Creates a new file link object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FileLink + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/file_links', $params, $opts); + } + + /** + * Retrieves the file link with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FileLink + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); + } + + /** + * Updates an existing file link object. Expired links can no longer be updated. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FileLink + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/FileService.php b/htdocs/includes/stripe/stripe-php/lib/Service/FileService.php new file mode 100644 index 00000000000..1484288496d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/FileService.php @@ -0,0 +1,66 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class FileService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of the files that your account has access to. The files are + * returned sorted by creation date, with the most recently created files appearing + * first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/files', $params, $opts); + } + + /** + * Retrieves the details of an existing file object. Supply the unique file ID from + * a file, and Stripe will return the corresponding file object. To access file + * contents, see the <a href="/docs/file-upload#download-file-contents">File Upload + * Guide</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\File + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/files/%s', $id), $params, $opts); + } + + /** + * Create a file. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @return \Stripe\File + */ + public function create($params = null, $opts = null) + { + $opts = \Stripe\Util\RequestOptions::parse($opts); + if (!isset($opts->apiBase)) { + $opts->apiBase = $this->getClient()->getFilesBase(); + } + + // Manually flatten params, otherwise curl's multipart encoder will + // choke on nested null|arrays. + $flatParams = \array_column(\Stripe\Util\Util::flattenParams($params), 1, 0); + + return $this->request('post', '/v1/files', $flatParams, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceItemService.php b/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceItemService.php new file mode 100644 index 00000000000..0f0b9e91f08 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceItemService.php @@ -0,0 +1,93 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class InvoiceItemService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your invoice items. Invoice items are returned sorted by + * creation date, with the most recently created invoice items appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/invoiceitems', $params, $opts); + } + + /** + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If + * no invoice is specified, the item will be on the next invoice created for the + * customer specified. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\InvoiceItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/invoiceitems', $params, $opts); + } + + /** + * Deletes an invoice item, removing it from an invoice. Deleting invoice items is + * only possible when they’re not attached to invoices, or if it’s attached to a + * draft invoice. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\InvoiceItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } + + /** + * Retrieves the invoice item with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\InvoiceItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } + + /** + * Updates the amount or description of an invoice item on an upcoming invoice. + * Updating an invoice item is only possible before the invoice it’s attached to is + * closed. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\InvoiceItem + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoiceitems/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceService.php b/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceService.php new file mode 100644 index 00000000000..f647b28f6cb --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/InvoiceService.php @@ -0,0 +1,272 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class InvoiceService extends \Stripe\Service\AbstractService +{ + /** + * You can list all invoices, or list the invoices for a specific customer. The + * invoices are returned sorted by creation date, with the most recently created + * invoices appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/invoices', $params, $opts); + } + + /** + * When retrieving an invoice, you’ll get a <strong>lines</strong> property + * containing the total count of line items and the first handful of those items. + * There is also a URL where you can retrieve the full (paginated) list of line + * items. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allLines($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/invoices/%s/lines', $parentId), $params, $opts); + } + + /** + * This endpoint creates a draft invoice for a given customer. The draft invoice + * created pulls in all pending invoice items on that customer, including + * prorations. The invoice remains a draft until you <a + * href="#finalize_invoice">finalize</a> the invoice, which allows you to <a + * href="#pay_invoice">pay</a> or <a href="#send_invoice">send</a> the invoice to + * your customers. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/invoices', $params, $opts); + } + + /** + * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to + * delete invoices that are no longer in a draft state will fail; once an invoice + * has been finalized or if an invoice is for a subscription, it must be <a + * href="#void_invoice">voided</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * Stripe automatically finalizes drafts before sending and attempting payment on + * invoices. However, if you’d like to finalize a draft invoice manually, you can + * do so using this method. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function finalizeInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/finalize', $id), $params, $opts); + } + + /** + * Marking an invoice as uncollectible is useful for keeping track of bad debts + * that can be written off for accounting purposes. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function markUncollectible($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/mark_uncollectible', $id), $params, $opts); + } + + /** + * Stripe automatically creates and then attempts to collect payment on invoices + * for customers on subscriptions according to your <a + * href="https://dashboard.stripe.com/account/billing/automatic">subscriptions + * settings</a>. However, if you’d like to attempt payment on an invoice out of the + * normal collection schedule or for some other reason, you can do so. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function pay($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/pay', $id), $params, $opts); + } + + /** + * Retrieves the invoice with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * Stripe will automatically send invoices to customers according to your <a + * href="https://dashboard.stripe.com/account/billing/automatic">subscriptions + * settings</a>. However, if you’d like to manually send an invoice to your + * customer out of the normal schedule, you can do so. When sending invoices that + * have already been paid, there will be no reference to the payment in the email. + * + * Requests made in test-mode result in no emails being sent, despite sending an + * <code>invoice.sent</code> event. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function sendInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/send', $id), $params, $opts); + } + + /** + * At any time, you can preview the upcoming invoice for a customer. This will show + * you all the charges that are pending, including subscription renewal charges, + * invoice item charges, etc. It will also show you any discounts that are + * applicable to the invoice. + * + * Note that when you are viewing an upcoming invoice, you are simply viewing a + * preview – the invoice has not yet been created. As such, the upcoming invoice + * will not show up in invoice listing calls, and you cannot use the API to pay or + * edit the invoice. If you want to change the amount that your customer will be + * billed, you can add, remove, or update pending invoice items, or update the + * customer’s discount. + * + * You can preview the effects of updating a subscription, including a preview of + * what proration will take place. To ensure that the actual proration is + * calculated exactly the same as the previewed proration, you should pass a + * <code>proration_date</code> parameter when doing the actual subscription update. + * The value passed in should be the same as the + * <code>subscription_proration_date</code> returned on the upcoming invoice + * resource. The recommended way to get only the prorations being previewed is to + * consider only proration line items where <code>period[start]</code> is equal to + * the <code>subscription_proration_date</code> on the upcoming invoice resource. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function upcoming($params = null, $opts = null) + { + return $this->request('get', '/v1/invoices/upcoming', $params, $opts); + } + + /** + * When retrieving an upcoming invoice, you’ll get a <strong>lines</strong> + * property containing the total count of line items and the first handful of those + * items. There is also a URL where you can retrieve the full (paginated) list of + * line items. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function upcomingLines($params = null, $opts = null) + { + return $this->request('get', '/v1/invoices/upcoming/lines', $params, $opts); + } + + /** + * Draft invoices are fully editable. Once an invoice is <a + * href="/docs/billing/invoices/workflow#finalized">finalized</a>, monetary values, + * as well as <code>collection_method</code>, become uneditable. + * + * If you would like to stop the Stripe Billing engine from automatically + * finalizing, reattempting payments on, sending reminders for, or <a + * href="/docs/billing/invoices/reconciliation">automatically reconciling</a> + * invoices, pass <code>auto_advance=false</code>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s', $id), $params, $opts); + } + + /** + * Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is + * similar to <a href="#delete_invoice">deletion</a>, however it only applies to + * finalized invoices and maintains a papertrail where the invoice can still be + * found. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Invoice + */ + public function voidInvoice($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/invoices/%s/void', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php new file mode 100644 index 00000000000..6fff70e7e92 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php @@ -0,0 +1,97 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +class AuthorizationService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Issuing <code>Authorization</code> objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/authorizations', $params, $opts); + } + + /** + * Approves a pending Issuing <code>Authorization</code> object. This request + * should be made within the timeout window of the <a + * href="/docs/issuing/controls/real-time-authorizations">real-time + * authorization</a> flow. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function approve($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/approve', $id), $params, $opts); + } + + /** + * Declines a pending Issuing <code>Authorization</code> object. This request + * should be made within the timeout window of the <a + * href="/docs/issuing/controls/real-time-authorizations">real time + * authorization</a> flow. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function decline($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s/decline', $id), $params, $opts); + } + + /** + * Retrieves an Issuing <code>Authorization</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing <code>Authorization</code> object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/authorizations/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardService.php new file mode 100644 index 00000000000..346d54afae3 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardService.php @@ -0,0 +1,73 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +class CardService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Issuing <code>Card</code> objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/cards', $params, $opts); + } + + /** + * Creates an Issuing <code>Card</code> object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Card + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/cards', $params, $opts); + } + + /** + * Retrieves an Issuing <code>Card</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Card + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing <code>Card</code> object by setting the values of + * the parameters passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Card + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/cards/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardholderService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardholderService.php new file mode 100644 index 00000000000..5731b1bf14c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/CardholderService.php @@ -0,0 +1,74 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +class CardholderService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Issuing <code>Cardholder</code> objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/cardholders', $params, $opts); + } + + /** + * Creates a new Issuing <code>Cardholder</code> object that can be issued cards. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Cardholder + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/cardholders', $params, $opts); + } + + /** + * Retrieves an Issuing <code>Cardholder</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Cardholder + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing <code>Cardholder</code> object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Cardholder + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/cardholders/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/DisputeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/DisputeService.php new file mode 100644 index 00000000000..ab5df5f3e79 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/DisputeService.php @@ -0,0 +1,99 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +class DisputeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Issuing <code>Dispute</code> objects. The objects are sorted + * in descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/disputes', $params, $opts); + } + + /** + * Creates an Issuing <code>Dispute</code> object. Individual pieces of evidence + * within the <code>evidence</code> object are optional at this point. Stripe only + * validates that required evidence is present during submission. Refer to <a + * href="/docs/issuing/purchases/disputes#dispute-reasons-and-evidence">Dispute + * reasons and evidence</a> for more details about evidence requirements. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Dispute + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/issuing/disputes', $params, $opts); + } + + /** + * Retrieves an Issuing <code>Dispute</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Dispute + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts); + } + + /** + * Submits an Issuing <code>Dispute</code> to the card network. Stripe validates + * that all evidence fields required for the dispute’s reason are present. For more + * details, see <a + * href="/docs/issuing/purchases/disputes#dispute-reasons-and-evidence">Dispute + * reasons and evidence</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Dispute + */ + public function submit($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s/submit', $id), $params, $opts); + } + + /** + * Updates the specified Issuing <code>Dispute</code> object by setting the values + * of the parameters passed. Any parameters not provided will be left unchanged. + * Properties on the <code>evidence</code> object can be unset by passing in an + * empty string. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Dispute + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/disputes/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php new file mode 100644 index 00000000000..a8d5d0f8167 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php @@ -0,0 +1,33 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +/** + * Service factory class for API resources in the Issuing namespace. + * + * @property AuthorizationService $authorizations + * @property CardholderService $cardholders + * @property CardService $cards + * @property DisputeService $disputes + * @property TransactionService $transactions + */ +class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'authorizations' => AuthorizationService::class, + 'cardholders' => CardholderService::class, + 'cards' => CardService::class, + 'disputes' => DisputeService::class, + 'transactions' => TransactionService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/TransactionService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/TransactionService.php new file mode 100644 index 00000000000..8fb0ee2ac64 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Issuing/TransactionService.php @@ -0,0 +1,59 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Issuing; + +class TransactionService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Issuing <code>Transaction</code> objects. The objects are + * sorted in descending order by creation date, with the most recently created + * object appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/issuing/transactions', $params, $opts); + } + + /** + * Retrieves an Issuing <code>Transaction</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Transaction + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts); + } + + /** + * Updates the specified Issuing <code>Transaction</code> object by setting the + * values of the parameters passed. Any parameters not provided will be left + * unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Transaction + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/MandateService.php b/htdocs/includes/stripe/stripe-php/lib/Service/MandateService.php new file mode 100644 index 00000000000..156bff0a02b --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/MandateService.php @@ -0,0 +1,24 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class MandateService extends \Stripe\Service\AbstractService +{ + /** + * Retrieves a Mandate object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Mandate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/mandates/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/OAuthService.php b/htdocs/includes/stripe/stripe-php/lib/Service/OAuthService.php new file mode 100644 index 00000000000..b745ad9876e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/OAuthService.php @@ -0,0 +1,150 @@ +<?php + +namespace Stripe\Service; + +class OAuthService extends \Stripe\Service\AbstractService +{ + /** + * Sends a request to Stripe's Connect API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \Stripe\StripeObject the object returned by Stripe's Connect API + */ + protected function requestConnect($method, $path, $params, $opts) + { + $opts = $this->_parseOpts($opts); + $opts->apiBase = $this->_getBase($opts); + + return $this->request($method, $path, $params, $opts); + } + + /** + * Generates a URL to Stripe's OAuth form. + * + * @param null|array $params + * @param null|array $opts + * + * @return string the URL to Stripe's OAuth form + */ + public function authorizeUrl($params = null, $opts = null) + { + $params = $params ?: []; + + $opts = $this->_parseOpts($opts); + $base = $this->_getBase($opts); + + $params['client_id'] = $this->_getClientId($params); + if (!\array_key_exists('response_type', $params)) { + $params['response_type'] = 'code'; + } + $query = \Stripe\Util\Util::encodeParameters($params); + + return $base . '/oauth/authorize?' . $query; + } + + /** + * Use an authoriztion code to connect an account to your platform and + * fetch the user's credentials. + * + * @param null|array $params + * @param null|array $opts + * + * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return \Stripe\StripeObject object containing the response from the API + */ + public function token($params = null, $opts = null) + { + $params = $params ?: []; + $params['client_secret'] = $this->_getClientSecret($params); + + return $this->requestConnect('post', '/oauth/token', $params, $opts); + } + + /** + * Disconnects an account from your platform. + * + * @param null|array $params + * @param null|array $opts + * + * @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails + * + * @return \Stripe\StripeObject object containing the response from the API + */ + public function deauthorize($params = null, $opts = null) + { + $params = $params ?: []; + $params['client_id'] = $this->_getClientId($params); + + return $this->requestConnect('post', '/oauth/deauthorize', $params, $opts); + } + + private function _getClientId($params = null) + { + $clientId = ($params && \array_key_exists('client_id', $params)) ? $params['client_id'] : null; + + if (null === $clientId) { + $clientId = $this->client->getClientId(); + } + if (null === $clientId) { + $msg = 'No client_id provided. (HINT: set your client_id using ' + . '`new \Stripe\StripeClient([clientId => <CLIENT-ID> + ])`)". You can find your client_ids ' + . 'in your Stripe dashboard at ' + . 'https://dashboard.stripe.com/account/applications/settings, ' + . 'after registering your account as a platform. See ' + . 'https://stripe.com/docs/connect/standard-accounts for details, ' + . 'or email support@stripe.com if you have any questions.'; + + throw new \Stripe\Exception\AuthenticationException($msg); + } + + return $clientId; + } + + private function _getClientSecret($params = null) + { + if (\array_key_exists('client_secret', $params)) { + return $params['client_secret']; + } + + return $this->client->getApiKey(); + } + + /** + * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @throws \Stripe\Exception\InvalidArgumentException + * + * @return \Stripe\Util\RequestOptions + */ + private function _parseOpts($opts) + { + if (\is_array($opts)) { + if (\array_key_exists('connect_base', $opts)) { + // Throw an exception for the convenience of anybody migrating to + // \Stripe\Service\OAuthService from \Stripe\OAuth, where `connect_base` + // was the name of the parameter that behaves as `api_base` does here. + throw new \Stripe\Exception\InvalidArgumentException('Use `api_base`, not `connect_base`'); + } + } + + return \Stripe\Util\RequestOptions::parse($opts); + } + + /** + * @param \Stripe\Util\RequestOptions $opts + * + * @return string + */ + private function _getBase($opts) + { + return isset($opts->apiBase) ? + $opts->apiBase : + $this->client->getConnectBase(); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/OrderReturnService.php b/htdocs/includes/stripe/stripe-php/lib/Service/OrderReturnService.php new file mode 100644 index 00000000000..6183166c52e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/OrderReturnService.php @@ -0,0 +1,42 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class OrderReturnService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your order returns. The returns are returned sorted by + * creation date, with the most recently created return appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/order_returns', $params, $opts); + } + + /** + * Retrieves the details of an existing order return. Supply the unique order ID + * from either an order return creation request or the order return list, and + * Stripe will return the corresponding order information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\OrderReturn + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/order_returns/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/OrderService.php b/htdocs/includes/stripe/stripe-php/lib/Service/OrderService.php new file mode 100644 index 00000000000..fa658fa7ba5 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/OrderService.php @@ -0,0 +1,109 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class OrderService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your orders. The orders are returned sorted by creation date, + * with the most recently created orders appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/orders', $params, $opts); + } + + /** + * Creates a new order object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Order + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/orders', $params, $opts); + } + + /** + * Pay an order by providing a <code>source</code> to create a payment. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Order + */ + public function pay($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s/pay', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing order. Supply the unique order ID from + * either an order creation request or the order list, and Stripe will return the + * corresponding order information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Order + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/orders/%s', $id), $params, $opts); + } + + /** + * Return all or part of an order. The order must have a status of + * <code>paid</code> or <code>fulfilled</code> before it can be returned. Once all + * items have been returned, the order will become <code>canceled</code> or + * <code>returned</code> depending on which status the order started in. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Order + */ + public function returnOrder($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s/returns', $id), $params, $opts); + } + + /** + * Updates the specific order by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Order + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/orders/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PaymentIntentService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PaymentIntentService.php new file mode 100644 index 00000000000..43aba46d858 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PaymentIntentService.php @@ -0,0 +1,181 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PaymentIntentService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of PaymentIntents. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_intents', $params, $opts); + } + + /** + * A PaymentIntent object can be canceled when it is in one of these statuses: + * <code>requires_payment_method</code>, <code>requires_capture</code>, + * <code>requires_confirmation</code>, or <code>requires_action</code>. + * + * Once canceled, no additional charges will be made by the PaymentIntent and any + * operations on the PaymentIntent will fail with an error. For PaymentIntents with + * <code>status=’requires_capture’</code>, the remaining + * <code>amount_capturable</code> will automatically be refunded. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/cancel', $id), $params, $opts); + } + + /** + * Capture the funds of an existing uncaptured PaymentIntent when its status is + * <code>requires_capture</code>. + * + * Uncaptured PaymentIntents will be canceled exactly seven days after they are + * created. + * + * Learn more about <a href="/docs/payments/capture-later">separate authorization + * and capture</a>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function capture($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/capture', $id), $params, $opts); + } + + /** + * Confirm that your customer intends to pay with current or provided payment + * method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. + * + * If the selected payment method requires additional authentication steps, the + * PaymentIntent will transition to the <code>requires_action</code> status and + * suggest additional actions via <code>next_action</code>. If payment fails, the + * PaymentIntent will transition to the <code>requires_payment_method</code> + * status. If payment succeeds, the PaymentIntent will transition to the + * <code>succeeded</code> status (or <code>requires_capture</code>, if + * <code>capture_method</code> is set to <code>manual</code>). + * + * If the <code>confirmation_method</code> is <code>automatic</code>, payment may + * be attempted using our <a + * href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and + * the PaymentIntent’s <a + * href="#payment_intent_object-client_secret">client_secret</a>. After + * <code>next_action</code>s are handled by the client, no additional confirmation + * is required to complete the payment. + * + * If the <code>confirmation_method</code> is <code>manual</code>, all payment + * attempts must be initiated using a secret key. If any actions are required for + * the payment, the PaymentIntent will return to the + * <code>requires_confirmation</code> state after those actions are completed. Your + * server needs to then explicitly re-confirm the PaymentIntent to initiate the + * next payment attempt. Read the <a + * href="/docs/payments/payment-intents/web-manual">expanded documentation</a> to + * learn more about manual confirmation. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function confirm($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s/confirm', $id), $params, $opts); + } + + /** + * Creates a PaymentIntent object. + * + * After the PaymentIntent is created, attach a payment method and <a + * href="/docs/api/payment_intents/confirm">confirm</a> to continue the payment. + * You can read more about the different payment flows available via the Payment + * Intents API <a href="/docs/payments/payment-intents">here</a>. + * + * When <code>confirm=true</code> is used during creation, it is equivalent to + * creating and confirming the PaymentIntent in the same call. You may use any + * parameters available in the <a href="/docs/api/payment_intents/confirm">confirm + * API</a> when <code>confirm=true</code> is supplied. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_intents', $params, $opts); + } + + /** + * Retrieves the details of a PaymentIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the + * <code>client_secret</code> is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be + * returned. Please refer to the <a href="#payment_intent_object">payment + * intent</a> object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); + } + + /** + * Updates properties on a PaymentIntent object without confirming. + * + * Depending on which properties you update, you may need to confirm the + * PaymentIntent again. For example, updating the <code>payment_method</code> will + * always require you to confirm the PaymentIntent again. If you prefer to update + * and confirm at the same time, we recommend updating properties via the <a + * href="/docs/api/payment_intents/confirm">confirm API</a> instead. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentIntent + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PaymentMethodService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PaymentMethodService.php new file mode 100644 index 00000000000..7111b9ebc46 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PaymentMethodService.php @@ -0,0 +1,121 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PaymentMethodService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of PaymentMethods for a given Customer. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_methods', $params, $opts); + } + + /** + * Attaches a PaymentMethod object to a Customer. + * + * To attach a new PaymentMethod to a customer for future payments, we recommend + * you use a <a href="/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent + * with <a + * href="/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>. + * These approaches will perform any necessary steps to ensure that the + * PaymentMethod can be used in a future payment. Using the + * <code>/v1/payment_methods/:id/attach</code> endpoint does not ensure that future + * payments can be made with the attached PaymentMethod. See <a + * href="/docs/payments/payment-intents#future-usage">Optimizing cards for future + * payments</a> for more information about setting up future payments. + * + * To use this PaymentMethod as the default for invoice or subscription payments, + * set <a + * href="/docs/api/customers/update#update_customer-invoice_settings-default_payment_method"><code>invoice_settings.default_payment_method</code></a>, + * on the Customer to the PaymentMethod’s ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethod + */ + public function attach($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s/attach', $id), $params, $opts); + } + + /** + * Creates a PaymentMethod object. Read the <a + * href="/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js + * reference</a> to learn how to create PaymentMethods via Stripe.js. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethod + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_methods', $params, $opts); + } + + /** + * Detaches a PaymentMethod object from a Customer. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethod + */ + public function detach($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s/detach', $id), $params, $opts); + } + + /** + * Retrieves a PaymentMethod object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethod + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts); + } + + /** + * Updates a PaymentMethod object. A PaymentMethod must be attached a customer to + * be updated. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethod + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_methods/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PayoutService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PayoutService.php new file mode 100644 index 00000000000..547e22da6ab --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PayoutService.php @@ -0,0 +1,127 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PayoutService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of existing payouts sent to third-party bank accounts or that + * Stripe has sent you. The payouts are returned in sorted order, with the most + * recently created payouts appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payouts', $params, $opts); + } + + /** + * A previously created payout can be canceled if it has not yet been paid out. + * Funds will be refunded to your available balance. You may not cancel automatic + * Stripe payouts. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Payout + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s/cancel', $id), $params, $opts); + } + + /** + * To send funds to your own bank account, you create a new payout object. Your <a + * href="#balance">Stripe balance</a> must be able to cover the payout amount, or + * you’ll receive an “Insufficient Funds” error. + * + * If your API key is in test mode, money won’t actually be sent, though everything + * else will occur as if in live mode. + * + * If you are creating a manual payout on a Stripe account that uses multiple + * payment source types, you’ll need to specify the source type balance that the + * payout should draw from. The <a href="#balance_object">balance object</a> + * details available and pending amounts by source type. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Payout + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payouts', $params, $opts); + } + + /** + * Retrieves the details of an existing payout. Supply the unique payout ID from + * either a payout creation request or the payout list, and Stripe will return the + * corresponding payout information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Payout + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); + } + + /** + * Reverses a payout by debiting the destination bank account. Only payouts for + * connected accounts to US bank accounts may be reversed at this time. If the + * payout is in the <code>pending</code> status, + * <code>/v1/payouts/:id/cancel</code> should be used instead. + * + * By requesting a reversal via <code>/v1/payouts/:id/reverse</code>, you confirm + * that the authorized signatory of the selected bank account has authorized the + * debit on the bank account and that no other authorization is required. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Payout + */ + public function reverse($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s/reverse', $id), $params, $opts); + } + + /** + * Updates the specified payout by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. This request accepts only the + * metadata as arguments. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Payout + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PlanService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PlanService.php new file mode 100644 index 00000000000..16625d27a9a --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PlanService.php @@ -0,0 +1,91 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PlanService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your plans. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/plans', $params, $opts); + } + + /** + * You can now model subscriptions more flexibly using the <a href="#prices">Prices + * API</a>. It replaces the Plans API and is backwards compatible to simplify your + * migration. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Plan + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/plans', $params, $opts); + } + + /** + * Deleting plans means new subscribers can’t be added. Existing subscribers aren’t + * affected. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Plan + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } + + /** + * Retrieves the plan with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Plan + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } + + /** + * Updates the specified plan by setting the values of the parameters passed. Any + * parameters not provided are left unchanged. By design, you cannot change a + * plan’s ID, amount, currency, or billing cycle. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Plan + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/plans/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PriceService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PriceService.php new file mode 100644 index 00000000000..cc44f69c941 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PriceService.php @@ -0,0 +1,72 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PriceService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your prices. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/prices', $params, $opts); + } + + /** + * Creates a new price for an existing product. The price can be recurring or + * one-time. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Price + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/prices', $params, $opts); + } + + /** + * Retrieves the price with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Price + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/prices/%s', $id), $params, $opts); + } + + /** + * Updates the specified price by setting the values of the parameters passed. Any + * parameters not provided are left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Price + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/prices/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ProductService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ProductService.php new file mode 100644 index 00000000000..850cea56f74 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ProductService.php @@ -0,0 +1,92 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ProductService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your products. The products are returned sorted by creation + * date, with the most recently created products appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/products', $params, $opts); + } + + /** + * Creates a new product object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Product + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/products', $params, $opts); + } + + /** + * Delete a product. Deleting a product is only possible if it has no prices + * associated with it. Additionally, deleting a product with <code>type=good</code> + * is only possible if it has no SKUs associated with it. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Product + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing product. Supply the unique product ID from + * either a product creation request or the product list, and Stripe will return + * the corresponding product information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Product + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } + + /** + * Updates the specific product by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Product + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/products/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/PromotionCodeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/PromotionCodeService.php new file mode 100644 index 00000000000..1de5696da4f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/PromotionCodeService.php @@ -0,0 +1,72 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class PromotionCodeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your promotion codes. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/promotion_codes', $params, $opts); + } + + /** + * A promotion code points to a coupon. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PromotionCode + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/promotion_codes', $params, $opts); + } + + /** + * Retrieves the promotion code with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PromotionCode + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts); + } + + /** + * Updates the specified promotion code by setting the values of the parameters + * passed. Most fields are, by design, not editable. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PromotionCode + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/promotion_codes/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php new file mode 100644 index 00000000000..7b097348389 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php @@ -0,0 +1,43 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Radar; + +class EarlyFraudWarningService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of early fraud warnings. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/early_fraud_warnings', $params, $opts); + } + + /** + * Retrieves the details of an early fraud warning that has previously been + * created. + * + * Please refer to the <a href="#early_fraud_warning_object">early fraud + * warning</a> object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\EarlyFraudWarning + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/early_fraud_warnings/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php new file mode 100644 index 00000000000..b093c671749 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/RadarServiceFactory.php @@ -0,0 +1,29 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Radar; + +/** + * Service factory class for API resources in the Radar namespace. + * + * @property EarlyFraudWarningService $earlyFraudWarnings + * @property ValueListItemService $valueListItems + * @property ValueListService $valueLists + */ +class RadarServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'earlyFraudWarnings' => EarlyFraudWarningService::class, + 'valueListItems' => ValueListItemService::class, + 'valueLists' => ValueListService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php new file mode 100644 index 00000000000..89eba2a7a88 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListItemService.php @@ -0,0 +1,74 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Radar; + +class ValueListItemService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of <code>ValueListItem</code> objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/value_list_items', $params, $opts); + } + + /** + * Creates a new <code>ValueListItem</code> object, which is added to the specified + * parent value list. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueListItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/radar/value_list_items', $params, $opts); + } + + /** + * Deletes a <code>ValueListItem</code> object, removing it from its parent value + * list. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueListItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts); + } + + /** + * Retrieves a <code>ValueListItem</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueListItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/value_list_items/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListService.php new file mode 100644 index 00000000000..64ac2ee790c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Radar/ValueListService.php @@ -0,0 +1,93 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Radar; + +class ValueListService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of <code>ValueList</code> objects. The objects are sorted in + * descending order by creation date, with the most recently created object + * appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/radar/value_lists', $params, $opts); + } + + /** + * Creates a new <code>ValueList</code> object, which can then be referenced in + * rules. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueList + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/radar/value_lists', $params, $opts); + } + + /** + * Deletes a <code>ValueList</code> object, also deleting any items contained + * within the value list. To be deleted, a value list must not be referenced in any + * rules. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueList + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } + + /** + * Retrieves a <code>ValueList</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueList + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } + + /** + * Updates a <code>ValueList</code> object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. Note that + * <code>item_type</code> is immutable. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Radar\ValueList + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/radar/value_lists/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/RefundService.php b/htdocs/includes/stripe/stripe-php/lib/Service/RefundService.php new file mode 100644 index 00000000000..49b4267e40a --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/RefundService.php @@ -0,0 +1,76 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class RefundService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of all refunds you’ve previously created. The refunds are + * returned in sorted order, with the most recent refunds appearing first. For + * convenience, the 10 most recent refunds are always available by default on the + * charge object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/refunds', $params, $opts); + } + + /** + * Create a refund. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Refund + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/refunds', $params, $opts); + } + + /** + * Retrieves the details of an existing refund. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Refund + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); + } + + /** + * Updates the specified refund by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * This request only accepts <code>metadata</code> as an argument. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Refund + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php new file mode 100644 index 00000000000..46e2139a2bb --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportRunService.php @@ -0,0 +1,57 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Reporting; + +class ReportRunService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of Report Runs, with the most recent appearing first. (Requires a + * <a href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.). + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reporting/report_runs', $params, $opts); + } + + /** + * Creates a new object and begin running the report. (Requires a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.). + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Reporting\ReportRun + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/reporting/report_runs', $params, $opts); + } + + /** + * Retrieves the details of an existing Report Run. (Requires a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.). + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Reporting\ReportRun + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reporting/report_runs/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php new file mode 100644 index 00000000000..46f6bf83e1f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportTypeService.php @@ -0,0 +1,41 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Reporting; + +class ReportTypeService extends \Stripe\Service\AbstractService +{ + /** + * Returns a full list of Report Types. (Requires a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.). + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reporting/report_types', $params, $opts); + } + + /** + * Retrieves the details of a Report Type. (Requires a <a + * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.). + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Reporting\ReportType + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reporting/report_types/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php new file mode 100644 index 00000000000..7832e917521 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php @@ -0,0 +1,27 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Reporting; + +/** + * Service factory class for API resources in the Reporting namespace. + * + * @property ReportRunService $reportRuns + * @property ReportTypeService $reportTypes + */ +class ReportingServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'reportRuns' => ReportRunService::class, + 'reportTypes' => ReportTypeService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/ReviewService.php b/htdocs/includes/stripe/stripe-php/lib/Service/ReviewService.php new file mode 100644 index 00000000000..ea152f23e82 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/ReviewService.php @@ -0,0 +1,58 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class ReviewService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of <code>Review</code> objects that have <code>open</code> set to + * <code>true</code>. The objects are sorted in descending order by creation date, + * with the most recently created object appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/reviews', $params, $opts); + } + + /** + * Approves a <code>Review</code> object, closing it and removing it from the list + * of reviews. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Review + */ + public function approve($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/reviews/%s/approve', $id), $params, $opts); + } + + /** + * Retrieves a <code>Review</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Review + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/reviews/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SetupAttemptService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SetupAttemptService.php new file mode 100644 index 00000000000..7376ea13e72 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SetupAttemptService.php @@ -0,0 +1,23 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SetupAttemptService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of SetupAttempts associated with a provided SetupIntent. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/setup_attempts', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SetupIntentService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SetupIntentService.php new file mode 100644 index 00000000000..3cbec506f69 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SetupIntentService.php @@ -0,0 +1,127 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SetupIntentService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of SetupIntents. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/setup_intents', $params, $opts); + } + + /** + * A SetupIntent object can be canceled when it is in one of these statuses: + * <code>requires_payment_method</code>, <code>requires_confirmation</code>, or + * <code>requires_action</code>. + * + * Once canceled, setup is abandoned and any operations on the SetupIntent will + * fail with an error. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/cancel', $id), $params, $opts); + } + + /** + * Confirm that your customer intends to set up the current or provided payment + * method. For example, you would confirm a SetupIntent when a customer hits the + * “Save” button on a payment method management page on your website. + * + * If the selected payment method does not require any additional steps from the + * customer, the SetupIntent will transition to the <code>succeeded</code> status. + * + * Otherwise, it will transition to the <code>requires_action</code> status and + * suggest additional actions via <code>next_action</code>. If setup fails, the + * SetupIntent will transition to the <code>requires_payment_method</code> status. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function confirm($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s/confirm', $id), $params, $opts); + } + + /** + * Creates a SetupIntent object. + * + * After the SetupIntent is created, attach a payment method and <a + * href="/docs/api/setup_intents/confirm">confirm</a> to collect any required + * permissions to charge the payment method later. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/setup_intents', $params, $opts); + } + + /** + * Retrieves the details of a SetupIntent that has previously been created. + * + * Client-side retrieval using a publishable key is allowed when the + * <code>client_secret</code> is provided in the query string. + * + * When retrieved with a publishable key, only a subset of properties will be + * returned. Please refer to the <a href="#setup_intent_object">SetupIntent</a> + * object reference for more details. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts); + } + + /** + * Updates a SetupIntent object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SetupIntent + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/setup_intents/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php new file mode 100644 index 00000000000..92641751bc7 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php @@ -0,0 +1,39 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Sigma; + +class ScheduledQueryRunService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of scheduled query runs. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/sigma/scheduled_query_runs', $params, $opts); + } + + /** + * Retrieves the details of an scheduled query run. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Sigma\ScheduledQueryRun + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/sigma/scheduled_query_runs/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php new file mode 100644 index 00000000000..356750f477c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php @@ -0,0 +1,25 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Sigma; + +/** + * Service factory class for API resources in the Sigma namespace. + * + * @property ScheduledQueryRunService $scheduledQueryRuns + */ +class SigmaServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'scheduledQueryRuns' => ScheduledQueryRunService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SkuService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SkuService.php new file mode 100644 index 00000000000..8934f206443 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SkuService.php @@ -0,0 +1,95 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SkuService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your SKUs. The SKUs are returned sorted by creation date, with + * the most recently created SKUs appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/skus', $params, $opts); + } + + /** + * Creates a new SKU associated with a product. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SKU + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/skus', $params, $opts); + } + + /** + * Delete a SKU. Deleting a SKU is only possible until it has been used in an + * order. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SKU + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing SKU. Supply the unique SKU identifier from + * either a SKU creation request or from the product, and Stripe will return the + * corresponding SKU information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SKU + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } + + /** + * Updates the specific SKU by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * Note that a SKU’s <code>attributes</code> are not editable. Instead, you would + * need to deactivate the existing SKU and create a new one with the new attribute + * values. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SKU + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/skus/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SourceService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SourceService.php new file mode 100644 index 00000000000..c6cc0596467 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SourceService.php @@ -0,0 +1,110 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SourceService extends \Stripe\Service\AbstractService +{ + /** + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function allTransactions($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts); + } + + /** + * Creates a new source object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/sources', $params, $opts); + } + + /** + * Delete a specified source for a given customer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function detach($parentId, $id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); + } + + /** + * Retrieves an existing source object. Supply the unique source ID from a source + * creation request and Stripe will return the corresponding up-to-date source + * object information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/sources/%s', $id), $params, $opts); + } + + /** + * Updates the specified source by setting the values of the parameters passed. Any + * parameters not provided will be left unchanged. + * + * This request accepts the <code>metadata</code> and <code>owner</code> as + * arguments. It is also possible to update type specific information for selected + * payment methods. Please refer to our <a href="/docs/sources">payment method + * guides</a> for more detail. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/sources/%s', $id), $params, $opts); + } + + /** + * Verify a given source. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source + */ + public function verify($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/sources/%s/verify', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionItemService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionItemService.php new file mode 100644 index 00000000000..3b2aa2b1268 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionItemService.php @@ -0,0 +1,151 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SubscriptionItemService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your subscription items for a given subscription. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscription_items', $params, $opts); + } + + /** + * For the specified subscription item, returns a list of summary objects. Each + * object in the list provides usage information that’s been summarized from + * multiple usage records and over a subscription billing period (e.g., 15 usage + * records in the month of September). + * + * The list is sorted in reverse-chronological order (newest first). The first list + * item represents the most current usage period that hasn’t ended yet. Since new + * usage records can still be added, the returned summary information for the + * subscription item’s ID should be seen as unstable until the subscription billing + * period ends. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allUsageRecordSummaries($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/subscription_items/%s/usage_record_summaries', $parentId), $params, $opts); + } + + /** + * Adds a new item to an existing subscription. No existing items will be changed + * or replaced. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionItem + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscription_items', $params, $opts); + } + + /** + * Creates a usage record for a specified subscription item and date, and fills it + * with a quantity. + * + * Usage records provide <code>quantity</code> information that Stripe uses to + * track how much a customer is using your service. With usage information and the + * pricing model set up by the <a + * href="https://stripe.com/docs/billing/subscriptions/metered-billing">metered + * billing</a> plan, Stripe helps you send accurate invoices to your customers. + * + * The default calculation for usage is to add up all the <code>quantity</code> + * values of the usage records within a billing period. You can change this default + * behavior with the billing plan’s <code>aggregate_usage</code> <a + * href="/docs/api/plans/create#create_plan-aggregate_usage">parameter</a>. When + * there is more than one usage record with the same timestamp, Stripe adds the + * <code>quantity</code> values together. In most cases, this is the desired + * resolution, however, you can change this behavior with the <code>action</code> + * parameter. + * + * The default pricing model for metered billing is <a + * href="/docs/api/plans/object#plan_object-billing_scheme">per-unit pricing</a>. + * For finer granularity, you can configure metered billing to have a <a + * href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing</a> + * model. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\UsageRecord + */ + public function createUsageRecord($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_items/%s/usage_records', $parentId), $params, $opts); + } + + /** + * Deletes an item from the subscription. Removing a subscription item from a + * subscription will not cancel the subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionItem + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } + + /** + * Retrieves the subscription item with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionItem + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } + + /** + * Updates the plan or quantity of an item on a current subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionItem + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php new file mode 100644 index 00000000000..9eed460604e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionScheduleService.php @@ -0,0 +1,113 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SubscriptionScheduleService extends \Stripe\Service\AbstractService +{ + /** + * Retrieves the list of your subscription schedules. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts); + } + + /** + * Cancels a subscription schedule and its associated subscription immediately (if + * the subscription schedule has an active subscription). A subscription schedule + * can only be canceled if its status is <code>not_started</code> or + * <code>active</code>. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionSchedule + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/cancel', $id), $params, $opts); + } + + /** + * Creates a new subscription schedule object. Each customer can have up to 500 + * active or scheduled subscriptions. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionSchedule + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscription_schedules', $params, $opts); + } + + /** + * Releases the subscription schedule immediately, which will stop scheduling of + * its phases, but leave any existing subscription in place. A schedule can only be + * released if its status is <code>not_started</code> or <code>active</code>. If + * the subscription schedule is currently associated with a subscription, releasing + * it will remove its <code>subscription</code> property and set the subscription’s + * ID to the <code>released_subscription</code> property. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionSchedule + */ + public function release($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/release', $id), $params, $opts); + } + + /** + * Retrieves the details of an existing subscription schedule. You only need to + * supply the unique subscription schedule identifier that was returned upon + * subscription schedule creation. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionSchedule + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); + } + + /** + * Updates an existing subscription schedule. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\SubscriptionSchedule + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionService.php b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionService.php new file mode 100644 index 00000000000..f3ac768c891 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/SubscriptionService.php @@ -0,0 +1,124 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class SubscriptionService extends \Stripe\Service\AbstractService +{ + /** + * By default, returns a list of subscriptions that have not been canceled. In + * order to list canceled subscriptions, specify <code>status=canceled</code>. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/subscriptions', $params, $opts); + } + + /** + * Cancels a customer’s subscription immediately. The customer will not be charged + * again for the subscription. + * + * Note, however, that any pending invoice items that you’ve created will still be + * charged for at the end of the period, unless manually <a + * href="#delete_invoiceitem">deleted</a>. If you’ve set the subscription to cancel + * at the end of the period, any pending prorations will also be left in place and + * collected at the end of the period. But if the subscription is set to cancel + * immediately, pending prorations will be removed. + * + * By default, upon subscription cancellation, Stripe will stop automatic + * collection of all finalized invoices for the customer. This is intended to + * prevent unexpected payment attempts after the customer has canceled a + * subscription. However, you can resume automatic collection of the invoices + * manually after subscription cancellation to have us proceed. Or, you could check + * for unpaid invoices before allowing the customer to cancel the subscription at + * all. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } + + /** + * Creates a new subscription on an existing customer. Each customer can have up to + * 500 active or scheduled subscriptions. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/subscriptions', $params, $opts); + } + + /** + * Removes the currently applied discount on a subscription. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription + */ + public function deleteDiscount($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/subscriptions/%s/discount', $id), $params, $opts); + } + + /** + * Retrieves the subscription with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } + + /** + * Updates an existing subscription on a customer to match the specified + * parameters. When changing plans or quantities, we will optionally prorate the + * price we charge next month to make up for any price changes. To preview how the + * proration will be calculated, use the <a href="#upcoming_invoice">upcoming + * invoice</a> endpoint. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/TaxRateService.php b/htdocs/includes/stripe/stripe-php/lib/Service/TaxRateService.php new file mode 100644 index 00000000000..7cee1fead7b --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/TaxRateService.php @@ -0,0 +1,71 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class TaxRateService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your tax rates. Tax rates are returned sorted by creation + * date, with the most recently created tax rates appearing first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/tax_rates', $params, $opts); + } + + /** + * Creates a new tax rate. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxRate + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/tax_rates', $params, $opts); + } + + /** + * Retrieves a tax rate with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxRate + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); + } + + /** + * Updates an existing tax rate. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TaxRate + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php new file mode 100644 index 00000000000..7b25b2315a0 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ConnectionTokenService.php @@ -0,0 +1,25 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Terminal; + +class ConnectionTokenService extends \Stripe\Service\AbstractService +{ + /** + * To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived + * connection token from Stripe, proxied through your server. On your backend, add + * an endpoint that creates and returns a connection token. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\ConnectionToken + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/connection_tokens', $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/LocationService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/LocationService.php new file mode 100644 index 00000000000..8adc7a520db --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/LocationService.php @@ -0,0 +1,87 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Terminal; + +class LocationService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of <code>Location</code> objects. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/terminal/locations', $params, $opts); + } + + /** + * Creates a new <code>Location</code> object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Location + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/locations', $params, $opts); + } + + /** + * Deletes a <code>Location</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Location + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } + + /** + * Retrieves a <code>Location</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Location + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } + + /** + * Updates a <code>Location</code> object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Location + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ReaderService.php b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ReaderService.php new file mode 100644 index 00000000000..765015c835f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/ReaderService.php @@ -0,0 +1,87 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Terminal; + +class ReaderService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of <code>Reader</code> objects. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/terminal/readers', $params, $opts); + } + + /** + * Creates a new <code>Reader</code> object. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Reader + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/terminal/readers', $params, $opts); + } + + /** + * Deletes a <code>Reader</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Reader + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } + + /** + * Retrieves a <code>Reader</code> object. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Reader + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } + + /** + * Updates a <code>Reader</code> object by setting the values of the parameters + * passed. Any parameters not provided will be left unchanged. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Terminal\Reader + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/terminal/readers/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php new file mode 100644 index 00000000000..c70ac873bc4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php @@ -0,0 +1,29 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service\Terminal; + +/** + * Service factory class for API resources in the Terminal namespace. + * + * @property ConnectionTokenService $connectionTokens + * @property LocationService $locations + * @property ReaderService $readers + */ +class TerminalServiceFactory extends \Stripe\Service\AbstractServiceFactory +{ + /** + * @var array<string, string> + */ + private static $classMap = [ + 'connectionTokens' => ConnectionTokenService::class, + 'locations' => LocationService::class, + 'readers' => ReaderService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/TokenService.php b/htdocs/includes/stripe/stripe-php/lib/Service/TokenService.php new file mode 100644 index 00000000000..1c72759f64f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/TokenService.php @@ -0,0 +1,42 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class TokenService extends \Stripe\Service\AbstractService +{ + /** + * Creates a single-use token that represents a bank account’s details. This token + * can be used with any API method in place of a bank account dictionary. This + * token can be used only once, by attaching it to a <a href="#accounts">Custom + * account</a>. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Token + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/tokens', $params, $opts); + } + + /** + * Retrieves the token with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Token + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/tokens/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/TopupService.php b/htdocs/includes/stripe/stripe-php/lib/Service/TopupService.php new file mode 100644 index 00000000000..059dc209064 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/TopupService.php @@ -0,0 +1,89 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class TopupService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of top-ups. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/topups', $params, $opts); + } + + /** + * Cancels a top-up. Only pending top-ups can be canceled. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Topup + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/topups/%s/cancel', $id), $params, $opts); + } + + /** + * Top up the balance of an account. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Topup + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/topups', $params, $opts); + } + + /** + * Retrieves the details of a top-up that has previously been created. Supply the + * unique top-up ID that was returned from your previous request, and Stripe will + * return the corresponding top-up information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Topup + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/topups/%s', $id), $params, $opts); + } + + /** + * Updates the metadata of a top-up. Other top-up details are not editable by + * design. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Topup + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/topups/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/TransferService.php b/htdocs/includes/stripe/stripe-php/lib/Service/TransferService.php new file mode 100644 index 00000000000..150bbf7313e --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/TransferService.php @@ -0,0 +1,175 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class TransferService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of existing transfers sent to connected accounts. The transfers + * are returned in sorted order, with the most recently created transfers appearing + * first. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/transfers', $params, $opts); + } + + /** + * You can see a list of the reversals belonging to a specific transfer. Note that + * the 10 most recent reversals are always available by default on the transfer + * object. If you need more than those 10, you can use this API method and the + * <code>limit</code> and <code>starting_after</code> parameters to page through + * additional reversals. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function allReversals($parentId, $params = null, $opts = null) + { + return $this->requestCollection('get', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts); + } + + /** + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Transfer + */ + public function cancel($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/cancel', $id), $params, $opts); + } + + /** + * To send funds from your Stripe account to a connected account, you create a new + * transfer object. Your <a href="#balance">Stripe balance</a> must be able to + * cover the transfer amount, or you’ll receive an “Insufficient Funds” error. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Transfer + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/transfers', $params, $opts); + } + + /** + * When you create a new reversal, you must specify a transfer to create it on. + * + * When reversing transfers, you can optionally reverse part of the transfer. You + * can do so as many times as you wish until the entire transfer has been reversed. + * + * Once entirely reversed, a transfer can’t be reversed again. This method will + * return an error when called on an already-reversed transfer, or when trying to + * reverse more money than is left on a transfer. + * + * @param string $parentId + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal + */ + public function createReversal($parentId, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals', $parentId), $params, $opts); + } + + /** + * Retrieves the details of an existing transfer. Supply the unique transfer ID + * from either a transfer creation request or the transfer list, and Stripe will + * return the corresponding transfer information. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Transfer + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/transfers/%s', $id), $params, $opts); + } + + /** + * By default, you can see the 10 most recent reversals stored directly on the + * transfer object, but you can also retrieve details about a specific reversal + * stored on the transfer. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal + */ + public function retrieveReversal($parentId, $id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts); + } + + /** + * Updates the specified transfer by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. + * + * This request accepts only metadata as an argument. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Transfer + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s', $id), $params, $opts); + } + + /** + * Updates the specified reversal by setting the values of the parameters passed. + * Any parameters not provided will be left unchanged. + * + * This request only accepts metadata and description as arguments. + * + * @param string $parentId + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal + */ + public function updateReversal($parentId, $id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/transfers/%s/reversals/%s', $parentId, $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Service/WebhookEndpointService.php b/htdocs/includes/stripe/stripe-php/lib/Service/WebhookEndpointService.php new file mode 100644 index 00000000000..01e642249b6 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Service/WebhookEndpointService.php @@ -0,0 +1,97 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Service; + +class WebhookEndpointService extends \Stripe\Service\AbstractService +{ + /** + * Returns a list of your webhook endpoints. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/webhook_endpoints', $params, $opts); + } + + /** + * A webhook endpoint must have a <code>url</code> and a list of + * <code>enabled_events</code>. You may optionally specify the Boolean + * <code>connect</code> parameter. If set to true, then a Connect webhook endpoint + * that notifies the specified <code>url</code> about events from all connected + * accounts is created; otherwise an account webhook endpoint that notifies the + * specified <code>url</code> only about events from your account is created. You + * can also create webhook endpoints in the <a + * href="https://dashboard.stripe.com/account/webhooks">webhooks settings</a> + * section of the Dashboard. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\WebhookEndpoint + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/webhook_endpoints', $params, $opts); + } + + /** + * You can also delete webhook endpoints via the <a + * href="https://dashboard.stripe.com/account/webhooks">webhook endpoint + * management</a> page of the Stripe dashboard. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\WebhookEndpoint + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } + + /** + * Retrieves the webhook endpoint with the given ID. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\WebhookEndpoint + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } + + /** + * Updates the webhook endpoint. You may edit the <code>url</code>, the list of + * <code>enabled_events</code>, and the status of your endpoint. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\WebhookEndpoint + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/SetupAttempt.php b/htdocs/includes/stripe/stripe-php/lib/SetupAttempt.php new file mode 100644 index 00000000000..6c83b686c6c --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/SetupAttempt.php @@ -0,0 +1,32 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * A SetupAttempt describes one attempted confirmation of a SetupIntent, whether + * that confirmation was successful or unsuccessful. You can use SetupAttempts to + * inspect details of a specific attempt at setting up a payment method using a + * SetupIntent. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\Stripe\StripeObject $application The value of <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application">application</a> on the SetupIntent at the time of this confirmation. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customer The value of <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer">customer</a> on the SetupIntent at the time of this confirmation. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string|\Stripe\Account $on_behalf_of The value of <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of">on_behalf_of</a> on the SetupIntent at the time of this confirmation. + * @property string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupAttempt. + * @property \Stripe\StripeObject $payment_method_details + * @property null|\Stripe\ErrorObject $setup_error The error encountered during this attempt to confirm the SetupIntent, if any. + * @property string|\Stripe\SetupIntent $setup_intent ID of the SetupIntent that this attempt belongs to. + * @property string $status Status of this SetupAttempt, one of <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>succeeded</code>, <code>failed</code>, or <code>abandoned</code>. + * @property string $usage The value of <a href="https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage">usage</a> on the SetupIntent at the time of this confirmation, one of <code>off_session</code> or <code>on_session</code>. + */ +class SetupAttempt extends ApiResource +{ + const OBJECT_NAME = 'setup_attempt'; + + use ApiOperations\All; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php b/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php index 176a411b67f..bf8da19cf6d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php +++ b/htdocs/includes/stripe/stripe-php/lib/SetupIntent.php @@ -1,74 +1,114 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class SetupIntent + * A SetupIntent guides you through the process of setting up and saving a + * customer's payment credentials for future payments. For example, you could use a + * SetupIntent to set up and save your customer's card without immediately + * collecting a payment. Later, you can use <a + * href="https://stripe.com/docs/api#payment_intents">PaymentIntents</a> to drive + * the payment flow. * - * @property string $id - * @property string $object - * @property string $application - * @property string $client_secret - * @property int $created - * @property string $customer - * @property string $description - * @property mixed $last_setup_error - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $next_action - * @property string $on_behalf_of - * @property string $payment_method - * @property string[] $payment_method_types - * @property string $status + * Create a SetupIntent as soon as you're ready to collect your customer's payment + * credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no + * longer be valid. The SetupIntent then transitions through multiple <a + * href="https://stripe.com/docs/payments/intents#intent-statuses">statuses</a> as + * it guides you through the setup process. * - * @package Stripe + * Successful SetupIntents result in payment credentials that are optimized for + * future payments. For example, cardholders in <a + * href="/guides/strong-customer-authentication">certain regions</a> may need to be + * run through <a + * href="https://stripe.com/docs/strong-customer-authentication">Strong Customer + * Authentication</a> at the time of payment method collection in order to + * streamline later <a + * href="https://stripe.com/docs/payments/setup-intents">off-session payments</a>. + * If the SetupIntent is used with a <a + * href="https://stripe.com/docs/api#setup_intent_object-customer">Customer</a>, + * upon success, it will automatically attach the resulting payment method to that + * Customer. We recommend using SetupIntents or <a + * href="https://stripe.com/docs/api#payment_intent_object-setup_future_usage">setup_future_usage</a> + * on PaymentIntents to save payment methods in order to prevent saving invalid or + * unoptimized payment methods. + * + * By using SetupIntents, you ensure that your customers experience the minimum set + * of required friction, even as regulations change over time. + * + * Related guide: <a href="https://stripe.com/docs/payments/setup-intents">Setup + * Intents API</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent. + * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one of <code>abandoned</code>, <code>requested_by_customer</code>, or <code>duplicate</code>. + * @property null|string $client_secret <p>The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.</p><p>The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.</p> + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customer <p>ID of the Customer this SetupIntent belongs to, if one exists.</p><p>If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.</p> + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|\Stripe\ErrorObject $last_setup_error The error encountered in the previous SetupIntent confirmation. + * @property null|string|\Stripe\SetupAttempt $latest_attempt The most recent SetupAttempt for this SetupIntent. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string|\Stripe\Mandate $mandate ID of the multi use Mandate generated by the SetupIntent. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended. + * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent. + * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this SetupIntent. + * @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + * @property null|string|\Stripe\Mandate $single_use_mandate ID of the single_use Mandate generated by the SetupIntent. + * @property string $status <a href="https://stripe.com/docs/payments/intents#intent-statuses">Status</a> of this SetupIntent, one of <code>requires_payment_method</code>, <code>requires_confirmation</code>, <code>requires_action</code>, <code>processing</code>, <code>canceled</code>, or <code>succeeded</code>. + * @property string $usage <p>Indicates how the payment method is intended to be used in the future.</p><p>Use <code>on_session</code> if you intend to only reuse the payment method when the customer is in your checkout flow. Use <code>off_session</code> if your customer may or may not be in your checkout flow. If not provided, this value defaults to <code>off_session</code>.</p> */ class SetupIntent extends ApiResource { - const OBJECT_NAME = "setup_intent"; + const OBJECT_NAME = 'setup_intent'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * These constants are possible representations of the status field. - * - * @link https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status - */ - const STATUS_CANCELED = 'canceled'; - const STATUS_PROCESSING = 'processing'; - const STATUS_REQUIRES_ACTION = 'requires_action'; - const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; + const STATUS_CANCELED = 'canceled'; + const STATUS_PROCESSING = 'processing'; + const STATUS_REQUIRES_ACTION = 'requires_action'; + const STATUS_REQUIRES_CONFIRMATION = 'requires_confirmation'; const STATUS_REQUIRES_PAYMENT_METHOD = 'requires_payment_method'; - const STATUS_SUCCEEDED = 'succeeded'; + const STATUS_SUCCEEDED = 'succeeded'; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return SetupIntent The canceled setup intent. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return SetupIntent the canceled setup intent */ - public function cancel($params = null, $options = null) + public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return SetupIntent The confirmed setup intent. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return SetupIntent the confirmed setup intent */ - public function confirm($params = null, $options = null) + public function confirm($params = null, $opts = null) { $url = $this->instanceUrl() . '/confirm'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php b/htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php index 4d97bf7ce28..b109dde70b7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php +++ b/htdocs/includes/stripe/stripe-php/lib/Sigma/ScheduledQueryRun.php @@ -1,33 +1,37 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Sigma; /** - * Class Authorization + * If you have <a href="https://stripe.com/docs/sigma/scheduled-queries">scheduled + * a Sigma query</a>, you'll receive a + * <code>sigma.scheduled_query_run.created</code> webhook each time the query runs. + * The webhook contains a <code>ScheduledQueryRun</code> object, which you can use + * to retrieve the query results. * - * @property string $id - * @property string $object - * @property int $created - * @property int $data_load_time - * @property string $error - * @property \Stripe\FileUpload $file - * @property bool $livemode - * @property int $result_available_until - * @property string $sql - * @property string $status - * @property string $title - * - * @package Stripe\Sigma + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $data_load_time When the query was run, Sigma contained a snapshot of your Stripe data at this time. + * @property \Stripe\StripeObject $error + * @property null|\Stripe\File $file The file object representing the results of the query. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property int $result_available_until Time at which the result expires and is no longer available for download. + * @property string $sql SQL for the query. + * @property string $status The query's execution status, which will be <code>completed</code> for successful runs, and <code>canceled</code>, <code>failed</code>, or <code>timed_out</code> otherwise. + * @property string $title Title of the query. */ class ScheduledQueryRun extends \Stripe\ApiResource { - const OBJECT_NAME = "scheduled_query_run"; + const OBJECT_NAME = 'scheduled_query_run'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Retrieve; public static function classUrl() { - return "/v1/sigma/scheduled_query_runs"; + return '/v1/sigma/scheduled_query_runs'; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php b/htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php index 26a78bf3e22..704cff874bb 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php +++ b/htdocs/includes/stripe/stripe-php/lib/SingletonApiResource.php @@ -3,9 +3,7 @@ namespace Stripe; /** - * Class SingletonApiResource - * - * @package Stripe + * Class SingletonApiResource. */ abstract class SingletonApiResource extends ApiResource { @@ -14,22 +12,24 @@ abstract class SingletonApiResource extends ApiResource $opts = Util\RequestOptions::parse($options); $instance = new static(null, $opts); $instance->refresh(); + return $instance; } /** - * @return string The endpoint associated with this singleton class. + * @return string the endpoint associated with this singleton class */ public static function classUrl() { // Replace dots with slashes for namespaced resources, e.g. if the object's name is // "foo.bar", then its URL will be "/v1/foo/bar". - $base = str_replace('.', '/', static::OBJECT_NAME); - return "/v1/${base}"; + $base = \str_replace('.', '/', static::OBJECT_NAME); + + return "/v1/{$base}"; } /** - * @return string The endpoint associated with this singleton API resource. + * @return string the endpoint associated with this singleton API resource */ public function instanceUrl() { diff --git a/htdocs/includes/stripe/stripe-php/lib/Source.php b/htdocs/includes/stripe/stripe-php/lib/Source.php index ec5cc42127e..2262e71d42f 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Source.php +++ b/htdocs/includes/stripe/stripe-php/lib/Source.php @@ -1,153 +1,168 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Source + * <code>Source</code> objects allow you to accept a variety of payment methods. + * They represent a customer's payment instrument, and can be used with the Stripe + * API just like a <code>Card</code> object: once chargeable, they can be charged, + * or can be attached to customers. * - * @property string $id - * @property string $object - * @property mixed $ach_credit_transfer - * @property mixed $ach_debit - * @property mixed $alipay - * @property int $amount - * @property mixed $bancontact - * @property mixed $card - * @property mixed $card_present - * @property string $client_secret - * @property mixed $code_verification - * @property int $created - * @property string $currency - * @property string $customer - * @property mixed $eps - * @property string $flow - * @property mixed $giropay - * @property mixed $ideal - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $multibanco - * @property mixed $owner - * @property mixed $p24 - * @property mixed $receiver - * @property mixed $redirect - * @property mixed $sepa_debit - * @property mixed $sofort - * @property string $statement_descriptor - * @property string $status - * @property mixed $three_d_secure - * @property string $type - * @property string $usage - * @property mixed $wechat - - * @package Stripe + * Related guides: <a href="https://stripe.com/docs/sources">Sources API</a> and <a + * href="https://stripe.com/docs/sources/customers">Sources &amp; Customers</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $ach_credit_transfer + * @property \Stripe\StripeObject $ach_debit + * @property \Stripe\StripeObject $acss_debit + * @property \Stripe\StripeObject $alipay + * @property null|int $amount A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for <code>single_use</code> sources. + * @property \Stripe\StripeObject $au_becs_debit + * @property \Stripe\StripeObject $bancontact + * @property \Stripe\StripeObject $card + * @property \Stripe\StripeObject $card_present + * @property string $client_secret The client secret of the source. Used for client-side retrieval using a publishable key. + * @property \Stripe\StripeObject $code_verification + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> associated with the source. This is the currency for which the source will be chargeable once ready. Required for <code>single_use</code> sources. + * @property string $customer The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + * @property \Stripe\StripeObject $eps + * @property string $flow The authentication <code>flow</code> of the source. <code>flow</code> is one of <code>redirect</code>, <code>receiver</code>, <code>code_verification</code>, <code>none</code>. + * @property \Stripe\StripeObject $giropay + * @property \Stripe\StripeObject $ideal + * @property \Stripe\StripeObject $klarna + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject $multibanco + * @property null|\Stripe\StripeObject $owner Information about the owner of the payment instrument that may be used or required by particular source types. + * @property \Stripe\StripeObject $p24 + * @property \Stripe\StripeObject $receiver + * @property \Stripe\StripeObject $redirect + * @property \Stripe\StripeObject $sepa_credit_transfer + * @property \Stripe\StripeObject $sepa_debit + * @property \Stripe\StripeObject $sofort + * @property \Stripe\StripeObject $source_order + * @property null|string $statement_descriptor Extra information about a source. This will appear on your customer's statement every time you charge the source. + * @property string $status The status of the source, one of <code>canceled</code>, <code>chargeable</code>, <code>consumed</code>, <code>failed</code>, or <code>pending</code>. Only <code>chargeable</code> sources can be used to create a charge. + * @property \Stripe\StripeObject $three_d_secure + * @property string $type The <code>type</code> of the source. The <code>type</code> is a payment method, one of <code>ach_credit_transfer</code>, <code>ach_debit</code>, <code>alipay</code>, <code>bancontact</code>, <code>card</code>, <code>card_present</code>, <code>eps</code>, <code>giropay</code>, <code>ideal</code>, <code>multibanco</code>, <code>klarna</code>, <code>p24</code>, <code>sepa_debit</code>, <code>sofort</code>, <code>three_d_secure</code>, or <code>wechat</code>. An additional hash is included on the source with a name matching this value. It contains additional information specific to the <a href="https://stripe.com/docs/sources">payment method</a> used. + * @property null|string $usage Either <code>reusable</code> or <code>single_use</code>. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + * @property \Stripe\StripeObject $wechat */ class Source extends ApiResource { - const OBJECT_NAME = "source"; + const OBJECT_NAME = 'source'; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of source flows. - * @link https://stripe.com/docs/api#source_object-flow - */ - const FLOW_REDIRECT = 'redirect'; - const FLOW_RECEIVER = 'receiver'; const FLOW_CODE_VERIFICATION = 'code_verification'; - const FLOW_NONE = 'none'; + const FLOW_NONE = 'none'; + const FLOW_RECEIVER = 'receiver'; + const FLOW_REDIRECT = 'redirect'; - /** - * Possible string representations of source statuses. - * @link https://stripe.com/docs/api#source_object-status - */ - const STATUS_CANCELED = 'canceled'; + const STATUS_CANCELED = 'canceled'; const STATUS_CHARGEABLE = 'chargeable'; - const STATUS_CONSUMED = 'consumed'; - const STATUS_FAILED = 'failed'; - const STATUS_PENDING = 'pending'; + const STATUS_CONSUMED = 'consumed'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; - /** - * Possible string representations of source usage. - * @link https://stripe.com/docs/api#source_object-usage - */ - const USAGE_REUSABLE = 'reusable'; + const USAGE_REUSABLE = 'reusable'; const USAGE_SINGLE_USE = 'single_use'; + use ApiOperations\NestedResource; + /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Source The detached source. + * @throws \Stripe\Exception\UnexpectedValueException if the source is not attached to a customer + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Source the detached source */ - public function detach($params = null, $options = null) + public function detach($params = null, $opts = null) { self::_validateParams($params); $id = $this['id']; if (!$id) { - $class = get_class($this); - $msg = "Could not determine which URL to request: $class instance " - . "has invalid ID: $id"; - throw new Error\InvalidRequest($msg, null); + $class = static::class; + $msg = "Could not determine which URL to request: {$class} instance " + . "has invalid ID: {$id}"; + + throw new Exception\UnexpectedValueException($msg, null); } if ($this['customer']) { $base = Customer::classUrl(); - $parentExtn = urlencode(Util\Util::utf8($this['customer'])); - $extn = urlencode(Util\Util::utf8($id)); - $url = "$base/$parentExtn/sources/$extn"; + $parentExtn = \urlencode(Util\Util::utf8($this['customer'])); + $extn = \urlencode(Util\Util::utf8($id)); + $url = "{$base}/{$parentExtn}/sources/{$extn}"; - list($response, $opts) = $this->_request('delete', $url, $params, $options); + list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; - } else { - $message = "This source object does not appear to be currently attached " - . "to a customer object."; - throw new Error\Api($message); } + $message = 'This source object does not appear to be currently attached ' + . 'to a customer object.'; + + throw new Exception\UnexpectedValueException($message); } /** - * @param array|null $params - * @param array|string|null $options + * @deprecated sourceTransactions is deprecated. Please use Source::allSourceTransactions instead. * - * @return Source The detached source. + * @param null|array $params + * @param null|array|string $opts * - * @deprecated Use the `detach` method instead. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of source transactions */ - public function delete($params = null, $options = null) - { - $this->detach($params, $options); - } - - /** - * @param array|null $params - * @param array|string|null $options - * - * @return Collection The list of source transactions. - */ - public function sourceTransactions($params = null, $options = null) + public function sourceTransactions($params = null, $opts = null) { $url = $this->instanceUrl() . '/source_transactions'; - list($response, $opts) = $this->_request('get', $url, $params, $options); - $obj = Util\Util::convertToStripeObject($response, $opts); + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); $obj->setLastResponse($response); + return $obj; } /** - * @param array|null $params - * @param array|string|null $options + * @param string $id + * @param null|array $params + * @param null|array|string $opts * - * @return Source The verified source. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of source transactions */ - public function verify($params = null, $options = null) + public static function allSourceTransactions($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, '/source_transactions', $params, $opts); + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Source the verified source + */ + public function verify($params = null, $opts = null) { $url = $this->instanceUrl() . '/verify'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php b/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php index d004032c569..281f2a710b2 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php +++ b/htdocs/includes/stripe/stripe-php/lib/SourceTransaction.php @@ -3,20 +3,18 @@ namespace Stripe; /** - * Class SourceTransaction + * Class SourceTransaction. * * @property string $id * @property string $object + * @property \Stripe\StripeObject $ach_credit_transfer * @property int $amount * @property int $created * @property string $customer_data * @property string $currency * @property string $type - * @property mixed $ach_credit_transfer - * - * @package Stripe */ class SourceTransaction extends ApiResource { - const OBJECT_NAME = "source_transaction"; + const OBJECT_NAME = 'source_transaction'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Stripe.php b/htdocs/includes/stripe/stripe-php/lib/Stripe.php index 0b533e0eb5c..22e5db49904 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Stripe.php +++ b/htdocs/includes/stripe/stripe-php/lib/Stripe.php @@ -3,62 +3,65 @@ namespace Stripe; /** - * Class Stripe - * - * @package Stripe + * Class Stripe. */ class Stripe { - // @var string The Stripe API key to be used for requests. + /** @var string The Stripe API key to be used for requests. */ public static $apiKey; - // @var string The Stripe client_id to be used for Connect requests. + /** @var string The Stripe client_id to be used for Connect requests. */ public static $clientId; - // @var string The base URL for the Stripe API. + /** @var string The base URL for the Stripe API. */ public static $apiBase = 'https://api.stripe.com'; - // @var string The base URL for the OAuth API. + /** @var string The base URL for the OAuth API. */ public static $connectBase = 'https://connect.stripe.com'; - // @var string The base URL for the Stripe API uploads endpoint. + /** @var string The base URL for the Stripe API uploads endpoint. */ public static $apiUploadBase = 'https://files.stripe.com'; - // @var string|null The version of the Stripe API to use for requests. + /** @var null|string The version of the Stripe API to use for requests. */ public static $apiVersion = null; - // @var string|null The account ID for connected accounts requests. + /** @var null|string The account ID for connected accounts requests. */ public static $accountId = null; - // @var string Path to the CA bundle used to verify SSL certificates + /** @var string Path to the CA bundle used to verify SSL certificates */ public static $caBundlePath = null; - // @var boolean Defaults to true. + /** @var bool Defaults to true. */ public static $verifySslCerts = true; - // @var array The application's information (name, version, URL) + /** @var array The application's information (name, version, URL) */ public static $appInfo = null; - // @var Util\LoggerInterface|null The logger to which the library will - // produce messages. + /** + * @var null|Util\LoggerInterface the logger to which the library will + * produce messages + */ public static $logger = null; - // @var int Maximum number of request retries + /** @var int Maximum number of request retries */ public static $maxNetworkRetries = 0; - // @var boolean Whether client telemetry is enabled. Defaults to true. + /** @var bool Whether client telemetry is enabled. Defaults to true. */ public static $enableTelemetry = true; - // @var float Maximum delay between retries, in seconds + /** @var float Maximum delay between retries, in seconds */ private static $maxNetworkRetryDelay = 2.0; - // @var float Initial delay between retries, in seconds + /** @var float Maximum delay between retries, in seconds, that will be respected from the Stripe API */ + private static $maxRetryAfter = 60.0; + + /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '6.43.1'; + const VERSION = '7.67.0'; /** - * @return string The API key used for requests. + * @return string the API key used for requests */ public static function getApiKey() { @@ -66,7 +69,7 @@ class Stripe } /** - * @return string The client_id used for Connect requests. + * @return string the client_id used for Connect requests */ public static function getClientId() { @@ -74,20 +77,21 @@ class Stripe } /** - * @return Util\LoggerInterface The logger to which the library will - * produce messages. + * @return Util\LoggerInterface the logger to which the library will + * produce messages */ public static function getLogger() { - if (self::$logger == null) { + if (null === self::$logger) { return new Util\DefaultLogger(); } + return self::$logger; } /** - * @param Util\LoggerInterface $logger The logger to which the library - * will produce messages. + * @param Util\LoggerInterface $logger the logger to which the library + * will produce messages */ public static function setLogger($logger) { @@ -124,7 +128,7 @@ class Stripe } /** - * @param string $apiVersion The API version to use for requests. + * @param string $apiVersion the API version to use for requests */ public static function setApiVersion($apiVersion) { @@ -136,7 +140,7 @@ class Stripe */ private static function getDefaultCABundlePath() { - return realpath(dirname(__FILE__) . '/../data/ca-certificates.crt'); + return \realpath(__DIR__ . '/../data/ca-certificates.crt'); } /** @@ -156,7 +160,7 @@ class Stripe } /** - * @return boolean + * @return bool */ public static function getVerifySslCerts() { @@ -164,7 +168,7 @@ class Stripe } /** - * @param boolean $verify + * @param bool $verify */ public static function setVerifySslCerts($verify) { @@ -173,7 +177,7 @@ class Stripe /** * @return string | null The Stripe account ID for connected account - * requests. + * requests */ public static function getAccountId() { @@ -181,8 +185,8 @@ class Stripe } /** - * @param string $accountId The Stripe account ID to set for connected - * account requests. + * @param string $accountId the Stripe account ID to set for connected + * account requests */ public static function setAccountId($accountId) { @@ -199,8 +203,9 @@ class Stripe /** * @param string $appName The application's name - * @param string $appVersion The application's version - * @param string $appUrl The application's URL + * @param null|string $appVersion The application's version + * @param null|string $appUrl The application's URL + * @param null|string $appPartnerId The application's partner ID */ public static function setAppInfo($appName, $appVersion = null, $appUrl = null, $appPartnerId = null) { @@ -235,6 +240,14 @@ class Stripe return self::$maxNetworkRetryDelay; } + /** + * @return float Maximum delay between retries, in seconds, that will be respected from the Stripe API + */ + public static function getMaxRetryAfter() + { + return self::$maxRetryAfter; + } + /** * @return float Initial delay between retries, in seconds */ diff --git a/htdocs/includes/stripe/stripe-php/lib/StripeClient.php b/htdocs/includes/stripe/stripe-php/lib/StripeClient.php new file mode 100644 index 00000000000..661483c5b9d --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/StripeClient.php @@ -0,0 +1,77 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe; + +/** + * Client used to send requests to Stripe's API. + * + * @property \Stripe\Service\AccountLinkService $accountLinks + * @property \Stripe\Service\AccountService $accounts + * @property \Stripe\Service\ApplePayDomainService $applePayDomains + * @property \Stripe\Service\ApplicationFeeService $applicationFees + * @property \Stripe\Service\BalanceService $balance + * @property \Stripe\Service\BalanceTransactionService $balanceTransactions + * @property \Stripe\Service\BillingPortal\BillingPortalServiceFactory $billingPortal + * @property \Stripe\Service\ChargeService $charges + * @property \Stripe\Service\Checkout\CheckoutServiceFactory $checkout + * @property \Stripe\Service\CountrySpecService $countrySpecs + * @property \Stripe\Service\CouponService $coupons + * @property \Stripe\Service\CreditNoteService $creditNotes + * @property \Stripe\Service\CustomerService $customers + * @property \Stripe\Service\DisputeService $disputes + * @property \Stripe\Service\EphemeralKeyService $ephemeralKeys + * @property \Stripe\Service\EventService $events + * @property \Stripe\Service\ExchangeRateService $exchangeRates + * @property \Stripe\Service\FileLinkService $fileLinks + * @property \Stripe\Service\FileService $files + * @property \Stripe\Service\InvoiceItemService $invoiceItems + * @property \Stripe\Service\InvoiceService $invoices + * @property \Stripe\Service\Issuing\IssuingServiceFactory $issuing + * @property \Stripe\Service\MandateService $mandates + * @property \Stripe\Service\OAuthService $oauth + * @property \Stripe\Service\OrderReturnService $orderReturns + * @property \Stripe\Service\OrderService $orders + * @property \Stripe\Service\PaymentIntentService $paymentIntents + * @property \Stripe\Service\PaymentMethodService $paymentMethods + * @property \Stripe\Service\PayoutService $payouts + * @property \Stripe\Service\PlanService $plans + * @property \Stripe\Service\PriceService $prices + * @property \Stripe\Service\ProductService $products + * @property \Stripe\Service\PromotionCodeService $promotionCodes + * @property \Stripe\Service\Radar\RadarServiceFactory $radar + * @property \Stripe\Service\RefundService $refunds + * @property \Stripe\Service\Reporting\ReportingServiceFactory $reporting + * @property \Stripe\Service\ReviewService $reviews + * @property \Stripe\Service\SetupAttemptService $setupAttempts + * @property \Stripe\Service\SetupIntentService $setupIntents + * @property \Stripe\Service\Sigma\SigmaServiceFactory $sigma + * @property \Stripe\Service\SkuService $skus + * @property \Stripe\Service\SourceService $sources + * @property \Stripe\Service\SubscriptionItemService $subscriptionItems + * @property \Stripe\Service\SubscriptionScheduleService $subscriptionSchedules + * @property \Stripe\Service\SubscriptionService $subscriptions + * @property \Stripe\Service\TaxRateService $taxRates + * @property \Stripe\Service\Terminal\TerminalServiceFactory $terminal + * @property \Stripe\Service\TokenService $tokens + * @property \Stripe\Service\TopupService $topups + * @property \Stripe\Service\TransferService $transfers + * @property \Stripe\Service\WebhookEndpointService $webhookEndpoints + */ +class StripeClient extends BaseStripeClient +{ + /** + * @var \Stripe\Service\CoreServiceFactory + */ + private $coreServiceFactory; + + public function __get($name) + { + if (null === $this->coreServiceFactory) { + $this->coreServiceFactory = new \Stripe\Service\CoreServiceFactory($this); + } + + return $this->coreServiceFactory->__get($name); + } +} diff --git a/htdocs/includes/stripe/stripe-php/lib/StripeClientInterface.php b/htdocs/includes/stripe/stripe-php/lib/StripeClientInterface.php new file mode 100644 index 00000000000..adcef3f9aa7 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/StripeClientInterface.php @@ -0,0 +1,56 @@ +<?php + +namespace Stripe; + +/** + * Interface for a Stripe client. + */ +interface StripeClientInterface +{ + /** + * Gets the API key used by the client to send requests. + * + * @return null|string the API key used by the client to send requests + */ + public function getApiKey(); + + /** + * Gets the client ID used by the client in OAuth requests. + * + * @return null|string the client ID used by the client in OAuth requests + */ + public function getClientId(); + + /** + * Gets the base URL for Stripe's API. + * + * @return string the base URL for Stripe's API + */ + public function getApiBase(); + + /** + * Gets the base URL for Stripe's OAuth API. + * + * @return string the base URL for Stripe's OAuth API + */ + public function getConnectBase(); + + /** + * Gets the base URL for Stripe's Files API. + * + * @return string the base URL for Stripe's Files API + */ + public function getFilesBase(); + + /** + * Sends a request to Stripe's API. + * + * @param string $method the HTTP method + * @param string $path the path of the request + * @param array $params the parameters of the request + * @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request + * + * @return \Stripe\StripeObject the object returned by Stripe's API + */ + public function request($method, $path, $params, $opts); +} diff --git a/htdocs/includes/stripe/stripe-php/lib/StripeObject.php b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php index 62e02c0e0cc..eca01a00e90 100644 --- a/htdocs/includes/stripe/stripe-php/lib/StripeObject.php +++ b/htdocs/includes/stripe/stripe-php/lib/StripeObject.php @@ -3,18 +3,29 @@ namespace Stripe; /** - * Class StripeObject - * - * @package Stripe + * Class StripeObject. */ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable { + /** @var Util\RequestOptions */ protected $_opts; + + /** @var array */ protected $_originalValues; + + /** @var array */ protected $_values; + + /** @var Util\Set */ protected $_unsavedValues; + + /** @var Util\Set */ protected $_transientValues; + + /** @var null|array */ protected $_retrieveOptions; + + /** @var null|ApiResponse */ protected $_lastResponse; /** @@ -24,17 +35,19 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable public static function getPermanentAttributes() { static $permanentAttributes = null; - if ($permanentAttributes === null) { + if (null === $permanentAttributes) { $permanentAttributes = new Util\Set([ 'id', ]); } + return $permanentAttributes; } /** * Additive objects are subobjects in the API that don't have the same * semantics as most subobjects, which are fully replaced when they're set. + * * This is best illustrated by example. The `source` parameter sent when * updating a subscription is *not* additive; if we set it: * @@ -85,7 +98,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable public static function getAdditiveParams() { static $additiveParams = null; - if ($additiveParams === null) { + if (null === $additiveParams) { // Set `metadata` as additive so that when it's set directly we remember // to clear keys that may have been previously set by sending empty // values for them. @@ -96,6 +109,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable 'metadata', ]); } + return $additiveParams; } @@ -107,7 +121,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable $this->_values = []; $this->_unsavedValues = new Util\Set(); $this->_transientValues = new Util\Set(); - if ($id !== null) { + if (null !== $id) { $this->_values['id'] = $id; } } @@ -116,17 +130,17 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable public function __set($k, $v) { if (static::getPermanentAttributes()->includes($k)) { - throw new \InvalidArgumentException( - "Cannot set $k on this object. HINT: you can't set: " . - join(', ', static::getPermanentAttributes()->toArray()) + throw new Exception\InvalidArgumentException( + "Cannot set {$k} on this object. HINT: you can't set: " . + \implode(', ', static::getPermanentAttributes()->toArray()) ); } - if ($v === "") { - throw new \InvalidArgumentException( - 'You cannot set \''.$k.'\'to an empty string. ' - .'We interpret empty strings as NULL in requests. ' - .'You may set obj->'.$k.' = NULL to delete the property' + if ('' === $v) { + throw new Exception\InvalidArgumentException( + 'You cannot set \'' . $k . '\'to an empty string. ' + . 'We interpret empty strings as NULL in requests. ' + . 'You may set obj->' . $k . ' = NULL to delete the property' ); } @@ -151,24 +165,26 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable { // function should return a reference, using $nullval to return a reference to null $nullval = null; - if (!empty($this->_values) && array_key_exists($k, $this->_values)) { + if (!empty($this->_values) && \array_key_exists($k, $this->_values)) { return $this->_values[$k]; - } elseif (!empty($this->_transientValues) && $this->_transientValues->includes($k)) { - $class = get_class($this); - $attrs = join(', ', array_keys($this->_values)); - $message = "Stripe Notice: Undefined property of $class instance: $k. " - . "HINT: The $k attribute was set in the past, however. " - . "It was then wiped when refreshing the object " + } + if (!empty($this->_transientValues) && $this->_transientValues->includes($k)) { + $class = static::class; + $attrs = \implode(', ', \array_keys($this->_values)); + $message = "Stripe Notice: Undefined property of {$class} instance: {$k}. " + . "HINT: The {$k} attribute was set in the past, however. " + . 'It was then wiped when refreshing the object ' . "with the result returned by Stripe's API, " - . "probably as a result of a save(). The attributes currently " - . "available on this object are: $attrs"; + . 'probably as a result of a save(). The attributes currently ' + . "available on this object are: {$attrs}"; Stripe::getLogger()->error($message); - return $nullval; - } else { - $class = get_class($this); - Stripe::getLogger()->error("Stripe Notice: Undefined property of $class instance: $k"); + return $nullval; } + $class = static::class; + Stripe::getLogger()->error("Stripe Notice: Undefined property of {$class} instance: {$k}"); + + return $nullval; } // Magic method for var_dump output. Only works with PHP >= 5.6 @@ -180,52 +196,53 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // ArrayAccess methods public function offsetSet($k, $v) { - $this->$k = $v; + $this->{$k} = $v; } public function offsetExists($k) { - return array_key_exists($k, $this->_values); + return \array_key_exists($k, $this->_values); } public function offsetUnset($k) { - unset($this->$k); + unset($this->{$k}); } public function offsetGet($k) { - return array_key_exists($k, $this->_values) ? $this->_values[$k] : null; + return \array_key_exists($k, $this->_values) ? $this->_values[$k] : null; } // Countable method public function count() { - return count($this->_values); + return \count($this->_values); } public function keys() { - return array_keys($this->_values); + return \array_keys($this->_values); } public function values() { - return array_values($this->_values); + return \array_values($this->_values); } /** - * This unfortunately needs to be public to be used in Util\Util + * This unfortunately needs to be public to be used in Util\Util. * * @param array $values - * @param null|string|array|Util\RequestOptions $opts + * @param null|array|string|Util\RequestOptions $opts * - * @return static The object constructed from the given values. + * @return static the object constructed from the given values */ public static function constructFrom($values, $opts = null) { $obj = new static(isset($values['id']) ? $values['id'] : null); $obj->refreshFrom($values, $opts); + return $obj; } @@ -233,8 +250,8 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable * Refreshes this object using the provided values. * * @param array $values - * @param null|string|array|Util\RequestOptions $opts - * @param boolean $partial Defaults to false. + * @param null|array|string|Util\RequestOptions $opts + * @param bool $partial defaults to false */ public function refreshFrom($values, $opts, $partial = false) { @@ -243,7 +260,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable $this->_originalValues = self::deepCopy($values); if ($values instanceof StripeObject) { - $values = $values->__toArray(true); + $values = $values->toArray(); } // Wipe old state before setting new. This is useful for e.g. updating a @@ -252,11 +269,11 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable if ($partial) { $removed = new Util\Set(); } else { - $removed = new Util\Set(array_diff(array_keys($this->_values), array_keys($values))); + $removed = new Util\Set(\array_diff(\array_keys($this->_values), \array_keys($values))); } foreach ($removed->toArray() as $k) { - unset($this->$k); + unset($this->{$k}); } $this->updateAttributes($values, $opts, false); @@ -270,8 +287,8 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable * Mass assigns attributes on the model. * * @param array $values - * @param null|string|array|Util\RequestOptions $opts - * @param boolean $dirty Defaults to true. + * @param null|array|string|Util\RequestOptions $opts + * @param bool $dirty defaults to true */ public function updateAttributes($values, $opts = null, $dirty = true) { @@ -280,7 +297,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // This is necessary in case metadata is empty, as PHP arrays do // not differentiate between lists and hashes, and we consider // empty arrays to be lists. - if (($k === "metadata") && (is_array($v))) { + if (('metadata' === $k) && (\is_array($v))) { $this->_values[$k] = StripeObject::constructFrom($v, $opts); } else { $this->_values[$k] = Util\Util::convertToStripeObject($v, $opts); @@ -293,8 +310,10 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable } /** - * @return array A recursive mapping of attributes to values for this object, - * including the proper value for deleted attributes. + * @param bool $force defaults to false + * + * @return array a recursive mapping of attributes to values for this object, + * including the proper value for deleted attributes */ public function serializeParameters($force = false) { @@ -309,7 +328,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // 3. Its value is a StripeObject. A StripeObject may contain modified // values within in that its parent StripeObject doesn't know about. // - $original = array_key_exists($k, $this->_originalValues) ? $this->_originalValues[$k] : null; + $original = \array_key_exists($k, $this->_originalValues) ? $this->_originalValues[$k] : null; $unsaved = $this->_unsavedValues->includes($k); if ($force || $unsaved || $v instanceof StripeObject) { $updateParams[$k] = $this->serializeParamsValue( @@ -324,17 +343,14 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // a `null` that makes it out of `serializeParamsValue` signals an empty // value that we shouldn't appear in the serialized form of the object - $updateParams = array_filter( + return \array_filter( $updateParams, function ($v) { - return $v !== null; + return null !== $v; } ); - - return $updateParams; } - public function serializeParamsValue($value, $original, $unsaved, $force, $key = null) { // The logic here is that essentially any object embedded in another @@ -359,26 +375,29 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable // We throw an error if a property was set explicitly but we can't do // anything with it because the integration is probably not working as the // user intended it to. - if ($value === null) { - return ""; - } elseif (($value instanceof APIResource) && (!$value->saveWithParent)) { + if (null === $value) { + return ''; + } + if (($value instanceof ApiResource) && (!$value->saveWithParent)) { if (!$unsaved) { return null; - } elseif (isset($value->id)) { - return $value; - } else { - throw new \InvalidArgumentException( - "Cannot save property `$key` containing an API resource of type " . - get_class($value) . ". It doesn't appear to be persisted and is " . - "not marked as `saveWithParent`." - ); } - } elseif (is_array($value)) { + if (isset($value->id)) { + return $value; + } + + throw new Exception\InvalidArgumentException( + "Cannot save property `{$key}` containing an API resource of type " . + \get_class($value) . ". It doesn't appear to be persisted and is " . + 'not marked as `saveWithParent`.' + ); + } + if (\is_array($value)) { if (Util\Util::isList($value)) { // Sequential array, i.e. a list $update = []; foreach ($value as $v) { - array_push($update, $this->serializeParamsValue($v, null, true, $force)); + $update[] = $this->serializeParamsValue($v, null, true, $force); } // This prevents an array that's unchanged from being resent. if ($update !== $this->serializeParamsValue($original, null, true, $force, $key)) { @@ -391,8 +410,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable } elseif ($value instanceof StripeObject) { $update = $value->serializeParameters($force); if ($original && $unsaved && $key && static::getAdditiveParams()->includes($key)) { - $update = array_merge(self::emptyValues($original), $update); + $update = \array_merge(self::emptyValues($original), $update); } + return $update; } else { return $value; @@ -401,27 +421,55 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable public function jsonSerialize() { - return $this->__toArray(true); + return $this->toArray(); } - public function __toJSON() + /** + * Returns an associative array with the key and values composing the + * Stripe object. + * + * @return array the associative array + */ + public function toArray() { - return json_encode($this->__toArray(true), JSON_PRETTY_PRINT); + $maybeToArray = function ($value) { + if (null === $value) { + return null; + } + + return \is_object($value) && \method_exists($value, 'toArray') ? $value->toArray() : $value; + }; + + return \array_reduce(\array_keys($this->_values), function ($acc, $k) use ($maybeToArray) { + if ('_' === \substr((string) $k, 0, 1)) { + return $acc; + } + $v = $this->_values[$k]; + if (Util\Util::isList($v)) { + $acc[$k] = \array_map($maybeToArray, $v); + } else { + $acc[$k] = $maybeToArray($v); + } + + return $acc; + }, []); + } + + /** + * Returns a pretty JSON representation of the Stripe object. + * + * @return string the JSON representation of the Stripe object + */ + public function toJSON() + { + return \json_encode($this->toArray(), \JSON_PRETTY_PRINT); } public function __toString() { - $class = get_class($this); - return $class . ' JSON: ' . $this->__toJSON(); - } + $class = static::class; - public function __toArray($recursive = false) - { - if ($recursive) { - return Util\Util::convertStripeObjectToArray($this->_values); - } else { - return $this->_values; - } + return $class . ' JSON: ' . $this->toJSON(); } /** @@ -432,7 +480,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable */ public function dirty() { - $this->_unsavedValues = new Util\Set(array_keys($this->_values)); + $this->_unsavedValues = new Util\Set(\array_keys($this->_values)); foreach ($this->_values as $k => $v) { $this->dirtyValue($v); } @@ -440,7 +488,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable protected function dirtyValue($value) { - if (is_array($value)) { + if (\is_array($value)) { foreach ($value as $v) { $this->dirtyValue($v); } @@ -452,46 +500,52 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable /** * Produces a deep copy of the given object including support for arrays * and StripeObjects. + * + * @param mixed $obj */ protected static function deepCopy($obj) { - if (is_array($obj)) { + if (\is_array($obj)) { $copy = []; foreach ($obj as $k => $v) { $copy[$k] = self::deepCopy($v); } + return $copy; - } elseif ($obj instanceof StripeObject) { + } + if ($obj instanceof StripeObject) { return $obj::constructFrom( self::deepCopy($obj->_values), clone $obj->_opts ); - } else { - return $obj; } + + return $obj; } /** * Returns a hash of empty values for all the values that are in the given * StripeObject. + * + * @param mixed $obj */ public static function emptyValues($obj) { - if (is_array($obj)) { + if (\is_array($obj)) { $values = $obj; } elseif ($obj instanceof StripeObject) { $values = $obj->_values; } else { - throw new \InvalidArgumentException( - "empty_values got got unexpected object type: " . get_class($obj) + throw new Exception\InvalidArgumentException( + 'empty_values got unexpected object type: ' . \get_class($obj) ); } - $update = array_fill_keys(array_keys($values), ""); - return $update; + + return \array_fill_keys(\array_keys($values), ''); } /** - * @return object The last response from the Stripe API + * @return null|ApiResponse The last response from the Stripe API */ public function getLastResponse() { @@ -499,10 +553,9 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable } /** - * Sets the last response from the Stripe API + * Sets the last response from the Stripe API. * * @param ApiResponse $resp - * @return void */ public function setLastResponse($resp) { @@ -514,7 +567,7 @@ class StripeObject implements \ArrayAccess, \Countable, \JsonSerializable * Note that some, but not all, resources can indicate whether they have * been deleted. * - * @return bool Whether the resource is deleted. + * @return bool whether the resource is deleted */ public function isDeleted() { diff --git a/htdocs/includes/stripe/stripe-php/lib/Subscription.php b/htdocs/includes/stripe/stripe-php/lib/Subscription.php index a1087a56a4c..fcb55a31dee 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Subscription.php +++ b/htdocs/includes/stripe/stripe-php/lib/Subscription.php @@ -1,86 +1,98 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Subscription + * Subscriptions allow you to charge a customer on a recurring basis. * - * @property string $id - * @property string $object - * @property float $application_fee_percent - * @property string $billing - * @property int $billing_cycle_anchor - * @property mixed $billing_thresholds - * @property bool $cancel_at_period_end - * @property int $canceled_at - * @property string $collection_method - * @property int $created - * @property int $current_period_end - * @property int $current_period_start - * @property string $customer - * @property int $days_until_due - * @property string $default_payment_method - * @property string $default_source - * @property array $default_tax_rates - * @property Discount $discount - * @property int $ended_at - * @property Collection $items - * @property string $latest_invoice - * @property boolean $livemode - * @property StripeObject $metadata - * @property string $pending_setup_intent - * @property Plan $plan - * @property int $quantity - * @property SubscriptionSchedule $schedule - * @property int $start - * @property int $start_date - * @property string $status - * @property float $tax_percent - * @property int $trial_end - * @property int $trial_start + * Related guide: <a + * href="https://stripe.com/docs/billing/subscriptions/creating">Creating + * Subscriptions</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|float $application_fee_percent A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. + * @property int $billing_cycle_anchor Determines the date of the first full invoice, and, for plans with <code>month</code> or <code>year</code> intervals, the day of the month for subsequent invoices. + * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + * @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled + * @property bool $cancel_at_period_end If the subscription has been canceled with the <code>at_period_end</code> flag set to <code>true</code>, <code>cancel_at_period_end</code> on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. + * @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with <code>cancel_at_period_end</code>, <code>canceled_at</code> will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + * @property null|string $collection_method Either <code>charge_automatically</code>, or <code>send_invoice</code>. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. + * @property int $current_period_start Start of the current period that the subscription has been invoiced for. + * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription. + * @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be <code>null</code> for subscriptions where <code>collection_method=charge_automatically</code>. + * @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over <code>default_source</code>. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>. + * @property null|string|\Stripe\Account|\Stripe\AlipayAccount|\Stripe\BankAccount|\Stripe\BitcoinReceiver|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If <code>default_payment_method</code> is also set, <code>default_payment_method</code> will take precedence. If neither are set, invoices will use the customer's <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> or <a href="https://stripe.com/docs/api/customers/object#customer_object-default_source">default_source</a>. + * @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have <code>tax_rates</code> set. Invoices created will have their <code>default_tax_rates</code> populated from the subscription. + * @property null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. + * @property null|int $ended_at If the subscription has ended, the date the subscription ended. + * @property \Stripe\Collection $items List of subscription items, each with an attached price. + * @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at <code>pending_invoice_item_interval</code>. + * @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. + * @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling <a href="https://stripe.com/docs/api#create_invoice">Create an invoice</a> for the given subscription at the specified interval. + * @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this <a href="https://stripe.com/docs/api/setup_intents">SetupIntent</a> to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the <a href="https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2">SCA Migration Guide</a>. + * @property null|\Stripe\StripeObject $pending_update If specified, <a href="https://stripe.com/docs/billing/subscriptions/pending-updates">pending updates</a> that will be applied to the subscription once the <code>latest_invoice</code> has been paid. + * @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription + * @property int $start_date Date when the subscription was first created. The date might differ from the <code>created</code> date due to backdating. + * @property string $status <p>Possible values are <code>incomplete</code>, <code>incomplete_expired</code>, <code>trialing</code>, <code>active</code>, <code>past_due</code>, <code>canceled</code>, or <code>unpaid</code>.</p><p>For <code>collection_method=charge_automatically</code> a subscription moves into <code>incomplete</code> if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an <code>active</code> state. If the first invoice is not paid within 23 hours, the subscription transitions to <code>incomplete_expired</code>. This is a terminal state, the open invoice will be voided and no further invoices will be generated.</p><p>A subscription that is currently in a trial period is <code>trialing</code> and moves to <code>active</code> when the trial period is over.</p><p>If subscription <code>collection_method=charge_automatically</code> it becomes <code>past_due</code> when payment to renew it fails and <code>canceled</code> or <code>unpaid</code> (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.</p><p>If subscription <code>collection_method=send_invoice</code> it becomes <code>past_due</code> when its invoice is not paid by the due date, and <code>canceled</code> or <code>unpaid</code> if it is still not paid by an additional deadline after that. Note that when a subscription has a status of <code>unpaid</code>, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.</p> + * @property null|int $trial_end If the subscription has a trial, the end of that trial. + * @property null|int $trial_start If the subscription has a trial, the beginning of that trial. */ class Subscription extends ApiResource { - const OBJECT_NAME = "subscription"; + const OBJECT_NAME = 'subscription'; use ApiOperations\All; use ApiOperations\Create; - use ApiOperations\Delete { - delete as protected _delete; - } use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * These constants are possible representations of the status field. - * - * @link https://stripe.com/docs/api#subscription_object-status - */ - const STATUS_ACTIVE = 'active'; - const STATUS_CANCELED = 'canceled'; - const STATUS_PAST_DUE = 'past_due'; - const STATUS_TRIALING = 'trialing'; - const STATUS_UNPAID = 'unpaid'; - const STATUS_INCOMPLETE = 'incomplete'; + const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete'; + const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete'; + const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete'; + + const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice'; + const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations'; + const PRORATION_BEHAVIOR_NONE = 'none'; + + const STATUS_ACTIVE = 'active'; + const STATUS_CANCELED = 'canceled'; + const STATUS_INCOMPLETE = 'incomplete'; const STATUS_INCOMPLETE_EXPIRED = 'incomplete_expired'; + const STATUS_PAST_DUE = 'past_due'; + const STATUS_TRIALING = 'trialing'; + const STATUS_UNPAID = 'unpaid'; + + use ApiOperations\Delete { + delete as protected _delete; + } public static function getSavedNestedResources() { static $savedNestedResources = null; - if ($savedNestedResources === null) { + if (null === $savedNestedResources) { $savedNestedResources = new Util\Set([ 'source', ]); } + return $savedNestedResources; } /** - * @param array|null $params + * @param null|array $params + * @param null|array|string $opts * - * @return Subscription The deleted subscription. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription the deleted subscription */ public function cancel($params = null, $opts = null) { @@ -88,12 +100,17 @@ class Subscription extends ApiResource } /** - * @return Subscription The updated subscription. + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Subscription the updated subscription */ - public function deleteDiscount() + public function deleteDiscount($params = null, $opts = null) { $url = $this->instanceUrl() . '/discount'; - list($response, $opts) = $this->_request('delete', $url); + list($response, $opts) = $this->_request('delete', $url, $params, $opts); $this->refreshFrom(['discount' => null], $opts, true); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php b/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php index d0d2dea8fcf..5bd25b25200 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php +++ b/htdocs/includes/stripe/stripe-php/lib/SubscriptionItem.php @@ -1,27 +1,27 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class SubscriptionItem + * Subscription items allow you to create customer subscriptions with more than one + * plan, making it easy to represent complex billing relationships. * - * @property string $id - * @property string $object - * @property mixed $billing_thresholds - * @property int $created - * @property StripeObject $metadata - * @property Plan $plan - * @property int $quantity - * @property string $subscription - * @property array $tax_rates - * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\Plan $plan <p>You can now model subscriptions more flexibly using the <a href="https://stripe.com/docs/api#prices">Prices API</a>. It replaces the Plans API and is backwards compatible to simplify your migration.</p><p>Plans define the base price, currency, and billing cycle for recurring purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has plans for $10/month, $100/year, €9/month, and €90/year.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a> and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p> + * @property \Stripe\Price $price <p>Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. <a href="https://stripe.com/docs/api#products">Products</a> help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.</p><p>For example, you might have a single &quot;gold&quot; product that has prices for $10/month, $100/year, and €9 once.</p><p>Related guides: <a href="https://stripe.com/docs/billing/subscriptions/set-up-subscription">Set up a subscription</a>, <a href="https://stripe.com/docs/billing/invoices/create">create an invoice</a>, and more about <a href="https://stripe.com/docs/billing/prices-guide">products and prices</a>.</p> + * @property int $quantity The <a href="https://stripe.com/docs/subscriptions/quantities">quantity</a> of the plan to which the customer should be subscribed. + * @property string $subscription The <code>subscription</code> this <code>subscription_item</code> belongs to. + * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to this <code>subscription_item</code>. When set, the <code>default_tax_rates</code> on the subscription do not apply to this <code>subscription_item</code>. */ class SubscriptionItem extends ApiResource { - const OBJECT_NAME = "subscription_item"; - - const PATH_USAGE_RECORDS = '/usage_records'; + const OBJECT_NAME = 'subscription_item'; use ApiOperations\All; use ApiOperations\Create; @@ -30,12 +30,16 @@ class SubscriptionItem extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const PATH_USAGE_RECORDS = '/usage_records'; + /** - * @param string|null $id The ID of the subscription item on which to create the usage record. - * @param array|null $params - * @param array|string|null $opts + * @param null|string $id the ID of the subscription item on which to create the usage record + * @param null|array $params + * @param null|array|string $opts * - * @return ApiResource + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\UsageRecord */ public static function createUsageRecord($id, $params = null, $opts = null) { @@ -43,17 +47,38 @@ class SubscriptionItem extends ApiResource } /** - * @param array|null $params - * @param array|string|null $options + * @deprecated usageRecordSummaries is deprecated. Please use SubscriptionItem::allUsageRecordSummaries instead. * - * @return Collection The list of usage record summaries. + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of usage record summaries */ - public function usageRecordSummaries($params = null, $options = null) + public function usageRecordSummaries($params = null, $opts = null) { $url = $this->instanceUrl() . '/usage_record_summaries'; - list($response, $opts) = $this->_request('get', $url, $params, $options); - $obj = Util\Util::convertToStripeObject($response, $opts); + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); $obj->setLastResponse($response); + return $obj; } + + const PATH_USAGE_RECORD_SUMMARIES = '/usage_record_summaries'; + + /** + * @param string $id the ID of the subscription item on which to retrieve the usage record summaries + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of usage record summaries + */ + public static function allUsageRecordSummaries($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_USAGE_RECORD_SUMMARIES, $params, $opts); + } } diff --git a/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php b/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php index e41f279a036..0f1b1563024 100644 --- a/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php +++ b/htdocs/includes/stripe/stripe-php/lib/SubscriptionSchedule.php @@ -1,68 +1,74 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class SubscriptionSchedule + * A subscription schedule allows you to create and manage the lifecycle of a + * subscription by predefining expected changes. * - * @property string $id - * @property string $object - * @property string $billing - * @property mixed $billing_thresholds - * @property int $canceled_at - * @property int $completed_at - * @property int $created - * @property mixed $current_phase - * @property string $customer - * @property mixed $invoice_settings - * @property boolean $livemode - * @property StripeObject $metadata - * @property mixed $phases - * @property int $released_at - * @property string $released_subscription - * @property string $renewal_behavior - * @property mixed $renewal_interval - * @property string $revision - * @property string $status - * @property string $subscription + * Related guide: <a + * href="https://stripe.com/docs/billing/subscriptions/subscription-schedules">Subscription + * Schedules</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|int $canceled_at Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + * @property null|int $completed_at Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|\Stripe\StripeObject $current_phase Object representing the start and end dates for the current phase of the subscription schedule, if it is <code>active</code>. + * @property string|\Stripe\Customer $customer ID of the customer who owns the subscription schedule. + * @property \Stripe\StripeObject $default_settings + * @property string $end_behavior Behavior of the subscription schedule and underlying subscription when it ends. Possible values are <code>release</code> and <code>cancel</code>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject[] $phases Configuration for the subscription schedule's phases. + * @property null|int $released_at Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + * @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released). + * @property string $status The present status of the subscription schedule. Possible values are <code>not_started</code>, <code>active</code>, <code>completed</code>, <code>released</code>, and <code>canceled</code>. You can read more about the different states in our <a href="https://stripe.com/docs/billing/subscriptions/subscription-schedules">behavior guide</a>. + * @property null|string|\Stripe\Subscription $subscription ID of the subscription managed by the subscription schedule. */ class SubscriptionSchedule extends ApiResource { - const OBJECT_NAME = "subscription_schedule"; + const OBJECT_NAME = 'subscription_schedule'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - use ApiOperations\NestedResource; /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return SubscriptionSchedule The canceled subscription schedule. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return SubscriptionSchedule the canceled subscription schedule */ public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } /** - * @param array|null $params - * @param array|string|null $opts + * @param null|array $params + * @param null|array|string $opts * - * @return SubscriptionSchedule The released subscription schedule. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return SubscriptionSchedule the released subscription schedule */ public function release($params = null, $opts = null) { $url = $this->instanceUrl() . '/release'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/TaxId.php b/htdocs/includes/stripe/stripe-php/lib/TaxId.php index 8d607132e6e..d4188fe4045 100644 --- a/htdocs/includes/stripe/stripe-php/lib/TaxId.php +++ b/htdocs/includes/stripe/stripe-php/lib/TaxId.php @@ -1,80 +1,106 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class TaxId + * You can add one or multiple tax IDs to a <a + * href="https://stripe.com/docs/api/customers">customer</a>. A customer's tax IDs + * are displayed on invoices and credit notes issued for the customer. * - * @package Stripe + * Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-ids">Customer + * Tax Identification Numbers</a>. * - * @property string $id - * @property string $object - * @property string $country - * @property int $created - * @property string $customer - * @property bool $livemode - * @property string $type - * @property string $value - * @property mixed $verification + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $country Two-letter ISO code representing the country of the tax ID. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string|\Stripe\Customer $customer ID of the customer. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property string $type Type of the tax ID, one of <code>ae_trn</code>, <code>au_abn</code>, <code>br_cnpj</code>, <code>br_cpf</code>, <code>ca_bn</code>, <code>ca_qst</code>, <code>ch_vat</code>, <code>cl_tin</code>, <code>es_cif</code>, <code>eu_vat</code>, <code>hk_br</code>, <code>id_npwp</code>, <code>in_gst</code>, <code>jp_cn</code>, <code>jp_rn</code>, <code>kr_brn</code>, <code>li_uid</code>, <code>mx_rfc</code>, <code>my_frp</code>, <code>my_itn</code>, <code>my_sst</code>, <code>no_vat</code>, <code>nz_gst</code>, <code>ru_inn</code>, <code>ru_kpp</code>, <code>sa_vat</code>, <code>sg_gst</code>, <code>sg_uen</code>, <code>th_vat</code>, <code>tw_vat</code>, <code>us_ein</code>, or <code>za_vat</code>. Note that some legacy tax IDs have type <code>unknown</code> + * @property string $value Value of the tax ID. + * @property null|\Stripe\StripeObject $verification Tax ID verification information. */ class TaxId extends ApiResource { - const OBJECT_NAME = "tax_id"; + const OBJECT_NAME = 'tax_id'; use ApiOperations\Delete; - /** - * Possible string representations of a tax id's type. - * @link https://stripe.com/docs/api/customer_tax_ids/object#tax_id_object-type - */ - const TYPE_AU_ABN = 'au_abn'; - const TYPE_EU_VAT = 'eu_vat'; - const TYPE_IN_GST = 'in_gst'; - const TYPE_NO_VAT = 'no_vat'; - const TYPE_NZ_GST = 'nz_gst'; + const TYPE_AE_TRN = 'ae_trn'; + const TYPE_AU_ABN = 'au_abn'; + const TYPE_BR_CNPJ = 'br_cnpj'; + const TYPE_BR_CPF = 'br_cpf'; + const TYPE_CA_BN = 'ca_bn'; + const TYPE_CA_QST = 'ca_qst'; + const TYPE_CH_VAT = 'ch_vat'; + const TYPE_CL_TIN = 'cl_tin'; + const TYPE_ES_CIF = 'es_cif'; + const TYPE_EU_VAT = 'eu_vat'; + const TYPE_HK_BR = 'hk_br'; + const TYPE_ID_NPWP = 'id_npwp'; + const TYPE_IN_GST = 'in_gst'; + const TYPE_JP_CN = 'jp_cn'; + const TYPE_JP_RN = 'jp_rn'; + const TYPE_KR_BRN = 'kr_brn'; + const TYPE_LI_UID = 'li_uid'; + const TYPE_MX_RFC = 'mx_rfc'; + const TYPE_MY_FRP = 'my_frp'; + const TYPE_MY_ITN = 'my_itn'; + const TYPE_MY_SST = 'my_sst'; + const TYPE_NO_VAT = 'no_vat'; + const TYPE_NZ_GST = 'nz_gst'; + const TYPE_RU_INN = 'ru_inn'; + const TYPE_RU_KPP = 'ru_kpp'; + const TYPE_SA_VAT = 'sa_vat'; + const TYPE_SG_GST = 'sg_gst'; + const TYPE_SG_UEN = 'sg_uen'; + const TYPE_TH_VAT = 'th_vat'; + const TYPE_TW_VAT = 'tw_vat'; const TYPE_UNKNOWN = 'unknown'; + const TYPE_US_EIN = 'us_ein'; + const TYPE_ZA_VAT = 'za_vat'; - /** - * Possible string representations of the verification status. - * @link https://stripe.com/docs/api/customer_tax_ids/object#tax_id_object-verification - */ - const VERIFICATION_STATUS_PENDING = 'pending'; + const VERIFICATION_STATUS_PENDING = 'pending'; const VERIFICATION_STATUS_UNAVAILABLE = 'unavailable'; - const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; - const VERIFICATION_STATUS_VERIFIED = 'verified'; + const VERIFICATION_STATUS_UNVERIFIED = 'unverified'; + const VERIFICATION_STATUS_VERIFIED = 'verified'; /** - * @return string The API URL for this tax id. + * @return string the API URL for this tax id */ public function instanceUrl() { $id = $this['id']; $customer = $this['customer']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: class instance has invalid ID: $id", - null + throw new Exception\UnexpectedValueException( + "Could not determine which URL to request: class instance has invalid ID: {$id}" ); } $id = Util\Util::utf8($id); $customer = Util\Util::utf8($customer); $base = Customer::classUrl(); - $customerExtn = urlencode($customer); - $extn = urlencode($id); - return "$base/$customerExtn/tax_ids/$extn"; + $customerExtn = \urlencode($customer); + $extn = \urlencode($id); + + return "{$base}/{$customerExtn}/tax_ids/{$extn}"; } /** * @param array|string $_id - * @param array|string|null $_opts + * @param null|array|string $_opts * - * @throws \Stripe\Error\InvalidRequest + * @throws \Stripe\Exception\BadMethodCallException */ public static function retrieve($_id, $_opts = null) { - $msg = "Tax Ids cannot be accessed without a customer ID. " . - "Retrieve a Tax Id using Customer::retrieveTaxId('tax_id') instead."; - throw new Error\InvalidRequest($msg, null); + $msg = 'Tax IDs cannot be retrieved without a customer ID. Retrieve ' . + "a tax ID using `Customer::retrieveTaxId('customer_id', " . + "'tax_id_id')`."; + + throw new Exception\BadMethodCallException($msg); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/TaxRate.php b/htdocs/includes/stripe/stripe-php/lib/TaxRate.php index 9f416507cf4..2974f8383f3 100644 --- a/htdocs/includes/stripe/stripe-php/lib/TaxRate.php +++ b/htdocs/includes/stripe/stripe-php/lib/TaxRate.php @@ -1,27 +1,35 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class TaxRate + * Tax rates can be applied to <a + * href="https://stripe.com/docs/billing/invoices/tax-rates">invoices</a>, <a + * href="https://stripe.com/docs/billing/subscriptions/taxes">subscriptions</a> and + * <a + * href="https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates">Checkout + * Sessions</a> to collect tax. * - * @property string $id - * @property string $object - * @property bool $active - * @property int $created - * @property string $description - * @property string $display_name - * @property bool $inclusive - * @property string $jurisdiction - * @property bool $livemode - * @property StripeObject $metadata - * @property float $percentage + * Related guide: <a href="https://stripe.com/docs/billing/taxes/tax-rates">Tax + * Rates</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $active Defaults to <code>true</code>. When set to <code>false</code>, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + * @property string $display_name The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + * @property bool $inclusive This specifies if the tax rate is inclusive or exclusive. + * @property null|string $jurisdiction The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property float $percentage This represents the tax rate percent out of 100. */ class TaxRate extends ApiResource { - const OBJECT_NAME = "tax_rate"; + const OBJECT_NAME = 'tax_rate'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php index 92a5b997b9c..e688857b04c 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php +++ b/htdocs/includes/stripe/stripe-php/lib/Terminal/ConnectionToken.php @@ -1,17 +1,23 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Terminal; /** - * Class ConnectionToken + * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. * - * @property string $secret + * Related guide: <a + * href="https://stripe.com/docs/terminal/readers/fleet-management#create">Fleet + * Management</a>. * - * @package Stripe\Terminal + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $location The id of the location that this connection token is scoped to. + * @property string $secret Your application should pass this token to the Stripe Terminal SDK. */ class ConnectionToken extends \Stripe\ApiResource { - const OBJECT_NAME = "terminal.connection_token"; + const OBJECT_NAME = 'terminal.connection_token'; use \Stripe\ApiOperations\Create; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php index 8628b060b6a..5769ef358e8 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php +++ b/htdocs/includes/stripe/stripe-php/lib/Terminal/Location.php @@ -1,21 +1,26 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Terminal; /** - * Class Location + * A Location represents a grouping of readers. * - * @property string $id - * @property string $object - * @property mixed $address - * @property bool $deleted - * @property string $display_name + * Related guide: <a + * href="https://stripe.com/docs/terminal/readers/fleet-management#create">Fleet + * Management</a>. * - * @package Stripe\Terminal + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $address + * @property string $display_name The display name of the location. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ class Location extends \Stripe\ApiResource { - const OBJECT_NAME = "terminal.location"; + const OBJECT_NAME = 'terminal.location'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php b/htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php index f11ccd564df..513b130af69 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php +++ b/htdocs/includes/stripe/stripe-php/lib/Terminal/Reader.php @@ -1,26 +1,31 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe\Terminal; /** - * Class Reader + * A Reader represents a physical device for accepting payment details. * - * @property string $id - * @property string $object - * @property bool $deleted - * @property string $device_sw_version - * @property string $device_type - * @property string $ip_address - * @property string $label - * @property string $location - * @property string $serial_number - * @property string $status + * Related guide: <a + * href="https://stripe.com/docs/terminal/readers/connecting">Connecting to a + * Reader</a>. * - * @package Stripe\Terminal + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $device_sw_version The current software version of the reader. + * @property string $device_type Type of reader, one of <code>bbpos_chipper2x</code> or <code>verifone_P400</code>. + * @property null|string $ip_address The local IP address of the reader. + * @property string $label Custom label given to the reader for easier identification. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string $location The location identifier of the reader. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $serial_number Serial number of the reader. + * @property null|string $status The networking status of the reader. */ class Reader extends \Stripe\ApiResource { - const OBJECT_NAME = "terminal.reader"; + const OBJECT_NAME = 'terminal.reader'; use \Stripe\ApiOperations\All; use \Stripe\ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php b/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php index 3869eba85b3..51b5691d4e7 100644 --- a/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php +++ b/htdocs/includes/stripe/stripe-php/lib/ThreeDSecure.php @@ -1,19 +1,37 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; +/** + * Cardholder authentication via 3D Secure is initiated by creating a <code>3D + * Secure</code> object. Once the object has been created, you can use it to + * authenticate the cardholder and create a charge. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount of the charge that you will create when authentication completes. + * @property bool $authenticated True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. + * @property \Stripe\Card $card <p>You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.</p><p>Related guide: <a href="https://stripe.com/docs/sources/cards">Card Payments with Sources</a>.</p> + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property null|string $redirect_url If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value &quot;_callback&quot;. + * @property string $status Possible values are <code>redirect_pending</code>, <code>succeeded</code>, or <code>failed</code>. When the cardholder can be authenticated, the object starts with status <code>redirect_pending</code>. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status <code>succeeded</code>. <code>failed</code> indicates that authentication was attempted unsuccessfully. + */ class ThreeDSecure extends ApiResource { - const OBJECT_NAME = "three_d_secure"; + const OBJECT_NAME = 'three_d_secure'; use ApiOperations\Create; use ApiOperations\Retrieve; /** - * @return string The endpoint URL for the given class. + * @return string the endpoint URL for the given class */ public static function classUrl() { - return "/v1/3d_secure"; + return '/v1/3d_secure'; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Token.php b/htdocs/includes/stripe/stripe-php/lib/Token.php index 629d51f6867..de7988cfb5a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Token.php +++ b/htdocs/includes/stripe/stripe-php/lib/Token.php @@ -1,35 +1,57 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Token + * Tokenization is the process Stripe uses to collect sensitive card or bank + * account details, or personally identifiable information (PII), directly from + * your customers in a secure manner. A token representing this information is + * returned to your server to use. You should use our <a + * href="https://stripe.com/docs/payments">recommended payments integrations</a> to + * perform this process client-side. This ensures that no sensitive card data + * touches your server, and allows your integration to operate in a PCI-compliant + * way. * - * @property string $id - * @property string $object - * @property BankAccount $bank_account - * @property Card $card - * @property string $client_ip - * @property int $created - * @property bool $livemode - * @property string $type - * @property bool $used + * If you cannot use client-side tokenization, you can also create tokens using the + * API with either your publishable or secret API key. Keep in mind that if your + * integration uses this method, you are responsible for any PCI compliance that + * may be required, and you must keep your secret API key safe. Unlike with + * client-side tokenization, your customer's information is not sent directly to + * Stripe, so we cannot determine how it is handled or stored. * - * @package Stripe + * Tokens cannot be stored or used more than once. To store card or bank account + * information for later use, you can create <a + * href="https://stripe.com/docs/api#customers">Customer</a> objects or <a + * href="https://stripe.com/docs/api#external_accounts">Custom accounts</a>. Note + * that <a href="https://stripe.com/docs/radar">Radar</a>, our integrated solution + * for automatic fraud protection, supports only integrations that use client-side + * tokenization. + * + * Related guide: <a + * href="https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token">Accept + * a payment</a> + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\BankAccount $bank_account <p>These bank accounts are payment methods on <code>Customer</code> objects.</p><p>On the other hand <a href="https://stripe.com/docs/api#external_accounts">External Accounts</a> are transfer destinations on <code>Account</code> objects for <a href="https://stripe.com/docs/connect/custom-accounts">Custom accounts</a>. They can be bank accounts or debit cards as well, and are documented in the links above.</p><p>Related guide: <a href="https://stripe.com/docs/payments/bank-debits-transfers">Bank Debits and Transfers</a>.</p> + * @property \Stripe\Card $card <p>You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.</p><p>Related guide: <a href="https://stripe.com/docs/sources/cards">Card Payments with Sources</a>.</p> + * @property null|string $client_ip IP address of the client that generated the token. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property string $type Type of the token: <code>account</code>, <code>bank_account</code>, <code>card</code>, or <code>pii</code>. + * @property bool $used Whether this token has already been used (tokens can be used only once). */ class Token extends ApiResource { - const OBJECT_NAME = "token"; + const OBJECT_NAME = 'token'; use ApiOperations\Create; use ApiOperations\Retrieve; - /** - * Possible string representations of the token type. - * @link https://stripe.com/docs/api/tokens/object#token_object-type - */ - const TYPE_ACCOUNT = 'account'; + const TYPE_ACCOUNT = 'account'; const TYPE_BANK_ACCOUNT = 'bank_account'; - const TYPE_CARD = 'card'; - const TYPE_PII = 'pii'; + const TYPE_CARD = 'card'; + const TYPE_PII = 'pii'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Topup.php b/htdocs/includes/stripe/stripe-php/lib/Topup.php index 37625a329ff..4a4c818b214 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Topup.php +++ b/htdocs/includes/stripe/stripe-php/lib/Topup.php @@ -1,59 +1,63 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Topup + * To top up your Stripe balance, you create a top-up object. You can retrieve + * individual top-ups, as well as list all top-ups. Top-ups are identified by a + * unique, random ID. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $balance_transaction - * @property int $created - * @property string $currency - * @property string $description - * @property int $expected_availability_date - * @property string $failure_code - * @property string $failure_message - * @property bool $livemode - * @property StripeObject $metadata - * @property mixed $source - * @property string $statement_descriptor - * @property string $status - * @property string $transfer_group + * Related guide: <a href="https://stripe.com/docs/connect/top-ups">Topping Up your + * Platform Account</a>. * - * @package Stripe + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount transferred. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|int $expected_availability_date Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + * @property null|string $failure_code Error code explaining reason for top-up failure if available (see <a href="https://stripe.com/docs/api#errors">the errors section</a> for a list of codes). + * @property null|string $failure_message Message to user further explaining reason for top-up failure if available. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\Source $source <p><code>Source</code> objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a <code>Card</code> object: once chargeable, they can be charged, or can be attached to customers.</p><p>Related guides: <a href="https://stripe.com/docs/sources">Sources API</a> and <a href="https://stripe.com/docs/sources/customers">Sources &amp; Customers</a>.</p> + * @property null|string $statement_descriptor Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + * @property string $status The status of the top-up is either <code>canceled</code>, <code>failed</code>, <code>pending</code>, <code>reversed</code>, or <code>succeeded</code>. + * @property null|string $transfer_group A string that identifies this top-up as part of a group. */ class Topup extends ApiResource { - const OBJECT_NAME = "topup"; + const OBJECT_NAME = 'topup'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; - /** - * Possible string representations of the status of the top-up. - * @link https://stripe.com/docs/api/topups/object#topup_object-status - */ - const STATUS_CANCELED = 'canceled'; - const STATUS_FAILED = 'failed'; - const STATUS_PENDING = 'pending'; - const STATUS_REVERSED = 'reversed'; + const STATUS_CANCELED = 'canceled'; + const STATUS_FAILED = 'failed'; + const STATUS_PENDING = 'pending'; + const STATUS_REVERSED = 'reversed'; const STATUS_SUCCEEDED = 'succeeded'; /** - * @param array|null $params - * @param array|string|null $options + * @param null|array $params + * @param null|array|string $opts * - * @return Topup The canceled topup. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Topup the canceled topup */ - public function cancel($params = null, $options = null) + public function cancel($params = null, $opts = null) { $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url, $params, $options); + list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); + return $this; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Transfer.php b/htdocs/includes/stripe/stripe-php/lib/Transfer.php index bf9fa25ce37..6b8e4ac6afa 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Transfer.php +++ b/htdocs/includes/stripe/stripe-php/lib/Transfer.php @@ -1,33 +1,44 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class Transfer + * A <code>Transfer</code> object is created when you move funds between Stripe + * accounts as part of Connect. * - * @property string $id - * @property string $object - * @property int $amount - * @property int $amount_reversed - * @property string $balance_transaction - * @property int $created - * @property string $currency - * @property string $description - * @property string $destination - * @property string $destination_payment - * @property bool $livemode - * @property StripeObject $metadata - * @property Collection $reversals - * @property bool $reversed - * @property string $source_transaction - * @property string $source_type - * @property string $transfer_group + * Before April 6, 2017, transfers also represented movement of funds from a Stripe + * account to a card or bank account. This behavior has since been split out into a + * <a href="https://stripe.com/docs/api#payout_object">Payout</a> object, with + * corresponding payout endpoints. For more information, read about the <a + * href="https://stripe.com/docs/transfer-payout-split">transfer/payout split</a>. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/connect/charges-transfers">Creating Separate + * Charges and Transfers</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount in %s to be transferred. + * @property int $amount_reversed Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact of this transfer on your account balance. + * @property int $created Time that this record of the transfer was first created. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. + * @property null|string|\Stripe\Account $destination ID of the Stripe account the transfer was sent to. + * @property string|\Stripe\Charge $destination_payment If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\Collection $reversals A list of reversals that have been applied to the transfer. + * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + * @property null|string|\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + * @property null|string $source_type The source balance this transfer came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>. + * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/charges-transfers#transfer-options">Connect documentation</a> for details. */ class Transfer extends ApiResource { - const OBJECT_NAME = "transfer"; + const OBJECT_NAME = 'transfer'; use ApiOperations\All; use ApiOperations\Create; @@ -35,45 +46,52 @@ class Transfer extends ApiResource use ApiOperations\Retrieve; use ApiOperations\Update; + const SOURCE_TYPE_ALIPAY_ACCOUNT = 'alipay_account'; + const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account'; + const SOURCE_TYPE_CARD = 'card'; + const SOURCE_TYPE_FINANCING = 'financing'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return Transfer the canceled transfer + */ + public function cancel($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/cancel'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + const PATH_REVERSALS = '/reversals'; /** - * Possible string representations of the source type of the transfer. - * @link https://stripe.com/docs/api/transfers/object#transfer_object-source_type - */ - const SOURCE_TYPE_ALIPAY_ACCOUNT = 'alipay_account'; - const SOURCE_TYPE_BANK_ACCOUNT = 'bank_account'; - const SOURCE_TYPE_CARD = 'card'; - const SOURCE_TYPE_FINANCING = 'financing'; - - /** - * @return TransferReversal The created transfer reversal. - */ - public function reverse($params = null, $opts = null) - { - $url = $this->instanceUrl() . '/reversals'; - list($response, $opts) = $this->_request('post', $url, $params, $opts); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @return Transfer The canceled transfer. - */ - public function cancel() - { - $url = $this->instanceUrl() . '/cancel'; - list($response, $opts) = $this->_request('post', $url); - $this->refreshFrom($response, $opts); - return $this; - } - - /** - * @param string|null $id The ID of the transfer on which to create the reversal. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the transfer on which to retrieve the transfer reversals + * @param null|array $params + * @param null|array|string $opts * - * @return TransferReversal + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection the list of transfer reversals + */ + public static function allReversals($id, $params = null, $opts = null) + { + return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts); + } + + /** + * @param string $id the ID of the transfer on which to create the transfer reversal + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal */ public static function createReversal($id, $params = null, $opts = null) { @@ -81,12 +99,14 @@ class Transfer extends ApiResource } /** - * @param string|null $id The ID of the transfer to which the reversal belongs. - * @param array|null $reversalId The ID of the reversal to retrieve. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the transfer to which the transfer reversal belongs + * @param string $reversalId the ID of the transfer reversal to retrieve + * @param null|array $params + * @param null|array|string $opts * - * @return TransferReversal + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal */ public static function retrieveReversal($id, $reversalId, $params = null, $opts = null) { @@ -94,27 +114,17 @@ class Transfer extends ApiResource } /** - * @param string|null $id The ID of the transfer to which the reversal belongs. - * @param array|null $reversalId The ID of the reversal to update. - * @param array|null $params - * @param array|string|null $opts + * @param string $id the ID of the transfer to which the transfer reversal belongs + * @param string $reversalId the ID of the transfer reversal to update + * @param null|array $params + * @param null|array|string $opts * - * @return TransferReversal + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TransferReversal */ public static function updateReversal($id, $reversalId, $params = null, $opts = null) { return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts); } - - /** - * @param string|null $id The ID of the transfer on which to retrieve the reversals. - * @param array|null $params - * @param array|string|null $opts - * - * @return Collection The list of reversals. - */ - public static function allReversals($id, $params = null, $opts = null) - { - return self::_allNestedResources($id, static::PATH_REVERSALS, $params, $opts); - } } diff --git a/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php b/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php index a4f94f2fb43..b6167dbb30a 100644 --- a/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php +++ b/htdocs/includes/stripe/stripe-php/lib/TransferReversal.php @@ -1,42 +1,57 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class TransferReversal + * <a href="https://stripe.com/docs/connect">Stripe Connect</a> platforms can + * reverse transfers made to a connected account, either entirely or partially, and + * can also specify whether to refund any related application fees. Transfer + * reversals add to the platform's balance and subtract from the destination + * account's balance. * - * @property string $id - * @property string $object - * @property int $amount - * @property string $balance_transaction - * @property int $created - * @property string $currency - * @property string $destination_payment_refund - * @property StripeObject $metadata - * @property string $source_refund - * @property string $transfer + * Reversing a transfer that was made for a <a + * href="/docs/connect/destination-charges">destination charge</a> is allowed only + * up to the amount of the charge. It is possible to reverse a <a + * href="https://stripe.com/docs/connect/charges-transfers#transfer-options">transfer_group</a> + * transfer only if the destination account has enough balance to cover the + * reversal. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/connect/charges-transfers#reversing-transfers">Reversing + * Transfers</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Amount, in %s. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction Balance transaction that describes the impact on your account balance. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>. + * @property null|string|\Stripe\Refund $destination_payment_refund Linked payment refund for the transfer reversal. + * @property null|\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|string|\Stripe\Refund $source_refund ID of the refund responsible for the transfer reversal. + * @property string|\Stripe\Transfer $transfer ID of the transfer that was reversed. */ class TransferReversal extends ApiResource { - const OBJECT_NAME = "transfer_reversal"; + const OBJECT_NAME = 'transfer_reversal'; use ApiOperations\Update { save as protected _save; } /** - * @return string The API URL for this Stripe transfer reversal. + * @return string the API URL for this Stripe transfer reversal */ public function instanceUrl() { $id = $this['id']; $transfer = $this['transfer']; if (!$id) { - throw new Error\InvalidRequest( - "Could not determine which URL to request: " . - "class instance has invalid ID: $id", + throw new Exception\UnexpectedValueException( + 'Could not determine which URL to request: ' . + "class instance has invalid ID: {$id}", null ); } @@ -44,15 +59,18 @@ class TransferReversal extends ApiResource $transfer = Util\Util::utf8($transfer); $base = Transfer::classUrl(); - $transferExtn = urlencode($transfer); - $extn = urlencode($id); - return "$base/$transferExtn/reversals/$extn"; + $transferExtn = \urlencode($transfer); + $extn = \urlencode($id); + + return "{$base}/{$transferExtn}/reversals/{$extn}"; } /** - * @param array|string|null $opts + * @param null|array|string $opts * - * @return TransferReversal The saved reversal. + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return TransferReversal the saved reversal */ public function save($opts = null) { diff --git a/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php b/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php index 1239222d49d..55229827695 100644 --- a/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php +++ b/htdocs/includes/stripe/stripe-php/lib/UsageRecord.php @@ -1,43 +1,25 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class UsageRecord + * Usage records allow you to report customer usage and metrics to Stripe for + * metered billing of subscription prices. * - * @package Stripe + * Related guide: <a + * href="https://stripe.com/docs/billing/subscriptions/metered-billing">Metered + * Billing</a>. * - * @property string $id - * @property string $object - * @property bool $livemode - * @property int $quantity - * @property string $subscription_item - * @property int $timestamp + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property int $quantity The usage quantity for the specified date. + * @property string $subscription_item The ID of the subscription item this usage record contains data for. + * @property int $timestamp The timestamp when this usage occurred. */ class UsageRecord extends ApiResource { - const OBJECT_NAME = "usage_record"; - - /** - * @param array|null $params - * @param array|string|null $options - * - * @return \Stripe\ApiResource The created resource. - */ - public static function create($params = null, $options = null) - { - self::_validateParams($params); - if (!array_key_exists('subscription_item', $params)) { - throw new Error\InvalidRequest("Missing subscription_item param in request", null); - } - $subscription_item = $params['subscription_item']; - $url = "/v1/subscription_items/$subscription_item/usage_records"; - $request_params = $params; - unset($request_params['subscription_item']); - - list($response, $opts) = static::_staticRequest('post', $url, $request_params, $options); - $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); - $obj->setLastResponse($response); - return $obj; - } + const OBJECT_NAME = 'usage_record'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php b/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php index 9d3e7a396ed..174e14e0351 100644 --- a/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php +++ b/htdocs/includes/stripe/stripe-php/lib/UsageRecordSummary.php @@ -1,21 +1,19 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class UsageRecord - * - * @package Stripe - * - * @property string $id - * @property string $object - * @property string $invoice - * @property bool $livemode - * @property mixed $period - * @property string $subscription_item - * @property int $total_usage + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $invoice The invoice in which this usage period has been billed for. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $period + * @property string $subscription_item The ID of the subscription item this summary is describing. + * @property int $total_usage The total usage within this usage period. */ class UsageRecordSummary extends ApiResource { - const OBJECT_NAME = "usage_record_summary"; + const OBJECT_NAME = 'usage_record_summary'; } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php b/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php index 02c6f26daf3..670ab0b6a7e 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/CaseInsensitiveArray.php @@ -2,8 +2,6 @@ namespace Stripe\Util; -use ArrayAccess; - /** * CaseInsensitiveArray is an array-like class that ignores case for keys. * @@ -14,19 +12,29 @@ use ArrayAccess; * In the context of stripe-php, this is useful because the API will return headers with different * case depending on whether HTTP/2 is used or not (with HTTP/2, headers are always in lowercase). */ -class CaseInsensitiveArray implements ArrayAccess +class CaseInsensitiveArray implements \ArrayAccess, \Countable, \IteratorAggregate { - private $container = array(); + private $container = []; - public function __construct($initial_array = array()) + public function __construct($initial_array = []) { - $this->container = array_map("strtolower", $initial_array); + $this->container = \array_change_key_case($initial_array, \CASE_LOWER); + } + + public function count() + { + return \count($this->container); + } + + public function getIterator() + { + return new \ArrayIterator($this->container); } public function offsetSet($offset, $value) { $offset = static::maybeLowercase($offset); - if (is_null($offset)) { + if (null === $offset) { $this->container[] = $value; } else { $this->container[$offset] = $value; @@ -36,6 +44,7 @@ class CaseInsensitiveArray implements ArrayAccess public function offsetExists($offset) { $offset = static::maybeLowercase($offset); + return isset($this->container[$offset]); } @@ -48,15 +57,16 @@ class CaseInsensitiveArray implements ArrayAccess public function offsetGet($offset) { $offset = static::maybeLowercase($offset); + return isset($this->container[$offset]) ? $this->container[$offset] : null; } private static function maybeLowercase($v) { - if (is_string($v)) { - return strtolower($v); - } else { - return $v; + if (\is_string($v)) { + return \strtolower($v); } + + return $v; } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php b/htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php index 1a8663699f5..016cbe85fb1 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/DefaultLogger.php @@ -8,11 +8,22 @@ namespace Stripe\Util; */ class DefaultLogger implements LoggerInterface { + /** @var int */ + public $messageType = 0; + + /** @var null|string */ + public $destination; + public function error($message, array $context = []) { - if (count($context) > 0) { - throw new \Exception('DefaultLogger does not currently implement context. Please implement if you need it.'); + if (\count($context) > 0) { + throw new \Stripe\Exception\BadMethodCallException('DefaultLogger does not currently implement context. Please implement if you need it.'); + } + + if (null === $this->destination) { + \error_log($message, $this->messageType); + } else { + \error_log($message, $this->messageType, $this->destination); } - error_log($message); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php b/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php index cf04e1d2bad..5603c81b8f9 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/LoggerInterface.php @@ -29,8 +29,6 @@ interface LoggerInterface * be logged and monitored. * * @param string $message - * @param array $context - * @return void */ public function error($message, array $context = []); } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/ObjectTypes.php b/htdocs/includes/stripe/stripe-php/lib/Util/ObjectTypes.php new file mode 100644 index 00000000000..5aad2bb407f --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/lib/Util/ObjectTypes.php @@ -0,0 +1,99 @@ +<?php + +// File generated from our OpenAPI spec + +namespace Stripe\Util; + +class ObjectTypes +{ + /** + * @var array Mapping from object types to resource classes + */ + const mapping = [ + \Stripe\Account::OBJECT_NAME => \Stripe\Account::class, + \Stripe\AccountLink::OBJECT_NAME => \Stripe\AccountLink::class, + \Stripe\AlipayAccount::OBJECT_NAME => \Stripe\AlipayAccount::class, + \Stripe\ApplePayDomain::OBJECT_NAME => \Stripe\ApplePayDomain::class, + \Stripe\ApplicationFee::OBJECT_NAME => \Stripe\ApplicationFee::class, + \Stripe\ApplicationFeeRefund::OBJECT_NAME => \Stripe\ApplicationFeeRefund::class, + \Stripe\Balance::OBJECT_NAME => \Stripe\Balance::class, + \Stripe\BalanceTransaction::OBJECT_NAME => \Stripe\BalanceTransaction::class, + \Stripe\BankAccount::OBJECT_NAME => \Stripe\BankAccount::class, + \Stripe\BillingPortal\Session::OBJECT_NAME => \Stripe\BillingPortal\Session::class, + \Stripe\BitcoinReceiver::OBJECT_NAME => \Stripe\BitcoinReceiver::class, + \Stripe\BitcoinTransaction::OBJECT_NAME => \Stripe\BitcoinTransaction::class, + \Stripe\Capability::OBJECT_NAME => \Stripe\Capability::class, + \Stripe\Card::OBJECT_NAME => \Stripe\Card::class, + \Stripe\Charge::OBJECT_NAME => \Stripe\Charge::class, + \Stripe\Checkout\Session::OBJECT_NAME => \Stripe\Checkout\Session::class, + \Stripe\Collection::OBJECT_NAME => \Stripe\Collection::class, + \Stripe\CountrySpec::OBJECT_NAME => \Stripe\CountrySpec::class, + \Stripe\Coupon::OBJECT_NAME => \Stripe\Coupon::class, + \Stripe\CreditNote::OBJECT_NAME => \Stripe\CreditNote::class, + \Stripe\CreditNoteLineItem::OBJECT_NAME => \Stripe\CreditNoteLineItem::class, + \Stripe\Customer::OBJECT_NAME => \Stripe\Customer::class, + \Stripe\CustomerBalanceTransaction::OBJECT_NAME => \Stripe\CustomerBalanceTransaction::class, + \Stripe\Discount::OBJECT_NAME => \Stripe\Discount::class, + \Stripe\Dispute::OBJECT_NAME => \Stripe\Dispute::class, + \Stripe\EphemeralKey::OBJECT_NAME => \Stripe\EphemeralKey::class, + \Stripe\Event::OBJECT_NAME => \Stripe\Event::class, + \Stripe\ExchangeRate::OBJECT_NAME => \Stripe\ExchangeRate::class, + \Stripe\File::OBJECT_NAME => \Stripe\File::class, + \Stripe\File::OBJECT_NAME_ALT => \Stripe\File::class, + \Stripe\FileLink::OBJECT_NAME => \Stripe\FileLink::class, + \Stripe\Invoice::OBJECT_NAME => \Stripe\Invoice::class, + \Stripe\InvoiceItem::OBJECT_NAME => \Stripe\InvoiceItem::class, + \Stripe\InvoiceLineItem::OBJECT_NAME => \Stripe\InvoiceLineItem::class, + \Stripe\Issuing\Authorization::OBJECT_NAME => \Stripe\Issuing\Authorization::class, + \Stripe\Issuing\Card::OBJECT_NAME => \Stripe\Issuing\Card::class, + \Stripe\Issuing\CardDetails::OBJECT_NAME => \Stripe\Issuing\CardDetails::class, + \Stripe\Issuing\Cardholder::OBJECT_NAME => \Stripe\Issuing\Cardholder::class, + \Stripe\Issuing\Dispute::OBJECT_NAME => \Stripe\Issuing\Dispute::class, + \Stripe\Issuing\Transaction::OBJECT_NAME => \Stripe\Issuing\Transaction::class, + \Stripe\LineItem::OBJECT_NAME => \Stripe\LineItem::class, + \Stripe\LoginLink::OBJECT_NAME => \Stripe\LoginLink::class, + \Stripe\Mandate::OBJECT_NAME => \Stripe\Mandate::class, + \Stripe\Order::OBJECT_NAME => \Stripe\Order::class, + \Stripe\OrderItem::OBJECT_NAME => \Stripe\OrderItem::class, + \Stripe\OrderReturn::OBJECT_NAME => \Stripe\OrderReturn::class, + \Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class, + \Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class, + \Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class, + \Stripe\Person::OBJECT_NAME => \Stripe\Person::class, + \Stripe\Plan::OBJECT_NAME => \Stripe\Plan::class, + \Stripe\Price::OBJECT_NAME => \Stripe\Price::class, + \Stripe\Product::OBJECT_NAME => \Stripe\Product::class, + \Stripe\PromotionCode::OBJECT_NAME => \Stripe\PromotionCode::class, + \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => \Stripe\Radar\EarlyFraudWarning::class, + \Stripe\Radar\ValueList::OBJECT_NAME => \Stripe\Radar\ValueList::class, + \Stripe\Radar\ValueListItem::OBJECT_NAME => \Stripe\Radar\ValueListItem::class, + \Stripe\Recipient::OBJECT_NAME => \Stripe\Recipient::class, + \Stripe\RecipientTransfer::OBJECT_NAME => \Stripe\RecipientTransfer::class, + \Stripe\Refund::OBJECT_NAME => \Stripe\Refund::class, + \Stripe\Reporting\ReportRun::OBJECT_NAME => \Stripe\Reporting\ReportRun::class, + \Stripe\Reporting\ReportType::OBJECT_NAME => \Stripe\Reporting\ReportType::class, + \Stripe\Review::OBJECT_NAME => \Stripe\Review::class, + \Stripe\SetupAttempt::OBJECT_NAME => \Stripe\SetupAttempt::class, + \Stripe\SetupIntent::OBJECT_NAME => \Stripe\SetupIntent::class, + \Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => \Stripe\Sigma\ScheduledQueryRun::class, + \Stripe\SKU::OBJECT_NAME => \Stripe\SKU::class, + \Stripe\Source::OBJECT_NAME => \Stripe\Source::class, + \Stripe\SourceTransaction::OBJECT_NAME => \Stripe\SourceTransaction::class, + \Stripe\Subscription::OBJECT_NAME => \Stripe\Subscription::class, + \Stripe\SubscriptionItem::OBJECT_NAME => \Stripe\SubscriptionItem::class, + \Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class, + \Stripe\TaxId::OBJECT_NAME => \Stripe\TaxId::class, + \Stripe\TaxRate::OBJECT_NAME => \Stripe\TaxRate::class, + \Stripe\Terminal\ConnectionToken::OBJECT_NAME => \Stripe\Terminal\ConnectionToken::class, + \Stripe\Terminal\Location::OBJECT_NAME => \Stripe\Terminal\Location::class, + \Stripe\Terminal\Reader::OBJECT_NAME => \Stripe\Terminal\Reader::class, + \Stripe\ThreeDSecure::OBJECT_NAME => \Stripe\ThreeDSecure::class, + \Stripe\Token::OBJECT_NAME => \Stripe\Token::class, + \Stripe\Topup::OBJECT_NAME => \Stripe\Topup::class, + \Stripe\Transfer::OBJECT_NAME => \Stripe\Transfer::class, + \Stripe\TransferReversal::OBJECT_NAME => \Stripe\TransferReversal::class, + \Stripe\UsageRecord::OBJECT_NAME => \Stripe\UsageRecord::class, + \Stripe\UsageRecordSummary::OBJECT_NAME => \Stripe\UsageRecordSummary::class, + \Stripe\WebhookEndpoint::OBJECT_NAME => \Stripe\WebhookEndpoint::class, + ]; +} diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php b/htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php index 470f2bce8b3..b11e445d268 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/RandomGenerator.php @@ -12,11 +12,12 @@ class RandomGenerator * Returns a random value between 0 and $max. * * @param float $max (optional) + * * @return float */ public function randFloat($max = 1.0) { - return mt_rand() / mt_getrandmax() * $max; + return \mt_rand() / \mt_getrandmax() * $max; } /** @@ -26,9 +27,10 @@ class RandomGenerator */ public function uuid() { - $arr = array_values(unpack('N1a/n4b/N1c', openssl_random_pseudo_bytes(16))); + $arr = \array_values(\unpack('N1a/n4b/N1c', \openssl_random_pseudo_bytes(16))); $arr[2] = ($arr[2] & 0x0fff) | 0x4000; $arr[3] = ($arr[3] & 0x3fff) | 0x8000; - return vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr); + + return \vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php b/htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php index 495236224d8..89924bb6c73 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/RequestOptions.php @@ -2,22 +2,30 @@ namespace Stripe\Util; -use Stripe\Error; - class RequestOptions { /** - * @var array A list of headers that should be persisted across requests. + * @var array<string> a list of headers that should be persisted across requests */ public static $HEADERS_TO_PERSIST = [ 'Stripe-Account', 'Stripe-Version', ]; + /** @var array<string, string> */ public $headers; + + /** @var null|string */ public $apiKey; + + /** @var null|string */ public $apiBase; + /** + * @param null|string $key + * @param array<string, string> $headers + * @param null|string $base + */ public function __construct($key = null, $headers = [], $base = null) { $this->apiKey = $key; @@ -25,23 +33,38 @@ class RequestOptions $this->apiBase = $base; } + /** + * @return array<string, string> + */ + public function __debugInfo() + { + return [ + 'apiKey' => $this->redactedApiKey(), + 'headers' => $this->headers, + 'apiBase' => $this->apiBase, + ]; + } + /** * Unpacks an options array and merges it into the existing RequestOptions * object. - * @param array|string|null $options a key => value array + * + * @param null|array|RequestOptions|string $options a key => value array + * @param bool $strict when true, forbid string form and arbitrary keys in array form * * @return RequestOptions */ - public function merge($options) + public function merge($options, $strict = false) { - $other_options = self::parse($options); - if ($other_options->apiKey === null) { + $other_options = self::parse($options, $strict); + if (null === $other_options->apiKey) { $other_options->apiKey = $this->apiKey; } - if ($other_options->apiBase === null) { + if (null === $other_options->apiBase) { $other_options->apiBase = $this->apiBase; } - $other_options->headers = array_merge($this->headers, $other_options->headers); + $other_options->headers = \array_merge($this->headers, $other_options->headers); + return $other_options; } @@ -51,51 +74,75 @@ class RequestOptions public function discardNonPersistentHeaders() { foreach ($this->headers as $k => $v) { - if (!in_array($k, self::$HEADERS_TO_PERSIST)) { + if (!\in_array($k, self::$HEADERS_TO_PERSIST, true)) { unset($this->headers[$k]); } } } /** - * Unpacks an options array into an RequestOptions object - * @param array|string|null $options a key => value array + * Unpacks an options array into an RequestOptions object. + * + * @param null|array|RequestOptions|string $options a key => value array + * @param bool $strict when true, forbid string form and arbitrary keys in array form + * + * @throws \Stripe\Exception\InvalidArgumentException * * @return RequestOptions */ - public static function parse($options) + public static function parse($options, $strict = false) { if ($options instanceof self) { return $options; } - if (is_null($options)) { + if (null === $options) { return new RequestOptions(null, [], null); } - if (is_string($options)) { + if (\is_string($options)) { + if ($strict) { + $message = 'Do not pass a string for request options. If you want to set the ' + . 'API key, pass an array like ["api_key" => <apiKey>] instead.'; + + throw new \Stripe\Exception\InvalidArgumentException($message); + } + return new RequestOptions($options, [], null); } - if (is_array($options)) { + if (\is_array($options)) { $headers = []; $key = null; $base = null; - if (array_key_exists('api_key', $options)) { + + if (\array_key_exists('api_key', $options)) { $key = $options['api_key']; + unset($options['api_key']); } - if (array_key_exists('idempotency_key', $options)) { + if (\array_key_exists('idempotency_key', $options)) { $headers['Idempotency-Key'] = $options['idempotency_key']; + unset($options['idempotency_key']); } - if (array_key_exists('stripe_account', $options)) { + if (\array_key_exists('stripe_account', $options)) { $headers['Stripe-Account'] = $options['stripe_account']; + unset($options['stripe_account']); } - if (array_key_exists('stripe_version', $options)) { + if (\array_key_exists('stripe_version', $options)) { $headers['Stripe-Version'] = $options['stripe_version']; + unset($options['stripe_version']); } - if (array_key_exists('api_base', $options)) { + if (\array_key_exists('api_base', $options)) { $base = $options['api_base']; + unset($options['api_base']); } + + if ($strict && !empty($options)) { + $message = 'Got unexpected keys in options array: ' . \implode(', ', \array_keys($options)); + + throw new \Stripe\Exception\InvalidArgumentException($message); + } + return new RequestOptions($key, $headers, $base); } @@ -103,6 +150,19 @@ class RequestOptions . 'optional per-request apiKey, which must be a string, or ' . 'per-request options, which must be an array. (HINT: you can set ' . 'a global apiKey by "Stripe::setApiKey(<apiKey>)")'; - throw new Error\Api($message); + + throw new \Stripe\Exception\InvalidArgumentException($message); + } + + private function redactedApiKey() + { + $pieces = \explode('_', $this->apiKey, 3); + $last = \array_pop($pieces); + $redactedLast = \strlen($last) > 4 + ? (\str_repeat('*', \strlen($last) - 4) . \substr($last, -4)) + : $last; + $pieces[] = $redactedLast; + + return \implode('_', $pieces); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/Set.php b/htdocs/includes/stripe/stripe-php/lib/Util/Set.php index d8beb8b1a39..017f9297856 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/Set.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/Set.php @@ -2,8 +2,8 @@ namespace Stripe\Util; -use IteratorAggregate; use ArrayIterator; +use IteratorAggregate; class Set implements IteratorAggregate { @@ -34,7 +34,7 @@ class Set implements IteratorAggregate public function toArray() { - return array_keys($this->_elts); + return \array_keys($this->_elts); } public function getIterator() diff --git a/htdocs/includes/stripe/stripe-php/lib/Util/Util.php b/htdocs/includes/stripe/stripe-php/lib/Util/Util.php index dd8677aa099..4f390500a8d 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Util/Util.php +++ b/htdocs/includes/stripe/stripe-php/lib/Util/Util.php @@ -15,211 +15,110 @@ abstract class Util * integers starting at 0. Empty arrays are considered to be lists. * * @param array|mixed $array - * @return boolean true if the given object is a list. + * + * @return bool true if the given object is a list */ public static function isList($array) { - if (!is_array($array)) { + if (!\is_array($array)) { return false; } - if ($array === []) { + if ([] === $array) { return true; } - if (array_keys($array) !== range(0, count($array) - 1)) { + if (\array_keys($array) !== \range(0, \count($array) - 1)) { return false; } - return true; - } - /** - * Recursively converts the PHP Stripe object to an array. - * - * @param array $values The PHP Stripe object to convert. - * @return array - */ - public static function convertStripeObjectToArray($values) - { - $results = []; - foreach ($values as $k => $v) { - // FIXME: this is an encapsulation violation - if ($k[0] == '_') { - continue; - } - if ($v instanceof StripeObject) { - $results[$k] = $v->__toArray(true); - } elseif (is_array($v)) { - $results[$k] = self::convertStripeObjectToArray($v); - } else { - $results[$k] = $v; - } - } - return $results; + return true; } /** * Converts a response from the Stripe API to the corresponding PHP object. * - * @param array $resp The response from the Stripe API. + * @param array $resp the response from the Stripe API * @param array $opts - * @return StripeObject|array + * + * @return array|StripeObject */ public static function convertToStripeObject($resp, $opts) { - $types = [ - // data structures - \Stripe\Collection::OBJECT_NAME => 'Stripe\\Collection', - - // business objects - \Stripe\Account::OBJECT_NAME => 'Stripe\\Account', - \Stripe\AccountLink::OBJECT_NAME => 'Stripe\\AccountLink', - \Stripe\AlipayAccount::OBJECT_NAME => 'Stripe\\AlipayAccount', - \Stripe\ApplePayDomain::OBJECT_NAME => 'Stripe\\ApplePayDomain', - \Stripe\ApplicationFee::OBJECT_NAME => 'Stripe\\ApplicationFee', - \Stripe\Balance::OBJECT_NAME => 'Stripe\\Balance', - \Stripe\BalanceTransaction::OBJECT_NAME => 'Stripe\\BalanceTransaction', - \Stripe\BankAccount::OBJECT_NAME => 'Stripe\\BankAccount', - \Stripe\BitcoinReceiver::OBJECT_NAME => 'Stripe\\BitcoinReceiver', - \Stripe\BitcoinTransaction::OBJECT_NAME => 'Stripe\\BitcoinTransaction', - \Stripe\Capability::OBJECT_NAME => 'Stripe\\Capability', - \Stripe\Card::OBJECT_NAME => 'Stripe\\Card', - \Stripe\Charge::OBJECT_NAME => 'Stripe\\Charge', - \Stripe\Checkout\Session::OBJECT_NAME => 'Stripe\\Checkout\\Session', - \Stripe\CountrySpec::OBJECT_NAME => 'Stripe\\CountrySpec', - \Stripe\Coupon::OBJECT_NAME => 'Stripe\\Coupon', - \Stripe\CreditNote::OBJECT_NAME => 'Stripe\\CreditNote', - \Stripe\Customer::OBJECT_NAME => 'Stripe\\Customer', - \Stripe\CustomerBalanceTransaction::OBJECT_NAME => 'Stripe\\CustomerBalanceTransaction', - \Stripe\Discount::OBJECT_NAME => 'Stripe\\Discount', - \Stripe\Dispute::OBJECT_NAME => 'Stripe\\Dispute', - \Stripe\EphemeralKey::OBJECT_NAME => 'Stripe\\EphemeralKey', - \Stripe\Event::OBJECT_NAME => 'Stripe\\Event', - \Stripe\ExchangeRate::OBJECT_NAME => 'Stripe\\ExchangeRate', - \Stripe\ApplicationFeeRefund::OBJECT_NAME => 'Stripe\\ApplicationFeeRefund', - \Stripe\File::OBJECT_NAME => 'Stripe\\File', - \Stripe\File::OBJECT_NAME_ALT => 'Stripe\\File', - \Stripe\FileLink::OBJECT_NAME => 'Stripe\\FileLink', - \Stripe\Invoice::OBJECT_NAME => 'Stripe\\Invoice', - \Stripe\InvoiceItem::OBJECT_NAME => 'Stripe\\InvoiceItem', - \Stripe\InvoiceLineItem::OBJECT_NAME => 'Stripe\\InvoiceLineItem', - \Stripe\IssuerFraudRecord::OBJECT_NAME => 'Stripe\\IssuerFraudRecord', - \Stripe\Issuing\Authorization::OBJECT_NAME => 'Stripe\\Issuing\\Authorization', - \Stripe\Issuing\Card::OBJECT_NAME => 'Stripe\\Issuing\\Card', - \Stripe\Issuing\CardDetails::OBJECT_NAME => 'Stripe\\Issuing\\CardDetails', - \Stripe\Issuing\Cardholder::OBJECT_NAME => 'Stripe\\Issuing\\Cardholder', - \Stripe\Issuing\Dispute::OBJECT_NAME => 'Stripe\\Issuing\\Dispute', - \Stripe\Issuing\Transaction::OBJECT_NAME => 'Stripe\\Issuing\\Transaction', - \Stripe\LoginLink::OBJECT_NAME => 'Stripe\\LoginLink', - \Stripe\Order::OBJECT_NAME => 'Stripe\\Order', - \Stripe\OrderItem::OBJECT_NAME => 'Stripe\\OrderItem', - \Stripe\OrderReturn::OBJECT_NAME => 'Stripe\\OrderReturn', - \Stripe\PaymentIntent::OBJECT_NAME => 'Stripe\\PaymentIntent', - \Stripe\PaymentMethod::OBJECT_NAME => 'Stripe\\PaymentMethod', - \Stripe\Payout::OBJECT_NAME => 'Stripe\\Payout', - \Stripe\Person::OBJECT_NAME => 'Stripe\\Person', - \Stripe\Plan::OBJECT_NAME => 'Stripe\\Plan', - \Stripe\Product::OBJECT_NAME => 'Stripe\\Product', - \Stripe\Radar\EarlyFraudWarning::OBJECT_NAME => 'Stripe\\Radar\\EarlyFraudWarning', - \Stripe\Radar\ValueList::OBJECT_NAME => 'Stripe\\Radar\\ValueList', - \Stripe\Radar\ValueListItem::OBJECT_NAME => 'Stripe\\Radar\\ValueListItem', - \Stripe\Recipient::OBJECT_NAME => 'Stripe\\Recipient', - \Stripe\RecipientTransfer::OBJECT_NAME => 'Stripe\\RecipientTransfer', - \Stripe\Refund::OBJECT_NAME => 'Stripe\\Refund', - \Stripe\Reporting\ReportRun::OBJECT_NAME => 'Stripe\\Reporting\\ReportRun', - \Stripe\Reporting\ReportType::OBJECT_NAME => 'Stripe\\Reporting\\ReportType', - \Stripe\Review::OBJECT_NAME => 'Stripe\\Review', - \Stripe\SetupIntent::OBJECT_NAME => 'Stripe\\SetupIntent', - \Stripe\SKU::OBJECT_NAME => 'Stripe\\SKU', - \Stripe\Sigma\ScheduledQueryRun::OBJECT_NAME => 'Stripe\\Sigma\\ScheduledQueryRun', - \Stripe\Source::OBJECT_NAME => 'Stripe\\Source', - \Stripe\SourceTransaction::OBJECT_NAME => 'Stripe\\SourceTransaction', - \Stripe\Subscription::OBJECT_NAME => 'Stripe\\Subscription', - \Stripe\SubscriptionItem::OBJECT_NAME => 'Stripe\\SubscriptionItem', - \Stripe\SubscriptionSchedule::OBJECT_NAME => 'Stripe\\SubscriptionSchedule', - \Stripe\TaxId::OBJECT_NAME => 'Stripe\\TaxId', - \Stripe\TaxRate::OBJECT_NAME => 'Stripe\\TaxRate', - \Stripe\ThreeDSecure::OBJECT_NAME => 'Stripe\\ThreeDSecure', - \Stripe\Terminal\ConnectionToken::OBJECT_NAME => 'Stripe\\Terminal\\ConnectionToken', - \Stripe\Terminal\Location::OBJECT_NAME => 'Stripe\\Terminal\\Location', - \Stripe\Terminal\Reader::OBJECT_NAME => 'Stripe\\Terminal\\Reader', - \Stripe\Token::OBJECT_NAME => 'Stripe\\Token', - \Stripe\Topup::OBJECT_NAME => 'Stripe\\Topup', - \Stripe\Transfer::OBJECT_NAME => 'Stripe\\Transfer', - \Stripe\TransferReversal::OBJECT_NAME => 'Stripe\\TransferReversal', - \Stripe\UsageRecord::OBJECT_NAME => 'Stripe\\UsageRecord', - \Stripe\UsageRecordSummary::OBJECT_NAME => 'Stripe\\UsageRecordSummary', - \Stripe\WebhookEndpoint::OBJECT_NAME => 'Stripe\\WebhookEndpoint', - ]; + $types = \Stripe\Util\ObjectTypes::mapping; if (self::isList($resp)) { $mapped = []; foreach ($resp as $i) { - array_push($mapped, self::convertToStripeObject($i, $opts)); + $mapped[] = self::convertToStripeObject($i, $opts); } + return $mapped; - } elseif (is_array($resp)) { - if (isset($resp['object']) && is_string($resp['object']) && isset($types[$resp['object']])) { + } + if (\is_array($resp)) { + if (isset($resp['object']) && \is_string($resp['object']) && isset($types[$resp['object']])) { $class = $types[$resp['object']]; } else { - $class = 'Stripe\\StripeObject'; + $class = \Stripe\StripeObject::class; } + return $class::constructFrom($resp, $opts); - } else { - return $resp; } + + return $resp; } /** - * @param string|mixed $value A string to UTF8-encode. + * @param mixed|string $value a string to UTF8-encode * - * @return string|mixed The UTF8-encoded string, or the object passed in if - * it wasn't a string. + * @return mixed|string the UTF8-encoded string, or the object passed in if + * it wasn't a string */ public static function utf8($value) { - if (self::$isMbstringAvailable === null) { - self::$isMbstringAvailable = function_exists('mb_detect_encoding'); + if (null === self::$isMbstringAvailable) { + self::$isMbstringAvailable = \function_exists('mb_detect_encoding'); if (!self::$isMbstringAvailable) { - trigger_error("It looks like the mbstring extension is not enabled. " . - "UTF-8 strings will not properly be encoded. Ask your system " . - "administrator to enable the mbstring extension, or write to " . - "support@stripe.com if you have any questions.", E_USER_WARNING); + \trigger_error('It looks like the mbstring extension is not enabled. ' . + 'UTF-8 strings will not properly be encoded. Ask your system ' . + 'administrator to enable the mbstring extension, or write to ' . + 'support@stripe.com if you have any questions.', \E_USER_WARNING); } } - if (is_string($value) && self::$isMbstringAvailable && mb_detect_encoding($value, "UTF-8", true) != "UTF-8") { - return utf8_encode($value); - } else { - return $value; + if (\is_string($value) && self::$isMbstringAvailable && 'UTF-8' !== \mb_detect_encoding($value, 'UTF-8', true)) { + return \utf8_encode($value); } + + return $value; } /** * Compares two strings for equality. The time taken is independent of the * number of characters that match. * - * @param string $a one of the strings to compare. - * @param string $b the other string to compare. - * @return bool true if the strings are equal, false otherwise. + * @param string $a one of the strings to compare + * @param string $b the other string to compare + * + * @return bool true if the strings are equal, false otherwise */ public static function secureCompare($a, $b) { - if (self::$isHashEqualsAvailable === null) { - self::$isHashEqualsAvailable = function_exists('hash_equals'); + if (null === self::$isHashEqualsAvailable) { + self::$isHashEqualsAvailable = \function_exists('hash_equals'); } if (self::$isHashEqualsAvailable) { - return hash_equals($a, $b); - } else { - if (strlen($a) != strlen($b)) { - return false; - } - - $result = 0; - for ($i = 0; $i < strlen($a); $i++) { - $result |= ord($a[$i]) ^ ord($b[$i]); - } - return ($result == 0); + return \hash_equals($a, $b); } + if (\strlen($a) !== \strlen($b)) { + return false; + } + + $result = 0; + for ($i = 0; $i < \strlen($a); ++$i) { + $result |= \ord($a[$i]) ^ \ord($b[$i]); + } + + return 0 === $result; } /** @@ -228,30 +127,35 @@ abstract class Util * Also clears out null values. * * @param mixed $h + * * @return mixed */ public static function objectsToIds($h) { if ($h instanceof \Stripe\ApiResource) { return $h->id; - } elseif (static::isList($h)) { + } + if (static::isList($h)) { $results = []; foreach ($h as $v) { - array_push($results, static::objectsToIds($v)); + $results[] = static::objectsToIds($v); } + return $results; - } elseif (is_array($h)) { + } + if (\is_array($h)) { $results = []; foreach ($h as $k => $v) { - if (is_null($v)) { + if (null === $v) { continue; } $results[$k] = static::objectsToIds($v); } + return $results; - } else { - return $h; } + + return $h; } /** @@ -265,14 +169,15 @@ abstract class Util $pieces = []; foreach ($flattenedParams as $param) { list($k, $v) = $param; - array_push($pieces, self::urlEncode($k) . '=' . self::urlEncode($v)); + $pieces[] = self::urlEncode($k) . '=' . self::urlEncode($v); } - return implode('&', $pieces); + + return \implode('&', $pieces); } /** * @param array $params - * @param string|null $parentKey + * @param null|string $parentKey * * @return array */ @@ -284,11 +189,11 @@ abstract class Util $calculatedKey = $parentKey ? "{$parentKey}[{$key}]" : $key; if (self::isList($value)) { - $result = array_merge($result, self::flattenParamsList($value, $calculatedKey)); - } elseif (is_array($value)) { - $result = array_merge($result, self::flattenParams($value, $calculatedKey)); + $result = \array_merge($result, self::flattenParamsList($value, $calculatedKey)); + } elseif (\is_array($value)) { + $result = \array_merge($result, self::flattenParams($value, $calculatedKey)); } else { - array_push($result, [$calculatedKey, $value]); + \array_push($result, [$calculatedKey, $value]); } } @@ -307,11 +212,11 @@ abstract class Util foreach ($value as $i => $elem) { if (self::isList($elem)) { - $result = array_merge($result, self::flattenParamsList($elem, $calculatedKey)); - } elseif (is_array($elem)) { - $result = array_merge($result, self::flattenParams($elem, "{$calculatedKey}[{$i}]")); + $result = \array_merge($result, self::flattenParamsList($elem, $calculatedKey)); + } elseif (\is_array($elem)) { + $result = \array_merge($result, self::flattenParams($elem, "{$calculatedKey}[{$i}]")); } else { - array_push($result, ["{$calculatedKey}[{$i}]", $elem]); + \array_push($result, ["{$calculatedKey}[{$i}]", $elem]); } } @@ -319,42 +224,42 @@ abstract class Util } /** - * @param string $key A string to URL-encode. + * @param string $key a string to URL-encode * - * @return string The URL-encoded string. + * @return string the URL-encoded string */ public static function urlEncode($key) { - $s = urlencode($key); + $s = \urlencode((string) $key); // Don't use strict form encoding by changing the square bracket control // characters back to their literals. This is fine by the server, and // makes these parameter strings easier to read. - $s = str_replace('%5B', '[', $s); - $s = str_replace('%5D', ']', $s); + $s = \str_replace('%5B', '[', $s); - return $s; + return \str_replace('%5D', ']', $s); } public static function normalizeId($id) { - if (is_array($id)) { + if (\is_array($id)) { $params = $id; $id = $params['id']; unset($params['id']); } else { $params = []; } + return [$id, $params]; } /** - * Returns UNIX timestamp in milliseconds + * Returns UNIX timestamp in milliseconds. * - * @return integer current time in millis + * @return int current time in millis */ public static function currentTimeMillis() { - return (int) round(microtime(true) * 1000); + return (int) \round(\microtime(true) * 1000); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/Webhook.php b/htdocs/includes/stripe/stripe-php/lib/Webhook.php index 45c7dc0f30a..b9db2d6c056 100644 --- a/htdocs/includes/stripe/stripe-php/lib/Webhook.php +++ b/htdocs/includes/stripe/stripe-php/lib/Webhook.php @@ -7,34 +7,36 @@ abstract class Webhook const DEFAULT_TOLERANCE = 300; /** - * Returns an Event instance using the provided JSON payload. Throws a - * \UnexpectedValueException if the payload is not valid JSON, and a - * \Stripe\SignatureVerificationException if the signature verification - * fails for any reason. + * Returns an Event instance using the provided JSON payload. Throws an + * Exception\UnexpectedValueException if the payload is not valid JSON, and + * an Exception\SignatureVerificationException if the signature + * verification fails for any reason. * - * @param string $payload the payload sent by Stripe. + * @param string $payload the payload sent by Stripe * @param string $sigHeader the contents of the signature header sent by - * Stripe. - * @param string $secret secret used to generate the signature. + * Stripe + * @param string $secret secret used to generate the signature * @param int $tolerance maximum difference allowed between the header's * timestamp and the current time - * @return \Stripe\Event the Event instance - * @throws \UnexpectedValueException if the payload is not valid JSON, - * @throws \Stripe\Error\SignatureVerification if the verification fails. + * + * @throws Exception\UnexpectedValueException if the payload is not valid JSON, + * @throws Exception\SignatureVerificationException if the verification fails + * + * @return Event the Event instance */ public static function constructEvent($payload, $sigHeader, $secret, $tolerance = self::DEFAULT_TOLERANCE) { WebhookSignature::verifyHeader($payload, $sigHeader, $secret, $tolerance); - $data = json_decode($payload, true); - $jsonError = json_last_error(); - if ($data === null && $jsonError !== JSON_ERROR_NONE) { - $msg = "Invalid payload: $payload " - . "(json_last_error() was $jsonError)"; - throw new \UnexpectedValueException($msg); - } - $event = Event::constructFrom($data); + $data = \json_decode($payload, true); + $jsonError = \json_last_error(); + if (null === $data && \JSON_ERROR_NONE !== $jsonError) { + $msg = "Invalid payload: {$payload} " + . "(json_last_error() was {$jsonError})"; - return $event; + throw new Exception\UnexpectedValueException($msg); + } + + return Event::constructFrom($data); } } diff --git a/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php b/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php index 636c7e1927d..96333d1324f 100644 --- a/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php +++ b/htdocs/includes/stripe/stripe-php/lib/WebhookEndpoint.php @@ -1,24 +1,37 @@ <?php +// File generated from our OpenAPI spec + namespace Stripe; /** - * Class WebhookEndpoint + * You can configure <a href="https://stripe.com/docs/webhooks/">webhook + * endpoints</a> via the API to be notified about events that happen in your Stripe + * account or connected accounts. * - * @property string $id - * @property string $object - * @property int $created - * @property string[] $enabled_events - * @property bool $livemode - * @property string $secret - * @property string $status - * @property string $url + * Most users configure webhooks from <a + * href="https://dashboard.stripe.com/webhooks">the dashboard</a>, which provides a + * user interface for registering and testing your webhook endpoints. * - * @package Stripe + * Related guide: <a href="https://stripe.com/docs/webhooks/configure">Setting up + * Webhooks</a>. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property null|string $api_version The API version events are rendered as for this webhook endpoint. + * @property null|string $application The ID of the associated Connect application. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $description An optional description of what the webhook is used for. + * @property string[] $enabled_events The list of events to enable for this endpoint. <code>['*']</code> indicates that all events are enabled, except those that require explicit selection. + * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $secret The endpoint's secret, used to generate <a href="https://stripe.com/docs/webhooks/signatures">webhook signatures</a>. Only returned at creation. + * @property string $status The status of the webhook. It can be <code>enabled</code> or <code>disabled</code>. + * @property string $url The URL of the webhook endpoint. */ class WebhookEndpoint extends ApiResource { - const OBJECT_NAME = "webhook_endpoint"; + const OBJECT_NAME = 'webhook_endpoint'; use ApiOperations\All; use ApiOperations\Create; diff --git a/htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php b/htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php index 9f8be8777b3..46cbb28b559 100644 --- a/htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php +++ b/htdocs/includes/stripe/stripe-php/lib/WebhookSignature.php @@ -4,20 +4,22 @@ namespace Stripe; abstract class WebhookSignature { - const EXPECTED_SCHEME = "v1"; + const EXPECTED_SCHEME = 'v1'; /** - * Verifies the signature header sent by Stripe. Throws a - * SignatureVerification exception if the verification fails for any - * reason. + * Verifies the signature header sent by Stripe. Throws an + * Exception\SignatureVerificationException exception if the verification fails for + * any reason. * - * @param string $payload the payload sent by Stripe. + * @param string $payload the payload sent by Stripe * @param string $header the contents of the signature header sent by - * Stripe. - * @param string $secret secret used to generate the signature. + * Stripe + * @param string $secret secret used to generate the signature * @param int $tolerance maximum difference allowed between the header's * timestamp and the current time - * @throws \Stripe\Error\SignatureVerification if the verification fails. + * + * @throws Exception\SignatureVerificationException if the verification fails + * * @return bool */ public static function verifyHeader($payload, $header, $secret, $tolerance = null) @@ -25,46 +27,47 @@ abstract class WebhookSignature // Extract timestamp and signatures from header $timestamp = self::getTimestamp($header); $signatures = self::getSignatures($header, self::EXPECTED_SCHEME); - if ($timestamp == -1) { - throw new Error\SignatureVerification( - "Unable to extract timestamp and signatures from header", - $header, - $payload + if (-1 === $timestamp) { + throw Exception\SignatureVerificationException::factory( + 'Unable to extract timestamp and signatures from header', + $payload, + $header ); } if (empty($signatures)) { - throw new Error\SignatureVerification( - "No signatures found with expected scheme", - $header, - $payload + throw Exception\SignatureVerificationException::factory( + 'No signatures found with expected scheme', + $payload, + $header ); } // Check if expected signature is found in list of signatures from // header - $signedPayload = "$timestamp.$payload"; + $signedPayload = "{$timestamp}.{$payload}"; $expectedSignature = self::computeSignature($signedPayload, $secret); $signatureFound = false; foreach ($signatures as $signature) { if (Util\Util::secureCompare($expectedSignature, $signature)) { $signatureFound = true; + break; } } if (!$signatureFound) { - throw new Error\SignatureVerification( - "No signatures found matching the expected signature for payload", - $header, - $payload + throw Exception\SignatureVerificationException::factory( + 'No signatures found matching the expected signature for payload', + $payload, + $header ); } // Check if timestamp is within tolerance - if (($tolerance > 0) && (abs(time() - $timestamp) > $tolerance)) { - throw new Error\SignatureVerification( - "Timestamp outside the tolerance zone", - $header, - $payload + if (($tolerance > 0) && (\abs(\time() - $timestamp) > $tolerance)) { + throw Exception\SignatureVerificationException::factory( + 'Timestamp outside the tolerance zone', + $payload, + $header ); } @@ -75,20 +78,22 @@ abstract class WebhookSignature * Extracts the timestamp in a signature header. * * @param string $header the signature header + * * @return int the timestamp contained in the header, or -1 if no valid * timestamp is found */ private static function getTimestamp($header) { - $items = explode(",", $header); + $items = \explode(',', $header); foreach ($items as $item) { - $itemParts = explode("=", $item, 2); - if ($itemParts[0] == "t") { - if (!is_numeric($itemParts[1])) { + $itemParts = \explode('=', $item, 2); + if ('t' === $itemParts[0]) { + if (!\is_numeric($itemParts[1])) { return -1; } - return intval($itemParts[1]); + + return (int) ($itemParts[1]); } } @@ -99,18 +104,19 @@ abstract class WebhookSignature * Extracts the signatures matching a given scheme in a signature header. * * @param string $header the signature header - * @param string $scheme the signature scheme to look for. - * @return array the list of signatures matching the provided scheme. + * @param string $scheme the signature scheme to look for + * + * @return array the list of signatures matching the provided scheme */ private static function getSignatures($header, $scheme) { $signatures = []; - $items = explode(",", $header); + $items = \explode(',', $header); foreach ($items as $item) { - $itemParts = explode("=", $item, 2); - if ($itemParts[0] == $scheme) { - array_push($signatures, $itemParts[1]); + $itemParts = \explode('=', $item, 2); + if (\trim($itemParts[0]) === $scheme) { + $signatures[] = $itemParts[1]; } } @@ -122,12 +128,13 @@ abstract class WebhookSignature * * The current scheme used by Stripe ("v1") is HMAC/SHA-256. * - * @param string $payload the payload to sign. - * @param string $secret the secret used to generate the signature. - * @return string the signature as a string. + * @param string $payload the payload to sign + * @param string $secret the secret used to generate the signature + * + * @return string the signature as a string */ private static function computeSignature($payload, $secret) { - return hash_hmac("sha256", $payload, $secret); + return \hash_hmac('sha256', $payload, $secret); } } diff --git a/htdocs/includes/stripe/stripe-php/phpdoc.dist.xml b/htdocs/includes/stripe/stripe-php/phpdoc.dist.xml new file mode 100644 index 00000000000..b1ea92fadc4 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/phpdoc.dist.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<phpdocumentor + configVersion="3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://www.phpdoc.org" + xsi:noNamespaceSchemaLocation="data/xsd/phpdoc.xsd" +> + <paths> + <output>build/phpdoc</output> + </paths> + <version number="3.0.0"> + <folder>latest</folder> + <api> + <source dsn="."> + <path>lib</path> + </source> + <output>api</output> + <ignore hidden="true" symlinks="true"> + <path>build/**/*</path> + <path>examples/**/*</path> + <path>tests/**/*</path> + <path>vendor/**/*</path> + </ignore> + <extensions> + <extension>php</extension> + </extensions> + <default-package-name>stripe-php</default-package-name> + </api> + </version> + <template name="default"/> +</phpdocumentor> diff --git a/htdocs/includes/stripe/stripe-php/phpstan-baseline.neon b/htdocs/includes/stripe/stripe-php/phpstan-baseline.neon new file mode 100644 index 00000000000..882318a7a54 --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/phpstan-baseline.neon @@ -0,0 +1,12 @@ +parameters: + ignoreErrors: + - + message: "#^Access to undefined constant Stripe\\\\ApiResource\\:\\:OBJECT_NAME\\.$#" + count: 1 + path: lib/ApiResource.php + + - + message: "#^Access to undefined constant Stripe\\\\SingletonApiResource\\:\\:OBJECT_NAME\\.$#" + count: 1 + path: lib/SingletonApiResource.php + diff --git a/htdocs/includes/stripe/stripe-php/phpstan.neon.dist b/htdocs/includes/stripe/stripe-php/phpstan.neon.dist new file mode 100644 index 00000000000..c99645a2bab --- /dev/null +++ b/htdocs/includes/stripe/stripe-php/phpstan.neon.dist @@ -0,0 +1,11 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 1 + + bootstrapFiles: + - tests/bootstrap.php + + ignoreErrors: + - '#Unsafe usage of new static\(\).#' diff --git a/htdocs/includes/stripe/stripe-php/update_certs.php b/htdocs/includes/stripe/stripe-php/update_certs.php index daba4a05099..a73622cca77 100755 --- a/htdocs/includes/stripe/stripe-php/update_certs.php +++ b/htdocs/includes/stripe/stripe-php/update_certs.php @@ -1,19 +1,19 @@ #!/usr/bin/env php <?php -chdir(dirname(__FILE__)); +\chdir(__DIR__); -set_time_limit(0); // unlimited max execution time +\set_time_limit(0); // unlimited max execution time -$fp = fopen(dirname(__FILE__) . '/data/ca-certificates.crt', 'w+'); +$fp = \fopen(__DIR__ . '/data/ca-certificates.crt', 'w+b'); -$options = array( - CURLOPT_FILE => $fp, - CURLOPT_TIMEOUT => 3600, - CURLOPT_URL => 'https://curl.haxx.se/ca/cacert.pem', -); +$options = [ + \CURLOPT_FILE => $fp, + \CURLOPT_TIMEOUT => 3600, + \CURLOPT_URL => 'https://curl.haxx.se/ca/cacert.pem', +]; -$ch = curl_init(); -curl_setopt_array($ch, $options); -curl_exec($ch); -curl_close($ch); -fclose($fp); +$ch = \curl_init(); +\curl_setopt_array($ch, $options); +\curl_exec($ch); +\curl_close($ch); +\fclose($fp); diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/AUTHORS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/AUTHORS deleted file mode 100644 index 48073dad73f..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/AUTHORS +++ /dev/null @@ -1,53 +0,0 @@ -abysta at yandex.ru -Adrian Schroeter -Aleksey Chalabyan -Andrey Valentinovich Panov -Ben Laenen -Besarion Gugushvili -Bhikkhu Pesala -Clayborne Arevalo -Dafydd Harries -Danilo Segan -Davide Viti -David Jez -David Lawrence Ramsey -Denis Jacquerye -Dwayne Bailey -Eugeniy Meshcheryakov -Gee Fung Sit -Heikki Lindroos -James Cloos -James Crippen -John Karp -Keenan Pepper -Lars Naesbye Christensen -Lior Halphon -MaEr -Mashrab Kuvatov -Max Berger -Mederic Boquien -Michael Everson -MihailJP -Misu Moldovan -Nguyen Thai Ngoc Duy -Nicolas Mailhot -Norayr Chilingarian -Ognyan Kulev -Ondrej Koala Vacha -Peter Cernak -Remy Oudompheng -Roozbeh Pournader -Rouben Hakobian -Sahak Petrosyan -Sander Vesik -Stepan Roh -Stephen Hartke -Steve Tinney -Tavmjong Bah -Thomas Henlich -Tim May -Valentin Stoykov -Vasek Stodulka -Wesley Transue - -$Id: AUTHORS 2461 2011-02-18 16:38:20Z ben_laenen $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/BUGS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/BUGS deleted file mode 100644 index 49b36de5536..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/BUGS +++ /dev/null @@ -1,3 +0,0 @@ -See http://dejavu.sourceforge.net/wiki/index.php/Bugs - -$Id: BUGS 80 2004-11-13 13:12:02Z src $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/LICENSE b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/LICENSE deleted file mode 100644 index 254e2cc42a6..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/LICENSE +++ /dev/null @@ -1,99 +0,0 @@ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. -Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) - -Bitstream Vera Fonts Copyright ------------------------------- - -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is -a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license ("Fonts") and associated -documentation files (the "Font Software"), to reproduce and distribute the -Font Software, including without limitation the rights to use, copy, merge, -publish, distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to the -following conditions: - -The above copyright and trademark notices and this permission notice shall -be included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional glyphs or characters may be added to the Fonts, only if the fonts -are renamed to names not containing either the words "Bitstream" or the word -"Vera". - -This License becomes null and void to the extent applicable to Fonts or Font -Software that has been modified and is distributed under the "Bitstream -Vera" names. - -The Font Software may be sold as part of a larger software package but no -copy of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING -ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE -FONT SOFTWARE. - -Except as contained in this notice, the names of Gnome, the Gnome -Foundation, and Bitstream Inc., shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this Font Software -without prior written authorization from the Gnome Foundation or Bitstream -Inc., respectively. For further information, contact: fonts at gnome dot -org. - -Arev Fonts Copyright ------------------------------- - -Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the fonts accompanying this license ("Fonts") and -associated documentation files (the "Font Software"), to reproduce -and distribute the modifications to the Bitstream Vera Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to -the following conditions: - -The above copyright and trademark notices and this permission notice -shall be included in all copies of one or more of the Font Software -typefaces. - -The Font Software may be modified, altered, or added to, and in -particular the designs of glyphs or characters in the Fonts may be -modified and additional glyphs or characters may be added to the -Fonts, only if the fonts are renamed to names not containing either -the words "Tavmjong Bah" or the word "Arev". - -This License becomes null and void to the extent applicable to Fonts -or Font Software that has been modified and is distributed under the -"Tavmjong Bah Arev" names. - -The Font Software may be sold as part of a larger software package but -no copy of one or more of the Font Software typefaces may be sold by -itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL -TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the name of Tavmjong Bah shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Font Software without prior written authorization -from Tavmjong Bah. For further information, contact: tavmjong @ free -. fr. - -$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/NEWS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/NEWS deleted file mode 100644 index 87e3d5e53a0..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/NEWS +++ /dev/null @@ -1,1315 +0,0 @@ -Changes from 2.32 to 2.33 - -* added Old Italic block to Sans (by MaEr) -* added U+051E, U+051F to Sans (by MaEr) -* added U+01BA, U+0372-U+0373, U+0376-U+0377, U+03CF, U+1D00-U+1D01, - U+1D03-U+1D07, U+1D0A-U+1D13, U+1D15, U+1D18-U+1D1C, U+1D20-U+1D2B, - U+1D2F, U+1D3D, U+1D5C-U+1D61, U+1D66-U+1D6B, U+1DB8, U+1E9C-U+1E9D, - U+1EFA-U+1EFB, U+2C60-U+2C61, U+2C63, U+A726-U+A73C, U+A73E-U+A73F, - U+A746-U+A747, U+A74A-U+A74B, U+A74E+U+A74F, U+A768-U+A769, U+A77B-U+A77C, - U+A780-U+A787, U+A790-U+A791, U+A7FA-U+A7FF to Serif (by Gee Fung Sit 薛至峰) -* added alternate forms to U+014A and U+01B7 in Serif (by Gee Fung Sit 薛至峰) -* typographical improvements to U+0166-U+0167, U+0197, U+01B5-U+01B6, U+01BB, - U+0222-U+0223, U+023D, U+0250-U+0252, U+026E, U+0274, U+028F, U+029F, - U+02A3-U+02A5, U+02AB, U+03FE-U+03FF, U+1D02, U+1D14, U+1D1D-U+1D1F, U+1D3B, - U+1D43-U+1D46, U+1D59, U+1D9B, U+2C71, U+2C73 in Serif (by Gee Fung Sit 薛至峰) -* fixed bugs #31762 and #34700 plus other small fixes (wrong direction, - duplicate points, etc.) for Sans and Serif (by Gee Fung Sit 薛至峰) -* added U+204B to Mono (by Gee Fung Sit 薛至峰) -* added U+26E2 to Sans (by Gee Fung Sit 薛至峰) -* added Playing Cards block (U+1F0A0-U+1F0DF) to Sans (by Gee Fung Sit 薛至峰) -* emoticons in Sans: replace U+2639-U+263B with better versions, add - U+1F601-U+1F610, U+1F612-U+1F614, U+1F616, U+1F618, U+1F61A, U+1F61C-U+1F61E, - U+1F620-U+1F624, U+1F625, U+1F628-U+1F62B, U+1F62D, U+1F630-U+1F633, - U+1F635-U+1F640 (by Ben Laenen and Denis Jacquerye) -* added U+A78E, U+A790-U+A791 to Sans and Mono (by Denis Jacquerye) -* added U+A7FA to Sans (by Denis Jacquerye) -* subscripts: added U+2095-U+209C to Sans, Serif and Mono, adjusted - U+1D49-U+1D4A in Sans and Mono (by Denis Jacquerye) -* added U+0243 to Mono (by Denis Jacquerye) -* adjusted U+0307 to match dot of i, replaced dotaccent U+02D9 with U+0307 in -most dependencies in Sans (by Denis Jacquerye) -* adjusted anchors of f and added them to long s in Sans (by Denis Jacquerye) -* added anchors to precomposed dependencies of D and d (by Denis Jacquerye) -* added debug glyphs U+F002 and U+F003 which will show current point size (by - Ben Laenen) -* use correct version for Serbian italic be (by Eugeniy Meshcheryakov) -* added pictograms U+1F42D-U+1F42E, U+1F431, U+1F435 (by Denis Jacquerye) -* improved Hebrew in Sans (by Lior Halphon) -* improved Armenian in Sans, and added Armenian in Serif and Mono (by Rouben - Hakobian (Tarumian), Aleksey Chalabyan and Norayr Chilingarian) -* remove "locl" feature for Romanian for S/T/s/t with cedilla/comma accent (by - Ben Laenen) -* replace wrong "dflt" script tag in Mono with "DFLT" (by Ben Laenen) - -Changes from 2.31 to 2.32 - -* added to Sans: Latin small letter p with stroke (U+1D7D), Latin capital - letter p with stroke through descender (U+A750), Latin small letter p with - stroke through descender (U+A751), Latin capital letter thorn with stroke - (U+A764), Latin small letter thorn with stroke (U+A765), Latin capital letter - thorn with stroke through descender (U+A766), Latin small letter thorn with - stroke through descender (U+A767), Latin capital letter q with stroke through - descender (U+A756), Latin small letter q with stroke through descender - (U+A757), Latin capital letter p with flourish (U+A752), Latin small letter p - with flourish (U+A753) (by Ben Laenen) -* add new Indian rupee symbol (U+20B9) to Sans, Serif and Mono (although - standardization in Unicode not complete yet, UTC did assign this code point) - (by Ben Laenen) -* Sans: adjusted U+0E3F, U+20AB, U+20AD-U+20AE, U+20B1, U+20B5, U+20B8 to have - them take up the same width as digits (by Gee Fung Sit 薛至峰) -* added U+23E8 to Sans (by Thomas Henlich) -* fixed numerous bugs (#22579, #28189, #28977, N'Ko in Windows, fixed U+FB4F, - anchors for U+0332-U+0333, made extensions in Misc. Technical connect, and - other small fixes) (by Gee Fung Sit 薛至峰) -* added looptail g as stylistic variant to Serif (by Gee Fung Sit 薛至峰) -* added the remaining precomposed characters in Latin Extended Additional in - Serif (by Gee Fung Sit 薛至峰) -* added Georgian Mkhedruli (U+10D0-U+10FC) to Sans ExtraLight (by Besarion - Gugushvili) -* fix spacing in hinting of U+042E (Ю) in Mono (by Ben Laenen) -* replaced U+2650 and minor changes to U+2640-U+2642, U+2699, U+26A2-U+26A5, - U+26B2-U+26B5, U+26B8 in Sans (by Gee Fung Sit 薛至峰) -* added U+1E9C-U+1E9D, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2150-U+2152, - U+2189, U+26C0-U+26C3, U+A722-U+A725, U+1F030-U+1F093 to Sans (by Gee Fung - Sit 薛至峰) -* added U+1E9C-U+1E9E, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2181-U+2182, - U+2185 U+A722-U+A725, to Sans ExtraLight (by Gee Fung Sit 薛至峰) -* added U+20B8, U+22A2-U+22A5, U+A722-U+A725 to Mono (by Gee Fung Sit 薛至峰) -* added U+02CD, U+01BF, U+01F7, U+0222-U+0223, U+0243-U+0244, U+0246-U+024F, - U+2150-U+2152, U+2189, U+239B-U+23AD and U+A73D to Serif (by Gee Fung Sit - 薛至峰) - -Changes from 2.30 to 2.31 - -* fixed bug where Serif Condensed Italic wouldn't get proper subfamily tags (by - Ben Laenen) -* added math operators U+2234-U+2237 to Mono (by Ben Laenen) -* removed buggy instructions of U+032D (by Eugeniy Meshcheryakov) -* added U+2C70, U+2C7E, U+2C7F to Sans and Sans Mono (by Denis Jacquerye) -* added U+2C7D to Sans Mono (by Denis Jacquerye) -* added U+2C6D, U+2C70-2C73, U+2C7E-2C7F to Serif (by Denis Jacquerye) -* added extremas to alpha U+03B1 in Serif-Italic (by Denis Jacquerye) -* added U+4A4, U+4A5 to Mono (by Andrey V. Panov) -* added Arabic letters U+0657, U+0670, U+0688-U+0690, U+0693-U+0694, - U+0696-U+0697, U+0699-U+06A0, U+06A2-U+06A3, U+06A5, U+06A7-U+06A8, - U+06AA-U+06AE, U+06B0-U+06B4, U+06B6-U+06B9, U+06BB-U+06BE and their - contextual forms to Sans (by MihailJP) -* added U+A78D LATIN CAPITAL LETTER TURNED H for coming Unicode 6.0 (by Denis - Jacquerye) - -Changes from 2.29 to 2.30 - -* added U+0462-U+0463 to Mono (by Denis Jacquerye) -* corrected U+1E53 in Serif (by Gee Fung Sit) -* added U+1E4C-U+1E4D to Mono and Serif (by Gee Fung Sit) -* added U+1E78-U+1E79 to Mono (by Gee Fung Sit) -* fixed missing diacritics in Latin Extended Additional in Sans ExtraLight - (moved stacked diacritics out of PUA in the process) (by Gee Fung Sit) -* fixed anchors on U+1E78 in Serif (by Gee Fung Sit) -* added U+1DC4-U+1DC9 to Serif (by Denis Jacquerye) -* renamed above-mark to above-mark in Serif-Italic (by Denis Jacquerye) -* added U+1DC4-U+1DC9 to context class for dotless substitution (by Denis - Jacquerye) -* changed Doubleacute to Doublegrave in Sans ExtraLight (by Gee Fung Sit) -* removed redundant reference in U+01FB in Sans Oblique (by Gee Fung Sit) -* added U+A726-U+A727 to Mono (Denis Jacquerye) -* changed U+04BE and U+04BF according to recommedations of Sasha Ankwab in Sans - (by Andrey V. Panov) -* remove "Symbol Charset" from set of codepages in Sans (by Eugeniy - Meshcheryakov) - -Changes from 2.28 to 2.29 - -* modified U+10FB in Sans to be a mirror image of U+2056, since U+10FB is not - Georgian-specific (by Roozbeh Pournader) -* added U+2B1F, U+2B24, U+2B53, U+2B54 in Sans (by Roozbeh Pournader) -* fixed TUR opentype language tag to TRK in Serif (bug 19825) (by Ben Laenen) -* early implementation of Abkhaz letter U+0524-U+0525 in Sans - (by Michael Everson and abysta) -* flipped U+1D538 in Sans (by Gee Fung Sit) -* added U+26B3-U+26B8, U+1D7D8-U+1D7E1 in Sans (by Gee Fung Sit) -* corrected U+1D7A9 in Sans Bold Oblique (by Gee Fung Sit) -* Fixed U+0649 to be dual-joining in Sans Mono (by Roozbeh Pournader) -* Remove unnecessary 'isol' feature from Sans Mono (by Roozbeh Pournader) -* Remove 'cmap' mappings for U+066E, U+066F, U+067C, U+067D, U+0681, U+0682, - U+0685, U+0692, U+06A1, U+06B5, U+06BA, U+06C6, U+06CE, and U+06D5 - in Sans Mono (bug 20323) (by Roozbeh Pournader) -* add half brackets (U+2E22 - U+2E25, by Steve Tinney) - -Changes from 2.27 to 2.28 - -* added U+A789, U+A78A in Sans and Sans Mono (by Denis Jacquerye) -* modified U+02D6, U+02D7, U+02EE in Sans and Sans Mono (by Denis Jacquerye) -* added U+1E9E (German capital ß) to Sans and Serif (by Denis Jacquerye) -* adjusted width of U+01B7-U+01B9 in Serif Italic (by Denis Jacquerye) -* modified U+021C, U+021D in Sans (by Denis Jacquerye) -* added U+021C, U+021D in Mono (by Denis Jacquerye) -* added U+F428 (Georgian Nuskhuri "f") in private use area (by Besarion - Gugushvili) -* updated Georgian mkhedruli (U+10D0-U+10FA) with new version (by Besarion - Gugushvili) -* updated Georgian asomtavruli (U+10A0-U+10C5) with new version (by Besarion - Gugushvili) -* added Georgian nuskhuri (U+2D00-U+2D25) (by Besarion Gugushvili) -* added Georgian mtavruli in private use area (U+F400-U+F426) (by Besarion - Gugushvili) -* added mark anchors above to Cyrillic U+0430-U+0438, U+043A-U+044F, - U+0454-U+0455 in Mono (by Ben Laenen) -* modified/moved up U+0318-U+0319, U+031C-U+031F, U+0329-U+032A, U+032C-U+032D, - U+0339-U+033B, U+0348 and U+0353 in Sans to prevent cut-off (by Gee Fung Sit) -* added U+035A to Sans (by Gee Fung Sit) -* updated fontconfig files (by Nicolas Mailhot) -* added U+2032-2037 to Mono (by Denis Jacquerye) -* added Ogham to Sans ExtraLight (by Gee Fung Sit) -* added U+2C6F, U+2C79, U+2C7C-2C7D to Mono (by Gee Fung Sit) -* added U+210F to Serif and Sans ExtraLight (by Gee Fung Sit) -* changed U+210F to a more common glyph in Sans and Mono (by Gee Fung Sit) - -Changes from 2.26 to 2.27 - -* added some of Michael Everson's new Cyrillic glyphs to Sans (by Wesley - Transue) -* removed blank glyph at U+05EF from Sans Bold Oblique (by Gee Fung Sit) -* small adjustments to existing tone bars in Sans and Mono (by Gee Fung Sit) -* added U+0372-U+0373, U+0376-U+0377, U+03CF, U+A668-U+A66E, U+A708-U+A711, - U+A71B-U+A71F to Sans (by Gee Fung Sit) -* copied U+02E5-U+02E9 over from Sans to fix inconsistencies in Serif (by Gee - Fung Sit) -* added U+021C-U+021D, U+0370-U+0371, U+037B-U+037D, U+0470-U+0471, - U+0510-U+0515, U+051A-U+051D, U+1E9F, U+2C64, U+2C6E-U+2C6F, U+2C79, - U+2C7C-U+2C7D, U+A644-U+A647, U+A650-U+A651, U+A654-U+A657, U+A708-U+A716, - U+A71B-U+A71F to Serif (by Gee Fung Sit) -* added U+A708-U+A716, U+A71B-U+A71F to Mono (by Gee Fung Sit) -* added anchors to U+017F (ſ) and fixed U+1E9B (ẛ) in Serif (by Gee Fung Sit) -* made U+0325 smaller in Sans Bold and Serif to match Sans Book (by Gee Fung - Sit) -* fixes to U+02F3 (moved up), U+228F-U+2294 (more square-like) and - U+22CE-U+22CF (stroke width) in Sans (by Gee Fung Sit) -* replaced U+2202 ∂ (Sans and Mono) and U+221D ∝, U+221E ∞ (Sans) with glyphs - from Arev (with small changes) (by Gee Fung Sit) -* added U+22B0-U+22B1, U+22C7, U+22D0-U+22D5 from Arev to Sans to complete the - block (by Gee Fung Sit) -* added U+0514-U+0515 to Sans ExtraLight (by Gee Fung Sit) -* skewed U+A78C in all Oblique/Italic fonts (by Gee Fung Sit) -* moved U+2215 to U+2044 in Sans and Serif and replaced U+2215 with reference - to U+002F in all fonts (by Gee Fung Sit) -* added U+2C6E to Mono (by Denis Jacquerye) -* added U+A782 and U+A783 in Sans (by Wesley Transue) -* added U+0244, U+024C-024D, U+2C64 in Sans Mono (by Denis Jacquerye) -* modified U+01AE in Sans Mono (by Denis Jacquerye) -* added U+2C7A to all fonts (by Gee Fung Sit) -* italicized/small changes to U+2C76 in Serif (Bold) Italic (by Gee Fung Sit) -* improved outlines of U+2C68, U+2C6A, U+2C6C in Serif (Bold) Italic (by Gee - Fung Sit) -* rounded U+2C77 at the bottom in Serif (by Gee Fung Sit) -* added joining behavior for tone letters (U+02E5-U+02E9) in Sans (bug #15669) - (by Gee Fung Sit) -* fixed outline of y.alt in Sans Regular (by Denis Jacquerye) -* changed references of U+1D5A8, U+1D5C5, U+1D5DC, U+1D5F9, U+1D610, U+1D62D, - U+1D644 and U+1D661 to stylistic alternates to have a better distinction (by - Gee Fung Sit) -* hinted I.alt in Sans Regular (by Gee Fung Sit) -* added U+0487, completing Cyrillic block (by Gee Fung Sit) -* extended the bar of U+0463 to the right and moved the anchor (by Gee Fung - Sit) -* added anchors to glyphs in Cyrillic block (by Gee Fung Sit) -* added (preliminary) hints to tone letter forms (U+02E5.5, U+02E9.1, stem) in - Sans Book (by Gee Fung Sit) - -Changes from 2.25 to 2.26 - -- added glyphs for Cyrillic-B to Sans (by Wesley Transue) -- added U+0370-U+0371 to Sans (by Wesley Transue) -- added U+019C, U+01A2-U+01A3, U+01A6, U+01E4-U+01E5, U+024C-U+024D, U+0285, - U+0290, U+02A0, U+0370-U+0371, U+03F1, U+03FC to Sans ExtraLight (by Wesley - Transue) -- added U+20A0-U+20A5, U+20A7-U+20B3, U+2105, U+210D, U+210F, U+2115, U+2117, - U+2119-U+211A, U+211D, U+2124, U+212E, U+2200-U+2204 to Mono (by Heikki - Lindroos) -- added U+01BA and U+01BF to Mono (by Heikki Lindroos) -- merged OpenType "aalt" feature in Latin in Sans (by Denis Jacquerye) -- added alternative shape for y in Sans (by Denis Jacquerye) -- added saltillo (U+A78B-U+A78C) to all faces (by James Cloos) -- changed U+047C-U+047D to references instead of outlines in Sans (by Wesley - Transue) -- added Latin letter tresillo U+A72A-U+A72B to Sans (by Wesley Transue) -- added U+A734-U+A737 to Sans (by Wesley Transue) -- added U+2053 to Serif and fixed it bug:9425 in Sans (by Gee Fung Sit) -- removed problematic hints for U+0423 bug:10025 (by Gee Fung Sit) -- added U+27C5-U+27C6 bug:10255 to all faces (by Gee Fung Sit) -- fixed width of U+2016 in Sans Oblique (by Gee Fung Sit) -- added U+2016, U+2032-U+2038, U+2042, U+2045-U+2046, U+204B-U+204F, - U+2051-U+2052, U+2057 to Serif (by Gee Fung Sit) -- made U+2140 bigger to match other n-ary operators (by Gee Fung Sit) -- added U+0606-U+0607, U+0609-U+060A to Sans (by Gee Fung Sit) -- added U+221B-U+221C to Mono (by Gee Fung Sit) -- small adjustments to U+221B-U+221C in Sans and Serif (by Gee Fung Sit) -- update U+04B4-U+04B5 in Serif (by Andrey V. Panov) -- increased max-storage value from maxp table to 153 (by Andrey V. Panov) -- added U+0472-U+0473, U+0510-U+0511, U+051A-U+051D, U+0606-U+0607, - U+0609-U+060A, U+1E26-U+1E27, U+1E54-U+1E55, U+1E7C-U+1E7D, U+1E8C-U+1E8D, - U+1E90-U+1E91, U+1E97-U+1E99, U+1E9F, U+1EAC-U+1EAD, U+1EB6-U+1EB7, - U+1EC6-U+1EC7, U+1ED8-U+1EDD, U+1EE0-U+1EE3, U+1EE8-U+1EEB, U+1EEE-U+1EF1 to - Mono (by Gee Fung Sit) -- added locl rules for S/T cedilla for Romanian and Moldavian so they get - rendered as S/T with comma accent (see Redhat bug #455981) (by Ben Laenen) -- removed ligature rule from Armenian U+0587 bug:16113 (by Gee Fung Sit) - -Changes from 2.24 to 2.25 - -- moved/added U+2E18 (by Gee Fung Sit) -- added empty glyph for U+2064 in Sans and Serif (by Gee Fung Sit) -- added U+22CE-U+22CF to Sans (by Gee Fung Sit) -- Sans Oblique and Bold Oblique, Serif: reverted digits hinting instructions back to before revision 1590, which fixed mistaken debian bug #471024. This fixes Debian bug #411308. The original bug was in freetype not in the fonts (by Denis Jacquerye) -- added U+A726-U+A729, U+A730-U+A733, U+A738-U+A73F, U+A746-U+A74B, U+A74E-U+A74F, U+A780-U+A781, U+A7FB-U+A7FF to Sans (by Gee Fung Sit) -- added Macedonian italic glyph shape for U+0453 in Serif (by Ben Laenen) -- changed descenders in U+0446, U+0449, U+0497, U+04A3, U+04AD (by Andrey V. Panov) -- updated main SFD files to SplineFontDB 3.0 (Denis Jacquerye and Gee Fung Sit) -- moved U+0561 2 up since it wasn't aligned with the baseline well (by Ben Laenen) -- added U+2E2E to Sans (by Gee Fung Sit) -- replaced U+2699 with simpler version in Sans (by Gee Fung Sit) -- added a lot of hinting instructions to Latin Extended B, Greek and Coptic glyphs Sans Book (by Wesley Transue) -- differentiated U+2219 from U+22C5 and adjusted affected references in Sans and Mono (by Gee Fung Sit) -- made Hebrew narrower in Sans Bold and Sans Bold Oblique (by Denis Jacquerye) -- added Kurdish and Chuvash letters from Unicode 5.1 Cyrillic Extended block (by Wesley Transue) -- added U+1E9F, U+A644-U+A647, U+A64C-U+A64D, U+A650-U+A651, U+A654-U+A655, U+A712U+A716 to Sans (by Gee Fung Sit) -- added several glyphs to Sans ExtraLight (by Gee Fung Sit) -- added hinting instructions to U+046A-U+046B, U+0508-U+0509, U+050B, U+0512-U+0513 in Sans Book (by Wesley Transue) -- corrected width of U+027E in Sans Book (by Gee Fung Sit) -- added U+2C79, U+2C7B-U+2C7D to Sans (by Gee Fung Sit) -- added a bunch of glyphs+small corrections to Sans Light (by Gee Fung Sit) -- added U+0496, U+0497, U+04B0, U+04B1 (by Andrey V. Panov) -- updated U+0493, U+049B, U+04B3, U+04B7, U+04F7 (by Andrey V. Panov) -- further improvements in extended Cyrillic (by Andrey V. Panov) - -Changes from 2.23 to 2.24 - -- instructions for U+05C0 ׀, U+05C3 ׃, U+05F3 ׳, and U+05F4 ״ in DejaVu - Sans. (by Wesley Transue) -- instructions for U+2116 in Sans (by Andrey V. Panov) -- Unicode 5.1 update: moved U+F208 to U+2C6D, U+F25F to U+2C71, added - U+2C6E-U+2C6F, U+2C72-U+2C73, updated outline of U+2C71 in Sans. (by - Denis Jacquerye) -- updated and instructed U+0401 in Sans (by Andrey V. Panov) -- fixed the bug in Sans faces where U+02EC ˬ faced the wrong direction. - Also, added a few more glyph instructions. (by Wesley Transue) -- removed OS2Sub and OS2Strike that weren't intentional in Sans - ExtraLight. (by Denis Jacquerye) -- updated instructions for U+401, U+44F in Serif Book. (by Andrey V. - Panov) -- instructions for U+02C4 ˄, U+02C5 ˅, U+03D8 Ϙ, U+03D9 ϙ, U+0494 Ҕ, and - U+0495 ҕ in Sans Book. (by Wesley Transue) -- instructions for U+01A6 Ʀ, U+0238 ȸ, U+0239 ȹ, U+02EC ˬ, and U+05C6 ׆ - in Sans Book. (by Wesley Transue) -- DejaVuSans.sfd DejaVuSerif.sfd: updated instructions for U+447 and - U+451 using code generated with xgridfit (by Andrey V. Panov) -- instructions for a few glyphs in the Latin Extended-B Block, Greek - Block, Cyrillic Block, and N'Ko block. (by Wesley Transue) -- updated sfdnormalize.pl, and SFD files to new SFD format with empty - lines. (by Denis Jacquerye) - -Changes from 2.22 to 2.23 - -- fixed bug which made Condensed fonts appear instead of normal width ones -- added U+20DB, U+20DC, and U+20E1 to Sans (by Roozbeh Pournader) -- added hinting instructions to U+01A7, U+01AA-U+01AC, U+01AE-U+01AF, - U+01BC-U+01BD, U+01BF, U+01F7, U+0277, U+027F, U+0285-U+0286, U+0297, U+02AF, - U+02B4-U+02B5, U+02BD, U+030D, U+0311, U+0329, U+04A0-U+04A1 in Sans Book (by - Wesley Transue) -- modified hinting instructions of U+04A2 in Sans Book (by Wesley Transue) -- added hinting instructions to U+237D, U+2423 in Mono Book and Mono Bold (by - Wesley Transue) -- added mathematical alphanumeric symbols to all styles (by Max Berger) -- added Unicode 5.1 U+2E18 as U+2E18.u51 (not yet usable) to Sans (by Roozbeh - Pournader) -- dereferenced all glyphs with mixed references and outlines (by Denis - Jacquerye) -- removed non-zero width from U+0344 in Sans (by Denis Jacquerye) - -Changes from 2.21 to 2.22 - -- directory structure has changed, we now use the Makefile -- modified Armenian U+0565 in Sans (by Սահակ Պետրոսյան) -- added double struck letters and numbers U+2102, U+210D, U+2115, - U+2119-U+211A, U+211D, U+2124, U+213C-U+2140, U+2145-U+2149, U+1D538-U+1D539, - U+1D53B-U+1D53E, U+1D540-U+1D544, U+1D546, U+1D54A-U+1D550, U+1D552-U+1D56B, - U+1D7D8-U+1D7E1 to Serif (by Stephen Hartke) -- added letterlike symbols U+2103, U+2109, U+2127, U+214B, U+2141-U+2144 to - Serif (by Ben Laenen) -- fixed outline direction of U+2143 in Sans Bold/Bold Oblique (by Ben Laenen) -- added arrow set in Serif: arrows: U+2194-U+21FF; dingbats: U+27A1; - supplemental arrows A: U+27F0-U+27FF; supplemental arrows B: U+2900-U+2975, - U+297A; miscellaneous symbols and arrows: U+2B00-U+2B11 (by Ben Laenen) -- added U+0180, U+01DE, U+01E0-01E1, U+022A, U+022C, U+0230, U+1E08-U+1E09, - U+1E10-U+1E11, U+1EB0-U+1EB1 to Mono (by Denis Jacquerye) -- adjusted U+01D5, U+01D7, U+01D9, U+1DB in Mono (by Denis Jacquerye) -- added Ogham in Sans (by Wesley Transue) -- added Yijing Hexagram Symbols in Sans (by Wesley Transue) -- hinting instructions added to Cyrillic U+0460, U+04A6-U+04A7, U+04AC-U+04AD, - U+04C7-U+04C8, U+04F6-U+04F7, U+04FA-U+04FB, U+050C-U+050D in Sans Book (by - Wesley Transue) -- adjusted Cyrillic letters U+042A, U+044A, U+044C, U+0459-U+045B, U+0462, - U+048C-U+048D in Serif (by Andrey V. Panov) -- hinting instructions added to Lao U+0EB7 in Sans (by Wesley Transue) -- added Roman numerals and Claudian letter U+2160-U+2184 in Serif (by Ben - Laenen) -- added U+FFF9-U+FFFD to Sans, Serif and Mono (by Lars Næsbye Christensen) -- added mathematical symbols to Serif: U+2200, U+2203-U+2204, U+2213-U+2214, - U+2217-U+2218, U+2223-U+2226, U+2250-U+2255, U+2295-U+22AF, U+22C5 (by Ben - Laenen) -- modified bullet symbol U+2219 in Serif (by Ben Laenen) - -Changes from 2.20 to 2.21 - -- added U+FE20-U+FE23 (half diacritics) to Sans (by Denis Jacquerye) -- added anchor "half" to position right half of double marks, U+FE21 or U+FE23 - to Sans (by Denis Jacquerye) -- shifted U+0360 up to avoid collision with some outlines in Sans (by Denis - Jacquerye) -- added anchor above-mark anchor to U+035D, U+035E, U+0360, U+0361 in Sans (by - Denis Jacquerye) -- added instructions for ff, ffi, ffl ligatures in Serif Bold (by Eugeniy - Meshcheryakov) -- added instructions to some N'Ko glyphs (by Wesley Transue) -- added instructions to some Lao glyphs (by Wesley Transue) -- cleaning up 'liga' Standard Ligature in Latin, in Sans and Sans Mono (by - Denis Jacquerye) -- added U+046A, U+046B (big yus) in Serif (by Andrey V. Panov) -- added box drawing symbols to Sans and Serif (by Lars Næsbye Christensen) -- added Makefile to improve font and packages generating (by Nicolas Mailhot) - -Changes from 2.19 to 2.20 - -- removed TeX and TeXData tags from all sfd files (by Eugeniy Meshcheryakov) -- removed all 'frac' lookups (by Eugeniy Meshcheryakov) -- fixed duplicate glyph names (by Eugeniy Meshcheryakov) -- removed standard ligatures with U+00B7 in Mono (by Eugeniy Meshcheryakov) -- use reference to U+002D in U+00AD in Sans Oblique, and adjust instructions - (by Eugeniy Meshcheryakov) -- updated Cyrillic in Sans Extra Light (by Andrey V. Panov) -- added instructions to N'Ko U+07C1-U+07C6, U+07CA, U+07CE-U+07CF, U+07D1, - U+07D3-U+07D4, U+07D8, U+07DB and U+07EB in Sans (by Wesley Transue) -- added instructions to Lao U+0E8A, U+0E95, U+0E97, U+EA5, U+0EB4 and U+0EB5 - (by Wesley Transue) -- adjusted instructions for Hebrew glyphs (by Denis Jacquerye) -- added instructions for U+0265 in Sans Bold (by Denis Jacquerye) -- fix U+1D68 in Sans: it had the shape of delta, where it should be a rho (by - Ben Laenen) -- remove U+1D5C glyph in Sans Oblique (it was empty) (by Ben Laenen) -- fix instructions of U+01AD in Sans Bold (by Ben Laenen) -- fix instructions of U+042D in Serif (by Ben Laenen) -- remove buggy instructions of U+2328 in Serif (by Ben Laenen) -- corrected width of U+2C75-U+2C76 in Sans Bold and Serif Bold (by Gee Fung Sit) -- added U+2C75-U+2C77 to Mono (by Gee Fung Sit) - -Changes from 2.18 to 2.19 - -- fixed misplaced symbols (U+2325,2326) in Sans Oblique (by John Karp) -- added Mark to Base anchors: 'cedilla' for combining cedilla and - 'above-legacy' for stacking above precomposed glyphs (just a,e,i,o,u with - macron for now) in Sans (by Denis Jacquerye). -- added contextual substitution for Case and Dotless forms in all Sans variants - (by Denis Jacquerye). -- renamed 'ccmp' lookups for RTL and Basic (LGC, etc.) (by Denis Jacquerye) -- added anchor 'cedilla' for vowels in Sans. (by Denis Jacquerye) -- extended contextual dotless and case substitutions to handle both below and - above diacritics (by Denis Jacquerye) -- renamed Dotless and Case Form GSUB lookups in Sans with meaningful names (by - Denis Jacquerye) - -Changes from 2.17 to 2.18 - -- Re-encoded the source files for Full Unicode (by Ben Laenen) -- Re-enabled the "ff", "fl", "fi", "ffl", "ffi" ligatures by default in Serif - (by Ben Laenen) -- Disabled the "fi", "ffi" ligatures for languages with dotless i in Serif (by - Ben Laenen) -- added Tifinagh to Sans Book and Bold, U+2D30-U+2D65, U+2D6F, partially hinted - in Sans Book. (by Denis Jacquerye) -- added Tai Xuan Jing Symbols (U+1D300-1D356) to Sans (by Remy Oudompheng) -- added double-struck letters (U+1D538-U+1D56B minus reserved code points) to - Sans (by Gee Fung Sit) -- added U+22EE-U+22F1 to Sans (by Gee Fung Sit) -- added U+2C67-U+2C6C, U+2C75-U+2C77 to Serif (by Gee Fung Sit) -- italicized various glyphs in Latin Extended-B, IPA Extensions, Spacing - Modifier Letters, Phonetic Extension (Supplement) and Super- and Subscripts - in Serif Oblique fonts (by Gee Fung Sit) -- modified outlines, bearings of Hebrew U+05D6, U+05D8, U+05DB, U+05DE, U+05E0, - U+05E1, U+05E2, U+05EA in Sans Book and Oblique, adjusted hinting in Book - based on Yotam Benshalom's comments. (by Denis Jacquerye) -- added Braille Patterns (U+2800-U+28FF) to Serif fonts (by Gee Fung Sit) -- added N'Ko to Sans Book and Bold: U+07C0-U+07E7, U+07EB-U+07F5, U+07F8-U+07FA - (by Eugeniy Meshcheryakov) -- added U+0ED8 (Lao digit 8) to Sans (by Remy Oudompheng) -- added Lao diacritics U+0EB0-0EB9, U+0EBB-0EBC, U+0EC8-0ECD to Mono (by Remy - Oudompheng) -- renamed Serif [Bold] Oblique, make it Italic (by Eugeniy Meshcheryakov) -- added U+29FA-U+29FB to Sans and Sans Mono (by Gee Fung Sit) -- swapped glyphs for Eng U+014A from Sami Eng to African Eng, the latter being - more common (by Denis Jacquerye) -- swapped ae U+00E6 and ae.alt in Serif Italics fonts, thus fixing #8213 (by - Denis Jacquerye) -- minor improvements to Misc. Symbols in Sans (by Gee Fung Sit) -- minor improvements and additions to Sans ExtraLight (by Gee Fung Sit) -- improved instructions for various Cyrillic letters (by Eugeniy Meshcheryakov) -- fixed hinting of theta and chi in Sans Book (by Ben Laenen) -- added Georgian Mkhedruli to Sans, Serif and Mono, ASumtavruli to Sans and - Serif (by Besarion Gugushvili) - -Changes from 2.16 to 2.17 - -- Sans fonts: fix position for certain combinations of Arabic fatha, kasra, - shadda, damma, kasratan, dammatan, fathatan and hamza (by Ben Laenen) -- added 'ae.alt' to Serif Oblique fonts, with design matching shape of italic - 'a' instead of slanted 'a', see bug #8213 (by Denis Jacquerye) -- added super- and subscripts to Serif and Mono: U+1D2C-U+1D2E, U+1D30-U+1D3C, - U+1D3E-U+1D42, U+1D62-U+1D65, U+1D78, U+2071, U+207A-U+207E, U+208A-U+208E, - U+2090-U+2094 (by Gee Fung Sit) - -Changes from 2.15 to 2.16 - -- fixed hinting instructions for digits in DejaVu Sans Oblique, Bold Oblique, - and Serif Book to not change glyph width (by Eugeniy Meshcheryakov) -- added instructions for U+0404, U+0411, U+0413, U+0414, U+0417-U+041B, U+041F, - U+0423, U+0424, U+0426-U+0429, U+042C, U+042E, U+042F, U+0490 in Serif Bold - (by Eugeniy Meshcheryakov) -- added U+0220 and Eng.alt to Serif fonts (by Denis Jacquerye) -- added U+232C, U+2394, U+23E3 to Sans fonts (by John Karp) -- added U+230C-U+230F, U+231C-U+231F to Sans fonts, fixing bug:9547 - (by John Karp) -- adjusted dot below, dot above, dieresis above, dieresis below in Sans fonts - (by Denis Jacquerye) -- added U+2300, U+2301, U+2303, U+2304, U+2305, U+2307, U+2326, U+2327, U+232B, - arrow.base to Sans fonts (by John Karp) -- adjusted dot and dieresis below and above in Serif fonts (by Denis Jacquerye) -- added U+1E1C-U+1E1D to Serif fonts (by Denis Jacquerye) -- added U+22BE, U+22BF (by Wesley Transue) -- added U+2324; modified U+2325: more standard proportions, and matches U+2324 - and U+2387; added U+2387 : flipped U+2325 with standard arrowhead - (by John Karp) -- added Lao digits U+0ED0-0ED7, U+0ED9 (by Remy Oudompheng) -- added to Mono in Arabic block : U+060C, U+0615, U+061B, U+061F, - U+0621-U+063A, U+0640-0655, U+065A, U+0660-066F, U+0674, U+0679-0687, U+0691, - U+0692, U+0698, U+06A1, U+06A4, U+06A9, U+06AF, U+06B5, U+06BA, U+06BE, - U+06C6, U+06CC, U+06CE, U+06D5, U+06F0-06F9 (by Remy Oudompheng) -- added to Mono in Arabic Presentations Forms-A : U+FB52-FB81, U+FB8A-FB95, - U+FB9E, U+FB9F, U+FBAA-FBAD, U+FBE8, U+FBE9, U+FBFC-FBFF (by Remy Oudompheng) -- added to Mono in Arabic Presentations Forms-B : U+FE70-FE74, U+FE76-FEFC, - U+FEFF (by Remy Oudompheng) -- added U+05BA, U+05BE, U+05F3, U+05F4, U+FB1E, U+FB21-U+FB28, U+FB4F to Sans - (by Eugeniy Meshcheryakov) -- added U+2102 to Mono (by Eugeniy Meshcheryakov) -- added U+2983-U+2984 to Sans (by Gee Fung Sit) -- added U+2A2F to Sans, Serif and Mono (by Gee Fung Sit) -- added U+2373-2375, U+237A to Sans (by John Karp) -- converted kern pairs to kern classes with Tavmjong Bah's scripts - (by Denis Jacquerye) -- set ScriptLang of kerning classes to just latn because of Pango bug - (by Denis Jacquerye) -- added DNK to ScriptLang latn otherwise it is excluded, and SRB and MDK to - cyrl (by Denis Jacquerye) -- removed flag 0x80 in generate.pe, otherwise it generates kerning tables some - systems don't like; thus loosing Apple tables (by Denis Jacquerye) -- removed ligature for precomposed legacy characters of Sans Oblique fonts - (by Denis Jacquerye) -- added bearings to en dash U+2013, em dash U+2014 and figure dash U+2012 - by making dashes shorter, preserving character width (by Denis Jacquerye) -- reduced U+031C, U+0325 (ring below), U+0339 to be entirely visible; - added instructions in Sans Book; changed U+1e00-U+1e01 to use new ring below - (by Denis Jacquerye) -- adjusted circumflex below on U+1E12-U+1E13, U+1E18-U+1E19, U+1E3C-U+1E3D, - U+1E4A-U+1E4B, U+1E70-U+1E71, U+1E76-U+1E77 in Sans fonts (by Denis Jacquerye) -- Added U+0ED4, U+0ED5 to DejaVu Sans (by Remy Oudompheng) -- Lao-specific anchors (by Remy Oudompheng) -- added alternate I to match the small capital in Sans (by Gee Fung Sit) - -Changes from 2.14 to 2.15 - -- improved hinting in Sans Oblique to deal with some spacing and inconsistency - issues (by Ben Laenen) -- added anchors to Mono Book, and added GPOS rules for combining diacritics to - show up as zero width glyphs (by Ben Laenen) -- removed U+F21C (PUA), it was copy of U+2C64 from Latin Extended C (by Eugeniy - Meshcheryakov) -- added U+27E6-U+27E7 to Sans (by Gee Fung Sit) -- added U+1407, U+1409, U+140C-U+141B, U+141D-U+1425, U+1427-U+142E, - U+1435-U+1438, U+143A-U+1449, U+1452, U+1454, U+1457-U+1465, U+1467-U+146A, - U+1471, U+1474-U+1482, U+1484-U+1488, U+148F, U+1492, U+14A0, U+14A2, U+14A9, - U+14AC-U+14BA, U+14BC, U+14BD, U+14C6, U+14C9-U+14CF, U+14D1, U+14D2, U+14D9, - U+14DC-U+14E9, U+14EC, U+14F3, U+14F6-U+1504, U+1506, U+1507, U+1510-U+1525, - U+152C, U+152F-U+153D, U+1540, U+1541, U+154E, U+154F, U+1552, U+155B, U+155C, - U+1568, U+1569, U+1574-U+157B, U+157D, U+15A7-U+15AE, U+1646, U+1647 (by - Eugeniy Meshcheryakov) -- fixed several contours to not intersect, use horizontal or vertical tangents, - use integer coordinates, etc in Sans Book (by Denis Jacquerye) -- added U+0496-U+0497 in Serif (by Andrey V. Panov) - -Changes from 2.13 to 2.14 - -- added Philippine peso glyph U+20B1 (by Clayborne Arevalo) -- made U+2012 have the same width as digits, according to Unicode 5.0, - page 206 (by Roozbeh Pournader) -- made all of the "above" combining characters remove the dot of "i", - "j", etc (Soft_Dotted characters), according to Unicode 5.0, - page 228 (by Roozbeh Pournader) -- made U+012F, U+03F3, U+0456, U+0458, U+1E2D, and U+1ECB (all fonts - except Mono), U+0249, U+2148, and U+2149 (Sans and Sans Condensed), - U+0268 (Sans ExtraLight, Serif and Serif Condensed), and U+029D (Serif - and Serif Condensed) respect the Soft_Dotted property (by Roozbeh - Pournader) -- added U+223E, U+223F, U+2240, U+22C2, U+22C3 to Sans (by Remy Oudompheng) -- added U+203D to Serif (by Gee Fung Sit) -- added zero-width glyphs for U+2061-U+2063 to Sans and Serif (by Gee - Fung Sit) -- changed isolated forms of Arabic waw (U+0648, U+0624 and U+06C6) (bug #9432) - (by Ben Laenen) -- added Lao consonants U+0E81, U+0E82, U+0E84, U+0E87, U+0E88, U+0E8A, - U+0E8D, U+0E94-0E97, U+0E99-0E9F, U+0EA1-0EA3, U+0EA5, U+0EA7, U+0EAA, - U+0EAB, U+0EAD-0EAF to Sans Mono (by Remy Oudompheng) -- added U+0200-U+0217, U+0226-U+0229, U+02F3, U+1E00-U+1E07, - U+1E0A-U+1E0B, U+1E18-U+1E1F, U+1E22-U+1E23, U+1E28-U+1E2D, - U+1E3A-U+1E3B, U+1E40, U+1E48-U+1E49, U+1E56, U+1E58-U+1E59, - U+1E5E-U+1E5F, U+1E60, U+1E68-U+1E6B, U+1E6E-U+1E6F, U+1E72-U+1E77, - U+1E86-U+1E8B, U+1E92-U+1E96, U+1EA0-U+1EA1, U+1EF4-U+1EF5 to Mono - (by Ben Laenen) -- renamed uppercase variants of diacritics (macron, breve, double grave, - double acute, inverted breve, dot above) to "uni03XX.case" in Mono - (by Ben Laenen) -- moved uppercase variants of diacritics up in Mono so they properly - vertically align on capitals (by Ben Laenen) -- precomposed glyphs with macron, breve, double grave, double acute, - inverted breve, dot above, macron below, breve below, inverted breve - below, dot below, cedilla, caron below, circumflex below, diaeresis - below, tilde below now reference to combining diacritics instead of - space modifiers in Mono (by Ben Laenen) -- made ring below (U+0325), and half rings below (U+031C and U+0339) - smaller in Mono (by Ben Laenen) -- added U+205F to all fonts (by Roozbeh Pournader) -- added U+035E-U+035F to Sans (by Roozbeh Pournader) -- added empty glyphs for U+034F, U+202A-U+202E, U+2060, U+206A-206F, - U+FE00-U+FE0F to non-Mono fonts (by Roozbeh Pournader) -- added U+2101, U+2107-U+2108, U+210B, U+210C, U+2110, U+2112, U+211B, - U+211F, U+2123, U+2125, U+2128-U+2129, U+212C-U+212D, U+212F, - U+2130-U+2131, U+2133, U+2136-U+213A, U+2141-U+2144, U+2B00-U+2B11, - U+2B20-U+2B23 to Sans (by John Karp) -- reshaped omega (U+03C9) in Mono (by Ben Laenen) -- added U+2205, U+22C6, U+2300-U+2301, U+2303-U+2306, U+230C-U+230F, - U+2312-U+2315, U+231C-U+231F, U+2335, U+2337-U+233E, U+2341-U+2344, - U+2347-U+2348, U+234B-U+234D, U+2349-U+2350, U+2352-U+2354, - U+2357-U+2359, U+235A-U+235C, U+235E-U+2360, U+2363-U+2365, - U+2368-U+2369, U+236B-U+2370, U+2373-U+237A, U+2380-U+2383, - U+2388-U+238B, U+2395 in Mono (by Ben Laenen) - -Changes from 2.12 to 2.13 - -- adjusted U+0198B, U+01B3-U+01B4 in Sans, hinted U+01B4 in Sans Book - (by Denis Jacquerye) -- added U+27F0-U+27FF, U+2906-U+2907, U+290A-U+290B, U+2940-U+2941 to Sans - (by Denis Jacquerye) -- added U+01E6-U+01E9, U+01EE-U+01EF, U+01F4-U+01F5, U+01FC-U+01FF, - U+021E-U+021F, U+0245, U+02BD, U+02C9, U+1E9B, U+2045-U+2046, U+2213, U+22C5, - U+22EF to Sans Mono (by Roozbeh Pournader) -- added U+04FA-U+04FD to Sans (by Michael Everson) -- removed U+2329 and U+232A because of their CJK properties, added U+27E8 - and U+27E9 in their stead, fixing part of bug #9038 (by Roozbeh Pournader) -- corrected and improvised U+0466-U+0469, U+046E-U+0471, U+047C-U+047D, U+0482, - U+0484-U+0486, U+0492-U+0493, U+04B0-U+04B1, U+050C-U+050D, and U+204A - in Sans (by Michael Everson) -- added instructions for U+0402, U+0409, U+040A, U+040B, U+044D, U+040F, - U+0452, U+0459-U+045B, U+045F to Sans Book (by Eugeniy Meshcheryakov) -- made italic shape for U+431, U+432, U+437, U+43B, U+43C, U+43D, U+444, U+447, - U+44D, U+44F, U+459, U+45A in SerifOblique and SerifBoldOblique - (by Andrey V. Panov) -- modified U+024C to match glyph in Unicode chart, fixing bug #9039 - (by Denis Jacquerye) -- made some canonically equivalent characters share the same glyph: - U+02B9 = U+0374, U+0343 = U+0313, and U+0387 = U+00B7 also adjusting U+02BA - to look like double U+02B9, fixing parts of bug #9038 (by Roozbeh Pournader) -- changed shapes for U+0478 and U+0479 in Sans to those in the Unicode charts, - based on a recent decision by Unicode Technical Committee to only use - the digraph form (by Michael Everson) -- adjusted width of NBSP U+00A0 and NNBSP U+202F, fixing bug #8401 - (by Denis Jacquerye) -- fixed several contours to not intersect, use horizontal or vertical tangents, - use integer coordinates, etc (by Roozbeh Pournader and Denis Jacquerye) -- added U+1402, U+1430, U+144D, U+146C, U+148A, U+14A4, U+14C1, U+14D4, U+14EE, - U+1527, U+1545, U+157E, U+158E, U+15AF to Sans (by Eugeniy Meshcheryakov) -- enlarged width of U+459 and U+45A in Serif (by Andrey V. Panov) -- made traditional shape for U+452, U+45B (by Andrey V. Panov) -- added euro sign U+20AC to Sans ExtraLight, making fontconfig recognize - the font as supporting English (by Denis Jacquerye) - -Changes from 2.11 to 2.12 - -- added U+0180 to Serif (by Denis Jacquerye) -- improved and/or hinted Armenian letters U+0542, U+0546, U+0562, - U+0563, U+0564, U+0577, U+0582 in Sans (by Ben Laenen) -- added U+4FE-U+4FF, U+512-U+513, U+2114, U+214E, U+26B2 to Sans - (by Gee Fung Sit) -- adjusted U+0496-U+0497, U+049A-U+04A1 in Sans to match U+0416, - U+041A, U+0436 and U+043A (by Gee Fung Sit) -- Mathematical Operators in Sans: changed U+22C0-U+22C1 to match - other n-ary operators, adjusted U+2203-U+2204, changed U+2220 in - Sans to match the style of U+2221 (by Gee Fung Sit) -- added U+1401, U+1403-U+1406, U+140A, U+140B, U+1426, U+142F, - U+1431-U+1434, U+1438, U+1439, U+1449, U+144A, U+144C, - U+144E-U+1451, U+1455, U+1456, U+1466, U+146B, U+146D-U+1470, - U+1472, U+1473, U+1483, U+1489, U+148B-U+148E, U+1490, U+1491, - U+14A1, U+14A3, U+14A5-U+14A8, U+14AA, U+14AB, U+14BB, U+14C0, - U+14C2-U+14C5, U+14C7, U+14C8, U+14D0, U+14D3, U+14D5-U+14D8, - U+14DA, U+14DB, U+14EA, U+14ED, U+14EF-U+14F2, U+14F4, U+14F5, - U+1405, U+1526, U+1528-U+152B, U+152D, U+152E, U+153E, - U+1542-U+1544, U+1546-U+154D, U+1550, U+1553, U+1555-U+155A, - U+1567, U+156A, U+157C, U+157F-U+1585, U+158A-U+158D, - U+158F-U+1596, U+15A0-U+15A6, U+15DE, U+15E1, U+166E-U+1676 to - Sans (by Eugeniy Meshcheryakov) -- re-enabled Latin ligatures fi, ffi, fl, ffl and ff in Sans - (by Ben Laenen) -- made italic shape for U+436, U+44A, U+44B, U+44C, U+44E, U+45F, - U+463 in SerifOblique and SerifBoldOblique (by Andrey V. Panov) -- fixed sub- and superscript metrics in Condensed Sans (bug #8848) - (by Ben Laenen) -- added U+474, U+475 in Serif (by Andrey V. Panov) -- hinted Greek glyphs U+03B7, U+30B8, U+03B9, U+03C1, U+03C3, - U+03C6 in Mono Book (by Ben Laenen) - -Changes from 2.10 to 2.11 - -- added instructions for Hebrew glyphs (Sans Book, by Eugeniy - Meshcheryakov) -- changed U+01A6 (Latin Yr) after bug #8212, in Sans, Serif and - Sans Mono fonts (by Denis Jacquerye). -- removed instruction for U+2600-U+26A1 (by Mederic Boquien) -- added U+202F and set width of U+00A0 (nobreakingspace) to the - same as U+0020, space (by Denis Jacquerye). -- added and improved instructions for various Cyrillic letters - (by Eugeniy Meshcheryakov) -- Changed U+416, U+42F, U+427 (non-Bold), U+436, U+447 (non-Bold), - U+44F, U+437 (Bold), corrected U+40F, U+414, U+424, U+426, U+429, - U+434, U+438 (Bold), U+446, U+449, U+44D (non-Bold), U+45F in - Sans Mono (by Andrey V. Panov) -- made small corrections to Cyrillic, most appreciable to U+409, - U+413, U+41B, U+427 and U+433, U+434, U+43B, U+447, U+459 - (upright fonts) to Serif (by Andrey V. Panov) -- adjusted bearings of U+410, U+416, U+41A, U+42F, U+436, U+43A, - U+443, U+44F in Serif (by Andrey V. Panov) -- enlarged width of U+44A, U+44B, U+44C, U+463 in Serif - (by Andrey V. Panov) -- added ligature "iacute" as "afii10103" (U+456) "acutecomb" in - Serif (by Andrey V. Panov) -- made italic shape to U+446, U+448, U+449 in Serif (by Andrey V. - Panov) -- added "afii10831" (U+F6C7), "afii10832" (U+F6C8) in Serif (by - Andrey V. Panov) -- new minimum version of fontforge is 20061014 (by Ben Laenen) - -Changes from 2.9 to 2.10: - -- added U+0242, U+024A-U+024B, U+024E-U+024F, U+037C-U+037D, U+0E3F, - U+1D2C-U+1D2E, U+1D30-U+1D42, U+1D5D-U+1D6A, U+1D78, U+1DB8, - U+2090-U+2094, U+20D0-U+20D1, U+2C60-U+2C66, U+2C6B-U+2C6C, U+2C74 and - U+FB29 to Sans (by Gee Fung Sit) -- added Lao glyphs : U+0E81-0E82, U+E084, U+0E87-0E88, U+0E8A, U+0E8D, - U+0E94-0E97, U+0E99-0E9F, U+0EA1-0EA3, U+0EA5, U+0EA7, U+0EAA-0EAB, - U+0EAD-0EB9, U+0EBB-0EBD, U+0EC0-0EC4, U+0EC6, U+0EC8-0ECD, U+0EDC-0EDD - (by Remy Oudompheng) -- fixed U+0193 not showing in Windows (bug #7897) (by Ben Laenen) -- changes to U+222B-222D in Sans Mono (by Remy Oudompheng) -- ported the three remaining currency symbols from Arev (U+20B0, - U+20B2-U+20B3), and replaced one (U+20AF) in Sans (by Lars Naesbye - Christensen) -- corrected U+20A5 in Sans (by Gee Fung Sit) -- merged Double-Struck Letters from Arev: U+2102, U+210D, U+2115, - U+2119-U+211A, U+2124, U+213C-U+2140 (by Gee Fung Sit) -- added U+2308-U+230B and U+2329-U+232A to Sans Mono and Serif faces, - fixed incorrect direction of U+2329 in Sans faces, and improved - U+2308-U+230B in Sans faces per Ben Laenen's suggestions (by David - Lawrence Ramsey) -- added U+06D5 and final form of it (needed for Kurdish) (by Ben Laenen) -- added two special glyphs U+F000 and U+F001 in Sans Book that show the - current ppem size (horizontal and vertical) (by Ben Laenen) -- added U+2318 and U+2325 to Sans Mono faces, based on the Sans versions - (by David Lawrence Ramsey) -- added U+2B14-U+2B1A to all faces except Sans ExtraLight (by David - Lawrence Ramsey) -- respaced all Geometric Shapes characters in Serif faces to match those - in Sans faces again, respaced U+23CF in Sans, Sans ExtraLight, and - Serif faces to match U+25A0 (or Sans in Sans ExtraLight's case) again, - and respaced U+2B12-U+2B13 in Sans and Serif faces to match U+25A1 - again (by David Lawrence Ramsey) -- corrected width of Modifier Small Letters U+1D43-1D5B in Sans Oblique - and U+1D9B-U+1DBF in Sans Oblique and Sans Bold Oblique (by Gee Fung Sit) -- added a bunch of glyphs to Sans ExtraLight (see SVN for details) (by - Gee Fung Sit) -- adjusted Cyrillic descenders in Sans ExtraLight to sync with Sans (by - Gee Fung Sit) -- added U+0242, U+0245 to Serif (by Gee Fung Sit) -- replaced the SHPIX routines which gave them bad spacing at certain - sizes in FreeType for A, V, Z, v and z in Sans Bold (by Ben Laenen) - -Changes from 2.8 to 2.9: - -- DejaVuSansExtraLight.sfd: changed family name from "DejaVu Sans" to - "DejaVu Sans Light" (in case we add a Light weight variant), so legacy - apps that understand only 4 styles are happy. (by Denis Jacquerye) -- added Name ID 16, aka preferred family name, and Name ID 17, aka - preferred style name, so contemporary apps that understand more that 4 - styles can use big fonts families "DejaVu Sans" and "DejaVu Serif". For - those, Extralight and Condensed are just styles not different families. - (by Denis Jacquerye) -- added U+22B6-22BD, U+22C0-22C1, U+22D6-22D7 to Sans. (by Remy Oudompheng) -- added U+037B, U+2184, U+2C67-U+2C6A and U+2C75-U+2C77 to Sans (by Gee - Fung Sit) -- adjusted asteriskmath (U+2217) for consistency with other mathematical - operators in Sans (by Ben Laenen) -- hinted some Armenian capitals in Sans Book (by Ben Laenen) -- added U+0246 - U+0249 (by Ben Laenen) -- BUGFIX : swapped U+224E and U+224F, in Sans, Sans Condensed and Sans Mono - (by Remy Oudompheng) -- adjusted U+20B5 (by Mederic Boquien) -- swapped U+21DA and U+21DB which were in wrong order (by Heikki Lindroos) -- added U+222E-2233, U+239B-23AD, U+2A00-2A02, U+2A0F-2A1C to Sans (by Remy - Oudompheng) -- added U+239B-23AD to Mono (by Remy Oudompheng) -- added U+2024-2025 to Serif (by Mederic Boquien) -- added U+222C-222D, U+2A0C-2A0E to Serif (by Remy Oudompheng) -- added U+2190-21FF to Mono (by Heikki Lindroos) -- added Hebrew glyphs - U+05B0-U+05BD, U+05BF-U+05C3, U+05C6, U+05C7, - U+05D0-U+05EA, U+05F0-U+05F2, U+FB1F, U+FB20, U+FB2A-U+FB36, - U+FB38-U+FB3C, U+FB3E, U+FB40, U+FB41, U+FB43, U+FB44, U+FB46-U+FB4E (by - Gee Fung Sit and Eugeniy Meshcheryakov) -- adjustments for Cyrillic in Sans (by Andrey V. Panov) -- made italic shape for U+0434, U+0456, U+0457 in SerifOblique and Serif - Bold Oblique (by Andrey V. Panov) - -Changes from 2.7 to 2.8: - -- fixed instructions for U+0423, U+0427, U+0447, U+0448 in Serif, so they - look good at large sizes too (by Eugeniy Meshcheryakov) -- added U+FB00 and U+FB03 to U+FB06 to Serif typefaces (by Heikki Lindroos) -- added U+26B0-U+26B1, U+2701-U+2704, U+2706-U+2709, U+270C-U+2727, U+2729 - to U+274B, U+274D, U+274F to U+2752, U+2756, U+2758-U+275E, U+2761 to - U+2775 (by Heikki Lindroos) -- added and improved instructions for Cyrillic letters in Mono and Serif - (Book, by Eugeniy Meshcheryakov) -- rotated U+26B0 (was too small in mono) (by Gee Fung Sit) -- adjusted U+1EDA-U+1EDD, U+1EE8-U+1EEB, capitals using capital specific - accent and moved diacritics to match position on U+00F2 (ograve), etc. - (by Denis Jacquerye) -- added U+20D6, U+20D7 to Sans (by Gee Fung Sit) -- made Armenian ligatures discretionary since the Firefox ligature problem - still isn't fixed (by Ben Laenen) -- moved Armenian hyphen U+058A to a higher position (bug #7436) (by Ben - Laenen) -- hinted Greek glyphs in Sans Bold (by Ben Laenen) -- enabled Arabic lam-alif ligatures when diacritics are used (by Ben Laenen) - -Changes from 2.6 to 2.7: - -- added glyphs needed for Kurdish: U+0695, U+06B5, U+06C6, U+06CE and their - init/medi/fina forms in Sans (by Ben Laenen) -- added U+02CD, U+01F8 - U+01F9, U+1E3E - U+1E3F, U+1E30 - U+1E35, U+1EBC - - U+1EBD, U+1EF8 - U+1EF9 (includes glyphs needed for Yoruba, Maori, Guarani - and Twi) (by Ben Laenen) -- added U+22C8-22CC, U+29CE-29D5, U+2A7D-2AA0, U+2AAE-2ABA, U+2AF9-2AFA to - Sans (by Remy Oudompheng) -- adjusted diacritics on Vietnamese, Pinyin and other characters: - U+01A0-U+01A1, U+01AF-U+01B0, U+01D5-U+01DC, U+01DE-01E1, U+01FA-U+01FB - U+022A-U+022D, U+0230-U+0231, U+1E14-U+1E17, U+1E4C-U+1E53, U+1E78-U+1E7B, - U+1EA4-U+1EF1 in Sans (Book, Bold and Oblique) (by Denis Jacquerye) -- added basic arrows U+2190-U+2193 in Serif, which completes MES-1 compliance - for Serif (by Ben Laenen) -- added U+01E4, U+01E5, U+01FA, U+01FB, U+02BD, U+02C9 and U+02EE to Serif - (by Ben Laenen) -- fixed U+0209 in Serif Bold Oblique (by Ben Laenen) -- adjusted Box Drawing block characters U+2500-257F in Mono to fit character - cell, shifting them up by 416 (Denis Jacquerye) -- redid U+0194 in Sans (by Ben Laenen) -- added U+2217-2218, U+2295-22A1 to Mono (by Remy Oudompheng) -- added U+0462 to Serif (by Andrey V. Panov) -- added U+226C, U+228C-228E, U+2293-2294, U+22F2-22FF to Sans (by Remy - Oudompheng) -- adjusted U+2208-220D in Sans (by Remy Oudompheng) -- improved some Cyrillic glyphs in Mono (by Andrey V. Panov), rewritten - instructions for changed glyphs (by Eugeniy Meshcheryakov) -- added U+1E0E-1E0F, U+1E8E-1E8F to Mono fonts (by Denis Jacquerye). (bug - #7166) -- renamed 'Dotabove' to 'Dotaccent' in Mono Sans Oblique to match other fonts - (by Denis Jacquerye). -- added U+200B-U+200F in Sans faces and Serif faces, U+200B and U+200C were - in Sans already (by Lars Naesbye Christensen) -- added U+2601-U+262F, U+263D, U+263E, U+2648-U+265F, U+2668, U+2670-U+268B, - U+2690-U+269C, U+26A0, U+26A1, U+2794, U+2798-U+27AF, U+27B1-U+27BE to Mono - (by Heikki Lindroos) -- replaced the references with unshifted ones for both κ U+03BA and к U+043A - in Mono Book (by Denis Jacquerye) -- fixing glyph for U+04ED in Mono Book, consisted only of dieresis (by Andrey - V. Panov). - -Changes from 2.5 to 2.6: - -- redid U+2032 - U+2037, U+2057 based on Arev in Sans (by Gee Fung Sit) -- added U+0195, corrected U+039E, U+204B in Sans ExtraLight (by Gee Fung Sit) -- added instructions for some Cyrillic letters in Sans Bold (by Eugeniy - Meshcheryakov) -- added vulgar fractions U+2153-U+215F for Serif, made with references (by - Lars Naesbye Christensen) -- added U+228F-2292, U+2299-22AF, U+22B2-22B5, U+22CD, U+22D8-22ED to Sans - (by Remy Oudompheng) -- added U+2208-220D, U+2238-223D, U+2278-2281, U+228A-228B, U+228F-2292, - U+22CD, U+22DA-22E9 to Mono (by Remy Oudompheng) -- fixed misplaced dot in U+2250 in Mono (by Remy Oudompheng) -- added instructions for some Cyrillic letters in Mono Book and Bold(by - Eugeniy Meshcheryakov) -- minor changes to U+2241, U+2261-2263, U+22A4, U+22A5 in Sans (by Remy - Oudompheng) -- added hinting instructions to lowercase Armenian glyphs in Sans Book (by - Ben Laenen) -- changed U+2208, U+220B to match U+2209 and U+220C in Sans Bold (by Remy - Oudompheng) -- added Braille patterns U+2800-U+28FF to Sans (by Mederic Boquien) -- added instructions for some Cyrillic letters in Serif Book (by Eugeniy - Meshcheryakov) -- renamed BoldOblique fonts to Bold Oblique in TTF Name as originally in - Bitstream Vera fonts (by Denis Jacquerye) -- added hinting instructions to some Latin-B Extended and IPA characters in - Sans Book (by Denis Jacquerye and Ben Laenen) -- adjusted bearings, replaced diacritics, hinted hook and horn for - Vietnamese in Sans Book (by Denis Jacquerye) -- made FAX, TM, TEL, etc. discritionary ligatures in Sans and Serif fonts - (by Denis Jacquerye) -- removed ligatures of precomposed characters in Sans and Serif fonts (by - Denis Jacquerye) -- added U+F208, U+F20A, U+F215-F217, U+F21A-F21B, U+F25F in PUA (from SIL's - PUA, probably in Unicode 5.0): U+0243, U+0244, U+0245, U+024C, U+024D, - U+2C64, (U+2C6D), (U+2C71) -- modified some glyphs in Serif Oblique to make them more italic (by Denis - Jacquerye) - -Changes from 2.4 to 2.5: - -- fixed excessive kerning bug that occurs with Pango (by Denis Jacquerye) -- added U+20AF to Sans and Serif (by Lars Naesbye Christensen) -- regenerated Condensed faces (by Ben Laenen) -- added U+035C-U+035D to Sans, fixed U+0361 (by Denis Jacquerye) -- integrated 255 characters from Arev fonts: Latin Extended-B, Spacing - Modifiers, Combining Diacritical Marks, Cyrillic, Cyrillic supplement, - General Punctuation, Letterlike Symbols, Arrows, Mathematical Operators, - Miscellaneous Technical, Dingbats, Alphabetic Presentation Forms (by Denis - Jacquerye) -- added basic Cyrillic and basic Greek to Sans ExtraLight (by Denis Jacquerye) -- added U+0498, U+049A, U+04AA, U+04AB, U+04AF to Serif (by Eugeniy - Meshcheryakov) -- added U+0494, U+0495, U+0498, U+0499, U+04AA, U+04AB, U+04C3, U+04C4, - U+04C7, U+04C8 to Mono (by Eugeniy Meshcheryakov) -- adjusted weight of U+0256, U+0257, U+0260, U+0272, U+0273, U+0277, U+029B, - U+02A0 and modifed U+028B and U+027A in Mono (by Denis Jacquerye) -- added U+2000-200A to Mono (by Denis Jacquerye) -- added vulgar fractions U+2153 - U+215F to Mono (by Gee Fung Sit) -- adapted metrics of Arabic glyphs so they stay above cut-off height in Sans - (by Ben Laenen) -- fixed mkmk anchors for Arabic diacritics so they stack properly in Sans (by - Ben Laenen) -- fixed weight of lowercase upsilon in Sans Bold, make small adjustment to - lowercase omega in Sans (by Ben Laenen) -- added U+210E (by Mederic Boquien) -- unslanted U+2201, U+221B and U+221C in Sans Oblique (by Mederic Boquien) -- added several mathematical relation symbols to Sans and Mono (U+2241-224C, - U+2250-2255, U+2260-2269, U+226E-2277, U+2282-2287) modified U+223C to match - other tildes, and U+2282-2284 to have the same shape. (by Remy Oudompheng) -- made U+2234-U+2237 refer to U+2219 instead of U+00B7 in Sans (by Mederic - Boquien) -- added U+2238-223B, U+226A-226B, U+2278-2281, U+2288-228B to Sans (by Remy - Oudompheng) -- unslanted and changed reference of U+22C5 from U+00B7 to U+2219 in Sans (by - Mederic Boquien) -- added U+224D-225F, U+226D, U+22C6 to Sans and unslanted U+2219 in Sans - Oblique. (by Remy Oudompheng) -- added U+224D-225F, U+226D to Mono, shifted U+2266-2269 higher upwards and - unslanted U+2219 in Oblique. (by Remy Oudompheng) -- merged Coptic glyphs from Arev 0.2 (by Lars Naesbye Christensen) -- fixed and adjusted various Cyrillic glyphs in Serif (by Andrey V. Panov) -- made fi, fl... ligatures discretionary ligatures (by Ben Laenen) - -Changes from 2.3 to 2.4: - -- added U+04A2, U+04A3, U+04AC - U+04AF, U+04BA, U+04BB, U+04C0 - - U+04C2, U+04CB, U+04CD, U+04D8 - U+04DF, U+04E2 - U+04E5, U+04E8 - U+04F5, - U+04F6 - U+04F9 to Mono (by Eugeniy Meshcheryakov) -- added U+048C, U+048D, U+0494, U+0495, U+049E - U+04A7, U+04AC - - U+04AE, U+04B4- U+04B7, U+04BA, U+04BB, U+04C0 - U+04C4, U+04C7, U+04C8, - U+04CB, U+04CC, U+04D8 - U+04DF, U+04E2 - U+04E5, U+04EC - U+04F9 to Serif - (by Eugeniy Meshcheryakov) -- added U+2134 to Sans (by Gee Fung Sit) -- added U+2080 - U+2089 to all faces (by Gee Fung Sit) -- several minor corrections to Sans (by Gee Fung Sit) -- major corrections to Sans Condensed (by Gee Fung Sit) -- corrected Superscripts and Subscripts in Sans (by Gee Fung Sit) -- corrected anchors of U+0316-U+0319 (by Denis Jacquerye) -- Verajja integrated (by Stepan Roh) -- copied U+2328, U+2600, U+2639-U+263C, U+263F-U+2647, U+2660-U+2667, - and U+2669-U+266F from Sans to Serif, and copied scaled-down versions of - them to Sans Mono (by David Lawrence Ramsey) -- added U+20B4 to all faces (by Eugeniy Meshcheryakov) -- added more minor positional adjustments to U+2638 in all faces to - match the other miscellaneous symbols in Verajja, and rescale it in Sans - Mono so that it looks better (by David Lawrence Ramsey) -- added U+2242, U+2243 and U+22A4 (by Mederic Boquien) -- corrected U+2245 in Sans (by Mederic Boquien) -- added U+0221, U+0234-0236 (by Denis Jacquerye) -- added in Arabic block to Sans: U+060C, U+0615, U+061B, U+061F, U+0621 -- U+063A, U+0640 - U+0655, U+0660 - U+066F, U+0679 - U+0687, U+0698, U+06A1, - U+06A9, U+06AF, U+06BA, U+06BF, U+06CC, U+06F0 - U+06F9 (by Ben Laenen) -- added in Arabic Presentation Forms A to Sans: U+FB52 - U+FB81, U+FB8A -- U+FB95, U+FB9E - U+FB9F, U+FBE8 - U+FBE9, U+FBFC - U+FBFF (by Ben Laenen) -- added complete Arabic Presentation Forms B to Sans: U+FE70 - U+FE74, - U+FE76 - U+FEFC, U+FEFF (by Ben Laenen) -- added complete Greek Extended block to Mono (by Ben Laenen) -- modified Greek capitals with tonos in Mono (by Ben Laenen) -- added U+01C4-01CC, U+01D5, U+01DE, U+01E0-U+01E1, U+01E6-U+01E9, - U+01EE-U+01F5, U+01F8-U+0217, U+021E-U+021F, U+0226-U+022A, U+022C to Serif - (by Denis Jacquerye) -- adjusted U+043B and U+044F in Serif (by Denis Jacquerye) -- added U+2000-U+200A (by Denis Jacquerye) -- added U+1E00-U+1E0B, U+1E0E-U+1E11, U+1E14-U+1E1C, U+1E1E-U+1E23, - U+1E26-U+1E2D, U+1E30-U+1E35, U+1E3A-U+1E3B, U+1E3E-U+1E40, U+1E48-U+1E49, - U+1E50-U+1E56, U+1E58-U+1E59, U+1E5E-U+1E60, U+1E68-U+1E6B, U+1E6E-U+1E6F, - U+1E72-U+1E7D, U+1E86-U+1E9B, U+1EA0-U+1EA3, U+1EAC-U+1EB7, U+1EBA-U+1EBD, - U+1EC6-U+1ECF, U+1ED8-U+1ED9, U+1EE6-U+1EE7, U+1EF4-U+1EF9 to Serif (by - Denis Jacquerye) -- added U+048E, U+048F, U+049C-U+049F, U+04B8, U+04B9, U+04BC-U+04BF, - U+04C3, U+04C4 to Sans (by Eugeniy Meshcheryakov) -- added DejaVu Sans Extra Light (by Denis Jacquerye) -- Adjusted underline position for (hopefully) improved legibility in - Sans, Serif, Mono (Tim May) -- added auto-generated DejaVu LGC (by Stepan Roh) - -Changes from 2.2 to 2.3: - -- fixed bug U+042B and U+044B behave badly in Sans Bold or Oblique (by - Keenan Pepper) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- added U+04D0-U+04D7, U+04E6, U+04E7 to Mono (by Eugeniy Meshcheryakov) -- added U+048A - U+048D, U+0498, U+0499, U+04AA, U+04AB, U+04B0, U+04B1, - U+04C0, U+04C9, U+04CA, U+04CE, U+04CD, U+04DA, U+04DB, U+04DE, U+04DF, - U+04E2 - U+04E5, U+04EC - U+04F8, U+04F9 to Sans (by Eugeniy Meshcheryakov) -- added U+04E0, U+04E1 to all faces (by Eugeniy Meshcheryakov) -- added Greek Extended to Sans and Serif: U+1F00-U+1F15, U+1F18-U+1F1D, - U+1F20-U+1F45, U+1F48-U+1F4D, U+1F50-U+1F57, U+1F59, U+1F5B, U+1F5D, - U+1F5F-U+1F7D, U+1F80-U+1FB4, U+1FB6-U+1FC4, U+1FC6-U+1FD3, U+1FD6-U+1FDB, - U+1FDD-U+1FEF, U+1FF2-U+1FF4, U+1FF6-U+1FFE (by Ben Laenen) -- added Greek variant letterforms, archaic letters and symbols to Mono: - U+03D0-U+03E1, U+03F0-U+03FF (by Ben Laenen) -- added Armenian block and Armenian ligatures to Sans (U+0531 - U+0556, - U+0559 - U+055F, U+0561 - U+0587, U+0589 - U+058A, U+FB13 - U+FB17) (by Ben - Laenen) -- redid some Greek characters in Sans and Mono to make them look better - and to correct some errors (by Ben Laenen) -- added U+27E0 to all faces (by David Lawrence Ramsey) -- added underscore (U+005F) consistency fixes: extended the Sans Mono - and Sans Mono Oblique underscores to touch both horizontal edges, and - reduced the height of the Sans Bold Oblique underscore to match the Sans - Bold underscore (by David Lawrence Ramsey) -- added underscore (U+005F) derivatives and consistency fixes for them: - made U+0332 a reference to underscore at Denis Jacquerye's suggestion; made - U+0333 two references to underscore; made U+033F two references to U+203E; - added U+2017 as two references to underscore, and made U+0333 a reference to - it; and added U+203E as a reference to underscore, and made U+0305 a - reference to it (by David Lawrence Ramsey) -- added U+201B, U+2220, U+2320-U+2321, U+23AE, U+23CF, all remaining - Geometric Shapes glyphs (U+25A0-U+25C9, U+25CB-U+25D7, U+25D9-U+25E5, - U+25E7-U+25FF), and U+2B12-U+2B13 to all faces (by David Lawrence Ramsey) -- added minor positional adjustments to U+2638 in all faces (by David - Lawrence Ramsey) -- added U+201F to Sans Mono and Serif faces (by David Lawrence Ramsey) -- added U+01B7, U+01F6, U+0464 - U+0465, U+2160 - U+2180, U+2183, - U+220A, U+220D, U+2329, U+232A, U+2422, U+27E8 - U+27EB, U+2680 - U+2685 to - Sans (by Gee Fung Sit ???) -- added U+2116 to Sans and Serif (by Gee Fung Sit) -- changed florin sign U+0192 in Sans (by Gee Fung Sit) -- added anchor points to some glyphs (by Denis Jacquerye) -- adjusted height of IPA superscripts U+02B0-02B8, U+02C0-02C1, - U+02E0-02E4, U+207F to match with height of U+00B2 (by Denis Jacquerye) -- added U+0184-U+0185, U+019C, U+019F, U+01A0-U+01A3, U+01A6, U+01AA, - U+01AF-U+01B0, U+01B2-U+01B4, U+01B7-U+01B8, U+01BC-U+01BC, U+0224-U+0225, - U+023A-U+0240, U+1D16-U+1D17, U+1D1D-U+1D1E, U+1D43-U+1D5B, U+1D7B, - U+1D85,U+1D9B-1DB7, U+1DB9-U+1DBF, U+20A6 to all fonts (by Denis Jacquerye) -- added added U+0182, U+018B, U+018E, U+01A0-U+01A1, U+01B1, U+01B9, - U+01C0-U+01C3, U+0238-U+0239, U+1D02, U+1D08-U+1D09, U+1D14, U+1D1F, U+1D77 - to Serif and Mono (by Denis Jacquerye) -- added U+0181, U+0183, U+0187-U+0188, U+018A-U+018F, U+0191, U+0193, - U+0195-U+019B, U+019D-U+019E, U+01A4-U+01A5, U+01AC-U+01AE, U+01B5-U+01B6, - U+01B9, U+01BB, U+01F6 to Serif (by Denis Jacquerye) -- added U+0181, U+0187-U+0188, U+018A, U+018D, U+018F, U+0191, U+0193, - U+0195-U+019F, U+01A4-01A5, U+01AC-01AD, U+01B5-U+01B6, U+1BB, U+01F6, - U+01D7-U+01DC, U+0238-U+0239, U+0241 to Mono (by Denis Jacquerye) -- added to Mono and Serif (by Denis Jacquerye) - -Changes from 2.1 to 2.2: - -- reworked the vertical orientation of the Blocks Elements characters - in all faces to remove their overly large descenders, in order to fix - problems with e.g. terminal emulators (by David Lawrence Ramsey) -- copied bullet in Sans faces to Serif faces for consistency (by David - Lawrence Ramsey) -- added U+2023, U+25D8, U+25E6, and U+29EB to all faces (by David - Lawrence Ramsey) -- added U+1EB8, U+1EB9, U+1ECA - U+1ECD, U+1EE4, U+1EE5 (by Tim May) -- added U+01DD, U+02BE, U+02BF, U+02D3 to all, changed U+02D2 in - non-Condensed and U+1EE5 in Serif (by Tim May) -- fixed U+01CE, replacing wrong circumflex by caron (by Denis Jacquerye) -- added anchor points to some glyphs (by Denis Jacquerye) -- added U+20B5 (by Denis Jacquerye) -- added U+0181 - U+0183, U+0187, U+0188, U+018A - U+018D, U+0191, - U+0193, U+0195 - U+019B, U+019D, U+019E, U+01A4, U+01A7 - U+01A9, U+01AB - - U+01AE, U+01B1, U+01B5, U+01B6, U+01BB, U+01C0 - U+01C3, U+01F1 - U+01F3, - U+0238, U+0239, U+1D02, U+1D08, U+1D09, U+1D14, U+1D1F, U+1D77, U+2103, - U+2126, U+2127, U+212A, U+212B, U+2132, U+214B, U+2210, U+2217, U+2218, - U+2A0C - U+2A0E, U+FB00, U+FB03 and U+FB04 to Sans (by Gee Fung Sit) -- added U+01A9, U+01C3 and U+2126 to Mono and Serif (by Gee Fung Sit) -- adjusted bearings of U+028B in Sans (by Gee Fung Sit) -- added U+018F, U+0494-U+0497, U+04A0-U+04A7, U+04AC-U+04AF, - U+04B4-U+04B7, U+04BA-U+04BB, U+04C1-U+04C2, U+04C5-U+04C8, U+04CB-U+04CC, - U+04D0-U+04D9, U+04DC-U+04DD, U+04E6-U+04EB to Sans (by Eugeniy - Meshcheryakov) -- replaced with references U+0391-U+0393, U+0395-U+0397, U+0399, U+039A, - U+039C, U+039D, U+039F-U+03A1, U+03A4, U+03A5, U+03A7, U+03BF, U+03DC, - U+0405, U+0406, U+0408, U+0410, U+0412, U+0415, U+0417, U+041A, - U+041C-U+041E, U+0420-U+0422, U+0425, U+0430, U+0435, U+043E, U+0440, - U+0441, U+0443, U+0445, U+0455-U+0458 in Serif and Mono (by Eugeniy - Meshcheryakov) -- added U+04D0-U+04D7, U+04E6-U+04EB to Serif (by Eugeniy Meshcheryakov) -- added U+212A and U+212B to the rest of the faces (by Lars Naesbye - Christensen) -- added U+2318 and U+2325 to Sans and Serif (by Lars Naesbye Christensen) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- completed basic Greek alphabet: added U+0374-U+0375, U+037A, U+037E, - U+0384-U+038A, U+038C, U+038E-U+0390, U+03AC-U+03BF, U+03C1-U+03CE (by Ben - Laenen) -- added U+2070 and U+2074-U+2079 (by Mederic Boquien) - -Changes from 2.0 to 2.1: - -*** Be aware that names of some TTF files changed since version 2.0. *** - -- added U+0323, U+1E0C, U+1E0D, U+1E24, U+1E25, U+1E36 - U+1E39, U+1E42, - U+1E43, U+1E46, U+1E47, U+1E5A - U+1E5D, U+1E62, U+1E63, U+1E6C, U+1E6D, - U+1E7E, U+1E7F (by Tim May) -- fixed bug where GNOME applications used Mono Bold Oblique instead of - Mono Oblique (by Keenan Pepper) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- added U+1E41, U+1E57, U+1E61 (by Sander Vesik) -- added U+0189, U+0309, U+0313, U+0314, U+031A, U+031B, U+0327, U+0328, - U+032B, U+0333, U+033C (by Denis Jacquerye) -- adjusted and fixed U+0186, U+0254, U+0291, U+0316 - U+0319, U+031C - - U+0320, U+0323 - U+0326, U+0329 - U+032A, U+032C - U+0332, U+0339 - U+033B, - U+033E, U+033F (by Denis Jacquerye) -- fixed U+1E12, U+1E3C, U+1E4A, U+1E70 to have normal below diacritics - (by Denis Jacquerye) -- fixed U+1E82, U+1E84 and U+1EF2 to have uppercase above diacritics (by - Denis Jacquerye) -- added anchor points to some glyphs (by Denis Jacquerye) -- dropped "-Roman" from font names - affects both internal TTF names and - names of generated files (by Stepan Roh) -- attempt to fix bug Vertical spacing too big for Mono by exchanging - LineGap and OS2TypoLinegap values (proofed by Stefan Rank) -- added Greek capitals U+0391 - U+03A1, U+03A3 - U+03A9, U+03AA, U+03AB - in Mono (by Ben Laenen) -- added the per ten thousand sign U+2031 (by Mederic Boquien) -- added U+2207, U+221D, U+221F, U+2227 - U+222A, and U+2261 (by David - Lawrence Ramsey) -- new logo (by Gee Fung Sit) -- added U+0180, U+018E, U+201F, U+2024, U+2025, U+203D, U+2200, U+2203, - U+2213, U+222C, U+222D, U+2263 to Sans (by Gee Fung Sit) - -Changes from 1.15 to 2.0: - -- "Italized" basic glyphs in all Serif Oblique and their Condensed faces - (by David Jez) -- added and improved TrueType instructions and related settings (by Keenan - Pepper) -- added anchor points to some glyphs (by Denis Jacquerye) -- many new spacing and combining accents (by Denis Jacquerye) -- smart substitutions for transforming i and j to dottless form and for - using uppercase diacritics (by Denis Jacquerye) -- fixed remaining erroneously slanted characters in Serif Oblique faces (by - David Lawrence Ramsey) -- copied bullet in Sans faces to Sans Oblique faces for consistency (by - David Lawrence Ramsey) -- added U+203C and U+2047-U+2049 (by David Lawrence Ramsey) -- added Greek glyphs to Serif (by Ben Laenen, Condensed merge by David Jez) -- fixed bug LTR glyphs behaving like RTL (by Ben Laenen) -- fixed wrong glyph directions (by David Jez) -- fixed repositioned accents in Condensed faces (by David Jez) - -Changes from 1.14 to 1.15: - -- added and improved TrueType instructions and related settings (by Keenan - Pepper) -- fixed U+2302, U+2319 (by David Lawrence Ramsey) -- fixed yet another monospace bug (by Stepan Roh) -- fixed potential "too big ascender/descender" bug (by Stepan Roh) -- fixed U+026E and U+028E (by Denis Jacquerye) -- added U+0186, U+0190, U+0300 - U+0304, U+0306 - U+0308, U+030A - U+030C, - U+0321, U+0322 (by Denis Jacquerye) -- added rest of Block Elements: U+2591 - U+2593 (by David Lawrence Ramsey) -- added U+2311, U+237D and U+2638 (by David Lawrence Ramsey) -- added U+01CD - U+01D4 (by Denis Jacquerye) -- fixed accents of U+00F2 - U+00F6 by replacing them with references in Mono - Bold (by David Jez) -- added U+0490, U+0491 (by Eugeniy Meshcheryakov) -- added hints to U+0404 and U+0454 in Sans (by Eugeniy Meshcheryakov) -- completed Greek glyphs from U+0370 to U+03CF in Serif (by Ben Laenen) -- fixed shape of U+0255 in Sans Bold and Sans Bold Oblique (by Denis - Jacquerye) - -Changes from 1.13 to 1.14: - -- fixed bug where Mono faces were not recognized as fixed pitch in Windows - by correcting Venda glyphs (by David Jez) -- added and improved TrueType instructions (by Keenan Pepper) -- added 6 Uzbekian glyphs (by Mashrab Kuvatov) -- added Greek glyphs to Sans and Serif, changed pi and omega to fit in (by - Ben Laenen) -- added IPA and related superscript glyphs (by Denis Jacquerye) -- fixed buggy Venda glyphs (by David Lawrence Ramsey and Stepan Roh) -- added U+2302, U+2310, U+2319 (by David Lawrence Ramsey) -- fixed slanted U+00AC in Serif Oblique faces (by David Lawrence Ramsey) -- added 29 glyphs from Block Elements (by David Lawrence Ramsey) - -Changes from 1.12 to 1.13: - -- removed all stems (PS hints) (requested by David Jez) -- added U+01D6, U+01DF, U+022B, U+022D and U+0231 (by Sander Vesik) -- added 10 Venda glyphs (by Dwayne Bailey) -- fixed bug when fonts had no name on Microsoft Windows (by Stepan Roh) -- updated 'missing' glyph U+FFFD (by David Jez) -- set TTF flag fsType to 'Installable Embedding' (= unrestricted usage) - (idea by C. Tiffany) - -Changes from 1.11 to 1.12: - -- added long s (by James Cloos) -- prettier comma accent in gcommaaccent (by David Jez) -- added Hbar, hbar, kgreenlandic, napostrophe, Eng, eng, Tbar, tbar, - afii57929 (by David Jez) -- changed Iogonek, iogonek, IJ, ij to look better (by David Jez) -- glyph uni0237 renamed to dotlessj (requested by David Jez) -- fixed accents for dcaron, lcaron, tcaron, Uogonek, uogonek in Serif (by - David Jez) -- added U+2500 - U+257F box drawing glyphs to Sans Mono (by David Jez) -- fixed accents in Wcircumflex, Ycircumflex and Zdotaccent (by David Jez) -- extra kerning for F (by Sander Vesik) -- added 'missing' glyph U+FFFD (by David Jez) - -Changes from 1.10 to 1.11: - -- kerning updates (by Sander Vesik) -- added Iogonek, iogonek, IJ, ij, Uogonek, uogonek (from SuSE standard fonts - by Adrian Schroeter, SuSE AG) -- added Gcommaaccent, gcommaaccent, Kcommaaccent, kcommaaccent, - Lcommaaccent, lcommaaccent, Ncommaaccent, ncommaaccent, Rcommaaccent, - rcommaaccent (by Stepan Roh) - -Changes from 1.9 to 1.10: - -- added U+022E, U+022F (by Sander Vesik) -- kerning updates for DejaVu Sans (by Sander Vesik) -- fixed too wide cyrillic glyphs in DejaVu Sans Mono (by Valentin Stoykov) -- fixed ligatures bug in Mono (by Stepan Roh) - -Changes from 1.8 to 1.9: - -- integrated Arev Cyrillics (by Danilo Segan) -- added U+01EA, U+01EB, U+01EC, U+01ED (by Sander Vesik) - -Changes from 1.7 to 1.8: - -- fixed accents in Serif Oblique and Serif Bold Oblique (by Stepan Roh) - -Changes from 1.6 to 1.7: - -- added automatically generated Condensed typefaces (by Stepan Roh) - -Changes from 1.5 to 1.6: - -- monospace bug fixed (by Stepan Roh) -- incorrect Bitstream foundry assigned by fontconfig and KDE Font Installer -fixed (by Stepan Roh) -- added automatically generated Oblique version of Serif typefaces (by -Stepan Roh) -- corrected cyrillic D and d (by Danilo Segan and David Jez) -- fixed accents position in Oblique version of Serif typefaces (by Danilo -Segan and Sander Vesik) -- fixed incorrect computation of OS2Win* fields (by Stepan Roh) -- added visiblespace U+2423 (by David Jez) -- fixed 'line height' bug by fixing ascender and descender values (by David -Jez and Stepan Roh) -- fixed part of 'worse than Vera' bug (by Peter Cernak) -- smaller comma accent U+0326 (by David Jez) - -Changes from 1.4 to 1.5: - -- added Cyrillics (96 characters) and Dcroat to the rest of typefaces (by -Danilo Segan) -- fixed bugs in some Cyrillic characters, some of them reported by Sander -Vesik (by Danilo Segan) -- added U+0100, U+0101, U+0112, U+0113, U+012A, U+012B, U+014C, U+014D, -U+016A, U+016B, U+01E2, U+01E3, U+0232 and U+0233 (by Sander Vesik) -- added Romanian characters (by Misu Moldovan) -- added U+0108, U+0109, U+010A, U+010B, U+0114, U+0115, U+0116, U+0117, -U+011C, U+011D, U+0120, U+0121, U+0124, U+0125, U+0128, U+0129, U+012C, -U+012D, U+0134, U+0135, U+014E, U+014F, U+0150, U+0151, U+015C, U+015D, -U+0168, U+0169, U+016C, U+016D, U+0170, U+0171 and U+0237 (by James -Crippen) -- added U+02BB, U+2010, U+2011, U+2012 and U+2015 (by Stepan Roh) - -Changes from 1.3 to 1.4: - -- added Polish characters (Aogonek, aogonek, Eogonek, eogonek, Nacute, -nacute, Sacute, sacute, Zacute, zacute, Zdotaccent, zdotaccent) (by Stepan -Roh) - -Changes from 1.2 to 1.3: - -- added Cyrillics (96 characters) and Dcroat to Sans typefaces (by Danilo -Segan from his BePa fonts) - -Changes from 1.1 to 1.2: - -- added Ldot, ldot, Wcircumflex, wcircumflex, Ycircumflex, ycircumflex, - Wgrave, wgrave, Wacute, wacute, Wdieresis, wdieresis, Ygrave and ygrave - (from The Olwen Font Family 0.2 by Dafydd Harries) - -Changes from 1.0 to 1.1: - -- added Lacute, lacute, Lcaron, lcaron, Racute and racute (by Peter Cernak) - -Changes from 0.9.4 to 1.0: - -- none, just changed version and updated README - -Changes from 0.9.3 to 0.9.4: - -- fixed TTF generation (kerning tables were missing) - -Changes from 0.9.2 to 0.9.3: - -- kerning of added characters -- proper caron shape for dcaron in Mono (by Ondrej Koala Vacha) -- minor visual changes - -Changes from 0.9.1 to 0.9.2: - -- internal bugged version - -Changes from 0.9 to 0.9.1: - -- proper caron shape for dcaron and tcaron -- minor visual changes - -$Id: NEWS 2471 2011-02-27 14:25:15Z ben_laenen $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/README b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/README deleted file mode 100644 index 0f2079a9f38..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/README +++ /dev/null @@ -1,59 +0,0 @@ -DejaVu fonts 2.33 (c)2004-2011 DejaVu fonts team ------------------------------------------------- - -The DejaVu fonts are a font family based on the Bitstream Vera Fonts -(http://gnome.org/fonts/). Its purpose is to provide a wider range of -characters (see status.txt for more information) while maintaining the -original look and feel. - -DejaVu fonts are based on Bitstream Vera fonts version 1.10. - -Available fonts (Sans = sans serif, Mono = monospaced): - -DejaVu Sans Mono -DejaVu Sans Mono Bold -DejaVu Sans Mono Bold Oblique -DejaVu Sans Mono Oblique -DejaVu Sans -DejaVu Sans Bold -DejaVu Sans Bold Oblique -DejaVu Sans Oblique -DejaVu Sans ExtraLight (experimental) -DejaVu Serif -DejaVu Serif Bold -DejaVu Serif Bold Italic (experimental) -DejaVu Serif Italic (experimental) -DejaVu Sans Condensed (experimental) -DejaVu Sans Condensed Bold (experimental) -DejaVu Sans Condensed Bold Oblique (experimental) -DejaVu Sans Condensed Oblique (experimental) -DejaVu Serif Condensed (experimental) -DejaVu Serif Condensed Bold (experimental) -DejaVu Serif Condensed Bold Italic (experimental) -DejaVu Serif Condensed Italic (experimental) - -All fonts are also available as derivative called DejaVu LGC with support -only for Latin, Greek and Cyrillic scripts. - -For license information see LICENSE. What's new is described in NEWS. Known -bugs are in BUGS. All authors are mentioned in AUTHORS. - -Fonts are published in source form as SFD files (Spline Font Database from -FontForge - http://fontforge.sf.net/) and in compiled form as TTF files -(TrueType fonts). - -For more information go to http://dejavu.sourceforge.net/. - -Characters from Arev fonts, Copyright (c) 2006 by Tavmjong Bah: ---------------------------- -U+01BA, U+01BF, U+01F7, U+021C-U+021D, U+0220, U+0222-U+0223, -U+02B9, U+02BA, U+02BD, U+02C2-U+02C5, U+02d4-U+02D5, -U+02D7, U+02EC-U+02EE, U+0346-U+034E, U+0360, U+0362, -U+03E2-03EF, U+0460-0463, U+0466-U+0486, U+0488-U+0489, U+04A8-U+04A9, -U+0500-U+050F, U+2055-205E, U+20B0, U+20B2-U+20B3, U+2102, U+210D, U+210F, -U+2111, U+2113, U+2115, U+2118-U+211A, U+211C-U+211D, U+2124, U+2135, -U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704, -U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794, -U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06 - -$Id: README 2471 2011-02-27 14:25:15Z ben_laenen $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/langcover.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/langcover.txt deleted file mode 100644 index f503448771f..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/langcover.txt +++ /dev/null @@ -1,242 +0,0 @@ -This is the language coverage file for DejaVu fonts -($Id$) - - Sans Serif Sans Mono -aa Afar 100% (62/62) 100% (62/62) 100% (62/62) -ab Abkhazia 100% (90/90) 93% (84/90) 84% (76/90) -af Afrikaans 100% (69/69) 100% (69/69) 100% (69/69) -ak Akan 100% (73/73) 100% (73/73) 100% (73/73) -am Amharic (0/264) (0/264) (0/264) -an Aragonese 100% (66/66) 100% (66/66) 100% (66/66) -ar Arabic 100% (125/125) (0/125) 100% (125/125) -as Assamese (0/64) (0/64) (0/64) -ast Asturian/Bable/Leonese/Asturleonese 100% (66/66) 100% (66/66) 100% (66/66) -av Avaric 100% (67/67) 100% (67/67) 100% (67/67) -ay Aymara 100% (60/60) 100% (60/60) 100% (60/60) -az-az Azerbaijani in Azerbaijan 100% (66/66) 100% (66/66) 100% (66/66) -az-ir Azerbaijani in Iran 100% (130/130) (0/130) 100% (130/130) -ba Bashkir 100% (82/82) 100% (82/82) 97% (80/82) -be Byelorussian 100% (68/68) 100% (68/68) 100% (68/68) -ber-dz Berber in Algeria 100% (70/70) 100% (70/70) 100% (70/70) -ber-ma Berber in Morocco 100% (32/32) (0/32) (0/32) -bg Bulgarian 100% (60/60) 100% (60/60) 100% (60/60) -bh Bihari (Devanagari script) (0/68) (0/68) (0/68) -bho Bhojpuri (Devanagari script) (0/68) (0/68) (0/68) -bi Bislama 100% (58/58) 100% (58/58) 100% (58/58) -bin Edo or Bini 100% (78/78) 100% (78/78) 100% (78/78) -bm Bambara 100% (60/60) 100% (60/60) 100% (60/60) -bn Bengali (0/63) (0/63) (0/63) -bo Tibetan (0/95) (0/95) (0/95) -br Breton 100% (64/64) 100% (64/64) 100% (64/64) -bs Bosnian 100% (62/62) 100% (62/62) 100% (62/62) -bua Buriat (Buryat) 100% (70/70) 100% (70/70) 100% (70/70) -byn Blin/Bilin (0/255) (0/255) (0/255) -ca Catalan 100% (74/74) 100% (74/74) 100% (74/74) -ce Chechen 100% (67/67) 100% (67/67) 100% (67/67) -ch Chamorro 100% (58/58) 100% (58/58) 100% (58/58) -chm Mari (Lower Cheremis / Upper Cheremis) 100% (76/76) 100% (76/76) 100% (76/76) -chr Cherokee (0/85) (0/85) (0/85) -co Corsican 100% (84/84) 100% (84/84) 100% (84/84) -crh Crimean Tatar/Crimean Turkish 100% (68/68) 100% (68/68) 100% (68/68) -cs Czech 100% (82/82) 100% (82/82) 100% (82/82) -csb Kashubian 100% (74/74) 100% (74/74) 100% (74/74) -cu Old Church Slavonic 100% (103/103) 86% (89/103) 78% (81/103) -cv Chuvash 100% (74/74) 100% (74/74) 100% (74/74) -cy Welsh 100% (78/78) 100% (78/78) 100% (78/78) -da Danish 100% (70/70) 100% (70/70) 100% (70/70) -de German 100% (59/59) 100% (59/59) 100% (59/59) -dv Divehi/Dhivehi/Maldivian (0/49) (0/49) (0/49) -dz Dzongkha (0/95) (0/95) (0/95) -ee Ewe 100% (99/99) 100% (99/99) 100% (99/99) -el Greek 100% (69/69) 100% (69/69) 100% (69/69) -en English 100% (72/72) 100% (72/72) 100% (72/72) -eo Esperanto 100% (64/64) 100% (64/64) 100% (64/64) -es Spanish 100% (66/66) 100% (66/66) 100% (66/66) -et Estonian 100% (64/64) 100% (64/64) 100% (64/64) -eu Basque 100% (56/56) 100% (56/56) 100% (56/56) -fa Persian 100% (129/129) (0/129) 100% (129/129) -fat Fanti 100% (73/73) 100% (73/73) 100% (73/73) -ff Fulah (Fula) 100% (62/62) 100% (62/62) 100% (62/62) -fi Finnish 100% (62/62) 100% (62/62) 100% (62/62) -fil Filipino 100% (84/84) 100% (84/84) 100% (84/84) -fj Fijian 100% (52/52) 100% (52/52) 100% (52/52) -fo Faroese 100% (68/68) 100% (68/68) 100% (68/68) -fr French 100% (84/84) 100% (84/84) 100% (84/84) -fur Friulian 100% (66/66) 100% (66/66) 100% (66/66) -fy Frisian 100% (75/75) 100% (75/75) 100% (75/75) -ga Irish 100% (80/80) 100% (80/80) 100% (80/80) -gd Scots Gaelic 100% (70/70) 100% (70/70) 100% (70/70) -gez Ethiopic (Geez) (0/218) (0/218) (0/218) -gl Galician 100% (66/66) 100% (66/66) 100% (66/66) -gn Guarani 100% (70/70) 100% (70/70) 100% (70/70) -gu Gujarati (0/68) (0/68) (0/68) -gv Manx Gaelic 100% (54/54) 100% (54/54) 100% (54/54) -ha Hausa 100% (60/60) 100% (60/60) 100% (60/60) -haw Hawaiian 100% (63/63) 100% (63/63) 100% (63/63) -he Hebrew 100% (27/27) (0/27) (0/27) -hi Hindi (Devanagari script) (0/68) (0/68) (0/68) -hne Chhattisgarhi (0/68) (0/68) (0/68) -ho Hiri Motu 100% (52/52) 100% (52/52) 100% (52/52) -hr Croatian 100% (62/62) 100% (62/62) 100% (62/62) -hsb Upper Sorbian 100% (72/72) 100% (72/72) 100% (72/72) -ht Haitian/Haitian Creole 100% (56/56) 100% (56/56) 100% (56/56) -hu Hungarian 100% (70/70) 100% (70/70) 100% (70/70) -hy Armenian 100% (77/77) 100% (77/77) 100% (77/77) -hz Herero 100% (57/57) 100% (57/57) 100% (57/57) -ia Interlingua 100% (52/52) 100% (52/52) 100% (52/52) -id Indonesian 100% (54/54) 100% (54/54) 100% (54/54) -ie Interlingue 100% (52/52) 100% (52/52) 100% (52/52) -ig Igbo 100% (58/58) 100% (58/58) 100% (58/58) -ii Sichuan Yi/Nuosu (0/1165) (0/1165) (0/1165) -ik Inupiaq (Inupiak, Eskimo) 100% (68/68) 100% (68/68) 100% (68/68) -io Ido 100% (52/52) 100% (52/52) 100% (52/52) -is Icelandic 100% (70/70) 100% (70/70) 100% (70/70) -it Italian 100% (72/72) 100% (72/72) 100% (72/72) -iu Inuktitut 100% (161/161) (0/161) (0/161) -ja Japanese (0/6537) (0/6537) (0/6537) -jv Javanese 100% (56/56) 100% (56/56) 100% (56/56) -ka Georgian 100% (33/33) 100% (33/33) 100% (33/33) -kaa Kara-Kalpak (Karakalpak) 100% (78/78) 100% (78/78) 100% (78/78) -kab Kabyle 100% (70/70) 100% (70/70) 100% (70/70) -ki Kikuyu 100% (56/56) 100% (56/56) 100% (56/56) -kj Kuanyama/Kwanyama 100% (52/52) 100% (52/52) 100% (52/52) -kk Kazakh 100% (77/77) 100% (77/77) 100% (77/77) -kl Greenlandic 100% (81/81) 100% (81/81) 100% (81/81) -km Central Khmer (0/63) (0/63) (0/63) -kn Kannada (0/70) (0/70) (0/70) -ko Korean (0/2443) (0/2443) (0/2443) -kok Kokani (Devanagari script) (0/68) (0/68) (0/68) -kr Kanuri 100% (56/56) 100% (56/56) 100% (56/56) -ks Kashmiri 98% (143/145) (0/145) 97% (141/145) -ku-am Kurdish in Armenia 100% (64/64) 100% (64/64) 100% (64/64) -ku-iq Kurdish in Iraq 100% (32/32) (0/32) 87% (28/32) -ku-ir Kurdish in Iran 100% (32/32) (0/32) 87% (28/32) -ku-tr Kurdish in Turkey 100% (62/62) 100% (62/62) 100% (62/62) -kum Kumyk 100% (66/66) 100% (66/66) 100% (66/66) -kv Komi (Komi-Permyak/Komi-Siryan) 100% (70/70) 100% (70/70) 100% (70/70) -kw Cornish 100% (64/64) 100% (64/64) 100% (64/64) -kwm Kwambi 100% (52/52) 100% (52/52) 100% (52/52) -ky Kirgiz 100% (70/70) 100% (70/70) 100% (70/70) -la Latin 100% (68/68) 100% (68/68) 100% (68/68) -lah Lahnda 98% (143/145) (0/145) 97% (141/145) -lb Luxembourgish (Letzeburgesch) 100% (75/75) 100% (75/75) 100% (75/75) -lez Lezghian (Lezgian) 100% (67/67) 100% (67/67) 100% (67/67) -lg Ganda 100% (54/54) 100% (54/54) 100% (54/54) -li Limburgan/Limburger/Limburgish 100% (62/62) 100% (62/62) 100% (62/62) -ln Lingala 100% (81/81) 100% (81/81) 100% (81/81) -lo Lao 100% (55/55) (0/55) 83% (46/55) -lt Lithuanian 100% (70/70) 100% (70/70) 100% (70/70) -lv Latvian 100% (78/78) 100% (78/78) 100% (78/78) -mai Maithili (Devanagari script) (0/68) (0/68) (0/68) -mg Malagasy 100% (56/56) 100% (56/56) 100% (56/56) -mh Marshallese 100% (62/62) 100% (62/62) 100% (62/62) -mi Maori 100% (64/64) 100% (64/64) 100% (64/64) -mk Macedonian 100% (42/42) 100% (42/42) 100% (42/42) -ml Malayalam (0/68) (0/68) (0/68) -mn-cn Mongolian in China (0/130) (0/130) (0/130) -mn-mn Mongolian in Mongolia 100% (70/70) 100% (70/70) 100% (70/70) -mo Moldavian 100% (128/128) 100% (128/128) 100% (128/128) -mr Marathi (Devanagari script) (0/68) (0/68) (0/68) -ms Malay 100% (52/52) 100% (52/52) 100% (52/52) -mt Maltese 100% (72/72) 100% (72/72) 100% (72/72) -my Burmese (Myanmar) (0/48) (0/48) (0/48) -na Nauru 100% (60/60) 100% (60/60) 100% (60/60) -nb Norwegian Bokmal 100% (70/70) 100% (70/70) 100% (70/70) -nds Low Saxon 100% (59/59) 100% (59/59) 100% (59/59) -ne Nepali (Devanagari script) (0/68) (0/68) (0/68) -ng Ndonga 100% (52/52) 100% (52/52) 100% (52/52) -nl Dutch 100% (82/82) 100% (82/82) 100% (82/82) -nn Norwegian Nynorsk 100% (76/76) 100% (76/76) 100% (76/76) -no Norwegian (Bokmal) 100% (70/70) 100% (70/70) 100% (70/70) -nr Ndebele, South 100% (52/52) 100% (52/52) 100% (52/52) -nso Northern Sotho 100% (58/58) 100% (58/58) 100% (58/58) -nv Navajo/Navaho 100% (72/72) 100% (72/72) 100% (72/72) -ny Chichewa 100% (54/54) 100% (54/54) 100% (54/54) -oc Occitan 100% (70/70) 100% (70/70) 100% (70/70) -om Oromo or Galla 100% (52/52) 100% (52/52) 100% (52/52) -or Oriya (0/68) (0/68) (0/68) -os Ossetic 100% (66/66) 100% (66/66) 100% (66/66) -ota Ottoman Turkish 100% (37/37) (0/37) 97% (36/37) -pa Panjabi/Punjabi (0/63) (0/63) (0/63) -pa-pk Panjabi/Punjabi in Pakistan 98% (143/145) (0/145) 97% (141/145) -pap-an Papiamento in Netherlands Antilles 100% (72/72) 100% (72/72) 100% (72/72) -pap-aw Papiamento in Aruba 100% (54/54) 100% (54/54) 100% (54/54) -pl Polish 100% (70/70) 100% (70/70) 100% (70/70) -ps-af Pashto in Afghanistan 95% (47/49) (0/49) 77% (38/49) -ps-pk Pashto in Pakistan 93% (46/49) (0/49) 75% (37/49) -pt Portuguese 100% (82/82) 100% (82/82) 100% (82/82) -qu Quechua 100% (55/55) 100% (55/55) 100% (55/55) -rm Rhaeto-Romance (Romansch) 100% (66/66) 100% (66/66) 100% (66/66) -rn Rundi 100% (52/52) 100% (52/52) 100% (52/52) -ro Romanian 100% (62/62) 100% (62/62) 100% (62/62) -ru Russian 100% (66/66) 100% (66/66) 100% (66/66) -rw Kinyarwanda 100% (52/52) 100% (52/52) 100% (52/52) -sa Sanskrit (Devanagari script) (0/68) (0/68) (0/68) -sah Yakut 100% (76/76) 100% (76/76) 100% (76/76) -sc Sardinian 100% (62/62) 100% (62/62) 100% (62/62) -sco Scots 100% (56/56) 100% (56/56) 100% (56/56) -sd Sindhi 100% (54/54) (0/54) 79% (43/54) -se North Sami 100% (66/66) 100% (66/66) 100% (66/66) -sel Selkup (Ostyak-Samoyed) 100% (66/66) 100% (66/66) 100% (66/66) -sg Sango 100% (72/72) 100% (72/72) 100% (72/72) -sh Serbo-Croatian 100% (156/156) 100% (156/156) 98% (154/156) -shs Secwepemctsin 100% (48/48) 100% (48/48) 100% (48/48) -si Sinhala/Sinhalese (0/73) (0/73) (0/73) -sid Sidamo (0/281) (0/281) (0/281) -sk Slovak 100% (86/86) 100% (86/86) 100% (86/86) -sl Slovenian 100% (62/62) 100% (62/62) 100% (62/62) -sm Samoan 100% (53/53) 100% (53/53) 100% (53/53) -sma South Sami 100% (60/60) 100% (60/60) 100% (60/60) -smj Lule Sami 100% (60/60) 100% (60/60) 100% (60/60) -smn Inari Sami 100% (68/68) 100% (68/68) 100% (68/68) -sms Skolt Sami 100% (80/80) 100% (80/80) 97% (78/80) -sn Shona 100% (52/52) 100% (52/52) 100% (52/52) -so Somali 100% (52/52) 100% (52/52) 100% (52/52) -sq Albanian 100% (56/56) 100% (56/56) 100% (56/56) -sr Serbian 100% (60/60) 100% (60/60) 100% (60/60) -ss Swati 100% (52/52) 100% (52/52) 100% (52/52) -st Sotho, Southern 100% (52/52) 100% (52/52) 100% (52/52) -su Sundanese 100% (54/54) 100% (54/54) 100% (54/54) -sv Swedish 100% (68/68) 100% (68/68) 100% (68/68) -sw Swahili 100% (52/52) 100% (52/52) 100% (52/52) -syr Syriac (0/45) (0/45) (0/45) -ta Tamil (0/48) (0/48) (0/48) -te Telugu (0/70) (0/70) (0/70) -tg Tajik 100% (78/78) 100% (78/78) 97% (76/78) -th Thai 1% (1/74) (0/74) (0/74) -ti-er Eritrean Tigrinya (0/255) (0/255) (0/255) -ti-et Ethiopian Tigrinya (0/281) (0/281) (0/281) -tig Tigre (0/221) (0/221) (0/221) -tk Turkmen 100% (68/68) 100% (68/68) 100% (68/68) -tl Tagalog 100% (84/84) 100% (84/84) 100% (84/84) -tn Tswana 100% (58/58) 100% (58/58) 100% (58/58) -to Tonga 100% (53/53) 100% (53/53) 100% (53/53) -tr Turkish 100% (70/70) 100% (70/70) 100% (70/70) -ts Tsonga 100% (52/52) 100% (52/52) 100% (52/52) -tt Tatar 100% (76/76) 100% (76/76) 100% (76/76) -tw Twi 100% (73/73) 100% (73/73) 100% (73/73) -ty Tahitian 100% (65/65) 100% (65/65) 100% (65/65) -tyv Tuvinian 100% (70/70) 100% (70/70) 100% (70/70) -ug Uighur 100% (125/125) (0/125) 100% (125/125) -uk Ukrainian 100% (72/72) 100% (72/72) 100% (72/72) -ur Urdu 98% (143/145) (0/145) 97% (141/145) -uz Uzbek 100% (52/52) 100% (52/52) 100% (52/52) -ve Venda 100% (62/62) 100% (62/62) 100% (62/62) -vi Vietnamese 100% (194/194) 100% (194/194) 76% (148/194) -vo Volapuk 100% (54/54) 100% (54/54) 100% (54/54) -vot Votic 100% (62/62) 100% (62/62) 100% (62/62) -wa Walloon 100% (70/70) 100% (70/70) 100% (70/70) -wal Wolaitta/Wolaytta (0/281) (0/281) (0/281) -wen Sorbian languages (lower and upper) 100% (76/76) 100% (76/76) 100% (76/76) -wo Wolof 100% (66/66) 100% (66/66) 100% (66/66) -xh Xhosa 100% (52/52) 100% (52/52) 100% (52/52) -yap Yapese 100% (58/58) 100% (58/58) 100% (58/58) -yi Yiddish 100% (27/27) (0/27) (0/27) -yo Yoruba 100% (119/119) 100% (119/119) 100% (119/119) -za Zhuang/Chuang 100% (52/52) 100% (52/52) 100% (52/52) -zh-cn Chinese (simplified) 0% (2/6765) 0% (2/6765) 0% (2/6765) -zh-hk Chinese Hong Kong Supplementary Character Set (0/2213) (0/2213) (0/2213) -zh-mo Chinese in Macau (0/2213) (0/2213) (0/2213) -zh-sg Chinese in Singapore 0% (2/6765) 0% (2/6765) 0% (2/6765) -zh-tw Chinese (traditional) (0/13063) (0/13063) (0/13063) -zu Zulu 100% (52/52) 100% (52/52) 100% (52/52) diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/status.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/status.txt deleted file mode 100644 index e860ef48db6..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/status.txt +++ /dev/null @@ -1,6657 +0,0 @@ -This is the status file for DejaVu fonts -($Id: status.txt 2425 2010-08-22 16:07:31Z moyogo $) - -original = present in original Bitstream Vera 1.10 -<version> = added in DejaVu fonts <version> - -U+0020 space original -U+0021 exclam original -U+0022 quotedbl original -U+0023 numbersign original -U+0024 dollar original -U+0025 percent original -U+0026 ampersand original -U+0027 quotesingle original -U+0028 parenleft original -U+0029 parenright original -U+002a asterisk original -U+002b plus original -U+002c comma original -U+002d hyphen original -U+002e period original -U+002f slash original -U+0030 zero original -U+0031 one original -U+0032 two original -U+0033 three original -U+0034 four original -U+0035 five original -U+0036 six original -U+0037 seven original -U+0038 eight original -U+0039 nine original -U+003a colon original -U+003b semicolon original -U+003c less original -U+003d equal original -U+003e greater original -U+003f question original -U+0040 at original -U+0041 A original -U+0042 B original -U+0043 C original -U+0044 D original -U+0045 E original -U+0046 F original -U+0047 G original -U+0048 H original -U+0049 I original -U+004a J original -U+004b K original -U+004c L original -U+004d M original -U+004e N original -U+004f O original -U+0050 P original -U+0051 Q original -U+0052 R original -U+0053 S original -U+0054 T original -U+0055 U original -U+0056 V original -U+0057 W original -U+0058 X original -U+0059 Y original -U+005a Z original -U+005b bracketleft original -U+005c backslash original -U+005d bracketright original -U+005e asciicircum original -U+005f underscore original -U+0060 grave original -U+0061 a original -U+0062 b original -U+0063 c original -U+0064 d original -U+0065 e original -U+0066 f original -U+0067 g original -U+0068 h original -U+0069 i original -U+006a j original -U+006b k original -U+006c l original -U+006d m original -U+006e n original -U+006f o original -U+0070 p original -U+0071 q original -U+0072 r original -U+0073 s original -U+0074 t original -U+0075 u original -U+0076 v original -U+0077 w original -U+0078 x original -U+0079 y original -U+007a z original -U+007b braceleft original -U+007c bar original -U+007d braceright original -U+007e asciitilde original -U+00a0 nonbreakingspace original -U+00a1 exclamdown original -U+00a2 cent original -U+00a3 sterling original -U+00a4 currency original -U+00a5 yen original -U+00a6 brokenbar original -U+00a7 section original -U+00a8 dieresis original -U+00a9 copyright original -U+00aa ordfeminine original -U+00ab guillemotleft original -U+00ac logicalnot original -U+00ad sfthyphen original -U+00ae registered original -U+00af macron original -U+00b0 degree original -U+00b1 plusminus original -U+00b2 twosuperior original -U+00b3 threesuperior original -U+00b4 acute original -U+00b5 mu original -U+00b6 paragraph original -U+00b7 periodcentered original -U+00b8 cedilla original -U+00b9 onesuperior original -U+00ba ordmasculine original -U+00bb guillemotright original -U+00bc onequarter original -U+00bd onehalf original -U+00be threequarters original -U+00bf questiondown original -U+00c0 Agrave original -U+00c1 Aacute original -U+00c2 Acircumflex original -U+00c3 Atilde original -U+00c4 Adieresis original -U+00c5 Aring original -U+00c6 AE original -U+00c7 Ccedilla original -U+00c8 Egrave original -U+00c9 Eacute original -U+00ca Ecircumflex original -U+00cb Edieresis original -U+00cc Igrave original -U+00cd Iacute original -U+00ce Icircumflex original -U+00cf Idieresis original -U+00d0 Eth original -U+00d1 Ntilde original -U+00d2 Ograve original -U+00d3 Oacute original -U+00d4 Ocircumflex original -U+00d5 Otilde original -U+00d6 Odieresis original -U+00d7 multiply original -U+00d8 Oslash original -U+00d9 Ugrave original -U+00da Uacute original -U+00db Ucircumflex original -U+00dc Udieresis original -U+00dd Yacute original -U+00de Thorn original -U+00df germandbls original -U+00e0 agrave original -U+00e1 aacute original -U+00e2 acircumflex original -U+00e3 atilde original -U+00e4 adieresis original -U+00e5 aring original -U+00e6 ae original -U+00e7 ccedilla original -U+00e8 egrave original -U+00e9 eacute original -U+00ea ecircumflex original -U+00eb edieresis original -U+00ec igrave original -U+00ed iacute original -U+00ee icircumflex original -U+00ef idieresis original -U+00f0 eth original -U+00f1 ntilde original -U+00f2 ograve original -U+00f3 oacute original -U+00f4 ocircumflex original -U+00f5 otilde original -U+00f6 odieresis original -U+00f7 divide original -U+00f8 oslash original -U+00f9 ugrave original -U+00fa uacute original -U+00fb ucircumflex original -U+00fc udieresis original -U+00fd yacute original -U+00fe thorn original -U+00ff ydieresis original -U+0100 Amacron 1.5 -U+0101 amacron 1.5 -U+0102 Abreve 1.5 -U+0103 abreve 1.5 -U+0104 Aogonek 1.4 -U+0105 aogonek 1.4 -U+0106 Cacute original -U+0107 cacute original -U+0108 Ccircumflex 1.5 -U+0109 ccircumflex 1.5 -U+010a Cdotaccent 1.5 -U+010b cdotaccent 1.5 -U+010c Ccaron original -U+010d ccaron original -U+010e Dcaron 1.0 -U+010f dcaron 1.0 -U+0110 Dcroat 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0111 dcroat original -U+0112 Emacron 1.5 -U+0113 emacron 1.5 -U+0114 Ebreve 1.5 -U+0115 ebreve 1.5 -U+0116 Edotaccent 1.5 -U+0117 edotaccent 1.5 -U+0118 Eogonek 1.4 -U+0119 eogonek 1.4 -U+011a Ecaron 1.0 -U+011b ecaron 1.0 -U+011c Gcircumflex 1.5 -U+011d gcircumflex 1.5 -U+011e Gbreve original -U+011f gbreve original -U+0120 Gdotaccent 1.5 -U+0121 gdotaccent 1.5 -U+0122 Gcommaaccent 1.11 -U+0123 gcommaaccent 1.11 -U+0124 Hcircumflex 1.5 -U+0125 hcircumflex 1.5 -U+0126 Hbar 1.12 -U+0127 hbar 1.12 -U+0128 Itilde 1.5 -U+0129 itilde 1.5 -U+012a Imacron 1.5 -U+012b imacron 1.5 -U+012c Ibreve 1.5 -U+012d ibreve 1.5 -U+012e Iogonek 1.11 -U+012f iogonek 1.11 -U+0130 Idotaccent original -U+0131 dotlessi original -U+0132 IJ 1.11 -U+0133 ij 1.11 -U+0134 Jcircumflex 1.5 -U+0135 jcircumflex 1.5 -U+0136 Kcommaaccent 1.11 -U+0137 kcommaaccent 1.11 -U+0138 kgreenlandic 1.12 -U+0139 Lacute 1.1 -U+013a lacute 1.1 -U+013b Lcommaaccent 1.11 -U+013c lcommaaccent 1.11 -U+013d Lcaron 1.1 -U+013e lcaron 1.1 -U+013f Ldot 1.2 -U+0140 ldot 1.2 -U+0141 Lslash original -U+0142 lslash original -U+0143 Nacute 1.4 -U+0144 nacute 1.4 -U+0145 Ncommaaccent 1.11 -U+0146 ncommaaccent 1.11 -U+0147 Ncaron 1.0 -U+0148 ncaron 1.0 -U+0149 napostrophe 1.12 -U+014a Eng 1.12 -U+014b eng 1.12 -U+014c Omacron 1.5 -U+014d omacron 1.5 -U+014e Obreve 1.5 -U+014f obreve 1.5 -U+0150 Ohungarumlaut 1.5 -U+0151 ohungarumlaut 1.5 -U+0152 OE original -U+0153 oe original -U+0154 Racute 1.1 -U+0155 racute 1.1 -U+0156 Rcommaaccent 1.11 -U+0157 rcommaaccent 1.11 -U+0158 Rcaron 1.0 -U+0159 rcaron 1.0 -U+015a Sacute 1.4 -U+015b sacute 1.4 -U+015c Scircumflex 1.5 -U+015d scircumflex 1.5 -U+015e Scedilla original -U+015f scedilla original -U+0160 Scaron original -U+0161 scaron original -U+0162 Tcommaaccent 1.5 -U+0163 tcommaaccent 1.5 -U+0164 Tcaron 1.0 -U+0165 tcaron 1.0 -U+0166 Tbar 1.12 -U+0167 tbar 1.12 -U+0168 Utilde 1.5 -U+0169 utilde 1.5 -U+016a Umacron 1.5 -U+016b umacron 1.5 -U+016c Ubreve 1.5 -U+016d ubreve 1.5 -U+016e Uring 1.0 -U+016f uring 1.0 -U+0170 Uhungarumlaut 1.5 -U+0171 uhungarumlaut 1.5 -U+0172 Uogonek 1.11 -U+0173 uogonek 1.11 -U+0174 Wcircumflex 1.2 -U+0175 wcircumflex 1.2 -U+0176 Ycircumflex 1.2 -U+0177 ycircumflex 1.2 -U+0178 Ydieresis original -U+0179 Zacute 1.4 -U+017a zacute 1.4 -U+017b Zdotaccent 1.4 -U+017c zdotaccent 1.4 -U+017d Zcaron original -U+017e zcaron original -U+017f longs 1.12 -U+0180 uni0180 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0181 uni0181 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0182 uni0182 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0183 uni0183 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0184 uni0184 2.3 -U+0185 uni0185 2.3 -U+0186 uni0186 1.15 -U+0187 uni0187 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0188 uni0188 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0189 uni0189 2.1 -U+018a uni018A 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018b uni018B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018c uni018C 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018d uni018D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018e uni018E 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018f uni018F 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0190 uni0190 1.15 -U+0191 uni0191 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0192 florin original -U+0193 uni0193 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0194 uni0194 1.14 -U+0195 uni0195 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.6 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0196 uni0196 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0197 uni0197 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0198 uni0198 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0199 uni0199 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019a uni019A 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019b uni019B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+019c uni019C 2.3 -U+019d uni019D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019e uni019E 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019f uni019F 2.3 -U+01a0 Ohorn 2.3 -U+01a1 ohorn 2.3 -U+01a2 uni01A2 2.3 -U+01a3 uni01A3 2.3 -U+01a4 uni01A4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a5 uni01A5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a6 uni01A6 2.3 -U+01a7 uni01A7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a8 uni01A8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a9 uni01A9 2.2 -U+01aa uni01AA 2.3 -U+01ab uni01AB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ac uni01AC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ad uni01AD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ae uni01AE 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01af Uhorn 2.3 -U+01b0 uhorn 2.3 -U+01b1 uni01B1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b2 uni01B2 2.3 -U+01b3 uni01B3 2.3 -U+01b4 uni01B4 2.3 -U+01b5 uni01B5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b6 uni01B6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b7 uni01B7 2.3 -U+01b8 uni01B8 2.3 -U+01b9 uni01B9 2.3 -U+01ba uni01BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01bb uni01BB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01bc uni01BC 2.3 -U+01bd uni01BD 2.3 -U+01be uni01BE 2.3 -U+01bf uni01BF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01c0 uni01C0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c1 uni01C1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c2 uni01C2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c3 uni01C3 2.2 -U+01c4 uni01C4 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c5 uni01C5 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c6 uni01C6 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c7 uni01C7 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c8 uni01C8 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c9 uni01C9 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01ca uni01CA 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cb uni01CB 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cc uni01CC 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cd uni01CD 1.15 -U+01ce uni01CE 1.15 -U+01cf uni01CF 1.15 -U+01d0 uni01D0 1.15 -U+01d1 uni01D1 1.15 -U+01d2 uni01D2 1.15 -U+01d3 uni01D3 1.15 -U+01d4 uni01D4 1.15 -U+01d5 uni01D5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01d6 uni01D6 1.13 -U+01d7 uni01D7 2.3 -U+01d8 uni01D8 2.3 -U+01d9 uni01D9 2.3 -U+01da uni01DA 2.3 -U+01db uni01DB 2.3 -U+01dc uni01DC 2.3 -U+01dd uni01DD 2.2 -U+01de uni01DE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique) 2.23 (Serif Italic Condensed) -U+01df uni01DF 1.13 -U+01e0 uni01E0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e1 uni01E1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e2 uni01E2 1.5 -U+01e3 uni01E3 1.5 -U+01e4 uni01E4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+01e5 uni01E5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+01e6 Gcaron 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e7 gcaron 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e8 uni01E8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e9 uni01E9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ea uni01EA 1.9 -U+01eb uni01EB 1.9 -U+01ec uni01EC 1.9 -U+01ed uni01ED 1.9 -U+01ee uni01EE 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ef uni01EF 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f0 uni01F0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono) 2.22 (Sans Mono Bold) 2.23 (Serif Italic Condensed) -U+01f1 uni01F1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f2 uni01F2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f3 uni01F3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f4 uni01F4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f5 uni01F5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f6 uni01F6 2.3 -U+01f7 uni01F7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01f8 uni01F8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f9 uni01F9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fa Aringacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01fb aringacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01fc AEacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fd aeacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fe Oslashacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ff oslashacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0200 uni0200 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0201 uni0201 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0202 uni0202 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0203 uni0203 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0204 uni0204 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0205 uni0205 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0206 uni0206 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0207 uni0207 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0208 uni0208 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0209 uni0209 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020a uni020A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020b uni020B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020c uni020C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020d uni020D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020e uni020E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020f uni020F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0210 uni0210 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0211 uni0211 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0212 uni0212 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0213 uni0213 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0214 uni0214 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0215 uni0215 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0216 uni0216 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0217 uni0217 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0218 Scommaaccent 1.5 -U+0219 scommaaccent 1.5 -U+021a uni021A 1.5 -U+021b uni021B 1.5 -U+021c uni021C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+021d uni021D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+021e uni021E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+021f uni021F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0220 uni0220 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.18 (Sans Mono, Sans Mono Bold) 2.23 (Serif Italic Condensed) -U+0221 uni0221 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0222 uni0222 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0223 uni0223 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0224 uni0224 2.3 -U+0225 uni0225 2.3 -U+0226 uni0226 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0227 uni0227 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0228 uni0228 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0229 uni0229 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022a uni022A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022b uni022B 1.13 -U+022c uni022C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022d uni022D 1.13 -U+022e uni022E 1.10 -U+022f uni022F 1.10 -U+0230 uni0230 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0231 uni0231 1.13 -U+0232 uni0232 1.5 -U+0233 uni0233 1.5 -U+0234 uni0234 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0235 uni0235 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0236 uni0236 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0237 dotlessj 1.5 -U+0238 uni0238 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0239 uni0239 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+023a uni023A 2.3 -U+023b uni023B 2.3 -U+023c uni023C 2.3 -U+023d uni023D 2.3 -U+023e uni023E 2.3 -U+023f uni023F 2.3 -U+0240 uni0240 2.3 -U+0241 uni0241 2.3 -U+0242 uni0242 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+0243 uni0243 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0244 uni0244 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0245 uni0245 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0246 uni0246 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0247 uni0247 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0248 uni0248 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0249 uni0249 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024a uni024A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024b uni024B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024c uni024C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024d uni024D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024e uni024E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024f uni024F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0250 uni0250 1.14 -U+0251 uni0251 1.14 -U+0252 uni0252 1.14 -U+0253 uni0253 1.14 -U+0254 uni0254 1.14 -U+0255 uni0255 1.14 -U+0256 uni0256 1.14 -U+0257 uni0257 1.14 -U+0258 uni0258 1.14 -U+0259 uni0259 1.14 -U+025a uni025A 1.14 -U+025b uni025B 1.14 -U+025c uni025C 1.14 -U+025d uni025D 1.14 -U+025e uni025E 1.14 -U+025f uni025F 1.14 -U+0260 uni0260 1.14 -U+0261 uni0261 1.14 -U+0262 uni0262 1.14 -U+0263 uni0263 1.14 -U+0264 uni0264 1.14 -U+0265 uni0265 1.14 -U+0266 uni0266 1.14 -U+0267 uni0267 1.14 -U+0268 uni0268 1.14 -U+0269 uni0269 1.14 -U+026a uni026A 1.14 -U+026b uni026B 1.14 -U+026c uni026C 1.14 -U+026d uni026D 1.14 -U+026e uni026E 1.14 -U+026f uni026F 1.14 -U+0270 uni0270 1.14 -U+0271 uni0271 1.14 -U+0272 uni0272 1.14 -U+0273 uni0273 1.14 -U+0274 uni0274 1.14 -U+0275 uni0275 1.14 -U+0276 uni0276 1.14 -U+0277 uni0277 1.14 -U+0278 uni0278 1.14 -U+0279 uni0279 1.14 -U+027a uni027A 1.14 -U+027b uni027B 1.14 -U+027c uni027C 1.14 -U+027d uni027D 1.14 -U+027e uni027E 1.14 -U+027f uni027F 1.14 -U+0280 uni0280 1.14 -U+0281 uni0281 1.14 -U+0282 uni0282 1.14 -U+0283 uni0283 1.14 -U+0284 uni0284 1.14 -U+0285 uni0285 1.14 -U+0286 uni0286 1.14 -U+0287 uni0287 1.14 -U+0288 uni0288 1.14 -U+0289 uni0289 1.14 -U+028a uni028A 1.14 -U+028b uni028B 1.14 -U+028c uni028C 1.14 -U+028d uni028D 1.14 -U+028e uni028E 1.14 -U+028f uni028F 1.14 -U+0290 uni0290 1.14 -U+0291 uni0291 1.14 -U+0292 uni0292 1.14 -U+0293 uni0293 1.14 -U+0294 uni0294 1.14 -U+0295 uni0295 1.14 -U+0296 uni0296 1.14 -U+0297 uni0297 1.14 -U+0298 uni0298 1.14 -U+0299 uni0299 1.14 -U+029a uni029A 1.14 -U+029b uni029B 1.14 -U+029c uni029C 1.14 -U+029d uni029D 1.14 -U+029e uni029E 1.14 -U+029f uni029F 1.14 -U+02a0 uni02A0 1.14 -U+02a1 uni02A1 1.14 -U+02a2 uni02A2 1.14 -U+02a3 uni02A3 1.14 -U+02a4 uni02A4 1.14 -U+02a5 uni02A5 1.14 -U+02a6 uni02A6 1.14 -U+02a7 uni02A7 1.14 -U+02a8 uni02A8 1.14 -U+02a9 uni02A9 1.14 -U+02aa uni02AA 1.14 -U+02ab uni02AB 1.14 -U+02ac uni02AC 1.14 -U+02ad uni02AD 1.14 -U+02ae uni02AE 1.14 -U+02af uni02AF 1.14 -U+02b0 uni02B0 1.14 -U+02b1 uni02B1 1.14 -U+02b2 uni02B2 1.14 -U+02b3 uni02B3 1.14 -U+02b4 uni02B4 1.14 -U+02b5 uni02B5 1.14 -U+02b6 uni02B6 1.14 -U+02b7 uni02B7 1.14 -U+02b8 uni02B8 1.14 -U+02b9 uni02B9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+02ba uni02BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02bb uni02BB 1.5 -U+02bc uni02BC 1.12 -U+02bd uni02BD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+02be uni02BE 2.2 -U+02bf uni02BF 2.2 -U+02c0 uni02C0 1.14 -U+02c1 uni02C1 1.14 -U+02c2 uni02C2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02c3 uni02C3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02c4 uni02C4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02c5 uni02C5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02c6 circumflex original -U+02c7 caron original -U+02c8 uni02C8 2.0 -U+02c9 uni02C9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+02ca uni02CA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+02cb uni02CB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+02cc uni02CC 2.0 -U+02cd uni02CD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02ce uni02CE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+02cf uni02CF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+02d0 uni02D0 1.14 -U+02d1 uni02D1 1.14 -U+02d2 uni02D2 2.0 -U+02d3 uni02D3 2.2 -U+02d4 uni02D4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02d5 uni02D5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02d6 uni02D6 2.0 -U+02d7 uni02D7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02d8 breve original -U+02d9 dotaccent original -U+02da ring original -U+02db ogonek original -U+02dc tilde original -U+02dd hungarumlaut original -U+02de uni02DE 2.0 -U+02df uni02DF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02e0 uni02E0 1.14 -U+02e1 uni02E1 1.14 -U+02e2 uni02E2 1.14 -U+02e3 uni02E3 1.14 -U+02e4 uni02E4 1.14 -U+02e5 uni02E5 2.0 -U+02e6 uni02E6 2.0 -U+02e7 uni02E7 2.0 -U+02e8 uni02E8 2.0 -U+02e9 uni02E9 2.0 -U+02ec uni02EC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02ed uni02ED 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02ee uni02EE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02f3 uni02F3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02f7 uni02F7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+0300 gravecomb 1.15 -U+0301 acutecomb 1.15 -U+0302 uni0302 1.15 -U+0303 tildecomb 1.15 -U+0304 uni0304 1.15 -U+0305 uni0305 2.0 -U+0306 uni0306 1.15 -U+0307 uni0307 1.15 -U+0308 uni0308 1.15 -U+0309 hookabovecomb 2.1 -U+030a uni030A 1.15 -U+030b uni030B 1.15 -U+030c uni030C 1.15 -U+030d uni030D 2.0 -U+030e uni030E 2.0 -U+030f uni030F 2.0 -U+0310 uni0310 2.0 -U+0311 uni0311 2.0 -U+0312 uni0312 1.11 -U+0313 uni0313 2.1 -U+0314 uni0314 2.1 -U+0315 uni0315 2.0 -U+0316 uni0316 2.0 -U+0317 uni0317 2.0 -U+0318 uni0318 2.0 -U+0319 uni0319 2.0 -U+031a uni031A 2.1 -U+031b uni031B 2.1 -U+031c uni031C 2.0 -U+031d uni031D 2.0 -U+031e uni031E 2.0 -U+031f uni031F 2.0 -U+0320 uni0320 2.0 -U+0321 uni0321 1.15 -U+0322 uni0322 1.15 -U+0323 dotbelowcomb 2.1 -U+0324 uni0324 2.0 -U+0325 uni0325 2.0 -U+0326 uni0326 1.5 -U+0327 uni0327 2.1 -U+0328 uni0328 2.1 -U+0329 uni0329 2.0 -U+032a uni032A 2.0 -U+032b uni032B 2.1 -U+032c uni032C 2.0 -U+032d uni032D 2.0 -U+032e uni032E 2.0 -U+032f uni032F 2.0 -U+0330 uni0330 2.0 -U+0331 uni0331 2.0 -U+0332 uni0332 2.0 -U+0333 uni0333 2.1 -U+0334 uni0334 2.3 -U+0335 uni0335 2.3 -U+0336 uni0336 2.3 -U+0337 uni0337 2.3 -U+0338 uni0338 2.3 -U+0339 uni0339 2.0 -U+033a uni033A 2.0 -U+033b uni033B 2.0 -U+033c uni033C 2.1 -U+033d uni033D 2.0 -U+033e uni033E 2.1 -U+033f uni033F 2.1 -U+0340 uni0340 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0341 uni0341 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0342 uni0342 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0343 uni0343 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0344 uni0344 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0345 uni0345 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0346 uni0346 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0347 uni0347 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0348 uni0348 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0349 uni0349 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034a uni034A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034b uni034B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034c uni034C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034d uni034D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034e uni034E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034f uni034F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0351 uni0351 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0352 uni0352 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) 2.28 (Sans Condensed Oblique, Sans Oblique) -U+0353 uni0353 2.5 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0357 uni0357 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0358 uni0358 2.3 -U+035a uni035A 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+035c uni035C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+035d uni035D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+035e uni035E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+035f uni035F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0360 uni0360 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0361 uni0361 2.0 -U+0362 uni0362 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0370 uni0370 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0371 uni0371 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0372 uni0372 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0373 uni0373 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0374 uni0374 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0375 uni0375 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0376 uni0376 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0377 uni0377 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+037a uni037A 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+037b uni037B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037c uni037C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037d uni037D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037e uni037E 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0384 tonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0385 dieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0386 Alphatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0387 anoteleia 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0388 Epsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0389 Etatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038a Iotatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038c Omicrontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038e Upsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038f Omegatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0390 iotadieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0391 Alpha 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0392 Beta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0393 Gamma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0394 uni0394 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0395 Epsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0396 Zeta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0397 Eta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0398 Theta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0399 Iota 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039a Kappa 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039b Lambda 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039c Mu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039d Nu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039e Xi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039f Omicron 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a0 Pi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a1 Rho 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a3 Sigma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a4 Tau 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a5 Upsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a6 Phi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a7 Chi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a8 Psi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a9 Omega original -U+03aa Iotadieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ab Upsilondieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ac alphatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ad epsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ae etatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03af iotatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b0 upsilondieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b1 alpha 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b2 beta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b3 gamma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b4 delta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b5 epsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b6 zeta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b7 eta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b8 theta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b9 iota 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ba kappa 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bb lambda 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bc uni03BC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bd nu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03be xi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bf omicron 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c0 pi original -U+03c1 rho 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c2 sigma1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c3 sigma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c4 tau 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c5 upsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c6 phi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c7 chi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c8 psi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c9 omega 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ca iotadieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cb upsilondieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cc omicrontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cd upsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ce omegatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cf uni03CF 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+03d0 uni03D0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d1 theta1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d2 Upsilon1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d3 uni03D3 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d4 uni03D4 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d5 phi1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.18 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03d6 omega1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03d7 uni03D7 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d8 uni03D8 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03d9 uni03D9 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03da uni03DA 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03db uni03DB 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03dc uni03DC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03dd uni03DD 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03de uni03DE 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03df uni03DF 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e0 uni03E0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e1 uni03E1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e2 uni03E2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e3 uni03E3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e4 uni03E4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e5 uni03E5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e6 uni03E6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e7 uni03E7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e8 uni03E8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e9 uni03E9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ea uni03EA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03eb uni03EB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ec uni03EC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ed uni03ED 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ee uni03EE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ef uni03EF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03f0 uni03F0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03f1 uni03F1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03f2 uni03F2 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f3 uni03F3 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f4 uni03F4 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f5 uni03F5 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f6 uni03F6 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f7 uni03F7 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f8 uni03F8 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f9 uni03F9 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03fa uni03FA 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03fb uni03FB 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03fc uni03FC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03fd uni03FD 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03fe uni03FE 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ff uni03FF 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0400 uni0400 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0401 uni0401 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0402 uni0402 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0403 uni0403 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0404 uni0404 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0405 uni0405 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0406 uni0406 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0407 uni0407 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0408 uni0408 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0409 uni0409 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040a uni040A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040b uni040B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040c uni040C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040d uni040D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040e uni040E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040f uni040F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0410 uni0410 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0411 uni0411 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0412 uni0412 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0413 uni0413 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0414 uni0414 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0415 uni0415 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0416 uni0416 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0417 uni0417 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0418 uni0418 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0419 uni0419 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041a uni041A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041b uni041B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041c uni041C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041d uni041D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041e uni041E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041f uni041F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0420 uni0420 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0421 uni0421 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0422 uni0422 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0423 uni0423 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0424 uni0424 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0425 uni0425 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0426 uni0426 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0427 uni0427 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0428 uni0428 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0429 uni0429 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042a uni042A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042b uni042B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042c uni042C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042d uni042D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042e uni042E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042f uni042F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0430 uni0430 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0431 uni0431 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0432 uni0432 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0433 uni0433 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0434 uni0434 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0435 uni0435 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0436 uni0436 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0437 uni0437 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0438 uni0438 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0439 uni0439 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043a uni043A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043b uni043B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043c uni043C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043d uni043D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043e uni043E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043f uni043F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0440 uni0440 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0441 uni0441 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0442 uni0442 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0443 uni0443 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0444 uni0444 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0445 uni0445 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0446 uni0446 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0447 uni0447 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0448 uni0448 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0449 uni0449 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044a uni044A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044b uni044B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044c uni044C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044d uni044D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044e uni044E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044f uni044F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0450 uni0450 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0451 uni0451 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0452 uni0452 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0453 uni0453 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0454 uni0454 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0455 uni0455 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0456 uni0456 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0457 uni0457 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0458 uni0458 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0459 uni0459 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045a uni045A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045b uni045B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045c uni045C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045d uni045D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045e uni045E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045f uni045F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0460 uni0460 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0461 uni0461 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+0462 uni0462 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0463 uni0463 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0464 uni0464 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0465 uni0465 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0466 uni0466 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0467 uni0467 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0468 uni0468 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0469 uni0469 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046a uni046A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.21 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+046b uni046B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.21 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+046c uni046C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046d uni046D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046e uni046E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046f uni046F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0470 uni0470 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0471 uni0471 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0472 uni0472 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0473 uni0473 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0474 uni0474 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0475 uni0475 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0476 uni0476 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0477 uni0477 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0478 uni0478 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0479 uni0479 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047a uni047A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047b uni047B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047c uni047C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047d uni047D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047e uni047E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047f uni047F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0480 uni0480 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0481 uni0481 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0482 uni0482 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0483 uni0483 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0484 uni0484 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0485 uni0485 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0486 uni0486 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0487 uni0487 2.9 (Sans, Sans Condensed) 2.27 (Sans Bold, Sans Bold Oblique, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0488 uni0488 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0489 uni0489 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048a uni048A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048b uni048B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048c uni048C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+048d uni048D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+048e uni048E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048f uni048F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0490 uni0490 1.15 -U+0491 uni0491 1.15 -U+0492 uni0492 1.14 -U+0493 uni0493 1.14 -U+0494 uni0494 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0495 uni0495 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0496 uni0496 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0497 uni0497 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0498 uni0498 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0499 uni0499 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+049a uni049A 1.14 -U+049b uni049B 1.14 -U+049c uni049C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+049d uni049D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+049e uni049E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+049f uni049F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a0 uni04A0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04a1 uni04A1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04a2 uni04A2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a3 uni04A3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a4 uni04A4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+04a5 uni04A5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+04a6 uni04A6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a7 uni04A7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a8 uni04A8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04a9 uni04A9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04aa uni04AA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ab uni04AB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ac uni04AC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ad uni04AD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ae uni04AE 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04af uni04AF 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b0 uni04B0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+04b1 uni04B1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+04b2 uni04B2 1.14 -U+04b3 uni04B3 1.14 -U+04b4 uni04B4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04b5 uni04B5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04b6 uni04B6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b7 uni04B7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b8 uni04B8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04b9 uni04B9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ba uni04BA 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04bb uni04BB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04bc uni04BC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04bd uni04BD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04be uni04BE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04bf uni04BF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c0 uni04C0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04c1 uni04C1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04c2 uni04C2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04c3 uni04C3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04c4 uni04C4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04c5 uni04C5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c6 uni04C6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c7 uni04C7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04c8 uni04C8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04c9 uni04C9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ca uni04CA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04cb uni04CB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04cc uni04CC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04cd uni04CD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ce uni04CE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04cf uni04CF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04d0 uni04D0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d1 uni04D1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d2 uni04D2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d3 uni04D3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d4 uni04D4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d5 uni04D5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d6 uni04D6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d7 uni04D7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d8 uni04D8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04d9 uni04D9 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04da uni04DA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04db uni04DB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04dc uni04DC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04dd uni04DD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04de uni04DE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04df uni04DF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e0 uni04E0 2.3 -U+04e1 uni04E1 2.3 -U+04e2 uni04E2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e3 uni04E3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e4 uni04E4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e5 uni04E5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e6 uni04E6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04e7 uni04E7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04e8 uni04E8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04e9 uni04E9 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04ea uni04EA 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04eb uni04EB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04ec uni04EC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ed uni04ED 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ee uni04EE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ef uni04EF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f0 uni04F0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f1 uni04F1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f2 uni04F2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f3 uni04F3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f4 uni04F4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f5 uni04F5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f6 uni04F6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f7 uni04F7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f8 uni04F8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f9 uni04F9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04fa uni04FA 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fb uni04FB 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fc uni04FC 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fd uni04FD 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fe uni04FE 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+04ff uni04FF 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0500 uni0500 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0501 uni0501 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0502 uni0502 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0503 uni0503 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0504 uni0504 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0505 uni0505 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0506 uni0506 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0507 uni0507 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0508 uni0508 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0509 uni0509 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050a uni050A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050b uni050B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050c uni050C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050d uni050D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050e uni050E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050f uni050F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0510 uni0510 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0511 uni0511 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0512 uni0512 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0513 uni0513 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0514 uni0514 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0515 uni0515 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0516 uni0516 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0517 uni0517 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0518 uni0518 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0519 uni0519 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+051a uni051A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051b uni051B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051c uni051C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051d uni051D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051e uni051E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+051f uni051F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0520 uni0520 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0521 uni0521 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0522 uni0522 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0523 uni0523 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0524 uni0524 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0525 uni0525 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0531 uni0531 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0532 uni0532 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0533 uni0533 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0534 uni0534 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0535 uni0535 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0536 uni0536 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0537 uni0537 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0538 uni0538 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0539 uni0539 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053a uni053A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053b uni053B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053c uni053C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053d uni053D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053e uni053E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053f uni053F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0540 uni0540 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0541 uni0541 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0542 uni0542 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0543 uni0543 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0544 uni0544 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0545 uni0545 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0546 uni0546 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0547 uni0547 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0548 uni0548 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0549 uni0549 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054a uni054A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054b uni054B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054c uni054C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054d uni054D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054e uni054E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054f uni054F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0550 uni0550 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0551 uni0551 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0552 uni0552 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0553 uni0553 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0554 uni0554 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0555 uni0555 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0556 uni0556 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0559 uni0559 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055a uni055A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055b uni055B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055c uni055C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055d uni055D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055e uni055E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055f uni055F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0561 uni0561 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0562 uni0562 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0563 uni0563 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0564 uni0564 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0565 uni0565 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0566 uni0566 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0567 uni0567 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0568 uni0568 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0569 uni0569 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056a uni056A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056b uni056B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056c uni056C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056d uni056D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056e uni056E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056f uni056F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0570 uni0570 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0571 uni0571 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0572 uni0572 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0573 uni0573 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0574 uni0574 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0575 uni0575 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0576 uni0576 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0577 uni0577 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0578 uni0578 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0579 uni0579 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057a uni057A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057b uni057B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057c uni057C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057d uni057D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057e uni057E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057f uni057F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0580 uni0580 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0581 uni0581 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0582 uni0582 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0583 uni0583 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0584 uni0584 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0585 uni0585 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0586 uni0586 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0587 uni0587 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0589 uni0589 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+058a uni058A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+05b0 uni05B0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b1 uni05B1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b2 uni05B2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b3 uni05B3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b4 uni05B4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b5 uni05B5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b6 uni05B6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b7 uni05B7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b8 uni05B8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b9 uni05B9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05ba uni05BA 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+05bb uni05BB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05bc uni05BC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05bd uni05BD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05be uni05BE 2.9 (Sans Condensed Oblique, Sans Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) -U+05bf uni05BF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c0 uni05C0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c1 uni05C1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c2 uni05C2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c3 uni05C3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c6 uni05C6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c7 uni05C7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d0 uni05D0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d1 uni05D1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d2 uni05D2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d3 uni05D3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d4 uni05D4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d5 uni05D5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d6 uni05D6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d7 uni05D7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d8 uni05D8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d9 uni05D9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05da uni05DA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05db uni05DB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05dc uni05DC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05dd uni05DD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05de uni05DE 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05df uni05DF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e0 uni05E0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e1 uni05E1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e2 uni05E2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e3 uni05E3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e4 uni05E4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e5 uni05E5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e6 uni05E6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e7 uni05E7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e8 uni05E8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e9 uni05E9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05ea uni05EA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f0 uni05F0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f1 uni05F1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f2 uni05F2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f3 uni05F3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+05f4 uni05F4 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0606 uni0606 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+0607 uni0607 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+0609 uni0609 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+060a uni060A 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+060c uni060C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0615 uni0615 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+061b uni061B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+061f uni061F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0621 uni0621 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0622 uni0622 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0623 uni0623 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0624 uni0624 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0625 uni0625 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0626 uni0626 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0627 uni0627 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0628 uni0628 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0629 uni0629 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062a uni062A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062b uni062B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062c uni062C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062d uni062D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062e uni062E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062f uni062F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0630 uni0630 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0631 uni0631 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0632 uni0632 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0633 uni0633 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0634 uni0634 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0635 uni0635 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0636 uni0636 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0637 uni0637 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0638 uni0638 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0639 uni0639 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+063a uni063A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0640 uni0640 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0641 uni0641 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0642 uni0642 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0643 uni0643 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0644 uni0644 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0645 uni0645 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0646 uni0646 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0647 uni0647 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0648 uni0648 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0649 uni0649 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064a uni064A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064b uni064B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064c uni064C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064d uni064D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064e uni064E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064f uni064F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0650 uni0650 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0651 uni0651 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0652 uni0652 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0653 uni0653 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0654 uni0654 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0655 uni0655 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0657 uni0657 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+065a uni065A 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0660 uni0660 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0661 uni0661 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0662 uni0662 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0663 uni0663 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0664 uni0664 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0665 uni0665 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0666 uni0666 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0667 uni0667 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0668 uni0668 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0669 uni0669 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066a uni066A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066b uni066B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066c uni066C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066d uni066D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066e uni066E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066f uni066F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0670 uni0670 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0674 uni0674 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans ExtraLight) 2.16 (Sans Mono, Sans Mono Bold) -U+0679 uni0679 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067a uni067A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067b uni067B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067c uni067C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067d uni067D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067e uni067E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067f uni067F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0680 uni0680 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0681 uni0681 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0682 uni0682 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0683 uni0683 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0684 uni0684 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0685 uni0685 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0686 uni0686 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0687 uni0687 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0688 uni0688 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0689 uni0689 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068a uni068A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068b uni068B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068c uni068C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068d uni068D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068e uni068E 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068f uni068F 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0690 uni0690 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0691 uni0691 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0692 uni0692 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0693 uni0693 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0694 uni0694 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0695 uni0695 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0696 uni0696 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0697 uni0697 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0698 uni0698 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0699 uni0699 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069a uni069A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069b uni069B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069c uni069C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069d uni069D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069e uni069E 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069f uni069F 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a0 uni06A0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a1 uni06A1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06a2 uni06A2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a3 uni06A3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a4 uni06A4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06a5 uni06A5 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a6 uni06A6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a7 uni06A7 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a8 uni06A8 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a9 uni06A9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06aa uni06AA 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ab uni06AB 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ac uni06AC 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ad uni06AD 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ae uni06AE 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06af uni06AF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06b0 uni06B0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b1 uni06B1 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b2 uni06B2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b3 uni06B3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b4 uni06B4 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b5 uni06B5 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06b6 uni06B6 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b7 uni06B7 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b8 uni06B8 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b9 uni06B9 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ba uni06BA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06bb uni06BB 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bc uni06BC 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bd uni06BD 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06be uni06BE 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bf uni06BF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06c6 uni06C6 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06cc uni06CC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06ce uni06CE 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06d5 uni06D5 2.10 (Sans, Sans Bold) 2.11 (Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f0 uni06F0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f1 uni06F1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f2 uni06F2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f3 uni06F3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f4 uni06F4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f5 uni06F5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f6 uni06F6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f7 uni06F7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f8 uni06F8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f9 uni06F9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+07c0 uni07C0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c1 uni07C1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c2 uni07C2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c3 uni07C3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c4 uni07C4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c5 uni07C5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c6 uni07C6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c7 uni07C7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c8 uni07C8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c9 uni07C9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ca uni07CA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cb uni07CB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cc uni07CC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cd uni07CD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ce uni07CE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cf uni07CF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d0 uni07D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d1 uni07D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d2 uni07D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d3 uni07D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d4 uni07D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d5 uni07D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d6 uni07D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d7 uni07D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d8 uni07D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d9 uni07D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07da uni07DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07db uni07DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07dc uni07DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07dd uni07DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07de uni07DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07df uni07DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e0 uni07E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e1 uni07E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e2 uni07E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e3 uni07E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e4 uni07E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e5 uni07E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e6 uni07E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e7 uni07E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07eb uni07EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ec uni07EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ed uni07ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ee uni07EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ef uni07EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f0 uni07F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f1 uni07F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f2 uni07F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f3 uni07F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f4 uni07F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f5 uni07F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f8 uni07F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f9 uni07F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07fa uni07FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0e3f uni0E3F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0e81 uni0E81 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e82 uni0E82 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e84 uni0E84 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e87 uni0E87 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e88 uni0E88 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e8a uni0E8A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e8d uni0E8D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e94 uni0E94 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e95 uni0E95 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e96 uni0E96 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e97 uni0E97 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e99 uni0E99 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9a uni0E9A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9b uni0E9B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9c uni0E9C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9d uni0E9D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9e uni0E9E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9f uni0E9F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea1 uni0EA1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea2 uni0EA2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea3 uni0EA3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea5 uni0EA5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea7 uni0EA7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eaa uni0EAA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eab uni0EAB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ead uni0EAD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eae uni0EAE 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eaf uni0EAF 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb0 uni0EB0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb1 uni0EB1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb2 uni0EB2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb3 uni0EB3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb4 uni0EB4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb5 uni0EB5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb6 uni0EB6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb7 uni0EB7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb8 uni0EB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb9 uni0EB9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebb uni0EBB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebc uni0EBC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebd uni0EBD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec0 uni0EC0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec1 uni0EC1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec2 uni0EC2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec3 uni0EC3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec4 uni0EC4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec6 uni0EC6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec8 uni0EC8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ec9 uni0EC9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eca uni0ECA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecb uni0ECB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecc uni0ECC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecd uni0ECD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ed0 uni0ED0 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed1 uni0ED1 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed2 uni0ED2 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed3 uni0ED3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed4 uni0ED4 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed5 uni0ED5 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed6 uni0ED6 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed7 uni0ED7 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed8 uni0ED8 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0ed9 uni0ED9 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0edc uni0EDC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0edd uni0EDD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+10a0 uni10A0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a1 uni10A1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a2 uni10A2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a3 uni10A3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a4 uni10A4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a5 uni10A5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a6 uni10A6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a7 uni10A7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a8 uni10A8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a9 uni10A9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10aa uni10AA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ab uni10AB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ac uni10AC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ad uni10AD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ae uni10AE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10af uni10AF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b0 uni10B0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b1 uni10B1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b2 uni10B2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b3 uni10B3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b4 uni10B4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b5 uni10B5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b6 uni10B6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b7 uni10B7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b8 uni10B8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b9 uni10B9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ba uni10BA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bb uni10BB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bc uni10BC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bd uni10BD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10be uni10BE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bf uni10BF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c0 uni10C0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c1 uni10C1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c2 uni10C2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c3 uni10C3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c4 uni10C4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c5 uni10C5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d0 uni10D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d1 uni10D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d2 uni10D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d3 uni10D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d4 uni10D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d5 uni10D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d6 uni10D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d7 uni10D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d8 uni10D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d9 uni10D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10da uni10DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10db uni10DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10dc uni10DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10dd uni10DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10de uni10DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10df uni10DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e0 uni10E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e1 uni10E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e2 uni10E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e3 uni10E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e4 uni10E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e5 uni10E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e6 uni10E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e7 uni10E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e8 uni10E8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e9 uni10E9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ea uni10EA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10eb uni10EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ec uni10EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ed uni10ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ee uni10EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ef uni10EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f0 uni10F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f1 uni10F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f2 uni10F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f3 uni10F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f4 uni10F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f5 uni10F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f6 uni10F6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f7 uni10F7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f8 uni10F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f9 uni10F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fa uni10FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fb uni10FB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fc uni10FC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+1401 uni1401 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1402 uni1402 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1403 uni1403 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1404 uni1404 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1405 uni1405 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1406 uni1406 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1407 uni1407 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1409 uni1409 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140a uni140A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140b uni140B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140c uni140C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140d uni140D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140e uni140E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140f uni140F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1410 uni1410 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1411 uni1411 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1412 uni1412 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1413 uni1413 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1414 uni1414 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1415 uni1415 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1416 uni1416 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1417 uni1417 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1418 uni1418 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1419 uni1419 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141a uni141A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141b uni141B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141d uni141D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141e uni141E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141f uni141F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1420 uni1420 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1421 uni1421 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1422 uni1422 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1423 uni1423 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1424 uni1424 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1425 uni1425 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1426 uni1426 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1427 uni1427 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1428 uni1428 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1429 uni1429 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142a uni142A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142b uni142B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142c uni142C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142d uni142D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142e uni142E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142f uni142F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1430 uni1430 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1431 uni1431 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1432 uni1432 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1433 uni1433 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1434 uni1434 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1435 uni1435 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1437 uni1437 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1438 uni1438 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1439 uni1439 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143a uni143A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143b uni143B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143c uni143C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143d uni143D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143e uni143E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143f uni143F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1440 uni1440 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1441 uni1441 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1442 uni1442 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1443 uni1443 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1444 uni1444 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1445 uni1445 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1446 uni1446 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1447 uni1447 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1448 uni1448 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1449 uni1449 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144a uni144A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144c uni144C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144d uni144D 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144e uni144E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144f uni144F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1450 uni1450 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1451 uni1451 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1452 uni1452 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1454 uni1454 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1455 uni1455 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1456 uni1456 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1457 uni1457 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1458 uni1458 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1459 uni1459 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145a uni145A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145b uni145B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145c uni145C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145d uni145D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145e uni145E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145f uni145F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1460 uni1460 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1461 uni1461 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1462 uni1462 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1463 uni1463 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1464 uni1464 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1465 uni1465 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1466 uni1466 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1467 uni1467 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1468 uni1468 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1469 uni1469 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146a uni146A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146b uni146B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146c uni146C 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146d uni146D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146e uni146E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146f uni146F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1470 uni1470 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1471 uni1471 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1472 uni1472 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1473 uni1473 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1474 uni1474 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1475 uni1475 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1476 uni1476 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1477 uni1477 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1478 uni1478 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1479 uni1479 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147a uni147A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147b uni147B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147c uni147C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147d uni147D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147e uni147E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147f uni147F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1480 uni1480 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1481 uni1481 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1482 uni1482 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1483 uni1483 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1484 uni1484 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1485 uni1485 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1486 uni1486 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1487 uni1487 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1488 uni1488 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1489 uni1489 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148a uni148A 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148b uni148B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148c uni148C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148d uni148D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148e uni148E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148f uni148F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1490 uni1490 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1491 uni1491 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1492 uni1492 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1493 uni1493 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1494 uni1494 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1495 uni1495 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1496 uni1496 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1497 uni1497 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1498 uni1498 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1499 uni1499 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149a uni149A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149b uni149B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149c uni149C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149d uni149D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149e uni149E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149f uni149F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a0 uni14A0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a1 uni14A1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a2 uni14A2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a3 uni14A3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a4 uni14A4 2.13 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.15 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+14a5 uni14A5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a6 uni14A6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a7 uni14A7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a8 uni14A8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a9 uni14A9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14aa uni14AA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ab uni14AB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ac uni14AC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ad uni14AD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ae uni14AE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14af uni14AF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b0 uni14B0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b1 uni14B1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b2 uni14B2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b3 uni14B3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b4 uni14B4 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b5 uni14B5 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b6 uni14B6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b7 uni14B7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b8 uni14B8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b9 uni14B9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ba uni14BA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bb uni14BB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bc uni14BC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bd uni14BD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c0 uni14C0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c1 uni14C1 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c2 uni14C2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c3 uni14C3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c4 uni14C4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c5 uni14C5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c6 uni14C6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c7 uni14C7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c8 uni14C8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c9 uni14C9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ca uni14CA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cb uni14CB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cc uni14CC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cd uni14CD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ce uni14CE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cf uni14CF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d0 uni14D0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d1 uni14D1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d2 uni14D2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d3 uni14D3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d4 uni14D4 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d5 uni14D5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d6 uni14D6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d7 uni14D7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d8 uni14D8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d9 uni14D9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14da uni14DA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14db uni14DB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14dc uni14DC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14dd uni14DD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14de uni14DE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14df uni14DF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e0 uni14E0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e1 uni14E1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e2 uni14E2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e3 uni14E3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e4 uni14E4 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e5 uni14E5 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e6 uni14E6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e7 uni14E7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e8 uni14E8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e9 uni14E9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ea uni14EA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ec uni14EC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ed uni14ED 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ee uni14EE 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ef uni14EF 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f0 uni14F0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f1 uni14F1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f2 uni14F2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f3 uni14F3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f4 uni14F4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f5 uni14F5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f6 uni14F6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f7 uni14F7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f8 uni14F8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f9 uni14F9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fa uni14FA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fb uni14FB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fc uni14FC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fd uni14FD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fe uni14FE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ff uni14FF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1500 uni1500 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1501 uni1501 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1502 uni1502 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1503 uni1503 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1504 uni1504 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1505 uni1505 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1506 uni1506 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1507 uni1507 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1510 uni1510 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1511 uni1511 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1512 uni1512 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1513 uni1513 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1514 uni1514 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1515 uni1515 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1516 uni1516 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1517 uni1517 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1518 uni1518 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1519 uni1519 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151a uni151A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151b uni151B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151c uni151C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151d uni151D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151e uni151E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151f uni151F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1520 uni1520 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1521 uni1521 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1522 uni1522 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1523 uni1523 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1524 uni1524 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1525 uni1525 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1526 uni1526 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1527 uni1527 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1528 uni1528 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1529 uni1529 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152a uni152A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152b uni152B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152c uni152C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152d uni152D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152e uni152E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152f uni152F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1530 uni1530 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1531 uni1531 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1532 uni1532 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1533 uni1533 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1534 uni1534 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1535 uni1535 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1536 uni1536 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1537 uni1537 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1538 uni1538 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1539 uni1539 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153a uni153A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153b uni153B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153c uni153C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153d uni153D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153e uni153E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1540 uni1540 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1541 uni1541 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1542 uni1542 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1543 uni1543 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1544 uni1544 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1545 uni1545 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1546 uni1546 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1547 uni1547 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1548 uni1548 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1549 uni1549 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154a uni154A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154b uni154B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154c uni154C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154d uni154D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154e uni154E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154f uni154F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1550 uni1550 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1552 uni1552 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1553 uni1553 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1554 uni1554 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1555 uni1555 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1556 uni1556 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1557 uni1557 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1558 uni1558 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1559 uni1559 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155a uni155A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155b uni155B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155c uni155C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155d uni155D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155e uni155E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155f uni155F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1560 uni1560 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1561 uni1561 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1562 uni1562 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1563 uni1563 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1564 uni1564 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1565 uni1565 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1566 uni1566 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1567 uni1567 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1568 uni1568 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1569 uni1569 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+156a uni156A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1574 uni1574 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1575 uni1575 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1576 uni1576 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1577 uni1577 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1578 uni1578 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1579 uni1579 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157a uni157A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157b uni157B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157c uni157C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157d uni157D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157e uni157E 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157f uni157F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1580 uni1580 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1581 uni1581 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1582 uni1582 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1583 uni1583 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1584 uni1584 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1585 uni1585 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158a uni158A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158b uni158B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158c uni158C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158d uni158D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158e uni158E 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158f uni158F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1590 uni1590 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1591 uni1591 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1592 uni1592 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1593 uni1593 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1594 uni1594 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1595 uni1595 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1596 uni1596 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a0 uni15A0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a1 uni15A1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a2 uni15A2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a3 uni15A3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a4 uni15A4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a5 uni15A5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a6 uni15A6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a7 uni15A7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a8 uni15A8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a9 uni15A9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15aa uni15AA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ab uni15AB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ac uni15AC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ad uni15AD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ae uni15AE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15af uni15AF 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15de uni15DE 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15e1 uni15E1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1646 uni1646 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1647 uni1647 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+166e uni166E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+166f uni166F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1670 uni1670 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1671 uni1671 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1672 uni1672 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1673 uni1673 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1674 uni1674 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1675 uni1675 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1676 uni1676 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1680 uni1680 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1681 uni1681 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1682 uni1682 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1683 uni1683 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1684 uni1684 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1685 uni1685 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1686 uni1686 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1687 uni1687 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1688 uni1688 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1689 uni1689 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168a uni168A 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168b uni168B 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168c uni168C 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168d uni168D 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168e uni168E 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168f uni168F 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1690 uni1690 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1691 uni1691 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1692 uni1692 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1693 uni1693 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1694 uni1694 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1695 uni1695 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1696 uni1696 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1697 uni1697 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1698 uni1698 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1699 uni1699 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169a uni169A 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169b uni169B 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169c uni169C 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1d00 uni1D00 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d01 uni1D01 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d02 uni1D02 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d03 uni1D03 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d04 uni1D04 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d05 uni1D05 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d06 uni1D06 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d07 uni1D07 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d08 uni1D08 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+1d09 uni1D09 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d0a uni1D0A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0b uni1D0B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0c uni1D0C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0d uni1D0D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0e uni1D0E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0f uni1D0F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d10 uni1D10 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d11 uni1D11 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d12 uni1D12 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d13 uni1D13 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d14 uni1D14 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d15 uni1D15 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d16 uni1D16 2.3 -U+1d17 uni1D17 2.3 -U+1d18 uni1D18 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d19 uni1D19 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1a uni1D1A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1b uni1D1B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1c uni1D1C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1d uni1D1D 2.3 -U+1d1e uni1D1E 2.3 -U+1d1f uni1D1F 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+1d20 uni1D20 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d21 uni1D21 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d22 uni1D22 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d23 uni1D23 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d24 uni1D24 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d25 uni1D25 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d26 uni1D26 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d27 uni1D27 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d28 uni1D28 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d29 uni1D29 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2a uni1D2A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2b uni1D2B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2c uni1D2C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2d uni1D2D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2e uni1D2E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2f uni1D2F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d30 uni1D30 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d31 uni1D31 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d32 uni1D32 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d33 uni1D33 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d34 uni1D34 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d35 uni1D35 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d36 uni1D36 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d37 uni1D37 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d38 uni1D38 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d39 uni1D39 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3a uni1D3A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3b uni1D3B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3c uni1D3C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3d uni1D3D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d3e uni1D3E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3f uni1D3F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d40 uni1D40 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d41 uni1D41 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d42 uni1D42 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d43 uni1D43 2.3 -U+1d44 uni1D44 2.3 -U+1d45 uni1D45 2.3 -U+1d46 uni1D46 2.3 -U+1d47 uni1D47 2.3 -U+1d48 uni1D48 2.3 -U+1d49 uni1D49 2.3 -U+1d4a uni1D4A 2.3 -U+1d4b uni1D4B 2.3 -U+1d4c uni1D4C 2.3 -U+1d4d uni1D4D 2.3 -U+1d4e uni1D4E 2.3 -U+1d4f uni1D4F 2.3 -U+1d50 uni1D50 2.3 -U+1d51 uni1D51 2.3 -U+1d52 uni1D52 2.3 -U+1d53 uni1D53 2.3 -U+1d54 uni1D54 2.3 -U+1d55 uni1D55 2.3 -U+1d56 uni1D56 2.3 -U+1d57 uni1D57 2.3 -U+1d58 uni1D58 2.3 -U+1d59 uni1D59 2.3 -U+1d5a uni1D5A 2.3 -U+1d5b uni1D5B 2.3 -U+1d5c uni1D5C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5d uni1D5D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5e uni1D5E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5f uni1D5F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d60 uni1D60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d61 uni1D61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d62 uni1D62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d63 uni1D63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d64 uni1D64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d65 uni1D65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d66 uni1D66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d67 uni1D67 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d68 uni1D68 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d69 uni1D69 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d6a uni1D6A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d6b uni1D6B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d77 uni1D77 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d78 uni1D78 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d7b uni1D7B 2.3 -U+1d7d uni1D7D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d85 uni1D85 2.3 -U+1d9b uni1D9B 2.3 -U+1d9c uni1D9C 2.3 -U+1d9d uni1D9D 2.3 -U+1d9e uni1D9E 2.3 -U+1d9f uni1D9F 2.3 -U+1da0 uni1DA0 2.3 -U+1da1 uni1DA1 2.3 -U+1da2 uni1DA2 2.3 -U+1da3 uni1DA3 2.3 -U+1da4 uni1DA4 2.3 -U+1da5 uni1DA5 2.3 -U+1da6 uni1DA6 2.3 -U+1da7 uni1DA7 2.3 -U+1da8 uni1DA8 2.3 -U+1da9 uni1DA9 2.3 -U+1daa uni1DAA 2.3 -U+1dab uni1DAB 2.3 -U+1dac uni1DAC 2.3 -U+1dad uni1DAD 2.3 -U+1dae uni1DAE 2.3 -U+1daf uni1DAF 2.3 -U+1db0 uni1DB0 2.3 -U+1db1 uni1DB1 2.3 -U+1db2 uni1DB2 2.3 -U+1db3 uni1DB3 2.3 -U+1db4 uni1DB4 2.3 -U+1db5 uni1DB5 2.3 -U+1db6 uni1DB6 2.3 -U+1db7 uni1DB7 2.3 -U+1db8 uni1DB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1db9 uni1DB9 2.3 -U+1dba uni1DBA 2.3 -U+1dbb uni1DBB 2.3 -U+1dbc uni1DBC 2.3 -U+1dbd uni1DBD 2.3 -U+1dbe uni1DBE 2.3 -U+1dbf uni1DBF 2.3 -U+1dc4 uni1DC4 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc5 uni1DC5 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc6 uni1DC6 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc7 uni1DC7 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc8 uni1DC8 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc9 uni1DC9 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e00 uni1E00 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e01 uni1E01 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e02 uni1E02 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e03 uni1E03 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e04 uni1E04 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e05 uni1E05 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e06 uni1E06 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e07 uni1E07 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e08 uni1E08 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e09 uni1E09 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0a uni1E0A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0b uni1E0B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0c uni1E0C 2.1 -U+1e0d uni1E0D 2.1 -U+1e0e uni1E0E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0f uni1E0F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e10 uni1E10 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e11 uni1E11 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e12 uni1E12 1.13 -U+1e13 uni1E13 1.13 -U+1e14 uni1E14 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e15 uni1E15 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e16 uni1E16 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e17 uni1E17 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e18 uni1E18 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e19 uni1E19 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1a uni1E1A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1b uni1E1B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1c uni1E1C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1e1d uni1E1D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1e1e uni1E1E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1f uni1E1F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e20 uni1E20 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e21 uni1E21 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e22 uni1E22 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e23 uni1E23 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e24 uni1E24 2.1 -U+1e25 uni1E25 2.1 -U+1e26 uni1E26 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e27 uni1E27 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e28 uni1E28 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e29 uni1E29 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2a uni1E2A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2b uni1E2B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2c uni1E2C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2d uni1E2D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2e uni1E2E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e2f uni1E2F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e30 uni1E30 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e31 uni1E31 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e32 uni1E32 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e33 uni1E33 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e34 uni1E34 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e35 uni1E35 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e36 uni1E36 2.1 -U+1e37 uni1E37 2.1 -U+1e38 uni1E38 2.1 -U+1e39 uni1E39 2.1 -U+1e3a uni1E3A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3b uni1E3B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3c uni1E3C 1.13 -U+1e3d uni1E3D 1.13 -U+1e3e uni1E3E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3f uni1E3F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e40 uni1E40 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e41 uni1E41 2.1 -U+1e42 uni1E42 2.1 -U+1e43 uni1E43 2.1 -U+1e44 uni1E44 1.13 -U+1e45 uni1E45 1.13 -U+1e46 uni1E46 2.1 -U+1e47 uni1E47 2.1 -U+1e48 uni1E48 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e49 uni1E49 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e4a uni1E4A 1.13 -U+1e4b uni1E4B 1.13 -U+1e4c uni1E4C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e4d uni1E4D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e4e uni1E4E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e4f uni1E4F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e50 uni1E50 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e51 uni1E51 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e52 uni1E52 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e53 uni1E53 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e54 uni1E54 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e55 uni1E55 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e56 uni1E56 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e57 uni1E57 2.1 -U+1e58 uni1E58 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e59 uni1E59 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e5a uni1E5A 2.1 -U+1e5b uni1E5B 2.1 -U+1e5c uni1E5C 2.1 -U+1e5d uni1E5D 2.1 -U+1e5e uni1E5E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e5f uni1E5F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e60 uni1E60 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e61 uni1E61 2.1 -U+1e62 uni1E62 2.1 -U+1e63 uni1E63 2.1 -U+1e64 uni1E64 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e65 uni1E65 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e66 uni1E66 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e67 uni1E67 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e68 uni1E68 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e69 uni1E69 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6a uni1E6A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6b uni1E6B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6c uni1E6C 2.1 -U+1e6d uni1E6D 2.1 -U+1e6e uni1E6E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6f uni1E6F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e70 uni1E70 1.13 -U+1e71 uni1E71 1.13 -U+1e72 uni1E72 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e73 uni1E73 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e74 uni1E74 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e75 uni1E75 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e76 uni1E76 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e77 uni1E77 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e78 uni1E78 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e79 uni1E79 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7a uni1E7A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e7b uni1E7B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e7c uni1E7C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7d uni1E7D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7e uni1E7E 2.1 -U+1e7f uni1E7F 2.1 -U+1e80 Wgrave 1.2 -U+1e81 wgrave 1.2 -U+1e82 Wacute 1.2 -U+1e83 wacute 1.2 -U+1e84 Wdieresis 1.2 -U+1e85 wdieresis 1.2 -U+1e86 uni1E86 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e87 uni1E87 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e88 uni1E88 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e89 uni1E89 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8a uni1E8A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8b uni1E8B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8c uni1E8C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e8d uni1E8D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e8e uni1E8E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8f uni1E8F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e90 uni1E90 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e91 uni1E91 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e92 uni1E92 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e93 uni1E93 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e94 uni1E94 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e95 uni1E95 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e96 uni1E96 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e97 uni1E97 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e98 uni1E98 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e99 uni1E99 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e9a uni1E9A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e9b uni1E9B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e9c uni1E9C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e9d uni1E9D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e9e uni1E9E 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.32 (Sans ExtraLight) -U+1e9f uni1E9F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1ea0 uni1EA0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ea1 uni1EA1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ea2 uni1EA2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ea3 uni1EA3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ea4 uni1EA4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea5 uni1EA5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea6 uni1EA6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea7 uni1EA7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea8 uni1EA8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea9 uni1EA9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eaa uni1EAA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eab uni1EAB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eac uni1EAC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ead uni1EAD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eae uni1EAE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eaf uni1EAF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb0 uni1EB0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1eb1 uni1EB1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1eb2 uni1EB2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb3 uni1EB3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb4 uni1EB4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb5 uni1EB5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb6 uni1EB6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eb7 uni1EB7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eb8 uni1EB8 2.2 -U+1eb9 uni1EB9 2.2 -U+1eba uni1EBA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ebb uni1EBB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ebc uni1EBC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ebd uni1EBD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ebe uni1ebe 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ebf uni1ebF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec0 uni1EC0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec1 uni1EC1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec2 uni1EC2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec3 uni1EC3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec4 uni1EC4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec5 uni1EC5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec6 uni1EC6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ec7 uni1EC7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ec8 uni1EC8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ec9 uni1EC9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eca uni1ECA 2.2 -U+1ecb uni1ECB 2.2 -U+1ecc uni1ECC 2.2 -U+1ecd uni1ECD 2.2 -U+1ece uni1ECE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ecf uni1ECF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ed0 uni1ED0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed1 uni1ED1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed2 uni1ED2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed3 uni1ED3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed4 uni1ED4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed5 uni1ED5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed6 uni1ED6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed7 uni1ED7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed8 uni1ED8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ed9 uni1ED9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eda uni1EDA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edb uni1EDB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edc uni1EDC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edd uni1EDD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ede uni1EDE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edf uni1EDF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee0 uni1EE0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee1 uni1EE1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee2 uni1EE2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee3 uni1EE3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee4 uni1EE4 2.2 -U+1ee5 uni1EE5 2.2 -U+1ee6 uni1EE6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ee7 uni1EE7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ee8 uni1EE8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee9 uni1EE9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eea uni1EEA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eeb uni1EEB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eec uni1EEC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eed uni1EED 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eee uni1EEE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eef uni1EEF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef0 uni1EF0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef1 uni1EF1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef2 Ygrave 1.2 -U+1ef3 ygrave 1.2 -U+1ef4 uni1EF4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef5 uni1EF5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef6 uni1EF6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ef7 uni1EF7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ef8 uni1EF8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef9 uni1EF9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1efa uni1EFA 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1efb uni1EFB 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1f00 uni1F00 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f01 uni1F01 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f02 uni1F02 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f03 uni1F03 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f04 uni1F04 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f05 uni1F05 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f06 uni1F06 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f07 uni1F07 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f08 uni1F08 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f09 uni1F09 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0a uni1F0A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0b uni1F0B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0c uni1F0C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0d uni1F0D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0e uni1F0E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0f uni1F0F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f10 uni1F10 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f11 uni1F11 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f12 uni1F12 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f13 uni1F13 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f14 uni1F14 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f15 uni1F15 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f18 uni1F18 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f19 uni1F19 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1a uni1F1A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1b uni1F1B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1c uni1F1C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1d uni1F1D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f20 uni1F20 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f21 uni1F21 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f22 uni1F22 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f23 uni1F23 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f24 uni1F24 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f25 uni1F25 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f26 uni1F26 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f27 uni1F27 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f28 uni1F28 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f29 uni1F29 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2a uni1F2A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2b uni1F2B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2c uni1F2C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2d uni1F2D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2e uni1F2E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2f uni1F2F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f30 uni1F30 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f31 uni1F31 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f32 uni1F32 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f33 uni1F33 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f34 uni1F34 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f35 uni1F35 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f36 uni1F36 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f37 uni1F37 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f38 uni1F38 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f39 uni1F39 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3a uni1F3A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3b uni1F3B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3c uni1F3C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3d uni1F3D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3e uni1F3E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3f uni1F3F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f40 uni1F40 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f41 uni1F41 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f42 uni1F42 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f43 uni1F43 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f44 uni1F44 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f45 uni1F45 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f48 uni1F48 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f49 uni1F49 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4a uni1F4A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4b uni1F4B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4c uni1F4C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4d uni1F4D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f50 uni1F50 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f51 uni1F51 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f52 uni1F52 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f53 uni1F53 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f54 uni1F54 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f55 uni1F55 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f56 uni1F56 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f57 uni1F57 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f59 uni1F59 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5b uni1F5B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5d uni1F5D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5f uni1F5F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f60 uni1F60 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f61 uni1F61 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f62 uni1F62 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f63 uni1F63 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f64 uni1F64 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f65 uni1F65 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f66 uni1F66 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f67 uni1F67 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f68 uni1F68 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f69 uni1F69 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6a uni1F6A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6b uni1F6B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6c uni1F6C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6d uni1F6D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6e uni1F6E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6f uni1F6F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f70 uni1F70 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f71 uni1F71 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f72 uni1F72 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f73 uni1F73 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f74 uni1F74 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f75 uni1F75 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f76 uni1F76 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f77 uni1F77 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f78 uni1F78 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f79 uni1F79 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f7a uni1F7A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7b uni1F7B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7c uni1F7C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7d uni1F7D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f80 uni1F80 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f81 uni1F81 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f82 uni1F82 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f83 uni1F83 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f84 uni1F84 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f85 uni1F85 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f86 uni1F86 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f87 uni1F87 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f88 uni1F88 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f89 uni1F89 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8a uni1F8A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8b uni1F8B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8c uni1F8C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8d uni1F8D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8e uni1F8E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8f uni1F8F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f90 uni1F90 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f91 uni1F91 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f92 uni1F92 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f93 uni1F93 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f94 uni1F94 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f95 uni1F95 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f96 uni1F96 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f97 uni1F97 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f98 uni1F98 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f99 uni1F99 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9a uni1F9A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9b uni1F9B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9c uni1F9C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9d uni1F9D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9e uni1F9E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9f uni1F9F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa0 uni1FA0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa1 uni1FA1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa2 uni1FA2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa3 uni1FA3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa4 uni1FA4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa5 uni1FA5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa6 uni1FA6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa7 uni1FA7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa8 uni1FA8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa9 uni1FA9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1faa uni1FAA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fab uni1FAB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fac uni1FAC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fad uni1FAD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fae uni1FAE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1faf uni1FAF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb0 uni1FB0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb1 uni1FB1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb2 uni1FB2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb3 uni1FB3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb4 uni1FB4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb6 uni1FB6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb7 uni1FB7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb8 uni1FB8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fb9 uni1FB9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fba uni1FBA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbb uni1FBB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbc uni1FBC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fbd uni1FBD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fbe uni1FBE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbf uni1FBF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc0 uni1FC0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc1 uni1FC1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc2 uni1FC2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc3 uni1FC3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc4 uni1FC4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc6 uni1FC6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc7 uni1FC7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc8 uni1FC8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc9 uni1FC9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fca uni1FCA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fcb uni1FCB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fcc uni1FCC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fcd uni1FCD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fce uni1FCE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fcf uni1FCF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd0 uni1FD0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd1 uni1FD1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd2 uni1FD2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd3 uni1FD3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd6 uni1FD6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd7 uni1FD7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd8 uni1FD8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fd9 uni1FD9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fda uni1FDA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fdb uni1FDB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fdd uni1FDD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fde uni1FDE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fdf uni1FDF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe0 uni1FE0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe1 uni1FE1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe2 uni1FE2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe3 uni1FE3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe4 uni1FE4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe5 uni1FE5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe6 uni1FE6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe7 uni1FE7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe8 uni1FE8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fe9 uni1FE9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fea uni1FEA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1feb uni1FEB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fec uni1FEC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fed uni1FED 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fee uni1FEE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fef uni1FEF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ff2 uni1FF2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff3 uni1FF3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff4 uni1FF4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff6 uni1FF6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff7 uni1FF7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff8 uni1FF8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ff9 uni1FF9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ffa uni1FFA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffb uni1FFB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffc uni1FFC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffd uni1FFD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ffe uni1FFE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+2000 uni2000 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2001 uni2001 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2002 uni2002 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2003 uni2003 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2004 uni2004 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2005 uni2005 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2006 uni2006 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2007 uni2007 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2008 uni2008 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2009 uni2009 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+200a uni200A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+200b uni200B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200c uni200C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200d uni200D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200e uni200E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200f uni200F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2010 uni2010 1.5 -U+2011 uni2011 1.5 -U+2012 figuredash 1.5 -U+2013 endash original -U+2014 emdash original -U+2015 uni2015 1.5 -U+2016 uni2016 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2017 underscoredbl 2.3 -U+2018 quoteleft original -U+2019 quoteright original -U+201a quotesinglbase original -U+201b quotereversed 2.3 -U+201c quotedblleft original -U+201d quotedblright original -U+201e quotedblbase original -U+201f uni201F 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+2020 dagger original -U+2021 daggerdbl original -U+2022 bullet original -U+2023 uni2023 2.2 -U+2024 onedotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2025 twodotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2026 ellipsis original -U+2027 uni2027 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2028 uni2028 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2029 uni2029 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+202a uni202A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202b uni202B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202c uni202C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202d uni202D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202e uni202E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202f uni202F 2.11 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.23 (Serif Italic Condensed) -U+2030 perthousand original -U+2031 uni2031 2.1 -U+2032 minute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2033 second 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2034 uni2034 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2035 uni2035 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2036 uni2036 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2037 uni2037 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2038 uni2038 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2039 guilsinglleft original -U+203a guilsinglright original -U+203b uni203B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+203c exclamdbl 2.0 -U+203d uni203D 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.11 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.14 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+203e uni203E 2.3 -U+203f uni203F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2040 uni2040 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2041 uni2041 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2042 uni2042 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2043 uni2043 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2044 fraction 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2045 uni2045 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2046 uni2046 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2047 uni2047 2.0 -U+2048 uni2048 2.0 -U+2049 uni2049 2.0 -U+204a uni204A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+204b uni204B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+204c uni204C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204d uni204D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204e uni204E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204f uni204F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2050 uni2050 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2051 uni2051 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2052 uni2052 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2053 uni2053 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2054 uni2054 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2055 uni2055 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2056 uni2056 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2057 uni2057 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2058 uni2058 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2059 uni2059 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205a uni205A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205b uni205B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205c uni205C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205d uni205D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205e uni205E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205f uni205F 2.14 -U+2060 uni2060 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2061 uni2061 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2062 uni2062 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2063 uni2063 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2064 uni2064 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+206a uni206A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206b uni206B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206c uni206C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206d uni206D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206e uni206E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206f uni206F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2070 uni2070 2.2 -U+2071 uni2071 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2074 uni2074 2.2 -U+2075 uni2075 2.2 -U+2076 uni2076 2.2 -U+2077 uni2077 2.2 -U+2078 uni2078 2.2 -U+2079 uni2079 2.2 -U+207a uni207A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207b uni207B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207c uni207C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207d uni207D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207e uni207E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207f uni207F 1.14 -U+2080 uni2080 2.4 -U+2081 uni2081 2.4 -U+2082 uni2082 2.4 -U+2083 uni2083 2.4 -U+2084 uni2084 2.4 -U+2085 uni2085 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2086 uni2086 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2087 uni2087 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2088 uni2088 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2089 uni2089 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+208a uni208A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208b uni208B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208c uni208C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208d uni208D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208e uni208E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2090 uni2090 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2091 uni2091 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2092 uni2092 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2093 uni2093 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2094 uni2094 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2095 uni2095 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2096 uni2096 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2097 uni2097 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2098 uni2098 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2099 uni2099 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209a uni209A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209b uni209B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209c uni209C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+20a0 uni20A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a1 colonmonetary 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a2 uni20A2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a3 franc 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a4 lira 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a5 uni20A5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a6 uni20A6 2.3 -U+20a7 peseta 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a8 uni20A8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a9 uni20A9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20aa uni20AA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ab dong 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ac Euro original -U+20ad uni20AD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ae uni20AE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20af uni20AF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b0 uni20B0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b1 uni20B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+20b2 uni20B2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b3 uni20B3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b4 uni20B4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+20b5 uni20B5 2.2 -U+20b8 uni20B8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+20b9 uni20B9 2.32 -U+20d0 uni20D0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+20d1 uni20D1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+20d6 uni20D6 2.8 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20d7 uni20D7 2.8 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20db uni20DB 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20dc uni20DC 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20e1 uni20E1 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2100 uni2100 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2101 uni2101 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2102 uni2102 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.16 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Condensed) -U+2103 uni2103 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2104 uni2104 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2105 uni2105 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2106 uni2106 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2107 uni2107 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2108 uni2108 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2109 uni2109 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+210b uni210B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+210c uni210C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+210d uni210D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+210e uni210E 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+210f uni210F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.28 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2110 uni2110 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2111 Ifraktur 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2112 uni2112 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2113 uni2113 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2114 uni2114 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2115 uni2115 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2116 uni2116 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2117 uni2117 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2118 weierstrass 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2119 uni2119 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211a uni211A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211b uni211B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211c Rfraktur 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211d uni211D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211e prescription 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211f uni211F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2120 uni2120 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2121 uni2121 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2122 trademark original -U+2123 uni2123 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2124 uni2124 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2125 uni2125 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2126 uni2126 2.2 -U+2127 uni2127 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2128 uni2128 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2129 uni2129 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212a uni212A 2.2 -U+212b uni212B 2.2 -U+212c uni212C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212d uni212D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212e estimated 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+212f uni212F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2130 uni2130 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2131 uni2131 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2132 uni2132 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+2133 uni2133 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2134 uni2134 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2135 aleph 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2136 uni2136 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2137 uni2137 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2138 uni2138 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2139 uni2139 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213a uni213A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213b uni213B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213c uni213C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213d uni213D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213e uni213E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213f uni213F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2140 uni2140 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2141 uni2141 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2142 uni2142 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2143 uni2143 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2144 uni2144 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2145 uni2145 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2146 uni2146 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2147 uni2147 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2148 uni2148 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2149 uni2149 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+214b uni214B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+214e uni214E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2150 uni2150 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2151 uni2151 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2152 uni2152 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2153 onethird 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2154 twothirds 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2155 uni2155 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2156 uni2156 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2157 uni2157 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2158 uni2158 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2159 uni2159 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215a uni215A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215b oneeighth 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215c threeeighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215d fiveeighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215e seveneighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215f uni215F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2160 uni2160 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2161 uni2161 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2162 uni2162 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2163 uni2163 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2164 uni2164 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2165 uni2165 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2166 uni2166 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2167 uni2167 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2168 uni2168 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2169 uni2169 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216a uni216A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216b uni216B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216c uni216C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216d uni216D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216e uni216E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216f uni216F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2170 uni2170 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2171 uni2171 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2172 uni2172 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2173 uni2173 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2174 uni2174 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2175 uni2175 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2176 uni2176 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2177 uni2177 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2178 uni2178 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2179 uni2179 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217a uni217A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217b uni217B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217c uni217C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217d uni217D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217e uni217E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217f uni217F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2180 uni2180 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2181 uni2181 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+2182 uni2182 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+2183 uni2183 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2184 uni2184 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2185 uni2185 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2189 uni2189 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2190 arrowleft 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2191 arrowup 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2192 arrowright 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2193 arrowdown 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2194 arrowboth 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2195 arrowupdn 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2196 uni2196 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2197 uni2197 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2198 uni2198 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2199 uni2199 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219a uni219A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219b uni219B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219c uni219C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219d uni219D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219e uni219E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219f uni219F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a0 uni21A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a1 uni21A1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a2 uni21A2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a3 uni21A3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a4 uni21A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a5 uni21A5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a6 uni21A6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a7 uni21A7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a8 arrowupdnbse 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a9 uni21A9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21aa uni21AA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ab uni21AB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ac uni21AC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ad uni21AD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ae uni21AE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21af uni21AF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b0 uni21B0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b1 uni21B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b2 uni21B2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b3 uni21B3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b4 uni21B4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b5 carriagereturn 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b6 uni21B6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b7 uni21B7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b8 uni21B8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b9 uni21B9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ba uni21BA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bb uni21BB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bc uni21BC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bd uni21BD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21be uni21BE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bf uni21BF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c0 uni21C0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c1 uni21C1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c2 uni21C2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c3 uni21C3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c4 uni21C4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c5 uni21C5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c6 uni21C6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c7 uni21C7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c8 uni21C8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c9 uni21C9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ca uni21CA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cb uni21CB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cc uni21CC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cd uni21CD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ce uni21CE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cf uni21CF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d0 arrowdblleft 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d1 arrowdblup 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d2 arrowdblright 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d3 arrowdbldown 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d4 arrowdblboth 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d5 uni21D5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d6 uni21D6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d7 uni21D7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d8 uni21D8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d9 uni21D9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21da uni21DA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21db uni21DB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21dc uni21DC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21dd uni21DD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21de uni21DE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21df uni21DF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e0 uni21E0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e1 uni21E1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e2 uni21E2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e3 uni21E3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e4 uni21E4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e5 uni21E5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e6 uni21E6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e7 uni21E7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e8 uni21E8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e9 uni21E9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ea uni21EA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21eb uni21EB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ec uni21EC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ed uni21ED 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ee uni21EE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ef uni21EF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f0 uni21F0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f1 uni21F1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f2 uni21F2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f3 uni21F3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f4 uni21F4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f5 uni21F5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f6 uni21F6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f7 uni21F7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f8 uni21F8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f9 uni21F9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fa uni21FA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fb uni21FB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fc uni21FC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fd uni21FD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fe uni21FE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ff uni21FF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2200 universal 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2201 uni2201 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2202 partialdiff original -U+2203 existential 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2204 uni2204 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2205 emptyset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2206 Delta original -U+2207 gradient 2.1 -U+2208 element 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2209 notelement 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220a uni220A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+220b suchthat 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220c uni220C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220d uni220D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+220e uni220E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+220f product original -U+2210 uni2210 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2211 summation original -U+2212 minus original -U+2213 uni2213 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2214 uni2214 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2215 uni2215 original -U+2216 uni2216 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2217 asteriskmath 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2218 uni2218 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2219 uni2219 original -U+221a radical original -U+221b uni221B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+221c uni221C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+221d proportional 2.1 -U+221e infinity original -U+221f orthogonal 2.1 -U+2220 angle 2.3 -U+2221 uni2221 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2222 uni2222 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2223 uni2223 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2224 uni2224 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2225 uni2225 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2226 uni2226 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2227 logicaland 2.1 -U+2228 logicalor 2.1 -U+2229 intersection 2.1 -U+222a union 2.1 -U+222b integral original -U+222c uni222C 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+222d uni222D 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+222e uni222E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+222f uni222F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2230 uni2230 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2231 uni2231 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2232 uni2232 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2233 uni2233 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2234 therefore 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2235 uni2235 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2236 uni2236 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2237 uni2237 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2238 uni2238 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2239 uni2239 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223a uni223A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223b uni223B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223c similar 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223d uni223D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223e uni223E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+223f uni223F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2240 uni2240 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2241 uni2241 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2242 uni2242 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2243 uni2243 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2244 uni2244 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2245 congruent 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2246 uni2246 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2247 uni2247 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2248 approxequal original -U+2249 uni2249 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224a uni224A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224b uni224B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224c uni224C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224d uni224D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224e uni224E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224f uni224F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2250 uni2250 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2251 uni2251 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2252 uni2252 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2253 uni2253 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2254 uni2254 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2255 uni2255 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2256 uni2256 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2257 uni2257 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2258 uni2258 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2259 uni2259 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225a uni225A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225b uni225B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225c uni225C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225d uni225D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225e uni225E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225f uni225F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2260 notequal original -U+2261 equivalence 2.1 -U+2262 uni2262 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2263 uni2263 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2264 lessequal original -U+2265 greaterequal original -U+2266 uni2266 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2267 uni2267 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2268 uni2268 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2269 uni2269 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226a uni226A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226b uni226B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226c uni226C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226d uni226D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226e uni226E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226f uni226F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2270 uni2270 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2271 uni2271 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2272 uni2272 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2273 uni2273 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2274 uni2274 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2275 uni2275 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2276 uni2276 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2277 uni2277 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2278 uni2278 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2279 uni2279 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227a uni227A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227b uni227B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227c uni227C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227d uni227D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227e uni227E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227f uni227F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2280 uni2280 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2281 uni2281 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2282 propersubset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2283 propersuperset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2284 notsubset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2285 uni2285 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2286 reflexsubset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2287 reflexsuperset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2288 uni2288 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2289 uni2289 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+228a uni228A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+228b uni228B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+228c uni228C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228d uni228D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228e uni228E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228f uni228F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2290 uni2290 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2291 uni2291 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2292 uni2292 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2293 uni2293 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2294 uni2294 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2295 circleplus 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2296 uni2296 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2297 circlemultiply 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2298 uni2298 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2299 uni2299 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229a uni229A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229b uni229B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229c uni229C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229d uni229D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229e uni229E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229f uni229F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a0 uni22A0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a1 uni22A1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a2 uni22A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a3 uni22A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a4 uni22A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a5 perpendicular 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a6 uni22A6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a7 uni22A7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a8 uni22A8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a9 uni22A9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22aa uni22AA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ab uni22AB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ac uni22AC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ad uni22AD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ae uni22AE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22af uni22AF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22b0 uni22B0 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b1 uni22B1 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b2 uni22B2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b3 uni22B3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b4 uni22B4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b5 uni22B5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b6 uni22B6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b7 uni22B7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b8 uni22B8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b9 uni22B9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ba uni22BA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bb uni22BB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bc uni22BC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bd uni22BD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22be uni22BE 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+22bf uni22BF 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+22c0 uni22C0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c1 uni22C1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c2 uni22C2 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c3 uni22C3 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c4 uni22C4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c5 dotmath 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22c6 uni22C6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22c7 uni22C7 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c8 uni22C8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c9 uni22C9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ca uni22CA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cb uni22CB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cc uni22CC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cd uni22CD 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22ce uni22CE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cf uni22CF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d0 uni22D0 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d1 uni22D1 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d2 uni22D2 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d3 uni22D3 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d4 uni22D4 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d5 uni22D5 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d6 uni22D6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d7 uni22D7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d8 uni22D8 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22d9 uni22D9 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22da uni22DA 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22db uni22DB 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22dc uni22DC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22dd uni22DD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22de uni22DE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22df uni22DF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e0 uni22E0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e1 uni22E1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e2 uni22E2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e3 uni22E3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e4 uni22E4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e5 uni22E5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e6 uni22E6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e7 uni22E7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e8 uni22E8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e9 uni22E9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22ea uni22EA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22eb uni22EB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ec uni22EC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ed uni22ED 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ee uni22EE 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ef uni22EF 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f0 uni22F0 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f1 uni22F1 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f2 uni22F2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f3 uni22F3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f4 uni22F4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f5 uni22F5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f6 uni22F6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f7 uni22F7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f8 uni22F8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f9 uni22F9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fa uni22FA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fb uni22FB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fc uni22FC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fd uni22FD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fe uni22FE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ff uni22FF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2300 uni2300 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2301 uni2301 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2302 house 1.14 -U+2303 uni2303 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2304 uni2304 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2305 uni2305 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2306 uni2306 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2307 uni2307 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2308 uni2308 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2309 uni2309 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230a uni230A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230b uni230B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230c uni230C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230d uni230D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230e uni230E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230f uni230F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2310 revlogicalnot 1.14 -U+2311 uni2311 1.15 -U+2312 uni2312 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2313 uni2313 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2314 uni2314 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2315 uni2315 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2318 uni2318 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2319 uni2319 1.14 -U+231c uni231C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231d uni231D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231e uni231E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231f uni231F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2320 integraltp 2.3 -U+2321 integralbt 2.3 -U+2324 uni2324 2.16 (Sans, Sans Bold, Sans Bold Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) 2.19 (Sans Condensed Oblique, Sans Oblique) -U+2325 uni2325 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2326 uni2326 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2327 uni2327 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2328 uni2328 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2329 angleleft 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) -U+232a angleright 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) -U+232b uni232B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+232c uni232C 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2335 uni2335 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2337 uni2337 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2338 uni2338 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2339 uni2339 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233a uni233A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233b uni233B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233c uni233C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233d uni233D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233e uni233E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2341 uni2341 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2342 uni2342 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2343 uni2343 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2344 uni2344 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2347 uni2347 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2348 uni2348 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2349 uni2349 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234b uni234B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234c uni234C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234d uni234D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2350 uni2350 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2352 uni2352 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2353 uni2353 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2354 uni2354 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2357 uni2357 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2358 uni2358 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2359 uni2359 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235a uni235A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235b uni235B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235c uni235C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235e uni235E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235f uni235F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2360 uni2360 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2363 uni2363 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2364 uni2364 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2365 uni2365 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2368 uni2368 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2369 uni2369 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236b uni236B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236c uni236C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236d uni236D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236e uni236E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236f uni236F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2370 uni2370 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2373 uni2373 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2374 uni2374 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2375 uni2375 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2376 uni2376 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2377 uni2377 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2378 uni2378 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2379 uni2379 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+237a uni237A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+237d uni237D 1.15 -U+2380 uni2380 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2381 uni2381 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2382 uni2382 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2383 uni2383 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2387 uni2387 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2388 uni2388 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2389 uni2389 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+238a uni238A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+238b uni238B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2394 uni2394 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2395 uni2395 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+239b uni239B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239c uni239C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239d uni239D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239e uni239E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239f uni239F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a0 uni23A0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a1 uni23A1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a2 uni23A2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a3 uni23A3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a4 uni23A4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a5 uni23A5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a6 uni23A6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a7 uni23A7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a8 uni23A8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a9 uni23A9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23aa uni23AA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ab uni23AB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ac uni23AC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ad uni23AD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ae uni23AE 2.3 -U+23ce uni23CE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23cf uni23CF 2.3 -U+23e3 uni23E3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+23e5 uni23E5 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+23e8 uni23E8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2422 uni2422 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2423 uni2423 1.6 -U+2460 uni2460 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2461 uni2461 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2462 uni2462 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2463 uni2463 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2464 uni2464 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2465 uni2465 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2466 uni2466 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2467 uni2467 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2468 uni2468 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2469 uni2469 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2500 SF100000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2501 uni2501 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2502 SF110000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2503 uni2503 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2504 uni2504 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2505 uni2505 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2506 uni2506 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2507 uni2507 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2508 uni2508 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2509 uni2509 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250a uni250A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250b uni250B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250c SF010000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250d uni250D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250e uni250E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250f uni250F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2510 SF030000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2511 uni2511 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2512 uni2512 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2513 uni2513 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2514 SF020000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2515 uni2515 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2516 uni2516 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2517 uni2517 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2518 SF040000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2519 uni2519 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251a uni251A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251b uni251B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251c SF080000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251d uni251D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251e uni251E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251f uni251F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2520 uni2520 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2521 uni2521 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2522 uni2522 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2523 uni2523 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2524 SF090000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2525 uni2525 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2526 uni2526 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2527 uni2527 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2528 uni2528 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2529 uni2529 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252a uni252A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252b uni252B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252c SF060000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252d uni252D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252e uni252E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252f uni252F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2530 uni2530 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2531 uni2531 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2532 uni2532 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2533 uni2533 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2534 SF070000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2535 uni2535 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2536 uni2536 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2537 uni2537 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2538 uni2538 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2539 uni2539 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253a uni253A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253b uni253B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253c SF050000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253d uni253D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253e uni253E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253f uni253F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2540 uni2540 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2541 uni2541 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2542 uni2542 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2543 uni2543 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2544 uni2544 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2545 uni2545 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2546 uni2546 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2547 uni2547 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2548 uni2548 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2549 uni2549 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254a uni254A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254b uni254B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254c uni254C 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254d uni254D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254e uni254E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254f uni254F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2550 SF430000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2551 SF240000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2552 SF510000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2553 SF520000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2554 SF390000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2555 SF220000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2556 SF210000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2557 SF250000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2558 SF500000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2559 SF490000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255a SF380000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255b SF280000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255c SF270000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255d SF260000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255e SF360000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255f SF370000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2560 SF420000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2561 SF190000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2562 SF200000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2563 SF230000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2564 SF470000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2565 SF480000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2566 SF410000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2567 SF450000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2568 SF460000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2569 SF400000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256a SF540000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256b SF530000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256c SF440000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256d uni256D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256e uni256E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256f uni256F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2570 uni2570 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2571 uni2571 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2572 uni2572 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2573 uni2573 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2574 uni2574 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2575 uni2575 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2576 uni2576 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2577 uni2577 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2578 uni2578 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2579 uni2579 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257a uni257A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257b uni257B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257c uni257C 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257d uni257D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257e uni257E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257f uni257F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2580 upblock 1.14 -U+2581 uni2581 1.14 -U+2582 uni2582 1.14 -U+2583 uni2583 1.14 -U+2584 dnblock 1.14 -U+2585 uni2585 1.14 -U+2586 uni2586 1.14 -U+2587 uni2587 1.14 -U+2588 block 1.14 -U+2589 uni2589 1.14 -U+258a uni258A 1.14 -U+258b uni258B 1.14 -U+258c lfblock 1.14 -U+258d uni258D 1.14 -U+258e uni258E 1.14 -U+258f uni258F 1.14 -U+2590 rtblock 1.14 -U+2591 ltshade 1.15 -U+2592 shade 1.15 -U+2593 dkshade 1.15 -U+2594 uni2594 1.14 -U+2595 uni2595 1.14 -U+2596 uni2596 1.14 -U+2597 uni2597 1.14 -U+2598 uni2598 1.14 -U+2599 uni2599 1.14 -U+259a uni259A 1.14 -U+259b uni259B 1.14 -U+259c uni259C 1.14 -U+259d uni259D 1.14 -U+259e uni259E 1.14 -U+259f uni259F 1.14 -U+25a0 filledbox 2.3 -U+25a1 H22073 2.3 -U+25a2 uni25A2 2.3 -U+25a3 uni25A3 2.3 -U+25a4 uni25A4 2.3 -U+25a5 uni25A5 2.3 -U+25a6 uni25A6 2.3 -U+25a7 uni25A7 2.3 -U+25a8 uni25A8 2.3 -U+25a9 uni25A9 2.3 -U+25aa H18543 2.3 -U+25ab H18551 2.3 -U+25ac filledrect 2.3 -U+25ad uni25AD 2.3 -U+25ae uni25AE 2.3 -U+25af uni25AF 2.3 -U+25b0 uni25B0 2.3 -U+25b1 uni25B1 2.3 -U+25b2 triagup 2.3 -U+25b3 uni25B3 2.3 -U+25b4 uni25B4 2.3 -U+25b5 uni25B5 2.3 -U+25b6 uni25B6 2.3 -U+25b7 uni25B7 2.3 -U+25b8 uni25B8 2.3 -U+25b9 uni25B9 2.3 -U+25ba triagrt 2.3 -U+25bb uni25BB 2.3 -U+25bc triagdn 2.3 -U+25bd uni25BD 2.3 -U+25be uni25BE 2.3 -U+25bf uni25BF 2.3 -U+25c0 uni25C0 2.3 -U+25c1 uni25C1 2.3 -U+25c2 uni25C2 2.3 -U+25c3 uni25C3 2.3 -U+25c4 triaglf 2.3 -U+25c5 uni25C5 2.3 -U+25c6 uni25C6 2.3 -U+25c7 uni25C7 2.3 -U+25c8 uni25C8 2.3 -U+25c9 uni25C9 2.3 -U+25ca lozenge original -U+25cb circle 2.3 -U+25cc uni25CC 2.3 -U+25cd uni25CD 2.3 -U+25ce uni25CE 2.3 -U+25cf H18533 2.3 -U+25d0 uni25D0 2.3 -U+25d1 uni25D1 2.3 -U+25d2 uni25D2 2.3 -U+25d3 uni25D3 2.3 -U+25d4 uni25D4 2.3 -U+25d5 uni25D5 2.3 -U+25d6 uni25D6 2.3 -U+25d7 uni25D7 2.3 -U+25d8 invbullet 2.2 -U+25d9 invcircle 2.3 -U+25da uni25DA 2.3 -U+25db uni25DB 2.3 -U+25dc uni25DC 2.3 -U+25dd uni25DD 2.3 -U+25de uni25DE 2.3 -U+25df uni25DF 2.3 -U+25e0 uni25E0 2.3 -U+25e1 uni25E1 2.3 -U+25e2 uni25E2 2.3 -U+25e3 uni25E3 2.3 -U+25e4 uni25E4 2.3 -U+25e5 uni25E5 2.3 -U+25e6 openbullet 2.2 -U+25e7 uni25E7 2.3 -U+25e8 uni25E8 2.3 -U+25e9 uni25E9 2.3 -U+25ea uni25EA 2.3 -U+25eb uni25EB 2.3 -U+25ec uni25EC 2.3 -U+25ed uni25ED 2.3 -U+25ee uni25EE 2.3 -U+25ef uni25EF 2.3 -U+25f0 uni25F0 2.3 -U+25f1 uni25F1 2.3 -U+25f2 uni25F2 2.3 -U+25f3 uni25F3 2.3 -U+25f4 uni25F4 2.3 -U+25f5 uni25F5 2.3 -U+25f6 uni25F6 2.3 -U+25f7 uni25F7 2.3 -U+25f8 uni25F8 2.3 -U+25f9 uni25F9 2.3 -U+25fa uni25FA 2.3 -U+25fb uni25FB 2.3 -U+25fc uni25FC 2.3 -U+25fd uni25FD 2.3 -U+25fe uni25FE 2.3 -U+25ff uni25FF 2.3 -U+2600 uni2600 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2601 uni2601 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2602 uni2602 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2603 uni2603 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2604 uni2604 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2605 uni2605 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2606 uni2606 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2607 uni2607 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2608 uni2608 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2609 uni2609 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260a uni260A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260b uni260B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260c uni260C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260d uni260D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260e uni260E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260f uni260F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2610 uni2610 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2611 uni2611 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2612 uni2612 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2613 uni2613 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2614 uni2614 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2615 uni2615 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2616 uni2616 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2617 uni2617 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2618 uni2618 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2619 uni2619 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261a uni261A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261b uni261B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261c uni261C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261d uni261D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261e uni261E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261f uni261F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2620 uni2620 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2621 uni2621 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2622 uni2622 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2623 uni2623 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2624 uni2624 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2625 uni2625 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2626 uni2626 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2627 uni2627 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2628 uni2628 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2629 uni2629 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262a uni262A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262b uni262B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262c uni262C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262d uni262D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262e uni262E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262f uni262F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2630 uni2630 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2631 uni2631 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2632 uni2632 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2633 uni2633 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2634 uni2634 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2635 uni2635 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2636 uni2636 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2637 uni2637 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2638 uni2638 1.15 -U+2639 uni2639 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263a smileface 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263b invsmileface 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263c sun 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263d uni263D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+263e uni263E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+263f uni263F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2640 female 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2641 uni2641 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2642 male 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2643 uni2643 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2644 uni2644 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2645 uni2645 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2646 uni2646 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2647 uni2647 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2648 uni2648 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2649 uni2649 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264a uni264A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264b uni264B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264c uni264C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264d uni264D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264e uni264E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264f uni264F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2650 uni2650 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2651 uni2651 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2652 uni2652 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2653 uni2653 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2654 uni2654 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2655 uni2655 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2656 uni2656 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2657 uni2657 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2658 uni2658 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2659 uni2659 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265a uni265A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265b uni265B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265c uni265C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265d uni265D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265e uni265E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265f uni265F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2660 spade 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2661 uni2661 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2662 uni2662 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2663 club 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2664 uni2664 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2665 heart 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2666 diamond 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2667 uni2667 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2668 uni2668 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2669 uni2669 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266a musicalnote 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266b musicalnotedbl 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266c uni266C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266d uni266D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266e uni266E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266f uni266F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2670 uni2670 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2671 uni2671 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2672 uni2672 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2673 uni2673 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2674 uni2674 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2675 uni2675 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2676 uni2676 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2677 uni2677 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2678 uni2678 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2679 uni2679 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267a uni267A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267b uni267B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267c uni267C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267d uni267D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267e uni267E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267f uni267F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2680 uni2680 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2681 uni2681 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2682 uni2682 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2683 uni2683 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2684 uni2684 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2685 uni2685 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2686 uni2686 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2687 uni2687 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2688 uni2688 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2689 uni2689 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268a uni268A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268b uni268B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268c uni268C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268d uni268D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268e uni268E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268f uni268F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2690 uni2690 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2691 uni2691 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2692 uni2692 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2693 uni2693 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2694 uni2694 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2695 uni2695 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2696 uni2696 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2697 uni2697 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2698 uni2698 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2699 uni2699 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269a uni269A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269b uni269B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269c uni269C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a0 uni26A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a1 uni26A1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a2 uni26A2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a3 uni26A3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a4 uni26A4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a5 uni26A5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a6 uni26A6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a7 uni26A7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a8 uni26A8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a9 uni26A9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26aa uni26AA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ab uni26AB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ac uni26AC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ad uni26AD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ae uni26AE 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26af uni26AF 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26b0 uni26B0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+26b1 uni26B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+26b2 uni26B2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b3 uni26B3 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b4 uni26B4 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b5 uni26B5 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b6 uni26B6 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b7 uni26B7 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b8 uni26B8 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c0 uni26C0 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c1 uni26C1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c2 uni26C2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c3 uni26C3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26e2 uni26E2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2701 uni2701 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2702 uni2702 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2703 uni2703 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2704 uni2704 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2706 uni2706 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2707 uni2707 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2708 uni2708 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2709 uni2709 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270c uni270C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270d uni270D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270e uni270E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270f uni270F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2710 uni2710 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2711 uni2711 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2712 uni2712 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2713 uni2713 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2714 uni2714 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2715 uni2715 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2716 uni2716 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2717 uni2717 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2718 uni2718 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2719 uni2719 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271a uni271A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271b uni271B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271c uni271C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271d uni271D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271e uni271E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271f uni271F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2720 uni2720 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2721 uni2721 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2722 uni2722 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2723 uni2723 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2724 uni2724 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2725 uni2725 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2726 uni2726 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2727 uni2727 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2729 uni2729 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272a uni272A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272b uni272B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272c uni272C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272d uni272D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272e uni272E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272f uni272F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2730 uni2730 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2731 uni2731 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2732 uni2732 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2733 uni2733 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2734 uni2734 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2735 uni2735 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2736 uni2736 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2737 uni2737 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2738 uni2738 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2739 uni2739 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273a uni273A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273b uni273B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273c uni273C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273d uni273D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273e uni273E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273f uni273F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2740 uni2740 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2741 uni2741 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2742 uni2742 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2743 uni2743 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2744 uni2744 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2745 uni2745 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2746 uni2746 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2747 uni2747 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2748 uni2748 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2749 uni2749 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274a uni274A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274b uni274B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274d uni274D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274f uni274F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2750 uni2750 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2751 uni2751 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2752 uni2752 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2756 uni2756 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2758 uni2758 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2759 uni2759 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275a uni275A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275b uni275B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275c uni275C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275d uni275D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275e uni275E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2761 uni2761 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2762 uni2762 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2763 uni2763 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2764 uni2764 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2765 uni2765 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2766 uni2766 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2767 uni2767 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2768 uni2768 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2769 uni2769 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276a uni276A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276b uni276B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276c uni276C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276d uni276D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276e uni276E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276f uni276F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2770 uni2770 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2771 uni2771 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2772 uni2772 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2773 uni2773 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2774 uni2774 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2775 uni2775 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2776 uni2776 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2777 uni2777 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2778 uni2778 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2779 uni2779 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277a uni277A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277b uni277B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277c uni277C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277d uni277D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277e uni277E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277f uni277F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2780 uni2780 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2781 uni2781 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2782 uni2782 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2783 uni2783 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2784 uni2784 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2785 uni2785 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2786 uni2786 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2787 uni2787 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2788 uni2788 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2789 uni2789 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278a uni278A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278b uni278B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278c uni278C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278d uni278D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278e uni278E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278f uni278F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2790 uni2790 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2791 uni2791 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2792 uni2792 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2793 uni2793 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2794 uni2794 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2798 uni2798 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2799 uni2799 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279a uni279A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279b uni279B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279c uni279C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279d uni279D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279e uni279E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279f uni279F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a0 uni27A0 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a1 uni27A1 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27a2 uni27A2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a3 uni27A3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a4 uni27A4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a5 uni27A5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a6 uni27A6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a7 uni27A7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a8 uni27A8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a9 uni27A9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27aa uni27AA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ab uni27AB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ac uni27AC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ad uni27AD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ae uni27AE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27af uni27AF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b1 uni27B1 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b2 uni27B2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b3 uni27B3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b4 uni27B4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b5 uni27B5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b6 uni27B6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b7 uni27B7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b8 uni27B8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b9 uni27B9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ba uni27BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bb uni27BB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bc uni27BC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bd uni27BD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27be uni27BE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bf uni27BF 2.7 (Sans Mono Bold) -U+27c5 uni27C5 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+27c6 uni27C6 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+27e0 uni27E0 2.3 -U+27e6 uni27E6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27e7 uni27E7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27e8 uni27E8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27e9 uni27E9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27ea uni27EA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27eb uni27EB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27f0 uni27F0 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f1 uni27F1 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f2 uni27F2 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f3 uni27F3 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f4 uni27F4 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f5 uni27F5 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f6 uni27F6 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f7 uni27F7 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f8 uni27F8 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f9 uni27F9 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fa uni27FA 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fb uni27FB 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fc uni27FC 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fd uni27FD 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fe uni27FE 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27ff uni27FF 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2800 uni2800 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2801 uni2801 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2802 uni2802 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2803 uni2803 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2804 uni2804 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2805 uni2805 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2806 uni2806 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2807 uni2807 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2808 uni2808 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2809 uni2809 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280a uni280A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280b uni280B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280c uni280C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280d uni280D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280e uni280E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280f uni280F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2810 uni2810 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2811 uni2811 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2812 uni2812 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2813 uni2813 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2814 uni2814 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2815 uni2815 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2816 uni2816 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2817 uni2817 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2818 uni2818 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2819 uni2819 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281a uni281A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281b uni281B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281c uni281C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281d uni281D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281e uni281E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281f uni281F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2820 uni2820 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2821 uni2821 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2822 uni2822 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2823 uni2823 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2824 uni2824 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2825 uni2825 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2826 uni2826 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2827 uni2827 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2828 uni2828 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2829 uni2829 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282a uni282A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282b uni282B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282c uni282C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282d uni282D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282e uni282E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282f uni282F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2830 uni2830 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2831 uni2831 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2832 uni2832 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2833 uni2833 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2834 uni2834 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2835 uni2835 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2836 uni2836 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2837 uni2837 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2838 uni2838 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2839 uni2839 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283a uni283A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283b uni283B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283c uni283C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283d uni283D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283e uni283E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283f uni283F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2840 uni2840 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2841 uni2841 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2842 uni2842 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2843 uni2843 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2844 uni2844 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2845 uni2845 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2846 uni2846 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2847 uni2847 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2848 uni2848 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2849 uni2849 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284a uni284A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284b uni284B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284c uni284C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284d uni284D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284e uni284E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284f uni284F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2850 uni2850 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2851 uni2851 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2852 uni2852 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2853 uni2853 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2854 uni2854 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2855 uni2855 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2856 uni2856 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2857 uni2857 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2858 uni2858 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2859 uni2859 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285a uni285A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285b uni285B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285c uni285C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285d uni285D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285e uni285E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285f uni285F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2860 uni2860 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2861 uni2861 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2862 uni2862 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2863 uni2863 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2864 uni2864 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2865 uni2865 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2866 uni2866 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2867 uni2867 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2868 uni2868 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2869 uni2869 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286a uni286A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286b uni286B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286c uni286C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286d uni286D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286e uni286E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286f uni286F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2870 uni2870 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2871 uni2871 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2872 uni2872 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2873 uni2873 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2874 uni2874 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2875 uni2875 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2876 uni2876 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2877 uni2877 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2878 uni2878 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2879 uni2879 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287a uni287A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287b uni287B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287c uni287C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287d uni287D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287e uni287E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287f uni287F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2880 uni2880 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2881 uni2881 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2882 uni2882 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2883 uni2883 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2884 uni2884 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2885 uni2885 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2886 uni2886 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2887 uni2887 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2888 uni2888 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2889 uni2889 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288a uni288A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288b uni288B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288c uni288C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288d uni288D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288e uni288E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288f uni288F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2890 uni2890 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2891 uni2891 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2892 uni2892 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2893 uni2893 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2894 uni2894 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2895 uni2895 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2896 uni2896 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2897 uni2897 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2898 uni2898 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2899 uni2899 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289a uni289A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289b uni289B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289c uni289C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289d uni289D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289e uni289E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289f uni289F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a0 uni28A0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a1 uni28A1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a2 uni28A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a3 uni28A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a4 uni28A4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a5 uni28A5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a6 uni28A6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a7 uni28A7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a8 uni28A8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a9 uni28A9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28aa uni28AA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ab uni28AB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ac uni28AC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ad uni28AD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ae uni28AE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28af uni28AF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b0 uni28B0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b1 uni28B1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b2 uni28B2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b3 uni28B3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b4 uni28B4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b5 uni28B5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b6 uni28B6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b7 uni28B7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b8 uni28B8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b9 uni28B9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ba uni28BA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bb uni28BB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bc uni28BC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bd uni28BD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28be uni28BE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bf uni28BF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c0 uni28C0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c1 uni28C1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c2 uni28C2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c3 uni28C3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c4 uni28C4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c5 uni28C5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c6 uni28C6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c7 uni28C7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c8 uni28C8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c9 uni28C9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ca uni28CA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cb uni28CB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cc uni28CC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cd uni28CD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ce uni28CE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cf uni28CF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d0 uni28D0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d1 uni28D1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d2 uni28D2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d3 uni28D3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d4 uni28D4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d5 uni28D5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d6 uni28D6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d7 uni28D7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d8 uni28D8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d9 uni28D9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28da uni28DA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28db uni28DB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28dc uni28DC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28dd uni28DD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28de uni28DE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28df uni28DF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e0 uni28E0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e1 uni28E1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e2 uni28E2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e3 uni28E3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e4 uni28E4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e5 uni28E5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e6 uni28E6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e7 uni28E7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e8 uni28E8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e9 uni28E9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ea uni28EA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28eb uni28EB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ec uni28EC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ed uni28ED 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ee uni28EE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ef uni28EF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f0 uni28F0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f1 uni28F1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f2 uni28F2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f3 uni28F3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f4 uni28F4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f5 uni28F5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f6 uni28F6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f7 uni28F7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f8 uni28F8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f9 uni28F9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fa uni28FA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fb uni28FB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fc uni28FC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fd uni28FD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fe uni28FE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ff uni28FF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2900 uni2900 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2901 uni2901 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2902 uni2902 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2903 uni2903 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2904 uni2904 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2905 uni2905 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2906 uni2906 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2907 uni2907 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2908 uni2908 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2909 uni2909 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290a uni290A 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290b uni290B 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290c uni290C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290d uni290D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290e uni290E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290f uni290F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2910 uni2910 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2911 uni2911 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2912 uni2912 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2913 uni2913 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2914 uni2914 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2915 uni2915 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2916 uni2916 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2917 uni2917 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2918 uni2918 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2919 uni2919 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291a uni291A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291b uni291B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291c uni291C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291d uni291D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291e uni291E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291f uni291F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2920 uni2920 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2921 uni2921 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2922 uni2922 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2923 uni2923 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2924 uni2924 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2925 uni2925 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2926 uni2926 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2927 uni2927 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2928 uni2928 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2929 uni2929 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292a uni292A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292b uni292B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292c uni292C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292d uni292D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292e uni292E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292f uni292F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2930 uni2930 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2931 uni2931 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2932 uni2932 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2933 uni2933 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2934 uni2934 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2935 uni2935 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2936 uni2936 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2937 uni2937 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2938 uni2938 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2939 uni2939 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293a uni293A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293b uni293B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293c uni293C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293d uni293D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293e uni293E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293f uni293F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2940 uni2940 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2941 uni2941 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2942 uni2942 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2943 uni2943 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2944 uni2944 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2945 uni2945 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2946 uni2946 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2947 uni2947 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2948 uni2948 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2949 uni2949 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294a uni294A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294b uni294B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294c uni294C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294d uni294D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294e uni294E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294f uni294F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2950 uni2950 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2951 uni2951 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2952 uni2952 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2953 uni2953 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2954 uni2954 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2955 uni2955 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2956 uni2956 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2957 uni2957 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2958 uni2958 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2959 uni2959 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295a uni295A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295b uni295B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295c uni295C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295d uni295D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295e uni295E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295f uni295F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2960 uni2960 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2961 uni2961 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2962 uni2962 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2963 uni2963 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2964 uni2964 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2965 uni2965 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2966 uni2966 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2967 uni2967 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2968 uni2968 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2969 uni2969 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296a uni296A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296b uni296B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296c uni296C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296d uni296D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296e uni296E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296f uni296F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2970 uni2970 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2971 uni2971 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2972 uni2972 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2973 uni2973 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2974 uni2974 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2975 uni2975 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2976 uni2976 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2977 uni2977 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2978 uni2978 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2979 uni2979 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297a uni297A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297b uni297B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297c uni297C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297d uni297D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297e uni297E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297f uni297F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2983 uni2983 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2984 uni2984 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+29ce uni29CE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29cf uni29CF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d0 uni29D0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d1 uni29D1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d2 uni29D2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d3 uni29D3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d4 uni29D4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d5 uni29D5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29eb uni29EB 2.2 -U+29fa uni29FA 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+29fb uni29FB 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2a00 uni2A00 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a01 uni2A01 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a02 uni2A02 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a0c uni2A0C 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0d uni2A0D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0e uni2A0E 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0f uni2A0F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a10 uni2A10 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a11 uni2A11 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a12 uni2A12 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a13 uni2A13 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a14 uni2A14 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a15 uni2A15 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a16 uni2A16 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a17 uni2A17 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a18 uni2A18 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a19 uni2A19 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1a uni2A1A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1b uni2A1B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1c uni2A1C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a2f uni2A2F 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2a7d uni2A7D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a7e uni2A7E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a7f uni2A7F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a80 uni2A80 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a81 uni2A81 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a82 uni2A82 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a83 uni2A83 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a84 uni2A84 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a85 uni2A85 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a86 uni2A86 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a87 uni2A87 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a88 uni2A88 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a89 uni2A89 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8a uni2A8A 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8b uni2A8B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8c uni2A8C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8d uni2A8D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8e uni2A8E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8f uni2A8F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a90 uni2A90 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a91 uni2A91 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a92 uni2A92 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a93 uni2A93 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a94 uni2A94 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a95 uni2A95 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a96 uni2A96 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a97 uni2A97 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a98 uni2A98 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a99 uni2A99 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9a uni2A9A 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9b uni2A9B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9c uni2A9C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9d uni2A9D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9e uni2A9E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9f uni2A9F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aa0 uni2AA0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aae uni2AAE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aaf uni2AAF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab0 uni2AB0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab1 uni2AB1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab2 uni2AB2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab3 uni2AB3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab4 uni2AB4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab5 uni2AB5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab6 uni2AB6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab7 uni2AB7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab8 uni2AB8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab9 uni2AB9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aba uni2ABA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2af9 uni2AF9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2afa uni2AFA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b00 uni2B00 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b01 uni2B01 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b02 uni2B02 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b03 uni2B03 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b04 uni2B04 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b05 uni2B05 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b06 uni2B06 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b07 uni2B07 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b08 uni2B08 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b09 uni2B09 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0a uni2B0A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0b uni2B0B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0c uni2B0C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0d uni2B0D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0e uni2B0E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0f uni2B0F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b10 uni2B10 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b11 uni2B11 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b12 uni2B12 2.3 -U+2b13 uni2B13 2.3 -U+2b14 uni2B14 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b15 uni2B15 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b16 uni2B16 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b17 uni2B17 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b18 uni2B18 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b19 uni2B19 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b1a uni2B1A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b1f uni2B1F 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b20 uni2B20 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b21 uni2B21 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b22 uni2B22 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b23 uni2B23 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b24 uni2B24 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b53 uni2B53 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b54 uni2B54 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2c60 uni2C60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c61 uni2C61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c62 uni2C62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c63 uni2C63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c64 uni2C64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2c65 uni2C65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c66 uni2C66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c67 uni2C67 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c68 uni2C68 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c69 uni2C69 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6a uni2C6A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6b uni2C6B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6c uni2C6C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6d uni2C6D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c6e uni2C6E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2c6f uni2C6F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c70 uni2C70 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c71 uni2C71 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c72 uni2C72 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c73 uni2C73 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c74 uni2C74 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c75 uni2C75 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c76 uni2C76 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c77 uni2C77 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c79 uni2C79 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7a uni2C7A 2.27 -U+2c7b uni2C7B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2c7c uni2C7C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7d uni2C7D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7e uni2C7E 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c7f uni2C7F 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2d00 uni2D00 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d01 uni2D01 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d02 uni2D02 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d03 uni2D03 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d04 uni2D04 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d05 uni2D05 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d06 uni2D06 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d07 uni2D07 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d08 uni2D08 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d09 uni2D09 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0a uni2D0A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0b uni2D0B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0c uni2D0C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0d uni2D0D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0e uni2D0E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d0f uni2D0F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d10 uni2D10 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d11 uni2D11 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d12 uni2D12 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d13 uni2D13 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d14 uni2D14 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d15 uni2D15 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d16 uni2D16 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d17 uni2D17 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d18 uni2D18 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d19 uni2D19 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1a uni2D1A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1b uni2D1B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1c uni2D1C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1d uni2D1D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1e uni2D1E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d1f uni2D1F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d20 uni2D20 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d21 uni2D21 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d22 uni2D22 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d23 uni2D23 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d24 uni2D24 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d25 uni2D25 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2d30 uni2D30 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d31 uni2D31 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d32 uni2D32 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d33 uni2D33 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d34 uni2D34 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d35 uni2D35 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d36 uni2D36 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d37 uni2D37 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d38 uni2D38 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d39 uni2D39 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3a uni2D3A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3b uni2D3B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3c uni2D3C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3d uni2D3D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3e uni2D3E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3f uni2D3F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d40 uni2D40 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d41 uni2D41 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d42 uni2D42 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d43 uni2D43 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d44 uni2D44 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d45 uni2D45 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d46 uni2D46 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d47 uni2D47 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d48 uni2D48 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d49 uni2D49 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4a uni2D4A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4b uni2D4B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4c uni2D4C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4d uni2D4D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4e uni2D4E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4f uni2D4F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d50 uni2D50 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d51 uni2D51 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d52 uni2D52 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d53 uni2D53 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d54 uni2D54 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d55 uni2D55 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d56 uni2D56 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d57 uni2D57 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d58 uni2D58 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d59 uni2D59 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5a uni2D5A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5b uni2D5B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5c uni2D5C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5d uni2D5D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5e uni2D5E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5f uni2D5F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d60 uni2D60 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d61 uni2D61 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d62 uni2D62 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d63 uni2D63 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d64 uni2D64 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d65 uni2D65 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d6f uni2D6F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2e18 uni2E18 2.26 -U+2e22 uni2E22 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e23 uni2E23 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e24 uni2E24 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e25 uni2E25 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e2e uni2E2E 2.26 -U+4dc0 uni4DC0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc1 uni4DC1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc2 uni4DC2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc3 uni4DC3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc4 uni4DC4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc5 uni4DC5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc6 uni4DC6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc7 uni4DC7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc8 uni4DC8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc9 uni4DC9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dca uni4DCA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcb uni4DCB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcc uni4DCC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcd uni4DCD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dce uni4DCE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcf uni4DCF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd0 uni4DD0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd1 uni4DD1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd2 uni4DD2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd3 uni4DD3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd4 uni4DD4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd5 uni4DD5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd6 uni4DD6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd7 uni4DD7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd8 uni4DD8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd9 uni4DD9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dda uni4DDA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddb uni4DDB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddc uni4DDC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddd uni4DDD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dde uni4DDE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddf uni4DDF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de0 uni4DE0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de1 uni4DE1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de2 uni4DE2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de3 uni4DE3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de4 uni4DE4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de5 uni4DE5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de6 uni4DE6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de7 uni4DE7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de8 uni4DE8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de9 uni4DE9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dea uni4DEA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4deb uni4DEB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dec uni4DEC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ded uni4DED 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dee uni4DEE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4def uni4DEF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df0 uni4DF0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df1 uni4DF1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df2 uni4DF2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df3 uni4DF3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df4 uni4DF4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df5 uni4DF5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df6 uni4DF6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df7 uni4DF7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df8 uni4DF8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df9 uni4DF9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfa uni4DFA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfb uni4DFB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfc uni4DFC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfd uni4DFD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfe uni4DFE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dff uni4DFF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a644 uniA644 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a645 uniA645 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a646 uniA646 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a647 uniA647 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a64c uniA64C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a64d uniA64D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a650 uniA650 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a651 uniA651 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a654 uniA654 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a655 uniA655 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a656 uniA656 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a657 uniA657 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a662 uniA662 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a663 uniA663 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a664 uniA664 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a665 uniA665 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a666 uniA666 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a667 uniA667 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a668 uniA668 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a669 uniA669 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66a uniA66A 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66b uniA66B 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66c uniA66C 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66d uniA66D 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66e uniA66E 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a68a uniA68A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a68b uniA68B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a68c uniA68C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a68d uniA68D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a694 uniA694 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a695 uniA695 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a708 uniA708 2.27 -U+a709 uniA709 2.27 -U+a70a uniA70A 2.27 -U+a70b uniA70B 2.27 -U+a70c uniA70C 2.27 -U+a70d uniA70D 2.27 -U+a70e uniA70E 2.27 -U+a70f uniA70F 2.27 -U+a710 uniA710 2.27 -U+a711 uniA711 2.27 -U+a712 uniA712 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a713 uniA713 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a714 uniA714 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a715 uniA715 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a716 uniA716 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a71b uniA71B 2.27 -U+a71c uniA71C 2.27 -U+a71d uniA71D 2.27 -U+a71e uniA71E 2.27 -U+a71f uniA71F 2.27 -U+a722 uniA722 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a723 uniA723 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a724 uniA724 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a725 uniA725 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a726 uniA726 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a727 uniA727 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a728 uniA728 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a729 uniA729 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72a uniA72A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72b uniA72B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72c uniA72C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72d uniA72D 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72e uniA72E 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72f uniA72F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a730 uniA730 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a731 uniA731 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a732 uniA732 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a733 uniA733 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a734 uniA734 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a735 uniA735 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a736 uniA736 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a737 uniA737 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a738 uniA738 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a739 uniA739 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73a uniA73A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73b uniA73B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73c uniA73C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73d uniA73D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73e uniA73E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73f uniA73F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a746 uniA746 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a747 uniA747 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a748 uniA748 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a749 uniA749 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a74a uniA74A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74b uniA74B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74e uniA74E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74f uniA74F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a750 uniA750 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a751 uniA751 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a752 uniA752 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a753 uniA753 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a756 uniA756 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a757 uniA757 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a764 uniA764 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a765 uniA765 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a766 uniA766 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a767 uniA767 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a768 uniA768 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a769 uniA769 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a77b uniA77B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a77c uniA77C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a780 uniA780 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a781 uniA781 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a782 uniA782 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a783 uniA783 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a784 uniA784 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a785 uniA785 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a786 uniA786 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a787 uniA787 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a789 uniA789 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a78a uniA78A 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a78b uniA78B 2.26 -U+a78c uniA78C 2.26 -U+a78d uniA78D 2.31 -U+a78e uniA78E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a790 uniA790 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a791 uniA791 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fa uniA7FA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fb uniA7FB 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fc uniA7FC 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fd uniA7FD 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fe uniA7FE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7ff uniA7FF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+e000 uniE000 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e001 uniE001 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e002 uniE002 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e003 uniE003 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e004 uniE004 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e005 uniE005 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e006 uniE006 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e007 uniE007 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e008 uniE008 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e009 uniE009 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00a uniE00A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00b uniE00B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00c uniE00C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00d uniE00D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00e uniE00E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00f uniE00F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e010 uniE010 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e011 uniE011 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e012 uniE012 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e013 uniE013 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e014 uniE014 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e015 uniE015 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e016 uniE016 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e017 uniE017 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e018 uniE018 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e019 uniE019 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01a uniE01A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01b uniE01B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01c uniE01C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01d uniE01D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef00 uni02E5.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef01 uni02E6.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef02 uni02E7.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef03 uni02E8.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef04 uni02E9.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef05 uni02E5.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef06 uni02E6.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef07 uni02E7.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef08 uni02E8.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef09 uni02E9.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0a uni02E5.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0b uni02E6.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0c uni02E7.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0d uni02E8.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0e uni02E9.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0f uni02E5.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef10 uni02E6.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef11 uni02E7.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef12 uni02E8.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef13 uni02E9.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef14 uni02E5.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef15 uni02E6.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef16 uni02E7.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef17 uni02E8.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef18 uni02E9.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef19 stem 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f000 uniF000 2.10 (Sans) 2.11 (Sans Condensed) -U+f001 uniF001 2.10 (Sans) 2.11 (Sans Condensed) -U+f002 uniF002 2.33 (Sans, Sans Condensed) -U+f003 uniF003 2.33 (Sans, Sans Condensed) -U+f208 uniF208 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f20a uniF20A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f215 uniF215 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f216 uniF216 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f217 uniF217 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f21a uniF21A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f21b uniF21B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f25f uniF25F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f400 uniF400 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f401 uniF401 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f402 uniF402 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f403 uniF403 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f404 uniF404 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f405 uniF405 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f406 uniF406 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f407 uniF407 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f408 uniF408 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f409 uniF409 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40a uniF40A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40b uniF40B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40c uniF40C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40d uniF40D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40e uniF40E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f40f uniF40F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f410 uniF410 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f411 uniF411 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f412 uniF412 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f413 uniF413 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f414 uniF414 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f415 uniF415 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f416 uniF416 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f417 uniF417 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f418 uniF418 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f419 uniF419 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41a uniF41A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41b uniF41B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41c uniF41C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41d uniF41D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41e uniF41E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f41f uniF41F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f420 uniF420 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f421 uniF421 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f422 uniF422 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f423 uniF423 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f424 uniF424 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f425 uniF425 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f426 uniF426 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f428 uniF428 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+f5c5 uniF5C5 2.9 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+f6c4 uniF6C4 2.10 (Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+f6c5 uniF6C5 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.9 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+f6c6 uniF6C6 2.5 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6c7 uniF6C7 2.11 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6c8 uniF6C8 2.11 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6d1 cyrBreve 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6d4 cyrbreve 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb00 uniFB00 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb01 fi original -U+fb02 fl original -U+fb03 uniFB03 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb04 uniFB04 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb05 uniFB05 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb06 uniFB06 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb13 uniFB13 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb14 uniFB14 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb15 uniFB15 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb16 uniFB16 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb17 uniFB17 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb1d uniFB1D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb1e uniFB1E 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb1f uniFB1F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb20 uniFB20 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb21 uniFB21 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb22 uniFB22 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb23 uniFB23 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb24 uniFB24 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb25 uniFB25 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb26 uniFB26 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb27 uniFB27 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb28 uniFB28 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb29 uniFB29 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb2a uniFB2A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2b uniFB2B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2c uniFB2C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2d uniFB2D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2e uniFB2E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2f uniFB2F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb30 uniFB30 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb31 uniFB31 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb32 uniFB32 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb33 uniFB33 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb34 uniFB34 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb35 uniFB35 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb36 uniFB36 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb37 uniFB37 2.11 (Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+fb38 uniFB38 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb39 uniFB39 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3a uniFB3A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3b uniFB3B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3c uniFB3C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3d uniFB3D 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3e uniFB3E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3f uniFB3F 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb40 uniFB40 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb41 uniFB41 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb42 uniFB42 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb43 uniFB43 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb44 uniFB44 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb45 uniFB45 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb46 uniFB46 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb47 uniFB47 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb48 uniFB48 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb49 uniFB49 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4a uniFB4A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4b uniFB4B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4c uniFB4C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4d uniFB4D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4e uniFB4E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4f uniFB4F 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb52 uniFB52 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb53 uniFB53 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb54 uniFB54 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb55 uniFB55 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb56 uniFB56 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb57 uniFB57 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb58 uniFB58 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb59 uniFB59 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5a uniFB5A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5b uniFB5B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5c uniFB5C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5d uniFB5D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5e uniFB5E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5f uniFB5F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb60 uniFB60 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb61 uniFB61 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb62 uniFB62 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb63 uniFB63 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb64 uniFB64 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb65 uniFB65 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb66 uniFB66 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb67 uniFB67 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb68 uniFB68 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb69 uniFB69 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6a uniFB6A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6b uniFB6B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6c uniFB6C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6d uniFB6D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6e uniFB6E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6f uniFB6F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb70 uniFB70 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb71 uniFB71 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb72 uniFB72 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb73 uniFB73 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb74 uniFB74 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb75 uniFB75 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb76 uniFB76 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb77 uniFB77 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb78 uniFB78 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb79 uniFB79 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7a uniFB7A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7b uniFB7B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7c uniFB7C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7d uniFB7D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7e uniFB7E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7f uniFB7F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb80 uniFB80 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb81 uniFB81 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb82 uniFB82 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb83 uniFB83 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb84 uniFB84 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb85 uniFB85 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb86 uniFB86 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb87 uniFB87 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb88 uniFB88 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb89 uniFB89 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb8a uniFB8A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8b uniFB8B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8c uniFB8C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8d uniFB8D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8e uniFB8E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8f uniFB8F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb90 uniFB90 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb91 uniFB91 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb92 uniFB92 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb93 uniFB93 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb94 uniFB94 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb95 uniFB95 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb96 uniFB96 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb97 uniFB97 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb98 uniFB98 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb99 uniFB99 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9a uniFB9A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9b uniFB9B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9c uniFB9C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9d uniFB9D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9e uniFB9E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb9f uniFB9F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fba0 uniFBA0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba1 uniFBA1 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba2 uniFBA2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba3 uniFBA3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbaa uniFBAA 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbab uniFBAB 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbac uniFBAC 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbad uniFBAD 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd3 uniFBD3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd4 uniFBD4 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd5 uniFBD5 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd6 uniFBD6 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd9 uniFBD9 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbda uniFBDA 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbe8 uniFBE8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbe9 uniFBE9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfc uniFBFC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfd uniFBFD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfe uniFBFE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbff uniFBFF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe00 uniFE00 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe01 uniFE01 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe02 uniFE02 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe03 uniFE03 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe04 uniFE04 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe05 uniFE05 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe06 uniFE06 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe07 uniFE07 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe08 uniFE08 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe09 uniFE09 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0a uniFE0A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0b uniFE0B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0c uniFE0C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0d uniFE0D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0e uniFE0E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0f uniFE0F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe20 uniFE20 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe21 uniFE21 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe22 uniFE22 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe23 uniFE23 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe70 uniFE70 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe71 uniFE71 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe72 uniFE72 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe73 uniFE73 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe74 uniFE74 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe76 uniFE76 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe77 uniFE77 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe78 uniFE78 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe79 uniFE79 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7a uniFE7A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7b uniFE7B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7c uniFE7C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7d uniFE7D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7e uniFE7E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7f uniFE7F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe80 uniFE80 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe81 uniFE81 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe82 uniFE82 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe83 uniFE83 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe84 uniFE84 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe85 uniFE85 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe86 uniFE86 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe87 uniFE87 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe88 uniFE88 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe89 uniFE89 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8a uniFE8A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8b uniFE8B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8c uniFE8C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8d uniFE8D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8e uniFE8E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8f uniFE8F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe90 uniFE90 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe91 uniFE91 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe92 uniFE92 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe93 uniFE93 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe94 uniFE94 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe95 uniFE95 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe96 uniFE96 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe97 uniFE97 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe98 uniFE98 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe99 uniFE99 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9a uniFE9A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9b uniFE9B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9c uniFE9C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9d uniFE9D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9e uniFE9E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9f uniFE9F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea0 uniFEA0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea1 uniFEA1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea2 uniFEA2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea3 uniFEA3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea4 uniFEA4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea5 uniFEA5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea6 uniFEA6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea7 uniFEA7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea8 uniFEA8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea9 uniFEA9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feaa uniFEAA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feab uniFEAB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feac uniFEAC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fead uniFEAD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feae uniFEAE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feaf uniFEAF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb0 uniFEB0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb1 uniFEB1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb2 uniFEB2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb3 uniFEB3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb4 uniFEB4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb5 uniFEB5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb6 uniFEB6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb7 uniFEB7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb8 uniFEB8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb9 uniFEB9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feba uniFEBA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febb uniFEBB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febc uniFEBC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febd uniFEBD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febe uniFEBE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febf uniFEBF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec0 uniFEC0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec1 uniFEC1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec2 uniFEC2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec3 uniFEC3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec4 uniFEC4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec5 uniFEC5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec6 uniFEC6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec7 uniFEC7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec8 uniFEC8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec9 uniFEC9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feca uniFECA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecb uniFECB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecc uniFECC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecd uniFECD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fece uniFECE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecf uniFECF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed0 uniFED0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed1 uniFED1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed2 uniFED2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed3 uniFED3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed4 uniFED4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed5 uniFED5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed6 uniFED6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed7 uniFED7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed8 uniFED8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed9 uniFED9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feda uniFEDA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedb uniFEDB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedc uniFEDC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedd uniFEDD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fede uniFEDE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedf uniFEDF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee0 uniFEE0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee1 uniFEE1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee2 uniFEE2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee3 uniFEE3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee4 uniFEE4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee5 uniFEE5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee6 uniFEE6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee7 uniFEE7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee8 uniFEE8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee9 uniFEE9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feea uniFEEA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feeb uniFEEB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feec uniFEEC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feed uniFEED 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feee uniFEEE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feef uniFEEF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef0 uniFEF0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef1 uniFEF1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef2 uniFEF2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef3 uniFEF3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef4 uniFEF4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef5 uniFEF5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef6 uniFEF6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef7 uniFEF7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef8 uniFEF8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef9 uniFEF9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefa uniFEFA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefb uniFEFB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefc uniFEFC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feff uniFEFF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fff9 uniFFF9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffa uniFFFA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffb uniFFFB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffc uniFFFC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffd uniFFFD 1.12 -U+10300 u10300 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10301 u10301 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10302 u10302 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10303 u10303 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10304 u10304 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10305 u10305 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10306 u10306 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10307 u10307 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10308 u10308 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10309 u10309 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030a u1030A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030b u1030B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030c u1030C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030d u1030D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030e u1030E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030f u1030F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10310 u10310 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10311 u10311 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10312 u10312 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10313 u10313 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10314 u10314 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10315 u10315 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10316 u10316 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10317 u10317 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10318 u10318 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10319 u10319 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031a u1031A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031b u1031B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031c u1031C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031d u1031D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031e u1031E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10320 u10320 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10321 u10321 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10322 u10322 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10323 u10323 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d300 u1D300 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d301 u1D301 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d302 u1D302 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d303 u1D303 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d304 u1D304 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d305 u1D305 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d306 u1D306 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d307 u1D307 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d308 u1D308 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d309 u1D309 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30a u1D30A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30b u1D30B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30c u1D30C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30d u1D30D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30e u1D30E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30f u1D30F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d310 u1D310 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d311 u1D311 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d312 u1D312 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d313 u1D313 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d314 u1D314 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d315 u1D315 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d316 u1D316 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d317 u1D317 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d318 u1D318 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d319 u1D319 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31a u1D31A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31b u1D31B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31c u1D31C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31d u1D31D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31e u1D31E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31f u1D31F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d320 u1D320 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d321 u1D321 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d322 u1D322 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d323 u1D323 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d324 u1D324 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d325 u1D325 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d326 u1D326 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d327 u1D327 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d328 u1D328 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d329 u1D329 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32a u1D32A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32b u1D32B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32c u1D32C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32d u1D32D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32e u1D32E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32f u1D32F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d330 u1D330 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d331 u1D331 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d332 u1D332 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d333 u1D333 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d334 u1D334 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d335 u1D335 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d336 u1D336 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d337 u1D337 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d338 u1D338 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d339 u1D339 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33a u1D33A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33b u1D33B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33c u1D33C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33d u1D33D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33e u1D33E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33f u1D33F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d340 u1D340 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d341 u1D341 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d342 u1D342 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d343 u1D343 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d344 u1D344 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d345 u1D345 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d346 u1D346 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d347 u1D347 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d348 u1D348 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d349 u1D349 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34a u1D34A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34b u1D34B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34c u1D34C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34d u1D34D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34e u1D34E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34f u1D34F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d350 u1D350 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d351 u1D351 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d352 u1D352 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d353 u1D353 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d354 u1D354 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d355 u1D355 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d356 u1D356 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d400 u1D400 2.23 (Serif Bold, Serif Condensed Bold) -U+1d401 u1D401 2.23 (Serif Bold, Serif Condensed Bold) -U+1d402 u1D402 2.23 (Serif Bold, Serif Condensed Bold) -U+1d403 u1D403 2.23 (Serif Bold, Serif Condensed Bold) -U+1d404 u1D404 2.23 (Serif Bold, Serif Condensed Bold) -U+1d405 u1D405 2.23 (Serif Bold, Serif Condensed Bold) -U+1d406 u1D406 2.23 (Serif Bold, Serif Condensed Bold) -U+1d407 u1D407 2.23 (Serif Bold, Serif Condensed Bold) -U+1d408 u1D408 2.23 (Serif Bold, Serif Condensed Bold) -U+1d409 u1D409 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40a u1D40A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40b u1D40B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40c u1D40C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40d u1D40D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40e u1D40E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40f u1D40F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d410 u1D410 2.23 (Serif Bold, Serif Condensed Bold) -U+1d411 u1D411 2.23 (Serif Bold, Serif Condensed Bold) -U+1d412 u1D412 2.23 (Serif Bold, Serif Condensed Bold) -U+1d413 u1D413 2.23 (Serif Bold, Serif Condensed Bold) -U+1d414 u1D414 2.23 (Serif Bold, Serif Condensed Bold) -U+1d415 u1D415 2.23 (Serif Bold, Serif Condensed Bold) -U+1d416 u1D416 2.23 (Serif Bold, Serif Condensed Bold) -U+1d417 u1D417 2.23 (Serif Bold, Serif Condensed Bold) -U+1d418 u1D418 2.23 (Serif Bold, Serif Condensed Bold) -U+1d419 u1D419 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41a u1D41A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41b u1D41B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41c u1D41C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41d u1D41D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41e u1D41E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41f u1D41F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d420 u1D420 2.23 (Serif Bold, Serif Condensed Bold) -U+1d421 u1D421 2.23 (Serif Bold, Serif Condensed Bold) -U+1d422 u1D422 2.23 (Serif Bold, Serif Condensed Bold) -U+1d423 u1D423 2.23 (Serif Bold, Serif Condensed Bold) -U+1d424 u1D424 2.23 (Serif Bold, Serif Condensed Bold) -U+1d425 u1D425 2.23 (Serif Bold, Serif Condensed Bold) -U+1d426 u1D426 2.23 (Serif Bold, Serif Condensed Bold) -U+1d427 u1D427 2.23 (Serif Bold, Serif Condensed Bold) -U+1d428 u1D428 2.23 (Serif Bold, Serif Condensed Bold) -U+1d429 u1D429 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42a u1D42A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42b u1D42B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42c u1D42C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42d u1D42D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42e u1D42E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42f u1D42F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d430 u1D430 2.23 (Serif Bold, Serif Condensed Bold) -U+1d431 u1D431 2.23 (Serif Bold, Serif Condensed Bold) -U+1d432 u1D432 2.23 (Serif Bold, Serif Condensed Bold) -U+1d433 u1D433 2.23 (Serif Bold, Serif Condensed Bold) -U+1d434 u1D434 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d435 u1D435 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d436 u1D436 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d437 u1D437 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d438 u1D438 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d439 u1D439 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43a u1D43A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43b u1D43B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43c u1D43C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43d u1D43D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43e u1D43E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43f u1D43F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d440 u1D440 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d441 u1D441 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d442 u1D442 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d443 u1D443 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d444 u1D444 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d445 u1D445 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d446 u1D446 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d447 u1D447 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d448 u1D448 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d449 u1D449 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44a u1D44A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44b u1D44B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44c u1D44C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44d u1D44D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44e u1D44E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44f u1D44F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d450 u1D450 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d451 u1D451 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d452 u1D452 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d453 u1D453 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d454 u1D454 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d456 u1D456 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d457 u1D457 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d458 u1D458 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d459 u1D459 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45a u1D45A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45b u1D45B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45c u1D45C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45d u1D45D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45e u1D45E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45f u1D45F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d460 u1D460 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d461 u1D461 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d462 u1D462 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d463 u1D463 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d464 u1D464 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d465 u1D465 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d466 u1D466 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d467 u1D467 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d468 u1D468 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d469 u1D469 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46a u1D46A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46b u1D46B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46c u1D46C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46d u1D46D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46e u1D46E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46f u1D46F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d470 u1D470 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d471 u1D471 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d472 u1D472 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d473 u1D473 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d474 u1D474 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d475 u1D475 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d476 u1D476 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d477 u1D477 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d478 u1D478 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d479 u1D479 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47a u1D47A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47b u1D47B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47c u1D47C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47d u1D47D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47e u1D47E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47f u1D47F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d480 u1D480 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d481 u1D481 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d482 u1D482 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d483 u1D483 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d484 u1D484 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d485 u1D485 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d486 u1D486 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d487 u1D487 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d488 u1D488 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d489 u1D489 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48a u1D48A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48b u1D48B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48c u1D48C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48d u1D48D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48e u1D48E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48f u1D48F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d490 u1D490 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d491 u1D491 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d492 u1D492 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d493 u1D493 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d494 u1D494 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d495 u1D495 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d496 u1D496 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d497 u1D497 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d498 u1D498 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d499 u1D499 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d49a u1D49A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d49b u1D49B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d538 u1D538 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d539 u1D539 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53b u1D53B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53c u1D53C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53d u1D53D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53e u1D53E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d540 u1D540 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d541 u1D541 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d542 u1D542 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d543 u1D543 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d544 u1D544 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d546 u1D546 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54a u1D54A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54b u1D54B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54c u1D54C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54d u1D54D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54e u1D54E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54f u1D54F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d550 u1D550 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d552 u1D552 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d553 u1D553 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d554 u1D554 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d555 u1D555 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d556 u1D556 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d557 u1D557 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d558 u1D558 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d559 u1D559 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55a u1D55A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55b u1D55B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55c u1D55C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55d u1D55D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55e u1D55E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55f u1D55F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d560 u1D560 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d561 u1D561 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d562 u1D562 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d563 u1D563 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d564 u1D564 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d565 u1D565 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d566 u1D566 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d567 u1D567 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d568 u1D568 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d569 u1D569 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d56a u1D56A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d56b u1D56B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d5a0 u1D5A0 2.23 (Sans, Sans Condensed) -U+1d5a1 u1D5A1 2.23 (Sans, Sans Condensed) -U+1d5a2 u1D5A2 2.23 (Sans, Sans Condensed) -U+1d5a3 u1D5A3 2.23 (Sans, Sans Condensed) -U+1d5a4 u1D5A4 2.23 (Sans, Sans Condensed) -U+1d5a5 u1D5A5 2.23 (Sans, Sans Condensed) -U+1d5a6 u1D5A6 2.23 (Sans, Sans Condensed) -U+1d5a7 u1D5A7 2.23 (Sans, Sans Condensed) -U+1d5a8 u1D5A8 2.23 (Sans, Sans Condensed) -U+1d5a9 u1D5A9 2.23 (Sans, Sans Condensed) -U+1d5aa u1D5AA 2.23 (Sans, Sans Condensed) -U+1d5ab u1D5AB 2.23 (Sans, Sans Condensed) -U+1d5ac u1D5AC 2.23 (Sans, Sans Condensed) -U+1d5ad u1D5AD 2.23 (Sans, Sans Condensed) -U+1d5ae u1D5AE 2.23 (Sans, Sans Condensed) -U+1d5af u1D5AF 2.23 (Sans, Sans Condensed) -U+1d5b0 u1D5B0 2.23 (Sans, Sans Condensed) -U+1d5b1 u1D5B1 2.23 (Sans, Sans Condensed) -U+1d5b2 u1D5B2 2.23 (Sans, Sans Condensed) -U+1d5b3 u1D5B3 2.23 (Sans, Sans Condensed) -U+1d5b4 u1D5B4 2.23 (Sans, Sans Condensed) -U+1d5b5 u1D5B5 2.23 (Sans, Sans Condensed) -U+1d5b6 u1D5B6 2.23 (Sans, Sans Condensed) -U+1d5b7 u1D5B7 2.23 (Sans, Sans Condensed) -U+1d5b8 u1D5B8 2.23 (Sans, Sans Condensed) -U+1d5b9 u1D5B9 2.23 (Sans, Sans Condensed) -U+1d5ba u1D5BA 2.23 (Sans, Sans Condensed) -U+1d5bb u1D5BB 2.23 (Sans, Sans Condensed) -U+1d5bc u1D5BC 2.23 (Sans, Sans Condensed) -U+1d5bd u1D5BD 2.23 (Sans, Sans Condensed) -U+1d5be u1D5BE 2.23 (Sans, Sans Condensed) -U+1d5bf u1D5BF 2.23 (Sans, Sans Condensed) -U+1d5c0 u1D5C0 2.23 (Sans, Sans Condensed) -U+1d5c1 u1D5C1 2.23 (Sans, Sans Condensed) -U+1d5c2 u1D5C2 2.23 (Sans, Sans Condensed) -U+1d5c3 u1D5C3 2.23 (Sans, Sans Condensed) -U+1d5c4 u1D5C4 2.23 (Sans, Sans Condensed) -U+1d5c5 u1D5C5 2.23 (Sans, Sans Condensed) -U+1d5c6 u1D5C6 2.23 (Sans, Sans Condensed) -U+1d5c7 u1D5C7 2.23 (Sans, Sans Condensed) -U+1d5c8 u1D5C8 2.23 (Sans, Sans Condensed) -U+1d5c9 u1D5C9 2.23 (Sans, Sans Condensed) -U+1d5ca u1D5CA 2.23 (Sans, Sans Condensed) -U+1d5cb u1D5CB 2.23 (Sans, Sans Condensed) -U+1d5cc u1D5CC 2.23 (Sans, Sans Condensed) -U+1d5cd u1D5CD 2.23 (Sans, Sans Condensed) -U+1d5ce u1D5CE 2.23 (Sans, Sans Condensed) -U+1d5cf u1D5CF 2.23 (Sans, Sans Condensed) -U+1d5d0 u1D5D0 2.23 (Sans, Sans Condensed) -U+1d5d1 u1D5D1 2.23 (Sans, Sans Condensed) -U+1d5d2 u1D5D2 2.23 (Sans, Sans Condensed) -U+1d5d3 u1D5D3 2.23 (Sans, Sans Condensed) -U+1d5d4 u1D5D4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d5 u1D5D5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d6 u1D5D6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d7 u1D5D7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d8 u1D5D8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d9 u1D5D9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5da u1D5DA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5db u1D5DB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5dc u1D5DC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5dd u1D5DD 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5de u1D5DE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5df u1D5DF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e0 u1D5E0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e1 u1D5E1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e2 u1D5E2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e3 u1D5E3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e4 u1D5E4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e5 u1D5E5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e6 u1D5E6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e7 u1D5E7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e8 u1D5E8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e9 u1D5E9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ea u1D5EA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5eb u1D5EB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ec u1D5EC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ed u1D5ED 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ee u1D5EE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ef u1D5EF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f0 u1D5F0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f1 u1D5F1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f2 u1D5F2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f3 u1D5F3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f4 u1D5F4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f5 u1D5F5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f6 u1D5F6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f7 u1D5F7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f8 u1D5F8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f9 u1D5F9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fa u1D5FA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fb u1D5FB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fc u1D5FC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fd u1D5FD 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fe u1D5FE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ff u1D5FF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d600 u1D600 2.23 (Sans Bold, Sans Condensed Bold) -U+1d601 u1D601 2.23 (Sans Bold, Sans Condensed Bold) -U+1d602 u1D602 2.23 (Sans Bold, Sans Condensed Bold) -U+1d603 u1D603 2.23 (Sans Bold, Sans Condensed Bold) -U+1d604 u1D604 2.23 (Sans Bold, Sans Condensed Bold) -U+1d605 u1D605 2.23 (Sans Bold, Sans Condensed Bold) -U+1d606 u1D606 2.23 (Sans Bold, Sans Condensed Bold) -U+1d607 u1D607 2.23 (Sans Bold, Sans Condensed Bold) -U+1d608 u1D608 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d609 u1D609 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60a u1D60A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60b u1D60B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60c u1D60C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60d u1D60D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60e u1D60E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60f u1D60F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d610 u1D610 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d611 u1D611 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d612 u1D612 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d613 u1D613 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d614 u1D614 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d615 u1D615 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d616 u1D616 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d617 u1D617 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d618 u1D618 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d619 u1D619 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61a u1D61A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61b u1D61B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61c u1D61C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61d u1D61D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61e u1D61E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61f u1D61F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d620 u1D620 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d621 u1D621 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d622 u1D622 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d623 u1D623 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d624 u1D624 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d625 u1D625 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d626 u1D626 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d627 u1D627 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d628 u1D628 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d629 u1D629 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62a u1D62A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62b u1D62B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62c u1D62C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62d u1D62D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62e u1D62E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62f u1D62F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d630 u1D630 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d631 u1D631 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d632 u1D632 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d633 u1D633 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d634 u1D634 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d635 u1D635 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d636 u1D636 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d637 u1D637 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d638 u1D638 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d639 u1D639 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63a u1D63A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63b u1D63B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63c u1D63C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63d u1D63D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63e u1D63E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63f u1D63F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d640 u1D640 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d641 u1D641 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d642 u1D642 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d643 u1D643 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d644 u1D644 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d645 u1D645 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d646 u1D646 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d647 u1D647 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d648 u1D648 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d649 u1D649 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64a u1D64A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64b u1D64B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64c u1D64C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64d u1D64D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64e u1D64E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64f u1D64F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d650 u1D650 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d651 u1D651 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d652 u1D652 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d653 u1D653 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d654 u1D654 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d655 u1D655 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d656 u1D656 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d657 u1D657 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d658 u1D658 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d659 u1D659 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65a u1D65A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65b u1D65B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65c u1D65C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65d u1D65D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65e u1D65E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65f u1D65F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d660 u1D660 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d661 u1D661 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d662 u1D662 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d663 u1D663 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d664 u1D664 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d665 u1D665 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d666 u1D666 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d667 u1D667 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d668 u1D668 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d669 u1D669 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66a u1D66A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66b u1D66B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66c u1D66C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66d u1D66D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66e u1D66E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66f u1D66F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d670 u1D670 2.23 (Sans Mono) -U+1d671 u1D671 2.23 (Sans Mono) -U+1d672 u1D672 2.23 (Sans Mono) -U+1d673 u1D673 2.23 (Sans Mono) -U+1d674 u1D674 2.23 (Sans Mono) -U+1d675 u1D675 2.23 (Sans Mono) -U+1d676 u1D676 2.23 (Sans Mono) -U+1d677 u1D677 2.23 (Sans Mono) -U+1d678 u1D678 2.23 (Sans Mono) -U+1d679 u1D679 2.23 (Sans Mono) -U+1d67a u1D67A 2.23 (Sans Mono) -U+1d67b u1D67B 2.23 (Sans Mono) -U+1d67c u1D67C 2.23 (Sans Mono) -U+1d67d u1D67D 2.23 (Sans Mono) -U+1d67e u1D67E 2.23 (Sans Mono) -U+1d67f u1D67F 2.23 (Sans Mono) -U+1d680 u1D680 2.23 (Sans Mono) -U+1d681 u1D681 2.23 (Sans Mono) -U+1d682 u1D682 2.23 (Sans Mono) -U+1d683 u1D683 2.23 (Sans Mono) -U+1d684 u1D684 2.23 (Sans Mono) -U+1d685 u1D685 2.23 (Sans Mono) -U+1d686 u1D686 2.23 (Sans Mono) -U+1d687 u1D687 2.23 (Sans Mono) -U+1d688 u1D688 2.23 (Sans Mono) -U+1d689 u1D689 2.23 (Sans Mono) -U+1d68a u1D68A 2.23 (Sans Mono) -U+1d68b u1D68B 2.23 (Sans Mono) -U+1d68c u1D68C 2.23 (Sans Mono) -U+1d68d u1D68D 2.23 (Sans Mono) -U+1d68e u1D68E 2.23 (Sans Mono) -U+1d68f u1D68F 2.23 (Sans Mono) -U+1d690 u1D690 2.23 (Sans Mono) -U+1d691 u1D691 2.23 (Sans Mono) -U+1d692 u1D692 2.23 (Sans Mono) -U+1d693 u1D693 2.23 (Sans Mono) -U+1d694 u1D694 2.23 (Sans Mono) -U+1d695 u1D695 2.23 (Sans Mono) -U+1d696 u1D696 2.23 (Sans Mono) -U+1d697 u1D697 2.23 (Sans Mono) -U+1d698 u1D698 2.23 (Sans Mono) -U+1d699 u1D699 2.23 (Sans Mono) -U+1d69a u1D69A 2.23 (Sans Mono) -U+1d69b u1D69B 2.23 (Sans Mono) -U+1d69c u1D69C 2.23 (Sans Mono) -U+1d69d u1D69D 2.23 (Sans Mono) -U+1d69e u1D69E 2.23 (Sans Mono) -U+1d69f u1D69F 2.23 (Sans Mono) -U+1d6a0 u1D6A0 2.23 (Sans Mono) -U+1d6a1 u1D6A1 2.23 (Sans Mono) -U+1d6a2 u1D6A2 2.23 (Sans Mono) -U+1d6a3 u1D6A3 2.23 (Sans Mono) -U+1d6a4 u1D6A4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6a5 u1D6A5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6a8 u1D6A8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6a9 u1D6A9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6aa u1D6AA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ab u1D6AB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ac u1D6AC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ad u1D6AD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ae u1D6AE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6af u1D6AF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b0 u1D6B0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b1 u1D6B1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b2 u1D6B2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b3 u1D6B3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b4 u1D6B4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b5 u1D6B5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b6 u1D6B6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b7 u1D6B7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b8 u1D6B8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b9 u1D6B9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ba u1D6BA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bb u1D6BB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bc u1D6BC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bd u1D6BD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6be u1D6BE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bf u1D6BF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c0 u1D6C0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c1 u1D6C1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c2 u1D6C2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c3 u1D6C3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c4 u1D6C4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c5 u1D6C5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c6 u1D6C6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c7 u1D6C7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c8 u1D6C8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c9 u1D6C9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ca u1D6CA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cb u1D6CB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cc u1D6CC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cd u1D6CD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ce u1D6CE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cf u1D6CF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d0 u1D6D0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d1 u1D6D1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d2 u1D6D2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d3 u1D6D3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d4 u1D6D4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d5 u1D6D5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d6 u1D6D6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d7 u1D6D7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d8 u1D6D8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d9 u1D6D9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6da u1D6DA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6db u1D6DB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6dc u1D6DC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6dd u1D6DD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6de u1D6DE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6df u1D6DF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e0 u1D6E0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e1 u1D6E1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e2 u1D6E2 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e3 u1D6E3 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e4 u1D6E4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e5 u1D6E5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e6 u1D6E6 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e7 u1D6E7 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e8 u1D6E8 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e9 u1D6E9 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ea u1D6EA 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6eb u1D6EB 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ec u1D6EC 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ed u1D6ED 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ee u1D6EE 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ef u1D6EF 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f0 u1D6F0 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f1 u1D6F1 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f2 u1D6F2 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f3 u1D6F3 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f4 u1D6F4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f5 u1D6F5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f6 u1D6F6 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f7 u1D6F7 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f8 u1D6F8 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f9 u1D6F9 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fa u1D6FA 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fb u1D6FB 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fc u1D6FC 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fd u1D6FD 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fe u1D6FE 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ff u1D6FF 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d700 u1D700 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d701 u1D701 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d702 u1D702 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d703 u1D703 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d704 u1D704 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d705 u1D705 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d706 u1D706 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d707 u1D707 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d708 u1D708 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d709 u1D709 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70a u1D70A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70b u1D70B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70c u1D70C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70d u1D70D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70e u1D70E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70f u1D70F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d710 u1D710 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d711 u1D711 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d712 u1D712 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d713 u1D713 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d714 u1D714 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d715 u1D715 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d716 u1D716 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d717 u1D717 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d718 u1D718 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d719 u1D719 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71a u1D71A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71b u1D71B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71c u1D71C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71d u1D71D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71e u1D71E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71f u1D71F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d720 u1D720 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d721 u1D721 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d722 u1D722 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d723 u1D723 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d724 u1D724 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d725 u1D725 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d726 u1D726 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d727 u1D727 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d728 u1D728 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d729 u1D729 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72a u1D72A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72b u1D72B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72c u1D72C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72d u1D72D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72e u1D72E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72f u1D72F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d730 u1D730 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d731 u1D731 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d732 u1D732 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d733 u1D733 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d734 u1D734 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d735 u1D735 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d736 u1D736 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d737 u1D737 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d738 u1D738 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d739 u1D739 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73a u1D73A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73b u1D73B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73c u1D73C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73d u1D73D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73e u1D73E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73f u1D73F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d740 u1D740 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d741 u1D741 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d742 u1D742 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d743 u1D743 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d744 u1D744 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d745 u1D745 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d746 u1D746 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d747 u1D747 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d748 u1D748 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d749 u1D749 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74a u1D74A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74b u1D74B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74c u1D74C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74d u1D74D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74e u1D74E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74f u1D74F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d750 u1D750 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d751 u1D751 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d752 u1D752 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d753 u1D753 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d754 u1D754 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d755 u1D755 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d756 u1D756 2.23 (Sans Bold, Sans Condensed Bold) -U+1d757 u1D757 2.23 (Sans Bold, Sans Condensed Bold) -U+1d758 u1D758 2.23 (Sans Bold, Sans Condensed Bold) -U+1d759 u1D759 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75a u1D75A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75b u1D75B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75c u1D75C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75d u1D75D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75e u1D75E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75f u1D75F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d760 u1D760 2.23 (Sans Bold, Sans Condensed Bold) -U+1d761 u1D761 2.23 (Sans Bold, Sans Condensed Bold) -U+1d762 u1D762 2.23 (Sans Bold, Sans Condensed Bold) -U+1d763 u1D763 2.23 (Sans Bold, Sans Condensed Bold) -U+1d764 u1D764 2.23 (Sans Bold, Sans Condensed Bold) -U+1d765 u1D765 2.23 (Sans Bold, Sans Condensed Bold) -U+1d766 u1D766 2.23 (Sans Bold, Sans Condensed Bold) -U+1d767 u1D767 2.23 (Sans Bold, Sans Condensed Bold) -U+1d768 u1D768 2.23 (Sans Bold, Sans Condensed Bold) -U+1d769 u1D769 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76a u1D76A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76b u1D76B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76c u1D76C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76d u1D76D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76e u1D76E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76f u1D76F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d770 u1D770 2.23 (Sans Bold, Sans Condensed Bold) -U+1d771 u1D771 2.23 (Sans Bold, Sans Condensed Bold) -U+1d772 u1D772 2.23 (Sans Bold, Sans Condensed Bold) -U+1d773 u1D773 2.23 (Sans Bold, Sans Condensed Bold) -U+1d774 u1D774 2.23 (Sans Bold, Sans Condensed Bold) -U+1d775 u1D775 2.23 (Sans Bold, Sans Condensed Bold) -U+1d776 u1D776 2.23 (Sans Bold, Sans Condensed Bold) -U+1d777 u1D777 2.23 (Sans Bold, Sans Condensed Bold) -U+1d778 u1D778 2.23 (Sans Bold, Sans Condensed Bold) -U+1d779 u1D779 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77a u1D77A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77b u1D77B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77c u1D77C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77d u1D77D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77e u1D77E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77f u1D77F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d780 u1D780 2.23 (Sans Bold, Sans Condensed Bold) -U+1d781 u1D781 2.23 (Sans Bold, Sans Condensed Bold) -U+1d782 u1D782 2.23 (Sans Bold, Sans Condensed Bold) -U+1d783 u1D783 2.23 (Sans Bold, Sans Condensed Bold) -U+1d784 u1D784 2.23 (Sans Bold, Sans Condensed Bold) -U+1d785 u1D785 2.23 (Sans Bold, Sans Condensed Bold) -U+1d786 u1D786 2.23 (Sans Bold, Sans Condensed Bold) -U+1d787 u1D787 2.23 (Sans Bold, Sans Condensed Bold) -U+1d788 u1D788 2.23 (Sans Bold, Sans Condensed Bold) -U+1d789 u1D789 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78a u1D78A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78b u1D78B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78c u1D78C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78d u1D78D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78e u1D78E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78f u1D78F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d790 u1D790 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d791 u1D791 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d792 u1D792 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d793 u1D793 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d794 u1D794 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d795 u1D795 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d796 u1D796 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d797 u1D797 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d798 u1D798 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d799 u1D799 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79a u1D79A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79b u1D79B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79c u1D79C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79d u1D79D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79e u1D79E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79f u1D79F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a0 u1D7A0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a1 u1D7A1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a2 u1D7A2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a3 u1D7A3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a4 u1D7A4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a5 u1D7A5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a6 u1D7A6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a7 u1D7A7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a8 u1D7A8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a9 u1D7A9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7aa u1D7AA 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ab u1D7AB 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ac u1D7AC 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ad u1D7AD 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ae u1D7AE 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7af u1D7AF 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b0 u1D7B0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b1 u1D7B1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b2 u1D7B2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b3 u1D7B3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b4 u1D7B4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b5 u1D7B5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b6 u1D7B6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b7 u1D7B7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b8 u1D7B8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b9 u1D7B9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ba u1D7BA 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bb u1D7BB 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bc u1D7BC 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bd u1D7BD 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7be u1D7BE 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bf u1D7BF 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c0 u1D7C0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c1 u1D7C1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c2 u1D7C2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c3 u1D7C3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c4 u1D7C4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c5 u1D7C5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c6 u1D7C6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c7 u1D7C7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c8 u1D7C8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c9 u1D7C9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ca u1D7CA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7cb u1D7CB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7ce u1D7CE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7cf u1D7CF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d0 u1D7D0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d1 u1D7D1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d2 u1D7D2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d3 u1D7D3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d4 u1D7D4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d5 u1D7D5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d6 u1D7D6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d7 u1D7D7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d8 u1D7D8 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7d9 u1D7D9 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7da u1D7DA 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7db u1D7DB 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7dc u1D7DC 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7dd u1D7DD 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7de u1D7DE 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7df u1D7DF 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e0 u1D7E0 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e1 u1D7E1 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e2 u1D7E2 2.23 (Sans, Sans Condensed) -U+1d7e3 u1D7E3 2.23 (Sans, Sans Condensed) -U+1d7e4 u1D7E4 2.23 (Sans, Sans Condensed) -U+1d7e5 u1D7E5 2.23 (Sans, Sans Condensed) -U+1d7e6 u1D7E6 2.23 (Sans, Sans Condensed) -U+1d7e7 u1D7E7 2.23 (Sans, Sans Condensed) -U+1d7e8 u1D7E8 2.23 (Sans, Sans Condensed) -U+1d7e9 u1D7E9 2.23 (Sans, Sans Condensed) -U+1d7ea u1D7EA 2.23 (Sans, Sans Condensed) -U+1d7eb u1D7EB 2.23 (Sans, Sans Condensed) -U+1d7ec u1D7EC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ed u1D7ED 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ee u1D7EE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ef u1D7EF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f0 u1D7F0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f1 u1D7F1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f2 u1D7F2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f3 u1D7F3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f4 u1D7F4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f5 u1D7F5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f6 u1D7F6 2.23 (Sans Mono) -U+1d7f7 u1D7F7 2.23 (Sans Mono) -U+1d7f8 u1D7F8 2.23 (Sans Mono) -U+1d7f9 u1D7F9 2.23 (Sans Mono) -U+1d7fa u1D7FA 2.23 (Sans Mono) -U+1d7fb u1D7FB 2.23 (Sans Mono) -U+1d7fc u1D7FC 2.23 (Sans Mono) -U+1d7fd u1D7FD 2.23 (Sans Mono) -U+1d7fe u1D7FE 2.23 (Sans Mono) -U+1d7ff u1D7FF 2.23 (Sans Mono) -U+1f030 u1F030 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f031 u1F031 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f032 u1F032 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f033 u1F033 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f034 u1F034 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f035 u1F035 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f036 u1F036 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f037 u1F037 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f038 u1F038 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f039 u1F039 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03a u1F03A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03b u1F03B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03c u1F03C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03d u1F03D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03e u1F03E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03f u1F03F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f040 u1F040 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f041 u1F041 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f042 u1F042 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f043 u1F043 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f044 u1F044 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f045 u1F045 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f046 u1F046 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f047 u1F047 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f048 u1F048 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f049 u1F049 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04a u1F04A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04b u1F04B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04c u1F04C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04d u1F04D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04e u1F04E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04f u1F04F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f050 u1F050 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f051 u1F051 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f052 u1F052 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f053 u1F053 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f054 u1F054 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f055 u1F055 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f056 u1F056 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f057 u1F057 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f058 u1F058 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f059 u1F059 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05a u1F05A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05b u1F05B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05c u1F05C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05d u1F05D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05e u1F05E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05f u1F05F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f060 u1F060 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f061 u1F061 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f062 u1F062 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f063 u1F063 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f064 u1F064 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f065 u1F065 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f066 u1F066 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f067 u1F067 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f068 u1F068 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f069 u1F069 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06a u1F06A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06b u1F06B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06c u1F06C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06d u1F06D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06e u1F06E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06f u1F06F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f070 u1F070 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f071 u1F071 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f072 u1F072 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f073 u1F073 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f074 u1F074 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f075 u1F075 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f076 u1F076 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f077 u1F077 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f078 u1F078 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f079 u1F079 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07a u1F07A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07b u1F07B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07c u1F07C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07d u1F07D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07e u1F07E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07f u1F07F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f080 u1F080 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f081 u1F081 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f082 u1F082 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f083 u1F083 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f084 u1F084 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f085 u1F085 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f086 u1F086 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f087 u1F087 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f088 u1F088 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f089 u1F089 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08a u1F08A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08b u1F08B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08c u1F08C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08d u1F08D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08e u1F08E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08f u1F08F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f090 u1F090 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f091 u1F091 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f092 u1F092 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f093 u1F093 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a0 u1F0A0 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a1 u1F0A1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a2 u1F0A2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a3 u1F0A3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a4 u1F0A4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a5 u1F0A5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a6 u1F0A6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a7 u1F0A7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a8 u1F0A8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a9 u1F0A9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0aa u1F0AA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ab u1F0AB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ac u1F0AC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ad u1F0AD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ae u1F0AE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b1 u1F0B1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b2 u1F0B2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b3 u1F0B3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b4 u1F0B4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b5 u1F0B5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b6 u1F0B6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b7 u1F0B7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b8 u1F0B8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b9 u1F0B9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ba u1F0BA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bb u1F0BB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bc u1F0BC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bd u1F0BD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0be u1F0BE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c1 u1F0C1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c2 u1F0C2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c3 u1F0C3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c4 u1F0C4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c5 u1F0C5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c6 u1F0C6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c7 u1F0C7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c8 u1F0C8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c9 u1F0C9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ca u1F0CA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cb u1F0CB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cc u1F0CC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cd u1F0CD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ce u1F0CE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cf u1F0CF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d1 u1F0D1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d2 u1F0D2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d3 u1F0D3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d4 u1F0D4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d5 u1F0D5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d6 u1F0D6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d7 u1F0D7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d8 u1F0D8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d9 u1F0D9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0da u1F0DA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0db u1F0DB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0dc u1F0DC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0dd u1F0DD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0de u1F0DE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0df u1F0DF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f42d u1F42D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f42e u1F42E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f431 u1F431 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f435 u1F435 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f601 u1F601 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f602 u1F602 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f603 u1F603 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f604 u1F604 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f605 u1F605 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f606 u1F606 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f607 u1F607 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f608 u1F608 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f609 u1F609 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60a u1F60A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60b u1F60B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60c u1F60C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60d u1F60D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60e u1F60E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60f u1F60F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f610 u1F610 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f612 u1F612 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f613 u1F613 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f614 u1F614 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f616 u1F616 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f618 u1F618 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61a u1F61A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61c u1F61C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61d u1F61D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61e u1F61E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f620 u1F620 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f621 u1F621 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f622 u1F622 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f623 u1F623 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f625 u1F625 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f628 u1F628 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f629 u1F629 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62a u1F62A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62b u1F62B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62d u1F62D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f630 u1F630 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f631 u1F631 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f632 u1F632 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f633 u1F633 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f635 u1F635 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f636 u1F636 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f637 u1F637 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f638 u1F638 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f639 u1F639 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63a u1F63A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63b u1F63B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63c u1F63C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63d u1F63D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63e u1F63E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63f u1F63F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f640 u1F640 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/unicover.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/unicover.txt deleted file mode 100644 index 42c212253f8..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.33/unicover.txt +++ /dev/null @@ -1,215 +0,0 @@ -This is the Unicode coverage file for DejaVu fonts -($Id$) - -Control and similar characters are discounted from totals. - - Sans Serif Sans Mono -U+0000 Basic Latin 100% (95/95) 100% (95/95) 100% (95/95) -U+0080 Latin-1 Supplement 100% (96/96) 100% (96/96) 100% (96/96) -U+0100 Latin Extended-A 100% (128/128) 100% (128/128) 100% (128/128) -U+0180 Latin Extended-B 100% (208/208) 100% (208/208) 86% (180/208) -U+0250 IPA Extensions 100% (96/96) 100% (96/96) 100% (96/96) -U+02b0 Spacing Modifier Letters 78% (63/80) 57% (46/80) 60% (48/80) -U+0300 Combining Diacritical Marks 83% (93/112) 60% (68/112) 59% (67/112) -U+0370 Greek and Coptic 100% (134/134) 89% (120/134) 82% (110/134) -U+0400 Cyrillic 100% (256/256) 78% (200/256) 70% (180/256) -U+0500 Cyrillic Supplement 95% (38/40) 25% (10/40) 15% (6/40) -U+0530 Armenian 100% (86/86) 100% (86/86) 100% (86/86) -U+0590 Hebrew 62% (54/87) (0/87) (0/87) -U+0600 Arabic 63% (161/252) (0/252) 39% (99/252) -U+0700 Syriac (0/77) (0/77) (0/77) -U+0750 Arabic Supplement (0/48) (0/48) (0/48) -U+0780 Thaana (0/50) (0/50) (0/50) -U+07c0 NKo 91% (54/59) (0/59) (0/59) -U+0800 Samaritan (0/61) (0/61) (0/61) -U+0840 Mandaic (0/29) (0/29) (0/29) -U+0900 Devanagari (0/127) (0/127) (0/127) -U+0980 Bengali (0/92) (0/92) (0/92) -U+0a00 Gurmukhi (0/79) (0/79) (0/79) -U+0a80 Gujarati (0/83) (0/83) (0/83) -U+0b00 Oriya (0/90) (0/90) (0/90) -U+0b80 Tamil (0/72) (0/72) (0/72) -U+0c00 Telugu (0/93) (0/93) (0/93) -U+0c80 Kannada (0/86) (0/86) (0/86) -U+0d00 Malayalam (0/98) (0/98) (0/98) -U+0d80 Sinhala (0/80) (0/80) (0/80) -U+0e00 Thai 1% (1/87) (0/87) (0/87) -U+0e80 Lao 100% (65/65) (0/65) 70% (46/65) -U+0f00 Tibetan (0/211) (0/211) (0/211) -U+1000 Myanmar (0/160) (0/160) (0/160) -U+10a0 Georgian 100% (83/83) 100% (83/83) 54% (45/83) -U+1100 Hangul Jamo (0/256) (0/256) (0/256) -U+1200 Ethiopic (0/358) (0/358) (0/358) -U+1380 Ethiopic Supplement (0/26) (0/26) (0/26) -U+13a0 Cherokee (0/85) (0/85) (0/85) -U+1400 Unified Canadian Aboriginal Syllabics 63% (404/640) (0/640) (0/640) -U+1680 Ogham 100% (29/29) (0/29) (0/29) -U+16a0 Runic (0/81) (0/81) (0/81) -U+1700 Tagalog (0/20) (0/20) (0/20) -U+1720 Hanunoo (0/23) (0/23) (0/23) -U+1740 Buhid (0/20) (0/20) (0/20) -U+1760 Tagbanwa (0/18) (0/18) (0/18) -U+1780 Khmer (0/114) (0/114) (0/114) -U+1800 Mongolian (0/156) (0/156) (0/156) -U+18b0 Unified Canadian Aboriginal Syllabics Extended (0/70) (0/70) (0/70) -U+1900 Limbu (0/66) (0/66) (0/66) -U+1950 Tai Le (0/35) (0/35) (0/35) -U+1980 New Tai Lue (0/83) (0/83) (0/83) -U+19e0 Khmer Symbols (0/32) (0/32) (0/32) -U+1a00 Buginese (0/30) (0/30) (0/30) -U+1a20 Tai Tham (0/127) (0/127) (0/127) -U+1b00 Balinese (0/121) (0/121) (0/121) -U+1b80 Sundanese (0/55) (0/55) (0/55) -U+1bc0 Batak (0/56) (0/56) (0/56) -U+1c00 Lepcha (0/74) (0/74) (0/74) -U+1c50 Ol Chiki (0/48) (0/48) (0/48) -U+1cd0 Vedic Extensions (0/35) (0/35) (0/35) -U+1d00 Phonetic Extensions 82% (106/128) 86% (111/128) 48% (62/128) -U+1d80 Phonetic Extensions Supplement 59% (38/64) 59% (38/64) 57% (37/64) -U+1dc0 Combining Diacritical Marks Supplement 13% (6/43) 13% (6/43) (0/43) -U+1e00 Latin Extended Additional 98% (252/256) 98% (252/256) 71% (182/256) -U+1f00 Greek Extended 100% (233/233) 100% (233/233) 100% (233/233) -U+2000 General Punctuation 100% (107/107) 81% (87/107) 48% (52/107) -U+2070 Superscripts and Subscripts 100% (42/42) 100% (42/42) 100% (42/42) -U+20a0 Currency Symbols 92% (24/26) 26% (7/26) 92% (24/26) -U+20d0 Combining Diacritical Marks for Symbols 21% (7/33) (0/33) (0/33) -U+2100 Letterlike Symbols 93% (75/80) 40% (32/80) 21% (17/80) -U+2150 Number Forms 94% (55/58) 94% (55/58) 22% (13/58) -U+2190 Arrows 100% (112/112) 100% (112/112) 100% (112/112) -U+2200 Mathematical Operators 100% (256/256) 39% (100/256) 62% (159/256) -U+2300 Miscellaneous Technical 26% (65/244) 14% (35/244) 47% (117/244) -U+2400 Control Pictures 5% (2/39) 2% (1/39) 2% (1/39) -U+2440 Optical Character Recognition (0/11) (0/11) (0/11) -U+2460 Enclosed Alphanumerics 6% (10/160) (0/160) (0/160) -U+2500 Box Drawing 100% (128/128) 100% (128/128) 100% (128/128) -U+2580 Block Elements 100% (32/32) 100% (32/32) 100% (32/32) -U+25a0 Geometric Shapes 100% (96/96) 100% (96/96) 100% (96/96) -U+2600 Miscellaneous Symbols 73% (187/256) 11% (30/256) 58% (149/256) -U+2700 Dingbats 91% (174/191) 0% (1/191) 75% (144/191) -U+27c0 Miscellaneous Mathematical Symbols-A 19% (9/46) 10% (5/46) 10% (5/46) -U+27f0 Supplemental Arrows-A 100% (16/16) 100% (16/16) (0/16) -U+2800 Braille Patterns 100% (256/256) 100% (256/256) (0/256) -U+2900 Supplemental Arrows-B 4% (6/128) 100% (128/128) (0/128) -U+2980 Miscellaneous Mathematical Symbols-B 10% (13/128) 0% (1/128) 2% (3/128) -U+2a00 Supplemental Mathematical Operators 28% (72/256) 1% (4/256) 0% (1/256) -U+2b00 Miscellaneous Symbols and Arrows 40% (35/87) 31% (27/87) 10% (9/87) -U+2c00 Glagolitic (0/94) (0/94) (0/94) -U+2c60 Latin Extended-C 96% (31/32) 81% (26/32) 43% (14/32) -U+2c80 Coptic (0/121) (0/121) (0/121) -U+2d00 Georgian Supplement (0/38) 100% (38/38) (0/38) -U+2d30 Tifinagh 96% (55/57) (0/57) (0/57) -U+2d80 Ethiopic Extended (0/79) (0/79) (0/79) -U+2de0 Cyrillic Extended-A (0/32) (0/32) (0/32) -U+2e00 Supplemental Punctuation 12% (6/50) 12% (6/50) 12% (6/50) -U+2e80 CJK Radicals Supplement (0/115) (0/115) (0/115) -U+2f00 Kangxi Radicals (0/214) (0/214) (0/214) -U+2ff0 Ideographic Description Characters (0/12) (0/12) (0/12) -U+3000 CJK Symbols and Punctuation (0/64) (0/64) (0/64) -U+3040 Hiragana (0/93) (0/93) (0/93) -U+30a0 Katakana (0/96) (0/96) (0/96) -U+3100 Bopomofo (0/41) (0/41) (0/41) -U+3130 Hangul Compatibility Jamo (0/94) (0/94) (0/94) -U+3190 Kanbun (0/16) (0/16) (0/16) -U+31a0 Bopomofo Extended (0/27) (0/27) (0/27) -U+31c0 CJK Strokes (0/36) (0/36) (0/36) -U+31f0 Katakana Phonetic Extensions (0/16) (0/16) (0/16) -U+3200 Enclosed CJK Letters and Months (0/254) (0/254) (0/254) -U+3300 CJK Compatibility (0/256) (0/256) (0/256) -U+3400 CJK Unified Ideographs Extension A (0/0) (0/0) (0/0) -U+4dc0 Yijing Hexagram Symbols 100% (64/64) (0/64) (0/64) -U+4e00 CJK Unified Ideographs (0/0) (0/0) (0/0) -U+a000 Yi Syllables (0/1165) (0/1165) (0/1165) -U+a490 Yi Radicals (0/55) (0/55) (0/55) -U+a4d0 Lisu (0/48) (0/48) (0/48) -U+a500 Vai (0/300) (0/300) (0/300) -U+a640 Cyrillic Extended-B 38% (31/80) 12% (10/80) (0/80) -U+a6a0 Bamum (0/88) (0/88) (0/88) -U+a700 Modifier Tone Letters 62% (20/32) 62% (20/32) 62% (20/32) -U+a720 Latin Extended-D 48% (62/129) 42% (55/129) 10% (14/129) -U+a800 Syloti Nagri (0/44) (0/44) (0/44) -U+a830 Common Indic Number Forms (0/10) (0/10) (0/10) -U+a840 Phags-pa (0/56) (0/56) (0/56) -U+a880 Saurashtra (0/81) (0/81) (0/81) -U+a8e0 Devanagari Extended (0/28) (0/28) (0/28) -U+a900 Kayah Li (0/48) (0/48) (0/48) -U+a930 Rejang (0/37) (0/37) (0/37) -U+a960 Hangul Jamo Extended-A (0/29) (0/29) (0/29) -U+a980 Javanese (0/91) (0/91) (0/91) -U+aa00 Cham (0/83) (0/83) (0/83) -U+aa60 Myanmar Extended-A (0/28) (0/28) (0/28) -U+aa80 Tai Viet (0/72) (0/72) (0/72) -U+ab00 Ethiopic Extended-A (0/33) (0/33) (0/33) -U+abc0 Meetei Mayek (0/56) (0/56) (0/56) -U+ac00 Hangul Syllables (0/0) (0/0) (0/0) -U+d7b0 Hangul Jamo Extended-B (0/72) (0/72) (0/72) -U+d800 High Surrogates (0/0) (0/0) (0/0) -U+db80 High Private Use Surrogates (0/0) (0/0) (0/0) -U+dc00 Low Surrogates (0/0) (0/0) (0/0) -U+e000 Private Use Area (0/0) (0/0) (0/0) -U+f900 CJK Compatibility Ideographs (0/470) (0/470) (0/470) -U+fb00 Alphabetic Presentation Forms 100% (58/58) 12% (7/58) 3% (2/58) -U+fb50 Arabic Presentation Forms-A 16% (98/611) (0/611) 11% (72/611) -U+fe00 Variation Selectors 100% (16/16) 100% (16/16) (0/16) -U+fe10 Vertical Forms (0/10) (0/10) (0/10) -U+fe20 Combining Half Marks 57% (4/7) (0/7) (0/7) -U+fe30 CJK Compatibility Forms (0/32) (0/32) (0/32) -U+fe50 Small Form Variants (0/26) (0/26) (0/26) -U+fe70 Arabic Presentation Forms-B 100% (141/141) (0/141) 100% (141/141) -U+ff00 Halfwidth and Fullwidth Forms (0/225) (0/225) (0/225) -U+fff0 Specials 100% (5/5) 100% (5/5) 100% (5/5) -U+10000 Linear B Syllabary (0/88) (0/88) (0/88) -U+10080 Linear B Ideograms (0/123) (0/123) (0/123) -U+10100 Aegean Numbers (0/57) (0/57) (0/57) -U+10140 Ancient Greek Numbers (0/75) (0/75) (0/75) -U+10190 Ancient Symbols (0/12) (0/12) (0/12) -U+101d0 Phaistos Disc (0/46) (0/46) (0/46) -U+10280 Lycian (0/29) (0/29) (0/29) -U+102a0 Carian (0/49) (0/49) (0/49) -U+10300 Old Italic 100% (35/35) (0/35) (0/35) -U+10330 Gothic (0/27) (0/27) (0/27) -U+10380 Ugaritic (0/31) (0/31) (0/31) -U+103a0 Old Persian (0/50) (0/50) (0/50) -U+10400 Deseret (0/80) (0/80) (0/80) -U+10450 Shavian (0/48) (0/48) (0/48) -U+10480 Osmanya (0/40) (0/40) (0/40) -U+10800 Cypriot Syllabary (0/55) (0/55) (0/55) -U+10840 Imperial Aramaic (0/31) (0/31) (0/31) -U+10900 Phoenician (0/29) (0/29) (0/29) -U+10920 Lydian (0/27) (0/27) (0/27) -U+10a00 Kharoshthi (0/65) (0/65) (0/65) -U+10a60 Old South Arabian (0/32) (0/32) (0/32) -U+10b00 Avestan (0/61) (0/61) (0/61) -U+10b40 Inscriptional Parthian (0/30) (0/30) (0/30) -U+10b60 Inscriptional Pahlavi (0/27) (0/27) (0/27) -U+10c00 Old Turkic (0/73) (0/73) (0/73) -U+10e60 Rumi Numeral Symbols (0/31) (0/31) (0/31) -U+11000 Brahmi (0/108) (0/108) (0/108) -U+11080 Kaithi (0/66) (0/66) (0/66) -U+12000 Cuneiform (0/879) (0/879) (0/879) -U+12400 Cuneiform Numbers and Punctuation (0/103) (0/103) (0/103) -U+13000 Egyptian Hieroglyphs (0/1071) (0/1071) (0/1071) -U+16800 Bamum Supplement (0/569) (0/569) (0/569) -U+1b000 Kana Supplement (0/2) (0/2) (0/2) -U+1d000 Byzantine Musical Symbols (0/246) (0/246) (0/246) -U+1d100 Musical Symbols (0/220) (0/220) (0/220) -U+1d200 Ancient Greek Musical Notation (0/70) (0/70) (0/70) -U+1d300 Tai Xuan Jing Symbols 100% (87/87) (0/87) (0/87) -U+1d360 Counting Rod Numerals (0/18) (0/18) (0/18) -U+1d400 Mathematical Alphanumeric Symbols 11% (117/996) 5% (55/996) 6% (62/996) -U+1f000 Mahjong Tiles (0/44) (0/44) (0/44) -U+1f030 Domino Tiles 100% (100/100) (0/100) (0/100) -U+1f0a0 Playing Cards 100% (59/59) (0/59) (0/59) -U+1f100 Enclosed Alphanumeric Supplement (0/169) (0/169) (0/169) -U+1f200 Enclosed Ideographic Supplement (0/57) (0/57) (0/57) -U+1f300 Miscellaneous Symbols And Pictographs 0% (4/529) (0/529) (0/529) -U+1f600 Emoticons 80% (51/63) (0/63) (0/63) -U+1f680 Transport And Map Symbols (0/70) (0/70) (0/70) -U+1f700 Alchemical Symbols (0/116) (0/116) (0/116) -U+20000 CJK Unified Ideographs Extension B (0/0) (0/0) (0/0) -U+2a700 CJK Unified Ideographs Extension C (0/0) (0/0) (0/0) -U+2b740 CJK Unified Ideographs Extension D (0/0) (0/0) (0/0) -U+2f800 CJK Compatibility Ideographs Supplement (0/542) (0/542) (0/542) -U+e0000 Tags (0/98) (0/98) (0/98) -U+e0100 Variation Selectors Supplement (0/240) (0/240) (0/240) -U+f0000 Supplementary Private Use Area-A (0/0) (0/0) (0/0) -U+100000 Supplementary Private Use Area-B (0/0) (0/0) (0/0) diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/AUTHORS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/AUTHORS deleted file mode 100644 index 94df1e3902f..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/AUTHORS +++ /dev/null @@ -1,54 +0,0 @@ -abysta at yandex.ru -Adrian Schroeter -Aleksey Chalabyan -Andrey Valentinovich Panov -Ben Laenen -Besarion Gugushvili -Bhikkhu Pesala -Clayborne Arevalo -Dafydd Harries -Danilo Segan -Davide Viti -David Jez -David Lawrence Ramsey -Denis Jacquerye -Dwayne Bailey -Eugeniy Meshcheryakov -Gee Fung Sit -Heikki Lindroos -James Cloos -James Crippen -John Karp -Keenan Pepper -Lars Naesbye Christensen -Lior Halphon -MaEr -Mashrab Kuvatov -Max Berger -Mederic Boquien -Michael Everson -MihailJP -Misu Moldovan -Nguyen Thai Ngoc Duy -Nicolas Mailhot -Norayr Chilingarian -Ognyan Kulev -Ondrej Koala Vacha -Peter Cernak -Remy Oudompheng -Roozbeh Pournader -Rouben Hakobian -Sahak Petrosyan -Sander Vesik -Stepan Roh -Stephen Hartke -Steve Tinney -Tavmjong Bah -Thomas Henlich -Tim May -Valentin Stoykov -Vasek Stodulka -Wesley Transue -Yoshiki Ohshima - -$Id: AUTHORS 2495 2011-11-14 22:56:26Z noct_dreamer $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/BUGS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/BUGS deleted file mode 100644 index 49b36de5536..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/BUGS +++ /dev/null @@ -1,3 +0,0 @@ -See http://dejavu.sourceforge.net/wiki/index.php/Bugs - -$Id: BUGS 80 2004-11-13 13:12:02Z src $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE deleted file mode 100644 index 254e2cc42a6..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE +++ /dev/null @@ -1,99 +0,0 @@ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. -Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) - -Bitstream Vera Fonts Copyright ------------------------------- - -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is -a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license ("Fonts") and associated -documentation files (the "Font Software"), to reproduce and distribute the -Font Software, including without limitation the rights to use, copy, merge, -publish, distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to the -following conditions: - -The above copyright and trademark notices and this permission notice shall -be included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional glyphs or characters may be added to the Fonts, only if the fonts -are renamed to names not containing either the words "Bitstream" or the word -"Vera". - -This License becomes null and void to the extent applicable to Fonts or Font -Software that has been modified and is distributed under the "Bitstream -Vera" names. - -The Font Software may be sold as part of a larger software package but no -copy of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING -ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE -FONT SOFTWARE. - -Except as contained in this notice, the names of Gnome, the Gnome -Foundation, and Bitstream Inc., shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this Font Software -without prior written authorization from the Gnome Foundation or Bitstream -Inc., respectively. For further information, contact: fonts at gnome dot -org. - -Arev Fonts Copyright ------------------------------- - -Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the fonts accompanying this license ("Fonts") and -associated documentation files (the "Font Software"), to reproduce -and distribute the modifications to the Bitstream Vera Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to -the following conditions: - -The above copyright and trademark notices and this permission notice -shall be included in all copies of one or more of the Font Software -typefaces. - -The Font Software may be modified, altered, or added to, and in -particular the designs of glyphs or characters in the Fonts may be -modified and additional glyphs or characters may be added to the -Fonts, only if the fonts are renamed to names not containing either -the words "Tavmjong Bah" or the word "Arev". - -This License becomes null and void to the extent applicable to Fonts -or Font Software that has been modified and is distributed under the -"Tavmjong Bah Arev" names. - -The Font Software may be sold as part of a larger software package but -no copy of one or more of the Font Software typefaces may be sold by -itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL -TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the name of Tavmjong Bah shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Font Software without prior written authorization -from Tavmjong Bah. For further information, contact: tavmjong @ free -. fr. - -$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/NEWS b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/NEWS deleted file mode 100644 index c846d498cdb..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/NEWS +++ /dev/null @@ -1,1373 +0,0 @@ -Changes from 2.33 to 2.34 -* Sans, SansMono, Serif: unlinked references of U+2596 for bug 50848 - (by Denis Jacquerye) -* Sans, SansMono, Serif: added U+A7AA (by Denis Jacquerye) -* Sans, SansMono, Serif: added U+2A6A, U+2A6B, U+2E1F based on U+223B - (by Denis Jacquerye) -* Sans, Serif: removed superfluous ligature definitions for ffl und ffi - (bug 55363) (by Gee Fung Sit 薛至峰) -* Sans, Serif: swapped glyphs for U+25D2 and U+25D3 (bug 55197) - (by Gee Fung Sit 薛至峰) -* Sans, Serif: added U+A740, U+A741 (by Denis Jacquerye) -* Sans: added U+20BA Turkish Lira sign (by Denis Jacquerye) -* Sans: replaced Georgian Asomtavruli U+10A0-U+10C5 and Mkhedruli U+10D0-U+10FC - with new version (by Besarion Gugushvili) -* Sans: added Georgian Nuskhuri U+2D00-U+U+2D25 (by Besarion Gugushvili) -* Sans: added Private Use Area glyphs for Georgian U+F400-U+F441 - (by Besarion Gugushvili) -* Sans: tweaked U+0250, U+0254 (by Denis Jacquerye) -* Sans: adjusted hinting of U+032C-U+032D, avoiding problem on some platforms - (by Denis Jacquerye) -* Sans: added U+A7A0-U+A7A9, pre-1921 Latvian letters with oblique stroke - (by Denis Jacquerye) -* Sans: added anchors to U+2C6D (by Denis Jacquerye) -* Sans: added cedilla anchor to some Latin characters (by Denis Jacquerye) -* Sans: added ogonek anchor to A, E, O, U, Y (by Denis Jacquerye) -* Sans: adjusted ogonek reference in U+0172, U+01EA, U+01EB - (by Denis Jacquerye) -* Sans: added anchors to U+0104, U+0105 (by Denis Jacquerye) -* Sans: added U+1F600, U+1F611, U+1F615, U+1F617, U+1F619, U+1F61B, U+1F61F, - U+1F626-U+1F627, U+1F62E-U+1F62F, U+1F634 (by Gee Fung Sit 薛至峰) -* Sans: replaced U+27A1 with mirror image of U+2B05 for consistency - (by Gee Fung Sit 薛至峰) -* Sans: copied hints from U+14A3, U+14A7 to U+2142-U+2143 - (by Gee Fung Sit 薛至峰) -* Sans: added Lisu block (by Gee Fung Sit 薛至峰) -* Sans: typographical improvements to U+0166-U+0167, U+02A6, U+02AA - (by Gee Fung Sit 薛至峰) -* Sans: slightly change hinting of "2" to fix bug 37395 (by Ben Laenen) -* Sans: fixed U+1444 which had wrong top dot that shouldn't be there - (by Denis Jacquerye) -* Sans: added anchors for diacritics to U+01B7, U+01B8, U+01B9, U+0292 - (by Denis Jacquerye) -* Sans: added U+01B7, U+01B8 to context for case diacritics above -* SansMono: fixed U+0574 (by Ruben Hakobian) -* SansMono: added U+2016, U+27C2 (by Yoshiki Ohshima) -* SansMono: added U+02CE, U+02CF (by Denis Jacquerye) -* SansMono: added U+2148, U+27E6-U+27E7, U+2B05-U+2B0D, U+1D55A - (by Gee Fung Sit 薛至峰) -* Serif: added U+02BA, U+02C2-U+02C5, U+02CA-U+02CB, U+02D7, U+02F3, U+02F7, - U+046C-U+046D, U+0476-U+0477, U+1D7C-U+1D7F, U+20B8, U+2132, U+214E, U+2C7B - to Serif (by Gee Fung Sit 薛至峰) -* Serif: typographic improvements to U+0194, U+01B1, U+0263, U+028A, U+02A6, - U+02A8, U+02AA, U+02E0, U+03DC, U+1D3B, U+1D7B (by Gee Fung Sit 薛至峰) -* Serif: added small cap versions of q, x (in italic styles), delta, theta, xi, - sigma, phi, omega, not wired in yet (by Gee Fung Sit 薛至峰) -* Serif: added anchors to U+0234-U+0236 (by Gee Fung Sit 薛至峰) -* Serif: added U+02EC, U+02EF, U+02F0, U+0360 (by Denis Jacquerye) - -Changes from 2.32 to 2.33 - -* added Old Italic block to Sans (by MaEr) -* added U+051E, U+051F to Sans (by MaEr) -* added U+01BA, U+0372-U+0373, U+0376-U+0377, U+03CF, U+1D00-U+1D01, - U+1D03-U+1D07, U+1D0A-U+1D13, U+1D15, U+1D18-U+1D1C, U+1D20-U+1D2B, - U+1D2F, U+1D3D, U+1D5C-U+1D61, U+1D66-U+1D6B, U+1DB8, U+1E9C-U+1E9D, - U+1EFA-U+1EFB, U+2C60-U+2C61, U+2C63, U+A726-U+A73C, U+A73E-U+A73F, - U+A746-U+A747, U+A74A-U+A74B, U+A74E+U+A74F, U+A768-U+A769, U+A77B-U+A77C, - U+A780-U+A787, U+A790-U+A791, U+A7FA-U+A7FF to Serif (by Gee Fung Sit 薛至峰) -* added alternate forms to U+014A and U+01B7 in Serif (by Gee Fung Sit 薛至峰) -* typographical improvements to U+0166-U+0167, U+0197, U+01B5-U+01B6, U+01BB, - U+0222-U+0223, U+023D, U+0250-U+0252, U+026E, U+0274, U+028F, U+029F, - U+02A3-U+02A5, U+02AB, U+03FE-U+03FF, U+1D02, U+1D14, U+1D1D-U+1D1F, U+1D3B, - U+1D43-U+1D46, U+1D59, U+1D9B, U+2C71, U+2C73 in Serif (by Gee Fung Sit 薛至峰) -* fixed bugs #31762 and #34700 plus other small fixes (wrong direction, - duplicate points, etc.) for Sans and Serif (by Gee Fung Sit 薛至峰) -* added U+204B to Mono (by Gee Fung Sit 薛至峰) -* added U+26E2 to Sans (by Gee Fung Sit 薛至峰) -* added Playing Cards block (U+1F0A0-U+1F0DF) to Sans (by Gee Fung Sit 薛至峰) -* emoticons in Sans: replace U+2639-U+263B with better versions, add - U+1F601-U+1F610, U+1F612-U+1F614, U+1F616, U+1F618, U+1F61A, U+1F61C-U+1F61E, - U+1F620-U+1F624, U+1F625, U+1F628-U+1F62B, U+1F62D, U+1F630-U+1F633, - U+1F635-U+1F640 (by Ben Laenen and Denis Jacquerye) -* added U+A78E, U+A790-U+A791 to Sans and Mono (by Denis Jacquerye) -* added U+A7FA to Sans (by Denis Jacquerye) -* subscripts: added U+2095-U+209C to Sans, Serif and Mono, adjusted - U+1D49-U+1D4A in Sans and Mono (by Denis Jacquerye) -* added U+0243 to Mono (by Denis Jacquerye) -* adjusted U+0307 to match dot of i, replaced dotaccent U+02D9 with U+0307 in -most dependencies in Sans (by Denis Jacquerye) -* adjusted anchors of f and added them to long s in Sans (by Denis Jacquerye) -* added anchors to precomposed dependencies of D and d (by Denis Jacquerye) -* added debug glyphs U+F002 and U+F003 which will show current point size (by - Ben Laenen) -* use correct version for Serbian italic be (by Eugeniy Meshcheryakov) -* added pictograms U+1F42D-U+1F42E, U+1F431, U+1F435 (by Denis Jacquerye) -* improved Hebrew in Sans (by Lior Halphon) -* improved Armenian in Sans, and added Armenian in Serif and Mono (by Rouben - Hakobian (Tarumian), Aleksey Chalabyan and Norayr Chilingarian) -* remove "locl" feature for Romanian for S/T/s/t with cedilla/comma accent (by - Ben Laenen) -* replace wrong "dflt" script tag in Mono with "DFLT" (by Ben Laenen) - -Changes from 2.31 to 2.32 - -* added to Sans: Latin small letter p with stroke (U+1D7D), Latin capital - letter p with stroke through descender (U+A750), Latin small letter p with - stroke through descender (U+A751), Latin capital letter thorn with stroke - (U+A764), Latin small letter thorn with stroke (U+A765), Latin capital letter - thorn with stroke through descender (U+A766), Latin small letter thorn with - stroke through descender (U+A767), Latin capital letter q with stroke through - descender (U+A756), Latin small letter q with stroke through descender - (U+A757), Latin capital letter p with flourish (U+A752), Latin small letter p - with flourish (U+A753) (by Ben Laenen) -* add new Indian rupee symbol (U+20B9) to Sans, Serif and Mono (although - standardization in Unicode not complete yet, UTC did assign this code point) - (by Ben Laenen) -* Sans: adjusted U+0E3F, U+20AB, U+20AD-U+20AE, U+20B1, U+20B5, U+20B8 to have - them take up the same width as digits (by Gee Fung Sit 薛至峰) -* added U+23E8 to Sans (by Thomas Henlich) -* fixed numerous bugs (#22579, #28189, #28977, N'Ko in Windows, fixed U+FB4F, - anchors for U+0332-U+0333, made extensions in Misc. Technical connect, and - other small fixes) (by Gee Fung Sit 薛至峰) -* added looptail g as stylistic variant to Serif (by Gee Fung Sit 薛至峰) -* added the remaining precomposed characters in Latin Extended Additional in - Serif (by Gee Fung Sit 薛至峰) -* added Georgian Mkhedruli (U+10D0-U+10FC) to Sans ExtraLight (by Besarion - Gugushvili) -* fix spacing in hinting of U+042E (Ю) in Mono (by Ben Laenen) -* replaced U+2650 and minor changes to U+2640-U+2642, U+2699, U+26A2-U+26A5, - U+26B2-U+26B5, U+26B8 in Sans (by Gee Fung Sit 薛至峰) -* added U+1E9C-U+1E9D, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2150-U+2152, - U+2189, U+26C0-U+26C3, U+A722-U+A725, U+1F030-U+1F093 to Sans (by Gee Fung - Sit 薛至峰) -* added U+1E9C-U+1E9E, U+1EFA-U+1EFB, U+2028-U+2029, U+20B8, U+2181-U+2182, - U+2185 U+A722-U+A725, to Sans ExtraLight (by Gee Fung Sit 薛至峰) -* added U+20B8, U+22A2-U+22A5, U+A722-U+A725 to Mono (by Gee Fung Sit 薛至峰) -* added U+02CD, U+01BF, U+01F7, U+0222-U+0223, U+0243-U+0244, U+0246-U+024F, - U+2150-U+2152, U+2189, U+239B-U+23AD and U+A73D to Serif (by Gee Fung Sit - 薛至峰) - -Changes from 2.30 to 2.31 - -* fixed bug where Serif Condensed Italic wouldn't get proper subfamily tags (by - Ben Laenen) -* added math operators U+2234-U+2237 to Mono (by Ben Laenen) -* removed buggy instructions of U+032D (by Eugeniy Meshcheryakov) -* added U+2C70, U+2C7E, U+2C7F to Sans and Sans Mono (by Denis Jacquerye) -* added U+2C7D to Sans Mono (by Denis Jacquerye) -* added U+2C6D, U+2C70-2C73, U+2C7E-2C7F to Serif (by Denis Jacquerye) -* added extremas to alpha U+03B1 in Serif-Italic (by Denis Jacquerye) -* added U+4A4, U+4A5 to Mono (by Andrey V. Panov) -* added Arabic letters U+0657, U+0670, U+0688-U+0690, U+0693-U+0694, - U+0696-U+0697, U+0699-U+06A0, U+06A2-U+06A3, U+06A5, U+06A7-U+06A8, - U+06AA-U+06AE, U+06B0-U+06B4, U+06B6-U+06B9, U+06BB-U+06BE and their - contextual forms to Sans (by MihailJP) -* added U+A78D LATIN CAPITAL LETTER TURNED H for coming Unicode 6.0 (by Denis - Jacquerye) - -Changes from 2.29 to 2.30 - -* added U+0462-U+0463 to Mono (by Denis Jacquerye) -* corrected U+1E53 in Serif (by Gee Fung Sit) -* added U+1E4C-U+1E4D to Mono and Serif (by Gee Fung Sit) -* added U+1E78-U+1E79 to Mono (by Gee Fung Sit) -* fixed missing diacritics in Latin Extended Additional in Sans ExtraLight - (moved stacked diacritics out of PUA in the process) (by Gee Fung Sit) -* fixed anchors on U+1E78 in Serif (by Gee Fung Sit) -* added U+1DC4-U+1DC9 to Serif (by Denis Jacquerye) -* renamed above-mark to above-mark in Serif-Italic (by Denis Jacquerye) -* added U+1DC4-U+1DC9 to context class for dotless substitution (by Denis - Jacquerye) -* changed Doubleacute to Doublegrave in Sans ExtraLight (by Gee Fung Sit) -* removed redundant reference in U+01FB in Sans Oblique (by Gee Fung Sit) -* added U+A726-U+A727 to Mono (Denis Jacquerye) -* changed U+04BE and U+04BF according to recommedations of Sasha Ankwab in Sans - (by Andrey V. Panov) -* remove "Symbol Charset" from set of codepages in Sans (by Eugeniy - Meshcheryakov) - -Changes from 2.28 to 2.29 - -* modified U+10FB in Sans to be a mirror image of U+2056, since U+10FB is not - Georgian-specific (by Roozbeh Pournader) -* added U+2B1F, U+2B24, U+2B53, U+2B54 in Sans (by Roozbeh Pournader) -* fixed TUR opentype language tag to TRK in Serif (bug 19825) (by Ben Laenen) -* early implementation of Abkhaz letter U+0524-U+0525 in Sans - (by Michael Everson and abysta) -* flipped U+1D538 in Sans (by Gee Fung Sit) -* added U+26B3-U+26B8, U+1D7D8-U+1D7E1 in Sans (by Gee Fung Sit) -* corrected U+1D7A9 in Sans Bold Oblique (by Gee Fung Sit) -* Fixed U+0649 to be dual-joining in Sans Mono (by Roozbeh Pournader) -* Remove unnecessary 'isol' feature from Sans Mono (by Roozbeh Pournader) -* Remove 'cmap' mappings for U+066E, U+066F, U+067C, U+067D, U+0681, U+0682, - U+0685, U+0692, U+06A1, U+06B5, U+06BA, U+06C6, U+06CE, and U+06D5 - in Sans Mono (bug 20323) (by Roozbeh Pournader) -* add half brackets (U+2E22 - U+2E25, by Steve Tinney) - -Changes from 2.27 to 2.28 - -* added U+A789, U+A78A in Sans and Sans Mono (by Denis Jacquerye) -* modified U+02D6, U+02D7, U+02EE in Sans and Sans Mono (by Denis Jacquerye) -* added U+1E9E (German capital ß) to Sans and Serif (by Denis Jacquerye) -* adjusted width of U+01B7-U+01B9 in Serif Italic (by Denis Jacquerye) -* modified U+021C, U+021D in Sans (by Denis Jacquerye) -* added U+021C, U+021D in Mono (by Denis Jacquerye) -* added U+F428 (Georgian Nuskhuri "f") in private use area (by Besarion - Gugushvili) -* updated Georgian mkhedruli (U+10D0-U+10FA) with new version (by Besarion - Gugushvili) -* updated Georgian asomtavruli (U+10A0-U+10C5) with new version (by Besarion - Gugushvili) -* added Georgian nuskhuri (U+2D00-U+2D25) (by Besarion Gugushvili) -* added Georgian mtavruli in private use area (U+F400-U+F426) (by Besarion - Gugushvili) -* added mark anchors above to Cyrillic U+0430-U+0438, U+043A-U+044F, - U+0454-U+0455 in Mono (by Ben Laenen) -* modified/moved up U+0318-U+0319, U+031C-U+031F, U+0329-U+032A, U+032C-U+032D, - U+0339-U+033B, U+0348 and U+0353 in Sans to prevent cut-off (by Gee Fung Sit) -* added U+035A to Sans (by Gee Fung Sit) -* updated fontconfig files (by Nicolas Mailhot) -* added U+2032-2037 to Mono (by Denis Jacquerye) -* added Ogham to Sans ExtraLight (by Gee Fung Sit) -* added U+2C6F, U+2C79, U+2C7C-2C7D to Mono (by Gee Fung Sit) -* added U+210F to Serif and Sans ExtraLight (by Gee Fung Sit) -* changed U+210F to a more common glyph in Sans and Mono (by Gee Fung Sit) - -Changes from 2.26 to 2.27 - -* added some of Michael Everson's new Cyrillic glyphs to Sans (by Wesley - Transue) -* removed blank glyph at U+05EF from Sans Bold Oblique (by Gee Fung Sit) -* small adjustments to existing tone bars in Sans and Mono (by Gee Fung Sit) -* added U+0372-U+0373, U+0376-U+0377, U+03CF, U+A668-U+A66E, U+A708-U+A711, - U+A71B-U+A71F to Sans (by Gee Fung Sit) -* copied U+02E5-U+02E9 over from Sans to fix inconsistencies in Serif (by Gee - Fung Sit) -* added U+021C-U+021D, U+0370-U+0371, U+037B-U+037D, U+0470-U+0471, - U+0510-U+0515, U+051A-U+051D, U+1E9F, U+2C64, U+2C6E-U+2C6F, U+2C79, - U+2C7C-U+2C7D, U+A644-U+A647, U+A650-U+A651, U+A654-U+A657, U+A708-U+A716, - U+A71B-U+A71F to Serif (by Gee Fung Sit) -* added U+A708-U+A716, U+A71B-U+A71F to Mono (by Gee Fung Sit) -* added anchors to U+017F (ſ) and fixed U+1E9B (ẛ) in Serif (by Gee Fung Sit) -* made U+0325 smaller in Sans Bold and Serif to match Sans Book (by Gee Fung - Sit) -* fixes to U+02F3 (moved up), U+228F-U+2294 (more square-like) and - U+22CE-U+22CF (stroke width) in Sans (by Gee Fung Sit) -* replaced U+2202 ∂ (Sans and Mono) and U+221D ∝, U+221E ∞ (Sans) with glyphs - from Arev (with small changes) (by Gee Fung Sit) -* added U+22B0-U+22B1, U+22C7, U+22D0-U+22D5 from Arev to Sans to complete the - block (by Gee Fung Sit) -* added U+0514-U+0515 to Sans ExtraLight (by Gee Fung Sit) -* skewed U+A78C in all Oblique/Italic fonts (by Gee Fung Sit) -* moved U+2215 to U+2044 in Sans and Serif and replaced U+2215 with reference - to U+002F in all fonts (by Gee Fung Sit) -* added U+2C6E to Mono (by Denis Jacquerye) -* added U+A782 and U+A783 in Sans (by Wesley Transue) -* added U+0244, U+024C-024D, U+2C64 in Sans Mono (by Denis Jacquerye) -* modified U+01AE in Sans Mono (by Denis Jacquerye) -* added U+2C7A to all fonts (by Gee Fung Sit) -* italicized/small changes to U+2C76 in Serif (Bold) Italic (by Gee Fung Sit) -* improved outlines of U+2C68, U+2C6A, U+2C6C in Serif (Bold) Italic (by Gee - Fung Sit) -* rounded U+2C77 at the bottom in Serif (by Gee Fung Sit) -* added joining behavior for tone letters (U+02E5-U+02E9) in Sans (bug #15669) - (by Gee Fung Sit) -* fixed outline of y.alt in Sans Regular (by Denis Jacquerye) -* changed references of U+1D5A8, U+1D5C5, U+1D5DC, U+1D5F9, U+1D610, U+1D62D, - U+1D644 and U+1D661 to stylistic alternates to have a better distinction (by - Gee Fung Sit) -* hinted I.alt in Sans Regular (by Gee Fung Sit) -* added U+0487, completing Cyrillic block (by Gee Fung Sit) -* extended the bar of U+0463 to the right and moved the anchor (by Gee Fung - Sit) -* added anchors to glyphs in Cyrillic block (by Gee Fung Sit) -* added (preliminary) hints to tone letter forms (U+02E5.5, U+02E9.1, stem) in - Sans Book (by Gee Fung Sit) - -Changes from 2.25 to 2.26 - -- added glyphs for Cyrillic-B to Sans (by Wesley Transue) -- added U+0370-U+0371 to Sans (by Wesley Transue) -- added U+019C, U+01A2-U+01A3, U+01A6, U+01E4-U+01E5, U+024C-U+024D, U+0285, - U+0290, U+02A0, U+0370-U+0371, U+03F1, U+03FC to Sans ExtraLight (by Wesley - Transue) -- added U+20A0-U+20A5, U+20A7-U+20B3, U+2105, U+210D, U+210F, U+2115, U+2117, - U+2119-U+211A, U+211D, U+2124, U+212E, U+2200-U+2204 to Mono (by Heikki - Lindroos) -- added U+01BA and U+01BF to Mono (by Heikki Lindroos) -- merged OpenType "aalt" feature in Latin in Sans (by Denis Jacquerye) -- added alternative shape for y in Sans (by Denis Jacquerye) -- added saltillo (U+A78B-U+A78C) to all faces (by James Cloos) -- changed U+047C-U+047D to references instead of outlines in Sans (by Wesley - Transue) -- added Latin letter tresillo U+A72A-U+A72B to Sans (by Wesley Transue) -- added U+A734-U+A737 to Sans (by Wesley Transue) -- added U+2053 to Serif and fixed it bug:9425 in Sans (by Gee Fung Sit) -- removed problematic hints for U+0423 bug:10025 (by Gee Fung Sit) -- added U+27C5-U+27C6 bug:10255 to all faces (by Gee Fung Sit) -- fixed width of U+2016 in Sans Oblique (by Gee Fung Sit) -- added U+2016, U+2032-U+2038, U+2042, U+2045-U+2046, U+204B-U+204F, - U+2051-U+2052, U+2057 to Serif (by Gee Fung Sit) -- made U+2140 bigger to match other n-ary operators (by Gee Fung Sit) -- added U+0606-U+0607, U+0609-U+060A to Sans (by Gee Fung Sit) -- added U+221B-U+221C to Mono (by Gee Fung Sit) -- small adjustments to U+221B-U+221C in Sans and Serif (by Gee Fung Sit) -- update U+04B4-U+04B5 in Serif (by Andrey V. Panov) -- increased max-storage value from maxp table to 153 (by Andrey V. Panov) -- added U+0472-U+0473, U+0510-U+0511, U+051A-U+051D, U+0606-U+0607, - U+0609-U+060A, U+1E26-U+1E27, U+1E54-U+1E55, U+1E7C-U+1E7D, U+1E8C-U+1E8D, - U+1E90-U+1E91, U+1E97-U+1E99, U+1E9F, U+1EAC-U+1EAD, U+1EB6-U+1EB7, - U+1EC6-U+1EC7, U+1ED8-U+1EDD, U+1EE0-U+1EE3, U+1EE8-U+1EEB, U+1EEE-U+1EF1 to - Mono (by Gee Fung Sit) -- added locl rules for S/T cedilla for Romanian and Moldavian so they get - rendered as S/T with comma accent (see Redhat bug #455981) (by Ben Laenen) -- removed ligature rule from Armenian U+0587 bug:16113 (by Gee Fung Sit) - -Changes from 2.24 to 2.25 - -- moved/added U+2E18 (by Gee Fung Sit) -- added empty glyph for U+2064 in Sans and Serif (by Gee Fung Sit) -- added U+22CE-U+22CF to Sans (by Gee Fung Sit) -- Sans Oblique and Bold Oblique, Serif: reverted digits hinting instructions back to before revision 1590, which fixed mistaken debian bug #471024. This fixes Debian bug #411308. The original bug was in freetype not in the fonts (by Denis Jacquerye) -- added U+A726-U+A729, U+A730-U+A733, U+A738-U+A73F, U+A746-U+A74B, U+A74E-U+A74F, U+A780-U+A781, U+A7FB-U+A7FF to Sans (by Gee Fung Sit) -- added Macedonian italic glyph shape for U+0453 in Serif (by Ben Laenen) -- changed descenders in U+0446, U+0449, U+0497, U+04A3, U+04AD (by Andrey V. Panov) -- updated main SFD files to SplineFontDB 3.0 (Denis Jacquerye and Gee Fung Sit) -- moved U+0561 2 up since it wasn't aligned with the baseline well (by Ben Laenen) -- added U+2E2E to Sans (by Gee Fung Sit) -- replaced U+2699 with simpler version in Sans (by Gee Fung Sit) -- added a lot of hinting instructions to Latin Extended B, Greek and Coptic glyphs Sans Book (by Wesley Transue) -- differentiated U+2219 from U+22C5 and adjusted affected references in Sans and Mono (by Gee Fung Sit) -- made Hebrew narrower in Sans Bold and Sans Bold Oblique (by Denis Jacquerye) -- added Kurdish and Chuvash letters from Unicode 5.1 Cyrillic Extended block (by Wesley Transue) -- added U+1E9F, U+A644-U+A647, U+A64C-U+A64D, U+A650-U+A651, U+A654-U+A655, U+A712U+A716 to Sans (by Gee Fung Sit) -- added several glyphs to Sans ExtraLight (by Gee Fung Sit) -- added hinting instructions to U+046A-U+046B, U+0508-U+0509, U+050B, U+0512-U+0513 in Sans Book (by Wesley Transue) -- corrected width of U+027E in Sans Book (by Gee Fung Sit) -- added U+2C79, U+2C7B-U+2C7D to Sans (by Gee Fung Sit) -- added a bunch of glyphs+small corrections to Sans Light (by Gee Fung Sit) -- added U+0496, U+0497, U+04B0, U+04B1 (by Andrey V. Panov) -- updated U+0493, U+049B, U+04B3, U+04B7, U+04F7 (by Andrey V. Panov) -- further improvements in extended Cyrillic (by Andrey V. Panov) - -Changes from 2.23 to 2.24 - -- instructions for U+05C0 ׀, U+05C3 ׃, U+05F3 ׳, and U+05F4 ״ in DejaVu - Sans. (by Wesley Transue) -- instructions for U+2116 in Sans (by Andrey V. Panov) -- Unicode 5.1 update: moved U+F208 to U+2C6D, U+F25F to U+2C71, added - U+2C6E-U+2C6F, U+2C72-U+2C73, updated outline of U+2C71 in Sans. (by - Denis Jacquerye) -- updated and instructed U+0401 in Sans (by Andrey V. Panov) -- fixed the bug in Sans faces where U+02EC ˬ faced the wrong direction. - Also, added a few more glyph instructions. (by Wesley Transue) -- removed OS2Sub and OS2Strike that weren't intentional in Sans - ExtraLight. (by Denis Jacquerye) -- updated instructions for U+401, U+44F in Serif Book. (by Andrey V. - Panov) -- instructions for U+02C4 ˄, U+02C5 ˅, U+03D8 Ϙ, U+03D9 ϙ, U+0494 Ҕ, and - U+0495 ҕ in Sans Book. (by Wesley Transue) -- instructions for U+01A6 Ʀ, U+0238 ȸ, U+0239 ȹ, U+02EC ˬ, and U+05C6 ׆ - in Sans Book. (by Wesley Transue) -- DejaVuSans.sfd DejaVuSerif.sfd: updated instructions for U+447 and - U+451 using code generated with xgridfit (by Andrey V. Panov) -- instructions for a few glyphs in the Latin Extended-B Block, Greek - Block, Cyrillic Block, and N'Ko block. (by Wesley Transue) -- updated sfdnormalize.pl, and SFD files to new SFD format with empty - lines. (by Denis Jacquerye) - -Changes from 2.22 to 2.23 - -- fixed bug which made Condensed fonts appear instead of normal width ones -- added U+20DB, U+20DC, and U+20E1 to Sans (by Roozbeh Pournader) -- added hinting instructions to U+01A7, U+01AA-U+01AC, U+01AE-U+01AF, - U+01BC-U+01BD, U+01BF, U+01F7, U+0277, U+027F, U+0285-U+0286, U+0297, U+02AF, - U+02B4-U+02B5, U+02BD, U+030D, U+0311, U+0329, U+04A0-U+04A1 in Sans Book (by - Wesley Transue) -- modified hinting instructions of U+04A2 in Sans Book (by Wesley Transue) -- added hinting instructions to U+237D, U+2423 in Mono Book and Mono Bold (by - Wesley Transue) -- added mathematical alphanumeric symbols to all styles (by Max Berger) -- added Unicode 5.1 U+2E18 as U+2E18.u51 (not yet usable) to Sans (by Roozbeh - Pournader) -- dereferenced all glyphs with mixed references and outlines (by Denis - Jacquerye) -- removed non-zero width from U+0344 in Sans (by Denis Jacquerye) - -Changes from 2.21 to 2.22 - -- directory structure has changed, we now use the Makefile -- modified Armenian U+0565 in Sans (by Սահակ Պետրոսյան) -- added double struck letters and numbers U+2102, U+210D, U+2115, - U+2119-U+211A, U+211D, U+2124, U+213C-U+2140, U+2145-U+2149, U+1D538-U+1D539, - U+1D53B-U+1D53E, U+1D540-U+1D544, U+1D546, U+1D54A-U+1D550, U+1D552-U+1D56B, - U+1D7D8-U+1D7E1 to Serif (by Stephen Hartke) -- added letterlike symbols U+2103, U+2109, U+2127, U+214B, U+2141-U+2144 to - Serif (by Ben Laenen) -- fixed outline direction of U+2143 in Sans Bold/Bold Oblique (by Ben Laenen) -- added arrow set in Serif: arrows: U+2194-U+21FF; dingbats: U+27A1; - supplemental arrows A: U+27F0-U+27FF; supplemental arrows B: U+2900-U+2975, - U+297A; miscellaneous symbols and arrows: U+2B00-U+2B11 (by Ben Laenen) -- added U+0180, U+01DE, U+01E0-01E1, U+022A, U+022C, U+0230, U+1E08-U+1E09, - U+1E10-U+1E11, U+1EB0-U+1EB1 to Mono (by Denis Jacquerye) -- adjusted U+01D5, U+01D7, U+01D9, U+1DB in Mono (by Denis Jacquerye) -- added Ogham in Sans (by Wesley Transue) -- added Yijing Hexagram Symbols in Sans (by Wesley Transue) -- hinting instructions added to Cyrillic U+0460, U+04A6-U+04A7, U+04AC-U+04AD, - U+04C7-U+04C8, U+04F6-U+04F7, U+04FA-U+04FB, U+050C-U+050D in Sans Book (by - Wesley Transue) -- adjusted Cyrillic letters U+042A, U+044A, U+044C, U+0459-U+045B, U+0462, - U+048C-U+048D in Serif (by Andrey V. Panov) -- hinting instructions added to Lao U+0EB7 in Sans (by Wesley Transue) -- added Roman numerals and Claudian letter U+2160-U+2184 in Serif (by Ben - Laenen) -- added U+FFF9-U+FFFD to Sans, Serif and Mono (by Lars Næsbye Christensen) -- added mathematical symbols to Serif: U+2200, U+2203-U+2204, U+2213-U+2214, - U+2217-U+2218, U+2223-U+2226, U+2250-U+2255, U+2295-U+22AF, U+22C5 (by Ben - Laenen) -- modified bullet symbol U+2219 in Serif (by Ben Laenen) - -Changes from 2.20 to 2.21 - -- added U+FE20-U+FE23 (half diacritics) to Sans (by Denis Jacquerye) -- added anchor "half" to position right half of double marks, U+FE21 or U+FE23 - to Sans (by Denis Jacquerye) -- shifted U+0360 up to avoid collision with some outlines in Sans (by Denis - Jacquerye) -- added anchor above-mark anchor to U+035D, U+035E, U+0360, U+0361 in Sans (by - Denis Jacquerye) -- added instructions for ff, ffi, ffl ligatures in Serif Bold (by Eugeniy - Meshcheryakov) -- added instructions to some N'Ko glyphs (by Wesley Transue) -- added instructions to some Lao glyphs (by Wesley Transue) -- cleaning up 'liga' Standard Ligature in Latin, in Sans and Sans Mono (by - Denis Jacquerye) -- added U+046A, U+046B (big yus) in Serif (by Andrey V. Panov) -- added box drawing symbols to Sans and Serif (by Lars Næsbye Christensen) -- added Makefile to improve font and packages generating (by Nicolas Mailhot) - -Changes from 2.19 to 2.20 - -- removed TeX and TeXData tags from all sfd files (by Eugeniy Meshcheryakov) -- removed all 'frac' lookups (by Eugeniy Meshcheryakov) -- fixed duplicate glyph names (by Eugeniy Meshcheryakov) -- removed standard ligatures with U+00B7 in Mono (by Eugeniy Meshcheryakov) -- use reference to U+002D in U+00AD in Sans Oblique, and adjust instructions - (by Eugeniy Meshcheryakov) -- updated Cyrillic in Sans Extra Light (by Andrey V. Panov) -- added instructions to N'Ko U+07C1-U+07C6, U+07CA, U+07CE-U+07CF, U+07D1, - U+07D3-U+07D4, U+07D8, U+07DB and U+07EB in Sans (by Wesley Transue) -- added instructions to Lao U+0E8A, U+0E95, U+0E97, U+EA5, U+0EB4 and U+0EB5 - (by Wesley Transue) -- adjusted instructions for Hebrew glyphs (by Denis Jacquerye) -- added instructions for U+0265 in Sans Bold (by Denis Jacquerye) -- fix U+1D68 in Sans: it had the shape of delta, where it should be a rho (by - Ben Laenen) -- remove U+1D5C glyph in Sans Oblique (it was empty) (by Ben Laenen) -- fix instructions of U+01AD in Sans Bold (by Ben Laenen) -- fix instructions of U+042D in Serif (by Ben Laenen) -- remove buggy instructions of U+2328 in Serif (by Ben Laenen) -- corrected width of U+2C75-U+2C76 in Sans Bold and Serif Bold (by Gee Fung Sit) -- added U+2C75-U+2C77 to Mono (by Gee Fung Sit) - -Changes from 2.18 to 2.19 - -- fixed misplaced symbols (U+2325,2326) in Sans Oblique (by John Karp) -- added Mark to Base anchors: 'cedilla' for combining cedilla and - 'above-legacy' for stacking above precomposed glyphs (just a,e,i,o,u with - macron for now) in Sans (by Denis Jacquerye). -- added contextual substitution for Case and Dotless forms in all Sans variants - (by Denis Jacquerye). -- renamed 'ccmp' lookups for RTL and Basic (LGC, etc.) (by Denis Jacquerye) -- added anchor 'cedilla' for vowels in Sans. (by Denis Jacquerye) -- extended contextual dotless and case substitutions to handle both below and - above diacritics (by Denis Jacquerye) -- renamed Dotless and Case Form GSUB lookups in Sans with meaningful names (by - Denis Jacquerye) - -Changes from 2.17 to 2.18 - -- Re-encoded the source files for Full Unicode (by Ben Laenen) -- Re-enabled the "ff", "fl", "fi", "ffl", "ffi" ligatures by default in Serif - (by Ben Laenen) -- Disabled the "fi", "ffi" ligatures for languages with dotless i in Serif (by - Ben Laenen) -- added Tifinagh to Sans Book and Bold, U+2D30-U+2D65, U+2D6F, partially hinted - in Sans Book. (by Denis Jacquerye) -- added Tai Xuan Jing Symbols (U+1D300-1D356) to Sans (by Remy Oudompheng) -- added double-struck letters (U+1D538-U+1D56B minus reserved code points) to - Sans (by Gee Fung Sit) -- added U+22EE-U+22F1 to Sans (by Gee Fung Sit) -- added U+2C67-U+2C6C, U+2C75-U+2C77 to Serif (by Gee Fung Sit) -- italicized various glyphs in Latin Extended-B, IPA Extensions, Spacing - Modifier Letters, Phonetic Extension (Supplement) and Super- and Subscripts - in Serif Oblique fonts (by Gee Fung Sit) -- modified outlines, bearings of Hebrew U+05D6, U+05D8, U+05DB, U+05DE, U+05E0, - U+05E1, U+05E2, U+05EA in Sans Book and Oblique, adjusted hinting in Book - based on Yotam Benshalom's comments. (by Denis Jacquerye) -- added Braille Patterns (U+2800-U+28FF) to Serif fonts (by Gee Fung Sit) -- added N'Ko to Sans Book and Bold: U+07C0-U+07E7, U+07EB-U+07F5, U+07F8-U+07FA - (by Eugeniy Meshcheryakov) -- added U+0ED8 (Lao digit 8) to Sans (by Remy Oudompheng) -- added Lao diacritics U+0EB0-0EB9, U+0EBB-0EBC, U+0EC8-0ECD to Mono (by Remy - Oudompheng) -- renamed Serif [Bold] Oblique, make it Italic (by Eugeniy Meshcheryakov) -- added U+29FA-U+29FB to Sans and Sans Mono (by Gee Fung Sit) -- swapped glyphs for Eng U+014A from Sami Eng to African Eng, the latter being - more common (by Denis Jacquerye) -- swapped ae U+00E6 and ae.alt in Serif Italics fonts, thus fixing #8213 (by - Denis Jacquerye) -- minor improvements to Misc. Symbols in Sans (by Gee Fung Sit) -- minor improvements and additions to Sans ExtraLight (by Gee Fung Sit) -- improved instructions for various Cyrillic letters (by Eugeniy Meshcheryakov) -- fixed hinting of theta and chi in Sans Book (by Ben Laenen) -- added Georgian Mkhedruli to Sans, Serif and Mono, ASumtavruli to Sans and - Serif (by Besarion Gugushvili) - -Changes from 2.16 to 2.17 - -- Sans fonts: fix position for certain combinations of Arabic fatha, kasra, - shadda, damma, kasratan, dammatan, fathatan and hamza (by Ben Laenen) -- added 'ae.alt' to Serif Oblique fonts, with design matching shape of italic - 'a' instead of slanted 'a', see bug #8213 (by Denis Jacquerye) -- added super- and subscripts to Serif and Mono: U+1D2C-U+1D2E, U+1D30-U+1D3C, - U+1D3E-U+1D42, U+1D62-U+1D65, U+1D78, U+2071, U+207A-U+207E, U+208A-U+208E, - U+2090-U+2094 (by Gee Fung Sit) - -Changes from 2.15 to 2.16 - -- fixed hinting instructions for digits in DejaVu Sans Oblique, Bold Oblique, - and Serif Book to not change glyph width (by Eugeniy Meshcheryakov) -- added instructions for U+0404, U+0411, U+0413, U+0414, U+0417-U+041B, U+041F, - U+0423, U+0424, U+0426-U+0429, U+042C, U+042E, U+042F, U+0490 in Serif Bold - (by Eugeniy Meshcheryakov) -- added U+0220 and Eng.alt to Serif fonts (by Denis Jacquerye) -- added U+232C, U+2394, U+23E3 to Sans fonts (by John Karp) -- added U+230C-U+230F, U+231C-U+231F to Sans fonts, fixing bug:9547 - (by John Karp) -- adjusted dot below, dot above, dieresis above, dieresis below in Sans fonts - (by Denis Jacquerye) -- added U+2300, U+2301, U+2303, U+2304, U+2305, U+2307, U+2326, U+2327, U+232B, - arrow.base to Sans fonts (by John Karp) -- adjusted dot and dieresis below and above in Serif fonts (by Denis Jacquerye) -- added U+1E1C-U+1E1D to Serif fonts (by Denis Jacquerye) -- added U+22BE, U+22BF (by Wesley Transue) -- added U+2324; modified U+2325: more standard proportions, and matches U+2324 - and U+2387; added U+2387 : flipped U+2325 with standard arrowhead - (by John Karp) -- added Lao digits U+0ED0-0ED7, U+0ED9 (by Remy Oudompheng) -- added to Mono in Arabic block : U+060C, U+0615, U+061B, U+061F, - U+0621-U+063A, U+0640-0655, U+065A, U+0660-066F, U+0674, U+0679-0687, U+0691, - U+0692, U+0698, U+06A1, U+06A4, U+06A9, U+06AF, U+06B5, U+06BA, U+06BE, - U+06C6, U+06CC, U+06CE, U+06D5, U+06F0-06F9 (by Remy Oudompheng) -- added to Mono in Arabic Presentations Forms-A : U+FB52-FB81, U+FB8A-FB95, - U+FB9E, U+FB9F, U+FBAA-FBAD, U+FBE8, U+FBE9, U+FBFC-FBFF (by Remy Oudompheng) -- added to Mono in Arabic Presentations Forms-B : U+FE70-FE74, U+FE76-FEFC, - U+FEFF (by Remy Oudompheng) -- added U+05BA, U+05BE, U+05F3, U+05F4, U+FB1E, U+FB21-U+FB28, U+FB4F to Sans - (by Eugeniy Meshcheryakov) -- added U+2102 to Mono (by Eugeniy Meshcheryakov) -- added U+2983-U+2984 to Sans (by Gee Fung Sit) -- added U+2A2F to Sans, Serif and Mono (by Gee Fung Sit) -- added U+2373-2375, U+237A to Sans (by John Karp) -- converted kern pairs to kern classes with Tavmjong Bah's scripts - (by Denis Jacquerye) -- set ScriptLang of kerning classes to just latn because of Pango bug - (by Denis Jacquerye) -- added DNK to ScriptLang latn otherwise it is excluded, and SRB and MDK to - cyrl (by Denis Jacquerye) -- removed flag 0x80 in generate.pe, otherwise it generates kerning tables some - systems don't like; thus loosing Apple tables (by Denis Jacquerye) -- removed ligature for precomposed legacy characters of Sans Oblique fonts - (by Denis Jacquerye) -- added bearings to en dash U+2013, em dash U+2014 and figure dash U+2012 - by making dashes shorter, preserving character width (by Denis Jacquerye) -- reduced U+031C, U+0325 (ring below), U+0339 to be entirely visible; - added instructions in Sans Book; changed U+1e00-U+1e01 to use new ring below - (by Denis Jacquerye) -- adjusted circumflex below on U+1E12-U+1E13, U+1E18-U+1E19, U+1E3C-U+1E3D, - U+1E4A-U+1E4B, U+1E70-U+1E71, U+1E76-U+1E77 in Sans fonts (by Denis Jacquerye) -- Added U+0ED4, U+0ED5 to DejaVu Sans (by Remy Oudompheng) -- Lao-specific anchors (by Remy Oudompheng) -- added alternate I to match the small capital in Sans (by Gee Fung Sit) - -Changes from 2.14 to 2.15 - -- improved hinting in Sans Oblique to deal with some spacing and inconsistency - issues (by Ben Laenen) -- added anchors to Mono Book, and added GPOS rules for combining diacritics to - show up as zero width glyphs (by Ben Laenen) -- removed U+F21C (PUA), it was copy of U+2C64 from Latin Extended C (by Eugeniy - Meshcheryakov) -- added U+27E6-U+27E7 to Sans (by Gee Fung Sit) -- added U+1407, U+1409, U+140C-U+141B, U+141D-U+1425, U+1427-U+142E, - U+1435-U+1438, U+143A-U+1449, U+1452, U+1454, U+1457-U+1465, U+1467-U+146A, - U+1471, U+1474-U+1482, U+1484-U+1488, U+148F, U+1492, U+14A0, U+14A2, U+14A9, - U+14AC-U+14BA, U+14BC, U+14BD, U+14C6, U+14C9-U+14CF, U+14D1, U+14D2, U+14D9, - U+14DC-U+14E9, U+14EC, U+14F3, U+14F6-U+1504, U+1506, U+1507, U+1510-U+1525, - U+152C, U+152F-U+153D, U+1540, U+1541, U+154E, U+154F, U+1552, U+155B, U+155C, - U+1568, U+1569, U+1574-U+157B, U+157D, U+15A7-U+15AE, U+1646, U+1647 (by - Eugeniy Meshcheryakov) -- fixed several contours to not intersect, use horizontal or vertical tangents, - use integer coordinates, etc in Sans Book (by Denis Jacquerye) -- added U+0496-U+0497 in Serif (by Andrey V. Panov) - -Changes from 2.13 to 2.14 - -- added Philippine peso glyph U+20B1 (by Clayborne Arevalo) -- made U+2012 have the same width as digits, according to Unicode 5.0, - page 206 (by Roozbeh Pournader) -- made all of the "above" combining characters remove the dot of "i", - "j", etc (Soft_Dotted characters), according to Unicode 5.0, - page 228 (by Roozbeh Pournader) -- made U+012F, U+03F3, U+0456, U+0458, U+1E2D, and U+1ECB (all fonts - except Mono), U+0249, U+2148, and U+2149 (Sans and Sans Condensed), - U+0268 (Sans ExtraLight, Serif and Serif Condensed), and U+029D (Serif - and Serif Condensed) respect the Soft_Dotted property (by Roozbeh - Pournader) -- added U+223E, U+223F, U+2240, U+22C2, U+22C3 to Sans (by Remy Oudompheng) -- added U+203D to Serif (by Gee Fung Sit) -- added zero-width glyphs for U+2061-U+2063 to Sans and Serif (by Gee - Fung Sit) -- changed isolated forms of Arabic waw (U+0648, U+0624 and U+06C6) (bug #9432) - (by Ben Laenen) -- added Lao consonants U+0E81, U+0E82, U+0E84, U+0E87, U+0E88, U+0E8A, - U+0E8D, U+0E94-0E97, U+0E99-0E9F, U+0EA1-0EA3, U+0EA5, U+0EA7, U+0EAA, - U+0EAB, U+0EAD-0EAF to Sans Mono (by Remy Oudompheng) -- added U+0200-U+0217, U+0226-U+0229, U+02F3, U+1E00-U+1E07, - U+1E0A-U+1E0B, U+1E18-U+1E1F, U+1E22-U+1E23, U+1E28-U+1E2D, - U+1E3A-U+1E3B, U+1E40, U+1E48-U+1E49, U+1E56, U+1E58-U+1E59, - U+1E5E-U+1E5F, U+1E60, U+1E68-U+1E6B, U+1E6E-U+1E6F, U+1E72-U+1E77, - U+1E86-U+1E8B, U+1E92-U+1E96, U+1EA0-U+1EA1, U+1EF4-U+1EF5 to Mono - (by Ben Laenen) -- renamed uppercase variants of diacritics (macron, breve, double grave, - double acute, inverted breve, dot above) to "uni03XX.case" in Mono - (by Ben Laenen) -- moved uppercase variants of diacritics up in Mono so they properly - vertically align on capitals (by Ben Laenen) -- precomposed glyphs with macron, breve, double grave, double acute, - inverted breve, dot above, macron below, breve below, inverted breve - below, dot below, cedilla, caron below, circumflex below, diaeresis - below, tilde below now reference to combining diacritics instead of - space modifiers in Mono (by Ben Laenen) -- made ring below (U+0325), and half rings below (U+031C and U+0339) - smaller in Mono (by Ben Laenen) -- added U+205F to all fonts (by Roozbeh Pournader) -- added U+035E-U+035F to Sans (by Roozbeh Pournader) -- added empty glyphs for U+034F, U+202A-U+202E, U+2060, U+206A-206F, - U+FE00-U+FE0F to non-Mono fonts (by Roozbeh Pournader) -- added U+2101, U+2107-U+2108, U+210B, U+210C, U+2110, U+2112, U+211B, - U+211F, U+2123, U+2125, U+2128-U+2129, U+212C-U+212D, U+212F, - U+2130-U+2131, U+2133, U+2136-U+213A, U+2141-U+2144, U+2B00-U+2B11, - U+2B20-U+2B23 to Sans (by John Karp) -- reshaped omega (U+03C9) in Mono (by Ben Laenen) -- added U+2205, U+22C6, U+2300-U+2301, U+2303-U+2306, U+230C-U+230F, - U+2312-U+2315, U+231C-U+231F, U+2335, U+2337-U+233E, U+2341-U+2344, - U+2347-U+2348, U+234B-U+234D, U+2349-U+2350, U+2352-U+2354, - U+2357-U+2359, U+235A-U+235C, U+235E-U+2360, U+2363-U+2365, - U+2368-U+2369, U+236B-U+2370, U+2373-U+237A, U+2380-U+2383, - U+2388-U+238B, U+2395 in Mono (by Ben Laenen) - -Changes from 2.12 to 2.13 - -- adjusted U+0198B, U+01B3-U+01B4 in Sans, hinted U+01B4 in Sans Book - (by Denis Jacquerye) -- added U+27F0-U+27FF, U+2906-U+2907, U+290A-U+290B, U+2940-U+2941 to Sans - (by Denis Jacquerye) -- added U+01E6-U+01E9, U+01EE-U+01EF, U+01F4-U+01F5, U+01FC-U+01FF, - U+021E-U+021F, U+0245, U+02BD, U+02C9, U+1E9B, U+2045-U+2046, U+2213, U+22C5, - U+22EF to Sans Mono (by Roozbeh Pournader) -- added U+04FA-U+04FD to Sans (by Michael Everson) -- removed U+2329 and U+232A because of their CJK properties, added U+27E8 - and U+27E9 in their stead, fixing part of bug #9038 (by Roozbeh Pournader) -- corrected and improvised U+0466-U+0469, U+046E-U+0471, U+047C-U+047D, U+0482, - U+0484-U+0486, U+0492-U+0493, U+04B0-U+04B1, U+050C-U+050D, and U+204A - in Sans (by Michael Everson) -- added instructions for U+0402, U+0409, U+040A, U+040B, U+044D, U+040F, - U+0452, U+0459-U+045B, U+045F to Sans Book (by Eugeniy Meshcheryakov) -- made italic shape for U+431, U+432, U+437, U+43B, U+43C, U+43D, U+444, U+447, - U+44D, U+44F, U+459, U+45A in SerifOblique and SerifBoldOblique - (by Andrey V. Panov) -- modified U+024C to match glyph in Unicode chart, fixing bug #9039 - (by Denis Jacquerye) -- made some canonically equivalent characters share the same glyph: - U+02B9 = U+0374, U+0343 = U+0313, and U+0387 = U+00B7 also adjusting U+02BA - to look like double U+02B9, fixing parts of bug #9038 (by Roozbeh Pournader) -- changed shapes for U+0478 and U+0479 in Sans to those in the Unicode charts, - based on a recent decision by Unicode Technical Committee to only use - the digraph form (by Michael Everson) -- adjusted width of NBSP U+00A0 and NNBSP U+202F, fixing bug #8401 - (by Denis Jacquerye) -- fixed several contours to not intersect, use horizontal or vertical tangents, - use integer coordinates, etc (by Roozbeh Pournader and Denis Jacquerye) -- added U+1402, U+1430, U+144D, U+146C, U+148A, U+14A4, U+14C1, U+14D4, U+14EE, - U+1527, U+1545, U+157E, U+158E, U+15AF to Sans (by Eugeniy Meshcheryakov) -- enlarged width of U+459 and U+45A in Serif (by Andrey V. Panov) -- made traditional shape for U+452, U+45B (by Andrey V. Panov) -- added euro sign U+20AC to Sans ExtraLight, making fontconfig recognize - the font as supporting English (by Denis Jacquerye) - -Changes from 2.11 to 2.12 - -- added U+0180 to Serif (by Denis Jacquerye) -- improved and/or hinted Armenian letters U+0542, U+0546, U+0562, - U+0563, U+0564, U+0577, U+0582 in Sans (by Ben Laenen) -- added U+4FE-U+4FF, U+512-U+513, U+2114, U+214E, U+26B2 to Sans - (by Gee Fung Sit) -- adjusted U+0496-U+0497, U+049A-U+04A1 in Sans to match U+0416, - U+041A, U+0436 and U+043A (by Gee Fung Sit) -- Mathematical Operators in Sans: changed U+22C0-U+22C1 to match - other n-ary operators, adjusted U+2203-U+2204, changed U+2220 in - Sans to match the style of U+2221 (by Gee Fung Sit) -- added U+1401, U+1403-U+1406, U+140A, U+140B, U+1426, U+142F, - U+1431-U+1434, U+1438, U+1439, U+1449, U+144A, U+144C, - U+144E-U+1451, U+1455, U+1456, U+1466, U+146B, U+146D-U+1470, - U+1472, U+1473, U+1483, U+1489, U+148B-U+148E, U+1490, U+1491, - U+14A1, U+14A3, U+14A5-U+14A8, U+14AA, U+14AB, U+14BB, U+14C0, - U+14C2-U+14C5, U+14C7, U+14C8, U+14D0, U+14D3, U+14D5-U+14D8, - U+14DA, U+14DB, U+14EA, U+14ED, U+14EF-U+14F2, U+14F4, U+14F5, - U+1405, U+1526, U+1528-U+152B, U+152D, U+152E, U+153E, - U+1542-U+1544, U+1546-U+154D, U+1550, U+1553, U+1555-U+155A, - U+1567, U+156A, U+157C, U+157F-U+1585, U+158A-U+158D, - U+158F-U+1596, U+15A0-U+15A6, U+15DE, U+15E1, U+166E-U+1676 to - Sans (by Eugeniy Meshcheryakov) -- re-enabled Latin ligatures fi, ffi, fl, ffl and ff in Sans - (by Ben Laenen) -- made italic shape for U+436, U+44A, U+44B, U+44C, U+44E, U+45F, - U+463 in SerifOblique and SerifBoldOblique (by Andrey V. Panov) -- fixed sub- and superscript metrics in Condensed Sans (bug #8848) - (by Ben Laenen) -- added U+474, U+475 in Serif (by Andrey V. Panov) -- hinted Greek glyphs U+03B7, U+30B8, U+03B9, U+03C1, U+03C3, - U+03C6 in Mono Book (by Ben Laenen) - -Changes from 2.10 to 2.11 - -- added instructions for Hebrew glyphs (Sans Book, by Eugeniy - Meshcheryakov) -- changed U+01A6 (Latin Yr) after bug #8212, in Sans, Serif and - Sans Mono fonts (by Denis Jacquerye). -- removed instruction for U+2600-U+26A1 (by Mederic Boquien) -- added U+202F and set width of U+00A0 (nobreakingspace) to the - same as U+0020, space (by Denis Jacquerye). -- added and improved instructions for various Cyrillic letters - (by Eugeniy Meshcheryakov) -- Changed U+416, U+42F, U+427 (non-Bold), U+436, U+447 (non-Bold), - U+44F, U+437 (Bold), corrected U+40F, U+414, U+424, U+426, U+429, - U+434, U+438 (Bold), U+446, U+449, U+44D (non-Bold), U+45F in - Sans Mono (by Andrey V. Panov) -- made small corrections to Cyrillic, most appreciable to U+409, - U+413, U+41B, U+427 and U+433, U+434, U+43B, U+447, U+459 - (upright fonts) to Serif (by Andrey V. Panov) -- adjusted bearings of U+410, U+416, U+41A, U+42F, U+436, U+43A, - U+443, U+44F in Serif (by Andrey V. Panov) -- enlarged width of U+44A, U+44B, U+44C, U+463 in Serif - (by Andrey V. Panov) -- added ligature "iacute" as "afii10103" (U+456) "acutecomb" in - Serif (by Andrey V. Panov) -- made italic shape to U+446, U+448, U+449 in Serif (by Andrey V. - Panov) -- added "afii10831" (U+F6C7), "afii10832" (U+F6C8) in Serif (by - Andrey V. Panov) -- new minimum version of fontforge is 20061014 (by Ben Laenen) - -Changes from 2.9 to 2.10: - -- added U+0242, U+024A-U+024B, U+024E-U+024F, U+037C-U+037D, U+0E3F, - U+1D2C-U+1D2E, U+1D30-U+1D42, U+1D5D-U+1D6A, U+1D78, U+1DB8, - U+2090-U+2094, U+20D0-U+20D1, U+2C60-U+2C66, U+2C6B-U+2C6C, U+2C74 and - U+FB29 to Sans (by Gee Fung Sit) -- added Lao glyphs : U+0E81-0E82, U+E084, U+0E87-0E88, U+0E8A, U+0E8D, - U+0E94-0E97, U+0E99-0E9F, U+0EA1-0EA3, U+0EA5, U+0EA7, U+0EAA-0EAB, - U+0EAD-0EB9, U+0EBB-0EBD, U+0EC0-0EC4, U+0EC6, U+0EC8-0ECD, U+0EDC-0EDD - (by Remy Oudompheng) -- fixed U+0193 not showing in Windows (bug #7897) (by Ben Laenen) -- changes to U+222B-222D in Sans Mono (by Remy Oudompheng) -- ported the three remaining currency symbols from Arev (U+20B0, - U+20B2-U+20B3), and replaced one (U+20AF) in Sans (by Lars Naesbye - Christensen) -- corrected U+20A5 in Sans (by Gee Fung Sit) -- merged Double-Struck Letters from Arev: U+2102, U+210D, U+2115, - U+2119-U+211A, U+2124, U+213C-U+2140 (by Gee Fung Sit) -- added U+2308-U+230B and U+2329-U+232A to Sans Mono and Serif faces, - fixed incorrect direction of U+2329 in Sans faces, and improved - U+2308-U+230B in Sans faces per Ben Laenen's suggestions (by David - Lawrence Ramsey) -- added U+06D5 and final form of it (needed for Kurdish) (by Ben Laenen) -- added two special glyphs U+F000 and U+F001 in Sans Book that show the - current ppem size (horizontal and vertical) (by Ben Laenen) -- added U+2318 and U+2325 to Sans Mono faces, based on the Sans versions - (by David Lawrence Ramsey) -- added U+2B14-U+2B1A to all faces except Sans ExtraLight (by David - Lawrence Ramsey) -- respaced all Geometric Shapes characters in Serif faces to match those - in Sans faces again, respaced U+23CF in Sans, Sans ExtraLight, and - Serif faces to match U+25A0 (or Sans in Sans ExtraLight's case) again, - and respaced U+2B12-U+2B13 in Sans and Serif faces to match U+25A1 - again (by David Lawrence Ramsey) -- corrected width of Modifier Small Letters U+1D43-1D5B in Sans Oblique - and U+1D9B-U+1DBF in Sans Oblique and Sans Bold Oblique (by Gee Fung Sit) -- added a bunch of glyphs to Sans ExtraLight (see SVN for details) (by - Gee Fung Sit) -- adjusted Cyrillic descenders in Sans ExtraLight to sync with Sans (by - Gee Fung Sit) -- added U+0242, U+0245 to Serif (by Gee Fung Sit) -- replaced the SHPIX routines which gave them bad spacing at certain - sizes in FreeType for A, V, Z, v and z in Sans Bold (by Ben Laenen) - -Changes from 2.8 to 2.9: - -- DejaVuSansExtraLight.sfd: changed family name from "DejaVu Sans" to - "DejaVu Sans Light" (in case we add a Light weight variant), so legacy - apps that understand only 4 styles are happy. (by Denis Jacquerye) -- added Name ID 16, aka preferred family name, and Name ID 17, aka - preferred style name, so contemporary apps that understand more that 4 - styles can use big fonts families "DejaVu Sans" and "DejaVu Serif". For - those, Extralight and Condensed are just styles not different families. - (by Denis Jacquerye) -- added U+22B6-22BD, U+22C0-22C1, U+22D6-22D7 to Sans. (by Remy Oudompheng) -- added U+037B, U+2184, U+2C67-U+2C6A and U+2C75-U+2C77 to Sans (by Gee - Fung Sit) -- adjusted asteriskmath (U+2217) for consistency with other mathematical - operators in Sans (by Ben Laenen) -- hinted some Armenian capitals in Sans Book (by Ben Laenen) -- added U+0246 - U+0249 (by Ben Laenen) -- BUGFIX : swapped U+224E and U+224F, in Sans, Sans Condensed and Sans Mono - (by Remy Oudompheng) -- adjusted U+20B5 (by Mederic Boquien) -- swapped U+21DA and U+21DB which were in wrong order (by Heikki Lindroos) -- added U+222E-2233, U+239B-23AD, U+2A00-2A02, U+2A0F-2A1C to Sans (by Remy - Oudompheng) -- added U+239B-23AD to Mono (by Remy Oudompheng) -- added U+2024-2025 to Serif (by Mederic Boquien) -- added U+222C-222D, U+2A0C-2A0E to Serif (by Remy Oudompheng) -- added U+2190-21FF to Mono (by Heikki Lindroos) -- added Hebrew glyphs - U+05B0-U+05BD, U+05BF-U+05C3, U+05C6, U+05C7, - U+05D0-U+05EA, U+05F0-U+05F2, U+FB1F, U+FB20, U+FB2A-U+FB36, - U+FB38-U+FB3C, U+FB3E, U+FB40, U+FB41, U+FB43, U+FB44, U+FB46-U+FB4E (by - Gee Fung Sit and Eugeniy Meshcheryakov) -- adjustments for Cyrillic in Sans (by Andrey V. Panov) -- made italic shape for U+0434, U+0456, U+0457 in SerifOblique and Serif - Bold Oblique (by Andrey V. Panov) - -Changes from 2.7 to 2.8: - -- fixed instructions for U+0423, U+0427, U+0447, U+0448 in Serif, so they - look good at large sizes too (by Eugeniy Meshcheryakov) -- added U+FB00 and U+FB03 to U+FB06 to Serif typefaces (by Heikki Lindroos) -- added U+26B0-U+26B1, U+2701-U+2704, U+2706-U+2709, U+270C-U+2727, U+2729 - to U+274B, U+274D, U+274F to U+2752, U+2756, U+2758-U+275E, U+2761 to - U+2775 (by Heikki Lindroos) -- added and improved instructions for Cyrillic letters in Mono and Serif - (Book, by Eugeniy Meshcheryakov) -- rotated U+26B0 (was too small in mono) (by Gee Fung Sit) -- adjusted U+1EDA-U+1EDD, U+1EE8-U+1EEB, capitals using capital specific - accent and moved diacritics to match position on U+00F2 (ograve), etc. - (by Denis Jacquerye) -- added U+20D6, U+20D7 to Sans (by Gee Fung Sit) -- made Armenian ligatures discretionary since the Firefox ligature problem - still isn't fixed (by Ben Laenen) -- moved Armenian hyphen U+058A to a higher position (bug #7436) (by Ben - Laenen) -- hinted Greek glyphs in Sans Bold (by Ben Laenen) -- enabled Arabic lam-alif ligatures when diacritics are used (by Ben Laenen) - -Changes from 2.6 to 2.7: - -- added glyphs needed for Kurdish: U+0695, U+06B5, U+06C6, U+06CE and their - init/medi/fina forms in Sans (by Ben Laenen) -- added U+02CD, U+01F8 - U+01F9, U+1E3E - U+1E3F, U+1E30 - U+1E35, U+1EBC - - U+1EBD, U+1EF8 - U+1EF9 (includes glyphs needed for Yoruba, Maori, Guarani - and Twi) (by Ben Laenen) -- added U+22C8-22CC, U+29CE-29D5, U+2A7D-2AA0, U+2AAE-2ABA, U+2AF9-2AFA to - Sans (by Remy Oudompheng) -- adjusted diacritics on Vietnamese, Pinyin and other characters: - U+01A0-U+01A1, U+01AF-U+01B0, U+01D5-U+01DC, U+01DE-01E1, U+01FA-U+01FB - U+022A-U+022D, U+0230-U+0231, U+1E14-U+1E17, U+1E4C-U+1E53, U+1E78-U+1E7B, - U+1EA4-U+1EF1 in Sans (Book, Bold and Oblique) (by Denis Jacquerye) -- added basic arrows U+2190-U+2193 in Serif, which completes MES-1 compliance - for Serif (by Ben Laenen) -- added U+01E4, U+01E5, U+01FA, U+01FB, U+02BD, U+02C9 and U+02EE to Serif - (by Ben Laenen) -- fixed U+0209 in Serif Bold Oblique (by Ben Laenen) -- adjusted Box Drawing block characters U+2500-257F in Mono to fit character - cell, shifting them up by 416 (Denis Jacquerye) -- redid U+0194 in Sans (by Ben Laenen) -- added U+2217-2218, U+2295-22A1 to Mono (by Remy Oudompheng) -- added U+0462 to Serif (by Andrey V. Panov) -- added U+226C, U+228C-228E, U+2293-2294, U+22F2-22FF to Sans (by Remy - Oudompheng) -- adjusted U+2208-220D in Sans (by Remy Oudompheng) -- improved some Cyrillic glyphs in Mono (by Andrey V. Panov), rewritten - instructions for changed glyphs (by Eugeniy Meshcheryakov) -- added U+1E0E-1E0F, U+1E8E-1E8F to Mono fonts (by Denis Jacquerye). (bug - #7166) -- renamed 'Dotabove' to 'Dotaccent' in Mono Sans Oblique to match other fonts - (by Denis Jacquerye). -- added U+200B-U+200F in Sans faces and Serif faces, U+200B and U+200C were - in Sans already (by Lars Naesbye Christensen) -- added U+2601-U+262F, U+263D, U+263E, U+2648-U+265F, U+2668, U+2670-U+268B, - U+2690-U+269C, U+26A0, U+26A1, U+2794, U+2798-U+27AF, U+27B1-U+27BE to Mono - (by Heikki Lindroos) -- replaced the references with unshifted ones for both κ U+03BA and к U+043A - in Mono Book (by Denis Jacquerye) -- fixing glyph for U+04ED in Mono Book, consisted only of dieresis (by Andrey - V. Panov). - -Changes from 2.5 to 2.6: - -- redid U+2032 - U+2037, U+2057 based on Arev in Sans (by Gee Fung Sit) -- added U+0195, corrected U+039E, U+204B in Sans ExtraLight (by Gee Fung Sit) -- added instructions for some Cyrillic letters in Sans Bold (by Eugeniy - Meshcheryakov) -- added vulgar fractions U+2153-U+215F for Serif, made with references (by - Lars Naesbye Christensen) -- added U+228F-2292, U+2299-22AF, U+22B2-22B5, U+22CD, U+22D8-22ED to Sans - (by Remy Oudompheng) -- added U+2208-220D, U+2238-223D, U+2278-2281, U+228A-228B, U+228F-2292, - U+22CD, U+22DA-22E9 to Mono (by Remy Oudompheng) -- fixed misplaced dot in U+2250 in Mono (by Remy Oudompheng) -- added instructions for some Cyrillic letters in Mono Book and Bold(by - Eugeniy Meshcheryakov) -- minor changes to U+2241, U+2261-2263, U+22A4, U+22A5 in Sans (by Remy - Oudompheng) -- added hinting instructions to lowercase Armenian glyphs in Sans Book (by - Ben Laenen) -- changed U+2208, U+220B to match U+2209 and U+220C in Sans Bold (by Remy - Oudompheng) -- added Braille patterns U+2800-U+28FF to Sans (by Mederic Boquien) -- added instructions for some Cyrillic letters in Serif Book (by Eugeniy - Meshcheryakov) -- renamed BoldOblique fonts to Bold Oblique in TTF Name as originally in - Bitstream Vera fonts (by Denis Jacquerye) -- added hinting instructions to some Latin-B Extended and IPA characters in - Sans Book (by Denis Jacquerye and Ben Laenen) -- adjusted bearings, replaced diacritics, hinted hook and horn for - Vietnamese in Sans Book (by Denis Jacquerye) -- made FAX, TM, TEL, etc. discritionary ligatures in Sans and Serif fonts - (by Denis Jacquerye) -- removed ligatures of precomposed characters in Sans and Serif fonts (by - Denis Jacquerye) -- added U+F208, U+F20A, U+F215-F217, U+F21A-F21B, U+F25F in PUA (from SIL's - PUA, probably in Unicode 5.0): U+0243, U+0244, U+0245, U+024C, U+024D, - U+2C64, (U+2C6D), (U+2C71) -- modified some glyphs in Serif Oblique to make them more italic (by Denis - Jacquerye) - -Changes from 2.4 to 2.5: - -- fixed excessive kerning bug that occurs with Pango (by Denis Jacquerye) -- added U+20AF to Sans and Serif (by Lars Naesbye Christensen) -- regenerated Condensed faces (by Ben Laenen) -- added U+035C-U+035D to Sans, fixed U+0361 (by Denis Jacquerye) -- integrated 255 characters from Arev fonts: Latin Extended-B, Spacing - Modifiers, Combining Diacritical Marks, Cyrillic, Cyrillic supplement, - General Punctuation, Letterlike Symbols, Arrows, Mathematical Operators, - Miscellaneous Technical, Dingbats, Alphabetic Presentation Forms (by Denis - Jacquerye) -- added basic Cyrillic and basic Greek to Sans ExtraLight (by Denis Jacquerye) -- added U+0498, U+049A, U+04AA, U+04AB, U+04AF to Serif (by Eugeniy - Meshcheryakov) -- added U+0494, U+0495, U+0498, U+0499, U+04AA, U+04AB, U+04C3, U+04C4, - U+04C7, U+04C8 to Mono (by Eugeniy Meshcheryakov) -- adjusted weight of U+0256, U+0257, U+0260, U+0272, U+0273, U+0277, U+029B, - U+02A0 and modifed U+028B and U+027A in Mono (by Denis Jacquerye) -- added U+2000-200A to Mono (by Denis Jacquerye) -- added vulgar fractions U+2153 - U+215F to Mono (by Gee Fung Sit) -- adapted metrics of Arabic glyphs so they stay above cut-off height in Sans - (by Ben Laenen) -- fixed mkmk anchors for Arabic diacritics so they stack properly in Sans (by - Ben Laenen) -- fixed weight of lowercase upsilon in Sans Bold, make small adjustment to - lowercase omega in Sans (by Ben Laenen) -- added U+210E (by Mederic Boquien) -- unslanted U+2201, U+221B and U+221C in Sans Oblique (by Mederic Boquien) -- added several mathematical relation symbols to Sans and Mono (U+2241-224C, - U+2250-2255, U+2260-2269, U+226E-2277, U+2282-2287) modified U+223C to match - other tildes, and U+2282-2284 to have the same shape. (by Remy Oudompheng) -- made U+2234-U+2237 refer to U+2219 instead of U+00B7 in Sans (by Mederic - Boquien) -- added U+2238-223B, U+226A-226B, U+2278-2281, U+2288-228B to Sans (by Remy - Oudompheng) -- unslanted and changed reference of U+22C5 from U+00B7 to U+2219 in Sans (by - Mederic Boquien) -- added U+224D-225F, U+226D, U+22C6 to Sans and unslanted U+2219 in Sans - Oblique. (by Remy Oudompheng) -- added U+224D-225F, U+226D to Mono, shifted U+2266-2269 higher upwards and - unslanted U+2219 in Oblique. (by Remy Oudompheng) -- merged Coptic glyphs from Arev 0.2 (by Lars Naesbye Christensen) -- fixed and adjusted various Cyrillic glyphs in Serif (by Andrey V. Panov) -- made fi, fl... ligatures discretionary ligatures (by Ben Laenen) - -Changes from 2.3 to 2.4: - -- added U+04A2, U+04A3, U+04AC - U+04AF, U+04BA, U+04BB, U+04C0 - - U+04C2, U+04CB, U+04CD, U+04D8 - U+04DF, U+04E2 - U+04E5, U+04E8 - U+04F5, - U+04F6 - U+04F9 to Mono (by Eugeniy Meshcheryakov) -- added U+048C, U+048D, U+0494, U+0495, U+049E - U+04A7, U+04AC - - U+04AE, U+04B4- U+04B7, U+04BA, U+04BB, U+04C0 - U+04C4, U+04C7, U+04C8, - U+04CB, U+04CC, U+04D8 - U+04DF, U+04E2 - U+04E5, U+04EC - U+04F9 to Serif - (by Eugeniy Meshcheryakov) -- added U+2134 to Sans (by Gee Fung Sit) -- added U+2080 - U+2089 to all faces (by Gee Fung Sit) -- several minor corrections to Sans (by Gee Fung Sit) -- major corrections to Sans Condensed (by Gee Fung Sit) -- corrected Superscripts and Subscripts in Sans (by Gee Fung Sit) -- corrected anchors of U+0316-U+0319 (by Denis Jacquerye) -- Verajja integrated (by Stepan Roh) -- copied U+2328, U+2600, U+2639-U+263C, U+263F-U+2647, U+2660-U+2667, - and U+2669-U+266F from Sans to Serif, and copied scaled-down versions of - them to Sans Mono (by David Lawrence Ramsey) -- added U+20B4 to all faces (by Eugeniy Meshcheryakov) -- added more minor positional adjustments to U+2638 in all faces to - match the other miscellaneous symbols in Verajja, and rescale it in Sans - Mono so that it looks better (by David Lawrence Ramsey) -- added U+2242, U+2243 and U+22A4 (by Mederic Boquien) -- corrected U+2245 in Sans (by Mederic Boquien) -- added U+0221, U+0234-0236 (by Denis Jacquerye) -- added in Arabic block to Sans: U+060C, U+0615, U+061B, U+061F, U+0621 -- U+063A, U+0640 - U+0655, U+0660 - U+066F, U+0679 - U+0687, U+0698, U+06A1, - U+06A9, U+06AF, U+06BA, U+06BF, U+06CC, U+06F0 - U+06F9 (by Ben Laenen) -- added in Arabic Presentation Forms A to Sans: U+FB52 - U+FB81, U+FB8A -- U+FB95, U+FB9E - U+FB9F, U+FBE8 - U+FBE9, U+FBFC - U+FBFF (by Ben Laenen) -- added complete Arabic Presentation Forms B to Sans: U+FE70 - U+FE74, - U+FE76 - U+FEFC, U+FEFF (by Ben Laenen) -- added complete Greek Extended block to Mono (by Ben Laenen) -- modified Greek capitals with tonos in Mono (by Ben Laenen) -- added U+01C4-01CC, U+01D5, U+01DE, U+01E0-U+01E1, U+01E6-U+01E9, - U+01EE-U+01F5, U+01F8-U+0217, U+021E-U+021F, U+0226-U+022A, U+022C to Serif - (by Denis Jacquerye) -- adjusted U+043B and U+044F in Serif (by Denis Jacquerye) -- added U+2000-U+200A (by Denis Jacquerye) -- added U+1E00-U+1E0B, U+1E0E-U+1E11, U+1E14-U+1E1C, U+1E1E-U+1E23, - U+1E26-U+1E2D, U+1E30-U+1E35, U+1E3A-U+1E3B, U+1E3E-U+1E40, U+1E48-U+1E49, - U+1E50-U+1E56, U+1E58-U+1E59, U+1E5E-U+1E60, U+1E68-U+1E6B, U+1E6E-U+1E6F, - U+1E72-U+1E7D, U+1E86-U+1E9B, U+1EA0-U+1EA3, U+1EAC-U+1EB7, U+1EBA-U+1EBD, - U+1EC6-U+1ECF, U+1ED8-U+1ED9, U+1EE6-U+1EE7, U+1EF4-U+1EF9 to Serif (by - Denis Jacquerye) -- added U+048E, U+048F, U+049C-U+049F, U+04B8, U+04B9, U+04BC-U+04BF, - U+04C3, U+04C4 to Sans (by Eugeniy Meshcheryakov) -- added DejaVu Sans Extra Light (by Denis Jacquerye) -- Adjusted underline position for (hopefully) improved legibility in - Sans, Serif, Mono (Tim May) -- added auto-generated DejaVu LGC (by Stepan Roh) - -Changes from 2.2 to 2.3: - -- fixed bug U+042B and U+044B behave badly in Sans Bold or Oblique (by - Keenan Pepper) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- added U+04D0-U+04D7, U+04E6, U+04E7 to Mono (by Eugeniy Meshcheryakov) -- added U+048A - U+048D, U+0498, U+0499, U+04AA, U+04AB, U+04B0, U+04B1, - U+04C0, U+04C9, U+04CA, U+04CE, U+04CD, U+04DA, U+04DB, U+04DE, U+04DF, - U+04E2 - U+04E5, U+04EC - U+04F8, U+04F9 to Sans (by Eugeniy Meshcheryakov) -- added U+04E0, U+04E1 to all faces (by Eugeniy Meshcheryakov) -- added Greek Extended to Sans and Serif: U+1F00-U+1F15, U+1F18-U+1F1D, - U+1F20-U+1F45, U+1F48-U+1F4D, U+1F50-U+1F57, U+1F59, U+1F5B, U+1F5D, - U+1F5F-U+1F7D, U+1F80-U+1FB4, U+1FB6-U+1FC4, U+1FC6-U+1FD3, U+1FD6-U+1FDB, - U+1FDD-U+1FEF, U+1FF2-U+1FF4, U+1FF6-U+1FFE (by Ben Laenen) -- added Greek variant letterforms, archaic letters and symbols to Mono: - U+03D0-U+03E1, U+03F0-U+03FF (by Ben Laenen) -- added Armenian block and Armenian ligatures to Sans (U+0531 - U+0556, - U+0559 - U+055F, U+0561 - U+0587, U+0589 - U+058A, U+FB13 - U+FB17) (by Ben - Laenen) -- redid some Greek characters in Sans and Mono to make them look better - and to correct some errors (by Ben Laenen) -- added U+27E0 to all faces (by David Lawrence Ramsey) -- added underscore (U+005F) consistency fixes: extended the Sans Mono - and Sans Mono Oblique underscores to touch both horizontal edges, and - reduced the height of the Sans Bold Oblique underscore to match the Sans - Bold underscore (by David Lawrence Ramsey) -- added underscore (U+005F) derivatives and consistency fixes for them: - made U+0332 a reference to underscore at Denis Jacquerye's suggestion; made - U+0333 two references to underscore; made U+033F two references to U+203E; - added U+2017 as two references to underscore, and made U+0333 a reference to - it; and added U+203E as a reference to underscore, and made U+0305 a - reference to it (by David Lawrence Ramsey) -- added U+201B, U+2220, U+2320-U+2321, U+23AE, U+23CF, all remaining - Geometric Shapes glyphs (U+25A0-U+25C9, U+25CB-U+25D7, U+25D9-U+25E5, - U+25E7-U+25FF), and U+2B12-U+2B13 to all faces (by David Lawrence Ramsey) -- added minor positional adjustments to U+2638 in all faces (by David - Lawrence Ramsey) -- added U+201F to Sans Mono and Serif faces (by David Lawrence Ramsey) -- added U+01B7, U+01F6, U+0464 - U+0465, U+2160 - U+2180, U+2183, - U+220A, U+220D, U+2329, U+232A, U+2422, U+27E8 - U+27EB, U+2680 - U+2685 to - Sans (by Gee Fung Sit ???) -- added U+2116 to Sans and Serif (by Gee Fung Sit) -- changed florin sign U+0192 in Sans (by Gee Fung Sit) -- added anchor points to some glyphs (by Denis Jacquerye) -- adjusted height of IPA superscripts U+02B0-02B8, U+02C0-02C1, - U+02E0-02E4, U+207F to match with height of U+00B2 (by Denis Jacquerye) -- added U+0184-U+0185, U+019C, U+019F, U+01A0-U+01A3, U+01A6, U+01AA, - U+01AF-U+01B0, U+01B2-U+01B4, U+01B7-U+01B8, U+01BC-U+01BC, U+0224-U+0225, - U+023A-U+0240, U+1D16-U+1D17, U+1D1D-U+1D1E, U+1D43-U+1D5B, U+1D7B, - U+1D85,U+1D9B-1DB7, U+1DB9-U+1DBF, U+20A6 to all fonts (by Denis Jacquerye) -- added added U+0182, U+018B, U+018E, U+01A0-U+01A1, U+01B1, U+01B9, - U+01C0-U+01C3, U+0238-U+0239, U+1D02, U+1D08-U+1D09, U+1D14, U+1D1F, U+1D77 - to Serif and Mono (by Denis Jacquerye) -- added U+0181, U+0183, U+0187-U+0188, U+018A-U+018F, U+0191, U+0193, - U+0195-U+019B, U+019D-U+019E, U+01A4-U+01A5, U+01AC-U+01AE, U+01B5-U+01B6, - U+01B9, U+01BB, U+01F6 to Serif (by Denis Jacquerye) -- added U+0181, U+0187-U+0188, U+018A, U+018D, U+018F, U+0191, U+0193, - U+0195-U+019F, U+01A4-01A5, U+01AC-01AD, U+01B5-U+01B6, U+1BB, U+01F6, - U+01D7-U+01DC, U+0238-U+0239, U+0241 to Mono (by Denis Jacquerye) -- added to Mono and Serif (by Denis Jacquerye) - -Changes from 2.1 to 2.2: - -- reworked the vertical orientation of the Blocks Elements characters - in all faces to remove their overly large descenders, in order to fix - problems with e.g. terminal emulators (by David Lawrence Ramsey) -- copied bullet in Sans faces to Serif faces for consistency (by David - Lawrence Ramsey) -- added U+2023, U+25D8, U+25E6, and U+29EB to all faces (by David - Lawrence Ramsey) -- added U+1EB8, U+1EB9, U+1ECA - U+1ECD, U+1EE4, U+1EE5 (by Tim May) -- added U+01DD, U+02BE, U+02BF, U+02D3 to all, changed U+02D2 in - non-Condensed and U+1EE5 in Serif (by Tim May) -- fixed U+01CE, replacing wrong circumflex by caron (by Denis Jacquerye) -- added anchor points to some glyphs (by Denis Jacquerye) -- added U+20B5 (by Denis Jacquerye) -- added U+0181 - U+0183, U+0187, U+0188, U+018A - U+018D, U+0191, - U+0193, U+0195 - U+019B, U+019D, U+019E, U+01A4, U+01A7 - U+01A9, U+01AB - - U+01AE, U+01B1, U+01B5, U+01B6, U+01BB, U+01C0 - U+01C3, U+01F1 - U+01F3, - U+0238, U+0239, U+1D02, U+1D08, U+1D09, U+1D14, U+1D1F, U+1D77, U+2103, - U+2126, U+2127, U+212A, U+212B, U+2132, U+214B, U+2210, U+2217, U+2218, - U+2A0C - U+2A0E, U+FB00, U+FB03 and U+FB04 to Sans (by Gee Fung Sit) -- added U+01A9, U+01C3 and U+2126 to Mono and Serif (by Gee Fung Sit) -- adjusted bearings of U+028B in Sans (by Gee Fung Sit) -- added U+018F, U+0494-U+0497, U+04A0-U+04A7, U+04AC-U+04AF, - U+04B4-U+04B7, U+04BA-U+04BB, U+04C1-U+04C2, U+04C5-U+04C8, U+04CB-U+04CC, - U+04D0-U+04D9, U+04DC-U+04DD, U+04E6-U+04EB to Sans (by Eugeniy - Meshcheryakov) -- replaced with references U+0391-U+0393, U+0395-U+0397, U+0399, U+039A, - U+039C, U+039D, U+039F-U+03A1, U+03A4, U+03A5, U+03A7, U+03BF, U+03DC, - U+0405, U+0406, U+0408, U+0410, U+0412, U+0415, U+0417, U+041A, - U+041C-U+041E, U+0420-U+0422, U+0425, U+0430, U+0435, U+043E, U+0440, - U+0441, U+0443, U+0445, U+0455-U+0458 in Serif and Mono (by Eugeniy - Meshcheryakov) -- added U+04D0-U+04D7, U+04E6-U+04EB to Serif (by Eugeniy Meshcheryakov) -- added U+212A and U+212B to the rest of the faces (by Lars Naesbye - Christensen) -- added U+2318 and U+2325 to Sans and Serif (by Lars Naesbye Christensen) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- completed basic Greek alphabet: added U+0374-U+0375, U+037A, U+037E, - U+0384-U+038A, U+038C, U+038E-U+0390, U+03AC-U+03BF, U+03C1-U+03CE (by Ben - Laenen) -- added U+2070 and U+2074-U+2079 (by Mederic Boquien) - -Changes from 2.0 to 2.1: - -*** Be aware that names of some TTF files changed since version 2.0. *** - -- added U+0323, U+1E0C, U+1E0D, U+1E24, U+1E25, U+1E36 - U+1E39, U+1E42, - U+1E43, U+1E46, U+1E47, U+1E5A - U+1E5D, U+1E62, U+1E63, U+1E6C, U+1E6D, - U+1E7E, U+1E7F (by Tim May) -- fixed bug where GNOME applications used Mono Bold Oblique instead of - Mono Oblique (by Keenan Pepper) -- added and improved TrueType instructions and related settings (by - Keenan Pepper) -- added U+1E41, U+1E57, U+1E61 (by Sander Vesik) -- added U+0189, U+0309, U+0313, U+0314, U+031A, U+031B, U+0327, U+0328, - U+032B, U+0333, U+033C (by Denis Jacquerye) -- adjusted and fixed U+0186, U+0254, U+0291, U+0316 - U+0319, U+031C - - U+0320, U+0323 - U+0326, U+0329 - U+032A, U+032C - U+0332, U+0339 - U+033B, - U+033E, U+033F (by Denis Jacquerye) -- fixed U+1E12, U+1E3C, U+1E4A, U+1E70 to have normal below diacritics - (by Denis Jacquerye) -- fixed U+1E82, U+1E84 and U+1EF2 to have uppercase above diacritics (by - Denis Jacquerye) -- added anchor points to some glyphs (by Denis Jacquerye) -- dropped "-Roman" from font names - affects both internal TTF names and - names of generated files (by Stepan Roh) -- attempt to fix bug Vertical spacing too big for Mono by exchanging - LineGap and OS2TypoLinegap values (proofed by Stefan Rank) -- added Greek capitals U+0391 - U+03A1, U+03A3 - U+03A9, U+03AA, U+03AB - in Mono (by Ben Laenen) -- added the per ten thousand sign U+2031 (by Mederic Boquien) -- added U+2207, U+221D, U+221F, U+2227 - U+222A, and U+2261 (by David - Lawrence Ramsey) -- new logo (by Gee Fung Sit) -- added U+0180, U+018E, U+201F, U+2024, U+2025, U+203D, U+2200, U+2203, - U+2213, U+222C, U+222D, U+2263 to Sans (by Gee Fung Sit) - -Changes from 1.15 to 2.0: - -- "Italized" basic glyphs in all Serif Oblique and their Condensed faces - (by David Jez) -- added and improved TrueType instructions and related settings (by Keenan - Pepper) -- added anchor points to some glyphs (by Denis Jacquerye) -- many new spacing and combining accents (by Denis Jacquerye) -- smart substitutions for transforming i and j to dottless form and for - using uppercase diacritics (by Denis Jacquerye) -- fixed remaining erroneously slanted characters in Serif Oblique faces (by - David Lawrence Ramsey) -- copied bullet in Sans faces to Sans Oblique faces for consistency (by - David Lawrence Ramsey) -- added U+203C and U+2047-U+2049 (by David Lawrence Ramsey) -- added Greek glyphs to Serif (by Ben Laenen, Condensed merge by David Jez) -- fixed bug LTR glyphs behaving like RTL (by Ben Laenen) -- fixed wrong glyph directions (by David Jez) -- fixed repositioned accents in Condensed faces (by David Jez) - -Changes from 1.14 to 1.15: - -- added and improved TrueType instructions and related settings (by Keenan - Pepper) -- fixed U+2302, U+2319 (by David Lawrence Ramsey) -- fixed yet another monospace bug (by Stepan Roh) -- fixed potential "too big ascender/descender" bug (by Stepan Roh) -- fixed U+026E and U+028E (by Denis Jacquerye) -- added U+0186, U+0190, U+0300 - U+0304, U+0306 - U+0308, U+030A - U+030C, - U+0321, U+0322 (by Denis Jacquerye) -- added rest of Block Elements: U+2591 - U+2593 (by David Lawrence Ramsey) -- added U+2311, U+237D and U+2638 (by David Lawrence Ramsey) -- added U+01CD - U+01D4 (by Denis Jacquerye) -- fixed accents of U+00F2 - U+00F6 by replacing them with references in Mono - Bold (by David Jez) -- added U+0490, U+0491 (by Eugeniy Meshcheryakov) -- added hints to U+0404 and U+0454 in Sans (by Eugeniy Meshcheryakov) -- completed Greek glyphs from U+0370 to U+03CF in Serif (by Ben Laenen) -- fixed shape of U+0255 in Sans Bold and Sans Bold Oblique (by Denis - Jacquerye) - -Changes from 1.13 to 1.14: - -- fixed bug where Mono faces were not recognized as fixed pitch in Windows - by correcting Venda glyphs (by David Jez) -- added and improved TrueType instructions (by Keenan Pepper) -- added 6 Uzbekian glyphs (by Mashrab Kuvatov) -- added Greek glyphs to Sans and Serif, changed pi and omega to fit in (by - Ben Laenen) -- added IPA and related superscript glyphs (by Denis Jacquerye) -- fixed buggy Venda glyphs (by David Lawrence Ramsey and Stepan Roh) -- added U+2302, U+2310, U+2319 (by David Lawrence Ramsey) -- fixed slanted U+00AC in Serif Oblique faces (by David Lawrence Ramsey) -- added 29 glyphs from Block Elements (by David Lawrence Ramsey) - -Changes from 1.12 to 1.13: - -- removed all stems (PS hints) (requested by David Jez) -- added U+01D6, U+01DF, U+022B, U+022D and U+0231 (by Sander Vesik) -- added 10 Venda glyphs (by Dwayne Bailey) -- fixed bug when fonts had no name on Microsoft Windows (by Stepan Roh) -- updated 'missing' glyph U+FFFD (by David Jez) -- set TTF flag fsType to 'Installable Embedding' (= unrestricted usage) - (idea by C. Tiffany) - -Changes from 1.11 to 1.12: - -- added long s (by James Cloos) -- prettier comma accent in gcommaaccent (by David Jez) -- added Hbar, hbar, kgreenlandic, napostrophe, Eng, eng, Tbar, tbar, - afii57929 (by David Jez) -- changed Iogonek, iogonek, IJ, ij to look better (by David Jez) -- glyph uni0237 renamed to dotlessj (requested by David Jez) -- fixed accents for dcaron, lcaron, tcaron, Uogonek, uogonek in Serif (by - David Jez) -- added U+2500 - U+257F box drawing glyphs to Sans Mono (by David Jez) -- fixed accents in Wcircumflex, Ycircumflex and Zdotaccent (by David Jez) -- extra kerning for F (by Sander Vesik) -- added 'missing' glyph U+FFFD (by David Jez) - -Changes from 1.10 to 1.11: - -- kerning updates (by Sander Vesik) -- added Iogonek, iogonek, IJ, ij, Uogonek, uogonek (from SuSE standard fonts - by Adrian Schroeter, SuSE AG) -- added Gcommaaccent, gcommaaccent, Kcommaaccent, kcommaaccent, - Lcommaaccent, lcommaaccent, Ncommaaccent, ncommaaccent, Rcommaaccent, - rcommaaccent (by Stepan Roh) - -Changes from 1.9 to 1.10: - -- added U+022E, U+022F (by Sander Vesik) -- kerning updates for DejaVu Sans (by Sander Vesik) -- fixed too wide cyrillic glyphs in DejaVu Sans Mono (by Valentin Stoykov) -- fixed ligatures bug in Mono (by Stepan Roh) - -Changes from 1.8 to 1.9: - -- integrated Arev Cyrillics (by Danilo Segan) -- added U+01EA, U+01EB, U+01EC, U+01ED (by Sander Vesik) - -Changes from 1.7 to 1.8: - -- fixed accents in Serif Oblique and Serif Bold Oblique (by Stepan Roh) - -Changes from 1.6 to 1.7: - -- added automatically generated Condensed typefaces (by Stepan Roh) - -Changes from 1.5 to 1.6: - -- monospace bug fixed (by Stepan Roh) -- incorrect Bitstream foundry assigned by fontconfig and KDE Font Installer -fixed (by Stepan Roh) -- added automatically generated Oblique version of Serif typefaces (by -Stepan Roh) -- corrected cyrillic D and d (by Danilo Segan and David Jez) -- fixed accents position in Oblique version of Serif typefaces (by Danilo -Segan and Sander Vesik) -- fixed incorrect computation of OS2Win* fields (by Stepan Roh) -- added visiblespace U+2423 (by David Jez) -- fixed 'line height' bug by fixing ascender and descender values (by David -Jez and Stepan Roh) -- fixed part of 'worse than Vera' bug (by Peter Cernak) -- smaller comma accent U+0326 (by David Jez) - -Changes from 1.4 to 1.5: - -- added Cyrillics (96 characters) and Dcroat to the rest of typefaces (by -Danilo Segan) -- fixed bugs in some Cyrillic characters, some of them reported by Sander -Vesik (by Danilo Segan) -- added U+0100, U+0101, U+0112, U+0113, U+012A, U+012B, U+014C, U+014D, -U+016A, U+016B, U+01E2, U+01E3, U+0232 and U+0233 (by Sander Vesik) -- added Romanian characters (by Misu Moldovan) -- added U+0108, U+0109, U+010A, U+010B, U+0114, U+0115, U+0116, U+0117, -U+011C, U+011D, U+0120, U+0121, U+0124, U+0125, U+0128, U+0129, U+012C, -U+012D, U+0134, U+0135, U+014E, U+014F, U+0150, U+0151, U+015C, U+015D, -U+0168, U+0169, U+016C, U+016D, U+0170, U+0171 and U+0237 (by James -Crippen) -- added U+02BB, U+2010, U+2011, U+2012 and U+2015 (by Stepan Roh) - -Changes from 1.3 to 1.4: - -- added Polish characters (Aogonek, aogonek, Eogonek, eogonek, Nacute, -nacute, Sacute, sacute, Zacute, zacute, Zdotaccent, zdotaccent) (by Stepan -Roh) - -Changes from 1.2 to 1.3: - -- added Cyrillics (96 characters) and Dcroat to Sans typefaces (by Danilo -Segan from his BePa fonts) - -Changes from 1.1 to 1.2: - -- added Ldot, ldot, Wcircumflex, wcircumflex, Ycircumflex, ycircumflex, - Wgrave, wgrave, Wacute, wacute, Wdieresis, wdieresis, Ygrave and ygrave - (from The Olwen Font Family 0.2 by Dafydd Harries) - -Changes from 1.0 to 1.1: - -- added Lacute, lacute, Lcaron, lcaron, Racute and racute (by Peter Cernak) - -Changes from 0.9.4 to 1.0: - -- none, just changed version and updated README - -Changes from 0.9.3 to 0.9.4: - -- fixed TTF generation (kerning tables were missing) - -Changes from 0.9.2 to 0.9.3: - -- kerning of added characters -- proper caron shape for dcaron in Mono (by Ondrej Koala Vacha) -- minor visual changes - -Changes from 0.9.1 to 0.9.2: - -- internal bugged version - -Changes from 0.9 to 0.9.1: - -- proper caron shape for dcaron and tcaron -- minor visual changes - -$Id: NEWS 2535 2013-08-25 15:21:17Z moyogo $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/README b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/README deleted file mode 100644 index 162a89345bf..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/README +++ /dev/null @@ -1,59 +0,0 @@ -DejaVu fonts 2.34 (c)2004-2013 DejaVu fonts team ------------------------------------------------- - -The DejaVu fonts are a font family based on the Bitstream Vera Fonts -(http://gnome.org/fonts/). Its purpose is to provide a wider range of -characters (see status.txt for more information) while maintaining the -original look and feel. - -DejaVu fonts are based on Bitstream Vera fonts version 1.10. - -Available fonts (Sans = sans serif, Mono = monospaced): - -DejaVu Sans Mono -DejaVu Sans Mono Bold -DejaVu Sans Mono Bold Oblique -DejaVu Sans Mono Oblique -DejaVu Sans -DejaVu Sans Bold -DejaVu Sans Bold Oblique -DejaVu Sans Oblique -DejaVu Sans ExtraLight (experimental) -DejaVu Serif -DejaVu Serif Bold -DejaVu Serif Bold Italic (experimental) -DejaVu Serif Italic (experimental) -DejaVu Sans Condensed (experimental) -DejaVu Sans Condensed Bold (experimental) -DejaVu Sans Condensed Bold Oblique (experimental) -DejaVu Sans Condensed Oblique (experimental) -DejaVu Serif Condensed (experimental) -DejaVu Serif Condensed Bold (experimental) -DejaVu Serif Condensed Bold Italic (experimental) -DejaVu Serif Condensed Italic (experimental) - -All fonts are also available as derivative called DejaVu LGC with support -only for Latin, Greek and Cyrillic scripts. - -For license information see LICENSE. What's new is described in NEWS. Known -bugs are in BUGS. All authors are mentioned in AUTHORS. - -Fonts are published in source form as SFD files (Spline Font Database from -FontForge - http://fontforge.sf.net/) and in compiled form as TTF files -(TrueType fonts). - -For more information go to http://dejavu.sourceforge.net/. - -Characters from Arev fonts, Copyright (c) 2006 by Tavmjong Bah: ---------------------------- -U+01BA, U+01BF, U+01F7, U+021C-U+021D, U+0220, U+0222-U+0223, -U+02B9, U+02BA, U+02BD, U+02C2-U+02C5, U+02d4-U+02D5, -U+02D7, U+02EC-U+02EE, U+0346-U+034E, U+0360, U+0362, -U+03E2-03EF, U+0460-0463, U+0466-U+0486, U+0488-U+0489, U+04A8-U+04A9, -U+0500-U+050F, U+2055-205E, U+20B0, U+20B2-U+20B3, U+2102, U+210D, U+210F, -U+2111, U+2113, U+2115, U+2118-U+211A, U+211C-U+211D, U+2124, U+2135, -U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704, -U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794, -U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06 - -$Id: README 2535 2013-08-25 15:21:17Z moyogo $ diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/langcover.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/langcover.txt deleted file mode 100644 index 4db5bca5dff..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/langcover.txt +++ /dev/null @@ -1,249 +0,0 @@ -This is the language coverage file for DejaVu fonts -($Id: langcover.txt 2538 2013-08-25 16:02:56Z moyogo $) - - Sans Serif Sans Mono -aa Afar 100% (62/62) 100% (62/62) 100% (62/62) -ab Abkhazia 100% (90/90) 93% (84/90) 84% (76/90) -af Afrikaans 100% (69/69) 100% (69/69) 100% (69/69) -ak Akan 100% (73/73) 100% (73/73) 100% (73/73) -am Amharic (0/264) (0/264) (0/264) -an Aragonese 100% (66/66) 100% (66/66) 100% (66/66) -ar Arabic 100% (36/36) (0/36) 100% (36/36) -as Assamese (0/64) (0/64) (0/64) -ast Asturian/Bable/Leonese/Asturleonese 100% (70/70) 100% (70/70) 100% (70/70) -av Avaric 100% (67/67) 100% (67/67) 100% (67/67) -ay Aymara 100% (60/60) 100% (60/60) 100% (60/60) -az-az Azerbaijani in Azerbaijan 100% (66/66) 100% (66/66) 100% (66/66) -az-ir Azerbaijani in Iran 100% (40/40) (0/40) 100% (40/40) -ba Bashkir 100% (82/82) 100% (82/82) 97% (80/82) -be Byelorussian 100% (68/68) 100% (68/68) 100% (68/68) -ber-dz Berber in Algeria 100% (70/70) 100% (70/70) 100% (70/70) -ber-ma Berber in Morocco 100% (32/32) (0/32) (0/32) -bg Bulgarian 100% (60/60) 100% (60/60) 100% (60/60) -bh Bihari (Devanagari script) (0/68) (0/68) (0/68) -bho Bhojpuri (Devanagari script) (0/68) (0/68) (0/68) -bi Bislama 100% (58/58) 100% (58/58) 100% (58/58) -bin Edo or Bini 100% (78/78) 100% (78/78) 100% (78/78) -bm Bambara 100% (60/60) 100% (60/60) 100% (60/60) -bn Bengali (0/63) (0/63) (0/63) -bo Tibetan (0/95) (0/95) (0/95) -br Breton 100% (64/64) 100% (64/64) 100% (64/64) -brx Bodo (Devanagari script) (0/82) (0/82) (0/82) -bs Bosnian 100% (62/62) 100% (62/62) 100% (62/62) -bua Buriat (Buryat) 100% (70/70) 100% (70/70) 100% (70/70) -byn Blin/Bilin (0/255) (0/255) (0/255) -ca Catalan 100% (74/74) 100% (74/74) 100% (74/74) -ce Chechen 100% (67/67) 100% (67/67) 100% (67/67) -ch Chamorro 100% (58/58) 100% (58/58) 100% (58/58) -chm Mari (Lower Cheremis / Upper Cheremis) 100% (76/76) 100% (76/76) 100% (76/76) -chr Cherokee (0/85) (0/85) (0/85) -co Corsican 100% (84/84) 100% (84/84) 100% (84/84) -crh Crimean Tatar/Crimean Turkish 100% (68/68) 100% (68/68) 100% (68/68) -cs Czech 100% (82/82) 100% (82/82) 100% (82/82) -csb Kashubian 100% (74/74) 100% (74/74) 100% (74/74) -cu Old Church Slavonic 100% (103/103) 90% (93/103) 78% (81/103) -cv Chuvash 100% (74/74) 100% (74/74) 100% (74/74) -cy Welsh 100% (78/78) 100% (78/78) 100% (78/78) -da Danish 100% (70/70) 100% (70/70) 100% (70/70) -de German 100% (59/59) 100% (59/59) 100% (59/59) -doi Dogri (0/85) (0/85) (0/85) -dv Divehi/Dhivehi/Maldivian (0/49) (0/49) (0/49) -dz Dzongkha (0/95) (0/95) (0/95) -ee Ewe 100% (99/99) 100% (99/99) 100% (99/99) -el Greek 100% (69/69) 100% (69/69) 100% (69/69) -en English 100% (72/72) 100% (72/72) 100% (72/72) -eo Esperanto 100% (64/64) 100% (64/64) 100% (64/64) -es Spanish 100% (66/66) 100% (66/66) 100% (66/66) -et Estonian 100% (64/64) 100% (64/64) 100% (64/64) -eu Basque 100% (56/56) 100% (56/56) 100% (56/56) -fa Persian 100% (40/40) (0/40) 100% (40/40) -fat Fanti 100% (73/73) 100% (73/73) 100% (73/73) -ff Fulah (Fula) 100% (62/62) 100% (62/62) 100% (62/62) -fi Finnish 100% (62/62) 100% (62/62) 100% (62/62) -fil Filipino 100% (84/84) 100% (84/84) 100% (84/84) -fj Fijian 100% (52/52) 100% (52/52) 100% (52/52) -fo Faroese 100% (68/68) 100% (68/68) 100% (68/68) -fr French 100% (84/84) 100% (84/84) 100% (84/84) -fur Friulian 100% (66/66) 100% (66/66) 100% (66/66) -fy Frisian 100% (75/75) 100% (75/75) 100% (75/75) -ga Irish 100% (80/80) 100% (80/80) 100% (80/80) -gd Scots Gaelic 100% (70/70) 100% (70/70) 100% (70/70) -gez Ethiopic (Geez) (0/218) (0/218) (0/218) -gl Galician 100% (66/66) 100% (66/66) 100% (66/66) -gn Guarani 100% (70/70) 100% (70/70) 100% (70/70) -gu Gujarati (0/68) (0/68) (0/68) -gv Manx Gaelic 100% (54/54) 100% (54/54) 100% (54/54) -ha Hausa 100% (60/60) 100% (60/60) 100% (60/60) -haw Hawaiian 100% (63/63) 100% (63/63) 100% (63/63) -he Hebrew 100% (27/27) (0/27) (0/27) -hi Hindi (Devanagari script) (0/68) (0/68) (0/68) -hne Chhattisgarhi (0/68) (0/68) (0/68) -ho Hiri Motu 100% (52/52) 100% (52/52) 100% (52/52) -hr Croatian 100% (62/62) 100% (62/62) 100% (62/62) -hsb Upper Sorbian 100% (72/72) 100% (72/72) 100% (72/72) -ht Haitian/Haitian Creole 100% (56/56) 100% (56/56) 100% (56/56) -hu Hungarian 100% (70/70) 100% (70/70) 100% (70/70) -hy Armenian 100% (77/77) 100% (77/77) 100% (77/77) -hz Herero 100% (57/57) 100% (57/57) 100% (57/57) -ia Interlingua 100% (52/52) 100% (52/52) 100% (52/52) -id Indonesian 100% (54/54) 100% (54/54) 100% (54/54) -ie Interlingue 100% (52/52) 100% (52/52) 100% (52/52) -ig Igbo 100% (58/58) 100% (58/58) 100% (58/58) -ii Sichuan Yi/Nuosu (0/1165) (0/1165) (0/1165) -ik Inupiaq (Inupiak, Eskimo) 100% (68/68) 100% (68/68) 100% (68/68) -io Ido 100% (52/52) 100% (52/52) 100% (52/52) -is Icelandic 100% (70/70) 100% (70/70) 100% (70/70) -it Italian 100% (72/72) 100% (72/72) 100% (72/72) -iu Inuktitut 100% (161/161) (0/161) (0/161) -ja Japanese (0/6537) (0/6537) (0/6537) -jv Javanese 100% (56/56) 100% (56/56) 100% (56/56) -ka Georgian 100% (33/33) 100% (33/33) 100% (33/33) -kaa Kara-Kalpak (Karakalpak) 100% (78/78) 100% (78/78) 100% (78/78) -kab Kabyle 100% (70/70) 100% (70/70) 100% (70/70) -ki Kikuyu 100% (56/56) 100% (56/56) 100% (56/56) -kj Kuanyama/Kwanyama 100% (52/52) 100% (52/52) 100% (52/52) -kk Kazakh 100% (77/77) 100% (77/77) 100% (77/77) -kl Greenlandic 100% (81/81) 100% (81/81) 100% (81/81) -km Central Khmer (0/63) (0/63) (0/63) -kn Kannada (0/70) (0/70) (0/70) -ko Korean (0/2443) (0/2443) (0/2443) -kok Kokani (Devanagari script) (0/68) (0/68) (0/68) -kr Kanuri 100% (56/56) 100% (56/56) 100% (56/56) -ks Kashmiri 78% (26/33) (0/33) 69% (23/33) -ku-am Kurdish in Armenia 100% (64/64) 100% (64/64) 100% (64/64) -ku-iq Kurdish in Iraq 100% (32/32) (0/32) 87% (28/32) -ku-ir Kurdish in Iran 100% (32/32) (0/32) 87% (28/32) -ku-tr Kurdish in Turkey 100% (62/62) 100% (62/62) 100% (62/62) -kum Kumyk 100% (66/66) 100% (66/66) 100% (66/66) -kv Komi (Komi-Permyak/Komi-Siryan) 100% (70/70) 100% (70/70) 100% (70/70) -kw Cornish 100% (64/64) 100% (64/64) 100% (64/64) -kwm Kwambi 100% (52/52) 100% (52/52) 100% (52/52) -ky Kirgiz 100% (70/70) 100% (70/70) 100% (70/70) -la Latin 100% (68/68) 100% (68/68) 100% (68/68) -lah Lahnda 92% (25/27) (0/27) 85% (23/27) -lb Luxembourgish (Letzeburgesch) 100% (75/75) 100% (75/75) 100% (75/75) -lez Lezghian (Lezgian) 100% (67/67) 100% (67/67) 100% (67/67) -lg Ganda 100% (54/54) 100% (54/54) 100% (54/54) -li Limburgan/Limburger/Limburgish 100% (62/62) 100% (62/62) 100% (62/62) -ln Lingala 100% (81/81) 100% (81/81) 100% (81/81) -lo Lao 100% (55/55) (0/55) 83% (46/55) -lt Lithuanian 100% (70/70) 100% (70/70) 100% (70/70) -lv Latvian 100% (78/78) 100% (78/78) 100% (78/78) -mai Maithili (Devanagari script) (0/68) (0/68) (0/68) -mg Malagasy 100% (56/56) 100% (56/56) 100% (56/56) -mh Marshallese 100% (62/62) 100% (62/62) 100% (62/62) -mi Maori 100% (64/64) 100% (64/64) 100% (64/64) -mk Macedonian 100% (42/42) 100% (42/42) 100% (42/42) -ml Malayalam (0/68) (0/68) (0/68) -mn-cn Mongolian in China (0/130) (0/130) (0/130) -mn-mn Mongolian in Mongolia 100% (70/70) 100% (70/70) 100% (70/70) -mni Maniputi (0/78) (0/78) (0/78) -mo Moldavian 100% (128/128) 100% (128/128) 100% (128/128) -mr Marathi (Devanagari script) (0/68) (0/68) (0/68) -ms Malay 100% (52/52) 100% (52/52) 100% (52/52) -mt Maltese 100% (72/72) 100% (72/72) 100% (72/72) -my Burmese (Myanmar) (0/48) (0/48) (0/48) -na Nauru 100% (60/60) 100% (60/60) 100% (60/60) -nb Norwegian Bokmal 100% (70/70) 100% (70/70) 100% (70/70) -nds Low Saxon 100% (59/59) 100% (59/59) 100% (59/59) -ne Nepali (0/72) (0/72) (0/72) -ng Ndonga 100% (52/52) 100% (52/52) 100% (52/52) -nl Dutch 100% (82/82) 100% (82/82) 100% (82/82) -nn Norwegian Nynorsk 100% (76/76) 100% (76/76) 100% (76/76) -no Norwegian (Bokmal) 100% (70/70) 100% (70/70) 100% (70/70) -nqo N'Ko 91% (54/59) (0/59) (0/59) -nr Ndebele, South 100% (52/52) 100% (52/52) 100% (52/52) -nso Northern Sotho 100% (58/58) 100% (58/58) 100% (58/58) -nv Navajo/Navaho 100% (72/72) 100% (72/72) 100% (72/72) -ny Chichewa 100% (54/54) 100% (54/54) 100% (54/54) -oc Occitan 100% (70/70) 100% (70/70) 100% (70/70) -om Oromo or Galla 100% (52/52) 100% (52/52) 100% (52/52) -or Oriya (0/68) (0/68) (0/68) -os Ossetic 100% (66/66) 100% (66/66) 100% (66/66) -ota Ottoman Turkish 100% (37/37) (0/37) 97% (36/37) -pa Panjabi/Punjabi (0/63) (0/63) (0/63) -pa-pk Panjabi/Punjabi in Pakistan 92% (25/27) (0/27) 85% (23/27) -pap-an Papiamento in Netherlands Antilles 100% (72/72) 100% (72/72) 100% (72/72) -pap-aw Papiamento in Aruba 100% (54/54) 100% (54/54) 100% (54/54) -pes Western Farsi 100% (40/40) (0/40) 100% (40/40) -pl Polish 100% (70/70) 100% (70/70) 100% (70/70) -prs Dari/Eastern Farsi 100% (40/40) (0/40) 100% (40/40) -ps-af Pashto in Afghanistan 95% (47/49) (0/49) 77% (38/49) -ps-pk Pashto in Pakistan 93% (46/49) (0/49) 75% (37/49) -pt Portuguese 100% (82/82) 100% (82/82) 100% (82/82) -qu Quechua 100% (55/55) 100% (55/55) 100% (55/55) -rm Rhaeto-Romance (Romansch) 100% (66/66) 100% (66/66) 100% (66/66) -rn Rundi 100% (52/52) 100% (52/52) 100% (52/52) -ro Romanian 100% (62/62) 100% (62/62) 100% (62/62) -ru Russian 100% (66/66) 100% (66/66) 100% (66/66) -rw Kinyarwanda 100% (52/52) 100% (52/52) 100% (52/52) -sa Sanskrit (Devanagari script) (0/68) (0/68) (0/68) -sah Yakut 100% (76/76) 100% (76/76) 100% (76/76) -sat Santali (Devanagari script) (0/70) (0/70) (0/70) -sc Sardinian 100% (62/62) 100% (62/62) 100% (62/62) -sco Scots 100% (56/56) 100% (56/56) 100% (56/56) -sd Sindhi 100% (54/54) (0/54) 79% (43/54) -se North Sami 100% (66/66) 100% (66/66) 100% (66/66) -sel Selkup (Ostyak-Samoyed) 100% (66/66) 100% (66/66) 100% (66/66) -sg Sango 100% (72/72) 100% (72/72) 100% (72/72) -sh Serbo-Croatian 100% (156/156) 100% (156/156) 98% (154/156) -shs Secwepemctsin 100% (48/48) 100% (48/48) 100% (48/48) -si Sinhala/Sinhalese (0/73) (0/73) (0/73) -sid Sidamo (0/281) (0/281) (0/281) -sk Slovak 100% (86/86) 100% (86/86) 100% (86/86) -sl Slovenian 100% (62/62) 100% (62/62) 100% (62/62) -sm Samoan 100% (53/53) 100% (53/53) 100% (53/53) -sma South Sami 100% (60/60) 100% (60/60) 100% (60/60) -smj Lule Sami 100% (60/60) 100% (60/60) 100% (60/60) -smn Inari Sami 100% (68/68) 100% (68/68) 100% (68/68) -sms Skolt Sami 100% (80/80) 100% (80/80) 97% (78/80) -sn Shona 100% (52/52) 100% (52/52) 100% (52/52) -so Somali 100% (52/52) 100% (52/52) 100% (52/52) -sq Albanian 100% (56/56) 100% (56/56) 100% (56/56) -sr Serbian 100% (60/60) 100% (60/60) 100% (60/60) -ss Swati 100% (52/52) 100% (52/52) 100% (52/52) -st Sotho, Southern 100% (52/52) 100% (52/52) 100% (52/52) -su Sundanese 100% (54/54) 100% (54/54) 100% (54/54) -sv Swedish 100% (68/68) 100% (68/68) 100% (68/68) -sw Swahili 100% (52/52) 100% (52/52) 100% (52/52) -syr Syriac (0/45) (0/45) (0/45) -ta Tamil (0/48) (0/48) (0/48) -te Telugu (0/70) (0/70) (0/70) -tg Tajik 100% (78/78) 100% (78/78) 97% (76/78) -th Thai 1% (1/74) (0/74) (0/74) -ti-er Eritrean Tigrinya (0/255) (0/255) (0/255) -ti-et Ethiopian Tigrinya (0/281) (0/281) (0/281) -tig Tigre (0/221) (0/221) (0/221) -tk Turkmen 100% (68/68) 100% (68/68) 100% (68/68) -tl Tagalog 100% (84/84) 100% (84/84) 100% (84/84) -tn Tswana 100% (58/58) 100% (58/58) 100% (58/58) -to Tonga 100% (53/53) 100% (53/53) 100% (53/53) -tr Turkish 100% (70/70) 100% (70/70) 100% (70/70) -ts Tsonga 100% (52/52) 100% (52/52) 100% (52/52) -tt Tatar 100% (76/76) 100% (76/76) 100% (76/76) -tw Twi 100% (73/73) 100% (73/73) 100% (73/73) -ty Tahitian 100% (65/65) 100% (65/65) 100% (65/65) -tyv Tuvinian 100% (70/70) 100% (70/70) 100% (70/70) -ug Uyghur 87% (29/33) (0/33) 78% (26/33) -uk Ukrainian 100% (72/72) 100% (72/72) 100% (72/72) -ur Urdu 92% (25/27) (0/27) 85% (23/27) -uz Uzbek 100% (52/52) 100% (52/52) 100% (52/52) -ve Venda 100% (62/62) 100% (62/62) 100% (62/62) -vi Vietnamese 100% (194/194) 100% (194/194) 76% (148/194) -vo Volapuk 100% (54/54) 100% (54/54) 100% (54/54) -vot Votic 100% (62/62) 100% (62/62) 100% (62/62) -wa Walloon 100% (70/70) 100% (70/70) 100% (70/70) -wal Wolaitta/Wolaytta (0/281) (0/281) (0/281) -wen Sorbian languages (lower and upper) 100% (76/76) 100% (76/76) 100% (76/76) -wo Wolof 100% (66/66) 100% (66/66) 100% (66/66) -xh Xhosa 100% (52/52) 100% (52/52) 100% (52/52) -yap Yapese 100% (58/58) 100% (58/58) 100% (58/58) -yi Yiddish 100% (27/27) (0/27) (0/27) -yo Yoruba 100% (119/119) 100% (119/119) 100% (119/119) -za Zhuang/Chuang 100% (52/52) 100% (52/52) 100% (52/52) -zh-cn Chinese (simplified) 0% (2/6765) 0% (2/6765) 0% (2/6765) -zh-hk Chinese Hong Kong Supplementary Character Set (0/2213) (0/2213) (0/2213) -zh-mo Chinese in Macau (0/2213) (0/2213) (0/2213) -zh-sg Chinese in Singapore 0% (2/6765) 0% (2/6765) 0% (2/6765) -zh-tw Chinese (traditional) (0/13063) (0/13063) (0/13063) -zu Zulu 100% (52/52) 100% (52/52) 100% (52/52) diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/status.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/status.txt deleted file mode 100644 index cb94ab9056c..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/status.txt +++ /dev/null @@ -1,6766 +0,0 @@ -This is the status file for DejaVu fonts -($Id: status.txt 2475 2011-02-27 14:51:17Z ben_laenen $) - -original = present in original Bitstream Vera 1.10 -<version> = added in DejaVu fonts <version> - -U+0020 space original -U+0021 exclam original -U+0022 quotedbl original -U+0023 numbersign original -U+0024 dollar original -U+0025 percent original -U+0026 ampersand original -U+0027 quotesingle original -U+0028 parenleft original -U+0029 parenright original -U+002a asterisk original -U+002b plus original -U+002c comma original -U+002d hyphen original -U+002e period original -U+002f slash original -U+0030 zero original -U+0031 one original -U+0032 two original -U+0033 three original -U+0034 four original -U+0035 five original -U+0036 six original -U+0037 seven original -U+0038 eight original -U+0039 nine original -U+003a colon original -U+003b semicolon original -U+003c less original -U+003d equal original -U+003e greater original -U+003f question original -U+0040 at original -U+0041 A original -U+0042 B original -U+0043 C original -U+0044 D original -U+0045 E original -U+0046 F original -U+0047 G original -U+0048 H original -U+0049 I original -U+004a J original -U+004b K original -U+004c L original -U+004d M original -U+004e N original -U+004f O original -U+0050 P original -U+0051 Q original -U+0052 R original -U+0053 S original -U+0054 T original -U+0055 U original -U+0056 V original -U+0057 W original -U+0058 X original -U+0059 Y original -U+005a Z original -U+005b bracketleft original -U+005c backslash original -U+005d bracketright original -U+005e asciicircum original -U+005f underscore original -U+0060 grave original -U+0061 a original -U+0062 b original -U+0063 c original -U+0064 d original -U+0065 e original -U+0066 f original -U+0067 g original -U+0068 h original -U+0069 i original -U+006a j original -U+006b k original -U+006c l original -U+006d m original -U+006e n original -U+006f o original -U+0070 p original -U+0071 q original -U+0072 r original -U+0073 s original -U+0074 t original -U+0075 u original -U+0076 v original -U+0077 w original -U+0078 x original -U+0079 y original -U+007a z original -U+007b braceleft original -U+007c bar original -U+007d braceright original -U+007e asciitilde original -U+00a0 nonbreakingspace original -U+00a1 exclamdown original -U+00a2 cent original -U+00a3 sterling original -U+00a4 currency original -U+00a5 yen original -U+00a6 brokenbar original -U+00a7 section original -U+00a8 dieresis original -U+00a9 copyright original -U+00aa ordfeminine original -U+00ab guillemotleft original -U+00ac logicalnot original -U+00ad sfthyphen original -U+00ae registered original -U+00af macron original -U+00b0 degree original -U+00b1 plusminus original -U+00b2 twosuperior original -U+00b3 threesuperior original -U+00b4 acute original -U+00b5 mu original -U+00b6 paragraph original -U+00b7 periodcentered original -U+00b8 cedilla original -U+00b9 onesuperior original -U+00ba ordmasculine original -U+00bb guillemotright original -U+00bc onequarter original -U+00bd onehalf original -U+00be threequarters original -U+00bf questiondown original -U+00c0 Agrave original -U+00c1 Aacute original -U+00c2 Acircumflex original -U+00c3 Atilde original -U+00c4 Adieresis original -U+00c5 Aring original -U+00c6 AE original -U+00c7 Ccedilla original -U+00c8 Egrave original -U+00c9 Eacute original -U+00ca Ecircumflex original -U+00cb Edieresis original -U+00cc Igrave original -U+00cd Iacute original -U+00ce Icircumflex original -U+00cf Idieresis original -U+00d0 Eth original -U+00d1 Ntilde original -U+00d2 Ograve original -U+00d3 Oacute original -U+00d4 Ocircumflex original -U+00d5 Otilde original -U+00d6 Odieresis original -U+00d7 multiply original -U+00d8 Oslash original -U+00d9 Ugrave original -U+00da Uacute original -U+00db Ucircumflex original -U+00dc Udieresis original -U+00dd Yacute original -U+00de Thorn original -U+00df germandbls original -U+00e0 agrave original -U+00e1 aacute original -U+00e2 acircumflex original -U+00e3 atilde original -U+00e4 adieresis original -U+00e5 aring original -U+00e6 ae original -U+00e7 ccedilla original -U+00e8 egrave original -U+00e9 eacute original -U+00ea ecircumflex original -U+00eb edieresis original -U+00ec igrave original -U+00ed iacute original -U+00ee icircumflex original -U+00ef idieresis original -U+00f0 eth original -U+00f1 ntilde original -U+00f2 ograve original -U+00f3 oacute original -U+00f4 ocircumflex original -U+00f5 otilde original -U+00f6 odieresis original -U+00f7 divide original -U+00f8 oslash original -U+00f9 ugrave original -U+00fa uacute original -U+00fb ucircumflex original -U+00fc udieresis original -U+00fd yacute original -U+00fe thorn original -U+00ff ydieresis original -U+0100 Amacron 1.5 -U+0101 amacron 1.5 -U+0102 Abreve 1.5 -U+0103 abreve 1.5 -U+0104 Aogonek 1.4 -U+0105 aogonek 1.4 -U+0106 Cacute original -U+0107 cacute original -U+0108 Ccircumflex 1.5 -U+0109 ccircumflex 1.5 -U+010a Cdotaccent 1.5 -U+010b cdotaccent 1.5 -U+010c Ccaron original -U+010d ccaron original -U+010e Dcaron 1.0 -U+010f dcaron 1.0 -U+0110 Dcroat 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0111 dcroat original -U+0112 Emacron 1.5 -U+0113 emacron 1.5 -U+0114 Ebreve 1.5 -U+0115 ebreve 1.5 -U+0116 Edotaccent 1.5 -U+0117 edotaccent 1.5 -U+0118 Eogonek 1.4 -U+0119 eogonek 1.4 -U+011a Ecaron 1.0 -U+011b ecaron 1.0 -U+011c Gcircumflex 1.5 -U+011d gcircumflex 1.5 -U+011e Gbreve original -U+011f gbreve original -U+0120 Gdotaccent 1.5 -U+0121 gdotaccent 1.5 -U+0122 Gcommaaccent 1.11 -U+0123 gcommaaccent 1.11 -U+0124 Hcircumflex 1.5 -U+0125 hcircumflex 1.5 -U+0126 Hbar 1.12 -U+0127 hbar 1.12 -U+0128 Itilde 1.5 -U+0129 itilde 1.5 -U+012a Imacron 1.5 -U+012b imacron 1.5 -U+012c Ibreve 1.5 -U+012d ibreve 1.5 -U+012e Iogonek 1.11 -U+012f iogonek 1.11 -U+0130 Idotaccent original -U+0131 dotlessi original -U+0132 IJ 1.11 -U+0133 ij 1.11 -U+0134 Jcircumflex 1.5 -U+0135 jcircumflex 1.5 -U+0136 Kcommaaccent 1.11 -U+0137 kcommaaccent 1.11 -U+0138 kgreenlandic 1.12 -U+0139 Lacute 1.1 -U+013a lacute 1.1 -U+013b Lcommaaccent 1.11 -U+013c lcommaaccent 1.11 -U+013d Lcaron 1.1 -U+013e lcaron 1.1 -U+013f Ldot 1.2 -U+0140 ldot 1.2 -U+0141 Lslash original -U+0142 lslash original -U+0143 Nacute 1.4 -U+0144 nacute 1.4 -U+0145 Ncommaaccent 1.11 -U+0146 ncommaaccent 1.11 -U+0147 Ncaron 1.0 -U+0148 ncaron 1.0 -U+0149 napostrophe 1.12 -U+014a Eng 1.12 -U+014b eng 1.12 -U+014c Omacron 1.5 -U+014d omacron 1.5 -U+014e Obreve 1.5 -U+014f obreve 1.5 -U+0150 Ohungarumlaut 1.5 -U+0151 ohungarumlaut 1.5 -U+0152 OE original -U+0153 oe original -U+0154 Racute 1.1 -U+0155 racute 1.1 -U+0156 Rcommaaccent 1.11 -U+0157 rcommaaccent 1.11 -U+0158 Rcaron 1.0 -U+0159 rcaron 1.0 -U+015a Sacute 1.4 -U+015b sacute 1.4 -U+015c Scircumflex 1.5 -U+015d scircumflex 1.5 -U+015e Scedilla original -U+015f scedilla original -U+0160 Scaron original -U+0161 scaron original -U+0162 Tcommaaccent 1.5 -U+0163 tcommaaccent 1.5 -U+0164 Tcaron 1.0 -U+0165 tcaron 1.0 -U+0166 Tbar 1.12 -U+0167 tbar 1.12 -U+0168 Utilde 1.5 -U+0169 utilde 1.5 -U+016a Umacron 1.5 -U+016b umacron 1.5 -U+016c Ubreve 1.5 -U+016d ubreve 1.5 -U+016e Uring 1.0 -U+016f uring 1.0 -U+0170 Uhungarumlaut 1.5 -U+0171 uhungarumlaut 1.5 -U+0172 Uogonek 1.11 -U+0173 uogonek 1.11 -U+0174 Wcircumflex 1.2 -U+0175 wcircumflex 1.2 -U+0176 Ycircumflex 1.2 -U+0177 ycircumflex 1.2 -U+0178 Ydieresis original -U+0179 Zacute 1.4 -U+017a zacute 1.4 -U+017b Zdotaccent 1.4 -U+017c zdotaccent 1.4 -U+017d Zcaron original -U+017e zcaron original -U+017f longs 1.12 -U+0180 uni0180 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0181 uni0181 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0182 uni0182 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0183 uni0183 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0184 uni0184 2.3 -U+0185 uni0185 2.3 -U+0186 uni0186 1.15 -U+0187 uni0187 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0188 uni0188 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0189 uni0189 2.1 -U+018a uni018A 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018b uni018B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018c uni018C 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018d uni018D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018e uni018E 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+018f uni018F 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0190 uni0190 1.15 -U+0191 uni0191 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0192 florin original -U+0193 uni0193 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0194 uni0194 1.14 -U+0195 uni0195 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.6 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0196 uni0196 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0197 uni0197 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0198 uni0198 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0199 uni0199 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019a uni019A 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019b uni019B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+019c uni019C 2.3 -U+019d uni019D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019e uni019E 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+019f uni019F 2.3 -U+01a0 Ohorn 2.3 -U+01a1 ohorn 2.3 -U+01a2 uni01A2 2.3 -U+01a3 uni01A3 2.3 -U+01a4 uni01A4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a5 uni01A5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a6 uni01A6 2.3 -U+01a7 uni01A7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a8 uni01A8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01a9 uni01A9 2.2 -U+01aa uni01AA 2.3 -U+01ab uni01AB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ac uni01AC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ad uni01AD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01ae uni01AE 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01af Uhorn 2.3 -U+01b0 uhorn 2.3 -U+01b1 uni01B1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b2 uni01B2 2.3 -U+01b3 uni01B3 2.3 -U+01b4 uni01B4 2.3 -U+01b5 uni01B5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b6 uni01B6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01b7 uni01B7 2.3 -U+01b8 uni01B8 2.3 -U+01b9 uni01B9 2.3 -U+01ba uni01BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01bb uni01BB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01bc uni01BC 2.3 -U+01bd uni01BD 2.3 -U+01be uni01BE 2.3 -U+01bf uni01BF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01c0 uni01C0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c1 uni01C1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c2 uni01C2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+01c3 uni01C3 2.2 -U+01c4 uni01C4 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c5 uni01C5 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c6 uni01C6 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c7 uni01C7 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c8 uni01C8 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01c9 uni01C9 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01ca uni01CA 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cb uni01CB 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cc uni01CC 1.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01cd uni01CD 1.15 -U+01ce uni01CE 1.15 -U+01cf uni01CF 1.15 -U+01d0 uni01D0 1.15 -U+01d1 uni01D1 1.15 -U+01d2 uni01D2 1.15 -U+01d3 uni01D3 1.15 -U+01d4 uni01D4 1.15 -U+01d5 uni01D5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01d6 uni01D6 1.13 -U+01d7 uni01D7 2.3 -U+01d8 uni01D8 2.3 -U+01d9 uni01D9 2.3 -U+01da uni01DA 2.3 -U+01db uni01DB 2.3 -U+01dc uni01DC 2.3 -U+01dd uni01DD 2.2 -U+01de uni01DE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique) 2.23 (Serif Italic Condensed) -U+01df uni01DF 1.13 -U+01e0 uni01E0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e1 uni01E1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e2 uni01E2 1.5 -U+01e3 uni01E3 1.5 -U+01e4 uni01E4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+01e5 uni01E5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+01e6 Gcaron 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e7 gcaron 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e8 uni01E8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01e9 uni01E9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ea uni01EA 1.9 -U+01eb uni01EB 1.9 -U+01ec uni01EC 1.9 -U+01ed uni01ED 1.9 -U+01ee uni01EE 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ef uni01EF 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f0 uni01F0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono) 2.22 (Sans Mono Bold) 2.23 (Serif Italic Condensed) -U+01f1 uni01F1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f2 uni01F2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f3 uni01F3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01f4 uni01F4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f5 uni01F5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f6 uni01F6 2.3 -U+01f7 uni01F7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+01f8 uni01F8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01f9 uni01F9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fa Aringacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01fb aringacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+01fc AEacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fd aeacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01fe Oslashacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+01ff oslashacute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0200 uni0200 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0201 uni0201 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0202 uni0202 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0203 uni0203 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0204 uni0204 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0205 uni0205 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0206 uni0206 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0207 uni0207 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0208 uni0208 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0209 uni0209 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020a uni020A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020b uni020B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020c uni020C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020d uni020D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020e uni020E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+020f uni020F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0210 uni0210 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0211 uni0211 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0212 uni0212 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0213 uni0213 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0214 uni0214 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0215 uni0215 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0216 uni0216 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0217 uni0217 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0218 Scommaaccent 1.5 -U+0219 scommaaccent 1.5 -U+021a uni021A 1.5 -U+021b uni021B 1.5 -U+021c uni021C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+021d uni021D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+021e uni021E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+021f uni021F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0220 uni0220 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.18 (Sans Mono, Sans Mono Bold) 2.23 (Serif Italic Condensed) -U+0221 uni0221 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0222 uni0222 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0223 uni0223 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0224 uni0224 2.3 -U+0225 uni0225 2.3 -U+0226 uni0226 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0227 uni0227 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0228 uni0228 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0229 uni0229 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022a uni022A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022b uni022B 1.13 -U+022c uni022C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+022d uni022D 1.13 -U+022e uni022E 1.10 -U+022f uni022F 1.10 -U+0230 uni0230 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0231 uni0231 1.13 -U+0232 uni0232 1.5 -U+0233 uni0233 1.5 -U+0234 uni0234 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0235 uni0235 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0236 uni0236 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0237 dotlessj 1.5 -U+0238 uni0238 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0239 uni0239 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+023a uni023A 2.3 -U+023b uni023B 2.3 -U+023c uni023C 2.3 -U+023d uni023D 2.3 -U+023e uni023E 2.3 -U+023f uni023F 2.3 -U+0240 uni0240 2.3 -U+0241 uni0241 2.3 -U+0242 uni0242 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+0243 uni0243 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0244 uni0244 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0245 uni0245 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0246 uni0246 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0247 uni0247 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0248 uni0248 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0249 uni0249 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024a uni024A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024b uni024B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024c uni024C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024d uni024D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024e uni024E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+024f uni024F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0250 uni0250 1.14 -U+0251 uni0251 1.14 -U+0252 uni0252 1.14 -U+0253 uni0253 1.14 -U+0254 uni0254 1.14 -U+0255 uni0255 1.14 -U+0256 uni0256 1.14 -U+0257 uni0257 1.14 -U+0258 uni0258 1.14 -U+0259 uni0259 1.14 -U+025a uni025A 1.14 -U+025b uni025B 1.14 -U+025c uni025C 1.14 -U+025d uni025D 1.14 -U+025e uni025E 1.14 -U+025f uni025F 1.14 -U+0260 uni0260 1.14 -U+0261 uni0261 1.14 -U+0262 uni0262 1.14 -U+0263 uni0263 1.14 -U+0264 uni0264 1.14 -U+0265 uni0265 1.14 -U+0266 uni0266 1.14 -U+0267 uni0267 1.14 -U+0268 uni0268 1.14 -U+0269 uni0269 1.14 -U+026a uni026A 1.14 -U+026b uni026B 1.14 -U+026c uni026C 1.14 -U+026d uni026D 1.14 -U+026e uni026E 1.14 -U+026f uni026F 1.14 -U+0270 uni0270 1.14 -U+0271 uni0271 1.14 -U+0272 uni0272 1.14 -U+0273 uni0273 1.14 -U+0274 uni0274 1.14 -U+0275 uni0275 1.14 -U+0276 uni0276 1.14 -U+0277 uni0277 1.14 -U+0278 uni0278 1.14 -U+0279 uni0279 1.14 -U+027a uni027A 1.14 -U+027b uni027B 1.14 -U+027c uni027C 1.14 -U+027d uni027D 1.14 -U+027e uni027E 1.14 -U+027f uni027F 1.14 -U+0280 uni0280 1.14 -U+0281 uni0281 1.14 -U+0282 uni0282 1.14 -U+0283 uni0283 1.14 -U+0284 uni0284 1.14 -U+0285 uni0285 1.14 -U+0286 uni0286 1.14 -U+0287 uni0287 1.14 -U+0288 uni0288 1.14 -U+0289 uni0289 1.14 -U+028a uni028A 1.14 -U+028b uni028B 1.14 -U+028c uni028C 1.14 -U+028d uni028D 1.14 -U+028e uni028E 1.14 -U+028f uni028F 1.14 -U+0290 uni0290 1.14 -U+0291 uni0291 1.14 -U+0292 uni0292 1.14 -U+0293 uni0293 1.14 -U+0294 uni0294 1.14 -U+0295 uni0295 1.14 -U+0296 uni0296 1.14 -U+0297 uni0297 1.14 -U+0298 uni0298 1.14 -U+0299 uni0299 1.14 -U+029a uni029A 1.14 -U+029b uni029B 1.14 -U+029c uni029C 1.14 -U+029d uni029D 1.14 -U+029e uni029E 1.14 -U+029f uni029F 1.14 -U+02a0 uni02A0 1.14 -U+02a1 uni02A1 1.14 -U+02a2 uni02A2 1.14 -U+02a3 uni02A3 1.14 -U+02a4 uni02A4 1.14 -U+02a5 uni02A5 1.14 -U+02a6 uni02A6 1.14 -U+02a7 uni02A7 1.14 -U+02a8 uni02A8 1.14 -U+02a9 uni02A9 1.14 -U+02aa uni02AA 1.14 -U+02ab uni02AB 1.14 -U+02ac uni02AC 1.14 -U+02ad uni02AD 1.14 -U+02ae uni02AE 1.14 -U+02af uni02AF 1.14 -U+02b0 uni02B0 1.14 -U+02b1 uni02B1 1.14 -U+02b2 uni02B2 1.14 -U+02b3 uni02B3 1.14 -U+02b4 uni02B4 1.14 -U+02b5 uni02B5 1.14 -U+02b6 uni02B6 1.14 -U+02b7 uni02B7 1.14 -U+02b8 uni02B8 1.14 -U+02b9 uni02B9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+02ba uni02BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02bb uni02BB 1.5 -U+02bc uni02BC 1.12 -U+02bd uni02BD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+02be uni02BE 2.2 -U+02bf uni02BF 2.2 -U+02c0 uni02C0 1.14 -U+02c1 uni02C1 1.14 -U+02c2 uni02C2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02c3 uni02C3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02c4 uni02C4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02c5 uni02C5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02c6 circumflex original -U+02c7 caron original -U+02c8 uni02C8 2.0 -U+02c9 uni02C9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+02ca uni02CA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02cb uni02CB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02cc uni02CC 2.0 -U+02cd uni02CD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02ce uni02CE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02cf uni02CF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02d0 uni02D0 1.14 -U+02d1 uni02D1 1.14 -U+02d2 uni02D2 2.0 -U+02d3 uni02D3 2.2 -U+02d4 uni02D4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02d5 uni02D5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02d6 uni02D6 2.0 -U+02d7 uni02D7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02d8 breve original -U+02d9 dotaccent original -U+02da ring original -U+02db ogonek original -U+02dc tilde original -U+02dd hungarumlaut original -U+02de uni02DE 2.0 -U+02df uni02DF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02e0 uni02E0 1.14 -U+02e1 uni02E1 1.14 -U+02e2 uni02E2 1.14 -U+02e3 uni02E3 1.14 -U+02e4 uni02E4 1.14 -U+02e5 uni02E5 2.0 -U+02e6 uni02E6 2.0 -U+02e7 uni02E7 2.0 -U+02e8 uni02E8 2.0 -U+02e9 uni02E9 2.0 -U+02ec uni02EC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02ed uni02ED 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+02ee uni02EE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+02ef uni02EF 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02f0 uni02F0 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02f3 uni02F3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+02f7 uni02F7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0300 gravecomb 1.15 -U+0301 acutecomb 1.15 -U+0302 uni0302 1.15 -U+0303 tildecomb 1.15 -U+0304 uni0304 1.15 -U+0305 uni0305 2.0 -U+0306 uni0306 1.15 -U+0307 uni0307 1.15 -U+0308 uni0308 1.15 -U+0309 hookabovecomb 2.1 -U+030a uni030A 1.15 -U+030b uni030B 1.15 -U+030c uni030C 1.15 -U+030d uni030D 2.0 -U+030e uni030E 2.0 -U+030f uni030F 2.0 -U+0310 uni0310 2.0 -U+0311 uni0311 2.0 -U+0312 uni0312 1.11 -U+0313 uni0313 2.1 -U+0314 uni0314 2.1 -U+0315 uni0315 2.0 -U+0316 uni0316 2.0 -U+0317 uni0317 2.0 -U+0318 uni0318 2.0 -U+0319 uni0319 2.0 -U+031a uni031A 2.1 -U+031b uni031B 2.1 -U+031c uni031C 2.0 -U+031d uni031D 2.0 -U+031e uni031E 2.0 -U+031f uni031F 2.0 -U+0320 uni0320 2.0 -U+0321 uni0321 1.15 -U+0322 uni0322 1.15 -U+0323 dotbelowcomb 2.1 -U+0324 uni0324 2.0 -U+0325 uni0325 2.0 -U+0326 uni0326 1.5 -U+0327 uni0327 2.1 -U+0328 uni0328 2.1 -U+0329 uni0329 2.0 -U+032a uni032A 2.0 -U+032b uni032B 2.1 -U+032c uni032C 2.0 -U+032d uni032D 2.0 -U+032e uni032E 2.0 -U+032f uni032F 2.0 -U+0330 uni0330 2.0 -U+0331 uni0331 2.0 -U+0332 uni0332 2.0 -U+0333 uni0333 2.1 -U+0334 uni0334 2.3 -U+0335 uni0335 2.3 -U+0336 uni0336 2.3 -U+0337 uni0337 2.3 -U+0338 uni0338 2.3 -U+0339 uni0339 2.0 -U+033a uni033A 2.0 -U+033b uni033B 2.0 -U+033c uni033C 2.1 -U+033d uni033D 2.0 -U+033e uni033E 2.1 -U+033f uni033F 2.1 -U+0340 uni0340 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0341 uni0341 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0342 uni0342 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0343 uni0343 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0344 uni0344 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0345 uni0345 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0346 uni0346 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0347 uni0347 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0348 uni0348 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0349 uni0349 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034a uni034A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034b uni034B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034c uni034C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034d uni034D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034e uni034E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+034f uni034F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0351 uni0351 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0352 uni0352 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) 2.28 (Sans Condensed Oblique, Sans Oblique) -U+0353 uni0353 2.5 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0357 uni0357 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0358 uni0358 2.3 -U+035a uni035A 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+035c uni035C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+035d uni035D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+035e uni035E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+035f uni035F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0360 uni0360 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0361 uni0361 2.0 -U+0362 uni0362 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0370 uni0370 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0371 uni0371 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0372 uni0372 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0373 uni0373 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0374 uni0374 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0375 uni0375 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0376 uni0376 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0377 uni0377 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+037a uni037A 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+037b uni037B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037c uni037C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037d uni037D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+037e uni037E 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0384 tonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0385 dieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0386 Alphatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0387 anoteleia 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0388 Epsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0389 Etatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038a Iotatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038c Omicrontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038e Upsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+038f Omegatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0390 iotadieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0391 Alpha 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0392 Beta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0393 Gamma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0394 uni0394 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0395 Epsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0396 Zeta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0397 Eta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0398 Theta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0399 Iota 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039a Kappa 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039b Lambda 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039c Mu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039d Nu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039e Xi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+039f Omicron 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a0 Pi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a1 Rho 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a3 Sigma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a4 Tau 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a5 Upsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a6 Phi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a7 Chi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a8 Psi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03a9 Omega original -U+03aa Iotadieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ab Upsilondieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.1 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ac alphatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ad epsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ae etatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03af iotatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b0 upsilondieresistonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b1 alpha 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b2 beta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b3 gamma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b4 delta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b5 epsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b6 zeta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b7 eta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b8 theta 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03b9 iota 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ba kappa 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bb lambda 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bc uni03BC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bd nu 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03be xi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03bf omicron 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c0 pi original -U+03c1 rho 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c2 sigma1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c3 sigma 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c4 tau 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c5 upsilon 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c6 phi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c7 chi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c8 psi 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03c9 omega 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ca iotadieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cb upsilondieresis 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cc omicrontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cd upsilontonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ce omegatonos 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 1.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.2 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03cf uni03CF 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+03d0 uni03D0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d1 theta1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d2 Upsilon1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d3 uni03D3 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d4 uni03D4 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d5 phi1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.18 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03d6 omega1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03d7 uni03D7 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03d8 uni03D8 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03d9 uni03D9 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03da uni03DA 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03db uni03DB 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03dc uni03DC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03dd uni03DD 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03de uni03DE 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03df uni03DF 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e0 uni03E0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e1 uni03E1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03e2 uni03E2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e3 uni03E3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e4 uni03E4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e5 uni03E5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e6 uni03E6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e7 uni03E7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e8 uni03E8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03e9 uni03E9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ea uni03EA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03eb uni03EB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ec uni03EC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ed uni03ED 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ee uni03EE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03ef uni03EF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+03f0 uni03F0 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03f1 uni03F1 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03f2 uni03F2 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f3 uni03F3 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f4 uni03F4 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f5 uni03F5 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f6 uni03F6 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f7 uni03F7 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f8 uni03F8 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03f9 uni03F9 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03fa uni03FA 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03fb uni03FB 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+03fc uni03FC 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+03fd uni03FD 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03fe uni03FE 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+03ff uni03FF 1.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.0 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0400 uni0400 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0401 uni0401 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0402 uni0402 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0403 uni0403 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0404 uni0404 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0405 uni0405 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0406 uni0406 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0407 uni0407 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0408 uni0408 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0409 uni0409 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040a uni040A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040b uni040B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040c uni040C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040d uni040D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040e uni040E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+040f uni040F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0410 uni0410 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0411 uni0411 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0412 uni0412 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0413 uni0413 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0414 uni0414 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0415 uni0415 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0416 uni0416 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0417 uni0417 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0418 uni0418 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0419 uni0419 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041a uni041A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041b uni041B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041c uni041C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041d uni041D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041e uni041E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+041f uni041F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0420 uni0420 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0421 uni0421 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0422 uni0422 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0423 uni0423 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0424 uni0424 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0425 uni0425 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0426 uni0426 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0427 uni0427 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0428 uni0428 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0429 uni0429 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042a uni042A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042b uni042B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042c uni042C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042d uni042D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042e uni042E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+042f uni042F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0430 uni0430 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0431 uni0431 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0432 uni0432 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0433 uni0433 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0434 uni0434 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0435 uni0435 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0436 uni0436 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0437 uni0437 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0438 uni0438 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0439 uni0439 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043a uni043A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043b uni043B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043c uni043C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043d uni043D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043e uni043E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+043f uni043F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0440 uni0440 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0441 uni0441 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0442 uni0442 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0443 uni0443 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0444 uni0444 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0445 uni0445 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0446 uni0446 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0447 uni0447 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0448 uni0448 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0449 uni0449 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044a uni044A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044b uni044B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044c uni044C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044d uni044D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044e uni044E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+044f uni044F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0450 uni0450 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0451 uni0451 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0452 uni0452 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0453 uni0453 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0454 uni0454 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0455 uni0455 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0456 uni0456 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0457 uni0457 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0458 uni0458 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0459 uni0459 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045a uni045A 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045b uni045B 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045c uni045C 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045d uni045D 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045e uni045E 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+045f uni045F 1.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 1.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold) 1.6 (Serif Bold Italic, Serif Italic) 1.7 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+0460 uni0460 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0461 uni0461 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) -U+0462 uni0462 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0463 uni0463 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0464 uni0464 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0465 uni0465 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0466 uni0466 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0467 uni0467 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0468 uni0468 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0469 uni0469 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046a uni046A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.21 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+046b uni046B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.21 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+046c uni046C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+046d uni046D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+046e uni046E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+046f uni046F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0470 uni0470 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0471 uni0471 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0472 uni0472 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0473 uni0473 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0474 uni0474 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0475 uni0475 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.12 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0476 uni0476 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0477 uni0477 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0478 uni0478 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0479 uni0479 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047a uni047A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047b uni047B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047c uni047C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047d uni047D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047e uni047E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+047f uni047F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0480 uni0480 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0481 uni0481 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0482 uni0482 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0483 uni0483 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0484 uni0484 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0485 uni0485 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0486 uni0486 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0487 uni0487 2.9 (Sans, Sans Condensed) 2.27 (Sans Bold, Sans Bold Oblique, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0488 uni0488 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0489 uni0489 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048a uni048A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048b uni048B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048c uni048C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+048d uni048D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+048e uni048E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+048f uni048F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0490 uni0490 1.15 -U+0491 uni0491 1.15 -U+0492 uni0492 1.14 -U+0493 uni0493 1.14 -U+0494 uni0494 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0495 uni0495 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+0496 uni0496 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0497 uni0497 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.15 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0498 uni0498 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+0499 uni0499 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+049a uni049A 1.14 -U+049b uni049B 1.14 -U+049c uni049C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+049d uni049D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+049e uni049E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+049f uni049F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a0 uni04A0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04a1 uni04A1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04a2 uni04A2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a3 uni04A3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a4 uni04A4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+04a5 uni04A5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+04a6 uni04A6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a7 uni04A7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04a8 uni04A8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04a9 uni04A9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04aa uni04AA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ab uni04AB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ac uni04AC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ad uni04AD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04ae uni04AE 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04af uni04AF 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b0 uni04B0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+04b1 uni04B1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+04b2 uni04B2 1.14 -U+04b3 uni04B3 1.14 -U+04b4 uni04B4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04b5 uni04B5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04b6 uni04B6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b7 uni04B7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04b8 uni04B8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04b9 uni04B9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ba uni04BA 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04bb uni04BB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04bc uni04BC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04bd uni04BD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04be uni04BE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04bf uni04BF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c0 uni04C0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04c1 uni04C1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04c2 uni04C2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04c3 uni04C3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04c4 uni04C4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04c5 uni04C5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c6 uni04C6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04c7 uni04C7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04c8 uni04C8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+04c9 uni04C9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ca uni04CA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04cb uni04CB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04cc uni04CC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04cd uni04CD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04ce uni04CE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04cf uni04CF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04d0 uni04D0 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d1 uni04D1 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d2 uni04D2 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d3 uni04D3 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d4 uni04D4 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d5 uni04D5 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d6 uni04D6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d7 uni04D7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04d8 uni04D8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04d9 uni04D9 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04da uni04DA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04db uni04DB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04dc uni04DC 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04dd uni04DD 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04de uni04DE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04df uni04DF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e0 uni04E0 2.3 -U+04e1 uni04E1 2.3 -U+04e2 uni04E2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e3 uni04E3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e4 uni04E4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e5 uni04E5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04e6 uni04E6 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04e7 uni04E7 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04e8 uni04E8 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04e9 uni04E9 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04ea uni04EA 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04eb uni04EB 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+04ec uni04EC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ed uni04ED 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ee uni04EE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04ef uni04EF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f0 uni04F0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f1 uni04F1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f2 uni04F2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f3 uni04F3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f4 uni04F4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f5 uni04F5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04f6 uni04F6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f7 uni04F7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f8 uni04F8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+04f9 uni04F9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+04fa uni04FA 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fb uni04FB 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fc uni04FC 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fd uni04FD 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+04fe uni04FE 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+04ff uni04FF 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0500 uni0500 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0501 uni0501 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) -U+0502 uni0502 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0503 uni0503 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0504 uni0504 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0505 uni0505 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0506 uni0506 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0507 uni0507 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0508 uni0508 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0509 uni0509 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050a uni050A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050b uni050B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050c uni050C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050d uni050D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050e uni050E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+050f uni050F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0510 uni0510 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0511 uni0511 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0512 uni0512 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0513 uni0513 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0514 uni0514 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0515 uni0515 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+0516 uni0516 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0517 uni0517 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0518 uni0518 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0519 uni0519 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+051a uni051A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051b uni051B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051c uni051C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051d uni051D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+051e uni051E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+051f uni051F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0520 uni0520 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0521 uni0521 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0522 uni0522 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0523 uni0523 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0524 uni0524 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0525 uni0525 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0531 uni0531 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0532 uni0532 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0533 uni0533 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0534 uni0534 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0535 uni0535 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0536 uni0536 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0537 uni0537 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0538 uni0538 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0539 uni0539 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053a uni053A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053b uni053B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053c uni053C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053d uni053D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053e uni053E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+053f uni053F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0540 uni0540 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0541 uni0541 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0542 uni0542 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0543 uni0543 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0544 uni0544 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0545 uni0545 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0546 uni0546 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0547 uni0547 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0548 uni0548 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0549 uni0549 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054a uni054A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054b uni054B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054c uni054C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054d uni054D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054e uni054E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+054f uni054F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0550 uni0550 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0551 uni0551 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0552 uni0552 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0553 uni0553 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0554 uni0554 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0555 uni0555 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0556 uni0556 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0559 uni0559 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055a uni055A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055b uni055B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055c uni055C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055d uni055D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055e uni055E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+055f uni055F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0561 uni0561 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0562 uni0562 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0563 uni0563 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0564 uni0564 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0565 uni0565 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0566 uni0566 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0567 uni0567 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0568 uni0568 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0569 uni0569 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056a uni056A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056b uni056B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056c uni056C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056d uni056D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056e uni056E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+056f uni056F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0570 uni0570 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0571 uni0571 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0572 uni0572 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0573 uni0573 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0574 uni0574 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0575 uni0575 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0576 uni0576 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0577 uni0577 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0578 uni0578 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0579 uni0579 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057a uni057A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057b uni057B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057c uni057C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057d uni057D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057e uni057E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+057f uni057F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0580 uni0580 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0581 uni0581 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0582 uni0582 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0583 uni0583 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0584 uni0584 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0585 uni0585 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0586 uni0586 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0587 uni0587 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+0589 uni0589 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+058a uni058A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+05b0 uni05B0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b1 uni05B1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b2 uni05B2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b3 uni05B3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b4 uni05B4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b5 uni05B5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b6 uni05B6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b7 uni05B7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b8 uni05B8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05b9 uni05B9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05ba uni05BA 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+05bb uni05BB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05bc uni05BC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05bd uni05BD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05be uni05BE 2.9 (Sans Condensed Oblique, Sans Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) -U+05bf uni05BF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c0 uni05C0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c1 uni05C1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c2 uni05C2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c3 uni05C3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c6 uni05C6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05c7 uni05C7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d0 uni05D0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d1 uni05D1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d2 uni05D2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d3 uni05D3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d4 uni05D4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d5 uni05D5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d6 uni05D6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d7 uni05D7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d8 uni05D8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05d9 uni05D9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05da uni05DA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05db uni05DB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05dc uni05DC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05dd uni05DD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05de uni05DE 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05df uni05DF 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e0 uni05E0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e1 uni05E1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e2 uni05E2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e3 uni05E3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e4 uni05E4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e5 uni05E5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e6 uni05E6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e7 uni05E7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e8 uni05E8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05e9 uni05E9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05ea uni05EA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f0 uni05F0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f1 uni05F1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f2 uni05F2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+05f3 uni05F3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+05f4 uni05F4 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0606 uni0606 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+0607 uni0607 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+0609 uni0609 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+060a uni060A 2.26 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold) -U+060c uni060C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0615 uni0615 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+061b uni061B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+061f uni061F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0621 uni0621 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0622 uni0622 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0623 uni0623 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0624 uni0624 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0625 uni0625 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0626 uni0626 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0627 uni0627 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0628 uni0628 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0629 uni0629 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062a uni062A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062b uni062B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062c uni062C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062d uni062D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062e uni062E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+062f uni062F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0630 uni0630 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0631 uni0631 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0632 uni0632 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0633 uni0633 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0634 uni0634 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0635 uni0635 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0636 uni0636 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0637 uni0637 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0638 uni0638 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0639 uni0639 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+063a uni063A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0640 uni0640 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0641 uni0641 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0642 uni0642 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0643 uni0643 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0644 uni0644 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0645 uni0645 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0646 uni0646 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0647 uni0647 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0648 uni0648 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0649 uni0649 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064a uni064A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064b uni064B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064c uni064C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064d uni064D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064e uni064E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+064f uni064F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0650 uni0650 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0651 uni0651 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0652 uni0652 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0653 uni0653 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0654 uni0654 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0655 uni0655 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0657 uni0657 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+065a uni065A 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0660 uni0660 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0661 uni0661 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0662 uni0662 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0663 uni0663 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0664 uni0664 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0665 uni0665 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0666 uni0666 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0667 uni0667 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0668 uni0668 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0669 uni0669 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066a uni066A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066b uni066B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066c uni066C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066d uni066D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066e uni066E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+066f uni066F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0670 uni0670 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0674 uni0674 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans ExtraLight) 2.16 (Sans Mono, Sans Mono Bold) -U+0679 uni0679 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067a uni067A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067b uni067B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067c uni067C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067d uni067D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067e uni067E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+067f uni067F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0680 uni0680 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0681 uni0681 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0682 uni0682 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0683 uni0683 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0684 uni0684 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0685 uni0685 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0686 uni0686 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0687 uni0687 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0688 uni0688 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0689 uni0689 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068a uni068A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068b uni068B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068c uni068C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068d uni068D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068e uni068E 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+068f uni068F 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0690 uni0690 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0691 uni0691 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0692 uni0692 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0693 uni0693 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0694 uni0694 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0695 uni0695 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0696 uni0696 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0697 uni0697 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0698 uni0698 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+0699 uni0699 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069a uni069A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069b uni069B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069c uni069C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069d uni069D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069e uni069E 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+069f uni069F 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a0 uni06A0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a1 uni06A1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06a2 uni06A2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a3 uni06A3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a4 uni06A4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06a5 uni06A5 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a6 uni06A6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a7 uni06A7 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a8 uni06A8 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06a9 uni06A9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06aa uni06AA 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ab uni06AB 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ac uni06AC 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ad uni06AD 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ae uni06AE 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06af uni06AF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06b0 uni06B0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b1 uni06B1 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b2 uni06B2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b3 uni06B3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b4 uni06B4 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b5 uni06B5 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06b6 uni06B6 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b7 uni06B7 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b8 uni06B8 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06b9 uni06B9 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06ba uni06BA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06bb uni06BB 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bc uni06BC 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bd uni06BD 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06be uni06BE 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06bf uni06BF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+06c6 uni06C6 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06cc uni06CC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06ce uni06CE 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06d5 uni06D5 2.10 (Sans, Sans Bold) 2.11 (Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f0 uni06F0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f1 uni06F1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f2 uni06F2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f3 uni06F3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f4 uni06F4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f5 uni06F5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f6 uni06F6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f7 uni06F7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f8 uni06F8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+06f9 uni06F9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+07c0 uni07C0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c1 uni07C1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c2 uni07C2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c3 uni07C3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c4 uni07C4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c5 uni07C5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c6 uni07C6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c7 uni07C7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c8 uni07C8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07c9 uni07C9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ca uni07CA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cb uni07CB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cc uni07CC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cd uni07CD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ce uni07CE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07cf uni07CF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d0 uni07D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d1 uni07D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d2 uni07D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d3 uni07D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d4 uni07D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d5 uni07D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d6 uni07D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d7 uni07D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d8 uni07D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07d9 uni07D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07da uni07DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07db uni07DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07dc uni07DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07dd uni07DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07de uni07DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07df uni07DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e0 uni07E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e1 uni07E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e2 uni07E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e3 uni07E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e4 uni07E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e5 uni07E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e6 uni07E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07e7 uni07E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07eb uni07EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ec uni07EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ed uni07ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ee uni07EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07ef uni07EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f0 uni07F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f1 uni07F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f2 uni07F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f3 uni07F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f4 uni07F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f5 uni07F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f8 uni07F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07f9 uni07F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+07fa uni07FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+0e3f uni0E3F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0e81 uni0E81 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e82 uni0E82 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e84 uni0E84 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e87 uni0E87 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e88 uni0E88 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e8a uni0E8A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e8d uni0E8D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e94 uni0E94 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e95 uni0E95 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e96 uni0E96 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e97 uni0E97 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e99 uni0E99 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9a uni0E9A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9b uni0E9B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9c uni0E9C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9d uni0E9D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9e uni0E9E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0e9f uni0E9F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea1 uni0EA1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea2 uni0EA2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea3 uni0EA3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea5 uni0EA5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ea7 uni0EA7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eaa uni0EAA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eab uni0EAB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ead uni0EAD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eae uni0EAE 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eaf uni0EAF 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb0 uni0EB0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb1 uni0EB1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb2 uni0EB2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb3 uni0EB3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb4 uni0EB4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb5 uni0EB5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb6 uni0EB6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb7 uni0EB7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb8 uni0EB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eb9 uni0EB9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebb uni0EBB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebc uni0EBC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ebd uni0EBD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec0 uni0EC0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec1 uni0EC1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec2 uni0EC2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec3 uni0EC3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec4 uni0EC4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec6 uni0EC6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ec8 uni0EC8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ec9 uni0EC9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0eca uni0ECA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecb uni0ECB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecc uni0ECC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ecd uni0ECD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+0ed0 uni0ED0 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed1 uni0ED1 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed2 uni0ED2 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed3 uni0ED3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed4 uni0ED4 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed5 uni0ED5 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed6 uni0ED6 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed7 uni0ED7 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0ed8 uni0ED8 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+0ed9 uni0ED9 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0edc uni0EDC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+0edd uni0EDD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+10a0 uni10A0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a1 uni10A1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a2 uni10A2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a3 uni10A3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a4 uni10A4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a5 uni10A5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a6 uni10A6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a7 uni10A7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a8 uni10A8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10a9 uni10A9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10aa uni10AA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ab uni10AB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ac uni10AC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ad uni10AD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ae uni10AE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10af uni10AF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b0 uni10B0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b1 uni10B1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b2 uni10B2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b3 uni10B3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b4 uni10B4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b5 uni10B5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b6 uni10B6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b7 uni10B7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b8 uni10B8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10b9 uni10B9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10ba uni10BA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bb uni10BB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bc uni10BC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bd uni10BD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10be uni10BE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10bf uni10BF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c0 uni10C0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c1 uni10C1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c2 uni10C2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c3 uni10C3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c4 uni10C4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10c5 uni10C5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+10d0 uni10D0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d1 uni10D1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d2 uni10D2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d3 uni10D3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d4 uni10D4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d5 uni10D5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d6 uni10D6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d7 uni10D7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d8 uni10D8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10d9 uni10D9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10da uni10DA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10db uni10DB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10dc uni10DC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10dd uni10DD 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10de uni10DE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10df uni10DF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e0 uni10E0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e1 uni10E1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e2 uni10E2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e3 uni10E3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e4 uni10E4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e5 uni10E5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e6 uni10E6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e7 uni10E7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e8 uni10E8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10e9 uni10E9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ea uni10EA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10eb uni10EB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ec uni10EC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ed uni10ED 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ee uni10EE 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10ef uni10EF 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f0 uni10F0 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f1 uni10F1 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f2 uni10F2 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f3 uni10F3 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f4 uni10F4 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f5 uni10F5 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f6 uni10F6 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f7 uni10F7 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f8 uni10F8 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10f9 uni10F9 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fa uni10FA 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fb uni10FB 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+10fc uni10FC 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Mono, Sans Mono Bold, Serif, Serif Bold, Serif Condensed, Serif Condensed Bold) 2.20 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+1401 uni1401 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1402 uni1402 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1403 uni1403 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1404 uni1404 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1405 uni1405 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1406 uni1406 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1407 uni1407 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1409 uni1409 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140a uni140A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140b uni140B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140c uni140C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140d uni140D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140e uni140E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+140f uni140F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1410 uni1410 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1411 uni1411 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1412 uni1412 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1413 uni1413 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1414 uni1414 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1415 uni1415 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1416 uni1416 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1417 uni1417 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1418 uni1418 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1419 uni1419 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141a uni141A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141b uni141B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141d uni141D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141e uni141E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+141f uni141F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1420 uni1420 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1421 uni1421 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1422 uni1422 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1423 uni1423 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1424 uni1424 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1425 uni1425 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1426 uni1426 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1427 uni1427 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1428 uni1428 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1429 uni1429 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142a uni142A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142b uni142B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142c uni142C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142d uni142D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142e uni142E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+142f uni142F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1430 uni1430 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1431 uni1431 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1432 uni1432 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1433 uni1433 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1434 uni1434 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1435 uni1435 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1437 uni1437 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1438 uni1438 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1439 uni1439 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143a uni143A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143b uni143B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143c uni143C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143d uni143D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143e uni143E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+143f uni143F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1440 uni1440 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1441 uni1441 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1442 uni1442 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1443 uni1443 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1444 uni1444 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1445 uni1445 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1446 uni1446 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1447 uni1447 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1448 uni1448 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1449 uni1449 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144a uni144A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144c uni144C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144d uni144D 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144e uni144E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+144f uni144F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1450 uni1450 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1451 uni1451 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1452 uni1452 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1454 uni1454 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1455 uni1455 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1456 uni1456 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1457 uni1457 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1458 uni1458 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1459 uni1459 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145a uni145A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145b uni145B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145c uni145C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145d uni145D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145e uni145E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+145f uni145F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1460 uni1460 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1461 uni1461 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1462 uni1462 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1463 uni1463 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1464 uni1464 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1465 uni1465 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1466 uni1466 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1467 uni1467 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1468 uni1468 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1469 uni1469 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146a uni146A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146b uni146B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146c uni146C 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146d uni146D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146e uni146E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+146f uni146F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1470 uni1470 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1471 uni1471 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1472 uni1472 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1473 uni1473 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1474 uni1474 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1475 uni1475 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1476 uni1476 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1477 uni1477 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1478 uni1478 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1479 uni1479 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147a uni147A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147b uni147B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147c uni147C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147d uni147D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147e uni147E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+147f uni147F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1480 uni1480 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1481 uni1481 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1482 uni1482 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1483 uni1483 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1484 uni1484 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1485 uni1485 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1486 uni1486 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1487 uni1487 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1488 uni1488 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1489 uni1489 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148a uni148A 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148b uni148B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148c uni148C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148d uni148D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148e uni148E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+148f uni148F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1490 uni1490 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1491 uni1491 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1492 uni1492 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1493 uni1493 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1494 uni1494 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1495 uni1495 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1496 uni1496 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1497 uni1497 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1498 uni1498 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1499 uni1499 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149a uni149A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149b uni149B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149c uni149C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149d uni149D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149e uni149E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+149f uni149F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a0 uni14A0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a1 uni14A1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a2 uni14A2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a3 uni14A3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a4 uni14A4 2.13 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.15 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+14a5 uni14A5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a6 uni14A6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a7 uni14A7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a8 uni14A8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14a9 uni14A9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14aa uni14AA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ab uni14AB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ac uni14AC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ad uni14AD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ae uni14AE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14af uni14AF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b0 uni14B0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b1 uni14B1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b2 uni14B2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b3 uni14B3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b4 uni14B4 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b5 uni14B5 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b6 uni14B6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b7 uni14B7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b8 uni14B8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14b9 uni14B9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ba uni14BA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bb uni14BB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bc uni14BC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14bd uni14BD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c0 uni14C0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c1 uni14C1 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c2 uni14C2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c3 uni14C3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c4 uni14C4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c5 uni14C5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c6 uni14C6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c7 uni14C7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c8 uni14C8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14c9 uni14C9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ca uni14CA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cb uni14CB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cc uni14CC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cd uni14CD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ce uni14CE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14cf uni14CF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d0 uni14D0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d1 uni14D1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d2 uni14D2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d3 uni14D3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d4 uni14D4 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d5 uni14D5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d6 uni14D6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d7 uni14D7 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d8 uni14D8 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14d9 uni14D9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14da uni14DA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14db uni14DB 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14dc uni14DC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14dd uni14DD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14de uni14DE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14df uni14DF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e0 uni14E0 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e1 uni14E1 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e2 uni14E2 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e3 uni14E3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e4 uni14E4 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e5 uni14E5 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e6 uni14E6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e7 uni14E7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e8 uni14E8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14e9 uni14E9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ea uni14EA 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ec uni14EC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ed uni14ED 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ee uni14EE 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ef uni14EF 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f0 uni14F0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f1 uni14F1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f2 uni14F2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f3 uni14F3 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f4 uni14F4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f5 uni14F5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f6 uni14F6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f7 uni14F7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f8 uni14F8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14f9 uni14F9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fa uni14FA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fb uni14FB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fc uni14FC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fd uni14FD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14fe uni14FE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+14ff uni14FF 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1500 uni1500 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1501 uni1501 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1502 uni1502 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1503 uni1503 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1504 uni1504 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1505 uni1505 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1506 uni1506 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1507 uni1507 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1510 uni1510 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1511 uni1511 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1512 uni1512 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1513 uni1513 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1514 uni1514 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1515 uni1515 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1516 uni1516 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1517 uni1517 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1518 uni1518 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1519 uni1519 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151a uni151A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151b uni151B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151c uni151C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151d uni151D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151e uni151E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+151f uni151F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1520 uni1520 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1521 uni1521 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1522 uni1522 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1523 uni1523 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1524 uni1524 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1525 uni1525 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1526 uni1526 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1527 uni1527 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1528 uni1528 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1529 uni1529 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152a uni152A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152b uni152B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152c uni152C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152d uni152D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152e uni152E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+152f uni152F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1530 uni1530 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1531 uni1531 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1532 uni1532 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1533 uni1533 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1534 uni1534 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1535 uni1535 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1536 uni1536 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1537 uni1537 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1538 uni1538 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1539 uni1539 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153a uni153A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153b uni153B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153c uni153C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153d uni153D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+153e uni153E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1540 uni1540 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1541 uni1541 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1542 uni1542 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1543 uni1543 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1544 uni1544 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1545 uni1545 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1546 uni1546 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1547 uni1547 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1548 uni1548 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1549 uni1549 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154a uni154A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154b uni154B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154c uni154C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154d uni154D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154e uni154E 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+154f uni154F 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1550 uni1550 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1552 uni1552 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1553 uni1553 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1554 uni1554 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1555 uni1555 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1556 uni1556 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1557 uni1557 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1558 uni1558 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1559 uni1559 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155a uni155A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155b uni155B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155c uni155C 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155d uni155D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155e uni155E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+155f uni155F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1560 uni1560 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1561 uni1561 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1562 uni1562 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1563 uni1563 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1564 uni1564 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1565 uni1565 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1566 uni1566 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1567 uni1567 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1568 uni1568 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1569 uni1569 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+156a uni156A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1574 uni1574 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1575 uni1575 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1576 uni1576 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1577 uni1577 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1578 uni1578 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1579 uni1579 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157a uni157A 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157b uni157B 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157c uni157C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157d uni157D 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157e uni157E 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+157f uni157F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1580 uni1580 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1581 uni1581 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1582 uni1582 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1583 uni1583 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1584 uni1584 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1585 uni1585 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158a uni158A 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158b uni158B 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158c uni158C 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158d uni158D 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158e uni158E 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+158f uni158F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1590 uni1590 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1591 uni1591 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1592 uni1592 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1593 uni1593 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1594 uni1594 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1595 uni1595 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1596 uni1596 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a0 uni15A0 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a1 uni15A1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a2 uni15A2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a3 uni15A3 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a4 uni15A4 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a5 uni15A5 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a6 uni15A6 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a7 uni15A7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a8 uni15A8 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15a9 uni15A9 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15aa uni15AA 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ab uni15AB 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ac uni15AC 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ad uni15AD 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15ae uni15AE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15af uni15AF 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15de uni15DE 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+15e1 uni15E1 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1646 uni1646 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1647 uni1647 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+166e uni166E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+166f uni166F 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1670 uni1670 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1671 uni1671 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1672 uni1672 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1673 uni1673 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1674 uni1674 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1675 uni1675 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1676 uni1676 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1680 uni1680 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1681 uni1681 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1682 uni1682 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1683 uni1683 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1684 uni1684 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1685 uni1685 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1686 uni1686 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1687 uni1687 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1688 uni1688 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1689 uni1689 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168a uni168A 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168b uni168B 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168c uni168C 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168d uni168D 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168e uni168E 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+168f uni168F 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1690 uni1690 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1691 uni1691 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1692 uni1692 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1693 uni1693 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1694 uni1694 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1695 uni1695 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1696 uni1696 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1697 uni1697 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1698 uni1698 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1699 uni1699 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169a uni169A 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169b uni169B 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+169c uni169C 2.22 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.28 (Sans ExtraLight) -U+1d00 uni1D00 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d01 uni1D01 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d02 uni1D02 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d03 uni1D03 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d04 uni1D04 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d05 uni1D05 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d06 uni1D06 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d07 uni1D07 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d08 uni1D08 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+1d09 uni1D09 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d0a uni1D0A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0b uni1D0B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0c uni1D0C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0d uni1D0D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0e uni1D0E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d0f uni1D0F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d10 uni1D10 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d11 uni1D11 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d12 uni1D12 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d13 uni1D13 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d14 uni1D14 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d15 uni1D15 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d16 uni1D16 2.3 -U+1d17 uni1D17 2.3 -U+1d18 uni1D18 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d19 uni1D19 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1a uni1D1A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1b uni1D1B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1c uni1D1C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d1d uni1D1D 2.3 -U+1d1e uni1D1E 2.3 -U+1d1f uni1D1F 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+1d20 uni1D20 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d21 uni1D21 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d22 uni1D22 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d23 uni1D23 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d24 uni1D24 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d25 uni1D25 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d26 uni1D26 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d27 uni1D27 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d28 uni1D28 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d29 uni1D29 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2a uni1D2A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2b uni1D2B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans ExtraLight) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d2c uni1D2C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2d uni1D2D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2e uni1D2E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d2f uni1D2F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d30 uni1D30 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d31 uni1D31 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d32 uni1D32 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d33 uni1D33 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d34 uni1D34 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d35 uni1D35 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d36 uni1D36 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d37 uni1D37 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d38 uni1D38 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d39 uni1D39 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3a uni1D3A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3b uni1D3B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3c uni1D3C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3d uni1D3D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d3e uni1D3E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d3f uni1D3F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d40 uni1D40 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d41 uni1D41 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d42 uni1D42 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d43 uni1D43 2.3 -U+1d44 uni1D44 2.3 -U+1d45 uni1D45 2.3 -U+1d46 uni1D46 2.3 -U+1d47 uni1D47 2.3 -U+1d48 uni1D48 2.3 -U+1d49 uni1D49 2.3 -U+1d4a uni1D4A 2.3 -U+1d4b uni1D4B 2.3 -U+1d4c uni1D4C 2.3 -U+1d4d uni1D4D 2.3 -U+1d4e uni1D4E 2.3 -U+1d4f uni1D4F 2.3 -U+1d50 uni1D50 2.3 -U+1d51 uni1D51 2.3 -U+1d52 uni1D52 2.3 -U+1d53 uni1D53 2.3 -U+1d54 uni1D54 2.3 -U+1d55 uni1D55 2.3 -U+1d56 uni1D56 2.3 -U+1d57 uni1D57 2.3 -U+1d58 uni1D58 2.3 -U+1d59 uni1D59 2.3 -U+1d5a uni1D5A 2.3 -U+1d5b uni1D5B 2.3 -U+1d5c uni1D5C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5d uni1D5D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5e uni1D5E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d5f uni1D5F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d60 uni1D60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d61 uni1D61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d62 uni1D62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d63 uni1D63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d64 uni1D64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d65 uni1D65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d66 uni1D66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d67 uni1D67 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d68 uni1D68 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d69 uni1D69 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d6a uni1D6A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d6b uni1D6B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d77 uni1D77 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1d78 uni1D78 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1d7b uni1D7B 2.3 -U+1d7c uni1D7C 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d7d uni1D7D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d7e uni1D7E 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d7f uni1D7F 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1d85 uni1D85 2.3 -U+1d9b uni1D9B 2.3 -U+1d9c uni1D9C 2.3 -U+1d9d uni1D9D 2.3 -U+1d9e uni1D9E 2.3 -U+1d9f uni1D9F 2.3 -U+1da0 uni1DA0 2.3 -U+1da1 uni1DA1 2.3 -U+1da2 uni1DA2 2.3 -U+1da3 uni1DA3 2.3 -U+1da4 uni1DA4 2.3 -U+1da5 uni1DA5 2.3 -U+1da6 uni1DA6 2.3 -U+1da7 uni1DA7 2.3 -U+1da8 uni1DA8 2.3 -U+1da9 uni1DA9 2.3 -U+1daa uni1DAA 2.3 -U+1dab uni1DAB 2.3 -U+1dac uni1DAC 2.3 -U+1dad uni1DAD 2.3 -U+1dae uni1DAE 2.3 -U+1daf uni1DAF 2.3 -U+1db0 uni1DB0 2.3 -U+1db1 uni1DB1 2.3 -U+1db2 uni1DB2 2.3 -U+1db3 uni1DB3 2.3 -U+1db4 uni1DB4 2.3 -U+1db5 uni1DB5 2.3 -U+1db6 uni1DB6 2.3 -U+1db7 uni1DB7 2.3 -U+1db8 uni1DB8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1db9 uni1DB9 2.3 -U+1dba uni1DBA 2.3 -U+1dbb uni1DBB 2.3 -U+1dbc uni1DBC 2.3 -U+1dbd uni1DBD 2.3 -U+1dbe uni1DBE 2.3 -U+1dbf uni1DBF 2.3 -U+1dc4 uni1DC4 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc5 uni1DC5 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc6 uni1DC6 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc7 uni1DC7 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc8 uni1DC8 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1dc9 uni1DC9 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e00 uni1E00 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e01 uni1E01 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e02 uni1E02 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e03 uni1E03 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e04 uni1E04 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e05 uni1E05 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e06 uni1E06 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e07 uni1E07 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e08 uni1E08 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e09 uni1E09 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0a uni1E0A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0b uni1E0B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0c uni1E0C 2.1 -U+1e0d uni1E0D 2.1 -U+1e0e uni1E0E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e0f uni1E0F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e10 uni1E10 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e11 uni1E11 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e12 uni1E12 1.13 -U+1e13 uni1E13 1.13 -U+1e14 uni1E14 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e15 uni1E15 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e16 uni1E16 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e17 uni1E17 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e18 uni1E18 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e19 uni1E19 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1a uni1E1A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1b uni1E1B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1c uni1E1C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1e1d uni1E1D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+1e1e uni1E1E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e1f uni1E1F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e20 uni1E20 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e21 uni1E21 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e22 uni1E22 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e23 uni1E23 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e24 uni1E24 2.1 -U+1e25 uni1E25 2.1 -U+1e26 uni1E26 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e27 uni1E27 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e28 uni1E28 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e29 uni1E29 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2a uni1E2A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2b uni1E2B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2c uni1E2C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2d uni1E2D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e2e uni1E2E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e2f uni1E2F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e30 uni1E30 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e31 uni1E31 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e32 uni1E32 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e33 uni1E33 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e34 uni1E34 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e35 uni1E35 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e36 uni1E36 2.1 -U+1e37 uni1E37 2.1 -U+1e38 uni1E38 2.1 -U+1e39 uni1E39 2.1 -U+1e3a uni1E3A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3b uni1E3B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3c uni1E3C 1.13 -U+1e3d uni1E3D 1.13 -U+1e3e uni1E3E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e3f uni1E3F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e40 uni1E40 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e41 uni1E41 2.1 -U+1e42 uni1E42 2.1 -U+1e43 uni1E43 2.1 -U+1e44 uni1E44 1.13 -U+1e45 uni1E45 1.13 -U+1e46 uni1E46 2.1 -U+1e47 uni1E47 2.1 -U+1e48 uni1E48 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e49 uni1E49 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e4a uni1E4A 1.13 -U+1e4b uni1E4B 1.13 -U+1e4c uni1E4C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e4d uni1E4D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1e4e uni1E4E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e4f uni1E4F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e50 uni1E50 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e51 uni1E51 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e52 uni1E52 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e53 uni1E53 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e54 uni1E54 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e55 uni1E55 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e56 uni1E56 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e57 uni1E57 2.1 -U+1e58 uni1E58 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e59 uni1E59 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e5a uni1E5A 2.1 -U+1e5b uni1E5B 2.1 -U+1e5c uni1E5C 2.1 -U+1e5d uni1E5D 2.1 -U+1e5e uni1E5E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e5f uni1E5F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e60 uni1E60 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e61 uni1E61 2.1 -U+1e62 uni1E62 2.1 -U+1e63 uni1E63 2.1 -U+1e64 uni1E64 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e65 uni1E65 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e66 uni1E66 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e67 uni1E67 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e68 uni1E68 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e69 uni1E69 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6a uni1E6A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6b uni1E6B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6c uni1E6C 2.1 -U+1e6d uni1E6D 2.1 -U+1e6e uni1E6E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e6f uni1E6F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e70 uni1E70 1.13 -U+1e71 uni1E71 1.13 -U+1e72 uni1E72 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e73 uni1E73 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e74 uni1E74 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e75 uni1E75 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e76 uni1E76 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e77 uni1E77 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e78 uni1E78 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e79 uni1E79 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7a uni1E7A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e7b uni1E7B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e7c uni1E7C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7d uni1E7D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e7e uni1E7E 2.1 -U+1e7f uni1E7F 2.1 -U+1e80 Wgrave 1.2 -U+1e81 wgrave 1.2 -U+1e82 Wacute 1.2 -U+1e83 wacute 1.2 -U+1e84 Wdieresis 1.2 -U+1e85 wdieresis 1.2 -U+1e86 uni1E86 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e87 uni1E87 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e88 uni1E88 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e89 uni1E89 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8a uni1E8A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8b uni1E8B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8c uni1E8C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e8d uni1E8D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e8e uni1E8E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e8f uni1E8F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e90 uni1E90 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e91 uni1E91 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e92 uni1E92 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e93 uni1E93 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e94 uni1E94 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e95 uni1E95 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e96 uni1E96 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e97 uni1E97 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e98 uni1E98 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e99 uni1E99 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1e9a uni1E9A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1e9b uni1E9B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1e9c uni1E9C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e9d uni1E9D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1e9e uni1E9E 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.32 (Sans ExtraLight) -U+1e9f uni1E9F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1ea0 uni1EA0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ea1 uni1EA1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ea2 uni1EA2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ea3 uni1EA3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ea4 uni1EA4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea5 uni1EA5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea6 uni1EA6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea7 uni1EA7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea8 uni1EA8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ea9 uni1EA9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eaa uni1EAA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eab uni1EAB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eac uni1EAC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ead uni1EAD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eae uni1EAE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eaf uni1EAF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb0 uni1EB0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1eb1 uni1EB1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.22 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1eb2 uni1EB2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb3 uni1EB3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb4 uni1EB4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb5 uni1EB5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eb6 uni1EB6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eb7 uni1EB7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eb8 uni1EB8 2.2 -U+1eb9 uni1EB9 2.2 -U+1eba uni1EBA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ebb uni1EBB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ebc uni1EBC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ebd uni1EBD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ebe uni1ebe 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ebf uni1ebF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec0 uni1EC0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec1 uni1EC1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec2 uni1EC2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec3 uni1EC3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec4 uni1EC4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec5 uni1EC5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ec6 uni1EC6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ec7 uni1EC7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ec8 uni1EC8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ec9 uni1EC9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1eca uni1ECA 2.2 -U+1ecb uni1ECB 2.2 -U+1ecc uni1ECC 2.2 -U+1ecd uni1ECD 2.2 -U+1ece uni1ECE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ecf uni1ECF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ed0 uni1ED0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed1 uni1ED1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed2 uni1ED2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed3 uni1ED3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed4 uni1ED4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed5 uni1ED5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed6 uni1ED6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed7 uni1ED7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ed8 uni1ED8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1ed9 uni1ED9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1eda uni1EDA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edb uni1EDB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edc uni1EDC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edd uni1EDD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ede uni1EDE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1edf uni1EDF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee0 uni1EE0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee1 uni1EE1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee2 uni1EE2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee3 uni1EE3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee4 uni1EE4 2.2 -U+1ee5 uni1EE5 2.2 -U+1ee6 uni1EE6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ee7 uni1EE7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ee8 uni1EE8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ee9 uni1EE9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eea uni1EEA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eeb uni1EEB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eec uni1EEC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eed uni1EED 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eee uni1EEE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1eef uni1EEF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef0 uni1EF0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef1 uni1EF1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1ef2 Ygrave 1.2 -U+1ef3 ygrave 1.2 -U+1ef4 uni1EF4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef5 uni1EF5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef6 uni1EF6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ef7 uni1EF7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ef8 uni1EF8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ef9 uni1EF9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1efa uni1EFA 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1efb uni1EFB 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+1f00 uni1F00 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f01 uni1F01 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f02 uni1F02 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f03 uni1F03 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f04 uni1F04 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f05 uni1F05 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f06 uni1F06 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f07 uni1F07 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f08 uni1F08 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f09 uni1F09 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0a uni1F0A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0b uni1F0B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0c uni1F0C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0d uni1F0D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0e uni1F0E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f0f uni1F0F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f10 uni1F10 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f11 uni1F11 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f12 uni1F12 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f13 uni1F13 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f14 uni1F14 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f15 uni1F15 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f18 uni1F18 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f19 uni1F19 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1a uni1F1A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1b uni1F1B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1c uni1F1C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f1d uni1F1D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f20 uni1F20 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f21 uni1F21 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f22 uni1F22 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f23 uni1F23 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f24 uni1F24 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f25 uni1F25 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f26 uni1F26 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f27 uni1F27 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f28 uni1F28 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f29 uni1F29 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2a uni1F2A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2b uni1F2B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2c uni1F2C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2d uni1F2D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2e uni1F2E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f2f uni1F2F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f30 uni1F30 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f31 uni1F31 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f32 uni1F32 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f33 uni1F33 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f34 uni1F34 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f35 uni1F35 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f36 uni1F36 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f37 uni1F37 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f38 uni1F38 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f39 uni1F39 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3a uni1F3A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3b uni1F3B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3c uni1F3C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3d uni1F3D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3e uni1F3E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f3f uni1F3F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f40 uni1F40 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f41 uni1F41 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f42 uni1F42 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f43 uni1F43 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f44 uni1F44 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f45 uni1F45 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f48 uni1F48 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f49 uni1F49 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4a uni1F4A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4b uni1F4B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4c uni1F4C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f4d uni1F4D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f50 uni1F50 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f51 uni1F51 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f52 uni1F52 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f53 uni1F53 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f54 uni1F54 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f55 uni1F55 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f56 uni1F56 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f57 uni1F57 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f59 uni1F59 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5b uni1F5B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5d uni1F5D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f5f uni1F5F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f60 uni1F60 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f61 uni1F61 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f62 uni1F62 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f63 uni1F63 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f64 uni1F64 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f65 uni1F65 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f66 uni1F66 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f67 uni1F67 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f68 uni1F68 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f69 uni1F69 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6a uni1F6A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6b uni1F6B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6c uni1F6C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6d uni1F6D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6e uni1F6E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f6f uni1F6F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f70 uni1F70 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f71 uni1F71 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f72 uni1F72 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f73 uni1F73 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f74 uni1F74 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f75 uni1F75 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f76 uni1F76 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f77 uni1F77 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f78 uni1F78 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f79 uni1F79 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1f7a uni1F7A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7b uni1F7B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7c uni1F7C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f7d uni1F7D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f80 uni1F80 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f81 uni1F81 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f82 uni1F82 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f83 uni1F83 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f84 uni1F84 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f85 uni1F85 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f86 uni1F86 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f87 uni1F87 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f88 uni1F88 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f89 uni1F89 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8a uni1F8A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8b uni1F8B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8c uni1F8C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8d uni1F8D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8e uni1F8E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f8f uni1F8F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f90 uni1F90 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f91 uni1F91 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f92 uni1F92 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f93 uni1F93 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f94 uni1F94 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f95 uni1F95 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f96 uni1F96 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f97 uni1F97 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f98 uni1F98 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f99 uni1F99 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9a uni1F9A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9b uni1F9B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9c uni1F9C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9d uni1F9D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9e uni1F9E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1f9f uni1F9F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa0 uni1FA0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa1 uni1FA1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa2 uni1FA2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa3 uni1FA3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa4 uni1FA4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa5 uni1FA5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa6 uni1FA6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa7 uni1FA7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa8 uni1FA8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fa9 uni1FA9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1faa uni1FAA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fab uni1FAB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fac uni1FAC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fad uni1FAD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fae uni1FAE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1faf uni1FAF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb0 uni1FB0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb1 uni1FB1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb2 uni1FB2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb3 uni1FB3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb4 uni1FB4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb6 uni1FB6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb7 uni1FB7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fb8 uni1FB8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fb9 uni1FB9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fba uni1FBA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbb uni1FBB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbc uni1FBC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fbd uni1FBD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fbe uni1FBE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fbf uni1FBF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc0 uni1FC0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc1 uni1FC1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc2 uni1FC2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc3 uni1FC3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc4 uni1FC4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc6 uni1FC6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc7 uni1FC7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fc8 uni1FC8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fc9 uni1FC9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fca uni1FCA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fcb uni1FCB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fcc uni1FCC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fcd uni1FCD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fce uni1FCE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fcf uni1FCF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd0 uni1FD0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd1 uni1FD1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd2 uni1FD2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd3 uni1FD3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd6 uni1FD6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd7 uni1FD7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fd8 uni1FD8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fd9 uni1FD9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fda uni1FDA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fdb uni1FDB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fdd uni1FDD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fde uni1FDE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fdf uni1FDF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe0 uni1FE0 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe1 uni1FE1 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe2 uni1FE2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe3 uni1FE3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe4 uni1FE4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe5 uni1FE5 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe6 uni1FE6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe7 uni1FE7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fe8 uni1FE8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fe9 uni1FE9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fea uni1FEA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1feb uni1FEB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fec uni1FEC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1fed uni1FED 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fee uni1FEE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1fef uni1FEF 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ff2 uni1FF2 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff3 uni1FF3 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff4 uni1FF4 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff6 uni1FF6 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff7 uni1FF7 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ff8 uni1FF8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ff9 uni1FF9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ffa uni1FFA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffb uni1FFB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.10 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffc uni1FFC 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+1ffd uni1FFD 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+1ffe uni1FFE 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.5 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+2000 uni2000 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2001 uni2001 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2002 uni2002 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2003 uni2003 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2004 uni2004 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2005 uni2005 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2006 uni2006 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2007 uni2007 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2008 uni2008 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2009 uni2009 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+200a uni200A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+200b uni200B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200c uni200C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200d uni200D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200e uni200E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+200f uni200F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.8 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2010 uni2010 1.5 -U+2011 uni2011 1.5 -U+2012 figuredash 1.5 -U+2013 endash original -U+2014 emdash original -U+2015 uni2015 1.5 -U+2016 uni2016 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2017 underscoredbl 2.3 -U+2018 quoteleft original -U+2019 quoteright original -U+201a quotesinglbase original -U+201b quotereversed 2.3 -U+201c quotedblleft original -U+201d quotedblright original -U+201e quotedblbase original -U+201f uni201F 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.3 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+2020 dagger original -U+2021 daggerdbl original -U+2022 bullet original -U+2023 uni2023 2.2 -U+2024 onedotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2025 twodotenleader 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2026 ellipsis original -U+2027 uni2027 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2028 uni2028 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2029 uni2029 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+202a uni202A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202b uni202B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202c uni202C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202d uni202D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202e uni202E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+202f uni202F 2.11 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.23 (Serif Italic Condensed) -U+2030 perthousand original -U+2031 uni2031 2.1 -U+2032 minute 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2033 second 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2034 uni2034 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2035 uni2035 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2036 uni2036 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2037 uni2037 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2038 uni2038 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2039 guilsinglleft original -U+203a guilsinglright original -U+203b uni203B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+203c exclamdbl 2.0 -U+203d uni203D 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.11 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.14 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+203e uni203E 2.3 -U+203f uni203F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2040 uni2040 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2041 uni2041 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2042 uni2042 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2043 uni2043 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2044 fraction 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2045 uni2045 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2046 uni2046 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2047 uni2047 2.0 -U+2048 uni2048 2.0 -U+2049 uni2049 2.0 -U+204a uni204A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+204b uni204B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.33 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+204c uni204C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204d uni204D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204e uni204E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+204f uni204F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2050 uni2050 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2051 uni2051 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2052 uni2052 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2053 uni2053 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2054 uni2054 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2055 uni2055 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2056 uni2056 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2057 uni2057 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2058 uni2058 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2059 uni2059 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205a uni205A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205b uni205B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205c uni205C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205d uni205D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205e uni205E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+205f uni205F 2.14 -U+2060 uni2060 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2061 uni2061 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2062 uni2062 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2063 uni2063 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2064 uni2064 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+206a uni206A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206b uni206B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206c uni206C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206d uni206D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206e uni206E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+206f uni206F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2070 uni2070 2.2 -U+2071 uni2071 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2074 uni2074 2.2 -U+2075 uni2075 2.2 -U+2076 uni2076 2.2 -U+2077 uni2077 2.2 -U+2078 uni2078 2.2 -U+2079 uni2079 2.2 -U+207a uni207A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207b uni207B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207c uni207C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207d uni207D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207e uni207E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+207f uni207F 1.14 -U+2080 uni2080 2.4 -U+2081 uni2081 2.4 -U+2082 uni2082 2.4 -U+2083 uni2083 2.4 -U+2084 uni2084 2.4 -U+2085 uni2085 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2086 uni2086 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2087 uni2087 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2088 uni2088 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2089 uni2089 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+208a uni208A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208b uni208B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208c uni208C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208d uni208D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+208e uni208E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2090 uni2090 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2091 uni2091 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2092 uni2092 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2093 uni2093 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2094 uni2094 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.17 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.18 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2095 uni2095 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2096 uni2096 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2097 uni2097 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2098 uni2098 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2099 uni2099 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209a uni209A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209b uni209B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+209c uni209C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+20a0 uni20A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a1 colonmonetary 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a2 uni20A2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a3 franc 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a4 lira 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a5 uni20A5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a6 uni20A6 2.3 -U+20a7 peseta 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a8 uni20A8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20a9 uni20A9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20aa uni20AA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ab dong 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ac Euro original -U+20ad uni20AD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20ae uni20AE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20af uni20AF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b0 uni20B0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b1 uni20B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+20b2 uni20B2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b3 uni20B3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+20b4 uni20B4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+20b5 uni20B5 2.2 -U+20b8 uni20B8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+20b9 uni20B9 2.32 -U+20ba uni20BA 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20d0 uni20D0 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+20d1 uni20D1 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+20d6 uni20D6 2.8 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20d7 uni20D7 2.8 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20db uni20DB 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20dc uni20DC 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+20e1 uni20E1 2.23 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2100 uni2100 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2101 uni2101 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2102 uni2102 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.16 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Condensed) -U+2103 uni2103 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2104 uni2104 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2105 uni2105 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2106 uni2106 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2107 uni2107 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2108 uni2108 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2109 uni2109 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+210b uni210B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+210c uni210C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+210d uni210D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+210e uni210E 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.23 (Serif Italic Condensed) 2.26 (Sans ExtraLight) -U+210f uni210F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.28 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2110 uni2110 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2111 Ifraktur 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2112 uni2112 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2113 uni2113 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2114 uni2114 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2115 uni2115 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2116 uni2116 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2117 uni2117 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2118 weierstrass 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2119 uni2119 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211a uni211A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211b uni211B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211c Rfraktur 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211d uni211D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+211e prescription 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+211f uni211F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2120 uni2120 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2121 uni2121 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2122 trademark original -U+2123 uni2123 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2124 uni2124 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2125 uni2125 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2126 uni2126 2.2 -U+2127 uni2127 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2128 uni2128 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2129 uni2129 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212a uni212A 2.2 -U+212b uni212B 2.2 -U+212c uni212C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212d uni212D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+212e estimated 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+212f uni212F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2130 uni2130 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2131 uni2131 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2132 uni2132 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2133 uni2133 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2134 uni2134 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2135 aleph 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2136 uni2136 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2137 uni2137 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2138 uni2138 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2139 uni2139 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213a uni213A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213b uni213B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+213c uni213C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213d uni213D 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213e uni213E 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+213f uni213F 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2140 uni2140 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2141 uni2141 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans ExtraLight) -U+2142 uni2142 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans ExtraLight) -U+2143 uni2143 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans ExtraLight) -U+2144 uni2144 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans ExtraLight) -U+2145 uni2145 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2146 uni2146 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2147 uni2147 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+2148 uni2148 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2149 uni2149 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.22 (Serif, Serif Condensed) -U+214b uni214B 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+214e uni214E 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2150 uni2150 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2151 uni2151 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2152 uni2152 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2153 onethird 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2154 twothirds 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2155 uni2155 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2156 uni2156 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2157 uni2157 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2158 uni2158 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2159 uni2159 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215a uni215A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215b oneeighth 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215c threeeighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215d fiveeighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215e seveneighths 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+215f uni215F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.6 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2160 uni2160 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2161 uni2161 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2162 uni2162 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2163 uni2163 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2164 uni2164 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2165 uni2165 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2166 uni2166 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2167 uni2167 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2168 uni2168 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2169 uni2169 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216a uni216A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216b uni216B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216c uni216C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216d uni216D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216e uni216E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+216f uni216F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2170 uni2170 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2171 uni2171 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2172 uni2172 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2173 uni2173 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2174 uni2174 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2175 uni2175 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2176 uni2176 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2177 uni2177 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2178 uni2178 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2179 uni2179 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217a uni217A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217b uni217B 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217c uni217C 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217d uni217D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217e uni217E 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+217f uni217F 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2180 uni2180 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2181 uni2181 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+2182 uni2182 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans ExtraLight) -U+2183 uni2183 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2184 uni2184 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2185 uni2185 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2189 uni2189 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2190 arrowleft 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2191 arrowup 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2192 arrowright 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2193 arrowdown 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2194 arrowboth 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2195 arrowupdn 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2196 uni2196 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2197 uni2197 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2198 uni2198 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2199 uni2199 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219a uni219A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219b uni219B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219c uni219C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219d uni219D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219e uni219E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+219f uni219F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a0 uni21A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a1 uni21A1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a2 uni21A2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a3 uni21A3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a4 uni21A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a5 uni21A5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a6 uni21A6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a7 uni21A7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a8 arrowupdnbse 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21a9 uni21A9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21aa uni21AA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ab uni21AB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ac uni21AC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ad uni21AD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ae uni21AE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21af uni21AF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b0 uni21B0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b1 uni21B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b2 uni21B2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b3 uni21B3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b4 uni21B4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b5 carriagereturn 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b6 uni21B6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b7 uni21B7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b8 uni21B8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21b9 uni21B9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ba uni21BA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bb uni21BB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bc uni21BC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bd uni21BD 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21be uni21BE 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21bf uni21BF 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c0 uni21C0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c1 uni21C1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c2 uni21C2 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c3 uni21C3 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c4 uni21C4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c5 uni21C5 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c6 uni21C6 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c7 uni21C7 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c8 uni21C8 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21c9 uni21C9 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ca uni21CA 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cb uni21CB 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cc uni21CC 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cd uni21CD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ce uni21CE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21cf uni21CF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d0 arrowdblleft 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d1 arrowdblup 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d2 arrowdblright 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d3 arrowdbldown 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d4 arrowdblboth 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d5 uni21D5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d6 uni21D6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d7 uni21D7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d8 uni21D8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21d9 uni21D9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21da uni21DA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21db uni21DB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21dc uni21DC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21dd uni21DD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21de uni21DE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21df uni21DF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e0 uni21E0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e1 uni21E1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e2 uni21E2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e3 uni21E3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e4 uni21E4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e5 uni21E5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e6 uni21E6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e7 uni21E7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e8 uni21E8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21e9 uni21E9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ea uni21EA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21eb uni21EB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ec uni21EC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ed uni21ED 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ee uni21EE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ef uni21EF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f0 uni21F0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f1 uni21F1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f2 uni21F2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f3 uni21F3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f4 uni21F4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f5 uni21F5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f6 uni21F6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f7 uni21F7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f8 uni21F8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21f9 uni21F9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fa uni21FA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fb uni21FB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fc uni21FC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fd uni21FD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21fe uni21FE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+21ff uni21FF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2200 universal 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2201 uni2201 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2202 partialdiff original -U+2203 existential 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans ExtraLight) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2204 uni2204 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2205 emptyset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2206 Delta original -U+2207 gradient 2.1 -U+2208 element 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2209 notelement 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220a uni220A 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+220b suchthat 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220c uni220C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+220d uni220D 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+220e uni220E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+220f product original -U+2210 uni2210 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2211 summation original -U+2212 minus original -U+2213 uni2213 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2214 uni2214 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2215 uni2215 original -U+2216 uni2216 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2217 asteriskmath 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2218 uni2218 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2219 uni2219 original -U+221a radical original -U+221b uni221B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+221c uni221C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.26 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+221d proportional 2.1 -U+221e infinity original -U+221f orthogonal 2.1 -U+2220 angle 2.3 -U+2221 uni2221 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2222 uni2222 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2223 uni2223 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2224 uni2224 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2225 uni2225 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2226 uni2226 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2227 logicaland 2.1 -U+2228 logicalor 2.1 -U+2229 intersection 2.1 -U+222a union 2.1 -U+222b integral original -U+222c uni222C 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+222d uni222D 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+222e uni222E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+222f uni222F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2230 uni2230 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2231 uni2231 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2232 uni2232 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2233 uni2233 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2234 therefore 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2235 uni2235 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2236 uni2236 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2237 uni2237 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2238 uni2238 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2239 uni2239 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223a uni223A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223b uni223B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223c similar 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223d uni223D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+223e uni223E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+223f uni223F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2240 uni2240 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2241 uni2241 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2242 uni2242 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2243 uni2243 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2244 uni2244 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2245 congruent 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2246 uni2246 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2247 uni2247 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2248 approxequal original -U+2249 uni2249 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224a uni224A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224b uni224B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224c uni224C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224d uni224D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224e uni224E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+224f uni224F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2250 uni2250 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2251 uni2251 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2252 uni2252 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2253 uni2253 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2254 uni2254 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2255 uni2255 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2256 uni2256 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2257 uni2257 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2258 uni2258 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2259 uni2259 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225a uni225A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225b uni225B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225c uni225C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225d uni225D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225e uni225E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+225f uni225F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2260 notequal original -U+2261 equivalence 2.1 -U+2262 uni2262 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2263 uni2263 2.1 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2264 lessequal original -U+2265 greaterequal original -U+2266 uni2266 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2267 uni2267 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2268 uni2268 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2269 uni2269 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226a uni226A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226b uni226B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226c uni226C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+226d uni226D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226e uni226E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+226f uni226F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2270 uni2270 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2271 uni2271 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2272 uni2272 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2273 uni2273 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2274 uni2274 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2275 uni2275 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2276 uni2276 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2277 uni2277 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2278 uni2278 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2279 uni2279 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227a uni227A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227b uni227B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227c uni227C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227d uni227D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227e uni227E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+227f uni227F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2280 uni2280 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2281 uni2281 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2282 propersubset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2283 propersuperset 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2284 notsubset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2285 uni2285 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2286 reflexsubset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2287 reflexsuperset 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2288 uni2288 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2289 uni2289 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+228a uni228A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+228b uni228B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.6 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+228c uni228C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228d uni228D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228e uni228E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+228f uni228F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2290 uni2290 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2291 uni2291 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2292 uni2292 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2293 uni2293 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2294 uni2294 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2295 circleplus 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2296 uni2296 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2297 circlemultiply 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2298 uni2298 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2299 uni2299 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229a uni229A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229b uni229B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229c uni229C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229d uni229D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229e uni229E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+229f uni229F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a0 uni22A0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a1 uni22A1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a2 uni22A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a3 uni22A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a4 uni22A4 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a5 perpendicular 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.32 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22a6 uni22A6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a7 uni22A7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a8 uni22A8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22a9 uni22A9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22aa uni22AA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ab uni22AB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ac uni22AC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ad uni22AD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22ae uni22AE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22af uni22AF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22b0 uni22B0 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b1 uni22B1 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b2 uni22B2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b3 uni22B3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b4 uni22B4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b5 uni22B5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b6 uni22B6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b7 uni22B7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b8 uni22B8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22b9 uni22B9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ba uni22BA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bb uni22BB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bc uni22BC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22bd uni22BD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22be uni22BE 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+22bf uni22BF 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+22c0 uni22C0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c1 uni22C1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c2 uni22C2 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c3 uni22C3 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c4 uni22C4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c5 dotmath 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+22c6 uni22C6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+22c7 uni22C7 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c8 uni22C8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22c9 uni22C9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ca uni22CA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cb uni22CB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cc uni22CC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cd uni22CD 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22ce uni22CE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22cf uni22CF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d0 uni22D0 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d1 uni22D1 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d2 uni22D2 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d3 uni22D3 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d4 uni22D4 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d5 uni22D5 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d6 uni22D6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d7 uni22D7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22d8 uni22D8 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22d9 uni22D9 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22da uni22DA 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22db uni22DB 2.6 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.7 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+22dc uni22DC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22dd uni22DD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22de uni22DE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22df uni22DF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e0 uni22E0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e1 uni22E1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e2 uni22E2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e3 uni22E3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e4 uni22E4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e5 uni22E5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e6 uni22E6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e7 uni22E7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e8 uni22E8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22e9 uni22E9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+22ea uni22EA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22eb uni22EB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ec uni22EC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ed uni22ED 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ee uni22EE 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ef uni22EF 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f0 uni22F0 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f1 uni22F1 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f2 uni22F2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f3 uni22F3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f4 uni22F4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f5 uni22F5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f6 uni22F6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f7 uni22F7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f8 uni22F8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22f9 uni22F9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fa uni22FA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fb uni22FB 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fc uni22FC 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fd uni22FD 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22fe uni22FE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+22ff uni22FF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2300 uni2300 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2301 uni2301 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2302 house 1.14 -U+2303 uni2303 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2304 uni2304 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2305 uni2305 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2306 uni2306 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2307 uni2307 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2308 uni2308 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2309 uni2309 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230a uni230A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230b uni230B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+230c uni230C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230d uni230D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230e uni230E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+230f uni230F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2310 revlogicalnot 1.14 -U+2311 uni2311 1.15 -U+2312 uni2312 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2313 uni2313 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2314 uni2314 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2315 uni2315 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2318 uni2318 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2319 uni2319 1.14 -U+231c uni231C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231d uni231D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231e uni231E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+231f uni231F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2320 integraltp 2.3 -U+2321 integralbt 2.3 -U+2324 uni2324 2.16 (Sans, Sans Bold, Sans Bold Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique) 2.19 (Sans Condensed Oblique, Sans Oblique) -U+2325 uni2325 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2326 uni2326 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2327 uni2327 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2328 uni2328 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2329 angleleft 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) -U+232a angleright 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.10 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) -U+232b uni232B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+232c uni232C 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2335 uni2335 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2337 uni2337 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2338 uni2338 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2339 uni2339 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233a uni233A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233b uni233B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233c uni233C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233d uni233D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+233e uni233E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2341 uni2341 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2342 uni2342 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2343 uni2343 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2344 uni2344 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2347 uni2347 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2348 uni2348 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2349 uni2349 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234b uni234B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234c uni234C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+234d uni234D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2350 uni2350 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2352 uni2352 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2353 uni2353 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2354 uni2354 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2357 uni2357 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2358 uni2358 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2359 uni2359 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235a uni235A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235b uni235B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235c uni235C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235e uni235E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+235f uni235F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2360 uni2360 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2363 uni2363 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2364 uni2364 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2365 uni2365 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2368 uni2368 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2369 uni2369 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236b uni236B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236c uni236C 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236d uni236D 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236e uni236E 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+236f uni236F 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2370 uni2370 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2373 uni2373 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2374 uni2374 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2375 uni2375 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2376 uni2376 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2377 uni2377 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2378 uni2378 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2379 uni2379 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+237a uni237A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+237d uni237D 1.15 -U+2380 uni2380 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2381 uni2381 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2382 uni2382 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2383 uni2383 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2387 uni2387 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2388 uni2388 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2389 uni2389 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+238a uni238A 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+238b uni238B 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2394 uni2394 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2395 uni2395 2.14 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+239b uni239B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239c uni239C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239d uni239D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239e uni239E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+239f uni239F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a0 uni23A0 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a1 uni23A1 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a2 uni23A2 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a3 uni23A3 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a4 uni23A4 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a5 uni23A5 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a6 uni23A6 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a7 uni23A7 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a8 uni23A8 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23a9 uni23A9 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23aa uni23AA 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ab uni23AB 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ac uni23AC 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ad uni23AD 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+23ae uni23AE 2.3 -U+23ce uni23CE 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+23cf uni23CF 2.3 -U+23e3 uni23E3 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+23e5 uni23E5 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+23e8 uni23E8 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2422 uni2422 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2423 uni2423 1.6 -U+2460 uni2460 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2461 uni2461 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2462 uni2462 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2463 uni2463 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2464 uni2464 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2465 uni2465 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2466 uni2466 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2467 uni2467 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2468 uni2468 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2469 uni2469 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2500 SF100000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2501 uni2501 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2502 SF110000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2503 uni2503 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2504 uni2504 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2505 uni2505 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2506 uni2506 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2507 uni2507 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2508 uni2508 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2509 uni2509 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250a uni250A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250b uni250B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250c SF010000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250d uni250D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250e uni250E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+250f uni250F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2510 SF030000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2511 uni2511 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2512 uni2512 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2513 uni2513 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2514 SF020000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2515 uni2515 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2516 uni2516 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2517 uni2517 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2518 SF040000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2519 uni2519 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251a uni251A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251b uni251B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251c SF080000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251d uni251D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251e uni251E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+251f uni251F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2520 uni2520 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2521 uni2521 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2522 uni2522 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2523 uni2523 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2524 SF090000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2525 uni2525 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2526 uni2526 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2527 uni2527 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2528 uni2528 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2529 uni2529 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252a uni252A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252b uni252B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252c SF060000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252d uni252D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252e uni252E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+252f uni252F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2530 uni2530 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2531 uni2531 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2532 uni2532 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2533 uni2533 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2534 SF070000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2535 uni2535 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2536 uni2536 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2537 uni2537 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2538 uni2538 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2539 uni2539 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253a uni253A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253b uni253B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253c SF050000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253d uni253D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253e uni253E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+253f uni253F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2540 uni2540 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2541 uni2541 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2542 uni2542 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2543 uni2543 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2544 uni2544 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2545 uni2545 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2546 uni2546 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2547 uni2547 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2548 uni2548 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2549 uni2549 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254a uni254A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254b uni254B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254c uni254C 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254d uni254D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254e uni254E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+254f uni254F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2550 SF430000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2551 SF240000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2552 SF510000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2553 SF520000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2554 SF390000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2555 SF220000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2556 SF210000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2557 SF250000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2558 SF500000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2559 SF490000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255a SF380000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255b SF280000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255c SF270000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255d SF260000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255e SF360000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+255f SF370000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2560 SF420000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2561 SF190000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2562 SF200000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2563 SF230000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2564 SF470000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2565 SF480000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2566 SF410000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2567 SF450000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2568 SF460000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2569 SF400000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256a SF540000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256b SF530000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256c SF440000 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256d uni256D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256e uni256E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+256f uni256F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2570 uni2570 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2571 uni2571 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2572 uni2572 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2573 uni2573 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2574 uni2574 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2575 uni2575 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2576 uni2576 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2577 uni2577 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2578 uni2578 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2579 uni2579 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257a uni257A 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257b uni257B 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257c uni257C 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257d uni257D 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257e uni257E 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+257f uni257F 1.12 (Sans Mono, Sans Mono Oblique) 2.21 (Sans, Sans Condensed, Sans Condensed Oblique, Sans Oblique, Serif, Serif Condensed, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2580 upblock 1.14 -U+2581 uni2581 1.14 -U+2582 uni2582 1.14 -U+2583 uni2583 1.14 -U+2584 dnblock 1.14 -U+2585 uni2585 1.14 -U+2586 uni2586 1.14 -U+2587 uni2587 1.14 -U+2588 block 1.14 -U+2589 uni2589 1.14 -U+258a uni258A 1.14 -U+258b uni258B 1.14 -U+258c lfblock 1.14 -U+258d uni258D 1.14 -U+258e uni258E 1.14 -U+258f uni258F 1.14 -U+2590 rtblock 1.14 -U+2591 ltshade 1.15 -U+2592 shade 1.15 -U+2593 dkshade 1.15 -U+2594 uni2594 1.14 -U+2595 uni2595 1.14 -U+2596 uni2596 1.14 -U+2597 uni2597 1.14 -U+2598 uni2598 1.14 -U+2599 uni2599 1.14 -U+259a uni259A 1.14 -U+259b uni259B 1.14 -U+259c uni259C 1.14 -U+259d uni259D 1.14 -U+259e uni259E 1.14 -U+259f uni259F 1.14 -U+25a0 filledbox 2.3 -U+25a1 H22073 2.3 -U+25a2 uni25A2 2.3 -U+25a3 uni25A3 2.3 -U+25a4 uni25A4 2.3 -U+25a5 uni25A5 2.3 -U+25a6 uni25A6 2.3 -U+25a7 uni25A7 2.3 -U+25a8 uni25A8 2.3 -U+25a9 uni25A9 2.3 -U+25aa H18543 2.3 -U+25ab H18551 2.3 -U+25ac filledrect 2.3 -U+25ad uni25AD 2.3 -U+25ae uni25AE 2.3 -U+25af uni25AF 2.3 -U+25b0 uni25B0 2.3 -U+25b1 uni25B1 2.3 -U+25b2 triagup 2.3 -U+25b3 uni25B3 2.3 -U+25b4 uni25B4 2.3 -U+25b5 uni25B5 2.3 -U+25b6 uni25B6 2.3 -U+25b7 uni25B7 2.3 -U+25b8 uni25B8 2.3 -U+25b9 uni25B9 2.3 -U+25ba triagrt 2.3 -U+25bb uni25BB 2.3 -U+25bc triagdn 2.3 -U+25bd uni25BD 2.3 -U+25be uni25BE 2.3 -U+25bf uni25BF 2.3 -U+25c0 uni25C0 2.3 -U+25c1 uni25C1 2.3 -U+25c2 uni25C2 2.3 -U+25c3 uni25C3 2.3 -U+25c4 triaglf 2.3 -U+25c5 uni25C5 2.3 -U+25c6 uni25C6 2.3 -U+25c7 uni25C7 2.3 -U+25c8 uni25C8 2.3 -U+25c9 uni25C9 2.3 -U+25ca lozenge original -U+25cb circle 2.3 -U+25cc uni25CC 2.3 -U+25cd uni25CD 2.3 -U+25ce uni25CE 2.3 -U+25cf H18533 2.3 -U+25d0 uni25D0 2.3 -U+25d1 uni25D1 2.3 -U+25d2 uni25D2 2.3 -U+25d3 uni25D3 2.3 -U+25d4 uni25D4 2.3 -U+25d5 uni25D5 2.3 -U+25d6 uni25D6 2.3 -U+25d7 uni25D7 2.3 -U+25d8 invbullet 2.2 -U+25d9 invcircle 2.3 -U+25da uni25DA 2.3 -U+25db uni25DB 2.3 -U+25dc uni25DC 2.3 -U+25dd uni25DD 2.3 -U+25de uni25DE 2.3 -U+25df uni25DF 2.3 -U+25e0 uni25E0 2.3 -U+25e1 uni25E1 2.3 -U+25e2 uni25E2 2.3 -U+25e3 uni25E3 2.3 -U+25e4 uni25E4 2.3 -U+25e5 uni25E5 2.3 -U+25e6 openbullet 2.2 -U+25e7 uni25E7 2.3 -U+25e8 uni25E8 2.3 -U+25e9 uni25E9 2.3 -U+25ea uni25EA 2.3 -U+25eb uni25EB 2.3 -U+25ec uni25EC 2.3 -U+25ed uni25ED 2.3 -U+25ee uni25EE 2.3 -U+25ef uni25EF 2.3 -U+25f0 uni25F0 2.3 -U+25f1 uni25F1 2.3 -U+25f2 uni25F2 2.3 -U+25f3 uni25F3 2.3 -U+25f4 uni25F4 2.3 -U+25f5 uni25F5 2.3 -U+25f6 uni25F6 2.3 -U+25f7 uni25F7 2.3 -U+25f8 uni25F8 2.3 -U+25f9 uni25F9 2.3 -U+25fa uni25FA 2.3 -U+25fb uni25FB 2.3 -U+25fc uni25FC 2.3 -U+25fd uni25FD 2.3 -U+25fe uni25FE 2.3 -U+25ff uni25FF 2.3 -U+2600 uni2600 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2601 uni2601 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2602 uni2602 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2603 uni2603 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2604 uni2604 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2605 uni2605 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2606 uni2606 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2607 uni2607 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2608 uni2608 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2609 uni2609 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260a uni260A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260b uni260B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260c uni260C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260d uni260D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260e uni260E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+260f uni260F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2610 uni2610 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2611 uni2611 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2612 uni2612 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2613 uni2613 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2614 uni2614 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2615 uni2615 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2616 uni2616 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2617 uni2617 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2618 uni2618 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2619 uni2619 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261a uni261A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261b uni261B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261c uni261C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261d uni261D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261e uni261E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+261f uni261F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2620 uni2620 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2621 uni2621 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2622 uni2622 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2623 uni2623 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2624 uni2624 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2625 uni2625 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2626 uni2626 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2627 uni2627 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2628 uni2628 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2629 uni2629 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262a uni262A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262b uni262B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262c uni262C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262d uni262D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262e uni262E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+262f uni262F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2630 uni2630 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2631 uni2631 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2632 uni2632 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2633 uni2633 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2634 uni2634 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2635 uni2635 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2636 uni2636 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2637 uni2637 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2638 uni2638 1.15 -U+2639 uni2639 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263a smileface 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263b invsmileface 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263c sun 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+263d uni263D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+263e uni263E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+263f uni263F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2640 female 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2641 uni2641 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2642 male 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2643 uni2643 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2644 uni2644 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2645 uni2645 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2646 uni2646 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2647 uni2647 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2648 uni2648 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2649 uni2649 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264a uni264A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264b uni264B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264c uni264C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264d uni264D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264e uni264E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+264f uni264F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2650 uni2650 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2651 uni2651 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2652 uni2652 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2653 uni2653 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2654 uni2654 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2655 uni2655 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2656 uni2656 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2657 uni2657 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2658 uni2658 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2659 uni2659 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265a uni265A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265b uni265B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265c uni265C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265d uni265D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265e uni265E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+265f uni265F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2660 spade 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2661 uni2661 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2662 uni2662 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2663 club 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2664 uni2664 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2665 heart 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2666 diamond 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2667 uni2667 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2668 uni2668 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2669 uni2669 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266a musicalnote 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266b musicalnotedbl 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266c uni266C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266d uni266D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266e uni266E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+266f uni266F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2670 uni2670 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2671 uni2671 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2672 uni2672 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2673 uni2673 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2674 uni2674 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2675 uni2675 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2676 uni2676 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2677 uni2677 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2678 uni2678 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2679 uni2679 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267a uni267A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267b uni267B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267c uni267C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267d uni267D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267e uni267E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+267f uni267F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2680 uni2680 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2681 uni2681 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2682 uni2682 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2683 uni2683 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2684 uni2684 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2685 uni2685 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.4 (Sans ExtraLight) 2.7 (Sans Mono, Sans Mono Bold) -U+2686 uni2686 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2687 uni2687 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2688 uni2688 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2689 uni2689 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268a uni268A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268b uni268B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+268c uni268C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268d uni268D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268e uni268E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+268f uni268F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+2690 uni2690 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2691 uni2691 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2692 uni2692 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2693 uni2693 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2694 uni2694 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2695 uni2695 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2696 uni2696 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2697 uni2697 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2698 uni2698 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2699 uni2699 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269a uni269A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269b uni269B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+269c uni269C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a0 uni26A0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a1 uni26A1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+26a2 uni26A2 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a3 uni26A3 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a4 uni26A4 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a5 uni26A5 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a6 uni26A6 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a7 uni26A7 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a8 uni26A8 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26a9 uni26A9 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26aa uni26AA 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ab uni26AB 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ac uni26AC 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ad uni26AD 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26ae uni26AE 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26af uni26AF 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+26b0 uni26B0 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+26b1 uni26B1 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+26b2 uni26B2 2.12 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b3 uni26B3 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b4 uni26B4 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b5 uni26B5 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b6 uni26B6 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b7 uni26B7 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26b8 uni26B8 2.29 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c0 uni26C0 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c1 uni26C1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c2 uni26C2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26c3 uni26C3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+26e2 uni26E2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2701 uni2701 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2702 uni2702 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2703 uni2703 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2704 uni2704 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2706 uni2706 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2707 uni2707 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2708 uni2708 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2709 uni2709 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270c uni270C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270d uni270D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270e uni270E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+270f uni270F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2710 uni2710 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2711 uni2711 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2712 uni2712 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2713 uni2713 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2714 uni2714 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2715 uni2715 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2716 uni2716 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2717 uni2717 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2718 uni2718 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2719 uni2719 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271a uni271A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271b uni271B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271c uni271C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271d uni271D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271e uni271E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+271f uni271F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2720 uni2720 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2721 uni2721 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2722 uni2722 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2723 uni2723 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2724 uni2724 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2725 uni2725 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2726 uni2726 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2727 uni2727 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2729 uni2729 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272a uni272A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272b uni272B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272c uni272C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272d uni272D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272e uni272E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+272f uni272F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2730 uni2730 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2731 uni2731 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2732 uni2732 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2733 uni2733 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2734 uni2734 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2735 uni2735 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2736 uni2736 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2737 uni2737 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2738 uni2738 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2739 uni2739 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273a uni273A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273b uni273B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273c uni273C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273d uni273D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273e uni273E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+273f uni273F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2740 uni2740 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2741 uni2741 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2742 uni2742 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2743 uni2743 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2744 uni2744 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2745 uni2745 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2746 uni2746 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2747 uni2747 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2748 uni2748 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2749 uni2749 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274a uni274A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274b uni274B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274d uni274D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+274f uni274F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2750 uni2750 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2751 uni2751 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2752 uni2752 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2756 uni2756 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2758 uni2758 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2759 uni2759 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275a uni275A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275b uni275B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275c uni275C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275d uni275D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+275e uni275E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2761 uni2761 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2762 uni2762 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2763 uni2763 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2764 uni2764 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2765 uni2765 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2766 uni2766 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2767 uni2767 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2768 uni2768 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2769 uni2769 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276a uni276A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276b uni276B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276c uni276C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276d uni276D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276e uni276E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+276f uni276F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2770 uni2770 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2771 uni2771 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2772 uni2772 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2773 uni2773 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2774 uni2774 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2775 uni2775 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Sans Mono, Sans Mono Bold) -U+2776 uni2776 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2777 uni2777 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2778 uni2778 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2779 uni2779 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277a uni277A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277b uni277B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277c uni277C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277d uni277D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277e uni277E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+277f uni277F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2780 uni2780 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2781 uni2781 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2782 uni2782 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2783 uni2783 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2784 uni2784 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2785 uni2785 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2786 uni2786 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2787 uni2787 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2788 uni2788 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2789 uni2789 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278a uni278A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278b uni278B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278c uni278C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278d uni278D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278e uni278E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+278f uni278F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2790 uni2790 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2791 uni2791 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2792 uni2792 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2793 uni2793 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2794 uni2794 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2798 uni2798 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+2799 uni2799 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279a uni279A 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279b uni279B 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279c uni279C 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279d uni279D 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279e uni279E 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+279f uni279F 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a0 uni27A0 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a1 uni27A1 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27a2 uni27A2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a3 uni27A3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a4 uni27A4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a5 uni27A5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a6 uni27A6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a7 uni27A7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a8 uni27A8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27a9 uni27A9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27aa uni27AA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ab uni27AB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ac uni27AC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ad uni27AD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ae uni27AE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27af uni27AF 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b1 uni27B1 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b2 uni27B2 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b3 uni27B3 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b4 uni27B4 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b5 uni27B5 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b6 uni27B6 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b7 uni27B7 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b8 uni27B8 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27b9 uni27B9 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27ba uni27BA 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bb uni27BB 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bc uni27BC 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bd uni27BD 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27be uni27BE 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.7 (Sans Mono, Sans Mono Bold) -U+27bf uni27BF 2.7 (Sans Mono Bold) -U+27c2 uni27C2 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+27c5 uni27C5 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+27c6 uni27C6 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+27e0 uni27E0 2.3 -U+27e6 uni27E6 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+27e7 uni27E7 2.15 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+27e8 uni27E8 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27e9 uni27E9 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.13 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27ea uni27EA 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27eb uni27EB 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+27f0 uni27F0 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f1 uni27F1 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f2 uni27F2 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f3 uni27F3 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f4 uni27F4 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f5 uni27F5 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f6 uni27F6 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f7 uni27F7 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f8 uni27F8 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27f9 uni27F9 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fa uni27FA 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fb uni27FB 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fc uni27FC 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fd uni27FD 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27fe uni27FE 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+27ff uni27FF 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2800 uni2800 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2801 uni2801 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2802 uni2802 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2803 uni2803 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2804 uni2804 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2805 uni2805 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2806 uni2806 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2807 uni2807 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2808 uni2808 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2809 uni2809 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280a uni280A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280b uni280B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280c uni280C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280d uni280D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280e uni280E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+280f uni280F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2810 uni2810 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2811 uni2811 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2812 uni2812 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2813 uni2813 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2814 uni2814 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2815 uni2815 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2816 uni2816 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2817 uni2817 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2818 uni2818 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2819 uni2819 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281a uni281A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281b uni281B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281c uni281C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281d uni281D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281e uni281E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+281f uni281F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2820 uni2820 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2821 uni2821 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2822 uni2822 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2823 uni2823 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2824 uni2824 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2825 uni2825 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2826 uni2826 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2827 uni2827 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2828 uni2828 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2829 uni2829 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282a uni282A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282b uni282B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282c uni282C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282d uni282D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282e uni282E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+282f uni282F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2830 uni2830 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2831 uni2831 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2832 uni2832 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2833 uni2833 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2834 uni2834 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2835 uni2835 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2836 uni2836 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2837 uni2837 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2838 uni2838 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2839 uni2839 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283a uni283A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283b uni283B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283c uni283C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283d uni283D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283e uni283E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+283f uni283F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2840 uni2840 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2841 uni2841 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2842 uni2842 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2843 uni2843 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2844 uni2844 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2845 uni2845 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2846 uni2846 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2847 uni2847 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2848 uni2848 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2849 uni2849 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284a uni284A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284b uni284B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284c uni284C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284d uni284D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284e uni284E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+284f uni284F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2850 uni2850 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2851 uni2851 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2852 uni2852 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2853 uni2853 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2854 uni2854 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2855 uni2855 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2856 uni2856 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2857 uni2857 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2858 uni2858 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2859 uni2859 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285a uni285A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285b uni285B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285c uni285C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285d uni285D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285e uni285E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+285f uni285F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2860 uni2860 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2861 uni2861 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2862 uni2862 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2863 uni2863 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2864 uni2864 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2865 uni2865 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2866 uni2866 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2867 uni2867 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2868 uni2868 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2869 uni2869 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286a uni286A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286b uni286B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286c uni286C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286d uni286D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286e uni286E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+286f uni286F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2870 uni2870 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2871 uni2871 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2872 uni2872 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2873 uni2873 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2874 uni2874 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2875 uni2875 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2876 uni2876 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2877 uni2877 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2878 uni2878 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2879 uni2879 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287a uni287A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287b uni287B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287c uni287C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287d uni287D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287e uni287E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+287f uni287F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2880 uni2880 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2881 uni2881 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2882 uni2882 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2883 uni2883 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2884 uni2884 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2885 uni2885 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2886 uni2886 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2887 uni2887 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2888 uni2888 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2889 uni2889 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288a uni288A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288b uni288B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288c uni288C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288d uni288D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288e uni288E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+288f uni288F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2890 uni2890 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2891 uni2891 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2892 uni2892 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2893 uni2893 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2894 uni2894 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2895 uni2895 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2896 uni2896 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2897 uni2897 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2898 uni2898 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2899 uni2899 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289a uni289A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289b uni289B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289c uni289C 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289d uni289D 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289e uni289E 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+289f uni289F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a0 uni28A0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a1 uni28A1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a2 uni28A2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a3 uni28A3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a4 uni28A4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a5 uni28A5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a6 uni28A6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a7 uni28A7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a8 uni28A8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28a9 uni28A9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28aa uni28AA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ab uni28AB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ac uni28AC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ad uni28AD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ae uni28AE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28af uni28AF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b0 uni28B0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b1 uni28B1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b2 uni28B2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b3 uni28B3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b4 uni28B4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b5 uni28B5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b6 uni28B6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b7 uni28B7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b8 uni28B8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28b9 uni28B9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ba uni28BA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bb uni28BB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bc uni28BC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bd uni28BD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28be uni28BE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28bf uni28BF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c0 uni28C0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c1 uni28C1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c2 uni28C2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c3 uni28C3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c4 uni28C4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c5 uni28C5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c6 uni28C6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c7 uni28C7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c8 uni28C8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28c9 uni28C9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ca uni28CA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cb uni28CB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cc uni28CC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cd uni28CD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ce uni28CE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28cf uni28CF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d0 uni28D0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d1 uni28D1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d2 uni28D2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d3 uni28D3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d4 uni28D4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d5 uni28D5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d6 uni28D6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d7 uni28D7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d8 uni28D8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28d9 uni28D9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28da uni28DA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28db uni28DB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28dc uni28DC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28dd uni28DD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28de uni28DE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28df uni28DF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e0 uni28E0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e1 uni28E1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e2 uni28E2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e3 uni28E3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e4 uni28E4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e5 uni28E5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e6 uni28E6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e7 uni28E7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e8 uni28E8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28e9 uni28E9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ea uni28EA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28eb uni28EB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ec uni28EC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ed uni28ED 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ee uni28EE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ef uni28EF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f0 uni28F0 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f1 uni28F1 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f2 uni28F2 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f3 uni28F3 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f4 uni28F4 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f5 uni28F5 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f6 uni28F6 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f7 uni28F7 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f8 uni28F8 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28f9 uni28F9 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fa uni28FA 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fb uni28FB 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fc uni28FC 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fd uni28FD 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28fe uni28FE 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+28ff uni28FF 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2900 uni2900 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2901 uni2901 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2902 uni2902 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2903 uni2903 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2904 uni2904 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2905 uni2905 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2906 uni2906 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2907 uni2907 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2908 uni2908 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2909 uni2909 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290a uni290A 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290b uni290B 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290c uni290C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290d uni290D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290e uni290E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+290f uni290F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2910 uni2910 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2911 uni2911 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2912 uni2912 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2913 uni2913 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2914 uni2914 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2915 uni2915 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2916 uni2916 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2917 uni2917 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2918 uni2918 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2919 uni2919 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291a uni291A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291b uni291B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291c uni291C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291d uni291D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291e uni291E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+291f uni291F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2920 uni2920 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2921 uni2921 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2922 uni2922 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2923 uni2923 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2924 uni2924 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2925 uni2925 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2926 uni2926 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2927 uni2927 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2928 uni2928 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2929 uni2929 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292a uni292A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292b uni292B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292c uni292C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292d uni292D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292e uni292E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+292f uni292F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2930 uni2930 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2931 uni2931 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2932 uni2932 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2933 uni2933 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2934 uni2934 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2935 uni2935 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2936 uni2936 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2937 uni2937 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2938 uni2938 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2939 uni2939 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293a uni293A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293b uni293B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293c uni293C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293d uni293D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293e uni293E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+293f uni293F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2940 uni2940 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2941 uni2941 2.13 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2942 uni2942 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2943 uni2943 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2944 uni2944 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2945 uni2945 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2946 uni2946 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2947 uni2947 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2948 uni2948 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2949 uni2949 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294a uni294A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294b uni294B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294c uni294C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294d uni294D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294e uni294E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+294f uni294F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2950 uni2950 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2951 uni2951 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2952 uni2952 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2953 uni2953 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2954 uni2954 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2955 uni2955 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2956 uni2956 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2957 uni2957 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2958 uni2958 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2959 uni2959 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295a uni295A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295b uni295B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295c uni295C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295d uni295D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295e uni295E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+295f uni295F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2960 uni2960 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2961 uni2961 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2962 uni2962 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2963 uni2963 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2964 uni2964 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2965 uni2965 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2966 uni2966 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2967 uni2967 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2968 uni2968 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2969 uni2969 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296a uni296A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296b uni296B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296c uni296C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296d uni296D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296e uni296E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+296f uni296F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2970 uni2970 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2971 uni2971 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2972 uni2972 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2973 uni2973 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2974 uni2974 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2975 uni2975 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2976 uni2976 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2977 uni2977 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2978 uni2978 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2979 uni2979 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297a uni297A 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297b uni297B 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297c uni297C 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297d uni297D 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297e uni297E 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+297f uni297F 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2983 uni2983 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2984 uni2984 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+29ce uni29CE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29cf uni29CF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d0 uni29D0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d1 uni29D1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d2 uni29D2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d3 uni29D3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d4 uni29D4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29d5 uni29D5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+29eb uni29EB 2.2 -U+29fa uni29FA 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+29fb uni29FB 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+2a00 uni2A00 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a01 uni2A01 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a02 uni2A02 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a0c uni2A0C 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0d uni2A0D 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0e uni2A0E 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.9 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2a0f uni2A0F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a10 uni2A10 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a11 uni2A11 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a12 uni2A12 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a13 uni2A13 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a14 uni2A14 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a15 uni2A15 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a16 uni2A16 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a17 uni2A17 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a18 uni2A18 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a19 uni2A19 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1a uni2A1A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1b uni2A1B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a1c uni2A1C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a2f uni2A2F 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2a6a uni2A6A 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2a6b uni2A6B 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2a7d uni2A7D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a7e uni2A7E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a7f uni2A7F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a80 uni2A80 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a81 uni2A81 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a82 uni2A82 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a83 uni2A83 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a84 uni2A84 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a85 uni2A85 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a86 uni2A86 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a87 uni2A87 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a88 uni2A88 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a89 uni2A89 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8a uni2A8A 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8b uni2A8B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8c uni2A8C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8d uni2A8D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8e uni2A8E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a8f uni2A8F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a90 uni2A90 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a91 uni2A91 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a92 uni2A92 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a93 uni2A93 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a94 uni2A94 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a95 uni2A95 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a96 uni2A96 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a97 uni2A97 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a98 uni2A98 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a99 uni2A99 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9a uni2A9A 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9b uni2A9B 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9c uni2A9C 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9d uni2A9D 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9e uni2A9E 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2a9f uni2A9F 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aa0 uni2AA0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aae uni2AAE 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aaf uni2AAF 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab0 uni2AB0 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab1 uni2AB1 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab2 uni2AB2 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab3 uni2AB3 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab4 uni2AB4 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab5 uni2AB5 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab6 uni2AB6 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab7 uni2AB7 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab8 uni2AB8 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2ab9 uni2AB9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2aba uni2ABA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2af9 uni2AF9 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2afa uni2AFA 2.7 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b00 uni2B00 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b01 uni2B01 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b02 uni2B02 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b03 uni2B03 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b04 uni2B04 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b05 uni2B05 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b06 uni2B06 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b07 uni2B07 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b08 uni2B08 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b09 uni2B09 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b0a uni2B0A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b0b uni2B0B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b0c uni2B0C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b0d uni2B0D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+2b0e uni2B0E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b0f uni2B0F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b10 uni2B10 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b11 uni2B11 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2b12 uni2B12 2.3 -U+2b13 uni2B13 2.3 -U+2b14 uni2B14 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b15 uni2B15 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b16 uni2B16 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b17 uni2B17 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b18 uni2B18 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b19 uni2B19 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b1a uni2B1A 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Italic) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+2b1f uni2B1F 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b20 uni2B20 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b21 uni2B21 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b22 uni2B22 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b23 uni2B23 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2b24 uni2B24 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b53 uni2B53 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2b54 uni2B54 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+2c60 uni2C60 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c61 uni2C61 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c62 uni2C62 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c63 uni2C63 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c64 uni2C64 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2c65 uni2C65 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c66 uni2C66 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c67 uni2C67 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c68 uni2C68 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c69 uni2C69 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6a uni2C6A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6b uni2C6B 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6c uni2C6C 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) 2.18 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+2c6d uni2C6D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c6e uni2C6E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+2c6f uni2C6F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c70 uni2C70 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c71 uni2C71 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c72 uni2C72 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c73 uni2C73 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.31 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c74 uni2C74 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+2c75 uni2C75 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c76 uni2C76 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c77 uni2C77 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.20 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.23 (Serif Italic Condensed) -U+2c79 uni2C79 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7a uni2C7A 2.27 -U+2c7b uni2C7B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.34 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c7c uni2C7C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7d uni2C7D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.28 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.31 (Serif Condensed Italic) -U+2c7e uni2C7E 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2c7f uni2C7F 2.31 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2d00 uni2D00 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d01 uni2D01 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d02 uni2D02 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d03 uni2D03 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d04 uni2D04 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d05 uni2D05 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d06 uni2D06 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d07 uni2D07 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d08 uni2D08 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d09 uni2D09 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0a uni2D0A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0b uni2D0B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0c uni2D0C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0d uni2D0D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0e uni2D0E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d0f uni2D0F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d10 uni2D10 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d11 uni2D11 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d12 uni2D12 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d13 uni2D13 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d14 uni2D14 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d15 uni2D15 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d16 uni2D16 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d17 uni2D17 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d18 uni2D18 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d19 uni2D19 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1a uni2D1A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1b uni2D1B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1c uni2D1C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1d uni2D1D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1e uni2D1E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d1f uni2D1F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d20 uni2D20 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d21 uni2D21 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d22 uni2D22 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d23 uni2D23 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d24 uni2D24 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d25 uni2D25 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+2d30 uni2D30 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d31 uni2D31 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d32 uni2D32 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d33 uni2D33 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d34 uni2D34 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d35 uni2D35 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d36 uni2D36 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d37 uni2D37 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d38 uni2D38 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d39 uni2D39 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3a uni2D3A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3b uni2D3B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3c uni2D3C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3d uni2D3D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3e uni2D3E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d3f uni2D3F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d40 uni2D40 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d41 uni2D41 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d42 uni2D42 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d43 uni2D43 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d44 uni2D44 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d45 uni2D45 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d46 uni2D46 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d47 uni2D47 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d48 uni2D48 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d49 uni2D49 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4a uni2D4A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4b uni2D4B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4c uni2D4C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4d uni2D4D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4e uni2D4E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d4f uni2D4F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d50 uni2D50 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d51 uni2D51 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d52 uni2D52 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d53 uni2D53 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d54 uni2D54 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d55 uni2D55 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d56 uni2D56 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d57 uni2D57 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d58 uni2D58 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d59 uni2D59 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5a uni2D5A 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5b uni2D5B 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5c uni2D5C 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5d uni2D5D 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5e uni2D5E 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d5f uni2D5F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d60 uni2D60 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d61 uni2D61 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d62 uni2D62 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d63 uni2D63 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d64 uni2D64 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d65 uni2D65 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2d6f uni2D6F 2.18 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+2e18 uni2E18 2.26 -U+2e1e uni2E1E 2.34 (Sans, Sans Condensed) -U+2e1f uni2E1F 2.34 (Sans Bold, Sans Bold Oblique, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+2e22 uni2E22 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e23 uni2E23 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e24 uni2E24 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e25 uni2E25 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.30 (Sans Bold) 2.31 (Serif Condensed Italic) -U+2e2e uni2E2E 2.26 -U+4dc0 uni4DC0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc1 uni4DC1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc2 uni4DC2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc3 uni4DC3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc4 uni4DC4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc5 uni4DC5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc6 uni4DC6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc7 uni4DC7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc8 uni4DC8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dc9 uni4DC9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dca uni4DCA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcb uni4DCB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcc uni4DCC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcd uni4DCD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dce uni4DCE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dcf uni4DCF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd0 uni4DD0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd1 uni4DD1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd2 uni4DD2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd3 uni4DD3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd4 uni4DD4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd5 uni4DD5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd6 uni4DD6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd7 uni4DD7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd8 uni4DD8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dd9 uni4DD9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dda uni4DDA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddb uni4DDB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddc uni4DDC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddd uni4DDD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dde uni4DDE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ddf uni4DDF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de0 uni4DE0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de1 uni4DE1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de2 uni4DE2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de3 uni4DE3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de4 uni4DE4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de5 uni4DE5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de6 uni4DE6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de7 uni4DE7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de8 uni4DE8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4de9 uni4DE9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dea uni4DEA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4deb uni4DEB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dec uni4DEC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4ded uni4DED 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dee uni4DEE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4def uni4DEF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df0 uni4DF0 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df1 uni4DF1 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df2 uni4DF2 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df3 uni4DF3 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df4 uni4DF4 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df5 uni4DF5 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df6 uni4DF6 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df7 uni4DF7 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df8 uni4DF8 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4df9 uni4DF9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfa uni4DFA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfb uni4DFB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfc uni4DFC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfd uni4DFD 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dfe uni4DFE 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+4dff uni4DFF 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a4d0 uniA4D0 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d1 uniA4D1 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d2 uniA4D2 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d3 uniA4D3 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d4 uniA4D4 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d5 uniA4D5 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d6 uniA4D6 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d7 uniA4D7 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d8 uniA4D8 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4d9 uniA4D9 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4da uniA4DA 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4db uniA4DB 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4dc uniA4DC 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4dd uniA4DD 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4de uniA4DE 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4df uniA4DF 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e0 uniA4E0 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e1 uniA4E1 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e2 uniA4E2 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e3 uniA4E3 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e4 uniA4E4 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e5 uniA4E5 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e6 uniA4E6 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e7 uniA4E7 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e8 uniA4E8 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4e9 uniA4E9 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ea uniA4EA 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4eb uniA4EB 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ec uniA4EC 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ed uniA4ED 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ee uniA4EE 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ef uniA4EF 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f0 uniA4F0 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f1 uniA4F1 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f2 uniA4F2 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f3 uniA4F3 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f4 uniA4F4 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f5 uniA4F5 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f6 uniA4F6 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f7 uniA4F7 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f8 uniA4F8 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4f9 uniA4F9 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4fa uniA4FA 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4fb uniA4FB 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4fc uniA4FC 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4fd uniA4FD 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4fe uniA4FE 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a4ff uniA4FF 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a644 uniA644 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a645 uniA645 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a646 uniA646 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a647 uniA647 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a64c uniA64C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a64d uniA64D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a650 uniA650 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a651 uniA651 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a654 uniA654 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a655 uniA655 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a656 uniA656 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a657 uniA657 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a662 uniA662 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a663 uniA663 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a664 uniA664 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a665 uniA665 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a666 uniA666 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a667 uniA667 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a668 uniA668 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a669 uniA669 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66a uniA66A 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66b uniA66B 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66c uniA66C 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66d uniA66D 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a66e uniA66E 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a68a uniA68A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a68b uniA68B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a68c uniA68C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a68d uniA68D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a694 uniA694 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a695 uniA695 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+a708 uniA708 2.27 -U+a709 uniA709 2.27 -U+a70a uniA70A 2.27 -U+a70b uniA70B 2.27 -U+a70c uniA70C 2.27 -U+a70d uniA70D 2.27 -U+a70e uniA70E 2.27 -U+a70f uniA70F 2.27 -U+a710 uniA710 2.27 -U+a711 uniA711 2.27 -U+a712 uniA712 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a713 uniA713 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a714 uniA714 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a715 uniA715 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a716 uniA716 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.27 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+a71b uniA71B 2.27 -U+a71c uniA71C 2.27 -U+a71d uniA71D 2.27 -U+a71e uniA71E 2.27 -U+a71f uniA71F 2.27 -U+a722 uniA722 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a723 uniA723 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a724 uniA724 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a725 uniA725 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a726 uniA726 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a727 uniA727 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.30 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a728 uniA728 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a729 uniA729 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72a uniA72A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72b uniA72B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72c uniA72C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72d uniA72D 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72e uniA72E 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a72f uniA72F 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a730 uniA730 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a731 uniA731 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a732 uniA732 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a733 uniA733 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a734 uniA734 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a735 uniA735 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a736 uniA736 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a737 uniA737 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a738 uniA738 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a739 uniA739 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73a uniA73A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73b uniA73B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73c uniA73C 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73d uniA73D 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.32 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73e uniA73E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a73f uniA73F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a740 uniA740 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a741 uniA741 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a746 uniA746 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a747 uniA747 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a748 uniA748 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a749 uniA749 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a74a uniA74A 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74b uniA74B 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74e uniA74E 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a74f uniA74F 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a750 uniA750 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a751 uniA751 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a752 uniA752 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a753 uniA753 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a756 uniA756 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a757 uniA757 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a764 uniA764 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a765 uniA765 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a766 uniA766 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a767 uniA767 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a768 uniA768 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a769 uniA769 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a77b uniA77B 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a77c uniA77C 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a780 uniA780 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a781 uniA781 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a782 uniA782 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a783 uniA783 2.27 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a784 uniA784 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a785 uniA785 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a786 uniA786 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a787 uniA787 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a789 uniA789 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a78a uniA78A 2.28 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a78b uniA78B 2.26 -U+a78c uniA78C 2.26 -U+a78d uniA78D 2.31 -U+a78e uniA78E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique) -U+a790 uniA790 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a791 uniA791 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7a0 uniA7A0 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a1 uniA7A1 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a2 uniA7A2 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a3 uniA7A3 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a4 uniA7A4 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a5 uniA7A5 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a6 uniA7A6 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a7 uniA7A7 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a8 uniA7A8 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7a9 uniA7A9 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+a7aa uniA7AA 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fa uniA7FA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fb uniA7FB 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fc uniA7FC 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fd uniA7FD 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7fe uniA7FE 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+a7ff uniA7FF 2.26 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) 2.33 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) -U+e000 uniE000 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e001 uniE001 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e002 uniE002 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e003 uniE003 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e004 uniE004 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e005 uniE005 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e006 uniE006 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e007 uniE007 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e008 uniE008 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+e009 uniE009 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00a uniE00A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00b uniE00B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00c uniE00C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00d uniE00D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00e uniE00E 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e00f uniE00F 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e010 uniE010 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e011 uniE011 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e012 uniE012 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e013 uniE013 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e014 uniE014 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) -U+e015 uniE015 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e016 uniE016 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e017 uniE017 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e018 uniE018 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e019 uniE019 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01a uniE01A 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01b uniE01B 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01c uniE01C 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+e01d uniE01D 2.4 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef00 uni02E5.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef01 uni02E6.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef02 uni02E7.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef03 uni02E8.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef04 uni02E9.5 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef05 uni02E5.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef06 uni02E6.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef07 uni02E7.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef08 uni02E8.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef09 uni02E9.4 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0a uni02E5.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0b uni02E6.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0c uni02E7.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0d uni02E8.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0e uni02E9.3 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef0f uni02E5.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef10 uni02E6.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef11 uni02E7.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef12 uni02E8.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef13 uni02E9.2 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef14 uni02E5.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef15 uni02E6.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef16 uni02E7.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef17 uni02E8.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef18 uni02E9.1 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+ef19 stem 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f000 uniF000 2.10 (Sans) 2.11 (Sans Condensed) -U+f001 uniF001 2.10 (Sans) 2.11 (Sans Condensed) -U+f002 uniF002 2.33 (Sans, Sans Condensed) -U+f003 uniF003 2.33 (Sans, Sans Condensed) -U+f208 uniF208 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f20a uniF20A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f215 uniF215 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f216 uniF216 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f217 uniF217 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f21a uniF21A 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f21b uniF21B 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f25f uniF25F 2.6 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f400 uniF400 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f401 uniF401 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f402 uniF402 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f403 uniF403 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f404 uniF404 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f405 uniF405 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f406 uniF406 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f407 uniF407 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f408 uniF408 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f409 uniF409 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40a uniF40A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40b uniF40B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40c uniF40C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40d uniF40D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40e uniF40E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f40f uniF40F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f410 uniF410 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f411 uniF411 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f412 uniF412 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f413 uniF413 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f414 uniF414 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f415 uniF415 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f416 uniF416 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f417 uniF417 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f418 uniF418 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f419 uniF419 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41a uniF41A 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41b uniF41B 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41c uniF41C 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41d uniF41D 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41e uniF41E 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f41f uniF41F 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f420 uniF420 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f421 uniF421 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f422 uniF422 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f423 uniF423 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f424 uniF424 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f425 uniF425 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique) -U+f426 uniF426 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f428 uniF428 2.28 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f429 uniF429 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42a uniF42A 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42b uniF42B 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42c uniF42C 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42d uniF42D 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42e uniF42E 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f42f uniF42F 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f430 uniF430 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f431 uniF431 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f432 uniF432 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f433 uniF433 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f434 uniF434 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f435 uniF435 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f436 uniF436 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f437 uniF437 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f438 uniF438 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f439 uniF439 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43a uniF43A 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43b uniF43B 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43c uniF43C 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43d uniF43D 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43e uniF43E 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f43f uniF43F 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f440 uniF440 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f441 uniF441 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+f5c5 uniF5C5 2.9 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+f6c4 uniF6C4 2.10 (Serif Bold Italic, Serif Italic) 2.11 (Serif Condensed Bold Italic, Serif Condensed Italic) 2.23 (Serif Italic Condensed) -U+f6c5 uniF6C5 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.7 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) 2.9 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold, Sans Condensed Oblique, Sans Oblique) 2.18 (Sans ExtraLight) 2.23 (Serif Italic Condensed) -U+f6c6 uniF6C6 2.5 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6c7 uniF6C7 2.11 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6c8 uniF6C8 2.11 (Serif Bold Italic, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6d1 cyrBreve 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+f6d4 cyrbreve 2.5 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb00 uniFB00 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb01 fi original -U+fb02 fl original -U+fb03 uniFB03 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb04 uniFB04 2.2 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.5 (Sans ExtraLight) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb05 uniFB05 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb06 uniFB06 2.5 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.8 (Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fb13 uniFB13 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb14 uniFB14 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb15 uniFB15 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb16 uniFB16 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb17 uniFB17 2.3 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb1d uniFB1D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb1e uniFB1E 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb1f uniFB1F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb20 uniFB20 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb21 uniFB21 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb22 uniFB22 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb23 uniFB23 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb24 uniFB24 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb25 uniFB25 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb26 uniFB26 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb27 uniFB27 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb28 uniFB28 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb29 uniFB29 2.10 (Sans, Sans Bold, Sans Bold Oblique, Sans ExtraLight, Sans Oblique) 2.11 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb2a uniFB2A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2b uniFB2B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2c uniFB2C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2d uniFB2D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2e uniFB2E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb2f uniFB2F 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb30 uniFB30 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb31 uniFB31 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb32 uniFB32 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb33 uniFB33 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb34 uniFB34 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb35 uniFB35 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb36 uniFB36 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb37 uniFB37 2.11 (Sans Condensed Oblique, Sans Oblique) 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+fb38 uniFB38 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb39 uniFB39 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3a uniFB3A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3b uniFB3B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3c uniFB3C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3d uniFB3D 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3e uniFB3E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb3f uniFB3F 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb40 uniFB40 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb41 uniFB41 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb42 uniFB42 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb43 uniFB43 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb44 uniFB44 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb45 uniFB45 2.33 (Sans Bold Oblique, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb46 uniFB46 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb47 uniFB47 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb48 uniFB48 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb49 uniFB49 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4a uniFB4A 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4b uniFB4B 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4c uniFB4C 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4d uniFB4D 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4e uniFB4E 2.9 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fb4f uniFB4F 2.16 (Sans, Sans Bold, Sans Bold Oblique, Sans Oblique) 2.17 (Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique) -U+fb52 uniFB52 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb53 uniFB53 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb54 uniFB54 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb55 uniFB55 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb56 uniFB56 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb57 uniFB57 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb58 uniFB58 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb59 uniFB59 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5a uniFB5A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5b uniFB5B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5c uniFB5C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5d uniFB5D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5e uniFB5E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb5f uniFB5F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb60 uniFB60 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb61 uniFB61 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb62 uniFB62 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb63 uniFB63 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb64 uniFB64 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb65 uniFB65 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb66 uniFB66 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb67 uniFB67 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb68 uniFB68 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb69 uniFB69 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6a uniFB6A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6b uniFB6B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6c uniFB6C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6d uniFB6D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6e uniFB6E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb6f uniFB6F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb70 uniFB70 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb71 uniFB71 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb72 uniFB72 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb73 uniFB73 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb74 uniFB74 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb75 uniFB75 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb76 uniFB76 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb77 uniFB77 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb78 uniFB78 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb79 uniFB79 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7a uniFB7A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7b uniFB7B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7c uniFB7C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7d uniFB7D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7e uniFB7E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb7f uniFB7F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb80 uniFB80 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb81 uniFB81 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb82 uniFB82 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb83 uniFB83 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb84 uniFB84 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb85 uniFB85 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb86 uniFB86 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb87 uniFB87 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb88 uniFB88 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb89 uniFB89 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb8a uniFB8A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8b uniFB8B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8c uniFB8C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8d uniFB8D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8e uniFB8E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb8f uniFB8F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb90 uniFB90 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb91 uniFB91 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb92 uniFB92 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb93 uniFB93 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb94 uniFB94 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb95 uniFB95 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb96 uniFB96 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb97 uniFB97 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb98 uniFB98 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb99 uniFB99 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9a uniFB9A 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9b uniFB9B 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9c uniFB9C 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9d uniFB9D 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fb9e uniFB9E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fb9f uniFB9F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fba0 uniFBA0 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba1 uniFBA1 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba2 uniFBA2 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fba3 uniFBA3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbaa uniFBAA 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbab uniFBAB 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbac uniFBAC 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbad uniFBAD 2.16 (Sans Mono, Sans Mono Bold) 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd3 uniFBD3 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd4 uniFBD4 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd5 uniFBD5 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd6 uniFBD6 2.31 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbd9 uniFBD9 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbda uniFBDA 2.7 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) -U+fbe8 uniFBE8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbe9 uniFBE9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfc uniFBFC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfd uniFBFD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbfe uniFBFE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fbff uniFBFF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe00 uniFE00 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe01 uniFE01 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe02 uniFE02 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe03 uniFE03 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe04 uniFE04 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe05 uniFE05 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe06 uniFE06 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe07 uniFE07 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe08 uniFE08 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe09 uniFE09 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0a uniFE0A 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0b uniFE0B 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0c uniFE0C 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0d uniFE0D 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0e uniFE0E 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe0f uniFE0F 2.14 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans ExtraLight, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fe20 uniFE20 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe21 uniFE21 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe22 uniFE22 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe23 uniFE23 2.21 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+fe70 uniFE70 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe71 uniFE71 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe72 uniFE72 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe73 uniFE73 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe74 uniFE74 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe76 uniFE76 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe77 uniFE77 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe78 uniFE78 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe79 uniFE79 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7a uniFE7A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7b uniFE7B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7c uniFE7C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7d uniFE7D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7e uniFE7E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe7f uniFE7F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe80 uniFE80 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe81 uniFE81 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe82 uniFE82 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe83 uniFE83 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe84 uniFE84 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe85 uniFE85 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe86 uniFE86 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe87 uniFE87 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe88 uniFE88 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe89 uniFE89 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8a uniFE8A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8b uniFE8B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8c uniFE8C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8d uniFE8D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8e uniFE8E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe8f uniFE8F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe90 uniFE90 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe91 uniFE91 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe92 uniFE92 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe93 uniFE93 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe94 uniFE94 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe95 uniFE95 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe96 uniFE96 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe97 uniFE97 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe98 uniFE98 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe99 uniFE99 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9a uniFE9A 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9b uniFE9B 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9c uniFE9C 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9d uniFE9D 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9e uniFE9E 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fe9f uniFE9F 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea0 uniFEA0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea1 uniFEA1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea2 uniFEA2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea3 uniFEA3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea4 uniFEA4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea5 uniFEA5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea6 uniFEA6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea7 uniFEA7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea8 uniFEA8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fea9 uniFEA9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feaa uniFEAA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feab uniFEAB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feac uniFEAC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fead uniFEAD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feae uniFEAE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feaf uniFEAF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb0 uniFEB0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb1 uniFEB1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb2 uniFEB2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb3 uniFEB3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb4 uniFEB4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb5 uniFEB5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb6 uniFEB6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb7 uniFEB7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb8 uniFEB8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feb9 uniFEB9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feba uniFEBA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febb uniFEBB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febc uniFEBC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febd uniFEBD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febe uniFEBE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+febf uniFEBF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec0 uniFEC0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec1 uniFEC1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec2 uniFEC2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec3 uniFEC3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec4 uniFEC4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec5 uniFEC5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec6 uniFEC6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec7 uniFEC7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec8 uniFEC8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fec9 uniFEC9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feca uniFECA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecb uniFECB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecc uniFECC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecd uniFECD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fece uniFECE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fecf uniFECF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed0 uniFED0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed1 uniFED1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed2 uniFED2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed3 uniFED3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed4 uniFED4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed5 uniFED5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed6 uniFED6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed7 uniFED7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed8 uniFED8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fed9 uniFED9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feda uniFEDA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedb uniFEDB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedc uniFEDC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedd uniFEDD 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fede uniFEDE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fedf uniFEDF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee0 uniFEE0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee1 uniFEE1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee2 uniFEE2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee3 uniFEE3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee4 uniFEE4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee5 uniFEE5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee6 uniFEE6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee7 uniFEE7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee8 uniFEE8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fee9 uniFEE9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feea uniFEEA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feeb uniFEEB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feec uniFEEC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feed uniFEED 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feee uniFEEE 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feef uniFEEF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef0 uniFEF0 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef1 uniFEF1 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef2 uniFEF2 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef3 uniFEF3 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef4 uniFEF4 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef5 uniFEF5 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef6 uniFEF6 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef7 uniFEF7 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef8 uniFEF8 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fef9 uniFEF9 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefa uniFEFA 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefb uniFEFB 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fefc uniFEFC 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+feff uniFEFF 2.4 (Sans, Sans Bold, Sans Condensed, Sans Condensed Bold) 2.16 (Sans Mono, Sans Mono Bold) -U+fff9 uniFFF9 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffa uniFFFA 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffb uniFFFB 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffc uniFFFC 2.22 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique, Sans Oblique, Serif, Serif Bold, Serif Bold Italic, Serif Condensed, Serif Condensed Bold, Serif Condensed Bold Italic, Serif Condensed Italic, Serif Italic) 2.23 (Serif Italic Condensed) -U+fffd uniFFFD 1.12 -U+10300 u10300 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10301 u10301 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10302 u10302 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10303 u10303 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10304 u10304 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10305 u10305 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10306 u10306 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10307 u10307 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10308 u10308 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10309 u10309 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030a u1030A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030b u1030B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030c u1030C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030d u1030D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030e u1030E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1030f u1030F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10310 u10310 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10311 u10311 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10312 u10312 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10313 u10313 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10314 u10314 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10315 u10315 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10316 u10316 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10317 u10317 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10318 u10318 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10319 u10319 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031a u1031A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031b u1031B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031c u1031C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031d u1031D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1031e u1031E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10320 u10320 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10321 u10321 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10322 u10322 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+10323 u10323 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d300 u1D300 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d301 u1D301 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d302 u1D302 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d303 u1D303 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d304 u1D304 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d305 u1D305 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d306 u1D306 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d307 u1D307 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d308 u1D308 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d309 u1D309 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30a u1D30A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30b u1D30B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30c u1D30C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30d u1D30D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30e u1D30E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d30f u1D30F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d310 u1D310 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d311 u1D311 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d312 u1D312 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d313 u1D313 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d314 u1D314 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d315 u1D315 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d316 u1D316 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d317 u1D317 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d318 u1D318 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d319 u1D319 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31a u1D31A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31b u1D31B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31c u1D31C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31d u1D31D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31e u1D31E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d31f u1D31F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d320 u1D320 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d321 u1D321 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d322 u1D322 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d323 u1D323 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d324 u1D324 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d325 u1D325 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d326 u1D326 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d327 u1D327 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d328 u1D328 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d329 u1D329 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32a u1D32A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32b u1D32B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32c u1D32C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32d u1D32D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32e u1D32E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d32f u1D32F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d330 u1D330 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d331 u1D331 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d332 u1D332 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d333 u1D333 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d334 u1D334 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d335 u1D335 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d336 u1D336 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d337 u1D337 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d338 u1D338 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d339 u1D339 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33a u1D33A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33b u1D33B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33c u1D33C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33d u1D33D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33e u1D33E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d33f u1D33F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d340 u1D340 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d341 u1D341 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d342 u1D342 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d343 u1D343 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d344 u1D344 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d345 u1D345 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d346 u1D346 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d347 u1D347 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d348 u1D348 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d349 u1D349 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34a u1D34A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34b u1D34B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34c u1D34C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34d u1D34D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34e u1D34E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d34f u1D34F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d350 u1D350 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d351 u1D351 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d352 u1D352 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d353 u1D353 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d354 u1D354 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d355 u1D355 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d356 u1D356 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1d400 u1D400 2.23 (Serif Bold, Serif Condensed Bold) -U+1d401 u1D401 2.23 (Serif Bold, Serif Condensed Bold) -U+1d402 u1D402 2.23 (Serif Bold, Serif Condensed Bold) -U+1d403 u1D403 2.23 (Serif Bold, Serif Condensed Bold) -U+1d404 u1D404 2.23 (Serif Bold, Serif Condensed Bold) -U+1d405 u1D405 2.23 (Serif Bold, Serif Condensed Bold) -U+1d406 u1D406 2.23 (Serif Bold, Serif Condensed Bold) -U+1d407 u1D407 2.23 (Serif Bold, Serif Condensed Bold) -U+1d408 u1D408 2.23 (Serif Bold, Serif Condensed Bold) -U+1d409 u1D409 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40a u1D40A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40b u1D40B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40c u1D40C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40d u1D40D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40e u1D40E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d40f u1D40F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d410 u1D410 2.23 (Serif Bold, Serif Condensed Bold) -U+1d411 u1D411 2.23 (Serif Bold, Serif Condensed Bold) -U+1d412 u1D412 2.23 (Serif Bold, Serif Condensed Bold) -U+1d413 u1D413 2.23 (Serif Bold, Serif Condensed Bold) -U+1d414 u1D414 2.23 (Serif Bold, Serif Condensed Bold) -U+1d415 u1D415 2.23 (Serif Bold, Serif Condensed Bold) -U+1d416 u1D416 2.23 (Serif Bold, Serif Condensed Bold) -U+1d417 u1D417 2.23 (Serif Bold, Serif Condensed Bold) -U+1d418 u1D418 2.23 (Serif Bold, Serif Condensed Bold) -U+1d419 u1D419 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41a u1D41A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41b u1D41B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41c u1D41C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41d u1D41D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41e u1D41E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d41f u1D41F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d420 u1D420 2.23 (Serif Bold, Serif Condensed Bold) -U+1d421 u1D421 2.23 (Serif Bold, Serif Condensed Bold) -U+1d422 u1D422 2.23 (Serif Bold, Serif Condensed Bold) -U+1d423 u1D423 2.23 (Serif Bold, Serif Condensed Bold) -U+1d424 u1D424 2.23 (Serif Bold, Serif Condensed Bold) -U+1d425 u1D425 2.23 (Serif Bold, Serif Condensed Bold) -U+1d426 u1D426 2.23 (Serif Bold, Serif Condensed Bold) -U+1d427 u1D427 2.23 (Serif Bold, Serif Condensed Bold) -U+1d428 u1D428 2.23 (Serif Bold, Serif Condensed Bold) -U+1d429 u1D429 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42a u1D42A 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42b u1D42B 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42c u1D42C 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42d u1D42D 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42e u1D42E 2.23 (Serif Bold, Serif Condensed Bold) -U+1d42f u1D42F 2.23 (Serif Bold, Serif Condensed Bold) -U+1d430 u1D430 2.23 (Serif Bold, Serif Condensed Bold) -U+1d431 u1D431 2.23 (Serif Bold, Serif Condensed Bold) -U+1d432 u1D432 2.23 (Serif Bold, Serif Condensed Bold) -U+1d433 u1D433 2.23 (Serif Bold, Serif Condensed Bold) -U+1d434 u1D434 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d435 u1D435 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d436 u1D436 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d437 u1D437 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d438 u1D438 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d439 u1D439 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43a u1D43A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43b u1D43B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43c u1D43C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43d u1D43D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43e u1D43E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d43f u1D43F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d440 u1D440 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d441 u1D441 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d442 u1D442 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d443 u1D443 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d444 u1D444 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d445 u1D445 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d446 u1D446 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d447 u1D447 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d448 u1D448 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d449 u1D449 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44a u1D44A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44b u1D44B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44c u1D44C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44d u1D44D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44e u1D44E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d44f u1D44F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d450 u1D450 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d451 u1D451 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d452 u1D452 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d453 u1D453 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d454 u1D454 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d456 u1D456 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d457 u1D457 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d458 u1D458 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d459 u1D459 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45a u1D45A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45b u1D45B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45c u1D45C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45d u1D45D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45e u1D45E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d45f u1D45F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d460 u1D460 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d461 u1D461 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d462 u1D462 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d463 u1D463 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d464 u1D464 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d465 u1D465 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d466 u1D466 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d467 u1D467 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d468 u1D468 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d469 u1D469 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46a u1D46A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46b u1D46B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46c u1D46C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46d u1D46D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46e u1D46E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d46f u1D46F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d470 u1D470 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d471 u1D471 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d472 u1D472 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d473 u1D473 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d474 u1D474 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d475 u1D475 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d476 u1D476 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d477 u1D477 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d478 u1D478 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d479 u1D479 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47a u1D47A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47b u1D47B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47c u1D47C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47d u1D47D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47e u1D47E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d47f u1D47F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d480 u1D480 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d481 u1D481 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d482 u1D482 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d483 u1D483 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d484 u1D484 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d485 u1D485 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d486 u1D486 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d487 u1D487 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d488 u1D488 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d489 u1D489 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48a u1D48A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48b u1D48B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48c u1D48C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48d u1D48D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48e u1D48E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d48f u1D48F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d490 u1D490 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d491 u1D491 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d492 u1D492 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d493 u1D493 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d494 u1D494 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d495 u1D495 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d496 u1D496 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d497 u1D497 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d498 u1D498 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d499 u1D499 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d49a u1D49A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d49b u1D49B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d538 u1D538 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d539 u1D539 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53b u1D53B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53c u1D53C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53d u1D53D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d53e u1D53E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d540 u1D540 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d541 u1D541 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d542 u1D542 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d543 u1D543 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d544 u1D544 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d546 u1D546 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54a u1D54A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54b u1D54B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54c u1D54C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54d u1D54D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54e u1D54E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d54f u1D54F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d550 u1D550 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d552 u1D552 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d553 u1D553 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d554 u1D554 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d555 u1D555 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d556 u1D556 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d557 u1D557 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d558 u1D558 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d559 u1D559 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55a u1D55A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) 2.34 (Sans Mono, Sans Mono Bold, Sans Mono Bold Oblique, Sans Mono Oblique) -U+1d55b u1D55B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55c u1D55C 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55d u1D55D 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55e u1D55E 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d55f u1D55F 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d560 u1D560 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d561 u1D561 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d562 u1D562 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d563 u1D563 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d564 u1D564 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d565 u1D565 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d566 u1D566 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d567 u1D567 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d568 u1D568 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d569 u1D569 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d56a u1D56A 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d56b u1D56B 2.18 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.22 (Serif, Serif Condensed) -U+1d5a0 u1D5A0 2.23 (Sans, Sans Condensed) -U+1d5a1 u1D5A1 2.23 (Sans, Sans Condensed) -U+1d5a2 u1D5A2 2.23 (Sans, Sans Condensed) -U+1d5a3 u1D5A3 2.23 (Sans, Sans Condensed) -U+1d5a4 u1D5A4 2.23 (Sans, Sans Condensed) -U+1d5a5 u1D5A5 2.23 (Sans, Sans Condensed) -U+1d5a6 u1D5A6 2.23 (Sans, Sans Condensed) -U+1d5a7 u1D5A7 2.23 (Sans, Sans Condensed) -U+1d5a8 u1D5A8 2.23 (Sans, Sans Condensed) -U+1d5a9 u1D5A9 2.23 (Sans, Sans Condensed) -U+1d5aa u1D5AA 2.23 (Sans, Sans Condensed) -U+1d5ab u1D5AB 2.23 (Sans, Sans Condensed) -U+1d5ac u1D5AC 2.23 (Sans, Sans Condensed) -U+1d5ad u1D5AD 2.23 (Sans, Sans Condensed) -U+1d5ae u1D5AE 2.23 (Sans, Sans Condensed) -U+1d5af u1D5AF 2.23 (Sans, Sans Condensed) -U+1d5b0 u1D5B0 2.23 (Sans, Sans Condensed) -U+1d5b1 u1D5B1 2.23 (Sans, Sans Condensed) -U+1d5b2 u1D5B2 2.23 (Sans, Sans Condensed) -U+1d5b3 u1D5B3 2.23 (Sans, Sans Condensed) -U+1d5b4 u1D5B4 2.23 (Sans, Sans Condensed) -U+1d5b5 u1D5B5 2.23 (Sans, Sans Condensed) -U+1d5b6 u1D5B6 2.23 (Sans, Sans Condensed) -U+1d5b7 u1D5B7 2.23 (Sans, Sans Condensed) -U+1d5b8 u1D5B8 2.23 (Sans, Sans Condensed) -U+1d5b9 u1D5B9 2.23 (Sans, Sans Condensed) -U+1d5ba u1D5BA 2.23 (Sans, Sans Condensed) -U+1d5bb u1D5BB 2.23 (Sans, Sans Condensed) -U+1d5bc u1D5BC 2.23 (Sans, Sans Condensed) -U+1d5bd u1D5BD 2.23 (Sans, Sans Condensed) -U+1d5be u1D5BE 2.23 (Sans, Sans Condensed) -U+1d5bf u1D5BF 2.23 (Sans, Sans Condensed) -U+1d5c0 u1D5C0 2.23 (Sans, Sans Condensed) -U+1d5c1 u1D5C1 2.23 (Sans, Sans Condensed) -U+1d5c2 u1D5C2 2.23 (Sans, Sans Condensed) -U+1d5c3 u1D5C3 2.23 (Sans, Sans Condensed) -U+1d5c4 u1D5C4 2.23 (Sans, Sans Condensed) -U+1d5c5 u1D5C5 2.23 (Sans, Sans Condensed) -U+1d5c6 u1D5C6 2.23 (Sans, Sans Condensed) -U+1d5c7 u1D5C7 2.23 (Sans, Sans Condensed) -U+1d5c8 u1D5C8 2.23 (Sans, Sans Condensed) -U+1d5c9 u1D5C9 2.23 (Sans, Sans Condensed) -U+1d5ca u1D5CA 2.23 (Sans, Sans Condensed) -U+1d5cb u1D5CB 2.23 (Sans, Sans Condensed) -U+1d5cc u1D5CC 2.23 (Sans, Sans Condensed) -U+1d5cd u1D5CD 2.23 (Sans, Sans Condensed) -U+1d5ce u1D5CE 2.23 (Sans, Sans Condensed) -U+1d5cf u1D5CF 2.23 (Sans, Sans Condensed) -U+1d5d0 u1D5D0 2.23 (Sans, Sans Condensed) -U+1d5d1 u1D5D1 2.23 (Sans, Sans Condensed) -U+1d5d2 u1D5D2 2.23 (Sans, Sans Condensed) -U+1d5d3 u1D5D3 2.23 (Sans, Sans Condensed) -U+1d5d4 u1D5D4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d5 u1D5D5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d6 u1D5D6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d7 u1D5D7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d8 u1D5D8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5d9 u1D5D9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5da u1D5DA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5db u1D5DB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5dc u1D5DC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5dd u1D5DD 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5de u1D5DE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5df u1D5DF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e0 u1D5E0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e1 u1D5E1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e2 u1D5E2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e3 u1D5E3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e4 u1D5E4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e5 u1D5E5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e6 u1D5E6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e7 u1D5E7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e8 u1D5E8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5e9 u1D5E9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ea u1D5EA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5eb u1D5EB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ec u1D5EC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ed u1D5ED 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ee u1D5EE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ef u1D5EF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f0 u1D5F0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f1 u1D5F1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f2 u1D5F2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f3 u1D5F3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f4 u1D5F4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f5 u1D5F5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f6 u1D5F6 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f7 u1D5F7 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f8 u1D5F8 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5f9 u1D5F9 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fa u1D5FA 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fb u1D5FB 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fc u1D5FC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fd u1D5FD 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5fe u1D5FE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d5ff u1D5FF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d600 u1D600 2.23 (Sans Bold, Sans Condensed Bold) -U+1d601 u1D601 2.23 (Sans Bold, Sans Condensed Bold) -U+1d602 u1D602 2.23 (Sans Bold, Sans Condensed Bold) -U+1d603 u1D603 2.23 (Sans Bold, Sans Condensed Bold) -U+1d604 u1D604 2.23 (Sans Bold, Sans Condensed Bold) -U+1d605 u1D605 2.23 (Sans Bold, Sans Condensed Bold) -U+1d606 u1D606 2.23 (Sans Bold, Sans Condensed Bold) -U+1d607 u1D607 2.23 (Sans Bold, Sans Condensed Bold) -U+1d608 u1D608 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d609 u1D609 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60a u1D60A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60b u1D60B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60c u1D60C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60d u1D60D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60e u1D60E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d60f u1D60F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d610 u1D610 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d611 u1D611 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d612 u1D612 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d613 u1D613 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d614 u1D614 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d615 u1D615 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d616 u1D616 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d617 u1D617 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d618 u1D618 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d619 u1D619 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61a u1D61A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61b u1D61B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61c u1D61C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61d u1D61D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61e u1D61E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d61f u1D61F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d620 u1D620 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d621 u1D621 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d622 u1D622 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d623 u1D623 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d624 u1D624 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d625 u1D625 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d626 u1D626 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d627 u1D627 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d628 u1D628 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d629 u1D629 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62a u1D62A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62b u1D62B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62c u1D62C 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62d u1D62D 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62e u1D62E 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d62f u1D62F 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d630 u1D630 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d631 u1D631 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d632 u1D632 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d633 u1D633 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d634 u1D634 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d635 u1D635 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d636 u1D636 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d637 u1D637 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d638 u1D638 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d639 u1D639 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63a u1D63A 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63b u1D63B 2.23 (Sans Condensed Oblique, Sans Oblique) -U+1d63c u1D63C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63d u1D63D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63e u1D63E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d63f u1D63F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d640 u1D640 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d641 u1D641 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d642 u1D642 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d643 u1D643 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d644 u1D644 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d645 u1D645 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d646 u1D646 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d647 u1D647 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d648 u1D648 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d649 u1D649 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64a u1D64A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64b u1D64B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64c u1D64C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64d u1D64D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64e u1D64E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d64f u1D64F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d650 u1D650 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d651 u1D651 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d652 u1D652 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d653 u1D653 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d654 u1D654 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d655 u1D655 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d656 u1D656 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d657 u1D657 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d658 u1D658 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d659 u1D659 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65a u1D65A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65b u1D65B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65c u1D65C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65d u1D65D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65e u1D65E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d65f u1D65F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d660 u1D660 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d661 u1D661 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d662 u1D662 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d663 u1D663 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d664 u1D664 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d665 u1D665 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d666 u1D666 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d667 u1D667 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d668 u1D668 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d669 u1D669 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66a u1D66A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66b u1D66B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66c u1D66C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66d u1D66D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66e u1D66E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d66f u1D66F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d670 u1D670 2.23 (Sans Mono) -U+1d671 u1D671 2.23 (Sans Mono) -U+1d672 u1D672 2.23 (Sans Mono) -U+1d673 u1D673 2.23 (Sans Mono) -U+1d674 u1D674 2.23 (Sans Mono) -U+1d675 u1D675 2.23 (Sans Mono) -U+1d676 u1D676 2.23 (Sans Mono) -U+1d677 u1D677 2.23 (Sans Mono) -U+1d678 u1D678 2.23 (Sans Mono) -U+1d679 u1D679 2.23 (Sans Mono) -U+1d67a u1D67A 2.23 (Sans Mono) -U+1d67b u1D67B 2.23 (Sans Mono) -U+1d67c u1D67C 2.23 (Sans Mono) -U+1d67d u1D67D 2.23 (Sans Mono) -U+1d67e u1D67E 2.23 (Sans Mono) -U+1d67f u1D67F 2.23 (Sans Mono) -U+1d680 u1D680 2.23 (Sans Mono) -U+1d681 u1D681 2.23 (Sans Mono) -U+1d682 u1D682 2.23 (Sans Mono) -U+1d683 u1D683 2.23 (Sans Mono) -U+1d684 u1D684 2.23 (Sans Mono) -U+1d685 u1D685 2.23 (Sans Mono) -U+1d686 u1D686 2.23 (Sans Mono) -U+1d687 u1D687 2.23 (Sans Mono) -U+1d688 u1D688 2.23 (Sans Mono) -U+1d689 u1D689 2.23 (Sans Mono) -U+1d68a u1D68A 2.23 (Sans Mono) -U+1d68b u1D68B 2.23 (Sans Mono) -U+1d68c u1D68C 2.23 (Sans Mono) -U+1d68d u1D68D 2.23 (Sans Mono) -U+1d68e u1D68E 2.23 (Sans Mono) -U+1d68f u1D68F 2.23 (Sans Mono) -U+1d690 u1D690 2.23 (Sans Mono) -U+1d691 u1D691 2.23 (Sans Mono) -U+1d692 u1D692 2.23 (Sans Mono) -U+1d693 u1D693 2.23 (Sans Mono) -U+1d694 u1D694 2.23 (Sans Mono) -U+1d695 u1D695 2.23 (Sans Mono) -U+1d696 u1D696 2.23 (Sans Mono) -U+1d697 u1D697 2.23 (Sans Mono) -U+1d698 u1D698 2.23 (Sans Mono) -U+1d699 u1D699 2.23 (Sans Mono) -U+1d69a u1D69A 2.23 (Sans Mono) -U+1d69b u1D69B 2.23 (Sans Mono) -U+1d69c u1D69C 2.23 (Sans Mono) -U+1d69d u1D69D 2.23 (Sans Mono) -U+1d69e u1D69E 2.23 (Sans Mono) -U+1d69f u1D69F 2.23 (Sans Mono) -U+1d6a0 u1D6A0 2.23 (Sans Mono) -U+1d6a1 u1D6A1 2.23 (Sans Mono) -U+1d6a2 u1D6A2 2.23 (Sans Mono) -U+1d6a3 u1D6A3 2.23 (Sans Mono) -U+1d6a4 u1D6A4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6a5 u1D6A5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6a8 u1D6A8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6a9 u1D6A9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6aa u1D6AA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ab u1D6AB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ac u1D6AC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ad u1D6AD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ae u1D6AE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6af u1D6AF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b0 u1D6B0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b1 u1D6B1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b2 u1D6B2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b3 u1D6B3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b4 u1D6B4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b5 u1D6B5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b6 u1D6B6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b7 u1D6B7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b8 u1D6B8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6b9 u1D6B9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ba u1D6BA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bb u1D6BB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bc u1D6BC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bd u1D6BD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6be u1D6BE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6bf u1D6BF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c0 u1D6C0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c1 u1D6C1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c2 u1D6C2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c3 u1D6C3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c4 u1D6C4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c5 u1D6C5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c6 u1D6C6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c7 u1D6C7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c8 u1D6C8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6c9 u1D6C9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ca u1D6CA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cb u1D6CB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cc u1D6CC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cd u1D6CD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6ce u1D6CE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6cf u1D6CF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d0 u1D6D0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d1 u1D6D1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d2 u1D6D2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d3 u1D6D3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d4 u1D6D4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d5 u1D6D5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d6 u1D6D6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d7 u1D6D7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d8 u1D6D8 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6d9 u1D6D9 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6da u1D6DA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6db u1D6DB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6dc u1D6DC 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6dd u1D6DD 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6de u1D6DE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6df u1D6DF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e0 u1D6E0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e1 u1D6E1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d6e2 u1D6E2 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e3 u1D6E3 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e4 u1D6E4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e5 u1D6E5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e6 u1D6E6 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e7 u1D6E7 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e8 u1D6E8 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6e9 u1D6E9 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ea u1D6EA 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6eb u1D6EB 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ec u1D6EC 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ed u1D6ED 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ee u1D6EE 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ef u1D6EF 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f0 u1D6F0 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f1 u1D6F1 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f2 u1D6F2 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f3 u1D6F3 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f4 u1D6F4 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f5 u1D6F5 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f6 u1D6F6 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f7 u1D6F7 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f8 u1D6F8 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6f9 u1D6F9 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fa u1D6FA 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fb u1D6FB 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fc u1D6FC 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fd u1D6FD 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6fe u1D6FE 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d6ff u1D6FF 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d700 u1D700 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d701 u1D701 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d702 u1D702 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d703 u1D703 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d704 u1D704 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d705 u1D705 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d706 u1D706 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d707 u1D707 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d708 u1D708 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d709 u1D709 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70a u1D70A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70b u1D70B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70c u1D70C 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70d u1D70D 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70e u1D70E 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d70f u1D70F 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d710 u1D710 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d711 u1D711 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d712 u1D712 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d713 u1D713 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d714 u1D714 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d715 u1D715 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d716 u1D716 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d717 u1D717 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d718 u1D718 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d719 u1D719 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71a u1D71A 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71b u1D71B 2.23 (Serif Italic, Serif Italic Condensed) 2.31 (Serif Condensed Italic) -U+1d71c u1D71C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71d u1D71D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71e u1D71E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d71f u1D71F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d720 u1D720 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d721 u1D721 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d722 u1D722 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d723 u1D723 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d724 u1D724 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d725 u1D725 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d726 u1D726 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d727 u1D727 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d728 u1D728 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d729 u1D729 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72a u1D72A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72b u1D72B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72c u1D72C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72d u1D72D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72e u1D72E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d72f u1D72F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d730 u1D730 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d731 u1D731 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d732 u1D732 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d733 u1D733 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d734 u1D734 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d735 u1D735 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d736 u1D736 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d737 u1D737 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d738 u1D738 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d739 u1D739 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73a u1D73A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73b u1D73B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73c u1D73C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73d u1D73D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73e u1D73E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d73f u1D73F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d740 u1D740 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d741 u1D741 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d742 u1D742 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d743 u1D743 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d744 u1D744 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d745 u1D745 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d746 u1D746 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d747 u1D747 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d748 u1D748 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d749 u1D749 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74a u1D74A 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74b u1D74B 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74c u1D74C 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74d u1D74D 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74e u1D74E 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d74f u1D74F 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d750 u1D750 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d751 u1D751 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d752 u1D752 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d753 u1D753 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d754 u1D754 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d755 u1D755 2.23 (Serif Bold Italic, Serif Condensed Bold Italic) -U+1d756 u1D756 2.23 (Sans Bold, Sans Condensed Bold) -U+1d757 u1D757 2.23 (Sans Bold, Sans Condensed Bold) -U+1d758 u1D758 2.23 (Sans Bold, Sans Condensed Bold) -U+1d759 u1D759 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75a u1D75A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75b u1D75B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75c u1D75C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75d u1D75D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75e u1D75E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d75f u1D75F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d760 u1D760 2.23 (Sans Bold, Sans Condensed Bold) -U+1d761 u1D761 2.23 (Sans Bold, Sans Condensed Bold) -U+1d762 u1D762 2.23 (Sans Bold, Sans Condensed Bold) -U+1d763 u1D763 2.23 (Sans Bold, Sans Condensed Bold) -U+1d764 u1D764 2.23 (Sans Bold, Sans Condensed Bold) -U+1d765 u1D765 2.23 (Sans Bold, Sans Condensed Bold) -U+1d766 u1D766 2.23 (Sans Bold, Sans Condensed Bold) -U+1d767 u1D767 2.23 (Sans Bold, Sans Condensed Bold) -U+1d768 u1D768 2.23 (Sans Bold, Sans Condensed Bold) -U+1d769 u1D769 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76a u1D76A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76b u1D76B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76c u1D76C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76d u1D76D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76e u1D76E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d76f u1D76F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d770 u1D770 2.23 (Sans Bold, Sans Condensed Bold) -U+1d771 u1D771 2.23 (Sans Bold, Sans Condensed Bold) -U+1d772 u1D772 2.23 (Sans Bold, Sans Condensed Bold) -U+1d773 u1D773 2.23 (Sans Bold, Sans Condensed Bold) -U+1d774 u1D774 2.23 (Sans Bold, Sans Condensed Bold) -U+1d775 u1D775 2.23 (Sans Bold, Sans Condensed Bold) -U+1d776 u1D776 2.23 (Sans Bold, Sans Condensed Bold) -U+1d777 u1D777 2.23 (Sans Bold, Sans Condensed Bold) -U+1d778 u1D778 2.23 (Sans Bold, Sans Condensed Bold) -U+1d779 u1D779 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77a u1D77A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77b u1D77B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77c u1D77C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77d u1D77D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77e u1D77E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d77f u1D77F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d780 u1D780 2.23 (Sans Bold, Sans Condensed Bold) -U+1d781 u1D781 2.23 (Sans Bold, Sans Condensed Bold) -U+1d782 u1D782 2.23 (Sans Bold, Sans Condensed Bold) -U+1d783 u1D783 2.23 (Sans Bold, Sans Condensed Bold) -U+1d784 u1D784 2.23 (Sans Bold, Sans Condensed Bold) -U+1d785 u1D785 2.23 (Sans Bold, Sans Condensed Bold) -U+1d786 u1D786 2.23 (Sans Bold, Sans Condensed Bold) -U+1d787 u1D787 2.23 (Sans Bold, Sans Condensed Bold) -U+1d788 u1D788 2.23 (Sans Bold, Sans Condensed Bold) -U+1d789 u1D789 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78a u1D78A 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78b u1D78B 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78c u1D78C 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78d u1D78D 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78e u1D78E 2.23 (Sans Bold, Sans Condensed Bold) -U+1d78f u1D78F 2.23 (Sans Bold, Sans Condensed Bold) -U+1d790 u1D790 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d791 u1D791 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d792 u1D792 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d793 u1D793 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d794 u1D794 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d795 u1D795 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d796 u1D796 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d797 u1D797 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d798 u1D798 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d799 u1D799 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79a u1D79A 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79b u1D79B 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79c u1D79C 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79d u1D79D 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79e u1D79E 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d79f u1D79F 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a0 u1D7A0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a1 u1D7A1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a2 u1D7A2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a3 u1D7A3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a4 u1D7A4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a5 u1D7A5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a6 u1D7A6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a7 u1D7A7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a8 u1D7A8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7a9 u1D7A9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7aa u1D7AA 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ab u1D7AB 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ac u1D7AC 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ad u1D7AD 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ae u1D7AE 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7af u1D7AF 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b0 u1D7B0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b1 u1D7B1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b2 u1D7B2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b3 u1D7B3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b4 u1D7B4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b5 u1D7B5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b6 u1D7B6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b7 u1D7B7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b8 u1D7B8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7b9 u1D7B9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ba u1D7BA 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bb u1D7BB 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bc u1D7BC 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bd u1D7BD 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7be u1D7BE 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7bf u1D7BF 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c0 u1D7C0 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c1 u1D7C1 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c2 u1D7C2 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c3 u1D7C3 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c4 u1D7C4 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c5 u1D7C5 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c6 u1D7C6 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c7 u1D7C7 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c8 u1D7C8 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7c9 u1D7C9 2.23 (Sans Bold Oblique, Sans Condensed Bold Oblique) -U+1d7ca u1D7CA 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7cb u1D7CB 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7ce u1D7CE 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7cf u1D7CF 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d0 u1D7D0 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d1 u1D7D1 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d2 u1D7D2 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d3 u1D7D3 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d4 u1D7D4 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d5 u1D7D5 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d6 u1D7D6 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d7 u1D7D7 2.23 (Serif Bold, Serif Condensed Bold) -U+1d7d8 u1D7D8 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7d9 u1D7D9 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7da u1D7DA 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7db u1D7DB 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7dc u1D7DC 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7dd u1D7DD 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7de u1D7DE 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7df u1D7DF 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e0 u1D7E0 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e1 u1D7E1 2.22 (Serif, Serif Condensed) 2.29 (Sans, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) 2.30 (Sans Bold) -U+1d7e2 u1D7E2 2.23 (Sans, Sans Condensed) -U+1d7e3 u1D7E3 2.23 (Sans, Sans Condensed) -U+1d7e4 u1D7E4 2.23 (Sans, Sans Condensed) -U+1d7e5 u1D7E5 2.23 (Sans, Sans Condensed) -U+1d7e6 u1D7E6 2.23 (Sans, Sans Condensed) -U+1d7e7 u1D7E7 2.23 (Sans, Sans Condensed) -U+1d7e8 u1D7E8 2.23 (Sans, Sans Condensed) -U+1d7e9 u1D7E9 2.23 (Sans, Sans Condensed) -U+1d7ea u1D7EA 2.23 (Sans, Sans Condensed) -U+1d7eb u1D7EB 2.23 (Sans, Sans Condensed) -U+1d7ec u1D7EC 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ed u1D7ED 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ee u1D7EE 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7ef u1D7EF 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f0 u1D7F0 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f1 u1D7F1 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f2 u1D7F2 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f3 u1D7F3 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f4 u1D7F4 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f5 u1D7F5 2.23 (Sans Bold, Sans Condensed Bold) -U+1d7f6 u1D7F6 2.23 (Sans Mono) -U+1d7f7 u1D7F7 2.23 (Sans Mono) -U+1d7f8 u1D7F8 2.23 (Sans Mono) -U+1d7f9 u1D7F9 2.23 (Sans Mono) -U+1d7fa u1D7FA 2.23 (Sans Mono) -U+1d7fb u1D7FB 2.23 (Sans Mono) -U+1d7fc u1D7FC 2.23 (Sans Mono) -U+1d7fd u1D7FD 2.23 (Sans Mono) -U+1d7fe u1D7FE 2.23 (Sans Mono) -U+1d7ff u1D7FF 2.23 (Sans Mono) -U+1f030 u1F030 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f031 u1F031 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f032 u1F032 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f033 u1F033 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f034 u1F034 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f035 u1F035 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f036 u1F036 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f037 u1F037 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f038 u1F038 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f039 u1F039 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03a u1F03A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03b u1F03B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03c u1F03C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03d u1F03D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03e u1F03E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f03f u1F03F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f040 u1F040 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f041 u1F041 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f042 u1F042 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f043 u1F043 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f044 u1F044 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f045 u1F045 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f046 u1F046 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f047 u1F047 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f048 u1F048 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f049 u1F049 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04a u1F04A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04b u1F04B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04c u1F04C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04d u1F04D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04e u1F04E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f04f u1F04F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f050 u1F050 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f051 u1F051 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f052 u1F052 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f053 u1F053 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f054 u1F054 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f055 u1F055 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f056 u1F056 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f057 u1F057 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f058 u1F058 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f059 u1F059 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05a u1F05A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05b u1F05B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05c u1F05C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05d u1F05D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05e u1F05E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f05f u1F05F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f060 u1F060 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f061 u1F061 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f062 u1F062 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f063 u1F063 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f064 u1F064 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f065 u1F065 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f066 u1F066 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f067 u1F067 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f068 u1F068 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f069 u1F069 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06a u1F06A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06b u1F06B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06c u1F06C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06d u1F06D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06e u1F06E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f06f u1F06F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f070 u1F070 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f071 u1F071 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f072 u1F072 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f073 u1F073 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f074 u1F074 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f075 u1F075 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f076 u1F076 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f077 u1F077 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f078 u1F078 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f079 u1F079 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07a u1F07A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07b u1F07B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07c u1F07C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07d u1F07D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07e u1F07E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f07f u1F07F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f080 u1F080 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f081 u1F081 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f082 u1F082 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f083 u1F083 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f084 u1F084 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f085 u1F085 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f086 u1F086 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f087 u1F087 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f088 u1F088 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f089 u1F089 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08a u1F08A 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08b u1F08B 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08c u1F08C 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08d u1F08D 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08e u1F08E 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f08f u1F08F 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f090 u1F090 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f091 u1F091 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f092 u1F092 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f093 u1F093 2.32 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a0 u1F0A0 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a1 u1F0A1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a2 u1F0A2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a3 u1F0A3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a4 u1F0A4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a5 u1F0A5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a6 u1F0A6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a7 u1F0A7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a8 u1F0A8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0a9 u1F0A9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0aa u1F0AA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ab u1F0AB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ac u1F0AC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ad u1F0AD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ae u1F0AE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b1 u1F0B1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b2 u1F0B2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b3 u1F0B3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b4 u1F0B4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b5 u1F0B5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b6 u1F0B6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b7 u1F0B7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b8 u1F0B8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0b9 u1F0B9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ba u1F0BA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bb u1F0BB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bc u1F0BC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0bd u1F0BD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0be u1F0BE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c1 u1F0C1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c2 u1F0C2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c3 u1F0C3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c4 u1F0C4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c5 u1F0C5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c6 u1F0C6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c7 u1F0C7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c8 u1F0C8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0c9 u1F0C9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ca u1F0CA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cb u1F0CB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cc u1F0CC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cd u1F0CD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0ce u1F0CE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0cf u1F0CF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d1 u1F0D1 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d2 u1F0D2 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d3 u1F0D3 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d4 u1F0D4 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d5 u1F0D5 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d6 u1F0D6 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d7 u1F0D7 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d8 u1F0D8 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0d9 u1F0D9 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0da u1F0DA 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0db u1F0DB 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0dc u1F0DC 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0dd u1F0DD 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0de u1F0DE 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f0df u1F0DF 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f42d u1F42D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f42e u1F42E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f431 u1F431 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f435 u1F435 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f600 u1F600 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f601 u1F601 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f602 u1F602 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f603 u1F603 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f604 u1F604 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f605 u1F605 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f606 u1F606 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f607 u1F607 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f608 u1F608 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f609 u1F609 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60a u1F60A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60b u1F60B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60c u1F60C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60d u1F60D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60e u1F60E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f60f u1F60F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f610 u1F610 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f611 u1F611 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f612 u1F612 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f613 u1F613 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f614 u1F614 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f615 u1F615 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f616 u1F616 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f617 u1F617 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f618 u1F618 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f619 u1F619 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61a u1F61A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61b u1F61B 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61c u1F61C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61d u1F61D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61e u1F61E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f61f u1F61F 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f620 u1F620 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f621 u1F621 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f622 u1F622 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f623 u1F623 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f625 u1F625 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f626 u1F626 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f627 u1F627 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f628 u1F628 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f629 u1F629 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62a u1F62A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62b u1F62B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62d u1F62D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62e u1F62E 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f62f u1F62F 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f630 u1F630 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f631 u1F631 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f632 u1F632 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f633 u1F633 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f634 u1F634 2.34 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f635 u1F635 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f636 u1F636 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f637 u1F637 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f638 u1F638 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f639 u1F639 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63a u1F63A 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63b u1F63B 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63c u1F63C 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63d u1F63D 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63e u1F63E 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f63f u1F63F 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) -U+1f640 u1F640 2.33 (Sans, Sans Bold, Sans Bold Oblique, Sans Condensed, Sans Condensed Bold, Sans Condensed Bold Oblique, Sans Condensed Oblique, Sans Oblique) diff --git a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/unicover.txt b/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/unicover.txt deleted file mode 100644 index c86c056299c..00000000000 --- a/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/unicover.txt +++ /dev/null @@ -1,226 +0,0 @@ -This is the Unicode coverage file for DejaVu fonts -($Id: unicover.txt 2538 2013-08-25 16:02:56Z moyogo $) - -Control and similar characters are discounted from totals. - - Sans Serif Sans Mono -U+0000 Basic Latin 100% (95/95) 100% (95/95) 100% (95/95) -U+0080 Latin-1 Supplement 100% (96/96) 100% (96/96) 100% (96/96) -U+0100 Latin Extended-A 100% (128/128) 100% (128/128) 100% (128/128) -U+0180 Latin Extended-B 100% (208/208) 100% (208/208) 86% (180/208) -U+0250 IPA Extensions 100% (96/96) 100% (96/96) 100% (96/96) -U+02b0 Spacing Modifier Letters 78% (63/80) 73% (59/80) 62% (50/80) -U+0300 Combining Diacritical Marks 83% (93/112) 61% (69/112) 59% (67/112) -U+0370 Greek and Coptic 100% (134/134) 89% (120/134) 82% (110/134) -U+0400 Cyrillic 100% (256/256) 79% (204/256) 70% (180/256) -U+0500 Cyrillic Supplement 95% (38/40) 25% (10/40) 15% (6/40) -U+0530 Armenian 98% (86/87) 98% (86/87) 98% (86/87) -U+0590 Hebrew 62% (54/87) (0/87) (0/87) -U+0600 Arabic 63% (161/253) (0/253) 39% (99/253) -U+0700 Syriac (0/77) (0/77) (0/77) -U+0750 Arabic Supplement (0/48) (0/48) (0/48) -U+0780 Thaana (0/50) (0/50) (0/50) -U+07c0 NKo 91% (54/59) (0/59) (0/59) -U+0800 Samaritan (0/61) (0/61) (0/61) -U+0840 Mandaic (0/29) (0/29) (0/29) -U+08a0 Arabic Extended-A (0/39) (0/39) (0/39) -U+0900 Devanagari (0/127) (0/127) (0/127) -U+0980 Bengali (0/92) (0/92) (0/92) -U+0a00 Gurmukhi (0/79) (0/79) (0/79) -U+0a80 Gujarati (0/84) (0/84) (0/84) -U+0b00 Oriya (0/90) (0/90) (0/90) -U+0b80 Tamil (0/72) (0/72) (0/72) -U+0c00 Telugu (0/93) (0/93) (0/93) -U+0c80 Kannada (0/86) (0/86) (0/86) -U+0d00 Malayalam (0/98) (0/98) (0/98) -U+0d80 Sinhala (0/80) (0/80) (0/80) -U+0e00 Thai 1% (1/87) (0/87) (0/87) -U+0e80 Lao 97% (65/67) (0/67) 68% (46/67) -U+0f00 Tibetan (0/211) (0/211) (0/211) -U+1000 Myanmar (0/160) (0/160) (0/160) -U+10a0 Georgian 94% (83/88) 94% (83/88) 51% (45/88) -U+1100 Hangul Jamo (0/256) (0/256) (0/256) -U+1200 Ethiopic (0/358) (0/358) (0/358) -U+1380 Ethiopic Supplement (0/26) (0/26) (0/26) -U+13a0 Cherokee (0/85) (0/85) (0/85) -U+1400 Unified Canadian Aboriginal Syllabics 63% (404/640) (0/640) (0/640) -U+1680 Ogham 100% (29/29) (0/29) (0/29) -U+16a0 Runic (0/81) (0/81) (0/81) -U+1700 Tagalog (0/20) (0/20) (0/20) -U+1720 Hanunoo (0/23) (0/23) (0/23) -U+1740 Buhid (0/20) (0/20) (0/20) -U+1760 Tagbanwa (0/18) (0/18) (0/18) -U+1780 Khmer (0/114) (0/114) (0/114) -U+1800 Mongolian (0/156) (0/156) (0/156) -U+18b0 Unified Canadian Aboriginal Syllabics Extended (0/70) (0/70) (0/70) -U+1900 Limbu (0/66) (0/66) (0/66) -U+1950 Tai Le (0/35) (0/35) (0/35) -U+1980 New Tai Lue (0/83) (0/83) (0/83) -U+19e0 Khmer Symbols (0/32) (0/32) (0/32) -U+1a00 Buginese (0/30) (0/30) (0/30) -U+1a20 Tai Tham (0/127) (0/127) (0/127) -U+1b00 Balinese (0/121) (0/121) (0/121) -U+1b80 Sundanese (0/64) (0/64) (0/64) -U+1bc0 Batak (0/56) (0/56) (0/56) -U+1c00 Lepcha (0/74) (0/74) (0/74) -U+1c50 Ol Chiki (0/48) (0/48) (0/48) -U+1cc0 Sundanese Supplement (0/8) (0/8) (0/8) -U+1cd0 Vedic Extensions (0/39) (0/39) (0/39) -U+1d00 Phonetic Extensions 82% (106/128) 89% (115/128) 48% (62/128) -U+1d80 Phonetic Extensions Supplement 59% (38/64) 59% (38/64) 57% (37/64) -U+1dc0 Combining Diacritical Marks Supplement 13% (6/43) 13% (6/43) (0/43) -U+1e00 Latin Extended Additional 98% (252/256) 98% (252/256) 71% (182/256) -U+1f00 Greek Extended 100% (233/233) 100% (233/233) 100% (233/233) -U+2000 General Punctuation 100% (107/107) 81% (87/107) 49% (53/107) -U+2070 Superscripts and Subscripts 100% (42/42) 100% (42/42) 100% (42/42) -U+20a0 Currency Symbols 92% (25/27) 29% (8/27) 88% (24/27) -U+20d0 Combining Diacritical Marks for Symbols 21% (7/33) (0/33) (0/33) -U+2100 Letterlike Symbols 93% (75/80) 42% (34/80) 22% (18/80) -U+2150 Number Forms 94% (55/58) 94% (55/58) 22% (13/58) -U+2190 Arrows 100% (112/112) 100% (112/112) 100% (112/112) -U+2200 Mathematical Operators 100% (256/256) 39% (100/256) 62% (159/256) -U+2300 Miscellaneous Technical 26% (65/244) 14% (35/244) 47% (117/244) -U+2400 Control Pictures 5% (2/39) 2% (1/39) 2% (1/39) -U+2440 Optical Character Recognition (0/11) (0/11) (0/11) -U+2460 Enclosed Alphanumerics 6% (10/160) (0/160) (0/160) -U+2500 Box Drawing 100% (128/128) 100% (128/128) 100% (128/128) -U+2580 Block Elements 100% (32/32) 100% (32/32) 100% (32/32) -U+25a0 Geometric Shapes 100% (96/96) 100% (96/96) 100% (96/96) -U+2600 Miscellaneous Symbols 73% (187/256) 11% (30/256) 58% (149/256) -U+2700 Dingbats 91% (174/191) 0% (1/191) 75% (144/191) -U+27c0 Miscellaneous Mathematical Symbols-A 18% (9/48) 10% (5/48) 16% (8/48) -U+27f0 Supplemental Arrows-A 100% (16/16) 100% (16/16) (0/16) -U+2800 Braille Patterns 100% (256/256) 100% (256/256) (0/256) -U+2900 Supplemental Arrows-B 4% (6/128) 100% (128/128) (0/128) -U+2980 Miscellaneous Mathematical Symbols-B 10% (13/128) 0% (1/128) 2% (3/128) -U+2a00 Supplemental Mathematical Operators 28% (74/256) 2% (6/256) 1% (3/256) -U+2b00 Miscellaneous Symbols and Arrows 40% (35/87) 31% (27/87) 20% (18/87) -U+2c00 Glagolitic (0/94) (0/94) (0/94) -U+2c60 Latin Extended-C 96% (31/32) 84% (27/32) 43% (14/32) -U+2c80 Coptic (0/123) (0/123) (0/123) -U+2d00 Georgian Supplement 95% (38/40) 95% (38/40) (0/40) -U+2d30 Tifinagh 93% (55/59) (0/59) (0/59) -U+2d80 Ethiopic Extended (0/79) (0/79) (0/79) -U+2de0 Cyrillic Extended-A (0/32) (0/32) (0/32) -U+2e00 Supplemental Punctuation 11% (7/60) 11% (7/60) 11% (7/60) -U+2e80 CJK Radicals Supplement (0/115) (0/115) (0/115) -U+2f00 Kangxi Radicals (0/214) (0/214) (0/214) -U+2ff0 Ideographic Description Characters (0/12) (0/12) (0/12) -U+3000 CJK Symbols and Punctuation (0/64) (0/64) (0/64) -U+3040 Hiragana (0/93) (0/93) (0/93) -U+30a0 Katakana (0/96) (0/96) (0/96) -U+3100 Bopomofo (0/41) (0/41) (0/41) -U+3130 Hangul Compatibility Jamo (0/94) (0/94) (0/94) -U+3190 Kanbun (0/16) (0/16) (0/16) -U+31a0 Bopomofo Extended (0/27) (0/27) (0/27) -U+31c0 CJK Strokes (0/36) (0/36) (0/36) -U+31f0 Katakana Phonetic Extensions (0/16) (0/16) (0/16) -U+3200 Enclosed CJK Letters and Months (0/254) (0/254) (0/254) -U+3300 CJK Compatibility (0/256) (0/256) (0/256) -U+3400 CJK Unified Ideographs Extension A (0/0) (0/0) (0/0) -U+4dc0 Yijing Hexagram Symbols 100% (64/64) (0/64) (0/64) -U+4e00 CJK Unified Ideographs (0/0) (0/0) (0/0) -U+a000 Yi Syllables (0/1165) (0/1165) (0/1165) -U+a490 Yi Radicals (0/55) (0/55) (0/55) -U+a4d0 Lisu 100% (48/48) (0/48) (0/48) -U+a500 Vai (0/300) (0/300) (0/300) -U+a640 Cyrillic Extended-B 34% (31/89) 11% (10/89) (0/89) -U+a6a0 Bamum (0/88) (0/88) (0/88) -U+a700 Modifier Tone Letters 62% (20/32) 62% (20/32) 62% (20/32) -U+a720 Latin Extended-D 55% (75/134) 43% (58/134) 11% (15/134) -U+a800 Syloti Nagri (0/44) (0/44) (0/44) -U+a830 Common Indic Number Forms (0/10) (0/10) (0/10) -U+a840 Phags-pa (0/56) (0/56) (0/56) -U+a880 Saurashtra (0/81) (0/81) (0/81) -U+a8e0 Devanagari Extended (0/28) (0/28) (0/28) -U+a900 Kayah Li (0/48) (0/48) (0/48) -U+a930 Rejang (0/37) (0/37) (0/37) -U+a960 Hangul Jamo Extended-A (0/29) (0/29) (0/29) -U+a980 Javanese (0/91) (0/91) (0/91) -U+aa00 Cham (0/83) (0/83) (0/83) -U+aa60 Myanmar Extended-A (0/28) (0/28) (0/28) -U+aa80 Tai Viet (0/72) (0/72) (0/72) -U+aae0 Meetei Mayek Extensions (0/23) (0/23) (0/23) -U+ab00 Ethiopic Extended-A (0/32) (0/32) (0/32) -U+abc0 Meetei Mayek (0/56) (0/56) (0/56) -U+ac00 Hangul Syllables (0/0) (0/0) (0/0) -U+d7b0 Hangul Jamo Extended-B (0/72) (0/72) (0/72) -U+d800 High Surrogates (0/0) (0/0) (0/0) -U+db80 High Private Use Surrogates (0/0) (0/0) (0/0) -U+dc00 Low Surrogates (0/0) (0/0) (0/0) -U+e000 Private Use Area (0/0) (0/0) (0/0) -U+f900 CJK Compatibility Ideographs (0/472) (0/472) (0/472) -U+fb00 Alphabetic Presentation Forms 100% (58/58) 12% (7/58) 3% (2/58) -U+fb50 Arabic Presentation Forms-A 16% (98/611) (0/611) 11% (72/611) -U+fe00 Variation Selectors 100% (16/16) 100% (16/16) (0/16) -U+fe10 Vertical Forms (0/10) (0/10) (0/10) -U+fe20 Combining Half Marks 57% (4/7) (0/7) (0/7) -U+fe30 CJK Compatibility Forms (0/32) (0/32) (0/32) -U+fe50 Small Form Variants (0/26) (0/26) (0/26) -U+fe70 Arabic Presentation Forms-B 100% (141/141) (0/141) 100% (141/141) -U+ff00 Halfwidth and Fullwidth Forms (0/225) (0/225) (0/225) -U+fff0 Specials 100% (5/5) 100% (5/5) 100% (5/5) -U+10000 Linear B Syllabary (0/88) (0/88) (0/88) -U+10080 Linear B Ideograms (0/123) (0/123) (0/123) -U+10100 Aegean Numbers (0/57) (0/57) (0/57) -U+10140 Ancient Greek Numbers (0/75) (0/75) (0/75) -U+10190 Ancient Symbols (0/12) (0/12) (0/12) -U+101d0 Phaistos Disc (0/46) (0/46) (0/46) -U+10280 Lycian (0/29) (0/29) (0/29) -U+102a0 Carian (0/49) (0/49) (0/49) -U+10300 Old Italic 100% (35/35) (0/35) (0/35) -U+10330 Gothic (0/27) (0/27) (0/27) -U+10380 Ugaritic (0/31) (0/31) (0/31) -U+103a0 Old Persian (0/50) (0/50) (0/50) -U+10400 Deseret (0/80) (0/80) (0/80) -U+10450 Shavian (0/48) (0/48) (0/48) -U+10480 Osmanya (0/40) (0/40) (0/40) -U+10800 Cypriot Syllabary (0/55) (0/55) (0/55) -U+10840 Imperial Aramaic (0/31) (0/31) (0/31) -U+10900 Phoenician (0/29) (0/29) (0/29) -U+10920 Lydian (0/27) (0/27) (0/27) -U+10980 Meroitic Hieroglyphs (0/32) (0/32) (0/32) -U+109a0 Meroitic Cursive (0/26) (0/26) (0/26) -U+10a00 Kharoshthi (0/65) (0/65) (0/65) -U+10a60 Old South Arabian (0/32) (0/32) (0/32) -U+10b00 Avestan (0/61) (0/61) (0/61) -U+10b40 Inscriptional Parthian (0/30) (0/30) (0/30) -U+10b60 Inscriptional Pahlavi (0/27) (0/27) (0/27) -U+10c00 Old Turkic (0/73) (0/73) (0/73) -U+10e60 Rumi Numeral Symbols (0/31) (0/31) (0/31) -U+11000 Brahmi (0/108) (0/108) (0/108) -U+11080 Kaithi (0/66) (0/66) (0/66) -U+110d0 Sora Sompeng (0/35) (0/35) (0/35) -U+11100 Chakma (0/67) (0/67) (0/67) -U+11180 Sharada (0/83) (0/83) (0/83) -U+11680 Takri (0/66) (0/66) (0/66) -U+12000 Cuneiform (0/879) (0/879) (0/879) -U+12400 Cuneiform Numbers and Punctuation (0/103) (0/103) (0/103) -U+13000 Egyptian Hieroglyphs (0/1071) (0/1071) (0/1071) -U+16800 Bamum Supplement (0/569) (0/569) (0/569) -U+16f00 Miao (0/133) (0/133) (0/133) -U+1b000 Kana Supplement (0/2) (0/2) (0/2) -U+1d000 Byzantine Musical Symbols (0/246) (0/246) (0/246) -U+1d100 Musical Symbols (0/220) (0/220) (0/220) -U+1d200 Ancient Greek Musical Notation (0/70) (0/70) (0/70) -U+1d300 Tai Xuan Jing Symbols 100% (87/87) (0/87) (0/87) -U+1d360 Counting Rod Numerals (0/18) (0/18) (0/18) -U+1d400 Mathematical Alphanumeric Symbols 11% (117/996) 5% (55/996) 6% (63/996) -U+1ee00 Arabic Mathematical Alphabetic Symbols (0/143) (0/143) (0/143) -U+1f000 Mahjong Tiles (0/44) (0/44) (0/44) -U+1f030 Domino Tiles 100% (100/100) (0/100) (0/100) -U+1f0a0 Playing Cards 100% (59/59) (0/59) (0/59) -U+1f100 Enclosed Alphanumeric Supplement (0/171) (0/171) (0/171) -U+1f200 Enclosed Ideographic Supplement (0/57) (0/57) (0/57) -U+1f300 Miscellaneous Symbols And Pictographs 0% (4/533) (0/533) (0/533) -U+1f600 Emoticons 82% (63/76) (0/76) (0/76) -U+1f680 Transport And Map Symbols (0/70) (0/70) (0/70) -U+1f700 Alchemical Symbols (0/116) (0/116) (0/116) -U+20000 CJK Unified Ideographs Extension B (0/0) (0/0) (0/0) -U+2a700 CJK Unified Ideographs Extension C (0/0) (0/0) (0/0) -U+2b740 CJK Unified Ideographs Extension D (0/0) (0/0) (0/0) -U+2f800 CJK Compatibility Ideographs Supplement (0/542) (0/542) (0/542) -U+e0000 Tags (0/98) (0/98) (0/98) -U+e0100 Variation Selectors Supplement (0/240) (0/240) (0/240) -U+f0000 Supplementary Private Use Area-A (0/0) (0/0) (0/0) -U+100000 Supplementary Private Use Area-B (0/0) (0/0) (0/0) diff --git a/htdocs/index.php b/htdocs/index.php index a4060278c50..5485f9bc7be 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -24,13 +24,14 @@ * \brief Dolibarr home page */ -define('NOCSRFCHECK', 1); // This is main home and login page. We must be able to go on it from another web site. + +define('CSRFCHECK_WITH_TOKEN', 1); // We force need to use a token to login when making a POST require 'main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // If not defined, we select menu "home" -$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ?GETPOST('mainmenu', 'aZ09') : 'home'; +$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; $action = GETPOST('action', 'aZ09'); $hookmanager->initHooks(array('index')); @@ -41,18 +42,15 @@ $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)) -{ +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; } -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 -{ +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; } -if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) -{ +if (GETPOST('addbox')) { // Add box (when submit is done from a form when ajax disabled) require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; $zone = GETPOST('areacode', 'aZ09'); $userid = GETPOST('userid', 'int'); @@ -60,7 +58,9 @@ if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax dis $boxorder .= GETPOST('boxcombo', 'aZ09'); $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); - if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null); + if ($result > 0) { + setEventMessages($langs->trans("BoxAdded"), null); + } } @@ -68,11 +68,15 @@ if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax dis * View */ -if (!isset($form) || !is_object($form)) $form = new Form($db); +if (!isset($form) || !is_object($form)) { + $form = new Form($db); +} // Title $title = $langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = $langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = $langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; +} llxHeader('', $title); @@ -82,11 +86,9 @@ $resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (select print load_fiche_titre('&nbsp;', $resultboxes['selectboxlist'], '', 0, '', 'titleforhome'); -if (!empty($conf->global->MAIN_MOTD)) -{ +if (!empty($conf->global->MAIN_MOTD)) { $conf->global->MAIN_MOTD = preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', $conf->global->MAIN_MOTD); - if (!empty($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); @@ -112,219 +114,6 @@ $boxstatFromHook = ''; // Load translation files required by page $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; - - 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, - '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", - ); - - - // 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 - $classkeyforcache = $class; - if ($classkeyforcache == 'ProductService') $classkeyforcache = 'Product'; // ProductService use same load_state_board than Product - - if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache])) - { - include_once $includes[$val]; // Loading a class cost around 1Mb - - $board = new $class($db); - $board->load_state_board(); - $boardloaded[$class] = $board; - } else { - $board = $boardloaded[$classkeyforcache]; - } - - $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); - - $text = $langs->trans($titres[$val]); - $boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">'; - $boxstatItem .= '<div class="boxstats">'; - $boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>'; - $boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).'</span>'; - $boxstatItem .= '</div>'; - $boxstatItem .= '</a>'; - - $boxstatItems[$val] = $boxstatItem; - } - } - } -} - - - - // Dolibarr Working Board with weather if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { @@ -471,8 +260,12 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $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 + $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); } @@ -627,8 +420,10 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $boxwork .= '<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans("DolibarrWorkBoard").'</div>'; if ($showweather) { if ($totallate > 0) { - $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", - $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')'; + $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv( + "NActionsLate", + $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '') + ).')'; } else { $text = $langs->transnoentitiesnoconv("NoItemLate"); } @@ -670,17 +465,17 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $globalStatsKey = $groupElement['globalStatsKey']; $groupElement['globalStats'] = array(); - if (is_array($keys) && in_array($globalStatsKey, $keys)) - { + if (isset($keys) && 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])) - { + $classe = (!empty($classes[$keyIndex]) ? $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'; } + 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]; @@ -762,13 +557,15 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { } if ($showweather && !empty($isIntopOpenedDashBoard)) { - $appendClass = $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : ''; + $appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $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) ? '%' : '')).')'; + $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv( + "NActionsLate", + $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '') + ).')'; } else { $text = $langs->transnoentitiesnoconv("NoItemLate"); } @@ -783,16 +580,24 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $weatherDashBoard .= ' <div class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</div>'."\n"; if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv("NActionsLate", - price($totallatePercentage).'%').'</span>'."\n"; - $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans('NActionsLate', - $totalLateNumber).'</span>'."\n"; + $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv( + "NActionsLate", + price($totallatePercentage).'%' + ).'</span>'."\n"; + $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans( + 'NActionsLate', + $totalLateNumber + ).'</span>'."\n"; } else { - $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv("NActionsLate", - $totalLateNumber).'</span>'."\n"; + $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv( + "NActionsLate", + $totalLateNumber + ).'</span>'."\n"; if ($totallatePercentage > 0) { - $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans('NActionsLate', - price($totallatePercentage).'%').'</span>'."\n"; + $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans( + 'NActionsLate', + price($totallatePercentage).'%' + ).'</span>'."\n"; } } @@ -840,8 +645,11 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { $boxwork .= '<div class="dashboardlinelatecoin nowrap">'; $boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late).'">'; //$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').''; - $boxwork .= img_picto($textlate, "warning_white", - 'class="inline-block hideonsmartphone valigntextbottom"').''; + $boxwork .= img_picto( + $textlate, + "warning_white", + 'class="inline-block hideonsmartphone valigntextbottom"' + ).''; $boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'">'; $boxwork .= $board->nbtodolate; $boxwork .= '</span>'; @@ -889,11 +697,10 @@ print '<div class="fichecenter fichecenterbis">'; * Show widgets (boxes) */ -$boxlist .= '<div class="twocolumns">'; +$boxlist = '<div class="twocolumns">'; $boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">'; -if (!empty($nbworkboardcount)) -{ +if (!empty($nbworkboardcount)) { $boxlist .= $boxwork; } @@ -901,54 +708,8 @@ $boxlist .= $resultboxes['boxlista']; $boxlist .= '</div>'; - -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]); - } - } - } - - if (!empty($boxstatFromHook) || !empty($boxstatItems)) { - $boxstat .= '<!-- Database statistics -->'."\n"; - $boxstat .= '<div class="box">'; - $boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover widgetstats" width="100%">'; - $boxstat .= '<tr class="liste_titre box_titre">'; - $boxstat .= '<td>'; - $boxstat .= '<div class="inline-block valignmiddle">'.$langs->trans("DolibarrStateBoard").'</div>'; - $boxstat .= '</td>'; - $boxstat .= '</tr>'; - $boxstat .= '<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer">'; - - $boxstat .= $boxstatFromHook; - - if (is_array($boxstatItems) && count($boxstatItems) > 0) - { - $boxstat .= implode('', $boxstatItems); - } - - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; - - $boxstat .= '</td></tr>'; - $boxstat .= '</table>'; - $boxstat .= '</div>'; - } -} - $boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">'; -$boxlist .= $boxstat; $boxlist .= $resultboxes['boxlistb']; $boxlist .= '</div>'; @@ -967,30 +728,26 @@ print '</div>'; */ // Security warning repertoire install existe (si utilisateur admin) -if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) -{ +if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { $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")) - { + if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) { $langs->load("errors"); //if (! empty($message)) $message.='<br>'; $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)) - { + if (is_writable($conffile)) { $langs->load("errors"); //$langs->load("other"); //if (! empty($message)) $message.='<br>'; $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); } - if ($message) - { + if ($message) { print $message; //$message.='<br>'; //print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install")); @@ -1028,7 +785,7 @@ function showWeather($totallate, $text, $options, $morecss = '') * $conf->global->MAIN_METEO_LEVELx * * @param int $totallate Nb of element late - * @return string Return img tag of weather + * @return stdClass Return img tag of weather */ function getWeatherStatus($totallate) { @@ -1063,20 +820,16 @@ function getWeatherStatus($totallate) if ($totallate <= $level0) { $weather->picto = 'weather-clear.png'; $weather->level = 0; - } - elseif ($totallate <= $level1) { + } elseif ($totallate <= $level1) { $weather->picto = 'weather-few-clouds.png'; $weather->level = 1; - } - elseif ($totallate <= $level2) { + } elseif ($totallate <= $level2) { $weather->picto = 'weather-clouds.png'; $weather->level = 2; - } - elseif ($totallate <= $level3) { + } elseif ($totallate <= $level3) { $weather->picto = 'weather-many-clouds.png'; $weather->level = 3; - } - else { + } else { $weather->picto = 'weather-storm.png'; $weather->level = 4; } diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 97ddb315ca9..79c8e590ab9 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -43,7 +43,9 @@ $langs->load("install"); // Now we load forced/pre-set values from install.forced.php file. $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; @@ -62,40 +64,41 @@ pHeader('', ''); // No next step for navigation buttons. Next step is defined by //print "<br>\n"; //print $langs->trans("InstallEasy")."<br><br>\n"; -print '<h3><img class="valigntextbottom" src="../theme/common/octicons/build/svg/gear.svg" width="20" alt="Database"> '.$langs->trans("MiscellaneousChecks").":</h3>\n"; +print '<h3><img class="valigntextbottom inline-block" src="../theme/common/octicons/build/svg/gear.svg" width="20" alt="Database"> '; +print '<span class="inline-block">'.$langs->trans("MiscellaneousChecks")."</span></h3>\n"; // Check browser $useragent = $_SERVER['HTTP_USER_AGENT']; -if (!empty($useragent)) -{ +if (!empty($useragent)) { $tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); $browserversion = $tmp['browserversion']; $browsername = $tmp['browsername']; - if ($browsername == 'ie' && $browserversion < 7) print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("WarningBrowserTooOld")."<br>\n"; + if ($browsername == 'ie' && $browserversion < 7) { + print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("WarningBrowserTooOld")."<br>\n"; + } } // Check PHP version $arrayphpminversionerror = array(5, 5, 0); $arrayphpminversionwarning = array(5, 6, 0); -if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) // Minimum to use (error if lower) -{ +if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { // Minimum to use (error if lower) print '<img src="../theme/eldy/img/error.png" alt="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 '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); $checksok = 0; // 0=error, 1=warning } else { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPVersion")." ".versiontostring(versionphparray()); } -if (empty($force_install_nophpinfo)) print ' (<a href="phpinfo.php" target="_blank">'.$langs->trans("MoreInformation").'</a>)'; +if (empty($force_install_nophpinfo)) { + print ' (<a href="phpinfo.php" target="_blank">'.$langs->trans("MoreInformation").'</a>)'; +} print "<br>\n"; // Check PHP support for $_GET and $_POST -if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) // We must keep $_GET and $_POST here -{ +if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) { // We must keep $_GET and $_POST here print '<img src="../theme/eldy/img/warning.png" alt="Warning"> '.$langs->trans("PHPSupportPOSTGETKo"); print ' (<a href="'.$_SERVER["PHP_SELF"].'?testget=ok">'.$langs->trans("Recheck").'</a>)'; print "<br>\n"; @@ -106,8 +109,7 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) // We must keep $_GE // Check if session_id is enabled -if (!function_exists("session_id")) -{ +if (!function_exists("session_id")) { print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportSessions")."<br>\n"; $checksok = 0; } else { @@ -116,8 +118,7 @@ if (!function_exists("session_id")) // Check if GD is supported (we need GD for image conversion) -if (!function_exists("imagecreate")) -{ +if (!function_exists("imagecreate")) { $langs->load("errors"); print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) @@ -127,8 +128,7 @@ if (!function_exists("imagecreate")) // Check if Curl is supported -if (!function_exists("curl_init")) -{ +if (!function_exists("curl_init")) { $langs->load("errors"); print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) @@ -137,8 +137,7 @@ if (!function_exists("curl_init")) } // Check if PHP calendar extension is available -if (!function_exists("easter_date")) -{ +if (!function_exists("easter_date")) { print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."<br>\n"; } else { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Calendar")."<br>\n"; @@ -146,8 +145,7 @@ if (!function_exists("easter_date")) // Check if UTF8 is supported -if (!function_exists("utf8_encode")) -{ +if (!function_exists("utf8_encode")) { $langs->load("errors"); print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) @@ -157,10 +155,8 @@ if (!function_exists("utf8_encode")) // Check if intl methods are supported -if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') -{ - if (!function_exists("locale_get_primary_language") || !function_exists("locale_get_region")) - { +if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') { + if (!function_exists("locale_get_primary_language") || !function_exists("locale_get_region")) { $langs->load("errors"); print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) @@ -169,8 +165,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc } } -if (!class_exists('ZipArchive')) -{ +if (!class_exists('ZipArchive')) { $langs->load("errors"); print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."<br>\n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) @@ -183,17 +178,20 @@ $memrequiredorig = '64M'; $memrequired = 64 * 1024 * 1024; $memmaxorig = @ini_get("memory_limit"); $memmax = @ini_get("memory_limit"); -if ($memmaxorig != '') -{ +if ($memmaxorig != '') { preg_match('/([0-9]+)([a-zA-Z]*)/i', $memmax, $reg); - if ($reg[2]) - { - if (strtoupper($reg[2]) == 'G') $memmax = $reg[1] * 1024 * 1024 * 1024; - if (strtoupper($reg[2]) == 'M') $memmax = $reg[1] * 1024 * 1024; - if (strtoupper($reg[2]) == 'K') $memmax = $reg[1] * 1024; + if ($reg[2]) { + if (strtoupper($reg[2]) == 'G') { + $memmax = $reg[1] * 1024 * 1024 * 1024; + } + if (strtoupper($reg[2]) == 'M') { + $memmax = $reg[1] * 1024 * 1024; + } + if (strtoupper($reg[2]) == 'K') { + $memmax = $reg[1] * 1024; + } } - if ($memmax >= $memrequired || $memmax == -1) - { + if ($memmax >= $memrequired || $memmax == -1) { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPMemoryOK", $memmaxorig, $memrequiredorig)."<br>\n"; } else { print '<img src="../theme/eldy/img/warning.png" alt="Warning"> '.$langs->trans("PHPMemoryTooLow", $memmaxorig, $memrequiredorig)."<br>\n"; @@ -203,15 +201,13 @@ if ($memmaxorig != '') // If that config file is present and filled clearstatcache(); -if (is_readable($conffile) && filesize($conffile) > 8) -{ +if (is_readable($conffile) && filesize($conffile) > 8) { dolibarr_install_syslog("check: conf file '".$conffile."' already defined"); $confexists = 1; include_once $conffile; $databaseok = 1; - if ($databaseok) - { + if ($databaseok) { // Already installed for all parts (config and database). We can propose upgrade. $allowupgrade = true; } else { @@ -223,8 +219,7 @@ if (is_readable($conffile) && filesize($conffile) > 8) $confexists = 0; // First we try by copying example - if (@copy($conffile.".example", $conffile)) - { + if (@copy($conffile.".example", $conffile)) { // Success dolibarr_install_syslog("check: successfully copied file ".$conffile.".example into ".$conffile); } else { @@ -232,12 +227,13 @@ if (is_readable($conffile) && filesize($conffile) > 8) dolibarr_install_syslog("check: failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.", LOG_WARNING); $fp = @fopen($conffile, "w"); - if ($fp) - { + if ($fp) { @fwrite($fp, '<?php'); @fputs($fp, "\n"); fclose($fp); - } else dolibarr_install_syslog("check: failed to create a new file ".$conffile." into current dir ".getcwd().". Please check permissions.", LOG_ERR); + } else { + dolibarr_install_syslog("check: failed to create a new file ".$conffile." into current dir ".getcwd().". Please check permissions.", LOG_ERR); + } } // First install: no upgrade necessary/required @@ -247,8 +243,7 @@ if (is_readable($conffile) && filesize($conffile) > 8) // File is missing and cannot be created -if (!file_exists($conffile)) -{ +if (!file_exists($conffile)) { print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated", $conffiletoshow); print "<br><br>"; print $langs->trans("YouMustCreateWithPermission", $conffiletoshow); @@ -257,17 +252,13 @@ if (!file_exists($conffile)) print $langs->trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok'); $err++; } else { - if (dol_is_dir($conffile)) - { + if (dol_is_dir($conffile)) { print '<img src="../theme/eldy/img/error.png" alt="Warning"> '.$langs->trans("ConfFileMustBeAFileNotADir", $conffiletoshow); $allowinstall = 0; - } - // File exists but cannot be modified - elseif (!is_writable($conffile)) - { - if ($confexists) - { + } elseif (!is_writable($conffile)) { + // File exists but cannot be modified + if ($confexists) { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("ConfFileExists", $conffiletoshow); } else { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("ConfFileCouldBeCreated", $conffiletoshow); @@ -277,11 +268,9 @@ if (!file_exists($conffile)) print "<br>\n"; $allowinstall = 0; - } - // File exists and can be modified - else { - if ($confexists) - { + } else { + // File exists and can be modified + if ($confexists) { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("ConfFileExists", $conffiletoshow); } else { print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("ConfFileCouldBeCreated", $conffiletoshow); @@ -295,32 +284,28 @@ if (!file_exists($conffile)) print "<br>\n"; // Requirements met/all ok: display the next step button - if ($checksok) - { + if ($checksok) { $ok = 0; // Try to create db connection - if (file_exists($conffile)) - { + if (file_exists($conffile)) { include_once $conffile; - if (!empty($dolibarr_main_db_type) && !empty($dolibarr_main_document_root)) - { - if (!file_exists($dolibarr_main_document_root."/core/lib/admin.lib.php")) - { + if (!empty($dolibarr_main_db_type) && !empty($dolibarr_main_document_root)) { + if (!file_exists($dolibarr_main_document_root."/core/lib/admin.lib.php")) { print '<span class="error">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.</span><br>'."\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 { require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php'; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) - { + 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)) - { + if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { $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 @@ -331,8 +316,7 @@ if (!file_exists($conffile)) $conf->db->user = $dolibarr_main_db_user; $conf->db->pass = $dolibarr_main_db_pass; $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); - if ($db->connected && $db->database_selected) - { + if ($db->connected && $db->database_selected) { $ok = true; } } @@ -340,16 +324,21 @@ if (!file_exists($conffile)) } // If database access is available, we set more variables - if ($ok) - { - if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; + if ($ok) { + if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; + } $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; - if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; + if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; + } $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; $conf->setValues($db); // Reset forced setup after the setValues - if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + } $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE @@ -359,14 +348,15 @@ if (!file_exists($conffile)) } // Show title - if (!empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || !empty($conf->global->MAIN_VERSION_LAST_INSTALL)) - { + if (!empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || !empty($conf->global->MAIN_VERSION_LAST_INSTALL)) { print $langs->trans("VersionLastUpgrade").': <b><span class="ok">'.(empty($conf->global->MAIN_VERSION_LAST_UPGRADE) ? $conf->global->MAIN_VERSION_LAST_INSTALL : $conf->global->MAIN_VERSION_LAST_UPGRADE).'</span></b> - '; print $langs->trans("VersionProgram").': <b><span class="ok">'.DOL_VERSION.'</span></b>'; //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); print '<br>'; print '<br>'; - } else print "<br>\n"; + } else { + print "<br>\n"; + } //print $langs->trans("InstallEasy")." "; print '<h3><span class="soustitre">'.$langs->trans("ChooseYourSetupMode").'</span></h3>'; @@ -376,8 +366,7 @@ if (!file_exists($conffile)) $available_choices = array(); $notavailable_choices = array(); - if (empty($dolibarr_main_db_host)) // This means install process was not run - { + if (empty($dolibarr_main_db_host)) { // This means install process was not run $foundrecommandedchoice = 1; // To show only once } @@ -387,8 +376,7 @@ if (!file_exists($conffile)) $choice .= '</td>'; $choice .= '<td class="listofchoicesdesc">'; $choice .= $langs->trans("FreshInstallDesc"); - if (empty($dolibarr_main_db_host)) // This means install process was not run - { + if (empty($dolibarr_main_db_host)) { // This means install process was not run $choice .= '<br>'; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); $choice .= '<div class="center"><div class="ok suggestedchoice">'.$langs->trans("InstallChoiceSuggested").'</div></div>'; @@ -397,8 +385,7 @@ if (!file_exists($conffile)) $choice .= '</td>'; $choice .= '<td class="center">'; - if ($allowinstall) - { + if ($allowinstall) { $choice .= '<a class="button" href="fileconf.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; } else { $choice .= ($foundrecommandedchoice ? '<span class="warning">' : '').$langs->trans("InstallNotAllowed").($foundrecommandedchoice ? '</span>' : ''); @@ -415,12 +402,15 @@ if (!file_exists($conffile)) // Show upgrade lines $allowupgrade = true; - if (empty($dolibarr_main_db_host)) // This means install process was not run - { + if (empty($dolibarr_main_db_host)) { // This means install process was not run $allowupgrade = false; } - if (defined("MAIN_NOT_INSTALLED")) $allowupgrade = false; - if (GETPOST('allowupgrade')) $allowupgrade = true; + if (defined("MAIN_NOT_INSTALLED")) { + $allowupgrade = false; + } + if (GETPOST('allowupgrade')) { + $allowupgrade = true; + } $migrationscript = array(array('from'=>'3.0.0', 'to'=>'3.1.0'), array('from'=>'3.1.0', 'to'=>'3.2.0'), array('from'=>'3.2.0', 'to'=>'3.3.0'), @@ -439,12 +429,12 @@ if (!file_exists($conffile)) 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'=>'12.0.0', 'to'=>'13.0.0') + array('from'=>'12.0.0', 'to'=>'13.0.0'), + array('from'=>'13.0.0', 'to'=>'14.0.0') ); $count = 0; - foreach ($migrationscript as $migarray) - { + foreach ($migrationscript as $migarray) { $choice = ''; $count++; @@ -459,20 +449,16 @@ if (!file_exists($conffile)) $newversionfrom = preg_replace('/(\.[0-9]+)$/i', '.*', $versionfrom); $newversionto = preg_replace('/(\.[0-9]+)$/i', '.*', $versionto); $newversionfrombis = ''; - if (versioncompare($dolibarrversiontoarray, $versionarray) < -2) // From x.y.z -> x.y.z+1 - { + if (versioncompare($dolibarrversiontoarray, $versionarray) < -2) { // From x.y.z -> x.y.z+1 $newversionfrombis = ' '.$langs->trans("or").' '.$versionto; } - if ($ok) - { - if (count($dolibarrlastupgradeversionarray) >= 2) // If database access is available and last upgrade version is known - { + if ($ok) { + if (count($dolibarrlastupgradeversionarray) >= 2) { // If database access is available and last upgrade version is known // Now we check if this is the first qualified choice if ($allowupgrade && empty($foundrecommandedchoice) && (versioncompare($dolibarrversiontoarray, $dolibarrlastupgradeversionarray) > 0 || versioncompare($dolibarrversiontoarray, $versionarray) < -2) - ) - { + ) { $foundrecommandedchoice = 1; // To show only once $recommended_choice = true; } @@ -488,14 +474,12 @@ if (!file_exists($conffile)) $choice .= '<td class="listofchoicesdesc">'; $choice .= $langs->trans("UpgradeDesc"); - if ($recommended_choice) - { + if ($recommended_choice) { $choice .= '<br>'; //print $langs->trans("InstallChoiceRecommanded",DOL_VERSION,$conf->global->MAIN_VERSION_LAST_UPGRADE); $choice .= '<div class="center">'; $choice .= '<div class="ok suggestedchoice">'.$langs->trans("InstallChoiceSuggested").'</div>'; - if ($count < count($migarray)) // There are other choices after - { + if ($count < count($migarray)) { // There are other choices after print $langs->trans("MigrateIsDoneStepByStep", DOL_VERSION); } $choice .= '</div>'; @@ -503,19 +487,15 @@ if (!file_exists($conffile)) $choice .= '</td>'; $choice .= '<td class="center">'; - if ($allowupgrade) - { + if ($allowupgrade) { $disabled = false; - if ($foundrecommandedchoice == 2) - { + if ($foundrecommandedchoice == 2) { $disabled = true; } - if ($foundrecommandedchoice == 1) - { + if ($foundrecommandedchoice == 1) { $foundrecommandedchoice = 2; } - if ($disabled) - { + if ($disabled) { $choice .= '<span class="opacitymedium">'.$langs->trans("NotYetAvailable").'</span>'; } else { $choice .= '<a class="button runupgrade" href="upgrade.php?action=upgrade'.($count < count($migrationscript) ? '_'.$versionto : '').'&amp;selectlang='.$setuplang.'&amp;versionfrom='.$versionfrom.'&amp;versionto='.$versionto.'">'.$langs->trans("Start").'</a>'; @@ -534,8 +514,7 @@ if (!file_exists($conffile)) } // If there is no choice at all, we show all of them. - if (empty($available_choices)) - { + if (empty($available_choices)) { $available_choices = $notavailable_choices; $notavailable_choices = array(); } diff --git a/htdocs/install/default.css b/htdocs/install/default.css index ca397d1ca40..5363d9530e1 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -20,6 +20,10 @@ opacity: 0.5; } +.inline-block { + display: inline-block; +} + body { font-size:14px; font-family: roboto,arial,tahoma,verdana,helvetica; @@ -353,15 +357,16 @@ tr.choiceselected td.listofchoicesdesc { } tr.choiceselected td .button { - background: rgb(0,113,121); + background: rgba(150, 110, 162, 0.95); color: #fff; } a.button:link,a.button:visited,a.button:active { - color: #888; + color: #555; + } .button { - background: #ddd; + background: rgb(234,228,225); color: #fff; /* border: 1px solid #e0e0e0; */ padding: 0.5em 0.7em; diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index cfe42adc79f..0ca5805ba24 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -33,7 +33,7 @@ global $langs; $err = 0; -$setuplang = GETPOST("selectlang", '', 3) ?GETPOST("selectlang", '', 3) : (isset($_GET["lang"]) ? $_GET["lang"] : 'auto'); +$setuplang = GETPOST("selectlang", '', 3) ? GETPOST("selectlang", '', 3) : (GETPOST('lang', 'alpha', 1) ? GETPOST('lang', 'alpha', 1) : 'auto'); $langs->setDefaultLang($setuplang); $langs->loadLangs(array("install", "errors")); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 12bab777edb..27a3fc01abd 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -5,7 +5,8 @@ * Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> - * + * Copyright (C) 2021 Charlene Benke <charlene@patas-monkey.com> +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -27,40 +28,40 @@ */ // Just to define version DOL_VERSION -if (!defined('DOL_INC_FOR_VERSION_ERROR')) define('DOL_INC_FOR_VERSION_ERROR', '1'); +if (!defined('DOL_INC_FOR_VERSION_ERROR')) { + define('DOL_INC_FOR_VERSION_ERROR', '1'); +} require_once '../filefunc.inc.php'; // Define DOL_DOCUMENT_ROOT and ADODB_PATH used for install/upgrade process -if (!defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..'); -if (!defined('ADODB_PATH')) -{ +if (!defined('DOL_DOCUMENT_ROOT')) { + define('DOL_DOCUMENT_ROOT', '..'); +} +if (!defined('ADODB_PATH')) { $foundpath = DOL_DOCUMENT_ROOT.'/includes/adodbtime/'; - if (!is_dir($foundpath)) $foundpath = '/usr/share/php/adodb/'; + if (!is_dir($foundpath)) { + $foundpath = '/usr/share/php/adodb/'; + } define('ADODB_PATH', $foundpath); } require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once ADODB_PATH.'adodb-time.inc.php'; -// Avoid warnings with strict mode E_STRICT -$conf = new stdClass(); // instantiate $conf explicitely -$conf->global = new stdClass(); -$conf->file = new stdClass(); -$conf->db = new stdClass(); -$conf->syslog = new stdClass(); +$conf = new Conf(); // Force $_REQUEST["logtohtml"] $_REQUEST["logtohtml"] = 1; // Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative // et non path absolu. -if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"]) -{ +if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"]) { $_SERVER["PHP_SELF"] = $_SERVER["DOCUMENT_URI"]; } @@ -79,19 +80,21 @@ $conffiletoshow = "htdocs/conf/conf.php"; // Load conf file if it is already defined -if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) // Test on filesize is to ensure that conf file is more that an empty template with just <?php in first line -{ +if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) { // Test on filesize is to ensure that conf file is more that an empty template with just <?php in first line $result = include_once $conffile; // Load conf file - if ($result) - { - if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type = 'mysqli'; // For backward compatibility + if ($result) { + if (empty($dolibarr_main_db_type)) { + $dolibarr_main_db_type = 'mysqli'; // For backward compatibility + } //Mysql driver support has been removed in favor of mysqli if ($dolibarr_main_db_type == 'mysql') { $dolibarr_main_db_type = 'mysqli'; } - if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type == 'mysqli')) $dolibarr_main_db_port = '3306'; // For backward compatibility + if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type == 'mysqli')) { + $dolibarr_main_db_port = '3306'; // For backward compatibility + } // Clean parameters $dolibarr_main_data_root = isset($dolibarr_main_data_root) ?trim($dolibarr_main_data_root) : DOL_DOCUMENT_ROOT.'/../documents'; @@ -101,25 +104,31 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > $dolibarr_main_document_root_alt = isset($dolibarr_main_document_root_alt) ?trim($dolibarr_main_document_root_alt) : ''; // Remove last / or \ on directories or url value - if (!empty($dolibarr_main_document_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root)) $dolibarr_main_document_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root); - if (!empty($dolibarr_main_url_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root)) $dolibarr_main_url_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root); - if (!empty($dolibarr_main_data_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_data_root)) $dolibarr_main_data_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_data_root); - if (!empty($dolibarr_main_document_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root_alt)) $dolibarr_main_document_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root_alt); - if (!empty($dolibarr_main_url_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root_alt)) $dolibarr_main_url_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root_alt); + if (!empty($dolibarr_main_document_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root)) { + $dolibarr_main_document_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root); + } + if (!empty($dolibarr_main_url_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root)) { + $dolibarr_main_url_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root); + } + if (!empty($dolibarr_main_data_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_data_root)) { + $dolibarr_main_data_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_data_root); + } + if (!empty($dolibarr_main_document_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root_alt)) { + $dolibarr_main_document_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root_alt); + } + if (!empty($dolibarr_main_url_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root_alt)) { + $dolibarr_main_url_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root_alt); + } // Create conf object - if (!empty($dolibarr_main_document_root)) - { + if (!empty($dolibarr_main_document_root)) { $result = conf($dolibarr_main_document_root); } // Load database driver - if ($result) - { - if (!empty($dolibarr_main_document_root) && !empty($dolibarr_main_db_type)) - { + if ($result) { + if (!empty($dolibarr_main_document_root) && !empty($dolibarr_main_db_type)) { $result = include_once $dolibarr_main_document_root."/core/db/".$dolibarr_main_db_type.'.class.php'; - if (!$result) - { + if (!$result) { $includeconferror = 'ErrorBadValueForDolibarrMainDBType'; } } @@ -133,7 +142,9 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // Define prefix -if (!isset($dolibarr_main_db_prefix) || !$dolibarr_main_db_prefix) $dolibarr_main_db_prefix = 'llx_'; +if (!isset($dolibarr_main_db_prefix) || !$dolibarr_main_db_prefix) { + $dolibarr_main_db_prefix = 'llx_'; +} define('MAIN_DB_PREFIX', (isset($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : '')); define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir @@ -141,42 +152,51 @@ define('DOL_DATA_ROOT', (isset($dolibarr_main_data_root) ? $dolibarr_main_data_r define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root) ? $dolibarr_main_url_root : '')); // URL relative root $uri = preg_replace('/^http(s?):\/\//i', '', constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* $suburi = strstr($uri, '/'); // $suburi contains url without domain -if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' +if ($suburi == '/') { + $suburi = ''; // If $suburi is /, it is now '' +} define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) -if (empty($conf->file->character_set_client)) $conf->file->character_set_client = "utf-8"; -if (empty($conf->db->character_set)) $conf->db->character_set = 'utf8'; -if (empty($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation = 'utf8_unicode_ci'; -if (empty($conf->db->dolibarr_main_db_encryption)) $conf->db->dolibarr_main_db_encryption = 0; -if (empty($conf->db->dolibarr_main_db_cryptkey)) $conf->db->dolibarr_main_db_cryptkey = ''; -if (empty($conf->db->user)) $conf->db->user = ''; +if (empty($conf->file->character_set_client)) { + $conf->file->character_set_client = "utf-8"; +} +if (empty($conf->db->character_set)) { + $conf->db->character_set = 'utf8'; +} +if (empty($conf->db->dolibarr_main_db_collation)) { + $conf->db->dolibarr_main_db_collation = 'utf8_unicode_ci'; +} +if (empty($conf->db->dolibarr_main_db_encryption)) { + $conf->db->dolibarr_main_db_encryption = 0; +} +if (empty($conf->db->dolibarr_main_db_cryptkey)) { + $conf->db->dolibarr_main_db_cryptkey = ''; +} +if (empty($conf->db->user)) { + $conf->db->user = ''; +} // Define array of document root directories $conf->file->dol_document_root = array(DOL_DOCUMENT_ROOT); -if (!empty($dolibarr_main_document_root_alt)) -{ +if (!empty($dolibarr_main_document_root_alt)) { // dolibarr_main_document_root_alt contains several directories $values = preg_split('/[;,]/', $dolibarr_main_document_root_alt); - foreach ($values as $value) - { + foreach ($values as $value) { $conf->file->dol_document_root[] = $value; } } // Security check (old method, when directory is renamed /install.lock) -if (preg_match('/install\.lock/i', $_SERVER["SCRIPT_FILENAME"])) -{ - if (!is_object($langs)) - { +if (preg_match('/install\.lock/i', $_SERVER["SCRIPT_FILENAME"])) { + if (!is_object($langs)) { $langs = new Translate('..', $conf); $langs->setDefaultLang('auto'); } $langs->load("install"); print $langs->trans("YouTryInstallDisabledByDirLock"); - if (!empty($dolibarr_main_url_root)) - { + if (!empty($dolibarr_main_url_root)) { print 'Click on following link, <a href="'.$dolibarr_main_url_root.'/admin/index.php?mainmenu=home&leftmenu=setup'.(GETPOSTISSET("login") ? '&username='.urlencode(GETPOST("login")) : '').'">'; print $langs->trans("ClickHereToGoToApp"); print '</a>'; @@ -190,17 +210,14 @@ if (constant('DOL_DATA_ROOT') === null) { // Try to detect any lockfile in the default documents path $lockfile = '../../documents/install.lock'; } -if (@file_exists($lockfile)) -{ - if (!isset($langs) || !is_object($langs)) - { +if (@file_exists($lockfile)) { + if (!isset($langs) || !is_object($langs)) { $langs = new Translate('..', $conf); $langs->setDefaultLang('auto'); } $langs->load("install"); print $langs->trans("YouTryInstallDisabledByFileLock"); - if (!empty($dolibarr_main_url_root)) - { + if (!empty($dolibarr_main_url_root)) { print $langs->trans("ClickOnLinkOrRemoveManualy").'<br>'; print '<a href="'.$dolibarr_main_url_root.'/admin/index.php?mainmenu=home&leftmenu=setup'.(GETPOSTISSET("login") ? '&username='.urlencode(GETPOST("login")) : '').'">'; print $langs->trans("ClickHereToGoToApp"); @@ -215,42 +232,55 @@ if (@file_exists($lockfile)) // Force usage of log file for install and upgrades $conf->syslog->enabled = 1; $conf->global->SYSLOG_LEVEL = constant('LOG_DEBUG'); -if (!defined('SYSLOG_HANDLERS')) define('SYSLOG_HANDLERS', '["mod_syslog_file"]'); -if (!defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined -{ - if (@is_writable('/tmp')) define('SYSLOG_FILE', '/tmp/dolibarr_install.log'); - elseif (!empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE', $_ENV["TMP"].'/dolibarr_install.log'); - elseif (!empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE', $_ENV["TEMP"].'/dolibarr_install.log'); - elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE', '../../../../dolibarr_install.log'); // For DoliWamp - elseif (@is_writable('../../')) define('SYSLOG_FILE', '../../dolibarr_install.log'); // For others +if (!defined('SYSLOG_HANDLERS')) { + define('SYSLOG_HANDLERS', '["mod_syslog_file"]'); +} +if (!defined('SYSLOG_FILE')) { // To avoid warning on systems with constant already defined + if (@is_writable('/tmp')) { + define('SYSLOG_FILE', '/tmp/dolibarr_install.log'); + } elseif (!empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) { + define('SYSLOG_FILE', $_ENV["TMP"].'/dolibarr_install.log'); + } elseif (!empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) { + define('SYSLOG_FILE', $_ENV["TEMP"].'/dolibarr_install.log'); + } elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) { + define('SYSLOG_FILE', '../../../../dolibarr_install.log'); // For DoliWamp + } elseif (@is_writable('../../')) { + define('SYSLOG_FILE', '../../dolibarr_install.log'); // For others + } //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } -if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); -if (!defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR', 1); +if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); +} +if (!defined('SYSLOG_FILE_NO_ERROR')) { + define('SYSLOG_FILE_NO_ERROR', 1); +} // We init log handler for install $handlers = array('mod_syslog_file'); -foreach ($handlers as $handler) -{ +foreach ($handlers as $handler) { $file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php'; - if (!file_exists($file)) - { + if (!file_exists($file)) { throw new Exception('Missing log handler file '.$handler.'.php'); } require_once $file; $loghandlerinstance = new $handler(); - if (!$loghandlerinstance instanceof LogHandlerInterface) - { + if (!$loghandlerinstance instanceof LogHandlerInterface) { throw new Exception('Log handler does not extend LogHandlerInterface'); } - if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler] = $loghandlerinstance; + if (empty($conf->loghandlers[$handler])) { + $conf->loghandlers[$handler] = $loghandlerinstance; + } } // Define object $langs $langs = new Translate('..', $conf); -if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); -else $langs->setDefaultLang('auto'); +if (GETPOST('lang', 'aZ09')) { + $langs->setDefaultLang(GETPOST('lang', 'aZ09')); +} else { + $langs->setDefaultLang('auto'); +} /** @@ -271,7 +301,9 @@ function conf($dolibarr_main_document_root) global $character_set_client; $return = include_once $dolibarr_main_document_root.'/core/class/conf.class.php'; - if (!$return) return -1; + if (!$return) { + return -1; + } $conf = new Conf(); $conf->db->type = trim($dolibarr_main_db_type); @@ -282,51 +314,73 @@ function conf($dolibarr_main_document_root) $conf->db->pass = trim($dolibarr_main_db_pass); // Mysql driver support has been removed in favor of mysqli - if ($conf->db->type == 'mysql') $conf->db->type = 'mysqli'; - if (empty($character_set_client)) $character_set_client = "UTF-8"; + if ($conf->db->type == 'mysql') { + $conf->db->type = 'mysqli'; + } + if (empty($character_set_client)) { + $character_set_client = "UTF-8"; + } $conf->file->character_set_client = strtoupper($character_set_client); - if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set = ($conf->db->type == 'mysqli' ? 'utf8' : ''); + if (empty($dolibarr_main_db_character_set)) { + $dolibarr_main_db_character_set = ($conf->db->type == 'mysqli' ? 'utf8' : ''); + } $conf->db->character_set = $dolibarr_main_db_character_set; - if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation = ($conf->db->type == 'mysqli' ? 'utf8_unicode_ci' : ''); + if (empty($dolibarr_main_db_collation)) { + $dolibarr_main_db_collation = ($conf->db->type == 'mysqli' ? 'utf8_unicode_ci' : ''); + } $conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation; - if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; + if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; + } $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; - if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; + if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; + } $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; // Force usage of log file for install and upgrades $conf->syslog->enabled = 1; $conf->global->SYSLOG_LEVEL = constant('LOG_DEBUG'); - if (!defined('SYSLOG_HANDLERS')) define('SYSLOG_HANDLERS', '["mod_syslog_file"]'); - if (!defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined - { - if (@is_writable('/tmp')) define('SYSLOG_FILE', '/tmp/dolibarr_install.log'); - elseif (!empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE', $_ENV["TMP"].'/dolibarr_install.log'); - elseif (!empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE', $_ENV["TEMP"].'/dolibarr_install.log'); - elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE', '../../../../dolibarr_install.log'); // For DoliWamp - elseif (@is_writable('../../')) define('SYSLOG_FILE', '../../dolibarr_install.log'); // For others + if (!defined('SYSLOG_HANDLERS')) { + define('SYSLOG_HANDLERS', '["mod_syslog_file"]'); + } + if (!defined('SYSLOG_FILE')) { // To avoid warning on systems with constant already defined + if (@is_writable('/tmp')) { + define('SYSLOG_FILE', '/tmp/dolibarr_install.log'); + } elseif (!empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) { + define('SYSLOG_FILE', $_ENV["TMP"].'/dolibarr_install.log'); + } elseif (!empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) { + define('SYSLOG_FILE', $_ENV["TEMP"].'/dolibarr_install.log'); + } elseif (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) { + define('SYSLOG_FILE', '../../../../dolibarr_install.log'); // For DoliWamp + } elseif (@is_writable('../../')) { + define('SYSLOG_FILE', '../../dolibarr_install.log'); // For others + } //print 'SYSLOG_FILE='.SYSLOG_FILE;exit; } - if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); - if (!defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR', 1); + if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + } + if (!defined('SYSLOG_FILE_NO_ERROR')) { + define('SYSLOG_FILE_NO_ERROR', 1); + } // We init log handler for install $handlers = array('mod_syslog_file'); - foreach ($handlers as $handler) - { + foreach ($handlers as $handler) { $file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php'; - if (!file_exists($file)) - { + if (!file_exists($file)) { throw new Exception('Missing log handler file '.$handler.'.php'); } require_once $file; $loghandlerinstance = new $handler(); - if (!$loghandlerinstance instanceof LogHandlerInterface) - { + if (!$loghandlerinstance instanceof LogHandlerInterface) { throw new Exception('Log handler does not extend LogHandlerInterface'); } - if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler] = $loghandlerinstance; + if (empty($conf->loghandlers[$handler])) { + $conf->loghandlers[$handler] = $loghandlerinstance; + } } return 1; @@ -354,8 +408,7 @@ function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl $jquerytheme = 'base'; - if ($forcejqueryurl) - { + if ($forcejqueryurl) { $jQueryCustomPath = $forcejqueryurl; $jQueryUiCustomPath = $forcejqueryurl; } else { @@ -376,14 +429,23 @@ function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl print '<link rel="stylesheet" type="text/css" href="default.css">'."\n"; print '<!-- Includes CSS for JQuery -->'."\n"; - if ($jQueryUiCustomPath) print '<link rel="stylesheet" type="text/css" href="'.$jQueryUiCustomPath.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery - else print '<link rel="stylesheet" type="text/css" href="../includes/jquery/css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery + if ($jQueryUiCustomPath) { + print '<link rel="stylesheet" type="text/css" href="'.$jQueryUiCustomPath.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery + } else { + print '<link rel="stylesheet" type="text/css" href="../includes/jquery/css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery + } print '<!-- Includes JS for JQuery -->'."\n"; - if ($jQueryCustomPath) print '<script type="text/javascript" src="'.$jQueryCustomPath.'jquery.min.js"></script>'."\n"; - else print '<script type="text/javascript" src="../includes/jquery/js/jquery.min.js"></script>'."\n"; - if ($jQueryUiCustomPath) print '<script type="text/javascript" src="'.$jQueryUiCustomPath.'jquery-ui.min.js"></script>'."\n"; - else print '<script type="text/javascript" src="../includes/jquery/js/jquery-ui.min.js"></script>'."\n"; + if ($jQueryCustomPath) { + print '<script type="text/javascript" src="'.$jQueryCustomPath.'jquery.min.js"></script>'."\n"; + } else { + print '<script type="text/javascript" src="../includes/jquery/js/jquery.min.js"></script>'."\n"; + } + if ($jQueryUiCustomPath) { + print '<script type="text/javascript" src="'.$jQueryUiCustomPath.'jquery-ui.min.js"></script>'."\n"; + } else { + print '<script type="text/javascript" src="../includes/jquery/js/jquery-ui.min.js"></script>'."\n"; + } print '<title>'.$langs->trans("DolibarrSetup").'</title>'."\n"; print '</head>'."\n"; @@ -402,7 +464,9 @@ function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl print '</span>'."\n"; print '<form name="forminstall" style="width: 100%" action="'.$next.'.php'.($param ? '?'.$param : '').'" method="POST"'; - if ($next == 'step5') print ' autocomplete="off"'; + if ($next == 'step5') { + print ' autocomplete="off"'; + } print '>'."\n"; print '<input type="hidden" name="testpost" value="ok">'."\n"; print '<input type="hidden" name="action" value="'.$action.'">'."\n"; @@ -419,9 +483,10 @@ function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl * @param string $setuplang Language code * @param string $jscheckfunction Add a javascript check function * @param integer $withpleasewait Add also please wait tags + * @param string $morehtml Add more HTML content * @return void */ -function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleasewait = 0) +function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleasewait = 0, $morehtml = '') { global $conf, $langs; @@ -430,11 +495,13 @@ function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleas print '</td></tr></table>'."\n"; print '</td></tr></table>'."\n"; - if (!$nonext || ($nonext == '2')) - { + print '<!-- pFooter -->'."\n"; + + print $morehtml; + + if (!$nonext || ($nonext == '2')) { print '<div class="nextbutton" id="nextbutton">'; - if ($nonext == '2') - { + if ($nonext == '2') { print '<span class="warning">'; print $langs->trans("ErrorFoundDuringMigration", isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"].'&ignoreerrors=1' : ''); print '</span>'; @@ -442,25 +509,26 @@ function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleas } print '<input type="submit" '.($nonext == '2' ? 'disabled="disabled" ' : '').'value="'.$langs->trans("NextStep").' ->"'; - if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"'; + if ($jscheckfunction) { + print ' onClick="return '.$jscheckfunction.'();"'; + } print '></div>'; - if ($withpleasewait) print '<div style="visibility: hidden;" class="pleasewait" id="pleasewait"><br>'.$langs->trans("NextStepMightLastALongTime").'<br><br><div class="blinkwait">'.$langs->trans("PleaseBePatient").'</div></div>'; + if ($withpleasewait) { + print '<div style="visibility: hidden;" class="pleasewait" id="pleasewait"><br>'.$langs->trans("NextStepMightLastALongTime").'<br><br><div class="blinkwait">'.$langs->trans("PleaseBePatient").'</div></div>'; + } } - if ($setuplang) - { - print '<input type="hidden" name="selectlang" value="'.$setuplang.'">'; + if ($setuplang) { + print '<input type="hidden" name="selectlang" value="'.dol_escape_htmltag($setuplang).'">'; } print '</form>'."\n"; // If there is some logs in buffer to show - if (isset($conf->logbuffer) && count($conf->logbuffer)) - { + if (isset($conf->logbuffer) && count($conf->logbuffer)) { print "\n"; print "<!-- Start of log output\n"; //print '<div class="hidden">'."\n"; - foreach ($conf->logbuffer as $logline) - { + foreach ($conf->logbuffer as $logline) { print $logline."<br>\n"; } //print '</div>'."\n"; @@ -481,7 +549,9 @@ function pFooter($nonext = 0, $setuplang = '', $jscheckfunction = '', $withpleas */ function dolibarr_install_syslog($message, $level = LOG_DEBUG) { - if (!defined('LOG_DEBUG')) define('LOG_DEBUG', 6); + if (!defined('LOG_DEBUG')) { + define('LOG_DEBUG', 6); + } dol_syslog($message, $level); } @@ -494,8 +564,7 @@ function detect_dolibarr_main_document_root() { // If PHP is in CGI mode, SCRIPT_FILENAME is PHP's path. // Since that's not what we want, we suggest $_SERVER["DOCUMENT_ROOT"] - if ($_SERVER["SCRIPT_FILENAME"] == 'php' || preg_match('/[\\/]php$/i', $_SERVER["SCRIPT_FILENAME"]) || preg_match('/php\.exe$/i', $_SERVER["SCRIPT_FILENAME"])) - { + if ($_SERVER["SCRIPT_FILENAME"] == 'php' || preg_match('/[\\/]php$/i', $_SERVER["SCRIPT_FILENAME"]) || preg_match('/php\.exe$/i', $_SERVER["SCRIPT_FILENAME"])) { $dolibarr_main_document_root = $_SERVER["DOCUMENT_ROOT"]; if (!preg_match('/[\\/]dolibarr[\\/]htdocs$/i', $dolibarr_main_document_root)) { @@ -532,11 +601,11 @@ function detect_dolibarr_main_url_root() // If defined (Ie: Apache with Linux) if (isset($_SERVER["SCRIPT_URI"])) { $dolibarr_main_url_root = $_SERVER["SCRIPT_URI"]; - } // If defined (Ie: Apache with Caudium) - elseif (isset($_SERVER["SERVER_URL"]) && isset($_SERVER["DOCUMENT_URI"])) { + } elseif (isset($_SERVER["SERVER_URL"]) && isset($_SERVER["DOCUMENT_URI"])) { + // If defined (Ie: Apache with Caudium) $dolibarr_main_url_root = $_SERVER["SERVER_URL"].$_SERVER["DOCUMENT_URI"]; - } // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows) - else { + } else { + // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows) $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"]; diff --git a/htdocs/install/index.php b/htdocs/install/index.php index f2da647e68c..09300a75721 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -32,8 +32,7 @@ global $langs; $err = 0; // If the config file exists and is filled, we're not on first install so we skip the language selection page -if (file_exists($conffile) && isset($dolibarr_main_url_root)) -{ +if (file_exists($conffile) && isset($dolibarr_main_url_root)) { header("Location: check.php?testget=ok"); exit; } @@ -65,4 +64,6 @@ print '</table></div>'; print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>'; // If there's no error, we display the next step button -if ($err == 0) pFooter(0); +if ($err == 0) { + pFooter(0); +} diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 1a05dad1b77..bd54e55ebde 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -33,14 +33,18 @@ function checkElementExist($id, $table) global $db; $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$table; - $sql .= ' WHERE rowid = '.$id; + $sql .= ' WHERE rowid = '.((int) $id); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num > 0) return true; - else return false; - } else return true; // for security + if ($num > 0) { + return true; + } else { + return false; + } + } else { + return true; // for security + } } /** @@ -60,28 +64,37 @@ function checkLinkedElements($sourcetype, $targettype) $sourcetable = $sourcetype; $targettable = $targettype; - if ($sourcetype == 'shipping') $sourcetable = 'expedition'; - elseif ($targettype == 'shipping') $targettable = 'expedition'; - if ($sourcetype == 'delivery') $sourcetable = 'livraison'; - elseif ($targettype == 'delivery') $targettable = 'livraison'; - if ($sourcetype == 'order_supplier') $sourcetable = 'commande_fournisseur'; - elseif ($targettype == 'order_supplier') $targettable = 'commande_fournisseur'; - if ($sourcetype == 'invoice_supplier') $sourcetable = 'facture_fourn'; - elseif ($targettype == 'invoice_supplier') $targettable = 'facture_fourn'; + if ($sourcetype == 'shipping') { + $sourcetable = 'expedition'; + } elseif ($targettype == 'shipping') { + $targettable = 'expedition'; + } + if ($sourcetype == 'delivery') { + $sourcetable = 'livraison'; + } elseif ($targettype == 'delivery') { + $targettable = 'livraison'; + } + if ($sourcetype == 'order_supplier') { + $sourcetable = 'commande_fournisseur'; + } elseif ($targettype == 'order_supplier') { + $targettable = 'commande_fournisseur'; + } + if ($sourcetype == 'invoice_supplier') { + $sourcetable = 'facture_fourn'; + } elseif ($targettype == 'invoice_supplier') { + $targettable = 'facture_fourn'; + } $out = $langs->trans('SourceType').': '.$sourcetype.' => '.$langs->trans('TargetType').': '.$targettype.' '; $sql = 'SELECT rowid, fk_source, fk_target FROM '.MAIN_DB_PREFIX.'element_element'; $sql .= ' WHERE sourcetype="'.$sourcetype.'" AND targettype="'.$targettype.'"'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $elements[$obj->rowid] = array($sourcetype => $obj->fk_source, $targettype => $obj->fk_target); $i++; @@ -89,22 +102,22 @@ function checkLinkedElements($sourcetype, $targettype) } } - if (!empty($elements)) - { - foreach ($elements as $key => $element) - { - if (!checkElementExist($element[$sourcetype], $sourcetable) || !checkElementExist($element[$targettype], $targettable)) - { + if (!empty($elements)) { + foreach ($elements as $key => $element) { + if (!checkElementExist($element[$sourcetype], $sourcetable) || !checkElementExist($element[$targettype], $targettable)) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'element_element'; - $sql .= ' WHERE rowid = '.$key; + $sql .= ' WHERE rowid = '.((int) $key); $resql = $db->query($sql); $deleted++; } } } - if ($deleted) $out .= '('.$langs->trans('LinkedElementsInvalidDeleted', $deleted).')<br>'; - else $out .= '('.$langs->trans('NothingToDelete').')<br>'; + if ($deleted) { + $out .= '('.$langs->trans('LinkedElementsInvalidDeleted', $deleted).')<br>'; + } else { + $out .= '('.$langs->trans('NothingToDelete').')<br>'; + } return $out; } @@ -121,22 +134,23 @@ function clean_data_ecm_directories() // Clean data from ecm_directories $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."ecm_directories"; $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $id = $obj->rowid; $label = $obj->label; $newlabel = dol_sanitizeFileName($label); - if ($label != $newlabel) - { - $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$db->escape($newlabel)."' WHERE rowid=".$id; + if ($label != $newlabel) { + $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set label = '".$db->escape($newlabel)."' WHERE rowid = ".((int) $id); print '<tr><td>'.$sqlupdate."</td></tr>\n"; $resqlupdate = $db->query($sqlupdate); - if (!$resqlupdate) dol_print_error($db, 'Failed to update'); + 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/mssql/functions/index.html b/htdocs/install/mssql/functions/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mssql/index.html b/htdocs/install/mssql/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mysql/data/index.html b/htdocs/install/mysql/data/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index acb2c956fda..b0d578829b9 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -278,4 +278,5 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (24 -- Set field eec -UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI','UK'); +UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI'); + diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 43d2652298f..5f94ece4720 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -10,6 +10,7 @@ -- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> -- Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> -- Copyright (C) 2019~ Lao Tian <281388879@qq.com> +-- Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de> -- -- 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 @@ -25,271 +26,395 @@ -- along with this program. If not, see <https://www.gnu.org/licenses/>. -- + +-- WARNING ------------------------------------------------------------------ -- -- Do not add comments at the end of the lines, this file is parsed during -- the install and all '--' prefixed texts are are removed. -- Do not concatenate the values in a single query, for the same reason. -- --- --- Regions + +-- NOTES --------------------------------------------------------------------- +-- Regions +-- ID Country +-- 1 France +-- 2 Belgium +-- 3 Italy +-- 4 Spain +-- 5 Germany -> use departments +-- 6 Switzerland +-- 7 United Kingdom (NOT England) -- -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 0, 0, '0',0,'-'); - --- Regions France (id country=1) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 1,'97105',3,'Guadeloupe'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 2,'97209',3,'Martinique'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 3,'97302',3,'Guyane'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 4,'97411',3,'Réunion'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 6,'97601',3,'Mayotte'); - -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 11,'75056',1,'Île-de-France'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 24,'45234',2,'Centre-Val de Loire'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 27,'21231',0,'Bourgogne-Franche-Comté'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 28,'76540',0,'Normandie'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 32,'59350',4,'Hauts-de-France'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 44,'67482',2,'Grand Est'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 52,'44109',4,'Pays de la Loire'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 53,'35238',0,'Bretagne'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 75,'33063',0,'Nouvelle-Aquitaine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 76,'31355',1,'Occitanie'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 84,'69123',1,'Auvergne-Rhône-Alpes'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 93,'13055',0,'Provence-Alpes-Côte d''Azur'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 94,'2A004',0,'Corse'); - --- Regions Austria (id country=41) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 41, 4101, '', 0, 'Österreich', 1); - --- Regions Belgium (id country=2) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 2, 201, '',1,'Flandre'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 2, 202, '',2,'Wallonie'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 2, 203, '',3,'Bruxelles-Capitale'); - --- Regions Italy (id country=3) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 301, NULL, 1, 'Abruzzo'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 302, NULL, 1, 'Basilicata'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 303, NULL, 1, 'Calabria'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 304, NULL, 1, 'Campania'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 305, NULL, 1, 'Emilia-Romagna'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 306, NULL, 1, 'Friuli-Venezia Giulia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 307, NULL, 1, 'Lazio'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 308, NULL, 1, 'Liguria'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 309, NULL, 1, 'Lombardia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 310, NULL, 1, 'Marche'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 311, NULL, 1, 'Molise'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 312, NULL, 1, 'Piemonte'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 313, NULL, 1, 'Puglia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 314, NULL, 1, 'Sardegna'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 315, NULL, 1, 'Sicilia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 316, NULL, 1, 'Toscana'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 317, NULL, 1, 'Trentino-Alto Adige'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 318, NULL, 1, 'Umbria'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 319, NULL, 1, 'Valle d Aosta'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 3, 320, NULL, 1, 'Veneto'); - --- Regions Spain (id country=4) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 401, '', 0, 'Andalucia', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 402, '', 0, 'Aragón', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 403, '', 0, 'Castilla y León', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 404, '', 0, 'Castilla la Mancha', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 405, '', 0, 'Canarias', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 406, '', 0, 'Cataluña', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 407, '', 0, 'Comunidad de Ceuta', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 408, '', 0, 'Comunidad Foral de Navarra', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 409, '', 0, 'Comunidad de Melilla', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 410, '', 0, 'Cantabria', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 411, '', 0, 'Comunidad Valenciana', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 412, '', 0, 'Extemadura', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 413, '', 0, 'Galicia', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 414, '', 0, 'Islas Baleares', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 415, '', 0, 'La Rioja', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 416, '', 0, 'Comunidad de Madrid', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 417, '', 0, 'Región de Murcia', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 418, '', 0, 'Principado de Asturias', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 419, '', 0, 'Pais Vasco', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 4, 420, '', 0, 'Otros', 1); - --- Regions Germany (id country=5) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 5, 501, '', 0, 'Deutschland', 1); - --- Regions Greece (id_country=102) -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10201, 102, NULL, NULL, 'Αττική', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10202, 102, NULL, NULL, 'Στερεά Ελλάδα', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10203, 102, NULL, NULL, 'Κεντρική Μακεδονία', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10204, 102, NULL, NULL, 'Κρήτη', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10205, 102, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10206, 102, NULL, NULL, 'Ήπειρος', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10207, 102, NULL, NULL, 'Ιόνια νησιά', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10208, 102, NULL, NULL, 'Βόρειο Αιγαίο', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10209, 102, NULL, NULL, 'Πελοπόννησος', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10210, 102, NULL, NULL, 'Νότιο Αιγαίο', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10211, 102, NULL, NULL, 'Δυτική Ελλάδα', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10212, 102, NULL, NULL, 'Θεσσαλία', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 10213, 102, NULL, NULL, 'Δυτική Μακεδονία', 1); - --- Regions Switzerland (id country=6) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 6, 601, '', 1, 'Cantons', 1); - --- Regions England (id_country=7) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 7, 701, '', 0, 'England', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 7, 702, '', 0, 'Wales', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 7, 703, '', 0, 'Scotland', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 7, 704, '', 0, 'Northern Ireland', 1); - --- Regions Tunisia (id country=10) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1001, '',0,'Ariana'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1002, '',0,'Béja'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1003, '',0,'Ben Arous'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1004, '',0,'Bizerte'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1005, '',0,'Gabès'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1006, '',0,'Gafsa'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1007, '',0,'Jendouba'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1008, '',0,'Kairouan'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1009, '',0,'Kasserine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1010, '',0,'Kébili'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1011, '',0,'La Manouba'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1012, '',0,'Le Kef'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1013, '',0,'Mahdia'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1014, '',0,'Médenine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1015, '',0,'Monastir'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1016, '',0,'Nabeul'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1017, '',0,'Sfax'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1018, '',0,'Sidi Bouzid'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1019, '',0,'Siliana'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1020, '',0,'Sousse'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1021, '',0,'Tataouine'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1022, '',0,'Tozeur'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1023, '',0,'Tunis'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1024, '',0,'Zaghouan'); - --- Region US (id country=11) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 11, 1101, '', 0, 'United-States', 1); - --- Regions Algeria (id country=13) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 13, 1301, '', 0, 'Algerie', 1); - --- Region Canada (id country=14) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 14, 1401, '', 0, 'Canada', 1); - --- Regions The Netherlands (id country=17) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 17, 1701, '', 0,'Provincies van Nederland ', 1); - --- Regions Argentina (id country=23) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 23, 2301, '', 0, 'Norte', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 23, 2302, '', 0, 'Litoral', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 23, 2303, '', 0, 'Cuyana', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 23, 2304, '', 0, 'Central', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 23, 2305, '', 0, 'Patagonia', 1); - --- Regions Australia (id country=28) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 28, 2801, '', 0, 'Australia', 1); - --- Regions Barbados (id country=46) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 46, 4601, '', 0, 'Barbados', 1); - --- Regions Bolivia (id country=52) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1); - --- Regions Brazil (id country=56) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 56, 5601, '', 0, 'Brasil', 1); - --- Regions Colombie (id country=70) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 70, 7001, '', 0, 'Colombie', 1); - --- Regions Chile (id country=67) -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6701, 67, NULL, NULL, 'Tarapacá', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6702, 67, NULL, NULL, 'Antofagasta', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6703, 67, NULL, NULL, 'Atacama', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6704, 67, NULL, NULL, 'Coquimbo', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6705, 67, NULL, NULL, 'Valparaíso', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6706, 67, NULL, NULL, 'General Bernardo O Higgins', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6707, 67, NULL, NULL, 'Maule', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6708, 67, NULL, NULL, 'Biobío', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6709, 67, NULL, NULL, 'Raucanía', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6710, 67, NULL, NULL, 'Los Lagos', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6711, 67, NULL, NULL, 'Aysén General Carlos Ibáñez del Campo', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6712, 67, NULL, NULL, 'Magallanes y Antártica Chilena', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6713, 67, NULL, NULL, 'Metropolitana de Santiago', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6714, 67, NULL, NULL, 'Los Ríos', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6715, 67, NULL, NULL, 'Arica y Parinacota', 1); - --- Regions San Salvador (id country=86) -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8601, 86, NULL, NULL, 'Central', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8602, 86, NULL, NULL, 'Oriental', 1); -INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 8603, 86, NULL, NULL, 'Occidental', 1); - --- Regions Honduras (id country=114) -insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 114, 11401, '', 0, 'Honduras', 1); - --- Regions India (id country=117) -insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 117, 11701, '', 0, 'India', 1); - --- Regions Indonesia (id country=118) -insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 118, 11801, '', 0, 'Indonesia', 1); +-- CONTENT ------------------------------------------------------------------- +-- +-- Algeria -> for Departmements +-- Andorra -> for Departmements +-- Angola -> for Departmements +-- Argentina +-- Australia -> for Departmements +-- Austria -> for Departmements +-- Barbados -> for Departmements +-- Belgium +-- Bolivia +-- Brazil -> for Departmements +-- Canada -> for Departmements +-- Chile +-- Colombie -> for Departmements +-- Denmark +-- France +-- Germany -> for Departmements +-- Greece +-- Honduras -> for Departmements +-- India -> for Departmements +-- Indonesia -> for Departmements +-- Italy +-- Luxembourg +-- Mauritius +-- Mexique -> for Departmements +-- Morocco +-- Netherlands -> for Departmements +-- Panama -> for Departmements +-- Portugal +-- Romania -> for Departmements +-- San Salvador +-- Slovenia +-- Spain +-- Switzerland/Suisse -> for Departmements/Cantons +-- Tunesia +-- United Arab Emirates -> for Departmements +-- United Kingdom +-- USA -> for Departmements +-- Venezuela --- Regions Maroc - Moroco (id country=12) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1201, '', 0, 'Tanger-Tétouan', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1202, '', 0, 'Gharb-Chrarda-Beni Hssen', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1203, '', 0, 'Taza-Al Hoceima-Taounate', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1204, '', 0, 'L''Oriental', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1205, '', 0, 'Fès-Boulemane', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1206, '', 0, 'Meknès-Tafialet', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1207, '', 0, 'Rabat-Salé-Zemour-Zaër', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1208, '', 0, 'Grand Cassablanca', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1209, '', 0, 'Chaouia-Ouardigha', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1210, '', 0, 'Doukahla-Adba', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1211, '', 0, 'Marrakech-Tensift-Al Haouz', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1212, '', 0, 'Tadla-Azilal', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1213, '', 0, 'Sous-Massa-Drâa', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1214, '', 0, 'Guelmim-Es Smara', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1215, '', 0, 'Laâyoune-Boujdour-Sakia el Hamra', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1216, '', 0, 'Oued Ed-Dahab Lagouira', 1); --- Regions (districts) Luxembourg (id country=140) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14001, '', 0, 'Diekirch', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14002, '', 0, 'Grevenmacher', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14003, '', 0, 'Luxembourg', 1); +-- TEMPLATE ------------------------------------------------------------------------------------------ +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 0, 0, '0', 0, '-'); + + +-- Algeria Regions (id country=13) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 13, 1301, '', 0, 'Algerie'); + + +-- Andorra Regions (id country=18) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 34, 34000, 'AD', NULL, 'Andorra'); + + +-- Angola Regions (id country=35) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 35, 35001, 'AO', NULL, 'Angola'); + + +-- Argentina Regions (id country=23) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2301, '', 0, 'Norte'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2302, '', 0, 'Litoral'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2303, '', 0, 'Cuyana'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2304, '', 0, 'Central'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 23, 2305, '', 0, 'Patagonia'); + + +-- Australia Regions (id country=28) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 28, 2801, '', 0, 'Australia'); + + +-- Austria Regions (id country=41) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 41, 4101, '', 0, 'Österreich'); + + +-- Barbados Regions (id country=46) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 46, 4601, '', 0, 'Barbados'); + + +-- Belgium Regions (id country=2) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2, 201, '', 1, 'Flandre'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2, 202, '', 2, 'Wallonie'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2, 203, '', 3, 'Bruxelles-Capitale'); + + +-- Bolivia Regions (id country=52) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5201, '', 0, 'Chuquisaca'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5202, '', 0, 'La Paz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5203, '', 0, 'Cochabamba'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5204, '', 0, 'Oruro'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5205, '', 0, 'Potosí'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5206, '', 0, 'Tarija'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5207, '', 0, 'Santa Cruz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5208, '', 0, 'El Beni'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5209, '', 0, 'Pando'); + + +-- Brazil Regions (id country=56) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 56, 5601, '', 0, 'Brasil'); + + +-- Canada Region (id country=14) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 14, 1401, '', 0, 'Canada'); + + +-- Chile Regions (id country=67) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6701, NULL, NULL, 'Tarapacá'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6702, NULL, NULL, 'Antofagasta'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6703, NULL, NULL, 'Atacama'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6704, NULL, NULL, 'Coquimbo'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6705, NULL, NULL, 'Valparaíso'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6706, NULL, NULL, 'General Bernardo O Higgins'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6707, NULL, NULL, 'Maule'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6708, NULL, NULL, 'Biobío'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6709, NULL, NULL, 'Raucanía'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6710, NULL, NULL, 'Los Lagos'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6711, NULL, NULL, 'Aysén General Carlos Ibáñez del Campo'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6712, NULL, NULL, 'Magallanes y Antártica Chilena'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6713, NULL, NULL, 'Metropolitana de Santiago'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6714, NULL, NULL, 'Los Ríos'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 67, 6715, NULL, NULL, 'Arica y Parinacota'); + + +-- Colombie Regions (id country=70) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 70, 7001, '', 0, 'Colombie'); + + +-- Denmark Regions (id country=80) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 80, 8001, '', 0, 'Nordjylland'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 80, 8002, '', 0, 'Midtjylland'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 80, 8003, '', 0, 'Syddanmark'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 80, 8004, '', 0, 'Hovedstaden'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 80, 8005, '', 0, 'Sjælland'); + + +-- France Regions (id country=1) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 1, '97105', 3, 'Guadeloupe'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 2, '97209', 3, 'Martinique'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 3, '97302', 3, 'Guyane'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 4, '97411', 3, 'Réunion'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 6, '97601', 3, 'Mayotte'); + +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 11, '75056', 1, 'Île-de-France'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 24, '45234', 2, 'Centre-Val de Loire'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 27, '21231', 0, 'Bourgogne-Franche-Comté'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 28, '76540', 0, 'Normandie'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 32, '59350', 4, 'Hauts-de-France'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 44, '67482', 2, 'Grand Est'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 52, '44109', 4, 'Pays de la Loire'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 53, '35238', 0, 'Bretagne'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 75, '33063', 0, 'Nouvelle-Aquitaine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 76, '31355', 1, 'Occitanie'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 84, '69123', 1, 'Auvergne-Rhône-Alpes'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 93, '13055', 0, 'Provence-Alpes-Côte d''Azur'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 1, 94, '2A004', 0, 'Corse'); + + +-- Germany Regions (id country=5) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 5, 501, '', 0, 'Deutschland'); + + +-- Greece Regions (id_country=102) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10201, NULL, NULL, 'Αττική'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10202, NULL, NULL, 'Στερεά Ελλάδα'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10203, NULL, NULL, 'Κεντρική Μακεδονία'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10204, NULL, NULL, 'Κρήτη'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10205, NULL, NULL, 'Ανατολική Μακεδονία και Θράκη'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10206, NULL, NULL, 'Ήπειρος'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10207, NULL, NULL, 'Ιόνια νησιά'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10208, NULL, NULL, 'Βόρειο Αιγαίο'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10209, NULL, NULL, 'Πελοπόννησος'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10210, NULL, NULL, 'Νότιο Αιγαίο'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10211, NULL, NULL, 'Δυτική Ελλάδα'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10212, NULL, NULL, 'Θεσσαλία'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 102, 10213, NULL, NULL, 'Δυτική Μακεδονία'); + + +-- Honduras Regions (id country=114) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 114, 11401, '', 0, 'Honduras'); + + +-- India Regions (id country=117) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 117, 11701, '', 0, 'India'); + + +-- Indonesia Regions (id country=118) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 118, 11801, '', 0, 'Indonesia'); + + +-- Italy Regions (id country=3) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 301, NULL, 1, 'Abruzzo'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 302, NULL, 1, 'Basilicata'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 303, NULL, 1, 'Calabria'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 304, NULL, 1, 'Campania'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 305, NULL, 1, 'Emilia-Romagna'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 306, NULL, 1, 'Friuli-Venezia Giulia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 307, NULL, 1, 'Lazio'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 308, NULL, 1, 'Liguria'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 309, NULL, 1, 'Lombardia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 310, NULL, 1, 'Marche'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 311, NULL, 1, 'Molise'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 312, NULL, 1, 'Piemonte'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 313, NULL, 1, 'Puglia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 314, NULL, 1, 'Sardegna'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 315, NULL, 1, 'Sicilia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 316, NULL, 1, 'Toscana'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 317, NULL, 1, 'Trentino-Alto Adige'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 318, NULL, 1, 'Umbria'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 319, NULL, 1, 'Valle d Aosta'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 320, NULL, 1, 'Veneto'); + + +-- Luxembourg Regions (districts) (id country=140) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14001, '', 0, 'Diekirch'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14002, '', 0, 'Grevenmacher'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 140, 14003, '', 0, 'Luxembourg'); + + +-- Mauritius Regions (id country=152) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15201, '', 0, 'Rivière Noire'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15202, '', 0, 'Flacq'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15203, '', 0, 'Grand Port'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15204, '', 0, 'Moka'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15205, '', 0, 'Pamplemousses'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15206, '', 0, 'Plaines Wilhems'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15207, '', 0, 'Port-Louis'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15208, '', 0, 'Rivière du Rempart'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15209, '', 0, 'Savanne'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15210, '', 0, 'Rodrigues'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15211, '', 0, 'Les îles Agaléga'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 152, 15212, '', 0, 'Les écueils des Cargados Carajos'); + + +-- Mexique Regions (id country=154) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 154, 15401, '', 0, 'Mexique'); + + +-- Morocco / Maroc - Regions (id country=12) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1201, '', 0, 'Tanger-Tétouan'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1202, '', 0, 'Gharb-Chrarda-Beni Hssen'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1203, '', 0, 'Taza-Al Hoceima-Taounate'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1204, '', 0, 'L''Oriental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1205, '', 0, 'Fès-Boulemane'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1206, '', 0, 'Meknès-Tafialet'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1207, '', 0, 'Rabat-Salé-Zemour-Zaër'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1208, '', 0, 'Grand Cassablanca'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1209, '', 0, 'Chaouia-Ouardigha'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1210, '', 0, 'Doukahla-Adba'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1211, '', 0, 'Marrakech-Tensift-Al Haouz'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1212, '', 0, 'Tadla-Azilal'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1213, '', 0, 'Sous-Massa-Drâa'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1214, '', 0, 'Guelmim-Es Smara'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1215, '', 0, 'Laâyoune-Boujdour-Sakia el Hamra'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 12, 1216, '', 0, 'Oued Ed-Dahab Lagouira'); + + +-- Netherlands Regions (id country=17) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 17, 1701, '', 0,'Provincies van Nederland '); + + +-- Panama Regions (id country=178) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 178, 17801, '', 0, 'Panama'); + + +-- Portugal Regions (rowid country=25) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 25, 15001, 'PT', NULL, 'Portugal'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 25, 15002, 'PT9', NULL, 'Azores-Madeira'); + + +-- Romania Regions (id country=188) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 188, 18801, '', 0, 'Romania'); + + +-- San Salvador Regions (id country=86) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8601, NULL, NULL, 'Central'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8602, NULL, NULL, 'Oriental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 86, 8603, NULL, NULL, 'Occidental'); + + +-- Slovenia Regions (rowid country=202) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 202, '20203', 'SI03', NULL, 'East Slovenia'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ( 202, '20204', 'SI04', NULL, 'West Slovenia'); + + +-- Spain Regions (id country=4) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 401, '', 0, 'Andalucia'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 402, '', 0, 'Aragón'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 403, '', 0, 'Castilla y León'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 404, '', 0, 'Castilla la Mancha'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 405, '', 0, 'Canarias'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 406, '', 0, 'Cataluña'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 407, '', 0, 'Comunidad de Ceuta'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 408, '', 0, 'Comunidad Foral de Navarra'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 409, '', 0, 'Comunidad de Melilla'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 410, '', 0, 'Cantabria'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 411, '', 0, 'Comunidad Valenciana'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 412, '', 0, 'Extemadura'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 413, '', 0, 'Galicia'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 414, '', 0, 'Islas Baleares'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 415, '', 0, 'La Rioja'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 416, '', 0, 'Comunidad de Madrid'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 417, '', 0, 'Región de Murcia'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 418, '', 0, 'Principado de Asturias'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 419, '', 0, 'Pais Vasco'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4, 420, '', 0, 'Otros'); + + +-- Switzerland Regions (id country=6) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 6, 601, '', 1, 'Cantons'); + + +-- Tunisia Regions (id country=10) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1001, '', 0, 'Ariana'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1002, '', 0, 'Béja'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1003, '', 0, 'Ben Arous'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1004, '', 0, 'Bizerte'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1005, '', 0, 'Gabès'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1006, '', 0, 'Gafsa'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1007, '', 0, 'Jendouba'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1008, '', 0, 'Kairouan'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1009, '', 0, 'Kasserine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1010, '', 0, 'Kébili'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1011, '', 0, 'La Manouba'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1012, '', 0, 'Le Kef'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1013, '', 0, 'Mahdia'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1014, '', 0, 'Médenine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1015, '', 0, 'Monastir'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1016, '', 0, 'Nabeul'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1017, '', 0, 'Sfax'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1018, '', 0, 'Sidi Bouzid'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1019, '', 0, 'Siliana'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1020, '', 0, 'Sousse'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1021, '', 0, 'Tataouine'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1022, '', 0, 'Tozeur'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1023, '', 0, 'Tunis'); +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10, 1024, '', 0, 'Zaghouan'); + + +-- United Arab Emirates (UAE) Regions (rowid country=227) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 227, 22701, '', 0, 'United Arab Emirates'); + + +-- UK United Kingdom Regions (id_country=7) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 701, '', 0, 'England'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 702, '', 0, 'Wales'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 703, '', 0, 'Scotland'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 704, '', 0, 'Northern Ireland'); + + +-- USA Region (id country=11) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 11, 1101, '', 0, 'United-States'); + + +-- Venezuela Regions (id country=232) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23201, '', 0, 'Los Andes'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23202, '', 0, 'Capital'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23203, '', 0, 'Central'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23204, '', 0, 'Cento Occidental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23205, '', 0, 'Guayana'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23206, '', 0, 'Insular'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23207, '', 0, 'Los Llanos'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23208, '', 0, 'Nor-Oriental'); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 232, 23209, '', 0, 'Zuliana'); + --- Regions Mauritius (id country=152) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15201, '', 0, 'Rivière Noire', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15202, '', 0, 'Flacq', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15203, '', 0, 'Grand Port', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15204, '', 0, 'Moka', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15205, '', 0, 'Pamplemousses', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15206, '', 0, 'Plaines Wilhems', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15207, '', 0, 'Port-Louis', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15208, '', 0, 'Rivière du Rempart', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15209, '', 0, 'Savanne', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15210, '', 0, 'Rodrigues', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15211, '', 0, 'Les îles Agaléga', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15212, '', 0, 'Les écueils des Cargados Carajos', 1); --- Regions Mexique (id country=154) -insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 154, 15401, '', 0, 'Mexique', 1); --- Regions Romania (id country=188) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 188, 18801, '', 0, 'Romania', 1); --- Regions Venezuela (id country=232) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23201, '', 0, 'Los Andes', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23202, '', 0, 'Capital', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23203, '', 0, 'Central', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23204, '', 0, 'Cento Occidental', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23205, '', 0, 'Guayana', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23206, '', 0, 'Insular', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23207, '', 0, 'Los Llanos', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23208, '', 0, 'Nor-Oriental', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23209, '', 0, 'Zuliana', 1); -- Regions Peru (id country=181) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18101, '', 0, 'Amazonas', 1); @@ -319,14 +444,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18125, '', 0, 'Tumbes', 1); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1); --- Regions Panama (id country=178) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1); --- Regions United Arab Emirates (rowid country=227) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 227, 22701, '', 0, 'United Arab Emirates', 1); - --- Regions Andorra (rowid country=18) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (34, 34000, 'AD', NULL, 'Andorra'); -- Regions Hungary (rowid country=18) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (18, 183100, 'HU31', NULL, 'Northern Hungary'); @@ -337,50 +455,45 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (18 INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (18, 182200, 'HU22', NULL, 'Western Transdanubia'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (18, 182300, 'HU23', NULL, 'Southern Transdanubia'); --- Regions Portugal (rowid country=25) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (25, 15001, 'PT', NULL, 'Portugal'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (25, 15002, 'PT9', NULL, 'Azores-Madeira'); --- Regions Slovenia (rowid country=202) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('202', '20203', 'SI03', NULL, 'East Slovenia'); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('202', '20204', 'SI04', NULL, 'West Slovenia'); -- Regions China (rowid country=9) -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,901, '京',0,'北京市'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,902, '津',0,'天津市'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,903, '沪',0,'上海市'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,904, '渝',0,'重庆市'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,905, '冀',0,'河北省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,906, '晋',0,'山西省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,907, '辽',0,'辽宁省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,908, '吉',0,'吉林省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,909, '黑',0,'黑龙江省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,910, '苏',0,'江苏省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,911, '浙',0,'浙江省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,912, '皖',0,'安徽省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,913, '闽',0,'福建省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,914, '赣',0,'江西省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,915, '鲁',0,'山东省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,916, '豫',0,'河南省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,917, '鄂',0,'湖北省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,918, '湘',0,'湖南省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,919, '粤',0,'广东省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,920, '琼',0,'海南省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,921, '川',0,'四川省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,922, '贵',0,'贵州省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,923, '云',0,'云南省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,924, '陕',0,'陕西省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,925, '甘',0,'甘肃省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,926, '青',0,'青海省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,927, '台',0,'台湾省'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,928, '蒙',0,'内蒙古自治区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,929, '桂',0,'广西壮族自治区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,930, '藏',0,'西藏自治区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,931, '宁',0,'宁夏回族自治区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,932, '新',0,'新疆维吾尔自治区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,933, '港',0,'香港特别行政区'); -insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,934, '澳',0,'澳门特别行政区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 901, '京',0,'北京市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 902, '津',0,'天津市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 903, '沪',0,'上海市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 904, '渝',0,'重庆市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 905, '冀',0,'河北省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 906, '晋',0,'山西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 907, '辽',0,'辽宁省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 908, '吉',0,'吉林省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 909, '黑',0,'黑龙江省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 910, '苏',0,'江苏省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 911, '浙',0,'浙江省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 912, '皖',0,'安徽省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 913, '闽',0,'福建省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 914, '赣',0,'江西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 915, '鲁',0,'山东省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 916, '豫',0,'河南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 917, '鄂',0,'湖北省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 918, '湘',0,'湖南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 919, '粤',0,'广东省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 920, '琼',0,'海南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 921, '川',0,'四川省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 922, '贵',0,'贵州省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 923, '云',0,'云南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 924, '陕',0,'陕西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 925, '甘',0,'甘肃省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 926, '青',0,'青海省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 927, '台',0,'台湾省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 928, '蒙',0,'内蒙古自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 929, '桂',0,'广西壮族自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 930, '藏',0,'西藏自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 931, '宁',0,'宁夏回族自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 932, '新',0,'新疆维吾尔自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 933, '港',0,'香港特别行政区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9, 934, '澳',0,'澳门特别行政区'); --- Regions Angola (rowid country=35) -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (35, 35001, 'AO', NULL, 'Angola'); + +-- Regions Taiwan (rowid country=213) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (213, 21301, 'TW', NULL, 'Taiwan'); diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 00f30fab0be..1f3de968346 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -7,8 +7,9 @@ -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> -- Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es> -- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de> --- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> --- Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> +-- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> +-- Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> +-- Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de> -- -- 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,23 +25,349 @@ -- along with this program. If not, see <https://www.gnu.org/licenses/>. -- --- + +-- WARNING --------------------------------------------------------------------- -- Do not put comments at the end of the lines, this file is parsed during -- the install and all '-' prefixed texts are removed. -- Do not concatenate the values in a single query, for the same reason. --- --- Departements/Cantons/Provinces --- -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 0, '0', '0',0,'-','-'); +-- NOTES/CONTENT --------------------------------------------------------------- +-- Departements/Cantons/Provinces/States +-- +-- Algeria +-- Andorra +-- Angola +-- Argentina +-- Australia +-- Austria +-- Barbados +-- Belgium +-- Brazil +-- Canada +-- Chile +-- Colombia +-- France +-- Germany +-- Honduras +-- Hungary +-- (Italy) +-- Luxembourg +-- Netherlands +-- (Moroco) +-- Romania +-- Tunisia --- Departements France (id country=1) -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 1,'971','97105',3,'GUADELOUPE','Guadeloupe'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte'); + + +-- TEMPLATE ------------------------------------------------------------------------------------------------------------- +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 0, '0', '0',0,'-','-'); + + +-- Algeria Provinces (id country=13) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL01', '', 0, '', 'Wilaya d''Adrar'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL02', '', 0, '', 'Wilaya de Chlef'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL03', '', 0, '', 'Wilaya de Laghouat'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL04', '', 0, '', 'Wilaya d''Oum El Bouaghi'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL05', '', 0, '', 'Wilaya de Batna'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL06', '', 0, '', 'Wilaya de Béjaïa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL07', '', 0, '', 'Wilaya de Biskra'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL08', '', 0, '', 'Wilaya de Béchar'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL09', '', 0, '', 'Wilaya de Blida'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL10', '', 0, '', 'Wilaya de Bouira'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL11', '', 0, '', 'Wilaya de Tamanrasset'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL12', '', 0, '', 'Wilaya de Tébessa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL13', '', 0, '', 'Wilaya de Tlemcen'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL14', '', 0, '', 'Wilaya de Tiaret'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL15', '', 0, '', 'Wilaya de Tizi Ouzou'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL16', '', 0, '', 'Wilaya d''Alger'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL17', '', 0, '', 'Wilaya de Djelfa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL18', '', 0, '', 'Wilaya de Jijel'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL19', '', 0, '', 'Wilaya de Sétif'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL20', '', 0, '', 'Wilaya de Saïda'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL21', '', 0, '', 'Wilaya de Skikda'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL22', '', 0, '', 'Wilaya de Sidi Bel Abbès'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL23', '', 0, '', 'Wilaya d''Annaba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL24', '', 0, '', 'Wilaya de Guelma'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL25', '', 0, '', 'Wilaya de Constantine'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL26', '', 0, '', 'Wilaya de Médéa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL27', '', 0, '', 'Wilaya de Mostaganem'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL28', '', 0, '', 'Wilaya de M''Sila'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL29', '', 0, '', 'Wilaya de Mascara'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL30', '', 0, '', 'Wilaya d''Ouargla'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL31', '', 0, '', 'Wilaya d''Oran'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL32', '', 0, '', 'Wilaya d''El Bayadh'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL33', '', 0, '', 'Wilaya d''Illizi'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL34', '', 0, '', 'Wilaya de Bordj Bou Arreridj'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL35', '', 0, '', 'Wilaya de Boumerdès'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL36', '', 0, '', 'Wilaya d''El Tarf'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL37', '', 0, '', 'Wilaya de Tindouf'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL38', '', 0, '', 'Wilaya de Tissemsilt'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL39', '', 0, '', 'Wilaya d''El Oued'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL40', '', 0, '', 'Wilaya de Khenchela'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL41', '', 0, '', 'Wilaya de Souk Ahras'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL42', '', 0, '', 'Wilaya de Tipaza'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL43', '', 0, '', 'Wilaya de Mila'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL44', '', 0, '', 'Wilaya d''Aïn Defla'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL45', '', 0, '', 'Wilaya de Naâma'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL46', '', 0, '', 'Wilaya d''Aïn Témouchent'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL47', '', 0, '', 'Wilaya de Ghardaia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1301, 'AL48', '', 0, '', 'Wilaya de Relizane'); + + +-- Andorra Parròquies (id country=34) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-002', 'AD100', NULL, NULL, 'Canillo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-003', 'AD200', NULL, NULL, 'Encamp'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-004', 'AD400', NULL, NULL, 'La Massana'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-005', 'AD300', NULL, NULL, 'Ordino'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-006', 'AD600', NULL, NULL, 'Sant Julià de Lòria'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-007', 'AD500', NULL, NULL, 'Andorra la Vella'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-008', 'AD700', NULL, NULL, 'Escaldes-Engordany'); + + +-- Angola Provinces (postal districts) (id country=35) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre'); + + +-- Argentina Provinces / provincias (id country=23) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2301', '', 0, 'CATAMARCA', 'Catamarca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2302', '', 0, 'JUJUY', 'Jujuy'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2303', '', 0, 'TUCAMAN', 'Tucamán'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2304', '', 0, 'SANTIAGO DEL ESTERO', 'Santiago del Estero'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2305', '', 0, 'SALTA', 'Salta'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2302, '2306', '', 0, 'CHACO', 'Chaco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2302, '2307', '', 0, 'CORRIENTES', 'Corrientes'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2302, '2308', '', 0, 'ENTRE RIOS', 'Entre Ríos'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2302, '2309', '', 0, 'FORMOSA', 'Formosa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2302, '2310', '', 0, 'SANTA FE', 'Santa Fe'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2303, '2311', '', 0, 'LA RIOJA', 'La Rioja'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2303, '2312', '', 0, 'MENDOZA', 'Mendoza'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2303, '2313', '', 0, 'SAN JUAN', 'San Juan'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2303, '2314', '', 0, 'SAN LUIS', 'San Luis'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2304, '2315', '', 0, 'CORDOBA', 'Córdoba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2304, '2316', '', 0, 'BUENOS AIRES', 'Buenos Aires'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2304, '2317', '', 0, 'CABA', 'Caba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2318', '', 0, 'LA PAMPA', 'La Pampa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2319', '', 0, 'NEUQUEN', 'Neuquén'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2320', '', 0, 'RIO NEGRO', 'Río Negro'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2321', '', 0, 'CHUBUT', 'Chubut'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2322', '', 0, 'SANTA CRUZ', 'Santa Cruz'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2323', '', 0, 'TIERRA DEL FUEGO', 'Tierra del Fuego'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2324', '', 0, 'ISLAS MALVINAS', 'Islas Malvinas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2325', '', 0, 'ANTARTIDA', 'Antártida'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2305, '2326', '', 0, 'MISIONES', 'Misiones'); + + +-- Australia States & Territories (id country=28) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'NSW','',1,'','New South Wales'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'VIC','',1,'','Victoria'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'QLD','',1,'','Queensland'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'SA' ,'',1,'','South Australia'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'ACT','',1,'','Australia Capital Territory'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'TAS','',1,'','Tasmania'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'WA' ,'',1,'','Western Australia'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (2801, 'NT' ,'',1,'','Northern Territory'); + + +-- Austria States / Österreich Bundesländer (id country=41) +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'B','BURGENLAND','Burgenland',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'K','KAERNTEN','Kärnten',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'N','NIEDEROESTERREICH','Niederösterreich',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'O','OBEROESTERREICH','Oberösterreich',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'S','SALZBURG','Salzburg',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'ST','STEIERMARK','Steiermark',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'T','TIROL','Tirol',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'V','VORARLBERG','Vorarlberg',1); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101, 'W','WIEN','Wien',1); + + +-- Barbados Parish (id country=46) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'CC', 'Oistins', 0, 'CC', 'Christ Church'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SA', 'Greenland', 0, 'SA', 'Saint Andrew'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SG', 'Bulkeley', 0, 'SG', 'Saint George'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'JA', 'Holetown', 0, 'JA', 'Saint James'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SJ', 'Four Roads', 0, 'SJ', 'Saint John'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SB', 'Bathsheba', 0, 'SB', 'Saint Joseph'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SL', 'Crab Hill', 0, 'SL', 'Saint Lucy'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SM', 'Bridgetown', 0, 'SM', 'Saint Michael'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SP', 'Speightstown', 0, 'SP', 'Saint Peter'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'SC', 'Crane', 0, 'SC', 'Saint Philip'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (4601, 'ST', 'Hillaby', 0, 'ST', 'Saint Thomas'); + + +-- Belgium Provinces (id country=2) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '01','',1,'ANVERS','Anvers'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (203, '02','',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '03','',2,'BRABANT-WALLON','Brabant-Wallon'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '04','',1,'BRABANT-FLAMAND','Brabant-Flamand'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '07','',2,'HAINAUT','Hainaut'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '08','',2,'LIEGE','Liège'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '09','',1,'LIMBOURG','Limbourg'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (202, '10','',2,'LUXEMBOURG','Luxembourg'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (201, '11','',2,'NAMUR','Namur'); + + +-- Brazil Provinces (id country=56) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'AC', 'ACRE', 0, 'AC', 'Acre'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'AL', 'ALAGOAS', 0, 'AL', 'Alagoas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'AP', 'AMAPA', 0, 'AP', 'Amapá'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'AM', 'AMAZONAS', 0, 'AM', 'Amazonas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'BA', 'BAHIA', 0, 'BA', 'Bahia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'CE', 'CEARA', 0, 'CE', 'Ceará'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'ES', 'ESPIRITO SANTO', 0, 'ES', 'Espirito Santo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'GO', 'GOIAS', 0, 'GO', 'Goiás'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'MA', 'MARANHAO', 0, 'MA', 'Maranhão'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'MT', 'MATO GROSSO', 0, 'MT', 'Mato Grosso'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'MS', 'MATO GROSSO DO SUL', 0, 'MS', 'Mato Grosso do Sul'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'MG', 'MINAS GERAIS', 0, 'MG', 'Minas Gerais'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'PA', 'PARA', 0, 'PA', 'Pará'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'PB', 'PARAIBA', 0, 'PB', 'Paraiba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'PR', 'PARANA', 0, 'PR', 'Paraná'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'PE', 'PERNAMBUCO', 0, 'PE', 'Pernambuco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'PI', 'PIAUI', 0, 'PI', 'Piauí'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'RJ', 'RIO DE JANEIRO', 0, 'RJ', 'Rio de Janeiro'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'RN', 'RIO GRANDE DO NORTE', 0, 'RN', 'Rio Grande do Norte'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'RS', 'RIO GRANDE DO SUL', 0, 'RS', 'Rio Grande do Sul'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'RO', 'RONDONIA', 0, 'RO', 'Rondônia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'RR', 'RORAIMA', 0, 'RR', 'Roraima'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'SC', 'SANTA CATARINA', 0, 'SC', 'Santa Catarina'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'SE', 'SERGIPE', 0, 'SE', 'Sergipe'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'SP', 'SAO PAULO', 0, 'SP', 'Sao Paulo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'TO', 'TOCANTINS', 0, 'TO', 'Tocantins'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (5601, 'DF', 'DISTRITO FEDERAL', 0, 'DF', 'Distrito Federal'); + + +-- Canada Provinces & Territories (id country=14) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'ON','',1,'','Ontario'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'QC','',1,'','Quebec'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NS','',1,'','Nova Scotia'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NB','',1,'','New Brunswick'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'MB','',1,'','Manitoba'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'BC','',1,'','British Columbia'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'PE','',1,'','Prince Edward Island'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'SK','',1,'','Saskatchewan'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'AB','',1,'','Alberta'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values (1401, 'NL','',1,'','Newfoundland and Labrador'); + + +-- Chile Provinces (id country=67) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6701, '011', '', 0, '011', 'Iquique'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6701, '014', '', 0, '014', 'Tamarugal'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '021', '', 0, '021', 'Antofagasa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '022', '', 0, '022', 'El Loa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6702, '023', '', 0, '023', 'Tocopilla'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '031', '', 0, '031', 'Copiapó'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '032', '', 0, '032', 'Chañaral'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6703, '033', '', 0, '033', 'Huasco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '041', '', 0, '041', 'Elqui'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '042', '', 0, '042', 'Choapa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6704, '043', '', 0, '043', 'Limarí'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '051', '', 0, '051', 'Valparaíso'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '052', '', 0, '052', 'Isla de Pascua'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '053', '', 0, '053', 'Los Andes'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '054', '', 0, '054', 'Petorca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '055', '', 0, '055', 'Quillota'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '056', '', 0, '056', 'San Antonio'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '057', '', 0, '057', 'San Felipe de Aconcagua'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6705, '058', '', 0, '058', 'Marga Marga'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '061', '', 0, '061', 'Cachapoal'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '062', '', 0, '062', 'Cardenal Caro'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6706, '063', '', 0, '063', 'Colchagua'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '071', '', 0, '071', 'Talca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '072', '', 0, '072', 'Cauquenes'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '073', '', 0, '073', 'Curicó'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6707, '074', '', 0, '074', 'Linares'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '081', '', 0, '081', 'Concepción'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '082', '', 0, '082', 'Arauco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '083', '', 0, '083', 'Biobío'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6708, '084', '', 0, '084', 'Ñuble'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6709, '091', '', 0, '091', 'Cautín'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6709, '092', '', 0, '092', 'Malleco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '101', '', 0, '101', 'Llanquihue'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '102', '', 0, '102', 'Chiloé'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '103', '', 0, '103', 'Osorno'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6710, '104', '', 0, '104', 'Palena'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '111', '', 0, '111', 'Coihaique'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '112', '', 0, '112', 'Aisén'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '113', '', 0, '113', 'Capitán Prat'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6711, '114', '', 0, '114', 'General Carrera'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '121', '', 0, '121', 'Magallanes'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '122', '', 0, '122', 'Antártica Chilena'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '123', '', 0, '123', 'Tierra del Fuego'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6712, '124', '', 0, '124', 'Última Esperanza'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '131', '', 0, '131', 'Santiago'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '132', '', 0, '132', 'Cordillera'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '133', '', 0, '133', 'Chacabuco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '134', '', 0, '134', 'Maipo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '135', '', 0, '135', 'Melipilla'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6713, '136', '', 0, '136', 'Talagante'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6714, '141', '', 0, '141', 'Valdivia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6714, '142', '', 0, '142', 'Ranco'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6715, '151', '', 0, '151', 'Arica'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (6715, '152', '', 0, '152', 'Parinacota'); + + +-- Colombia Departamentos (id country=70) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ANT', '', 0, 'ANT', 'Antioquia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOL', '', 0, 'BOL', 'Bolívar'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOY', '', 0, 'BOY', 'Boyacá'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAL', '', 0, 'CAL', 'Caldas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAU', '', 0, 'CAU', 'Cauca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CUN', '', 0, 'CUN', 'Cundinamarca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'HUI', '', 0, 'HUI', 'Huila'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'LAG', '', 0, 'LAG', 'La Guajira'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'MET', '', 0, 'MET', 'Meta'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'NAR', '', 0, 'NAR', 'Nariño'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'NDS', '', 0, 'NDS', 'Norte de Santander'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SAN', '', 0, 'SAN', 'Santander'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SUC', '', 0, 'SUC', 'Sucre'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'TOL', '', 0, 'TOL', 'Tolima'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VAC', '', 0, 'VAC', 'Valle del Cauca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'RIS', '', 0, 'RIS', 'Risalda'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ATL', '', 0, 'ATL', 'Atlántico'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'COR', '', 0, 'COR', 'Córdoba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'SAP', '', 0, 'SAP', 'San Andrés, Providencia y Santa Catalina'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'ARA', '', 0, 'ARA', 'Arauca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAS', '', 0, 'CAS', 'Casanare'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'AMA', '', 0, 'AMA', 'Amazonas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CAQ', '', 0, 'CAQ', 'Caquetá'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CHO', '', 0, 'CHO', 'Chocó'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'GUA', '', 0, 'GUA', 'Guainía'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'GUV', '', 0, 'GUV', 'Guaviare'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'PUT', '', 0, 'PUT', 'Putumayo'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'QUI', '', 0, 'QUI', 'Quindío'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VAU', '', 0, 'VAU', 'Vaupés'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'BOG', '', 0, 'BOG', 'Bogotá'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'VID', '', 0, 'VID', 'Vichada'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'CES', '', 0, 'CES', 'Cesar'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (7001, 'MAG', '', 0, 'MAG', 'Magdalena'); + + +-- France Departements (id country=1) +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 1, '971','97105',3,'GUADELOUPE','Guadeloupe'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 2, '972','97209',3,'MARTINIQUE','Martinique'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 3, '973','97302',3,'GUYANE','Guyane'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 4, '974','97411',3,'REUNION','Réunion'); +insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 6, '976','97601',3,'MAYOTTE','Mayotte'); insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (84,'01','01053',5,'AIN','Ain'); insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (32,'02','02408',5,'AISNE','Aisne'); @@ -139,29 +466,70 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'94','94028',2,'VAL-DE-MARNE','Val-de-Marne'); insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'95','95500',2,'VAL-D OISE','Val-d Oise'); --- Provinces Austria (id country=41) -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'B','BURGENLAND','Burgenland',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'K','KAERNTEN','Kärnten',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'N','NIEDEROESTERREICH','Niederösterreich',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'O','OBEROESTERREICH','Oberösterreich',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'S','SALZBURG','Salzburg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'ST','STEIERMARK','Steiermark',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'T','TIROL','Tirol',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'V','VORARLBERG','Vorarlberg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'W','WIEN','Wien',1); --- Provinces Belgium (id country=2) -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (203,'02','',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'03','',2,'BRABANT-WALLON','Brabant-Wallon'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'04','',1,'BRABANT-FLAMAND','Brabant-Flamand'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'07','',2,'HAINAUT','Hainaut'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'08','',2,'LIEGE','Liège'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'09','',1,'LIMBOURG','Limbourg'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'10','',2,'LUXEMBOURG','Luxembourg'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'11','',2,'NAMUR','Namur'); +-- Germany States / Bundesländer (id country=5) +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'BW', 'BADEN-WÜRTTEMBERG', 'Baden-Württemberg'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'BY', 'BAYERN', 'Bayern'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'BE', 'BERLIN', 'Berlin'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'BB', 'BRANDENBURG', 'Brandenburg'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'HB', 'BREMEN', 'Bremen'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'HH', 'HAMBURG', 'Hamburg'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'HE', 'HESSEN', 'Hessen'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'MV', 'MECKLENBURG-VORPOMMERN', 'Mecklenburg-Vorpommern'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'NI', 'NIEDERSACHSEN', 'Niedersachsen'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'NW', 'NORDRHEIN-WESTFALEN', 'Nordrhein-Westfalen'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'RP', 'RHEINLAND-PFALZ', 'Rheinland-Pfalz'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'SL', 'SAARLAND', 'Saarland'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'SN', 'SACHSEN', 'Sachsen'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'ST', 'SACHSEN-ANHALT', 'Sachsen-Anhalt'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'SH', 'SCHLESWIG-HOLSTEIN', 'Schleswig-Holstein'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (501, 'TH', 'THÜRINGEN', 'Thüringen'); + + +-- Honduras Departamentos (id country=114) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'AT', '', 0, 'AT', 'Atlántida'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CH', '', 0, 'CH', 'Choluteca'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CL', '', 0, 'CL', 'Colón'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CM', '', 0, 'CM', 'Comayagua'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CO', '', 0, 'CO', 'Copán'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'CR', '', 0, 'CR', 'Cortés'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'EP', '', 0, 'EP', 'El Paraíso'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'FM', '', 0, 'FM', 'Francisco Morazán'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'GD', '', 0, 'GD', 'Gracias a Dios'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'IN', '', 0, 'IN', 'Intibucá'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'IB', '', 0, 'IB', 'Islas de la Bahía'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'LP', '', 0, 'LP', 'La Paz'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'LM', '', 0, 'LM', 'Lempira'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'OC', '', 0, 'OC', 'Ocotepeque'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'OL', '', 0, 'OL', 'Olancho'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'SB', '', 0, 'SB', 'Santa Bárbara'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'VL', '', 0, 'VL', 'Valle'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'YO', '', 0, 'YO', 'Yoro'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'DC', '', 0, 'DC', 'Distrito Central'); + + +-- Hungary Provinces (rowid country=18) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (180100, 'HU-BU', 'HU101', NULL, NULL, 'Budapest'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (180100, 'HU-PE', 'HU102', NULL, NULL, 'Pest'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-FE', 'HU211', NULL, NULL, 'Fejér'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-KE', 'HU212', NULL, NULL, 'Komárom-Esztergom'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-VE', 'HU213', NULL, NULL, 'Veszprém'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-GS', 'HU221', NULL, NULL, 'Győr-Moson-Sopron'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-VA', 'HU222', NULL, NULL, 'Vas'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-ZA', 'HU223', NULL, NULL, 'Zala'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-BA', 'HU231', NULL, NULL, 'Baranya'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-SO', 'HU232', NULL, NULL, 'Somogy'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-TO', 'HU233', NULL, NULL, 'Tolna'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-BZ', 'HU311', NULL, NULL, 'Borsod-Abaúj-Zemplén'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-HE', 'HU312', NULL, NULL, 'Heves'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-NO', 'HU313', NULL, NULL, 'Nógrád'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-HB', 'HU321', NULL, NULL, 'Hajdú-Bihar'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-JN', 'HU322', NULL, NULL, 'Jász-Nagykun-Szolnok'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-SZ', 'HU323', NULL, NULL, 'Szabolcs-Szatmár-Bereg'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-BK', 'HU331', NULL, NULL, 'Bács-Kiskun'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-BE', 'HU332', NULL, NULL, 'Békés'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-CS', 'HU333', NULL, NULL, 'Csongrád'); + -- Provinces Italy (id=3) insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO'); @@ -275,55 +643,36 @@ insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VI',320,NULL,NULL,NULL,'VICENZA'); insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VT',307,NULL,NULL,NULL,'VITERBO'); --- Provinces Algeria (id country=13) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL01', 1301, '', 0, '', 'Wilaya d''Adrar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL02', 1301, '', 0, '', 'Wilaya de Chlef', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL03', 1301, '', 0, '', 'Wilaya de Laghouat', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL04', 1301, '', 0, '', 'Wilaya d''Oum El Bouaghi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL05', 1301, '', 0, '', 'Wilaya de Batna', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL06', 1301, '', 0, '', 'Wilaya de Béjaïa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL07', 1301, '', 0, '', 'Wilaya de Biskra', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL08', 1301, '', 0, '', 'Wilaya de Béchar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL09', 1301, '', 0, '', 'Wilaya de Blida', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL10', 1301, '', 0, '', 'Wilaya de Bouira', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL11', 1301, '', 0, '', 'Wilaya de Tamanrasset', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL12', 1301, '', 0, '', 'Wilaya de Tébessa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL13', 1301, '', 0, '', 'Wilaya de Tlemcen', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL14', 1301, '', 0, '', 'Wilaya de Tiaret', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL15', 1301, '', 0, '', 'Wilaya de Tizi Ouzou', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL16', 1301, '', 0, '', 'Wilaya d''Alger', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL17', 1301, '', 0, '', 'Wilaya de Djelfa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL18', 1301, '', 0, '', 'Wilaya de Jijel', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL19', 1301, '', 0, '', 'Wilaya de Sétif ', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL20', 1301, '', 0, '', 'Wilaya de Saïda', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL21', 1301, '', 0, '', 'Wilaya de Skikda', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL22', 1301, '', 0, '', 'Wilaya de Sidi Bel Abbès', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL23', 1301, '', 0, '', 'Wilaya d''Annaba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL24', 1301, '', 0, '', 'Wilaya de Guelma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL25', 1301, '', 0, '', 'Wilaya de Constantine', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL26', 1301, '', 0, '', 'Wilaya de Médéa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL27', 1301, '', 0, '', 'Wilaya de Mostaganem', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL28', 1301, '', 0, '', 'Wilaya de M''Sila', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL29', 1301, '', 0, '', 'Wilaya de Mascara', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL30', 1301, '', 0, '', 'Wilaya d''Ouargla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL31', 1301, '', 0, '', 'Wilaya d''Oran', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL32', 1301, '', 0, '', 'Wilaya d''El Bayadh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL33', 1301, '', 0, '', 'Wilaya d''Illizi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL34', 1301, '', 0, '', 'Wilaya de Bordj Bou Arreridj', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL35', 1301, '', 0, '', 'Wilaya de Boumerdès', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL36', 1301, '', 0, '', 'Wilaya d''El Tarf', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL37', 1301, '', 0, '', 'Wilaya de Tindouf', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL38', 1301, '', 0, '', 'Wilaya de Tissemsilt', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL39', 1301, '', 0, '', 'Wilaya d''El Oued', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL40', 1301, '', 0, '', 'Wilaya de Khenchela', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL41', 1301, '', 0, '', 'Wilaya de Souk Ahras', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL42', 1301, '', 0, '', 'Wilaya de Tipaza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL43', 1301, '', 0, '', 'Wilaya de Mila', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL44', 1301, '', 0, '', 'Wilaya d''Aïn Defla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL45', 1301, '', 0, '', 'Wilaya de Naâma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL46', 1301, '', 0, '', 'Wilaya d''Aïn Témouchent', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL47', 1301, '', 0, '', 'Wilaya de Ghardaia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL48', 1301, '', 0, '', 'Wilaya de Relizane', 1); + +-- Luxembourg Cantons (id country=140) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0001', '', 0, '', 'Clervaux'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0002', '', 0, '', 'Diekirch'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0003', '', 0, '', 'Redange'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0004', '', 0, '', 'Vianden'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14001, 'LU0005', '', 0, '', 'Wiltz'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0006', '', 0, '', 'Echternach'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0007', '', 0, '', 'Grevenmacher'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14002, 'LU0008', '', 0, '', 'Remich'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0009', '', 0, '', 'Capellen'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0010', '', 0, '', 'Esch-sur-Alzette'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0011', '', 0, '', 'Luxembourg'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (14003, 'LU0012', '', 0, '', 'Mersch'); + + +-- Netherlands/Nederland Provinces (id country=17) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'GR', NULL, NULL, NULL, 'Groningen'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'FR', NULL, NULL, NULL, 'Friesland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'DR', NULL, NULL, NULL, 'Drenthe'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'OV', NULL, NULL, NULL, 'Overijssel'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'GD', NULL, NULL, NULL, 'Gelderland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'FL', NULL, NULL, NULL, 'Flevoland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'UT', NULL, NULL, NULL, 'Utrecht'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'NH', NULL, NULL, NULL, 'Noord-Holland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'ZH', NULL, NULL, NULL, 'Zuid-Holland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'ZL', NULL, NULL, NULL, 'Zeeland'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'NB', NULL, NULL, NULL, 'Noord-Brabant'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1701, 'LB', NULL, NULL, NULL, 'Limburg'); + -- Provinces Maroc - Moroco (id country=12) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA', 1209, '', 0, '', 'Province de Benslimane', 1); @@ -409,31 +758,80 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA19A', 1214, '', 0, '', 'Province de Tan-Tan', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA19B', 1214, '', 0, '', 'Province de Tan-Tan', 1); --- Provinces Tunisia (id country=10) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN01', 1001, '', 0, '', 'Ariana', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN02', 1001, '', 0, '', 'Béja', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN03', 1001, '', 0, '', 'Ben Arous', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN04', 1001, '', 0, '', 'Bizerte', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN05', 1001, '', 0, '', 'Gabès', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN06', 1001, '', 0, '', 'Gafsa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN07', 1001, '', 0, '', 'Jendouba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN08', 1001, '', 0, '', 'Kairouan', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN09', 1001, '', 0, '', 'Kasserine', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN10', 1001, '', 0, '', 'Kébili', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN11', 1001, '', 0, '', 'La Manouba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN12', 1001, '', 0, '', 'Le Kef', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN13', 1001, '', 0, '', 'Mahdia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN14', 1001, '', 0, '', 'Médenine', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN15', 1001, '', 0, '', 'Monastir', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN16', 1001, '', 0, '', 'Nabeul', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN17', 1001, '', 0, '', 'Sfax', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN18', 1001, '', 0, '', 'Sidi Bouzid', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN19', 1001, '', 0, '', 'Siliana', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN20', 1001, '', 0, '', 'Sousse', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN21', 1001, '', 0, '', 'Tataouine', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN22', 1001, '', 0, '', 'Tozeur', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1); + +-- Romania Provinces (id country=188) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'AB', '', 0, '', 'Alba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'AR', '', 0, '', 'Arad'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'AG', '', 0, '', 'Argeș'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BC', '', 0, '', 'Bacău'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BH', '', 0, '', 'Bihor'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BN', '', 0, '', 'Bistrița-Năsăud'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BT', '', 0, '', 'Botoșani'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BV', '', 0, '', 'Brașov'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BR', '', 0, '', 'Brăila'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BU', '', 0, '', 'Bucuresti'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'BZ', '', 0, '', 'Buzău'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'CL', '', 0, '', 'Călărași'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'CS', '', 0, '', 'Caraș-Severin'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'CJ', '', 0, '', 'Cluj'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'CT', '', 0, '', 'Constanța'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'CV', '', 0, '', 'Covasna'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'DB', '', 0, '', 'Dâmbovița'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'DJ', '', 0, '', 'Dolj'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'GL', '', 0, '', 'Galați'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'GR', '', 0, '', 'Giurgiu'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'GJ', '', 0, '', 'Gorj'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'HR', '', 0, '', 'Harghita'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'HD', '', 0, '', 'Hunedoara'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'IL', '', 0, '', 'Ialomița'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'IS', '', 0, '', 'Iași'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'IF', '', 0, '', 'Ilfov'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'MM', '', 0, '', 'Maramureș'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'MH', '', 0, '', 'Mehedinți'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'MS', '', 0, '', 'Mureș'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'NT', '', 0, '', 'Neamț'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'OT', '', 0, '', 'Olt'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'PH', '', 0, '', 'Prahova'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'SM', '', 0, '', 'Satu Mare'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'SJ', '', 0, '', 'Sălaj'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'SB', '', 0, '', 'Sibiu'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'SV', '', 0, '', 'Suceava'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'TR', '', 0, '', 'Teleorman'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'TM', '', 0, '', 'Timiș'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'TL', '', 0, '', 'Tulcea'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'VS', '', 0, '', 'Vaslui'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'VL', '', 0, '', 'Vâlcea'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (18801, 'VN', '', 0, '', 'Vrancea'); + + +-- Tunisia Governorates / Provinces / Wilaya (id country=10) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN01', '', 0, '', 'Ariana'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN02', '', 0, '', 'Béja'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN03', '', 0, '', 'Ben Arous'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN04', '', 0, '', 'Bizerte'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN05', '', 0, '', 'Gabès'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN06', '', 0, '', 'Gafsa'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN07', '', 0, '', 'Jendouba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN08', '', 0, '', 'Kairouan'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN09', '', 0, '', 'Kasserine'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN10', '', 0, '', 'Kébili'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN11', '', 0, '', 'La Manouba'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN12', '', 0, '', 'Le Kef'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN13', '', 0, '', 'Mahdia'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN14', '', 0, '', 'Médenine'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN15', '', 0, '', 'Monastir'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN16', '', 0, '', 'Nabeul'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN17', '', 0, '', 'Sfax'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN18', '', 0, '', 'Sidi Bouzid'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN19', '', 0, '', 'Siliana'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN20', '', 0, '', 'Sousse'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN21', '', 0, '', 'Tataouine'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN22', '', 0, '', 'Tozeur'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN23', '', 0, '', 'Tunis'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (1001, 'TN24', '', 0, '', 'Zaghouan'); + + + -- Provinces Bolivia (id country=52) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1); @@ -549,27 +947,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1); --- Provinces Australia (id country=28) -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'NSW','',1,'','New South Wales'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'VIC','',1,'','Victoria'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'QLD','',1,'','Queensland'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'SA' ,'',1,'','South Australia'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'ACT','',1,'','Australia Capital Territory'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'TAS','',1,'','Tasmania'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'WA' ,'',1,'','Western Australia'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (2801,'NT' ,'',1,'','Northern Territory'); - --- Provinces Canada (id country=14) -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'ON','',1,'','Ontario'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'QC','',1,'','Quebec'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'NS','',1,'','Nova Scotia'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'NB','',1,'','New Brunswick'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'MB','',1,'','Manitoba'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'BC','',1,'','British Columbia'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'PE','',1,'','Prince Edward Island'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'SK','',1,'','Saskatchewan'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'AB','',1,'','Alberta'); -insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (1401,'NL','',1,'','Newfoundland and Labrador'); -- Provinces Spain (id country=4) in order of province (for logical pick list) INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('VI', '419', '01', 19, 'ALAVA', 'Álava'); @@ -625,23 +1002,6 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('ZA', '403', '49', 3, 'ZAMORA', 'Zamora'); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('Z', '402', '50', 1, 'ZARAGOZA', 'Zaragoza'); --- Provinces Germany (id country=5) -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BW','BADEN-WÜRTTEMBERG','Baden-Württemberg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BY','BAYERN','Bayern',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BE','BERLIN','Berlin',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'BB','BRANDENBURG','Brandenburg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HB','BREMEN','Bremen',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HH','HAMBURG','Hamburg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'HE','HESSEN','Hessen',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'MV','MECKLENBURG-VORPOMMERN','Mecklenburg-Vorpommern',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'NI','NIEDERSACHSEN','Niedersachsen',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'NW','NORDRHEIN-WESTFALEN','Nordrhein-Westfalen',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'RP','RHEINLAND-PFALZ','Rheinland-Pfalz',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SL','SAARLAND','Saarland',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SN','SACHSEN','Sachsen',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'ST','SACHSEN-ANHALT','Sachsen-Anhalt',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'SH','SCHLESWIG-HOLSTEIN','Schleswig-Holstein',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (501,'TH','THÜRINGEN','Thüringen',1); -- Provinces Greece (id country=102) INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('66', 10201, '', 0, '', 'Αθήνα', 1); @@ -712,33 +1072,35 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('64', 10204, '', 0, '', 'Ρέθυμνο', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('65', 10204, '', 0, '', 'Χανιά', 1); --- Cantons Switzerland (id country=6) -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AG','ARGOVIE','Argovie',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AI','APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'AR','APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BE','BERNE','Berne',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BL','BALE CAMPAGNE','Bâle Campagne',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'BS','BALE VILLE','Bâle Ville',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'FR','FRIBOURG','Fribourg',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GE','GENEVE','Genève',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GL','GLARIS','Glaris',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'GR','GRISONS','Grisons',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'JU','JURA','Jura',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'LU','LUCERNE','Lucerne',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'NE','NEUCHATEL','Neuchâtel',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'NW','NIDWALD','Nidwald',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'OW','OBWALD','Obwald',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SG','SAINT-GALL','Saint-Gall',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SH','SCHAFFHOUSE','Schaffhouse',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SO','SOLEURE','Soleure',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'SZ','SCHWYZ','Schwyz',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'TG','THURGOVIE','Thurgovie',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'TI','TESSIN','Tessin',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'UR','URI','Uri',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'VD','VAUD','Vaud',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'VS','VALAIS','Valais',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'ZG','ZUG','Zug',1); -INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (601,'ZH','ZURICH','Zürich',1); + +-- Switzerland Cantons (id country=6) +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AG','ARGOVIE','Argovie'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AI','APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'AR','APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BE','BERNE','Berne'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BL','BALE CAMPAGNE','Bâle Campagne'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'BS','BALE VILLE','Bâle Ville'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'FR','FRIBOURG','Fribourg'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GE','GENEVE','Genève'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GL','GLARIS','Glaris'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'GR','GRISONS','Grisons'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'JU','JURA','Jura'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'LU','LUCERNE','Lucerne'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'NE','NEUCHATEL','Neuchâtel'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'NW','NIDWALD','Nidwald'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'OW','OBWALD','Obwald'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SG','SAINT-GALL','Saint-Gall'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SH','SCHAFFHOUSE','Schaffhouse'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SO','SOLEURE','Soleure'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'SZ','SCHWYZ','Schwyz'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'TG','THURGOVIE','Thurgovie'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'TI','TESSIN','Tessin'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'UR','URI','Uri'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'VD','VAUD','Vaud'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'VS','VALAIS','Valais'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'ZG','ZUG','Zug'); +INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom) VALUES (601, 'ZH','ZURICH','Zürich'); + -- Provinces GB (id country=7) INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('701', 701, NULL, 0,NULL, 'Bedfordshire', 1); @@ -914,19 +1276,6 @@ insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WI', 1101, '', 0, 'WISCONSIN', 'Wisconsin', 1); insert into llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) values ('WY', 1101, '', 0, 'WYOMING', 'Wyoming', 1); --- Provincies van het Koninkrijk der Nederlanden (id country=17) -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('GR',1701,NULL,NULL,NULL,'Groningen',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('FR',1701,NULL,NULL,NULL,'Friesland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('DR',1701,NULL,NULL,NULL,'Drenthe',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('OV',1701,NULL,NULL,NULL,'Overijssel',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('GD',1701,NULL,NULL,NULL,'Gelderland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('FL',1701,NULL,NULL,NULL,'Flevoland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('UT',1701,NULL,NULL,NULL,'Utrecht',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('NH',1701,NULL,NULL,NULL,'Noord-Holland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('ZH',1701,NULL,NULL,NULL,'Zuid-Holland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('ZL',1701,NULL,NULL,NULL,'Zeeland',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('NB',1701,NULL,NULL,NULL,'Noord-Brabant',1); -INSERT INTO llx_c_departements ( code_departement,fk_region,cheflieu,tncc,ncc,nom,active) VALUES ('LB',1701,NULL,NULL,NULL,'Limburg',1); -- San Salvador (id country=86) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SS', 8601, '', 0, '', 'San Salvador', 1); @@ -944,132 +1293,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SV', 8601, '', 0, '', 'San Vicente', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CU', 8601, '', 0, '', 'Cuscatlan', 1); --- Provinces Argentina (id country=23) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2301', 2301, '', 0, 'CATAMARCA', 'Catamarca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2302', 2301, '', 0, 'JUJUY', 'Jujuy', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2303', 2301, '', 0, 'TUCAMAN', 'Tucamán', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2304', 2301, '', 0, 'SANTIAGO DEL ESTERO', 'Santiago del Estero', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2305', 2301, '', 0, 'SALTA', 'Salta', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2306', 2302, '', 0, 'CHACO', 'Chaco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2307', 2302, '', 0, 'CORRIENTES', 'Corrientes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2308', 2302, '', 0, 'ENTRE RIOS', 'Entre Ríos', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2309', 2302, '', 0, 'FORMOSA', 'Formosa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2310', 2302, '', 0, 'SANTA FE', 'Santa Fe', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2311', 2303, '', 0, 'LA RIOJA', 'La Rioja', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2312', 2303, '', 0, 'MENDOZA', 'Mendoza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2313', 2303, '', 0, 'SAN JUAN', 'San Juan', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2314', 2303, '', 0, 'SAN LUIS', 'San Luis', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2315', 2304, '', 0, 'CORDOBA', 'Córdoba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2316', 2304, '', 0, 'BUENOS AIRES', 'Buenos Aires', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2317', 2304, '', 0, 'CABA', 'Caba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2318', 2305, '', 0, 'LA PAMPA', 'La Pampa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2319', 2305, '', 0, 'NEUQUEN', 'Neuquén', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2320', 2305, '', 0, 'RIO NEGRO', 'Río Negro', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2321', 2305, '', 0, 'CHUBUT', 'Chubut', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2322', 2305, '', 0, 'SANTA CRUZ', 'Santa Cruz', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2323', 2305, '', 0, 'TIERRA DEL FUEGO', 'Tierra del Fuego', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2324', 2305, '', 0, 'ISLAS MALVINAS', 'Islas Malvinas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2325', 2305, '', 0, 'ANTARTIDA', 'Antártida', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2326', 2305, '', 0, 'MISIONES', 'Misiones', 1); - --- Parish Barbados (id country=46) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CC', 4601, 'Oistins', 0, 'CC', 'Christ Church', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SA', 4601, 'Greenland', 0, 'SA', 'Saint Andrew', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SG', 4601, 'Bulkeley', 0, 'SG', 'Saint George', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('JA', 4601, 'Holetown', 0, 'JA', 'Saint James', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SJ', 4601, 'Four Roads', 0, 'SJ', 'Saint John', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SB', 4601, 'Bathsheba', 0, 'SB', 'Saint Joseph', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SL', 4601, 'Crab Hill', 0, 'SL', 'Saint Lucy', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SM', 4601, 'Bridgetown', 0, 'SM', 'Saint Michael', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SP', 4601, 'Speightstown', 0, 'SP', 'Saint Peter', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SC', 4601, 'Crane', 0, 'SC', 'Saint Philip', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ST', 4601, 'Hillaby', 0, 'ST', 'Saint Thomas', 1); - --- Provinces Brazil (id country=56) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AC', 5601, 'ACRE', 0, 'AC', 'Acre', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AL', 5601, 'ALAGOAS', 0, 'AL', 'Alagoas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AP', 5601, 'AMAPA', 0, 'AP', 'Amapá', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AM', 5601, 'AMAZONAS', 0, 'AM', 'Amazonas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BA', 5601, 'BAHIA', 0, 'BA', 'Bahia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CE', 5601, 'CEARA', 0, 'CE', 'Ceará', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ES', 5601, 'ESPIRITO SANTO', 0, 'ES', 'Espirito Santo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GO', 5601, 'GOIAS', 0, 'GO', 'Goiás', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MA', 5601, 'MARANHAO', 0, 'MA', 'Maranhão', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MT', 5601, 'MATO GROSSO', 0, 'MT', 'Mato Grosso', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MS', 5601, 'MATO GROSSO DO SUL', 0, 'MS', 'Mato Grosso do Sul', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MG', 5601, 'MINAS GERAIS', 0, 'MG', 'Minas Gerais', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA', 5601, 'PARA', 0, 'PA', 'Pará', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PB', 5601, 'PARAIBA', 0, 'PB', 'Paraiba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PR', 5601, 'PARANA', 0, 'PR', 'Paraná', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PE', 5601, 'PERNAMBUCO', 0, 'PE', 'Pernambuco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PI', 5601, 'PIAUI', 0, 'PI', 'Piauí', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RJ', 5601, 'RIO DE JANEIRO', 0, 'RJ', 'Rio de Janeiro', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RN', 5601, 'RIO GRANDE DO NORTE', 0, 'RN', 'Rio Grande do Norte', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RS', 5601, 'RIO GRANDE DO SUL', 0, 'RS', 'Rio Grande do Sul', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RO', 5601, 'RONDONIA', 0, 'RO', 'Rondônia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RR', 5601, 'RORAIMA', 0, 'RR', 'Roraima', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SC', 5601, 'SANTA CATARINA', 0, 'SC', 'Santa Catarina', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SE', 5601, 'SERGIPE', 0, 'SE', 'Sergipe', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SP', 5601, 'SAO PAULO', 0, 'SP', 'Sao Paulo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TO', 5601, 'TOCANTINS', 0, 'TO', 'Tocantins', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DF', 5601, 'DISTRITO FEDERAL', 0, 'DF', 'Distrito Federal', 1); - - --- Provinces Chile (id country=67) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('151', 6715, '', 0, '151', 'Arica', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('152', 6715, '', 0, '152', 'Parinacota', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 6701, '', 0, '011', 'Iquique', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 6701, '', 0, '014', 'Tamarugal', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 6702, '', 0, '021', 'Antofagasa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 6702, '', 0, '022', 'El Loa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 6702, '', 0, '023', 'Tocopilla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 6703, '', 0, '031', 'Copiapó', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 6703, '', 0, '032', 'Chañaral', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 6703, '', 0, '033', 'Huasco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 6704, '', 0, '041', 'Elqui', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 6704, '', 0, '042', 'Choapa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 6704, '', 0, '043', 'Limarí', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 6705, '', 0, '051', 'Valparaíso', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 6705, '', 0, '052', 'Isla de Pascua', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 6705, '', 0, '053', 'Los Andes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 6705, '', 0, '054', 'Petorca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 6705, '', 0, '055', 'Quillota', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 6705, '', 0, '056', 'San Antonio', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 6705, '', 0, '057', 'San Felipe de Aconcagua', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 6705, '', 0, '058', 'Marga Marga', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 6706, '', 0, '061', 'Cachapoal', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 6706, '', 0, '062', 'Cardenal Caro', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 6706, '', 0, '063', 'Colchagua', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 6707, '', 0, '071', 'Talca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 6707, '', 0, '072', 'Cauquenes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 6707, '', 0, '073', 'Curicó', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 6707, '', 0, '074', 'Linares', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 6708, '', 0, '081', 'Concepción', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 6708, '', 0, '082', 'Arauco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 6708, '', 0, '083', 'Biobío', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 6708, '', 0, '084', 'Ñuble', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 6709, '', 0, '091', 'Cautín', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 6709, '', 0, '092', 'Malleco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('141', 6714, '', 0, '141', 'Valdivia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('142', 6714, '', 0, '142', 'Ranco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 6710, '', 0, '101', 'Llanquihue', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 6710, '', 0, '102', 'Chiloé', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 6710, '', 0, '103', 'Osorno', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 6710, '', 0, '104', 'Palena', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 6711, '', 0, '111', 'Coihaique', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 6711, '', 0, '112', 'Aisén', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('113', 6711, '', 0, '113', 'Capitán Prat', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('114', 6711, '', 0, '114', 'General Carrera', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('121', 6712, '', 0, '121', 'Magallanes', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('122', 6712, '', 0, '122', 'Antártica Chilena', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('123', 6712, '', 0, '123', 'Tierra del Fuego', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('124', 6712, '', 0, '124', 'Última Esperanza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('131', 6713, '', 0, '131', 'Santiago', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('132', 6713, '', 0, '132', 'Cordillera', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('133', 6713, '', 0, '133', 'Chacabuco', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('134', 6713, '', 0, '134', 'Maipo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('135', 6713, '', 0, '135', 'Melipilla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('136', 6713, '', 0, '136', 'Talagante', 1); -- Provinces India (id country=117) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AN', 11701, NULL, 0, 'AN', 'Andaman & Nicobar', 1); @@ -1180,106 +1403,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ZAC', 15401, '', 0, 'ZAC', 'Zacatecas', 1); --- Provinces Colombia (id country=70) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ANT', 7001, '', 0, 'ANT', 'Antioquia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOL', 7001, '', 0, 'BOL', 'Bolívar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOY', 7001, '', 0, 'BOY', 'Boyacá', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAL', 7001, '', 0, 'CAL', 'Caldas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAU', 7001, '', 0, 'CAU', 'Cauca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CUN', 7001, '', 0, 'CUN', 'Cundinamarca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HUI', 7001, '', 0, 'HUI', 'Huila', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LAG', 7001, '', 0, 'LAG', 'La Guajira', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MET', 7001, '', 0, 'MET', 'Meta', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NAR', 7001, '', 0, 'NAR', 'Nariño', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NDS', 7001, '', 0, 'NDS', 'Norte de Santander', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SAN', 7001, '', 0, 'SAN', 'Santander', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SUC', 7001, '', 0, 'SUC', 'Sucre', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TOL', 7001, '', 0, 'TOL', 'Tolima', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VAC', 7001, '', 0, 'VAC', 'Valle del Cauca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('RIS', 7001, '', 0, 'RIS', 'Risalda', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ATL', 7001, '', 0, 'ATL', 'Atlántico', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('COR', 7001, '', 0, 'COR', 'Córdoba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SAP', 7001, '', 0, 'SAP', 'San Andrés, Providencia y Santa Catalina', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ARA', 7001, '', 0, 'ARA', 'Arauca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAS', 7001, '', 0, 'CAS', 'Casanare', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AMA', 7001, '', 0, 'AMA', 'Amazonas', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CAQ', 7001, '', 0, 'CAQ', 'Caquetá', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CHO', 7001, '', 0, 'CHO', 'Chocó', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GUA', 7001, '', 0, 'GUA', 'Guainía', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GUV', 7001, '', 0, 'GUV', 'Guaviare', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PUT', 7001, '', 0, 'PUT', 'Putumayo', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('QUI', 7001, '', 0, 'QUI', 'Quindío', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VAU', 7001, '', 0, 'VAU', 'Vaupés', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BOG', 7001, '', 0, 'BOG', 'Bogotá', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VID', 7001, '', 0, 'VID', 'Vichada', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CES', 7001, '', 0, 'CES', 'Cesar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MAG', 7001, '', 0, 'MAG', 'Magdalena', 1); - --- Provinces Honduras (id country=114) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AT', 11401, '', 0, 'AT', 'Atlántida', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CH', 11401, '', 0, 'CH', 'Choluteca', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CL', 11401, '', 0, 'CL', 'Colón', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CM', 11401, '', 0, 'CM', 'Comayagua', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CO', 11401, '', 0, 'CO', 'Copán', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CR', 11401, '', 0, 'CR', 'Cortés', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('EP', 11401, '', 0, 'EP', 'El Paraíso', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('FM', 11401, '', 0, 'FM', 'Francisco Morazán', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GD', 11401, '', 0, 'GD', 'Gracias a Dios', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IN', 11401, '', 0, 'IN', 'Intibucá', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IB', 11401, '', 0, 'IB', 'Islas de la Bahía', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LP', 11401, '', 0, 'LP', 'La Paz', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LM', 11401, '', 0, 'LM', 'Lempira', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OC', 11401, '', 0, 'OC', 'Ocotepeque', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OL', 11401, '', 0, 'OL', 'Olancho', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SB', 11401, '', 0, 'SB', 'Santa Bárbara', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VL', 11401, '', 0, 'VL', 'Valle', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('YO', 11401, '', 0, 'YO', 'Yoro', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DC', 11401, '', 0, 'DC', 'Distrito Central', 1); - --- Provinces Romania (id country=188) -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AB', 18801, '', 0, '', 'Alba', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AR', 18801, '', 0, '', 'Arad', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AG', 18801, '', 0, '', 'Argeș', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BC', 18801, '', 0, '', 'Bacău', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BH', 18801, '', 0, '', 'Bihor', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BN', 18801, '', 0, '', 'Bistrița-Năsăud', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BT', 18801, '', 0, '', 'Botoșani', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BV', 18801, '', 0, '', 'Brașov', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BR', 18801, '', 0, '', 'Brăila', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BZ', 18801, '', 0, '', 'Buzău', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CL', 18801, '', 0, '', 'Călărași', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CS', 18801, '', 0, '', 'Caraș-Severin', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CJ', 18801, '', 0, '', 'Cluj', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CT', 18801, '', 0, '', 'Constanța', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('CV', 18801, '', 0, '', 'Covasna', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DB', 18801, '', 0, '', 'Dâmbovița', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('DJ', 18801, '', 0, '', 'Dolj', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GL', 18801, '', 0, '', 'Galați', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GR', 18801, '', 0, '', 'Giurgiu', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('GJ', 18801, '', 0, '', 'Gorj', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HR', 18801, '', 0, '', 'Harghita', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('HD', 18801, '', 0, '', 'Hunedoara', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IL', 18801, '', 0, '', 'Ialomița', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IS', 18801, '', 0, '', 'Iași', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('IF', 18801, '', 0, '', 'Ilfov', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MM', 18801, '', 0, '', 'Maramureș', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MH', 18801, '', 0, '', 'Mehedinți', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('MS', 18801, '', 0, '', 'Mureș', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('NT', 18801, '', 0, '', 'Neamț', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('OT', 18801, '', 0, '', 'Olt', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PH', 18801, '', 0, '', 'Prahova', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SM', 18801, '', 0, '', 'Satu Mare', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SJ', 18801, '', 0, '', 'Sălaj', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SB', 18801, '', 0, '', 'Sibiu', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SV', 18801, '', 0, '', 'Suceava', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TR', 18801, '', 0, '', 'Teleorman', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TM', 18801, '', 0, '', 'Timiș', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('TL', 18801, '', 0, '', 'Tulcea', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VS', 18801, '', 0, '', 'Vaslui', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VL', 18801, '', 0, '', 'Vâlcea', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VN', 18801, '', 0, '', 'Vrancea', 1); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('BU', 18801, '', 0, '', 'Bucuresti', 1); - -- Provinces Venezuela (id country=232) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1); @@ -1307,19 +1430,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1); --- Cantons Luxembourg (id country=140) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0001', 14001, '', 0, '', 'Clervaux', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0002', 14001, '', 0, '', 'Diekirch', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0003', 14001, '', 0, '', 'Redange', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0004', 14001, '', 0, '', 'Vianden', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0005', 14001, '', 0, '', 'Wiltz', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0006', 14002, '', 0, '', 'Echternach', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0007', 14002, '', 0, '', 'Grevenmacher', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0008', 14002, '', 0, '', 'Remich', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0009', 14003, '', 0, '', 'Capellen', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0010', 14003, '', 0, '', 'Esch-sur-Alzette', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0011', 14003, '', 0, '', 'Luxembourg', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0012', 14003, '', 0, '', 'Mersch', 1); -- Provinces Peru (id country=181) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('0101', 18101, '', 0, '', 'Chachapoyas', 1); @@ -1539,36 +1649,6 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah', 1); INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain', 1); --- Provinces Andorra (rowid country=34) -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-002', 34000, 'AD100', NULL, NULL, 'Canillo'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-003', 34000, 'AD200', NULL, NULL, 'Encamp'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-004', 34000, 'AD400', NULL, NULL, 'La Massana'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-005', 34000, 'AD300', NULL, NULL, 'Ordino'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-006', 34000, 'AD600', NULL, NULL, 'Sant Julià de Lòria'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-007', 34000, 'AD500', NULL, NULL, 'Andorra la Vella'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('AD-008', 34000, 'AD700', NULL, NULL, 'Escaldes-Engordany'); - --- Provinces Hungary (rowid country=18) -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BK', 183300, 'HU331', NULL, NULL, 'Bács-Kiskun'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BA', 182300, 'HU231', NULL, NULL, 'Baranya'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BE', 183300, 'HU332', NULL, NULL, 'Békés'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BZ', 183100, 'HU311', NULL, NULL, 'Borsod-Abaúj-Zemplén'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BU', 180100, 'HU101', NULL, NULL, 'Budapest'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-CS', 183300, 'HU333', NULL, NULL, 'Csongrád'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-FE', 182100, 'HU211', NULL, NULL, 'Fejér'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-GS', 182200, 'HU221', NULL, NULL, 'Győr-Moson-Sopron'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-HB', 183200, 'HU321', NULL, NULL, 'Hajdú-Bihar'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-HE', 183100, 'HU312', NULL, NULL, 'Heves'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-JN', 183200, 'HU322', NULL, NULL, 'Jász-Nagykun-Szolnok'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-KE', 182100, 'HU212', NULL, NULL, 'Komárom-Esztergom'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-NO', 183100, 'HU313', NULL, NULL, 'Nógrád'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-PE', 180100, 'HU102', NULL, NULL, 'Pest'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-SO', 182300, 'HU232', NULL, NULL, 'Somogy'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-SZ', 183200, 'HU323', NULL, NULL, 'Szabolcs-Szatmár-Bereg'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-TO', 182300, 'HU233', NULL, NULL, 'Tolna'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-VA', 182200, 'HU222', NULL, NULL, 'Vas'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-VE', 182100, 'HU213', NULL, NULL, 'Veszprém'); -INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-ZA', 182200, 'HU223', NULL, NULL, 'Zala'); -- Provinces (postal districts) Portugal (rowid country=25) INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('15001', 'PT-AV', NULL, NULL, 'AVEIRO', 'Aveiro'); @@ -1607,22 +1687,38 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI043', NULL, NULL, 'GORIZIA', 'Gorizia'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI044', NULL, NULL, 'COASTAL–KARST', 'Coastal–Karst'); --- Provinces (postal districts) Angola (rowid country=35) -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre'); + +-- Provinces Taiwan (rowid country=886) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KLU', 'KLU', NULL, '基隆市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TPE', 'TPE', NULL, '臺北市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TPH', 'TPH', NULL, '新北市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TYC', 'TYC', NULL, '桃園市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HSH', 'HSH', NULL, '新竹縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HSC', 'HSC', NULL, '新竹市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-MAL', 'MAL', NULL, '苗栗縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-MAC', 'MAC', NULL, '苗栗市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TXG', 'TXG', NULL, '臺中市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CWH', 'CWH', NULL, '彰化縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CWS', 'CWS', NULL, '彰化市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-NTC', 'NTC', NULL, '南投市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-NTO', 'NTO', NULL, '南投縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-YLH', 'YLH', NULL, '雲林縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CHY', 'CHY', NULL, '嘉義縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-CYI', 'CYI', NULL, '嘉義市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TNN', 'TNN', NULL, '臺南市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KHH', 'KHH', NULL, '高雄市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-IUH', 'IUH', NULL, '屏東縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-PTS', 'PTS', NULL, '屏東市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-ILN', 'ILN', NULL, '宜蘭縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-ILC', 'ILC', NULL, '宜蘭市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HWA', 'HWA', NULL, '花蓮縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-HWC', 'HWC', NULL, '花蓮市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TTC', 'TTC', NULL, '臺東市'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-TTT', 'TTT', NULL, '臺東縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-PEH', 'PEH', NULL, '澎湖縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-GNI', 'GNI', NULL, '綠島'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KYD', 'KYD', NULL, '蘭嶼'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KMN', 'KMN', NULL, '金門縣'); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-LNN', 'LNN', NULL, '連江縣'); + + diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql index b5e94449988..3c178f7c70d 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -178,3 +178,6 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE -- Description of chart of account Canada CA-ENG-BASE INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1); + +-- Description of chart of account Mexico SAT/24-2019 +INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1); diff --git a/htdocs/install/mysql/data/llx_accounting_account_de.sql b/htdocs/install/mysql/data/llx_accounting_account_de.sql index f6f6ab702fb..ddb0ab18356 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_de.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_de.sql @@ -268,83 +268,84 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1306, 'SKR03', '0', '898', '870', 'Gesellschafter-Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1307, 'SKR03', '0', '899', '870', 'Gesellschafter-Darlehen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1309, 'SKR03', '0', '900', '0', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1310, 'SKR03', '0', '901', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1311, 'SKR03', '0', '902', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1312, 'SKR03', '0', '903', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1313, 'SKR03', '0', '904', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1314, 'SKR03', '0', '905', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1315, 'SKR03', '0', '906', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1316, 'SKR03', '0', '907', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1317, 'SKR03', '0', '908', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1318, 'SKR03', '0', '909', '900', 'Kommandit-Kapital'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1319, 'SKR03', '0', '910', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1320, 'SKR03', '0', '911', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1321, 'SKR03', '0', '912', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1322, 'SKR03', '0', '913', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1323, 'SKR03', '0', '914', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1324, 'SKR03', '0', '915', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1325, 'SKR03', '0', '916', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1326, 'SKR03', '0', '917', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1327, 'SKR03', '0', '918', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1328, 'SKR03', '0', '919', '900', 'Verlustausgleichskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1329, 'SKR03', '0', '920', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1330, 'SKR03', '0', '921', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1331, 'SKR03', '0', '922', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1332, 'SKR03', '0', '923', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1333, 'SKR03', '0', '924', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1334, 'SKR03', '0', '925', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1335, 'SKR03', '0', '926', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1336, 'SKR03', '0', '927', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1337, 'SKR03', '0', '928', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1338, 'SKR03', '0', '929', '900', 'Gesellschafter-Darlehen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1341, 'SKR03', '0', '930', '900', 'Sonderposten mit Rücklageanteil steuerfreie Rücklagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1342, 'SKR03', '0', '931', '930', 'Sonderposten mit Rücklageanteil nach § 6b EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1343, 'SKR03', '0', '932', '930', 'Sonderposten mit Rücklageanteil nach Abschnitt 35 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1344, 'SKR03', '0', '933', '930', 'Sonderposten mit Rücklageanteil nach § 6d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1345, 'SKR03', '0', '934', '930', 'Sonderposten mit Rücklageanteil nach § 1 EntwLStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1347, 'SKR03', '0', '935', '900', 'Sonderposten aus der Währungsumstellung auf den Euro'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1348, 'SKR03', '0', '936', '930', 'Sonderposten mit Rücklageanteil nach § 7 d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1349, 'SKR03', '0', '937', '930', 'Sonderposten mit Rücklageanteil nach § 79 EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1350, 'SKR03', '0', '938', '930', 'Sonderposten mit Rücklageanteil nach § 80 EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1351, 'SKR03', '0', '939', '930', 'Sonderposten mit Rücklageanteil nach § 52 Abs.16 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1352, 'SKR03', '0', '940', '930', 'Sonderposten mit Rücklageanteil Sonderabschreibungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1353, 'SKR03', '0', '941', '930', 'Sonderposten mit Rücklageanteil § 82 a EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1354, 'SKR03', '0', '942', '930', 'Sonderposten mit Rücklageanteil § 82 d EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1355, 'SKR03', '0', '943', '930', 'Sonderposten mit Rücklageanteil nach § 82 e EStDV'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1356, 'SKR03', '0', '944', '930', 'Sonderposten mit Rücklageanteil nach § 14 BerlinFG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1357, 'SKR03', '0', '945', '930', 'Sonderposten mit Rücklageanteil für Förderung nach § 3 Zonen-RFG/§ 4-6 FördergebietsG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1358, 'SKR03', '0', '946', '930', 'Sonderposten mit Rücklageanteil nach § 4d EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1359, 'SKR03', '0', '947', '930', 'Sonderposten mit Rücklageanteil nach § 7g Abs.1 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1360, 'SKR03', '0', '948', '930', 'Sonderposten mit Rücklageanteil nach § 7g Abs.3 u.7 EStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1362, 'SKR03', '0', '949', '900', 'Sonderposten für Zuschüsse und Zulagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1365, 'SKR03', '0', '950', '900', 'Rückstellungen für Pensionen und ähnliche Verpflichtungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1367, 'SKR03', '0', '955', '900', 'Steuerrückstellungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1368, 'SKR03', '0', '957', '955', 'Gewerbesteuerrückstellung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1369, 'SKR03', '0', '963', '955', 'Körperschaftsteuerrückstellung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1371, 'SKR03', '0', '965', '900', 'Rückstellungen für Personalkosten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1372, 'SKR03', '0', '966', '900', 'Rückstellungen zur Erfüllung der Aufbewahrungspflichten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1373, 'SKR03', '0', '969', '900', 'Rückstellung für latente Steuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1374, 'SKR03', '0', '970', '900', 'Sonstige Rückstellungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1375, 'SKR03', '0', '971', '900', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung in den ersten drei Monaten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1376, 'SKR03', '0', '972', '900', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung innerhalb des 4. bis 12. Monats'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1377, 'SKR03', '0', '973', '900', 'Rückstellungen für Abraum- und Abfallbeseitigung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1378, 'SKR03', '0', '974', '900', 'Rückstellungen für Gewährleistungen ( Gegenkonto 4790 )'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1379, 'SKR03', '0', '976', '900', 'Rückstellungen für drohende Verluste aus schwebenden Geschäften'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1380, 'SKR03', '0', '977', '900', 'Rückstellungen für Abschluss- und Prüfungskosten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1381, 'SKR03', '0', '978', '900', 'Aufwandsrückstellungen gemäß § 249 Abs. 2 HGB'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1382, 'SKR03', '0', '979', '900', 'Rückstellungen für Umweltschutz'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1385, 'SKR03', '0', '980', '900', 'Aktive Rechnungsabgrenzung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1387, 'SKR03', '0', '983', '980', 'Abgrenzung aktive latente Steuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1388, 'SKR03', '0', '984', '900', 'Als Aufwand berücksichtigte Zölle und Verbrauchsteuern'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1389, 'SKR03', '0', '985', '900', 'Als Aufwand berücksichtigte Umsatzsteuer auf Anzahlungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1390, 'SKR03', '0', '986', '900', 'Damnum / Disagio'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1393, 'SKR03', '0', '990', '900', 'Passive Rechnungsabgrenzung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1395, 'SKR03', '0', '992', '990', 'Abgenzungsposten zur unterjährigen Kostenverrechnung für BWA'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1396, 'SKR03', '0', '993', '990', 'Forderungen aus Lieferungen und Leistungen H-Saldo'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1397, 'SKR03', '0', '996', '990', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1398, 'SKR03', '0', '997', '990', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1399, 'SKR03', '0', '998', '990', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1400, 'SKR03', '0', '999', '990', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1310, 'SKR03', '0', '901', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1311, 'SKR03', '0', '902', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1312, 'SKR03', '0', '903', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1313, 'SKR03', '0', '904', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1314, 'SKR03', '0', '905', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1315, 'SKR03', '0', '906', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1316, 'SKR03', '0', '907', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1317, 'SKR03', '0', '908', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1318, 'SKR03', '0', '909', '1309', 'Kommandit-Kapital'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1319, 'SKR03', '0', '910', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1320, 'SKR03', '0', '911', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1321, 'SKR03', '0', '912', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1322, 'SKR03', '0', '913', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1323, 'SKR03', '0', '914', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1324, 'SKR03', '0', '915', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1325, 'SKR03', '0', '916', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1326, 'SKR03', '0', '917', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1327, 'SKR03', '0', '918', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1328, 'SKR03', '0', '919', '1309', 'Verlustausgleichskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1329, 'SKR03', '0', '920', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1330, 'SKR03', '0', '921', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1331, 'SKR03', '0', '922', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1332, 'SKR03', '0', '923', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1333, 'SKR03', '0', '924', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1334, 'SKR03', '0', '925', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1335, 'SKR03', '0', '926', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1336, 'SKR03', '0', '927', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1337, 'SKR03', '0', '928', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1338, 'SKR03', '0', '929', '1309', 'Gesellschafter-Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1341, 'SKR03', '0', '930', '1309', 'Sonderposten mit Rücklageanteil steuerfreie Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1342, 'SKR03', '0', '931', '1341', 'Sonderposten mit Rücklageanteil nach § 6b EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1343, 'SKR03', '0', '932', '1341', 'Sonderposten mit Rücklageanteil nach Abschnitt 35 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1344, 'SKR03', '0', '933', '1341', 'Sonderposten mit Rücklageanteil nach § 6d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1345, 'SKR03', '0', '934', '1341', 'Sonderposten mit Rücklageanteil nach § 1 EntwLStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1347, 'SKR03', '0', '935', '1309', 'Sonderposten aus der Währungsumstellung auf den Euro'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1348, 'SKR03', '0', '936', '1341', 'Sonderposten mit Rücklageanteil nach § 7 d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1349, 'SKR03', '0', '937', '1341', 'Sonderposten mit Rücklageanteil nach § 79 EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1350, 'SKR03', '0', '938', '1341', 'Sonderposten mit Rücklageanteil nach § 80 EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1351, 'SKR03', '0', '939', '1341', 'Sonderposten mit Rücklageanteil nach § 52 Abs.16 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1352, 'SKR03', '0', '940', '1341', 'Sonderposten mit Rücklageanteil Sonderabschreibungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1353, 'SKR03', '0', '941', '1341', 'Sonderposten mit Rücklageanteil § 82 a EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1354, 'SKR03', '0', '942', '1341', 'Sonderposten mit Rücklageanteil § 82 d EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1355, 'SKR03', '0', '943', '1341', 'Sonderposten mit Rücklageanteil nach § 82 e EStDV'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1356, 'SKR03', '0', '944', '1341', 'Sonderposten mit Rücklageanteil nach § 14 BerlinFG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1357, 'SKR03', '0', '945', '1341', 'Sonderposten mit Rücklageanteil für Förderung nach § 3 Zonen-RFG/§ 4-6 FördergebietsG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1358, 'SKR03', '0', '946', '1341', 'Sonderposten mit Rücklageanteil nach § 4d EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1359, 'SKR03', '0', '947', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.1 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1360, 'SKR03', '0', '948', '1341', 'Sonderposten mit Rücklageanteil nach § 7g Abs.3 u.7 EStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1362, 'SKR03', '0', '949', '1309', 'Sonderposten für Zuschüsse und Zulagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1365, 'SKR03', '0', '950', '1309', 'Rückstellungen für Pensionen und ähnliche Verpflichtungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1367, 'SKR03', '0', '955', '1309', 'Steuerrückstellungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1368, 'SKR03', '0', '957', '1367', 'Gewerbesteuerrückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1369, 'SKR03', '0', '963', '1367', 'Körperschaftsteuerrückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1371, 'SKR03', '0', '965', '1309', 'Rückstellungen für Personalkosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1372, 'SKR03', '0', '966', '1309', 'Rückstellungen zur Erfüllung der Aufbewahrungspflichten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1373, 'SKR03', '0', '969', '1309', 'Rückstellung für latente Steuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1374, 'SKR03', '0', '970', '1309', 'Sonstige Rückstellungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1375, 'SKR03', '0', '971', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung in den ersten drei Monaten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1376, 'SKR03', '0', '972', '1309', 'Rückstellungen für unterlassene Aufwendungen für Instandhaltung Nachholung innerhalb des 4. bis 12. Monats'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1377, 'SKR03', '0', '973', '1309', 'Rückstellungen für Abraum- und Abfallbeseitigung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1378, 'SKR03', '0', '974', '1309', 'Rückstellungen für Gewährleistungen ( Gegenkonto 4790 )'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1379, 'SKR03', '0', '976', '1309', 'Rückstellungen für drohende Verluste aus schwebenden Geschäften'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1380, 'SKR03', '0', '977', '1309', 'Rückstellungen für Abschluss- und Prüfungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1381, 'SKR03', '0', '978', '1309', 'Aufwandsrückstellungen gemäß § 249 Abs. 2 HGB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1382, 'SKR03', '0', '979', '1309', 'Rückstellungen für Umweltschutz'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1385, 'SKR03', '0', '980', '1309', 'Aktive Rechnungsabgrenzung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1387, 'SKR03', '0', '983', '1385', 'Abgrenzung aktive latente Steuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1388, 'SKR03', '0', '984', '1309', 'Als Aufwand berücksichtigte Zölle und Verbrauchsteuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1389, 'SKR03', '0', '985', '1309', 'Als Aufwand berücksichtigte Umsatzsteuer auf Anzahlungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1390, 'SKR03', '0', '986', '1309', 'Damnum / Disagio'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1393, 'SKR03', '0', '990', '1309', 'Passive Rechnungsabgrenzung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1395, 'SKR03', '0', '992', '1393', 'Abgenzungsposten zur unterjährigen Kostenverrechnung für BWA'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1396, 'SKR03', '0', '993', '1393', 'Forderungen aus Lieferungen und Leistungen H-Saldo'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1397, 'SKR03', '0', '996', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1398, 'SKR03', '0', '997', '1393', 'Pauschalwertberichtigung auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1399, 'SKR03', '0', '998', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit bis zu 1 Jahr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1400, 'SKR03', '0', '999', '1393', 'Einzelwertberichtigungen auf Forderungen mit einer Restlaufzeit von mehr als 1 Jahr'); + INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1403, 'SKR03', '1', '1000', '0', 'Kasse'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1404, 'SKR03', '1', '1010', '1403', 'Nebenkasse 1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1405, 'SKR03', '1', '1020', '1403', 'Nebenkasse 2'); @@ -884,7 +885,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1966, 'SKR03', '2', '2010', '0', 'Betriebsfremde Aufwendungen (soweit nicht außerordentlich)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1967, 'SKR03', '2', '2020', '0', 'Periodenfremde Aufwendungen (soweit nicht außerordentlich)'); -); + INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1970, 'SKR03', '2', '2100', '0', 'Zinsen und ähnliche Aufwendungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1971, 'SKR03', '2', '2103', '0', 'Steuerlich abzugsfähige andere Nebenleistungen zu steuern'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1972, 'SKR03', '2', '2104', '0', 'Steuerlich nicht abzugsfähige andere Nebenleistungen zu Steuern'); @@ -1051,7 +1052,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2138, 'SKR03', '2', '2680', '0', 'Zinsähnliche Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2139, 'SKR03', '2', '2689', '0', 'Zinsähnliche Erträge aus verbundenen Unternehmen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2142, 'SKR03', '2', '2700', '0',, 'Sonstige Erträge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2142, 'SKR03', '2', '2700', '0', 'Sonstige Erträge'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2143, 'SKR03', '2', '2705', '0', 'Sonstige Erträge betrieblich und regelmäßig'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2144, 'SKR03', '2', '2707', '0', 'Sonstige Erträge betriebsfremd und regelmäßig'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2145, 'SKR03', '2', '2709', '0', 'Sonstige Erträge unregelmäßig'); @@ -1145,133 +1146,133 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2240, 'SKR03', '3', '3200', '0', 'Wareneingang'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2241, 'SKR03', '3', '3300', '2240', 'Wareneingang 7% Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2242, 'SKR03', '3', '3301', '2240', 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2243, 'SKR03', '3', '3302', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2244, 'SKR03', '3', '3303', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2245, 'SKR03', '3', '3304', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2246, 'SKR03', '3', '3305', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2247, 'SKR03', '3', '3306', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2248, 'SKR03', '3', '3307', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2249, 'SKR03', '3', '3308', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2250, 'SKR03', '3', '3309', '2240' 'Wareneingang 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2251, 'SKR03', '3', '3340', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2252, 'SKR03', '3', '3341', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2253, 'SKR03', '3', '3342', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2254, 'SKR03', '3', '3343', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2255, 'SKR03', '3', '3344', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2256, 'SKR03', '3', '3345', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2257, 'SKR03', '3', '3346', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2258, 'SKR03', '3', '3347', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2259, 'SKR03', '3', '3348', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2260, 'SKR03', '3', '3349', '2240' 'Wareneingang 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2261, 'SKR03', '3', '3400', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2262, 'SKR03', '3', '3401', '2240' 'Produkt Ausgaben'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2263, 'SKR03', '3', '3402', '2240' 'Produkt Vertriebsausgaben'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2264, 'SKR03', '3', '3403', '2240' 'Konto Kasse Aufwand'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2265, 'SKR03', '3', '3404', '2240' 'Einstandskosten Verrechnungskonto'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2266, 'SKR03', '3', '3405', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2267, 'SKR03', '3', '3406', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2268, 'SKR03', '3', '3407', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2269, 'SKR03', '3', '3408', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2270, 'SKR03', '3', '3409', '2240' 'Wareneingang 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2271, 'SKR03', '3', '3420', '2240' 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2272, 'SKR03', '3', '3421', '2240' 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2273, 'SKR03', '3', '3422', '2240' 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2274, 'SKR03', '3', '3423', '2240' 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2275, 'SKR03', '3', '3424', '2240' 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2276, 'SKR03', '3', '3425', '2240' 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2277, 'SKR03', '3', '3426', '2240' 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2278, 'SKR03', '3', '3427', '2240' 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2279, 'SKR03', '3', '3428', '2240' 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2280, 'SKR03', '3', '3429', '2240' 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2281, 'SKR03', '3', '3430', '2240' 'Innergemeinschaftlicher Erwerb ohne Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2282, 'SKR03', '3', '3433', '2240' 'Innergemeinschaftlicher Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2283, 'SKR03', '3', '3434', '2240' 'Innergemeinschaftlicher Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2284, 'SKR03', '3', '3435', '2240' 'Innergemeinschaftlicher Erwerb ohne Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2285, 'SKR03', '3', '3440', '2240' 'Innergemeinschaftlicher Erwerb von Neufahrzeugen von Lieferanten ohne Umsatzsteuer-Identifikationsnummer 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2286, 'SKR03', '3', '3441', '2240' 'Innergemeinschaftlicher Erwerb von Neufahrzeugen von Lieferanten ohne Umsatzsteuer-Identifikationsnummer 16% Vorsteuer und 16% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2287, 'SKR03', '3', '3500', '2240' 'Wareneingang 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2288, 'SKR03', '3', '3501', '2240' 'Wareneingang 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2289, 'SKR03', '3', '3502', '2240' 'Wareneingang 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2290, 'SKR03', '3', '3503', '2240' 'Wareneingang 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2291, 'SKR03', '3', '3504', '2240' 'Wareneingang 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2292, 'SKR03', '3', '3505', '2240' 'Wareneingang 5 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2293, 'SKR03', '3', '3506', '2240' 'Wareneingang 5 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2294, 'SKR03', '3', '3507', '2240' 'Wareneingang 5 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2295, 'SKR03', '3', '3508', '2240' 'Wareneingang 5 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2296, 'SKR03', '3', '3509', '2240' 'Wareneingang 5 5% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2297, 'SKR03', '3', '3530', '2240' 'Wareneingang 9% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2298, 'SKR03', '3', '3531', '2240' 'Wareneingang 9% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2299, 'SKR03', '3', '3532', '2240' 'Wareneingang 9% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2300, 'SKR03', '3', '3533', '2240' 'Wareneingang 9% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2301, 'SKR03', '3', '3534', '2240' 'Wareneingang 9% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2302, 'SKR03', '3', '3540', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2303, 'SKR03', '3', '3541', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2304, 'SKR03', '3', '3542', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2305, 'SKR03', '3', '3543', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2306, 'SKR03', '3', '3544', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2307, 'SKR03', '3', '3545', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2308, 'SKR03', '3', '3546', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2309, 'SKR03', '3', '3547', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2310, 'SKR03', '3', '3548', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2311, 'SKR03', '3', '3549', '2240' 'Wareneingang 10 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2312, 'SKR03', '3', '3550', '2240' 'steuerfreier innergemeinschaftlicher Erwerb'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2313, 'SKR03', '3', '3551', '2240' 'Wareneingang im Drittland steuerbar'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2314, 'SKR03', '3', '3559', '2240' 'Steuerfreier Einfuhren'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2315, 'SKR03', '3', '3558', '2240' 'Wareneingang I.a. EG-Land steuerbar'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2316, 'SKR03', '3', '3560', '2240' 'waren aus einem Umsatzsteuerlager § 13a UStG 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2317, 'SKR03', '3', '3565', '2240' 'waren aus einem Umsatzsteuerlager § 13a UStG 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2318, 'SKR03', '3', '3566', '2240' 'waren aus einem Umsatzsteuerlager § 13a UStG 16% Vorsteuer und 16% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2319, 'SKR03', '3', '3600', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2320, 'SKR03', '3', '3601', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2321, 'SKR03', '3', '3602', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2322, 'SKR03', '3', '3603', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2323, 'SKR03', '3', '3604', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2324, 'SKR03', '3', '3605', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2325, 'SKR03', '3', '3606', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2326, 'SKR03', '3', '3607', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2327, 'SKR03', '3', '3608', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2328, 'SKR03', '3', '3609', '2240' 'Nicht abziehbare Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2329, 'SKR03', '3', '3610', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2330, 'SKR03', '3', '3611', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2331, 'SKR03', '3', '3612', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2332, 'SKR03', '3', '3613', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2333, 'SKR03', '3', '3614', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2334, 'SKR03', '3', '3615', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2335, 'SKR03', '3', '3616', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2336, 'SKR03', '3', '3617', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2337, 'SKR03', '3', '3618', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2338, 'SKR03', '3', '3619', '2240' 'Nicht abziehbare Vorsteuer 7%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2339, 'SKR03', '3', '3650', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2340, 'SKR03', '3', '3651', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2341, 'SKR03', '3', '3652', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2342, 'SKR03', '3', '3653', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2343, 'SKR03', '3', '3654', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2344, 'SKR03', '3', '3655', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2345, 'SKR03', '3', '3656', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2346, 'SKR03', '3', '3657', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2347, 'SKR03', '3', '3658', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2348, 'SKR03', '3', '3659', '2240' 'Nicht abziehbare Vorsteuer 16%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2349, 'SKR03', '3', '3660', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2350, 'SKR03', '3', '3661', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2351, 'SKR03', '3', '3662', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2352, 'SKR03', '3', '3663', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2353, 'SKR03', '3', '3664', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2354, 'SKR03', '3', '3665', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2355, 'SKR03', '3', '3666', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2356, 'SKR03', '3', '3667', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2357, 'SKR03', '3', '3668', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2358, 'SKR03', '3', '3669', '2240' 'Nicht abziehbare Vorsteuer 19%'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2359, 'SKR03', '3', '3700', '2240' 'Nachlässe'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2360, 'SKR03', '3', '3710', '2240' 'Nachlässe 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2361, 'SKR03', '3', '3711', '2240' 'Nachlässe 7% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2362, 'SKR03', '3', '3720', '2240' 'Nachlässe 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2363, 'SKR03', '3', '3721', '2240' 'Nachlässe 19% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2364, 'SKR03', '3', '3722', '2240' 'Nachlässe 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2365, 'SKR03', '3', '3723', '2240' 'Nachlässe 15% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2366, 'SKR03', '3', '3724', '2240' 'Nachlässe aus innergemeinschaftlichem Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2367, 'SKR03', '3', '3725', '2240' 'Nachlässe aus innergemeinschaftlichem Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2368, 'SKR03', '3', '3726', '2240' 'Nachlässe aus innergemeinschaftlichem Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2369, 'SKR03', '3', '3727', '2240' 'Nachlässe aus innergemeinschaftlichem Erwerb 15% Vorsteuer und 15% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2243, 'SKR03', '3', '3302', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2244, 'SKR03', '3', '3303', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2245, 'SKR03', '3', '3304', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2246, 'SKR03', '3', '3305', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2247, 'SKR03', '3', '3306', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2248, 'SKR03', '3', '3307', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2249, 'SKR03', '3', '3308', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2250, 'SKR03', '3', '3309', '2240', 'Wareneingang 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2251, 'SKR03', '3', '3340', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2252, 'SKR03', '3', '3341', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2253, 'SKR03', '3', '3342', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2254, 'SKR03', '3', '3343', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2255, 'SKR03', '3', '3344', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2256, 'SKR03', '3', '3345', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2257, 'SKR03', '3', '3346', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2258, 'SKR03', '3', '3347', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2259, 'SKR03', '3', '3348', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2260, 'SKR03', '3', '3349', '2240', 'Wareneingang 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2261, 'SKR03', '3', '3400', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2262, 'SKR03', '3', '3401', '2240', 'Produkt Ausgaben'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2263, 'SKR03', '3', '3402', '2240', 'Produkt Vertriebsausgaben'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2264, 'SKR03', '3', '3403', '2240', 'Konto Kasse Aufwand'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2265, 'SKR03', '3', '3404', '2240', 'Einstandskosten Verrechnungskonto'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2266, 'SKR03', '3', '3405', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2267, 'SKR03', '3', '3406', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2268, 'SKR03', '3', '3407', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2269, 'SKR03', '3', '3408', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2270, 'SKR03', '3', '3409', '2240', 'Wareneingang 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2271, 'SKR03', '3', '3420', '2240', 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2272, 'SKR03', '3', '3421', '2240', 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2273, 'SKR03', '3', '3422', '2240', 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2274, 'SKR03', '3', '3423', '2240', 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2275, 'SKR03', '3', '3424', '2240', 'Innergemeinschaftlicher Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2276, 'SKR03', '3', '3425', '2240', 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2277, 'SKR03', '3', '3426', '2240', 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2278, 'SKR03', '3', '3427', '2240', 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2279, 'SKR03', '3', '3428', '2240', 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2280, 'SKR03', '3', '3429', '2240', 'Innergemeinschaftlicher Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2281, 'SKR03', '3', '3430', '2240', 'Innergemeinschaftlicher Erwerb ohne Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2282, 'SKR03', '3', '3433', '2240', 'Innergemeinschaftlicher Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2283, 'SKR03', '3', '3434', '2240', 'Innergemeinschaftlicher Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2284, 'SKR03', '3', '3435', '2240', 'Innergemeinschaftlicher Erwerb ohne Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2285, 'SKR03', '3', '3440', '2240', 'Innergemeinschaftlicher Erwerb von Neufahrzeugen von Lieferanten ohne Umsatzsteuer-Identifikationsnummer 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2286, 'SKR03', '3', '3441', '2240', 'Innergemeinschaftlicher Erwerb von Neufahrzeugen von Lieferanten ohne Umsatzsteuer-Identifikationsnummer 16% Vorsteuer und 16% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2287, 'SKR03', '3', '3500', '2240', 'Wareneingang 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2288, 'SKR03', '3', '3501', '2240', 'Wareneingang 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2289, 'SKR03', '3', '3502', '2240', 'Wareneingang 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2290, 'SKR03', '3', '3503', '2240', 'Wareneingang 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2291, 'SKR03', '3', '3504', '2240', 'Wareneingang 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2292, 'SKR03', '3', '3505', '2240', 'Wareneingang 5 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2293, 'SKR03', '3', '3506', '2240', 'Wareneingang 5 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2294, 'SKR03', '3', '3507', '2240', 'Wareneingang 5 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2295, 'SKR03', '3', '3508', '2240', 'Wareneingang 5 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2296, 'SKR03', '3', '3509', '2240', 'Wareneingang 5 5% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2297, 'SKR03', '3', '3530', '2240', 'Wareneingang 9% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2298, 'SKR03', '3', '3531', '2240', 'Wareneingang 9% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2299, 'SKR03', '3', '3532', '2240', 'Wareneingang 9% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2300, 'SKR03', '3', '3533', '2240', 'Wareneingang 9% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2301, 'SKR03', '3', '3534', '2240', 'Wareneingang 9% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2302, 'SKR03', '3', '3540', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2303, 'SKR03', '3', '3541', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2304, 'SKR03', '3', '3542', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2305, 'SKR03', '3', '3543', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2306, 'SKR03', '3', '3544', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2307, 'SKR03', '3', '3545', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2308, 'SKR03', '3', '3546', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2309, 'SKR03', '3', '3547', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2310, 'SKR03', '3', '3548', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2311, 'SKR03', '3', '3549', '2240', 'Wareneingang 10 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2312, 'SKR03', '3', '3550', '2240', 'steuerfreier innergemeinschaftlicher Erwerb'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2313, 'SKR03', '3', '3551', '2240', 'Wareneingang im Drittland steuerbar'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2314, 'SKR03', '3', '3559', '2240', 'Steuerfreier Einfuhren'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2315, 'SKR03', '3', '3558', '2240', 'Wareneingang I.a. EG-Land steuerbar'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2316, 'SKR03', '3', '3560', '2240', 'waren aus einem Umsatzsteuerlager § 13a UStG 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2317, 'SKR03', '3', '3565', '2240', 'waren aus einem Umsatzsteuerlager § 13a UStG 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2318, 'SKR03', '3', '3566', '2240', 'waren aus einem Umsatzsteuerlager § 13a UStG 16% Vorsteuer und 16% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2319, 'SKR03', '3', '3600', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2320, 'SKR03', '3', '3601', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2321, 'SKR03', '3', '3602', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2322, 'SKR03', '3', '3603', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2323, 'SKR03', '3', '3604', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2324, 'SKR03', '3', '3605', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2325, 'SKR03', '3', '3606', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2326, 'SKR03', '3', '3607', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2327, 'SKR03', '3', '3608', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2328, 'SKR03', '3', '3609', '2240', 'Nicht abziehbare Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2329, 'SKR03', '3', '3610', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2330, 'SKR03', '3', '3611', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2331, 'SKR03', '3', '3612', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2332, 'SKR03', '3', '3613', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2333, 'SKR03', '3', '3614', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2334, 'SKR03', '3', '3615', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2335, 'SKR03', '3', '3616', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2336, 'SKR03', '3', '3617', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2337, 'SKR03', '3', '3618', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2338, 'SKR03', '3', '3619', '2240', 'Nicht abziehbare Vorsteuer 7%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2339, 'SKR03', '3', '3650', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2340, 'SKR03', '3', '3651', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2341, 'SKR03', '3', '3652', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2342, 'SKR03', '3', '3653', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2343, 'SKR03', '3', '3654', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2344, 'SKR03', '3', '3655', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2345, 'SKR03', '3', '3656', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2346, 'SKR03', '3', '3657', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2347, 'SKR03', '3', '3658', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2348, 'SKR03', '3', '3659', '2240', 'Nicht abziehbare Vorsteuer 16%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2349, 'SKR03', '3', '3660', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2350, 'SKR03', '3', '3661', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2351, 'SKR03', '3', '3662', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2352, 'SKR03', '3', '3663', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2353, 'SKR03', '3', '3664', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2354, 'SKR03', '3', '3665', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2355, 'SKR03', '3', '3666', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2356, 'SKR03', '3', '3667', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2357, 'SKR03', '3', '3668', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2358, 'SKR03', '3', '3669', '2240', 'Nicht abziehbare Vorsteuer 19%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2359, 'SKR03', '3', '3700', '2240', 'Nachlässe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2360, 'SKR03', '3', '3710', '2240', 'Nachlässe 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2361, 'SKR03', '3', '3711', '2240', 'Nachlässe 7% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2362, 'SKR03', '3', '3720', '2240', 'Nachlässe 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2363, 'SKR03', '3', '3721', '2240', 'Nachlässe 19% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2364, 'SKR03', '3', '3722', '2240', 'Nachlässe 16% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2365, 'SKR03', '3', '3723', '2240', 'Nachlässe 15% Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2366, 'SKR03', '3', '3724', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 7% Vorsteuer und 7% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2367, 'SKR03', '3', '3725', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 19% Vorsteuer und 19% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2368, 'SKR03', '3', '3726', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 16% Vorsteuer und 16% Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2369, 'SKR03', '3', '3727', '2240', 'Nachlässe aus innergemeinschaftlichem Erwerb 15% Vorsteuer und 15% Umsatzsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2372, 'SKR03', '3', '3730', '0', 'Erhaltene Skonti'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2373, 'SKR03', '3', '3731', '0', 'Erhaltene Skonti 7% Vorsteuer'); @@ -1295,9 +1296,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2391, 'SKR03', '3', '3791', '0', 'Erhaltene Rabatte 19% Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2392, 'SKR03', '3', '3794', '0', 'Erhaltene Rabatte 16% Vorsteuer'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2393, 'SKR03', '3', '3795', '0', 'Erhaltene Rabatte 16% Vorsteuer'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2394, 'SKR03', '3', '3800', '0' 'Bezugsnebenkosten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2395, 'SKR03', '3', '3830', '0' 'Leergut'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2396, 'SKR03', '3', '3850', '0' 'Zölle und Einfuhrabgaben'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2394, 'SKR03', '3', '3800', '0', 'Bezugsnebenkosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2395, 'SKR03', '3', '3830', '0', 'Leergut'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2396, 'SKR03', '3', '3850', '0', 'Zölle und Einfuhrabgaben'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2399, 'SKR03', '3', '3960', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2400, 'SKR03', '3', '3961', '0', 'Bestandsveränderungen Roh- Hilfs- und Betriebsstoffe sowie bezogene Waren'); @@ -1965,42 +1966,42 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3071, 'SKR03', '8', '8700', '0', 'Erlösschmälerungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3072, 'SKR03', '8', '8701', '8700', 'Nicht abgerechnete Einnahmen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3073, 'SKR03', '8', '8705', '8700', 'Erlösschmälerungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3074, 'SKR03', '8', '8705', '8700', 'Erlösschmälerungen aus steuerfreien Umsätzen §4 Nr. 1a UStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3075, 'SKR03', '8', '8710', '8700', 'Erlösschmälerungen 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3076, 'SKR03', '8', '8720', '8700', 'Erlösschmälerungen 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3077, 'SKR03', '8', '8721', '8700', 'Erlösschmälerungen 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3078, 'SKR03', '8', '8723', '8700', 'Erlösschmälerungen 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3079, 'SKR03', '8', '8724', '8700', 'Erlösschmälerungen aus steuerfreien innergemeinschaftlichen Lieferung'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3080, 'SKR03', '8', '8725', '8700', 'Erlösschmälerungen aus im Inland steuerpflichtigen EG-Lieferungen 7 % USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3081, 'SKR03', '8', '8726', '8700', 'Erlösschmälerungen aus im Inland steuerpflichtigen EG-Lieferungen 19 % USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3082, 'SKR03', '8', '8727', '8700', 'Erlösschmälerungen aus im anderen EG-Land steuerpflichtigen Lieferungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3083, 'SKR03', '8', '8729', '8700', 'Erlösschmälerungen aus im Inland steuerpflichtigen 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3084, 'SKR03', '8', '8730', '8700', 'Gewährte Skonti'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3085, 'SKR03', '8', '8731', '8700', 'Gewährte Skonti 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3086, 'SKR03', '8', '8735', '8700', 'Gewährte Skonti 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3087, 'SKR03', '8', '8736', '8700', 'Gewährte Skonti 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3088, 'SKR03', '8', '8741', '8700', 'Gewährte Skonti aus Lieferungen für die der Leistungsempfänger die Umsatzsteuer nach § 13b UStG schuldet'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3089, 'SKR03', '8', '8743', '8700', 'Gewährte Skonti aus steuerfreien innergemeinschaftlichen Lieferungen § 4 Nr. 1b UStG'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3090, 'SKR03', '8', '8745', '8700', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3091, 'SKR03', '8', '8746', '8700', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3092, 'SKR03', '8', '8748', '8700', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3093, 'SKR03', '8', '8749', '8700', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3094, 'SKR03', '8', '8750', '8700', 'Gewährte Boni 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3095, 'SKR03', '8', '8751', '8700', 'Gewährte Boni 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3096, 'SKR03', '8', '8760', '8700', 'Gewährte Boni 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3097, 'SKR03', '8', '8761', '8700', 'Gewährte Boni 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3098, 'SKR03', '8', '8764', '8700', 'Gewährte Boni 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3099, 'SKR03', '8', '8765', '8700', 'Gewährte Boni 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3100, 'SKR03', '8', '8769', '8700', 'Gewährte Boni'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3101, 'SKR03', '8', '8770', '8700', 'Gewährte Rabatte'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3102, 'SKR03', '8', '8780', '8700', 'Gewährte Rabatte 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3103, 'SKR03', '8', '8781', '8700', 'Gewährte Rabatte 7% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3104, 'SKR03', '8', '8790', '8700', 'Gewährte Rabatte 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3105, 'SKR03', '8', '8791', '8700', 'Gewährte Rabatte 19% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3106, 'SKR03', '8', '8794', '8700', 'Gewährte Rabatte 16% USt'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3107, 'SKR03', '8', '8795', '8700', 'Gewährte Rabatte 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3072, 'SKR03', '8', '8701', '3071', 'Nicht abgerechnete Einnahmen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3073, 'SKR03', '8', '8705', '3071', 'Erlösschmälerungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3074, 'SKR03', '8', '8705', '3071', 'Erlösschmälerungen aus steuerfreien Umsätzen §4 Nr. 1a UStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3075, 'SKR03', '8', '8710', '3071', 'Erlösschmälerungen 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3076, 'SKR03', '8', '8720', '3071', 'Erlösschmälerungen 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3077, 'SKR03', '8', '8721', '3071', 'Erlösschmälerungen 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3078, 'SKR03', '8', '8723', '3071', 'Erlösschmälerungen 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3079, 'SKR03', '8', '8724', '3071', 'Erlösschmälerungen aus steuerfreien innergemeinschaftlichen Lieferung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3080, 'SKR03', '8', '8725', '3071', 'Erlösschmälerungen aus im Inland steuerpflichtigen EG-Lieferungen 7 % USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3081, 'SKR03', '8', '8726', '3071', 'Erlösschmälerungen aus im Inland steuerpflichtigen EG-Lieferungen 19 % USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3082, 'SKR03', '8', '8727', '3071', 'Erlösschmälerungen aus im anderen EG-Land steuerpflichtigen Lieferungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3083, 'SKR03', '8', '8729', '3071', 'Erlösschmälerungen aus im Inland steuerpflichtigen 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3084, 'SKR03', '8', '8730', '3071', 'Gewährte Skonti'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3085, 'SKR03', '8', '8731', '3071', 'Gewährte Skonti 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3086, 'SKR03', '8', '8735', '3071', 'Gewährte Skonti 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3087, 'SKR03', '8', '8736', '3071', 'Gewährte Skonti 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3088, 'SKR03', '8', '8741', '3071', 'Gewährte Skonti aus Lieferungen für die der Leistungsempfänger die Umsatzsteuer nach § 13b UStG schuldet'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3089, 'SKR03', '8', '8743', '3071', 'Gewährte Skonti aus steuerfreien innergemeinschaftlichen Lieferungen § 4 Nr. 1b UStG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3090, 'SKR03', '8', '8745', '3071', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3091, 'SKR03', '8', '8746', '3071', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3092, 'SKR03', '8', '8748', '3071', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3093, 'SKR03', '8', '8749', '3071', 'Gewährte Skonti aus im Inland steuerpflichtigen EG-Lieferungen 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3094, 'SKR03', '8', '8750', '3071', 'Gewährte Boni 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3095, 'SKR03', '8', '8751', '3071', 'Gewährte Boni 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3096, 'SKR03', '8', '8760', '3071', 'Gewährte Boni 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3097, 'SKR03', '8', '8761', '3071', 'Gewährte Boni 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3098, 'SKR03', '8', '8764', '3071', 'Gewährte Boni 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3099, 'SKR03', '8', '8765', '3071', 'Gewährte Boni 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3100, 'SKR03', '8', '8769', '3071', 'Gewährte Boni'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3101, 'SKR03', '8', '8770', '3071', 'Gewährte Rabatte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3102, 'SKR03', '8', '8780', '3071', 'Gewährte Rabatte 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3103, 'SKR03', '8', '8781', '3071', 'Gewährte Rabatte 7% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3104, 'SKR03', '8', '8790', '3071', 'Gewährte Rabatte 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3105, 'SKR03', '8', '8791', '3071', 'Gewährte Rabatte 19% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3106, 'SKR03', '8', '8794', '3071', 'Gewährte Rabatte 16% USt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3107, 'SKR03', '8', '8795', '3071', 'Gewährte Rabatte 16% USt'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3109, 'SKR03', '8', '8800', '0', 'Erlöse aus Verkäufen Sachanlagevermögen (Bei Buchverlust)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3110, 'SKR03', '8', '8801', '3109', 'Erlöse aus Verkäufen Sachanlagevermögen 19% USt (Bei Buchverlust)'); @@ -2705,9 +2706,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc -- SKR04 --- Some lines of SKR04 has been disabled because the fiel account_parent is wrong, it must be the rowid of parent line and not the account_number of parent line +-- Some lines of SKR04 has been disabled because the field account_parent were wrong or there is a doubt, it must be the rowid of parent line and not the account_number of parent line -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3837, 'SKR04', 'Anlagevermögen', 0, 0, 'Anlagevermögen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3838, 'SKR04', 'Anlagevermögen', 100, 0, 'Entgeltlich erworbene Konzessionen, gewerbliche Schutzrechte und ähnliche Rechte und Werte sowie Lizenzen an solchen Rechten und Werten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3839, 'SKR04', 'Anlagevermögen', 110, 3838, 'Konzessionen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3840, 'SKR04', 'Anlagevermögen', 120, 3838, 'Gewerbliche Schutzrechte'); @@ -2715,66 +2715,66 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3842, 'SKR04', 'Anlagevermögen', 135, 3838, 'EDV-Software'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3843, 'SKR04', 'Anlagevermögen', 140, 3838, 'Lizenzen an gewerblichen Schutzrechten und ähnlichen Rechten und Werte'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3844, 'SKR04', 'Anlagevermögen', 143, 0, 'Selbst geschaffene immaterielle Vermögensgegenstände'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3845, 'SKR04', 'Anlagevermögen', 144, 143, 'EDV-Software'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3846, 'SKR04', 'Anlagevermögen', 145, 143, 'Lizenzen und Franchiseverträge'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3847, 'SKR04', 'Anlagevermögen', 146, 143, 'Konzessionen und gewerbliche Schutzrechte'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3848, 'SKR04', 'Anlagevermögen', 147, 143, 'Rezepte, Verfahren, Prototypen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3849, 'SKR04', 'Anlagevermögen', 148, 143, 'Immaterielle Vermögensgegenstände in Entwicklung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3845, 'SKR04', 'Anlagevermögen', 144, 3844, 'EDV-Software'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3846, 'SKR04', 'Anlagevermögen', 145, 3844, 'Lizenzen und Franchiseverträge'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3847, 'SKR04', 'Anlagevermögen', 146, 3844, 'Konzessionen und gewerbliche Schutzrechte'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3848, 'SKR04', 'Anlagevermögen', 147, 3844, 'Rezepte, Verfahren, Prototypen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3849, 'SKR04', 'Anlagevermögen', 148, 3844, 'Immaterielle Vermögensgegenstände in Entwicklung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3850, 'SKR04', 'Anlagevermögen', 150, 0, 'Geschäfts- oder Firmenwert'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3851, 'SKR04', 'Anlagevermögen', 160, 0, 'Verschmelzungsmehrwert'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3852, 'SKR04', 'Anlagevermögen', 170, 0, 'Geleistete Anzahlungen auf immaterielle Vermögensgegenstände'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3853, 'SKR04', 'Anlagevermögen', 179, 0, 'Anzahlungen auf Geschäfts- oder Firmenwert'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3854, 'SKR04', 'Anlagevermögen', 200, 0, 'Grundstücke, grundstücksgleiche Rechte und Bauten einschließlich der Bauten auf fremden Grundstück'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3855, 'SKR04', 'Anlagevermögen', 210, 200, 'Grundstücksgleiche Rechte ohne Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3856, 'SKR04', 'Anlagevermögen', 215, 200, 'Unbebaute Grundstücke'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3857, 'SKR04', 'Anlagevermögen', 220, 200, 'Grundstücksgleiche Rechte (Erbbaurecht, Dauerwohnrecht, unbebaute Grundstücke)'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3858, 'SKR04', 'Anlagevermögen', 225, 200, 'Grundstücke mit Substanzverkehr'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3859, 'SKR04', 'Anlagevermögen', 229, 200, 'Grundstücksanteil des häuslichen Arbeitszimmers'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3860, 'SKR04', 'Anlagevermögen', 230, 200, 'Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3861, 'SKR04', 'Anlagevermögen', 235, 200, 'Grundstückswerte eigener bebauter Grundstücke'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3862, 'SKR04', 'Anlagevermögen', 240, 200, 'Geschäftsbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3863, 'SKR04', 'Anlagevermögen', 250, 200, 'Fabrikbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3864, 'SKR04', 'Anlagevermögen', 260, 200, 'Andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3865, 'SKR04', 'Anlagevermögen', 270, 200, 'Garagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3866, 'SKR04', 'Anlagevermögen', 280, 200, 'Außenanlagen für Geschäfts-, Fabrik- und andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3867, 'SKR04', 'Anlagevermögen', 285, 200, 'Hof- und Wegbefestigungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3868, 'SKR04', 'Anlagevermögen', 290, 200, 'Einrichtungen für Geschäfts-. Fabrik- und andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3869, 'SKR04', 'Anlagevermögen', 300, 200, 'Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3870, 'SKR04', 'Anlagevermögen', 305, 200, 'Garagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3871, 'SKR04', 'Anlagevermögen', 310, 200, 'Außenanlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3872, 'SKR04', 'Anlagevermögen', 315, 200, 'Hof- und Wegbefestigungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3873, 'SKR04', 'Anlagevermögen', 320, 200, 'Einrichtungen für Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3874, 'SKR04', 'Anlagevermögen', 329, 200, 'Gebäudeteil des häuslichen Arbeitszimmers'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3875, 'SKR04', 'Anlagevermögen', 330, 200, 'Bauten auf fremden Grundstücken'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3876, 'SKR04', 'Anlagevermögen', 340, 200, 'Geschäftsbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3877, 'SKR04', 'Anlagevermögen', 350, 200, 'Fabrikbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3878, 'SKR04', 'Anlagevermögen', 360, 200, 'Wohnbauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3879, 'SKR04', 'Anlagevermögen', 370, 200, 'Andere Bauten'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3880, 'SKR04', 'Anlagevermögen', 380, 200, 'Garagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3881, 'SKR04', 'Anlagevermögen', 390, 200, 'Außenanlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3882, 'SKR04', 'Anlagevermögen', 395, 200, 'Hof- und Wegbefestigungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3883, 'SKR04', 'Anlagevermögen', 398, 200, 'Einrichtungen für Geschäfts-. Fabrik-, Wohn- und andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3855, 'SKR04', 'Anlagevermögen', 210, 3854, Grundstücksgleiche Rechte ohne Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3856, 'SKR04', 'Anlagevermögen', 215, 3854, Unbebaute Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3857, 'SKR04', 'Anlagevermögen', 220, 3854, Grundstücksgleiche Rechte (Erbbaurecht, Dauerwohnrecht, unbebaute Grundstücke)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3858, 'SKR04', 'Anlagevermögen', 225, 3854, Grundstücke mit Substanzverkehr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3859, 'SKR04', 'Anlagevermögen', 229, 3854, Grundstücksanteil des häuslichen Arbeitszimmers'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3860, 'SKR04', 'Anlagevermögen', 230, 3854, Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3861, 'SKR04', 'Anlagevermögen', 235, 3854, Grundstückswerte eigener bebauter Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3862, 'SKR04', 'Anlagevermögen', 240, 3854, Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3863, 'SKR04', 'Anlagevermögen', 250, 3854, Fabrikbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3864, 'SKR04', 'Anlagevermögen', 260, 3854, Andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3865, 'SKR04', 'Anlagevermögen', 270, 3854, Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3866, 'SKR04', 'Anlagevermögen', 280, 3854, Außenanlagen für Geschäfts-, Fabrik- und andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3867, 'SKR04', 'Anlagevermögen', 285, 3854, Hof- und Wegbefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3868, 'SKR04', 'Anlagevermögen', 290, 3854, Einrichtungen für Geschäfts-. Fabrik- und andere Bauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3869, 'SKR04', 'Anlagevermögen', 300, 3854, Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3870, 'SKR04', 'Anlagevermögen', 305, 3854, Garagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3871, 'SKR04', 'Anlagevermögen', 310, 3854, Außenanlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3872, 'SKR04', 'Anlagevermögen', 315, 3854, Hof- und Wegbefestigungen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3873, 'SKR04', 'Anlagevermögen', 320, 3854, Einrichtungen für Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3874, 'SKR04', 'Anlagevermögen', 329, 3854, Gebäudeteil des häuslichen Arbeitszimmers'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3875, 'SKR04', 'Anlagevermögen', 330, 3854, Bauten auf fremden Grundstücken'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3876, 'SKR04', 'Anlagevermögen', 340, 3854, Geschäftsbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3877, 'SKR04', 'Anlagevermögen', 350, 3854, Fabrikbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3878, 'SKR04', 'Anlagevermögen', 360, 3854, Wohnbauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3879, 'SKR04', 'Anlagevermögen', 370, 3854, Andere Bauten'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3880, 'SKR04', 'Anlagevermögen', 380, 3854, Garagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3881, 'SKR04', 'Anlagevermögen', 390, 3854, Außenanlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3882, 'SKR04', 'Anlagevermögen', 395, 3854, Hof- und Wegbefestigungen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3883, 'SKR04', 'Anlagevermögen', 398, 3854, Einrichtungen für Geschäfts-. Fabrik-, Wohn- und andere Bauten'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3884, 'SKR04', 'Anlagevermögen', 400, 0, 'Technische Anlagen und Maschinen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3885, 'SKR04', 'Anlagevermögen', 420, 400, 'Technische Anlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3886, 'SKR04', 'Anlagevermögen', 440, 400, 'Maschinen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3887, 'SKR04', 'Anlagevermögen', 450, 400, 'Transportanlagen und Ähnlichen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3888, 'SKR04', 'Anlagevermögen', 460, 400, 'Maschinengebundene Werkzeuge'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3889, 'SKR04', 'Anlagevermögen', 470, 400, 'Betriebsvorrichtungen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3885, 'SKR04', 'Anlagevermögen', 420, 3884, 'Technische Anlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3886, 'SKR04', 'Anlagevermögen', 440, 3884, 'Maschinen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3887, 'SKR04', 'Anlagevermögen', 450, 3884, 'Transportanlagen und Ähnlichen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3888, 'SKR04', 'Anlagevermögen', 460, 3884, 'Maschinengebundene Werkzeuge'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3889, 'SKR04', 'Anlagevermögen', 470, 3884, 'Betriebsvorrichtungen'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3890, 'SKR04', 'Anlagevermögen', 500, 0, 'Andere Anlagen, Betriebs- und Geschäftsausstattungen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3891, 'SKR04', 'Anlagevermögen', 510, 500, 'Andere Anlagen'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3892, 'SKR04', 'Anlagevermögen', 520, 500, 'PKW'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3893, 'SKR04', 'Anlagevermögen', 540, 500, 'LKW'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3894, 'SKR04', 'Anlagevermögen', 560, 500, 'Sonstige Transportmittel'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3895, 'SKR04', 'Anlagevermögen', 620, 500, 'Werkzeuge'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3896, 'SKR04', 'Anlagevermögen', 630, 500, 'Betriebsausstattung'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3897, 'SKR04', 'Anlagevermögen', 635, 500, 'Geschäftsausstattung'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3898, 'SKR04', 'Anlagevermögen', 640, 500, 'Ladeneinrichtung'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3899, 'SKR04', 'Anlagevermögen', 650, 500, 'Büroeinrichtung'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3900, 'SKR04', 'Anlagevermögen', 660, 500, 'Gerüst- und Schalungsmaterial'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3901, 'SKR04', 'Anlagevermögen', 670, 500, 'Geringwertige Wirtschaftsgüter'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3902, 'SKR04', 'Anlagevermögen', 675, 500, 'Wirtschaftsgüter (Sammelposten)'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3903, 'SKR04', 'Anlagevermögen', 680, 500, 'Einbauten in fremde Grundstücke'); ---INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3904, 'SKR04', 'Anlagevermögen', 690, 500, 'Sonstige Betriebs- und Geschäftsausstattung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3891, 'SKR04', 'Anlagevermögen', 510, 3890, 'Andere Anlagen'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3892, 'SKR04', 'Anlagevermögen', 520, 3890, 'PKW'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3893, 'SKR04', 'Anlagevermögen', 540, 3890, 'LKW'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3894, 'SKR04', 'Anlagevermögen', 560, 3890, 'Sonstige Transportmittel'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3895, 'SKR04', 'Anlagevermögen', 620, 3890, 'Werkzeuge'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3896, 'SKR04', 'Anlagevermögen', 630, 3890, 'Betriebsausstattung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3897, 'SKR04', 'Anlagevermögen', 635, 3890, 'Geschäftsausstattung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3898, 'SKR04', 'Anlagevermögen', 640, 3890, 'Ladeneinrichtung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3899, 'SKR04', 'Anlagevermögen', 650, 3890, 'Büroeinrichtung'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3900, 'SKR04', 'Anlagevermögen', 660, 3890, 'Gerüst- und Schalungsmaterial'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3901, 'SKR04', 'Anlagevermögen', 670, 3890, 'Geringwertige Wirtschaftsgüter'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3902, 'SKR04', 'Anlagevermögen', 675, 3890, 'Wirtschaftsgüter (Sammelposten)'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3903, 'SKR04', 'Anlagevermögen', 680, 3890, 'Einbauten in fremde Grundstücke'); +--INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3904, 'SKR04', 'Anlagevermögen', 690, 3890, 'Sonstige Betriebs- und Geschäftsausstattung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3905, 'SKR04', 'Anlagevermögen', 700, 0, 'Geleistete Anzahlungen und Anlagen im Bau'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3906, 'SKR04', 'Anlagevermögen', 705, 700, 'Anzahlungen auf Grundstücke und grundstücksgleiche Rechte ohne Bauten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3907, 'SKR04', 'Anlagevermögen', 710, 700, 'Geschäfts-, Fabrik- und andere Bauten im Bau auf eigenen Grundstücken'); @@ -4239,6 +4239,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5366, 'SKR04', 'Fremdkapitalkonten', 3865, 3800, 'Umsatzsteuer in Folgeperiode fällig (§§ 13 Abs. 1 Nr. 6, 13b Abs. 2 UStG)'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5367, 'SKR04', 'Fremdkapitalkonten', 3900, 3, 'Passive Rechnungsabgrenzung'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5368, 'SKR04', 'Fremdkapitalkonten', 3950, 3900, 'Abgrenzung unterjährig pauschal gebuchter Abschreibungen für BWA'); + --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5369, 'SKR04', 'Betriebliche Erträge', 4, 4, 'Betriebliche Erträge'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5370, 'SKR04', 'Betriebliche Erträge', 4000, 4, 'Umsatzerlöse'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5371, 'SKR04', 'Betriebliche Erträge', 4001, 4000, '(zur freien Verfügung)'); @@ -5592,6 +5593,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6719, 'SKR04', 'Betriebliche Aufwendungen', 6992, 6, 'Verwaltungskosten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6720, 'SKR04', 'Betriebliche Aufwendungen', 6994, 6, 'Vertriebskosten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6721, 'SKR04', 'Betriebliche Aufwendungen', 6999, 6, 'Gegenkonto 6990-6998'); + --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6722, 'SKR04', 'Weitere Erträge und Aufwendungen', 7, 7, 'Weitere Erträge und Aufwendungen'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6723, 'SKR04', 'Weitere Erträge und Aufwendungen', 7000, 7, 'Erträge aus Beteiligungen'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6724, 'SKR04', 'Weitere Erträge und Aufwendungen', 7004, 7000, 'Erträge aus Beteiligungen an Personengesellschaften (verbundene Unternehmen), § 9 GewStG bzw. § 18 EStG'); @@ -5863,6 +5865,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6990, 'SKR04', 'Weitere Erträge und Aufwendungen', 7898, 7, '(zur freien Verfügung)'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6991, 'SKR04', 'Weitere Erträge und Aufwendungen', 7899, 7, '(zur freien Verfügung)'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6992, 'SKR04', 'Weitere Erträge und Aufwendungen', 7900, 7, '(reserviertes Konto)'); + --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6993, 'SKR04', 'Zur freien Verfügung', 8, 8, 'Zur freien Verfügung'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6994, 'SKR04', 'Zur freien Verfügung', 8000, 8, 'Zur freien Verfügung'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6995, 'SKR04', 'Zur freien Verfügung', 8001, 8, 'Zur freien Verfügung'); @@ -6864,6 +6867,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7991, 'SKR04', 'Zur freien Verfügung', 8997, 8, 'Zur freien Verfügung'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7992, 'SKR04', 'Zur freien Verfügung', 8998, 8, 'Zur freien Verfügung'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7993, 'SKR04', 'Zur freien Verfügung', 8999, 8, 'Zur freien Verfügung'); + --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7994, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 9, 9, 'Vortrags-, Kapital-, Korrektur- und statistische Konten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7995, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 9000, 9, 'Saldenvorträge, Sachkonten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7996, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 9001, 9000, 'Saldenvorträge, Sachkonten'); diff --git a/htdocs/install/mysql/data/llx_accounting_account_dz.sql b/htdocs/install/mysql/data/llx_accounting_account_dz.sql index 0a80cf0f4b4..3895c1ff604 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_dz.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_dz.sql @@ -24,7 +24,7 @@ -- ID 15000 - 15811 -- ADD 1300000 to rowid # Do no remove this comment -- -INSERT IGNORE INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (17000,'NSCF','CAPIT','1',0,'Comptes de capitaux','1'); +INSERT IGNORE INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (15000,'NSCF','CAPIT','1',0,'Comptes de capitaux','1'); INSERT IGNORE INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (15001,'NSCF','CAPIT','10',17000,'Capital, réserves et assimilés','1'); INSERT IGNORE INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (15002,'NSCF','CAPIT','101',15001,'Capital émis','1'); INSERT IGNORE INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (15003,'NSCF','CAPIT','1011',15002,'Capital souscrit, non appelé','1'); diff --git a/htdocs/install/mysql/data/llx_accounting_account_mx.sql b/htdocs/install/mysql/data/llx_accounting_account_mx.sql new file mode 100644 index 00000000000..000a81022c7 --- /dev/null +++ b/htdocs/install/mysql/data/llx_accounting_account_mx.sql @@ -0,0 +1,1085 @@ +-- + +-- Description of chart of account Mexico SAT/24-2019 +-- + +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526100000, 'SAT/24-2019', 'ACTIVO', '100', 0, 'Activo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526100010, 'SAT/24-2019', 'ACTIVO', '100.01', 526100000, 'Activo a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526100990, 'SAT/24-2019', 'ACTIVO', '100.99', 526100010, 'Efectivo y Equivalentes de Efectivo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526101000, 'SAT/24-2019', 'ACTIVO', '101', 526100990, 'Caja', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526101010, 'SAT/24-2019', 'ACTIVO', '101.01', 526101000, 'Caja y efectivo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526102000, 'SAT/24-2019', 'ACTIVO', '102', 526100990, 'Bancos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526102010, 'SAT/24-2019', 'ACTIVO', '102.01', 526102000, 'Bancos nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526102020, 'SAT/24-2019', 'ACTIVO', '102.02', 526102000, 'Bancos extranjeros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526103000, 'SAT/24-2019', 'ACTIVO', '103', 526100990, 'Inversiones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526103010, 'SAT/24-2019', 'ACTIVO', '103.01', 526103000, 'Inversiones temporales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526103020, 'SAT/24-2019', 'ACTIVO', '103.02', 526103000, 'Inversiones en fideicomisos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526103030, 'SAT/24-2019', 'ACTIVO', '103.03', 526103000, 'Otras inversiones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526104000, 'SAT/24-2019', 'ACTIVO', '104', 526100990, 'Otros instrumentos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526104010, 'SAT/24-2019', 'ACTIVO', '104.01', 526104000, 'Otros instrumentos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526105000, 'SAT/24-2019', 'ACTIVO', '105', 526100010, 'Clientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526105010, 'SAT/24-2019', 'ACTIVO', '105.01', 526105000, 'Clientes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526105020, 'SAT/24-2019', 'ACTIVO', '105.02', 526105000, 'Clientes extranjeros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526105030, 'SAT/24-2019', 'ACTIVO', '105.03', 526105000, 'Clientes nacionales parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526105040, 'SAT/24-2019', 'ACTIVO', '105.04', 526105000, 'Clientes extranjeros parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106000, 'SAT/24-2019', 'ACTIVO', '106', 526100010, 'Cuentas y documentos por cobrar a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106010, 'SAT/24-2019', 'ACTIVO', '106.01', 526106000, 'Cuentas y documentos por cobrar a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106020, 'SAT/24-2019', 'ACTIVO', '106.02', 526106000, 'Cuentas y documentos por cobrar a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106030, 'SAT/24-2019', 'ACTIVO', '106.03', 526106000, 'Cuentas y documentos por cobrar a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106040, 'SAT/24-2019', 'ACTIVO', '106.04', 526106000, 'Cuentas y documentos por cobrar a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106050, 'SAT/24-2019', 'ACTIVO', '106.05', 526106000, 'Intereses por cobrar a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106060, 'SAT/24-2019', 'ACTIVO', '106.06', 526106000, 'Intereses por cobrar a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106070, 'SAT/24-2019', 'ACTIVO', '106.07', 526106000, 'Intereses por cobrar a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106080, 'SAT/24-2019', 'ACTIVO', '106.08', 526106000, 'Intereses por cobrar a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106090, 'SAT/24-2019', 'ACTIVO', '106.09', 526106000, 'Otras cuentas y documentos por cobrar a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526106100, 'SAT/24-2019', 'ACTIVO', '106.1', 526106000, 'Otras cuentas y documentos por cobrar a corto plazo parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107000, 'SAT/24-2019', 'ACTIVO', '107', 526100010, 'Deudores diversos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107010, 'SAT/24-2019', 'ACTIVO', '107.01', 526107000, 'Funcionarios y empleados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107020, 'SAT/24-2019', 'ACTIVO', '107.02', 526107000, 'Socios y accionistas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107030, 'SAT/24-2019', 'ACTIVO', '107.03', 526107000, 'Partes relacionadas nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107040, 'SAT/24-2019', 'ACTIVO', '107.04', 526107000, 'Partes relacionadas extranjeros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526107050, 'SAT/24-2019', 'ACTIVO', '107.05', 526107000, 'Otros deudores diversos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526108000, 'SAT/24-2019', 'ACTIVO', '108', 526100010, 'Estimación de cuentas incobrables', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526108010, 'SAT/24-2019', 'ACTIVO', '108.01', 526108000, 'Estimación de cuentas incobrables nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526108020, 'SAT/24-2019', 'ACTIVO', '108.02', 526108000, 'Estimación de cuentas incobrables extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526108030, 'SAT/24-2019', 'ACTIVO', '108.03', 526108000, 'Estimación de cuentas incobrables nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526108040, 'SAT/24-2019', 'ACTIVO', '108.04', 526108000, 'Estimación de cuentas incobrables extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109000, 'SAT/24-2019', 'ACTIVO', '109', 526100990, 'Pagos anticipados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109010, 'SAT/24-2019', 'ACTIVO', '109.01', 526109000, 'Seguros y fianzas pagados por anticipado nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109020, 'SAT/24-2019', 'ACTIVO', '109.02', 526109000, 'Seguros y fianzas pagados por anticipado extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109030, 'SAT/24-2019', 'ACTIVO', '109.03', 526109000, 'Seguros y fianzas pagados por anticipado nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109040, 'SAT/24-2019', 'ACTIVO', '109.04', 526109000, 'Seguros y fianzas pagados por anticipado extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109050, 'SAT/24-2019', 'ACTIVO', '109.05', 526109000, 'Rentas pagados por anticipado nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109060, 'SAT/24-2019', 'ACTIVO', '109.06', 526109000, 'Rentas pagados por anticipado extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109070, 'SAT/24-2019', 'ACTIVO', '109.07', 526109000, 'Rentas pagados por anticipado nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109080, 'SAT/24-2019', 'ACTIVO', '109.08', 526109000, 'Rentas pagados por anticipado extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109090, 'SAT/24-2019', 'ACTIVO', '109.09', 526109000, 'Intereses pagados por anticipado nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109100, 'SAT/24-2019', 'ACTIVO', '109.1', 526109000, 'Intereses pagados por anticipado extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109110, 'SAT/24-2019', 'ACTIVO', '109.11', 526109000, 'Intereses pagados por anticipado nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109120, 'SAT/24-2019', 'ACTIVO', '109.12', 526109000, 'Intereses pagados por anticipado extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109130, 'SAT/24-2019', 'ACTIVO', '109.13', 526109000, 'Factoraje financiero pagados por anticipado nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109140, 'SAT/24-2019', 'ACTIVO', '109.14', 526109000, 'Factoraje financiero pagados por anticipado extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109150, 'SAT/24-2019', 'ACTIVO', '109.15', 526109000, 'Factoraje financiero pagados por anticipado nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109160, 'SAT/24-2019', 'ACTIVO', '109.16', 526109000, 'Factoraje financiero pagados por anticipado extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109170, 'SAT/24-2019', 'ACTIVO', '109.17', 526109000, 'Arrendamiento financiero pagados por anticipado nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109180, 'SAT/24-2019', 'ACTIVO', '109.18', 526109000, 'Arrendamiento financiero pagados por anticipado extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109190, 'SAT/24-2019', 'ACTIVO', '109.19', 526109000, 'Arrendamiento financiero pagados por anticipado nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109200, 'SAT/24-2019', 'ACTIVO', '109.2', 526109000, 'Arrendamiento financiero pagados por anticipado extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109210, 'SAT/24-2019', 'ACTIVO', '109.21', 526109000, 'Pérdida por deterioro de pagos anticipados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109220, 'SAT/24-2019', 'ACTIVO', '109.22', 526109000, 'Derechos fiduciarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526109230, 'SAT/24-2019', 'ACTIVO', '109.23', 526109000, 'Otros pagos anticipados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526110000, 'SAT/24-2019', 'ACTIVO', '110', 526100010, 'Subsidio al empleo por aplicar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526110010, 'SAT/24-2019', 'ACTIVO', '110.01', 526110000, 'Subsidio al empleo por aplicar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526111000, 'SAT/24-2019', 'ACTIVO', '111', 526100010, 'Crédito al diésel por acreditar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526111010, 'SAT/24-2019', 'ACTIVO', '111.01', 526111000, 'Crédito al diésel por acreditar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526112000, 'SAT/24-2019', 'ACTIVO', '112', 526100010, 'Otros estímulos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526112010, 'SAT/24-2019', 'ACTIVO', '112.01', 526112000, 'Otros estímulos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113000, 'SAT/24-2019', 'ACTIVO', '113', 526100010, 'Impuestos a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113010, 'SAT/24-2019', 'ACTIVO', '113.01', 526113000, 'IVA a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113020, 'SAT/24-2019', 'ACTIVO', '113.02', 526113000, 'ISR a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113030, 'SAT/24-2019', 'ACTIVO', '113.03', 526113000, 'IETU a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113040, 'SAT/24-2019', 'ACTIVO', '113.04', 526113000, 'IDE a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113050, 'SAT/24-2019', 'ACTIVO', '113.05', 526113000, 'IA a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113060, 'SAT/24-2019', 'ACTIVO', '113.06', 526113000, 'Subsidio al empleo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113070, 'SAT/24-2019', 'ACTIVO', '113.07', 526113000, 'Pago de lo indebido', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526113080, 'SAT/24-2019', 'ACTIVO', '113.08', 526113000, 'Otros impuestos a favor', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526114000, 'SAT/24-2019', 'ACTIVO', '114', 526100010, 'Pagos provisionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526114010, 'SAT/24-2019', 'ACTIVO', '114.01', 526114000, 'Pagos provisionales de ISR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115000, 'SAT/24-2019', 'ACTIVO', '115', 526100010, 'Inventario', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115010, 'SAT/24-2019', 'ACTIVO', '115.01', 526115000, 'Inventario', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115020, 'SAT/24-2019', 'ACTIVO', '115.02', 526115000, 'Materia prima y materiales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115030, 'SAT/24-2019', 'ACTIVO', '115.03', 526115000, 'Producción en proceso', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115040, 'SAT/24-2019', 'ACTIVO', '115.04', 526115000, 'Productos terminados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115050, 'SAT/24-2019', 'ACTIVO', '115.05', 526115000, 'Mercancías en tránsito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115060, 'SAT/24-2019', 'ACTIVO', '115.06', 526115000, 'Mercancías en poder de terceros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526115070, 'SAT/24-2019', 'ACTIVO', '115.07', 526115000, 'Otros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526116000, 'SAT/24-2019', 'ACTIVO', '116', 526100010, 'Estimación de inventarios obsoletos y de lento movimiento', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526116010, 'SAT/24-2019', 'ACTIVO', '116.01', 526116000, 'Estimación de inventarios obsoletos y de lento movimiento', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526117000, 'SAT/24-2019', 'ACTIVO', '117', 526100010, 'Obras en proceso de inmuebles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526117010, 'SAT/24-2019', 'ACTIVO', '117.01', 526117000, 'Obras en proceso de inmuebles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526118000, 'SAT/24-2019', 'ACTIVO', '118', 526100010, 'Impuestos acreditables pagados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526118010, 'SAT/24-2019', 'ACTIVO', '118.01', 526118000, 'IVA acreditable pagado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526118020, 'SAT/24-2019', 'ACTIVO', '118.02', 526118000, 'IVA acreditable de importación pagado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526118030, 'SAT/24-2019', 'ACTIVO', '118.03', 526118000, 'IEPS acreditable pagado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526118040, 'SAT/24-2019', 'ACTIVO', '118.04', 526118000, 'IEPS pagado en importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526119000, 'SAT/24-2019', 'ACTIVO', '119', 526100010, 'Impuestos acreditables por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526119010, 'SAT/24-2019', 'ACTIVO', '119.01', 526119000, 'IVA pendiente de pago', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526119020, 'SAT/24-2019', 'ACTIVO', '119.02', 526119000, 'IVA de importación pendiente de pago', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526119030, 'SAT/24-2019', 'ACTIVO', '119.03', 526119000, 'IEPS pendiente de pago', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526119040, 'SAT/24-2019', 'ACTIVO', '119.04', 526119000, 'IEPS pendiente de pago en importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526120000, 'SAT/24-2019', 'ACTIVO', '120', 526100010, 'Anticipo a proveedores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526120010, 'SAT/24-2019', 'ACTIVO', '120.01', 526120000, 'Anticipo a proveedores nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526120020, 'SAT/24-2019', 'ACTIVO', '120.02', 526120000, 'Anticipo a proveedores extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526120030, 'SAT/24-2019', 'ACTIVO', '120.03', 526120000, 'Anticipo a proveedores nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526120040, 'SAT/24-2019', 'ACTIVO', '120.04', 526120000, 'Anticipo a proveedores extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526121000, 'SAT/24-2019', 'ACTIVO', '121', 526100010, 'Otros activos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526121010, 'SAT/24-2019', 'ACTIVO', '121.01', 526121000, 'Otros activos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526100020, 'SAT/24-2019', 'ACTIVO', '100.02', 526100000, 'Activo a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526151000, 'SAT/24-2019', 'ACTIVO', '151', 526100020, 'Terrenos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526151010, 'SAT/24-2019', 'ACTIVO', '151.01', 526151000, 'Terrenos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526152600, 'SAT/24-2019', 'ACTIVO', '152', 526100020, 'Edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526152610, 'SAT/24-2019', 'ACTIVO', '152.01', 526152600, 'Edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526153000, 'SAT/24-2019', 'ACTIVO', '153', 526100020, 'Maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526153010, 'SAT/24-2019', 'ACTIVO', '153.01', 526153000, 'Maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526154000, 'SAT/24-2019', 'ACTIVO', '154', 526100020, 'Automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526154010, 'SAT/24-2019', 'ACTIVO', '154.01', 526154000, 'Automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526155000, 'SAT/24-2019', 'ACTIVO', '155', 526100020, 'Mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526155010, 'SAT/24-2019', 'ACTIVO', '155.01', 526155000, 'Mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526156000, 'SAT/24-2019', 'ACTIVO', '156', 526100020, 'Equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526156010, 'SAT/24-2019', 'ACTIVO', '156.01', 526156000, 'Equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526157000, 'SAT/24-2019', 'ACTIVO', '157', 526100020, 'Equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526157010, 'SAT/24-2019', 'ACTIVO', '157.01', 526157000, 'Equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526158000, 'SAT/24-2019', 'ACTIVO', '158', 526100020, 'Activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526158010, 'SAT/24-2019', 'ACTIVO', '158.01', 526158000, 'Activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526159000, 'SAT/24-2019', 'ACTIVO', '159', 526100020, 'Obras en proceso de activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526159010, 'SAT/24-2019', 'ACTIVO', '159.01', 526159000, 'Obras en proceso de activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526160000, 'SAT/24-2019', 'ACTIVO', '160', 526100020, 'Otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526160010, 'SAT/24-2019', 'ACTIVO', '160.01', 526160000, 'Otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526161000, 'SAT/24-2019', 'ACTIVO', '161', 526100020, 'Ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526161010, 'SAT/24-2019', 'ACTIVO', '161.01', 526161000, 'Ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526162000, 'SAT/24-2019', 'ACTIVO', '162', 526100020, 'Embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526162010, 'SAT/24-2019', 'ACTIVO', '162.01', 526162000, 'Embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526163000, 'SAT/24-2019', 'ACTIVO', '163', 526100020, 'Aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526163010, 'SAT/24-2019', 'ACTIVO', '163.01', 526163000, 'Aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526164000, 'SAT/24-2019', 'ACTIVO', '164', 526100020, 'Troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526164010, 'SAT/24-2019', 'ACTIVO', '164.01', 526164000, 'Troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526165000, 'SAT/24-2019', 'ACTIVO', '165', 526100020, 'Equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526165010, 'SAT/24-2019', 'ACTIVO', '165.01', 526165000, 'Equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526166000, 'SAT/24-2019', 'ACTIVO', '166', 526100020, 'Equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526166010, 'SAT/24-2019', 'ACTIVO', '166.01', 526166000, 'Equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526167000, 'SAT/24-2019', 'ACTIVO', '167', 526100020, 'Equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526167010, 'SAT/24-2019', 'ACTIVO', '167.01', 526167000, 'Equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526168000, 'SAT/24-2019', 'ACTIVO', '168', 526100020, 'Maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526168010, 'SAT/24-2019', 'ACTIVO', '168.01', 526168000, 'Maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526169000, 'SAT/24-2019', 'ACTIVO', '169', 526100020, 'Otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526169010, 'SAT/24-2019', 'ACTIVO', '169.01', 526169000, 'Otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526170000, 'SAT/24-2019', 'ACTIVO', '170', 526100020, 'Adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526170010, 'SAT/24-2019', 'ACTIVO', '170.01', 526170000, 'Adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171000, 'SAT/24-2019', 'ACTIVO', '171', 526100020, 'Depreciación acumulada de activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171010, 'SAT/24-2019', 'ACTIVO', '171.01', 526171000, 'Depreciación acumulada de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171020, 'SAT/24-2019', 'ACTIVO', '171.02', 526171000, 'Depreciación acumulada de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171030, 'SAT/24-2019', 'ACTIVO', '171.03', 526171000, 'Depreciación acumulada de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171040, 'SAT/24-2019', 'ACTIVO', '171.04', 526171000, 'Depreciación acumulada de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171050, 'SAT/24-2019', 'ACTIVO', '171.05', 526171000, 'Depreciación acumulada de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171060, 'SAT/24-2019', 'ACTIVO', '171.06', 526171000, 'Depreciación acumulada de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171070, 'SAT/24-2019', 'ACTIVO', '171.07', 526171000, 'Depreciación acumulada de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171080, 'SAT/24-2019', 'ACTIVO', '171.08', 526171000, 'Depreciación acumulada de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171090, 'SAT/24-2019', 'ACTIVO', '171.09', 526171000, 'Depreciación acumulada de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171100, 'SAT/24-2019', 'ACTIVO', '171.1', 526171000, 'Depreciación acumulada de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171110, 'SAT/24-2019', 'ACTIVO', '171.11', 526171000, 'Depreciación acumulada de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171120, 'SAT/24-2019', 'ACTIVO', '171.12', 526171000, 'Depreciación acumulada de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171130, 'SAT/24-2019', 'ACTIVO', '171.13', 526171000, 'Depreciación acumulada de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171140, 'SAT/24-2019', 'ACTIVO', '171.14', 526171000, 'Depreciación acumulada de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171150, 'SAT/24-2019', 'ACTIVO', '171.15', 526171000, 'Depreciación acumulada de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171160, 'SAT/24-2019', 'ACTIVO', '171.16', 526171000, 'Depreciación acumulada de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171170, 'SAT/24-2019', 'ACTIVO', '171.17', 526171000, 'Depreciación acumulada de adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526171180, 'SAT/24-2019', 'ACTIVO', '171.18', 526171000, 'Depreciación acumulada de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172000, 'SAT/24-2019', 'ACTIVO', '172', 526100020, 'Pérdida por deterioro acumulado de activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172010, 'SAT/24-2019', 'ACTIVO', '172.01', 526172000, 'Pérdida por deterioro acumulado de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172020, 'SAT/24-2019', 'ACTIVO', '172.02', 526172000, 'Pérdida por deterioro acumulado de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172030, 'SAT/24-2019', 'ACTIVO', '172.03', 526172000, 'Pérdida por deterioro acumulado de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172040, 'SAT/24-2019', 'ACTIVO', '172.04', 526172000, 'Pérdida por deterioro acumulado de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172050, 'SAT/24-2019', 'ACTIVO', '172.05', 526172000, 'Pérdida por deterioro acumulado de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172060, 'SAT/24-2019', 'ACTIVO', '172.06', 526172000, 'Pérdida por deterioro acumulado de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172070, 'SAT/24-2019', 'ACTIVO', '172.07', 526172000, 'Pérdida por deterioro acumulado de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172080, 'SAT/24-2019', 'ACTIVO', '172.08', 526172000, 'Pérdida por deterioro acumulado de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172090, 'SAT/24-2019', 'ACTIVO', '172.09', 526172000, 'Pérdida por deterioro acumulado de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172100, 'SAT/24-2019', 'ACTIVO', '172.1', 526172000, 'Pérdida por deterioro acumulado de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172110, 'SAT/24-2019', 'ACTIVO', '172.11', 526172000, 'Pérdida por deterioro acumulado de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172120, 'SAT/24-2019', 'ACTIVO', '172.12', 526172000, 'Pérdida por deterioro acumulado de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172130, 'SAT/24-2019', 'ACTIVO', '172.13', 526172000, 'Pérdida por deterioro acumulado de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172140, 'SAT/24-2019', 'ACTIVO', '172.14', 526172000, 'Pérdida por deterioro acumulado de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172150, 'SAT/24-2019', 'ACTIVO', '172.15', 526172000, 'Pérdida por deterioro acumulado de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172160, 'SAT/24-2019', 'ACTIVO', '172.16', 526172000, 'Pérdida por deterioro acumulado de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172170, 'SAT/24-2019', 'ACTIVO', '172.17', 526172000, 'Pérdida por deterioro acumulado de adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526172180, 'SAT/24-2019', 'ACTIVO', '172.18', 526172000, 'Pérdida por deterioro acumulado de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526173000, 'SAT/24-2019', 'ACTIVO', '173', 526100020, 'Gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526173010, 'SAT/24-2019', 'ACTIVO', '173.01', 526173000, 'Gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526174000, 'SAT/24-2019', 'ACTIVO', '174', 526100020, 'Gastos pre operativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526174010, 'SAT/24-2019', 'ACTIVO', '174.01', 526174000, 'Gastos pre operativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526175000, 'SAT/24-2019', 'ACTIVO', '175', 526100020, 'Regalías, asistencia técnica y otros gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526175010, 'SAT/24-2019', 'ACTIVO', '175.01', 526175000, 'Regalías, asistencia técnica y otros gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526176000, 'SAT/24-2019', 'ACTIVO', '176', 526100020, 'Activos intangibles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526176010, 'SAT/24-2019', 'ACTIVO', '176.01', 526176000, 'Activos intangibles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526177000, 'SAT/24-2019', 'ACTIVO', '177', 526100020, 'Gastos de organización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526177010, 'SAT/24-2019', 'ACTIVO', '177.01', 526177000, 'Gastos de organización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526178000, 'SAT/24-2019', 'ACTIVO', '178', 526100020, 'Investigación y desarrollo de mercado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526178010, 'SAT/24-2019', 'ACTIVO', '178.01', 526178000, 'Investigación y desarrollo de mercado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526179000, 'SAT/24-2019', 'ACTIVO', '179', 526100020, 'Marcas y patentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526179010, 'SAT/24-2019', 'ACTIVO', '179.01', 526179000, 'Marcas y patentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526180000, 'SAT/24-2019', 'ACTIVO', '180', 526100020, 'Crédito mercantil', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526180010, 'SAT/24-2019', 'ACTIVO', '180.01', 526180000, 'Crédito mercantil', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526181000, 'SAT/24-2019', 'ACTIVO', '181', 526100020, 'Gastos de instalación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526181010, 'SAT/24-2019', 'ACTIVO', '181.01', 526181000, 'Gastos de instalación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526182000, 'SAT/24-2019', 'ACTIVO', '182', 526100020, 'Otros activos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526182010, 'SAT/24-2019', 'ACTIVO', '182.01', 526182000, 'Otros activos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183000, 'SAT/24-2019', 'ACTIVO', '183', 526100020, 'Amortización acumulada de activos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183010, 'SAT/24-2019', 'ACTIVO', '183.01', 526183000, 'Amortización acumulada de gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183020, 'SAT/24-2019', 'ACTIVO', '183.02', 526183000, 'Amortización acumulada de gastos pre operativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183030, 'SAT/24-2019', 'ACTIVO', '183.03', 526183000, 'Amortización acumulada de regalías, asistencia técnica y otros gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183040, 'SAT/24-2019', 'ACTIVO', '183.04', 526183000, 'Amortización acumulada de activos intangibles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183050, 'SAT/24-2019', 'ACTIVO', '183.05', 526183000, 'Amortización acumulada de gastos de organización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183060, 'SAT/24-2019', 'ACTIVO', '183.06', 526183000, 'Amortización acumulada de investigación y desarrollo de mercado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183070, 'SAT/24-2019', 'ACTIVO', '183.07', 526183000, 'Amortización acumulada de marcas y patentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183080, 'SAT/24-2019', 'ACTIVO', '183.08', 526183000, 'Amortización acumulada de crédito mercantil', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183090, 'SAT/24-2019', 'ACTIVO', '183.09', 526183000, 'Amortización acumulada de gastos de instalación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526183100, 'SAT/24-2019', 'ACTIVO', '183.1', 526183000, 'Amortización acumulada de otros activos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526184000, 'SAT/24-2019', 'ACTIVO', '184', 526100020, 'Depósitos en garantía', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526184010, 'SAT/24-2019', 'ACTIVO', '184.01', 526184000, 'Depósitos de fianzas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526184020, 'SAT/24-2019', 'ACTIVO', '184.02', 526184000, 'Depósitos de arrendamiento de bienes inmuebles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526184030, 'SAT/24-2019', 'ACTIVO', '184.03', 526184000, 'Otros depósitos en garantía', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526185000, 'SAT/24-2019', 'ACTIVO', '185', 526100020, 'Impuestos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526185010, 'SAT/24-2019', 'ACTIVO', '185.01', 526185000, 'Impuestos diferidos ISR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186000, 'SAT/24-2019', 'ACTIVO', '186', 526100020, 'Cuentas y documentos por cobrar a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186010, 'SAT/24-2019', 'ACTIVO', '186.01', 526186000, 'Cuentas y documentos por cobrar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186020, 'SAT/24-2019', 'ACTIVO', '186.02', 526186000, 'Cuentas y documentos por cobrar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186030, 'SAT/24-2019', 'ACTIVO', '186.03', 526186000, 'Cuentas y documentos por cobrar a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186040, 'SAT/24-2019', 'ACTIVO', '186.04', 526186000, 'Cuentas y documentos por cobrar a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186050, 'SAT/24-2019', 'ACTIVO', '186.05', 526186000, 'Intereses por cobrar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186060, 'SAT/24-2019', 'ACTIVO', '186.06', 526186000, 'Intereses por cobrar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186070, 'SAT/24-2019', 'ACTIVO', '186.07', 526186000, 'Intereses por cobrar a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186080, 'SAT/24-2019', 'ACTIVO', '186.08', 526186000, 'Intereses por cobrar a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186090, 'SAT/24-2019', 'ACTIVO', '186.09', 526186000, 'Otras cuentas y documentos por cobrar a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526186100, 'SAT/24-2019', 'ACTIVO', '186.1', 526186000, 'Otras cuentas y documentos por cobrar a largo plazo parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526187000, 'SAT/24-2019', 'ACTIVO', '187', 526100020, 'Participación de los trabajadores en las utilidades diferidas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526187010, 'SAT/24-2019', 'ACTIVO', '187.01', 526187000, 'Participación de los trabajadores en las utilidades diferidas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526188000, 'SAT/24-2019', 'ACTIVO', '188', 526100020, 'Inversiones permanentes en acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526188010, 'SAT/24-2019', 'ACTIVO', '188.01', 526188000, 'Inversiones a largo plazo en subsidiarias', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526188020, 'SAT/24-2019', 'ACTIVO', '188.02', 526188000, 'Inversiones a largo plazo en asociadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526188030, 'SAT/24-2019', 'ACTIVO', '188.03', 526188000, 'Otras inversiones permanentes en acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526189000, 'SAT/24-2019', 'ACTIVO', '189', 526100020, 'Estimación por deterioro de inversiones permanentes en acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526189010, 'SAT/24-2019', 'ACTIVO', '189.01', 526189000, 'Estimación por deterioro de inversiones permanentes en acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526190000, 'SAT/24-2019', 'ACTIVO', '190', 526100020, 'Otros instrumentos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526190010, 'SAT/24-2019', 'ACTIVO', '190.01', 526190000, 'Otros instrumentos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526191000, 'SAT/24-2019', 'ACTIVO', '191', 526100020, 'Otros activos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526191010, 'SAT/24-2019', 'ACTIVO', '191.01', 526191000, 'Otros activos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526200000, 'SAT/24-2019', 'PASIVO', '200', 0, 'Pasivo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526200010, 'SAT/24-2019', 'PASIVO', '200.01', 526200000, 'Pasivo a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526201000, 'SAT/24-2019', 'PASIVO', '201', 526200010, 'Proveedores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526201010, 'SAT/24-2019', 'PASIVO', '201.01', 526201000, 'Proveedores nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526201020, 'SAT/24-2019', 'PASIVO', '201.02', 526201000, 'Proveedores extranjeros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526201030, 'SAT/24-2019', 'PASIVO', '201.03', 526201000, 'Proveedores nacionales parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526201040, 'SAT/24-2019', 'PASIVO', '201.04', 526201000, 'Proveedores extranjeros parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202000, 'SAT/24-2019', 'PASIVO', '202', 526200010, 'Cuentas por pagar a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202010, 'SAT/24-2019', 'PASIVO', '202.01', 526202000, 'Documentos por pagar bancario y financiero nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202020, 'SAT/24-2019', 'PASIVO', '202.02', 526202000, 'Documentos por pagar bancario y financiero extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202030, 'SAT/24-2019', 'PASIVO', '202.03', 526202000, 'Documentos y cuentas por pagar a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202040, 'SAT/24-2019', 'PASIVO', '202.04', 526202000, 'Documentos y cuentas por pagar a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202050, 'SAT/24-2019', 'PASIVO', '202.05', 526202000, 'Documentos y cuentas por pagar a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202060, 'SAT/24-2019', 'PASIVO', '202.06', 526202000, 'Documentos y cuentas por pagar a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202070, 'SAT/24-2019', 'PASIVO', '202.07', 526202000, 'Intereses por pagar a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202080, 'SAT/24-2019', 'PASIVO', '202.08', 526202000, 'Intereses por pagar a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202090, 'SAT/24-2019', 'PASIVO', '202.09', 526202000, 'Intereses por pagar a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202100, 'SAT/24-2019', 'PASIVO', '202.1', 526202000, 'Intereses por pagar a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202110, 'SAT/24-2019', 'PASIVO', '202.11', 526202000, 'Dividendo por pagar nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526202120, 'SAT/24-2019', 'PASIVO', '202.12', 526202000, 'Dividendo por pagar extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203000, 'SAT/24-2019', 'PASIVO', '203', 526200010, 'Cobros anticipados a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203010, 'SAT/24-2019', 'PASIVO', '203.01', 526203000, 'Rentas cobradas por anticipado a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203020, 'SAT/24-2019', 'PASIVO', '203.02', 526203000, 'Rentas cobradas por anticipado a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203030, 'SAT/24-2019', 'PASIVO', '203.03', 526203000, 'Rentas cobradas por anticipado a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203040, 'SAT/24-2019', 'PASIVO', '203.04', 526203000, 'Rentas cobradas por anticipado a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203050, 'SAT/24-2019', 'PASIVO', '203.05', 526203000, 'Intereses cobrados por anticipado a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203060, 'SAT/24-2019', 'PASIVO', '203.06', 526203000, 'Intereses cobrados por anticipado a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203070, 'SAT/24-2019', 'PASIVO', '203.07', 526203000, 'Intereses cobrados por anticipado a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203080, 'SAT/24-2019', 'PASIVO', '203.08', 526203000, 'Intereses cobrados por anticipado a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203090, 'SAT/24-2019', 'PASIVO', '203.09', 526203000, 'Factoraje financiero cobrados por anticipado a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203100, 'SAT/24-2019', 'PASIVO', '203.1', 526203000, 'Factoraje financiero cobrados por anticipado a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203110, 'SAT/24-2019', 'PASIVO', '203.11', 526203000, 'Factoraje financiero cobrados por anticipado a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203120, 'SAT/24-2019', 'PASIVO', '203.12', 526203000, 'Factoraje financiero cobrados por anticipado a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203130, 'SAT/24-2019', 'PASIVO', '203.13', 526203000, 'Arrendamiento financiero cobrados por anticipado a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203140, 'SAT/24-2019', 'PASIVO', '203.14', 526203000, 'Arrendamiento financiero cobrados por anticipado a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203150, 'SAT/24-2019', 'PASIVO', '203.15', 526203000, 'Arrendamiento financiero cobrados por anticipado a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203160, 'SAT/24-2019', 'PASIVO', '203.16', 526203000, 'Arrendamiento financiero cobrados por anticipado a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203170, 'SAT/24-2019', 'PASIVO', '203.17', 526203000, 'Derechos fiduciarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526203180, 'SAT/24-2019', 'PASIVO', '203.18', 526203000, 'Otros cobros anticipados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526204000, 'SAT/24-2019', 'PASIVO', '204', 526200010, 'Instrumentos financieros a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526204010, 'SAT/24-2019', 'PASIVO', '204.01', 526204000, 'Instrumentos financieros a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205000, 'SAT/24-2019', 'PASIVO', '205', 526200010, 'Acreedores diversos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205010, 'SAT/24-2019', 'PASIVO', '205.01', 526205000, 'Socios, accionistas o representante legal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205020, 'SAT/24-2019', 'PASIVO', '205.02', 526205000, 'Acreedores diversos a corto plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205030, 'SAT/24-2019', 'PASIVO', '205.03', 526205000, 'Acreedores diversos a corto plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205040, 'SAT/24-2019', 'PASIVO', '205.04', 526205000, 'Acreedores diversos a corto plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205050, 'SAT/24-2019', 'PASIVO', '205.05', 526205000, 'Acreedores diversos a corto plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526205060, 'SAT/24-2019', 'PASIVO', '205.06', 526205000, 'Otros acreedores diversos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206000, 'SAT/24-2019', 'PASIVO', '206', 526200010, 'Anticipo de cliente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206010, 'SAT/24-2019', 'PASIVO', '206.01', 526206000, 'Anticipo de cliente nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206020, 'SAT/24-2019', 'PASIVO', '206.02', 526206000, 'Anticipo de cliente extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206030, 'SAT/24-2019', 'PASIVO', '206.03', 526206000, 'Anticipo de cliente nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206040, 'SAT/24-2019', 'PASIVO', '206.04', 526206000, 'Anticipo de cliente extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526206050, 'SAT/24-2019', 'PASIVO', '206.05', 526206000, 'Otros anticipos de clientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526207000, 'SAT/24-2019', 'PASIVO', '207', 526200010, 'Impuestos trasladados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526207010, 'SAT/24-2019', 'PASIVO', '207.01', 526207000, 'IVA trasladado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526207020, 'SAT/24-2019', 'PASIVO', '207.02', 526207000, 'IEPS trasladado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526208000, 'SAT/24-2019', 'PASIVO', '208', 526200010, 'Impuestos trasladados cobrados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526208010, 'SAT/24-2019', 'PASIVO', '208.01', 526208000, 'IVA trasladado cobrado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526208020, 'SAT/24-2019', 'PASIVO', '208.02', 526208000, 'IEPS trasladado cobrado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526209000, 'SAT/24-2019', 'PASIVO', '209', 526200010, 'Impuestos trasladados no cobrados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526209010, 'SAT/24-2019', 'PASIVO', '209.01', 526209000, 'IVA trasladado no cobrado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526209020, 'SAT/24-2019', 'PASIVO', '209.02', 526209000, 'IEPS trasladado no cobrado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210000, 'SAT/24-2019', 'PASIVO', '210', 526200010, 'Provisión de sueldos y salarios por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210010, 'SAT/24-2019', 'PASIVO', '210.01', 526210000, 'Provisión de sueldos y salarios por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210020, 'SAT/24-2019', 'PASIVO', '210.02', 526210000, 'Provisión de vacaciones por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210030, 'SAT/24-2019', 'PASIVO', '210.03', 526210000, 'Provisión de aguinaldo por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210040, 'SAT/24-2019', 'PASIVO', '210.04', 526210000, 'Provisión de fondo de ahorro por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210050, 'SAT/24-2019', 'PASIVO', '210.05', 526210000, 'Provisión de asimilados a salarios por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210060, 'SAT/24-2019', 'PASIVO', '210.06', 526210000, 'Provisión de anticipos o remanentes por distribuir', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526210070, 'SAT/24-2019', 'PASIVO', '210.07', 526210000, 'Provisión de otros sueldos y salarios por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526211000, 'SAT/24-2019', 'PASIVO', '211', 526200010, 'Provisión de contribuciones de seguridad social por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526211010, 'SAT/24-2019', 'PASIVO', '211.01', 526211000, 'Provisión de IMSS patronal por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526211020, 'SAT/24-2019', 'PASIVO', '211.02', 526211000, 'Provisión de SAR por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526211030, 'SAT/24-2019', 'PASIVO', '211.03', 526211000, 'Provisión de infonavit por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526212000, 'SAT/24-2019', 'PASIVO', '212', 526200010, 'Provisión de impuesto estatal sobre nómina por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526212010, 'SAT/24-2019', 'PASIVO', '212.01', 526212000, 'Provisión de impuesto estatal sobre nómina por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213000, 'SAT/24-2019', 'PASIVO', '213', 526200010, 'Impuestos y derechos por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213010, 'SAT/24-2019', 'PASIVO', '213.01', 526213000, 'IVA por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213020, 'SAT/24-2019', 'PASIVO', '213.02', 526213000, 'IEPS por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213030, 'SAT/24-2019', 'PASIVO', '213.03', 526213000, 'ISR por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213040, 'SAT/24-2019', 'PASIVO', '213.04', 526213000, 'Impuesto estatal sobre nómina por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213050, 'SAT/24-2019', 'PASIVO', '213.05', 526213000, 'Impuesto estatal y municipal por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213060, 'SAT/24-2019', 'PASIVO', '213.06', 526213000, 'Derechos por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526213070, 'SAT/24-2019', 'PASIVO', '213.07', 526213000, 'Otros impuestos por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526214000, 'SAT/24-2019', 'PASIVO', '214', 526200010, 'Dividendos por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526214010, 'SAT/24-2019', 'PASIVO', '214.01', 526214000, 'Dividendos por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526215000, 'SAT/24-2019', 'PASIVO', '215', 526200010, 'PTU por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526215010, 'SAT/24-2019', 'PASIVO', '215.01', 526215000, 'PTU por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526215020, 'SAT/24-2019', 'PASIVO', '215.02', 526215000, 'PTU por pagar de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526215030, 'SAT/24-2019', 'PASIVO', '215.03', 526215000, 'Provisión de PTU por pagar', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216000, 'SAT/24-2019', 'PASIVO', '216', 526200010, 'Impuestos retenidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216010, 'SAT/24-2019', 'PASIVO', '216.01', 526216000, 'Impuestos retenidos de ISR por sueldos y salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216020, 'SAT/24-2019', 'PASIVO', '216.02', 526216000, 'Impuestos retenidos de ISR por asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216030, 'SAT/24-2019', 'PASIVO', '216.03', 526216000, 'Impuestos retenidos de ISR por arrendamiento', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216040, 'SAT/24-2019', 'PASIVO', '216.04', 526216000, 'Impuestos retenidos de ISR por servicios profesionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216050, 'SAT/24-2019', 'PASIVO', '216.05', 526216000, 'Impuestos retenidos de ISR por dividendos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216060, 'SAT/24-2019', 'PASIVO', '216.06', 526216000, 'Impuestos retenidos de ISR por intereses', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216070, 'SAT/24-2019', 'PASIVO', '216.07', 526216000, 'Impuestos retenidos de ISR por pagos al extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216080, 'SAT/24-2019', 'PASIVO', '216.08', 526216000, 'Impuestos retenidos de ISR por venta de acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216090, 'SAT/24-2019', 'PASIVO', '216.09', 526216000, 'Impuestos retenidos de ISR por venta de partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216100, 'SAT/24-2019', 'PASIVO', '216.1', 526216000, 'Impuestos retenidos de IVA', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216110, 'SAT/24-2019', 'PASIVO', '216.11', 526216000, 'Retenciones de IMSS a los trabajadores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526216120, 'SAT/24-2019', 'PASIVO', '216.12', 526216000, 'Otras impuestos retenidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526217000, 'SAT/24-2019', 'PASIVO', '217', 526200010, 'Pagos realizados por cuenta de terceros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526217010, 'SAT/24-2019', 'PASIVO', '217.01', 526217000, 'Pagos realizados por cuenta de terceros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526218000, 'SAT/24-2019', 'PASIVO', '218', 526200010, 'Otros pasivos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526218010, 'SAT/24-2019', 'PASIVO', '218.01', 526218000, 'Otros pasivos a corto plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526200020, 'SAT/24-2019', 'PASIVO', '200.02', 526200000, 'Pasivo a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251000, 'SAT/24-2019', 'PASIVO', '251', 526200020, 'Acreedores diversos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251010, 'SAT/24-2019', 'PASIVO', '251.01', 526251000, 'Socios, accionistas o representante legal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251020, 'SAT/24-2019', 'PASIVO', '251.02', 526251000, 'Acreedores diversos a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251030, 'SAT/24-2019', 'PASIVO', '251.03', 526251000, 'Acreedores diversos a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251040, 'SAT/24-2019', 'PASIVO', '251.04', 526251000, 'Acreedores diversos a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251050, 'SAT/24-2019', 'PASIVO', '251.05', 526251000, 'Acreedores diversos a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526251060, 'SAT/24-2019', 'PASIVO', '251.06', 526251000, 'Otros acreedores diversos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252600, 'SAT/24-2019', 'PASIVO', '252', 526200020, 'Cuentas por pagar a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252610, 'SAT/24-2019', 'PASIVO', '252.01', 526252600, 'Documentos bancarios y financieros por pagar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252620, 'SAT/24-2019', 'PASIVO', '252.02', 526252600, 'Documentos bancarios y financieros por pagar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252630, 'SAT/24-2019', 'PASIVO', '252.03', 526252600, 'Documentos y cuentas por pagar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252640, 'SAT/24-2019', 'PASIVO', '252.04', 526252600, 'Documentos y cuentas por pagar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252650, 'SAT/24-2019', 'PASIVO', '252.05', 526252600, 'Documentos y cuentas por pagar a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252660, 'SAT/24-2019', 'PASIVO', '252.06', 526252600, 'Documentos y cuentas por pagar a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252670, 'SAT/24-2019', 'PASIVO', '252.07', 526252600, 'Hipotecas por pagar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252680, 'SAT/24-2019', 'PASIVO', '252.08', 526252600, 'Hipotecas por pagar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252690, 'SAT/24-2019', 'PASIVO', '252.09', 526252600, 'Hipotecas por pagar a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252100, 'SAT/24-2019', 'PASIVO', '252.1', 526252600, 'Hipotecas por pagar a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252110, 'SAT/24-2019', 'PASIVO', '252.11', 526252600, 'Intereses por pagar a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252120, 'SAT/24-2019', 'PASIVO', '252.12', 526252600, 'Intereses por pagar a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252130, 'SAT/24-2019', 'PASIVO', '252.13', 526252600, 'Intereses por pagar a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252140, 'SAT/24-2019', 'PASIVO', '252.14', 526252600, 'Intereses por pagar a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252150, 'SAT/24-2019', 'PASIVO', '252.15', 526252600, 'Dividendos por pagar nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252160, 'SAT/24-2019', 'PASIVO', '252.16', 526252600, 'Dividendos por pagar extranjeros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526252170, 'SAT/24-2019', 'PASIVO', '252.17', 526252600, 'Otras cuentas y documentos por pagar a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253000, 'SAT/24-2019', 'PASIVO', '253', 526200020, 'Cobros anticipados a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253010, 'SAT/24-2019', 'PASIVO', '253.01', 526253000, 'Rentas cobradas por anticipado a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253020, 'SAT/24-2019', 'PASIVO', '253.02', 526253000, 'Rentas cobradas por anticipado a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253030, 'SAT/24-2019', 'PASIVO', '253.03', 526253000, 'Rentas cobradas por anticipado a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253040, 'SAT/24-2019', 'PASIVO', '253.04', 526253000, 'Rentas cobradas por anticipado a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253050, 'SAT/24-2019', 'PASIVO', '253.05', 526253000, 'Intereses cobrados por anticipado a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253060, 'SAT/24-2019', 'PASIVO', '253.06', 526253000, 'Intereses cobrados por anticipado a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253070, 'SAT/24-2019', 'PASIVO', '253.07', 526253000, 'Intereses cobrados por anticipado a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253080, 'SAT/24-2019', 'PASIVO', '253.08', 526253000, 'Intereses cobrados por anticipado a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253090, 'SAT/24-2019', 'PASIVO', '253.09', 526253000, 'Factoraje financiero cobrados por anticipado a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253100, 'SAT/24-2019', 'PASIVO', '253.1', 526253000, 'Factoraje financiero cobrados por anticipado a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253110, 'SAT/24-2019', 'PASIVO', '253.11', 526253000, 'Factoraje financiero cobrados por anticipado a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253120, 'SAT/24-2019', 'PASIVO', '253.12', 526253000, 'Factoraje financiero cobrados por anticipado a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253130, 'SAT/24-2019', 'PASIVO', '253.13', 526253000, 'Arrendamiento financiero cobrados por anticipado a largo plazo nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253140, 'SAT/24-2019', 'PASIVO', '253.14', 526253000, 'Arrendamiento financiero cobrados por anticipado a largo plazo extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253150, 'SAT/24-2019', 'PASIVO', '253.15', 526253000, 'Arrendamiento financiero cobrados por anticipado a largo plazo nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253160, 'SAT/24-2019', 'PASIVO', '253.16', 526253000, 'Arrendamiento financiero cobrados por anticipado a largo plazo extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253170, 'SAT/24-2019', 'PASIVO', '253.17', 526253000, 'Derechos fiduciarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526253180, 'SAT/24-2019', 'PASIVO', '253.18', 526253000, 'Otros cobros anticipados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526254000, 'SAT/24-2019', 'PASIVO', '254', 526200020, 'Instrumentos financieros a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526254010, 'SAT/24-2019', 'PASIVO', '254.01', 526254000, 'Instrumentos financieros a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526255000, 'SAT/24-2019', 'PASIVO', '255', 526200020, 'Pasivos por beneficios a los empleados a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526255010, 'SAT/24-2019', 'PASIVO', '255.01', 526255000, 'Pasivos por beneficios a los empleados a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526256000, 'SAT/24-2019', 'PASIVO', '256', 526200020, 'Otros pasivos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526256010, 'SAT/24-2019', 'PASIVO', '256.01', 526256000, 'Otros pasivos a largo plazo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526257000, 'SAT/24-2019', 'PASIVO', '257', 526200020, 'Participación de los trabajadores en las utilidades diferida', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526257010, 'SAT/24-2019', 'PASIVO', '257.01', 526257000, 'Participación de los trabajadores en las utilidades diferida', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526258000, 'SAT/24-2019', 'PASIVO', '258', 526200020, 'Obligaciones contraídas de fideicomisos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526258010, 'SAT/24-2019', 'PASIVO', '258.01', 526258000, 'Obligaciones contraídas de fideicomisos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526259000, 'SAT/24-2019', 'PASIVO', '259', 526200020, 'Impuestos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526259010, 'SAT/24-2019', 'PASIVO', '259.01', 526259000, 'ISR diferido', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526259020, 'SAT/24-2019', 'PASIVO', '259.02', 526259000, 'ISR por dividendo diferido', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526259030, 'SAT/24-2019', 'PASIVO', '259.03', 526259000, 'Otros impuestos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526260000, 'SAT/24-2019', 'PASIVO', '260', 526200020, 'Pasivos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526260010, 'SAT/24-2019', 'PASIVO', '260.01', 526260000, 'Pasivos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526300000, 'SAT/24-2019', 'CAPITAL', '300', 0, 'Capital contable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301000, 'SAT/24-2019', 'CAPITAL', '301', 526300000, 'Capital social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301010, 'SAT/24-2019', 'CAPITAL', '301.01', 526301000, 'Capital fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301020, 'SAT/24-2019', 'CAPITAL', '301.02', 526301000, 'Capital variable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301030, 'SAT/24-2019', 'CAPITAL', '301.03', 526301000, 'Aportaciones para futuros aumentos de capital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301040, 'SAT/24-2019', 'CAPITAL', '301.04', 526301000, 'Prima en suscripción de acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526301050, 'SAT/24-2019', 'CAPITAL', '301.05', 526301000, 'Prima en suscripción de partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526302000, 'SAT/24-2019', 'CAPITAL', '302', 526300000, 'Patrimonio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526302010, 'SAT/24-2019', 'CAPITAL', '302.01', 526302000, 'Patrimonio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526302020, 'SAT/24-2019', 'CAPITAL', '302.02', 526302000, 'Aportación patrimonial', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526302030, 'SAT/24-2019', 'CAPITAL', '302.03', 526302000, 'Déficit o remanente del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526303000, 'SAT/24-2019', 'CAPITAL', '303', 526300000, 'Reserva legal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526303010, 'SAT/24-2019', 'CAPITAL', '303.01', 526303000, 'Reserva legal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526304000, 'SAT/24-2019', 'CAPITAL', '304', 526300000, 'Resultado de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526304010, 'SAT/24-2019', 'CAPITAL', '304.01', 526304000, 'Utilidad de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526304020, 'SAT/24-2019', 'CAPITAL', '304.02', 526304000, 'Pérdida de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526304030, 'SAT/24-2019', 'CAPITAL', '304.03', 526304000, 'Resultado integral de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526304040, 'SAT/24-2019', 'CAPITAL', '304.04', 526304000, 'Déficit o remanente de ejercicio anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526305000, 'SAT/24-2019', 'CAPITAL', '305', 526300000, 'Resultado del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526305010, 'SAT/24-2019', 'CAPITAL', '305.01', 526305000, 'Utilidad del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526305020, 'SAT/24-2019', 'CAPITAL', '305.02', 526305000, 'Pérdida del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526305030, 'SAT/24-2019', 'CAPITAL', '305.03', 526305000, 'Resultado integral', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526306000, 'SAT/24-2019', 'CAPITAL', '306', 526300000, 'Otras cuentas de capital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526306010, 'SAT/24-2019', 'CAPITAL', '306.01', 526306000, 'Otras cuentas de capital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526400000, 'SAT/24-2019', 'INGRESOS', '400', 0, 'Ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401000, 'SAT/24-2019', 'INGRESOS', '401', 526400000, 'Ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401010, 'SAT/24-2019', 'INGRESOS', '401.01', 526401000, 'Ventas y/o servicios gravados a la tasa general', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401020, 'SAT/24-2019', 'INGRESOS', '401.02', 526401000, 'Ventas y/o servicios gravados a la tasa general de contado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401030, 'SAT/24-2019', 'INGRESOS', '401.03', 526401000, 'Ventas y/o servicios gravados a la tasa general a crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401040, 'SAT/24-2019', 'INGRESOS', '401.04', 526401000, 'Ventas y/o servicios gravados realizados en zona fronteriza norte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401050, 'SAT/24-2019', 'INGRESOS', '401.05', 526401000, 'Ventas y/o servicios gravados realizados en zona fronteriza norte de contado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401060, 'SAT/24-2019', 'INGRESOS', '401.06', 526401000, 'Ventas y/o servicios gravados realizados en zona fronteriza norte a crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401070, 'SAT/24-2019', 'INGRESOS', '401.07', 526401000, 'Ventas y/o servicios gravados al 0%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401080, 'SAT/24-2019', 'INGRESOS', '401.08', 526401000, 'Ventas y/o servicios gravados al 0% de contado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401090, 'SAT/24-2019', 'INGRESOS', '401.09', 526401000, 'Ventas y/o servicios gravados al 0% a crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401100, 'SAT/24-2019', 'INGRESOS', '401.1', 526401000, 'Ventas y/o servicios exentos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401110, 'SAT/24-2019', 'INGRESOS', '401.11', 526401000, 'Ventas y/o servicios exentos de contado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401120, 'SAT/24-2019', 'INGRESOS', '401.12', 526401000, 'Ventas y/o servicios exentos a crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401130, 'SAT/24-2019', 'INGRESOS', '401.13', 526401000, 'Ventas y/o servicios gravados a la tasa general nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401140, 'SAT/24-2019', 'INGRESOS', '401.14', 526401000, 'Ventas y/o servicios gravados a la tasa general extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401150, 'SAT/24-2019', 'INGRESOS', '401.15', 526401000, 'Ventas y/o servicios gravados al 0% nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401160, 'SAT/24-2019', 'INGRESOS', '401.16', 526401000, 'Ventas y/o servicios gravados al 0% extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401170, 'SAT/24-2019', 'INGRESOS', '401.17', 526401000, 'Ventas y/o servicios exentos nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401180, 'SAT/24-2019', 'INGRESOS', '401.18', 526401000, 'Ventas y/o servicios exentos extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401190, 'SAT/24-2019', 'INGRESOS', '401.19', 526401000, 'Ingresos por servicios administrativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401200, 'SAT/24-2019', 'INGRESOS', '401.2', 526401000, 'Ingresos por servicios administrativos nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401210, 'SAT/24-2019', 'INGRESOS', '401.21', 526401000, 'Ingresos por servicios administrativos extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401220, 'SAT/24-2019', 'INGRESOS', '401.22', 526401000, 'Ingresos por servicios profesionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401230, 'SAT/24-2019', 'INGRESOS', '401.23', 526401000, 'Ingresos por servicios profesionales nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401240, 'SAT/24-2019', 'INGRESOS', '401.24', 526401000, 'Ingresos por servicios profesionales extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401250, 'SAT/24-2019', 'INGRESOS', '401.25', 526401000, 'Ingresos por arrendamiento', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401260, 'SAT/24-2019', 'INGRESOS', '401.26', 526401000, 'Ingresos por arrendamiento nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401270, 'SAT/24-2019', 'INGRESOS', '401.27', 526401000, 'Ingresos por arrendamiento extranjeros partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401280, 'SAT/24-2019', 'INGRESOS', '401.28', 526401000, 'Ingresos por exportación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401290, 'SAT/24-2019', 'INGRESOS', '401.29', 526401000, 'Ingresos por comisiones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401300, 'SAT/24-2019', 'INGRESOS', '401.3', 526401000, 'Ingresos por maquila', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401310, 'SAT/24-2019', 'INGRESOS', '401.31', 526401000, 'Ingresos por coordinados', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401320, 'SAT/24-2019', 'INGRESOS', '401.32', 526401000, 'Ingresos por regalías', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401330, 'SAT/24-2019', 'INGRESOS', '401.33', 526401000, 'Ingresos por asistencia técnica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401340, 'SAT/24-2019', 'INGRESOS', '401.34', 526401000, 'Ingresos por donativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401350, 'SAT/24-2019', 'INGRESOS', '401.35', 526401000, 'Ingresos por intereses (actividad propia)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401360, 'SAT/24-2019', 'INGRESOS', '401.36', 526401000, 'Ingresos de copropiedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401370, 'SAT/24-2019', 'INGRESOS', '401.37', 526401000, 'Ingresos por fideicomisos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401380, 'SAT/24-2019', 'INGRESOS', '401.38', 526401000, 'Ingresos por factoraje financiero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401390, 'SAT/24-2019', 'INGRESOS', '401.39', 526401000, 'Ingresos por arrendamiento financiero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401400, 'SAT/24-2019', 'INGRESOS', '401.4', 526401000, 'Ingresos de extranjeros con establecimiento en el país', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526401410, 'SAT/24-2019', 'INGRESOS', '401.41', 526401000, 'Otros ingresos propios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402000, 'SAT/24-2019', 'INGRESOS', '402', 526400000, 'Devoluciones, descuentos o bonificaciones sobre ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402010, 'SAT/24-2019', 'INGRESOS', '402.01', 526402000, 'Devoluciones, descuentos o bonificaciones sobre ventas y/o servicios a la tasa general', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402020, 'SAT/24-2019', 'INGRESOS', '402.02', 526402000, 'Devoluciones, descuentos o bonificaciones sobre ventas y/o servicios en zona fronteriza norte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402030, 'SAT/24-2019', 'INGRESOS', '402.03', 526402000, 'Devoluciones, descuentos o bonificaciones sobre ventas y/o servicios al 0%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402040, 'SAT/24-2019', 'INGRESOS', '402.04', 526402000, 'Devoluciones, descuentos o bonificaciones sobre ventas y/o servicios exentos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526402050, 'SAT/24-2019', 'INGRESOS', '402.05', 526402000, 'Devoluciones, descuentos o bonificaciones de otros ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403000, 'SAT/24-2019', 'INGRESOS', '403', 526400000, 'Otros ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403010, 'SAT/24-2019', 'INGRESOS', '403.01', 526403000, 'Otros Ingresos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403020, 'SAT/24-2019', 'INGRESOS', '403.02', 526403000, 'Otros ingresos nacionales parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403030, 'SAT/24-2019', 'INGRESOS', '403.03', 526403000, 'Otros ingresos extranjeros parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403040, 'SAT/24-2019', 'INGRESOS', '403.04', 526403000, 'Ingresos por operaciones discontinuas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526403050, 'SAT/24-2019', 'INGRESOS', '403.05', 526403000, 'Ingresos por condonación de adeudo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526500000, 'SAT/24-2019', 'COSTOS', '500', 0, 'Costos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501000, 'SAT/24-2019', 'COSTOS', '501', 526500000, 'Costo de venta y/o servicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501010, 'SAT/24-2019', 'COSTOS', '501.01', 526501000, 'Costo de venta', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501020, 'SAT/24-2019', 'COSTOS', '501.02', 526501000, 'Costo de servicios (Mano de obra)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501030, 'SAT/24-2019', 'COSTOS', '501.03', 526501000, 'Materia prima directa utilizada para la producción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501040, 'SAT/24-2019', 'COSTOS', '501.04', 526501000, 'Materia prima consumida en el proceso productivo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501050, 'SAT/24-2019', 'COSTOS', '501.05', 526501000, 'Mano de obra directa consumida', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501060, 'SAT/24-2019', 'COSTOS', '501.06', 526501000, 'Mano de obra directa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501070, 'SAT/24-2019', 'COSTOS', '501.07', 526501000, 'Cargos indirectos de producción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526501080, 'SAT/24-2019', 'COSTOS', '501.08', 526501000, 'Otros conceptos de costo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526502000, 'SAT/24-2019', 'COSTOS', '502', 526500000, 'Compras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526502010, 'SAT/24-2019', 'COSTOS', '502.01', 526502000, 'Compras nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526502020, 'SAT/24-2019', 'COSTOS', '502.02', 526502000, 'Compras nacionales parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526502030, 'SAT/24-2019', 'COSTOS', '502.03', 526502000, 'Compras de Importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526502040, 'SAT/24-2019', 'COSTOS', '502.04', 526502000, 'Compras de Importación partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526503000, 'SAT/24-2019', 'COSTOS', '503', 526500000, 'Devoluciones, descuentos o bonificaciones sobre compras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526503010, 'SAT/24-2019', 'COSTOS', '503.01', 526503000, 'Devoluciones, descuentos o bonificaciones sobre compras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504000, 'SAT/24-2019', 'COSTOS', '504', 526500000, 'Otras cuentas de costos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504010, 'SAT/24-2019', 'COSTOS', '504.01', 526504000, 'Gastos indirectos de fabricación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504020, 'SAT/24-2019', 'COSTOS', '504.02', 526504000, 'Gastos indirectos de fabricación de partes relacionadas nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504030, 'SAT/24-2019', 'COSTOS', '504.03', 526504000, 'Gastos indirectos de fabricación de partes relacionadas extranjeras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504040, 'SAT/24-2019', 'COSTOS', '504.04', 526504000, 'Otras cuentas de costos incurridos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504050, 'SAT/24-2019', 'COSTOS', '504.05', 526504000, 'Otras cuentas de costos incurridos con partes relacionadas nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504060, 'SAT/24-2019', 'COSTOS', '504.06', 526504000, 'Otras cuentas de costos incurridos con partes relacionadas extranjeras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504070, 'SAT/24-2019', 'COSTOS', '504.07', 526504000, 'Depreciación de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504080, 'SAT/24-2019', 'COSTOS', '504.08', 526504000, 'Depreciación de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504090, 'SAT/24-2019', 'COSTOS', '504.09', 526504000, 'Depreciación de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504100, 'SAT/24-2019', 'COSTOS', '504.1', 526504000, 'Depreciación de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504110, 'SAT/24-2019', 'COSTOS', '504.11', 526504000, 'Depreciación de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504120, 'SAT/24-2019', 'COSTOS', '504.12', 526504000, 'Depreciación de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504130, 'SAT/24-2019', 'COSTOS', '504.13', 526504000, 'Depreciación de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504140, 'SAT/24-2019', 'COSTOS', '504.14', 526504000, 'Depreciación de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504150, 'SAT/24-2019', 'COSTOS', '504.15', 526504000, 'Depreciación de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504160, 'SAT/24-2019', 'COSTOS', '504.16', 526504000, 'Depreciación de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504170, 'SAT/24-2019', 'COSTOS', '504.17', 526504000, 'Depreciación de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504180, 'SAT/24-2019', 'COSTOS', '504.18', 526504000, 'Depreciación de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504190, 'SAT/24-2019', 'COSTOS', '504.19', 526504000, 'Depreciación de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504200, 'SAT/24-2019', 'COSTOS', '504.2', 526504000, 'Depreciación de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504210, 'SAT/24-2019', 'COSTOS', '504.21', 526504000, 'Depreciación de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504220, 'SAT/24-2019', 'COSTOS', '504.22', 526504000, 'Depreciación de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504230, 'SAT/24-2019', 'COSTOS', '504.23', 526504000, 'Depreciación de adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504240, 'SAT/24-2019', 'COSTOS', '504.24', 526504000, 'Depreciación de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526504250, 'SAT/24-2019', 'COSTOS', '504.25', 526504000, 'Otras cuentas de costos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526505000, 'SAT/24-2019', 'COSTOS', '505', 526500000, 'Costo de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526505010, 'SAT/24-2019', 'COSTOS', '505.01', 526505000, 'Costo por venta de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526505020, 'SAT/24-2019', 'COSTOS', '505.02', 526505000, 'Costo por baja de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526600000, 'SAT/24-2019', 'GASTOS', '600', 0, 'Gastos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601000, 'SAT/24-2019', 'GASTOS', '601', 526600000, 'Gastos generales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601010, 'SAT/24-2019', 'GASTOS', '601.01', 526601000, 'Sueldos y salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601020, 'SAT/24-2019', 'GASTOS', '601.02', 526601000, 'Compensaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601030, 'SAT/24-2019', 'GASTOS', '601.03', 526601000, 'Tiempos extras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601040, 'SAT/24-2019', 'GASTOS', '601.04', 526601000, 'Premios de asistencia', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601050, 'SAT/24-2019', 'GASTOS', '601.05', 526601000, 'Premios de puntualidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601060, 'SAT/24-2019', 'GASTOS', '601.06', 526601000, 'Vacaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601070, 'SAT/24-2019', 'GASTOS', '601.07', 526601000, 'Prima vacacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601080, 'SAT/24-2019', 'GASTOS', '601.08', 526601000, 'Prima dominical', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601090, 'SAT/24-2019', 'GASTOS', '601.09', 526601000, 'Días festivos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601100, 'SAT/24-2019', 'GASTOS', '601.1', 526601000, 'Gratificaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601110, 'SAT/24-2019', 'GASTOS', '601.11', 526601000, 'Primas de antigüedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601120, 'SAT/24-2019', 'GASTOS', '601.12', 526601000, 'Aguinaldo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601130, 'SAT/24-2019', 'GASTOS', '601.13', 526601000, 'Indemnizaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601140, 'SAT/24-2019', 'GASTOS', '601.14', 526601000, 'Destajo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601150, 'SAT/24-2019', 'GASTOS', '601.15', 526601000, 'Despensa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601160, 'SAT/24-2019', 'GASTOS', '601.16', 526601000, 'Transporte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601170, 'SAT/24-2019', 'GASTOS', '601.17', 526601000, 'Servicio médico', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601180, 'SAT/24-2019', 'GASTOS', '601.18', 526601000, 'Ayuda en gastos funerarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601190, 'SAT/24-2019', 'GASTOS', '601.19', 526601000, 'Fondo de ahorro', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601200, 'SAT/24-2019', 'GASTOS', '601.2', 526601000, 'Cuotas sindicales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601210, 'SAT/24-2019', 'GASTOS', '601.21', 526601000, 'PTU', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601220, 'SAT/24-2019', 'GASTOS', '601.22', 526601000, 'Estímulo al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601230, 'SAT/24-2019', 'GASTOS', '601.23', 526601000, 'Previsión social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601240, 'SAT/24-2019', 'GASTOS', '601.24', 526601000, 'Aportaciones para el plan de jubilación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601250, 'SAT/24-2019', 'GASTOS', '601.25', 526601000, 'Otras prestaciones al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601260, 'SAT/24-2019', 'GASTOS', '601.26', 526601000, 'Cuotas al IMSS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601270, 'SAT/24-2019', 'GASTOS', '601.27', 526601000, 'Aportaciones al infonavit', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601280, 'SAT/24-2019', 'GASTOS', '601.28', 526601000, 'Aportaciones al SAR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601290, 'SAT/24-2019', 'GASTOS', '601.29', 526601000, 'Impuesto estatal sobre nóminas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601300, 'SAT/24-2019', 'GASTOS', '601.3', 526601000, 'Otras aportaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601310, 'SAT/24-2019', 'GASTOS', '601.31', 526601000, 'Asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601320, 'SAT/24-2019', 'GASTOS', '601.32', 526601000, 'Servicios administrativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601330, 'SAT/24-2019', 'GASTOS', '601.33', 526601000, 'Servicios administrativos partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601340, 'SAT/24-2019', 'GASTOS', '601.34', 526601000, 'Honorarios a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601350, 'SAT/24-2019', 'GASTOS', '601.35', 526601000, 'Honorarios a personas físicas residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601360, 'SAT/24-2019', 'GASTOS', '601.36', 526601000, 'Honorarios a personas físicas residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601370, 'SAT/24-2019', 'GASTOS', '601.37', 526601000, 'Honorarios a personas físicas residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601380, 'SAT/24-2019', 'GASTOS', '601.38', 526601000, 'Honorarios a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601390, 'SAT/24-2019', 'GASTOS', '601.39', 526601000, 'Honorarios a personas morales residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601400, 'SAT/24-2019', 'GASTOS', '601.4', 526601000, 'Honorarios a personas morales residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601410, 'SAT/24-2019', 'GASTOS', '601.41', 526601000, 'Honorarios a personas morales residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601420, 'SAT/24-2019', 'GASTOS', '601.42', 526601000, 'Honorarios aduanales personas físicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601430, 'SAT/24-2019', 'GASTOS', '601.43', 526601000, 'Honorarios aduanales personas morales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601440, 'SAT/24-2019', 'GASTOS', '601.44', 526601000, 'Honorarios al consejo de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601450, 'SAT/24-2019', 'GASTOS', '601.45', 526601000, 'Arrendamiento a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601460, 'SAT/24-2019', 'GASTOS', '601.46', 526601000, 'Arrendamiento a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601470, 'SAT/24-2019', 'GASTOS', '601.47', 526601000, 'Arrendamiento a residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601480, 'SAT/24-2019', 'GASTOS', '601.48', 526601000, 'Combustibles y lubricantes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601490, 'SAT/24-2019', 'GASTOS', '601.49', 526601000, 'Viáticos y gastos de viaje', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601500, 'SAT/24-2019', 'GASTOS', '601.5', 526601000, 'Teléfono, internet', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601510, 'SAT/24-2019', 'GASTOS', '601.51', 526601000, 'Agua', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601526, 'SAT/24-2019', 'GASTOS', '601.52', 526601000, 'Energía eléctrica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601530, 'SAT/24-2019', 'GASTOS', '601.53', 526601000, 'Vigilancia y seguridad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601540, 'SAT/24-2019', 'GASTOS', '601.54', 526601000, 'Limpieza', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601550, 'SAT/24-2019', 'GASTOS', '601.55', 526601000, 'Papelería y artículos de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601560, 'SAT/24-2019', 'GASTOS', '601.56', 526601000, 'Mantenimiento y conservación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601570, 'SAT/24-2019', 'GASTOS', '601.57', 526601000, 'Seguros y fianzas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601580, 'SAT/24-2019', 'GASTOS', '601.58', 526601000, 'Otros impuestos y derechos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601590, 'SAT/24-2019', 'GASTOS', '601.59', 526601000, 'Recargos fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601600, 'SAT/24-2019', 'GASTOS', '601.6', 526601000, 'Cuotas y suscripciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601610, 'SAT/24-2019', 'GASTOS', '601.61', 526601000, 'Propaganda y publicidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601620, 'SAT/24-2019', 'GASTOS', '601.62', 526601000, 'Capacitación al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601630, 'SAT/24-2019', 'GASTOS', '601.63', 526601000, 'Donativos y ayudas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601640, 'SAT/24-2019', 'GASTOS', '601.64', 526601000, 'Asistencia técnica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601650, 'SAT/24-2019', 'GASTOS', '601.65', 526601000, 'Regalías sujetas a otros porcentajes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601660, 'SAT/24-2019', 'GASTOS', '601.66', 526601000, 'Regalías sujetas al 5%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601670, 'SAT/24-2019', 'GASTOS', '601.67', 526601000, 'Regalías sujetas al 10%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601680, 'SAT/24-2019', 'GASTOS', '601.68', 526601000, 'Regalías sujetas al 15%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601690, 'SAT/24-2019', 'GASTOS', '601.69', 526601000, 'Regalías sujetas al 25%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601700, 'SAT/24-2019', 'GASTOS', '601.7', 526601000, 'Regalías sujetas al 30%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601710, 'SAT/24-2019', 'GASTOS', '601.71', 526601000, 'Regalías sin retención', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601720, 'SAT/24-2019', 'GASTOS', '601.72', 526601000, 'Fletes y acarreos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601730, 'SAT/24-2019', 'GASTOS', '601.73', 526601000, 'Gastos de importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601740, 'SAT/24-2019', 'GASTOS', '601.74', 526601000, 'Comisiones sobre ventas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601750, 'SAT/24-2019', 'GASTOS', '601.75', 526601000, 'Comisiones por tarjetas de crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601760, 'SAT/24-2019', 'GASTOS', '601.76', 526601000, 'Patentes y marcas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601770, 'SAT/24-2019', 'GASTOS', '601.77', 526601000, 'Uniformes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601780, 'SAT/24-2019', 'GASTOS', '601.78', 526601000, 'Prediales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601790, 'SAT/24-2019', 'GASTOS', '601.79', 526601000, 'Gastos generales de urbanización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601800, 'SAT/24-2019', 'GASTOS', '601.8', 526601000, 'Gastos generales de construcción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601810, 'SAT/24-2019', 'GASTOS', '601.81', 526601000, 'Fletes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601820, 'SAT/24-2019', 'GASTOS', '601.82', 526601000, 'Recolección de bienes del sector agropecuario y/o ganadero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601830, 'SAT/24-2019', 'GASTOS', '601.83', 526601000, 'Gastos no deducibles (sin requisitos fiscales)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526601840, 'SAT/24-2019', 'GASTOS', '601.84', 526601000, 'Otros gastos generales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602000, 'SAT/24-2019', 'GASTOS', '602', 526600000, 'Gastos de venta', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602010, 'SAT/24-2019', 'GASTOS', '602.01', 526602000, 'Sueldos y salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602020, 'SAT/24-2019', 'GASTOS', '602.02', 526602000, 'Compensaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602030, 'SAT/24-2019', 'GASTOS', '602.03', 526602000, 'Tiempos extras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602040, 'SAT/24-2019', 'GASTOS', '602.04', 526602000, 'Premios de asistencia', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602050, 'SAT/24-2019', 'GASTOS', '602.05', 526602000, 'Premios de puntualidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602060, 'SAT/24-2019', 'GASTOS', '602.06', 526602000, 'Vacaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602070, 'SAT/24-2019', 'GASTOS', '602.07', 526602000, 'Prima vacacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602080, 'SAT/24-2019', 'GASTOS', '602.08', 526602000, 'Prima dominical', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602090, 'SAT/24-2019', 'GASTOS', '602.09', 526602000, 'Días festivos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602100, 'SAT/24-2019', 'GASTOS', '602.1', 526602000, 'Gratificaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602110, 'SAT/24-2019', 'GASTOS', '602.11', 526602000, 'Primas de antigüedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602120, 'SAT/24-2019', 'GASTOS', '602.12', 526602000, 'Aguinaldo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602130, 'SAT/24-2019', 'GASTOS', '602.13', 526602000, 'Indemnizaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602140, 'SAT/24-2019', 'GASTOS', '602.14', 526602000, 'Destajo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602150, 'SAT/24-2019', 'GASTOS', '602.15', 526602000, 'Despensa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602160, 'SAT/24-2019', 'GASTOS', '602.16', 526602000, 'Transporte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602170, 'SAT/24-2019', 'GASTOS', '602.17', 526602000, 'Servicio médico', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602180, 'SAT/24-2019', 'GASTOS', '602.18', 526602000, 'Ayuda en gastos funerarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602190, 'SAT/24-2019', 'GASTOS', '602.19', 526602000, 'Fondo de ahorro', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602200, 'SAT/24-2019', 'GASTOS', '602.2', 526602000, 'Cuotas sindicales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602210, 'SAT/24-2019', 'GASTOS', '602.21', 526602000, 'PTU', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602220, 'SAT/24-2019', 'GASTOS', '602.22', 526602000, 'Estímulo al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602230, 'SAT/24-2019', 'GASTOS', '602.23', 526602000, 'Previsión social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602240, 'SAT/24-2019', 'GASTOS', '602.24', 526602000, 'Aportaciones para el plan de jubilación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602250, 'SAT/24-2019', 'GASTOS', '602.25', 526602000, 'Otras prestaciones al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602260, 'SAT/24-2019', 'GASTOS', '602.26', 526602000, 'Cuotas al IMSS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602270, 'SAT/24-2019', 'GASTOS', '602.27', 526602000, 'Aportaciones al infonavit', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602280, 'SAT/24-2019', 'GASTOS', '602.28', 526602000, 'Aportaciones al SAR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602290, 'SAT/24-2019', 'GASTOS', '602.29', 526602000, 'Impuesto estatal sobre nóminas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602300, 'SAT/24-2019', 'GASTOS', '602.3', 526602000, 'Otras aportaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602310, 'SAT/24-2019', 'GASTOS', '602.31', 526602000, 'Asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602320, 'SAT/24-2019', 'GASTOS', '602.32', 526602000, 'Servicios administrativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602330, 'SAT/24-2019', 'GASTOS', '602.33', 526602000, 'Servicios administrativos partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602340, 'SAT/24-2019', 'GASTOS', '602.34', 526602000, 'Honorarios a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602350, 'SAT/24-2019', 'GASTOS', '602.35', 526602000, 'Honorarios a personas físicas residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602360, 'SAT/24-2019', 'GASTOS', '602.36', 526602000, 'Honorarios a personas físicas residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602370, 'SAT/24-2019', 'GASTOS', '602.37', 526602000, 'Honorarios a personas físicas residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602380, 'SAT/24-2019', 'GASTOS', '602.38', 526602000, 'Honorarios a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602390, 'SAT/24-2019', 'GASTOS', '602.39', 526602000, 'Honorarios a personas morales residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602400, 'SAT/24-2019', 'GASTOS', '602.4', 526602000, 'Honorarios a personas morales residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602410, 'SAT/24-2019', 'GASTOS', '602.41', 526602000, 'Honorarios a personas morales residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602420, 'SAT/24-2019', 'GASTOS', '602.42', 526602000, 'Honorarios aduanales personas físicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602430, 'SAT/24-2019', 'GASTOS', '602.43', 526602000, 'Honorarios aduanales personas morales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602440, 'SAT/24-2019', 'GASTOS', '602.44', 526602000, 'Honorarios al consejo de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602450, 'SAT/24-2019', 'GASTOS', '602.45', 526602000, 'Arrendamiento a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602460, 'SAT/24-2019', 'GASTOS', '602.46', 526602000, 'Arrendamiento a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602470, 'SAT/24-2019', 'GASTOS', '602.47', 526602000, 'Arrendamiento a residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602480, 'SAT/24-2019', 'GASTOS', '602.48', 526602000, 'Combustibles y lubricantes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602490, 'SAT/24-2019', 'GASTOS', '602.49', 526602000, 'Viáticos y gastos de viaje', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602500, 'SAT/24-2019', 'GASTOS', '602.5', 526602000, 'Teléfono, internet', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602510, 'SAT/24-2019', 'GASTOS', '602.51', 526602000, 'Agua', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602526, 'SAT/24-2019', 'GASTOS', '602.52', 526602000, 'Energía eléctrica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602530, 'SAT/24-2019', 'GASTOS', '602.53', 526602000, 'Vigilancia y seguridad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602540, 'SAT/24-2019', 'GASTOS', '602.54', 526602000, 'Limpieza', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602550, 'SAT/24-2019', 'GASTOS', '602.55', 526602000, 'Papelería y artículos de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602560, 'SAT/24-2019', 'GASTOS', '602.56', 526602000, 'Mantenimiento y conservación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602570, 'SAT/24-2019', 'GASTOS', '602.57', 526602000, 'Seguros y fianzas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602580, 'SAT/24-2019', 'GASTOS', '602.58', 526602000, 'Otros impuestos y derechos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602590, 'SAT/24-2019', 'GASTOS', '602.59', 526602000, 'Recargos fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602600, 'SAT/24-2019', 'GASTOS', '602.6', 526602000, 'Cuotas y suscripciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602610, 'SAT/24-2019', 'GASTOS', '602.61', 526602000, 'Propaganda y publicidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602620, 'SAT/24-2019', 'GASTOS', '602.62', 526602000, 'Capacitación al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602630, 'SAT/24-2019', 'GASTOS', '602.63', 526602000, 'Donativos y ayudas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602640, 'SAT/24-2019', 'GASTOS', '602.64', 526602000, 'Asistencia técnica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602650, 'SAT/24-2019', 'GASTOS', '602.65', 526602000, 'Regalías sujetas a otros porcentajes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602660, 'SAT/24-2019', 'GASTOS', '602.66', 526602000, 'Regalías sujetas al 5%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602670, 'SAT/24-2019', 'GASTOS', '602.67', 526602000, 'Regalías sujetas al 10%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602680, 'SAT/24-2019', 'GASTOS', '602.68', 526602000, 'Regalías sujetas al 15%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602690, 'SAT/24-2019', 'GASTOS', '602.69', 526602000, 'Regalías sujetas al 25%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602700, 'SAT/24-2019', 'GASTOS', '602.7', 526602000, 'Regalías sujetas al 30%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602710, 'SAT/24-2019', 'GASTOS', '602.71', 526602000, 'Regalías sin retención', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602720, 'SAT/24-2019', 'GASTOS', '602.72', 526602000, 'Fletes y acarreos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602730, 'SAT/24-2019', 'GASTOS', '602.73', 526602000, 'Gastos de importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602740, 'SAT/24-2019', 'GASTOS', '602.74', 526602000, 'Comisiones sobre ventas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602750, 'SAT/24-2019', 'GASTOS', '602.75', 526602000, 'Comisiones por tarjetas de crédito', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602760, 'SAT/24-2019', 'GASTOS', '602.76', 526602000, 'Patentes y marcas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602770, 'SAT/24-2019', 'GASTOS', '602.77', 526602000, 'Uniformes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602780, 'SAT/24-2019', 'GASTOS', '602.78', 526602000, 'Prediales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602790, 'SAT/24-2019', 'GASTOS', '602.79', 526602000, 'Gastos de venta de urbanización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602800, 'SAT/24-2019', 'GASTOS', '602.8', 526602000, 'Gastos de venta de construcción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602810, 'SAT/24-2019', 'GASTOS', '602.81', 526602000, 'Fletes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602820, 'SAT/24-2019', 'GASTOS', '602.82', 526602000, 'Recolección de bienes del sector agropecuario y/o ganadero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602830, 'SAT/24-2019', 'GASTOS', '602.83', 526602000, 'Gastos no deducibles (sin requisitos fiscales)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526602840, 'SAT/24-2019', 'GASTOS', '602.84', 526602000, 'Otros gastos de venta', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603000, 'SAT/24-2019', 'GASTOS', '603', 526600000, 'Gastos de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603010, 'SAT/24-2019', 'GASTOS', '603.01', 526603000, 'Sueldos y salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603020, 'SAT/24-2019', 'GASTOS', '603.02', 526603000, 'Compensaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603030, 'SAT/24-2019', 'GASTOS', '603.03', 526603000, 'Tiempos extras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603040, 'SAT/24-2019', 'GASTOS', '603.04', 526603000, 'Premios de asistencia', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603050, 'SAT/24-2019', 'GASTOS', '603.05', 526603000, 'Premios de puntualidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603060, 'SAT/24-2019', 'GASTOS', '603.06', 526603000, 'Vacaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603070, 'SAT/24-2019', 'GASTOS', '603.07', 526603000, 'Prima vacacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603080, 'SAT/24-2019', 'GASTOS', '603.08', 526603000, 'Prima dominical', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603090, 'SAT/24-2019', 'GASTOS', '603.09', 526603000, 'Días festivos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603100, 'SAT/24-2019', 'GASTOS', '603.1', 526603000, 'Gratificaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603110, 'SAT/24-2019', 'GASTOS', '603.11', 526603000, 'Primas de antigüedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603120, 'SAT/24-2019', 'GASTOS', '603.12', 526603000, 'Aguinaldo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603130, 'SAT/24-2019', 'GASTOS', '603.13', 526603000, 'Indemnizaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603140, 'SAT/24-2019', 'GASTOS', '603.14', 526603000, 'Destajo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603150, 'SAT/24-2019', 'GASTOS', '603.15', 526603000, 'Despensa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603160, 'SAT/24-2019', 'GASTOS', '603.16', 526603000, 'Transporte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603170, 'SAT/24-2019', 'GASTOS', '603.17', 526603000, 'Servicio médico', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603180, 'SAT/24-2019', 'GASTOS', '603.18', 526603000, 'Ayuda en gastos funerarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603190, 'SAT/24-2019', 'GASTOS', '603.19', 526603000, 'Fondo de ahorro', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603200, 'SAT/24-2019', 'GASTOS', '603.2', 526603000, 'Cuotas sindicales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603210, 'SAT/24-2019', 'GASTOS', '603.21', 526603000, 'PTU', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603220, 'SAT/24-2019', 'GASTOS', '603.22', 526603000, 'Estímulo al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603230, 'SAT/24-2019', 'GASTOS', '603.23', 526603000, 'Previsión social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603240, 'SAT/24-2019', 'GASTOS', '603.24', 526603000, 'Aportaciones para el plan de jubilación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603250, 'SAT/24-2019', 'GASTOS', '603.25', 526603000, 'Otras prestaciones al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603260, 'SAT/24-2019', 'GASTOS', '603.26', 526603000, 'Cuotas al IMSS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603270, 'SAT/24-2019', 'GASTOS', '603.27', 526603000, 'Aportaciones al infonavit', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603280, 'SAT/24-2019', 'GASTOS', '603.28', 526603000, 'Aportaciones al SAR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603290, 'SAT/24-2019', 'GASTOS', '603.29', 526603000, 'Impuesto estatal sobre nóminas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603300, 'SAT/24-2019', 'GASTOS', '603.3', 526603000, 'Otras aportaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603310, 'SAT/24-2019', 'GASTOS', '603.31', 526603000, 'Asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603320, 'SAT/24-2019', 'GASTOS', '603.32', 526603000, 'Servicios administrativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603330, 'SAT/24-2019', 'GASTOS', '603.33', 526603000, 'Servicios administrativos partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603340, 'SAT/24-2019', 'GASTOS', '603.34', 526603000, 'Honorarios a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603350, 'SAT/24-2019', 'GASTOS', '603.35', 526603000, 'Honorarios a personas físicas residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603360, 'SAT/24-2019', 'GASTOS', '603.36', 526603000, 'Honorarios a personas físicas residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603370, 'SAT/24-2019', 'GASTOS', '603.37', 526603000, 'Honorarios a personas físicas residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603380, 'SAT/24-2019', 'GASTOS', '603.38', 526603000, 'Honorarios a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603390, 'SAT/24-2019', 'GASTOS', '603.39', 526603000, 'Honorarios a personas morales residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603400, 'SAT/24-2019', 'GASTOS', '603.4', 526603000, 'Honorarios a personas morales residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603410, 'SAT/24-2019', 'GASTOS', '603.41', 526603000, 'Honorarios a personas morales residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603420, 'SAT/24-2019', 'GASTOS', '603.42', 526603000, 'Honorarios aduanales personas físicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603430, 'SAT/24-2019', 'GASTOS', '603.43', 526603000, 'Honorarios aduanales personas morales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603440, 'SAT/24-2019', 'GASTOS', '603.44', 526603000, 'Honorarios al consejo de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603450, 'SAT/24-2019', 'GASTOS', '603.45', 526603000, 'Arrendamiento a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603460, 'SAT/24-2019', 'GASTOS', '603.46', 526603000, 'Arrendamiento a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603470, 'SAT/24-2019', 'GASTOS', '603.47', 526603000, 'Arrendamiento a residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603480, 'SAT/24-2019', 'GASTOS', '603.48', 526603000, 'Combustibles y lubricantes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603490, 'SAT/24-2019', 'GASTOS', '603.49', 526603000, 'Viáticos y gastos de viaje', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603500, 'SAT/24-2019', 'GASTOS', '603.5', 526603000, 'Teléfono, internet', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603510, 'SAT/24-2019', 'GASTOS', '603.51', 526603000, 'Agua', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603526, 'SAT/24-2019', 'GASTOS', '603.52', 526603000, 'Energía eléctrica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603530, 'SAT/24-2019', 'GASTOS', '603.53', 526603000, 'Vigilancia y seguridad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603540, 'SAT/24-2019', 'GASTOS', '603.54', 526603000, 'Limpieza', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603550, 'SAT/24-2019', 'GASTOS', '603.55', 526603000, 'Papelería y artículos de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603560, 'SAT/24-2019', 'GASTOS', '603.56', 526603000, 'Mantenimiento y conservación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603570, 'SAT/24-2019', 'GASTOS', '603.57', 526603000, 'Seguros y fianzas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603580, 'SAT/24-2019', 'GASTOS', '603.58', 526603000, 'Otros impuestos y derechos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603590, 'SAT/24-2019', 'GASTOS', '603.59', 526603000, 'Recargos fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603600, 'SAT/24-2019', 'GASTOS', '603.6', 526603000, 'Cuotas y suscripciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603610, 'SAT/24-2019', 'GASTOS', '603.61', 526603000, 'Propaganda y publicidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603620, 'SAT/24-2019', 'GASTOS', '603.62', 526603000, 'Capacitación al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603630, 'SAT/24-2019', 'GASTOS', '603.63', 526603000, 'Donativos y ayudas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603640, 'SAT/24-2019', 'GASTOS', '603.64', 526603000, 'Asistencia técnica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603650, 'SAT/24-2019', 'GASTOS', '603.65', 526603000, 'Regalías sujetas a otros porcentajes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603660, 'SAT/24-2019', 'GASTOS', '603.66', 526603000, 'Regalías sujetas al 5%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603670, 'SAT/24-2019', 'GASTOS', '603.67', 526603000, 'Regalías sujetas al 10%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603680, 'SAT/24-2019', 'GASTOS', '603.68', 526603000, 'Regalías sujetas al 15%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603690, 'SAT/24-2019', 'GASTOS', '603.69', 526603000, 'Regalías sujetas al 25%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603700, 'SAT/24-2019', 'GASTOS', '603.7', 526603000, 'Regalías sujetas al 30%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603710, 'SAT/24-2019', 'GASTOS', '603.71', 526603000, 'Regalías sin retención', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603720, 'SAT/24-2019', 'GASTOS', '603.72', 526603000, 'Fletes y acarreos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603730, 'SAT/24-2019', 'GASTOS', '603.73', 526603000, 'Gastos de importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603740, 'SAT/24-2019', 'GASTOS', '603.74', 526603000, 'Patentes y marcas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603750, 'SAT/24-2019', 'GASTOS', '603.75', 526603000, 'Uniformes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603760, 'SAT/24-2019', 'GASTOS', '603.76', 526603000, 'Prediales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603770, 'SAT/24-2019', 'GASTOS', '603.77', 526603000, 'Gastos de administración de urbanización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603780, 'SAT/24-2019', 'GASTOS', '603.78', 526603000, 'Gastos de administración de construcción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603790, 'SAT/24-2019', 'GASTOS', '603.79', 526603000, 'Fletes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603800, 'SAT/24-2019', 'GASTOS', '603.8', 526603000, 'Recolección de bienes del sector agropecuario y/o ganadero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603810, 'SAT/24-2019', 'GASTOS', '603.81', 526603000, 'Gastos no deducibles (sin requisitos fiscales)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526603820, 'SAT/24-2019', 'GASTOS', '603.82', 526603000, 'Otros gastos de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604000, 'SAT/24-2019', 'GASTOS', '604', 526600000, 'Gastos de fabricación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604010, 'SAT/24-2019', 'GASTOS', '604.01', 526604000, 'Sueldos y salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604020, 'SAT/24-2019', 'GASTOS', '604.02', 526604000, 'Compensaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604030, 'SAT/24-2019', 'GASTOS', '604.03', 526604000, 'Tiempos extras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604040, 'SAT/24-2019', 'GASTOS', '604.04', 526604000, 'Premios de asistencia', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604050, 'SAT/24-2019', 'GASTOS', '604.05', 526604000, 'Premios de puntualidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604060, 'SAT/24-2019', 'GASTOS', '604.06', 526604000, 'Vacaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604070, 'SAT/24-2019', 'GASTOS', '604.07', 526604000, 'Prima vacacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604080, 'SAT/24-2019', 'GASTOS', '604.08', 526604000, 'Prima dominical', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604090, 'SAT/24-2019', 'GASTOS', '604.09', 526604000, 'Días festivos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604100, 'SAT/24-2019', 'GASTOS', '604.1', 526604000, 'Gratificaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604110, 'SAT/24-2019', 'GASTOS', '604.11', 526604000, 'Primas de antigüedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604120, 'SAT/24-2019', 'GASTOS', '604.12', 526604000, 'Aguinaldo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604130, 'SAT/24-2019', 'GASTOS', '604.13', 526604000, 'Indemnizaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604140, 'SAT/24-2019', 'GASTOS', '604.14', 526604000, 'Destajo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604150, 'SAT/24-2019', 'GASTOS', '604.15', 526604000, 'Despensa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604160, 'SAT/24-2019', 'GASTOS', '604.16', 526604000, 'Transporte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604170, 'SAT/24-2019', 'GASTOS', '604.17', 526604000, 'Servicio médico', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604180, 'SAT/24-2019', 'GASTOS', '604.18', 526604000, 'Ayuda en gastos funerarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604190, 'SAT/24-2019', 'GASTOS', '604.19', 526604000, 'Fondo de ahorro', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604200, 'SAT/24-2019', 'GASTOS', '604.2', 526604000, 'Cuotas sindicales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604210, 'SAT/24-2019', 'GASTOS', '604.21', 526604000, 'PTU', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604220, 'SAT/24-2019', 'GASTOS', '604.22', 526604000, 'Estímulo al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604230, 'SAT/24-2019', 'GASTOS', '604.23', 526604000, 'Previsión social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604240, 'SAT/24-2019', 'GASTOS', '604.24', 526604000, 'Aportaciones para el plan de jubilación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604250, 'SAT/24-2019', 'GASTOS', '604.25', 526604000, 'Otras prestaciones al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604260, 'SAT/24-2019', 'GASTOS', '604.26', 526604000, 'Cuotas al IMSS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604270, 'SAT/24-2019', 'GASTOS', '604.27', 526604000, 'Aportaciones al infonavit', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604280, 'SAT/24-2019', 'GASTOS', '604.28', 526604000, 'Aportaciones al SAR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604290, 'SAT/24-2019', 'GASTOS', '604.29', 526604000, 'Impuesto estatal sobre nóminas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604300, 'SAT/24-2019', 'GASTOS', '604.3', 526604000, 'Otras aportaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604310, 'SAT/24-2019', 'GASTOS', '604.31', 526604000, 'Asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604320, 'SAT/24-2019', 'GASTOS', '604.32', 526604000, 'Servicios administrativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604330, 'SAT/24-2019', 'GASTOS', '604.33', 526604000, 'Servicios administrativos partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604340, 'SAT/24-2019', 'GASTOS', '604.34', 526604000, 'Honorarios a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604350, 'SAT/24-2019', 'GASTOS', '604.35', 526604000, 'Honorarios a personas físicas residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604360, 'SAT/24-2019', 'GASTOS', '604.36', 526604000, 'Honorarios a personas físicas residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604370, 'SAT/24-2019', 'GASTOS', '604.37', 526604000, 'Honorarios a personas físicas residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604380, 'SAT/24-2019', 'GASTOS', '604.38', 526604000, 'Honorarios a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604390, 'SAT/24-2019', 'GASTOS', '604.39', 526604000, 'Honorarios a personas morales residentes nacionales partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604400, 'SAT/24-2019', 'GASTOS', '604.4', 526604000, 'Honorarios a personas morales residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604410, 'SAT/24-2019', 'GASTOS', '604.41', 526604000, 'Honorarios a personas morales residentes del extranjero partes relacionadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604420, 'SAT/24-2019', 'GASTOS', '604.42', 526604000, 'Honorarios aduanales personas físicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604430, 'SAT/24-2019', 'GASTOS', '604.43', 526604000, 'Honorarios aduanales personas morales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604440, 'SAT/24-2019', 'GASTOS', '604.44', 526604000, 'Honorarios al consejo de administración', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604450, 'SAT/24-2019', 'GASTOS', '604.45', 526604000, 'Arrendamiento a personas físicas residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604460, 'SAT/24-2019', 'GASTOS', '604.46', 526604000, 'Arrendamiento a personas morales residentes nacionales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604470, 'SAT/24-2019', 'GASTOS', '604.47', 526604000, 'Arrendamiento a residentes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604480, 'SAT/24-2019', 'GASTOS', '604.48', 526604000, 'Combustibles y lubricantes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604490, 'SAT/24-2019', 'GASTOS', '604.49', 526604000, 'Viáticos y gastos de viaje', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604500, 'SAT/24-2019', 'GASTOS', '604.5', 526604000, 'Teléfono, internet', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604510, 'SAT/24-2019', 'GASTOS', '604.51', 526604000, 'Agua', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604526, 'SAT/24-2019', 'GASTOS', '604.52', 526604000, 'Energía eléctrica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604530, 'SAT/24-2019', 'GASTOS', '604.53', 526604000, 'Vigilancia y seguridad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604540, 'SAT/24-2019', 'GASTOS', '604.54', 526604000, 'Limpieza', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604550, 'SAT/24-2019', 'GASTOS', '604.55', 526604000, 'Papelería y artículos de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604560, 'SAT/24-2019', 'GASTOS', '604.56', 526604000, 'Mantenimiento y conservación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604570, 'SAT/24-2019', 'GASTOS', '604.57', 526604000, 'Seguros y fianzas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604580, 'SAT/24-2019', 'GASTOS', '604.58', 526604000, 'Otros impuestos y derechos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604590, 'SAT/24-2019', 'GASTOS', '604.59', 526604000, 'Recargos fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604600, 'SAT/24-2019', 'GASTOS', '604.6', 526604000, 'Cuotas y suscripciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604610, 'SAT/24-2019', 'GASTOS', '604.61', 526604000, 'Propaganda y publicidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604620, 'SAT/24-2019', 'GASTOS', '604.62', 526604000, 'Capacitación al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604630, 'SAT/24-2019', 'GASTOS', '604.63', 526604000, 'Donativos y ayudas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604640, 'SAT/24-2019', 'GASTOS', '604.64', 526604000, 'Asistencia técnica', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604650, 'SAT/24-2019', 'GASTOS', '604.65', 526604000, 'Regalías sujetas a otros porcentajes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604660, 'SAT/24-2019', 'GASTOS', '604.66', 526604000, 'Regalías sujetas al 5%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604670, 'SAT/24-2019', 'GASTOS', '604.67', 526604000, 'Regalías sujetas al 10%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604680, 'SAT/24-2019', 'GASTOS', '604.68', 526604000, 'Regalías sujetas al 15%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604690, 'SAT/24-2019', 'GASTOS', '604.69', 526604000, 'Regalías sujetas al 25%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604700, 'SAT/24-2019', 'GASTOS', '604.7', 526604000, 'Regalías sujetas al 30%', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604710, 'SAT/24-2019', 'GASTOS', '604.71', 526604000, 'Regalías sin retención', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604720, 'SAT/24-2019', 'GASTOS', '604.72', 526604000, 'Fletes y acarreos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604730, 'SAT/24-2019', 'GASTOS', '604.73', 526604000, 'Gastos de importación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604740, 'SAT/24-2019', 'GASTOS', '604.74', 526604000, 'Patentes y marcas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604750, 'SAT/24-2019', 'GASTOS', '604.75', 526604000, 'Uniformes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604760, 'SAT/24-2019', 'GASTOS', '604.76', 526604000, 'Prediales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604770, 'SAT/24-2019', 'GASTOS', '604.77', 526604000, 'Gastos de fabricación de urbanización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604780, 'SAT/24-2019', 'GASTOS', '604.78', 526604000, 'Gastos de fabricación de construcción', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604790, 'SAT/24-2019', 'GASTOS', '604.79', 526604000, 'Fletes del extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604800, 'SAT/24-2019', 'GASTOS', '604.8', 526604000, 'Recolección de bienes del sector agropecuario y/o ganadero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604810, 'SAT/24-2019', 'GASTOS', '604.81', 526604000, 'Gastos no deducibles (sin requisitos fiscales)', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526604820, 'SAT/24-2019', 'GASTOS', '604.82', 526604000, 'Otros gastos de fabricación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605000, 'SAT/24-2019', 'GASTOS', '605', 526600000, 'Mano de obra directa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605010, 'SAT/24-2019', 'GASTOS', '605.01', 526605000, 'Mano de obra', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605020, 'SAT/24-2019', 'GASTOS', '605.02', 526605000, 'Sueldos y Salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605030, 'SAT/24-2019', 'GASTOS', '605.03', 526605000, 'Compensaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605040, 'SAT/24-2019', 'GASTOS', '605.04', 526605000, 'Tiempos extras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605050, 'SAT/24-2019', 'GASTOS', '605.05', 526605000, 'Premios de asistencia', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605060, 'SAT/24-2019', 'GASTOS', '605.06', 526605000, 'Premios de puntualidad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605070, 'SAT/24-2019', 'GASTOS', '605.07', 526605000, 'Vacaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605080, 'SAT/24-2019', 'GASTOS', '605.08', 526605000, 'Prima vacacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605090, 'SAT/24-2019', 'GASTOS', '605.09', 526605000, 'Prima dominical', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605100, 'SAT/24-2019', 'GASTOS', '605.1', 526605000, 'Días festivos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605110, 'SAT/24-2019', 'GASTOS', '605.11', 526605000, 'Gratificaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605120, 'SAT/24-2019', 'GASTOS', '605.12', 526605000, 'Primas de antigüedad', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605130, 'SAT/24-2019', 'GASTOS', '605.13', 526605000, 'Aguinaldo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605140, 'SAT/24-2019', 'GASTOS', '605.14', 526605000, 'Indemnizaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605150, 'SAT/24-2019', 'GASTOS', '605.15', 526605000, 'Destajo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605160, 'SAT/24-2019', 'GASTOS', '605.16', 526605000, 'Despensa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605170, 'SAT/24-2019', 'GASTOS', '605.17', 526605000, 'Transporte', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605180, 'SAT/24-2019', 'GASTOS', '605.18', 526605000, 'Servicio médico', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605190, 'SAT/24-2019', 'GASTOS', '605.19', 526605000, 'Ayuda en gastos funerarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605260, 'SAT/24-2019', 'GASTOS', '605.2', 526605000, 'Fondo de ahorro', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605210, 'SAT/24-2019', 'GASTOS', '605.21', 526605000, 'Cuotas sindicales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605220, 'SAT/24-2019', 'GASTOS', '605.22', 526605000, 'PTU', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605230, 'SAT/24-2019', 'GASTOS', '605.23', 526605000, 'Estímulo al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605240, 'SAT/24-2019', 'GASTOS', '605.24', 526605000, 'Previsión social', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605250, 'SAT/24-2019', 'GASTOS', '605.25', 526605000, 'Aportaciones para el plan de jubilación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605265, 'SAT/24-2019', 'GASTOS', '605.26', 526605000, 'Otras prestaciones al personal', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605270, 'SAT/24-2019', 'GASTOS', '605.27', 526605000, 'Asimilados a salarios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605280, 'SAT/24-2019', 'GASTOS', '605.28', 526605000, 'Cuotas al IMSS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605290, 'SAT/24-2019', 'GASTOS', '605.29', 526605000, 'Aportaciones al infonavit', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605300, 'SAT/24-2019', 'GASTOS', '605.3', 526605000, 'Aportaciones al SAR', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526605310, 'SAT/24-2019', 'GASTOS', '605.31', 526605000, 'Otros costos de mano de obra directa', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526606000, 'SAT/24-2019', 'GASTOS', '606', 526600000, 'Facilidades administrativas fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526606010, 'SAT/24-2019', 'GASTOS', '606.01', 526606000, 'Facilidades administrativas fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526607000, 'SAT/24-2019', 'GASTOS', '607', 526600000, 'Participación de los trabajadores en las utilidades', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526607010, 'SAT/24-2019', 'GASTOS', '607.01', 526607000, 'Participación de los trabajadores en las utilidades', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526608000, 'SAT/24-2019', 'GASTOS', '608', 526600000, 'Participación en resultados de subsidiarias', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526608010, 'SAT/24-2019', 'GASTOS', '608.01', 526608000, 'Participación en resultados de subsidiarias', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526609000, 'SAT/24-2019', 'GASTOS', '609', 526600000, 'Participación en resultados de asociadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526609010, 'SAT/24-2019', 'GASTOS', '609.01', 526609000, 'Participación en resultados de asociadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526610000, 'SAT/24-2019', 'GASTOS', '610', 526600000, 'Participación de los trabajadores en las utilidades diferida', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526610010, 'SAT/24-2019', 'GASTOS', '610.01', 526610000, 'Participación de los trabajadores en las utilidades diferida', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526611000, 'SAT/24-2019', 'GASTOS', '611', 526600000, 'Impuesto Sobre la renta', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526611010, 'SAT/24-2019', 'GASTOS', '611.01', 526611000, 'Impuesto Sobre la renta', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526611020, 'SAT/24-2019', 'GASTOS', '611.02', 526611000, 'Impuesto Sobre la renta por remanente distribuible', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526612000, 'SAT/24-2019', 'GASTOS', '612', 526600000, 'Gastos no deducibles para CUFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526612010, 'SAT/24-2019', 'GASTOS', '612.01', 526612000, 'Gastos no deducibles para CUFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613000, 'SAT/24-2019', 'GASTOS', '613', 526600000, 'Depreciación contable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613010, 'SAT/24-2019', 'GASTOS', '613.01', 526613000, 'Depreciación de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613020, 'SAT/24-2019', 'GASTOS', '613.02', 526613000, 'Depreciación de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613030, 'SAT/24-2019', 'GASTOS', '613.03', 526613000, 'Depreciación de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613040, 'SAT/24-2019', 'GASTOS', '613.04', 526613000, 'Depreciación de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613050, 'SAT/24-2019', 'GASTOS', '613.05', 526613000, 'Depreciación de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613060, 'SAT/24-2019', 'GASTOS', '613.06', 526613000, 'Depreciación de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613070, 'SAT/24-2019', 'GASTOS', '613.07', 526613000, 'Depreciación de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613080, 'SAT/24-2019', 'GASTOS', '613.08', 526613000, 'Depreciación de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613090, 'SAT/24-2019', 'GASTOS', '613.09', 526613000, 'Depreciación de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613100, 'SAT/24-2019', 'GASTOS', '613.1', 526613000, 'Depreciación de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613110, 'SAT/24-2019', 'GASTOS', '613.11', 526613000, 'Depreciación de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613120, 'SAT/24-2019', 'GASTOS', '613.12', 526613000, 'Depreciación de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613130, 'SAT/24-2019', 'GASTOS', '613.13', 526613000, 'Depreciación de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613140, 'SAT/24-2019', 'GASTOS', '613.14', 526613000, 'Depreciación de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613150, 'SAT/24-2019', 'GASTOS', '613.15', 526613000, 'Depreciación de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613160, 'SAT/24-2019', 'GASTOS', '613.16', 526613000, 'Depreciación de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613170, 'SAT/24-2019', 'GASTOS', '613.17', 526613000, 'Depreciación de adaptaciones y mejoras', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526613180, 'SAT/24-2019', 'GASTOS', '613.18', 526613000, 'Depreciación de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614000, 'SAT/24-2019', 'GASTOS', '614', 526600000, 'Amortización contable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614010, 'SAT/24-2019', 'GASTOS', '614.01', 526614000, 'Amortización de gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614020, 'SAT/24-2019', 'GASTOS', '614.02', 526614000, 'Amortización de gastos pre operativos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614030, 'SAT/24-2019', 'GASTOS', '614.03', 526614000, 'Amortización de regalías, asistencia técnica y otros gastos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614040, 'SAT/24-2019', 'GASTOS', '614.04', 526614000, 'Amortización de activos intangibles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614050, 'SAT/24-2019', 'GASTOS', '614.05', 526614000, 'Amortización de gastos de organización', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614060, 'SAT/24-2019', 'GASTOS', '614.06', 526614000, 'Amortización de investigación y desarrollo de mercado', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614070, 'SAT/24-2019', 'GASTOS', '614.07', 526614000, 'Amortización de marcas y patentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614080, 'SAT/24-2019', 'GASTOS', '614.08', 526614000, 'Amortización de crédito mercantil', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614090, 'SAT/24-2019', 'GASTOS', '614.09', 526614000, 'Amortización de gastos de instalación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526614100, 'SAT/24-2019', 'GASTOS', '614.1', 526614000, 'Amortización de otros activos diferidos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526700000, 'SAT/24-2019', 'RESULTADOS', '700', 0, 'Resultado integral de financiamiento', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701000, 'SAT/24-2019', 'RESULTADOS', '701', 526700000, 'Gastos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701010, 'SAT/24-2019', 'RESULTADOS', '701.01', 526701000, 'Pérdida cambiaria', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701020, 'SAT/24-2019', 'RESULTADOS', '701.02', 526701000, 'Pérdida cambiaria nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701030, 'SAT/24-2019', 'RESULTADOS', '701.03', 526701000, 'Pérdida cambiaria extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701040, 'SAT/24-2019', 'RESULTADOS', '701.04', 526701000, 'Intereses a cargo bancario nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701050, 'SAT/24-2019', 'RESULTADOS', '701.05', 526701000, 'Intereses a cargo bancario extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701060, 'SAT/24-2019', 'RESULTADOS', '701.06', 526701000, 'Intereses a cargo de personas físicas nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701070, 'SAT/24-2019', 'RESULTADOS', '701.07', 526701000, 'Intereses a cargo de personas físicas extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701080, 'SAT/24-2019', 'RESULTADOS', '701.08', 526701000, 'Intereses a cargo de personas morales nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701090, 'SAT/24-2019', 'RESULTADOS', '701.09', 526701000, 'Intereses a cargo de personas morales extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701100, 'SAT/24-2019', 'RESULTADOS', '701.1', 526701000, 'Comisiones bancarias', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526701110, 'SAT/24-2019', 'RESULTADOS', '701.11', 526701000, 'Otros gastos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702000, 'SAT/24-2019', 'RESULTADOS', '702', 526700000, 'Productos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702010, 'SAT/24-2019', 'RESULTADOS', '702.01', 526702000, 'Utilidad cambiaria', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702020, 'SAT/24-2019', 'RESULTADOS', '702.02', 526702000, 'Utilidad cambiaria nacional parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702030, 'SAT/24-2019', 'RESULTADOS', '702.03', 526702000, 'Utilidad cambiaria extranjero parte relacionada', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702040, 'SAT/24-2019', 'RESULTADOS', '702.04', 526702000, 'Intereses a favor bancarios nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702050, 'SAT/24-2019', 'RESULTADOS', '702.05', 526702000, 'Intereses a favor bancarios extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702060, 'SAT/24-2019', 'RESULTADOS', '702.06', 526702000, 'Intereses a favor de personas físicas nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702070, 'SAT/24-2019', 'RESULTADOS', '702.07', 526702000, 'Intereses a favor de personas físicas extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702080, 'SAT/24-2019', 'RESULTADOS', '702.08', 526702000, 'Intereses a favor de personas morales nacional', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702090, 'SAT/24-2019', 'RESULTADOS', '702.09', 526702000, 'Intereses a favor de personas morales extranjero', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526702100, 'SAT/24-2019', 'RESULTADOS', '702.1', 526702000, 'Otros productos financieros', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703000, 'SAT/24-2019', 'RESULTADOS', '703', 526700000, 'Otros gastos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703010, 'SAT/24-2019', 'RESULTADOS', '703.01', 526703000, 'Pérdida en venta y/o baja de terrenos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703020, 'SAT/24-2019', 'RESULTADOS', '703.02', 526703000, 'Pérdida en venta y/o baja de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703030, 'SAT/24-2019', 'RESULTADOS', '703.03', 526703000, 'Pérdida en venta y/o baja de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703040, 'SAT/24-2019', 'RESULTADOS', '703.04', 526703000, 'Pérdida en venta y/o baja de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703050, 'SAT/24-2019', 'RESULTADOS', '703.05', 526703000, 'Pérdida en venta y/o baja de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703060, 'SAT/24-2019', 'RESULTADOS', '703.06', 526703000, 'Pérdida en venta y/o baja de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703070, 'SAT/24-2019', 'RESULTADOS', '703.07', 526703000, 'Pérdida en venta y/o baja de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703080, 'SAT/24-2019', 'RESULTADOS', '703.08', 526703000, 'Pérdida en venta y/o baja de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703090, 'SAT/24-2019', 'RESULTADOS', '703.09', 526703000, 'Pérdida en venta y/o baja de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703100, 'SAT/24-2019', 'RESULTADOS', '703.1', 526703000, 'Pérdida en venta y/o baja de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703110, 'SAT/24-2019', 'RESULTADOS', '703.11', 526703000, 'Pérdida en venta y/o baja de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703120, 'SAT/24-2019', 'RESULTADOS', '703.12', 526703000, 'Pérdida en venta y/o baja de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703130, 'SAT/24-2019', 'RESULTADOS', '703.13', 526703000, 'Pérdida en venta y/o baja de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703140, 'SAT/24-2019', 'RESULTADOS', '703.14', 526703000, 'Pérdida en venta y/o baja de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703150, 'SAT/24-2019', 'RESULTADOS', '703.15', 526703000, 'Pérdida en venta y/o baja de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703160, 'SAT/24-2019', 'RESULTADOS', '703.16', 526703000, 'Pérdida en venta y/o baja de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703170, 'SAT/24-2019', 'RESULTADOS', '703.17', 526703000, 'Pérdida en venta y/o baja de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703180, 'SAT/24-2019', 'RESULTADOS', '703.18', 526703000, 'Pérdida en venta y/o baja de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703190, 'SAT/24-2019', 'RESULTADOS', '703.19', 526703000, 'Pérdida por enajenación de acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703200, 'SAT/24-2019', 'RESULTADOS', '703.2', 526703000, 'Pérdida por enajenación de partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526703210, 'SAT/24-2019', 'RESULTADOS', '703.21', 526703000, 'Otros gastos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704000, 'SAT/24-2019', 'RESULTADOS', '704', 526700000, 'Otros productos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704010, 'SAT/24-2019', 'RESULTADOS', '704.01', 526704000, 'Ganancia en venta y/o baja de terrenos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704020, 'SAT/24-2019', 'RESULTADOS', '704.02', 526704000, 'Ganancia en venta y/o baja de edificios', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704030, 'SAT/24-2019', 'RESULTADOS', '704.03', 526704000, 'Ganancia en venta y/o baja de maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704040, 'SAT/24-2019', 'RESULTADOS', '704.04', 526704000, 'Ganancia en venta y/o baja de automóviles, autobuses, camiones de carga, tractocamiones, montacargas y remolques', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704050, 'SAT/24-2019', 'RESULTADOS', '704.05', 526704000, 'Ganancia en venta y/o baja de mobiliario y equipo de oficina', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704060, 'SAT/24-2019', 'RESULTADOS', '704.06', 526704000, 'Ganancia en venta y/o baja de equipo de cómputo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704070, 'SAT/24-2019', 'RESULTADOS', '704.07', 526704000, 'Ganancia en venta y/o baja de equipo de comunicación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704080, 'SAT/24-2019', 'RESULTADOS', '704.08', 526704000, 'Ganancia en venta y/o baja de activos biológicos, vegetales y semovientes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704090, 'SAT/24-2019', 'RESULTADOS', '704.09', 526704000, 'Ganancia en venta y/o baja de otros activos fijos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704100, 'SAT/24-2019', 'RESULTADOS', '704.1', 526704000, 'Ganancia en venta y/o baja de ferrocarriles', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704110, 'SAT/24-2019', 'RESULTADOS', '704.11', 526704000, 'Ganancia en venta y/o baja de embarcaciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704120, 'SAT/24-2019', 'RESULTADOS', '704.12', 526704000, 'Ganancia en venta y/o baja de aviones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704130, 'SAT/24-2019', 'RESULTADOS', '704.13', 526704000, 'Ganancia en venta y/o baja de troqueles, moldes, matrices y herramental', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704140, 'SAT/24-2019', 'RESULTADOS', '704.14', 526704000, 'Ganancia en venta y/o baja de equipo de comunicaciones telefónicas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704150, 'SAT/24-2019', 'RESULTADOS', '704.15', 526704000, 'Ganancia en venta y/o baja de equipo de comunicación satelital', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704160, 'SAT/24-2019', 'RESULTADOS', '704.16', 526704000, 'Ganancia en venta y/o baja de equipo de adaptaciones para personas con capacidades diferentes', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704170, 'SAT/24-2019', 'RESULTADOS', '704.17', 526704000, 'Ganancia en venta de maquinaria y equipo de generación de energía de fuentes renovables o de sistemas de cogeneración de electricidad eficiente', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704180, 'SAT/24-2019', 'RESULTADOS', '704.18', 526704000, 'Ganancia en venta y/o baja de otra maquinaria y equipo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704190, 'SAT/24-2019', 'RESULTADOS', '704.19', 526704000, 'Ganancia por enajenación de acciones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704200, 'SAT/24-2019', 'RESULTADOS', '704.2', 526704000, 'Ganancia por enajenación de partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704210, 'SAT/24-2019', 'RESULTADOS', '704.21', 526704000, 'Ingresos por estímulos fiscales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704220, 'SAT/24-2019', 'RESULTADOS', '704.22', 526704000, 'Ingresos por condonación de adeudo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526704230, 'SAT/24-2019', 'RESULTADOS', '704.23', 526704000, 'Otros productos', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526800000, 'SAT/24-2019', 'CTAS DE ORDEN', '800', 0, 'Cuentas de orden', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526801000, 'SAT/24-2019', 'CTAS DE ORDEN', '801', 526800000, 'UFIN del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526801010, 'SAT/24-2019', 'CTAS DE ORDEN', '801.01', 526801000, 'UFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526801020, 'SAT/24-2019', 'CTAS DE ORDEN', '801.02', 526801000, 'Contra cuenta UFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526802000, 'SAT/24-2019', 'CTAS DE ORDEN', '802', 526800000, 'CUFIN del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526802010, 'SAT/24-2019', 'CTAS DE ORDEN', '802.01', 526802000, 'CUFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526802020, 'SAT/24-2019', 'CTAS DE ORDEN', '802.02', 526802000, 'Contra cuenta CUFIN', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526803000, 'SAT/24-2019', 'CTAS DE ORDEN', '803', 526800000, 'CUFIN de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526803010, 'SAT/24-2019', 'CTAS DE ORDEN', '803.01', 526803000, 'CUFIN de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526803020, 'SAT/24-2019', 'CTAS DE ORDEN', '803.02', 526803000, 'Contra cuenta CUFIN de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526804000, 'SAT/24-2019', 'CTAS DE ORDEN', '804', 526800000, 'CUFINRE del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526804010, 'SAT/24-2019', 'CTAS DE ORDEN', '804.01', 526804000, 'CUFINRE', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526804020, 'SAT/24-2019', 'CTAS DE ORDEN', '804.02', 526804000, 'Contra cuenta CUFINRE', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526805000, 'SAT/24-2019', 'CTAS DE ORDEN', '805', 526800000, 'CUFINRE de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526805010, 'SAT/24-2019', 'CTAS DE ORDEN', '805.01', 526805000, 'CUFINRE de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526805020, 'SAT/24-2019', 'CTAS DE ORDEN', '805.02', 526805000, 'Contra cuenta CUFINRE de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526806000, 'SAT/24-2019', 'CTAS DE ORDEN', '806', 526800000, 'CUCA del ejercicio', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526806010, 'SAT/24-2019', 'CTAS DE ORDEN', '806.01', 526806000, 'CUCA', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526806020, 'SAT/24-2019', 'CTAS DE ORDEN', '806.02', 526806000, 'Contra cuenta CUCA', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526807000, 'SAT/24-2019', 'CTAS DE ORDEN', '807', 526800000, 'CUCA de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526807010, 'SAT/24-2019', 'CTAS DE ORDEN', '807.01', 526807000, 'CUCA de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526807020, 'SAT/24-2019', 'CTAS DE ORDEN', '807.02', 526807000, 'Contra cuenta CUCA de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526808000, 'SAT/24-2019', 'CTAS DE ORDEN', '808', 526800000, 'Ajuste anual por inflación acumulable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526808010, 'SAT/24-2019', 'CTAS DE ORDEN', '808.01', 526808000, 'Ajuste anual por inflación acumulable', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526808020, 'SAT/24-2019', 'CTAS DE ORDEN', '808.02', 526808000, 'Acumulación del ajuste anual inflacionario', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526809000, 'SAT/24-2019', 'CTAS DE ORDEN', '809', 526800000, 'Ajuste anual por inflación deducible', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526809010, 'SAT/24-2019', 'CTAS DE ORDEN', '809.01', 526809000, 'Ajuste anual por inflación deducible', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526809020, 'SAT/24-2019', 'CTAS DE ORDEN', '809.02', 526809000, 'Deducción del ajuste anual inflacionario', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526810000, 'SAT/24-2019', 'CTAS DE ORDEN', '810', 526800000, 'Deducción de inversión', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526810010, 'SAT/24-2019', 'CTAS DE ORDEN', '810.01', 526810000, 'Deducción de inversión', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526810020, 'SAT/24-2019', 'CTAS DE ORDEN', '810.02', 526810000, 'Contra cuenta deducción de inversiones', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526811000, 'SAT/24-2019', 'CTAS DE ORDEN', '811', 526800000, 'Utilidad o pérdida fiscal en venta y/o baja de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526811010, 'SAT/24-2019', 'CTAS DE ORDEN', '811.01', 526811000, 'Utilidad o pérdida fiscal en venta y/o baja de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526811020, 'SAT/24-2019', 'CTAS DE ORDEN', '811.02', 526811000, 'Contra cuenta utilidad o pérdida fiscal en venta y/o baja de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526812000, 'SAT/24-2019', 'CTAS DE ORDEN', '812', 526800000, 'Utilidad o pérdida fiscal en venta acciones o partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526812010, 'SAT/24-2019', 'CTAS DE ORDEN', '812.01', 526812000, 'Utilidad o pérdida fiscal en venta acciones o partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526812020, 'SAT/24-2019', 'CTAS DE ORDEN', '812.02', 526812000, 'Contra cuenta utilidad o pérdida fiscal en venta acciones o partes sociales', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526813000, 'SAT/24-2019', 'CTAS DE ORDEN', '813', 526800000, 'Pérdidas fiscales pendientes de amortizar actualizadas de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526813010, 'SAT/24-2019', 'CTAS DE ORDEN', '813.01', 526813000, 'Pérdidas fiscales pendientes de amortizar actualizadas de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526813020, 'SAT/24-2019', 'CTAS DE ORDEN', '813.02', 526813000, 'Actualización de pérdidas fiscales pendientes de amortizar de ejercicios anteriores', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526814000, 'SAT/24-2019', 'CTAS DE ORDEN', '814', 526800000, 'Mercancías recibidas en consignación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526814010, 'SAT/24-2019', 'CTAS DE ORDEN', '814.01', 526814000, 'Mercancías recibidas en consignación', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526814020, 'SAT/24-2019', 'CTAS DE ORDEN', '814.02', 526814000, 'Consignación de mercancías recibidas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526815000, 'SAT/24-2019', 'CTAS DE ORDEN', '815', 526800000, 'Crédito fiscal de IVA e IEPS por la importación de mercancías para empresas certificadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526815010, 'SAT/24-2019', 'CTAS DE ORDEN', '815.01', 526815000, 'Crédito fiscal de IVA e IEPS por la importación de mercancías', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526815020, 'SAT/24-2019', 'CTAS DE ORDEN', '815.02', 526815000, 'Importación de mercancías con aplicación de crédito fiscal de IVA e IEPS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526816000, 'SAT/24-2019', 'CTAS DE ORDEN', '816', 526800000, 'Crédito fiscal de IVA e IEPS por la importación de activos fijos para empresas certificadas', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526816010, 'SAT/24-2019', 'CTAS DE ORDEN', '816.01', 526816000, 'Crédito fiscal de IVA e IEPS por la importación de activo fijo', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526816020, 'SAT/24-2019', 'CTAS DE ORDEN', '816.02', 526816000, 'Importación de activo fijo con aplicación de crédito fiscal de IVA e IEPS', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526899000, 'SAT/24-2019', 'CTAS DE ORDEN', '899', 526800000, 'Otras cuentas de orden', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526899010, 'SAT/24-2019', 'CTAS DE ORDEN', '899.01', 526899000, 'Otras cuentas de orden', 1 ); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 526899020, 'SAT/24-2019', 'CTAS DE ORDEN', '899.02', 526899000, 'Contra cuenta otras cuentas de orden', 1 ); diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index 05e52c85e4b..34cef4c94d4 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -145,4 +145,4 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value 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); - +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ACTION_CREATE','Action added','Executed when an action is added to the agenda','agenda',700); diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql index cb22ee70ce3..47197af644d 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -48,3 +48,8 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) -- Code used from 3.3+ when type of event is not used insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 40,'AC_OTH_AUTO','systemauto','Other (automatically inserted events)',NULL, 1, 20); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 50,'AC_OTH','system','Other (manually inserted events)',NULL, 1, 5); + +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 60,'AC_EO_ONLINECONF','module','Online/Virtual conference','conference@eventorganization', 1, 60); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 61,'AC_EO_INDOORCONF','module','Indoor conference','conference@eventorganization', 1, 61); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 62,'AC_EO_ONLINEBOOTH','module','Online/Virtual booth','booth@eventorganization', 1, 62); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 63,'AC_EO_INDOORBOOTH','module','Indoor booth','booth@eventorganization', 1, 63); diff --git a/htdocs/install/mysql/data/llx_c_availability.sql b/htdocs/install/mysql/data/llx_c_availability.sql index 7d834aa2809..2e06d1de8b3 100644 --- a/htdocs/install/mysql/data/llx_c_availability.sql +++ b/htdocs/install/mysql/data/llx_c_availability.sql @@ -1,4 +1,5 @@ -- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.com> +-- Copyright (C) 2020 Alexandre SPANGARO <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ -- delete from llx_c_availability; -INSERT INTO llx_c_availability (rowid,code,label,active) VALUES (1, 'AV_NOW', 'Immediate', 1); -INSERT INTO llx_c_availability (rowid,code,label,active) VALUES (2, 'AV_1W', '1 week', 1); -INSERT INTO llx_c_availability (rowid,code,label,active) VALUES (3, 'AV_2W', '2 weeks', 1); -INSERT INTO llx_c_availability (rowid,code,label,active) VALUES (4, 'AV_3W', '3 weeks', 1); +INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (1, 'AV_NOW', 'Immediate', 1, 10); +INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (2, 'AV_1W', '1 week', 1, 20); +INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (3, 'AV_2W', '2 weeks', 1, 30); +INSERT INTO llx_c_availability (rowid,code,label,active,position) VALUES (4, 'AV_3W', '3 weeks', 1, 40); diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql index 324223b274d..b728d9c6414 100644 --- a/htdocs/install/mysql/data/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql @@ -33,19 +33,19 @@ -- -- France -- -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 1, 'Allocations familiales', 1,1,'TAXFAM' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 2, 'CSG Deductible', 1,1,'TAXCSGD' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 3, 'CSG/CRDS NON Deductible',0,1,'TAXCSGND' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 10, 'Taxe apprentissage', 0,1,'TAXAPP' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 11, 'Taxe professionnelle', 0,1,'TAXPRO' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 12, 'Cotisation fonciere des entreprises', 0,1,'TAXCFE' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 13, 'Cotisation sur la valeur ajoutee des entreprises', 0,1,'TAXCVAE' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 20, 'Impots locaux/fonciers', 0,1,'TAXFON' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 25, 'Impots revenus', 0,1,'TAXREV' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 30, 'Assurance Sante', 0,1,'TAXSECU' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 40, 'Mutuelle', 0,1,'TAXMUT' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 50, 'Assurance vieillesse', 0,1,'TAXRET' ,'1'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 60, 'Assurance Chomage', 0,1,'TAXCHOM' ,'1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 1, 'Securite sociale (URSSAF / MSA)', 1, 1, 'TAXSECU', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 2, 'Securite sociale des indépendants (URSSAF)', 1, 1, 'TAXSSI', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 10, 'Taxe apprentissage', 1, 1, 'TAXAPP', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 11, 'Formation professionnelle continue', 1, 1, 'TAXFPC', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 12, 'Cotisation fonciere des entreprises (CFE)', 1, 1, 'TAXCFE', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 13, 'Cotisation sur la valeur ajoutee des entreprises (CVAE)', 1, 1, 'TAXCVAE', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 20, 'Taxe fonciere', 1, 1, 'TAXFON', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 25, 'Prelevement à la source (PAS)', 0, 1, 'TAXPAS', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 30, 'Prevoyance', 1, 1,'TAXPREV', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 40, 'Mutuelle', 1, 1,'TAXMUT', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 50, 'Retraite', 1, 1,'TAXRET', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 60, 'Taxe sur vehicule societe (TVS)', 0, 1, 'TAXTVS', '1'); +insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values ( 70, 'impôts sur les sociétés (IS)', 0, 1, 'TAXIS', '1'); -- -- Belgique diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql index 253ace246e7..fabbbf2e700 100644 --- a/htdocs/install/mysql/data/llx_c_email_templates.sql +++ b/htdocs/install/mysql/data/llx_c_email_templates.sql @@ -32,3 +32,9 @@ 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,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); diff --git a/htdocs/install/mysql/data/llx_c_format_cards.sql b/htdocs/install/mysql/data/llx_c_format_cards.sql index 77cdcd6e904..fc249e9d629 100644 --- a/htdocs/install/mysql/data/llx_c_format_cards.sql +++ b/htdocs/install/mysql/data/llx_c_format_cards.sql @@ -25,7 +25,7 @@ INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metr INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (2, '5161', 'Avery-5161, WL-75WX', 'letter', 'P', 'mm', 4.44500000, 12.70000000, 2, 10, 3.96800000, 0.00000000, 101.60000000, 25.40000000, 7, 0.00000000, 0.00000000, 1); INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (3, '5162', 'Avery-5162, WL-100WX', 'letter', 'P', 'mm', 3.87350000, 22.35200000, 2, 7, 4.95400000, 0.00000000, 101.60000000, 33.78100000, 8, 0.00000000, 0.00000000, 1); INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (4, '5163', 'Avery-5163, WL-125WX', 'letter', 'P', 'mm', 4.57200000, 12.70000000, 2, 5, 3.55600000, 0.00000000, 101.60000000, 50.80000000, 10, 0.00000000, 0.00000000, 1); -INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (5, '5164', '5164 (Letter)', 'letter', 'P', 'in', 0.14800000, 0.50000000, 2, 3, 0.20310000, 0.00000000, 4.00000000, 3.33000000, 12, 0.00000000, 0.00000000, 0); +INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (5, '5164', 'Avery-5164 (inch)', 'letter', 'P', 'in', 0.14800000, 0.50000000, 2, 3, 0.20310000, 0.00000000, 4.00000000, 3.33000000, 12, 0.00000000, 0.00000000, 0); INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (6, '8600', 'Avery-8600', 'letter', 'P', 'mm', 7.10000000, 19.00000000, 3, 10, 9.50000000, 3.10000000, 66.60000000, 25.40000000, 7, 0.00000000, 0.00000000, 1); INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (7, '99012', 'DYMO 99012 89*36mm', 'custom', 'L', 'mm', 1.00000000, 1.00000000, 1, 1, 0.00000000, 0.00000000, 36.00000000, 89.00000000, 10, 36.00000000, 89.00000000, 1); INSERT INTO llx_c_format_cards (rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active) VALUES (8, '99014', 'DYMO 99014 101*54mm', 'custom', 'L', 'mm', 1.00000000, 1.00000000, 1, 1, 0.00000000, 0.00000000, 54.00000000, 101.00000000, 10, 54.00000000, 101.00000000, 1); diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 7b02ee60ffa..07a09724ed2 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -10,6 +10,7 @@ -- Copyright (C) 2012 Tommaso Basilici <t.basilici@19.coop> -- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> -- Copyright (C) 2013 Cedric GROSS <c.gross@kreiz-it.fr> +-- Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de> -- -- 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 @@ -25,14 +26,24 @@ -- along with this program. If not, see <https://www.gnu.org/licenses/>. -- +-- WARNING ---------------------------------------------------------------- -- +-- EN: +-- Do not put a comment at the end of the line, this file is parsed during +-- install and all '--' symbols are removed. +-- +-- FR: -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. -- +-- CONTENT ---------------------------------------------------------------- -- --- Formes juridiques +-- Legal Formes (en) / Formes juridiques (fr) -- +-- fk_pays = country_id +-- + delete from llx_c_forme_juridique; @@ -54,6 +65,7 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, ' INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, '2312', 'Sociedad Anónima con Participación Estatal Mayoritaria', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, '2313', 'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)', 1); + -- Austria INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4100', 'GmbH - Gesellschaft mit beschränkter Haftung', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4101', 'GesmbH - Gesellschaft mit beschränkter Haftung', 1); @@ -71,6 +83,31 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, ' INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4113', 'GesnbR - Gesellschaft nach bürgerlichem Recht', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4114', 'e.U. - eingetragener Einzelunternehmer', 1); + +-- Belgium +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '200', 'Indépendant'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '201', 'SRL - Société à responsabilité limitée'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '202', 'SA - Société Anonyme'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '203', 'SCRL - Société coopérative à responsabilité limitée'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '204', 'ASBL - Association sans but Lucratif'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '205', 'SCRI - Société coopérative à responsabilité illimitée'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '206', 'SCS - Société en commandite simple'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '207', 'SCA - Société en commandite par action'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '208', 'SNC - Société en nom collectif'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '209', 'GIE - Groupement d intérêt économique'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '210', 'GEIE - Groupement européen d intérêt économique'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '220', 'Eenmanszaak'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '221', 'BVBA - Besloten vennootschap met beperkte aansprakelijkheid'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '222', 'NV - Naamloze Vennootschap'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '223', 'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '224', 'VZW - Vereniging zonder winstoogmerk'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '225', 'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid '); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '226', 'GCV - Gewone commanditaire vennootschap'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '227', 'Comm.VA - Commanditaire vennootschap op aandelen'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '228', 'VOF - Vennootschap onder firma'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '229', 'VS0 - Vennootschap met sociaal oogmerk'); + + -- France: Extrait de http://www.insee.fr/fr/nom_def_met/nomenclatures/cj/cjniveau2.htm insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'11','Artisan Commerçant (EI)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'12','Commerçant (EI)'); @@ -127,28 +164,6 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'92','Assoc insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'93','Fondation'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'99','Personne morale de droit privé'); --- Belgium -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '200', 'Indépendant'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '201', 'SRL - Société à responsabilité limitée'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '202', 'SA - Société Anonyme'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '203', 'SCRL - Société coopérative à responsabilité limitée'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '204', 'ASBL - Association sans but Lucratif'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '205', 'SCRI - Société coopérative à responsabilité illimitée'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '206', 'SCS - Société en commandite simple'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '207', 'SCA - Société en commandite par action'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '208', 'SNC - Société en nom collectif'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '209', 'GIE - Groupement d intérêt économique'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '210', 'GEIE - Groupement européen d intérêt économique'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '220', 'Eenmanszaak'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '221', 'BVBA - Besloten vennootschap met beperkte aansprakelijkheid'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '222', 'NV - Naamloze Vennootschap'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '223', 'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '224', 'VZW - Vereniging zonder winstoogmerk'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '225', 'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid '); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '226', 'GCV - Gewone commanditaire vennootschap'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '227', 'Comm.VA - Commanditaire vennootschap op aandelen'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '228', 'VOF - Vennootschap onder firma'); -insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '229', 'VS0 - Vennootschap met sociaal oogmerk'); -- Germany insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '500', 'GmbH - Gesellschaft mit beschränkter Haftung'); @@ -160,6 +175,8 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '505', 'Gb insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '506', 'KG - Kommanditgesellschaft'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '507', 'Ltd. - Limited Company'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '509', 'eG - eingetragene Genossenschaft'); + -- Denmark INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (80, '8001', 'Aktieselvskab A/S'); diff --git a/htdocs/install/mysql/data/llx_c_socialnetworks.sql b/htdocs/install/mysql/data/llx_c_socialnetworks.sql index 829cbbf0294..5bfbcf090d9 100644 --- a/htdocs/install/mysql/data/llx_c_socialnetworks.sql +++ b/htdocs/install/mysql/data/llx_c_socialnetworks.sql @@ -1,4 +1,11 @@ +-- Copyright (C) Year(-Year) Author Name <email> -- +-- eldy +-- frederic34 +-- dolibit-ut <dev@dolibit.de> +-- + +-- License -- 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 @@ -10,46 +17,46 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- along with this program. If not, see <https://www.gnu.org/licenses/>. -- -- --- +-- Note -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. -- -- socialnetworks -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tumblr', 'Tumblr', 'https://www.tumblr.com/{socialid}', 'fa-tumblr', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vero', 'Vero', 'https://vero.co/{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viadeo', 'Viadeo', 'https://fr.viadeo.com/fr/{socialid}', 'fa-viadeo', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'slack', 'Slack', '{socialid}', 'fa-slack', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'xing', 'Xing', '{socialid}', 'fa-xing', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'meetup', 'Meetup', '{socialid}', 'fa-meetup', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'pinterest', 'Pinterest', '{socialid}', 'fa-pinterest', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'flickr', 'Flickr', '{socialid}', 'fa-flickr', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, '500px', '500px', '{socialid}', 'fa-500px', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'giphy', 'Giphy', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'gifycat', 'Gificat', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'dailymotion', 'Dailymotion', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'vimeo', 'Vimeo', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'periscope', 'Periscope', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'twitch', 'Twitch', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'discord', 'Discord', '{socialid}', 'fa-discord', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'wikipedia', 'Wikipedia', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'reddit', 'Reddit', '{socialid}', 'fa-reddit', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'quora', 'Quora', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'tripadvisor', 'Tripadvisor', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'mastodon', 'Mastodon', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'diaspora', 'Diaspora', '{socialid}', '', 0); -INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'viber', 'Viber', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, '500px', '500px', '{socialid}', 'fa-500px', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'dailymotion', 'Dailymotion', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'diaspora', 'Diaspora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'discord', 'Discord', '{socialid}', 'fa-discord', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'facebook', 'Facebook', 'https://www.facebook.com/{socialid}', 'fa-facebook', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'flickr', 'Flickr', '{socialid}', 'fa-flickr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'gifycat', 'Gificat', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'giphy', 'Giphy', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'googleplus', 'GooglePlus', 'https://www.googleplus.com/{socialid}', 'fa-google-plus-g', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'instagram', 'Instagram', 'https://www.instagram.com/{socialid}', 'fa-instagram', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'linkedin', 'LinkedIn', 'https://www.linkedin.com/{socialid}', 'fa-linkedin', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'mastodon', 'Mastodon', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'meetup', 'Meetup', '{socialid}', 'fa-meetup', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'periscope', 'Periscope', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'pinterest', 'Pinterest', '{socialid}', 'fa-pinterest', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'quora', 'Quora', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'reddit', 'Reddit', '{socialid}', 'fa-reddit', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'slack', 'Slack', '{socialid}', 'fa-slack', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'snapchat', 'Snapchat', '{socialid}', 'fa-snapchat', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'skype', 'Skype', 'https://www.skype.com/{socialid}', 'fa-skype', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'tripadvisor', 'Tripadvisor', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'tumblr', 'Tumblr', 'https://www.tumblr.com/{socialid}', 'fa-tumblr', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'twitch', 'Twitch', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'twitter', 'Twitter', 'https://www.twitter.com/{socialid}', 'fa-twitter', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'vero', 'Vero', 'https://vero.co/{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'viadeo', 'Viadeo', 'https://fr.viadeo.com/fr/{socialid}', 'fa-viadeo', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'viber', 'Viber', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'vimeo', 'Vimeo', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'whatsapp', 'Whatsapp', '{socialid}', 'fa-whatsapp', 1); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'wikipedia', 'Wikipedia', '{socialid}', '', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'xing', 'Xing', '{socialid}', 'fa-xing', 0); +INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ( 1, 'youtube', 'Youtube', 'https://www.youtube.com/{socialid}', 'fa-youtube', 1); diff --git a/htdocs/install/mysql/data/llx_c_transport_mode.sql b/htdocs/install/mysql/data/llx_c_transport_mode.sql index 69f6ac7f6b8..0899ee50e56 100644 --- a/htdocs/install/mysql/data/llx_c_transport_mode.sql +++ b/htdocs/install/mysql/data/llx_c_transport_mode.sql @@ -13,7 +13,6 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- --- -- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 7156812fb01..72746ac99ea 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -23,15 +23,21 @@ -- along with this program. If not, see <https://www.gnu.org/licenses/>. -- --- +-- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. -- -- --- Taux TVA --- Source des taux: http://fr.wikipedia.org/wiki/Taxe_sur_la_valeur_ajout%C3%A9e +-- FR: +-- Taux TVA +-- Source des taux: https://fr.wikipedia.org/wiki/Taxe_sur_la_valeur_ajout%C3%A9e -- +-- EN: +-- VAT - value-added tax +-- Source: https://en.wikipedia.org/wiki/Value-added_tax +-- + delete from llx_c_tva; diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql index f16cf5ca5df..825e21ddf42 100644 --- a/htdocs/install/mysql/data/llx_c_type_contact.sql +++ b/htdocs/install/mysql/data/llx_c_type_contact.sql @@ -5,6 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> +-- Copyright (C) 2021 Udo Tamm <dev@dolibit.de> -- -- 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,84 +19,101 @@ -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <https://www.gnu.org/licenses/>. --- --- +-- +-- Notes +-- +-- Do not place a comment at the end of the line, this file is parsed when +-- of the install and all the acronyms '-' 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. -- -- +-- The types of contact of an element -- Les types de contact d'un element -- -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (10, 'contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (11, 'contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (20, 'contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (21, 'contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (22, 'contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1); - -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (31, 'propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (40, 'propal', 'external', 'BILLING', 'Contact client facturation propale', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (41, 'propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (42, 'propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (50, 'facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (60, 'facture', 'external', 'BILLING', 'Contact client facturation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (61, 'facture', 'external', 'SHIPPING', 'Contact client livraison', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (62, 'facture', 'external', 'SERVICE', 'Contact client prestation', 1); +-- Contract / Contrat +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (10, 'contrat', 'internal', 'SALESREPSIGN', 'Commercial signataire du contrat', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (11, 'contrat', 'internal', 'SALESREPFOLL', 'Commercial suivi du contrat', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (20, 'contrat', 'external', 'BILLING', 'Contact client facturation contrat', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (21, 'contrat', 'external', 'CUSTOMER', 'Contact client suivi contrat', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (22, 'contrat', 'external', 'SALESREPSIGN', 'Contact client signataire contrat', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (70, 'invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (71, 'invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (72, 'invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (73, 'invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); +-- Proposal / Propal +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (31, 'propal', 'internal', 'SALESREPFOLL', 'Commercial à l''origine de la propale', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (40, 'propal', 'external', 'BILLING', 'Contact client facturation propale', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (41, 'propal', 'external', 'CUSTOMER', 'Contact client suivi propale', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (42, 'propal', 'external', 'SHIPPING', 'Contact client livraison propale', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (80, 'agenda', 'internal', 'ACTOR', 'Responsable', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (81, 'agenda', 'internal', 'GUEST', 'Guest', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (85, 'agenda', 'external', 'ACTOR', 'Responsable', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (86, 'agenda', 'external', 'GUEST', 'Guest', 1); +-- Customer Invoice / Facture +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (50, 'facture', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (60, 'facture', 'external', 'BILLING', 'Contact client facturation', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (61, 'facture', 'external', 'SHIPPING', 'Contact client livraison', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (62, 'facture', 'external', 'SERVICE', 'Contact client prestation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (91, 'commande','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (100,'commande','external', 'BILLING', 'Contact client facturation commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (101,'commande','external', 'CUSTOMER', 'Contact client suivi commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (102,'commande','external', 'SHIPPING', 'Contact client livraison commande', 1); +-- Supplier Invoice +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (70, 'invoice_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi du paiement', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (71, 'invoice_supplier', 'external', 'BILLING', 'Contact fournisseur facturation', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (72, 'invoice_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (73, 'invoice_supplier', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (120, 'fichinter','internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (121, 'fichinter','internal', 'INTERVENING', 'Intervenant', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (130, 'fichinter','external', 'BILLING', 'Contact client facturation intervention', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (131, 'fichinter','external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1); +-- Agenda +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (80, 'agenda', 'internal', 'ACTOR', 'Responsable', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (81, 'agenda', 'internal', 'GUEST', 'Guest', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (85, 'agenda', 'external', 'ACTOR', 'Responsable', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (86, 'agenda', 'external', 'GUEST', 'Guest', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (140, 'order_supplier','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (141, 'order_supplier','internal', 'SHIPPING', 'Responsable réception de la commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (142, 'order_supplier','external', 'BILLING', 'Contact fournisseur facturation commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143, 'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145, 'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1); +-- Customer Order / Commande +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (91, 'commande', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (100,'commande', 'external', 'BILLING', 'Contact client facturation commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (101,'commande', 'external', 'CUSTOMER', 'Contact client suivi commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (102,'commande', 'external', 'SHIPPING', 'Contact client livraison commande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (150, 'dolresource','internal', 'USERINCHARGE', 'In charge of resource', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (151, 'dolresource','external', 'THIRDINCHARGE', 'In charge of resource', 1); +-- Intervention / Fichinter +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (120, 'fichinter', 'internal', 'INTERREPFOLL', 'Responsable suivi de l''intervention', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (121, 'fichinter', 'internal', 'INTERVENING', 'Intervenant', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (130, 'fichinter', 'external', 'BILLING', 'Contact client facturation intervention', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (131, 'fichinter', 'external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1); --- All project code can start with 'PROJECT' -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (161, 'project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (170, 'project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (171, 'project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); +-- Supplier Order +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (140, 'order_supplier', 'internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (141, 'order_supplier', 'internal', 'SHIPPING', 'Responsable réception de la commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (142, 'order_supplier', 'external', 'BILLING', 'Contact fournisseur facturation commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (143, 'order_supplier', 'external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (145, 'order_supplier', 'external', 'SHIPPING', 'Contact fournisseur livraison commande', 1); --- All task code can start with 'TASK' -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (180, 'project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (181, 'project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (190, 'project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (191, 'project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1); +-- Resource +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (150, 'dolresource', 'internal', 'USERINCHARGE', 'In charge of resource', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (151, 'dolresource', 'external', 'THIRDINCHARGE', 'In charge of resource', 1); -- Tickets -INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(155, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL); -INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(156, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL); -INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL); -INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (155, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur contact support', 1, NULL); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (156, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1, NULL); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (157, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1, NULL); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active, module) values (158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL); + +-- Projects / Projet - All project code can start with 'PROJECT' +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (161, 'project', 'internal', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (170, 'project', 'external', 'PROJECTLEADER', 'Chef de Projet', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (171, 'project', 'external', 'PROJECTCONTRIBUTOR', 'Intervenant', 1); + +-- Project Tasks - All task code can start with 'TASK' +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (180, 'project_task', 'internal', 'TASKEXECUTIVE', 'Responsable', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (181, 'project_task', 'internal', 'TASKCONTRIBUTOR', 'Intervenant', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (190, 'project_task', 'external', 'TASKEXECUTIVE', 'Responsable', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (191, 'project_task', 'external', 'TASKCONTRIBUTOR', 'Intervenant', 1); -- Supplier proposal +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1); -insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1); - +-- Event Organization +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); +insert into llx_c_type_contact (rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1); diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index ef725f43d98..d55d8fc67c2 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -32,7 +32,6 @@ delete from llx_c_typent; -- Entries for all countries -insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 0, 'TE_UNKNOWN', '-', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1); diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index 7cd039a2c19..ed5449c0bd3 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -56,7 +56,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M -- -- IHM -- -insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','25','chaine','Maximum length of lists',0,0); +insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_LISTE_LIMIT','20','chaine','Maximum length of lists',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_SIZE_SHORTLIST_LIMIT','3','chaine','Maximum length of short lists',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MENU_STANDARD','eldy_menu.php','chaine','Menu manager for internal users',0,0); diff --git a/htdocs/install/mysql/functions/index.html b/htdocs/install/mysql/functions/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mysql/index.html b/htdocs/install/mysql/index.html deleted file mode 100644 index e69de29bb2d..00000000000 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 index bfa8bf01b39..e69cad3564c 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -60,7 +60,6 @@ ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_mrp_mo_fk_object(fk_object); -- For v13 - insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (111,11, '0','0','No Sales Tax',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (112,11, '4','0','Sales Tax 4%',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (113,11, '6','0','Sales Tax 6%',1); @@ -400,6 +399,8 @@ CREATE TABLE llx_ecm_files_extrafields ) ENGINE=innodb; ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_object); +ALTER TABLE llx_ecm_files ADD COLUMN note_private text AFTER fk_user_m; +ALTER TABLE llx_ecm_files ADD COLUMN note_public text AFTER note_private; CREATE TABLE llx_ecm_directories_extrafields ( @@ -410,6 +411,9 @@ CREATE TABLE llx_ecm_directories_extrafields ) ENGINE=innodb; ALTER TABLE llx_ecm_directories_extrafields ADD INDEX idx_ecm_directories_extrafields (fk_object); +ALTER TABLE llx_ecm_directories ADD COLUMN note_private text AFTER fk_user_m; +ALTER TABLE llx_ecm_directories ADD COLUMN note_public text AFTER note_private; + ALTER TABLE llx_website_page ADD COLUMN allowed_in_frames integer DEFAULT 0; ALTER TABLE llx_website_page ADD COLUMN object_type varchar(255); ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255); @@ -553,7 +557,7 @@ CREATE TABLE llx_session( fk_user integer NOT NULL, remote_ip varchar(64) NULL, user_agent varchar(128) NULL -)ENGINE=innodb; +) ENGINE=innodb; INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'github', 'Github', 'https://github.com/{socialid}', 'fa-github', 1); diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql new file mode 100644 index 00000000000..e762ddd94e4 --- /dev/null +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -0,0 +1,438 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 14.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. +-- To rebuild sequence for postgresql after insert by forcing id autoincrement fields: +-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); + + +-- Missing in v13 or lower + +ALTER TABLE llx_recruitment_recruitmentcandidature MODIFY COLUMN email_msgid VARCHAR(175); + +ALTER TABLE llx_asset CHANGE COLUMN amount amount_ht double(24,8) DEFAULT NULL; +ALTER TABLE llx_asset ADD COLUMN amount_vat double(24,8) DEFAULT NULL; + +ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object); +ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object); + +ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object); + +insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4); + +-- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN montant double(24,8) NULL; +-- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN montant DROP NOT NULL; + +UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI'); + + +-- For v14 + +ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64); + +create table llx_accounting_groups_account +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_accounting_account INTEGER NOT NULL, + fk_c_accounting_category INTEGER NOT NULL +)ENGINE=innodb; + + +ALTER TABLE llx_oauth_token ADD COLUMN restricted_ips varchar(200); +ALTER TABLE llx_oauth_token ADD COLUMN datec datetime DEFAULT NULL; +ALTER TABLE llx_oauth_token ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +ALTER TABLE llx_events ADD COLUMN authentication_method varchar(64) NULL; +ALTER TABLE llx_events ADD COLUMN fk_oauth_token integer NULL; + +ALTER TABLE llx_mailing_cibles MODIFY COLUMN tag varchar(64) NULL; +ALTER TABLE llx_mailing_cibles ADD INDEX idx_mailing_cibles_tag (tag); + + +ALTER TABLE llx_c_availability ADD COLUMN position integer NOT NULL DEFAULT 0; + +ALTER TABLE llx_adherent ADD COLUMN ref varchar(30) AFTER rowid; +UPDATE llx_adherent SET ref = rowid WHERE ref = '' or ref IS NULL; +ALTER TABLE llx_adherent MODIFY COLUMN ref varchar(30) NOT NULL; +ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_ref (ref, entity); + +ALTER TABLE llx_societe ADD COLUMN accountancy_code_sell varchar(32) AFTER webservices_key; +ALTER TABLE llx_societe ADD COLUMN accountancy_code_buy varchar(32) AFTER accountancy_code_sell; + +ALTER TABLE llx_bank_account ADD COLUMN ics varchar(32) NULL; +ALTER TABLE llx_bank_account ADD COLUMN ics_transfer varchar(32) NULL; + +ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL; + + +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_dolibarr_state_board.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_dolibarr_state_board.php' AND entity = 1); + +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_modified.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_modified.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_subscriptions.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_subscriptions.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_subscriptions_by_year.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_subscriptions_by_year.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_by_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_by_type.php' AND entity = 1); + + +ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL; +ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0; +ALTER TABLE llx_website ADD COLUMN pageviews_total BIGINT UNSIGNED DEFAULT 0; + + +-- Drop foreign key with bad name or not required +ALTER TABLE llx_workstation_workstation DROP FOREIGN KEY llx_workstation_workstation_fk_user_creat; +ALTER TABLE llx_propal DROP FOREIGN KEY llx_propal_fk_warehouse; + + +CREATE TABLE llx_workstation_workstation( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + label varchar(255), + type varchar(7), + note_public text, + entity int DEFAULT 1, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + import_key varchar(14), + status smallint NOT NULL, + nb_operators_required integer, + thm_operator_estimated double, + thm_machine_estimated double + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; + +ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid); +ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref); +ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status); + +CREATE TABLE llx_workstation_workstation_resource( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + tms timestamp, + fk_resource integer, + fk_workstation integer +) ENGINE=innodb; + +CREATE TABLE llx_workstation_workstation_usergroup( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + tms timestamp, + fk_usergroup integer, + fk_workstation integer +) ENGINE=innodb; + + +ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30); +ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30); + +ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method; +--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid); +ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse); + +ALTER TABLE llx_societe DROP INDEX idx_societe_entrepot; +ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL; +--ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid); +ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse); + +-- VMYSQL4.3 ALTER TABLE llx_societe MODIFY COLUMN fk_typent integer NULL; +-- VPGSQL8.2 ALTER TABLE llx_societe ALTER COLUMN fk_typent DROP NOT NULL; +UPDATE llx_societe SET fk_typent=NULL, tms=tms WHERE fk_typent=0; + +DELETE FROM llx_c_typent WHERE code='TE_UNKNOWN'; + +ALTER TABLE llx_socpeople MODIFY poste varchar(255); + +ALTER TABLE llx_menu ADD COLUMN prefix varchar(255) NULL AFTER titre; + +ALTER TABLE llx_chargesociales ADD COLUMN fk_user integer DEFAULT NULL; + +ALTER TABLE llx_mrp_production ADD COLUMN origin_id integer AFTER fk_mo; +ALTER TABLE llx_mrp_production ADD COLUMN origin_type varchar(10) AFTER origin_id; + +ALTER TABLE llx_fichinter ADD COLUMN last_main_doc varchar(255) AFTER model_pdf; +ALTER TABLE llx_projet ADD COLUMN last_main_doc varchar(255) AFTER model_pdf; + +create table llx_payment_vat +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_tva integer, + datec datetime, -- date de creation + tms timestamp, + datep datetime, -- payment date + amount double(24,8) DEFAULT 0, + fk_typepaiement integer NOT NULL, + num_paiement varchar(50), + note text, + fk_bank integer NOT NULL, + fk_user_creat integer, -- creation user + fk_user_modif integer -- last modification user + +)ENGINE=innodb; + +ALTER TABLE llx_tva ADD COLUMN paye smallint default 1 NOT NULL; +ALTER TABLE llx_tva ADD COLUMN fk_account integer; + +INSERT INTO llx_payment_vat (rowid, fk_tva, datec, datep, amount, fk_typepaiement, num_paiement, note, fk_bank, fk_user_creat, fk_user_modif) SELECT rowid, rowid, NOW(), datep, amount, COALESCE(fk_typepayment, 0), num_payment, 'Created automatically by migration v13 to v14', fk_bank, fk_user_creat, fk_user_modif FROM llx_tva WHERE fk_bank IS NOT NULL; +--UPDATE llx_bank_url as url INNER JOIN llx_tva tva ON tva.rowid = url.url_id SET url.type = 'vat', url.label = CONCAT('(', tva.label, ')') WHERE type = 'payment_vat'; +--INSERT INTO llx_bank_url (fk_bank, url_id, url, label, type) SELECT b.fk_bank, ptva.rowid, REPLACE(b.url, 'tva/card.php', 'payment_vat/card.php'), '(paiement)', 'payment_vat' FROM llx_bank_url b INNER JOIN llx_tva tva ON (tva.fk_bank = b.fk_bank) INNER JOIN llx_payment_vat ptva on (ptva.fk_bank = b.fk_bank) WHERE type = 'vat'; + +--ALTER TABLE llx_tva DROP COLUMN fk_bank; + +ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0; + + +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); + +ALTER TABLE llx_projet ADD COLUMN accept_conference_suggestions integer DEFAULT 0; +ALTER TABLE llx_projet ADD COLUMN accept_booth_suggestions integer DEFAULT 0; +ALTER TABLE llx_projet ADD COLUMN price_registration double(24,8); +ALTER TABLE llx_projet ADD COLUMN price_booth double(24,8); + +ALTER TABLE llx_actioncomm ADD COLUMN num_vote integer DEFAULT NULL AFTER reply_to; +ALTER TABLE llx_actioncomm ADD COLUMN event_paid smallint NOT NULL DEFAULT 0 AFTER num_vote; +ALTER TABLE llx_actioncomm ADD COLUMN status smallint NOT NULL DEFAULT 0 AFTER event_paid; +ALTER TABLE llx_actioncomm ADD COLUMN ref varchar(30) AFTER id; +UPDATE llx_actioncomm SET ref = id WHERE ref = '' OR ref IS NULL; +ALTER TABLE llx_actioncomm MODIFY COLUMN ref varchar(30) NOT NULL; +ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity); + +ALTER TABLE llx_c_actioncomm MODIFY code varchar(50) NOT NULL; +ALTER TABLE llx_c_actioncomm MODIFY module varchar(50) DEFAULT NULL; + +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 60,'AC_EO_ONLINECONF','module','Online/Virtual conference','conference@eventorganization', 1, 60); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 61,'AC_EO_INDOORCONF','module','Indoor conference','conference@eventorganization', 1, 61); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 62,'AC_EO_ONLINEBOOTH','module','Online/Virtual booth','booth@eventorganization', 1, 62); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) VALUES ( 63,'AC_EO_INDOORBOOTH','module','Indoor booth','booth@eventorganization', 1, 63); +-- Code enhanced - Standardize field name +ALTER TABLE llx_commande CHANGE COLUMN tva total_tva double(24,8) default 0; +ALTER TABLE llx_supplier_proposal CHANGE COLUMN tva total_tva double(24,8) default 0; +ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0; +ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0; +ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0; +ALTER TABLE llx_facture CHANGE COLUMN tva total_tva double(24,8) default 0; +ALTER TABLE llx_facture CHANGE COLUMN total total_ht double(24,8) default 0; +ALTER TABLE llx_facture_rec CHANGE COLUMN tva total_tva double(24,8) default 0; +ALTER TABLE llx_facture_rec CHANGE COLUMN total total_ht double(24,8) default 0; +ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tva total_tva double(24,8) default 0; + + +--VMYSQL4.3 ALTER TABLE llx_c_civility CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +--VPGSQL8.2 CREATE SEQUENCE llx_c_civility_rowid_seq OWNED BY llx_c_civility.rowid; +--VPGSQL8.2 ALTER TABLE llx_c_civility ALTER COLUMN rowid SET DEFAULT nextval('llx_c_civility_rowid_seq'); +--VPGSQL8.2 SELECT setval('llx_c_civility_rowid_seq', MAX(rowid)) FROM llx_c_civility; + + +-- Change for salary intent table +create table llx_salary +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) + label varchar(255), + tms timestamp, + datec datetime, -- Create date + fk_user integer NOT NULL, + datep date, -- payment date + datev date, -- value date (this field should not be here, only into bank tables) + salary double(24,8), -- salary of user when payment was done + amount double(24,8) NOT NULL DEFAULT 0, + fk_projet integer DEFAULT NULL, + datesp date, -- date start period + dateep date, -- date end period + entity integer DEFAULT 1 NOT NULL, -- multi company id + note text, + fk_bank integer, + paye smallint default 1 NOT NULL, + fk_typepayment integer NOT NULL, -- default payment mode for payment + fk_account integer, -- default bank account for payment + fk_user_author integer, -- user creating + fk_user_modif integer -- user making last change +) ENGINE=innodb; + +-- VMYSQL4.1 ALTER TABLE llx_payment_salary CHANGE COLUMN fk_user fk_user integer NULL; +-- VPGSQL8.2 ALTER TABLE llx_payment_salary ALTER COLUMN fk_user DROP NOT NULL; +ALTER TABLE llx_payment_salary ADD COLUMN fk_salary integer; + +INSERT INTO llx_salary (rowid, ref, fk_user, amount, fk_projet, fk_typepayment, label, datesp, dateep, entity, note, fk_bank, paye) SELECT ps.rowid, ps.rowid, ps.fk_user, ps.amount, ps.fk_projet, ps.fk_typepayment, ps.label, ps.datesp, ps.dateep, ps.entity, ps.note, ps.fk_bank, 1 FROM llx_payment_salary ps WHERE ps.fk_salary IS NULL; +UPDATE llx_payment_salary SET fk_salary = rowid WHERE fk_salary IS NULL; +UPDATE llx_payment_salary SET ref = rowid WHERE ref IS NULL; + +ALTER TABLE llx_salary ALTER COLUMN paye set default 0; + +DELETE FROM llx_boxes WHERE box_id IN (SELECT rowid FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php')); +DELETE FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php'); + +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_ticket_by_severity.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_ticket_by_severity.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_ticket_last_x_days.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_ticket_last_x_days.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_nb_tickets_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_nb_tickets_type.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_graph_new_vs_close_ticket.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_graph_new_vs_close_ticket.php' AND entity = 1); + +create table llx_product_perentity +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_product integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_sell_intra varchar(32), -- Selling accountancy code for vat intracommunity + accountancy_code_sell_export varchar(32), -- Selling accountancy code for vat export + accountancy_code_buy varchar(32), -- Buying accountancy code + accountancy_code_buy_intra varchar(32), -- Buying accountancy code for vat intracommunity + accountancy_code_buy_export varchar(32) -- Buying accountancy code for vat import +)ENGINE=innodb; + +ALTER TABLE llx_product_perentity ADD INDEX idx_product_perentity_fk_product (fk_product); +ALTER TABLE llx_product_perentity ADD UNIQUE INDEX uk_product_perentity (fk_product, entity); + +create table llx_societe_perentity +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id +-- code_compta varchar(24), -- code compta client +-- code_compta_fournisseur varchar(24), -- code compta founisseur + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_buy varchar(32) -- Buying accountancy code +)ENGINE=innodb; + +ALTER TABLE llx_societe_perentity ADD INDEX idx_societe_perentity_fk_soc (fk_soc); +ALTER TABLE llx_societe_perentity ADD UNIQUE INDEX uk_societe_perentity (fk_soc, entity); + +CREATE TABLE llx_eventorganization_conferenceorboothattendee( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) NOT NULL, + fk_soc integer, + fk_actioncomm integer NOT NULL, + email varchar(100), + date_subscription datetime, + amount double DEFAULT NULL, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer, + 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_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm(id); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_email (email); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_soc, fk_actioncomm, email); + +create table llx_eventorganization_conferenceorboothattendee_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_eventorganization_conferenceorboothattendee_extrafields ADD INDEX idx_conferenceorboothattendee_fk_object(fk_object); + +ALTER TABLE llx_c_ticket_category ADD COLUMN public integer DEFAULT 0; +ALTER TABLE llx_c_ticket_category MODIFY COLUMN pos integer DEFAULT 0 NOT NULL; + + +ALTER TABLE llx_propal ADD COLUMN date_signature datetime AFTER date_valid; +ALTER TABLE llx_propal ADD COLUMN fk_user_signature integer AFTER fk_user_valid; +ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_signature FOREIGN KEY (fk_user_signature) REFERENCES llx_user (rowid); + +UPDATE llx_propal SET fk_user_signature = fk_user_cloture WHERE fk_user_signature IS NULL AND fk_user_cloture IS NOT NULL; +UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL AND date_cloture IS NOT NULL; + + +ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) NULL; + +insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1); +insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1); +insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1); + + +CREATE TABLE llx_partnership( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + status smallint NOT NULL DEFAULT '0', + fk_soc integer, + fk_member integer, + date_partnership_start date NOT NULL, + date_partnership_end date NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id, 0 = all + reason_decline_or_cancel text NULL, + date_creation datetime NOT NULL, + fk_user_creat integer NOT NULL, + tms timestamp, + fk_user_modif integer, + note_private text, + note_public text, + last_main_doc varchar(255), + count_last_url_check_error integer DEFAULT '0', + import_key varchar(14), + model_pdf varchar(255) +) ENGINE=innodb; + +ALTER TABLE llx_partnership ADD INDEX idx_partnership_rowid (rowid); +ALTER TABLE llx_partnership ADD INDEX idx_partnership_ref (ref); +ALTER TABLE llx_partnership ADD INDEX idx_partnership_fk_soc (fk_soc); +ALTER TABLE llx_partnership ADD CONSTRAINT llx_partnership_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_partnership ADD INDEX idx_partnership_status (status); +ALTER TABLE llx_partnership ADD INDEX idx_partnership_fk_member (fk_member); + +create table llx_partnership_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_partnership_extrafields ADD INDEX idx_partnership_fk_object(fk_object); + +INSERT INTO llx_c_email_templates (entity,module,type_template,label,lang,position,topic,joinfiles,content) VALUES (0, 'partnership', 'member', '(AlertStatusPartnershipExpiration)', NULL, 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourMembershipWillSoonExpireTopic)__', 0, '<body>\n <p>Dear __MEMBER_FULLNAME__,<br><br>\n__(YourMembershipWillSoonExpireContent)__</p>\n<br />\n\n __(Sincerely)__ <br />\n __[PARTNERSHIP_SOCIETE_NOM]__ <br />\n </body>\n'); +ALTER TABLE llx_facture_fourn ADD COLUMN date_closing datetime DEFAULT NULL after date_valid; + +ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid; + +ALTER TABLE llx_entrepot ADD COLUMN fk_project INTEGER DEFAULT NULL AFTER entity; -- project associated to warehouse if any + +-- Rebuild sequence for postgres only after query INSERT INTO llx_salary(rowid, ... +-- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); + +UPDATE llx_const SET value = 'github' WHERE __DECRYPT('name')__ = 'MAIN_BUGTRACK_ENABLELINK' AND __DECRYPT('value')__ = 1; + diff --git a/htdocs/install/mysql/migration/index.html b/htdocs/install/mysql/migration/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mysql/tables/index.html b/htdocs/install/mysql/tables/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index 90de3fd02fe..cd147979790 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -41,7 +41,7 @@ CREATE TABLE llx_accounting_bookkeeping multicurrency_code varchar(255), -- FEC:Idevise lettering_code varchar(255), -- FEC:EcritureLet date_lettering datetime, -- FEC:DateLet - date_lim_reglement datetime DEFAULT NULL, -- | date limite de reglement + date_lim_reglement datetime DEFAULT NULL, -- FEC_suppl:DateLimitReglmt | payment deadline fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date diff --git a/htdocs/install/mysql/tables/llx_accounting_groups_account.sql b/htdocs/install/mysql/tables/llx_accounting_groups_account.sql new file mode 100644 index 00000000000..86e620ea4bb --- /dev/null +++ b/htdocs/install/mysql/tables/llx_accounting_groups_account.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net> +-- +-- 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/>. +-- +-- Table of 'accounts' for accountancy expert module +-- ============================================================================ + +create table llx_accounting_groups_account +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_accounting_account INTEGER NOT NULL, + fk_c_accounting_category INTEGER NOT NULL +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_actioncomm.key.sql b/htdocs/install/mysql/tables/llx_actioncomm.key.sql index 64fbe874fc2..ee16386c7c4 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.key.sql @@ -17,7 +17,6 @@ -- -- =========================================================================== - ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_soc (fk_soc); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_contact (fk_contact); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_code (code); @@ -27,5 +26,6 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_project (fk_project); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep (datep); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep2 (datep2); ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid); - ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext); + +ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity); diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index 82d97d3ec98..9012f6b3a66 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -24,6 +24,7 @@ create table llx_actioncomm ( id integer AUTO_INCREMENT PRIMARY KEY, + ref varchar(30) NOT NULL, ref_ext varchar(255), -- reference into an external system (not used by dolibarr). Example: An id coming from google calendar has length between 5 and 1024 chars. An event id must follow rule: chars used in base32hex encoding (i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938) entity integer DEFAULT 1 NOT NULL, -- multi company id datep datetime, -- date start @@ -31,7 +32,7 @@ create table llx_actioncomm fk_action integer, -- type of action (optional link with id in llx_c_actioncomm or null) 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 DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_author integer, -- user id of user that has created record @@ -71,7 +72,11 @@ create table llx_actioncomm 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' recurdateend datetime, -- no more recurring event after this date - + + num_vote integer DEFAULT NULL, -- use for Event Organization module + event_paid smallint NOT NULL DEFAULT 0, -- use for Event Organization module + status smallint NOT NULL DEFAULT 0, -- use for Event Organization module for now, but could be use after for event global status + fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...) elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...) diff --git a/htdocs/install/mysql/tables/llx_adherent.key.sql b/htdocs/install/mysql/tables/llx_adherent.key.sql index 2b176bef2d1..750caff808a 100644 --- a/htdocs/install/mysql/tables/llx_adherent.key.sql +++ b/htdocs/install/mysql/tables/llx_adherent.key.sql @@ -19,6 +19,7 @@ ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_login (login, entity); +ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_ref (ref, entity); ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_fk_soc (fk_soc); ALTER TABLE llx_adherent ADD INDEX idx_adherent_fk_adherent_type (fk_adherent_type); diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 6b5490b282d..787a2b15bd7 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -27,20 +27,21 @@ create table llx_adherent ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, -- multi company id + ref varchar(30) NOT NULL, -- member reference number + entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(128), -- reference into an external system (not used by dolibarr) gender varchar(10), civility varchar(6), lastname varchar(50), firstname varchar(50), - login varchar(50), -- login - pass varchar(50), -- password + login varchar(50), -- login + pass varchar(50), -- password pass_crypted varchar(128), fk_adherent_type integer NOT NULL, - morphy varchar(3) NOT NULL, -- personne morale / personne physique - societe varchar(128), -- company name (should be same length than societe.name). No more used. - fk_soc integer NULL, -- Link to third party linked to member + morphy varchar(3) NOT NULL, -- personne morale / personne physique + societe varchar(128), -- company name (should be same length than societe.name). No more used. + fk_soc integer NULL, -- Link to third party linked to member address text, zip varchar(30), town varchar(50), @@ -48,34 +49,34 @@ create table llx_adherent country integer, email varchar(255), - socialnetworks text DEFAULT NULL, -- json with socialnetworks - 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), -- + socialnetworks text DEFAULT NULL, -- json with socialnetworks + skype varchar(255), -- deprecated + twitter varchar(255), -- deprecated + facebook varchar(255), -- deprecated + linkedin varchar(255), -- deprecated + instagram varchar(255), -- deprecated + snapchat varchar(255), -- deprecated + googleplus varchar(255), -- deprecated + youtube varchar(255), -- deprecated + whatsapp varchar(255), -- deprecated phone varchar(30), phone_perso varchar(30), phone_mobile varchar(30), - birth date, -- birthday - photo varchar(255), -- filename or url of photo + birth date, -- birthday + photo varchar(255), -- filename or url of photo statut smallint NOT NULL DEFAULT 0, public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? - datefin datetime, -- date de fin de validite de la cotisation + datefin datetime, -- date de fin de validite de la cotisation note_private text DEFAULT NULL, note_public text DEFAULT NULL, - model_pdf varchar(255), - datevalid datetime, -- date de validation - datec datetime, -- date de creation + model_pdf varchar(255), + datevalid datetime, -- date de validation + datec datetime, -- date de creation 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_author integer, -- can be null because member can be create by a guest fk_user_mod integer, fk_user_valid integer, - canvas varchar(32), -- type of canvas if used (null by default) + canvas varchar(32), -- type of canvas if used (null by default) import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.key.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.key.sql new file mode 100644 index 00000000000..fe6bb053ed6 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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/>. +-- +-- =================================================================== + + +ALTER TABLE llx_asset_extrafields ADD INDEX idx_asset_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 4ac90dd961d..aed803cc7ea 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -59,5 +59,7 @@ create table llx_bank_account note_public text, model_pdf varchar(255), import_key varchar(14), - extraparams varchar(255) -- for other parameters with json format + extraparams varchar(255), -- for other parameters with json format + ics varchar(32), -- Creditor Identifier CI + ics_transfer varchar(32) -- Creditor Identifier CI for transfer )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_actioncomm.sql b/htdocs/install/mysql/tables/llx_c_actioncomm.sql index 695aabbe6e4..a2b2dffe8a7 100644 --- a/htdocs/install/mysql/tables/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_c_actioncomm.sql @@ -21,10 +21,10 @@ create table llx_c_actioncomm ( id integer PRIMARY KEY, - code varchar(12) NOT NULL, + code varchar(50) NOT NULL, type varchar(50) DEFAULT 'system' NOT NULL, libelle varchar(48) NOT NULL, - module varchar(16) DEFAULT NULL, + module varchar(50) DEFAULT NULL, active tinyint DEFAULT 1 NOT NULL, todo tinyint, -- deprecated color varchar(9), diff --git a/htdocs/install/mysql/tables/llx_c_availability.sql b/htdocs/install/mysql/tables/llx_c_availability.sql index cef03abe548..4cdc8d6203c 100644 --- a/htdocs/install/mysql/tables/llx_c_availability.sql +++ b/htdocs/install/mysql/tables/llx_c_availability.sql @@ -1,5 +1,6 @@ -- ======================================================================== -- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.com> +-- Copyright (C) 2020 Alexandre SPANGARO <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -21,6 +22,6 @@ create table llx_c_availability rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(30) NOT NULL, label varchar(60) NOT NULL, - active tinyint DEFAULT 1 NOT NULL - + active tinyint DEFAULT 1 NOT NULL, + position integer NOT NULL DEFAULT 0 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_civility.sql b/htdocs/install/mysql/tables/llx_c_civility.sql index 1198691ed60..63fc8fca81f 100644 --- a/htdocs/install/mysql/tables/llx_c_civility.sql +++ b/htdocs/install/mysql/tables/llx_c_civility.sql @@ -19,7 +19,7 @@ create table llx_c_civility ( - rowid integer PRIMARY KEY, + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, code varchar(6) NOT NULL, label varchar(50), active tinyint DEFAULT 1 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_c_ticket_category.sql b/htdocs/install/mysql/tables/llx_c_ticket_category.sql index 58126633ce1..10d16331a06 100644 --- a/htdocs/install/mysql/tables/llx_c_ticket_category.sql +++ b/htdocs/install/mysql/tables/llx_c_ticket_category.sql @@ -1,4 +1,5 @@ -- Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io> +-- Copyright (C) 2020-2021 Laurent Destailleur <eldy@users.sourceforge.net> -- -- 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 @@ -12,19 +13,22 @@ -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <https://www.gnu.org/licenses/>. + -- --- +-- Table with the categories of a ticket +-- 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, + code varchar(32) NOT NULL, -- Example: TIGRP-COMMERCIAL, TIGRP-TECHNICALISSUE, ... label varchar(128) NOT NULL, - active integer DEFAULT 1, + public integer DEFAULT 0, 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) + description varchar(255), -- A long description of ticket + pos integer DEFAULT 0 NOT NULL, + active integer DEFAULT 1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_transport_mode.sql b/htdocs/install/mysql/tables/llx_c_transport_mode.sql index a2634f2a0bf..639eb5de929 100644 --- a/htdocs/install/mysql/tables/llx_c_transport_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_transport_mode.sql @@ -16,6 +16,10 @@ -- -- ======================================================================== +-- +-- Table to store transport modes (plane, boat, road, ...) +-- + CREATE TABLE llx_c_transport_mode ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index db9e82ac779..220c85410ce 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> -- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> +-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -28,6 +29,7 @@ create table llx_chargesociales tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation + fk_user integer DEFAULT NULL, -- utilisateur concerné fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index add836ce5d5..e3a075933c2 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -47,7 +47,7 @@ create table llx_commande remise_percent real default 0, remise_absolue real default 0, remise real default 0, - tva double(24,8) default 0, + total_tva double(24,8) default 0, localtax1 double(24,8) default 0, -- total localtax1 localtax2 double(24,8) default 0, -- total localtax2 total_ht double(24,8) default 0, diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index a9f155a2abb..56486b551c8 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -49,7 +49,7 @@ create table llx_commande_fournisseur amount_ht double(24,8) default 0, remise_percent real default 0, remise real default 0, - tva double(24,8) default 0, + total_tva double(24,8) default 0, localtax1 double(24,8) default 0, localtax2 double(24,8) default 0, total_ht double(24,8) default 0, diff --git a/htdocs/install/mysql/tables/llx_ecm_directories.sql b/htdocs/install/mysql/tables/llx_ecm_directories.sql index 4616a763b81..3ef599df05e 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories.sql @@ -33,5 +33,7 @@ CREATE TABLE llx_ecm_directories tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, + note_private text, + note_public text, acl text ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ecm_files.sql b/htdocs/install/mysql/tables/llx_ecm_files.sql index 635945a256d..cf9f3a8f148 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files.sql @@ -38,5 +38,7 @@ CREATE TABLE llx_ecm_files tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, + note_private text, + note_public text, acl text -- for future permission 'per file' ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index 2a390f008e2..be49978f6b7 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -25,6 +25,7 @@ create table llx_entrepot datec datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, entity integer DEFAULT 1 NOT NULL, -- multi company id + fk_project integer DEFAULT NULL, -- project associated to warehouse if any description text, lieu varchar(64), -- resume lieu situation address varchar(255), diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql new file mode 100644 index 00000000000..3b9cc52e68f --- /dev/null +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.key.sql @@ -0,0 +1,30 @@ +-- 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_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_rowid (rowid); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_ref (ref); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_soc (fk_soc); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_fk_actioncomm (fk_actioncomm); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD CONSTRAINT fx_eventorganization_conferenceorboothattendee_fk_actioncomm FOREIGN KEY (fk_actioncomm) REFERENCES llx_actioncomm(id); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_email (email); +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD INDEX idx_eventorganization_conferenceorboothattendee_status (status); +-- END MODULEBUILDER INDEXES + +ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD UNIQUE INDEX uk_eventorganization_conferenceorboothattendee(fk_soc, fk_actioncomm, email); + + diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql new file mode 100644 index 00000000000..026295627d0 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee.sql @@ -0,0 +1,37 @@ +-- 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_eventorganization_conferenceorboothattendee( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) NOT NULL, + fk_soc integer, + fk_actioncomm integer NOT NULL, + email varchar(100), + date_subscription datetime, + amount double DEFAULT NULL, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer, + 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_eventorganization_conferenceorboothattendee_extrafields.key.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.key.sql new file mode 100644 index 00000000000..5fa3554fae3 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_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_eventorganization_conferenceorboothattendee_extrafields ADD INDEX idx_conferenceorboothattendee_fk_object(fk_object); +-- END MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_extrafields.sql new file mode 100644 index 00000000000..5455314ff06 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_eventorganization_conferenceorboothattendee_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_eventorganization_conferenceorboothattendee_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index ffa4f1029e7..82ea0f0eee3 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -26,20 +26,15 @@ create table llx_events rowid integer AUTO_INCREMENT PRIMARY KEY, 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 + entity integer DEFAULT 1 NOT NULL, -- multi company id + prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix dateevent datetime, -- date event fk_user integer, -- id user description varchar(250) NOT NULL, -- full description of action ip varchar(250) NOT NULL, -- ip (must contains ip v4 and v6 or dns names) user_agent varchar(255) NULL, -- user agent - fk_object integer -- id of related object + fk_object integer NULL, -- id of related object + authentication_method varchar(64) NULL, -- type of authentication mode used if internal login event + fk_oauth_token integer NULL -- id in oauth_token if internal login event done using an oauth_token ) ENGINE=innodb; --- --- List of codes for the field entity --- --- 1 : first company events --- 2 : second company events --- 3 : etc... --- diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql index d591de78436..36bd5efb50c 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -53,6 +53,7 @@ CREATE TABLE llx_expensereport ( integration_compta integer DEFAULT NULL, -- not used fk_bank_account integer DEFAULT NULL, model_pdf varchar(50) DEFAULT NULL, + last_main_doc varchar(255), -- relative filepath+filename of last main generated document fk_multicurrency integer, multicurrency_code varchar(255), diff --git a/htdocs/install/mysql/tables/llx_export_model.sql b/htdocs/install/mysql/tables/llx_export_model.sql index 53952430c14..7e68eab4ad5 100644 --- a/htdocs/install/mysql/tables/llx_export_model.sql +++ b/htdocs/install/mysql/tables/llx_export_model.sql @@ -24,7 +24,7 @@ create table llx_export_model rowid integer AUTO_INCREMENT PRIMARY KEY, fk_user integer DEFAULT 0 NOT NULL, label varchar(50) NOT NULL, - type varchar(20) NOT NULL, + type varchar(64) NOT NULL, field text NOT NULL, filter text diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 010cf1c1573..acb43444ad2 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -50,11 +50,11 @@ create table llx_facture close_code varchar(16), -- Code motif cloture sans paiement complet close_note varchar(128), -- Commentaire cloture sans paiement complet - tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale + total_tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale localtax1 double(24,8) DEFAULT 0, -- amount total localtax1 localtax2 double(24,8) DEFAULT 0, -- amount total localtax2 revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp - total double(24,8) DEFAULT 0, -- amount total ht apres remise totale + total_ht double(24,8) DEFAULT 0, -- amount total ht apres remise totale total_ttc double(24,8) DEFAULT 0, -- amount total ttc apres remise totale fk_statut smallint DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index ef7e980b8aa..e5e78f87028 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -1,8 +1,9 @@ -- =========================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> --- Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> --- Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com> --- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> +-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> +-- Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> +-- Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com> +-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> +-- Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr> -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -32,10 +33,11 @@ create table llx_facture_fourn fk_soc integer NOT NULL, datec datetime, -- date de creation de la facture - datef date, -- date de la facture + datef date, -- date invoice date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date + date_closing datetime, -- date closing libelle varchar(255), paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, @@ -57,14 +59,15 @@ create table llx_facture_fourn fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating + fk_user_closing integer, -- user closing fk_facture_source integer, -- facture origine si facture avoir fk_projet integer, -- projet auquel est associee la facture fk_account integer, -- bank account - fk_cond_reglement integer, -- condition de reglement (30 jours, fin de mois ...) - fk_mode_reglement integer, -- mode de reglement (CHQ, VIR, ...) - date_lim_reglement date, -- date limite de reglement + fk_cond_reglement integer, -- condition de reglement (30 jours, fin de mois ...) + fk_mode_reglement integer, -- mode de reglement (CHQ, VIR, ...) + date_lim_reglement date, -- date limite de reglement note_private text, note_public text, diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 0db78d62252..c3cb6aeed46 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -36,11 +36,11 @@ create table llx_facture_rec remise_absolue real DEFAULT 0, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. - tva double(24,8) DEFAULT 0, + total_tva double(24,8) DEFAULT 0, localtax1 double(24,8) DEFAULT 0, -- amount localtax1 localtax2 double(24,8) DEFAULT 0, -- amount localtax2 revenuestamp double(24,8) DEFAULT 0, -- amount total revenuestamp - total double(24,8) DEFAULT 0, + total_ht double(24,8) DEFAULT 0, total_ttc double(24,8) DEFAULT 0, fk_user_author integer, -- user creating diff --git a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql index 8b6e3ef8dc9..6baf1789dc2 100644 --- a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql @@ -1,6 +1,9 @@ -- ======================================================================== -- Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net> -- +-- +-- LICENSE ================================================================ +-- -- 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 @@ -12,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- along with this program. If not, see <https://www.gnu.org/licenses/>. -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql index 709b12de31b..12ae5b5cc17 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql @@ -21,3 +21,5 @@ ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email); ALTER TABLE llx_mailing_cibles ADD INDEX idx_mailing_cibles_email (email); +ALTER TABLE llx_mailing_cibles ADD INDEX idx_mailing_cibles_tag (tag); + diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.sql index 096142b10ad..da0b6c1683a 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.sql @@ -28,7 +28,7 @@ create table llx_mailing_cibles firstname varchar(160), email varchar(160) NOT NULL, other varchar(255) NULL, - tag varchar(128) NULL, + tag varchar(64) NULL, -- a unique key as a hash of: dolibarr_main_instance_unique_id;email;lastname;mailing_id;MAILING_EMAIL_UNSUBSCRIBE_KEY statut smallint NOT NULL DEFAULT 0, -- -1 = error, 0 = not sent, ... source_url varchar(255), source_id integer, diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 9cff110981a..52b576411cb 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -30,17 +30,17 @@ CREATE TABLE llx_menu mainmenu varchar(100) NOT NULL, -- Name family/module for top menu (home, companies, ...) leftmenu varchar(100) NULL, -- Name family/module for left menu (setup, info, ...) fk_menu integer NOT NULL, -- 0 or Id of mother menu line, or -1 if we use fk_mainmenu and fk_leftmenu - fk_mainmenu varchar(100), -- - fk_leftmenu varchar(100), -- + fk_mainmenu varchar(100), -- + fk_leftmenu varchar(100), -- position integer NOT NULL, -- Sort order of entry url varchar(255) NOT NULL, -- Relative (or absolute) url to go target varchar(100) NULL, -- Target of Url link - titre varchar(255) NOT NULL, -- Key for menu translation + titre varchar(255) NOT NULL, -- Key for menu translation + prefix varchar(255) NULL, -- prefix langs varchar(100), -- Lang file to load for translation level smallint, -- Deprecated. Not used. perms text, -- Condition to show enabled or disabled 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 DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index 36129a54aea..a76e1f655ae 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -17,6 +17,8 @@ CREATE TABLE llx_mrp_production( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, fk_mo integer NOT NULL, + origin_id integer, + origin_type varchar(10), -- 'bom' bom production line or 'free' free production line added after Mo creation from bom position integer NOT NULL DEFAULT 0, fk_product integer NOT NULL, fk_warehouse integer, @@ -24,7 +26,7 @@ CREATE TABLE llx_mrp_production( qty_frozen smallint DEFAULT 0, disable_stock_change smallint DEFAULT 0, batch varchar(128), - role varchar(10), -- 'toconsume' or 'toproduce' (initialized at MO creation), 'consumed' or 'produced' (added after MO validation) + role varchar(10), -- 'toconsume' or 'toproduce' (initialized at MO creation), 'consumed' or 'produced' (added after MO validation) 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, diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql index 145e646230d..06f2625c76e 100644 --- a/htdocs/install/mysql/tables/llx_oauth_token.sql +++ b/htdocs/install/mysql/tables/llx_oauth_token.sql @@ -17,11 +17,14 @@ CREATE TABLE llx_oauth_token ( rowid integer AUTO_INCREMENT PRIMARY KEY, - service varchar(36), - token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2 - tokenstring text, -- token in json format '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"} + service varchar(36), -- 'Google', 'Stripe', 'auth-public-key', ... + token text, -- token in serialize() format, of an object StdOAuth2Token of library phpoauth2 + tokenstring text, -- token in text or json format. Value depends on 'service. For example for an OAUTH service: '{"access_token": "sk_test_cccc", "refresh_token": "rt_aaa", "token_type": "bearer", ..., "scope": "read_write"} fk_soc integer, - fk_user integer, + fk_user integer, -- Id of user in llx_user fk_adherent integer, + restricted_ips varchar(200), -- Restrict the authentication mode/token to some IPs + datec datetime DEFAULT NULL, -- date creation project + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, entity integer DEFAULT 1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_salary.key.sql b/htdocs/install/mysql/tables/llx_payment_salary.key.sql index 946cd1a08ff..2eb07157d09 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.key.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.key.sql @@ -24,4 +24,3 @@ ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_datesp (datesp); ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_dateep (dateep); ALTER TABLE llx_payment_salary ADD CONSTRAINT fk_payment_salary_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); - diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index d6ad2ffcfed..308e70effc2 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -22,7 +22,7 @@ create table llx_payment_salary ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date - fk_user integer NOT NULL, + fk_user integer DEFAULT NULL, datep date, -- payment date datev date, -- value date (this field should not be here, only into bank tables) salary double(24,8), -- salary of user when payment was done @@ -37,5 +37,6 @@ create table llx_payment_salary note text, fk_bank integer, fk_user_author integer, -- user creating - fk_user_modif integer -- user making last change + fk_user_modif integer, -- user making last change + fk_salary integer )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_vat.sql b/htdocs/install/mysql/tables/llx_payment_vat.sql new file mode 100644 index 00000000000..4ebb5bb4af3 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_payment_vat.sql @@ -0,0 +1,35 @@ +-- =================================================================== +-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> +-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_payment_vat +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_tva integer, + datec datetime, -- date de creation + tms timestamp, + datep datetime, -- payment date + amount double(24,8) DEFAULT 0, + fk_typepaiement integer NOT NULL, + num_paiement varchar(50), + note text, + fk_bank integer NOT NULL, + fk_user_creat integer, -- creation user + fk_user_modif integer -- last modification user + +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 2431c884c62..da8c2ff693c 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -51,7 +51,7 @@ create table llx_product recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT localtax1_tx double(6,3) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2_tx double(6,3) DEFAULT 0, + localtax2_tx double(6,3) DEFAULT 0, localtax2_type varchar(10) NOT NULL DEFAULT '0', fk_user_author integer DEFAULT NULL, -- user making creation fk_user_modif integer, -- user making last change @@ -59,6 +59,7 @@ create table llx_product tobuy tinyint DEFAULT 1, -- Product you buy onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on) tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) + batch_mask varchar(32), -- If the product has batch feature, you may want to use a batch mask per product 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 float DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.sql b/htdocs/install/mysql/tables/llx_product_customer_price.sql index 7cd481c3c75..f0d5edf9c2f 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.sql @@ -27,7 +27,8 @@ create table llx_product_customer_price datec datetime, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, - fk_soc integer NOT NULL, + fk_soc integer NOT NULL, + ref_customer varchar(30), price double(24,8) DEFAULT 0, price_ttc double(24,8) DEFAULT 0, price_min double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql index 4d79353e884..29906fe7ff2 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql @@ -26,7 +26,8 @@ create table llx_product_customer_price_log entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, fk_product integer NOT NULL, - fk_soc integer DEFAULT 0 NOT NULL, + fk_soc integer DEFAULT 0 NOT NULL, + ref_customer varchar(30), price double(24,8) DEFAULT 0, price_ttc double(24,8) DEFAULT 0, price_min double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_product_perentity.key.sql b/htdocs/install/mysql/tables/llx_product_perentity.key.sql new file mode 100644 index 00000000000..8e8ad48044c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_perentity.key.sql @@ -0,0 +1,21 @@ +-- =================================================================== +-- Copyright (C) 2021 Open-Dsi <support@open-dsi.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- =================================================================== + +ALTER TABLE llx_product_perentity ADD INDEX idx_product_perentity_fk_product (fk_product); + +ALTER TABLE llx_product_perentity ADD UNIQUE INDEX uk_product_perentity (fk_product, entity); diff --git a/htdocs/install/mysql/tables/llx_product_perentity.sql b/htdocs/install/mysql/tables/llx_product_perentity.sql new file mode 100644 index 00000000000..6e32e506ddf --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_perentity.sql @@ -0,0 +1,30 @@ +-- ======================================================================== +-- Copyright (C) 2021 Open-Dsi <support@open-dsi.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- ======================================================================== + +create table llx_product_perentity +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_product integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_sell_intra varchar(32), -- Selling accountancy code for vat intracommunity + accountancy_code_sell_export varchar(32), -- Selling accountancy code for vat export + accountancy_code_buy varchar(32), -- Buying accountancy code + accountancy_code_buy_intra varchar(32), -- Buying accountancy code for vat intracommunity + accountancy_code_buy_export varchar(32) -- Buying accountancy code for vat import +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet.sql b/htdocs/install/mysql/tables/llx_projet.sql index 1b95444b3a1..97acc8d3411 100644 --- a/htdocs/install/mysql/tables/llx_projet.sql +++ b/htdocs/install/mysql/tables/llx_projet.sql @@ -40,14 +40,19 @@ 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 + email_msgid varchar(175), -- if project or lead is created by email collector, we store here MSG ID. Do not use a too large value, it generates trouble with unique index --budget_days real, -- budget in days is sum of field planned_workload of tasks opp_amount double(24,8), budget_amount double(24,8), - usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity - usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet - usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices - usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event, receive attendees subscription + usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity + usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet + usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices + usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event, receive attendees subscription + accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences + accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth + price_registration double(24,8), + price_booth double(24,8), model_pdf varchar(255), + last_main_doc varchar(255), -- relative filepath+filename of last main generated document import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal.key.sql b/htdocs/install/mysql/tables/llx_propal.key.sql index c47da982ab4..d0265e6fcdf 100644 --- a/htdocs/install/mysql/tables/llx_propal.key.sql +++ b/htdocs/install/mysql/tables/llx_propal.key.sql @@ -24,13 +24,17 @@ ALTER TABLE llx_propal ADD UNIQUE INDEX uk_propal_ref (ref, entity); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_soc (fk_soc); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_user_author (fk_user_author); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_user_valid (fk_user_valid); +ALTER TABLE llx_propal ADD INDEX idx_propal_fk_user_signature (fk_user_signature); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_user_cloture (fk_user_cloture); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_projet (fk_projet); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_account(fk_account); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_currency(fk_currency); +ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse); ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid); +ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_signature FOREIGN KEY (fk_user_signature) REFERENCES llx_user (rowid); ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_cloture FOREIGN KEY (fk_user_cloture) REFERENCES llx_user (rowid); ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); +--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid); diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index 662db791094..7c94086b3b9 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -37,21 +37,23 @@ create table llx_propal datep date, -- date de la propal fin_validite datetime, -- date de fin de validite date_valid datetime, -- date de validation + date_signature datetime, -- date signature date_cloture datetime, -- date de cloture fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating - fk_user_cloture integer, -- user closing (signed or not) + fk_user_signature integer, -- user signing (signed or not) + fk_user_cloture integer, -- user closing fk_statut smallint DEFAULT 0 NOT NULL, -- 0=draft, 1=validated, 2=accepted, 3=refused, 4=billed/closed price real DEFAULT 0, -- (obsolete) remise_percent real DEFAULT 0, -- remise globale relative en pourcent (obsolete) remise_absolue real DEFAULT 0, -- remise globale absolue (obsolete) remise real DEFAULT 0, -- remise calculee (obsolete) total_ht double(24,8) DEFAULT 0, -- montant total ht apres remise globale - tva double(24,8) DEFAULT 0, -- montant total tva apres remise globale + total_tva double(24,8) DEFAULT 0, -- montant total tva apres remise globale localtax1 double(24,8) DEFAULT 0, -- amount total localtax1 localtax2 double(24,8) DEFAULT 0, -- amount total localtax2 - total double(24,8) DEFAULT 0, -- montant total ttc apres remise globale + total_ttc double(24,8) DEFAULT 0, -- montant total ttc apres remise globale fk_account integer, -- bank account fk_currency varchar(3), -- currency code @@ -66,6 +68,7 @@ create table llx_propal date_livraison date DEFAULT NULL, -- delivery date fk_shipping_method integer, -- shipping method id + fk_warehouse integer DEFAULT NULL, -- warehouse id fk_availability integer NULL, fk_input_reason integer, fk_incoterms integer, -- for incoterms @@ -75,9 +78,9 @@ create table llx_propal fk_delivery_address integer, -- delivery address (deprecated) fk_multicurrency integer, - multicurrency_code varchar(255), + multicurrency_code varchar(255), multicurrency_tx double(24,8) DEFAULT 1, - multicurrency_total_ht 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 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_salary.sql b/htdocs/install/mysql/tables/llx_salary.sql new file mode 100644 index 00000000000..af4b869d9bf --- /dev/null +++ b/htdocs/install/mysql/tables/llx_salary.sql @@ -0,0 +1,44 @@ +-- =================================================================== +-- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr> +-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_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, + datec datetime, -- Create date + fk_user integer NOT NULL, + datep date, -- payment date + datev date, -- value date (this field should not be here, only into bank tables) + salary double(24,8), -- salary of user when payment was done + amount double(24,8) NOT NULL DEFAULT 0, + fk_projet integer DEFAULT NULL, + fk_typepayment integer NOT NULL, + num_payment varchar(50), -- num cheque or other + label varchar(255), + datesp date, -- date start period + dateep date, -- date end period + entity integer DEFAULT 1 NOT NULL, -- multi company id + note text, + fk_bank integer, + paye smallint default 0 NOT NULL, + fk_account integer, + fk_user_author integer, -- user creating + fk_user_modif integer -- user making last change +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe.key.sql b/htdocs/install/mysql/tables/llx_societe.key.sql index 5e5bf73dcac..3a2c9540229 100644 --- a/htdocs/install/mysql/tables/llx_societe.key.sql +++ b/htdocs/install/mysql/tables/llx_societe.key.sql @@ -33,7 +33,7 @@ ALTER TABLE llx_societe ADD INDEX idx_societe_prospectlevel(fk_prospectlevel); ALTER TABLE llx_societe ADD INDEX idx_societe_typent(fk_typent); ALTER TABLE llx_societe ADD INDEX idx_societe_forme_juridique(fk_forme_juridique); ALTER TABLE llx_societe ADD INDEX idx_societe_shipping_method(fk_shipping_method); -ALTER TABLE llx_societe ADD INDEX idx_societe_entrepot(fk_entrepot); +-- ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse); -- ALTER TABLE llx_societe ADD FOREIGN KEY fk_prospectlevel llx_c_prospectlevel(code); diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index ea02b7be8ad..c40a42ee0bd 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -63,7 +63,7 @@ create table llx_societe whatsapp varchar(255), -- deprecated fk_effectif integer DEFAULT 0, -- - fk_typent integer DEFAULT 0, -- + fk_typent integer DEFAULT NULL, -- type ent fk_forme_juridique integer DEFAULT 0, -- juridical status fk_currency varchar(3), -- default currency siren varchar(128), -- IDProf1: depends on country (example: siren or RCS for france, ...) @@ -112,10 +112,13 @@ create table llx_societe logo varchar(255) DEFAULT NULL, logo_squarred varchar(255) DEFAULT NULL, canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default) - fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse + fk_warehouse integer DEFAULT NULL, -- if we need a link between third party and warehouse webservices_url varchar(255), -- supplier webservice url webservices_key varchar(128), -- supplier webservice key + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_buy varchar(32), -- Buying accountancy code + 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 diff --git a/htdocs/install/mysql/tables/llx_societe_perentity.key.sql b/htdocs/install/mysql/tables/llx_societe_perentity.key.sql new file mode 100644 index 00000000000..dd2970e16d2 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_societe_perentity.key.sql @@ -0,0 +1,21 @@ +-- =================================================================== +-- Copyright (C) 2021 Open-Dsi <support@open-dsi.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- =================================================================== + +ALTER TABLE llx_societe_perentity ADD INDEX idx_societe_perentity_fk_soc (fk_soc); + +ALTER TABLE llx_societe_perentity ADD UNIQUE INDEX uk_societe_perentity (fk_soc, entity); diff --git a/htdocs/install/mysql/tables/llx_societe_perentity.sql b/htdocs/install/mysql/tables/llx_societe_perentity.sql new file mode 100644 index 00000000000..408169476d9 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_societe_perentity.sql @@ -0,0 +1,28 @@ +-- ======================================================================== +-- Copyright (C) 2021 Open-Dsi <support@open-dsi.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- ======================================================================== + +create table llx_societe_perentity +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id +-- code_compta varchar(24), -- code compta client +-- code_compta_fournisseur varchar(24), -- code compta founisseur + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_buy varchar(32) -- Buying accountancy code +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index decc229e3e7..1f28534d5d3 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -36,7 +36,7 @@ create table llx_socpeople fk_departement integer, fk_pays integer DEFAULT 0, birthday date, - poste varchar(80), + poste varchar(255), phone varchar(30), phone_perso varchar(30), phone_mobile varchar(30), diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal.sql b/htdocs/install/mysql/tables/llx_supplier_proposal.sql index e63c4ff64c7..cf64d76d7d1 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal.sql @@ -37,10 +37,10 @@ CREATE TABLE llx_supplier_proposal ( remise_absolue double DEFAULT 0, remise double DEFAULT 0, total_ht double(24,8) DEFAULT 0, - tva double(24,8) DEFAULT 0, + total_tva double(24,8) DEFAULT 0, localtax1 double(24,8) DEFAULT 0, localtax2 double(24,8) DEFAULT 0, - total double(24,8) DEFAULT 0, + total_ttc double(24,8) DEFAULT 0, fk_account integer DEFAULT NULL, fk_currency varchar(3) DEFAULT NULL, fk_cond_reglement integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.key.sql b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.key.sql new file mode 100644 index 00000000000..4f365d85f55 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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/>. +-- +-- =================================================================== + + +ALTER TABLE llx_supplier_proposal_extrafields ADD INDEX idx_supplier_proposal_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.key.sql new file mode 100644 index 00000000000..278bda52c63 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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/>. +-- +-- =================================================================== + + +ALTER TABLE llx_supplier_proposaldet_extrafields ADD INDEX idx_supplier_proposaldet_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql index 6cf97e6b4c6..938e6aa5626 100644 --- a/htdocs/install/mysql/tables/llx_tva.sql +++ b/htdocs/install/mysql/tables/llx_tva.sql @@ -30,7 +30,8 @@ create table llx_tva label varchar(255), entity integer DEFAULT 1 NOT NULL, -- multi company id note text, - fk_bank integer, + paye smallint default 0 NOT NULL, + fk_account integer, fk_user_creat integer, -- utilisateur who create record fk_user_modif integer, -- utilisateur who modify record import_key varchar(14) diff --git a/htdocs/install/mysql/tables/llx_user_alert.sql b/htdocs/install/mysql/tables/llx_user_alert.sql index cded256de70..fd443e5e93f 100644 --- a/htdocs/install/mysql/tables/llx_user_alert.sql +++ b/htdocs/install/mysql/tables/llx_user_alert.sql @@ -21,6 +21,6 @@ create table llx_user_alert ( rowid integer AUTO_INCREMENT PRIMARY KEY, type integer, - fk_contact integer, -- pointe sur llx_socpeople - fk_user integer + fk_contact integer, -- id of llx_socpeople + fk_user integer -- id of llx_user )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_clicktodial.sql b/htdocs/install/mysql/tables/llx_user_clicktodial.sql index e6b02be0cbc..e421028faa0 100644 --- a/htdocs/install/mysql/tables/llx_user_clicktodial.sql +++ b/htdocs/install/mysql/tables/llx_user_clicktodial.sql @@ -17,7 +17,7 @@ -- =========================================================================== -- --- Stockage des informations relatives au click to dial +-- Save data relative to click to dial -- create table llx_user_clicktodial ( @@ -26,5 +26,4 @@ create table llx_user_clicktodial login varchar(32), pass varchar(64), poste varchar(20) - -)ENGINE=innodb; +)ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_website.sql b/htdocs/install/mysql/tables/llx_website.sql index b2103177972..0df6ccf8ef3 100644 --- a/htdocs/install/mysql/tables/llx_website.sql +++ b/htdocs/install/mysql/tables/llx_website.sql @@ -36,6 +36,9 @@ CREATE TABLE llx_website fk_user_modif integer, date_creation datetime, position integer DEFAULT 0, + lastaccess datetime NULL, + pageviews_month BIGINT UNSIGNED DEFAULT 0, + pageviews_total BIGINT UNSIGNED 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_workstation_workstation.key.sql b/htdocs/install/mysql/tables/llx_workstation_workstation.key.sql new file mode 100755 index 00000000000..d1d7bd915fe --- /dev/null +++ b/htdocs/install/mysql/tables/llx_workstation_workstation.key.sql @@ -0,0 +1,27 @@ +-- Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid); +ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref); +ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status); +-- END MODULEBUILDER INDEXES + +--ALTER TABLE llx_workstation_workstation ADD UNIQUE INDEX uk_workstation_workstation_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_field FOREIGN KEY (fk_field) REFERENCES llx_workstation_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation.sql b/htdocs/install/mysql/tables/llx_workstation_workstation.sql new file mode 100755 index 00000000000..a4d9fd4dbc8 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_workstation_workstation.sql @@ -0,0 +1,36 @@ +-- Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_workstation_workstation( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + label varchar(255), + type varchar(7), + note_public text, + entity int DEFAULT 1, + note_private text, + date_creation datetime NOT NULL, + tms timestamp, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + import_key varchar(14), + status smallint NOT NULL, + nb_operators_required integer, + thm_operator_estimated double, + thm_machine_estimated double + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql new file mode 100755 index 00000000000..92463ade696 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_workstation_workstation_resource.sql @@ -0,0 +1,22 @@ +-- Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_workstation_workstation_resource( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + tms timestamp, + fk_resource integer, + fk_workstation integer +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql b/htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql new file mode 100755 index 00000000000..9ecccc88d82 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_workstation_workstation_user_group.sql @@ -0,0 +1,22 @@ +-- Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- 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_workstation_workstation_usergroup( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + tms timestamp, + fk_usergroup integer, + fk_workstation integer +) ENGINE=innodb; diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index cd98cdfef2e..17339c1f605 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -52,6 +52,7 @@ CREATE OR REPLACE FUNCTION DAY(TIMESTAMP WITH TIME ZONE) RETURNS INTEGER AS $$ S CREATE OR REPLACE FUNCTION DAY(DATE) RETURNS INTEGER AS $$ SELECT EXTRACT(DAY FROM $1)::INTEGER; $$ LANGUAGE SQL IMMUTABLE; CREATE OR REPLACE FUNCTION dol_util_rebuild_sequences() RETURNS integer as $body$ DECLARE sequencedefs RECORD; c integer ; BEGIN FOR sequencedefs IN SELECT DISTINCT constraint_column_usage.table_name as tablename, constraint_column_usage.table_name as tablename, constraint_column_usage.column_name as columnname, replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','') as sequencename from information_schema.constraint_column_usage, information_schema.columns, information_schema.sequences where constraint_column_usage.table_schema ='public' AND columns.table_schema = 'public' AND columns.table_name=constraint_column_usage.table_name AND constraint_column_usage.column_name IN ('rowid','id') AND constraint_column_usage.column_name = columns.column_name AND columns.column_default is not null AND replace(replace(columns.column_default,'''::regclass)',''),'nextval(''','')=sequence_name LOOP EXECUTE 'select max('||sequencedefs.columnname||') from ' || sequencedefs.tablename INTO c; IF c is null THEN c = 0; END IF; IF c is not null THEN c = c+ 1; END IF; EXECUTE 'alter sequence ' || sequencedefs.sequencename ||' restart with ' || c; END LOOP; RETURN 1; END; $body$ LANGUAGE plpgsql; +-- You can call the function with SELECT dol_util_rebuild_sequences(); CREATE OR REPLACE FUNCTION dol_util_triggerall(DoEnable boolean) RETURNS integer AS $BODY$ DECLARE mytables RECORD; BEGIN FOR mytables IN SELECT relname FROM pg_class WHERE relhastriggers IS TRUE AND relkind = 'r' AND NOT relname LIKE 'pg_%' LOOP IF DoEnable THEN EXECUTE 'ALTER TABLE ' || mytables.relname || ' ENABLE TRIGGER ALL'; ELSE EXECUTE 'ALTER TABLE ' || mytables.relname || ' DISABLE TRIGGER ALL'; END IF; END LOOP; RETURN 1; END; $BODY$ LANGUAGE plpgsql; diff --git a/htdocs/install/pgsql/functions/index.html b/htdocs/install/pgsql/functions/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/pgsql/index.html b/htdocs/install/pgsql/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index baac0eb2cbd..ed4fb8dab13 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> + * Copyright (C) 2021 Frédéric France <frederic.france@free.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,9 @@ */ include_once 'inc.php'; -if (file_exists($conffile)) include_once $conffile; +if (file_exists($conffile)) { + include_once $conffile; +} require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php'; include_once $dolibarr_main_document_root.'/core/lib/images.lib.php'; require_once $dolibarr_main_document_root.'/core/class/extrafields.class.php'; @@ -46,13 +49,21 @@ $langs->setDefaultLang($setuplang); $langs->loadLangs(array("admin", "install", "other")); -if ($dolibarr_main_db_type == "mysqli") $choix = 1; -if ($dolibarr_main_db_type == "pgsql") $choix = 2; -if ($dolibarr_main_db_type == "mssql") $choix = 3; +if ($dolibarr_main_db_type == "mysqli") { + $choix = 1; +} +if ($dolibarr_main_db_type == "pgsql") { + $choix = 2; +} +if ($dolibarr_main_db_type == "mssql") { + $choix = 3; +} dolibarr_install_syslog("--- repair: entering upgrade.php page"); -if (!is_object($conf)) dolibarr_install_syslog("repair: conf file not initialized", LOG_ERR); +if (!is_object($conf)) { + dolibarr_install_syslog("repair: conf file not initialized", LOG_ERR); +} /* @@ -84,21 +95,24 @@ print 'Option repair_link_dispatch_lines_supplier_order_lines, (\'test\' or \'co print 'Option set_empty_time_spent_amount (\'test\' or \'confirmed\') is '.(GETPOST('set_empty_time_spent_amount', 'alpha') ?GETPOST('set_empty_time_spent_amount', 'alpha') : 'undefined').'<br>'."\n"; // Structure print 'Option force_utf8_on_tables, for mysql/mariadb only (\'test\' or \'confirmed\') is '.(GETPOST('force_utf8_on_tables', 'alpha') ?GETPOST('force_utf8_on_tables', 'alpha') : 'undefined').'<br>'."\n"; +print "Option force_utf8mb4_on_tables (EXPERIMENTAL!), for mysql/mariadb only ('test' or 'confirmed') is ".(GETPOST('force_utf8mb4_on_tables', 'alpha') ? GETPOST('force_utf8mb4_on_tables', 'alpha') : 'undefined')."<br>\n"; +// Rebuild sequence +print 'Option rebuild_sequences, for postgresql only (\'test\' or \'confirmed\') is '.(GETPOST('rebuild_sequences', 'alpha') ?GETPOST('rebuild_sequences', 'alpha') : 'undefined').'<br>'."\n"; print '<br>'; print '<table cellspacing="0" cellpadding="1" border="0" width="100%">'; $error = 0; // If password is encoded, we decode it -if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) -{ +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)) - { + 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); + } else { + $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } } // $conf is already instancied inside inc.php @@ -115,8 +129,7 @@ $conf->db->dolibarr_main_db_cryptkey = isset($dolibarr_main_db_cryptkey) ? $doli $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); -if ($db->connected) -{ +if ($db->connected) { print '<tr><td class="nowrap">'; print $langs->trans("ServerConnection")." : $dolibarr_main_db_host</td><td class=\"right\">".$langs->trans("OK")."</td></tr>"; dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerConnection").": ".$dolibarr_main_db_host.$langs->transnoentities("OK")); @@ -127,10 +140,8 @@ if ($db->connected) $ok = 0; } -if ($ok) -{ - if ($db->database_selected) - { +if ($ok) { + if ($db->database_selected) { print '<tr><td class="nowrap">'; print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."</td><td class=\"right\">".$langs->trans("OK")."</td></tr>"; dolibarr_install_syslog("repair: database connection successful: ".$dolibarr_main_db_name); @@ -143,8 +154,7 @@ if ($ok) } // Show database version -if ($ok) -{ +if ($ok) { $version = $db->getVersion(); $versionarray = $db->getVersionArray(); print '<tr><td>'.$langs->trans("ServerVersion").'</td>'; @@ -155,7 +165,9 @@ if ($ok) $conf->setValues($db); // Reset forced setup after the setValues -if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); +if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); +} $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; @@ -164,10 +176,10 @@ $oneoptionset = 0; $oneoptionset = (GETPOST('standard', 'alpha') || GETPOST('restore_thirdparties_logos', 'alpha') || GETPOST('clean_linked_elements', 'alpha') || GETPOST('clean_menus', 'alpha') || GETPOST('clean_orphelin_dir', 'alpha') || GETPOST('clean_product_stock_batch', 'alpha') || GETPOST('set_empty_time_spent_amount', 'alpha') || GETPOST('rebuild_product_thumbs', 'alpha') || GETPOST('clean_perm_table', 'alpha') - || GETPOST('force_disable_of_modules_not_found', 'alpha') || GETPOST('force_utf8_on_tables', 'alpha')); + || GETPOST('force_disable_of_modules_not_found', 'alpha') || GETPOST('force_utf8_on_tables', 'alpha') + || GETPOST('rebuild_sequences', 'alpha')); -if ($ok && $oneoptionset) -{ +if ($ok && $oneoptionset) { // Show wait message print '<tr><td colspan="2">'.$langs->trans("PleaseBePatient").'<br><br></td></tr>'; flush(); @@ -175,8 +187,7 @@ if ($ok && $oneoptionset) // run_sql: Run repair SQL file -if ($ok && GETPOST('standard', 'alpha')) -{ +if ($ok && GETPOST('standard', 'alpha')) { $dir = "mysql/migration/"; $filelist = array(); @@ -186,26 +197,23 @@ if ($ok && GETPOST('standard', 'alpha')) // 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; + 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)) - { + foreach ($filesindir as $file) { + if (preg_match('/repair/i', $file)) { $filelist[] = $file; } } // Loop on each file - foreach ($filelist as $file) - { + foreach ($filelist as $file) { print '<tr><td class="nowrap">*** '; print $langs->trans("Script").'</td><td class="right">'.$file.'</td></tr>'; @@ -219,8 +227,7 @@ if ($ok && GETPOST('standard', 'alpha')) // sync_extrafields: Search list of fields declared and list of fields created into databases, then create fields missing -if ($ok && GETPOST('standard', 'alpha')) -{ +if ($ok && GETPOST('standard', 'alpha')) { $extrafields = new ExtraFields($db); $listofmodulesextra = array('societe'=>'societe', 'adherent'=>'adherent', 'product'=>'product', 'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture', @@ -228,8 +235,7 @@ if ($ok && GETPOST('standard', 'alpha')) 'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo', 'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task'); print '<tr><td colspan="2"><br>*** Check fields into extra table structure match table of definition. If not add column into table</td></tr>'; - foreach ($listofmodulesextra as $tablename => $elementtype) - { + foreach ($listofmodulesextra as $tablename => $elementtype) { // Get list of fields $tableextra = MAIN_DB_PREFIX.$tablename.'_extrafields'; @@ -239,15 +245,12 @@ if ($ok && GETPOST('standard', 'alpha')) // Define $arrayoffieldsfound $arrayoffieldsfound = array(); $resql = $db->DDLDescTable($tableextra); - if ($resql) - { + if ($resql) { print '<tr><td>Check availability of extra field for '.$tableextra."<br>\n"; $i = 0; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { $fieldname = $fieldtype = ''; - if (preg_match('/mysql/', $db->type)) - { + if (preg_match('/mysql/', $db->type)) { $fieldname = $obj->Field; $fieldtype = $obj->Type; } else { @@ -255,20 +258,22 @@ if ($ok && GETPOST('standard', 'alpha')) $fieldtype = isset($obj->Type) ? $obj->Type : 'varchar'; } - if (empty($fieldname)) continue; - if (in_array($fieldname, array('rowid', 'tms', 'fk_object', 'import_key'))) continue; + 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))) - { + 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') { + if ($type == 'boolean') { $typedb = 'int'; $lengthdb = '1'; } elseif ($type == 'price') { @@ -302,12 +307,10 @@ if ($ok && GETPOST('standard', 'alpha')) //var_dump($field_desc);exit; $result = 0; - if (GETPOST('standard', 'alpha') == 'confirmed') - { + if (GETPOST('standard', 'alpha') == 'confirmed') { $result = $db->DDLAddField($tableextra, $code, $field_desc, ""); - if ($result < 0) - { + if ($result < 0) { print "KO ".$db->lasterror."<br>\n"; } else { print "OK<br>\n"; @@ -327,15 +330,13 @@ if ($ok && GETPOST('standard', 'alpha')) // clean_data_ecm_dir: Clean data into ecm_directories table -if ($ok && GETPOST('standard', 'alpha')) -{ +if ($ok && GETPOST('standard', 'alpha')) { clean_data_ecm_directories(); } // clean declaration constants -if ($ok && GETPOST('standard', 'alpha')) -{ +if ($ok && GETPOST('standard', 'alpha')) { print '<tr><td colspan="2"><br>*** Clean constant record of modules not enabled</td></tr>'; $sql = "SELECT name, entity, value"; @@ -347,22 +348,18 @@ if ($ok && GETPOST('standard', 'alpha')) $sql .= " ORDER BY name, entity"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $db->begin(); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $reg = array(); - if (preg_match('/MAIN_MODULE_([^_]+)_(.+)/i', $obj->name, $reg)) - { + if (preg_match('/MAIN_MODULE_([^_]+)_(.+)/i', $obj->name, $reg)) { $name = $reg[1]; $type = $reg[2]; @@ -371,16 +368,13 @@ if ($ok && GETPOST('standard', 'alpha')) $sql2 .= " WHERE name = 'MAIN_MODULE_".$name."'"; $sql2 .= " AND entity = ".$obj->entity; $resql2 = $db->query($sql2); - if ($resql2) - { + if ($resql2) { $obj2 = $db->fetch_object($resql2); - if ($obj2 && $obj2->nb == 0) - { + if ($obj2 && $obj2->nb == 0) { // Module not found, so we can remove entry $sqldelete = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$db->escape($obj->name)."' AND entity = ".$obj->entity; - if (GETPOST('standard', 'alpha') == 'confirmed') - { + if (GETPOST('standard', 'alpha') == 'confirmed') { $db->query($sqldelete); print '<tr><td>Widget '.$obj->name.' set in entity '.$obj->entity.' with value '.$obj->value.' -> Module '.$name.' not enabled in entity '.$obj->entity.', we delete record</td></tr>'; @@ -405,30 +399,25 @@ if ($ok && GETPOST('standard', 'alpha')) // clean box of not enabled modules -if ($ok && GETPOST('standard', 'alpha')) -{ +if ($ok && GETPOST('standard', 'alpha')) { print '<tr><td colspan="2"><br>*** Clean definition of boxes of modules not enabled</td></tr>'; $sql = "SELECT file, entity FROM ".MAIN_DB_PREFIX."boxes_def"; $sql .= " WHERE file like '%@%'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $db->begin(); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $reg = array(); - if (preg_match('/^(.+)@(.+)$/i', $obj->file, $reg)) - { + if (preg_match('/^(.+)@(.+)$/i', $obj->file, $reg)) { $name = $reg[1]; $module = $reg[2]; @@ -438,17 +427,14 @@ if ($ok && GETPOST('standard', 'alpha')) $sql2 .= " AND entity = ".$obj->entity; $sql2 .= " AND value <> 0"; $resql2 = $db->query($sql2); - if ($resql2) - { + if ($resql2) { $obj2 = $db->fetch_object($resql2); - if ($obj2 && $obj2->nb == 0) - { + 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 = '".$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') - { + if (GETPOST('standard', 'alpha') == 'confirmed') { $db->query($sqldeletea); $db->query($sqldeleteb); @@ -472,8 +458,7 @@ if ($ok && GETPOST('standard', 'alpha')) // restore_thirdparties_logos: Move logos to correct new directory. -if ($ok && GETPOST('restore_thirdparties_logos')) -{ +if ($ok && GETPOST('restore_thirdparties_logos')) { //$exts=array('gif','png','jpg'); $ext = ''; @@ -482,13 +467,11 @@ if ($ok && GETPOST('restore_thirdparties_logos')) $sql = "SELECT s.rowid, s.nom as name, s.logo FROM ".MAIN_DB_PREFIX."societe as s ORDER BY s.nom"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); /* @@ -499,43 +482,37 @@ if ($ok && GETPOST('restore_thirdparties_logos')) $tmp = explode('.', $obj->logo); $name = $tmp[0]; - if (isset($tmp[1])) $ext = '.'.$tmp[1]; + if (isset($tmp[1])) { + $ext = '.'.$tmp[1]; + } - if (!empty($name)) - { + if (!empty($name)) { $filetotest = $dolibarr_main_data_root.'/societe/logos/'.$name.$ext; $filetotestsmall = $dolibarr_main_data_root.'/societe/logos/thumbs/'.$name.'_small'.$ext; $exists = dol_is_file($filetotest); print 'Check thirdparty '.$obj->rowid.' name='.$obj->name.' logo='.$obj->logo.' file '.$filetotest." exists=".$exists."<br>\n"; - if ($exists) - { + if ($exists) { $filetarget = $dolibarr_main_data_root.'/societe/'.$obj->rowid.'/logos/'.$name.$ext; $filetargetsmall = $dolibarr_main_data_root.'/societe/'.$obj->rowid.'/logos/thumbs/'.$name.'_small'.$ext; $existt = dol_is_file($filetarget); - if (!$existt) - { - if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') - { + if (!$existt) { + if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') { dol_mkdir($dolibarr_main_data_root.'/societe/'.$obj->rowid.'/logos'); } print " &nbsp; &nbsp; &nbsp; -> Copy file ".$filetotest." -> ".$filetarget."<br>\n"; - if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') - { + if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') { dol_copy($filetotest, $filetarget, '', 0); } } $existtt = dol_is_file($filetargetsmall); - if (!$existtt) - { - if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') - { + if (!$existtt) { + if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') { dol_mkdir($dolibarr_main_data_root.'/societe/'.$obj->rowid.'/logos/thumbs'); } print " &nbsp; &nbsp; &nbsp; -> Copy file ".$filetotestsmall." -> ".$filetargetsmall."<br>\n"; - if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') - { + if (GETPOST('restore_thirdparties_logos', 'alpha') == 'confirmed') { dol_copy($filetotestsmall, $filetargetsmall, '', 0); } } @@ -555,8 +532,7 @@ if ($ok && GETPOST('restore_thirdparties_logos')) // restore_user_pictures: Move pictures to correct new directory. -if ($ok && GETPOST('restore_user_pictures', 'alpha')) -{ +if ($ok && GETPOST('restore_user_pictures', 'alpha')) { //$exts=array('gif','png','jpg'); $ext = ''; @@ -565,13 +541,11 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) $sql = "SELECT s.rowid, s.firstname, s.lastname, s.login, s.photo FROM ".MAIN_DB_PREFIX."user as s ORDER BY s.rowid"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); /* @@ -582,62 +556,53 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) $tmp = explode('.', $obj->photo); $name = $tmp[0]; - if (isset($tmp[1])) $ext = '.'.$tmp[1]; + if (isset($tmp[1])) { + $ext = '.'.$tmp[1]; + } - if (!empty($name)) - { + if (!empty($name)) { $filetotest = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/'.$name.$ext; $filetotestsmall = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_small'.$ext; $filetotestmini = $dolibarr_main_data_root.'/users/'.substr(sprintf('%08d', $obj->rowid), -1, 1).'/'.substr(sprintf('%08d', $obj->rowid), -2, 1).'/thumbs/'.$name.'_mini'.$ext; $exists = dol_is_file($filetotest); print 'Check user '.$obj->rowid.' lastname='.$obj->lastname.' fistname='.$obj->firstname.' photo='.$obj->photo.' file '.$filetotest." exists=".$exists."<br>\n"; - if ($exists) - { + if ($exists) { $filetarget = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/'.$name.$ext; $filetargetsmall = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs/'.$name.'_small'.$ext; $filetargetmini = $dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs/'.$name.'_mini'.$ext; $existt = dol_is_file($filetarget); - if (!$existt) - { - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (!$existt) { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_mkdir($dolibarr_main_data_root.'/users/'.$obj->rowid); } print " &nbsp; &nbsp; &nbsp; -> Copy file ".$filetotest." -> ".$filetarget."<br>\n"; - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_copy($filetotest, $filetarget, '', 0); } } $existtt = dol_is_file($filetargetsmall); - if (!$existtt) - { - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (!$existtt) { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_mkdir($dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs'); } print " &nbsp; &nbsp; &nbsp; -> Copy file ".$filetotestsmall." -> ".$filetargetsmall."<br>\n"; - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_copy($filetotestsmall, $filetargetsmall, '', 0); } } $existtt = dol_is_file($filetargetmini); - if (!$existtt) - { - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (!$existtt) { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_mkdir($dolibarr_main_data_root.'/users/'.$obj->rowid.'/thumbs'); } print " &nbsp; &nbsp; &nbsp; -> Copy file ".$filetotestmini." -> ".$filetargetmini."<br>\n"; - if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') - { + if (GETPOST('restore_user_pictures', 'alpha') == 'confirmed') { dol_copy($filetotestmini, $filetargetmini, '', 0); } } @@ -656,8 +621,7 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) // rebuild_product_thumbs: Rebuild thumbs for product files -if ($ok && GETPOST('rebuild_product_thumbs', 'alpha')) -{ +if ($ok && GETPOST('rebuild_product_thumbs', 'alpha')) { $ext = ''; global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini; @@ -665,33 +629,26 @@ if ($ok && GETPOST('rebuild_product_thumbs', 'alpha')) $sql = "SELECT s.rowid, s.ref FROM ".MAIN_DB_PREFIX."product as s ORDER BY s.ref"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if (!empty($obj->ref)) - { + if (!empty($obj->ref)) { $files = dol_dir_list($dolibarr_main_data_root.'/produit/'.$obj->ref, 'files', 0); - foreach ($files as $file) - { + foreach ($files as $file) { // Generate thumbs. - if (image_format_supported($file['fullname']) == 1) - { + if (image_format_supported($file['fullname']) == 1) { $imgThumbSmall = 'notbuild'; - if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') - { + 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."<br>\n"; $imgThumbMini = 'notbuild'; - if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') - { + 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"); @@ -712,8 +669,7 @@ if ($ok && GETPOST('rebuild_product_thumbs', 'alpha')) } // clean_linked_elements: Check and clean linked elements -if ($ok && GETPOST('clean_linked_elements', 'alpha')) -{ +if ($ok && GETPOST('clean_linked_elements', 'alpha')) { print '<tr><td colspan="2"><br>*** Check table of linked elements and delete orphelins links</td></tr>'; // propal => order print '<tr><td colspan="2">'.checkLinkedElements('propal', 'commande')."</td></tr>\n"; @@ -736,8 +692,7 @@ if ($ok && GETPOST('clean_linked_elements', 'alpha')) // clean_menus: Check orphelins menus -if ($ok && GETPOST('clean_menus', 'alpha')) -{ +if ($ok && GETPOST('clean_menus', 'alpha')) { print '<tr><td colspan="2"><br>*** Clean menu entries coming from disabled modules</td></tr>'; $sql = "SELECT rowid, module"; @@ -746,14 +701,11 @@ if ($ok && GETPOST('clean_menus', 'alpha')) $sql .= " ORDER BY module"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $modulecond = $obj->module; @@ -764,30 +716,33 @@ if ($ok && GETPOST('clean_menus', 'alpha')) $db->begin(); - if ($modulecond) // And menu entry for module $modulecond was found in database. - { + if ($modulecond) { // And menu entry for module $modulecond was found in database. $moduleok = 0; - foreach ($modulecondarray as $tmpname) - { - if ($tmpname == 'margins') $tmpname = 'margin'; // TODO Remove this when normalized + foreach ($modulecondarray as $tmpname) { + if ($tmpname == 'margins') { + $tmpname = 'margin'; // TODO Remove this when normalized + } $result = 0; - if (!empty($conf->$tmpname)) $result = $conf->$tmpname->enabled; - if ($result) $moduleok++; + if (!empty($conf->$tmpname)) { + $result = $conf->$tmpname->enabled; + } + if ($result) { + $moduleok++; + } } - if (!$moduleok && $modulecond) - { + if (!$moduleok && $modulecond) { print ' - Module condition '.$modulecond.' seems ko, we delete menu entry.'; - if (GETPOST('clean_menus') == 'confirmed') - { + if (GETPOST('clean_menus') == 'confirmed') { $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE module = '".$db->escape($modulecond)."'"; $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); - } else print ' - <span class="warning">Cleaned</span>'; + } else { + print ' - <span class="warning">Cleaned</span>'; + } } else { print ' - <span class="warning">Canceled (test mode)</span>'; } @@ -796,12 +751,17 @@ if ($ok && GETPOST('clean_menus', 'alpha')) } } - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } print'</td></tr>'; - if ($error) break; + if ($error) { + break; + } $i++; } @@ -816,70 +776,72 @@ if ($ok && GETPOST('clean_menus', 'alpha')) // clean_orphelin_dir: Run purge of directory -if ($ok && GETPOST('clean_orphelin_dir', 'alpha')) -{ +if ($ok && GETPOST('clean_orphelin_dir', 'alpha')) { $listmodulepart = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'tax'); - foreach ($listmodulepart as $modulepart) - { + 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 ($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 '<tr><td colspan="2"><br>*** Clean orphelins files into files '.$upload_dir.'</td></tr>'; $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') - { + if ($modulepart == 'company') { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $object_instance = new Societe($db); } - if ($modulepart == 'invoice') - { + if ($modulepart == 'invoice') { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance = new Facture($db); - } elseif ($modulepart == 'invoice_supplier') - { + } elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance = new FactureFournisseur($db); - } elseif ($modulepart == 'propal') - { + } elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance = new Propal($db); - } elseif ($modulepart == 'order') - { + } elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance = new Commande($db); - } elseif ($modulepart == 'order_supplier') - { + } elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance = new CommandeFournisseur($db); - } elseif ($modulepart == 'contract') - { + } elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance = new Contrat($db); - } elseif ($modulepart == 'tax') - { + } elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance = new ChargeSociales($db); } - foreach ($filearray as $key => $file) - { + 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']); @@ -909,23 +871,22 @@ if ($ok && GETPOST('clean_orphelin_dir', 'alpha')) preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = $reg[1]; } - if ($id || $ref) - { + if ($id || $ref) { //print 'Fetch '.$id.' or '.$ref.'<br>'; $result = $object_instance->fetch($id, $ref); //print $result.'<br>'; - if ($result == 0) // Not found but no error - { + if ($result == 0) { // Not found but no error // Clean of orphelins directories are done into repair.php print '<tr><td colspan="2">'; print 'Delete orphelins file '.$file['fullname'].'<br>'; - if (GETPOST('clean_orphelin_dir', 'alpha') == 'confirmed') - { + if (GETPOST('clean_orphelin_dir', 'alpha') == 'confirmed') { dol_delete_file($file['fullname'], 1, 1, 1); dol_delete_dir(dirname($file['fullname']), 1); } print "</td></tr>"; - } elseif ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'<br>'; + } elseif ($result < 0) { + print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'<br>'; + } } } } @@ -933,8 +894,7 @@ if ($ok && GETPOST('clean_orphelin_dir', 'alpha')) } // clean_linked_elements: Check and clean linked elements -if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) -{ +if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) { $methodtofix = GETPOST('methodtofix', 'alpha') ?GETPOST('methodtofix', 'alpha') : 'updatestock'; print '<tr><td colspan="2"><br>*** Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)</td></tr>'; @@ -942,37 +902,30 @@ if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) $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 .= " AND p.tobatch > 0"; $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) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr><td>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') - { + 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') - { + 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) - { + 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).")"; @@ -980,26 +933,22 @@ if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) } } } - if ($methodtofix == 'updatestock') - { + 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') - { + print ' -> Update qty of product_stock with qty = '.($obj->reelbatch ? ((float) $obj->reelbatch) : '0').' for ps.rowid = '.((int) $obj->psrowid); + if (GETPOST('clean_product_stock_batch') == 'confirmed') { $error = 0; $db->begin(); $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_stock"; - $sql2 .= " SET reel = ".($obj->reelbatch ? $obj->reelbatch : '0')." WHERE rowid = ".$obj->psrowid; + $sql2 .= " SET reel = ".($obj->reelbatch ? ((float) $obj->reelbatch) : '0')." WHERE rowid = ".((int) $obj->psrowid); $resql2 = $db->query($sql2); - if ($resql2) - { + 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) - { + if (!$resql3) { $error++; dol_print_error($db); } @@ -1008,8 +957,11 @@ if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) dol_print_error($db); } - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } } } } @@ -1028,26 +980,22 @@ if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) // clean_product_stock_negative_if_batch -if ($ok && GETPOST('clean_product_stock_negative_if_batch', 'alpha')) -{ +if ($ok && GETPOST('clean_product_stock_negative_if_batch', 'alpha')) { print '<tr><td colspan="2"><br>Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)</td></tr>'; $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 .= " AND p.tobatch > 0"; $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) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr><td>'.$obj->rowid.'-'.$obj->ref.'-'.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' != '.$obj->reelbatch; @@ -1058,8 +1006,7 @@ if ($ok && GETPOST('clean_product_stock_negative_if_batch', 'alpha')) } // set_empty_time_spent_amount -if ($ok && GETPOST('set_empty_time_spent_amount', 'alpha')) -{ +if ($ok && GETPOST('set_empty_time_spent_amount', 'alpha')) { print '<tr><td colspan="2"><br>*** Set value of time spent without amount</td></tr>'; $sql = "SELECT COUNT(ptt.rowid) as nb, u.rowid as user_id, u.login, u.thm as user_thm"; @@ -1069,38 +1016,38 @@ if ($ok && GETPOST('set_empty_time_spent_amount', 'alpha')) $sql .= " GROUP BY u.rowid, u.login, u.thm"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr><td>'.$obj->login.'-'.$obj->user_id.' ('.$obj->nb.' lines to fix) -> '.$obj->user_thm; $db->begin(); - if (GETPOST('set_empty_time_spent_amount') == 'confirmed') - { + 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; + $sql2 .= " SET thm = ".$obj->user_thm." WHERE thm IS NULL AND fk_user = ".((int) $obj->user_id); $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } } - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } print'</td></tr>'; - if ($error) break; + if ($error) { + break; + } $i++; } @@ -1114,28 +1061,23 @@ if ($ok && GETPOST('set_empty_time_spent_amount', 'alpha')) // force_disable_of_modules_not_found -if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) -{ +if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) { print '<tr><td colspan="2"><br>*** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)</td></tr>'; $arraylistofkey = array('hooks', 'js', 'css'); - foreach ($arraylistofkey as $key) - { + 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) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $constantname = $obj->name; // Name of constant for hook or js or css declaration @@ -1145,62 +1087,58 @@ if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) $db->begin(); $reg = array(); - if (preg_match('/MAIN_MODULE_(.*)_'.strtoupper($key).'/i', $constantname, $reg)) - { + 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. - { + 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') - { + 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') - { + 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 + 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) - { + if ($reloffile) { //var_dump($key.' - '.$value.' - '.$reloffile); try { $result = dol_buildpath($reloffile, 0, 2); - } catch (Exception $e) - { + } catch (Exception $e) { // No catch yet $result = 'found'; // If error, we force lke if we found to avoid any deletion } } - if (!$result) - { + if (!$result) { print ' - File of '.$key.' ('.$reloffile.') NOT found, we disable the module.'; - if (GETPOST('force_disable_of_modules_not_found') == 'confirmed') - { + 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) - { + 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) - { + if (!$resql3) { $error++; dol_print_error($db); - } else print ' - <span class="warning">Cleaned</span>'; + } else { + print ' - <span class="warning">Cleaned</span>'; + } } else { print ' - <span class="warning">Canceled (test mode)</span>'; } @@ -1209,13 +1147,18 @@ if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) } } - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } } print'</td></tr>'; - if ($error) break; + if ($error) { + break; + } $i++; } @@ -1230,35 +1173,27 @@ if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) // clean_old_module_entries: Clean data into const when files of module were removed without being -if ($ok && GETPOST('clean_perm_table', 'alpha')) -{ +if ($ok && GETPOST('clean_perm_table', 'alpha')) { print '<tr><td colspan="2"><br>*** Clean table user_rights from lines of external modules no more enabled</td></tr>'; $listofmods = ''; - foreach ($conf->modules as $key => $val) - { + foreach ($conf->modules as $key => $val) { $listofmods .= ($listofmods ? ',' : '')."'".$val."'"; } - $sql = 'SELECT id, libelle as label, module from '.MAIN_DB_PREFIX.'rights_def WHERE module not in ('.$listofmods.') AND id > 100000'; + $sql = 'SELECT id, libelle as label, module from '.MAIN_DB_PREFIX.'rights_def WHERE module NOT IN ('.$db->sanitize($listofmods).') AND id > 100000'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj->id > 0) - { + if ($obj->id > 0) { print '<tr><td>Found line with id '.$obj->id.', label "'.$obj->label.'" of module "'.$obj->module.'" to delete'; - if (GETPOST('clean_perm_table', 'alpha') == 'confirmed') - { + if (GETPOST('clean_perm_table', 'alpha') == 'confirmed') { $sqldelete = 'DELETE FROM '.MAIN_DB_PREFIX.'rights_def WHERE id = '.$obj->id; $resqldelete = $db->query($sqldelete); - if (!$resqldelete) - { + if (!$resqldelete) { dol_print_error($db); } print ' - deleted'; @@ -1278,44 +1213,42 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) // force utf8 on tables -if ($ok && GETPOST('force_utf8_on_tables', 'alpha')) -{ +if ($ok && GETPOST('force_utf8_on_tables', 'alpha')) { print '<tr><td colspan="2"><br>*** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)</td></tr>'; - if ($db->type == "mysql" || $db->type == "mysqli") - { + if ($db->type == "mysql" || $db->type == "mysqli") { $force_utf8_on_tables = GETPOST('force_utf8_on_tables', 'alpha'); $listoftables = $db->DDLListTables($db->database_name); // Disable foreign key checking for avoid errors - if ($force_utf8_on_tables == 'confirmed') - { + if ($force_utf8_on_tables == 'confirmed') { $sql = 'SET FOREIGN_KEY_CHECKS=0'; print '<!-- '.$sql.' -->'; $resql = $db->query($sql); } - foreach ($listoftables as $table) - { + 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; + if ($conf->db->dolibarr_main_db_encryption != 0 && preg_match('/\_const$/', $table)) { + continue; + } print '<tr><td colspan="2">'; print $table; $sql = 'ALTER TABLE '.$table.' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci'; print '<!-- '.$sql.' -->'; - if ($force_utf8_on_tables == 'confirmed') - { + if ($force_utf8_on_tables == 'confirmed') { $resql = $db->query($sql); print ' - Done ('.($resql ? 'OK' : 'KO').')'; - } else print ' - Disabled'; + } else { + print ' - Disabled'; + } print '</td></tr>'; } // Enable foreign key checking - if ($force_utf8_on_tables == 'confirmed') - { + if ($force_utf8_on_tables == 'confirmed') { $sql = 'SET FOREIGN_KEY_CHECKS=1'; print '<!-- '.$sql.' -->'; $resql = $db->query($sql); @@ -1325,30 +1258,102 @@ if ($ok && GETPOST('force_utf8_on_tables', 'alpha')) } } +// force utf8mb4 on tables EXPERIMENTAL ! +if ($ok && GETPOST('force_utf8mb4_on_tables', 'alpha')) { + print '<tr><td colspan="2"><br>*** Force page code and collation of tables into utf8mb4/utf8mb4_unicode_ci (for mysql/mariadb only)</td></tr>'; + + if ($db->type == "mysql" || $db->type == "mysqli") { + $force_utf8mb4_on_tables = GETPOST('force_utf8mb4_on_tables', 'alpha'); + + $listoftables = $db->DDLListTables($db->database_name); + + // Disable foreign key checking for avoid errors + if ($force_utf8mb4_on_tables == 'confirmed') { + $sql = 'SET FOREIGN_KEY_CHECKS=0'; + print '<!-- '.$sql.' -->'; + $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; + } + + print '<tr><td colspan="2">'; + print $table; + $sql1 = 'ALTER TABLE '.$table.' ROW_FORMAT=dynamic;'; + $sql2 = 'ALTER TABLE '.$table.' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci'; + print '<!-- '.$sql1.' -->'; + print '<!-- '.$sql2.' -->'; + if ($force_utf8mb4_on_tables == 'confirmed') { + $resql1 = $db->query($sql1); + if ($resql1) { + $resql2 = $db->query($sql2); + } else { + $resql2 = false; + } + print ' - Done ('.(($resql1 && $resql2) ? 'OK' : 'KO').')'; + } else { + print ' - Disabled'; + } + print '</td></tr>'; + flush(); + ob_flush(); + } + + // Enable foreign key checking + if ($force_utf8mb4_on_tables == 'confirmed') { + $sql = 'SET FOREIGN_KEY_CHECKS=1'; + print '<!-- '.$sql.' -->'; + $resql = $db->query($sql); + } + } else { + print '<tr><td colspan="2">Not available with database type '.$db->type.'</td></tr>'; + } +} + +// rebuild sequences for pgsql +if ($ok && GETPOST('rebuild_sequences', 'alpha')) { + print '<tr><td colspan="2"><br>*** Force to rebuild sequences (for postgresql only)</td></tr>'; + + if ($db->type == "pgsql") { + $rebuild_sequence = GETPOST('rebuild_sequences', 'alpha'); + + if ($rebuild_sequence == 'confirmed') { + $sql = "SELECT dol_util_rebuild_sequences();"; + print '<!-- '.$sql.' -->'; + $resql = $db->query($sql); + } + } else { + print '<tr><td colspan="2">Not available with database type '.$db->type.'</td></tr>'; + } +} + // 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. - * - * Version 3.8 introduces a new column in llx_commande_fournisseur_dispatch, which - * matches the dispatch to a specific supplier order line (so that if there are - * several with the same product, the user can specifically tell which products of - * which line were dispatched where). - * - * However when migrating, the new column has a default value of 0, which means that - * old supplier orders whose lines were dispatched using the old dolibarr version - * have unspecific dispatch lines, which are not taken into account by the new version, - * thus making the order look like it was never dispatched at all. - * - * This scripts sets this foreign key to the first matching supplier order line whose - * product (and supplier order of course) are the same as the dispatch’s. - * - * If the dispatched quantity is more than indicated on the order line (this happens if - * there are several order lines for the same product), it creates new dispatch lines - * pointing to the other order lines accordingly, until all the dispatched quantity is - * accounted for. - */ + * This script is meant to be run when upgrading from a dolibarr version < 3.8 + * to a newer version. + * + * Version 3.8 introduces a new column in llx_commande_fournisseur_dispatch, which + * matches the dispatch to a specific supplier order line (so that if there are + * several with the same product, the user can specifically tell which products of + * which line were dispatched where). + * + * However when migrating, the new column has a default value of 0, which means that + * old supplier orders whose lines were dispatched using the old dolibarr version + * have unspecific dispatch lines, which are not taken into account by the new version, + * thus making the order look like it was never dispatched at all. + * + * This scripts sets this foreign key to the first matching supplier order line whose + * product (and supplier order of course) are the same as the dispatch’s. + * + * If the dispatched quantity is more than indicated on the order line (this happens if + * there are several order lines for the same product), it creates new dispatch lines + * pointing to the other order lines accordingly, until all the dispatched quantity is + * accounted for. + */ $repair_link_dispatch_lines_supplier_order_lines = GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha'); @@ -1368,8 +1373,8 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { } 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; + $sql_line .= ' WHERE line.fk_commande = '.((int) $obj_dispatch->fk_commande); + $sql_line .= ' AND line.fk_product = '.((int) $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, @@ -1384,17 +1389,21 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { $n_processed_rows++; continue; } - if ($db->num_rows($resql_line) == 0) continue; + if ($db->num_rows($resql_line) == 0) { + continue; + } while ($obj_line = $db->fetch_object($resql_line)) { - if (!$remaining_qty) break; + 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; + $sql_attach .= ' SET fk_commandefourndet = '.((int) $obj_line->rowid).', qty = '.((float) $qty_for_line); + $sql_attach .= ' WHERE rowid = '.((int) $obj_dispatch->rowid); $first_iteration = false; } else { $sql_attach_values = array( @@ -1419,8 +1428,7 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { $sql_attach .= ' VALUES ('.$sql_attach_values.')'; } - if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') - { + if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') { $resql_attach = $db->query($sql_attach); } else { $resql_attach = true; // Force success in test mode @@ -1466,13 +1474,11 @@ print '</table>'; -if (empty($actiondone)) -{ +if (empty($actiondone)) { print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>'; } -if ($oneoptionset) -{ +if ($oneoptionset) { print '<div class="center" style="padding-top: 10px"><a href="../index.php?mainmenu=home&leftmenu=home'.(GETPOSTISSET("login") ? '&username='.urlencode(GETPOST("login")) : '').'">'; print $langs->trans("GoToDolibarr"); print '</a></div>'; @@ -1485,7 +1491,11 @@ if ($oneoptionset) dolibarr_install_syslog("--- repair: end"); pFooter(1, $setuplang); -if ($db->connected) $db->close(); +if ($db->connected) { + $db->close(); +} // Return code if ran from command line -if (!$ok && isset($argv[1])) exit(1); +if (!$ok && isset($argv[1])) { + exit(1); +} diff --git a/htdocs/install/sqlite3/functions/index.html b/htdocs/install/sqlite3/functions/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/install/sqlite3/functions/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/install/sqlite3/index.html b/htdocs/install/sqlite3/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 5b99649cf1a..86e970f8194 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -75,14 +75,18 @@ $_SESSION['dol_save_pass'] = $db_pass; // Now we load forced values from install.forced.php file. $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; // If forced install is enabled, replace the post values. These are empty because form fields are disabled. if ($force_install_noedit) { $main_dir = detect_dolibarr_main_document_root(); - if (!empty($argv[1])) $main_dir = $argv[1]; // override when executing the script in command line + if (!empty($argv[1])) { + $main_dir = $argv[1]; // override when executing the script in command line + } if (!empty($force_install_main_data_root)) { $main_data_dir = $force_install_main_data_root; } else { @@ -148,8 +152,7 @@ dolibarr_install_syslog("--- step1: entering step1.php page"); pHeader($langs->trans("ConfigurationFile"), "step2"); // Test if we can run a first install process -if (!is_writable($conffile)) -{ +if (!is_writable($conffile)) { print $langs->trans("ConfFileIsNotWritable", $conffiletoshow); pFooter(1, $setuplang, 'jscheckparam'); exit; @@ -158,57 +161,48 @@ if (!is_writable($conffile)) // Check parameters $is_sqlite = false; -if (empty($db_type)) -{ +if (empty($db_type)) { print '<div class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentities("DatabaseType")).'</div>'; $error++; } else { $is_sqlite = ($db_type === 'sqlite' || $db_type === 'sqlite3'); } -if (empty($db_host) && !$is_sqlite) -{ +if (empty($db_host) && !$is_sqlite) { print '<div class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentities("Server")).'</div>'; $error++; } -if (empty($db_name)) -{ +if (empty($db_name)) { print '<div class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentities("DatabaseName")).'</div>'; $error++; } -if (empty($db_user) && !$is_sqlite) -{ +if (empty($db_user) && !$is_sqlite) { print '<div class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentities("Login")).'</div>'; $error++; } -if (!empty($db_port) && !is_numeric($db_port)) -{ +if (!empty($db_port) && !is_numeric($db_port)) { print '<div class="error">'.$langs->trans("ErrorBadValueForParameter", $db_port, $langs->transnoentities("Port")).'</div>'; $error++; } -if (!empty($db_prefix) && !preg_match('/^[a-z0-9]+_$/i', $db_prefix)) -{ +if (!empty($db_prefix) && !preg_match('/^[a-z0-9]+_$/i', $db_prefix)) { print '<div class="error">'.$langs->trans("ErrorBadValueForParameter", $db_prefix, $langs->transnoentities("DatabasePrefix")).'</div>'; $error++; } // Remove last / into dans main_dir -if (substr($main_dir, dol_strlen($main_dir) - 1) == "/") -{ +if (substr($main_dir, dol_strlen($main_dir) - 1) == "/") { $main_dir = substr($main_dir, 0, dol_strlen($main_dir) - 1); } // Remove last / into dans main_url -if (!empty($main_url) && substr($main_url, dol_strlen($main_url) - 1) == "/") -{ +if (!empty($main_url) && substr($main_url, dol_strlen($main_url) - 1) == "/") { $main_url = substr($main_url, 0, dol_strlen($main_url) - 1); } // Test database connection if (!$error) { $result = @include_once $main_dir."/core/db/".$db_type.'.class.php'; - if ($result) - { + if ($result) { // If we require database or user creation we need to connect as root, so we need root login credentials if (!empty($db_create_database) && !$userroot) { print '<div class="error">'.$langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect", $db_name).'</div>'; @@ -229,17 +223,14 @@ if (!$error) { if (!$error && (!empty($db_create_database) || !empty($db_create_user))) { $databasefortest = $db_name; if (!empty($db_create_database)) { - if ($db_type == 'mysql' || $db_type == 'mysqli') - { + if ($db_type == 'mysql' || $db_type == 'mysqli') { $databasefortest = 'mysql'; - } elseif ($db_type == 'pgsql') - { + } elseif ($db_type == 'pgsql') { $databasefortest = 'postgres'; } else { $databasefortest = 'master'; } } - //print $_POST["db_type"].",".$_POST["db_host"].",$userroot,$passroot,$databasefortest,".$_POST["db_port"]; $db = getDoliDBInstance($db_type, $db_host, $userroot, $passroot, $databasefortest, $db_port); @@ -249,14 +240,21 @@ if (!$error) { if (empty($db_create_database) && $db->connected && !$db->database_selected) { print '<div class="error">'.$langs->trans("ErrorConnectedButDatabaseNotFound", $db_name).'</div>'; print '<br>'; - if (!$db->connected) print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").'<br><br>'; + if (!$db->connected) { + print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").'<br><br>'; + } print $langs->trans("ErrorGoBackAndCorrectParameters"); $error++; } elseif ($db->error && !(!empty($db_create_database) && $db->connected)) { // Note: you may experience error here with message "No such file or directory" when mysql was installed for the first time but not yet launched. - if ($db->error == "No such file or directory") print '<div class="error">'.$langs->trans("ErrorToConnectToMysqlCheckInstance").'</div>'; - else print '<div class="error">'.$db->error.'</div>'; - if (!$db->connected) print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + if ($db->error == "No such file or directory") { + print '<div class="error">'.$langs->trans("ErrorToConnectToMysqlCheckInstance").'</div>'; + } else { + print '<div class="error">'.$db->error.'</div>'; + } + if (!$db->connected) { + print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + } //print '<a href="#" onClick="javascript: history.back();">'; print $langs->trans("ErrorGoBackAndCorrectParameters"); //print '</a>'; @@ -267,10 +265,11 @@ if (!$error) { if (!$error && (empty($db_create_database) && empty($db_create_user))) { $db = getDoliDBInstance($db_type, $db_host, $db_user, $db_pass, $db_name, $db_port); - if ($db->error) - { + if ($db->error) { print '<div class="error">'.$db->error.'</div>'; - if (!$db->connected) print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + if (!$db->connected) { + print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + } //print '<a href="#" onClick="javascript: history.back();">'; print $langs->trans("ErrorGoBackAndCorrectParameters"); //print '</a>'; @@ -286,18 +285,20 @@ if (!$error) { $error++; } } else { - if (isset($db)) print $db->lasterror(); - if (isset($db) && !$db->connected) print '<br>'.$langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + if (isset($db)) { + print $db->lasterror(); + } + if (isset($db) && !$db->connected) { + print '<br>'.$langs->trans("BecauseConnectionFailedParametersMayBeWrong").'<br><br>'; + } print $langs->trans("ErrorGoBackAndCorrectParameters"); $error++; } -if (!$error && $db->connected) -{ +if (!$error && $db->connected) { if (!empty($db_create_database)) { $result = $db->select_db($db_name); - if ($result) - { + if ($result) { print '<div class="error">'.$langs->trans("ErrorDatabaseAlreadyExists", $db_name).'</div>'; print $langs->trans("IfDatabaseExistsGoBackAndCheckCreate").'<br><br>'; print $langs->trans("ErrorGoBackAndCorrectParameters"); @@ -307,10 +308,8 @@ if (!$error && $db->connected) } // Define $defaultCharacterSet and $defaultDBSortingCollation -if (!$error && $db->connected) -{ - if (!empty($db_create_database)) // If we create database, we force default value - { +if (!$error && $db->connected) { + if (!empty($db_create_database)) { // If we create database, we force default value // Default values come from the database handler $defaultCharacterSet = $db->forcecharset; @@ -323,8 +322,7 @@ if (!$error && $db->connected) // Force to avoid utf8mb4 because index on field char 255 reach limit of 767 char for indexes (example with mysql 5.6.34 = mariadb 10.0.29) // TODO Remove this when utf8mb4 is supported - if ($defaultCharacterSet == 'utf8mb4' || $defaultDBSortingCollation == 'utf8mb4_unicode_ci') - { + if ($defaultCharacterSet == 'utf8mb4' || $defaultDBSortingCollation == 'utf8mb4_unicode_ci') { $defaultCharacterSet = 'utf8'; $defaultDBSortingCollation = 'utf8_unicode_ci'; } @@ -338,13 +336,10 @@ if (!$error && $db->connected) // Create config file -if (!$error && $db->connected && $action == "set") -{ +if (!$error && $db->connected && $action == "set") { umask(0); - if (is_array($_POST)) - { - foreach ($_POST as $key => $value) - { + if (is_array($_POST)) { + foreach ($_POST as $key => $value) { if (!preg_match('/^db_pass/i', $key)) { dolibarr_install_syslog("step1: choice for ".$key." = ".$value); } @@ -356,10 +351,8 @@ if (!$error && $db->connected && $action == "set") print '<table cellspacing="0" width="100%" cellpadding="1" border="0">'; // Check parameter main_dir - if (!$error) - { - if (!is_dir($main_dir)) - { + if (!$error) { + if (!is_dir($main_dir)) { dolibarr_install_syslog("step1: directory '".$main_dir."' is unavailable or can't be accessed"); print "<tr><td>"; @@ -373,23 +366,19 @@ if (!$error && $db->connected && $action == "set") } } - if (!$error) - { + if (!$error) { dolibarr_install_syslog("step1: directory '".$main_dir."' exists"); } // Create subdirectory main_data_dir - if (!$error) - { + if (!$error) { // Create directory for documents - if (!is_dir($main_data_dir)) - { + if (!is_dir($main_data_dir)) { dol_mkdir($main_data_dir); } - if (!is_dir($main_data_dir)) - { + if (!is_dir($main_data_dir)) { print "<tr><td>".$langs->trans("ErrorDirDoesNotExists", $main_data_dir); print ' '.$langs->trans("YouMustCreateItAndAllowServerToWrite"); print '</td><td>'; @@ -400,12 +389,10 @@ if (!$error && $db->connected && $action == "set") } else { // Create .htaccess file in document directory $pathhtaccess = $main_data_dir.'/.htaccess'; - if (!file_exists($pathhtaccess)) - { + if (!file_exists($pathhtaccess)) { dolibarr_install_syslog("step1: .htaccess file did not exist, we created it in '".$main_data_dir."'"); $handlehtaccess = @fopen($pathhtaccess, 'w'); - if ($handlehtaccess) - { + if ($handlehtaccess) { fwrite($handlehtaccess, 'Order allow,deny'."\n"); fwrite($handlehtaccess, 'Deny from all'."\n"); @@ -427,14 +414,11 @@ if (!$error && $db->connected && $action == "set") // Loop on each directory of dir [] to create them if they do not exist $num = count($dir); - for ($i = 0; $i < $num; $i++) - { - if (is_dir($dir[$i])) - { + for ($i = 0; $i < $num; $i++) { + if (is_dir($dir[$i])) { dolibarr_install_syslog("step1: directory '".$dir[$i]."' exists"); } else { - if (dol_mkdir($dir[$i]) < 0) - { + if (dol_mkdir($dir[$i]) < 0) { print "<tr><td>"; print "Failed to create directory: ".$dir[$i]; print '</td><td>'; @@ -454,8 +438,7 @@ if (!$error && $db->connected && $action == "set") $destroot = $main_data_dir.'/medias'; dolCopyDir($srcroot, $destroot, 0, 0); - if ($error) - { + if ($error) { print "<tr><td>".$langs->trans("ErrorDirDoesNotExists", $main_data_dir); print ' '.$langs->trans("YouMustCreateItAndAllowServerToWrite"); print '</td><td>'; @@ -480,16 +463,14 @@ if (!$error && $db->connected && $action == "set") 'usergroups' => 'usergroups', 'users' => 'user', ); - foreach ($docs as $cursordir => $cursorfile) - { + foreach ($docs as $cursordir => $cursorfile) { $src = $srcroot.'/'.$cursordir.'/template_'.$cursorfile.'.odt'; $dirodt = $destroot.'/'.$cursordir; $dest = $dirodt.'/template_'.$cursorfile.'.odt'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { print '<tr><td colspan="2"><br>'.$langs->trans('ErrorFailToCopyFile', $src, $dest).'</td></tr>'; } } @@ -501,11 +482,9 @@ if (!$error && $db->connected && $action == "set") $main_db_prefix = (!empty($db_prefix) ? $db_prefix : 'llx_'); // Write conf file on disk - if (!$error) - { + if (!$error) { // Save old conf file on disk - if (file_exists("$conffile")) - { + if (file_exists("$conffile")) { // We must ignore errors as an existing old file may already exist and not be replaceable or // the installer (like for ubuntu) may not have permission to create another file than conf.php. // Also no other process must be able to read file or we expose the new file, so content with password. @@ -516,8 +495,7 @@ if (!$error && $db->connected && $action == "set") } // Create database and admin user database - if (!$error) - { + if (!$error) { // We reload configuration file conf($dolibarr_main_document_root); @@ -532,14 +510,11 @@ if (!$error && $db->connected && $action == "set") //print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->port; $databasefortest = $conf->db->name; - if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') - { + 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'; } @@ -547,32 +522,26 @@ if (!$error && $db->connected && $action == "set") $db = getDoliDBInstance($conf->db->type, $conf->db->host, $userroot, $passroot, $databasefortest, $conf->db->port); - if ($db->error) - { + if ($db->error) { print '<div class="error">'.$db->error.'</div>'; $error++; } - if (!$error) - { - if ($db->connected) - { + if (!$error) { + if ($db->connected) { $resultbis = 1; // Create user $result = $db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); // Create user bis - if ($databasefortest == 'mysql') - { - if (!in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local'))) - { + if ($databasefortest == 'mysql') { + if (!in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local'))) { $resultbis = $db->DDLCreateUser('%', $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); } } - if ($result > 0 && $resultbis > 0) - { + if ($result > 0 && $resultbis > 0) { print '<tr><td>'; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -581,8 +550,7 @@ if (!$error && $db->connected && $action == "set") } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' - || $db->errno() == 'DB_ERROR_USER_ALREADY_EXISTS') - { + || $db->errno() == 'DB_ERROR_USER_ALREADY_EXISTS') { dolibarr_install_syslog("step1: user already exists"); print '<tr><td>'; print $langs->trans("UserCreation").' : '; @@ -628,12 +596,10 @@ if (!$error && $db->connected && $action == "set") $newdb = getDoliDBInstance($conf->db->type, $conf->db->host, $userroot, $passroot, '', $conf->db->port); //print 'eee'.$conf->db->type." ".$conf->db->host." ".$userroot." ".$passroot." ".$conf->db->port." ".$newdb->connected." ".$newdb->forcecharset;exit; - if ($newdb->connected) - { + if ($newdb->connected) { $result = $newdb->DDLCreateDb($dolibarr_main_db_name, $dolibarr_main_db_character_set, $dolibarr_main_db_collation, $dolibarr_main_db_user); - if ($result) - { + if ($result) { print '<tr><td>'; print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : "; print $dolibarr_main_db_name; @@ -683,15 +649,13 @@ if (!$error && $db->connected && $action == "set") // We test access with dolibarr database user (not admin) - if (!$error) - { + if (!$error) { dolibarr_install_syslog("step1: connection type=".$conf->db->type." on host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name); //print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name; $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); - if ($db->connected) - { + if ($db->connected) { dolibarr_install_syslog("step1: connection to server by user ".$conf->db->user." ok"); print "<tr><td>"; print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; @@ -701,8 +665,7 @@ if (!$error && $db->connected && $action == "set") print "</td></tr>"; // server access ok, basic access ok - if ($db->database_selected) - { + if ($db->database_selected) { dolibarr_install_syslog("step1: connection to database ".$conf->db->name." by user ".$conf->db->user." ok"); print "<tr><td>"; print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; @@ -773,7 +736,9 @@ function jsinfo() <?php $ret = 0; -if ($error && isset($argv[1])) $ret = 1; +if ($error && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("--- step1: end"); @@ -781,7 +746,9 @@ dolibarr_install_syslog("--- step1: end"); pFooter($error ? 1 : 0, $setuplang, 'jsinfo', 1); // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} /** @@ -794,8 +761,7 @@ if ($ret) exit($ret); function write_main_file($mainfile, $main_dir) { $fp = @fopen("$mainfile", "w"); - if ($fp) - { + if ($fp) { clearstatcache(); fputs($fp, '<?php'."\n"); fputs($fp, "// Wrapper to include main into htdocs\n"); @@ -815,8 +781,7 @@ function write_main_file($mainfile, $main_dir) function write_master_file($masterfile, $main_dir) { $fp = @fopen("$masterfile", "w"); - if ($fp) - { + if ($fp) { clearstatcache(); fputs($fp, '<?php'."\n"); fputs($fp, "// Wrapper to include master into htdocs\n"); @@ -854,8 +819,7 @@ function write_conf_file($conffile) $key = md5(uniqid(mt_rand(), true)); // Generate random hash $fp = fopen("$conffile", "w"); - if ($fp) - { + if ($fp) { clearstatcache(); fputs($fp, '<?php'."\n"); @@ -940,49 +904,77 @@ function write_conf_file($conffile) // Write params to overwrites default lib path fputs($fp, "\n"); - if (empty($force_dolibarr_lib_FPDF_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_FPDF_PATH = ''; } + if (empty($force_dolibarr_lib_FPDF_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_FPDF_PATH = ''; + } fputs($fp, '$dolibarr_lib_FPDF_PATH=\''.$force_dolibarr_lib_FPDF_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_TCPDF_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_TCPDF_PATH = ''; } + if (empty($force_dolibarr_lib_TCPDF_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_TCPDF_PATH = ''; + } fputs($fp, '$dolibarr_lib_TCPDF_PATH=\''.$force_dolibarr_lib_TCPDF_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_FPDI_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_FPDI_PATH = ''; } + if (empty($force_dolibarr_lib_FPDI_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_FPDI_PATH = ''; + } fputs($fp, '$dolibarr_lib_FPDI_PATH=\''.$force_dolibarr_lib_FPDI_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_TCPDI_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_TCPDI_PATH = ''; } + if (empty($force_dolibarr_lib_TCPDI_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_TCPDI_PATH = ''; + } fputs($fp, '$dolibarr_lib_TCPDI_PATH=\''.$force_dolibarr_lib_TCPDI_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_ADODB_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_ADODB_PATH = ''; } + if (empty($force_dolibarr_lib_ADODB_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_ADODB_PATH = ''; + } fputs($fp, '$dolibarr_lib_ADODB_PATH=\''.$force_dolibarr_lib_ADODB_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_GEOIP_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_GEOIP_PATH = ''; } + if (empty($force_dolibarr_lib_GEOIP_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_GEOIP_PATH = ''; + } fputs($fp, '$dolibarr_lib_GEOIP_PATH=\''.$force_dolibarr_lib_GEOIP_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_NUSOAP_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_NUSOAP_PATH = ''; } + if (empty($force_dolibarr_lib_NUSOAP_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_NUSOAP_PATH = ''; + } fputs($fp, '$dolibarr_lib_NUSOAP_PATH=\''.$force_dolibarr_lib_NUSOAP_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_ODTPHP_PATH)) { fputs($fp, '//'); $force_dolibarr_lib_ODTPHP_PATH = ''; } + if (empty($force_dolibarr_lib_ODTPHP_PATH)) { + fputs($fp, '//'); $force_dolibarr_lib_ODTPHP_PATH = ''; + } fputs($fp, '$dolibarr_lib_ODTPHP_PATH=\''.$force_dolibarr_lib_ODTPHP_PATH.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_lib_ODTPHP_PATHTOPCLZIP)) { fputs($fp, '//'); $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP = ''; } + if (empty($force_dolibarr_lib_ODTPHP_PATHTOPCLZIP)) { + fputs($fp, '//'); $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP = ''; + } fputs($fp, '$dolibarr_lib_ODTPHP_PATHTOPCLZIP=\''.$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_js_CKEDITOR)) { fputs($fp, '//'); $force_dolibarr_js_CKEDITOR = ''; } + if (empty($force_dolibarr_js_CKEDITOR)) { + fputs($fp, '//'); $force_dolibarr_js_CKEDITOR = ''; + } fputs($fp, '$dolibarr_js_CKEDITOR=\''.$force_dolibarr_js_CKEDITOR.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_js_JQUERY)) { fputs($fp, '//'); $force_dolibarr_js_JQUERY = ''; } + if (empty($force_dolibarr_js_JQUERY)) { + fputs($fp, '//'); $force_dolibarr_js_JQUERY = ''; + } fputs($fp, '$dolibarr_js_JQUERY=\''.$force_dolibarr_js_JQUERY.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_js_JQUERY_UI)) { fputs($fp, '//'); $force_dolibarr_js_JQUERY_UI = ''; } + 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"); // Write params to overwrites default font path fputs($fp, "\n"); - if (empty($force_dolibarr_font_DOL_DEFAULT_TTF)) { fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF = ''; } - fputs($fp, '$dolibarr_font_DOL_DEFAULT_TTF=\''.$force_dolibarr_font_DOL_DEFAULT_TTF.'\';'); + if (empty($force_dolibarr_font_DOL_DEFAULT_TTF)) { + fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF = ''; + } + fputs($fp, '$dolibarr_font_DOL_DEFAULT_TTF=\''.$force_dolibarr_font_DOL_DEFAULT_TTF.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD)) { fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD = ''; } + if (empty($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD)) { + fputs($fp, '//'); $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD = ''; + } fputs($fp, '$dolibarr_font_DOL_DEFAULT_TTF_BOLD=\''.$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD.'\';'); fputs($fp, "\n"); @@ -992,8 +984,7 @@ function write_conf_file($conffile) fclose($fp); - if (file_exists("$conffile")) - { + if (file_exists("$conffile")) { include $conffile; // force config reload, do not put include_once conf($dolibarr_main_document_root); diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 20c57cb0ccf..2841ae8bdfe 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -49,23 +49,37 @@ $langs->setDefaultLang($setuplang); $langs->loadLangs(array("admin", "install")); $choix = 0; -if ($dolibarr_main_db_type == "mysqli") $choix = 1; -if ($dolibarr_main_db_type == "pgsql") $choix = 2; -if ($dolibarr_main_db_type == "mssql") $choix = 3; -if ($dolibarr_main_db_type == "sqlite") $choix = 4; -if ($dolibarr_main_db_type == "sqlite3") $choix = 5; +if ($dolibarr_main_db_type == "mysqli") { + $choix = 1; +} +if ($dolibarr_main_db_type == "pgsql") { + $choix = 2; +} +if ($dolibarr_main_db_type == "mssql") { + $choix = 3; +} +if ($dolibarr_main_db_type == "sqlite") { + $choix = 4; +} +if ($dolibarr_main_db_type == "sqlite3") { + $choix = 5; +} //if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into step2.php page'); // Now we load forced values from install.forced.php file. $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; // test for travis - if (!empty($argv[1]) && $argv[1] == "set") $action = "set"; + if (!empty($argv[1]) && $argv[1] == "set") { + $action = "set"; + } } dolibarr_install_syslog("- step2: entering step2.php page"); @@ -78,15 +92,13 @@ dolibarr_install_syslog("- step2: entering step2.php page"); pHeader($langs->trans("CreateDatabaseObjects"), "step4"); // Test if we can run a first install process -if (!is_writable($conffile)) -{ +if (!is_writable($conffile)) { print $langs->trans("ConfFileIsNotWritable", $conffiletoshow); pFooter(1, $setuplang, 'jscheckparam'); exit; } -if ($action == "set") -{ +if ($action == "set") { print '<h3><img class="valigntextbottom" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '.$langs->trans("Database").'</h3>'; print '<table cellspacing="0" style="padding: 4px 4px 4px 0" border="0" width="100%">'; @@ -94,8 +106,7 @@ if ($action == "set") $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); - if ($db->connected) - { + if ($db->connected) { print "<tr><td>"; print $langs->trans("ServerConnection")." : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>'; $ok = 1; @@ -103,10 +114,8 @@ if ($action == "set") print "<tr><td>Failed to connect to server : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>'; } - if ($ok) - { - if ($db->database_selected) - { + if ($ok) { + if ($db->database_selected) { dolibarr_install_syslog("step2: successful connection to database: ".$conf->db->name); } else { dolibarr_install_syslog("step2: failed connection to database :".$conf->db->name, LOG_ERR); @@ -117,8 +126,7 @@ if ($action == "set") // Affiche version - if ($ok) - { + if ($ok) { $version = $db->getVersion(); $versionarray = $db->getVersionArray(); print '<tr><td>'.$langs->trans("DatabaseVersion").'</td>'; @@ -145,13 +153,12 @@ if ($action == "set") /************************************************************************************** - * - * Chargement fichiers tables/*.sql (non *.key.sql) - * A faire avant les fichiers *.key.sql - * - ***************************************************************************************/ - if ($ok && $createtables) - { + * + * Chargement fichiers tables/*.sql (non *.key.sql) + * A faire avant les fichiers *.key.sql + * + ***************************************************************************************/ + if ($ok && $createtables) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) $dir = "mysql/tables/"; @@ -160,12 +167,9 @@ if ($action == "set") dolibarr_install_syslog("step2: open tables directory ".$dir." handle=".$handle); $tablefound = 0; $tabledata = array(); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && !preg_match('/\.key\.sql$/i', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && !preg_match('/\.key\.sql$/i', $file)) { $tablefound++; $tabledata[] = $file; } @@ -175,18 +179,14 @@ if ($action == "set") // Sort list of sql files on alphabetical order (load order is important) sort($tabledata); - foreach ($tabledata as $file) - { + foreach ($tabledata as $file) { $name = substr($file, 0, dol_strlen($file) - 4); $buffer = ''; $fp = fopen($dir.$file, "r"); - if ($fp) - { - while (!feof($fp)) - { + if ($fp) { + while (!feof($fp)) { $buf = fgets($fp, 4096); - if (substr($buf, 0, 2) <> '--') - { + if (substr($buf, 0, 2) <> '--') { $buf = preg_replace('/--(.+)*/', '', $buf); $buffer .= $buf; } @@ -194,8 +194,7 @@ if ($action == "set") fclose($fp); $buffer = trim($buffer); - if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') // For Mysql 5.5+, we must replace type=innodb with ENGINE=innodb - { + 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 { // Keyword ENGINE is MySQL-specific, so scrub it for @@ -205,8 +204,7 @@ if ($action == "set") } // Replace the prefix tables - if ($dolibarr_main_db_prefix != 'llx_') - { + if ($dolibarr_main_db_prefix != 'llx_') { $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer); } @@ -215,14 +213,12 @@ if ($action == "set") dolibarr_install_syslog("step2: request: ".$buffer); $resql = $db->query($buffer, 0, 'dml'); - if ($resql) - { + if ($resql) { // print "<td>OK requete ==== $buffer</td></tr>"; $db->free($resql); } else { if ($db->errno() == 'DB_ERROR_TABLE_ALREADY_EXISTS' || - $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS') - { + $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS') { //print "<td>Deja existante</td></tr>"; } else { print "<tr><td>".$langs->trans("CreateTableAndPrimaryKey", $name); @@ -241,10 +237,8 @@ if ($action == "set") } } - if ($tablefound) - { - if ($error == 0) - { + if ($tablefound) { + if ($error == 0) { print '<tr><td>'; print $langs->trans("TablesAndPrimaryKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>'; $ok = 1; @@ -257,13 +251,12 @@ if ($action == "set") /*************************************************************************************** - * - * Chargement fichiers tables/*.key.sql - * A faire apres les fichiers *.sql - * - ***************************************************************************************/ - if ($ok && $createkeys) - { + * + * Chargement fichiers tables/*.key.sql + * A faire apres les fichiers *.sql + * + ***************************************************************************************/ + if ($ok && $createkeys) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) $dir = "mysql/tables/"; @@ -272,12 +265,9 @@ if ($action == "set") dolibarr_install_syslog("step2: open keys directory ".$dir." handle=".$handle); $tablefound = 0; $tabledata = array(); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && preg_match('/\.key\.sql$/i', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && preg_match('/\.key\.sql$/i', $file)) { $tablefound++; $tabledata[] = $file; } @@ -287,40 +277,33 @@ if ($action == "set") // Sort list of sql files on alphabetical order (load order is important) sort($tabledata); - foreach ($tabledata as $file) - { + foreach ($tabledata as $file) { $name = substr($file, 0, dol_strlen($file) - 4); //print "<tr><td>Creation de la table $name</td>"; $buffer = ''; $fp = fopen($dir.$file, "r"); - if ($fp) - { - while (!feof($fp)) - { + if ($fp) { + while (!feof($fp)) { $buf = fgets($fp, 4096); // Special case of lines allowed for some version only - if ($choix == 1 && preg_match('/^--\sV([0-9\.]+)/i', $buf, $reg)) - { + if ($choix == 1 && preg_match('/^--\sV([0-9\.]+)/i', $buf, $reg)) { $versioncommande = explode('.', $reg[1]); //print var_dump($versioncommande); //print var_dump($versionarray); if (count($versioncommande) && count($versionarray) - && versioncompare($versioncommande, $versionarray) <= 0) - { + && versioncompare($versioncommande, $versionarray) <= 0) { // Version qualified, delete SQL comments $buf = preg_replace('/^--\sV([0-9\.]+)/i', '', $buf); //print "Ligne $i qualifiee par version: ".$buf.'<br>'; } } - if ($choix == 2 && preg_match('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', $buf, $reg)) - { + if ($choix == 2 && preg_match('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', $buf, $reg)) { $versioncommande = explode('.', $reg[1]); //print var_dump($versioncommande); //print var_dump($versionarray); if (count($versioncommande) && count($versionarray) - && versioncompare($versioncommande, $versionarray) <= 0) - { + && versioncompare($versioncommande, $versionarray) <= 0) { // Version qualified, delete SQL comments $buf = preg_replace('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', '', $buf); //print "Ligne $i qualifiee par version: ".$buf.'<br>'; @@ -328,20 +311,19 @@ if ($action == "set") } // Ajout ligne si non commentaire - if (!preg_match('/^--/i', $buf)) $buffer .= $buf; + if (!preg_match('/^--/i', $buf)) { + $buffer .= $buf; + } } fclose($fp); // Si plusieurs requetes, on boucle sur chaque $listesql = explode(';', $buffer); - foreach ($listesql as $req) - { + foreach ($listesql as $req) { $buffer = trim($req); - if ($buffer) - { + if ($buffer) { // Replace the prefix tables - if ($dolibarr_main_db_prefix != 'llx_') - { + if ($dolibarr_main_db_prefix != 'llx_') { $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer); } @@ -350,8 +332,7 @@ if ($action == "set") dolibarr_install_syslog("step2: request: ".$buffer); $resql = $db->query($buffer, 0, 'dml'); - if ($resql) - { + if ($resql) { //print "<td>OK requete ==== $buffer</td></tr>"; $db->free($resql); } else { @@ -359,8 +340,7 @@ if ($action == "set") $db->errno() == 'DB_ERROR_CANNOT_CREATE' || $db->errno() == 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS' || - preg_match('/duplicate key name/i', $db->error())) - { + preg_match('/duplicate key name/i', $db->error())) { //print "<td>Deja existante</td></tr>"; $key_exists = 1; } else { @@ -382,8 +362,7 @@ if ($action == "set") } } - if ($tablefound && $error == 0) - { + if ($tablefound && $error == 0) { print '<tr><td>'; print $langs->trans("OtherKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>'; $okkeys = 1; @@ -392,32 +371,32 @@ if ($action == "set") /*************************************************************************************** - * - * Chargement fichier functions.sql - * - ***************************************************************************************/ - if ($ok && $createfunctions) - { + * + * Chargement fichier functions.sql + * + ***************************************************************************************/ + if ($ok && $createfunctions) { // For this file, we use a directory according to database type - if ($choix == 1) $dir = "mysql/functions/"; - elseif ($choix == 2) $dir = "pgsql/functions/"; - elseif ($choix == 3) $dir = "mssql/functions/"; - elseif ($choix == 4) { $dir = "sqlite3/functions/"; } + if ($choix == 1) { + $dir = "mysql/functions/"; + } elseif ($choix == 2) { + $dir = "pgsql/functions/"; + } elseif ($choix == 3) { + $dir = "mssql/functions/"; + } elseif ($choix == 4) { + $dir = "sqlite3/functions/"; + } // Creation donnees $file = "functions.sql"; - if (file_exists($dir.$file)) - { + if (file_exists($dir.$file)) { $fp = fopen($dir.$file, "r"); dolibarr_install_syslog("step2: open function file ".$dir.$file." handle=".$fp); - if ($fp) - { + if ($fp) { $buffer = ''; - while (!feof($fp)) - { + while (!feof($fp)) { $buf = fgets($fp, 4096); - if (substr($buf, 0, 2) <> '--') - { + if (substr($buf, 0, 2) <> '--') { $buffer .= $buf."§"; } } @@ -427,27 +406,22 @@ if ($action == "set") // If several requests, we loop on each of them $listesql = explode('§', $buffer); - foreach ($listesql as $buffer) - { + foreach ($listesql as $buffer) { $buffer = trim($buffer); - if ($buffer) - { + if ($buffer) { // Replace the prefix in table names - if ($dolibarr_main_db_prefix != 'llx_') - { + if ($dolibarr_main_db_prefix != 'llx_') { $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer); } dolibarr_install_syslog("step2: request: ".$buffer); print "<!-- Insert line : ".$buffer."<br>-->\n"; $resql = $db->query($buffer, 0, 'dml'); - if ($resql) - { + if ($resql) { $ok = 1; $db->free($resql); } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS' - || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS') - { + || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS') { //print "Insert line : ".$buffer."<br>\n"; } else { $ok = 0; @@ -463,8 +437,7 @@ if ($action == "set") } print "<tr><td>".$langs->trans("FunctionsCreation")."</td>"; - if ($ok) - { + if ($ok) { print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>'; } else { print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>'; @@ -475,12 +448,11 @@ if ($action == "set") /*************************************************************************************** - * - * Load files data/*.sql - * - ***************************************************************************************/ - if ($ok && $createdata) - { + * + * Load files data/*.sql + * + ***************************************************************************************/ + if ($ok && $createdata) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) $dir = "mysql/data/"; @@ -489,17 +461,15 @@ if ($action == "set") dolibarr_install_syslog("step2: open directory data ".$dir." handle=".$handle); $tablefound = 0; $tabledata = array(); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file)) - { - if (preg_match('/^llx_accounting_account_/', $file)) continue; // We discard data file of chart of account. Will be loaded when a chart is selected. + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file)) { + if (preg_match('/^llx_accounting_account_/', $file)) { + continue; // We discard data file of chart of account. Will be loaded when a chart is selected. + } //print 'x'.$file.'-'.$createdata.'<br>'; - if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i', $file)) - { + if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i', $file)) { $tablefound++; $tabledata[] = $file; } @@ -510,33 +480,33 @@ if ($action == "set") // Sort list of data files on alphabetical order (load order is important) sort($tabledata); - foreach ($tabledata as $file) - { + foreach ($tabledata as $file) { $name = substr($file, 0, dol_strlen($file) - 4); $fp = fopen($dir.$file, "r"); dolibarr_install_syslog("step2: open data file ".$dir.$file." handle=".$fp); - if ($fp) - { + if ($fp) { $arrayofrequests = array(); $linefound = 0; $linegroup = 0; $sizeofgroup = 1; // Grouping request to have 1 query for several requests does not works with mysql, so we use 1. // Load all requests - while (!feof($fp)) - { + while (!feof($fp)) { $buffer = fgets($fp, 4096); $buffer = trim($buffer); - if ($buffer) - { - if (substr($buffer, 0, 2) == '--') continue; + if ($buffer) { + if (substr($buffer, 0, 2) == '--') { + continue; + } - if ($linefound && ($linefound % $sizeofgroup) == 0) - { + if ($linefound && ($linefound % $sizeofgroup) == 0) { $linegroup++; } - if (empty($arrayofrequests[$linegroup])) $arrayofrequests[$linegroup] = $buffer; - else $arrayofrequests[$linegroup] .= " ".$buffer; + if (empty($arrayofrequests[$linegroup])) { + $arrayofrequests[$linegroup] = $buffer; + } else { + $arrayofrequests[$linegroup] .= " ".$buffer; + } $linefound++; } @@ -549,22 +519,18 @@ if ($action == "set") $db->begin(); // We loop on each requests of file - foreach ($arrayofrequests as $buffer) - { + foreach ($arrayofrequests as $buffer) { // Replace the prefix tables - if ($dolibarr_main_db_prefix != 'llx_') - { + if ($dolibarr_main_db_prefix != 'llx_') { $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer); } //dolibarr_install_syslog("step2: request: " . $buffer); $resql = $db->query($buffer, 1); - if ($resql) - { + if ($resql) { //$db->free($resql); // Not required as request we launch here does not return memory needs. } else { - if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { //print "<tr><td>Insertion ligne : $buffer</td><td>"; } else { $ok = 0; @@ -574,14 +540,16 @@ if ($action == "set") } } - if ($okallfile) $db->commit(); - else $db->rollback(); + if ($okallfile) { + $db->commit(); + } else { + $db->rollback(); + } } } print "<tr><td>".$langs->trans("ReferenceDataLoading")."</td>"; - if ($ok) - { + if ($ok) { print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>'; } else { print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>'; @@ -595,14 +563,16 @@ if ($action == "set") $ret = 0; -if (!$ok && isset($argv[1])) $ret = 1; +if (!$ok && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("- step2: end"); $out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno" value="checked" checked="true"> '; -$out .= $langs->trans("MakeAnonymousPing"); +$out .= '<label for="dolibarrpingno">'.$langs->trans("MakeAnonymousPing").'</label>'; $out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->'; $out .= '<script type="text/javascript">'; @@ -621,7 +591,11 @@ print $out; pFooter($ok ? 0 : 1, $setuplang); -if (isset($db) && is_object($db)) $db->close(); +if (isset($db) && is_object($db)) { + $db->close(); +} // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} diff --git a/htdocs/install/step4.php b/htdocs/install/step4.php index ca188ae4d5b..7d03c7b6fd0 100644 --- a/htdocs/install/step4.php +++ b/htdocs/install/step4.php @@ -40,7 +40,9 @@ $langs->loadLangs(array("admin", "install")); // Now we load forced value from install.forced.php file. $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; @@ -60,8 +62,7 @@ $ok = 0; pHeader($langs->trans("AdminAccountCreation"), "step5"); // Test if we can run a first install process -if (!is_writable($conffile)) -{ +if (!is_writable($conffile)) { print $langs->trans("ConfFileIsNotWritable", $conffiletoshow); pFooter(1, $setuplang, 'jscheckparam'); exit; @@ -77,8 +78,7 @@ print '<table cellspacing="0" cellpadding="2">'; $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); -if ($db->ok) -{ +if ($db->ok) { print '<tr><td><label for="login">'.$langs->trans("Login").' :</label></td><td>'; print '<input id="login" name="login" type="text" value="'.(!empty($_GET["login"]) ? GETPOST("login", 'alpha') : (isset($force_install_dolibarrlogin) ? $force_install_dolibarrlogin : '')).'"'.(@$force_install_noedit == 2 && $force_install_dolibarrlogin !== null ? ' disabled' : '').'></td></tr>'; print '<tr><td><label for="pass">'.$langs->trans("Password").' :</label></td><td>'; @@ -87,15 +87,13 @@ if ($db->ok) print '<input type="password" id="pass_verif" name="pass_verif" autocomplete="new-password"></td></tr>'; print '</table>'; - if (isset($_GET["error"]) && $_GET["error"] == 1) - { + if (isset($_GET["error"]) && $_GET["error"] == 1) { print '<br>'; print '<div class="error">'.$langs->trans("PasswordsMismatch").'</div>'; $error = 0; // We show button } - if (isset($_GET["error"]) && $_GET["error"] == 2) - { + if (isset($_GET["error"]) && $_GET["error"] == 2) { print '<br>'; print '<div class="error">'; print $langs->trans("PleaseTypePassword"); @@ -103,8 +101,7 @@ if ($db->ok) $error = 0; // We show button } - if (isset($_GET["error"]) && $_GET["error"] == 3) - { + if (isset($_GET["error"]) && $_GET["error"] == 3) { print '<br>'; print '<div class="error">'.$langs->trans("PleaseTypeALogin").'</div>'; $error = 0; // We show button @@ -112,7 +109,9 @@ if ($db->ok) } $ret = 0; -if ($error && isset($argv[1])) $ret = 1; +if ($error && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("- step4: end"); @@ -122,4 +121,6 @@ pFooter($error, $setuplang); $db->close(); // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index ed64de7cbb1..8c6f1147e94 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -27,7 +27,9 @@ */ include_once 'inc.php'; -if (file_exists($conffile)) include_once $conffile; +if (file_exists($conffile)) { + include_once $conffile; +} require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php'; require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; // for dol_hash @@ -42,13 +44,15 @@ $action = GETPOST('action', 'alpha') ?GETPOST('action', 'alpha') : (empty($argv[ // Define targetversion used to update MAIN_VERSION_LAST_INSTALL for first install // or MAIN_VERSION_LAST_UPGRADE for upgrade. $targetversion = DOL_VERSION; // If it's latest upgrade -if (!empty($action) && preg_match('/upgrade/i', $action)) // If it's an old upgrade -{ +if (!empty($action) && preg_match('/upgrade/i', $action)) { + // If it's an old upgrade $tmp = explode('_', $action, 2); - if ($tmp[0] == 'upgrade') - { - if (!empty($tmp[1])) $targetversion = $tmp[1]; // if $action = 'upgrade_6.0.0-beta', we use '6.0.0-beta' - else $targetversion = DOL_VERSION; // if $action = 'upgrade', we use DOL_VERSION + if ($tmp[0] == 'upgrade') { + if (!empty($tmp[1])) { + $targetversion = $tmp[1]; // if $action = 'upgrade_6.0.0-beta', we use '6.0.0-beta' + } else { + $targetversion = DOL_VERSION; // if $action = 'upgrade', we use DOL_VERSION + } } } @@ -63,7 +67,9 @@ $success = 0; $useforcedwizard = false; $forcedfile = "./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") { + $forcedfile = "/etc/dolibarr/install.forced.php"; +} if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; @@ -106,31 +112,31 @@ if ($action == "set") { * View */ +$morehtml = ''; + pHeader($langs->trans("SetupEnd"), "step5"); print '<br>'; // Test if we can run a first install process -if (empty($versionfrom) && empty($versionto) && !is_writable($conffile)) -{ +if (empty($versionfrom) && empty($versionto) && !is_writable($conffile)) { print $langs->trans("ConfFileIsNotWritable", $conffiletoshow); pFooter(1, $setuplang, 'jscheckparam'); exit; } -if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) -{ +if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { $error = 0; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) - { + 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)) - { + 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); + } else { + $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } } $conf->db->type = $dolibarr_main_db_type; @@ -151,8 +157,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $ok = 0; // If first install - if ($action == "set") - { + if ($action == "set") { // Active module user $modName = 'modUser'; $file = $modName.".class.php"; @@ -160,13 +165,16 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) include_once DOL_DOCUMENT_ROOT."/core/modules/".$file; $objMod = new $modName($db); $result = $objMod->init(); - if (!$result) print 'ERROR in activating module file='.$file; + if (!$result) { + print 'ERROR in activating module file='.$file; + } - if ($db->connected) - { + if ($db->connected) { $conf->setValues($db); // Reset forced setup after the setValues - if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + } $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // Create admin user @@ -176,17 +184,17 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $sql = "SELECT u.rowid, u.pass, u.pass_crypted"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $db->num_rows($resql); - if ($numrows == 0) - { + if ($numrows == 0) { // Define default setup for password encryption dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_SECURITY_SALT", dol_print_date(dol_now(), 'dayhourlog'), 'chaine', 0, '', 0); // All entities - if (function_exists('password_hash')) + 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); @@ -208,13 +216,11 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email $result = $newuser->create($createuser, 1); - if ($result > 0) - { + if ($result > 0) { print $langs->trans("AdminLoginCreatedSuccessfuly", $login)."<br>"; $success = 1; } else { - if ($newuser->error == 'ErrorLoginAlreadyExists') - { + if ($newuser->error == 'ErrorLoginAlreadyExists') { dolibarr_install_syslog('step5: AdminLoginAlreadyExists', LOG_WARNING); print '<br><div class="warning">'.$langs->trans("AdminLoginAlreadyExists", $login)."</div><br>"; $success = 1; @@ -224,14 +230,12 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) } } - if ($success) - { + if ($success) { // Insert MAIN_VERSION_FIRST_INSTALL in a dedicated transaction. So if it fails (when first install was already done), we can do other following requests. $db->begin(); dolibarr_install_syslog('step5: set MAIN_VERSION_FIRST_INSTALL const to '.$targetversion, LOG_DEBUG); $resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) values(".$db->encrypt('MAIN_VERSION_FIRST_INSTALL', 1).",".$db->encrypt($targetversion, 1).",'chaine',0,'Dolibarr version when first install',0)"); - if ($resql) - { + if ($resql) { $conf->global->MAIN_VERSION_FIRST_INSTALL = $targetversion; $db->commit(); } else { @@ -243,29 +247,36 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) dolibarr_install_syslog('step5: set MAIN_VERSION_LAST_INSTALL const to '.$targetversion, LOG_DEBUG); $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_VERSION_LAST_INSTALL'"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) values(".$db->encrypt('MAIN_VERSION_LAST_INSTALL', 1).",".$db->encrypt($targetversion, 1).",'chaine',0,'Dolibarr version when last install',0)"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $conf->global->MAIN_VERSION_LAST_INSTALL = $targetversion; - if ($useforcedwizard) - { + if ($useforcedwizard) { dolibarr_install_syslog('step5: set MAIN_REMOVE_INSTALL_WARNING const to 1', LOG_DEBUG); $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_REMOVE_INSTALL_WARNING'"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) values(".$db->encrypt('MAIN_REMOVE_INSTALL_WARNING', 1).",".$db->encrypt(1, 1).",'chaine',1,'Disable install warnings',0)"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $conf->global->MAIN_REMOVE_INSTALL_WARNING = 1; } // If we ask to force some modules to be enabled - if (!empty($force_install_module)) - { - if (!defined('DOL_DOCUMENT_ROOT') && !empty($dolibarr_main_document_root)) define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); + if (!empty($force_install_module)) { + if (!defined('DOL_DOCUMENT_ROOT') && !empty($dolibarr_main_document_root)) { + define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); + } $tmparray = explode(',', $force_install_module); - foreach ($tmparray as $modtoactivate) - { + foreach ($tmparray as $modtoactivate) { $modtoactivatenew = preg_replace('/\.class\.php$/i', '', $modtoactivate); print $langs->trans("ActivateModule", $modtoactivatenew).'<br>'; @@ -274,46 +285,55 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $res = dol_include_once("/core/modules/".$file); $res = activateModule($modtoactivatenew, 1); - if (!empty($res['errors'])) print 'ERROR in activating module file='.$file; + if (!empty($res['errors'])) { + print 'ERROR in activating module file='.$file; + } } } dolibarr_install_syslog('step5: remove MAIN_NOT_INSTALLED const'); $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_NOT_INSTALLED'"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $db->commit(); } } else { print $langs->trans("ErrorFailedToConnect")."<br>"; } - } - // If upgrade - elseif (empty($action) || preg_match('/upgrade/i', $action)) - { - if ($db->connected) - { + } elseif (empty($action) || preg_match('/upgrade/i', $action)) { + // If upgrade + if ($db->connected) { $conf->setValues($db); // Reset forced setup after the setValues - if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + } $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; // 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 { + 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 { $mainversionlastupgradearray = preg_split('/[.-]/', $conf->global->MAIN_VERSION_LAST_UPGRADE); $targetversionarray = preg_split('/[.-]/', $targetversion); - if (versioncompare($targetversionarray, $mainversionlastupgradearray) > 0) $tagdatabase = true; + if (versioncompare($targetversionarray, $mainversionlastupgradearray) > 0) { + $tagdatabase = true; + } } - if ($tagdatabase) - { + if ($tagdatabase) { dolibarr_install_syslog('step5: set MAIN_VERSION_LAST_UPGRADE const to value '.$targetversion); $resql = $db->query("DELETE FROM ".MAIN_DB_PREFIX."const WHERE ".$db->decrypt('name')."='MAIN_VERSION_LAST_UPGRADE'"); - if (!$resql) dol_print_error($db, 'Error in setup program'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $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'); + if (!$resql) { + dol_print_error($db, 'Error in setup program'); + } $conf->global->MAIN_VERSION_LAST_UPGRADE = $targetversion; } 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.'); @@ -337,31 +357,28 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) // Create lock file // If first install -if ($action == "set" && $success) -{ - if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) - { +if ($action == "set" && $success) { + if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) { // Install is finished print $langs->trans("SystemIsInstalled")."<br>"; $createlock = 0; - if (!empty($force_install_lockinstall) || !empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE)) - { + if (!empty($force_install_lockinstall) || !empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE)) { // Install is finished, we create the lock file $lockfile = DOL_DATA_ROOT.'/install.lock'; $fp = @fopen($lockfile, "w"); - if ($fp) - { - if (empty($force_install_lockinstall) || $force_install_lockinstall == 1) $force_install_lockinstall = 444; // For backward compatibility + if ($fp) { + if (empty($force_install_lockinstall) || $force_install_lockinstall == 1) { + $force_install_lockinstall = 444; // For backward compatibility + } fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")"); fclose($fp); @chmod($lockfile, octdec($force_install_lockinstall)); $createlock = 1; } } - if (empty($createlock)) - { + if (empty($createlock)) { print '<div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>"; } @@ -383,41 +400,37 @@ if ($action == "set" && $success) print '<span class="fas fa-link-alt"></span> '.$langs->trans("GoToUpgradePage"); print '</a></div>'; } -} -// If upgrade -elseif (empty($action) || preg_match('/upgrade/i', $action)) -{ - if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) - { +} elseif (empty($action) || preg_match('/upgrade/i', $action)) { + // If upgrade + if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION)) { // Upgrade is finished print $langs->trans("SystemIsUpgraded")."<br>"; $createlock = 0; - if (!empty($force_install_lockinstall) || !empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE)) - { + if (!empty($force_install_lockinstall) || !empty($conf->global->MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE)) { // Upgrade is finished, we create the lock file $lockfile = DOL_DATA_ROOT.'/install.lock'; $fp = @fopen($lockfile, "w"); - if ($fp) - { - if (empty($force_install_lockinstall) || $force_install_lockinstall == 1) $force_install_lockinstall = 444; // For backward compatibility + if ($fp) { + if (empty($force_install_lockinstall) || $force_install_lockinstall == 1) { + $force_install_lockinstall = 444; // For backward compatibility + } fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")"); fclose($fp); @chmod($lockfile, octdec($force_install_lockinstall)); $createlock = 1; } } - if (empty($createlock)) - { + if (empty($createlock)) { print '<br><div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>"; } - print "<br><br>"; + print "<br>"; - print '<div class="center"><a href="../index.php?mainmenu=home'.(isset($login) ? '&username='.urlencode($login) : '').'">'; - print '<span class="fas fa-link-alt"></span> '.$langs->trans("GoToDolibarr").'...'; - print '</a></div><br>'; + $morehtml = '<br><div class="center"><a href="../index.php?mainmenu=home'.(isset($login) ? '&username='.urlencode($login) : '').'">'; + $morehtml .= '<span class="fas fa-link-alt"></span> '.$langs->trans("GoToDolibarr").'...'; + $morehtml .= '</a></div><br>'; } else { // If here MAIN_VERSION_LAST_UPGRADE is not empty print $langs->trans("VersionLastUpgrade").': <b><span class="ok">'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</span></b><br>'; @@ -425,9 +438,9 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) print "<br>"; - print '<div class="center"><a href="../install/index.php">'; - print '<span class="fas fa-link-alt"></span> '.$langs->trans("GoToUpgradePage"); - print '</a></div>'; + $morehtml = '<br><div class="center"><a href="../install/index.php">'; + $morehtml .= '<span class="fas fa-link-alt"></span> '.$langs->trans("GoToUpgradePage"); + $morehtml .= '</a></div>'; } } else { dol_print_error('', 'step5.php: unknown choice of action'); @@ -437,12 +450,16 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) clearstatcache(); $ret = 0; -if ($error && isset($argv[1])) $ret = 1; +if ($error && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("- step5: Dolibarr setup finished"); -pFooter(1, $setuplang); +pFooter(1, $setuplang, '', 0, $morehtml); // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 29b51746a14..c985a50806d 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -37,8 +37,7 @@ */ include_once 'inc.php'; -if (!file_exists($conffile)) -{ +if (!file_exists($conffile)) { print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").'; } require_once $conffile; @@ -68,29 +67,35 @@ $ignoredbversion = (GETPOST('ignoredbversion', 'alpha', 3) == 'ignoredbversion') $langs->loadLangs(array("admin", "install", "other", "errors")); -if ($dolibarr_main_db_type == "mysqli") $choix = 1; -if ($dolibarr_main_db_type == "pgsql") $choix = 2; -if ($dolibarr_main_db_type == "mssql") $choix = 3; +if ($dolibarr_main_db_type == "mysqli") { + $choix = 1; +} +if ($dolibarr_main_db_type == "pgsql") { + $choix = 2; +} +if ($dolibarr_main_db_type == "mssql") { + $choix = 3; +} dolibarr_install_syslog("--- upgrade: Entering upgrade.php page"); -if (!is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initialized", LOG_ERR); +if (!is_object($conf)) { + dolibarr_install_syslog("upgrade2: conf file not initialized", LOG_ERR); +} /* * View */ -if (!$versionfrom && !$versionto) -{ +if (!$versionfrom && !$versionto) { print 'Error: Parameter versionfrom or versionto missing.'."\n"; print 'Upgrade must be ran from command line with parameters or called from page install/index.php (like a first install)'."\n"; // Test if batch mode $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path = __DIR__.'/'; - if (substr($sapi_type, 0, 3) == 'cli') - { + if (substr($sapi_type, 0, 3) == 'cli') { print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; } exit; @@ -102,25 +107,25 @@ pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.' $actiondone = 0; // Action to launch the migrate script -if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) -{ +if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) { $actiondone = 1; - print '<h3><img class="valigntextbottom" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '.$langs->trans("DatabaseMigration").'</h3>'; + print '<h3><img class="valigntextbottom inline-block" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '; + print '<span class="inline-block">'.$langs->trans("DatabaseMigration").'</span></h3>'; print '<table cellspacing="0" cellpadding="1" border="0" width="100%">'; $error = 0; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) - { + 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)) - { + 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); + } else { + $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } } // $conf is already instancied inside inc.php @@ -132,9 +137,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $conf->db->pass = $dolibarr_main_db_pass; // Load type and crypt key - if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; + if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; + } $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; - if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; + if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; + } $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); @@ -143,8 +152,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); - if ($db->connected) - { + if ($db->connected) { print '<tr><td class="nowrap">'; print $langs->trans("ServerConnection")." : ".$dolibarr_main_db_host.'</td><td class="right"><span class="neutral">'.$langs->trans("OK").'</span></td></tr>'."\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerConnection").": $dolibarr_main_db_host ".$langs->transnoentities("OK")); @@ -155,10 +163,8 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $ok = 0; } - if ($ok) - { - if ($db->database_selected) - { + if ($ok) { + if ($db->database_selected) { print '<tr><td class="nowrap">'; print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name.'</td><td class="right"><span class="neutral">'.$langs->trans("OK")."</span></td></tr>\n"; dolibarr_install_syslog("upgrade: Database connection successful: ".$dolibarr_main_db_name); @@ -171,15 +177,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } // Affiche version - if ($ok) - { + if ($ok) { $version = $db->getVersion(); $versionarray = $db->getVersionArray(); print '<tr><td>'.$langs->trans("ServerVersion").'</td>'; print '<td class="right">'.$version.'</td></tr>'; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerVersion").": ".$version); - if ($db->type == 'mysqli' && function_exists('mysqli_get_charset')) - { + if ($db->type == 'mysqli' && function_exists('mysqli_get_charset')) { $tmparray = $db->db->get_charset(); print '<tr><td>'.$langs->trans("ClientCharset").'</td>'; print '<td class="right">'.$tmparray->charset.'</td></tr>'; @@ -193,8 +197,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $versionmindb = explode('.', $db::VERSIONMIN); //print join('.',$versionarray).' - '.join('.',$versionmindb); if (count($versionmindb) && count($versionarray) - && versioncompare($versionarray, $versionmindb) < 0) - { + && versioncompare($versionarray, $versionmindb) < 0) { // Warning: database version too low. print "<tr><td>".$langs->trans("ErrorDatabaseVersionTooLow", join('.', $versionarray), join('.', $versionmindb)).'</td><td class="right"><span class="error">'.$langs->trans("Error")."</span></td></tr>\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorDatabaseVersionTooLow", join('.', $versionarray), join('.', $versionmindb))); @@ -202,8 +205,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } // Test database version is not forbidden for migration - if (empty($ignoredbversion)) - { + if (empty($ignoredbversion)) { $dbversion_disallowed = array( array('type'=>'mysql', 'version'=>array(5, 5, 40)), array('type'=>'mysqli', 'version'=>array(5, 5, 40)) //, @@ -211,17 +213,16 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ //array('type'=>'mysqli','version'=>array(5,5,41)) ); $listofforbiddenversion = ''; - foreach ($dbversion_disallowed as $dbversion_totest) - { - if ($dbversion_totest['type'] == $db->type) $listofforbiddenversion .= ($listofforbiddenversion ? ', ' : '').join('.', $dbversion_totest['version']); + foreach ($dbversion_disallowed as $dbversion_totest) { + if ($dbversion_totest['type'] == $db->type) { + $listofforbiddenversion .= ($listofforbiddenversion ? ', ' : '').join('.', $dbversion_totest['version']); + } } - foreach ($dbversion_disallowed as $dbversion_totest) - { + foreach ($dbversion_disallowed as $dbversion_totest) { //print $db->type.' - '.join('.',$versionarray).' - '.versioncompare($dbversion_totest['version'],$versionarray)."<br>\n"; if ($dbversion_totest['type'] == $db->type && (versioncompare($dbversion_totest['version'], $versionarray) == 0 || versioncompare($dbversion_totest['version'], $versionarray) <= -4 || versioncompare($dbversion_totest['version'], $versionarray) >= 4) - ) - { + ) { // Warning: database version too low. print '<tr><td><div class="warning">'.$langs->trans("ErrorDatabaseVersionForbiddenForMigration", join('.', $versionarray), $listofforbiddenversion)."</div></td><td class=\"right\">".$langs->trans("Error")."</td></tr>\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorDatabaseVersionForbiddenForMigration", join('.', $versionarray), $listofforbiddenversion)); @@ -233,8 +234,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } // Force l'affichage de la progression - if ($ok) - { + if ($ok) { print '<tr><td colspan="2">'.$langs->trans("PleaseBePatient").'</td></tr>'; flush(); } @@ -243,12 +243,10 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ /* * Remove deprecated indexes and constraints for Mysql */ - if ($ok && preg_match('/mysql/', $db->type)) - { + if ($ok && preg_match('/mysql/', $db->type)) { $versioncommande = array(4, 0, 0); if (count($versioncommande) && count($versionarray) - && versioncompare($versioncommande, $versionarray) <= 0) // Si mysql >= 4.0 - { + && versioncompare($versioncommande, $versionarray) <= 0) { // Si mysql >= 4.0 dolibarr_install_syslog("Clean database from bad named constraints"); // Suppression vieilles contraintes sans noms et en doubles @@ -262,25 +260,20 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ ); $listtables = $db->DDLListTables($conf->db->name, ''); - foreach ($listtables as $val) - { + foreach ($listtables as $val) { // Database prefix filter - if (preg_match('/^'.MAIN_DB_PREFIX.'/', $val)) - { + if (preg_match('/^'.MAIN_DB_PREFIX.'/', $val)) { //print "x".$val."<br>"; $sql = "SHOW CREATE TABLE ".$val; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $values = $db->fetch_array($resql); $i = 0; $createsql = $values[1]; - while (preg_match('/CONSTRAINT `(0_[0-9a-zA-Z]+|[_0-9a-zA-Z]+_ibfk_[0-9]+)`/i', $createsql, $reg) && $i < 100) - { + while (preg_match('/CONSTRAINT `(0_[0-9a-zA-Z]+|[_0-9a-zA-Z]+_ibfk_[0-9]+)`/i', $createsql, $reg) && $i < 100) { $sqldrop = "ALTER TABLE ".$val." DROP FOREIGN KEY ".$reg[1]; $resqldrop = $db->query($sqldrop); - if ($resqldrop) - { + if ($resqldrop) { print '<tr><td colspan="2">'.$sqldrop.";</td></tr>\n"; } $createsql = preg_replace('/CONSTRAINT `'.$reg[1].'`/i', 'XXX', $createsql); @@ -288,8 +281,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } $db->free($resql); } else { - if ($db->lasterrno() != 'DB_ERROR_NOSUCHTABLE') - { + if ($db->lasterrno() != 'DB_ERROR_NOSUCHTABLE') { print '<tr><td colspan="2"><span class="error">'.$sql.' : '.$db->lasterror()."</font></td></tr>\n"; } } @@ -299,12 +291,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } /* - * Load sql files - */ - if ($ok) - { + * Load sql files + */ + if ($ok) { $dir = "mysql/migration/"; // We use mysql migration scripts whatever is database driver - if (!empty($dirmodule)) $dir = dol_buildpath('/'.$dirmodule.'/sql/', 0); + if (!empty($dirmodule)) { + $dir = dol_buildpath('/'.$dirmodule.'/sql/', 0); + } dolibarr_install_syslog("Scan sql files for migration files in ".$dir); // Clean last part to exclude minor version x.y.z -> x.y @@ -320,11 +313,11 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Get files list $filesindir = array(); $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.sql$/i', $file)) $filesindir[] = $file; + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.sql$/i', $file)) { + $filesindir[] = $file; + } } sort($filesindir); } else { @@ -332,27 +325,24 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } // Define which file to run - foreach ($filesindir as $file) - { - if (preg_match('/'.$from.'/i', $file)) - { + foreach ($filesindir as $file) { + 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; } } - if (count($filelist) == 0) - { + if (count($filelist) == 0) { print '<div class="error">'.$langs->trans("ErrorNoMigrationFilesFoundForParameters").'</div>'; } else { $listoffileprocessed = array(); // Protection to avoid to process twice the same file // Loop on each migrate files - foreach ($filelist as $file) - { - if (in_array($dir.$file, $listoffileprocessed)) continue; + foreach ($filelist as $file) { + if (in_array($dir.$file, $listoffileprocessed)) { + continue; + } print '<tr><td colspan="2"><hr style="border-color: #ccc; border-top-style: none;"></td></tr>'; print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n"; @@ -364,18 +354,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Scan if there is migration scripts that depends of Dolibarr version // for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql") $modulesfile = array(); - foreach ($conf->file->dol_document_root as $type => $dirroot) - { + foreach ($conf->file->dol_document_root as $type => $dirroot) { $handlemodule = @opendir($dirroot); // $dirroot may be '..' - if (is_resource($handlemodule)) - { - while (($filemodule = readdir($handlemodule)) !== false) - { - if (!preg_match('/\./', $filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) // We exclude filemodule that contains . (are not directories) and are not directories. - { + if (is_resource($handlemodule)) { + while (($filemodule = readdir($handlemodule)) !== false) { + if (!preg_match('/\./', $filemodule) && is_dir($dirroot.'/'.$filemodule.'/sql')) { // We exclude filemodule that contains . (are not directories) and are not directories. //print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file; - if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file)) - { + if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file)) { $modulesfile[$dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file] = '/'.$filemodule.'/sql/dolibarr_'.$file; } } @@ -384,9 +369,10 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } } - foreach ($modulesfile as $modulefilelong => $modulefileshort) - { - if (in_array($modulefilelong, $listoffileprocessed)) continue; + foreach ($modulesfile as $modulefilelong => $modulefileshort) { + if (in_array($modulefilelong, $listoffileprocessed)) { + continue; + } print '<tr><td colspan="2"><hr></td></tr>'; print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td class="right">'.$modulefileshort.'</td></tr>'."\n"; @@ -401,24 +387,33 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print '</table>'; - if ($db->connected) $db->close(); + if ($db->connected) { + $db->close(); + } } -if (empty($actiondone)) -{ +if (empty($actiondone)) { print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>'; } $ret = 0; -if (!$ok && isset($argv[1])) $ret = 1; +if (!$ok && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("--- upgrade: end ".((!$ok && empty($_GET["ignoreerrors"])) || $dirmodule)); $nonext = (!$ok && empty($_GET["ignoreerrors"])) ? 2 : 0; -if ($dirmodule) $nonext = 1; +if ($dirmodule) { + $nonext = 1; +} pFooter($nonext, $setuplang); -if ($db->connected) $db->close(); +if ($db->connected) { + $db->close(); +} // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 708d8834123..23fa3d95a3c 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -39,8 +39,7 @@ */ include_once 'inc.php'; -if (!file_exists($conffile)) -{ +if (!file_exists($conffile)) { print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").'; } require_once $conffile; @@ -64,9 +63,11 @@ $error = 0; // Ne fonctionne que si on est pas en safe_mode. $err = error_reporting(); error_reporting(0); -if (!empty($conf->global->MAIN_OVERRIDE_TIME_LIMIT)) +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'; @@ -77,13 +78,21 @@ $enablemodules = GETPOST("enablemodules", 'alpha', 3) ?GETPOST("enablemodules", $langs->loadLangs(array("admin", "install", "bills", "suppliers")); -if ($dolibarr_main_db_type == 'mysqli') $choix = 1; -if ($dolibarr_main_db_type == 'pgsql') $choix = 2; -if ($dolibarr_main_db_type == 'mssql') $choix = 3; +if ($dolibarr_main_db_type == 'mysqli') { + $choix = 1; +} +if ($dolibarr_main_db_type == 'pgsql') { + $choix = 2; +} +if ($dolibarr_main_db_type == 'mssql') { + $choix = 3; +} dolibarr_install_syslog("--- upgrade2: entering upgrade2.php page ".$versionfrom." ".$versionto." ".$enablemodules); -if (!is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initialized", LOG_ERR); +if (!is_object($conf)) { + dolibarr_install_syslog("upgrade2: conf file not initialized", LOG_ERR); +} @@ -91,16 +100,14 @@ if (!is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initiali * View */ -if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto || preg_match('/version/', $versionto))) -{ +if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto || preg_match('/version/', $versionto))) { print 'Error: Parameter versionfrom or versionto missing or having a bad format.'."\n"; print 'Upgrade must be ran from command line with parameters or called from page install/index.php (like a first install)'."\n"; // Test if batch mode $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path = __DIR__.'/'; - if (substr($sapi_type, 0, 3) == 'cli') - { + if (substr($sapi_type, 0, 3) == 'cli') { print 'Syntax from command line: '.$script_file." x.y.z a.b.c [MAIN_MODULE_NAME1_TO_ENABLE,MAIN_MODULE_NAME2_TO_ENABLE...]\n"; } exit; @@ -109,22 +116,22 @@ if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto || pHeader('', 'step5', GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'upgrade', 'versionfrom='.$versionfrom.'&versionto='.$versionto); -if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) -{ - print '<h3><img class="valigntextbottom" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '.$langs->trans('DataMigration').'</h3>'; +if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) { + print '<h3><img class="valigntextbottom inline-block" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '; + print '<span class="inline-block">'.$langs->trans('DataMigration').'</span></h3>'; print '<table cellspacing="0" cellpadding="1" border="0" width="100%">'; // If password is encoded, we decode it - if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) - { + 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)) - { + 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); + } else { + $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } } // $conf is already instancied inside inc.php @@ -142,47 +149,48 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $hookmanager = new HookManager($db); $hookmanager->initHooks(array('upgrade')); - if (!$db->connected) - { + if (!$db->connected) { print '<tr><td colspan="4">'.$langs->trans("ErrorFailedToConnectToDatabase", $conf->db->name).'</td><td class="right">'.$langs->trans('Error').'</td></tr>'; dolibarr_install_syslog('upgrade2: failed to connect to database :'.$conf->db->name.' on '.$conf->db->host.' for user '.$conf->db->user, LOG_ERR); $error++; } - if (!$error) - { - if ($db->database_selected) - { + if (!$error) { + if ($db->database_selected) { dolibarr_install_syslog('upgrade2: database connection successful :'.$dolibarr_main_db_name); } else { $error++; } } - if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; + if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; + } $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; - if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; + if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; + } $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; // Chargement config - if (!$error) - { + if (!$error) { $conf->setValues($db); // Reset forced setup after the setValues - if (defined('SYSLOG_FILE')) $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + if (defined('SYSLOG_FILE')) { + $conf->global->SYSLOG_FILE = constant('SYSLOG_FILE'); + } $conf->global->MAIN_ENABLE_LOG_TO_HTML = 1; } /*************************************************************************************** - * - * Migration of data - * - ***************************************************************************************/ + * + * Migration of data + * + ***************************************************************************************/ $db->begin(); - if (!$error) - { + if (!$error) { // Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE // Version to install is DOL_VERSION $dolibarrlastupgradeversionarray = preg_split('/[\.-]/', isset($conf->global->MAIN_VERSION_LAST_UPGRADE) ? $conf->global->MAIN_VERSION_LAST_UPGRADE : (isset($conf->global->MAIN_VERSION_LAST_INSTALL) ? $conf->global->MAIN_VERSION_LAST_INSTALL : '')); @@ -222,8 +230,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $afterversionarray = explode('.', '2.0.0'); $beforeversionarray = explode('.', '2.7.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { // Script pour V2 -> V2.1 migrate_paiements($db, $langs, $conf); @@ -286,8 +293,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $afterversionarray = explode('.', '2.7.9'); $beforeversionarray = explode('.', '2.8.9'); //print $versionto.' '.versioncompare($versiontoarray,$afterversionarray).' '.versioncompare($versiontoarray,$beforeversionarray); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_price_facture($db, $langs, $conf); // Code of this function works for 2.8+ because need a field tva_tx migrate_relationship_tables($db, $langs, $conf, 'co_exp', 'fk_commande', 'commande', 'fk_expedition', 'shipping'); @@ -312,8 +318,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Script for 2.9 $afterversionarray = explode('.', '2.8.9'); $beforeversionarray = explode('.', '2.9.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_project_task_time($db, $langs, $conf); migrate_customerorder_shipping($db, $langs, $conf); @@ -326,16 +331,14 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Script for 3.0 $afterversionarray = explode('.', '2.9.9'); $beforeversionarray = explode('.', '3.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { // No particular code } // Script for 3.1 $afterversionarray = explode('.', '3.0.9'); $beforeversionarray = explode('.', '3.1.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_rename_directories($db, $langs, $conf, '/rss', '/externalrss'); migrate_actioncomm_element($db, $langs, $conf); @@ -344,8 +347,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Script for 3.2 $afterversionarray = explode('.', '3.1.9'); $beforeversionarray = explode('.', '3.2.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_price_contrat($db, $langs, $conf); migrate_mode_reglement($db, $langs, $conf); @@ -356,8 +358,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Script for 3.3 $afterversionarray = explode('.', '3.2.9'); $beforeversionarray = explode('.', '3.3.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_categorie_association($db, $langs, $conf); } @@ -367,32 +368,28 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Tasks to do always and only into last targeted version $afterversionarray = explode('.', '3.6.9'); // target is after this $beforeversionarray = explode('.', '3.7.9'); // target is before this - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { - migrate_event_assignement($db, $langs, $conf); + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + migrate_event_assignement($db, $langs, $conf); } // Scripts for 3.9 $afterversionarray = explode('.', '3.7.9'); $beforeversionarray = explode('.', '3.8.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { // No particular code } // Scripts for 4.0 $afterversionarray = explode('.', '3.9.9'); $beforeversionarray = explode('.', '4.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_rename_directories($db, $langs, $conf, '/fckeditor', '/medias'); } // Scripts for 5.0 $afterversionarray = explode('.', '4.0.9'); $beforeversionarray = explode('.', '5.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { // Migrate to add entity value into llx_societe_remise migrate_remise_entity($db, $langs, $conf); @@ -403,15 +400,12 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Scripts for 6.0 $afterversionarray = explode('.', '5.0.9'); $beforeversionarray = explode('.', '6.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { - if (!empty($conf->multicompany->enabled)) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { + if (!empty($conf->multicompany->enabled)) { global $multicompany_transverse_mode; // Only if the transverse mode is not used - if (empty($multicompany_transverse_mode)) - { + if (empty($multicompany_transverse_mode)) { // Migrate to add entity value into llx_user_rights migrate_user_rights_entity($db, $langs, $conf); @@ -424,8 +418,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Scripts for 7.0 $afterversionarray = explode('.', '6.0.9'); $beforeversionarray = explode('.', '7.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { // Migrate contact association migrate_event_assignement_contact($db, $langs, $conf); @@ -435,16 +428,14 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Scripts for 8.0 $afterversionarray = explode('.', '7.0.9'); $beforeversionarray = explode('.', '8.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_rename_directories($db, $langs, $conf, '/contracts', '/contract'); } // Scripts for 9.0 $afterversionarray = explode('.', '8.0.9'); $beforeversionarray = explode('.', '9.0.9'); - if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) - { + if (versioncompare($versiontoarray, $afterversionarray) >= 0 && versioncompare($versiontoarray, $beforeversionarray) <= 0) { migrate_user_photospath(); } @@ -460,15 +451,17 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ } // Code executed only if migration is LAST ONE. Must always be done. - if (versioncompare($versiontoarray, $versionranarray) >= 0 || versioncompare($versiontoarray, $versionranarray) <= -3) - { + if (versioncompare($versiontoarray, $versionranarray) >= 0 || versioncompare($versiontoarray, $versionranarray) <= -3) { // Reload modules (this must be always done and only into last targeted version, because code to reload module may need table structure of last version) $listofmodule = array( 'MAIN_MODULE_ACCOUNTING'=>'newboxdefonly', 'MAIN_MODULE_AGENDA'=>'newboxdefonly', + 'MAIN_MODULE_BOM'=>'menuonly', + 'MAIN_MODULE_BANQUE'=>'menuonly', 'MAIN_MODULE_BARCODE'=>'newboxdefonly', 'MAIN_MODULE_CRON'=>'newboxdefonly', 'MAIN_MODULE_COMMANDE'=>'newboxdefonly', + 'MAIN_MODULE_BLOCKEDLOG'=>'noboxes', 'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly', 'MAIN_MODULE_DON'=>'newboxdefonly', 'MAIN_MODULE_ECM'=>'newboxdefonly', @@ -477,15 +470,19 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ 'MAIN_MODULE_FACTURE'=>'newboxdefonly', 'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly', 'MAIN_MODULE_HOLIDAY'=>'newboxdefonly', + 'MAIN_MODULE_MARGIN'=>'menuonly', + 'MAIN_MODULE_MRP'=>'menuonly', 'MAIN_MODULE_OPENSURVEY'=>'newboxdefonly', 'MAIN_MODULE_PAYBOX'=>'newboxdefonly', 'MAIN_MODULE_PRINTING'=>'newboxdefonly', 'MAIN_MODULE_PRODUIT'=>'newboxdefonly', - 'MAIN_MODULE_RESOURCE'=>'newboxdefonly', + 'MAIN_MODULE_RECRUITMENT'=>'menuonly', + 'MAIN_MODULE_RESOURCE'=>'noboxes', 'MAIN_MODULE_SALARIES'=>'newboxdefonly', + 'MAIN_MODULE_SERVICE'=>'newboxdefonly', 'MAIN_MODULE_SYSLOG'=>'newboxdefonly', 'MAIN_MODULE_SOCIETE'=>'newboxdefonly', - 'MAIN_MODULE_SERVICE'=>'newboxdefonly', + 'MAIN_MODULE_STRIPE'=>'menuonly', 'MAIN_MODULE_TICKET'=>'newboxdefonly', 'MAIN_MODULE_TAKEPOS'=>'newboxdefonly', 'MAIN_MODULE_USER'=>'newboxdefonly', //This one must be always done and only into last targeted version) @@ -500,14 +497,12 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Can force activation of some module during migration with parameter 'enablemodules=MAIN_MODULE_XXX,MAIN_MODULE_YYY,...' // In most cases (online install or upgrade) $enablemodules is empty. Can be forced when ran from command line. - if (!$error && $enablemodules) - { + if (!$error && $enablemodules) { // Reload modules (this must be always done and only into last targeted version) $listofmodules = array(); $enablemodules = preg_replace('/enablemodules=/', '', $enablemodules); $tmplistofmodules = explode(',', $enablemodules); - foreach ($tmplistofmodules as $value) - { + foreach ($tmplistofmodules as $value) { $listofmodules[$value] = 'forceactivate'; } @@ -519,32 +514,28 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Can call a dedicated external upgrade process - if (!$error) - { + if (!$error) { $parameters = array('versionfrom'=>$versionfrom, 'versionto='.$versionto); $object = new stdClass(); $action = "upgrade"; $reshook = $hookmanager->executeHooks('doUpgrade2', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if ($hookmanager->resNbOfHooks > 0) - { - if ($reshook < 0) - { + if ($hookmanager->resNbOfHooks > 0) { + if ($reshook < 0) { print '<tr><td colspan="4">'; print '<b>'.$langs->trans('UpgradeExternalModule').'</b>: '; print $hookmanager->error; print "<!-- (".$reshook.") -->"; print '</td></tr>'; } else { - print '<tr><td colspan="4">'; + print '<tr class="trforrunsql"><td colspan="4">'; print '<b>'.$langs->trans('UpgradeExternalModule').'</b>: <span class="ok">OK</span>'; print "<!-- (".$reshook.") -->"; print '</td></tr>'; } } 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 - { - print '<tr><td colspan="4">'; + if (!empty($conf->modules_parts['hooks'])) { // If there is at least one module with one hook, we show message to say nothing was done + print '<tr class="trforrunsql"><td colspan="4">'; print '<b>'.$langs->trans('UpgradeExternalModule').'</b>: '.$langs->trans("None"); print '</td></tr>'; } @@ -554,6 +545,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print '</table>'; + // Set constant to ask to remake a new ping to inform about upgrade (if first ping was done and OK) $sql = 'UPDATE '.MAIN_DB_PREFIX."const SET VALUE = 'torefresh' WHERE name = 'MAIN_FIRST_PING_OK_ID'"; $db->query($sql, 1); @@ -578,23 +570,61 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ // Actions for all versions (no database change but rename some directories) migrate_rename_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits'); - print '<div><br>'.$langs->trans("MigrationFinished").'</div>'; + $silent = 0; + if (!$silent) { + print '<table width="100%">'; + print '<tr><td style="width: 30%">'.$langs->trans("MigrationFinished").'</td>'; + print '<td class="right">'; + if ($error == 0) { + //print '<span class="ok">'.$langs->trans("OK").'</span> - '; // $error = 0 does not mean there is no error (error are not always trapped) + } else { + print '<span class="error">'.$langs->trans("Error").'</span> - '; + } + + //if (!empty($conf->use_javascript_ajax)) { // use_javascript_ajax is not defined + print '<script type="text/javascript" language="javascript"> + jQuery(document).ready(function() { + function init_trrunsql() + { + console.log("toggle .trforrunsql"); + jQuery(".trforrunsql").toggle(); + } + init_trrunsql(); + jQuery(".trforrunsqlshowhide").click(function() { + init_trrunsql(); + }); + }); + </script>'; + print '<a class="trforrunsqlshowhide" href="#">'.$langs->trans("ShowHideDetails").'</a>'; + //} + + print '</td></tr>'."\n"; + print '</table>'; + } + + //print '<div><br>'.$langs->trans("MigrationFinished").'</div>'; } else { print '<div class="error">'.$langs->trans('ErrorWrongParameters').'</div>'; $error++; } $ret = 0; -if ($error && isset($argv[1])) $ret = 1; +if ($error && isset($argv[1])) { + $ret = 1; +} dolibarr_install_syslog("Exit ".$ret); dolibarr_install_syslog("--- upgrade2: end"); pFooter($error ? 2 : 0, $setuplang); -if ($db->connected) $db->close(); +if ($db->connected) { + $db->close(); +} // Return code if ran from command line -if ($ret) exit($ret); +if ($ret) { + exit($ret); +} @@ -615,8 +645,7 @@ function migrate_paiements($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."paiement", "fk_facture"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $sql = "SELECT p.rowid, p.fk_facture, p.amount"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p"; $sql .= " WHERE p.fk_facture > 0"; @@ -624,14 +653,12 @@ function migrate_paiements($db, $langs, $conf) $resql = $db->query($sql); dolibarr_install_syslog("upgrade2::migrate_paiements"); - if ($resql) - { + if ($resql) { $i = 0; $row = array(); $num = $db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $row[$i][0] = $obj->rowid; $row[$i][1] = $obj->fk_facture; @@ -642,21 +669,18 @@ function migrate_paiements($db, $langs, $conf) dol_print_error($db); } - if ($num) - { + if ($num) { print $langs->trans('MigrationPaymentsNumberToUpdate', $num)."<br>\n"; - if ($db->begin()) - { + if ($db->begin()) { $res = 0; $num = count($row); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement_facture (fk_facture, fk_paiement, amount)"; $sql .= " VALUES (".$row[$i][1].",".$row[$i][0].",".$row[$i][2].")"; $res += $db->query($sql); - $sql = "UPDATE ".MAIN_DB_PREFIX."paiement SET fk_facture = 0 WHERE rowid = ".$row[$i][0]; + $sql = "UPDATE ".MAIN_DB_PREFIX."paiement SET fk_facture = 0 WHERE rowid = ".((int) $row[$i][0]); $res += $db->query($sql); @@ -664,8 +688,7 @@ function migrate_paiements($db, $langs, $conf) } } - if ($res == (2 * count($row))) - { + if ($res == (2 * count($row))) { $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."<br>"; } else { @@ -701,8 +724,7 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."paiement", "fk_facture"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { // Tous les enregistrements qui sortent de cette requete devrait avoir un pere dans llx_paiement_facture $sql = "SELECT distinct p.rowid, p.datec, p.amount as pamount, bu.fk_bank, b.amount as bamount,"; $sql .= " bu2.url_id as socid"; @@ -717,16 +739,13 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_1"); $row = array(); - if ($resql) - { + if ($resql) { $i = $j = 0; $num = $db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj->pamount == $obj->bamount && $obj->socid) // Pour etre sur d'avoir bon cas - { + if ($obj->pamount == $obj->bamount && $obj->socid) { // Pour etre sur d'avoir bon cas $row[$j]['paymentid'] = $obj->rowid; // paymentid $row[$j]['pamount'] = $obj->pamount; $row[$j]['fk_bank'] = $obj->fk_bank; @@ -741,16 +760,16 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) dol_print_error($db); } - if (count($row)) - { + if (count($row)) { print $langs->trans('OrphelinsPaymentsDetectedByMethod', 1).': '.count($row)."<br>\n"; $db->begin(); $res = 0; $num = count($row); - for ($i = 0; $i < $num; $i++) - { - if ($conf->global->MAIN_FEATURES_LEVEL == 2) print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' pamount='.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' bamount='.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>'; + for ($i = 0; $i < $num; $i++) { + if ($conf->global->MAIN_FEATURES_LEVEL == 2) { + print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' pamount='.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' bamount='.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>'; + } // On cherche facture sans lien paiement et du meme montant et pour meme societe. $sql = " SELECT distinct f.rowid from ".MAIN_DB_PREFIX."facture as f"; @@ -760,12 +779,10 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) $sql .= " ORDER BY f.fk_statut"; //print $sql.'<br>'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); //print 'Nb of invoice found for this amount and company :'.$num.'<br>'; - if ($num >= 1) - { + if ($num >= 1) { $obj = $db->fetch_object($resql); $facid = $obj->rowid; @@ -781,8 +798,7 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) } } - if ($res > 0) - { + if ($res > 0) { print $langs->trans('MigrationSuccessfullUpdate')."<br>"; } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."<br>\n"; @@ -818,8 +834,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."paiement", "fk_facture"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { // Tous les enregistrements qui sortent de cette requete devrait avoir un pere dans llx_paiement_facture $sql = "SELECT distinct p.rowid, p.datec, p.amount as pamount, bu.fk_bank, b.amount as bamount,"; $sql .= " bu2.url_id as socid"; @@ -833,16 +848,13 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_2"); $row = array(); - if ($resql) - { + if ($resql) { $i = $j = 0; $num = $db->num_rows($resql); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj->pamount == $obj->bamount && $obj->socid) // Pour etre sur d'avoir bon cas - { + if ($obj->pamount == $obj->bamount && $obj->socid) { // Pour etre sur d'avoir bon cas $row[$j]['paymentid'] = $obj->rowid; // paymentid $row[$j]['pamount'] = $obj->pamount; $row[$j]['fk_bank'] = $obj->fk_bank; @@ -860,15 +872,15 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) $nberr = 0; $num = count($row); - if ($num) - { + if ($num) { print $langs->trans('OrphelinsPaymentsDetectedByMethod', 2).': '.count($row)."<br>\n"; $db->begin(); $res = 0; - for ($i = 0; $i < $num; $i++) - { - if ($conf->global->MAIN_FEATURES_LEVEL == 2) print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' '.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' '.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>'; + for ($i = 0; $i < $num; $i++) { + if ($conf->global->MAIN_FEATURES_LEVEL == 2) { + print '* '.$row[$i]['datec'].' paymentid='.$row[$i]['paymentid'].' '.$row[$i]['pamount'].' fk_bank='.$row[$i]['fk_bank'].' '.$row[$i]['bamount'].' socid='.$row[$i]['socid'].'<br>'; + } // On cherche facture sans lien paiement et du meme montant et pour meme societe. $sql = " SELECT distinct f.rowid from ".MAIN_DB_PREFIX."facture as f"; @@ -878,12 +890,10 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) $sql .= " ORDER BY f.fk_statut"; //print $sql.'<br>'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); //print 'Nb of invoice found for this amount and company :'.$num.'<br>'; - if ($num >= 1) - { + if ($num >= 1) { $obj = $db->fetch_object($resql); $facid = $obj->rowid; @@ -899,8 +909,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) } } - if ($res > 0) - { + if ($res > 0) { print $langs->trans('MigrationSuccessfullUpdate')."<br>"; } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."<br>\n"; @@ -917,8 +926,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) $sql = "ALTER TABLE ".MAIN_DB_PREFIX."paiement DROP COLUMN fk_facture"; $db->query($sql); - if (!$nberr) - { + if (!$nberr) { $db->commit(); } else { print 'ERROR'; @@ -960,19 +968,16 @@ function migrate_contracts_det($db, $langs, $conf) $resql = $db->query($sql); dolibarr_install_syslog("upgrade2::migrate_contracts_det"); - if ($resql) - { + if ($resql) { $i = 0; $row = array(); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { print $langs->trans('MigrationContractsNumberToUpdate', $num)."<br>\n"; $db->begin(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet ("; @@ -991,8 +996,7 @@ function migrate_contracts_det($db, $langs, $conf) $sql .= "null"; $sql .= ")"; - if ($db->query($sql)) - { + if ($db->query($sql)) { print $langs->trans('MigrationContractsLineCreation', $obj->cref)."<br>\n"; } else { dol_print_error($db); @@ -1002,8 +1006,7 @@ function migrate_contracts_det($db, $langs, $conf) $i++; } - if (!$nberr) - { + if (!$nberr) { // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."<br>"; @@ -1048,19 +1051,16 @@ function migrate_links_transfert($db, $langs, $conf) $resql = $db->query($sql); dolibarr_install_syslog("upgrade2::migrate_links_transfert"); - if ($resql) - { + if ($resql) { $i = 0; $row = array(); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { print $langs->trans('MigrationBankTransfertsToUpdate', $num)."<br>\n"; $db->begin(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url ("; @@ -1073,8 +1073,7 @@ function migrate_links_transfert($db, $langs, $conf) print $sql.'<br>'; dolibarr_install_syslog("migrate_links_transfert"); - if (!$db->query($sql)) - { + if (!$db->query($sql)) { dol_print_error($db); $nberr++; } @@ -1082,8 +1081,7 @@ function migrate_links_transfert($db, $langs, $conf) $i++; } - if (!$nberr) - { + if (!$nberr) { // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."<br>"; @@ -1119,18 +1117,26 @@ function migrate_contracts_date1($db, $langs, $conf) $sql = "update ".MAIN_DB_PREFIX."contrat set date_contrat=tms where date_contrat is null"; dolibarr_install_syslog("upgrade2::migrate_contracts_date1"); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); - if ($db->affected_rows($resql) > 0) - print $langs->trans('MigrationContractsEmptyDatesUpdateSuccess')."<br>\n"; - else print $langs->trans('MigrationContractsEmptyDatesNothingToUpdate')."<br>\n"; + if (!$resql) { + dol_print_error($db); + } + if ($db->affected_rows($resql) > 0) { + print $langs->trans('MigrationContractsEmptyDatesUpdateSuccess')."<br>\n"; + } else { + print $langs->trans('MigrationContractsEmptyDatesNothingToUpdate')."<br>\n"; + } $sql = "update ".MAIN_DB_PREFIX."contrat set datec=tms where datec is null"; dolibarr_install_syslog("upgrade2::migrate_contracts_date1"); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); - if ($db->affected_rows($resql) > 0) - print $langs->trans('MigrationContractsEmptyCreationDatesUpdateSuccess')."<br>\n"; - else print $langs->trans('MigrationContractsEmptyCreationDatesNothingToUpdate')."<br>\n"; + if (!$resql) { + dol_print_error($db); + } + if ($db->affected_rows($resql) > 0) { + print $langs->trans('MigrationContractsEmptyCreationDatesUpdateSuccess')."<br>\n"; + } else { + print $langs->trans('MigrationContractsEmptyCreationDatesNothingToUpdate')."<br>\n"; + } print '</td></tr>'; } @@ -1160,22 +1166,18 @@ function migrate_contracts_date2($db, $langs, $conf) $resql = $db->query($sql); dolibarr_install_syslog("upgrade2::migrate_contracts_date2"); - if ($resql) - { + if ($resql) { $i = 0; $row = array(); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $nbcontratsmodifie = 0; $db->begin(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj->date_contrat > $obj->datemin) - { + if ($obj->date_contrat > $obj->datemin) { $datemin = $db->jdate($obj->datemin); print $langs->trans('MigrationContractsInvalidDateFix', $obj->cref, $obj->date_contrat, $obj->datemin)."<br>\n"; @@ -1183,7 +1185,9 @@ function migrate_contracts_date2($db, $langs, $conf) $sql .= " SET date_contrat='".$db->idate($datemin)."'"; $sql .= " WHERE rowid=".$obj->cref; $resql2 = $db->query($sql); - if (!$resql2) dol_print_error($db); + if (!$resql2) { + dol_print_error($db); + } $nbcontratsmodifie++; } @@ -1192,9 +1196,11 @@ function migrate_contracts_date2($db, $langs, $conf) $db->commit(); - if ($nbcontratsmodifie) - print $langs->trans('MigrationContractsInvalidDatesNumber', $nbcontratsmodifie)."<br>\n"; - else print $langs->trans('MigrationContractsInvalidDatesNothingToUpdate')."<br>\n"; + if ($nbcontratsmodifie) { + print $langs->trans('MigrationContractsInvalidDatesNumber', $nbcontratsmodifie)."<br>\n"; + } else { + print $langs->trans('MigrationContractsInvalidDatesNothingToUpdate')."<br>\n"; + } } } else { dol_print_error($db); @@ -1221,10 +1227,14 @@ function migrate_contracts_date3($db, $langs, $conf) $sql = "update ".MAIN_DB_PREFIX."contrat set datec=date_contrat where datec is null or datec > date_contrat"; dolibarr_install_syslog("upgrade2::migrate_contracts_date3"); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); - if ($db->affected_rows($resql) > 0) - print $langs->trans('MigrationContractsIncoherentCreationDateUpdateSuccess')."<br>\n"; - else print $langs->trans('MigrationContractsIncoherentCreationDateNothingToUpdate')."<br>\n"; + if (!$resql) { + dol_print_error($db); + } + if ($db->affected_rows($resql) > 0) { + print $langs->trans('MigrationContractsIncoherentCreationDateUpdateSuccess')."<br>\n"; + } else { + print $langs->trans('MigrationContractsIncoherentCreationDateNothingToUpdate')."<br>\n"; + } print '</td></tr>'; } @@ -1248,19 +1258,19 @@ function migrate_contracts_open($db, $langs, $conf) $sql .= " WHERE cd.statut = 4 AND c.statut=2 AND c.rowid=cd.fk_contrat"; dolibarr_install_syslog("upgrade2::migrate_contracts_open"); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } if ($db->affected_rows($resql) > 0) { $i = 0; $row = array(); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $nbcontratsmodifie = 0; $db->begin(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print $langs->trans('MigrationReopenThisContract', $obj->cref)."<br>\n"; @@ -1268,7 +1278,9 @@ function migrate_contracts_open($db, $langs, $conf) $sql .= " SET statut=1"; $sql .= " WHERE rowid=".$obj->cref; $resql2 = $db->query($sql); - if (!$resql2) dol_print_error($db); + if (!$resql2) { + dol_print_error($db); + } $nbcontratsmodifie++; @@ -1277,11 +1289,15 @@ function migrate_contracts_open($db, $langs, $conf) $db->commit(); - if ($nbcontratsmodifie) - print $langs->trans('MigrationReopenedContractsNumber', $nbcontratsmodifie)."<br>\n"; - else print $langs->trans('MigrationReopeningContractsNothingToUpdate')."<br>\n"; + if ($nbcontratsmodifie) { + print $langs->trans('MigrationReopenedContractsNumber', $nbcontratsmodifie)."<br>\n"; + } else { + print $langs->trans('MigrationReopeningContractsNothingToUpdate')."<br>\n"; + } } - } else print $langs->trans('MigrationReopeningContractsNothingToUpdate')."<br>\n"; + } else { + print $langs->trans('MigrationReopeningContractsNothingToUpdate')."<br>\n"; + } print '</td></tr>'; } @@ -1305,8 +1321,7 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."paiementfourn", "fk_facture_fourn"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $error = 0; $nb = 0; @@ -1316,32 +1331,27 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_paiementfourn_facturefourn"); $select_resql = $db->query($select_sql); - if ($select_resql) - { + if ($select_resql) { $select_num = $db->num_rows($select_resql); $i = 0; $var = true; // Pour chaque paiement fournisseur, on insere une ligne dans paiementfourn_facturefourn - while (($i < $select_num) && (!$error)) - { + while (($i < $select_num) && (!$error)) { $var = !$var; $select_obj = $db->fetch_object($select_resql); // Verifier si la ligne est deja dans la nouvelle table. On ne veut pas inserer de doublons. $check_sql = 'SELECT fk_paiementfourn, fk_facturefourn'; $check_sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn'; - $check_sql .= ' WHERE fk_paiementfourn = '.$select_obj->rowid.' AND fk_facturefourn = '.$select_obj->fk_facture_fourn; + $check_sql .= ' WHERE fk_paiementfourn = '.((int) $select_obj->rowid).' AND fk_facturefourn = '.((int) $select_obj->fk_facture_fourn); $check_resql = $db->query($check_sql); - if ($check_resql) - { + if ($check_resql) { $check_num = $db->num_rows($check_resql); - if ($check_num == 0) - { + if ($check_num == 0) { $db->begin(); - if ($nb == 0) - { + if ($nb == 0) { print '<tr><td colspan="4" class="nowrap"><b>'.$langs->trans('SuppliersInvoices').'</b></td></tr>'; print '<tr><td>fk_paiementfourn</td><td>fk_facturefourn</td><td>'.$langs->trans('Amount').'</td><td>&nbsp;</td></tr>'; } @@ -1355,8 +1365,7 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) $insert_sql .= ' amount = \''.$select_obj->amount.'\''; $insert_resql = $db->query($insert_sql); - if ($insert_resql) - { + if ($insert_resql) { $nb++; print '<td><span class="ok">'.$langs->trans("OK").'</span></td>'; } else { @@ -1374,10 +1383,8 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) $error++; } - if (!$error) - { - if (!$nb) - { + if (!$error) { + if (!$nb) { print '<tr><td>'.$langs->trans("AlreadyDone").'</td></tr>'; } $db->commit(); @@ -1425,14 +1432,11 @@ function migrate_price_facture($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_price_facture"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $rowid = $obj->rowid; @@ -1463,15 +1467,12 @@ function migrate_price_facture($db, $langs, $conf) /* On touche a facture mere uniquement si total_ttc = 0 */ - if (!$total_ttc_f) - { + if (!$total_ttc_f) { $facture = new Facture($db); $facture->id = $obj->facid; - if ($facture->fetch($facture->id) >= 0) - { - if ($facture->update_price() > 0) - { + if ($facture->fetch($facture->id) >= 0) { + if ($facture->update_price() > 0) { //print $facture->id; } else { print "Error id=".$facture->id; @@ -1514,7 +1515,7 @@ function migrate_price_facture($db, $langs, $conf) */ function migrate_price_propal($db, $langs, $conf) { - $tmpmysoc = new Societe($db); + $tmpmysoc = new Societe($db); $tmpmysoc->setMysoc($conf); $db->begin(); @@ -1533,14 +1534,11 @@ function migrate_price_propal($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_price_propal"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $rowid = $obj->rowid; @@ -1570,24 +1568,24 @@ function migrate_price_propal($db, $langs, $conf) /* On touche pas a propal mere - $propal = new Propal($db); - $propal->id=$obj->rowid; - if ( $propal->fetch($propal->id) >= 0 ) - { - if ( $propal->update_price() > 0 ) - { - print ". "; - } - else - { - print "Error id=".$propal->id; - } - } - else - { - print "Error #3"; - } - */ + $propal = new Propal($db); + $propal->id=$obj->rowid; + if ( $propal->fetch($propal->id) >= 0 ) + { + if ( $propal->update_price() > 0 ) + { + print ". "; + } + else + { + print "Error id=".$propal->id; + } + } + else + { + print "Error #3"; + } + */ $i++; } } else { @@ -1620,9 +1618,11 @@ function migrate_price_contrat($db, $langs, $conf) { $db->begin(); - $tmpmysoc = new Societe($db); + $tmpmysoc = new Societe($db); $tmpmysoc->setMysoc($conf); - if (empty($tmpmysoc->country_id)) $tmpmysoc->country_id = 0; // Ti not have this set to '' or will make sql syntax error. + if (empty($tmpmysoc->country_id)) { + $tmpmysoc->country_id = 0; // Ti not have this set to '' or will make sql syntax error. + } print '<tr><td colspan="4">'; @@ -1638,14 +1638,11 @@ function migrate_price_contrat($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_price_contrat"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $rowid = $obj->rowid; @@ -1722,14 +1719,11 @@ function migrate_price_commande($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_price_commande"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $rowid = $obj->rowid; @@ -1758,24 +1752,24 @@ function migrate_price_commande($db, $langs, $conf) $commandeligne->update_total(); /* On touche pas a facture mere - $commande = new Commande($db); - $commande->id = $obj->rowid; - if ( $commande->fetch($commande->id) >= 0 ) - { - if ( $commande->update_price() > 0 ) - { - print ". "; - } - else - { - print "Error id=".$commande->id; - } - } - else - { - print "Error #3"; - } - */ + $commande = new Commande($db); + $commande->id = $obj->rowid; + if ( $commande->fetch($commande->id) >= 0 ) + { + if ( $commande->update_price() > 0 ) + { + print ". "; + } + else + { + print "Error id=".$commande->id; + } + } + else + { + print "Error #3"; + } + */ $i++; } } else { @@ -1785,14 +1779,14 @@ function migrate_price_commande($db, $langs, $conf) $db->free($resql); /* - $sql = "DELETE FROM ".MAIN_DB_PREFIX."commandedet"; - $sql.= " WHERE price = 0 and total_ttc = 0 and total_tva = 0 and total_ht = 0 AND remise_percent = 0"; - $resql=$db->query($sql); - if (! $resql) - { - dol_print_error($db); - } - */ + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commandedet"; + $sql.= " WHERE price = 0 and total_ttc = 0 and total_tva = 0 and total_ht = 0 AND remise_percent = 0"; + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + } + */ $db->commit(); } else { @@ -1835,14 +1829,11 @@ function migrate_price_commande_fournisseur($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_price_commande_fournisseur"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $rowid = $obj->rowid; @@ -1871,24 +1862,24 @@ function migrate_price_commande_fournisseur($db, $langs, $conf) $commandeligne->update_total(); /* On touche pas a facture mere - $commande = new Commande($db); - $commande->id = $obj->rowid; - if ( $commande->fetch($commande->id) >= 0 ) - { - if ( $commande->update_price() > 0 ) - { - print ". "; - } - else - { - print "Error id=".$commande->id; - } - } - else - { - print "Error #3"; - } - */ + $commande = new Commande($db); + $commande->id = $obj->rowid; + if ( $commande->fetch($commande->id) >= 0 ) + { + if ( $commande->update_price() > 0 ) + { + print ". "; + } + else + { + print "Error id=".$commande->id; + } + } + else + { + print "Error #3"; + } + */ $i++; } } else { @@ -1898,14 +1889,14 @@ function migrate_price_commande_fournisseur($db, $langs, $conf) $db->free($resql); /* - $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet"; - $sql.= " WHERE subprice = 0 and total_ttc = 0 and total_tva = 0 and total_ht = 0"; - $resql=$db->query($sql); - if (! $resql) - { - dol_print_error($db); - } - */ + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet"; + $sql.= " WHERE subprice = 0 and total_ttc = 0 and total_tva = 0 and total_ht = 0"; + $resql=$db->query($sql); + if (! $resql) + { + dol_print_error($db); + } + */ $db->commit(); } else { @@ -1934,42 +1925,42 @@ function migrate_modeles($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_modeles"); - if (!empty($conf->facture->enabled)) - { + if (!empty($conf->facture->enabled)) { include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; $modellist = ModelePDFFactures::liste_modeles($db); - if (count($modellist) == 0) - { + if (count($modellist) == 0) { // Aucun model par defaut. $sql = " insert into ".MAIN_DB_PREFIX."document_model(nom,type) values('crabe','invoice')"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } } - if (!empty($conf->commande->enabled)) - { + if (!empty($conf->commande->enabled)) { include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; $modellist = ModelePDFCommandes::liste_modeles($db); - if (count($modellist) == 0) - { + if (count($modellist) == 0) { // Aucun model par defaut. $sql = " insert into ".MAIN_DB_PREFIX."document_model(nom,type) values('einstein','order')"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } } - if (!empty($conf->expedition->enabled)) - { + if (!empty($conf->expedition->enabled)) { include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; $modellist = ModelePDFExpedition::liste_modeles($db); - if (count($modellist) == 0) - { + if (count($modellist) == 0) { // Aucun model par defaut. $sql = " insert into ".MAIN_DB_PREFIX."document_model(nom,type) values('rouget','shipping')"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } } @@ -1996,31 +1987,26 @@ function migrate_commande_expedition($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."expedition", "fk_commande"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $error = 0; $db->begin(); $sql = "SELECT e.rowid, e.fk_commande FROM ".MAIN_DB_PREFIX."expedition as e"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."co_exp (fk_expedition,fk_commande)"; $sql .= " VALUES (".$obj->rowid.",".$obj->fk_commande.")"; $resql2 = $db->query($sql); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2029,8 +2015,7 @@ function migrate_commande_expedition($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); $sql = "ALTER TABLE ".MAIN_DB_PREFIX."expedition DROP COLUMN fk_commande"; print $langs->trans('FieldRenamed')."<br>\n"; @@ -2067,8 +2052,7 @@ function migrate_commande_livraison($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."livraison", "fk_commande"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $error = 0; $db->begin(); @@ -2078,23 +2062,19 @@ function migrate_commande_livraison($db, $langs, $conf) $sql .= " FROM ".MAIN_DB_PREFIX."livraison as l, ".MAIN_DB_PREFIX."commande as c"; $sql .= " WHERE c.rowid = l.fk_commande"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "INSERT INTO ".MAIN_DB_PREFIX."co_liv (fk_livraison,fk_commande)"; $sql .= " VALUES (".$obj->rowid.",".$obj->fk_commande.")"; $resql2 = $db->query($sql); - if ($resql2) - { + if ($resql2) { $delivery_date = $db->jdate($obj->delivery_date); $sqlu = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; @@ -2102,8 +2082,7 @@ function migrate_commande_livraison($db, $langs, $conf) $sqlu .= ", date_livraison='".$db->idate($delivery_date)."'"; $sqlu .= " WHERE rowid = ".$obj->rowid; $resql3 = $db->query($sqlu); - if (!$resql3) - { + if (!$resql3) { $error++; dol_print_error($db); } @@ -2116,8 +2095,7 @@ function migrate_commande_livraison($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); $sql = "ALTER TABLE ".MAIN_DB_PREFIX."livraison DROP COLUMN fk_commande"; print $langs->trans('FieldRenamed')."<br>\n"; @@ -2156,8 +2134,7 @@ function migrate_detail_livraison($db, $langs, $conf) // If not this means migration was already done. $result = $db->DDLDescTable(MAIN_DB_PREFIX."livraisondet", "fk_commande_ligne"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $error = 0; $db->begin(); @@ -2167,15 +2144,12 @@ function migrate_detail_livraison($db, $langs, $conf) $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd, ".MAIN_DB_PREFIX."livraisondet as ld"; $sql .= " WHERE ld.fk_commande_ligne = cd.rowid"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."livraisondet SET"; @@ -2186,15 +2160,13 @@ function migrate_detail_livraison($db, $langs, $conf) $sql .= " WHERE fk_commande_ligne = ".$obj->rowid; $resql2 = $db->query($sql); - if ($resql2) - { + if ($resql2) { $sql = "SELECT total_ht"; $sql .= " FROM ".MAIN_DB_PREFIX."livraison"; - $sql .= " WHERE rowid = ".$obj->fk_livraison; + $sql .= " WHERE rowid = ".((int) $obj->fk_livraison); $resql3 = $db->query($sql); - if ($resql3) - { + if ($resql3) { $obju = $db->fetch_object($resql3); $total_ht = $obju->total_ht + $obj->total_ht; @@ -2202,8 +2174,7 @@ function migrate_detail_livraison($db, $langs, $conf) $sqlu .= " total_ht='".$db->escape($total_ht)."'"; $sqlu .= " WHERE rowid=".$obj->fk_livraison; $resql4 = $db->query($sqlu); - if (!$resql4) - { + if (!$resql4) { $error++; dol_print_error($db); } @@ -2220,8 +2191,7 @@ function migrate_detail_livraison($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); $sql = "ALTER TABLE ".MAIN_DB_PREFIX."livraisondet CHANGE fk_commande_ligne fk_origin_line integer"; print $langs->trans('FieldRenamed')."<br>\n"; @@ -2236,8 +2206,7 @@ function migrate_detail_livraison($db, $langs, $conf) } else { $result = $db->DDLDescTable(MAIN_DB_PREFIX."livraisondet", "fk_origin_line"); $obj = $db->fetch_object($result); - if (!$obj) - { + if (!$obj) { $sql = "ALTER TABLE ".MAIN_DB_PREFIX."livraisondet ADD COLUMN fk_origin_line integer after fk_livraison"; $db->query($sql); } @@ -2271,15 +2240,12 @@ function migrate_stocks($db, $langs, $conf) $sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; $sql .= " GROUP BY fk_product"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."product SET"; @@ -2287,8 +2253,7 @@ function migrate_stocks($db, $langs, $conf) $sql .= " WHERE rowid=".$obj->fk_product; $resql2 = $db->query($sql); - if ($resql2) - { + if ($resql2) { } else { $error++; dol_print_error($db); @@ -2298,8 +2263,7 @@ function migrate_stocks($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2332,8 +2296,7 @@ function migrate_menus($db, $langs, $conf) $error = 0; - if ($db->DDLInfoTable(MAIN_DB_PREFIX."menu_constraint")) - { + if ($db->DDLInfoTable(MAIN_DB_PREFIX."menu_constraint")) { $db->begin(); $sql = "SELECT m.rowid, mc.action"; @@ -2341,14 +2304,11 @@ function migrate_menus($db, $langs, $conf) $sql .= " WHERE md.fk_menu = m.rowid AND md.fk_constraint = mc.rowid"; $sql .= " AND m.enabled = '1'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."menu SET"; @@ -2357,8 +2317,7 @@ function migrate_menus($db, $langs, $conf) $sql .= " AND enabled = '1'"; $resql2 = $db->query($sql); - if ($resql2) - { + if ($resql2) { } else { $error++; dol_print_error($db); @@ -2368,8 +2327,7 @@ function migrate_menus($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2405,8 +2363,7 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) $error = 0; - if ($db->DDLInfoTable(MAIN_DB_PREFIX."co_exp")) - { + if ($db->DDLInfoTable(MAIN_DB_PREFIX."co_exp")) { $db->begin(); $sql = "SELECT c.fk_adresse_livraison, ce.fk_expedition"; @@ -2416,15 +2373,12 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) $sql .= " AND c.fk_adresse_livraison IS NOT NULL AND c.fk_adresse_livraison != 0"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET"; @@ -2432,8 +2386,7 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) $sql .= " WHERE rowid=".$obj->fk_expedition; $resql2 = $db->query($sql); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2444,8 +2397,7 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2474,10 +2426,8 @@ function migrate_restore_missing_links($db, $langs, $conf) { dolibarr_install_syslog("upgrade2::migrate_restore_missing_links"); - if (($db->type == 'mysql' || $db->type == 'mysqli')) - { - if (versioncompare($db->getVersionArray(), array(4, 0)) < 0) - { + if (($db->type == 'mysql' || $db->type == 'mysqli')) { + if (versioncompare($db->getVersionArray(), array(4, 0)) < 0) { dolibarr_install_syslog("upgrade2::migrate_restore_missing_links Version of database too old to make this migrate action"); return 0; } @@ -2504,15 +2454,12 @@ function migrate_restore_missing_links($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_restore_missing_links DIRECTION 1"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); print 'Line '.$obj->rowid.' in '.$table1.' is linked to record '.$obj->field.' in '.$table2.' that has no link to '.$table1.'. We fix this.<br>'; @@ -2521,18 +2468,18 @@ function migrate_restore_missing_links($db, $langs, $conf) $sql .= " WHERE rowid=".$obj->field; $resql2 = $db->query($sql); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } //print ". "; $i++; } - } else print $langs->trans('AlreadyDone')."<br>\n"; + } else { + print $langs->trans('AlreadyDone')."<br>\n"; + } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2564,15 +2511,12 @@ function migrate_restore_missing_links($db, $langs, $conf) dolibarr_install_syslog("upgrade2::migrate_restore_missing_links DIRECTION 2"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); print 'Line '.$obj->rowid.' in '.$table1.' is linked to record '.$obj->field.' in '.$table2.' that has no link to '.$table1.'. We fix this.<br>'; @@ -2581,8 +2525,7 @@ function migrate_restore_missing_links($db, $langs, $conf) $sql .= " WHERE rowid=".$obj->field; $resql2 = $db->query($sql); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2593,8 +2536,7 @@ function migrate_restore_missing_links($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2626,23 +2568,19 @@ function migrate_project_user_resp($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."projet", "fk_user_resp"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { $error = 0; $db->begin(); $sql = "SELECT rowid, fk_user_resp FROM ".MAIN_DB_PREFIX."projet"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."element_contact ("; @@ -2659,11 +2597,9 @@ function migrate_project_user_resp($db, $langs, $conf) $sql2 .= ", ".$obj->fk_user_resp; $sql2 .= ")"; - if ($obj->fk_user_resp > 0) - { + if ($obj->fk_user_resp > 0) { $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2674,11 +2610,9 @@ function migrate_project_user_resp($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."projet DROP COLUMN fk_user_resp"; - if ($db->query($sqlDrop)) - { + if ($db->query($sqlDrop)) { $db->commit(); } else { $db->rollback(); @@ -2713,23 +2647,19 @@ function migrate_project_task_actors($db, $langs, $conf) print '<br>'; print '<b>'.$langs->trans('MigrationProjectTaskActors')."</b><br>\n"; - if ($db->DDLInfoTable(MAIN_DB_PREFIX."projet_task_actors")) - { + if ($db->DDLInfoTable(MAIN_DB_PREFIX."projet_task_actors")) { $error = 0; $db->begin(); $sql = "SELECT fk_projet_task as fk_project_task, fk_user FROM ".MAIN_DB_PREFIX."projet_task_actors"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."element_contact ("; @@ -2748,8 +2678,7 @@ function migrate_project_task_actors($db, $langs, $conf) $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2758,11 +2687,9 @@ function migrate_project_task_actors($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $sqlDrop = "DROP TABLE ".MAIN_DB_PREFIX."projet_task_actors"; - if ($db->query($sqlDrop)) - { + if ($db->query($sqlDrop)) { $db->commit(); } else { $db->rollback(); @@ -2802,8 +2729,7 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so $error = 0; - if ($db->DDLInfoTable(MAIN_DB_PREFIX.$table)) - { + if ($db->DDLInfoTable(MAIN_DB_PREFIX.$table)) { dolibarr_install_syslog("upgrade2::migrate_relationship_tables table = ".MAIN_DB_PREFIX.$table); $db->begin(); @@ -2812,15 +2738,12 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so $sqlSelect .= " FROM ".MAIN_DB_PREFIX.$table; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlInsert = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; @@ -2836,8 +2759,7 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so $sqlInsert .= ")"; $result = $db->query($sqlInsert); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -2848,11 +2770,9 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $sqlDrop = "DROP TABLE ".MAIN_DB_PREFIX.$table; - if ($db->query($sqlDrop)) - { + if ($db->query($sqlDrop)) { $db->commit(); } else { $db->rollback(); @@ -2895,22 +2815,18 @@ function migrate_project_task_time($db, $langs, $conf) $sql = "SELECT rowid, fk_task, task_duration"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $totaltime = array(); $oldtime = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj->task_duration > 0) - { + if ($obj->task_duration > 0) { // convert to second // only for int time and float time ex: 1,75 for 1h45 list($hour, $min) = explode('.', $obj->task_duration); @@ -2923,36 +2839,37 @@ function migrate_project_task_time($db, $langs, $conf) $sql2 .= " WHERE rowid = ".$obj->rowid; $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } print ". "; $oldtime++; - if (!empty($totaltime[$obj->fk_task])) $totaltime[$obj->fk_task] += $newtime; - else $totaltime[$obj->fk_task] = $newtime; + if (!empty($totaltime[$obj->fk_task])) { + $totaltime[$obj->fk_task] += $newtime; + } else { + $totaltime[$obj->fk_task] = $newtime; + } } else { - if (!empty($totaltime[$obj->fk_task])) $totaltime[$obj->fk_task] += $obj->task_duration; - else $totaltime[$obj->fk_task] = $obj->task_duration; + if (!empty($totaltime[$obj->fk_task])) { + $totaltime[$obj->fk_task] += $obj->task_duration; + } else { + $totaltime[$obj->fk_task] = $obj->task_duration; + } } $i++; } - if ($error == 0) - { - if ($oldtime > 0) - { - foreach ($totaltime as $taskid => $total_duration) - { + if ($error == 0) { + if ($oldtime > 0) { + foreach ($totaltime as $taskid => $total_duration) { $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET"; $sql .= " duration_effective = ".$total_duration; - $sql .= " WHERE rowid = ".$taskid; + $sql .= " WHERE rowid = ".((int) $taskid); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; dol_print_error($db); } @@ -2970,8 +2887,7 @@ function migrate_project_task_time($db, $langs, $conf) dol_print_error($db); } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -3001,8 +2917,7 @@ function migrate_customerorder_shipping($db, $langs, $conf) $result2 = $db->DDLDescTable(MAIN_DB_PREFIX."expedition", "date_delivery"); $obj1 = $db->fetch_object($result1); $obj2 = $db->fetch_object($result2); - if (!$obj1 && !$obj2) - { + if (!$obj1 && !$obj2) { dolibarr_install_syslog("upgrade2::migrate_customerorder_shipping"); $db->begin(); @@ -3010,8 +2925,7 @@ function migrate_customerorder_shipping($db, $langs, $conf) $sqlAdd1 = "ALTER TABLE ".MAIN_DB_PREFIX."expedition ADD COLUMN ref_customer varchar(30) AFTER entity"; $sqlAdd2 = "ALTER TABLE ".MAIN_DB_PREFIX."expedition ADD COLUMN date_delivery date DEFAULT NULL AFTER date_expedition"; - if ($db->query($sqlAdd1) && $db->query($sqlAdd2)) - { + if ($db->query($sqlAdd1) && $db->query($sqlAdd2)) { $sqlSelect = "SELECT e.rowid as shipping_id, c.ref_client, c.date_livraison as delivery_date"; $sqlSelect .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sqlSelect .= ", ".MAIN_DB_PREFIX."element_element as el"; @@ -3020,15 +2934,12 @@ function migrate_customerorder_shipping($db, $langs, $conf) $sqlSelect .= " AND el.targettype = 'shipping'"; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."expedition SET"; @@ -3037,8 +2948,7 @@ function migrate_customerorder_shipping($db, $langs, $conf) $sqlUpdate .= " WHERE rowid = ".$obj->shipping_id; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3049,8 +2959,7 @@ function migrate_customerorder_shipping($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { dol_print_error($db); @@ -3090,8 +2999,7 @@ function migrate_shipping_delivery($db, $langs, $conf) $result = $db->DDLDescTable(MAIN_DB_PREFIX."livraison", "fk_expedition"); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { dolibarr_install_syslog("upgrade2::migrate_shipping_delivery"); $db->begin(); @@ -3101,15 +3009,12 @@ function migrate_shipping_delivery($db, $langs, $conf) $sqlSelect .= " WHERE fk_expedition is not null"; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlInsert = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; @@ -3125,14 +3030,12 @@ function migrate_shipping_delivery($db, $langs, $conf) $sqlInsert .= ")"; $result = $db->query($sqlInsert); - if ($result) - { + if ($result) { $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."livraison SET fk_expedition = NULL"; $sqlUpdate .= " WHERE rowid = ".$obj->rowid; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3147,8 +3050,7 @@ function migrate_shipping_delivery($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $sqlDelete = "DELETE FROM ".MAIN_DB_PREFIX."element_element WHERE sourcetype = 'commande' AND targettype = 'delivery'"; $db->query($sqlDelete); @@ -3207,15 +3109,12 @@ function migrate_shipping_delivery2($db, $langs, $conf) $sqlSelect .= " AND (l.date_delivery IS NULL".($db->type != 'pgsql' ? " or l.date_delivery = ''" : "").")"; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; @@ -3224,8 +3123,7 @@ function migrate_shipping_delivery2($db, $langs, $conf) $sqlUpdate .= " WHERE rowid = ".$obj->delivery_id; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3236,8 +3134,7 @@ function migrate_shipping_delivery2($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { dol_print_error($db); @@ -3275,12 +3172,10 @@ function migrate_actioncomm_element($db, $langs, $conf) 'invoice_supplier' => 'fk_supplier_invoice' ); - foreach ($elements as $type => $field) - { + foreach ($elements as $type => $field) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."actioncomm", $field); $obj = $db->fetch_object($result); - if ($obj) - { + if ($obj) { dolibarr_install_syslog("upgrade2::migrate_actioncomm_element field=".$field); $db->begin(); @@ -3292,8 +3187,7 @@ function migrate_actioncomm_element($db, $langs, $conf) $sql .= " AND elementtype IS NULL"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $db->commit(); // DDL commands must not be inside a transaction @@ -3336,58 +3230,51 @@ function migrate_mode_reglement($db, $langs, $conf) ); $count = 0; - foreach ($elements['old_id'] as $key => $old_id) - { + foreach ($elements['old_id'] as $key => $old_id) { $error = 0; dolibarr_install_syslog("upgrade2::migrate_mode_reglement code=".$elements['code'][$key]); $sqlSelect = "SELECT id"; $sqlSelect .= " FROM ".MAIN_DB_PREFIX."c_paiement"; - $sqlSelect .= " WHERE id = ".$old_id; + $sqlSelect .= " WHERE id = ".((int) $old_id); $sqlSelect .= " AND code = '".$db->escape($elements['code'][$key])."'"; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $count++; $db->begin(); - $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 = '".$db->escape($elements['code'][$key])."')"; + $sqla = "UPDATE ".MAIN_DB_PREFIX."paiement SET"; + $sqla .= " fk_paiement = ".((int) $elements['new_id'][$key]); + $sqla .= " WHERE fk_paiement = ".((int) $old_id); + $sqla .= " AND fk_paiement IN (SELECT id FROM ".MAIN_DB_PREFIX."c_paiement WHERE id = ".((int) $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 = "UPDATE ".MAIN_DB_PREFIX."c_paiement SET"; + $sql .= " id = ".((int) $elements['new_id'][$key]); + $sql .= " WHERE id = ".((int) $old_id); $sql .= " AND code = '".$db->escape($elements['code'][$key])."'"; $resql = $db->query($sql); - if ($resqla && $resql) - { - foreach ($elements['tables'] as $table) - { + if ($resqla && $resql) { + foreach ($elements['tables'] as $table) { $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; - $sql .= "fk_mode_reglement = ".$elements['new_id'][$key]; - $sql .= " WHERE fk_mode_reglement = ".$old_id; + $sql .= "fk_mode_reglement = ".((int) $elements['new_id'][$key]); + $sql .= " WHERE fk_mode_reglement = ".((int) $old_id); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); $error++; } print ". "; } - if (!$error) - { + if (!$error) { $db->commit(); } else { dol_print_error($db); @@ -3401,7 +3288,9 @@ function migrate_mode_reglement($db, $langs, $conf) } } - if ($count == 0) print $langs->trans('AlreadyDone')."<br>\n"; + if ($count == 0) { + print $langs->trans('AlreadyDone')."<br>\n"; + } print '</td></tr>'; @@ -3419,26 +3308,20 @@ function migrate_mode_reglement($db, $langs, $conf) function migrate_clean_association($db, $langs, $conf) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association"); - if ($result) // result defined for version 3.2 or - - { + if ($result) { // result defined for version 3.2 or - $obj = $db->fetch_object($result); - if ($obj) // It table categorie_association exists - { + if ($obj) { // It table categorie_association exists $couples = array(); $filles = array(); $sql = "SELECT fk_categorie_mere, fk_categorie_fille"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_association"; dolibarr_install_syslog("upgrade: search duplicate"); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - while ($obj = $db->fetch_object($resql)) - { - if (!isset($filles[$obj->fk_categorie_fille])) // Only one record as child (a child has only on parent). - { - if ($obj->fk_categorie_mere != $obj->fk_categorie_fille) - { + while ($obj = $db->fetch_object($resql)) { + if (!isset($filles[$obj->fk_categorie_fille])) { // Only one record as child (a child has only on parent). + if ($obj->fk_categorie_mere != $obj->fk_categorie_fille) { $filles[$obj->fk_categorie_fille] = 1; // Set record for this child $couples[$obj->fk_categorie_mere.'_'.$obj->fk_categorie_fille] = array('mere'=>$obj->fk_categorie_mere, 'fille'=>$obj->fk_categorie_fille); } @@ -3448,8 +3331,7 @@ function migrate_clean_association($db, $langs, $conf) dolibarr_install_syslog("upgrade: result is num=".$num." count(couples)=".count($couples)); // If there is duplicates couples or child with two parents - if (count($couples) > 0 && $num > count($couples)) - { + if (count($couples) > 0 && $num > count($couples)) { $error = 0; $db->begin(); @@ -3458,21 +3340,20 @@ function migrate_clean_association($db, $langs, $conf) $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_association"; dolibarr_install_syslog("upgrade: delete association"); $resqld = $db->query($sql); - if ($resqld) - { + if ($resqld) { // And we insert only each record once - foreach ($couples as $key => $val) - { + foreach ($couples as $key => $val) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_association(fk_categorie_mere,fk_categorie_fille)"; $sql .= " VALUES(".$val['mere'].", ".$val['fille'].")"; dolibarr_install_syslog("upgrade: insert association"); $resqli = $db->query($sql); - if (!$resqli) $error++; + if (!$resqli) { + $error++; + } } } - if (!$error) - { + if (!$error) { print '<tr><td>'.$langs->trans("MigrationCategorieAssociation").'</td>'; print '<td class="right">'.$langs->trans("RemoveDuplicates").' '.$langs->trans("Success").' ('.$num.'=>'.count($couples).')</td></tr>'; $db->commit(); @@ -3508,8 +3389,7 @@ function migrate_categorie_association($db, $langs, $conf) $error = 0; - if ($db->DDLInfoTable(MAIN_DB_PREFIX."categorie_association")) - { + if ($db->DDLInfoTable(MAIN_DB_PREFIX."categorie_association")) { dolibarr_install_syslog("upgrade2::migrate_categorie_association"); $db->begin(); @@ -3518,15 +3398,12 @@ function migrate_categorie_association($db, $langs, $conf) $sqlSelect .= " FROM ".MAIN_DB_PREFIX."categorie_association"; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."categorie SET "; @@ -3534,8 +3411,7 @@ function migrate_categorie_association($db, $langs, $conf) $sqlUpdate .= " WHERE rowid = ".$obj->fk_categorie_fille; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3546,8 +3422,7 @@ function migrate_categorie_association($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { // TODO DROP table in the next release /* $sqlDrop = "DROP TABLE ".MAIN_DB_PREFIX."categorie_association"; @@ -3605,23 +3480,19 @@ function migrate_event_assignement($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element) "; $sqlUpdate .= "VALUES(".$obj->id.", 'user', ".$obj->fk_user_action.")"; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3632,8 +3503,7 @@ function migrate_event_assignement($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -3676,23 +3546,19 @@ function migrate_event_assignement_contact($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element) "; $sqlUpdate .= "VALUES(".$obj->id.", 'socpeople', ".$obj->fk_contact.")"; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3703,8 +3569,7 @@ function migrate_event_assignement_contact($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -3750,34 +3615,28 @@ function migrate_reset_blocked_log($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); print 'Process entity '.$obj->entity; $sqlSearch = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."blockedlog WHERE action = 'MODULE_SET' and entity = ".$obj->entity; $resqlSearch = $db->query($sqlSearch); - if ($resqlSearch) - { + if ($resqlSearch) { $objSearch = $db->fetch_object($resqlSearch); //var_dump($objSearch); - if ($objSearch && $objSearch->nb == 0) - { + if ($objSearch && $objSearch->nb == 0) { print ' - Record for entity must be reset...'; $sqlUpdate = "DELETE FROM ".MAIN_DB_PREFIX."blockedlog"; $sqlUpdate .= " WHERE entity = ".$obj->entity; $resqlUpdate = $db->query($sqlUpdate); - if (!$resqlUpdate) - { + if (!$resqlUpdate) { $error++; dol_print_error($db); } else { @@ -3810,8 +3669,7 @@ function migrate_reset_blocked_log($db, $langs, $conf) print $langs->trans('NothingToDo')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -3853,15 +3711,12 @@ function migrate_remise_entity($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."societe_remise SET"; @@ -3869,8 +3724,7 @@ function migrate_remise_entity($db, $langs, $conf) $sqlUpdate .= " WHERE rowid = ".$obj->rowid; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3882,8 +3736,7 @@ function migrate_remise_entity($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -3922,41 +3775,34 @@ function migrate_remise_except_entity($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); - if (!empty($obj->fk_facture_source) || !empty($obj->fk_facture)) - { + if (!empty($obj->fk_facture_source) || !empty($obj->fk_facture)) { $fk_facture = (!empty($obj->fk_facture_source) ? $obj->fk_facture_source : $obj->fk_facture); $sqlSelect2 = "SELECT f.entity"; $sqlSelect2 .= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sqlSelect2 .= " WHERE f.rowid = ".$fk_facture; - } elseif (!empty($obj->fk_facture_line)) - { + $sqlSelect2 .= " WHERE f.rowid = ".((int) $fk_facture); + } 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 .= " WHERE fd.rowid = ".((int) $obj->fk_facture_line); $sqlSelect2 .= " AND fd.fk_facture = f.rowid"; } else { $sqlSelect2 = "SELECT s.entity"; $sqlSelect2 .= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sqlSelect2 .= " WHERE s.rowid = ".$obj->fk_soc; + $sqlSelect2 .= " WHERE s.rowid = ".((int) $obj->fk_soc); } $resql2 = $db->query($sqlSelect2); - if ($resql2) - { - if ($db->num_rows($resql2) > 0) - { + if ($resql2) { + if ($db->num_rows($resql2) > 0) { $obj2 = $db->fetch_object($resql2); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."societe_remise_except SET"; @@ -3964,8 +3810,7 @@ function migrate_remise_except_entity($db, $langs, $conf) $sqlUpdate .= " WHERE rowid = ".$obj->rowid; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -3982,8 +3827,7 @@ function migrate_remise_except_entity($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -4023,15 +3867,12 @@ function migrate_user_rights_entity($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."user_rights SET"; @@ -4039,8 +3880,7 @@ function migrate_user_rights_entity($db, $langs, $conf) $sqlUpdate .= " WHERE fk_user = ".$obj->rowid; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -4052,8 +3892,7 @@ function migrate_user_rights_entity($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -4093,15 +3932,12 @@ function migrate_usergroup_rights_entity($db, $langs, $conf) //print $sqlSelect; $resql = $db->query($sqlSelect); - if ($resql) - { + if ($resql) { $i = 0; $num = $db->num_rows($resql); - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."usergroup_rights SET"; @@ -4109,8 +3945,7 @@ function migrate_usergroup_rights_entity($db, $langs, $conf) $sqlUpdate .= " WHERE fk_usergroup = ".$obj->rowid; $result = $db->query($sqlUpdate); - if (!$result) - { + if (!$result) { $error++; dol_print_error($db); } @@ -4122,8 +3957,7 @@ function migrate_usergroup_rights_entity($db, $langs, $conf) print $langs->trans('AlreadyDone')."<br>\n"; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -4151,8 +3985,7 @@ function migrate_rename_directories($db, $langs, $conf, $oldname, $newname) { dolibarr_install_syslog("upgrade2::migrate_rename_directories"); - if (is_dir(DOL_DATA_ROOT.$oldname) && !file_exists(DOL_DATA_ROOT.$newname)) - { + if (is_dir(DOL_DATA_ROOT.$oldname) && !file_exists(DOL_DATA_ROOT.$newname)) { dolibarr_install_syslog("upgrade2::migrate_rename_directories move ".DOL_DATA_ROOT.$oldname.' into '.DOL_DATA_ROOT.$newname); @rename(DOL_DATA_ROOT.$oldname, DOL_DATA_ROOT.$newname); } @@ -4265,6 +4098,11 @@ function migrate_delete_old_dir($db, $langs, $conf) DOL_DOCUMENT_ROOT.'/core/modules/facture/mercure', ); + // On linux, we can also removed old directory with a different case than new directory. + if (!empty($_SERVER["WINDIR"])) { + $filetodeletearray[] = DOL_DOCUMENT_ROOT.'/includes/phpoffice/PhpSpreadsheet'; + } + foreach ($filetodeletearray as $filetodelete) { //print '<b>'.$filetodelete."</b><br>\n"; if (file_exists($filetodelete)) { @@ -4288,18 +4126,22 @@ function migrate_delete_old_dir($db, $langs, $conf) * @param DoliDB $db Database handler * @param Translate $langs Object langs * @param Conf $conf Object conf - * @param array $listofmodule List of modules + * @param array $listofmodule List of modules, like array('MODULE_KEY_NAME'=>', $reloadmode) * @param int $force 1=Reload module even if not already loaded * @return int <0 if KO, >0 if OK */ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $force = 0) { - if (count($listofmodule) == 0) return; + if (count($listofmodule) == 0) { + return; + } dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force.", listofmodule=".join(',', array_keys($listofmodule))); foreach ($listofmodule as $moduletoreload => $reloadmode) { // reloadmodule can be 'noboxes', 'newboxdefonly', 'forceactivate' - if (empty($moduletoreload) || (empty($conf->global->$moduletoreload) && !$force)) continue; // Discard reload if module not enabled + if (empty($moduletoreload) || (empty($conf->global->$moduletoreload) && !$force)) { + continue; // Discard reload if module not enabled + } $mod = null; @@ -4327,6 +4169,15 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } + } elseif ($moduletoreload == 'MAIN_MODULE_BLOCKEDLOG') { + dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate BlockedLog module"); + $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modBlockedLog.class.php'; + if ($res) { + $mod = new modBlockedLog($db); + // For this module we only reload menus. + $mod->delete_menus(); + $mod->insert_menus(); + } } 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'; @@ -4471,24 +4322,25 @@ 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 { // Other generic cases/modules $reg = array(); $tmp = preg_match('/MAIN_MODULE_([a-zA-Z0-9]+)/', $moduletoreload, $reg); - if (!empty($reg[1])) - { - if (strtoupper($moduletoreload) == $moduletoreload) // If key is un uppercase - { + if (!empty($reg[1])) { + 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 { $moduletoreloadshort = $reg[1]; } + dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ".$moduletoreloadshort." with mode ".$reloadmode); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php'; if ($res) { $classname = 'mod'.$moduletoreloadshort; $mod = new $classname($db); + //$mod->remove('noboxes'); + $mod->delete_menus(); // We must delete to be sure it is inserted with new values $mod->init($reloadmode); } else { dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php'); @@ -4497,7 +4349,6 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo if ($res) { $classname = 'mod'.$moduletoreloadshort; $mod = new $classname($db); - //$mod->remove('noboxes'); $mod->init($reloadmode); } else { dolibarr_install_syslog('Failed to include '.strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php', LOG_ERR); @@ -4512,9 +4363,8 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo } } - if (!empty($mod) && is_object($mod)) - { - print '<tr><td colspan="4">'; + if (!empty($mod) && is_object($mod)) { + print '<tr class="trforrunsql"><td colspan="4">'; print '<b>'.$langs->trans('Upgrade').'</b>: '; print $langs->trans('MigrationReloadModule').' '.$mod->getName(); // We keep getName outside of trans because getName is already encoded/translated print "<!-- (".$reloadmode.") -->"; @@ -4529,7 +4379,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo /** - * Reload menu if dynamic menus, if modified by version + * Reload SQL menu file (if dynamic menus, if modified by version) * * @param DoliDB $db Database handler * @param Translate $langs Object langs @@ -4544,14 +4394,12 @@ function migrate_reload_menu($db, $langs, $conf) // Define list of menu handlers to initialize $listofmenuhandler = array(); if ($conf->global->MAIN_MENU_STANDARD == 'auguria_menu' || $conf->global->MAIN_MENU_SMARTPHONE == 'auguria_menu' - || $conf->global->MAIN_MENUFRONT_STANDARD == 'auguria_menu' || $conf->global->MAIN_MENUFRONT_SMARTPHONE == 'auguria_menu') - { + || $conf->global->MAIN_MENUFRONT_STANDARD == 'auguria_menu' || $conf->global->MAIN_MENUFRONT_SMARTPHONE == 'auguria_menu') { $listofmenuhandler['auguria'] = 1; // We set here only dynamic menu handlers } - foreach ($listofmenuhandler as $key => $val) - { - print '<tr><td colspan="4">'; + foreach ($listofmenuhandler as $key => $val) { + print '<tr class="trforrunsql"><td colspan="4">'; //print "x".$key; print '<br>'; @@ -4560,8 +4408,7 @@ function migrate_reload_menu($db, $langs, $conf) // Load sql ini_menu_handler.sql file $dir = DOL_DOCUMENT_ROOT."/core/menus/"; $file = 'init_menu_'.$key.'.sql'; - if (file_exists($dir.$file)) - { + if (file_exists($dir.$file)) { $result = run_sql($dir.$file, 1, '', 1, $key); } @@ -4585,14 +4432,14 @@ function migrate_user_photospath() include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $fuser = new User($db); - if (!is_object($user)) $user = $fuser; // To avoid error during migration + if (!is_object($user)) { + $user = $fuser; // To avoid error during migration + } $sql = "SELECT rowid as uid from ".MAIN_DB_PREFIX."user"; // Get list of all users $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $fuser->fetch($obj->uid); //echo '<hr>'.$fuser->id.' -> '.$fuser->entity; $entity = (empty($fuser->entity) ? 1 : $fuser->entity); @@ -4602,8 +4449,7 @@ function migrate_user_photospath() $dir = $conf->user->multidir_output[$entity]; // $conf->user->multidir_output[] for each entity is construct by the multicompany module } - if ($dir) - { + if ($dir) { //print "Process user id ".$fuser->id."<br>\n"; $origin = $dir.'/'.get_exdir($fuser->id, 2, 0, 1, $fuser, 'user'); // Use old behaviour to get x/y path $destin = $dir.'/'.$fuser->id; @@ -4613,26 +4459,23 @@ function migrate_user_photospath() dol_mkdir($destin); //echo '<hr>'.$origin.' -> '.$destin; - if (dol_is_dir($origin)) - { + if (dol_is_dir($origin)) { $handle = opendir($origin_osencoded); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if ($file == '.' || $file == '..') continue; + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if ($file == '.' || $file == '..') { + continue; + } - if (dol_is_dir($origin.'/'.$file)) // it is a dir (like 'thumbs') - { + if (dol_is_dir($origin.'/'.$file)) { // it is a dir (like 'thumbs') $thumbs = opendir($origin_osencoded.'/'.$file); - if (is_resource($thumbs)) - { - dol_mkdir($destin.'/'.$file); - while (($thumb = readdir($thumbs)) !== false) - { - if (!dol_is_file($destin.'/'.$file.'/'.$thumb)) - { - if ($thumb == '.' || $thumb == '..') continue; + if (is_resource($thumbs)) { + dol_mkdir($destin.'/'.$file); + while (($thumb = readdir($thumbs)) !== false) { + if (!dol_is_file($destin.'/'.$file.'/'.$thumb)) { + if ($thumb == '.' || $thumb == '..') { + continue; + } //print $origin.'/'.$file.'/'.$thumb.' -> '.$destin.'/'.$file.'/'.$thumb.'<br>'."\n"; print '.'; @@ -4644,8 +4487,7 @@ function migrate_user_photospath() } } else // it is a file { - if (!dol_is_file($destin.'/'.$file)) - { + if (!dol_is_file($destin.'/'.$file)) { //print $origin.'/'.$file.' -> '.$destin.'/'.$file.'<br>'."\n"; print '.'; dol_copy($origin.'/'.$file, $destin.'/'.$file, 0, 0); diff --git a/htdocs/intracommreport/admin/index.html b/htdocs/intracommreport/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/intracommreport/admin/intracommreport.php b/htdocs/intracommreport/admin/intracommreport.php index 16e24503959..c696dddcabd 100644 --- a/htdocs/intracommreport/admin/intracommreport.php +++ b/htdocs/intracommreport/admin/intracommreport.php @@ -30,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "intracommreport")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -46,10 +48,8 @@ $list_DES = array( if ($action == 'update') { $error = 0; - if (!$error) - { - foreach ($list_DEB as $constname) - { + if (!$error) { + foreach ($list_DEB as $constname) { $constvalue = GETPOST($constname, 'alpha'); if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { @@ -57,8 +57,7 @@ if ($action == 'update') { } } - foreach ($list_DES as $constname) - { + foreach ($list_DES as $constname) { $constvalue = GETPOST($constname, 'alpha'); if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { @@ -110,8 +109,7 @@ print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Value").'</td>'; print '</tr>'; -foreach ($list_DEB as $key) -{ +foreach ($list_DEB as $key) { print '<tr class="oddeven value">'; // Param @@ -175,8 +173,7 @@ print '<td>'.$langs->trans("Description").'</td>'; print '<td>'.$langs->trans("Value").'</td>'; print '</tr>'; -foreach ($list_DES as $key) -{ +foreach ($list_DES as $key) { print '<tr class="oddeven value">'; // Param diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 0226848bd48..24b8797a670 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -203,7 +203,7 @@ if ($id > 0 && $action != 'edit') { ); } print $form->formconfirm( - "card.php?rowid=".$id, + "card.php?rowid=".urlencode($id), $langs->trans("DeleteReport"), $langs->trans("ConfirmDeleteReport"), "confirm_delete", diff --git a/htdocs/intracommreport/class/index.html b/htdocs/intracommreport/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index cd4765161e9..9675d1f3860 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -286,7 +286,7 @@ class IntracommReport extends CommonObject global $mysoc, $conf; if ($type == 'expedition' || $exporttype == 'des') { - $sql = 'SELECT f.ref as refinvoice, f.total as total_ht'; + $sql = 'SELECT f.ref as refinvoice, f.total_ht'; $table = 'facture'; $table_extraf = 'facture_extrafields'; $tabledet = 'facturedet'; @@ -417,7 +417,7 @@ class IntracommReport extends CommonObject ( SELECT fk_product FROM '.MAIN_DB_PREFIX.'categorie_product - WHERE fk_categorie = '.$categ_fraisdeport->id.' + WHERE fk_categorie = '.((int) $categ_fraisdeport->id).' ) )'; diff --git a/htdocs/intracommreport/index.html b/htdocs/intracommreport/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/intracommreport/list.php b/htdocs/intracommreport/list.php index e43dc33e700..1ba796026c6 100644 --- a/htdocs/intracommreport/list.php +++ b/htdocs/intracommreport/list.php @@ -39,8 +39,6 @@ $toselect = GETPOST('toselect', 'array'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST("search_ref", 'alpha'); $search_type = GETPOST("search_type", 'int'); -$fourn_id = GETPOST("fourn_id", 'int'); -$catid = GETPOST('catid', 'int'); $optioncss = GETPOST('optioncss', 'alpha'); $type = GETPOST("type", "int"); @@ -139,6 +137,14 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Security check +if ($search_type == '0') { + $result = restrictedArea($user, 'produit', '', '', '', '', '', 0); +} elseif ($search_type == '1') { + $result = restrictedArea($user, 'service', '', '', '', '', '', 0); +} else { + $result = restrictedArea($user, 'produit|service', '', '', '', '', '', 0); +} /* @@ -192,6 +198,7 @@ if (empty($reshook)) { /* * View */ + $formother = new FormOther($db); $title = $langs->trans('IntracommReportList'.$type); @@ -309,12 +316,12 @@ if ($resql) { // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), //'builddoc'=>$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), ); if ($user->rights->intracommreport->delete) { - $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete'))) { $arrayofmassactions = array(); diff --git a/htdocs/langs/am_ET/accountancy.lang b/htdocs/langs/am_ET/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/am_ET/accountancy.lang +++ b/htdocs/langs/am_ET/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/am_ET/admin.lang b/htdocs/langs/am_ET/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/am_ET/admin.lang +++ b/htdocs/langs/am_ET/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/am_ET/banks.lang b/htdocs/langs/am_ET/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/am_ET/banks.lang +++ b/htdocs/langs/am_ET/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/am_ET/bills.lang b/htdocs/langs/am_ET/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/am_ET/bills.lang +++ b/htdocs/langs/am_ET/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/am_ET/boxes.lang b/htdocs/langs/am_ET/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/am_ET/boxes.lang +++ b/htdocs/langs/am_ET/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/am_ET/categories.lang b/htdocs/langs/am_ET/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/am_ET/categories.lang +++ b/htdocs/langs/am_ET/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/am_ET/companies.lang b/htdocs/langs/am_ET/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/am_ET/companies.lang +++ b/htdocs/langs/am_ET/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/am_ET/compta.lang b/htdocs/langs/am_ET/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/am_ET/compta.lang +++ b/htdocs/langs/am_ET/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/am_ET/ecm.lang b/htdocs/langs/am_ET/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/am_ET/ecm.lang +++ b/htdocs/langs/am_ET/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/am_ET/errors.lang b/htdocs/langs/am_ET/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/am_ET/errors.lang +++ b/htdocs/langs/am_ET/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/am_ET/externalsite.lang b/htdocs/langs/am_ET/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/am_ET/externalsite.lang +++ b/htdocs/langs/am_ET/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/am_ET/main.lang b/htdocs/langs/am_ET/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/am_ET/main.lang +++ b/htdocs/langs/am_ET/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/am_ET/margins.lang b/htdocs/langs/am_ET/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/am_ET/margins.lang +++ b/htdocs/langs/am_ET/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/am_ET/members.lang b/htdocs/langs/am_ET/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/am_ET/members.lang +++ b/htdocs/langs/am_ET/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/am_ET/modulebuilder.lang b/htdocs/langs/am_ET/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/am_ET/modulebuilder.lang +++ b/htdocs/langs/am_ET/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/am_ET/orders.lang b/htdocs/langs/am_ET/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/am_ET/orders.lang +++ b/htdocs/langs/am_ET/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/am_ET/other.lang b/htdocs/langs/am_ET/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/am_ET/other.lang +++ b/htdocs/langs/am_ET/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/am_ET/productbatch.lang b/htdocs/langs/am_ET/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/am_ET/productbatch.lang +++ b/htdocs/langs/am_ET/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/am_ET/products.lang b/htdocs/langs/am_ET/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/am_ET/products.lang +++ b/htdocs/langs/am_ET/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/am_ET/projects.lang b/htdocs/langs/am_ET/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/am_ET/projects.lang +++ b/htdocs/langs/am_ET/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/am_ET/propal.lang b/htdocs/langs/am_ET/propal.lang index 95085002f66..edbc08236d3 100644 --- a/htdocs/langs/am_ET/propal.lang +++ b/htdocs/langs/am_ET/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -89,3 +89,4 @@ 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/stocks.lang b/htdocs/langs/am_ET/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/am_ET/stocks.lang +++ b/htdocs/langs/am_ET/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/am_ET/suppliers.lang b/htdocs/langs/am_ET/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/am_ET/suppliers.lang +++ b/htdocs/langs/am_ET/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/am_ET/ticket.lang b/htdocs/langs/am_ET/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/am_ET/ticket.lang +++ b/htdocs/langs/am_ET/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/am_ET/users.lang b/htdocs/langs/am_ET/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/am_ET/users.lang +++ b/htdocs/langs/am_ET/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/am_ET/website.lang b/htdocs/langs/am_ET/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/am_ET/website.lang +++ b/htdocs/langs/am_ET/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/am_ET/zapier.lang b/htdocs/langs/am_ET/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/am_ET/zapier.lang +++ b/htdocs/langs/am_ET/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ar_EG/admin.lang b/htdocs/langs/ar_EG/admin.lang index 2976a2efba5..671975c34bd 100644 --- a/htdocs/langs/ar_EG/admin.lang +++ b/htdocs/langs/ar_EG/admin.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - admin Foundation=مؤسسة Version=إصدار -Publisher=الناشر VersionLastInstall=أول إصدار ثبت VersionLastUpgrade=أخر تحديث VersionExperimental=تجريبي @@ -15,10 +14,10 @@ FileIntegritySomeFilesWereRemovedOrModified=فشل التحقق من تكامل MakeIntegrityAnalysisFrom=عمل تحليل سلامة ملفات التطبيق من LocalSignature=توقيع محلي مضمن (أقل موثوقية) RemoteSignature=التوقيع عن بعد (أكثر موثوقية) +FilesMissing=الملفات المفقودة FilesUpdated=الملفات المحدثة FilesModified=الملفات المعدلة FilesAdded=الملفات المضافة -FileCheckDolibarr=تحقق من سلامة ملفات التطبيق AvailableOnlyOnPackagedVersions=لا يتوفر الملف المحلي لفحص السلامة إلا عندما يتم تثبيت التطبيق من حزمة رسمية XmlNotFound=لم يتم العثور على ملف تكامل Xml للتطبيق SessionId=هوية المتصل @@ -31,13 +30,11 @@ LockNewSessions=اغلاق الدخول للمتصلين الجدد ConfirmLockNewSessions=هل أنت متأكد من أنك تريد تقييد أي اتصال Dolibarr جديد لنفسك؟ سيتمكن المستخدم <b> %s </b> فقط من الاتصال بعد ذلك. UnlockNewSessions=الغاء حظر الاتصال YourSession=جلستك -Sessions=جلسات المستخدمين WebUserGroup=مستخدم\\مجموعة خادم الويب NoSessionFound=يبدو أن تكوين PHP الخاص بك لا يسمح بإدراج الجلسات النشطة. قد يتم حماية الدليل المستخدم لحفظ الجلسات (<b> %s </b>) (على سبيل المثال عن طريق أذونات نظام التشغيل أو عن طريق توجيه PHP open_basedir). DBStoringCharset=ضبط الحروف في قاعدة البيانات لحفظ المعلومات DBSortingCharset=ضبط الحروف في قاعدة البيانات لحفظ المعلومات ClientCharset=مجموع حروف العميل -ClientSortingCharset=ترتيب العميل WarningModuleNotActive=إن الوحدة <b>%s</b> لابد أن تكون مفعلة WarningOnlyPermissionOfActivatedModules=أن الصلاحيات المرتبطة بالوحدات المفعلة فقط تظهر هنا. تستطيع تفعيل وحدات أخرى من: الرئيسية ثم التنصيب ثم صفحة الوحدات DolibarrSetup=تثبيت أو ترقية البرنامج @@ -49,6 +46,7 @@ Module40Name=موردين Module700Name=تبرعات Module1780Name=الأوسمة/التصنيفات Permission81=قراءة أوامر الشراء +ShowBugTrackLink=Show link "<strong>%s</strong>" MailToSendInvoice=فواتير العميل MailToSendSupplierOrder=أوامر الشراء MailToSendSupplierInvoice=فواتير المورد diff --git a/htdocs/langs/ar_EG/bills.lang b/htdocs/langs/ar_EG/bills.lang index b1dce597b45..0d13c550e27 100644 --- a/htdocs/langs/ar_EG/bills.lang +++ b/htdocs/langs/ar_EG/bills.lang @@ -2,6 +2,7 @@ BillsCustomers=فواتير العميل BillsSuppliers=فواتير المورد BillsCustomersUnpaid=فواتير العميل غير المدفوعة +BillsCustomersUnpaidForCompany=فواتير العملاء غير المدفوعة ل %s BillsSuppliersUnpaid=فواتير المورد غير المدفوعة BillsSuppliersUnpaidForCompany=فواتير الموردين غير المدفوعة لـ %s BillsStatistics=احصائيات فواتير العملاء @@ -10,19 +11,16 @@ InvoiceDeposit=فاتورة دفعة أولى InvoiceDepositAsk=فاتورة دفعة أولى InvoiceReplacement=فاتورة استبدال ReplacementInvoice=فاتورة استبدال -SupplierInvoice=فاتورة مورد -SuppliersInvoices=فواتير الموردين -SupplierBill=فاتورة مورد +CustomersInvoices=فواتير العميل +SuppliersInvoices=فواتير المورد +SupplierBills=فواتير المورد CancelBill=إلغ فاتورة SendRemindByMail=إرسل تذكير عن طريق البريد الإلكتروني BillStatusDraft=مسودة(مطلوب الاعتماد) -BillShortStatusValidated=معتمد BillShortStatusClosedUnpaid=مقفول SendReminderBillByMail=إرسل تذكير عن طريق البريد الإلكتروني SupplierBillsToPay=فواتير المورد غير المدفوعة CustomerBillsUnpaid=فواتير العميل غير المدفوعة Billed=مفوتر PaymentConditionShortPT_ORDER=طلب -TypeContact_facture_external_BILLING=جهة اتصال فاتورة العميل -AutoFillDateFromShort=حدد تاريخ البدء -AutoFillDateToShort=حدد تاريخ الانتهاء +PaymentTypeShortTRA=مسودة diff --git a/htdocs/langs/ar_EG/boxes.lang b/htdocs/langs/ar_EG/boxes.lang index 1c4466c2f30..c8006d54242 100644 --- a/htdocs/langs/ar_EG/boxes.lang +++ b/htdocs/langs/ar_EG/boxes.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - boxes BoxTitleLastModifiedPropals=أحدث العروض المعدلة %s -ForCustomersInvoices=فواتير العملاء diff --git a/htdocs/langs/ar_EG/companies.lang b/htdocs/langs/ar_EG/companies.lang index bc649f3af7c..7dd587c67f3 100644 --- a/htdocs/langs/ar_EG/companies.lang +++ b/htdocs/langs/ar_EG/companies.lang @@ -1,6 +1,4 @@ # Dolibarr language file - Source file is en_US - companies -ThirdPartyProspects=فرص -ThirdPartyProspectsStats=فرص ThirdPartyCustomers=عملاء ThirdPartyCustomersStats=عملاء ThirdPartySuppliers=موردين diff --git a/htdocs/langs/ar_EG/main.lang b/htdocs/langs/ar_EG/main.lang index 65726d1afb0..91cdd996f11 100644 --- a/htdocs/langs/ar_EG/main.lang +++ b/htdocs/langs/ar_EG/main.lang @@ -20,17 +20,14 @@ FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p Closed2=مقفول +CloseAs=اضبط الحالة على NumberByMonth=الرقم بالشهر RefSupplier=المرجع. مورد CommercialProposalsShort=عروض تجارية Refused=مرفوض -Drafts=المسودات -Validated=معتمد Opened=افتح SearchIntoCustomerInvoices=فواتير العميل SearchIntoSupplierInvoices=فواتير المورد SearchIntoSupplierOrders=أوامر الشراء -SearchIntoCustomerProposals=عروض تجارية SearchIntoSupplierProposals=عرود الموردين ContactDefault_commande=طلب -ContactDefault_propal=عرض diff --git a/htdocs/langs/ar_EG/orders.lang b/htdocs/langs/ar_EG/orders.lang index 7e6d65dd9bd..7f814594ec4 100644 --- a/htdocs/langs/ar_EG/orders.lang +++ b/htdocs/langs/ar_EG/orders.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=منطقة طلبات العملاء -SuppliersOrdersArea=منطقة أوامر الشراء OrderCard=بطاقة الأمر OrderId=رقم التعريف الخاص بالأمر Order=طلب @@ -9,19 +8,13 @@ Orders=الطلبات OrderDateShort=تاريخ الأمر OrderToProcess=طلب تحت التشغيل NewOrder=أمر جديد -NewOrderSupplier=أمر شراء جديد ToOrder=إصدار أمر MakeOrder=إصدار أمر -SupplierOrder=أمر شراء SuppliersOrders=أوامر الشراء -SuppliersOrdersRunning=أوامر الشراء الحالية StatusOrderValidatedShort=معتمد StatusOrderRefusedShort=مرفوض StatusOrderDraft=مسودة(مطلوب الاعتماد) -StatusOrderValidated=معتمد StatusOrderRefused=مرفوض -TypeContact_commande_external_BILLING=جهة اتصال فاتورة العميل -StatusSupplierOrderValidatedShort=معتمد StatusSupplierOrderRefusedShort=مرفوض StatusSupplierOrderDraft=مسودة(مطلوب الاعتماد) StatusSupplierOrderValidated=معتمد diff --git a/htdocs/langs/ar_EG/products.lang b/htdocs/langs/ar_EG/products.lang deleted file mode 100644 index 5a177b2f19a..00000000000 --- a/htdocs/langs/ar_EG/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -SuppliersPrices=أسعار المورد diff --git a/htdocs/langs/ar_EG/suppliers.lang b/htdocs/langs/ar_EG/suppliers.lang index 14963000391..313afddee35 100644 --- a/htdocs/langs/ar_EG/suppliers.lang +++ b/htdocs/langs/ar_EG/suppliers.lang @@ -1,45 +1,29 @@ # Dolibarr language file - Source file is en_US - suppliers Suppliers=موردين -SuppliersInvoice=فاتورة مورد +SupplierInvoices=فواتير المورد ShowSupplierInvoice=إظهار فاتورة المورد -NewSupplier=مورد جديد ListOfSuppliers=قائمة موردين ShowSupplier=فتح صفحة المورد OrderDate=تاريخ الأمر -BuyingPriceMin=أفضل سعر شراء -BuyingPriceMinShort=أفضل سعر شراء TotalBuyingPriceMinShort=إجمالي أسعار الشراء TotalSellingPriceMinShort=إجمالي أسعار البيع SomeSubProductHaveNoPrices=بعض المنتجات غير مسعره AddSupplierPrice=إضافة سعر الشراء -ChangeSupplierPrice=تغيير سعر الشراء -SupplierPrices=أسعار المورد ReferenceSupplierIsAlreadyAssociatedWithAProduct=مرجع المورد هذا مرتبط بالفعل بمنتج: %s NoRecordedSuppliers=لم يتم تسجيل مورد SupplierPayment=دفعة مورد -SuppliersArea=منطقة المورد RefSupplierShort=المرجع. مورد -Availability=التوفر ExportDataset_fournisseur_1=فواتير المورد و تفاصيلها ExportDataset_fournisseur_2=فواتير و دفعات المورد ExportDataset_fournisseur_3=تفاصيل أوامر الشراء ApproveThisOrder=إعتماد الأمر ConfirmApproveThisOrder=هل أنت متأكد أنك تريد الموافقة على الطلب <b> %s </b>؟ -DenyingThisOrder=رفض هذا الأمر ConfirmDenyingThisOrder=هل أنت متأكد أنك تريد رفض هذا الطلب <b> %s </b>؟ ConfirmCancelThisOrder=هل أنت متأكد أنك تريد إلغاء هذا الطلب <b> %s </b>؟ -AddSupplierOrder=إنشاء أمر شراء AddSupplierInvoice=إنشاء فاتورة المورد ListOfSupplierProductForSupplier=قائمة المنتجات والأسعار الخاصة بالمورد <b> %s </b> SentToSuppliers=مرسلة إلى المورديين -ListOfSupplierOrders=قائمة أوامر الشراء MenuOrdersSupplierToBill=أوامر الشراء للفاتورة -NbDaysToDelivery=تأخير التسليم (أيام) DescNbDaysToDelivery=أطول تأخير لتسليم المنتجات من هذا الطلب -SupplierReputation=سمعة المورد DoNotOrderThisProductToThisSupplier=لا تتعامل -NotTheGoodQualitySupplier=جودة منخفضة -ReputationForThisProduct=سمعة -BuyerName=اسم المشتري AllProductServicePrices=أسعار جميع المنتجات / الخدمات -BuyingPriceNumShort=أسعار المورد diff --git a/htdocs/langs/ar_EG/zapier.lang b/htdocs/langs/ar_EG/zapier.lang index dd7094bdc04..1ea0b48d8fa 100644 --- a/htdocs/langs/ar_EG/zapier.lang +++ b/htdocs/langs/ar_EG/zapier.lang @@ -1,4 +1,4 @@ # Dolibarr language file - Source file is en_US - zapier ModuleZapierForDolibarrName =Zapier ModuleZapierForDolibarrDesc =وحدة Zapier -ZapierForDolibarrSetup =إعداد Zapier +ZapierForDolibarrSetup=إعداد Zapier diff --git a/htdocs/langs/ar_IQ/accountancy.lang b/htdocs/langs/ar_IQ/accountancy.lang new file mode 100644 index 00000000000..786f0194010 --- /dev/null +++ b/htdocs/langs/ar_IQ/accountancy.lang @@ -0,0 +1,430 @@ +# Dolibarr language file - en_US - Accountancy (Double entries) +Accountancy=Accountancy +Accounting=Accounting +ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file +ACCOUNTING_EXPORT_DATE=Date format for export file +ACCOUNTING_EXPORT_PIECE=Export the number of piece +ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account +ACCOUNTING_EXPORT_LABEL=Export label +ACCOUNTING_EXPORT_AMOUNT=Export amount +ACCOUNTING_EXPORT_DEVISE=Export currency +Selectformat=Select the format for the file +ACCOUNTING_EXPORT_FORMAT=Select the format for the file +ACCOUNTING_EXPORT_ENDLINE=Select the carriage return type +ACCOUNTING_EXPORT_PREFIX_SPEC=Specify the prefix for the file name +ThisService=This service +ThisProduct=This product +DefaultForService=Default for service +DefaultForProduct=Default for product +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty +CantSuggest=Can't suggest +AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s +ConfigAccountingExpert=Configuration of the module accounting (double entry) +Journalization=Journalization +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 +OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to an accounting account +OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to an accounting account +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 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 +ListOfAccounts=List of accounts +CountriesInEEC=Countries in EEC +CountriesNotInEEC=Countries not in EEC +CountriesInEECExceptMe=Countries in EEC except %s +CountriesExceptMe=All countries except %s +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 +VueBySubAccountAccounting=View by accounting subaccount + +MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup +MainAccountForSuppliersNotDefined=Main accounting account for vendors not defined in setup +MainAccountForUsersNotDefined=Main accounting account for users not defined in setup +MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup +MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup + +AccountancyArea=Accounting area +AccountancyAreaDescIntro=Usage of the accountancy module is done in several step: +AccountancyAreaDescActionOnce=The following actions are usually executed one time only, or once per year... +AccountancyAreaDescActionOnceBis=Next steps should be done to save you time in future by suggesting you the correct default accounting account when making the journalization (writing record in Journals and General ledger) +AccountancyAreaDescActionFreq=The following actions are usually executed every month, week or day for very large companies... + +AccountancyAreaDescJournalSetup=STEP %s: Create or check content of your journal list from 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 + +AccountancyAreaDescVat=STEP %s: Define accounting accounts for each VAT Rates. For this, use the menu entry %s. +AccountancyAreaDescDefault=STEP %s: Define default accounting accounts. For this, use the menu entry %s. +AccountancyAreaDescExpenseReport=STEP %s: Define default accounting accounts for each type of expense report. For this, use the menu entry %s. +AccountancyAreaDescSal=STEP %s: Define default accounting accounts for payment of salaries. For this, use the menu entry %s. +AccountancyAreaDescContrib=STEP %s: Define default accounting accounts for special expenses (miscellaneous taxes). For this, use the menu entry %s. +AccountancyAreaDescDonation=STEP %s: Define default accounting accounts for donation. For this, use the menu entry %s. +AccountancyAreaDescSubscription=STEP %s: Define default accounting accounts for member subscription. For this, use the menu entry %s. +AccountancyAreaDescMisc=STEP %s: Define mandatory default account and default accounting accounts for miscellaneous transactions. For this, use the menu entry %s. +AccountancyAreaDescLoan=STEP %s: Define default accounting accounts for loans. For this, use the menu entry %s. +AccountancyAreaDescBank=STEP %s: Define accounting accounts and journal code for each bank and financial accounts. For this, use the menu entry %s. +AccountancyAreaDescProd=STEP %s: Define accounting accounts on your products/services. For this, use the menu entry %s. + +AccountancyAreaDescBind=STEP %s: Check the binding between existing %s lines and accounting account is done, so application will be able to journalize transactions in Ledger in one click. Complete missing bindings. For this, use the menu entry %s. +AccountancyAreaDescWriteRecords=STEP %s: Write transactions into the Ledger. For this, go into menu <strong>%s</strong>, and click into button <strong>%s</strong>. +AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and generate reports and exports. + +AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future. + +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 +AccountAccounting=Accounting account +AccountAccountingShort=Account +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 +MenuVatAccounts=Vat accounts +MenuTaxAccounts=Tax accounts +MenuExpenseReportAccounts=Expense report accounts +MenuLoanAccounts=Loan accounts +MenuProductsAccounts=Product accounts +MenuClosureAccounts=Closure accounts +MenuAccountancyClosure=Closure +MenuAccountancyValidationMovements=Validate movements +ProductsBinding=Products accounts +TransferInAccounting=Transfer in accounting +RegistrationInAccounting=Registration in accounting +Binding=Binding to accounts +CustomersVentilation=Customer invoice binding +SuppliersVentilation=Vendor invoice binding +ExpenseReportsVentilation=Expense report binding +CreateMvts=Create new transaction +UpdateMvts=Modification of a transaction +ValidTransaction=Validate transaction +WriteBookKeeping=Register transactions in accounting +Bookkeeping=Ledger +BookkeepingSubAccount=Subledger +AccountBalance=Account balance +ObjectsRef=Source object ref +CAHTF=Total purchase vendor before tax +TotalExpenseReport=Total expense report +InvoiceLines=Lines of invoices to bind +InvoiceLinesDone=Bound lines of invoices +ExpenseReportLines=Lines of expense reports to bind +ExpenseReportLinesDone=Bound lines of expense reports +IntoAccount=Bind line with the accounting account +TotalForAccount=Total accounting account + + +Ventilate=Bind +LineId=Id line +Processing=Processing +EndProcessing=Process terminated. +SelectedLines=Selected lines +Lineofinvoice=Line of invoice +LineOfExpenseReport=Line of expense report +NoAccountSelected=No accounting account selected +VentilatedinAccount=Binded successfully to the accounting account +NotVentilatedinAccount=Not bound to the accounting account +XLineSuccessfullyBinded=%s products/services successfully bound to an accounting account +XLineFailedToBeBinded=%s products/services were not bound to any accounting account + +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) +ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements +ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements + +ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50) +ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50) +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=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 +ACCOUNTING_MISCELLANEOUS_JOURNAL=Miscellaneous journal +ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal +ACCOUNTING_SOCIAL_JOURNAL=Social journal +ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal + +ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) +ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) +ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure + +ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer +TransitionalAccount=Transitional bank transfer account + +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) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) +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_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) +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=Accounting account by default for the sold services (used if not defined in the service sheet) +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) + +Doctype=Type of document +Docdate=Date +Docref=Reference +LabelAccount=Label account +LabelOperation=Label operation +Sens=Direction +AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make +LetteringCode=Lettering code +Lettering=Lettering +Codejournal=Journal +JournalLabel=Journal label +NumPiece=Piece number +TransactionNumShort=Num. transaction +AccountingCategory=Custom group +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account +AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. +ByAccounts=By accounts +ByPredefinedAccountGroups=By predefined groups +ByPersonalizedAccountGroups=By personalized groups +ByYear=By year +NotMatch=Not Set +DeleteMvt=Delete some operation lines from accounting +DelMonth=Month to delete +DelYear=Year to delete +DelJournal=Journal to delete +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 Journals and Ledger. +VATAccountNotDefined=Account for VAT not defined +ThirdpartyAccountNotDefined=Account for third party not defined +ProductAccountNotDefined=Account for product not defined +FeeAccountNotDefined=Account for fee not defined +BankAccountNotDefined=Account for bank not defined +CustomerInvoicePayment=Payment of invoice customer +ThirdPartyAccount=Third-party account +NewAccountingMvt=New transaction +NumMvts=Numero of transaction +ListeMvts=List of movements +ErrorDebitCredit=Debit and Credit cannot have a value at the same time +AddCompteFromBK=Add accounting accounts to the group +ReportThirdParty=List third-party account +DescThirdPartyReport=Consult here the list of third-party customers and vendors and their accounting accounts +ListAccounts=List of the accounting accounts +UnknownAccountForThirdparty=Unknown third-party account. We will use %s +UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error +ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. We will use %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. +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 +ShowOpeningBalance=Show opening balance +HideOpeningBalance=Hide opening balance +ShowSubtotalByGroup=Show subtotal by level + +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. + +Reconcilable=Reconcilable + +TotalVente=Total turnover before tax +TotalMarge=Total sales margin + +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 <strong>"%s"</strong>. 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 "<strong>%s</strong>". +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: +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 <strong>"%s"</strong>. 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 "<strong>%s</strong>". +DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account + +Closure=Annual closure +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) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated +ValidateMovements=Validate movements +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 + +ValidateHistory=Bind Automatically +AutomaticBindingDone=Automatic binding done + +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 +NotReconciled=Not reconciled +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view + +## 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 +AccountingJournals=Accounting journals +AccountingJournal=Accounting journal +NewAccountingJournal=New accounting journal +ShowAccountingJournal=Show accounting journal +NatureOfJournal=Nature of Journal +AccountingJournalType1=Miscellaneous operations +AccountingJournalType2=Sales +AccountingJournalType3=Purchases +AccountingJournalType4=Bank +AccountingJournalType5=Expenses report +AccountingJournalType8=Inventory +AccountingJournalType9=Has-new +ErrorAccountingJournalIsAlreadyUse=This journal is already use +AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu <b>%s</b> - <b>%s</b> +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 +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_FEC2=Export FEC (With dates generation writing / document reversed) +Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland +Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta +Modelcsv_Gestinumv3=Export for Gestinum (v3) +Modelcsv_Gestinumv5Export for Gestinum (v5) +ChartofaccountsId=Chart of accounts Id + +## 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 +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. +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 +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 +Calculated=Calculated +Formula=Formula + +## 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 <strong>%s</strong>, 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 <a href="%s">%s</a> to make the binding manually + +## Import +ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + +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 + +NAccounts=%s accounts diff --git a/htdocs/langs/ar_IQ/admin.lang b/htdocs/langs/ar_IQ/admin.lang new file mode 100644 index 00000000000..8f4508ada53 --- /dev/null +++ b/htdocs/langs/ar_IQ/admin.lang @@ -0,0 +1,2124 @@ +# Dolibarr language file - Source file is en_US - admin +Foundation=Foundation +Version=Version +Publisher=Publisher +VersionProgram=Version program +VersionLastInstall=Initial install version +VersionLastUpgrade=Latest version upgrade +VersionExperimental=Experimental +VersionDevelopment=Development +VersionUnknown=Unknown +VersionRecommanded=Recommended +FileCheck=Fileset Integrity Checks +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 +SessionId=Session 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 <b>%s</b> will be able to connect after that. +UnlockNewSessions=Remove connection lock +YourSession=Your session +Sessions=Users Sessions +WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files +PermissionsOnFilesInWebRoot=Permissions on files in web root directory +PermissionsOnFile=Permissions on file %s +NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) 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 +WarningModuleNotActive=Module <b>%s</b> must be enabled +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 +GUISetup=Display +SetupArea=Setup +UploadNewTemplate=Upload new template(s) +FormToTestFileUploadForm=Form to test file upload (according to setup) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled +IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled +RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. +RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. +SecuritySetup=Security setup +PHPSetup=PHP 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 <b>%s</b> 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.<br>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.<br>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 +ShowHideDetails=Show-Hide details +PreviewNotAvailable=Preview not available +ThemeCurrentlyActive=Theme currently active +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 <b>%s</b> %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<br>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<br>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 +AllMenus=All +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.<br>Some modules add menu entries (in menu <b>All</b> 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 <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFilesShort=Delete log and temporary files +PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=<b>%s</b> files or directories deleted. +PurgeNDirectoriesFailed=Failed to delete <b>%s</b> 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 <a href="%s">here</a>. +ImportMySqlDesc=To import a MySQL backup file, you may use phpMyAdmin via your hosting or use the mysql command from the Command line.<br>For example: +ImportPostgreSqlDesc=To import a backup file, you must use pg_restore command from command line: +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 <a href="%s">enabled modules</a> 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 <span class="small valignmiddle">%s</span> 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 <strong>%s</strong>. +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 <a href="https://www.dolistore.com">www.dolistore.com</a> 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: <a href="%s">%s</a>. +DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules +DoliPartnersDesc=List of companies providing custom-developed modules or features.<br>Note: since Dolibarr is an open source application, <i>anyone</i> 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 +ActivateOn=Activate on +ActiveOn=Activated on +ActivatableOn=Activatable 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 <b>conf.php</b> file, replace the line <br><b>$dolibarr_main_db_pass="...";</b><br>by<br><b>$dolibarr_main_db_pass="crypted:%s";</b> +InstrucToClearPass=To have password decoded (clear) into the <b>conf.php</b> file, replace the line <br><b>$dolibarr_main_db_pass="crypted:...";</b><br>by<br><b>$dolibarr_main_db_pass="%s";</b> +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 +SocialNetworkId=Social Network ID +ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),<br>take a look at the Dolibarr Wiki:<br><b><a href="%s" target="_blank">%s</a></b> +ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:<br><b><a href="%s" target="_blank">%s</a></b> +HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. +HelpCenterDesc2=Some of these resources are only available in <b>english</b>. +CurrentMenuHandler=Current menu handler +MeasuringUnit=Measuring unit +LeftMargin=Left margin +TopMargin=Top margin +PaperSize=Paper type +Orientation=Orientation +SpaceX=Space X +SpaceY=Space Y +FontSize=Font size +Content=Content +NoticePeriod=Notice period +NewByMonth=New by month +Emails=Emails +EMailsSetup=Emails setup +EMailsDesc=This page allows you to set parameters or options for email sending. +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: <b>%s</b>) +MAIN_MAIL_SMTP_SERVER=SMTP/SMTPS Host (default value in php.ini: <b>%s</b>) +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: <b>%s</b>) +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_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 +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. +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 <b>langs/%s</b> 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 <b>langs/%s</b> 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 +ModuleFamilyCrm=Customer Relationship Management (CRM) +ModuleFamilySrm=Vendor Relationship Management (VRM) +ModuleFamilyProducts=Product Management (PM) +ModuleFamilyHr=Human Resource Management (HR) +ModuleFamilyProjects=Projects/Collaborative work +ModuleFamilyOther=Other +ModuleFamilyTechnic=Multi-modules tools +ModuleFamilyExperimental=Experimental modules +ModuleFamilyFinancial=Financial Modules (Accounting/Treasury) +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: <b>%s</b> +UnpackPackageInModulesRoot=To deploy/install an external module, unpack/unzip the packaged files into the server directory dedicated to external modules:<br><b>%s</b> +SetupIsReadyForUse=Module deployment is finished. You must however enable and setup the module in your application by going to the page setup modules: <a href="%s">%s</a>. +NotExistsDirect=The alternative root directory is not defined to an existing directory.<br> +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.<br>Just create a directory at the root of Dolibarr (eg: custom).<br> +InfDirExample=<br>Then declare it in the file <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>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 can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> +GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> +GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> +GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> +GenericMaskCodes5=<b>ABC{yy}{mm}-{000000}</b> will give <b>ABC0701-000099</b><br><b>{0000+100@1}-ZZZ/{dd}/XXX</b> will give <b>0199-ZZZ/31/XXX</b><br><b>IN{yy}{mm}-{0000}-{t}</b> will give <b>IN0701-0099-A</b> 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 <b>%s</b> on port <b>%s</b> +ServerNotAvailableOnIPOrPort=Server is not available at address <b>%s</b> on port <b>%s</b> +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).<br>It must be the octal value (for example, 0666 means read and write for everyone).<br>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 "<b>Need help or support</b>" on login page +DisableLinkToHelp=Hide link to online help "<b>%s</b>" +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?<br>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 +ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between eah directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b> or <b>.ods</b>. +NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir +FollowingSubstitutionKeysCanBeUsed=<br>To know how to create your odt document templates, before storing them in those directories, read wiki documentation: +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 <b>%s</b> 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 +PDF=PDF +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 Sale Tax / VAT +HideDescOnPDF=Hide products description +HideRefOnPDF=Hide products ref. +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 unauthorized action buttons also for internal users (just greyed otherwise) +OldVATRates=Old VAT rate +NewVATRates=New VAT rate +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 +DateAndTime=Date and hour +Unique=Unique +Boolean=Boolean (one checkbox) +ExtrafieldPhone = Phone +ExtrafieldPrice = Price +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: <strong>$db, $conf, $langs, $mysoc, $user, $object</strong>.<br><strong>WARNING</strong>: 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.<br>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.<br><br>Example of formula:<br>$object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)<br><br>Example to reload object<br>(($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'<br><br>Other example of formula to force load of object and its parent object:<br>(($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).<br>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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key +ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... +ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath +ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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:<br>1: local tax apply on products and services without vat (localtax is calculated on amount without tax)<br>2: local tax apply on products and services including vat (localtax is calculated on amount + main tax)<br>3: local tax apply on products without vat (localtax is calculated on amount without tax)<br>4: local tax apply on products including vat (localtax is calculated on amount + main vat)<br>5: local tax apply on services without vat (localtax is calculated on amount without tax)<br>6: local tax apply on services including vat (localtax is calculated on amount + tax) +SMS=SMS +LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user <strong>%s</strong> +RefreshPhoneLink=Refresh link +LinkToTest=Clickable link generated for user <strong>%s</strong> (click phone number to test) +KeepEmptyToUseDefault=Keep empty to use default value +KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +DefaultLink=Default link +SetAsDefault=Set as default +ValueOverwrittenByUserSetup=Warning, this value may be overwritten by user specific setup (each user can set his own clicktodial url) +ExternalModule=External module +InstalledInto=Installed into directory %s +BarcodeInitForThirdparties=Mass barcode init for third-parties +BarcodeInitForProductsOrServices=Mass barcode init or reset for products or services +CurrentlyNWithoutBarCode=Currently, you have <strong>%s</strong> record on <strong>%s</strong> %s without barcode defined. +InitEmptyBarCode=Init value for next %s empty records +EraseAllCurrentBarCode=Erase all current barcode values +ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values? +AllBarcodeReset=All barcode values have been removed +NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled in the Barcode module setup. +EnableFileCache=Enable file cache +ShowDetailsInPDFPageFoot=Add more details into footer, such as company address or manager names (in addition to professional ids, company capital and VAT number). +NoDetails=No additional details in footer +DisplayCompanyInfo=Display company address +DisplayCompanyManagers=Display manager names +DisplayCompanyInfoAndManagers=Display company address and manager names +EnableAndSetupModuleCron=If you want to have this recurring invoice generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template using the *Create* button. Note that even if you enabled automatic generation, you can still safely launch manual generation. Generation of duplicates for the same period is not possible. +ModuleCompanyCodeCustomerAquarium=%s followed by customer code for a customer accounting code +ModuleCompanyCodeSupplierAquarium=%s followed by vendor code for a vendor accounting code +ModuleCompanyCodePanicum=Return an empty accounting code. +ModuleCompanyCodeDigitaria=Returns a compound accounting code according to the name of the third party. The code consists of a prefix that can be defined in the first position followed by the number of characters defined in the third party code. +ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by the number of characters: %s for the customer accounting code. +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).<br>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: 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 increases the trustability of your email, so it increases the deliverablity without being flagged 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. +WarningPHPMailD=If the method 'PHP Mail' is really the method you would like to use, you can remove this warning by adding the constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home - Setup - Other. +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: <strong>%s</strong>. +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: <strong>%s</strong>. +ClickToShowDescription=Click to show description +DependsOn=This module needs the module(s) +RequiredBy=This module is required by module(s) +TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field. +PageUrlForDefaultValues=You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value. +PageUrlForDefaultValuesCreate=<br>Example:<br>For the form to create a new third party, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/", so use path like <strong>mymodule/mypage.php</strong> and not custom/mymodule/mypage.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> +PageUrlForDefaultValuesList=<br>Example:<br>For the page that lists third parties, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/" so use a path like <strong>mymodule/mypagelist.php</strong> and not custom/mymodule/mypagelist.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> +AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) +EnableDefaultValues=Enable customization of default values +EnableOverwriteTranslation=Enable usage of overwritten translation +GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. +WarningSettingSortOrder=Warning, setting a default sort order may result in a technical error when going on the list page if field is an unknown field. If you experience such an error, come back to this page to remove the default sort order and restore default behavior. +Field=Field +ProductDocumentTemplates=Document templates to generate product document +FreeLegalTextOnExpenseReports=Free legal text on expense reports +WatermarkOnDraftExpenseReports=Watermark on draft expense reports +AttachMainDocByDefault=Set this to 1 if you want to attach main document to email by default (if applicable) +FilesAttachedToEmail=Attach file +SendEmailsReminders=Send agenda reminders by emails +davDescription=Setup a WebDAV server +DAVSetup=Setup of module DAV +DAV_ALLOW_PRIVATE_DIR=Enable the generic private directory (WebDAV dedicated directory named "private" - login required) +DAV_ALLOW_PRIVATE_DIRTooltip=The generic private directory is a WebDAV directory anybody can access with its application login/pass. +DAV_ALLOW_PUBLIC_DIR=Enable the generic public directory (WebDAV dedicated directory named "public" - no login required) +DAV_ALLOW_PUBLIC_DIRTooltip=The generic public directory is a WebDAV directory anybody can access (in read and write mode), with no authorization required (login/password account). +DAV_ALLOW_ECM_DIR=Enable the DMS/ECM private directory (root directory of the DMS/ECM module - login required) +DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploaded when using the DMS/ECM module. Similarly as access from the web interface, you will need a valid login/password with adecuate permissions to access it. +# Modules +Module0Name=Users & Groups +Module0Desc=Users / Employees and Groups management +Module1Name=Third Parties +Module1Desc=Companies and contacts management (customers, prospects...) +Module2Name=Commercial +Module2Desc=Commercial management +Module10Name=Accounting (simplified) +Module10Desc=Simple accounting reports (journals, turnover) based on database content. Does not use any ledger table. +Module20Name=Proposals +Module20Desc=Commercial proposal management +Module22Name=Mass Emailings +Module22Desc=Manage bulk emailing +Module23Name=Energy +Module23Desc=Monitoring the consumption of energies +Module25Name=Sales Orders +Module25Desc=Sales order management +Module30Name=Invoices +Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers +Module40Name=Vendors +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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. +Module49Name=Editors +Module49Desc=Editor management +Module50Name=Products +Module50Desc=Management of Products +Module51Name=Mass mailings +Module51Desc=Mass paper mailing management +Module52Name=Stocks +Module52Desc=Stock management +Module53Name=Services +Module53Desc=Management of Services +Module54Name=Contracts/Subscriptions +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=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, ...) +Module60Name=Stickers +Module60Desc=Management of stickers +Module70Name=Interventions +Module70Desc=Intervention management +Module75Name=Expense and trip notes +Module75Desc=Expense and trip notes management +Module80Name=Shipments +Module80Desc=Shipments and delivery note management +Module85Name=Banks & Cash +Module85Desc=Management of bank or cash accounts +Module100Name=External Site +Module100Desc=Add a link to an external website as a main menu icon. Website is shown in a frame under the top menu. +Module105Name=Mailman and SPIP +Module105Desc=Mailman or SPIP interface for member module +Module200Name=LDAP +Module200Desc=LDAP directory synchronization +Module210Name=PostNuke +Module210Desc=PostNuke integration +Module240Name=Data exports +Module240Desc=Tool to export Dolibarr data (with assistance) +Module250Name=Data imports +Module250Desc=Tool to import data into Dolibarr (with assistance) +Module310Name=Members +Module310Desc=Foundation members management +Module320Name=RSS Feed +Module320Desc=Add a RSS feed to Dolibarr pages +Module330Name=Bookmarks & Shortcuts +Module330Desc=Create shortcuts, always accessible, to the internal or external pages to which you frequently access +Module400Name=Projects or Leads +Module400Desc=Management of projects, leads/opportunities and/or tasks. You can also assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view. +Module410Name=Webcalendar +Module410Desc=Webcalendar integration +Module500Name=Taxes & Special Expenses +Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...) +Module510Name=Salaries +Module510Desc=Record and track employee payments +Module520Name=Loans +Module520Desc=Management of loans +Module600Name=Notifications on business event +Module600Desc=Send email notifications triggered by a business event: per user (setup defined on each user), per third-party contacts (setup defined on each third party) or by specific emails +Module600Long=Note that this module sends emails in real-time when a specific business event occurs. If you are looking for a feature to send email reminders for agenda events, go into the setup of module Agenda. +Module610Name=Product Variants +Module610Desc=Creation of product variants (color, size etc.) +Module700Name=Donations +Module700Desc=Donation management +Module770Name=Expense Reports +Module770Desc=Manage expense reports claims (transportation, meal, ...) +Module1120Name=Vendor Commercial Proposals +Module1120Desc=Request vendor commercial proposal and prices +Module1200Name=Mantis +Module1200Desc=Mantis integration +Module1520Name=Document Generation +Module1520Desc=Mass email document generation +Module1780Name=Tags/Categories +Module1780Desc=Create tags/category (products, customers, suppliers, contacts or members) +Module2000Name=WYSIWYG editor +Module2000Desc=Allow text fields to be edited/formatted using CKEditor (html) +Module2200Name=Dynamic Prices +Module2200Desc=Use maths expressions for auto-generation of prices +Module2300Name=Scheduled jobs +Module2300Desc=Scheduled jobs management (alias cron or chrono table) +Module2400Name=Events/Agenda +Module2400Desc=Track events. Log automatic events for tracking purposes or record manual events or meetings. This is the principal module for good Customer or Vendor Relationship Management. +Module2500Name=DMS / ECM +Module2500Desc=Document Management System / Electronic Content Management. Automatic organization of your generated or stored documents. Share them when you need. +Module2600Name=API/Web services (SOAP server) +Module2600Desc=Enable the Dolibarr SOAP server providing API services +Module2610Name=API/Web services (REST server) +Module2610Desc=Enable the Dolibarr REST server providing API services +Module2660Name=Call WebServices (SOAP client) +Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Only Purchase orders are currently supported.) +Module2700Name=Gravatar +Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Needs Internet access +Module2800Desc=FTP Client +Module2900Name=GeoIPMaxmind +Module2900Desc=GeoIP Maxmind conversions capabilities +Module3200Name=Unalterable Archives +Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). +Module4000Name=HRM +Module4000Desc=Human resources management (management of department, employee contracts and feelings) +Module5000Name=Multi-company +Module5000Desc=Allows you to manage multiple companies +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) +Module10000Name=Websites +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. +Module20000Name=Leave Request Management +Module20000Desc=Define and track employee leave requests +Module39000Name=Product Lots +Module39000Desc=Lots, serial numbers, eat-by/sell-by date management for products +Module40000Name=Multicurrency +Module40000Desc=Use alternative currencies in prices and documents +Module50000Name=PayBox +Module50000Desc=Offer customers a PayBox 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...) +Module50100Name=POS SimplePOS +Module50100Desc=Point of Sale module SimplePOS (simple POS). +Module50150Name=POS TakePOS +Module50150Desc=Point of Sale module TakePOS (touchscreen POS, for shops, bars or restaurants). +Module50200Name=Paypal +Module50200Desc=Offer customers a PayPal online payment page (PayPal account or 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...) +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 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 +Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) +Module59000Name=Margins +Module59000Desc=Module to follow margins +Module60000Name=Commissions +Module60000Desc=Module to manage commissions +Module62000Name=Incoterms +Module62000Desc=Add features to manage Incoterms +Module63000Name=Resources +Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events +Permission11=Read customer invoices +Permission12=Create/modify customer invoices +Permission13=Invalidate customer invoices +Permission14=Validate customer invoices +Permission15=Send customer invoices by email +Permission16=Create payments for customer invoices +Permission19=Delete customer invoices +Permission21=Read commercial proposals +Permission22=Create/modify commercial proposals +Permission24=Validate commercial proposals +Permission25=Send commercial proposals +Permission26=Close commercial proposals +Permission27=Delete commercial proposals +Permission28=Export commercial proposals +Permission31=Read products +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) +Permission45=Export projects +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 +Permission75=Setup types of membership +Permission76=Export data +Permission78=Read subscriptions +Permission79=Create/modify subscriptions +Permission81=Read customers orders +Permission82=Create/modify customers orders +Permission84=Validate customers orders +Permission86=Send customers orders +Permission87=Close customers orders +Permission88=Cancel customers orders +Permission89=Delete customers orders +Permission91=Read social or fiscal taxes and vat +Permission92=Create/modify social or fiscal taxes and vat +Permission93=Delete social or fiscal taxes and vat +Permission94=Export social or fiscal taxes +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 +Permission112=Create/modify/delete and compare transactions +Permission113=Setup financial accounts (create, manage categories) +Permission114=Reconcile transactions +Permission115=Export transactions and account statements +Permission116=Transfers between accounts +Permission117=Manage checks dispatching +Permission121=Read third parties linked to user +Permission122=Create/modify third parties linked to user +Permission125=Delete third parties linked to user +Permission126=Export third parties +Permission141=Read all projects and tasks (also private projects for which I am not a contact) +Permission142=Create/modify all projects and tasks (also private projects for which I am not a contact) +Permission144=Delete all projects and tasks (also private projects i am not contact for) +Permission146=Read providers +Permission147=Read stats +Permission151=Read direct debit payment orders +Permission152=Create/modify a direct debit payment orders +Permission153=Send/Transmit direct debit payment orders +Permission154=Record Credits/Rejections of direct debit payment orders +Permission161=Read contracts/subscriptions +Permission162=Create/modify contracts/subscriptions +Permission163=Activate a service/subscription of a contract +Permission164=Disable a service/subscription of a contract +Permission165=Delete contracts/subscriptions +Permission167=Export contracts +Permission171=Read trips and expenses (yours and your subordinates) +Permission172=Create/modify trips and expenses +Permission173=Delete trips and expenses +Permission174=Read all trips and expenses +Permission178=Export trips and expenses +Permission180=Read suppliers +Permission181=Read purchase orders +Permission182=Create/modify purchase orders +Permission183=Validate purchase orders +Permission184=Approve purchase orders +Permission185=Order or cancel purchase orders +Permission186=Receive purchase orders +Permission187=Close purchase orders +Permission188=Cancel purchase orders +Permission192=Create lines +Permission193=Cancel lines +Permission194=Read the bandwidth lines +Permission202=Create ADSL connections +Permission203=Order connections orders +Permission204=Order connections +Permission205=Manage connections +Permission206=Read connections +Permission211=Read Telephony +Permission212=Order lines +Permission213=Activate line +Permission214=Setup Telephony +Permission215=Setup providers +Permission221=Read emailings +Permission222=Create/modify emailings (topic, recipients...) +Permission223=Validate emailings (allows sending) +Permission229=Delete emailings +Permission237=View recipients and info +Permission238=Manually send mailings +Permission239=Delete mailings after validation or sent +Permission241=Read categories +Permission242=Create/modify categories +Permission243=Delete categories +Permission244=See the contents of the hidden categories +Permission251=Read other users and groups +PermissionAdvanced251=Read other users +Permission252=Read permissions of other users +Permission253=Create/modify other users, groups and permissions +PermissionAdvanced253=Create/modify internal/external users and permissions +Permission254=Create/modify external users only +Permission255=Modify other users password +Permission256=Delete or disable other users +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission271=Read CA +Permission272=Read invoices +Permission273=Issue invoices +Permission281=Read contacts +Permission282=Create/modify contacts +Permission283=Delete contacts +Permission286=Export contacts +Permission291=Read tariffs +Permission292=Set permissions on the tariffs +Permission293=Modify customer's tariffs +Permission300=Read barcodes +Permission301=Create/modify barcodes +Permission302=Delete barcodes +Permission311=Read services +Permission312=Assign service/subscription to contract +Permission331=Read bookmarks +Permission332=Create/modify bookmarks +Permission333=Delete bookmarks +Permission341=Read its own permissions +Permission342=Create/modify his own user information +Permission343=Modify his own password +Permission344=Modify its own permissions +Permission351=Read groups +Permission352=Read groups permissions +Permission353=Create/modify groups +Permission354=Delete or disable groups +Permission358=Export users +Permission401=Read discounts +Permission402=Create/modify discounts +Permission403=Validate discounts +Permission404=Delete discounts +Permission430=Use Debug Bar +Permission511=Read payments of salaries (yours and subordinates) +Permission512=Create/modify payments of salaries +Permission514=Delete payments of salaries +Permission517=Read payments of salaries of everybody +Permission519=Export salaries +Permission520=Read Loans +Permission522=Create/modify loans +Permission524=Delete loans +Permission525=Access loan calculator +Permission527=Export loans +Permission531=Read services +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 +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 +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 +Permission771=Read expense reports (yours and your subordinates) +Permission772=Create/modify expense reports +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 +Permission1003=Delete warehouses +Permission1004=Read stock movements +Permission1005=Create/modify stock movements +Permission1101=Read delivery receipts +Permission1102=Create/modify delivery receipts +Permission1104=Validate delivery receipts +Permission1109=Delete delivery receipts +Permission1121=Read supplier proposals +Permission1122=Create/modify supplier proposals +Permission1123=Validate supplier proposals +Permission1124=Send supplier proposals +Permission1125=Delete supplier proposals +Permission1126=Close supplier price requests +Permission1181=Read suppliers +Permission1182=Read purchase orders +Permission1183=Create/modify purchase orders +Permission1184=Validate purchase orders +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 +Permission1232=Create/modify vendor invoices +Permission1233=Validate vendor invoices +Permission1234=Delete vendor invoices +Permission1235=Send vendor invoices by email +Permission1236=Export vendor invoices, attributes and payments +Permission1237=Export purchase orders and their details +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) +Permission2411=Read actions (events or tasks) of others +Permission2412=Create/modify actions (events or tasks) of others +Permission2413=Delete actions (events or tasks) of others +Permission2414=Export actions/tasks of others +Permission2501=Read/Download documents +Permission2502=Download documents +Permission2503=Submit or delete documents +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 +Permission4004=Export employees +Permission10001=Read website content +Permission10002=Create/modify website content (html and javascript content) +Permission10003=Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers. +Permission10005=Delete website content +Permission20001=Read leave requests (your leave and those of your subordinates) +Permission20002=Create/modify your leave requests (your leave and those of your subordinates) +Permission20003=Delete leave requests +Permission20004=Read all leave requests (even of user not subordinates) +Permission20005=Create/modify leave requests for everybody (even of user not subordinates) +Permission20006=Admin leave requests (setup and update balance) +Permission20007=Approve leave requests +Permission23001=Read Scheduled job +Permission23002=Create/update Scheduled job +Permission23003=Delete Scheduled job +Permission23004=Execute Scheduled job +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 +Permission50414=Delete operations in ledger +Permission50415=Delete all operations by year and journal in ledger +Permission50418=Export operations of the ledger +Permission50420=Report and export reports (turnover, balance, journals, ledger) +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 +Permission54001=Print +Permission55001=Read polls +Permission55002=Create/modify polls +Permission59001=Read commercial margins +Permission59002=Define commercial margins +Permission59003=Read every user margin +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 +Permission68001=Read intracomm report +Permission68002=Create/modify intracomm report +Permission68004=Delete intracomm report +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 level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts +DictionaryCanton=States/Provinces +DictionaryRegion=Regions +DictionaryCountry=Countries +DictionaryCurrency=Currencies +DictionaryCivility=Honorific titles +DictionaryActions=Types of agenda events +DictionarySocialContributions=Types of social or fiscal taxes +DictionaryVAT=VAT Rates or Sales Tax Rates +DictionaryRevenueStamp=Amount of tax stamps +DictionaryPaymentConditions=Payment Terms +DictionaryPaymentModes=Payment Modes +DictionaryTypeContact=Contact/Address types +DictionaryTypeOfContainer=Website - Type of website pages/containers +DictionaryEcotaxe=Ecotax (WEEE) +DictionaryPaperFormat=Paper formats +DictionaryFormatCards=Card formats +DictionaryFees=Expense report - Types of expense report lines +DictionarySendingMethods=Shipping methods +DictionaryStaff=Number of Employees +DictionaryAvailability=Delivery delay +DictionaryOrderMethods=Ordering methods +DictionarySource=Origin of proposals/orders +DictionaryAccountancyCategory=Personalized groups for reports +DictionaryAccountancysystem=Models for chart of accounts +DictionaryAccountancyJournal=Accounting journals +DictionaryEMailTemplates=Email Templates +DictionaryUnits=Units +DictionaryMeasuringUnits=Measuring Units +DictionarySocialNetworks=Social Networks +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 +DictionaryExpenseTaxRange=Expense report - Range by transportation category +DictionaryTransportMode=Intracomm report - Transport mode +TypeOfUnit=Type of unit +SetupSaved=Setup saved +SetupNotSaved=Setup not saved +BackToModuleList=Back to Module list +BackToDictionaryList=Back to Dictionaries list +TypeOfRevenueStamp=Type of tax stamp +VATManagement=Sales Tax Management +VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the Sales Tax rate follows the active standard rule:<br>If the seller is not subject to Sales tax, then Sales tax defaults to 0. End of rule.<br>If the (seller's country = buyer's country), then the Sales tax by default equals the Sales tax of the product in the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to the customs office in their country and not to the seller. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT defaults to the VAT rate of the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.<br>In any other case the proposed default is Sales tax=0. End of rule. +VATIsNotUsedDesc=By default the proposed Sales tax is 0 which can be used for cases like associations, individuals or small companies. +VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. +VATIsNotUsedExampleFR=In France, it means associations that are non Sales tax declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (Sales tax in franchise) and paid a franchise Sales tax without any Sales tax declaration. This choice will display the reference "Non applicable Sales tax - art-293B of CGI" on invoices. +##### Local Taxes ##### +TypeOfSaleTaxes=Type of sales tax +LTRate=Rate +LocalTax1IsNotUsed=Do not use second tax +LocalTax1IsUsedDesc=Use a second type of tax (other than first one) +LocalTax1IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax1Management=Second type of tax +LocalTax1IsUsedExample= +LocalTax1IsNotUsedExample= +LocalTax2IsNotUsed=Do not use third tax +LocalTax2IsUsedDesc=Use a third type of tax (other than first one) +LocalTax2IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax2Management=Third type of tax +LocalTax2IsUsedExample= +LocalTax2IsNotUsedExample= +LocalTax1ManagementES=RE Management +LocalTax1IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:<br>If the buyer is not subjected to RE, RE by default=0. End of rule.<br>If the buyer is subjected to RE then the RE by default. End of rule.<br> +LocalTax1IsNotUsedDescES=By default the proposed RE is 0. End of rule. +LocalTax1IsUsedExampleES=In Spain they are professionals subject to some specific sections of the Spanish IAE. +LocalTax1IsNotUsedExampleES=In Spain they are professional and societies and subject to certain sections of the Spanish IAE. +LocalTax2ManagementES=IRPF Management +LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices, orders etc. follow the active standard rule:<br>If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.<br>If the seller is subjected to IRPF then the IRPF by default. End of rule.<br> +LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule. +LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. +LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. +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) +CalcLocaltax=Reports on local taxes +CalcLocaltax1=Sales - Purchases +CalcLocaltax1Desc=Local Taxes reports are calculated with the difference between localtaxes sales and localtaxes purchases +CalcLocaltax2=Purchases +CalcLocaltax2Desc=Local Taxes reports are the total of localtaxes purchases +CalcLocaltax3=Sales +CalcLocaltax3Desc=Local Taxes reports are the total of localtaxes sales +NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax +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 +Offset=Offset +AlwaysActive=Always active +Upgrade=Upgrade +MenuUpgrade=Upgrade / Extend +AddExtensionThemeModuleOrOther=Deploy/install external app/module +WebServer=Web server +DocumentRootServer=Web server's root directory +DataRootServer=Data files directory +IP=IP +Port=Port +VirtualServerName=Virtual server name +OS=OS +PhpWebLink=Web-Php link +Server=Server +Database=Database +DatabaseServer=Database host +DatabaseName=Database name +DatabasePort=Database port +DatabaseUser=Database user +DatabasePassword=Database password +Tables=Tables +TableName=Table name +NbOfRecord=No. of records +Host=Server +DriverType=Driver type +SummarySystem=System information summary +SummaryConst=List of all Dolibarr setup parameters +MenuCompanySetup=Company/Organization +DefaultMenuManager= Standard menu manager +DefaultMenuSmartphoneManager=Smartphone menu manager +Skin=Skin theme +DefaultSkin=Default skin theme +MaxSizeList=Max length for list +DefaultMaxSizeList=Default max length for lists +DefaultMaxSizeShortList=Default max length for short lists (i.e. in customer card) +MessageOfDay=Message of the day +MessageLogin=Login page message +LoginPage=Login page +BackgroundImageLogin=Background image +PermanentLeftSearchForm=Permanent search form on left menu +DefaultLanguage=Default language +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 +CompanyZip=Zip +CompanyTown=Town +CompanyCountry=Country +CompanyCurrency=Main currency +CompanyObject=Object of the company +IDCountry=ID country +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). +DoNotSuggestPaymentMode=Do not suggest +NoActiveBankAccountDefined=No active bank account defined +OwnerOfBankAccount=Owner of bank account %s +BankModuleNotActive=Bank accounts module not enabled +ShowBugTrackLink=Show link "<strong>%s</strong>" +Alerts=Alerts +DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for: +DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element. +Delays_MAIN_DELAY_ACTIONS_TODO=Planned events (agenda events) not completed +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Project not closed in time +Delays_MAIN_DELAY_TASKS_TODO=Planned task (project tasks) not completed +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Order not processed +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Purchase order not processed +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Proposal not closed +Delays_MAIN_DELAY_PROPALS_TO_BILL=Proposal not billed +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Service to activate +Delays_MAIN_DELAY_RUNNING_SERVICES=Expired service +Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Unpaid vendor invoice +Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Unpaid customer invoice +Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Pending bank reconciliation +Delays_MAIN_DELAY_MEMBERS=Delayed membership fee +Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done +Delays_MAIN_DELAY_EXPENSEREPORTS=Expense report to approve +Delays_MAIN_DELAY_HOLIDAYS=Leave requests to approve +SetupDescription1=Before starting to use Dolibarr some initial parameters must be defined and modules enabled/configured. +SetupDescription2=The following two sections are mandatory (the two first entries in the Setup menu): +SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). +SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. +SetupDescription5=Other Setup menu entries manage optional parameters. +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s +Audit=Audit +InfoDolibarr=About Dolibarr +InfoBrowser=About Browser +InfoOS=About OS +InfoWebServer=About Web Server +InfoDatabase=About Database +InfoPHP=About PHP +InfoPerf=About Performances +InfoSecurity=About Security +BrowserName=Browser name +BrowserOS=Browser OS +ListOfSecurityEvents=List of Dolibarr security events +SecurityEventsPurged=Security events purged +LogEventDesc=Enable logging for specific security events. Administrators the log via menu <b>%s - %s</b>. Warning, this feature can generate a large amount of data in the database. +AreaForAdminOnly=Setup parameters can be set by <b>administrator users</b> only. +SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only. +SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. +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 +DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. +AvailableModules=Available app/modules +ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules). +SessionTimeOut=Time out for session +SessionExplanation=This number guarantees that the session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guarantee that the session will expire after this delay. It will expire, after this delay, and when the session cleaner is run, so every <b>%s/%s</b> access, but only during access made by other sessions (if value is 0, it means clearing of session is done only by an external process).<br>Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by an external setup, no matter what the value entered here is. +SessionsPurgedByExternalSystem=Sessions on this server seems to be cleaned by an external mechanism (cron under debian, ubuntu ...), probably every <b>%s</b> seconds (= value of parameter <b>session.gc_maxlifetime</b>), so changing the value here has no effect. You must ask the server administrator to change session delay. +TriggersAvailable=Available triggers +TriggersDesc=Triggers are files that will modify the behavior of Dolibarr workflow once copied into the directory <b>htdocs/core/triggers</b>. They realize new actions, activated on Dolibarr events (new company creation, invoice validation, ...). +TriggerDisabledByName=Triggers in this file are disabled by the <b>-NORUN</b> suffix in their name. +TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module <b>%s</b> is disabled. +TriggerAlwaysActive=Triggers in this file are always active, whatever are the activated Dolibarr modules. +TriggerActiveAsModuleActive=Triggers in this file are active as module <b>%s</b> is enabled. +GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. +DictionaryDesc=Insert all reference data. You can add your values to the default. +ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. +MiscellaneousDesc=All other security related parameters are defined here. +LimitsSetup=Limits/Precision setup +LimitsDesc=You can define limits, precisions and optimizations used by Dolibarr here +MAIN_MAX_DECIMALS_UNIT=Max. decimals for unit prices +MAIN_MAX_DECIMALS_TOT=Max. decimals for total prices +MAIN_MAX_DECIMALS_SHOWN=Max. decimals for prices <b>shown on screen</b>. Add an ellipsis <b>...</b> after this parameter (e.g. "2...") if you want to see "<b>...</b>" suffixed to the truncated price. +MAIN_ROUNDING_RULE_TOT=Step of rounding range (for countries where rounding is done on something other than base 10. For example, put 0.05 if rounding is done by 0.05 steps) +UnitPriceOfProduct=Net unit price of a product +TotalPriceAfterRounding=Total price (excl/vat/incl tax) after rounding +ParameterActiveForNextInputOnly=Parameter effective for next input only +NoEventOrNoAuditSetup=No security event has been logged. This is normal if Audit has not been enabled in the "Setup - Security - Events" page. +NoEventFoundWithCriteria=No security event has been found for this search criteria. +SeeLocalSendMailSetup=See your local sendmail setup +BackupDesc=A <b>complete</b> backup of a Dolibarr installation requires two steps. +BackupDesc2=Backup the contents of the "documents" directory (<b>%s</b>) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes. +BackupDesc3=Backup the structure and contents of your database (<b>%s</b>) into a dump file. For this, you can use the following assistant. +BackupDescX=The archived directory should be stored in a secure place. +BackupDescY=The generated dump file should be stored in a secure place. +BackupPHPWarning=Backup cannot be guaranteed with this method. Previous one recommended. +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 (<b>%s</b>). +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 (<b>%s</b>). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.<br>To restore a backup database into this current installation, you can follow this assistant. +RestoreMySQL=MySQL import +ForcedToByAModule=This rule is forced to <b>%s</b> 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 +RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Program version %s differs from Database version %s) +YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. +YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP +DownloadMoreSkins=More skins to download +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset +ShowProfIdInAddress=Show professional id with addresses +ShowVATIntaInAddress=Hide intra-Community VAT number with addresses +TranslationUncomplete=Partial translation +MAIN_DISABLE_METEO=Disable meteorological view +MeteoStdMod=Standard mode +MeteoStdModEnabled=Standard mode enabled +MeteoPercentageMod=Percentage mode +MeteoPercentageModEnabled=Percentage mode enabled +MeteoUseMod=Click to use %s +TestLoginToAPI=Test login to API +ProxyDesc=Some features of Dolibarr require internet access. Define here the internet connection parameters such as access through a proxy server if necessary. +ExternalAccess=External/Internet Access +MAIN_PROXY_USE=Use a proxy server (otherwise access is direct to the internet) +MAIN_PROXY_HOST=Proxy server: Name/Address +MAIN_PROXY_PORT=Proxy server: Port +MAIN_PROXY_USER=Proxy server: Login/User +MAIN_PROXY_PASS=Proxy server: Password +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s +ExtraFields=Complementary attributes +ExtraFieldsLines=Complementary attributes (lines) +ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) +ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) +ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) +ExtraFieldsThirdParties=Complementary attributes (third party) +ExtraFieldsContacts=Complementary attributes (contacts/address) +ExtraFieldsMember=Complementary attributes (member) +ExtraFieldsMemberType=Complementary attributes (member type) +ExtraFieldsCustomerInvoices=Complementary attributes (invoices) +ExtraFieldsCustomerInvoicesRec=Complementary attributes (templates invoices) +ExtraFieldsSupplierOrders=Complementary attributes (orders) +ExtraFieldsSupplierInvoices=Complementary attributes (invoices) +ExtraFieldsProject=Complementary attributes (projects) +ExtraFieldsProjectTask=Complementary attributes (tasks) +ExtraFieldsSalaries=Complementary attributes (salaries) +ExtraFieldHasWrongValue=Attribute %s has a wrong value. +AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space +SendmailOptionNotComplete=Warning, on some Linux systems, to send email from your email, sendmail execution setup must contains option -ba (parameter mail.force_extra_parameters into your php.ini file). If some recipients never receive emails, try to edit this PHP parameter with mail.force_extra_parameters = -ba). +PathToDocuments=Path to documents +PathDirectory=Directory +SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might not be parsed correctly by some receiving mail servers. The result is that some mails can't be read by people hosted by those bugged platforms. This is the case for some Internet providers (Ex: Orange in France). This is not a problem with Dolibarr or PHP but with the receiving mail server. You can however add an option MAIN_FIX_FOR_BUGGED_MTA to 1 in Setup - Other to modify Dolibarr to avoid this. However, you may experience problems with other servers that strictly use the SMTP standard. The other solution (recommended) is to use the method "SMTP socket library" which has no disadvantages. +TranslationSetup=Setup of translation +TranslationKeySearch=Search a translation key or string +TranslationOverwriteKey=Overwrite a translation string +TranslationDesc=How to set the display language:<br>* Default/Systemwide: menu <strong>Home -> Setup -> Display</strong><br>* Per user: Click on the username at the top of the screen and modify the <strong>User Display Setup</strong> tab on the user card. +TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the translation key string into "%s" and your new translation into "%s" +TranslationOverwriteDesc2=You can use the other tab to help you know which translation key to use +TranslationString=Translation string +CurrentTranslationString=Current translation string +WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least for key or translation string +NewTranslationStringToShow=New translation string to show +OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s +TransKeyWithoutOriginalValue=You forced a new translation for the translation key '<strong>%s</strong>' that does not exist in any language files +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: <b>%s</b> / <b>%s</b> +YouMustEnableOneModule=You must at least enable 1 module +ClassNotFoundIntoPathWarning=Class %s not found in PHP path +YesInSummer=Yes in summer +OnlyFollowingModulesAreOpenedToExternalUsers=Note, only the following modules are available to external users (irrespective of the permissions of such users) and only if permissions are granted:<br> +SuhosinSessionEncrypt=Session storage encrypted by Suhosin +ConditionIsCurrently=Condition is currently %s +YouUseBestDriver=You use driver %s which is the best driver currently available. +YouDoNotUseBestDriver=You use driver %s but driver %s is recommended. +NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. +SearchOptim=Search optimization +YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can 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. +BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance. +BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari. +PHPModuleLoaded=PHP component %s is loaded +PreloadOPCode=Preloaded OPCode is used +AddRefInList=Display Customer/Vendor ref. info list (select list or combobox) and most of hyperlink.<br>Third Parties will appear with a name format of "CC12345 - SC45678 - The Big Company corp." instead of "The Big Company corp". +AddAdressInList=Display Customer/Vendor adress info list (select list or combobox)<br>Third Parties will appear with a name format of "The Big Company corp. - 21 jump street 123456 Big town - USA" instead of "The Big Company corp". +AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)<br>Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand". +AskForPreferredShippingMethod=Ask for preferred shipping method for Third Parties. +FieldEdition=Edition of field %s +FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) +GetBarCode=Get barcode +NumberingModules=Numbering models +DocumentModules=Document models +##### Module password generation +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 +PasswordPatternDesc=Password pattern description +##### Users setup ##### +RuleForGeneratedPasswords=Rules to generate and validate passwords +DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page +UsersSetup=Users module setup +UserMailRequired=Email required to create a new user +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 +##### HRM setup ##### +HRMSetup=HRM module setup +##### Company setup ##### +CompanySetup=Companies module setup +CompanyCodeChecker=Options for automatic generation of customer/vendor codes +AccountCodeManager=Options for automatic generation of customer/vendor accounting codes +NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.<br>Recipients of notifications can be defined: +NotificationsDescUser=* per user, one user at a time. +NotificationsDescContact=* per third-party contacts (customers or vendors), one contact at a time. +NotificationsDescGlobal=* or by setting global email addresses in this setup page. +ModelModules=Document Templates +DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...) +WatermarkOnDraft=Watermark on draft document +JSOnPaimentBill=Activate feature to autofill payment lines on payment form +CompanyIdProfChecker=Rules for Professional IDs +MustBeUnique=Must be unique? +MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ? +MustBeInvoiceMandatory=Mandatory to validate invoices? +TechnicalServicesProvided=Technical services provided +#####DAV ##### +WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access. +WebDavServer=Root URL of %s server: %s +##### Webcal setup ##### +WebCalUrlForVCalExport=An export link to <b>%s</b> format is available at following link: %s +##### Invoices ##### +BillsSetup=Invoices module setup +BillsNumberingModule=Invoices and credit notes numbering model +BillsPDFModules=Invoice documents models +BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type +PaymentsPDFModules=Payment documents models +ForceInvoiceDate=Force invoice date to validation date +SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice +SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account +SuggestPaymentByChequeToAddress=Suggest payment by check to +FreeLegalTextOnInvoices=Free text on invoices +WatermarkOnDraftInvoices=Watermark on draft invoices (none if empty) +PaymentsNumberingModule=Payments numbering model +SuppliersPayment=Vendor payments +SupplierPaymentSetup=Vendor payments setup +##### Proposals ##### +PropalSetup=Commercial proposals module setup +ProposalsNumberingModules=Commercial proposal numbering models +ProposalsPDFModules=Commercial proposal documents models +SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined on the proposal +FreeLegalTextOnProposal=Free text on commercial proposals +WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) +BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal +##### SupplierProposal ##### +SupplierProposalSetup=Price requests suppliers module setup +SupplierProposalNumberingModules=Price requests suppliers numbering models +SupplierProposalPDFModules=Price requests suppliers documents models +FreeLegalTextOnSupplierProposal=Free text on price requests suppliers +WatermarkOnDraftSupplierProposal=Watermark on draft price requests suppliers (none if empty) +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Ask for bank account destination of price request +WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Ask for Warehouse Source for order +##### Suppliers Orders ##### +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order +##### Orders ##### +SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order +OrdersSetup=Sales Orders management setup +OrdersNumberingModules=Orders numbering models +OrdersModelModule=Order documents models +FreeLegalTextOnOrders=Free text on orders +WatermarkOnDraftOrders=Watermark on draft orders (none if empty) +ShippableOrderIconInList=Add an icon in Orders list which indicate if order is shippable +BANK_ASK_PAYMENT_BANK_DURING_ORDER=Ask for bank account destination of order +##### Interventions ##### +InterventionsSetup=Interventions module setup +FreeLegalTextOnInterventions=Free text on intervention documents +FicheinterNumberingModules=Intervention numbering models +TemplatePDFInterventions=Intervention card documents models +WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty) +##### Contracts ##### +ContractsSetup=Contracts/Subscriptions module setup +ContractsNumberingModules=Contracts numbering modules +TemplatePDFContracts=Contracts documents models +FreeLegalTextOnContracts=Free text on contracts +WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) +##### Members ##### +MembersSetup=Members module setup +MemberMainOptions=Main options +AdherentLoginRequired= Manage a Login for each member +AdherentMailRequired=Email required to create a new member +MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default +VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes +MEMBER_REMINDER_EMAIL=Enable automatic reminder <b>by email</b> of expired subscriptions. Note: Module <strong>%s</strong> must be enabled and correctly setup to send reminders. +MembersDocModules=Document templates for documents generated from member record +##### LDAP setup ##### +LDAPSetup=LDAP Setup +LDAPGlobalParameters=Global parameters +LDAPUsersSynchro=Users +LDAPGroupsSynchro=Groups +LDAPContactsSynchro=Contacts +LDAPMembersSynchro=Members +LDAPMembersTypesSynchro=Members types +LDAPSynchronization=LDAP synchronisation +LDAPFunctionsNotAvailableOnPHP=LDAP functions are not available on your PHP +LDAPToDolibarr=LDAP -> Dolibarr +DolibarrToLDAP=Dolibarr -> LDAP +LDAPNamingAttribute=Key in LDAP +LDAPSynchronizeUsers=Organization of users in LDAP +LDAPSynchronizeGroups=Organization of groups in LDAP +LDAPSynchronizeContacts=Organization of contacts in LDAP +LDAPSynchronizeMembers=Organization of foundation's members in LDAP +LDAPSynchronizeMembersTypes=Organization of foundation's members types in LDAP +LDAPPrimaryServer=Primary server +LDAPSecondaryServer=Secondary server +LDAPServerPort=Server port +LDAPServerPortExample=Default port: 389 +LDAPServerProtocolVersion=Protocol version +LDAPServerUseTLS=Use TLS +LDAPServerUseTLSExample=Your LDAP server use TLS +LDAPServerDn=Server DN +LDAPAdminDn=Administrator DN +LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com for active directory) +LDAPPassword=Administrator password +LDAPUserDn=Users' DN +LDAPUserDnExample=Complete DN (ex: ou=users,dc=example,dc=com) +LDAPGroupDn=Groups' DN +LDAPGroupDnExample=Complete DN (ex: ou=groups,dc=example,dc=com) +LDAPServerExample=Server address (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/) +LDAPServerDnExample=Complete DN (ex: dc=example,dc=com) +LDAPDnSynchroActive=Users and groups synchronization +LDAPDnSynchroActiveExample=LDAP to Dolibarr or Dolibarr to LDAP synchronization +LDAPDnContactActive=Contacts' synchronization +LDAPDnContactActiveExample=Activated/Unactivated synchronization +LDAPDnMemberActive=Members' synchronization +LDAPDnMemberActiveExample=Activated/Unactivated synchronization +LDAPDnMemberTypeActive=Members types' synchronization +LDAPDnMemberTypeActiveExample=Activated/Unactivated synchronization +LDAPContactDn=Dolibarr contacts' DN +LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=example,dc=com) +LDAPMemberDn=Dolibarr members DN +LDAPMemberDnExample=Complete DN (ex: ou=members,dc=example,dc=com) +LDAPMemberObjectClassList=List of objectClass +LDAPMemberObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) +LDAPMemberTypeDn=Dolibarr members types DN +LDAPMemberTypepDnExample=Complete DN (ex: ou=memberstypes,dc=example,dc=com) +LDAPMemberTypeObjectClassList=List of objectClass +LDAPMemberTypeObjectClassListExample=List of objectClass defining record attributes (ex: top,groupOfUniqueNames) +LDAPUserObjectClassList=List of objectClass +LDAPUserObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) +LDAPGroupObjectClassList=List of objectClass +LDAPGroupObjectClassListExample=List of objectClass defining record attributes (ex: top,groupOfUniqueNames) +LDAPContactObjectClassList=List of objectClass +LDAPContactObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory) +LDAPTestConnect=Test LDAP connection +LDAPTestSynchroContact=Test contacts synchronization +LDAPTestSynchroUser=Test user synchronization +LDAPTestSynchroGroup=Test group synchronization +LDAPTestSynchroMember=Test member synchronization +LDAPTestSynchroMemberType=Test member type synchronization +LDAPTestSearch= Test a LDAP search +LDAPSynchroOK=Synchronization test successful +LDAPSynchroKO=Failed synchronization test +LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that the connection to the server is correctly configured and allows LDAP updates +LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s) +LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s) +LDAPBindOK=Connect/Authenticate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindKO=Connect/Authenticate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPSetupForVersion3=LDAP server configured for version 3 +LDAPSetupForVersion2=LDAP server configured for version 2 +LDAPDolibarrMapping=Dolibarr Mapping +LDAPLdapMapping=LDAP Mapping +LDAPFieldLoginUnix=Login (unix) +LDAPFieldLoginExample=Example: uid +LDAPFilterConnection=Search filter +LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) +LDAPFieldLoginSamba=Login (samba, activedirectory) +LDAPFieldLoginSambaExample=Example: samaccountname +LDAPFieldFullname=Full name +LDAPFieldFullnameExample=Example: cn +LDAPFieldPasswordNotCrypted=Password not encrypted +LDAPFieldPasswordCrypted=Password encrypted +LDAPFieldPasswordExample=Example: userPassword +LDAPFieldCommonNameExample=Example: cn +LDAPFieldName=Name +LDAPFieldNameExample=Example: sn +LDAPFieldFirstName=First name +LDAPFieldFirstNameExample=Example: givenName +LDAPFieldMail=Email address +LDAPFieldMailExample=Example: mail +LDAPFieldPhone=Professional phone number +LDAPFieldPhoneExample=Example: telephonenumber +LDAPFieldHomePhone=Personal phone number +LDAPFieldHomePhoneExample=Example: homephone +LDAPFieldMobile=Cellular phone +LDAPFieldMobileExample=Example: mobile +LDAPFieldFax=Fax number +LDAPFieldFaxExample=Example: facsimiletelephonenumber +LDAPFieldAddress=Street +LDAPFieldAddressExample=Example: street +LDAPFieldZip=Zip +LDAPFieldZipExample=Example: postalcode +LDAPFieldTown=Town +LDAPFieldTownExample=Example: l +LDAPFieldCountry=Country +LDAPFieldDescription=Description +LDAPFieldDescriptionExample=Example: description +LDAPFieldNotePublic=Public Note +LDAPFieldNotePublicExample=Example: publicnote +LDAPFieldGroupMembers= Group members +LDAPFieldGroupMembersExample= Example: uniqueMember +LDAPFieldBirthdate=Birthdate +LDAPFieldCompany=Company +LDAPFieldCompanyExample=Example: o +LDAPFieldSid=SID +LDAPFieldSidExample=Example: objectsid +LDAPFieldEndLastSubscription=Date of subscription end +LDAPFieldTitle=Job position +LDAPFieldTitleExample=Example: title +LDAPFieldGroupid=Group id +LDAPFieldGroupidExample=Exemple : gidnumber +LDAPFieldUserid=User id +LDAPFieldUseridExample=Exemple : uidnumber +LDAPFieldHomedirectory=Home directory +LDAPFieldHomedirectoryExample=Exemple : homedirectory +LDAPFieldHomedirectoryprefix=Home directory prefix +LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) +LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. +LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts. +LDAPDescUsers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr users. +LDAPDescGroups=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr groups. +LDAPDescMembers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members module. +LDAPDescMembersTypes=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members types. +LDAPDescValues=Example values are designed for <b>OpenLDAP</b> with following loaded schemas: <b>core.schema, cosine.schema, inetorgperson.schema</b>). If you use thoose values and OpenLDAP, modify your LDAP config file <b>slapd.conf</b> to have all thoose schemas loaded. +ForANonAnonymousAccess=For an authenticated access (for a write access for example) +PerfDolibarr=Performance setup/optimizing report +YouMayFindPerfAdviceHere=This page provides some checks or advice related to performance. +NotInstalled=Not installed. +NotSlowedDownByThis=Not slowed down by this. +NotRiskOfLeakWithThis=Not risk of leak with this. +ApplicativeCache=Applicative cache +MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.<br>More information here <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Note that a lot of web hosting provider does not provide such cache server. +MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. +MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is enabled. +OPCodeCache=OPCode cache +NoOPCodeCacheFound=No OPCode cache found. Maybe you are using an OPCode cache other than XCache or eAccelerator (good), or maybe you don't have OPCode cache (very bad). +HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) +FilesOfTypeCached=Files of type %s are cached by HTTP server +FilesOfTypeNotCached=Files of type %s are not cached by HTTP server +FilesOfTypeCompressed=Files of type %s are compressed by HTTP server +FilesOfTypeNotCompressed=Files of type %s are not compressed by HTTP server +CacheByServer=Cache by server +CacheByServerDesc=For example using the Apache directive "ExpiresByType image/gif A2592000" +CacheByClient=Cache by browser +CompressionOfResources=Compression of HTTP responses +CompressionOfResourcesDesc=For example using the Apache directive "AddOutputFilterByType DEFLATE" +TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers +DefaultValuesDesc=Here you may define the default value you wish to use when creating a new record, and/or default filters or the sort order when you list records. +DefaultCreateForm=Default values (to use on forms) +DefaultSearchFilters=Default search filters +DefaultSortOrder=Default sort orders +DefaultFocus=Default focus fields +DefaultMandatory=Mandatory form fields +##### Products ##### +ProductSetup=Products module setup +ServiceSetup=Services module setup +ProductServiceSetup=Products and Services modules setup +NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit) +ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup) +DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms +OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document +AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product +DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. +DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents +MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. +UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient) +SetDefaultBarcodeTypeProducts=Default barcode type to use for products +SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties +UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition +ProductCodeChecker= Module for product code generation and checking (product or service) +ProductOtherConf= Product / Service configuration +IsNotADir=is not a directory! +##### Syslog ##### +SyslogSetup=Logs module setup +SyslogOutput=Logs outputs +SyslogFacility=Facility +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=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=Number of backup logs to keep +ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency +##### Donations ##### +DonationsSetup=Donation module setup +DonationsReceiptModel=Template of donation receipt +##### Barcode ##### +BarcodeSetup=Barcode setup +PaperFormatModule=Print format module +BarcodeEncodeModule=Barcode encoding type +CodeBarGenerator=Barcode generator +ChooseABarCode=No generator defined +FormatNotSupportedByGenerator=Format not supported by this generator +BarcodeDescEAN8=Barcode of type EAN8 +BarcodeDescEAN13=Barcode of type EAN13 +BarcodeDescUPC=Barcode of type UPC +BarcodeDescISBN=Barcode of type ISBN +BarcodeDescC39=Barcode of type C39 +BarcodeDescC128=Barcode of type C128 +BarcodeDescDATAMATRIX=Barcode of type Datamatrix +BarcodeDescQRCODE=Barcode of type QR code +GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".<br>For example: /usr/local/bin/genbarcode +BarcodeInternalEngine=Internal engine +BarCodeNumberManager=Manager to auto define barcode numbers +##### Prelevements ##### +WithdrawalsSetup=Setup of module Direct Debit payments +##### ExternalRSS ##### +ExternalRSSSetup=External RSS imports setup +NewRSS=New RSS Feed +RSSUrl=RSS URL +RSSUrlExample=An interesting RSS feed +##### Mailing ##### +MailingSetup=EMailing module setup +MailingEMailFrom=Sender email (From) for emails sent by emailing module +MailingEMailError=Return Email (Errors-to) for emails with errors +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 +##### Sendings ##### +SendingsSetup=Shipping module setup +SendingsReceiptModel=Sending receipt model +SendingsNumberingModules=Sendings numbering modules +SendingsAbility=Support shipping sheets for customer deliveries +NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that are received and signed by customer. Hence the product deliveries receipt is a duplicated feature and is rarely activated. +FreeLegalTextOnShippings=Free text on shipments +##### Deliveries ##### +DeliveryOrderNumberingModules=Products deliveries receipt numbering module +DeliveryOrderModel=Products deliveries receipt model +DeliveriesOrderAbility=Support products deliveries receipts +FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts +##### FCKeditor ##### +AdvancedEditor=Advanced editor +ActivateFCKeditor=Activate advanced editor for: +FCKeditorForCompany=WYSIWIG creation/edition of elements description and note (except products/services) +FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note +FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <span class="warning">Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.</span> +FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing) +FCKeditorForUserSignature=WYSIWIG creation/edition of user signature +FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) +FCKeditorForTicket=WYSIWIG creation/edition for tickets +##### Stock ##### +StockSetup=Stock module setup +IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. +##### Menu ##### +MenuDeleted=Menu deleted +Menu=Menu +Menus=Menus +TreeMenuPersonalized=Personalized menus +NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry +NewMenu=New menu +MenuHandler=Menu handler +MenuModule=Source module +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) +DetailId=Id menu +DetailMenuHandler=Menu handler where to show new menu +DetailMenuModule=Module name if menu entry come from a module +DetailType=Type of menu (top or left) +DetailTitre=Menu label or label code for translation +DetailUrl=URL where menu send you (Absolute URL link or external link with http://) +DetailEnabled=Condition to show or not entry +DetailRight=Condition to display unauthorized grey menus +DetailLangs=Lang file name for label code translation +DetailUser=Intern / Extern / All +Target=Target +DetailTarget=Target for links (_blank top opens a new window) +DetailLevel=Level (-1:top menu, 0:header menu, >0 menu and sub menu) +ModifMenu=Menu change +DeleteMenu=Delete menu entry +ConfirmDeleteMenu=Are you sure you want to delete menu entry <b>%s</b>? +FailedToInitializeMenu=Failed to initialize menu +##### Tax ##### +TaxSetup=Taxes, social or fiscal taxes and dividends module setup +OptionVatMode=VAT due +OptionVATDefault=Standard basis +OptionVATDebitOption=Accrual basis +OptionVatDefaultDesc=VAT is due:<br>- on delivery of goods (based on invoice date)<br>- on payments for services +OptionVatDebitOptionDesc=VAT is due:<br>- on delivery of goods (based on invoice date)<br>- on invoice (debit) for services +OptionPaymentForProductAndServices=Cash basis for products and services +OptionPaymentForProductAndServicesDesc=VAT is due:<br>- on payment for goods<br>- on payments for services +SummaryOfVatExigibilityUsedByDefault=Time of VAT eligibility by default according to chosen option: +OnDelivery=On delivery +OnPayment=On payment +OnInvoice=On invoice +SupposedToBePaymentDate=Payment date used +SupposedToBeInvoiceDate=Invoice date used +Buy=Buy +Sell=Sell +InvoiceDateUsed=Invoice date used +YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Organization), so there is no VAT options to setup. +AccountancyCode=Accounting Code +AccountancyCodeSell=Sale account. code +AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax +##### Agenda ##### +AgendaSetup=Events and agenda module setup +PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key +PastDelayVCalExport=Do not export event older than +AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) +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 view do you want to open by default when selecting menu Agenda +AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). +AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification +AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event). +AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment. +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<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> that will be replaced with clicktodial password (defined on user card). +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 +CashDeskSetup=Point of Sales module setup +CashDeskThirdPartyForSell=Default generic third party to use for sales +CashDeskBankAccountForSell=Default account to use to receive cash payments +CashDeskBankAccountForCheque=Default account to use to receive payments by check +CashDeskBankAccountForCB=Default account to use to receive payments by credit cards +CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp +CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock). +CashDeskIdWareHouse=Force and restrict warehouse to use for stock decrease +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=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) +##### Bookmark ##### +BookmarkSetup=Bookmark module setup +BookmarkDesc=This module allows you to manage bookmarks. You can also add shortcuts to any Dolibarr pages or external web sites on your left menu. +NbOfBoomarkToShow=Maximum number of bookmarks to show in left menu +##### WebServices ##### +WebServicesSetup=Webservices module setup +WebServicesDesc=By enabling this module, Dolibarr become a web service server to provide miscellaneous web services. +WSDLCanBeDownloadedHere=WSDL descriptor files of provided services can be download here +EndPointIs=SOAP clients must send their requests to the Dolibarr endpoint available at URL +##### API #### +ApiSetup=API module setup +ApiDesc=By enabling this module, Dolibarr become a REST server to provide miscellaneous web services. +ApiProductionMode=Enable production mode (this will activate use of a cache for services management) +ApiExporerIs=You can explore and test the APIs at URL +OnlyActiveElementsAreExposed=Only elements from enabled modules are exposed +ApiKey=Key for API +WarningAPIExplorerDisabled=The API explorer has been disabled. API explorer is not required to provide API services. It is a tool for developer to find/test REST APIs. If you need this tool, go into setup of module API REST to activate it. +##### Bank ##### +BankSetupModule=Bank module setup +FreeLegalTextOnChequeReceipts=Free text on check receipts +BankOrderShow=Display order of bank accounts for countries using "detailed bank number" +BankOrderGlobal=General +BankOrderGlobalDesc=General display order +BankOrderES=Spanish +BankOrderESDesc=Spanish display order +ChequeReceiptsNumberingModule=Check Receipts Numbering Module +##### Multicompany ##### +MultiCompanySetup=Multi-company module setup +##### Suppliers ##### +SuppliersSetup=Vendor module setup +SuppliersCommandModel=Complete template of Purchase Order +SuppliersCommandModelMuscadet=Complete template of Purchase Order (old implementation of cornas template) +SuppliersInvoiceModel=Complete template of Vendor Invoice +SuppliersInvoiceNumberingModel=Vendor invoices numbering models +IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval +##### GeoIPMaxmind ##### +GeoIPMaxmindSetup=GeoIP Maxmind module setup +PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.<br>Examples:<br>/usr/local/share/GeoIP/GeoIP.dat<br>/usr/share/GeoIP/GeoIP.dat<br>/usr/share/GeoIP/GeoLite2-Country.mmdb +NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions). +YouCanDownloadFreeDatFileTo=You can download a <b>free demo version</b> of the Maxmind GeoIP country file at %s. +YouCanDownloadAdvancedDatFileTo=You can also download a more <b>complete version, with updates,</b> of the Maxmind GeoIP country file at %s. +TestGeoIPResult=Test of a conversion IP -> country +##### Projects ##### +ProjectsNumberingModules=Projects numbering module +ProjectsSetup=Project module setup +ProjectsModelModule=Project reports document model +TasksNumberingModules=Tasks numbering module +TaskModelModule=Tasks reports document model +UseSearchToSelectProject=Wait until a key is pressed before loading content of Project combo list.<br>This may improve performance if you have a large number of projects, but it is less convenient. +##### ECM (GED) ##### +##### Fiscal Year ##### +AccountingPeriods=Accounting periods +AccountingPeriodCard=Accounting period +NewFiscalYear=New accounting period +OpenFiscalYear=Open accounting period +CloseFiscalYear=Close accounting period +DeleteFiscalYear=Delete accounting period +ConfirmDeleteFiscalYear=Are you sure to delete this accounting period? +ShowFiscalYear=Show accounting period +AlwaysEditable=Can always be edited +MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application) +NbMajMin=Minimum number of uppercase characters +NbNumMin=Minimum number of numeric characters +NbSpeMin=Minimum number of special characters +NbIteConsecutive=Maximum number of repeating same characters +NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation +SalariesSetup=Setup of module salaries +SortOrder=Sort order +Format=Format +TypePaymentDesc=0:Customer payment type, 1:Vendor payment type, 2:Both customers and suppliers payment type +IncludePath=Include path (defined into variable %s) +ExpenseReportsSetup=Setup of module Expense Reports +TemplatePDFExpenseReports=Document templates to generate expense report document +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. +YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for email notifications by enabling and configuring the module "Notification". +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 +GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users +GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses +Threshold=Threshold +BackupDumpWizard=Wizard to build the database dump file +BackupZipWizard=Wizard to build the archive of documents directory +SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: +SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform. +InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature. +ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to add the 2 directive lines:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong> +HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over +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) +TextTitleColor=Text color of Page title +LinkColor=Color of links +PressF5AfterChangingThis=Press CTRL+F5 on keyboard or clear your browser cache after changing this value to have it effective +NotSupportedByAllThemes=Will works with core themes, may not be supported by external themes +BackgroundColor=Background color +TopMenuBackgroundColor=Background color for Top menu +TopMenuDisableImages=Hide images in Top menu +LeftMenuBackgroundColor=Background color for Left menu +BackgroundTableTitleColor=Background color for Table title line +BackgroundTableTitleTextColor=Text color for Table title line +BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableLineOddColor=Background color for odd table lines +BackgroundTableLineEvenColor=Background color for even table lines +MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) +NbAddedAutomatically=Number of days added to counters of users (automatically) each month +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. +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. +UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card. +OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100). +TemplateForElement=This template record is dedicated to which element +TypeOfTemplate=Type of template +TemplateIsVisibleByOwnerOnly=Template is visible to owner only +VisibleEverywhere=Visible everywhere +VisibleNowhere=Visible nowhere +FixTZ=TimeZone fix +FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) +ExpectedChecksum=Expected Checksum +CurrentChecksum=Current Checksum +ExpectedSize=Expected size +CurrentSize=Current size +ForcedConstants=Required constant values +MailToSendProposal=Customer proposals +MailToSendOrder=Sales orders +MailToSendInvoice=Customer invoices +MailToSendShipment=Shipments +MailToSendIntervention=Interventions +MailToSendSupplierRequestForQuotation=Quotation request +MailToSendSupplierOrder=Purchase orders +MailToSendSupplierInvoice=Vendor invoices +MailToSendContract=Contracts +MailToSendReception=Receptions +MailToThirdparty=Third parties +MailToMember=Members +MailToUser=Users +MailToProject=Projects +MailToTicket=Tickets +ByDefaultInList=Show by default on list view +YouUseLastStableVersion=You use the latest stable version +TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites) +TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) +ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes. +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 <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> 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) +AllPublishers=All publishers +UnknownPublishers=Unknown publishers +AddRemoveTabs=Add or remove tabs +AddDataTables=Add object tables +AddDictionaries=Add dictionaries tables +AddData=Add objects or dictionaries data +AddBoxes=Add widgets +AddSheduledJobs=Add scheduled jobs +AddHooks=Add hooks +AddTriggers=Add triggers +AddMenus=Add menus +AddPermissions=Add permissions +AddExportProfiles=Add export profiles +AddImportProfiles=Add import profiles +AddOtherPagesOrServices=Add other pages or services +AddModels=Add document or numbering templates +AddSubstitutions=Add keys substitutions +DetectionNotPossible=Detection not possible +UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved in database user table and must be provided on each API call) +ListOfAvailableAPIs=List of available APIs +activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%1$s" may not work correctly. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise +CommandIsNotInsideAllowedCommands=The command you are trying to run is not in the list of allowed commands defined in parameter <strong>$dolibarr_main_restrict_os_commands</strong> in the <strong>conf.php</strong> file. +LandingPage=Landing page +SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments +ModuleEnabledAdminMustCheckRights=Module has been activated. Permissions for activated module(s) were given to admin users only. You may need to grant permissions to other users or groups manually if necessary. +UserHasNoPermissions=This user has no permissions defined +TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "%s")<br>Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "%s" in days)<br>Use "Current/Next" to have payment term date being the first Nth of the month after delta (delta is field "%s", N is stored into field "%s") +BaseCurrency=Reference currency of the company (go into setup of company to change this) +WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016). +WarningNoteModulePOSForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated. +WarningInstallationMayBecomeNotCompliantWithLaw=You are trying to install module %s that is an external module. Activating an external module means you trust the publisher of that module and that you are sure that this module does not adversely impact the behavior of your application, and is compliant with laws of your country (%s). If the module introduces an illegal feature, you become responsible for the use of illegal software. +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.<br>For example:<br>CODEGRP1+CODEGRP2 +SeveralLangugeVariatFound=Several language variants found +RemoveSpecialChars=Remove special characters +COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) +COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX) +COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact) +GDPRContactDesc=If you store data about European companies/citizens, you can name the contact who is responsible for the General Data Protection Regulation here +HelpOnTooltip=Help text to show on tooltip +HelpOnTooltipDesc=Put text or a translation key here for the text to show in a tooltip when this field appears in a form +YouCanDeleteFileOnServerWith=You can delete this file on the server with Command Line:<br>%s +ChartLoaded=Chart of account loaded +SocialNetworkSetup=Setup of module Social Networks +EnableFeatureFor=Enable features for <strong>%s</strong> +VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. +SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +EmailCollector=Email collector +EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). +NewEmailCollector=New Email Collector +EMailHost=Host of email IMAP server +MailboxSourceDirectory=Mailbox source directory +MailboxTargetDirectory=Mailbox target directory +EmailcollectorOperations=Operations to do by collector +EmailcollectorOperationsDesc=Operations are executed from top to bottom order +MaxEmailCollectPerCollect=Max number of emails collected per collect +CollectNow=Collect now +ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success +LastResult=Latest result +EmailCollectorConfirmCollectTitle=Email collect confirmation +EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? +NoNewEmailToProcess=No new email (matching filters) to process +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 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=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 job application +FormatZip=Zip +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:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Use a ; char as separator to extract or set several properties. +OpeningHours=Opening hours +OpeningHoursDesc=Enter here the regular opening hours of your company. +ResourceSetup=Configuration of Resource module +UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). +DisabledResourceLinkUser=Disable feature to link a resource to users +DisabledResourceLinkContact=Disable feature to link a resource to contacts +EnableResourceUsedInEventCheck=Enable feature to check if a resource is in use in an event +ConfirmUnactivation=Confirm module reset +OnMobileOnly=On small screen (smartphone) only +DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) +MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or 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 +ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' +DefaultCustomerType=Default thirdparty type for "New customer" creation form +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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) +IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. +AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode +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 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. +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. +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_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label +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. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Event reminder email +SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security +DictionaryProductNature= Nature of product +CountryIfSpecificToOneCountry=Country (if specific to a given country) +YouMayFindSecurityAdviceHere=You may find security advisory here +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. +ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. +CombinationsSeparator=Separator character for product combinations +SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples +SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. +AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ar_IQ/agenda.lang b/htdocs/langs/ar_IQ/agenda.lang new file mode 100644 index 00000000000..ca614595a65 --- /dev/null +++ b/htdocs/langs/ar_IQ/agenda.lang @@ -0,0 +1,170 @@ +# Dolibarr language file - Source file is en_US - agenda +IdAgenda=ID event +Actions=Events +Agenda=Agenda +TMenuAgenda=Agenda +Agendas=Agendas +LocalAgenda=Default calendar +ActionsOwnedBy=Event owned by +ActionsOwnedByShort=Owner +AffectedTo=Assigned to +Event=Event +Events=Events +EventsNb=Number of events +ListOfActions=List of events +EventReports=Event reports +Location=Location +ToUserOfGroup=Event assigned to any user in the group +EventOnFullDay=Event on all day(s) +MenuToDoActions=All incomplete events +MenuDoneActions=All terminated events +MenuToDoMyActions=My incomplete events +MenuDoneMyActions=My terminated events +ListOfEvents=List of events (default calendar) +ActionsAskedBy=Events reported by +ActionsToDoBy=Events assigned to +ActionsDoneBy=Events done by +ActionAssignedTo=Event assigned to +ViewCal=Month view +ViewDay=Day view +ViewWeek=Week view +ViewPerUser=Per user view +ViewPerType=Per type view +AutoActions= Automatic filling +AgendaAutoActionDesc= Here you may define events which you want Dolibarr to create automatically in Agenda. If nothing is checked, only manual actions will be included in logs and displayed in Agenda. Automatic tracking of business actions done on objects (validation, status change) will not be saved. +AgendaSetupOtherDesc= This page provides options to allow the export of your Dolibarr events into an external calendar (Thunderbird, Google Calendar etc...) +AgendaExtSitesDesc=This page allows to declare external sources of calendars to see their events into Dolibarr agenda. +ActionsEvents=Events for which Dolibarr will create an action in agenda automatically +EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup. +##### Agenda event labels ##### +NewCompanyToDolibarr=Third party %s created +COMPANY_DELETEInDolibarr=Third party %s deleted +ContractValidatedInDolibarr=Contract %s validated +CONTRACT_DELETEInDolibarr=Contract %s deleted +PropalClosedSignedInDolibarr=Proposal %s signed +PropalClosedRefusedInDolibarr=Proposal %s refused +PropalValidatedInDolibarr=Proposal %s validated +PropalClassifiedBilledInDolibarr=Proposal %s classified billed +InvoiceValidatedInDolibarr=Invoice %s validated +InvoiceValidatedInDolibarrFromPos=Invoice %s validated from POS +InvoiceBackToDraftInDolibarr=Invoice %s go back to draft status +InvoiceDeleteDolibarr=Invoice %s deleted +InvoicePaidInDolibarr=Invoice %s changed to paid +InvoiceCanceledInDolibarr=Invoice %s canceled +MemberValidatedInDolibarr=Member %s validated +MemberModifiedInDolibarr=Member %s modified +MemberResiliatedInDolibarr=Member %s terminated +MemberDeletedInDolibarr=Member %s deleted +MemberSubscriptionAddedInDolibarr=Subscription %s for member %s added +MemberSubscriptionModifiedInDolibarr=Subscription %s for member %s modified +MemberSubscriptionDeletedInDolibarr=Subscription %s for member %s deleted +ShipmentValidatedInDolibarr=Shipment %s validated +ShipmentClassifyClosedInDolibarr=Shipment %s classified billed +ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified re-open +ShipmentBackToDraftInDolibarr=Shipment %s go back to draft status +ShipmentDeletedInDolibarr=Shipment %s deleted +ReceptionValidatedInDolibarr=Reception %s validated +OrderCreatedInDolibarr=Order %s created +OrderValidatedInDolibarr=Order %s validated +OrderDeliveredInDolibarr=Order %s classified delivered +OrderCanceledInDolibarr=Order %s canceled +OrderBilledInDolibarr=Order %s classified billed +OrderApprovedInDolibarr=Order %s approved +OrderRefusedInDolibarr=Order %s refused +OrderBackToDraftInDolibarr=Order %s go back to draft status +ProposalSentByEMail=Commercial proposal %s sent by email +ContractSentByEMail=Contract %s sent by email +OrderSentByEMail=Sales order %s sent by email +InvoiceSentByEMail=Customer invoice %s sent by email +SupplierOrderSentByEMail=Purchase order %s sent by email +ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted +SupplierInvoiceSentByEMail=Vendor invoice %s sent by email +ShippingSentByEMail=Shipment %s sent by email +ShippingValidated= Shipment %s validated +InterventionSentByEMail=Intervention %s sent by email +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 +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 +EXPENSE_REPORT_CREATEInDolibarr=Expense report %s created +EXPENSE_REPORT_VALIDATEInDolibarr=Expense report %s validated +EXPENSE_REPORT_APPROVEInDolibarr=Expense report %s approved +EXPENSE_REPORT_DELETEInDolibarr=Expense report %s deleted +EXPENSE_REPORT_REFUSEDInDolibarr=Expense report %s refused +PROJECT_CREATEInDolibarr=Project %s created +PROJECT_MODIFYInDolibarr=Project %s modified +PROJECT_DELETEInDolibarr=Project %s deleted +TICKET_CREATEInDolibarr=Ticket %s created +TICKET_MODIFYInDolibarr=Ticket %s modified +TICKET_ASSIGNEDInDolibarr=Ticket %s assigned +TICKET_CLOSEInDolibarr=Ticket %s closed +TICKET_DELETEInDolibarr=Ticket %s deleted +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 +PAIDInDolibarr=%s paid +##### End agenda events ##### +AgendaModelModule=Document templates for event +DateActionStart=Start date +DateActionEnd=End date +AgendaUrlOptions1=You can also add following parameters to filter output: +AgendaUrlOptions3=<b>logina=%s</b> to restrict output to actions owned by a user <b>%s</b>. +AgendaUrlOptionsNotAdmin=<b>logina=!%s</b> to restrict output to actions not owned by user <b>%s</b>. +AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b> (owner and others). +AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>. +AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events. +AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays. +AgendaShowBirthdayEvents=Birthdays of contacts +AgendaHideBirthdayEvents=Hide birthdays of contacts +Busy=Busy +ExportDataset_event1=List of agenda events +DefaultWorkingDays=Default working days range in week (Example: 1-5, 1-6) +DefaultWorkingHours=Default working hours in day (Example: 9-18) +# External Sites ical +ExportCal=Export calendar +ExtSites=Import external calendars +ExtSitesEnableThisTool=Show external calendars (defined in global setup) in Agenda. Does not affect external calendars defined by users. +ExtSitesNbOfAgenda=Number of calendars +AgendaExtNb=Calendar no. %s +ExtSiteUrlAgenda=URL to access .ical file +ExtSiteNoLabel=No Description +VisibleTimeRange=Visible time range +VisibleDaysRange=Visible days range +AddEvent=Create event +MyAvailability=My availability +ActionType=Event type +DateActionBegin=Start event date +ConfirmCloneEvent=Are you sure you want to clone the event <b>%s</b>? +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 Popup Notification diff --git a/htdocs/langs/ar_IQ/assets.lang b/htdocs/langs/ar_IQ/assets.lang new file mode 100644 index 00000000000..afafc98503f --- /dev/null +++ b/htdocs/langs/ar_IQ/assets.lang @@ -0,0 +1,67 @@ +# Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# 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/>. + +# +# 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 +DeleteType=Delete +DeleteAnAssetType=Delete an asset type +ConfirmDeleteAssetType=Are you sure you want to delete this asset type? +ShowTypeCard=Show type '%s' + +# Module label 'ModuleAssetsName' +ModuleAssetsName = Assets +# Module description 'ModuleAssetsDesc' +ModuleAssetsDesc = Assets description + +# +# 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 + +# +# Menu +# +MenuAssets = Assets +MenuNewAsset = New asset +MenuTypeAssets = Type assets +MenuListAssets = List +MenuNewTypeAssets = New +MenuListTypeAssets = List + +# +# Module +# +Asset=Asset +NewAssetType=New asset type +NewAsset=New asset +ConfirmDeleteAsset=Are you sure you want to delete this asset ? diff --git a/htdocs/langs/ar_IQ/banks.lang b/htdocs/langs/ar_IQ/banks.lang new file mode 100644 index 00000000000..8e2d828c12a --- /dev/null +++ b/htdocs/langs/ar_IQ/banks.lang @@ -0,0 +1,184 @@ +# Dolibarr language file - Source file is en_US - banks +Bank=Bank +MenuBankCash=Banks | Cash +MenuVariousPayment=Miscellaneous payments +MenuNewVariousPayment=New Miscellaneous payment +BankName=Bank name +FinancialAccount=Account +BankAccount=Bank account +BankAccounts=Bank accounts +BankAccountsAndGateways=Bank accounts | Gateways +ShowAccount=Show Account +AccountRef=Financial account ref +AccountLabel=Financial account label +CashAccount=Cash account +CashAccounts=Cash accounts +CurrentAccounts=Current accounts +SavingAccounts=Savings accounts +ErrorBankLabelAlreadyExists=Financial account label already exists +BankBalance=Balance +BankBalanceBefore=Balance before +BankBalanceAfter=Balance after +BalanceMinimalAllowed=Minimum allowed balance +BalanceMinimalDesired=Minimum desired balance +InitialBankBalance=Initial balance +EndBankBalance=End balance +CurrentBalance=Current balance +FutureBalance=Future balance +ShowAllTimeBalance=Show balance from start +AllTime=From start +Reconciliation=Reconciliation +RIB=Bank Account Number +IBAN=IBAN number +BIC=BIC/SWIFT code +SwiftValid=BIC/SWIFT valid +SwiftVNotalid=BIC/SWIFT not valid +IbanValid=BAN valid +IbanNotValid=BAN not valid +StandingOrders=Direct debit orders +StandingOrder=Direct debit order +PaymentByDirectDebit=Payment by direct debit +PaymentByBankTransfers=Payments by credit transfer +PaymentByBankTransfer=Payment by credit transfer +AccountStatement=Account statement +AccountStatementShort=Statement +AccountStatements=Account statements +LastAccountStatements=Last account statements +IOMonthlyReporting=Monthly reporting +BankAccountDomiciliation=Bank address +BankAccountCountry=Account country +BankAccountOwner=Account owner name +BankAccountOwnerAddress=Account owner address +RIBControlError=Integrity check of values failed. This means the information for this account number is not complete or is incorrect (check country, numbers and IBAN). +CreateAccount=Create account +NewBankAccount=New account +NewFinancialAccount=New financial account +MenuNewFinancialAccount=New financial account +EditFinancialAccount=Edit account +LabelBankCashAccount=Bank or cash label +AccountType=Account type +BankType0=Savings account +BankType1=Current or credit card account +BankType2=Cash account +AccountsArea=Accounts area +AccountCard=Account card +DeleteAccount=Delete account +ConfirmDeleteAccount=Are you sure you want to delete this account? +Account=Account +BankTransactionByCategories=Bank entries by categories +BankTransactionForCategory=Bank entries for category <b>%s</b> +RemoveFromRubrique=Remove link with category +RemoveFromRubriqueConfirm=Are you sure you want to remove link between the entry and the category? +ListBankTransactions=List of bank entries +IdTransaction=Transaction ID +BankTransactions=Bank entries +BankTransaction=Bank entry +ListTransactions=List entries +ListTransactionsByCategory=List entries/category +TransactionsToConciliate=Entries to reconcile +TransactionsToConciliateShort=To reconcile +Conciliable=Can be reconciled +Conciliate=Reconcile +Conciliation=Reconciliation +SaveStatementOnly=Save statement only +ReconciliationLate=Reconciliation late +IncludeClosedAccount=Include closed accounts +OnlyOpenedAccount=Only open accounts +AccountToCredit=Account to credit +AccountToDebit=Account to debit +DisableConciliation=Disable reconciliation feature for this account +ConciliationDisabled=Reconciliation feature disabled +LinkedToAConciliatedTransaction=Linked to a conciliated entry +StatusAccountOpened=Open +StatusAccountClosed=Closed +AccountIdShort=Number +LineRecord=Transaction +AddBankRecord=Add entry +AddBankRecordLong=Add entry manually +Conciliated=Reconciled +ConciliatedBy=Reconciled by +DateConciliating=Reconcile date +BankLineConciliated=Entry reconciled with bank receipt +Reconciled=Reconciled +NotReconciled=Not reconciled +CustomerInvoicePayment=Customer payment +SupplierInvoicePayment=Vendor payment +SubscriptionPayment=Subscription payment +WithdrawalPayment=Debit payment order +SocialContributionPayment=Social/fiscal tax payment +BankTransfer=Credit transfer +BankTransfers=Credit transfers +MenuBankInternalTransfer=Internal transfer +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=From +TransferTo=To +TransferFromToDone=A transfer from <b>%s</b> to <b>%s</b> of <b>%s</b> %s has been recorded. +CheckTransmitter=Transmitter +ValidateCheckReceipt=Validate this check receipt? +ConfirmValidateCheckReceipt=Are you sure you want to validate this check receipt, no change will be possible once this is done? +DeleteCheckReceipt=Delete this check receipt? +ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt? +BankChecks=Bank checks +BankChecksToReceipt=Checks awaiting deposit +BankChecksToReceiptShort=Checks awaiting deposit +ShowCheckReceipt=Show check deposit receipt +NumberOfCheques=No. of check +DeleteTransaction=Delete entry +ConfirmDeleteTransaction=Are you sure you want to delete this entry? +ThisWillAlsoDeleteBankRecord=This will also delete generated bank entry +BankMovements=Movements +PlannedTransactions=Planned entries +Graph=Graphics +ExportDataset_banque_1=Bank entries and account statement +ExportDataset_banque_2=Deposit slip +TransactionOnTheOtherAccount=Transaction on the other account +PaymentNumberUpdateSucceeded=Payment number updated successfully +PaymentNumberUpdateFailed=Payment number could not be updated +PaymentDateUpdateSucceeded=Payment date updated successfully +PaymentDateUpdateFailed=Payment date could not be updated +Transactions=Transactions +BankTransactionLine=Bank entry +AllAccounts=All bank and cash accounts +BackToAccount=Back to account +ShowAllAccounts=Show for all accounts +FutureTransaction=Future transaction. Unable to reconcile. +SelectChequeTransactionAndGenerate=Select/filter checks to include in the check deposit receipt and click on "Create". +InputReceiptNumber=Choose the bank statement related with the conciliation. Use a sortable numeric value: YYYYMM or YYYYMMDD +EventualyAddCategory=Eventually, specify a category in which to classify the records +ToConciliate=To reconcile? +ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click +DefaultRIB=Default BAN +AllRIB=All BAN +LabelRIB=BAN Label +NoBANRecord=No BAN record +DeleteARib=Delete BAN record +ConfirmDeleteRib=Are you sure you want to delete this BAN record? +RejectCheck=Check returned +ConfirmRejectCheck=Are you sure you want to mark this check as rejected? +RejectCheckDate=Date the check was returned +CheckRejected=Check returned +CheckRejectedAndInvoicesReopened=Check returned and invoices re-open +BankAccountModelModule=Document templates for bank accounts +DocumentModelSepaMandate=Template of SEPA mandate. Useful for European countries in EEC only. +DocumentModelBan=Template to print a page with BAN information. +NewVariousPayment=New miscellaneous payment +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 +AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation +CashControl=POS cash desk control +NewCashFence=New cash desk opening or closing +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 +IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ar_IQ/bills.lang b/htdocs/langs/ar_IQ/bills.lang new file mode 100644 index 00000000000..c0eb886a987 --- /dev/null +++ b/htdocs/langs/ar_IQ/bills.lang @@ -0,0 +1,591 @@ +# Dolibarr language file - Source file is en_US - bills +Bill=Invoice +Bills=Invoices +BillsCustomers=Customer invoices +BillsCustomer=Customer invoice +BillsSuppliers=Vendor invoices +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 +InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. +InvoiceProForma=Proforma invoice +InvoiceProFormaAsk=Proforma invoice +InvoiceProFormaDesc=<b>Proforma invoice</b> is an image of a true invoice but has no accountancy value. +InvoiceReplacement=Replacement invoice +InvoiceReplacementAsk=Replacement invoice for invoice +InvoiceReplacementDesc=<b>Replacement invoice</b> is used to completely replace an invoice with no payment already received.<br><br>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 <b>credit note</b> 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 +Invoice=Invoice +PdfInvoiceTitle=Invoice +Invoices=Invoices +InvoiceLine=Invoice line +InvoiceCustomer=Customer invoice +CustomerInvoice=Customer invoice +CustomersInvoices=Customer invoices +SupplierInvoice=Vendor invoice +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines +SupplierBill=Vendor invoice +SupplierBills=Vendor 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? +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 +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 +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account +PaymentTypeDC=Debit/Credit Card +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 +PaymentAmount=Payment amount +PaymentHigherThanReminderToPay=Payment higher than reminder to pay +HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <br> 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. <br> 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=Draft (needs to be validated) +BillStatusPaid=Paid +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) +BillShortStatusDraft=Draft +BillShortStatusPaid=Paid +BillShortStatusPaidBackOrConverted=Refunded or converted +Refunded=Refunded +BillShortStatusConverted=Paid +BillShortStatusCanceled=Abandoned +BillShortStatusValidated=Validated +BillShortStatusStarted=Started +BillShortStatusNotPaid=Not paid +BillShortStatusNotRefunded=Not refunded +BillShortStatusClosedUnpaid=Closed +BillShortStatusClosedPaidPartially=Paid (partially) +PaymentStatusToValidShort=To validate +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=Invoice %s does not exist +ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. +ErrorDiscountAlreadyUsed=Error, discount already used +ErrorInvoiceAvoirMustBeNegative=Error, correct invoice must have a negative amount +ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) +ErrorCantCancelIfReplacementInvoiceNotValidated=Error, can't cancel an invoice that has been replaced by another invoice that is still in draft status +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. +BillFrom=From +BillTo=To +ActionsOnBill=Actions on invoice +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=New invoice +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 <b>%s</b>? +ConfirmUnvalidateBill=Are you sure you want to change invoice <b>%s</b> to draft status? +ConfirmClassifyPaidBill=Are you sure you want to change invoice <b>%s</b> to status paid? +ConfirmCancelBill=Are you sure you want to cancel invoice <b>%s</b>? +ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'? +ConfirmClassifyPaidPartially=Are you sure you want to change invoice <b>%s</b> to status paid? +ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? +ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I regularize the VAT with a credit note. +ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. +ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I accept to lose the VAT on this discount. +ConfirmClassifyPaidPartiallyReasonDiscountVat=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. +ConfirmClassifyPaidPartiallyReasonBadCustomer=Bad customer +ConfirmClassifyPaidPartiallyReasonProductReturned=Products partially returned +ConfirmClassifyPaidPartiallyReasonOther=Amount abandoned for other reason +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction») +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct notes. +ConfirmClassifyPaidPartiallyReasonAvoirDesc=Use this choice if all other does not suit +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A <b>bad customer</b> is a customer that refuses to pay his debt. +ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=This choice is used when payment is not complete because some of products were returned +ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:<br>- payment not complete because some products were shipped back<br>- amount claimed too important because a discount was forgotten<br>In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. +ConfirmClassifyAbandonReasonOther=Other +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 <b>%s</b> %s? +ConfirmSupplierPayment=Do you confirm this payment input for <b>%s</b> %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) +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 +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 +Rest=Pending +AmountExpected=Amount claimed +ExcessReceived=Excess received +ExcessPaid=Excess paid +EscompteOffered=Discount offered (payment before term) +EscompteOfferedShort=Discount +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 +Billed=Billed +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 +RelativeDiscount=Relative discount +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=Reason +DiscountOfferedBy=Granted by +DiscountStillRemaining=Discounts or credits available +DiscountAlreadyCounted=Discounts or credits already consumed +CustomerDiscounts=Customer discounts +SupplierDiscounts=Vendors discounts +BillAddress=Bill address +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 <b>%s</b>? +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 <b>%s</b> %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 +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 +toolTipFrequency=Examples:<br><b>Set 7, Day</b>: give a new invoice every 7 days<br><b>Set 3, Month</b>: give a new invoice every 3 month +NextDateToExecution=Date for next invoice generation +NextDateToExecutionShort=Date next gen. +DateLastGeneration=Date of latest generation +DateLastGenerationShort=Date latest gen. +MaxPeriodNumber=Max. number of invoice generation +NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done +NbOfGenerationDoneShort=Number of generation done +MaxGenerationReached=Maximum number of generations reached +InvoiceAutoValidate=Validate invoices automatically +GeneratedFromRecurringInvoice=Generated from template recurring invoice %s +DateIsNotEnough=Date not reached yet +InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s +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 +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=Order +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' +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin +# PaymentType +PaymentTypeVIR=Bank transfer +PaymentTypeShortVIR=Bank transfer +PaymentTypePRE=Direct debit payment order +PaymentTypeShortPRE=Debit payment order +PaymentTypeLIQ=Cash +PaymentTypeShortLIQ=Cash +PaymentTypeCB=Credit card +PaymentTypeShortCB=Credit card +PaymentTypeCHQ=Check +PaymentTypeShortCHQ=Check +PaymentTypeTIP=TIP (Documents against Payment) +PaymentTypeShortTIP=TIP Payment +PaymentTypeVAD=Online payment +PaymentTypeShortVAD=Online payment +PaymentTypeTRA=Bank draft +PaymentTypeShortTRA=Draft +PaymentTypeFAC=Factor +PaymentTypeShortFAC=Factor +BankDetails=Bank details +BankCode=Bank code +DeskCode=Branch code +BankAccountNumber=Account number +BankAccountNumberKey=Checksum +Residence=Address +IBANNumber=IBAN account number +IBAN=IBAN +CustomerIBAN=IBAN of customer +SupplierIBAN=IBAN of vendor +BIC=BIC/SWIFT +BICNumber=BIC/SWIFT code +ExtraInfos=Extra infos +RegulatedOn=Regulated on +ChequeNumber=Check N° +ChequeOrTransferNumber=Check/Transfer N° +ChequeBordereau=Check schedule +ChequeMaker=Check/Transfer transmitter +ChequeBank=Bank of Check +CheckBank=Check +NetToBePaid=Net to be paid +PhoneNumber=Tel +FullPhoneNumber=Telephone +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 +UseLine=Apply +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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 +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) +PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template +PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +EarlyClosingReason=Early closing reason +EarlyClosingComment=Early closing note +##### Types de contacts ##### +TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice +TypeContact_facture_external_BILLING=Customer invoice contact +TypeContact_facture_external_SHIPPING=Customer shipping contact +TypeContact_facture_external_SERVICE=Customer service contact +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_SERVICE=Vendor service contact +# Situation invoices +InvoiceFirstSituationAsk=First situation invoice +InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. +InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice +InvoiceSituationAsk=Invoice following the situation +InvoiceSituationDesc=Create a new situation following an already existing one +SituationAmount=Situation invoice amount(net) +SituationDeduction=Situation subtraction +ModifyAllLines=Modify all lines +CreateNextSituationInvoice=Create next situation +ErrorFindNextSituationInvoice=Error unable to find next situation cycle ref +ErrorOutingSituationInvoiceOnUpdate=Unable to outing this situation invoice. +ErrorOutingSituationInvoiceCreditNote=Unable to outing linked credit note. +NotLastInCycle=This invoice is not the latest in cycle and must not be modified. +DisabledBecauseNotLastInCycle=The next situation already exists. +DisabledBecauseFinal=This situation is final. +situationInvoiceShortcode_AS=AS +situationInvoiceShortcode_S=S +CantBeLessThanMinPercent=The progress can't be smaller than its value in the previous situation. +NoSituations=No open situations +InvoiceSituationLast=Final and general invoice +PDFCrevetteSituationNumber=Situation N°%s +PDFCrevetteSituationInvoiceLineDecompte=Situation invoice - COUNT +PDFCrevetteSituationInvoiceTitle=Situation invoice +PDFCrevetteSituationInvoiceLine=Situation N°%s: Inv. N°%s on %s +TotalSituationInvoice=Total situation +invoiceLineProgressError=Invoice line progress can't be greater than or equal to the next invoice line +updatePriceNextInvoiceErrorUpdateline=Error: update price on invoice line: %s +ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices. +ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu <strong>%s - %s - %s</strong>. +ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask your administrator to enable and setup module <strong>%s</strong>. Note that both methods (manual and automatic) can be used together with no risk of duplication. +DeleteRepeatableInvoice=Delete template invoice +ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? +CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated +StatusOfGeneratedDocuments=Status of document generation +DoNotGenerateDoc=Do not generate document file +AutogenerateDoc=Auto generate document file +AutoFillDateFrom=Set start date for service line with invoice date +AutoFillDateFromShort=Set start date +AutoFillDateTo=Set end date for service line with next invoice date +AutoFillDateToShort=Set end date +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 +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/ar_IQ/blockedlog.lang b/htdocs/langs/ar_IQ/blockedlog.lang new file mode 100644 index 00000000000..44cb183050a --- /dev/null +++ b/htdocs/langs/ar_IQ/blockedlog.lang @@ -0,0 +1,54 @@ +BlockedLog=Unalterable Logs +Field=Field +BlockedLogDesc=This module tracks some events into an unalterable log (that you can't modify once recorded) into a block chain, in real time. This module provides compatibility with requirements of laws of some countries (like France with the law Finance 2016 - Norme NF525). +Fingerprints=Archived events and fingerprints +FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and archived locally into a dedicated table, in real time when you record a business event. You can use this tool to export this archive and save it into an external support (some countries, like France, ask that you do it every year). Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint. If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed). +CompanyInitialKey=Company initial key (hash of genesis block) +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) or has modified checksum of the previous record. +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 +NotAddedByAuthorityYet=Not yet stored into remote authority +ShowDetails=Show stored details +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_ADD_TO_BANK=Payment added to bank +logPAYMENT_CUSTOMER_CREATE=Customer payment created +logPAYMENT_CUSTOMER_DELETE=Customer payment logical deletion +logDONATION_PAYMENT_CREATE=Donation payment created +logDONATION_PAYMENT_DELETE=Donation payment logical deletion +logBILL_PAYED=Customer invoice paid +logBILL_UNPAYED=Customer invoice set unpaid +logBILL_VALIDATE=Customer invoice validated +logBILL_SENTBYMAIL=Customer invoice send by mail +logBILL_DELETE=Customer invoice logically deleted +logMODULE_RESET=Module BlockedLog was disabled +logMODULE_SET=Module BlockedLog was enabled +logDON_VALIDATE=Donation validated +logDON_MODIFY=Donation modified +logDON_DELETE=Donation logical deletion +logMEMBER_SUBSCRIPTION_CREATE=Member subscription created +logMEMBER_SUBSCRIPTION_MODIFY=Member subscription modified +logMEMBER_SUBSCRIPTION_DELETE=Member subscription logical deletion +logCASHCONTROL_VALIDATE=Cash desk closing recording +BlockedLogBillDownload=Customer invoice download +BlockedLogBillPreview=Customer invoice preview +BlockedlogInfoDialog=Log Details +ListOfTrackedEvents=List of tracked events +Fingerprint=Fingerprint +DownloadLogCSV=Export archived logs (CSV) +logDOC_PREVIEW=Preview of a validated document in order to print or download +logDOC_DOWNLOAD=Download of a validated document in order to print or send +DataOfArchivedEvent=Full datas of archived event +ImpossibleToReloadObject=Original object (type %s, id %s) not linked (see 'Full datas' column to get unalterable saved data) +BlockedLogAreRequiredByYourCountryLegislation=Unalterable Logs module may be required by the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they can not be validated by a tax audit. +BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Unalterable Logs module was activated because of the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they cannot be validated by a tax audit. +BlockedLogDisableNotAllowedForCountry=List of countries where usage of this module is mandatory (just to prevent to disable the module by error, if your country is in this list, disable of module is not possible without editing this list first. Note also that enabling/disabling this module will keep a track into the unalterable log). +OnlyNonValid=Non-valid +TooManyRecordToScanRestrictFilters=Too many records to scan/analyze. Please restrict list with more restrictive filters. +RestrictYearToExport=Restrict month / year to export diff --git a/htdocs/langs/ar_IQ/bookmarks.lang b/htdocs/langs/ar_IQ/bookmarks.lang new file mode 100644 index 00000000000..87466cadcfa --- /dev/null +++ b/htdocs/langs/ar_IQ/bookmarks.lang @@ -0,0 +1,21 @@ +# Dolibarr language file - Source file is en_US - marque pages +AddThisPageToBookmarks=Add current page to bookmarks +Bookmark=Bookmark +Bookmarks=Bookmarks +ListOfBookmarks=List of bookmarks +EditBookmarks=List/edit bookmarks +NewBookmark=New bookmark +ShowBookmark=Show bookmark +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 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/ar_IQ/boxes.lang b/htdocs/langs/ar_IQ/boxes.lang new file mode 100644 index 00000000000..4d7ee938c91 --- /dev/null +++ b/htdocs/langs/ar_IQ/boxes.lang @@ -0,0 +1,120 @@ +# Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database +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 +BoxLastCustomerOrders=Latest sales orders +BoxLastActions=Latest actions +BoxLastContracts=Latest contracts +BoxLastContacts=Latest contacts/addresses +BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions +BoxFicheInter=Latest interventions +BoxCurrentAccounts=Open accounts balance +BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year +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 modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices +BoxTitleLastModifiedProspects=Prospects: last %s modified +BoxTitleLastModifiedMembers=Latest %s members +BoxTitleLastFicheInter=Latest %s modified interventions +BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid +BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid +BoxTitleCurrentAccounts=Open Accounts: balances +BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception +BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified +BoxMyLastBookmarks=Bookmarks: latest %s +BoxOldestExpiredServices=Oldest active expired services +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 +BoxTitleLatestModifiedBoms=Latest %s modified BOMs +BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded +BoxGlobalActivity=Global activity (invoices, proposals, orders) +BoxGoodCustomers=Good customers +BoxTitleGoodCustomers=%s Good customers +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel +FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s +LastRefreshDate=Latest refresh date +NoRecordedBookmarks=No bookmarks defined. +ClickToAdd=Click here to add. +NoRecordedCustomers=No recorded customers +NoRecordedContacts=No recorded contacts +NoActionsToDo=No actions to do +NoRecordedOrders=No recorded sales orders +NoRecordedProposals=No recorded proposals +NoRecordedInvoices=No recorded customer invoices +NoUnpaidCustomerBills=No unpaid customer invoices +NoUnpaidSupplierBills=No unpaid vendor invoices +NoModifiedSupplierBills=No recorded vendor invoices +NoRecordedProducts=No recorded products/services +NoRecordedProspects=No recorded prospects +NoContractedProducts=No products/services contracted +NoRecordedContracts=No recorded contracts +NoRecordedInterventions=No recorded interventions +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 +BoxSuppliersOrdersPerMonth=Vendor Orders per month +BoxProposalsPerMonth=Proposals per month +NoTooLowStockProducts=No products are under the low stock limit +BoxProductDistribution=Products/Services Distribution +ForObject=On %s +BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified +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 +LastXMonthRolling=The latest %s month rolling +ChooseBoxToAdd=Add widget to your dashboard +BoxAdded=Widget was added in your dashboard +BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document +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 +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached +# Pages +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ar_IQ/cashdesk.lang b/htdocs/langs/ar_IQ/cashdesk.lang new file mode 100644 index 00000000000..ce7698c8cd8 --- /dev/null +++ b/htdocs/langs/ar_IQ/cashdesk.lang @@ -0,0 +1,129 @@ +# 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 +CashDeskProducts=Products +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 desk closing +CashFenceDone=Cash desk closing 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 at least one product categorie to work +TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category <b>%s</b> 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 +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 ? +History=History +ValidateAndClose=Validate and close +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=Add a "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 +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 icon instead of text on payment buttons of numpad +CashDeskRefNumberingModules=Numbering module for POS sales +CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal number +TakeposGroupSameProduct=Group same products lines +StartAParallelSale=Start a new parallel sale +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control +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 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 +ShowPriceHT = Display the price excluding tax column +ShowPriceHTOnReceipt = Display the price excluding tax column on receipt diff --git a/htdocs/langs/ar_IQ/categories.lang b/htdocs/langs/ar_IQ/categories.lang new file mode 100644 index 00000000000..9520ef65a83 --- /dev/null +++ b/htdocs/langs/ar_IQ/categories.lang @@ -0,0 +1,99 @@ +# Dolibarr language file - Source file is en_US - categories +Rubrique=Tag/Category +Rubriques=Tags/Categories +RubriquesTransactions=Tags/Categories of transactions +categories=tags/categories +NoCategoryYet=No tag/category of this type created +In=In +AddIn=Add in +modify=modify +Classify=Classify +CategoriesArea=Tags/Categories area +ProductsCategoriesArea=Products/Services tags/categories area +SuppliersCategoriesArea=Vendors tags/categories area +CustomersCategoriesArea=Customers tags/categories area +MembersCategoriesArea=Members tags/categories area +ContactsCategoriesArea=Contacts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area +ProjectsCategoriesArea=Projects tags/categories area +UsersCategoriesArea=Users tags/categories area +SubCats=Sub-categories +CatList=List of tags/categories +CatListAll=List of tags/categories (all types) +NewCategory=New tag/category +ModifCat=Modify tag/category +CatCreated=Tag/category created +CreateCat=Create tag/category +CreateThisCat=Create this tag/category +NoSubCat=No subcategory. +SubCatOf=Subcategory +FoundCats=Found tags/categories +ImpossibleAddCat=Impossible to add the tag/category %s +WasAddedSuccessfully=<b>%s</b> was added successfully. +ObjectAlreadyLinkedToCategory=Element is already linked to this tag/category. +ProductIsInCategories=Product/service is linked to following tags/categories +CompanyIsInCustomersCategories=This third party is linked to following customers/prospects tags/categories +CompanyIsInSuppliersCategories=This third party is linked to following vendors tags/categories +MemberIsInCategories=This member is linked to following members tags/categories +ContactIsInCategories=This contact is linked to following contacts tags/categories +ProductHasNoCategory=This product/service is not in any tags/categories +CompanyHasNoCategory=This third party is not in any tags/categories +MemberHasNoCategory=This member is not in any tags/categories +ContactHasNoCategory=This contact is not in any tags/categories +ProjectHasNoCategory=This project is not in any tags/categories +ClassifyInCategory=Add to tag/category +NotCategorized=Without tag/category +CategoryExistsAtSameLevel=This category already exists with this ref +ContentsVisibleByAllShort=Contents visible by all +ContentsNotVisibleByAllShort=Contents not visible by all +DeleteCategory=Delete tag/category +ConfirmDeleteCategory=Are you sure you want to delete this tag/category? +NoCategoriesDefined=No tag/category defined +SuppliersCategoryShort=Vendors tag/category +CustomersCategoryShort=Customers tag/category +ProductsCategoryShort=Products tag/category +MembersCategoryShort=Members tag/category +SuppliersCategoriesShort=Vendors tags/categories +CustomersCategoriesShort=Customers tags/categories +ProspectsCategoriesShort=Prospects tags/categories +CustomersProspectsCategoriesShort=Cust./Prosp. tags/categories +ProductsCategoriesShort=Products tags/categories +MembersCategoriesShort=Members tags/categories +ContactCategoriesShort=Contacts tags/categories +AccountsCategoriesShort=Accounts tags/categories +ProjectsCategoriesShort=Projects tags/categories +UsersCategoriesShort=Users tags/categories +StockCategoriesShort=Warehouse tags/categories +ThisCategoryHasNoItems=This category does not contain any items. +CategId=Tag/category id +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories +CatProdList=List of products tags/categories +CatMemberList=List of members tags/categories +CatContactList=List of contacts tags/categories +CatProjectsList=List of projects tags/categories +CatUsersList=List of users tags/categories +CatSupLinks=Links between vendors and tags/categories +CatCusLinks=Links between customers/prospects and tags/categories +CatContactsLinks=Links between contacts/addresses and tags/categories +CatProdLinks=Links between products/services and tags/categories +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories +DeleteFromCat=Remove from tags/category +ExtraFieldsCategories=Complementary attributes +CategoriesSetup=Tags/categories setup +CategorieRecursiv=Link with parent tag/category automatically +CategorieRecursivHelp=If option is on, when you add a product into a subcategory, product will also be added into the parent category. +AddProductServiceIntoCategory=Add the following product/service +AddCustomerIntoCategory=Assign category to customer +AddSupplierIntoCategory=Assign category to supplier +ShowCategory=Show tag/category +ByDefaultInList=By default in list +ChooseCategory=Choose category +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories +WebsitePagesCategoriesArea=Page-Container Categories +UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ar_IQ/commercial.lang b/htdocs/langs/ar_IQ/commercial.lang new file mode 100644 index 00000000000..21d282cd794 --- /dev/null +++ b/htdocs/langs/ar_IQ/commercial.lang @@ -0,0 +1,81 @@ +# Dolibarr language file - Source file is en_US - commercial +Commercial=Commerce +CommercialArea=Commerce area +Customer=Customer +Customers=Customers +Prospect=Prospect +Prospects=Prospects +DeleteAction=Delete an event +NewAction=New event +AddAction=Create event +AddAnAction=Create an event +AddActionRendezVous=Create a Rendez-vous event +ConfirmDeleteAction=Are you sure you want to delete this event? +CardAction=Event card +ActionOnCompany=Related company +ActionOnContact=Related contact +TaskRDVWith=Meeting with %s +ShowTask=Show task +ShowAction=Show event +ActionsReport=Events report +ThirdPartiesOfSaleRepresentative=Third parties with sales representative +SaleRepresentativesOfThirdParty=Sales representatives of third party +SalesRepresentative=Sales representative +SalesRepresentatives=Sales representatives +SalesRepresentativeFollowUp=Sales representative (follow-up) +SalesRepresentativeSignature=Sales representative (signature) +NoSalesRepresentativeAffected=No particular sales representative assigned +ShowCustomer=Show customer +ShowProspect=Show prospect +ListOfProspects=List of prospects +ListOfCustomers=List of customers +LastDoneTasks=Latest %s completed actions +LastActionsToDo=Oldest %s not completed actions +DoneAndToDoActions=Completed and To do events +DoneActions=Completed events +ToDoActions=Incomplete events +SendPropalRef=Submission of commercial proposal %s +SendOrderRef=Submission of order %s +StatusNotApplicable=Not applicable +StatusActionToDo=To do +StatusActionDone=Complete +StatusActionInProcess=In process +TasksHistoryForThisContact=Events for this contact +LastProspectDoNotContact=Do not contact +LastProspectNeverContacted=Never contacted +LastProspectToContact=To contact +LastProspectContactInProcess=Contact in process +LastProspectContactDone=Contact done +ActionAffectedTo=Event assigned to +ActionDoneBy=Event done by +ActionAC_TEL=Phone call +ActionAC_FAX=Send fax +ActionAC_PROP=Send proposal by mail +ActionAC_EMAIL=Send Email +ActionAC_EMAIL_IN=Reception of Email +ActionAC_RDV=Meetings +ActionAC_INT=Intervention on site +ActionAC_FAC=Send customer invoice by mail +ActionAC_REL=Send customer invoice by mail (reminder) +ActionAC_CLO=Close +ActionAC_EMAILING=Send mass email +ActionAC_COM=Send sales order by mail +ActionAC_SHIP=Send shipping by mail +ActionAC_SUP_ORD=Send purchase order by mail +ActionAC_SUP_INV=Send vendor invoice by mail +ActionAC_OTH=Other +ActionAC_OTH_AUTO=Other auto +ActionAC_MANUAL=Manually inserted events +ActionAC_AUTO=Automatically inserted events +ActionAC_OTH_AUTOShort=Other +ActionAC_EVENTORGANIZATION=Event organization events +Stats=Sales statistics +StatusProsp=Prospect status +DraftPropals=Draft commercial proposals +NoLimit=No limit +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 diff --git a/htdocs/langs/ar_IQ/companies.lang b/htdocs/langs/ar_IQ/companies.lang new file mode 100644 index 00000000000..154400c6536 --- /dev/null +++ b/htdocs/langs/ar_IQ/companies.lang @@ -0,0 +1,477 @@ +# 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 per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate +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 +Skype=Skype +Call=Call +Chat=Chat +PhonePro=Prof. phone +PhonePerso=Pers. phone +PhoneMobile=Mobile +No_Email=Refuse bulk emailings +Fax=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 +OverAllProposals=Proposals +OverAllOrders=Orders +OverAllInvoices=Invoices +OverAllSupplierProposals=Price requests +##### Local Taxes ##### +LocalTax1IsUsed=Use second tax +LocalTax1IsUsedES= RE is used +LocalTax1IsNotUsedES= RE is not used +LocalTax2IsUsed=Use third tax +LocalTax2IsUsedES= IRPF is used +LocalTax2IsNotUsedES= IRPF is not used +WrongCustomerCode=Customer code invalid +WrongSupplierCode=Vendor code invalid +CustomerCodeModel=Customer code model +SupplierCodeModel=Vendor code model +Gencod=Barcode +##### Professional ID ##### +ProfId1Short=Prof. id 1 +ProfId2Short=Prof. id 2 +ProfId3Short=Prof. id 3 +ProfId4Short=Prof. id 4 +ProfId5Short=Prof. id 5 +ProfId6Short=Prof. id 6 +ProfId1=Professional ID 1 +ProfId2=Professional ID 2 +ProfId3=Professional ID 3 +ProfId4=Professional ID 4 +ProfId5=Professional ID 5 +ProfId6=Professional ID 6 +ProfId1AR=Prof Id 1 (CUIT/CUIL) +ProfId2AR=Prof Id 2 (Revenu brutes) +ProfId3AR=- +ProfId4AR=- +ProfId5AR=- +ProfId6AR=- +ProfId1AT=Prof Id 1 (USt.-IdNr) +ProfId2AT=Prof Id 2 (USt.-Nr) +ProfId3AT=Prof Id 3 (Handelsregister-Nr.) +ProfId4AT=- +ProfId5AT=EORI number +ProfId6AT=- +ProfId1AU=Prof Id 1 (ABN) +ProfId2AU=- +ProfId3AU=- +ProfId4AU=- +ProfId5AU=- +ProfId6AU=- +ProfId1BE=Prof Id 1 (Professional number) +ProfId2BE=- +ProfId3BE=- +ProfId4BE=- +ProfId5BE=EORI number +ProfId6BE=- +ProfId1BR=- +ProfId2BR=IE (Inscricao Estadual) +ProfId3BR=IM (Inscricao Municipal) +ProfId4BR=CPF +#ProfId5BR=CNAE +#ProfId6BR=INSS +ProfId1CH=UID-Nummer +ProfId2CH=- +ProfId3CH=Prof Id 1 (Federal number) +ProfId4CH=Prof Id 2 (Commercial Record number) +ProfId5CH=EORI number +ProfId6CH=- +ProfId1CL=Prof Id 1 (R.U.T.) +ProfId2CL=- +ProfId3CL=- +ProfId4CL=- +ProfId5CL=- +ProfId6CL=- +ProfId1CO=Prof Id 1 (R.U.T.) +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- +ProfId6CO=- +ProfId1DE=Prof Id 1 (USt.-IdNr) +ProfId2DE=Prof Id 2 (USt.-Nr) +ProfId3DE=Prof Id 3 (Handelsregister-Nr.) +ProfId4DE=- +ProfId5DE=EORI number +ProfId6DE=- +ProfId1ES=Prof Id 1 (CIF/NIF) +ProfId2ES=Prof Id 2 (Social security number) +ProfId3ES=Prof Id 3 (CNAE) +ProfId4ES=Prof Id 4 (Collegiate number) +ProfId5ES=Prof Id 5 (EORI number) +ProfId6ES=- +ProfId1FR=Prof Id 1 (SIREN) +ProfId2FR=Prof Id 2 (SIRET) +ProfId3FR=Prof Id 3 (NAF, old APE) +ProfId4FR=Prof Id 4 (RCS/RM) +ProfId5FR=Prof Id 5 (numéro EORI) +ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- +ProfId1GB=Registration Number +ProfId2GB=- +ProfId3GB=SIC +ProfId4GB=- +ProfId5GB=- +ProfId6GB=- +ProfId1HN=Id prof. 1 (RTN) +ProfId2HN=- +ProfId3HN=- +ProfId4HN=- +ProfId5HN=- +ProfId6HN=- +ProfId1IN=Prof Id 1 (TIN) +ProfId2IN=Prof Id 2 (PAN) +ProfId3IN=Prof Id 3 (SRVC TAX) +ProfId4IN=Prof Id 4 +ProfId5IN=Prof Id 5 +ProfId6IN=- +ProfId1IT=- +ProfId2IT=- +ProfId3IT=- +ProfId4IT=- +ProfId5IT=EORI number +ProfId6IT=- +ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) +ProfId2LU=Id. prof. 2 (Business permit) +ProfId3LU=- +ProfId4LU=- +ProfId5LU=EORI number +ProfId6LU=- +ProfId1MA=Id prof. 1 (R.C.) +ProfId2MA=Id prof. 2 (Patente) +ProfId3MA=Id prof. 3 (I.F.) +ProfId4MA=Id prof. 4 (C.N.S.S.) +ProfId5MA=Id prof. 5 (I.C.E.) +ProfId6MA=- +ProfId1MX=Prof Id 1 (R.F.C). +ProfId2MX=Prof Id 2 (R..P. IMSS) +ProfId3MX=Prof Id 3 (Profesional Charter) +ProfId4MX=- +ProfId5MX=- +ProfId6MX=- +ProfId1NL=KVK nummer +ProfId2NL=- +ProfId3NL=- +ProfId4NL=Burgerservicenummer (BSN) +ProfId5NL=EORI number +ProfId6NL=- +ProfId1PT=Prof Id 1 (NIPC) +ProfId2PT=Prof Id 2 (Social security number) +ProfId3PT=Prof Id 3 (Commercial Record number) +ProfId4PT=Prof Id 4 (Conservatory) +ProfId5PT=Prof Id 5 (EORI number) +ProfId6PT=- +ProfId1SN=RC +ProfId2SN=NINEA +ProfId3SN=- +ProfId4SN=- +ProfId5SN=- +ProfId6SN=- +ProfId1TN=Prof Id 1 (RC) +ProfId2TN=Prof Id 2 (Fiscal matricule) +ProfId3TN=Prof Id 3 (Douane code) +ProfId4TN=Prof Id 4 (BAN) +ProfId5TN=- +ProfId6TN=- +ProfId1US=Prof Id (FEIN) +ProfId2US=- +ProfId3US=- +ProfId4US=- +ProfId5US=- +ProfId6US=- +ProfId1RO=Prof Id 1 (CUI) +ProfId2RO=Prof Id 2 (Nr. Înmatriculare) +ProfId3RO=Prof Id 3 (CAEN) +ProfId4RO=Prof Id 5 (EUID) +ProfId5RO=Prof Id 5 (EORI number) +ProfId6RO=- +ProfId1RU=Prof Id 1 (OGRN) +ProfId2RU=Prof Id 2 (INN) +ProfId3RU=Prof Id 3 (KPP) +ProfId4RU=Prof Id 4 (OKPO) +ProfId5RU=- +ProfId6RU=- +ProfId1DZ=RC +ProfId2DZ=Art. +ProfId3DZ=NIF +ProfId4DZ=NIS +VATIntra=VAT ID +VATIntraShort=VAT ID +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 +CustomerRelativeDiscountShort=Relative discount +CustomerAbsoluteDiscountShort=Absolute discount +CompanyHasRelativeDiscount=This customer has a default discount of <b>%s%%</b> +CompanyHasNoRelativeDiscount=This customer has no relative discount by default +HasRelativeDiscountFromSupplier=You have a default discount of <b>%s%%</b> 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 <b>%s</b> %s +CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for <b>%s</b> %s +CompanyHasCreditNote=This customer still has credit notes for <b>%s</b> %s +HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor +HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for <b>%s</b> %s from this vendor +HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for <b>%s</b> %s from this vendor +HasCreditNoteFromSupplier=You have credit notes for <b>%s</b> %s from this vendor +CompanyHasNoAbsoluteDiscount=This customer has no discount credit available +CustomerAbsoluteDiscountAllUsers=Absolute customer discounts (granted by all users) +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 +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 +ValidityControledByModule=Validity controlled by module +ThisIsModuleRules=Rules for this module +ProspectToContact=Prospect to contact +CompanyDeleted=Company "%s" deleted from database. +ListOfContacts=List of contacts/addresses +ListOfContactsAddresses=List of contacts/addresses +ListOfThirdParties=List of Third Parties +ShowCompany=Third Party +ShowContact=Contact-Address +ContactsAllShort=All (No filter) +ContactType=Contact type +ContactForOrders=Order's contact +ContactForOrdersOrShipments=Order's or shipment's contact +ContactForProposals=Proposal's contact +ContactForContracts=Contract's contact +ContactForInvoices=Invoice's contact +NoContactForAnyOrder=This contact is not a contact for any order +NoContactForAnyOrderOrShipments=This contact is not a contact for any order or shipment +NoContactForAnyProposal=This contact is not a contact for any commercial proposal +NoContactForAnyContract=This contact is not a contact for any contract +NoContactForAnyInvoice=This contact is not a contact for any invoice +NewContact=New contact +NewContactAddress=New Contact/Address +MyContacts=My contacts +Capital=Capital +CapitalOf=Capital of %s +EditCompany=Edit company +ThisUserIsNot=This user is not a prospect, customer or vendor +VATIntraCheck=Check +VATIntraCheckDesc=The VAT ID must include the country prefix. The link <b>%s</b> uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server. +VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do +VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commission website +VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> +ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). +NorProspectNorCustomer=Not prospect, nor customer +JuridicalStatus=Business entity type +Workforce=Workforce +Staff=Employees +ProspectLevelShort=Potential +ProspectLevel=Prospect potential +ContactPrivate=Private +ContactPublic=Shared +ContactVisibility=Visibility +ContactOthers=Other +OthersNotLinkedToThirdParty=Others, not linked to a third party +ProspectStatus=Prospect status +PL_NONE=None +PL_UNKNOWN=Unknown +PL_LOW=Low +PL_MEDIUM=Medium +PL_HIGH=High +TE_UNKNOWN=- +TE_STARTUP=Startup +TE_GROUP=Large company +TE_MEDIUM=Medium company +TE_ADMIN=Governmental +TE_SMALL=Small company +TE_RETAIL=Retailer +TE_WHOLE=Wholesaler +TE_PRIVATE=Private individual +TE_OTHER=Other +StatusProspect-1=Do not contact +StatusProspect0=Never contacted +StatusProspect1=To be contacted +StatusProspect2=Contact in process +StatusProspect3=Contact done +ChangeDoNotContact=Change status to 'Do not contact' +ChangeNeverContacted=Change status to 'Never contacted' +ChangeToContact=Change status to 'To be contacted' +ChangeContactInProcess=Change status to 'Contact in process' +ChangeContactDone=Change status to 'Contact done' +ProspectsByStatus=Prospects by status +NoParentCompany=None +ExportCardToFormat=Export card to format +ContactNotLinkedToCompany=Contact not linked to any third party +DolibarrLogin=Dolibarr login +NoDolibarrAccess=No Dolibarr access +ExportDataset_company_1=Third-parties (companies/foundations/physical people) and their properties +ExportDataset_company_2=Contacts and their properties +ImportDataset_company_1=Third-parties and their properties +ImportDataset_company_2=Third-parties additional contacts/addresses and attributes +ImportDataset_company_3=Third-parties Bank accounts +ImportDataset_company_4=Third-parties Sales representatives (assign sales representatives/users to companies) +PriceLevel=Price Level +PriceLevelLabels=Price Level Labels +DeliveryAddress=Delivery address +AddAddress=Add address +SupplierCategory=Vendor category +JuridicalStatus200=Independent +DeleteFile=Delete file +ConfirmDeleteFile=Are you sure you want to delete this file? +AllocateCommercial=Assigned to sales representative +Organization=Organization +FiscalYearInformation=Fiscal Year +FiscalMonthStart=Starting month of the fiscal year +SocialNetworksInformation=Social networks +SocialNetworksFacebookURL=Facebook URL +SocialNetworksTwitterURL=Twitter URL +SocialNetworksLinkedinURL=Linkedin URL +SocialNetworksInstagramURL=Instagram URL +SocialNetworksYoutubeURL=Youtube URL +SocialNetworksGithubURL=Github URL +YouMustAssignUserMailFirst=You must create an email for this user prior to being able to add an email notification. +YouMustCreateContactFirst=To be able to add email notifications, you must first define contacts with valid emails for the third party +ListSuppliersShort=List of Vendors +ListProspectsShort=List of Prospects +ListCustomersShort=List of Customers +ThirdPartiesArea=Third Parties/Contacts +LastModifiedThirdParties=Latest %s modified Third Parties +UniqueThirdParties=Total of Third Parties +InActivity=Open +ActivityCeased=Closed +ThirdPartyIsClosed=Third party is closed +ProductsIntoElements=List of products/services into %s +CurrentOutstandingBill=Current outstanding bill +OutstandingBill=Max. for outstanding bill +OutstandingBillReached=Max. for outstanding bill reached +OrderMinAmount=Minimum amount for order +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. +LeopardNumRefModelDesc=The code is free. This code can be modified at any time. +ManagingDirectors=Manager(s) name (CEO, director, president...) +MergeOriginThirdparty=Duplicate third party (third party you want to delete) +MergeThirdparties=Merge third parties +ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party, then the third party will be deleted. +ThirdpartiesMergeSuccess=Third parties have been merged +SaleRepresentativeLogin=Login of sales representative +SaleRepresentativeFirstname=First name of sales representative +SaleRepresentativeLastname=Last name of sales representative +ErrorThirdpartiesMerge=There was an error when deleting the third parties. Please check the log. Changes have been reverted. +NewCustomerSupplierCodeProposed=Customer or Vendor code already used, a new code is suggested +KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +#Imports +PaymentTypeCustomer=Payment Type - Customer +PaymentTermsCustomer=Payment Terms - Customer +PaymentTypeSupplier=Payment Type - Vendor +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) +CurrentOutstandingBillLate=Current outstanding bill late +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Be carefull, depending on your product price settings, you should change thirdparty before adding product to POS. diff --git a/htdocs/langs/ar_IQ/compta.lang b/htdocs/langs/ar_IQ/compta.lang new file mode 100644 index 00000000000..926cda53c9f --- /dev/null +++ b/htdocs/langs/ar_IQ/compta.lang @@ -0,0 +1,288 @@ +# Dolibarr language file - Source file is en_US - compta +MenuFinancial=Billing | Payment +TaxModuleSetupToModifyRules=Go to <a href="%s">Taxes module setup</a> to modify rules for calculation +TaxModuleSetupToModifyRulesLT=Go to <a href="%s">Company setup</a> to modify rules for calculation +OptionMode=Option for accountancy +OptionModeTrue=Option Incomes-Expenses +OptionModeVirtual=Option Claims-Debts +OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). The validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. +OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. +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 +RemainingAmountPayment=Amount payment remaining: +Account=Account +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) +Balance=Balance +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 +StatusToPay=To pay +SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments +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 +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=Social/fiscal tax payment +PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the 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 +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration +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 +BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted on %s and filtered on 1 bank account (with no other filters) +CustomerAccountancyCode=Customer accounting code +SupplierAccountancyCode=Vendor accounting code +CustomerAccountancyCodeShort=Cust. account. code +SupplierAccountancyCodeShort=Sup. account. code +AccountNumber=Account number +NewAccountingAccount=New account +Turnover=Turnover invoiced +TurnoverCollected=Turnover collected +SalesTurnoverMinimum=Minimum turnover +ByExpenseIncome=By expenses & incomes +ByThirdParties=By third parties +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 +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? +DeleteSocialContribution=Delete a social or fiscal tax payment +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? +ExportDataset_tax_1=Social and fiscal taxes and payments +CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. +CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. +CalcModeDebt=Analysis of known recorded documents 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 <b>%sRE on customer invoices - suppliers invoices%s</b> +CalcModeLT1Debt=Mode <b>%sRE on customer invoices%s</b> +CalcModeLT1Rec= Mode <b>%sRE on suppliers invoices%s</b> +CalcModeLT2= Mode <b>%sIRPF on customer invoices - suppliers invoices%s</b> +CalcModeLT2Debt=Mode <b>%sIRPF on customer invoices%s</b> +CalcModeLT2Rec= Mode <b>%sIRPF on suppliers invoices%s</b> +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 <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>. +AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>. +SeeReportInInputOutputMode=See <b>%sanalysis of payments%s</b> for a calculation based on <b>recorded payments</b> made even if they are not yet accounted in Ledger +SeeReportInDueDebtMode=See <b>%sanalysis of recorded documents%s</b> for a calculation based on known <b>recorded documents</b> even if they are not yet accounted in Ledger +SeeReportInBookkeepingMode=See <b>%sanalysis of bookeeping ledger table%s</b> for a report based on <b>Bookkeeping Ledger table</b> +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.<br>- 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. <br>- 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. <br>- It is based on the billing date of these invoices.<br> +RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> +RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME +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 <b>grouped by personalized groups</b> +SeePageForSetup=See menu <a href="%s">%s</a> 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 +VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid +VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate +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 <b>%sVAT encasement%s</b> for a standard calculation +SeeVATReportInDueDebtMode=See report <b>%sVAT on flow%s</b> for a calculation with an option on the flow +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 +CodeNotDef=Not defined +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 +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". +LinkedOrder=Link to order +Mode1=Method 1 +Mode2=Method 2 +CalculationRuleDesc=To calculate total VAT, there is two methods:<br>Method 1 is rounding vat on each line, then summing them.<br>Method 2 is summing all vat on each line, then rounding result.<br>Final result may differs from few cents. Default mode is mode <b>%s</b>. +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 +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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary +CloneTaxForNextMonth=Clone it for next month +SimpleReport=Simple report +AddExtraReport=Extra reports (add foreign and national customer report) +OtherCountriesCustomersReport=Foreign customers report +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 +FiscalPeriod=Accounting period +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 for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range +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 +LabelToShow=Short label +PurchaseTurnover=Purchase turnover +PurchaseTurnoverCollected=Purchase turnover collected +RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> +RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> +RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE +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_IQ/contracts.lang b/htdocs/langs/ar_IQ/contracts.lang new file mode 100644 index 00000000000..a9ac308142a --- /dev/null +++ b/htdocs/langs/ar_IQ/contracts.lang @@ -0,0 +1,104 @@ +# Dolibarr language file - Source file is en_US - contracts +ContractsArea=Contracts area +ListOfContracts=List of contracts +AllContracts=All contracts +ContractCard=Contract card +ContractStatusNotRunning=Not running +ContractStatusDraft=Draft +ContractStatusValidated=Validated +ContractStatusClosed=Closed +ServiceStatusInitial=Not running +ServiceStatusRunning=Running +ServiceStatusNotLate=Running, not expired +ServiceStatusNotLateShort=Not expired +ServiceStatusLate=Running, expired +ServiceStatusLateShort=Expired +ServiceStatusClosed=Closed +ShowContractOfService=Show contract of service +Contracts=Contracts +ContractsSubscriptions=Contracts/Subscriptions +ContractsAndLine=Contracts and line of contracts +Contract=Contract +ContractLine=Contract line +Closing=Closing +NoContracts=No contracts +MenuServices=Services +MenuInactiveServices=Services not active +MenuRunningServices=Running services +MenuExpiredServices=Expired services +MenuClosedServices=Closed services +NewContract=New contract +NewContractSubscription=New contract or subscription +AddContract=Create contract +DeleteAContract=Delete a contract +ActivateAllOnContract=Activate all services +CloseAContract=Close a contract +ConfirmDeleteAContract=Are you sure you want to delete this contract and all its services? +ConfirmValidateContract=Are you sure you want to validate this contract under name <b>%s</b>? +ConfirmActivateAllOnContract=This will open all services (not yet active). Are you sure you want to open all services? +ConfirmCloseContract=This will close all services (active or not). Are you sure you want to close this contract? +ConfirmCloseService=Are you sure you want to close this service with date <b>%s</b>? +ValidateAContract=Validate a contract +ActivateService=Activate service +ConfirmActivateService=Are you sure you want to activate this service with date <b>%s</b>? +RefContract=Contract reference +DateContract=Contract date +DateServiceActivate=Service activation date +ListOfServices=List of services +ListOfInactiveServices=List of not active services +ListOfExpiredServices=List of expired active services +ListOfClosedServices=List of closed services +ListOfRunningServices=List of running services +NotActivatedServices=Inactive services (among validated contracts) +BoardNotActivatedServices=Services to activate among validated contracts +BoardNotActivatedServicesShort=Services to activate +LastContracts=Latest %s contracts +LastModifiedServices=Latest %s modified services +ContractStartDate=Start date +ContractEndDate=End date +DateStartPlanned=Planned start date +DateStartPlannedShort=Planned start date +DateEndPlanned=Planned end date +DateEndPlannedShort=Planned end date +DateStartReal=Real start date +DateStartRealShort=Real start date +DateEndReal=Real end date +DateEndRealShort=Real end date +CloseService=Close service +BoardRunningServices=Services running +BoardRunningServicesShort=Services running +BoardExpiredServices=Services expired +BoardExpiredServicesShort=Services expired +ServiceStatus=Status of service +DraftContracts=Drafts contracts +CloseRefusedBecauseOneServiceActive=Contract can't be closed as there is at least one open service on it +ActivateAllContracts=Activate all contract lines +CloseAllContracts=Close all contract lines +DeleteContractLine=Delete a contract line +ConfirmDeleteContractLine=Are you sure you want to delete this contract line? +MoveToAnotherContract=Move service into another contract. +ConfirmMoveToAnotherContract=I choosed new target contract and confirm I want to move this service into this contract. +ConfirmMoveToAnotherContractQuestion=Choose in which existing contract (of same third party), you want to move this service to? +PaymentRenewContractId=Renew contract line (number %s) +ExpiredSince=Expiration date +NoExpiredServices=No expired active services +ListOfServicesToExpireWithDuration=List of Services to expire in %s days +ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days +ListOfServicesToExpire=List of Services to expire +NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. +StandardContractsTemplate=Standard contracts template +ContactNameAndSignature=For %s, name and signature: +OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned. +ConfirmCloneContract=Are you sure you want to clone the contract <b>%s</b>? +LowerDateEndPlannedShort=Lower planned end date of active services +SendContractRef=Contract information __REF__ +OtherContracts=Other contracts +##### Types de contacts ##### +TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract +TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up contract +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 diff --git a/htdocs/langs/ar_IQ/cron.lang b/htdocs/langs/ar_IQ/cron.lang new file mode 100644 index 00000000000..2ebdda1e685 --- /dev/null +++ b/htdocs/langs/ar_IQ/cron.lang @@ -0,0 +1,91 @@ +# Dolibarr language file - Source file is en_US - cron +# About page +# Right +Permission23101 = Read Scheduled job +Permission23102 = Create/update Scheduled job +Permission23103 = Delete Scheduled job +Permission23104 = Execute Scheduled job +# Admin +CronSetup=Scheduled job management setup +URLToLaunchCronJobs=URL to check and launch qualified cron jobs from a browser +OrToLaunchASpecificJob=Or to check and launch a specific job from a browser +KeyForCronAccess=Security key for URL to launch cron jobs +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 +EnabledAndDisabled=Enabled and disabled +# Page list +CronLastOutput=Latest run output +CronLastResult=Latest result code +CronCommand=Command +CronList=Scheduled jobs +CronDelete=Delete scheduled jobs +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. +CronTask=Job +CronNone=None +CronDtStart=Not before +CronDtEnd=Not after +CronDtNextLaunch=Next execution +CronDtLastLaunch=Start date of latest execution +CronDtLastResult=End date of latest execution +CronFrequency=Frequency +CronClass=Class +CronMethod=Method +CronModule=Module +CronNoJobs=No jobs registered +CronPriority=Priority +CronLabel=Label +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches +CronEach=Every +JobFinished=Job launched and finished +Scheduled=Scheduled +#Page card +CronAdd= Add jobs +CronEvery=Execute job each +CronObject=Instance/Object to create +CronArgs=Parameters +CronSaveSucess=Save successfully +CronNote=Comment +CronFieldMandatory=Fields %s is mandatory +CronErrEndDateStartDt=End date cannot be before start date +StatusAtInstall=Status at module installation +CronStatusActiveBtn=Schedule +CronStatusInactiveBtn=Disable +CronTaskInactive=This job is disabled +CronId=Id +CronClassFile=Filename with class +CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For example to call the fetch method of Dolibarr Product object /htdocs/<u>product</u>/class/product.class.php, the value for module is<br><i>product</i> +CronClassFileHelp=The relative path and file name to load (path is relative to web server root directory). <BR> For example to call the fetch method of Dolibarr Product object htdocs/product/class/<u>product.class.php</u>, the value for class file name is<br><i>product/class/product.class.php</i> +CronObjectHelp=The object name to load. <BR> For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for class file name is<br><i>Product</i> +CronMethodHelp=The object method to launch. <BR> For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for method is<br><i>fetch</i> +CronArgsHelp=The method arguments. <BR> For example to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for paramters can be<br><i>0, ProductRef</i> +CronCommandHelp=The system command line to execute. +CronCreateJob=Create new Scheduled Job +CronFrom=From +# Info +# Common +CronType=Job type +CronType_method=Call method of a PHP Class +CronType_command=Shell command +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=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. +JobDisabled=Job disabled +MakeLocalDatabaseDumpShort=Local database backup +MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 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. +DATAPOLICYJob=Data cleaner and anonymizer +JobXMustBeEnabled=Job %s must be enabled +# Cron Boxes +LastExecutedScheduledJob=Last executed scheduled job +NextScheduledJobExecute=Next scheduled job to execute +NumberScheduledJobError=Number of scheduled jobs in error diff --git a/htdocs/langs/ar_IQ/deliveries.lang b/htdocs/langs/ar_IQ/deliveries.lang new file mode 100644 index 00000000000..fdfd6404a8a --- /dev/null +++ b/htdocs/langs/ar_IQ/deliveries.lang @@ -0,0 +1,32 @@ +# 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 <b>%s</b>? +DeliveryMethod=Delivery method +TrackingNumber=Tracking number +DeliveryNotValidated=Delivery not validated +StatusDeliveryCanceled=Canceled +StatusDeliveryDraft=Draft +StatusDeliveryValidated=Received +# merou PDF model +NameAndSignature=Name and Signature: +ToAndDate=To___________________________________ on ____/_____/__________ +GoodStatusDeclaration=Have received the goods above in good condition, +Deliverer=Deliverer: +Sender=Sender +Recipient=Recipient +ErrorStockIsNotEnough=There's not enough stock +Shippable=Shippable +NonShippable=Not Shippable +ShowShippableStatus=Show shippable status +ShowReceiving=Show delivery receipt +NonExistentOrder=Nonexistent order diff --git a/htdocs/langs/ar_IQ/dict.lang b/htdocs/langs/ar_IQ/dict.lang new file mode 100644 index 00000000000..0524cf1ca18 --- /dev/null +++ b/htdocs/langs/ar_IQ/dict.lang @@ -0,0 +1,359 @@ +# Dolibarr language file - Source file is en_US - dict +CountryFR=France +CountryBE=Belgium +CountryIT=Italy +CountryES=Spain +CountryDE=Germany +CountryCH=Switzerland +# 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 +CountryCN=China +CountryTN=Tunisia +CountryUS=United States +CountryMA=Morocco +CountryDZ=Algeria +CountryCA=Canada +CountryTG=Togo +CountryGA=Gabon +CountryNL=Netherlands +CountryHU=Hungary +CountryRU=Russia +CountrySE=Sweden +CountryCI=Ivory Coast +CountrySN=Senegal +CountryAR=Argentina +CountryCM=Cameroon +CountryPT=Portugal +CountrySA=Saudi Arabia +CountryMC=Monaco +CountryAU=Australia +CountrySG=Singapore +CountryAF=Afghanistan +CountryAX=Åland Islands +CountryAL=Albania +CountryAS=American Samoa +CountryAD=Andorra +CountryAO=Angola +CountryAI=Anguilla +CountryAQ=Antarctica +CountryAG=Antigua and Barbuda +CountryAM=Armenia +CountryAW=Aruba +CountryAT=Austria +CountryAZ=Azerbaijan +CountryBS=Bahamas +CountryBH=Bahrain +CountryBD=Bangladesh +CountryBB=Barbados +CountryBY=Belarus +CountryBZ=Belize +CountryBJ=Benin +CountryBM=Bermuda +CountryBT=Bhutan +CountryBO=Bolivia +CountryBA=Bosnia and Herzegovina +CountryBW=Botswana +CountryBV=Bouvet Island +CountryBR=Brazil +CountryIO=British Indian Ocean Territory +CountryBN=Brunei Darussalam +CountryBG=Bulgaria +CountryBF=Burkina Faso +CountryBI=Burundi +CountryKH=Cambodia +CountryCV=Cape Verde +CountryKY=Cayman Islands +CountryCF=Central African Republic +CountryTD=Chad +CountryCL=Chile +CountryCX=Christmas Island +CountryCC=Cocos (Keeling) Islands +CountryCO=Colombia +CountryKM=Comoros +CountryCG=Congo +CountryCD=Congo, The Democratic Republic of the +CountryCK=Cook Islands +CountryCR=Costa Rica +CountryHR=Croatia +CountryCU=Cuba +CountryCY=Cyprus +CountryCZ=Czech Republic +CountryDK=Denmark +CountryDJ=Djibouti +CountryDM=Dominica +CountryDO=Dominican Republic +CountryEC=Ecuador +CountryEG=Egypt +CountrySV=El Salvador +CountryGQ=Equatorial Guinea +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 +CountryGM=Gambia +CountryGE=Georgia +CountryGH=Ghana +CountryGI=Gibraltar +CountryGR=Greece +CountryGL=Greenland +CountryGD=Grenada +CountryGP=Guadeloupe +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) +CountryHN=Honduras +CountryHK=Hong Kong +CountryIS=Iceland +CountryIN=India +CountryID=Indonesia +CountryIR=Iran +CountryIQ=Iraq +CountryIL=Israel +CountryJM=Jamaica +CountryJP=Japan +CountryJO=Jordan +CountryKZ=Kazakhstan +CountryKE=Kenya +CountryKI=Kiribati +CountryKP=North Korea +CountryKR=South Korea +CountryKW=Kuwait +CountryKG=Kyrgyzstan +CountryLA=Lao +CountryLV=Latvia +CountryLB=Lebanon +CountryLS=Lesotho +CountryLR=Liberia +CountryLY=Libyan +CountryLI=Liechtenstein +CountryLT=Lithuania +CountryLU=Luxembourg +CountryMO=Macao +CountryMK=Macedonia, the former Yugoslav of +CountryMG=Madagascar +CountryMW=Malawi +CountryMY=Malaysia +CountryMV=Maldives +CountryML=Mali +CountryMT=Malta +CountryMH=Marshall Islands +CountryMQ=Martinique +CountryMR=Mauritania +CountryMU=Mauritius +CountryYT=Mayotte +CountryMX=Mexico +CountryFM=Micronesia +CountryMD=Moldova +CountryMN=Mongolia +CountryMS=Monserrat +CountryMZ=Mozambique +CountryMM=Myanmar (Burma) +CountryNA=Namibia +CountryNR=Nauru +CountryNP=Nepal +CountryAN=Netherlands Antilles +CountryNC=New Caledonia +CountryNZ=New Zealand +CountryNI=Nicaragua +CountryNE=Niger +CountryNG=Nigeria +CountryNU=Niue +CountryNF=Norfolk Island +CountryMP=Northern Mariana Islands +CountryNO=Norway +CountryOM=Oman +CountryPK=Pakistan +CountryPW=Palau +CountryPS=Palestinian Territory, Occupied +CountryPA=Panama +CountryPG=Papua New Guinea +CountryPY=Paraguay +CountryPE=Peru +CountryPH=Philippines +CountryPN=Pitcairn Islands +CountryPL=Poland +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 +CountryWS=Samoa +CountrySM=San Marino +CountryST=Sao Tome and Principe +CountryRS=Serbia +CountrySC=Seychelles +CountrySL=Sierra Leone +CountrySK=Slovakia +CountrySI=Slovenia +CountrySB=Solomon Islands +CountrySO=Somalia +CountryZA=South Africa +CountryGS=South Georgia and the South Sandwich Islands +CountryLK=Sri Lanka +CountrySD=Sudan +CountrySR=Suriname +CountrySJ=Svalbard and Jan Mayen +CountrySZ=Swaziland +CountrySY=Syrian +CountryTW=Taiwan +CountryTJ=Tajikistan +CountryTZ=Tanzania +CountryTH=Thailand +CountryTL=Timor-Leste +CountryTK=Tokelau +CountryTO=Tonga +CountryTT=Trinidad and Tobago +CountryTR=Turkey +CountryTM=Turkmenistan +CountryTC=Turks and Caicos Islands +CountryTV=Tuvalu +CountryUG=Uganda +CountryUA=Ukraine +CountryAE=United Arab Emirates +CountryUM=United States Minor Outlying Islands +CountryUY=Uruguay +CountryUZ=Uzbekistan +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 +CountryZM=Zambia +CountryZW=Zimbabwe +CountryGG=Guernsey +CountryIM=Isle of Man +CountryJE=Jersey +CountryME=Montenegro +CountryBL=Saint Barthelemy +CountryMF=Saint Martin + +##### Civilities ##### +CivilityMME=Mrs. +CivilityMR=Mr. +CivilityMLE=Ms. +CivilityMTRE=Master +CivilityDR=Doctor +##### Currencies ##### +Currencyeuros=Euros +CurrencyAUD=AU Dollars +CurrencySingAUD=AU Dollar +CurrencyCAD=CAN Dollars +CurrencySingCAD=CAN Dollar +CurrencyCHF=Swiss Francs +CurrencySingCHF=Swiss Franc +CurrencyEUR=Euros +CurrencySingEUR=Euro +CurrencyFRF=French Francs +CurrencySingFRF=French Franc +CurrencyGBP=GB Pounds +CurrencySingGBP=GB Pound +CurrencyINR=Indian rupees +CurrencySingINR=Indian rupee +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 +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 +CurrencyCentINR=paisa +CurrencyCentSingINR=paise +CurrencyThousandthSingTND=thousandth +#### 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 +#### 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 +#### Expense report categories #### +ExpAutoCat=Car +ExpCycloCat=Moped +ExpMotoCat=Motorbike +ExpAuto3CV=3 CV +ExpAuto4CV=4 CV +ExpAuto5CV=5 CV +ExpAuto6CV=6 CV +ExpAuto7CV=7 CV +ExpAuto8CV=8 CV +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 diff --git a/htdocs/langs/ar_IQ/donations.lang b/htdocs/langs/ar_IQ/donations.lang new file mode 100644 index 00000000000..d512abb2eea --- /dev/null +++ b/htdocs/langs/ar_IQ/donations.lang @@ -0,0 +1,35 @@ +# Dolibarr language file - Source file is en_US - donations +Donation=Donation +Donations=Donations +DonationRef=Donation ref. +Donor=Donor +AddDonation=Create a donation +NewDonation=New donation +DeleteADonation=Delete a donation +ConfirmDeleteADonation=Are you sure you want to delete this donation? +PublicDonation=Public donation +DonationsArea=Donations area +DonationStatusPromiseNotValidated=Draft promise +DonationStatusPromiseValidated=Validated promise +DonationStatusPaid=Donation received +DonationStatusPromiseNotValidatedShort=Draft +DonationStatusPromiseValidatedShort=Validated +DonationStatusPaidShort=Received +DonationTitle=Donation receipt +DonationDate=Donation date +DonationDatePayment=Payment date +ValidPromess=Validate promise +DonationReceipt=Donation receipt +DonationsModels=Documents models for donation receipts +LastModifiedDonations=Latest %s modified donations +DonationRecipient=Donation recipient +IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount +MinimumAmount=Minimum amount is %s +FreeTextOnDonations=Free text to show in footer +FrenchOptions=Options for France +DONATION_ART200=Show article 200 from CGI if you are concerned +DONATION_ART238=Show article 238 from CGI if you are concerned +DONATION_ART885=Show article 885 from CGI if you are concerned +DonationPayment=Donation payment +DonationValidated=Donation %s validated +DonationUseThirdparties=Use an existing thirdparty as coordinates of donators diff --git a/htdocs/langs/ar_IQ/ecm.lang b/htdocs/langs/ar_IQ/ecm.lang new file mode 100644 index 00000000000..c4ea8018111 --- /dev/null +++ b/htdocs/langs/ar_IQ/ecm.lang @@ -0,0 +1,47 @@ +# Dolibarr language file - Source file is en_US - ecm +ECMNbOfDocs=No. of documents in directory +ECMSection=Directory +ECMSectionManual=Manual directory +ECMSectionAuto=Automatic directory +ECMSectionsManual=Manual tree +ECMSectionsAuto=Automatic tree +ECMSections=Directories +ECMRoot=ECM Root +ECMNewSection=New directory +ECMAddSection=Add directory +ECMCreationDate=Creation date +ECMNbOfFilesInDir=Number of files in directory +ECMNbOfSubDir=Number of sub-directories +ECMNbOfFilesInSubDir=Number of files in sub-directories +ECMCreationUser=Creator +ECMArea=DMS/ECM area +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.<br>* Manual directories can be used to save documents not linked to a particular element. +ECMSectionWasRemoved=Directory <b>%s</b> has been deleted. +ECMSectionWasCreated=Directory <b>%s</b> has been created. +ECMSearchByKeywords=Search by keywords +ECMSearchByEntity=Search by object +ECMSectionOfDocuments=Directories of documents +ECMTypeAuto=Automatic +ECMDocsBy=Documents linked to %s +ECMNoDirectoryYet=No directory created +ShowECMSection=Show directory +DeleteSection=Remove directory +ConfirmDeleteSection=Can you confirm you want to delete the directory <b>%s</b>? +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) +ExtraFieldsEcmFiles=Extrafields Ecm Files +ExtraFieldsEcmDirectories=Extrafields Ecm Directories +ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ar_IQ/errors.lang b/htdocs/langs/ar_IQ/errors.lang new file mode 100644 index 00000000000..e71c805d506 --- /dev/null +++ b/htdocs/langs/ar_IQ/errors.lang @@ -0,0 +1,298 @@ +# Dolibarr language file - Source file is en_US - errors + +# No errors +NoErrorCommitIsDone=No error, we commit +# Errors +ErrorButCommitIsDone=Errors found but we validate despite this +ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) +ErrorBadUrl=Url %s is wrong +ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorLoginAlreadyExists=Login %s already exists. +ErrorGroupAlreadyExists=Group %s already exists. +ErrorRecordNotFound=Record not found. +ErrorFailToCopyFile=Failed to copy file '<b>%s</b>' into '<b>%s</b>'. +ErrorFailToCopyDir=Failed to copy directory '<b>%s</b>' into '<b>%s</b>'. +ErrorFailToRenameFile=Failed to rename file '<b>%s</b>' into '<b>%s</b>'. +ErrorFailToDeleteFile=Failed to remove file '<b>%s</b>'. +ErrorFailToCreateFile=Failed to create file '<b>%s</b>'. +ErrorFailToRenameDir=Failed to rename directory '<b>%s</b>' into '<b>%s</b>'. +ErrorFailToCreateDir=Failed to create directory '<b>%s</b>'. +ErrorFailToDeleteDir=Failed to delete directory '<b>%s</b>'. +ErrorFailToMakeReplacementInto=Failed to make replacement into file '<b>%s</b>'. +ErrorFailToGenerateFile=Failed to generate file '<b>%s</b>'. +ErrorThisContactIsAlreadyDefinedAsThisType=This contact is already defined as contact for this type. +ErrorCashAccountAcceptsOnlyCashMoney=This bank account is a cash account, so it accepts payments of type cash only. +ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be different. +ErrorBadThirdPartyName=Bad value for third-party name +ErrorProdIdIsMandatory=The %s is mandatory +ErrorBadCustomerCodeSyntax=Bad syntax for customer code +ErrorBadBarCodeSyntax=Bad syntax for barcode. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned. +ErrorCustomerCodeRequired=Customer code required +ErrorBarCodeRequired=Barcode required +ErrorCustomerCodeAlreadyUsed=Customer code already used +ErrorBarCodeAlreadyUsed=Barcode already used +ErrorPrefixRequired=Prefix required +ErrorBadSupplierCodeSyntax=Bad syntax for vendor code +ErrorSupplierCodeRequired=Vendor code required +ErrorSupplierCodeAlreadyUsed=Vendor code already used +ErrorBadParameters=Bad parameters +ErrorWrongParameters=Wrong or missing parameters +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=Value '%s' has wrong date format +ErrorWrongDate=Date is not correct! +ErrorFailedToWriteInDir=Failed to write in directory %s +ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s) +ErrorUserCannotBeDelete=User cannot be deleted. Maybe it is associated to Dolibarr entities. +ErrorFieldsRequired=Some required fields were not filled. +ErrorSubjectIsRequired=The email topic is required +ErrorFailedToCreateDir=Failed to create a directory. Check that Web server user has permissions to write into Dolibarr documents directory. If parameter <b>safe_mode</b> is enabled on this PHP, check that Dolibarr php files owns to web server user (or group). +ErrorNoMailDefinedForThisUser=No mail defined for this user +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete +ErrorFeatureNeedJavascript=This feature need javascript to be activated to work. Change this in setup - display. +ErrorTopMenuMustHaveAParentWithId0=A menu of type 'Top' can't have a parent menu. Put 0 in parent menu or choose a menu of type 'Left'. +ErrorLeftMenuMustHaveAParentId=A menu of type 'Left' must have a parent id. +ErrorFileNotFound=File <b>%s</b> not found (Bad path, wrong permissions or access denied by PHP openbasedir or safe_mode parameter) +ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or access denied by PHP openbasedir or safe_mode parameter) +ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. +ErrorDirAlreadyExists=A directory with this name already exists. +ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. +ErrorPartialFile=File not received completely by server. +ErrorNoTmpDir=Temporary directy %s does not exists. +ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. +ErrorFileSizeTooLarge=File size is too large. +ErrorFieldTooLong=Field %s is too long. +ErrorSizeTooLongForIntType=Size too long for int type (%s digits maximum) +ErrorSizeTooLongForVarcharType=Size too long for string type (%s chars maximum) +ErrorNoValueForSelectType=Please fill value for select list +ErrorNoValueForCheckBoxType=Please fill value for checkbox list +ErrorNoValueForRadioType=Please fill value for radio list +ErrorBadFormatValueList=The list value cannot have more than one comma: <u>%s</u>, but need at least one: key,value +ErrorFieldCanNotContainSpecialCharacters=The field <b>%s</b> must not contains special characters. +ErrorFieldCanNotContainSpecialNorUpperCharacters=The field <b>%s</b> must not contain special characters, nor upper case characters and cannot contain only numbers. +ErrorFieldMustHaveXChar=The field <b>%s</b> must have at least %s characters. +ErrorNoAccountancyModuleLoaded=No accountancy module activated +ErrorExportDuplicateProfil=This profile name already exists for this export set. +ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete. +ErrorLDAPMakeManualTest=A .ldif file has been generated in directory %s. Try to load it manually from command line to have more information on errors. +ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorPleaseTypeBankTransactionReportName=Please enter the bank statement name where the entry has to be reported (Format YYYYMM or YYYYMMDD) +ErrorRecordHasChildren=Failed to delete record since it has some child records. +ErrorRecordHasAtLeastOneChildOfType=Object has at least one child of type %s +ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into another object. +ErrorModuleRequireJavascript=Javascript must not be disabled to have this feature working. To enable/disable Javascript, go to menu Home->Setup->Display. +ErrorPasswordsMustMatch=Both typed passwords must match each other +ErrorContactEMail=A technical error occured. Please, contact administrator to following email <b>%s</b> and provide the error code <b>%s</b> in your message, or add a screen copy of this page. +ErrorWrongValueForField=Field <b>%s</b>: '<b>%s</b>' does not match regex rule <b>%s</b> +ErrorFieldValueNotIn=Field <b>%s</b>: '<b>%s</b>' is not a value found in field <b>%s</b> of <b>%s</b> +ErrorFieldRefNotIn=Field <b>%s</b>: '<b>%s</b>' is not a <b>%s</b> existing ref +ErrorsOnXLines=%s errors found +ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the file (file might be infected by a virus) +ErrorSpecialCharNotAllowedForField=Special characters are not allowed for field "%s" +ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module. +ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor +ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities +ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete. +ErrorBadMask=Error on mask +ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number +ErrorBadMaskBadRazMonth=Error, bad reset value +ErrorMaxNumberReachForThisMask=Maximum number reached for this mask +ErrorCounterMustHaveMoreThan3Digits=Counter must have more than 3 digits +ErrorSelectAtLeastOne=Error, select at least one entry. +ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transaction that is conciliated +ErrorProdIdAlreadyExist=%s is assigned to another third +ErrorFailedToSendPassword=Failed to send password +ErrorFailedToLoadRSSFile=Fails to get RSS feed. Try to add constant MAIN_SIMPLEXMLLOAD_DEBUG if error messages does not provide enough information. +ErrorForbidden=Access denied.<br>You try to access to a page, area or feature of a disabled module or without being in an authenticated session or that is not allowed to your user. +ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s. +ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...). +ErrorNoImagickReadimage=Class Imagick is not found in this PHP. No preview can be available. Administrators can disable this tab from menu Setup - Display. +ErrorRecordAlreadyExists=Record already exists +ErrorLabelAlreadyExists=This label already exists +ErrorCantReadFile=Failed to read file '%s' +ErrorCantReadDir=Failed to read directory '%s' +ErrorBadLoginPassword=Bad value for login or password +ErrorLoginDisabled=Your account has been disabled +ErrorFailedToRunExternalCommand=Failed to run external command. Check it is available and runnable by your PHP server. If PHP <b>Safe Mode</b> is enabled, check that command is inside a directory defined by parameter <b>safe_mode_exec_dir</b>. +ErrorFailedToChangePassword=Failed to change password +ErrorLoginDoesNotExists=User with login <b>%s</b> could not be found. +ErrorLoginHasNoEmail=This user has no email address. Process aborted. +ErrorBadValueForCode=Bad value for security code. Try again with new value... +ErrorBothFieldCantBeNegative=Fields %s and %s can't be both negative +ErrorFieldCantBeNegativeOnInvoice=Field <strong>%s</strong> 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 <b>%s</b>%%). +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. +ErrorQtyForCustomerInvoiceCantBeNegative=Quantity for line into customer invoices can't be negative +ErrorWebServerUserHasNotPermission=User account <b>%s</b> used to execute web server has no permission for that +ErrorNoActivatedBarcode=No barcode type activated +ErrUnzipFails=Failed to unzip %s with ZipArchive +ErrNoZipEngine=No engine to zip/unzip %s file in this PHP +ErrorFileMustBeADolibarrPackage=The file %s must be a Dolibarr zip package +ErrorModuleFileRequired=You must select a Dolibarr module package file +ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to talk with Paypal +ErrorFailedToAddToMailmanList=Failed to add record %s to Mailman list %s or SPIP base +ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s or SPIP base +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 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 <b>%s</b> 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 +ErrorWarehouseMustDiffers=Source and target warehouses must differs +ErrorBadFormat=Bad format! +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any third party. Link member to an existing third party or create a new third party before creating subscription with invoice. +ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. +ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank entry that was reconciled +ErrorCantDeletePaymentSharedWithPayedInvoice=Can't delete a payment shared by at least one invoice with status Paid +ErrorPriceExpression1=Cannot assign to constant '%s' +ErrorPriceExpression2=Cannot redefine built-in function '%s' +ErrorPriceExpression3=Undefined variable '%s' in function definition +ErrorPriceExpression4=Illegal character '%s' +ErrorPriceExpression5=Unexpected '%s' +ErrorPriceExpression6=Wrong number of arguments (%s given, %s expected) +ErrorPriceExpression8=Unexpected operator '%s' +ErrorPriceExpression9=An unexpected error occured +ErrorPriceExpression10=Operator '%s' lacks operand +ErrorPriceExpression11=Expecting '%s' +ErrorPriceExpression14=Division by zero +ErrorPriceExpression17=Undefined variable '%s' +ErrorPriceExpression19=Expression not found +ErrorPriceExpression20=Empty expression +ErrorPriceExpression21=Empty result '%s' +ErrorPriceExpression22=Negative result '%s' +ErrorPriceExpression23=Unknown or non set variable '%s' in %s +ErrorPriceExpression24=Variable '%s' exists but has no value +ErrorPriceExpressionInternal=Internal error '%s' +ErrorPriceExpressionUnknown=Unknown error '%s' +ErrorSrcAndTargetWarehouseMustDiffers=Source and target warehouses must differs +ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without lot/serial information, on product '%s' requiring lot/serial information +ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=All recorded receptions must first be verified (approved or denied) before being allowed to do this action +ErrorCantSetReceptionToTotalDoneWithReceptionDenied=All recorded receptions must first be verified (approved) before being allowed to do this action +ErrorGlobalVariableUpdater0=HTTP request failed with error '%s' +ErrorGlobalVariableUpdater1=Invalid JSON format '%s' +ErrorGlobalVariableUpdater2=Missing parameter '%s' +ErrorGlobalVariableUpdater3=The requested data was not found in result +ErrorGlobalVariableUpdater4=SOAP client failed with error '%s' +ErrorGlobalVariableUpdater5=No global variable selected +ErrorFieldMustBeANumeric=Field <b>%s</b> must be a numeric value +ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided +ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead. So you must also enter it's status. +ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s +ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In Module Descriptor (bad value for key fk_menu) +ErrorSavingChanges=An error has occurred when saving the changes +ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship +ErrorFileMustHaveFormat=File must have format %s +ErrorFilenameCantStartWithDot=Filename can't start with a '.' +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. +ErrorStockIsNotEnoughToAddProductOnInvoice=Stock is not enough for product %s to add it into a new invoice. +ErrorStockIsNotEnoughToAddProductOnShipment=Stock is not enough for product %s to add it into a new shipment. +ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enough for product %s to add it into a new proposal. +ErrorFailedToLoadLoginFileForMode=Failed to get the login key for mode '%s'. +ErrorModuleNotFound=File of module was not found. +ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source line id %s (%s) +ErrorFieldAccountNotDefinedForInvoiceLine=Value for Accounting account not defined for invoice id %s (%s) +ErrorFieldAccountNotDefinedForLine=Value for Accounting account not defined for the line (%s) +ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the following syntax rule %s +ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information. +ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. +ErrorTaskAlreadyAssigned=Task already assigned to user +ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. +ErrorModuleFileSeemsToHaveAWrongFormat2=At least one mandatory directory must exists into zip of module: <strong>%s</strong> or <strong>%s</strong> +ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong> +ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s. +ErrorNoWarehouseDefined=Error, no warehouses defined. +ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' for payment is defined, but value for 'ref' is not valid. +ErrorTooManyErrorsProcessStopped=Too many errors. Process was stopped. +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Mass validation is not possible when option to increase/decrease stock is set on this action (you must validate one by one so you can define the warehouse to increase/decrease) +ErrorObjectMustHaveStatusDraftToBeValidated=Object %s must have status 'Draft' to be validated. +ErrorObjectMustHaveLinesToBeValidated=Object %s must have lines to be validated. +ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Only validated invoices can be sent using the "Send by email" mass action. +ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a predefined product or not +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 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 <strong>%s</strong> 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. +ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s +ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. +ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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 <b>%s</b>) for the field '<b>%s</b>', 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 '<b>%s</b>' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '<b>%s</b>' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type <b>%s</b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter <b>%s</b> must be enabled into <b>conf/conf.php<b> to allow use of Command Line Interface by the internal job scheduler +ErrorLoginDateValidity=Error, this login is outside the validity date range +ErrorValueLength=Length of field '<b>%s</b>' must be higher than '<b>%s</b>' +ErrorReservedKeyword=The word '<b>%s</b>' is a reserved keyword +ErrorNotAvailableWithThisDistribution=Not available with this distribution +ErrorPublicInterfaceNotEnabled=Public interface was not enabled +ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page +ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page +ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account + +# 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. +WarningMandatorySetupNotComplete=Click here to setup mandatory parameters +WarningEnableYourModulesApplications=Click here to enable your modules and applications +WarningSafeModeOnCheckExecDir=Warning, PHP option <b>safe_mode</b> is on so command must be stored inside a directory declared by php parameter <b>safe_mode_exec_dir</b>. +WarningBookmarkAlreadyExists=A bookmark with this title or this target (URL) already exists. +WarningPassIsEmpty=Warning, database password is empty. This is a security hole. You should add a password to your database and change your conf.php file to reflect this. +WarningConfFileMustBeReadOnly=Warning, your config file (<b>htdocs/conf/conf.php</b>) can be overwritten by the web server. This is a serious security hole. Modify permissions on file to be in read only mode for operating system user used by Web server. If you use Windows and FAT format for your disk, you must know that this file system does not allow to add permissions on file, so can't be completely safe. +WarningsOnXLines=Warnings on <b>%s</b> source record(s) +WarningNoDocumentModelActivated=No model, for document generation, has been activated. A model will be chosen by default until you check your module setup. +WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable the installation/migration tools by adding a file <b>install.lock</b> into directory <b>%s</b>. Omitting the creation of this file is a grave security risk. +WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other Setup). +WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. +WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. +WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. +WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s. +WarningTooManyDataPleaseUseMoreFilters=Too many data (more than %s lines). Please use more filters or set the constant %s to a higher limit. +WarningSomeLinesWithNullHourlyRate=Some times were recorded by some users while their hourly rate was not defined. A value of 0 %s per hour was used but this may result in wrong valuation of time spent. +WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security purpose you will have to login with your new login before next action. +WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language +WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists +WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. +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=Warning, failed to add file entry into ECM database index table +WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 +WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ar_IQ/exports.lang b/htdocs/langs/ar_IQ/exports.lang new file mode 100644 index 00000000000..a0eb7161ef2 --- /dev/null +++ b/htdocs/langs/ar_IQ/exports.lang @@ -0,0 +1,136 @@ +# Dolibarr language file - Source file is en_US - exports +ExportsArea=Exports +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 <b>%s</b>. +ExportableFields=Exportable fields +ExportedFields=Exported fields +ImportModelName=Import profile name +ImportModelSaved=Import profile saved as <b>%s</b>. +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 +LibraryShort=Library +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 +LineDescription=Description of line +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) +Field=Field +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.<br>Click on the "<b>%s</b>" button to run a check of the file structure/contents and simulate the import process.<br><b>No data will be changed in your database</b>. +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.<br>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: <b>%s</b>, 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 <b>%s</b>. +TooMuchErrors=There are still <b>%s</b> other source lines with errors but output has been limited. +TooMuchWarnings=There are still <b>%s</b> other source lines with warnings but output has been limited. +EmptyLine=Empty line (will be discarded) +CorrectErrorBeforeRunningImport=You <b>must</b> correct all errors <b>before</b> running the definitive import. +FileWasImported=File was imported with number <b>%s</b>. +YouCanUseImportIdToFindRecord=You can find all the imported records in your database by filtering on field <b>import_key='%s'</b>. +NbOfLinesOK=Number of lines with no errors and no warnings: <b>%s</b>. +NbOfLinesImported=Number of lines successfully imported: <b>%s</b>. +DataComeFromNoWhere=Value to insert comes from nowhere in source file. +DataComeFromFileFieldNb=Value to insert comes from field number <b>%s</b> in source file. +DataComeFromIdFoundFromRef=Value that comes from field number <b>%s</b> of source file will be used to find the id of the parent object to use (so the object <b>%s</b> that has the ref. from source file must exist in the database). +DataComeFromIdFoundFromCodeId=Code that comes from field number <b>%s</b> 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 <b>%s</b>). 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 <b>%s</b> +ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary <b>%s</b> +CSVFormatDesc=<b>Comma Separated Value</b> file format (.csv).<br>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=<b>Excel</b> file format (.xls)<br>This is the native Excel 95 format (BIFF5). +Excel2007FormatDesc=<b>Excel</b> file format (.xlsx)<br>This is the native Excel 2007 format (SpreadsheetML). +TsvFormatDesc=<b>Tab Separated Value</b> file format (.tsv)<br>This is a text file format where fields are separated by a tabulator [tab]. +ExportFieldAutomaticallyAdded=Field <b>%s</b> 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<br>YYYY+YYYY, YYYYMM+YYYYMM, YYYYMMDD+YYYYMMDD: filters over a range of years/months/days<br> > YYYY, > YYYYMM, > YYYYMMDD: filters on all following years/months/days<br> < YYYY, < YYYYMM, < YYYYMMDD: filters on all previous years/months/days +ExportNumericFilter=NNNNN filters by one value<br>NNNNN+NNNNN filters over a range of values<br>< NNNNN filters by lower values<br>> NNNNN filters by higher values +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.<br>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 +## 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 +## imports updates +KeysToUseForUpdates=Key (column) to use for <b>updating</b> existing data +NbInsert=Number of inserted lines: %s +NbUpdate=Number of updated lines: %s +MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/ar_IQ/externalsite.lang b/htdocs/langs/ar_IQ/externalsite.lang new file mode 100644 index 00000000000..452100c65b3 --- /dev/null +++ b/htdocs/langs/ar_IQ/externalsite.lang @@ -0,0 +1,5 @@ +# Dolibarr language file - Source file is en_US - externalsite +ExternalSiteSetup=Setup link to external website +ExternalSiteURL=External Site URL of HTML iframe content +ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. +ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ar_IQ/ftp.lang b/htdocs/langs/ar_IQ/ftp.lang new file mode 100644 index 00000000000..254a2a698ce --- /dev/null +++ b/htdocs/langs/ar_IQ/ftp.lang @@ -0,0 +1,14 @@ +# Dolibarr language file - Source file is en_US - ftp +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 <b>%s</b>. +FTPFailedToRemoveDir=Failed to remove directory <b>%s</b>: check permissions and that the directory is empty. +FTPPassiveMode=Passive mode +ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... +FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ar_IQ/help.lang b/htdocs/langs/ar_IQ/help.lang new file mode 100644 index 00000000000..048de16d3c0 --- /dev/null +++ b/htdocs/langs/ar_IQ/help.lang @@ -0,0 +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, <a href="%s">click here to continue to use Dolibarr</a>. +TypeOfSupport=Type of support +TypeSupportCommunauty=Community (free) +TypeSupportCommercial=Commercial +TypeOfHelp=Type +NeedHelpCenter=Need help or support? +Efficiency=Efficiency +TypeHelpOnly=Help only +TypeHelpDev=Help+Development +TypeHelpDevForm=Help+Development+Training +BackToHelpCenter=Otherwise, <a href="%s">go back to Help center home page</a>. +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: <br><b><a href="%s" target="_blank">%s</a></b> diff --git a/htdocs/langs/ar_IQ/holiday.lang b/htdocs/langs/ar_IQ/holiday.lang new file mode 100644 index 00000000000..2393a02ee50 --- /dev/null +++ b/htdocs/langs/ar_IQ/holiday.lang @@ -0,0 +1,134 @@ +# Dolibarr language file - Source file is en_US - holiday +HRM=HRM +Holidays=Leave +CPTitreMenu=Leave +MenuReportMonth=Monthly statement +MenuAddCP=New leave request +NotActiveModCP=You must enable the module Leave to view this page. +AddCP=Make a leave request +DateDebCP=Start date +DateFinCP=End date +DraftCP=Draft +ToReviewCP=Awaiting approval +ApprovedCP=Approved +CancelCP=Canceled +RefuseCP=Refused +ValidatorCP=Approver +ListeCP=List of leave +Leave=Leave request +LeaveId=Leave ID +ReviewedByCP=Will be approved by +UserID=User ID +UserForApprovalID=User for approval ID +UserForApprovalFirstname=First name of approval user +UserForApprovalLastname=Last name of approval user +UserForApprovalLogin=Login of approval user +DescCP=Description +SendRequestCP=Create leave request +DelayToRequestCP=Leave requests must be made at least <b>%s day(s)</b> before them. +MenuConfCP=Balance of leave +SoldeCPUser=Leave balance is <b>%s</b> days. +ErrorEndDateCP=You must select an end date greater than the start date. +ErrorSQLCreateCP=An SQL error occurred during the creation: +ErrorIDFicheCP=An error has occurred, the leave request does not exist. +ReturnCP=Return to previous page +ErrorUserViewCP=You are not authorized to read this leave request. +InfosWorkflowCP=Information Workflow +RequestByCP=Requested by +TitreRequestCP=Leave request +TypeOfLeaveId=Type of leave ID +TypeOfLeaveCode=Type of leave code +TypeOfLeaveLabel=Type of leave label +NbUseDaysCP=Number of days of leave used +NbUseDaysCPHelp=The calculation takes into account the non-working days and the holidays defined in the dictionary. +NbUseDaysCPShort=Days of leave +NbUseDaysCPShortInMonth=Days of leave in month +DayIsANonWorkingDay=%s is a non-working day +DateStartInMonth=Start date in month +DateEndInMonth=End date in month +EditCP=Edit +DeleteCP=Delete +ActionRefuseCP=Refuse +ActionCancelCP=Cancel +StatutCP=Status +TitleDeleteCP=Delete the leave request +ConfirmDeleteCP=Confirm the deletion of this leave request? +ErrorCantDeleteCP=Error you don't have the right to delete this leave request. +CantCreateCP=You don't have the right to make leave requests. +InvalidValidatorCP=You must choose the approver for your leave request. +NoDateDebut=You must select a start date. +NoDateFin=You must select an end date. +ErrorDureeCP=Your leave request does not contain working day. +TitleValidCP=Approve the leave request +ConfirmValidCP=Are you sure you want to approve the leave request? +DateValidCP=Date approved +TitleToValidCP=Send leave request +ConfirmToValidCP=Are you sure you want to send the leave request? +TitleRefuseCP=Refuse the leave request +ConfirmRefuseCP=Are you sure you want to refuse the leave request? +NoMotifRefuseCP=You must choose a reason for refusing the request. +TitleCancelCP=Cancel the leave request +ConfirmCancelCP=Are you sure you want to cancel the leave request? +DetailRefusCP=Reason for refusal +DateRefusCP=Date of refusal +DateCancelCP=Date of cancellation +DefineEventUserCP=Assign an exceptional leave for a user +addEventToUserCP=Assign leave +NotTheAssignedApprover=You are not the assigned approver +MotifCP=Reason +UserCP=User +ErrorAddEventToUserCP=An error occurred while adding the exceptional leave. +AddEventToUserOkCP=The addition of the exceptional leave has been completed. +MenuLogCP=View change logs +LogCP=Log of all updates made to "Balance of Leave" +ActionByCP=Updated by +UserUpdateCP=Updated for +PrevSoldeCP=Previous Balance +NewSoldeCP=New Balance +alreadyCPexist=A leave request has already been done on this period. +FirstDayOfHoliday=Beginning day of leave request +LastDayOfHoliday=Ending day of leave request +BoxTitleLastLeaveRequests=Latest %s modified leave requests +HolidaysMonthlyUpdate=Monthly update +ManualUpdate=Manual update +HolidaysCancelation=Leave request cancelation +EmployeeLastname=Employee last name +EmployeeFirstname=Employee first name +TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed +LastHolidays=Latest %s leave requests +AllHolidays=All leave requests +HalfDay=Half day +NotTheAssignedApprover=You are not the assigned approver +LEAVE_PAID=Paid vacation +LEAVE_SICK=Sick leave +LEAVE_OTHER=Other leave +LEAVE_PAID_FR=Paid vacation +## Configuration du Module ## +LastUpdateCP=Last automatic update of leave allocation +MonthOfLastMonthlyUpdate=Month of last automatic update of leave allocation +UpdateConfCPOK=Updated successfully. +Module27130Name= Management of leave requests +Module27130Desc= Management of leave requests +ErrorMailNotSend=An error occurred while sending email: +NoticePeriod=Notice period +#Messages +HolidaysToValidate=Validate leave requests +HolidaysToValidateBody=Below is a leave request to validate +HolidaysToValidateDelay=This leave request will take place within a period of less than %s days. +HolidaysToValidateAlertSolde=The user who made this leave request does not have enough available days. +HolidaysValidated=Validated leave requests +HolidaysValidatedBody=Your leave request for %s to %s has been validated. +HolidaysRefused=Request denied +HolidaysRefusedBody=Your leave request for %s to %s has been denied for the following reason: +HolidaysCanceled=Canceled leaved request +HolidaysCanceledBody=Your leave request for %s to %s has been canceled. +FollowedByACounter=1: This type of leave need to be followed by a counter. Counter is incremented manually or automatically and when a leave request is validated, counter is decremented.<br>0: Not followed by a counter. +NoLeaveWithCounterDefined=There is no leave types defined that need to be followed by a counter +GoIntoDictionaryHolidayTypes=Go into <strong>Home - Setup - Dictionaries - Type of leave</strong> to setup the different types of leaves. +HolidaySetup=Setup of module Leave +HolidaysNumberingModules=Numbering models for leave requests +TemplatePDFHolidays=Template for leave requests PDF +FreeLegalTextOnHolidays=Free text on PDF +WatermarkOnDraftHolidayCards=Watermarks on draft leave requests +HolidaysToApprove=Holidays to approve +NobodyHasPermissionToValidateHolidays=Nobody has permission to validate holidays diff --git a/htdocs/langs/ar_IQ/hrm.lang b/htdocs/langs/ar_IQ/hrm.lang new file mode 100644 index 00000000000..3b8f137e103 --- /dev/null +++ b/htdocs/langs/ar_IQ/hrm.lang @@ -0,0 +1,19 @@ +# Dolibarr language file - en_US - hrm +# Admin +HRM_EMAIL_EXTERNAL_SERVICE=Email to prevent HRM external service +Establishments=Establishments +Establishment=Establishment +NewEstablishment=New establishment +DeleteEstablishment=Delete establishment +ConfirmDeleteEstablishment=Are you sure you wish to delete this establishment? +OpenEtablishment=Open establishment +CloseEtablishment=Close establishment +# Dictionary +DictionaryPublicHolidays=HRM - Public holidays +DictionaryDepartment=HRM - Department list +DictionaryFunction=HRM - Job positions +# Module +Employees=Employees +Employee=Employee +NewEmployee=New employee +ListOfEmployees=List of employees diff --git a/htdocs/langs/ar_IQ/install.lang b/htdocs/langs/ar_IQ/install.lang new file mode 100644 index 00000000000..63947dad154 --- /dev/null +++ b/htdocs/langs/ar_IQ/install.lang @@ -0,0 +1,217 @@ +# Dolibarr language file - Source file is en_US - install +InstallEasy=Just follow the instructions step by step. +MiscellaneousChecks=Prerequisites check +ConfFileExists=Configuration file <b>%s</b> exists. +ConfFileDoesNotExistsAndCouldNotBeCreated=Configuration file <b>%s</b> does not exist and could not be created! +ConfFileCouldBeCreated=Configuration file <b>%s</b> could be created. +ConfFileIsNotWritable=Configuration file <b>%s</b> is not writable. Check permissions. For first install, your web server must be able to write into this file during configuration process ("chmod 666" for example on a Unix like OS). +ConfFileIsWritable=Configuration file <b>%s</b> is writable. +ConfFileMustBeAFileNotADir=Configuration file <b>%s</b> must be a file, not a directory. +ConfFileReload=Reloading parameters from configuration file. +PHPSupportPOSTGETOk=This PHP supports variables POST and GET. +PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter <b>variables_order</b> in php.ini. +PHPSupportSessions=This PHP supports sessions. +PHPSupport=This PHP supports %s functions. +PHPMemoryOK=Your PHP max session memory is set to <b>%s</b>. This should be enough. +PHPMemoryTooLow=Your PHP max session memory is set to <b>%s</b> bytes. This is too low. Change your <b>php.ini</b> to set <b>memory_limit</b> parameter to at least <b>%s</b> bytes. +Recheck=Click here for a more detailed test +ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. This feature is required to allow Dolibarr to work. Check your PHP setup and permissions of the sessions directory. +ErrorPHPDoesNotSupportGD=Your PHP installation does not support GD graphical functions. No graphs will be available. +ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl. +ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions. +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. +ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions. +ErrorDirDoesNotExists=Directory %s does not exist. +ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters. +ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'. +ErrorFailedToCreateDatabase=Failed to create database '%s'. +ErrorFailedToConnectToDatabase=Failed to connect to database '%s'. +ErrorDatabaseVersionTooLow=Database version (%s) too old. Version %s or higher is required. +ErrorPHPVersionTooLow=PHP version too old. Version %s is required. +ErrorConnectedButDatabaseNotFound=Connection to server successful but database '%s' not found. +ErrorDatabaseAlreadyExists=Database '%s' already exists. +IfDatabaseNotExistsGoBackAndUncheckCreate=If the database does not exist, go back and check option "Create database". +IfDatabaseExistsGoBackAndCheckCreate=If database already exists, go back and uncheck "Create database" option. +WarningBrowserTooOld=Version of browser is too old. Upgrading your browser to a recent version of Firefox, Chrome or Opera is highly recommended. +PHPVersion=PHP Version +License=Using license +ConfigurationFile=Configuration file +WebPagesDirectory=Directory where web pages are stored +DocumentsDirectory=Directory to store uploaded and generated documents +URLRoot=URL Root +ForceHttps=Force secure connections (https) +CheckToForceHttps=Check this option to force secure connections (https).<br>This requires that the web server is configured with an SSL certificate. +DolibarrDatabase=Dolibarr Database +DatabaseType=Database type +DriverType=Driver type +Server=Server +ServerAddressDescription=Name or ip address for the database server. Usually 'localhost' when the database server is hosted on the same server as the web server. +ServerPortDescription=Database server port. Keep empty if unknown. +DatabaseServer=Database server +DatabaseName=Database name +DatabasePrefix=Database table prefix +DatabasePrefixDescription=Database table prefix. If empty, defaults to llx_. +AdminLogin=User account for the Dolibarr database owner. +PasswordAgain=Retype password confirmation +AdminPassword=Password for Dolibarr database owner. +CreateDatabase=Create database +CreateUser=Create user account or grant user account permission on the Dolibarr database +DatabaseSuperUserAccess=Database server - Superuser access +CheckToCreateDatabase=Check the box if the database does not exist yet and so must be created.<br>In this case, you must also fill in the user name and password for the superuser account at the bottom of this page. +CheckToCreateUser=Check the box if:<br>the database user account does not yet exist and so must be created, or<br>if the user account exists but the database does not exist and permissions must be granted.<br>In this case, you must enter the user account and password and <b>also</b> the superuser account name and password at the bottom of this page. If this box is unchecked, database owner and password must already exist. +DatabaseRootLoginDescription=Superuser account name (to create new databases or new users), mandatory if the database or its owner does not already exist. +KeepEmptyIfNoPassword=Leave empty if superuser has no password (NOT recommended) +SaveConfigurationFile=Saving parameters to +ServerConnection=Server connection +DatabaseCreation=Database creation +CreateDatabaseObjects=Database objects creation +ReferenceDataLoading=Reference data loading +TablesAndPrimaryKeysCreation=Tables and Primary keys creation +CreateTableAndPrimaryKey=Create table %s +CreateOtherKeysForTable=Create foreign keys and indexes for table %s +OtherKeysCreation=Foreign keys and indexes creation +FunctionsCreation=Functions creation +AdminAccountCreation=Administrator login creation +PleaseTypePassword=Please type a password, empty passwords are not allowed! +PleaseTypeALogin=Please type a login! +PasswordsMismatch=Passwords differs, please try again! +SetupEnd=End of setup +SystemIsInstalled=This installation is complete. +SystemIsUpgraded=Dolibarr has been upgraded successfully. +YouNeedToPersonalizeSetup=You need to configure Dolibarr to suit your needs (appearance, features, ...). To do this, please follow the link below: +AdminLoginCreatedSuccessfuly=Dolibarr administrator login '<b>%s</b>' created successfully. +GoToDolibarr=Go to Dolibarr +GoToSetupArea=Go to Dolibarr (setup area) +MigrationNotFinished=The database version is not completely up to date: run the upgrade process again. +GoToUpgradePage=Go to upgrade page again +WithNoSlashAtTheEnd=Without the slash "/" at the end +DirectoryRecommendation=<span class="warning">IMPORTANT</span>: You must use a directory that is outside of the web pages (so do not use a subdirectory of previous parameter). +LoginAlreadyExists=Already exists +DolibarrAdminLogin=Dolibarr admin login +AdminLoginAlreadyExists=Dolibarr administrator account '<b>%s</b>' already exists. Go back if you want to create another one. +FailedToCreateAdminLogin=Failed to create Dolibarr administrator account. +WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should add a file called <b>install.lock</b> into the Dolibarr document directory in order to prevent the accidental/malicious use of the install tools again. +FunctionNotAvailableInThisPHP=Not available in this PHP +ChoosedMigrateScript=Choose migration script +DataMigration=Database migration (data) +DatabaseMigration=Database migration (structure + some data) +ProcessMigrateScript=Script processing +ChooseYourSetupMode=Choose your setup mode and click "Start"... +FreshInstall=Fresh install +FreshInstallDesc=Use this mode if this is your first install. If not, this mode can repair a incomplete previous install. If you want to upgrade your version, choose "Upgrade" mode. +Upgrade=Upgrade +UpgradeDesc=Use this mode if you have replaced old Dolibarr files with files from a newer version. This will upgrade your database and data. +Start=Start +InstallNotAllowed=Setup not allowed by <b>conf.php</b> permissions +YouMustCreateWithPermission=You must create file %s and set write permissions on it for the web server during install process. +CorrectProblemAndReloadPage=Please fix the problem and press F5 to reload the page. +AlreadyDone=Already migrated +DatabaseVersion=Database version +ServerVersion=Database server version +YouMustCreateItAndAllowServerToWrite=You must create this directory and allow for the web server to write into it. +DBSortingCollation=Character sorting order +YouAskDatabaseCreationSoDolibarrNeedToConnect=You selected create database <b>%s</b>, but for this, Dolibarr needs to connect to server <b>%s</b> with super user <b>%s</b> permissions. +YouAskLoginCreationSoDolibarrNeedToConnect=You selected create database user <b>%s</b>, but for this, Dolibarr needs to connect to server <b>%s</b> with super user <b>%s</b> permissions. +BecauseConnectionFailedParametersMayBeWrong=The database connection failed: the host or super user parameters must be wrong. +OrphelinsPaymentsDetectedByMethod=Orphans payment detected by method %s +RemoveItManuallyAndPressF5ToContinue=Remove it manually and press F5 to continue. +FieldRenamed=Field renamed +IfLoginDoesNotExistsCheckCreateUser=If the user does not exist yet, you must check option "Create user" +ErrorConnection=Server "<b>%s</b>", database name "<b>%s</b>", login "<b>%s</b>", or database password may be wrong or the PHP client version may be too old compared to the database version. +InstallChoiceRecommanded=Recommended choice to install version <b>%s</b> from your current version <b>%s</b> +InstallChoiceSuggested=<b>Install choice suggested by installer</b>. +MigrateIsDoneStepByStep=The targeted version (%s) has a gap of several versions. The install wizard will come back to suggest a further migration once this one is complete. +CheckThatDatabasenameIsCorrect=Check that the database name "<b>%s</b>" is correct. +IfAlreadyExistsCheckOption=If this name is correct and that database does not exist yet, you must check option "Create database". +OpenBaseDir=PHP openbasedir parameter +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. +MigrationCustomerOrderShipping=Migrate shipping for sales orders storage +MigrationShippingDelivery=Upgrade storage of shipping +MigrationShippingDelivery2=Upgrade storage of shipping 2 +MigrationFinished=Migration finished +LastStepDesc=<strong>Last step</strong>: Define here the login and password you wish to use to connect to Dolibarr. <b>Do not lose this as it is the master account to administer all other/additional user accounts.</b> +ActivateModule=Activate module %s +ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) +WarningUpgrade=Warning:\nDid you run a database backup first?\nThis is highly recommended. Loss of data (due to for example bugs in mysql version 5.5.40/41/42/43) may be possible during this process, so it is essential to take a complete dump of your database before starting any migration.\n\nClick OK to start migration process... +ErrorDatabaseVersionForbiddenForMigration=Your database version is %s. It has a critical bug, making data loss possible if you make structural changes in your database, such as is required by the migration process. For his reason, migration will not be allowed until you upgrade your database to a layer (patched) version (list of known buggy versions: %s) +KeepDefaultValuesWamp=You used the Dolibarr setup wizard from DoliWamp, so values proposed here are already optimized. Change them only if you know what you are doing. +KeepDefaultValuesDeb=You used the Dolibarr setup wizard from a Linux package (Ubuntu, Debian, Fedora...), so the values proposed here are already optimized. Only the password of the database owner to create must be entered. Change other parameters only if you know what you are doing. +KeepDefaultValuesMamp=You used the Dolibarr setup wizard from DoliMamp, so the values proposed here are already optimized. Change them only if you know what you are doing. +KeepDefaultValuesProxmox=You used the Dolibarr setup wizard from a Proxmox virtual appliance, so the values proposed here are already optimized. Change them only if you know what you are doing. +UpgradeExternalModule=Run dedicated upgrade process of external module +SetAtLeastOneOptionAsUrlParameter=Set at least one option as a parameter in URL. For example: '...repair.php?standard=confirmed' +NothingToDelete=Nothing to clean/delete +NothingToDo=Nothing to do +######### +# upgrade +MigrationFixData=Fix for denormalized data +MigrationOrder=Data migration for customer's orders +MigrationSupplierOrder=Data migration for vendor's orders +MigrationProposal=Data migration for commercial proposals +MigrationInvoice=Data migration for customer's invoices +MigrationContract=Data migration for contracts +MigrationSuccessfullUpdate=Upgrade successful +MigrationUpdateFailed=Failed upgrade process +MigrationRelationshipTables=Data migration for relationship tables (%s) +MigrationPaymentsUpdate=Payment data correction +MigrationPaymentsNumberToUpdate=%s payment(s) to update +MigrationProcessPaymentUpdate=Update payment(s) %s +MigrationPaymentsNothingToUpdate=No more things to do +MigrationPaymentsNothingUpdatable=No more payments that can be corrected +MigrationContractsUpdate=Contract data correction +MigrationContractsNumberToUpdate=%s contract(s) to update +MigrationContractsLineCreation=Create contract line for contract ref %s +MigrationContractsNothingToUpdate=No more things to do +MigrationContractsFieldDontExist=Field fk_facture does not exist anymore. Nothing to do. +MigrationContractsEmptyDatesUpdate=Contract empty date correction +MigrationContractsEmptyDatesUpdateSuccess=Contract empty date correction done successfully +MigrationContractsEmptyDatesNothingToUpdate=No contract empty date to correct +MigrationContractsEmptyCreationDatesNothingToUpdate=No contract creation date to correct +MigrationContractsInvalidDatesUpdate=Bad value date contract correction +MigrationContractsInvalidDateFix=Correct contract %s (Contract date=%s, Starting service date min=%s) +MigrationContractsInvalidDatesNumber=%s contracts modified +MigrationContractsInvalidDatesNothingToUpdate=No date with bad value to correct +MigrationContractsIncoherentCreationDateUpdate=Bad value contract creation date correction +MigrationContractsIncoherentCreationDateUpdateSuccess=Bad value contract creation date correction done successfully +MigrationContractsIncoherentCreationDateNothingToUpdate=No bad value for contract creation date to correct +MigrationReopeningContracts=Open contract closed by error +MigrationReopenThisContract=Reopen contract %s +MigrationReopenedContractsNumber=%s contracts modified +MigrationReopeningContractsNothingToUpdate=No closed contract to open +MigrationBankTransfertsUpdate=Update links between bank entry and a bank transfer +MigrationBankTransfertsNothingToUpdate=All links are up to date +MigrationShipmentOrderMatching=Sendings receipt update +MigrationDeliveryOrderMatching=Delivery receipt update +MigrationDeliveryDetail=Delivery update +MigrationStockDetail=Update stock value of products +MigrationMenusDetail=Update dynamic menus tables +MigrationDeliveryAddress=Update delivery address in shipments +MigrationProjectTaskActors=Data migration for table llx_projet_task_actors +MigrationProjectUserResp=Data migration field fk_user_resp of llx_projet to llx_element_contact +MigrationProjectTaskTime=Update time spent in seconds +MigrationActioncommElement=Update data on actions +MigrationPaymentMode=Data migration for payment type +MigrationCategorieAssociation=Migration of categories +MigrationEvents=Migration of events to add event owner into assignment table +MigrationEventsContact=Migration of events to add event contact into assignment table +MigrationRemiseEntity=Update entity field value of llx_societe_remise +MigrationRemiseExceptEntity=Update entity field value of llx_societe_remise_except +MigrationUserRightsEntity=Update entity field value of llx_user_rights +MigrationUserGroupRightsEntity=Update entity field value of llx_usergroup_rights +MigrationUserPhotoPath=Migration of photo paths for users +MigrationFieldsSocialNetworks=Migration of users fields social networks (%s) +MigrationReloadModule=Reload module %s +MigrationResetBlockedLog=Reset module BlockedLog for v7 algorithm +ShowNotAvailableOptions=Show unavailable options +HideNotAvailableOptions=Hide unavailable options +ErrorFoundDuringMigration=Error(s) were reported during the migration process so next step is not available. To ignore errors, you can <a href="%s">click here</a>, but the application or some features may not work correctly until the errors are resolved. +YouTryInstallDisabledByDirLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (directory renamed with .lock suffix).<br> +YouTryInstallDisabledByFileLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (by the existence of a lock file <strong>install.lock</strong> in the dolibarr documents directory).<br> +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 diff --git a/htdocs/langs/ar_IQ/interventions.lang b/htdocs/langs/ar_IQ/interventions.lang new file mode 100644 index 00000000000..51079fca278 --- /dev/null +++ b/htdocs/langs/ar_IQ/interventions.lang @@ -0,0 +1,68 @@ +# Dolibarr language file - Source file is en_US - interventions +Intervention=Intervention +Interventions=Interventions +InterventionCard=Intervention card +NewIntervention=New intervention +AddIntervention=Create intervention +ChangeIntoRepeatableIntervention=Change to repeatable intervention +ListOfInterventions=List of interventions +ActionsOnFicheInter=Actions on intervention +LastInterventions=Latest %s interventions +AllInterventions=All interventions +CreateDraftIntervention=Create draft +InterventionContact=Intervention contact +DeleteIntervention=Delete intervention +ValidateIntervention=Validate intervention +ModifyIntervention=Modify intervention +DeleteInterventionLine=Delete intervention line +ConfirmDeleteIntervention=Are you sure you want to delete this intervention? +ConfirmValidateIntervention=Are you sure you want to validate this intervention under name <b>%s</b>? +ConfirmModifyIntervention=Are you sure you want to modify this intervention? +ConfirmDeleteInterventionLine=Are you sure you want to delete this intervention line? +ConfirmCloneIntervention=Are you sure you want to clone this intervention? +NameAndSignatureOfInternalContact=Name and signature of intervening: +NameAndSignatureOfExternalContact=Name and signature of customer: +DocumentModelStandard=Standard document model for interventions +InterventionCardsAndInterventionLines=Interventions and lines of interventions +InterventionClassifyBilled=Classify "Billed" +InterventionClassifyUnBilled=Classify "Unbilled" +InterventionClassifyDone=Classify "Done" +StatusInterInvoiced=Billed +SendInterventionRef=Submission of intervention %s +SendInterventionByMail=Send intervention by email +InterventionCreatedInDolibarr=Intervention %s created +InterventionValidatedInDolibarr=Intervention %s validated +InterventionModifiedInDolibarr=Intervention %s modified +InterventionClassifiedBilledInDolibarr=Intervention %s set as billed +InterventionClassifiedUnbilledInDolibarr=Intervention %s set as unbilled +InterventionSentByEMail=Intervention %s sent by email +InterventionDeletedInDolibarr=Intervention %s deleted +InterventionsArea=Interventions area +DraftFichinter=Draft interventions +LastModifiedInterventions=Latest %s modified interventions +FichinterToProcess=Interventions to process +TypeContact_fichinter_external_CUSTOMER=Following-up customer contact +PrintProductsOnFichinter=Print also lines of type "product" (not only services) on intervention card +PrintProductsOnFichinterDetails=interventions generated from orders +UseServicesDurationOnFichinter=Use services duration for interventions generated from orders +UseDurationOnFichinter=Hides the duration field for intervention records +UseDateWithoutHourOnFichinter=Hides hours and minutes off the date field for intervention records +InterventionStatistics=Statistics of interventions +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. +InterId=Intervention id +InterRef=Intervention ref. +InterDateCreation=Date creation intervention +InterDuration=Duration intervention +InterStatus=Status intervention +InterNote=Note intervention +InterLine=Line of intervention +InterLineId=Line id intervention +InterLineDate=Line date intervention +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 <b>%s</b>? diff --git a/htdocs/langs/ar_IQ/intracommreport.lang b/htdocs/langs/ar_IQ/intracommreport.lang new file mode 100644 index 00000000000..93c46f112bb --- /dev/null +++ b/htdocs/langs/ar_IQ/intracommreport.lang @@ -0,0 +1,40 @@ +Module68000Name = Intracomm report +Module68000Desc = Intracomm report management (Support for French DEB/DES format) +IntracommReportSetup = Intracommreport module setup +IntracommReportAbout = About intracommreport + +# Setup +INTRACOMMREPORT_NUM_AGREMENT=Numéro d'agrément (délivré par le CISD de rattachement) +INTRACOMMREPORT_TYPE_ACTEUR=Type d'acteur +INTRACOMMREPORT_ROLE_ACTEUR=Rôle joué par l'acteur +INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION=Niveau d'obligation sur les introductions +INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION=Niveau d'obligation sur les expéditions +INTRACOMMREPORT_CATEG_FRAISDEPORT=Catégorie de services de type "Frais de port" + +INTRACOMMREPORT_NUM_DECLARATION=Numéro de déclarant + +# Menu +MenuIntracommReport=Intracomm report +MenuIntracommReportNew=New declaration +MenuIntracommReportList=List + +# View +NewDeclaration=New declaration +Declaration=Declaration +AnalysisPeriod=Analysis period +TypeOfDeclaration=Type of declaration +DEB=Goods exchange declaration (DEB) +DES=Services exchange declaration (DES) + +# Export page +IntracommReportTitle=Preparation of an XML file in ProDouane format + +# List +IntracommReportList=List of generated declarations +IntracommReportNumber=Numero of declaration +IntracommReportPeriod=Period of analysis +IntracommReportTypeDeclaration=Type of declaration +IntracommReportDownload=download XML file + +# Invoice +IntracommReportTransportMode=Transport mode diff --git a/htdocs/langs/ar_IQ/languages.lang b/htdocs/langs/ar_IQ/languages.lang new file mode 100644 index 00000000000..ba187326705 --- /dev/null +++ b/htdocs/langs/ar_IQ/languages.lang @@ -0,0 +1,105 @@ +# 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 +Language_cs_CZ=Czech +Language_da_DA=Danish +Language_da_DK=Danish +Language_de_DE=German +Language_de_AT=German (Austria) +Language_de_CH=German (Switzerland) +Language_el_GR=Greek +Language_el_CY=Greek (Cyprus) +Language_en_AU=English (Australia) +Language_en_CA=English (Canada) +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 +Language_es_AR=Spanish (Argentina) +Language_es_BO=Spanish (Bolivia) +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) +Language_es_PY=Spanish (Paraguay) +Language_es_PE=Spanish (Peru) +Language_es_PR=Spanish (Puerto Rico) +Language_es_US=Spanish (USA) +Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) +Language_es_VE=Spanish (Venezuela) +Language_et_EE=Estonian +Language_eu_ES=Basque +Language_fa_IR=Persian +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 +Language_kn_IN=Kannada +Language_ko_KR=Korean +Language_lo_LA=Lao +Language_lt_LT=Lithuanian +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 +Language_pt_BR=Portuguese (Brazil) +Language_pt_PT=Portuguese +Language_ro_RO=Romanian +Language_ru_RU=Russian +Language_ru_UA=Russian (Ukraine) +Language_tr_TR=Turkish +Language_sl_SI=Slovenian +Language_sv_SV=Swedish +Language_sv_SE=Swedish +Language_sq_AL=Albanian +Language_sk_SK=Slovakian +Language_sr_RS=Serbian +Language_sw_SW=Kiswahili +Language_th_TH=Thai +Language_uk_UA=Ukrainian +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/ar_IQ/ldap.lang b/htdocs/langs/ar_IQ/ldap.lang new file mode 100644 index 00000000000..8b6f0864215 --- /dev/null +++ b/htdocs/langs/ar_IQ/ldap.lang @@ -0,0 +1,27 @@ +# Dolibarr language file - Source file is en_US - ldap +YouMustChangePassNextLogon=Password for user <b>%s</b> on the domain <b>%s</b> must be changed. +UserMustChangePassNextLogon=User must change password on the domain %s +LDAPInformationsForThisContact=Information in LDAP database for this contact +LDAPInformationsForThisUser=Information in LDAP database for this user +LDAPInformationsForThisGroup=Information in LDAP database for this group +LDAPInformationsForThisMember=Information in LDAP database for this member +LDAPInformationsForThisMemberType=Information in LDAP database for this member type +LDAPAttributes=LDAP attributes +LDAPCard=LDAP card +LDAPRecordNotFound=Record not found in LDAP database +LDAPUsers=Users in LDAP database +LDAPFieldStatus=Status +LDAPFieldFirstSubscriptionDate=First subscription date +LDAPFieldFirstSubscriptionAmount=First subscription amount +LDAPFieldLastSubscriptionDate=Latest subscription date +LDAPFieldLastSubscriptionAmount=Latest subscription amount +LDAPFieldSkype=Skype id +LDAPFieldSkypeExample=Example: skypeName +UserSynchronized=User synchronized +GroupSynchronized=Group synchronized +MemberSynchronized=Member synchronized +MemberTypeSynchronized=Member type synchronized +ContactSynchronized=Contact synchronized +ForceSynchronize=Force synchronizing Dolibarr -> LDAP +ErrorFailedToReadLDAP=Failed to read LDAP database. Check LDAP module setup and database accessibility. +PasswordOfUserInLDAP=Password of user in LDAP diff --git a/htdocs/langs/ar_IQ/link.lang b/htdocs/langs/ar_IQ/link.lang new file mode 100644 index 00000000000..1ffcd41a18b --- /dev/null +++ b/htdocs/langs/ar_IQ/link.lang @@ -0,0 +1,11 @@ +# Dolibarr language file - Source file is en_US - languages +LinkANewFile=Link a new file/document +LinkedFiles=Linked files and documents +NoLinkFound=No registered links +LinkComplete=The file has been linked successfully +ErrorFileNotLinked=The file could not be linked +LinkRemoved=The link %s has been removed +ErrorFailedToDeleteLink= Failed to remove link '<b>%s</b>' +ErrorFailedToUpdateLink= Failed to update link '<b>%s</b>' +URLToLink=URL to link +OverwriteIfExists=Overwrite file if exists diff --git a/htdocs/langs/ar_IQ/loan.lang b/htdocs/langs/ar_IQ/loan.lang new file mode 100644 index 00000000000..d271ed0c140 --- /dev/null +++ b/htdocs/langs/ar_IQ/loan.lang @@ -0,0 +1,34 @@ +# Dolibarr language file - Source file is en_US - loan +Loan=Loan +Loans=Loans +NewLoan=New Loan +ShowLoan=Show Loan +PaymentLoan=Loan payment +LoanPayment=Loan payment +ShowLoanPayment=Show Loan Payment +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 +# 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 diff --git a/htdocs/langs/ar_IQ/mailmanspip.lang b/htdocs/langs/ar_IQ/mailmanspip.lang new file mode 100644 index 00000000000..bab4b3576b4 --- /dev/null +++ b/htdocs/langs/ar_IQ/mailmanspip.lang @@ -0,0 +1,27 @@ +# Dolibarr language file - Source file is en_US - mailmanspip +MailmanSpipSetup=Mailman and SPIP module Setup +MailmanTitle=Mailman mailing list system +TestSubscribe=To test subscription to Mailman lists +TestUnSubscribe=To test unsubscribe from Mailman lists +MailmanCreationSuccess=Subscription test was executed successfully +MailmanDeletionSuccess=Unsubscription test was executed successfully +SynchroMailManEnabled=A Mailman update will be performed +SynchroSpipEnabled=A Spip update will be performed +DescADHERENT_MAILMAN_ADMINPW=Mailman administrator password +DescADHERENT_MAILMAN_URL=URL for Mailman subscriptions +DescADHERENT_MAILMAN_UNSUB_URL=URL for Mailman unsubscriptions +DescADHERENT_MAILMAN_LISTS=List(s) for automatic inscription of new members (separated by a comma) +SPIPTitle=SPIP Content Management System +DescADHERENT_SPIP_SERVEUR=SPIP Server +DescADHERENT_SPIP_DB=SPIP database name +DescADHERENT_SPIP_USER=SPIP database login +DescADHERENT_SPIP_PASS=SPIP database password +AddIntoSpip=Add into SPIP +AddIntoSpipConfirmation=Are you sure you want to add this member into SPIP? +AddIntoSpipError=Failed to add the user in SPIP +DeleteIntoSpip=Remove from SPIP +DeleteIntoSpipConfirmation=Are you sure you want to remove this member from SPIP? +DeleteIntoSpipError=Failed to suppress the user from SPIP +SPIPConnectionFailed=Failed to connect to SPIP +SuccessToAddToMailmanList=%s successfully added to mailman list %s or SPIP database +SuccessToRemoveToMailmanList=%s successfully removed from mailman list %s or SPIP database diff --git a/htdocs/langs/ar_IQ/mails.lang b/htdocs/langs/ar_IQ/mails.lang new file mode 100644 index 00000000000..2d02c5ddcf9 --- /dev/null +++ b/htdocs/langs/ar_IQ/mails.lang @@ -0,0 +1,179 @@ +# 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 +MailTitle=Description +MailFrom=Sender +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 +MailText=Message +MailFile=Attached files +MailMessage=Email body +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 +MailingStatusDraft=Draft +MailingStatusValidated=Validated +MailingStatusSent=Sent +MailingStatusSentPartialy=Sent partially +MailingStatusSentCompletely=Sent completely +MailingStatusError=Error +MailingStatusNotSent=Not sent +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 <b>%s</b>, 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 <b>%s</b> +MailingStatusRead=Read +YourMailUnsubcribeOK=The email <b>%s</b> 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=<b>%s</b> 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 <b>%s</b> 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. +EmailCollectorFilterDesc=All filters must match to have an email being collected + +# 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: +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, <b>%s</b> 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 <b>comma</b> 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. +# Module Notifications +Notifications=Notifications +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=Subscribe to a new automatic email notification (target/event) +ListOfActiveNotifications=List all active subscriptions (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 <strong>'%s'</strong> 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. +YouCanAlsoUseSupervisorKeyword=You can also add the keyword <strong>__SUPERVISOREMAIL__</strong> 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 +UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;firstname;other</strong> +UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> +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 <b>jean, joe, jim</b>, you can input <b>j%%</b>, you can also use ; as separator for value, and use ! for except this value. For example <b>jean;joe;jim%%;!jimo;!jima%%</b> 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 emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +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 +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/ar_IQ/main.lang b/htdocs/langs/ar_IQ/main.lang new file mode 100644 index 00000000000..dc2a83f2015 --- /dev/null +++ b/htdocs/langs/ar_IQ/main.lang @@ -0,0 +1,1131 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +# Note for Chinese: +# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader) +# stsongstdlight or cid0cs are for simplified Chinese +# To read Chinese pdf with Linux: sudo apt-get install poppler-data +FONTFORPDF=helvetica +FONTSIZEFORPDF=10 +SeparatorDecimal=. +SeparatorThousand=, +FormatDateShort=%m/%d/%Y +FormatDateShortInput=%m/%d/%Y +FormatDateShortJava=MM/dd/yyyy +FormatDateShortJavaInput=MM/dd/yyyy +FormatDateShortJQuery=mm/dd/yy +FormatDateShortJQueryInput=mm/dd/yy +FormatHourShortJQuery=HH:MI +FormatHourShort=%I:%M %p +FormatHourShortDuration=%H:%M +FormatDateTextShort=%b %d, %Y +FormatDateText=%B %d, %Y +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 +DatabaseConnection=Database connection +NoTemplateDefined=No template available for this email type +AvailableVariables=Available substitution variables +NoTranslation=No translation +Translation=Translation +CurrentTimeZone=TimeZone PHP (server) +EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria +NoRecordFound=No record found +NoRecordDeleted=No record deleted +NotEnoughDataYet=Not enough data +NoError=No error +Error=Error +Errors=Errors +ErrorFieldRequired=Field '%s' is required +ErrorFieldFormat=Field '%s' has a bad value +ErrorFileDoesNotExists=File %s does not exist +ErrorFailedToOpenFile=Failed to open file %s +ErrorCanNotCreateDir=Cannot create dir %s +ErrorCanNotReadDir=Cannot read dir %s +ErrorConstantNotDefined=Parameter %s not defined +ErrorUnknown=Unknown error +ErrorSQL=SQL Error +ErrorLogoFileNotFound=Logo file '%s' was not found +ErrorGoToGlobalSetup=Go to 'Company/Organization' setup to fix this +ErrorGoToModuleSetup=Go to Module setup to fix this +ErrorFailedToSendMail=Failed to send mail (sender=%s, receiver=%s) +ErrorFileNotUploaded=File was not uploaded. Check that size does not exceed maximum allowed, that free space is available on disk and that there is not already a file with same name in this directory. +ErrorInternalErrorDetected=Error detected +ErrorWrongHostParameter=Wrong host parameter +ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post the form again. +ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child record. +ErrorWrongValue=Wrong value +ErrorWrongValueForParameterX=Wrong value for parameter %s +ErrorNoRequestInError=No request in error +ErrorServiceUnavailableTryLater=Service not available at the moment. Try again later. +ErrorDuplicateField=Duplicate value in a unique field +ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. Changes have been rolled back. +ErrorConfigParameterNotDefined=Parameter <b>%s</b> is not defined in the Dolibarr config file <b>conf.php</b>. +ErrorCantLoadUserFromDolibarrDatabase=Failed to find user <b>%s</b> in Dolibarr database. +ErrorNoVATRateDefinedForSellerCountry=Error, no vat rates defined for country '%s'. +ErrorNoSocialContributionForSellerCountry=Error, no social/fiscal taxes type defined for country '%s'. +ErrorFailedToSaveFile=Error, failed to save file. +ErrorCannotAddThisParentWarehouse=You are trying to add a parent warehouse which is already a child of a existing warehouse +MaxNbOfRecordPerPage=Max. number of records per page +NotAuthorized=You are not authorized to do that. +SetDate=Set date +SelectDate=Select a date +SeeAlso=See also %s +SeeHere=See here +ClickHere=Click here +Here=Here +Apply=Apply +BackgroundColorByDefault=Default background color +FileRenamed=The file was successfully renamed +FileGenerated=The file was successfully generated +FileSaved=The file was successfully saved +FileUploaded=The file was successfully uploaded +FileTransferComplete=File(s) uploaded successfully +FilesDeleted=File(s) successfully deleted +FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this. +NbOfEntries=No. of entries +GoToWikiHelpPage=Read online help (Internet access needed) +GoToHelpPage=Read help +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page +RecordSaved=Record saved +RecordDeleted=Record deleted +RecordGenerated=Record generated +LevelOfFeature=Level of features +NotDefined=Not defined +DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication mode is set to <b>%s</b> in configuration file <b>conf.php</b>.<br>This means that the password database is external to Dolibarr, so changing this field may have no effect. +Administrator=Administrator +Undefined=Undefined +PasswordForgotten=Password forgotten? +NoAccount=No account? +SeeAbove=See above +HomeArea=Home +LastConnexion=Last login +PreviousConnexion=Previous login +PreviousValue=Previous value +ConnectedOnMultiCompany=Connected on environment +ConnectedSince=Connected since +AuthenticationMode=Authentication mode +RequestedUrl=Requested URL +DatabaseTypeManager=Database type manager +RequestLastAccessInError=Latest database access request error +ReturnCodeLastAccessInError=Return code for latest database access request error +InformationLastAccessInError=Information for latest database access request error +DolibarrHasDetectedError=Dolibarr has detected a technical error +YouCanSetOptionDolibarrMainProdToZero=You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information. +InformationToHelpDiagnose=This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices) +MoreInformation=More information +TechnicalInformation=Technical information +TechnicalID=Technical ID +LineID=Line ID +NotePublic=Note (public) +NotePrivate=Note (private) +PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to <b>%s</b> decimals. +DoTest=Test +ToFilter=Filter +NoFilter=No filter +WarningYouHaveAtLeastOneTaskLate=Warning, you have at least one element that has exceeded the tolerance time. +yes=yes +Yes=Yes +no=no +No=No +All=All +Home=Home +Help=Help +OnlineHelp=Online help +PageWiki=Wiki page +MediaBrowser=Media browser +Always=Always +Never=Never +Under=under +Period=Period +PeriodEndDate=End date for period +SelectedPeriod=Selected period +PreviousPeriod=Previous period +Activate=Activate +Activated=Activated +Closed=Closed +Closed2=Closed +NotClosed=Not closed +Enabled=Enabled +Enable=Enable +Deprecated=Deprecated +Disable=Disable +Disabled=Disabled +Add=Add +AddLink=Add link +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 <b>%s</b>? +Delete=Delete +Remove=Remove +Resiliate=Terminate +Cancel=Cancel +Modify=Modify +Edit=Edit +Validate=Validate +ValidateAndApprove=Validate and Approve +ToValidate=To validate +NotValidated=Not validated +Save=Save +SaveAs=Save As +SaveAndStay=Save and stay +SaveAndNew=Save and new +TestConnection=Test connection +ToClone=Clone +ConfirmCloneAsk=Are you sure you want to clone the object <b>%s</b>? +ConfirmClone=Choose data you want to clone: +NoCloneOptionsSpecified=No data to clone defined. +Of=of +Go=Go +Run=Run +CopyOf=Copy of +Show=Show +Hide=Hide +ShowCardHere=Show card +Search=Search +SearchOf=Search +SearchMenuShortCut=Ctrl + shift + f +QuickAdd=Quick add +QuickAddMenuShortCut=Ctrl + shift + l +Valid=Valid +Approve=Approve +Disapprove=Disapprove +ReOpen=Re-Open +Upload=Upload +ToLink=Link +Select=Select +SelectAll=Select all +Choose=Choose +Resize=Resize +ResizeOrCrop=Resize or Crop +Recenter=Recenter +Author=Author +User=User +Users=Users +Group=Group +Groups=Groups +NoUserGroupDefined=No user group defined +Password=Password +PasswordRetype=Retype your password +NoteSomeFeaturesAreDisabled=Note that a lot of features/modules are disabled in this demonstration. +Name=Name +NameSlashCompany=Name / Company +Person=Person +Parameter=Parameter +Parameters=Parameters +Value=Value +PersonalValue=Personal value +NewObject=New %s +NewValue=New value +OldValue=Old value %s +CurrentValue=Current value +Code=Code +Type=Type +Language=Language +MultiLanguage=Multi-language +Note=Note +Title=Title +Label=Label +RefOrLabel=Ref. or label +Info=Log +Family=Family +Description=Description +Designation=Description +DescriptionOfLine=Description of line +DateOfLine=Date of line +DurationOfLine=Duration of line +Model=Doc template +DefaultModel=Default doc template +Action=Event +About=About +Number=Number +NumberByMonth=Number by month +AmountByMonth=Amount by month +Numero=Number +Limit=Limit +Limits=Limits +Logout=Logout +NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode <b>%s</b> +Connection=Login +Setup=Setup +Alert=Alert +MenuWarnings=Alerts +Previous=Previous +Next=Next +Cards=Cards +Card=Card +Now=Now +HourStart=Start hour +Deadline=Deadline +Date=Date +DateAndHour=Date and hour +DateToday=Today's date +DateReference=Reference date +DateStart=Start date +DateEnd=End date +DateCreation=Creation date +DateCreationShort=Creat. date +IPCreation=Creation IP +DateModification=Modification date +DateModificationShort=Modif. date +IPModification=Modification IP +DateLastModification=Latest modification date +DateValidation=Validation date +DateSigning=Signing date +DateClosing=Closing date +DateDue=Due date +DateValue=Value date +DateValueShort=Value date +DateOperation=Operation date +DateOperationShort=Oper. Date +DateLimit=Limit date +DateRequest=Request date +DateProcess=Process date +DateBuild=Report build date +DatePayment=Date of payment +DateApprove=Approving date +DateApprove2=Approving date (second approval) +RegistrationDate=Registration date +UserCreation=Creation user +UserModification=Modification user +UserValidation=Validation user +UserCreationShort=Creat. user +UserModificationShort=Modif. user +UserValidationShort=Valid. user +DurationYear=year +DurationMonth=month +DurationWeek=week +DurationDay=day +DurationYears=years +DurationMonths=months +DurationWeeks=weeks +DurationDays=days +Year=Year +Month=Month +Week=Week +WeekShort=Week +Day=Day +Hour=Hour +Minute=Minute +Second=Second +Years=Years +Months=Months +Days=Days +days=days +Hours=Hours +Minutes=Minutes +Seconds=Seconds +Weeks=Weeks +Today=Today +Yesterday=Yesterday +Tomorrow=Tomorrow +Morning=Morning +Afternoon=Afternoon +Quadri=Quadri +MonthOfDay=Month of the day +DaysOfWeek=Days of week +HourShort=H +MinuteShort=mn +Rate=Rate +CurrencyRate=Currency conversion rate +UseLocalTax=Include tax +Bytes=Bytes +KiloBytes=Kilobytes +MegaBytes=Megabytes +GigaBytes=Gigabytes +TeraBytes=Terabytes +UserAuthor=User of creation +UserModif=User of last update +b=b. +Kb=Kb +Mb=Mb +Gb=Gb +Tb=Tb +Cut=Cut +Copy=Copy +Paste=Paste +Default=Default +DefaultValue=Default value +DefaultValues=Default values/filters/sorting +Price=Price +PriceCurrency=Price (currency) +UnitPrice=Unit price +UnitPriceHT=Unit price (excl.) +UnitPriceHTCurrency=Unit price (excl.) (currency) +UnitPriceTTC=Unit price +PriceU=U.P. +PriceUHT=U.P. (net) +PriceUHTCurrency=U.P (net) (currency) +PriceUTTC=U.P. (inc. tax) +Amount=Amount +AmountInvoice=Invoice amount +AmountInvoiced=Amount invoiced +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) +AmountPayment=Payment amount +AmountHTShort=Amount (excl.) +AmountTTCShort=Amount (inc. tax) +AmountHT=Amount (excl. tax) +AmountTTC=Amount (inc. tax) +AmountVAT=Amount tax +MulticurrencyAlreadyPaid=Already paid, original currency +MulticurrencyRemainderToPay=Remain to pay, original currency +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 +AmountLT2ES=Amount IRPF +AmountTotal=Total amount +AmountAverage=Average amount +PriceQtyMinHT=Price quantity min. (excl. tax) +PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent +Percentage=Percentage +Total=Total +SubTotal=Subtotal +TotalHTShort=Total (excl.) +TotalHT100Short=Total 100%% (excl.) +TotalHTShortCurrency=Total (excl. in currency) +TotalTTCShort=Total (inc. tax) +TotalHT=Total (excl. tax) +TotalHTforthispage=Total (excl. tax) for this page +Totalforthispage=Total for this page +TotalTTC=Total (inc. tax) +TotalTTCToYourCredit=Total (inc. tax) to your credit +TotalVAT=Total tax +TotalVATIN=Total IGST +TotalLT1=Total tax 2 +TotalLT2=Total tax 3 +TotalLT1ES=Total RE +TotalLT2ES=Total IRPF +TotalLT1IN=Total CGST +TotalLT2IN=Total SGST +HT=Excl. tax +TTC=Inc. tax +INCVATONLY=Inc. VAT +INCT=Inc. all taxes +VAT=Sales tax +VATIN=IGST +VATs=Sales taxes +VATINs=IGST taxes +LT1=Sales tax 2 +LT1Type=Sales tax 2 type +LT2=Sales tax 3 +LT2Type=Sales tax 3 type +LT1ES=RE +LT2ES=IRPF +LT1IN=CGST +LT2IN=SGST +LT1GC=Additionnal cents +VATRate=Tax Rate +VATCode=Tax Rate code +VATNPR=Tax Rate NPR +DefaultTaxRate=Default tax rate +Average=Average +Sum=Sum +Delta=Delta +StatusToPay=To pay +RemainToPay=Remain to pay +Module=Module/Application +Modules=Modules/Applications +Option=Option +Filters=Filters +List=List +FullList=Full list +FullConversation=Full conversation +Statistics=Statistics +OtherStatistics=Other statistics +Status=Status +Favorite=Favorite +ShortInfo=Info. +Ref=Ref. +ExternalRef=Ref. extern +RefSupplier=Ref. vendor +RefPayment=Ref. payment +CommercialProposalsShort=Commercial proposals +Comment=Comment +Comments=Comments +ActionsToDo=Events to do +ActionsToDoShort=To do +ActionsDoneShort=Done +ActionNotApplicable=Not applicable +ActionRunningNotStarted=To start +ActionRunningShort=In progress +ActionDoneShort=Finished +ActionUncomplete=Incomplete +LatestLinkedEvents=Latest %s linked events +CompanyFoundation=Company/Organization +Accountant=Accountant +ContactsForCompany=Contacts for this third party +ContactsAddressesForCompany=Contacts/addresses for this third party +AddressesForCompany=Addresses for this third party +ActionsOnCompany=Events for this third party +ActionsOnContact=Events for this contact/address +ActionsOnContract=Events for this contract +ActionsOnMember=Events about this member +ActionsOnProduct=Events about this product +NActionsLate=%s late +ToDo=To do +Completed=Completed +Running=In progress +RequestAlreadyDone=Request already recorded +Filter=Filter +FilterOnInto=Search criteria '<strong>%s</strong>' into fields %s +RemoveFilter=Remove filter +ChartGenerated=Chart generated +ChartNotGenerated=Chart not generated +GeneratedOn=Build on %s +Generate=Generate +Duration=Duration +TotalDuration=Total duration +Summary=Summary +DolibarrStateBoard=Database Statistics +DolibarrWorkBoard=Open Items +NoOpenedElementToProcess=No open element to process +Available=Available +NotYetAvailable=Not yet available +NotAvailable=Not available +Categories=Tags/categories +Category=Tag/category +By=By +From=From +FromDate=From +FromLocation=From +at=at +to=to +To=to +and=and +or=or +Other=Other +Others=Others +OtherInformations=Other information +Quantity=Quantity +Qty=Qty +ChangedBy=Changed by +ApprovedBy=Approved by +ApprovedBy2=Approved by (second approval) +Approved=Approved +Refused=Refused +ReCalculate=Recalculate +ResultKo=Failure +Reporting=Reporting +Reportings=Reporting +Draft=Draft +Drafts=Drafts +StatusInterInvoiced=Invoiced +Validated=Validated +ValidatedToProduce=Validated (To produce) +Opened=Open +OpenAll=Open (All) +ClosedAll=Closed (All) +New=New +Discount=Discount +Unknown=Unknown +General=General +Size=Size +OriginalSize=Original size +Received=Received +Paid=Paid +Topic=Subject +ByCompanies=By third parties +ByUsers=By user +Links=Links +Link=Link +Rejects=Rejects +Preview=Preview +NextStep=Next step +Datas=Data +None=None +NoneF=None +NoneOrSeveral=None or several +Late=Late +LateDesc=An item is defined as Delayed as per the system configuration in menu Home - Setup - Alerts. +NoItemLate=No late item +Photo=Picture +Photos=Pictures +AddPhoto=Add picture +DeletePicture=Picture delete +ConfirmDeletePicture=Confirm picture deletion? +Login=Login +LoginEmail=Login (email) +LoginOrEmail=Login or Email +CurrentLogin=Current login +EnterLoginDetail=Enter login details +January=January +February=February +March=March +April=April +May=May +June=June +July=July +August=August +September=September +October=October +November=November +December=December +Month01=January +Month02=February +Month03=March +Month04=April +Month05=May +Month06=June +Month07=July +Month08=August +Month09=September +Month10=October +Month11=November +Month12=December +MonthShort01=Jan +MonthShort02=Feb +MonthShort03=Mar +MonthShort04=Apr +MonthShort05=May +MonthShort06=Jun +MonthShort07=Jul +MonthShort08=Aug +MonthShort09=Sep +MonthShort10=Oct +MonthShort11=Nov +MonthShort12=Dec +MonthVeryShort01=J +MonthVeryShort02=F +MonthVeryShort03=M +MonthVeryShort04=A +MonthVeryShort05=M +MonthVeryShort06=J +MonthVeryShort07=J +MonthVeryShort08=A +MonthVeryShort09=S +MonthVeryShort10=O +MonthVeryShort11=N +MonthVeryShort12=D +AttachedFiles=Attached files and documents +JoinMainDoc=Join main document +DateFormatYYYYMM=YYYY-MM +DateFormatYYYYMMDD=YYYY-MM-DD +DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS +ReportName=Report name +ReportPeriod=Report period +ReportDescription=Description +Report=Report +Keyword=Keyword +Origin=Origin +Legend=Legend +Fill=Fill +Reset=Reset +File=File +Files=Files +NotAllowed=Not allowed +ReadPermissionNotAllowed=Read permission not allowed +AmountInCurrency=Amount in %s currency +Example=Example +Examples=Examples +NoExample=No example +FindBug=Report a bug +NbOfThirdParties=Number of third parties +NbOfLines=Number of lines +NbOfObjects=Number of objects +NbOfObjectReferers=Number of related items +Referers=Related items +TotalQuantity=Total quantity +DateFromTo=From %s to %s +DateFrom=From %s +DateUntil=Until %s +Check=Check +Uncheck=Uncheck +Internal=Internal +External=External +Internals=Internal +Externals=External +Warning=Warning +Warnings=Warnings +BuildDoc=Build Doc +Entity=Environment +Entities=Entities +CustomerPreview=Customer preview +SupplierPreview=Vendor preview +ShowCustomerPreview=Show customer preview +ShowSupplierPreview=Show vendor preview +RefCustomer=Ref. customer +InternalRef=Internal ref. +Currency=Currency +InfoAdmin=Information for administrators +Undo=Undo +Redo=Redo +ExpandAll=Expand all +UndoExpandAll=Undo expand +SeeAll=See all +Reason=Reason +FeatureNotYetSupported=Feature not yet supported +CloseWindow=Close window +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 +Email=Email +NoEMail=No email +AlreadyRead=Already read +NotRead=Unread +NoMobilePhone=No mobile phone +Owner=Owner +FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. +Refresh=Refresh +BackToList=Back to list +BackToTree=Back to tree +GoBack=Go back +CanBeModifiedIfOk=Can be modified if valid +CanBeModifiedIfKo=Can be modified if not valid +ValueIsValid=Value is valid +ValueIsNotValid=Value is not valid +RecordCreatedSuccessfully=Record created successfully +RecordModifiedSuccessfully=Record modified successfully +RecordsModified=%s record(s) modified +RecordsDeleted=%s record(s) deleted +RecordsGenerated=%s record(s) generated +AutomaticCode=Automatic code +FeatureDisabled=Feature disabled +MoveBox=Move widget +Offered=Offered +NotEnoughPermissions=You don't have permission for this action +SessionName=Session name +Method=Method +Receive=Receive +CompleteOrNoMoreReceptionExpected=Complete or nothing more expected +ExpectedValue=Expected Value +ExpectedQty=Expected Qty +PartialWoman=Partial +TotalWoman=Total +NeverReceived=Never received +Canceled=Canceled +YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu Setup - Dictionaries +YouCanChangeValuesForThisListFrom=You can change values for this list from menu %s +YouCanSetDefaultValueInModuleSetup=You can set the default value used when creating a new record in module setup +Color=Color +Documents=Linked files +Documents2=Documents +UploadDisabled=Upload disabled +MenuAccountancy=Accounting +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 uploaded +CurrentUserLanguage=Current language +CurrentTheme=Current theme +CurrentMenuManager=Current menu manager +Browser=Browser +Layout=Layout +Screen=Screen +DisabledModules=Disabled modules +For=For +ForCustomer=For customer +Signature=Signature +DateOfSignature=Date of signature +HidePassword=Show command with password hidden +UnHidePassword=Show real command with clear password +Root=Root +RootOfMedias=Root of public medias (/medias) +Informations=Information +Page=Page +Notes=Notes +AddNewLine=Add new line +AddFile=Add file +FreeZone=Free-text product +FreeLineOfType=Free-text item, type: +CloneMainAttributes=Clone object with its main attributes +ReGeneratePDF=Re-generate PDF +PDFMerge=PDF Merge +Merge=Merge +DocumentModelStandardPDF=Standard PDF template +PrintContentArea=Show page to print main content area +MenuManager=Menu manager +WarningYouAreInMaintenanceMode=Warning, you are in maintenance mode: only login <b>%s</b> is allowed to use the application in this mode. +CoreErrorTitle=System error +CoreErrorMessage=Sorry, an error occurred. Contact your system administrator to check the logs or disable $dolibarr_main_prod=1 to get more information. +CreditCard=Credit card +ValidatePayment=Validate payment +CreditOrDebitCard=Credit or debit card +FieldsWithAreMandatory=Fields with <b>%s</b> are mandatory +FieldsWithIsForPublic=Fields with <b>%s</b> are shown in public list of members. If you don't want this, uncheck the "public" box. +AccordingToGeoIPDatabase=(according to GeoIP conversion) +Line=Line +NotSupported=Not supported +RequiredField=Required field +Result=Result +ToTest=Test +ValidateBefore=Item must be validated before using this feature +Visibility=Visibility +Totalizable=Totalizable +TotalizableDesc=This field is totalizable in list +Private=Private +Hidden=Hidden +Resources=Resources +Source=Source +Prefix=Prefix +Before=Before +After=After +IPAddress=IP address +Frequency=Frequency +IM=Instant messaging +NewAttribute=New attribute +AttributeCode=Attribute code +URLPhoto=URL of photo/logo +SetLinkToAnotherThirdParty=Link to another third party +LinkTo=Link to +LinkToProposal=Link to proposal +LinkToOrder=Link to order +LinkToInvoice=Link to invoice +LinkToTemplateInvoice=Link to template invoice +LinkToSupplierOrder=Link to purchase order +LinkToSupplierProposal=Link to vendor proposal +LinkToSupplierInvoice=Link to vendor invoice +LinkToContract=Link to contract +LinkToIntervention=Link to intervention +LinkToTicket=Link to ticket +CreateDraft=Create draft +SetToDraft=Back to draft +ClickToEdit=Click to edit +ClickToRefresh=Click to refresh +EditWithEditor=Edit with CKEditor +EditWithTextEditor=Edit with Text editor +EditHTMLSource=Edit HTML Source +ObjectDeleted=Object %s deleted +ByCountry=By country +ByTown=By town +ByDate=By date +ByMonthYear=By month/year +ByYear=By year +ByMonth=By month +ByDay=By day +BySalesRepresentative=By sales representative +LinkedToSpecificUsers=Linked to a particular user contact +NoResults=No results +AdminTools=Admin Tools +SystemTools=System tools +ModulesSystemTools=Modules tools +Test=Test +Element=Element +NoPhotoYet=No pictures available yet +Dashboard=Dashboard +MyDashboard=My Dashboard +Deductible=Deductible +from=from +toward=toward +Access=Access +SelectAction=Select action +SelectTargetUser=Select target user/employee +HelpCopyToClipboard=Use Ctrl+C to copy to clipboard +SaveUploadedFileWithMask=Save file on server with name "<strong>%s</strong>" (otherwise "%s") +OriginFileName=Original filename +SetDemandReason=Set source +SetBankAccount=Define Bank Account +AccountCurrency=Account currency +ViewPrivateNote=View notes +XMoreLines=%s line(s) hidden +ShowMoreLines=Show more/less lines +PublicUrl=Public URL +AddBox=Add box +SelectElementAndClick=Select an element and click %s +PrintFile=Print File %s +ShowTransaction=Show entry on bank account +ShowIntervention=Show intervention +ShowContract=Show contract +GoIntoSetupToChangeLogo=Go to Home - Setup - Company to change logo or go to Home - Setup - Display to hide. +Deny=Deny +Denied=Denied +ListOf=List of %s +ListOfTemplates=List of templates +Gender=Gender +Genderman=Man +Genderwoman=Woman +Genderother=Other +ViewList=List view +ViewGantt=Gantt view +ViewKanban=Kanban view +Mandatory=Mandatory +Hello=Hello +GoodBye=GoodBye +Sincerely=Sincerely +ConfirmDeleteObject=Are you sure you want to delete this object? +DeleteLine=Delete line +ConfirmDeleteLine=Are you sure you want to delete this line? +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. +NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked record +TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. +NoRecordSelected=No record selected +MassFilesArea=Area for files built by mass actions +ShowTempMassFilesArea=Show area of files built by mass actions +ConfirmMassDeletion=Bulk Delete confirmation +ConfirmMassDeletionQuestion=Are you sure you want to delete the %s selected record(s)? +RelatedObjects=Related Objects +ClassifyBilled=Classify billed +ClassifyUnbilled=Classify unbilled +Progress=Progress +ProgressShort=Progr. +FrontOffice=Front office +BackOffice=Back office +Submit=Submit +View=View +Export=Export +Exports=Exports +ExportFilteredList=Export filtered list +ExportList=Export list +ExportOptions=Export Options +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 +Miscellaneous=Miscellaneous +Calendar=Calendar +GroupBy=Group by... +ViewFlatList=View flat list +ViewAccountList=View ledger +ViewSubAccountList=View subaccount ledger +RemoveString=Remove string '%s' +SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file +Download=Download +DownloadDocument=Download document +ActualizeCurrency=Update currency rate +Fiscalyear=Fiscal year +ModuleBuilder=Module and Application Builder +SetMultiCurrencyCode=Set currency +BulkActions=Bulk actions +ClickToShowHelp=Click to show tooltip help +WebSite=Website +WebSites=Websites +WebSiteAccounts=Website accounts +ExpenseReport=Expense report +ExpenseReports=Expense reports +HR=HR +HRAndBank=HR and Bank +AutomaticallyCalculated=Automatically calculated +TitleSetToDraft=Go back to draft +ConfirmSetToDraft=Are you sure you want to go back to Draft status? +ImportId=Import id +Events=Events +EMailTemplates=Email templates +FileNotShared=File not shared to external public +Project=Project +Projects=Projects +LeadOrProject=Lead | Project +LeadsOrProjects=Leads | Projects +Lead=Lead +Leads=Leads +ListOpenLeads=List open leads +ListOpenProjects=List open projects +NewLeadOrProject=New lead or project +Rights=Permissions +LineNb=Line no. +IncotermLabel=Incoterms +TabLetteringCustomer=Customer lettering +TabLetteringSupplier=Vendor lettering +Monday=Monday +Tuesday=Tuesday +Wednesday=Wednesday +Thursday=Thursday +Friday=Friday +Saturday=Saturday +Sunday=Sunday +MondayMin=Mo +TuesdayMin=Tu +WednesdayMin=We +ThursdayMin=Th +FridayMin=Fr +SaturdayMin=Sa +SundayMin=Su +Day1=Monday +Day2=Tuesday +Day3=Wednesday +Day4=Thursday +Day5=Friday +Day6=Saturday +Day0=Sunday +ShortMonday=M +ShortTuesday=T +ShortWednesday=W +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. +Select2NotFound=No result found +Select2Enter=Enter +Select2MoreCharacter=or more character +Select2MoreCharacters=or more characters +Select2MoreCharactersMore=<strong>Search syntax:</strong><br><kbd><strong> |</strong></kbd><kbd> OR</kbd> (a|b)<br><kbd><strong>*</strong></kbd><kbd> Any character</kbd> (a*b)<br><kbd><strong>^</strong></kbd><kbd> Start with</kbd> (^ab)<br><kbd><strong>$</strong></kbd><kbd> End with</kbd> (ab$)<br> +Select2LoadingMoreResults=Loading more results... +Select2SearchInProgress=Search in progress... +SearchIntoThirdparties=Third parties +SearchIntoContacts=Contacts +SearchIntoMembers=Members +SearchIntoUsers=Users +SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials +SearchIntoProjects=Projects +SearchIntoMO=Manufacturing Orders +SearchIntoTasks=Tasks +SearchIntoCustomerInvoices=Customer invoices +SearchIntoSupplierInvoices=Vendor invoices +SearchIntoCustomerOrders=Sales orders +SearchIntoSupplierOrders=Purchase orders +SearchIntoCustomerProposals=Commercial proposals +SearchIntoSupplierProposals=Vendor proposals +SearchIntoInterventions=Interventions +SearchIntoContracts=Contracts +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 +CommentAdded=Comment added +CommentDeleted=Comment deleted +Everybody=Everybody +PayedBy=Paid by +PayedTo=Paid to +Monthly=Monthly +Quarterly=Quarterly +Annual=Annual +Local=Local +Remote=Remote +LocalAndRemote=Local and Remote +KeyboardShortcut=Keyboard shortcut +AssignedTo=Assigned to +Deletedraft=Delete draft +ConfirmMassDraftDeletion=Draft mass delete confirmation +FileSharedViaALink=File shared with a public link +SelectAThirdPartyFirst=Select a third party first... +YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode +Inventory=Inventory +AnalyticCode=Analytic code +TMenuMRP=MRP +ShowCompanyInfos=Show company infos +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 +ToProcess=To process +ToApprove=To approve +GlobalOpenedElemView=Global view +NoArticlesFoundForTheKeyword=No article found for the keyword '<strong>%s</strong>' +NoArticlesFoundForTheCategory=No article found for the category +ToAcceptRefuse=To accept | refuse +ContactDefault_agenda=Event +ContactDefault_commande=Order +ContactDefault_contrat=Contract +ContactDefault_facture=Invoice +ContactDefault_fichinter=Intervention +ContactDefault_invoice_supplier=Supplier Invoice +ContactDefault_order_supplier=Purchase Order +ContactDefault_project=Project +ContactDefault_project_task=Task +ContactDefault_propal=Proposal +ContactDefault_supplier_proposal=Supplier Proposal +ContactDefault_ticket=Ticket +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 +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 +EventReminder=Event Reminder +UpdateForAllLines=Update for all lines +OnHold=On hold +Civility=Civility +AffectTag=Affect Tag +ConfirmAffectTag=Bulk Tag Affect +ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? +CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ar_IQ/margins.lang b/htdocs/langs/ar_IQ/margins.lang new file mode 100644 index 00000000000..ad5406409b4 --- /dev/null +++ b/htdocs/langs/ar_IQ/margins.lang @@ -0,0 +1,45 @@ +# Dolibarr language file - Source file is en_US - marges + +Margin=Margin +Margins=Margins +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 +ProductService=Product or Service +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 provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). +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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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). diff --git a/htdocs/langs/ar_IQ/members.lang b/htdocs/langs/ar_IQ/members.lang new file mode 100644 index 00000000000..44b583a0041 --- /dev/null +++ b/htdocs/langs/ar_IQ/members.lang @@ -0,0 +1,215 @@ +# Dolibarr language file - Source file is en_US - members +MembersArea=Members area +MemberCard=Member card +SubscriptionCard=Subscription card +Member=Member +Members=Members +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: <b>%s</b>, login: <b>%s</b>) is already linked to a third party <b>%s</b>. 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 out-of-date subscription +MembersListExcluded=List of excluded members +MembersListResiliated=List of terminated members +MembersListQualified=List of qualified members +MenuMembersToValidate=Draft members +MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded 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 +WithoutSubscription=Without subscription +MemberId=Member id +NewMember=New member +MemberType=Member type +MemberTypeId=Member type id +MemberTypeLabel=Member type label +MembersTypes=Members types +MemberStatusDraft=Draft (needs to be validated) +MemberStatusDraftShort=Draft +MemberStatusActive=Validated (waiting subscription) +MemberStatusActiveShort=Validated +MemberStatusActiveLate=Subscription expired +MemberStatusActiveLateShort=Expired +MemberStatusPaid=Subscription up to date +MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded +MemberStatusResiliated=Terminated member +MemberStatusResiliatedShort=Terminated +MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded 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 +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=Late +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 +DeleteType=Delete +VoteAllowed=Vote allowed +Physical=Physical +Moral=Moral +MorAndPhy=Moral and Physical +Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? +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 +ImportDataset_member_1=Members +LastMembersModified=Latest %s modified members +LastSubscriptionsModified=Latest %s modified subscriptions +String=String +Text=Text +Int=Int +DateAndTime=Date and time +PublicMemberCard=Member public card +SubscriptionNotRecorded=Subscription not recorded +AddSubscription=Create subscription +ShowSubscription=Show subscription +# 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 +SendingReminderActionComm=Sending reminder for agenda event +# 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 +# Text of email templates +ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.<br><br> +ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:<br><br> +ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded.<br><br> +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.<br><br> +ThisIsContentOfYourCard=This is a summary of the information we have about you. Please contact us if anything is incorrect.<br><br> +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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion +DescADHERENT_MAIL_FROM=Sender Email for automatic emails +DescADHERENT_ETIQUETTE_TYPE=Format of labels page +DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets +DescADHERENT_CARD_TYPE=Format of cards page +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=Subscription payment +LastSubscriptionDate=Date of latest subscription payment +LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type +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 +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. +MembersByTownDesc=This screen show you statistics on members by town. +MembersStatisticsDesc=Choose statistics you want to read... +MenuMembersStats=Statistics +LastMemberDate=Latest member date +LatestSubscriptionDate=Latest subscription date +MemberNature=Nature of member +MembersNature=Nature of members +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 diff --git a/htdocs/langs/ar_IQ/modulebuilder.lang b/htdocs/langs/ar_IQ/modulebuilder.lang new file mode 100644 index 00000000000..19afb9d95ab --- /dev/null +++ b/htdocs/langs/ar_IQ/modulebuilder.lang @@ -0,0 +1,145 @@ +# 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 <a href="%s" target="_blank">manual development is here</a>. +EnterNameOfModuleDesc=Enter name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) +EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...). The CRUD class file, but also API file, pages to list/add/edit/delete object and SQL files will be generated. +ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): <strong>%s</strong> +ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> +ModuleBuilderDesc4=A module is detected as 'editable' when the file <strong>%s</strong> exists in root of module directory +NewModule=New module +NewObjectInModulebuilder=New object +ModuleKey=Module key +ObjectKey=Object key +ModuleInitialized=Module initialized +FilesForObjectInitialized=Files for new object '%s' initialized +FilesForObjectUpdated=Files for object '%s' updated (.sql files and .class.php file) +ModuleBuilderDescdescription=Enter here all general information that describe your module. +ModuleBuilderDescspecifications=You can enter here a detailed description of the specifications of your module that is not already structured into other tabs. So you have within easy reach all the rules to develop. Also this text content will be included into the generated documentation (see last tab). You can use Markdown format, but it is recommended to use Asciidoc format (comparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). +ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A CRUD DAO class, SQL files, page to list record of objects, to create/edit/view a record and an API will be generated. +ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module. +ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module. +ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file. +ModuleBuilderDeschooks=This tab is dedicated to hooks. +ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets. +ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module and a "ready to distribute" documentation file. Just click on button to build the package or documentation file. +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! +DangerZone=Danger zone +BuildPackage=Build package +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 <a href="https://www.dolistore.com">DoliStore.com</a>. +BuildDocumentation=Build documentation +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. +DescriptionLong=Long description +EditorName=Name of editor +EditorUrl=URL of editor +DescriptorFile=Descriptor file of module +ClassFile=File for PHP DAO CRUD class +ApiClassFile=File for PHP API class +PageForList=PHP page for list of record +PageForCreateEditView=PHP page to create/edit/view a record +PageForAgendaTab=PHP page for event tab +PageForDocumentTab=PHP page for document tab +PageForNoteTab=PHP page for note tab +PageForContactTab=PHP page for contact tab +PathToModulePackage=Path to zip of module/application package +PathToModuleDocumentation=Path to file of module/application documentation (%s) +SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed. +FileNotYetGenerated=File not yet generated +RegenerateClassAndSql=Force update of .class and .sql files +RegenerateMissingFiles=Generate missing files +SpecificationFile=File of documentation +LanguageFile=File for language +ObjectProperties=Object Properties +ConfirmDeleteProperty=Are you sure you want to delete the property <strong>%s</strong>? This will change code in PHP class but also remove column from table definition of object. +NotNull=Not NULL +NotNullDesc=1=Set database to NOT NULL. -1=Allow null values and force value to NULL if empty ('' or 0). +SearchAll=Used for 'search all' +DatabaseIndex=Database index +FileAlreadyExists=File %s already exists +TriggersFile=File for triggers code +HooksFile=File for hooks code +ArrayOfKeyValues=Array of key-val +ArrayOfKeyValuesDesc=Array of keys and values if field is a combo list with fixed values +WidgetFile=Widget file +CSSFile=CSS file +JSFile=Javascript file +ReadmeFile=Readme file +ChangeLog=ChangeLog file +TestClassFile=File for PHP Unit Test class +SqlFile=Sql file +PageForLib=File for the common PHP library +PageForObjLib=File for the PHP library dedicated to object +SqlFileExtraFields=Sql file for complementary attributes +SqlFileKey=Sql file for keys +SqlFileKeyExtraFields=Sql file for keys of complementary attributes +AnObjectAlreadyExistWithThisNameAndDiffCase=An object already exists with this name and a different case +UseAsciiDocFormat=You can use Markdown format, but it is recommended to use Asciidoc format (omparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) +IsAMeasure=Is a measure +DirScanned=Directory scanned +NoTrigger=No trigger +NoWidget=No widget +GoToApiExplorer=API explorer +ListOfMenusEntries=List of menu entries +ListOfDictionariesEntries=List of dictionaries entries +ListOfPermissionsDefined=List of defined permissions +SeeExamples=See examples here +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).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).<br><br>It can be an expression, for example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty +DisplayOnPdf=Display on PDF +IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) +SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 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 +PermissionsDefDesc=Define here the new permissions provided by your module +MenusDefDescTooltip=The menus provided by your module/application are defined into the array <strong>$this->menus</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>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 <strong>$this->dictionaries</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>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 <strong>$this->rights</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. +HooksDefDesc=Define in the <b>module_parts['hooks']</b> property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on '<b>initHooks(</b>' in core code).<br>Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on '<b>executeHooks</b>' in core code). +TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. +SeeIDsInUse=See IDs in use in your installation +SeeReservedIDsRangeHere=See range of reserved IDs +ToolkitForDevelopers=Toolkit for Dolibarr developers +TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the native module builder wizard.<br>Enable the module <strong>%s</strong> and use the wizard by clicking the <span class="fa fa-bug"></span> on the top right menu.<br>Warning: This is an advanced developer feature, do <b>not</b> experiment on your production site! +SeeTopRightMenu=See <span class="fa fa-bug"></span> on the top right menu +AddLanguageFile=Add language file +YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages") +DropTableIfEmpty=(Destroy table if empty) +TableDoesNotExists=The table %s does not exists +TableDropped=Table %s deleted +InitStructureFromExistingTable=Build the structure array string of an existing table +UseAboutPage=Disable the about page +UseDocFolder=Disable the documentation folder +UseSpecificReadme=Use a specific ReadMe +ContentOfREADMECustomized=Note: The content of the README.md file has been replaced with the specific value defined into setup of ModuleBuilder. +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. +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 +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 for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list +NotEditable=Not editable +ForeignKey=Foreign key +TypeOfFieldsHelp=Type of fields:<br>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. +ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. diff --git a/htdocs/langs/ar_IQ/mrp.lang b/htdocs/langs/ar_IQ/mrp.lang new file mode 100644 index 00000000000..fceeb1a15f1 --- /dev/null +++ b/htdocs/langs/ar_IQ/mrp.lang @@ -0,0 +1,102 @@ +Mrp=Manufacturing Orders +MOs=Manufacturing orders +ManufacturingOrder=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 Materials +BOMsSetup=Setup of module BOM +ListOfBOMs=List of bills of material - BOM +ListOfManufacturingOrders=List of Manufacturing Orders +NewBOM=New bill of materials +ProductBOMHelp=Product to create with this BOM.<br>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 materials %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 Materials? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Materials? +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 <strong>%s</strong> (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) +GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it. +ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +Workstation=Workstation +Workstations=Workstations +WorkstationsDescription=Workstations management +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationList=Workstation list +WorkstationCreate=Add new workstation +ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ? +EnableAWorkstation=Enable a workstation +ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ? +DisableAWorkstation=Disable a workstation +DeleteWorkstation=Delete +NbOperatorsRequired=Number of operators required +THMOperatorEstimated=Estimated operator THM +THMMachineEstimated=Estimated machine THM +WorkstationType=Workstation type +Human=Human +Machine=Machine +HumanMachine=Human / Machine +WorkstationArea=Workstation area +Machines=Machines +THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item diff --git a/htdocs/langs/ar_IQ/multicurrency.lang b/htdocs/langs/ar_IQ/multicurrency.lang new file mode 100644 index 00000000000..26313c6bfb9 --- /dev/null +++ b/htdocs/langs/ar_IQ/multicurrency.lang @@ -0,0 +1,38 @@ +# 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.<br>Get your <b>API key</b>.<br>If you use a free account, you can't change the <b>source currency</b> (USD by default).<br>If your main currency is not USD, the application will automatically recalculate it.<br><br>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 <b>proposals</b>, <b>orders</b> etc. +rate=rate +MulticurrencyReceived=Received, original currency +MulticurrencyRemainderToTake=Remaining amount, 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 +TabTitleMulticurrencyRate=Rate list +ListCurrencyRate=List of exchange rates for the currency +CreateRate=Create a rate +FormCreateRate=Rate creation +FormUpdateRate=Rate modification +successRateCreate=Rate for currency %s has been added to the database +ConfirmDeleteLineRate=Are you sure you want to remove the %s rate for currency %s on %s date? +DeleteLineRate=Clear rate +successRateDelete=Rate deleted +errorRateDelete=Error when deleting the rate +successUpdateRate=Modification made +ErrorUpdateRate=Error when changing the rate +Codemulticurrency=currency code +UpdateRate=change the rate +CancelUpdate=cancel +NoEmptyRate=The rate field must not be empty diff --git a/htdocs/langs/ar_IQ/oauth.lang b/htdocs/langs/ar_IQ/oauth.lang new file mode 100644 index 00000000000..075ff49a895 --- /dev/null +++ b/htdocs/langs/ar_IQ/oauth.lang @@ -0,0 +1,32 @@ +# Dolibarr language file - Source file is en_US - oauth +ConfigOAuth=OAuth Configuration +OAuthServices=OAuth Services +ManualTokenGeneration=Manual token generation +TokenManager=Token Manager +IsTokenGenerated=Is token generated ? +NoAccessToken=No access token saved into local database +HasAccessToken=A token was generated and saved into local database +NewTokenStored=Token received and saved +ToCheckDeleteTokenOnProvider=Click here to check/delete authorization saved by %s OAuth provider +TokenDeleted=Token deleted +RequestAccess=Click here to request/renew access and receive a new token to save +DeleteAccess=Click here to delete token +UseTheFollowingUrlAsRedirectURI=Use the following URL as the Redirect URI when creating your credentials with your OAuth provider: +ListOfSupportedOauthProviders=Enter the credentials provided by your OAuth2 provider. Only supported OAuth2 providers are listedd here. These services may be used by other modules that need OAuth2 authentication. +OAuthSetupForLogin=Page to generate an OAuth token +SeePreviousTab=See previous tab +OAuthIDSecret=OAuth ID and Secret +TOKEN_REFRESH=Token Refresh Present +TOKEN_EXPIRED=Token expired +TOKEN_EXPIRE_AT=Token expire at +TOKEN_DELETE=Delete saved token +OAUTH_GOOGLE_NAME=OAuth Google service +OAUTH_GOOGLE_ID=OAuth Google Id +OAUTH_GOOGLE_SECRET=OAuth Google Secret +OAUTH_GOOGLE_DESC=Go to <a class="notasortlink" href="https://console.developers.google.com/" target="_blank">this page</a> then "Credentials" to create OAuth credentials +OAUTH_GITHUB_NAME=OAuth GitHub service +OAUTH_GITHUB_ID=OAuth GitHub Id +OAUTH_GITHUB_SECRET=OAuth GitHub Secret +OAUTH_GITHUB_DESC=Go to <a class="notasortlink" href="https://github.com/settings/developers" target="_blank">this page</a> then "Register a new application" to create OAuth credentials +OAUTH_STRIPE_TEST_NAME=OAuth Stripe Test +OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live diff --git a/htdocs/langs/ar_IQ/opensurvey.lang b/htdocs/langs/ar_IQ/opensurvey.lang new file mode 100644 index 00000000000..7d26151fa16 --- /dev/null +++ b/htdocs/langs/ar_IQ/opensurvey.lang @@ -0,0 +1,61 @@ +# Dolibarr language file - Source file is en_US - opensurvey +Survey=Poll +Surveys=Polls +OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select the type of poll... +NewSurvey=New poll +OpenSurveyArea=Polls area +AddACommentForPoll=You can add a comment into poll... +AddComment=Add comment +CreatePoll=Create poll +PollTitle=Poll title +ToReceiveEMailForEachVote=Receive an email for each vote +TypeDate=Type date +TypeClassic=Type standard +OpenSurveyStep2=Select your dates among the free days (grey). The selected days are green. You can unselect a day previously selected by clicking again on it +RemoveAllDays=Remove all days +CopyHoursOfFirstDay=Copy hours of first day +RemoveAllHours=Remove all hours +SelectedDays=Selected days +TheBestChoice=The best choice currently is +TheBestChoices=The best choices currently are +with=with +OpenSurveyHowTo=If you agree to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line. +CommentsOfVoters=Comments of voters +ConfirmRemovalOfPoll=Are you sure you want to remove this poll (and all votes) +RemovePoll=Remove poll +UrlForSurvey=URL to communicate to get a direct access to poll +PollOnChoice=You are creating a poll to make a multi-choice for a poll. First enter all possible choices for your poll: +CreateSurveyDate=Create a date poll +CreateSurveyStandard=Create a standard poll +CheckBox=Simple checkbox +YesNoList=List (empty/yes/no) +PourContreList=List (empty/for/against) +AddNewColumn=Add new column +TitleChoice=Choice label +ExportSpreadsheet=Export result spreadsheet +ExpireDate=Limit date +NbOfSurveys=Number of polls +NbOfVoters=No. of voters +SurveyResults=Results +PollAdminDesc=You are allowed to change all vote lines of this poll with button "Edit". You can, as well, remove a column or a line with %s. You can also add a new column with %s. +5MoreChoices=5 more choices +Against=Against +YouAreInivitedToVote=You are invited to vote for this poll +VoteNameAlreadyExists=This name was already used for this poll +AddADate=Add a date +AddStartHour=Add start hour +AddEndHour=Add end hour +votes=vote(s) +NoCommentYet=No comments have been posted for this poll yet +CanComment=Voters can comment in the poll +CanSeeOthersVote=Voters can see other people's vote +SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format:<br>- empty,<br>- "8h", "8H" or "8:00" to give a meeting's start hour,<br>- "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour,<br>- "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes. +BackToCurrentMonth=Back to current month +ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation +ErrorOpenSurveyOneChoice=Enter at least one choice +ErrorInsertingComment=There was an error while inserting your comment +MoreChoices=Enter more choices for the voters +SurveyExpiredInfo=The poll has been closed or voting delay has expired. +EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s +ShowSurvey=Show survey +UserMustBeSameThanUserUsedToVote=You must have voted and use the same user name that the one used to vote, to post a comment diff --git a/htdocs/langs/ar_IQ/orders.lang b/htdocs/langs/ar_IQ/orders.lang new file mode 100644 index 00000000000..87d196eb22f --- /dev/null +++ b/htdocs/langs/ar_IQ/orders.lang @@ -0,0 +1,191 @@ +# Dolibarr language file - Source file is en_US - orders +OrdersArea=Customers orders area +SuppliersOrdersArea=Purchase orders area +OrderCard=Order card +OrderId=Order Id +Order=Order +PdfOrderTitle=Order +Orders=Orders +OrderLine=Order line +OrderDate=Order date +OrderDateShort=Order date +OrderToProcess=Order to process +NewOrder=New order +NewOrderSupplier=New Purchase Order +ToOrder=Make order +MakeOrder=Make order +SupplierOrder=Purchase order +SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines +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 +StatusOrderCanceledShort=Canceled +StatusOrderDraftShort=Draft +StatusOrderValidatedShort=Validated +StatusOrderSentShort=In process +StatusOrderSent=Shipment in process +StatusOrderOnProcessShort=Ordered +StatusOrderProcessedShort=Processed +StatusOrderDelivered=Delivered +StatusOrderDeliveredShort=Delivered +StatusOrderToBillShort=Delivered +StatusOrderApprovedShort=Approved +StatusOrderRefusedShort=Refused +StatusOrderToProcessShort=To process +StatusOrderReceivedPartiallyShort=Partially received +StatusOrderReceivedAllShort=Products received +StatusOrderCanceled=Canceled +StatusOrderDraft=Draft (needs to be validated) +StatusOrderValidated=Validated +StatusOrderOnProcess=Ordered - Standby reception +StatusOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusOrderProcessed=Processed +StatusOrderToBill=Delivered +StatusOrderApproved=Approved +StatusOrderRefused=Refused +StatusOrderReceivedPartially=Partially received +StatusOrderReceivedAll=All products received +ShippingExist=A shipment exists +QtyOrdered=Qty ordered +ProductQtyInDraft=Product quantity into draft orders +ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered +MenuOrdersToBill=Orders delivered +MenuOrdersToBill2=Billable orders +ShipProduct=Ship product +CreateOrder=Create Order +RefuseOrder=Refuse order +ApproveOrder=Approve order +Approve2Order=Approve order (second level) +ValidateOrder=Validate order +UnvalidateOrder=Unvalidate order +DeleteOrder=Delete order +CancelOrder=Cancel order +OrderReopened= Order %s re-open +AddOrder=Create order +AddPurchaseOrder=Create purchase order +AddToDraftOrders=Add to draft order +ShowOrder=Show order +OrdersOpened=Orders to process +NoDraftOrders=No draft orders +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 +AllOrders=All orders +NbOfOrders=Number of orders +OrdersStatistics=Order's statistics +OrdersStatisticsSuppliers=Purchase order statistics +NumberOfOrdersByMonth=Number of orders by month +AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +ListOfOrders=List of orders +CloseOrder=Close order +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 <b>%s</b>? +ConfirmUnvalidateOrder=Are you sure you want to restore order <b>%s</b> 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 <b>%s</b>? +GenerateBill=Generate invoice +ClassifyShipped=Classify delivered +DraftOrders=Draft orders +DraftSuppliersOrders=Draft purchase orders +OnProcessOrders=In process orders +RefOrder=Ref. order +RefCustomerOrder=Ref. order for customer +RefOrderSupplier=Ref. order for vendor +RefOrderSupplierShort=Ref. order vendor +SendOrderByMail=Send order by mail +ActionsOnOrder=Events on order +NoArticleOfTypeProduct=No article of type 'product' so no shippable article for this order +OrderMode=Order method +AuthorRequest=Request author +UserWithApproveOrderGrant=Users granted with "approve orders" permission. +PaymentOrderRef=Payment of order %s +ConfirmCloneOrder=Are you sure you want to clone this order <b>%s</b>? +DispatchSupplierOrder=Receiving purchase order %s +FirstApprovalAlreadyDone=First approval already done +SecondApprovalAlreadyDone=Second approval already done +SupplierOrderReceivedInDolibarr=Purchase Order %s received %s +SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted +SupplierOrderClassifiedBilled=Purchase Order %s set billed +OtherOrders=Other orders +##### Types de contacts ##### +TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order +TypeContact_commande_internal_SHIPPING=Representative following-up shipping +TypeContact_commande_external_BILLING=Customer invoice contact +TypeContact_commande_external_SHIPPING=Customer shipping contact +TypeContact_commande_external_CUSTOMER=Customer contact following-up order +TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order +TypeContact_order_supplier_internal_SHIPPING=Representative following-up shipping +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 +Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON not defined +Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined +Error_OrderNotChecked=No orders to invoice selected +# Order modes (how we receive order). Not the "why" are keys stored into dict.lang +OrderByMail=Mail +OrderByFax=Fax +OrderByEMail=Email +OrderByWWW=Online +OrderByPhone=Phone +# Documents models +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 +Ordered=Ordered +OrderCreated=Your orders have been created +OrderFail=An error happened during your orders creation +CreateOrders=Create orders +ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%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 +WithReceptionFinished=With reception finished +#### supplier orders status +StatusSupplierOrderCanceledShort=Canceled +StatusSupplierOrderDraftShort=Draft +StatusSupplierOrderValidatedShort=Validated +StatusSupplierOrderSentShort=In process +StatusSupplierOrderSent=Shipment in process +StatusSupplierOrderOnProcessShort=Ordered +StatusSupplierOrderProcessedShort=Processed +StatusSupplierOrderDelivered=Delivered +StatusSupplierOrderDeliveredShort=Delivered +StatusSupplierOrderToBillShort=Delivered +StatusSupplierOrderApprovedShort=Approved +StatusSupplierOrderRefusedShort=Refused +StatusSupplierOrderToProcessShort=To process +StatusSupplierOrderReceivedPartiallyShort=Partially received +StatusSupplierOrderReceivedAllShort=Products received +StatusSupplierOrderCanceled=Canceled +StatusSupplierOrderDraft=Draft (needs to be validated) +StatusSupplierOrderValidated=Validated +StatusSupplierOrderOnProcess=Ordered - Standby reception +StatusSupplierOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusSupplierOrderProcessed=Processed +StatusSupplierOrderToBill=Delivered +StatusSupplierOrderApproved=Approved +StatusSupplierOrderRefused=Refused +StatusSupplierOrderReceivedPartially=Partially received +StatusSupplierOrderReceivedAll=All products received diff --git a/htdocs/langs/ar_IQ/other.lang b/htdocs/langs/ar_IQ/other.lang new file mode 100644 index 00000000000..0e76e493b5a --- /dev/null +++ b/htdocs/langs/ar_IQ/other.lang @@ -0,0 +1,292 @@ +# Dolibarr language file - Source file is en_US - other +SecurityCode=Security code +NumberingShort=N° +Tools=Tools +TMenuTools=Tools +ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. +Birthday=Birthday +BirthdayAlertOn=birthday alert active +BirthdayAlertOff=birthday alert inactive +TransKey=Translation of the key TransKey +MonthOfInvoice=Month (number 1-12) of invoice date +TextMonthOfInvoice=Month (text) of invoice date +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 <b>%s</b>. +DocFileGeneratedInto=Doc file generated into <b>%s</b>. +JumpToLogin=Disconnected. Go to login page... +MessageForm=Message on online payment form +MessageOK=Message on the return page for a validated payment +MessageKO=Message on the return page for a canceled payment +ContentOfDirectoryIsNotEmpty=Content of this directory is not empty. +DeleteAlsoContentRecursively=Check to delete all content recursively +PoweredBy=Powered by +YearOfInvoice=Year of invoice date +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 +Notify_ORDER_VALIDATE=Sales order validated +Notify_ORDER_SENTBYMAIL=Sales order sent by mail +Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email +Notify_ORDER_SUPPLIER_VALIDATE=Purchase order recorded +Notify_ORDER_SUPPLIER_APPROVE=Purchase order approved +Notify_ORDER_SUPPLIER_REFUSE=Purchase order refused +Notify_PROPAL_VALIDATE=Customer proposal validated +Notify_PROPAL_CLOSE_SIGNED=Customer proposal closed signed +Notify_PROPAL_CLOSE_REFUSED=Customer proposal closed refused +Notify_PROPAL_SENTBYMAIL=Commercial proposal sent by mail +Notify_WITHDRAW_TRANSMIT=Transmission withdrawal +Notify_WITHDRAW_CREDIT=Credit withdrawal +Notify_WITHDRAW_EMIT=Perform withdrawal +Notify_COMPANY_CREATE=Third party created +Notify_COMPANY_SENTBYMAIL=Mails sent from third party card +Notify_BILL_VALIDATE=Customer invoice validated +Notify_BILL_UNVALIDATE=Customer invoice unvalidated +Notify_BILL_PAYED=Customer invoice paid +Notify_BILL_CANCEL=Customer invoice canceled +Notify_BILL_SENTBYMAIL=Customer invoice sent by mail +Notify_BILL_SUPPLIER_VALIDATE=Vendor invoice validated +Notify_BILL_SUPPLIER_PAYED=Vendor invoice paid +Notify_BILL_SUPPLIER_SENTBYMAIL=Vendor invoice sent by mail +Notify_BILL_SUPPLIER_CANCELED=Vendor invoice cancelled +Notify_CONTRACT_VALIDATE=Contract validated +Notify_FICHINTER_VALIDATE=Intervention validated +Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention +Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail +Notify_SHIPPING_VALIDATE=Shipping validated +Notify_SHIPPING_SENTBYMAIL=Shipping sent by mail +Notify_MEMBER_VALIDATE=Member validated +Notify_MEMBER_MODIFY=Member modified +Notify_MEMBER_SUBSCRIPTION=Member subscribed +Notify_MEMBER_RESILIATE=Member terminated +Notify_MEMBER_DELETE=Member deleted +Notify_PROJECT_CREATE=Project creation +Notify_TASK_CREATE=Task created +Notify_TASK_MODIFY=Task modified +Notify_TASK_DELETE=Task deleted +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 +Notify_ACTION_CREATE=Added action to Agenda +SeeModuleSetup=See setup of module %s +NbOfAttachedFiles=Number of attached files/documents +TotalSizeOfAttachedFiles=Total size of attached files/documents +MaxSize=Maximum size +AttachANewFile=Attach a new file/document +LinkedObject=Linked object +NbOfActiveNotifications=Number of notifications (no. of recipient emails) +PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__(Hello)__<br>This is a <b>test</b> mail sent to __EMAIL__ (the word test must be in bold).<br>The lines are separated by a carriage return.<br><br>__USER_SIGNATURE__ +PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\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__ +PredefinedMailContentSendProposal=__(Hello)__\n\nPlease find commercial proposal __REF__ attached \n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nPlease find price request __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendOrder=__(Hello)__\n\nPlease find order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +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__ +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__<br><br>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<br>(manual module selection) +DemoFundation=Manage members of a foundation +DemoFundation2=Manage members and bank account of a foundation +DemoCompanyServiceOnly=Company or freelance selling service only +DemoCompanyShopWithCashDesk=Manage a shop with a cash desk +DemoCompanyProductAndStocks=Shop selling products with Point Of Sales +DemoCompanyManufacturing=Company manufacturing products +DemoCompanyAll=Company with multiple activities (all main modules) +CreatedBy=Created by %s +ModifiedBy=Modified by %s +ValidatedBy=Validated by %s +SignedBy=Signed by %s +ClosedBy=Closed by %s +CreatedById=User id who created +ModifiedById=User id who made latest change +ValidatedById=User id who validated +CanceledById=User id who canceled +ClosedById=User id who closed +CreatedByLogin=User login who created +ModifiedByLogin=User login who made latest change +ValidatedByLogin=User login who validated +CanceledByLogin=User login who canceled +ClosedByLogin=User login who closed +FileWasRemoved=File %s was removed +DirWasRemoved=Directory %s was removed +FeatureNotYetAvailable=Feature not yet available in the current version +FeaturesSupported=Supported features +Width=Width +Height=Height +Depth=Depth +Top=Top +Bottom=Bottom +Left=Left +Right=Right +CalculatedWeight=Calculated weight +CalculatedVolume=Calculated volume +Weight=Weight +WeightUnitton=ton +WeightUnitkg=kg +WeightUnitg=g +WeightUnitmg=mg +WeightUnitpound=pound +WeightUnitounce=ounce +Length=Length +LengthUnitm=m +LengthUnitdm=dm +LengthUnitcm=cm +LengthUnitmm=mm +Surface=Area +SurfaceUnitm2=m² +SurfaceUnitdm2=dm² +SurfaceUnitcm2=cm² +SurfaceUnitmm2=mm² +SurfaceUnitfoot2=ft² +SurfaceUnitinch2=in² +Volume=Volume +VolumeUnitm3=m³ +VolumeUnitdm3=dm³ (L) +VolumeUnitcm3=cm³ (ml) +VolumeUnitmm3=mm³ (µl) +VolumeUnitfoot3=ft³ +VolumeUnitinch3=in³ +VolumeUnitounce=ounce +VolumeUnitlitre=litre +VolumeUnitgallon=gallon +SizeUnitm=m +SizeUnitdm=dm +SizeUnitcm=cm +SizeUnitmm=mm +SizeUnitinch=inch +SizeUnitfoot=foot +SizeUnitpoint=point +BugTracker=Bug tracker +SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.<br>Change will become effective once you click on the confirmation link in the email.<br>Check your inbox. +BackToLoginPage=Back to login page +AuthenticationDoesNotAllowSendNewPassword=Authentication mode is <b>%s</b>.<br>In this mode, Dolibarr can't know nor change your password.<br>Contact your system administrator if you want to change your password. +EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. +ProfIdShortDesc=<b>Prof Id %s</b> is an information depending on third party country.<br>For example, for country <b>%s</b>, it's code <b>%s</b>. +DolibarrDemo=Dolibarr ERP/CRM demo +StatsByNumberOfUnits=Statistics for sum of qty of products/services +StatsByNumberOfEntities=Statistics in number of referring entities (no. of invoice, or order...) +NumberOfProposals=Number of proposals +NumberOfCustomerOrders=Number of sales orders +NumberOfCustomerInvoices=Number of customer invoices +NumberOfSupplierProposals=Number of vendor proposals +NumberOfSupplierOrders=Number of purchase orders +NumberOfSupplierInvoices=Number of vendor invoices +NumberOfContracts=Number of contracts +NumberOfMos=Number of manufacturing orders +NumberOfUnitsProposals=Number of units on proposals +NumberOfUnitsCustomerOrders=Number of units on sales orders +NumberOfUnitsCustomerInvoices=Number of units on customer invoices +NumberOfUnitsSupplierProposals=Number of units on vendor proposals +NumberOfUnitsSupplierOrders=Number of units on purchase orders +NumberOfUnitsSupplierInvoices=Number of units on vendor invoices +NumberOfUnitsContracts=Number of units on contracts +NumberOfUnitsMos=Number of units to produce in manufacturing orders +EMailTextInterventionAddedContact=A new intervention %s has been assigned to you. +EMailTextInterventionValidated=The intervention %s has been validated. +EMailTextInvoiceValidated=Invoice %s has been validated. +EMailTextInvoicePayed=Invoice %s has been paid. +EMailTextProposalValidated=Proposal %s has been validated. +EMailTextProposalClosedSigned=Proposal %s has been closed signed. +EMailTextOrderValidated=Order %s has been validated. +EMailTextOrderApproved=Order %s has been approved. +EMailTextOrderValidatedBy=Order %s has been recorded by %s. +EMailTextOrderApprovedBy=Order %s has been approved by %s. +EMailTextOrderRefused=Order %s has been refused. +EMailTextOrderRefusedBy=Order %s has been refused by %s. +EMailTextExpeditionValidated=Shipping %s has been validated. +EMailTextExpenseReportValidated=Expense report %s has been validated. +EMailTextExpenseReportApproved=Expense report %s has been approved. +EMailTextHolidayValidated=Leave request %s has been validated. +EMailTextHolidayApproved=Leave request %s has been approved. +EMailTextActionAdded=The action %s has been added to the Agenda. +ImportedWithSet=Importation data set +DolibarrNotification=Automatic notification +ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing... +NewLength=New width +NewHeight=New height +NewSizeAfterCropping=New size after cropping +DefineNewAreaToPick=Define new area on image to pick (left click on image then drag until you reach the opposite corner) +CurrentInformationOnImage=This tool was designed to help you to resize or crop an image. This is the information on the current edited image +ImageEditor=Image editor +YouReceiveMailBecauseOfNotification=You receive this message because your email has been added to list of targets to be informed of particular events into %s software of %s. +YouReceiveMailBecauseOfNotification2=This event is the following: +ThisIsListOfModules=This is a list of modules preselected by this demo profile (only most common modules are visible in this demo). Edit this to have a more personalized demo and click on "Start". +UseAdvancedPerms=Use the advanced permissions of some modules +FileFormat=File format +SelectAColor=Choose a color +AddFiles=Add Files +StartUpload=Start upload +CancelUpload=Cancel upload +FileIsTooBig=Files is too big +PleaseBePatient=Please be patient... +NewPassword=New password +ResetPassword=Reset password +RequestToResetPasswordReceived=A request to change your password has been received. +NewKeyIs=This is your new keys to login +NewKeyWillBe=Your new key to login to software will be +ClickHereToGoTo=Click here to go to %s +YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change +ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. +IfAmountHigherThan=If amount higher than <strong>%s</strong> +SourcesRepository=Repository for sources +Chart=Chart +PassEncoding=Password encoding +PermissionsAdd=Permissions added +PermissionsDelete=Permissions removed +YourPasswordMustHaveAtLeastXChars=Your password must have at least <strong>%s</strong> chars +YourPasswordHasBeenReset=Your password has been reset successfully +ApplicantIpAddress=IP address of applicant +SMSSentTo=SMS sent to %s +MissingIds=Missing ids +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.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID + +##### Export ##### +ExportsArea=Exports area +AvailableFormats=Available formats +LibraryUsed=Library used +LibraryVersion=Library version +ExportableDatas=Exportable data +NoExportableData=No exportable data (no modules with exportable data loaded, or missing permissions) +##### External sites ##### +WebsiteSetup=Setup of module website +WEBSITE_PAGEURL=URL of page +WEBSITE_TITLE=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). +WEBSITE_KEYWORDS=Keywords +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_IQ/paybox.lang b/htdocs/langs/ar_IQ/paybox.lang new file mode 100644 index 00000000000..6f320c03181 --- /dev/null +++ b/htdocs/langs/ar_IQ/paybox.lang @@ -0,0 +1,30 @@ +# Dolibarr language file - Source file is en_US - paybox +PayBoxSetup=PayBox module setup +PayBoxDesc=This module offer pages to allow payment on <a href="http://www.paybox.com" target="_blank">Paybox</a> by customers. This can be used for a free payment or for a payment on a particular Dolibarr object (invoice, order, ...) +FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects +PaymentForm=Payment form +WelcomeOnPaymentPage=Welcome to our online payment service +ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s. +ThisIsInformationOnPayment=This is information on payment to do +ToComplete=To complete +YourEMail=Email to receive payment confirmation +Creditor=Creditor +PaymentCode=Payment code +PayBoxDoPayment=Pay with Paybox +YouWillBeRedirectedOnPayBox=You will be redirected on secured Paybox page to input you credit card information +Continue=Next +SetupPayBoxToHavePaymentCreatedAutomatically=Setup your Paybox with url <b>%s</b> to have payment created automatically when validated by Paybox. +YourPaymentHasBeenRecorded=This page confirms that your payment has been recorded. Thank you. +YourPaymentHasNotBeenRecorded=Your payment has NOT been recorded and the transaction has been canceled. Thank you. +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 +CSSUrlForPaymentForm=CSS style sheet url for payment form +NewPayboxPaymentReceived=New Paybox payment received +NewPayboxPaymentFailed=New Paybox payment tried but failed +PAYBOX_PAYONLINE_SENDEMAIL=Email notification after payment attempt (success or fail) +PAYBOX_PBX_SITE=Value for PBX SITE +PAYBOX_PBX_RANG=Value for PBX Rang +PAYBOX_PBX_IDENTIFIANT=Value for PBX ID +PAYBOX_HMAC_KEY=HMAC key diff --git a/htdocs/langs/ar_IQ/paypal.lang b/htdocs/langs/ar_IQ/paypal.lang new file mode 100644 index 00000000000..5eb5f389445 --- /dev/null +++ b/htdocs/langs/ar_IQ/paypal.lang @@ -0,0 +1,36 @@ +# Dolibarr language file - Source file is en_US - paypal +PaypalSetup=PayPal module setup +PaypalDesc=This module allows payment by customers via <a href="http://www.paypal.com" target="_blank">PayPal</a>. This can be used for a ad-hoc payment or for a payment related to a Dolibarr object (invoice, order, ...) +PaypalOrCBDoPayment=Pay with PayPal (Card or PayPal) +PaypalDoPayment=Pay with PayPal +PAYPAL_API_SANDBOX=Mode test/sandbox +PAYPAL_API_USER=API username +PAYPAL_API_PASSWORD=API password +PAYPAL_API_SIGNATURE=API signature +PAYPAL_SSLVERSION=Curl SSL Version +PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Offer "integral" payment (Credit card+PayPal) or "PayPal" only +PaypalModeIntegral=Integral +PaypalModeOnlyPaypal=PayPal only +ONLINE_PAYMENT_CSS_URL=Optional URL of CSS stylesheet on online payment page +ThisIsTransactionId=This is id of transaction: <b>%s</b> +PAYPAL_ADD_PAYMENT_URL=Include the PayPal payment url when you send a document by email +NewOnlinePaymentReceived=New online payment received +NewOnlinePaymentFailed=New online payment tried but failed +ONLINE_PAYMENT_SENDEMAIL=Email address for notifications after each payment attempt (for success and fail) +ReturnURLAfterPayment=Return URL after payment +ValidationOfOnlinePaymentFailed=Validation of online payment failed +PaymentSystemConfirmPaymentPageWasCalledButFailed=Payment confirmation page was called by payment system returned an error +SetExpressCheckoutAPICallFailed=SetExpressCheckout API call failed. +DoExpressCheckoutPaymentAPICallFailed=DoExpressCheckoutPayment API call failed. +DetailedErrorMessage=Detailed Error Message +ShortErrorMessage=Short Error Message +ErrorCode=Error Code +ErrorSeverityCode=Error Severity Code +OnlinePaymentSystem=Online payment system +PaypalLiveEnabled=PayPal "live" mode enabled (otherwise test/sandbox mode) +PaypalImportPayment=Import PayPal payments +PostActionAfterPayment=Post actions after payments +ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary. +ValidationOfPaymentFailed=Validation of payment has failed +CardOwner=Card holder +PayPalBalance=Paypal credit diff --git a/htdocs/langs/ar_IQ/printing.lang b/htdocs/langs/ar_IQ/printing.lang new file mode 100644 index 00000000000..16494583550 --- /dev/null +++ b/htdocs/langs/ar_IQ/printing.lang @@ -0,0 +1,54 @@ +# Dolibarr language file - Source file is en_US - printing +Module64000Name=Direct Printing +Module64000Desc=Enable Direct Printing System +PrintingSetup=Setup of Direct Printing System +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. +ListDrivers=List of drivers +PrintTestDesc=List of Printers. +FileWasSentToPrinter=File %s was sent to printer +ViaModule=via the module +NoActivePrintingModuleFound=No active driver to print document. Check setup of module %s. +PleaseSelectaDriverfromList=Please select a driver from list. +PleaseConfigureDriverfromList=Please configure the selected driver from list. +SetupDriver=Driver setup +TargetedPrinter=Targeted printer +UserConf=Setup per user +PRINTGCP_INFO=Google OAuth API setup +PRINTGCP_AUTHLINK=Authentication +PRINTGCP_TOKEN_ACCESS=Google Cloud Print OAuth Token +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 +GCP_OwnerName=Owner Name +GCP_State=Printer State +GCP_connectionStatus=Online State +GCP_Type=Printer Type +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 +NoDefaultPrinterDefined=No default printer defined +DefaultPrinter=Default printer +Printer=Printer +IPP_Uri=Printer Uri +IPP_Name=Printer Name +IPP_State=Printer State +IPP_State_reason=State reason +IPP_State_reason1=State reason1 +IPP_BW=BW +IPP_Color=Color +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 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/ar_IQ/productbatch.lang b/htdocs/langs/ar_IQ/productbatch.lang new file mode 100644 index 00000000000..4414b6ad8d8 --- /dev/null +++ b/htdocs/langs/ar_IQ/productbatch.lang @@ -0,0 +1,35 @@ +# ProductBATCH language file - en_US - ProductBATCH +ManageLotSerial=Use lot/serial number +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) +ProductStatusNotOnBatch=No (lot/serial not used) +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial +ProductStatusNotOnBatchShort=No +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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ar_IQ/products.lang b/htdocs/langs/ar_IQ/products.lang new file mode 100644 index 00000000000..28853762424 --- /dev/null +++ b/htdocs/langs/ar_IQ/products.lang @@ -0,0 +1,398 @@ +# Dolibarr language file - Source file is en_US - products +ProductRef=Product ref. +ProductLabel=Product label +ProductLabelTranslated=Translated product label +ProductDescription=Product description +ProductDescriptionTranslated=Translated product description +ProductNoteTranslated=Translated product note +ProductServiceCard=Products/Services card +TMenuProducts=Products +TMenuServices=Services +Products=Products +Services=Services +Product=Product +Service=Service +ProductId=Product/service id +Create=Create +Reference=Reference +NewProduct=New product +NewService=New service +ProductVatMassChange=Global VAT Update +ProductVatMassChangeDesc=This tool updates the VAT rate defined on <b><u>ALL</u></b> products and services! +MassBarcodeInit=Mass barcode init +MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. +ProductAccountancyBuyCode=Accounting code (purchase) +ProductAccountancyBuyIntraCode=Accounting code (purchase intra-community) +ProductAccountancyBuyExportCode=Accounting code (purchase import) +ProductAccountancySellCode=Accounting code (sale) +ProductAccountancySellIntraCode=Accounting code (sale intra-Community) +ProductAccountancySellExportCode=Accounting code (sale export) +ProductOrService=Product or Service +ProductsAndServices=Products and Services +ProductsOrServices=Products or Services +ProductsPipeServices=Products | Services +ProductsOnSale=Products for sale +ProductsOnPurchase=Products for purchase +ProductsOnSaleOnly=Products for sale only +ProductsOnPurchaseOnly=Products for purchase only +ProductsNotOnSell=Products not for sale and not for purchase +ProductsOnSellAndOnBuy=Products for sale and for purchase +ServicesOnSale=Services for sale +ServicesOnPurchase=Services for purchase +ServicesOnSaleOnly=Services for sale only +ServicesOnPurchaseOnly=Services for purchase only +ServicesNotOnSell=Services not for sale and not for purchase +ServicesOnSellAndOnBuy=Services for sale and for purchase +LastModifiedProductsAndServices=Latest %s modified products/services +LastRecordedProducts=Latest %s recorded products +LastRecordedServices=Latest %s recorded services +CardProduct0=Product +CardProduct1=Service +Stock=Stock +MenuStocks=Stocks +Stocks=Stocks and location (warehouse) of products +Movements=Movements +Sell=Sell +Buy=Purchase +OnSell=For sale +OnBuy=For purchase +NotOnSell=Not for sale +ProductStatusOnSell=For sale +ProductStatusNotOnSell=Not for sale +ProductStatusOnSellShort=For sale +ProductStatusNotOnSellShort=Not for sale +ProductStatusOnBuy=For purchase +ProductStatusNotOnBuy=Not for purchase +ProductStatusOnBuyShort=For purchase +ProductStatusNotOnBuyShort=Not for purchase +UpdateVAT=Update vat +UpdateDefaultPrice=Update default price +UpdateLevelPrices=Update prices for each level +AppliedPricesFrom=Applied from +SellingPrice=Selling price +SellingPriceHT=Selling price (excl. tax) +SellingPriceTTC=Selling price (inc. tax) +SellingMinPriceTTC=Minimum Selling price (inc. tax) +CostPriceDescription=This price field (excl. tax) can be used to store the average amount this product costs to your company. It may be any price you calculate yourself, for example from the average buying price plus average production and distribution cost. +CostPriceUsage=This value could be used for margin calculation. +SoldAmount=Sold amount +PurchasedAmount=Purchased amount +NewPrice=New price +MinPrice=Min. sell price +EditSellingPriceLabel=Edit selling price label +CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount. +ContractStatusClosed=Closed +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 +SupplierRef=Vendor SKU +ShowProduct=Show product +ShowService=Show service +ProductsAndServicesArea=Product and Services area +ProductsArea=Product area +ServicesArea=Services area +ListOfStockMovements=List of stock movements +BuyingPrice=Buying price +PriceForEachProduct=Products with specific prices +SupplierCard=Vendor card +PriceRemoved=Price removed +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 +AssociatedProductsAbility=Enable Kits (set of several products) +VariantsAbility=Enable Variants (variations of products, for example color, size) +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 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 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? +ProductDeleted=Product/Service "%s" deleted from database. +ExportDataset_produit_1=Products +ExportDataset_service_1=Services +ImportDataset_produit_1=Products +ImportDataset_service_1=Services +DeleteProductLine=Delete product line +ConfirmDeleteProductLine=Are you sure you want to delete this product line? +ProductSpecial=Special +QtyMin=Min. purchase quantity +PriceQtyMin=Price quantity min. +PriceQtyMinCurrency=Price (currency) for this qty. (no discount) +VATRateForSupplierProduct=VAT Rate (for this vendor/product) +DiscountQtyMin=Discount for this qty. +NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product +NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item +PredefinedProductsToSell=Predefined Product +PredefinedServicesToSell=Predefined Service +PredefinedProductsAndServicesToSell=Predefined products/services to sell +PredefinedProductsToPurchase=Predefined product to purchase +PredefinedServicesToPurchase=Predefined services to purchase +PredefinedProductsAndServicesToPurchase=Predefined products/services to purchase +NotPredefinedProducts=Not predefined products/services +GenerateThumb=Generate thumb +ServiceNb=Service #%s +ListProductServiceByPopularity=List of products/services by popularity +ListProductByPopularity=List of products by popularity +ListServiceByPopularity=List of services by popularity +Finished=Manufactured product +RowMaterial=Raw Material +ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>? +CloneContentProduct=Clone all main information of product/service +ClonePricesProduct=Clone prices +CloneCategoriesProduct=Clone tags/categories linked +CloneCompositionProduct=Clone virtual product/service +CloneCombinationsProduct=Clone product variants +ProductIsUsed=This product is used +NewRefForClone=Ref. of new product/service +SellingPrices=Selling prices +BuyingPrices=Buying prices +CustomerPrices=Customer prices +SuppliersPrices=Vendor prices +SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) +CustomCode=Customs|Commodity|HS code +CountryOrigin=Origin country +RegionStateOrigin=Region origin +StateOrigin=State|Province origin +Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product +ShortLabel=Short label +Unit=Unit +p=u. +set=set +se=set +second=second +s=s +hour=hour +h=h +day=day +d=d +kilogram=kilogram +kg=Kg +gram=gram +g=g +meter=meter +m=m +lm=lm +m2=m² +m3=m³ +liter=liter +l=L +unitP=Piece +unitSET=Set +unitS=Second +unitH=Hour +unitD=Day +unitG=Gram +unitM=Meter +unitLM=Linear meter +unitM2=Square meter +unitM3=Cubic meter +unitL=Liter +unitT=ton +unitKG=kg +unitG=Gram +unitMG=mg +unitLB=pound +unitOZ=ounce +unitM=Meter +unitDM=dm +unitCM=cm +unitMM=mm +unitFT=ft +unitIN=in +unitM2=Square meter +unitDM2=dm² +unitCM2=cm² +unitMM2=mm² +unitFT2=ft² +unitIN2=in² +unitM3=Cubic meter +unitDM3=dm³ +unitCM3=cm³ +unitMM3=mm³ +unitFT3=ft³ +unitIN3=in³ +unitOZ3=ounce +unitgallon=gallon +ProductCodeModel=Product ref template +ServiceCodeModel=Service ref template +CurrentProductPrice=Current price +AlwaysUseNewPrice=Always use current price of product/service +AlwaysUseFixedPrice=Use the fixed price +PriceByQuantity=Different prices by quantity +DisablePriceByQty=Disable prices by quantity +PriceByQuantityRange=Quantity range +MultipriceRules=Automatic prices for segment +UseMultipriceRules=Use price segment rules (defined into product module setup) to auto calculate prices of all other segments according to first segment +PercentVariationOver=%% variation over %s +PercentDiscountOver=%% discount over %s +KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products +VariantRefExample=Examples: COL, SIZE +VariantLabelExample=Examples: Color, Size +### composition fabrication +Build=Produce +ProductsMultiPrice=Products and prices for each price segment +ProductsOrServiceMultiPrice=Customer prices (of products or services, multi-prices) +ProductSellByQuarterHT=Products turnover quarterly before tax +ServiceSellByQuarterHT=Services turnover quarterly before tax +Quarter1=1st. Quarter +Quarter2=2nd. Quarter +Quarter3=3rd. Quarter +Quarter4=4th. Quarter +BarCodePrintsheet=Print barcode +PageToGenerateBarCodeSheets=With this tool, you can print sheets of barcode stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button <b>%s</b>. +NumberOfStickers=Number of stickers to print on page +PrintsheetForOneBarCode=Print several stickers for one barcode +BuildPageToPrint=Generate page to print +FillBarCodeTypeAndValueManually=Fill barcode type and value manually. +FillBarCodeTypeAndValueFromProduct=Fill barcode type and value from barcode of a product. +FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from barcode of a third party. +DefinitionOfBarCodeForProductNotComplete=Definition of type or value of barcode not complete for product %s. +DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of barcode non complete for third party %s. +BarCodeDataForProduct=Barcode information of product %s: +BarCodeDataForThirdparty=Barcode information of third party %s: +ResetBarcodeForAllRecords=Define barcode value for all record (this will also reset barcode value already defined with new values) +PriceByCustomer=Different prices for each customer +PriceCatalogue=A single sell price per product/service +PricingRule=Rules for selling prices +AddCustomerPrice=Add price by customer +ForceUpdateChildPriceSoc=Set same price on customer subsidiaries +PriceByCustomerLog=Log of previous customer prices +MinimumPriceLimit=Minimum price can't be lower then %s +MinimumRecommendedPrice=Minimum recommended price is: %s +PriceExpressionEditor=Price expression editor +PriceExpressionSelected=Selected price expression +PriceExpressionEditorHelp1="price = 2 + 2" or "2 + 2" for setting the price. Use ; to separate expressions +PriceExpressionEditorHelp2=You can access ExtraFields with variables like <b>#extrafield_myextrafieldkey#</b> and global variables with <b>#global_mycode#</b> +PriceExpressionEditorHelp3=In both product/service and vendor prices there are these variables available:<br><b>#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min#</b> +PriceExpressionEditorHelp4=In product/service price only: <b>#supplier_min_price#</b><br>In vendor prices only: <b>#supplier_quantity# and #supplier_tva_tx#</b> +PriceExpressionEditorHelp5=Available global values: +PriceMode=Price mode +PriceNumeric=Number +DefaultPrice=Default price +DefaultPriceLog=Log of previous default prices +ComposedProductIncDecStock=Increase/Decrease stock on parent change +ComposedProduct=Child products +MinSupplierPrice=Minimum buying price +MinCustomerPrice=Minimum selling price +DynamicPriceConfiguration=Dynamic price configuration +DynamicPriceDesc=You may define mathematical formulae to calculate Customer or Vendor prices. Such formulas can use all mathematical operators, some constants and variables. You can define here the variables you wish to use. If the variable needs an automatic update, you may define the external URL to allow Dolibarr to update the value automatically. +AddVariable=Add Variable +AddUpdater=Add Updater +GlobalVariables=Global variables +VariableToUpdate=Variable to update +GlobalVariableUpdaters=External updaters for variables +GlobalVariableUpdaterType0=JSON data +GlobalVariableUpdaterHelp0=Parses JSON data from specified URL, VALUE specifies the location of relevant value, +GlobalVariableUpdaterHelpFormat0=Format for request {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"} +GlobalVariableUpdaterType1=WebService data +GlobalVariableUpdaterHelp1=Parses WebService data from specified URL, NS specifies the namespace, VALUE specifies the location of relevant value, DATA should contain the data to send and METHOD is the calling WS method +GlobalVariableUpdaterHelpFormat1=Format for request is {"URL": "http://example.com/urlofws", "VALUE": "array,targetvalue", "NS": "http://example.com/urlofns", "METHOD": "myWSMethod", "DATA": {"your": "data", "to": "send"}} +UpdateInterval=Update interval (minutes) +LastUpdated=Latest update +CorrectlyUpdated=Correctly updated +PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is +PropalMergePdfProductChooseFile=Select PDF files +IncludingProductWithTag=Include products/services with tag +DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer +WarningSelectOneDocument=Please select at least one document +DefaultUnitToShow=Unit +NbOfQtyInProposals=Qty in proposals +ClinkOnALinkOfColumn=Click on a link of column %s to get a detailed view... +ProductsOrServicesTranslations=Products/Services translations +TranslatedLabel=Translated label +TranslatedDescription=Translated description +TranslatedNote=Translated notes +ProductWeight=Weight for 1 product +ProductVolume=Volume for 1 product +WeightUnits=Weight unit +VolumeUnits=Volume unit +WidthUnits=Width unit +LengthUnits=Length unit +HeightUnits=Height unit +SurfaceUnits=Surface unit +SizeUnits=Size unit +DeleteProductBuyPrice=Delete buying price +ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price? +SubProduct=Sub product +ProductSheet=Product sheet +ServiceSheet=Service sheet +PossibleValues=Possible values +GoOnMenuToCreateVairants=Go on menu %s - %s to prepare attribute variants (like colors, size, ...) +UseProductFournDesc=Add a feature to define the descriptions of products defined by the vendors in addition to descriptions for customers +ProductSupplierDescription=Vendor description for the product +UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents) +PackagingForThisProduct=Packaging +PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging + +#Attributes +VariantAttributes=Variant attributes +ProductAttributes=Variant attributes for products +ProductAttributeName=Variant attribute %s +ProductAttribute=Variant attribute +ProductAttributeDeleteDialog=Are you sure you want to delete this attribute? All values will be deleted +ProductAttributeValueDeleteDialog=Are you sure you want to delete the value "%s" with reference "%s" of this attribute? +ProductCombinationDeleteDialog=Are you sure want to delete the variant of the product "<strong>%s</strong>"? +ProductCombinationAlreadyUsed=There was an error while deleting the variant. Please check it is not being used in any object +ProductCombinations=Variants +PropagateVariant=Propagate variants +HideProductCombinations=Hide products variant in the products selector +ProductCombination=Variant +NewProductCombination=New variant +EditProductCombination=Editing variant +NewProductCombinations=New variants +EditProductCombinations=Editing variants +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 +ErrorCreatingProductAttributeValue=There was an error while creating the attribute value. It could be because there is already an existing value with that reference +ProductCombinationGeneratorWarning=If you continue, before generating new variants, all previous ones will be DELETED. Already existing ones will be updated with the new values +TooMuchCombinationsWarning=Generating lots of variants may result in high CPU, memory usage and Dolibarr not able to create them. Enabling the option "%s" may help reduce memory usage. +DoNotRemovePreviousCombinations=Do not remove previous variants +UsePercentageVariations=Use percentage variations +PercentageVariation=Percentage variation +ErrorDeletingGeneratedProducts=There was an error while trying to delete existing product variants +NbOfDifferentValues=No. of different values +NbProducts=Number of products +ParentProduct=Parent product +HideChildProducts=Hide variant products +ShowChildProducts=Show variant products +NoEditVariants=Go to Parent product card and edit variants price impact in the variants tab +ConfirmCloneProductCombinations=Would you like to copy all the product variants to the other parent product with the given reference? +CloneDestinationReference=Destination product reference +ErrorCopyProductCombinations=There was an error while copying the product variants +ErrorDestinationProductNotFound=Destination product not found +ErrorProductCombinationNotFound=Product variant not found +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 diff --git a/htdocs/langs/ar_IQ/projects.lang b/htdocs/langs/ar_IQ/projects.lang new file mode 100644 index 00000000000..d14e52d14e8 --- /dev/null +++ b/htdocs/langs/ar_IQ/projects.lang @@ -0,0 +1,275 @@ +# Dolibarr language file - Source file is en_US - projects +RefProject=Ref. project +ProjectRef=Project ref. +ProjectId=Project Id +ProjectLabel=Project label +ProjectsArea=Projects Area +ProjectStatus=Project status +SharedProject=Everybody +PrivateProject=Project contacts +ProjectsImContactFor=Projects for which I am explicitly a contact +AllAllowedProjects=All project I can read (mine + public) +AllProjects=All projects +MyProjectsDesc=This view is limited to projects you are a contact for +ProjectsPublicDesc=This view presents all projects you are allowed to read. +TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read. +ProjectsPublicTaskDesc=This view presents all projects and tasks you are allowed to read. +ProjectsDesc=This view presents all projects (your user permissions grant you permission to view everything). +TasksOnProjectsDesc=This view presents all tasks on all projects (your user permissions grant you permission to view everything). +MyTasksDesc=This view is limited to projects or tasks you are a contact for +OnlyOpenedProject=Only open projects are visible (projects in draft or closed status are not visible). +ClosedProjectsAreHidden=Closed projects are not visible. +TasksPublicDesc=This view presents all projects and tasks you are allowed to read. +TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything). +AllTaskVisibleButEditIfYouAreAssigned=All tasks for qualified projects are visible, but you can enter time only for task assigned to selected user. Assign task if you need to enter time on it. +OnlyYourTaskAreVisible=Only tasks assigned to you are visible. Assign task to yourself if it is not visible and you need to enter time on it. +ImportDatasetTasks=Tasks of projects +ProjectCategories=Project tags/categories +NewProject=New project +AddProject=Create project +DeleteAProject=Delete a project +DeleteATask=Delete a task +ConfirmDeleteAProject=Are you sure you want to delete this project? +ConfirmDeleteATask=Are you sure you want to delete this task? +OpenedProjects=Open projects +OpenedTasks=Open tasks +OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status +OpportunitiesStatusForProjects=Leads amount of projects by status +ShowProject=Show project +ShowTask=Show task +SetProject=Set project +NoProject=No project defined or owned +NbOfProjects=Number of projects +NbOfTasks=Number of tasks +TimeSpent=Time spent +TimeSpentByYou=Time spent by you +TimeSpentByUser=Time spent by user +TimesSpent=Time spent +TaskId=Task ID +RefTask=Task ref. +LabelTask=Task label +TaskTimeSpent=Time spent on tasks +TaskTimeUser=User +TaskTimeNote=Note +TaskTimeDate=Date +TasksOnOpenedProject=Tasks on open projects +WorkloadNotDefined=Workload not defined +NewTimeSpent=Time spent +MyTimeSpent=My time spent +BillTime=Bill the time spent +BillTimeShort=Bill time +TimeToBill=Time not billed +TimeBilled=Time billed +Tasks=Tasks +Task=Task +TaskDateStart=Task start date +TaskDateEnd=Task end date +TaskDescription=Task description +NewTask=New task +AddTask=Create task +AddTimeSpent=Create time spent +AddHereTimeSpentForDay=Add here time spent for this day/task +AddHereTimeSpentForWeek=Add here time spent for this week/task +Activity=Activity +Activities=Tasks/activities +MyActivities=My tasks/activities +MyProjects=My projects +MyProjectsArea=My projects Area +DurationEffective=Effective duration +ProgressDeclared=Declared real progress +TaskProgressSummary=Task progress +CurentlyOpenedTasks=Curently open tasks +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 +TimeConsumed=Consumed +ListOfTasks=List of tasks +GoToListOfTimeConsumed=Go to list of time consumed +GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project +ListProposalsAssociatedProject=List of the commercial proposals related to the project +ListOrdersAssociatedProject=List of sales orders related to the project +ListInvoicesAssociatedProject=List of customer invoices related to the project +ListPredefinedInvoicesAssociatedProject=List of customer template invoices related to the project +ListSupplierOrdersAssociatedProject=List of purchase orders related to the project +ListSupplierInvoicesAssociatedProject=List of vendor invoices related to the project +ListContractAssociatedProject=List of contracts related to the project +ListShippingAssociatedProject=List of shippings related to the project +ListFichinterAssociatedProject=List of interventions related to the project +ListExpenseReportsAssociatedProject=List of expense reports related to the project +ListDonationsAssociatedProject=List of donations related to the project +ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project +ListSalariesAssociatedProject=List of payments of salaries related to the project +ListActionsAssociatedProject=List of events related to the project +ListMOAssociatedProject=List of manufacturing orders related to the project +ListTaskTimeUserProject=List of time consumed on tasks of project +ListTaskTimeForTask=List of time consumed on task +ActivityOnProjectToday=Activity on project today +ActivityOnProjectYesterday=Activity on project yesterday +ActivityOnProjectThisWeek=Activity on project this week +ActivityOnProjectThisMonth=Activity on project this month +ActivityOnProjectThisYear=Activity on project this year +ChildOfProjectTask=Child of project/task +ChildOfTask=Child of task +TaskHasChild=Task has child +NotOwnerOfProject=Not owner of this private project +AffectedTo=Allocated to +CantRemoveProject=This project can't be removed as it is referenced by some other objects (invoice, orders or other). See tab '%s'. +ValidateProject=Validate projet +ConfirmValidateProject=Are you sure you want to validate this project? +CloseAProject=Close project +ConfirmCloseAProject=Are you sure you want to close this project? +AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it) +ReOpenAProject=Open project +ConfirmReOpenAProject=Are you sure you want to re-open this project? +ProjectContact=Contacts of project +TaskContact=Task contacts +ActionsOnProject=Events on project +YouAreNotContactOfProject=You are not a contact of this private project +UserIsNotContactOfProject=User is not a contact of this private project +DeleteATimeSpent=Delete time spent +ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent? +DoNotShowMyTasksOnly=See also tasks not assigned to me +ShowMyTasksOnly=View only tasks assigned to me +TaskRessourceLinks=Contacts of task +ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party +NoTasks=No tasks for this project +LinkedToAnotherCompany=Linked to other third party +TaskIsNotAssignedToUser=Task not assigned to user. Use button '<strong>%s</strong>' to assign task now. +ErrorTimeSpentIsEmpty=Time spent is empty +ThisWillAlsoRemoveTasks=This action will also delete all tasks of project (<b>%s</b> tasks at the moment) and all inputs of time spent. +IfNeedToUseOtherObjectKeepEmpty=If some objects (invoice, order, ...), belonging to another third party, must be linked to the project to create, keep this empty to have the project being multi third parties. +CloneTasks=Clone tasks +CloneContacts=Clone contacts +CloneNotes=Clone notes +CloneProjectFiles=Clone project joined files +CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) +CloneMoveDate=Update project/tasks dates from now? +ConfirmCloneProject=Are you sure to clone this project? +ProjectReportDate=Change task dates according to new project start date +ErrorShiftTaskDate=Impossible to shift task date according to new project start date +ProjectsAndTasksLines=Projects and tasks +ProjectCreatedInDolibarr=Project %s created +ProjectValidatedInDolibarr=Project %s validated +ProjectModifiedInDolibarr=Project %s modified +TaskCreatedInDolibarr=Task %s created +TaskModifiedInDolibarr=Task %s modified +TaskDeletedInDolibarr=Task %s deleted +OpportunityStatus=Lead status +OpportunityStatusShort=Lead status +OpportunityProbability=Lead probability +OpportunityProbabilityShort=Lead probab. +OpportunityAmount=Lead amount +OpportunityAmountShort=Lead amount +OpportunityWeightedAmount=Opportunity weighted amount +OpportunityWeightedAmountShort=Opp. weighted amount +OpportunityAmountAverageShort=Average lead amount +OpportunityAmountWeigthedShort=Weighted lead amount +WonLostExcluded=Won/Lost excluded +##### Types de contacts ##### +TypeContact_project_internal_PROJECTLEADER=Project leader +TypeContact_project_external_PROJECTLEADER=Project leader +TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor +TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor +TypeContact_project_task_internal_TASKEXECUTIVE=Task executive +TypeContact_project_task_external_TASKEXECUTIVE=Task executive +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 +DocumentModelTimeSpent=Project report template for time spent +PlannedWorkload=Planned workload +PlannedWorkloadShort=Workload +ProjectReferers=Related items +ProjectMustBeValidatedFirst=Project must be validated first +FirstAddRessourceToAllocateTime=Assign a user resource as contact of project to allocate time +InputPerDay=Input per day +InputPerWeek=Input per week +InputPerMonth=Input per month +InputDetail=Input detail +TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s +ProjectsWithThisUserAsContact=Projects with this user as contact +TasksWithThisUserAsContact=Tasks assigned to this user +ResourceNotAssignedToProject=Not assigned to project +ResourceNotAssignedToTheTask=Not assigned to the task +NoUserAssignedToTheProject=No users assigned to this project +TimeSpentBy=Time spent by +TasksAssignedTo=Tasks assigned to +AssignTaskToMe=Assign task to me +AssignTaskToUser=Assign task to %s +SelectTaskToAssign=Select task to assign... +AssignTask=Assign +ProjectOverview=Overview +ManageTasks=Use projects to follow tasks and/or report time spent (timesheets) +ManageOpportunitiesStatus=Use projects to follow leads/opportinuties +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 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 +OpenedProjectsByThirdparties=Open projects by third parties +OnlyOpportunitiesShort=Only leads +OpenedOpportunitiesShort=Open leads +NotOpenedOpportunitiesShort=Not an open lead +NotAnOpportunityShort=Not a lead +OpportunityTotalAmount=Total amount of leads +OpportunityPonderatedAmount=Weighted amount of leads +OpportunityPonderatedAmountDesc=Leads amount weighted with probability +OppStatusPROSP=Prospection +OppStatusQUAL=Qualification +OppStatusPROPO=Proposal +OppStatusNEGO=Negociation +OppStatusPENDING=Pending +OppStatusWON=Won +OppStatusLOST=Lost +Budget=Budget +AllowToLinkFromOtherCompany=Allow to link project from other company<br><br><u>Supported values:</u><br>- Keep empty: Can link any project of the company (default)<br>- "all": Can link any projects, even projects of other companies<br>- A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)<br> +LatestProjects=Latest %s projects +LatestModifiedProjects=Latest %s modified projects +OtherFilteredTasks=Other filtered tasks +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 +# Comments trans +AllowCommentOnTask=Allow user comments on tasks +AllowCommentOnProject=Allow user comments on projects +DontHavePermissionForCloseProject=You do not have permissions to close the project %s +DontHaveTheValidateStatus=The project %s must be open to be closed +RecordsClosed=%s project(s) closed +SendProjectRef=Information project %s +ModuleSalaryToDefineHourlyRateMustBeEnabled=Module 'Salaries' must be enabled to define employee hourly rate to have time spent valorized +NewTaskRefSuggested=Task ref already used, a new task ref is required +TimeSpentInvoiced=Time spent billed +TimeSpentForInvoice=Time spent +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. +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 +NewInvoice=New invoice +OneLinePerTask=One line per task +OneLinePerPeriod=One line per period +RefTaskParent=Ref. Parent Task +ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ar_IQ/propal.lang b/htdocs/langs/ar_IQ/propal.lang new file mode 100644 index 00000000000..edbc08236d3 --- /dev/null +++ b/htdocs/langs/ar_IQ/propal.lang @@ -0,0 +1,92 @@ +# Dolibarr language file - Source file is en_US - propal +Proposals=Commercial proposals +Proposal=Commercial proposal +ProposalShort=Proposal +ProposalsDraft=Draft commercial proposals +ProposalsOpened=Open commercial proposals +CommercialProposal=Commercial proposal +PdfCommercialProposalTitle=Commercial proposal +ProposalCard=Proposal card +NewProp=New commercial proposal +NewPropal=New proposal +Prospect=Prospect +DeleteProp=Delete commercial proposal +ValidateProp=Validate commercial proposal +AddProp=Create proposal +ConfirmDeleteProp=Are you sure you want to delete this commercial proposal? +ConfirmValidateProp=Are you sure you want to validate this commercial proposal under name <b>%s</b>? +LastPropals=Latest %s proposals +LastModifiedProposals=Latest %s modified proposals +AllPropals=All proposals +SearchAProposal=Search a proposal +NoProposal=No proposal +ProposalsStatistics=Commercial proposal's statistics +NumberOfProposalsByMonth=Number by month +AmountOfProposalsByMonthHT=Amount by month (excl. tax) +NbOfProposals=Number of commercial proposals +ShowPropal=Show proposal +PropalsDraft=Drafts +PropalsOpened=Open +PropalStatusDraft=Draft (needs to be validated) +PropalStatusValidated=Validated (proposal is open) +PropalStatusSigned=Signed (needs billing) +PropalStatusNotSigned=Not signed (closed) +PropalStatusBilled=Billed +PropalStatusDraftShort=Draft +PropalStatusValidatedShort=Validated (open) +PropalStatusClosedShort=Closed +PropalStatusSignedShort=Signed +PropalStatusNotSignedShort=Not signed +PropalStatusBilledShort=Billed +PropalsToClose=Commercial proposals to close +PropalsToBill=Signed commercial proposals to bill +ListOfProposals=List of commercial proposals +ActionsOnPropal=Events on proposal +RefProposal=Commercial proposal ref +SendPropalByMail=Send commercial proposal by mail +DatePropal=Date of proposal +DateEndPropal=Validity ending date +ValidityDuration=Validity duration +SetAcceptedRefused=Set accepted/refused +ErrorPropalNotFound=Propal %s not found +AddToDraftProposals=Add to draft proposal +NoDraftProposals=No draft proposals +CopyPropalFrom=Create commercial proposal by copying existing proposal +CreateEmptyPropal=Create empty commercial proposal or from list of products/services +DefaultProposalDurationValidity=Default commercial proposal validity duration (in days) +UseCustomerContactAsPropalRecipientIfExist=Use contact/address with type 'Contact following-up proposal' if defined instead of third party address as proposal recipient address +ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s</b>? +ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? +ProposalsAndProposalsLines=Commercial proposal and lines +ProposalLine=Proposal line +ProposalLines=Proposal lines +AvailabilityPeriod=Availability delay +SetAvailability=Set availability delay +AfterOrder=after order +OtherProposals=Other proposals +##### Availability ##### +AvailabilityTypeAV_NOW=Immediate +AvailabilityTypeAV_1W=1 week +AvailabilityTypeAV_2W=2 weeks +AvailabilityTypeAV_3W=3 weeks +AvailabilityTypeAV_1M=1 month +##### Types de contacts ##### +TypeContact_propal_internal_SALESREPFOLL=Representative following-up proposal +TypeContact_propal_external_BILLING=Customer invoice contact +TypeContact_propal_external_CUSTOMER=Customer contact following-up proposal +TypeContact_propal_external_SHIPPING=Customer contact for delivery +# Document models +DocModelAzurDescription=A complete proposal model (old implementation of Cyan template) +DocModelCyanDescription=A complete proposal model +DefaultModelPropalCreate=Default model creation +DefaultModelPropalToBill=Default template when closing a business proposal (to be invoiced) +DefaultModelPropalClosed=Default template when closing a business proposal (unbilled) +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/ar_IQ/receiptprinter.lang b/htdocs/langs/ar_IQ/receiptprinter.lang new file mode 100644 index 00000000000..746d175e0c6 --- /dev/null +++ b/htdocs/langs/ar_IQ/receiptprinter.lang @@ -0,0 +1,82 @@ +# Dolibarr language file - Source file is en_US - receiptprinter +ReceiptPrinterSetup=Setup of module ReceiptPrinter +PrinterAdded=Printer %s added +PrinterUpdated=Printer %s updated +PrinterDeleted=Printer %s deleted +TestSentToPrinter=Test Sent To Printer %s +ReceiptPrinter=Receipt printers +ReceiptPrinterDesc=Setup of receipt printers +ReceiptPrinterTemplateDesc=Setup of Templates +ReceiptPrinterTypeDesc=Description of Receipt Printer's type +ReceiptPrinterProfileDesc=Description of Receipt Printer's Profile +ListPrinters=List of Printers +SetupReceiptTemplate=Template Setup +CONNECTOR_DUMMY=Dummy Printer +CONNECTOR_NETWORK_PRINT=Network Printer +CONNECTOR_FILE_PRINT=Local Printer +CONNECTOR_WINDOWS_PRINT=Local Windows Printer +CONNECTOR_CUPS_PRINT=Cups Printer +CONNECTOR_DUMMY_HELP=Fake Printer for test, does nothing +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 +PROFILE_DEFAULT=Default Profile +PROFILE_SIMPLE=Simple Profile +PROFILE_EPOSTEP=Epos Tep Profile +PROFILE_P822D=P822D Profile +PROFILE_STAR=Star Profile +PROFILE_DEFAULT_HELP=Default Profile suitable for Epson printers +PROFILE_SIMPLE_HELP=Simple Profile No Graphics +PROFILE_EPOSTEP_HELP=Epos Tep Profile +PROFILE_P822D_HELP=P822D Profile No Graphics +PROFILE_STAR_HELP=Star Profile +DOL_LINE_FEED=Skip line +DOL_ALIGN_LEFT=Left align text +DOL_ALIGN_CENTER=Center text +DOL_ALIGN_RIGHT=Right align text +DOL_USE_FONT_A=Use font A of printer +DOL_USE_FONT_B=Use font B of printer +DOL_USE_FONT_C=Use font C of printer +DOL_PRINT_BARCODE=Print barcode +DOL_PRINT_BARCODE_CUSTOMER_ID=Print barcode customer id +DOL_CUT_PAPER_FULL=Cut ticket completely +DOL_CUT_PAPER_PARTIAL=Cut ticket partially +DOL_OPEN_DRAWER=Open cash drawer +DOL_ACTIVATE_BUZZER=Activate buzzer +DOL_PRINT_QRCODE=Print QR Code +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=Beep 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 +InvoiceRef=Invoice ref +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 diff --git a/htdocs/langs/ar_IQ/receptions.lang b/htdocs/langs/ar_IQ/receptions.lang new file mode 100644 index 00000000000..760ff884fa0 --- /dev/null +++ b/htdocs/langs/ar_IQ/receptions.lang @@ -0,0 +1,47 @@ +# Dolibarr language file - Source file is en_US - receptions +ReceptionsSetup=Product Reception setup +RefReception=Ref. reception +Reception=Reception +Receptions=Receptions +AllReceptions=All Receptions +Reception=Reception +Receptions=Receptions +ShowReception=Show Receptions +ReceptionsArea=Receptions area +ListOfReceptions=List of receptions +ReceptionMethod=Reception method +LastReceptions=Latest %s receptions +StatisticsOfReceptions=Statistics for receptions +NbOfReceptions=Number of receptions +NumberOfReceptionsByMonth=Number of receptions by month +ReceptionCard=Reception card +NewReception=New reception +CreateReception=Create reception +QtyInOtherReceptions=Qty in other receptions +OtherReceptionsForSameOrder=Other receptions for this order +ReceptionsAndReceivingForSameOrder=Receptions and receipts for this order +ReceptionsToValidate=Receptions to validate +StatusReceptionCanceled=Canceled +StatusReceptionDraft=Draft +StatusReceptionValidated=Validated (products to ship or already shipped) +StatusReceptionProcessed=Processed +StatusReceptionDraftShort=Draft +StatusReceptionValidatedShort=Validated +StatusReceptionProcessedShort=Processed +ReceptionSheet=Reception sheet +ConfirmDeleteReception=Are you sure you want to delete this reception? +ConfirmValidateReception=Are you sure you want to validate this reception with reference <b>%s</b>? +ConfirmCancelReception=Are you sure you want to cancel this reception? +StatsOnReceptionsOnlyValidated=Statistics conducted on receptions only validated. Date used is date of validation of reception (planed delivery date is not always known). +SendReceptionByEMail=Send reception by email +SendReceptionRef=Submission of reception %s +ActionsOnReception=Events on reception +ReceptionCreationIsDoneFromOrder=For the moment, creation of a new reception is done from the order card. +ReceptionLine=Reception line +ProductQtyInReceptionAlreadySent=Product quantity from open sales order already sent +ProductQtyInSuppliersReceptionAlreadyRecevied=Product quantity from open supplier order already received +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 + diff --git a/htdocs/langs/ar_IQ/recruitment.lang b/htdocs/langs/ar_IQ/recruitment.lang new file mode 100644 index 00000000000..437445f25dc --- /dev/null +++ b/htdocs/langs/ar_IQ/recruitment.lang @@ -0,0 +1,76 @@ +# 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/>. + +# +# 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 position +PositionsToBeFilled=Job positions +ListOfPositionsToBeFilled=List of job positions +NewPositionToBeFilled=New job positions + +JobOfferToBeFilled=Job position 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 application +ListOfCandidatures=List of applications +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +ContractRefused=Contract refused +RecruitmentCandidature=Application +JobPositions=Job positions +RecruitmentCandidatures=Applications +InterviewToDo=Interview to do +AnswerCandidature=Application answer +YourCandidature=Your application +YourCandidatureAnswerMessage=Thanks you for your application.<br>... +JobClosedTextCandidateFound=The job position is closed. The position has been filled. +JobClosedTextCanceled=The job position is closed. +ExtrafieldsJobPosition=Complementary attributes (job positions) +ExtrafieldsCandidatures=Complementary attributes (job applications) +MakeOffer=Make an offer diff --git a/htdocs/langs/ar_IQ/resource.lang b/htdocs/langs/ar_IQ/resource.lang new file mode 100644 index 00000000000..e8574dc680f --- /dev/null +++ b/htdocs/langs/ar_IQ/resource.lang @@ -0,0 +1,39 @@ +# Dolibarr language file - Source file is en_US - resource +MenuResourceIndex=Resources +MenuResourceAdd=New resource +DeleteResource=Delete resource +ConfirmDeleteResourceElement=Confirm delete the resource for this element +NoResourceInDatabase=No resource in database. +NoResourceLinked=No resource linked +ActionsOnResource=Events about this resource +ResourcePageIndex=Resources list +ResourceSingular=Resource +ResourceCard=Resource card +AddResource=Create a resource +ResourceFormLabel_ref=Resource name +ResourceType=Resource type +ResourceFormLabel_description=Resource description + +ResourcesLinkedToElement=Resources linked to element + +ShowResource=Show resource + +ResourceElementPage=Element resources +ResourceCreatedWithSuccess=Resource successfully created +RessourceLineSuccessfullyDeleted=Resource line successfully deleted +RessourceLineSuccessfullyUpdated=Resource line successfully updated +ResourceLinkedWithSuccess=Resource linked with success + +ConfirmDeleteResource=Confirm to delete this resource +RessourceSuccessfullyDeleted=Resource successfully deleted +DictionaryResourceType=Type of resources + +SelectResource=Select resource + +IdResource=Id resource +AssetNumber=Serial number +ResourceTypeCode=Resource type code +ImportDataset_resource_1=Resources + +ErrorResourcesAlreadyInUse=Some resources are in use +ErrorResourceUseInEvent=%s used in %s event diff --git a/htdocs/langs/ar_IQ/salaries.lang b/htdocs/langs/ar_IQ/salaries.lang new file mode 100644 index 00000000000..6b4fdc94163 --- /dev/null +++ b/htdocs/langs/ar_IQ/salaries.lang @@ -0,0 +1,24 @@ +# 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 +CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary +Salary=Salary +Salaries=Salaries +NewSalary=New salary +NewSalaryPayment=New salary card +AddSalaryPayment=Add salary payment +SalaryPayment=Salary payment +SalariesPayments=Salaries payments +SalariesPaymentsOf=Salaries payments of %s +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 +# Export +SalariesAndPayments=Salaries and payments diff --git a/htdocs/langs/ar_IQ/sendings.lang b/htdocs/langs/ar_IQ/sendings.lang new file mode 100644 index 00000000000..73bd9aebd42 --- /dev/null +++ b/htdocs/langs/ar_IQ/sendings.lang @@ -0,0 +1,76 @@ +# Dolibarr language file - Source file is en_US - sendings +RefSending=Ref. shipment +Sending=Shipment +Sendings=Shipments +AllSendings=All Shipments +Shipment=Shipment +Shipments=Shipments +ShowSending=Show Shipments +Receivings=Delivery Receipts +SendingsArea=Shipments area +ListOfSendings=List of shipments +SendingMethod=Shipping method +LastSendings=Latest %s shipments +StatisticsOfSendings=Statistics for shipments +NbOfSendings=Number of shipments +NumberOfShipmentsByMonth=Number of shipments by month +SendingCard=Shipment card +NewSending=New shipment +CreateShipment=Create shipment +QtyShipped=Qty shipped +QtyShippedShort=Qty ship. +QtyPreparedOrShipped=Qty prepared or shipped +QtyToShip=Qty to ship +QtyToReceive=Qty to receive +QtyReceived=Qty received +QtyInOtherShipments=Qty in other shipments +KeepToShip=Remain to ship +KeepToShipShort=Remain +OtherSendingsForSameOrder=Other shipments for this order +SendingsAndReceivingForSameOrder=Shipments and receipts for this order +SendingsToValidate=Shipments to validate +StatusSendingCanceled=Canceled +StatusSendingCanceledShort=Canceled +StatusSendingDraft=Draft +StatusSendingValidated=Validated (products to ship or already shipped) +StatusSendingProcessed=Processed +StatusSendingDraftShort=Draft +StatusSendingValidatedShort=Validated +StatusSendingProcessedShort=Processed +SendingSheet=Shipment sheet +ConfirmDeleteSending=Are you sure you want to delete this shipment? +ConfirmValidateSending=Are you sure you want to validate this shipment with reference <b>%s</b>? +ConfirmCancelSending=Are you sure you want to cancel this shipment? +DocumentModelMerou=Merou A5 model +WarningNoQtyLeftToSend=Warning, no products waiting to be shipped. +StatsOnShipmentsOnlyValidated=Statistics conducted on shipments only validated. Date used is date of validation of shipment (planed delivery date is not always known). +DateDeliveryPlanned=Planned date of delivery +RefDeliveryReceipt=Ref delivery receipt +StatusReceipt=Status delivery receipt +DateReceived=Date delivery received +ClassifyReception=Classify reception +SendShippingByEMail=Send shipment by email +SendShippingRef=Submission of shipment %s +ActionsOnShipping=Events on shipment +LinkToTrackYourPackage=Link to track your package +ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. +ShipmentLine=Shipment line +ProductQtyInCustomersOrdersRunning=Product quantity from open sales orders +ProductQtyInSuppliersOrdersRunning=Product quantity from open purchase orders +ProductQtyInShipmentAlreadySent=Product quantity from open sales order already sent +ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open purchase orders already received +NoProductToShipFoundIntoStock=No product to ship found in warehouse <b>%s</b>. Correct stock or go back to choose another warehouse. +WeightVolShort=Weight/Vol. +ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments. + +# 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 + +# warehouse details +DetailWarehouseNumber= Warehouse details +DetailWarehouseFormat= W:%s (Qty: %d) diff --git a/htdocs/langs/ar_IQ/sms.lang b/htdocs/langs/ar_IQ/sms.lang new file mode 100644 index 00000000000..055085eb16a --- /dev/null +++ b/htdocs/langs/ar_IQ/sms.lang @@ -0,0 +1,51 @@ +# Dolibarr language file - Source file is en_US - sms +Sms=Sms +SmsSetup=SMS setup +SmsDesc=This page allows you to define global options on SMS features +SmsCard=SMS Card +AllSms=All SMS campaigns +SmsTargets=Targets +SmsRecipients=Targets +SmsRecipient=Target +SmsTitle=Description +SmsFrom=Sender +SmsTo=Target +SmsTopic=Topic of SMS +SmsText=Message +SmsMessage=SMS Message +ShowSms=Show SMS +ListOfSms=List SMS campaigns +NewSms=New SMS campaign +EditSms=Edit SMS +ResetSms=New sending +DeleteSms=Delete SMS campaign +DeleteASms=Remove a SMS campaign +PreviewSms=Previuw SMS +PrepareSms=Prepare SMS +CreateSms=Create SMS +SmsResult=Result of SMS sending +TestSms=Test SMS +ValidSms=Validate SMS +ApproveSms=Approve SMS +SmsStatusDraft=Draft +SmsStatusValidated=Validated +SmsStatusApproved=Approved +SmsStatusSent=Sent +SmsStatusSentPartialy=Sent partially +SmsStatusSentCompletely=Sent completely +SmsStatusError=Error +SmsStatusNotSent=Not sent +SmsSuccessfulySent=SMS correctly sent (from %s to %s) +ErrorSmsRecipientIsEmpty=Number of target is empty +WarningNoSmsAdded=No new phone number to add to target list +ConfirmValidSms=Do you confirm validation of this campaign? +NbOfUniqueSms=No. of unique phone numbers +NbOfSms=No. of phone numbers +ThisIsATestMessage=This is a test message +SendSms=Send SMS +SmsInfoCharRemain=No. of remaining characters +SmsInfoNumero= (international format i.e.: +33899701761) +DelayBeforeSending=Delay before sending (minutes) +SmsNoPossibleSenderFound=No sender available. Check setup of your SMS provider. +SmsNoPossibleRecipientFound=No target available. Check setup of your SMS provider. +DisableStopIfSupported=Disable STOP message (if supported) diff --git a/htdocs/langs/ar_IQ/stocks.lang b/htdocs/langs/ar_IQ/stocks.lang new file mode 100644 index 00000000000..9a14fb38eb1 --- /dev/null +++ b/htdocs/langs/ar_IQ/stocks.lang @@ -0,0 +1,257 @@ +# Dolibarr language file - Source file is en_US - stocks +WarehouseCard=Warehouse card +Warehouse=Warehouse +Warehouses=Warehouses +ParentWarehouse=Parent warehouse +NewWarehouse=New warehouse / Stock Location +WarehouseEdit=Modify warehouse +MenuNewWarehouse=New warehouse +WarehouseSource=Source warehouse +WarehouseSourceNotDefined=No warehouse defined, +AddWarehouse=Create warehouse +AddOne=Add one +DefaultWarehouse=Default warehouse +WarehouseTarget=Target warehouse +ValidateSending=Delete sending +CancelSending=Cancel sending +DeleteSending=Delete sending +Stock=Stock +Stocks=Stocks +MissingStocks=Missing stocks +StockAtDate=Stocks at date +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future +StocksByLotSerial=Stocks by lot/serial +LotSerial=Lots/Serials +LotSerialList=List of lot/serials +Movements=Movements +ErrorWarehouseRefRequired=Warehouse reference name is required +ListOfWarehouses=List of warehouses +ListOfStockMovements=List of stock movements +ListOfInventories=List of inventories +MovementId=Movement ID +StockMovementForId=Movement ID %d +ListMouvementStockProject=List of stock movements associated to project +StocksArea=Warehouses area +AllWarehouses=All warehouses +IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +IncludeAlsoDraftOrders=Include also draft orders +Location=Location +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products +NumberOfProducts=Total number of products +LastMovement=Latest movement +LastMovements=Latest movements +Units=Units +Unit=Unit +StockCorrection=Stock correction +CorrectStock=Correct stock +StockTransfer=Stock transfer +TransferStock=Transfer stock +MassStockTransferShort=Mass stock transfer +StockMovement=Stock movement +StockMovements=Stock movements +NumberOfUnit=Number of units +UnitPurchaseValue=Unit purchase price +StockTooLow=Stock too low +StockLowerThanLimit=Stock lower than alert limit (%s) +EnhancedValue=Value +PMPValue=Weighted average price +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 +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals +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 +QtyToDispatchShort=Qty to dispatch +OrderDispatch=Item receipts +RuleForStockManagementDecrease=Choose Rule for automatic stock decrease (manual decrease is always possible, even if an automatic decrease rule is activated) +RuleForStockManagementIncrease=Choose Rule for automatic stock increase (manual increase is always possible, even if an automatic increase rule is activated) +DeStockOnBill=Decrease real stocks on validation of customer invoice/credit note +DeStockOnValidateOrder=Decrease real stocks on validation of sales order +DeStockOnShipment=Decrease real stocks on shipping validation +DeStockOnShipmentOnClosing=Decrease real stocks when shipping is set to closed +ReStockOnBill=Increase real stocks on validation of vendor invoice/credit note +ReStockOnValidateOrder=Increase real stocks on purchase order approval +ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouse, after purchase order receipt of goods +StockOnReception=Increase real stocks on validation of reception +StockOnReceptionOnClosing=Increase real stocks when reception is set to closed +OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses. +StockDiffPhysicTeoric=Explanation for difference between physical and virtual stock +NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required. +DispatchVerb=Dispatch +StockLimitShort=Limit for alert +StockLimit=Stock limit for alert +StockLimitDesc=(empty) means no warning.<br>0 can be used for a warning as soon as stock is empty. +PhysicalStock=Physical Stock +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 +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date +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 price +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. +SellPriceMin=Selling Unit Price +EstimatedStockValueSellShort=Value for sell +EstimatedStockValueSell=Value for sell +EstimatedStockValueShort=Input stock value +EstimatedStockValue=Input stock value +DeleteAWarehouse=Delete a warehouse +ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse <b>%s</b>? +PersonalStock=Personal stock %s +ThisWarehouseIsPersonalStock=This warehouse represents personal stock of %s %s +SelectWarehouseForStockDecrease=Choose warehouse to use for stock decrease +SelectWarehouseForStockIncrease=Choose warehouse to use for stock increase +NoStockAction=No stock action +DesiredStock=Desired Stock +DesiredStockDesc=This stock amount will be the value used to fill the stock by replenishment feature. +StockToBuy=To order +Replenishment=Replenishment +ReplenishmentOrders=Replenishment orders +VirtualDiffersFromPhysical=According to increase/decrease stock options, physical stock and virtual stock (physical stock + open orders) may differ +UseRealStockByDefault=Use real stock, instead of virtual stock, for replenishment feature +ReplenishmentCalculation=Amount to order will be (desired quantity - real stock) instead of (desired quantity - virtual stock) +UseVirtualStock=Use virtual stock +UsePhysicalStock=Use physical stock +CurentSelectionMode=Current selection mode +CurentlyUsingVirtualStock=Virtual stock +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 <b>%s</b> will be used for stock decrease +WarehouseForStockIncrease=The warehouse <b>%s</b> will be used for stock increase +ForThisWarehouse=For this warehouse +ReplenishmentStatusDesc=This is a list of all products with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked). Using the checkbox, you can create purchase orders to fill the difference. +ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +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=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 source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click on "%s". +RecordMovement=Record transfer +ReceivingForSameOrder=Receipts for this order +StockMovementRecorded=Stock movements recorded +RuleForStockAvailability=Rules on stock requirements +StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to invoice (check is done on current real stock when adding a line into invoice whatever the rule for automatic stock change) +StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) +StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) +MovementLabel=Label of movement +TypeMovement=Direction of movement +DateMovement=Date of movement +InventoryCode=Movement or inventory code +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 +MovementCorrectStock=Stock correction for product %s +MovementTransferStock=Stock transfer of product %s into another warehouse +InventoryCodeShort=Inv./Mov. code +NoPendingReceptionOnSupplierOrder=No pending reception due to open purchase order +ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</strong>) already exists but with different eatby or sellby date (found <strong>%s</strong> but you enter <strong>%s</strong>). +OpenAll=Open for all actions +OpenInternal=Open only for internal actions +UseDispatchStatus=Use a dispatch status (approve/refuse) for product lines on purchase order reception +OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so value for sell can't be calculated +ProductStockWarehouseCreated=Stock limit for alert and desired optimal stock correctly created +ProductStockWarehouseUpdated=Stock limit for alert and desired optimal stock correctly updated +ProductStockWarehouseDeleted=Stock limit for alert and desired optimal stock correctly deleted +AddNewProductStockWarehouse=Set new limit for alert and desired optimal stock +AddStockLocationLine=Decrease quantity then click to add another warehouse for this product +InventoryDate=Inventory date +NewInventory=New inventory +inventorySetup = Inventory Setup +inventoryCreatePermission=Create new inventory +inventoryReadPermission=View inventories +inventoryWritePermission=Update inventories +inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory +inventoryTitle=Inventory +inventoryListTitle=Inventories +inventoryListEmpty=No inventory in progress +inventoryCreateDelete=Create/Delete inventory +inventoryCreate=Create new +inventoryEdit=Edit +inventoryValidate=Validated +inventoryDraft=Running +inventorySelectWarehouse=Warehouse choice +inventoryConfirmCreate=Create +inventoryOfWarehouse=Inventory for warehouse: %s +inventoryErrorQtyAdd=Error: one quantity is less than zero +inventoryMvtStock=By inventory +inventoryWarningProductAlreadyExists=This product is already into list +SelectCategory=Category filter +SelectFournisseur=Vendor filter +inventoryOnDate=Inventory +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 +OnlyProdsInStock=Do not add product without stock +TheoricalQty=Theorique qty +TheoricalValue=Theorique qty +LastPA=Last BP +CurrentPA=Curent BP +RecordedQty=Recorded Qty +RealQty=Real Qty +RealValue=Real Value +RegulatedQty=Regulated Qty +AddInventoryProduct=Add product to inventory +AddProduct=Add +ApplyPMP=Apply PMP +FlushInventory=Flush inventory +ConfirmFlushInventory=Do you confirm this action? +InventoryFlushed=Inventory flushed +ExitEditMode=Exit edition +inventoryDeleteLine=Delete line +RegulateStock=Regulate Stock +ListInventory=List +StockSupportServices=Stock management supports Services +StockSupportServicesDesc=By default, you can stock only products of type "product". You may also stock a product of type "service" if both module Services and this option are enabled. +ReceiveProducts=Receive items +StockIncreaseAfterCorrectTransfer=Increase by correction/transfer +StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer +StockIncrease=Stock increase +StockDecrease=Stock decrease +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 the future +CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged +UpdateByScaning=Fill real qty by scaning +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|serial barcode) +DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ar_IQ/stripe.lang b/htdocs/langs/ar_IQ/stripe.lang new file mode 100644 index 00000000000..a536ffd81e7 --- /dev/null +++ b/htdocs/langs/ar_IQ/stripe.lang @@ -0,0 +1,71 @@ +# Dolibarr language file - Source file is en_US - stripe +StripeSetup=Stripe module setup +StripeDesc=Offer customers a Stripe online payment page for payments with credit/cebit cards via <a href="http://www.stripe.com" target="_blank">Stripe</a>. This can be used to allow your customers to make ad-hoc payments or for payments related to a particular Dolibarr object (invoice, order, ...) +StripeOrCBDoPayment=Pay with credit card or Stripe +FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects +PaymentForm=Payment form +WelcomeOnPaymentPage=Welcome to our online payment service +ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s. +ThisIsInformationOnPayment=This is information on payment to do +ToComplete=To complete +YourEMail=Email to receive payment confirmation +STRIPE_PAYONLINE_SENDEMAIL=Email notification after a payment attempt (success or fail) +Creditor=Creditor +PaymentCode=Payment code +StripeDoPayment=Pay with Stripe +YouWillBeRedirectedOnStripe=You will be redirected on secured Stripe page to input you credit card information +Continue=Next +ToOfferALinkForOnlinePayment=URL for %s payment +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 <b>&tag=<i>value</i></b> to any of those URL (mandatory only for payment not linked to an object) to add your own payment comment tag.<br>For the URL of payments with no existing object, you may also add the parameter <strong>&noidempotency=1</strong> 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) +SetupStripeToHavePaymentCreatedAutomatically=Setup your Stripe with url <b>%s</b> to have payment created automatically when validated by Stripe. +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 +CSSUrlForPaymentForm=CSS style sheet url for payment form +NewStripePaymentReceived=New Stripe payment received +NewStripePaymentFailed=New Stripe payment tried but failed +FailedToChargeCard=Failed to charge card +STRIPE_TEST_SECRET_KEY=Secret test key +STRIPE_TEST_PUBLISHABLE_KEY=Publishable test key +STRIPE_TEST_WEBHOOK_KEY=Webhook test key +STRIPE_LIVE_SECRET_KEY=Secret live key +STRIPE_LIVE_PUBLISHABLE_KEY=Publishable live key +STRIPE_LIVE_WEBHOOK_KEY=Webhook live key +ONLINE_PAYMENT_WAREHOUSE=Stock to use for stock decrease when online payment is done<br>(TODO When option to decrease stock is done on an action on invoice and the online payment generate itself the invoice ?) +StripeLiveEnabled=Stripe live enabled (otherwise test/sandbox mode) +StripeImportPayment=Import Stripe payments +ExampleOfTestCreditCard=Example of credit card for test: %s => valid, %s => error CVC, %s => expired, %s => charge fails +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 +StripeAccount=Stripe account +StripeChargeList=List of Stripe charges +StripeTransactionList=List of Stripe transactions +StripeCustomerId=Stripe customer id +StripePaymentModes=Stripe payment modes +LocalID=Local ID +StripeID=Stripe ID +NameOnCard=Name on card +CardNumber=Card Number +ExpiryDate=Expiry Date +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 +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=<a href="%s">Click here to try again...</a> +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 diff --git a/htdocs/langs/ar_IQ/supplier_proposal.lang b/htdocs/langs/ar_IQ/supplier_proposal.lang new file mode 100644 index 00000000000..a68319fb2df --- /dev/null +++ b/htdocs/langs/ar_IQ/supplier_proposal.lang @@ -0,0 +1,58 @@ +# Dolibarr language file - Source file is en_US - supplier_proposal +SupplierProposal=Vendor commercial proposals +supplier_proposalDESC=Manage price requests to suppliers +SupplierProposalNew=New price request +CommRequest=Price request +CommRequests=Price requests +SearchRequest=Find a request +DraftRequests=Draft requests +SupplierProposalsDraft=Draft vendor proposals +LastModifiedRequests=Latest %s modified price requests +RequestsOpened=Open price requests +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 +SupplierProposalRefFourn=Vendor ref +SupplierProposalDate=Delivery date +SupplierProposalRefFournNotice=Before closing to "Accepted", think to grasp suppliers references. +ConfirmValidateAsk=Are you sure you want to validate this price request under name <b>%s</b>? +DeleteAsk=Delete request +ValidateAsk=Validate request +SupplierProposalStatusDraft=Draft (needs to be validated) +SupplierProposalStatusValidated=Validated (request is open) +SupplierProposalStatusClosed=Closed +SupplierProposalStatusSigned=Accepted +SupplierProposalStatusNotSigned=Refused +SupplierProposalStatusDraftShort=Draft +SupplierProposalStatusValidatedShort=Validated +SupplierProposalStatusClosedShort=Closed +SupplierProposalStatusSignedShort=Accepted +SupplierProposalStatusNotSignedShort=Refused +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 <b>%s</b>? +ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>? +SendAskByMail=Send price request by mail +SendAskRef=Sending the price request %s +SupplierProposalCard=Request card +ConfirmDeleteAsk=Are you sure you want to delete this price request <b>%s</b>? +ActionsOnSupplierProposal=Events on price request +DocModelAuroreDescription=A complete request model (logo...) +CommercialAsk=Price request +DefaultModelSupplierProposalCreate=Default model creation +DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted) +DefaultModelSupplierProposalClosed=Default template when closing a price request (refused) +ListOfSupplierProposals=List of vendor proposal requests +ListSupplierProposalsAssociatedProject=List of vendor proposals associated with project +SupplierProposalsToClose=Vendor proposals to close +SupplierProposalsToProcess=Vendor proposals to process +LastSupplierProposals=Latest %s price requests +AllPriceRequests=All requests +TypeContact_supplier_proposal_external_SHIPPING=Vendor contact for delivery +TypeContact_supplier_proposal_external_BILLING=Vendor contact for billing +TypeContact_supplier_proposal_external_SERVICE=Representative following-up proposal diff --git a/htdocs/langs/ar_IQ/suppliers.lang b/htdocs/langs/ar_IQ/suppliers.lang new file mode 100644 index 00000000000..ca9ee174d29 --- /dev/null +++ b/htdocs/langs/ar_IQ/suppliers.lang @@ -0,0 +1,49 @@ +# Dolibarr language file - Source file is en_US - vendors +Suppliers=Vendors +SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices +ShowSupplierInvoice=Show Vendor Invoice +NewSupplier=New vendor +History=History +ListOfSuppliers=List of vendors +ShowSupplier=Show vendor +OrderDate=Order date +BuyingPriceMin=Best buying price +BuyingPriceMinShort=Best buying price +TotalBuyingPriceMinShort=Total of subproducts buying prices +TotalSellingPriceMinShort=Total of subproducts selling prices +SomeSubProductHaveNoPrices=Some sub-products have no price defined +AddSupplierPrice=Add buying price +ChangeSupplierPrice=Change buying price +SupplierPrices=Vendor prices +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 and invoice details +ExportDataset_fournisseur_2=Vendor invoices and payments +ExportDataset_fournisseur_3=Purchase orders and order details +ApproveThisOrder=Approve this order +ConfirmApproveThisOrder=Are you sure you want to approve order <b>%s</b>? +DenyingThisOrder=Deny this order +ConfirmDenyingThisOrder=Are you sure you want to deny this order <b>%s</b>? +ConfirmCancelThisOrder=Are you sure you want to cancel this order <b>%s</b>? +AddSupplierOrder=Create Purchase Order +AddSupplierInvoice=Create vendor invoice +ListOfSupplierProductForSupplier=List of products and prices for vendor <b>%s</b> +SentToSuppliers=Sent to vendors +ListOfSupplierOrders=List of purchase orders +MenuOrdersSupplierToBill=Purchase orders to invoice +NbDaysToDelivery=Delivery delay (days) +DescNbDaysToDelivery=The longest delivery delay of the products from this order +SupplierReputation=Vendor reputation +ReferenceReputation=Reference reputation +DoNotOrderThisProductToThisSupplier=Do not order +NotTheGoodQualitySupplier=Low quality +ReputationForThisProduct=Reputation +BuyerName=Buyer name +AllProductServicePrices=All product / service prices +AllProductReferencesOfSupplier=All references of vendor +BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/ar_IQ/ticket.lang b/htdocs/langs/ar_IQ/ticket.lang new file mode 100644 index 00000000000..df73daf4a0d --- /dev/null +++ b/htdocs/langs/ar_IQ/ticket.lang @@ -0,0 +1,316 @@ +# en_US lang file for module ticket +# Copyright (C) 2013 Jean-François FERRY <hello@librethic.io> +# +# 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/>. + +# +# Generic +# + +Module56000Name=Tickets +Module56000Desc=Ticket system for issue or request management + +Permission56001=See tickets +Permission56002=Modify tickets +Permission56003=Delete tickets +Permission56004=Manage tickets +Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on) + +TicketDictType=Ticket - Types +TicketDictCategory=Ticket - Groupes +TicketDictSeverity=Ticket - Severities +TicketDictResolution=Ticket - Resolution + +TicketTypeShortCOM=Commercial question +TicketTypeShortHELP=Request for functionnal help +TicketTypeShortISSUE=Issue, bug or problem +TicketTypeShortREQUEST=Change or enhancement request +TicketTypeShortPROJET=Project +TicketTypeShortOTHER=Other + +TicketSeverityShortLOW=Low +TicketSeverityShortNORMAL=Normal +TicketSeverityShortHIGH=High +TicketSeverityShortBLOCKING=Critical, Blocking + +ErrorBadEmailAddress=Field '%s' incorrect +MenuTicketMyAssign=My tickets +MenuTicketMyAssignNonClosed=My open tickets +MenuListNonClosed=Open tickets + +TypeContact_ticket_internal_CONTRIBUTOR=Contributor +TypeContact_ticket_internal_SUPPORTTEC=Assigned user +TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking +TypeContact_ticket_external_CONTRIBUTOR=External contributor + +OriginEmail=Email source +Notify_TICKET_SENTBYMAIL=Send ticket message by email + +# Status +Read=Read +Assigned=Assigned +InProgress=In progress +NeedMoreInformation=Waiting for information +Answered=Answered +Waiting=Waiting +Closed=Closed +Deleted=Deleted + +# Dict +Type=Type +Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface + +# Email templates +MailToSendTicketMessage=To send email from ticket message + +# +# Admin page +# +TicketSetup=Ticket module setup +TicketSettings=Settings +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 +TicketParamModule=Module variable setup +TicketParamMail=Email setup +TicketEmailNotificationFrom=Notification email from +TicketEmailNotificationFromHelp=Used into ticket message answer by example +TicketEmailNotificationTo=Notifications email to +TicketEmailNotificationToHelp=Send email notifications to this address. +TicketNewEmailBodyLabel=Text message sent after creating a ticket +TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added. +TicketParamPublicInterface=Public interface setup +TicketsEmailMustExist=Require an existing email address to create a ticket +TicketsEmailMustExistHelp=In the public interface, the email address should already be filled in the database to create a new ticket. +PublicInterface=Public interface +TicketUrlPublicInterfaceLabelAdmin=Alternative URL for public interface +TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the server must act as a proxy on this new URL) +TicketPublicInterfaceTextHomeLabelAdmin=Welcome text of the public interface +TicketPublicInterfaceTextHome=You can create a support ticket or view existing from its identifier tracking ticket. +TicketPublicInterfaceTextHomeHelpAdmin=The text defined here will appear on the home page of the public interface. +TicketPublicInterfaceTopicLabelAdmin=Interface title +TicketPublicInterfaceTopicHelp=This text will appear as the title of the public interface. +TicketPublicInterfaceTextHelpMessageLabelAdmin=Help text to the message entry +TicketPublicInterfaceTextHelpMessageHelpAdmin=This text will appear above the message input area of the user. +ExtraFieldsTicket=Extra attributes +TicketCkEditorEmailNotActivated=HTML editor is not activated. Please put FCKEDITOR_ENABLE_MAIL content to 1 to get it. +TicketsDisableEmail=Do not send emails for ticket creation or message recording +TicketsDisableEmailHelp=By default, emails are sent when new tickets or messages created. Enable this option to disable *all* email notifications +TicketsLogEnableEmail=Enable log by email +TicketsLogEnableEmailHelp=At each change, an email will be sent **to each contact** associated with the ticket. +TicketParams=Params +TicketsShowModuleLogo=Display the logo of the module in the public interface +TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface +TicketsShowCompanyLogo=Display the logo of the company in the public interface +TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") +TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) +TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. +TicketsActivatePublicInterface=Activate public interface +TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create tickets. +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 +TicketsModelModule=Document templates for tickets +TicketNotifyTiersAtCreation=Notify third party at creation +TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket +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 an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. +# +# Index & list page +# +TicketsIndex=Tickets area +TicketList=List of tickets +TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user +NoTicketsFound=No ticket found +NoUnreadTicketsFound=No unread ticket found +TicketViewAllTickets=View all tickets +TicketViewNonClosedOnly=View only open tickets +TicketStatByStatus=Tickets by status +OrderByDateAsc=Sort by ascending date +OrderByDateDesc=Sort by descending date +ShowAsConversation=Show as conversation list +MessageListViewType=Show as table list + +# +# Ticket card +# +Ticket=Ticket +TicketCard=Ticket card +CreateTicket=Create ticket +EditTicket=Edit ticket +TicketsManagement=Tickets Management +CreatedBy=Created by +NewTicket=New Ticket +SubjectAnswerToTicket=Ticket answer +TicketTypeRequest=Request type +TicketCategory=Group +SeeTicket=See ticket +TicketMarkedAsRead=Ticket has been marked as read +TicketReadOn=Read on +TicketCloseOn=Closing date +MarkAsRead=Mark ticket as read +TicketHistory=Ticket history +AssignUser=Assign to user +TicketAssigned=Ticket is now assigned +TicketChangeType=Change type +TicketChangeCategory=Change analytic code +TicketChangeSeverity=Change severity +TicketAddMessage=Add a message +AddMessage=Add a message +MessageSuccessfullyAdded=Ticket added +TicketMessageSuccessfullyAdded=Message successfully added +TicketMessagesList=Message list +NoMsgForThisTicket=No message for this ticket +Properties=Classification +LatestNewTickets=Latest %s newest tickets (not read) +TicketSeverity=Severity +ShowTicket=See ticket +RelatedTickets=Related tickets +TicketAddIntervention=Create intervention +CloseTicket=Close ticket +CloseATicket=Close a ticket +ConfirmCloseAticket=Confirm ticket closing +ConfirmDeleteTicket=Please confirm ticket deleting +TicketDeletedSuccess=Ticket deleted with success +TicketMarkedAsClosed=Ticket marked as closed +TicketDurationAuto=Calculated duration +TicketDurationAutoInfos=Duration calculated automatically from intervention related +TicketUpdated=Ticket updated +SendMessageByEmail=Send message by email +TicketNewMessage=New message +ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send +TicketGoIntoContactTab=Please go into "Contacts" tab to select them +TicketMessageMailIntro=Introduction +TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved. +TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email +TicketMessageMailIntroText=Hello,<br>A new response was sent on a ticket that you contact. Here is the message:<br> +TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket. +TicketMessageMailSignature=Signature +TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved. +TicketMessageMailSignatureText=<p>Sincerely,</p><p>--</p> +TicketMessageMailSignatureLabelAdmin=Signature of response email +TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message. +TicketMessageHelp=Only this text will be saved in the message list on ticket card. +TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values. +TimeElapsedSince=Time elapsed since +TicketTimeToRead=Time elapsed before read +TicketContacts=Contacts ticket +TicketDocumentsLinked=Documents linked to ticket +ConfirmReOpenTicket=Confirm reopen this ticket ? +TicketMessageMailIntroAutoNewPublicMessage=A new message was posted on the ticket with the subject %s: +TicketAssignedToYou=Ticket assigned +TicketAssignedEmailBody=You have been assigned the ticket #%s by %s +MarkMessageAsPrivate=Mark message as private +TicketMessagePrivateHelp=This message will not display to external users +TicketEmailOriginIssuer=Issuer at origin of the tickets +InitialMessage=Initial Message +LinkToAContract=Link to a contract +TicketPleaseSelectAContract=Select a contract +UnableToCreateInterIfNoSocid=Can not create an intervention when no third party is defined +TicketMailExchanges=Mail exchanges +TicketInitialMessageModified=Initial message modified +TicketMessageSuccesfullyUpdated=Message successfully updated +TicketChangeStatus=Change status +TicketConfirmChangeStatus=Confirm the status change: %s ? +TicketLogStatusChanged=Status changed: %s to %s +TicketNotNotifyTiersAtCreate=Not notify company at create +Unread=Unread +TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. +ErrorTicketRefRequired=Ticket reference name is required + +# +# Logs +# +TicketLogMesgReadBy=Ticket %s read by %s +NoLogForThisTicket=No log for this ticket yet +TicketLogAssignedTo=Ticket %s assigned to %s +TicketLogPropertyChanged=Ticket %s modified: classification from %s to %s +TicketLogClosedBy=Ticket %s closed by %s +TicketLogReopen=Ticket %s re-open + +# +# Public pages +# +TicketSystem=Ticket system +ShowListTicketWithTrackId=Display ticket list from track ID +ShowTicketWithTrackId=Display ticket from track ID +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 and Ref %s. +PleaseRememberThisId=Please keep the tracking number that we might ask you later. +TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s) +TicketNewEmailSubjectCustomer=New support ticket +TicketNewEmailBody=This is an automatic email to confirm you have registered a new ticket. +TicketNewEmailBodyCustomer=This is an automatic email to confirm a new ticket has just been created into your account. +TicketNewEmailBodyInfosTicket=Information for monitoring the ticket +TicketNewEmailBodyInfosTrackId=Ticket tracking number: %s +TicketNewEmailBodyInfosTrackUrl=You can view the progress of the ticket by clicking the link above. +TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket in the specific interface by clicking the following link +TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface. +TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system. +TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe the problem. Provide the most information possible to allow us to correctly identify your request. +TicketPublicMsgViewLogIn=Please enter ticket tracking ID +TicketTrackId=Public Tracking ID +OneOfTicketTrackId=One of your tracking ID +ErrorTicketNotFound=Ticket with tracking ID %s not found! +Subject=Subject +ViewTicket=View ticket +ViewMyTicketList=View my ticket list +ErrorEmailMustExistToCreateTicket=Error: email address not found in our database +TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s) +TicketNewEmailBodyAdmin=<p>Ticket has just been created with ID #%s, see information:</p> +SeeThisTicketIntomanagementInterface=See ticket in management interface +TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled +ErrorEmailOrTrackingInvalid=Bad value for tracking ID or email +OldUser=Old user +NewUser=New user +NumberOfTicketsByMonth=Number of tickets per month +NbOfTickets=Number of tickets +# notifications +TicketNotificationEmailSubject=Ticket %s updated +TicketNotificationEmailBody=This is an automatic message to notify you that ticket %s has just been updated +TicketNotificationRecipient=Notification recipient +TicketNotificationLogMessage=Log message +TicketNotificationEmailBodyInfosTrackUrlinternal=View ticket into interface +TicketNotificationNumberEmailSent=Notification email sent: %s + +ActionsOnTicket=Events on ticket + +# +# Boxes +# +BoxLastTicket=Latest created tickets +BoxLastTicketDescription=Latest %s created tickets +BoxLastTicketContent= +BoxLastTicketNoRecordedTickets=No recent unread tickets +BoxLastModifiedTicket=Latest modified tickets +BoxLastModifiedTicketDescription=Latest %s modified tickets +BoxLastModifiedTicketContent= +BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ar_IQ/trips.lang b/htdocs/langs/ar_IQ/trips.lang new file mode 100644 index 00000000000..1f53a5737ff --- /dev/null +++ b/htdocs/langs/ar_IQ/trips.lang @@ -0,0 +1,151 @@ +# Dolibarr language file - Source file is en_US - trips +ShowExpenseReport=Show expense report +Trips=Expense reports +TripsAndExpenses=Expenses reports +TripsAndExpensesStatistics=Expense reports statistics +TripCard=Expense report card +AddTrip=Create expense report +ListOfTrips=List of expense reports +ListOfFees=List of fees +TypeFees=Types of fees +ShowTrip=Show expense report +NewTrip=New expense report +LastExpenseReports=Latest %s expense reports +AllExpenseReports=All expense reports +CompanyVisited=Company/organization visited +FeesKilometersOrAmout=Amount or kilometers +DeleteTrip=Delete expense report +ConfirmDeleteTrip=Are you sure you want to delete this expense report? +ListTripsAndExpenses=List of expense reports +ListToApprove=Waiting for approval +ExpensesArea=Expense reports area +ClassifyRefunded=Classify 'Refunded' +ExpenseReportWaitingForApproval=A new expense report has been submitted for approval +ExpenseReportWaitingForApprovalMessage=A new expense report has been submitted and is waiting for approval.<br> - User: %s<br> - Period: %s<br>Click here to validate: %s +ExpenseReportWaitingForReApproval=An expense report has been submitted for re-approval +ExpenseReportWaitingForReApprovalMessage=An expense report has been submitted and is waiting for re-approval.<br>The %s, you refused to approve the expense report for this reason: %s.<br>A new version has been proposed and waiting for your approval.<br> - User: %s<br> - Period: %s<br>Click here to validate: %s +ExpenseReportApproved=An expense report was approved +ExpenseReportApprovedMessage=The expense report %s was approved.<br> - User: %s<br> - Approved by: %s<br>Click here to show the expense report: %s +ExpenseReportRefused=An expense report was refused +ExpenseReportRefusedMessage=The expense report %s was refused.<br> - User: %s<br> - Refused by: %s<br> - Motive for refusal: %s<br>Click here to show the expense report: %s +ExpenseReportCanceled=An expense report was canceled +ExpenseReportCanceledMessage=The expense report %s was canceled.<br> - User: %s<br> - Canceled by: %s<br> - Motive for cancellation: %s<br>Click here to show the expense report: %s +ExpenseReportPaid=An expense report was paid +ExpenseReportPaidMessage=The expense report %s was paid.<br> - User: %s<br> - Paid by: %s<br>Click here to show the expense report: %s +TripId=Id expense report +AnyOtherInThisListCanValidate=Person to be informed for validating the request. +TripSociete=Information company +TripNDF=Informations expense report +PDFStandardExpenseReports=Standard template to generate a PDF document for expense report +ExpenseReportLine=Expense report line +TF_OTHER=Other +TF_TRIP=Transportation +TF_LUNCH=Lunch +TF_METRO=Metro +TF_TRAIN=Train +TF_BUS=Bus +TF_CAR=Car +TF_PEAGE=Toll +TF_ESSENCE=Fuel +TF_HOTEL=Hotel +TF_TAXI=Taxi +EX_KME=Mileage costs +EX_FUE=Fuel CV +EX_HOT=Hotel +EX_PAR=Parking CV +EX_TOL=Toll CV +EX_TAX=Various Taxes +EX_IND=Indemnity transportation subscription +EX_SUM=Maintenance supply +EX_SUO=Office supplies +EX_CAR=Car rental +EX_DOC=Documentation +EX_CUR=Customers receiving +EX_OTR=Other receiving +EX_POS=Postage +EX_CAM=CV maintenance and repair +EX_EMM=Employees meal +EX_GUM=Guests meal +EX_BRE=Breakfast +EX_FUE_VP=Fuel PV +EX_TOL_VP=Toll PV +EX_PAR_VP=Parking PV +EX_CAM_VP=PV maintenance and repair +DefaultCategoryCar=Default transportation mode +DefaultRangeNumber=Default range number +UploadANewFileNow=Upload a new document now +Error_EXPENSEREPORT_ADDON_NotDefined=Error, the rule for expense report numbering ref was not defined into setup of module 'Expense Report' +ErrorDoubleDeclaration=You have declared another expense report into a similar date range. +AucuneLigne=There is no expense report declared yet +ModePaiement=Payment mode +VALIDATOR=User responsible for approval +VALIDOR=Approved by +AUTHOR=Recorded by +AUTHORPAIEMENT=Paid by +REFUSEUR=Denied by +CANCEL_USER=Deleted by +MOTIF_REFUS=Reason +MOTIF_CANCEL=Reason +DATE_REFUS=Deny date +DATE_SAVE=Validation date +DATE_CANCEL=Cancelation date +DATE_PAIEMENT=Payment date +BROUILLONNER=Reopen +ExpenseReportRef=Ref. expense report +ValidateAndSubmit=Validate and submit for approval +ValidatedWaitingApproval=Validated (waiting for approval) +NOT_AUTHOR=You are not the author of this expense report. Operation cancelled. +ConfirmRefuseTrip=Are you sure you want to deny this expense report? +ValideTrip=Approve expense report +ConfirmValideTrip=Are you sure you want to approve this expense report? +PaidTrip=Pay an expense report +ConfirmPaidTrip=Are you sure you want to change status of this expense report to "Paid"? +ConfirmCancelTrip=Are you sure you want to cancel this expense report? +BrouillonnerTrip=Move back expense report to status "Draft" +ConfirmBrouillonnerTrip=Are you sure you want to move this expense report to status "Draft"? +SaveTrip=Validate expense report +ConfirmSaveTrip=Are you sure you want to validate this expense report? +NoTripsToExportCSV=No expense report to export for this period. +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=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. <b>d</b> 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 +expenseReportOffset=Offset +expenseReportCoef=Coefficient +expenseReportTotalForFive=Example with <u>d</u> = 5 +expenseReportRangeFromTo=from %d to %d +expenseReportRangeMoreThan=more than %d +expenseReportCoefUndefined=(value not defined) +expenseReportCatDisabled=Category disabled - see the c_exp_tax_cat dictionary +expenseReportRangeDisabled=Range disabled - see the c_exp_tax_range dictionay +expenseReportPrintExample=offset + (d x coef) = %s +ExpenseReportApplyTo=Apply to +ExpenseReportDomain=Domain to apply +ExpenseReportLimitOn=Limit on +ExpenseReportDateStart=Date start +ExpenseReportDateEnd=Date end +ExpenseReportLimitAmount=Limite amount +ExpenseReportRestrictive=Restrictive +AllExpenseReport=All type of expense report +OnExpense=Expense line +ExpenseReportRuleSave=Expense report rule saved +ExpenseReportRuleErrorOnSave=Error: %s +RangeNum=Range %d +ExpenseReportConstraintViolationError=Constraint violation id [%s]: %s is superior to %s %s +byEX_DAY=by day (limitation to %s) +byEX_MON=by month (limitation to %s) +byEX_YEA=by year (limitation to %s) +byEX_EXP=by line (limitation to %s) +ExpenseReportConstraintViolationWarning=Constraint violation id [%s]: %s is superior to %s %s +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=Vehicle category +ExpenseRangeOffset=Offset amount: %s +RangeIk=Mileage range +AttachTheNewLineToTheDocument=Attach the line to an uploaded document diff --git a/htdocs/langs/ar_IQ/users.lang b/htdocs/langs/ar_IQ/users.lang new file mode 100644 index 00000000000..bbfa16450b0 --- /dev/null +++ b/htdocs/langs/ar_IQ/users.lang @@ -0,0 +1,125 @@ +# Dolibarr language file - Source file is en_US - users +HRMArea=HRM area +UserCard=User card +GroupCard=Group card +Permission=Permission +Permissions=Permissions +EditPassword=Edit password +SendNewPassword=Regenerate and send password +SendNewPasswordLink=Send link to reset password +ReinitPassword=Regenerate password +PasswordChangedTo=Password changed to: %s +SubjectNewPassword=Your new password for %s +GroupRights=Group permissions +UserRights=User permissions +UserGUISetup=User Display Setup +DisableUser=Disable +DisableAUser=Disable a user +DeleteUser=Delete +DeleteAUser=Delete a user +EnableAUser=Enable a user +DeleteGroup=Delete +DeleteAGroup=Delete a group +ConfirmDisableUser=Are you sure you want to disable user <b>%s</b>? +ConfirmDeleteUser=Are you sure you want to delete user <b>%s</b>? +ConfirmDeleteGroup=Are you sure you want to delete group <b>%s</b>? +ConfirmEnableUser=Are you sure you want to enable user <b>%s</b>? +ConfirmReinitPassword=Are you sure you want to generate a new password for user <b>%s</b>? +ConfirmSendNewPassword=Are you sure you want to generate and send new password for user <b>%s</b>? +NewUser=New user +CreateUser=Create user +LoginNotDefined=Login is not defined. +NameNotDefined=Name is not defined. +ListOfUsers=List of users +SuperAdministrator=Super Administrator +SuperAdministratorDesc=Global administrator +AdministratorDesc=Administrator +DefaultRights=Default Permissions +DefaultRightsDesc=Define here the <u>default</u> permissions that are automatically granted to a <u>new</u> user (to modify permissions for existing users, go to the user card). +DolibarrUsers=Dolibarr users +LastName=Last name +FirstName=First name +ListOfGroups=List of groups +NewGroup=New group +CreateGroup=Create group +RemoveFromGroup=Remove from group +PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. +PasswordChangeRequest=Request to change password for <b>%s</b> +PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 +LastUsersCreated=Latest %s users created +ShowGroup=Show group +ShowUser=Show user +NonAffectedUsers=Non assigned users +UserModified=User modified successfully +PhotoFile=Photo file +ListOfUsersInGroup=List of users in this group +ListOfGroupsForUser=List of groups for this user +LinkToCompanyContact=Link to third party / contact +LinkedToDolibarrMember=Link to member +LinkedToDolibarrUser=Link to Dolibarr user +LinkedToDolibarrThirdParty=Link to Dolibarr third party +CreateDolibarrLogin=Create a user +CreateDolibarrThirdParty=Create a third party +LoginAccountDisableInDolibarr=Account disabled in Dolibarr. +UsePersonalValue=Use personal value +InternalUser=Internal user +ExportDataset_user_1=Users and their properties +DomainUser=Domain user %s +Reactivate=Reactivate +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 <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. +PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. +Inherited=Inherited +UserWillBe=Created user will be +UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) +UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) +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 +UserDeleted=User %s removed +NewGroupCreated=Group %s created +GroupModified=Group %s modified +GroupDeleted=Group %s removed +ConfirmCreateContact=Are you sure you want to create a Dolibarr account for this contact? +ConfirmCreateLogin=Are you sure you want to create a Dolibarr account for this member? +ConfirmCreateThirdParty=Are you sure you want to create a third party for this member? +LoginToCreate=Login to create +NameToCreate=Name of third party to create +YourRole=Your roles +YourQuotaOfUsersIsReached=Your quota of active users is reached ! +NbOfUsers=No. of users +NbOfPermissions=No. of permissions +DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin +HierarchicalResponsible=Supervisor +HierarchicView=Hierarchical view +UseTypeFieldToChange=Use field Type to change +OpenIDURL=OpenID URL +LoginUsingOpenID=Use OpenID to login +WeeklyHours=Hours worked (per week) +ExpectedWorkedHours=Expected worked hours per week +ColorUser=Color of the user +DisabledInMonoUserMode=Disabled in maintenance mode +UserAccountancyCode=User accounting code +UserLogoff=User logout +UserLogged=User logged +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 diff --git a/htdocs/langs/ar_IQ/website.lang b/htdocs/langs/ar_IQ/website.lang new file mode 100644 index 00000000000..7d624915ef0 --- /dev/null +++ b/htdocs/langs/ar_IQ/website.lang @@ -0,0 +1,147 @@ +# Dolibarr language file - Source file is en_US - website +Shortname=Code +WebsiteSetupDesc=Create here the websites you wish to use. Then go into menu Websites to edit them. +DeleteWebsite=Delete 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. +WEBSITE_TYPE_CONTAINER=Type of page/container +WEBSITE_PAGE_EXAMPLE=Web page to use as example +WEBSITE_PAGENAME=Page name/alias +WEBSITE_ALIASALT=Alternative page names/aliases +WEBSITE_ALIASALTDesc=Use here list of other name/aliases so the page can also be accessed using this other names/aliases (for example the old name after renaming the alias to keep backlink on old link/name working). Syntax is:<br>alternativename1, alternativename2, ... +WEBSITE_CSS_URL=URL of external CSS file +WEBSITE_CSS_INLINE=CSS file content (common to all pages) +WEBSITE_JS_INLINE=Javascript file content (common to all pages) +WEBSITE_HTML_HEADER=Addition at bottom of HTML Header (common to all pages) +WEBSITE_ROBOT=Robot file (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 +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.<br>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 "<strong>%s</strong>" to edit this alias. +EditTheWebSiteForACommonHeader=Note: If you want to define a personalized header for all pages, edit the header on the site level instead of on the page/container. +MediaFiles=Media library +EditCss=Edit website properties +EditMenu=Edit menu +EditMedias=Edit medias +EditPageMeta=Edit page/container properties +EditInLine=Edit inline +AddWebsite=Add website +Webpage=Web page/container +AddPage=Add page/container +PageContainer=Page +PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first '<strong>Import a full website template</strong>' or just '<strong>Add a page/container</strong>'. +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 +PageContent=Page/Contenair +PageDeleted=Page/Contenair '%s' of website %s deleted +PageAdded=Page/Contenair '%s' added +ViewSiteInNewTab=View site in new tab +ViewPageInNewTab=View page in new tab +SetAsHomePage=Set as Home page +RealURL=Real URL +ViewWebsiteInProduction=View web site using home URLs +SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on<br><strong>%s</strong> +ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: +YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> +YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> +ReadPerm=Read +WritePerm=Write +TestDeployOnWeb=Test/deploy on web +PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". +VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined +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=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br> +#YouCanEditHtmlSource2=<br><span class="fa fa-picture-o"></span> To include a <strong>image</strong> shared publicaly, use the <strong>viewimage.php</strong> wrapper:<br>Example with a shared key 123456789, syntax is:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> +YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> +YouCanEditHtmlSourceMore=<br>More examples of HTML or dynamic code available on <a href="%s" target="_blank">the wiki documentation</a><br>. +ClonePage=Clone page/container +CloneSite=Clone site +SiteAdded=Website added +ConfirmClonePage=Please enter code/alias of new page and if it is a translation of the cloned page. +PageIsANewTranslation=The new page is a translation of the current page ? +LanguageMustNotBeSameThanClonedPage=You clone a page as a translation. The language of the new page must be different than language of source page. +ParentPageId=Parent page ID +WebsiteId=Website ID +CreateByFetchingExternalPage=Create page/container by fetching page from external URL... +OrEnterPageInfoManually=Or create page from scratch or from a page template... +FetchAndCreate=Fetch and Create +ExportSite=Export website +ImportSite=Import website template +IDOfPage=Id of page +Banner=Banner +BlogPost=Blog post +WebsiteAccount=Website account +WebsiteAccounts=Website accounts +AddWebsiteAccount=Create web site account +BackToListForThirdParty=Back to list for the third-party +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) +SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please comme back later... +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.<br>Note also that the inline editor may not works correclty when used on a grabbed external page. +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 +WebsiteRootOfImages=Root directory for website images +SubdirOfPage=Sub-directory dedicated to page +AliasPageAlreadyExists=Alias page <strong>%s</strong> already exists +CorporateHomePage=Corporate Home page +EmptyPage=Empty page +ExternalURLMustStartWithHttp=External URL must start with http:// or https:// +ZipOfWebsitePackageToImport=Upload the Zip file of the website template package +ZipOfWebsitePackageToLoad=or Choose an available embedded website template package +ShowSubcontainers=Show dynamic content +InternalURLOfPage=Internal URL of page +ThisPageIsTranslationOf=This page/container is a translation of +ThisPageHasTranslationPages=This page/container has translation +NoWebSiteCreateOneFirst=No website has been created yet. Create one first. +GoTo=Go to +DynamicPHPCodeContainsAForbiddenInstruction=You add dynamic PHP code that contains the PHP instruction '<strong>%s</strong>' 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:<br><br>#mycssselector, input.myclass:hover { ... }<br>must be<br>.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }<br><br>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 +ImportSite=Import website template +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.<br>(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 +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 +RegenerateWebsiteContent=Regenerate web site cache files +AllowedInFrames=Allowed in Frames +DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ar_IQ/withdrawals.lang b/htdocs/langs/ar_IQ/withdrawals.lang new file mode 100644 index 00000000000..7d5b57f7da9 --- /dev/null +++ b/htdocs/langs/ar_IQ/withdrawals.lang @@ -0,0 +1,153 @@ +# Dolibarr language file - Source file is en_US - withdrawals +CustomersStandingOrdersArea=Payments by Direct debit orders +SuppliersStandingOrdersArea=Payments by Credit transfer +StandingOrdersPayment=Direct debit payment orders +StandingOrderPayment=Direct debit payment order +NewStandingOrder=New direct debit order +NewPaymentByBankTransfer=New payment by credit transfer +StandingOrderToProcess=To process +PaymentByBankTransferReceipts=Credit transfer orders +PaymentByBankTransferLines=Credit transfer order lines +WithdrawalsReceipts=Direct debit orders +WithdrawalReceipt=Direct debit order +BankTransferReceipts=Credit transfer orders +BankTransferReceipt=Credit transfer order +LatestBankTransferReceipts=Latest %s credit transfer orders +LastWithdrawalReceipts=Latest %s direct debit files +WithdrawalsLine=Direct debit order line +CreditTransferLine=Credit transfer line +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 +NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines. +NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +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 +InvoiceWaitingWithdraw=Invoice waiting for direct debit +InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +AmountToWithdraw=Amount to withdraw +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. +ResponsibleUser=User Responsible +WithdrawalsSetup=Direct debit payment setup +CreditTransferSetup=Credit transfer setup +WithdrawStatistics=Direct debit payment statistics +CreditTransferStatistics=Credit transfer statistics +Rejects=Rejects +LastWithdrawalReceipt=Latest %s direct debit receipts +MakeWithdrawRequest=Make a direct debit payment request +MakeBankTransferOrder=Make a credit transfer request +WithdrawRequestsDone=%s direct debit payment requests recorded +BankTransferRequestsDone=%s credit transfer requests recorded +ThirdPartyBankCode=Third-party bank code +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 <strong>%s</strong>. +WithdrawalCantBeCreditedTwice=This withdrawal receipt is already marked as credited; this can't be done twice, as this would potentially create duplicate payments and bank entries. +ClassCredited=Classify credited +ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account? +TransData=Transmission date +TransMetod=Transmission method +Send=Send +Lines=Lines +StandingOrderReject=Issue a rejection +WithdrawsRefused=Direct debit refused +WithdrawalRefused=Withdrawal refused +CreditTransfersRefused=Credit transfers refused +WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society +RefusedData=Date of rejection +RefusedReason=Reason for rejection +RefusedInvoicing=Billing the rejection +NoInvoiceRefused=Do not charge the rejection +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 +StatusMotif2=Request contested +StatusMotif3=No direct debit payment order +StatusMotif4=Sales Order +StatusMotif5=RIB unusable +StatusMotif6=Account without balance +StatusMotif7=Judicial Decision +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 +CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateGuichet=Only office +CreateBanque=Only bank +OrderWaiting=Waiting for treatment +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 +BankToReceiveWithdraw=Receiving Bank Account +BankToPayCreditTransfer=Bank Account used as source of payments +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->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 +RUM=UMR +DateRUM=Mandate signature date +RUMLong=Unique Mandate Reference +RUMWillBeGenerated=If empty, a UMR (Unique Mandate Reference) will be generated once the bank account information is saved. +WithdrawMode=Direct debit mode (FRST or RECUR) +WithdrawRequestAmount=Amount of Direct debit request: +BankTransferAmount=Amount of Credit Transfer request: +WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty amount. +SepaMandate=SEPA Direct Debit Mandate +SepaMandateShort=SEPA Mandate +PleaseReturnMandate=Please return this mandate form by email to %s or by mail to +SEPALegalText=By signing this mandate form, you authorize (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. +CreditorIdentifier=Creditor Identifier +CreditorName=Creditor Name +SEPAFillForm=(B) Please complete all the fields marked * +SEPAFormYourName=Your name +SEPAFormYourBAN=Your Bank Account Name (IBAN) +SEPAFormYourBIC=Your Bank Identifier Code (BIC) +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 +SEPAFRST=SEPA FRST +ExecutionDate=Execution date +CreateForSepa=Create direct debit file +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer +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 +### 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<br>Data of payment: %s +InfoTransSubject=Transmission of direct debit payment order %s to bank +InfoTransMessage=The direct debit payment order %s has been sent to bank by %s %s.<br><br> +InfoTransData=Amount: %s<br>Method: %s<br>Date: %s +InfoRejectSubject=Direct debit payment order refused +InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.<br><br>--<br>%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. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/ar_IQ/workflow.lang b/htdocs/langs/ar_IQ/workflow.lang new file mode 100644 index 00000000000..494a0424a75 --- /dev/null +++ b/htdocs/langs/ar_IQ/workflow.lang @@ -0,0 +1,25 @@ +# Dolibarr language file - Source file is en_US - workflow +WorkflowSetup=Workflow module setup +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 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 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 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 +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/ar_IQ/zapier.lang b/htdocs/langs/ar_IQ/zapier.lang new file mode 100644 index 00000000000..b4cc4ccba4a --- /dev/null +++ b/htdocs/langs/ar_IQ/zapier.lang @@ -0,0 +1,21 @@ +# Copyright (C) 2019 Frédéric FRANCE <frederic.france@free.fr> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +ModuleZapierForDolibarrName = Zapier for Dolibarr +ModuleZapierForDolibarrDesc = Zapier for Dolibarr module +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ar_SA/accountancy.lang b/htdocs/langs/ar_SA/accountancy.lang index e0817d618cb..0f3e0d79d19 100644 --- a/htdocs/langs/ar_SA/accountancy.lang +++ b/htdocs/langs/ar_SA/accountancy.lang @@ -10,325 +10,325 @@ ACCOUNTING_EXPORT_AMOUNT=تصدير الكمية ACCOUNTING_EXPORT_DEVISE=تصدير العملة Selectformat=حدد تنسيق للملف ACCOUNTING_EXPORT_FORMAT=حدد تنسيق للملف -ACCOUNTING_EXPORT_ENDLINE=Select the carriage return type +ACCOUNTING_EXPORT_ENDLINE=حدد نوع إرجاع السطر ACCOUNTING_EXPORT_PREFIX_SPEC=تحديد بادئة لاسم الملف ThisService=هذه الخدمة -ThisProduct=This product -DefaultForService=Default for service -DefaultForProduct=Default for product -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty -CantSuggest=Can't suggest -AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s -ConfigAccountingExpert=Configuration of the module accounting (double entry) -Journalization=Journalization +ThisProduct=هذا المنتج +DefaultForService=افتراضي للخدمة +DefaultForProduct=افتراضي للمنتج +ProductForThisThirdparty=منتج لهذا الطرف الثالث +ServiceForThisThirdparty=خدمة لهذا الطرف الثالث +CantSuggest=لا أستطيع أن أقترح +AccountancySetupDoneFromAccountancyMenu=تم إجراء معظم عمليات الإعداد المحاسبي من القائمة %s +ConfigAccountingExpert=تكوين وحدة المحاسبة (القيد المزدوج) +Journalization=يوميات Journals=دفاتر اليومية JournalFinancial=دفاتر اليومية المالية BackToChartofaccounts=العودة لشجرة الحسابات Chartofaccounts=جدول الحسابات -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 -OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to an accounting account -OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to an accounting account -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 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 -ListOfAccounts=List of accounts -CountriesInEEC=Countries in EEC -CountriesNotInEEC=Countries not in EEC -CountriesInEECExceptMe=Countries in EEC except %s -CountriesExceptMe=All countries except %s -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 -VueBySubAccountAccounting=View by accounting subaccount +ChartOfSubaccounts=مخطط الحسابات الفردية +ChartOfIndividualAccountsOfSubsidiaryLedger=مخطط الحسابات الفردية لدفتر الأستاذ الفرعي +CurrentDedicatedAccountingAccount=الحساب الجاري المخصص +AssignDedicatedAccountingAccount=حساب جديد للتعيين +InvoiceLabel=تسمية الفاتورة +OverviewOfAmountOfLinesNotBound=نظرة عامة على البنود الغير مرتبطة بحساب محاسبي +OverviewOfAmountOfLinesBound=نظرة عامة على البنود المرتبطة بالفعل بحساب محاسبي +OtherInfo=معلومات اخرى +DeleteCptCategory=إزالة حساب المحاسبة من المجموعة +ConfirmDeleteCptCategory=هل أنت متأكد أنك تريد إزالة هذا الحساب المحاسبي من مجموعة حسابات المحاسبة؟ +JournalizationInLedgerStatus=حالة اليوميات +AlreadyInGeneralLedger=تم نقله بالفعل في دفاتر اليومية المحاسبية ودفتر الأستاذ +NotYetInGeneralLedger=لم يتم نقله الى دفاتر اليومية المحاسبية ودفتر الأستاذ +GroupIsEmptyCheckSetup=المجموعة فارغة ، تحقق من إعداد مجموعة المحاسبة المخصصة +DetailByAccount=إظهار التفاصيل حسب الحساب +AccountWithNonZeroValues=الحسابات ذات القيم غير الصفرية +ListOfAccounts=قائمة الحسابات +CountriesInEEC=دول الاتحاد الأوروبي +CountriesNotInEEC=ليس ضمن دول الاتحاد الأوروبي +CountriesInEECExceptMe=البلدان في المجموعة الاقتصادية الأوروبية باستثناء %s +CountriesExceptMe=جميع الدول باستثناء %s +AccountantFiles=تصدير مستندات المصدر +ExportAccountingSourceDocHelp=باستخدام هذه الأداة ، يمكنك تصدير الأحداث (القائمة وملفات PDF) التي تم استخدامها لإنشاء المحاسبة الخاصة بك. لتصدير دفاتر اليومية الخاصة بك ، استخدم إدخال القائمة %s - %s. +VueByAccountAccounting=عرض حسب الحساب المحاسبي +VueBySubAccountAccounting=عرض حسب الحساب المحاسبة الفرعي -MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup -MainAccountForSuppliersNotDefined=Main accounting account for vendors not defined in setup -MainAccountForUsersNotDefined=Main accounting account for users not defined in setup -MainAccountForVatPaymentNotDefined=Main accounting account for VAT payment not defined in setup -MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup +MainAccountForCustomersNotDefined=حساب المحاسبة الرئيسي للعملاء الغير محددين في الإعدادات +MainAccountForSuppliersNotDefined=حساب المحاسبة الرئيسي للموردين الغير محددين في الإعدادات +MainAccountForUsersNotDefined=حساب المحاسبة الرئيسي للمستخدمين الغير محددين في الإعدادات +MainAccountForVatPaymentNotDefined=حساب المحاسبة الرئيسي لدفعات (VAT) الغير محددين في الإعدادات +MainAccountForSubscriptionPaymentNotDefined=حساب المحاسبة الرئيسي للمشتركين الغير محددين في الإعدادات -AccountancyArea=Accounting area -AccountancyAreaDescIntro=Usage of the accountancy module is done in several step: -AccountancyAreaDescActionOnce=The following actions are usually executed one time only, or once per year... -AccountancyAreaDescActionOnceBis=Next steps should be done to save you time in future by suggesting you the correct default accounting account when making the journalization (writing record in Journals and General ledger) -AccountancyAreaDescActionFreq=The following actions are usually executed every month, week or day for very large companies... +AccountancyArea=منطقة المحاسبة +AccountancyAreaDescIntro=استخدام وحدة المحاسبة تم في عدة خطوات: +AccountancyAreaDescActionOnce=عادة ما يتم تنفيذ الإجراءات التالية مرة واحدة فقط ، أو مرة واحدة في السنة. +AccountancyAreaDescActionOnceBis=يجب اتخاذ الخطوات التالية لتوفير الوقت في المستقبل من خلال اقتراح حساب المحاسبة الافتراضي الصحيح عند إجراء التسجيل (كتابة السجل في اليوميات ودفتر الأستاذ العام) +AccountancyAreaDescActionFreq=يتم تنفيذ الإجراءات التالية عادةً كل شهر أو أسبوع أو كل يوم للشركات الكبيرة جدًا . -AccountancyAreaDescJournalSetup=STEP %s: Create or check content of your journal list from 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 +AccountancyAreaDescJournalSetup=الخطوة %s: قم بإنشاء أو التحقق من محتوى قائمة دفتر اليومية الخاصة بك من القائمة %s +AccountancyAreaDescChartModel=الخطوة %s: تحقق من وجود نموذج لمخطط الحساب أو قم بإنشاء نموذج من القائمة %s +AccountancyAreaDescChart=الخطوة %s : حدد و / أو أكمل مخطط حسابك من القائمة %s -AccountancyAreaDescVat=STEP %s: Define accounting accounts for each VAT Rates. For this, use the menu entry %s. -AccountancyAreaDescDefault=STEP %s: Define default accounting accounts. For this, use the menu entry %s. -AccountancyAreaDescExpenseReport=STEP %s: Define default accounting accounts for each type of expense report. For this, use the menu entry %s. -AccountancyAreaDescSal=STEP %s: Define default accounting accounts for payment of salaries. For this, use the menu entry %s. -AccountancyAreaDescContrib=STEP %s: Define default accounting accounts for special expences (miscellaneous taxes). For this, use the menu entry %s. -AccountancyAreaDescDonation=STEP %s: Define default accounting accounts for donation. For this, use the menu entry %s. -AccountancyAreaDescSubscription=STEP %s: Define default accounting accounts for member subscription. For this, use the menu entry %s. -AccountancyAreaDescMisc=STEP %s: Define mandatory default account and default accounting accounts for miscellaneous transactions. For this, use the menu entry %s. -AccountancyAreaDescLoan=STEP %s: Define default accounting accounts for loans. For this, use the menu entry %s. -AccountancyAreaDescBank=STEP %s: Define accounting accounts and journal code for each bank and financial accounts. For this, use the menu entry %s. -AccountancyAreaDescProd=STEP %s: Define accounting accounts on your products/services. For this, use the menu entry %s. +AccountancyAreaDescVat=الخطوة %s: تحديد حسابات المحاسبة لكل معدلات ضريبة القيمة المضافة. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescDefault=الخطوة %s: تحديد حسابات المحاسبة الافتراضية. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescExpenseReport=الخطوة %s: تحديد حسابات المحاسبة الافتراضية لكل نوع من تقارير المصروفات. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescSal=الخطوة %s: تحديد حسابات المحاسبة الافتراضية لدفع الرواتب. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescContrib=الخطوة %s: تحديد حسابات المحاسبة الافتراضية للنفقات الخاصة (ضرائب متنوعة). لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescDonation=الخطوة %s: تحديد حسابات المحاسبة الافتراضية للتبرع. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescSubscription=الخطوة %s: تحديد حسابات المحاسبة الافتراضية لاشتراك الأعضاء. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescMisc=الخطوة %s: تحديد الحساب الافتراضي الإلزامي وحسابات المحاسبة الافتراضية للمعاملات المتنوعة. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescLoan=الخطوة %s: تحديد حسابات المحاسبة الافتراضية للقروض. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescBank=الخطوة %s: تحديد الحسابات المحاسبية ورمز دفتر اليومية لكل حساب بنكي والحسابات المالية. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescProd=الخطوة %s: تحديد حسابات المحاسبة لمنتجاتك او خدماتك. لهذا ، استخدم إدخال القائمة %s. -AccountancyAreaDescBind=STEP %s: Check the binding between existing %s lines and accounting account is done, so application will be able to journalize transactions in Ledger in one click. Complete missing bindings. For this, use the menu entry %s. -AccountancyAreaDescWriteRecords=STEP %s: Write transactions into the Ledger. For this, go into menu <strong>%s</strong>, and click into button <strong>%s</strong>. -AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and generate reports and exports. +AccountancyAreaDescBind=الخطوة %s: تحقق من الربط بين سطور %s الحالية وحساب المحاسبة ، لتمكين التطبيق من تسجيل المعاملات في دفتر الأستاذ بنقرة واحدة. إكمال الارتباطات المفقودة. لهذا ، استخدم إدخال القائمة %s. +AccountancyAreaDescWriteRecords=الخطوة %s: اكتب المعاملات في دفتر الأستاذ. لهذا ، انتقل إلى القائمة <strong> %s </strong> ، وانقر فوق الزر <strong> %s </strong>. +AccountancyAreaDescAnalyze=الخطوة %s: إضافة أو تحرير المعاملات الحالية وإنشاء التقارير والصادرات. -AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future. +AccountancyAreaDescClosePeriod=الخطوة %s: إغلاق الفترة لذا لا يمكننا إجراء تعديل في المستقبل. -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 +TheJournalCodeIsNotDefinedOnSomeBankAccount=لم تكتمل الخطوة الإلزامية في الإعداد (لم يتم تحديد رمز دفتر يومية المحاسبة لجميع الحسابات البنكية) +Selectchartofaccounts=حدد مخطط الحسابات النشط +ChangeAndLoad=تغيير و تحميل Addanaccount=إضافة حساب محاسبي AccountAccounting=حساب محاسبي AccountAccountingShort=حساب -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 +SubledgerAccount=حساب أستاذ فرعي +SubledgerAccountLabel=اسم حساب أستاذ فرعي +ShowAccountingAccount=عرض حساب المحاسبة +ShowAccountingJournal=عرض دفتر يومية +ShowAccountingAccountInLedger=عرض حساب المحاسبة في دفتر الأستاذ +ShowAccountingAccountInJournals=عرض حساب المحاسبة في دفاتر اليومية +AccountAccountingSuggest=حساب المحاسبة المقترح +MenuDefaultAccounts=الحسابات الافتراضية MenuBankAccounts=الحسابات المصرفية -MenuVatAccounts=Vat accounts -MenuTaxAccounts=Tax accounts -MenuExpenseReportAccounts=Expense report accounts -MenuLoanAccounts=Loan accounts -MenuProductsAccounts=Product accounts -MenuClosureAccounts=Closure accounts -MenuAccountancyClosure=Closure -MenuAccountancyValidationMovements=Validate movements -ProductsBinding=Products accounts -TransferInAccounting=Transfer in accounting -RegistrationInAccounting=Registration in accounting -Binding=Binding to accounts -CustomersVentilation=ربط فاتورة الزبون -SuppliersVentilation=Vendor invoice binding -ExpenseReportsVentilation=Expense report binding -CreateMvts=Create new transaction -UpdateMvts=Modification of a transaction -ValidTransaction=Validate transaction -WriteBookKeeping=Register transactions in accounting -Bookkeeping=Ledger -BookkeepingSubAccount=Subledger -AccountBalance=Account balance -ObjectsRef=Source object ref +MenuVatAccounts=حسابات ضريبة القيمة المضافة +MenuTaxAccounts=حسابات الضرائب +MenuExpenseReportAccounts=حسابات تقرير المصاريف +MenuLoanAccounts=حسابات القروض +MenuProductsAccounts=حسابات المنتج +MenuClosureAccounts=حسابات الإغلاق +MenuAccountancyClosure=اغلاق +MenuAccountancyValidationMovements=اعتماد الحركات +ProductsBinding=حسابات المنتجات +TransferInAccounting=التحويل في المحاسبة +RegistrationInAccounting=التسجيل في المحاسبة +Binding=ربط للحسابات +CustomersVentilation=ربط فاتورة العميل +SuppliersVentilation=ربط فاتورة المورد +ExpenseReportsVentilation=ربط تقرير المصاريف +CreateMvts=إنشاء معاملة جديدة +UpdateMvts=تعديل معاملة +ValidTransaction=اعتماد المعاملة +WriteBookKeeping=تسجيل المعاملات في المحاسبة +Bookkeeping=دفتر حسابات +BookkeepingSubAccount=حساب استاذ فرعي +AccountBalance=رصيد الحساب +ObjectsRef=مرجع الكائن المصدر CAHTF=Total purchase vendor before tax -TotalExpenseReport=Total expense report -InvoiceLines=Lines of invoices to bind -InvoiceLinesDone=Bound lines of invoices -ExpenseReportLines=Lines of expense reports to bind -ExpenseReportLinesDone=Bound lines of expense reports -IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalExpenseReport=تقرير المصاريف الإجمالية +InvoiceLines=بنود الفواتير المراد ربطها +InvoiceLinesDone=بنود الفواتير المقيدة +ExpenseReportLines=بنود تقارير المصاريف المراد ربطها +ExpenseReportLinesDone=البنود المقيدة لتقارير المصروفات +IntoAccount=ربط البند مع حساب المحاسبة +TotalForAccount=Total accounting account -Ventilate=Bind -LineId=Id line +Ventilate=ربط +LineId=معرف البند Processing=معالجة -EndProcessing=انتهت العملية +EndProcessing=تم إنهاء العملية. SelectedLines=الخطوط المحددة Lineofinvoice=خط الفاتورة -LineOfExpenseReport=Line of expense report -NoAccountSelected=No accounting account selected -VentilatedinAccount=Binded successfully to the accounting account -NotVentilatedinAccount=Not bound to the accounting account -XLineSuccessfullyBinded=%s products/services successfully bound to an accounting account -XLineFailedToBeBinded=%s products/services were not bound to any accounting account +LineOfExpenseReport=بند تقرير المصاريف +NoAccountSelected=لم يتم اختيار حساب +VentilatedinAccount=ربط بنجاح بحساب المحاسبة +NotVentilatedinAccount=لم يربط بحساب المحاسبة +XLineSuccessfullyBinded=%s منتجات / خدمات مرتبطة بنجاح بحساب محاسبة +XLineFailedToBeBinded=%s منتجات / خدمات لم تكن مرتبطة بأي حساب محاسبة -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) -ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements -ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements +ACCOUNTING_LIMIT_LIST_VENTILATION=الحد الأقصى لعدد البنود في صفحة القائمة والربط (يوصى : 50) +ACCOUNTING_LIST_SORT_VENTILATION_TODO=ابدأ فرز الصفحة "بنود للتنفيذ" حسب أحدث العناصر +ACCOUNTING_LIST_SORT_VENTILATION_DONE=ابدأ في فرز الصفحة "تم الربط" حسب أحدث العناصر -ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50) -ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50) -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=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_LENGTH_DESCRIPTION=اقتطاع وصف المنتج والخدمات في القوائم بعد حرف x (الأفضل = 50) +ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=اقتطاع نموذج وصف حساب المنتجات والخدمات في القوائم بعد حرف x (الأفضل = 50) +ACCOUNTING_LENGTH_GACCOUNT=طول حسابات المحاسبة العامة (إذا قمت بتعيين القيمة إلى 6 هنا ، فسيظهر الحساب "706" مثل "706000" على الشاشة) +ACCOUNTING_LENGTH_AACCOUNT=طول حسابات الطرف الثالث المحاسبية (إذا قمت بتعيين القيمة إلى 6 هنا ، فسيظهر الحساب "401" مثل "401000" على الشاشة) +ACCOUNTING_MANAGE_ZERO=السماح بإدارة عدد مختلف من الأصفار في نهاية الحساب المحاسبي. تحتاجه بعض الدول (مثل سويسرا). إذا تم الضبط على إيقاف (افتراضي) ، يمكنك تعيين المعاملين التاليتين لتطلب من التطبيق إضافة أصفار افتراضية. +BANK_DISABLE_DIRECT_INPUT=تعطيل التسجيل المباشر للمعاملة في الحساب المصرفي +ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=تفعيل تصدير المسودة الى دفتر اليومية +ACCOUNTANCY_COMBO_FOR_AUX=تمكين قائمة التحرير والسرد للحساب الفرعي (قد يكون بطيئًا إذا كان لديك الكثير من الأطراف الثالثة) +ACCOUNTING_DATE_START_BINDING=تحديد موعد لبدء الربط والتحويل في المحاسبة. بعد هذا التاريخ ، لن يتم تحويل المعاملات إلى المحاسبة. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=في نقل المحاسبة ، حدد فترة العرض بشكل افتراضي ACCOUNTING_SELL_JOURNAL=دفتر البيع اليومي ACCOUNTING_PURCHASE_JOURNAL=دفتر الشراء اليومي ACCOUNTING_MISCELLANEOUS_JOURNAL=دفتر المتفرقات اليومي ACCOUNTING_EXPENSEREPORT_JOURNAL=دفتر تقرير المصروف اليومي ACCOUNTING_SOCIAL_JOURNAL=دفتر اليومية الاجتماعي -ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal +ACCOUNTING_HAS_NEW_JOURNAL=له دفتر يوميات جديد -ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) -ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) -ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure +ACCOUNTING_RESULT_PROFIT=نتيجة حساب المحاسبي (الربح) +ACCOUNTING_RESULT_LOSS=نتيجة حساب المحاسبي (الخسارة) +ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=دقتر الإغلاق -ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer -TransitionalAccount=Transitional bank transfer account +ACCOUNTING_ACCOUNT_TRANSFER_CASH=حساب التحويل البنكي الانتقالي +TransitionalAccount=حساب التحويل البنكي الانتقالي -ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait -DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations -ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions +ACCOUNTING_ACCOUNT_SUSPENSE=حساب الانتظار +DONATION_ACCOUNTINGACCOUNT=حساب تسجيل التبرعات +ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=حساب تسجيل الاشتراكات -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_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) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (used if not defined in the product sheet) -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_BUY_ACCOUNT=حساب افتراضي للمنتجات المشتراة (يستخدم إذا لم يتم تحديده في ورقة المنتج) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=حساب افتراضي للمنتجات المشتراة في الاتحاد الاوروبي (يستخدم إذا لم يتم تحديده في ورقة المنتج) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=حساب افتراضي للمنتجات المشتراة والمستوردة من الاتحاد الاوروبي (تُستخدم إذا لم يتم تحديدها في ورقة المنتج) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=حساب افتراضي للمنتجات المباعة (يستخدم إذا لم يتم تحديده في ورقة المنتج) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=حساب افتراضي للمنتجات المباعة في الاتحاد الاوروبي (مستخدم إذا لم يتم تحديده في ورقة المنتج) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=حساب افتراضي للمنتجات المباعة والمصدرة من الاتحاد الاوروبي (تُستخدم إذا لم يتم تحديدها في ورقة المنتج) -ACCOUNTING_SERVICE_BUY_ACCOUNT=Accounting account by default for the bought services (used if not defined in the service sheet) -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=Accounting account by default for the sold services (used if not defined in the service sheet) -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_BUY_ACCOUNT=حساب افتراضي للخدمات المشتراة (يُستخدم إذا لم يتم تحديده في ورقة الخدمة) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=حساب افتراضي للخدمات المشتراة في الاتحاد الاوروبي (يستخدم إذا لم يتم تحديده في ورقة الخدمة) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=حساب افتراضي للخدمات المشتراة والمستوردة من الاتحاد الاوروبي (تُستخدم إذا لم يتم تحديدها في ورقة الخدمة) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=حساب افتراضي للخدمات المباعة (يُستخدم إذا لم يتم تحديده في ورقة الخدمة) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=حساب افتراضي للخدمات المباعة في الاتحاد الاوروبي (يُستخدم إذا لم يتم تحديده في ورقة الخدمة) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=حساب افتراضي للخدمات المباعة والمصدرة من الاتحاد الاوروبي (تُستخدم إذا لم يتم تحديدها في ورقة الخدمة) Doctype=نوع الوثيقة Docdate=التاريخ Docref=مرجع -LabelAccount=حساب التسمية +LabelAccount=Label account LabelOperation=Label operation -Sens=Direction -AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make +Sens=الاتجاه +AccountingDirectionHelp=بالنسبة لحساب عميل ، استخدم الائتمان لتسجيل دفعة تلقيتها <br> بالنسبة لحساب مورد ، استخدم الخصم لتسجيل دفعة تقوم بها LetteringCode=Lettering code Lettering=Lettering Codejournal=دفتر اليومية -JournalLabel=Journal label +JournalLabel=اسم دفتر اليومية NumPiece=Piece number -TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by general ledger account -GroupBySubAccountAccounting=Group by subledger account -AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. -ByAccounts=By accounts -ByPredefinedAccountGroups=By predefined groups -ByPersonalizedAccountGroups=By personalized groups +TransactionNumShort=رقم. العملية +AccountingCategory=Custom group +GroupByAccountAccounting=تجميع حسب حساب دفتر الأستاذ العام +GroupBySubAccountAccounting=تجميع حسب حساب دفتر الأستاذ الفرعي +AccountingAccountGroupsDesc=يمكنك هنا تحديد بعض مجموعات الحساب. سيتم استخدامها لتقارير المحاسبة الشخصية. +ByAccounts=حسب الحسابات +ByPredefinedAccountGroups=من خلال مجموعات محددة مسبقًا +ByPersonalizedAccountGroups=بواسطة مجموعات شخصية ByYear=بحلول العام NotMatch=Not Set -DeleteMvt=Delete some operation lines from accounting -DelMonth=Month to delete -DelYear=Year to delete -DelJournal=Journal to delete -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) +DeleteMvt=حذف بعض بنود العمليات من المحاسبة +DelMonth=شهر للحذف +DelYear=السنة للحذف +DelJournal=دفتر يومية للحذف +ConfirmDeleteMvt=سيؤدي هذا إلى حذف جميع بنود العمليات المحاسبية للسنة / الشهر و / أو يوميات معينة (يفضل معيار واحد على الأقل). سيتعين عليك إعادة استخدام الميزة "%s" لاستعادة السجل المحذوف في دفتر الأستاذ. +ConfirmDeleteMvtPartial=سيؤدي هذا إلى حذف المعاملة من المحاسبة (سيتم حذف جميع بنود العمليات المتعلقة بنفس المعاملة) FinanceJournal=دفتر المالية اليومي -ExpenseReportsJournal=Expense reports journal +ExpenseReportsJournal=دفتر تقارير المصاريف DescFinanceJournal=دفتر المالية اليومي المتضمن لجميع الدفعات عن طريق الحساب المصرفي -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 -FeeAccountNotDefined=Account for fee not defined -BankAccountNotDefined=Account for bank not defined +DescJournalOnlyBindedVisible=هذه طريقة عرض للسجل مرتبطة بالحساب ويمكن تسجيلها في دفتر اليوميات و الأستاذ. +VATAccountNotDefined=حساب ضريبة القيمة المضافة غير محدد +ThirdpartyAccountNotDefined=حساب لطرف ثالث غير محدد +ProductAccountNotDefined=حساب للمنتج غير محدد +FeeAccountNotDefined=حساب الرسوم غير محدد +BankAccountNotDefined=حساب للبنك غير محدد CustomerInvoicePayment=دفعة فاتورة العميل -ThirdPartyAccount=Third-party account -NewAccountingMvt=New transaction -NumMvts=Numero of transaction -ListeMvts=List of movements +ThirdPartyAccount=حساب طرف ثالث +NewAccountingMvt=عملية جديدة +NumMvts=رقم العملية +ListeMvts=قائمة الحركات ErrorDebitCredit=الدائن والمدين لا يمكن أن يكون لهم قيمة في الوقت نفسه -AddCompteFromBK=Add accounting accounts to the group -ReportThirdParty=List third-party account -DescThirdPartyReport=Consult here the list of third-party customers and vendors and their accounting accounts +AddCompteFromBK=اضافة حسابات للمجموعة +ReportThirdParty=قائمة حساب الطرف الثالث +DescThirdPartyReport=راجع هنا قائمة العملاء والموردين وحساباتهم ListAccounts=قائمة الحسابات المحاسبية -UnknownAccountForThirdparty=Unknown third-party account. We will use %s -UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error -ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. We will use %s -ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. -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 -ShowOpeningBalance=Show opening balance -HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by level +UnknownAccountForThirdparty=حساب طرف ثالث غير معروف. سوف نستخدم %s +UnknownAccountForThirdpartyBlocking=حساب طرف ثالث غير معروف. خطأ في المنع +ThirdpartyAccountNotDefinedOrThirdPartyUnknown=حساب طرف ثالث غير محدد أو طرف ثالث غير معروف. سوف نستخدم %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=طرف ثالث غير معروف ودفتر الأستاذ الفرعي غير محدد في الدفعة. سنبقي قيمة حساب دفتر الأستاذ الفرعي فارغة. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=حساب طرف ثالث غير محدد أو طرف ثالث غير معروف. خطأ في المنع. +UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=حساب طرف ثالث وحساب قيد الانتظار غير معرّفين. خطأ في المنع +PaymentsNotLinkedToProduct=الدفع غير مرتبط بأي منتج / خدمة +OpeningBalance=الرصيد الافتتاحي +ShowOpeningBalance=عرض الرصيد الافتتاحي +HideOpeningBalance=إخفاء الرصيد الافتتاحي +ShowSubtotalByGroup=عرض المجموع الفرعي حسب المستوى -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. +Pcgtype=مجموعة الحساب +PcgtypeDesc=تُستخدم مجموعة الحسابات كمعايير "تصفية" و "تجميع" محددة مسبقًا لبعض التقارير المحاسبية. على سبيل المثال ، يتم استخدام "الدخل" أو "المصاريف" كمجموعات لحسابات المنتجات لإنشاء تقرير المصاريف / الدخل. -Reconcilable=Reconcilable +Reconcilable=قابل للتسوية TotalVente=المبيعات الإجمالية قبل الضريبة TotalMarge=إجمالي هامش المبيعات -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 <strong>"%s"</strong>. If account was not set on product/service cards or if you still has some lines not bound to any account, you will have to make a manual binding from the menu "<strong>%s</strong>". -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=راجع هنا قائمة بنود فاتورة العميل المرتبطة (أو غير المرتبطة) بحساب المنتج +DescVentilMore=في معظم الحالات ، إذا كنت تستخدم منتجات أو خدمات محددة مسبقًا وقمت بتعيين رقم الحساب على بطاقة المنتج / الخدمة ، فسيكون التطبيق قادرًا على إجراء جميع عمليات الربط بين سطور الفاتورة وحساب مخطط الحسابات الخاص بك ، فقط بنقرة واحدة على الزر <strong> "%s" </strong>. إذا لم يتم تعيين الحساب على بطاقات المنتج / الخدمة أو إذا كان لا يزال لديك بعض الأسطر غير المرتبطة بحساب ، فسيتعين عليك إجراء ربط يدوي من القائمة "<strong> %s </strong>". +DescVentilDoneCustomer=راجع هنا قائمة بنود فواتير العملاء وحساب منتجاتهم +DescVentilTodoCustomer=ربط بنود الفاتورة غير المرتبطة بحساب المنتج +ChangeAccount=قم بتغيير حساب المنتج / الخدمة للبنود المحددة باستخدام الحساب التالي: 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 <strong>"%s"</strong>. If account was not set on fees dictionary or if you still has some lines not bound to any account, you will have to make a manual binding from the menu "<strong>%s</strong>". -DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account +DescVentilSupplier=راجع هنا قائمة بنود فاتورة المورد المرتبطة أو غير المرتبطة بعد بحساب المنتج (فقط السجل الذي لم يتم نقله بالفعل في المحاسبة سيكون مرئي) +DescVentilDoneSupplier=راجع هنا قائمة بنود فواتير البائعين وحساباتهم +DescVentilTodoExpenseReport=ربط بنود تقرير المصروفات غير المرتبطة بحساب الرسوم +DescVentilExpenseReport=راجع هنا قائمة بنود تقرير المصروفات المرتبطة (أو غير المرتبطة) بحساب الرسوم +DescVentilExpenseReportMore=إذا قمت بإعداد حساب على نوع بنود تقرير المصروفات ، فسيكون التطبيق قادرًا على إجراء جميع عمليات الربط بين بنود تقرير المصاريف الخاصة بك وحساب مخطط الحسابات الخاص بك ، بنقرة واحدة فقط على الزر <strong> "%s" </strong>. إذا لم يتم تعيين الحساب على قاموس الرسوم أو إذا كان لا يزال لديك بعض البنود غير المرتبطة بأي حساب ، فسيتعين عليك إجراء ربط يدوي من القائمة "<strong> %s </strong>". +DescVentilDoneExpenseReport=راجع هنا قائمة بنود تقارير المصروفات وحساب رسومها -Closure=Annual closure -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) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated -ValidateMovements=Validate movements -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 +Closure=الإغلاق السنوي +DescClosure=راجع هنا عدد الحركات حسب الشهر التي لم يتم اعتمادها والسنوات المالية المفتوحة +OverviewOfMovementsNotValidated=الخطوة الاولى نظرة عامة على الحركات التي لم يتم اعتمادها. (ضروري لإغلاق السنة المالية) +AllMovementsWereRecordedAsValidated=تم تسجيل جميع الحركات على أنها معتمدة +NotAllMovementsCouldBeRecordedAsValidated=لا يمكن تسجيل جميع الحركات على انها معتمدة +ValidateMovements=اعتماد الحركات +DescValidateMovements=سيتم حظر أي تعديل أو حذف للكتابة والحروف. يجب اعتماد جميع الإدخالات الخاصة بالتمرين وإلا فلن يكون الإغلاق ممكنًا -ValidateHistory=Bind Automatically -AutomaticBindingDone=Automatic binding done +ValidateHistory=ربط تلقائي +AutomaticBindingDone=تم الربط التلقائي ErrorAccountancyCodeIsAlreadyUse=خطأ، لا يمكنك حذف هذا الحساب المحاسبي لأنه مستخدم -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 +MvtNotCorrectlyBalanced=الحركة غير متوازنة بشكل صحيح. الخصم = %s | الائتمان = %s +Balancing=موازنة +FicheVentilation=بطاقة مرتبطة +GeneralLedgerIsWritten=المعاملات مكتوبة في دفتر الأستاذ +GeneralLedgerSomeRecordWasNotRecorded=لا يمكن تسجيل بعض المعاملات. إذا لم تكن هناك رسالة خطأ أخرى ، فربما يكون ذلك بسبب تسجيلها في دفتر اليومية بالفعل. +NoNewRecordSaved=لا مزيد من التسجيل لليوميات +ListOfProductsWithoutAccountingAccount=قائمة المنتجات غير مرتبطة بأي حساب +ChangeBinding=تغيير الربط +Accounted=حسب في دفتر الأستاذ +NotYetAccounted=لم يحسب بعد في دفتر الأستاذ +ShowTutorial=عرض البرنامج التعليمي NotReconciled=لم يتم تسويتة -WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view +WarningRecordWithoutSubledgerAreExcluded=تحذير ، كل العمليات التي لم يتم تحديد حساب دفتر الأستاذ الفرعي لها تتم تصفيتها واستبعادها من طريقة العرض هذه ## 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 -AccountingJournals=Accounting journals -AccountingJournal=Accounting journal -NewAccountingJournal=New accounting journal -ShowAccountingJournal=Show accounting journal -NatureOfJournal=Nature of Journal -AccountingJournalType1=Miscellaneous operations +BindingOptions=خيارات الربط +ApplyMassCategories=تطبيق فئات جماعية +AddAccountFromBookKeepingWithNoCategories=الحساب المتاح ليس بعد في المجموعة الشخصية +CategoryDeleted=تمت إزالة فئة الحساب +AccountingJournals=الدفاتر المحاسبية +AccountingJournal=دفتر المحاسبة +NewAccountingJournal=دفتر المحاسبة جديد +ShowAccountingJournal=عرض دفتر يومية +NatureOfJournal=طبيعة دفتر المحاسبة +AccountingJournalType1=عمليات متنوعة AccountingJournalType2=مبيعات AccountingJournalType3=مشتريات AccountingJournalType4=بنك -AccountingJournalType5=Expenses report -AccountingJournalType8=Inventory +AccountingJournalType5=تقرير مصروفات +AccountingJournalType8=المخزون AccountingJournalType9=Has-new -ErrorAccountingJournalIsAlreadyUse=This journal is already use -AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu <b>%s</b> - <b>%s</b> -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) +ErrorAccountingJournalIsAlreadyUse=هذه الدفتر مستخدم بالفعل +AccountingAccountForSalesTaxAreDefinedInto=ملاحظة: تم تعريف حساب ضريبة المبيعات في القائمة <b> %s </b> - <b> %s </b> +NumberOfAccountancyEntries=عدد الادخالات +NumberOfAccountancyMovements=عدد الحركات +ACCOUNTING_DISABLE_BINDING_ON_SALES=تعطيل الربط والتحويل في المحاسبة على المبيعات (لن يتم أخذ فواتير العميل في الاعتبار في المحاسبة) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=تعطيل الربط والتحويل في المحاسبة على المشتريات (لن يتم أخذ فواتير البائعين في الاعتبار في المحاسبة) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=تعطيل الربط والتحويل في المحاسبة على تقارير المصروفات (لن يتم أخذ تقارير المصروفات في الاعتبار في المحاسبة) ## Export -ExportDraftJournal=Export draft journal +ExportDraftJournal=تصدير مسودة دفتر اليومية Modelcsv=نموذج التصدير Selectmodelcsv=تحديد نموذج للتصدير Modelcsv_normal=تصدير كلاسيكي @@ -343,66 +343,88 @@ 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 Configurable +Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) Modelcsv_Gestinumv5Export for Gestinum (v5) -ChartofaccountsId=Chart of accounts Id +ChartofaccountsId=معرف دليل الحسابات ## 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. +InitAccountancy=المحاسبة الأولية +InitAccountancyDesc=يمكن استخدام هذه الصفحة لتهيئة حساب المنتجات والخدمات التي ليس لها حساب محدد للمبيعات والمشتريات. +DefaultBindingDesc=يمكن استخدام هذه الصفحة لتعيين حساب افتراضي لاستخدامه لربط سجل المعاملات حول دفع الرواتب والتبرع والضرائب وضريبة القيمة المضافة عند عدم وجود حساب محدد بالفعل. +DefaultClosureDesc=يمكن استخدام هذه الصفحة لتعيين العوامل المستخدمة لعمليات الإغلاق المحاسبية. Options=الخيارات -OptionModeProductSell=Mode sales -OptionModeProductSellIntra=Mode sales exported in EEC -OptionModeProductSellExport=Mode sales exported in other countries -OptionModeProductBuy=Mode purchases -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. -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 -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. +OptionModeProductSell=وضع المبيعات +OptionModeProductSellIntra=وضع المبيعات المصدرة في الاتحاد الاوروبي +OptionModeProductSellExport=وضع المبيعات المصدرة في بلدان أخرى +OptionModeProductBuy=وضع المشتريات +OptionModeProductBuyIntra=وضع المشتريات المستوردة في الاتحاد الاوروبي +OptionModeProductBuyExport=وضع المشتريات المستوردة في بلدان أخرى +OptionModeProductSellDesc=عرض جميع المنتجات مع حساب المبيعات. +OptionModeProductSellIntraDesc=عرض جميع المنتجات مع حساب المبيعات في الاتحاد الاوروبي. +OptionModeProductSellExportDesc=عرض جميع المنتجات مع حساب المبيعات في دول اخرى. +OptionModeProductBuyDesc=عرض جميع المنتجات مع حساب المشتريات. +OptionModeProductBuyIntraDesc=عرض جميع المنتجات مع حساب المشتريات في الاتحاد الاوروبي. +OptionModeProductBuyExportDesc=عرض جميع المنتجات مع حساب المشتريات لدول اخرى. +CleanFixHistory=قم بإزالة رمز المحاسبة من البنود الغير موجودة في مخططات الحساب +CleanHistory=إعادة تعيين كافة الارتباطات للسنة المحددة +PredefinedGroups=مجموعات محددة مسبقًا +WithoutValidAccount=بدون حساب مخصص صالح +WithValidAccount=مع حساب مخصص صالح +ValueNotIntoChartOfAccount=هذه القيمة للحساب غير موجودة في مخطط الحساب +AccountRemovedFromGroup=تمت إزالة الحساب من المجموعة +SaleLocal=بيع محلي +SaleExport=بيع تصدير +SaleEEC=بيع في الاتحاد الاوروبي +SaleEECWithVAT=البيع في EEC مع ضريبة القيمة المضافة ليست فارغة ، لذلك نفترض أن هذا ليس بيعًا داخل الاتحاد والحساب المقترح هو حساب المنتج القياسي. 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 -Calculated=Calculated +Range=نطاق الحساب +Calculated=تم حسابه Formula=معادلة ## 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 <strong>%s</strong>, 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 bookeeping -NoJournalDefined=No journal defined -Binded=Lines bound -ToBind=Lines to bind -UseMenuToSetBindindManualy=Autodection not possible, use menu <a href="%s">%s</a> to make the binding manually +SomeMandatoryStepsOfSetupWereNotDone=لم يتم تنفيذ بعض خطوات الإعداد الإلزامية ، يرجى إكمالها +ErrorNoAccountingCategoryForThisCountry=لا توجد مجموعة حسابات متاحة للبلد %s (انظر الصفحة الرئيسية - الإعداد - القواميس) +ErrorInvoiceContainsLinesNotYetBounded=تحاول تسجيل بعض بنود الفاتورة <strong> %s </strong> في دفتر اليومية ، ولكن لم يتم تقييد بعض البنود الأخرى حتى الآن للحساب. تم رفض تسجيل جميع سطور الفاتورة في هذه الفاتورة. +ErrorInvoiceContainsLinesNotYetBoundedShort=بعض البنود في الفاتورة غير مرتبطة بحساب. +ExportNotSupported=تنسيق التصدير الذي تم إعداده غير مدعوم في هذه الصفحة +BookeppingLineAlreayExists=البنود موجودة بالفعل في مسك الدفاتر +NoJournalDefined=لم يتم تحديد دفتر +Binded=البنود مرتبطة +ToBind=بنود للربط +UseMenuToSetBindindManualy=البنود غير مرتبطة بعد ، استخدم القائمة <a href="%s"> %s </a> لإجراء الربط يدويًا ## Import -ImportAccountingEntries=Accounting entries -DateExport=Date export -WarningReportNotReliable=Warning, this report is not based on the Ledger, so does not contains transaction modified manualy in the Ledger. If your journalization is up to date, the bookkeeping view is more accurate. -ExpenseReportJournal=Expense Report Journal -InventoryJournal=Inventory Journal +ImportAccountingEntries=مداخيل حسابية +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + +DateExport=تاريخ التصدير +WarningReportNotReliable=تحذير ، هذا التقرير لا يستند إلى دفتر الأستاذ ، لذلك لا يحتوي على معاملة تم تعديلها يدويًا في دفتر الأستاذ. إذا كان تسجيل دفتر اليومية الخاص بك محدثًا ، فسيكون عرض مسك الدفاتر أكثر دقة. +ExpenseReportJournal=تقرير دفتر المصاريف +InventoryJournal=دفتر الجرد + +NAccounts=%s accounts diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index 65d484ec842..2dabbd20959 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -1,50 +1,51 @@ # Dolibarr language file - Source file is en_US - admin Foundation=أساس Version=الإصدار -Publisher=Publisher +Publisher=الناشر VersionProgram=إصدار البرنامج -VersionLastInstall=Initial install version -VersionLastUpgrade=Latest version upgrade +VersionLastInstall=إصدار التثبيت الأولي +VersionLastUpgrade=اخر نسخة محدثة VersionExperimental=تجريبية VersionDevelopment=تطويرية VersionUnknown=غير معروف VersionRecommanded=موصى بها -FileCheck=Fileset Integrity Checks -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 +FileCheck=عمليات التحقق من سلامة مجموعة الملفات +FileCheckDesc=تتيح لك هذه الأداة التحقق من سلامة الملفات و إعداد التطبيق الخاص بك ، ومقارنة كل ملف بالملف الرسمي. يمكن أيضا التحقق من قيمة بعض ثوابت الإعداد. يمكنك استخدام هذه الأداة لتحديد ما إذا تم تعديل أي ملفات (على سبيل المثال بواسطة أحد المتطفلين). +FileIntegrityIsStrictlyConformedWithReference=تكامل الملفات يتوافق بدقة مع المرجع. +FileIntegrityIsOkButFilesWereAdded=لقد نجح فحص سلامة الملفات ، ولكن تمت إضافة بعض الملفات الجديدة. +FileIntegritySomeFilesWereRemovedOrModified=فشل فحص سلامة الملفات. تم تعديل بعض الملفات أو إزالتها أو إضافتها. +GlobalChecksum=تفحص نهائي عام +MakeIntegrityAnalysisFrom=إجراء تحليل سلامة لملفات التطبيق من LocalSignature=Embedded local signature (less reliable) RemoteSignature=Remote distant signature (more reliable) -FilesMissing=الملفات المفقودة -FilesUpdated=الملفات التي تم تحديثها -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 +FilesMissing=ملفات مفقودة +FilesUpdated=ملفات محدثة +FilesModified=ملفات معدلة +FilesAdded=ملفات مضافة +FileCheckDolibarr=تحقق من سلامة ملفات التطبيق +AvailableOnlyOnPackagedVersions=تواجد الملف المحلي لفحص التكامل فقط عند تثبيت التطبيق من حزمة مرخصة XmlNotFound=Xml Integrity File of application not found SessionId=Session ID SessionSaveHandler=معالج لحفظ الجلسات SessionSavePath=Session save location PurgeSessions=إزالة الجلسات -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. +ConfirmPurgeSessions=هل تريد حقًا مسح كل الجلسات؟ سيؤدي هذا إلى قطع اتصال كل المستخدمين (باستثنائك). +NoSessionListWithThisHandler=لا يسمح معالج حفظ الجلسة الذي تم تكوينه في PHP بسرد جميع الجلسات قيد التشغيل. LockNewSessions=إقفال الإتصالات الجديدة ConfirmLockNewSessions=Are you sure you want to restrict any new Dolibarr connection to yourself? Only user <b>%s</b> will be able to connect after that. UnlockNewSessions=إزالة قفل الإتصال YourSession=الجلسة الخاصة بك -Sessions=Users Sessions +Sessions=جلسات المستخدمين WebUserGroup=خادم الويب المستخدم / المجموعة +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +PermissionsOnFile=أذونات في الملف %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). DBStoringCharset=الترميز الخاص بقاعدة البيانات لتخزين المعلومات DBSortingCharset=الترميز الخاص بقاعدة البيانات لتخزين المعلومات -HostCharset=Host charset -ClientCharset=Client charset -ClientSortingCharset=Client collation +HostCharset=ترميز المضيف +ClientCharset=ترميز العميل +ClientSortingCharset=ترتيب العميل WarningModuleNotActive=يجب أن يكون النموذج <b>%s</b> مفعل WarningOnlyPermissionOfActivatedModules=فقط التصاريح المتعلقة بالنماذج المنشطة تظهر هنا. يمكنك تفعيل نماذج أخرى في الصفحة الرئيسية-> لإعداد ت-> صفحة النماذج DolibarrSetup=تركيب أو تحديث دوليبار @@ -54,7 +55,7 @@ InternalUsers=مستخدمين داخليين ExternalUsers=مستخدمين خارجيين GUISetup=العرض SetupArea=التثبيت -UploadNewTemplate=Upload new template(s) +UploadNewTemplate=تحميل قالب جديد FormToTestFileUploadForm=نموذج لاختبار تحميل ملف (وفقا لبرنامج الإعداد) ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled ModuleIsEnabled=The module/application <b>%s</b> has been enabled @@ -62,7 +63,8 @@ IfModuleEnabled=ملاحظة : نعم فعالة فقط في حال كان ال RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=الإعداد الأمني -SecurityFilesDesc=Define here options related to security about uploading files. +PHPSetup=PHP setup +SecurityFilesDesc=حدد هنا الخيارات المتعلقة بالأمان حول تحميل الملفات. ErrorModuleRequirePHPVersion=خطأ ، هذا النموذج يتطلب نسخة بي إتش بي %s أو أعلى ErrorModuleRequireDolibarrVersion=خطأ ، هذا النموذج يتطلب نسخة دوليبار %s أو أعلى ErrorDecimalLargerThanAreForbidden=خطأ, برنامج دوليبار <b>%s</b> الحالي لا يدعم دقة أعلى من الحالية @@ -71,10 +73,10 @@ Dictionary=قواميس ErrorReservedTypeSystemSystemAuto=القيمة 'system' و 'systemauto' لهذا النوع محفوظ. يمكنك إستخدام 'user' كقيمة لإضافة السجل الخاص بك ErrorCodeCantContainZero=الكود لا يمكن أن يحتوي على القيمة 0 DisableJavascript=تعطيل عمليات الجافا و الأجاكس -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 +DisableJavascriptNote=ملاحظة: لغرض الاختبار أو التصحيح. لتحسين أداء الشخص المكفوف أو المتصفحات النصية ، قد تفضل استخدام الإعداد في ملف تعريف المستخدم UseSearchToSelectCompanyTooltip=أيضا إذا كان لديك عدد كبير من الأحزاب الثالثة (> 100 000)، يمكنك زيادة السرعة عن طريق وضع COMPANY_DONOTSEARCH_ANYWHERE ثابت إلى 1 في الإعداد، <أخرى. وبعد ذلك البحث أن يقتصر على بداية السلسلة. UseSearchToSelectContactTooltip=أيضا إذا كان لديك عدد كبير من الأحزاب الثالثة (> 100 000)، يمكنك زيادة السرعة عن طريق وضع CONTACT_DONOTSEARCH_ANYWHERE ثابت إلى 1 في الإعداد، <أخرى. وبعد ذلك البحث أن يقتصر على بداية السلسلة. -DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.<br>This may increase performance if you have a large number of third parties, but it is less convenient. +DelaiedFullListToSelectCompany=انتظر حتى يتم الضغط على مفتاح قبل تحميل محتوى قائمة التحرير والسرد الخاصة بالأطراف الثالثة ، <br> قد يؤدي ذلك إلى زيادة الأداء إذا كان لديك عدد كبير من الأطراف الثالثة ، ولكنه أقل ملاءمة. DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.<br>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 @@ -84,7 +86,7 @@ AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a JavascriptDisabled=الجافا سكربت معطل UsePreviewTabs=إستخدم زر المعاينة ShowPreview=آظهر المعاينة -ShowHideDetails=Show-Hide details +ShowHideDetails=عرض-إخفاء التفاصيل PreviewNotAvailable=المعاينة غير متاحة ThemeCurrentlyActive=الثيم النشط حالياً MySQLTimeZone=والوقت مسقل (قاعدة بيانات) @@ -97,7 +99,7 @@ Mask=القناع NextValue=القيمة التالية NextValueForInvoices=القيمة التالية (الفواتير) NextValueForCreditNotes=القيمة التالية (ملاحظات دائن) -NextValueForDeposit=Next value (down payment) +NextValueForDeposit=القيمة التالية (دفعة أولى) NextValueForReplacements=القيمة التالية (استبدال) MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to <b>%s</b> %s, irrespective of the value of this parameter NoMaxSizeByPHPLimit=ملاحظة : لم يتم وضح حد في إعدادات الـ PHP الخاص بك @@ -109,24 +111,24 @@ AntiVirusParam= المزيد من الصلاحيات بإستخدام command li AntiVirusParamExample=Example for ClamAv Daemon: --fdpass<br>Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=نموذج وحدة المحاسبة UserSetup=إعداد مستخدم الإدارة -MultiCurrencySetup=Multi-currency setup +MultiCurrencySetup=إعدادات تعدد العملات MenuLimits=الحدود و الدقة MenuIdParent=رمز القائمة العليا DetailMenuIdParent=رمز القائمة العليا (فراغ للقائمة العليا) DetailPosition=رتب الرقم لتعريف موقع القائمة AllMenus=الكل -NotConfigured=Module/Application not configured +NotConfigured=الوحدة النمطية | التطبيق غير مهيأ Active=نشطة SetupShort=الإعداد OtherOptions=الخيارات الأخرى -OtherSetup=Other Setup +OtherSetup=إعدادات آخرى CurrentValueSeparatorDecimal=الفاصلة العشرية CurrentValueSeparatorThousand=ألفاصلة الألفية Destination=المقصد -IdModule=ID حدة +IdModule=معرف الوحدة IdPermissions=ضوابط ID LanguageBrowserParameter=الوحدة %s -LocalisationDolibarrParameters=Localization parameters +LocalisationDolibarrParameters=عوامل محلية او مناطقية ClientTZ=المنطقة الزمنية للعميل (المستخدم) ClientHour=وقت العميل (المستخدم) OSTZ=OS المنطقة الزمنية الخادم @@ -134,27 +136,27 @@ PHPTZ=المنطقة الزمنية خادم PHP DaylingSavingTime=التوقيت الصيفي CurrentHour=PHP خادم ساعة CurrentSessionTimeOut=إنتها مدة التصفح الحالية -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. +YouCanEditPHPTZ=لتعيين منطقة زمنية مختلفة لـ PHP (غير مطلوب) ، يمكنك محاولة إضافة ملف .htaccess مع سطر مثل "SetEnv TZ Europe / Paris" +HoursOnThisPageAreOnServerTZ=تحذير ، على عكس الشاشات الأخرى ، فإن الساعات على هذه الصفحة ليست بتوقيتك المحلي ، ولكن حسب المنطقة الزمنية للخادم. Box=Widget Boxes=Widgets -MaxNbOfLinesForBoxes=Max. number of lines for widgets -AllWidgetsWereEnabled=All available widgets are enabled +MaxNbOfLinesForBoxes=الحد الأعلى لعدد الأسطر (widgets) +AllWidgetsWereEnabled=تم تمكين جميع (widgets)المتاحة PositionByDefault=الطلبية الإفتراضية Position=الوضع -MenusDesc=Menu managers set content of the two menu bars (horizontal and vertical). +MenusDesc=يقوم مديرو القائمة بتعيين محتوى شريطي القائمة (الأفقي والعمودي). MenusEditorDesc=The menu editor allows you to define custom menu entries. Use it carefully to avoid instability and permanently unreachable menu entries.<br>Some modules add menu entries (in menu <b>All</b> mostly). If you remove some of these entries by mistake, you can restore them disabling and reenabling the module. MenuForUsers=قائمة للمستخدمين LangFile=ملف لانج -Language_en_US_es_MX_etc=Language (en_US, es_MX, ...) +Language_en_US_es_MX_etc=اللغة (en_US، es_MX، ...) System=النظام SystemInfo=نظام المعلومات SystemToolsArea=منظقة أدوات نظام -SystemToolsAreaDesc=This area provides administration functions. Use the menu to choose the required feature. +SystemToolsAreaDesc=هذه المنطقة توفر مميزات إدارية. استخدام القائمة لاختيار الخصائص التي تبحث عنها. Purge=أحذف -PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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. +PurgeAreaDesc=تسمح لك هذه الصفحة بحذف كل الملفات التي بنيت أو تم تخزينها بواسطة دوليبار (الملفات المؤقتة ، أو كافة الملفات في المجلد <b>%s</b>) استخدام هذه الميزة ليست ضرورية. هذه الخدمة مقدمة للمستخدمين الذين يستخدمون برنامج دوليبار على خادم لا يوفر لهم صلاحيات حذف الملفات التي أنشئت من قبل خادم الويب. PurgeDeleteLogFile=Delete log files, including <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=إحذف الآن @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=على تفعيل ActiveOn=على تفعيلها +ActivatableOn=Activatable on SourceFile=ملف المصدر AvailableOnlyIfJavascriptAndAjaxNotDisabled=متاحا إلا إذا كان جافا سكريبت غير المعوقين Required=مطلوب @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=خادم التحديث متواجد حاليا WithCounter=Manage a counter -GenericMaskCodes=يمكنك إدخال أي قناع الترقيم. في هذا القناع ، وبعد ويمكن استخدام العلامات : <br> <b>(000000)</b> يطابق عدد الذي سيكون على كل يزداد ٪ s. كما تدخل العديد من أصفار على النحو المنشود طول المضادة. المضاد وسيتم الانتهاء من اصفار من اليسار من أجل الحصول على أكبر عدد اصفار كما القناع. <br> <b>000000 +000) (نفس</b> السابقة ولكن يقابل المقابلة لعدد للحق من علامة + يطبق اعتبارا من أول ٪ s. <br> <b>000000 @ (س)</b> نفس السابقة ولكن المضاد هو إعادة الصفر عندما يتم التوصل إلى الشهر خ خ ما بين 1 و 12). إذا كان هذا الخيار هو المستخدمة وس 2 أو أعلى ، ثم تسلسل (ذ ذ م م)) ((سنة أو ملم)) (مطلوب أيضا. <br> <b>(ب)</b> اليوم (01 الى 31). <br> <b>() ملم</b> في الشهر (01 الى 12). <br> <b>(كذا)</b> ، <b>(سنة))</b> أو <b>(ذ</b> السنة أكثر من 2 أو 4 أو 1 الأرقام. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=جميع الشخصيات الاخرى في قناع سوف تظل سليمة. <br> المساحات غير مسموح بها. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>ومثال على طرف ثالث على إنشاء 2007-03-01 :</u> <br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -533,14 +537,16 @@ Module22Name=Mass Emailings Module22Desc=Manage bulk emailing Module23Name=طاقة Module23Desc=مراقبة استهلاك الطاقة -Module25Name=Sales Orders +Module25Name=اوامر البيع 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=المحررين Module49Desc=المحررين إدارة Module50Name=المنتجات @@ -555,7 +561,7 @@ Module54Name=Contracts/Subscriptions Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcodes إدارة -Module56Name=Payment by credit transfer +Module56Name=الدفع عن طريق تحويل من الرصيد 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. @@ -639,13 +645,15 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP التحويلات Maxmind القدرات Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=شركة متعددة Module5000Desc=يسمح لك لإدارة الشركات المتعددة -Module6000Name=سير العمل -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) -Module10000Name=Websites +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) +Module10000Name=مواقع الويب 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. Module20000Name=Leave Request Management Module20000Desc=Define and track employee leave requests @@ -805,7 +813,8 @@ PermissionAdvanced253=إنشاء / تعديل المستخدمين خارجي / Permission254=حذف أو تعطيل المستخدمين الآخرين Permission255=إنشاء / تعديل بلده معلومات المستخدم Permission256=تعديل بنفسه كلمة المرور -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=قراءة في كاليفورنيا Permission272=قراءة الفواتير Permission273=قضية الفواتير @@ -1007,7 +1016,7 @@ DictionaryActions=Types of agenda events DictionarySocialContributions=Types of social or fiscal taxes DictionaryVAT=أسعار الضريبة على القيمة المضافة أو ضريبة المبيعات الاسعار DictionaryRevenueStamp=Amount of tax stamps -DictionaryPaymentConditions=Payment Terms +DictionaryPaymentConditions=شروط السداد DictionaryPaymentModes=Payment Modes DictionaryTypeContact=الاتصال / أنواع العناوين DictionaryTypeOfContainer=Website - Type of website pages/containers @@ -1116,7 +1125,7 @@ Host=الخادم DriverType=سائق نوع SummarySystem=نظام معلومات موجزة SummaryConst=قائمة بجميع Dolibarr الإعداد البارامترات -MenuCompanySetup=Company/Organization +MenuCompanySetup=الشركة | المؤسسة DefaultMenuManager= معيار مدير القائمة DefaultMenuSmartphoneManager=الهاتف الذكي القائمة مدير Skin=موضوع الجلد @@ -1132,7 +1141,7 @@ PermanentLeftSearchForm=دائم البحث عن شكل القائمة اليم DefaultLanguage=Default language EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu -CompanyInfo=Company/Organization +CompanyInfo=الشركة | المؤسسة CompanyIds=Company/Organization identities CompanyName=اسم CompanyAddress=عنوان @@ -1171,44 +1180,45 @@ Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done Delays_MAIN_DELAY_EXPENSEREPORTS=Expense report to approve Delays_MAIN_DELAY_HOLIDAYS=Leave requests to approve SetupDescription1=Before starting to use Dolibarr some initial parameters must be defined and modules enabled/configured. -SetupDescription2=The following two sections are mandatory (the two first entries in the Setup menu): -SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. -SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=مراجعة الحسابات الأحداث الأمنية +SetupDescription2=القسمان التاليان إلزاميان (المدخلان الأولان في قائمة الإعداد): +SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> تُستخدم المعطيات الأساسية لتخصيص السلوك الافتراضي لتطبيقك (على سبيل المثال للميزات المتعلقة بالبلد). +SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> هذا البرنامج عبارة عن مجموعة من العديد من الوحدات | التطبيقات. يجب تمكين وتكوين الوحدات النمطية التى تحتاجها. ستظهر فى القائمة بعد تمكين هذه الوحدات. +SetupDescription5=قائمة الإعدادات الأخرى تقوم بإدارة المعطيات الاختيارية. +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=المراجعة -InfoDolibarr=About Dolibarr -InfoBrowser=About Browser +InfoDolibarr=حول دوليبار +InfoBrowser=حول المتصفح InfoOS=About OS -InfoWebServer=About Web Server -InfoDatabase=About Database -InfoPHP=About PHP -InfoPerf=About Performances -InfoSecurity=About Security +InfoWebServer=حول خادم الويب +InfoDatabase=حول قاعدة البيانات +InfoPHP=حول PHP +InfoPerf=حول الأداء +InfoSecurity=حول الأمن BrowserName=اسم المتصفح BrowserOS=متصفح OS -ListOfSecurityEvents=قائمة الأحداث الأمنية Dolibarr -SecurityEventsPurged=تطهير الاحداث الامنية -LogEventDesc=Enable logging for specific security events. Administrators the log via menu <b>%s - %s</b>. Warning, this feature can generate a large amount of data in the database. -AreaForAdminOnly=Setup parameters can be set by <b>administrator users</b> only. -SystemInfoDesc=نظام المعلومات المتنوعة المعلومات التقنية تحصل في قراءة فقط وواضحة للمشرفين فقط. -SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. -CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. +ListOfSecurityEvents=قائمة الأحداث الأمنية لدوليبار +SecurityEventsPurged=تم إزالة الأحداث الأمنية +LogEventDesc=تمكين التسجيل لأحداث أمنية محددة. تسجيل المسؤولين عبر القائمة <b> %s - %s </b>. تحذير ، يمكن لهذه الميزة إنشاء كمية كبيرة من البيانات في قاعدة البيانات. +AreaForAdminOnly=يمكن تعيين معطيات الإعدادات بواسطة المستخدم المسؤول <b> </b> فقط. +SystemInfoDesc=معلومات النظام هي معلومات فنية متنوعة تحصل عليها في وضع القراءة فقط وتكون مرئية للمسؤولين فقط. +SystemAreaForAdminOnly=هذه المنطقة متاحة للمستخدمين المسؤولين فقط. لا يمكن لأذونات مستخدم دوليبار تغيير هذا التقييد. +CompanyFundationDesc=قم بتحرير معلومات شركتك | مؤسستك. ثم انقر فوق الزر "%s" في أسفل الصفحة عند الانتهاء. AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. AvailableModules=Available app/modules -ToActivateModule=لتفعيل وحدات ، على الإعداد منطقة الصفحة الرئيسية&gt; الإعداد -> الوحدات). -SessionTimeOut=للمرة الخمسين +ToActivateModule=لتنشيط الوحدات ، انتقل إلى منطقة الإعدادات (الصفحة الرئيسية-> الإعدادات-> الوحدات النمطية). +SessionTimeOut=نفذ وقت الجلسة SessionExplanation=This number guarantees that the session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guarantee that the session will expire after this delay. It will expire, after this delay, and when the session cleaner is run, so every <b>%s/%s</b> access, but only during access made by other sessions (if value is 0, it means clearing of session is done only by an external process).<br>Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by an external setup, no matter what the value entered here is. SessionsPurgedByExternalSystem=Sessions on this server seems to be cleaned by an external mechanism (cron under debian, ubuntu ...), probably every <b>%s</b> seconds (= value of parameter <b>session.gc_maxlifetime</b>), so changing the value here has no effect. You must ask the server administrator to change session delay. TriggersAvailable=محفزات متاحة TriggersDesc=Triggers are files that will modify the behavior of Dolibarr workflow once copied into the directory <b>htdocs/core/triggers</b>. They realize new actions, activated on Dolibarr events (new company creation, invoice validation, ...). -TriggerDisabledByName=يطلق في هذا الملف من قبل المعوقين لاحقة بين <b>NORUN</b> باسمهم. -TriggerDisabledAsModuleDisabled=يتسبب في تعطيل هذه الصورة هي وحدة قياسية <b>٪ ق</b> معوقا. -TriggerAlwaysActive=يطلق في هذا الملف هي حركة دائمة ، وتفعيل ما هي وحدات Dolibarr. -TriggerActiveAsModuleActive=يطلق في هذا الملف كما ينشط حدة تمكين <b>٪ ق.</b> -GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. +TriggerDisabledByName=يتم تعطيل المشغلات الموجودة في هذا الملف بواسطة اللاحقة <b> -NORUN </b> في أسمائها. +TriggerDisabledAsModuleDisabled=المشغلات في هذا الملف معطلة لأن الوحدة النمطية <b> %s </b> معطلة. +TriggerAlwaysActive=المشغلات في هذا الملف نشطة دائمًا ، مهما كانت وحدات دوليبار النشطة. +TriggerActiveAsModuleActive=المشغلات في هذا الملف نشطة حيث تم تمكين الوحدة النمطية <b> %s </b>. +GeneratedPasswordDesc=اختر الطريقة التي سيتم استخدامها لكلمات المرور التي يتم إنشاؤها تلقائيًا. DictionaryDesc=Insert all reference data. You can add your values to the default. ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. MiscellaneousDesc=All other security related parameters are defined here. @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=يجب تشغيل هذا الأمر من سطر الأوامر بعد تسجيل الدخول إلى قذيفة مع <b>المستخدم %s </b> أو يجب عليك إضافة خيار -w في نهاية سطر الأوامر <b>لتوفير %s </b> كلمة المرور. YourPHPDoesNotHaveSSLSupport=وظائف خدمة تصميم المواقع لا تتوفر في بي الخاص بك DownloadMoreSkins=مزيد من جلود بتحميل -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=ترجمة جزئية @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=تكميلية سمات ExtraFieldsLines=سمات التكميلية (خطوط) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1374,7 +1384,7 @@ SuggestPaymentByChequeToAddress=Suggest payment by check to FreeLegalTextOnInvoices=نص حر على الفواتير WatermarkOnDraftInvoices=العلامة المائية على مشروع الفواتير (أي إذا فارغ) PaymentsNumberingModule=المدفوعات نموذج الترقيم -SuppliersPayment=Vendor payments +SuppliersPayment=مدفوعات الموردين SupplierPaymentSetup=Vendor payments setup ##### Proposals ##### PropalSetup=وحدة إعداد مقترحات تجارية @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=ادخل (يونكس) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=البحث عن مرشح LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=ادخل (سامبا ، activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=الاسم الكامل @@ -1546,7 +1557,7 @@ LDAPFieldCompanyExample=Example: o LDAPFieldSid=سيد LDAPFieldSidExample=Example: objectsid LDAPFieldEndLastSubscription=تاريخ انتهاء الاكتتاب -LDAPFieldTitle=Job position +LDAPFieldTitle=الوظيفه LDAPFieldTitleExample=مثال: اللقب LDAPFieldGroupid=Group id LDAPFieldGroupidExample=Exemple : gidnumber @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=حساب بيع. رمز AccountancyCodeBuy=شراء الحساب. رمز +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=جدول الأعمال وحدة الإعداد PasswordTogetVCalExport=مفتاح ربط تصدير تأذن +SecurityKey = Security Key PastDelayVCalExport=لا تصدر الحدث الأكبر من AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=لون الخلفية لخطوط الجدول غري BackgroundTableLineEvenColor=لون الخلفية حتى خطوط الجدول MinimumNoticePeriod=الحد الأدنى لمدة إشعار (يجب أن يتم طلب إجازة قبل هذا التأخير) NbAddedAutomatically=عدد الأيام تضاف إلى العدادات من المستخدمين (تلقائيا) كل شهر -EnterAnyCode=يحتوي هذا الحقل على إشارة لتحديد الخط. أدخل أي قيمة من اختيارك، ولكن من دون أحرف خاصة. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1902,20 +1915,20 @@ ExpectedSize=Expected size CurrentSize=Current size ForcedConstants=Required constant values MailToSendProposal=مقترحات العملاء -MailToSendOrder=Sales orders +MailToSendOrder=اوامر المبيعات MailToSendInvoice=فواتير العملاء MailToSendShipment=شحنات MailToSendIntervention=التدخلات MailToSendSupplierRequestForQuotation=Quotation request -MailToSendSupplierOrder=Purchase orders -MailToSendSupplierInvoice=Vendor invoices +MailToSendSupplierOrder=اوامر الشراء +MailToSendSupplierInvoice=فواتير الموردين MailToSendContract=عقود MailToSendReception=Receptions MailToThirdparty=أطراف ثالثة MailToMember=أعضاء MailToUser=المستخدمين MailToProject=مشاريع -MailToTicket=Tickets +MailToTicket=تذاكر ByDefaultInList=تظهر بشكل افتراضي على عرض القائمة YouUseLastStableVersion=You use the latest stable version TitleExampleForMajorRelease=مثال على رسالة يمكنك استخدامها ليعلن هذا الإصدار الرئيسي (لا تتردد في استخدامها على مواقع الويب الخاص بك) @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ar_SA/banks.lang b/htdocs/langs/ar_SA/banks.lang index 93d286a4a27..dec71e2691c 100644 --- a/htdocs/langs/ar_SA/banks.lang +++ b/htdocs/langs/ar_SA/banks.lang @@ -1,22 +1,22 @@ # Dolibarr language file - Source file is en_US - banks Bank=البنك -MenuBankCash=Banks | Cash +MenuBankCash=البنوك | النقد MenuVariousPayment=مدفوعات متنوعة MenuNewVariousPayment=مدفوعات متنوعة جديدة BankName=اسم المصرف FinancialAccount=الحساب BankAccount=الحساب المصرفي BankAccounts=الحسابات المصرفية -BankAccountsAndGateways=Bank accounts | Gateways +BankAccountsAndGateways=حسابات بنكية | بوابات ShowAccount=عرض الحساب AccountRef=مرجع الحساب المالي -AccountLabel=بطاقة الحساب المالي +AccountLabel=تسمية الحساب المالي CashAccount=الحساب النقدي CashAccounts=حسابات نقدية CurrentAccounts=الحسابات الجارية SavingAccounts=حسابات التوفير -ErrorBankLabelAlreadyExists=بطاقة الحساب المالي موجوده بالفعل -BankBalance=التوازن +ErrorBankLabelAlreadyExists=اسم الحساب المالي موجود بالفعل +BankBalance=الميزانية BankBalanceBefore=الرصيد قبل BankBalanceAfter=الرصيد بعد BalanceMinimalAllowed=الحد الأدنى المسموح من الرصيد @@ -24,32 +24,32 @@ BalanceMinimalDesired=الحد الأدنى المطلوب من الرصيد InitialBankBalance=الرصيد الأولي EndBankBalance=الرصيد النهائي CurrentBalance=الرصيد الحالي -FutureBalance=التوازن في المستقبل +FutureBalance=الميزانية المستقبلة ShowAllTimeBalance=عرض الرصيد من البداية AllTime=من البداية Reconciliation=التسوية RIB=رقم الحساب المصرفي -IBAN=عدد إيبان -BIC=BIC/SWIFT code +IBAN=رقم الآيبان +BIC=رمز BIC / SWIFT SwiftValid=بيك / سويفت صالحة SwiftVNotalid=بيك / سويفت غير صالح IbanValid=بان صالحة IbanNotValid=بان غير صالح -StandingOrders=Direct debit orders +StandingOrders=أوامر الخصم المباشر StandingOrder=أمر الخصم المباشر -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByDirectDebit=الدفع عن طريق الخصم المباشر +PaymentByBankTransfers=المدفوعات عن طريق تحويل الائتمان +PaymentByBankTransfer=الدفع عن طريق تحويل من الرصيد AccountStatement=كشف الحساب AccountStatementShort=بيان AccountStatements=كشوفات الحساب LastAccountStatements=كشوفات الحساب الأخيرة IOMonthlyReporting=تقارير شهرية -BankAccountDomiciliation=Bank address -BankAccountCountry=بلد حساب +BankAccountDomiciliation=عنوان البنك +BankAccountCountry=بلد الحساب BankAccountOwner=اسم صاحب الحساب -BankAccountOwnerAddress=عنوان مالك الحساب -RIBControlError=Integrity check of values failed. This means the information for this account number is not complete or is incorrect (check country, numbers and IBAN). +BankAccountOwnerAddress=عنوان صاحب الحساب +RIBControlError=فشل التحقق من سلامة القيم. هذا يعني أن المعلومات الخاصة برقم الحساب هذا ليست كاملة أو غير صحيحة (تحقق من الدولة والأرقام و IBAN). CreateAccount=إنشاء حساب NewBankAccount=حساب جديد NewFinancialAccount=حساب مالي جديد @@ -57,7 +57,7 @@ MenuNewFinancialAccount=حساب مالي جديد EditFinancialAccount=تعديل الحساب LabelBankCashAccount=بطاقة مصرفية أو نقدية AccountType=نوع الحساب -BankType0=حساب توفير +BankType0=حساب التوفير BankType1=الحساب الجاري او حساب بطاقة الائتمان BankType2=الحساب النقدي AccountsArea=منطقة الحسابات @@ -76,11 +76,11 @@ BankTransaction=قيد بنكي ListTransactions=قائمة القيود ListTransactionsByCategory=قائمةالقيود/الفئات TransactionsToConciliate=قيود للتسويات -TransactionsToConciliateShort=To reconcile +TransactionsToConciliateShort=للتسوية Conciliable=يمكن أن يتم تسويتة Conciliate=التسوية Conciliation=تسوية -SaveStatementOnly=Save statement only +SaveStatementOnly=حفظ البيان فقط ReconciliationLate=التسوية في وقت متأخر IncludeClosedAccount=وتشمل حسابات مغلقة OnlyOpenedAccount=الحسابات المفتوحة فقط @@ -98,18 +98,18 @@ AddBankRecordLong=إضافة قيد يدوي Conciliated=تمت تسويتة ConciliatedBy=تمت التسوية بواسطة DateConciliating=تاريخ التسوية -BankLineConciliated=Entry reconciled with bank receipt +BankLineConciliated=تمت تسوية القيدمع إيصال البنك Reconciled=تمت تسويتة NotReconciled=لم يتم تسويتة CustomerInvoicePayment=مدفوعات العميل -SupplierInvoicePayment=Vendor payment +SupplierInvoicePayment=دفعة المورد SubscriptionPayment=دفع الاشتراك -WithdrawalPayment=Debit payment order +WithdrawalPayment=أمر دفع مدين SocialContributionPayment=مدفوعات الضرائب الاجتماعية / المالية -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=تحويل الرصيد +BankTransfers=تحويلات الرصيد MenuBankInternalTransfer=حوالة داخلية -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) +TransferDesc=التحويل من حساب إلى آخر ، ستكتب Dolibarr سجلين (خصم في حساب المصدر وائتمان في الحساب الهدف). سيتم استخدام نفس المبلغ (باستثناء العلامة) والملصق والتاريخ لهذه المعاملة) TransferFrom=من TransferTo=إلى TransferFromToDone=التحويل من <b>%s</b>إلى <b>%s</b>من <b>%s</b>%s قد تم تسجيلة. @@ -122,7 +122,7 @@ BankChecks=الشيكات المصرفية BankChecksToReceipt=شيكات في انتظار الإيداع BankChecksToReceiptShort=شيكات في انتظار الإيداع ShowCheckReceipt=عرض إيصال إيداع شيكات -NumberOfCheques=No. of check +NumberOfCheques=رقم الشيك DeleteTransaction=حذف المعاملة ConfirmDeleteTransaction=هل تريد بالتأكيد حذف هذه المعاملة؟ ThisWillAlsoDeleteBankRecord=سيؤدي هذا أيضا إلى حذف القيد البنكي الذي تم إنشاؤه @@ -138,11 +138,11 @@ PaymentDateUpdateSucceeded=تم تحديث تاريخ الدفع بنجاح PaymentDateUpdateFailed=تعذر تحديث تاريخ الدفع Transactions=المعاملات BankTransactionLine=قيد البنك -AllAccounts=All bank and cash accounts +AllAccounts=جميع الحسابات المصرفية والنقدية BackToAccount=عودة إلى الحساب ShowAllAccounts=عرض لجميع الحسابات -FutureTransaction=Future transaction. Unable to reconcile. -SelectChequeTransactionAndGenerate=Select/filter checks to include in the check deposit receipt and click on "Create". +FutureTransaction=الصفقة المستقبلية. غير قادر على التسوية. +SelectChequeTransactionAndGenerate=حدد / تصفية الشيكات لتضمينها في إيصال إيداع الشيك وانقر على "إنشاء". InputReceiptNumber=اختيار كشف الحساب البنكي ذات الصلة مع التسوية. استخدام قيمة رقمية للفرز: شهر سنة أو يوم شهر سنة EventualyAddCategory=في نهاية المطاف، حدد الفئة التي لتصنيف السجلات ToConciliate=للتسوية؟ @@ -157,27 +157,28 @@ RejectCheck=تم إرجاع الشيك ConfirmRejectCheck=هل انت متأكد انك تريد وضع علامة على هذا الشيك على أنه مرفوض؟ RejectCheckDate=تاريخ إرجاع الشيك CheckRejected=تم إرجاع الشيك -CheckRejectedAndInvoicesReopened=Check returned and invoices re-open +CheckRejectedAndInvoicesReopened=تم إرجاع الشيكات وإعادة فتح الفواتير BankAccountModelModule=نماذج مستندات للحسابات البنكية DocumentModelSepaMandate=Template of SEPA mandate. Useful for European countries in EEC only. DocumentModelBan=نموذج لطباعة صفحة تحتوي على معلومات BAN . -NewVariousPayment=New miscellaneous payment -VariousPayment=Miscellaneous payment +NewVariousPayment=دفعة متنوعة جديدة +VariousPayment=مدفوعات متنوعة VariousPayments=مدفوعات متنوعة -ShowVariousPayment=Show miscellaneous payment -AddVariousPayment=Add miscellaneous payment -VariousPaymentId=Miscellaneous payment ID -VariousPaymentLabel=Miscellaneous payment label -ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment +ShowVariousPayment=عرض المدفوعات المتنوعة +AddVariousPayment=إضافة مدفوعات متنوعة +VariousPaymentId=معرف الدفع المتنوع +VariousPaymentLabel=تسمية الدفعة المتنوعة +ConfirmCloneVariousPayment=تأكيد استنساخ دفعة متنوعة SEPAMandate=SEPA mandate YourSEPAMandate=تفويض سيبا الخاص بك 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 -AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation -CashControl=POS cash desk control -NewCashFence=New cash desk closing -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 -IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. -NoBankAccountDefined=No bank account defined +AutoReportLastAccountStatement=قم تلقائيًا بتعبئة الحقل "رقم كشف الحساب البنكي" برقم كشف الحساب الأخير عند إجراء التسوية +CashControl=مراقبة مكتب النقدية في نقاط البيع +NewCashFence=New cash desk opening or closing +BankColorizeMovement=تلوين الحركات +BankColorizeMovementDesc=إذا تم تمكين هذه الوظيفة ، يمكنك اختيار لون خلفية محدد لحركات الخصم أو الائتمان +BankColorizeMovementName1=لون الخلفية لحركة الخصم +BankColorizeMovementName2=لون الخلفية لحركة الائتمان +IfYouDontReconcileDisableProperty=إذا لم تقم بإجراء التسويات البنكية على بعض الحسابات المصرفية ، فقم بتعطيل الخاصية "%s" عليها لإزالة هذا التحذير. +NoBankAccountDefined=لم يتم تحديد حساب مصرفي +NoRecordFoundIBankcAccount=لا يوجد سجل في الحساب المصرفي. عادةً ما يحدث هذا عندما يتم حذف سجل يدويًا من قائمة المعاملات في الحساب المصرفي (على سبيل المثال أثناء تسوية الحساب المصرفي). سبب آخر هو أنه تم تسجيل الدفعة عندما تم تعطيل الوحدة النمطية "%s". diff --git a/htdocs/langs/ar_SA/bills.lang b/htdocs/langs/ar_SA/bills.lang index 9fdbdeaf15f..a82852b2eaa 100644 --- a/htdocs/langs/ar_SA/bills.lang +++ b/htdocs/langs/ar_SA/bills.lang @@ -3,16 +3,16 @@ Bill=فاتورة Bills=فواتير BillsCustomers=فواتير العملاء BillsCustomer=فاتورة العميل -BillsSuppliers=Vendor invoices -BillsCustomersUnpaid=فواتير العملاء غير المدفوعة -BillsCustomersUnpaidForCompany=فواتير العملاء غير المدفوعة ل %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s +BillsSuppliers=فواتير الموردين +BillsCustomersUnpaid=فواتير العميل غير المسددة +BillsCustomersUnpaidForCompany=فواتير العميل الغير مسددة لـ %s +BillsSuppliersUnpaid=فواتير المورد الغير مسددة +BillsSuppliersUnpaidForCompany=فواتير المورد الغير مسددة لـ %s BillsLate=المدفوعات المتأخرة BillsStatistics=إحصاءات فواتير العملاء -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. +BillsStatisticsSuppliers=إحصاءات فواتير الموردين +DisabledBecauseDispatchedInBookkeeping=معطل لأنه تم إرسال الفاتورة إلى مسك الدفاتر +DisabledBecauseNotLastInvoice=معطل لأن الفاتورة غير قابلة للحذف. لقد تم تسجيل فواتير بعد هذه الفاتورة وسوف يؤدي ذلك إلى وجود ثقب في نظام العد. DisabledBecauseNotErasable=معطل لأنه لا يمكن محوه InvoiceStandard=الفاتورة القياسية InvoiceStandardAsk=الفاتورة القياسية @@ -22,16 +22,16 @@ InvoiceDepositAsk=فاتورة الدفعة الأولى InvoiceDepositDesc=يتم هذا النوع من الفاتورة عند استلام دفعة أولى. InvoiceProForma=الفاتورة الأولية InvoiceProFormaAsk=الفاتورة الأولية -InvoiceProFormaDesc=<b> الفاتورة المبدئية </b> عبارة عن صورة فاتورة حقيقية ولكنها لا تحتوي على قيمة للمحاسبة. +InvoiceProFormaDesc=<b> الفاتورة المبدئية </b> عبارة عن صورة فاتورة حقيقية ولكنها لا تحتوي على قيمة محاسبية. InvoiceReplacement=استبدال الفاتورة InvoiceReplacementAsk=فاتورة استبدال الفاتورة -InvoiceReplacementDesc=<b>Replacement invoice</b> is used to completely replace an invoice with no payment already received.<br><br>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= <b> فاتورة الاستبدال </b> تُستخدم لاستبدال فاتورة بالكامل بدون دفعة مستلمة بالفعل. <br> <br> ملاحظة: يمكن فقط استبدال الفواتير التي لم يتم سدادها. إذا لم يتم إغلاق الفاتورة التي قمت باستبدالها بعد ، فسيتم إغلاقها تلقائيًا لتصبح "مهجورة". InvoiceAvoir=ملاحظة ائتمانية InvoiceAvoirAsk=ملاحظة ائتمانية لتصحيح الفاتورة -InvoiceAvoirDesc=The <b>credit note</b> 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=إنشاء الائتمان ملاحظة مع خطوط من الفاتورة الأصلية -invoiceAvoirWithPaymentRestAmount=إنشاء الائتمان ملاحظة مع المتبقية غير المسددة من الفاتورة الأصلية -invoiceAvoirLineWithPaymentRestAmount=ملاحظة الائتمان للبقاء المبلغ غير المدفوع +InvoiceAvoirDesc=<b>ملاحظة الائتمان</b> عبارة عن فاتورة سلبية تُستخدم لتصحيح حقيقة أن الفاتورة تُظهر مبلغًا يختلف عن المبلغ المدفوع بالفعل (على سبيل المثال ، دفع العميل كثيرًا عن طريق الخطأ ، أو لم يدفع المبلغ بالكامل منذ إرجاع بعض المنتجات) . +invoiceAvoirWithLines=إنشاء اشعار دائن مع بنود من فاتورة الأصل +invoiceAvoirWithPaymentRestAmount=إنشاء اشعار دائن مع المبلغ الغير مسدد من الفاتورة الأصلية +invoiceAvoirLineWithPaymentRestAmount=اشعار دائن للمبلغ الغير مسدد ReplaceInvoice=استبدل الفاتورة %s ReplacementInvoice=استبدال الفاتورة ReplacedByInvoice=تم استبدالها بالفاتورة %s @@ -41,9 +41,9 @@ CorrectionInvoice=تصحيح الفاتورة UsedByInvoice=تستخدم لدفع فاتورة %s ConsumedBy=يستهلكها NotConsumed=لا تستهلك -NoReplacableInvoice=No replaceable invoices +NoReplacableInvoice=لا يوجد فواتير قابلة للاستبدال NoInvoiceToCorrect=لا توجد فاتورة للتصحيح -InvoiceHasAvoir=كان مصدر لواحد أو عدة ملاحظات ائتمانيه +InvoiceHasAvoir=كان مصدر لواحد أو عدة اشعارات بدائن CardBill=بطاقة الفاتورة PredefinedInvoices=فواتير محددة مسبقا Invoice=فاتورة @@ -53,162 +53,165 @@ InvoiceLine=سطر الفاتورة InvoiceCustomer=فاتورة العميل CustomerInvoice=فاتورة العميل CustomersInvoices=فواتير العملاء -SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices -SupplierBill=Vendor invoice -SupplierBills=فواتير الموردين +SupplierInvoice=فاتورة مورد +SuppliersInvoices=فواتير الموردين +SupplierInvoiceLines=Vendor invoice lines +SupplierBill=فاتورة مورد +SupplierBills=فواتير الموردين Payment=دفعة -PaymentBack=رد -CustomerInvoicePaymentBack=رد +PaymentBack=استرداد +CustomerInvoicePaymentBack=استرداد Payments=المدفوعات -PaymentsBack=Refunds -paymentInInvoiceCurrency=in invoices currency -PaidBack=تسديدها +PaymentsBack=المبالغ المستردة +paymentInInvoiceCurrency=بعملة الفواتير +PaidBack=سدد الدين DeletePayment=حذف الدفعة ConfirmDeletePayment=هل انت متأكد انك ترغب في حذف هذه الدفعة؟ -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 +ConfirmConvertToReduc=هل تريد تحويل هذا %s إلى رصيد متاح؟ +ConfirmConvertToReduc2=سيتم حفظ المبلغ بين جميع الخصومات ويمكن استخدامه كخصم لفاتورة حالية أو مستقبلية لهذا العميل. +ConfirmConvertToReducSupplier=هل تريد تحويل هذا %s إلى رصيد متاح؟ +ConfirmConvertToReducSupplier2=سيتم حفظ المبلغ بين جميع الخصومات ويمكن استخدامه كخصم لفاتورة حالية أو مستقبلية لهذا البائع. +SupplierPayments=مدفوعات الموردين ReceivedPayments=المدفوعات المستلمة ReceivedCustomersPayments=المدفوعات المستلمة من العملاء -PayedSuppliersPayments=Payments paid to vendors +PayedSuppliersPayments=المدفوعات المدفوعة للموردين ReceivedCustomersPaymentsToValid=تلقى مدفوعات عملاء للمصادقة PaymentsReportsForYear=تقارير المدفوعات لل%s PaymentsReports=تقارير المدفوعات PaymentsAlreadyDone=المدفوعات قد فعلت -PaymentsBackAlreadyDone=Refunds already done -PaymentRule=دفع الحكم -PaymentMode=Payment Type -PaymentTypeDC=Debit/Credit Card +PaymentsBackAlreadyDone=تم رد الأموال +PaymentRule=قاعدة الدفع +PaymentMode=طريفة الدفع +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account +PaymentTypeDC=بطاقة الخصم / الائتمان 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 -PaymentAmount=دفع مبلغ -PaymentHigherThanReminderToPay=دفع أعلى من دفع تذكرة -HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <br> 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. <br> Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. +IdPaymentMode=معرف نوع السداد +CodePaymentMode=كود نوع السداد +LabelPaymentMode=اسم نوع السداد +PaymentModeShort=طريفة السداد +PaymentTerm=شروط السداد +PaymentConditions=شروط السداد +PaymentConditionsShort=شروط السداد +PaymentAmount=مبلغ السداد +PaymentHigherThanReminderToPay=الدفعة اعلى من الواجب سداده +HelpPaymentHigherThanReminderToPay=انتبه ، مبلغ دفع فاتورة أو أكثر أعلى من المبلغ المستحق. <br> قم بتحرير المبلغ المدخل ، وإلا قم بالتأكيد وتذكر لإنشاء إشعار دائن للزيادة المستلمة لكل فاتورة زائدة. +HelpPaymentHigherThanReminderToPaySupplier=انتبه ، مبلغ دفع فاتورة أو أكثر أعلى من المبلغ المستحق. <br> قم بتحرير المبلغ المدخل ، وإلا قم بالتأكيد وتذكر لإنشاء إشعار دائن للزيادة المستلمة لكل فاتورة زائدة. ClassifyPaid=تصنيف 'مدفوع' -ClassifyUnPaid=Classify 'Unpaid' +ClassifyUnPaid=تصنيف "غير مسدد" ClassifyPaidPartially=تصنيف 'مدفوع جزئيا' -ClassifyCanceled=تصنيف 'المهجورة' +ClassifyCanceled=تصنيف 'مهجور' ClassifyClosed=تصنيف 'مغلقة' ClassifyUnBilled=تصنيف "فواتير" CreateBill=إنشاء الفاتورة -CreateCreditNote=إنشاء ملاحظة الائتمان -AddBill=إنشاء فاتورة أو الائتمان المذكرة +CreateCreditNote=إنشاء اشعار دائن +AddBill=إنشاء فاتورة أو اشعار دائن AddToDraftInvoices=إضافة إلى مسودة الفاتورة -DeleteBill=شطب فاتورة -SearchACustomerInvoice=البحث عن زبون فاتورة -SearchASupplierInvoice=Search for a vendor invoice -CancelBill=شطب فاتورة -SendRemindByMail=إرسال تذكرة عن طريق البريد الإلكتروني -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=دخول الدفع الواردة من العملاء -EnterPaymentDueToCustomer=من المقرر أن يسدد العميل -DisabledBecauseRemainderToPayIsZero=تعطيل بسبب المتبقية غير المدفوعة صفر +DeleteBill=حذف الفاتورة +SearchACustomerInvoice=ابحث عن فاتورة العميل +SearchASupplierInvoice=ابحث عن فاتورة مورد +CancelBill=إلغاء فاتورة +SendRemindByMail=إرسال تذكير عن طريق البريد الإلكتروني +DoPayment=أدخل الدفعة +DoPaymentBack=أدخل المبلغ المسترد +ConvertToReduc=يعتبر كائتمان متاح +ConvertExcessReceivedToReduc=تحويل الفائض المستلم إلى رصيد متاح +ConvertExcessPaidToReduc=تحويل الفائض المستلم إلى خصم متاح +EnterPaymentReceivedFromCustomer=أدخل الدفعة المستلمة من العميل +EnterPaymentDueToCustomer=انشاء استحقاق دفع للعميل +DisabledBecauseRemainderToPayIsZero=معطل لأن المتبقي غير المسدد يساوي صفر PriceBase=سعر الأساس BillStatus=حالة الفاتورة -StatusOfGeneratedInvoices=Status of generated invoices -BillStatusDraft=مشروع (لا بد من التحقق من صحة) -BillStatusPaid=دفع -BillStatusPaidBackOrConverted=Credit note refund or marked as credit available -BillStatusConverted=Paid (ready for consumption in final invoice) +StatusOfGeneratedInvoices=حالة الفواتير المنشأة +BillStatusDraft=مسودة (يجب التحقق من صحتها) +BillStatusPaid=سدد +BillStatusPaidBackOrConverted=استرداد إشعار الائتمان أو وضع علامة على أنه رصيد متاح +BillStatusConverted=مدفوعة (جاهزة للاستخدام في الفاتورة النهائية) BillStatusCanceled=المهجورة -BillStatusValidated=مصادق عليه (لا بد من دفعها) +BillStatusValidated=معتمد (واجب السداد) BillStatusStarted=بدأت -BillStatusNotPaid=لم تدفع -BillStatusNotRefunded=Not refunded -BillStatusClosedUnpaid=مغلقة (غير مدفوعة الأجر) -BillStatusClosedPaidPartially=دفعت (جزئيا) +BillStatusNotPaid=غير مسدد +BillStatusNotRefunded=لم تسترجع +BillStatusClosedUnpaid=مغلقة (غير مسدد) +BillStatusClosedPaidPartially=مسدد (جزئيا) BillShortStatusDraft=مسودة -BillShortStatusPaid=دفع -BillShortStatusPaidBackOrConverted=Refunded or converted -Refunded=Refunded -BillShortStatusConverted=دفع +BillShortStatusPaid=سدد +BillShortStatusPaidBackOrConverted=مسترجع او محول +Refunded=مسترجع +BillShortStatusConverted=سدد BillShortStatusCanceled=المهجورة -BillShortStatusValidated=صادق +BillShortStatusValidated=معتمد BillShortStatusStarted=بدأت -BillShortStatusNotPaid=لم تدفع -BillShortStatusNotRefunded=Not refunded +BillShortStatusNotPaid=لم تسدد +BillShortStatusNotRefunded=لم تسترجع BillShortStatusClosedUnpaid=مغلقة BillShortStatusClosedPaidPartially=دفعت (جزئيا) PaymentStatusToValidShort=للمصادقة -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=فاتورة %s لا يوجد -ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. -ErrorDiscountAlreadyUsed=خطأ الخصم المستخدمة بالفعل -ErrorInvoiceAvoirMustBeNegative=خطأ ، والصحيح يجب أن يكون للفاتورة بمبلغ سلبي -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) -ErrorCantCancelIfReplacementInvoiceNotValidated=خطأ ، لا يمكن إلغاء الفاتورة التي حلت محلها اخرى الفاتورة التي لا تزال في حالة مشروع -ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. -BillFrom=من -BillTo=مشروع قانون ل -ActionsOnBill=الإجراءات على فاتورة -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 +ErrorVATIntraNotConfigured=لم يتم تحديد رقم ضريبة القيمة المضافة بعد +ErrorNoPaiementModeConfigured=لم يتم تحديد نوع الدفع الافتراضي. انتقل إلى إعداد وحدة الفاتورة لإصلاح ذلك. +ErrorCreateBankAccount=قم بإنشاء حساب مصرفي ، ثم انتقل إلى لوحة الإعداد الخاصة بوحدة الفاتورة لتحديد أنواع السداد +ErrorBillNotFound=الفاتورة %s غير موجودة +ErrorInvoiceAlreadyReplaced=خطأ ، لقد حاولت اعتماد فاتورة لاستبدال الفاتورة %s. ولكن تم بالفعل استبدال هذه الفاتورة %s. +ErrorDiscountAlreadyUsed=خطأ ، الخصم تم استخدامه +ErrorInvoiceAvoirMustBeNegative=خطأ ، يجب أن يكون للفاتورة الصحيحة مبلغ سلبي +ErrorInvoiceOfThisTypeMustBePositive=خطأ ، يجب أن يحتوي هذا النوع من الفاتورة على مبلغ لا يشمل الضريبة موجبًا (أو فارغًا) +ErrorCantCancelIfReplacementInvoiceNotValidated=خطأ ، لا يمكن إلغاء فاتورة تم استبدالها بفاتورة أخرى لا تزال في حالة المسودة +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=تم استخدام هذا الجزء أو آخر لذا لا يمكن إزالة سلسلة الخصم. +BillFrom=من: +BillTo=فاتورة الى: +ActionsOnBill=الإجراءات على الفاتورة +RecurringInvoiceTemplate=نموذج او فاتورة متكررة +NoQualifiedRecurringInvoiceTemplateFound=لا يوجد نموذج فاتورة متكرر مؤهل للإنشاء. +FoundXQualifiedRecurringInvoiceTemplate=تم العثور على %s نموذج فاتورة (فواتير) متكررة مؤهلة للإنشاء. +NotARecurringInvoiceTemplate=ليست فاتورة نموذجية متكررة NewBill=فاتورة جديدة -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 +LastBills=أحدث %s فواتير +LatestTemplateInvoices=أحدث %s قالب فواتير +LatestCustomerTemplateInvoices=أحدث %s قالب فواتير العميل +LatestSupplierTemplateInvoices=أحدث %s قالب فواتير مورد +LastCustomersBills=أحدث %s فواتير العملاء +LastSuppliersBills=أحدث %s فواتير الموردين AllBills=جميع الفواتير -AllCustomerTemplateInvoices=All template invoices -OtherBills=غيرها من الفواتير -DraftBills=مشروع الفواتير -CustomersDraftInvoices=Customer draft invoices -SuppliersDraftInvoices=Vendor draft invoices -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 <b>%s</b>? -ConfirmUnvalidateBill=Are you sure you want to change invoice <b>%s</b> to draft status? -ConfirmClassifyPaidBill=Are you sure you want to change invoice <b>%s</b> to status paid? -ConfirmCancelBill=Are you sure you want to cancel invoice <b>%s</b>? -ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'? -ConfirmClassifyPaidPartially=Are you sure you want to change invoice <b>%s</b> to status paid? -ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? -ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I regularize the VAT with a credit note. -ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. -ConfirmClassifyPaidPartiallyReasonDiscountNoVat=تبقى بدون أجر <b>(%s%s) هو</b> الخصم الممنوح لأنه تم السداد قبل الأجل. أنا أقبل أن تفقد ضريبة القيمة المضافة على هذا الخصم. -ConfirmClassifyPaidPartiallyReasonDiscountVat=تبقى بدون أجر <b>(%s%s) هو</b> الخصم الممنوح لأنه تم السداد قبل الأجل. I استرداد ضريبة القيمة المضافة على هذا الخصم دون مذكرة الائتمان. -ConfirmClassifyPaidPartiallyReasonBadCustomer=العملاء سيئة -ConfirmClassifyPaidPartiallyReasonProductReturned=المنتجات عاد جزئيا +AllCustomerTemplateInvoices=جميع قالب الفواتير +OtherBills=فواتير اخرى +DraftBills=مسودة فواتير +CustomersDraftInvoices=مسودة فواتير العميل +SuppliersDraftInvoices=مسودة فواتير المورد +Unpaid=غير مسدد +ErrorNoPaymentDefined=خطأ لم يتم تعريف السداد +ConfirmDeleteBill=هل أنت متأكد أنك تريد حذف هذه الفاتورة؟ +ConfirmValidateBill=هل أنت متأكد من أنك تريد التحقق من صحة هذه الفاتورة بالمرجع <b> %s </b>؟ +ConfirmUnvalidateBill=هل أنت متأكد أنك تريد تغيير الفاتورة <b> %s </b> إلى حالة المسودة؟ +ConfirmClassifyPaidBill=هل أنت متأكد أنك تريد تغيير الفاتورة <b> %s </b> إلى حالة المسددة؟ +ConfirmCancelBill=هل أنت متأكد من أنك تريد إلغاء الفاتورة <b> %s </b>؟ +ConfirmCancelBillQuestion=لماذا تريد تصنيف هذه الفاتورة "مهجورة"؟ +ConfirmClassifyPaidPartially=هل أنت متأكد أنك تريد تغيير الفاتورة <b> %s </b> إلى الحالة مدفوعة؟ +ConfirmClassifyPaidPartiallyQuestion=لم يتم دفع هذه الفاتورة بالكامل. ما هو سبب إغلاق هذه الفاتورة؟ +ConfirmClassifyPaidPartiallyReasonAvoir=المتبقي الغير مدفوع <b> (%s %s) </b> هو خصم ممنوح لأن السداد تم قبل الأجل. أقوم بتسوية ضريبة القيمة المضافة مع ملاحظة اشعار دائن. +ConfirmClassifyPaidPartiallyReasonDiscount=المتبقي الغير مدفوع <b> (%s %s) </b> هو خصم ممنوح لأن السداد تم قبل الأجل. +ConfirmClassifyPaidPartiallyReasonDiscountNoVat=المتبقي الغير مدفوع <b> (%s %s) </b> هو خصم ممنوح لأن السداد تم قبل الأجل. أنا أقبل خسارة ضريبة القيمة المضافة على هذا الخصم. +ConfirmClassifyPaidPartiallyReasonDiscountVat=المتبقي الغير مدفوع <b> (%s %s) </b> هو خصم ممنوح لأن السداد تم قبل الأجل. أسترد ضريبة القيمة المضافة على هذا الخصم بدون إشعار دائن. +ConfirmClassifyPaidPartiallyReasonBadCustomer=عميل سيء +ConfirmClassifyPaidPartiallyReasonProductReturned=تم إرجاع بعض المنتجات ConfirmClassifyPaidPartiallyReasonOther=التخلي عن المبلغ لسبب آخر -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct notes. -ConfirmClassifyPaidPartiallyReasonAvoirDesc=استخدام هذا الخيار إذا كان كل ما لا يتناسب مع -ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A <b>bad customer</b> is a customer that refuses to pay his debt. -ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=ويستخدم هذا الاختيار عند الدفع ليس كاملا لأن بعض المنتجات أعيدت -ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:<br>- payment not complete because some products were shipped back<br>- amount claimed too important because a discount was forgotten<br>In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=هذا الاختيار ممكن إذا تم تزويد فاتورتك بالتعليقات المناسبة. (مثال «فقط الضريبة المقابلة للسعر الذي تم دفعه هي التي تعطي الحق في الخصم») +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=في بعض البلدان ، قد يكون هذا الاختيار ممكنًا فقط إذا كانت فاتورتك تحتوي على ملاحظات صحيحة. +ConfirmClassifyPaidPartiallyReasonAvoirDesc=استخدم هذا الاختيار إذا كانت جميع الاختيارات الاخرى لا تناسبك +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=العميل السيئ <b> </b> هو العميل الذي يرفض سداد ديونه. +ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=يستخدم هذا الاختيار عندما لا يكتمل السداد بسبب إرجاع بعض المنتجات +ConfirmClassifyPaidPartiallyReasonOtherDesc=استخدم هذا الخيار إذا لم يكن هناك خيار مناسب ، على سبيل المثال في الحالة التالية: <br> - الدفع غير مكتمل لأن بعض المنتجات تم شحنها مرة أخرى <br> - المبلغ المطالب به مهم جدًا لأنه تم نسيان الخصم <br> في جميع الحالات ، يجب تصحيح المبلغ المطالب به في نظام المحاسبة عن طريق إنشاء إشعار دائن. ConfirmClassifyAbandonReasonOther=أخرى -ConfirmClassifyAbandonReasonOtherDesc=هذا الخيار وسوف يستخدم في جميع الحالات الأخرى. على سبيل المثال لأنك من خطة لإقامة استبدال الفاتورة. -ConfirmCustomerPayment=Do you confirm this payment input for <b>%s</b> %s? -ConfirmSupplierPayment=Do you confirm this payment input for <b>%s</b> %s? -ConfirmValidatePayment=Are you sure you want to validate this payment? No change can be made once payment is validated. -ValidateBill=التحقق من صحة الفواتير -UnvalidateBill=Unvalidate فاتورة -NumberOfBills=No. of invoices -NumberOfBillsByMonth=No. of invoices per month +ConfirmClassifyAbandonReasonOtherDesc=سيتم استخدام هذا الاختيار في جميع الحالات الأخرى. على سبيل المثال ، لأنك تخطط لإنشاء فاتورة بديلة. +ConfirmCustomerPayment=هل تؤكد إدخال المبلغ هذا لـ <b> %s </b> %s؟ +ConfirmSupplierPayment=هل تؤكد إدخال المباغ هذا لـ <b> %s </b> %s؟ +ConfirmValidatePayment=هل أنت متأكد أنك تريد اعتماد هذا المبلغ؟ لا يمكن إجراء أي تغيير بمجرد اعتماد الدفع. +ValidateBill=اعتماد الفاتورة +UnvalidateBill=فاتورة غير معتمدة +NumberOfBills=عدد الفواتير +NumberOfBillsByMonth=عدد الفواتير شهريا AmountOfBills=مبلغ الفواتير -AmountOfBillsHT=Amount of invoices (net of tax) -AmountOfBillsByMonthHT=كمية من الفواتير من قبل شهر (بعد خصم الضرائب) +AmountOfBillsHT=مبلغ الفواتير (صافي الضرائب) +AmountOfBillsByMonthHT=مبلغ الفواتير حسب الشهر (بعد خصم الضريبة) UseSituationInvoices=Allow situation invoice UseSituationInvoicesCreditNote=Allow situation invoice credit note Retainedwarranty=Retained warranty @@ -216,8 +219,8 @@ AllowedInvoiceForRetainedWarranty=Retained warranty usable on the following type 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 +ToPayOn=للسداد على %s +toPayOn=للسداد على %s RetainedWarranty=Retained Warranty PaymentConditionsShortRetainedWarranty=Retained warranty payment terms DefaultPaymentConditionsRetainedWarranty=Default retained warranty payment terms @@ -226,199 +229,200 @@ 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=دفعت بالفعل -AlreadyPaidBack=دفعت بالفعل العودة -AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments) +AlreadyPaid=مسدد +AlreadyPaidBack=سددت بالفعل +AlreadyPaidNoCreditNotesNoDeposits=سددت (بدون اشعار دائن ودفعات مقدمة) Abandoned=المهجورة -RemainderToPay=تبقى بدون أجر -RemainderToTake=المتبقي لاتخاذ -RemainderToPayBack=Remaining amount to refund +RemainderToPay=المتبقي غير مسدد +RemainderToTake=الميلغ المتبقي لاتخاذ +RemainderToPayBack=المبلغ المتبقي للاسترجاع Rest=بانتظار AmountExpected=المبلغ المطالب به -ExcessReceived=تلقى الزائدة -ExcessPaid=Excess paid +ExcessReceived=المبالغ الزائدة المستلمة +ExcessPaid=المبالغ الزائدة المسددة EscompteOffered=عرض الخصم (الدفع قبل الأجل) -EscompteOfferedShort=تخفيض السعر -SendBillRef=تقديم فاتورة%s -SendReminderBillRef=تقديم فاتورة%s (تذكير) -NoDraftBills=أي مشروع الفواتير -NoOtherDraftBills=أي مشروع الفواتير -NoDraftInvoices=لا يوجد مسودة فواتير -RefBill=فاتورة المرجع -ToBill=على مشروع قانون -RemainderToBill=تبقى لمشروع قانون +EscompteOfferedShort=خصم +SendBillRef=تسليم الفاتورة %s +SendReminderBillRef=تسليم الفاتورة %s (تذكير) +NoDraftBills=لا توجد مسودات فواتير +NoOtherDraftBills=لا توجد مسودات فواتير أخرى +NoDraftInvoices=لا توجد مسودات فواتير +RefBill=مرجع الفاتورة +ToBill=على فاتورة +RemainderToBill=باقي على الفاتورة SendBillByMail=ارسال الفاتورة عن طريق البريد الإلكتروني -SendReminderBillByMail=إرسال تذكرة عن طريق البريد الإلكتروني -RelatedCommercialProposals=المقترحات المتعلقة التجارية -RelatedRecurringCustomerInvoices=Related recurring customer invoices -MenuToValid=لصحيحة -DateMaxPayment=Payment due on +SendReminderBillByMail=إرسال تذكير عن طريق البريد الإلكتروني +RelatedCommercialProposals=العروض التجارية ذات الصلة +RelatedRecurringCustomerInvoices=فواتير العملاء المتكررة ذات الصلة +MenuToValid=صالح +DateMaxPayment=السداد المستحق في DateInvoice=تاريخ الفاتورة DatePointOfTax=Point of tax -NoInvoice=لا الفاتورة -ClassifyBill=تصنيف الفاتورة -SupplierBillsToPay=Unpaid vendor invoices +NoInvoice=لا فاتورة +ClassifyBill=صنف كفاتورة +SupplierBillsToPay=فواتير المورد الغير مسددة CustomerBillsUnpaid=فواتير العملاء غير المسددة NonPercuRecuperable=غير القابلة للاسترداد -SetConditions=Set Payment Terms -SetMode=Set Payment Type -SetRevenuStamp=Set revenue stamp +SetConditions=حدد شروط السداد +SetMode=حدد نوع السداد +SetRevenuStamp=حدد ختم الإيرادات Billed=فواتير -RecurringInvoices=Recurring invoices -RepeatableInvoice=فاتورة قالب -RepeatableInvoices=الفواتير قالب +RecurringInvoices=الفواتير المتكررة +RepeatableInvoice=قالب الفاتورة +RepeatableInvoices=قالب الفواتير Repeatable=قالب -Repeatables=النماذج +Repeatables=القوالب ChangeIntoRepeatableInvoice=تحويل إلى قالب فاتورة -CreateRepeatableInvoice=إنشاء فاتورة قالب +CreateRepeatableInvoice=إنشاء قالب فاتورة CreateFromRepeatableInvoice=إنشاء من قالب الفاتورة -CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details -CustomersInvoicesAndPayments=العملاء والفواتير والمدفوعات -ExportDataset_invoice_1=Customer invoices and invoice details -ExportDataset_invoice_2=العملاء والفواتير والمدفوعات -ProformaBill=Proforma بيل : +CustomersInvoicesAndInvoiceLines=فواتير العميل وتفاصيل الفاتورة +CustomersInvoicesAndPayments=فواتير العميل ومدفوعاته +ExportDataset_invoice_1=فواتير العميل وتفاصيل الفاتورة +ExportDataset_invoice_2=فواتير العميل ومدفوعاته +ProformaBill=فاتورة أولية: Reduction=تخفيض -ReductionShort=Disc. +ReductionShort=خصم Reductions=التخفيضات -ReductionsShort=Disc. +ReductionsShort=خصم Discounts=خصومات AddDiscount=إضافة الخصم -AddRelativeDiscount=إنشاء خصم قريب +AddRelativeDiscount=إنشاء خصم نسبي EditRelativeDiscount=تعديل الخصم النسبي -AddGlobalDiscount=إضافة الخصم -EditGlobalDiscounts=تعديل الخصومات مطلق -AddCreditNote=علما إنشاء الائتمان -ShowDiscount=وتظهر الخصم -ShowReduc=Show the discount -ShowSourceInvoice=Show the source invoice +AddGlobalDiscount=إنشاء خصم مطلق +EditGlobalDiscounts=تحرير الخصومات المطلقة +AddCreditNote=إنشاء اشعار دائن +ShowDiscount=إظهار الخصم +ShowReduc=أظهر الخصم +ShowSourceInvoice=عرض الفاتورة المصدر RelativeDiscount=الخصم النسبي -GlobalDiscount=خصم العالمية -CreditNote=علما الائتمان -CreditNotes=ويلاحظ الائتمان -CreditNotesOrExcessReceived=Credit notes or excess received -Deposit=Down payment -Deposits=Down payments +GlobalDiscount=خصم عام +CreditNote=اشعار دائن +CreditNotes=اشعارات دائن +CreditNotesOrExcessReceived=اشعارات دائن أو فوائض مستلمة +Deposit=الدفعة الأولى +Deposits=دفعة أولى DiscountFromCreditNote=خصم من دائن %s -DiscountFromDeposit=Down payments from invoice %s -DiscountFromExcessReceived=Payments in excess of invoice %s -DiscountFromExcessPaid=Payments in excess of invoice %s -AbsoluteDiscountUse=هذا النوع من الائتمان يمكن استخدامها على الفاتورة قبل المصادقة -CreditNoteDepositUse=Invoice must be validated to use this kind of credits -NewGlobalDiscount=تحديد خصم جديد -NewRelativeDiscount=خصم جديد النسبية -DiscountType=Discount type +DiscountFromDeposit=دفعات مقدمة من الفاتورة %s +DiscountFromExcessReceived=فوائض مسددة عن الفاتورة %s +DiscountFromExcessPaid=فوائض مسددة عن الفاتورة %s +AbsoluteDiscountUse=هذا النوع من الائتمان يمكن استخدامه على الفاتورة قبل اعتمادها +CreditNoteDepositUse=يجب اعتماد الفاتورة لاستخدام هذا النوع من الاعتمادات +NewGlobalDiscount=خصم مطلق جديد +NewRelativeDiscount=خصم نسبي جديد +DiscountType=نوع الخصم NoteReason=ملاحظة / السبب ReasonDiscount=السبب -DiscountOfferedBy=التي تمنحها -DiscountStillRemaining=Discounts or credits available -DiscountAlreadyCounted=Discounts or credits already consumed -CustomerDiscounts=Customer discounts -SupplierDiscounts=Vendors discounts -BillAddress=مشروع قانون معالجة -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=اجتماعي / ضريبة مالية دفع معرف -PaymentId=دفع معرف -PaymentRef=Payment ref. -InvoiceId=فاتورة معرف -InvoiceRef=المرجع الفاتورة. -InvoiceDateCreation=فاتورة تاريخ الإنشاء +DiscountOfferedBy=بواسطة +DiscountStillRemaining=الخصومات أو الاعتمادات المتاحة +DiscountAlreadyCounted=خصومات أو اعتمادات مستهلكة +CustomerDiscounts=خصومات العملاء +SupplierDiscounts=خصومات الموردين +BillAddress=عنوان الفاتورة +HelpEscompte=هذا الخصم هو خصم يمنح للعميل لأن السداد تم قبل الأجل. +HelpAbandonBadCustomer=تم التخلي عن هذا المبلغ (قيل إن العميل عميل سيء) ويعتبر خسارة استثنائية. +HelpAbandonOther=تم التخلي عن هذا المبلغ لأنه كان خطأ (عميل أو فاتورة خاطئة تم استبدالها بأخرى على سبيل المثال) +IdSocialContribution=معرف دفع الضرائب الاجتماعية / المالية +PaymentId=معرف السداد +PaymentRef=مرجع السداد +InvoiceId=معرف الفاتورة +InvoiceRef=مرجع الفاتورة. +InvoiceDateCreation=تاريخ إنشاء الفاتورة InvoiceStatus=حالة الفاتورة -InvoiceNote=علما الفاتورة -InvoicePaid=دفعت الفاتورة -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 +InvoiceNote=مذكرة الفاتورة +InvoicePaid=فاتورة مسددة +InvoicePaidCompletely=مسددة بالكامل +InvoicePaidCompletelyHelp=فاتورة مدفوعة بالكامل. يستثنى من ذلك الفواتير المدفوعة جزئيًا. للحصول على قائمة بجميع الفواتير "المغلقة" أو غير "المغلقة" ، يفضل استخدام عامل تصفية حالة الفاتورة. +OrderBilled=الامر تم فوترته +DonationPaid=التبرع سدد PaymentNumber=دفع عدد RemoveDiscount=إزالة الخصم -WatermarkOnDraftBill=مشاريع مائية على فواتير (إذا كانت فارغة لا شيء) +WatermarkOnDraftBill=علامة مائية على مسودات الفواتير (لا شيء إذا كانت فارغة) InvoiceNotChecked=لا فاتورة مختارة -ConfirmCloneInvoice=Are you sure you want to clone this invoice <b>%s</b>? -DisabledBecauseReplacedInvoice=العمل والمعوقين بسبب الفاتورة قد استبدل -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=انقسام في الخصم +ConfirmCloneInvoice=هل أنت متأكد أنك تريد استنساخ هذه الفاتورة <b>%s </b>؟ +DisabledBecauseReplacedInvoice=العمل على الفاتورة عطل لانها مستبدلة +DescTaxAndDividendsArea=تقدم هذه المنطقة ملخصًا لجميع المدفوعات التي تم سدادها للنفقات الخاصة. يتم تضمين السجلات مع المدفوعات خلال السنة الثابتة فقط هنا. +NbOfPayments=عدد السدادات +SplitDiscount=تقسيم الخصم إلى قسمين ConfirmSplitDiscount=Are you sure you want to split this discount of <b>%s</b> %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? +TypeAmountOfEachNewDiscount=مبلغ الإدخال لكل جزء من الجزأين: +TotalOfTwoDiscountMustEqualsOriginal=يجب أن يكون إجمالي الخصمين الجديدين مساويًا لمبلغ الخصم الأصلي. +ConfirmRemoveDiscount=هل أنت متأكد أنك تريد إزالة هذا الخصم؟ RelatedBill=الفاتورة ذات الصلة RelatedBills=الفواتير ذات الصلة RelatedCustomerInvoices=فواتير العملاء ذات صلة -RelatedSupplierInvoices=Related vendor invoices +RelatedSupplierInvoices=فواتير المورد ذات الصلة LatestRelatedBill=أحدث فاتورة ذات الصلة -WarningBillExist=Warning, one or more invoices already exist +WarningBillExist=تحذير ، هناك فاتورة واحدة أو أكثر موجودة بالفعل MergingPDFTool=دمج أداة PDF -AmountPaymentDistributedOnInvoice=Payment amount distributed on invoice -PaymentOnDifferentThirdBills=Allow payments on different third parties bills but same parent company -PaymentNote=Payment note +AmountPaymentDistributedOnInvoice=مبلغ السداد موزع على الفاتورة +PaymentOnDifferentThirdBills=السماح بسداد فواتير أطراف ثالثة اخرى ولكن نفس الشركة الأم +PaymentNote=مذكرة سداد ListOfPreviousSituationInvoices=List of previous situation invoices ListOfNextSituationInvoices=List of next situation invoices ListOfSituationInvoices=List of situation invoices CurrentSituationTotal=Total current situation 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 ? +RemoveSituationFromCycle=إزالة هذه الفاتورة من الدورة +ConfirmRemoveSituationFromCycle=إزالة هذه الفاتورة %s من الدورة؟ ConfirmOuting=Confirm outing -FrequencyPer_d=Every %s days -FrequencyPer_m=Every %s months -FrequencyPer_y=Every %s years +FrequencyPer_d=كل %s يوم +FrequencyPer_m=كل %s شهر +FrequencyPer_y=كل %s سنة FrequencyUnit=Frequency unit toolTipFrequency=Examples:<br><b>Set 7, Day</b>: give a new invoice every 7 days<br><b>Set 3, Month</b>: give a new invoice every 3 month -NextDateToExecution=Date for next invoice generation -NextDateToExecutionShort=Date next gen. -DateLastGeneration=Date of latest generation -DateLastGenerationShort=Date latest gen. -MaxPeriodNumber=Max. number of invoice generation -NbOfGenerationDone=Number of invoice generation already done -NbOfGenerationDoneShort=Number of generation done -MaxGenerationReached=Maximum number of generations reached -InvoiceAutoValidate=Validate invoices automatically -GeneratedFromRecurringInvoice=Generated from template recurring invoice %s -DateIsNotEnough=Date not reached yet -InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s -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 +NextDateToExecution=تاريخ إصدار الفاتورة التالية +NextDateToExecutionShort=تاريخ الاصدار القادم +DateLastGeneration=تاريخ أحدث اصدار +DateLastGenerationShort=تاريخ أحدث اصدار +MaxPeriodNumber=العدد الأعلى لإصدار الفاتورة +NbOfGenerationDone=عدد الفواتير المنجزة بالفعل +NbOfGenerationOfRecordDone=Number of record generation already done +NbOfGenerationDoneShort=عدد الفواتير المنجزة بالفعل +MaxGenerationReached=تم بلوغ الحد الأقصى لعدد الاصدار +InvoiceAutoValidate=اعتماد الفواتير تلقائيًا +GeneratedFromRecurringInvoice=تم إنشاؤه من نموذج الفاتورة المتكررة %s +DateIsNotEnough=الاجل لم يحل بعد +InvoiceGeneratedFromTemplate=الفاتورة %s المُنشأة من فاتورة القالب المتكرر %s +GeneratedFromTemplate=تم إنشاؤه من نموذج الفاتورة %s +WarningInvoiceDateInFuture=تحذير ، تاريخ الفاتورة احدث من التاريخ الحالي +WarningInvoiceDateTooFarInFuture=تحذير ، تاريخ الفاتورة بعيد جدًا عن التاريخ الحالي +ViewAvailableGlobalDiscounts=عرض الخصومات المتاحة +GroupPaymentsByModOnReports=مجموعة المدفوعات حسب الوضع في التقارير # PaymentConditions Statut=الحالة -PaymentConditionShortRECEP=Due Upon Receipt -PaymentConditionRECEP=Due Upon Receipt +PaymentConditionShortRECEP=مستحقة عند الاستلام +PaymentConditionRECEP=مستحقة عند الاستلام PaymentConditionShort30D=30 يوما PaymentCondition30D=30 يوما -PaymentConditionShort30DENDMONTH=30 days of month-end -PaymentCondition30DENDMONTH=Within 30 days following the end of the month +PaymentConditionShort30DENDMONTH=30 يومًا من نهاية الشهر +PaymentCondition30DENDMONTH=في غضون 30 يومًا من نهاية الشهر PaymentConditionShort60D=60 يوما PaymentCondition60D=60 يوما -PaymentConditionShort60DENDMONTH=60 days of month-end -PaymentCondition60DENDMONTH=Within 60 days following the end of the month +PaymentConditionShort60DENDMONTH=60 يومًا من نهاية الشهر +PaymentCondition60DENDMONTH=في غضون 60 يومًا من نهاية الشهر PaymentConditionShortPT_DELIVERY=تسليم -PaymentConditionPT_DELIVERY=التسليم +PaymentConditionPT_DELIVERY=عند التسليم PaymentConditionShortPT_ORDER=الطلبية PaymentConditionPT_ORDER=على الطلب PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50 ٪٪ مقدما، 50 ٪٪ عند التسليم -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=مقدار متغير (٪٪ TOT). -VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +PaymentConditionShort10D=10 أيام +PaymentCondition10D=10 أيام +PaymentConditionShort10DENDMONTH=10 أيام من نهاية الشهر +PaymentCondition10DENDMONTH=في غضون 10 أيام بعد نهاية الشهر +PaymentConditionShort14D=14 يوما +PaymentCondition14D=14 يوما +PaymentConditionShort14DENDMONTH=14 يومًا من نهاية الشهر +PaymentCondition14DENDMONTH=في غضون 14 يومًا بعد نهاية الشهر +FixAmount=المبلغ الثابت - بند واحد بالتسمية "%s" +VarAmount=المبلغ المتغير (%% إجمالي) +VarAmountOneLine=المبلغ المتغير (إجمالي %%.) - بند واحد بالتسمية "%s" +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=حوالة مصرفية PaymentTypeShortVIR=حوالة مصرفية -PaymentTypePRE=Direct debit payment order -PaymentTypeShortPRE=Debit payment order +PaymentTypePRE=أمر دفع الخصم المباشر +PaymentTypeShortPRE=أمر دفع المدين PaymentTypeLIQ=نقدا PaymentTypeShortLIQ=نقدا PaymentTypeCB=بطاقة الائتمان @@ -427,110 +431,115 @@ PaymentTypeCHQ=الشيكات PaymentTypeShortCHQ=الشيكات PaymentTypeTIP=TIP (Documents against Payment) PaymentTypeShortTIP=TIP Payment -PaymentTypeVAD=Online payment -PaymentTypeShortVAD=Online payment -PaymentTypeTRA=Bank draft -PaymentTypeShortTRA=مسودة +PaymentTypeVAD=الدفع الالكتروني +PaymentTypeShortVAD=الدفع الالكتروني +PaymentTypeTRA=حوالة مصرفية +PaymentTypeShortTRA=حوالة مصرفية PaymentTypeFAC=عامل PaymentTypeShortFAC=عامل -BankDetails=التفاصيل المصرفية -BankCode=رمز المصرف -DeskCode=Branch code +BankDetails=تفاصيل مصرفية +BankCode=رمز البنك +DeskCode=رمز الفرع BankAccountNumber=رقم الحساب BankAccountNumberKey=Checksum Residence=عنوان -IBANNumber=IBAN account number +IBANNumber=رقم حساب الآيبان IBAN=إيبان -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=الآيبان الخاص بالعميل +SupplierIBAN=الآيبان الخاص بالمورد BIC=بيك / سويفت -BICNumber=BIC/SWIFT code +BICNumber=رمز BIC / SWIFT ExtraInfos=معلومات اضافية RegulatedOn=وتنظم على ChequeNumber=رقم الشيك -ChequeOrTransferNumber=شيك / نقل رقم +ChequeOrTransferNumber=رقم شيك / تحويل ChequeBordereau=Check schedule -ChequeMaker=الاختيار / الارسال نقل +ChequeMaker=Check/Transfer transmitter ChequeBank=الشيكات المصرفية -CheckBank=الاختيار +CheckBank=الشيك NetToBePaid=الصافي للدفع PhoneNumber=الهاتف : FullPhoneNumber=الهاتف TeleFax=الفاكس -PrettyLittleSentence=قبول مبلغ المدفوعات المستحقة عن طريق الشيكات الصادرة باسمي بوصفها عضوا في الرابطة للمحاسبة المالية وافقت عليها الإدارة. -IntracommunityVATNumber=Intra-Community VAT ID -PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to -PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to +PrettyLittleSentence=قبول المبلغ المستحق بشيكات صادرة باسمي كموظف في المحاسبة معتمد من قبل الإدارة المالية. +IntracommunityVATNumber=معرف ضريبة القيمة المضافة داخل الاتحاد +PaymentByChequeOrderedTo=مدفوعات الشيكات (شامل الضرائب) مستحقة الدفع إلى %s ، أرسل إلى +PaymentByChequeOrderedToShort=مدفوعات الشيكات (شامل الضرائب) واجبة الدفع ل SendTo=أرسل إلى -PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account -VATIsNotUsedForInvoice=* عدم الفنية للتطبيق ضريبة القيمة المضافة 293B من المجموعة الاستشارية لاندونيسيا +PaymentByTransferOnThisBankAccount=الدفع عن طريق التحويل إلى الحساب المصرفي التالي +VATIsNotUsedForInvoice=* غير سارية ضريبة القيمة المضافة art-293B من CGI LawApplicationPart1=من خلال تطبيق القانون 80.335 من 12/05/80 LawApplicationPart2=البضاعة تظل ملكا لل -LawApplicationPart3=the seller until full payment of +LawApplicationPart3=البائع حتى السداد الكامل ل LawApplicationPart4=ثمنها. -LimitedLiabilityCompanyCapital=SARL برأس مال +LimitedLiabilityCompanyCapital=برأس مال UseLine=تطبيق UseDiscount=استخدام الخصم -UseCredit=استخدام القروض +UseCredit=استخدم الرصيد UseCreditNoteInInvoicePayment=تخفيض المبلغ لدفع هذه القروض -MenuChequeDeposits=Check Deposits +MenuChequeDeposits=إيداع الشيكات MenuCheques=الشيكات -MenuChequesReceipts=Check receipts +MenuChequesReceipts=استلام الشيكات NewChequeDeposit=ايداع جديدة -ChequesReceipts=Check receipts -ChequesArea=Check deposits area -ChequeDeposits=Check deposits +ChequesReceipts=استلام الشيكات +ChequesArea=منطقة ايداع الشيكات +ChequeDeposits=إيداع الشيكات Cheques=الشيكات -DepositId=إيداع معرف +DepositId=معرف الايداع NbCheque=عدد الشيكات -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=وتظهر جميع الفواتير غير المسددة -ShowUnpaidLateOnly=وتبين في وقت متأخر من الفواتير غير المدفوعة فقط +CreditNoteConvertedIntoDiscount=تم تحويل هذا %s إلى %s +UsBillingContactAsIncoiveRecipientIfExist=استخدم جهة الاتصال / العنوان من نوع "جهة اتصال الفواتير" بدلاً من عنوان الجهة الخارجية كمستلم للفواتير +ShowUnpaidAll=عرض جميع الفواتير الغير المسددة +ShowUnpaidLateOnly=عرض الفواتير المتأخرة الغير المسددة فقط PaymentInvoiceRef=دفع فاتورة %s -ValidateInvoice=تحقق من صحة الفواتير -ValidateInvoices=Validate invoices +ValidateInvoice=اعتماد الفاتورة +ValidateInvoices=اعتماد الفواتير Cash=نقد -Reported=تأخر +Reported=تأخير DisabledBecausePayments=غير ممكن لأن هناك بعض المدفوعات -CantRemovePaymentWithOneInvoicePaid=تصنيف لا يمكن إزالة الدفع لأنه ليس هناك على الأقل على الفاتورة سيولي +CantRemovePaymentWithOneInvoicePaid=لا يمكن إزالة الدفعة نظرًا لوجود فاتورة مصنفة واحدة على الأقل مدفوعة +CantRemovePaymentVATPaid=لا يمكن إزالة الدفعة لأن إقرار ضريبة القيمة المضافة مصنف كمدفوع +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=من المتوقع الدفع -CantRemoveConciliatedPayment=Can't remove reconciled payment -PayedByThisPayment=سيولي هذا الدفع -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=دفع +CantRemoveConciliatedPayment=لا يمكن إزالة الدفعة التي تمت تسويتها +PayedByThisPayment=سدد بعدهذه الدفعة +ClosePaidInvoicesAutomatically=تصنيف جميع الفواتير القياسية أو مع دفعة اولى أو الفواتير المستبدلة تلقائيا على أنها "مدفوعة" عندما يتم الدفع بالكامل. +ClosePaidCreditNotesAutomatically=تصنيف جميع اشعارات دائن تلقائيًا على أنها "مدفوعة" عندما يتم استرداد الأموال بالكامل. +ClosePaidContributionsAutomatically=تصنيف جميع المساهمات الاجتماعية أو المالية تلقائيًا على أنها "مدفوعة" عندما يتم الدفع بالكامل. +ClosePaidVATAutomatically=تصنيف إقرار ضريبة القيمة المضافة تلقائيًا على أنه "مدفوع" عندما يتم الدفع بالكامل. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. +AllCompletelyPayedInvoiceWillBeClosed=سيتم تلقائيًا إغلاق جميع الفواتير المدفوعة وتحول الى "مدفوعة". +ToMakePayment=سدد ToMakePaymentBack=تسديد ListOfYourUnpaidInvoices=قائمة الفواتير غير المسددة NoteListOfYourUnpaidInvoices=ملاحظة: تحتوي هذه القائمة على الفواتير الوحيدة لأطراف ثالثة ترتبط لك كممثل بيع. -RevenueStamp=Tax stamp -YouMustCreateInvoiceFromThird=This option is only available when creating an invoice from tab "Customer" of third party -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 +RevenueStamp=الطابع الضريبي +YouMustCreateInvoiceFromThird=هذا الخيار متاح فقط عند إنشاء فاتورة من علامة التبويب "العميل" التابعة لطرف ثالث +YouMustCreateInvoiceFromSupplierThird=هذا الخيار متاح فقط عند إنشاء فاتورة من علامة التبويب "المورد" للطرف الثالث +YouMustCreateStandardInvoiceFirstDesc=يجب عليك إنشاء فاتورة قياسية أولاً وتحويلها إلى "نموذج" لإنشاء نموذج فاتورة جديد PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=عودة عدد مع الشكل syymm NNNN عن الفواتير القياسية و٪ syymm-NNNN لتلاحظ الائتمان حيث هو YY العام٪، مم هو الشهر وnnnn هو تسلسل مع أي انقطاع وعدم العودة إلى 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 -TerreNumRefModelError=وهناك مشروع قانون بدءا من دولار ويوجد بالفعل syymm لا تتفق مع هذا النموذج من التسلسل. إزالة أو تغيير تسميتها لتصبح لتفعيل هذه الوحدة. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +EarlyClosingReason=سبب الإغلاق المبكر +EarlyClosingComment=ملاحظة اغلاق مبكرة ##### Types de contacts ##### -TypeContact_facture_internal_SALESREPFOLL=ممثل العميل متابعة فاتورة -TypeContact_facture_external_BILLING=الزبون فاتورة الاتصال -TypeContact_facture_external_SHIPPING=العملاء الشحن الاتصال -TypeContact_facture_external_SERVICE=خدمة العملاء الاتصال -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_SERVICE=Vendor service contact +TypeContact_facture_internal_SALESREPFOLL=ممثل متابعة فاتورة العميل +TypeContact_facture_external_BILLING=جهة اتصال فاتورة العميل +TypeContact_facture_external_SHIPPING=جهة اتصال شحن العميل +TypeContact_facture_external_SERVICE=الاتصال بخدمة العملاء +TypeContact_invoice_supplier_internal_SALESREPFOLL=ممثل متابعة فاتورة المورد +TypeContact_invoice_supplier_external_BILLING=جهة اتصال فاتورة المورد +TypeContact_invoice_supplier_external_SHIPPING=جهة اتصال الشحن للمورد +TypeContact_invoice_supplier_external_SERVICE=جهة اتصال خدمة المورد # Situation invoices InvoiceFirstSituationAsk=الفاتورة الأولى الوضع InvoiceFirstSituationDesc=وترتبط <b>الفواتير الوضع</b> إلى حالات تتعلق التقدم، على سبيل المثال تطور البناء. ويرتبط كل حالة على فاتورة. InvoiceSituation=فاتورة الوضع +PDFInvoiceSituation=فاتورة الوضع InvoiceSituationAsk=فاتورة تتابع الوضع InvoiceSituationDesc=إنشاء وضعا جديدا التالية موجودة بالفعل SituationAmount=مبلغ الفاتورة الوضع (صافي) @@ -540,38 +549,43 @@ CreateNextSituationInvoice=إنشاء الوضع المقبل ErrorFindNextSituationInvoice=Error unable to find next situation cycle ref ErrorOutingSituationInvoiceOnUpdate=Unable to outing this situation invoice. ErrorOutingSituationInvoiceCreditNote=Unable to outing linked credit note. -NotLastInCycle=This invoice is not the latest in cycle and must not be modified. -DisabledBecauseNotLastInCycle=الوضع القادم موجود بالفعل. +NotLastInCycle=هذه الفاتورة ليست الأحدث في الدورة ويجب عدم تعديلها. +DisabledBecauseNotLastInCycle=The next situation already exists. DisabledBecauseFinal=هذا الوضع النهائي. situationInvoiceShortcode_AS=AS -situationInvoiceShortcode_S=دإ -CantBeLessThanMinPercent=التقدم لا يمكن أن يكون أصغر من قيمتها في الحالة السابقة. -NoSituations=لا حالات مفتوحة +situationInvoiceShortcode_S=S +CantBeLessThanMinPercent=لا يمكن أن يكون التقدم أقل من قيمته في الوضع السابق. +NoSituations=No open situations InvoiceSituationLast=الفاتورة النهائية والعامة PDFCrevetteSituationNumber=Situation N°%s PDFCrevetteSituationInvoiceLineDecompte=Situation invoice - COUNT -PDFCrevetteSituationInvoiceTitle=فاتورة الوضع +PDFCrevetteSituationInvoiceTitle=Situation invoice PDFCrevetteSituationInvoiceLine=Situation N°%s: Inv. N°%s on %s TotalSituationInvoice=Total situation -invoiceLineProgressError=Invoice line progress can't be greater than or equal to the next invoice line -updatePriceNextInvoiceErrorUpdateline=Error: update price on invoice line: %s -ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices. -ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu <strong>%s - %s - %s</strong>. -ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask your administrator to enable and setup module <strong>%s</strong>. Note that both methods (manual and automatic) can be used together with no risk of duplication. -DeleteRepeatableInvoice=Delete template invoice -ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? -CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created -StatusOfGeneratedDocuments=Status of document generation -DoNotGenerateDoc=Do not generate document file -AutogenerateDoc=Auto generate document file -AutoFillDateFrom=Set start date for service line with invoice date -AutoFillDateFromShort=Set start date -AutoFillDateTo=Set end date for service line with next invoice date -AutoFillDateToShort=Set end date -MaxNumberOfGenerationReached=Max number of gen. reached +invoiceLineProgressError=لا يمكن أن يكون تقدم بند الفاتورة أكبر من أو يساوي بند الفاتورة التالي +updatePriceNextInvoiceErrorUpdateline=خطأ: تحديث السعر في سطر الفاتورة: %s +ToCreateARecurringInvoice=لإنشاء فاتورة متكررة لهذا العقد ، قم أولاً بإنشاء مسودة الفاتورة هذه ، ثم قم بتحويلها إلى قالب فاتورة وحدد معدل تكرار إنشاء الفواتير المستقبلية. +ToCreateARecurringInvoiceGene=لإنشاء فواتير مستقبلية بشكل منتظم ويدوي ، ما عليك سوى الانتقال إلى القائمة <strong> %s - %s - %s </strong>. +ToCreateARecurringInvoiceGeneAuto=إذا كنت بحاجة إلى إنشاء مثل هذه الفواتير تلقائيًا ، فاطلب من المسؤول تمكين وحدة الإعداد <strong> %s </strong> وإعدادها. لاحظ أنه يمكن استخدام كلتا الطريقتين (يدويًا وآليًا) مع عدم وجود خطر التكرار. +DeleteRepeatableInvoice=حذف قالب الفاتورة +ConfirmDeleteRepeatableInvoice=هل أنت متأكد أنك تريد حذف قالب الفاتورة؟ +CreateOneBillByThird=إنشاء فاتورة واحدة لكل طرف ثالث (خلاف ذلك ، فاتورة واحدة لكل طلب) +BillCreated=%s إصدار فاتورة (فواتير) +BillXCreated=تم إنشاء %s الفاتورة +StatusOfGeneratedDocuments=حالة إنشاء الوثيقة +DoNotGenerateDoc=لا تقم بإنشاء ملف المستند +AutogenerateDoc=إنشاء ملف المستند تلقائيًا +AutoFillDateFrom=حدد تاريخ البدء لبند الخدمة مع تاريخ الفاتورة +AutoFillDateFromShort=حدد تاريخ البدء +AutoFillDateTo=حدد تاريخ الانتهاء لبندالخدمة بتاريخ الفاتورة التالية +AutoFillDateToShort=حدد تاريخ الانتهاء +MaxNumberOfGenerationReached=وصول الحد الأقصى من الانشاء BILL_DELETEInDolibarr=تم حذف الفاتورة -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +BILL_SUPPLIER_DELETEInDolibarr=تم حذف فاتورة المورد +UnitPriceXQtyLessDiscount=سعر الوحدة × الكمية - الخصم +CustomersInvoicesArea=منطقة فواتير العملاء +SupplierInvoicesArea=منطقة فواتير المورد +FacParentLine=أصل سطر الفاتورة +SituationTotalRayToRest=ما تبقى للدفع بدون ضريبة +PDFSituationTitle=Situation n° %d +SituationTotalProgress=إجمالي التقدم %d %% diff --git a/htdocs/langs/ar_SA/boxes.lang b/htdocs/langs/ar_SA/boxes.lang index 9d993910c15..a95a4943e9c 100644 --- a/htdocs/langs/ar_SA/boxes.lang +++ b/htdocs/langs/ar_SA/boxes.lang @@ -1,111 +1,120 @@ # 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 -BoxLastCustomerOrders=Latest sales orders -BoxLastActions=Latest actions -BoxLastContracts=Latest contracts -BoxLastContacts=Latest contacts/addresses -BoxLastMembers=Latest members -BoxFicheInter=Latest interventions +BoxDolibarrStateBoard=إحصائيات عن كائنات الأعمال الرئيسية في قاعدة البيانات +BoxLoginInformation=معلومات تسجيل الدخول +BoxLastRssInfos=معلومات RSS +BoxLastProducts=أحدث %s منتجات | خدمات +BoxProductsAlertStock=تنبيهات المخزون للمنتجات +BoxLastProductsInContract=أحدث %s منتجات | خدمات المتعاقد عليها +BoxLastSupplierBills=أحدث فواتير الموردين +BoxLastCustomerBills=أحدث فواتير العملاء +BoxOldestUnpaidCustomerBills=أقدم فواتير العملاء غير المسددة +BoxOldestUnpaidSupplierBills=أقدم فواتير الموردين غير مدفوعة +BoxLastProposals=أحدث العروض التجارية +BoxLastProspects=أحدث الفرص المعدلة +BoxLastCustomers=أحدث العملاء المعدلين +BoxLastSuppliers=أحدث الموردين المعدلين +BoxLastCustomerOrders=أحدث أوامر البيع +BoxLastActions=أحدث الإجراءات +BoxLastContracts=أحدث العقود +BoxLastContacts=أحدث الاتصالات | العناوين +BoxLastMembers=أحدث الأعضاء +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions +BoxFicheInter=أحدث التدخلات BoxCurrentAccounts=ميزان الحسابات المفتوحة -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 modified Customer invoices -BoxTitleLastSupplierBills=Latest %s modified Vendor invoices -BoxTitleLastModifiedProspects=Prospects: last %s modified -BoxTitleLastModifiedMembers=Latest %s members -BoxTitleLastFicheInter=Latest %s modified interventions -BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid -BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid -BoxTitleCurrentAccounts=Open Accounts: balances -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception -BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified -BoxMyLastBookmarks=Bookmarks: latest %s -BoxOldestExpiredServices=أقدم خدمات منتهية الصلاحية النشطة -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 -BoxTitleLatestModifiedBoms=Latest %s modified BOMs -BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders -BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded -BoxGlobalActivity=النشاط العالمي (الفواتير والمقترحات والطلبات) -BoxGoodCustomers=Good customers -BoxTitleGoodCustomers=%s Good customers +BoxTitleMemberNextBirthdays=أعياد الميلاد لهذا الشهر (الأعضاء) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year +BoxTitleLastRssInfos=آخر أخبار %s من %s +BoxTitleLastProducts=المنتجات | الخدمات: آخر %s معدل +BoxTitleProductsAlertStock=المنتجات: تنبيه المخزون +BoxTitleLastSuppliers=أحدث %s الموردين المسجلين +BoxTitleLastModifiedSuppliers=الموردين: آخر %s معدل +BoxTitleLastModifiedCustomers=العملاء: آخر %s تعديل +BoxTitleLastCustomersOrProspects=أحدث %s عملاء أو فرص +BoxTitleLastCustomerBills=أحدث %s تعديل لفواتير العميل +BoxTitleLastSupplierBills=آخر %s تعديل لفواتير الموردين +BoxTitleLastModifiedProspects=الفرص: آخر %s تعديل +BoxTitleLastModifiedMembers=أحدث %s أعضاء +BoxTitleLastFicheInter=أحدث %s تدخلات معدلة +BoxTitleOldestUnpaidCustomerBills=فواتير العميل: أقدم %s غير مدفوعة +BoxTitleOldestUnpaidSupplierBills=فواتير الموردين: أقدم %s غير مدفوعة +BoxTitleCurrentAccounts=الحسابات المفتوحة: أرصدة +BoxTitleSupplierOrdersAwaitingReception=أوامر الموردين في انتظار الاستلام +BoxTitleLastModifiedContacts=جهات الاتصال | العناوين: آخر %s تعديل +BoxMyLastBookmarks=الإشارات المرجعية: أحدث %s +BoxOldestExpiredServices=أقدم الخدمات النشطة منتهية الصلاحية +BoxLastExpiredServices=أحدث %s أقدم جهات اتصال مع خدمات منتهية الصلاحية نشطة +BoxTitleLastActionsToDo=أحدث إجراءات %s للقيام بها +BoxTitleLastContracts=أحدث %s عقود معدلة +BoxTitleLastModifiedDonations=أحدث %s التبرعات المعدلة +BoxTitleLastModifiedExpenses=أحدث %s تقارير النفقات المعدلة +BoxTitleLatestModifiedBoms=أحدث %s BOMs معدلة +BoxTitleLatestModifiedMos=أحدث %s أوامر التصنيع المعدلة +BoxTitleLastOutstandingBillReached=العملاء الذين تجاوزا الحد الاقصى +BoxGlobalActivity=النشاط العام (الفواتير ، العروض ، الطلبات) +BoxGoodCustomers=عملاء جيدون +BoxTitleGoodCustomers=%s عملاء جيدون BoxScheduledJobs=المهام المجدولة BoxTitleFunnelOfProspection=Lead funnel -FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s -LastRefreshDate=Latest refresh date -NoRecordedBookmarks=أية إشارات محددة. -ClickToAdd=انقر هنا لإضافة. -NoRecordedCustomers=لا العملاء تسجيل -NoRecordedContacts=أي اتصالات تسجيل -NoActionsToDo=توجد إجراءات لتفعل -NoRecordedOrders=No recorded sales orders -NoRecordedProposals=أي مقترحات تسجيل -NoRecordedInvoices=No recorded customer invoices -NoUnpaidCustomerBills=No unpaid customer invoices -NoUnpaidSupplierBills=No unpaid vendor invoices -NoModifiedSupplierBills=No recorded vendor invoices -NoRecordedProducts=لم تسجل المنتجات / الخدمات -NoRecordedProspects=لا آفاق المسجلة -NoContractedProducts=لا توجد منتجات / خدمات التعاقد -NoRecordedContracts=أي عقود المسجلة -NoRecordedInterventions=لا التدخلات المسجلة -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 -BoxSuppliersOrdersPerMonth=Vendor Orders per month -BoxProposalsPerMonth=مقترحات شهريا -NoTooLowStockProducts=No products are under the low stock limit -BoxProductDistribution=Products/Services Distribution -ForObject=On %s -BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified -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=عملاء الفواتير +FailedToRefreshDataInfoNotUpToDate=فشل تحديث تدفق RSS. آخر تاريخ تحديث ناجح: %s +LastRefreshDate=آخر تحديث +NoRecordedBookmarks=لم يتم تحديد إشارات مرجعية +ClickToAdd=انقر هنا للإضافة. +NoRecordedCustomers=لا يوجد عملاء مسجلين +NoRecordedContacts=لا توجد جهات اتصال مسجلة +NoActionsToDo=لا توجد إجراءات للقيام بها +NoRecordedOrders=لا توجد أوامر مبيعات مسجلة +NoRecordedProposals=لا توجد عروض مسجلة +NoRecordedInvoices=لا توجد فواتير عملاء مسجلة +NoUnpaidCustomerBills=لا توجد فواتير غير مدفوعة للعملاء +NoUnpaidSupplierBills=لا توجد فواتير موردين غير مدفوعة +NoModifiedSupplierBills=لا توجد فواتير موردين مسجلة +NoRecordedProducts=لا توجد منتجات | خدمات مسجلة +NoRecordedProspects=لا توجد فرص مسجلة +NoContractedProducts=لم يتم التعاقد على أي منتجات | خدمات +NoRecordedContracts=لا توجد عقود مسجلة +NoRecordedInterventions=لا توجد تدخلات مسجلة +BoxLatestSupplierOrders=أحدث أوامر الشراء +BoxLatestSupplierOrdersAwaitingReception=أحدث أوامر الشراء (مع استلام معلق) +NoSupplierOrder=لا يوجد أمر شراء مسجل +BoxCustomersInvoicesPerMonth=فواتير العملاء في الشهر +BoxSuppliersInvoicesPerMonth=فواتير الموردين في الشهر +BoxCustomersOrdersPerMonth=اوامر المبيعات في الشهر +BoxSuppliersOrdersPerMonth=اوامر الموردين في الشهر +BoxProposalsPerMonth=العروض في الشهر +NoTooLowStockProducts=لا توجد منتجات أقل من حد المخزون المنخفض +BoxProductDistribution=توزيع المنتجات | الخدمات +ForObject=في %s +BoxTitleLastModifiedSupplierBills=فواتير الموردين: آخر %s تعديل +BoxTitleLatestModifiedSupplierOrders=أوامر الموردين: آخر %s تعديل +BoxTitleLastModifiedCustomerBills=فواتير العميل: آخر %s تعديل +BoxTitleLastModifiedCustomerOrders=أوامر المبيعات: آخر %s تعديل +BoxTitleLastModifiedPropals=أحدث %s العروض المعدلة +BoxTitleLatestModifiedJobPositions=أحدث %s وظائف المعدلة +BoxTitleLatestModifiedCandidatures=أحدث %s الترشيحات المعدلة +ForCustomersInvoices=فواتير العملاء ForCustomersOrders=أوامر العملاء -ForProposals=اقتراحات -LastXMonthRolling=The latest %s month rolling -ChooseBoxToAdd=Add widget to your dashboard -BoxAdded=Widget was added in your dashboard -BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document -NoRecordedManualEntries=No manual entries record in accountancy +ForProposals=عروض +LastXMonthRolling=آخر %s شهر متداول +ChooseBoxToAdd=إضافة widget إلى لوحة القيادة الخاصة بك +BoxAdded=تمت إضافة widget في لوحة القيادة الخاصة بك +BoxTitleUserBirthdaysOfMonth=أعياد الميلاد لهذا الشهر (المستخدمون) +BoxLastManualEntries=تم إدخال أحدث سجل في المحاسبة يدويًا أو بدون مستند المصدر +BoxTitleLastManualEntries=%s تم إدخال أحدث سجل يدويًا أو بدون مستند المصدر +NoRecordedManualEntries=لا يوجد إدخالات سجل يدوية في المحاسبة 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 -BoxCustomersOutstandingBillReached=Customers with oustanding limit reached +BoxTitleSuspenseAccount=عدد البنود غير المخصصة +NumberOfLinesInSuspenseAccount=رقم البند في الحساب المعلق +SuspenseAccountNotDefined=لم يتم تعريف الحساب المعلق +BoxLastCustomerShipments=آخر شحنات العميل +BoxTitleLastCustomerShipments=أحدث %s شحنات العملاء +NoRecordedShipments=لا توجد شحنة مسجلة للعملاء +BoxCustomersOutstandingBillReached=العملاء الذين بلغوا الحد الأقصى المسموح به # Pages -AccountancyHome=المحاسبة -ValidatedProjects=Validated projects +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy +ValidatedProjects=المشاريع المعتمدة diff --git a/htdocs/langs/ar_SA/categories.lang b/htdocs/langs/ar_SA/categories.lang index ffc098c9333..86b8186e362 100644 --- a/htdocs/langs/ar_SA/categories.lang +++ b/htdocs/langs/ar_SA/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=منطقة علامات / فئات العملاء  MembersCategoriesArea=منطقة علامات / فئات الأعضاء  ContactsCategoriesArea=منطقة اتصالات العلامات / الفئات -AccountsCategoriesArea=منطقة علامات / فئات حسابات  +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=منطقة علامات / فئات المشاريع UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=إظهار العلامة / الفئة ByDefaultInList=افتراضيا في القائمة ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ar_SA/companies.lang b/htdocs/langs/ar_SA/companies.lang index 4c65642bdba..7be97a35374 100644 --- a/htdocs/langs/ar_SA/companies.lang +++ b/htdocs/langs/ar_SA/companies.lang @@ -1,185 +1,192 @@ # Dolibarr language file - Source file is en_US - companies -ErrorCompanyNameAlreadyExists=اسم الشركة ل ٪ موجود بالفعل. اختيار آخر. -ErrorSetACountryFirst=المجموعة الأولى في البلد -SelectThirdParty=تحديد طرف ثالث -ConfirmDeleteCompany=Are you sure you want to delete this company and all inherited information? -DeleteContact=حذف اتصال -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 +ErrorCompanyNameAlreadyExists=اسم الشركة %s موجود بالفعل. اختر واحد اخر. +ErrorSetACountryFirst=اضبط البلد أولاً +SelectThirdParty=حدد طرفًا ثالثًا +ConfirmDeleteCompany=هل أنت متأكد أنك تريد حذف هذه الشركة وجميع المعلومات الموروثة عنها؟ +DeleteContact=حذف جهة اتصال | عنوان +ConfirmDeleteContact=هل أنت متأكد أنك تريد حذف جهة الاتصال هذه وجميع المعلومات الموروثة؟ +MenuNewThirdParty=طرف ثالث جديد +MenuNewCustomer=عميل جديد +MenuNewProspect=فرصة جديدة +MenuNewSupplier=مورد جديد MenuNewPrivateIndividual=فرد جديد -NewCompany=New company (prospect, customer, vendor) -NewThirdParty=New Third Party (prospect, customer, vendor) -CreateDolibarrThirdPartySupplier=Create a third party (vendor) +NewCompany=شركة جديدة (فرصة، عميل ، مورد) +NewThirdParty=طرف ثالث جديد (فرصة، عميل ، مورد) +CreateDolibarrThirdPartySupplier=إنشاء طرف ثالث (مورد) CreateThirdPartyOnly=إنشاء طرف ثالث -CreateThirdPartyAndContact=Create a third party + a child contact -ProspectionArea=مجال التنقيب -IdThirdParty=هوية الطرف الثالث -IdCompany=رقم تعريف الشركة -IdContact=رقم تعريف الاتصال -ThirdPartyContacts=Third-party contacts -ThirdPartyContact=Third-party contact/address +CreateThirdPartyAndContact=إنشاء طرف ثالث + جهة اتصال تابعة +ProspectionArea=منطقة الفرص +IdThirdParty=معرف الطرف الثالث +IdCompany=معرف الشركة +IdContact=معرف جهة الاتصال +ThirdPartyContacts=جهات اتصال الطرف الثالث +ThirdPartyContact=جهة اتصال | عنوان الطرف الثالث Company=شركة CompanyName=اسم الشركة -AliasNames=الاسم المستعار (التجارية، العلامات التجارية، ...) -AliasNameShort=Alias Name +AliasNames=الاسم المختصر (تجاري ، علامة تجارية) +AliasNameShort=الاسم المختصر 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=آفاق -ThirdPartyProspectsStats=آفاق +CountryIsInEEC=البلد داخل الاتحاد الأوروبي +PriceFormatInCurrentLanguage=تنسيق عرض السعر باللغة والعملة الحالية +ThirdPartyName=اسم الطرف الثالث +ThirdPartyEmail=البريد الإلكتروني للطرف الثالث +ThirdParty=طرف ثالث +ThirdParties=الأطراف الثالثة +ThirdPartyProspects=فرص +ThirdPartyProspectsStats=فرص ThirdPartyCustomers=العملاء ThirdPartyCustomersStats=العملاء -ThirdPartyCustomersWithIdProf12=الزبائن ٪ أو ٪ ق ق -ThirdPartySuppliers=Vendors -ThirdPartyType=Third-party type +ThirdPartyCustomersWithIdProf12=العملاء الذين لديهم %s أو %s +ThirdPartySuppliers=الموردين +ThirdPartyType=نوع الطرف الثالث 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. +ToCreateContactWithSameName=سيتم إنشاء جهة اتصال | عنوان تلقائيًا بنفس المعلومات مثل الطرف الثالث التابع للطرف الثالث. في معظم الحالات ، حتى لو كان الطرف الثالث شخصًا ماديًا ، يكفي إنشاء طرف ثالث بمفرده. ParentCompany=الشركة الأم Subsidiaries=الشركات التابعة -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=تقرير الربع -CivilityCode=قانون الكياسة -RegisteredOffice=المكتب المسجل +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate +CivilityCode=قواعد السلوك +RegisteredOffice=مكتب مسجل Lastname=اللقب -Firstname=Firstname -PostOrFunction=Job position +Firstname=الاسم الاول +PostOrFunction=الوظيفه UserTitle=العنوان -NatureOfThirdParty=Nature of Third party -NatureOfContact=Nature of Contact +NatureOfThirdParty=طبيعة الطرف الثالث +NatureOfContact=طبيعة الاتصال Address=عنوان State=الولاية / المقاطعة -StateCode=State/Province code -StateShort=حالة +StateCode=رمز الولاية / المقاطعة +StateShort=الولاية Region=المنطقة -Region-State=Region - State -Country=قطر +Region-State=المنطقة - الولاية +Country=الدولة CountryCode=رمز البلد -CountryId=بلد معرف +CountryId=معرف البلد Phone=الهاتف PhoneShort=الهاتف Skype=سكايب Call=مكالمة Chat=دردشة -PhonePro=الأستاذ الهاتف -PhonePerso=عدد الأفراد. الهاتف +PhonePro=هاتف العمل +PhonePerso=الهاتف الشخصي PhoneMobile=الجوال -No_Email=Refuse bulk emailings +No_Email=رفض الرسائل الإلكترونية الجماعية Fax=الفاكس Zip=الرمز البريدي Town=مدينة Web=الويب -Poste= موقف -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 -OverAllProposals=اقتراحات +Poste= المنصب +DefaultLang=اللغة الافتراضية +VATIsUsed=تطبق ضريبة المبيعات +VATIsUsedWhenSelling=يحدد هذا ما إذا كان هذا الطرف الثالث يتضمن ضريبة بيع أم لا عندما يُصدر فاتورة لعملائه +VATIsNotUsed=لا تطبق ضريبة المبيعات +CopyAddressFromSoc=نسخ العنوان من تفاصيل الطرف الثالث +ThirdpartyNotCustomerNotSupplierSoNoRef=لا عميل ولا مورد، ولا توجد كائنات مرجعية متاحة +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=لا خصومات لا لعميل ولا لمورد، الخصومات غير متوفرة +PaymentBankAccount=حساب السداد البنكي +OverAllProposals=عروض OverAllOrders=أوامر OverAllInvoices=فواتير -OverAllSupplierProposals=طلبات الأسعار +OverAllSupplierProposals=طلبات عروض الأسعار ##### Local Taxes ##### LocalTax1IsUsed=استخدام الضرائب الثانية -LocalTax1IsUsedES= يتم استخدام الطاقة المتجددة -LocalTax1IsNotUsedES= لا يتم استخدام الطاقة المتجددة +LocalTax1IsUsedES= يستخدم الضرائب العقارية +LocalTax1IsNotUsedES= لا يستخدم الضرائب العقارية LocalTax2IsUsed=استخدام الضرائب الثالثة -LocalTax2IsUsedES= يستخدم IRPF -LocalTax2IsNotUsedES= IRPF لا يستخدم -WrongCustomerCode=رمز غير صالح العملاء -WrongSupplierCode=Vendor code invalid +LocalTax2IsUsedES= يستخدم ضريبة IRPF +LocalTax2IsNotUsedES= لا يستخدم ضريبة IRPF +WrongCustomerCode=كود العميل غير صالح +WrongSupplierCode=كود المورد غير صالح CustomerCodeModel=العميل رمز النموذج -SupplierCodeModel=Vendor code model +SupplierCodeModel=نموذج كود المورد Gencod=الباركود ##### Professional ID ##### -ProfId1Short=الأستاذ معرف 1 -ProfId2Short=معرف الأستاذ 2 -ProfId3Short=الأستاذ معرف 3 -ProfId4Short=الأستاذ معرف 4 -ProfId5Short=البروفيسور رقم 5 -ProfId6Short=البروفيسور معرف 6 -ProfId1=الهوية المهنية (1) -ProfId2=الهوية المهنية (2) -ProfId3=3 الهوية المهنية +ProfId1Short=هوية مهنية 1 +ProfId2Short=هوية مهنية 2 +ProfId3Short=هوية مهنية 3 +ProfId4Short=هوية مهنية 4 +ProfId5Short=هوية مهنية 5 +ProfId6Short=هوية مهنية 6 +ProfId1=الهوية المهنية 1 +ProfId2=الهوية المهنية 2 +ProfId3=الهوية المهنية 3 ProfId4=الهوية المهنية 4 -ProfId5=المهنية رقم 5 -ProfId6=المهنية ID 6 -ProfId1AR=معرف البروفيسور 1 (CUIT / [كيل]) -ProfId2AR=البروفيسور رقم 2 (المتوحشون الايرادات) +ProfId5=الهوية المهنية 5 +ProfId6=الهوية المهنية 6 +ProfId1AR=الهوية المهنية 1 (CUIT / CUIL) +ProfId2AR=الهوية المهنية 2 (المتوحشون الايرادات) ProfId3AR=- ProfId4AR=- ProfId5AR=- ProfId6AR=- -ProfId1AT=البروفيسور رقم 1 (USt.-IdNr) -ProfId2AT=البروفيسور رقم 2 (USt.-العدد) -ProfId3AT=البروفيسور رقم 3 (Handelsregister-العدد). +ProfId1AT=الهوية المهنية 1 (USt.-IdNr) +ProfId2AT=الهوية المهنية 2 (USt.-العدد) +ProfId3AT=الهوية المهنية 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=رقم EORI ProfId6AT=- -ProfId1AU=الأستاذ عيد 1 (ايه. بي.) +ProfId1AU=الهوية المهنية 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- ProfId6AU=- -ProfId1BE=الأستاذ عيد 1 (عدد المهنية) +ProfId1BE=الهوية المهنية 1 (الرقم المهني) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=رقم EORI ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) -ProfId3BR=IM (Inscricao المحلي) +ProfId3BR=IM (Inscricao Municipal) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=UID-Nummer ProfId2CH=- -ProfId3CH=الأستاذ عيد 1 (عدد الاتحادية) -ProfId4CH=الأستاذ عيد 2 (رقم السجل التجاري) -ProfId5CH=EORI number +ProfId3CH=الهوية المهنية 1 (رقم اتحادي) +ProfId4CH=الهوية المهنية 2 (رقم السجل التجاري) +ProfId5CH=رقم EORI ProfId6CH=- -ProfId1CL=الأستاذ رقم 1 (شبق) +ProfId1CL=الهوية المهنية 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- ProfId6CL=- -ProfId1CO=الأستاذ رقم 1 (شبق) +ProfId1CO=الهوية المهنية 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- ProfId6CO=- -ProfId1DE=الأستاذ عيد 1 (USt. - IdNr) -ProfId2DE=الأستاذ عيد 2 (رقم USt. -) -ProfId3DE=الأستاذ عيد 3 (Handelsregister-Nr.) +ProfId1DE=الهوية المهنية 1 (USt.-IdNr) +ProfId2DE=الهوية المهنية 2 (USt.-Nr) +ProfId3DE=الهوية المهنية 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=رقم EORI ProfId6DE=- -ProfId1ES=(CNAE) -ProfId2ES=(رقم الضمان الاجتماعي) -ProfId3ES=(IAE) +ProfId1ES=الهوية المهنية 1 (CIF / NIF) +ProfId2ES=الهوية المهنية 2 (رقم الضمان الاجتماعي) +ProfId3ES=الهوية المهنية 3 (CNAE) ProfId4ES=(عدد الجماعية) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=الأستاذ عيد 1 (صفارة إنذار) ProfId2FR=الأستاذ عيد 2 (SIRET) ProfId3FR=الأستاذ عيد 3 (NAF ، البالغ من العمر قرد) ProfId4FR=الأستاذ عيد 4 (نظام المنسقين المقيمين / لجمهورية مقدونيا) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=الأستاذ عيد 1 (رقم التسجيل) ProfId2GB=- ProfId3GB=3 الأستاذ عيد حسبما @@ -202,12 +209,13 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=رقم EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=رقم EORI ProfId6LU=- ProfId1MA=الرقم أ. 1 (RC) ProfId2MA=الرقم أ. 2 (Patente) @@ -225,13 +233,13 @@ ProfId1NL=KVK نومير ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId5NL=EORI number +ProfId5NL=رقم EORI ProfId6NL=- ProfId1PT=الأستاذ عيد 1 (NIPC) ProfId2PT=الأستاذ عيد 2 (رقم الضمان الاجتماعي) ProfId3PT=الأستاذ عيد 3 (رقم السجل التجاري) ProfId4PT=الأستاذ عيد 4 (يضم) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,12 +263,12 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=الأستاذ رقم 1 (OGRN) ProfId2RU=الأستاذ رقم 2 (INN) -ProfId3RU=الأستاذ رقم 3 (KPP) -ProfId4RU=الأستاذ رقم 4 (اوكبو) +ProfId3RU=Prof Id 3 (KPP) +ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- ProfId6RU=- ProfId1DZ=RC @@ -269,107 +277,107 @@ ProfId3DZ=NIF ProfId4DZ=NIS VATIntra=VAT ID VATIntraShort=VAT ID -VATIntraSyntaxIsValid=تركيب صالحة +VATIntraSyntaxIsValid=بناء الجملة صالح VATReturn=VAT return -ProspectCustomer=احتمال / العملاء -Prospect=احتمال +ProspectCustomer=فرصة | عميل +Prospect=فرصة CustomerCard=بطاقة الزبون Customer=العميل -CustomerRelativeDiscount=العميل الخصم النسبي -SupplierRelativeDiscount=Relative vendor discount -CustomerRelativeDiscountShort=الخصم النسبي -CustomerAbsoluteDiscountShort=مطلق الخصم -CompanyHasRelativeDiscount=هذا العميل قد خصم <b>٪ ق ٪ ٪</b> -CompanyHasNoRelativeDiscount=هذا العميل ليس لديها النسبية خصم افتراضي -HasRelativeDiscountFromSupplier=You have a default discount of <b>%s%%</b> 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 <b>%s</b> %s -CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for <b>%s</b> %s -CompanyHasCreditNote=ولا يزال هذا العميل الائتمانية ويلاحظ السابقة أو ودائع <b>ل%s ق ٪</b> -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor -HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for <b>%s</b> %s from this vendor -HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for <b>%s</b> %s from this vendor -HasCreditNoteFromSupplier=You have credit notes for <b>%s</b> %s from this vendor -CompanyHasNoAbsoluteDiscount=هذا العميل ليس الخصم الائتمان المتاح -CustomerAbsoluteDiscountAllUsers=Absolute customer discounts (granted by all users) -CustomerAbsoluteDiscountMy=Absolute customer discounts (granted by yourself) -SupplierAbsoluteDiscountAllUsers=Absolute vendor discounts (entered by all users) -SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) +CustomerRelativeDiscount=خصم العميل النسبي +SupplierRelativeDiscount=خصم المورد النسبي +CustomerRelativeDiscountShort=خصم نسبي +CustomerAbsoluteDiscountShort=خصم مطلق +CompanyHasRelativeDiscount=هذا العميل لديه خصم افتراضي بقيمة <b> %s%% </b> +CompanyHasNoRelativeDiscount=هذا العميل ليس لديه خصم نسبي بشكل افتراضي +HasRelativeDiscountFromSupplier=لديك خصم افتراضي بقيمة <b> %s%% </b> من هذا المورد +HasNoRelativeDiscountFromSupplier=ليس لديك خصم نسبي افتراضي من هذا المورد +CompanyHasAbsoluteDiscount=يتوفر لدى هذا العميل خصومات (ملاحظات ائتمانية أو دفعات مقدمة) لـ <b> %s </b> %s +CompanyHasDownPaymentOrCommercialDiscount=هذا العميل لديه خصومات متاحة (تجارية ، دفعة أولى) لـ <b> %s </b> %s +CompanyHasCreditNote=لا يزال لدى هذا العميل اشعار دائن لـ <b> %s </b> %s +HasNoAbsoluteDiscountFromSupplier=ليس لديك رصيد خصم متاح من هذا المورد +HasAbsoluteDiscountFromSupplier=لديك خصومات متاحة (ملاحظات ائتمانية أو دفعات مقدمة) لـ <b> %s </b> %s من هذا المورد +HasDownPaymentOrCommercialDiscountFromSupplier=لديك خصومات متاحة (تجارية ، دفعات مقدمة) لـ <b> %s </b> %s من هذا المورد +HasCreditNoteFromSupplier=لديك اشعار دائن لـ <b> %s </b> %s من هذا المورد +CompanyHasNoAbsoluteDiscount=هذا العميل ليس لديه ائتمان خصم متاح +CustomerAbsoluteDiscountAllUsers=خصومات العملاء المطلقة (الممنوحة من قبل جميع المستخدمين) +CustomerAbsoluteDiscountMy=خصومات العملاء المطلقة (ممنوحة منك) +SupplierAbsoluteDiscountAllUsers=خصومات المورد المطلقة (مدخلة من جميع المستخدمين) +SupplierAbsoluteDiscountMy=خصومات المورد المطلقة (أدخلتها بنفسك) DiscountNone=بلا -Vendor=Vendor -Supplier=Vendor +Vendor=مورد +Supplier=مورد AddContact=إنشاء اتصال -AddContactAddress=إنشاء الاتصال / عنوان -EditContact=تحرير الاتصال / عنوان -EditContactAddress=تحرير الاتصال / عنوان -Contact=Contact/Address -Contacts=اتصالات -ContactId=Contact id -ContactsAddresses=اتصالات / عناوين -FromContactName=Name: -NoContactDefinedForThirdParty=أي اتصال محددة لهذا الطرف الثالث -NoContactDefined=لا يوجد اتصال محددة لهذا الطرف الثالث -DefaultContact=الاتصال الافتراضية -ContactByDefaultFor=Default contact/address for +AddContactAddress=إنشاء اتصال | عنوان +EditContact=تحرير جهة الاتصال +EditContactAddress=تحرير جهة اتصال | عنوان +Contact=عنوان الإتصال +Contacts=جهات الاتصال | العناوين +ContactId=معرف جهة الاتصال +ContactsAddresses=جهات الاتصال | العناوين +FromContactName=الاسم: +NoContactDefinedForThirdParty=لم يتم تحديد جهة اتصال لهذا الطرف الثالث +NoContactDefined=لم يتم تحديد جهة اتصال +DefaultContact=جهة الاتصال | العنوان الافتراضي +ContactByDefaultFor=جهة الاتصال | العنوان الافتراضي لـ AddThirdParty=إنشاء طرف ثالث DeleteACompany=حذف شركة PersonalInformations=البيانات الشخصية -AccountancyCode=حساب محاسبي -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=إذا كان الطرف الثالث هو عميل أو احتمال -RequiredIfSupplier=Required if third party is a vendor -ValidityControledByModule=Validity controlled by module -ThisIsModuleRules=Rules for this module -ProspectToContact=إمكانية الاتصال -CompanyDeleted=شركة "٪ ل" حذفها من قاعدة البيانات. -ListOfContacts=قائمة الاتصالات -ListOfContactsAddresses=قائمة الاتصالات -ListOfThirdParties=List of Third Parties -ShowCompany=Third Party -ShowContact=Contact-Address -ContactsAllShort=جميع (بدون فلتر) +AccountancyCode=الحساب +CustomerCode=كود العميل +SupplierCode=كود المورد +CustomerCodeShort=كود العميل +SupplierCodeShort=كود المورد +CustomerCodeDesc=كود العميل فريد لجميع العملاء +SupplierCodeDesc=كود المورد ، فريد لجميع الموردين +RequiredIfCustomer=مطلوب ، إذا كان الطرف الثالث عميلاً أو فرصة +RequiredIfSupplier=مطلوب إذا كان الطرف الثالث موردا +ValidityControledByModule=الصلاحية يتحكم بها في الوحدة +ThisIsModuleRules=قواعد هذه الوحدة +ProspectToContact=فرصة للاتصال +CompanyDeleted=تم حذف شركة "%s" من قاعدة البيانات. +ListOfContacts=قائمة جهات الاتصال | العناوين +ListOfContactsAddresses=قائمة جهات الاتصال | العناوين +ListOfThirdParties=قائمة الأطراف الثالثة +ShowCompany=طرف ثالث +ShowContact=عنوان الإتصال +ContactsAllShort=الكل (بدون فلتر) ContactType=نوع الاتصال -ContactForOrders=أوامر اتصال -ContactForOrdersOrShipments=Order's or shipment's contact -ContactForProposals=مقترحات اتصال -ContactForContracts=عقود اتصال -ContactForInvoices=فواتير اتصال -NoContactForAnyOrder=هذا الاتصال ليس من أجل أي اتصال -NoContactForAnyOrderOrShipments=This contact is not a contact for any order or shipment -NoContactForAnyProposal=هذا الاتصال ليست على اتصال في أي اقتراح التجارية -NoContactForAnyContract=هذا الاتصال ليس أي عقد للاتصال -NoContactForAnyInvoice=هذا الاتصال ليست على اتصال في أي فاتورة -NewContact=اتصال جديد -NewContactAddress=New Contact/Address -MyContacts=اتصالاتي +ContactForOrders=جهة اتصال الامر +ContactForOrdersOrShipments=جهة اتصال الامر أو الشحنة +ContactForProposals=جهة اتصال العروض +ContactForContracts=جهة اتصال العقد +ContactForInvoices=جهة اتصال الفاتورة +NoContactForAnyOrder=جهة الاتصال هذه ليست جهة اتصال لأي امر +NoContactForAnyOrderOrShipments=جهة الاتصال هذه ليست جهة اتصال لأي امر أو شحنة +NoContactForAnyProposal=جهة الاتصال هذه ليست جهة اتصال لأي عرض تجاري +NoContactForAnyContract=جهة الاتصال هذه ليست جهة اتصال لأي عقد +NoContactForAnyInvoice=جهة الاتصال هذه ليست جهة اتصال لأي فاتورة +NewContact=جهة اتصال جديدة +NewContactAddress=جهة اتصال | عنوان جديد +MyContacts=جهات الاتصال الخاصة بي Capital=رأس المال -CapitalOf=ق ٪ من رأس المال +CapitalOf=راس مال %s EditCompany=تحرير الشركة -ThisUserIsNot=This user is not a prospect, customer or vendor +ThisUserIsNot=هذا المستخدم ليس فرصة أو عميل أو مورد VATIntraCheck=فحص VATIntraCheckDesc=The VAT ID must include the country prefix. The link <b>%s</b> uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do -VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commission website -VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> -ErrorVATCheckMS_UNAVAILABLE=وليس من الممكن التحقق. تأكد من خدمة لا تقدمها دولة عضو (في المائة). -NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Business entity type -Workforce=Workforce +VATIntraCheckableOnEUSite=تحقق من معرف ضريبة القيمة المضافة داخل الاتجاد على موقع المفوضية الأوروبية +VATIntraManualCheck=يمكنك أيضًا التحقق يدويًا على موقع المفوضية الأوروبية <a href="%s" target="_blank"> %s </a> +ErrorVATCheckMS_UNAVAILABLE=تحقق غير ممكن. لا يتم توفير خدمة التحقق من قبل الدولة العضو (%s). +NorProspectNorCustomer=ليس فرصة، ولا عميل +JuridicalStatus=نوع الكيان التجاري +Workforce=القوى العاملة Staff=الموظفين ProspectLevelShort=المحتملة -ProspectLevel=آفاق محتملة -ContactPrivate=القطاع الخاص -ContactPublic=تقاسم +ProspectLevel=فرص محتملة +ContactPrivate=خاص +ContactPublic=مشترك ContactVisibility=الرؤية -ContactOthers=الآخر -OthersNotLinkedToThirdParty=أخرى ، لا صلة لطرف ثالث -ProspectStatus=آفاق الوضع -PL_NONE=Aucun +ContactOthers=اخرى +OthersNotLinkedToThirdParty=آخرون غير مرتبطين بطرف ثالث +ProspectStatus=حالة الفرصة +PL_NONE=لا أحد PL_UNKNOWN=غير معروف PL_LOW=منخفض PL_MEDIUM=المتوسط @@ -377,93 +385,93 @@ PL_HIGH=عال TE_UNKNOWN=- TE_STARTUP=بدء التشغيل TE_GROUP=شركة كبرى -TE_MEDIUM=شركة المتوسط -TE_ADMIN=الحكومية ، +TE_MEDIUM=شركة متوسطة +TE_ADMIN=حكومي TE_SMALL=شركة صغيرة -TE_RETAIL=مبيعات التجزئة -TE_WHOLE=Wholesaler +TE_RETAIL=بائع تجزئة +TE_WHOLE=تاجر الجملة TE_PRIVATE=فرد TE_OTHER=أخرى -StatusProspect-1=لا اتصال -StatusProspect0=اتصل أبدا -StatusProspect1=To be contacted +StatusProspect-1=لا تتصل +StatusProspect0=لم يتصل +StatusProspect1=سوف يتم الاتصال StatusProspect2=في عملية الاتصال -StatusProspect3=الاتصال به -ChangeDoNotContact=لتغيير الوضع لا اتصال ' -ChangeNeverContacted=لتغيير الوضع 'اتصل أبدا' -ChangeToContact=Change status to 'To be contacted' -ChangeContactInProcess=لتغيير الوضع 'في عملية' -ChangeContactDone=لتغيير الوضع 'فعل' -ProspectsByStatus=آفاق الوضع +StatusProspect3=تم الاتصال +ChangeDoNotContact=تغيير الحالة إلى "عدم الاتصال" +ChangeNeverContacted=تغيير الحالة إلى "لم يتم الاتصال" +ChangeToContact=تغيير الحالة إلى "ليتم الاتصال" +ChangeContactInProcess=تغيير الحالة إلى "في عملية الاتصال" +ChangeContactDone=تغيير الحالة إلى "تم الاتصال" +ProspectsByStatus=الفرص حسب الحالة NoParentCompany=بلا -ExportCardToFormat=تصدير بطاقة شكل -ContactNotLinkedToCompany=اتصالات ليست مرتبطة بطرف ثالث -DolibarrLogin=ادخل Dolibarr -NoDolibarrAccess=لا Dolibarr الوصول -ExportDataset_company_1=Third-parties (companies/foundations/physical people) and their properties -ExportDataset_company_2=Contacts and their properties -ImportDataset_company_1=Third-parties and their properties -ImportDataset_company_2=Third-parties additional contacts/addresses and attributes -ImportDataset_company_3=Third-parties Bank accounts -ImportDataset_company_4=Third-parties Sales representatives (assign sales representatives/users to companies) -PriceLevel=Price Level -PriceLevelLabels=Price Level Labels +ExportCardToFormat=تصدير البطاقة إلى التنسيق +ContactNotLinkedToCompany=جهة الاتصال ليست مرتبطة بأي طرف ثالث +DolibarrLogin=تسجيل الدخول الى دوليبار +NoDolibarrAccess=لا يوجد وصول دوليبار +ExportDataset_company_1=الأطراف الثالثة (الشركات / المؤسسات / الأشخاص الطبيعيون) وممتلكاتهم +ExportDataset_company_2=جهات الاتصال وخصائصها +ImportDataset_company_1=الأطراف الثالثة وممتلكاتهم +ImportDataset_company_2=جهات اتصال | عناوين وسمات إضافية للأطراف الثالثة +ImportDataset_company_3=حسابات بنكية لأطراف ثالثة +ImportDataset_company_4=ممثلو مبيعات اطراف ثالثة (تعيين مندوبي مبيعات / مستخدمين للشركات) +PriceLevel=مستوى السعر +PriceLevelLabels=تسميات مستوى السعر DeliveryAddress=عنوان التسليم -AddAddress=أضف معالجة -SupplierCategory=Vendor category -JuridicalStatus200=Independent +AddAddress=اضف عنوان +SupplierCategory=فئة المورد +JuridicalStatus200=مستقل DeleteFile=حذف الملفات -ConfirmDeleteFile=هل أنت متأكد من أنك تريد حذف هذا الملف؟ -AllocateCommercial=Assigned to sales representative -Organization=المنظمة -FiscalYearInformation=Fiscal Year -FiscalMonthStart=ابتداء من شهر من السنة المالية -SocialNetworksInformation=Social networks +ConfirmDeleteFile=هل أنت متأكد أنك تريد حذف هذا الملف؟ +AllocateCommercial=مخصص لمندوب المبيعات +Organization=المؤسسة +FiscalYearInformation=السنة المالية +FiscalMonthStart=شهر البداية للسنة المالية +SocialNetworksInformation=الشبكات الاجتماعية SocialNetworksFacebookURL=Facebook URL SocialNetworksTwitterURL=Twitter URL SocialNetworksLinkedinURL=Linkedin URL SocialNetworksInstagramURL=Instagram URL SocialNetworksYoutubeURL=Youtube URL SocialNetworksGithubURL=Github URL -YouMustAssignUserMailFirst=You must create an email for this user prior to being able to add an email notification. -YouMustCreateContactFirst=To be able to add email notifications, you must first define contacts with valid emails for the third party -ListSuppliersShort=List of Vendors -ListProspectsShort=List of Prospects -ListCustomersShort=List of Customers -ThirdPartiesArea=Third Parties/Contacts -LastModifiedThirdParties=Latest %s modified Third Parties -UniqueThirdParties=Total of Third Parties +YouMustAssignUserMailFirst=يجب عليك إنشاء بريد إلكتروني لهذا المستخدم قبل أن تتمكن من إضافة إشعار بريد إلكتروني. +YouMustCreateContactFirst=لتتمكن من إضافة إشعارات البريد الإلكتروني ، يجب عليك أولاً تحديد جهات الاتصال التي تحتوي على رسائل بريد إلكتروني صالحة للطرف الثالث +ListSuppliersShort=قائمة الموردين +ListProspectsShort=قائمة الفرص +ListCustomersShort=قائمة العملاء +ThirdPartiesArea=الأطراف الثالثة | جهات الاتصال +LastModifiedThirdParties=آخر %s أطراف ثالثة معدلة +UniqueThirdParties=إجمالي الأطراف الثالثة InActivity=فتح ActivityCeased=مغلق -ThirdPartyIsClosed=Third party is closed -ProductsIntoElements=قائمة المنتجات / الخدمات إلى %s -CurrentOutstandingBill=فاتورة المستحق حاليا -OutstandingBill=ماكس. لمشروع قانون المتميز -OutstandingBillReached=Max. for outstanding bill reached -OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. -LeopardNumRefModelDesc=العميل / المورد مدونة مجانية. هذا القانون يمكن تعديلها في أي وقت. -ManagingDirectors=مدير (ق) اسم (CEO، مدير، رئيس ...) -MergeOriginThirdparty=تكرار طرف ثالث (طرف ثالث كنت ترغب في حذف) +ThirdPartyIsClosed=الطرف الثالث مغلق +ProductsIntoElements=قائمة المنتجات | الخدمات في %s +CurrentOutstandingBill=فاتورة مستحقة حاليا +OutstandingBill=الأعلى للفاتورة المستحقة +OutstandingBillReached=الأعلى لفاتورة مستحقة وصلت +OrderMinAmount=الحد الأدنى للطلب +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. +LeopardNumRefModelDesc=الكود مجاني. يمكن تعديل هذا الكود في أي وقت. +ManagingDirectors=اسم المدير (المديرون) (الرئيس التنفيذي ، المدير ، الرئيس) +MergeOriginThirdparty=طرف ثالث مكرر (الطرف الثالث الذي تريد حذفه) MergeThirdparties=دمج أطراف ثالثة -ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party, then the third party will be deleted. -ThirdpartiesMergeSuccess=Third parties have been merged -SaleRepresentativeLogin=Login of sales representative -SaleRepresentativeFirstname=First name of sales representative -SaleRepresentativeLastname=Last name of sales representative -ErrorThirdpartiesMerge=There was an error when deleting the third parties. Please check the log. Changes have been reverted. -NewCustomerSupplierCodeProposed=Customer or Vendor code already used, a new code is suggested -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +ConfirmMergeThirdparties=هل أنت متأكد أنك تريد دمج هذا الطرف الثالث في الطرف الحالي؟ سيتم نقل جميع العناصر المرتبطة (الفواتير ، الطلبات) إلى الطرف الثالث الحالي ، ثم سيتم حذف الطرف الثالث. +ThirdpartiesMergeSuccess=تم دمج الأطراف الثالثة +SaleRepresentativeLogin=تسجيل دخول مندوب مبيعات +SaleRepresentativeFirstname=الاسم الأول لمندوب المبيعات +SaleRepresentativeLastname=الاسم الأخير لمندوب المبيعات +ErrorThirdpartiesMerge=حدث خطأ عند حذف الطرف الثالث. يرجى التحقق من السجل. تم التراجع عن التغييرات. +NewCustomerSupplierCodeProposed=تم استخدام كود العميل أو المورد بالفعل ، تم اقتراح كود جديد +KeepEmptyIfGenericAddress=اترك هذا الحقل فارغًا إذا كان هذا العنوان هو عنوان عام #Imports -PaymentTypeCustomer=Payment Type - Customer -PaymentTermsCustomer=Payment Terms - Customer -PaymentTypeSupplier=Payment Type - Vendor -PaymentTermsSupplier=Payment Term - Vendor -PaymentTypeBoth=Payment Type - Customer and Vendor -MulticurrencyUsed=Use Multicurrency +PaymentTypeCustomer=نوع السداد - العميل +PaymentTermsCustomer=شروط السداد - العميل +PaymentTypeSupplier=نوع السداد - المورد +PaymentTermsSupplier=شروط السداد - المورد +PaymentTypeBoth=نوع السداد - العميل والمورد +MulticurrencyUsed=استخدم عملات متعددة MulticurrencyCurrency=العملة -InEEC=Europe (EEC) -RestOfEurope=Rest of Europe (EEC) -OutOfEurope=Out of Europe (EEC) -CurrentOutstandingBillLate=Current outstanding bill late -BecarefullChangeThirdpartyBeforeAddProductToInvoice=Be carefull, depending on your product price settings, you should change thirdparty before adding product to POS. +InEEC=أوروبا (الاتحاد الاوروبي) +RestOfEurope=بقية أوروبا (EEC) +OutOfEurope=خارج أوروبا (EEC) +CurrentOutstandingBillLate=الفاتورة الحالية المتأخرة +BecarefullChangeThirdpartyBeforeAddProductToInvoice=كن حذرًا ، اعتمادًا على إعدادات سعر المنتج ، يجب عليك تغيير الطرف الثالث قبل إضافة المنتج إلى نقطة البيع. diff --git a/htdocs/langs/ar_SA/compta.lang b/htdocs/langs/ar_SA/compta.lang index 7b8dd642c33..97365780ddc 100644 --- a/htdocs/langs/ar_SA/compta.lang +++ b/htdocs/langs/ar_SA/compta.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - compta -MenuFinancial=Billing | Payment +MenuFinancial=الفواتير | السداد TaxModuleSetupToModifyRules=الذهاب إلى <a href="%s">الإعداد حدة الضرائب</a> لتعديل قواعد حساب TaxModuleSetupToModifyRulesLT=الذهاب إلى <a href="%s">إعداد الشركة</a> لتعديل قواعد حساب OptionMode=الخيار المحاسبة @@ -11,30 +11,30 @@ FeatureIsSupportedInInOutModeOnly=الميزة الوحيدة المتاحة ف VATReportBuildWithOptionDefinedInModule=المبالغ المبينة هنا يتم حسابها باستخدام القواعد التي تحددها وحدة الإعداد الضرائب. LTReportBuildWithOptionDefinedInModule=وتحسب المبالغ المبينة هنا باستخدام القواعد التي يحددها الإعداد الشركة. Param=الإعداد -RemainingAmountPayment=Amount payment remaining: +RemainingAmountPayment=المبلغ المتبقي: Account=حساب Accountparent=Parent account Accountsparent=Parent accounts Income=الدخل Outcome=نتائج MenuReportInOut=دخل / نتائج -ReportInOut=Balance of income and expenses +ReportInOut=ميزان الايرادات والمصروفات ReportTurnover=Turnover invoiced ReportTurnoverCollected=Turnover collected PaymentsNotLinkedToInvoice=المدفوعات ليست مرتبطة بأي الفاتورة ، وذلك ليس مرتبطا بأي طرف ثالث PaymentsNotLinkedToUser=المدفوعات ليست مرتبطة بأي مستخدم Profit=الأرباح AccountingResult=نتيجة المحاسبة -BalanceBefore=Balance (before) +BalanceBefore=الميزان (قبل) Balance=التوازن Debit=الخصم Credit=الائتمان Piece=تمثل الوثيقة. AmountHTVATRealReceived=جمعت HT AmountHTVATRealPaid=HT المدفوعة -VATToPay=Tax sales -VATReceived=Tax received -VATToCollect=Tax purchases +VATToPay=المبيعات الضريبية +VATReceived=تم استلام الضريبة +VATToCollect=المشتريات الضريبية VATSummary=Tax monthly VATBalance=Tax Balance VATPaid=Tax paid @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=جمعت ضريبة القيمة المضافة StatusToPay=دفع SpecialExpensesArea=منطقة لجميع المدفوعات الخاصة +VATExpensesArea=منطقة لجميع مدفوعات TVA SocialContribution=الضريبة الاجتماعية أو المالية SocialContributions=الضرائب الاجتماعية أو المالية SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=الزبون تسديد الفاتورة PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=اجتماعي / دفع الضرائب المالية PaymentVat=دفع ضريبة القيمة المضافة +AutomaticCreationPayment=Automatically record the payment ListPayment=قائمة المدفوعات ListOfCustomerPayments=قائمة مدفوعات العملاء ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF الدفع LT2PaymentsES=الدفعات IRPF VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=استقبال المدخلات تاريخ الشيك NbOfCheques=No. of checks PaySocialContribution=دفع ضريبة اجتماعية / مالية -ConfirmPaySocialContribution=هل أنت متأكد أنك تريد أن تصنيف هذه الضريبة الاجتماعية أو المالية كما دفعت؟ +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=حذف دفع الضرائب الاجتماعي أو المالي -ConfirmDeleteSocialContribution=هل أنت متأكد أنك تريد حذف / دفع الضرائب المالية الاجتماعي؟ +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=الضرائب والمدفوعات الاجتماعية والمالية CalcModeVATDebt=<b>الوضع٪ SVAT بشأن المحاسبة الالتزام٪ الصورة.</b> CalcModeVATEngagement=وضع <b>SVAT٪ على مداخيل مصاريف٪ الصورة.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- ويشمل المدفوعات الحقيقية المحرز RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=تقرير من ضريبة القيمة المضافة العملاء جمع ودفع VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=تقرير معدل RE @@ -217,7 +231,7 @@ Pcg_subtype=PCG النوع الفرعي InvoiceLinesToDispatch=خطوط الفاتورة لارسال ByProductsAndServices=By product and service RefExt=المرجع الخارجي -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=تصل إلى النظام Mode1=طريقة 1 Mode2=طريقة 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=استنساخ لشهر المقبل SimpleReport=تقرير بسيط AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/ar_SA/ecm.lang b/htdocs/langs/ar_SA/ecm.lang index 7ad2d6317de..94e1664bd58 100644 --- a/htdocs/langs/ar_SA/ecm.lang +++ b/htdocs/langs/ar_SA/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ar_SA/errors.lang b/htdocs/langs/ar_SA/errors.lang index bf46cf3364d..8ed6de325ed 100644 --- a/htdocs/langs/ar_SA/errors.lang +++ b/htdocs/langs/ar_SA/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=لم يتم العثور على دليل <b>%s</b> (مسار غ ErrorFunctionNotAvailableInPHP=<b>ق ٪</b> وظيفة مطلوبة لهذه الميزة ولكن لا تتوافر في هذه النسخة / الإعداد للPHP. ErrorDirAlreadyExists=دليل بهذا الاسم بالفعل. ErrorFileAlreadyExists=ملف بهذا الاسم موجود مسبقا. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=الملف لم تتلق تماما بواسطة الخادم. ErrorNoTmpDir=%s directy مؤقتة لا وجود. ErrorUploadBlockedByAddon=حظر حمل من قبل البرنامج المساعد بى اباتشي /. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ar_SA/externalsite.lang b/htdocs/langs/ar_SA/externalsite.lang index 5ef5bd5ca9d..e1c326b4787 100644 --- a/htdocs/langs/ar_SA/externalsite.lang +++ b/htdocs/langs/ar_SA/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=إعداد رابط لموقع خارجي -ExternalSiteURL=رابط للموقع الخارجي +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=لم يتم تهيئة نموذج الموقع الخارجي بصورة صحيحة. ExampleMyMenuEntry=مُدخل قائمتي diff --git a/htdocs/langs/ar_SA/main.lang b/htdocs/langs/ar_SA/main.lang index 22d691bfb23..bb91885ee64 100644 --- a/htdocs/langs/ar_SA/main.lang +++ b/htdocs/langs/ar_SA/main.lang @@ -5,7 +5,7 @@ DIRECTION=rtl # stsongstdlight or cid0cs are for simplified Chinese # To read Chinese pdf with Linux: sudo apt-get install poppler-data FONTFORPDF=DejaVuSans -FONTSIZEFORPDF=9 +FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=None FormatDateShort=%d/%m/%Y @@ -24,110 +24,110 @@ FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=اتصال قاعدة البيانات -NoTemplateDefined=No template available for this email type -AvailableVariables=Available substitution variables +NoTemplateDefined=لا يوجد قالب متاح لهذا النوع من البريد الإلكتروني +AvailableVariables=متغيرات الاستبدال المتاحة NoTranslation=لا يوجد ترجمة Translation=الترجمة CurrentTimeZone=حسب توقيت خادم البي إتش بي -EmptySearchString=Enter non empty search criterias -EnterADateCriteria=Enter a date criteria +EmptySearchString=أدخل معايير بحث غير فارغة +EnterADateCriteria=أدخل معايير التاريخ NoRecordFound=لا يوجد سجلات -NoRecordDeleted=No record deleted -NotEnoughDataYet=Not enough data +NoRecordDeleted=لم يتم حذف أي سجل +NotEnoughDataYet=لا توجد بيانات كافية NoError=لا خطأ Error=خطأ Errors=أخطاء -ErrorFieldRequired=مطلوب حقل '%s' ق -ErrorFieldFormat=حقل '٪ ق' له قيمة سيئة -ErrorFileDoesNotExists=الملف غير موجود٪ الصورة -ErrorFailedToOpenFile=فشل في فتح الملف٪ الصورة -ErrorCanNotCreateDir=Cannot create dir %s -ErrorCanNotReadDir=Cannot read dir %s -ErrorConstantNotDefined=المعلمة %s غير معرف +ErrorFieldRequired=الحقل "%s" مطلوب +ErrorFieldFormat=يحتوي الحقل "%s" على قيمة غير صالحة +ErrorFileDoesNotExists=الملف %s غير موجود +ErrorFailedToOpenFile=فشل فى فتح الملف %s +ErrorCanNotCreateDir=لا يمكن إنشاء الدليل %s +ErrorCanNotReadDir=لا يمكن قراءة الدليل %s +ErrorConstantNotDefined=المعامل %s غير معرف ErrorUnknown=خطأ غير معروف ErrorSQL=خطأ SQL -ErrorLogoFileNotFound=لم يتم العثور على ملف شعار '٪ ق' -ErrorGoToGlobalSetup=Go to 'Company/Organization' setup to fix this -ErrorGoToModuleSetup=الذهاب إلى الوحدة الإعداد لإصلاح هذه -ErrorFailedToSendMail=فشل في إرسال البريد (المرسل =٪ ق، استقبال =٪ ق) -ErrorFileNotUploaded=ويتم تحميل الملف. تحقق لا يتجاوز هذا الحجم الأقصى المسموح به، أن المساحة الحرة المتوفرة على القرص والتي لا يوجد بالفعل ملف بنفس الاسم في هذا الدليل. -ErrorInternalErrorDetected=خطأ الكشف عن -ErrorWrongHostParameter=المعلمة المضيف خاطئة -ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post the form again. -ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child record. +ErrorLogoFileNotFound=لم يتم العثور على ملف الشعار '%s' +ErrorGoToGlobalSetup=انتقل إلى إعدادات "الشركة | المؤسسة" لإصلاح ذلك +ErrorGoToModuleSetup=انتقل إلى إعدادات الوحدة النمطية لإصلاح هذا +ErrorFailedToSendMail=فشل في إرسال البريد (المرسل = %s ، المتلقي = %s) +ErrorFileNotUploaded=لم يتم تحميل الملف. تحقق من أن الحجم لا يتجاوز الحد الأقصى المسموح به ، وأن المساحة الخالية متوفرة على القرص وأنه لا يوجد بالفعل ملف بنفس الاسم في هذا الدليل. +ErrorInternalErrorDetected=تم الكشف عن خطأ +ErrorWrongHostParameter=معامل مضيف خاطئ (Wrong host parameter) +ErrorYourCountryIsNotDefined=لم يتم تعريف بلدك. انتقل إلى Home-Setup-Edit وانشر النموذج مرة أخرى. +ErrorRecordIsUsedByChild=فشل حذف هذا السجل. يتم استخدام هذا السجل من قبل سجل فرعي واحد على الأقل. ErrorWrongValue=قيمة خاطئة -ErrorWrongValueForParameterX=قيمة خاطئة للمعلمة٪ الصورة -ErrorNoRequestInError=أي طلب في الخطأ -ErrorServiceUnavailableTryLater=Service not available at the moment. Try again later. +ErrorWrongValueForParameterX=قيمة خاطئة للمعامل (parameter) %s +ErrorNoRequestInError=لا يوجد طلب عن طريق الخطأ +ErrorServiceUnavailableTryLater=الخدمة غير متوفرة في الوقت الحالي. حاول مرة أخرى في وقت لاحق. ErrorDuplicateField=قيمة مكررة في حقل فريد -ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. Changes have been rolled back. -ErrorConfigParameterNotDefined=Parameter <b>%s</b> is not defined in the Dolibarr config file <b>conf.php</b>. -ErrorCantLoadUserFromDolibarrDatabase=فشل في العثور على <b>المستخدم٪ الصورة</b> في قاعدة بيانات Dolibarr. -ErrorNoVATRateDefinedForSellerCountry=خطأ، لا معدلات ضريبة القيمة المضافة المحددة للبلد '٪ ق'. -ErrorNoSocialContributionForSellerCountry=خطأ، لا الاجتماعي / المالي نوع الضرائب المحددة للبلد '٪ ق'. +ErrorSomeErrorWereFoundRollbackIsDone=تم العثور على بعض الأخطاء. تم التراجع عن التغييرات. +ErrorConfigParameterNotDefined=لم يتم تعريف المعامل <b> %s </b> في ملف تكوين <b>Dolibarr </b> conf.php . +ErrorCantLoadUserFromDolibarrDatabase=فشل العثور على المستخدم <b> %s </b> في قاعدة بيانات Dolibarr. +ErrorNoVATRateDefinedForSellerCountry=خطأ ، لم يتم تحديد معدلات ضريبة القيمة المضافة للبلد "%s". +ErrorNoSocialContributionForSellerCountry=خطأ ، لم يتم تحديد نوع الضرائب الاجتماعية | المالية للبلد "%s". ErrorFailedToSaveFile=خطأ، فشل في حفظ الملف. -ErrorCannotAddThisParentWarehouse=You are trying to add a parent warehouse which is already a child of a existing warehouse -MaxNbOfRecordPerPage=Max. number of records per page +ErrorCannotAddThisParentWarehouse=أنت تحاول إضافة مستودع رئيسي هو بالفعل تابع لمستودع موجود +MaxNbOfRecordPerPage=عدد السجلات الاعلى في الصفحة الواحدة NotAuthorized=غير مصرح لك ان تفعل ذلك. -SetDate=التاريخ المحدد -SelectDate=تحديد تاريخ -SeeAlso=انظر أيضا الصورة٪ +SetDate=تحديد التاريخ +SelectDate=اختر التاريخ +SeeAlso=راجع أيضًا %s SeeHere=انظر هنا ClickHere=اضغط هنا -Here=Here +Here=هنا Apply=تطبيق BackgroundColorByDefault=لون الخلفية الافتراضية -FileRenamed=The file was successfully renamed -FileGenerated=The file was successfully generated -FileSaved=The file was successfully saved +FileRenamed=تمت إعادة تسمية الملف بنجاح +FileGenerated=تم إنشاء الملف بنجاح +FileSaved=تم حفظ الملف بنجاح FileUploaded=تم تحميل الملف بنجاح -FileTransferComplete=File(s) uploaded successfully -FilesDeleted=File(s) successfully deleted -FileWasNotUploaded=يتم اختيار ملف لمرفق ولكن لم تحميلها بعد. انقر على "إرفاق ملف" لهذا الغرض. -NbOfEntries=No. of entries -GoToWikiHelpPage=Read online help (Internet access needed) +FileTransferComplete=تم تحميل الملف (الملفات) بنجاح +FilesDeleted=تم حذف الملف (الملفات) بنجاح +FileWasNotUploaded=تم تحديد ملف للإرفاق ولكن لم يتم تحميله بعد. انقر فوق "إرفاق ملف" لهذا الغرض. +NbOfEntries=عدد الإدخالات +GoToWikiHelpPage=قراءة التعليمات عبر الإنترنت (يلزم الاتصال بالإنترنت) GoToHelpPage=قراءة المساعدة -DedicatedPageAvailable=There is a dedicated help page related to your current screen -HomePage=Home Page -RecordSaved=سجل حفظ +DedicatedPageAvailable=هناك صفحة تعليمات مخصصة تتعلق بشاشتك الحالية +HomePage=الصفحة الرئيسية +RecordSaved=تم حفظ سجل RecordDeleted=سجل محذوف -RecordGenerated=Record generated -LevelOfFeature=مستوى ميزات +RecordGenerated=تم إنشاء سجل +LevelOfFeature=مستوى الميزات NotDefined=غير معرف -DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr authentication mode is set to <b>%s</b> in configuration file <b>conf.php</b>.<br>This means that the password database is external to Dolibarr, so changing this field may have no effect. +DolibarrInHttpAuthenticationSoPasswordUseless=تم ضبط وضع مصادقة Dolibarr على <b> %s </b> في ملف التكوين <b> conf.php </b>. <br> هذا يعني أن قاعدة بيانات كلمة المرور خارجية لـ Dolibarr ، لذلك قد لا يكون لتغيير هذا الحقل أي تأثير. Administrator=مدير Undefined=غير محدد -PasswordForgotten=Password forgotten? -NoAccount=No account? +PasswordForgotten=هل نسيت كلمة المرور؟ +NoAccount=لا يوجد حساب؟ SeeAbove=أنظر فوق HomeArea=الصفحة الرئيسية -LastConnexion=Last login -PreviousConnexion=Previous login -PreviousValue=Previous value -ConnectedOnMultiCompany=إتصال على البيئة -ConnectedSince=إتصال منذ -AuthenticationMode=Authentication mode -RequestedUrl=Requested URL -DatabaseTypeManager=نوع قاعدة البيانات مدير -RequestLastAccessInError=Latest database access request error -ReturnCodeLastAccessInError=Return code for latest database access request error -InformationLastAccessInError=Information for latest database access request error -DolibarrHasDetectedError=كشف Dolibarr خطأ فني -YouCanSetOptionDolibarrMainProdToZero=You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information. -InformationToHelpDiagnose=This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices) +LastConnexion=آخر تسجيل دخول +PreviousConnexion=تسجيل الدخول السابق +PreviousValue=القيمة السابقه +ConnectedOnMultiCompany=متصل بالبيئة +ConnectedSince=متصل منذ +AuthenticationMode=وضع المصادقة +RequestedUrl=مطلوب URL +DatabaseTypeManager=مدير نوع قاعدة البيانات +RequestLastAccessInError=أحدث خطأ في طلب الوصول إلى قاعدة البيانات +ReturnCodeLastAccessInError=إرجاع الكود لأحدث خطأ في طلب الوصول إلى قاعدة البيانات +InformationLastAccessInError=معلومات عن خطأ طلب الوصول إلى قاعدة البيانات الأخيرة +DolibarrHasDetectedError=Dolibarr اكتشف خطأ تقني +YouCanSetOptionDolibarrMainProdToZero=يمكنك قراءة ملف السجل أو تعيين الخيار $ dolibarr_main_prod إلى "0" في (config file) للحصول على مزيد من المعلومات. +InformationToHelpDiagnose=يمكن أن تكون هذه المعلومات مفيدة لأغراض التشخيص (يمكنك تعيين الخيار $ dolibarr_main_prod على "1" لإزالة هذه الإشعارات) MoreInformation=المزيد من المعلومات TechnicalInformation=المعلومات التقنية TechnicalID=ID الفني -LineID=Line ID -NotePublic=ملاحظة (الجمهور) -NotePrivate=ملاحظة (خاص) -PrecisionUnitIsLimitedToXDecimals=كان Dolibarr الإعداد للحد من دقة أسعار الوحدات إلى <b>العشرية٪ الصورة.</b> +LineID=معرف البند +NotePublic=ملاحظة (عامة) +NotePrivate=ملاحظة (خاصة) +PrecisionUnitIsLimitedToXDecimals=تم إعداد Dolibarr للحد من دقة أسعار الوحدات إلى <b> %s </b> العشرية. DoTest=اختبار ToFilter=فلتر -NoFilter=No filter -WarningYouHaveAtLeastOneTaskLate=Warning, you have at least one element that has exceeded the tolerance time. -yes=نعم فعلا -Yes=نعم فعلا +NoFilter=بدون فلتر +WarningYouHaveAtLeastOneTaskLate=تحذير ، لديك عنصر واحد على الأقل تجاوز وقت التسامح(tolerance time). +yes=نعم +Yes=نعم no=لا No=لا All=جميع @@ -135,124 +135,124 @@ Home=الصفحة الرئيسية Help=مساعدة OnlineHelp=مساعدة على الانترنت PageWiki=صفحة ويكيبيديا -MediaBrowser=Media browser +MediaBrowser=متصفح الوسائط Always=دائما Never=أبدا Under=تحت Period=فترة PeriodEndDate=تاريخ انتهاء الفترة -SelectedPeriod=Selected period -PreviousPeriod=Previous period -Activate=فعل -Activated=تنشيط +SelectedPeriod=الفترة المحددة +PreviousPeriod=الفترة السابقة +Activate=تفعيل +Activated=مفعل Closed=مغلق Closed2=مغلق -NotClosed=Not closed -Enabled=تمكين +NotClosed=ليست مغلقة +Enabled=ممكن Enable=تمكين -Deprecated=انتقدت +Deprecated=إهمال Disable=تعطيل -Disabled=تعطيل +Disabled=معطل Add=إضافة -AddLink=إضافة وصلة -RemoveLink=نلغي -AddToDraft=Add to draft +AddLink=إضافة رابط +RemoveLink=إزالة رابط +AddToDraft=أضف إلى المسودة Update=تحديث Close=إغلاق -CloseAs=Set status to -CloseBox=Remove widget from your dashboard +CloseAs=ضبط الحالة على +CloseBox=إزالة القطعة (widget) من لوحة القيادة الخاصة بك Confirm=تأكيد -ConfirmSendCardByMail=Do you really want to send the content of this card by mail to <b>%s</b>? +ConfirmSendCardByMail=هل تريد حقًا إرسال محتوى هذه البطاقة بالبريد إلى <b> %s </b>؟ Delete=حذف Remove=إزالة -Resiliate=Terminate +Resiliate=تعطيل Cancel=إلغاء Modify=تعديل Edit=تحرير -Validate=التحقق من صحة -ValidateAndApprove=التحقق من صحة والموافقة -ToValidate=للتحقق من صحة -NotValidated=Not validated +Validate=اعتماد +ValidateAndApprove=الاعتماد والموافقة +ToValidate=للاعتماد +NotValidated=غير معتمد Save=حفظ SaveAs=حفظ باسم -SaveAndStay=Save and stay -SaveAndNew=Save and new +SaveAndStay=احفظ وامكث +SaveAndNew=حفظ وجديد TestConnection=اختبار الاتصال ToClone=استنساخ -ConfirmCloneAsk=Are you sure you want to clone the object <b>%s</b>? -ConfirmClone=Choose data you want to clone: +ConfirmCloneAsk=هل أنت متأكد أنك تريد استنساخ الكائن <b> %s </b>؟ +ConfirmClone=اختر البيانات التي تريد استنساخها: NoCloneOptionsSpecified=لا توجد بيانات لاستنساخ محددة. Of=من Go=اذهب -Run=اركض +Run=أدار | شغل CopyOf=نسخة من Show=تبين -Hide=Hide -ShowCardHere=مشاهدة بطاقة -Search=البحث عن -SearchOf=البحث عن +Hide=إخفاء +ShowCardHere=عرض بطاقة +Search=بحث +SearchOf=بحث SearchMenuShortCut=Ctrl + shift + f -QuickAdd=Quick add +QuickAdd=إضافة سريعة QuickAddMenuShortCut=Ctrl + shift + l -Valid=سارية المفعول -Approve=الموافقة +Valid=صالح +Approve=موافق Disapprove=رفض ReOpen=إعادة فتح Upload=Upload ToLink=حلقة الوصل Select=اختار -SelectAll=Select all +SelectAll=اختر الكل Choose=أختر -Resize=تغيير -ResizeOrCrop=Resize or Crop -Recenter=Recenter +Resize=تغيير الحجم +ResizeOrCrop=تغيير الحجم أو اقتصاص +Recenter=إعادة توسيط Author=مؤلف User=المستعمل Users=المستخدمين Group=مجموعة Groups=المجموعات -NoUserGroupDefined=لا توجد مجموعة يحددها المستخدم -Password=الرمز السري -PasswordRetype=أعد كتابة كلمة السر -NoteSomeFeaturesAreDisabled=لاحظ أن الكثير من الميزات / معطلة في هذه المظاهرة وحدات. +NoUserGroupDefined=لم يتم تحديد مجموعة مستخدمين +Password=كلمة المرور +PasswordRetype=أعد كتابة كلمة المرور +NoteSomeFeaturesAreDisabled=لاحظ أنه تم تعطيل الكثير من الميزات | الوحدات في هذا العرض التوضيحي. Name=اسم -NameSlashCompany=Name / Company +NameSlashCompany=الاسم | الشركة Person=شخص -Parameter=معلمة -Parameters=المعايير +Parameter=معامل +Parameters=العوامل Value=القيمة -PersonalValue=قيمة الشخصية -NewObject=New %s +PersonalValue=قيمة شخصية +NewObject=جديد %s NewValue=القيمة الجديدة -OldValue=Old value %s +OldValue=القيمة القديمة %s CurrentValue=القيمة الحالية -Code=رمز +Code=الكود Type=اكتب Language=لغة MultiLanguage=متعدد اللغات Note=ملاحظة -Title=العنوان +Title=اللقب Label=ملصق -RefOrLabel=المرجع. أو هذا الملصق +RefOrLabel=المرجع أو الملصق Info=سجل Family=عائلة Description=الوصف Designation=الوصف -DescriptionOfLine=وصف خط -DateOfLine=Date of line -DurationOfLine=Duration of line -Model=Doc template -DefaultModel=Default doc template +DescriptionOfLine=وصف البند +DateOfLine=تاريخ البند +DurationOfLine=مدة البند +Model=قالب المستند +DefaultModel=قالب المستند الافتراضي Action=حدث About=حول Number=عدد -NumberByMonth=عدد بحلول الشهر -AmountByMonth=المبلغ الشهر +NumberByMonth=العدد بالشهر +AmountByMonth=المبلغ بالشهر Numero=عدد -Limit=حد -Limits=حدود -Logout=تسجيل خروج -NoLogoutProcessWithAuthMode=أي ميزة قطع تطبيقية مع وضع <b>المصادقة٪ الصورة</b> +Limit=الحد +Limits=الحدود +Logout=تسجيل الخروج +NoLogoutProcessWithAuthMode=لا توجد ميزة قطع الاتصال التطبيقية مع وضع المصادقة <b> %s </b> Connection=تسجيل الدخول Setup=التثبيت Alert=إنذار @@ -262,42 +262,43 @@ Next=التالى Cards=بطاقات Card=بطاقة Now=الآن -HourStart=بدء ساعة -Deadline=Deadline +HourStart=ساعة البدء +Deadline=الموعد النهائي Date=التاريخ DateAndHour=التاريخ و الساعة -DateToday=Today's date -DateReference=Reference date +DateToday=تاريخ اليوم +DateReference=التاريخ المرجعي DateStart=تاريخ البدء DateEnd=تاريخ الانتهاء DateCreation=تاريخ الإنشاء -DateCreationShort=يخلق. التاريخ -IPCreation=Creation IP +DateCreationShort=تاريخ الإنشاء +IPCreation=إنشاء IP DateModification=تاريخ التعديل -DateModificationShort=Modif. التاريخ -IPModification=Modification IP -DateLastModification=Latest modification date -DateValidation=تاريخ التحقق من الصحة +DateModificationShort=تاريخ التعديل +IPModification=تعديل IP +DateLastModification=تاريخ آخر تعديل +DateValidation=تاريخ الاعتماد +DateSigning=Signing date DateClosing=الموعد النهائي DateDue=تاريخ الاستحقاق DateValue=تاريخ القيمة DateValueShort=تاريخ القيمة DateOperation=تاريخ التشغيل -DateOperationShort=دار الأوبرا. التاريخ +DateOperationShort=تاريخ التشغيل DateLimit=تاريخ الحد DateRequest=تاريخ الطلب DateProcess=تاريخ العملية -DateBuild=تقرير تاريخ الإنشاء -DatePayment=تاريخ الدفع +DateBuild=تاريخ إنشاء التقرير +DatePayment=تاريخ السداد DateApprove=تاريخ الموافقة DateApprove2=تاريخ الموافقة (موافقة الثانية) -RegistrationDate=Registration date -UserCreation=Creation user -UserModification=Modification user -UserValidation=Validation user -UserCreationShort=Creat. user -UserModificationShort=Modif. user -UserValidationShort=Valid. user +RegistrationDate=تاريخ التسجيل +UserCreation=المستخدم المنشأ +UserModification=المستخدم المعدل +UserValidation=المستخدم المعتمد +UserCreationShort=المستخدم المنشأ +UserModificationShort=المستخدم المعدل +UserValidationShort=المستخدم المعتمد DurationYear=سنة DurationMonth=شهر DurationWeek=أسبوع @@ -323,272 +324,274 @@ Minutes=دقيقة Seconds=ثواني Weeks=أسابيع Today=اليوم -Yesterday=اليوم السابق -Tomorrow=يوم غد +Yesterday=الأمس +Tomorrow=الغد Morning=صباح Afternoon=بعد الزوال -Quadri=قادري -MonthOfDay=شهر من اليوم -DaysOfWeek=Days of week -HourShort=H -MinuteShort=مليون +Quadri=Quadri +MonthOfDay=شهر اليوم +DaysOfWeek=ايام الاسبوع +HourShort=س +MinuteShort=د Rate=معدل -CurrencyRate=Currency conversion rate +CurrencyRate=معدل تحويل العملات UseLocalTax=يشمل الضرائب Bytes=بايت KiloBytes=كيلو بايت MegaBytes=ميغابايت GigaBytes=غيغا بايت TeraBytes=تيرابايت -UserAuthor=User of creation -UserModif=User of last update -b=ب. +UserAuthor=مستخدم الانشاء +UserModif=مستخدم آخر تحديث +b=بايت Kb=كيلوبايت Mb=ميغابايت Gb=جيجابايت -Tb=مرض السل +Tb=تيرابيت Cut=قطع Copy=نسخ Paste=لصق Default=افتراضي DefaultValue=القيمة الافتراضية -DefaultValues=Default values/filters/sorting +DefaultValues=القيم الافتراضية | التصفية | الفرز Price=السعر -PriceCurrency=Price (currency) +PriceCurrency=السعر (العملة) UnitPrice=سعر الوحدة -UnitPriceHT=Unit price (excl.) -UnitPriceHTCurrency=Unit price (excl.) (currency) +UnitPriceHT=سعر الوحدة (غير شامل) +UnitPriceHTCurrency=سعر الوحدة (غير شامل) (العملة) UnitPriceTTC=سعر الوحدة -PriceU=إلى أعلى -PriceUHT=UP (صافي) -PriceUHTCurrency=U.P (currency) -PriceUTTC=UP (شركة الضريبة) -Amount=كمية -AmountInvoice=قيمة الفاتورة -AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (excl. tax) -AmountInvoicedTTC=Amount invoiced (inc. tax) -AmountPayment=مبلغ الدفع -AmountHTShort=Amount (excl.) -AmountTTCShort=المبلغ (المؤتمر الوطني العراقي. الضريبية) -AmountHT=Amount (excl. tax) -AmountTTC=المبلغ (المؤتمر الوطني العراقي. الضريبية) +PriceU=سعر الوحدة +PriceUHT=سعر الوحدة (صافي) +PriceUHTCurrency=U.P (net) (currency) +PriceUTTC=السعر (شامل الضريبة) +Amount=المبلغ +AmountInvoice=مبلغ الفاتورة +AmountInvoiced=المبلغ المفوتر +AmountInvoicedHT=المبلغ المفوتر (بدون الضريبة) +AmountInvoicedTTC=المبلغ المفوتر (شامل الضريبة) +AmountPayment=مبلغ السداد +AmountHTShort=المبلغ (غير شامل الضريبة) +AmountTTCShort=المبلغ (شامل الضريبة) +AmountHT=المبلغ (غير شامل الضريبة) +AmountTTC=المبلغ (شامل الضريبة) AmountVAT=مبلغ الضريبة -MulticurrencyAlreadyPaid=Already paid, original currency -MulticurrencyRemainderToPay=Remain to pay, original currency -MulticurrencyPaymentAmount=Payment amount, original currency -MulticurrencyAmountHT=Amount (excl. tax), original currency -MulticurrencyAmountTTC=Amount (inc. of tax), original currency -MulticurrencyAmountVAT=Amount tax, original currency +MulticurrencyAlreadyPaid=مسددة ، العملة الأصلية +MulticurrencyRemainderToPay= المتبقي ، العملة الأصلية +MulticurrencyPaymentAmount=المبلغ المدفوع ، العملة الأصلية +MulticurrencyAmountHT=المبلغ (غير شامل الضريبة) ، العملة الأصلية +MulticurrencyAmountTTC=المبلغ (شامل الضريبة) ، العملة الأصلية +MulticurrencyAmountVAT=مبلغ الضريبة ، العملة الأصلية MulticurrencySubPrice=Amount sub price multi currency AmountLT1=مبلغ الضريبة 2 AmountLT2=مبلغ الضريبة 3 AmountLT1ES=كمية RE AmountLT2ES=كمية IRPF -AmountTotal=الكمية الكلية -AmountAverage=متوسط ​​كمية +AmountTotal=المبلغ الإجمالي +AmountAverage=متوسط المبلغ PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=النسبة المئوية للكائن الأصلي +AmountOrPercent=المبلغ أو النسبة المئوية Percentage=نسبة مئوية -Total=الإجمالي الكلي -SubTotal=حاصل الجمع -TotalHTShort=Total (excl.) -TotalHT100Short=Total 100%% (excl.) -TotalHTShortCurrency=Total (excl. in currency) -TotalTTCShort=إجمالي (شركة الضريبة) -TotalHT=إجمالي (شركة الضريبة) -TotalHTforthispage=إجمالي (شركة الضريبة) -Totalforthispage=Total for this page -TotalTTC=إجمالي (شركة الضريبة) -TotalTTCToYourCredit=الإجمالي (المؤتمر الوطني العراقي. الضريبية) لالائتمان الخاصة بك -TotalVAT=مجموع الضرائب -TotalVATIN=Total IGST +Total=الإجمالي +SubTotal=Subtotal +TotalHTShort=المجموع (غ ش ض) +TotalHT100Short=إجمالي 100%% (غ ش ض) +TotalHTShortCurrency=الاجمالى (غ.ش.ض بعملة) +TotalTTCShort=الإجمالي (ش.ض) +TotalHT=الإجمالي (غ.ش.ض) +TotalHTforthispage=الاجمالي لهذه الصفحة (غ.ش.ض) +Totalforthispage=الاجمالي لهذه الصفحة +TotalTTC=الإجمالي (ش.ض) +TotalTTCToYourCredit=الإجمالي (ش.ض) إلى رصيدك +TotalVAT=إجمالي الضريبة +TotalVATIN=إجمالي IGST TotalLT1=مجموع الضرائب 2 TotalLT2=مجموع الضرائب 3 TotalLT1ES=مجموع RE TotalLT2ES=مجموع IRPF -TotalLT1IN=Total CGST -TotalLT2IN=Total SGST -HT=Excl. tax -TTC=شركة الضرائب -INCVATONLY=Inc. VAT -INCT=Inc. all taxes +TotalLT1IN=إجمالي CGST +TotalLT2IN=إجمالي SGST +HT=غ.ش الضريبة +TTC=ش. الضريبة +INCVATONLY=ش. VAT +INCT=شامل جميع الضرائب VAT=ضريبة المبيعات VATIN=IGST VATs=ضرائب المبيعات -VATINs=IGST taxes -LT1=Sales tax 2 -LT1Type=Sales tax 2 type -LT2=Sales tax 3 -LT2Type=Sales tax 3 type +VATINs=ضرائب IGST +LT1=ضريبة المبيعات 2 +LT1Type=نوع ضريبة المبيعات 2 +LT2=ضريبة المبيعات 3 +LT2Type=نوع ضريبة المبيعات 3 LT1ES=RE LT2ES=IRPF LT1IN=CGST LT2IN=SGST LT1GC=Additionnal cents VATRate=معدل الضريبة -VATCode=Tax Rate code -VATNPR=Tax Rate NPR -DefaultTaxRate=Default tax rate +VATCode=كود معدل الضريبة +VATNPR=معدل ضريبة NPR +DefaultTaxRate=معدل الضريبة الافتراضي Average=متوسط Sum=مجموع Delta=دلتا -StatusToPay=دفع -RemainToPay=Remain to pay -Module=Module/Application -Modules=Modules/Applications +StatusToPay=للدفع +RemainToPay=المتبقي للدفع +Module=وحدة | تطبيق +Modules=الوحدات | التطبيقات Option=خيار -Filters=Filters +Filters=المرشحات List=قائمة -FullList=القائمة الكاملة -FullConversation=Full conversation +FullList=القائمة كاملة +FullConversation=محادثة كاملة Statistics=إحصائيات -OtherStatistics=الإحصاءات الأخرى +OtherStatistics=إحصاءات أخرى Status=الحالة Favorite=المفضل -ShortInfo=معلومات. -Ref=المرجع. -ExternalRef=المرجع. خارجي -RefSupplier=Ref. vendor -RefPayment=المرجع. دفع -CommercialProposalsShort=مقترحات تجارية +ShortInfo=معلومات +Ref=المرجع +ExternalRef=مرجع خارجي +RefSupplier=مرجع مورد +RefPayment=مرجع دفع +CommercialProposalsShort=العروض التجارية Comment=التعليق Comments=تعليقات -ActionsToDo=الأحداث للقيام -ActionsToDoShort=لكى يفعل -ActionsDoneShort=انتهيت +ActionsToDo=أحداث للقيام بها +ActionsToDoShort=للعمل +ActionsDoneShort=منتهي ActionNotApplicable=غير قابل للتطبيق -ActionRunningNotStarted=لبدء -ActionRunningShort=In progress -ActionDoneShort=تم الانتهاء من -ActionUncomplete=Incomplete -LatestLinkedEvents=Latest %s linked events -CompanyFoundation=Company/Organization -Accountant=Accountant +ActionRunningNotStarted=للبدأ +ActionRunningShort=في تقدم +ActionDoneShort=تم الانتهاء +ActionUncomplete=غير مكتمل +LatestLinkedEvents=أحدث %s أحداث المرتبطة +CompanyFoundation=الشركة | المؤسسة +Accountant=المحاسب ContactsForCompany=اتصالات لهذا الطرف الثالث -ContactsAddressesForCompany=اتصالات / عناوين لهذا الطرف الثالث +ContactsAddressesForCompany=اتصالات | عناوين لهذا الطرف الثالث AddressesForCompany=عناوين لهذا الطرف الثالث -ActionsOnCompany=Events for this third party -ActionsOnContact=Events for this contact/address -ActionsOnContract=Events for this contract +ActionsOnCompany=أحداث لهذا الطرف الثالث +ActionsOnContact=الأحداث لهذا الاتصال او العنوان +ActionsOnContract=أحداث هذا العقد ActionsOnMember=الأحداث عن هذا العضو -ActionsOnProduct=Events about this product -NActionsLate=٪ في وقت متأخر الصورة -ToDo=لكى يفعل -Completed=Completed -Running=In progress -RequestAlreadyDone=طلب المسجل بالفعل +ActionsOnProduct=أحداث حول هذا المنتج +NActionsLate=%s متأخر +ToDo=للعمل +Completed=مكتمل +Running=في تقدم +RequestAlreadyDone=تم تسجيل الطلب Filter=فلتر -FilterOnInto=معايير البحث <strong>'٪ ق'</strong> إلى حقول٪ الصورة +FilterOnInto=معايير البحث '<strong> %s </strong>' في الحقول %s RemoveFilter=إزالة فلتر -ChartGenerated=الرسم البياني المتولدة -ChartNotGenerated=الرسم البياني لم تولد -GeneratedOn=بناء على٪ الصورة -Generate=توليد -Duration=المدة الزمنية +ChartGenerated=تم إنشاء الرسم البياني +ChartNotGenerated=لم يتم إنشاء الرسم البياني +GeneratedOn=بناء على %s +Generate=انشاء +Duration=مدة TotalDuration=المدة الإجمالية Summary=ملخص -DolibarrStateBoard=Database Statistics -DolibarrWorkBoard=Open Items -NoOpenedElementToProcess=No open element to process +DolibarrStateBoard=إحصائيات قاعدة البيانات +DolibarrWorkBoard=الاصناف المفتوحة +NoOpenedElementToProcess=لا يوجد عنصر مفتوح للمعالجة Available=متاح -NotYetAvailable=لم تتوفر بعد +NotYetAvailable=لم يتوفر بعد NotAvailable=غير متوفر -Categories=الكلمات / فئات -Category=العلامة / فئة +Categories=العلامات | الفئات +Category=العلامة | الفئة By=بواسطة -From=من عند -FromDate=من عند -FromLocation=من عند +From=من +FromDate=من تاريخ +FromLocation=من at=at to=إلى To=إلى and=و or=أو -Other=الآخر +Other=آخر Others=آخرون -OtherInformations=Other information +OtherInformations=معلومات أخرى Quantity=كمية Qty=الكمية ChangedBy=تغيير من قبل -ApprovedBy=التي وافقت عليها -ApprovedBy2=التي وافقت عليها (موافقة الثانية) +ApprovedBy=الموافقة من قبل +ApprovedBy2=الموافقة الثانية من قبل Approved=وافق Refused=رفض -ReCalculate=حساب +ReCalculate=إعادة الحساب ResultKo=فشل Reporting=التقارير Reportings=التقارير Draft=مسودة -Drafts=الداما -StatusInterInvoiced=Invoiced -Validated=التحقق من صحة -ValidatedToProduce=Validated (To produce) +Drafts=المسودات +StatusInterInvoiced=مفوترة +Validated=معتمد +ValidatedToProduce=معتمد (للانتاج) Opened=فتح -OpenAll=Open (All) -ClosedAll=Closed (All) +OpenAll=فتح الكل +ClosedAll=مغلق (الكل) New=جديد -Discount=تخفيض السعر +Discount=خصم Unknown=غير معروف -General=جنرال لواء +General=عام Size=حجم -OriginalSize=Original size +OriginalSize=الحجم الأصلي Received=تم الاستلام Paid=دفع Topic=الموضوع ByCompanies=من قبل أطراف ثالثة -ByUsers=By user +ByUsers=من قبل المستخدم Links=الروابط -Link=حلقة الوصل +Link=رابط Rejects=ترفض Preview=معاينة NextStep=الخطوة التالية Datas=البيانات None=لا شيء NoneF=لا شيء -NoneOrSeveral=None or several +NoneOrSeveral=الكل أو لا شيء Late=متأخر -LateDesc=An item is defined as Delayed as per the system configuration in menu Home - Setup - Alerts. -NoItemLate=No late item +LateDesc=يتم تعريف الصنف على أنه متأخر وفقًا لتكوين النظام في القائمة الرئيسية - الإعداد - التنبيهات. +NoItemLate=لا يوجد صنف متأخر Photo=صورة Photos=الصور -AddPhoto=إضافة الصورة +AddPhoto=إضافة صورة DeletePicture=حذف صورة -ConfirmDeletePicture=تأكيد الصورة الحذف؟ +ConfirmDeletePicture=تأكيد حذف الصورة؟ Login=تسجيل الدخول -LoginEmail=Login (email) -LoginOrEmail=Login or Email +LoginEmail=تسجيل الدخول (البريد الإلكتروني) +LoginOrEmail=تسجيل الدخول أو البريد الإلكتروني CurrentLogin=تسجيل الدخول الحالي -EnterLoginDetail=Enter login details -January=كانون الثاني -February=شهر فبراير -March=مارس، يسير، يتقدم +EnterLoginDetail=أدخل تفاصيل تسجيل الدخول +January=يناير +February=فبراير +March=مارس April=أبريل -May=قد -June=حزيران +May=مايو +June=يونيو July=يوليو August=أغسطس September=سبتمبر -October=تشرين اول -November=تشرين الثاني +October=اكتوبر +November=نوفمبر December=ديسمبر -Month01=كانون الثاني -Month02=شهر فبراير -Month03=مارس، يسير، يتقدم +Month01=يناير +Month02=فبراير +Month03=مارس Month04=أبريل -Month05=قد -Month06=حزيران +Month05=مايو +Month06=يونيو Month07=يوليو Month08=أغسطس Month09=سبتمبر -Month10=تشرين اول -Month11=تشرين الثاني +Month10=اكتوبر +Month11=نوفمبر Month12=ديسمبر MonthShort01=يناير MonthShort02=فبراير MonthShort03=مارس MonthShort04=أبريل -MonthShort05=قد +MonthShort05=مايو MonthShort06=يونيو MonthShort07=يوليو MonthShort08=أغسطس @@ -596,20 +599,20 @@ MonthShort09=سبتمبر MonthShort10=أكتوبر MonthShort11=نوفمبر MonthShort12=ديسمبر -MonthVeryShort01=J -MonthVeryShort02=واو -MonthVeryShort03=م -MonthVeryShort04=A -MonthVeryShort05=م -MonthVeryShort06=J -MonthVeryShort07=J -MonthVeryShort08=A -MonthVeryShort09=دإ -MonthVeryShort10=O -MonthVeryShort11=N -MonthVeryShort12=D +MonthVeryShort01=01 +MonthVeryShort02=02 +MonthVeryShort03=03 +MonthVeryShort04=04 +MonthVeryShort05=05 +MonthVeryShort06=06 +MonthVeryShort07=07 +MonthVeryShort08=08 +MonthVeryShort09=09 +MonthVeryShort10=10 +MonthVeryShort11=11 +MonthVeryShort12=12 AttachedFiles=الملفات والمستندات المرفقة -JoinMainDoc=Join main document +JoinMainDoc=ضم إلى المستند الرئيسي DateFormatYYYYMM=YYYY-MM DateFormatYYYYMMDD=YYYY-MM-DD DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH: SS @@ -617,161 +620,161 @@ ReportName=اسم التقرير ReportPeriod=فترة التقرير ReportDescription=وصف Report=تقرير -Keyword=Keyword -Origin=Origin -Legend=أسطورة -Fill=تعبئة +Keyword=الكلمة الرئيسية +Origin=الأصل +Legend=عنوان تفسيري +Fill=ملء Reset=إعادة تعيين File=ملف Files=ملفات NotAllowed=غير مسموح -ReadPermissionNotAllowed=إذن لا يسمح للقراءة +ReadPermissionNotAllowed=إذن القراءة غير مسموح به AmountInCurrency=المبلغ بعملة %s Example=مثال Examples=أمثلة NoExample=على سبيل المثال لا -FindBug=تقرير خلل +FindBug=الإبلاغ عن خطأ NbOfThirdParties=عدد من الأطراف الثالثة -NbOfLines=عدد الخطوط -NbOfObjects=عدد الأجسام -NbOfObjectReferers=Number of related items -Referers=Related items -TotalQuantity=الكمية الإجمالية -DateFromTo=ل٪ من ق ق ٪ -DateFrom=من ق ٪ -DateUntil=حتى ق ٪ +NbOfLines=عدد البنود +NbOfObjects=عدد الأشياء +NbOfObjectReferers=عدد الأصناف ذات الصلة +Referers=الأصناف ذات الصلة +TotalQuantity=العدد الإجمالي +DateFromTo=من %s إلى %s +DateFrom=من %s +DateUntil=حتى %s Check=فحص Uncheck=قم بإلغاء التحديد -Internal=الداخلية -External=الخارجية -Internals=الداخلية -Externals=الخارجية +Internal=داخلي +External=خارجي +Internals=داخلي +Externals=خارجي Warning=تحذير Warnings=تحذيرات BuildDoc=بناء مستدات -Entity=كيان +Entity=بيئة Entities=الكيانات -CustomerPreview=العميل معاينة -SupplierPreview=Vendor preview -ShowCustomerPreview=وتبين للعملاء معاينة -ShowSupplierPreview=Show vendor preview -RefCustomer=المرجع. العميل -InternalRef=Internal ref. +CustomerPreview=معاينة العميل +SupplierPreview=معاينة المورد +ShowCustomerPreview=عرض معاينة العميل +ShowSupplierPreview=عرض معاينة المورد +RefCustomer=مرجع عميل +InternalRef=المرجع الداخلي Currency=العملة -InfoAdmin=معلومات للإداريين +InfoAdmin=معلومات للمسؤولين Undo=تراجع Redo=إعادة ExpandAll=توسيع الكل UndoExpandAll=التراجع عن التوسع -SeeAll=See all +SeeAll=عرض الكل Reason=سبب -FeatureNotYetSupported=ميزة لم يؤيد +FeatureNotYetSupported=الميزة غير مدعومة حتى الآن CloseWindow=إغلاق النافذة Response=رد Priority=الأولوية -SendByMail=Send by email -MailSentBy=البريد الإلكتروني التي بعث بها +SendByMail=ارسل بالبريد الإلكترونى +MailSentBy=البريد الإلكتروني بواسطة NotSent=لم يرسل TextUsedInTheMessageBody=هيئة البريد الإلكتروني -SendAcknowledgementByMail=Send confirmation email +SendAcknowledgementByMail=إرسال بريد إلكتروني للتأكيد SendMail=إرسال بريد إلكتروني -Email=Email -NoEMail=أي بريد إلكتروني -AlreadyRead=Already read -NotRead=Unread -NoMobilePhone=لا هاتف المحمول +Email=بريد الالكتروني +NoEMail=لا بريد إلكتروني +AlreadyRead=مقروء +NotRead=غير مقروء +NoMobilePhone=لا يوجد هاتف محمول Owner=مالك -FollowingConstantsWillBeSubstituted=الثوابت التالية ستكون بديلا المقابلة القيمة. +FollowingConstantsWillBeSubstituted=سيتم استبدال الثوابت التالية بالقيم المقابلة. Refresh=تجديد BackToList=العودة إلى قائمة -BackToTree=Back to tree +BackToTree=العودة إلى الشجرة GoBack=العودة -CanBeModifiedIfOk=يمكن تعديلها إذا كان صحيحا -CanBeModifiedIfKo=يمكن تعديلها إذا لم يكن صحيحا -ValueIsValid=قيمة صالحة -ValueIsNotValid=Value is not valid -RecordCreatedSuccessfully=Record created successfully -RecordModifiedSuccessfully=سجل تعديل بنجاح -RecordsModified=%s record(s) modified -RecordsDeleted=%s record(s) deleted -RecordsGenerated=%s record(s) generated -AutomaticCode=مدونة الآلي -FeatureDisabled=سمة المعوقين -MoveBox=Move widget -Offered=عرض -NotEnoughPermissions=ليس لديك إذن لهذا العمل -SessionName=اسم الدورة +CanBeModifiedIfOk=يمكن تعديلها إذا كانت صالحة +CanBeModifiedIfKo=يمكن تعديلها إذا لم تكن صالحة +ValueIsValid=القيمة صالحة +ValueIsNotValid=القيمة غير صالحة +RecordCreatedSuccessfully=تم إنشاء السجل بنجاح +RecordModifiedSuccessfully=تم تعديل السجل بنجاح +RecordsModified=تم تعديل %s سجل (سجلات) +RecordsDeleted=تم حذف %s سجل (سجلات) +RecordsGenerated=تم إنشاء %s سجل (سجلات) +AutomaticCode=كود تلقائي +FeatureDisabled=ميزة معطلة +MoveBox=نقل (widget) القطعة +Offered=معروض +NotEnoughPermissions=ليس لديك إذن بهذا الإجراء +SessionName=اسم الجلسة Method=الطريقة Receive=استقبال -CompleteOrNoMoreReceptionExpected=Complete or nothing more expected -ExpectedValue=Expected Value -ExpectedQty=Expected Qty +CompleteOrNoMoreReceptionExpected=اكمل أو لا تتوقع شيء أكثر +ExpectedValue=القيمة المتوقعة +ExpectedQty=العدد المتوقع PartialWoman=جزئي TotalWoman=المجموع -NeverReceived=لم يتلق +NeverReceived=لم يستلم Canceled=ألغى -YouCanChangeValuesForThisListFromDictionarySetup=You can change values for this list from menu Setup - Dictionaries -YouCanChangeValuesForThisListFrom=You can change values for this list from menu %s -YouCanSetDefaultValueInModuleSetup=You can set the default value used when creating a new record in module setup +YouCanChangeValuesForThisListFromDictionarySetup=يمكنك تغيير قيم هذه القائمة من إعدادات القائمة - قواميس +YouCanChangeValuesForThisListFrom=يمكنك تغيير قيم هذه القائمة من القائمة %s +YouCanSetDefaultValueInModuleSetup=يمكنك تعيين القيمة الافتراضية المستخدمة عند إنشاء سجل جديد في إعدادات الوحدة النمطية Color=لون -Documents=ربط الملفات +Documents=الملفات المرتبطة Documents2=وثائق -UploadDisabled=تحميل المعوقين +UploadDisabled=تم تعطيل الرفع MenuAccountancy=محاسبة MenuECM=وثائق MenuAWStats=AWStats MenuMembers=أعضاء -MenuAgendaGoogle=جوجل جدول الأعمال -MenuTaxesAndSpecialExpenses=Taxes | Special expenses -ThisLimitIsDefinedInSetup= -NoFileFound=لا الوثائق المحفوظة في هذا المجلد -CurrentUserLanguage=الصيغة الحالية -CurrentTheme=الموضوع الحالي +MenuAgendaGoogle=أجندة غوغل +MenuTaxesAndSpecialExpenses=الضرائب | مصاريف خاصة +ThisLimitIsDefinedInSetup=حدود دوليبار (Menu home-setup-security): %s كيلوبايت ، حد PHP: %s كيلوبايت +NoFileFound=No documents uploaded +CurrentUserLanguage=اللغة الحالية +CurrentTheme=الواجهة الحالية CurrentMenuManager=مدير القائمة الحالي Browser=المتصفح Layout=Layout -Screen=Screen -DisabledModules=والمعوقين وحدات -For=لأجل -ForCustomer=الزبون +Screen=شاشة +DisabledModules=الوحدات المعطلة +For=لــ +ForCustomer=للعميل Signature=التوقيع -DateOfSignature=Date of signature -HidePassword=وتبين للقيادة مع كلمة السر الخفي -UnHidePassword=وتظهر واضحة للقيادة حقيقية كلمة السر +DateOfSignature=تاريخ التوقيع +HidePassword=عرض الأمر مع كلمة مرور المخفية +UnHidePassword=عرض الأمر الحقيقي مع كلمة مرور الواضحة Root=جذور -RootOfMedias=Root of public medias (/medias) +RootOfMedias=جذر الوسائط العامة (/ الوسائط) Informations=معلومات Page=صفحة -Notes=وتلاحظ -AddNewLine=إضافة خط جديد +Notes=ملاحظات +AddNewLine=إضافة بند جديد AddFile=إضافة ملف -FreeZone=Free-text product -FreeLineOfType=Free-text item, type: -CloneMainAttributes=استنساخ وجوه مع السمات الرئيسية -ReGeneratePDF=Re-generate PDF -PDFMerge=دمج الشعبي +FreeZone=منتج - نص حر +FreeLineOfType=صنف - نص حر ، نوع: +CloneMainAttributes=استنساخ الكائن بسماته الرئيسية +ReGeneratePDF=أعد انتاج ملف PDF +PDFMerge=دمج PDF Merge=دمج -DocumentModelStandardPDF=Standard PDF template -PrintContentArea=وتظهر الصفحة الرئيسية لطباعة ناحية المحتوى +DocumentModelStandardPDF=قالب PDF قياسي +PrintContentArea=عرض الصفحة لطباعة منطقة المحتوى الرئيسية MenuManager=مدير القائمة -WarningYouAreInMaintenanceMode=Warning, you are in maintenance mode: only login <b>%s</b> is allowed to use the application in this mode. -CoreErrorTitle=نظام خطأ -CoreErrorMessage=Sorry, an error occurred. Contact your system administrator to check the logs or disable $dolibarr_main_prod=1 to get more information. +WarningYouAreInMaintenanceMode=تحذير ، أنت في وضع الصيانة: فقط تسجيل الدخول <b> %s يُسمح لـ </b> باستخدام التطبيق في هذا الوضع. +CoreErrorTitle=خطأ في النظام +CoreErrorMessage=عفوا لقد حصل خطأ. اتصل بمسؤول النظام لديك للتحقق من السجلات أو تعطيل $ dolibarr_main_prod = 1 للحصول على مزيد من المعلومات. CreditCard=بطاقة الائتمان -ValidatePayment=تحقق من الدفع -CreditOrDebitCard=Credit or debit card -FieldsWithAreMandatory=حقول إلزامية مع <b>%s</b> -FieldsWithIsForPublic=Fields with <b>%s</b> are shown in public list of members. If you don't want this, uncheck the "public" box. +ValidatePayment=اعتماد الدفع +CreditOrDebitCard=بطاقة الائتمان أو الخصم +FieldsWithAreMandatory=الحقول مع <b> %s </b> إلزامية +FieldsWithIsForPublic=الحقول التي تحتوي على <b> %s </b> تظهر في قائمة الأعضاء العامة. إذا كنت لا تريد هذا ، فقم بإلغاء تحديد المربع "عام". AccordingToGeoIPDatabase=(according to GeoIP conversion) -Line=خط -NotSupported=غير معتمد +Line=بند +NotSupported=غير مدعوم RequiredField=الحقل مطلوب Result=نتيجة ToTest=اختبار -ValidateBefore=Item must be validated before using this feature -Visibility=وضوح -Totalizable=Totalizable -TotalizableDesc=This field is totalizable in list +ValidateBefore=يجب اعتماد الاصناف قبل استخدام هذه الميزة +Visibility=الرؤية +Totalizable=قابل للجمع +TotalizableDesc=هذا الحقل قابل للجمع في القائمة Private=خاص Hidden=مخفي Resources=موارد @@ -782,147 +785,149 @@ After=بعد IPAddress=عنوان IP Frequency=تردد IM=التراسل الفوري -NewAttribute=جديد السمة -AttributeCode=السمة رمز -URLPhoto=للتسجيل من الصورة / الشعار -SetLinkToAnotherThirdParty=تصل إلى طرف ثالث آخر -LinkTo=Link to -LinkToProposal=Link to proposal -LinkToOrder=تصل إلى النظام -LinkToInvoice=Link to invoice -LinkToTemplateInvoice=Link to template invoice -LinkToSupplierOrder=Link to purchase order -LinkToSupplierProposal=Link to vendor proposal -LinkToSupplierInvoice=Link to vendor invoice -LinkToContract=Link to contract -LinkToIntervention=Link to intervention -LinkToTicket=Link to ticket -CreateDraft=إنشاء مشروع -SetToDraft=العودة إلى مشروع +NewAttribute=سمة جديدة +AttributeCode=كود السمة +URLPhoto=عنوان URL للصورة | الشعار +SetLinkToAnotherThirdParty=ربط بطرف ثالث آخر +LinkTo=ربط مع او بـ +LinkToProposal=ربط مع العرض +LinkToOrder=ربط مع الامر +LinkToInvoice=ربط مع الفاتورة +LinkToTemplateInvoice=ربط مع قالب الفاتورة +LinkToSupplierOrder=ربط مع أمر الشراء +LinkToSupplierProposal=ربط مع عرض المورد +LinkToSupplierInvoice=ربط مع فاتورة المورد +LinkToContract=ربط مع العقد +LinkToIntervention=ربط مع التداخل +LinkToTicket=ربط مع التذكرة +CreateDraft=إنشاء مسودة +SetToDraft=العودة إلى المسودة ClickToEdit=انقر للتحرير -ClickToRefresh=Click to refresh -EditWithEditor=Edit with CKEditor -EditWithTextEditor=Edit with Text editor -EditHTMLSource=Edit HTML Source -ObjectDeleted=%s الكائن المحذوف +ClickToRefresh=انقر للتحديث +EditWithEditor=تحرير باستخدام CKEditor +EditWithTextEditor=تحرير باستخدام محرر النصوص +EditHTMLSource=تحرير مصدر HTML +ObjectDeleted=تم حذف الكائن %s ByCountry=حسب البلد -ByTown=من بلدة +ByTown=حسب المدينة ByDate=حسب التاريخ -ByMonthYear=قبل شهر / سنة -ByYear=بحلول العام -ByMonth=من قبل شهر -ByDay=بعد يوم +ByMonthYear=حسب الشهر | السنة +ByYear=حسب السنة +ByMonth=حسب الشهر +ByDay=حسب اليوم BySalesRepresentative=بواسطة مندوب مبيعات -LinkedToSpecificUsers=يرتبط اسم مستخدم معين +LinkedToSpecificUsers=مرتبط بجهة اتصال مستخدم معينة NoResults=لا نتائج -AdminTools=Admin Tools +AdminTools=أدوات المشرف SystemTools=ادوات النظام -ModulesSystemTools=أدوات حدات +ModulesSystemTools=أدوات الوحدات Test=اختبار Element=العنصر -NoPhotoYet=أي صور متوفرة حتى الآن -Dashboard=Dashboard -MyDashboard=My Dashboard +NoPhotoYet=لا توجد صور متاحة حتى الآن +Dashboard=لوحة القيادة +MyDashboard=لوحة القيادة الخاصة بي Deductible=خصم -from=من عند -toward=نحو +from=من +toward=باتجاه Access=وصول SelectAction=حدد العمل -SelectTargetUser=Select target user/employee -HelpCopyToClipboard=استخدم Ctrl + C لنسخ إلى الحافظة -SaveUploadedFileWithMask=حفظ الملف على الخادم مع اسم <strong>"%s"</strong> (otherwise "%s") +SelectTargetUser=حدد المستخدم | الموظف المستهدف +HelpCopyToClipboard=استخدم Ctrl + C للنسخ إلى الحافظة +SaveUploadedFileWithMask=حفظ الملف على الخادم باسم "<strong> %s </strong>" (وإلا "%s") OriginFileName=اسم الملف الأصلي -SetDemandReason=مجموعة مصدر +SetDemandReason=تعيين المصدر SetBankAccount=تحديد الحساب المصرفي -AccountCurrency=Account currency +AccountCurrency=عملة الحساب ViewPrivateNote=عرض الملاحظات -XMoreLines=٪ ق خط (ق) مخبأة -ShowMoreLines=Show more/less lines +XMoreLines=%s بند (بنود) مخفي +ShowMoreLines=عرض المزيد | أقل من البنود PublicUrl=URL العام AddBox=إضافة مربع -SelectElementAndClick=Select an element and click %s -PrintFile=طباعة ملف٪ الصورة -ShowTransaction=Show entry on bank account +SelectElementAndClick=حدد عنصرًا وانقر فوق %s +PrintFile=طباعة الملف %s +ShowTransaction=عرض الإدخال في الحساب المصرفي ShowIntervention=عرض التدخل -ShowContract=وتظهر العقد -GoIntoSetupToChangeLogo=Go to Home - Setup - Company to change logo or go to Home - Setup - Display to hide. +ShowContract=عرض العقد +GoIntoSetupToChangeLogo=انتقل إلى الصفحة الرئيسية - الإعدادات - الشركة لتغيير الشعار أو انتقل إلى الصفحة الرئيسية - الإعدادات - العرض للاخفاء. Deny=رفض -Denied=رفض -ListOf=List of %s +Denied=مرفوض +ListOf=قائمة %s ListOfTemplates=قائمة القوالب Gender=جنس Genderman=رجل Genderwoman=امرأة Genderother=الآخر ViewList=عرض القائمة -ViewGantt=Gantt view -ViewKanban=Kanban view +ViewGantt=عرض Gantt +ViewKanban=عرض Kanban Mandatory=إلزامي Hello=أهلا -GoodBye=GoodBye +GoodBye=مع السلامة Sincerely=بإخلاص -ConfirmDeleteObject=Are you sure you want to delete this object? -DeleteLine=حذف الخط -ConfirmDeleteLine=Are you sure you want to delete this line? -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. -NoPDFAvailableForDocGenAmongChecked=No PDF were available for the document generation among checked record -TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. -NoRecordSelected=No record selected -MassFilesArea=Area for files built by mass actions -ShowTempMassFilesArea=Show area of files built by mass actions -ConfirmMassDeletion=Bulk Delete confirmation -ConfirmMassDeletionQuestion=Are you sure you want to delete the %s selected record(s)? -RelatedObjects=Related Objects +ConfirmDeleteObject=هل أنت متأكد أنك تريد حذف هذا الكائن؟ +DeleteLine=حذف البند +ConfirmDeleteLine=هل أنت متأكد أنك تريد حذف هذا البند؟ +ErrorPDFTkOutputFileNotFound=خطأ: لم يتم إنشاء الملف. يرجى التحقق من تثبيت الأمر "pdftk" في دليل مضمن في متغير البيئة $ PATH (نظام لينكس / يونكس فقط) أو اتصل بمسؤول النظام. +NoPDFAvailableForDocGenAmongChecked=لم يكن هناك ملف PDF متاحًا لإنشاء المستند بين السجلات المحددة +TooManyRecordForMassAction=تم تحديد عدد كبير جدًا من السجلات. الإجراء مقيد بقائمة %s سجلات. +NoRecordSelected=لم يتم تحديد اي سجل +MassFilesArea=مساحة للملفات التي تم إنشاؤها بواسطة إجراءات جماعية +ShowTempMassFilesArea=عرض مساحة الملفات التي تم إنشاؤها بواسطة الإجراءات الجماعية +ConfirmMassDeletion=تأكيد الحذف الضخم +ConfirmMassDeletionQuestion=هل أنت متأكد من أنك تريد حذف %s السجل (السجلات) المحددة؟ +RelatedObjects=كائنات ذات صلة ClassifyBilled=تصنيف الفواتير -ClassifyUnbilled=Classify unbilled +ClassifyUnbilled=تصنيف غير مفوتر Progress=تقدم -ProgressShort=Progr. -FrontOffice=Front office +ProgressShort=تقدم +FrontOffice=مكتب الإستقبال BackOffice=المكتب الخلفي -Submit=Submit -View=View +Submit=يقدم +View=عرض Export=تصدير Exports=صادرات -ExportFilteredList=Export filtered list -ExportList=Export list +ExportFilteredList=تصدير قائمة التى تم تصفيتها +ExportList=قائمة التصدير ExportOptions=خيارات التصدير -IncludeDocsAlreadyExported=Include docs already exported +IncludeDocsAlreadyExported=تضمين المستندات التي تم تصديرها 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 +AllExportedMovementsWereRecordedAsExported=تم تسجيل جميع حركات التصدير على أنها مصدرة +NotAllExportedMovementsCouldBeRecordedAsExported=لا يمكن تسجيل جميع حركات التصدير على أنها مصدرة Miscellaneous=متفرقات Calendar=التقويم GroupBy=Group by... ViewFlatList=View flat list -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +ViewAccountList=عرض دفتر الأستاذ +ViewSubAccountList=عرض دفتر الأستاذ الفرعي RemoveString=Remove string '%s' -SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) -Download=Download -DownloadDocument=Download document -ActualizeCurrency=Update currency rate +SomeTranslationAreUncomplete=قد تكون بعض اللغات المعروضة مترجمة جزئيًا فقط أو قد تحتوي على أخطاء. الرجاء المساعدة في تصحيح لغتك بالتسجيل في <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> لإضافة تحسيناتك. +DirectDownloadLink=رابط التحميل العام +PublicDownloadLinkDesc=فقط مطلوب الرابط لتنزيل الملف +DirectDownloadInternalLink=رابط التحميل الخاص +PrivateDownloadLinkDesc=تحتاج إلى تسجيل الدخول وتحتاج إلى أذونات لعرض الملف أو تنزيله +Download=تحميل +DownloadDocument=تحميل مستند +ActualizeCurrency=تحديث سعر العملة Fiscalyear=السنة المالية -ModuleBuilder=Module and Application Builder -SetMultiCurrencyCode=Set currency -BulkActions=Bulk actions -ClickToShowHelp=Click to show tooltip help -WebSite=Website -WebSites=Websites -WebSiteAccounts=Website accounts -ExpenseReport=تقرير حساب +ModuleBuilder=الوحدة النمطية ومنشئ التطبيق +SetMultiCurrencyCode=تعيين العملة +BulkActions=جملة إجراءات +ClickToShowHelp=انقر لإظهار تعليمات تلميح الأدوات +WebSite=الموقع الكتروني +WebSites=مواقع الويب +WebSiteAccounts=حسابات الموقع +ExpenseReport=تقرير المصاريف ExpenseReports=تقارير المصاريف -HR=HR -HRAndBank=HR and Bank -AutomaticallyCalculated=Automatically calculated -TitleSetToDraft=Go back to draft -ConfirmSetToDraft=Are you sure you want to go back to Draft status? -ImportId=Import id +HR=الموارد البشرية +HRAndBank=الموارد البشرية والبنك +AutomaticallyCalculated=تحسب تلقائيا +TitleSetToDraft=ارجع إلى المسودة +ConfirmSetToDraft=هل أنت متأكد أنك تريد العودة إلى حالة المسودة؟ +ImportId=معرف الاستيراد Events=الأحداث -EMailTemplates=Email templates -FileNotShared=File not shared to external public +EMailTemplates=قوالب البريد الإلكتروني +FileNotShared=الملف غير متاح للجمهور الخارجي Project=المشروع Projects=مشاريع LeadOrProject=Lead | Project @@ -933,11 +938,11 @@ ListOpenLeads=List open leads ListOpenProjects=List open projects NewLeadOrProject=New lead or project Rights=الصلاحيات -LineNb=Line no. -IncotermLabel=شروط التجارة الدولية +LineNb=رقم البند +IncotermLabel=مصطلحات تجارية دولية TabLetteringCustomer=Customer lettering TabLetteringSupplier=Vendor lettering -Monday=يوم الاثنين +Monday=الاثنين Tuesday=الثلاثاء Wednesday=الأربعاء Thursday=الخميس @@ -965,158 +970,162 @@ 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 +one=واحد +two=اثنين +three=ثلاثة +four=أربعة +five=خمسة +six=ستة +seven=سبعة +eight=ثمانية +nine=تسعة +ten=عشرة +eleven=أحد عشر +twelve=اثني عشر +thirteen=ثلاثة عشر +fourteen=أربعة عشرة +fifteen=خمسة عشر +sixteen=ستة عشر +seventeen=سبعة عشر +eighteen=ثمانية عشر +nineteen=تسعة عشر +twenty=عشرون +thirty=ثلاثون +forty=أربعون +fifty=خمسون +sixty=ستون +seventy=سبعون +eighty=ثمانون +ninety=تسعون +hundred=مائة +thousand=ألف +million=مليون +billion=مليار +trillion=تريليون +quadrillion=كوادريليون +SelectMailModel=حدد قالب بريد إلكتروني SetRef=تعيين المرجع -Select2ResultFoundUseArrows=Some results found. Use arrows to select. +Select2ResultFoundUseArrows=تم العثور على بعض النتائج. استخدم الأسهم للتحديد. Select2NotFound=لا نتائج لبحثك Select2Enter=أدخل -Select2MoreCharacter=or more character +Select2MoreCharacter=أو أكثر Select2MoreCharacters=أحرف أو أكثر -Select2MoreCharactersMore=<strong>Search syntax:</strong><br><kbd><strong> |</strong></kbd><kbd> OR</kbd> (a|b)<br><kbd><strong>*</strong></kbd><kbd> Any character</kbd> (a*b)<br><kbd><strong>^</strong></kbd><kbd> Start with</kbd> (^ab)<br><kbd><strong>$</strong></kbd><kbd> End with</kbd> (ab$)<br> +Select2MoreCharactersMore= <strong> صيغة البحث: </strong> <br> <kbd> <strong> | </strong> </kbd> <kbd> OR </kbd> (أ | ب) <br> <kbd> <strong> * </strong> </kbd> <kbd> أي حرف </kbd> (أ ب *) <br> <kbd> <strong> ^ </strong> </kbd> <kbd> البداية مع </kbd> (^ أ ب) <br> <kbd> <strong> $ </strong> </kbd> <kbd> النهاية مع </kbd> ( ab $) <br> Select2LoadingMoreResults=تحميل المزيد من النتائج ... -Select2SearchInProgress=بحث في التقدم ... +Select2SearchInProgress=البحث في تقدم ... SearchIntoThirdparties=أطراف ثالثة SearchIntoContacts=جهات الاتصال SearchIntoMembers=أعضاء SearchIntoUsers=المستخدمين SearchIntoProductsOrServices=المنتجات أو الخدمات +SearchIntoBatch=Lots / Serials SearchIntoProjects=مشاريع -SearchIntoMO=Manufacturing Orders +SearchIntoMO=أوامر التصنيع SearchIntoTasks=المهام SearchIntoCustomerInvoices=فواتير العملاء -SearchIntoSupplierInvoices=Vendor invoices -SearchIntoCustomerOrders=Sales orders -SearchIntoSupplierOrders=Purchase orders -SearchIntoCustomerProposals=مقترحات تجارية -SearchIntoSupplierProposals=Vendor proposals +SearchIntoSupplierInvoices=فواتير الموردين +SearchIntoCustomerOrders=اوامر البيع +SearchIntoSupplierOrders=اوامر الشراء +SearchIntoCustomerProposals=عروض تجارية +SearchIntoSupplierProposals=عروض الموردين SearchIntoInterventions=التدخلات SearchIntoContracts=عقود -SearchIntoCustomerShipments=Customer shipments +SearchIntoCustomerShipments=شحنات العملاء SearchIntoExpenseReports=تقارير المصاريف -SearchIntoLeaves=Leave -SearchIntoTickets=Tickets -SearchIntoCustomerPayments=Customer payments -SearchIntoVendorPayments=Vendor payments +SearchIntoLeaves=الاجازات +SearchIntoTickets=تذاكر +SearchIntoCustomerPayments=مدفوعات العميل +SearchIntoVendorPayments=مدفوعات الموردين SearchIntoMiscPayments=مدفوعات متنوعة CommentLink=تعليقات -NbComments=Number of comments -CommentPage=Comments space -CommentAdded=Comment added -CommentDeleted=Comment deleted -Everybody=مشاريع مشتركة -PayedBy=يتحملها -PayedTo=Paid to -Monthly=Monthly -Quarterly=Quarterly -Annual=Annual -Local=Local -Remote=Remote -LocalAndRemote=Local and Remote -KeyboardShortcut=Keyboard shortcut +NbComments=عدد التعليقات +CommentPage=مساحة التعليقات +CommentAdded=تم إضافة تعليق +CommentDeleted=التعليق حذف +Everybody=الجميع +PayedBy=مدفوع بــ +PayedTo=مدفوع لــ +Monthly=شهريا +Quarterly=ربع سنوى +Annual=سنوي +Local=محلي +Remote=بعيد +LocalAndRemote=محلي و بعيد +KeyboardShortcut=اختصارات لوحة المفاتيح AssignedTo=مخصص ل -Deletedraft=Delete draft -ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link -SelectAThirdPartyFirst=Select a third party first... -YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode -Inventory=Inventory -AnalyticCode=Analytic code -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 +Deletedraft=حذف المسودة +ConfirmMassDraftDeletion=تأكيد الحذف الشامل للمسودة +FileSharedViaALink=ملف مشترك مع رابط عام +SelectAThirdPartyFirst=حدد طرف ثالث أولاً ... +YouAreCurrentlyInSandboxMode=أنت حاليًا في وضع %s "sandbox" +Inventory=المخزون +AnalyticCode=الكود التحليلي +TMenuMRP=تخطيط موارد التصنيع +ShowCompanyInfos=Show company infos +ShowMoreInfos=إظهار المزيد من المعلومات +NoFilesUploadedYet=الرجاء رفع الوثيقة أولا +SeePrivateNote=مشاهدة ملاحظة خاصة +PaymentInformation=معلومات السداد +ValidFrom=صالح من +ValidUntil=صالح حتى +NoRecordedUsers=لايوجد مستخدمين +ToClose=لغلق ToProcess=لعملية -ToApprove=To approve -GlobalOpenedElemView=Global view -NoArticlesFoundForTheKeyword=No article found for the keyword '<strong>%s</strong>' -NoArticlesFoundForTheCategory=No article found for the category -ToAcceptRefuse=To accept | refuse +ToApprove=للموافقة +GlobalOpenedElemView=نظرة شاملة +NoArticlesFoundForTheKeyword=لم يتم العثور على مقال للكلمة الأساسية "<strong> %s </strong>" +NoArticlesFoundForTheCategory=لا توجد مقالة وجدت لهذه الفئة +ToAcceptRefuse=لقبول | لرفض ContactDefault_agenda=حدث -ContactDefault_commande=الطلبية +ContactDefault_commande=الامر ContactDefault_contrat=العقد ContactDefault_facture=فاتورة ContactDefault_fichinter=التدخل -ContactDefault_invoice_supplier=Supplier Invoice -ContactDefault_order_supplier=Purchase Order +ContactDefault_invoice_supplier=فاتورة المورد +ContactDefault_order_supplier=أمر شراء ContactDefault_project=المشروع ContactDefault_project_task=مهمة -ContactDefault_propal=مقترح -ContactDefault_supplier_proposal=Supplier Proposal -ContactDefault_ticket=Ticket -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 +ContactDefault_propal=عرض +ContactDefault_supplier_proposal=عرض المورد +ContactDefault_ticket=تذكرة +ContactAddedAutomatically=تمت إضافة جهة اتصال من جهات الاتصال الطرف الثالث +More=أكثر +ShowDetails=عرض التفاصيل +CustomReports=تقارير مخصصة +StatisticsOn=إحصائيات على +SelectYourGraphOptionsFirst=حدد خيارات الرسم البياني الخاصة بك لإنشاء رسم بياني +Measures=قياسات +XAxis=المحور-X +YAxis=المحور-Y +StatusOfRefMustBe=الحالة %s يجب أن تكون %s +DeleteFileHeader=تأكيد الحذف +DeleteFileText=هل تريد حقا حذف هذا الملف؟ +ShowOtherLanguages=عرض اللغات الأخرى +SwitchInEditModeToAddTranslation=قم بالتبديل في وضع التحرير لإضافة ترجمات لهذه اللغة +NotUsedForThisCustomer=غير مستخدم لهذا العميل +AmountMustBePositive=المبلغ يجب أن يكون موجبًا +ByStatus=حسب الحالة InformationMessage=معلومات -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 +Used=استخدم +ASAP=في أقرب وقت ممكن +CREATEInDolibarr=تم إنشاء %s سجل +MODIFYInDolibarr=%s سجل معدّل +DELETEInDolibarr=%s سجل تم حذفه +VALIDATEInDolibarr=%s سجل تم اعتماده +APPROVEDInDolibarr=%s سجل تم الموافقة عليه +DefaultMailModel=نموذج البريد الافتراضي +PublicVendorName=الاسم العام للمورد DateOfBirth=تاريخ الميلاد -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. -UpToDate=Up-to-date -OutOfDate=Out-of-date -EventReminder=Event Reminder -UpdateForAllLines=Update for all lines +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=انتهت صلاحية رمز الأمان ، لذلك تم إلغاء الإجراء. حاول مرة اخرى. +UpToDate=اخر تحديث +OutOfDate=انتهت صلاحيته +EventReminder=تذكير بالحدث +UpdateForAllLines=تحديث لجميع البنود OnHold=في الانتظار Civility=Civility AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ar_SA/margins.lang b/htdocs/langs/ar_SA/margins.lang index a68c2b82ab9..964d6de11fa 100644 --- a/htdocs/langs/ar_SA/margins.lang +++ b/htdocs/langs/ar_SA/margins.lang @@ -16,12 +16,13 @@ MarginDetails=تفاصيل الهامش ProductMargins=هوامش المنتج CustomerMargins=هوامش العملاء SalesRepresentativeMargins=هوامش ممثل المبيعات +ContactOfInvoice=Contact of invoice UserMargins=هوامش المستخدم ProductService=المنتج أو الخدمة AllProducts=جميع المنتجات والخدمات ChooseProduct/Service=اختيار المنتج أو الخدمة ForceBuyingPriceIfNull=فرض سعر شراء / تكلفة إلى سعر البيع إذا لم يتم تحديدها -ForceBuyingPriceIfNullDetails=إذا لم يتم تحديد سعر الشراء / التكلفة، وهذا الخيار "تشغيل"، فإن الهامش سيكون صفرا على الخط (سعر الشراء / التكلفة = سعر البيع)، غير ذلك ("إيقاف")، فإن الهامش يساوي الافتراضي المقترح. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=طريقة الهامش للخصومات العالمية UseDiscountAsProduct=كمنتج UseDiscountAsService=كخدمة @@ -31,14 +32,14 @@ MARGIN_TYPE=سعر الشراء / التكلفة المقترحة افتراضي MargeType1=Margin on Best vendor price MargeType2=الهامش على متوسط ​​السعر المرجح (واب) MargeType3=هامش على سعر التكلفة -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=سعر الكلفة UnitCharges=رسوم الوحدة Charges=الرسوم AgentContactType=نوع اتصال الوكيل التجاري -AgentContactTypeDetails=حدد نوع الاتصال (المرتبط بالفواتير) الذي سيتم استخدامه لتقرير الهامش لكل ممثل بيع +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=يجب أن يكون السعر قيمة رقمية markRateShouldBeLesserThan100=يجب أن يكون معدل العلامة أقل من 100 ShowMarginInfos=إظهار معلومات الهامش CheckMargins=تفاصيل الهوامش -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). +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). diff --git a/htdocs/langs/ar_SA/members.lang b/htdocs/langs/ar_SA/members.lang index 98666fd6674..343db0da8b5 100644 --- a/htdocs/langs/ar_SA/members.lang +++ b/htdocs/langs/ar_SA/members.lang @@ -21,10 +21,12 @@ MembersListToValid=قائمة مشاريع أعضاء (ينبغي التأكد MembersListValid=قائمة أعضاء صالحة MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=قائمة الأعضاء المؤهلين MenuMembersToValidate=أعضاء مشروع MenuMembersValidated=صادق أعضاء +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=أعضاء مع اشتراك لتلقي MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=انتهى MemberStatusPaid=الاكتتاب حتى الآن MemberStatusPaidShort=حتى الآن +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=أعضاء مشروع +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=التحقق من صحة @@ -82,6 +87,8 @@ Physical=المادية Moral=الأخلاقية MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=حذف عضو @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=علامات الشكل DescADHERENT_ETIQUETTE_TEXT=النص المطبوع على أوراق عنوان الأعضاء @@ -162,6 +170,7 @@ DocForLabels=أوراق عنوان انتج (تنسيق الإعداد للإخ SubscriptionPayment=دفع الاشتراك LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=أعضاء إحصاءات حسب البلد MembersStatisticsByState=أعضاء إحصاءات الولاية / المقاطعة MembersStatisticsByTown=أعضاء إحصاءات بلدة diff --git a/htdocs/langs/ar_SA/modulebuilder.lang b/htdocs/langs/ar_SA/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/ar_SA/modulebuilder.lang +++ b/htdocs/langs/ar_SA/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/ar_SA/orders.lang b/htdocs/langs/ar_SA/orders.lang index a610da6ce30..24d3349a1d3 100644 --- a/htdocs/langs/ar_SA/orders.lang +++ b/htdocs/langs/ar_SA/orders.lang @@ -1,188 +1,191 @@ # Dolibarr language file - Source file is en_US - orders -OrdersArea=أوامر منطقة العملاء -SuppliersOrdersArea=Purchase orders area -OrderCard=من أجل بطاقة +OrdersArea=منطقة أوامر العملاء +SuppliersOrdersArea=منطقة أوامر الشراء +OrderCard=بطاقة الامر OrderId=رقم التعريف الخاص بالطلب Order=ترتيب PdfOrderTitle=الطلبية Orders=أوامر -OrderLine=من أجل خط -OrderDate=من أجل التاريخ -OrderDateShort=من أجل التاريخ -OrderToProcess=من أجل عملية -NewOrder=النظام الجديد -NewOrderSupplier=New Purchase Order -ToOrder=ومن أجل جعل -MakeOrder=ومن أجل جعل -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 -StatusOrderCanceledShort=ألغى +OrderLine=بند امر +OrderDate=تاريخ الامر +OrderDateShort=تاريخ الامر +OrderToProcess=امر للعمل +NewOrder=امر جديد +NewOrderSupplier=أمر شراء جديد +ToOrder=قم بالامر +MakeOrder=قم بالامر +SupplierOrder=أمر شراء +SuppliersOrders=اوامر الشراء +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines +SuppliersOrdersRunning=أوامر الشراء الحالية +CustomerOrder=امر بيع +CustomersOrders=اوامر البيع +CustomersOrdersRunning=أوامر البيع الحالية +CustomersOrdersAndOrdersLines=أوامر البيع مع التفاصيل +OrdersDeliveredToBill=أوامر البيع إلى الفوتورة +OrdersToBill=أوامر البيع المسلمة +OrdersInProcess=أوامر المبيعات قيد المتابعة +OrdersToProcess=أوامر المبيعات قيد المتابعة +SuppliersOrdersToProcess=أوامر الشراء قيد المتابعة +SuppliersOrdersAwaitingReception=أوامر الشراء في انتظار الاستلام +AwaitingReception=في انتظار الاستقبال +StatusOrderCanceledShort=ملغي StatusOrderDraftShort=مسودة -StatusOrderValidatedShort=صادق -StatusOrderSentShort=في عملية -StatusOrderSent=شحنة في عملية -StatusOrderOnProcessShort=أمر -StatusOrderProcessedShort=تجهيز +StatusOrderValidatedShort=معتمدة +StatusOrderSentShort=قيد المعالجة +StatusOrderSent=الشحنة قيد المعالجة +StatusOrderOnProcessShort=تم الامر +StatusOrderProcessedShort=تم معالجته StatusOrderDelivered=تم التوصيل StatusOrderDeliveredShort=تم التوصيل -StatusOrderToBillShort=على مشروع قانون -StatusOrderApprovedShort=وافق +StatusOrderToBillShort=تم التوصيل +StatusOrderApprovedShort=موافقة StatusOrderRefusedShort=رفض -StatusOrderToProcessShort=لعملية -StatusOrderReceivedPartiallyShort=تلقى جزئيا -StatusOrderReceivedAllShort=Products received +StatusOrderToProcessShort=لمعالجة +StatusOrderReceivedPartiallyShort=تم استلامها جزئيًا +StatusOrderReceivedAllShort=تم استلام المنتجات StatusOrderCanceled=ألغى -StatusOrderDraft=مشروع (لا بد من التحقق من صحة) -StatusOrderValidated=صادق -StatusOrderOnProcess=أمر - استقبال الاستعداد -StatusOrderOnProcessWithValidation=أمر - استقبال الاستعداد أو التحقق من صحة -StatusOrderProcessed=تجهيز -StatusOrderToBill=على مشروع قانون -StatusOrderApproved=وافق +StatusOrderDraft=مسودة (للاعتماد) +StatusOrderValidated=معتمد +StatusOrderOnProcess=تم الأمر - استعداد للاستقبال +StatusOrderOnProcessWithValidation=تم طلبه - وضع الاستقبال أو الاعتماد +StatusOrderProcessed=معالج +StatusOrderToBill=تم التوصيل +StatusOrderApproved=موافقة StatusOrderRefused=رفض StatusOrderReceivedPartially=تلقى جزئيا -StatusOrderReceivedAll=All products received -ShippingExist=شحنة موجود +StatusOrderReceivedAll=تم استلام جميع المنتجات +ShippingExist=شحنة موجودة QtyOrdered=الكمية أمرت -ProductQtyInDraft=كمية المنتج في مشاريع المراسيم -ProductQtyInDraftOrWaitingApproved=كمية المنتج إلى مشروع أو الأوامر المعتمدة، لا يأمر بعد -MenuOrdersToBill=أوامر لمشروع قانون +ProductQtyInDraft=كمية المنتج في مسودة الاوامر +ProductQtyInDraftOrWaitingApproved=كمية المنتج في المسودة أو الأوامر المعتمدة ، لم يتم طلبها بعد +MenuOrdersToBill=تم تسليم الطلبات MenuOrdersToBill2=أوامر للفوترة -ShipProduct=سفينة المنتج +ShipProduct=شحن المنتج CreateOrder=إنشاء أمر -RefuseOrder=رفض النظام -ApproveOrder=الموافقة على النظام -Approve2Order=الموافقة على النظام (المستوى الثاني) -ValidateOrder=من أجل التحقق من صحة -UnvalidateOrder=Unvalidate النظام -DeleteOrder=من أجل حذف -CancelOrder=من أجل إلغاء -OrderReopened= Order %s re-open -AddOrder=إنشاء النظام -AddPurchaseOrder=Create purchase order -AddToDraftOrders=إضافة إلى مشروع النظام -ShowOrder=وتبين من أجل -OrdersOpened=أوامر لمعالجة -NoDraftOrders=لا مشاريع المراسيم -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 -AllOrders=جميع أوامر +RefuseOrder=رفض الامر +ApproveOrder=الموافقة على الامر +Approve2Order=أمر الموافقة (المستوى الثاني) +ValidateOrder=اعتماد الامر +UnvalidateOrder=عدم اعتماد الامر +DeleteOrder=حذف الامر +CancelOrder=الغاء الامر +OrderReopened= إعادة فتح الامر %s +AddOrder=إنشاء امر +AddPurchaseOrder=إنشاء أمر شراء +AddToDraftOrders=أضف إلى مسودة امر +ShowOrder=عرض الامر +OrdersOpened=أوامر للمعالجة +NoDraftOrders=لا توجد مسودة اوامر +NoOrder=لا توجد اوامر +NoSupplierOrder=لا يوجد أمر شراء +LastOrders=أحدث %s أوامر مبيعات +LastCustomerOrders=أحدث %s أوامر مبيعات +LastSupplierOrders=أحدث %s أوامر الشراء +LastModifiedOrders=أحدث %s أوامر معدلة +AllOrders=جميع الاوامر NbOfOrders=عدد الأوامر -OrdersStatistics=أوامر إحصاءات -OrdersStatisticsSuppliers=Purchase order statistics -NumberOfOrdersByMonth=عدد أوامر الشهر -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +OrdersStatistics=إحصائيات الاوامر +OrdersStatisticsSuppliers=إحصائيات اوامر الشراء +NumberOfOrdersByMonth=عدد الأوامر فى الشهر +AmountOfOrdersByMonthHT=مبلغ الاوامر حسب الشهر (بدون الضريبة) ListOfOrders=قائمة الأوامر -CloseOrder=وثيق من أجل -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 <b>%s</b>? -ConfirmUnvalidateOrder=Are you sure you want to restore order <b>%s</b> 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 <b>%s</b>? +CloseOrder=اغلاق الامر +ConfirmCloseOrder=هل أنت متأكد أنك تريد تعيين هذا الطلب ليتم تسليمه؟ بمجرد تسليم الطلب ، يمكن ضبطه على الفاتورة. +ConfirmDeleteOrder=هل أنت متأكد أنك تريد حذف هذا الطلب؟ +ConfirmValidateOrder=هل أنت متأكد أنك تريد اعتماد هذا الطلب تحت الاسم <b> %s </b>؟ +ConfirmUnvalidateOrder=هل أنت متأكد من أنك تريد استعادة الطلب <b> %s </b> إلى حالة المسودة؟ +ConfirmCancelOrder=هل أنت متأكد أنك تريد إلغاء هذا الطلب؟ +ConfirmMakeOrder=هل تريد بالتأكيد تأكيد قيامك بهذا الطلب على <b> %s </b>؟ GenerateBill=توليد الفاتورة ClassifyShipped=تصنيف تسليمها -DraftOrders=مشروع أوامر -DraftSuppliersOrders=Draft purchase orders -OnProcessOrders=على عملية أوامر -RefOrder=المرجع. ترتيب -RefCustomerOrder=Ref. order for customer -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor -SendOrderByMail=لكي ترسل عن طريق البريد -ActionsOnOrder=إجراءات من أجل -NoArticleOfTypeProduct=أي مادة من نوع 'منتج' حتى لا مادة للشحن لهذا النظام -OrderMode=طريقة أوامر -AuthorRequest=طلب مقدم البلاغ -UserWithApproveOrderGrant=مع منح المستخدمين "الموافقة على أوامر" إذن. -PaymentOrderRef=من أجل دفع ق ٪ -ConfirmCloneOrder=Are you sure you want to clone this order <b>%s</b>? -DispatchSupplierOrder=Receiving purchase order %s -FirstApprovalAlreadyDone=الموافقة الأولى فعلت -SecondApprovalAlreadyDone=الموافقة الثانية فعلت -SupplierOrderReceivedInDolibarr=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted -SupplierOrderClassifiedBilled=Purchase Order %s set billed +DraftOrders=مسودة أوامر +DraftSuppliersOrders=مسودة أوامر الشراء +OnProcessOrders=أوامر قيد المعالجة +RefOrder=مرجع الامر +RefCustomerOrder=مرجع الامر للعميل +RefOrderSupplier=مرجع الامر للمورد +RefOrderSupplierShort=مرجع امر المورد +SendOrderByMail=إرسال الامر عن طريق البريد +ActionsOnOrder=إجراءات على الامر +NoArticleOfTypeProduct=لا توجد مقالة من نوع "المنتج" لذلك لا توجد مقالة قابلة للشحن لهذا الطلب +OrderMode=طريقة الامر +AuthorRequest=Request author +UserWithApproveOrderGrant=المستخدمين الحاصلين إذن "الموافقة على الطلبات" +PaymentOrderRef=سداد للامر %s +ConfirmCloneOrder=هل أنت متأكد من أنك تريد استنساخ هذا الامر <b> %s </b>؟ +DispatchSupplierOrder=استلام أمر الشراء %s +FirstApprovalAlreadyDone=تمت الموافقة الأولى +SecondApprovalAlreadyDone=تمت الموافقة الثانية +SupplierOrderReceivedInDolibarr=أمر الشراء %s استلم %s +SupplierOrderSubmitedInDolibarr=تم تقديم امر الشراء %s +SupplierOrderClassifiedBilled=امر الشراء %s فى وضع فوترة OtherOrders=أوامر أخرى ##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order -TypeContact_commande_internal_SHIPPING=ممثل الشحن متابعة -TypeContact_commande_external_BILLING=الزبون فاتورة الاتصال -TypeContact_commande_external_SHIPPING=العملاء الشحن الاتصال -TypeContact_commande_external_CUSTOMER=اتصل العملاء بغية متابعة -TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order -TypeContact_order_supplier_internal_SHIPPING=ممثل الشحن متابعة -TypeContact_order_supplier_external_BILLING=Vendor invoice contact -TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact +TypeContact_commande_internal_SALESREPFOLL=مندوب متابعة أوامر البيع +TypeContact_commande_internal_SHIPPING=مندوب متابعة الشحن +TypeContact_commande_external_BILLING=جهة اتصال فاتورة العميل +TypeContact_commande_external_SHIPPING=عنوان التوصيل للعميل +TypeContact_commande_external_CUSTOMER=Customer contact following-up order +TypeContact_order_supplier_internal_SALESREPFOLL=مندوب متابعة اوامر الشراء +TypeContact_order_supplier_internal_SHIPPING=مندوب متابعة الشحن +TypeContact_order_supplier_external_BILLING=جهة اتصال فاتورة البائع +TypeContact_order_supplier_external_SHIPPING=عنوان الشحن للبائع TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order -Error_COMMANDE_SUPPLIER_ADDON_NotDefined=لم تعرف COMMANDE_SUPPLIER_ADDON مستمر -Error_COMMANDE_ADDON_NotDefined=لم تعرف COMMANDE_ADDON مستمر -Error_OrderNotChecked=لا أوامر إلى فاتورة مختارة +Error_COMMANDE_SUPPLIER_ADDON_NotDefined=لم يتم تعريف COMMANDE_SUPPLIER_ADDON الثابت +Error_COMMANDE_ADDON_NotDefined=لم يتم تعريف COMMANDE_ADDON الثابت +Error_OrderNotChecked=لم يتم تحديد أوامر للفوتورة # Order modes (how we receive order). Not the "why" are keys stored into dict.lang -OrderByMail=بريد +OrderByMail=البريد OrderByFax=الفاكس -OrderByEMail=Email +OrderByEMail=البريد الالكتروني OrderByWWW=على الانترنت -OrderByPhone=هاتف +OrderByPhone=الهاتف # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model -PDFEdisonDescription=نموذج النظام بسيطة -PDFProformaDescription=A complete Proforma invoice template -CreateInvoiceForThisCustomer=أوامر بيل -NoOrdersToInvoice=لا أوامر فوترة -CloseProcessedOrdersAutomatically=تصنيف "المصنعة" جميع أوامر المحدد. -OrderCreation=إنشاء ترتيب -Ordered=أمر -OrderCreated=وقد تم إنشاء طلباتكم -OrderFail=حدث خطأ أثناء إنشاء طلباتكم +PDFEinsteinDescription=نموذج طلب كامل (التنفيذ القديم لقالب Eratosthene) +PDFEratostheneDescription=نموذج طلب كامل +PDFEdisonDescription=نموذج امر بسيط +PDFProformaDescription=نموذج فاتورة أولية كامل +CreateInvoiceForThisCustomer=فوترة الامر +CreateInvoiceForThisSupplier=فوترة الامر +NoOrdersToInvoice=لا أوامر للفوترة +CloseProcessedOrdersAutomatically=تصنيف "تمت معالجتها" جميع الاوامر المحددة. +OrderCreation=إنشاء الامر +Ordered=الامر تم +OrderCreated=تم إنشاء أوامرك +OrderFail=حدث خطأ أثناء إنشاء الامر CreateOrders=إنشاء أوامر -ToBillSeveralOrderSelectCustomer=لإنشاء فاتورة لعدة أوامر، انقر أولا على العملاء، ثم اختر "٪ الصورة". -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 -WithReceptionFinished=With reception finished +ToBillSeveralOrderSelectCustomer=لإنشاء فاتورة لعدة اوامر، انقر أولاً على العميل ، ثم اختر "%s". +OptionToSetOrderBilledNotEnabled=لم يتم تمكين الخيار سير عمل في الوحدة ، لتعيين الأمر إلى "مفوتر" تلقائيًا عند اعتماد الفاتورة ، لذلك سيتعين عليك تعيين حالة الطلبات إلى "مفوتر" يدويًا بعد إنشاء الفاتورة. +IfValidateInvoiceIsNoOrderStayUnbilled=إذا كانت عملية اعتماد الفاتورة "لا" ، فسيظل الأمر في الحالة "غير مفوتر" حتى يتم اعتماد الفاتورة. +CloseReceivedSupplierOrdersAutomatically=أغلق الطلب إلى الحالة "%s" تلقائيًا إذا تم استلام جميع المنتجات. +SetShippingMode=ضبط وضع الشحن +WithReceptionFinished=عند الاستلام يعتبر منتهي #### supplier orders status StatusSupplierOrderCanceledShort=ألغيت StatusSupplierOrderDraftShort=مسودة -StatusSupplierOrderValidatedShort=التحقق من صحة -StatusSupplierOrderSentShort=في عملية -StatusSupplierOrderSent=شحنة في عملية -StatusSupplierOrderOnProcessShort=أمر -StatusSupplierOrderProcessedShort=معالجة +StatusSupplierOrderValidatedShort=معتمد +StatusSupplierOrderSentShort=تحت المعالجة +StatusSupplierOrderSent=الشحنة قيد المعالجة +StatusSupplierOrderOnProcessShort=الامر تم +StatusSupplierOrderProcessedShort=معالج StatusSupplierOrderDelivered=تم التوصيل StatusSupplierOrderDeliveredShort=تم التوصيل StatusSupplierOrderToBillShort=تم التوصيل StatusSupplierOrderApprovedShort=وافق StatusSupplierOrderRefusedShort=رفض -StatusSupplierOrderToProcessShort=لعملية -StatusSupplierOrderReceivedPartiallyShort=تلقى جزئيا -StatusSupplierOrderReceivedAllShort=Products received +StatusSupplierOrderToProcessShort=لمعالجة +StatusSupplierOrderReceivedPartiallyShort=تم الاستلام جزئيًا +StatusSupplierOrderReceivedAllShort=تم استلام المنتجات StatusSupplierOrderCanceled=ألغيت StatusSupplierOrderDraft=مشروع (يجب التحقق من صحة) StatusSupplierOrderValidated=التحقق من صحة -StatusSupplierOrderOnProcess=أمر - استقبال الاستعداد -StatusSupplierOrderOnProcessWithValidation=أمر - استقبال الاستعداد أو التحقق من صحة +StatusSupplierOrderOnProcess=الامر تم - انتظار الاستلام +StatusSupplierOrderOnProcessWithValidation=الامر تم - انتظار الاستلام او الاعتماد StatusSupplierOrderProcessed=معالجة StatusSupplierOrderToBill=تم التوصيل StatusSupplierOrderApproved=وافق StatusSupplierOrderRefused=رفض -StatusSupplierOrderReceivedPartially=تلقى جزئيا -StatusSupplierOrderReceivedAll=All products received +StatusSupplierOrderReceivedPartially=تم الاستلام جزئيًا +StatusSupplierOrderReceivedAll=تم استلام جميع المنتجات diff --git a/htdocs/langs/ar_SA/other.lang b/htdocs/langs/ar_SA/other.lang index 95f31ac01c8..ceca65f3dae 100644 --- a/htdocs/langs/ar_SA/other.lang +++ b/htdocs/langs/ar_SA/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=أوجدتها ٪ ق ModifiedBy=المعدلة ق ٪ ValidatedBy=يصادق عليها ق ٪ +SignedBy=Signed by %s ClosedBy=أغلقت ٪ ق CreatedById=هوية المستخدم الذي إنشاء ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=هذا هو مفاتيح جديدة لتسجيل الدخول NewKeyWillBe=والمفتاح الجديد الخاص بك للدخول إلى برنامج يكون ClickHereToGoTo=انقر هنا للذهاب إلى٪ s YouMustClickToChange=ولكن يجب النقر فوق لأول مرة على الرابط التالي للتحقق من صحة هذا تغيير كلمة المرور +ConfirmPasswordChange=Confirm password change ForgetIfNothing=إذا كنت لم تطلب هذا التغيير، أن ينسوا هذا البريد الإلكتروني. يتم الاحتفاظ بيانات الاعتماد الخاصة بك آمنة. IfAmountHigherThan=إذا قدر أعلى <strong>من٪ الصورة</strong> SourcesRepository=مستودع للمصادر diff --git a/htdocs/langs/ar_SA/productbatch.lang b/htdocs/langs/ar_SA/productbatch.lang index ed856843ff1..e7226260a14 100644 --- a/htdocs/langs/ar_SA/productbatch.lang +++ b/htdocs/langs/ar_SA/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=استخدام الكثير / الرقم التسلسلي -ProductStatusOnBatch=نعم (الكثير / مسلسل مطلوب) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=رقم (الكثير / المسلسل لم تستخدم) -ProductStatusOnBatchShort=نعم فعلا +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=لا Batch=الكثير / المسلسل atleast1batchfield=أكل حسب التاريخ أو بيع حسب التاريخ أو لوط / الرقم التسلسلي @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ar_SA/products.lang b/htdocs/langs/ar_SA/products.lang index 37d70e8534c..233bd0fef15 100644 --- a/htdocs/langs/ar_SA/products.lang +++ b/htdocs/langs/ar_SA/products.lang @@ -86,7 +86,7 @@ ErrorProductAlreadyExists=المنتج ذو المرجع %sموجود بالفع ErrorProductBadRefOrLabel=قيمة خاطئة لـ مرجع أو ملصق. ErrorProductClone=كان هناك مشكلة أثناء محاولة استنساخ المنتج أو الخدمة. ErrorPriceCantBeLowerThanMinPrice=خطأ، سعر لا يمكن أن يكون أقل من الحد الأدنى السعر. -Suppliers=Vendors +Suppliers=الموردين SupplierRef=Vendor SKU ShowProduct=عرض المنتج ShowService=عرض الخدمة @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=منتجات محددة مسبقا / خدمات للبيع @@ -166,7 +167,7 @@ NewRefForClone=مرجع. المنتج/ الخدمة الجديدة  SellingPrices=أسعار بيع BuyingPrices=شراء أسعار CustomerPrices=أسعار العميل -SuppliersPrices=Vendor prices +SuppliersPrices=أسعار المورد SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs|Commodity|HS code CountryOrigin=بلد المنشأ @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=تحديثها بشكل صحيح PropalMergePdfProductActualFile=استخدام الملفات لإضافة إلى PDF دازور هي / هو PropalMergePdfProductChooseFile=اختر ملفات PDF -IncludingProductWithTag=بما في ذلك المنتجات / الخدمات مع العلامة +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=سعر افتراضي، السعر الحقيقي قد تعتمد على العملاء WarningSelectOneDocument=يرجى تحديد وثيقة واحدة على الأقل DefaultUnitToShow=وحدة diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index 466976a6edb..a6f5248b5b0 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -179,14 +180,14 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=مساهم TypeContact_project_task_external_TASKCONTRIBUTOR=مساهم SelectElement=حدد العنصر AddElement=تصل إلى العنصر -LinkToElementShort=Link to +LinkToElementShort=ربط مع او بـ # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks DocumentModelTimeSpent=Project report template for time spent PlannedWorkload=عبء العمل المخطط لها PlannedWorkloadShort=عبء العمل -ProjectReferers=Related items +ProjectReferers=الأصناف ذات الصلة ProjectMustBeValidatedFirst=يجب التحقق من صحة المشروع أولا FirstAddRessourceToAllocateTime=Assign a user resource as contact of project to allocate time InputPerDay=إدخال يوميا @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ar_SA/propal.lang b/htdocs/langs/ar_SA/propal.lang index 13a7475989f..44de7ea36d0 100644 --- a/htdocs/langs/ar_SA/propal.lang +++ b/htdocs/langs/ar_SA/propal.lang @@ -16,7 +16,7 @@ AddProp=إنشاء اقتراح ConfirmDeleteProp=Are you sure you want to delete this commercial proposal? ConfirmValidateProp=Are you sure you want to validate this commercial proposal under name <b>%s</b>? LastPropals=Latest %s proposals -LastModifiedProposals=Latest %s modified proposals +LastModifiedProposals=أحدث %s العروض المعدلة AllPropals=جميع المقترحات SearchAProposal=بحث اقتراح NoProposal=No proposal @@ -47,7 +47,6 @@ SendPropalByMail=اقتراح ارسال التجارية عن طريق البر DatePropal=تاريخ الاقتراح DateEndPropal=تاريخ انتهاء الصلاحية ValidityDuration=ومدة صلاحيتها -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal ق لم يتم العثور على ٪ AddToDraftProposals=إضافة إلى صياغة اقتراح @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=واقتراح الخطوط التجارية ProposalLine=اقتراح خط +ProposalLines=Proposal lines AvailabilityPeriod=توفر تأخير SetAvailability=ضبط تأخير توافر AfterOrder=بعد ذلك @@ -85,3 +85,8 @@ ProposalCustomerSignature=قبول كتابي، ختم الشركة والتار 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/ar_SA/stocks.lang b/htdocs/langs/ar_SA/stocks.lang index d5a935cf50a..1a09a888ada 100644 --- a/htdocs/langs/ar_SA/stocks.lang +++ b/htdocs/langs/ar_SA/stocks.lang @@ -19,8 +19,8 @@ Stock=الأسهم Stocks=الاسهم MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=الأسهم عن طريق القرعة / المسلسل LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=عوضا عن -LocationSummary=باختصار اسم الموقع -NumberOfDifferentProducts=عدد من المنتجات المختلفة +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=العدد الإجمالي للمنتجات LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=قيمة المستودعات 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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=الأسهم الافتراضية VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=معرف مخزن DescWareHouse=وصف المخزن LieuWareHouse=المكان مخزن WarehousesAndProducts=والمستودعات والمنتجات WarehousesAndProductsBatchDetail=مستودعات والمنتجات (مع التفاصيل في الكثير / مسلسل) AverageUnitPricePMPShort=المتوسط المرجح لسعر -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=بيع سعر الوحدة EstimatedStockValueSellShort=قيمة للبيع EstimatedStockValueSell=قيمة للبيع @@ -145,7 +147,7 @@ Replenishments=التجديد NbOfProductBeforePeriod=كمية من الناتج٪ الصورة في الأوراق المالية قبل الفترة المختارة (<٪ ق) NbOfProductAfterPeriod=كمية من الناتج٪ الصورة في الأوراق المالية بعد الفترة المختارة (>٪ ق) MassMovement=حركة جماهيرية -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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=إيصالات لهذا النظام StockMovementRecorded=تحركات الأسهم سجلت @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=تسمية الحركة -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=حركة المخزون أو كود IsInPackage=الواردة في حزمة @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=إعادة فتح +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ar_SA/suppliers.lang b/htdocs/langs/ar_SA/suppliers.lang index 70bcc53eddb..d7496e5b941 100644 --- a/htdocs/langs/ar_SA/suppliers.lang +++ b/htdocs/langs/ar_SA/suppliers.lang @@ -1,48 +1,49 @@ # Dolibarr language file - Source file is en_US - vendors -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +Suppliers=الموردين +SuppliersInvoice=فاتورة مورد +SupplierInvoices=فواتير الموردين +ShowSupplierInvoice=عرض فاتورة المورد +NewSupplier=مورد جديد History=التاريخ -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor -OrderDate=من أجل التاريخ -BuyingPriceMin=Best buying price -BuyingPriceMinShort=Best buying price -TotalBuyingPriceMinShort=مجموعه subproducts شراء أسعار -TotalSellingPriceMinShort=Total of subproducts selling prices -SomeSubProductHaveNoPrices=بعض المنتجات الفرعية التي لا تعرف السعر -AddSupplierPrice=Add buying price -ChangeSupplierPrice=Change buying price -SupplierPrices=Vendor prices -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 and invoice details -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order details -ApproveThisOrder=الموافقة على هذا النظام -ConfirmApproveThisOrder=Are you sure you want to approve order <b>%s</b>? -DenyingThisOrder=إنكار هذا النظام -ConfirmDenyingThisOrder=Are you sure you want to deny this order <b>%s</b>? -ConfirmCancelThisOrder=Are you sure you want to cancel this order <b>%s</b>? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice -ListOfSupplierProductForSupplier=List of products and prices for vendor <b>%s</b> -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery=Delivery delay (days) -DescNbDaysToDelivery=The longest delivery delay of the products from this order -SupplierReputation=Vendor reputation -ReferenceReputation=Reference reputation -DoNotOrderThisProductToThisSupplier=Do not order -NotTheGoodQualitySupplier=Low quality -ReputationForThisProduct=Reputation -BuyerName=Buyer name -AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All references of vendor -BuyingPriceNumShort=Vendor prices +ListOfSuppliers=قائمة الموردين +ShowSupplier=عرض المورد +OrderDate=تاريخ الامر +BuyingPriceMin=أفضل سعر شراء +BuyingPriceMinShort=أفضل سعر شراء +TotalBuyingPriceMinShort=إجمالي أسعار شراء المنتجات الفرعية +TotalSellingPriceMinShort=إجمالي أسعار بيع المنتجات الفرعية +SomeSubProductHaveNoPrices=بعض المنتجات الفرعية ليس لها سعر محدد +AddSupplierPrice=أضف سعر شراء +ChangeSupplierPrice=تغيير سعر الشراء +SupplierPrices=أسعار المورد +ReferenceSupplierIsAlreadyAssociatedWithAProduct=مرجع المورّد هذا مقترن بالفعل بمنتج: %s +NoRecordedSuppliers=لم يتم تسجيل أي مورد +SupplierPayment=دفعة المورد +SuppliersArea=منطقة المورد +RefSupplierShort=مرجع مورد +Availability=التوفر +ExportDataset_fournisseur_1=فواتير المورد وتفاصيل الفاتورة +ExportDataset_fournisseur_2=فواتير المورد والمدفوعات +ExportDataset_fournisseur_3=أوامر الشراء وتفاصيل الامر +ApproveThisOrder=الموافقة على هذا الامر +ConfirmApproveThisOrder=هل أنت متأكد من أنك تريد الموافقة على الطلب <b> %s </b>؟ +DenyingThisOrder=رفض هذا الأمر +ConfirmDenyingThisOrder=هل أنت متأكد أنك تريد رفض هذا الامر <b> %s </b>؟ +ConfirmCancelThisOrder=هل أنت متأكد أنك تريد إلغاء هذا الامر <b> %s </b>؟ +AddSupplierOrder=إنشاء أمر شراء +AddSupplierInvoice=إنشاء فاتورة مورد +ListOfSupplierProductForSupplier=قائمة المنتجات والأسعار للمورد <b> %s </b> +SentToSuppliers=أرسل إلى الموردين +ListOfSupplierOrders=قائمة أوامر الشراء +MenuOrdersSupplierToBill=أوامر الشراء للفوتورة +NbDaysToDelivery=تأخير التسليم (أيام) +DescNbDaysToDelivery=أطول تأخير في تسليم المنتجات من هذا الامر +SupplierReputation=سمعة المورد +ReferenceReputation=سمعة المرجع +DoNotOrderThisProductToThisSupplier=لا تأمر +NotTheGoodQualitySupplier=جودة منخفضة +ReputationForThisProduct=سمعة +BuyerName=اسم المشتري +AllProductServicePrices=جميع أسعار المنتجات | الخدمات +AllProductReferencesOfSupplier=جميع مراجع البائع +BuyingPriceNumShort=أسعار المورد diff --git a/htdocs/langs/ar_SA/ticket.lang b/htdocs/langs/ar_SA/ticket.lang index 307fdeb1792..23feb81ae34 100644 --- a/htdocs/langs/ar_SA/ticket.lang +++ b/htdocs/langs/ar_SA/ticket.lang @@ -18,7 +18,7 @@ # Generic # -Module56000Name=Tickets +Module56000Name=تذاكر Module56000Desc=Ticket system for issue or request management Permission56001=See tickets @@ -60,7 +60,7 @@ Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status Read=قرأ Assigned=Assigned -InProgress=In progress +InProgress=في تقدم NeedMoreInformation=Waiting for information Answered=Answered Waiting=انتظار @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=اكتب Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -78,7 +80,7 @@ MailToSendTicketMessage=To send email from ticket message # Admin page # TicketSetup=Ticket module setup -TicketSettings=Settings +TicketSettings=إعدادات 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 @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -149,7 +151,7 @@ MessageListViewType=Show as table list # # Ticket card # -Ticket=Ticket +Ticket=تذكرة TicketCard=Ticket card CreateTicket=Create ticket EditTicket=Edit ticket @@ -229,7 +231,7 @@ TicketChangeStatus=Change status TicketConfirmChangeStatus=Confirm the status change: %s ? TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create -Unread=Unread +Unread=غير مقروء TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. ErrorTicketRefRequired=Ticket reference name is required @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ar_SA/users.lang b/htdocs/langs/ar_SA/users.lang index 4caca7196f6..bed6554cf2f 100644 --- a/htdocs/langs/ar_SA/users.lang +++ b/htdocs/langs/ar_SA/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=إزالة من المجموعة PasswordChangedAndSentTo=تم تغيير كلمة المرور وترسل إلى <b>٪ ق.</b> PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=طلب تغيير كلمة السر لإرسالها إلى <b>٪ ق ٪ ق.</b> +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=مجموعات المستخدمين LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=النطاق المستخدم ق ٪ Reactivate=تنشيط 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=منح إذن لأن الموروث من واحد من المستخدم. Inherited=موروث +UserWillBe=Created user will be UserWillBeInternalUser=وسوف يكون المستخدم إنشاء مستخدم داخلية (لأنه لا يرتبط طرف ثالث خاص) UserWillBeExternalUser=وسوف يكون المستخدم إنشاء مستخدم خارجي (لأنه مرتبط إلى طرف ثالث خاص) IdPhoneCaller=رقم تعريف الهاتف المتصل @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/ar_SA/website.lang b/htdocs/langs/ar_SA/website.lang index 7bf9189512a..e68b7898ca8 100644 --- a/htdocs/langs/ar_SA/website.lang +++ b/htdocs/langs/ar_SA/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=قرأ WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -78,7 +78,7 @@ IDOfPage=Id of page Banner=Banner BlogPost=Blog post WebsiteAccount=Website account -WebsiteAccounts=Website accounts +WebsiteAccounts=حسابات الموقع AddWebsiteAccount=Create web site account BackToListForThirdParty=Back to list for the third-party DisableSiteFirst=Disable website first @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ar_SA/zapier.lang b/htdocs/langs/ar_SA/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/ar_SA/zapier.lang +++ b/htdocs/langs/ar_SA/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/az_AZ/accountancy.lang b/htdocs/langs/az_AZ/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/az_AZ/accountancy.lang +++ b/htdocs/langs/az_AZ/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/az_AZ/admin.lang b/htdocs/langs/az_AZ/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/az_AZ/admin.lang +++ b/htdocs/langs/az_AZ/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/az_AZ/banks.lang b/htdocs/langs/az_AZ/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/az_AZ/banks.lang +++ b/htdocs/langs/az_AZ/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/az_AZ/bills.lang b/htdocs/langs/az_AZ/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/az_AZ/bills.lang +++ b/htdocs/langs/az_AZ/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/az_AZ/boxes.lang b/htdocs/langs/az_AZ/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/az_AZ/boxes.lang +++ b/htdocs/langs/az_AZ/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/az_AZ/categories.lang b/htdocs/langs/az_AZ/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/az_AZ/categories.lang +++ b/htdocs/langs/az_AZ/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/az_AZ/companies.lang b/htdocs/langs/az_AZ/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/az_AZ/companies.lang +++ b/htdocs/langs/az_AZ/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/az_AZ/compta.lang b/htdocs/langs/az_AZ/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/az_AZ/compta.lang +++ b/htdocs/langs/az_AZ/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/az_AZ/ecm.lang b/htdocs/langs/az_AZ/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/az_AZ/ecm.lang +++ b/htdocs/langs/az_AZ/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/az_AZ/errors.lang b/htdocs/langs/az_AZ/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/az_AZ/errors.lang +++ b/htdocs/langs/az_AZ/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/az_AZ/externalsite.lang b/htdocs/langs/az_AZ/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/az_AZ/externalsite.lang +++ b/htdocs/langs/az_AZ/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/az_AZ/main.lang b/htdocs/langs/az_AZ/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/az_AZ/main.lang +++ b/htdocs/langs/az_AZ/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/az_AZ/margins.lang b/htdocs/langs/az_AZ/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/az_AZ/margins.lang +++ b/htdocs/langs/az_AZ/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/az_AZ/members.lang b/htdocs/langs/az_AZ/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/az_AZ/members.lang +++ b/htdocs/langs/az_AZ/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/az_AZ/modulebuilder.lang b/htdocs/langs/az_AZ/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/az_AZ/modulebuilder.lang +++ b/htdocs/langs/az_AZ/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/az_AZ/orders.lang b/htdocs/langs/az_AZ/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/az_AZ/orders.lang +++ b/htdocs/langs/az_AZ/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/az_AZ/other.lang b/htdocs/langs/az_AZ/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/az_AZ/other.lang +++ b/htdocs/langs/az_AZ/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/az_AZ/productbatch.lang b/htdocs/langs/az_AZ/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/az_AZ/productbatch.lang +++ b/htdocs/langs/az_AZ/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/az_AZ/products.lang b/htdocs/langs/az_AZ/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/az_AZ/products.lang +++ b/htdocs/langs/az_AZ/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/az_AZ/projects.lang b/htdocs/langs/az_AZ/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/az_AZ/projects.lang +++ b/htdocs/langs/az_AZ/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/az_AZ/propal.lang b/htdocs/langs/az_AZ/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/az_AZ/propal.lang +++ b/htdocs/langs/az_AZ/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/az_AZ/stocks.lang b/htdocs/langs/az_AZ/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/az_AZ/stocks.lang +++ b/htdocs/langs/az_AZ/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/az_AZ/suppliers.lang b/htdocs/langs/az_AZ/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/az_AZ/suppliers.lang +++ b/htdocs/langs/az_AZ/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/az_AZ/ticket.lang b/htdocs/langs/az_AZ/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/az_AZ/ticket.lang +++ b/htdocs/langs/az_AZ/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/az_AZ/users.lang b/htdocs/langs/az_AZ/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/az_AZ/users.lang +++ b/htdocs/langs/az_AZ/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/az_AZ/website.lang b/htdocs/langs/az_AZ/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/az_AZ/website.lang +++ b/htdocs/langs/az_AZ/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/az_AZ/zapier.lang b/htdocs/langs/az_AZ/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/az_AZ/zapier.lang +++ b/htdocs/langs/az_AZ/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/bg_BG/accountancy.lang b/htdocs/langs/bg_BG/accountancy.lang index 61935e71771..cd10cec3aae 100644 --- a/htdocs/langs/bg_BG/accountancy.lang +++ b/htdocs/langs/bg_BG/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Свързани редове на фактури ExpenseReportLines=Редове на разходни отчети за свързване ExpenseReportLinesDone=Свързани редове на разходни отчети IntoAccount=Свързване на ред със счетоводна сметка -TotalForAccount=Общо за счетоводна сметка +TotalForAccount=Total accounting account Ventilate=Свързване @@ -209,7 +209,7 @@ Codejournal=Журнал JournalLabel=Име на журнал NumPiece=Пореден номер TransactionNumShort=Транзакция № -AccountingCategory=Персонализирани групи +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Тук може да определите някои групи счетоводни сметки. Те ще бъдат използвани за персонализирани счетоводни отчети. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Редовете все още не са свърза ## Import ImportAccountingEntries=Счетоводни записи +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Дата на експортиране WarningReportNotReliable=Внимание, тази справка не се основава на главната счетоводна книга, така че не съдържа транзакция, ръчно променена в книгата. Ако осчетоводяването ви е актуално, то прегледът на счетоводството е по-точен. ExpenseReportJournal=Журнал за разходни отчети InventoryJournal=Журнал за инвентар + +NAccounts=%s accounts diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 6e7129f0a22..049f85e0287 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Разрешаване на свързването YourSession=Вашата сесия Sessions=Потребителски сесии WebUserGroup=Уеб сървър потребител / група +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Изглежда, че вашата PHP конфигурация не позволява изброяване на активни сесии. Директорията, използвана за запазване на сесии (<b> %s </b>), може да е защитена (например от права на операционната система или от директивата PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Забележка: Ефективно е само ако мод RemoveLock=Премахнете / преименувайте файла <b>%s</b>, ако съществува, за да разрешите използването на инструмента за инсталиране / актуализиране. RestoreLock=Възстановете файла <b>%s</b> с права само за четене, за да забраните по-нататъшното използване на инструмента за инсталиране / актуализиране. SecuritySetup=Настройки на сигурността +PHPSetup=PHP setup SecurityFilesDesc=Дефинирайте тук параметрите, свързани със сигурността, относно качването на файлове. ErrorModuleRequirePHPVersion=Грешка, този модул изисква PHP версия %s или по-висока. ErrorModuleRequireDolibarrVersion=Грешка, този модул изисква Dolibarr версия %s или по-висока. @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Тази секция осигурява администр Purge=Разчистване PurgeAreaDesc=Тази страница ви позволява да изтриете всички файлове, генерирани или съхранени от Dolibarr (временни файлове или всички файлове в директорията <b>%s</b>). Използването на тази функция обикновено не е необходимо. Той се предоставя като решение за потребители, чиито Dolibarr се хоства от доставчик, който не предлага разрешения за изтриване на файлове, генерирани от уеб сървъра. PurgeDeleteLogFile=Изтриване на лог файлове, включително <b>%s</b> генериран от Debug Logs модула (няма риск от загуба на данни) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Изтриване на всички файлове в директорията: <b>%s</b>.<br>Това ще изтрие всички генерирани документи, свързани с елементи (контрагенти, фактури и т.н.), файлове, качени чрез ECM модула, архиви на базата данни и временни файлове. PurgeRunNow=Разчисти сега @@ -232,6 +234,7 @@ BoxesAvailable=Налични джаджи BoxesActivated=Активирани джаджи ActivateOn=Активирай на ActiveOn=Активирано на +ActivatableOn=Activatable on SourceFile=Изходен файл AvailableOnlyIfJavascriptAndAjaxNotDisabled=На разположение е само, ако JavaScript не е деактивиран Required=Задължително @@ -347,9 +350,10 @@ LastActivationAuthor=Последен автор на активирането LastActivationIP=Последно активиране от IP адрес UpdateServerOffline=Актуализиране на сървъра офлайн WithCounter=Управление на брояч -GenericMaskCodes=Може да въведете всяка маска за номериране. В тази маска, могат да се използват следните тагове: <br> <b>{000000}</b> съответства на номер, който ще се увеличава на всеки %s. Въведете толкова нули, колкото е желаната дължина на брояча. Броячът ще бъде запълнен с нули от ляво, за да има толкова нули, колкото и в маската. <br> <b>{000000+000}</b> същото като в предишния случай, но започва отместване, съответстващо на номера отдясно на знака +, считано от първия %s. <br> <b>{000000@x}</b> същото като в предишния случай, но броячът се нулира, когато месецът Х е достигнат (Х между 1 и 12, или 0, за да използвате началото на месеца на фискалната година, определени в вашата конфигурация или 99, за да нулирате брояча всеки месец). Ако тази опция се използва и X е 2 или по-висока, то тогава последователностa {yy}{mm} или {yyyy}{mm} също е задължителна. <br> <b>{dd}</b> ден (01 до 31). <br> <b>{mm}</b> месец (01 до 12). <br> <b>{yy}</b>, <b>{yyyy}</b> или <b>{y}</b> година от 2, 4 или 1 цифри. <br> -GenericMaskCodes2=<b> {cccc} </b> клиентският код на n знака <br> <b> {cccc000} </b> клиентският код на n знака е последван от брояч, предназначен за клиента. Този брояч е предназначен за клиента и се нулира едновременно от глобалния брояч. <br> <b> {tttt} </b> Кодът на контрагента с n знака (вижте менюто Начало - Настройка - Речник - Видове контрагенти). Ако добавите този таг, броячът ще бъде различен за всеки тип контрагент. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Всички други символи в маската ще останат непокътнати. <br> Не са разрешени интервали. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u> Пример за 99-я %s контрагент TheCompany, с дата 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Пример за контрагент, създаден на 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Пример за продукт, създаден на 2007-03-01:</u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Оставяйки това поле празно о ExtrafieldParamHelpselect=Списъкът със стойности трябва да бъде във формат key,value (където key не може да бъде '0';) <br><br> например: <br> 1,value1 <br> 2,value2 <br> code3,value3 <br> ... <br><br> За да имате списъка в зависимост от друг допълнителен списък с атрибути: <br> 1,value1|options_ <i>parent_list_code</i>:parent_key<br>2,value2|options_ <i>parent_list_code</i>:parent_key <br><br> За да имате списъка в зависимост от друг списък: <br> 1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=Списъкът със стойности трябва да бъде във формат key,value (където key не може да бъде '0') <br><br> например: <br> 1,value1 <br>2,value2 <br>3,value3<br> ... ExtrafieldParamHelpradio=Списъкът със стойности трябва да бъде във формат key,value (където key не може да бъде '0') <br><br> например: <br> 1,value1 <br>2,value2 <br>3,value3<br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Списъкът на стойностите идва от таблица <br> Синтаксис: table_name:label_field:id_field::filter <br> Пример: c_typent:libelle:id::filter <br><br> филтърът може да бъде прост тест (например active = 1), за да се покаже само активна стойност <br> Можете също да използвате $ID$ във филтъра, който е текущият идентификатор на текущия обект <br> За да направите SELECT във филтъра, използвайте $SEL$ <br> ако искате да филтрирате по допълнителни полета, използвайте синтаксис extra.fieldcode=...(където кодът на полето е кодът на екстра полето) <br><br> За да имате списъка в зависимост от друг допълнителен списък с атрибути: <br>c_typent:libelle:id:options_ <i>parent_list_code</i>|parent_column:filter<br><br> За да имате списъка в зависимост от друг списък: <br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Оставете празно за обикновен разделител<br>Посочете стойност 1 за разделител, който се свива (отворен по подразбиране за нова сесия, а след това състоянието се запазва за всяка потребителска сесия)<br>Посочете стойност 2 за разделител, който се свива (свит по подразбиране за нова сесия, а след това състоянието се запазва за всяка потребителска сесия). LibraryToBuildPDF=Използвана библиотека за създаване на PDF файлове @@ -541,6 +545,8 @@ Module40Name=Доставчици Module40Desc=Управление на доставчици и покупки (поръчки за покупка и фактури от доставчици) Module42Name=Журнали за отстраняване на грешки Module42Desc=Инструменти за регистриране (файл, syslog, ...). Дневници за технически цели и отстраняване на грешки. +Module43Name=Инструменти за отстраняване на грешки +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Редактори Module49Desc=Управление на редактори Module50Name=Продукти @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind възможности за преобразуване Module3200Name=Неизменими архиви Module3200Desc=Непроменлив дневник на бизнес събития. Събитията се архивират в реално време. Дневникът е таблица, достъпна единствено за четене, която съдържа последователни събития, които могат да бъдат експортирани. Този модул може да е задължителен за някои страни. +Module3400Name=Социални мрежи +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=ЧР Module4000Desc=Управление на човешки ресурси (управление на отдели, договори на служители и взаимоотношения) Module5000Name=Няколко фирми Module5000Desc=Управление на няколко фирми -Module6000Name=Работен процес -Module6000Desc=Управление на работен процес (автоматично създаване на обект и / или автоматично променяне на неговия статус) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Уебсайтове Module10000Desc=Създавайте уеб сайтове (обществени) с WYSIWYG редактор. Това е CMS, ориентиран към уеб администратори или разработчици (желателно е да знаете HTML и CSS езици). Просто настройте вашия уеб сървър (Apache, Nginx, ...) да е насочен към специалната Dolibarr директория, за да бъде онлайн в интернет с избраното име за домейн. Module20000Name=Молби за отпуск @@ -805,7 +813,8 @@ PermissionAdvanced253=Създаване / променяне на вътреш Permission254=Създаване / променя само на външни потребители Permission255=Променяне на парола на други потребители Permission256=Изтриване или деактивиране на други потребители -Permission262=Разширяване на достъпа до всички контрагенти (не само контрагенти, за които този потребител е търговски представител).<br>Не е ефективно за външни потребители (винаги са ограничени до своите предложения, поръчки, фактури, договори и т.н.).<br>Не е ефективно за проекти (имат значение само разрешенията, видимостта и възложенията в проекта). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Преглед на CA Permission272=Преглед на фактури Permission273=Издаване на фактури @@ -1175,7 +1184,8 @@ SetupDescription2=Следните две секции са задължител SetupDescription3=<a href="%s">%s -> %s</a><br><br>Основни параметри, използвани за персонализиране на поведението по подразбиране на вашата система (например за функции, свързани с държавата). SetupDescription4=<a href="%s">%s -> %s</a><br><br>Този софтуер е пакет от много модули / приложения. Модулите, свързани с вашите нужди, трябва да бъдат активирани и конфигурирани. С активирането на тези модули ще се появят нови менюта. SetupDescription5=Менюто "Други настройки" управлява допълнителни параметри. -LogEvents=Събития за проверка на сигурността +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Проверка InfoDolibarr=Относно Dolibarr InfoBrowser=Относно браузър @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Актуализацията изглежда YouMustRunCommandFromCommandLineAfterLoginToUser=Трябва да изпълните тази команда от командния ред след влизане в shell с потребител <b>%s</b> или трябва да добавите опция -W в края на командния ред, за да се предостави <b>%s</b> парола. YourPHPDoesNotHaveSSLSupport=SSL функциите не са налични във вашия PHP DownloadMoreSkins=Изтегляне на повече теми -SimpleNumRefModelDesc=Връща референтен номер във формат %syymm-nnnn, където yy е година, mm е месец и nnnn е последователност от номера без връщане към нула +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Показване на идентификационни данни в полетата с адреси ShowVATIntaInAddress=Скриване на вътрешнообщностния номер по ДДС в полетата с адреси TranslationUncomplete=Частичен превод @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Прокси сървър: Име / Адрес MAIN_PROXY_PORT=Прокси сървър: Порт MAIN_PROXY_USER=Прокси сървър: Потребителско име MAIN_PROXY_PASS=Прокси сървър: Парола -DefineHereComplementaryAttributes=Определете тук всички допълнителни / персонализирани атрибути, които искате да бъдат включени за: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Допълнителни атрибути ExtraFieldsLines=Допълнителни атрибути (редове) ExtraFieldsLinesRec=Допълнителни атрибути (редове в шаблонни фактури) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Входни данни (unix) LDAPFieldLoginExample=Пример: uid LDAPFilterConnection=Филтър за търсене LDAPFilterConnectionExample=Пример: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Входни данни (samba, activedirectory) LDAPFieldLoginSambaExample=Пример: СамбаПотребителскоИме LDAPFieldFullname=Пълно име @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Вашата фирма не е определила д AccountancyCode=Счетоводен код AccountancyCodeSell=Счетоводен код за продажба AccountancyCodeBuy=Счетоводен код за покупка +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Настройка на модула за събития и календар PasswordTogetVCalExport=Ключ за оторизация на връзката за експортиране +SecurityKey = Security Key PastDelayVCalExport=Да не се експортират събития по-стари от AGENDA_USE_EVENT_TYPE=Използване на видове събития (управлявани в меню Настройка - Речници - Видове събития в календара) AGENDA_USE_EVENT_TYPE_DEFAULT=Автоматично задаване на стойност по подразбиране за вид събитие във формуляра при създаване на събитие @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Цвят на фона в нечетните ред BackgroundTableLineEvenColor=Цвят на фона в четните редове на таблица MinimumNoticePeriod=Минимален срок за известяване (вашата молба за отпуск трябва да бъде изпратена преди този срок) NbAddedAutomatically=Брой дни, добавени към броячите на потребителите (автоматично) всеки месец -EnterAnyCode=Това поле съдържа референция за идентифициране на реда. Въведете стойност по ваш избор, но без специални символи. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. Enter0or1=Въведете 0 или 1 UnicodeCurrency=Въведете тук между скобите, десетичен код, който представлява символа на валутата. Например: за $, въведете [36] - за Бразилски Реал R$ [82,36] - за €, въведете [8364] ColorFormat=RGB цвета е в HEX формат, например: FF0000 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Долна граница в PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=За този модул не е необходима специфична настройка. SetToYesIfGroupIsComputationOfOtherGroups=Посочете стойност 'Да', ако тази група е съвкупност от други групи. -EnterCalculationRuleIfPreviousFieldIsYes=Въведете правило за изчисление, ако предишното поле е настроено на "Да" (например "CODEGRP1 + CODEGRP2") +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Намерени са няколко езикови варианта RemoveSpecialChars=Премахване на специални символи COMPANY_AQUARIUM_CLEAN_REGEX=Regex филтър за изчистване на стойността (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Настройка на модул Социални мреж EnableFeatureFor=Активиране на функции за <strong> %s </strong> VATIsUsedIsOff=Забележка: Опцията за използване на данък върху продажбите или ДДС е <strong>изключена</strong> в менюто %s - %s, така че данъкът върху продажбите или ДДС винаги ще бъде 0 за продажби. SwapSenderAndRecipientOnPDF=Размяна на адресите на подателя и получателя в PDF документи -FeatureSupportedOnTextFieldsOnly=Внимание, функцията се поддържа само в текстови полета. Също така трябва да се зададе URL параметър action=create или action=edit ИЛИ името на страницата трябва да завършва с "new.php", за да задейства тази функция. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Имейл колекционер EmailCollectorDescription=Добавете планирана задача в страницата за настройка, за да сканирате редовно пощенските кутии (използвайки протокола IMAP) и да записвате получените в приложението имейли на правилното място и / или да създавате автоматично някои записи (например нови възможности). NewEmailCollector=Нов колекционер на имейли @@ -2049,8 +2062,11 @@ UseDebugBar=Използване на инструменти за отстран DEBUGBAR_LOGS_LINES_NUMBER=Брой последни редове на журнал, които да се пазят в конзолата WarningValueHigherSlowsDramaticalyOutput=Внимание, по-високите стойности забавят драматично производителността ModuleActivated=Модул %s е активиран и забавя интерфейса +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Моделите за експортиране се споделят с всички ExportSetup=Настройка на модула за експортиране на данни ImportSetup=Настройка на модула за импортиране на данни @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Направете анонимен Ping '+1' до сървъ FeatureNotAvailableWithReceptionModule=Функцията не е налична, когато е активиран модул Приемане EmailTemplate=Шаблон за имейл EMailsWillHaveMessageID=Имейлите ще имат етикет „Референции“, отговарящ на този синтаксис +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Ако искате да имате някои текстове във вашия PDF файл, дублирани на 2 различни езика в един и същ генериран PDF файл, трябва да посочите тук този втори език, така че генерираният PDF файл да съдържа 2 различни езика на една и съща страница, избраният при генериране на PDF и този (само няколко PDF шаблона поддържат това). Запазете празно за един език в PDF файла. FafaIconSocialNetworksDesc=Въведете тук кода за FontAwesome икона. Ако не знаете какво е FontAwesome, може да използвате стандартната стойност fa-address book. FeatureNotAvailableWithReceptionModule=Функцията не е налична, когато е активиран модул Приемане @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/bg_BG/banks.lang b/htdocs/langs/bg_BG/banks.lang index fe4cf4b6b83..f23019f31c0 100644 --- a/htdocs/langs/bg_BG/banks.lang +++ b/htdocs/langs/bg_BG/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Вашите SEPA нареждания FindYourSEPAMandate=Това е вашето SEPA нареждане, с което да упълномощите нашата фирма да направи поръчка за директен дебит към вашата банка. Върнете го подписано (сканиран подписан документ) или го изпратете по пощата на AutoReportLastAccountStatement=Автоматично попълване на полето „номер на банково извлечение“ с последния номер на извлечение, когато правите съгласуване. CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Оцветяване на движения BankColorizeMovementDesc=Ако тази функция е активирана може да изберете конкретен цвят на фона за дебитни или кредитни движения BankColorizeMovementName1=Цвят на фона за дебитно движение BankColorizeMovementName2=Цвят на фона за кредитно движение IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/bg_BG/bills.lang b/htdocs/langs/bg_BG/bills.lang index b69b0af348a..01cb523006a 100644 --- a/htdocs/langs/bg_BG/bills.lang +++ b/htdocs/langs/bg_BG/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=Фактура за продажба CustomersInvoices=Фактури за продажба SupplierInvoice=Фактура за доставка SuppliersInvoices=Фактури за доставка +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Фактура за доставка SupplierBills=Фактури за доставка Payment=Плащане @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Вече направени плащания PaymentsBackAlreadyDone=Вече направени възстановявания PaymentRule=Правило за плащане PaymentMode=Начин на плащане +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Дебитна / Кредитна карта PaymentTypePP=PayPal IdPaymentMode=Начин на плащане (идентификатор) @@ -373,6 +376,7 @@ DateLastGeneration=Дата на последно генериране DateLastGenerationShort=Дата на последно ген. MaxPeriodNumber=Максимален брой генерирани фактури NbOfGenerationDone=Брой генерирани фактури +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Брой извършени генерирания MaxGenerationReached=Максималният брой генерирания е достигнат InvoiceAutoValidate=Автоматично валидиране на фактури @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=14 календарни дни от края на м FixAmount=Фиксирана сума - на един ред с текст '%s' VarAmount=Променлива сума (общо %%) VarAmountOneLine=Променлива сума (общо %%) - на един ред с текст '%s' -VarAmountAllLines=Променлива сума (общо %%) - със същите редове +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Банков превод PaymentTypeShortVIR=Банков превод @@ -494,12 +498,16 @@ Cash=В брой Reported=Закъснели DisabledBecausePayments=Не е възможно, тъй като има някои плащания CantRemovePaymentWithOneInvoicePaid=Не може да се премахне плащането, тъй като има най-малко една фактура класифицирана като платена. +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Очаквано плащане CantRemoveConciliatedPayment=Съгласуваното плащане не може да се премахне PayedByThisPayment=Платено от това плащане ClosePaidInvoicesAutomatically=Автоматично класифициране на всички стандартни фактури, авансови плащания или заместващи фактури като 'Платени', когато плащането се извършва изцяло. ClosePaidCreditNotesAutomatically=Автоматично класифициране на всички кредитни известия като 'Платени', когато възстановяването се извършва изцяло. ClosePaidContributionsAutomatically=Автоматично класифициране на всички социални или фискални вноски като 'Платени', когато плащането се извършва изцяло. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Всички фактури без остатък за плащане ще бъдат автоматично приключени със статус "Платени". ToMakePayment=Плащане ToMakePaymentBack=Обратно плащане @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Първо трябва да създад PDFCrabeDescription=PDF шаблон за фактура. Пълен шаблон за фактура (стара реализация на шаблон Sponge) PDFSpongeDescription=PDF шаблон за фактура. Пълен шаблон за фактура PDFCrevetteDescription=PDF шаблон за фактура. Пълен шаблон за ситуационни фактури -TerreNumRefModelDesc1=Връща номер с формат %syymm-nnnn за стандартни фактури и %syymm-nnnn за кредитни бележки, където yy е година, mm е месец и nnnn е последователност без прекъсване и няма връщане към 0 -MarsNumRefModelDesc1=Връща номер с формат %syymm-nnnn за стандартни фактури, %syymm-nnnn за заместващи фактури, %syymm-nnnn за фактури за авансово плащане и %syymm-nnnn за кредитни известия, където yy е година, mm е месец и nnnn е последователност без прекъсване и без връщане към 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Документ, започващ с $syymm, вече съществува и не е съвместим с този модел на последователност. Премахнете го или го преименувайте, за да активирате този модул. -CactusNumRefModelDesc1=Връща номер с формат %syymm-nnnn за стандартни фактури, %syymm-nnnn за кредитни известия и %syymm-nnnn за фактури за авансово плащане, където yy е година, mm е месец и nnnn е последователност без прекъсване и без връщане към 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Причина за ранно приключване EarlyClosingComment=Бележка за ранно приключване ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Контакт по обслужв InvoiceFirstSituationAsk=Първа ситуационна фактура InvoiceFirstSituationDesc=<b>Ситуационните фактури</b> са свързани със ситуации отнасящи се до някакъв напредък, например процес на конструиране. Всяка ситуация е свързана с една фактура. InvoiceSituation=Ситуационна фактура +PDFInvoiceSituation=Ситуационна фактура InvoiceSituationAsk=Фактура свързана със ситуация InvoiceSituationDesc=Създаване на нова ситуация, следваща съществуваща такава. SituationAmount=Сума на ситуационна фактура (нето) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Ако трябва да генерирате DeleteRepeatableInvoice=Изтриване на шаблонна фактура ConfirmDeleteRepeatableInvoice=Сигурни ли сте, че искате да изтриете тази шаблонна фактура? CreateOneBillByThird=Създаване на една фактура за контрагент (в противен случай по една фактура за поръчка) -BillCreated=Създадени са %s фактури +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Статус на генерираните документи DoNotGenerateDoc=Не генерирайте файл за документа AutogenerateDoc=Автоматично генериране на файл за документа @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Фактурата за доставка е из UnitPriceXQtyLessDiscount=Единична цена x Количество - Отстъпка CustomersInvoicesArea=Секция с фактури за продажба SupplierInvoicesArea=Секция с фактури за доставка +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/bg_BG/boxes.lang b/htdocs/langs/bg_BG/boxes.lang index c59a1d12298..4b78b60d66e 100644 --- a/htdocs/langs/bg_BG/boxes.lang +++ b/htdocs/langs/bg_BG/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Входна информация BoxLastRssInfos=RSS информация BoxLastProducts=Продукти / Услуги: %s последно създадени @@ -17,9 +18,13 @@ BoxLastActions=Последни действия BoxLastContracts=Последни договори BoxLastContacts=Последни контакти / адреси BoxLastMembers=Последни членове +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Последни интервенции BoxCurrentAccounts=Баланс по открити сметки BoxTitleMemberNextBirthdays=Рождени дни в този месец (членове) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Новини: %s последни от %s BoxTitleLastProducts=Продукти / Услуги: %s последно променени BoxTitleProductsAlertStock=Продукти: сигнали за наличност @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Пратки: %s последни към клие NoRecordedShipments=Няма регистрирани пратки към клиенти BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Счетоводство +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/bg_BG/categories.lang b/htdocs/langs/bg_BG/categories.lang index 54c706a7b42..4c3ac637eb4 100644 --- a/htdocs/langs/bg_BG/categories.lang +++ b/htdocs/langs/bg_BG/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Секция с тагове / категории за CustomersCategoriesArea=Секция с тагове / категории за клиенти MembersCategoriesArea=Секция с тагове / категории за членове ContactsCategoriesArea=Секция с тагове / категории за контакти -AccountsCategoriesArea=Секция с тагове / категории за сметки +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Секция с тагове / категории за проекти UsersCategoriesArea=Секция с тагове / категории за потребители SubCats=Подкатегории @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Показване на таг / категория ByDefaultInList=По подразбиране в списъка ChooseCategory=Избиране на категория -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Използване или оператор за категории diff --git a/htdocs/langs/bg_BG/companies.lang b/htdocs/langs/bg_BG/companies.lang index 5acad41ae81..81d317bd321 100644 --- a/htdocs/langs/bg_BG/companies.lang +++ b/htdocs/langs/bg_BG/companies.lang @@ -43,9 +43,10 @@ Individual=Физическо лице ToCreateContactWithSameName=Автоматично ще създаде контакт / адрес със същата информация като в контрагента. В повечето случаи, дори ако вашия контрагент е частно лице, е достатъчно да създадете само контрагент. ParentCompany=Фирма майка Subsidiaries=Дъщерни дружества -ReportByMonth=Справка по месеци -ReportByCustomers=Справка по клиенти -ReportByQuarter=Справка по ставки +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Код на обръщение RegisteredOffice=Седалище и адрес на управление Lastname=Фамилия @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Текуща неизплатена сметка OutstandingBill=Максимална неизплатена сметка OutstandingBillReached=Достигнат е максимумът за неизплатена сметка OrderMinAmount=Минимално количество за поръчка -MonkeyNumRefModelDesc=Генерира номер с формат %syymm-nnnn за код на клиент и %syymm-nnnn за код на доставчик, където yy е година, mm е месецa, а nnnn е поредица без прекъсване и без връщане към 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Кодът е свободен. Този код може да бъде променян по всяко време. ManagingDirectors=Име на управител (изпълнителен директор, директор, президент...) MergeOriginThirdparty=Дублиращ контрагент (контрагентът, който искате да изтриете) diff --git a/htdocs/langs/bg_BG/compta.lang b/htdocs/langs/bg_BG/compta.lang index 177dc32434a..b07de8ea9fd 100644 --- a/htdocs/langs/bg_BG/compta.lang +++ b/htdocs/langs/bg_BG/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST покупки VATCollected=Получен ДДС StatusToPay=За плащане SpecialExpensesArea=Секция със специални плащания +VATExpensesArea=Area for all TVA payments SocialContribution=Социален или фискален данък SocialContributions=Социални или фискални данъци SocialContributionsDeductibles=Приспадащи се социални или фискални данъци @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Плащане на фактура за продажба PaymentSupplierInvoice=Плащане на фактура за покупка PaymentSocialContribution=Плащане на социален / фискален данък PaymentVat=Плащане на ДДС +AutomaticCreationPayment=Automatically record the payment ListPayment=Списък на плащания ListOfCustomerPayments=Списък на клиентски плащания ListOfSupplierPayments=Списък на плащания към доставчици @@ -104,6 +106,8 @@ LT2PaymentES=IRPF плащане LT2PaymentsES=IRPF плащания VATPayment=Плащане на данък върху продажбите VATPayments=Плащания на данък върху продажбите +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Възстановяване на данък върху продажби NewVATPayment=Ново плащане на данък върху продажби NewLocalTaxPayment=Ново плащане на данък %s @@ -134,9 +138,17 @@ NoWaitingChecks=Няма чекове, които да очакват депоз DateChequeReceived=Дата на приемане на чек NbOfCheques=Брой чекове PaySocialContribution=Плащане на социален / фискален данък -ConfirmPaySocialContribution=Сигурни ли сте, че искате да класифицирате този социален или фискален данък като платен? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Изтриване на плащане за социален или фискален данък -ConfirmDeleteSocialContribution=Сигурни ли сте, че искате да изтриете това плащане на социален / фискален данък? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Социални / фискални данъци и плащания CalcModeVATDebt=Режим <b>%sДДС върху осчетоводени задължения%s</b> CalcModeVATEngagement=Режим <b>%sДДС върху приходи - разходи%s</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Включва реални плащания по факту RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- Включва всички реални плащания по фактури, получени от клиенти<br>- Основава се на дата на плащане на тези фактури<br> RulesCATotalSaleJournal=Включва всички кредитни линии от журнала за продажба. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Включва запис във вашата книга със счетоводни сметки, които са в групата "РАЗХОД" или "ПРИХОД" RulesResultBookkeepingPredefined=Включва запис във вашата книга със счетоводни сметки, които са в групата "РАЗХОД" или "ПРИХОД" RulesResultBookkeepingPersonalized=Показва запис във вашата книга със счетоводни сметки <b>, групирани в персонализирани групи</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Справка за данък върху продажб VATReportByCustomers=Справка за данък върху продажби по клиенти VATReportByCustomersInInputOutputMode=Справка за получен и платен ДДС от клиент VATReportByQuartersInInputOutputMode=Справка по данъчна ставка върху продажби за получен и платен данък +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Справка за данък 2 по ставки LT2ReportByQuarters=Справка за данък 3 по ставки LT1ReportByQuartersES=Справка за RE по ставки @@ -217,7 +231,7 @@ Pcg_subtype=PCG подтип InvoiceLinesToDispatch=Редове от фактура за изпращане ByProductsAndServices=По продукт и услуга RefExt=Външна референция -ToCreateAPredefinedInvoice=За да създадете шаблонна фактура създайте стандартна фактура, след което преди да я валидирате кликнете върху бутона "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Връзка към поръчка Mode1=Метод 1 Mode2=Метод 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Специализираната счетово ACCOUNTING_ACCOUNT_SUPPLIER=Счетоводна сметка, използвана за контрагенти, които са доставчици ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Специализираната счетоводна сметка, определена в картата на контрагента, ще се използва само за счетоводно отчитане на подсметка. Този ще бъде използван за главната книга и като стойност по подразбиране на подсметката за счетоводното отчитане, ако не е дефинирана специализирана счетоводна сметка за доставчика. ConfirmCloneTax=Потвърдете клонирането на социален/фискален данък +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Клониране за следващ месец SimpleReport=Обикновена справка AddExtraReport=Допълнителни справки (добавя справка за чуждестранни и локални клиенти) @@ -253,7 +269,8 @@ AccountingAffectation=Счетоводно възлагане LastDayTaxIsRelatedTo=Последен ден от периода, с който е свързан данъкът VATDue=Заявен данък върху продажбите ClaimedForThisPeriod=Заявен за периода -PaidDuringThisPeriod=Платен през този период +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=По ставка на ДДС TurnoverbyVatrate=Оборот, фактуриран по ставка на ДДС TurnoverCollectedbyVatrate=Оборот, натрупан по ставка на ДДС @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/bg_BG/ecm.lang b/htdocs/langs/bg_BG/ecm.lang index 032fc7c015a..79ccce411d2 100644 --- a/htdocs/langs/bg_BG/ecm.lang +++ b/htdocs/langs/bg_BG/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Файлът все още не е индексир ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/bg_BG/errors.lang b/htdocs/langs/bg_BG/errors.lang index aea2d732d1c..f70abe8e9ba 100644 --- a/htdocs/langs/bg_BG/errors.lang +++ b/htdocs/langs/bg_BG/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Директория <b>%s</b> не е намерен (Bad пъ ErrorFunctionNotAvailableInPHP=Функция <b>%s</b> се изисква за тази функция, но не е на разположение в тази версия / настройка на PHP. ErrorDirAlreadyExists=Директория с това име вече съществува. ErrorFileAlreadyExists=Файл с това име вече съществува. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Файла не е получил изцяло от сървъра. ErrorNoTmpDir=Временно за директно %s не съществува. ErrorUploadBlockedByAddon=Качи блокиран от PHP / Apache плъгин. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Грешка при зареждане на диаграм ErrorBadSyntaxForParamKeyForContent=Неправилен синтаксис за параметър keyforcontent. Трябва да има стойност, започваща с %s или %s ErrorVariableKeyForContentMustBeSet=Грешка, трябва да бъде зададена константа с име %s (с текстово съдържание за показване) или %s (с външен url за показване). ErrorURLMustStartWithHttp=URL адресът %s трябва да започва с http:// или https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Грешка, новата референция вече е използвана ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Грешка, изтриването на плащане, свързано с приключена фактура, е невъзможно. ErrorSearchCriteriaTooSmall=Критериите за търсене са твърде ограничени. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Публичният интерфейс не е ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Вашата стойност на PHP параметър upload_max_filesize (%s) е по-голяма от стойността на PHP параметър post_max_size (%s). Това не е последователна настройка. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/bg_BG/externalsite.lang b/htdocs/langs/bg_BG/externalsite.lang index 4b5650fbff9..5b2ff52c0f8 100644 --- a/htdocs/langs/bg_BG/externalsite.lang +++ b/htdocs/langs/bg_BG/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Настройка на линк към външен сайт -ExternalSiteURL=Външен URL адрес на сайта +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Модула Външен сайт не е конфигуриран правилно. ExampleMyMenuEntry=Мой елемент на меню diff --git a/htdocs/langs/bg_BG/main.lang b/htdocs/langs/bg_BG/main.lang index b84fe0a8561..6dddb3abc1e 100644 --- a/htdocs/langs/bg_BG/main.lang +++ b/htdocs/langs/bg_BG/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Промяна IPModification=Modification IP DateLastModification=Дата на последна промяна DateValidation=Дата на валидиране +DateSigning=Signing date DateClosing=Дата на приключване DateDue=Краен срок за плащане DateValue=Дата на вальор @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Единична цена (без ДДС) (валута) UnitPriceTTC=Единична цена PriceU=Ед. цена PriceUHT=Ед. цена (без ДДС) -PriceUHTCurrency=Ед. цена (валута) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Ед. цена (с ДДС) Amount=Сума AmountInvoice=Фактурна стойност @@ -389,6 +390,8 @@ AmountTotal=Обща сума AmountAverage=Средна сума PriceQtyMinHT=Цена за минимално количество (без ДДС) PriceQtyMinHTCurrency=Цена за минимално количество (без ДДС) (валута) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Процент Total=Общо SubTotal=Междинна сума @@ -724,7 +727,7 @@ MenuMembers=Членове MenuAgendaGoogle=Google календар MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Ограничение на системата (Меню Начало - Настройка - Сигурност): %s Kb, ограничение на PHP: %s Kb -NoFileFound=Няма записани документи в тази директория +NoFileFound=No documents uploaded CurrentUserLanguage=Текущ език CurrentTheme=Текуща тема CurrentMenuManager=Текущ меню манипулатор @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Премахване на низ „%s“ SomeTranslationAreUncomplete=Някои от предлаганите езици могат да бъдат само частично преведени или да съдържат грешки. Моля, помогнете ни да коригираме езика ви като се регистрирате на адрес <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a>, за да добавите подобренията си. -DirectDownloadLink=Директна връзка за изтегляне (публична / външна) -DirectDownloadInternalLink=Директна връзка за изтегляне (изисква регистрация в системата и съответни права) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Изтегляне DownloadDocument=Изтегляне на документ ActualizeCurrency=Актуализиране на валутния курс @@ -1013,6 +1018,7 @@ SearchIntoContacts=Контакти SearchIntoMembers=Членове SearchIntoUsers=Потребители SearchIntoProductsOrServices=Продукти или услуги +SearchIntoBatch=Lots / Serials SearchIntoProjects=Проекти SearchIntoMO=Поръчки за производство SearchIntoTasks=Задачи @@ -1049,12 +1055,13 @@ KeyboardShortcut=Клавишна комбинация AssignedTo=Възложено на Deletedraft=Изтриване на чернова ConfirmMassDraftDeletion=Потвърждаване за масово изтриване на чернови -FileSharedViaALink=Файлът е споделен чрез връзка +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Първо изберете контрагент... YouAreCurrentlyInSandboxMode=В момента се намирате в режим "sandbox" на %s Inventory=Складова наличност AnalyticCode=Аналитичен код TMenuMRP=ПМИ +ShowCompanyInfos=Show company infos ShowMoreInfos=Показване на повече информация NoFilesUploadedYet=Моля, първо прикачете документ SeePrivateNote=Вижте частната бележка @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/bg_BG/margins.lang b/htdocs/langs/bg_BG/margins.lang index 98573ae49a9..67098604299 100644 --- a/htdocs/langs/bg_BG/margins.lang +++ b/htdocs/langs/bg_BG/margins.lang @@ -22,7 +22,7 @@ ProductService=Продукт или услуга AllProducts=Всички продукти и услуги ChooseProduct/Service=Избиране на продукт или услуга ForceBuyingPriceIfNull=Форсиране на покупна цена / себестойност да бъде равна на продажната цена, ако не е дефинирана първата -ForceBuyingPriceIfNullDetails=Ако покупната цена / себестойност не е дефинирана и тази опция е включена, маржа ще бъде нула за реда (покупна цена / себестойност = продажна цена), в противен случай, ако е изключена маржа ще бъде равен на предложения по подразбиране. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Маржов метод за глобални отстъпки UseDiscountAsProduct=Като продукт UseDiscountAsService=Като услуга diff --git a/htdocs/langs/bg_BG/members.lang b/htdocs/langs/bg_BG/members.lang index 5cb008f47a5..f74329e9e8d 100644 --- a/htdocs/langs/bg_BG/members.lang +++ b/htdocs/langs/bg_BG/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Списък на чернови членове (за вал MembersListValid=Списък на валидирани членове MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Списък на деактивирани членове MembersListQualified=Списък на квалифицирани членове MenuMembersToValidate=Чернови членове MenuMembersValidated=Валидирани членове +MenuMembersExcluded=Excluded members MenuMembersResiliated=Деактивирани членове MembersWithSubscriptionToReceive=Членове с абонамент за получаване MembersWithSubscriptionToReceiveShort=Абонамент за получаване @@ -47,9 +49,12 @@ MemberStatusActiveLate=Изтекъл абонамент MemberStatusActiveLateShort=Изтекъл MemberStatusPaid=Актуален абонамент MemberStatusPaidShort=Актуален +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Деактивиран член MemberStatusResiliatedShort=Деактивиран MembersStatusToValid=Чернови членове +MembersStatusExcluded=Excluded members MembersStatusResiliated=Деактивирани членове MemberStatusNoSubscription=Валидиран (не е необходим абонамент) MemberStatusNoSubscriptionShort=Валидиран @@ -82,6 +87,8 @@ Physical=Реален Moral=Морален MorAndPhy=Moral and Physical Reenable=Повторно активиране +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Деактивиране на член ConfirmResiliateMember=Сигурни ли сте, че искате да деактивирате този член? DeleteMember=Изтриване на член @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Имейл шаблон, койт DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Имейл шаблон, който да се използва за изпращане на имейл до член при регистриране на нов абонамент DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Имейл шаблон, който да се използва за изпращане на напомняне по имейл, когато абонаментът изтича DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Имейл шаблон, който да се използва за изпращане на имейл до член при анулиране на членство +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Имейл адрес за изпращане на автоматични имейли DescADHERENT_ETIQUETTE_TYPE=Формат на страница за етикети DescADHERENT_ETIQUETTE_TEXT=Текст, отпечатан в членски адресни листи @@ -162,6 +170,7 @@ DocForLabels=Генериране на адресни листи SubscriptionPayment=Плащане на абонамент LastSubscriptionDate=Дата на последно плащане за абонамент LastSubscriptionAmount=Стойност на последния абонамент +LastMemberType=Last Member type MembersStatisticsByCountries=Статистика за членове по държави MembersStatisticsByState=Статистика за членове по област MembersStatisticsByTown=Статистика за членове по град diff --git a/htdocs/langs/bg_BG/modulebuilder.lang b/htdocs/langs/bg_BG/modulebuilder.lang index eb76c35f976..8df6a66c938 100644 --- a/htdocs/langs/bg_BG/modulebuilder.lang +++ b/htdocs/langs/bg_BG/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Искам да генерирам някои докуме IncludeDocGenerationHelp=Ако маркирате това, ще се генерира код, който да добави поле 'Генериране на документ' върху записа. ShowOnCombobox=Показване на стойност в комбиниран списък KeyForTooltip=Ключ за подсказка -CSSClass=CSS клас +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Непроменяем ForeignKey=Външен ключ TypeOfFieldsHelp=Тип на полета:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] (например '1' означава, че добавяме бутон + след комбинирания списък, за да създадем записа, 'filter' може да бъде 'status=1 AND fk_user=__USER_ID AND entity IN (__SHARED_ENTITIES__)') diff --git a/htdocs/langs/bg_BG/orders.lang b/htdocs/langs/bg_BG/orders.lang index 543cbaf346a..e921bcb43cf 100644 --- a/htdocs/langs/bg_BG/orders.lang +++ b/htdocs/langs/bg_BG/orders.lang @@ -16,6 +16,8 @@ ToOrder=Възлагане на поръчка MakeOrder=Възлагане на поръчка SupplierOrder=Поръчка за покупка SuppliersOrders=Поръчки за покупка +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Текущи поръчки за покупка CustomerOrder=Поръчка за продажба CustomersOrders=Поръчки за продажба diff --git a/htdocs/langs/bg_BG/other.lang b/htdocs/langs/bg_BG/other.lang index 5d9542b424e..0e71bbb327f 100644 --- a/htdocs/langs/bg_BG/other.lang +++ b/htdocs/langs/bg_BG/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Фирма с множество дейности (всички CreatedBy=Създадено от %s ModifiedBy=Променено от %s ValidatedBy=Валидирано от %s +SignedBy=Signed by %s ClosedBy=Приключено от %s CreatedById=Потребител, който е създал ModifiedById=Потребител, който е направил последна промяна @@ -244,6 +245,7 @@ NewKeyIs=Това са новите ви данни за вход NewKeyWillBe=Вашите нови данни за вход ще бъдат ClickHereToGoTo=Кликнете тук, за да отидете на %s YouMustClickToChange=Необходимо е първо да кликнете върху следния линк, за да потвърдите промяната на паролата +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Ако не сте заявили промяна, просто забравете за този имейл. Вашите идентификационни данни се съхраняват на сигурно място. IfAmountHigherThan=Ако сумата e по-висока от <strong>%s</strong> SourcesRepository=Хранилище за източници diff --git a/htdocs/langs/bg_BG/productbatch.lang b/htdocs/langs/bg_BG/productbatch.lang index ba66b298f69..42054467fed 100644 --- a/htdocs/langs/bg_BG/productbatch.lang +++ b/htdocs/langs/bg_BG/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Използване на партиден / сериен № -ProductStatusOnBatch=Да (изисква се партиден / сериен №) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Да (уникалният сериен номер е задължителен) ProductStatusNotOnBatch=Не (не се изисква партиден / сериен №) -ProductStatusOnBatchShort=Да +ProductStatusOnBatchShort=Партиден +ProductStatusOnSerialShort=Сериен ProductStatusNotOnBatchShort=Не Batch=Партиден / Сериен № atleast1batchfield=Дата на годност, дата на продажба или партиден / сериен № @@ -22,3 +24,12 @@ ProductLotSetup=Настройка на модул партиден / серие ShowCurrentStockOfLot=Показване на текуща наличност за продукт / партида ShowLogOfMovementIfLot=Показване на движения за продукт / партида StockDetailPerBatch=Наличност по партида +SerialNumberAlreadyInUse=Сериен номер %s е вече използван от друг продукт %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/bg_BG/products.lang b/htdocs/langs/bg_BG/products.lang index e7009fa4c48..f74d443e831 100644 --- a/htdocs/langs/bg_BG/products.lang +++ b/htdocs/langs/bg_BG/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Ставка на ДДС (за този доставч DiscountQtyMin=Отстъпка за това количество NoPriceDefinedForThisSupplier=Няма дефинирана цена / количество за този доставчик / продукт NoSupplierPriceDefinedForThisProduct=Няма дефинирана цена / количество за този продукт +PredefinedItem=Predefined item PredefinedProductsToSell=Предварително определен продукт PredefinedServicesToSell=Предварително определена услуга PredefinedProductsAndServicesToSell=Предварително определени продукти / услуги за продажба @@ -313,7 +314,7 @@ LastUpdated=Последна актуализация CorrectlyUpdated=Правилно актуализирано PropalMergePdfProductActualFile=Файловете използвани за добавяне в PDF Azur са PropalMergePdfProductChooseFile=Избиране на PDF файлове -IncludingProductWithTag=Включващи продукт / услуга от категория +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Цена по подразбиране, реалната цена може да зависи от клиента WarningSelectOneDocument=Моля, изберете поне един документ DefaultUnitToShow=Мярка diff --git a/htdocs/langs/bg_BG/projects.lang b/htdocs/langs/bg_BG/projects.lang index 447427dfbc8..9a5727ec772 100644 --- a/htdocs/langs/bg_BG/projects.lang +++ b/htdocs/langs/bg_BG/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Списък със задачи GoToListOfTimeConsumed=Показване на списъка с изразходвано време GanttView=Gantt диаграма +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Списък на търговски предложения, свързани с проекта ListOrdersAssociatedProject=Списък на поръчки за продажба, свързани с проекта ListInvoicesAssociatedProject=Списък на фактури за продажба, свързани с проекта @@ -268,3 +269,7 @@ OneLinePerTask=Един ред на задача OneLinePerPeriod=Един ред на период RefTaskParent=Съгласно главна задача № ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/bg_BG/propal.lang b/htdocs/langs/bg_BG/propal.lang index 5285db83d67..33ade36041e 100644 --- a/htdocs/langs/bg_BG/propal.lang +++ b/htdocs/langs/bg_BG/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Изпращане на търговско предложени DatePropal=Дата на създаване DateEndPropal=Валидно до ValidityDuration=Срок на валидност -CloseAs=Предложението е SetAcceptedRefused=Подписване / Отхвърляне ErrorPropalNotFound=Предложение %s не е намерено AddToDraftProposals=Добавяне към черновата на предложение @@ -60,6 +59,7 @@ ConfirmClonePropal=Сигурни ли сте, че искате да клони ConfirmReOpenProp=Сигурни ли сте, че искате да отворите отново търговско предложение с № <b>%s</b>? ProposalsAndProposalsLines=Търговско предложение и редове ProposalLine=Ред № +ProposalLines=Proposal lines AvailabilityPeriod=Забавяне на наличността SetAvailability=Определете забавяне на наличност AfterOrder=след поръчка @@ -85,3 +85,8 @@ ProposalCustomerSignature=Име, фамилия, фирмен печат, да ProposalsStatisticsSuppliers=Статистика на запитвания към доставчици CaseFollowedBy=Случай, проследяван от 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/bg_BG/stocks.lang b/htdocs/langs/bg_BG/stocks.lang index 2e83457229d..0a87358401a 100644 --- a/htdocs/langs/bg_BG/stocks.lang +++ b/htdocs/langs/bg_BG/stocks.lang @@ -19,8 +19,8 @@ Stock=Наличност Stocks=Наличности MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Наличности по партида / сериен № LotSerial=Партиди / Серийни номера LotSerialList=Списък на партиди / серийни номера @@ -37,8 +37,8 @@ AllWarehouses=Всички складове IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Включва чернови поръчки Location=Местоположение -LocationSummary=Кратко име на местоположение -NumberOfDifferentProducts=Брой различни продукти +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Общ брой продукти LastMovement=Последно движение LastMovements=Последни движения @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Складова стойност UserWarehouseAutoCreate=Автоматично създаване на личен потребителски склад при създаване на потребител AllowAddLimitStockByWarehouse=Управляване също и на стойност за минимална и желана наличност за двойка (продукт - склад) в допълнение към стойността за минимална и желана наличност за продукт RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Склад по подразбиране @@ -97,15 +98,16 @@ RealStockDesc=Физическа / реална наличност е налич RealStockWillAutomaticallyWhen=Реалната наличност ще бъде модифицирана според това правило (както е определено в модула на Наличности): VirtualStock=Виртуална наличност VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Идентификатор на склад DescWareHouse=Описание на склад LieuWareHouse=Местоположение на склад WarehousesAndProducts=Складове и продукти WarehousesAndProductsBatchDetail=Складове и продукти (с подробности за партида / сериен №) AverageUnitPricePMPShort=Средно измерена цена -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Единична продажна цена EstimatedStockValueSellShort=Стойност за продажба EstimatedStockValueSell=Стойност за продажба @@ -145,7 +147,7 @@ Replenishments=Попълвания на наличности NbOfProductBeforePeriod=Количество на продукта %s в наличност преди избрания период (< %s) NbOfProductAfterPeriod=Количество на продукта %s в наличност след избрания период (> %s) MassMovement=Масово движение -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". +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 on "%s". RecordMovement=Регистриране на прехвърляне ReceivingForSameOrder=Разписки за тази поръчка StockMovementRecorded=Движенията на наличностите са регистрирани @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Нивото на наличност трябва д StockMustBeEnoughForOrder=Нивото на наличност трябва да е достатъчно, за да добавите продукт / услуга към поръчка (проверката се извършва по текущите реални наличности, по време на добавяне на ред в поръчка, независимо от правилото за автоматична промяна на наличността) StockMustBeEnoughForShipment= Нивото на наличност трябва да е достатъчно, за да добавите продукт / услуга към пратка (проверката се прави по текущите реални наличности, по време на добавяне на ред в пратката, независимо от правилото за автоматична промяна на наличността) MovementLabel=Име на движение -TypeMovement=Вид на движение +TypeMovement=Direction of movement DateMovement=Дата на движение InventoryCode=Код на движение / Инвентарен код IsInPackage=Съдържа се в опаковка @@ -183,6 +185,7 @@ inventoryCreatePermission=Създаване на нова инвентариз inventoryReadPermission=Преглед на инвентаризации inventoryWritePermission=Актуализиране на инвентаризации inventoryValidatePermission=Валидиране на инвентаризация +inventoryDeletePermission=Delete inventory inventoryTitle=Инвентаризация inventoryListTitle=Инвентаризации inventoryListEmpty=Не се извършва инвентаризация @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Необходима е наличност, ForceTo=Принуждаване до 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Прикачете файл, след това кликнете върху иконата %s, за да изберете файла като източник при импортиране... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Повторно отваряне +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/bg_BG/suppliers.lang b/htdocs/langs/bg_BG/suppliers.lang index 2f3e0c1898c..607c886b4be 100644 --- a/htdocs/langs/bg_BG/suppliers.lang +++ b/htdocs/langs/bg_BG/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Доставчици SuppliersInvoice=Фактура за доставка +SupplierInvoices=Фактури за доставка ShowSupplierInvoice=Показване на фактура за доставка NewSupplier=Нов доставчик History=История diff --git a/htdocs/langs/bg_BG/ticket.lang b/htdocs/langs/bg_BG/ticket.lang index e1801645a17..b777b181aae 100644 --- a/htdocs/langs/bg_BG/ticket.lang +++ b/htdocs/langs/bg_BG/ticket.lang @@ -70,6 +70,8 @@ Deleted=Изтрит # Dict Type=Вид Severity=Приоритет +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=За да изпратите имейл с това съобщение @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Показване на логото на модула в TicketsShowModuleLogoHelp=Активирайте тази опция, за да скриете логото на модула от страниците на публичния интерфейс TicketsShowCompanyLogo=Показване на логото на фирмата в публичния интерфейс TicketsShowCompanyLogoHelp=Активирайте тази опция, за да скриете логото на основната фирма от страниците на публичния интерфейс -TicketsEmailAlsoSendToMainAddress=Изпращане на известие до основния имейл адрес -TicketsEmailAlsoSendToMainAddressHelp=Активирайте тази опция, за да изпратите имейл до "Известяващ имейл от" (вижте настройката по-долу) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Ограничаване на показването на тикети до такива, които са възложени на текущия потребител (не е приложимо за външни потребители, винаги ще бъдат ограничени до контрагента, от който зависят) TicketsLimitViewAssignedOnlyHelp=Само тикети, възложени на текущия потребител ще бъдат показвани. Не важи за потребител с права за управление на тикети. TicketsActivatePublicInterface=Активиране на публичния интерфейс @@ -126,10 +128,10 @@ TicketNumberingModules=Модул за номериране на тикети TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Уведомяване на контрагента при създаване TicketsDisableCustomerEmail=Деактивиране на имейлите, когато тикетът е създаден от публичния интерфейс -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Последно променени тикети BoxLastModifiedTicketDescription=Тикети: %s последно променени BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Няма скорошни променени тикети +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/bg_BG/users.lang b/htdocs/langs/bg_BG/users.lang index 9ffab6ba5ab..5312e855960 100644 --- a/htdocs/langs/bg_BG/users.lang +++ b/htdocs/langs/bg_BG/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Премахване от групата PasswordChangedAndSentTo=Паролата е сменена и изпратена на <b>%s</b>. PasswordChangeRequest=Заявка за промяна на парола на <b>%s</b> PasswordChangeRequestSent=Заявка за промяна на парола на <b>%s</b> е изпратена на <b>%s</b>. +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=Потвърдете възстановяване на парола MenuUsersAndGroups=Потребители и групи LastGroupsCreated=Групи: %s последно създадени @@ -70,9 +72,10 @@ ExportDataset_user_1=Потребители и техните реквизити DomainUser=Домейн потребител %s Reactivate=Възстановяване CreateInternalUserDesc=Тази форма позволява да създадете вътрешен потребител във вашата фирма / организация. За да създадете външен потребител (за клиент, доставчик и т.н.), използвайте бутона 'Създаване на потребител' в картата на контакта за този контрагент. -InternalExternalDesc=<b>Вътрешен</b> потребител е този, който е част от вашата фирма / организация.<br><b>Външен</b> потребител е този, който е клиент, доставчик или друг (Външен потребител към контрагент може да бъде създаден от раздела 'Контакти / Адреси' на съответният контрагент).<br><br>И в двата случая разрешенията определят права в Dolibarr, също така външният потребител може да има различен меню манипулатор от вътрешният (Вижте Начало - Настройка - Интерфейс). +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Разрешението е предоставено, тъй като е наследено от една от групите на потребителя. Inherited=Наследено +UserWillBe=Created user will be UserWillBeInternalUser=Създаденият потребителят ще бъде вътрешен потребител (тъй като не е свързан с определен контрагент) UserWillBeExternalUser=Създаденият потребителят ще бъде външен потребител (защото е свързан с определен контрагент) IdPhoneCaller=Идентификатор на повикващия @@ -109,8 +112,10 @@ UserAccountancyCode=Счетоводен код на потребителя UserLogoff=Излизане от потребителя UserLogged=Потребителят е регистриран DateOfEmployment=Employment date -DateEmployment=Дата на назначаване +DateEmployment=Employment +DateEmploymentstart=Дата на назначаване DateEmploymentEnd=Дата на освобождаване +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Не можете да забраните собствения си потребителски запис ForceUserExpenseValidator=Принудително валидиране на разходни отчети ForceUserHolidayValidator=Принудително валидиране на молби за отпуск diff --git a/htdocs/langs/bg_BG/website.lang b/htdocs/langs/bg_BG/website.lang index 1696d94a7ad..df36f6d6170 100644 --- a/htdocs/langs/bg_BG/website.lang +++ b/htdocs/langs/bg_BG/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Използвайте с Apache / Nginx / ...</u><br>Съ ExampleToUseInApacheVirtualHostConfig=Пример за използване при настройка на виртуалния хост в Apache: YouCanAlsoTestWithPHPS=<u>Използване, чрез вграден PHP сървър</u> <br> В среда за разработка може да предпочетете да тествате сайта с вградения PHP уеб сървър (изисква се PHP 5.5) като стартирате <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Стартирайте уебсайта си на друг Dolibarr хостинг доставчик</u> <br> Ако нямате уеб сървър като Apache или NGinx в интернет може да експортирате и импортирате уебсайта си в друга Dolibarr инстанция, предоставена от друг Dolibarr хостинг доставчик, който осигурява пълна интеграция с модула на уебсайта. Може да намерите списък с някои доставчици на Dolibarr хостинг услуги на <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Проверете също дали виртуалният хост има права за <strong>%s</strong> на файлове в <br> <strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Четене WritePerm=Писане TestDeployOnWeb=Тестване / внедряване в интернет PreviewSiteServedByWebServer=<u>Преглеждане на %s в нов раздел.</u> <br><br> %s ще се обслужва от външен уеб сървър (като Apache, Nginx, IIS). Трябва да инсталирате и настроите този сървър, преди да посочите директория: <br> <strong>%s</strong> <br> URL адрес, обслужван от външен сървър: <br> <strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Преглеждане на %s в нов раздел.</u> <br><br> %s ще се обслужва от Dolibarr сървър, така че не се нуждаете от допълнителен уеб сървър (като Apache, Nginx, IIS), който да бъде инсталиран. <br> Неудобство е, че URL адреса на страниците не е удобен за потребителя и започва с пътя на вашия Dolibarr. <br> URL адрес, обслужван от Dolibarr: <br> <strong>%s</strong> <br><br> За да използвате вашия собствен външен уеб сървър за обслужване на този уебсайт създайте виртуален хост на вашия уеб сървър, който сочи в директорията <br> <strong>%s</strong> <br>, след това въведете името на този виртуален сървър и кликнете върху другия бутон за преглеждане. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL адресът на виртуалния хост, обслужван от външен уеб сървър, не е дефиниран. NoPageYet=Все още няма страници YouCanCreatePageOrImportTemplate=Може да създадете нова страница или да импортирате пълен шаблон на уебсайт @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/bg_BG/zapier.lang b/htdocs/langs/bg_BG/zapier.lang index 36b711c3fae..1763b156ffc 100644 --- a/htdocs/langs/bg_BG/zapier.lang +++ b/htdocs/langs/bg_BG/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier за Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Модул Zapier за Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Настройка на Zapier за Dolibarr +ZapierForDolibarrSetup=Настройка на Zapier за Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/bn_BD/accountancy.lang b/htdocs/langs/bn_BD/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/bn_BD/accountancy.lang +++ b/htdocs/langs/bn_BD/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/bn_BD/banks.lang b/htdocs/langs/bn_BD/banks.lang index ac24131462a..64b12a758f8 100644 --- a/htdocs/langs/bn_BD/banks.lang +++ b/htdocs/langs/bn_BD/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/bn_BD/bills.lang b/htdocs/langs/bn_BD/bills.lang index ada5ee7f5c6..a7a67d55be3 100644 --- a/htdocs/langs/bn_BD/bills.lang +++ b/htdocs/langs/bn_BD/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposit invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/bn_BD/boxes.lang b/htdocs/langs/bn_BD/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/bn_BD/boxes.lang +++ b/htdocs/langs/bn_BD/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/bn_BD/categories.lang b/htdocs/langs/bn_BD/categories.lang index 52327db3510..cb184028464 100644 --- a/htdocs/langs/bn_BD/categories.lang +++ b/htdocs/langs/bn_BD/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/bn_BD/companies.lang b/htdocs/langs/bn_BD/companies.lang index e60b163d09f..a3f02b38f30 100644 --- a/htdocs/langs/bn_BD/companies.lang +++ b/htdocs/langs/bn_BD/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/bn_BD/compta.lang b/htdocs/langs/bn_BD/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/bn_BD/compta.lang +++ b/htdocs/langs/bn_BD/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/bn_BD/ecm.lang b/htdocs/langs/bn_BD/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/bn_BD/ecm.lang +++ b/htdocs/langs/bn_BD/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/bn_BD/errors.lang b/htdocs/langs/bn_BD/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/bn_BD/errors.lang +++ b/htdocs/langs/bn_BD/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/bn_BD/externalsite.lang b/htdocs/langs/bn_BD/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/bn_BD/externalsite.lang +++ b/htdocs/langs/bn_BD/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bn_BD/main.lang b/htdocs/langs/bn_BD/main.lang index d8cd5eaea4f..6aba43f602d 100644 --- a/htdocs/langs/bn_BD/main.lang +++ b/htdocs/langs/bn_BD/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/bn_BD/margins.lang b/htdocs/langs/bn_BD/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/bn_BD/margins.lang +++ b/htdocs/langs/bn_BD/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/bn_BD/members.lang b/htdocs/langs/bn_BD/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/bn_BD/members.lang +++ b/htdocs/langs/bn_BD/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/bn_BD/modulebuilder.lang b/htdocs/langs/bn_BD/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/bn_BD/modulebuilder.lang +++ b/htdocs/langs/bn_BD/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/bn_BD/orders.lang b/htdocs/langs/bn_BD/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/bn_BD/orders.lang +++ b/htdocs/langs/bn_BD/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/bn_BD/other.lang b/htdocs/langs/bn_BD/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/bn_BD/other.lang +++ b/htdocs/langs/bn_BD/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/bn_BD/productbatch.lang b/htdocs/langs/bn_BD/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/bn_BD/productbatch.lang +++ b/htdocs/langs/bn_BD/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/bn_BD/products.lang b/htdocs/langs/bn_BD/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/bn_BD/products.lang +++ b/htdocs/langs/bn_BD/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/bn_BD/propal.lang b/htdocs/langs/bn_BD/propal.lang index a1c380977ac..046f1dc1a95 100644 --- a/htdocs/langs/bn_BD/propal.lang +++ b/htdocs/langs/bn_BD/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/bn_BD/stocks.lang b/htdocs/langs/bn_BD/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/bn_BD/stocks.lang +++ b/htdocs/langs/bn_BD/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/bn_BD/suppliers.lang b/htdocs/langs/bn_BD/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/bn_BD/suppliers.lang +++ b/htdocs/langs/bn_BD/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/bn_BD/ticket.lang b/htdocs/langs/bn_BD/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/bn_BD/ticket.lang +++ b/htdocs/langs/bn_BD/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/bn_BD/users.lang b/htdocs/langs/bn_BD/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/bn_BD/users.lang +++ b/htdocs/langs/bn_BD/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/bn_BD/website.lang b/htdocs/langs/bn_BD/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/bn_BD/website.lang +++ b/htdocs/langs/bn_BD/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/bn_BD/zapier.lang b/htdocs/langs/bn_BD/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/bn_BD/zapier.lang +++ b/htdocs/langs/bn_BD/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/bn_IN/accountancy.lang b/htdocs/langs/bn_IN/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/bn_IN/accountancy.lang +++ b/htdocs/langs/bn_IN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/bn_IN/admin.lang b/htdocs/langs/bn_IN/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/bn_IN/admin.lang +++ b/htdocs/langs/bn_IN/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/bn_IN/banks.lang b/htdocs/langs/bn_IN/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/bn_IN/banks.lang +++ b/htdocs/langs/bn_IN/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/bn_IN/bills.lang b/htdocs/langs/bn_IN/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/bn_IN/bills.lang +++ b/htdocs/langs/bn_IN/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/bn_IN/boxes.lang b/htdocs/langs/bn_IN/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/bn_IN/boxes.lang +++ b/htdocs/langs/bn_IN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/bn_IN/categories.lang b/htdocs/langs/bn_IN/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/bn_IN/categories.lang +++ b/htdocs/langs/bn_IN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/bn_IN/companies.lang b/htdocs/langs/bn_IN/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/bn_IN/companies.lang +++ b/htdocs/langs/bn_IN/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/bn_IN/compta.lang b/htdocs/langs/bn_IN/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/bn_IN/compta.lang +++ b/htdocs/langs/bn_IN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/bn_IN/ecm.lang b/htdocs/langs/bn_IN/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/bn_IN/ecm.lang +++ b/htdocs/langs/bn_IN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/bn_IN/errors.lang b/htdocs/langs/bn_IN/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/bn_IN/errors.lang +++ b/htdocs/langs/bn_IN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/bn_IN/externalsite.lang b/htdocs/langs/bn_IN/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/bn_IN/externalsite.lang +++ b/htdocs/langs/bn_IN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bn_IN/main.lang b/htdocs/langs/bn_IN/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/bn_IN/main.lang +++ b/htdocs/langs/bn_IN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/bn_IN/margins.lang b/htdocs/langs/bn_IN/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/bn_IN/margins.lang +++ b/htdocs/langs/bn_IN/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/bn_IN/members.lang b/htdocs/langs/bn_IN/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/bn_IN/members.lang +++ b/htdocs/langs/bn_IN/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/bn_IN/modulebuilder.lang b/htdocs/langs/bn_IN/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/bn_IN/modulebuilder.lang +++ b/htdocs/langs/bn_IN/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/bn_IN/orders.lang b/htdocs/langs/bn_IN/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/bn_IN/orders.lang +++ b/htdocs/langs/bn_IN/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/bn_IN/other.lang b/htdocs/langs/bn_IN/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/bn_IN/other.lang +++ b/htdocs/langs/bn_IN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/bn_IN/productbatch.lang b/htdocs/langs/bn_IN/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/bn_IN/productbatch.lang +++ b/htdocs/langs/bn_IN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/bn_IN/products.lang b/htdocs/langs/bn_IN/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/bn_IN/products.lang +++ b/htdocs/langs/bn_IN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/bn_IN/projects.lang b/htdocs/langs/bn_IN/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/bn_IN/projects.lang +++ b/htdocs/langs/bn_IN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/bn_IN/propal.lang b/htdocs/langs/bn_IN/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/bn_IN/propal.lang +++ b/htdocs/langs/bn_IN/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/bn_IN/stocks.lang b/htdocs/langs/bn_IN/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/bn_IN/stocks.lang +++ b/htdocs/langs/bn_IN/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/bn_IN/suppliers.lang b/htdocs/langs/bn_IN/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/bn_IN/suppliers.lang +++ b/htdocs/langs/bn_IN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/bn_IN/ticket.lang b/htdocs/langs/bn_IN/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/bn_IN/ticket.lang +++ b/htdocs/langs/bn_IN/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/bn_IN/users.lang b/htdocs/langs/bn_IN/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/bn_IN/users.lang +++ b/htdocs/langs/bn_IN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/bn_IN/website.lang b/htdocs/langs/bn_IN/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/bn_IN/website.lang +++ b/htdocs/langs/bn_IN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/bn_IN/zapier.lang b/htdocs/langs/bn_IN/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/bn_IN/zapier.lang +++ b/htdocs/langs/bn_IN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/bs_BA/accountancy.lang b/htdocs/langs/bs_BA/accountancy.lang index 6a1143bab46..ed60d2c2c9f 100644 --- a/htdocs/langs/bs_BA/accountancy.lang +++ b/htdocs/langs/bs_BA/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 8edb636b439..d18368eacd5 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Ukloni zaključavanje veze YourSession=Vaša sesija Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Postavke sigurnosti +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Prodavači 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Proizvodi @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Kadrovska služba Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow - Tok rada -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Dopunski atributi ExtraFieldsLines=Dopunski atributi (tekstovi) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/bs_BA/banks.lang b/htdocs/langs/bs_BA/banks.lang index 9b7547ab933..cf38c2f1ddb 100644 --- a/htdocs/langs/bs_BA/banks.lang +++ b/htdocs/langs/bs_BA/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Vaš SEPA mandat 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/bs_BA/bills.lang b/htdocs/langs/bs_BA/bills.lang index e1ddafef69a..f59dc5e273c 100644 --- a/htdocs/langs/bs_BA/bills.lang +++ b/htdocs/langs/bs_BA/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Faktura kupca CustomerInvoice=Faktura kupca CustomersInvoices=Fakture kupaca SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Fakture prodavača +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=fakture dobavljača +SupplierBills=Fakture prodavača Payment=Uplata PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Izvršene uplate PaymentsBackAlreadyDone=Refunds already done PaymentRule=Pravilo plaćanja PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debitna/kreditna kartica PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Varijabilni iznos (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankovna transakcija PaymentTypeShortVIR=Bankovna transakcija @@ -494,12 +498,16 @@ Cash=Gotovina Reported=Odgođeno DisabledBecausePayments=Nije moguće jer ima nekoliko uplata CantRemovePaymentWithOneInvoicePaid=Ne može se obrisati uplata jer ima bar jedna faktura klasifikovana kao plaćena +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Očekivano plaćanje CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Plaćeno ovom uplatom 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Platiti ToMakePaymentBack=Povrat uplate @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=PDF šablon Crevette za račune. Kompletan šablon za situiranje privremenih situacija -TerreNumRefModelDesc1=Predlaga številko v formatu %syymm-nnnn za standardne račune in %syymm-nnnn za dobropise kjer je yy leto, mm mesec in nnnn zaporedna broj brez presledkov in večja od 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Račun z začetkom $syymm že obstaja in ni kompatibilen s tem modelom zaporedja. Odstranite ga ali ga preimenujte za aktiviranje tega modula. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=Prva privremena situacija InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Privremena situacija +PDFInvoiceSituation=Privremena situacija InvoiceSituationAsk=Faktura nakon situacije InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Obriši šablon fakture ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/bs_BA/boxes.lang b/htdocs/langs/bs_BA/boxes.lang index 706ce4969d7..c886622fda5 100644 --- a/htdocs/langs/bs_BA/boxes.lang +++ b/htdocs/langs/bs_BA/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Posljednje akcije BoxLastContracts=Najnoviji ugovori BoxLastContacts=Najnoviji kontakti/adrese BoxLastMembers=Najnoviji članovi +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Posljednje intervencije BoxCurrentAccounts=Trenutna stanja računa BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Posljednjih %s novosti od %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Računovodstvo +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/bs_BA/categories.lang b/htdocs/langs/bs_BA/categories.lang index 68923ab7d34..ad8764f8a38 100644 --- a/htdocs/langs/bs_BA/categories.lang +++ b/htdocs/langs/bs_BA/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/bs_BA/companies.lang b/htdocs/langs/bs_BA/companies.lang index b199c6e0fce..dcb571ec725 100644 --- a/htdocs/langs/bs_BA/companies.lang +++ b/htdocs/langs/bs_BA/companies.lang @@ -43,9 +43,10 @@ Individual=Fizičko lice 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=Matična kompanija Subsidiaries=Podružnice -ReportByMonth=Izvještaj po mjesecima -ReportByCustomers=Izvještaj po kupcima -ReportByQuarter=Izvještaj po stopama +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Pravila ponašanja RegisteredOffice=Registrovan ured Lastname=Prezime @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (broj socijalnog osiguranja) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (broj udruženja) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, stari APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registracijski broj ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luksemburg) ProfId2LU=Id. prof. 2 (dozvola za rad) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (broj socijalnog osiguranja) ProfId3PT=Prof Id 3 (broj komercijalnog zapisa) ProfId4PT=Prof Id 4 (konzervator) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Trenutni neplaćeni račun OutstandingBill=Max. za neplaćeni račun OutstandingBillReached=Dostignut maksimum za neplaćene račune OrderMinAmount=Najmanja količina za naručiti -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Ova šifra je slobodna. Ova šifra se može mijenjati bilo kad. ManagingDirectors=Ime menadžer(a) (CEO, direktor, predsjednik...) MergeOriginThirdparty=Umnoži subjekta (subjekt kojeg želite obrisati) diff --git a/htdocs/langs/bs_BA/compta.lang b/htdocs/langs/bs_BA/compta.lang index 233903b0bfe..c61d91db97f 100644 --- a/htdocs/langs/bs_BA/compta.lang +++ b/htdocs/langs/bs_BA/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=PDV prikupljeni StatusToPay=Za plaćanje SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Plaćanje računa kupca PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Plaćanje socijalnog/fiskalnog poreza PaymentVat=Plaćanje PDVa +AutomaticCreationPayment=Automatically record the payment ListPayment=Spisak plaćanja ListOfCustomerPayments=Spisak uplata kupca ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link ka narudžbi Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/bs_BA/ecm.lang b/htdocs/langs/bs_BA/ecm.lang index cd3c2cab853..b6d2a9ba2cc 100644 --- a/htdocs/langs/bs_BA/ecm.lang +++ b/htdocs/langs/bs_BA/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/bs_BA/errors.lang b/htdocs/langs/bs_BA/errors.lang index e2d3b3e5347..386a7156fbc 100644 --- a/htdocs/langs/bs_BA/errors.lang +++ b/htdocs/langs/bs_BA/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/bs_BA/externalsite.lang b/htdocs/langs/bs_BA/externalsite.lang index 70845e9ccba..54a33f638e8 100644 --- a/htdocs/langs/bs_BA/externalsite.lang +++ b/htdocs/langs/bs_BA/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Podesi link za eksterni web sajt -ExternalSiteURL=Link do eksternog web sajta +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite nije konfigurisan kako treba. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bs_BA/main.lang b/htdocs/langs/bs_BA/main.lang index fb1c15f2bfd..86a1539fe0f 100644 --- a/htdocs/langs/bs_BA/main.lang +++ b/htdocs/langs/bs_BA/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Datum izmj. IPModification=Modification IP DateLastModification=Datum zadnje izmjene DateValidation=Datum potvrde +DateSigning=Signing date DateClosing=Datum zatvaranja DateDue=Datum roka plaćanja DateValue=Datum valute @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Jedinična cijena PriceU=J.C. PriceUHT=J.C. (neto) -PriceUHTCurrency=J.C (valuta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=J.C. (uklj. PDV) Amount=Iznos AmountInvoice=Iznos fakture @@ -389,6 +390,8 @@ AmountTotal=Ukupni iznos AmountAverage=Prosječni iznos PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Postotak Total=Ukupno SubTotal=Međuzbir @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Trenutni jezik CurrentTheme=Trenutna tema CurrentMenuManager=Trenutni upravljač menija @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Ukloni pojam '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direktni link preuzimanja (javni/vanjski) -DirectDownloadInternalLink=Link direktnog skidanja (morate biti prijavljeni i imati potrebna dopuštenja) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Skidanje DownloadDocument=Skidanje dokumenta ActualizeCurrency=Ažuriraj kurs valute @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakti SearchIntoMembers=Članovi SearchIntoUsers=Korisnici SearchIntoProductsOrServices=Proizvodi ili usluge +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekti SearchIntoMO=Manufacturing Orders SearchIntoTasks=Zadaci @@ -1049,12 +1055,13 @@ KeyboardShortcut=Prečica na tastaturi AssignedTo=Dodijeljeno korisniku Deletedraft=Obriši nacrt ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=Datoteka dijeljena preko linka +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventar AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/bs_BA/margins.lang b/htdocs/langs/bs_BA/margins.lang index b9d52dcfdc6..ffbdb48ae69 100644 --- a/htdocs/langs/bs_BA/margins.lang +++ b/htdocs/langs/bs_BA/margins.lang @@ -3,7 +3,7 @@ Margin=Margin Margins=Margins TotalMargin=Total Margin -MarginOnProducts=Margin / Products +MarginOnProducts=Marža / proizvodi MarginOnServices=Margin / Services MarginRate=Margin rate MarkRate=Mark rate @@ -13,15 +13,16 @@ InputPrice=Input price margin=Profit margins management margesSetup=Profit margins management setup MarginDetails=Margin details -ProductMargins=Product margins +ProductMargins=Marže proizvoda CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins -ProductService=Product or Service -AllProducts=All products and services +ProductService=Proizvod ili usluga +AllProducts=Svi proizvodi i usluge 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/bs_BA/members.lang b/htdocs/langs/bs_BA/members.lang index bca9a43ae4c..6434c6ef897 100644 --- a/htdocs/langs/bs_BA/members.lang +++ b/htdocs/langs/bs_BA/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Istekao MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Potvrđeno @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Plaćanje preplate LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/bs_BA/modulebuilder.lang b/htdocs/langs/bs_BA/modulebuilder.lang index 9281e1f7849..5a78e93fe70 100644 --- a/htdocs/langs/bs_BA/modulebuilder.lang +++ b/htdocs/langs/bs_BA/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/bs_BA/orders.lang b/htdocs/langs/bs_BA/orders.lang index 158e1fff021..60192a26650 100644 --- a/htdocs/langs/bs_BA/orders.lang +++ b/htdocs/langs/bs_BA/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Narudžbe za nabavku +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=email 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=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/bs_BA/other.lang b/htdocs/langs/bs_BA/other.lang index 26ece215614..84db6e2157b 100644 --- a/htdocs/langs/bs_BA/other.lang +++ b/htdocs/langs/bs_BA/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/bs_BA/productbatch.lang b/htdocs/langs/bs_BA/productbatch.lang index 80b78d893bc..189eb2830bb 100644 --- a/htdocs/langs/bs_BA/productbatch.lang +++ b/htdocs/langs/bs_BA/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Da +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ne Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -17,8 +19,17 @@ 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 +ProductDoesNotUseBatchSerial=Ovaj proizvod ne koristi serijski broj 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/bs_BA/products.lang b/htdocs/langs/bs_BA/products.lang index 467e9f62b86..2f03536a62b 100644 --- a/htdocs/langs/bs_BA/products.lang +++ b/htdocs/langs/bs_BA/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Jedinica diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index ed058b147fe..351f794fe3e 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/bs_BA/propal.lang b/htdocs/langs/bs_BA/propal.lang index ca865c7563b..c02b9e229c1 100644 --- a/htdocs/langs/bs_BA/propal.lang +++ b/htdocs/langs/bs_BA/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Pošalji poslovni prijedlog e-mailom 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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/bs_BA/stocks.lang b/htdocs/langs/bs_BA/stocks.lang index 3549cc9c195..c96cb4a268f 100644 --- a/htdocs/langs/bs_BA/stocks.lang +++ b/htdocs/langs/bs_BA/stocks.lang @@ -19,8 +19,8 @@ Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Lokacija -LocationSummary=Skraćeni naziv lokacije -NumberOfDifferentProducts=Broj različitih proizvoda +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Ukupan broj proizvoda LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Skladišna vrijednost 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Glavno skladište @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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=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. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Prodajna cijena jedinice EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Kretanja zalihe zapisana @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventar inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/bs_BA/suppliers.lang b/htdocs/langs/bs_BA/suppliers.lang index 86861419bf5..85c445b70c8 100644 --- a/htdocs/langs/bs_BA/suppliers.lang +++ b/htdocs/langs/bs_BA/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Dobavljači SuppliersInvoice=Vendor invoice +SupplierInvoices=Fakture prodavača ShowSupplierInvoice=Show Vendor Invoice NewSupplier=Novi dobavljač History=Historija diff --git a/htdocs/langs/bs_BA/ticket.lang b/htdocs/langs/bs_BA/ticket.lang index fd582550e54..d0becaf2768 100644 --- a/htdocs/langs/bs_BA/ticket.lang +++ b/htdocs/langs/bs_BA/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tip Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/bs_BA/users.lang b/htdocs/langs/bs_BA/users.lang index 4c99cebb83a..70951a32d6f 100644 --- a/htdocs/langs/bs_BA/users.lang +++ b/htdocs/langs/bs_BA/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Ukloni iz grupe PasswordChangedAndSentTo=Šifra promijenjena i poslana korisniku <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Zahtjev za promjenu šifre za <b>%s</b> poslana na <b>%s</b>. +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=Korisnici i grupe LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Korisnik domene %s Reactivate=Reaktivirati 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Dozvola je prenesena od jedne korisničke grupe. Inherited=Preneseno +UserWillBe=Created user will be UserWillBeInternalUser=Kreirani korisnik će biti interni korisnik (jer nije povezan sa nekim subjektom) UserWillBeExternalUser=Napravljeni korisnik će biti vanjski korisnik (jer je povezan s određenim subjektom) IdPhoneCaller=Id telefonskog pozivatelja @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=Odjava korisnika UserLogged=Korisnik prijavljen DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/bs_BA/website.lang b/htdocs/langs/bs_BA/website.lang index aa90f42f735..396a2939174 100644 --- a/htdocs/langs/bs_BA/website.lang +++ b/htdocs/langs/bs_BA/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Pročitaj WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/bs_BA/zapier.lang b/htdocs/langs/bs_BA/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/bs_BA/zapier.lang +++ b/htdocs/langs/bs_BA/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ca_ES/accountancy.lang b/htdocs/langs/ca_ES/accountancy.lang index de5dd2c6a24..2be34f0069e 100644 --- a/htdocs/langs/ca_ES/accountancy.lang +++ b/htdocs/langs/ca_ES/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Línies de factura comptabilitzades ExpenseReportLines=Línies d'informes de despeses a comptabilitzar ExpenseReportLinesDone=Línies comptabilitzades d'informes de despeses IntoAccount=Línia comptabilitzada amb el compte comptable -TotalForAccount=Total per compte comptable +TotalForAccount=Total accounting account Ventilate=Comptabilitza @@ -209,7 +209,7 @@ Codejournal=Diari JournalLabel=Títol de Diari NumPiece=Número de peça TransactionNumShort=Número de transacció -AccountingCategory=Grups personalitzats +AccountingCategory=Custom group GroupByAccountAccounting=Agrupa per compte major GroupBySubAccountAccounting=Agrupa per subcompte comptable AccountingAccountGroupsDesc=Podeu definir aquí alguns grups de comptes comptables. S'utilitzaran per a informes comptables personalitzats. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Línies encara no enllaçades, utilitzeu el menú <a ## Import ImportAccountingEntries=Entrades de comptabilitat +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Data d'exportació WarningReportNotReliable=Avís, aquest informe no està basat en el Llibre Major, de manera que no conté assentaments modificats manualment en el Llibre Major. Si el registre diari està actualitzat, la vista de comptes és més precisa. ExpenseReportJournal=Diari d'informe de despeses InventoryJournal=Diari d'inventari + +NAccounts=%s accounts diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 552135eda7c..98d6ee38dd1 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -12,7 +12,7 @@ VersionRecommanded=Recomanada FileCheck=Comprovador d'integritat de fitxers FileCheckDesc=Aquesta eina us permet comprovar la integritat dels fitxers i la configuració de la vostra aplicació, comparant cada fitxer amb l'oficial. També es pot comprovar el valor d'algunes constants de configuració. Podeu utilitzar aquesta eina per a determinar si s'han modificat fitxers (per exemple, per un hacker). FileIntegrityIsStrictlyConformedWithReference=La integritat dels arxius està estrictament conforme amb la referència. -FileIntegrityIsOkButFilesWereAdded=La comprovació de la integritat dels arxius ha resultat exitosa, no obstant s'han afegit alguns arxius nous. +FileIntegrityIsOkButFilesWereAdded=La comprovació de la integritat dels arxius ha resultat exitosa, no obstant això, s'han afegit alguns arxius nous. FileIntegritySomeFilesWereRemovedOrModified=La comprovació d'integritat d'arxius ha fallat. Alguns arxius han sigut modificats, eliminats o afegits. GlobalChecksum=Checksum global MakeIntegrityAnalysisFrom=Fer anàlisi de la integritat dels arxius de l'aplicació de @@ -37,6 +37,7 @@ UnlockNewSessions=Eliminar bloqueig de connexions YourSession=La seva sessió Sessions=Sessions d'usuaris WebUserGroup=Servidor web usuari/grup +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permisos als fitxers del directori arrel web PermissionsOnFile=Permisos al fitxer %s NoSessionFound=Sembla que el seu PHP no pot llistar les sessions actives. El directori de salvaguardat de sessions (<b>%s</b>) pot estar protegit (per exemple, pels permisos del sistema operatiu o per la directiva open_basedir del seu PHP). @@ -62,6 +63,7 @@ IfModuleEnabled=Nota: sí només és eficaç si el mòdul <b>%s</b> està activa RemoveLock=Elimineu/reanomeneu el fitxer <b> %s </b> si existeix, per a permetre l'ús de l'eina d'actualització/instal·lació. RestoreLock=Substituir un arxiu <b>%s</b>, donant-li només drets de lectura a aquest arxiu per tal de prohibir noves actualitzacions. SecuritySetup=Configuració de seguretat +PHPSetup=PHP setup SecurityFilesDesc=Defineix les opcions relacionades amb la seguretat de càrrega de fitxers. ErrorModuleRequirePHPVersion=Error, aquest mòdul requereix una versió %s o superior de PHP ErrorModuleRequireDolibarrVersion=Error, aquest mòdul requereix una versió %s o superior de Dolibarr @@ -105,7 +107,7 @@ MaxSizeForUploadedFiles=Mida màxima per als fitxers a pujar (0 per a no permetr UseCaptchaCode=Utilitzeu el codi gràfic (CAPTCHA) a la pàgina d'inici de sessió AntiVirusCommand=Ruta completa cap al comandament antivirus AntiVirusCommandExample=Exemple per al dimoni ClamAv (requereix clamav-daemon): /usr/bin/clamdscan<br>Exemple per a ClamWin (molt molt lent): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe -AntiVirusParam= Paràmetres complementaris en la línia de comandes +AntiVirusParam= Més paràmetres a la línia d'ordres AntiVirusParamExample=Exemple per al dimoni de ClamAv: --fdpass<br>Exemple per a ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=Configuració del mòdul Comptabilitat UserSetup=Configuració de gestió d'usuaris @@ -121,7 +123,7 @@ SetupShort=Configuració OtherOptions=Altres opcions OtherSetup=Altres configuracions CurrentValueSeparatorDecimal=Separador decimal -CurrentValueSeparatorThousand=Separador milers +CurrentValueSeparatorThousand=Separador de milers Destination=Destinació IdModule=ID del mòdul IdPermissions=ID de permisos @@ -146,15 +148,15 @@ MenusDesc=Els gestors de menú configuren el contingut de les dues barres de men MenusEditorDesc=L'editor de menú us permet definir entrades de menú personalitzades. Feu-lo servir amb cura per a evitar la inestabilitat i les entrades de menú inaccessibles permanentment. <br> Alguns mòduls afegeixen entrades de menú (al menú <b> Tot </b> sobretot). Si elimineu algunes d'aquestes entrades per error, podeu restaurar-les desactivant i tornant a activar el mòdul. MenuForUsers=Menú per als usuaris LangFile=arxiu .lang -Language_en_US_es_MX_etc=Idioma (ca_ES, es_ES, ...) +Language_en_US_es_MX_etc=Idioma (ca_ES, es_ES...) System=Sistema SystemInfo=Informació del sistema SystemToolsArea=Àrea utilitats del sistema SystemToolsAreaDesc=Aquesta àrea proporciona funcions d'administració. Utilitzeu el menú per a triar la funció necessària. Purge=Purga -PurgeAreaDesc=Aquesta pàgina permet eliminar tots els fitxers generats o guardats per Dolibarr (fitxers temporals o tots els fitxers de la carpeta <b>%s</b>). L'ús d'aquesta funció no és necessària. Es dóna per als usuaris que alberguen Dolibarr en un servidor que no ofereix els permisos d'eliminació de fitxers generats pel servidor web. -PurgeDeleteLogFile=Suprimeix els fitxers de registre, incloent <b>%s</b> definit per al mòdul Syslog (sense risc de perdre dades) -PurgeDeleteTemporaryFiles=Suprimeix tots els registres i fitxers temporals (no hi ha risc de perdre dades). Nota: la supressió de fitxers temporals només es fa si el directori temporal es va crear fa més de 24 hores. +PurgeAreaDesc=Aquesta pàgina us permet suprimir tots els fitxers generats o emmagatzemats per Dolibarr (fitxers temporals o tots els fitxers del directori <b> %s </b>). Normalment no és necessari fer servir aquesta funció. Es proporciona com a solució alternativa als usuaris que allotjen Dolibarr amb un proveïdor que no ofereix permisos per a eliminar fitxers generats pel servidor web. +PurgeDeleteLogFile=Suprimeix els fitxers de registre, inclosos <b> %s </b> definits per al mòdul Syslog (sense risc de perdre dades) +PurgeDeleteTemporaryFiles=Suprimeix tots els fitxers de registre i temporals (no hi ha risc de perdre dades). El paràmetre pot ser 'tempfilesold', 'logfiles' o tots dos 'tempfilesold+logfiles'. Nota: la supressió de fitxers temporals només es fa si el directori temporal es va crear fa més de 24 hores. PurgeDeleteTemporaryFilesShort=Esborra el registre i els fitxers temporals PurgeDeleteAllFilesInDocumentsDir=Suprimiu tots els fitxers del directori: <b>%s</b>.<br> Això suprimirà tots els documents generats relacionats amb elements (tercers, factures, etc.), fitxers penjats al mòdul GED, còpies de seguretat de la base de dades i fitxers temporals. PurgeRunNow=Purgar @@ -174,17 +176,17 @@ NoBackupFileAvailable=Cap còpia disponible ExportMethod=Mètode d'exportació ImportMethod=Mètode d'importació ToBuildBackupFileClickHere=Per a crear un fitxer de còpia de seguretat, feu clic <a href="%s">aquí</a>. -ImportMySqlDesc=Per a importar una còpia de seguretat MySQL, podeu utilitzar phpMyAdmin a través del vostre hosting o utilitzar les ordres mysql de la línia de comandes. <br> Per exemple: -ImportPostgreSqlDesc=Per a importar una còpia de seguretat, useu l'ordre pg_restore des de la línia de comandes: +ImportMySqlDesc=Per a importar un fitxer de còpia de seguretat MySQL, podeu utilitzar phpMyAdmin mitjançant el vostre allotjament o utilitzar l’ordre mysql de la línia d’ordres. <br>Per exemple: +ImportPostgreSqlDesc=Per a importar un fitxer de còpia de seguretat, heu d'utilitzar l'ordre pg_restore des de la línia d'ordres: ImportMySqlCommand=%s %s < elmeuarxiubackup.sql ImportPostgreSqlCommand=%s %s elmeuarxiubackup.sql FileNameToGenerate=Nom del fitxer de còpia de seguretat: Compression=Compressió -CommandsToDisableForeignKeysForImport=Comanda per a desactivar les claus forànies a la importació +CommandsToDisableForeignKeysForImport=Comanda per a desactivar les claus foranes a la importació CommandsToDisableForeignKeysForImportWarning=Obligatori si vol poder restaurar més tard el dump SQL ExportCompatibility=Compatibilitat de l'arxiu d'exportació generat ExportUseMySQLQuickParameter=Utilitza el paràmetre --quick -ExportUseMySQLQuickParameterHelp=El paràmetre '--quik' ajuda a limitar el consum de RAM per a tables grans. +ExportUseMySQLQuickParameterHelp=El paràmetre '--quick' ajuda a limitar el consum de RAM per a taules grans. MySqlExportParameters=Paràmetres de l'exportació MySql PostgreSqlExportParameters= Paràmetres de l'exportació PostgreSQL UseTransactionnalMode=Utilitzar el mode transaccional @@ -195,7 +197,7 @@ AddDropTable=Afegir ordres DROP TABLE ExportStructure=Estructura NameColumn=Nom de les columnes ExtendedInsert=Instruccions INSERT esteses -NoLockBeforeInsert=Sense intrucció LOCK abans del INSERT +NoLockBeforeInsert=No hi ha ordres de bloqueig en l’INSERT DelayedInsert=Insercions amb retard EncodeBinariesInHexa=Codifica les dades binàries en hexadecimal IgnoreDuplicateRecords=Ignorar errors de registres duplicats (INSERT IGNORE) @@ -209,13 +211,13 @@ ModulesMarketPlaceDesc=A internet podeu trobar més mòduls per a descarregar en ModulesDeployDesc=Si els permisos del vostre sistema de fitxers ho permeten, podeu utilitzar aquesta eina per a desplegar un mòdul extern. El mòdul serà visible a la pestanya <strong> %s </strong>. ModulesMarketPlaces=Trobar mòduls/complements externs ModulesDevelopYourModule=Desenvolupeu els vostres mòduls/aplicacions -ModulesDevelopDesc=Podeu desenvolupar o trobar un partner que desenvolupi per a vostè, el vostre mòdul personalitzat +ModulesDevelopDesc=També podeu desenvolupar el vostre propi mòdul o trobar un soci per a desenvolupar-ne un. DOLISTOREdescriptionLong=En lloc d'anar al lloc web <a href="https://www.dolistore.com">www.dolistore.com</a> per a trobar un mòdul extern, podeu utilitzar aquesta eina incrustada que farà la cerca en la tenda per vosaltres (pot ser lent, necessiteu un accés a internet)... NewModule=Mòdul nou FreeModule=Gratuït CompatibleUpTo=Compatible amb la versió %s -NotCompatible=Aquest mòdul no sembla compatible amb el vostre Dolibarr %s (Mín %s - Màx %s). -CompatibleAfterUpdate=Aquest mòdul requereix actualitzar el vostre Dolibarr %s (Mín %s - Màx %s). +NotCompatible=Aquest mòdul no sembla compatible amb el vostre Dolibarr %s (Mín. %s - Màx. %s). +CompatibleAfterUpdate=Aquest mòdul requereix actualitzar el vostre Dolibarr %s (Mín. %s - Màx. %s). SeeInMarkerPlace=Veure a la tenda d'apps SeeSetupOfModule=Vegi la configuració del mòdul %s Updated=Actualitzat @@ -232,6 +234,7 @@ BoxesAvailable=Panells disponibles BoxesActivated=Panells activats ActivateOn=Activar a ActiveOn=Actiu a +ActivatableOn=Activable a SourceFile=Fitxer origen AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible només si Javascript i Ajax estan activats Required=Requerit @@ -318,7 +321,7 @@ ModuleFamilyProducts=Gestió de productes (PM) ModuleFamilyHr=Gestió de recursos humans (HR) ModuleFamilyProjects=Projectes/Treball cooperatiu ModuleFamilyOther=Altres -ModuleFamilyTechnic=Utilitats multi-mòduls +ModuleFamilyTechnic=Eines multimòduls ModuleFamilyExperimental=Mòduls experimentals ModuleFamilyFinancial=Mòduls financers (Comptabilitat/tresoreria) ModuleFamilyECM=Gestió Electrònica de Documents (GED) @@ -334,22 +337,23 @@ FindPackageFromWebSite=Cerca un paquet que proporcioni les funcions que necessit DownloadPackageFromWebSite=Descarrega el paquet (per exemple, des del lloc web oficial %s). UnpackPackageInDolibarrRoot=Desempaqueta/descomprimeix els fitxers empaquetats al teu directori del servidor Dolibarr: <b> %s </b> UnpackPackageInModulesRoot=Per a desplegar/instal·lar un mòdul extern, descomprimiu els fitxers empaquetats al directori del servidor dedicat a mòduls externs: <br><b>%s</b> -SetupIsReadyForUse=La instal·lació del mòdul ha finalitzat. No obstant, ha d'habilitar i configurar el mòdul en la seva aplicació, aneu a la pàgina per a configurar els mòduls: <a href="%s">%s</a>. +SetupIsReadyForUse=La instal·lació del mòdul ha finalitzat. No obstant això, ha d'habilitar i configurar el mòdul en la seva aplicació, aneu a la pàgina per a configurar els mòduls: <a href="%s">%s</a>. NotExistsDirect=No s'ha definit el directori arrel alternatiu a un directori existent.<br> InfDirAlt=Des de la versió 3, és possible definir un directori arrel alternatiu. Això li permet emmagatzemar, en un directori dedicat, plug-ins i plantilles personalitzades.<br>Només ha de crear un directori a l'arrel de Dolibarr (per exemple: custom).<br> InfDirExample=Llavors <br>declareu-ho a l'arxiu <strong>conf.php </strong><br> $dolibarr_main_url_root_alt='/custom'<br> $dolibarr_main_document_root_alt='/ruta/del/dolibarr/htdocs/custom'<br> Si aquestes línies estan comentades amb "#", per a activar-les simplement descomenteu-les traient el caràcter "#". YouCanSubmitFile=Podeu pujar el fitxer .zip del paquet del mòdul des d’aquí: CurrentVersion=Versió actual de Dolibarr -CallUpdatePage=Ves a la pàgina que actualitza l'estructura de base de dades i les dades: %s +CallUpdatePage=Aneu a la pàgina que actualitza l'estructura i les dades de la base de dades: %s. LastStableVersion=Última versió estable LastActivationDate=Data de l'última activació LastActivationAuthor=Últim autor d'activació LastActivationIP=Última IP d'activació UpdateServerOffline=Actualitza el servidor fora de línia WithCounter=Gestiona un comptador -GenericMaskCodes=Podeu introduir qualsevol màscara numèrica. En aquesta màscara es podrien utilitzar les etiquetes següents:<br><b> {000000}</b> correspon a un número que s'incrementarà a cada %s. Introduïu tants zeros com la longitud desitjada del comptador. El comptador es completarà amb zeros per l'esquerra per tal de tenir tants zeros com la màscara. <br><b> {000000+000} </b> igual que l'anterior, però s'aplica un desplaçament corresponent al número a la dreta del signe + a partir del primer %s. <br> <b>{000000@x}</b> igual que l'anterior, però el comptador es restableix a zero quan s'arriba al mes x (x entre 1 i 12, o 0 per a utilitzar els primers mesos de l'any fiscal definits a la configuració o 99 per a restablir-los a zero cada mes). Si s’utilitza aquesta opció i x és 2 o superior, també és obligatòria la seqüència {yy}{mm} o {yyyy}{mm}. <br><b>{dd}</b> dia (de l'1 al 31). <br> <b>{mm}</b> mes (01 a 12). <br><b> {aa} </b>, <b>{aaaa}</b> o <b>{y}</b> any en 2, 4 o 1 xifra. <br> -GenericMaskCodes2=<b>{cccc}</b> el codi de client amb n caràcters<br><b>{cccc000}</b> el codi de client amb n caràcters seguit d'un comptador dedicat pel client. Aquest comptador dedicat al client es reinicia al mateix temps que el comptador global.<br><b>{tttt}</b> El codi del tipus de tercer amb n caràcters (vegeu el menú Inici - Configuració - Diccionaris - Tipus de tercers). Si afegeixes aquesta etiqueta, el comptador serà diferent per a cada tipus de tercer.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Qualsevol altre caràcter a la màscara es quedarà sense canvis. <br> No es permeten espais<br> +GenericMaskCodes3EAN=La resta de caràcters de la màscara romandran intactes (excepte * o ? En 13a posició a EAN13). <br>No es permeten espais. <br> A EAN13, l'últim caràcter després de l'últim } a la 13a posició hauria de ser * o ? . Se substituirà per la clau calculada.<br> GenericMaskCodes4a=<u>Exemple en el 99 %s del tercer L'Empresa, amb data 31/01/2007:</u><br> GenericMaskCodes4b=<u>Exemple sobre un tercer creat el 31/03/2007: </u> <br> GenericMaskCodes4c=<u>Exemple en un producte/servei creat el 31/03/2007:</u><br> @@ -364,7 +368,7 @@ ErrorCantUseRazIfNoYearInMask=Error, no es pot utilitzar l'opció @ per a restab ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, no es pot usar opció @ si la seqüència (yy) (mm) o (yyyy) (mm) no es troba a la màscara. UMask=Paràmetre UMask de nous fitxers en Unix/Linux/BSD. UMaskExplanation=Aquest paràmetre determina els drets dels arxius creats en el servidor Dolibarr (durant la pujada, per exemple).<br>Aquest ha de ser el valor octal (per exemple, 0666 significa lectura/escriptura per a tots).<br>Aquest paràmetre no té cap efecte sobre un servidor Windows. -SeeWikiForAllTeam=Mira a la pàgina Wiki per veure una llista de contribuents i la seva organització +SeeWikiForAllTeam=Mireu la pàgina Wiki per a obtenir una llista dels col·laboradors i la seva organització UseACacheDelay= Demora en memòria cau de l'exportació en segons (0 o buit sense memòria) DisableLinkToHelpCenter=Amaga l'enllaç "<b>Necessiteu ajuda o assistència</b>" a la pàgina d'inici de sessió DisableLinkToHelp=Amaga l'enllaç a l'ajuda en línia "<b>%s</b>" @@ -375,7 +379,7 @@ LanguageFilesCachedIntoShmopSharedMemory=arxius .lang en memòria compartida LanguageFile=Fitxer d'idioma ExamplesWithCurrentSetup=Exemples amb configuració actual ListOfDirectories=Llistat de directoris de plantilles OpenDocument -ListOfDirectoriesForModelGenODT=Llista de directoris que contenen fitxers de plantilles amb format OpenDocument.<br><br>Posa aquí l'adreça completa dels directoris.<br>Afegeix un "intro" entre cada directori.<br>Per afegir un directori del mòdul GED, afegeix aquí <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Els fitxers d'aquests directoris han de tenir l'extensió <b>.odt</b> o <b>.ods</b>. +ListOfDirectoriesForModelGenODT=Llista de directoris que contenen fitxers de plantilles amb format OpenDocument.<br><br>Posa aquí l'adreça completa dels directoris.<br>Afegeix un "intro" entre cada directori.<br>Per a afegir un directori del mòdul GED, afegeix aquí <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Els fitxers d'aquests directoris han de tenir l'extensió <b>.odt</b> o <b>.ods</b>. NumberOfModelFilesFound=Nombre d'arxius de plantilles ODT/ODS trobats en aquest(s) directori(s) ExampleOfDirectoriesForModelGen=Exemples de sintaxi: <br>c:\\myapp\\mydocumentdir\\mysubdir <br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=Posant les següents etiquetes a la plantilla, obtindrà una substitució amb el valor personalitzat en generar el document: @@ -390,7 +394,7 @@ ConnectionTimeout=Temps d'espera de connexió ResponseTimeout=Timeout de resposta SmsTestMessage=Missatge de prova de __PHONEFROM__ per __PHONETO__ ModuleMustBeEnabledFirst=El mòdul "<b>%s</b>" ha d'habilitar-se primer si necessita aquesta funcionalitat. -SecurityToken=Clau per a protegir les URL +SecurityToken=Clau per a protegir els URL 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 de generació de PDF @@ -402,12 +406,12 @@ 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 -PlaceCustomerAddressToIsoLocation=Utilitza la posició estandard francesa (La Poste) per la posició de l'adreça dels clients +PlaceCustomerAddressToIsoLocation=Utilitza la posició estàndard francesa (La Poste) per a la posició d'adreça del client Library=Llibreria UrlGenerationParameters=Seguretat de les URL SecurityTokenIsUnique=Fer servir un paràmetre securekey únic per a cada URL? EnterRefToBuildUrl=Introduïu la referència de l'objecte %s -GetSecuredUrl=Obté la URL calculada +GetSecuredUrl=Obteniu l'URL calculat ButtonHideUnauthorized=Amaga els botons d'acció no autoritzats també per als usuaris interns (en cas contrari, en gris) OldVATRates=Taxa d'IVA antiga NewVATRates=Taxa d'IVA nova @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Mantenir aquest camp buit significa que el valor s'e ExtrafieldParamHelpselect=La llista de valors ha de ser un conjunt de línies amb un format del tipus clau,valor (on la clau no pot ser '0') <br><br> per exemple: <br>1,valor1<br>2,valor2<br>codi3,valor3<br>...<br><br>Per a tenir la llista depenent d'una altra llista d'atributs complementaris: <br>1,valor1|options_<i>codi_llista_pare</i>:clau_pare<br>2,valor2|options_<i>codi_llista_pare</i>:clau_pare <br><br>Per a tenir la llista depenent d'una altra llista:<br>1,valor1|<i>codi_llista_pare</i>:clau_pare<br>2,valor2|<i>codi_llista_pare</i>:clau_pare ExtrafieldParamHelpcheckbox=La llista de valor ha de ser un conjunt de línies del tipus clau,valor (on la clau no pot ser '0')<br><br> per exemple: <br>1,valor1<br>2,valor2<br>3,valor3<br>... ExtrafieldParamHelpradio=La llista de valor ha de ser un conjunt de línies del tipus clau,valor (on la clau no pot ser '0')<br><br> per exemple: <br>1,valor1<br>2,valor2<br>3,valor3<br>... -ExtrafieldParamHelpsellist=Llista de valors que provenen d’una taula<br>Sintaxi: nom_taula:nom_camp:id_camp::filtre<br>Exemple: c_typent:libelle:id::filtre<br><br>- id_camp ha de ser necessàriament una "primary int key"<br>- el filtre pot ser una comprovació senzilla (p.e. active=1) per a mostrar només els valors actius<br>També pots utilitzar $ID$ al filtre per a representar el ID de l'actual objecte en curs<br>Per a utilitzar un SELECT al filtre, utilitzeu la paraula clau $SEL$ per a evitar la protecció anti injecció.<br>Si vols filtrar camps addicionals utilitza la sintaxi extra.nom_camp=... (on nom_camp és el codi del camp addicional)<br><br>Per a tenir la llista en funció d’una altra llista d’atributs complementaris:<br>c_typent:libelle:id:options_<i>codi_llista_mare</i>|parent_column:filtre <br><br>Per a tenir la llista en funció d'una altra llista:<br>c_typent:libelle:id:<i>codi_llista_mare</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=La llista de valors prové d'una taula <br> Sintaxi: nom_taula:nom_camp:id_camp::filtre <br> Exemple: c_typent:libelle:id::filter<br> <br> filtre pot ser una comprovació simple (p. ex. active=1) per a mostrar només el valor actiu <br> També podeu utilitzar $ID$ en el filtre per a representar l'ID actual de l'objecte en curs <br>Per fer un SELECT en el filtre utilitzeu $SEL$ <br> si voleu filtrar per camps extra utilitzeu sintaxi extra.fieldcode=... (on el codi de camp és el codi del extrafield) <br> <br>Per a tenir la llista depenent d'una altra llista d'atributs complementaris: <br>c_typent:libelle:id:options_<i>codi_llista_pare</i>|parent_column: filter <br><br>Per a tenir la llista depenent d'una altra llista: c_typent:libelle:id:<i>codi_llista_pare</i>|parent_column:filter +ExtrafieldParamHelpsellist=Llista de valors que provenen d’una taula<br>Sintaxi: nom_taula:nom_camp:id_camp::filtresql<br>Exemple: c_typent:libelle:id::filtresql<br><br>- id_camp ha de ser necessàriament una clau primària numèrica<br>- el filtresql és una condició SQL. Pot ser una prova simple (p.ex. active=1) per a mostrar només els valors actius<br>També pots utilitzar $ID$ al filtre per a representar el ID de l'actual objecte en curs<br>Per a utilitzar un SELECT al filtre, utilitzeu la paraula clau $SEL$ per a evitar la protecció anti injecció.<br>Si vols filtrar camps addicionals utilitza la sintaxi extra.nom_camp=... (on nom_camp és el codi del camp addicional)<br><br>Per a tenir la llista en funció d’una altra llista d’atributs complementaris:<br>c_typent:libelle:id:options_<i>codi_llista_mare</i>|parent_column:filtre <br><br>Per a tenir la llista en funció d'una altra llista:<br>c_typent:libelle:id:<i>codi_llista_mare</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=La llista de valors prové d'una taula <br> Sintaxi: nom_taula:nom_camp:id_camp::filtre <br> Exemple: c_typent:libelle:id::filtre<br> <br> filtre pot ser una comprovació simple (p. ex. active=1) per a mostrar només el valor actiu <br> També podeu utilitzar $ID$ en el filtre per a representar l'ID actual de l'objecte en curs <br>Per a fer un SELECT al filtre, utilitzeu $SEL$ <br> si voleu filtrar per camps extra utilitzeu la sintaxi extra.fieldcode=... (on el codi de camp és el codi del extrafield) <br> <br>Per a tenir la llista depenent d'una altra llista d'atributs complementaris: <br>c_typent:libelle:id:options_<i>codi_llista_pare</i>|parent_column: filter <br><br>Per a tenir la llista depenent d'una altra llista:<br> c_typent:libelle:id:<i>codi_llista_pare</i>|parent_column:filter ExtrafieldParamHelplink=Els paràmetres han de ser ObjectName:Classpath <br>Sintaxi: ObjectName:Classpath ExtrafieldParamHelpSeparator=Manteniu-lo buit per un simple separador <br> Configureu-ho a 1 per a un separador col·lapsador (obert per defecte per a la sessió nova, i es mantindrà l'estat de cada sessió d'usuari) <br> Configureu-ho a 2 per a un separador col·lapsat (es va desplomar per defecte per a la sessió nova, i es mantindrà l'estat per a cada sessió d'usuari) LibraryToBuildPDF=Llibreria utilitzada per a la generació de PDF @@ -454,7 +458,7 @@ SMS=SMS LinkToTestClickToDial=Introduïu un número de telèfon per a trucar per a mostrar un enllaç per a provar l'URL ClickToDial per a l'usuari <strong>%s</strong> RefreshPhoneLink=Actualitza l'enllaç LinkToTest=Enllaç clicable generat per l'usuari <strong>%s</strong> (feu clic al número de telèfon per a provar-lo) -KeepEmptyToUseDefault=Deixa-ho buit per usar el valor per defecte +KeepEmptyToUseDefault=Deixa-ho buit per a usar el valor per defecte KeepThisEmptyInMostCases=En la majoria dels casos, pots deixar aquest camp buit. DefaultLink=Enllaç per defecte SetAsDefault=Indica'l com Defecte @@ -482,27 +486,27 @@ ModuleCompanyCodePanicum=Retorna un codi comptable buit. ModuleCompanyCodeDigitaria=Retorna un codi comptable compost d'acord amb el nom del tercer. El codi consisteix en un prefix, que pot definir-se, en primera posició, seguit del nombre de caràcters que es defineixi com a codi del tercer. ModuleCompanyCodeCustomerDigitaria=%s seguit pel nom abreujat del client pel nombre de caràcters: %s pel codi del compte de client ModuleCompanyCodeSupplierDigitaria=%s seguit pel nom abreujat del proveïdor pel nombre de caràcters: %s pel codi del compte de proveïdor -Use3StepsApproval=Per defecte, les comandes de compra necessiten ser creades i aprovades per 2 usuaris diferents (el primer pas/usuari és per a crear i un altre pas/usuari per a aprovar. Noteu que si un usuari te permisos tant per a crear com per a aprovar, un sol pas/usuari serà suficient). Amb aquesta opció, tens la possibilitat d'introduir un tercer pas/usuari per a l'aprovació, si l'import es superior a un determinat valor (d'aquesta manera són necessaris 3 passos: 1=validació, 2=primera aprovació i 3=segona aprovació si l'import és suficient).<br>Deixa-ho en blanc si només vols un nivell d'aprovació (2 passos); posa un valor encara que sigui molt baix (0,1) si vols una segona aprovació (3 passos). +Use3StepsApproval=Per defecte, les comandes de compra necessiten ser creades i aprovades per 2 usuaris diferents (el primer pas/usuari és per a crear i un altre pas/usuari per a aprovar. Noteu que si un usuari té permisos tant per a crear com per a aprovar, un sol pas/usuari serà suficient). Amb aquesta opció, tens la possibilitat d'introduir un tercer pas/usuari per a l'aprovació, si l'import és superior a un determinat valor (d'aquesta manera són necessaris 3 passos: 1=validació, 2=primera aprovació i 3=segona aprovació si l'import és suficient).<br>Deixa-ho en blanc si només vols un nivell d'aprovació (2 passos); posa un valor encara que sigui molt baix (0,1) si vols una segona aprovació (3 passos). UseDoubleApproval=Utilitza una aprovació en 3 passos quan l'import (sense impostos) sigui més gran que... WarningPHPMail=ADVERTÈNCIA: la configuració per a enviar correus electrònics des de l'aplicació utilitza la configuració genèrica predeterminada. Sovint és millor configurar els correus electrònics de sortida per a utilitzar el servidor de correu electrònic del vostre proveïdor de serveis de correu electrònic en lloc de la configuració predeterminada per diversos motius: WarningPHPMailA=- L’ús del servidor del proveïdor de serveis de correu electrònic augmenta la confiança del vostre correu electrònic, de manera que augmenta l'enviament sense ser marcat com a SPAM -WarningPHPMailB=- Alguns proveïdors de serveis de correu electrònic (com Yahoo) no us permeten enviar un correu electrònic des d'un altre servidor que el seu propi servidor. La configuració actual utilitza el servidor de l’aplicació per enviar correus electrònics i no el servidor del vostre proveïdor de correu electrònic, de manera que alguns destinataris (el compatible amb el protocol DMARC restrictiu) demanaran al vostre proveïdor de correu electrònic si poden acceptar el vostre correu electrònic i alguns proveïdors de correu electrònic. (com Yahoo) pot respondre "no" perquè el servidor no és seu, de manera que és possible que pocs dels vostres correus electrònics enviats no s'acceptin per al lliurament (tingueu cura també de la quota d'enviament del vostre proveïdor de correu electrònic). -WarningPHPMailC=- També és interessant utilitzar el servidor SMTP del vostre proveïdor de serveis de correu electrònic per enviar correus electrònics, de manera que tots els correus electrònics enviats des de l’aplicació també es guardaran al directori "Enviats" de la vostra bústia de correu. +WarningPHPMailB=- Alguns proveïdors de serveis de correu electrònic (com Yahoo) no us permeten enviar un correu electrònic des d'un altre servidor que el seu propi servidor. La configuració actual utilitza el servidor de l’aplicació per a enviar correus electrònics i no el servidor del vostre proveïdor de correu electrònic, de manera que alguns destinataris (el compatible amb el protocol DMARC restrictiu) demanaran al vostre proveïdor de correu electrònic si poden acceptar el vostre correu electrònic i alguns proveïdors de correu electrònic. (com Yahoo) pot respondre "no" perquè el servidor no és seu, de manera que és possible que pocs dels vostres correus electrònics enviats no s'acceptin per al lliurament (tingueu cura també de la quota d'enviament del vostre proveïdor de correu electrònic). +WarningPHPMailC=- També és interessant utilitzar el servidor SMTP del vostre proveïdor de serveis de correu electrònic per a enviar correus electrònics, de manera que tots els correus electrònics enviats des de l’aplicació també es guardaran al directori "Enviats" de la vostra bústia de correu. WarningPHPMailD=Si el mètode "PHP Mail" és realment el mètode que voleu utilitzar, podeu eliminar aquest advertiment afegint la constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP a 1 a Inici - Configuració - Altres. -WarningPHPMail2=Si el vostre proveïdor SMTP necessita restringir al client de correu a una adreça IP (és raro), aquesta és la IP de l'agent d'usuari de correu (MUA) per la vostra aplicació ERP CRM: <strong>%s</strong>. +WarningPHPMail2=Si el vostre proveïdor SMTP necessita restringir al client de correu a una adreça IP (molt estrany), aquesta és la IP de l'agent d'usuari de correu (MUA) per la vostra aplicació ERP CRM: <strong>%s</strong>. WarningPHPMailSPF=Si el nom de domini de l’adreça de correu electrònic del remitent està protegit per un registre SPF (pregunteu-li al vostre registrador de noms de domini), heu d’afegir les següents IP al registre SPF del DNS del vostre domini: <strong> %s </strong>. -ClickToShowDescription=Clica per mostrar la descripció +ClickToShowDescription=Feu clic per a mostrar la descripció DependsOn=Aquest mòdul necessita els mòduls RequiredBy=Aquest mòdul és requerit pel/s mòdul/s TheKeyIsTheNameOfHtmlField=Aquest és el nom del camp HTML. Es necessiten coneixements tècnics per a llegir el contingut de la pàgina HTML per a obtenir el nom clau d’un camp. PageUrlForDefaultValues=Has d'introduir aquí l'URL relatiu de la pàgina. Si inclous paràmetres a l'URL, els valors predeterminats seran efectius si tots els paràmetres s'estableixen en el mateix valor. -PageUrlForDefaultValuesCreate=<br> Exemple: <br> Per al formulari per crear una nou tercer, és <strong> %s </strong>. <br> Per a l'URL dels mòduls externs instal·lats al directori personalitzat, no incloeu "custom/", així que utilitzeu una ruta com <strong> mymodule / mypage.php </strong> i no custom/mymodule/mypage.php. <br> Si voleu un valor predeterminat només si la url té algun paràmetre, podeu utilitzar <strong> %s</strong> -PageUrlForDefaultValuesList=<br> Exemple: <br> Per a la pàgina que llista els tercers, és <strong> %s </strong>. <br> Per a l'URL dels mòduls externs instal·lats al directori personalitzat, no incloeu "custom/" utilitzeu una ruta com <strong> mymodule/mypagelist.php </strong> i no custom/mymodule/mypagelist.php. <br> Si voleu un valor predeterminat només si la url té algun paràmetre, podeu utilitzar <strong> %s</strong> +PageUrlForDefaultValuesCreate=<br>Exemple:<br>Per al formulari per a crear un tercer nou, és <strong>%s</strong>.<br>Per a l'URL dels mòduls externs instal·lats al directori personalitzat, no incloeu el "custom/", així que utilitzeu una ruta com <strong>mymodule/mypage.php</strong> i no custom/mymodule/mypage.php.<br>Si només voleu un valor per defecte si l'URL té algun paràmetre, podeu utilitzar <strong>%s</strong> +PageUrlForDefaultValuesList= <br>Exemple:<br> Per a la pàgina que llista els tercers, és <strong>%s</strong>. <br> Per a l'URL dels mòduls externs instal·lats al directori personalitzat, no incloeu el "custom/", de manera que utilitzeu un ruta com <strong>mymodule/mypagelist.php </strong> i no custom/mymodule/mypagelist.php. <br> Si només voleu un valor per defecte si l'URL té algun paràmetre, podeu utilitzar <strong>%s</strong> AlsoDefaultValuesAreEffectiveForActionCreate=També tingueu en compte que sobreescriure valors predeterminats per a la creació de formularis funciona només per a pàgines dissenyades correctament (de manera que amb el paràmetre action = create o presend ...) EnableDefaultValues=Activa la personalització dels valors predeterminats EnableOverwriteTranslation=Habilita l'ús de la traducció sobreescrita GoIntoTranslationMenuToChangeThis=S'ha trobat una traducció de la clau amb aquest codi. Per a canviar aquest valor, l’heu d’editar des d'Inici-Configuració-Traducció. -WarningSettingSortOrder=Avís, establir un ordre de classificació predeterminat pot provocar un error tècnic en passar a la pàgina de la llista si el camp és un camp desconegut. Si experimentes aquest error, torna a aquesta pàgina per eliminar l'ordre de classificació predeterminat i restablir el comportament predeterminat. +WarningSettingSortOrder=Advertiment: establir un ordre d'ordenació per defecte pot provocar un error tècnic en entrar a la pàgina de llista si el camp és un camp desconegut. Si teniu aquest error, torneu a aquesta pàgina per a eliminar l'ordre de classificació predeterminat i restaurar el comportament predeterminat. Field=Camp ProductDocumentTemplates=Plantilles de documents per a generar document de producte FreeLegalTextOnExpenseReports=Text legal lliure en informes de despeses @@ -540,7 +544,9 @@ Module30Desc=Gestió de factures i abonaments a clients. Gestió de factures i a Module40Name=Proveïdors Module40Desc=Gestió de proveïdors i compres (comandes de compra i facturació de factures de proveïdors) Module42Name=Registre de depuració -Module42Desc=Generació de registres/logs (fitxer, syslog, ...). Aquests registres són per a finalitats tècniques/depuració. +Module42Desc=Generació de registres (fitxer, syslog...). Aquests registres tenen finalitats tècniques o de depuració. +Module43Name=Barra de depuració +Module43Desc=Una eina per al desenvolupador que afegeix una barra de depuració al navegador. Module49Name=Editors Module49Desc=Gestió d'editors Module50Name=Productes @@ -564,7 +570,7 @@ Module58Desc=Integració amb ClickToDial Module60Name=Enganxines Module60Desc=Gestió d’enganxines Module70Name=Intervencions -Module70Desc=Gestió de intervencions +Module70Desc=Gestió de la intervenció Module75Name=Notes de despeses i desplaçaments Module75Desc=Gestió de les notes de despeses i desplaçaments Module80Name=Expedicions @@ -590,24 +596,24 @@ Module320Desc=Afegeix un fil RSS a les pàgines de Dolibarr Module330Name=Marcadors i Dreceres Module330Desc=Crear marcadors, sempre accessibles, a les pàgines internes o externes a les quals accediu sovint Module400Name=Projectes o Oportunitats -Module400Desc=Gestió de projectes, oportunitats/leads i/o tasques. També podeu assignar qualsevol element (factura, comanda, pressupost, intervenció, ...) a un projecte i obtenir una vista transversal del projecte. +Module400Desc=Gestió de projectes, oportunitats/leads o tasques. També podeu assignar qualsevol element (factura, comanda, pressupost, intervenció...) a un projecte i obtenir una vista transversal del projecte. Module410Name=Webcalendar Module410Desc=Interface amb el calendari webcalendar Module500Name=Impostos i Despeses especials -Module500Desc=Gestió d'altres despeses (IVA, IRPF, altres impostos, dividends, ...) +Module500Desc=Gestió d'altres despeses (IVA, IRPF, altres impostos, dividends...) Module510Name=Salaris Module510Desc=Registre i seguiment del pagament dels salaris dels empleats Module520Name=Préstecs Module520Desc=Gestió de préstecs Module600Name=Notificacions sobre esdeveniments comercials Module600Desc=Envieu notificacions per correu electrònic activades per un esdeveniment empresarial: per usuari (configuració definit a cada usuari), per a contactes de tercers (configuració definida en cada tercer) o per correus electrònics específics -Module600Long=Tingueu en compte que aquest mòdul està dedicat a enviar correus electrònics en temps real quan es produeix un esdeveniment de negoci específic. Si cerqueu una característica per enviar recordatoris per correu electrònic dels esdeveniments de l'agenda, aneu a la configuració del mòdul Agenda. +Module600Long=Tingueu en compte que aquest mòdul està dedicat a enviar correus electrònics en temps real quan es produeix un esdeveniment de negoci específic. Si cerqueu una característica per a enviar recordatoris per correu electrònic dels esdeveniments de l'agenda, aneu a la configuració del mòdul Agenda. Module610Name=Variants de producte Module610Desc=Permet la creació de variants de producte en funció dels atributs (color, mida, etc.) Module700Name=Donacions Module700Desc=Gestió de donacions Module770Name=Informes de despeses -Module770Desc=Gestiona reclamacions d'informes de despeses (transport, dietes, ...) +Module770Desc=Gestiona les reclamacions d'informes de despeses (transport, menjar...) Module1120Name=Pressupostos de proveïdor Module1120Desc=Sol·licitar al venedor cotització i preus Module1200Name=Mantis @@ -631,22 +637,24 @@ Module2600Desc=Habilita el servidor SOAP de Dolibarr que ofereix serveis API Module2610Name=Serveis API/WEB (servidor REST) Module2610Desc=Habilita el servidor REST de Dolibarr que ofereix serveis API Module2660Name=Crida a WebServices (client SOAP) -Module2660Desc=Habilitar els serveis de client web de Dolibarr (pot ser utilitzar per gravar dades/sol·licituds de servidors externs. De moment només és suportat en comandes a proveïdors) +Module2660Desc=Activa el client de serveis web Dolibarr (es pot utilitzar per a enviar dades/sol·licituds a servidors externs. Actualment només s'admeten les comandes de compra). Module2700Name=Gravatar -Module2700Desc=Utilitza el servei en línia de Gravatar (www.gravatar.com) per mostrar fotos dels usuaris/membres (que es troben en els seus missatges de correu electrònic). Necessita un accés a Internet +Module2700Desc=Utilitza el servei en línia de Gravatar (www.gravatar.com) per a mostrar la foto dels usuaris/socis (que es troba amb els seus correus electrònics). Necessita accés a Internet Module2800Desc=Client FTP Module2900Name=GeoIPMaxmind Module2900Desc=Capacitats de conversió GeoIP Maxmind Module3200Name=Arxius inalterables Module3200Desc=Activa el registre d'alguns esdeveniments de negoci en un registre inalterable. Els esdeveniments s'arxiven en temps real. El registre és una taula d'esdeveniments encadenats que només es poden llegir i exportar. Aquest mòdul pot ser obligatori per a alguns països. +Module3400Name=Xarxes socials +Module3400Desc=Activa els camps de les xarxes socials a tercers i adreces (skype, twitter, facebook...). Module4000Name=RRHH Module4000Desc=Gestió de recursos humans (gestionar departaments, empleats, contractes i "feelings") -Module5000Name=Multi-empresa +Module5000Name=Multiempresa Module5000Desc=Permet gestionar diverses empreses -Module6000Name=Flux de treball -Module6000Desc=Gestió del flux de treball (creació automàtica d'objectes i / o canvi d'estat automàtic) +Module6000Name=Flux de treball entre mòduls +Module6000Desc=Gestió del flux de treball entre diferents mòduls (creació automàtica d'objectes i/o canvi d'estat automàtic) Module10000Name=Pàgines web -Module10000Desc=Creeu llocs web (públics) amb un editor WYSIWYG. Es tracta d’un CMS per a administradors web o desenvolupador (és millor conèixer el llenguatge HTML i CSS). N’hi ha prou amb configurar el servidor web (Apache, Nginx, ...) per a assenyalar el directori dedicat a Dolibarr perquè el tingui en línia a Internet amb el seu propi nom de domini. +Module10000Desc=Creeu llocs web (públics) amb un editor WYSIWYG. Es tracta d’un CMS per a administradors web o desenvolupadors (és millor conèixer el llenguatge HTML i CSS). N’hi ha prou amb configurar el servidor web (Apache, Nginx...) per a assenyalar el directori dedicat a Dolibarr perquè el tingui en línia a Internet amb el seu propi nom de domini. Module20000Name=Gestió de sol·licituds de dies lliures Module20000Desc=Defineix i fes seguiment de les sol·licituds de dies lliures dels empleats Module39000Name=Lots de productes @@ -775,7 +783,7 @@ Permission187=Tanca les comandes de compra Permission188=Cancel·la les comandes de compra Permission192=Crear línies Permission193=Cancel·lar línies -Permission194=Llegeix les línies d'ample de banda +Permission194=Llegiu les línies d’amplada de banda Permission202=Crear connexions ADSL Permission203=Realitzar comanda de connexions Permission204=Demanar connexions @@ -805,7 +813,8 @@ PermissionAdvanced253=Crear/modificar usuaris interns/externs i els seus permiso Permission254=Crea/modifica només usuaris externs Permission255=Eliminar o desactivar altres usuaris Permission256=Consultar els seus permisos -Permission262=Amplieu l'accés a tots els tercers (no només a tercers pels quals aquest usuari és representant de venda). <br> No és efectiu per als usuaris externs (sempre limitats per a propostes, comandes, factures, contractes, etc.). <br> No és efectiu per als projectes (només les normes sobre permisos de projecte, visibilitat i assumptes d'assignació). +Permission262=Amplieu l’accés a tots els tercers I als seus objectes (no només a tercers dels quals l’usuari és representant de la venda). <br> No és efectiu per a usuaris externs (sempre limitat a ells mateixos per a propostes, comandes, factures, contractes, etc.). <br> No és eficaç per als projectes (només les regles sobre permisos, visibilitat i assignació de projectes). +Permission263=Amplieu l'accés a tots els tercers SENSE els seus objectes (no només a tercers dels quals l'usuari és representant de la venda). <br> No és efectiu per a usuaris externs (sempre limitat a ells mateixos per a propostes, comandes, factures, contractes, etc.). <br> No és eficaç per als projectes (només les regles sobre permisos, visibilitat i assignació de projectes). Permission271=Consultar el CA Permission272=Consultar les factures Permission273=Emetre les factures @@ -1012,7 +1021,7 @@ DictionaryPaymentModes=Formes de pagament DictionaryTypeContact=Tipus de contactes/adreces DictionaryTypeOfContainer=Lloc web: tipus de pàgines web / contenidors DictionaryEcotaxe=Barems CEcoParticipación (DEEE) -DictionaryPaperFormat=Formats paper +DictionaryPaperFormat=Formats de paper DictionaryFormatCards=Formats de fitxa DictionaryFees=Informe de despeses - Tipus de línies d'informe de despeses DictionarySendingMethods=Mètodes d'expedició @@ -1062,12 +1071,12 @@ LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= LocalTax1ManagementES=Gestió Recàrrec d'Equivalència LocalTax1IsUsedDescES=El tipus de RE proposat per defecte en les creacions de pressupostos, factures, comandes, etc. Respon a la següent regla:<br>Si el comprador no està subjecte a RE, RE per defecte= 0. Final de regla.<br>Si el comprador està subjecte a RE aleshores s'aplica valor de RE per defecte. Final de regla.<br> -LocalTax1IsNotUsedDescES=El tipus de RE proposat per defecte es 0. Final de regla. +LocalTax1IsNotUsedDescES=Per defecte, el RE proposat és 0. Fi de la regla. LocalTax1IsUsedExampleES=A Espanya, es tracta de persones físiques: autònoms subjectes a uns epígrafs concrets de l'IAE. LocalTax1IsNotUsedExampleES=A Espanya, es tracta d'empreses jurídiques: Societats limitades, anònimes, etc. i persones físiques (autònoms) subjectes a certs epígrafs de l'IAE. LocalTax2ManagementES=Gestió IRPF LocalTax2IsUsedDescES=El tipus d'IRPF proposat per defecte en les creacions de pressupostos, factures, comandes, etc. Respon a la següent regla:<br>Si el venedor no està subjecte a IRPF, IRPF per defecte= 0. Final de regla.<br>Si el venedor està subjecte a IRPF aleshores s'aplica valor d'IRPF per defecte. Final de regla.<br> -LocalTax2IsNotUsedDescES=El tipus d'IRPF proposat per defecte es 0. Final de regla. +LocalTax2IsNotUsedDescES=Per defecte, l'IRPF proposat és 0. Fi de la regla. LocalTax2IsUsedExampleES=A Espanya, es tracta de persones físiques: autònoms i professionals independents que presten serveis i empreses que han triat el règim fiscal de mòduls. LocalTax2IsNotUsedExampleES=A Espanya, es tracta d'empreses no subjectes al règim fiscal de mòduls. RevenueStampDesc=El "segell d'impostos" o "segell d'ingressos" és un impost fix per factura (no depèn de l'import de la factura). També pot ser un percentatge d’impostos, però és millor utilitzar el segon o tercer tipus d’impostos per al percentatge d’impostos, ja que els segells d’impostos no proporcionen cap informe. Només uns pocs països utilitzen aquest tipus d’impostos. @@ -1143,7 +1152,7 @@ CompanyCurrency=Divisa principal CompanyObject=Objecte de l'empresa IDCountry=ID de país Logo=Logo -LogoDesc=Logotip principal de l'empresa. S'utilitzarà en documents generats (PDF, ...) +LogoDesc=Logotip principal de l'empresa. S'utilitzarà en documents generats (PDF...) LogoSquarred=Logo (quadrat) LogoSquarredDesc=Ha de ser una icona quadrada (amplada = alçada). Aquest logotip s'utilitzarà com a icona preferida o com a altra necessitat, com a la barra de menús superior (si no està desactivada en la configuració de l'entorn). DoNotSuggestPaymentMode=No ho suggereixis @@ -1161,7 +1170,7 @@ Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Comanda no processada Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Comanda de compra no processada Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Pressupost no tancat Delays_MAIN_DELAY_PROPALS_TO_BILL=Pressupost no facturat -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Servei per activar +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Servei per a activar Delays_MAIN_DELAY_RUNNING_SERVICES=Servei caducat Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Factura de proveïdor pendent de pagament Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Factura del client no pagada @@ -1175,35 +1184,36 @@ SetupDescription2=Les dues seccions següents són obligatòries (les dues prime SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Paràmetres bàsics utilitzats per a personalitzar el comportament per defecte de la vostra aplicació (per exemple, per a funcions relacionades amb el país). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Aquest programari és un conjunt de molts mòduls / aplicacions. Els mòduls relacionats amb les vostres necessitats s’han d’activar i configurar. Les entrades del menú apareixen amb l’activació d’aquests mòduls. SetupDescription5=Altres entrades del menú d'instal·lació gestionen paràmetres opcionals. -LogEvents=Auditoria de la seguretat d'esdeveniments +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Auditoria -InfoDolibarr=Sobre Dolibarr -InfoBrowser=Sobre el Navegador -InfoOS=Sobre S.O. -InfoWebServer=Sobre Servidor web -InfoDatabase=Sobre Base de dades -InfoPHP=Sobre PHP -InfoPerf=Sobre prestacions -InfoSecurity=Quant a la seguretat +InfoDolibarr=Quant al Dolibarr +InfoBrowser=Quant al Navegador +InfoOS=Quant al S.O. +InfoWebServer=Quant al Servidor web +InfoDatabase=Quant a Base de dades +InfoPHP=Quant al PHP +InfoPerf=Quant a Prestacions +InfoSecurity=Quant a Seguretat BrowserName=Nom del navegador BrowserOS=S.O. del navegador ListOfSecurityEvents=Llistat d'esdeveniments de seguretat Dolibarr SecurityEventsPurged=Esdeveniments de seguretat purgats LogEventDesc=Habiliteu el registre per a esdeveniments de seguretat específics. Els administradors del registre a través del menú <b> %s - %s </b>. Avís, aquesta funció pot generar una gran quantitat de dades a la base de dades. AreaForAdminOnly=Els paràmetres de configuració només poden ser establerts per <b>usuaris administradors</b>. -SystemInfoDesc=La informació del sistema és informació tècnica accessible només en només lectura als administradors. +SystemInfoDesc=La informació del sistema és informació tècnica diversa que obteniu en mode de només lectura i visible només per als administradors. SystemAreaForAdminOnly=Aquesta àrea només està disponible per als usuaris administradors. Els permisos d'usuari de Dolibarr no poden canviar aquesta restricció. CompanyFundationDesc=Editeu la informació de la vostra empresa / organització. Feu clic al botó "%s" al final de la pàgina quan hagi acabat. AccountantDesc=Si teniu un comptable extern, podeu editar aquí la seva informació. AccountantFileNumber=Número de fila DisplayDesc=Els paràmetres que afecten l'aspecte i el comportament de Dolibarr es poden modificar aquí. AvailableModules=Mòduls/complements disponibles -ToActivateModule=Per activar els mòduls, aneu a l'àrea de Configuració (Inici->Configuració->Mòduls). +ToActivateModule=Per a activar mòduls, aneu a l'àrea de configuració (Inici->Configuració->Mòduls). SessionTimeOut=Temps de desconnexió per a la sessió SessionExplanation=Aquest número garanteix que la sessió no caduqui abans d'aquest retard, si el netejador de sessió es fa mitjançant un netejador de sessió de PHP intern (i res més). El netejador de sessió intern de PHP no garanteix que la sessió expire després d'aquest retard. Caducarà, després d'aquest retard, i quan s'executi el netejador de sessió, de manera que cada accés <b> %s / %s </b>, però només durant l'accés fet per altres sessions (si el valor és 0, significa que l'eliminació de la sessió només es fa mitjançant un extern procés). <br> Nota: en alguns servidors amb un mecanisme de neteja de sessió externa (cron sota debian, ubuntu ...), les sessions es poden destruir després d'un període definit per una configuració externa, independentment del valor introduït aquí. SessionsPurgedByExternalSystem=Sembla que les sessions en aquest servidor són netejades mitjançant un mecanisme extern (cron sota debian, ubuntu ...), probablement cada <b> %s </b> segons (= el valor del paràmetre sessió.gc_maxlifetime ), així que modificant aquest valor aquí no té cap efecte, Heu de sol·licitar a l’administrador del servidor que canviï la durada de la sessió. TriggersAvailable=Triggers disponibles -TriggersDesc=Els activadors són fitxers que modificaran el comportament del flux de treball de Dolibarr un cop copiat al directori <b>htdocs/core/triggers</b>. Realitzen accions noves, activades en esdeveniments Dolibarr (creació d'empresa nova, validació de factures, ...). +TriggersDesc=Els activadors són fitxers que modificaran el comportament del flux de treball de Dolibarr un cop copiat al directori <b>htdocs/core/triggers</b>. Realitzen accions noves, activades en esdeveniments Dolibarr (creació d'empresa nova, validació de factures...). TriggerDisabledByName=Triggers d'aquest arxiu desactivador pel sufix <b>-NORUN</b> en el nom de l'arxiu. TriggerDisabledAsModuleDisabled=Triggers d'aquest arxiu desactivats ja que el mòdul <b>%s</b> no està activat. TriggerAlwaysActive=Triggers d'aquest arxiu sempre actius, ja que els mòduls Dolibarr relacionats estan activats @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Sembla que cal executar el procés d’actuali YouMustRunCommandFromCommandLineAfterLoginToUser=Ha d'executar la comanda des d'un shell després d'haver iniciat sessió amb el compte <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Funcions SSL no disponibles al vostre PHP DownloadMoreSkins=Més temes per a descarregar -SimpleNumRefModelDesc=Retorna el número de referència amb el format %syymm-nnnn on yy és l'any, mm és el mes i nnnn és el seqüencial sense inicialitzar +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Mostra l'identificador professional amb adreces ShowVATIntaInAddress=Amaga el número d'IVA intracomunitari amb adreces TranslationUncomplete=Traducció parcial @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Servidor proxy: nom / adreça MAIN_PROXY_PORT=Servidor proxy: port MAIN_PROXY_USER=Servidor proxy: inici de sessió / usuari MAIN_PROXY_PASS=Servidor proxy: contrasenya -DefineHereComplementaryAttributes=Definiu aquí els atributs addicionals / personalitzats que voleu incloure per a: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Atributs complementaris ExtraFieldsLines=Atributs complementaris (línies) ExtraFieldsLinesRec=Atributs complementaris (línies de plantilles de factures) @@ -1280,7 +1290,7 @@ ExtraFieldsProjectTask=Atributs complementaris (tasques) ExtraFieldsSalaries=Atributs complementaris (sous) ExtraFieldHasWrongValue=L'atribut %s té un valor incorrecte. AlphaNumOnlyLowerCharsAndNoSpace=només caràcters alfanumèrics i en minúscula sense espai -SendmailOptionNotComplete=Atenció, en alguns sistemes Linux, amb aquest mètode d'enviament, per poder enviar mails en nom seu, la configuració de sendmail ha de contenir l'opció <b>-ba</b> (paràmetre <b>mail.force_extra_parameters</b> a l'arxiu <b>php.ini</b>). Si alguns dels seus destinataris no reben els seus missatges, proveu de modificar aquest paràmetre PHP amb <b>mail.force_extra_parameters =-ba </b>. +SendmailOptionNotComplete=Advertència, en alguns sistemes Linux, per a enviar correus electrònics des del vostre correu electrònic, la configuració d'execució de sendmail ha de contenir l'opció -ba (el paràmetre mail.force_extra_parameters al fitxer php.ini). Si alguns destinataris mai no reben correus electrònics, intenteu editar aquest paràmetre PHP amb mail.force_extra_parameters = -ba). PathToDocuments=Rutes d'accés a documents PathDirectory=Catàleg SendmailOptionMayHurtBuggedMTA=La característica per a enviar correus mitjançant el mètode "correu directe de PHP" generarà un missatge de correu que podria no ser analitzat correctament per alguns servidors de correu entrant. El resultat és que alguns usuaris no poden llegir alguns correus d'aquestes plataformes errònies. Aquest és el cas d'alguns proveïdors d'Internet (Ex: Orange a França). Això no és un problema amb Dolibarr o PHP, però sí amb el servidor de correu entrant. Tanmateix, podeu afegir una opció MAIN_FIX_FOR_BUGGED_MTA a 1 a Configuració - Altres per a modificar Dolibarr per tal d'evitar-ho. Tanmateix, podeu tenir problemes amb altres servidors que utilitzin estrictament l'estàndard SMTP. L'altra solució (recomanada) és utilitzar el mètode "llibreria de sockets SMTP" que no té cap desavantatge. @@ -1289,11 +1299,11 @@ TranslationKeySearch=Cerca una clau o cadena de traducció TranslationOverwriteKey=Sobreescriu una cadena de traducció TranslationDesc=Com configurar l'idioma de visualització: <br> * Per defecte / a tot el sistema: menú <strong>Inici -> Configuració -> Entorn</strong><br> * Per usuari: Feu clic al nom d'usuari a la part superior de la pantalla i modifiqueu la pestanya <strong>Configuració d'entorn d'usuari</strong> de la fitxa d'usuari. TranslationOverwriteDesc=També pot reemplaçar cadenes omplint la taula següent. Triï el seu idioma a la llista desplegable "%s", inserta la clau de la traducció a "%s" i la seva nova traducció a "%s" -TranslationOverwriteDesc2=Podeu utilitzar l'altra pestanya per ajudar-vos a saber quina clau de traducció voleu utilitzar +TranslationOverwriteDesc2=Podeu utilitzar l’altra pestanya per a ajudar-vos a saber quina clau de traducció heu d’utilitzar TranslationString=Cadena de traducció CurrentTranslationString=Cadena de traducció actual WarningAtLeastKeyOrTranslationRequired=Es necessita un criteri de cerca com a mínim per cadena o clau de traducció -NewTranslationStringToShow=Cadena de traducció nova per mostrar +NewTranslationStringToShow=Cadena de traducció nova per a mostrar OriginalValueWas=La traducció original s'ha sobreescrit. El valor original era: <br><br>%s TransKeyWithoutOriginalValue=Heu obligat una nova traducció de la clau de traducció '<strong> %s </strong>' que no existeix en cap fitxer d'idioma TitleNumberOfActivatedModules=Mòduls activats @@ -1314,12 +1324,12 @@ BrowserIsOK=Esteu utilitzant el navegador web %s. Aquest navegador està bé per BrowserIsKO=Esteu utilitzant el navegador web %s. Es considera que aquest navegador és una mala elecció per a la seguretat, el rendiment i la fiabilitat. Recomanem utilitzar Firefox, Chrome, Opera o Safari. PHPModuleLoaded=Es carrega el component PHP %s PreloadOPCode=S'utilitza un codi OPC precarregat -AddRefInList=Mostrar client / proveïdor ref. llista d'informació (llista de selecció o combobox) i la majoria d'hipervincle. <br> Els tercers apareixeran amb un format de nom de "CC12345 - SC45678 - The Big Company corp". en lloc de "The Big Company corp". +AddRefInList=Mostra la llista d'informació de referència client/proveïdor (llista de selecció o llista desplegable) i la majoria d’enllaços. <br>Els tercers apareixeran amb un format de nom "CC12345 - SC45678 - Nom de l'organització". en lloc de "Nom de l'organització". AddAdressInList=Mostra la llista d'informació de la direcció de client / proveïdor (llista de selecció o combobox) <br> Els tercers apareixeran amb un format de nom de "The Big Company corp. - 21 jump street 123456 Big town - USA" en lloc de "The Big Company corp". -AddEmailPhoneTownInContactList=Mostra el correu electrònic de contacte (o els telèfons si no està definit) i la llista d'informació de la ciutat (llista de selecció o llista desplegable) <br>Els contactes apareixeran amb un format de nom "Dupond Durand - dupond.durand@email.com - Paris" o "Dupond Durand - 06 07 59 65 66 - París "en lloc de" Dupond Durand". +AddEmailPhoneTownInContactList=Mostra el correu electrònic de contacte (o els telèfons si no està definit) i la llista d'informació de la ciutat (llista de selecció o llista desplegable) <br>Els contactes apareixeran amb un format de nom "Dupond Durand - dupond.durand@email.com - París" o "Dupond Durand - 06 07 59 65 66 - París "en lloc de" Dupond Durand". AskForPreferredShippingMethod=Demaneu un mètode d'enviament preferit per a tercers. FieldEdition=Edició del camp %s -FillThisOnlyIfRequired=Exemple: +2 (Completi només si es registre una desviació del temps en l'exportació) +FillThisOnlyIfRequired=Exemple: +2 (ompliu només si es produeixen problemes de compensació de la zona horària) GetBarCode=Obté el codi de barres NumberingModules=Models de numeració DocumentModules=Models de documents @@ -1328,13 +1338,13 @@ PasswordGenerationStandard=Retorna una contrasenya generada segons l'algorisme i PasswordGenerationNone=No suggereixis una contrasenya generada. La contrasenya s'ha d'escriure manualment. PasswordGenerationPerso=Retorna una contrasenya segons la vostra configuració personalitzada. SetupPerso=Segons la vostra configuració -PasswordPatternDesc=Descripció patró contrasenya +PasswordPatternDesc=Descripció del patró de contrasenya ##### Users setup ##### RuleForGeneratedPasswords=Regles per a generar i validar contrasenyes DisableForgetPasswordLinkOnLogonPage=No mostri l'enllaç "Contrasenya oblidada" a la pàgina d'inici de sessió UsersSetup=Configuració del mòdul usuaris -UserMailRequired=Es necessita un correu electrònic per crear un nou usuari -UserHideInactive=Amagueu els usuaris inactius de totes les llistes combo d’usuaris (no es recomana: això pot significar que no podreu filtrar ni cercar usuaris antics en algunes pàgines) +UserMailRequired=Cal un correu electrònic per a crear un usuari nou +UserHideInactive=Amaga els usuaris inactius de totes les llistes desplegables d'usuaris (no es recomana: pot ser que no pugueu filtrar ni cercar usuaris antics en algunes pàgines) UsersDocModules=Plantilles de documents per a documents generats a partir d'un registre d'usuari GroupsDocModules=Plantilles de documents per a documents generats a partir d’un registre de grup ##### HRM setup ##### @@ -1348,16 +1358,16 @@ NotificationsDescUser=* per usuari, un usuari alhora. NotificationsDescContact=* per contactes de tercers (clients o venedors), un contacte a la vegada. NotificationsDescGlobal=* o configurant adreces de correu electrònic globals en aquesta pàgina de configuració. ModelModules=Plantilles de documents -DocumentModelOdt=Genereu documents des de les plantilles OpenDocument (fitxers .ODT / .ODS de LibreOffice, OpenOffice, KOffice, TextEdit, ...) +DocumentModelOdt=Genereu documents a partir de plantilles OpenDocument (fitxers .ODT / .ODS de LibreOffice, OpenOffice, KOffice, TextEdit...) WatermarkOnDraft=Marca d'aigua en els documents esborrany -JSOnPaimentBill=Activar funció per autocompletar les línies de pagament a les entrades de pagament -CompanyIdProfChecker=Regles sobre els IDs professionals +JSOnPaimentBill=Activa la funció per a emplenar automàticament les línies de pagament al formulari de pagament +CompanyIdProfChecker=Normes per a identificacions professionals MustBeUnique=Ha de ser únic? -MustBeMandatory=Obligatori per crear tercers (si es defineix el número d'IVA o el tipus d'empresa)? +MustBeMandatory=Obligatori per a crear tercers (si es defineix el NIF/CIF o el tipus d’empresa)? MustBeInvoiceMandatory=És obligatori per a validar les factures? TechnicalServicesProvided=Prestació de serveis tècnics #####DAV ##### -WebDAVSetupDesc=Aquest és l'enllaç per accedir al directori WebDAV. Conté un missatge "públic" obert a qualsevol usuari que conegui l'URL (si es permet l'accés al directori públic) i un directori "privat" que necessita un compte d'inici de sessió / contrasenya existent per a l'accés. +WebDAVSetupDesc=Aquest és l'enllaç per a accedir al directori WebDAV. Conté un missatge "públic" obert a qualsevol usuari que conegui l'URL (si es permet l'accés al directori públic) i un directori "privat" que necessita un compte d'inici de sessió/contrasenya existent per a l'accés. WebDavServer=URL de l'arrel del servidor %s: %s ##### Webcal setup ##### WebCalUrlForVCalExport=Un vincle d'exportació del calendari en format <b>%s</b> estarà disponible a la url: %s @@ -1419,10 +1429,10 @@ WatermarkOnDraftContractCards=Marca d'aigua en contractes (en cas d'estar buit) MembersSetup=Configuració del mòdul Socis MemberMainOptions=Opcions principals AdherentLoginRequired= Gestiona un compte d'usuari per a cada soci -AdherentMailRequired=Es necessita un correu electrònic per crear un nou membre -MemberSendInformationByMailByDefault=La casella de selecció per enviar una confirmació per correu electrònic als socis (validació o nova subscripció) està activada per defecte +AdherentMailRequired=Cal un correu electrònic per a crear un soci nou +MemberSendInformationByMailByDefault=La casella de selecció per a enviar una confirmació per correu electrònic als socis (validació o nova subscripció) està activada per defecte VisitorCanChooseItsPaymentMode=El visitant pot triar entre els modes de pagament disponibles -MEMBER_REMINDER_EMAIL=Activa el recordatori automàtic <b> per correu electrònic </b> de les subscripcions caducades. Nota: El mòdul <strong> %s </strong> s'ha d'habilitar i configurar correctament per enviar recordatoris. +MEMBER_REMINDER_EMAIL=Activa el recordatori automàtic <b> per correu electrònic </b> de les subscripcions caducades. Nota: El mòdul <strong> %s </strong> s'ha d'habilitar i configurar correctament per a enviar recordatoris. MembersDocModules=Plantilles de documents per a documents generats a partir del registre de socis ##### LDAP setup ##### LDAPSetup=Configuració de LDAP @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Nom d'usuari (unix) LDAPFieldLoginExample=Exemple: uid LDAPFilterConnection=Filtre de cerca LDAPFilterConnectionExample=Exemple: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Nom d'usuari (samba, activedirectory) LDAPFieldLoginSambaExample=Exemple: samaccountname LDAPFieldFullname=Nom complet @@ -1536,7 +1547,7 @@ LDAPFieldTownExample=Exemple: l LDAPFieldCountry=País LDAPFieldDescription=Descripció LDAPFieldDescriptionExample=Exemple: descripció -LDAPFieldNotePublic=Nota publica +LDAPFieldNotePublic=Nota pública LDAPFieldNotePublicExample=Exemple: publicnote LDAPFieldGroupMembers= Socis del grup LDAPFieldGroupMembersExample= Exemple: uniqueMember @@ -1570,11 +1581,11 @@ NotInstalled=No està instal·lat. NotSlowedDownByThis=No frenat per això. NotRiskOfLeakWithThis=No hi ha risc de filtració amb això. ApplicativeCache=Aplicació memòria cau -MemcachedNotAvailable=No s'ha trobat una aplicació de cache. Pot millorar el rendiment instal·lant un cache server Memcached i un mòdul capaç d'utilitzar aquest servidor de cache.<br>Mes informació aquí <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Tingui en compte que alguns hostings no ofereixen servidors cache. +MemcachedNotAvailable=No s'ha trobat cap memòria cau aplicativa. Podeu millorar el rendiment instal·lant un servidor de memòria cau Memcached i un mòdul capaç d’utilitzar aquest servidor de memòria cau. <br> Més informació aquí <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN"> http://wiki.dolibarr.org/index.php/Module_MemCached_EN </a>. <br> Tingueu en compte que molts proveïdors d'allotjament web no proporcionen aquest servidor de memòria cau. MemcachedModuleAvailableButNotSetup=S'ha trobat el mòdul memcached per a l'aplicació de memòria cau, però la configuració del mòdul no està completa. MemcachedAvailableAndSetup=El mòdul memcached dedicat a utilitzar el servidor memcached està habilitat. OPCodeCache=OPCode memòria cau -NoOPCodeCacheFound=No s'ha trobat cap memòria cau OPCode. Potser utilitzeu una memòria cau OPCode diferent de XCache o eAccelerator (bé), o potser no tingueu la memòria cau OPCode (molt dolenta). +NoOPCodeCacheFound=No s'ha trobat cap memòria cau d'OPCode. Potser utilitzeu una memòria cau OPCode diferent de XCache o eAccelerator (bona), o potser no teniu memòria cau OPCode (molt malament). HTTPCacheStaticResources=Memòria cau HTTP per a estadístiques de recursos (css, img, javascript) FilesOfTypeCached=Fitxers de tipus %s s'emmagatzemen en memòria cau pel servidor HTTP FilesOfTypeNotCached=Fitxers de tipus %s no s'emmagatzemen en memòria cau pel servidor HTTP @@ -1603,9 +1614,9 @@ OnProductSelectAddProductDesc=Com s'utilitza la descripció dels productes quan AutoFillFormFieldBeforeSubmit=Empleneu automàticament el camp d’entrada de la descripció amb la descripció del producte DoNotAutofillButAutoConcat=No empleneu automàticament el camp d'entrada amb la descripció del producte. La descripció del producte es concatenarà automàticament a la descripció introduïda. DoNotUseDescriptionOfProdut=La descripció del producte mai no s’inclourà a la descripció de les línies de documents -MergePropalProductCard=Activeu a la pestanya Fitxers adjunts de productes/serveis una opció per combinar el document PDF del producte amb el PDF del pressupost si el producte/servei es troba en ell +MergePropalProductCard=Activa a la pestanya Fitxers adjunts de producte/servei una opció per a combinar el document PDF del producte amb el PDF del pressupost si el producte/servei es troba en el pressupost ViewProductDescInThirdpartyLanguageAbility=Mostra les descripcions dels productes en formularis en l'idioma del tercer (en cas contrari, en l'idioma de l'usuari) -UseSearchToSelectProductTooltip=A més, si teniu un gran nombre de productes (> 100.000), podeu augmentar la velocitat establiint la constant PRODUCT_DONOTSEARCH_ANYWHERE a 1 a Configuració->Altres. La cerca es limitarà a l'inici de la cadena. +UseSearchToSelectProductTooltip=A més, si teniu un gran nombre de productes (> 100.000), podeu augmentar la velocitat establint la constant PRODUCT_DONOTSEARCH_ANYWHERE a 1 a Configuració->Altres. La cerca es limitarà a l'inici de la cadena. UseSearchToSelectProduct=Espereu fins que premeu una tecla abans de carregar el contingut de la llista combinada del producte (això pot augmentar el rendiment si teniu una gran quantitat de productes, però és menys convenient) SetDefaultBarcodeTypeProducts=Tipus de codi de barres utilitzat per defecte per als productes SetDefaultBarcodeTypeThirdParties=Tipus de codi de barres utilitzat per defecte per als tercers @@ -1619,10 +1630,10 @@ SyslogOutput=Sortida del log SyslogFacility=Facilitat SyslogLevel=Nivell SyslogFilename=Nom i ruta de l'arxiu -YouCanUseDOL_DATA_ROOT=Utilitza DOL_DATA_ROOT/dolibarr.log per un fitxer de registre en la carpeta documents de Dolibarr. Tanmateix, es pot definir una carpeta diferent per guardar aquest fitxer. +YouCanUseDOL_DATA_ROOT=Podeu utilitzar DOL_DATA_ROOT/dolibarr.log per a un fitxer de registre al directori "documents" de Dolibarr. Podeu establir un camí diferent per a emmagatzemar aquest fitxer. ErrorUnknownSyslogConstant=La constant %s no és una constant syslog coneguda OnlyWindowsLOG_USER=En Windows, només s'admetrà la funció LOG_USER -CompressSyslogs=Compressió i còpia de seguretat dels fitxers de registre de depuració (generats pel mòdul Log per depurar) +CompressSyslogs=Compressió i còpia de seguretat dels fitxers de registre de depuració (generats pel mòdul Registre per a depuració) SyslogFileNumberOfSaves=Nombre de registres de còpia de seguretat que cal conservar ConfigureCleaningCronjobToSetFrequencyOfSaves=Configureu la tasca programada de neteja per a establir la freqüència de còpia de seguretat del registre ##### Donations ##### @@ -1645,7 +1656,7 @@ BarcodeDescDATAMATRIX=Codi de barres de tipus Datamatrix BarcodeDescQRCODE=Codi de barres de tipus QR GenbarcodeLocation=Generador de codi de barres (utilitzat pel motor intern per a alguns tipus de codis de barres). Ha de ser compatible amb "genbarcode".<br>Per exemple: /usr/local/bin/genbarcode BarcodeInternalEngine=Motor intern -BarCodeNumberManager=Gestor per definir automàticament els números de codi de barres +BarCodeNumberManager=Gestor per a definir automàticament els números de codi de barres ##### Prelevements ##### WithdrawalsSetup=Configuració dels pagaments de dèbit directe del mòdul ##### ExternalRSS ##### @@ -1686,7 +1697,7 @@ FCKeditorForMail=Edició/creació WYSIWIG per tots els e-mails (excepte Eines->e FCKeditorForTicket=Creació / edició de WYSIWIG per a entrades ##### Stock ##### StockSetup=Configuració del mòdul d'Estoc -IfYouUsePointOfSaleCheckModule=Si utilitzeu el mòdul Point of Sale (POS) proporcionat per defecte o un mòdul extern, aquesta configuració pot ser ignorada pel vostre mòdul POS. La majoria dels mòduls de POS estan dissenyats per defecte per crear una factura immediatament i disminuir l'estoc, independentment de les opcions aquí. Així, si necessiteu o no una disminució de les existències al registrar una venda de la vostra TPV, consulteu també la vostra configuració del mòdul POS. +IfYouUsePointOfSaleCheckModule=Si utilitzeu el mòdul Punt de Venda (TPV) proporcionat per defecte o un mòdul extern, el vostre mòdul TPV pot ignorar aquesta configuració. La majoria de mòduls TPV estan dissenyats per defecte per a crear una factura immediatament i reduir l'estoc, independentment de les opcions aquí. Per tant, si necessiteu o no una reducció d’estoc en registrar una venda des del vostre TPV, comproveu també la configuració del mòdul TPV. ##### Menu ##### MenuDeleted=Menú eliminat Menu=Menú @@ -1709,7 +1720,7 @@ DetailLangs=Nom del fitxer Lang pel codi d'etiqueta de traducció DetailUser=Intern / Extern / Tots Target=Objectiu DetailTarget=Orientació per a enllaços (_blank top obre una finestra nova) -DetailLevel=Nivell (-1:menú superior, 0:principal, >0 menú y submenú) +DetailLevel=Nivell (-1:menú superior, 0:menú de capçalera,> 0 menús i submenú) ModifMenu=Modificació del menú DeleteMenu=Eliminar entrada de menú ConfirmDeleteMenu=Estàs segur que vols eliminar l'entrada de menú <b>%s</b> ? @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=L'empresa s'ha configurat com a no subjecta a IVA (Inic AccountancyCode=Codi comptable AccountancyCodeSell=Codi comptable vendes AccountancyCodeBuy=Codi comptable compres +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Mantenir buida per defecte la casella “Crea automàticament el pagament” quan es crea un nou impost ##### Agenda ##### AgendaSetup=Mòdul configuració d'accions i agenda PasswordTogetVCalExport=Clau d'autorització vCal export link +SecurityKey = Security Key PastDelayVCalExport=No exportar els esdeveniments de més de AGENDA_USE_EVENT_TYPE=Utilitzeu tipus d'esdeveniments (gestionats en el menú Configuració -> Diccionaris -> Tipus d'esdeveniments d'agenda) AGENDA_USE_EVENT_TYPE_DEFAULT=Estableix automàticament aquest valor predeterminat per al tipus d'esdeveniment en el formulari de creació de l'esdeveniment @@ -1753,23 +1766,23 @@ 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 <br><b>__PHONETO__</b> que serà reemplaçada pel número de telèfon de la persona a trucar <br><b>__PHONEFROM__</b> que serà reemplaçada pel número de telèfon de la persona que truca (el vostre) <br><b>__LOGIN__</b> que serà reemplaçada pel teu usuari d'inici de clicktodial (definit a la fitxa d'usuari) <br><b>__PASS__</b> que serà reemplaçada per la contrasenya de clicktodial (definida a la fitxa d'usuari). -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. +ClickToDialDesc=Aquest mòdul canvia els números de telèfon, en utilitzar un ordinador de sobretaula, a enllaços on es pot fer clic. Un clic trucarà al número. Es pot utilitzar per a iniciar la trucada quan s'utilitza un telèfon suau a l'escriptori o, per exemple, quan s'utilitza un sistema CTI basat en el protocol SIP. Nota: Quan feu servir un telèfon intel·ligent, sempre es pot fer clic als números de telèfon. 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) ##### CashDesk=Punt de venda CashDeskSetup=Configuració del mòdul de Punt de venda -CashDeskThirdPartyForSell=Tercer genéric a utilitzar per defecte a les vendes -CashDeskBankAccountForSell=Compte per defecte a utilitzar pels cobraments en efectiu +CashDeskThirdPartyForSell=Tercer genèric per defecte que s'utilitzarà per a les vendes +CashDeskBankAccountForSell=Compte predeterminat que cal utilitzar per a rebre cobraments en efectiu CashDeskBankAccountForCheque=Compte a utilitzar per defecte per rebre pagaments per xec -CashDeskBankAccountForCB=Compte per defecte a utilitzar pels cobraments amb targeta de crèdit +CashDeskBankAccountForCB=Compte predeterminat que cal utilitzar per a rebre cobraments amb targeta de crèdit CashDeskBankAccountForSumup=Compte bancari per defecte que es farà servir per rebre pagaments de SumUp -CashDeskDoNotDecreaseStock=Desactiva la reducció d'estoc quan es realitza una venda des del punt de venda (si és "no", la reducció d'estoc es realitza per a cada venda realitzada des del TPV, independentment de l'opció establerta al mòdul Estoc). +CashDeskDoNotDecreaseStock=Desactiva la reducció d'estoc quan es fa una venda des del punt de venda (si és "no", la reducció d'estoc es realitza per a cada venda realitzada des del TPV, independentment de l'opció establerta al mòdul Estoc). CashDeskIdWareHouse=Força i restringeix el magatzem a utilitzar per disminuir l'estoc StockDecreaseForPointOfSaleDisabled=La disminució d'estocs des del punt de venda està desactivat StockDecreaseForPointOfSaleDisabledbyBatch=La disminució d'accions en POS no és compatible amb el mòdul de gestió de Serial / Lot (actualment actiu) perquè la disminució de l'estoc està desactivada. CashDeskYouDidNotDisableStockDecease=No vau desactivar la disminució de l'estoc en fer una venda des del TPV. Per tant, es requereix un magatzem. -CashDeskForceDecreaseStockLabel=La disminució d’estoc dels productes per lots es obligada. +CashDeskForceDecreaseStockLabel=S'ha forçat la disminució de l'estoc de productes per lots. CashDeskForceDecreaseStockDesc=Disminuïu primer les dates més antigues de consumir i vendre. CashDeskReaderKeyCodeForEnter=Codi clau per a "Enter" definit al lector de codi de barres (Exemple: 13) ##### Bookmark ##### @@ -1783,9 +1796,9 @@ WSDLCanBeDownloadedHere=La descripció WSDL dels serveis prestats es poden recup EndPointIs=Els clients SOAP han d’enviar les seves sol·licituds al punt final Dolibarr disponible a l’URL ##### API #### ApiSetup=Configuració del mòdul API -ApiDesc=Habilitant aquest mòdul, Dolibarr serà un servidor REST per oferir varis serveis web. +ApiDesc=En habilitar aquest mòdul, Dolibarr es converteix en un servidor REST per a proporcionar diversos serveis web. ApiProductionMode=Activa el mode de producció (activarà l'ús d'una memòria cau per a la gestió de serveis) -ApiExporerIs=Pots explorar i provar les API en la URL +ApiExporerIs=Podeu explorar i provar les API a URL OnlyActiveElementsAreExposed=Només s'exposen els elements de mòduls habilitats ApiKey=Clau per l'API WarningAPIExplorerDisabled=S'ha desactivat l'explorador d'API. L'explorador d'API no és necessari per a proporcionar serveis d'API. És una eina perquè el desenvolupador pugui trobar/provar API REST. Si necessiteu aquesta eina, aneu a la configuració del mòdul API REST per a activar-la. @@ -1799,7 +1812,7 @@ BankOrderES=Espanyol BankOrderESDesc=Ordre de visualització espanyol ChequeReceiptsNumberingModule=Comproveu el mòdul de numeració de rebuts ##### Multicompany ##### -MultiCompanySetup=Configuració del mòdul Multi-empresa +MultiCompanySetup=Configuració del mòdul Multiempresa ##### Suppliers ##### SuppliersSetup=Configuració del mòdul de Proveïdor SuppliersCommandModel=Plantilla completa de comanda de compra @@ -1852,11 +1865,11 @@ YouMayFindNotificationsFeaturesIntoModuleNotification=Podeu trobar opcions de no ListOfNotificationsPerUser=Llista de notificacions automàtiques per usuari * ListOfNotificationsPerUserOrContact=Llista de possibles notificacions automàtiques (en un esdeveniment comercial) disponibles per usuari* o per contacte** ListOfFixedNotifications=Llista de notificacions fixes automàtiques -GoOntoUserCardToAddMore=Ves a la pestanya "Notificacions" d'un usuari per afegir o eliminar notificacions per usuaris. +GoOntoUserCardToAddMore=Aneu a la pestanya "Notificacions" d'un usuari per a afegir o eliminar notificacions per als usuaris GoOntoContactCardToAddMore=Vagi a la pestanya "Notificacions" d'un contacte de tercers per afegir o eliminar notificacions per contactes/direccions Threshold=Valor mínim/llindar -BackupDumpWizard=Assistent per crear el fitxer d'exportació de base de dades -BackupZipWizard=Assistent per crear el directori d’arxiu de documents +BackupDumpWizard=Assistent per a crear el fitxer d'exportació de la base de dades +BackupZipWizard=Assistent per a crear el directori d’arxiu de documents SomethingMakeInstallFromWebNotPossible=No és possible la instal·lació de mòduls externs des de la interfície web per la següent raó: SomethingMakeInstallFromWebNotPossible2=Per aquest motiu, el procés d'actualització descrit aquí és un procés manual que només un usuari privilegiat pot realitzar. InstallModuleFromWebHasBeenDisabledByFile=La instal·lació de mòduls externs des de l'aplicació es troba desactivada per l'administrador. Ha de requerir que elimini l'arxiu <strong>%s</strong> per habilitar aquesta funció @@ -1879,15 +1892,15 @@ BackgroundTableLineOddColor=Color de fons per les línies senars de les taules BackgroundTableLineEvenColor=Color de fons per les línies parells de les taules MinimumNoticePeriod=Període mínim d’avís (la vostra sol·licitud de permís s’ha de fer abans d’aquest període) NbAddedAutomatically=Nombre de dies afegits als comptadors d'usuaris (automàticament) cada mes -EnterAnyCode=Aquest camp conté una referència a un identificador de línia. Introdueix qualsevol valor però sense caràcters especials. +EnterAnyCode=Aquest camp conté una referència per a identificar la línia. Introduïu qualsevol valor que trieu, però sense caràcters especials. 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] +UnicodeCurrency=Introduïu aquí entre claudàtors, la llista del nombre de bytes que representa el símbol de moneda. Per exemple: per $, introduïu [36] - per al real de Brasil 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 +PositionIntoComboList=Posició de la línia a les llistes desplegables 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. -UrlTrackingDesc=Si el proveïdor o el servei de transport ofereix una pàgina o un lloc web per comprovar l'estat dels vostres enviaments, podeu introduir-lo aquí. Podeu utilitzar la clau {TRACKID} als paràmetres d'URL perquè el sistema la substitueixi pel número de seguiment que l'usuari va introduir a la fitxa d'enviament. +UrlTrackingDesc=Si el proveïdor o el servei de transport ofereix una pàgina o un lloc web per a comprovar l'estat dels vostres enviaments, podeu introduir-lo aquí. Podeu utilitzar la clau {TRACKID} als paràmetres d'URL perquè el sistema la substitueixi pel número de seguiment que l'usuari va introduir a la fitxa d'enviament. OpportunityPercent=Quan creeu un avantatge, definiran una quantitat estimada de projecte / avantatge. Segons l'estat del lideratge, aquesta quantitat es pot multiplicar per aquesta taxa per avaluar una quantitat total que pot generar tots els vostres clients potencials. El valor és un percentatge (entre 0 i 100). TemplateForElement=Aquest registre de plantilla es dedica a quin element TypeOfTemplate=Tipus de plantilla @@ -1922,10 +1935,10 @@ TitleExampleForMajorRelease=Exemple de missatge que podeu utilitzar per a anunci TitleExampleForMaintenanceRelease=Exemple de missatge que podeu utilitzar per a anunciar aquesta versió de manteniment (no dubteu a utilitzar-lo als vostres llocs web) ExampleOfNewsMessageForMajorRelease=Disponible ERP/CRM Dolibarr %s. La versió %s és una versió major amb un munt de noves característiques, tant per a usuaris com per a desenvolupadors. Es pot descarregar des de la secció de descàrregues del portal https://www.dolibarr.org (subdirectori versions estables). Podeu llegir <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> per veure la llista completa dels canvis. 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 <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> per a obtenir una llista completa dels canvis. -MultiPriceRuleDesc=Quan l'opció "Diversos nivells de preus per producte/servei" està activada, podeu definir preus diferents (un preu per nivell) per a cada producte. Per a 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 per al primer nivell per a cada producte. Aquesta pàgina està dissenyada per a estalviar-vos temps, però només és útil si els preus de cada nivell són relatius al primer nivell. Podeu ignorar aquesta pàgina en la majoria dels casos. +MultiPriceRuleDesc=Quan l'opció "Diversos nivells de preus per producte/servei" està activada, podeu definir preus diferents (un preu per nivell) per a cada producte. Per a estalviar-vos temps, aquí podeu introduir una regla per a 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 per al primer nivell per a cada producte. Aquesta pàgina està dissenyada per a estalviar-vos temps, però només és útil 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=Plantilles per a documents de magatzems -ToGenerateCodeDefineAutomaticRuleFirst=Per poder generar codis automàticament, primer heu de definir un gestor per definir automàticament el número del codi de barres. +ToGenerateCodeDefineAutomaticRuleFirst=Per a poder generar codis automàticament, primer heu de definir un gestor per a definir automàticament el número de codi de barres. SeeSubstitutionVars=Veure * nota per llistat de possibles variables de substitució SeeChangeLog=Veure el fitxer ChangeLog (només en anglès) AllPublishers=Tots els publicadors @@ -1947,7 +1960,7 @@ AddModels=Afegeix document o model de numeració AddSubstitutions=Afegeix claus de substitució DetectionNotPossible=Detecció no possible UrlToGetKeyToUseAPIs=URL per a obtenir el testimoni per a utilitzar l'API (un cop rebut el testimoni, es desa a la taula d'usuaris de la base de dades i s'ha de proporcionar a cada trucada de l'API) -ListOfAvailableAPIs=Llistat de APIs disponibles +ListOfAvailableAPIs=Llista d’API disponibles activateModuleDependNotSatisfied=El mòdul "%s" depèn del mòdul "%s", que falta, de manera que el mòdul "%1$s" pot no funcionar correctament. Instal·leu el mòdul "%2$s" o desactiveu el mòdul "%1$s" si voleu estar segur de qualsevol sorpresa. CommandIsNotInsideAllowedCommands=L'ordre que intenteu executar no es troba a la llista de comandaments permesos definits al paràmetre <strong> $ dolibarr_main_restrict_os_commands </strong> al fitxer <strong> conf.php </strong>. LandingPage=Pàgina de destinació principal @@ -1966,10 +1979,10 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=S'ha trobat diverses variants d'idiomes RemoveSpecialChars=Elimina els caràcters especials -COMPANY_AQUARIUM_CLEAN_REGEX=Filtre de Regex per netejar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) +COMPANY_AQUARIUM_CLEAN_REGEX=Filtre Regex per a netejar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) COMPANY_DIGITARIA_CLEAN_REGEX=Filtre Regex al valor net (COMPANY_DIGITARIA_CLEAN_REGEX) COMPANY_DIGITARIA_UNIQUE_CODE=No es permet la duplicació GDPRContact=Oficial de protecció de dades (PDO, privadesa de dades o contacte amb GDPR) @@ -1982,8 +1995,8 @@ SocialNetworkSetup=Configuració del mòdul de Xarxes socials EnableFeatureFor=Activa les funcions de <strong> %s </strong> VATIsUsedIsOff=Nota: L'opció d'utilitzar l'impost de vendes o l'IVA s'ha establert a <strong> Desconnectada </strong> al menú %s - %s, de manera que l'impost sobre vendes o Vat utilitzat sempre serà de 0 per vendes. SwapSenderAndRecipientOnPDF=Intercanvieu la posició de l'adreça del remitent i del destinatari en documents PDF -FeatureSupportedOnTextFieldsOnly=Advertència, funció només compatible amb camps de text. També s'ha d'establir un paràmetre d'URL action = create o action = edit ha de ser OR el nom de la pàgina ha de finalitzar amb 'new.php' per activar aquesta funció. -EmailCollector=Col lector de correu electrònic +FeatureSupportedOnTextFieldsOnly=Advertiment, funció compatible només amb els camps de text i llistes desplegables. També s'ha d'establir un paràmetre URL action=create o action=edit Ó el nom de la pàgina ha d'acabar amb 'new.php' per a activar aquesta característica. +EmailCollector=Col·lector de correu electrònic EmailCollectorDescription=Afegiu una tasca programada i una pàgina de configuració per escanejar regularment caixes de correu electrònic (utilitzant el protocol IMAP) i registreu els correus electrònics rebuts a la vostra aplicació, al lloc adequat i / o creeu alguns registres automàticament (com a clients potencials). NewEmailCollector=Col·lector nou de correus electrònics EMailHost=Servidor IMAP de correu electrònic @@ -2024,7 +2037,7 @@ ResourceSetup=Configuració del mòdul de recursos UseSearchToSelectResource=Utilitza un formulari de cerca per a seleccionar un recurs (millor que una llista desplegable) DisabledResourceLinkUser=Desactiva la funció per a enllaçar un recurs amb els usuaris DisabledResourceLinkContact=Desactiva la funció per a enllaçar un recurs amb els contactes -EnableResourceUsedInEventCheck=Habilita la funció per comprovar si s’utilitza un recurs en un esdeveniment +EnableResourceUsedInEventCheck=Activa la funció per a comprovar si s’utilitza un recurs en un esdeveniment ConfirmUnactivation=Confirma el restabliment del mòdul OnMobileOnly=Només en pantalla petita (telèfon intel·ligent) DisableProspectCustomerType=Desactiva el tipus de tercer "Potencial + Client" (per tant, el tercer ha de ser "Potencial" o "Client", però no pot ser tots dos) @@ -2037,11 +2050,11 @@ Deuteranopes=Deuteranops Tritanopes=Tritanops ThisValueCanOverwrittenOnUserLevel=Aquest valor es pot sobreescriure per cada usuari des de la pestanya de la pàgina d'usuari '%s' DefaultCustomerType=Tipus de tercer predeterminat per al formulari de creació "Nou client" -ABankAccountMustBeDefinedOnPaymentModeSetup=Nota: el compte bancari s'ha de definir al mòdul de cada mode de pagament (Paypal, Stripe, ...) per tal que funcioni aquesta funció. -RootCategoryForProductsToSell=Categoria arrel dels productes a vendre +ABankAccountMustBeDefinedOnPaymentModeSetup=Nota: el compte bancari s'ha de definir al mòdul de cada mode de pagament (Paypal, Stripe...) per tal que funcioni aquesta funció. +RootCategoryForProductsToSell=Categoria mare de productes a vendre RootCategoryForProductsToSellDesc=Si es defineix, només els productes d'aquesta categoria o els fills d’aquesta categoria estaran disponibles al punt de venda DebugBar=Barra de depuració -DebugBarDesc=Barra d’eines que inclou moltes eines per simplificar la depuració +DebugBarDesc=Barra d’eines que inclou moltes eines per a simplificar la depuració DebugBarSetup=Configuració de la barra de depuració GeneralOptions=Opcions generals LogsLinesNumber=Nombre de línies que es mostraran a la pestanya de registres @@ -2049,8 +2062,11 @@ UseDebugBar=Utilitzeu la barra de depuració DEBUGBAR_LOGS_LINES_NUMBER=Nombre d’últimes línies de registre que cal mantenir a la consola WarningValueHigherSlowsDramaticalyOutput=Advertència, els valors més alts frenen molt la producció ModuleActivated=El mòdul %s està activat i alenteix la interfície +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Si esteu en un entorn de producció, s'hauria d'establir aquesta propietat en %s. AntivirusEnabledOnUpload=Antivirus activat als fitxers penjats +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Els models d’exportació es comparteixen amb tothom ExportSetup=Configuració del mòdul Export ImportSetup=Configuració del mòdul Import @@ -2070,15 +2086,17 @@ RESTRICT_ON_IP=Permet l'accés només a alguna IP de l'amfitrió (no es permet c IPListExample=127.0.0.1 192.168.0.2 [:: 1] BaseOnSabeDavVersion=Basat en la versió de la biblioteca SabreDAV NotAPublicIp=No és una IP pública -MakeAnonymousPing=Creeu un ping &quot;+1&quot; anònim al servidor de bases Dolibarr (fet una vegada només després de la instal·lació) per permetre que la fundació compti el nombre d'instal·lació de Dolibarr. +MakeAnonymousPing=Feu un Ping anònim '+1' al servidor de la fundació Dolibarr (només es fa una vegada després de la instal·lació) per a permetre que la fundació compti el nombre d'instal·lacions de Dolibarr. FeatureNotAvailableWithReceptionModule=Funció no disponible quan el mòdul Recepció està habilitat EmailTemplate=Plantilla per correu electrònic EMailsWillHaveMessageID=Els correus electrònics tindran una etiqueta "Referències" que coincideix amb aquesta sintaxi +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Si voleu que alguns textos del vostre PDF es copiïn en 2 idiomes diferents en el mateix PDF generat, heu d’establir aquí aquest segon idioma perquè el PDF generat contingui 2 idiomes diferents en la mateixa pàgina, l’escollit en generar el PDF i aquesta (només poques plantilles de PDF admeten això). Mantingueu-lo buit per a 1 idioma per PDF. FafaIconSocialNetworksDesc=Introduïu aquí el codi de la icona de FontAwesome. Si no sabeu què és FontAwesome, podeu utilitzar el llibre genèric d’adreces. FeatureNotAvailableWithReceptionModule=Funció no disponible quan el mòdul Recepció està habilitat RssNote=Nota: Cada definició del canal RSS proporciona un giny que heu d’habilitar per a tenir-lo disponible al tauler de control -JumpToBoxes=Vés a Configuració -> Ginys +JumpToBoxes=Aneu a Configuració -> Ginys MeasuringUnitTypeDesc=Utilitzeu aquí un valor com "mida", "superfície", "volum", "pes", "temps" MeasuringScaleDesc=L'escala és el nombre de llocs que heu de moure la part decimal per a coincidir amb la unitat de referència predeterminada. Per al tipus d'unitat de "temps", és el nombre de segons. Els valors entre 80 i 99 són valors reservats. TemplateAdded=S'ha afegit la plantilla @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Es recomana canviar aquest valor a %s per a obtenir DictionaryProductNature= Naturalesa del producte CountryIfSpecificToOneCountry=País (si és específic d'un país determinat) YouMayFindSecurityAdviceHere=Podeu trobar assessorament de seguretat aquí -ModuleActivatedMayExposeInformation=Aquest mòdul pot exposar dades sensibles. Si no el necessiteu, desactiveu-lo. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=S'ha habilitat un mòdul dissenyat per al desenvolupament. No l'activeu en un entorn de producció. CombinationsSeparator=Caràcter separador per a combinacions de productes SeeLinkToOnlineDocumentation=Vegeu l'enllaç a la documentació en línia al menú superior per a obtenir exemples SHOW_SUBPRODUCT_REF_IN_PDF=Si s'utilitza la funció "%s" del mòdul <b> %s </b>, mostra els detalls dels subproductes d'un kit en el PDF. AskThisIDToYourBank=Poseu-vos en contacte amb el vostre banc per a obtenir aquesta identificació +AdvancedModeOnly=El permís està disponible només en mode de permís avançat +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Organització d'esdeveniments +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ca_ES/banks.lang b/htdocs/langs/ca_ES/banks.lang index a8562e1ab57..1b1c9b5c1fc 100644 --- a/htdocs/langs/ca_ES/banks.lang +++ b/htdocs/langs/ca_ES/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=La vostra ordre SEPA FindYourSEPAMandate=Aquest és el vostre mandat SEPA per a autoritzar la nostra empresa a fer una ordre de domiciliació bancària al vostre banc. Torneu-lo signat (escaneja el document signat) o envieu-lo per correu electrònic a AutoReportLastAccountStatement=Ompliu automàticament el camp "nombre d'extracte bancari" amb l'últim número de l'extracte al fer la conciliació CashControl=Control de caixa TPV -NewCashFence=Tancament de caixa nou +NewCashFence=New cash desk opening or closing BankColorizeMovement=Color de moviments BankColorizeMovementDesc=Si aquesta funció està habilitada, podeu triar un color de fons específic per als moviments de dèbit o de crèdit BankColorizeMovementName1=Color de fons pel moviment de dèbit BankColorizeMovementName2=Color de fons pel moviment de crèdit IfYouDontReconcileDisableProperty=Si no feu cap conciliació bancària en alguns comptes bancaris, desactiveu la propietat "%s" per a eliminar aquest advertiment. NoBankAccountDefined=No s'ha definit cap compte bancari +NoRecordFoundIBankcAccount=No s'ha trobat cap registre al compte bancari. Normalment, això passa quan un registre s’ha suprimit manualment de la llista de transaccions del compte bancari (per exemple, durant una conciliació del compte bancari). Una altra raó és que el pagament es va registrar quan es va desactivar el mòdul "%s". diff --git a/htdocs/langs/ca_ES/bills.lang b/htdocs/langs/ca_ES/bills.lang index 01a98bf0260..bdcd870106f 100644 --- a/htdocs/langs/ca_ES/bills.lang +++ b/htdocs/langs/ca_ES/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Factura a client CustomerInvoice=Factura a client CustomersInvoices=Factures a clients SupplierInvoice=Factura del proveïdor -SuppliersInvoices=Factures de proveïdors +SuppliersInvoices=Factures de proveïdor +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Factura del proveïdor -SupplierBills=Factures de proveïdors +SupplierBills=Factures de proveïdor Payment=Pagament PaymentBack=Devolució CustomerInvoicePaymentBack=Devolució @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pagaments efectuats PaymentsBackAlreadyDone=Devolucions realitzades PaymentRule=Regla de pagament PaymentMode=Forma de pagament +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Dèbit/Crèdit Tarja PaymentTypePP=PayPal IdPaymentMode=Forma de pagament (Id) @@ -145,8 +148,8 @@ BillShortStatusClosedUnpaid=Tancada BillShortStatusClosedPaidPartially=Pagada (parcial) PaymentStatusToValidShort=A validar ErrorVATIntraNotConfigured=NIF intracomunitari encara no definit -ErrorNoPaiementModeConfigured=No s'ha definit la forma de pagament per defecte. Ves a la configuració del mòdul Factures per corregir-ho. -ErrorCreateBankAccount=Crea un compte bancari i després ves al panell de configuració del mòdul Factures per definir les formes de pagament +ErrorNoPaiementModeConfigured=No s'ha definit cap forma de pagament predeterminada. Aneu a Configuració del mòdul de factures per a solucionar-ho. +ErrorCreateBankAccount=Creeu un compte bancari i aneu al tauler Configuració del mòdul Factura per a definir les formes de pagament ErrorBillNotFound=Factura %s inexistent ErrorInvoiceAlreadyReplaced=Error, vol validar una factura que rectifica la factura %s. Però aquesta última ja està rectificada per la factura %s. ErrorDiscountAlreadyUsed=Error, el descompte ja s'està utilitzant @@ -191,7 +194,7 @@ ConfirmClassifyPaidPartiallyReasonDiscountVat=La resta a pagar <b>(%s %s)</b> é ConfirmClassifyPaidPartiallyReasonBadCustomer=Client morós ConfirmClassifyPaidPartiallyReasonProductReturned=Productes retornats en part ConfirmClassifyPaidPartiallyReasonOther=D'altra raó -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Aquesta opció és possible si la teva factura s'ha proporcionat amb comentaris adequats. (Exemple «Només l'impost corresponent al preu realment pagat dóna dret a la deducció») +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Aquesta opció és possible si la vostra factura ha rebut els comentaris adequats. (Exemple «Només l'impost corresponent al preu realment pagat dona dret a la deducció») ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=En alguns països, aquesta opció només és possible si la factura conté les notes correctes. ConfirmClassifyPaidPartiallyReasonAvoirDesc=Aquesta elecció és l'elecció que s'ha de prendre si les altres no són aplicables ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=Un <b> client morós </b> és un client que es nega a pagar el seu deute. @@ -225,7 +228,7 @@ setPaymentConditionsShortRetainedWarranty=Definiu els termes de pagament de la g setretainedwarranty=Estableix la garantia retinguda setretainedwarrantyDateLimit=Estableix el límit de data de garantia conservada RetainedWarrantyDateLimit=Data límit de garantia retinguda -RetainedWarrantyNeed100Percent=La factura de situació ha d’estar al progrés 100%% per mostrar-se en PDF +RetainedWarrantyNeed100Percent=La factura de situació ha d’estar amb progrés 100%% per a mostrar-se en PDF AlreadyPaid=Ja pagat AlreadyPaidBack=Ja reemborsat AlreadyPaidNoCreditNotesNoDeposits=Ja pagat (exclosos els abonaments i bestretes) @@ -252,7 +255,7 @@ SendReminderBillByMail=Envia recordatori per e-mail RelatedCommercialProposals=Pressupostos relacionats RelatedRecurringCustomerInvoices=Factures recurrents de client relacionades MenuToValid=A validar -DateMaxPayment=Pagament vençut +DateMaxPayment=Venciment de pagament DateInvoice=Data facturació DatePointOfTax=Punt d'impostos NoInvoice=Cap factura @@ -358,7 +361,7 @@ ListOfPreviousSituationInvoices=Llista de factures de situació anteriors ListOfNextSituationInvoices=Llista de factures de situació següents ListOfSituationInvoices=Llista de factures de situació CurrentSituationTotal=Situació actual total -DisabledBecauseNotEnouthCreditNote=Per eliminar una factura de situació del cicle, el total de la nota de crèdit d'aquesta factura ha de cobrir aquest total de la factura +DisabledBecauseNotEnouthCreditNote=Per a eliminar una factura de situació del cicle, el total de la nota de crèdit d'aquesta factura ha de cobrir aquest total de factura RemoveSituationFromCycle=Treu aquesta factura del cicle ConfirmRemoveSituationFromCycle=Vols eliminar aquesta factura %s del cicle? ConfirmOuting=Confirma la sortida @@ -373,6 +376,7 @@ DateLastGeneration=Data de l'última generació DateLastGenerationShort=Data última gen. MaxPeriodNumber=Màx. nombre de generació de factures NbOfGenerationDone=Nombre de generació de factura ja realitzat +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Número de generació realitzat MaxGenerationReached=Nombre màxim de generacions assolides InvoiceAutoValidate=Valida les factures automàticament @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=En els 14 dies següents a final de mes FixAmount=Import fixe: 1 línia amb l'etiqueta '%s' VarAmount=Import variable (%% total) VarAmountOneLine=Quantitat variable (%% tot.) - 1 línia amb l'etiqueta '%s' -VarAmountAllLines=Import variable (%% tot.): Totes les mateixes línies +VarAmountAllLines=Import variable (%% tot.): Totes les línies des de l'origen # PaymentType PaymentTypeVIR=Transferència bancària PaymentTypeShortVIR=Transferència bancària @@ -494,12 +498,16 @@ Cash=Efectiu Reported=Ajornat DisabledBecausePayments=No disponible ja que hi ha pagaments CantRemovePaymentWithOneInvoicePaid=Eliminació impossible quan hi ha almenys una factura classificada com a pagada. +CantRemovePaymentVATPaid=No es pot eliminar el pagament ja que la declaració de l'IVA està classificada com a pagada +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Esperant el pagament CantRemoveConciliatedPayment=No es pot eliminar el pagament reconciliat PayedByThisPayment=Pagada per aquest pagament ClosePaidInvoicesAutomatically=Classifiqueu automàticament totes les factures estàndard, de pagament inicial o de reemplaçament com a "Pagades" quan el pagament es realitzi completament. ClosePaidCreditNotesAutomatically=Classifiqueu automàticament totes les notes de crèdit com a "Pagades" quan es faci la devolució íntegra. ClosePaidContributionsAutomatically=Classifiqueu automàticament totes les contribucions socials o fiscals com a "Pagades" quan el pagament es realitzi íntegrament. +ClosePaidVATAutomatically=Classifica automàticament la declaració d'IVA com a "Pagada" quan el pagament es realitzi completament. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Totes les factures no pendents de pagament es tancaran automàticament amb l'estat "Pagat". ToMakePayment=Pagar ToMakePaymentBack=Reemborsar @@ -508,14 +516,14 @@ NoteListOfYourUnpaidInvoices=Nota: Aquest llistat només conté factures de terc RevenueStamp=Segell fiscal YouMustCreateInvoiceFromThird=Aquesta opció només està disponible al moment de crear una factura des de la llengüeta "Client" de tercers YouMustCreateInvoiceFromSupplierThird=Aquesta opció només està disponible quan es crea la factura des de la pestanya "proveïdor" d'un tercer -YouMustCreateStandardInvoiceFirstDesc=Primer has de crear una factura estàndard i convertir-la en "plantilla" per crear una nova plantilla de factura +YouMustCreateStandardInvoiceFirstDesc=Primer heu de crear una factura estàndard i convertir-la a "plantilla" per a crear una nova plantilla de factura PDFCrabeDescription=Plantilla de factura PDF Crabe. Una plantilla de factura completa (implementació antiga de la plantilla Sponge) PDFSpongeDescription=Plantilla PDF de factures Sponge. Una plantilla de factura completa PDFCrevetteDescription=Plantilla Crevette per factures PDF. Una plantilla de factura completa per factures de situació. -TerreNumRefModelDesc1=Retorna el nombre sota el format %syymm-nnnn per a les factures i %syymm-nnnn per als abonaments on yy és l'any, mm. el mes i nnnn un comptador seqüencial sense ruptura i sense permanència a 0 -MarsNumRefModelDesc1=Retorna el nombre sota el format %syymm-nnnn per a les factures, %syymm-nnnn per a les factures rectificatives, %syymm-nnnn per a les factures de dipòsit i %syymm-nnnn pels abonaments on yy és l'any, mm el mes i nnnn un comptador seqüencial sense ruptura i sense retorn a 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Ja existeix una factura que comença amb $syymm i no és compatible amb aquest model de seqüència. Elimineu-la o canvieu-li el nom per a activar aquest mòdul. -CactusNumRefModelDesc1=Retorna un número amb format %syymm-nnnn per a factures estàndard, %syymm-nnnn per a devolucions i %syymm-nnnn per a factures de dipòsits anticipats on yy es l'any, mm és el mes i nnnn és una seqüència sense ruptura i sense retorn a 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Motiu de tancament anticipat EarlyClosingComment=Nota de tancament anticipat ##### Types de contacts ##### @@ -556,13 +564,14 @@ PDFCrevetteSituationInvoiceLine=Situació N°%s : Inv. N°%s a %s TotalSituationInvoice=Total situació invoiceLineProgressError=El progrés de la línia de factura no pot ser igual o superior a la següent línia de factura updatePriceNextInvoiceErrorUpdateline=Error : actualització de preu en línia de factura : %s -ToCreateARecurringInvoice=Per crear una factura recurrent d'aquest contracte, primer crea aquesta factura esborrany, després converteix-la en una plantilla de factura i defineix la freqüència per a la generació de factures futures. +ToCreateARecurringInvoice=Per a crear una factura recurrent per a aquest contracte, primer creeu aquest esborrany de factura, després convertiu-lo en una plantilla de factura i definiu la freqüència de generació de futures factures. ToCreateARecurringInvoiceGene=Per a generar futures factures regularment i manualment, només cal que aneu al menú <strong> %s - %s - %s </strong>. ToCreateARecurringInvoiceGeneAuto=Si necessites tenir cada factura generada automàticament, pregunta a l'administrador per habilitar i configurar el mòdul <strong>%s</strong>. Tingues en compte que ambdós mètodes (manual i automàtic) es poden utilitzar alhora sense risc de duplicats. DeleteRepeatableInvoice=Elimina la factura recurrent ConfirmDeleteRepeatableInvoice=Vols eliminar la plantilla de factura? CreateOneBillByThird=Agrupa una factura per tercer (sinó, una factura per comanda) -BillCreated=%s factura(es) creades +BillCreated=%s factures generades +BillXCreated=Factura generada %s 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 37668884c7a..4c9e0642afc 100644 --- a/htdocs/langs/ca_ES/boxes.lang +++ b/htdocs/langs/ca_ES/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Estadístiques sobre els principals objectes de negoci de la base de dades BoxLoginInformation=Informació d'inici de sessió BoxLastRssInfos=Informació RSS BoxLastProducts=Últims %s Productes/Serveis @@ -17,9 +18,13 @@ BoxLastActions=Últimes accions BoxLastContracts=Últims contractes BoxLastContacts=Últims contactes/adreces BoxLastMembers=Últims socis +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Últimes intervencions BoxCurrentAccounts=Balanç de comptes oberts BoxTitleMemberNextBirthdays=Aniversaris d'aquest mes (membres) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Últimes %s notícies de %s BoxTitleLastProducts=Productes / Serveis: últims %s modificats BoxTitleProductsAlertStock=Productes: alerta d'estoc @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Últims %s enviaments de clients NoRecordedShipments=Cap enviament de client registrat BoxCustomersOutstandingBillReached=Clients que superen el límit pendent # Pages -AccountancyHome=Comptabilitat +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Projectes validats diff --git a/htdocs/langs/ca_ES/categories.lang b/htdocs/langs/ca_ES/categories.lang index 195fe0a4157..5c202697ee7 100644 --- a/htdocs/langs/ca_ES/categories.lang +++ b/htdocs/langs/ca_ES/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Àrea d'etiquetes de proveïdors CustomersCategoriesArea=Àrea d'etiquetes de clients MembersCategoriesArea=Àrea d'etiquetes de socis ContactsCategoriesArea=Àrea d'etiquetes de contactes -AccountsCategoriesArea=Àrea d'etiquetes de comptes +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Àrea d'etiquetes de projectes UsersCategoriesArea=Àrea d'etiquetes d'usuaris SubCats=Subcategories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assigna la categoria al proveïdor ShowCategory=Mostra etiqueta ByDefaultInList=Per defecte en el llistat ChooseCategory=Tria la categoria -StocksCategoriesArea=Categories de magatzems -ActionCommCategoriesArea=Categories d'esdeveniments +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Categories de Pàgines/Contenidors UseOrOperatorForCategories=Us o operador per categories diff --git a/htdocs/langs/ca_ES/companies.lang b/htdocs/langs/ca_ES/companies.lang index 0125a802bf8..fd9f867eb34 100644 --- a/htdocs/langs/ca_ES/companies.lang +++ b/htdocs/langs/ca_ES/companies.lang @@ -23,7 +23,7 @@ ThirdPartyContacts=Àrea de tercers i contactes ThirdPartyContact=Àrea d'adreces de tercers i contactes Company=Empresa CompanyName=Raó social -AliasNames=Àlies (nom comercial, marca, ...) +AliasNames=Àlies (nom comercial, marca...) AliasNameShort=Nom comercial Companies=Empreses CountryIsInEEC=El país es troba dins de la Comunitat Econòmica Europea @@ -43,8 +43,9 @@ Individual=Particular ToCreateContactWithSameName=Es crearà un contacte/adreça automàticament amb la mateixa informació que el tercer d'acord amb el propi tercer. En la majoria de casos, fins i tot si el tercer és una persona física, la creació d'un sol tercer ja és suficient. ParentCompany=Seu Central Subsidiaries=Filials -ReportByMonth=Informe per mes +ReportByMonth=Report per month ReportByCustomers=Informe per client +ReportByThirdparties=Report per thirdparty ReportByQuarter=Informe per taxa CivilityCode=Codi cortesia RegisteredOffice=Domicili social @@ -172,14 +173,20 @@ ProfId1ES=CIF/NIF ProfId2ES=Núm. seguretat social ProfId3ES=CNAE ProfId4ES=Núm. col·legiat -ProfId5ES=Número EORI +ProfId5ES=Prof Id 5 (número EORI) ProfId6ES=- ProfId1FR=CIF/NIF ProfId2FR=Núm. seguretat social ProfId3FR=CNAE ProfId4FR=RCS/RM -ProfId5FR=Número EORI +ProfId5FR=Prof Id 5 (número EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Número registre ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=Número EORI +ProfId6IT=- ProfId1LU=CIF/NIF (R.C.S. Luxemburg) ProfId2LU=Núm. S.S. (permís comercial) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=CIF/NIF ProfId2PT=Núm. seguretat social ProfId3PT=CNAE ProfId4PT=Conservatori -ProfId5PT=Número EORI +ProfId5PT=Prof Id 5 (número EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=CUI ProfId2RO=Núm. Enmatriculare ProfId3RO=CAEN ProfId4RO=EUID -ProfId5RO=Número EORI +ProfId5RO=Prof Id 5 (número EORI) ProfId6RO=- ProfId1RU=CIF/NIF ProfId2RU=Núm. seguretat social @@ -359,7 +367,7 @@ VATIntraManualCheck=També podeu verificar-ho manualment al lloc web de la Comis ErrorVATCheckMS_UNAVAILABLE=Comprovació impossible. El servei de comprovació no és prestat pel país membre (%s). NorProspectNorCustomer=Ni client, ni client potencial JuridicalStatus=Tipus d'entitat empresarial -Workforce=Força de treball +Workforce=Nombre d'empleats Staff=Empleats ProspectLevelShort=Potencial ProspectLevel=Nivell de client potencial @@ -426,7 +434,7 @@ SocialNetworksInstagramURL=URL d’Instagram SocialNetworksYoutubeURL=URL de Youtube SocialNetworksGithubURL=URL de Github YouMustAssignUserMailFirst=Has de crear un correu electrònic per aquest usuari abans d'afegir notificacions de correu electrònic per ell. -YouMustCreateContactFirst=Per poder afegir notificacions de correu electrònic, en primer lloc s'ha de definir contactes amb correu electrònic vàlid pel tercer +YouMustCreateContactFirst=Per a poder afegir notificacions per correu electrònic, primer heu de definir els contactes amb correus electrònics vàlids per al tercer ListSuppliersShort=Llistat de proveïdors ListProspectsShort=Llistat de clients potencials ListCustomersShort=Llistat de clients @@ -441,7 +449,7 @@ CurrentOutstandingBill=Factura pendent actual OutstandingBill=Max. de factures pendents OutstandingBillReached=S'ha arribat al màx. de factures pendents OrderMinAmount=Import mínim per comanda -MonkeyNumRefModelDesc=Retorna número amb format %syymm-nnnn per a codi de client i %syymm-nnnn per a codi de proveïdor on yy és any, mm és mes i nnnn és una seqüència sense trencament i sense tornar a 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=El codi és lliure. Aquest codi es pot modificar en qualsevol moment. ManagingDirectors=Nom del gerent(s) (CEO, director, president ...) MergeOriginThirdparty=Duplicar tercer (tercer que vols eliminar) diff --git a/htdocs/langs/ca_ES/compta.lang b/htdocs/langs/ca_ES/compta.lang index 36c3821c1be..3ae4522a649 100644 --- a/htdocs/langs/ca_ES/compta.lang +++ b/htdocs/langs/ca_ES/compta.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - compta MenuFinancial=Financera -TaxModuleSetupToModifyRules=Ves a la <a href="%s">Configuració mòdul impostos</a> per modificar les regles de càlcul -TaxModuleSetupToModifyRulesLT=Ves a la <a href="%s">Configuració de l'empresa</a> per modificar les regles de càlcul +TaxModuleSetupToModifyRules=Aneu a <a href="%s"> Configuració del mòdul Impostos </a> per a modificar les regles de càlcul +TaxModuleSetupToModifyRulesLT=Aneu a <a href="%s"> Configuració de l'empresa </a> per a modificar les regles de càlcul OptionMode=Opció de gestió comptable OptionModeTrue=Opció Ingressos-Despeses OptionModeVirtual=Opció Crèdits-Deutes @@ -65,6 +65,7 @@ LT2SupplierIN=Compres IRPF VATCollected=IVA recuperat StatusToPay=A pagar SpecialExpensesArea=Àrea per tots els pagaments especials +VATExpensesArea=Àrea per a tots els pagaments d'IVA SocialContribution=Impost varis SocialContributions=Impostos varis SocialContributionsDeductibles=Impostos varis deduïbles @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Cobrament factura a client PaymentSupplierInvoice=Pagament de la factura del proveïdor PaymentSocialContribution=Pagament d'impost varis PaymentVat=Pagament IVA +AutomaticCreationPayment=Automatically record the payment ListPayment=Llistat de pagaments ListOfCustomerPayments=Llistat de cobraments de clients ListOfSupplierPayments=Llista de pagaments a proveïdors @@ -104,6 +106,8 @@ LT2PaymentES=Pagament IRPF LT2PaymentsES=Pagaments IRPF VATPayment=Pagament d'impost de vendes VATPayments=Pagaments d'impost de vendes +VATDeclarations=Declaracions d’IVA +VATDeclaration=Declaració d'IVA VATRefund=Devolució IVA NewVATPayment=Pagament nou de l'impost sobre les vendes NewLocalTaxPayment=Pagament nou d'impostos %s @@ -134,9 +138,17 @@ NoWaitingChecks=Sense xecs en espera de l'ingrés. DateChequeReceived=Data recepció del xec NbOfCheques=Nombre de xecs PaySocialContribution=Pagar un impost varis -ConfirmPaySocialContribution=Esteu segur de voler classificar aquest impost varis com a pagat? +PayVAT=Paga una declaració d’IVA +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Esteu segur que voleu classificar aquest impost varis com a pagat? +ConfirmPayVAT=Esteu segur que voleu classificar aquesta declaració d'IVA com a pagada? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Elimina un pagament d'impost varis -ConfirmDeleteSocialContribution=Esteu segur de voler eliminar el pagament d'aquest impost varis? +DeleteVAT=Suprimeix una declaració d’IVA +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Esteu segur que voleu suprimir aquest pagament d'impostos varis? +ConfirmDeleteVAT=Esteu segur que voleu suprimir aquesta declaració d'IVA? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Impostos varis i pagaments CalcModeVATDebt=Mode d'<b>%sIVA sobre comptabilitat de compromís%s </b>. CalcModeVATEngagement=Mode d'<b>%sIVA sobre ingressos-despeses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Inclou els pagaments reals realitzats en les factures, les de RulesCADue=- Inclou les factures degudes al client tant si són pagades com si no. <br> - Es basa en la data de facturació d'aquestes factures. <br> RulesCAIn=- Inclou tots els pagaments efectius de factures rebuts dels clients. <br> - Es basa en la data de pagament d'aquestes factures <br> RulesCATotalSaleJournal=Inclou totes les línies de crèdit del Diari de venda. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Inclou un registre al vostre Llibre Major amb comptes comptables que tenen el grup "DESPESA" o "INGRÉS" RulesResultBookkeepingPredefined=Inclou un registre al vostre Llibre Major amb comptes comptables que tenen el grup "DESPESA" o "INGRÉS" RulesResultBookkeepingPersonalized=Mostra un registre al vostre Llibre Major amb comptes comptables <b> agrupats per grups personalitzats </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Informe d'impostos sobre vendes per tercers VATReportByCustomers=Informe d'IVA sobre vendes per client VATReportByCustomersInInputOutputMode=Informe per clients d'IVA cobrat i pagat VATReportByQuartersInInputOutputMode=Taxa impositiva d'informe per vendes de l'impost recaptat i pagat +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Informe impost 2 per tipus LT2ReportByQuarters=Informe impost 3 per tipus LT1ReportByQuartersES=Informe per taxa de RE @@ -217,11 +231,11 @@ Pcg_subtype=Subtipus de compte InvoiceLinesToDispatch=Línies de factures a desglossar ByProductsAndServices=Per producte i servei RefExt=Ref. externa -ToCreateAPredefinedInvoice=Per crear una plantilla de factura, crea una factura estàndard, i després, sense validar-la, fes clic al botó "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Enllaçar a una comanda Mode1=Mètode 1 Mode2=Mètode 2 -CalculationRuleDesc=Per calcular la totalitat de l'IVA, hi ha dos mètodes:<br>Mètode 1 és l'arrodoniment de l'IVA en cada línia, llavors es sumen-<br>Mètode 2 és la suma de tot l'IVA en cada línia, a continuació, arrodonint el resultat.<br>.El resultat final pot difereix uns pocs centaus. El mètode per defecte és <b>% s</b>. +CalculationRuleDesc=Per a calcular l'IVA total, hi ha dos mètodes: <br>El mètode 1 és arrodonir l'IVA a cada línia i, a continuació, sumar-los. <br>El mètode 2 suma totes els IVA de cada línia i, a continuació, arrodoneix el resultat. <br>El resultat final pot diferir de pocs cèntims. El mode per defecte és el mode <b>%s</b>. CalculationRuleDescSupplier=Segons el proveïdor, seleccioneu el mètode adequat per aplicar la mateixa regla de càlcul i obtenir el mateix resultat esperat pel vostre proveïdor. TurnoverPerProductInCommitmentAccountingNotRelevant=L'informe de volum de negocis cobrat per producte no està disponible. Aquest informe només està disponible per a la facturació facturada. TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=L'informe del volum de negocis cobrat per la venda no està disponible. Aquest informe només està disponible per a la facturació facturada. @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=El compte comptable dedicat definit a la fitxa ACCOUNTING_ACCOUNT_SUPPLIER=Compte de comptabilitat utilitzat per tercers proveïdors ACCOUNTING_ACCOUNT_SUPPLIER_Desc=El compte comptable dedicat definit a la fitxa de tercers només s'utilitzarà per al Llibre Major. Aquest serà utilitzat pel Llibre Major i com a valor predeterminat del subcompte si no es defineix un compte comptable a la fitxa del tercer. ConfirmCloneTax=Confirma el clonat d'un impost social / fiscal +ConfirmCloneVAT=Confirma la còpia d’una declaració d’IVA +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clonar-la pel pròxim mes SimpleReport=Informe simple AddExtraReport=Informes addicionals (afegeix l'informe de clients nacionals i estrangers) @@ -253,7 +269,8 @@ AccountingAffectation=Assignació de comptes LastDayTaxIsRelatedTo=Últim dia del període al qual està relacionat l'impost VATDue=Impost sobre vendes reclamat ClaimedForThisPeriod=Reclamat per al període -PaidDuringThisPeriod=Pagat durant aquest període +PaidDuringThisPeriod=Pagat per aquest període +PaidDuringThisPeriodDesc=Es tracta de la suma de tots els pagaments vinculats a declaracions d’IVA que tenen una data de finalització del període a l’interval de dates seleccionat ByVatRate=Per de l'impost sobre vendes TurnoverbyVatrate=Facturació facturada pel tipus d'impost sobre la venda TurnoverCollectedbyVatrate=Facturació recaptada pel tipus d'impost sobre la venda @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Volum de compres recollit RulesPurchaseTurnoverDue=- Inclou les factures pendents del proveïdor, tant si es paguen com si no. <br>- Es basa en la data de factura d'aquestes factures.<br> RulesPurchaseTurnoverIn=- Inclou tots els pagaments realitzats de les factures de proveïdors. <br> - Es basa en la data de pagament d’aquestes factures <br> RulesPurchaseTurnoverTotalPurchaseJournal=Inclou totes les línies de dèbit del diari de compra. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Volum de compres facturat ReportPurchaseTurnoverCollected=Volum de compres recollit IncludeVarpaysInResults = Incloure varis pagaments als informes diff --git a/htdocs/langs/ca_ES/ecm.lang b/htdocs/langs/ca_ES/ecm.lang index 4f27a022b9e..c69f252d2af 100644 --- a/htdocs/langs/ca_ES/ecm.lang +++ b/htdocs/langs/ca_ES/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Fitxer encara no indexat a la base de dades (intente ExtraFieldsEcmFiles=Atributs addicionals dels fitxers ECM ExtraFieldsEcmDirectories=Atributs addicionals dels directoris ECM ECMSetup=Configuració de l'ECM +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index 26ff6a8f8bd..deda3b33027 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -12,10 +12,10 @@ ErrorRefAlreadyExists=La referència <b> %s </b> ja existeix. ErrorLoginAlreadyExists=El nom d'usuari %s ja existeix. ErrorGroupAlreadyExists=El grup %s ja existeix. ErrorRecordNotFound=Registre no trobat -ErrorFailToCopyFile=Error al copiar l'arxiu '<b>%s</b>' a '<b>%s</b>'. -ErrorFailToCopyDir=Error al copiar el directori '<b>%s</b>' en '<b>%s</b>'. +ErrorFailToCopyFile=No s'ha pogut copiar el fitxer "<b> %s </b>" a "<b> %s </b>". +ErrorFailToCopyDir=No s'ha pogut copiar el directori '<b> %s </b>' a '<b> %s </b>'. ErrorFailToRenameFile=Error al renomenar l'arxiu '<b>%s</b>' a '<b>%s</b>'. -ErrorFailToDeleteFile=Error al suprimir el fitxer '<b>%s</b>'. +ErrorFailToDeleteFile=No s'ha pogut eliminar el fitxer "<b> %s </b>". ErrorFailToCreateFile=Error al crear l'arxiu '<b>%s</b>' ErrorFailToRenameDir=Error al renomenar la carpeta '<b>%s</b>' a '<b>%s</b>'. ErrorFailToCreateDir=Error al crear la carpeta '<b>%s</b>' @@ -42,7 +42,7 @@ ErrorWrongParameters=Falten paràmetres o són incorrectes ErrorBadValueForParameter=Valor incorrecte '%s' del paràmetre '%s' ErrorBadImageFormat=El fitxer d'imatge no té un format compatible (el vostre PHP no admet funcions per convertir imatges d'aquest format) ErrorBadDateFormat=El valor '%s' té un format de data no reconegut -ErrorWrongDate=La data no es correcta! +ErrorWrongDate=La data no és correcta. ErrorFailedToWriteInDir=No es pot escriure a la carpeta %s ErrorFoundBadEmailInFile=S'ha trobat una sintaxi incorrecta del correu electrònic per a les línies %s al fitxer (exemple de la línia %s amb email=%s) ErrorUserCannotBeDelete=No es pot eliminar l'usuari. És possible que estigui relacionat amb entitats de Dolibarr. @@ -59,6 +59,7 @@ ErrorDirNotFound=Directori <b>%s</b> no trobat (Ruta incorrecta, permisos inadeq ErrorFunctionNotAvailableInPHP=La funció <b>%s</b> és requerida per aquesta característica, però no es troba disponible en aquesta versió/instal·lació de PHP. ErrorDirAlreadyExists=Ja existeix una carpeta amb aquest nom. ErrorFileAlreadyExists=Ja existeix un fitxer amb aquest nom. +ErrorDestinationAlreadyExists=Ja existeix un altre fitxer amb el nom <b> %s </b>. ErrorPartialFile=Arxiu no rebut íntegrament pel servidor. ErrorNoTmpDir=Directori temporal de recepció %s inexistent ErrorUploadBlockedByAddon=Càrrega bloquejada per un connector PHP/Apache. @@ -76,14 +77,14 @@ ErrorFieldMustHaveXChar=El camp <b> %s </b> ha de tenir com a mínim %s caràcte ErrorNoAccountancyModuleLoaded=Mòdul de comptabilitat no activat ErrorExportDuplicateProfil=El nom d'aquest perfil ja existeix per aquest conjunt d'exportació ErrorLDAPSetupNotComplete=La configuració Dolibarr-LDAP és incompleta. -ErrorLDAPMakeManualTest=S'ha generat un fitxer .ldif al directori %s. Proveu de carregar-lo manualment des de la línia de comandes per a obtenir més informació sobre els errors. +ErrorLDAPMakeManualTest=S'ha generat un fitxer .ldif al directori %s. Proveu de carregar-lo manualment des de la línia d'ordres per a obtenir més informació sobre els errors. ErrorCantSaveADoneUserWithZeroPercentage=No es pot desar una acció amb "estat no iniciat" si el camp "fet per" també s'omple. ErrorRefAlreadyExists=La referència <b> %s </b> ja existeix. ErrorPleaseTypeBankTransactionReportName=Introduïu el nom de l’extracte bancari on s’ha d’informar de l’entrada (format AAAAAMM o AAAAAMMDD) ErrorRecordHasChildren=No s'ha pogut eliminar el registre, ja que té alguns registres fills. ErrorRecordHasAtLeastOneChildOfType=L'objecte té almenys un fill de tipus %s ErrorRecordIsUsedCantDelete=No es pot eliminar el registre. Ja s'utilitza o s'inclou en un altre objecte. -ErrorModuleRequireJavascript=Javascript ha d'estar activat per a que aquesta opció pugui utilitzar-se. Per activar/desactivar JavaScript, ves al menú Inici->Configuració->Entorn. +ErrorModuleRequireJavascript=No s’ha de desactivar Javascript perquè funcioni aquesta funció. Per a activar/desactivar Javascript, aneu al menú Inici-> Configuració->Entorn. ErrorPasswordsMustMatch=Les 2 contrasenyes indicades s'han de correspondre ErrorContactEMail=S'ha produït un error tècnic. Si us plau, contacteu amb l'administrador al següent correu electrònic <b> %s </b> i proporcioneu el codi d'error <b> %s </b> al vostre missatge o afegiu una còpia de la pantalla d'aquesta pàgina. ErrorWrongValueForField=Camp <b> %s </b>: '<b> %s </b>' no coincideix amb la regla regex <b> %s </b> @@ -92,10 +93,10 @@ ErrorFieldRefNotIn=Camp <b> %s </b>: '<b> %s </b>' no és un <b> %s </b> ref act ErrorsOnXLines=S'han trobat %s errors ErrorFileIsInfectedWithAVirus=L'antivirus no ha pogut validar aquest arxiu (és probable que estigui infectat per un virus)! ErrorSpecialCharNotAllowedForField=Els caràcters especials no són admesos pel camp "%s" -ErrorNumRefModel=Hi ha una referència a la base de dades (%s) i és incompatible amb aquesta numeració. Elimineu la línia o renomeneu la referència per activar aquest mòdul. +ErrorNumRefModel=Hi ha una referència a la base de dades (%s) i no és compatible amb aquesta regla de numeració. Elimineu el registre o canvieu el nom de referència per a activar aquest mòdul. ErrorQtyTooLowForThisSupplier=Quantitat massa baixa per aquest proveïdor o sense un preu definit en aquest producte per aquest proveïdor ErrorOrdersNotCreatedQtyTooLow=Algunes ordres no s'han creat a causa de quantitats massa baixes -ErrorModuleSetupNotComplete=La configuració del mòdul %s sembla incompleta. Vés a Inici: Configuració - Mòduls per completar. +ErrorModuleSetupNotComplete=La configuració del mòdul %s sembla incompleta. Aneu a Inici - Configuració - Mòduls per a completar. ErrorBadMask=Error en la màscara ErrorBadMaskFailedToLocatePosOfSequence=Error, sense número de seqüència en la màscara ErrorBadMaskBadRazMonth=Error, valor de tornada a 0 incorrecte @@ -141,9 +142,9 @@ ErrorToConnectToMysqlCheckInstance=Error de connexió amb la base de dades. Comp ErrorFailedToAddContact=Error en l'addició del contacte 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. +ErrorPaymentModeDefinedToWithoutSetup=S'ha definit una forma de pagament al tipus %s, però la configuració del mòdul de factures no s'ha completat per a definir la informació que es mostrarà per a aquesta forma de pagament. ErrorPHPNeedModule=Error, el vostre PHP ha de tenir instal·lat el mòdul <b>%s</b> per a utilitzar aquesta funció. -ErrorOpenIDSetupNotComplete=Ha configurat Dolibarr per acceptar l'autentificació OpenID, però la URL del servei OpenID no es troba definida a la constant %s +ErrorOpenIDSetupNotComplete=Heu configurat el fitxer de configuració Dolibarr per a permetre l'autenticació OpenID, però l'URL del servei OpenID no es defineix en constant %s ErrorWarehouseMustDiffers=El magatzem d'origen i destí han de ser diferents ErrorBadFormat=El format és incorrecte! ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, aquest soci encara no s'ha enllaçat a un tercer. Enllaça el soci a un tercer existent o crea un tercer nou abans de crear la quota amb factura. @@ -173,7 +174,7 @@ ErrorPriceExpressionUnknown=Error desconegut '%s' ErrorSrcAndTargetWarehouseMustDiffers=Els magatzems d'origen i destí han de ser diferents ErrorTryToMakeMoveOnProductRequiringBatchData=Error, intentant fer un moviment d'estoc sense informació de lot/sèrie, al producte '%s' que requereix informació del lot o sèrie ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=Totes les recepcions han de verificar-se primer (acceptades o denegades) abans per realitzar aquesta acció -ErrorCantSetReceptionToTotalDoneWithReceptionDenied=Totes les recepcions han de verificar-se (acceptades) abans per poder-se realitzar a aquesta acció +ErrorCantSetReceptionToTotalDoneWithReceptionDenied=Totes les recepcions registrades han de ser verificades (aprovades) abans que se’ls permeti fer aquesta acció ErrorGlobalVariableUpdater0=Petició HTTP fallida amb error '%s' ErrorGlobalVariableUpdater1=Format JSON no vàlid "%s" ErrorGlobalVariableUpdater2=Falta el paràmetre '%s' @@ -202,7 +203,7 @@ ErrorFieldAccountNotDefinedForInvoiceLine=Value for Accounting account not defin ErrorFieldAccountNotDefinedForLine=Value for Accounting account not defined for the line (%s) ErrorBankStatementNameMustFollowRegex=Error, el nom del comunicat del banc deu de seguir la regla de sintaxis %s ErrorPhpMailDelivery=Comproveu que no feu servir un nombre massa elevat de destinataris i que el vostre contingut de correu electrònic no sigui similar a un correu brossa. Demaneu també al vostre administrador que comprovi el tallafocs i els fitxers de registre del servidor per a obtenir una informació més completa. -ErrorUserNotAssignedToTask=L'usuari ha d'estar assignat a la tasca per poder introduir el temps consumit. +ErrorUserNotAssignedToTask=Cal assignar l'usuari a la tasca per a poder introduir el temps consumit. ErrorTaskAlreadyAssigned=La tasca també està assignada a l'usuari ErrorModuleFileSeemsToHaveAWrongFormat=Pareix que el mòdul té un format incorrecte. ErrorModuleFileSeemsToHaveAWrongFormat2=Al ZIP d'un mòdul ha d'haver necessàriament com a mínim un d'aquests directoris: <strong>%s</strong> o <strong>%s</strong> @@ -211,7 +212,7 @@ ErrorDuplicateTrigger=Error, nom de disparador %s duplicat. Ja es troba carregat ErrorNoWarehouseDefined=Error, no hi ha magatzems definits. ErrorBadLinkSourceSetButBadValueForRef=L'enllaç que utilitzeu no és vàlid. Es defineix una "font" de pagament, però el valor de "ref" no és vàlid. ErrorTooManyErrorsProcessStopped=Too many errors. Process was stopped. -ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=No és possible la validació massiva quan s'estableix l'opció d'augmentar/disminuir l'estoc en aquesta acció (cal validar-ho un per un per poder definir el magatzem a augmentar/disminuir) +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=La validació massiva no és possible quan s’estableix l’opció d’augmentar/disminuir estoc en aquesta acció (heu de validar una per una perquè pugueu definir el magatzem a augmentar/disminuir) ErrorObjectMustHaveStatusDraftToBeValidated=L'objecte %s ha de tenir l'estat 'Esborrany' per ser validat. ErrorObjectMustHaveLinesToBeValidated=L'objecte %s ha de tenir línies per ser validat. ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Només es poden enviar factures validades mitjançant l'acció massiva "Enviar per correu electrònic". @@ -224,8 +225,9 @@ ErrorDescRequiredForFreeProductLines=La descripció és obligatòria per a líni ErrorAPageWithThisNameOrAliasAlreadyExists=La pàgina / contenidor <strong> %s </strong> té el mateix nom o àlies alternatiu que el que intenta utilitzar ErrorDuringChartLoad=S'ha produït un error en carregar el gràfic de comptes. Si pocs comptes no s'han carregat, podeu introduir-los manualment. ErrorBadSyntaxForParamKeyForContent=Sintaxi incorrecta per a la clau de contingut del paràmetre. Ha de tenir un valor que comenci per %s o %s -ErrorVariableKeyForContentMustBeSet=Error, s'ha d'establir la constant amb el nom %s (amb contingut de text per mostrar) o %s (amb url extern per mostrar). +ErrorVariableKeyForContentMustBeSet=Error, s’ha d’establir la constant amb el nom %s (amb el contingut de text a mostrar) o %s (amb una URL externa a mostrar). ErrorURLMustStartWithHttp=L'URL %s ha de començar amb http: // o https: // +ErrorHostMustNotStartWithHttp=El nom d'amfitrió %s NO ha de començar amb http: // o https: // ErrorNewRefIsAlreadyUsed=Error, la referència nova ja s’està utilitzant ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, l’eliminació del pagament vinculat a una factura tancada no és possible. ErrorSearchCriteriaTooSmall=Criteris de cerca massa petits. @@ -246,7 +248,7 @@ ErrorReplaceStringEmpty=Error, la cadena a on fer la substitució és buida ErrorProductNeedBatchNumber=Error, el producte '<b> %s </b>' necessita un número de lot/sèrie ErrorProductDoesNotNeedBatchNumber=Error, el producte '<b> %s </b>' no accepta un número de lot/sèrie ErrorFailedToReadObject=Error, no s'ha pogut llegir l'objecte del tipus <b> %s </b> -ErrorParameterMustBeEnabledToAllwoThisFeature=Error, el paràmetre <b> %s </b> s'ha d'activar a <b>conf/conf.php<b> per permetre l'ús de la interfície de línia d'ordres pel programador de treball intern +ErrorParameterMustBeEnabledToAllwoThisFeature=Error, el paràmetre <b> %s </b> s'ha d'activar a <b>conf/conf.php<b> per a permetre l'ús de la interfície de línia d'ordres pel programador de treball intern ErrorLoginDateValidity=Error, aquest inici de sessió està fora de l'interval de dates de validesa ErrorValueLength=La longitud del camp '<b> %s </b>' ha de ser superior a '<b> %s </b>' ErrorReservedKeyword=La paraula '<b> %s </b>' és una paraula clau reservada @@ -255,22 +257,26 @@ ErrorPublicInterfaceNotEnabled=La interfície pública no s'ha activat ErrorLanguageRequiredIfPageIsTranslationOfAnother=Cal definir l'idioma de la pàgina nova si es defineix com a traducció d'una altra pàgina ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=L'idioma de la pàgina nova no ha de ser l'idioma d'origen si s'estableix com a traducció d'una altra pàgina ErrorAParameterIsRequiredForThisOperation=Un paràmetre és obligatori per a aquesta operació +ErrorDateIsInFuture=Error, la data no pot ser en el futur +ErrorAnAmountWithoutTaxIsRequired=Error, l'import és obligatori +ErrorAPercentIsRequired=Error, empleneu el percentatge correctament +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # 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í +WarningPasswordSetWithNoAccount=S'ha establert una contrasenya per a aquest soci. Tot i això, no s'ha creat cap compte d'usuari. Per tant, aquesta contrasenya s’emmagatzema però no es pot utilitzar per a iniciar la sessió a Dolibarr. Pot ser utilitzat per un mòdul/interfície extern, però si no necessiteu definir cap inici de sessió ni contrasenya per a un soci, podeu desactivar l'opció "Gestiona un inici de sessió per a cada soci" des de la configuració del mòdul Socis. Si heu de gestionar un inici de sessió però no necessiteu cap contrasenya, podeu mantenir aquest camp buit per a evitar aquesta advertència. Nota: El correu electrònic també es pot utilitzar com a inici de sessió si el soci està enllaçat amb un usuari. WarningMandatorySetupNotComplete=Feu clic aquí per a configurar els paràmetres obligatoris -WarningEnableYourModulesApplications=Feu clic aquí per activar els vostres mòduls i aplicacions +WarningEnableYourModulesApplications=Feu clic aquí per a activar els vostres mòduls i aplicacions WarningSafeModeOnCheckExecDir=Atenció, està activada l'opció PHP <b>safe_mode</b>, la comanda ha d'estar dins d'un directori declarat dins del paràmetre php <b>safe_mode_exec_dir</b>. WarningBookmarkAlreadyExists=Ja existeix un marcador amb aquest títol o aquest URL. WarningPassIsEmpty=Atenció: La contrasenya de la base de dades està buida. Això és un forat de seguretat. Cal afegir una contrasenya a la seva base de dades i canviar el seu arxiu conf.php per reflectir això. WarningConfFileMustBeReadOnly=Atenció, el seu fitxer (<b>htdocs/conf/conf.php</b>) és accessible en escriptura al servidor web. Això representa un error seriós de seguretat. Modifiqueu els permisos per ser llegit únicament pel compte que executa el servidor Web.Si està executant Windows en undisco amb format FAT, sigui conscient que aquest sistema d'arxius no protegeix els arxius i no ofereix cap solució per reduir els riscos de manipulació d'aquest fitxer. WarningsOnXLines=Alertes a <b>%s</b> línies font -WarningNoDocumentModelActivated=No s'ha activat cap model, per a la generació de documents. Es seleccionarà un model per defecte fins que consulteu la configuració del vostre mòdul. +WarningNoDocumentModelActivated=No s'ha activat cap model per a la generació de documents. Per defecte s’escollirà un model fins que no comproveu la configuració del mòdul. WarningLockFileDoesNotExists=Avís, un cop finalitzada la instal·lació, heu de desactivar les eines d'instal·lació / migració afegint un fitxer <b> install.lock </b> al directori <b> %s </b>. Ometre la creació d'aquest fitxer suposa un greu risc de seguretat. WarningUntilDirRemoved=Totes les advertències de seguretat (visibles només pels usuaris administradors) romandran actives sempre que la vulnerabilitat estigui present (o aquesta constant MAIN_REMOVE_INSTALL_WARNING s'afegeix a la Configuració-> Configuració altra). WarningCloseAlways=Avís, el tancament és realitzat encara que la quantitat total difereixi entre els elements d'origen i destí. Activi aquesta funcionalitat amb precaució. -WarningUsingThisBoxSlowDown=Atenció, l'ús d'aquest panell provoca serioses alentiments en les pàgines que mostren aquest panell. +WarningUsingThisBoxSlowDown=Advertiment, si utilitzeu aquest quadre, alentireu seriosament totes les pàgines que mostren el quadre. WarningClickToDialUserSetupNotComplete=La configuració de ClickToDial per al compte d'usuari no està completa (vegeu la pestanya ClickToDial en la seva fitxa d'usuari) WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalitat deshabilitada quan la configuració de l'entorn està optimitzada per a persones cegues o navegadors de text. WarningPaymentDateLowerThanInvoiceDate=La data de pagament (%s) és anterior a la data (%s) de la factura %s. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Advertiment: no s'ha pogut afegir l'entr WarningTheHiddenOptionIsOn=Advertiment, l'opció oculta <b> %s </b> està activada. WarningCreateSubAccounts=Atenció, no podeu crear directament un subcompte, heu de crear un tercer o un usuari i assignar-los un codi comptable per a trobar-los en aquesta llista. WarningAvailableOnlyForHTTPSServers=Disponible només si s'utilitza una connexió segura HTTPS. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ca_ES/externalsite.lang b/htdocs/langs/ca_ES/externalsite.lang index de2a2d77050..3518d8c97ac 100644 --- a/htdocs/langs/ca_ES/externalsite.lang +++ b/htdocs/langs/ca_ES/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Configuració de l'enllaç a la pàgina web externa -ExternalSiteURL=URL del lloc extern +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=El mòdul Lloc web extern no ha estat configurat correctament. ExampleMyMenuEntry=La meva entrada del menú diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index a50db98d5f8..7553262f78d 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -47,13 +47,13 @@ ErrorConstantNotDefined=Parámetre %s no definit ErrorUnknown=Error desconegut ErrorSQL=Error de SQL ErrorLogoFileNotFound=El arxiu logo '%s' no es troba -ErrorGoToGlobalSetup=Ves a la configuració 'Empresa/Organització' per corregir-ho -ErrorGoToModuleSetup=Ves a la configuració del mòdul per corregir-ho +ErrorGoToGlobalSetup=Aneu a la configuració "Empresa/Organització" per a solucionar-ho +ErrorGoToModuleSetup=Aneu a Configuració del mòdul per a solucionar-ho ErrorFailedToSendMail=Error en l'enviament de l'e-mail (emissor =%s, destinatairo =%s) ErrorFileNotUploaded=El fitxer no s'ha pogut transferir ErrorInternalErrorDetected=Error detectat ErrorWrongHostParameter=Paràmetre Servidor invàlid -ErrorYourCountryIsNotDefined=El teu país no està definit. Ves a Inici-Configuració-Empresa-Edita i omple de nou el formulari +ErrorYourCountryIsNotDefined=El vostre país no està definit. Aneu a Inici-Configuració-Edita i torneu a omplir el formulari. ErrorRecordIsUsedByChild=No s'ha pogut suprimir aquest registre. Aquest registre l’utilitza almenys un registre fill. ErrorWrongValue=Valor incorrecte ErrorWrongValueForParameterX=Valor incorrecte del paràmetre %s @@ -114,7 +114,7 @@ ReturnCodeLastAccessInError=Retorna el codi per les últimes peticions d'accés InformationLastAccessInError=Informació de les últimes peticions d'accés a la base de dades amb error DolibarrHasDetectedError=Dolibarr ha trobat un error tècnic YouCanSetOptionDolibarrMainProdToZero=Podeu llegir el fitxer de registre o establir l'opció $dolibarr_main_prod a '0' al fitxer de configuració per a obtenir més informació. -InformationToHelpDiagnose=Aquesta informació pot ser útil per a fer diagnòstics (podeu configurar l'opció $dolibarr_main_prod a '1' per eliminar aquestes notificacions) +InformationToHelpDiagnose=Aquesta informació pot ser útil per a fer diagnòstics (podeu configurar l'opció $dolibarr_main_prod a '1' per a eliminar aquestes notificacions) MoreInformation=Més informació TechnicalInformation=Informació tècnica TechnicalID=ID Tècnic @@ -244,7 +244,7 @@ DurationOfLine=Durada de la línia Model=Plantilla del document DefaultModel=Plantilla del document per defecte Action=Acció -About=Sobre +About=Quant a Number=Número NumberByMonth=Nombre per mes AmountByMonth=Import per mes @@ -278,6 +278,7 @@ DateModificationShort=Data modif. IPModification=IP de modificació DateLastModification=Data de l'última modificació DateValidation=Data validació +DateSigning=Signing date DateClosing=Data tancament DateDue=Data venciment DateValue=Data valor @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Preu unitari (exclòs) (moneda) UnitPriceTTC=Preu unitari total PriceU=P.U. PriceUHT=P.U. -PriceUHTCurrency=U.P (moneda) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Preu unitari (IVA inclòs) Amount=Import AmountInvoice=Import factura @@ -389,6 +390,8 @@ AmountTotal=Import total AmountAverage=Import mitjà PriceQtyMinHT=Preu quantitat min. (sense IVA) PriceQtyMinHTCurrency=Preu quantitat min. (sense IVA) (moneda) +PercentOfOriginalObject=Percentatge de l'objecte original +AmountOrPercent=Import o percentatge Percentage=Percentatge Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ MenuMembers=Socis MenuAgendaGoogle=Agenda Google MenuTaxesAndSpecialExpenses=Impostos | Despeses especials ThisLimitIsDefinedInSetup=Límit Dolibarr (Menú inici-configuració-seguretat): %s Kb, límit PHP: %s Kb -NoFileFound=No hi ha documents guardats en aquesta carpeta +NoFileFound=No documents uploaded CurrentUserLanguage=Idioma actual CurrentTheme=Tema actual CurrentMenuManager=Gestor menú actual @@ -899,8 +902,10 @@ ViewAccountList=Veure llibre major ViewSubAccountList=Vegeu el subcompte del llibre major RemoveString=Eliminar cadena '%s' SomeTranslationAreUncomplete=Alguns idiomes poden estar traduïts parcialment o poden tenir errors. Si detectes algun, pots corregir els fitxers d'idiomes registrant-te a <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a>. -DirectDownloadLink=Enllaç de descàrrega directa (públic/extern) -DirectDownloadInternalLink=Enllaç directe de descàrrega (necessita estar registrat i tenir permisos) +DirectDownloadLink=Enllaç de descàrrega públic +PublicDownloadLinkDesc=Per baixar el fitxer només es necessita l'enllaç +DirectDownloadInternalLink=Enllaç de descàrrega privat +PrivateDownloadLinkDesc=Cal estar registrat i amb permisos per a visualitzar o descarregar el fitxer Download=Descarrega DownloadDocument=Baixar el document ActualizeCurrency=Actualitza el canvi de divisa @@ -908,7 +913,7 @@ Fiscalyear=Any fiscal ModuleBuilder=Generador de mòduls i aplicacions SetMultiCurrencyCode=Estableix moneda BulkActions=Accions massives -ClickToShowHelp=Fes clic per mostrar l'ajuda desplegable +ClickToShowHelp=Feu clic per a mostrar l'ajuda desplegable WebSite=Lloc web WebSites=Pàgines web WebSiteAccounts=Comptes de lloc web @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contactes SearchIntoMembers=Socis SearchIntoUsers=Usuaris SearchIntoProductsOrServices=Productes o serveis +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projectes SearchIntoMO=Ordres de fabricació SearchIntoTasks=Tasques @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tecla de drecera AssignedTo=Assignada a Deletedraft=Suprimeix l'esborrany ConfirmMassDraftDeletion=Confirmació d'eliminació massiva d'esborranys -FileSharedViaALink=Fitxer compartit a través d'un enllaç +FileSharedViaALink=Fitxer compartit amb un enllaç públic SelectAThirdPartyFirst=Selecciona un tercer primer YouAreCurrentlyInSandboxMode=Actualment esteu en el mode %s "sandbox" Inventory=Inventari AnalyticCode=Codi analític TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Mostra més informació NoFilesUploadedYet=Carregueu primer un document SeePrivateNote=Veure nota privada @@ -1086,7 +1093,7 @@ More=Més ShowDetails=Mostrar detalls CustomReports=Informes personalitzats StatisticsOn=Estadístiques de -SelectYourGraphOptionsFirst=Seleccioneu les opcions gràfiques per crear un gràfic +SelectYourGraphOptionsFirst=Seleccioneu les opcions gràfiques per a crear un gràfic Measures=Mesures XAxis=Eix X YAxis=Eix Y @@ -1115,8 +1122,10 @@ OutOfDate=Obsolet EventReminder=Recordatori d'esdeveniments UpdateForAllLines=Actualització per a totes les línies OnHold=Fora de servei -Civility=Civility +Civility=Civilitat AffectTag=Afecta l'etiqueta ConfirmAffectTag=Afecta l'etiqueta massivament ConfirmAffectTagQuestion=Esteu segur que voleu afectar les etiquetes als registres seleccionats %s? CategTypeNotFound=No s'ha trobat cap tipus d'etiqueta per al tipus de registres +CopiedToClipboard=Copiat al porta-retalls +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ca_ES/margins.lang b/htdocs/langs/ca_ES/margins.lang index 065ac5170eb..cbf1a27be62 100644 --- a/htdocs/langs/ca_ES/margins.lang +++ b/htdocs/langs/ca_ES/margins.lang @@ -22,7 +22,7 @@ ProductService=Producte o servei AllProducts=Tots els productes i serveis ChooseProduct/Service=Tria el producte o servei ForceBuyingPriceIfNull=Forçar preu de cost/compra al preu de venda si no s'ha definit -ForceBuyingPriceIfNullDetails=Si el preu de cost/compra no està definit, i aquesta opció en "ON", el marge serà zero en la línia (preu de cost/compra = preu de venda), en cas contrari ("OFF"), marge serà igual al suggerit per defecte. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Mètode de gestió de descomptes globals UseDiscountAsProduct=Com un producte UseDiscountAsService=Com un servei @@ -42,4 +42,4 @@ rateMustBeNumeric=El marge ha de ser un valor numèric markRateShouldBeLesserThan100=El marge té que ser menor que 100 ShowMarginInfos=Mostrar info de marges CheckMargins=Detall de marges -MarginPerSaleRepresentativeWarning=L'informe de marge per usuari utilitza el vincle entre tercers i representants de vendes per calcular el marge de cada representant de venda. Com que algunes terceres parts no poden tenir cap representant de vendes dedicat i alguns tercers poden estar vinculats a diversos, alguns imports podrien no incloure's en aquest informe (si no hi ha representant de venda) i alguns podrien aparèixer en diferents línies (per a cada representant de venda) . +MarginPerSaleRepresentativeWarning=L'informe de marge per usuari utilitza l'enllaç entre tercers i representants de vendes per a calcular el marge de cada representant de venda. Com que és possible que algunes terceres parts no tinguin cap representant de venda dedicat i que hi hagi tercers que estiguin vinculats a diversos, és possible que algunes quantitats no s'incloguin a aquest informe (si no hi ha cap representant de vendes) i que algunes puguin aparèixer en línies diferents (per a cada representant de venda) . diff --git a/htdocs/langs/ca_ES/members.lang b/htdocs/langs/ca_ES/members.lang index 7fe30fe8322..e99d8a53704 100644 --- a/htdocs/langs/ca_ES/members.lang +++ b/htdocs/langs/ca_ES/members.lang @@ -12,7 +12,7 @@ FundationMembers=Socis de l'entitat ListOfValidatedPublicMembers=Llistat de socis públics validats ErrorThisMemberIsNotPublic=Aquest soci no és públic ErrorMemberIsAlreadyLinkedToThisThirdParty=Un altre soci (nom: <b>%s</b>, nom d'usuari: <b>%s</b>) ja està vinculat al tercer <b>%s</b>. Esborreu l'enllaç existent ja que un tercer només pot estar vinculat a un sol soci (i viceversa). -ErrorUserPermissionAllowsToLinksToItselfOnly=Per raons de seguretat, ha de posseir els drets de modificació de tots els usuaris per poder vincular un soci a un usuari que no sigui vostè mateix. +ErrorUserPermissionAllowsToLinksToItselfOnly=Per motius de seguretat, se us ha de concedir permisos per a editar tots els usuaris per a poder enllaçar un soci a un usuari que no és vostre. SetLinkToUser=Vincular a un usuari Dolibarr SetLinkToThirdParty=Vincular a un tercer Dolibarr MembersCards=Carnets de socis @@ -21,10 +21,12 @@ MembersListToValid=Llistat de socis esborrany (per a validar) MembersListValid=Llistat de socis validats MembersListUpToDate=Llista de socis vàlids amb quotes al dia MembersListNotUpToDate=Llista de socis vàlids amb quotes pendents +MembersListExcluded=List of excluded members MembersListResiliated=Llista de socis donats de baixa MembersListQualified=Llistat de socis qualificats MenuMembersToValidate=Socis esborrany MenuMembersValidated=Socis validats +MenuMembersExcluded=Excluded members MenuMembersResiliated=Socis donats de baixa MembersWithSubscriptionToReceive=Socis amb afiliació per rebre MembersWithSubscriptionToReceiveShort=Subscripcions per rebre @@ -47,9 +49,12 @@ MemberStatusActiveLate=Afiliació no al dia MemberStatusActiveLateShort=No al dia MemberStatusPaid=Afiliacions al dia MemberStatusPaidShort=Al dia +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Soci donat de baixa MemberStatusResiliatedShort=Baixa MembersStatusToValid=Socis esborrany +MembersStatusExcluded=Excluded members MembersStatusResiliated=Socis donats de baixa MemberStatusNoSubscription=Validat (no cal subscripció) MemberStatusNoSubscriptionShort=Validat @@ -72,7 +77,7 @@ SubscriptionNotReceived=Afiliació no rebuda ListOfSubscriptions=Llista d'afiliacions SendCardByMail=Enviar una targeta per correu electrònic AddMember=Crea soci -NoTypeDefinedGoToSetup=No s'ha definit cap tipus de soci. Ves al menú "Tipus de socis" +NoTypeDefinedGoToSetup=No s'ha definit cap tipus de soci. Aneu al menú "Tipus de socis" NewMemberType=Tipus de soci nou WelcomeEMail=Correu electrònic de benvinguda SubscriptionRequired=Subjecte a cotització @@ -82,6 +87,8 @@ Physical=Físic Moral=Moral MorAndPhy=Moral i físic Reenable=Reactivar +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Dona de baixa un soci ConfirmResiliateMember=Vols donar de baixa aquest soci? DeleteMember=Elimina un soci @@ -91,10 +98,10 @@ ConfirmDeleteSubscription=Vols esborrar aquesta subscripció? Filehtpasswd=Arxiu htpasswd ValidateMember=Valida un soci ConfirmValidateMember=Vols validar aquest soci? -FollowingLinksArePublic=Els següents enllaços són pàgines obertes que no estan protegides per cap permís Dolibarr. No tenen pàgines amb format, es proporciona com a exemple per mostrar com es llista la base de dades dels socis. +FollowingLinksArePublic=Els següents enllaços són pàgines obertes que no estan protegides per cap permís de Dolibarr. No són pàgines amb format, són proporcionades com a exemple per a mostrar com llistar la base de dades de socis. PublicMemberList=Llistat públic de socis BlankSubscriptionForm=Formulari públic d'auto-subscripció -BlankSubscriptionFormDesc=Dolibarr us pot proporcionar una URL/lloc web públic per permetre que els visitants externs sol·licitin subscriure's a la fundació. Si un mòdul de pagament en línia està habilitat, també es pot proporcionar automàticament un formulari de pagament. +BlankSubscriptionFormDesc=Dolibarr us pot proporcionar una URL/lloc web públic per a permetre que els visitants externs sol·licitin subscriure's a la fundació. Si un mòdul de pagament en línia està habilitat, també es pot proporcionar automàticament un formulari de pagament. EnablePublicSubscriptionForm=Activa el lloc web públic amb el formulari d'auto-subscripció ForceMemberType=Força el tipus de soci ExportDataset_member_1=Socis i quotes @@ -132,11 +139,12 @@ ThisIsContentOfSubscriptionReminderEmail=Volem informar-vos que la vostra subscr ThisIsContentOfYourCard=Aquest és un resum de la informació que tenim sobre vostè. Poseu-vos en contacte amb nosaltres si hi ha alguna cosa incorrecta. <br> <br> DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Assumpte del correu electrònic de notificació rebut en cas d'inscripció automàtica d'un convidat DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Contingut del correu electrònic de notificació rebut en cas d'inscripció automàtica d'un convidat -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Plantilla de correu electrònic a utilitzar per enviar correus electrònics a un membre de la subscripció automàtica de membres -DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Plantilla de correu electrònic que s'utilitzarà per enviar correus electrònics a un membre en la validació dels membres -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Plantilla de correu electrònic que s'utilitzarà per enviar un correu electrònic a un membre sobre la nova gravació de la subscripció -DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Plantilla de correu electrònic que s'utilitzarà per enviar un recordatori de correu electrònic quan la subscripció estigui a punt de caducar -DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Plantilla de correu electrònic a utilitzar per enviar un correu electrònic a un membre en la cancel·lació de membres +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Plantilla de correu electrònic a utilitzar per a enviar un correu electrònic a un soci mitjançant la subscripció automàtica de socis +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Plantilla de correu electrònic que cal utilitzar per a enviar un correu electrònic a un soci amb la validació de socis +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Plantilla de correu electrònic que s'utilitzarà per a enviar un correu electrònic a un soci sobre la nova gravació de la subscripció +DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Plantilla de correu electrònic que cal utilitzar per a enviar un recordatori de correu electrònic quan la subscripció estigui a punt de caducar +DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Plantilla de correu electrònic que s'utilitzarà per a enviar un correu electrònic a un soci en la seva cancel·lació +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Correu electrònic del remitent per a correus electrònics automàtics DescADHERENT_ETIQUETTE_TYPE=Format pàgines etiquetes DescADHERENT_ETIQUETTE_TEXT=Text a imprimir a la direcció de les etiquetes de soci @@ -162,6 +170,7 @@ DocForLabels=Generació d'etiquetes d'adreces (Format de plantilla configurat ac SubscriptionPayment=Pagament de quota LastSubscriptionDate=Data de l'últim pagament de subscripció LastSubscriptionAmount=Import de la subscripció més recent +LastMemberType=Last Member type MembersStatisticsByCountries=Estadístiques de socis per país MembersStatisticsByState=Estadístiques de socis per província MembersStatisticsByTown=Estadístiques de socis per població @@ -200,7 +209,7 @@ SubscriptionRecorded=S'ha registrat la subscripció NoEmailSentToMember=No s'ha enviat un correu electrònic al membre EmailSentToMember=Correu electrònic enviat a membre a %s SendReminderForExpiredSubscriptionTitle=Enviar recordatori per correu electrònic per subscripció caducada -SendReminderForExpiredSubscription=Envia un recordatori per correu electrònic als socis quan l'afiliació estigui a punt de caducar (el paràmetre és una quantitat de dies abans de la finalització de l'afiliació per enviar el recordatori. Pot ser una llista de dies separats per un punt i coma, per exemple '10;5;0;-5') +SendReminderForExpiredSubscription=Envia un recordatori per correu electrònic als socis quan l'afiliació estigui a punt de caducar (el paràmetre és una quantitat de dies abans de la finalització de l'afiliació per a enviar el recordatori. Pot ser una llista de dies separats per un punt i coma, per exemple '10;5;0;-5') MembershipPaid=Membres pagats pel període actual (fins a %s) YouMayFindYourInvoiceInThisEmail=Podeu trobar la factura adjunta a aquest correu electrònic XMembersClosed=%s soci(s) tancat(s) diff --git a/htdocs/langs/ca_ES/modulebuilder.lang b/htdocs/langs/ca_ES/modulebuilder.lang index 275cdac1d5d..797693fc98e 100644 --- a/htdocs/langs/ca_ES/modulebuilder.lang +++ b/htdocs/langs/ca_ES/modulebuilder.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - loan -ModuleBuilderDesc=Aquesta eina només ha de ser utilitzada per usuaris o desenvolupadors experimentats. Proporciona utilitats per crear o editar el vostre propi mòdul. La documentació per al desenvolupament manual alternatiu <a href="%s" target="_blank">és aquí</a> . -EnterNameOfModuleDesc=Introdueix el nom del mòdul/aplicació per crear sense espais. Utilitza majúscules per separar paraules (Per exemple: MyModule, EcommerceForShop, SyncWithMySystem...) +ModuleBuilderDesc=Aquesta eina només l’han d’utilitzar usuaris o desenvolupadors experimentats. Proporciona utilitats per a construir o editar el vostre propi mòdul. La documentació per al desenvolupament manual alternatiu <a href="%s" target="_blank"> és aquí </a>. +EnterNameOfModuleDesc=Introduïu el nom del mòdul/aplicació per a crear sense espais. Utilitzeu majúscules per separar paraules (per exemple: MyModule, EcommerceForShop, SyncWithMySystem ...) EnterNameOfObjectDesc=Introduïu el nom de l'objecte que voleu crear sense espais. Utilitzeu majúscules per separar paraules (Per exemple: MyObject, Estudiant, Professor...). El fitxer de classes CRUD, però també el fitxer API, pàgines per a llistar/afegir/editar/eliminar objectes i els fitxers SQL es generaran. ModuleBuilderDesc2=Camí on es generen / editen els mòduls (primer directori per als mòduls externs definits en %s): <strong> %s </strong> ModuleBuilderDesc3=S'han trobat mòduls generats/editables: <strong>%s</strong> @@ -14,20 +14,20 @@ FilesForObjectInitialized=S'han inicialitzat els fitxers per al objecte nou '%s' FilesForObjectUpdated=Fitxers de l'objecte '%s' actualitzat (fitxers .sql i fitxer .class.php) ModuleBuilderDescdescription=Introduïu aquí tota la informació general que descrigui el vostre mòdul. ModuleBuilderDescspecifications=Podeu introduir aquí una descripció detallada de les especificacions del mòdul que encara no està estructurada en altres pestanyes. Així que teniu a la vostra disposició totes les normes que es desenvolupin. També aquest contingut de text s'inclourà a la documentació generada (veure l'última pestanya). Podeu utilitzar el format de Markdown, però es recomana utilitzar el format Asciidoc (comparació entre .md i .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). -ModuleBuilderDescobjects=Definiu aquí els objectes que voleu gestionar amb el mòdul. Es crearà una classe CRUD DAO, fitxers SQL, una pàgina per llistar el registre d'objectes, per crear/editar/veure un registre i es generarà una API. +ModuleBuilderDescobjects=Definiu aquí els objectes que voleu gestionar amb el vostre mòdul. Es generarà una classe CRUD DAO, fitxers SQL, una pàgina per a llistar el registre d'objectes, per a crear/editar/visualitzar un registre i una API. ModuleBuilderDescmenus=Aquesta pestanya està dedicada a definir les entrades de menú proporcionades pel teu mòdul. ModuleBuilderDescpermissions=Aquesta pestanya està dedicada a definir els permisos nous que voleu proporcionar amb el vostre mòdul. ModuleBuilderDesctriggers=Aquesta és la vista dels disparadors proporcionats pel teu mòdul. Per incloure el codi executat quan es posa en marxa un esdeveniment de negoci desencadenat, edita aquest fitxer. ModuleBuilderDeschooks=Aquesta pestanya està dedicada als ganxos (hooks) -ModuleBuilderDescwidgets=Aquesta pestanya està dedicada per crear/gestionar ginys -ModuleBuilderDescbuildpackage=Pots generar aquí un fitxer de paquet "llest per distribuir" (un fitxer .zip normalitzat) del teu mòdul i un fitxer de documentació "llest per distribuir". Només cal que facis clic al botó per crear el paquet o el fitxer de documentació. +ModuleBuilderDescwidgets=Aquesta pestanya està dedicada a gestionar/crear ginys. +ModuleBuilderDescbuildpackage=Aquí podeu generar un fitxer de paquet "a punt per a distribuir" (un fitxer .zip normalitzat) del vostre mòdul i un fitxer de documentació "a punt per a distribuir". Simplement feu clic al botó per a crear el paquet o el fitxer de documentació. EnterNameOfModuleToDeleteDesc=Podeu suprimir el vostre mòdul. AVÍS: se suprimiran tots els fitxers de codificació del mòdul (generats o creats manualment) I la documentació estructurada i la documentació. EnterNameOfObjectToDeleteDesc=Podeu suprimir un objecte. AVÍS: Tots els fitxers de codificació (generats o creats manualment) relacionats amb l'objecte s'eliminaran. DangerZone=Zona perillosa BuildPackage=Construeix el paquet BuildPackageDesc=Podeu generar un paquet zip de la vostra aplicació de manera que estigueu a punt per distribuir-lo a qualsevol Dolibarr. També podeu distribuir-lo o vendre-lo al mercat com <a href="https://www.dolistore.com">DoliStore.com</a> . BuildDocumentation=Construeix documentació -ModuleIsNotActive=Aquest mòdul encara no està activat. Aneu a %s per activar-ho o feu clic aquí +ModuleIsNotActive=Aquest mòdul encara no està activat. Aneu a %s per a publicar-lo o feu clic aquí ModuleIsLive=Aquest mòdul ha estat activat. Qualsevol canvi pot trencar la funció actual en viu. DescriptionLong=Descripció llarga EditorName=Nom de l'editor @@ -36,7 +36,7 @@ DescriptorFile=Fitxer descriptor del mòdul ClassFile=Fitxer per a la classe CRUD DAO PHP ApiClassFile=Fitxer per la classe PHP API PageForList=Pàgina PHP per a la llista de registres -PageForCreateEditView=Pàgina PHP per crear/editar/veure un registre +PageForCreateEditView=Pàgina PHP per a crear/editar/visualitzar un registre PageForAgendaTab=Pàgina de PHP per a la pestanya d'esdeveniments PageForDocumentTab=Pàgina de PHP per a la pestanya de documents PageForNoteTab=Pàgina de PHP per a la pestanya de notes @@ -99,7 +99,7 @@ DictionariesDefDescTooltip=Els diccionaris subministrats pel vostre mòdul/aplic PermissionsDefDescTooltip=Els permisos proporcionats pel vostre mòdul / aplicació es defineixen a la matriu <strong>$ this-> rights</strong> al fitxer descriptor del mòdul. Podeu editar manualment aquest fitxer o utilitzar l’editor incrustat. <br><br> Nota: un cop definits (i el mòdul reactivat), els permisos es visualitzen a la configuració de permisos per defecte %s. HooksDefDesc=Definiu a la propietat <b>module_parts['hooks']</b>, en el descriptor del mòdul, el context dels "hooks" que voleu gestionar (una llista de contextos es pot trobar si cerqueu '<b>initHooks</b>' (en el codi del nucli de Dolibarr. <br> Editeu el fitxer del "hook" per afegir el codi de les vostres funcions "hookables" (les quals es poden trobar cercant "<b>executeHooks</b>" en el codi del nucli de Dolibarr). TriggerDefDesc=Definiu en el fitxer "trigger" el codi que voleu executar per a cada esdeveniment de negoci executat. -SeeIDsInUse=Veure IDs en ús a la vostra instal·lació +SeeIDsInUse=Consulteu els identificadors que s’utilitzen a la instal·lació SeeReservedIDsRangeHere=Consultar l'interval d'identificadors reservats ToolkitForDevelopers=Kit d'eines per als desenvolupadors de Dolibarr TryToUseTheModuleBuilder=Si teniu coneixements de SQL i PHP, podeu utilitzar l'assistent de generador de mòduls natiu. <br> Activeu el mòdul <strong> %s </strong> i utilitzeu l'assistent fent clic al <span class="fa fa-bug"> </span> al menú superior dret. <br> Advertència: aquesta és una característica de desenvolupador avançada, feu <b> no </b> en el vostre lloc de producció! @@ -131,12 +131,14 @@ IncludeRefGeneration=La referència de l’objecte s’ha de generar automàtica IncludeRefGenerationHelp=Marca-ho si vols incloure codi per a gestionar la generació automàtica de la referència IncludeDocGeneration=Vull generar alguns documents des de l'objecte IncludeDocGenerationHelp=Si ho marques, es generarà el codi per afegir una casella "Generar document" al registre. -ShowOnCombobox=Mostra el valor en un combobox +ShowOnCombobox=Mostra el valor a la llista desplegable KeyForTooltip=Clau per donar més informació -CSSClass=Classe CSS +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=No editable ForeignKey=Clau forana -TypeOfFieldsHelp=Tipus de camps: <br> 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) +TypeOfFieldsHelp=Tipus de camps: <br> 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 a 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=La taula no està buida. S'ha cancel·lat l'eliminació. diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang index a840d554c15..0a94644b72e 100644 --- a/htdocs/langs/ca_ES/orders.lang +++ b/htdocs/langs/ca_ES/orders.lang @@ -16,6 +16,8 @@ ToOrder=Realitzar comanda MakeOrder=Realitzar comanda SupplierOrder=Comanda de compra SuppliersOrders=Comandes de compra +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Comandes de compra actuals CustomerOrder=Comanda de vendes CustomersOrders=Comanda de vendes @@ -97,7 +99,7 @@ ConfirmUnvalidateOrder=Vols restaurar la comanda <b>%s</b> a l'estat esborrany? ConfirmCancelOrder=Vols anul·lar aquesta comanda? ConfirmMakeOrder=Vols confirmar la creació d'aquesta comanda a data de <b>%s</b>? GenerateBill=Facturar -ClassifyShipped=Classifica enviada +ClassifyShipped=Classifica enviat DraftOrders=Esborranys de comandes DraftSuppliersOrders=Esborrany de comandes de compra OnProcessOrders=Comandes en procés @@ -154,7 +156,7 @@ Ordered=Comandat OrderCreated=Les vostres comandes s'han creat OrderFail=S'ha produït un error durant la creació de les seves comandes CreateOrders=Crear comandes -ToBillSeveralOrderSelectCustomer=Per crear una factura per nombroses comandes, faci primer clic sobre el client i després esculli "%s". +ToBillSeveralOrderSelectCustomer=Per a crear una factura per a diverses comandes, feu clic primer al client i, a continuació, trieu "%s". OptionToSetOrderBilledNotEnabled=L'opció del mòdul Flux de treball, per establir la comanda com a "Facturada" automàticament quan es valida la factura, no està habilitada, de manera que haureu d'establir l'estat de les comandes a "Facturada" manualment després de generar la factura. IfValidateInvoiceIsNoOrderStayUnbilled=Si la validació de la factura és "No", l'ordre romandrà a l'estat "No facturat" fins que es validi la factura. CloseReceivedSupplierOrdersAutomatically=Tanqueu l'ordre d'estat "%s" automàticament si es reben tots els productes. diff --git a/htdocs/langs/ca_ES/other.lang b/htdocs/langs/ca_ES/other.lang index 77a93f1499e..0003ac6205a 100644 --- a/htdocs/langs/ca_ES/other.lang +++ b/htdocs/langs/ca_ES/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Empresa amb activitats múltiples (tots els mòduls principals) CreatedBy=Creat per %s ModifiedBy=Modificat per %s ValidatedBy=Validat per %s +SignedBy=Signed by %s ClosedBy=Tancat per %s CreatedById=ID d'usuari que ha creat ModifiedById=Id de l'usuari que ha fet l'últim canvi @@ -181,7 +182,7 @@ AuthenticationDoesNotAllowSendNewPassword=El mode d'autenticació de Dolibarr es EnableGDLibraryDesc=Instal·leu o activeu la biblioteca GD a la instal·lació de PHP per a utilitzar aquesta opció. ProfIdShortDesc=<b>Prof Id %s </b> és una informació que depèn del país del tercer. <br>Per exemple, per al país <b>%s</b>, és el codi <b>%s</b>. DolibarrDemo=Demo de Dolibarr ERP/CRM -StatsByNumberOfUnits=Estadístiques de suma quantitat de productes/serveis +StatsByNumberOfUnits=Estadístiques de suma de la quantitat de productes/serveis StatsByNumberOfEntities=Estadístiques en nombre d'entitats referents (número de factura o ordre ...) NumberOfProposals=Nombre de pressupostos NumberOfCustomerOrders=Nombre de comandes de venda @@ -224,7 +225,7 @@ NewLength=Amplada nova NewHeight=Alçada nova NewSizeAfterCropping=Mida nova després de retallar DefineNewAreaToPick=Indiqueu la zona d'imatge a conservar (Clic sobre la imatge i arrossegueu fins a la cantonada oposada) -CurrentInformationOnImage=Aquesta eina va ser dissenyada per ajudar-vos a canviar la mida o retallar una imatge. Aquesta és la informació de la imatge editada actual +CurrentInformationOnImage=Aquesta eina ha estat dissenyada per a ajudar-vos a redimensionar o retallar una imatge. Aquesta és la informació sobre la imatge editada actualment ImageEditor=Editor d'imatge YouReceiveMailBecauseOfNotification=Vostè està rebent aquest missatge perquè el seu correu electrònica està subscrit a algunes notificacions automàtiques per informar sobre esdeveniments especials del programa %s de %s. YouReceiveMailBecauseOfNotification2=L'esdeveniment en qüestió és el següent: @@ -240,10 +241,11 @@ PleaseBePatient=Si us plau sigui pacient... NewPassword=Contrasenya nova ResetPassword=Restablir la contrasenya RequestToResetPasswordReceived=S'ha rebut una sol·licitud per canviar la teva contrasenya. -NewKeyIs=Aquesta és la nova contrasenya per iniciar sessió -NewKeyWillBe=La seva nova contrasenya per iniciar sessió en el software serà +NewKeyIs=Aquesta és la nova contrasenya per a iniciar la sessió +NewKeyWillBe=La contrasenya nova per a iniciar la sessió al programari serà ClickHereToGoTo=Clica aquí per anar a %s YouMustClickToChange=De totes formes, primer heu de fer clic al següent enllaç per a validar aquest canvi de contrasenya +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Si vostè no ha sol·licitat aquest canvi, simplement ignori aquest e-mail. Les seves credencials són guardades de forma segura IfAmountHigherThan=si l'import es major que <strong>%s</strong> SourcesRepository=Repositori de fonts @@ -276,7 +278,7 @@ WEBSITE_PAGEURL=URL de pàgina WEBSITE_TITLE=Títol WEBSITE_DESCRIPTION=Descripció WEBSITE_IMAGE=Imatge -WEBSITE_IMAGEDesc=Ruta relativa dels suports d’imatge. Podeu mantenir-la buida, ja que rarament es fa servir (pot ser utilitzada per contingut dinàmic per mostrar una miniatura a la llista de publicacions del bloc). Utilitzeu __WEBSITE_KEY__ a la ruta si aquesta depèn del nom del lloc web (per exemple: image/__ WEBSITE_KEY __ /stories/lamevaimatge.png). +WEBSITE_IMAGEDesc=Ruta relativa dels suports d’imatge. Podeu mantenir-la buida, ja que rarament es fa servir (pot ser utilitzada per contingut dinàmic per a mostrar una miniatura a la llista de publicacions del bloc). Utilitzeu __WEBSITE_KEY__ a la ruta si aquesta depèn del nom del lloc web (per exemple: image/__ WEBSITE_KEY __ /stories/lamevaimatge.png). WEBSITE_KEYWORDS=Paraules clau LinesToImport=Línies per importar diff --git a/htdocs/langs/ca_ES/productbatch.lang b/htdocs/langs/ca_ES/productbatch.lang index 798e4d56cbb..3cf6573bf26 100644 --- a/htdocs/langs/ca_ES/productbatch.lang +++ b/htdocs/langs/ca_ES/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Utilitza el número de lot/sèrie -ProductStatusOnBatch=Sí (es requereix un lot/sèrie) +ProductStatusOnBatch=Sí (es requereix lot) +ProductStatusOnSerial=Sí (es requereix un número de sèrie únic) ProductStatusNotOnBatch=No (lot/sèrie no utilitzat) -ProductStatusOnBatchShort=Si +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=En sèrie ProductStatusNotOnBatchShort=No Batch=Lot/Sèrie atleast1batchfield=Data de caducitat o data de venda o número de lot/sèrie @@ -22,3 +24,12 @@ ProductLotSetup=Configuració del mòdul lot/sèries ShowCurrentStockOfLot=Mostra l'estoc actual de la parella producte/lot ShowLogOfMovementIfLot=Mostra el registre de moviments de la parella producte/lot StockDetailPerBatch=Detall d’estoc per lot +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ca_ES/products.lang b/htdocs/langs/ca_ES/products.lang index ab089492c72..e0d958054d0 100644 --- a/htdocs/langs/ca_ES/products.lang +++ b/htdocs/langs/ca_ES/products.lang @@ -137,10 +137,11 @@ ProductSpecial=Especial QtyMin=Min. quantitat de compra PriceQtyMin=Preu mínim PriceQtyMinCurrency=Preu (moneda) per aquesta quantitat (sense descompte) -VATRateForSupplierProduct=Preu de l'IVA (per a aquest proveïdor/product) +VATRateForSupplierProduct=Tipus d'IVA (per a aquest venedor/producte) DiscountQtyMin=Descompte per aquesta quantitat. NoPriceDefinedForThisSupplier=Sense preu ni quantitat definida per aquest proveïdor / producte NoSupplierPriceDefinedForThisProduct=No hi ha cap preu / quantitat de proveïdor definit per a aquest producte +PredefinedItem=Element predefinit PredefinedProductsToSell=Producte predefinit PredefinedServicesToSell=Servei predefinit PredefinedProductsAndServicesToSell=Productes/serveis predefinits per vendre @@ -243,7 +244,7 @@ PriceByQuantity=Preus diferents per quantitat DisablePriceByQty=Desactivar els preus per quantitat PriceByQuantityRange=Rang de quantitats MultipriceRules=Preus automàtics per segment -UseMultipriceRules=Utilitzeu les regles del segment de preus (definides a la configuració del mòdul de producte) per calcular automàticament els preus de tots els altres segments segons el primer segment +UseMultipriceRules=Utilitzeu les regles del segment de preus (definides a la configuració del mòdul de producte) per a calcular automàticament els preus de la resta de segments segons el primer segment PercentVariationOver=%% variació sobre %s PercentDiscountOver=%% descompte sobre %s KeepEmptyForAutoCalculation=Mantingueu-lo buit per a calcular-ho automàticament a partir del pes o volum dels productes @@ -282,7 +283,7 @@ MinimumPriceLimit=El preu mínim no pot ser inferior a %s MinimumRecommendedPrice=El preu mínim recomanat és: %s PriceExpressionEditor=Editor d'expressions de preus PriceExpressionSelected=Expressió de preus seleccionat -PriceExpressionEditorHelp1="price = 2 + 2" o "2 + 2" per definir el preu. Utilitzeu ; per separar expressions +PriceExpressionEditorHelp1="price = 2 + 2" o "2 + 2" per a definir el preu. Utilitzeu ; per a separar expressions PriceExpressionEditorHelp2=Pots accedir als atributs complementaris amb variables com <b>#extrafield_myextrafieldkey#</b> i variables globals amb <b>#global_mycode#</b> PriceExpressionEditorHelp3=En productes/serveis i preus de proveïdor, hi ha disponibles les següents variables<br><b>#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min#</b> PriceExpressionEditorHelp4=Només en els preus de productes/serveis: <b>#supplier_min_price#</b><br>Només en els preus dels proveïdors: <b>#supplier_quantity# i #supplier_tva_tx#</b> @@ -296,7 +297,7 @@ ComposedProduct=Productes Fills MinSupplierPrice=Preu mínim de compra MinCustomerPrice=Preu mínim de venda DynamicPriceConfiguration=Configuració de preu dinàmic -DynamicPriceDesc=Podeu definir fórmules matemàtiques per calcular els preus dels clients o venedors. Aquestes fórmules poden utilitzar tots els operadors matemàtics, algunes constants i variables. Podeu definir aquí les variables que voleu utilitzar. Si la variable necessita una actualització automàtica, podeu definir l'URL extern per permetre que Dolibarr actualitzi el valor automàticament. +DynamicPriceDesc=Podeu definir fórmules matemàtiques per a calcular els preus del client o del proveïdor. Aquestes fórmules poden utilitzar tots els operadors matemàtics, algunes constants i variables. Aquí podeu definir les variables que voleu utilitzar. Si la variable necessita una actualització automàtica, podeu definir l'URL extern per a permetre que Dolibarr actualitzi el valor automàticament. AddVariable=Afegeix variable AddUpdater=Afegeix actualitzador GlobalVariables=Variables globals @@ -313,7 +314,7 @@ LastUpdated=Última actualització CorrectlyUpdated=Actualitzat correctament PropalMergePdfProductActualFile=Els fitxers que s’utilitzen per a afegir-se al PDF Azur són PropalMergePdfProductChooseFile=Selecciona fitxers PDF -IncludingProductWithTag=Inclòs productes/serveis amb etiqueta +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Preu predeterminat, el preu real pot dependre del client WarningSelectOneDocument=Selecciona com a mínim un document DefaultUnitToShow=Unitat @@ -338,8 +339,8 @@ SubProduct=Subproducte ProductSheet=Fulla de producte ServiceSheet=Fulla de servei PossibleValues=Valors possibles -GoOnMenuToCreateVairants=Aneu al menú %s - %s per preparar variants d’atributs (com ara colors, mida, ...) -UseProductFournDesc=Afegeix una funció per definir les descripcions dels productes definits pels proveïdors, a més de les descripcions pels clients +GoOnMenuToCreateVairants=Aneu al menú %s - %s per a preparar variants d’atributs (com ara colors, mida...) +UseProductFournDesc=Afegiu una funció per a definir les descripcions de productes definides pels proveïdors, a més de les descripcions per a clients ProductSupplierDescription=Descripció del venedor del producte UseProductSupplierPackaging=Utilitzeu els envasos als preus del proveïdor (calcular les quantitats segons els envasos fixats al preu del proveïdor quan afegiu / actualitzeu la línia dels documents del proveïdor) PackagingForThisProduct=Embalatge @@ -388,7 +389,7 @@ ShowChildProducts=Mostra variants del producte NoEditVariants=Aneu a la targeta de producte principal i modifiqueu les variacions d'impacte de preus a la pestanya de variants ConfirmCloneProductCombinations=Vols copiar totes les variants del producte a l'altre producte pare amb la referència donada? CloneDestinationReference=Referència del producte destí -ErrorCopyProductCombinations=S'ha produït un error al copiar les variants de producte +ErrorCopyProductCombinations=S'ha produït un error en copiar les variants del producte ErrorDestinationProductNotFound=No s'ha trobat el producte de destí ErrorProductCombinationNotFound=Variant de producte no trobada ActionAvailableOnVariantProductOnly=Acció només disponible sobre la variant del producte diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index d9a8e813264..3a6db3e2b39 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -87,8 +87,9 @@ WhichIamLinkedToProject=que estic vinculat al projecte Time=Temps TimeConsumed=Consumit ListOfTasks=Llistat de tasques -GoToListOfTimeConsumed=Ves al llistat de temps consumit +GoToListOfTimeConsumed=Aneu al llistat del temps consumit GanttView=Vista de Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Llista de propostes comercials relacionades amb el projecte ListOrdersAssociatedProject=Llista de comandes de vendes relacionades amb el projecte ListInvoicesAssociatedProject=Llista de factures a clients relacionades amb el projecte @@ -238,8 +239,8 @@ AllowToLinkFromOtherCompany=Permet enllaçar projectes procedents d'altres compa LatestProjects=Darrers %s projectes LatestModifiedProjects=Darrers %s projectes modificats OtherFilteredTasks=Altres tasques filtrades -NoAssignedTasks=No es troben tasques assignades (assigni el projecte/tasques a l'usuari actual des del quadre de selecció superior per especificar-ne l'hora) -ThirdPartyRequiredToGenerateInvoice=S'ha de definir un tercer en el projecte per poder facturar-lo. +NoAssignedTasks=No s'ha trobat cap tasca assignada (assigneu el projecte/tasques a l'usuari actual des del quadre de selecció superior per a introduir-hi l'hora) +ThirdPartyRequiredToGenerateInvoice=Cal definir un tercer en el projecte per a poder facturar-lo. ChooseANotYetAssignedTask=Trieu una tasca que encara no us ha estat assignada # Comments trans AllowCommentOnTask=Permet comentaris dels usuaris a les tasques @@ -248,7 +249,7 @@ DontHavePermissionForCloseProject=No teniu permisos per tancar el projecte %s DontHaveTheValidateStatus=El projecte %s ha de ser obert per tancar RecordsClosed=%s projecte(s) tancat(s) SendProjectRef=Informació del projecte %s -ModuleSalaryToDefineHourlyRateMustBeEnabled=El mòdul "Salaris" ha d'estar habilitat per definir la tarifa horària de l'empleat perquè el temps es valori +ModuleSalaryToDefineHourlyRateMustBeEnabled=El mòdul "Salaris" ha d'estar habilitat per a definir la tarifa horària dels empleats per tal de valorar el temps dedicat NewTaskRefSuggested=Tasca ref en ús, es requereix una nova tasca ref TimeSpentInvoiced=Temps de facturació facturat TimeSpentForInvoice=Temps dedicat @@ -268,3 +269,7 @@ OneLinePerTask=Una línia per tasca OneLinePerPeriod=Una línia per període RefTaskParent=Ref. Tasca pare ProfitIsCalculatedWith=El benefici es calcula utilitzant +AddPersonToTask=Afegeix també a les tasques +UsageOrganizeEvent=Ús: organització d'esdeveniments +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classifica un projecte com a tancat quan s'hagin completat totes les seves tasques (progrés 100%%) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Nota: els projectes existents amb totes les tasques amb un progrés del 100%% no es veuran afectats, i els haureu de tancar manualment. Així doncs, aquesta opció només afecta els projectes oberts. diff --git a/htdocs/langs/ca_ES/propal.lang b/htdocs/langs/ca_ES/propal.lang index b6b30391954..258f0378d23 100644 --- a/htdocs/langs/ca_ES/propal.lang +++ b/htdocs/langs/ca_ES/propal.lang @@ -7,8 +7,8 @@ ProposalsOpened=Pressupostos oberts CommercialProposal=Pressupost PdfCommercialProposalTitle=Pressupost ProposalCard=Fitxa pressupost -NewProp=Nou pressupost -NewPropal=Nou pressupost +NewProp=Pressupost nou +NewPropal=Pressupost nou Prospect=Client potencial DeleteProp=Eliminar pressupost ValidateProp=Validar pressupost @@ -23,7 +23,7 @@ NoProposal=Sense pressupost ProposalsStatistics=Estadístiques de pressupostos NumberOfProposalsByMonth=Número per mes AmountOfProposalsByMonthHT=Import mensual (sense IVA) -NbOfProposals=Número pressupostos +NbOfProposals=Nombre de pressupostos ShowPropal=Veure pressupost PropalsDraft=Esborranys PropalsOpened=Actiu @@ -59,6 +59,7 @@ ConfirmClonePropal=Estàs segur que vols clonar la proposta comercial <b>%s</b>? ConfirmReOpenProp=Esteu segur que voleu tornar a obrir el pressupost <b>%s</b>? ProposalsAndProposalsLines=Pressupostos a clients i línies de pressupostos ProposalLine=Línia de pressupost +ProposalLines=Proposal lines AvailabilityPeriod=Temps de lliurament SetAvailability=Indica el temps de lliurament AfterOrder=després de la comanda diff --git a/htdocs/langs/ca_ES/stocks.lang b/htdocs/langs/ca_ES/stocks.lang index 5de1e46400b..a21928521d2 100644 --- a/htdocs/langs/ca_ES/stocks.lang +++ b/htdocs/langs/ca_ES/stocks.lang @@ -19,8 +19,8 @@ Stock=Estoc Stocks=Estocs MissingStocks=Estocs que falten StockAtDate=Estocs en data -StockAtDateInPast=Data passada -StockAtDateInFuture=Data en el futur +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Estocs per lot/sèrie LotSerial=Lots/Sèries LotSerialList=Llista de lots/sèries @@ -37,8 +37,8 @@ AllWarehouses=Tots els magatzems IncludeEmptyDesiredStock=Inclou també estoc negatives amb estoc desitjat no definit IncludeAlsoDraftOrders=Inclou també projectes d'ordre Location=Lloc -LocationSummary=Nom curt del lloc -NumberOfDifferentProducts=Nombre de productes diferents +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Nombre total de productes LastMovement=Últim moviment LastMovements=Últims moviments @@ -51,7 +51,7 @@ TransferStock=Transferència d'estoc MassStockTransferShort=Transferència d'estoc massiu StockMovement=Moviment d'estoc StockMovements=Moviments d'estoc -NumberOfUnit=Nombre de peces +NumberOfUnit=Nombre d'unitats UnitPurchaseValue=Preu de compra unitari StockTooLow=Estoc insuficient StockLowerThanLimit=L'estoc és menor que el límit de l'alerta (%s) @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Valor d'estocs UserWarehouseAutoCreate=Crea un usuari de magatzem automàticament quan es crea un usuari AllowAddLimitStockByWarehouse=Gestioneu també valors mínims d'estoc desitjat per emparellament (producte-magatzem), a més de valors mínims d'estoc desitjat per producte RuleForWarehouse=Regles per als magatzems -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Estableix un magatzem en pressupostos WarehouseAskWarehouseDuringOrder=Estableix un magatzem per a les comandes de venda UserDefaultWarehouse=Estableix un magatzem per Usuaris MainDefaultWarehouse=Magatzem predeterminat @@ -97,15 +98,16 @@ RealStockDesc=L'estoc físic o real és l'estoc que tens actualment als teus mag RealStockWillAutomaticallyWhen=L'estoc real es modificarà d'acord amb aquesta regla (tal com es defineix al mòdul d'accions): VirtualStock=Estoc virtual VirtualStockAtDate=Estoc virtual a la data -VirtualStockAtDateDesc=Estoc virtual un cop totes les comandes pendents que es preveu fer abans de la data finalitzin +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished VirtualStockDesc=L’estoc virtual és l’estoc disponible calculat un cop tancades (comandes de compra rebudes, comandes de venda enviades, ordres de fabricació produïdes, etc.) totes les accions obertes/pendents (que afecten a les existències) +AtDate=A la data IdWarehouse=Id. magatzem DescWareHouse=Descripció magatzem LieuWareHouse=Localització magatzem WarehousesAndProducts=Magatzems i productes WarehousesAndProductsBatchDetail=Magatzems i productes (amb detall per lot/sèrie) AverageUnitPricePMPShort=Preu mitjà ponderat -AverageUnitPricePMPDesc=El preu unitari mitjà d’entrada que hem hagut de pagar als proveïdors per incorporar el producte al nostre estoc. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Preu de venda unitari EstimatedStockValueSellShort=Valor per vendre EstimatedStockValueSell=Valor per vendre @@ -145,7 +147,7 @@ Replenishments=reaprovisionament NbOfProductBeforePeriod=Quantitat del producte %s en estoc abans del període seleccionat (< %s) NbOfProductAfterPeriod=Quantitat de producte %s en estoc després del període seleccionat (> %s) MassMovement=Moviments en massa -SelectProductInAndOutWareHouse=Seleccioneu un magatzem d'origen i un magatzem de 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". +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 on "%s". RecordMovement=Registre de transferència ReceivingForSameOrder=Recepcions d'aquesta comanda StockMovementRecorded=Moviments d'estoc registrat @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=El nivell d'estoc ha de ser suficient per afegir el StockMustBeEnoughForOrder=El nivell d'estoc ha de ser suficient per afegir el producte/servei a la comanda (la comprovació es fa sobre l'estoc real actual quan s'afegeix una línia a la comanda sigui quina sigui la regla del canvi automàtic d'estoc) StockMustBeEnoughForShipment= El nivell d'estoc ha de ser suficient per afegir el producte/servei a l'enviament (la comprovació es fa sobre l'estoc real actual quan s'afegeix una línia a l'enviament sigui quina sigui la regla del canvi automàtic d'estoc) MovementLabel=Etiqueta del moviment -TypeMovement=Tipus de moviment +TypeMovement=Direction of movement DateMovement=Data de moviment InventoryCode=Moviments o codi d'inventari IsInPackage=Contingut en producte compost @@ -183,6 +185,7 @@ inventoryCreatePermission=Crea un inventari nou inventoryReadPermission=Veure inventaris inventoryWritePermission=Actualitza els inventaris inventoryValidatePermission=Valida l'inventari +inventoryDeletePermission=Delete inventory inventoryTitle=Inventari inventoryListTitle=Inventaris inventoryListEmpty=Cap inventari en progrés @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Es requereix estoc per a triar quin lot uti 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=Aquí podeu veure l'estoc (estoc real) en una data determinada del passat -StockAtDateFutureDesc=Aquí podeu veure l'estoc (estoc virtual) en una data determinada en el futur +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Estoc actual InventoryRealQtyHelp=Estableix el valor a 0 per a restablir la quantitat<br>Mantén el camp buit o elimina la línia per a mantenir-la sense canvis -UpdateByScaning=Actualitza per escaneig +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Actualització per escaneig (codi de barres de producte) UpdateByScaningLot=Actualització per escaneig (codi de barres lot|sèrie) DisableStockChangeOfSubProduct=Desactiva el canvi d'estoc de tots els subproductes d'aquest kit durant aquest moviment. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Pengeu un fitxer i feu clic a la icona %s per seleccionar el fitxer com a fitxer d'importació d'origen ... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reobrir +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ca_ES/suppliers.lang b/htdocs/langs/ca_ES/suppliers.lang index 51901172a7b..4eb4f0ea0f5 100644 --- a/htdocs/langs/ca_ES/suppliers.lang +++ b/htdocs/langs/ca_ES/suppliers.lang @@ -1,8 +1,9 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Proveïdors SuppliersInvoice=Factura del proveïdor +SupplierInvoices=Factures de proveïdor ShowSupplierInvoice=Mostra la factura del proveïdor -NewSupplier=Nou proveïdor +NewSupplier=Proveïdor nou History=Històric ListOfSuppliers=Llista de proveïdors ShowSupplier=Mostra el proveïdor diff --git a/htdocs/langs/ca_ES/ticket.lang b/htdocs/langs/ca_ES/ticket.lang index 8e111a62ae9..953b40e6747 100644 --- a/htdocs/langs/ca_ES/ticket.lang +++ b/htdocs/langs/ca_ES/ticket.lang @@ -70,9 +70,11 @@ Deleted=Esborrat # Dict Type=Tipus Severity=Gravetat +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates -MailToSendTicketMessage=Per enviar un missatge de correu electrònic a partir del tiquet +MailToSendTicketMessage=Per a enviar correus electrònics des del missatge de tiquet # # Admin page @@ -91,8 +93,8 @@ TicketEmailNotificationToHelp=Enviar notificacions per correu electrònic a aque TicketNewEmailBodyLabel=Missatge de text enviat després de crear un bitllet TicketNewEmailBodyHelp=El text especificat aquí s'inserirà en el correu electrònic confirmant la creació d'un nou tiquet des de la interfície pública. La informació sobre la consulta del tiquet s'afegeix automàticament. TicketParamPublicInterface=Configuració de la interfície pública -TicketsEmailMustExist=Es requereix una adreça de correu electrònic correcta per crear un tiquet -TicketsEmailMustExistHelp=A la interfície pública, l'adreça de correu electrònic ja s'hauria d'emplenar a la base de dades per crear un nou tiquet. +TicketsEmailMustExist=Cal crear una adreça de correu electrònic existent per a crear un tiquet +TicketsEmailMustExistHelp=A la interfície pública, l'adreça de correu electrònic ja s'hauria d'emplenar a la base de dades per a crear un nou tiquet. PublicInterface=Interfície pública TicketUrlPublicInterfaceLabelAdmin=URL alternativa per a la interfície pública TicketUrlPublicInterfaceHelpAdmin=És possible definir un àlies al servidor web i, per tant, posar a disposició la interfície pública amb una altra URL (el servidor ha d'actuar com a proxy en aquest nou URL) @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Mostra el logotip del mòdul a la interfície pública TicketsShowModuleLogoHelp=Activeu aquesta opció per a ocultar el mòdul de logotip a les pàgines de la interfície pública TicketsShowCompanyLogo=Mostra el logotip de l'empresa en la interfície pública TicketsShowCompanyLogoHelp=Activeu aquesta opció per a ocultar el logotip de l'empresa principal a les pàgines de la interfície pública -TicketsEmailAlsoSendToMainAddress=També envieu notificacions a l'adreça electrònica principal -TicketsEmailAlsoSendToMainAddressHelp=Activar aquesta opció per enviar un correu electrònic a l'adreça "Correu electrònic de notificació procedent de" (consulteu la configuració a continuació) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restringir la visualització als tiquets assignats a l'usuari actual (no és efectiu per als usuaris externs, sempre estarà limitat al tercer de qui depengui) TicketsLimitViewAssignedOnlyHelp=Només es veuran les entrades assignades a l'usuari actual. No s'aplica a un usuari amb drets de gestió de tiquets. TicketsActivatePublicInterface=Activar la interfície pública @@ -126,10 +128,10 @@ TicketNumberingModules=Mòdul de numeració de tiquets TicketsModelModule=Plantilles de document per a tiquets TicketNotifyTiersAtCreation=Notifica la creació de tercers TicketsDisableCustomerEmail=Desactiveu sempre els correus electrònics quan es crea un tiquet des de la interfície pública -TicketsPublicNotificationNewMessage=Envia correus electrònics quan s'afegeixi un missatge nou +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=Envia correus electrònics quan s'afegeixi un missatge nou des de la interfície pública (a l'usuari assignat o al correu electrònic de notificacions a (actualitzar) i/o al correu electrònic de notificacions) TicketPublicNotificationNewMessageDefaultEmail=Notificar correu electrònic cap a (actualitzar) -TicketPublicNotificationNewMessageDefaultEmailHelp=Envia notificacions de missatges nous per correu electrònic a aquesta adreça si el tiquet no té assignat cap usuari o l’usuari no en té cap. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -263,7 +265,7 @@ TicketNewEmailBodyInfosTrackUrl=Podeu veure el progrés del tiquet fent clic a l TicketNewEmailBodyInfosTrackUrlCustomer=Podeu veure el progrés del tiquet a la interfície específica fent clic al següent enllaç TicketEmailPleaseDoNotReplyToThisEmail=No respongueu directament a aquest correu electrònic. Utilitzeu l'enllaç per respondre des de la mateixa interfície. TicketPublicInfoCreateTicket=Aquest formulari us permet registrar un tiquet de suport al nostre sistema de gestió. -TicketPublicPleaseBeAccuratelyDescribe=Descrigui amb precisió el problema. Proporcioneu la màxima informació possible per permetre que identifiquem correctament la vostra sol·licitud. +TicketPublicPleaseBeAccuratelyDescribe=Descriviu amb precisió el problema. Proporcioneu la màxima informació possible per a permetre’ns identificar correctament la vostra sol·licitud. TicketPublicMsgViewLogIn=Introduïu l'identificador de traça dels tiquets (ID) TicketTrackId=ID de seguiment públic OneOfTicketTrackId=Un dels vostres ID de seguiment @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Últims tiquets modificats BoxLastModifiedTicketDescription=Últimes entrades modificades %s BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No hi ha tiquets modificats recentment +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ca_ES/users.lang b/htdocs/langs/ca_ES/users.lang index 0d7ea59bf46..d6c2bba06d7 100644 --- a/htdocs/langs/ca_ES/users.lang +++ b/htdocs/langs/ca_ES/users.lang @@ -44,7 +44,7 @@ NewGroup=Grup nou CreateGroup=Crear el grup RemoveFromGroup=Eliminar del grup PasswordChangedAndSentTo=Contrasenya canviada i enviada a <b>%s</b>. -PasswordChangeRequest=Sol·licitud per canviar la contrasenya de <b>%s</b> +PasswordChangeRequest=Sol·licitud de canvi de contrasenya per <b> %s </b> PasswordChangeRequestSent=Petició de canvi de contrasenya per a <b>%s</b> enviada a <b>%s</b>. IfLoginExistPasswordRequestSent=Si aquest inici de sessió és un compte vàlid, s'ha enviat un correu electrònic per a restablir la contrasenya. IfEmailExistPasswordRequestSent=Si aquest correu electrònic és un compte vàlid, s'ha enviat un correu electrònic per a restablir la contrasenya. @@ -71,8 +71,8 @@ InternalUser=Usuari intern ExportDataset_user_1=Usuaris i les seves propietats DomainUser=Usuari de domini Reactivate=Reactivar -CreateInternalUserDesc=Aquest formulari us permet crear un usuari intern a la vostra empresa / organització. Per crear un usuari extern (client, proveïdor, etc.), utilitzeu el botó 'Crear usuari Dolibarr' de la targeta de contacte d'un tercer. -InternalExternalDesc=Un usuari <b> intern </b> és un usuari que forma part de la vostra empresa/organització. <br> Un usuari <b> extern </b> és un client, proveïdor o un altre (La creació d’un usuari extern per a un tercer es pot fer des de la fitxa del contacte d’aquest tercer). <br> <br> En ambdós casos, els permisos defineixen privilegis d'acció a Dolibarr, també un usuari extern pot tenir un gestor de menús diferent de l'usuari intern (vegeu Inici - Configuració - Visualització) +CreateInternalUserDesc=Aquest formulari us permet crear un usuari intern a la vostra empresa/organització. Per a crear un usuari extern (client, proveïdor, etc.), utilitzeu el botó "Crea l'usuari Dolibarr" de la fitxa de contacte d'aquest tercer. +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=El permís es concedeix ja que ho hereta d'un grup al qual pertany l'usuari. Inherited=Heretat UserWillBe=L'usuari creat serà @@ -103,7 +103,7 @@ HierarchicalResponsible=Supervisor HierarchicView=Vista jeràrquica UseTypeFieldToChange=Modificar el camp Tipus per canviar OpenIDURL=URL d'OpenID -LoginUsingOpenID=Utilitzeu OpenID per iniciar sessió +LoginUsingOpenID=Utilitzeu OpenID per a iniciar la sessió WeeklyHours=Hores treballades (per setmana) ExpectedWorkedHours=Hores treballades setmanals esperades ColorUser=Color d'usuari diff --git a/htdocs/langs/ca_ES/website.lang b/htdocs/langs/ca_ES/website.lang index 2e035ce7bf6..11cd6fe85f1 100644 --- a/htdocs/langs/ca_ES/website.lang +++ b/htdocs/langs/ca_ES/website.lang @@ -2,12 +2,12 @@ Shortname=Codi WebsiteSetupDesc=Creeu aquí els llocs web que voleu utilitzar. A continuació, vagi a menú de llocs web per editar-los. DeleteWebsite=Elimina la pàgina web -ConfirmDeleteWebsite=Esteu segur que voleu suprimir aquest lloc web? Totes les seves pàgines i contingut també se suprimiran. Els fitxers penjats (com al directori de suports, el mòdul ECM, ...) romandran. +ConfirmDeleteWebsite=Esteu segur que voleu suprimir aquest lloc web? També se suprimiran totes les seves pàgines i contingut. Els fitxers penjats (com al directori de suports, al mòdul ECM...) es mantindran. WEBSITE_TYPE_CONTAINER=Tipus de pàgina/contenidor WEBSITE_PAGE_EXAMPLE=Pàgina web per a utilitzar com a exemple WEBSITE_PAGENAME=Nom/alies de pàgina WEBSITE_ALIASALT=Noms de pàgina alternatius / àlies -WEBSITE_ALIASALTDesc=Utilitzeu aquí la llista d'altres noms / àlies, per la qual cosa també es pot accedir a la pàgina amb altres noms / àlies (per exemple, el nom antic després de canviar el nom de l'àlies per mantenir el vincle d'enllaç a l'antic vincle / nom de treball). La sintaxi és: <br> alternativament1, alternativament2, ... +WEBSITE_ALIASALTDesc=Utilitzeu aquí la llista d'altres noms/àlies, per la qual cosa també es pot accedir a la pàgina amb altres noms/àlies (per exemple, el nom antic després de canviar el nom de l'àlies per a mantenir el vincle d'enllaç a l'antic vincle/nom de treball). La sintaxi és: <br> nomalternatiu1, nomalternatiu2... WEBSITE_CSS_URL=URL del fitxer CSS extern WEBSITE_CSS_INLINE=Fitxer de contingut CSS (comú a totes les pàgines) WEBSITE_JS_INLINE=Fitxer amb contingut Javascript (comú a totes les pàgines) @@ -17,7 +17,7 @@ WEBSITE_HTACCESS=Fitxer .htaccess del lloc web WEBSITE_MANIFEST_JSON=Arxiu del lloc web manifest.json WEBSITE_README=Fitxer README.md WEBSITE_KEYWORDSDesc=Utilitza una coma per separar valors -EnterHereLicenseInformation=Introduïu aquí dades de meta o informació de llicència per enviar un fitxer README.md. si distribuïu el vostre lloc web com a plantilla, el fitxer s’inclourà al paquet temptador. +EnterHereLicenseInformation=Introduïu aquí metadades o informació de llicència per a fer un fitxer README.md. si distribuïu el vostre lloc web com a plantilla, el fitxer s'inclourà al paquet. HtmlHeaderPage=Encapçalament HTML (específic sols per aquesta pàgina) PageNameAliasHelp=Nom o àlies de la pàgina. <br> Aquest àlies també s'utilitza per construir un URL de SEO quan el lloc web es llanci des d'un Host Virtual d'un servidor web (com Apache, Nginx...). Utilitzeu el botó "<strong>%s</strong>" per editar aquest àlies. EditTheWebSiteForACommonHeader=Nota: si voleu definir un encapçalament personalitzat per a totes les pàgines, editeu el encapçalament al nivell del lloc en comptes de la pàgina/contenidor. @@ -42,17 +42,17 @@ ViewPageInNewTab=Mostra la pàgina en una pestanya nova SetAsHomePage=Indica com a Pàgina principal RealURL=URL real ViewWebsiteInProduction=Mostra la pàgina web utilitzant les URLs d'inici -SetHereVirtualHost=<u>Utilitzar amb Apache/NGinx/...</u><br>Creeu al vostre servidor web (Apache, Nginx, ...) un Virtual Host dedicat amb PHP habilitat i un directori arrel a<br><strong>%s</strong> +SetHereVirtualHost=<u>Utilitzeu amb Apache/NGinx/...</u><br>Creeu al vostre servidor web (Apache, Nginx...) un Virtual Host dedicat amb PHP habilitat i un directori arrel a<br><strong>%s</strong> ExampleToUseInApacheVirtualHostConfig=Exemple a utilitzar en la configuració de d'un Virtual Host d'Apache: YouCanAlsoTestWithPHPS=<u> Utilitzeu-lo amb el servidor incrustat de PHP </u> <br> Al desenvolupar l'entorn, és possible que preferiu provar el lloc amb el servidor web incrustat de PHP (requereix PHP 5.5) executant<br> <strong> php -S 0.0. 0.0: 8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP=<u>Executeu el vostre lloc web amb un altre proveïdor de hosting de Dolibarr</u> <br> Si no teniu disponible un servidor web com Apache o NGinx a Internet, podeu exportar i importar el vostre lloc web a una altra instància de Dolibarr proporcionada per un altre proveïdor d'allotjament de Dolibarr que ofereixi una integració completa amb el mòdul del lloc web. Podeu trobar una llista d'alguns proveïdors d'allotjament Dolibarr a <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Comproveu també que l'amfitrió virtual té permisos <strong> %s </strong> en fitxers a <strong> %s </strong> +CheckVirtualHostPerms=Comproveu també que l'usuari del VIRTUAL HOST (per exemple www-data) té permisos <strong>%s</strong> sobre els fitxers a <br><strong>%s</strong> ReadPerm=Llegit WritePerm=Escriu TestDeployOnWeb=Prova / implantació a la web PreviewSiteServedByWebServer=<LI>Vista prèvia %s en una nova pestanya.</LI><br><br>El %s serà servit per un servidor web extern (com ara Apache, Nginx, IIS). Heu d'instal·lar i configurar aquest servidor abans d'apuntar al directori:<br><strong>%s</strong><br> URL servit per un servidor extern:<br><strong>%s</strong><br> -PreviewSiteServedByDolibarr=<u> Previsualitza %s en una nova pestanya. </u><br> <br> El %s serà servit pel servidor Dolibarr així que no cal instal·lar cap servidor web addicional (com ara Apache, Nginx, IIS).<br>L'inconvenient és que l'URL de les pàgines no són amigables i comencen per la ruta del vostre Dolibarr. <br>URL servit per Dolibarr:<br><strong> %s </strong> <br> <br> Per a utilitzar el vostre propi servidor web extern per a servir a aquest lloc web, creeu un amfitrió virtual al vostre servidor web que apunti al directori<br><strong> %s </strong><br>, llavors introduïu el nom d'aquest servidor virtual i feu clic a l'altre botó de vista prèvia. -VirtualHostUrlNotDefined=No s'ha definit la URL de l'amfitrió virtual que serveix el servidor web extern +PreviewSiteServedByDolibarr=<u> Previsualitza %s en una nova pestanya. </u><br> <br> El %s serà servit pel servidor Dolibarr així que no cal instal·lar cap servidor web addicional (com ara Apache, Nginx, IIS).<br>L'inconvenient és que l'URL de les pàgines no són amigables i comencen per la ruta del vostre Dolibarr. <br>URL servit per Dolibarr:<br><strong> %s </strong> <br> <br> Per a utilitzar el vostre propi servidor web extern per a servir aquest lloc web, creeu un VIRTUALHOST al vostre servidor web que apunti al directori<br><strong> %s </strong><br>, llavors introduïu el nom d'aquest servidor virtual i feu clic a l'enllaç "Provar/Desplegar a la web". +VirtualHostUrlNotDefined=No s'ha definit l'URL de l'amfitrió virtual servit per un servidor web extern 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 @@ -105,7 +105,7 @@ InternalURLOfPage=URL interna de la pàgina ThisPageIsTranslationOf=Aquesta pàgina/contenidor és una traducció de ThisPageHasTranslationPages=Aquesta pàgina/contenidor té traducció NoWebSiteCreateOneFirst=Encara no s'ha creat cap lloc web. Creeu-ne un primer. -GoTo=Ves a +GoTo=Aneu a DynamicPHPCodeContainsAForbiddenInstruction=Afegiu un codi PHP dinàmic que conté la instrucció PHP ' <strong>%s</strong> ' prohibida per defecte com a contingut dinàmic (vegeu les opcions ocultes WEBSITE_PHP_ALLOW_xxx per augmentar la llista d’ordres permeses). NotAllowedToAddDynamicContent=No teniu permís per afegir o editar contingut dinàmic de PHP als llocs web. Demana permís o simplement guarda el codi en etiquetes php sense modificar. ReplaceWebsiteContent=Cerqueu o substitueixi el contingut del lloc web @@ -137,3 +137,11 @@ PagesRegenerated=%s pàgina (es) / contenidor (s) regenerada RegenerateWebsiteContent=Regenera els fitxers de memòria cau del lloc web AllowedInFrames=Es permet en marcs DefineListOfAltLanguagesInWebsiteProperties=Definiu la llista de tots els idiomes disponibles a les propietats del lloc web. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ca_ES/zapier.lang b/htdocs/langs/ca_ES/zapier.lang index 4918d3bcb0f..339b5833153 100644 --- a/htdocs/langs/ca_ES/zapier.lang +++ b/htdocs/langs/ca_ES/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier per a Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Mòdul Zapier per a Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configuració de Zapier per a Dolibarr -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Configuració de Zapier per a Dolibarr +ZapierDescription=Interfície amb Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/cs_CZ/accountancy.lang b/htdocs/langs/cs_CZ/accountancy.lang index 93353881a95..6a8932a1eb4 100644 --- a/htdocs/langs/cs_CZ/accountancy.lang +++ b/htdocs/langs/cs_CZ/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Prověřené řádky faktury ExpenseReportLines=Řádky výkazů výdajů navázat ExpenseReportLinesDone=Vázané linie vyúčtování výdajů IntoAccount=Prověřit řádky v účetním účtu -TotalForAccount=Celkem za účetní účet +TotalForAccount=Total accounting account Ventilate=Prověřit @@ -209,7 +209,7 @@ Codejournal=Deník JournalLabel=Označení časopisu NumPiece=počet kusů TransactionNumShort=Num. transakce -AccountingCategory=Personalizované skupiny +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Zde můžete definovat některé skupiny účetních účtů. Budou se používat pro personalizované účetní výkazy. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Řádky, které ještě nejsou vázány, použijte na ## Import ImportAccountingEntries=Účetní zápisy +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Datum exportu WarningReportNotReliable=Upozornění: Tento přehled není založen na záznamníku, takže neobsahuje transakci upravenou ručně v Knihovně. Je-li vaše deník aktuální, zobrazení účetnictví je přesnější. ExpenseReportJournal=Účet výkazů výdajů InventoryJournal=Inventářový věstník + +NAccounts=%s accounts diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index e272aa6e780..8a372311140 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Odstranit zámek spojení YourSession=Vaše relace Sessions=Uživatelské relace WebUserGroup=Web server uživatel / skupina +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Nastavení Vašeho PHP Vám neumožňuje výpis aktivních relací. Složka sloužící k uložení relací <b>(%s)</b> může být chráněna (např. nastavením oprávnění OS nebo PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Poznámka: Ano má efekt pouze tehdy, pokud je aktivní modul <b RemoveLock=Odebrat / přejmenovat soubor <b> %s </b>, pokud existuje, povolit použití nástroje Update / Install. RestoreLock=Obnovte soubor <b>%s,</b> pouze s opravněním ke čtení, chcete-li zakázat jakékoliv použití aktualizačního nástroje. SecuritySetup=Bezpečnostní nastavení +PHPSetup=PHP setup SecurityFilesDesc=Definujte zde možnosti týkající se zabezpečení o nahrávání souborů. ErrorModuleRequirePHPVersion=Chyba, tento modul vyžaduje PHP verze %s nebo vyšší ErrorModuleRequireDolibarrVersion=Chyba, tento modul vyžaduje Dolibarr verze %s nebo vyšší @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Tato oblast poskytuje uživatelských funkcí. Pomocí nabí Purge=Očistit PurgeAreaDesc=Tato stránka umožňuje odstranit všechny soubory generované nebo uložené v Dolibarr (dočasné soubory nebo všechny soubory v adresáři <b> %s </b>). Použití této funkce není obvykle nutné. Je poskytována jako řešení pro uživatele, jejichž Dolibarr hostuje poskytovatel, který nenabízí oprávnění k odstranění souborů generovaných webovým serverem. PurgeDeleteLogFile=Odstranit soubory protokolu, včetně <b> %s </b> definované pro modul Syslog (bez rizika ztráty dat) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Odstranit všechny soubory v adresáři: <b> %s </b>. <br> Tímto odstraníte všechny generované dokumenty související s prvky (subjekty, faktury atd.), Soubory nahrané do modulu ECM, zálohování databází a dočasné soubory. PurgeRunNow=Vyčistit nyní @@ -232,6 +234,7 @@ BoxesAvailable=widgety k dispozici BoxesActivated=Widgety aktivovány ActivateOn=Aktivace na ActiveOn=Aktivováno +ActivatableOn=Activatable on SourceFile=Zdrojový soubor AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dostupné pouze v případě, že není zakázán JavaScript Required=Potřebný @@ -347,9 +350,10 @@ LastActivationAuthor=Poslední aktivátor autorizace LastActivationIP=Nejnovější IP aktivace UpdateServerOffline=Aktualizace serveru v režimu offline WithCounter=Správa počítadlo -GenericMaskCodes=Můžete zadat jakoukoliv masku číselné řady. V masce můžete použít následující značky: <br><b>{000000}</b> číslo, automaticky inkrementované o 1 při každým %s. Počet nul odpovídá požadovanému počtu číslic. Číslo se zleva doplní nulami pro dosažení požadovaného počtu číslic. <br><b>{000000+000}</b> stejné jako předchozí, ale ofset odpovídající číslu napravo od znaku + bude použit pro první %s. <br><b>{000000@x}</b> stejné jako předchozí, ale počítadlo se resetuje na nulu, když je dosaženo měsíce x (x je v rozmezí 1 ~ 12, nebo 0 pro použití prvního měsíce fiskálního roku definované ve vaší konfiguraci, nebo 99 pro vynulování každý měsíc ). Pokud se tato volba používá, a x je 2 nebo vyšší, pak je rovněž požadovaná posloupnost {yy}{mm} či {yyyy}{mm}. <br><b>{dd}</b> den (01 až 31).<br><b>{mm}</b> měsíc (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> nebo <b>{y}</b> rok, 2, 4 nebo 1 číslo. <br> -GenericMaskCodes2=<b>{cccc}</b> Zákaznický kód s n znaky<br><b>{cccc000}</b> Zákaznický kód s n znaky je sledován počítadlem určeným pro zákazníka. Toto počítadlo se resetuje ve stejný čas, jako globální počítadlo<br><b>{tttt}</b> Kód společnosti s n znaky (viz. seznam typů společností). <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Všechny ostatní znaky v masce zůstanou nedotčeny. <br> Mezery nejsou povoleny. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a= <u> Příklad na 99. %s subjektu Společnost s datem 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Příklad třetí osoby vytvořené 03.01.2007:</u> <br> GenericMaskCodes4c=<u>Příklad produktu vytvořeným 03.01.2007:</u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Pokud ponecháte toto pole prázdné, znamená to, ExtrafieldParamHelpselect=Seznam hodnot musí být řádky s formátovým klíčem, hodnota (kde klíč nemůže být '0') <br> <br> například: <br> 1, value1 <br> 2, value2 <br> code3, value3 <br> ... <br> <br> seznam v závislosti na dalším doplňkovém seznamu atributů: <br> 1, value1 | options_ <i> parent_list_code </i>: parent_key <br> 2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> Chcete-li mít seznam v závislosti na jiném seznamu: <br> 1, hodnota1 | <i> parent_list_code </i>: parent_key <br> 2, hodnota2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=Seznam hodnot musí být řádky s formátovým klíčem, hodnota (kde klíč nemůže být '0') <br> <br> například: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... ExtrafieldParamHelpradio=Seznam hodnot musí být řádky s formátovým klíčem, hodnota (kde klíč nemůže být '0') <br> <br> například: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Seznam hodnot pochází z tabulky <br> Syntaxe: table_name: label_field: id_field :: filter <br> Příklad: c_typent: libelle: id :: filter <br> <br> filtr může být jednoduchý test (např. Aktivní = 1) pro zobrazení pouze aktivní hodnoty <br> You může také použít $ ID $ ve filtru, který je aktuální id aktuálního objektu <br> Chcete-li provést SELECT ve filtru, použijte $ SEL $ <br>, pokud chcete filtrovat na extrafields použijte syntaxi extra.fieldcode = ... (kde kód pole je code of extrafield) <br> <br> Aby byl seznam v závislosti na jiném seznamu doplňkových atributů: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> Aby byl seznam v závislosti na jiném seznamu: <br> c_typent: libelle: id: <i> parent_list_code </i> | nadřazený sloupec: filtr +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Ponechte prázdné pro jednoduchý oddělovač <br> Tuto hodnotu nastavíte na 1 pro odlučovač (výchozí nastavení je otevřeno pro novou relaci, poté je stav zachován pro každou uživatelskou relaci) <br>Nastavte tuto položku na 2 pro sbalující se oddělovač. (ve výchozím nastavení sbaleno pro novou relaci, pak je stav udržován pro každou relaci uživatele) LibraryToBuildPDF=Knihovna používaná pro generování PDF @@ -541,6 +545,8 @@ Module40Name=Dodavatelé Module40Desc=Prodejci a řízení nákupu (objednávky a fakturace dodavatelských faktur) Module42Name=Ladicí protokoly Module42Desc=Zařízení pro protokolování (soubor, syslog, ...). Takové protokoly jsou určeny pro technické účely / ladění. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redakce Module49Desc=Editor pro správu Module50Name=Produkty @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind konverze možnosti Module3200Name=Nezměnitelné archivy Module3200Desc=Povolení nezměnitelného protokolu obchodních událostí. Události jsou archivovány v reálném čase. Protokol je tabulka řetězových událostí jen pro čtení, která lze exportovat. Tento modul může být pro některé země povinný. +Module3400Name=Sociální sítě +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Řízení lidských zdrojů (řízení oddělení, pracovní smlouvy a pocity) Module5000Name=Multi-společnost Module5000Desc=Umožňuje spravovat více společností -Module6000Name=Workflow -Module6000Desc=Správa pracovních postupů (automatické vytvoření objektu a / nebo automatické změny stavu) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Webové stránky Module10000Desc=Vytvořte webové stránky (veřejné) pomocí editoru WYSIWYG. Toto je CMS pro webmastery nebo vývojáře (je lepší znát jazyk HTML a CSS). Stačí nastavit svůj webový server (Apache, Nginx, ...) tak, aby ukazoval na vyhrazený adresář Dolibarr, aby byl online na internetu s vaším vlastním názvem domény. Module20000Name=Opustit správu žádostí @@ -805,7 +813,8 @@ PermissionAdvanced253=Vytvářejte/upravujte interní/externí uživatele a opr Permission254=Vytvářejte/upravujte pouze externí uživatele Permission255=Upravit heslo ostatních uživatelů Permission256=Odstraňte nebo deaktivujte ostatní uživatele -Permission262=Rozšiřte přístup ke všem subjektům (nejen subjektům, pro které je tento uživatel prodejním zástupcem). <br> Neúčinné pro externí uživatele (vždy se omezují na návrhy, objednávky, faktury, smlouvy atd.). <br> Není efektivní pro projekty (pouze pravidla týkající se projektových oprávnění, viditelnosti a přiřazení záležitostí). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Přečtěte CA Permission272=Přečtěte si faktury Permission273=Vydání faktury @@ -1175,7 +1184,8 @@ SetupDescription2=Následující dvě části jsou povinné (první dvě položk SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Základní parametry používané k přizpůsobení výchozího chování aplikace. (například pro funkce související se zemí) SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Tento software je sada mnoha modulů / aplikací. Moduly související s vašimi potřebami musí být povoleny a nakonfigurovány. Po aktivaci těchto modulů se zobrazí položky nabídky. SetupDescription5=Ostatní položky nabídky nastavení řídí volitelné parametry. -LogEvents=Události bezpečnostního auditu +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=o Dolibarr InfoBrowser=O prohlížeči @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Spuštění procesu upgradu se zdá být poža YouMustRunCommandFromCommandLineAfterLoginToUser=Tento příkaz musíte spustit z příkazového řádku po přihlášení do shellu s uživatelem <b> %s </b> nebo musíte přidat add-W na konci příkazového řádku pro zadání <b> %s </b> hesla. YourPHPDoesNotHaveSSLSupport=SSL funkce není k dispozici ve vašem PHP DownloadMoreSkins=Další skiny ke stažení -SimpleNumRefModelDesc=Vrací referenční číslo s formátem %syymm-nnnn, kde yy je rok, mm je měsíc a nnnn je sekvenční bez resetování +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Zobrazit profesionální id s adresami ShowVATIntaInAddress=Skrýt číslo DPH uvnitř Společenství s adresami TranslationUncomplete=Částečný překlad @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Jméno / adresa MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Přihlášení / Uživatel MAIN_PROXY_PASS=Proxy server: Heslo -DefineHereComplementaryAttributes=Definujte zde všechny další / vlastní atributy, které chcete zahrnout pro: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Doplňkové atributy ExtraFieldsLines=Doplňkové atributy (linky) ExtraFieldsLinesRec=Doplňkové atributy (řádky faktur šablon) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Přihlášení (unix) LDAPFieldLoginExample=Příklad: uid LDAPFilterConnection=Vyhledávací filtr LDAPFilterConnectionExample=Příklad: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Přihlášení (samba, activedirectory) LDAPFieldLoginSambaExample=Příklad: samaccountname LDAPFieldFullname=Celé jméno @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Vaše společnost byla definována tak, aby nepoužíva AccountancyCode=Účetní kód AccountancyCodeSell=Prodej účtu. kód AccountancyCodeBuy=Nákup účet. kód +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Události a nastavení modulu agendy PasswordTogetVCalExport=Klíč pro autorizaci exportního odkazu +SecurityKey = Security Key PastDelayVCalExport=Neexportovat události starší než AGENDA_USE_EVENT_TYPE=Používejte typy událostí (spravované v menu Nastavení -> Slovníky -> Typ událostí agendy) AGENDA_USE_EVENT_TYPE_DEFAULT=Automaticky nastavte tuto výchozí hodnotu pro typ události ve formuláři pro tvorbu událostí @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Barva pozadí pro liché řádky tabulky BackgroundTableLineEvenColor=barva pozadí pro sudé řádky tabulky MinimumNoticePeriod=Minimální výpovědní lhůta (Vaše žádost dovolená musí být provedeno před tímto zpožděním) NbAddedAutomatically=Počet dnů přidaných do počítadel uživatelů (automaticky) každý měsíc -EnterAnyCode=Toto pole obsahuje odkaz k identifikaci řádku. Zadat libovolnou hodnotu dle vlastního výběru, ale bez speciálních znaků. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Bylo nalezeno několik jazykových variant RemoveSpecialChars=Odstraňte speciální znaky COMPANY_AQUARIUM_CLEAN_REGEX=Filtr Regex pro vyčištění hodnoty (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Nastavení modulu Sociální sítě EnableFeatureFor=Povolit funkce pro <strong> %s </strong> VATIsUsedIsOff=Poznámka: Možnost použít daň z prodeje nebo DPH byla nastavena na hodnotu <strong> Vypnuto </strong> v nabídce %s - %s, takže daň z prodeje nebo Vat bude vždy 0 pro prodej. SwapSenderAndRecipientOnPDF=Zaměnit pozici odesílatele a příjemce na dokumentech PDF -FeatureSupportedOnTextFieldsOnly=Upozornění, funkce je podporována pouze v textových polích. Také musí být nastaven parametr URL akce = create nebo action = editace NEBO název stránky musí skončit s 'new.php' pro spuštění této funkce. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Sběratel e-mailu EmailCollectorDescription=Přidejte plánovanou úlohu a stránku s nastavením pro pravidelné skenování poštovních schránek (pomocí protokolu IMAP) a zaznamenávejte e-maily přijaté do vaší aplikace na správném místě a / nebo vytvořte automaticky nějaké záznamy (například potenciální zákazníci). NewEmailCollector=Nový e-mailový sběratel @@ -2049,8 +2062,11 @@ UseDebugBar=Použijte ladicí lištu DEBUGBAR_LOGS_LINES_NUMBER=Počet posledních řádků protokolu, které se mají uchovávat v konzole WarningValueHigherSlowsDramaticalyOutput=Varování, vyšší hodnoty dramaticky zpomalují výstup ModuleActivated=Je aktivován modul %s a zpomaluje rozhraní +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Exportní modely jsou sdílené s každým ExportSetup=Nastavení modulu Export ImportSetup=Nastavení modulu Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Vytvořte anonymní Ping '+1' k nadačnímu serveru Dolibarr ( FeatureNotAvailableWithReceptionModule=Funkce není k dispozici, pokud je povolen příjem modulu EmailTemplate=Šablona pro e-mail EMailsWillHaveMessageID=E-maily budou mít značku 'Reference' odpovídající této syntaxi +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Pokud chcete mít ve svém PDF duplikované texty ve 2 různých jazycích ve stejném generovaném PDF, musíte zde nastavit tento druhý jazyk, takže vygenerovaný PDF bude obsahovat 2 různé jazyky na stejné stránce, jeden vybraný při generování PDF a tento ( Podporuje to jen několik šablon PDF). Uchovávejte prázdné po dobu 1 jazyka na PDF. FafaIconSocialNetworksDesc=Sem zadejte kód ikony FontAwesome. Pokud nevíte, co je FontAwesome, můžete použít obecnou hodnotu fa-address-book. FeatureNotAvailableWithReceptionModule=Funkce není k dispozici, pokud je povolen příjem modulu @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Druh produktu CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/cs_CZ/banks.lang b/htdocs/langs/cs_CZ/banks.lang index 2a7b3acfdfa..eae8122c9eb 100644 --- a/htdocs/langs/cs_CZ/banks.lang +++ b/htdocs/langs/cs_CZ/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Váš mandát SEPA FindYourSEPAMandate=Toto je vaše mandát SEPA, který autorizuje naši společnost, aby inkasovala inkasní příkaz k vaší bance. Vraťte jej podepsanou (skenování podepsaného dokumentu) nebo pošlete jej poštou AutoReportLastAccountStatement=Automaticky vyplňte pole "číslo bankovního výpisu" s posledním číslem výpisu při odsouhlasení CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Zbarvujte pohyby BankColorizeMovementDesc=Pokud je tato funkce povolena, můžete vybrat konkrétní barvu pozadí pro pohyby debetů nebo kreditů BankColorizeMovementName1=Barva pozadí pro debetní pohyb BankColorizeMovementName2=Barva pozadí pro pohyb úvěru IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/cs_CZ/bills.lang b/htdocs/langs/cs_CZ/bills.lang index 75b7c51af59..55a14d2395a 100644 --- a/htdocs/langs/cs_CZ/bills.lang +++ b/htdocs/langs/cs_CZ/bills.lang @@ -52,11 +52,12 @@ Invoices=Faktury InvoiceLine=Fakturační řádek InvoiceCustomer=Faktura zákazníka CustomerInvoice=Faktura zákazníka -CustomersInvoices=Faktury zákazníků +CustomersInvoices=faktury zákazníků SupplierInvoice=Faktura dodavatele -SuppliersInvoices=Faktury dodavatelů +SuppliersInvoices=Faktury dodavatele +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Faktura dodavatele -SupplierBills=Faktury dodavatelů +SupplierBills=Faktury dodavatele Payment=Platba PaymentBack=Vrácení CustomerInvoicePaymentBack=Vrácení @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Provedené platby PaymentsBackAlreadyDone=Vrácení peněz již bylo provedeno PaymentRule=Pravidlo platby PaymentMode=Způsob platby +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debetní / kreditní karty PaymentTypePP=PayPal IdPaymentMode=Typ platby (id) @@ -373,6 +376,7 @@ DateLastGeneration=Datum poslední generace DateLastGenerationShort=Datum poslední gen. MaxPeriodNumber=Max. počet faktur NbOfGenerationDone=Počet již generovaných faktur +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Počet provedených generací MaxGenerationReached=Maximální počet generací dosáhl InvoiceAutoValidate=Ověřovat faktury automaticky @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Do 14 dnů po skončení měsíce, FixAmount=Fixní částka - 1 řádek s označením „%s“ VarAmount=Variabilní částka (%% celk.) VarAmountOneLine=Proměnná částka (%% tot.) - 1 řádek se štítkem '%s' -VarAmountAllLines=Proměnná částka (%% celkem) - všechny stejné řádky +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankovní převod PaymentTypeShortVIR=Bankovní převod @@ -494,12 +498,16 @@ Cash=Hotovost Reported=Zpožděný DisabledBecausePayments=Není možné, protože existují určité platby CantRemovePaymentWithOneInvoicePaid=Nelze odstranit platbu protože je k dispozici alespoň jedna faktura označená jako zaplacená +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Očekávaná platba CantRemoveConciliatedPayment=Platbu smířenou platbu nelze odstranit PayedByThisPayment=Uhrazeno touto platbou ClosePaidInvoicesAutomatically=Pokud je platba provedena úplně, automaticky klasifikujte všechny standardní, zálohy nebo náhradní faktury jako „placené“. ClosePaidCreditNotesAutomatically=Po úplném vrácení peněz automaticky klasifikujte všechny dobropisy jako „zaplacené“. ClosePaidContributionsAutomatically=Pokud je platba provedena úplně, automaticky klasifikujte všechny sociální nebo fiskální příspěvky jako „placené“. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Všechny faktury bez zbývající částky budou automaticky uzavřeny se stavem "Placené". ToMakePayment=Zaplatit ToMakePaymentBack=Vrátit @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Musíte nejprve vytvořit standardní fakt PDFCrabeDescription=Šablona faktury PDF Crabe. Kompletní šablona faktury (stará implementace Sponge šablony) PDFSpongeDescription=Faktura Šablona PDF Sponge. Kompletní šablona faktury PDFCrevetteDescription=Faktura PDF šablony Crevette. Kompletní fakturu šablona pro situace faktur -TerreNumRefModelDesc1=Vrátí číslo ve formátu %s yymm-nnnn pro standardní faktury a %s yymm-nnnn pro dobropisy, kde yy je rok, mm je měsíc a nnnn je sekvence bez přerušení a bez návratu k 0 -MarsNumRefModelDesc1=Vrátí číslo s formát %syymm-nnnn pro standardní faktury, %syymm-nnnn náhradních faktur, %syymm-nnnn pro akontace faktur a %syymm-nnnn pro dobropisy, kde yy je rok, MM měsíc a nnnn je sekvence bez přestávky a ne vrátí do polohy 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Účet počínaje $syymm již existuje a není kompatibilní s tímto modelem sekvence. Vyjměte ji nebo přejmenujte jej aktivací tohoto modulu. -CactusNumRefModelDesc1=Vrátí číslo s formát %syymm-nnnn pro standardní faktury, %syymm-nnnn pro dobropisy a %syymm-nnnn pro akontace faktur, kde yy je rok, mm je měsíc a nnnn je sekvence bez přestávky, a ne návrat k 0 ° C +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Důvod předčasného uzavření EarlyClosingComment=Předčasná závěrečná poznámka ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Kontakt prodejce služby InvoiceFirstSituationAsk=Faktura první situace InvoiceFirstSituationDesc=<b>Situace faktury</b> jsou vázány na situace do progrese, například průběh stavby. Každá situace je vázána k faktuře. InvoiceSituation=Situace faktury +PDFInvoiceSituation=Situace faktury InvoiceSituationAsk=Faktura v návaznosti na situaci InvoiceSituationDesc=Vytvořit novou situaci v návaznosti na již existující SituationAmount=Situační fakturační částka (čistá) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Pokud potřebujete takové faktury generovat a DeleteRepeatableInvoice=Odstranit šablonu faktury ConfirmDeleteRepeatableInvoice=Jsou vaše jisti, že chcete smazat šablonu faktury? CreateOneBillByThird=Vytvořte jednu fakturu za subjekt (jinak, jedna faktura na objednávku) -BillCreated=%s bill (y) vytvořený +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Stav vytváření dokumentů DoNotGenerateDoc=Nevytvářejte soubor dokumentu AutogenerateDoc=Automatické generování souboru dokumentu @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Faktura dodavatele byla smazána UnitPriceXQtyLessDiscount=Jednotková cena x Množství - Sleva CustomersInvoicesArea=Fakturační oblast zákazníka SupplierInvoicesArea=Fakturační oblast dodavatele +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/cs_CZ/boxes.lang b/htdocs/langs/cs_CZ/boxes.lang index e6624e679e4..62df479df3d 100644 --- a/htdocs/langs/cs_CZ/boxes.lang +++ b/htdocs/langs/cs_CZ/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Informace o přihlášení BoxLastRssInfos=Informace RSS BoxLastProducts=Posledních %s produktů / služeb @@ -17,9 +18,13 @@ BoxLastActions=Poslední akce BoxLastContracts=Nejnovější smlouvy BoxLastContacts=Poslední kontakty/adresy BoxLastMembers=Nejnovější členové +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Nejnovější intervence BoxCurrentAccounts=Zůstatek otevřených účtů BoxTitleMemberNextBirthdays=Narozeniny tohoto měsíce (členové) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Nejnovější %s zprávy z %s BoxTitleLastProducts=Poslední %s modifikované produkty/služby BoxTitleProductsAlertStock=Produkty: upozornění skladu @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Nejnovější %s zásilky zákazníků NoRecordedShipments=Žádná zaznamenaná zásilka zákazníka BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Účetnictví +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/cs_CZ/categories.lang b/htdocs/langs/cs_CZ/categories.lang index fc7d27f5efa..f2da2c07ab7 100644 --- a/htdocs/langs/cs_CZ/categories.lang +++ b/htdocs/langs/cs_CZ/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Oblast značek/kategorií prodejců CustomersCategoriesArea=Oblast zákaznické tagy/kategorie MembersCategoriesArea=Oblast uživatelské tagy/kategorie ContactsCategoriesArea=Oblast tagy/kategorie kontakty -AccountsCategoriesArea=Značky/kategorie účtů +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Oblast projektů značek/kategorií UsersCategoriesArea=Kategorie značek/kategorií uživatelů SubCats=Podkategorie @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Zobrazit tag/kategorii ByDefaultInList=Ve výchozím nastavení je v seznamu ChooseCategory=Vyberte kategorii -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Použití nebo operátor pro kategorie diff --git a/htdocs/langs/cs_CZ/companies.lang b/htdocs/langs/cs_CZ/companies.lang index 7f16ddead5c..995c7c7d9df 100644 --- a/htdocs/langs/cs_CZ/companies.lang +++ b/htdocs/langs/cs_CZ/companies.lang @@ -43,9 +43,10 @@ Individual=Soukromá osoba ToCreateContactWithSameName=Automaticky vytvoří kontakt / adresu se stejnými informacemi jako subjekt v rámci subjektu. Ve většině případů, i když váš subjekt je fyzická osoba, stačí vytvořit subjekt samostatně. ParentCompany=Mateřská společnost Subsidiaries=Dceřiné společnosti -ReportByMonth=Zpráva měsíce -ReportByCustomers=Zpráva od zákazníka -ReportByQuarter=Nahlásit podle kurzu +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Etický kodex RegisteredOffice=Sídlo společnosti Lastname=Příjmení @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Číslo sociálního pojištění) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate číslo) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registrační číslo ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Obchodní povolení) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=ID Id 1 (CUI) ProfId2RO=Id Id 2 (č. Matikulare) ProfId3RO=ID Id 3 (CAEN) ProfId4RO=Prof ID 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Momentální nezaplacený účet OutstandingBill=Max. za nezaplacený účet OutstandingBillReached=Max. pro dosažení vynikajícího účtu OrderMinAmount=Minimální částka pro objednávku -MonkeyNumRefModelDesc=Vrátí číslo ve formátu %syymm-nnnn pro kód zákazníka a %syymm-nnnn pro kód dodavatele kde yy je rok, mm měsíc a nnnn je číselná řada bez přerušení a bez návratu k 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kód je volný. Tento kód lze kdykoli změnit. ManagingDirectors=Jméno vedoucího (CEO, ředitel, předseda ...) MergeOriginThirdparty=Duplicitní subjekt (subjekt, který chcete smazat) diff --git a/htdocs/langs/cs_CZ/compta.lang b/htdocs/langs/cs_CZ/compta.lang index b725f1ab696..03c7be0a85e 100644 --- a/htdocs/langs/cs_CZ/compta.lang +++ b/htdocs/langs/cs_CZ/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=Nákupy SGST VATCollected=Vybraná DPH StatusToPay=Zaplatit SpecialExpensesArea=Oblast pro všechny speciální platby +VATExpensesArea=Area for all TVA payments SocialContribution=Sociální nebo daňová daň SocialContributions=Sociální nebo daně za SocialContributionsDeductibles=Odečitatelné sociální či daně za @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Platba zákaznické faktury PaymentSupplierInvoice=Platba dodavatelské faktury PaymentSocialContribution=Sociální / fiskální placení daní PaymentVat=Platba DPH +AutomaticCreationPayment=Automatically record the payment ListPayment=Seznam plateb ListOfCustomerPayments=Seznam zákaznických plateb ListOfSupplierPayments=Seznam plateb dodavatelům @@ -104,6 +106,8 @@ LT2PaymentES=IRPF platba LT2PaymentsES=IRPF Platby VATPayment=Platba daně z obratu VATPayments=Platby daně z obratu +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Vrácení daně z obratu NewVATPayment=Nová platba daně z obratu NewLocalTaxPayment=Nová daňová %s platba @@ -134,9 +138,17 @@ NoWaitingChecks=Žádný šek nečeká na vklad DateChequeReceived=Zkontrolujte datum příjmu NbOfCheques=Počet kontrol PaySocialContribution=Platit sociální / fiskální daň -ConfirmPaySocialContribution=Opravdu chcete tuto sociální nebo daňovou daň klasifikovat jako zaplacenou? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Odstranit sociální a fiskální platbu daně -ConfirmDeleteSocialContribution=Opravdu chcete vymazat tuto sociální / daňovou daň? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Sociální a fiskální daně a platby CalcModeVATDebt=Režim <b>%sDPH zápočtu na závazky%s.</b> CalcModeVATEngagement=Režim <b>%sDPH z rozšířených příjmů%s.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- To zahrnuje skutečné platby na fakturách, nákladů, DPH a RulesCADue=- Zahrnuje splatné faktury zákazníka, ať už jsou zaplaceny, nebo ne. <br> - Je založeno na fakturačním datu těchto faktur. <br> RulesCAIn=- Zahrnuje všechny efektivní platby faktur obdržených od zákazníků. <br> - Je založeno na datu splatnosti těchto faktur <br> RulesCATotalSaleJournal=Zahrnuje všechny úvěrové linky z žurnálu Prodej. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Zahrnuje záznam ve vašem účtu Ledger s účetními účty, které mají skupinu "EXPENSE" nebo "INCOME" RulesResultBookkeepingPredefined=Zahrnuje záznam ve vašem účtu Ledger s účetními účty, které mají skupinu "EXPENSE" nebo "INCOME" RulesResultBookkeepingPersonalized=Zobrazuje záznam ve vašem účtu s účetními účty <b> seskupenými podle personalizovaných skupin </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Zpráva o dani z prodeje subjekty VATReportByCustomers=Zpráva o dani z prodeje zákazníkem VATReportByCustomersInInputOutputMode=Zpráva o vybrané a zaplacené DPH zákazníka VATReportByQuartersInInputOutputMode=Vykazujte podle sazby daně z prodeje vybíranou a zaplacenou daň +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Nahlásit daň 2 podle sazby LT2ReportByQuarters=Nahlásit daň 3 podle sazby LT1ReportByQuartersES=Zpráva RE hodnocení @@ -217,7 +231,7 @@ Pcg_subtype=Pcg podtyp InvoiceLinesToDispatch=Řádky faktury pro odeslání ByProductsAndServices=Podle produktu a služby RefExt=Externí ref -ToCreateAPredefinedInvoice=Chcete-li vytvořit šablonu faktury, vytvořit standardní faktury, pak bez ověřování jej, klikněte na tlačítko „%s“. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Odkaz na objednávku Mode1=Metoda 1 Mode2=Metoda 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Účelový účet určený na kartě subjektu b ACCOUNTING_ACCOUNT_SUPPLIER=Účet účetnictví používaný pro subjekty dodavatele ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Účelový účet určený na kartě subjektu bude použit pouze pro účetnictví společnosti Subledger. Tato položka bude použita pro hlavní účetní knihu a jako výchozí hodnotu účetnictví společnosti Subledger, pokud není definován účet externího účetního dodavatele subjektu. ConfirmCloneTax=Potvrďte klon sociální / daňové daně +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Kopírovat pro příští měsíc SimpleReport=jednoduchá zpráva AddExtraReport=Další zprávy (přidat zahraniční a národní zprávy od zákazníka) @@ -253,7 +269,8 @@ AccountingAffectation=Účetnictví LastDayTaxIsRelatedTo=Poslední den období souvisí s daní VATDue=Daň z prodeje byla uplatněna ClaimedForThisPeriod=Reklamace na období -PaidDuringThisPeriod=Placené během tohoto období +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Sazbou daně z prodeje TurnoverbyVatrate=Obrat je fakturován sazbou daně z prodeje TurnoverCollectedbyVatrate=Obrat shromážděný podle sazby daně z prodeje @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Shromážděný obrat z nákupu RulesPurchaseTurnoverDue=- Zahrnuje splatné faktury dodavatele, ať už jsou zaplaceny nebo ne. <br> - Je založeno na datu fakturace těchto faktur. <br> RulesPurchaseTurnoverIn=- Zahrnuje všechny efektivní platby faktur provedených dodavatelům. <br> - Je založeno na datu splatnosti těchto faktur <br> RulesPurchaseTurnoverTotalPurchaseJournal=Zahrnuje všechny debetní řádky z deníku nákupu. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Fakturovaný obrat z nákupu ReportPurchaseTurnoverCollected=Shromážděný obrat z nákupu IncludeVarpaysInResults = Zahrnout různé platby do přehledů diff --git a/htdocs/langs/cs_CZ/ecm.lang b/htdocs/langs/cs_CZ/ecm.lang index 69a334d98d8..491dab5f6c0 100644 --- a/htdocs/langs/cs_CZ/ecm.lang +++ b/htdocs/langs/cs_CZ/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Soubor dosud není indexován do databáze (zkuste j ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/cs_CZ/errors.lang b/htdocs/langs/cs_CZ/errors.lang index 0be889628dc..3c541433685 100644 --- a/htdocs/langs/cs_CZ/errors.lang +++ b/htdocs/langs/cs_CZ/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Adresář <b> %s </b>nebyl nalezen (špatná cesta, nesprávná ErrorFunctionNotAvailableInPHP=Funkce <b>%s</b> je nutné pro tuto funkci, ale není k dispozici v této verzi / nastavení PHP. ErrorDirAlreadyExists=Adresář s tímto názvem již existuje. ErrorFileAlreadyExists=Soubor s tímto názvem již existuje. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Soubor nebyl korektně poslán serverem ErrorNoTmpDir=Dočasný směr %s neexistuje. ErrorUploadBlockedByAddon=Nahrávání blokováno pluginem PHP / Apache. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Při načtení tabulky účtů došlo k chybě. Pokud nebyl ErrorBadSyntaxForParamKeyForContent=Špatná syntaxe pro parametr keyforfortent. Musí mít hodnotu začínající %s nebo %s ErrorVariableKeyForContentMustBeSet=Chyba, musí být nastavena konstanta s názvem %s (s obsahem textu, který se má zobrazit) nebo %s (s externí adresou URL). ErrorURLMustStartWithHttp=Adresa URL %s musí začínat http: // nebo https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Chyba, nový odkaz je již použit ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Chyba, odstranění platby spojené s uzavřenou fakturou není možné. ErrorSearchCriteriaTooSmall=Vyhledávací kritéria jsou příliš malá. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Veřejné rozhraní nebylo povoleno ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Váš parametr PHP upload_max_filesize (%s) je vyšší než parametr PHP post_max_size (%s). Toto není konzistentní nastavení. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/cs_CZ/externalsite.lang b/htdocs/langs/cs_CZ/externalsite.lang index 473892a41db..2a75cea4aa9 100644 --- a/htdocs/langs/cs_CZ/externalsite.lang +++ b/htdocs/langs/cs_CZ/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Nastavení odkazu na externí webové stránky -ExternalSiteURL=URL externích stránek +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul Externí stránky nebyl správně nakonfigurován. ExampleMyMenuEntry=Moje menu vstup diff --git a/htdocs/langs/cs_CZ/main.lang b/htdocs/langs/cs_CZ/main.lang index e5c81c5c737..b0431474555 100644 --- a/htdocs/langs/cs_CZ/main.lang +++ b/htdocs/langs/cs_CZ/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Datum úpravy IPModification=Modification IP DateLastModification=Datum poslední změny DateValidation=Datum ověření +DateSigning=Signing date DateClosing=Uzávěrka DateDue=Datum splatnosti DateValue=Hodnota data @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Jednotková cena (bez) (měny) UnitPriceTTC=Jednotková cena PriceU=UP PriceUHT=UP (bez DPH) -PriceUHTCurrency=U.P (měna) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (Včetně daně) Amount=Množství AmountInvoice=Fakturovaná částka @@ -389,6 +390,8 @@ AmountTotal=Celková částka AmountAverage=Průměrná částka PriceQtyMinHT=Cena min. (bez daně) PriceQtyMinHTCurrency=Cena min. (bez daně) (měna) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procento Total=Celkový SubTotal=Mezisoučet @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Aktuální jazyk CurrentTheme=Aktuální téma CurrentMenuManager=Manager aktuální nabídky @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Odstraňte řetězec ‚%s‘ SomeTranslationAreUncomplete=Některé nabízené jazyky mohou být pouze částečně přeloženy nebo mohou obsahovat chyby. Český překlad je jen základní a orientační, může být nepřesný a mimo kontext. Pomozte prosím opravit svůj jazyk registrováním na <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> a přidejte své vylepšení. -DirectDownloadLink=Přímý odkaz ke stažení (veřejné / externí) -DirectDownloadInternalLink=Přímý odkaz na stažení (musí být zaznamenáván a potřebuje oprávnění) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Stažení DownloadDocument=Stáhnout dokument ActualizeCurrency=Aktualizovat měnovou sazbu @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakty SearchIntoMembers=Členové SearchIntoUsers=Uživatelé SearchIntoProductsOrServices=Produkty nebo služby +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekty SearchIntoMO=Výrobní zakázky SearchIntoTasks=Úkoly @@ -1049,12 +1055,13 @@ KeyboardShortcut=Klávesová zkratka AssignedTo=Přiřazeno Deletedraft=Odstranění konceptu ConfirmMassDraftDeletion=Potvrďte potvrzení o masovém odstranění -FileSharedViaALink=Soubor sdílený prostřednictvím odkazu +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Nejprve vyberte subjekt ... YouAreCurrentlyInSandboxMode=V současné době se nacházíte v %srežimu "sandbox" Inventory=Inventář AnalyticCode=Analytický kód TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Zobrazit další informace NoFilesUploadedYet=Nejprve nahrajte dokument SeePrivateNote=Viz soukromá poznámka @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/cs_CZ/margins.lang b/htdocs/langs/cs_CZ/margins.lang index be4b9a60b78..ed1b98b7167 100644 --- a/htdocs/langs/cs_CZ/margins.lang +++ b/htdocs/langs/cs_CZ/margins.lang @@ -22,7 +22,7 @@ ProductService=Produkt nebo služba AllProducts=Všechny produkty a služby ChooseProduct/Service=Zvolte produkt nebo službu ForceBuyingPriceIfNull=Nákup síly/cena za cenu prodejní ceny, pokud není definována -ForceBuyingPriceIfNullDetails=Není-li cena nákupu / cena stanovena a tato volba je zapnutá, bude marže nulová na řádku (cena nákupu / prodejní cena = prodejní cena), v opačném případě ("OFF") se marge rovná navrhovanému selhání. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Metoda marže pro globální slevy UseDiscountAsProduct=Jako produkt UseDiscountAsService=Jako služba diff --git a/htdocs/langs/cs_CZ/members.lang b/htdocs/langs/cs_CZ/members.lang index d8ec8bdfbf6..0119a066681 100644 --- a/htdocs/langs/cs_CZ/members.lang +++ b/htdocs/langs/cs_CZ/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Seznam členů návrhu (bude ověřeno) MembersListValid=Seznam platných členů MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Seznam ukončených členů MembersListQualified=Seznam kvalifikovaných členů MenuMembersToValidate=Návrh členů MenuMembersValidated=Ověření členové +MenuMembersExcluded=Excluded members MenuMembersResiliated=Ukončené členové MembersWithSubscriptionToReceive=Členové s předplatným k přijímání MembersWithSubscriptionToReceiveShort=Předplatné k odběru @@ -47,9 +49,12 @@ MemberStatusActiveLate=předplatné vypršelo MemberStatusActiveLateShort=Vypršela MemberStatusPaid=Zasílání novinek aktuální MemberStatusPaidShort=Až do dnešního dne +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Ukončený člen MemberStatusResiliatedShort=ukončený MembersStatusToValid=Návrhy členů +MembersStatusExcluded=Excluded members MembersStatusResiliated=Ukončené členové MemberStatusNoSubscription=Ověření (není třeba předplatné) MemberStatusNoSubscriptionShort=Ověřeno @@ -82,6 +87,8 @@ Physical=Fyzický Moral=Morální MorAndPhy=Moral and Physical Reenable=Znovu povolit +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Ukončit člena ConfirmResiliateMember=Jste si jisti, že chcete ukončit tyto členy? DeleteMember=Odstranění člena @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Šablona e-mailu, která se použ DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Šablona e-mailu, která se používá k odeslání e-mailu členovi při nahrávání nového odběru DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Šablona e-mailu, která se používá k odeslání upozornění na e-mail při uplynutí platnosti předplatného DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Šablona e-mailu, která se používá k odeslání e-mailu členovi na zrušení člena +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Email odesílatele pro automatické e-maily DescADHERENT_ETIQUETTE_TYPE=Formát stránky štítků DescADHERENT_ETIQUETTE_TEXT=Text vytištěný na adresních listech členů @@ -162,6 +170,7 @@ DocForLabels=Generovat adresářové listy SubscriptionPayment=Platba předplatného LastSubscriptionDate=Datum poslední platby předplatného LastSubscriptionAmount=Částka nejnovějších odběrů +LastMemberType=Last Member type MembersStatisticsByCountries=Členové Statistiky podle země MembersStatisticsByState=Členové statistika stát / provincie MembersStatisticsByTown=Členové statistika podle města diff --git a/htdocs/langs/cs_CZ/modulebuilder.lang b/htdocs/langs/cs_CZ/modulebuilder.lang index 325c3fe3b52..0bd2158158e 100644 --- a/htdocs/langs/cs_CZ/modulebuilder.lang +++ b/htdocs/langs/cs_CZ/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Chci z objektu vygenerovat nějaké dokumenty IncludeDocGenerationHelp=Pokud toto zaškrtnete, bude vygenerován nějaký kód pro přidání pole „Generovat dokument“ do záznamu. ShowOnCombobox=Zobrazit hodnotu do komboboxu KeyForTooltip=Klíč pro popis -CSSClass=Třída CSS +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Nelze upravovat ForeignKey=Cizí klíč TypeOfFieldsHelp=Typ polí: <br> varchar (99), dvojitý (24,8), reálný, text, html, datetime, timestamp, celé číslo, celé číslo: ClassName: relativní cesta / do / classfile.class.php [: 1 [: filter]] ('1' znamená, že přidáme tlačítko + za kombajn pro vytvoření záznamu, 'filter' může být 'status = 1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)) diff --git a/htdocs/langs/cs_CZ/orders.lang b/htdocs/langs/cs_CZ/orders.lang index a0e3d581017..35998344515 100644 --- a/htdocs/langs/cs_CZ/orders.lang +++ b/htdocs/langs/cs_CZ/orders.lang @@ -16,6 +16,8 @@ ToOrder=Udělat objednávku MakeOrder=Udělat objednávku SupplierOrder=Nákupní objednávka SuppliersOrders=Objednávky +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Aktuální objednávky CustomerOrder=Prodejní objednávka CustomersOrders=Prodejní objednávky diff --git a/htdocs/langs/cs_CZ/other.lang b/htdocs/langs/cs_CZ/other.lang index 23b567fc52b..9685ebcb215 100644 --- a/htdocs/langs/cs_CZ/other.lang +++ b/htdocs/langs/cs_CZ/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Správa malé nebo střední firmy s více činnostmi (všechny h CreatedBy=Vytvořil %s ModifiedBy=Změnil %s ValidatedBy=Ověřil %s +SignedBy=Signed by %s ClosedBy=Uzavřel %s CreatedById=Uživatel id, který vytvořil ModifiedById=ID uživatele, který udělal poslední změnu @@ -244,6 +245,7 @@ NewKeyIs=To je vaše nové heslo k přihlášení NewKeyWillBe=Vaše nové heslo pro přihlášení do softwaru bude ClickHereToGoTo=Klikněte zde pro přechod na %s YouMustClickToChange=Musíte však nejprve kliknout na následující odkaz pro potvrzení této změny hesla +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Pokud jste o tuto změnu nežádali, stačí pouze odstranit tento e-mail. Vaše přihlašovací údaje jsou v bezpečí. IfAmountHigherThan=je-li množství vyšší než <strong>%s</strong> SourcesRepository=Úložiště pro zdroje diff --git a/htdocs/langs/cs_CZ/productbatch.lang b/htdocs/langs/cs_CZ/productbatch.lang index c4df0ba8c4b..d4609f7b491 100644 --- a/htdocs/langs/cs_CZ/productbatch.lang +++ b/htdocs/langs/cs_CZ/productbatch.lang @@ -1,24 +1,35 @@ # ProductBATCH language file - en_US - ProductBATCH -ManageLotSerial=Použijte množství/sériové číslo -ProductStatusOnBatch=Ano (množství/sériové číslo vyžadováno) -ProductStatusNotOnBatch=Ne (množství/sériové číslo není použito) -ProductStatusOnBatchShort=Ano +ManageLotSerial=Používat šarži/sériové číslo +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) +ProductStatusNotOnBatch=Ne (šarže/sériové číslo není použito) +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ne -Batch=Množství/sériové +Batch=Šarže/série atleast1batchfield=Spotřeba podle data nebo datum prodeje nebo množství/sériové číslo -batch_number=Množství/Sériové číslo -BatchNumberShort=Množství/Série -EatByDate=Spotřeba podle data -SellByDate=Prodej podle data -DetailBatchNumber=Detail množství/série -printBatch=Množství/Série: %s +batch_number=Šarže/sériové číslo +BatchNumberShort=Šarže/Série +EatByDate=Datum spotřeby +SellByDate=Datum prodeje +DetailBatchNumber=Detaily šarže/série +printBatch=Šarže/Série: %s printEatby=Spotřeba: %s printSellby=Prodej: %s -printQty=Qty: %d -AddDispatchBatchLine=Přidat řádek pro dispečink skladovatelnosti -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=Tento produkt nepoužívá šarže/sériové číslo -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 +printQty=Množství: %d +AddDispatchBatchLine=Přidat řádek pro skladovatelnost +WhenProductBatchModuleOnOptionAreForced=Pokud je modul šarží a sérií zapnut, je automatické "snížení zásob" nastaveno na "Snížit zásoby při potvrzení dopravy" a automatické zvýšení zásob nastaveno na "Zvýšit zásoby při ruční expedici do skladů" a volba nemůže být změněna. Ostatní volby lze definovat libovolně. +ProductDoesNotUseBatchSerial=Tento produkt nepoužívá šarže/sériová čísla +ProductLotSetup=Nastavení modulu šarží a sérií +ShowCurrentStockOfLot=Zobrazit aktuální zásoby šarží produktu +ShowLogOfMovementIfLot=Zobrazit log pohybů šarží produktu +StockDetailPerBatch=Zásoby dané šarže +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/cs_CZ/products.lang b/htdocs/langs/cs_CZ/products.lang index 9f144427c41..037c83e4ea8 100644 --- a/htdocs/langs/cs_CZ/products.lang +++ b/htdocs/langs/cs_CZ/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=DPH (pro tento prodejce / produkt) DiscountQtyMin=Sleva pro tento počet. NoPriceDefinedForThisSupplier=Pro tento dodavatel / produkt není definována žádná cena / množství NoSupplierPriceDefinedForThisProduct=Pro tento produkt není definována cena / množství prodejce +PredefinedItem=Predefined item PredefinedProductsToSell=Předdefinovaný produkt PredefinedServicesToSell=Předdefinovaná služba PredefinedProductsAndServicesToSell=Předdefinované produkty/služby na prodej @@ -313,7 +314,7 @@ LastUpdated=Poslední aktualizace CorrectlyUpdated=Správně aktualizováno PropalMergePdfProductActualFile=Soubory používají k přidání do PDF Azur template are/is PropalMergePdfProductChooseFile=Vyberte soubory PDF -IncludingProductWithTag=Včetně produktu/služby s tagem +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Výchozí cena, skutečná cena může záviset na zákazníkovi WarningSelectOneDocument=Vyberte alespoň jeden dokument DefaultUnitToShow=Jednotka diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index 88f500f0753..b57c679ae68 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Seznam úkolů GoToListOfTimeConsumed=Přejít na seznam času spotřebovaného GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Seznam komerčních návrhů týkajících se projektu ListOrdersAssociatedProject=Seznam prodejních zakázek týkajících se projektu ListInvoicesAssociatedProject=Seznam zákaznických faktur týkajících se projektu @@ -268,3 +269,7 @@ OneLinePerTask=Jeden řádek na úkol OneLinePerPeriod=Jeden řádek za období RefTaskParent=Ref. Nadřazený úkol ProfitIsCalculatedWith=Zisk se vypočítá pomocí +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/cs_CZ/propal.lang b/htdocs/langs/cs_CZ/propal.lang index a945b46a66a..55b8784f043 100644 --- a/htdocs/langs/cs_CZ/propal.lang +++ b/htdocs/langs/cs_CZ/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Poslat obchodní nabídku poštou DatePropal=Datum nabídky DateEndPropal=Datum ukončení platnosti ValidityDuration=Trvání platnosti -CloseAs=Nastavte stav na SetAcceptedRefused=Nastavte přijato/odmítnuto ErrorPropalNotFound=Propal %s nebyl nalezen AddToDraftProposals=Přidat do předlohy nabídky @@ -60,6 +59,7 @@ ConfirmClonePropal=Jste si jisti, že chcete kopírovat obchodní nabídku <b>%s ConfirmReOpenProp=Jste si jisti, že chcete otevřít zpět obchodní nabídku <b>%s</b> ? ProposalsAndProposalsLines=Obchodní nabídka a řádky ProposalLine=Řádky nabídky +ProposalLines=Proposal lines AvailabilityPeriod=Dostupné zpoždění SetAvailability=Nastavte si dostupné zpoždění AfterOrder=po objednání @@ -85,3 +85,8 @@ ProposalCustomerSignature=Písemný souhlas, razítko firmy, datum a podpis ProposalsStatisticsSuppliers=Statistika návrhů dodavatelů CaseFollowedBy=Případ následovaný SignedOnly=Podepsáno pouze +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line + diff --git a/htdocs/langs/cs_CZ/stocks.lang b/htdocs/langs/cs_CZ/stocks.lang index ef41559e9f1..af6fc1f737a 100644 --- a/htdocs/langs/cs_CZ/stocks.lang +++ b/htdocs/langs/cs_CZ/stocks.lang @@ -19,8 +19,8 @@ Stock=Skladem Stocks=Zásoby MissingStocks=Chybějící zásoby StockAtDate=Zásoby k datu -StockAtDateInPast=Datum v minulosti -StockAtDateInFuture=Datum v budoucnosti +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zásoby podle šarže/serie LotSerial=Šarže/série LotSerialList=Seznam šarže/serie @@ -37,8 +37,8 @@ AllWarehouses=Všechny sklady IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Zahrnout také návrhy objednávek Location=Umístění -LocationSummary=Krátký název umístění -NumberOfDifferentProducts=Počet různých výrobků +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Celkový počet produktů LastMovement=poslední pohyb LastMovements=Poslední pohyby @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Hodnota skladů UserWarehouseAutoCreate=Vytvoření uživatelského skladu automaticky při vytváření uživatele AllowAddLimitStockByWarehouse=Spravujte také hodnotu pro minimální a požadovanou zásobu na párování (produktový sklad) kromě hodnoty pro minimální a požadovanou zásobu na produkt RuleForWarehouse=Pravidlo pro sklady -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Nastavit sklad na prodejní objednávky UserDefaultWarehouse=Nastavit sklad na Uživatelé MainDefaultWarehouse=Výchozí sklad @@ -97,15 +98,16 @@ RealStockDesc=Fyzické / skutečné zásoby jsou zásoby, které jsou v současn RealStockWillAutomaticallyWhen=Reálná aktiva bude upravena podle tohoto pravidla (jak je definováno v modulu Akcie): VirtualStock=Virtuální sklad 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 +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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.) +AtDate=At date IdWarehouse=ID skladu 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. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Prodejní jednotková cena EstimatedStockValueSellShort=Hodnota k prodeji EstimatedStockValueSell=Hodnota k prodeji @@ -145,7 +147,7 @@ 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=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". +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 on "%s". RecordMovement=Záznam přenosu ReceivingForSameOrder=Příjmy pro tuto objednávku StockMovementRecorded=Zaznamenány pohyby zásob @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Úroveň zásob musí být dostatečná pro přidán StockMustBeEnoughForOrder=Úroveň zásob musí být dost na to, aby bylo možné přidat produkt / službu na objednávku (kontrola se provádí na aktuálním reálném skladu při přidání řádku do objednávky bez ohledu na pravidlo automatické změny zásob) StockMustBeEnoughForShipment= Úroveň zásob musí být dostatečná pro přidání produktu / služby k odeslání (kontrola se provádí na aktuální reálné akci při přidání řádku do zásilky bez ohledu na pravidlo automatické změny zásob) MovementLabel=Štítek pohybu -TypeMovement=Druh pohybu +TypeMovement=Direction of movement DateMovement=Datum pohybu InventoryCode=Kód pohybu nebo zásob IsInPackage=Obsažené v zásilce @@ -183,6 +185,7 @@ inventoryCreatePermission=Vytvořte nový inventář inventoryReadPermission=Zobrazit zásoby inventoryWritePermission=Aktualizovat inventáře inventoryValidatePermission=Ověřit inventář +inventoryDeletePermission=Delete inventory inventoryTitle=Inventář inventoryListTitle=Zásoby inventoryListEmpty=Neprobíhá inventář @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Zásoba je povinna zvolit, které množstv ForceTo=Vynutit AlwaysShowFullArbo=Zobrazit plný strom skladu v rozbalovacím seznamu propojení skladu (Upozornění: Může to dramaticky snížit výkon) 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Aktuální stav InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Pro nahrání souboru klepněte na ikonku %s pro výběr souboru jako zdrojový soubor importu ... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Znovu otevřeno +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/cs_CZ/suppliers.lang b/htdocs/langs/cs_CZ/suppliers.lang index 35368f625bb..2314bedb54b 100644 --- a/htdocs/langs/cs_CZ/suppliers.lang +++ b/htdocs/langs/cs_CZ/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Dodavatelé SuppliersInvoice=Faktura dodavatele +SupplierInvoices=Faktury dodavatele ShowSupplierInvoice=Zobrazit fakturu dodavatele NewSupplier=Nový dodavatel History=Historie diff --git a/htdocs/langs/cs_CZ/ticket.lang b/htdocs/langs/cs_CZ/ticket.lang index 268ab00719c..a09633b9355 100644 --- a/htdocs/langs/cs_CZ/ticket.lang +++ b/htdocs/langs/cs_CZ/ticket.lang @@ -70,6 +70,8 @@ Deleted=Smazáno # Dict Type=Typ Severity=Vážnost +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Chcete-li poslat e-mail z lístkové zprávy @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Zobrazit logo modulu ve veřejném rozhraní TicketsShowModuleLogoHelp=Povolte tuto možnost, pokud chcete skrýt modul loga na stránkách veřejného rozhraní TicketsShowCompanyLogo=Zobrazit logo společnosti ve veřejném rozhraní TicketsShowCompanyLogoHelp=Povolte tuto možnost, pokud chcete skrýt logo hlavní společnosti na stránkách veřejného rozhraní -TicketsEmailAlsoSendToMainAddress=Také poslat oznámení na hlavní e-mailovou adresu -TicketsEmailAlsoSendToMainAddressHelp=Povolte tuto možnost a odešlete e-mail na adresu „Oznámení e-mailem z adresy“ (viz nastavení níže) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Omezit zobrazení na vstupenky přiřazené aktuálnímu uživateli (neúčinné pro externí uživatele, vždy omezeno na třetí stranu, na které závisí) TicketsLimitViewAssignedOnlyHelp=Viditelné budou pouze vstupenky přiřazené aktuálnímu uživateli. Nevztahuje se na uživatele s právy správy vstupenek. TicketsActivatePublicInterface=Aktivovat veřejné rozhraní @@ -126,10 +128,10 @@ TicketNumberingModules=Modul číslování vstupenek TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Upozornit subjekt na vytvoření 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) +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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) TicketPublicNotificationNewMessageDefaultEmail=E-mail s oznámeními (aktualizace) -TicketPublicNotificationNewMessageDefaultEmailHelp=Pokud na lístek není přiřazen uživatel nebo nemá e-mail, zašlete na tuto adresu e-mailem oznámení o nové zprávě. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Poslední změněné vstupenky BoxLastModifiedTicketDescription=Poslední %s změněné vstupenky BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Žádné poslední změněné vstupenky +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/cs_CZ/users.lang b/htdocs/langs/cs_CZ/users.lang index 3346f1c50ef..afc98c26645 100644 --- a/htdocs/langs/cs_CZ/users.lang +++ b/htdocs/langs/cs_CZ/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Odstranit ze skupiny PasswordChangedAndSentTo=Heslo změněno a poslán na <b>%s.</b> PasswordChangeRequest=Požadavek na změnu hesla pro <b> %s</b> PasswordChangeRequestSent=Žádost o změnu hesla <b>%s</b> zaslána na <b>%s.</b> +IfLoginExistPasswordRequestSent=Pokud je toto přihlášení platným účtem, byl zaslán e-mail k obnovení hesla. +IfEmailExistPasswordRequestSent=Pokud je tento e-mail platným účtem, byl zaslán e-mail k obnovení hesla. ConfirmPasswordReset=Potvrďte resetování hesla MenuUsersAndGroups=Uživatelé a skupiny LastGroupsCreated=Posledních %s vytvořených skupin @@ -70,9 +72,10 @@ ExportDataset_user_1=Uživatelé a jejich vlastnosti DomainUser=Doménový uživatel %s Reactivate=Reaktivace CreateInternalUserDesc=Tento formulář umožňuje vytvořit interní uživatele ve vaší společnosti / organizaci. Chcete-li vytvořit externího uživatele (zákazník, dodavatel atd.), použijte tlačítko "Vytvořit uživatele Dolibarr z karty kontaktu subjektu. -InternalExternalDesc=Interní <b> uživatel </b> je uživatel, který je součástí vaší společnosti / organizace. <br> Externí uživatel <b> </b> je zákazník, prodejce nebo jiný (Vytvoření externího uživatele pro subjekt lze provést z kontaktního záznamu subjektu). <br> <br> V obou případech oprávnění definují práva na Dolibarr, také externí uživatel může mít jiného správce menu než interní uživatel (viz Domů - Nastavení - Displej) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Povolení uděleno, neboť je zděděno z některé uživatelské skupiny. Inherited=Zděděný +UserWillBe=Created user will be UserWillBeInternalUser=Vytvořený uživatel bude interní (protože není spojen s žádnou třetí stranou) UserWillBeExternalUser=Vytvořený uživatel bude externí (protože je spojen s třetí stranou) IdPhoneCaller=Id telefonu volajícího @@ -109,12 +112,14 @@ 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í +DateEmployment=Zaměstnanost +DateEmploymentstart=Datum zahájení zaměstnání DateEmploymentEnd=Datum ukončení zaměstnání +RangeOfLoginValidity=Časové období platnosti přihlášení CantDisableYourself=Nelze zakázat vlastní uživatelský záznam ForceUserExpenseValidator=Validator výkazu výdajů 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 +WarningNotLangOfInterface=Varování, toto je hlavní jazyk, kterým uživatel hovoří, nikoli jazyk rozhraní, které se rozhodl zobrazit. Chcete-li změnit jazyk rozhraní viditelný tímto uživatelem, přejděte na kartu %s diff --git a/htdocs/langs/cs_CZ/website.lang b/htdocs/langs/cs_CZ/website.lang index 1fb8d39059e..228a2e197f2 100644 --- a/htdocs/langs/cs_CZ/website.lang +++ b/htdocs/langs/cs_CZ/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost= <u> Použit Apache / Nginx / ... </u> <br> vytvořit na sv ExampleToUseInApacheVirtualHostConfig=Příklad použití v nastavení virtuálního hostitele Apache: YouCanAlsoTestWithPHPS= <u> Použití s vloženým serverem PHP </u> <br> Při vývoji prostředí můžete upřednostňovat testování webu pomocí integrovaného webového serveru PHP (PHP 5.5 vyžadováno) spuštěním <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP= <u> Provozujte svůj web s jiným poskytovatelem hostingu Dolibarr </u> <br> Pokud nemáte webový server jako Apache nebo NGinx dostupný na internetu, můžete exportovat a importovat webový server na jinou instanci Dolibarr poskytovanou jiným poskytovatelem hostingu Dolibarr. integrace s modulem webových stránek. Seznam některých poskytovatelů hostingu Dolibarr najdete na <a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org </a> -CheckVirtualHostPerms=Zkontrolujte také, že virtuální hostitel má oprávnění <strong> %s </strong> na souborech do <br> <strong> %s </strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Číst WritePerm=Zápis TestDeployOnWeb=Testování / nasazení na webu PreviewSiteServedByWebServer= <u> Náhled %s na nové kartě. </u> <br> <br> %s bude sloužit externímu webovém serveru (jako Apache, Nginx, IIS). Musíte nainstalovat a nastavit tento server předtím, než přejdete k adresáři: <br> <strong> %s </strong> <br> Adresa URL obsluhovaná externím serverem: <br> <strong> %s </strong> -PreviewSiteServedByDolibarr= <u> Náhled %s na nové kartě. </u> <br> <br> Server %s bude obsluhován serverem Dolibarr, takže se nepotřebuje instalovat žádný další webový server (jako Apache, Nginx, IIS). <br> Nevhodné je, že adresy URL stránek nejsou uživatelsky přívětivé a začínají cestou Dolibarru. <br> URL sloužil Dolibarr: <br> <strong> %s </strong> <br> <br> Chcete-li použít vlastní externí webový server sloužit této webové stránky, vytvořit virtuální hostitele na webový server, který ukazoval na adresář <br> <strong> %s </strong> <br> zadejte název tohoto virtuálního serveru a klikněte na další tlačítko náhledu. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=Adresa URL virtuálního hostitele obsluhovaného externím webovým serverem není definována NoPageYet=Zatím žádné stránky YouCanCreatePageOrImportTemplate=Můžete vytvořit novou stránku nebo importovat úplnou šablonu webových stránek @@ -137,3 +137,11 @@ PagesRegenerated=%s regenerováno stránky / kontejnery RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/cs_CZ/zapier.lang b/htdocs/langs/cs_CZ/zapier.lang index 605cf509252..f79d823e2d8 100644 --- a/htdocs/langs/cs_CZ/zapier.lang +++ b/htdocs/langs/cs_CZ/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier pro Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier pro Dolibarr modul - -# -# Admin page -# -ZapierForDolibarrSetup = Nastavení Zapieru pro Dolibarr +ZapierForDolibarrSetup=Nastavení Zapieru pro Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/da_DK/accountancy.lang b/htdocs/langs/da_DK/accountancy.lang index 4f65c3b5d02..9e2f21931cc 100644 --- a/htdocs/langs/da_DK/accountancy.lang +++ b/htdocs/langs/da_DK/accountancy.lang @@ -14,7 +14,7 @@ ACCOUNTING_EXPORT_ENDLINE=Vælg linjeskift type ACCOUNTING_EXPORT_PREFIX_SPEC=Angiv præfiks for filnavnet ThisService=Denne ydelse ThisProduct=Dette produkt -DefaultForService=forvalg ydelse +DefaultForService=Forvalg ydelse DefaultForProduct=Forvalg produkt ProductForThisThirdparty=Produkt til denne tredjepart ServiceForThisThirdparty=Service for denne tredjepart @@ -27,7 +27,7 @@ JournalFinancial=Finanskladde BackToChartofaccounts=Tilbage til kontoplan Chartofaccounts=Kontoplan ChartOfSubaccounts=Diagram over individuelle konti -ChartOfIndividualAccountsOfSubsidiaryLedger=Diagram over underregnskabets individuelle konti +ChartOfIndividualAccountsOfSubsidiaryLedger=Diagram over individuelle konti i datterselskabet CurrentDedicatedAccountingAccount=Aktuel tildelt konto AssignDedicatedAccountingAccount=Ny konto, der skal tildeles InvoiceLabel=Fakturaetiket @@ -43,9 +43,9 @@ GroupIsEmptyCheckSetup=Gruppen er tom, kontroller opsætningen af ​​den brug DetailByAccount=Vis detaljer efter konto AccountWithNonZeroValues=Konti med ikke-nul-værdier ListOfAccounts=Liste over konti -CountriesInEEC=Lande i EØF -CountriesNotInEEC=Lande ikke i EØF -CountriesInEECExceptMe=Lande i EØF undtagen %s +CountriesInEEC=Lande i EU +CountriesNotInEEC=Lande ikke i EU +CountriesInEECExceptMe=Lande i EU undtagen %s CountriesExceptMe=Alle lande undtagen %s AccountantFiles=Eksporter kildedokumenter ExportAccountingSourceDocHelp=Med dette værktøj kan du eksportere de kildehændelser (liste og PDF-filer), der blev brugt til at generere din regnskab. For at eksportere dine tidsskrifter skal du bruge menuindgangen %s - %s. @@ -74,7 +74,7 @@ AccountancyAreaDescExpenseReport=Trin %s: Definer standardkonti for hver type ud AccountancyAreaDescSal=Trin %s: Definer standardkonto for betaling af lønninger. Til dette skal du bruge menupunktet %s. AccountancyAreaDescContrib=TRIN %s: Definer standardregnskabskonti for særlige udgifter (diverse skatter). Til dette skal du bruge menupunktet %s. AccountancyAreaDescDonation=Trin %s: Definer standkonto for donationer. Til dette skal du bruge menupunktet %s. -AccountancyAreaDescSubscription=TRIN %s: Definer standardregnskabskonti for medlemsabonnement. Brug dette til menupunktet %s. +AccountancyAreaDescSubscription=Trin %s: Definer standardregnskabskonti for medlemsabonnement. Brug dette til menupunktet %s. AccountancyAreaDescMisc=Trin %s: Definer obligatorisk standardkonto og standardkonti for diverse transaktioner. Til dette skal du bruge menupunktet %s. AccountancyAreaDescLoan=Trin %s: Definer standardkonti for lån. Til dette skal du bruge menupunktet %s. AccountancyAreaDescBank=Trin %s: Definer regnskabskonto og regnskabskode for hver bank og finanskonto. Til dette skal du bruge menupunktet %s. @@ -92,9 +92,9 @@ ChangeAndLoad=Ret og indlæs Addanaccount=Tilføj en regnskabskonto AccountAccounting=Regnskabskonto AccountAccountingShort=Konto -SubledgerAccount=Subledger-konto -SubledgerAccountLabel=Subledger-kontoetiket -ShowAccountingAccount=Vis regnskabskonto +SubledgerAccount=Underleverandør konto +SubledgerAccountLabel=Underleverandør konto etiket +ShowAccountingAccount=Vis regnskabs konto ShowAccountingJournal=Vis kontokladde ShowAccountingAccountInLedger=Vis regnskabskonto i hovedbog ShowAccountingAccountInJournals=Vis regnskabskonto i tidsskrifter @@ -131,11 +131,11 @@ InvoiceLinesDone=Fakturalinjer, der er bundet ExpenseReportLines=Udgiftsrapportlinjer, der skal bogføres ExpenseReportLinesDone=Linjer bundet til udgiftsrapporter IntoAccount=Bogfør linje i regnskabskonto -TotalForAccount=Ialt for regnskabskonto +TotalForAccount=Samlet regnskabskonto Ventilate=Bogfør -LineId=Linje-ID +LineId=Linje ID Processing=Behandling EndProcessing=Behandling afsluttet. SelectedLines=Valgte linjer @@ -171,10 +171,10 @@ ACCOUNTING_HAS_NEW_JOURNAL=Ny Journal ACCOUNTING_RESULT_PROFIT=Resultatregnskabskonto (fortjeneste) ACCOUNTING_RESULT_LOSS=Resultatregnskabskonto (tab) -ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Tidsskrift for lukning +ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Luknings journal -ACCOUNTING_ACCOUNT_TRANSFER_CASH=Regnskabskonto ved overgangsbankoverførsel -TransitionalAccount=Overgangsbankoverførselskonto +ACCOUNTING_ACCOUNT_TRANSFER_CASH=Regnskabskonto ved overgangs bankoverførsel +TransitionalAccount=Overgangs bankoverførsels konto ACCOUNTING_ACCOUNT_SUSPENSE=Regnskabskonto for afventning DONATION_ACCOUNTINGACCOUNT=Regnskabskonto til registrering af donationer @@ -209,7 +209,7 @@ Codejournal=Kladde JournalLabel=Journalmærke NumPiece=Partsnummer TransactionNumShort=Transaktionsnr. -AccountingCategory=Regnskabskontogrupper +AccountingCategory=Brugerdefineret gruppe GroupByAccountAccounting=Gruppér efter hovedkontokonto GroupBySubAccountAccounting=Gruppér efter underkonto konto AccountingAccountGroupsDesc=Du kan definere her nogle grupper af regnskabskonto. De vil blive brugt til personlige regnskabsrapporter. @@ -258,7 +258,7 @@ ShowSubtotalByGroup=Vis subtotal efter niveau Pcgtype=Kontoens gruppe PcgtypeDesc=Kontogruppe bruges som foruddefinerede 'filter' og 'gruppering' kriterier for nogle regnskabsrapporter. For eksempel bruges 'INKOMST' eller 'UDGIFT' som grupper til regnskabsmæssige regnskaber for produkter til at oprette omkostnings- / indkomstrapporten. -Reconcilable=forenelige +Reconcilable=Afstemning TotalVente=Samlet omsætning ekskl. moms TotalMarge=Samlet salgsforskel @@ -318,7 +318,7 @@ AccountingJournalType3=Køb AccountingJournalType4=Bank AccountingJournalType5=Udgiftsrapport AccountingJournalType8=Beholdning -AccountingJournalType9=Har-nyt +AccountingJournalType9=Har nyt ErrorAccountingJournalIsAlreadyUse=Denne kladde er allerede i brug AccountingAccountForSalesTaxAreDefinedInto=Bemærk: Regnskabskonto for salgsmoms er defineret i menuen <b> %s </b> - <b> %s </b> NumberOfAccountancyEntries=Antal poster @@ -359,16 +359,16 @@ DefaultBindingDesc=Denne side kan bruges til at angive en standardkonto, der ska DefaultClosureDesc=Denne side kan bruges til at indstille parametre, der bruges til regnskabsafslutning. Options=Indstillinger OptionModeProductSell=Salg -OptionModeProductSellIntra=Mode salg eksporteret i EØF -OptionModeProductSellExport=Mode salg eksporteret i andre lande +OptionModeProductSellIntra=Samlet vare salg i EU +OptionModeProductSellExport=Samlet varesalg udenfor EU OptionModeProductBuy=Køb -OptionModeProductBuyIntra=Tilstand købt importeret i EØF -OptionModeProductBuyExport=Tilstand købt importeret fra andre lande +OptionModeProductBuyIntra=Samlet varekøb i EU +OptionModeProductBuyExport=Samlet varekøb uden for EU OptionModeProductSellDesc=Vis alle varer med salgskonto. -OptionModeProductSellIntraDesc=Vis alle produkter med en regnskabskonto for salg i EØF. +OptionModeProductSellIntraDesc=Vis alle produkter med en regnskabskonto for salg i EU. OptionModeProductSellExportDesc=Vis alle produkter med regnskabskonto for andet udenlandsk salg. OptionModeProductBuyDesc=Vis alle varer med købskonto. -OptionModeProductBuyIntraDesc=Vis alle produkter med en regnskabskonto for køb i EØF. +OptionModeProductBuyIntraDesc=Vis alle produkter med en regnskabskonto for køb i EU. OptionModeProductBuyExportDesc=Vis alle produkter med en regnskabskonto for andre udenlandske køb. CleanFixHistory=Fjern regnskabskode fra linjer, der ikke eksisterer som posteringer på konto CleanHistory=Nulstil alle bogføringer for det valgte år @@ -379,9 +379,9 @@ ValueNotIntoChartOfAccount=Den angivne regnskabskonto eksisterer ikke i kontopla AccountRemovedFromGroup=Kontoen blev fjernet fra gruppen SaleLocal=Lokalt salg SaleExport=Eksport salg -SaleEEC=Salg i EØF -SaleEECWithVAT=Salg i EØF med en moms, der ikke er null, så vi antager, at dette IKKE er et intrakommunalt salg, og den foreslåede konto er standardproduktskontoen. -SaleEECWithoutVATNumber=Du kan fastsætte moms-ID for tredjepart eller produktkonto om nødvendigt. +SaleEEC=Salg i EU +SaleEECWithVAT=Salg i EU med en moms, der ikke er null, så vi antager, at dette IKKE er et intrakommunalt salg, og den foreslåede konto er standardproduktskontoen. +SaleEECWithoutVATNumber=Du kan fastsætte moms nummer for tredjepart eller produktkonto om nødvendigt. ## Dictionary Range=Interval for regnskabskonto @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Linjer endnu ikke bundet, brug menuen <a href="%s"> % ## Import ImportAccountingEntries=Regnskabsposter -DateExport=Datoeksport +ImportAccountingEntriesFECFormat=Regnskabsposter - FEC-format +FECFormatJournalCode=Kodejournal (JournalKode) +FECFormatJournalLabel=Etiketjournal (JournalLib) +FECFormatEntryNum=Stykke nummer (EcritureNum) +FECFormatEntryDate=Stykkets dato (EcritureDate) +FECFormatGeneralAccountNumber=Generelt kontonummer (CompteNum) +FECFormatGeneralAccountLabel=Generel kontoetiket (CompteLib) +FECFormatSubledgerAccountNumber=Undernummerets kontonummer (CompAuxNum) +FECFormatSubledgerAccountLabel=Undernummerets kontonummer (CompAuxLib) +FECFormatPieceRef=Stykke ref (PieceRef) +FECFormatPieceDate=Oprettelse af stykke dato (PieceDate) +FECFormatLabelOperation=Betjening af etiketter (EcritureLib) +FECFormatDebit=Debet (Debit) +FECFormatCredit=Kredit (kredit) +FECFormatReconcilableCode=Forenelig kode (EcritureLet) +FECFormatReconcilableDate=Afstemningsdato (DateLet) +FECFormatValidateDate=Stykkets dato valideret (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency-beløb (Montantdevise) +FECFormatMulticurrencyCode=MultiValuta-kode (Idevise) + +DateExport=Eksport dato WarningReportNotReliable=Advarsel, denne rapport er ikke baseret på Ledger, så indeholder ikke transaktion ændret manuelt i Ledger. Hvis din journalisering er opdateret, er bogføringsvisningen mere præcis. ExpenseReportJournal=Udgifts Journal InventoryJournal=Opgørelse Journal + +NAccounts=%s konti diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index 57b913ae14a..dfeca29316f 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Fjern forbindelseslås YourSession=Din session Sessions=Brugere Sessioner WebUserGroup=Webserver bruger / gruppe +PermissionsOnFiles=Tilladelser til filer PermissionsOnFilesInWebRoot=Tilladelser til filer i web-rodmappen PermissionsOnFile=Tilladelser på fil %s NoSessionFound=Din PHP-konfiguration tillade ikke optagelse af aktive sessioner. Den mappe, der bruges til at gemme sessioner (<b> %s </b>), kan være beskyttet (for eksempel via operativsystemet eller ved PHP-direktivet open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: ja er kun effektivt, hvis <b>modul %s</b> er aktiveret RemoveLock=Fjern/omdøbe fil <b> %s </b> hvis den eksisterer, for at tillade brug af Update/Install værktøjet. RestoreLock=Gendan filen <b> %s </b>, kun med tilladelse for "læsning", for at deaktivere yderligere brug af Update/Install-værktøjet. SecuritySetup=Sikkerhedsopsætning +PHPSetup=PHP opsætning SecurityFilesDesc=Definer her muligheder relateret til sikkerhed om upload af filer. ErrorModuleRequirePHPVersion=Fejl, dette modul kræver PHP version %s eller højere ErrorModuleRequireDolibarrVersion=Fejl, dette modul kræver Dolibarr version %s eller højere @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Dette område giver administrationsfunktioner. Brug menuen t Purge=Ryd PurgeAreaDesc=På denne side kan du slette alle filer, der er genereret eller gemt af Dolibarr (midlertidige filer eller alle filer i <b> %s </b> bibliotek). Brug af denne funktion er normalt ikke nødvendig. Den leveres som en løsning for brugere, hvis Dolibarr er vært for en udbyder, der ikke tilbyder tilladelser til at slette filer genereret af webserveren. PurgeDeleteLogFile=Slet log-filer, herunder <b>%s</b> oprettet til Syslog-modul (ingen risiko for at miste data) -PurgeDeleteTemporaryFiles=Slet alle logfiler og midlertidige filer (ingen risiko for at miste data). Bemærk: Sletning af midlertidige filer udføres kun, hvis temp-biblioteket blev oprettet for mere end 24 timer siden. +PurgeDeleteTemporaryFiles=Slet alle logfiler og midlertidige filer (ingen risiko for at miste data). Parameteren kan være 'tempfilesold', 'logfiles' eller begge 'tempfilesold + logfiles'. Bemærk: Sletning af midlertidige filer udføres kun, hvis temp-biblioteket blev oprettet for mere end 24 timer siden. PurgeDeleteTemporaryFilesShort=Slet logfiler og midlertidige filer PurgeDeleteAllFilesInDocumentsDir=Slet alle filer i mappen: <b> %s </b>. <br> Dette vil slette alle genererede dokumenter relateret til elementer (tredjeparter, fakturaer osv. ..), filer uploadet til ECM modulet, database backup dumps og midlertidige filer. PurgeRunNow=Rensningsanordningen nu @@ -232,6 +234,7 @@ BoxesAvailable=Bokse til rådighed BoxesActivated=Bokse aktiveret ActivateOn=Aktivér om ActiveOn=Aktiveret på +ActivatableOn=Aktiverbar til SourceFile=Kildefilen AvailableOnlyIfJavascriptAndAjaxNotDisabled=Kun tilgængelig, hvis JavaScript ikke er slået Required=Påkrævet @@ -278,7 +281,7 @@ Emails=E-Post EMailsSetup=E-post sætop EMailsDesc=Denne side giver dig mulighed for at indstille parametre eller muligheder for afsendelse af e-mail. EmailSenderProfiles=E-mails afsender profiler -EMailsSenderProfileDesc=Du kan holde denne sektion tom. Hvis du indtaster nogle e-mails her, vil de blive tilføjet til listen over mulige afsendere i kombinationsfeltet når din skrive en ny e-mail. +EMailsSenderProfileDesc=Du kan holde denne sektion tom. Hvis du indtaster nogle e-mail adresser her, vil de blive tilføjet til listen over mulige afsendere i kombinationsfeltet når du skrive en ny e-mail. MAIN_MAIL_SMTP_PORT=SMTP / SMTPS-port (standardværdi i php.ini: <b> %s</b>) MAIN_MAIL_SMTP_SERVER=SMTP / SMTPS-vært (standardværdi i php.ini: <b> %s </b>) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP / SMTPS Port (Ikke defineret i PHP på Unix-lignende systemer) @@ -347,9 +350,10 @@ LastActivationAuthor=Seneste aktiveringsforfatter LastActivationIP=Seneste aktivering IP UpdateServerOffline=Opdater server offline WithCounter=Administrer en tæller -GenericMaskCodes=Du kan indtaste enhver nummerering maske. I denne maske, følgende koder kan benyttes:<br><b>{000000}</b> svarer til et antal, som vil blive forøget på hver %s. Indtast så mange nuller, som den ønskede længde af tælleren. Tælleren vil være udfyldt med nuller fra venstre for at have så mange nuller, som maske. <br><b>{000000+000}</b> samme som tidligere, men en forskydning, der svarer til de tal til højre for tegnet + er anvendt, starter den første %s. <br><b>{000000@x}</b> samme som tidligere, men tælleren er blevet nulstillet til nul, når måned x er nået (x mellem 1 og 12, eller 0 for at bruge de første måneder af regnskabsåret, der er defineret i din konfiguration, eller 99 nulstiller man til nul hver måned). Hvis denne indstilling anvendes, og x er 2 eller højere, så er talfølgen {åå}{mm} eller {åååå}{mm} er også påkrævet. <br><b>{dd}</b> i dag (01 til 31).<br><b>{mm}</b> måned (01 til 12).<br><b>{åå}</b> er <b>{åååå}</b> eller <b>{y}</b> år over 2, 4 eller 1 tal. <br> -GenericMaskCodes2=<b>{cccc}</b> den klient-kode på n tegn<br><b>{cccc000}</b> den klient-kode på n tegn, efterfulgt af en tæller, som er dedikeret til kunden. Denne tæller dedikeret til kunden er nulstillet på samme tid, end global counter.<br><b>{tttt}</b> koden af tredje part, type n tegn (se menu Home - Setup - Ordbog - Typer af tredjeparter). Hvis du tilføjer dette tag, tælleren vil være forskellige for hver type af tredje part.<br> +GenericMaskCodes=Du kan indtaste en hvilken som helst nummereringsmaske. I denne maske kan følgende tags bruges: <br> <b> {000000} </b> svarer til et tal, der vil blive forøget på hver %s. Indtast så mange nuller som den ønskede længde på tælleren. Tælleren udfyldes med nuller fra venstre for at have så mange nuller som masken. <br> <b> {000000 + 000} </b> samme som den forrige, men en forskydning svarende til tallet til højre for + -tegnet anvendes fra det første %s. <br> <b> {000000 @ x} </b> samme som den forrige, men tælleren nulstilles til nul, når måned x er nået (x mellem 1 og 12 eller 0 for at bruge de første måneder af regnskabsåret defineret i din konfiguration eller 99 til nulstilles til nul hver måned). Hvis denne indstilling bruges, og x er 2 eller højere, kræves også sekvensen {åå} {mm} eller {åååå} {mm}. <br> <b> {dd} </b> dag (01 til 31). <br> <b> {mm} </b> måned (01 til 12). <br> <b> {åå} </b>, <b> {åååå} </b> eller <b> {y} a09a4b039f <br> +GenericMaskCodes2= <b> {cccc} </b> klientkoden på n tegn <br> <b> {cccc000} </b> kunden er efterfulgt af kunden, der er dedikeret til kunden. Denne tæller dedikeret til kunden nulstilles samtidig med den globale tæller. <br> <b> {tttt} </b> Koden for tredjeparts type på n tegn (se menu Hjem - Opsætning - Ordbog - Typer tredjeparter). Hvis du tilføjer dette tag, vil tælleren være forskellig for hver type tredjepart. <br> GenericMaskCodes3=Alle andre tegn i maske vil forblive intakt. <br> Mellemrum er ikke tilladt. <br> +GenericMaskCodes3EAN=Alle andre tegn i masken forbliver intakte (undtagen * eller? I 13. position i EAN13). <br> mellemrum er ikke tilladt. <br> I EAN13 skal det sidste tegn efter det sidste} i 13. position være * eller? . Det erstattes af den beregnede nøgle. <br> GenericMaskCodes4a=<u>Eksempel på 99 %s af tredje part TheCompany, med dato 2007-01-31:</u><br> GenericMaskCodes4b=<u>Eksempel på tredjemand oprettet den 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Eksempel på vare oprettet 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Blankt felt her betyder, at denne værdi vil blive g ExtrafieldParamHelpselect=Liste over værdier skal være linjer med formatnøgle, værdi (hvor nøglen ikke kan være '0') <br> <br> for eksempel: <br> 1, værdi1 <br> 2, værdi2 <br> kode3, værdi3 <br> ... <br> <br> For at få liste afhængig af en anden komplementær attributliste: <br> 1, værdi1 | options_ <i> parent_list_code </i>: parent_key <br> 2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> For at få listen afhængig af en anden liste: <br> 1, værdi1 | <i> parent_list_code </i>: parent_key <br> 2, value2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=Liste over værdier skal være linjer med formatnøgle, værdi (hvor nøglen ikke kan være '0') <br> <br> for eksempel: <br> 1, værdi1 <br> 2, værdi2 <br> 3, værdi3 <br> ... ExtrafieldParamHelpradio=Liste over værdier skal være linjer med formatnøgle, værdi (hvor nøglen ikke kan være '0') <br> <br> for eksempel: <br> 1, værdi1 <br> 2, værdi2 <br> 3, værdi3 <br> ... -ExtrafieldParamHelpsellist=Liste over værdier kommer fra en tabel <br> Syntaks: tabelnavn: label_field: id_field :: filter <br> Eksempel: c_typent: libelle: id :: filter <br> <br> - id_field er nødvendigvis en primær nøgle = 1) for kun at vise aktiv værdi <br> Du kan også bruge $ ID $ i filteret, som er det aktuelle id for det aktuelle objekt <br> For at bruge en SELECT i filteret skal du bruge nøgleordet $ SEL $ til at omgå anti-injektionsbeskyttelse. <br> hvis du vil filtrere på ekstrafelter skal du bruge syntaks ekstra.fieldcode = ... (hvor feltkode er koden for extrafield) <br> <br> For at få listen afhængig af en anden supplerende attributliste: <br> c_t: <i> parent_list_code </i> | parent_column: filter <br> <br> For at få listen afhængig af en anden liste: <br> c_typent: libelle: id: a049 -ExtrafieldParamHelpchkbxlst=Liste over værdier kommer fra en tabel <br> Syntaks: tabelnavn: label_field: id_field :: filter <br> Eksempel: c_typent: libelle: id :: filter <br> <br> filter kan være en simpel test (f.eks. Aktiv = 1) for at vise kun aktiv værdi <br> Du kan også bruge $ ID $ i filter heks er det nuværende id for nuværende objekt <br> For at gøre et SELECT i filter bruger $ SEL $ <br> hvis du vil filtrere på ekstrafelter brug syntax extra.fieldcode = ... (hvor feltkode er kode for ekstrafelt) <br> <br> For at få listen afhængig af en anden komplementær attributliste: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> For at få listen afhængig af en anden liste: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter +ExtrafieldParamHelpsellist=Liste over værdier kommer fra en tabel <br> Syntaks: tabelnavn: label_field: id_field :: filtersql <br> Eksempel: c_typent: libelle: id :: filtersql <br> <br> - id_felt er nøgle aq34 er nødvendigt. Det kan være en simpel test (f.eks. Aktiv = 1) for kun at vise aktiv værdi <br> Du kan også bruge $ ID $ i filteret, som er det aktuelle id for det aktuelle objekt <br> For at bruge en SELECT i filteret skal du bruge nøgleordet $ SEL $ til omgå anti-injektionsbeskyttelse. <br> hvis du vil filtrere på ekstrafelter skal du bruge syntaks ekstra.fieldcode = ... (hvor feltkode er koden for extrafield) <br> <br> For at få listen afhængig af en anden supplerende attributliste: <br> c_t: <i> parent_list_code </i> | parent_column: filter <br> <br> For at få listen afhængig af en anden liste: <br> c_typent: libelle: id: a049 +ExtrafieldParamHelpchkbxlst=Liste over værdier kommer fra en tabel <br> Syntaks: tabelnavn: label_field: id_field :: filtersql <br> Eksempel: c_typent: libelle: id :: filtersql <br> <br> filter kan kun være en simpel test34 kan også bruge $ ID $ i filterheks er det aktuelle id for det aktuelle objekt <br> For at udføre et SELECT i filter skal du bruge $ SEL $ <br> hvis du vil filtrere på ekstrafelter, skal du bruge syntaks ekstra.fieldcode = ... (hvor feltkode er kode af ekstra felt) <br> <br> for at få listen afhængigt af en anden supplerende liste attribut: <br> c_typent: Libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> for at få listen, afhængigt af en anden liste: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter ExtrafieldParamHelplink=Parametre skal være ObjectName: Classpath <br> Syntaks: ObjectName: Classpath ExtrafieldParamHelpSeparator=Hold tomt for en simpel separator <br> Indstil dette til 1 for en sammenklappende separator (åben som standard for ny session, og derefter bevares status for hver brugersession) <br> Indstil dette til 2 for en sammenklappende separator (kollapset som standard for ny session, derefter holdes status foran hver brugersession) LibraryToBuildPDF=Bibliotek, der bruges for PDF generation @@ -541,6 +545,8 @@ Module40Name=Leverandører Module40Desc=Leverandører og købsstyring (indkøbsordrer og fakturering af leverandørfakturaer) Module42Name=Debug Logs Module42Desc=Logning faciliteter (fil, syslog, ...). Disse logs er for teknisk/debug formål. +Module43Name=Fejlfindingslinje +Module43Desc=Et værktøj til udvikling af tilføjelse af en fejlfindingslinje i din browser. Module49Name=Tekstredigeringsværktøjer Module49Desc=Indstillinger for tekstredigeringsværktøjer Module50Name=Varer @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind konverteringer kapaciteter Module3200Name=Uændrede arkiver Module3200Desc=Aktivér en uforanderlig log over forretningsbegivenheder. Begivenheder arkiveres i realtid. Loggen er et skrivebeskyttet bord af kæden, der kan eksporteres. Dette modul kan være obligatorisk for nogle lande. +Module3400Name=Sociale netværk +Module3400Desc=Aktivér felter til sociale netværk i tredjeparter og adresser (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (forvaltningen af ​​afdelingen, medarbejderkontrakter og følelser) Module5000Name=Multi-selskab Module5000Desc=Giver dig mulighed for at administrere flere selskaber -Module6000Name=Workflow -Module6000Desc=Workflow management (automatisk oprettelse af objekt og/eller automatisk status ændring) +Module6000Name=Inter-moduler Workflow +Module6000Desc=Workflow-styring mellem forskellige moduler (automatisk oprettelse af objekt og / eller automatisk statusændring) Module10000Name=websteder Module10000Desc=Opret websteder (offentlige) med en WYSIWYG-editor. Dette er en webmaster eller udviklerorienteret CMS (det er bedre at kende HTML og CSS sprog). Bare opsæt din webserver (Apache, Nginx, ...) for at pege på det dedikerede Dolibarr-bibliotek for at have det online på internettet med dit eget domænenavn. Module20000Name=Ferie/Fri Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Opret/rediger interne/eksterne brugere og tilladelser Permission254=Opret/rediger kun eksterne brugere Permission255=Opret/rediger anden brugers adgangskode Permission256=Ændre sin egen adgangskode -Permission262=Udvid adgang til alle tredjeparter (ikke kun tredjeparter, for hvilke den pågældende bruger er salgsrepræsentant). <br> Ikke effektiv for eksterne brugere (altid begrænset til sig selv for forslag, ordrer, fakturaer, kontrakter mv.). <br> Ikke effektiv til projekter (kun regler om projekttilladelser, synlighed og opgaveforhold). +Permission262=Udvid adgang til alle tredjeparter OG deres objekter (ikke kun tredjeparter, som brugeren er salgsrepræsentant for). <br> Ikke effektiv for eksterne brugere (altid begrænset til sig selv til forslag, ordrer, fakturaer, kontrakter osv.). <br> Ikke effektiv til projekter (kun regler om projekttilladelser, synlighed og opgave). +Permission263=Udvid adgangen til alle tredjeparter UDEN deres objekter (ikke kun tredjeparter, som brugeren er salgsrepræsentant for). <br> Ikke effektiv for eksterne brugere (altid begrænset til sig selv til forslag, ordrer, fakturaer, kontrakter osv.). <br> Ikke effektiv til projekter (kun regler om projekttilladelser, synlighed og opgave). Permission271=Læs CA Permission272=Læs fakturaer Permission273=Udsteder fakturaer @@ -1175,7 +1184,8 @@ SetupDescription2=Følgende to afsnit er obligatoriske (de to første indgange i SetupDescription3=<a href="%s">%s->%s</a><br><br> Grundlæggende parametre, der bruges til at tilpasse din applikations standardopførsel (f.eks. For landrelaterede funktioner). SetupDescription4=<a href="%s">%s->%s</a><br><br> Denne software er en pakke med mange moduler / applikationer. Modulerne relateret til dine behov skal være aktiveret og konfigureret. Menuposter vises ved aktivering af disse moduler. SetupDescription5=Andre opsætningsmenuindgange styrer valgfrie parametre. -LogEvents=Sikkerhed revision arrangementer +AuditedSecurityEvents=Sikkerhedshændelser, der revideres +NoSecurityEventsAreAduited=Ingen sikkerhedshændelser revideres. Du kan aktivere dem fra menu %s Audit=Audit InfoDolibarr=Om Dolibarr InfoBrowser=Om Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=At køre opgraderingsprocessen ser ud til at v YouMustRunCommandFromCommandLineAfterLoginToUser=Du skal køre denne kommando fra kommandolinjen efter login til en shell med brugerens <b>%s.</b> YourPHPDoesNotHaveSSLSupport=SSL-funktioner ikke er tilgængelige i dit PHP DownloadMoreSkins=Find flere skind på Dolistore.com -SimpleNumRefModelDesc=Returnerer referencenummeret med formatet %syymm-nnnn hvor du er år, mm er måned og nnnn er sekventiel uden nulstilling +SimpleNumRefModelDesc=Returnerer referencenummeret i formatet %syymm-nnnn hvor yy er året, mm er måneden og nnnn er et sekventielt auto-stigende nummer uden nulstilling ShowProfIdInAddress=Vis professionelt id med adresser ShowVATIntaInAddress=Skjul momsregistreringsnummer i Fællesskabet med adresser TranslationUncomplete=Delvis oversættelse @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxyserver: Navn / Adresse MAIN_PROXY_PORT=Proxyserver: Port MAIN_PROXY_USER=Proxyserver: Login / Bruger MAIN_PROXY_PASS=Proxyserver: Adgangskode -DefineHereComplementaryAttributes=Definer her eventuelle ekstra / brugerdefinerede attributter, som du vil være inkluderet i: %s +DefineHereComplementaryAttributes=Definer eventuelle yderligere / tilpassede attributter, der skal føjes til: %s ExtraFields=Supplerende egenskaber ExtraFieldsLines=Supplerende attributter (linjer) ExtraFieldsLinesRec=Supplerende attributter (skabeloner faktura linjer) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (Unix) LDAPFieldLoginExample=Eksempel: uid LDAPFilterConnection=Søgefilter LDAPFilterConnectionExample=Eksempel: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Eksempel: & (objectClass = groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Eksempel: Samaccountnavn LDAPFieldFullname=Fornavn Navn @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Dit firma er blevet defineret til ikke at bruge moms (H AccountancyCode=Regnskabskode AccountancyCodeSell=Salgskonto. kode AccountancyCodeBuy=Indkøbskonto. kode +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Hold afkrydsningsfeltet "Opret automatisk betalingen" tomt som standard, når du opretter en ny skat ##### Agenda ##### AgendaSetup=Opsætning af modul for begivenheder og tidsplan PasswordTogetVCalExport=Nøglen til at tillade eksport link +SecurityKey = Sikkerhedsnøgle PastDelayVCalExport=Må ikke eksportere begivenhed ældre end AGENDA_USE_EVENT_TYPE=Brug begivenhedstyper (styret i menuopsætning -> Ordbøger -> Type agendahændelser) AGENDA_USE_EVENT_TYPE_DEFAULT=Indstil denne standardværdi automatisk for type begivenhed i begivenhedsoprettelsesformular @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Baggrundsfarve til ulige bord linjer BackgroundTableLineEvenColor=Baggrundsfarve til lige bordlinier MinimumNoticePeriod=Mindste opsigelsesperiode (din anmodning om orlov skal ske inden denne forsinkelse) NbAddedAutomatically=Antal dage, der tilføjes til tællere af brugere (automatisk) hver måned -EnterAnyCode=Dette felt indeholder en reference til at identificere linje. Indtast enhver værdi efter eget valg, men uden specialtegn. +EnterAnyCode=Dette felt indeholder en reference til identifikation af linjen. Indtast en hvilken som helst værdi efter eget valg, men uden specialtegn. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Indtast beregningsregel, hvis det forrige felt blev indstillet til Ja. <br> For eksempel: <br> CODEGRP1 + CODEGRP2 SeveralLangugeVariatFound=Flere sprogvarianter fundet RemoveSpecialChars=Fjern specialtegn COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter til ren værdi (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Opsætning af modul Sociale netværk EnableFeatureFor=Aktivér funktioner til <strong> %s </ strong> VATIsUsedIsOff=Bemærk: Muligheden for at bruge salgsafgift eller moms er blevet indstillet til <strong> Fra </strong> i menuen %s - %s, så Salgsskat eller moms anvendes altid 0 for salg. SwapSenderAndRecipientOnPDF=Skift afsender- og modtageradresseposition på PDF-dokumenter -FeatureSupportedOnTextFieldsOnly=Advarsel, funktion understøttes kun på tekstfelter. Også en URL parameter handling = create or action = edit skal indstilles ELLER sidens navn skal slutte med 'new.php' for at udløse denne funktion. +FeatureSupportedOnTextFieldsOnly=Advarsel, funktion understøttet kun i tekstfelter og kombinationslister. Også en URL-parameterhandling = Opret eller handling = redigering skal indstilles ELLER sidenavnet skal slutte med 'new.php' for at udløse denne funktion. EmailCollector=Email samler EmailCollectorDescription=Tilføj et planlagt job og en opsætningsside for at scanne jævnligt emailkasser (ved hjælp af IMAP-protokollen) og optag e-mails, der er modtaget i din ansøgning, på det rigtige sted og / eller lav nogle poster automatisk (som kundeemner). NewEmailCollector=Ny Email Collector @@ -2049,8 +2062,11 @@ UseDebugBar=Brug fejlfindingslinjen DEBUGBAR_LOGS_LINES_NUMBER=Antal sidste loglinjer, der skal holdes i konsollen WarningValueHigherSlowsDramaticalyOutput=Advarsel, højere værdier bremser dramatisk output ModuleActivated=Modul %s er aktiveret og forsinker grænsefladen +ModuleActivatedWithTooHighLogLevel=Modul %s er aktiveret med et for højt logningsniveau (prøv at bruge et lavere niveau for bedre præstationer) +ModuleSyslogActivatedButLevelNotTooVerbose=Modul %s er aktiveret, og logniveau (%s) er korrekt (ikke for detaljeret) IfYouAreOnAProductionSetThis=Hvis du er i et produktionsmiljø, skal du indstille denne egenskab til %s. AntivirusEnabledOnUpload=Antivirus aktiveret på uploadede filer +SomeFilesOrDirInRootAreWritable=Nogle filer eller mapper er ikke i en skrivebeskyttet tilstand EXPORTS_SHARE_MODELS=Eksportmodeller deles med alle ExportSetup=Opsætning af modul Eksport ImportSetup=Opsætning af modul til import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Lav en anonym Ping '+1' til Dolibarr foundation-serveren (udf FeatureNotAvailableWithReceptionModule=Funktion ikke tilgængelig, når modulmodtagelse er aktiveret EmailTemplate=Skabelon til e-mail EMailsWillHaveMessageID=E-mails har et mærke 'Referencer', der matcher denne syntaks +PDF_SHOW_PROJECT=Vis projekt på dokument +ShowProjectLabel=Projektmærke PDF_USE_ALSO_LANGUAGE_CODE=Hvis du vil have nogle tekster i din PDF kopieret på 2 forskellige sprog i den samme genererede PDF, skal du indstille her dette andet sprog, så genereret PDF indeholder 2 forskellige sprog på samme side, det, der er valgt, når du genererer PDF og denne ( kun få PDF-skabeloner understøtter dette). Hold tomt i 1 sprog pr. PDF. FafaIconSocialNetworksDesc=Indtast her koden for et FontAwesome-ikon. Hvis du ikke ved, hvad der er FontAwesome, kan du bruge den generiske værdi fa-adressebog. FeatureNotAvailableWithReceptionModule=Funktion ikke tilgængelig, når modulmodtagelse er aktiveret @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Det anbefales at skifte denne værdi til %s for mer DictionaryProductNature= Produktets art CountryIfSpecificToOneCountry=Land (hvis det er specifikt for et givet land) YouMayFindSecurityAdviceHere=Du kan finde sikkerhedsrådgivning her -ModuleActivatedMayExposeInformation=Dette modul kan udsætte følsomme data. Hvis du ikke har brug for det, skal du deaktivere det. +ModuleActivatedMayExposeInformation=Denne PHP-udvidelse kan udsætte følsomme data. Hvis du ikke har brug for det, skal du deaktivere det. ModuleActivatedDoNotUseInProduction=Et modul designet til udviklingen er blevet aktiveret. Aktivér det ikke i et produktionsmiljø. CombinationsSeparator=Separatorkarakter til produktkombinationer SeeLinkToOnlineDocumentation=Se link til online dokumentation i topmenuen for eksempler SHOW_SUBPRODUCT_REF_IN_PDF=Hvis funktionen "%s" i modul <b> %s </b> bruges, skal du vise detaljer om delprodukter af et sæt på PDF. AskThisIDToYourBank=Kontakt din bank for at få dette ID +AdvancedModeOnly=Tilladelse er kun tilgængelig i udvidet tilladelsestilstand +ConfFileIsReadableOrWritableByAnyUsers=Conf-filen kan læses eller skrives af alle brugere. Giv kun tilladelse til webserverbrugere og -grupper. +MailToSendEventOrganization=Begivenhedsorganisation +AGENDA_EVENT_DEFAULT_STATUS=Standardhændelsesstatus, når du opretter en begivenhed fra formularen +YouShouldDisablePHPFunctions=Du skal deaktivere PHP-funktioner +IfCLINotRequiredYouShouldDisablePHPFunctions=Bortset fra hvis du har brug for at køre systemkommandoer (for modulet Planlagt job eller for at køre den eksterne kommandolinje for eksempel Anti-virus), skal du deaktivere PHP-funktioner +NoWritableFilesFoundIntoRootDir=Ingen skrivbare filer eller mapper til de almindelige programmer blev fundet i din rodkatalog (God) +RecommendedValueIs=Anbefalet: %s +ARestrictedPath=En begrænset sti diff --git a/htdocs/langs/da_DK/banks.lang b/htdocs/langs/da_DK/banks.lang index c1fb2a83106..4e7a7706f4b 100644 --- a/htdocs/langs/da_DK/banks.lang +++ b/htdocs/langs/da_DK/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Dit SEPA mandat FindYourSEPAMandate=Dette er dit SEPA-mandat til at give vores firma tilladelse til at foretage en direkte debitering til din bank. Ret det underskrevet (scan af det underskrevne dokument) eller send det pr. Mail til AutoReportLastAccountStatement=Udfyld automatisk feltet 'antal kontoudtog' med det sidste erklæringsnummer, når du foretager afstemning CashControl=POS kasse apparats kontrol -NewCashFence=Ny kasse apparat lukker +NewCashFence=Ny kasseapparat åbner eller lukker BankColorizeMovement=Farvelæg bevægelser BankColorizeMovementDesc=Hvis denne funktion er aktiveret, kan du vælge specifik baggrundsfarve til debet- eller kreditbevægelser BankColorizeMovementName1=Baggrundsfarve til debetbevægelse BankColorizeMovementName2=Baggrundsfarve til kreditbevægelse IfYouDontReconcileDisableProperty=Hvis du ikke foretager bankafstemninger på nogle bankkonti, skal du deaktivere ejerskab "%s" på dem for at fjerne denne advarsel. NoBankAccountDefined=Ingen bankkonto defineret +NoRecordFoundIBankcAccount=Ingen registrering fundet på bankkontoen. Dette sker normalt, når en post er slettet manuelt fra listen over transaktioner på bankkontoen (for eksempel under en afstemning af bankkontoen). En anden grund er, at betalingen blev registreret, da modulet "%s" blev deaktiveret. diff --git a/htdocs/langs/da_DK/bills.lang b/htdocs/langs/da_DK/bills.lang index 07502e953de..6d0f386fced 100644 --- a/htdocs/langs/da_DK/bills.lang +++ b/htdocs/langs/da_DK/bills.lang @@ -52,11 +52,12 @@ Invoices=Fakturaer InvoiceLine=Fakturalinje InvoiceCustomer=Kundefaktura CustomerInvoice=Kundefaktura -CustomersInvoices=Kundefakturaer +CustomersInvoices=Kunde fakturaer SupplierInvoice=Leverandørfaktura -SuppliersInvoices=Leverandørfakturaer +SuppliersInvoices=Leverandør fakturaer +SupplierInvoiceLines=Leverandørfakturelinjer SupplierBill=Leverandørfaktura -SupplierBills=leverandørfakturaer +SupplierBills=Leverandør fakturaer Payment=Betaling PaymentBack=Tilbagebetaling CustomerInvoicePaymentBack=Tilbagebetaling @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Betalinger allerede udført PaymentsBackAlreadyDone=Tilbagebetaling allerede udført PaymentRule=Betalingsregel PaymentMode=Betalings type +DefaultPaymentMode=Standard betalingstype +DefaultBankAccount=Standard bankkonto PaymentTypeDC=Debet / Kreditkort PaymentTypePP=PayPal IdPaymentMode=Betalingstype (id) @@ -373,6 +376,7 @@ DateLastGeneration=Dato for seneste generation DateLastGenerationShort=Dato seneste gener. MaxPeriodNumber=Maks. antal fakturaproduktion NbOfGenerationDone=Antal fakturagenerering allerede udført +NbOfGenerationOfRecordDone=Antallet af rekordgenerering, der allerede er udført NbOfGenerationDoneShort=Antal genererede færdigheder MaxGenerationReached=Maksimalt antal generationer nået InvoiceAutoValidate=Validér fakturaer automatisk @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Inden for 14 dage efter slutningen af ​​måneden FixAmount=Fast beløb - 1 linje med etiketten '%s' VarAmount=Variabel mængde (%% tot.) VarAmountOneLine=Variabel mængde (%% tot.) - 1 linje med etiket '%s' -VarAmountAllLines=Variabelt beløb (%% tot.) - alle samme linjer +VarAmountAllLines=Variabelt beløb (%% tot.) - alle linjer fra oprindelse # PaymentType PaymentTypeVIR=Bankoverførsel PaymentTypeShortVIR=Bankoverførsel @@ -494,12 +498,16 @@ Cash=Kontanter Reported=Forsinket DisabledBecausePayments=Ikke muligt da der er nogle betalinger CantRemovePaymentWithOneInvoicePaid=Kan ikke fjerne betaling, da der er mindst en faktura, der er klassificeret som betalt +CantRemovePaymentVATPaid=Kan ikke fjerne betaling, da momsangivelse er klassificeret betalt +CantRemovePaymentSalaryPaid=Kan ikke fjerne betaling, da løn er klassificeret betalt ExpectedToPay=Forventet betaling CantRemoveConciliatedPayment=Kan ikke fjerne afstemt betaling PayedByThisPayment=Betalt med denne betaling ClosePaidInvoicesAutomatically=Klassificer automatisk alle standard-, udbetalings- eller udskiftningsfakturaer som "Betalt", når betalingen udføres helt. ClosePaidCreditNotesAutomatically=Klassificer automatisk alle kreditnotaer som "Betalt", når refusionen er udført helt. ClosePaidContributionsAutomatically=Klassificer automatisk alle sociale eller skattemæssige bidrag som "Betalt", når betaling sker helt. +ClosePaidVATAutomatically=Klassificer automatisk momsangivelse som "betalt", når betalingen sker fuldstændigt. +ClosePaidSalaryAutomatically=Klassificer automatisk løn som "Betalt", når betalingen sker fuldstændigt. AllCompletelyPayedInvoiceWillBeClosed=Alle fakturaer uden resterende betaling skal automatisk lukkes med status "Betalt". ToMakePayment=Betale ToMakePaymentBack=Tilbagebetalt @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Du skal først oprette en standardfaktura PDFCrabeDescription=Faktura PDF-skabelon Crabe. En komplet fakturaskabelon (gammel implementering af svampeskabelon) PDFSpongeDescription=Faktura PDF skabelon opsætning. En komplet faktura skabelon PDFCrevetteDescription=Faktura PDF skabelon Crevette. En komplet faktura skabelon for kontoudtog -TerreNumRefModelDesc1=Retur nummer med format %syymm-nnnn for standard faktura og %syymm-nnnn for kreditnoter hvor du er år, mm er måned og nnnn er en sekvens uden pause og ingen tilbagevenden til 0 -MarsNumRefModelDesc1=Retur nummer med format %syymm-nnnn for standardfakturaer, %syymm-nnnn for udskiftningsfakturaer, %syymm-nnnn til fakturaer med forskud og %syymm-nnnn for kreditnoter hvor du er år, mm er måned og nnnn er en sekvens uden pause og nej vende tilbage til 0 +TerreNumRefModelDesc1=Returneringsnummer i formatet %syymm-nnnn til standardfakturaer og %syymm-nnnn til kreditnotaer, hvor yy er år, mm er måned og nnnn er et sekventielt automatisk stigende nummer uden pause og uden returnering til 0 +MarsNumRefModelDesc1=Returneringsnummer i formatet %syymm-nnnn for standardfakturaer, %syymm-nnnn til udskiftningsfakturaer, %syymm-nnnn for udbetalingsfakturaer og %syymm-nnnn er uden pause og ingen tilbagevenden til 0 TerreNumRefModelError=Et faktura, der begynder med $ syymm allerede eksisterer og er ikke kompatible med denne model af sekvensinformation. Fjern den eller omdøbe den til at aktivere dette modul. -CactusNumRefModelDesc1=Returnummer med format %syymm-nnnn for standardfakturaer, %syymm-nnnn for kreditnotaer og %syymm-nnnn for afbetalingsfakturaer hvor du er år, mm er måned og nnnn er en sekvens uden pause og ingen tilbagevenden til 0 +CactusNumRefModelDesc1=Returneringsnummer i formatet %syymm-nnnn for standardfakturaer, %syymm-nnnn for kreditnotaer og %syymm-nnnn for udbetalingsfakturaer, hvor yy er år, mm er måned og nnnn er et løbende returneringsnummer uden inkr. 0 EarlyClosingReason=Årsag til tidlig lukning EarlyClosingComment=Tidlig afsluttende note ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Hvis du har brug for at generere sådanne fakt DeleteRepeatableInvoice=Slet fakturaskabelon ConfirmDeleteRepeatableInvoice=Er du sikker på, at du vil slette fakturaenskabelon? CreateOneBillByThird=Opret en faktura pr. Tredjepart (ellers en faktura pr. Ordre) -BillCreated=%s regning(er) oprettet +BillCreated=%s genereret faktura (er) +BillXCreated=Faktura %s genereret StatusOfGeneratedDocuments=Status for dokument generering DoNotGenerateDoc=Generer ikke dokument fil AutogenerateDoc=Auto generere dokument fil diff --git a/htdocs/langs/da_DK/boxes.lang b/htdocs/langs/da_DK/boxes.lang index dfa01d60748..bc3abe1574c 100644 --- a/htdocs/langs/da_DK/boxes.lang +++ b/htdocs/langs/da_DK/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistik over de vigtigste forretningsobjekter i databasen BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Seneste %s produkter / tjenester @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Senest ændrede medlemmer +BoxLastMembersSubscriptions=Seneste medlemsabonnementer BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Fødselsdage i denne måned (medlemmer) +BoxTitleMembersByType=Medlemmer efter type +BoxTitleMembersSubscriptionsByYear=Medlemmer Abonnementer efter år BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Produkter / tjenester: sidst %s ændret BoxTitleProductsAlertStock=Produkter: lager advarsel @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Nyeste %s forsendelser kunde NoRecordedShipments=Ingen registreret kundeforsendelse BoxCustomersOutstandingBillReached=Kunder med en udestående grænse nået # Pages -AccountancyHome=Bogføring +UsersHome=Hjemmebrugere og grupper +MembersHome=Hjemmemedlemskab +ThirdpartiesHome=Hjemme-tredjeparter +TicketsHome=Hjem billetter +AccountancyHome=Hjemregnskab ValidatedProjects=Validerede projekter diff --git a/htdocs/langs/da_DK/categories.lang b/htdocs/langs/da_DK/categories.lang index 881d4fe22c6..dd36fa5b4e2 100644 --- a/htdocs/langs/da_DK/categories.lang +++ b/htdocs/langs/da_DK/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Sælgere tags / kategorier område CustomersCategoriesArea=Kunder tags/kategorier MembersCategoriesArea=Medlemmer tags/kategorier ContactsCategoriesArea=Kontakter tags/kategorier område -AccountsCategoriesArea=Konti tags/kategorier område +AccountsCategoriesArea=Bankkontomærker / kategoriområde ProjectsCategoriesArea=Projekter tags/kategorier område UsersCategoriesArea=Brugere tags / kategorier område SubCats=Sub-kategorier diff --git a/htdocs/langs/da_DK/companies.lang b/htdocs/langs/da_DK/companies.lang index c01f19fef89..411dc19efc9 100644 --- a/htdocs/langs/da_DK/companies.lang +++ b/htdocs/langs/da_DK/companies.lang @@ -44,8 +44,9 @@ ToCreateContactWithSameName=Der oprettes automatisk en kontakt/adresse med samme ParentCompany=Moderselskab Subsidiaries=Datterselskaber ReportByMonth=Rapport pr. Måned -ReportByCustomers=Rapport af kunde -ReportByQuarter=Rapport fra kvartal +ReportByCustomers=Rapporter pr. Kunde +ReportByThirdparties=Rapport pr. Tredjepart +ReportByQuarter=Rapport pr. Sats CivilityCode=Landekode RegisteredOffice=Hjemsted Lastname=Efternavn @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Prof Id 2 (Social Security Number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate nummer) -ProfId5ES=EORI-nummer +ProfId5ES=Prof Id 5 (EORI-nummer) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, gamle APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI-nummer +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIRENE +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof ID 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI-nummer +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (erhvervstilladelse) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof ID 2 (Social Security Number) ProfId3PT=Prof Id 3 (CVR-nummer) ProfId4PT=Prof Id 4 (konservatorium) -ProfId5PT=EORI-nummer +ProfId5PT=Prof Id 5 (EORI-nummer) ProfId6PT=- ProfId1SN=RC ProfId2SN=Ninea @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Registreringsnummer) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI-nummer +ProfId5RO=Prof Id 5 (EORI-nummer) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Udestående faktura i øjeblikket OutstandingBill=Maks. for udstående faktura OutstandingBillReached=Maks. for udestående regning nået OrderMinAmount=Minimumsbeløb for ordre -MonkeyNumRefModelDesc=Ret et nummer med formatet %syymm-nnnn til kundekode og %syymm-nnnn for leverandørkoden, hvor du er år, mm er måned og nnnn er en sekvens uden pause og ingen tilbagevenden til 0. +MonkeyNumRefModelDesc=Returner et nummer i formatet %syymm-nnnn for kundekoden og %syymm-nnnn for sælgerkoden, hvor yy er år, mm er måned og nnnn er et sekventielt automatisk stigende nummer uden pause og ingen returnering til 0. LeopardNumRefModelDesc=Kunde / leverandør-koden er ledig. Denne kode kan til enhver tid ændres. ManagingDirectors=Leder(e) navne (CEO, direktør, chef...) MergeOriginThirdparty=Duplicate tredjepart (tredjepart, du vil slette) diff --git a/htdocs/langs/da_DK/compta.lang b/htdocs/langs/da_DK/compta.lang index 67d0f186df3..2c6f3c521b8 100644 --- a/htdocs/langs/da_DK/compta.lang +++ b/htdocs/langs/da_DK/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST køb VATCollected=Modtaget moms StatusToPay=At betale SpecialExpensesArea=Særlige betalinger +VATExpensesArea=Område til alle TVA-betalinger SocialContribution=Skat/afgift SocialContributions=Skatter/afgifter SocialContributionsDeductibles=Fradragsberettigede skatter/afgifter @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Betaling for kundefaktura PaymentSupplierInvoice=leverandør faktura betaling PaymentSocialContribution=Betaling af skat/afgift PaymentVat=Betaling af moms +AutomaticCreationPayment=Registrer automatisk betalingen ListPayment=Oversigt over betalinger ListOfCustomerPayments=Oversigt over kundebetalinger ListOfSupplierPayments=Liste over leverandørbetalinger @@ -104,6 +106,8 @@ LT2PaymentES=IRPF betaling LT2PaymentsES=IRPF betalinger VATPayment=Betaling af udgående moms VATPayments=Betalinger af udgående moms +VATDeclarations=Momsangivelser +VATDeclaration=Momsangivelse VATRefund=Salgskat refusion NewVATPayment=Ny momsafgift NewLocalTaxPayment=Ny Moms %s betaling @@ -134,9 +138,17 @@ NoWaitingChecks=Ingen checks afventer indbetaling. DateChequeReceived=Dato for modtagelse af check NbOfCheques=Antal checks PaySocialContribution=Betal skat/afgift -ConfirmPaySocialContribution=Er du sikker på, at du vil markere denne skat/afgift som betalt? +PayVAT=Betal en momsangivelse +PaySalary=Betal et lønkort +ConfirmPaySocialContribution=Er du sikker på, at du vil klassificere denne sociale eller skattemæssige skat som betalt? +ConfirmPayVAT=Er du sikker på, at du vil klassificere denne momsangivelse som betalt? +ConfirmPaySalary=Er du sikker på, at du vil klassificere dette lønkort som betalt? DeleteSocialContribution=Slet en betaling af skat/afgift -ConfirmDeleteSocialContribution=Er du sikker på, at du vil slette denne betaling af skat/afgift? +DeleteVAT=Slet en momsangivelse +DeleteSalary=Slet et lønkort +ConfirmDeleteSocialContribution=Er du sikker på, at du vil slette denne sociale / skattemæssige skattebetaling? +ConfirmDeleteVAT=Er du sikker på, at du vil slette denne momsangivelse? +ConfirmDeleteSalary=Er du sikker på, at du vil slette denne løn? ExportDataset_tax_1=Betalinger af skatter/afgifter CalcModeVATDebt=Indstilling <b> %sMoms på forpligtelseskonto%s </b>. CalcModeVATEngagement=Mode <b> %sVAT på indkomst-udgifter%s </ b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Den omfatter de reelle betalinger foretaget på fakturaer, ud RulesCADue=- Det inkluderer kundens forfaldne fakturaer, uanset om de er betalt eller ej.<br> - Det er baseret på faktureringsdatoen for disse fakturaer.<br> RulesCAIn=- Den omfatter alle effektive betalinger af fakturaer modtaget fra kunder. <br> - Det er baseret på betalingsdatoen for disse fakturaer <br> RulesCATotalSaleJournal=Den omfatter alle kreditlinjer fra salgslisten. +RulesSalesTurnoverOfIncomeAccounts=Det inkluderer (kredit - debitering) af linjer for produktkonti i gruppe INDTÆGTER RulesAmountOnInOutBookkeepingRecord=Det indeholder post i din hovedbog med kontor, der har gruppen "EXPENSE" eller "INCOME" RulesResultBookkeepingPredefined=Det indeholder poster i din hovedbog med regnskabs kontoer, der har gruppen "EXPENSE" eller "INCOME" RulesResultBookkeepingPersonalized=Det viser kontoer i din hovedbog med regnskabs kontoer <b> grupperet af personlige grupper </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Salgsskatterapport fra tredjepart VATReportByCustomers=Salgsskat rapport af kunde VATReportByCustomersInInputOutputMode=Rapport fra kunden moms indsamlet og betalt VATReportByQuartersInInputOutputMode=Indberetning ved Salgsskattesats af den indsamlede og betalte skat +VATReportShowByRateDetails=Vis detaljer om denne sats LT1ReportByQuarters=Indberette skat 2 efter sats LT2ReportByQuarters=Indberette skat 3 efter sats LT1ReportByQuartersES=Rapportér ved RE-sats @@ -217,7 +231,7 @@ Pcg_subtype=Pcg underype InvoiceLinesToDispatch=Fakturalinjer til afsendelse ByProductsAndServices=Efter produkt og service RefExt=Ekstern ref -ToCreateAPredefinedInvoice=For at oprette en fakturaskabelon skal du oprette en standardfaktura, og uden at godkende den, skal du klikke på knappen "%s". +ToCreateAPredefinedInvoice=For at oprette en skabelonfaktura skal du oprette en standardfaktura og derefter klikke på knappen "%s" uden at validere den. LinkedOrder=Link til ordre Mode1=Metode 1 Mode2=Metode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Den dedikerede regnskabskonto, der er defineret ACCOUNTING_ACCOUNT_SUPPLIER=Regnskabskonto anvendt til leverandør tredjepart ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Den dedikerede regnskabskonto, der er defineret på tredjepartskort, vil kun blive anvendt til kassekladden. Denne vil blive brugt til regnskabet og som standardværdi i bogholderi regnskabet, hvis dedikeret leverandør regnskabskonto på tredjepart ikke er defineret. ConfirmCloneTax=Bekræft klonen af ​​en social / skattemæssig afgift +ConfirmCloneVAT=Bekræft klonen på en momsangivelse +ConfirmCloneSalary=Bekræft klonen på en løn CloneTaxForNextMonth=Klon det for næste måned SimpleReport=Simpel rapport AddExtraReport=Ekstra rapporter (tilføj udenlandsk og national kunderapport) @@ -253,7 +269,8 @@ AccountingAffectation=Regnskabsopgave LastDayTaxIsRelatedTo=Sidste dag af skatten er relateret til VATDue=Salgsmoms påkrævet ClaimedForThisPeriod=Påstået for perioden -PaidDuringThisPeriod=Betalt i denne periode +PaidDuringThisPeriod=Betalt for denne periode +PaidDuringThisPeriodDesc=Dette er summen af alle betalinger knyttet til momsangivelser, der har en slutdato i det valgte datointerval ByVatRate=Med Moms sats TurnoverbyVatrate=Omsætning faktureret ved salgskurs TurnoverCollectedbyVatrate=Omsætning opkrævet ved salgskurs @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Køb af omsætning samlet RulesPurchaseTurnoverDue=- Det inkluderer leverandørens forfaldne fakturaer, uanset om de er betalt eller ej. <br>- Det er baseret på fakturadato for disse fakturaer.<br> RulesPurchaseTurnoverIn=- Det inkluderer alle de effektive betalinger af fakturaer, der udføres til leverandører. <br>- Det er baseret på betalingsdatoen for disse fakturaer<br> RulesPurchaseTurnoverTotalPurchaseJournal=Det inkluderer alle debet linjer fra købsdagbogen. +RulesPurchaseTurnoverOfExpenseAccounts=Det inkluderer (debet - kredit) af linier til produktkonti i gruppe UDGIFTER ReportPurchaseTurnover=Faktureret køb af omsætning ReportPurchaseTurnoverCollected=Køb af omsætning samlet IncludeVarpaysInResults = Medtag forskellige betalinger i rapporter diff --git a/htdocs/langs/da_DK/ecm.lang b/htdocs/langs/da_DK/ecm.lang index 804876f5f38..2df441a0807 100644 --- a/htdocs/langs/da_DK/ecm.lang +++ b/htdocs/langs/da_DK/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Søg på nøgleord ECMSearchByEntity=Søg på objektet ECMSectionOfDocuments=Abonnentfortegnelser af dokumenter ECMTypeAuto=Automatisk -ECMDocsBy=Documents linked to %s +ECMDocsBy=Dokumenter knyttet til %s ECMNoDirectoryYet=Ingen mappe oprettet ShowECMSection=Vis mappe DeleteSection=Fjern mappe @@ -39,5 +39,9 @@ HashOfFileContent=Hash af fil indhold NoDirectoriesFound=Ingen mapper fundet FileNotYetIndexedInDatabase=Filen er endnu ikke indekseret i database (prøv at genoplaste den) ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ExtraFieldsEcmDirectories=Extrafields Ecm Mapper +ECMSetup=ECM-opsætning +GenerateImgWebp=Kopier alle billeder med en anden version med .webp-format +ConfirmGenerateImgWebp=Hvis du bekræfter, vil du generere et billede i .webp-format for alle billeder i øjeblikket i denne mappe og dens undermappe ... +ConfirmImgWebpCreation=Bekræft duplikering af alle billeder +SucessConvertImgWebp=Billeder blev duplikeret diff --git a/htdocs/langs/da_DK/errors.lang b/htdocs/langs/da_DK/errors.lang index 96148c9c1a8..5f382777db0 100644 --- a/htdocs/langs/da_DK/errors.lang +++ b/htdocs/langs/da_DK/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> ikke fundet (Bad sti, forkerte rettigheder ErrorFunctionNotAvailableInPHP=<b>Funktion %s</b> er påkrævet for denne funktion, men er ikke tilgængelig i denne version / opsætning af PHP. ErrorDirAlreadyExists=En mappe med dette navn findes allerede. ErrorFileAlreadyExists=En fil med dette navn findes allerede. +ErrorDestinationAlreadyExists=En anden fil med navnet <b> %s </b> findes allerede. ErrorPartialFile=Fil ikke modtaget helt af serveren. ErrorNoTmpDir=Midlertidig directy %s ikke eksisterer. ErrorUploadBlockedByAddon=Upload blokeret af en PHP / Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Fejl ved indlæsning af kontoplan. Hvis nogle konti ikke bl ErrorBadSyntaxForParamKeyForContent=Dårlig syntaks for parameternøgleindhold. Skal have en værdi, der starter med %s eller %s ErrorVariableKeyForContentMustBeSet=Fejl, konstanten med navn %s(med tekstindhold, der skal vises) eller %s(med ekstern url til at vises) skal sættes. ErrorURLMustStartWithHttp=URL %s skal starte med http: // eller https: // +ErrorHostMustNotStartWithHttp=Værtsnavn %s må IKKE starte med http: // eller https: // ErrorNewRefIsAlreadyUsed=Fejl, den nye reference er allerede brugt ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Fejl, sletning af betaling, der er knyttet til en lukket faktura, er ikke mulig. ErrorSearchCriteriaTooSmall=Søgekriterier er for korte. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Offentlig grænseflade var ikke aktiveret ErrorLanguageRequiredIfPageIsTranslationOfAnother=Sprog for den nye side skal defineres, hvis det er indstillet som en oversættelse af en anden side ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=Sprog på den nye side må ikke være kildesproget, hvis det er indstillet som en oversættelse af en anden side ErrorAParameterIsRequiredForThisOperation=En parameter er obligatorisk for denne handling +ErrorDateIsInFuture=Fejl, datoen kan ikke være i fremtiden +ErrorAnAmountWithoutTaxIsRequired=Fejl, beløb er obligatorisk +ErrorAPercentIsRequired=Fejl, udfyld venligst procentdelen korrekt +ErrorYouMustFirstSetupYourChartOfAccount=Du skal først konfigurere din kontoplan # 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. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Advarsel! Kunne ikke tilføje filindtast WarningTheHiddenOptionIsOn=Advarsel, den skjulte mulighed <b> %s </b> er aktiveret. WarningCreateSubAccounts=Advarsel, du kan ikke oprette en underkonto direkte, du skal oprette en tredjepart eller en bruger og tildele dem en regnskabskode for at finde dem på denne liste WarningAvailableOnlyForHTTPSServers=Kun tilgængelig, hvis du bruger HTTPS-sikret forbindelse. +WarningModuleXDisabledSoYouMayMissEventHere=Modul %s er ikke aktiveret. Så du går måske glip af en masse begivenheder her. +ErrorActionCommPropertyUserowneridNotDefined=Brugerens ejer kræves +ErrorActionCommBadType=Den valgte hændelsestype (id: %n, kode: %s) findes ikke i begivenhedstypeordbogen diff --git a/htdocs/langs/da_DK/externalsite.lang b/htdocs/langs/da_DK/externalsite.lang index 0df00764d24..e9f24884e46 100644 --- a/htdocs/langs/da_DK/externalsite.lang +++ b/htdocs/langs/da_DK/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Opsætning link til ekstern hjemmeside -ExternalSiteURL=Ekstern webstedwebadresse -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry +ExternalSiteSetup=Opsæt link til ekstern hjemmeside +ExternalSiteURL=Ekstern websteds-URL for HTML iframe-indhold +ExternalSiteModuleNotComplete=Modul ExternalSite blev ikke konfigureret korrekt. +ExampleMyMenuEntry=Min menu indgang diff --git a/htdocs/langs/da_DK/main.lang b/htdocs/langs/da_DK/main.lang index 340e9f756c2..a19a7a0e0ce 100644 --- a/htdocs/langs/da_DK/main.lang +++ b/htdocs/langs/da_DK/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. dato IPModification=Ændring IP DateLastModification=Seneste ændring dato DateValidation=Bekræftelsesdato +DateSigning=Underskrivelsesdato DateClosing=Udløbsdato DateDue=Forfaldsdag DateValue=Valørdato @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Enhedspris (ekskl.) (Valuta) UnitPriceTTC=Enhedspris PriceU=Salgspris PriceUHT=Pris (netto) -PriceUHTCurrency=Salgspris (Valuta) +PriceUHTCurrency=U.P (netto) (valuta) PriceUTTC=Brutto (inkl. moms) Amount=Beløb AmountInvoice=Fakturabeløbet @@ -389,6 +390,8 @@ AmountTotal=Beløb i alt AmountAverage=Gennemsnitligt beløb PriceQtyMinHT=Prismængde min. (ekskl. skat) PriceQtyMinHTCurrency=Prismængde min. (ekskl. skat) (valuta) +PercentOfOriginalObject=Procent af originalgenstand +AmountOrPercent=Beløb eller procent Percentage=Procent Total=I alt SubTotal=Sum @@ -599,11 +602,11 @@ MonthShort12=Dec MonthVeryShort01=J MonthVeryShort02=F MonthVeryShort03=M -MonthVeryShort04=EN +MonthVeryShort04=Ap MonthVeryShort05=M MonthVeryShort06=J MonthVeryShort07=J -MonthVeryShort08=EN +MonthVeryShort08=Au MonthVeryShort09=S MonthVeryShort10=O MonthVeryShort11=N @@ -724,7 +727,7 @@ 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 +NoFileFound=Ingen dokumenter uploadet CurrentUserLanguage=Valgt sprog CurrentTheme=Nuværende tema CurrentMenuManager=Aktuel menuhåndtering @@ -899,8 +902,10 @@ ViewAccountList=Vis hovedbog ViewSubAccountList=Se underkonto hovedbog RemoveString=Fjern streng '%s' SomeTranslationAreUncomplete=Nogle af de sprog, der tilbydes, kan kun oversættes eller måske indeholde fejl. Hjælp venligst med at korrigere dit sprog ved at registrere dig på <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> at tilføje dine forbedringer. -DirectDownloadLink=Direkte download link (offentlig/ekstern) -DirectDownloadInternalLink=Direkte download link (skal logges og har brug for tilladelser) +DirectDownloadLink=Offentligt downloadlink +PublicDownloadLinkDesc=Kun linket kræves for at downloade filen +DirectDownloadInternalLink=Privat downloadlink +PrivateDownloadLinkDesc=Du skal være logget, og du skal have tilladelse til at se eller downloade filen Download=Hent DownloadDocument=Hent dokument ActualizeCurrency=Opdater valutakurs @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakter SearchIntoMembers=Medlemmer SearchIntoUsers=Brugere SearchIntoProductsOrServices=Produkter eller tjenester +SearchIntoBatch=Batch / Serier / Lots SearchIntoProjects=Projekter SearchIntoMO=Fremstillingsordrer SearchIntoTasks=Opgaver @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tastaturgenvej AssignedTo=Tildelt til Deletedraft=Slet udkast ConfirmMassDraftDeletion=Udkast til masse slette bekræftelse -FileSharedViaALink=Fil deles via et link +FileSharedViaALink=Fil deles med et offentligt link SelectAThirdPartyFirst=Vælg en tredjepart først ... YouAreCurrentlyInSandboxMode=Du er i øjeblikket i %s "sandbox" -tilstanden Inventory=Beholdning AnalyticCode=Analytisk kode TMenuMRP=MRP +ShowCompanyInfos=Vis firmaoplysninger ShowMoreInfos=Vis flere oplysninger NoFilesUploadedYet=Upload først et dokument SeePrivateNote=Se privat note @@ -1120,3 +1127,5 @@ AffectTag=Påvirke tags ConfirmAffectTag=Bulk Tags påvirker ConfirmAffectTagQuestion=Er du sikker på, at du vil påvirke tags til den %s valgte post (er)? CategTypeNotFound=Ingen tag-type fundet for typen af poster +CopiedToClipboard=Kopieret til udklipsholderen +InformationOnLinkToContract=Dette beløb er kun summen af alle linjer i kontrakten. Der tages ikke hensyn til tid. diff --git a/htdocs/langs/da_DK/margins.lang b/htdocs/langs/da_DK/margins.lang index ee4c55107b4..9c45049d872 100644 --- a/htdocs/langs/da_DK/margins.lang +++ b/htdocs/langs/da_DK/margins.lang @@ -22,7 +22,7 @@ ProductService=Produkt eller Service AllProducts=Alle produkter og tjenester ChooseProduct/Service=Vælg produkt eller service ForceBuyingPriceIfNull=Force køb / kostpris til salgspris, hvis ikke defineret -ForceBuyingPriceIfNullDetails=Hvis købs- / omkostningspris ikke er defineret, og denne valgmulighed "ON", vil margen være nul på linie (køb / kostpris = salgspris), ellers ("OFF"), marginen vil svare til den foreslåede standard. +ForceBuyingPriceIfNullDetails=Hvis købs- / kostpris ikke gives, når vi tilføjer en ny linje, og denne mulighed er "TIL", vil margenen være 0 på den nye linje (købs- / kostpris = salgspris). Hvis denne indstilling er "FRA" (anbefales), vil margenen være lig med den foreslåede værdi som standard (og kan være 100%, hvis der ikke findes nogen standardværdi). MARGIN_METHODE_FOR_DISCOUNT=Margin metode til globale rabatter UseDiscountAsProduct=Som et produkt UseDiscountAsService=Som en tjeneste diff --git a/htdocs/langs/da_DK/members.lang b/htdocs/langs/da_DK/members.lang index dbf397604a5..b74f1265498 100644 --- a/htdocs/langs/da_DK/members.lang +++ b/htdocs/langs/da_DK/members.lang @@ -19,12 +19,14 @@ MembersCards=Medlemmer udskrive kort MembersList=Liste over medlemmer MembersListToValid=Liste over udkast til medlemmer (der skal bekræftes) MembersListValid=Liste over gyldige medlemmer -MembersListUpToDate=List of valid members with up-to-date subscription -MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListUpToDate=Liste over gyldige medlemmer med opdateret abonnement +MembersListNotUpToDate=Liste over gyldige medlemmer med forældet abonnement +MembersListExcluded=Liste over ekskluderede medlemmer MembersListResiliated=Liste over opsatte medlemmer MembersListQualified=Liste over kvalificerede medlemmer MenuMembersToValidate=Udkast til medlemmer MenuMembersValidated=Bekræftet medlemmer +MenuMembersExcluded=Ekskluderede medlemmer MenuMembersResiliated=Afsluttede medlemmer MembersWithSubscriptionToReceive=Medlemmer med abonnement for at modtage MembersWithSubscriptionToReceiveShort=Abonnement til at modtage @@ -32,7 +34,7 @@ DateSubscription=Subscription dato DateEndSubscription=Subscription slutdato EndSubscription=End abonnement SubscriptionId=Abonnements-id -WithoutSubscription=Without subscription +WithoutSubscription=Uden abonnement MemberId=Medlem id NewMember=Nyt medlem MemberType=Medlem type @@ -47,9 +49,12 @@ MemberStatusActiveLate=Abonnement udløbet MemberStatusActiveLateShort=Udløbet MemberStatusPaid=Subscription ajour MemberStatusPaidShort=Ajour +MemberStatusExcluded=Ekskluderet medlem +MemberStatusExcludedShort=Ekskluderet MemberStatusResiliated=Afsluttet medlem MemberStatusResiliatedShort=opsagte MembersStatusToValid=Udkast til medlemmer +MembersStatusExcluded=Ekskluderede medlemmer MembersStatusResiliated=Afsluttede medlemmer MemberStatusNoSubscription=Valideret (intet abonnement kræves) MemberStatusNoSubscriptionShort=bekræftet @@ -80,8 +85,10 @@ DeleteType=Slet VoteAllowed=Afstemning tilladt Physical=Fysisk Moral=Moral -MorAndPhy=Moral and Physical +MorAndPhy=Moralisk og fysisk Reenable=Genaktivere +ExcludeMember=Ekskluder et medlem +ConfirmExcludeMember=Er du sikker på, at du vil ekskludere dette medlem? ResiliateMember=Afslut en medlem ConfirmResiliateMember=Er du sikker på at du vil opsige denne medlem? DeleteMember=Slet medlem @@ -116,7 +123,7 @@ SendingEmailOnMemberValidation=Afsendelse af e-mail ved bekræftelse af nye medl SendingEmailOnNewSubscription=Afsendelse af e-mail på nyt abonnement SendingReminderForExpiredSubscription=Sender påmindelse om udløbne abonnementer SendingEmailOnCancelation=Afsendelse af e-mail ved annullering -SendingReminderActionComm=Sending reminder for agenda event +SendingReminderActionComm=Afsender påmindelse til dagsordenbegivenhed # Topic of email templates YourMembershipRequestWasReceived=Dit medlemskab blev modtaget. YourMembershipWasValidated=Dit medlemskab blev bekræftet @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-mail-skabelon, der skal bruges t DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-mail-skabelon, der skal bruges til at sende e-mail til et medlem ved ny abonnementsoptagelse DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-mail-skabelon, der skal bruges til at sende e-mail-påmindelse, når abonnementet er ved at udløbe DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-mail-skabelon, der skal bruges til at sende e-mail til et medlem ved annullering af medlemmer +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Afsender e-mail til automatiske e-mails DescADHERENT_ETIQUETTE_TYPE=Etiketter format DescADHERENT_ETIQUETTE_TEXT=Tekst udskrives på medlems adresseblade @@ -162,12 +170,13 @@ DocForLabels=Generer adresse ark (Format for output faktisk setup: <b>%s)</b> SubscriptionPayment=Abonnement betaling LastSubscriptionDate=Dato for seneste abonnementsbetaling LastSubscriptionAmount=Mængde af seneste abonnement +LastMemberType=Sidste medlemstype MembersStatisticsByCountries=Medlemmer statistik efter land MembersStatisticsByState=Medlemmer statistikker stat / provins MembersStatisticsByTown=Medlemmer statistikker byen MembersStatisticsByRegion=Medlemsstatistik efter region NbOfMembers=Antal medlemmer -NbOfActiveMembers=Number of current active members +NbOfActiveMembers=Antal nuværende aktive medlemmer NoValidatedMemberYet=Ingen bekræftede medlemmer fundet MembersByCountryDesc=Denne skærm viser dig statistikker over medlemmer af lande. Grafisk afhænger dog på Google online-graf service og er kun tilgængelig, hvis en internetforbindelse virker. MembersByStateDesc=Denne skærm viser dig statistikker om medlemmer fra staten / provinser / Canton. @@ -177,7 +186,7 @@ MenuMembersStats=Statistik LastMemberDate=Seneste medlem dato LatestSubscriptionDate=Latest subscription date MemberNature=Medlemmernes art -MembersNature=Nature of members +MembersNature=Medlemmernes art Public=Information er offentlige NewMemberbyWeb=Nyt medlem tilføjet. Afventer godkendelse NewMemberForm=Nyt medlem formular diff --git a/htdocs/langs/da_DK/modulebuilder.lang b/htdocs/langs/da_DK/modulebuilder.lang index 7d0df081858..412df544774 100644 --- a/htdocs/langs/da_DK/modulebuilder.lang +++ b/htdocs/langs/da_DK/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Jeg vil generere nogle dokumenter fra objektet IncludeDocGenerationHelp=Hvis du markerer dette, vil nogle koder genereres for at tilføje en kasse "Generer dokument" på posten. ShowOnCombobox=Vis værdi til combobox KeyForTooltip=Nøgle til værktøjstip -CSSClass=CSS Class +CSSClass=CSS til redigering / oprettelse af formular +CSSViewClass=CSS til læst form +CSSListClass=CSS til liste NotEditable=Ikke redigerbar ForeignKey=Fremmed nøgle TypeOfFieldsHelp=Felttype:<br> varchar (99), dobbelt (24,8), reel, tekst, html, datetime, tidsstempel, heltal, heltal: ClassName: relative path / to / classfile.class.php [: 1 [: filter]] ( '1' betyder, at vi tilføjer en + knap efter kombinationsboksen for at oprette posten, 'filter' kan være 'status = 1 OG fk_user = __USER_ID OG enhed IN (__SHARED_ENTITIES__)' for eksempel) diff --git a/htdocs/langs/da_DK/orders.lang b/htdocs/langs/da_DK/orders.lang index 11b4d53dfbd..cfef002cb41 100644 --- a/htdocs/langs/da_DK/orders.lang +++ b/htdocs/langs/da_DK/orders.lang @@ -16,6 +16,8 @@ ToOrder=Lav ordre MakeOrder=Lav ordre SupplierOrder=Indkøbsordre SuppliersOrders=Indkøbsordre +SaleOrderLines=Salgsordrer linjer +PurchaseOrderLines=købsordre linjer SuppliersOrdersRunning=Nuværende indkøbsordrer CustomerOrder=Salgsordre CustomersOrders=Salgsordrer diff --git a/htdocs/langs/da_DK/other.lang b/htdocs/langs/da_DK/other.lang index cf4145b5f03..ccfdfb8c1ed 100644 --- a/htdocs/langs/da_DK/other.lang +++ b/htdocs/langs/da_DK/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Virksomhed med flere aktiviteter (alle hovedmoduler) CreatedBy=Oprettet af %s ModifiedBy=Modificeret af %s ValidatedBy=Attesteret af %s +SignedBy=Underskrevet af %s ClosedBy=Lukket af %s CreatedById=Bruger id, der oprettede ModifiedById=Bruger id, der lavede den seneste ændring @@ -244,6 +245,7 @@ NewKeyIs=Dette er dine nye nøgler til login NewKeyWillBe=Din nye nøgle til login til software vil være ClickHereToGoTo=Klik her for at gå til %s YouMustClickToChange=Du skal dog først klikke på følgende link for at bekræfte denne adgangskode ændring +ConfirmPasswordChange=Bekræft ændring af adgangskode ForgetIfNothing=Hvis du ikke har anmodet om denne ændring, skal du bare glemme denne email. Dine legitimationsoplysninger holdes sikre. IfAmountHigherThan=Hvis beløb højere end <strong> %s </ strong> SourcesRepository=Repository for kilder diff --git a/htdocs/langs/da_DK/productbatch.lang b/htdocs/langs/da_DK/productbatch.lang index 2544d59d7fc..6afb2d2fa0a 100644 --- a/htdocs/langs/da_DK/productbatch.lang +++ b/htdocs/langs/da_DK/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Brug parti serie / serienummer -ProductStatusOnBatch=Ja (parti serie/serienr. påkrævet) +ProductStatusOnBatch=Ja (krævet parti) +ProductStatusOnSerial=Ja (unikt serienummer krævet) ProductStatusNotOnBatch=Nej (parti serie/serienr. ikke brugt) -ProductStatusOnBatchShort=Ja +ProductStatusOnBatchShort=Batch +ProductStatusOnSerialShort=Seriel ProductStatusNotOnBatchShort=Nej Batch=Parti serie / Serienr. atleast1batchfield=Pluk dato eller Salgs dato eller Parti serie / Serienummer @@ -22,3 +24,12 @@ ProductLotSetup=Opsætning af modul partiSerie / serieNr ShowCurrentStockOfLot=Vis nuværende lager for par produkt / partiSerie ShowLogOfMovementIfLot=Vis log af bevægelser for par produkt / partiSerie StockDetailPerBatch=Lager detaljer pr. Parti Serie +SerialNumberAlreadyInUse=Serienummer %s bruges allerede til produkt %s +TooManyQtyForSerialNumber=Du kan kun have et produkt %s til serienummer %s +BatchLotNumberingModules=Valgmuligheder til automatisk generering af batchprodukter, der administreres af partier +BatchSerialNumberingModules=Valgmuligheder til automatisk generering af batchprodukter styret af serienumre +CustomMasks=Tilføjer en mulighed for at definere maske på produktkortet +LotProductTooltip=Tilføjer en mulighed på produktkortet for at definere en dedikeret batchnummermaske +SNProductTooltip=Tilføjer en mulighed på produktkortet for at definere en dedikeret serienummermaske +QtyToAddAfterBarcodeScan=Mængde, der skal tilføjes for hver stregkode / parti / seriel scannet + diff --git a/htdocs/langs/da_DK/products.lang b/htdocs/langs/da_DK/products.lang index dc8281f3a00..cc6c8c9fbbf 100644 --- a/htdocs/langs/da_DK/products.lang +++ b/htdocs/langs/da_DK/products.lang @@ -7,7 +7,7 @@ ProductDescriptionTranslated=Oversat produktbeskrivelse ProductNoteTranslated=Oversat produkt notat ProductServiceCard=Produkter / Tjenester kortet TMenuProducts=Varer -TMenuServices=Services +TMenuServices=Ydelser Products=Varer Services=Ydelser Product=Vare @@ -17,20 +17,20 @@ Create=Opret Reference=Reference NewProduct=Ny vare NewService=Ny ydelse -ProductVatMassChange=Global momsopdatering +ProductVatMassChange=Global moms opdatering ProductVatMassChangeDesc=Dette værktøj opdaterer momssatsen, der er defineret på <b> <u> ALLE </u> </b> produkter og tjenester! MassBarcodeInit=Mass barcode init MassBarcodeInitDesc=Denne side kan bruges til at initialisere en stregkode på objekter, der ikke har stregkode defineret. Kontroller, inden opsætningen af ​​modulets stregkode er afsluttet. -ProductAccountancyBuyCode=Regnskabskode (køb) -ProductAccountancyBuyIntraCode=Regnskab kode (køb intra-samfund) -ProductAccountancyBuyExportCode=Regnskabskode (købimport) -ProductAccountancySellCode=Regnskabskode (salg) -ProductAccountancySellIntraCode=Regnskabskode (salg inden for Fællesskabet) -ProductAccountancySellExportCode=Regnskabskode (salg eksport) +ProductAccountancyBuyCode=Regnskabs konto (køb) +ProductAccountancyBuyIntraCode=Regnskab konto (køb i EU) +ProductAccountancyBuyExportCode=Regnskabs konto (køb udenfor EU) +ProductAccountancySellCode=Regnskabs konto (salg) +ProductAccountancySellIntraCode=Regnskabs konto (salg inden for EU) +ProductAccountancySellExportCode=Regnskabs konto (salg uden for EU) ProductOrService=Vare eller ydelse ProductsAndServices=Varer og ydelser ProductsOrServices=Varer eller ydelser -ProductsPipeServices=Produkter | Services +ProductsPipeServices=Produkter | Ydelser ProductsOnSale=Produkter til salg ProductsOnPurchase=Produkter til køb ProductsOnSaleOnly=Varer kun til salg @@ -101,7 +101,7 @@ PriceRemoved=Pris fjernet BarCode=Stregkode BarcodeType=Stregkodetype SetDefaultBarcodeType=Vælg stregkodetype -BarcodeValue=Stregkodeværdi +BarcodeValue=Stregkode værdi NoteNotVisibleOnBill=Note (ikke synlig på fakturaer, tilbud ...) ServiceLimitedDuration=Hvis varen er en ydelse med begrænset varighed: FillWithLastServiceDates=Udfyld med sidste servicelinjedatoer @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Momssats (for denne leverandør / produkt) DiscountQtyMin=Rabat for denne mængde. NoPriceDefinedForThisSupplier=Ingen pris / antal defineret for denne leverandør / produkt NoSupplierPriceDefinedForThisProduct=Der er ikke defineret nogen leverandørpris / antal for dette produkt +PredefinedItem=Foruddefineret vare PredefinedProductsToSell=Foruddefineret produkt PredefinedServicesToSell=Foruddefineret service PredefinedProductsAndServicesToSell=Predefinerede produkter / tjenester til salg @@ -168,7 +169,7 @@ BuyingPrices=Købspriser CustomerPrices=Kundepriser SuppliersPrices=Leverandørpriser SuppliersPricesOfProductsOrServices=Sælgerpriser (af produkter eller tjenester) -CustomCode=Told | Råvare | HS-kode +CustomCode=Told | Råvare | VITA-kode CountryOrigin=Oprindelsesland RegionStateOrigin=Region oprindelse StateOrigin=Stat | provinsens oprindelse @@ -313,7 +314,7 @@ LastUpdated=Seneste opdatering CorrectlyUpdated=Korrekt opdateret PropalMergePdfProductActualFile=Filer bruges til at tilføje til PDF Azur er / er PropalMergePdfProductChooseFile=Vælg PDF-filer -IncludingProductWithTag=Herunder produkt / service med tag +IncludingProductWithTag=Inkluder produkter / tjenester med tag DefaultPriceRealPriceMayDependOnCustomer=Standard pris, reel pris kan afhænge af kunde WarningSelectOneDocument=Vælg mindst et dokument DefaultUnitToShow=Enhed diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index 56f72838a88..11372f112e8 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Forbruges ListOfTasks=Liste over opgaver GoToListOfTimeConsumed=Gå til listen over tid forbrugt GanttView=Gantt View +ListWarehouseAssociatedProject=Liste over lagre, der er knyttet til projektet ListProposalsAssociatedProject=Liste over de kommercielle forslag i forbindelse med projektet ListOrdersAssociatedProject=Liste over salgsordrer relateret til projektet ListInvoicesAssociatedProject=Liste over kundefakturaer relateret til projektet @@ -268,3 +269,7 @@ OneLinePerTask=En linje pr. Opgave OneLinePerPeriod=En linje pr. Periode RefTaskParent=Ref. Forældre Opgave ProfitIsCalculatedWith=Fortjeneste beregnes ved hjælp af +AddPersonToTask=Føj også til opgaver +UsageOrganizeEvent=Anvendelse: Begivenhedsorganisation +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Klassificer projektet som lukket, når alle dets opgaver er afsluttet (100%% fremskridt) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Bemærk: eksisterende projekter med alle opgaver ved 100%%-fremskridt påvirkes ikke: du bliver nødt til at lukke dem manuelt. Denne mulighed påvirker kun åbne projekter. diff --git a/htdocs/langs/da_DK/propal.lang b/htdocs/langs/da_DK/propal.lang index 01e676de7d8..ac6b590b480 100644 --- a/htdocs/langs/da_DK/propal.lang +++ b/htdocs/langs/da_DK/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=Er du sikker på, du vil klone tilbuddet <b>%s</b>? ConfirmReOpenProp=Er du sikker på, at du vil åbne det tilbud igen <b> %s </b>? ProposalsAndProposalsLines=Tilbud og linjer ProposalLine=Tilbudslinje +ProposalLines=Tilbudslinjer AvailabilityPeriod=Tilgængelighed forsinkelse SetAvailability=Indstil tilgængelighed forsinkelse AfterOrder=efter at diff --git a/htdocs/langs/da_DK/stocks.lang b/htdocs/langs/da_DK/stocks.lang index e4de3145acb..c6fecc6ad3c 100644 --- a/htdocs/langs/da_DK/stocks.lang +++ b/htdocs/langs/da_DK/stocks.lang @@ -19,7 +19,7 @@ Stock=Lager Stocks=Lagre MissingStocks=Manglende lagre StockAtDate=Lagrene på dato -StockAtDateInPast=Over dato +StockAtDateInPast=Dato i fortiden StockAtDateInFuture=Dato i fremtiden StocksByLotSerial=Lagerført efter parti/seriel LotSerial=Parti/Serienr @@ -37,8 +37,8 @@ AllWarehouses=Alle lagre IncludeEmptyDesiredStock=Inkluder også negativ bestand med udefineret ønsket lager IncludeAlsoDraftOrders=Medtag også udkast til ordrer Location=Placering -LocationSummary=Kort placerings navn -NumberOfDifferentProducts=Antal forskellige varer +LocationSummary=Kort placeringsnavn +NumberOfDifferentProducts=Antal unikke produkter NumberOfProducts=Samlet antal varer LastMovement=Seneste bevægelse LastMovements=Seneste bevægelser @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Lager værdi UserWarehouseAutoCreate=Opret et brugerlager automatisk, når du opretter en bruger AllowAddLimitStockByWarehouse=Administrer også værdi for minimum og ønsket lager pr. Parring (produktlager) ud over værdien for minimum og ønsket lager pr. Produkt RuleForWarehouse=Regel for lagre -WarehouseAskWarehouseDuringPropal=Sæt et lager på salgsproportal +WarehouseAskWarehouseOnThirparty=Indstil et lager på tredjepart +WarehouseAskWarehouseDuringPropal=Sæt et lager på kommercielle forslag WarehouseAskWarehouseDuringOrder=Indstil et lager med salgsordrer UserDefaultWarehouse=Indstil et lager til brugere MainDefaultWarehouse=Standardlager @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtuelt lager på dato -VirtualStockAtDateDesc=Virtuelt lager, når alle ventende ordrer, der er planlagt udført før datoen, er afsluttet +VirtualStockAtDateDesc=Virtuelt lager, når alle de afventende ordrer, der planlægges behandlet inden den valgte dato, er færdige 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.) +AtDate=På dato IdWarehouse=Lager ID DescWareHouse=Beskrivelse lager LieuWareHouse=Lager placering WarehousesAndProducts=Varelagre og varer WarehousesAndProductsBatchDetail=Lager og produkter (med detaljer pr. Lot / serie) 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. +AverageUnitPricePMPDesc=Den input-gennemsnitlige enhedspris, vi måtte betale for at få 1 enhed produkt på lager. SellPriceMin=Salgsenhed Pris EstimatedStockValueSellShort=Værdi for salg EstimatedStockValueSell=Værdi for salg @@ -145,7 +147,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 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". +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 krævede bevægelser, skal du klikke på "%s". RecordMovement=Optag overførsel ReceivingForSameOrder=Kvitteringer for denne ordre StockMovementRecorded=Aktiebevægelser registreret @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Lagerniveau skal være tilstrækkeligt til at tilfø StockMustBeEnoughForOrder=Lager niveau skal være nok til at tilføje produkt / service til ordre (check er udført på nuværende reelle lager, når du tilføjer en linje til ordre uanset reglen for automatisk lagerændring) StockMustBeEnoughForShipment= Lagerniveau skal være tilstrækkeligt til at tilføje produkt / service til forsendelse (check er udført på nuværende reelle lager, når du tilføjer en linje til forsendelse uanset reglen for automatisk lagerændring) MovementLabel=Etikett for bevægelse -TypeMovement=Type bevægelse +TypeMovement=Bevægelsesretning DateMovement=Dato for bevægelse InventoryCode=Bevægelse eller lager kode IsInPackage=Indeholdt i pakken @@ -183,6 +185,7 @@ inventoryCreatePermission=Opret ny opgørelse inventoryReadPermission=Se varebeholdninger inventoryWritePermission=Opdater inventar inventoryValidatePermission=Bekræft inventar +inventoryDeletePermission=Slet beholdning inventoryTitle=Beholdning inventoryListTitle=Varebeholdninger inventoryListEmpty=Ingen opgørelse pågår @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Lager kræves for at vælge, hvilket parti 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 +StockAtDateFutureDesc=Du kan her se lager antal (virtuel lager) på en given dato i fremtiden CurrentStock=Aktuel lager InventoryRealQtyHelp=Sæt værdi til 0 for at nulstille antal <br> Hold feltet tomt, eller fjern linjen for at forblive uændret -UpdateByScaning=Opdater ved at scanne +UpdateByScaning=Udfyld real antal ved at scanne UpdateByScaningProductBarcode=Opdatering ved scanning (produktstregkode) UpdateByScaningLot=Opdatering ved scanning (parti | seriel stregkode) DisableStockChangeOfSubProduct=Deaktiver lagerændringen for alle delprodukter i dette sæt under denne bevægelse. +ImportFromCSV=Importer CSV-liste over bevægelser +ChooseFileToImport=Upload fil, og klik derefter på ikonet %s for at vælge fil som kildeimportfil ... +SelectAStockMovementFileToImport=vælg en aktiebevægelsesfil, der skal importeres +InfoTemplateImport=Uploadet fil skal have dette format (* er obligatoriske felter): <br> Source Warehouse * | Mållager * | Produkt * | Mængde * | Parti / serienummer <br> CSV-tegnseparator skal være "<b> %s </b>" +LabelOfInventoryMovemement=Beholdning %s +ReOpen=Genåben +ConfirmFinish=Bekræfter du afslutningen af opgørelsen? Dette genererer alle lagerbevægelser for at opdatere din aktie. +ObjectNotFound=%s ikke fundet +MakeMovementsAndClose=Generer bevægelser og luk +AutofillWithExpected=Fyld den virkelige mængde med den forventede mængde diff --git a/htdocs/langs/da_DK/suppliers.lang b/htdocs/langs/da_DK/suppliers.lang index c0df693ec2c..e59117969e0 100644 --- a/htdocs/langs/da_DK/suppliers.lang +++ b/htdocs/langs/da_DK/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Leverandører SuppliersInvoice=Leverandørfaktura +SupplierInvoices=Leverandør fakturaer ShowSupplierInvoice=Vis leverandørfaktura NewSupplier=Ny sælger History=Historie @@ -38,7 +39,7 @@ MenuOrdersSupplierToBill=Indkøbsordrer til faktura NbDaysToDelivery=Leveringsforsinkelse (dage) DescNbDaysToDelivery=Den længste leveringsforsinkelse af produkterne fra denne ordre SupplierReputation=Leverandør ry -ReferenceReputation=Reference reputation +ReferenceReputation=Reference omdømme DoNotOrderThisProductToThisSupplier=Bestil ikke NotTheGoodQualitySupplier=Lav kvalitet ReputationForThisProduct=Omdømme diff --git a/htdocs/langs/da_DK/ticket.lang b/htdocs/langs/da_DK/ticket.lang index 86d053f9cc4..5aaa861cde6 100644 --- a/htdocs/langs/da_DK/ticket.lang +++ b/htdocs/langs/da_DK/ticket.lang @@ -70,6 +70,8 @@ Deleted=Slettet # Dict Type=Type Severity=Alvorlighed +TicketGroupIsPublic=Gruppen er offentlig +TicketGroupIsPublicDesc=Hvis en billetgruppe er offentlig, vil den være synlig i formen, når du opretter en billet fra den offentlige grænseflade # Email templates MailToSendTicketMessage=At sende Email fra opgave besked @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Vis modulets logo i den offentlige grænseflade TicketsShowModuleLogoHelp=Aktivér denne mulighed for at skjule logo-modulet på siderne i den offentlige grænseflade TicketsShowCompanyLogo=Vis firmaets logo i den offentlige grænseflade TicketsShowCompanyLogoHelp=Aktivér denne mulighed for at skjule logoet for hovedvirksomheden på siderne i den offentlige grænseflade -TicketsEmailAlsoSendToMainAddress=Send også besked til hoved e-mail-adresse -TicketsEmailAlsoSendToMainAddressHelp=Aktivér denne mulighed for at sende en email til "Meddelelses email fra" adresse (se opsætning nedenfor) +TicketsEmailAlsoSendToMainAddress=Send også en underretning til den primære e-mail-adresse +TicketsEmailAlsoSendToMainAddressHelp=Aktivér denne mulighed for også at sende en e-mail til den adresse, der er defineret i opsætningen "%s" (se fanen "%s") TicketsLimitViewAssignedOnly=Begræns skærmen til opgaver, der er tildelt den aktuelle bruger (ikke effektiv for eksterne brugere, skal du altid begrænse til den tredjepart, de er afhængige af) TicketsLimitViewAssignedOnlyHelp=Kun opgaver tildelt den aktuelle bruger vil være synlige. Gælder ikke for en bruger med billetforvaltningsrettigheder. TicketsActivatePublicInterface=Aktivér den offentlige grænseflade @@ -126,10 +128,10 @@ TicketNumberingModules=Opgave nummerering modul TicketsModelModule=Dokumentskabeloner til billetter TicketNotifyTiersAtCreation=Underret tredjepart ved oprettelsen 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 +TicketsPublicNotificationNewMessage=Send e-mail (r), når en ny besked / kommentar føjes til en billet 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) TicketPublicNotificationNewMessageDefaultEmail=Underretnings-e-mail til (opdatering) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send e-mail-meddelelser om ny meddelelse til denne adresse, hvis billetten ikke har en bruger tildelt, eller brugeren ikke har en e-mail. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send en e-mail til denne adresse for hver meddelelse om nye meddelelser, hvis billetten ikke har en bruger tildelt den, eller hvis brugeren ikke har nogen kendt e-mail. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Seneste ændrede opgaver BoxLastModifiedTicketDescription=Seneste %s ændrede opgaver BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Ingen nyligt ændrede opgaver +BoxTicketType=Antal åbne opgaver efter type +BoxTicketSeverity=Antal åbne opgaver efter sværhedsgrad +BoxNoTicketSeverity=Ingen opgaver åbnet +BoxTicketLastXDays=Antal nye opgaver efter dage de sidste %s dage +BoxTicketLastXDayswidget = Antal nye opgaver efter dage de sidste X dage +BoxNoTicketLastXDays=Ingen nye opgaver de sidste %s dage +BoxNumberOfTicketByDay=Antal nye opgaver om dagen +BoxNewTicketVSClose=Antal af dagens nye opgaver versus dagens lukkede opgaver +TicketCreatedToday=Opgave oprettet i dag +TicketClosedToday=Opgave lukket i dag diff --git a/htdocs/langs/da_DK/users.lang b/htdocs/langs/da_DK/users.lang index 88f93206be6..80587a6b21c 100644 --- a/htdocs/langs/da_DK/users.lang +++ b/htdocs/langs/da_DK/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Fjern fra gruppe PasswordChangedAndSentTo=Password ændret og sendt <b>til %s.</b> PasswordChangeRequest=Anmod om at ændre adgangskode til <b> %s </ b> PasswordChangeRequestSent=Anmodning om at ændre password <b>for %s</b> sendt <b>til %s.</b> +IfLoginExistPasswordRequestSent=Hvis dette login er en gyldig konto, er der sendt en e-mail for at nulstille adgangskoden. +IfEmailExistPasswordRequestSent=Hvis denne e-mail er en gyldig konto, er der sendt en e-mail for at nulstille adgangskoden. ConfirmPasswordReset=Bekræft nulstilling af adgangskode MenuUsersAndGroups=Brugere og grupper LastGroupsCreated=Seneste %s grupper oprettet @@ -70,9 +72,10 @@ ExportDataset_user_1=Brugere og deres egenskaber DomainUser=Domænebruger %s Reactivate=Genaktiver CreateInternalUserDesc=Denne formular kan du oprette en intern bruger i din virksomhed / organisation. For at oprette en ekstern bruger (kunde, leverandør osv ..), skal du bruge knappen 'Opret Dolibarr Bruger' fra den tredje-parts kontaktkort. -InternalExternalDesc=En intern bruger er en bruger, der er en del af din virksomhed / organisation.<br> En <b>ekstern</b> bruger er en kunde, sælger eller andet (Oprettelse af en ekstern bruger til en tredjepart kan udføres fra tredjepartens kontaktpost).<br><br> i begge tilfælde definerer tilladelser rettigheder på Dolibarr, også ekstern bruger kan have en anden menushåndtering end intern bruger (Se Hjem - Opsætning - Display) +InternalExternalDesc=En intern <b>-bruger </b> er en bruger, der er en del af din virksomhed / organisation eller er en partnerbruger uden for din organisation, der muligvis skal se flere data end data relateret til hans firma (tilladelsessystemet definerer, hvad han kan eller kan kan du ikke se eller gøre). <br> En <b> ekstern </b> bruger er en kunde, leverandør eller andet, der KUN skal se data relateret til sig selv (Oprettelse af en ekstern bruger til en tredjepart kan gøres fra tredjeparts kontaktoptegnelse). <br> <br> I begge tilfælde skal du give tilladelse til de funktioner, som brugeren har brug for. PermissionInheritedFromAGroup=Tilladelse gives, fordi arvet fra en af en brugers gruppe. Inherited=Arvelige +UserWillBe=Oprettet bruger vil være UserWillBeInternalUser=Oprettet brugeren vil blive en intern bruger (fordi der ikke er knyttet til en bestemt tredjepart) UserWillBeExternalUser=Oprettet bruger vil være en ekstern bruger (fordi knyttet til en bestemt tredjepart) IdPhoneCaller=Id telefonen ringer op @@ -109,12 +112,14 @@ UserAccountancyCode=Regnskabskode for bruger UserLogoff=Bruger logout UserLogged=Bruger logget DateOfEmployment=Ansættelsesdato -DateEmployment=Ansættelsesstartdato +DateEmployment=Beskæftigelse +DateEmploymentstart=Ansættelsesstartdato DateEmploymentEnd=Ansættelses slutdato +RangeOfLoginValidity=Datointerval for login-gyldighed CantDisableYourself=Du kan ikke deaktivere din egen brugerpost ForceUserExpenseValidator=Tving udgiftsrapportvalidering 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 +WarningNotLangOfInterface=Advarsel! Dette er det vigtigste sprog, som brugeren taler, ikke sproget i den grænseflade, han valgte at se. For at ændre det interface, der er synligt for denne bruger, skal du gå til fanen %s diff --git a/htdocs/langs/da_DK/website.lang b/htdocs/langs/da_DK/website.lang index ec009b5ebf1..3b1a9613f32 100644 --- a/htdocs/langs/da_DK/website.lang +++ b/htdocs/langs/da_DK/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Brug med Apache / NGinx / ...</u><br> Opret på din webser ExampleToUseInApacheVirtualHostConfig=Eksempel til brug i Apache virtuel værtopsætning: YouCanAlsoTestWithPHPS=<u> Brug med PHP-integreret server </ u> <br> På udvikler miljø kan du helst prøve webstedet med den indbyggede PHP-server (PHP 5.5 påkrævet) ved at køre <br> <strong> php -S 0.0. 0,0: 8080 -t %s </ strong> YouCanAlsoDeployToAnotherWHP=<u>Kør dit websted med en anden Dolibarr Hosting-udbyder</u><br>Hvis du ikke har en webserver som Apache eller NGinx tilgængelig på internettet, kan du eksportere og importere dit websted til en anden Dolibarr-instans leveret af en anden Dolibarr-hostingudbyder, der giver fuld integration med webstedet modul. Du kan finde en liste over nogle Dolibarr-hostingudbydere på <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Kontroller også, at den virtuelle vært har tilladelse <strong> %s </strong> på filer til <br> <strong> %s</strong> +CheckVirtualHostPerms=Kontroller også, at den virtuelle værtsbruger (for eksempel www-data) har <strong> %s </strong> tilladelser på filer til <br> <strong> %s </strong> ReadPerm=Læs WritePerm=Skriv TestDeployOnWeb=Test / implementer på nettet PreviewSiteServedByWebServer=<u> Se %s i en ny fane. </u> <br> <br> %s vil blive serveret af en ekstern webserver (som Apache, Nginx, IIS). Du skal installere og konfigurere denne server før du peger på biblioteket: <br> <strong> %s </strong> <br> URL serveret af ekstern server: <br> <strong> %s </strong> -PreviewSiteServedByDolibarr=<u> Preview %s i en ny fane. </ u> <br> <br> %s vil blive serveret af Dolibarr server, så det behøver ikke nogen ekstra webserver (som Apache, Nginx, IIS), der skal installeres. < br> Ubelejligt er, at webadressen på sider ikke er brugervenlige og begynder med din Dolibarr-sti. <br> URL betjent af Dolibarr: <br> <strong> %s </ strong> <br> <br> Sådan bruger du din egen ekstern webserver til at tjene dette websted, opret en virtuel vært på din webserver, der peger på biblioteket <br> <strong> %s </ strong>, og indtast derefter navnet på denne virtuelle server og klik på den anden preview-knap . +PreviewSiteServedByDolibarr= <u> Eksempel %s i en ny fane. </u> <br> <br> %s vil blive serveret af Dolibarr-serveren, så den ikke behøver nogen ekstra webserver (som Apache, Nginx, IIS), der skal installeres. <br> Det ubelejlige er, at webadresserne til sider ikke er brugervenlige og starter med stien til din Dolibarr. <br> URL tjent med Dolibarr: <br> <strong> %s </strong> <br> <br> For at bruge din egen eksterne webserver til at tjene denne hjemmeside, oprette en virtuel vært på din webserver, der peger på mappen <br> <strong> %s </strong> <br> derefter indtaste navnet på denne virtuelle server i egenskaberne af dette websted og klik på linket "Test / Implementering på nettet". VirtualHostUrlNotDefined=URL til den virtuelle vært, der serveres af en ekstern webserver, der ikke er defineret NoPageYet=Ingen sider endnu YouCanCreatePageOrImportTemplate=Du kan oprette en ny side eller importere en fuld hjemmeside skabelon @@ -137,3 +137,11 @@ PagesRegenerated=%sside (r) / container (r) regenereret RegenerateWebsiteContent=Genopret cache-filer på webstedet AllowedInFrames=Tilladt i rammer DefineListOfAltLanguagesInWebsiteProperties=Definer liste over alle tilgængelige sprog i webstedets egenskaber. +GenerateSitemaps=Generer webstedets sitemapfil +ConfirmGenerateSitemaps=Hvis du bekræfter, sletter du den eksisterende sitemapfil ... +ConfirmSitemapsCreation=Bekræft generering af sitemap +SitemapGenerated=Sitemap genereret +ImportFavicon=Favicon +ErrorFaviconType=Favicon skal være png +ErrorFaviconSize=Favicon skal være i størrelse 32x32 +FaviconTooltip=Upload et billede, der skal være en png på 32x32 diff --git a/htdocs/langs/da_DK/zapier.lang b/htdocs/langs/da_DK/zapier.lang index 27884d7005a..412c0e028fa 100644 --- a/htdocs/langs/da_DK/zapier.lang +++ b/htdocs/langs/da_DK/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier til Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier til Dolibarr-modul - -# -# Admin page -# -ZapierForDolibarrSetup = Opsætning af Zapier til Dolibarr -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Opsætning af Zapier til Dolibarr +ZapierDescription=Interface med Zapier +ZapierAbout=Om modulet Zapier +ZapierSetupPage=Der er ikke behov for en opsætning på Dolibarr-siden for at bruge Zapier. Du skal dog generere og udgive en pakke på zapier for at kunne bruge Zapier med Dolibarr. Se dokumentation på <a href="https://wiki.dolibarr.org/index.php/Module_Zapier"> denne wiki-side </a>. diff --git a/htdocs/langs/de_AT/accountancy.lang b/htdocs/langs/de_AT/accountancy.lang index 2caaa72c1fd..f2d0909a71e 100644 --- a/htdocs/langs/de_AT/accountancy.lang +++ b/htdocs/langs/de_AT/accountancy.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - accountancy MenuBankAccounts=Kontonummern -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/de_AT/admin.lang b/htdocs/langs/de_AT/admin.lang index 2cae2180393..07388acbb52 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -72,7 +72,6 @@ Module70Name=Eingriffe Module70Desc=Eingriffsverwaltung Module80Name=Sendungen Module310Desc=Mitgliederverwaltun -Module59000Desc=Module to follow margins Permission31=Produkte/Services einsehen Permission32=Produkte/Services erstellen/bearbeiten Permission34=Produkte/Services löschen @@ -129,6 +128,7 @@ SummaryConst=Liste aller Systemeinstellungen Skin=Oberfläche DefaultSkin=Standardoberfläche CompanyCurrency=Firmenwährung +ShowBugTrackLink=Show link "<strong>%s</strong>" WatermarkOnDraftInvoices=Wasserzeichen auf Rechnungsentwürfen (alle, falls leer) WatermarkOnDraftProposal=Wasserzeichen für Angebotsentwürfe (alle, falls leer) BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Fragen Sie nach dem Bestimmungsort des Bankkontos der Bestellung @@ -148,7 +148,6 @@ LDAPMembersTypesSynchro=Mitgliedertypen LDAPSynchronization=LDAP Synchronisierung LDAPFunctionsNotAvailableOnPHP=LDAP Funktionen nicht verfügbar in Deinem PHP LDAPFieldFullname=vollständiger Name -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) ClickToDialSetup=Click-to-Dial-Moduleinstellungen MailToSendShipment=Sendungen MailToSendIntervention=Eingriffe diff --git a/htdocs/langs/de_AT/bills.lang b/htdocs/langs/de_AT/bills.lang index 1bcce6a96fe..cd770616b3d 100644 --- a/htdocs/langs/de_AT/bills.lang +++ b/htdocs/langs/de_AT/bills.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - bills +BillsLate=Verspätete Zahlungen DisabledBecauseNotErasable=Deaktiviert, weil es nicht gelöscht werden kann InvoiceStandardDesc=Dies ist die übliche Rechnungsart. InvoiceProForma=Proformarechnung @@ -21,7 +22,6 @@ ValidateInvoice=Validate Rechnung DisabledBecausePayments=Nicht möglich, da gibt es einige Zahlungen CantRemovePaymentWithOneInvoicePaid=Kann die Zahlung nicht entfernen, da es zumindest auf der Rechnung bezahlt klassifiziert PayedByThisPayment=Bezahlt durch diese Zahlung -TerreNumRefModelDesc1=Zurück NUMERO mit Format %syymm-nnnn für Standardrechnungen und syymm%-nnnn für Gutschriften, wo ist JJ Jahr, MM Monat und nnnn ist eine Folge ohne Pause und keine Rückkehr auf 0 TypeContact_facture_internal_SALESREPFOLL=Repräsentative Follow-up Debitorenrechnung TypeContact_facture_external_BILLING=Debitorenrechnung Kontakt TypeContact_facture_external_SHIPPING=Customer Versand Kontakt diff --git a/htdocs/langs/de_AT/externalsite.lang b/htdocs/langs/de_AT/externalsite.lang index d481926dd08..a3871bced11 100644 --- a/htdocs/langs/de_AT/externalsite.lang +++ b/htdocs/langs/de_AT/externalsite.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Verknüpfung zur externen Website einrichten -ExternalSiteURL=Externe Seiten-URL ExampleMyMenuEntry=Mein Menüeintrag diff --git a/htdocs/langs/de_AT/modulebuilder.lang b/htdocs/langs/de_AT/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/de_AT/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/de_AT/orders.lang b/htdocs/langs/de_AT/orders.lang index b004e480119..9eb74a30c57 100644 --- a/htdocs/langs/de_AT/orders.lang +++ b/htdocs/langs/de_AT/orders.lang @@ -4,6 +4,7 @@ OrderToProcess=Zu bearbeitende Bestellung StatusOrderValidatedShort=Bestätigt StatusOrderValidated=Bestätigt StatusOrderOnProcess=In Arbeit +AddPurchaseOrder=Bestellung anlegen RefOrder=Bestellung Nr. AuthorRequest=Authorenrechte beantragen PaymentOrderRef=Zahlung zu Bestellung %s diff --git a/htdocs/langs/de_AT/products.lang b/htdocs/langs/de_AT/products.lang index 454cbcab118..272a2cf3d92 100644 --- a/htdocs/langs/de_AT/products.lang +++ b/htdocs/langs/de_AT/products.lang @@ -17,7 +17,6 @@ ProductStatusOnBuyShort=Verfügbar ProductStatusNotOnBuyShort=Veraltet SellingPriceTTC=Verkaufspreis (brutto) CantBeLessThanMinPrice=Der aktuelle Verkaufspreis unterschreitet die Preisuntergrenze dieses Produkts (%s ohne MwSt.) -AssociatedProductsAbility=Enable Kits (set of several products) NoMatchFound=Keine Treffer gefunden DeleteProduct=Produkt/Service löschen ConfirmDeleteProduct=Möchten Sie dieses Produkt/Service wirklich löschen? diff --git a/htdocs/langs/de_AT/propal.lang b/htdocs/langs/de_AT/propal.lang index c96a462a74a..c0d9c0ab2b4 100644 --- a/htdocs/langs/de_AT/propal.lang +++ b/htdocs/langs/de_AT/propal.lang @@ -7,6 +7,7 @@ DateEndPropal=Ablauf der Bindefrist ValidityDuration=Bindefrist CopyPropalFrom=Erstelle neues Angebot durch Duplikation DefaultProposalDurationValidity=Standardmäßige Bindefrist (Tage) +AvailabilityPeriod=Lieferzeit AvailabilityTypeAV_NOW=Prompt nach Rechnungserhalt TypeContact_propal_internal_SALESREPFOLL=Angebotsnachverfolgung durch Vertreter TypeContact_propal_external_BILLING=Debitorenrechnung Kontakt diff --git a/htdocs/langs/de_AT/withdrawals.lang b/htdocs/langs/de_AT/withdrawals.lang index 3ae942e5927..1e452c7a2bd 100644 --- a/htdocs/langs/de_AT/withdrawals.lang +++ b/htdocs/langs/de_AT/withdrawals.lang @@ -5,4 +5,3 @@ StatusWaiting=Wartestellung StatusMotif2=Abbuchung angefochten StatusMotif5=Fehlerhafte Kontodaten OrderWaiting=Wartestellung -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/de_CH/accountancy.lang b/htdocs/langs/de_CH/accountancy.lang index 0a0ec0ef160..d98030ee805 100644 --- a/htdocs/langs/de_CH/accountancy.lang +++ b/htdocs/langs/de_CH/accountancy.lang @@ -104,7 +104,6 @@ VentilatedinAccount=Erfolgreich mit dem Buchhaltungskonto verknüpft! NotVentilatedinAccount=Nicht mit einem Buchhaltungskonto verknüpft XLineSuccessfullyBinded=%s Produkte / Leistungen erfolgreich mit einem Buchhaltungskonto verknüpft. XLineFailedToBeBinded=%s Produkte / Leistungen konnten nicht mit einem Buchhaltungskonto verknüpft werden. -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Sortiere nach den neuesten zu verknüpfenden Positionen ACCOUNTING_LIST_SORT_VENTILATION_DONE=Sortiere nach den neuesten zu verknüpften Positionen ACCOUNTING_LENGTH_DESCRIPTION=Produkt- und Dienstleistungsbeschreibungen abkürzen (Wir empfehlen nach 50 Zeichen) @@ -138,7 +137,6 @@ LabelOperation=Vorgangsbezeichnung LetteringCode=Beschriftung JournalLabel=Journalbezeichnung TransactionNumShort=Transaktionsnummer -AccountingCategory=Eigene Kontogruppen AccountingAccountGroupsDesc=Trage hier deine eigenen Buchhaltungs - Kontogruppen ein. Daraus kannst du spezielle Berichte erzeugen. ByAccounts=Nach Konto ByPredefinedAccountGroups=Nach Gruppe diff --git a/htdocs/langs/de_CH/admin.lang b/htdocs/langs/de_CH/admin.lang index b81530cabec..316e2eccb2f 100644 --- a/htdocs/langs/de_CH/admin.lang +++ b/htdocs/langs/de_CH/admin.lang @@ -174,8 +174,6 @@ InfDirExample=<br>Dann deklariere in <strong>conf.php</strong><br> $dolibarr_mai CallUpdatePage=Zur Aktualisierung der Daten und der Datenbankstruktur gehst du zur Seite %s. UpdateServerOffline=Update-Server offline WithCounter=Zähler verwalten -GenericMaskCodes=Sie können ein beliebiges Numerierungsschema wählen. Dieses Schema könnte z.B. so aussehen:<br><b>{000000}</b> steht für eine 6-stellige Nummer, die sich bei jedem neuen %s automatisch erhöht. Wählen Sie die Anzahl der Nullen je nach gewünschter Nummernlänge. Der Zähler füllt sich automatisch bis zum linken Ende mit Nullen um das gewünschte Format abzubilden. <br><b>{000000+000}</b> führt zu einem ähnlichen Ergebnis, allerdings mit einem Wertsprung in Höhe des Werts rechts des Pluszeichens, der beim ersten %s angewandt wird. <br><b>{000000@x}</b> wie zuvor, jedoch stellt sich der Zähler bei Erreichen des Monats x (zwischen 1 und 12) automatisch auf 0 zurück. Ist diese Option gewählt und x hat den Wert 2 oder höher, ist die Folge {mm}{yy} or {mm}{yyyy} ebenfalls erfoderlich. <br><b>{dd}</b> Tag (01 bis 31).<br><b>{mm}</b> Monat (01 bis 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> Jahreszahl 1-, 2- oder 4-stellig. <br> -GenericMaskCodes2=<b>{cccc}</b> der Kunden-Code mit n Zeichen<br><b>{cccc000}</b> der Kunden-Code mit n Zeichen, gefolgt von der dem Kunden zugeordneten Partner ID. Dieser Zähler wird gleichzeitig mit dem Globalen Zähler zurückgesetzt.<br><b>{tttt}</b> Die Partner ID mit n Zeichen (siehe unter Einstellungen->Stammdaten->Arten von Partnern). Wenn diese Option aktiv ist, wird für jede Partnerart ein separater Zähler geführt.<br> GenericMaskCodes3=Alle anderen Zeichen in der Maske bleiben. <br> Leerzeichen sind nicht zulässig. <br> GenericMaskCodes4a=<u>Beispiel auf der 99. %s des Partners DieFirma, mit Datum 2007-01-31:</u> <br> GenericMaskCodes4b=<u>Beispiel für Dritte erstellt am 2007-03-01:</u> <br> @@ -320,7 +318,6 @@ Module50400Name=Doppelte Buchhaltung Module54000Desc=Direktdruck (ohne die Dokumente zu öffnen) mittels CUPS IPP.\nDer Server muss dazu CUPS am Laufen haben und Zugriff auf einen Drucker haben. Module55000Name=Befragung, Umfrage oder Abstimmung Module55000Desc=Modul zur Erstellung von Online-Umfragen, Umfragen oder Abstimmungen (wie Doodle, Studs, Rdvz,....) -Module59000Desc=Module to follow margins Module62000Name=Lieferbedingungen Module62000Desc=Hinzufügen von Funktionen zur Verwaltung von Lieferbedingungen (Incoterms) Module63000Desc=Hier kannst du deine Ressourcen (Drucker, Räume, Fahrzeuge) Kalenderereignissen zuweisen. @@ -373,10 +370,13 @@ Permission1187=Empfangsbestätigung Lieferantenbestellung quittieren Permission1190=Lieferantenbestellungen bestätigen (zweite Bestätigung). Permission1231=Lieferantenrechnungen einsehen Permission1232=Lieferantenrechnungen erzeugen und bearbeiten -Permission1235=Lieferantenrechnungen per E-Mail versenden Permission1236=Kundenrechnungen, -attribute und -zahlungen exportieren Permission1421=Kundenaufträge mit Attributen exportieren Permission2414=Aktionen und Aufgaben anderer exportieren +Permission23001=anzeigen cronjobs +Permission23002=erstellen/ändern cronjobs +Permission23003=cronjobs löschen +Permission23004=cronjobs ausführen Permission59002=Gewinspanne definieren DictionaryCompanyType=Geschäftspartner Typen DictionaryCompanyJuridicalType=Rechtsformen von Unternehmen @@ -462,7 +462,6 @@ MemcachedNotAvailable=Kein Cache Anwendung gefunden. \nSie können die Leistung MemcachedModuleAvailableButNotSetup=Module memcached für applicative Cache gefunden, aber Setup-Modul ist nicht vollständig. MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is enabled.. ServiceSetup=Leistungen Modul Setup -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) SetDefaultBarcodeTypeProducts=Standard-Barcode-Typ für Produkte SetDefaultBarcodeTypeThirdParties=Standard-Barcode-Typ für Geschäftspartner UseUnits=Definieren Sie eine Masseinheit für die Menge während der Auftrags-, Auftragsbestätigungs- oder Rechnungszeilen-Ausgabe diff --git a/htdocs/langs/de_CH/bills.lang b/htdocs/langs/de_CH/bills.lang index ea6a4b02a75..04ebdfdd4c2 100644 --- a/htdocs/langs/de_CH/bills.lang +++ b/htdocs/langs/de_CH/bills.lang @@ -1,7 +1,9 @@ # Dolibarr language file - Source file is en_US - bills BillsCustomersUnpaid=Offene Kundenrechnungen BillsCustomersUnpaidForCompany=Unbezahlte Rechnungen von %s +BillsSuppliersUnpaid=Unbezahlte Lieferantenrechnungen BillsSuppliersUnpaidForCompany=Unbezahlte Rechnungen für %s +BillsLate=Verspätete Zahlungen BillsStatistics=Zahlungsstatistik - Kundenrechnungen BillsStatisticsSuppliers=Zahlungsstatistik - Lieferantenrechnungen DisabledBecauseDispatchedInBookkeeping=Das ist inaktiv, weil die Rechnung schon verbucht ist. @@ -173,10 +175,12 @@ ChequesArea=Schecks ChequeDeposits=Scheckeinlagen NoteListOfYourUnpaidInvoices=Bitte beachten: Diese Liste enthält nur Rechnungen für Geschäftspartner, bei denen Sie als Vertreter angegeben sind. YouMustCreateStandardInvoiceFirstDesc=Sie müssen zuerst eine Standardrechnung Erstellen und diese dann in eine Rechnungsvorlage umwandeln +TypeContact_facture_external_BILLING=Kundenrechnung Kontakt TypeContact_invoice_supplier_external_BILLING=Lieferanten - Rechnungskontakt TypeContact_invoice_supplier_external_SHIPPING=Lieferanten - Versandkontakt InvoiceFirstSituationAsk=Erste Situation Rechnung InvoiceSituation=Situation Rechnung +PDFInvoiceSituation=Situation Rechnung SituationAmount=Situation Rechnungsbetrag (ohne MwSt.) CreateNextSituationInvoice=Erstelle nächsten Position DisabledBecauseNotLastInCycle=Der folgende Situation ist bereits vorhanden. diff --git a/htdocs/langs/de_CH/boxes.lang b/htdocs/langs/de_CH/boxes.lang index e4f64b3302a..1170e06a180 100644 --- a/htdocs/langs/de_CH/boxes.lang +++ b/htdocs/langs/de_CH/boxes.lang @@ -65,4 +65,3 @@ 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/categories.lang b/htdocs/langs/de_CH/categories.lang index 974a26170ae..cebc3c2b78a 100644 --- a/htdocs/langs/de_CH/categories.lang +++ b/htdocs/langs/de_CH/categories.lang @@ -12,7 +12,6 @@ SuppliersCategoriesArea=Bereich für Lieferanten-Tags / Kategorien CustomersCategoriesArea=Schlagwörter / Kategorien für Kunden MembersCategoriesArea=Schlagwörter / Kategorien für Mitglieder ContactsCategoriesArea=Schlagwörter / Kategorien für Kontakte -AccountsCategoriesArea=Schlagwörter / Kategorien für Konten ProjectsCategoriesArea=Schlagwörter / Kategorien für Projekte UsersCategoriesArea=Benutzerschlagworte und -kategorien SubCats=Unterkategorien diff --git a/htdocs/langs/de_CH/companies.lang b/htdocs/langs/de_CH/companies.lang index 552d590f169..3bca2038541 100644 --- a/htdocs/langs/de_CH/companies.lang +++ b/htdocs/langs/de_CH/companies.lang @@ -23,8 +23,6 @@ ThirdPartyEmail=E-Mail des Geschäftspartners ThirdPartyProspectsStats=Interessenten Statistik ThirdPartyType=Typ des Geschäftspartners ToCreateContactWithSameName=Erzeuge einen Kontakt mit den selben Angaben, wie der Geschäftspartner. Meistens (auch wenn der Partner eine natürliche Person ist), braucht es das nicht. -ReportByMonth=Monatsbericht -ReportByCustomers=Kundenbericht PostOrFunction=Position NatureOfThirdParty=Typ des Geschäftspartners NatureOfContact=Typ des Geschäftspartners @@ -155,6 +153,10 @@ TE_WHOLE=Distributor StatusProspect-1=Nicht kontaktieren StatusProspect0=Noch kein Kontaktversuch StatusProspect3=Erfolgreich kontaktiert +ChangeDoNotContact=Ändern Sie den Status auf 'Nicht kontaktieren' +ChangeNeverContacted=Ändern Sie den Status auf 'Noch kein Kontaktversuch' +ChangeContactInProcess=Ändern Sie den Status auf 'Kontaktaufnahme läuft' +ChangeContactDone=Ändern Sie den Status auf 'Erfolgreich kontaktiert' ProspectsByStatus=Leads nach Status NoParentCompany=Keine Mutterfirma ContactNotLinkedToCompany=Kontakt keinem Geschäftspartner zugeordnet @@ -179,7 +181,6 @@ ActivityCeased=Inaktiv ThirdPartyIsClosed=Der Partner ist inaktiv. OutstandingBillReached=Kreditlimit erreicht OrderMinAmount=Mindestbestellmenge -MonkeyNumRefModelDesc=Generiere die Kundennummer im Format %syymm-nnnn und die Lieferantennummer als %syymm-nnnn. (y=Jahr; m=Monat; n=fortlaufende Zahl). MergeOriginThirdparty=Geschäftspartner duplizieren (Geschäftspartner, den Sie löschen möchten) MergeThirdparties=Zusammenführen von Geschäftspartnern ConfirmMergeThirdparties=Willst du diesen Partner wirklich mit dem aktuellen Verbinden?\nAlle verknüpften Objekte werden dabei übernommen und dann der gewählte Partner gelöscht. diff --git a/htdocs/langs/de_CH/compta.lang b/htdocs/langs/de_CH/compta.lang index 1690ed0c885..d5a93e6ef69 100644 --- a/htdocs/langs/de_CH/compta.lang +++ b/htdocs/langs/de_CH/compta.lang @@ -26,6 +26,5 @@ ThirdPartyMustBeEditAsCustomer=Geschäftspartner muss als Kunde definiert werden Pcg_type=PCG Typ Pcg_subtype=PCG Subtyp InvoiceLinesToDispatch=versandbereite Rechnungszeilen -ToCreateAPredefinedInvoice=Um eine Rechnungsvorlage zu erstellen, erstellen Sie eine Standard-Rechnung und klicken dann (ohne Freigabe) auf den Knopf "%s". CalculationRuleDesc=Zur Berechnung der Gesamt-MwSt. gibt es zwei Methoden: <br>Methode 1 rundet die Steuer in jeder Zeile und addiert zum Schluss. <br>Methode 2 summiert alle Steuer-Zeilen und rundet am Ende. <br>Das endgültige Ergebnis kann sich in wenigen Cent unterscheiden. Standardmodus ist <b>Modus %s.</b> LinkedFichinter=Mit einem Eingriff verknüpfen diff --git a/htdocs/langs/de_CH/main.lang b/htdocs/langs/de_CH/main.lang index 672bfdcc6f9..0cc93b38bf1 100644 --- a/htdocs/langs/de_CH/main.lang +++ b/htdocs/langs/de_CH/main.lang @@ -114,6 +114,8 @@ UserCreationShort=Neu UserModificationShort=Ändern UserValidationShort=Validieren Second=Zweitens +Morning=Morgen +Afternoon=Nachmittag MinuteShort=min CurrencyRate=Wechselkurs UserAuthor=Erstellt von @@ -175,6 +177,7 @@ AddressesForCompany=Adressen für den Geschäftspartner ActionsOnCompany=Ereignisse zu diesem Geschäftspartner ActionsOnContact=Ereignisse zu diesem Kontakt ActionsOnContract=Ereignisse zu diesem Vertrag +ActionsOnMember=Aktionen zu diesem Mitglied ActionsOnProduct=Vorgänge zu diesem Produkt ToDo=Zu erledigen Running=In Bearbeitung @@ -217,6 +220,7 @@ ExpandAll=Alle ausklappen UndoExpandAll=Ausklappen rückgängig machen SeeAll=Zeige alles an CloseWindow=Fenster schliessen +Priority=Wichtigkeit NotSent=Nicht gesendet SendAcknowledgementByMail=Bestätigungsemail senden SendMail=sende E-Mail @@ -263,6 +267,8 @@ ByMonthYear=Von Monat / Jahr AdminTools=Administratorwerkzeuge MyDashboard=Mein Dashboard SelectTargetUser=Wähle den Benutzer / Mitarbeiter +SaveUploadedFileWithMask=Datei auf dem Server speichern mit dem Namen "<strong>%s</strong>" (oder "%s") +OriginFileName=Original Dateiname ShowMoreLines=Mehr oder weniger Positionen anzeigen SelectElementAndClick=Wähle etwas aus und klicke dann auf %s ShowTransaction=Zeige die Transaktion auf dem zugehörigen Bankkonto. @@ -297,8 +303,6 @@ GroupBy=Sortieren nach ViewFlatList=Einfache Liste anzeigen RemoveString=Entferne die Zeichenfolge '%s' SomeTranslationAreUncomplete=Du siehst ungenaue Übersetzungen oder unvollständig Übersetzte Sprachen? Hilf uns, das zu verbessern und registriere dich in der <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">Dolibarr - Übersetzungsumgebung</a>, Danke! -DirectDownloadLink=Direkter externer Downloadlink -DirectDownloadInternalLink=Direkter Downloadlink, wenn eingeloggt und die Rechte vorhanden sind. ActualizeCurrency=Aktualisiere Währung ModuleBuilder=Modul und Applikationsentwicklungsumgebung SetMultiCurrencyCode=Setze Währung @@ -344,7 +348,6 @@ LocalAndRemote=Lokal und Entfernt KeyboardShortcut=Tastaturkürzel Deletedraft=Lösche den Entwurf ConfirmMassDraftDeletion=Bestätigung Mehrfachlöschung von Entwürfen -FileSharedViaALink=Datei ist geteilt SelectAThirdPartyFirst=Wähle zuerst einen Partner aus. YouAreCurrentlyInSandboxMode=Wir sind aktuell im %s "sandbox" Modus Inventory=Inventar diff --git a/htdocs/langs/de_CH/margins.lang b/htdocs/langs/de_CH/margins.lang index 6fb3f4ceed5..0087c11d386 100644 --- a/htdocs/langs/de_CH/margins.lang +++ b/htdocs/langs/de_CH/margins.lang @@ -1,4 +1,8 @@ # Dolibarr language file - Source file is en_US - margins +ProductService=Produkt oder Service +UseDiscountAsProduct=Als Produkt +UseDiscountAsService=Als Service +UseDiscountOnTotal=Auf Zwischensumme MARGIN_TYPE=Kaufpreis / Kosten standardmässig vorgeschlagen für Standardmargenkalkulation empfohlen\n MargeType1=Marge nach höchstem Lieferantenpreis MargeType3=Spanne vom Einstandspreis diff --git a/htdocs/langs/de_CH/modulebuilder.lang b/htdocs/langs/de_CH/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/de_CH/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/de_CH/orders.lang b/htdocs/langs/de_CH/orders.lang index 18c31d48556..5455bdff8b9 100644 --- a/htdocs/langs/de_CH/orders.lang +++ b/htdocs/langs/de_CH/orders.lang @@ -14,6 +14,7 @@ AwaitingReception=Lieferung ausstehend StatusOrderReceivedAllShort=Erhaltene Produkte CancelOrder=Bestellung verwerfen ShowOrder=Zeige Bestellung +OrdersOpened=Bestellungen zu bearbeiten NoOrder=Keine Bestellung LastOrders=%s neueste Kundenbestellungen LastCustomerOrders=%s neueste Kundenbestellungen @@ -28,6 +29,7 @@ ConfirmUnvalidateOrder=Bist du sicher, dass du die Bestellung <b>%s</b> in den E ConfirmCancelOrder=Bist du sicher, dass du diese Bestellung zurückziehen willst? ConfirmMakeOrder=Bist du sicher, dass du bestätigen willst, diese Bestellung am <b>%s</b> gemacht zu haben? DraftSuppliersOrders=Lieferantenbestellungsentwürfe +RefOrder=Bestell-Nr. RefCustomerOrder=Kunden - Bestellnummer RefOrderSupplier=Bestellnummer für den Lieferanten RefOrderSupplierShort=Lieferanten - Bestellnummer @@ -43,7 +45,6 @@ TypeContact_order_supplier_external_SHIPPING=Lieferanten - Versandkontakt TypeContact_order_supplier_external_CUSTOMER=Lieferanten - Nachkalkulationskontakt Error_OrderNotChecked=Keine zu verrechnenden Bestellungen ausgewählt OrderByEMail=E-Mail -PDFEinsteinDescription=A complete order model OrderCreation=Erstellen einer Bestellung IfValidateInvoiceIsNoOrderStayUnbilled=Wenn Rechnungsvalidierung auf "Nein" steht, bleibt die Bestellung im Status "nicht verrechnet", bis die Rechnung frei gegeben worden ist. SetShippingMode=Versandart wählen diff --git a/htdocs/langs/de_CH/other.lang b/htdocs/langs/de_CH/other.lang index bc73e4c58b0..f1244585ec1 100644 --- a/htdocs/langs/de_CH/other.lang +++ b/htdocs/langs/de_CH/other.lang @@ -20,7 +20,10 @@ ProfIdShortDesc=<b>Prof ID %s</b> dient zur Speicherung landesabhängiger Gesch EMailTextInterventionValidated=Service %s wurde freigegeben NewSizeAfterCropping=Neue Grösse nach dem Zuschneiden DefineNewAreaToPick=Definieren Sie einen neuen Bereich innerhalb des Bildes (Klicken Sie mit der linken Maustaste auf das Bild und halten Sie bis zur gegenüberligenden Ecke) +YouReceiveMailBecauseOfNotification=Sie erhalten diese Nachricht, weil Ihre E-Mail-Adresse zur Liste der zu benachrichtigenden Kontakte für %s von %s hinzugefügt wurde. +YouReceiveMailBecauseOfNotification2=Sie erhalten dieses Mail aufgrund folgender Benachrichtigung: FileIsTooBig=Dateien sind zu gross +NewKeyWillBe=Ihr neuer Anmeldeschlüssel für die Software ist WebsiteSetup=Einstellungen des Webseitenmoduls WEBSITE_PAGEURL=URL für Seite WEBSITE_TITLE=Titel diff --git a/htdocs/langs/de_CH/productbatch.lang b/htdocs/langs/de_CH/productbatch.lang index a75518f8415..53cdcf4be92 100644 --- a/htdocs/langs/de_CH/productbatch.lang +++ b/htdocs/langs/de_CH/productbatch.lang @@ -1,12 +1,17 @@ # Dolibarr language file - Source file is en_US - productbatch +ManageLotSerial=Verwende Lot / Seriennummer +ProductStatusNotOnBatch=Nein (Lot / Seriennummer nicht verwendet) Batch=Lot / Seriennumer atleast1batchfield="Verbrauchen bis:" - oder "Verkaufen bis:" - Datum. Oder Lot / Seriennummer +batch_number=Lot / Seriennummer +BatchNumberShort=Charge / Serie EatByDate="Verbrauchen bis:" - Datum SellByDate="Verkaufen bis:" - Datum DetailBatchNumber=Details Lot / Serienummer printBatch=Chg / Serie: %s AddDispatchBatchLine=Fügen Sie eine Zeile für Haltbarkeit hinzu WhenProductBatchModuleOnOptionAreForced=Bei aktiviertem Modul Lot / Seriennummer wird bei Freigabe einer Lieferung der Lagerbestand automatisch vermindert.\nUmgekehrt erfolgt die Lagerzunahme bei erst bei manuellem Verschieben in die Lager.\nDas kann man nicht ändern. Die anderen Optionen kannst du ändern. +ProductDoesNotUseBatchSerial=Dieses Produkt verwendet keine Lose oder Seriennummern ProductLotSetup=Einstellungen Modul Lot / Seriennummer ShowCurrentStockOfLot=Zeige aktuellen Lagerbestand von Produkt / Lot Paaren ShowLogOfMovementIfLot=Zeige Lagerbewegungen von Produkt / Lot Paaren diff --git a/htdocs/langs/de_CH/products.lang b/htdocs/langs/de_CH/products.lang index b2ef1eb5c60..fe068de6eeb 100644 --- a/htdocs/langs/de_CH/products.lang +++ b/htdocs/langs/de_CH/products.lang @@ -38,7 +38,6 @@ ServicesArea=Leistungs-Übersicht SupplierCard=Anbieterkarte SetDefaultBarcodeType=Wählen Sie den standardmässigen Barcode-Typ MultiPricesAbility=Preisstufen pro Produkt / Dienstleistung\n(Kunden werden einem Segment zugewiesen) -AssociatedProductsAbility=Enable Kits (set of several products) ParentProducts=Übergeordnetes Produkt ListOfProductsServices=Liste der Produkte und Dienstleistungen QtyMin=Mindestmenge diff --git a/htdocs/langs/de_CH/propal.lang b/htdocs/langs/de_CH/propal.lang index 17738ed820a..d345fdc8e28 100644 --- a/htdocs/langs/de_CH/propal.lang +++ b/htdocs/langs/de_CH/propal.lang @@ -8,10 +8,13 @@ LastModifiedProposals=%s neueste geänderte Offerten ProposalsStatistics=Angebote Statistiken PropalsOpened=Offen PropalStatusSigned=Unterzeichnet (ist zu verrechnen) +PropalStatusNotSigned=Nicht unterzeichnet (geschlossen) +PropalStatusClosedShort=Geschlossen PropalStatusSignedShort=Unterzeichnet PropalStatusNotSignedShort=Nicht unterzeichnet PropalsToClose=Zu schliessende Angebote ListOfProposals=Liste der Angebote +ActionsOnPropal=Ereignisse zum Angebot DefaultProposalDurationValidity=Standardmässige Gültigkeitsdatuer (Tage) AvailabilityPeriod=Verfügbarkeitszeitraum SetAvailability=Verfügbarkeitszeitraum definieren diff --git a/htdocs/langs/de_CH/stocks.lang b/htdocs/langs/de_CH/stocks.lang index 50f00fefcad..0e46de215c7 100644 --- a/htdocs/langs/de_CH/stocks.lang +++ b/htdocs/langs/de_CH/stocks.lang @@ -29,3 +29,4 @@ OpenAll=Für alle Aktionen freigeben UseDispatchStatus=Auslieferungs - Status (frei gegeben / zurückgewiesen) für Lieferantenbestellungen führen. inventoryDraft=Läuft inventoryOnDate=Inventar +ReOpen=entwerfen diff --git a/htdocs/langs/de_CH/users.lang b/htdocs/langs/de_CH/users.lang index 18929f1b851..9f4f080f55d 100644 --- a/htdocs/langs/de_CH/users.lang +++ b/htdocs/langs/de_CH/users.lang @@ -37,7 +37,7 @@ WeeklyHours=Geleistete Stunden pro Woche ExpectedWorkedHours=Erwartete Stunden pro Woche DisabledInMonoUserMode=Im Wartungsmodus deaktiviert UserAccountancyCode=Buchhaltungskonto zum Benutzer -DateEmployment=Datum der Anstellung +DateEmploymentstart=Datum der Anstellung DateEmploymentEnd=Datum des Austrittes CantDisableYourself=Du kannst dein eigenes Benutzerkonto nicht löschen. ForceUserExpenseValidator=Anderen Prüfer für Spesenabrechnungen bestimmen. diff --git a/htdocs/langs/de_CH/withdrawals.lang b/htdocs/langs/de_CH/withdrawals.lang index 72755cae42a..4a0aee41836 100644 --- a/htdocs/langs/de_CH/withdrawals.lang +++ b/htdocs/langs/de_CH/withdrawals.lang @@ -6,4 +6,3 @@ StatusPaid=Verarbeitet StatusMotif4=Kundenbestellungen OrderWaiting=Wartend NumeroNationalEmetter=Nat. Überweisernummer -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/de_DE/accountancy.lang b/htdocs/langs/de_DE/accountancy.lang index 8e2382d07d4..a3725e98324 100644 --- a/htdocs/langs/de_DE/accountancy.lang +++ b/htdocs/langs/de_DE/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=verbundene Rechnungszeilen ExpenseReportLines=Zeilen von Spesenabrechnungen zu verbinden ExpenseReportLinesDone=Gebundene Zeile von Spesenabrechnungen IntoAccount=mit dem Buchhaltungskonto verbundene Zeilen -TotalForAccount=Gesamtsumme für Buchhaltungskonto +TotalForAccount=Buchhaltungskonto Summe Ventilate=zusammenfügen @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal-Bezeichnung NumPiece=Teilenummer TransactionNumShort=Anz. Buchungen -AccountingCategory=Personalisierte Gruppen +AccountingCategory=Custom group GroupByAccountAccounting=Gruppieren nach Hauptbuchkonto GroupBySubAccountAccounting=Gruppieren nach Nebenbuchkonto AccountingAccountGroupsDesc=Hier können Kontengruppen definiert werden. Diese werden für personaliserte Buchhaltungsreports verwendet. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Zeilen noch nicht zugeordnet, verwende das Menu <a hr ## Import ImportAccountingEntries=Buchaltungseinträge +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Datum Export WarningReportNotReliable=Achtung, dieser Bericht basiert nicht auf dem Hauptbuch und enthält keine Transaktionen, die manuell im Hauptbuch geändert wurden. Wenn Ihre Journalisierung aktuell ist, ist die Buchhaltungsansicht genauer. ExpenseReportJournal=Spesenabrechnung Journal InventoryJournal=Inventarjournal + +NAccounts=%s accounts diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 21f0a05f884..6256ec62784 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Sperrung neuer Sitzungen aufheben YourSession=Ihre Sitzung Sessions=Benutzersitzungen WebUserGroup=WebServer Benutzer/Gruppen +PermissionsOnFiles=Berechtigungen für Dateien PermissionsOnFilesInWebRoot=Berechtigungen für Dateien im Stammverzeichnis Web PermissionsOnFile=Berechtigungen für die Datei %s NoSessionFound=Ihre PHP -Konfiguration scheint keine Auflistung aktiver Sitzungen zuzulassen. Eventuell ist die Speicherung im Verzeichnis (<b>%s</b>) durch fehlende Berechtigungen blockiert (zum Beispiel: Betriebssystemberechtigungen oder open_basedir-Beschränkungen). @@ -62,6 +63,7 @@ IfModuleEnabled=Anmerkung: Ist nur wirksam wenn Modul <b>%s</b> aktiviert ist RemoveLock=Sie müssen die Datei <b>%s</b> entfernen oder umbennen, falls vorhanden, um die Benutzung des Installations-/Update-Tools zu erlauben. RestoreLock=Stellen Sie die Datei <b>%s</b> mit ausschließlicher Leseberechtigung wieder her, um die Benutzung des Installations-/Update-Tools zu deaktivieren. SecuritySetup=Sicherheitseinstellungen +PHPSetup=PHP-Einstellungen SecurityFilesDesc=Sicherheitseinstellungen für Dateiupload festlegen ErrorModuleRequirePHPVersion=Fehler: Dieses Modul benötigt die PHP Version %s oder höher ErrorModuleRequireDolibarrVersion=Fehler: Dieses Moduls benötigt die Dolibarr Version %s oder höher @@ -154,7 +156,7 @@ SystemToolsAreaDesc=In diesem Bereich finden Sie die Verwaltungsfunktionen. Verw Purge=Bereinigen PurgeAreaDesc=Auf dieser Seite können Sie alle von Dolibarr erzeugten oder gespeicherten Dateien (temporäre Dateien oder alle Dateien im Verzeichnis <b>%s</b> ) löschen. Die Verwendung dieser Funktion ist in der Regel nicht erforderlich. Es wird als Workaround für Benutzer bereitgestellt, deren Dolibarr von einem Anbieter gehostet wird, der keine Berechtigungen zum löschen von Dateien anbietet, die vom Webserver erzeugt wurden. PurgeDeleteLogFile=Löschen der Protokolldateien, einschließlich <b>%s</b>, die für das Syslog-Modul definiert wurden (kein Risiko Daten zu verlieren) -PurgeDeleteTemporaryFiles=Alle Protokoll- und temporären Dateien löschen (kein Risiko, Daten zu verlieren). Hinweis: Das Löschen temporärer Dateien erfolgt nur, wenn das temporäre Verzeichnis vor mehr als 24 Stunden erstellt wurde. +PurgeDeleteTemporaryFiles=Löscht alle Protokoll- und temporären Dateien (kein Risiko, Daten zu verlieren). Parameter können 'tempfilesold', 'logfiles' oder beide 'tempfilesold + logfiles' sein. Hinweis: Das Löschen temporärer Dateien erfolgt nur, wenn das temporäre Verzeichnis vor mehr als 24 Stunden erstellt wurde. PurgeDeleteTemporaryFilesShort=Protokoll- und temporäre Dateien löschen PurgeDeleteAllFilesInDocumentsDir=Alle Dateien im Verzeichnis: <b>%s</b> löschen: <br>Dadurch werden alle erzeugten Dokumente löschen, die sich auf verknüpfte (Dritte, Rechnungen usw....), Dateien, die in das ECM Modul hochgeladen wurden, Datenbank, Backup, Dumps und temporäre Dateien beziehen. PurgeRunNow=Jetzt bereinigen @@ -232,6 +234,7 @@ BoxesAvailable=Verfügbare Widgets BoxesActivated=Aktivierte Widgets ActivateOn=Aktiv ab ActiveOn=Aktiviert ab +ActivatableOn=Aktivierbar auf SourceFile=Quelldatei AvailableOnlyIfJavascriptAndAjaxNotDisabled=Nur bei aktiviertem JavaScript und AJAX verfügbar Required=Erforderlich @@ -289,7 +292,7 @@ MAIN_MAIL_AUTOCOPY_TO= Blindkopie (BCC) aller gesendeten E-Mails an MAIN_DISABLE_ALL_MAILS=Alle E-Mail-Funktionen deaktivieren (für Test- oder Demonstrationszwecke) MAIN_MAIL_FORCE_SENDTO=Sende alle E-Mails an den folgenden anstatt an die tatsächlichen Empfänger (für Testzwecke) MAIN_MAIL_ENABLED_USER_DEST_SELECT=E-Mail-Adressen von Mitarbeitern (falls definiert) beim Schreiben einer neuen E-Mail in der Liste vordefinierten Empfänger vorschlagen -MAIN_MAIL_SENDMODE=e-Mail Sendemethode +MAIN_MAIL_SENDMODE=E-Mail Sendemethode MAIN_MAIL_SMTPS_ID=SMTP-Benutzer (falls der Server eine Authentifizierung benötigt) MAIN_MAIL_SMTPS_PW=SMTP-Passwort (falls der Server eine Authentifizierung benötigt) MAIN_MAIL_EMAIL_TLS=TLS (SSL) Verschlüsselung verwenden @@ -302,7 +305,7 @@ MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Privater Schlüssel für die DKIM-Signatur MAIN_DISABLE_ALL_SMS=alle SMS-Funktionen abschalten (für Test- oder Demozwecke) MAIN_SMS_SENDMODE=Methode zum Versenden von SMS MAIN_MAIL_SMS_FROM=Standard Versandrufnummer der SMS-Funktion -MAIN_MAIL_DEFAULT_FROMTYPE=Standard Absender e-Mail für manuelle Sendungen (Benutzer e-Mail oder Unternehmen e-Mail) +MAIN_MAIL_DEFAULT_FROMTYPE=Standard Absenderadresse für manuelles Senden (Benutzer- oder Unternehmens-Adresse) 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. @@ -347,9 +350,10 @@ LastActivationAuthor=Benutzer der letzten Aktivierung LastActivationIP=IP der letzten Aktivierung UpdateServerOffline=Update-Server offline (nicht erreichbar) WithCounter=Zähler verwenden -GenericMaskCodes=Sie können ein beliebiges Numerierungsschema wählen. Dieses Schema könnte z.B. so aussehen:<br><b>{000000}</b> steht für eine 6-stellige Nummer, die sich bei jedem neuen %s automatisch erhöht. Wählen Sie die Anzahl der Nullen je nach gewünschter Nummernlänge. Der Zähler füllt sich automatisch bis zum linken Ende mit Nullen um das gewünschte Format abzubilden. <br><b>{000000+000}</b> führt zu einem ähnlichen Ergebnis, allerdings mit einem Wertsprung in Höhe des Werts rechts des Pluszeichens, der beim ersten %s angewandt wird. <br><b>{000000@x}</b> wie zuvor, jedoch stellt sich der Zähler bei Erreichen des Monats x (zwischen 1 und 12) automatisch auf 0 zurück. Ist diese Option gewählt und x hat den Wert 2 oder höher, ist die Folge {mm}{yy} or {mm}{yyyy} ebenfalls erforderlich. <br><b>{dd}</b> Tag (01 bis 31).<br><b>{mm}</b> Monat (01 bis 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> Jahreszahl 1-, 2- oder 4-stellig. <br> -GenericMaskCodes2=<b>{cccc}</b> der Kunden-Code mit n Zeichen <br> <b>{cccc000} Nach</b> dem Client-Code mit n Zeichen folgt ein Zähler, der für den Kunden <b>reserviert</b> ist. Dieser dem Kunden gewidmete Zähler wird gleichzeitig mit dem globalen Zähler zurückgesetzt. <br> <b>{tttt}</b> Der Code eines Drittanbieters setzt sich aus n Zeichen zusammen (siehe Menü Home - Setup - Dictionary - Typen von Drittanbietern). Wenn Sie dieses Tag hinzufügen, ist der Zähler für jeden Typ von Drittanbietern unterschiedlich. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Alle anderen Zeichen in der Maske bleiben erhalten. <br> \nLeerzeichen sind nicht zulässig. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Beispiel auf der 99. %s des Drittanbieters DieFirma, mit Datum 2007-01-31:</u> <br> GenericMaskCodes4b=<u>Beispiel für Partner erstellt am 2018-10-27:</u> <br> GenericMaskCodes4c=<u>Beispiel für ein Produkt erstellt am 2018-10-27:</u> <br> @@ -391,7 +395,7 @@ ResponseTimeout=Zeitüberschreitung für Antwort (Timeout) SmsTestMessage=Test Nachricht von __PHONEFROM__ zu __PHONETO__ ModuleMustBeEnabledFirst=Modul <b>%s</b> muss aktiviert sein, wenn Sie dieses Feature benötigen. 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 +NoSmsEngine=Kein SMS-Sendermanager verfügbar. Ein SMS-Sendermanager gehört nicht zum Standardumfang von Dolibarr, da er von einem externen Anbieter abhängig ist. Passende Module können Sie hier finden: %s PDF=PDF PDFDesc=Globale Einstellungen für die PDF-Erzeugung PDFAddressForging=Regeln für die Auswahl der Adressen @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Wenn Sie dieses Feld leer lassen, wird dieser Wert u ExtrafieldParamHelpselect=Die Liste der Werte muss aus Zeilen mit dem Format Schlüssel, Wert bestehen (wobei Schlüssel nicht '0' sein darf) <br><br> zum Beispiel: <br> 1, value1 <br> 2, value2 <br> Code3, Wert3 <br> ... <br><br> Damit die Liste von einer anderen ergänzenden Attributliste abhängt: <br> 1, value1 | options_ <i>parent_list_code</i> : parent_key <br> 2, value2 | options_ <i>parent_list_code</i> : parent_key <br><br> Um die Liste von einer anderen Liste abhängig zu machen: <br> 1, value1 | <i>parent_list_code</i> : parent_key <br> 2, value2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=Die Liste der Werte muss aus Zeilen mit dem Format Schlüssel, Wert bestehen (wobei Schlüssel nicht '0' sein darf) <br><br> zum Beispiel: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... ExtrafieldParamHelpradio=Die Liste der Werte muss aus Zeilen mit dem Format Schlüssel, Wert bestehen (wobei Schlüssel nicht '0' sein darf) <br><br> zum Beispiel: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... -ExtrafieldParamHelpsellist=Die Liste der Werte stammt aus einer Tabelle <br> Syntax: table_name:label_field:id_field::filter <br> Beispiel: c_typent:libelle:id::filter <br><br> - id_field ist notwendigerweise ein primärer int-Schlüssel <br> - Filter kann ein einfacher Test sein (z. B. aktiv = 1), um nur den aktiven Wert anzuzeigen <br> Sie können $ID$ auch in Filtern verwenden, bei denen es sich um die aktuelle ID des aktuellen Objekts handelt <br> Verwenden Sie $SEL$, um ein SELECT im Filter durchzuführen <br> Wenn Sie nach Extrafeldern filtern möchten, verwenden Sie die Syntax extra.fieldcode = ... (wobei field code der Code des Extrafelds ist) <br><br> Damit die Liste von einer anderen ergänzenden Attributliste abhängt: <br> c_typent:libelle:id:options_ <i>parent_list_code</i> |parent_column:filter <br><br> Um die Liste von einer anderen Liste abhängig zu machen: <br> c_typent:libelle:id: <i>parent_list_code</i> |parent_column:filter -ExtrafieldParamHelpchkbxlst=Die Liste der Werte stammt aus einer Tabelle <br> Syntax: table_name: label_field: id_field :: filter <br> Beispiel: c_typent: libelle: id :: filter <br><br> Filter kann ein einfacher Test sein (z. B. aktiv = 1), um nur den aktiven Wert anzuzeigen <br> Sie können $ ID $ auch in Filtern verwenden, bei denen es sich um die aktuelle ID des aktuellen Objekts handelt <br> Verwenden Sie $ SEL $, um ein SELECT im Filter durchzuführen <br> Wenn Sie nach Extrafeldern filtern möchten, verwenden Sie die Syntax extra.fieldcode = ... (wobei field code der Code des Extrafelds ist) <br><br> Damit die Liste von einer anderen ergänzenden Attributliste abhängt: <br> c_typent: libelle: id: options_ <i>parent_list_code</i> | parent_column: filter <br><br> Um die Liste von einer anderen Liste abhängig zu machen: <br> c_typent: libelle: id: <i>parent_list_code</i> | parent_column: filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Die Parameter müssen ObjectName: Classpath <br> sein. Syntax: ObjectName: Classpath ExtrafieldParamHelpSeparator=Für ein einfaches Trennzeichen leer lassen <br> Setzen Sie diesen Wert für ein ausblendendes Trennzeichen auf 1 (standardmäßig für eine neue Sitzung geöffnet, der Status wird für jede Benutzersitzung beibehalten) <br> Setzen Sie diesen Wert für ein ausblendendes Trennzeichen auf 2 (standardmäßig für ausgeblendet) neue Sitzung, dann bleibt der Status für jede Benutzersitzung erhalten) LibraryToBuildPDF=Bibliothek zum Erstellen von PDF-Dateien @@ -541,6 +545,8 @@ Module40Name=Lieferanten/Hersteller Module40Desc=Lieferanten- und Einkaufsverwaltung (Bestellungen und Fakturierung von Lieferantenrechnungen) Module42Name=Debug Logs Module42Desc=Protokollierungsdienste (Syslog). Diese Logs dienen der Fehlersuche/Analyse. +Module43Name=Debug Leiste +Module43Desc=Ein Tool für Entwickler, das eine Debug-Leiste in Ihrem Browser hinzufügt. Module49Name=Bearbeiter Module49Desc=Editorverwaltung Module50Name=Produkte @@ -607,7 +613,7 @@ Module610Desc=Erlaubt das Erstellen von Produktvarianten, basierend auf Merkmale Module700Name=Spenden Module700Desc=Spendenverwaltung Module770Name=Spesenabrechnungen -Module770Desc=Verwaltung von Spesenabrechnungen (Transport, Essen,....) +Module770Desc=Verwaltung von Spesenabrechnungen (Reisekosten, Verpflegungsmehraufwand,....) Module1120Name=Angebotsanforderung Module1120Desc=Anfordern von Lieferanten-Angeboten und Preisen Module1200Name=Mantis @@ -639,18 +645,20 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind Konvertierung Module3200Name=Unveränderliche Archive Module3200Desc=Aktivieren Sie ein unveränderliches Protokoll von Geschäftsereignissen. Ereignisse werden in Echtzeit archiviert. Das Protokoll ist eine schreibgeschützte Tabelle mit verketteten Ereignissen, die exportiert werden können. Dieses Modul kann für einige Länder zwingend erforderlich sein. +Module3400Name=Soziale Netzwerke +Module3400Desc=Aktiviert Felder für soziale Netzwerke für Dritte und Adressen (Skype, Twitter, Facebook, ...). Module4000Name=Personal Module4000Desc=Personalverwaltung Module5000Name=Mandantenfähigkeit Module5000Desc=Ermöglicht Ihnen die Verwaltung mehrerer Firmen -Module6000Name=Workflow -Module6000Desc=Workflow Management (Automaitische Erstellung von Objekten und/oder automatische Statusaktualisierungen) +Module6000Name=Workflow zwischen Modulen +Module6000Desc=Workflow-Management zwischen verschiedenen Modulen (automatische Objekterstellung und / oder automatische Statusänderung) Module10000Name=Webseiten Module10000Desc=Erstellt im Internet abrufbare Webseiten mit einem WYSIWYG-Editor. Das CMS ist Webmaster- oder Entwickler-orientiert (Kenntnisse der Programmiersprachen HTML und CSS sind empfehlenswert). Richten Sie einfach Ihren Webserver (Apache, Nginx, ...) so ein, dass er auf das dedizierte Dolibarr-Verzeichnis zeigt, um die Webseite unter eigenem Domain-Namen im Internet abrufen zu können. Module20000Name=Urlaubsantrags-Verwaltung Module20000Desc=Verwalten (erstellen, ablehnen, genehmigen) Sie die Urlaubsanträge Ihrer Angestellten -Module39000Name=Chargen- und Seriennummernverwaltung -Module39000Desc=Verwaltung von Chargen- und Seriennummern sowie von Haltbarkeits- und Verkaufslimitdatum +Module39000Name=Produkt-Chargen und Serien +Module39000Desc=Verwaltung von Chargen- und Serien sowie von Haltbarkeits- und Verkaufslimitdatum Module40000Name=Mehrere Währungen Module40000Desc=Nutze alternative Währungen bei Preisen und in Dokumenten Module50000Name=PayBox @@ -805,7 +813,8 @@ PermissionAdvanced253=Andere interne/externe Benutzer und Gruppen erstellen/bear Permission254=Nur externe Benutzer erstellen/bearbeiten Permission255=Andere Passwörter ändern Permission256=Andere Benutzer löschen oder deaktivieren -Permission262=Zugang auf alle Partner erweitern (Nicht nur die Partner wofür dieser Benutzer der Handelsvertreter ist) <br>Nicht wirksam für externe Nutzer (Immer beschränkt auf sich selbst für Angebote, Bestellungen, Rechnungen, Verträge, etc).<br>Nicht wirksam für Projekte(Nur Regeln für Projektberechtigungen, Sichtbarkeits- und Zuordnungsfragen) +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Rechnungen anzeigen Permission273=Ausgabe Rechnungen @@ -910,7 +919,7 @@ Permission1231=Lieferantenrechnungen anzeigen Permission1232=Lieferantenrechnungen (Eingangsrechnungen) erstellen/bearbeiten Permission1233=Lieferantenrechnungen freigeben Permission1234=Lieferantenrechnungen löschen -Permission1235=Lieferantenrechnungen per e-Mail versenden +Permission1235=Lieferantenrechnungen per E-Mail versenden Permission1236=Lieferantenrechnungen & -zahlungen exportieren Permission1237=Lieferantenbestellungen mit Details exportieren Permission1251=Massenimports von externen Daten ausführen (data load) @@ -949,10 +958,10 @@ Permission20004=Alle Urlaubsanträge einsehen (von allen Benutzern einschließli Permission20005=Urlaubsanträge anlegen/verändern (von allen Benutzern einschließlich der nicht Untergebenen) Permission20006=Urlaubstage Administrieren (Setup- und Aktualisierung) Permission20007=Urlaubsanträge genehmigen -Permission23001=anzeigen cronjobs -Permission23002=erstellen/ändern cronjobs -Permission23003=cronjobs löschen -Permission23004=cronjobs ausführen +Permission23001=Geplante Aufträge anzeigen +Permission23002=Geplante Aufgaben erstellen/bearbeiten +Permission23003=Geplante Aufgabe(n) löschen +Permission23004=Geplante Aufgaben ausführen Permission50101=Verwenden des Kassenmoduls (SimplePOS) Permission50151=Verwenden des Kassenmoduls (TakePOS) Permission50201=Transaktionen einsehen @@ -1175,7 +1184,8 @@ SetupDescription2=Die folgenden zwei Punkte sind obligatorisch: SetupDescription3=<a href="%s"> %s -> %s </a> <br> <br> Grundlegende Parameter zum Anpassen des Standardverhaltens Ihrer Anwendung (z. B. für länderbezogene Funktionen). SetupDescription4=<a href="%s"> %s -> %s </a> <br> <br> Diese Software ist eine Suite vieler Module / Anwendungen. Die auf Ihre Bedürfnisse bezogenen Module müssen aktiviert und konfiguriert sein. Menüeinträge werden mit der Aktivierung dieser Module angezeigt. SetupDescription5=Andere Setup-Menüs verwalten optionale Parameter. -LogEvents=Protokollierte Ereignisse +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Protokoll InfoDolibarr=Über Dolibarr InfoBrowser=Über Ihren Webbrowser @@ -1238,12 +1248,12 @@ ForcedToByAModule=Diese Regel wird <b>%s</b> durch ein aktiviertes Modul aufgezw ValueIsForcedBySystem=Dieser Wert wird vom System erzwungen. Sie können ihn nicht ändern. PreviousDumpFiles=bestehende Datensicherungsdateien PreviousArchiveFiles=Bestehende Archivdateien -WeekStartOnDay=Wochenstart +WeekStartOnDay=Erster Tag der Woche RunningUpdateProcessMayBeRequired=Eine Systemaktualisierung scheint erforderlich (Programmversion %s unterscheidet sich von Datenbankversion %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Diesen Befehl müssen Sie auf der Kommandozeile (nach Login auf der Shell mit Benutzer <b>%s</b>) ausführen. YourPHPDoesNotHaveSSLSupport=Ihre PHP-Konfiguration unterstützt keine SSL-Verschlüsselung DownloadMoreSkins=Weitere grafische Oberflächen herunterladen -SimpleNumRefModelDesc=Gibt die Referenznummer im Format %syymm-nnnn zurück, wobei yy für das Jahr, mm für den Monat und nnnn für eine 4-stellige, nicht unterbrochene Zahlensequenz steht +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Erweiterte Kundendaten im Adressfeld anzeigen ShowVATIntaInAddress=Umsatzsteuer-ID im Adressfeld ausblenden TranslationUncomplete=Teilweise Übersetzung @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxyservers: IP-Adresse / DNS-Name MAIN_PROXY_PORT=Proxyserver: Port MAIN_PROXY_USER=Proxyserver: Benutzername MAIN_PROXY_PASS=Proxyserver: Passwort -DefineHereComplementaryAttributes=Definieren Sie hier alle Attribute, die nicht standardmäßig vorhanden sind und im Modul %s unterstützt werden sollen. +DefineHereComplementaryAttributes=Definieren Sie alle zusätzlichen / benutzerdefinierten Attribute, die hinzugefügt werden müssen: %s ExtraFields=Ergänzende Attribute ExtraFieldsLines=Ergänzende Attribute (Zeilen) ExtraFieldsLinesRec=Zusätzliche Attribute (Rechnungsvorlage, Zeilen) @@ -1306,7 +1316,7 @@ SuhosinSessionEncrypt=Sitzungsspeicher durch Suhosin verschlüsselt ConditionIsCurrently=Einstellung ist aktuell %s YouUseBestDriver=Sie verwenden den Treiber %s, dies ist derzeit der best verfügbare. YouDoNotUseBestDriver=Sie verwenden Treiber %s, aber es wird der Treiber %s empfohlen. -NbOfObjectIsLowerThanNoPb=Es gibt nur %s %s in der Datenbank. Das erfordert keine bestimmte Optimierung. +NbOfObjectIsLowerThanNoPb=Es existieren nur %s %s in Ihrer Datenbank. Dies erfordert daher keine speziellen Optimierungsmaßnahmen. SearchOptim=Such Optimierung YouHaveXObjectUseSearchOptim=Sie haben %s %s in der Datenbank. Sie können die Konstante %s in Home-Setup-Other zu 1 hinzufügen. Beschränken Sie die Suche auf den Anfang von Zeichenfolgen, damit die Datenbank Indizes verwenden kann, und Sie sollten sofort eine Antwort erhalten. YouHaveXObjectAndSearchOptimOn=Sie haben %s %s in der Datenbank und die Konstante %s ist in Home-Setup-Other auf 1 gesetzt. @@ -1333,7 +1343,7 @@ PasswordPatternDesc=Beschreibung für Passwortmuster RuleForGeneratedPasswords=Regeln für die Erstellung und Freigabe von Passwörtern DisableForgetPasswordLinkOnLogonPage='Passwort vergessen'-Link nicht auf der Anmeldeseite anzeigen UsersSetup=Benutzermoduleinstellungen -UserMailRequired=Für die Anlage eines neuen Benutzers ist eine E-Mail-Adresse erforderlich +UserMailRequired=Für das Anlegen eines neuen Benutzers ist eine E-Mail-Adresse erforderlich UserHideInactive=Inaktive Benutzer aus allen Kombinationslisten von Benutzern ausblenden (Nicht empfohlen: dies kann bedeuten, dass Sie auf einigen Seiten nicht nach alten Benutzern filtern oder suchen können) UsersDocModules=Dokumentvorlagen für Dokumente, die aus dem Benutzerdatensatz generiert wurden GroupsDocModules=Dokumentvorlagen für Dokumente, die aus einem Gruppendatensatz generiert wurden @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Benutzername (Unix) LDAPFieldLoginExample=Beispiel: uid LDAPFilterConnection=Suchfilter LDAPFilterConnectionExample=Beispiel: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Beispiel: & (objectClass = groupOfUsers) LDAPFieldLoginSamba=Benutzername (Samba,Active Directory) LDAPFieldLoginSambaExample=Beispiel : samaccountname LDAPFieldFullname=Vorname Nachname @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Ihr Unternehmen wurde so definiert, dass keine Mehrwert AccountancyCode=Kontierungs-Code AccountancyCodeSell=Verkaufskonto-Code AccountancyCodeBuy=Einkaufskonto-Code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Lassen Sie das Kontrollkästchen "Zahlung automatisch erstellen" beim Erstellen einer neuen Steuer standardmäßig leer ##### Agenda ##### AgendaSetup=Aufgaben/Termine-Modul Einstellungen PasswordTogetVCalExport=Passwort für den VCal-Export +SecurityKey = Security Key PastDelayVCalExport=Keine Termine exportieren die älter sind als AGENDA_USE_EVENT_TYPE=Verwenden Ereignissarten \nEinstellen unter (Start -> Einstellungen -> Wörterbücher -> Ereignissarten) AGENDA_USE_EVENT_TYPE_DEFAULT=Diesen Standardwert automatisch als Ereignistyp im Ereignis Erstell-Formular verwenden. @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Hintergrundfarbe für ungerade Tabellenzeilen BackgroundTableLineEvenColor=Hintergrundfarbe für gerade Tabellenzeilen MinimumNoticePeriod=Mindestkündigungsfrist (Ihr Urlaubsantrag muss vor dieser Frist gestellt werden) NbAddedAutomatically=Anzahl Tage die den Benutzern jeden Monat (automatisch) hinzuaddiert werden -EnterAnyCode=Dieses Feld enthält eine Referenz um die Zeile zu identifizieren. Geben Sie einen beliebigen Wert ohne Sonderzeichen ein. +EnterAnyCode=Dieses Feld enthält eine Referenz zur Identifizierung der Zeile. Geben Sie einen beliebigen Wert Ihrer Wahl ein, jedoch ohne Sonderzeichen. 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 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Unterer Rand im PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Höhe des Logos im 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Mehrere Sprachvarianten gefunden RemoveSpecialChars=Sonderzeichen entfernen COMPANY_AQUARIUM_CLEAN_REGEX=Regexfilter um die Werte zu Bereinigen (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Einstellungen vom Modul für Soziale Medien EnableFeatureFor=Aktiviere Features für <strong>%s</strong> VATIsUsedIsOff=Hinweis: Die Option zur Verwendung von Umsatzsteuer oder Mehrwertsteuer wurde auf <strong> gesetzt. Aus </strong> im Menü %s - %s, daher wird für Umsatzsteuer oder Mehrwertsteuer immer 0 verwendet. SwapSenderAndRecipientOnPDF=Tausche Position der Absender- und Empfängeradresse in PDF-Dokumenten -FeatureSupportedOnTextFieldsOnly=Warnung: Diese Funktion unterstützt nur Textfelder. Außerdem muss der URL-Parameter action=create oder action=edit gesetzt werden ODER der Seitenname muss mit 'new.php' enden, damit diese Funktion ausgelöst wird. +FeatureSupportedOnTextFieldsOnly=Warnung, Funktion wird nur in Textfeldern und Kombinationslisten unterstützt. Außerdem muss ein URL-Parameter action = create oder action = edit festgelegt werden ODER der Seitenname muss mit 'new.php' enden, um diese Funktion auszulösen. EmailCollector=eMail-Collector EmailCollectorDescription=Fügt einen geplanten Auftrag und eine Einrichtungsseite hinzu, um regelmäßig E-Mail-Postfächer (unter Verwendung des IMAP-Protokolls) zu scannen und E-Mails, die in Ihrer Anwendung eingegangen sind, am richtigen Ort aufzuzeichnen und / oder einige Datensätze automatisch zu erstellen (z. B. Leads). NewEmailCollector=Neuer eMail-Colletor @@ -2019,7 +2032,7 @@ MainMenuCode=Menüpunktcode (Hauptmenü) ECMAutoTree=Automatischen ECM-Baum anzeigen OperationParamDesc=Definieren Sie die Werte, die für das Objekt der Aktion verwendet werden sollen, oder wie Werte extrahiert werden sollen. Beispiel: <br> objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Verwenden Sie a; char als Trennzeichen zum Extrahieren oder Festlegen mehrerer Eigenschaften. OpeningHours=Öffnungszeiten -OpeningHoursDesc=Geben sie hier die regulären Öffnungszeiten vom Unternehmen an. +OpeningHoursDesc=Geben sie hier die regulären Öffnungszeiten ihres Unternehmens an. ResourceSetup=Konfiguration vom Ressourcenmodul UseSearchToSelectResource=Verwende ein Suchformular um eine Ressource zu wählen (eher als eine Dropdown-Liste) zu wählen. DisabledResourceLinkUser=Funktion deaktivieren, um eine Ressource mit Benutzern zu verknüpfen @@ -2049,8 +2062,11 @@ UseDebugBar=Verwenden Sie die Debug Leiste DEBUGBAR_LOGS_LINES_NUMBER=Zahl der letzten Protokollzeilen, die in der Konsole verbleiben sollen WarningValueHigherSlowsDramaticalyOutput=Warnung, höhere Werte verlangsamen die Ausgabe erheblich. ModuleActivated=Modul %s is aktiviert und verlangsamt die Overfläche +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Wenn Sie sich in einer Produktionsumgebung befinden, sollten Sie diese Eigenschaft auf %s setzen. AntivirusEnabledOnUpload=Antivirus für hochgeladene Dateien aktiviert +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Exportmodelle sind für jeden zugänglich. ExportSetup=Einrichtung Modul Export ImportSetup=Einrichtung des Modulimports @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Einen anonymen Ping '+1' an den Dolibarr-Foundation-Server (ei FeatureNotAvailableWithReceptionModule=Funtion nicht verfügbar, wenn Modul Wareneingang aktiviert ist EmailTemplate=E-Mail-Vorlage EMailsWillHaveMessageID=E-Mails haben ein Schlagwort "Referenzen", das dieser Syntax entspricht +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Wenn Sie möchten, dass einige Texte in Ihrem PDF in 2 verschiedenen Sprachen in demselben generierten PDF dupliziert werden, müssen Sie hier diese zweite Sprache festlegen, damit das generierte PDF zwei verschiedene Sprachen auf derselben Seite enthält, die beim Generieren von PDF ausgewählte und diese (dies wird nur von wenigen PDF-Vorlagen unterstützt). Für 1 Sprache pro PDF leer halten. FafaIconSocialNetworksDesc=Gib hier den Code für ein FontAwesome icon ein. Wenn du FontAwesome nicht kennst, kannst du den Standard 'fa-address-book' benutzen. FeatureNotAvailableWithReceptionModule=Funtion nicht verfügbar, wenn Modul Wareneingang aktiviert ist @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Das Ändern dieses Werts auf %s wird aus Sicherheit DictionaryProductNature= Art des Produkts CountryIfSpecificToOneCountry=Land (falls spezifisch für ein bestimmtes Land) YouMayFindSecurityAdviceHere=Hier finden Sie Sicherheitshinweise -ModuleActivatedMayExposeInformation=Dieses Modul kann vertrauliche Daten verfügbar machen. Wenn Sie es nicht benötigen, deaktivieren Sie es. +ModuleActivatedMayExposeInformation=Diese PHP-Erweiterung kann vertrauliche Daten verfügbar machen. Wenn Sie dies nicht benötigen, deaktivieren Sie sie. ModuleActivatedDoNotUseInProduction=Ein für die Entwicklung entwickeltes Modul wurde aktiviert. Aktivieren Sie es nicht in einer Produktionsumgebung. CombinationsSeparator=Trennzeichen für Produktkombinationen SeeLinkToOnlineDocumentation=Beispiele finden Sie unter dem Link zur Online-Dokumentation im oberen Menü SHOW_SUBPRODUCT_REF_IN_PDF=Wenn die Funktion "%s" des Moduls <b> %s </b> verwendet wird, werden Details zu Unterprodukten eines Satzes als PDF angezeigt. AskThisIDToYourBank=Wenden Sie sich an Ihre Bank, um diese ID zu erhalten +AdvancedModeOnly=Berechtigung nur im erweiterten Berechtigungsmodus verfügbar +ConfFileIsReadableOrWritableByAnyUsers=Die conf-Datei kann von jedem Benutzer gelesen oder beschrieben werden. Geben Sie nur dem Benutzer und der Gruppe des Webservers die Berechtigung. +MailToSendEventOrganization=Organisation von Ereignissen +AGENDA_EVENT_DEFAULT_STATUS=Standardereignisstatus beim Erstellen eines Ereignisses aus dem Formular +YouShouldDisablePHPFunctions=Sie sollten PHP-Funktionen deaktivieren +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/de_DE/banks.lang b/htdocs/langs/de_DE/banks.lang index 1a24bc0bd5e..57256d48132 100644 --- a/htdocs/langs/de_DE/banks.lang +++ b/htdocs/langs/de_DE/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Ihr SEPA-Mandat FindYourSEPAMandate=Dies ist Ihr SEPA-Mandat, um unser Unternehmen zu ermächtigen, Lastschriftaufträge bei Ihrer Bank zu tätigen. Senden Sie es unterschrieben (Scan des unterschriebenen Dokuments) oder per Post an AutoReportLastAccountStatement=Füllen Sie das Feld 'Nummer des Kontoauszugs' bei der Abstimmung automatisch mit der Nummer des letzten Kontoauszugs CashControl=POS-Kassensteuerung -NewCashFence=Neue Kasse schließt +NewCashFence=New cash desk opening or closing BankColorizeMovement=Bewegungen färben BankColorizeMovementDesc=Wenn diese Funktion aktiviert ist, können Sie eine bestimmte Hintergrundfarbe für Debit- oder Kreditbewegungen auswählen BankColorizeMovementName1=Hintergrundfarbe für Debit-Bewegung BankColorizeMovementName2=Hintergrundfarbe für Kredit-Bewegung IfYouDontReconcileDisableProperty=Wenn Sie auf einigen Bankkonten keine Bankkontenabgleiche vornehmen, deaktivieren Sie die Eigenschaft "%s", um diese Warnung zu entfernen. NoBankAccountDefined=Kein Bankkonto definiert +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/de_DE/bills.lang b/htdocs/langs/de_DE/bills.lang index 1ecc1ea7641..9afcc86ec5b 100644 --- a/htdocs/langs/de_DE/bills.lang +++ b/htdocs/langs/de_DE/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=Kundenrechnung CustomersInvoices=Kundenrechnungen SupplierInvoice=Lieferantenrechnung SuppliersInvoices=Lieferantenrechnungen +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Lieferantenrechnung SupplierBills=Lieferantenrechnungen Payment=Zahlung @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Bereits getätigte Zahlungen PaymentsBackAlreadyDone=Rückerstattungen bereits erledigt PaymentRule=Zahlungsregel PaymentMode=Zahlungsart +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit- / Kreditkarte PaymentTypePP=PayPal IdPaymentMode=Zahlungsart (ID) @@ -181,7 +184,7 @@ ConfirmValidateBill=Möchten Sie diese Rechnung mit der referenz <b>%s</b> wirkl ConfirmUnvalidateBill=Möchten Sie die Rechnung <b>%s</b> wirklich als 'Entwurf' markieren? ConfirmClassifyPaidBill=Möchten Sie die Rechnung <b>%s</b> wirklich als 'bezahlt' markieren? ConfirmCancelBill=Möchten sie die Rechnung <b>%s</b> wirklich stornieren? -ConfirmCancelBillQuestion=Möchten Sie diesen Sozialbeitrag wirklich als 'abgebrochen' markieren? +ConfirmCancelBillQuestion=Bitte wählen Sie einen Grund für die Stornierung. ConfirmClassifyPaidPartially=Möchten Sie die Rechnung <b>%s</b> wirklich als 'bezahlt' markieren? ConfirmClassifyPaidPartiallyQuestion=Diese Rechnung wurde nicht komplett bezahlt. Aus welchem Grund wird die Rechnung geschlossen? ConfirmClassifyPaidPartiallyReasonAvoir=Der offene Zahlbetrag <b>( %s %s)</b> resultiert aus einem gewährten Skonto. Zur Korrektur der USt. wird eine Gutschrift angelegt. @@ -373,6 +376,7 @@ DateLastGeneration=Datum der letzten Generierung DateLastGenerationShort=Datum letzte Generierung MaxPeriodNumber=Max. Nummer der Rechnungserstellung NbOfGenerationDone=Rechnungslauf für diese Nummer schon durchgeführt +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Anzahl Generationen durchgeführt MaxGenerationReached=Max. Anzahl Generierungen erreicht InvoiceAutoValidate=Rechnungen automatisch freigeben @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Innerhalb von 14 Tagen nach Monatsende FixAmount=Festbetrag - 1 Zeile mit Label '%s' VarAmount=Variabler Betrag (%% tot.) VarAmountOneLine=Variabler Betrag (%% Total) -1 Position mit Label '%s' -VarAmountAllLines=Variabler Betrag (%% gesamt) - alle gleichen Zeilen +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Banküberweisung PaymentTypeShortVIR=Banküberweisung @@ -494,12 +498,16 @@ Cash=Bar Reported=Verzögert DisabledBecausePayments=Nicht möglich, da es Zahlungen gibt CantRemovePaymentWithOneInvoicePaid=Die Zahlung kann nicht entfernt werden, da es mindestens eine Rechnung gibt, die als bezahlt markiert ist +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Erwartete Zahlung CantRemoveConciliatedPayment=Abgeglichene Zahlung kann nicht entfernt werden PayedByThisPayment=mit dieser Zahlung beglichen ClosePaidInvoicesAutomatically=Kennzeichnen Sie automatisch alle Standard-, Anzahlungs- oder Ersatzrechnungen als "Bezahlt", wenn die Zahlung vollständig erfolgt ist. ClosePaidCreditNotesAutomatically=Kennzeichnen Sie automatisch alle Gutschriften als "Bezahlt", wenn die Rückerstattung vollständig erfolgt ist. ClosePaidContributionsAutomatically=Kennzeichnen Sie automatisch alle Sozial- oder Steuerbeiträge als "Bezahlt", wenn die Zahlung vollständig erfolgt ist. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Alle Rechnungen ohne Restzahlung werden automatisch mit dem Status "Bezahlt" geschlossen. ToMakePayment=Bezahlen ToMakePaymentBack=Rückzahlung @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Zuerst muss eine Standardrechnung erstellt PDFCrabeDescription=Rechnung PDF-Vorlage Crabe. Eine vollständige Rechnungsvorlage (alte Implementierung der Sponge-Vorlage) PDFSpongeDescription=Rechnung PDF-Vorlage Sponge. Eine vollständige Rechnungsvorlage PDFCrevetteDescription=PDF Rechnungsvorlage Crevette. Vollständige Rechnungsvolage für normale Rechnungen -TerreNumRefModelDesc1=Liefert eine Nummer mit dem Format %syymm-nnnn für Standard-Rechnungen und %syymm-nnnn für Gutschriften, wobei yy=Jahr, mm=Monat und nnnn eine lückenlose Folge ohne Überlauf auf 0 ist -MarsNumRefModelDesc1=Liefere Nummer im Format %syymm-nnnn für Standardrechnungen %syymm-nnnn für Ersatzrechnung, %syymm-nnnn für Anzahlungsrechnung und %syymm-nnnn für Gutschriften wobei yy Jahr, mm Monat und nnnn eine laufende Nummer ohne Unterbrechung und ohne Rückkehr zu 0 ist. +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Eine Rechnung, beginnend mit $ syymm existiert bereits und ist nicht kompatibel mit diesem Modell der Reihe. Entfernen oder umbenennen, um dieses Modul. -CactusNumRefModelDesc1=Rückgabenummer mit Format %syymm-nnnn für Standard-Rechnungen, %syymm-nnnn für Gutschriften und %syymm-nnnn für Anzahlungsrechnungen wo yy Jahr ist, mm ist der Monat und nnnn eine lückenlose Folge ohne Überlauf auf 0 ist +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Grund für die vorzeitige Schließung EarlyClosingComment=Notiz zur vorzeitigen Schließung ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Wenn Sie solche Rechnungen automatisch generie DeleteRepeatableInvoice=Rechnungs-Template löschen ConfirmDeleteRepeatableInvoice=Möchten Sie diese Rechnungsvorlage wirklich löschen? CreateOneBillByThird=Erstelle eine Rechnung pro Partner (andernfalls, eine Rechnung pro Bestellung) -BillCreated=%s Rechnung(en) erstellt +BillCreated=%s Rechnung(en) generiert +BillXCreated=Rechnung %s generiert StatusOfGeneratedDocuments=Status der Dokumentenerstellung DoNotGenerateDoc=Dokumentdatei nicht erstellen AutogenerateDoc=Dokumentdatei automatisch erstellen diff --git a/htdocs/langs/de_DE/boxes.lang b/htdocs/langs/de_DE/boxes.lang index 0ebb4d77679..7ed4e4e1077 100644 --- a/htdocs/langs/de_DE/boxes.lang +++ b/htdocs/langs/de_DE/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Anmeldeinformationen BoxLastRssInfos=Informationen RSS Feed BoxLastProducts=%s zuletzt bearbeitete Produkte/Leistungen @@ -17,9 +18,13 @@ BoxLastActions=Neuste Aktionen BoxLastContracts=Neueste Verträge BoxLastContacts=Neueste Kontakte/Adressen BoxLastMembers=neueste Mitglieder +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Neueste Serviceaufträge BoxCurrentAccounts=Saldo offene Konten BoxTitleMemberNextBirthdays=Geburtstage in diesem Monat (Mitglieder) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=%s neueste Neuigkeiten von %s BoxTitleLastProducts=Zuletzt bearbeitete Produkte / Leistungen (maximal %s) BoxTitleProductsAlertStock=Lagerbestands-Warnungen @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Neueste %s Kundensendungen NoRecordedShipments=Keine erfasste Kundensendung BoxCustomersOutstandingBillReached=Kunden mit erreichtem Aussenständen-Limit # Pages -AccountancyHome=Buchführung +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validierte Projekte diff --git a/htdocs/langs/de_DE/categories.lang b/htdocs/langs/de_DE/categories.lang index 6a04179c699..1ed379ce3f9 100644 --- a/htdocs/langs/de_DE/categories.lang +++ b/htdocs/langs/de_DE/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Übersicht Lieferantenkategorien CustomersCategoriesArea=Übersicht Kunden-/Interessentenkategorien MembersCategoriesArea=Übersicht Mitgliederkategorien ContactsCategoriesArea=Übersicht Kontaktkategorien -AccountsCategoriesArea=Übersicht Kontenkategorien +AccountsCategoriesArea=Bereich Bankkonten-Tags / -Kategorien ProjectsCategoriesArea=Übersicht Projektkategorien UsersCategoriesArea=Bereich: Benutzer Tags/Kategorien SubCats=Unterkategorie(n) @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Ordnen Sie dem Lieferanten eine Kategorie zu ShowCategory=Zeige Kategorie ByDefaultInList=Standardwert in Liste ChooseCategory=Kategorie auswählen -StocksCategoriesArea=Lagerort-Kategorien -ActionCommCategoriesArea=Ereignis-Kategorien +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Seiteninhalte-Kategorien UseOrOperatorForCategories=Benutzer oder Operator für Kategorien diff --git a/htdocs/langs/de_DE/companies.lang b/htdocs/langs/de_DE/companies.lang index 717b52abe65..6af27c65ab0 100644 --- a/htdocs/langs/de_DE/companies.lang +++ b/htdocs/langs/de_DE/companies.lang @@ -43,9 +43,10 @@ Individual=Privatperson ToCreateContactWithSameName=Erzeugt automatisch einen Kontakt/Adresse mit der gleichen Information wie der Partner unter dem Partner. In den meisten Fällen, auch wenn Ihr Partner eine natürliche Person ist, reicht die Anlage nur eines Partners aus. ParentCompany=Muttergesellschaft Subsidiaries=Tochtergesellschaften -ReportByMonth=Bericht nach Monat -ReportByCustomers=Bericht nach Kunden -ReportByQuarter=Bericht Quartal +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Anrede RegisteredOffice=Firmensitz Lastname=Nachname @@ -172,14 +173,20 @@ ProfId1ES=NIF (Frankreich): Numéro d'identification fiscale\nCIF (Spanien): Có ProfId2ES=Sozialversicherungsnummer ProfId3ES=Klassifikation der Wirtschaftszweige ProfId4ES=Stiftungsverzeichnis -ProfId5ES=EORI-Nummer +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=SIREN (Frankreich): Système d'identification du répertoire des entreprises ProfId2FR=SIRET (Frankreich): Système d’identification du répertoire des établissements ProfId3FR=NAF (Frankreich): Statistik-Code ProfId4FR=RCS (Frankreich): Registre du Commerce et des Sociétés\n(hier: Code im Handels- und Firmenregister) -ProfId5FR=EORI-Nummer +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI-Nummer +ProfId6IT=- ProfId1LU=R.C.S. Luxemburg ProfId2LU=Prof ID 2 (Gewerbe-Erlaubnis) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof ID 3 ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI-Nummer +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI-Nummer +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=OGRN ProfId2RU=INN @@ -389,11 +397,11 @@ StatusProspect0=noch nie kontaktiert StatusProspect1=Zu kontaktieren StatusProspect2=Kontaktierung läuft StatusProspect3=erfolgreich kontaktiert -ChangeDoNotContact=Ändern Sie den Status auf 'Nicht kontaktieren' -ChangeNeverContacted=Ändern Sie den Status auf 'Noch kein Kontaktversuch' +ChangeDoNotContact=Status auf 'Nicht kontaktieren' ändern +ChangeNeverContacted=Status auf 'Noch keine Kontaktaufnahme' ändern ChangeToContact=Status auf 'Zu kontaktieren' ändern -ChangeContactInProcess=Ändern Sie den Status auf 'Kontaktaufnahme läuft' -ChangeContactDone=Ändern Sie den Status auf 'Erfolgreich kontaktiert' +ChangeContactInProcess=Status auf 'Kontaktaufnahme läuft' ändern +ChangeContactDone=Status auf 'Erfolgreich kontaktiert' ändern ProspectsByStatus=Interessenten nach Status NoParentCompany=keine Muttergesellschaft ExportCardToFormat=Karte in Format exportieren @@ -426,7 +434,7 @@ SocialNetworksInstagramURL=Instagram URL SocialNetworksYoutubeURL=Youtube URL SocialNetworksGithubURL=Github URL YouMustAssignUserMailFirst=Sie müssen zunächst eine E-Mail-Adresse für diesen Benutzer anlegen, um E-Mail-Benachrichtigungen zu ermöglichen. -YouMustCreateContactFirst=Um E-mail-Benachrichtigungen anlegen zu können, müssen Sie zunächst einen Kontakt mit gültiger Email-Adresse zum Partner hinzufügen. +YouMustCreateContactFirst=Um E-Mail-Benachrichtigungen anlegen zu können, müssen Sie zunächst einen Kontakt mit gültiger E-Mail-Adresse zum Partner hinzufügen. ListSuppliersShort=Liste der Lieferanten ListProspectsShort=Liste der Interessenten ListCustomersShort=Liste der Kunden @@ -441,7 +449,7 @@ CurrentOutstandingBill=Aktuell ausstehende Rechnung OutstandingBill=Max. für ausstehende Rechnung OutstandingBillReached=Kreditlimite erreicht OrderMinAmount=Mindestbestellwert -MonkeyNumRefModelDesc=Gibt Zahlen mit dem Format %syymm-nnnn für die Kundennummer und %syymm-nnnn für die Lieferantennummer zurück, wobei yy Jahr, mm Monat und nnnn ununterbrochene Zahlenfolge ohne 0 ist. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kunden / Lieferanten-Code ist frei. Dieser Code kann jederzeit geändert werden. ManagingDirectors=Name(n) des/der Manager (CEO, Direktor, Geschäftsführer, ...) MergeOriginThirdparty=Partner duplizieren (Partner den Sie löschen möchten) diff --git a/htdocs/langs/de_DE/compta.lang b/htdocs/langs/de_DE/compta.lang index 472a03cbb90..e499f8e72ec 100644 --- a/htdocs/langs/de_DE/compta.lang +++ b/htdocs/langs/de_DE/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST Einkäufe VATCollected=Erhobene USt. StatusToPay=Zu zahlen SpecialExpensesArea=Bereich für alle Sonderzahlungen +VATExpensesArea=Area for all TVA payments SocialContribution=Sozialabgabe oder Steuersatz SocialContributions= Steuern- oder Sozialabgaben SocialContributionsDeductibles=Abzugsberechtigte Sozialabgaben oder Steuern @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Zahlung Kundenrechnung PaymentSupplierInvoice=Zahlung Lieferantenrechnung PaymentSocialContribution=Sozialabgaben-/Steuer Zahlung PaymentVat=USt.-Zahlung +AutomaticCreationPayment=Automatically record the payment ListPayment=Liste der Zahlungen ListOfCustomerPayments=Liste der Kundenzahlungen ListOfSupplierPayments=Liste der Lieferantenzahlungen @@ -104,6 +106,8 @@ LT2PaymentES=EKSt. Zahlung LT2PaymentsES=EKSt. Zahlungen VATPayment=USt. Zahlung VATPayments=USt Zahlungen +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Umsatzsteuer Rückerstattung NewVATPayment=Neue Umsatzsteuer Zahlung NewLocalTaxPayment=Neue Steuer %s Zahlung @@ -134,9 +138,17 @@ NoWaitingChecks=Keine Schecks zum Einlösen DateChequeReceived=Datum des Scheckerhalts NbOfCheques=Anzahl der Schecks PaySocialContribution=Zahle eine Sozialabgabe/Steuer -ConfirmPaySocialContribution=Möchten Sie den Status dieser Sozialabgabe oder Steuer auf "Bezahlt" ändern? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Lösche Sozialabgaben-, oder Steuerzahlung -ConfirmDeleteSocialContribution=Möchten Sie diese Sozialabgaben-, oder Steuerzahlung wirklich löschen? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Sind Sie sicher, dass Sie dieses Gehalt löschen wollen? ExportDataset_tax_1=Steuer- und Sozialabgaben und Zahlungen CalcModeVATDebt=Modus <b>%s USt. auf Engagement Rechnungslegung %s</b>. CalcModeVATEngagement=Modus <b>%sTVA auf Einnahmen-Ausgaben%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Es sind nur tatsächliche Zahlungen für Rechnungen, Kostenab RulesCADue=- Es enthält die fälligen Rechnungen des Kunden, ob diese bezahlt sind oder nicht. <br> - Es basiert auf dem Rechnungsdatum dieser Rechnungen. <br> RulesCAIn=- Es umfasst alle effektiven Zahlungen von Rechnungen, die von Kunden erhalten wurden. <br> - Es basiert auf dem Zahlungsdatum dieser Rechnungen. <br> RulesCATotalSaleJournal=Es beinhaltet alle Gutschriftspositionen aus dem Verkaufsjournal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Beinhaltet Datensätze aus dem Hauptbuch mit den Gruppen "Aufwand" oder "Ertrag" RulesResultBookkeepingPredefined=Beinhaltet Datensätze aus dem Hauptbuch mit den Gruppen "Aufwand" oder "Ertrag" RulesResultBookkeepingPersonalized=Zeigt die Buchungen im Hauptbuch mit Konten <b>gruppiert nach Kontengruppen</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Umsatzsteuerauswertung pro Partner VATReportByCustomers=Umsatzsteuerauswertung pro Kunde VATReportByCustomersInInputOutputMode=Bericht zur vereinnahmten und bezahlten USt. nach Kunden VATReportByQuartersInInputOutputMode=Bericht nach Steuersatz für die erhaltene und bezahlte Steuer +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Steuer 2 Auswertung pro Steuersatz LT2ReportByQuarters=Steuer 3 Auswertung pro Steuersatz LT1ReportByQuartersES=Bericht von RE Ratex @@ -217,7 +231,7 @@ Pcg_subtype=Klasse des Kontos InvoiceLinesToDispatch=versandbereite Rechnungspositionen ByProductsAndServices=Nach Produkten und Leistungen RefExt=Externe Referenz -ToCreateAPredefinedInvoice=Um eine Rechnungsvorlage zu erstellen, erstellen Sie eine normale Rechnung. Anschließend klicken Sie auf den Button "%s", ohne die Rechnung freizugeben. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link zur Bestellung Mode1=Methode 1 Mode2=Methode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Das beim Parnter definierte spezielle Buchhaltu ACCOUNTING_ACCOUNT_SUPPLIER=Buchhaltungskonto für Lieferanten ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Das beim Parnter definierte spezielle Buchhaltungskonto wird nur für die Nebenbuchhaltung verwendet. Dieses wird für das Hauptbuch und als Standardwert der Nebenbuchhaltung verwendet, wenn kein dediziertes Kreditorenbuchhaltungskonto für den Partner definiert ist.\n ConfirmCloneTax=Duplizierung der Steuer-/Sozialabgaben bestätigen +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Bestätige das Klonen der Gehaltsangabe CloneTaxForNextMonth=Für nächsten Monat duplizieren SimpleReport=Einfache Berichte AddExtraReport=Zusätzliche Berichte (Fügen Sie fremde und nationalen Kundenbericht hinzu) @@ -253,7 +269,8 @@ AccountingAffectation=Kontierung zuweisen LastDayTaxIsRelatedTo=Letzter Tag an dem die Steuer relevant ist VATDue=Umsatzsteuer beansprucht ClaimedForThisPeriod=Beantragt in der Periode -PaidDuringThisPeriod=In dieser Perdiode bezahlt +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Pro Steuersatz TurnoverbyVatrate=Verrechneter Umsatz pro Steuersatz TurnoverCollectedbyVatrate=Realisierter Umsatz pro Steuersatz @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Kaufumsatz gesammelt RulesPurchaseTurnoverDue=- Es enthält die fälligen Rechnungen des Lieferanten, ob diese bezahlt sind oder nicht. <br> - Es basiert auf dem Rechnungsdatum dieser Rechnungen. <br> RulesPurchaseTurnoverIn=- Es umfasst alle effektiven Zahlungen von Rechnungen an Lieferanten. <br> - Es basiert auf dem Zahlungsdatum dieser Rechnungen <br> RulesPurchaseTurnoverTotalPurchaseJournal=Es enthält alle Belastungszeilen aus dem Einkaufsjournal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Kaufumsatz in Rechnung gestellt ReportPurchaseTurnoverCollected=Kaufumsatz gesammelt IncludeVarpaysInResults = Nehmen Sie verschiedene Zahlungen in Berichte auf diff --git a/htdocs/langs/de_DE/ecm.lang b/htdocs/langs/de_DE/ecm.lang index 706af0b1a82..b2d0b83c9e8 100644 --- a/htdocs/langs/de_DE/ecm.lang +++ b/htdocs/langs/de_DE/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Datei noch nicht in Datenbank indiziert (bitte Datei ExtraFieldsEcmFiles=Extrafelder Ecm-Dateien ExtraFieldsEcmDirectories=Extrafelder Ecm-Verzeichnisse ECMSetup=DMS Einstellungen +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/de_DE/errors.lang b/htdocs/langs/de_DE/errors.lang index b99e6a58364..0e43f38fd83 100644 --- a/htdocs/langs/de_DE/errors.lang +++ b/htdocs/langs/de_DE/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Verzeichnis <b>%s</b> konnte nicht gefunden werden (Ungültiger ErrorFunctionNotAvailableInPHP=Die PHP-Funktion <b>%s</b> ist für diese Funktion erforderlich, in dieser PHP-Konfiguration jedoch nicht verfügbar. ErrorDirAlreadyExists=Ein Verzeichnis mit diesem Namen existiert bereits. ErrorFileAlreadyExists=Eine Datei mit diesem Namen existiert bereits. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Die Datei wurde nicht vollständig zum Server übertragen. ErrorNoTmpDir=Das temporäre Verzeichnis %s existiert nicht. ErrorUploadBlockedByAddon=Der Upload wurde durch ein PHP Apache-Plugin blockiert. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Fehler beim Laden des Kontenplans. Wenn einige Konten nicht ErrorBadSyntaxForParamKeyForContent=Fehlerhafte Syntax für param keyforcontent. Muss einen Wert haben, der mit %s oder %s beginnt ErrorVariableKeyForContentMustBeSet=Fehler, die Konstante mit dem Namen %s (mit Textinhalt zum Anzeigen) oder %s (mit externer URL zum Anzeigen) muss gesetzt sein. ErrorURLMustStartWithHttp=Die URL %s muss mit http: // oder https: // beginnen. +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Fehler, die neue Referenz ist bereits in Benutzung ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Fehler, eine zu einer bereits geschlossenen Rechnung gehörende Zahlung kann nicht gelöscht werden. ErrorSearchCriteriaTooSmall=Suchkriterium zu klein @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Öffentliche Schnittstelle wurde nicht aktiviert ErrorLanguageRequiredIfPageIsTranslationOfAnother=Die Sprache der neuen Seite muss definiert werden, wenn sie als Übersetzung einer anderen Seite festgelegt ist ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=Die Sprache der neuen Seite darf nicht die Ausgangssprache sein, wenn sie als Übersetzung einer anderen Seite festgelegt ist ErrorAParameterIsRequiredForThisOperation=Für diesen Vorgang ist ein Parameter obligatorisch +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Fehler, Betrag ist notwendig +ErrorAPercentIsRequired=Fehler, bitte geben Sie den Prozentsatz korrekt ein +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Ihr PHP Parameter upload_max_filesize (%s) ist größer als Parameter post_max_size (%s). Dies ist eine inkonsistente Einstellung. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warnung: Dateieintrag zur ECM-Datenbanki WarningTheHiddenOptionIsOn=Achtung, die versteckte Option <b> %s </b> ist aktiviert. WarningCreateSubAccounts=Achtung, Sie können kein Unterkonto direkt erstellen. Sie müssen einen Geschäftspartner oder einen Benutzer erstellen und ihm einen Buchungscode zuweisen, um sie in dieser Liste zu finden WarningAvailableOnlyForHTTPSServers=Nur verfügbar, wenn eine HTTPS-gesicherte Verbindung verwendet wird. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/de_DE/externalsite.lang b/htdocs/langs/de_DE/externalsite.lang index 4d4f246299f..26cabf1b96c 100644 --- a/htdocs/langs/de_DE/externalsite.lang +++ b/htdocs/langs/de_DE/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Konfigurations-Link auf externe Webseite -ExternalSiteURL=URL der externen Seite +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite wurde nicht richtig konfiguriert. ExampleMyMenuEntry=Mein Menü-Eintrag diff --git a/htdocs/langs/de_DE/main.lang b/htdocs/langs/de_DE/main.lang index f75c58b846a..93338d908cf 100644 --- a/htdocs/langs/de_DE/main.lang +++ b/htdocs/langs/de_DE/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Änderungsdatum IPModification=Änderungs-IP DateLastModification=Datum letzte Änderung DateValidation=Freigabedatum +DateSigning=Signing date DateClosing=Schließungsdatum DateDue=Fälligkeitsdatum DateValue=Valutadatum @@ -325,8 +326,8 @@ Weeks=Wochen Today=Heute Yesterday=Gestern Tomorrow=Morgen -Morning=Morgen -Afternoon=Nachmittag +Morning=vormittags +Afternoon=nachmittags Quadri=vierfach MonthOfDay=Tag des Monats DaysOfWeek=Wochentage @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Stückpreis (netto) (Währung) UnitPriceTTC=Stückpreis (brutto) PriceU=VP PriceUHT=VP (netto) -PriceUHTCurrency=Nettopreis (Währung) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=St.-Pr. (inkl. Steuern) Amount=Betrag AmountInvoice=Rechnungsbetrag @@ -389,6 +390,8 @@ AmountTotal=Gesamtbetrag AmountAverage=Durchschnittsbetrag PriceQtyMinHT=Mindestmengenpreis (netto) PriceQtyMinHTCurrency=Stückpreis pro Menge (netto) (Währung) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Betrag oder Prozent Percentage=Prozentsatz Total=Gesamt SubTotal=Zwischensumme @@ -469,9 +472,9 @@ ContactsForCompany=Ansprechpartner/Adressen dieses Partners ContactsAddressesForCompany=Ansprechpartner / Adressen zu diesem Partner AddressesForCompany=Anschriften zu diesem Partner ActionsOnCompany=Aktionen für diesen Partner -ActionsOnContact=Aktionen für diesen Kontakt +ActionsOnContact=Termine / Ereignisse für diesen Kontakt ActionsOnContract=Ereignisse zu diesem Kontakt -ActionsOnMember=Aktionen zu diesem Mitglied +ActionsOnMember=Ereignisse zu diesem Mitglied ActionsOnProduct=Ereignisse zu diesem Produkt NActionsLate=%s verspätet ToDo=zu erledigen @@ -668,7 +671,7 @@ Reason=Grund FeatureNotYetSupported=Diese Funktion wird (noch) nicht unterstützt CloseWindow=Fenster schließen Response=Antwort -Priority=Wichtigkeit +Priority=Priorität SendByMail=Per E-Mail versenden MailSentBy=E-Mail Absender NotSent=nicht gesendet @@ -724,7 +727,7 @@ 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 +NoFileFound=Keine Dokumente hochgeladen CurrentUserLanguage=Aktuelle Benutzersprache CurrentTheme=Aktuelles Design CurrentMenuManager=Aktuelle Menüverwaltung @@ -830,8 +833,8 @@ Access=Zugriff SelectAction=Aktion auswählen SelectTargetUser=Zielbenutzer/Mitarbeiter wählen HelpCopyToClipboard=Benutze Ctrl+C für Kopie in Zwischenablage -SaveUploadedFileWithMask=Datei auf dem Server speichern mit dem Namen "<strong>%s</strong>" (oder "%s") -OriginFileName=Original Dateiname +SaveUploadedFileWithMask=Datei auf dem Server unter dem Namen "<strong>%s</strong>" speichern (wenn deaktiviert wird der %s benutzt) +OriginFileName=original Dateiname SetDemandReason=Quelle definieren SetBankAccount=Bankkonto angeben AccountCurrency=Kontowährung @@ -899,8 +902,10 @@ ViewAccountList=Hauptbuch anzeigen ViewSubAccountList=Unterkonten-Buch anzeigen RemoveString=Entfernen Sie die Zeichenfolge '%s' SomeTranslationAreUncomplete=Einige Sprachen sind nur teilweise übersetzt oder enthalten Fehler. Wenn Sie dies feststellen, können Sie die Übersetzungen unter <a href="https://www.transifex.com/dolibarr-association/dolibarr/translate/#de_DE/" target="_blank">https://www.transifex.com/dolibarr-association/dolibarr/translate/#de_DE/</a> verbessern bzw. ergänzen. -DirectDownloadLink=Direkter Download Link -DirectDownloadInternalLink=Direkter Download-Link (muss angemeldet sein und benötigt Berechtigungen) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Dokument herunterladen ActualizeCurrency=Update-Wechselkurs @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakte SearchIntoMembers=Mitglieder SearchIntoUsers=Benutzer SearchIntoProductsOrServices=Produkte oder Dienstleistungen +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekte SearchIntoMO=Fertigungsaufträge SearchIntoTasks=Aufgaben @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tastatur Kürzel AssignedTo=Zugewiesen an Deletedraft=Entwurf löschen ConfirmMassDraftDeletion=Bestätigung Massenlöschung Entwurf -FileSharedViaALink=Datei via Link geteilt +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Wähle zuerst einen Partner... YouAreCurrentlyInSandboxMode=Sie befinden sich derzeit im %s "Sandbox"-Modus Inventory=Inventur AnalyticCode=Analyse-Code TMenuMRP=Produktion +ShowCompanyInfos=Show company infos ShowMoreInfos=Zeige mehr Informationen NoFilesUploadedYet=Bitte zuerst ein Dokument hochladen SeePrivateNote=Private Notizen ansehen @@ -1064,7 +1071,7 @@ ValidUntil=Gültig bis NoRecordedUsers=Keine Benutzer ToClose=Zu schließen ToProcess=Zu bearbeiten -ToApprove=Zu genemigen +ToApprove=Zu genehmigen GlobalOpenedElemView=Globale Ansicht NoArticlesFoundForTheKeyword=Kein Artikel zu Schlüssselwort gefunden '<strong>%s</strong>' NoArticlesFoundForTheCategory=Kein Artikel für Kategorie gefunden @@ -1120,3 +1127,5 @@ AffectTag=Schlagwort beeinflussen ConfirmAffectTag=Massen-Schlagwort-Affekt ConfirmAffectTagQuestion=Sind Sie sicher, dass Sie Tags für die ausgewählten Datensätze von %s beeinflussen möchten? CategTypeNotFound=Für den Datensatztyp wurde kein Tag-Typ gefunden +CopiedToClipboard=In die Zwischenablage kopiert +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/de_DE/margins.lang b/htdocs/langs/de_DE/margins.lang index a81a6a23593..38064b81c07 100644 --- a/htdocs/langs/de_DE/margins.lang +++ b/htdocs/langs/de_DE/margins.lang @@ -22,7 +22,7 @@ ProductService=Produkt oder Dienstleistung AllProducts=Alle Produkte und Leistungen ChooseProduct/Service=Produkt oder Service wählen ForceBuyingPriceIfNull=Benutze EK-Preis/Herstellkosten als Verkaufspreis, wenn nicht definiert -ForceBuyingPriceIfNullDetails=Falls die Option aktiviert ist, wird die Spanne der Zeile mit Null angezeigt (EK-Preis/Herstellkosten = Verkaufspreis). Ist die Option deaktiviert, wird die Spanne gleich der Voreinstellung sein. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin-Methode für globale Rabatte UseDiscountAsProduct=als Produkt UseDiscountAsService=als Dienstleistung diff --git a/htdocs/langs/de_DE/members.lang b/htdocs/langs/de_DE/members.lang index c11bfa1dff2..5c8947f3a06 100644 --- a/htdocs/langs/de_DE/members.lang +++ b/htdocs/langs/de_DE/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Liste freizugebender Mitglieder MembersListValid=Liste freigegebener Mitglieder MembersListUpToDate=Aktuelle Mitgliederliste MembersListNotUpToDate=Ehemalige Mitglieder +MembersListExcluded=List of excluded members MembersListResiliated=Liste der deaktivierten Mitglieder MembersListQualified=Liste der qualifizierten Mitglieder MenuMembersToValidate=Freizugebende MenuMembersValidated=Freigegebene Mitglieder +MenuMembersExcluded=Excluded members MenuMembersResiliated=Deaktivierte Mitglieder MembersWithSubscriptionToReceive=Mitglieder mit ausstehendem Beitrag MembersWithSubscriptionToReceiveShort=Zu registrierende Mitglieder @@ -47,9 +49,12 @@ MemberStatusActiveLate=Beitragszeitraum abgelaufen MemberStatusActiveLateShort=Abgelaufen MemberStatusPaid=Mitgliedschaft aktuell MemberStatusPaidShort=Aktuelle +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Deaktivierte Mitglieder MemberStatusResiliatedShort=Deaktiviert MembersStatusToValid=Freizugebende +MembersStatusExcluded=Excluded members MembersStatusResiliated=Deaktivierte Mitglieder MemberStatusNoSubscription=Validiert (kein Beitrag erforderlich) MemberStatusNoSubscriptionShort=Freigegeben @@ -82,6 +87,8 @@ Physical=natürliche Person Moral=juristische Person MorAndPhy=juristisch und natürlich Reenable=Reaktivieren +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Mitglied deaktivieren ConfirmResiliateMember=Möchten Sie dieses Mitglied wirklich deaktivieren? DeleteMember=Mitglied löschen @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Vorlage für eine E-Mail an ein Mi DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Vorlage für eine E-Mail an ein Mitglied wegen der Neuregistrierung DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Vorlage für eine E-Mail zur Erinnerung an die Beitragsfälligkeit DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Vorlage für eine E-Mail an ein Mitglied bei Erlöschen der Mitgliedschaft +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=E-Mail-Adresse des Absenders bei automatischen Mails DescADHERENT_ETIQUETTE_TYPE=Format der Etikettenseite DescADHERENT_ETIQUETTE_TEXT=Text für den Druck auf der Mitglied-Adresskarte @@ -162,6 +170,7 @@ DocForLabels=Etiketten erstellen (Gewähltes Ausgabeformat: <b>%s</b>) SubscriptionPayment=Beitragszahlung LastSubscriptionDate=Datum der letzten Beitragszahlung LastSubscriptionAmount=Betrag des letzten Beitrags +LastMemberType=Last Member type MembersStatisticsByCountries=Mitgliederstatistik nach Staaten MembersStatisticsByState=Mitgliederstatistik nach Bundesländern/Provinzen/Kantonen MembersStatisticsByTown=Mitgliederstatistik nach Städten diff --git a/htdocs/langs/de_DE/modulebuilder.lang b/htdocs/langs/de_DE/modulebuilder.lang index be2bc88b630..ad5c1c62c2e 100644 --- a/htdocs/langs/de_DE/modulebuilder.lang +++ b/htdocs/langs/de_DE/modulebuilder.lang @@ -85,7 +85,7 @@ ListOfPermissionsDefined=Liste der definierten Berechtigungen SeeExamples=Beispiele hier EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) VisibleDesc=Ist das Feld sichtbar? (Beispiele: 0 = Nie sichtbar, 1 = Auf Liste sichtbar und Formulare erstellen / aktualisieren / anzeigen, 2 = Nur auf Liste sichtbar, 3 = Nur auf Formular erstellen / aktualisieren / anzeigen (nicht Liste), 4 = Auf Liste sichtbar und nur sichtbar bei Formular aktualisieren / anzeigen (nicht erstellen), 5 = Nur im Formular für die Listenendansicht sichtbar (nicht erstellen, nicht aktualisieren). <br> <br> Wenn ein negativer Wert verwendet wird, wird das Feld standardmäßig nicht in der Liste angezeigt, kann jedoch zur Anzeige ausgewählt werden.) <br> <br> Es kann sich um einen Ausdruck handeln, z. B.:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Zeigt dieses Feld in kompatiblen PDF-Dokumenten an. Sie können die Position mit dem Feld "Position" verwalten. <br/> Derzeit bekannt compatibles PDF-Modelle sind: eratosthenes (Bestellung), espadon (Lieferung), sponge (Rechnungen), cyan (propal / Offerten), cornas (Lieferanten-Auftrag) <br/> <br/> <strong> Für Dokument: </strong> <br/> 0 = nicht angezeigt <br/> 1 = Anzeige <br/> 2 = Anzeige nur leer wenn nicht <br/> <br/> <strong> Für Belegzeilen: </strong> <br/> 0 = nicht angezeigt <br/> 1 = in einer Spalte <br/> 3 = Anzeige in Zeile Beschreibung Spalte nach der Beschreibung <br/> 4 = Anzeige in Spalte Beschreibung nach der angezeigten Beschreibung, nur wenn nicht leer +DisplayOnPdfDesc=Zeigt dieses Feld in kompatiblen PDF-Dokumenten an. Sie können die Position mit dem Feld "Position" verwalten. <br/> Derzeit bekannt compatibles PDF-Modelle sind: eratosthenes (Bestellung), espadon (Lieferung), sponge (Rechnungen), cyan (propal / Offerten), cornas (Lieferanten-Auftrag) <br/> <br/> <strong> Für Dokument: </strong> <br/> 0 = nicht angezeigen <br/> 1 = anzeigen <br/> 2 = nur anzeigen, wenn nicht leer <br/> <br/> <strong> Für Belegzeilen: </strong> <br/> 0 = nicht angezeigt <br/> 1 = in einer Spalte <br/> 3 = Anzeige in Zeile Beschreibung Spalte nach der Beschreibung <br/> 4 = Anzeige in Spalte Beschreibung nach der angezeigten Beschreibung, nur wenn nicht leer DisplayOnPdf=Anzeige auf PDF IsAMeasureDesc=Kann der Wert des Feldes kumuliert werden, um eine Summe in die Liste aufzunehmen? (Beispiele: 1 oder 0) SearchAllDesc=Wird das Feld verwendet, um eine Suche über das Schnellsuchwerkzeug durchzuführen? (Beispiele: 1 oder 0) @@ -133,7 +133,9 @@ IncludeDocGeneration=Ich möchte einige Dokumente aus dem Objekt generieren IncludeDocGenerationHelp=Wenn Sie dies aktivieren, wird Code generiert, um dem Datensatz ein Feld "Dokument generieren" hinzuzufügen. ShowOnCombobox=Wert in der Combobox anzeigen KeyForTooltip=Schlüssel für Tooltip -CSSClass=CSS-Klasse +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Nicht bearbeitbar ForeignKey=Unbekannter Schlüssel TypeOfFieldsHelp=Feldtypen:<br>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) diff --git a/htdocs/langs/de_DE/orders.lang b/htdocs/langs/de_DE/orders.lang index 042c7fe53c8..221b387169f 100644 --- a/htdocs/langs/de_DE/orders.lang +++ b/htdocs/langs/de_DE/orders.lang @@ -16,6 +16,8 @@ ToOrder=Erzeuge Bestellung MakeOrder=Erzeuge Bestellung SupplierOrder=Lieferantenbestellung SuppliersOrders=Lieferantenbestellungen +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Aktuelle Lieferantenbestellungen CustomerOrder=Bestellung CustomersOrders=Verkaufsaufträge @@ -87,7 +89,7 @@ NbOfOrders=Anzahl der Bestellungen OrdersStatistics=Bestellstatistik OrdersStatisticsSuppliers=Statistik Lieferantenbestellungen NumberOfOrdersByMonth=Anzahl der Bestellungen pro Monat -AmountOfOrdersByMonthHT=Anzahl der Aufträge pro Monat (excl. Steuern) +AmountOfOrdersByMonthHT=Gesamtbetrag der Bestellungen pro Monat (exkl. Steuern) ListOfOrders=Liste Aufträge CloseOrder=Bestellung schließen ConfirmCloseOrder=Möchten Sie diese Bestellung wirklich auf "geliefert" setzen? Sobald eine Bestellung geliefert ist, kann sie auf "berechnet" gesetzt werden. @@ -101,7 +103,7 @@ ClassifyShipped=Als geliefert markieren DraftOrders=Entwürfe DraftSuppliersOrders=Entwürfe Lieferantenbestellungen OnProcessOrders=Bestellungen in Bearbeitung -RefOrder=Bestell-Nr. +RefOrder=Best.-Nr. RefCustomerOrder=Kunden-BestellNr. RefOrderSupplier=Best.-Nr. für Lieferant RefOrderSupplierShort=Lieferanten-Best.-Nr. diff --git a/htdocs/langs/de_DE/other.lang b/htdocs/langs/de_DE/other.lang index 5ce758eaa4e..1da316f5077 100644 --- a/htdocs/langs/de_DE/other.lang +++ b/htdocs/langs/de_DE/other.lang @@ -97,7 +97,7 @@ PredefinedMailContentSendOrder=__(Hallo)__\n\nBitte entnehmen Sie dem Anhang die PredefinedMailContentSendSupplierOrder=__(Hallo)__\n\nBitte entnehmen Sie dem Anhang die Bestellung\n\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ 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__ +PredefinedMailContentSendFichInter=__(Hello)__\n\nIm Anhang finden Sie den Serviceauftrag __REF__.\n\n\n__(Mit freundlichen Grüßen)__\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__ PredefinedMailContentSendActionComm=Ereigniserinnerung "__EVENT_LABEL__" am __EVENT_DATE__ um __EVENT_TIME__ <br> <br> Dies ist eine automatische Nachricht. Bitte antworten Sie nicht. @@ -114,6 +114,7 @@ DemoCompanyAll=Verwalten Sie ein kleines oder mittleres Unternehmen mit mehreren CreatedBy=Erstellt von %s ModifiedBy=Bearbeitet von %s ValidatedBy=Freigegeben von %s +SignedBy=Signed by %s ClosedBy=Geschlossen von %s CreatedById=Erstellt von User-ID ModifiedById=Letzte Änderung durch Benutzer-ID @@ -226,8 +227,8 @@ NewSizeAfterCropping=Neue Größe nach dem Zuschneiden DefineNewAreaToPick=Definieren Sie einen neuen Bereich innerhalb des Bildes (Klicken Sie mit der linken Maustaste auf das Bild und halten Sie bis zur gegenüberliegenden Ecke) CurrentInformationOnImage=Mit diesem Tool können Sie die Größe eines Bildes ändern oder es zuschneiden. Dies sind die Informationen zum aktuell bearbeiteten Bild ImageEditor=Bildbearbeitung -YouReceiveMailBecauseOfNotification=Sie erhalten diese Nachricht, weil Ihre E-Mail-Adresse zur Liste der zu benachrichtigenden Kontakte für %s von %s hinzugefügt wurde. -YouReceiveMailBecauseOfNotification2=Sie erhalten dieses Mail aufgrund folgender Benachrichtigung: +YouReceiveMailBecauseOfNotification=Sie erhalten diese Nachricht, weil Sie ein aktives Abonnement für das nachfolgende Ereignis bei %s / %s haben. +YouReceiveMailBecauseOfNotification2=\n\nEreignis: ThisIsListOfModules=Dies ist eine Liste von ausgewählten Modulen für die Demo (nur die gängigsten Module sind enthalten). Bearbeiten Sie die Auswahl und eine personalisierte Demo zu erhalten und klicken dann bitte auf "Start". UseAdvancedPerms=Verwenden Sie die erweiterten Berechtigungen einiger Module FileFormat=Dateiformat @@ -239,11 +240,12 @@ FileIsTooBig=Dateien sind zu groß PleaseBePatient=Bitte haben Sie ein wenig Geduld ... NewPassword=Neue Kennwort ResetPassword=Kennwort zurücksetzen -RequestToResetPasswordReceived=Eine Anfrage zur Änderung Ihres Passwortes erhalten. +RequestToResetPasswordReceived=Wir haben eine Anfrage zur Änderung Ihres Passworts erhalten. NewKeyIs=Dies sind Ihre neuen Anmeldedaten -NewKeyWillBe=Ihr neuer Anmeldeschlüssel für die Software ist +NewKeyWillBe=Dies sind Ihre neuen Anmeldedaten ClickHereToGoTo=Hier klicken für %s YouMustClickToChange=Sie müssen zuerst auf den folgenden Link klicken um die Passwortänderung zu bestätigen. +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Wenn Sie diese Änderung nicht beantragt haben, löschen Sie einfach dieses Mail. Ihre Anmeldedaten sind sicher bei uns aufbewahrt. IfAmountHigherThan=Wenn der Betrag höher als <strong>%s</strong> SourcesRepository=Repository für Quellcodes diff --git a/htdocs/langs/de_DE/productbatch.lang b/htdocs/langs/de_DE/productbatch.lang index 2c9fba27f18..de283a431bb 100644 --- a/htdocs/langs/de_DE/productbatch.lang +++ b/htdocs/langs/de_DE/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Chargen-/Serien-Nr. benutzen -ProductStatusOnBatch=Ja (Chargen-/Serien-Nr. Pflicht) +ProductStatusOnBatch=Ja (Charge erforderlich) +ProductStatusOnSerial=Ja (einzigartige Seriennummer erforderlich) ProductStatusNotOnBatch=Nein (keine Chargen-/Serien-Nr.) -ProductStatusOnBatchShort=Ja +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Seriennummer ProductStatusNotOnBatchShort=Keine Batch=Charge / Seriennr. atleast1batchfield="Verzehr bis" oder "Verkaufen bis"-Datum oder Chargen- / Seriennummer @@ -16,9 +18,18 @@ printEatby=Verzehren bis: %s printSellby=Verkaufen bis: %s printQty=Menge: %d AddDispatchBatchLine=Fügen Sie eine Zeile für den Versand bis Haltbarkeit hinzu -WhenProductBatchModuleOnOptionAreForced=Wenn das Modul Chargen- und Seriennummernverwaltung aktiviert ist, wird die automatische Warenbestandsanpassung gezwungen beim Ereignis "versendet" den tatsächlichen Bestand zu verringern und beim Ereignis "manuelles Buchen in ein Warenlager" die tatsächlichen Bestand zu erhöhen. Dies kann nicht beeinflusst werden. Andere Optionen können wie gewünscht definiert werden. +WhenProductBatchModuleOnOptionAreForced=Wenn das Modul "Produkt-Chargen und Serien" aktiviert ist, wird die automatische Warenbestandsanpassung gezwungen beim Ereignis "versendet" den tatsächlichen Bestand zu verringern und beim Ereignis "manuelles Buchen in ein Warenlager" die tatsächlichen Bestand zu erhöhen. Dies kann nicht beeinflusst werden. Andere Optionen können wie gewünscht definiert werden. ProductDoesNotUseBatchSerial=Dieses Produkt hat keine Chargen-/Seriennummer -ProductLotSetup=Einstellungen des Moduls Chargen- und Seriennummernverwaltung +ProductLotSetup=Einstellungen des Moduls "Produkt-Chargen und Serien" ShowCurrentStockOfLot=Warenbestand für diese Chargen-/Seriennummer anzeigen ShowLogOfMovementIfLot=Bewegungen für diese Chargen-/Seriennummer anzeigen StockDetailPerBatch=Lagerdetail nach Chargen +SerialNumberAlreadyInUse=Die Seriennummer %s wird bereits für das Produkt %s verwendet +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/de_DE/products.lang b/htdocs/langs/de_DE/products.lang index b29a2da4eda..1f0dacf0a52 100644 --- a/htdocs/langs/de_DE/products.lang +++ b/htdocs/langs/de_DE/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Mehrwertsteuersatz (für diesen Lieferanten / Produkt) DiscountQtyMin=Rabatt für diese Menge NoPriceDefinedForThisSupplier=Für diesen Lieferanten / Produkt wurde kein Preis / Menge definiert NoSupplierPriceDefinedForThisProduct=Für dieses Produkt ist kein Lieferantenpreis / Menge definiert +PredefinedItem=Vordefinierte Position PredefinedProductsToSell=Vordefiniertes Produkt PredefinedServicesToSell=Vordefinierter Dienst PredefinedProductsAndServicesToSell=Vordefiniertes Produkt/Leistung @@ -313,7 +314,7 @@ LastUpdated=Zuletzt aktualisiert CorrectlyUpdated=erfolgreich aktualisiert PropalMergePdfProductActualFile=verwendete Dateien, um in PDF Azur hinzuzufügen sind / ist PropalMergePdfProductChooseFile=Wähle PDF-Dateien -IncludingProductWithTag=Inklusive Artikel/Dienstleistung mit Schlagwörter +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Standardpreis, echter Preis kann vom Kunden abhängig sein WarningSelectOneDocument=Bitte wählen Sie mindestens ein Dokument aus DefaultUnitToShow=Einheit diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index 681c0f22f23..963e12c139b 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=verwendet ListOfTasks=Aufgabenliste GoToListOfTimeConsumed=Liste der verwendeten Zeit aufrufen GanttView=Gantt-Diagramm +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Liste der projektbezogenen Angebote ListOrdersAssociatedProject=Liste der projektbezogenen Kundenaufträge ListInvoicesAssociatedProject=Liste der projektbezogenen Kundenrechnungen @@ -268,3 +269,7 @@ OneLinePerTask=Eine Zeile pro Aufgabe OneLinePerPeriod=Eine Zeile pro Zeitraum RefTaskParent=Übergeordnete Aufgabe ProfitIsCalculatedWith=Der Gewinn wird berechnet mit +AddPersonToTask=Auch zu Aufgaben hinzufügen +UsageOrganizeEvent=Verwendung: Ereignisorganisation +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Klassifizieren Sie das Projekt als abgeschlossen, wenn alle seine Aufgaben abgeschlossen sind (100%% Fortschritt). +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Hinweis: Bestehende Projekte mit allen Aufgaben mit dem Fortschritt 100%% sind nicht betroffen: Sie müssen sie manuell schließen. Diese Option betrifft nur offene Projekte. diff --git a/htdocs/langs/de_DE/propal.lang b/htdocs/langs/de_DE/propal.lang index de5a2e451fa..32d5cb7ce29 100644 --- a/htdocs/langs/de_DE/propal.lang +++ b/htdocs/langs/de_DE/propal.lang @@ -30,7 +30,7 @@ PropalsOpened=geöffnet PropalStatusDraft=Entwurf (freizugeben) PropalStatusValidated=Freigegeben (Angebot ist offen) PropalStatusSigned=unterzeichnet (abrechenbar) -PropalStatusNotSigned=Nicht unterzeichnet (geschlossen) +PropalStatusNotSigned=abgelehnt (geschlossen) PropalStatusBilled=Verrechnet PropalStatusDraftShort=Entwurf PropalStatusValidatedShort=Bestätigt (offen) @@ -41,7 +41,7 @@ PropalStatusBilledShort=Verrechnet PropalsToClose=Zu schließende Angebote PropalsToBill=Unterzeichnete Angebote zur Verrechnung ListOfProposals=Liste Angebote -ActionsOnPropal=Ereignisse zum Angebot +ActionsOnPropal=Ereignisse zu diesem Angebot RefProposal=Angebots-Nr. SendPropalByMail=Angebot per E-Mail versenden DatePropal=Angebotsdatum @@ -59,6 +59,7 @@ ConfirmClonePropal=Sind Sie sicher, dass Sie dieses Angebot <b>%s</b> dupliziere ConfirmReOpenProp=Sind Sie sicher, dass Sie dieses Angebot <b>%s</b> wieder öffnen möchten ? ProposalsAndProposalsLines=Angebote und Positionen ProposalLine=Angebotsposition +ProposalLines=Proposal lines AvailabilityPeriod=Gültig bis SetAvailability=Gültigkeitszeitraum definieren AfterOrder=nach Bestellung diff --git a/htdocs/langs/de_DE/stocks.lang b/htdocs/langs/de_DE/stocks.lang index 6a0685862ae..997f17adbf5 100644 --- a/htdocs/langs/de_DE/stocks.lang +++ b/htdocs/langs/de_DE/stocks.lang @@ -3,7 +3,7 @@ WarehouseCard=Warenlager - Übersicht Warehouse=Warenlager Warehouses=Warenlager ParentWarehouse=Übergeordnetes Lager -NewWarehouse=Neues Warenlager +NewWarehouse=Neues Lager / Lagerstandort WarehouseEdit=Warenlager bearbeiten MenuNewWarehouse=Neues Warenlager WarehouseSource=Ursprungslager @@ -19,10 +19,10 @@ Stock=Warenbestand Stocks=Warenbestände 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 +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future +StocksByLotSerial=Lagerbestand nach Chargen/Serien +LotSerial=Chargen/Serien LotSerialList=Liste der Chargen-/Seriennummern Movements=Lagerbewegungen ErrorWarehouseRefRequired=Warenlager-Referenz erforderlich @@ -37,8 +37,8 @@ AllWarehouses=Alle Warenlager IncludeEmptyDesiredStock=Schließe auch negative Bestände mit undefinierten gewünschten Beständen ein IncludeAlsoDraftOrders=Fügen Sie auch Auftragsentwürfe hinzu Location=Standort -LocationSummary=Kurzbezeichnung Standort -NumberOfDifferentProducts=Anzahl unterschiedlicher Produkte +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Anzahl Produkte LastMovement=Letzte Bewegung LastMovements=Letzte Bewegungen @@ -62,7 +62,8 @@ 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=Regel für Lager -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Ein Lager zu dem Angebot einstellen WarehouseAskWarehouseDuringOrder=Legen Sie ein Lager für Verkaufsaufträge fest UserDefaultWarehouse=Legen Sie ein Lager für Benutzer fest MainDefaultWarehouse=Standardlager @@ -73,39 +74,40 @@ QtyDispatched=Liefermenge QtyDispatchedShort=Menge versandt QtyToDispatchShort=Menge zu versenden OrderDispatch=Wareneingang -RuleForStockManagementDecrease=Wählen Sie Regel für automatische Bestandsabnahme (manuelle Abnahme ist immer möglich, auch wenn eine automatische Abnahmeregel aktiviert ist) -RuleForStockManagementIncrease=Wählen Sie Regel für automatische Bestandserhöhung (manuelle Erhöhung ist immer möglich, auch wenn eine automatische Erhöhungsregel aktiviert ist) -DeStockOnBill=Reduzieren Sie den realen Bestand bei Validierung der Kundenrechnung / Gutschrift -DeStockOnValidateOrder=Reduzieren Sie den realen Bestand bei der Validierung des Kundenauftrags -DeStockOnShipment=Verringere reale Lagerbestände bei Bestätigung von Lieferungen -DeStockOnShipmentOnClosing=Verringere reale Lagerbestände bei Bestätigung von Lieferungen -ReStockOnBill=Erhöhen Sie den realen Bestand bei der Validierung der Lieferantenrechnung / -gutschrift -ReStockOnValidateOrder=Erhöhen Sie die realen Bestände bei der Bestellbestätigung -ReStockOnDispatchOrder=Erhöhen Sie den realen Lagerbestand beim manuellen Versand in das Lager, nachdem Sie die Ware in der Bestellung erhalten haben -StockOnReception=Erhöhe die realen Lagerbestände bei der Inventur -StockOnReceptionOnClosing=Erhöhe die realen Lagerbestände, wenn der Wareneingang geschlossen wird +RuleForStockManagementDecrease=Regel für automatische Bestandsabnahme (eine manuelle Bestandskorrektur ist immer möglich, auch wenn eine Regel aktiv ist) +RuleForStockManagementIncrease=Regel für automatische Bestandszunahme (eine manuelle Bestandskorrektur ist immer möglich, auch wenn eine Regel aktiv ist) +DeStockOnBill=Lagerbestand beim Bestätigen von Kundenrechnungen / -gutschriften anpassen +DeStockOnValidateOrder=Lagerbestand beim Bestätigen von Verkaufsaufträgen reduzieren +DeStockOnShipment=Verringere tatsächliche Lagerbestände bei Bestätigung von Lieferungen +DeStockOnShipmentOnClosing=Lagerbestand beim Schließen von Lieferungen reduzieren +ReStockOnBill=Erhöhen Sie den tatsächlichen Bestand bei der Validierung der Lieferantenrechnung / -gutschrift +ReStockOnValidateOrder=Erhöhen Sie tatsächliche Bestände bei der Bestellbestätigung +ReStockOnDispatchOrder=Erhöhen der tatsächlichen Lagerbestand beim manuellen Versand ins Lager, nachdem Bestelleingang der Ware +StockOnReception=Erhöhung des tatsächlichen Lagerbestands bei der Überprüfung des Eingangs. +StockOnReceptionOnClosing=Erhöhe die tatsächlichen Lagerbestände, wenn der Wareneingang geschlossen wird OrderStatusNotReadyToDispatch=Auftrag wurde noch nicht oder nicht mehr ein Status, der Erzeugnisse auf Lager Hallen Versand ermöglicht. StockDiffPhysicTeoric=Begründung für Differenz zwischen Inventurbestand und Lagerbestand -NoPredefinedProductToDispatch=Es erfolgt keine Lagerbestandsänderung da keine vordefinierten Produkte enthalten sind. \n +NoPredefinedProductToDispatch=Es erfolgt keine Lagerbestandsänderung da keine vordefinierten Produkte enthalten sind. DispatchVerb=Position(en) verbuchen StockLimitShort=Grenzwert für Alarm StockLimit=Mindestbestand vor Warnung StockLimitDesc=(leer) bedeutet keine Warnung. <br> 0 kann für eine Warnung verwendet werden, sobald der Bestand leer ist. PhysicalStock=Aktueller Lagerbestand -RealStock=Realer Bestand +RealStock=tatsächlicher 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): +RealStockWillAutomaticallyWhen=Der tatsächliche Bestand wird gemäß dieser Regel geändert (wie im Bestandsmodul definiert): VirtualStock=Theoretischer Lagerbestand VirtualStockAtDate=Virtueller Bestand zum Datum -VirtualStockAtDateDesc=Virtueller Lagerbestand, sobald alle anstehenden Aufträge, die vor dem Datum erledigt werden sollen, abgeschlossen sind +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished VirtualStockDesc=Virtueller Bestand ist der berechnete Bestand, der verfügbar ist, sobald alle offenen / ausstehenden Aktionen (die sich auf den Bestand auswirken) abgeschlossen sind (eingegangene Bestellungen, versendete Kundenaufträge, produzierte Fertigungsaufträge usw.). +AtDate=At date IdWarehouse=Warenlager ID DescWareHouse=Beschreibung Warenlager LieuWareHouse=Standort Warenlager WarehousesAndProducts=Warenlager und Produkte WarehousesAndProductsBatchDetail=Warenlager und Produkte (mit Detail per lot / serial) AverageUnitPricePMPShort=Gewichteter Warenwert -AverageUnitPricePMPDesc=Der eingegebene durchschnittliche Stückpreis, den wir an die Lieferanten zahlen mussten, um das Produkt in unseren Lagerbestand aufzunehmen. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Verkaufspreis EstimatedStockValueSellShort=Verkaufswert EstimatedStockValueSell=Verkaufswert @@ -124,8 +126,8 @@ StockToBuy=zu bestellen Replenishment=Nachbestellung ReplenishmentOrders=Nachbestellungen VirtualDiffersFromPhysical=Je nach Erhöhung / Verringerung der Lagerbestands-Optionen können sich physische und virtuelle Lagerbestände (physische Lagerbestände + offene Aufträge) unterscheiden -UseRealStockByDefault=Verwende für die Nachbestellfunktion realen Bestand anstelle von virtuellem Bestand -ReplenishmentCalculation=Die zu bestellende Menge ist (gewünschte Menge - realer Bestand) anstelle von (gewünschte Menge - virtueller Bestand) +UseRealStockByDefault=Verwenden Sie tatsächlichen Lagerbestand anstelle des virtuellen Lagerbestands für die Nachbestellfunktion. +ReplenishmentCalculation=Die zu bestellende Menge ist (gewünschte Menge - tatsächlicher Bestand) anstelle von (gewünschte Menge - virtueller Bestand) UseVirtualStock=Theoretischen Lagerbestand benutzen UsePhysicalStock=Ist-Bestand verwenden CurentSelectionMode=Aktueller Auswahl-Modus @@ -145,16 +147,16 @@ 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 Quelllager und ein Ziellager, ein Produkt und eine Menge aus und klicken Sie auf "%s". Sobald dies für alle erforderlichen Bewegungen erledigt ist, 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 on "%s". RecordMovement=Umbuchung ReceivingForSameOrder=Verbuchungen zu dieser Bestellung StockMovementRecorded=Lagerbewegungen aufgezeichnet RuleForStockAvailability=Regeln für Bestands-Verfügbarkeit -StockMustBeEnoughForInvoice=Ein ausreichender Lagerbestand ist erforderlich, um Produkte/Leistungen in Rechnung zu stellen. (Die Prüfung gegen den aktuellen realen Lagerbestand erfolgt, wenn eine Zeile zur Rechnung hinzugefügt wird, unabhängig von der Regel zur automatischen Lagerbestandsänderung.) +StockMustBeEnoughForInvoice=Ein ausreichender Lagerbestand ist erforderlich, um Produkte/Leistungen in Rechnung zu stellen. (Die Prüfung gegen den aktuellen tatsächlichen Lagerbestand erfolgt, wenn eine Zeile zur Rechnung hinzugefügt wird, unabhängig von der Regel zur automatischen Lagerbestandsänderung.) StockMustBeEnoughForOrder=Der Lagerbestand muss ausreichen, um der Bestellung ein Produkt / eine Dienstleistung hinzuzufügen. -StockMustBeEnoughForShipment= Ein ausreichender Lagerbestand ist erforderlich, um Produkte/Leistungen zum Versand hinzuzufügen. (Die Prüfung gegen den aktuellen realen Lagerbestand erfolgt, wenn eine Zeile zum Versand hinzugefügt wird, unabhängig von der Regel zur automatischen Lagerbestandsänderung.) +StockMustBeEnoughForShipment= Ein ausreichender Lagerbestand ist erforderlich, um Produkte/Leistungen zum Versand hinzuzufügen. (Die Prüfung gegen den aktuellen tatsächlichen Lagerbestand erfolgt, wenn eine Zeile zum Versand hinzugefügt wird, unabhängig von der Regel zur automatischen Lagerbestandsänderung.) MovementLabel=Titel der Lagerbewegung -TypeMovement=Art der Lagerbewegung +TypeMovement=Direction of movement DateMovement=Datum Lagerbewegung InventoryCode=Bewegungs- oder Bestandscode IsInPackage=In Paket enthalten @@ -183,6 +185,7 @@ inventoryCreatePermission=Neue Inventur erstellen inventoryReadPermission=Inventar anzeigen inventoryWritePermission=Inventar aktualisieren inventoryValidatePermission=Inventur freigeben +inventoryDeletePermission=Delete inventory inventoryTitle=Inventar inventoryListTitle=Inventuren inventoryListEmpty=Keine Inventarisierung in Arbeit @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Ein Lagerbestand ist erforderlich, um das z ForceTo=Erzwingen AlwaysShowFullArbo=Anzeige des vollständigen Angebots (Popup des Lager-Links). Warnung: Dies kann die Leistung erheblich beeinträchtigen. StockAtDatePastDesc=Du kannst hier den Lagerbestand (Realbestand) zu einem bestimmten Datum in der Vergangenheit anzeigen -StockAtDateFutureDesc=Du kannst hier den Lagerbestand (virtueller Bestand) zu einem bestimmten Zeitpunkt in der Zukunft anzeigen +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Aktueller Lagerbestand InventoryRealQtyHelp=Setze den Wert auf 0, um die Menge zurückzusetzen. <br> Feld leer lassen oder Zeile entfernen, um unverändert zu lassen -UpdateByScaning=Update durch Scannen +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update per Scan (Produkt-Barcode) UpdateByScaningLot=Update per Scan (Charge | serieller Barcode) DisableStockChangeOfSubProduct=Deaktivieren Sie den Lagerwechsel für alle Unterprodukte dieses Satzes während dieser Bewegung. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Datei hochladen und dann auf das Symbol %s klicken, um die Datei als Quell-Importdatei auszuwählen ... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=wiedereröffnen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/de_DE/suppliers.lang b/htdocs/langs/de_DE/suppliers.lang index 97d31dc4605..a5043c2b875 100644 --- a/htdocs/langs/de_DE/suppliers.lang +++ b/htdocs/langs/de_DE/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Lieferanten SuppliersInvoice=Lieferantenrechnung +SupplierInvoices=Lieferantenrechnungen ShowSupplierInvoice=Zeige Lieferantenrechnung NewSupplier=neuer Lieferant History=Verlauf diff --git a/htdocs/langs/de_DE/ticket.lang b/htdocs/langs/de_DE/ticket.lang index 6405e1db2a6..87cbe3e8ab8 100644 --- a/htdocs/langs/de_DE/ticket.lang +++ b/htdocs/langs/de_DE/ticket.lang @@ -70,6 +70,8 @@ Deleted=Gelöscht # Dict Type=Typ Severity=Dringlichkeit +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Um eine E-Mail mit der Ticketmeldung zu senden @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Logo des Moduls im öffentlichen Interface anzeigen TicketsShowModuleLogoHelp=Aktiviere diese Option um das Logo des Moduls im öffentlichen Interface nicht anzuzeigen TicketsShowCompanyLogo=Unternehmenslogo im öffentlichen Interface anzeigen TicketsShowCompanyLogoHelp=Aktiviere diese Option um das Firmenlogo nicht im öffentlichen Interface anzuzeigen -TicketsEmailAlsoSendToMainAddress=Sende Benachrichtungen auch an die Hauptemailadresse -TicketsEmailAlsoSendToMainAddressHelp=Aktivieren Sie diese Option um E-Mails an die Adresse unter "Absenderadresse" (Im Setup weiter unten) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Zeige nur dem Benutzer zugewiesene Tickets an (nicht gültig für externe Benutzer, diese sehen nur die Tickets des eigenen Partners) TicketsLimitViewAssignedOnlyHelp=Nur dem aktuellen Benutzer zugewiesene Tickets werden angezeigt. Trifft nicht auf Benutzer zu, die das Recht haben Tickets zu verwalten. TicketsActivatePublicInterface=Öffentliches Interface aktivieren @@ -126,10 +128,10 @@ TicketNumberingModules=Ticketnummerierungsmodul TicketsModelModule=Dokumentvorlagen für Tickets TicketNotifyTiersAtCreation=Partner über Ticketerstellung informieren TicketsDisableCustomerEmail=E-Mails immer deaktivieren, wenn ein Ticket über die öffentliche Oberfläche erstellt wird -TicketsPublicNotificationNewMessage=Senden Sie E-Mails, wenn eine neue Nachricht hinzugefügt wird +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=E-Mail (s) senden, wenn eine neue Nachricht von der öffentlichen Oberfläche hinzugefügt wird (an den zugewiesenen Benutzer oder die Benachrichtigungs-E-Mail an (Update) und / oder die Benachrichtigungs-E-Mail an) TicketPublicNotificationNewMessageDefaultEmail=Benachrichtigungen per E-Mail an (Update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Sende E-Mail-Benachrichtigungen über neue Nachrichten an diese Adresse, wenn dem Ticket kein Benutzer zugewiesen ist oder der Benutzer keine E-Mail hat. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Zuletzt bearbeitete TIckets BoxLastModifiedTicketDescription=Zuletzt bearbeitete Tickets (maximal %s) BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Keine zuletzt bearbeiteten Tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/de_DE/trips.lang b/htdocs/langs/de_DE/trips.lang index 12ecdfb6a6a..0a6ad3bad24 100644 --- a/htdocs/langs/de_DE/trips.lang +++ b/htdocs/langs/de_DE/trips.lang @@ -33,7 +33,7 @@ ExpenseReportCanceledMessage=Der Spesenabrechnung %s wurde abgebrochen.<br> - Be ExpenseReportPaid=Eine Spesenabrechnung wurde ausbezahlt ExpenseReportPaidMessage=Der Spesenabrechnung %s wurde bezahlt.<br> - Benutzer: %s<br> - Paid von: %s<br>Klicken Sie hier, um die Spesenabrechnung anzuzeigen: %s TripId=Spesenabrechnung ID -AnyOtherInThisListCanValidate=Angegebene Person über neue Spesenabrechnung informieren, mit Bitte um Validierung. +AnyOtherInThisListCanValidate=Person, die zur Validierung der Anfrage informiert werden soll. TripSociete=Partner TripNDF=Hinweise Spesenabrechnung PDFStandardExpenseReports=Standard-Vorlage, um ein PDF-Dokument für die Spesenabrechnung zu erzeugen @@ -90,7 +90,7 @@ DATE_REFUS=Datum Ablehnung DATE_SAVE=Freigabedatum DATE_CANCEL=Stornodatum DATE_PAIEMENT=Zahlungsdatum -BROUILLONNER=entwerfen +BROUILLONNER=wiedereröffnen ExpenseReportRef=Belegnummer Spesenabrechnung ValidateAndSubmit=Validieren und zur Genehmigung einreichen ValidatedWaitingApproval=Validiert (Wartet auf Genehmigung) diff --git a/htdocs/langs/de_DE/users.lang b/htdocs/langs/de_DE/users.lang index fc859a67ca4..7449ffc83c4 100644 --- a/htdocs/langs/de_DE/users.lang +++ b/htdocs/langs/de_DE/users.lang @@ -25,7 +25,7 @@ ConfirmDeleteUser=Möchten Sie diesen Benutzer <b>%s</b> wirklich löschen? ConfirmDeleteGroup=Möchten Sie diese Gruppe <b>%s</b> wirklich löschen? ConfirmEnableUser=Möchten Sie diesen Benutzer <b>%s</b> wirklich aktivieren? ConfirmReinitPassword=Möchten Sie für diesen Benutzer <b>%s</b> wirklich ein neues Passwort generieren? -ConfirmSendNewPassword=Möchten Sie für diesen Benutzer <b>%s</b> wirklich ein neues Passwort generieren und diesem per E-Mail zusenden? +ConfirmSendNewPassword=Möchten Sie für den Benutzer <b>%s</b> wirklich ein neues Passwort generieren und es diesem per E-Mail zusenden? NewUser=Neuer Benutzer CreateUser=Benutzer erstellen LoginNotDefined=Benutzername ist nicht gesetzt. @@ -46,6 +46,8 @@ RemoveFromGroup=Gruppenzuweisung entfernen PasswordChangedAndSentTo=Passwort geändert und an <b>%s</b> gesendet. PasswordChangeRequest=Aufforderung, das Passwort für <b> %s </b> zu ändern PasswordChangeRequestSent=Kennwort-Änderungsanforderung für <b>%s</b> gesendet an <b>%s</b>. +IfLoginExistPasswordRequestSent=Falls dieser Benutzer über ein gültiges Konto verfügt, wurde eine E-Mail zum Zurücksetzen des Passworts gesendet. +IfEmailExistPasswordRequestSent=Eine E-Mail zum Zurücksetzen des Passworts wurde versendet (vorausgesetzt dass die angegebene E-Mail-Adresse existiert). ConfirmPasswordReset=Passwort zurücksetzen MenuUsersAndGroups=Benutzer und Gruppen LastGroupsCreated=Zuletzt erstellte Gruppen (%s) @@ -70,9 +72,10 @@ ExportDataset_user_1=Benutzer und -eigenschaften DomainUser=Domain-Benutzer %s Reactivate=Reaktivieren CreateInternalUserDesc=Dieses Formular erlaubt ihnen das Anlegen eines internen Benutzers in ihrem Unternehmen/ihrer Organisation. Zum Anlegen eines externen Benutzers (Kunden, Lieferanten, ...), verwenden sie bitte die 'Kontakt/Adresse erstellen'-Schaltfläche in der Kontaktkarte des jeweiligen Partners. -InternalExternalDesc=Ein <b>interner</b> Benutzer ist Teil ihres Unternehmens/ihrer Organisation.<br>Ein <b>externer</b> Benutzer ist ein Kunde, ein Lieferant oder jemand anderes. (Das Anlegen eines externen Benutzers kann aus dem Kontaktdatensatz des Dritten erfolgen.)<br>Diese Zuordnung regelt die Rechte in Dolibarr, zudem kann ein externer Benutzer andere Menüleisten haben als der interne Benutzer (siehe: Start - Einstellungen - Menüs). +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Berechtigung durch eine Gruppenzugehörigkeit geerbt. Inherited=Geerbt +UserWillBe=Benutzer erstellen als UserWillBeInternalUser=Erstellter Benutzer ist intern (mit keinem bestimmten Partner verknüpft) UserWillBeExternalUser=Erstellter Benutzer ist extern (mit einem bestimmten Partner verknüpft) IdPhoneCaller=Anrufer ID @@ -109,12 +112,14 @@ UserAccountancyCode=Buchhaltungscode Benutzer UserLogoff=Benutzer abmelden UserLogged=Benutzer angemeldet DateOfEmployment=Anstellungsdatum -DateEmployment=Beschäftigungsbeginn +DateEmployment=Mitarbeiter +DateEmploymentstart=Beschäftigungsbeginn DateEmploymentEnd=Beschäftigungsende +RangeOfLoginValidity=Datumsbereich der Anmeldegültigkeit CantDisableYourself=Sie können nicht ihr eigenes Benutzerkonto deaktivieren ForceUserExpenseValidator=Überprüfung der Spesenabrechnung erzwingen 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 +WarningNotLangOfInterface=Warnung: das ist die eingestellte Muttersprache die der Benutzer spricht, nicht die ausgewählte Sprache der Benutzeroberfläche. Um die angezeigte Sprache der Benutzeroberfläche zu ändern, gehe zum Tab %s diff --git a/htdocs/langs/de_DE/website.lang b/htdocs/langs/de_DE/website.lang index 8e7ec9d6b08..81cfe83913f 100644 --- a/htdocs/langs/de_DE/website.lang +++ b/htdocs/langs/de_DE/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost= <u> Verwendung mit Apache / NGinx / ... </u> <br> Erstellen ExampleToUseInApacheVirtualHostConfig=Beispiel für die Einrichtung eines virtuellen Apache-Hosts: YouCanAlsoTestWithPHPS=<u>Verwendung mit eingebettetem PHP-Server</u><br>In der Entwicklungsumgebung können Sie die Site mit dem eingebetteten PHP-Webserver (PHP 5.5 erforderlich) testen, indem Sie <br><strong>php -S 0.0.0.0:8080 -t %s</strong> ausführen. YouCanAlsoDeployToAnotherWHP=<u>Betreibe deine Website mit einem anderen Dolibarr Hosting-Anbieter</u><br>Wenn kein Apache oder NGinx Webserver online verfügbar ist, kann deine Website exportiert und importiert werden und zu einer anderen Dolibarr Instanz umziehen, die durch einen anderen Dolibarr Hosting-Anbieter mit kompletter Integration des Webseiten-Moduls bereitgestellt wird. Eine Liste mit Dolibarr Hosting-Anbietern ist hier abufbar <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Kontrolliere dass auch der Virtuelle Host die <strong>%s</strong> Berechtigung für die die Dateien in <br><strong>%s</strong> hat +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Lesen WritePerm=Schreiben TestDeployOnWeb=Test/Bereitstellung im Web PreviewSiteServedByWebServer=Die <u>Vorschau %s in einem neuen Tab</u><br><br>%s wird durch einen externen Webserver (Wie Apache, Nginx, IIS) ausgeliefert. Dieser Server muss installiert und eingerichtet sein, bevor Sie den Verzeichnis <br><strong>%s</strong> anzeigen können.<br> URL, die von dem externen Server bereitgestellt wird: <br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Vorschau %sin neuem Tab. <br><br>%s wird durch den Dolibarr Server so bereit gestellt, dass kein zusätzlicher Webserver (Wie Apache, Nginx, IIS) notwendig ist. <br>Dadurch erhalten die Seiten URL's, die nicht Benutzerfreundlich sind und der Pfad beginnt mit ihrer Dolibarr Installation.<br> Durch Dolibarr bereit gestellte URL: <br><strong>%s</strong><br><br>Um Ihren eigenen externen Webserver für diese Website zu verwenden, erstellen Sie einen virtuellen Host auf Ihrem Webserver, der auf das Verzeichnis <br><strong>%s</strong>zeigt<br>. Vorschau durch Klick auf den anderen Vorschaubutton. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=Die URL des virtuellen Hosts, der von einem externen Webserver bereit gestellt wird, ist nicht definiert NoPageYet=Noch keine Seiten YouCanCreatePageOrImportTemplate=Sie können eine neue Seite erstellen oder eine komplette Website-Vorlage importieren @@ -137,3 +137,11 @@ PagesRegenerated=%s Seite(n) / Container neu generiert RegenerateWebsiteContent=Generieren Sie Website-Cache-Dateien neu AllowedInFrames=In Frames erlaubt DefineListOfAltLanguagesInWebsiteProperties=Definiere eine Liste aller verfügbaren Sprachen in den Website-Eigenschaften. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap generiert +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/de_DE/withdrawals.lang b/htdocs/langs/de_DE/withdrawals.lang index b434b778de4..7f88571f6aa 100644 --- a/htdocs/langs/de_DE/withdrawals.lang +++ b/htdocs/langs/de_DE/withdrawals.lang @@ -45,6 +45,7 @@ WithdrawRequestsDone=%s Lastschrift-Zahlungsaufforderungen aufgezeichnet BankTransferRequestsDone=%s Überweisungsanforderungen aufgezeichnet 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 <strong>%s</strong>. +WithdrawalCantBeCreditedTwice=Dieser Widerrufsbeleg ist bereits als gutgeschrieben markiert; Dies kann nicht zweimal durchgeführt werden, da dies möglicherweise zu doppelten Zahlungen und Bankeinträgen führen würde. ClassCredited=Als eingegangen markieren ClassCreditedConfirm=Möchten Sie diesen Abbuchungsbeleg wirklich als auf Ihrem Konto eingegangen markieren? TransData=Überweisungsdatum @@ -149,4 +150,4 @@ InfoRejectMessage=Hallo,<br><br> der Lastschrift-Zahlungsauftrag der Rechnung %s ModeWarning=Echtzeit-Modus wurde nicht aktiviert, wir stoppen nach der Simulation. ErrorCompanyHasDuplicateDefaultBAN=Unternehmen mit der ID %s hat mehr als ein Standardbankkonto. Keine Möglichkeit zu wissen, welches man verwenden soll. ErrorICSmissing=Fehlendes ICS auf dem Bankkonto %s -TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Der Gesamtbetrag des Lastschriftauftrags unterscheidet sich von der Summe der Zeilen diff --git a/htdocs/langs/de_DE/workflow.lang b/htdocs/langs/de_DE/workflow.lang index 255f578fa39..33051a242ed 100644 --- a/htdocs/langs/de_DE/workflow.lang +++ b/htdocs/langs/de_DE/workflow.lang @@ -22,4 +22,4 @@ descWORKFLOW_TICKET_CLOSE_INTERVENTION=Schließen Sie alle mit dem Ticket verkn AutomaticCreation=automatische Erstellung AutomaticClassification=Automatische Klassifikation # Autoclassify shipment -descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Klassifizieren Sie die verknüpfte Quellensendung als geschlossen, wenn die Kundenrechnung validiert ist. diff --git a/htdocs/langs/de_DE/zapier.lang b/htdocs/langs/de_DE/zapier.lang index 1051734af8b..708a80255dd 100644 --- a/htdocs/langs/de_DE/zapier.lang +++ b/htdocs/langs/de_DE/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier für Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Modul: Zapier für Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Zapier für Dolibarr einrichten +ZapierForDolibarrSetup=Zapier für Dolibarr einrichten ZapierDescription=Schnittstelle mit Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/el_CY/admin.lang b/htdocs/langs/el_CY/admin.lang index 74ee870f906..c5a529c1701 100644 --- a/htdocs/langs/el_CY/admin.lang +++ b/htdocs/langs/el_CY/admin.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - admin +ShowBugTrackLink=Show link "<strong>%s</strong>" 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/el_CY/modulebuilder.lang b/htdocs/langs/el_CY/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/el_CY/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/el_GR/accountancy.lang b/htdocs/langs/el_GR/accountancy.lang index a3cd1adf61e..20c087472ee 100644 --- a/htdocs/langs/el_GR/accountancy.lang +++ b/htdocs/langs/el_GR/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Δεσμευμένες γραμμές τιμολογίων ExpenseReportLines=Γραμμές εκθέσεων δαπανών που δεσμεύουν ExpenseReportLinesDone=Δεσμευμένες αναφορές δαπανών IntoAccount=Συνδέστε τη γραμμή με τον λογαριασμό λογιστικής -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Δένω @@ -209,7 +209,7 @@ Codejournal=Ημερολόγιο JournalLabel=Ετικέτα περιοδικών NumPiece=Αριθμός τεμαχίου TransactionNumShort=Αριθ. συναλλαγή -AccountingCategory=Προσωποποιημένες ομάδες +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Μπορείτε να ορίσετε εδώ ορισμένες ομάδες λογιστικού λογαριασμού. Θα χρησιμοποιηθούν για εξατομικευμένες λογιστικές εκθέσεις. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Οι γραμμές που δεν έχουν ακόμ ## Import ImportAccountingEntries=Λογιστικές εγγραφές +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Ημερομηνία εξαγωγής WarningReportNotReliable=Προειδοποίηση, αυτή η αναφορά δεν βασίζεται στον Καθολικό, επομένως δεν περιέχει συναλλαγή που τροποποιείται χειροκίνητα στο Ledger. Εάν η περιοδική σας έκδοση είναι ενημερωμένη, η προβολή της λογιστικής είναι πιο ακριβής. ExpenseReportJournal=Ενημερωτικό Δελτίο Έκθεσης InventoryJournal=Απογραφή Αποθέματος + +NAccounts=%s accounts diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 32f57690ea4..1dcc70267fa 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Κατάργηση κλειδώματος σύνδεσης YourSession=Η σύνοδος σας Sessions=Συνεδρίες χρηστών WebUserGroup=Χειριστής/Ομάδα Διακομιστή Web +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Η διαμόρφωση της PHP σας φαίνεται να μην επιτρέπει την καταχώρηση των ενεργοποιημένων συνδεγριών. Ο κατάλογος που χρησιμοποιείται για την αποθήκευση των περιόδων σύνδεσης (<b>%s</b>) μπορεί να προστατεύεται (για παράδειγμα, από τα δικαιώματα των λειτουργικών συστημάτων ή από την οδηγία PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Σημείωση: ναι, είναι αποτελεσματικ RemoveLock=Αφαιρέστε/μετονομάστε το αρχείο <b>%s</b>, αν υπάρχει, για να επιτραπεί η χρήση του εργαλείου ενημέρωσης/εγκατάστασης. RestoreLock=Επαναφέρετε το αρχείο <b>%s</b>, με δικαίωμα ανάγνωσης μόνο, για να απενεργοποιηθεί οποιαδήποτε χρήση του εργαλείου ενημέρωσης/εγκατάστασης. SecuritySetup=Διαχείριση Ασφάλειας +PHPSetup=PHP setup SecurityFilesDesc=Καθορίστε εδώ τις επιλογές που σχετίζονται με την ασφάλεια σχετικά με τη μεταφόρτωση αρχείων. ErrorModuleRequirePHPVersion=Λάθος, αυτή η ενότητα απαιτεί έκδοση PHP %s ή μεγαλύτερη ErrorModuleRequireDolibarrVersion=Λάθος, αυτό το module απαιτεί Dolibarr έκδοση %s ή μεγαλύτερη @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Αυτή η περιοχή παρέχει λειτουργί Purge=Εκκαθάριση PurgeAreaDesc=Αυτή η σελίδα σας επιτρέπει να διαγράψετε όλα τα αρχεία που κατασκευάζονται ή αποθηκεύονται από την Dolibarr (προσωρινά αρχεία ή όλα τα αρχεία σε <b>%s </ b> directory). Η χρήση αυτής της λειτουργίας δεν είναι απαραίτητη. Παρέχεται για χρήστες των οποίων η Dolibarr φιλοξενείται από πάροχο, που δεν προσφέρει δικαίωμα διαγραφής αρχείων που κατασκευάστηκαν από τον web server. PurgeDeleteLogFile=Διαγράψτε τα αρχεία καταγραφής, συμπεριλαμβανομένων<b>%s</b> που είναι ορισμένα για τη χρήση της μονάδας Syslog (χωρίς κίνδυνο απώλειας δεδομένων) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Διαγράψτε όλα τα αρχεία στον κατάλογο: <b>%s</b> . <br> Αυτό θα διαγράψει όλα τα παραγόμενα έγγραφα που σχετίζονται με στοιχεία (τρίτα μέρη, τιμολόγια κ.λπ.), αρχεία που έχουν φορτωθεί στη μονάδα ECM, αρχεία από αντίγραφα ασφαλείας βάσεων δεδομένων και προσωρινά αρχεία. PurgeRunNow=Διαγραφή τώρα @@ -232,6 +234,7 @@ BoxesAvailable=Διαθέσιμα Widgets BoxesActivated=Ενεργοποιημένα Widgets ActivateOn=Ενεργοποιήστε στις ActiveOn=Ενεργοποιήθηκε στις +ActivatableOn=Activatable on SourceFile=Πηγαίο αρχείο AvailableOnlyIfJavascriptAndAjaxNotDisabled=Διαθέσιμο μόνο αν το JavaScript δεν είναι απενεργοποιημένο Required=Υποχρεωτικό @@ -347,9 +350,10 @@ LastActivationAuthor=Τελευταίος συντάκτης ενεργοποί LastActivationIP=Τελευταία IP ενεργοποίησης UpdateServerOffline=Ο διακομιστής ενημερώσεων είναι εκτός σύνδεσης WithCounter=Διαχειριστείτε έναν μετρητή -GenericMaskCodes=Μπορείτε να χρησιμοποιήσετε οποιαδήποτε μάσκα αρίθμησης. Σε αυτή τη μάσκα μπορούν να χρησιμοποιηθούν τις παρακάτω ετικέτες:<br>Το <b>{000000}</b> αντιστοιχεί σε έναν αριθμό που θα αυξάνεται σε κάθε %s. Εισάγετε όσα μηδέν επιθυμείτε ως το επιθυμητό μέγεθος για τον μετρητή. Ο μετρητής θα συμπληρωθεί με μηδενικά από τα αριστερά για να έχει όσα μηδενικά υπάρχουν στην μάσκα. <br>Η μάσκα <b>{000000+000}</b> είναι η ίδια όπως προηγουμένως αλλά ένα αντιστάθμισμα που αντιστοιχεί στον αριθμό στα δεξιά του + θα προστεθεί αρχίζοντας από το πρώτο %s. <br>Η μάσκα <b>{000000@x}</b> είναι η ίδια όπως προηγουμένως αλλά ο μετρητής επανέρχεται στο μηδέν όταν έρθει ο μήνας x (το x είναι μεταξύ του 1 και του 12). Αν αυτή η επιλογή χρησιμοποιηθεί και το x είναι 2 ή μεγαλύτερο, τότε η ακολουθία {yy}{mm} ή {yyyy}{mm} είναι επίσης απαιραίτητη. <br>Η μάσκα <b>{dd}</b> ημέρα (01 έως 31).<br><b>{mm}</b> μήνας (01 έως 12).<br><b>{yy}</b>, <b>{yyyy}</b> ή <b>{y}</b> έτος με χρήση 2, 4 ή 1 αριθμού. <br> -GenericMaskCodes2=<b>{cccc}</b> τον κωδικό πελάτη σε n χαρακτήρες <br> <b>{cccc000}</b> ο κωδικός πελάτη σε n χαρακτήρες ακολουθείται από έναν μετρητή που προορίζεται για τον πελάτη. Αυτός ο μετρητής αφιερωμένος στον πελάτη επαναφέρεται ταυτόχρονα με τον παγκόσμιο μετρητή. <br> <b>{tttt}</b> Ο κωδικός του τύπου τρίτου μέρους σε χαρακτήρες n (δείτε το μενού Αρχική σελίδα - Ρύθμιση - Λεξικό - Τύποι τρίτων). Εάν προσθέσετε αυτήν την ετικέτα, ο μετρητής θα είναι διαφορετικός για κάθε τύπο τρίτου μέρους. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Όλοι οι άλλοι χαρακτήρες στην μάσκα θα παραμείνουν ίδιοι.<br>Κενά διαστήματα δεν επιτρέπονται.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Παράδειγμα για το 99ο %s του τρίτου μέρους TheCompany, με ημερομηνία 2007-01-31:</u> <br> GenericMaskCodes4b=<u>Το παράδειγμα του τρίτου μέρους δημιουργήθηκε στις 2007-03-01:</u><br> GenericMaskCodes4c=<u>Παράδειγμα το προϊόν δημιουργήθηκε στις 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Αφήνοντας αυτό το πεδίο κενό ExtrafieldParamHelpselect=Ο κατάλογος τιμών πρέπει να είναι γραμμές με κλειδί μορφής, τιμή (όπου το κλειδί δεν μπορεί να είναι &#39;0&#39;) <br><br> για παράδειγμα: <br> 1, τιμή1 <br> 2, τιμή2 <br> code3, value3 <br> ... <br><br> Προκειμένου ο κατάλογος να εξαρτάται από μια άλλη λίστα συμπληρωματικών χαρακτηριστικών: <br> 1, τιμή1 | επιλογές_επαφ <i>._ορισμός_κώδικα</i> : γονικό_κλειδί <br> 2, value2 | options_ <i>parent_list_code:</i> parent_key <br><br> Προκειμένου να υπάρχει η λίστα ανάλογα με μια άλλη λίστα: <br> 1, τιμή1 | <i>parent_list_code</i> : parent_key <br> 2, value2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=Ο κατάλογος τιμών πρέπει να είναι γραμμές με κλειδί μορφής, τιμή (όπου το κλειδί δεν μπορεί να είναι &#39;0&#39;) <br><br> για παράδειγμα: <br> 1, τιμή1 <br> 2, τιμή2 <br> 3, value3 <br> ... ExtrafieldParamHelpradio=Ο κατάλογος τιμών πρέπει να είναι γραμμές με κλειδί μορφής, τιμή (όπου το κλειδί δεν μπορεί να είναι &#39;0&#39;) <br><br> για παράδειγμα: <br> 1, τιμή1 <br> 2, τιμή2 <br> 3, value3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Ο κατάλογος των τιμών προέρχεται από έναν πίνακα <br> Σύνταξη: table_name: label_field: id_field :: filter <br> Παράδειγμα: c_typent: libelle: id :: φίλτρο <br><br> το φίλτρο μπορεί να είναι μια απλή δοκιμή (π.χ. ενεργή = 1) για να εμφανίζει μόνο την ενεργή τιμή <br> Μπορείτε επίσης να χρησιμοποιήσετε το $ ID $ στο φίλτρο που είναι το τρέχον id του τρέχοντος αντικειμένου <br> Για να κάνετε ένα SELECT στο φίλτρο, χρησιμοποιήστε το $ SEL $ <br> αν θέλετε να φιλτράρετε σε extrafields χρησιμοποιήστε syntax extra.fieldcode = ... (όπου ο κωδικός πεδίου είναι ο κωδικός του extrafield) <br><br> Προκειμένου ο κατάλογος να εξαρτάται από μια άλλη λίστα συμπληρωματικών χαρακτηριστικών: <br> c_typent: libelle: id: options_ <i>parent_list_code</i> | parent_column: φίλτρο <br><br> Προκειμένου να υπάρχει η λίστα ανάλογα με μια άλλη λίστα: <br> c_typent: libelle: id: <i>parent_list_code</i> | parent_column: φίλτρο +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Κρατήστε κενό για έναν απλό διαχωριστή <br> Ρυθμίστε το σε 1 για έναν διαχωριστή που αναδιπλώνεται (ανοίγει από προεπιλογή για νέα σύνοδο και στη συνέχεια διατηρείται η κατάσταση για κάθε περίοδο λειτουργίας χρήστη) <br> Ρυθμίστε αυτό σε 2 για ένα πτυσσόμενο διαχωριστικό (συρρικνώνεται από προεπιλογή για νέα συνεδρία, τότε η κατάσταση διατηρείται για κάθε συνεδρία χρήστη) LibraryToBuildPDF=Βιβλιοθήκη δημιουργίας PDF @@ -541,6 +545,8 @@ Module40Name=Προμηθευτές Module40Desc=Προμηθευτές και διαχείριση αγοράς (εντολές αγοράς και τιμολογίων προμηθευτών) Module42Name=Αρχεία καταγραφής εντοπισμού σφαλμάτων Module42Desc=Εγκαταστάσεις καταγραφής (αρχείο, syslog, ...). Αυτά τα αρχεία καταγραφής είναι για τεχνικούς / εντοπισμό σφαλμάτων. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Επεξεργαστές κειμένου Module49Desc=Διαχείριση επεξεργαστών κειμένου Module50Name=Προϊόντα @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Μη αναστρέψιμα αρχεία Module3200Desc=Ενεργοποιήστε ένα αναλλοίωτο αρχείο επιχειρηματικών εκδηλώσεων. Τα γεγονότα αρχειοθετούνται σε πραγματικό χρόνο. Το αρχείο καταγραφής είναι ένας πίνακας μόνο για ανάγνωση των αλυσιδωτών γεγονότων που μπορούν να εξαχθούν. Αυτή η ενότητα μπορεί να είναι υποχρεωτική για ορισμένες χώρες. +Module3400Name=Κοινωνικά Δίκτυα +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Διαχείριση ανθρώπινων πόρων (διαχείριση τμήματος, συμβάσεις εργαζομένων και συναισθήματα) Module5000Name=Multi-company Module5000Desc=Σας επιτρέπει να διαχειριστήτε πολλές εταιρείες -Module6000Name=Ροή εργασίας -Module6000Desc=Διαχείριση ροής εργασίας (αυτόματη δημιουργία αντικειμένου ή / και αυτόματη αλλαγή κατάστασης) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Ιστοσελίδες Module10000Desc=Δημιουργείστε ιστότοπους (δημόσιους) με έναν κειμενογράφο WYSIWYG. Πρόκειται για ένα CMS για webmaster ή προγραμματιστές (είναι καλύτερο να γνωρίζετε τη γλώσσα HTML και CSS). Απλά ρυθμίστε τον διακομιστή ιστού σας (Apache, Nginx, ...) να δείχνει κατάλογο που είναι εγκατεστημένο το Dolibarr για να το έχετε online στο διαδίκτυο με το δικό σας όνομα τομέα. Module20000Name=Αφήστε τη Διαχείριση Αίτησης @@ -805,7 +813,8 @@ PermissionAdvanced253=Δημιουργία / τροποποίηση εσωτερ Permission254=Δημιουργία / τροποποίηση μόνο εξωτερικών χρηστών Permission255=Τροποποιήστε τον κωδικό άλλων χρηστών Permission256=Διαγράψτε ή απενεργοποιήστε άλλους χρήστες -Permission262=Επέκταση της πρόσβασης σε όλους τους τρίτους (όχι μόνο τρίτα μέρη για τα οποία ο εν λόγω χρήστης είναι εκπρόσωπος πωλήσεων). <br> Δεν είναι αποτελεσματικό για τους εξωτερικούς χρήστες (που πάντα περιορίζονται στον εαυτό τους για προτάσεις, παραγγελίες, τιμολόγια, συμβάσεις κ.λπ.). <br> Δεν είναι αποτελεσματικό για τα έργα (μόνο κανόνες σχετικά με τα δικαιώματα των έργων, την προβολή και την ανάθεση εργασιών). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Διαβάστε τιμολόγια Permission273=Έκδοση τιμολογίων @@ -1175,7 +1184,8 @@ SetupDescription2=Οι ακόλουθες δύο ενότητες είναι υ SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Βασικές παράμετροι που χρησιμοποιούνται για την προσαρμογή της προεπιλεγμένης συμπεριφοράς της εφαρμογής σας (π.χ. για λειτουργίες που σχετίζονται με τη χώρα). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Αυτό το λογισμικό είναι μια σειρά από πολλές ενότητες / εφαρμογές. Οι ενότητες που σχετίζονται με τις ανάγκες σας πρέπει να ενεργοποιηθούν και να διαμορφωθούν. Οι καταχωρήσεις μενού θα εμφανιστούν με την ενεργοποίηση αυτών των ενοτήτων. SetupDescription5=Άλλες καταχωρίσεις μενού ρυθμίσεων διαχειρίζονται προαιρετικές παραμέτρ -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Ιστορικό εισόδου χρηστών InfoDolibarr=Πληροφορίες Dolibarr InfoBrowser=Πληροφορίες Φυλλομετρητή @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Η εκτέλεση της διαδικασί YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Επιστρέφει τον αριθμό αναφοράς με τη μορφή %syymm-nnnn όπου yy είναι year, mm είναι month και nnnn είναι διαδοχική χωρίς επαναφορά +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Εμφάνιση επαγγελματικής ταυτότητας με διευθύνσεις ShowVATIntaInAddress=Απόκρυψη ενδοκοινοτικού αριθμού ΦΠΑ με διευθύνσεις TranslationUncomplete=Ημιτελής μεταγλώττιση @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Διακομιστής μεσολάβησης: Όνομα / Δι MAIN_PROXY_PORT=Διακομιστής μεσολάβησης: Θύρα MAIN_PROXY_USER=Διακομιστής μεσολάβησης: Σύνδεση / Χρήστης MAIN_PROXY_PASS=Διακομιστής μεσολάβησης: Κωδικός πρόσβασης -DefineHereComplementaryAttributes=Καθορίστε εδώ οποιαδήποτε πρόσθετα / προσαρμοσμένα χαρακτηριστικά που θέλετε να συμπεριληφθούν για: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Συμπληρωματικά χαρακτηριστικά ExtraFieldsLines=Συμπληρωματικά χαρακτηριστικά (σειρές) ExtraFieldsLinesRec=Συμπληρωματικά χαρακτηριστικά (γραμμές τιμολογίων προτύπων) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Παράδειγμα: uid LDAPFilterConnection=Φίλτρο αναζήτησης LDAPFilterConnectionExample=Παράδειγμα: &amp; (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Παράδειγμα: samaccountname LDAPFieldFullname=Πλήρες όνομα @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Η εταιρεία σας έχει οριστεί να AccountancyCode=Λογιστικός κώδικας AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Κλειδί για την έγκριση σύνδεσης εξαγωγής +SecurityKey = Security Key PastDelayVCalExport=Μην εξάγετε συμβάν παλαιότερο από AGENDA_USE_EVENT_TYPE=Χρήση τύπων συμβάντων (διαχειρίζεται το μενού Ρύθμιση -&gt; Λεξικά -&gt; Τύπος συμβάντων ημερήσιας διάταξης) AGENDA_USE_EVENT_TYPE_DEFAULT=Αυτόματη ρύθμιση αυτής της προεπιλεγμένης τιμής για τον τύπο συμβάντος στη φόρμα δημιουργίας συμβάντος @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Χρώμα φόντου για τις περιττέ BackgroundTableLineEvenColor=Χρώμα φόντου για τις άρτιες (ζυγές) γραμμές του πίνακα MinimumNoticePeriod=Ελάχιστη περίοδος προειδοποίησης (Η αίτησή σας πρέπει να γίνει πριν από αυτή την καθυστέρηση) NbAddedAutomatically=Αριθμός ημερών που προστίθενται στους μετρητές χρηστών (αυτόματα) κάθε μήνα -EnterAnyCode=Αυτό το πεδίο περιέχει μια αναφορά για την αναγνώριση της γραμμής. Καταχωρίστε οποιαδήποτε τιμή της επιλογής σας, αλλά χωρίς ειδικούς χαρακτήρες. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. Enter0or1=Εισαγάγετε 0 ή 1 UnicodeCurrency=Εισαγάγετε εδώ μεταξύ τιράντες, λίστα αριθμού byte που αντιπροσωπεύει το σύμβολο νομίσματος. Για παράδειγμα: για το $, πληκτρολογήστε [36] - για την Βραζιλία, το πραγματικό R $ [82,36] - για €, πληκτρολογήστε [8364] ColorFormat=Το χρώμα RGB είναι σε μορφή HEX, π.χ.: FF0000 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Κάτω περιθώριο σε PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Δεν απαιτείται συγκεκριμένη ρύθμιση για αυτήν την ενότητα. SetToYesIfGroupIsComputationOfOtherGroups=Ορίστε αυτό το ναι αν αυτή η ομάδα είναι ένας υπολογισμός άλλων ομάδων -EnterCalculationRuleIfPreviousFieldIsYes=Εισαγάγετε τον κανόνα υπολογισμού εάν το προηγούμενο πεδίο είχε οριστεί σε Ναι (για παράδειγμα &#39;CODEGRP1 + CODEGRP2&#39;) +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Πολλές γλωσσικές παραλλαγές βρέθηκαν RemoveSpecialChars=Καταργήστε τους ειδικούς χαρακτήρες COMPANY_AQUARIUM_CLEAN_REGEX=Φίλτρο Regex για καθαρισμό τιμής (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Ρύθμιση της ενότητας Κοινωνικά δ EnableFeatureFor=Ενεργοποίηση χαρακτηριστικών για <strong>%s</strong> VATIsUsedIsOff=Σημείωση: Η επιλογή χρήσης Φόρου Πωλήσεων ή ΦΠΑ έχει οριστεί σε <strong>Off (Απενεργοποίηση)</strong> στο μενού %s - %s, οπότε ο φόρος πωλήσεων ή ο Vat που θα χρησιμοποιηθούν θα είναι πάντα 0 για τις πωλήσεις. SwapSenderAndRecipientOnPDF=Αντικαταστήστε τη θέση διευθύνσεων αποστολέα και παραλήπτη σε έγγραφα PDF -FeatureSupportedOnTextFieldsOnly=Προειδοποίηση, χαρακτηριστικό που υποστηρίζεται μόνο σε πεδία κειμένου. Επίσης, πρέπει να οριστεί μια παράμετρος URL action = create or action = edit Ή το όνομα της σελίδας πρέπει να τερματίζεται με &#39;new.php&#39; για να ενεργοποιήσει αυτή τη λειτουργία. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Συλλέκτης ηλεκτρονικού ταχυδρομείου EmailCollectorDescription=Προσθέστε μια προγραμματισμένη εργασία και μια σελίδα ρύθμισης για να σαρώσετε τακτικά παράθυρα email (χρησιμοποιώντας το πρωτόκολλο IMAP) και να καταγράψετε τα μηνύματα που έχετε λάβει στην αίτησή σας, στο σωστό μέρος ή / και να δημιουργήσετε αυτόματα τις εγγραφές (όπως οι οδηγοί). NewEmailCollector=Νέος συλλέκτης ηλεκτρονικού ταχυδρομείου @@ -2049,8 +2062,11 @@ UseDebugBar=Χρησιμοποιήστε τη γραμμή εντοπισμού DEBUGBAR_LOGS_LINES_NUMBER=Αριθμός τελευταίων γραμμών καταγραφής που διατηρούνται στην κονσόλα WarningValueHigherSlowsDramaticalyOutput=Προειδοποίηση, οι υψηλότερες τιμές επιβραδύνουν την δραματική παραγωγή ModuleActivated=Η ενότητα %s ενεργοποιείται και επιβραδύνει τη διεπαφή +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Τα μοντέλα εξαγωγής είναι κοινά με όλους ExportSetup=Ρύθμιση εξαγωγής της ενότητας ImportSetup=Ρύθμιση εισαγωγής λειτουργικής μονάδας @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Δημιουργήστε ένα ανώνυμο Ping &#39;+1&#3 FeatureNotAvailableWithReceptionModule=Η λειτουργία δεν είναι διαθέσιμη όταν είναι ενεργοποιημένη η λειτουργία Υποδοχή EmailTemplate=Πρότυπο email EMailsWillHaveMessageID=Τα μηνύματα ηλεκτρονικού ταχυδρομείου θα έχουν μια ετικέτα "Αναφορές" που ταιριάζουν με αυτή τη σύνταξη +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Εάν θέλετε να αντιγράψετε ορισμένα κείμενα στο PDF σας σε 2 διαφορετικές γλώσσες στο ίδιο δημιουργημένο PDF, πρέπει να ορίσετε εδώ αυτήν τη δεύτερη γλώσσα, ώστε το παραγόμενο PDF να περιέχει 2 διαφορετικές γλώσσες στην ίδια σελίδα, αυτή που επιλέγεται κατά τη δημιουργία PDF και αυτή ( μόνο λίγα πρότυπα PDF το υποστηρίζουν αυτό). Κρατήστε κενό για 1 γλώσσα ανά PDF. FafaIconSocialNetworksDesc=Εισαγάγετε εδώ τον κωδικό ενός εικονιδίου FontAwesome. Εάν δεν γνωρίζετε τι είναι το FontAwesome, μπορείτε να χρησιμοποιήσετε τη γενική τιμή fa-address-book. FeatureNotAvailableWithReceptionModule=Η λειτουργία δεν είναι διαθέσιμη όταν είναι ενεργοποιημένη η λειτουργία Υποδοχή @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/el_GR/banks.lang b/htdocs/langs/el_GR/banks.lang index 5fc0cb30463..083d6c75e3c 100644 --- a/htdocs/langs/el_GR/banks.lang +++ b/htdocs/langs/el_GR/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Οι εντολές άμεσης χρέωσης σας. FindYourSEPAMandate=Αυτή είναι η εντολή ΕΧΠΕ για να εξουσιοδοτήσετε την εταιρεία μας να κάνει άμεση εντολή χρέωσης στην τράπεζά σας. Επιστρέψτε το υπογεγραμμένο (σάρωση του υπογεγραμμένου εγγράφου) ή στείλτε το ταχυδρομικώς η με mail AutoReportLastAccountStatement=Συμπληρώστε αυτόματα το πεδίο ' αριθμός τραπεζικού λογαριασμού ' με τον τελευταίο αριθμό τραπεζικής δήλωσης όταν κάνετε τη συμφωνία. CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Χρωματισμός κινήσεων BankColorizeMovementDesc=Εάν αυτή η λειτουργία είναι ενεργή, μπορείτε να επιλέξετε συγκεκριμένο χρώμα φόντου για χρεωστικές ή πιστωτικές κινήσεις BankColorizeMovementName1=Χρώμα φόντου για την κίνηση χρέωσης BankColorizeMovementName2=Χρώμα φόντου για την πιστωτική κίνηση IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/el_GR/bills.lang b/htdocs/langs/el_GR/bills.lang index a9afd56b2d6..c65c89b3990 100644 --- a/htdocs/langs/el_GR/bills.lang +++ b/htdocs/langs/el_GR/bills.lang @@ -52,11 +52,12 @@ Invoices=Τιμολόγια InvoiceLine=Γραμμή Τιμολογίου InvoiceCustomer=Τιμολόγιο Πελάτη CustomerInvoice=Τιμολόγιο Πελάτη -CustomersInvoices=Τιμολόγια Πελάτη +CustomersInvoices=Τιμολόγια πελατών SupplierInvoice=Τιμολόγιο προμηθευτή -SuppliersInvoices=Τιμολόγια προμηθευτών +SuppliersInvoices=Τιμολόγια προμηθευτή +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Τιμολόγιο προμηθευτή -SupplierBills=Τιμολόγια Προμηθευτή +SupplierBills=Τιμολόγια προμηθευτή Payment=Πληρωμή PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Ιστορικό Πληρωμών PaymentsBackAlreadyDone=Οι επιστροφές χρημάτων έχουν γίνει ήδη PaymentRule=Κανόνας Πληρωμής PaymentMode=Τρόπος πληρωμής +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Χρεωστική/Πιστωτική κάρτα PaymentTypePP=PayPal IdPaymentMode=Τύπος πληρωμής (id) @@ -373,6 +376,7 @@ DateLastGeneration=Ημερομηνία τελευταίας δημιουργί DateLastGenerationShort=Ημερομηνία τελευταίας γεν. MaxPeriodNumber=Μέγιστη. αριθμός δημιουργίας τιμολογίου NbOfGenerationDone=Αριθμός γεννήσεων τιμολογίων που έχουν ήδη γίνει +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Αριθμός γενεάς που έγινε MaxGenerationReached=Ο μέγιστος αριθμός γενεών έφτασε InvoiceAutoValidate=Αυτόματη επικύρωση τιμολογίων @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Σταθερό ποσό - 1 γραμμή με την ετικέτα '%s' VarAmount=Μεταβλητή ποσού (%% tot.) VarAmountOneLine=Μεταβλητή ποσότητα (%% tot.) - 1 γραμμή με την ετικέτα &#39;%s&#39; -VarAmountAllLines=Μεταβλητή ποσότητα (%% συν.) - όλες οι ίδιες γραμμές +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Τραπεζική μεταφορά PaymentTypeShortVIR=Τραπεζική μεταφορά @@ -494,12 +498,16 @@ Cash=Μετρητά Reported=Με καθυστέρηση DisabledBecausePayments=Δεν είναι δυνατόν, δεδομένου ότι υπάρχουν ορισμένες πληρωμές CantRemovePaymentWithOneInvoicePaid=Δεν μπορείτε να καταργήσετε τη πληρωμή, δεδομένου ότι υπάρχει τουλάχιστον ένα τιμολόγιο που έχει χαρακτηριστεί σαν πληρωμένο +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Αναμενόμενη Πληρωμή CantRemoveConciliatedPayment=Δεν είναι δυνατή η κατάργηση της κοινής πληρωμής PayedByThisPayment=Πληρωθείτε αυτό το ποσό ClosePaidInvoicesAutomatically=Ταξινόμηση αυτόματα όλα τα τυποποιημένα, προκαθορισμένα ή αντικαταστατικά τιμολόγια ως &quot;Πληρωμένα&quot; όταν η πληρωμή γίνει εξ ολοκλήρου. ClosePaidCreditNotesAutomatically=Ταξινόμηση αυτόματα όλες τις πιστωτικές σημειώσεις ως &quot;Πληρωθεί&quot; όταν η επιστροφή γίνεται εξ ολοκλήρου. ClosePaidContributionsAutomatically=Ταξινόμηση αυτόματα όλες τις κοινωνικές ή φορολογικές εισφορές ως &quot;Πληρωθεί&quot; όταν η πληρωμή γίνει εξ ολοκλήρου. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Όλα τα τιμολόγια που δεν πληρώνουν υπόλοιπο θα κλείσουν αυτόματα με την κατάσταση &quot;Πληρωμή&quot;. ToMakePayment=Πληρωμή ToMakePaymentBack=Pay back @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Πρότυπο τιμολόγιο PDF Crabe. Ένα πλήρες πρότυπο τιμολογίου (παλιά εφαρμογή του προτύπου Sponge) PDFSpongeDescription=Τιμολόγιο πρότυπο PDF Σφουγγάρι. Ένα πλήρες πρότυπο τιμολογίου PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Επιστρέψετε αριθμό με μορφή %syymm-nnnn για τυπικά τιμολόγια και %syymm-nnnn για πιστωτικά τιμολόγια όπου yy είναι το έτος, mm είναι ο μήνας και nnnn είναι μια ακολουθία αρίθμησης χωρίς διάλειμμα και χωρίς επιστροφή στο 0 -MarsNumRefModelDesc1=Επιστρέφει αριθμό με μορφή %syymm-nnnn για τυπικά τιμολόγια, %syymm-nnnn για τα τιμολόγια αντικατάστασης, %syymm-nnnn για τα τιμολόγια των καταθέσεων και %syymm-nnnn για πιστωτικά σημειώματα όπου yy είναι το έτος, mm είναι μήνας και nnnn είναι μια ακολουθία χωρίς διακοπή και χωρίς επιστροφή σε 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposit invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Πρώιμος λόγος κλεισίματος EarlyClosingComment=Πρώιμο σημείωμα κλεισίματος ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Επαφή υπηρεσιών πρ InvoiceFirstSituationAsk=Κατάσταση πρώτου τιμολογίου InvoiceFirstSituationDesc=Η <b>κατάσταση τιμολογίων</b> συνδέονται με καταστάσεις που σχετίζονται σε πρόοδο, για παράδειγμα, της προόδου μιας κατασκευής. Κάθε κατάσταση είναι συνδεδεμένη με ένα τιμολόγιο. InvoiceSituation=Κατάσταση τιμολογίου +PDFInvoiceSituation=Κατάσταση τιμολογίου InvoiceSituationAsk=Τιμολόγιο που έπεται της κατάστασης InvoiceSituationDesc=Δημιουργία μιας νέας κατάστασης μετά από μια ήδη υπάρχουσα SituationAmount=Κατάσταση τιμολογίου ποσό (καθαρό) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Αν χρειαστεί να δημιουργ DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Κατάσταση δημιουργίας εγγράφων DoNotGenerateDoc=Μην δημιουργείτε αρχείο εγγράφων AutogenerateDoc=Αυτόματη δημιουργία αρχείου εγγράφου @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Το τιμολόγιο προμηθευτή δι UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/el_GR/boxes.lang b/htdocs/langs/el_GR/boxes.lang index 40e21765069..4f0e98e4b5e 100644 --- a/htdocs/langs/el_GR/boxes.lang +++ b/htdocs/langs/el_GR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=πληροφορίες σύνδεσης BoxLastRssInfos=Πληροφορίες RSS BoxLastProducts=Τελευταία %s Προϊόντα / Υπηρεσίες @@ -17,9 +18,13 @@ BoxLastActions=Τελευταίες ενέργειες BoxLastContracts=Τελευταία συμβόλαια BoxLastContacts=Τελευταίες επαφές/διευθύνσεις BoxLastMembers=Τελευταία μέλη +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Τελευταίες παρεμβάσεις BoxCurrentAccounts=Άνοιξε το ισοζύγιο των λογαριασμών BoxTitleMemberNextBirthdays=Γενέθλια αυτού του μήνα (μέλη) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Τα %s πιο πρόσφατα νέα από %s BoxTitleLastProducts=Προϊόντα / Υπηρεσίες: τελευταία τροποποίηση %s BoxTitleProductsAlertStock=Προϊόντα: προειδοποίηση αποθέματος @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Τελευταίες %s αποστολές πελ NoRecordedShipments=Καμία καταγεγραμμένη αποστολή πελάτη BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Λογιστική +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/el_GR/categories.lang b/htdocs/langs/el_GR/categories.lang index 02ad08d26d6..68d647b9361 100644 --- a/htdocs/langs/el_GR/categories.lang +++ b/htdocs/langs/el_GR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Περιοχές ετικετών / κατηγοριών CustomersCategoriesArea=Πεδίο Ετικέτα/Κατηγορία Πελάτη MembersCategoriesArea=Πεδίο Ετικέτα/Κατηγορία Μελών ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Περιοχή Ετικετών/Κατηγοριών Λογαριασμών +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Περιοχή ετικετών / κατηγοριών χρηστών SubCats=Υποκατηγορίες @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Εμφάνιση ετικέτας/κατηγορίας ByDefaultInList=By default in list ChooseCategory=Επιλέξτε κατηγορία -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Χρήση ή χειριστής για κατηγορίες diff --git a/htdocs/langs/el_GR/companies.lang b/htdocs/langs/el_GR/companies.lang index 976e2709e1a..8169c283b42 100644 --- a/htdocs/langs/el_GR/companies.lang +++ b/htdocs/langs/el_GR/companies.lang @@ -43,9 +43,10 @@ Individual=Ιδιώτης ToCreateContactWithSameName=Θα δημιουργήσει αυτόματα μια επαφή / διεύθυνση με τις ίδιες πληροφορίες με το τρίτο μέρος στο τρίτο μέρος. Στις περισσότερες περιπτώσεις, ακόμη και αν το τρίτο σας πρόσωπο είναι φυσικό πρόσωπο, είναι αρκετό να δημιουργηθεί ένα τρίτο μέρος μόνο του. ParentCompany=Γονική εταιρία Subsidiaries=Θυγατρικές -ReportByMonth=Αναφορά ανά μήνα -ReportByCustomers=Αναφορά ανά πελάτη -ReportByQuarter=Αναφορά ανά τιμή +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Προσφωνήσεις RegisteredOffice=Έδρα της εταιρείας Lastname=Επίθετο @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Αριθμός Εμπορικής Εγγραφής) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Πρότυπο Id 1 (CUI) ProfId2RO=Πρότυπο Id 2 (Nr. Înmatriculare) ProfId3RO=Πρότυπο Id 3 (CAEN) ProfId4RO=Πρότυπο Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Καθ Id 1 (OGRN) ProfId2RU=Καθ Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Τρέχον εκκρεμείς λογαριασμός OutstandingBill=Μέγιστο. για εκκρεμείς λογαριασμό OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Ελάχιστο ποσό για παραγγελία -MonkeyNumRefModelDesc=Επιστρέφει έναν αριθμό με τη μορφή %syymm-nnnn για τον κωδικό πελάτη και %syymm-nnnn για τον κωδικό προμηθευτή όπου yy είναι έτος, mm είναι month και nnnn είναι μια ακολουθία χωρίς διακοπή και καμία επιστροφή στο 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Customer/supplier code is free. This code can be modified at any time. ManagingDirectors=Διαχειριστής (ες) ονομασία (CEO, διευθυντής, πρόεδρος ...) MergeOriginThirdparty=Διπλότυπο Πελ./Προμ. ( Πελ./Προμ. θέλετε να διαγραφεί) diff --git a/htdocs/langs/el_GR/compta.lang b/htdocs/langs/el_GR/compta.lang index d814080d930..7697b910499 100644 --- a/htdocs/langs/el_GR/compta.lang +++ b/htdocs/langs/el_GR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=Οι αγορές SGST VATCollected=VAT collected StatusToPay=Προς πληρωμή SpecialExpensesArea=Περιοχή για όλες τις ειδικές πληρωμές +VATExpensesArea=Area for all TVA payments SocialContribution=Κοινωνική ή φορολογική εισφορά SocialContributions=Κοινωνικές ή φορολογικές εισφορές SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Πληρωμή τιμολογίου πελάτη PaymentSupplierInvoice=πληρωμή τιμολογίου προμηθευτή PaymentSocialContribution=Πληρωμή Κοινωνικής/Φορολογικής εισφοράς PaymentVat=Πληρωμή Φ.Π.Α. +AutomaticCreationPayment=Automatically record the payment ListPayment=Λίστα πληρωμών ListOfCustomerPayments=Λίστα πληρωμών πελατών ListOfSupplierPayments=Λίστα πληρωμών προμηθευτών @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Πληρωμής LT2PaymentsES=Πληρωμές IRPF VATPayment=Πληρωμή ΦΠΑ πωλήσεων VATPayments=Πληρωμές ΦΠΑ πωλήσεων +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=Νέα καταβολή φόρου επί των πωλήσεων NewLocalTaxPayment=Νέα πληρωμή φόρου %s @@ -134,9 +138,17 @@ NoWaitingChecks=Δεν υπάρχουν επιταγές που αναμένου DateChequeReceived=Check reception input date NbOfCheques=Αριθμός ελέγχων PaySocialContribution=Πληρωμή Κοινωνικής/Φορολογικής εισφοράς -ConfirmPaySocialContribution=Είστε σίγουροι ότι θέλετε να χαρακτηριστεί αυτή η Κοινωνική/Φορολογική εισφορά ως πληρωμένη; +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Διαγραφή Κοινωνικής/Φορολογικής εισφοράς -ConfirmDeleteSocialContribution=Είστε σίγουροι ότι θέλετε να διαγράψετε αυτή την Κοινωνική/Φορολογική εισφορά; +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Κοινωνικές/Φορολογικές εισφορές και πληρωμές CalcModeVATDebt=Κατάσταση <b>%sΦΠΑ επί των λογιστικών υποχρεώσεων%s</b> CalcModeVATEngagement=Κατάσταση <b>%sΦΠΑ επί των εσόδων-έξοδα%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- Περιλαμβάνει τα οφειλόμενα τιμολόγια του πελάτη, είτε πληρώνονται είτε όχι. <br> - Βασίζεται στην ημερομηνία χρέωσης αυτών των τιμολογίων. <br> RulesCAIn=- Περιλαμβάνει όλες τις πραγματικές πληρωμές τιμολογίων που εισπράττονται από πελάτες. <br> - Βασίζεται στην ημερομηνία πληρωμής αυτών των τιμολογίων <br> RulesCATotalSaleJournal=Περιλαμβάνει όλες τις πιστωτικές γραμμές από το περιοδικό Sale. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Περιλαμβάνει την εγγραφή στον Λογαριασμό σας με Λογαριασμούς Λογαριασμού που έχει την ομάδα &quot;ΕΞΟΔΑ&quot; ή &quot;ΕΙΣΟΔΟΣ&quot; RulesResultBookkeepingPredefined=Περιλαμβάνει την εγγραφή στον Λογαριασμό σας με Λογαριασμούς Λογαριασμού που έχει την ομάδα &quot;ΕΞΟΔΑ&quot; ή &quot;ΕΙΣΟΔΟΣ&quot; RulesResultBookkeepingPersonalized=Εμφανίζει ρεκόρ στο Λογαριασμό σας με λογαριασμούς λογαριασμών <b>ομαδοποιημένους από εξατομικευμένες ομάδες</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Έκδοση φορολογικού δελτίου απ VATReportByCustomers=Πώληση φορολογική έκθεση από τον πελάτη VATReportByCustomersInInputOutputMode=Αναφορά από τον ΦΠΑ των πελατών εισπράττεται και καταβάλλεται VATReportByQuartersInInputOutputMode=Υποβολή φορολογικού συντελεστή πωλήσεων του εισπραχθέντος και καταβληθέντος φόρου +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Αναφέρετε τον φόρο 2 με βάση την τιμή LT2ReportByQuarters=Αναφέρετε τον φόρο 3 με βάση την τιμή LT1ReportByQuartersES=Αναφορά με ποσοστό RE @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=Ανά προϊόν και υπηρεσία RefExt=Εξωτερικές αναφορές -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Σύνδεση με παραγγελία Mode1=Μέθοδος 1 Mode2=Μέθοδος 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Ο αποκλειστικός λογιστικ ACCOUNTING_ACCOUNT_SUPPLIER=Λογαριασμός λογιστικής που χρησιμοποιείται για τους τρίτους προμηθευτές ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Ο αποκλειστικός λογιστικός λογαριασμός που ορίζεται σε κάρτα τρίτου μέρους θα χρησιμοποιηθεί μόνο για τη λογιστική της Subledger. Αυτός θα χρησιμοποιηθεί για τη Γενική Λογιστική και ως προεπιλεγμένη αξία της λογιστικής της Subleger εάν δεν έχει καθοριστεί ο λογαριασμός λογιστικής αποκλειστικής προμήθειας σε τρίτους. ConfirmCloneTax=Επιβεβαιώστε τον κλώνο ενός κοινωνικού / φορολογικού φόρου +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Απλή αναφορά AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ AccountingAffectation=Λογιστική εκχώρηση LastDayTaxIsRelatedTo=Την τελευταία ημέρα της περιόδου ο φόρος σχετίζεται με VATDue=Φόρος πωλήσεων που αξιώνεται ClaimedForThisPeriod=Ισχυρίζεται για την περίοδο -PaidDuringThisPeriod=Πληρωμή κατά τη διάρκεια αυτής της περιόδου +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Με φορολογικό συντελεστή πώλησης TurnoverbyVatrate=Ο κύκλος εργασιών τιμολογείται από το συντελεστή φόρου πώλησης TurnoverCollectedbyVatrate=Ο κύκλος εργασιών που εισπράττεται από το φορολογικό συντελεστή πώλησης @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Συλλέχθηκε ο κύκλος εργασιών RulesPurchaseTurnoverDue=- Περιλαμβάνει τα οφειλόμενα τιμολόγια του προμηθευτή, είτε πληρώνονται είτε όχι. <br> - Βασίζεται στην ημερομηνία τιμολογίου αυτών των τιμολογίων. <br> RulesPurchaseTurnoverIn=- Περιλαμβάνει όλες τις αποτελεσματικές πληρωμές τιμολογίων που πραγματοποιούνται σε προμηθευτές. <br> - Βασίζεται στην ημερομηνία πληρωμής αυτών των τιμολογίων <br> RulesPurchaseTurnoverTotalPurchaseJournal=Περιλαμβάνει όλες τις χρεωστικές γραμμές από το περιοδικό αγορών. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Τιμολόγηση κύκλου εργασιών αγοράς ReportPurchaseTurnoverCollected=Συλλέχθηκε ο κύκλος εργασιών αγοράς IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/el_GR/ecm.lang b/htdocs/langs/el_GR/ecm.lang index 1984f48b63e..35a09265da3 100644 --- a/htdocs/langs/el_GR/ecm.lang +++ b/htdocs/langs/el_GR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Αρχείο που δεν έχει ακόμη ευ ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index 0cdb22a79d6..9cf45c8c449 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>%s</b> Directory δεν βρέθηκε (Bad μονοπάτι ErrorFunctionNotAvailableInPHP=<b>%s</b> Λειτουργία απαιτείται για αυτό το χαρακτηριστικό, αλλά δεν είναι διαθέσιμα σε αυτή την έκδοση / setup της PHP. ErrorDirAlreadyExists=Ένας κατάλογος με αυτό το όνομα υπάρχει ήδη. ErrorFileAlreadyExists=Ένα αρχείο με αυτό το όνομα υπάρχει ήδη. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Ο διακομιστής δεν έλαβε ολόκληρο το αρχείο. ErrorNoTmpDir=Ο προσωρινός φάκελος %s δεν υπάρχει. ErrorUploadBlockedByAddon=Η μεταφόρτωση απετράπει από ένα PHP / Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Σφάλμα κατά τη φόρτωση του γραφή ErrorBadSyntaxForParamKeyForContent=Κακή σύνταξη για παράμετρο κλειδί για ικανοποίηση. Πρέπει να έχει μια τιμή ξεκινώντας με %s ή %s ErrorVariableKeyForContentMustBeSet=Σφάλμα, πρέπει να οριστεί η σταθερά με το όνομα %s (με περιεχόμενο κειμένου για εμφάνιση) ή %s (με εξωτερική διεύθυνση URL για εμφάνιση). ErrorURLMustStartWithHttp=Η διεύθυνση URL %s πρέπει να ξεκινά με http: // ή https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Σφάλμα, η νέα αναφορά χρησιμοποιείται ήδη ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Σφάλμα, διαγραφή πληρωμής που συνδέεται με κλειστό τιμολόγιο δεν είναι δυνατή. ErrorSearchCriteriaTooSmall=Τα κριτήρια αναζήτησης είναι πολύ μικρά. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Η παράμετρος PHP upload_max_filesize (%s) είναι υψηλότερη από την παράμετρο PHP post_max_size (%s). Αυτό δεν είναι μια σταθερή ρύθμιση. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/el_GR/externalsite.lang b/htdocs/langs/el_GR/externalsite.lang index d9331df4fa4..0cd2832840d 100644 --- a/htdocs/langs/el_GR/externalsite.lang +++ b/htdocs/langs/el_GR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Ρύθμιση συνδέσμου σε εξωτερικό website -ExternalSiteURL=Εξωτερικές διεύθυνσης URL ιστοσελίδας +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Το Module Εξωτερικά Site δεν έχει ρυθμιστεί σωστά. ExampleMyMenuEntry=Καταχώρηση του μενού μου diff --git a/htdocs/langs/el_GR/main.lang b/htdocs/langs/el_GR/main.lang index e889ec49edd..529012bbdec 100644 --- a/htdocs/langs/el_GR/main.lang +++ b/htdocs/langs/el_GR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Ημερ. Τροπ. IPModification=Modification IP DateLastModification=Τελευταία ημερομηνία τροποποίησης DateValidation=Ημερομηνία Επικύρωσης +DateSigning=Signing date DateClosing=Ημερομηνία Κλεισίματος DateDue=Καταληκτική Ημερομηνία DateValue=Ημερομηνία αξίας @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Τιμή μονάδας (εκτός) (νόμισμα) UnitPriceTTC=Τιμή Μονάδος PriceU=Τιμή μον. PriceUHT=Τιμή μον. -PriceUHTCurrency=U.P. (νόμισμα) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Τιμή μον. (συμπ. Φ.Π.Α.) Amount=Ποσό AmountInvoice=Ποσό Τιμολογίου @@ -389,6 +390,8 @@ AmountTotal=Συνολικό Ποσό AmountAverage=Μέσο Ποσό PriceQtyMinHT=Τιμή ελάχιστη ποσότητα. (εκτός φόρου) PriceQtyMinHTCurrency=Τιμή ελάχιστη ποσότητα. (εκτός φόρου) (νόμισμα) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Ποσοστό Total=Σύνολο SubTotal=Υποσύνολο @@ -724,7 +727,7 @@ MenuMembers=Μέλη MenuAgendaGoogle=Ημερολόγιο Google MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Όριο Dolibarr (Μενού Ρυθμίσεις-Ασφάλεια): %s Kb, Όριο PHP: %s Kb -NoFileFound=Δεν υπάρχουν έγγραφα σε αυτόν τον φάκελο +NoFileFound=No documents uploaded CurrentUserLanguage=Τρέχουσα Γλώσσα CurrentTheme=Τρέχων Θέμα CurrentMenuManager=Τρέχουσα διαχειρηση μενού @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Αφαιρέστε τη συμβολοσειρά &#39;%s&#39; SomeTranslationAreUncomplete=Ορισμένες από τις γλώσσες που προσφέρονται μπορούν να μεταφραστούν μόνο μερικώς ή ενδέχεται να περιέχουν σφάλματα. Βοηθήστε να διορθώσετε τη γλώσσα σας, εγγραφείτε στη <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">διεύθυνση https://transifex.com/projects/p/dolibarr/</a> για να προσθέσετε τις βελτιώσεις σας. -DirectDownloadLink=Άμεση σύνδεση λήψης (δημόσια / εξωτερική) -DirectDownloadInternalLink=Άμεση σύνδεση λήψης (πρέπει να καταγράφονται και να χρειάζονται δικαιώματα) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Κατεβάστε DownloadDocument=Κάντε λήψη εγγράφου ActualizeCurrency=Ενημέρωση τιμής νομίσματος @@ -1013,6 +1018,7 @@ SearchIntoContacts=Επαφές SearchIntoMembers=Μέλη SearchIntoUsers=Χρήστες SearchIntoProductsOrServices=Προϊόντα ή Υπηρεσίες +SearchIntoBatch=Lots / Serials SearchIntoProjects=Έργα SearchIntoMO=Manufacturing Orders SearchIntoTasks=Εργασίες @@ -1049,12 +1055,13 @@ KeyboardShortcut=Συντόμευση πληκτρολογίου AssignedTo=Ανάθεση σε Deletedraft=Διαγραφή πρόχειρου ConfirmMassDraftDeletion=Σχέδιο επιβεβαίωσης μαζικής διαγραφής -FileSharedViaALink=Το αρχείο μοιράστηκε μέσω συνδέσμου +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Επιλέξτε πρώτα ένα τρίτο μέρος ... YouAreCurrentlyInSandboxMode=Βρίσκεστε αυτή τη στιγμή στη λειτουργία &quot;sandbox&quot; %s Inventory=Καταγραφή εμπορευμάτων AnalyticCode=Αναλυτικός κώδικας TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Εμφάνιση περισσότερων πληροφοριών NoFilesUploadedYet=Αρχικά, μεταφορτώστε ένα έγγραφο SeePrivateNote=Δείτε την ιδιωτική σημείωση @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/el_GR/margins.lang b/htdocs/langs/el_GR/margins.lang index e5319082ebc..2e13243e3f3 100644 --- a/htdocs/langs/el_GR/margins.lang +++ b/htdocs/langs/el_GR/margins.lang @@ -22,7 +22,7 @@ ProductService=Προϊόν ή Υπηρεσία AllProducts=Όλα τα προϊόντα και οι υπηρεσίες ChooseProduct/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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Μέθοδος ποσοστού για της γενικές εκπτώσεις UseDiscountAsProduct=Ως προϊόν UseDiscountAsService=Ως υπηρεσία diff --git a/htdocs/langs/el_GR/members.lang b/htdocs/langs/el_GR/members.lang index a73055746fb..c207035309f 100644 --- a/htdocs/langs/el_GR/members.lang +++ b/htdocs/langs/el_GR/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Λίστα πρόχειρων Μελών (προς επικύ MembersListValid=Λίστα έγκυρων μελών MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Κατάλογος καταγγελθέντων μελών MembersListQualified=Λίστα επικυρωμένων μελών MenuMembersToValidate=Πρόχειρα Μέλη MenuMembersValidated=Επικυρωμένα μέλη +MenuMembersExcluded=Excluded members MenuMembersResiliated=Καταλήγοντας μέλη MembersWithSubscriptionToReceive=Μέλη αναμένοντα για λήψη συνδρομής MembersWithSubscriptionToReceiveShort=Εγγραφή για λήψη @@ -47,9 +49,12 @@ MemberStatusActiveLate=Η Συνδρομή έληξε MemberStatusActiveLateShort=Ληγμένη MemberStatusPaid=Συνδρομή σε εξέλιξη MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Μέλος χωρίς Συνδρομή MemberStatusResiliatedShort=Τερματίστηκε MembersStatusToValid=Πρόχειρα Μέλη +MembersStatusExcluded=Excluded members MembersStatusResiliated=Καταλήγοντας μέλη MemberStatusNoSubscription=Επικυρωμένο (δεν απαιτείται εγγραφή) MemberStatusNoSubscriptionShort=Επικυρώθηκε @@ -82,6 +87,8 @@ Physical=Φυσικό Moral=Moral MorAndPhy=Moral and Physical Reenable=Επανενεργοποίηση +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Τερματίστε ένα μέλος ConfirmResiliateMember=Είστε σίγουροι για τη διακοπή της συνδρομής του Μέλους; DeleteMember=Διαγραφή ενός μέλους @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Πρότυπο ηλεκτρονι DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε ένα μέλος στη νέα εγγραφή εγγραφής DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου όταν η συνδρομή λήγει DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε μέλος σχετικά με την ακύρωση μέλους +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Email αποστολέα για αυτόματα μηνύματα ηλεκτρονικού ταχυδρομείου DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets (Format for output actually setup: <b>%s</b SubscriptionPayment=Πληρωμή συνδρομής LastSubscriptionDate=Ημερομηνία της τελευταίας πληρωμής εγγραφής LastSubscriptionAmount=Ποσό τελευταίας συνδρομής +LastMemberType=Last Member type MembersStatisticsByCountries=Μέλη στατιστικές ανά χώρα MembersStatisticsByState=Τα μέλη στατιστικών στοιχείων από πολιτεία / επαρχία MembersStatisticsByTown=Τα μέλη στατιστικών στοιχείων από την πόλη diff --git a/htdocs/langs/el_GR/modulebuilder.lang b/htdocs/langs/el_GR/modulebuilder.lang index 0c97a5a3b30..0bd432819a2 100644 --- a/htdocs/langs/el_GR/modulebuilder.lang +++ b/htdocs/langs/el_GR/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Θέλω να δημιουργήσω κάποια έγγρ IncludeDocGenerationHelp=Εάν το ελέγξετε αυτό, θα δημιουργηθεί κάποιος κώδικας για να προσθέσετε ένα πλαίσιο &quot;Δημιουργία εγγράφου&quot; στην εγγραφή. ShowOnCombobox=Δείξτε την αξία σε συνδυασμό KeyForTooltip=Κλειδί για επεξήγηση εργαλείου -CSSClass=CSS Class +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Δεν είναι δυνατή η επεξεργασία ForeignKey=Ξένο κλειδί TypeOfFieldsHelp=Τύπος πεδίων: <br> varchar (99), διπλό (24,8), πραγματικό, κείμενο, html, datetime, timestamp, ακέραιος, ακέραιος: ClassName: relativepath / to / classfile.class.php [: 1 [: filter] προσθέτουμε ένα κουμπί + μετά το σύνθετο για να δημιουργήσουμε την εγγραφή, το &#39;φίλτρο&#39; μπορεί να είναι &#39;status = 1 AND fk_user = __USER_ID ΚΑΙ η οντότητα IN (__SHARED_ENTITIES__)&#39; για παράδειγμα) diff --git a/htdocs/langs/el_GR/orders.lang b/htdocs/langs/el_GR/orders.lang index f46715b2529..2725ba6380b 100644 --- a/htdocs/langs/el_GR/orders.lang +++ b/htdocs/langs/el_GR/orders.lang @@ -16,6 +16,8 @@ ToOrder=Δημιουργία πραγγελίας MakeOrder=Δημιουργία παραγγελίας SupplierOrder=Παραγγελία αγοράς SuppliersOrders=Εντολές αγοράς +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Τρέχουσες εντολές αγοράς CustomerOrder=Παραγγελία πώλησης CustomersOrders=Παραγγελίες πωλήσεων @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Τηλέφωνο # Documents models -PDFEinsteinDescription=Ένα πλήρες μοντέλο παραγγελίας +PDFEinsteinDescription=Ένα πλήρες μοντέλο παραγγελίας (παλιά εφαρμογή του προτύπου Eratosthene) PDFEratostheneDescription=Ένα πλήρες μοντέλο παραγγελίας PDFEdisonDescription=Απλό πρότυπο παραγγελίας PDFProformaDescription=Ένα πλήρες πρότυπο τιμολογίου Proforma CreateInvoiceForThisCustomer=Τιμολογημένες παραγγελίες +CreateInvoiceForThisSupplier=Τιμολογημένες παραγγελίες NoOrdersToInvoice=Δεν υπάρχουν τιμολογημένες παραγγελίες CloseProcessedOrdersAutomatically=Χαρακτηρίστε σε «εξέλιξη» όλες τις επιλεγμένες παραγγελίες. OrderCreation=Δημιουργία Παραγγελίας diff --git a/htdocs/langs/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index 83a5818fdcc..4bb80016fa5 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Εταιρεία με πολλαπλές δραστηριότητ CreatedBy=Δημιουργήθηκε από %s ModifiedBy=Τροποποίηθηκε από %s ValidatedBy=Επικυρώθηκε από %s +SignedBy=Signed by %s ClosedBy=Έκλεισε από %s CreatedById=Ταυτότητα χρήστη που δημιούργησε ModifiedById=Αναγνωριστικό χρήστη που έκανε την τελευταία αλλαγή @@ -244,6 +245,7 @@ NewKeyIs=Αυτό είναι το νέο σας κλειδί για να συν NewKeyWillBe=Το νέο σας κλειδί για να συνδεθείτε με το λογισμικό είναι ClickHereToGoTo=Κάντε κλικ εδώ για να μεταβείτε στο %s YouMustClickToChange=Θα πρέπει πρώτα να κάνετε κλικ στον παρακάτω σύνδεσμο για να επικυρώσει την αλλαγή του κωδικού πρόσβασης +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Αν δεν ζητήσατε αυτή την αλλαγή, απλά ξεχάστε αυτό το email. Τα διαπιστευτήριά σας παραμένουν ασφαλή. IfAmountHigherThan=Εάν το ποσό υπερβαίνει <strong>%s</strong> SourcesRepository=Αποθετήριο για τις πηγές diff --git a/htdocs/langs/el_GR/productbatch.lang b/htdocs/langs/el_GR/productbatch.lang index fe383ada8c7..8032b64030a 100644 --- a/htdocs/langs/el_GR/productbatch.lang +++ b/htdocs/langs/el_GR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Χρήση παρτίδας/σειριακού αριθμού -ProductStatusOnBatch=Ναι (απαιτείται παρτίδα/σειριακός αριθμός) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Όχι (δεν χρειάζεται παρτίδα/σειριακός αριθμός) -ProductStatusOnBatchShort=Ναι +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Όχι Batch=Παρτίδα/Σειριακός αριθμός atleast1batchfield=Ημερομηνία προθεσμίας Ανάλωσης ή Πώλησης ή Παρτίδα/Σειριακός αριθμός @@ -22,3 +24,12 @@ ProductLotSetup=Ρύθμιση του module παρτίδας / σειριακο ShowCurrentStockOfLot=Εμφάνιση παρόντος αποθέματος για ζεύγος προϊόν/παρτίδα ShowLogOfMovementIfLot=Εμφάνιση αρχείου κινήσεων για ζεύγος προϊόν/παρτίδα StockDetailPerBatch=Ανάλυση αποθέματος ανά παρτίδα +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/el_GR/products.lang b/htdocs/langs/el_GR/products.lang index 60cfc0b3233..4ba5147607a 100644 --- a/htdocs/langs/el_GR/products.lang +++ b/htdocs/langs/el_GR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=ΦΠΑ (για αυτόν τον πωλητή / προ DiscountQtyMin=Έκπτωση για αυτό το ποσό. NoPriceDefinedForThisSupplier=Δεν έχει οριστεί τιμή / ποσότητα για αυτόν τον πωλητή / προϊόν NoSupplierPriceDefinedForThisProduct=Δεν καθορίζεται τιμή / ποσότητα πωλητή για αυτό το προϊόν +PredefinedItem=Predefined item PredefinedProductsToSell=Προκαθορισμένο προϊόν PredefinedServicesToSell=Προκαθορισμένη υπηρεσία PredefinedProductsAndServicesToSell=Προκαθορισμένα προϊόντα/υπηρεσίες προς πώληση @@ -313,7 +314,7 @@ LastUpdated=Τελευταία ενημέρωση CorrectlyUpdated=Ενημερώθηκε σωστά PropalMergePdfProductActualFile=Αρχείο/α που θα προστεθούν στο AZUR pdf PropalMergePdfProductChooseFile=Επιλογή αρχείων pdf -IncludingProductWithTag=Συμπεριλαμβανομένου προϊόντος / υπηρεσίας με ετικέτα +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Προεπιλεγμένη τιμή, η πραγματική τιμή μπορεί να εξαρτάται από τον πελάτη WarningSelectOneDocument=Επιλέξτε τουλάχιστον ένα έγγραφο DefaultUnitToShow=Μονάδα diff --git a/htdocs/langs/el_GR/projects.lang b/htdocs/langs/el_GR/projects.lang index f63a0fbc3e6..df429d6a631 100644 --- a/htdocs/langs/el_GR/projects.lang +++ b/htdocs/langs/el_GR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Κατάλογος εργασιών GoToListOfTimeConsumed=Μεταβείτε στη λίστα του χρόνου που καταναλώνετε GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Κατάλογος των εμπορικών προτάσεων που σχετίζονται με το έργο ListOrdersAssociatedProject=Κατάλογος παραγγελιών πωλήσεων που σχετίζονται με το έργο ListInvoicesAssociatedProject=Κατάλογος των τιμολογίων πελατών που σχετίζονται με το έργο @@ -268,3 +269,7 @@ OneLinePerTask=Μια γραμμή ανά εργασία OneLinePerPeriod=Μία γραμμή ανά περίοδο RefTaskParent=Αναφ. Γονική εργασία ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/el_GR/propal.lang b/htdocs/langs/el_GR/propal.lang index baf94f8ea92..086574494c7 100644 --- a/htdocs/langs/el_GR/propal.lang +++ b/htdocs/langs/el_GR/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Αποστολή Προσφοράς με e-mail DatePropal=Ημερομηνία της Προσφοράς DateEndPropal=Ισχύς ημερομηνία λήξης ValidityDuration=Διάρκεια ισχύος -CloseAs=Αλλαγή κατάστασης σε SetAcceptedRefused=Ορισμός αποδοχής/άρνησης ErrorPropalNotFound=Η Προσφορά %s δεν βρέθηκε AddToDraftProposals=Προσθήκη στο σχέδιο Προσφοράς @@ -60,6 +59,7 @@ ConfirmClonePropal=Είστε βέβαιοι ότι θέλετε να κλωνο ConfirmReOpenProp=Είστε βέβαιοι ότι θέλετε να ανοίξετε την εμπορική πρόταση <b>%s</b> ? ProposalsAndProposalsLines=Προσφορές και γραμμές ProposalLine=Γραμμή Προσφοράς +ProposalLines=Proposal lines AvailabilityPeriod=Καθυστέρηση Διαθεσιμότητα SetAvailability=Ορισμός καθυστέρησης διαθεσιμότητα AfterOrder=μετά την παραγγελία @@ -85,3 +85,8 @@ ProposalCustomerSignature=Γραπτή αποδοχή, σφραγίδα εται ProposalsStatisticsSuppliers=Στατιστικά στοιχεία για τις προτάσεις προμηθευτών CaseFollowedBy=Περίπτωση που ακολουθείται 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/el_GR/stocks.lang b/htdocs/langs/el_GR/stocks.lang index 454db71ae7c..81d1ee437c5 100644 --- a/htdocs/langs/el_GR/stocks.lang +++ b/htdocs/langs/el_GR/stocks.lang @@ -19,8 +19,8 @@ Stock=Στοκ Stocks=Αποθέματα MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Αποθέματα ανά παρτίδα / σειρά LotSerial=Lots / Serials LotSerialList=Κατάλογος παρτίδων / περιοδικών @@ -37,8 +37,8 @@ AllWarehouses=Όλες οι αποθήκες IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Συμπεριλάβετε επίσης σχέδια παραγγελιών Location=Τοποθεσία -LocationSummary=Σύντομη τοποθεσία όνομα -NumberOfDifferentProducts=Αριθμός διαφορετικών προϊόντων +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Συνολικός αριθμός προϊόντων LastMovement=Τελευταία κίνηση LastMovements=Τελευταίες κινήσεις @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Αποθήκες αξία UserWarehouseAutoCreate=Δημιουργήστε αυτόματα μια αποθήκη χρήστη κατά τη δημιουργία ενός χρήστη AllowAddLimitStockByWarehouse=Διαχειριστείτε επίσης την τιμή για το ελάχιστο και το επιθυμητό απόθεμα ανά ζεύγος (αποθήκη προϊόντων) επιπλέον της τιμής για το ελάχιστο και το επιθυμητό απόθεμα ανά προϊόν RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ RealStockDesc=Το φυσικό / πραγματικό απόθεμα είναι RealStockWillAutomaticallyWhen=Το πραγματικό απόθεμα θα τροποποιηθεί σύμφωνα με αυτόν τον κανόνα (όπως ορίζεται στην ενότητα του αποθέματος): VirtualStock=Εικονική απόθεμα VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Id αποθήκη DescWareHouse=Αποθήκη Περιγραφή LieuWareHouse=Αποθήκη Localisation WarehousesAndProducts=Αποθήκες και τα προϊόντα WarehousesAndProductsBatchDetail=Αποθήκες και προϊόντα (με λεπτομέρεια ανά παρτίδα / σειρά) AverageUnitPricePMPShort=Μέση σταθμική τιμή -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Πώληση Τιμή μονάδας EstimatedStockValueSellShort=Τιμή για πώληση EstimatedStockValueSell=Τιμή για πώληση @@ -145,7 +147,7 @@ Replenishments=Αναπληρώσεις NbOfProductBeforePeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (< %s) NbOfProductAfterPeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (> %s) MassMovement=Μαζική μετακίνηση -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". +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 on "%s". RecordMovement=Μεταφορά εγγραφών ReceivingForSameOrder=Αποδείξεις για αυτή την παραγγελία StockMovementRecorded=Οι κινήσεις των αποθεμάτων καταγράφονται @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Το επίπεδο αποθεμάτων πρέπε StockMustBeEnoughForOrder=Το επίπεδο των αποθεμάτων πρέπει να είναι αρκετό για να προσθέσετε το προϊόν / την υπηρεσία στην παραγγελία (ο έλεγχος γίνεται με βάση το τρέχον πραγματικό απόθεμα όταν προσθέτετε μια γραμμή σε παραγγελία ανεξάρτητα από τον κανόνα για την αυτόματη αλλαγή μετοχών) StockMustBeEnoughForShipment= Το επίπεδο αποθεμάτων πρέπει να είναι αρκετό για να προστεθεί το προϊόν / η υπηρεσία στην αποστολή (ο έλεγχος γίνεται σε τρέχον πραγματικό απόθεμα κατά την προσθήκη μιας γραμμής στην αποστολή ανεξάρτητα από τον κανόνα για την αυτόματη αλλαγή μετοχών) MovementLabel=Ετικέτα λογιστικής κίνησης -TypeMovement=Τύπος κίνησης +TypeMovement=Direction of movement DateMovement=Ημερομηνία μετακίνησης InventoryCode=Λογιστική κίνηση ή κωδικός απογραφής IsInPackage=Περιεχόμενα συσκευασίας @@ -183,6 +185,7 @@ inventoryCreatePermission=Δημιουργία νέου αποθέματος inventoryReadPermission=Προβολή καταλόγων inventoryWritePermission=Ενημέρωση αποθεμάτων inventoryValidatePermission=Επικύρωση απογραφής +inventoryDeletePermission=Delete inventory inventoryTitle=Καταγραφή εμπορευμάτων inventoryListTitle=Αποθέματα inventoryListEmpty=Δεν υπάρχει απογραφή σε εξέλιξη @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Απόθεμα είναι απαραίτη ForceTo=Δύναμη σε 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/el_GR/suppliers.lang b/htdocs/langs/el_GR/suppliers.lang index 1142d55088d..8f73af54a4f 100644 --- a/htdocs/langs/el_GR/suppliers.lang +++ b/htdocs/langs/el_GR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Προμηθευτές SuppliersInvoice=Τιμολόγιο προμηθευτή +SupplierInvoices=Τιμολόγια προμηθευτή ShowSupplierInvoice=Εμφάνιση τιμολογίου προμηθευτή NewSupplier=Νέος πωλητής History=Ιστορικό diff --git a/htdocs/langs/el_GR/ticket.lang b/htdocs/langs/el_GR/ticket.lang index 65f2b2d8d39..5c5c8eb9975 100644 --- a/htdocs/langs/el_GR/ticket.lang +++ b/htdocs/langs/el_GR/ticket.lang @@ -70,6 +70,8 @@ Deleted=Διαγράφηκε # Dict Type=Τύπος Severity=Δριμύτητα +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Για να στείλετε email από το μήνυμα εισιτηρίων @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Εμφανίστε το λογότυπο της ενότη TicketsShowModuleLogoHelp=Ενεργοποιήστε αυτήν την επιλογή για να αποκρύψετε τη λειτουργική μονάδα λογότυπου στις σελίδες της δημόσιας διασύνδεσης TicketsShowCompanyLogo=Εμφανίστε το λογότυπο της εταιρείας στο δημόσιο περιβάλλον TicketsShowCompanyLogoHelp=Ενεργοποιήστε αυτήν την επιλογή για να αποκρύψετε το λογότυπο της κύριας εταιρείας στις σελίδες της δημόσιας διασύνδεσης -TicketsEmailAlsoSendToMainAddress=Επίσης, αποστέλλετε ειδοποίηση στην κύρια διεύθυνση ηλεκτρονικού ταχυδρομείου -TicketsEmailAlsoSendToMainAddressHelp=Ενεργοποιήστε αυτή την επιλογή για να στείλετε ένα μήνυμα ηλεκτρονικού ταχυδρομείου στη διεύθυνση &quot;Ειδοποίηση ηλεκτρονικού ταχυδρομείου από&quot; (δείτε την παρακάτω ρύθμιση) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Περιορίστε την εμφάνιση σε εισιτήρια που έχουν εκχωρηθεί στον τρέχοντα χρήστη (δεν είναι αποτελεσματικά για εξωτερικούς χρήστες, πάντα περιορίζονται στο τρίτο μέρος από το οποίο εξαρτώνται) TicketsLimitViewAssignedOnlyHelp=Μόνο εισιτήρια που έχουν εκχωρηθεί στον τρέχοντα χρήστη θα είναι ορατά. Δεν ισχύει για χρήστη με δικαιώματα διαχείρισης εισιτηρίων. TicketsActivatePublicInterface=Ενεργοποιήστε τη δημόσια διεπαφή @@ -126,10 +128,10 @@ TicketNumberingModules=Μονάδα αρίθμησης εισιτηρίων TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Ειδοποιήστε τρίτο μέρος στη δημιουργία TicketsDisableCustomerEmail=Πάντα να απενεργοποιείτε τα μηνύματα ηλεκτρονικού ταχυδρομείου όταν δημιουργείται ένα εισιτήριο από τη δημόσια διασύνδεση -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Τελευταία τροποποιημένα εισιτή BoxLastModifiedTicketDescription=Τα τελευταία τροποποιημένα εισιτήρια %s BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Δεν υπάρχουν πρόσφατα τροποποιημένα εισιτήρια +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/el_GR/users.lang b/htdocs/langs/el_GR/users.lang index af7a6c554df..75b5ce4c968 100644 --- a/htdocs/langs/el_GR/users.lang +++ b/htdocs/langs/el_GR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Αφαίρεση από την ομάδα PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Αίτημα αλλαγής κωδικού πρόσβασης για <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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=Επιβεβαιώστε την επαναφορά κωδικού πρόσβασης MenuUsersAndGroups=Χρήστες και Ομάδες LastGroupsCreated=Οι τελευταίες ομάδες %s δημιουργήθηκαν @@ -70,9 +72,10 @@ ExportDataset_user_1=Χρήστες και τις ιδιότητές τους DomainUser=Domain user %s Reactivate=Reactivate CreateInternalUserDesc=Αυτή η φόρμα σάς επιτρέπει να δημιουργήσετε έναν εσωτερικό χρήστη στην εταιρεία / οργανισμό σας. Για να δημιουργήσετε έναν εξωτερικό χρήστη (πελάτη, προμηθευτή κ.λπ.), χρησιμοποιήστε το κουμπί &quot;Δημιουργία χρήστη Dolibarr&quot; από την κάρτα επαφών του τρίτου μέρους. -InternalExternalDesc=Ένας εσωτερικός <b> </b> χρήστης είναι ένας χρήστης που ανήκει στην εταιρεία / τον οργανισμό σας. <br> Ένας εξωτερικός χρήστης <b> </b> είναι πελάτης, προμηθευτής ή άλλος (Η δημιουργία εξωτερικού χρήστη για τρίτο μέρος μπορεί να γίνει από την εγγραφή επαφής του τρίτου μέρους). <br> <br> Και στις δύο περιπτώσεις, τα δικαιώματα ορίζουν δικαιώματα στο Dolibarr, επίσης ο εξωτερικός χρήστης μπορεί να έχει διαφορετικό διαχειριστή μενού από τον εσωτερικό χρήστη (Βλέπε Αρχική σελίδα - Ρύθμιση - Οθόνη) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Δημιουργήθηκε χρήστη θα είναι ένας εσωτερικός χρήστης (επειδή δεν συνδέεται με ένα συγκεκριμένο τρίτο μέρος) UserWillBeExternalUser=Δημιουργήθηκε χρήστης θα είναι μια εξωτερική χρήστη (επειδή συνδέονται με μια συγκεκριμένη τρίτο μέρος) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=Κωδικός λογαριασμού χρήστη UserLogoff=Αποσύνδεση χρήστη UserLogged=Ο χρήστης καταγράφηκε DateOfEmployment=Employment date -DateEmployment=Ημερομηνία έναρξης απασχόλησης +DateEmployment=Employment +DateEmploymentstart=Employment Start Date DateEmploymentEnd=Ημερομηνία λήξης απασχόλησης +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Δεν μπορείτε να απενεργοποιήσετε το δικό σας αρχείο χρήστη ForceUserExpenseValidator=Έγκριση έκθεσης εξόδου ισχύος ForceUserHolidayValidator=Έγκριση αίτησης για άδεια εξόδου diff --git a/htdocs/langs/el_GR/website.lang b/htdocs/langs/el_GR/website.lang index 7ed1f8aab8f..f9e92dbb4e8 100644 --- a/htdocs/langs/el_GR/website.lang +++ b/htdocs/langs/el_GR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Παράδειγμα χρήσης στη ρύθμιση εικονικού κεντρικού υπολογιστή Apache: YouCanAlsoTestWithPHPS=<u>Χρήση με ενσωματωμένο διακομιστή PHP</u> <br> Στο περιβάλλον ανάπτυξης, μπορεί να προτιμάτε να δοκιμάσετε τον ιστότοπο με τον ενσωματωμένο διακομιστή ιστού PHP (απαιτείται PHP 5.5) εκτελώντας <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Εκτελέστε τον ιστότοπό σας με έναν άλλο πάροχο φιλοξενίας Dolibarr</u> <br> Αν δεν διαθέτετε διακομιστή ιστού όπως το Apache ή το NGinx που διατίθεται στο Διαδίκτυο, μπορείτε να εξάγετε και να εισάγετε την ιστοσελίδα σας σε μια άλλη παρουσία Dolibarr που παρέχεται από έναν άλλο πάροχο φιλοξενίας Dolibarr που παρέχει πλήρη ενσωμάτωση στην ενότητα Website. Μπορείτε να βρείτε μια λίστα με ορισμένους παρόχους φιλοξενίας Dolibarr στη <a href="https://saas.dolibarr.org" target="_blank">διεύθυνση https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Ελέγξτε επίσης ότι ο εικονικός κεντρικός υπολογιστής έχει άδεια <strong>%s</strong> σε αρχεία σε <br> <strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Ανάγνωση WritePerm=Γράφω TestDeployOnWeb=Δοκιμή / ανάπτυξη στο διαδίκτυο PreviewSiteServedByWebServer=<u>Προεπισκόπηση %s σε μια νέα καρτέλα.</u> <br><br> Το %s θα εξυπηρετηθεί από έναν εξωτερικό διακομιστή ιστού (όπως Apache, Nginx, IIS). Πρέπει να εγκαταστήσετε και να εγκαταστήσετε αυτόν τον εξυπηρετητή πριν να τονίσετε στον κατάλογο: <br> <strong>%s</strong> <br> URL που εξυπηρετείται από εξωτερικό διακομιστή: <br> <strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Προεπισκόπηση %s σε μια νέα καρτέλα.</u> <br><br> Το %s θα εξυπηρετείται από το διακομιστή Dolibarr, ώστε να μην χρειάζεται να εγκατασταθεί επιπλέον διακομιστής ιστού (όπως Apache, Nginx, IIS). <br> Το ενοχλητικό είναι ότι η διεύθυνση URL των σελίδων δεν είναι φιλική προς το χρήστη και ξεκινά με τη διαδρομή του Dolibarr σας. <br> URL που εξυπηρετείται από Dolibarr: <br> <strong>%s</strong> <br><br> Για να χρησιμοποιήσετε τον δικό σας εξωτερικό διακομιστή ιστού για να εξυπηρετήσετε αυτόν τον ιστότοπο, δημιουργήστε έναν εικονικό κεντρικό υπολογιστή στο διακομιστή ιστού σας που δείχνει στον κατάλογο <br> <strong>%s</strong> <br> στη συνέχεια, πληκτρολογήστε το όνομα αυτού του εικονικού διακομιστή και κάντε κλικ στο άλλο κουμπί προεπισκόπησης. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=Η διεύθυνση URL του εικονικού κεντρικού υπολογιστή που εξυπηρετείται από εξωτερικό διακομιστή ιστού δεν έχει οριστεί NoPageYet=Δεν υπάρχουν ακόμη σελίδες YouCanCreatePageOrImportTemplate=Μπορείτε να δημιουργήσετε μια νέα σελίδα ή να εισαγάγετε ένα πλήρες πρότυπο ιστότοπου @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/el_GR/zapier.lang b/htdocs/langs/el_GR/zapier.lang index 84986a17471..16115db0589 100644 --- a/htdocs/langs/el_GR/zapier.lang +++ b/htdocs/langs/el_GR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier για Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Μονάδα Zapier για Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Εγκατάσταση του Zapier για Dolibarr +ZapierForDolibarrSetup=Εγκατάσταση του Zapier για Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/en_AU/accountancy.lang b/htdocs/langs/en_AU/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/en_AU/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/en_AU/admin.lang b/htdocs/langs/en_AU/admin.lang index fd46f1407d3..1897b645ea1 100644 --- a/htdocs/langs/en_AU/admin.lang +++ b/htdocs/langs/en_AU/admin.lang @@ -1,9 +1,8 @@ # Dolibarr language file - Source file is en_US - admin OldVATRates=Old GST rate NewVATRates=New GST rate -Module59000Desc=Module to follow margins DictionaryVAT=GST Rates or Sales Tax Rates -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OptionVatMode=GST due LinkColor=Colour of links OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Use a ; char as separator to extract or set several properties. diff --git a/htdocs/langs/en_AU/modulebuilder.lang b/htdocs/langs/en_AU/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/en_AU/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/en_AU/products.lang b/htdocs/langs/en_AU/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/en_AU/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_AU/website.lang b/htdocs/langs/en_AU/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/en_AU/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/en_AU/withdrawals.lang b/htdocs/langs/en_AU/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/en_AU/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/en_CA/accountancy.lang b/htdocs/langs/en_CA/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/en_CA/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/en_CA/admin.lang b/htdocs/langs/en_CA/admin.lang index a5226efb4db..95bcbef4e06 100644 --- a/htdocs/langs/en_CA/admin.lang +++ b/htdocs/langs/en_CA/admin.lang @@ -1,9 +1,8 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins LocalTax1Management=PST Management CompanyZip=Postal code +ShowBugTrackLink=Show link "<strong>%s</strong>" LDAPFieldZip=Postal code -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) FormatZip=Postal code OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_CA/modulebuilder.lang b/htdocs/langs/en_CA/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/en_CA/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/en_CA/products.lang b/htdocs/langs/en_CA/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/en_CA/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_CA/website.lang b/htdocs/langs/en_CA/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/en_CA/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/en_CA/withdrawals.lang b/htdocs/langs/en_CA/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/en_CA/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/en_GB/accountancy.lang b/htdocs/langs/en_GB/accountancy.lang index d759a22f0c6..cada7ac7c5b 100644 --- a/htdocs/langs/en_GB/accountancy.lang +++ b/htdocs/langs/en_GB/accountancy.lang @@ -49,7 +49,6 @@ VentilatedinAccount=Linked successfully to the financial account NotVentilatedinAccount=Not linked to the financial account XLineSuccessfullyBinded=%s products/services successfully linked to the finance account XLineFailedToBeBinded=%s products/services were not linked to any finance account -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin sorting the page "Links to do" by the most recent elements ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin sorting the page "Links done" by the most recent elements ACCOUNTING_LENGTH_GACCOUNT=Length of the General Ledger accounts (If you set value to 6 here, the account '706' will appear as '706000' on screen) @@ -63,7 +62,6 @@ ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default services sales account (used if not defi LabelAccount=Account name LabelOperation=Account operation NumPiece=Item number -AccountingCategory=Personalised groups AccountingAccountGroupsDesc=Here you can define some groups of financial accounts. They will be used for personalised accounting reports. ByPersonalizedAccountGroups=By personalised groups FeeAccountNotDefined=Account for fees not defined diff --git a/htdocs/langs/en_GB/admin.lang b/htdocs/langs/en_GB/admin.lang index 6d8b2831bb3..43e80d62c89 100644 --- a/htdocs/langs/en_GB/admin.lang +++ b/htdocs/langs/en_GB/admin.lang @@ -31,8 +31,6 @@ ModuleFamilyTechnic=Multi-module tools NotExistsDirect=The alternative root directory is not defined in an existing directory.<br> InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, in a dedicated directory, plug-ins and custom templates.<br>Just create a directory at the root of Dolibarr (eg: custom).<br> InfDirExample=<br>Then declare it in the file <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>If these lines start with a "#", they are comments. To enable them, just remove the "#" character and save the file. -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros to 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code is n characters<br><b>{cccc000}</b> the client code of n characters is followed by a counter dedicated per customer. This counter dedicated per customer is reset at same time as the global counter.<br><b>{tttt}</b> The code of third party type of 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.<br> GenericMaskCodes4a=<u>Example of the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example of third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example of product created on 2007-03-01:</u><br> @@ -42,11 +40,10 @@ ListOfDirectories=List of OpenDocument template directories ListOfDirectoriesForModelGenODT=List of directories containing template files in OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between each directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b> or <b>.ods</b>. FollowingSubstitutionKeysCanBeUsed=<br>To learn how to create your .odt document templates, before storing them in those directories, read wiki documentation: Module50200Name=PayPal -Module59000Desc=Module to follow margins DictionaryAccountancyJournal=Finance journals CompanyZip=Postcode +ShowBugTrackLink=Show link "<strong>%s</strong>" LDAPFieldZip=Postcode -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) GenbarcodeLocation=Barcode generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".<br>For example: /usr/local/bin/genbarcode FormatZip=Postcode OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Use a ; char as separator to extract or set several properties. diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang index edab2e8bb42..9d5c847a07e 100644 --- a/htdocs/langs/en_GB/bills.lang +++ b/htdocs/langs/en_GB/bills.lang @@ -27,5 +27,3 @@ 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 -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposit invoices 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/modulebuilder.lang b/htdocs/langs/en_GB/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/en_GB/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/en_GB/orders.lang b/htdocs/langs/en_GB/orders.lang index c667519bb39..da80d5089a3 100644 --- a/htdocs/langs/en_GB/orders.lang +++ b/htdocs/langs/en_GB/orders.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - orders StatusOrderCanceledShort=Cancelled StatusOrderCanceled=Cancelled -PDFEinsteinDescription=A complete order model StatusSupplierOrderCanceledShort=Cancelled StatusSupplierOrderCanceled=Cancelled diff --git a/htdocs/langs/en_GB/products.lang b/htdocs/langs/en_GB/products.lang index 757f0c2e880..e707e316257 100644 --- a/htdocs/langs/en_GB/products.lang +++ b/htdocs/langs/en_GB/products.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) PrintsheetForOneBarCode=Print several labels for one barcode diff --git a/htdocs/langs/en_GB/website.lang b/htdocs/langs/en_GB/website.lang index ef8e16da6ad..2119639ab04 100644 --- a/htdocs/langs/en_GB/website.lang +++ b/htdocs/langs/en_GB/website.lang @@ -1,2 +1,4 @@ # Dolibarr language file - Source file is en_US - website PageNameAliasHelp=Name or alias of the page.<br>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 "<strong>%s</strong>" to edit this alias. +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/en_GB/withdrawals.lang b/htdocs/langs/en_GB/withdrawals.lang index 3ec4f7ab0ec..b1d58194878 100644 --- a/htdocs/langs/en_GB/withdrawals.lang +++ b/htdocs/langs/en_GB/withdrawals.lang @@ -13,5 +13,4 @@ WithdrawalFileNotCapable=Unable to generate Payment receipt file for your countr 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. -ICS=Creditor Identifier CI for direct debit InfoRejectMessage=Hello,<br><br>the direct debit payment order for invoice %s related to the company %s, for an amount of %s has been refused by the bank.<br><br>--<br>%s diff --git a/htdocs/langs/en_IN/accountancy.lang b/htdocs/langs/en_IN/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/en_IN/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/en_IN/admin.lang b/htdocs/langs/en_IN/admin.lang index cf746fd99b8..cc547cb0f77 100644 --- a/htdocs/langs/en_IN/admin.lang +++ b/htdocs/langs/en_IN/admin.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - admin Module20Name=Quotations Module20Desc=Management of quotations -Module59000Desc=Module to follow margins Permission21=Read quotations Permission22=Create/modify quotations Permission24=Validate quotations @@ -9,12 +8,12 @@ Permission25=Send quotations Permission26=Close quotations Permission27=Delete quotations Permission28=Export quotations +ShowBugTrackLink=Show link "<strong>%s</strong>" PropalSetup=Quotation module setup ProposalsNumberingModules=Quotation numbering models ProposalsPDFModules=Quotation documents models FreeLegalTextOnProposal=Free text on quotations WatermarkOnDraftProposal=Watermark on draft quotations (none if empty) -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) MailToSendProposal=Customer quotations OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_IN/modulebuilder.lang b/htdocs/langs/en_IN/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/en_IN/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/en_IN/products.lang b/htdocs/langs/en_IN/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/en_IN/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_IN/website.lang b/htdocs/langs/en_IN/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/en_IN/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/en_IN/withdrawals.lang b/htdocs/langs/en_IN/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/en_IN/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/en_SG/accountancy.lang b/htdocs/langs/en_SG/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/en_SG/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/en_SG/admin.lang b/htdocs/langs/en_SG/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/en_SG/admin.lang +++ b/htdocs/langs/en_SG/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/modulebuilder.lang b/htdocs/langs/en_SG/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/en_SG/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/en_SG/products.lang b/htdocs/langs/en_SG/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/en_SG/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_SG/website.lang b/htdocs/langs/en_SG/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/en_SG/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/en_SG/withdrawals.lang b/htdocs/langs/en_SG/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/en_SG/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index e65eb2c3e14..a34b0840885 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -16,6 +16,8 @@ ThisService=This service ThisProduct=This product DefaultForService=Default for service DefaultForProduct=Default for product +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Can't suggest AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -129,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -145,7 +147,7 @@ NotVentilatedinAccount=Not bound to the accounting account XLineSuccessfullyBinded=%s products/services successfully bound to an accounting account XLineFailedToBeBinded=%s products/services were not bound to any accounting account -ACCOUNTING_LIMIT_LIST_VENTILATION=Number of elements to bind shown by page (maximum recommended: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the page "Binding to do" by the most recent elements ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding done" by the most recent elements @@ -400,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts \ No newline at end of file diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f5770bad737..6a11c26c50c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -647,8 +651,8 @@ Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -674,7 +678,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Poll, Survey or Vote Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Margins -Module59000Desc=Module to manage margins +Module59000Desc=Module to follow margins Module60000Name=Commissions Module60000Desc=Module to manage commissions Module62000Name=Incoterms @@ -809,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1154,7 +1159,7 @@ DoNotSuggestPaymentMode=Do not suggest NoActiveBankAccountDefined=No active bank account defined OwnerOfBankAccount=Owner of bank account %s BankModuleNotActive=Bank accounts module not enabled -ShowBugTrackLink=Show link "<strong>%s</strong>" +ShowBugTrackLink=Define the link "<strong>%s</strong>" (empty to not display this link, 'github' for the link to the Dolibarr project or define directly an url 'https://...') Alerts=Alerts DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for: DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element. @@ -1179,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1247,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1265,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1509,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1602,8 +1609,13 @@ ServiceSetup=Services module setup ProductServiceSetup=Products and Services modules setup NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit) ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup) +DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms +OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document +AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product +DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. +DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in the language of the third party +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient) SetDefaultBarcodeTypeProducts=Default barcode type to use for products @@ -1735,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1965,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1981,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2048,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2073,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2088,11 +2107,23 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID AdvancedModeOnly=Permision available in Advanced permission mode only -ConfFileIsReadableOrWritableByAnyUsers=The conf file is reabable or writable by any users. Give permission to web server user and group only. +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path +CheckForModuleUpdate=Check for external modules updates +CheckForModuleUpdateHelp=This action will connect to editors of external modules to check if a new version is available. +ModuleUpdateAvailable=An update is available +NoExternalModuleWithUpdate=No updates found for external modules +SwaggerDescriptionFile=Swagger API description file (for use with redoc for example) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 33e0c01aad6..d16188d40d4 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -4,7 +4,7 @@ Actions=Events Agenda=Agenda TMenuAgenda=Agenda Agendas=Agendas -LocalAgenda=Internal calendar +LocalAgenda=Default calendar ActionsOwnedBy=Event owned by ActionsOwnedByShort=Owner AffectedTo=Assigned to @@ -20,7 +20,7 @@ MenuToDoActions=All incomplete events MenuDoneActions=All terminated events MenuToDoMyActions=My incomplete events MenuDoneMyActions=My terminated events -ListOfEvents=List of events (internal calendar) +ListOfEvents=List of events (default calendar) ActionsAskedBy=Events reported by ActionsToDoBy=Events assigned to ActionsDoneBy=Events done by @@ -131,7 +131,7 @@ AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to use AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>. AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events. AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays. -AgendaShowBirthdayEvents=Show birthdays of contacts +AgendaShowBirthdayEvents=Birthdays of contacts AgendaHideBirthdayEvents=Hide birthdays of contacts Busy=Busy ExportDataset_event1=List of agenda events diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 91d64b1fc27..8e2d828c12a 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -180,4 +180,5 @@ BankColorizeMovementDesc=If this function is enable, you can choose specific bac BankColorizeMovementName1=Background color for debit movement BankColorizeMovementName2=Background color for credit movement IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +NoBankAccountDefined=No bank account defined NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 76ea80b53c8..c0eb886a987 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index 0bba5605d0f..44cb183050a 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/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=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) or has modified checksum of the previous record. 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/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 1f0241ec7d1..4d7ee938c91 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -86,8 +91,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 +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 7263b04730a..a24109fa3d0 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -124,4 +124,6 @@ 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 +WeighingScale=Weighing scale +ShowPriceHT = Display the price excluding tax column +ShowPriceHTOnReceipt = Display the price excluding tax column on receipt diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index 10c536e0d48..21d282cd794 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -64,10 +64,11 @@ ActionAC_SHIP=Send shipping by mail ActionAC_SUP_ORD=Send purchase order by mail ActionAC_SUP_INV=Send vendor invoice by mail ActionAC_OTH=Other -ActionAC_OTH_AUTO=Automatically inserted events +ActionAC_OTH_AUTO=Other auto ActionAC_MANUAL=Manually inserted events ActionAC_AUTO=Automatically inserted events -ActionAC_OTH_AUTOShort=Auto +ActionAC_OTH_AUTOShort=Other +ActionAC_EVENTORGANIZATION=Event organization events Stats=Sales statistics StatusProsp=Prospect status DraftPropals=Draft commercial proposals diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index d4c9f95b0b9..b41bb49db13 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -232,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -256,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -442,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 087fcba9e56..6df5438de8f 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -226,7 +226,9 @@ ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <strong>%s</strong ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were not loaded, you can still enter them manually. ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. +ErrorURLMustEndWith=URL %s must end %s ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -256,6 +258,9 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings @@ -289,4 +294,7 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. -WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. \ No newline at end of file +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary +CheckVersionFail=Version check fail diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang new file mode 100644 index 00000000000..a9d31c1dbaf --- /dev/null +++ b/htdocs/langs/en_US/eventorganization.lang @@ -0,0 +1,101 @@ +# Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# 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/>. + +# +# Generic +# +ModuleEventOrganizationName = Event Organization +EventOrganizationDescription = Event Organization through Module Project +EventOrganizationDescriptionLong= Manage Event organization for conference, attendees, speaker, and attendees, with public subcription page +# +# Menu +# +EventOrganizationMenuLeft = Organized events +EventOrganizationConferenceOrBoothMenuLeft = Conference Or Booth + +# +# Admin page +# +EventOrganizationSetup = Event Organization setup +Settings = Settings +EventOrganizationSetupPage = Event Organization setup page +EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated +EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project<br><br>For example: <br>Send Call for Conference<br>Send Call for Booth<br>Receive call for conferences<br>Receive call for Booth<br>Open subscriptions to events for attendees<br>Send remind of event to speakers<br>Send remind of event to Booth hoster<br>Send remind of event to attendees +EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Category to add to third-parties automatically created when someone suggests a conference +EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth +EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference. +EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth. +EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a subscription to a booth has been paid. +EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a subscription to an event has been paid. +EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes +EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers +EVENTORGANIZATION_FILTERATTENDEES_CAT = Filter thirdpartie's select list in attendees creation card/form with category +EVENTORGANIZATION_FILTERATTENDEES_TYPE = Filter thirdpartie's select list in attendees creation card/form with customer type + +# +# Object +# +EventOrganizationConfOrBooth= Conference Or Booth +ManageOrganizeEvent = Manage event organisation +ConferenceOrBooth = Conference Or Booth +ConferenceOrBoothTab = Conference Or Booth +AmountOfSubscriptionPaid = Amount of subscription paid +DateSubscription = Date of subscription +ConferenceOrBoothAttendee = Conference Or Booth Attendee + +# +# Template Mail +# +YourOrganizationEventConfRequestWasReceived = Your request for conference was received +YourOrganizationEventBoothRequestWasReceived = Your request for booth was received +EventOrganizationEmailAskConf = Request for conference +EventOrganizationEmailAskBooth = Request for booth +EventOrganizationEmailSubsBooth = Subscription for booth +EventOrganizationEmailSubsEvent = Subscription for an event +EventOrganizationMassEmailAttendees = Communication to attendees +EventOrganizationMassEmailSpeakers = Communication to speakers + +# +# Event +# +AllowUnknownPeopleSuggestConf=Allow unknown people to suggest conferences +AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest conferences +AllowUnknownPeopleSuggestBooth=Allow unknown people to suggest booth +AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to suggest booth +PriceOfRegistration=Price of registration +PriceOfRegistrationHelp=Price of registration +PriceOfBooth=Subscription price to stand a booth +PriceOfBoothHelp=Subscription price to stand a booth +EventOrganizationICSLink=Link ICS for events +ConferenceOrBoothInformation=Conference Or Booth informations +Attendees = Attendees +EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference +# +# Status +# +EvntOrgDraft = Draft +EvntOrgSuggested = Suggested +EvntOrgConfirmed = Confirmed +EvntOrgNotQualified = Not Qualified +EvntOrgDone = Done +EvntOrgCancelled = Cancelled +# +# Public page +# +PublicAttendeeSubscriptionPage = Public link of registration to a conference +MissingOrBadSecureKey = The security key is invalid or missing +EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference +EvntOrgStartDuration = This conference starts on +EvntOrgEndDuration = and ends on diff --git a/htdocs/langs/en_US/externalsite.lang b/htdocs/langs/en_US/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/en_US/externalsite.lang +++ b/htdocs/langs/en_US/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index eb2cd89adf1..2393a02ee50 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -13,7 +13,7 @@ ToReviewCP=Awaiting approval ApprovedCP=Approved CancelCP=Canceled RefuseCP=Refused -ValidatorCP=Approbator +ValidatorCP=Approver ListeCP=List of leave Leave=Leave request LeaveId=Leave ID @@ -39,11 +39,11 @@ TitreRequestCP=Leave request TypeOfLeaveId=Type of leave ID TypeOfLeaveCode=Type of leave code TypeOfLeaveLabel=Type of leave label -NbUseDaysCP=Number of days of vacation consumed -NbUseDaysCPHelp=The calculation takes into account the non working days and the holidays defined in the dictionary. -NbUseDaysCPShort=Days consumed -NbUseDaysCPShortInMonth=Days consumed in month -DayIsANonWorkingDay=%s is a non working day +NbUseDaysCP=Number of days of leave used +NbUseDaysCPHelp=The calculation takes into account the non-working days and the holidays defined in the dictionary. +NbUseDaysCPShort=Days of leave +NbUseDaysCPShortInMonth=Days of leave in month +DayIsANonWorkingDay=%s is a non-working day DateStartInMonth=Start date in month DateEndInMonth=End date in month EditCP=Edit @@ -55,7 +55,7 @@ TitleDeleteCP=Delete the leave request ConfirmDeleteCP=Confirm the deletion of this leave request? ErrorCantDeleteCP=Error you don't have the right to delete this leave request. CantCreateCP=You don't have the right to make leave requests. -InvalidValidatorCP=You must choose an approbator to your leave request. +InvalidValidatorCP=You must choose the approver for your leave request. NoDateDebut=You must select a start date. NoDateFin=You must select an end date. ErrorDureeCP=Your leave request does not contain working day. @@ -80,14 +80,14 @@ UserCP=User ErrorAddEventToUserCP=An error occurred while adding the exceptional leave. AddEventToUserOkCP=The addition of the exceptional leave has been completed. MenuLogCP=View change logs -LogCP=Log of updates of available vacation days -ActionByCP=Performed by -UserUpdateCP=For the user +LogCP=Log of all updates made to "Balance of Leave" +ActionByCP=Updated by +UserUpdateCP=Updated for PrevSoldeCP=Previous Balance NewSoldeCP=New Balance alreadyCPexist=A leave request has already been done on this period. -FirstDayOfHoliday=First day of vacation -LastDayOfHoliday=Last day of vacation +FirstDayOfHoliday=Beginning day of leave request +LastDayOfHoliday=Ending day of leave request BoxTitleLastLeaveRequests=Latest %s modified leave requests HolidaysMonthlyUpdate=Monthly update ManualUpdate=Manual update @@ -104,8 +104,8 @@ LEAVE_SICK=Sick leave LEAVE_OTHER=Other leave LEAVE_PAID_FR=Paid vacation ## Configuration du Module ## -LastUpdateCP=Latest automatic update of leave allocation -MonthOfLastMonthlyUpdate=Month of latest automatic update of leave allocation +LastUpdateCP=Last automatic update of leave allocation +MonthOfLastMonthlyUpdate=Month of last automatic update of leave allocation UpdateConfCPOK=Updated successfully. Module27130Name= Management of leave requests Module27130Desc= Management of leave requests @@ -125,8 +125,8 @@ HolidaysCanceledBody=Your leave request for %s to %s has been canceled. FollowedByACounter=1: This type of leave need to be followed by a counter. Counter is incremented manually or automatically and when a leave request is validated, counter is decremented.<br>0: Not followed by a counter. NoLeaveWithCounterDefined=There is no leave types defined that need to be followed by a counter GoIntoDictionaryHolidayTypes=Go into <strong>Home - Setup - Dictionaries - Type of leave</strong> to setup the different types of leaves. -HolidaySetup=Setup of module Holiday -HolidaysNumberingModules=Leave requests numbering models +HolidaySetup=Setup of module Leave +HolidaysNumberingModules=Numbering models for leave requests TemplatePDFHolidays=Template for leave requests PDF FreeLegalTextOnHolidays=Free text on PDF WatermarkOnDraftHolidayCards=Watermarks on draft leave requests diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index a7cfde68ae7..2d02c5ddcf9 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -92,7 +92,7 @@ MailingModuleDescEmailsFromUser=Emails input by user MailingModuleDescDolibarrUsers=Users with Emails MailingModuleDescThirdPartiesByCategories=Third parties (by categories) SendingFromWebInterfaceIsNotAllowed=Sending from web interface is not allowed. -EmailCollectorFilterDesc=All filters must match to have an email being collected +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -174,4 +174,6 @@ 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 +RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 5594c835ba8..8fea1ffd839 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -500,9 +503,11 @@ By=By From=From FromDate=From FromLocation=From -at=at to=to To=to +ToDate=to +ToLocation=to +at=at and=and or=or Other=Other @@ -656,6 +661,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Show customer preview ShowSupplierPreview=Show vendor preview RefCustomer=Ref. customer +InternalRef=Internal ref. Currency=Currency InfoAdmin=Information for administrators Undo=Undo @@ -723,7 +729,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -898,8 +904,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1012,6 +1020,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1048,12 +1057,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1115,4 +1125,9 @@ EventReminder=Event Reminder UpdateForAllLines=Update for all lines OnHold=On hold Civility=Civility +AffectTag=Affect Tag +ConfirmAffectTag=Bulk Tag Affect +ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? +CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 5812248b129..2ab2fb87270 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 845dd12624d..9fdaa1a533a 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -85,7 +85,7 @@ ListOfPermissionsDefined=List of defined permissions SeeExamples=See examples here 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).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).<br><br>It can be an expression, for example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br><br><strong>For document :</strong><br>0 = not displayed <br>1 = display<br>2 = display only if not empty<br><br><strong>For document lines :</strong><br>0 = not displayed <br>1 = displayed in a column<br>3 = display in line description column after the description<br>4 = display in description column after the description only if not empty DisplayOnPdf=Display on PDF IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 0) @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 3dbcda8e4eb..fceeb1a15f1 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -77,4 +77,26 @@ 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) GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO \ No newline at end of file +ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +Workstation=Workstation +Workstations=Workstations +WorkstationsDescription=Workstations management +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationList=Workstation list +WorkstationCreate=Add new workstation +ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ? +EnableAWorkstation=Enable a workstation +ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ? +DisableAWorkstation=Disable a workstation +DeleteWorkstation=Delete +NbOperatorsRequired=Number of operators required +THMOperatorEstimated=Estimated operator THM +THMMachineEstimated=Estimated machine THM +WorkstationType=Workstation type +Human=Human +Machine=Machine +HumanMachine=Human / Machine +WorkstationArea=Workstation area +Machines=Machines +THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 011352f1dcd..0e76e493b5a 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -78,6 +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 +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=See setup of module %s NbOfAttachedFiles=Number of attached files/documents TotalSizeOfAttachedFiles=Total size of attached files/documents @@ -113,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -215,6 +217,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated. EMailTextExpenseReportApproved=Expense report %s has been approved. EMailTextHolidayValidated=Leave request %s has been validated. EMailTextHolidayApproved=Leave request %s has been approved. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Importation data set DolibarrNotification=Automatic notification ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing... @@ -242,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources @@ -259,7 +263,8 @@ 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.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 - +PrefixSession=Prefix for session ID + ##### Export ##### ExportsArea=Exports area AvailableFormats=Available formats diff --git a/htdocs/langs/en_US/partnership.lang b/htdocs/langs/en_US/partnership.lang new file mode 100644 index 00000000000..63b3bec0bb6 --- /dev/null +++ b/htdocs/langs/en_US/partnership.lang @@ -0,0 +1,54 @@ +# Copyright (C) 2021 NextGestion <contact@nextgestion.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +# +# Generic +# +ModulePartnershipName = Partnership management +PartnershipDescription = Module Partnership management +PartnershipDescriptionLong= Module Partnership management + +# +# Menu +# +NewPartnership = New Partnership +ListOfPartnerships = List of partnership + +# +# Admin page +# +PartnershipSetup = Partnership setup +PartnershipAbout = About Partnership +PartnershipAboutPage = Partnership about page + + +# +# Object +# +DatePartnershipStart=Start date +DatePartnershipEnd=End date + +# +# Template Mail +# + + +# +# Status +# +PartnershipDraft = Draft +PartnershipAccepted = Accepted +PartnershipRefused = Refused +PartnershipCanceled = Canceled \ No newline at end of file diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 54270c4a23b..644da334851 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +ManageLotMask=Custom mask +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned \ No newline at end of file diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index f0c4a5362b8..28853762424 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -108,7 +108,7 @@ 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 -AssociatedProductsAbility=Enable Kits (set of other products) +AssociatedProductsAbility=Enable Kits (set of several products) VariantsAbility=Enable Variants (variations of products, for example color, size) AssociatedProducts=Kits AssociatedProductsNumber=Number of products composing this kit @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 2aedbd53377..d14e52d14e8 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -267,4 +268,8 @@ NewInvoice=New invoice OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using \ No newline at end of file +ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 557df2f840f..edbc08236d3 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang index 7c3c08a65bd..6b4fdc94163 100644 --- a/htdocs/langs/en_US/salaries.lang +++ b/htdocs/langs/en_US/salaries.lang @@ -2,12 +2,15 @@ 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 +CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary Salary=Salary Salaries=Salaries -NewSalaryPayment=New salary payment +NewSalary=New salary +NewSalaryPayment=New salary card AddSalaryPayment=Add salary payment SalaryPayment=Salary payment SalariesPayments=Salaries payments +SalariesPaymentsOf=Salaries payments of %s ShowSalaryPayment=Show salary payment THM=Average hourly rate TJM=Average daily rate diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 1b54e53d6de..5f60715ae2a 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,6 +62,8 @@ 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 +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -96,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -144,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -153,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -182,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -234,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) -DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. \ No newline at end of file +DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity \ No newline at end of file diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 3ca908e86d8..50fa8c970ae 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today \ No newline at end of file diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index de31172e9d7..1f53a5737ff 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -33,7 +33,7 @@ ExpenseReportCanceledMessage=The expense report %s was canceled.<br> - User: %s< ExpenseReportPaid=An expense report was paid ExpenseReportPaidMessage=The expense report %s was paid.<br> - User: %s<br> - Paid by: %s<br>Click here to show the expense report: %s TripId=Id expense report -AnyOtherInThisListCanValidate=Person to inform for validation. +AnyOtherInThisListCanValidate=Person to be informed for validating the request. TripSociete=Information company TripNDF=Informations expense report PDFStandardExpenseReports=Standard template to generate a PDF document for expense report diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 996ba20ab7d..d84257b69ad 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -12,6 +12,7 @@ PasswordChangedTo=Password changed to: %s SubjectNewPassword=Your new password for %s GroupRights=Group permissions UserRights=User permissions +Credentials=Credentials UserGUISetup=User Display Setup DisableUser=Disable DisableAUser=Disable a user @@ -72,7 +73,7 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited UserWillBe=Created user will be @@ -115,7 +116,7 @@ DateOfEmployment=Employment date DateEmployment=Employment DateEmploymentstart=Employment Start Date DateEmploymentEnd=Employment End Date -RangeOfLoginValidity=Date range of login validity +RangeOfLoginValidity=Access validity date range CantDisableYourself=You can't disable your own user record ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 7793fa5dead..e70d88a3aa1 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -136,4 +136,12 @@ RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames -DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. \ No newline at end of file +DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap file generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be sized 16x16, 32x32 or 64x64 +FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64) diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index eb26ee91a6f..7d5b57f7da9 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -26,7 +26,7 @@ NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw statu NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order 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 +SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer InvoiceWaitingWithdraw=Invoice waiting for direct debit InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer AmountToWithdraw=Amount to withdraw @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Latest %s direct debit receipts MakeWithdrawRequest=Make a direct debit payment request MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s direct debit payment requests recorded +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Third-party bank code 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 <strong>%s</strong>. WithdrawalCantBeCreditedTwice=This withdrawal receipt is already marked as credited; this can't be done twice, as this would potentially create duplicate payments and bank entries. @@ -132,7 +133,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Execution date CreateForSepa=Create direct debit file -ICS=Creditor Identifier CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction USTRD="Unstructured" SEPA XML tag ADDDAYS=Add days to Execution Date @@ -146,4 +148,6 @@ InfoTransData=Amount: %s<br>Method: %s<br>Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.<br><br>--<br>%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. \ No newline at end of file +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang index 646b97ec31d..15fd8ef07c2 100644 --- a/htdocs/langs/en_US/workflow.lang +++ b/htdocs/langs/en_US/workflow.lang @@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked sup descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated \ No newline at end of file diff --git a/htdocs/langs/en_US/zapier.lang b/htdocs/langs/en_US/zapier.lang index c688a0c307f..a76d84ed103 100644 --- a/htdocs/langs/en_US/zapier.lang +++ b/htdocs/langs/en_US/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr -ZapierDescription=Interface with Zapier \ No newline at end of file +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. \ No newline at end of file diff --git a/htdocs/langs/es_AR/accountancy.lang b/htdocs/langs/es_AR/accountancy.lang index ab876d97846..96c58aaf400 100644 --- a/htdocs/langs/es_AR/accountancy.lang +++ b/htdocs/langs/es_AR/accountancy.lang @@ -16,4 +16,3 @@ Journals=Diarios Contables JournalFinancial=Diarios Financieros AssignDedicatedAccountingAccount=Nueva cuenta para asignar InvoiceLabel=Etiqueta de la factura -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_AR/admin.lang b/htdocs/langs/es_AR/admin.lang index 38c1f9272dd..f71ac440e90 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -260,7 +260,6 @@ Module80Name=Envíos Module80Desc=Gestión de envíos y remitos Module510Name=Sueldos Module4000Name=ARH -Module59000Desc=Module to follow margins Module62000Name=Incotérminos Permission23001=Leer tarea programada Permission23002=Crear/actualizar tarea programada @@ -325,6 +324,7 @@ MaxSizeList=Longitud máxima para la lista DefaultMaxSizeList=Longitud máxima predeterminada para listas CompanyInfo=Empresa / Organización CompanyAddress=DIrección +ShowBugTrackLink=Show link "<strong>%s</strong>" DelaysOfToleranceBeforeWarning=Retardo antes de mostrar una alerta de advertencia por: MiscellaneousDesc=Todos los demás parámetros relacionados con la seguridad se definen aquí. LimitsSetup=Límites / configuración de precisión @@ -352,7 +352,6 @@ RunningUpdateProcessMayBeRequired=Parece que es necesario ejecutar el proceso de YouMustRunCommandFromCommandLineAfterLoginToUser=Debe ejecutar este comando desde la línea de comandos después de iniciar sesión en un shell con el usuario <b> %s </b> o debe agregar la opción -W al final de la línea de comandos para proporcionar la contraseña de <b> %s </b>. YourPHPDoesNotHaveSSLSupport=Funciones SSL no disponibles en tu PHP DownloadMoreSkins=Más skins para descargar -SimpleNumRefModelDesc=Devuelve el número de referencia con el formato %syymm-nnnn donde yy es año, mm es mes y nnnn es secuencial sin reinicio ShowProfIdInAddress=Mostrar identificación profesional con direcciones ShowVATIntaInAddress=Ocultar número de IVA intracomunitario con direcciones MeteoStdMod=Modo estandar @@ -363,7 +362,6 @@ ExternalAccess=Acceso externo / internet MAIN_PROXY_USE=Use un servidor proxy (de lo contrario el acceso es directo a internet) MAIN_PROXY_HOST=Servidor proxy: Nombre / Dirección MAIN_PROXY_USER=Servidor proxy: Login / Usuario -DefineHereComplementaryAttributes=Defina aquí cualquier atributo adicional / personalizado que desee incluir para: %s ExtraFields=Atributos complementarios ExtraFieldsLines=Atributos complementarios (líneas) ExtraFieldsLinesRec=Atributos complementarios (plantillas facturas líneas) @@ -524,7 +522,6 @@ LDAPContactObjectClassListExample=Lista de atributos de registro que definen obj LDAPFieldZip=Cremallera LDAPFieldCompany=Compañía ViewProductDescInFormAbility=Mostrar descripción de productos en formularios (de otro forma es mostrado en una venta emergente tooltip popup) -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) Target=Destino Sell=Vender PositionIntoComboList=Posición de la línea en las listas de combo @@ -588,7 +585,6 @@ WarningNoteModulePOSForFrenchLaw=Este módulo %s cumple con las leyes francesas WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el módulo %s que es un módulo externo. Activar un módulo externo significa que confía en el editor de ese módulo y que está seguro de que este módulo no afecta negativamente el comportamiento de su aplicación y cumple con las leyes de su país (%s). Si el módulo introduce una característica ilegal, usted se hace responsable del uso de software ilegal. NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establézcalo en sí si este grupo es un cálculo de otros grupos -EnterCalculationRuleIfPreviousFieldIsYes=Introduzca la regla de cálculo si el campo anterior se estableció en Sí (por ejemplo, 'CODEGRP1 + CODEGRP2') COMPANY_AQUARIUM_CLEAN_REGEX=Filtro de expresiones regulares para limpiar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) GDPRContactDesc=Si almacena datos sobre empresas / ciudadanos europeos, puede nombrar al contacto que es responsable del Reglamento general de protección de datos aquí @@ -597,7 +593,6 @@ HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el tex YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos: <br> %s ChartLoaded=Plan de cuenta cargado VATIsUsedIsOff=Nota: La opción de usar el impuesto sobre las ventas o el IVA se ha establecido en <strong> Desactivado </strong> en el menú %s - %s, por lo que el impuesto sobre las ventas o IVA utilizado siempre será 0 para las ventas. -FeatureSupportedOnTextFieldsOnly=Advertencia, función compatible solo en los campos de texto. También se debe establecer un parámetro de URL action = create o action = edit O el nombre de la página debe terminar con 'new.php' para activar esta función. EmailCollector=Recolector de correo electronico EmailCollectorDescription=Agregue un trabajo programado y una página de configuración para escanear los buzones de correo electrónico con regularidad (usando el protocolo IMAP) y registre los correos electrónicos recibidos en su aplicación, en el lugar correcto y / o cree algunos registros automáticamente (como clientes potenciales). NewEmailCollector=Nuevo recolector de email diff --git a/htdocs/langs/es_AR/bills.lang b/htdocs/langs/es_AR/bills.lang index 986251b025b..878144139a3 100644 --- a/htdocs/langs/es_AR/bills.lang +++ b/htdocs/langs/es_AR/bills.lang @@ -13,7 +13,9 @@ InvoiceCustomer=Factura de Cliente CustomerInvoice=Factura de Cliente CustomersInvoices=Facturas de clientes SupplierInvoice=Factura de Proveedor +SuppliersInvoices=Facturas de proveedores SupplierBill=Factura de Proveedor +SupplierBills=Facturas de proveedores PaymentAmount=Monto pagado BillStatusDraft=Borrador (necesita ser validado) BillStatusPaid=Pagado diff --git a/htdocs/langs/es_AR/companies.lang b/htdocs/langs/es_AR/companies.lang index 3dd71f9bcdc..675b49930b1 100644 --- a/htdocs/langs/es_AR/companies.lang +++ b/htdocs/langs/es_AR/companies.lang @@ -257,7 +257,6 @@ CurrentOutstandingBill=Factura pendiente actual OutstandingBill=Max. por factura pendiente OutstandingBillReached=Max. alcanzado por factura pendiente OrderMinAmount=Monto mínimo por orden -MonkeyNumRefModelDesc=Devuelve un número con el formato %syymm-nnnn para el código del cliente y %syymm-nnnn para el código del proveedor donde yy es el año, mm es el mes y nnnn es una secuencia sin interrupción ni retorno a 0. LeopardNumRefModelDesc=El código es gratis. Este código puede modificarse en cualquier momento. ManagingDirectors=Nombre(s) del gerente (CEO, director, presidente...) MergeOriginThirdparty=Duplicar el tercero (tercero que quieres eliminar) diff --git a/htdocs/langs/es_AR/main.lang b/htdocs/langs/es_AR/main.lang index 06f7b03da61..c34ffb3f0d7 100644 --- a/htdocs/langs/es_AR/main.lang +++ b/htdocs/langs/es_AR/main.lang @@ -134,7 +134,6 @@ Hide=Esconder ShowCardHere=Mostrar tarjeta SearchOf=Buscar Valid=Valida -ReOpen=Re-abrir Upload=Cargar ResizeOrCrop=Redimensionar o Recortar Recenter=Recentrar @@ -196,7 +195,6 @@ UnitPriceHT=Precio unitario (neto) UnitPriceHTCurrency=Precio unitario (neto) (moneda) UnitPriceTTC=Precio unitario PriceUHT=P.U. (neto) -PriceUHTCurrency=P.U. (moneda) PriceUTTC=P.U. (con imp.) Amount=Monto AmountInvoice=Monto de factura @@ -410,7 +408,6 @@ YouCanSetDefaultValueInModuleSetup=Ud. puede establecer el valor predeterminado Documents=Archivos enlazados UploadDisabled=Carga deshabilitada ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú inicio-configuración-seguridad):\n%s KB, Límite PHP: %s Kb -NoFileFound=Ningún documento guardado en esta carpeta CurrentMenuManager=Administrador de menú actual Layout=Diseño DisabledModules=Deshabilitar módulos @@ -513,8 +510,6 @@ Miscellaneous=Miscelanias GroupBy=Agrupar por... RemoveString=Quitar cadena '%s' SomeTranslationAreUncomplete=Alguno de los idiomas ofertados pueden estar traducidos parcialmente o pueden contener errores. Por favor ayude a corregir su idioma registrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> para agregar sus mejoras. -DirectDownloadLink=Enlace de descarga directa (público/externo) -DirectDownloadInternalLink=Enlace de descarga directa (necesita estar logeado y tener permisos) DownloadDocument=Descargar documento ActualizeCurrency=Actualizar tipo de cambio ModuleBuilder=Constructor de Módulos y Aplicaciones @@ -565,7 +560,6 @@ LocalAndRemote=Local y Remoto KeyboardShortcut=Acceso directo de teclado AssignedTo=Asignado a ConfirmMassDraftDeletion=Confirmar eliminación borradores en masa -FileSharedViaALink=Archivo compartido vía enlace SelectAThirdPartyFirst=Elegir primero una tercera persona... YouAreCurrentlyInSandboxMode=Ud. esta en este momento en el modo %s "sandbox" ShowMoreInfos=Mostrar Más Info diff --git a/htdocs/langs/es_AR/margins.lang b/htdocs/langs/es_AR/margins.lang index 27e9744383d..ced39b02d42 100644 --- a/htdocs/langs/es_AR/margins.lang +++ b/htdocs/langs/es_AR/margins.lang @@ -15,7 +15,6 @@ UserMargins=Márgenes de usuario AllProducts=Todos los productos y servicios. ChooseProduct/Service=Elige producto o servicio ForceBuyingPriceIfNull=Forzar el costo al precio de venta si no está definido -ForceBuyingPriceIfNullDetails=Si el costo no está definido, y esta opción está "ACTIVADA", el margen será cero en cada línea (costo = precio de venta), de lo contrario ("DESACTIVADO"), el margen será igual al valor sugerido por defecto. MARGIN_METHODE_FOR_DISCOUNT=Método de margen para descuentos globales UseDiscountOnTotal=En subtotal MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Define si un descuento global se debe tratar como un producto, un servicio o solo como un subtotal para el cálculo del margen. diff --git a/htdocs/langs/es_AR/modulebuilder.lang b/htdocs/langs/es_AR/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_AR/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_AR/orders.lang b/htdocs/langs/es_AR/orders.lang index ab79a9a5857..dbee6561f56 100644 --- a/htdocs/langs/es_AR/orders.lang +++ b/htdocs/langs/es_AR/orders.lang @@ -5,6 +5,8 @@ Orders=Órdenes OrderDateShort=Fecha de la Orden OrderToProcess=Orden a procesar NewOrder=Nueva Orden +NewOrderSupplier=Nueva Orden de Compra +SupplierOrder=Orden de compra SuppliersOrders=Ordenes de compra CustomerOrder=Ordenes de venta StatusOrderCanceledShort=Cancelado diff --git a/htdocs/langs/es_AR/productbatch.lang b/htdocs/langs/es_AR/productbatch.lang index 88c6543e9e2..fa4604d5fb1 100644 --- a/htdocs/langs/es_AR/productbatch.lang +++ b/htdocs/langs/es_AR/productbatch.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Usar lote / número de serie -ProductStatusOnBatch=Sí (se requiere lote / serie) ProductStatusNotOnBatch=No (lote / serie no utilizado) Batch=Lote / Serie atleast1batchfield=Fecha de consumición o Fecha de venta o Número de lote / serie diff --git a/htdocs/langs/es_AR/products.lang b/htdocs/langs/es_AR/products.lang index 32aef2d5d67..a429996096a 100644 --- a/htdocs/langs/es_AR/products.lang +++ b/htdocs/langs/es_AR/products.lang @@ -63,7 +63,6 @@ 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: -AssociatedProductsAbility=Enable Kits (set of several products) KeywordFilter=Filtro por Palabra Clave CategoryFilter=Filtro por Categoría ExportDataset_produit_1=Productos diff --git a/htdocs/langs/es_AR/stocks.lang b/htdocs/langs/es_AR/stocks.lang index c291bc59434..073b81ff3d1 100644 --- a/htdocs/langs/es_AR/stocks.lang +++ b/htdocs/langs/es_AR/stocks.lang @@ -1,7 +1,9 @@ # Dolibarr language file - Source file is en_US - stocks +Location=Ubicaciòn inventoryEdit=Editar inventoryDraft=Activos SelectCategory=Filtro por Categoría AddProduct=Agregar inventoryDeleteLine=Eliminar línea ListInventory=Lista +ReOpen=Reabierto diff --git a/htdocs/langs/es_AR/suppliers.lang b/htdocs/langs/es_AR/suppliers.lang index e6c3154b840..48f940c23f7 100644 --- a/htdocs/langs/es_AR/suppliers.lang +++ b/htdocs/langs/es_AR/suppliers.lang @@ -1,5 +1,6 @@ # Dolibarr language file - Source file is en_US - suppliers SuppliersInvoice=Factura de Proveedor +SupplierInvoices=Facturas de proveedores ShowSupplierInvoice=Mostrar Factura de Proveedor ListOfSuppliers=Lista de proveedores ShowSupplier=Mostrar Proveedor diff --git a/htdocs/langs/es_AR/website.lang b/htdocs/langs/es_AR/website.lang index ff1df53c2d8..eaf6e953faa 100644 --- a/htdocs/langs/es_AR/website.lang +++ b/htdocs/langs/es_AR/website.lang @@ -1,3 +1,5 @@ # Dolibarr language file - Source file is en_US - website ReadPerm=Leído WebsiteAccounts=Cuentas de sitio web +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_AR/withdrawals.lang b/htdocs/langs/es_AR/withdrawals.lang index 5e623914282..dfd195fbf17 100644 --- a/htdocs/langs/es_AR/withdrawals.lang +++ b/htdocs/langs/es_AR/withdrawals.lang @@ -76,7 +76,6 @@ PleaseCheckOne=Por favor marque uno sólo DirectDebitOrderCreated=Orden de débito automático %s creada AmountRequested=Monto solicitada CreateForSepa=Crear archivo de débito automático -ICS=Creditor Identifier CI for direct debit END_TO_END=Etiqueta "EndToEndId" SEPA XML: identificación única asignada por transacción USTRD=Etiqueta "Unstructured" SEPA XML ADDDAYS=Agregar días a la fecha de ejecución diff --git a/htdocs/langs/es_AR/zapier.lang b/htdocs/langs/es_AR/zapier.lang index 86ef12c8559..254f8e2651e 100644 --- a/htdocs/langs/es_AR/zapier.lang +++ b/htdocs/langs/es_AR/zapier.lang @@ -1,3 +1,3 @@ # Dolibarr language file - Source file is en_US - zapier ModuleZapierForDolibarrDesc =Módulo Zapier para Dolibarr -ZapierForDolibarrSetup =Configurar Zapier para Dolibarr +ZapierForDolibarrSetup=Configurar Zapier para Dolibarr diff --git a/htdocs/langs/es_BO/accountancy.lang b/htdocs/langs/es_BO/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_BO/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_BO/admin.lang b/htdocs/langs/es_BO/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_BO/admin.lang +++ b/htdocs/langs/es_BO/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_BO/modulebuilder.lang b/htdocs/langs/es_BO/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_BO/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_BO/products.lang b/htdocs/langs/es_BO/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_BO/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_BO/website.lang b/htdocs/langs/es_BO/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_BO/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_BO/withdrawals.lang b/htdocs/langs/es_BO/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_BO/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_CL/accountancy.lang b/htdocs/langs/es_CL/accountancy.lang index cdb95b2da16..f6e63f0bef1 100644 --- a/htdocs/langs/es_CL/accountancy.lang +++ b/htdocs/langs/es_CL/accountancy.lang @@ -92,7 +92,6 @@ VentilatedinAccount=Vinculado exitosamente a la cuenta de contabilidad NotVentilatedinAccount=No vinculado a la cuenta de contabilidad XLineSuccessfullyBinded=%s productos / servicios vinculados con éxito a una cuenta de contabilidad XLineFailedToBeBinded=%s productos / servicios no estaban vinculados a ninguna cuenta de contabilidad -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comience la clasificación de la página "Encuadernación para hacer" por los elementos más recientes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comience la clasificación de la página "Encuadernación realizada" por los elementos más recientes ACCOUNTING_LENGTH_DESCRIPTION=Truncar descripción de productos y servicios en listados después de x caracteres (Mejor = 50) diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index 4c3bf933e4f..3c5a1423a66 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -27,9 +27,12 @@ UnlockNewSessions=Eliminar bloqueo de conexión YourSession=Tu sesión Sessions=Sesiones de Usuarios WebUserGroup=Usuario / grupo del servidor web +PermissionsOnFilesInWebRoot=Permisos sobre archivos en el directorio raíz web +PermissionsOnFile=Permisos en el archivo %s NoSessionFound=Su configuración de PHP parece no permitir el listado de sesiones activas. El directorio utilizado para guardar sesiones ( <b>%s</b> ) puede estar protegido (por ejemplo, por permisos del sistema operativo o por la directiva PHP open_basedir). DBStoringCharset=Juego de caracteres de base de datos para almacenar datos DBSortingCharset=Juego de caracteres de base de datos para ordenar los datos +HostCharset=Juego de caracteres de host WarningModuleNotActive=El módulo <b>%s</b> 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=Instalación o actualización de Dolibarr @@ -52,6 +55,7 @@ DisableJavascriptNote=Nota: Para propósitos de prueba o depuración. Para la op UseSearchToSelectCompanyTooltip=Además, si tiene un gran número de terceros (> 100 000), puede aumentar la velocidad estableciendo constante COMPANY_DONOTSEARCH_ANYWHERE en 1 en Configuración-> Otro. La búsqueda se limitará al inicio de la cadena. UseSearchToSelectContactTooltip=Además, si tiene un gran número de terceros (> 100 000), puede aumentar la velocidad estableciendo CONTACT_DONOTSEARCH_ANYWHERE constante en 1 en Configuración-> Otro. La búsqueda se limitará al inicio de la cadena. DelaiedFullListToSelectCompany=Espere hasta que se presione una tecla antes de cargar el contenido de la lista de combo de Terceros. <br> Esto puede aumentar el rendimiento si tiene un gran número de terceros, pero es menos conveniente. +DelaiedFullListToSelectContact=Espere hasta que se presione una tecla antes de cargar el contenido de la lista combinada de contactos. <br> Esto puede aumentar el rendimiento si tiene una gran cantidad de contactos, pero es menos conveniente. NumberOfKeyToSearch=Número de caracteres para activar la búsqueda: %s NumberOfBytes=Número de bytes SearchString=Cadena de búsqueda @@ -68,11 +72,14 @@ NextValueForInvoices=Siguiente valor (facturas) NextValueForCreditNotes=Siguiente valor (notas de crédito) NextValueForDeposit=Siguiente valor (pago inicial) NextValueForReplacements=Siguiente valor (reemplazos) +MustBeLowerThanPHPLimit=Nota: su configuración de PHP actualmente limita el máximo para cargar a <b> %s </b> %s, independientemente del valor de este parámetro NoMaxSizeByPHPLimit=Nota: no hay límite establecido en su configuración de PHP MaxSizeForUploadedFiles=Tamaño máximo para los archivos cargados (0 para no permitir ninguna carga) UseCaptchaCode=Use el código gráfico (CAPTCHA) en la página de inicio de sesión AntiVirusCommand=Ruta completa al comando de antivirus +AntiVirusCommandExample=Ejemplo de ClamAv Daemon (requiere clamav-daemon): / usr / bin / clamdscan <br> Ejemplo de ClamWin (muy, muy lento): c: \\ Progra ~ 1 \\ ClamWin \\ bin \\ clamscan.exe AntiVirusParam=Más parámetros en la línea de comando +AntiVirusParamExample=Ejemplo de ClamAv Daemon: --fdpass <br> Ejemplo de ClamWin: --database = "C: \\ Archivos de programa (x86) \\ ClamWin \\ lib" ComptaSetup=Configuración del módulo de contabilidad UserSetup=Configuración de administración de usuario MultiCurrencySetup=Configuración multimoneda @@ -127,6 +134,7 @@ ImportPostgreSqlDesc=Para importar un archivo de copia de seguridad, debe usar e FileNameToGenerate=Nombre de archivo para copia de seguridad: CommandsToDisableForeignKeysForImport=Comando para desactivar claves externas en la importación CommandsToDisableForeignKeysForImportWarning=Obligatorio si desea poder restaurar su volcado sql más tarde +ExportUseMySQLQuickParameter=Utilice el parámetro --quick MySqlExportParameters=Parámetros de exportación de MySQL PostgreSqlExportParameters=Parámetros de exportación de PostgreSQL UseTransactionnalMode=Usa el modo transaccional @@ -144,18 +152,23 @@ FeatureDisabledInDemo=Característica deshabilitada en demostración FeatureAvailableOnlyOnStable=Característica solo disponible en versiones estables oficiales BoxesDesc=Los widgets son componentes que muestran información que puede agregar para personalizar algunas páginas. Puede elegir entre mostrar el widget o no seleccionando la página de destino y haciendo clic en &#39;Activar&#39;, o haciendo clic en la papelera para deshabilitarla. OnlyActiveElementsAreShown=Solo se muestran los elementos de los <a href="%s"> módulos habilitados </a>. +ModulesDesc=Los módulos / aplicaciones determinan qué funciones están disponibles en el software. Algunos módulos requieren que se otorguen permisos a los usuarios después de activar el módulo. Haga clic en el botón de encendido / apagado <span class="small valignmiddle"> %s </span> de cada módulo para habilitar o deshabilitar un módulo / aplicación. ModulesDeployDesc=Si los permisos en su sistema de archivos lo permiten, puede utilizar esta herramienta para implementar un módulo externo. El módulo será visible en la pestaña <strong>%s</strong> . ModulesMarketPlaces=Buscar aplicaciones / módulos externos ModulesDevelopYourModule=Desarrolla tu 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 <a href="https://www.dolistore.com">activar</a> el sitio web <a href="https://www.dolistore.com">www.dolistore.com</a> 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) ... +NewModule=Nuevo modulo NotCompatible=Este módulo no parece compatible con su Dolibarr %s (Min. %s - Max. %s). CompatibleAfterUpdate=Este módulo requiere una actualización de su Dolibarr %s (Min. %s - Max. %s). SeeInMarkerPlace=Ver en Market place +SeeSetupOfModule=Ver configuración del módulo %s AchatTelechargement=Compra / Descarga GoModuleSetupArea=Para implementar / instalar un nuevo módulo, vaya al área de configuración del módulo: <a href="%s">%s</a> . DoliStoreDesc=DoliStore, el mercado oficial para los módulos externos Dolibarr ERP / CRM +DoliPartnersDesc=Lista de empresas que ofrecen funciones o módulos desarrollados a medida. <br> Nota: dado que Dolibarr es una aplicación de código abierto, <i> cualquier persona </i> con experiencia en programación PHP debería poder desarrollar un módulo. WebSiteDesc=Sitios web externos para más módulos complementarios (no principales) ... +RelativeURL=URL relativa BoxesAvailable=Widgets disponibles BoxesActivated=Widgets activados ActiveOn=Activado en @@ -184,6 +197,7 @@ SpaceX=Espacio X SpaceY=Espacio Y Emails=Correos electrónicos EMailsSetup=Configuración de correos electrónicos +EMailsDesc=Esta página le permite establecer parámetros u opciones para el envío de correo electrónico. EmailSenderProfiles=Perfiles de remitentes de correos electrónicos EMailsSenderProfileDesc=Puedes mantener esta sección vacía. Si ingresa algunos correos electrónicos aquí, se agregarán a la lista de posibles remitentes en el cuadro combinado cuando escriba un nuevo correo electrónico. MAIN_MAIL_SMTP_PORT=Puerto SMTP / SMTPS (valor predeterminado en php.ini: <b>%s</b> ) @@ -201,6 +215,7 @@ MAIN_MAIL_SMTPS_ID=ID de SMTP (si el servidor de envío requiere autenticación) MAIN_MAIL_SMTPS_PW=Contraseña SMTP (si el servidor de envío requiere autenticación) MAIN_MAIL_EMAIL_TLS=Utilizar cifrado TLS (SSL) MAIN_MAIL_EMAIL_STARTTLS=Usar cifrado TLS (STARTTLS) +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autorizar les certificats auto-signés MAIN_MAIL_EMAIL_DKIM_ENABLED=Usa DKIM para generar firma de correo electrónico MAIN_MAIL_EMAIL_DKIM_DOMAIN=Dominio de correo electrónico para usar con dkim MAIN_DISABLE_ALL_SMS=Deshabilitar todo el envío de SMS (para propósitos de prueba o demostraciones) @@ -211,6 +226,7 @@ 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 <b>langs / %s</b> y envíe su cambio a www.transifex.com/dolibarr-association/dolibarr/ +SubmitTranslationENUS=Si la traducción para este idioma no está completa o encuentra errores, puede corregir esto editando los archivos en el directorio <b> langs / %s </b> y envíe los archivos modificados en dolibarr.org/forum o, si es un desarrollador, con un PR 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) @@ -236,9 +252,9 @@ CallUpdatePage=Vaya a la página que actualiza la estructura de la base de datos LastActivationIP=Última activación IP UpdateServerOffline=Servidor de actualización fuera de línea WithCounter=Administrar un contador -GenericMaskCodes=Puede ingresar cualquier máscara de numeración. En esta máscara, se podrían usar las siguientes etiquetas:<br><b> {000000}</b> corresponde a un número que se incrementará en cada %s. Ingrese tantos ceros como la longitud deseada del contador. El contador se completará con ceros desde la izquierda para tener tantos ceros como la máscara. <br><b>{000000+000}</b> igual que el anterior, pero se aplica un desplazamiento correspondiente al número a la derecha del signo + a partir del primer %s. <br> <b> {000000@x}</b> igual que el anterior pero el contador se restablece a cero cuando se alcanza el mes x (x entre 1 y 12, o 0 para usar los primeros meses del año fiscal definidos en su configuración, o 99 para restablecer a cero cada mes). Si se usa esta opción y x es 2 o mayor, también se requiere la secuencia {aa} {mm} o {aaaa} {mm}. <br><b>{dd}</b> día (01 a 31).<br><b> {mm}</b> mes (01 a 12). <br> <b>{yy}</b>, <b> {aaaa}</b> o <b>{y}</b> años en 2, 4 o 1 números.<br> -GenericMaskCodes2=<b>{cccc}</b> el código del cliente en n caracteres <br><b>{cccc000}</b> el código del cliente en n caracteres va seguido de un contador dedicado para el cliente. Este contador dedicado al cliente se restablece al mismo tiempo que el contador global. <br><b>{tttt}</b> El código de tipo de tercero en n caracteres (consulte el menú Inicio - Configuración - Diccionario - Tipos de terceros) . Si agrega esta etiqueta, el contador será diferente para cada tipo de tercero.<br> +GenericMaskCodes=Puede ingresar cualquier máscara de numeración. En esta máscara, se pueden utilizar las siguientes etiquetas: <br> <b>{000000}</b> corresponde a un número que se incrementará en cada %s. Ingrese tantos ceros como la longitud deseada del contador. El contador se completará con ceros desde la izquierda para tener tantos ceros como la máscara. <br> <b>{000000+000}</b> igual que el anterior pero se aplica un desplazamiento correspondiente al número a la derecha del signo + comenzando en el primer %s. <br> <b>{000000 @ x}</b> igual que el anterior pero el contador se restablece a cero cuando se alcanza el mes x (x entre 1 y 12, o 0 para usar los primeros meses del año fiscal definido en su configuración, o 99 para poner a cero todos los meses). Si se usa esta opción y x es 2 o superior, entonces también se requiere la secuencia {yy} {mm} o {yyyy} {mm}. <br> <b> {dd} </b> día (01 a 31). <br> <b> {mm} </b> mes (01 a 12). <br> <b> {yy} </b>, <b>{yyyy}</b> o <b> {y} a09a4b0739 números de año más de .f8 <br> GenericMaskCodes3=Todos los demás personajes de la máscara permanecerán intactos. <br> No se permiten espacios. <br> +GenericMaskCodes3EAN=Todos los demás caracteres de la máscara permanecerán intactos (excepto * o? En la 13ª posición en EAN13). <br> No se permiten espacios. <br> En EAN13, el último carácter después del último} en la posición 13 debe ser * o? . Será reemplazado por la clave calculada. <br> GenericMaskCodes4a=<u>Ejemplo en el 99º %s del tercero TheCompany, con fecha 2007-01-31:</u><br> GenericMaskCodes4b=<u>Ejemplo de un tercero creado en 2007-03-01:</u><br> GenericMaskCodes4c=<u>Ejemplo de producto creado el 2007-03-01:</u><br> @@ -265,6 +281,7 @@ ExamplesWithCurrentSetup=Ejemplos con la configuración actual. ListOfDirectories=Lista de directorios de plantillas de OpenDocument ListOfDirectoriesForModelGenODT=Lista de directorios que contienen archivos de plantillas con formato OpenDocument.<br><br>Ponga aquí la ruta completa de directorios.<br>Agregue un retorno de carro entre cada directorio.<br>Para agregar un directorio del módulo GED, agregue aquí <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>. <br><br>Los archivos en esos directorios deben terminar con <b>.odt</b> o <b>.ods</b>. NumberOfModelFilesFound=Número de archivos de plantilla ODT / ODS encontrados en estos directorios +ExampleOfDirectoriesForModelGen=Ejemplos de sintaxis: <br> c: \\ myapp \\ mydocumentdir \\ mysubdir <br> / home / myapp / mydocumentdir / mysubdir <br> DOL_DATA_ROOT / ecm / ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Para saber cómo crear sus plantillas de documento Odt, antes de almacenarlas en esos directorios, lea la documentación wiki: FirstnameNamePosition=Posición del nombre / apellido DescWeather=Las siguientes imágenes se mostrarán en el tablero cuando el número de acciones tardías alcance los siguientes valores: @@ -278,8 +295,11 @@ SmsTestMessage=Mensaje de prueba de __PHONEFROM__ a __PHONETO__ ModuleMustBeEnabledFirst=El módulo <b>%s</b> 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 +PDFDesc=Opciones globales para la generación de PDF +PDFAddressForging=Reglas para la sección 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 Impuesto sobre las ventas / IVA HideDescOnPDF=Ocultar descripción de productos HideRefOnPDF=Ocultar productos ref. HideDetailsOnPDF=Ocultar detalles de líneas de productos @@ -289,11 +309,13 @@ UrlGenerationParameters=Parámetros para asegurar URLs SecurityTokenIsUnique=Use un parámetro de clave segura único para cada URL EnterRefToBuildUrl=Ingrese la referencia para el objeto %s GetSecuredUrl=Obtener URL calculado +ButtonHideUnauthorized=Oculte los botones de acción no autorizados también para los usuarios internos (solo en gris de lo contrario) OldVATRates=Tasa de IVA anterior NewVATRates=Nueva tasa de IVA PriceBaseTypeToChange=Modificar en precios con el valor de referencia base definido en MassConvert=Lanzar la conversión a granel String=Cuerda +String1Line=Cadena (1 línea) Int=Entero Float=Flotador Boolean=Boolean (una casilla de verificación) @@ -305,12 +327,13 @@ ExtrafieldCheckBox=Casillas de verificación ExtrafieldCheckBoxFromList=Casillas de verificación de la mesa ExtrafieldLink=Enlace a un objeto ComputedFormula=Campo computado +ComputedFormulaDesc=Puede ingresar aquí una fórmula usando otras propiedades del objeto o cualquier codificación PHP para obtener un valor calculado dinámico. Puede utilizar cualquier fórmula compatible con PHP, incluido el "?" operador de condición y el siguiente objeto global: <strong> $ db, $ conf, $ langs, $ mysoc, $ user, $ object </strong>. <br> <strong> ADVERTENCIA </strong>: Solo algunas propiedades de $ object pueden estar disponibles. Si necesita propiedades no cargadas, simplemente busque el objeto en su fórmula como en el segundo ejemplo. <br> El uso de un campo calculado significa que no puede ingresar ningún valor desde la interfaz. Además, si hay un error de sintaxis, es posible que la fórmula no devuelva nada. <br> <br> Ejemplo de fórmula: <br> $ object-> id < 10 ? round($object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int) substr ($ mysoc-> zip, 1, 2) ) <br> <br> Ejemplo para volver a cargar el objeto <br> (($ reloadedobj = new Societe ($ db)) && ($ reloadedobj-> fetchNoCompute ($ obj-> id? $ obj-> id: (? $ obj-> id?) > rowid: $ objeto-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1' <br> <br> Otro ejemplo de fórmula para forzar la carga del objeto y su objeto principal: <br> (($ new reloadedobjb )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = new Project ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Proyecto principal no encontrado' Computedpersistent=Almacenar campo computado ExtrafieldParamHelpPassword=Si deja este campo en blanco, significa que este valor se almacenará sin cifrado (el campo solo debe estar oculto con una estrella en la pantalla). <br> Establezca &#39;auto&#39; para usar la regla de cifrado predeterminada para guardar la contraseña en la base de datos (entonces el valor leído será solo el hash, no hay manera de recuperar el valor original) ExtrafieldParamHelpselect=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser &#39;0&#39;) <br><br> por ejemplo: <br> 1, valor1 <br> 2, valor2 <br> código3, valor3 <br> ... <br><br> Para tener la lista dependiendo de otra lista de atributos complementarios: <br> 1, value1 | options_ <i>parent_list_code</i> : parent_key <br> 2, value2 | options_ <i>parent_list_code</i> : parent_key <br><br> Para tener la lista dependiendo de otra lista: <br> 1, valor1 | <i>parent_list_code</i> : parent_key <br> 2, valor2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser &#39;0&#39;) <br><br> por ejemplo: <br> 1, valor1 <br> 2, valor2 <br> 3, valor3 <br> ... ExtrafieldParamHelpradio=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser &#39;0&#39;) <br><br> por ejemplo: <br> 1, valor1 <br> 2, valor2 <br> 3, valor3 <br> ... -ExtrafieldParamHelpchkbxlst=La lista de valores proviene de una tabla. <br> Sintaxis: table_name: label_field: id_field :: filter <br> Ejemplo: c_typent: libelle: id :: filter <br><br> El filtro puede ser una prueba simple (por ejemplo, activo = 1) para mostrar solo el valor activo <br> También puede usar $ ID $ en el filtro, que es la identificación actual del objeto actual <br> Para hacer un SELECCIONAR en filtro usa $ SEL $ <br> Si desea filtrar en campos adicionales use la sintaxis extra.fieldcode = ... (donde código de campo es el código de campo adicional) <br><br> Para tener la lista dependiendo de otra lista de atributos complementarios: <br> c_typent: libelle: id: options_ <i>parent_list_code</i> | parent_column: filter <br><br> Para tener la lista dependiendo de otra lista: <br> c_typent: libelle: id: <i>parent_list_code</i> | parent_column: filter +ExtrafieldParamHelpsellist=La lista de valores proviene de una tabla <br> Sintaxis: nombre_tabla: campo_etiqueta: campo_id .: filtrosql <br> Ejemplo: c_typent: libelle: id :: filtrosql <br> <br> - id2 campo_entrada de SQL es condición necesaria. Puede ser una prueba simple (por ejemplo, activo = 1) para mostrar solo el valor activo <br> También puede usar $ ID $ en el filtro, que es el ID actual del objeto actual <br> Para usar un SELECT en el filtro, use la palabra clave $ SEL $ para Bypass de protección antiinyección. <br> si desea filtrar en campos extra, use la sintaxis extra.fieldcode = ... (donde el código de campo es el código del campo extra) <br> <br> Para que la lista dependa de otra lista de atributos complementarios: <br> c_ty: opciones <i> parent_list_code </i> | parent_column: filter <br> <br> Para que la lista dependa de otra lista: <br> c_typent: libf64c1e8 parent_column: <br> ExtrafieldParamHelpSeparator=Mantener vacío para un separador simple <br> Establezca esto en 1 para un separador de colapso (abierto de forma predeterminada para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) <br> Establezca esto en 2 para un separador de colapso (colapsado por defecto para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) LibraryToBuildPDF=Biblioteca utilizada para la generación de PDF LocalTaxDesc=Algunos países pueden aplicar dos o tres impuestos en cada línea de factura. Si este es el caso, elija el tipo para el segundo y tercer impuesto y su tasa. Los tipos posibles son: <br> 1: el impuesto local se aplica a los productos y servicios sin IVA (el impuesto local se calcula sobre el monto sin impuestos) <br> 2: el impuesto local se aplica a los productos y servicios, incluido el IVA <br> 3: el impuesto local se aplica a los productos sin IVA (el impuesto local se calcula sobre el monto sin impuestos) <br> 4: el impuesto local se aplica a los productos, incluido el IVA <br> 5: el impuesto local se aplica a los servicios sin IVA (el impuesto local se calcula sobre el monto sin impuestos) <br> 6: el impuesto local se aplica a los servicios, incluido el IVA (el impuesto local se calcula sobre el monto + impuesto) @@ -438,10 +461,10 @@ Module2660Desc=Habilitar el cliente de servicios web de Dolibarr (puede usarse p Module2700Desc=Utilice el servicio Gravatar en línea (www.gravatar.com) para mostrar la foto de los usuarios / miembros (que se encuentra en sus correos electrónicos). Necesita acceso a internet Module2900Desc=Capacidades de conversiones GeoIP Maxmind Module3200Desc=Habilitar un registro inalterable de eventos empresariales. Los eventos se archivan en tiempo real. El registro es una tabla de solo lectura de eventos encadenados que se pueden exportar. Este módulo puede ser obligatorio para algunos países. +Module3400Name=Redes Sociales Module4000Desc=Gestión de recursos humanos (gestión del departamento, contratos de empleados y sentimientos) Module5000Name=Multi-compañía Module5000Desc=Le permite administrar múltiples compañías -Module6000Desc=Gestión de flujo de trabajo (creación automática de objeto y / o cambio de estado automático) Module20000Name=Gestión de solicitudes de licencia Module20000Desc=Definir y rastrear las solicitudes de permiso de los empleados. Module39000Desc=Lotes, números de serie, gestión de la fecha de caducidad de los productos. @@ -455,7 +478,6 @@ Module50400Name=Contabilidad (doble entrada) Module54000Desc=Impresión directa (sin abrir los documentos) mediante la interfaz IPP de Cups (la impresora debe estar visible desde el servidor y CUPS debe estar instalada en el servidor). Module55000Name=Encuesta, encuesta o voto Module55000Desc=Cree encuestas en línea, encuestas o votos (como Doodle, Studs, RDVz, etc.) -Module59000Desc=Module to follow margins Module60000Desc=Módulo para gestionar comisiones Module62000Desc=Añadir características para gestionar Incoterms. Module63000Desc=Gestionar recursos (impresoras, coches, salas, ...) para asignar a eventos. @@ -559,7 +581,6 @@ Permission253=Crea / modifica otros usuarios, grupos y permisos. PermissionAdvanced253=Crear/modificar usuarios y permisos internos / externos Permission254=Crear/modificar solo usuarios externos Permission256=Eliminar o deshabilitar a otros usuarios -Permission262=Extienda el acceso a todos los terceros (no solo a terceros para los cuales ese usuario es un representante de ventas). <br> No es efectivo para usuarios externos (siempre se limita a ellos mismos para propuestas, pedidos, facturas, contratos, etc.). <br> No es efectivo para proyectos (solo reglas sobre permisos de proyectos, visibilidad y asignaciones). Permission271=Lee CA Permission272=Leer facturas Permission273=Emitir facturas @@ -782,7 +803,6 @@ Delays_MAIN_DELAY_EXPENSEREPORTS=Informe de gastos para aprobar SetupDescription1=Antes de comenzar a utilizar Dolibarr, se deben definir algunos parámetros iniciales y habilitar / configurar los módulos. SetupDescription2=Las siguientes dos secciones son obligatorias (las dos primeras entradas en el menú de configuración): SetupDescription5=Otras entradas del menú de configuración manejan parámetros opcionales. -LogEvents=Eventos de auditoría de seguridad InfoDolibarr=Sobre Dolibarr InfoBrowser=Acerca del navegador InfoOS=Sobre OS @@ -831,7 +851,6 @@ ForcedToByAModule=Esta regla es forzada a <b>%s</b> por un módulo activado RunningUpdateProcessMayBeRequired=Parece que se requiere ejecutar el proceso de actualización (la versión del programa %s difiere de la versión de la base de datos %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Debe ejecutar este comando desde la línea de comando después de iniciar sesión en un shell con el usuario <b>%s</b> o debe agregar la opción -W al final de la línea de comandos para proporcionar una contraseña de <b>%s</b>. DownloadMoreSkins=Más pieles para descargar -SimpleNumRefModelDesc=Devuelve el número de referencia con el formato %syymm-nnnn donde yy es año, mm es mes y nnnn es secuencial sin restablecimiento ShowProfIdInAddress=Mostrar identificación profesional con direcciones ShowVATIntaInAddress=Ocultar número de IVA intracomunitario con direcciones MeteoStdMod=Modo estandar @@ -841,7 +860,6 @@ ExternalAccess=Acceso externo / internet MAIN_PROXY_USE=Utilice un servidor proxy (de lo contrario el acceso es directo a internet) MAIN_PROXY_HOST=Servidor proxy: Nombre / Dirección MAIN_PROXY_USER=Servidor proxy: Login / Usuario -DefineHereComplementaryAttributes=Defina aquí cualquier atributo adicional / personalizado que desee incluir para: %s ExtraFields=Atributos complementarios ExtraFieldsLines=Atributos complementarios (líneas) ExtraFieldsLinesRec=Atributos complementarios (líneas plantillas de facturas) @@ -1085,7 +1103,6 @@ ProductServiceSetup=Configuración de módulos de productos y servicios NumberOfProductShowInSelect=Número máximo de productos para mostrar en las listas de selección de combo (0 = sin límite) ViewProductDescInFormAbility=Mostrar descripciones de productos en formularios (de lo contrario, se muestra en una ventana emergente de información sobre herramientas) MergePropalProductCard=Activar en el producto / servicio pestaña Archivos adjuntos una opción para combinar el documento PDF del producto con la propuesta PDF azur si el producto / servicio figura en la propuesta -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Además, si tiene una gran cantidad de productos (&gt; 100 000), puede aumentar la velocidad configurando la constante PRODUCT_DONOTSEARCH_ANYWHERE en 1 en Configuración-&gt; Otros. La búsqueda se limitará entonces al inicio de la cadena. UseSearchToSelectProduct=Espere hasta que presione una tecla antes de cargar el contenido de la lista de combo de productos (esto puede aumentar el rendimiento si tiene una gran cantidad de productos, pero es menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras predeterminado para usar en productos @@ -1280,7 +1297,6 @@ BackgroundTableLineOddColor=Color de fondo para las líneas de mesa impares BackgroundTableLineEvenColor=Color de fondo para líneas de mesas uniformes MinimumNoticePeriod=Periodo de preaviso mínimo (Su solicitud de ausencia debe hacerse antes de este retraso) NbAddedAutomatically=Cantidad de días añadidos a los contadores de usuarios (automáticamente) cada mes -EnterAnyCode=Este campo contiene una referencia para identificar la línea. Ingrese cualquier valor de su elección, pero sin caracteres especiales. UnicodeCurrency=Ingrese aquí entre llaves, lista de bytes que representan el símbolo de moneda. Por ejemplo: para $, ingrese [36] - para brasil R $ [82,36] - para €, ingrese [8364] ColorFormat=El color RGB está en formato HEX, por ejemplo: FF0000 PositionIntoComboList=Posición de la línea en listas combinadas @@ -1342,7 +1358,6 @@ WarningNoteModulePOSForFrenchLaw=Este módulo %s cumple con las leyes francesas WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el módulo %s que es un módulo externo. Activar un módulo externo significa que confía en el editor de ese módulo y que está seguro de que este módulo no afecta negativamente el comportamiento de su aplicación y cumple con las leyes de su país (%s). Si el módulo introduce una característica ilegal, usted se hace responsable del uso de software ilegal. NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establezca esto en sí si este grupo es un cálculo de otros grupos -EnterCalculationRuleIfPreviousFieldIsYes=Ingrese la regla de cálculo si el campo anterior se estableció en Sí (por ejemplo, &#39;CODEGRP1 + CODEGRP2&#39;) SeveralLangugeVariatFound=Varias variantes de lenguaje encontradas GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) GDPRContactDesc=Si almacena datos sobre empresas / ciudadanos europeos, puede nombrar al contacto que es responsable del Reglamento general de protección de datos aquí @@ -1353,7 +1368,6 @@ ChartLoaded=Plan de cuenta cargado EnableFeatureFor=Habilitar características para <strong>%s</strong> VATIsUsedIsOff=Nota: La opción de usar el impuesto sobre las ventas o el IVA se ha establecido en <strong>Desactivado</strong> en el menú %s - %s, por lo que el impuesto sobre las ventas o IVA utilizado siempre será 0 para las ventas. SwapSenderAndRecipientOnPDF=Intercambiar la posición de la dirección del remitente y el destinatario en documentos PDF -FeatureSupportedOnTextFieldsOnly=Advertencia, función compatible solo en los campos de texto. También se debe establecer un parámetro de URL action = create o action = edit O el nombre de la página debe terminar con &#39;new.php&#39; para activar esta función. EmailCollector=Recolector de correo electronico EmailCollectorDescription=Agregue un trabajo programado y una página de configuración para escanear los buzones de correo electrónico con regularidad (utilizando el protocolo IMAP) y registre los correos electrónicos recibidos en su aplicación, en el lugar correcto y / o cree algunos registros automáticamente (como clientes potenciales). NewEmailCollector=Nuevo coleccionista de email diff --git a/htdocs/langs/es_CL/bills.lang b/htdocs/langs/es_CL/bills.lang index f32781fb498..86d0036c381 100644 --- a/htdocs/langs/es_CL/bills.lang +++ b/htdocs/langs/es_CL/bills.lang @@ -39,10 +39,11 @@ CardBill=Tarjeta de factura PredefinedInvoices=Facturas Predefinidas InvoiceCustomer=Factura del cliente CustomerInvoice=Factura del cliente -CustomersInvoices=Facturas de clientes +CustomersInvoices=Facturas de cliente SupplierInvoice=Factura del proveedor +SuppliersInvoices=Facturas del vendedor SupplierBill=Factura del proveedor -SupplierBills=facturas de proveedores +SupplierBills=Facturas del vendedor paymentInInvoiceCurrency=en la moneda de las facturas DeletePayment=Eliminar pago ConfirmDeletePayment=¿Seguro que quieres eliminar este pago? @@ -376,10 +377,7 @@ YouMustCreateInvoiceFromSupplierThird=Esta opción solo está disponible cuando YouMustCreateStandardInvoiceFirstDesc=Primero debe crear una factura estándar y convertirla en "plantilla" para crear una nueva factura de plantilla PDFSpongeDescription=Factura PDF plantilla de esponja. Una plantilla de factura completa. PDFCrevetteDescription=Plantilla de factura en PDF Crevette. Una plantilla de factura completa para facturas de situación -TerreNumRefModelDesc1=Número de devolución con formato %saaam-nnnn para facturas estándar y %saaam-nnnn para notas de crédito donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0 -MarsNumRefModelDesc1=Número de devolución con el formato %syymm-nnnn para facturas estándar, %syymm-nnnn para facturas de reposición, %syymm-nnnn para facturas de anticipo y %syymm-nnnn para las notas de crédito donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin volver a 0 TerreNumRefModelError=Ya existe una factura que comienza con $ syymm y no es compatible con este modelo de secuencia. Quítelo o cambie el nombre para activar este módulo. -CactusNumRefModelDesc1=Número de devolución con formato %saaam-nnnn para facturas estándar, %saaam-nnnn para notas de abono y %saaam-nnnn para facturas de abono en el que yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0 TypeContact_facture_internal_SALESREPFOLL=Factura de cliente representativa de seguimiento TypeContact_facture_external_BILLING=Contacto cliente de facturación cotización TypeContact_facture_external_SHIPPING=Contacto de envío del cliente @@ -415,7 +413,6 @@ ToCreateARecurringInvoiceGeneAuto=Si necesita que dichas facturas se generen aut DeleteRepeatableInvoice=Eliminar factura de plantilla ConfirmDeleteRepeatableInvoice=¿Estás seguro de que deseas eliminar la factura de la plantilla? CreateOneBillByThird=Cree una factura por un tercero (de lo contrario, una factura por pedido) -BillCreated=%s factura (s) creada (s) AutoFillDateFrom=Establecer fecha de inicio para la línea de servicio con fecha de factura AutoFillDateFromShort=Establecer fecha de inicio AutoFillDateToShort=Establecer fecha de finalización diff --git a/htdocs/langs/es_CL/categories.lang b/htdocs/langs/es_CL/categories.lang index 8a54c49822d..1d59becb058 100644 --- a/htdocs/langs/es_CL/categories.lang +++ b/htdocs/langs/es_CL/categories.lang @@ -12,7 +12,6 @@ SuppliersCategoriesArea=Etiquetas de proveedores / área de categorías CustomersCategoriesArea=Etiquetas de clientes / área de categorías MembersCategoriesArea=Etiquetas de los miembros / área de categorías ContactsCategoriesArea=Etiquetas de contactos / categorías -AccountsCategoriesArea=Etiquetas de cuentas / área de categorías ProjectsCategoriesArea=Área de etiquetas / categorías de proyectos UsersCategoriesArea=Etiquetas de usuarios / área de categorías CatList=Lista de etiquetas / categorías diff --git a/htdocs/langs/es_CL/companies.lang b/htdocs/langs/es_CL/companies.lang index 6b70cfe2d00..5971bf2928e 100644 --- a/htdocs/langs/es_CL/companies.lang +++ b/htdocs/langs/es_CL/companies.lang @@ -205,7 +205,6 @@ CurrentOutstandingBill=Factura pendiente actual OutstandingBill=Max. por factura pendiente OutstandingBillReached=Max. por la factura pendiente alcanzado OrderMinAmount=Monto mínimo para la orden -MonkeyNumRefModelDesc=Devuelva un número con el formato %syymm-nnnn para el código del cliente y %syymm-nnnn para el código del proveedor donde yy es año, mm es mes y nnnn es una secuencia sin interrupción ni devolución a 0. LeopardNumRefModelDesc=El código es libre. Este código se puede modificar en cualquier momento. ManagingDirectors=Nombre del gerente (CEO, director, presidente ...) MergeOriginThirdparty=Tercero duplicado (tercero que desea eliminar) diff --git a/htdocs/langs/es_CL/compta.lang b/htdocs/langs/es_CL/compta.lang index 0f7a9f7764c..b2d4c4a2b91 100644 --- a/htdocs/langs/es_CL/compta.lang +++ b/htdocs/langs/es_CL/compta.lang @@ -110,9 +110,7 @@ NoWaitingChecks=No hay cheques pendientes de depósito. DateChequeReceived=Verificar fecha de recepción NbOfCheques=No. de cheques PaySocialContribution=Pagar un impuesto social / fiscal -ConfirmPaySocialContribution=¿Estás seguro de que quieres clasificar este impuesto social o fiscal como pagado? DeleteSocialContribution=Eliminar un pago de impuestos sociales o fiscales -ConfirmDeleteSocialContribution=¿Estás seguro de que deseas eliminar este pago de impuestos sociales/fiscales? ExportDataset_tax_1=Impuestos y pagos sociales y fiscales CalcModeVATDebt=Modo <b>%sIVA sobre compromisos contables%s</b>. CalcModeVATEngagement=Modo <b>%s IVA en ingresos-gastos%s</b>. @@ -178,7 +176,6 @@ Pcg_subtype=Subtipo Pcg InvoiceLinesToDispatch=Líneas de factura para enviar ByProductsAndServices=Por producto y servicio RefExt=Ref externo -ToCreateAPredefinedInvoice=Para crear una plantilla de factura, cree una factura estándar, luego, sin validarla, haga clic en el botón "%s". LinkedOrder=Enlace a la orden CalculationRuleDesc=Para calcular el IVA total, hay dos métodos: <br>El método 1 es redondear el IVA en cada línea y luego sumarlas.<br> El método 2 es sumar todos los IVA en cada línea, luego redondear el resultado.<br>El resultado final puede diferir de algunos centavos. El modo predeterminado es el modo <b>%s</b>. CalculationRuleDescSupplier=Según el proveedor, elija el método apropiado para aplicar la misma regla de cálculo y obtenga el mismo resultado esperado por su proveedor. diff --git a/htdocs/langs/es_CL/main.lang b/htdocs/langs/es_CL/main.lang index b40800298bc..71be0dfd838 100644 --- a/htdocs/langs/es_CL/main.lang +++ b/htdocs/langs/es_CL/main.lang @@ -180,7 +180,6 @@ UnitPriceHTCurrency=Precio unitario (excl.) (Moneda) UnitPriceTTC=Precio unitario PriceU=ARRIBA. PriceUHT=P.U. (net) -PriceUHTCurrency=U.P (moneda) PriceUTTC=ARRIBA. (inc. impuesto) Amount=Cantidad AmountInvoice=Importe de la factura @@ -460,8 +459,6 @@ Miscellaneous=Diverso GroupBy=Agrupar por... RemoveString=Eliminar la cadena '%s' SomeTranslationAreUncomplete=Algunos de los idiomas ofrecidos pueden estar solo parcialmente traducidos o pueden contener errores. Ayude a corregir su idioma registrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> para agregar sus mejoras. -DirectDownloadLink=Enlace de descarga directa (público / externo) -DirectDownloadInternalLink=Enlace de descarga directa (debe registrarse y necesita permisos) DownloadDocument=Descargar documento ActualizeCurrency=Actualizar la tasa de cambio ModuleBuilder=Módulo y generador de aplicaciones diff --git a/htdocs/langs/es_CL/margins.lang b/htdocs/langs/es_CL/margins.lang index 4e0e7e2941b..7f755f0f46c 100644 --- a/htdocs/langs/es_CL/margins.lang +++ b/htdocs/langs/es_CL/margins.lang @@ -12,7 +12,6 @@ UserMargins=Márgenes de usuario ProductService=Producto o Servicio ChooseProduct/Service=Elija producto o servicio ForceBuyingPriceIfNull=Forzar compra / precio de costo a precio de venta si no se define -ForceBuyingPriceIfNullDetails=Si el precio de compra / costo no está definido, y esta opción es "ON", el margen será cero en línea (precio de compra / costo = precio de venta), de lo contrario ("OFF"), marge será igual al valor predeterminado sugerido. MARGIN_METHODE_FOR_DISCOUNT=Método de margen para descuentos globales UseDiscountAsProduct=Como producto UseDiscountOnTotal=En subtotal diff --git a/htdocs/langs/es_CL/modulebuilder.lang b/htdocs/langs/es_CL/modulebuilder.lang index 062d82e135d..079fb308880 100644 --- a/htdocs/langs/es_CL/modulebuilder.lang +++ b/htdocs/langs/es_CL/modulebuilder.lang @@ -64,6 +64,7 @@ ListOfDictionariesEntries=Lista de entradas del diccionario ListOfPermissionsDefined=Lista de permisos definidos SeeExamples=Ver ejemplos aquí EnabledDesc=Condición para tener este campo activo (Ejemplos: 1 o $ conf-> global-> MYMODULE_MYOPTION) +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty IsAMeasureDesc=¿Se puede acumular el valor de campo para obtener un total en la lista? (Ejemplos: 1 o 0) SearchAllDesc=¿Se utiliza el campo para realizar una búsqueda desde la herramienta de búsqueda rápida? (Ejemplos: 1 o 0) LanguageDefDesc=Ingrese en estos archivos, toda la clave y la traducción para cada archivo de idioma. diff --git a/htdocs/langs/es_CL/orders.lang b/htdocs/langs/es_CL/orders.lang index 3667212a64f..d51b03fd8f4 100644 --- a/htdocs/langs/es_CL/orders.lang +++ b/htdocs/langs/es_CL/orders.lang @@ -111,9 +111,9 @@ TypeContact_order_supplier_external_CUSTOMER=Orden de seguimiento de contacto de Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definido Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON no definido Error_OrderNotChecked=No hay pedidos para facturar seleccionados -PDFEinsteinDescription=A complete order model PDFEdisonDescription=Un modelo de orden simple CreateInvoiceForThisCustomer=Pagar Pedidos +CreateInvoiceForThisSupplier=Pagar Pedidos NoOrdersToInvoice=No hay pedidos facturables CloseProcessedOrdersAutomatically=Clasifique "Procesado" todas las órdenes seleccionadas. OrderCreation=Creación de orden diff --git a/htdocs/langs/es_CL/productbatch.lang b/htdocs/langs/es_CL/productbatch.lang index 2b603794eab..63f552436c8 100644 --- a/htdocs/langs/es_CL/productbatch.lang +++ b/htdocs/langs/es_CL/productbatch.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Use el número de lote / serie -ProductStatusOnBatch=Sí (se requiere lote / serie) ProductStatusNotOnBatch=No (lote / serie no utilizada) Batch=Lote / serie atleast1batchfield=Fecha de caducidad o fecha de caducidad o Número de lote / serie diff --git a/htdocs/langs/es_CL/products.lang b/htdocs/langs/es_CL/products.lang index ddb4957ee49..9f3d2555af4 100644 --- a/htdocs/langs/es_CL/products.lang +++ b/htdocs/langs/es_CL/products.lang @@ -61,7 +61,6 @@ NoteNotVisibleOnBill=Nota (no visible en las facturas, cotizaciones, etc.) ServiceLimitedDuration=Si el producto es un servicio de duración limitada: MultiPricesAbility=Múltiples segmentos de precios por producto / servicio (cada cliente está en un segmento de precios) MultiPricesNumPrices=Cantidad de precios -AssociatedProductsAbility=Enable Kits (set of several products) ParentProductsNumber=Número de producto de embalaje principal ParentProducts=Productos para padres KeywordFilter=Filtro de palabras clave @@ -161,7 +160,6 @@ GlobalVariableUpdaterHelpFormat1=El formato para la solicitud es {"URL": "http:/ CorrectlyUpdated=Correctamente actualizado PropalMergePdfProductActualFile=Los archivos se usan para agregar a PDF Azur son/es PropalMergePdfProductChooseFile=Seleccionar archivos PDF -IncludingProductWithTag=Incluye producto / servicio con etiqueta DefaultPriceRealPriceMayDependOnCustomer=El precio predeterminado, el precio real puede depender del cliente NbOfQtyInProposals=Cantidad en propuestas ClinkOnALinkOfColumn=Haga clic en un enlace de la columna %s para obtener una vista detallada ... diff --git a/htdocs/langs/es_CL/stocks.lang b/htdocs/langs/es_CL/stocks.lang index a4ea45fcfbc..46fffc7d68d 100644 --- a/htdocs/langs/es_CL/stocks.lang +++ b/htdocs/langs/es_CL/stocks.lang @@ -20,8 +20,6 @@ ListMouvementStockProject=Lista de movimientos de stock asociados al proyecto StocksArea=Área de almacenes IncludeAlsoDraftOrders=Incluir también órdenes de giro. Location=Ubicación -LocationSummary=Nombre corto -NumberOfDifferentProducts=Cantidad de productos diferentes NumberOfProducts=Número total de productos StockCorrection=Corrección de stock CorrectStock=Corregir stock diff --git a/htdocs/langs/es_CL/suppliers.lang b/htdocs/langs/es_CL/suppliers.lang index 8868eb66cea..e18be7902bf 100644 --- a/htdocs/langs/es_CL/suppliers.lang +++ b/htdocs/langs/es_CL/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - suppliers Suppliers=Vendedores SuppliersInvoice=Factura del proveedor +SupplierInvoices=Facturas del vendedor ShowSupplierInvoice=Mostrar factura del vendedor NewSupplier=Nuevo vendedor ListOfSuppliers=Lista de proveedores diff --git a/htdocs/langs/es_CL/ticket.lang b/htdocs/langs/es_CL/ticket.lang index f0511ad43e0..e3e937e670e 100644 --- a/htdocs/langs/es_CL/ticket.lang +++ b/htdocs/langs/es_CL/ticket.lang @@ -41,8 +41,6 @@ TicketsLogEnableEmail=Habilitar registro por correo electrónico TicketsLogEnableEmailHelp=En cada cambio, se enviará un correo electrónico ** a cada contacto ** asociado con el ticket. TicketsShowModuleLogoHelp=Habilite esta opción para ocultar el módulo de logotipo en las páginas de la interfaz pública TicketsShowCompanyLogoHelp=Habilite esta opción para ocultar el logotipo de la empresa principal en las páginas de la interfaz pública -TicketsEmailAlsoSendToMainAddress=También envíe notificaciones a la dirección de correo electrónico principal -TicketsEmailAlsoSendToMainAddressHelp=Habilite esta opción para enviar un correo electrónico a la dirección "Correo electrónico de notificación de" (consulte la configuración a continuación) TicketsLimitViewAssignedOnly=Restrinja la visualización a los tickets asignados al usuario actual (no es efectivo para usuarios externos, siempre debe limitarse al tercero del que dependen) TicketsLimitViewAssignedOnlyHelp=Solo las entradas asignadas al usuario actual serán visibles. No se aplica a un usuario con derechos de gestión de tickets. TicketsActivatePublicInterface=Activar la interfaz pública diff --git a/htdocs/langs/es_CL/website.lang b/htdocs/langs/es_CL/website.lang index 4f997504810..874188e8088 100644 --- a/htdocs/langs/es_CL/website.lang +++ b/htdocs/langs/es_CL/website.lang @@ -28,11 +28,9 @@ SetAsHomePage=Establecer como página de inicio RealURL=URL real ViewWebsiteInProduction=Ver el sitio web usando las URL de origen YouCanAlsoTestWithPHPS=<u>Usar con el servidor PHP incorporado</u> <br> En el entorno de desarrollo, es posible que prefiera probar el sitio con el servidor web incorporado PHP (se requiere PHP 5.5) ejecutando <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> -CheckVirtualHostPerms=Compruebe también que el host virtual tiene permiso <strong>%s</strong>en los archivos en<br><strong>%s</strong> ReadPerm=Leer TestDeployOnWeb=Prueba / despliegue en la web PreviewSiteServedByWebServer=<u> Obtenga una vista previa de %s en una nueva pestaña. </ u> <br> <br> El %s será atendido por un servidor web externo (como Apache, Nginx, IIS). Debe instalar y configurar este servidor antes de apuntar al directorio: <br> <strong> %s </ strong> <br> URL servida por un servidor externo: <br> <strong> %s </ strong> -PreviewSiteServedByDolibarr=<u> Obtenga una vista previa de %s en una nueva pestaña. </ u> <br> <br> El servidor Dolibarr servirá %s, por lo que no necesita ningún servidor web adicional (como Apache, Nginx, IIS) para su instalación. < br> El inconveniente es que la URL de las páginas no es fácil de usar y comienza con la ruta de Dolibarr. <br> URL servida por Dolibarr: <br> <strong> %s </ strong> <br> <br> Para usar la suya servidor web externo para servir a este sitio web, crear un servidor virtual en su servidor web que apunte en el directorio <br> <strong> %s </ strong> <br> y luego ingresar el nombre de este servidor virtual y hacer clic en el otro botón de vista previa . VirtualHostUrlNotDefined=La URL del servidor virtual servido por un servidor web externo no está definido NoPageYet=No hay páginas aún SyntaxHelp=Ayuda en consejos de sintaxis específicos @@ -71,3 +69,5 @@ EditInLineOnOff=El modo &#39;Editar en línea&#39; es %s ShowSubContainersOnOff=El modo para ejecutar &#39;contenido dinámico&#39; es %s GlobalCSSorJS=Archivo global CSS / JS / Header del sitio web TranslationLinks=Enlaces de Traducción +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_CL/withdrawals.lang b/htdocs/langs/es_CL/withdrawals.lang index a205a30add6..ae95201deba 100644 --- a/htdocs/langs/es_CL/withdrawals.lang +++ b/htdocs/langs/es_CL/withdrawals.lang @@ -79,7 +79,6 @@ PleaseCheckOne=Por favor marque uno solo DirectDebitOrderCreated=Orden de débito directo %s creado AmountRequested=Monto solicitado CreateForSepa=Crear un archivo de débito directo -ICS=Creditor Identifier CI for direct debit END_TO_END=Etiqueta XML SEPA &quot;EndToEndId&quot; - ID única asignada por transacción USTRD=Etiqueta XML no estructurada de SEPA InfoCreditSubject=Pago de la orden de pago de débito directo %s por el banco diff --git a/htdocs/langs/es_CO/accountancy.lang b/htdocs/langs/es_CO/accountancy.lang index 08958e517aa..a1fb58e3305 100644 --- a/htdocs/langs/es_CO/accountancy.lang +++ b/htdocs/langs/es_CO/accountancy.lang @@ -83,7 +83,6 @@ VentilatedinAccount=Enlazado exitosamente a la cuenta contable. NotVentilatedinAccount=No vinculado a la cuenta contable. XLineSuccessfullyBinded=%s productos / servicios vinculados con éxito a una cuenta contable XLineFailedToBeBinded=%s productos / servicios no estaban vinculados a ninguna cuenta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comience la clasificación de la página "Enlace para hacer" según los elementos más recientes. ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comience la clasificación de la página "Encuadernación hecha" por los elementos más recientes. ACCOUNTING_LENGTH_DESCRIPTION=Truncar la descripción de productos y servicios en las listas después de x caracteres (Mejor = 50) diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index b8ca38f6387..cc43022632d 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -213,9 +213,6 @@ LastActivationAuthor=Autor de activación más reciente LastActivationIP=Última activación de IP UpdateServerOffline=Actualizar servidor fuera de línea WithCounter=Manejar un contador -GenericMaskCodes=Puede introducir cualquier máscara de numeración. En esta máscara, se podrían usar las siguientes etiquetas: <br> <b> {000000} </b> corresponde a un número que se incrementará en cada %s. Introduzca tantos ceros como la longitud deseada del contador. El contador se completará con ceros desde la izquierda para tener tantos ceros como la máscara. <br> <b> {000000 + 000} </b> igual que el anterior, pero se aplica un desplazamiento correspondiente al número a la derecha del signo + a partir del primer %s. <br> <b> {000000 @ x} </b> igual que el anterior, pero el contador se restablece a cero cuando se alcanza el mes x (x entre 1 y 12, o 0 para usar los primeros meses del año fiscal definido en su configuración, o 99 para restablecer a cero cada mes). Si se usa esta opción y x es 2 o superior, entonces también se requiere la secuencia {yy} {mm} o {aaaa} {mm}. <br> <b> {dd} </b> día (01 a 31). <br> <b> {mm} </b> mes (01 a 12). <br> <b> {yy} < / b>, <b> {aaaa} </b> o <b> {y} </b> año sobre 2, 4 o 1 números. <br> -GenericMaskCodes2=<b> {cccc} </b> el código del cliente en n caracteres <br> <b> {cccc000} </b> el código del cliente en n caracteres va seguido de un contador dedicado al cliente. Este contador dedicado al cliente se reinicia al mismo tiempo que el contador global. <br> <b> {tttt} </b> El código del tipo de tercero en n caracteres (ver menú Inicio - Configuración - Diccionario - Tipos de terceros) . Si agrega esta etiqueta, el contador será diferente para cada tipo de tercero. <br> -GenericMaskCodes3=Todos los demás caracteres de la máscara permanecerán intactos. <br> Los espacios no están permitidos. <br> GenericMaskCodes4a=<u> Ejemplo en la 99a %s de TheCompany de terceros, con fecha 2007-01-31: </u> <br> GenericMaskCodes4b=<u> Ejemplo de un tercero creado el 2007-03-01: </u> <br> GenericMaskCodes4c=<u> Ejemplo de producto creado el 2007-03-01: </u> <br> @@ -362,13 +359,11 @@ Module2900Desc=Capacidades de conversiones de GeoIP Maxmind Module3200Desc=Habilitar un registro inalterable de eventos empresariales. Los eventos se archivan en tiempo real. El registro es una tabla de solo lectura de eventos encadenados que se pueden exportar. Este módulo puede ser obligatorio para algunos países. Module4000Desc=Gestión de recursos humanos (gestión de departamento, contratos de empleados y sentimientos). Module5000Desc=Le permite gestionar múltiples empresas. -Module6000Desc=Gestión del flujo de trabajo (creación automática de objeto y / o cambio automático de estado) Module40000Name=Multi moneda Module40000Desc=Utilizar monedas alternativas en precios y documentos. Module50000Name=Caja de pago Module54000Desc=Impresión directa (sin abrir los documentos) mediante la interfaz IPP de Cups (la impresora debe estar visible desde el servidor y CUPS debe estar instalada en el servidor). Module55000Name=Encuesta, encuesta o voto -Module59000Desc=Module to follow margins Module60000Desc=Módulo para gestionar comisiones. Module62000Desc=Añadir características para gestionar Incoterms. Permission11=Lea las facturas de los clientes. @@ -626,7 +621,6 @@ BankModuleNotActive=Módulo de cuentas bancarias no habilitado ShowBugTrackLink=Mostrar enlace "<strong> %s </strong>" Alerts=Las alertas SetupDescription1=Antes de comenzar a utilizar Dolibarr, se deben definir algunos parámetros iniciales y habilitar / configurar los módulos. -LogEvents=Eventos de auditoria de seguridad InfoDolibarr=Sobre Dolibarr InfoBrowser=Acerca del navegador InfoOS=Sobre el sistema operativo @@ -859,7 +853,6 @@ ProductSetup=Configuración del módulo de productos ServiceSetup=Configuración del módulo de servicios ProductServiceSetup=Configuración de módulos de productos y servicios. MergePropalProductCard=Active en la pestaña Archivos adjuntos del producto / servicio una opción para fusionar el documento PDF del producto a la propuesta PDF azur si el producto / servicio está en la propuesta -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Además, si tiene una gran cantidad de productos (> 100 000), puede aumentar la velocidad configurando la constante PRODUCT_DONOTSEARCH_ANYWHERE en 1 en Configuración-> Otros. La búsqueda se limitará entonces al inicio de la cadena. UseSearchToSelectProduct=Espere hasta que presione una tecla antes de cargar el contenido de la lista de combo de productos (esto puede aumentar el rendimiento si tiene una gran cantidad de productos, pero es menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras predeterminado para usar en productos @@ -1094,7 +1087,6 @@ TypeCdr=Use "Ninguno" si la fecha del plazo de pago es la fecha de la factura m WarningNoteModulePOSForFrenchLaw=Este módulo %s cumple con las leyes francesas (Loi Finance 2016) porque el módulo de Registros no reversibles se activa automáticamente. WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el módulo %s que es un módulo externo. Activar un módulo externo significa que confía en el editor de ese módulo y que está seguro de que este módulo no afecta negativamente el comportamiento de su aplicación y cumple con las leyes de su país (%s). Si el módulo introduce una característica ilegal, usted se hace responsable del uso de software ilegal. SetToYesIfGroupIsComputationOfOtherGroups=Establézcalo en sí si este grupo es un cálculo de otros grupos -EnterCalculationRuleIfPreviousFieldIsYes=Ingrese la regla de cálculo si el campo anterior se estableció en Sí (por ejemplo, 'CODEGRP1 + CODEGRP2') COMPANY_AQUARIUM_CLEAN_REGEX=Filtro de expresiones regulares para limpiar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) HelpOnTooltip=Texto de ayuda para mostrar en información sobre herramientas diff --git a/htdocs/langs/es_CO/bills.lang b/htdocs/langs/es_CO/bills.lang index 9fc8e78e7ab..4b9cf5dc637 100644 --- a/htdocs/langs/es_CO/bills.lang +++ b/htdocs/langs/es_CO/bills.lang @@ -37,7 +37,8 @@ PredefinedInvoices=Facturas predefinidas InvoiceCustomer=Factura del cliente CustomerInvoice=Factura del cliente CustomersInvoices=Facturas de clientes -SupplierBills=proveedores facturas +SuppliersInvoices=Facturas de proveedores +SupplierBills=Facturas de proveedores paymentInInvoiceCurrency=en facturas moneda DeletePayment=Eliminar pago ConfirmDeletePayment=¿Estás seguro de que quieres eliminar este pago? @@ -327,9 +328,7 @@ NoteListOfYourUnpaidInvoices=Nota: Esta lista solo contiene facturas para tercer YouMustCreateStandardInvoiceFirstDesc=Primero debe crear una factura estándar y convertirla en "plantilla" para crear una nueva factura de plantilla PDFSpongeDescription=Factura PDF plantilla de esponja. Una plantilla de factura completa. PDFCrevetteDescription=Plantilla PDF factura Crevette. Una plantilla de factura completa para facturas de situación. -TerreNumRefModelDesc1=Número de devolución con formato %syymm-nnnn para facturas estándar y %syymm-nnnn para notas de crédito donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0 TerreNumRefModelError=Ya existe una factura que comienza con $ syymm y no es compatible con este modelo de secuencia. Quítalo o renómbrelo para activar este módulo. -CactusNumRefModelDesc1=Número de devolución con formato %syymm-nnnn para facturas estándar, %syymm-nnnn para notas de crédito y %syymm-nnnn para facturas de anticipo donde yy es año, mm es mes y nnn es una secuencia sin interrupción y sin retorno a 0 TypeContact_facture_internal_SALESREPFOLL=Representante de seguimiento de la factura del cliente. TypeContact_facture_external_BILLING=Contacto factura cliente TypeContact_facture_external_SHIPPING=Contacto de envío del cliente @@ -337,6 +336,7 @@ TypeContact_facture_external_SERVICE=Contacto de servicio al cliente InvoiceFirstSituationAsk=Primera situación factura InvoiceFirstSituationDesc=Las <b> facturas de situación </b> están vinculadas a situaciones relacionadas con una progresión, por ejemplo, la progresión de una construcción. Cada situación está vinculada a una factura. InvoiceSituation=Factura de situacion +PDFInvoiceSituation=Factura de situacion InvoiceSituationAsk=Factura siguiendo la situacion. InvoiceSituationDesc=Crear una nueva situación siguiendo una ya existente. SituationAmount=Importe de la factura de situación (neto) @@ -363,7 +363,6 @@ ToCreateARecurringInvoiceGene=Para generar facturas futuras de forma regular y m DeleteRepeatableInvoice=Eliminar factura de plantilla ConfirmDeleteRepeatableInvoice=¿Está seguro de que desea eliminar la plantilla de factura? CreateOneBillByThird=Cree una factura por tercero (de lo contrario, una factura por pedido) -BillCreated=%s factura (s) creadas StatusOfGeneratedDocuments=Estado de generación de documentos AutogenerateDoc=Auto generar archivo de documento AutoFillDateFrom=Establecer fecha de inicio para línea de servicio con fecha de factura diff --git a/htdocs/langs/es_CO/compta.lang b/htdocs/langs/es_CO/compta.lang index 0466a9ef875..0b16bb527cd 100644 --- a/htdocs/langs/es_CO/compta.lang +++ b/htdocs/langs/es_CO/compta.lang @@ -113,9 +113,7 @@ NoWaitingChecks=No hay cheques a la espera de depósito. DateChequeReceived=Verifique la fecha de recepción NbOfCheques=No. de cheques PaySocialContribution=Pagar un impuesto social / fiscal -ConfirmPaySocialContribution=¿Está seguro de que desea clasificar este impuesto social o fiscal como pagado? DeleteSocialContribution=Eliminar un pago fiscal social o fiscal. -ConfirmDeleteSocialContribution=¿Está seguro de que desea eliminar este pago fiscal social / fiscal? ExportDataset_tax_1=Impuestos y pagos sociales y fiscales. CalcModeVATDebt=Modo <b> %sVAT en contabilidad de compromiso%s </b>. CalcModeVATEngagement=Modo <b> %sVAT en ingresos-expenses%s </b>. @@ -184,7 +182,6 @@ Pcg_subtype=Subtipo pcg InvoiceLinesToDispatch=Facturas de facturas a despachar. ByProductsAndServices=Por producto y servicio. RefExt=Ref externo -ToCreateAPredefinedInvoice=Para crear una factura de plantilla, cree una factura estándar, luego, sin validarla, haga clic en el botón "%s". LinkedOrder=Enlace a pedido CalculationRuleDesc=Para calcular el IVA total, hay dos métodos: <br> El método 1 es redondear la tina en cada línea, luego sumarlos. <br> El método 2 es sumar todas la tina en cada línea, luego redondear el resultado. <br> El resultado final puede diferir de unos céntimos. El modo predeterminado es el modo <b> %s </b>. CalculationRuleDescSupplier=Según el proveedor, elija el método apropiado para aplicar la misma regla de cálculo y obtener el mismo resultado esperado por su proveedor. @@ -214,7 +211,6 @@ AccountingAffectation=Asignación de contabilidad LastDayTaxIsRelatedTo=Último día del período en que el impuesto está relacionado con VATDue=Impuesto de venta reclamado ClaimedForThisPeriod=Reclamado por el período -PaidDuringThisPeriod=Pagado durante este periodo ByVatRate=Por impuesto de venta TurnoverbyVatrate=Facturación facturada por impuesto de venta TurnoverCollectedbyVatrate=Volumen de negocios recaudado por tasa de impuesto de venta diff --git a/htdocs/langs/es_CO/main.lang b/htdocs/langs/es_CO/main.lang index cf729c5dde4..e50d0cad34a 100644 --- a/htdocs/langs/es_CO/main.lang +++ b/htdocs/langs/es_CO/main.lang @@ -86,7 +86,6 @@ MinuteShort=Minnesota UseLocalTax=Incluir impuestos UserModif=Usuario de la última actualización. DefaultValues=Valores predeterminados / filtros / clasificación -PriceUHTCurrency=U.P (moneda) PriceUTTC=ARRIBA. (inc. impuestos) MulticurrencyAlreadyPaid=Ya pagado, moneda original. MulticurrencyRemainderToPay=Quedan por pagar, moneda original. @@ -193,8 +192,6 @@ ExportList=Lista de exportación Miscellaneous=Diverso GroupBy=Agrupar por... SomeTranslationAreUncomplete=Algunos de los idiomas ofrecidos pueden estar solo parcialmente traducidos o pueden contener errores. Ayude a corregir su idioma registrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ < / a> para añadir tus mejoras. -DirectDownloadLink=Enlace de descarga directa (público / externo) -DirectDownloadInternalLink=Enlace de descarga directa (necesita ser registrado y necesita permisos) DownloadDocument=Descargar documento ActualizeCurrency=Tasa de cambio de moneda ClickToShowHelp=Haga clic para mostrar la ayuda de ayuda. @@ -238,7 +235,6 @@ PayedTo=Pagado para AssignedTo=Asignado a Deletedraft=Borrar borrador ConfirmMassDraftDeletion=Confirmación de borrado masivo borrador -FileSharedViaALink=Archivo compartido a través de un enlace. SelectAThirdPartyFirst=Seleccione un tercero primero ... YouAreCurrentlyInSandboxMode=Actualmente se encuentra en el modo "sandbox" %s ContactDefault_agenda=Acción diff --git a/htdocs/langs/es_CO/modulebuilder.lang b/htdocs/langs/es_CO/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_CO/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_CO/orders.lang b/htdocs/langs/es_CO/orders.lang index ddbbf00a6dc..c1a7be94092 100644 --- a/htdocs/langs/es_CO/orders.lang +++ b/htdocs/langs/es_CO/orders.lang @@ -7,7 +7,6 @@ StatusOrderCanceled=Cancelado StatusOrderDraft=Borrador (necesita ser validado) TypeContact_commande_external_BILLING=Contacto factura cliente TypeContact_commande_external_SHIPPING=Contacto de envío del cliente -PDFEinsteinDescription=A complete order model StatusSupplierOrderCanceledShort=Cancelado StatusSupplierOrderCanceled=Cancelado StatusSupplierOrderDraft=Borrador (necesita ser validado) diff --git a/htdocs/langs/es_CO/productbatch.lang b/htdocs/langs/es_CO/productbatch.lang index b49891f9a6b..c1aaffb3380 100644 --- a/htdocs/langs/es_CO/productbatch.lang +++ b/htdocs/langs/es_CO/productbatch.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Use número de lote/serie -ProductStatusOnBatch=Si (lote/serie requerido) ProductStatusNotOnBatch=No (lote/serie no usado) atleast1batchfield=Fecha de consumo o fecha de venta o número de lote/serie batch_number=Número de lote/serie diff --git a/htdocs/langs/es_CO/products.lang b/htdocs/langs/es_CO/products.lang index 19e7fb865c4..fa44c381e34 100644 --- a/htdocs/langs/es_CO/products.lang +++ b/htdocs/langs/es_CO/products.lang @@ -54,7 +54,6 @@ BarcodeValue=Valor de código de barras NoteNotVisibleOnBill=Nota (no visible en facturas, propuestas ...) ServiceLimitedDuration=Si el producto es un servicio con duración limitada: MultiPricesNumPrices=Numero de precios -AssociatedProductsAbility=Enable Kits (set of several products) ParentProductsNumber=Número de producto de embalaje principal ParentProducts=Productos para padres KeywordFilter=Filtro de palabras clave @@ -141,7 +140,6 @@ GlobalVariableUpdaterHelpFormat1=El formato para la solicitud es {"URL": "http:/ CorrectlyUpdated=Correctamente actualizado PropalMergePdfProductActualFile=Los archivos que se usan para agregar a PDF Azur son / son PropalMergePdfProductChooseFile=Seleccionar archivos PDF -IncludingProductWithTag=Incluyendo producto / servicio con etiqueta. DefaultPriceRealPriceMayDependOnCustomer=Precio por defecto, el precio real puede depender del cliente. WarningSelectOneDocument=Por favor seleccione al menos un documento NbOfQtyInProposals=Cantidad en propuestas diff --git a/htdocs/langs/es_CO/suppliers.lang b/htdocs/langs/es_CO/suppliers.lang index 7bd957f2702..004a8c759de 100644 --- a/htdocs/langs/es_CO/suppliers.lang +++ b/htdocs/langs/es_CO/suppliers.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - suppliers +SupplierInvoices=Facturas de proveedores NewSupplier=Nuevo vendedor RefSupplierShort=Árbitro. vendedor diff --git a/htdocs/langs/es_CO/website.lang b/htdocs/langs/es_CO/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_CO/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_CO/withdrawals.lang b/htdocs/langs/es_CO/withdrawals.lang index 4c73e87c98e..33ea339dcd8 100644 --- a/htdocs/langs/es_CO/withdrawals.lang +++ b/htdocs/langs/es_CO/withdrawals.lang @@ -4,4 +4,3 @@ WithdrawalsReceipts=Órdenes de débito directo WithdrawalReceipt=Orden de domiciliación bancaria StatusPaid=Pagado StatusRefused=Rechazado -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_DO/accountancy.lang b/htdocs/langs/es_DO/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_DO/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_DO/admin.lang b/htdocs/langs/es_DO/admin.lang index 5284148aebb..ceed7fa3336 100644 --- a/htdocs/langs/es_DO/admin.lang +++ b/htdocs/langs/es_DO/admin.lang @@ -1,13 +1,12 @@ # Dolibarr language file - Source file is en_US - admin OldVATRates=Tasa de ITBIS antigua NewVATRates=Tasa de ITBIS nueva -Module59000Desc=Module to follow margins Permission91=Consultar impuestos e ITBIS Permission92=Crear/modificar impuestos e ITBIS Permission93=Eliminar impuestos e ITBIS DictionaryVAT=Tasa de ITBIS (Impuesto sobre ventas en EEUU) +ShowBugTrackLink=Show link "<strong>%s</strong>" UnitPriceOfProduct=Precio unitario sin ITBIS de un producto -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) OptionVatMode=Opción de carga de ITBIS OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_DO/modulebuilder.lang b/htdocs/langs/es_DO/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_DO/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_DO/products.lang b/htdocs/langs/es_DO/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_DO/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_DO/website.lang b/htdocs/langs/es_DO/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_DO/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_DO/withdrawals.lang b/htdocs/langs/es_DO/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_DO/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_EC/accountancy.lang b/htdocs/langs/es_EC/accountancy.lang index 828b60ac54e..262f54e0a6e 100644 --- a/htdocs/langs/es_EC/accountancy.lang +++ b/htdocs/langs/es_EC/accountancy.lang @@ -90,7 +90,6 @@ VentilatedinAccount=Vinculado con éxito a la cuenta contable NotVentilatedinAccount=No vinculado a la cuenta contable XLineSuccessfullyBinded=%s productos/servicios vinculados con éxito a una cuenta de contabilidad XLineFailedToBeBinded=Los productos/servicios de%s no estaban vinculados a ninguna cuenta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comienza la clasificación de la página "Vinculación a hacer" por los elementos más recientes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comienza la clasificación de la página "Encuadernación realizada" por los elementos más recientes ACCOUNTING_LENGTH_DESCRIPTION=Truncar la descripción de los productos y servicios en los listados después de los caracteres x (Mejor diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index 61e86a47149..efcb38d1779 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -255,8 +255,6 @@ LastActivationAuthor=Última autor de activación LastActivationIP=Última activación IP UpdateServerOffline=Actualización de servidor fuera de línea WithCounter=Administrar un contador -GenericMaskCodes=Puede ingresar cualquier máscara de numeración. En esta máscara, podrían tener las siguientes etiquetas: <br> <b> {000000} </b> Corresponde a un número que se incrementará en cada %s. Insertar tantos ceros como la longitud deseada del contador. El contador se completa con ceros de la izquierda para tener tantos ceros como la máscara. <br> <b> {000000 + 000} </b> Igual que la anterior, pero se aplica a un desplazamiento correspondiente al número a la derecha del signo +, comenzando en la primera %s. <br> <b> {000000 @ x} </b> Igual a anterior pero el contador se restablece a cero cuando se alcanza el mes x (x entre 1 y 12, o 0 para usar los primeros meses del año fiscal definido en Su configuración o 99 para restablecer un cero cada mes). Si se utiliza esta opción y x es 2 o superior, la secuencia {yy} {mm} o {aaaa} {mm} también se requiere. <br> <b> {dd} </b> día (01 a 31). <br> <b> {mm} </b> mes (01 a 12). <br> <b> {yy} < / b>, <b> {aaaa} </b> o <b> {y} </b> año más de 2, 4 o 1 número. <br> -GenericMaskCodes2=<b> {cccc} </b> El código de cliente en n caracteres <br> <b> {cccc000} </b> El código de cliente en n caracteres es seguido por un contador dedicado para el cliente. El código de tipo de cliente / proveedor en caracteres (ver menú Inicio - configuración - Diccionario - Tipos de cliente / proveedor). Si es esta etiqueta, el contador será diferente para cada tipo de cliente / proveedor. <br> GenericMaskCodes3=Todos los demás caracteres de la máscara permanecerán intactos. <br> No se permiten espacios. <br> GenericMaskCodes4a=<u> Ejemplo en el %s 99 de las empresas externas, con fecha 2007-01-31: </u> <br> GenericMaskCodes4b=<u> Ejemplo de cliente / proveedor creado en 2007-03-01: </u> <br> @@ -334,7 +332,6 @@ ExtrafieldParamHelpPassword=Dejar este campo en blanco significa que este valor ExtrafieldParamHelpselect=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser '0') <br> <br> por ejemplo: <br> 1, value1 <br> 2, value2 <br> code3, value3 < br> ... <br> <br> Para tener la lista dependiendo de otra lista de atributos complementarios: <br> 1, value1 | options_ <i> parent_list_code </i>: parent_key <br> 2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> Para que la lista dependa de otra lista: <br> 1, value1 | <i> parent_list_code </i>: parent_key <br> 2, value2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser '0') <br> <br> por ejemplo: <br> 1, value1 <br> 2, value2 <br> 3, value3 < br> ... ExtrafieldParamHelpradio=La lista de valores debe ser líneas con clave de formato, valor (donde la clave no puede ser '0') <br> <br> por ejemplo: <br> 1, value1 <br> 2, value2 <br> 3, value3 < br> ... -ExtrafieldParamHelpchkbxlst=La lista de valores proviene de una tabla <br> Sintaxis: table_name: label_field: id_field :: filter <br> Ejemplo: c_typent: libelle: id :: filter <br> <br> filter puede ser una prueba simple (por ejemplo, active = 1 ) para mostrar solo el valor activo <br> También puede usar $ ID $ en el filtro, que es el ID actual del objeto actual. Para hacer un SELECCIONAR en el filtro, use $ SEL $ <br> si desea filtrar en campos adicionales. syntax extra.fieldcode = ... (donde código de campo es el código de campo extra) <br> <br> Para tener la lista dependiendo de otra lista de atributos complementarios: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> Para que la lista dependa de otra lista: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter ExtrafieldParamHelpSeparator=Mantener vacío para un separador simple <br> Establezca esto en 1 para un separador de colapso (abierto de forma predeterminada para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) <br> Establezca esto en 2 para un separador de colapso (colapsado de manera predeterminada para una nueva sesión, luego el estado se mantiene antes de cada sesión de usuario) LibraryToBuildPDF=Biblioteca utilizada para la generación de PDF LocalTaxDesc=Algunos países pueden aplicar dos o tres impuestos en cada línea de factura. Si este es el caso, elija el tipo para el segundo y tercer impuesto y su tasa. Los tipos posibles son: <br> 1: el impuesto local se aplica a productos y servicios sin IVA (localtax se calcula sobre el monto sin impuestos) <br> 2: el impuesto local se aplica a productos y servicios, incluido el IVA (localtax se calcula sobre el monto + impuesto principal ) <br> 3: el impuesto local se aplica a productos sin IVA (el impuesto local se calcula sobre el monto sin impuestos) <br> 4: el impuesto local se aplica a productos que incluyen el IVA (impuesto local se calcula sobre el monto + IVA principal) <br> 5: local los impuestos se aplican a los servicios sin IVA (el impuesto local se calcula sobre la cantidad sin impuestos) <br> 6: el impuesto local se aplica a los servicios que incluyen impuestos (el impuesto local se calcula sobre la cantidad + impuestos) @@ -475,7 +472,6 @@ Module2900Desc=Capacidades de conversiones GeoIP Maxmind Module3200Desc=Habilitar un registro inalterable de eventos empresariales. Los eventos se archivan en tiempo real. El registro es una tabla de solo lectura de eventos encadenados que se pueden exportar. Este módulo puede ser obligatorio para algunos países. Module4000Desc=Administración de los recursos humanos Module5000Desc=Permite gestionar múltiples empresas -Module6000Desc=Gestión de flujo de trabajo (creación automática de objeto y / o cambio de estado automático) Module10000Name=Sitios Web Module20000Name=Gestión de solicitudes de licencia Module20000Desc=Definir y rastrear las solicitudes de permisos de los empleados. @@ -491,7 +487,6 @@ Module50400Name=Contabilidad (doble entrada) Module54000Desc=Impresión directa (sin abrir los documentos) utilizando la interfaz IPP de Cups (la impresora debe estar visible desde el servidor y CUPS debe estar instalada en el servidor). Module55000Name=Sondeo, encuesta o votación Module55000Desc=Cree encuestas en línea, encuestas o votos (como Doodle, Studs, RDVz, etc.) -Module59000Desc=Module to follow margins Module60000Desc=Módulo para gestionar las comisiones Module62000Desc=Añadir características para gestionar Incoterms. Module63000Desc=Gestionar recursos (impresoras, coches, salas, ...) para asignar a eventos. @@ -600,7 +595,6 @@ Permission253=Crea / modifica otros usuarios, grupos y permisos. PermissionAdvanced253=Crear / modificar usuarios internos / externos y permisos Permission254=Crear / modificar solo usuarios externos Permission255=Modificar contraseña de otro usuario -Permission262=Extienda el acceso a todos los terceros (no solo a terceros para los cuales el usuario es un representante de ventas). No es efectivo para usuarios externos (siempre se limita a ellos mismos para propuestas, pedidos, facturas, contratos, etc.). <br> No es efectivo para proyectos (solo reglas sobre permisos de proyectos, visibilidad y asignaciones). Permission271=Leer CA Permission272=Leer facturas Permission273=Emitir facturas @@ -838,7 +832,6 @@ SetupDescription1=Antes de comenzar a utilizar Dolibarr, se deben definir alguno SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Parámetros básicos utilizados para personalizar el comportamiento predeterminado de su aplicación (por ejemplo, para los países relacionados con el comportamiento predeterminado). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Este software es un conjunto de muchos módulos/aplicaciones. Los módulos relacionados con sus necesidades deben estar habilitados y configurados. Las entradas del menú aparecerán con la activación de estos módulos. SetupDescription5=Otras entradas del menú de configuración manejan parámetros opcionales. -LogEvents=Eventos de auditoría de seguridad Audit=Auditoria InfoBrowser=Acerca del navegador InfoOS=Acerca del OS @@ -887,7 +880,6 @@ RestoreMySQL=Importación de MySQL ForcedToByAModule= Esta regla se ha forzado a <b>%s</b> por un módulo activado RunningUpdateProcessMayBeRequired=Parece que es necesario ejecutar el proceso de actualización (la versión del programa %s difiere de la versión de la base de datos %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Debe ejecutar este comando desde la línea de comandos después de iniciar sesión en un shell con el usuario <b>%s</b> o debe agregar la opción -Al final de la línea de comandos para proporcionar la contraseña <b>%s</b>. -SimpleNumRefModelDesc=Devuelve el número de referencia con el formato %syymm-nnnn donde yy es año, mm es mes y nnnn es secuencial sin reinicio ShowProfIdInAddress=Mostrar identificación profesional con direcciones ShowVATIntaInAddress=Ocultar número de IVA intracomunitario con direcciones MeteoPercentageMod=Modo porcentual @@ -898,7 +890,6 @@ ExternalAccess=Acceso externo / internet MAIN_PROXY_USE=Use un servidor proxy (de lo contrario el acceso es directo a internet) MAIN_PROXY_HOST=Servidor proxy: Nombre / Dirección MAIN_PROXY_USER=Servidor proxy: Login / Usuario -DefineHereComplementaryAttributes=Defina aquí cualquier atributo adicional / personalizado que desee incluir para: %s ExtraFields=Atributos complementarios ExtraFieldsLines=Atributos complementarios (líneas) ExtraFieldsLinesRec=Atributos complementarios (plantillas de líneas de facturas) @@ -1157,7 +1148,6 @@ ProductServiceSetup=Configuración de módulos de productos y servicios NumberOfProductShowInSelect=Número máximo de productos para mostrar en las listas de selección de combo (0 ViewProductDescInFormAbility=Mostrar descripciones de productos en formularios (de lo contrario, se muestra en una ventana emergente de información sobre herramientas) MergePropalProductCard=Activar en la ficha Archivos adjuntos de producto / servicio una opción para fusionar el documento PDF del producto con la propuesta PDF azur si el producto / servicio está en la propuesta -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Además, si tiene una gran cantidad de productos (> 100 000), puede aumentar la velocidad configurando la constante PRODUCT_DONOTSEARCH_ANYWHERE en 1 en Configuración-> Otros. La búsqueda se limitará entonces al inicio de la cadena. UseSearchToSelectProduct=Espere hasta que presione una tecla antes de cargar el contenido de la lista de combo de productos (esto puede aumentar el rendimiento si tiene una gran cantidad de productos, pero es menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras predeterminado para utilizar en los productos @@ -1362,7 +1352,6 @@ BackgroundTableLineOddColor=Color de fondo para líneas de tabla de impares BackgroundTableLineEvenColor=Color de fondo para líneas de tabla pares MinimumNoticePeriod=Período mínimo de notificación NbAddedAutomatically=Número de días añadidos a los contadores de usuarios (automáticamente) cada mes -EnterAnyCode=Este campo contiene una referencia para identificar la línea. Para ello, no hay caracteres especiales. Enter0or1=Ingrese 0 o 1 UnicodeCurrency=Ingrese aquí entre llaves, lista de bytes que representan el símbolo de moneda. Por ejemplo: para $, ingrese [36] - para brasil R $ [82,36] - para €, ingrese [8364] ColorFormat=El color RGB está en formato HEX, por ejemplo: FF0000 @@ -1428,7 +1417,6 @@ WarningNoteModulePOSForFrenchLaw=Este módulo %s cumple con las leyes francesas WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el módulo %s que es un módulo externo. Activar un módulo externo significa que confía en el editor de ese módulo y que está seguro de que este módulo no afecta negativamente el comportamiento de su aplicación y cumple con las leyes de su país ( %s). Si el módulo introduce una característica ilegal, usted se hace responsable del uso de software ilegal. NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establezca esto en "sí" si este grupo es un cálculo de otros grupos -EnterCalculationRuleIfPreviousFieldIsYes=Ingrese la regla de cálculo si el campo anterior se estableció en Sí (por ejemplo, 'CODEGRP1 + CODEGRP2') SeveralLangugeVariatFound=Algunas variantes de lenguaje GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) GDPRContactDesc=Si almacena datos sobre empresas / ciudadanos europeos, puede nombrar al contacto que es responsable del Reglamento general de protección de datos aquí @@ -1438,7 +1426,6 @@ YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la l ChartLoaded=Plan de cuenta cargado VATIsUsedIsOff=Nota: La opción de usar el impuesto sobre las ventas o el IVA se ha establecido en <strong> Desactivado </strong> en el menú %s - %s, por lo que el impuesto sobre las ventas o IVA utilizado siempre será 0 para las ventas. SwapSenderAndRecipientOnPDF=Cambiar la posición de la dirección del remitente y del destinatario en documentos PDF -FeatureSupportedOnTextFieldsOnly=Advertencia, función compatible solo en los campos de texto. También se debe establecer un parámetro de URL action = create o action = edit O el nombre de la página debe terminar con 'new.php' para activar esta función. EmailCollector=Recolector de correo electronico EmailCollectorDescription=Agregue un trabajo programado y una página de configuración para escanear los buzones de correo electrónico con regularidad (usando el protocolo IMAP) y registre los correos electrónicos recibidos en su aplicación, en el lugar correcto y / o cree algunos registros automáticamente (como clientes potenciales). NewEmailCollector=Nuevo recolector de email diff --git a/htdocs/langs/es_EC/bills.lang b/htdocs/langs/es_EC/bills.lang index 9c56198744f..0028e2a141b 100644 --- a/htdocs/langs/es_EC/bills.lang +++ b/htdocs/langs/es_EC/bills.lang @@ -41,8 +41,9 @@ InvoiceCustomer=Factura del cliente CustomerInvoice=Factura del cliente CustomersInvoices=Facturas de clientes SupplierInvoice=Factura del proveedor +SuppliersInvoices=Facturas del vendedor / proveedor SupplierBill=Factura del proveedor -SupplierBills=facturas de proveedores +SupplierBills=Facturas del vendedor / proveedor PaymentBack=Reembolso CustomerInvoicePaymentBack=Reembolso paymentInInvoiceCurrency=en moneda de facturas @@ -318,7 +319,6 @@ PaymentCondition14DENDMONTH=Dentro de los 14 días siguientes al final del mes FixAmount=Cantidad fija: 1 línea con la etiqueta '%s' VarAmount=Cantidad variable (%% tot.) VarAmountOneLine=Cantidad variable (%% total.) - 1 línea con la etiqueta '%s' -VarAmountAllLines=Cantidad variable (%% tot.) - todas las mismas líneas PaymentTypePRE=Orden de pago por domiciliación bancaria PaymentTypeShortPRE=Orden de pago de débito PaymentTypeCB=Tarjeta de crédito @@ -387,10 +387,7 @@ YouMustCreateStandardInvoiceFirstDesc=Primero debe crear una factura estándar y PDFCrabeDescription=Factura PDF plantilla Crabe. Una plantilla de factura completa (implementación anterior de la plantilla Sponge) PDFSpongeDescription=Factura PDF plantilla de esponja. Una plantilla de factura completa. PDFCrevetteDescription=Plantilla de factura PDF Crevette. Una plantilla completa de facturas para facturas de situación -TerreNumRefModelDesc1=Número de devolución con el formato%syymm-nnnn para facturas estándar y%syymm-nnnn para notas de crédito donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0 -MarsNumRefModelDesc1=Número de devolución con el formato%syymm-nnnn para facturas estándar,%syymm-nnnn para facturas de reemplazo,%syymm-nnnn para facturas de pago inicial y%syymm-nnnn para notas de crédito donde yy es año, mm es mes y nnnn es una secuencia con sin descanso y sin retorno a 0 TerreNumRefModelError=Un proyecto de ley que comienza con $ syymm ya existe y no es compatible con este modelo de secuencia. Eliminar o cambiar el nombre para activar este módulo. -CactusNumRefModelDesc1=Número de devolución con el formato%syymm-nnnn para facturas estándar,%syymm-nnnn para notas de crédito y%syymm-nnnn para facturas de pago inicial donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0 TypeContact_facture_internal_SALESREPFOLL=Representante de seguimiento de factura de cliente TypeContact_facture_external_BILLING=Contacto de factura de cliente TypeContact_facture_external_SHIPPING=Contacto de envío del cliente @@ -427,7 +424,6 @@ ToCreateARecurringInvoiceGeneAuto=Si necesita que esas facturas se generen autom DeleteRepeatableInvoice=Eliminar factura de plantilla ConfirmDeleteRepeatableInvoice=¿Está seguro de que desea eliminar la factura de la plantilla? CreateOneBillByThird=Crear una factura por terceros (de lo contrario, una factura por pedido) -BillCreated=%s facturas creadas AutoFillDateFrom=Establecer fecha de inicio para la línea de servicio con fecha de factura AutoFillDateFromShort=Establecer fecha de inicio AutoFillDateToShort=Establecer fecha de finalización diff --git a/htdocs/langs/es_EC/categories.lang b/htdocs/langs/es_EC/categories.lang index 3545e7ba532..4aa11eeaa7d 100644 --- a/htdocs/langs/es_EC/categories.lang +++ b/htdocs/langs/es_EC/categories.lang @@ -8,7 +8,6 @@ SuppliersCategoriesArea=Área de etiquetas / categorías de proveedores CustomersCategoriesArea=Categorías de etiquetas/categorías de clientes MembersCategoriesArea=Miembros tags/categories area ContactsCategoriesArea=Zona de etiquetas/categorías de contactos -AccountsCategoriesArea=Cuentas tags/categories area ProjectsCategoriesArea=Área de etiquetas/categorías de proyectos UsersCategoriesArea=Etiquetas de usuarios / área de categorías CatList=Lista de etiquetas/categorías diff --git a/htdocs/langs/es_EC/companies.lang b/htdocs/langs/es_EC/companies.lang index 8a15891b3f1..b55655122e9 100644 --- a/htdocs/langs/es_EC/companies.lang +++ b/htdocs/langs/es_EC/companies.lang @@ -258,7 +258,6 @@ CurrentOutstandingBill=Factura actual pendiente OutstandingBill=Max. Por factura pendiente OutstandingBillReached=Max. Para la factura pendiente alcanzada OrderMinAmount=Monto mínimo para la orden -MonkeyNumRefModelDesc=Devuelva un número con el formato %syymm-nnnn para el código de cliente y %syymm-nnnn para el código de proveedor donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0. LeopardNumRefModelDesc=El código es gratuito. Este código se puede modificar en cualquier momento. ManagingDirectors=Nombre del Gerente(s) (CEO, director, presidente ...) MergeOriginThirdparty=Duplicar clientes/proveedores (clientes/proveedores que desea eliminar) diff --git a/htdocs/langs/es_EC/compta.lang b/htdocs/langs/es_EC/compta.lang index 5933896e5b7..6b24ea9e09b 100644 --- a/htdocs/langs/es_EC/compta.lang +++ b/htdocs/langs/es_EC/compta.lang @@ -113,9 +113,7 @@ NoWaitingChecks=No hay cheques a la espera de depósito. DateChequeReceived=Consultar fecha de recepción NbOfCheques=No. de cheques PaySocialContribution=Pagar un impuesto social/fiscal -ConfirmPaySocialContribution=¿Está seguro de que desea clasificar este impuesto social o fiscal como pagado? DeleteSocialContribution=Eliminar un pago de impuestos sociales o fiscales -ConfirmDeleteSocialContribution=¿Seguro que desea eliminar este pago de impuestos sociales/fiscales? ExportDataset_tax_1=Impuestos y pagos sociales y fiscales CalcModeVATDebt=Modo <b>%sVAT en la contabilidad de compromiso%s </b>. CalcModeVATEngagement=Modo <b>%sVAT en los ingresos-gastos%s </b>. @@ -181,7 +179,6 @@ Pcg_subtype=Subtipo Pcg InvoiceLinesToDispatch=Líneas de factura para enviar ByProductsAndServices=Por producto y servicio RefExt=Referencia externa -ToCreateAPredefinedInvoice=Para crear una factura de plantilla, cree una factura estándar y, a continuación, sin validarla, haga clic en el botón "%s". LinkedOrder=Enlace al pedido CalculationRuleDesc=Para calcular el IVA total, hay dos métodos: <br> El método 1 redondea la tina en cada línea y luego los suma. <br> El método 2 suma todas las tinas en cada línea y luego redondea el resultado. <br> El resultado final puede diferir de pocos centavos. El modo predeterminado es modo <b>%s </b>. CalculationRuleDescSupplier=Según el proveedor, elija el método apropiado para aplicar la misma regla de cálculo y obtener el mismo resultado esperado por su proveedor. diff --git a/htdocs/langs/es_EC/main.lang b/htdocs/langs/es_EC/main.lang index 8452c16f0ec..d3b588e3a6f 100644 --- a/htdocs/langs/es_EC/main.lang +++ b/htdocs/langs/es_EC/main.lang @@ -184,7 +184,6 @@ UnitPriceHTCurrency=Precio unitario (excl.) (Moneda) UnitPriceTTC=Precio unitario PriceU=Precio PriceUHT=Precio -PriceUHTCurrency=Precio (moneda) PriceUTTC=Precio (inc. IVA) Amount=Cantidad AmountInvoice=Valor de la factura @@ -489,7 +488,6 @@ NotAllExportedMovementsCouldBeRecordedAsExported=No todos los movimientos export Miscellaneous=Varios GroupBy=Agrupar por... SomeTranslationAreUncomplete=Algunos de los idiomas ofrecidos pueden estar solo parcialmente traducidos o pueden contener errores. Ayude a corregir su idioma registrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> para agregar sus mejoras. -DirectDownloadLink=Enlace de descarga directa (público/externo) DownloadDocument=Descargar documento ActualizeCurrency=Actualizar tipo de cambio ModuleBuilder=Módulo y generador de aplicaciones diff --git a/htdocs/langs/es_EC/margins.lang b/htdocs/langs/es_EC/margins.lang index c9a6111c6da..efb47f4ed10 100644 --- a/htdocs/langs/es_EC/margins.lang +++ b/htdocs/langs/es_EC/margins.lang @@ -13,7 +13,6 @@ SalesRepresentativeMargins=Márgenes del representante de ventas UserMargins=Márgenes de usuario ChooseProduct/Service=Elija un producto o servicio ForceBuyingPriceIfNull=Forzar la compra/precio de coste al precio de venta si no se define -ForceBuyingPriceIfNullDetails=Si el precio de compra/costo no está definido, y esta opción "ON", el margen será cero en línea (precio de compra/costo = precio de venta), de lo contrario ("OFF"), el margen será igual al valor predeterminado sugerido. MARGIN_METHODE_FOR_DISCOUNT=Método de margen para descuentos globales UseDiscountOnTotal=En subtotal MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Define si un descuento global se trata como un producto, un servicio o sólo en el subtotal para el cálculo del margen. diff --git a/htdocs/langs/es_EC/orders.lang b/htdocs/langs/es_EC/orders.lang index 942acb41d5b..d8e0030693a 100644 --- a/htdocs/langs/es_EC/orders.lang +++ b/htdocs/langs/es_EC/orders.lang @@ -116,6 +116,7 @@ PDFEratostheneDescription=Un modelo de orden completo PDFEdisonDescription=Un modelo de pedido simple PDFProformaDescription=Una plantilla completa de factura Proforma CreateInvoiceForThisCustomer=Ordenes de factura +CreateInvoiceForThisSupplier=Ordenes de factura NoOrdersToInvoice=No hay pedidos facturables CloseProcessedOrdersAutomatically=Clasifique "Procesado" todos los pedidos seleccionados. OrderCreation=Creación de órdenes diff --git a/htdocs/langs/es_EC/productbatch.lang b/htdocs/langs/es_EC/productbatch.lang index 347913cbe2c..f4e3485e547 100644 --- a/htdocs/langs/es_EC/productbatch.lang +++ b/htdocs/langs/es_EC/productbatch.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Utilice el número de lote/serie -ProductStatusOnBatch=Sí (se requiere lote/serie) ProductStatusNotOnBatch=No (lote/serie no utilizado) atleast1batchfield=Fecha de entrega o Fecha de caducidad o Lote/Número de serie batch_number=Lote/Número de serie diff --git a/htdocs/langs/es_EC/products.lang b/htdocs/langs/es_EC/products.lang index c75401d2e14..150d9069c25 100644 --- a/htdocs/langs/es_EC/products.lang +++ b/htdocs/langs/es_EC/products.lang @@ -61,7 +61,6 @@ NoteNotVisibleOnBill=Nota (no visible en facturas, propuestas...) ServiceLimitedDuration=Si el producto es un servicio con duración limitada: MultiPricesAbility=Múltiples segmentos de precios por producto / servicio (cada cliente está en un segmento de precios) MultiPricesNumPrices=Número de precios -AssociatedProductsAbility=Enable Kits (set of several products) ParentProductsNumber=Número de producto de embalaje principal ParentProducts=Productos para los padres KeywordFilter=Filtro de palabras clave @@ -169,7 +168,6 @@ GlobalVariableUpdaterHelp1=Analiza los datos de WebService desde la URL especifi GlobalVariableUpdaterHelpFormat1=El formato de la solicitud es {"URL": "http://example.com/urlofws", "VALUE": "array, targetvalue", "NS": "http://example.com/urlofns", "METHOD" : "myWSMethod", "DATA": {"tu": "datos", "para": "enviar"}} PropalMergePdfProductActualFile=Los archivos se utilizan para agregar en PDF Azur son/es PropalMergePdfProductChooseFile=Seleccionar archivos PDF -IncludingProductWithTag=Incluye producto/servicio con etiqueta DefaultPriceRealPriceMayDependOnCustomer=Precio predeterminado, el precio real puede depender del cliente NbOfQtyInProposals=Cantidad en las propuestas ClinkOnALinkOfColumn=Haga clic en un enlace de la columna %s para obtener una vista detallada ... diff --git a/htdocs/langs/es_EC/stocks.lang b/htdocs/langs/es_EC/stocks.lang index cb52d69ad69..355b8ac0592 100644 --- a/htdocs/langs/es_EC/stocks.lang +++ b/htdocs/langs/es_EC/stocks.lang @@ -22,7 +22,6 @@ ListMouvementStockProject=Lista de movimientos de inventario asociado al proyect StocksArea=Área de almacenes IncludeAlsoDraftOrders=Incluya también borradores de órdenes Location=Ubicación -LocationSummary=Ubicación del nombre corto NumberOfProducts=Número total de productos StockCorrection=Corrección de inventario CorrectStock=Inventario correcto diff --git a/htdocs/langs/es_EC/suppliers.lang b/htdocs/langs/es_EC/suppliers.lang index 4e550c17661..9d9e2b2015a 100644 --- a/htdocs/langs/es_EC/suppliers.lang +++ b/htdocs/langs/es_EC/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - suppliers Suppliers=Vendedores/Proveedores SuppliersInvoice=Factura del proveedor +SupplierInvoices=Facturas del vendedor / proveedor ShowSupplierInvoice=Mostrar factura del proveedor ListOfSuppliers=Lista de proveedores ShowSupplier=Mostrar vendedor/proveedor diff --git a/htdocs/langs/es_EC/ticket.lang b/htdocs/langs/es_EC/ticket.lang index ae99f099a88..de9e0c92141 100644 --- a/htdocs/langs/es_EC/ticket.lang +++ b/htdocs/langs/es_EC/ticket.lang @@ -39,8 +39,6 @@ TicketsLogEnableEmailHelp=En cada cambio, se enviará un correo electrónico ** TicketParams=Parametros TicketsShowModuleLogoHelp=Habilite esta opción para ocultar el módulo del logotipo en las páginas de la interfaz pública TicketsShowCompanyLogoHelp=Habilite esta opción para ocultar el logotipo de la empresa principal en las páginas de la interfaz pública -TicketsEmailAlsoSendToMainAddress=También envíe notificaciones a la dirección de correo electrónico principal -TicketsEmailAlsoSendToMainAddressHelp=Habilite esta opción para enviar un correo electrónico a la dirección "Correo electrónico de notificación de" (consulte la configuración a continuación) TicketsLimitViewAssignedOnly=Restrinja la visualización a los tickets asignados al usuario actual (no es efectivo para usuarios externos, siempre se limita al tercero del que dependen) TicketsLimitViewAssignedOnlyHelp=Solo los tickets asignadas al usuario actual serán visibles. No se aplica a un usuario con derechos de gestión de tickets. TicketsActivatePublicInterface=Activar la interfaz pública diff --git a/htdocs/langs/es_EC/users.lang b/htdocs/langs/es_EC/users.lang index da68a7098db..420d41e9997 100644 --- a/htdocs/langs/es_EC/users.lang +++ b/htdocs/langs/es_EC/users.lang @@ -50,7 +50,6 @@ LoginAccountDisableInDolibarr=Cuenta desactivada en Dolibarr. UsePersonalValue=Usar valor personal DomainUser=Usuario del dominio %s CreateInternalUserDesc=Este formulario le permite crear un usuario interno en su empresa / organización. Para crear un usuario externo (cliente, proveedor, etc.), use el botón 'Crear usuario Dolibarr' de la tarjeta de contacto de ese tercero. -InternalExternalDesc=Un usuario interno <b> </b> es un usuario que forma parte de su empresa / organización. <br> Un usuario externo <b> externo </b> es un cliente, proveedor u otro (La creación de un usuario externo para un tercero se puede hacer desde el registro de contacto del tercero). <br> <br> En ambos casos, los permisos definen los derechos en Dolibarr, también el usuario externo puede tener un administrador de menú diferente al usuario interno (Ver Inicio - Configuración - Pantalla) PermissionInheritedFromAGroup=Permiso concedido porque lo a heredado de un usuario de un grupo de usuarios. UserWillBeInternalUser=El usuario creado será un usuario interno (porque no está vinculado a un tercero en particular) UserWillBeExternalUser=El usuario creado será un usuario externo (debido a que está vinculado a un tercero en particular) diff --git a/htdocs/langs/es_EC/website.lang b/htdocs/langs/es_EC/website.lang index fb174b10601..ca551418689 100644 --- a/htdocs/langs/es_EC/website.lang +++ b/htdocs/langs/es_EC/website.lang @@ -27,11 +27,9 @@ ViewWebsiteInProduction=Ver sitio web utilizando las URL de inicio SetHereVirtualHost=<u>uso con Apache/NGinx/...</u><br>Crea en su servidor web (Apache, Nginx, ...) de un host virtual dedicado con PHP habilitado y un directorio raíz en<br><strong>%s</strong> YouCanAlsoTestWithPHPS=<u>Para usar con el servidor PHP incorporado</u><br> en el entorno de desarrollo, es posible que prefiera probar el sitio con el servidor web PHP incorporado (se requiere PHP 5.5) ejecutando<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP= <u> Ejecute su sitio web con otro proveedor de alojamiento Dolibarr </u> <br> Si no tiene un servidor web como Apache o NGinx disponible en Internet, puede exportar e importar su sitio web a otra instancia de Dolibarr proporcionada por otro proveedor de alojamiento Dolibarr que proporcione el servicio completo integración con el módulo del sitio web. Puede encontrar una lista de algunos proveedores de hosting Dolibarr en <a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org </a> -CheckVirtualHostPerms=Verifique también que el host virtual tenga permiso para <strong>%s</strong> en los archivos <br><strong>%s</strong> ReadPerm=Leer TestDeployOnWeb=Probar / implementar en la web PreviewSiteServedByWebServer=<u>Vista previa %s en una nueva pestaña. </u> <br><br>La %s servirá un servidor web externo (como Apache, Nginx, IIS). Debe instalar y configurar este servidor antes de apuntar al directorio:<br><strong>%s</strong><br> URL servida por un servidor externo:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Vista previa %s en una nueva pestaña.</u><br><br> La %s servirá el servidor de Dolibarr para que no necesite instalar ningún servidor web adicional (como Apache, Nginx, IIS). <br> El inconveniente es que la URL de las páginas no es fácil de usar y comienza con la ruta de acceso de su Dolibarr. <br> URL servido por Dolibarr:<br><strong>%s</strong><br><br> para usar su propio servidor web externo para servir este sitio web, cree un host virtual en su servidor web que señale el directorio <br><strong>%s</strong><br> luego ingrese el nombre de este servidor virtual y haga clic en el otro botón de vista previa. VirtualHostUrlNotDefined=URL del host virtual servido por el servidor web externo no definido SyntaxHelp=Ayuda sobre consejos de sintaxis específicos SiteAdded=Sitio web añadido @@ -63,3 +61,5 @@ EditInLineOnOff=El modo 'Editar en línea' es %s ShowSubContainersOnOff=El modo para ejecutar 'contenido dinámico' es %s UseManifest=Proporcione un archivo manifest.json RSSFeed=RSS +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_EC/withdrawals.lang b/htdocs/langs/es_EC/withdrawals.lang index baadc69e3b1..ba83f5af30c 100644 --- a/htdocs/langs/es_EC/withdrawals.lang +++ b/htdocs/langs/es_EC/withdrawals.lang @@ -77,7 +77,6 @@ SEPAFormYourBIC=Su código de identificación bancaria (BIC) PleaseCheckOne=Por favor, marque uno solo DirectDebitOrderCreated=Orden de domiciliación %s creada CreateForSepa=Crear un archivo de débito directo -ICS=Creditor Identifier CI for direct debit END_TO_END=Etiqueta XML SEPA "EndToEndId": identificación única asignada por transacción USTRD=Etiqueta XML SEPA "no estructurada" ADDDAYS=Agregar días a la fecha de ejecución diff --git a/htdocs/langs/es_ES/accountancy.lang b/htdocs/langs/es_ES/accountancy.lang index cdfb3c7cb51..9be21f76a86 100644 --- a/htdocs/langs/es_ES/accountancy.lang +++ b/htdocs/langs/es_ES/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Líneas de facturas contabilizadas ExpenseReportLines=Líneas de informes de gastos a contabilizar ExpenseReportLinesDone=Líneas de informes de gastos contabilizadas IntoAccount=Contabilizar línea con la cuenta contable -TotalForAccount=Total para cuenta contable +TotalForAccount=Cuenta contable total Ventilate=Contabilizar @@ -209,7 +209,7 @@ Codejournal=Diario JournalLabel=Etiqueta del diario NumPiece=Apunte TransactionNumShort=Núm. transacción -AccountingCategory=Grupos personalizados +AccountingCategory=Custom group GroupByAccountAccounting=Agrupar por cuenta del Libro Mayor GroupBySubAccountAccounting=Agrupar por cuenta de libro mayor auxiliar AccountingAccountGroupsDesc=Puedes definir aquí algunos grupos de cuentas contables. Se usarán para informes de contabilidad personalizados. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=No es posible autodetectar, utilice el menú <a href= ## Import ImportAccountingEntries=Entradas contables +ImportAccountingEntriesFECFormat=Entradas contables - formato FEC +FECFormatJournalCode=Diario de código (JournalCode) +FECFormatJournalLabel=Diario de etiquetas (JournalLib) +FECFormatEntryNum=Número de pieza (EcritureNum) +FECFormatEntryDate=Fecha de pieza (EcritureDate) +FECFormatGeneralAccountNumber=Número de cuenta general (CompteNum) +FECFormatGeneralAccountLabel=Etiqueta de cuenta general (CompteLib) +FECFormatSubledgerAccountNumber=Número de cuenta del libro mayor auxiliar (CompAuxNum) +FECFormatSubledgerAccountLabel=Número de cuenta del libro mayor auxiliar (CompAuxLib) +FECFormatPieceRef=Pieza ref (PieceRef) +FECFormatPieceDate=Creación de fecha de pieza (PieceDate) +FECFormatLabelOperation=Operación de etiquetas (EcritureLib) +FECFormatDebit=Débito (Debit) +FECFormatCredit=Crédito (Credit) +FECFormatReconcilableCode=Código conciliable (EcritureLet) +FECFormatReconcilableDate=Fecha conciliable (DateLet) +FECFormatValidateDate=Fecha de pieza validada (ValidDate) +FECFormatMulticurrencyAmount=Importe multidivisa (Montantdevise) +FECFormatMulticurrencyCode=Código multidivisa (Idevise) + DateExport=Fecha de exportación WarningReportNotReliable=Advertencia, este informe no se basa en el Libro mayor, por lo que no contiene modificaciones manualmente modificadas en el Libro mayor.. Si su diario está actualizado, la vista contable es más precisa. ExpenseReportJournal=Informe de gastos diario InventoryJournal=Inventario + +NAccounts=%s accounts diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 81056fb58e1..6f3f04104c8 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Eliminar bloqueo de conexiones YourSession=Su sesión Sessions=Sesiones de usuarios WebUserGroup=Servidor web usuario/grupo +PermissionsOnFiles=Permisos sobre archivos PermissionsOnFilesInWebRoot=Permisos de ficheros en directorio raiz web PermissionsOnFile=Permisos en el fichero %s NoSessionFound=Parece que su PHP no puede listar las sesiones activas. El directorio de salvaguardado de sesiones (<b>%s</b>) puede estar protegido (por ejemplo, por los permisos del sistema operativo o por la directiva open_basedir de su PHP). @@ -62,6 +63,7 @@ IfModuleEnabled=Nota: sólo es eficaz si el módulo <b>%s</b> está activado RemoveLock=Elimine o renombre el archivo <b>%s</b>, si existe, para permitir el uso de la herramienta de Actualización/Instalación. RestoreLock=Restaure el archivo <b> %s </b>, solo con permiso de lectura, para deshabilitar cualquier uso posterior de la herramienta Actualización/Instalación. SecuritySetup=Configuración de la seguridad +PHPSetup=Configuración de PHP SecurityFilesDesc=Defina aquí las opciones de seguridad relacionadas con la subida de archivos. ErrorModuleRequirePHPVersion=Error, este módulo requiere una versión %s o superior de PHP ErrorModuleRequireDolibarrVersion=Error, este módulo requiere una versión %s o superior de Dolibarr @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Esta área ofrece distintas funciones de administración. Ut Purge=Purga PurgeAreaDesc=Esta página le permite borrar todos los archivos generados o almacenados por Dolibarr (archivos temporales o todos los archivos del directorio <b>%s</b>). El uso de esta función no es necesaria. Se proporciona como solución para los usuarios cuyos Dolibarr se encuentran en un proveedor que no ofrece permisos para eliminar los archivos generados por el servidor web. PurgeDeleteLogFile=Eliminar archivos de registro, incluidos <b> %s</b> definidos por el módulo Syslog (sin riesgo de perder datos) -PurgeDeleteTemporaryFiles=Eliminar todos los archivos de registro y temporales (sin riesgo de perder datos). Nota: La eliminación de archivos temporales se realiza solo si el directorio temporal se creó hace más de 24 horas. +PurgeDeleteTemporaryFiles=Elimine todos los archivos de registro y temporales (sin riesgo de perder datos). El parámetro puede ser 'tempfilesold', 'logfiles' o ambos 'tempfilesold + logfiles'. Nota: La eliminación de archivos temporales se realiza solo si el directorio temporal se creó hace más de 24 horas. PurgeDeleteTemporaryFilesShort=Eliminar archivos de registro y temporales PurgeDeleteAllFilesInDocumentsDir=Eliminar todos los archivos del directorio <b>%s</b>. Serán eliminados archivos temporales y archivos relacionados con elementos (terceros, facturas, etc.), archivos subidos al módulo GED, copias de seguridad de la base de datos y archivos temporales. PurgeRunNow=Purgar @@ -232,6 +234,7 @@ BoxesAvailable=Paneles disponibles BoxesActivated=Paneles activados ActivateOn=Activar en ActiveOn=Activo en +ActivatableOn=Activable en SourceFile=Archivo origen AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible solamente si Javascript y Ajax están activados Required=Requerido @@ -347,9 +350,10 @@ LastActivationAuthor=Último autor de activación LastActivationIP=Última IP activa UpdateServerOffline=Actualizar servidor offline WithCounter=Gestionar un contador -GenericMaskCodes=Puede introducir cualquier máscara numérica. En esta máscara, puede utilizar las siguientes etiquetas:<br><b>{000000} </b> corresponde a un número que se incrementa en cada uno de %s. Introduzca tantos ceros como longitud desee mostrar. El contador se completará a partir de ceros por la izquierda con el fin de tener tantos ceros como la máscara. <br> <b> {000000+000}</ b> Igual que el anterior, con una compensación correspondiente al número a la derecha del signo + se aplica a partir del primer %s. <br> <b> {000000@x}</b> igual que el anterior, pero el contador se restablece a cero cuando se llega a x meses (x entre 1 y 12). Si esta opción se utiliza y x es de 2 o superior, entonces la secuencia {yy}{mm} o {yyyy}{mm} también es necesaria. <br> <b> {dd} </b> días (01 a 31). <br><b> {mm}</b> mes (01 a 12). <br><b>{yy}</b>, <b>{yyyy}</b> ou <b>{y}</b> año en 2, 4 ó 1 cifra.<br> -GenericMaskCodes2=<b>{cccc}</b> código de cliente con n caracteres<br><b>{cccc000}</b> código de cliente con n caracteres es seguido por un contador dedicado a clientes. Este contador dedicado a clientes se reseteará al mismo tiempo que el contador global.<br><b>{tttt}</b> El código del tipo de empresa con n caracteres (vea diccionarios->tipos de empresa).<br> +GenericMaskCodes=Puede ingresar cualquier máscara de numeración. En esta máscara, se pueden utilizar las siguientes etiquetas: <br> <b> {000000} </b> corresponde a un número que se incrementará en cada %s. Ingrese tantos ceros como la longitud deseada del contador. El contador se completará con ceros desde la izquierda para tener tantos ceros como la máscara. <br> <b> {000000 + 000} </b> igual que el anterior pero se aplica un desplazamiento correspondiente al número a la derecha del signo + comenzando en el primer %s. <br> <b> {000000 @ x} </b> igual que el anterior pero el contador se restablece a cero cuando se alcanza el mes x (x entre 1 y 12, o 0 para usar los primeros meses del año fiscal definido en su configuración, o 99 para poner a cero todos los meses). Si se usa esta opción y x es 2 o superior, entonces también se requiere la secuencia {yy} {mm} o {yyyy} {mm}. <br> <b> {dd} </b> día (01 a 31). <br> <b> {mm} </b> mes (01 a 12). <br> <b> {yy} </b>, <b> {yyyy} </b> o <b> {y} </b> año sobre 2, 4 o 1 cifras. <br> +GenericMaskCodes2= <b> {cccc} </b> el código de cliente en n caracteres <br> <b> {cccc000} </b> el código de cliente es un código de cliente dedicado a n. Este contador dedicado al cliente se pone a cero al mismo tiempo que el contador global. <br> <b> {tttt} </b> El código del tipo de terceros en n caracteres (ver menú Inicio - Configuración - Diccionario - Tipos de terceros). Si agrega esta etiqueta, el contador será diferente para cada tipo de tercero. <br> GenericMaskCodes3=Cualquier otro carácter en la máscara se quedará sin cambios. <br>No se permiten espacios <br> +GenericMaskCodes3EAN=Todos los demás caracteres de la máscara permanecerán intactos (excepto * o ? En la 13ª posición en EAN13). <br> No se permiten espacios. <br> En EAN13, el último carácter después del último} en la 13ª posición debería ser * o ? . Será reemplazado por la clave calculada. <br> GenericMaskCodes4a=<u>Ejemplo en la 99 ª %s del tercero La Empresa realizada el 31/03/2007: </u><br> GenericMaskCodes4b=<u>Ejemplo sobre un tercero creado el 31/03/2007:</u><br> GenericMaskCodes4c=<u>Ejemplo en un producto/servicio creado el 31/03/2007:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Mantener este campo vacío significa que el valor se ExtrafieldParamHelpselect=El listado de valores tiene que ser líneas key,valor<br><br> por ejemplo: <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>Para tener una lista en funcion de campos adicionales de lista:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>Para tener la lista en función de otra:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=El listado de valores tiene que ser líneas con el formato key,valor<br><br> por ejemplo: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=El listado de valores tiene que ser líneas con el formato key,valor (donde key no puede ser 0)<br><br> por ejemplo: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=Lista de valores proviene de una tabla <br> Sintaxis: nombre_tabla: etiqueta_field: id_field :: filtro <br> Ejemplo: c_typent: libelle: id :: filtro <br> <br> filtro puede ser una prueba simple (por ejemplo, activa = 1) Para mostrar sólo el valor activo <br> También puede utilizar $ ID $ en el filtro witch es el actual id del objeto actual <br> Para hacer un SELECT en el filtro de uso $ SEL $ <br> si desea filtrar en campos adicionales utilizar la sintaxis Extra.fieldcode = ... (donde código de campo es el código de campo adicional) <br> <br> Para que la lista dependa de otra lista de campos adicionales: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> Para que la lista dependa de otra lista: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter -ExtrafieldParamHelpchkbxlst=Lista de valores proviene de una tabla <br> Sintaxis: nombre_tabla: etiqueta_field: id_field :: filtro <br> Ejemplo: c_typent: libelle: id :: filtro <br> <br> filtro puede ser una prueba simple (por ejemplo, activa = 1) Para mostrar sólo el valor activo <br> También puede utilizar $ ID $ en el filtro witch es el id actual del objeto actual <br> Para hacer un SELECT en el filtro de uso $ SEL $ <br> si desea filtrar en campos adicionales utilizar la sintaxis Extra.fieldcode = ... (donde código de campo es el código de campo adicional) <br> <br> Para que la lista dependa de otra lista de campos adicionales: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> Para que la lista dependa de otra lista: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter +ExtrafieldParamHelpsellist=La lista de valores proviene de una tabla <br> Sintaxis: nombre_tabla:campo_etiqueta:campo_id::filtrosql <br> Ejemplo: c_typent:libelle:id::filtrosql <br> <br> - id_campo es una clave entera primaria SQL es condición necesaria.<br> Puede ser una prueba simple (por ejemplo, activo = 1) para mostrar solo el valor activo <br> También puede usar $ID$ en el filtro, que es el ID actual del objeto actual <br> Para usar un SELECT en el filtro, use la palabra clave $SEL$ para bypass de protección anti-inyección. <br> si desea filtrar en campos extra, use la sintaxis extra.fieldcode=... (donde el código de campo es el código del campo extra) <br> <br>Para que la lista dependa de otra lista de atributos complementarios: <br> c_typent:libelle:id:options_ <i> parent_list_code</i>|parent_column:filter <br><br> Para que la lista dependa de otra lista: <br> c_typent:libelle:id: <i>parent_list_code</i> |parent_column:filter +ExtrafieldParamHelpchkbxlst=Lista de valores proviene de una tabla <br> Sintaxis: nombre_tabla:etiqueta_field: id_field::filtro <br> Ejemplo: c_typent:libelle:id::filtro <br> <br> filtro puede ser una prueba simple (por ejemplo, activa = 1) Para mostrar sólo el valor activo <br> También puede utilizar $ID$ en el filtro witch es el id actual del objeto actual <br> Para hacer un SELECT en el filtro de uso $SEL$ <br> si desea filtrar en campos adicionales utilizar la sintaxis Extra.fieldcode=...(donde código de campo es el código de campo adicional) <br> <br> Para que la lista dependa de otra lista de campos adicionales: <br> c_typent: libelle:id:options_ <i> parent_list_code </i> | parent_column:filter <br> <br> Para que la lista dependa de otra lista: <br> c_typent:libelle:id: <i> parent_list_code </i> | parent_column:filter ExtrafieldParamHelplink=Los parámetros deben ser NombreObjeto:RutaClase <br>Sintaxis: NombreObjeto:RutaClase ExtrafieldParamHelpSeparator=Mantener vacío para un separador simple <br> Establezca a 1 para un separador de colapso (abierto de forma predeterminada para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) <br> Establezca a 2 para un separador de colapso (colapsado por defecto para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) LibraryToBuildPDF=Libreria usada en la generación de los PDF @@ -541,6 +545,8 @@ Module40Name=Proveedores Module40Desc=Proveedores y gestión de compras (órdenes de compra y facturación de facturas de proveedores) Module42Name=Registros de depuración Module42Desc=Generación de logs (archivos, syslog,...). Dichos registros son para propósitos técnicos/de depuración. +Module43Name=Barra de depuración +Module43Desc=Una herramienta para que los desarrolladores agreguen una barra de depuración en su navegador. Module49Name=Editores Module49Desc=Gestión de editores Module50Name=Productos @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Capacidades de conversión GeoIP Maxmind Module3200Name=Archivos inalterables Module3200Desc=Activar el registro inalterable de eventos empresariales. Los eventos se archivan en tiempo real. El registro es una tabla de sucesos encadenados que se pueden leer y exportar. Este módulo puede ser obligatorio en algunos países. +Module3400Name=Redes sociales +Module3400Desc=Habilite campos de Redes Sociales en terceros y direcciones (skype, twitter, facebook, ...). Module4000Name=RRHH Module4000Desc=Departamento de Recursos Humanos (gestión del departamento, contratos de empleados) Module5000Name=Multi-empresa Module5000Desc=Permite gestionar varias empresas -Module6000Name=Flujo de trabajo -Module6000Desc=Gestión de flujos de trabajo (creación automática de objeto y/o cambio de estado automático) +Module6000Name=Flujo de trabajo entre módulos +Module6000Desc=Gestión del flujo de trabajo entre diferentes módulos (creación automática de objeto y / o cambio de estado automático) Module10000Name=Sitios web Module10000Desc=Cree sitios web (públicos) con un editor WYSIWYG. Este es un CMS orientado a webmasters o desarrolladores (es mejor conocer el lenguaje HTML y CSS). Simplemente configure su servidor web (Apache, Nginx, ...) para que apunte al directorio dedicado de Dolibarr para tenerlo en línea en Internet con su propio nombre de dominio. Module20000Name=Gestión de días libres @@ -805,7 +813,8 @@ PermissionAdvanced253=Crear/modificar usuarios internos/externos y sus permisos Permission254=Crear/modificar únicamente usuarios externos Permission255=Modificar la contraseña de otros usuarios Permission256=Eliminar o desactivar otros usuarios -Permission262=Ampliar el acceso a todos los terceros (no sólo a los terceros que el usuario es comercial).<br>No efectivo para usuarios externos (Solamente usuarios internos. Los externos están limitados a ellos mismos para presupuestos, facturas, contratos, etc.).<br>No efectivo para proyectos (solamente permisos de visión y asignación de los proyectos). +Permission262=Ampliar el acceso a todos los terceros Y sus objetos (no solo a los terceros para los que el usuario es representante de ventas) <br> No efectivo para usuarios externos (siempre limitado a ellos mismos para propuestas, pedidos, facturas, contratos, etc.). <br> No es efectivo para proyectos (solo reglas sobre permisos de proyectos, visibilidad y asuntos de asignación). +Permission263=Ampliar el acceso a todos los terceros SIN sus objetos (no solo a los terceros para los que el usuario es representante de ventas). <br> No efectivo para usuarios externos (siempre limitado a ellos mismos para propuestas, pedidos, facturas, contratos, etc.). <br> No es efectivo para proyectos (solo reglas sobre permisos de proyectos, visibilidad y asuntos de asignación). Permission271=Consultar el CA Permission272=Consultar las facturas Permission273=Emitir las facturas @@ -1175,7 +1184,8 @@ SetupDescription2=Las siguientes dos secciones son obligatorias (las dos primera SetupDescription3=<a href="%s">%s -> %s</a><br><br>Parámetros básicos para personalizar el comportamiento por defecto de Dolibarr (por ejemplo características relacionadas con el país) SetupDescription4=<a href="%s">%s -> %s</a> <br><br>Este software es una colección de varios módulos/aplicaciones. Los módulos relevantes para tus necesidades deben ser activados y configurados. Se añadirán nuevas funcionalidades a los menús por cada módulo que se active. SetupDescription5=Las otras entradas de configuración gestionan parámetros opcionales. -LogEvents=Auditoría de la seguridad de eventos +AuditedSecurityEvents=Eventos de seguridad que se auditan +NoSecurityEventsAreAduited=No se auditan eventos de seguridad. Puede habilitarlos desde el menú %s Audit=Auditoría InfoDolibarr=Acerca de Dolibarr InfoBrowser=Acerca del Navegador @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Parece necesario realizar el proceso de actual YouMustRunCommandFromCommandLineAfterLoginToUser=Debe ejecutar el comando desde un shell después de haber iniciado sesión con la cuenta <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Funciones SSL no disponibles en su PHP DownloadMoreSkins=Más temas para descargar -SimpleNumRefModelDesc=Devuelve el número bajo el formato %syymm-nnnn donde yy es el año, mm el mes y nnnn un contador secuencial sin ruptura y sin volver a 0 +SimpleNumRefModelDesc=Devuelve el número de referencia en el formato %syymm-nnnn donde aa es el año, mm es el mes y nnnn es un número secuencial que se incrementa automáticamente sin reinicio. ShowProfIdInAddress=Mostrar el identificador profesional en las direcciones ShowVATIntaInAddress=Ocultar el identificador IVA Intracomunitario en las direcciones TranslationUncomplete=Traducción parcial @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Servidor proxy: Nombre/Dirección MAIN_PROXY_PORT=Servidor proxy: Puerto MAIN_PROXY_USER=Servidor proxy: Login/Usuario MAIN_PROXY_PASS=Servidor proxy: Contraseña -DefineHereComplementaryAttributes=Defina aquí la lista de campos adicionales, no disponibles por defecto, y que desea gestionar para %s. +DefineHereComplementaryAttributes=Defina cualquier atributo adicional / personalizado que deba agregarse a: %s ExtraFields=Campos adicionales ExtraFieldsLines=Campos adicionales (líneas) ExtraFieldsLinesRec=Campos adicionales (plantillas de líneas de facturas) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Ejemplo : uid LDAPFilterConnection=Filtro de búsqueda LDAPFilterConnectionExample=Ejemplo : &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Ejemplo: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Ejemplo : samaccountname LDAPFieldFullname=Nombre completo @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Su empresa está configurada como no sujeta al IVA (Ini AccountancyCode=Código contable AccountancyCodeSell=Código contable ventas AccountancyCodeBuy=Código contable compras +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Mantenga la casilla de verificación "Crear el pago automáticamente" vacía de forma predeterminada al crear un nuevo impuesto. ##### Agenda ##### AgendaSetup=Módulo configuración de acciones y agenda PasswordTogetVCalExport=Clave de autorización vcal export link +SecurityKey = Security Key PastDelayVCalExport=No exportar los eventos de más de AGENDA_USE_EVENT_TYPE=Usar tipos de evento (gestionados en el menú Configuración->Diccionarios->Tipos de eventos de la agenda) AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor por defecto para el tipo de evento en la creación de un evento @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Color de fondo para líneas de tabla odd BackgroundTableLineEvenColor=Color de fondo para todas las líneas de tabl MinimumNoticePeriod=Período mínimo de notificación (Su solicitud de licencia debe hacerse antes de este período) NbAddedAutomatically=Número de días adicionales que se añaden automáticamente a los contadores de usuarios cada mes -EnterAnyCode=Este campo contiene una referencia para identificar la línea. Introduzca cualquier valor de su elección, pero sin caracteres especiales. +EnterAnyCode=Este campo contiene una referencia para identificar la línea. Ingrese cualquier valor de su elección, pero sin caracteres especiales. 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 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Margen inferior en PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Altura del logo en 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') +EnterCalculationRuleIfPreviousFieldIsYes=Ingrese la regla de cálculo si el campo anterior se estableció en Sí. <br> Por ejemplo: <br> CODEGRP1 + CODEGRP2 SeveralLangugeVariatFound=Varias variantes de idioma encontradas RemoveSpecialChars=Eliminar caracteres especiales COMPANY_AQUARIUM_CLEAN_REGEX=Filtro Regex para limpiar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Configuración del módulo de redes sociales. EnableFeatureFor=Habilitar funciones para <strong> %s </strong> VATIsUsedIsOff=Nota: La opción de usar el IVA se ha establecido como <strong>Desactivado</strong> en el menú %s - %s, por lo que el IVA usado siempre será 0 para las ventas. SwapSenderAndRecipientOnPDF=Intercambiar dirección de remitente y destinatario en documentos PDF -FeatureSupportedOnTextFieldsOnly=Advertencia, función compatible solo en los campos de texto. También se debe establecer un parámetro de URL action=create o action=edit o el nombre de la página debe terminar con 'new.php' para activar esta función. +FeatureSupportedOnTextFieldsOnly=Advertencia, función compatible solo con campos de texto y listas combinadas. Además, se debe establecer un parámetro de URL action = create o action = edit O el nombre de la página debe terminar con 'new.php' para activar esta función. EmailCollector=Recolector de correo EmailCollectorDescription=Añade una tarea programada y una página de configuración para escanear los buzones de e-mail con regularidad (utilizando el protocolo IMAP) y registra los e-mails recibidos en su aplicación, en el lugar correcto y/o crea registros automáticamente (como leads). NewEmailCollector=Nuevo recolector de e-mail @@ -2049,8 +2062,11 @@ UseDebugBar=Usa la barra de debug DEBUGBAR_LOGS_LINES_NUMBER=Número de últimas líneas de registro para mantener en la consola. WarningValueHigherSlowsDramaticalyOutput=Advertencia, los valores altos ralentizan dramáticamente la salida. ModuleActivated=El módulo %s está activado y ralentiza dramáticamente la interfaz +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=El módulo %s está activado y el nivel de registro (%s) es correcto (no demasiado detallado) IfYouAreOnAProductionSetThis=Si esta en un entorno de produccion, deberia establecer esta propiedad a %s AntivirusEnabledOnUpload=Antivirus habilitado en los ficheros subidos +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Los modelos de exportación son compartidos con todos. ExportSetup=Configuración del módulo de exportación. ImportSetup=Configuración del módulo Importar @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Realice un Ping anónimo '+1' al servidor de la base Dolibarr FeatureNotAvailableWithReceptionModule=Función no disponible cuando el módulo Recepción está activado EmailTemplate=Plantilla para e-mail EMailsWillHaveMessageID=Los e-mais tendrán una etiqueta 'Referencias' que coincida con esta sintaxis +PDF_SHOW_PROJECT=Mostrar proyecto en documento +ShowProjectLabel=Etiqueta del proyecto PDF_USE_ALSO_LANGUAGE_CODE=Si desea duplicar algunos textos en su PDF en 2 idiomas diferentes en el mismo PDF generado, debe establecer aquí este segundo idioma para que el PDF generado contenga 2 idiomas diferentes en la misma página, el elegido al generar el PDF y este ( solo unas pocas plantillas PDF lo admiten). Mantener vacío para 1 idioma por PDF. FafaIconSocialNetworksDesc=Ingrese aquí el código de un ícono FontAwesome. Si no sabe qué es FontAwesome, puede usar el valor genérico fa-address-book. FeatureNotAvailableWithReceptionModule=Función no disponible cuando el módulo Recepción está activado @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Cambiar el valor a %s es lo recomendado para una ma DictionaryProductNature= Naturaleza del producto CountryIfSpecificToOneCountry=País (si es específico de un país determinado) YouMayFindSecurityAdviceHere=Puede encontrar un aviso de seguridad aqui. -ModuleActivatedMayExposeInformation=Este modulo puede exponer datos sensibles. Si no lo necesita, desactivelo. +ModuleActivatedMayExposeInformation=Esta extensión de PHP puede exponer datos confidenciales. Si no lo necesita, desactívelo. ModuleActivatedDoNotUseInProduction=Un modulo diseñado para desarrollo ha sido habilitado. No lo habilite en un entorno de produccion. CombinationsSeparator=Carácter separador para las combinaciones de productos SeeLinkToOnlineDocumentation=Ver enlace a la documentación online del menú superior para ejemplos SHOW_SUBPRODUCT_REF_IN_PDF=Si se utiliza la función "%s" del módulo <b>%s</b>, muestra los detalles de los subproductos de un kit en PDF. AskThisIDToYourBank=Comuníquese con su banco para obtener esta identificación +AdvancedModeOnly=Permiso disponible solo en el modo de permiso avanzado +ConfFileIsReadableOrWritableByAnyUsers=Cualquier usuario puede leer o escribir en el archivo conf. Otorgue permiso al usuario y al grupo del servidor web únicamente. +MailToSendEventOrganization=Organización de evento +AGENDA_EVENT_DEFAULT_STATUS=Estado de evento predeterminado al crear un evento desde el formulario +YouShouldDisablePHPFunctions=Deberías deshabilitar las funciones de PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Excepto si necesita ejecutar comandos del sistema (para el módulo Trabajo programado o para ejecutar el antivirus de línea de comando externo, por ejemplo), debe deshabilitar las funciones de PHP +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/es_ES/banks.lang b/htdocs/langs/es_ES/banks.lang index 748edda9c76..596be0958d9 100644 --- a/htdocs/langs/es_ES/banks.lang +++ b/htdocs/langs/es_ES/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Su mandato SEPA FindYourSEPAMandate=Este es su mandato SEPA para autorizar a nuestra empresa a realizar un petición de débito directo a su banco. Gracias por devolverlo firmado (escaneo del documento firmado) o enviado por correo a AutoReportLastAccountStatement=Rellenar automáticamente el campo 'número de extracto bancario' con el último número de extracto cuando realice la conciliación CashControl=Cierre de caja del POS -NewCashFence=Nuevo cierre de caja +NewCashFence=Apertura o cierre de nueva caja BankColorizeMovement=Colorear movimientos BankColorizeMovementDesc=Si esta función está activada, puede elegir un color de fondo específico para los movimientos de débito o crédito BankColorizeMovementName1=Color de fondo para el movimiento de débito BankColorizeMovementName2=Color de fondo para el movimiento de crédito IfYouDontReconcileDisableProperty=Si no realiza las conciliaciones bancarias en algunas cuentas bancarias, desactive la propiedad "%s" en ellas para eliminar esta advertencia. NoBankAccountDefined=Sin cuenta bancaria definida +NoRecordFoundIBankcAccount=No se encontró ningún registro en la cuenta bancaria. Por lo general, esto ocurre cuando un registro se ha eliminado manualmente de la lista de transacciones en la cuenta bancaria (por ejemplo, durante una conciliación de la cuenta bancaria). Otra razón es que el pago se registró cuando se deshabilitó el módulo "%s". diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index fadf06b8e3b..d6ba3c3b0e3 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Factura a cliente CustomerInvoice=Factura a cliente CustomersInvoices=Facturas a clientes SupplierInvoice=Factura proveedor -SuppliersInvoices=Facturas de proveedores +SuppliersInvoices=Facturas proveedor +SupplierInvoiceLines=Líneas de factura de proveedor SupplierBill=Factura proveedor -SupplierBills=Facturas de proveedores +SupplierBills=Facturas proveedor Payment=Pago PaymentBack=Devolución CustomerInvoicePaymentBack=Devolución @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pagos efectuados PaymentsBackAlreadyDone=Reembolsos ya realizados PaymentRule=Forma de pago PaymentMode=Tipo de pago +DefaultPaymentMode=Tipo de pago predeterminado +DefaultBankAccount=Cuenta bancaria predeterminada PaymentTypeDC=Tarjeta de Débito/Crédito PaymentTypePP=PayPal IdPaymentMode=Tipo de pago (id) @@ -373,6 +376,7 @@ DateLastGeneration=Fecha de la última generación DateLastGenerationShort=Fecha última generación MaxPeriodNumber=Nº máximo de facturas a generar NbOfGenerationDone=Nº de facturas ya generadas +NbOfGenerationOfRecordDone=Número de generación de registros ya realizada NbOfGenerationDoneShort=Generados MaxGenerationReached=Máximo número de generaciones alcanzado InvoiceAutoValidate=Validar facturas automáticamente @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=14 días a fin de més FixAmount=Cantidad fija -1 línea con la etiqueta '%s' VarAmount=Importe variable (%% total) VarAmountOneLine=Cantidad variable (%% tot.) - 1 línea con la etiqueta '%s' -VarAmountAllLines=Importe variable (%% total) - todas las mismas líneas +VarAmountAllLines=Cantidad variable (%% tot.) - todas las líneas desde el origen # PaymentType PaymentTypeVIR=Transferencia bancaria PaymentTypeShortVIR=Transferencia bancaria @@ -494,12 +498,16 @@ Cash=Efectivo Reported=Aplazado DisabledBecausePayments=No disponible ya que existen pagos CantRemovePaymentWithOneInvoicePaid=Eliminación imposible cuando existe al menos una factura clasificada como pagada. +CantRemovePaymentVATPaid=No se puede eliminar el pago porque la declaración de IVA se clasifica como pagada +CantRemovePaymentSalaryPaid=No se puede eliminar el pago porque el salario se clasifica como pagado ExpectedToPay=Esperando el pago CantRemoveConciliatedPayment=No se puede eliminar un pago conciliado PayedByThisPayment=Pagada por este pago ClosePaidInvoicesAutomatically=Clasificar automáticamente todas las facturas estándar, de anticipo o de reemplazo como "Pagadas" cuando el pago se realice por completo. ClosePaidCreditNotesAutomatically=Clasifique automáticamente todas las notas de crédito como "Pagadas"cuando el reembolso se realice por completo. ClosePaidContributionsAutomatically=Clasifique automáticamente todas las contribuciones sociales o fiscales como "Pagadas" cuando el pago se realice por completo. +ClosePaidVATAutomatically=Clasifica automáticamente la declaración de IVA como "Pagada" cuando el pago se realiza en su totalidad. +ClosePaidSalaryAutomatically=Clasifica automáticamente el salario como "Pagado" cuando el pago se realiza en su totalidad. AllCompletelyPayedInvoiceWillBeClosed=Todas las facturas con un resto a pagar 0 serán automáticamente cerradas al estado "Pagada". ToMakePayment=Pagar ToMakePaymentBack=Reembolsar @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Tiene que crear una factura estandar antes PDFCrabeDescription=Factura PDF plantilla Crabe. Una plantilla de factura completa (antigua implementación de la plantilla Sponge) PDFSpongeDescription=Modelo de factura Esponja. Una plantilla de factura completa. PDFCrevetteDescription=Modelo PDF de factura Crevette. Un completo modelo de facturas de situación -TerreNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las facturas, %syymm-nnnn para las facturas rectificativas y %syymm-nnnn para los abonos donde yy es el año, mm. el mes y nnnn un contador secuencial sin ruptura y sin permanencia a 0 -MarsNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las facturas, %syymm-nnnn para las facturas rectificativas, %syymm-nnnn para los anticipos y %syymm-nnnn para los abonos donde yy es el año, mm. el mes y nnnn un contador secuencial sin ruptura y sin permanencia a 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Ya existe una factura con $syymm y no es compatible con este modelo de secuencia. Elimínela o renómbrela para poder activar este módulo -CactusNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las facturas, %syymm-nnnn para los abonos y %syymm-nnnn para los anticipos donde yy es el año, mm. el mes y nnnn un contador secuencial sin ruptura y sin permanencia a 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Motivo de cierre anticipado EarlyClosingComment=Nota de cierre anticipado ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Si necesita generar facturas automáticamente, DeleteRepeatableInvoice=Eliminar plantilla de factura ConfirmDeleteRepeatableInvoice=¿Está seguro de querer borrar la plantilla para facturas? CreateOneBillByThird=Crear una factura por tercero (de lo contrario, una factura por pedido) -BillCreated=%s factura(s) creadas +BillCreated=%s factura (s) generada +BillXCreated=Factura %s generada StatusOfGeneratedDocuments=Estado de la generación de documentos DoNotGenerateDoc=No generar archivo de documento AutogenerateDoc=Generar automáticamente archivo de documento diff --git a/htdocs/langs/es_ES/boxes.lang b/htdocs/langs/es_ES/boxes.lang index cc519ff040a..c4ce2bde6f0 100644 --- a/htdocs/langs/es_ES/boxes.lang +++ b/htdocs/langs/es_ES/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Estadísticas sobre los principales objetos comerciales en la base de datos BoxLoginInformation=Información login BoxLastRssInfos=Hilos de información RSS BoxLastProducts=Últimos %s productos/servicios @@ -17,9 +18,13 @@ BoxLastActions=Últimas acciones BoxLastContracts=Últimos contratos BoxLastContacts=Últimos contactos/direcciones BoxLastMembers=Últimos miembros +BoxLastModifiedMembers=Miembros modificados más recientes +BoxLastMembersSubscriptions=Últimas suscripciones de miembros BoxFicheInter=Últimas intervenciones BoxCurrentAccounts=Balance de cuentas abiertas BoxTitleMemberNextBirthdays=Cumpleaños de este mes (miembros) +BoxTitleMembersByType=Miembros por tipo +BoxTitleMembersSubscriptionsByYear=Suscripciones de miembros por año BoxTitleLastRssInfos=Últimas %s noticias de %s BoxTitleLastProducts=Productos/Servicios: últimos %s modificados BoxTitleProductsAlertStock=Productos: alerta de stock @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Últimos %s envíos a clientes NoRecordedShipments=Ningún envío a clientes registrado BoxCustomersOutstandingBillReached=Clientes con límite pendiente alcanzado # Pages -AccountancyHome=Contabilidad +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Proyectos validados diff --git a/htdocs/langs/es_ES/categories.lang b/htdocs/langs/es_ES/categories.lang index b50d6c93e65..644e01fb868 100644 --- a/htdocs/langs/es_ES/categories.lang +++ b/htdocs/langs/es_ES/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Área etiquetas/categorías Proveedores CustomersCategoriesArea=Área etiquetas/categorías Clientes MembersCategoriesArea=Área etiquetas/categorías Miembros ContactsCategoriesArea=Área etiquetas/categorías de contactos -AccountsCategoriesArea=Área categorías contables +AccountsCategoriesArea=Área de etiquetas / categorías de cuentas bancarias ProjectsCategoriesArea=Área etiquetas/categorías Proyectos UsersCategoriesArea=Área etiquetas/categorías Usuarios SubCats=Subcategorías @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Asignar categoría a proveedor ShowCategory=Mostrar etiqueta/categoría ByDefaultInList=Por defecto en lista ChooseCategory=Elija una categoría -StocksCategoriesArea=Categorías de almacenes -ActionCommCategoriesArea=Categorías de eventos +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Categorías de contenedor de página UseOrOperatorForCategories=Uso u operador para categorías diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 3a99ea2432b..57b67050848 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -45,6 +45,7 @@ ParentCompany=Sede central Subsidiaries=Filiales ReportByMonth=Informe por mes ReportByCustomers=Informe por cliente +ReportByThirdparties=Informe por tercero ReportByQuarter=Informe por tasa CivilityCode=Código cortesía RegisteredOffice=Domicilio social @@ -172,14 +173,20 @@ ProfId1ES=CIF/NIF ProfId2ES=Núm. seguridad social ProfId3ES=CNAE ProfId4ES=Núm. colegiado -ProfId5ES=Número EORI +ProfId5ES=Prof Id 5 (número EORI) ProfId6ES=- ProfId1FR=SIREN ProfId2FR=SIRET ProfId3FR=NAF (Ex APE) ProfId4FR=RCS/RM -ProfId5FR=Número EORI +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Número registro ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=Número EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=NIPC ProfId2PT=Núm. seguridad social ProfId3PT=Num reg. comercial ProfId4PT=Conservatorio -ProfId5PT=Número EORI +ProfId5PT=Prof Id 5 (número EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=CUI ProfId2RO=Prof ID 2 (Numero de registro) ProfId3RO=CAEN ProfId4RO=EUID -ProfId5RO=Número EORI +ProfId5RO=Prof Id 5 (número EORI) ProfId6RO=- ProfId1RU=OGRN ProfId2RU=INN @@ -441,7 +449,7 @@ CurrentOutstandingBill=Riesgo alcanzado OutstandingBill=Importe máximo para facturas pendientes OutstandingBillReached=Importe máximo para facturas pendientes OrderMinAmount=Importe mínimo para pedido -MonkeyNumRefModelDesc=Devuelve un número bajo el formato %syymm-nnnn para los códigos de clientes y %syymm-nnnn para los códigos de los proveedores, donde yy es el año, mm el mes y nnnn un contador secuencial sin ruptura y sin volver a 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Código de cliente/proveedor libre sin verificación. Puede ser modificado en cualquier momento. ManagingDirectors=Administrador(es) (CEO, director, presidente, etc.) MergeOriginThirdparty=Tercero duplicado (tercero que debe eliminar) diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index 2fd8288fc12..55fb7c5857b 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=Compras SGST VATCollected=IVA recuperado StatusToPay=A pagar SpecialExpensesArea=Área de pagos especiales +VATExpensesArea=Área para todos los pagos de IVA SocialContribution=Impuestos sociales o fiscales SocialContributions=Impuestos sociales o fiscales SocialContributionsDeductibles=Impuestos sociales o fiscales deducibles @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Cobro factura a cliente PaymentSupplierInvoice=Pago factura de proveedor PaymentSocialContribution=Pagos tasas sociales/fiscales PaymentVat=Pago IVA +AutomaticCreationPayment=Registra automáticamente el pago ListPayment=Listado de pagos ListOfCustomerPayments=Listado de pagos de clientes ListOfSupplierPayments=Listado de pagos a proveedores @@ -104,6 +106,8 @@ LT2PaymentES=Pago IRPF LT2PaymentsES=Pagos IRPF VATPayment=Pago IVA VATPayments=Pagos IVA +VATDeclarations=Declaraciones de IVA +VATDeclaration=Declaración de IVA VATRefund=Devolución IVA NewVATPayment=Nuevo pago IVA NewLocalTaxPayment=Nuevo pago %s @@ -134,9 +138,17 @@ NoWaitingChecks=Sin cheques a la espera de depósito DateChequeReceived=Fecha recepción del cheque NbOfCheques=Nº de cheques PaySocialContribution=Pagar una tasa social/fiscal -ConfirmPaySocialContribution=¿Está seguro de querer clasificar esta tasa social o fiscal como pagada? +PayVAT=Pagar una declaración de IVA +PaySalary=Pagar una tarjeta de salario +ConfirmPaySocialContribution=¿Seguro que quiere clasificar este impuesto social o fiscal como pagado? +ConfirmPayVAT=¿Está seguro de que desea clasificar esta declaración de IVA como pagada? +ConfirmPaySalary=¿Está seguro de que desea clasificar esta tarjeta salarial como pagada? DeleteSocialContribution=Eliminar un pago de tasa social o fiscal -ConfirmDeleteSocialContribution=¿Está seguro de querer eliminar este pago de tasa social/fiscal? +DeleteVAT=Eliminar una declaración de IVA +DeleteSalary=Eliminar una tarjeta de salario +ConfirmDeleteSocialContribution=¿Está seguro de que desea eliminar este pago de impuestos sociales / fiscales? +ConfirmDeleteVAT=¿Está seguro de que desea eliminar esta declaración de IVA? +ConfirmDeleteSalary=¿Está seguro de que desea eliminar este salario? ExportDataset_tax_1=tasas sociales y fiscales y pagos CalcModeVATDebt=Modo <b>%sIVA sobre facturas emitidas%s</b>. CalcModeVATEngagement=Modo <b>%sIVA sobre facturas cobradas%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Incluye los pagos realizados sobre las facturas, las gastos y RulesCADue=- Incluye las facturas vencidas del cliente, ya sean pagadas o no. <br>- Se basa en la fecha de facturación de estas facturas.<br> RulesCAIn=- Incluye los pagos efectuados de las facturas a clientes.<br>- Se basa en la fecha de pago de las mismas<br> RulesCATotalSaleJournal=Incluye todas las líneas de crédito del diario de ventas. +RulesSalesTurnoverOfIncomeAccounts=Incluye (crédito - débito) de líneas para cuentas de productos en el grupo INGRESOS RulesAmountOnInOutBookkeepingRecord=Incluye registro en su libro mayor con cuentas contables que tiene el grupo "GASTOS" o "INGRESOS" RulesResultBookkeepingPredefined=Incluye registro en su libro mayor con cuentas contables que tiene el grupo "GASTOS" o "INGRESOS" RulesResultBookkeepingPersonalized=Muestra un registro en su libro mayor con cuentas contables <b>agrupadas por grupos personalizados</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Informe de impuestos por terceros VATReportByCustomers=Informe IVA por cliente VATReportByCustomersInInputOutputMode=Informe por cliente del IVA repercutido y soportado VATReportByQuartersInInputOutputMode=Informe por tasa del IVA repercutido y soportado +VATReportShowByRateDetails=Mostrar detalles de esta tarifa LT1ReportByQuarters=Informe de IRPF por tasa LT2ReportByQuarters=Informe de IRPF por tasa LT1ReportByQuartersES=Informe de RE por tasa @@ -217,7 +231,7 @@ Pcg_subtype=Subtipo de cuenta InvoiceLinesToDispatch=Líneas de facturas a contabilizar ByProductsAndServices=Por productos y servicios RefExt=Ref. externa -ToCreateAPredefinedInvoice=Para crear una plantilla de factura, cree una factura estándar, seguidamente, sin validarla, haga clic en el botón "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Enlazar a un pedido Mode1=Método 1 Mode2=Método 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Se utilizará una cuenta contable dedicada defi ACCOUNTING_ACCOUNT_SUPPLIER=Cuenta contable usada para proveedores ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Se utilizará una cuenta contable dedicada definida en la ficha de terceros para el relleno del Libro Mayor, o como valor predeterminado de la contabilidad del Libro Mayor si no se define una cuenta contable en la ficha del tercero ConfirmCloneTax=Confirmar la clonación de una tasa social/fiscal +ConfirmCloneVAT=Confirmar la clonación de una declaración de IVA +ConfirmCloneSalary=Confirmar el clon de un salario CloneTaxForNextMonth=Clonarla para el próximo mes SimpleReport=informe simple AddExtraReport=Informes adicionales (añade informe de clientes extranjeros y nacionales) @@ -253,7 +269,8 @@ AccountingAffectation=Asignación de cuenta contable LastDayTaxIsRelatedTo=Último día del período del impuesto VATDue=Impuesto reclamado ClaimedForThisPeriod=Reclamado para el período -PaidDuringThisPeriod=Pagado durante este período +PaidDuringThisPeriod=Pagado por este período +PaidDuringThisPeriodDesc=Esta es la suma de todos los pagos vinculados a las declaraciones de IVA que tienen una fecha de fin de período en el rango de fechas seleccionado ByVatRate=Por tasa de impuesto TurnoverbyVatrate=Volumen de ventas emitidas por tipo de impuesto TurnoverCollectedbyVatrate=Volumen de ventas cobradas por tipo de impuesto @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Volumen de compras pagadas RulesPurchaseTurnoverDue=- Incluye las facturas vencidas del proveedor, ya sean pagadas o no.<br> - Se basa en la fecha de facturación de estas facturas.<br> RulesPurchaseTurnoverIn=- Incluye todos los pagos efectuados de facturas hechas a proveedores.<br>- Se basa en la fecha de pago de estas facturas.<br> RulesPurchaseTurnoverTotalPurchaseJournal=Incluye todas las líneas de débito del diario de compras. +RulesPurchaseTurnoverOfExpenseAccounts=Incluye (débito - crédito) de líneas para cuentas de productos del grupo GASTOS ReportPurchaseTurnover=Volumen de compras facturado ReportPurchaseTurnoverCollected=Volumen de compras pagadas IncludeVarpaysInResults = Incluir varios pagos en informes diff --git a/htdocs/langs/es_ES/ecm.lang b/htdocs/langs/es_ES/ecm.lang index 6a4b189771f..11fadb7ed0c 100644 --- a/htdocs/langs/es_ES/ecm.lang +++ b/htdocs/langs/es_ES/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Archivo aún no indexado en la base de datos (intent ExtraFieldsEcmFiles=campos adicionales de archivos GED ExtraFieldsEcmDirectories=Campos adicionales de Directorios GED ECMSetup=Configuración de GED +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index a25529bdd52..4ab326b7c28 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directorio<b>%s</b>no encontrado (Ruta incorrecta, permisos ina ErrorFunctionNotAvailableInPHP=La función <b>%s</b> es requerida por esta funcionalidad, pero no se encuetra disponible en esta versión/instalación de PHP. ErrorDirAlreadyExists=Ya existe un directorio con ese nombre. ErrorFileAlreadyExists=Ya existe un archivo con este nombre. +ErrorDestinationAlreadyExists=Ya existe otro archivo con el nombre <b> %s </b>. ErrorPartialFile=Archivo no recibido íntegramente por el servidor. ErrorNoTmpDir=Directorio temporal de recepción %s inexistente ErrorUploadBlockedByAddon=Subida bloqueada por un plugin PHP/Apache. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error al cargar plan contable. Si no se cargaron algunas cu ErrorBadSyntaxForParamKeyForContent=Sintaxis incorrecta para el parámetro keyforcontent. Debe tener un valor que comience con %s o %s ErrorVariableKeyForContentMustBeSet=Error, debe configurarse la constante con el nombre %s (con contenido de texto para mostrar) o %s (con url externa para mostrar). ErrorURLMustStartWithHttp=La URL %s debe comenzar con http:// o https:// +ErrorHostMustNotStartWithHttp=El nombre de host %s NO debe comenzar con http: // o https: // ErrorNewRefIsAlreadyUsed=Error, la nueva referencia ya está en uso ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, no es posible eliminar un pago enlazado a una factura cerrada. ErrorSearchCriteriaTooSmall=Los criterios de búsqueda son demasiado pequeños. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=La interfaz pública no estaba habilitada ErrorLanguageRequiredIfPageIsTranslationOfAnother=El idioma de la nueva página debe definirse si se establece como una traducción de otra página. ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=El idioma de la nueva página no debe ser el idioma de origen si está configurado como traducción de otra página. ErrorAParameterIsRequiredForThisOperation=Un parámetro es obligatorio para esta operación. +ErrorDateIsInFuture=Error, la fecha no puede ser futura +ErrorAnAmountWithoutTaxIsRequired=Error, la cantidad es obligatoria +ErrorAPercentIsRequired=Error, ingrese el porcentaje correctamente +ErrorYouMustFirstSetupYourChartOfAccount=Primero debe configurar su plan de cuentas # 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. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Advertencia, no se pudo agregar la entra WarningTheHiddenOptionIsOn=Advertencia, la opción oculta <b> %s </b> está activada. WarningCreateSubAccounts=Advertencia, no puede crear directamente una subcuenta, debe crear un tercero o un usuario y asignarles un código de contabilidad para encontrarlos en esta lista. WarningAvailableOnlyForHTTPSServers=Disponible solo si usa una conexión segura HTTPS. +WarningModuleXDisabledSoYouMayMissEventHere=El módulo %s no se ha habilitado. Así que puede perderse muchos eventos aquí. +ErrorActionCommPropertyUserowneridNotDefined=Se requiere el propietario del usuario +ErrorActionCommBadType=El tipo de evento seleccionado (id: %n, código: %s) no existe en el diccionario de tipo de evento diff --git a/htdocs/langs/es_ES/externalsite.lang b/htdocs/langs/es_ES/externalsite.lang index 973ff6db361..d66d608abbf 100644 --- a/htdocs/langs/es_ES/externalsite.lang +++ b/htdocs/langs/es_ES/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Configuración del enlace al sitio web externo -ExternalSiteURL=URL del sitio externo +ExternalSiteURL=URL del sitio externo de contenido de iframe HTML ExternalSiteModuleNotComplete=El módulo Sitio web externo no ha sido configurado correctamente. ExampleMyMenuEntry=Mi entrada de menú diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index bdc22f9fe03..ebe06f60a3f 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Fecha modif. IPModification=IP de modificación DateLastModification=Última fecha de modificación DateValidation=Fecha de validación +DateSigning=Fecha de firma DateClosing=Fecha de cierre DateDue=Fecha de vencimiento DateValue=Fecha valor @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Precio base (moneda) UnitPriceTTC=Precio unitario total PriceU=P.U. PriceUHT=P.U. -PriceUHTCurrency=P.U. (divisa) +PriceUHTCurrency=P.U. (neto) (moneda) PriceUTTC=P.U. (i.i.) Amount=Importe AmountInvoice=Importe factura @@ -389,6 +390,8 @@ AmountTotal=Importe total AmountAverage=Importe medio PriceQtyMinHT=Precio cantidad min. total PriceQtyMinHTCurrency=Precio cantidad min. (moneda) +PercentOfOriginalObject=Porcentaje de objeto original +AmountOrPercent=Cantidad o porcentaje Percentage=Porcentaje Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ MenuMembers=Miembros MenuAgendaGoogle=Agenda Google MenuTaxesAndSpecialExpenses=Impuestos | Gastos especiales ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú inicio-configuración-seguridad): %s Kb, PHP limit: %s Kb -NoFileFound=No hay documentos guardados en este directorio +NoFileFound=No se cargaron documentos CurrentUserLanguage=Idioma actual CurrentTheme=Tema actual CurrentMenuManager=Gestor menú actual @@ -899,8 +902,10 @@ ViewAccountList=Ver libro mayor ViewSubAccountList=Ver libro mayor de subcuenta RemoveString=Eliminar cadena '%s' SomeTranslationAreUncomplete=Algunos de los idiomas ofrecidos pueden estar parcialmente traducidos o pueden contener errores. Si detecta algunos, puede corregir los archivos de idiomas registrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">http://transifex.com/projects/p/dolibarr/</a>. -DirectDownloadLink=Enlace de descarga directa -DirectDownloadInternalLink=Enlace de descarga directa (necesita estar registrado y necesita permisos) +DirectDownloadLink=Enlace de descarga público +PublicDownloadLinkDesc=Solo se requiere el enlace para descargar el archivo +DirectDownloadInternalLink=Enlace de descarga privado +PrivateDownloadLinkDesc=Debe iniciar sesión y necesita permisos para ver o descargar el archivo Download=Descargar DownloadDocument=Descargar el documento ActualizeCurrency=Actualizar el tipo de cambio @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contactos SearchIntoMembers=Miembros SearchIntoUsers=Usuarios SearchIntoProductsOrServices=Productos o servicios +SearchIntoBatch=Lotes / Series SearchIntoProjects=Proyectos SearchIntoMO=Órdenes de fabricación SearchIntoTasks=Tareas @@ -1049,12 +1055,13 @@ KeyboardShortcut=Atajo de teclado AssignedTo=Asignada a Deletedraft=Eliminar borrador ConfirmMassDraftDeletion=Confirmación de borrado de borradores en masa -FileSharedViaALink=Archivo compartido a través de un enlace +FileSharedViaALink=Archivo compartido con un enlace público SelectAThirdPartyFirst=Selecciona un tercero primero... YouAreCurrentlyInSandboxMode=Actualmente se encuentra en el modo %s "sandbox" Inventory=Inventario AnalyticCode=Código analítico TMenuMRP=MRP +ShowCompanyInfos=Mostrar información de la empresa ShowMoreInfos=Mostrar más información NoFilesUploadedYet=Por favor, cargue un documento primero SeePrivateNote=Ver nota privada @@ -1120,3 +1127,5 @@ AffectTag=Afectar etiqueta ConfirmAffectTag=Afectar etiquetas masivas ConfirmAffectTagQuestion=¿Está seguro de que desea asignar las etiquetas a los %s registros seleccionados? CategTypeNotFound=No se encontró ningún tipo de etiqueta para el tipo de registros +CopiedToClipboard=Copiado al portapapeles +InformationOnLinkToContract=Esta cantidad es solo el total de todas las líneas del contrato. No se toma en consideración ninguna noción de tiempo. diff --git a/htdocs/langs/es_ES/margins.lang b/htdocs/langs/es_ES/margins.lang index 9ebc58db8ef..7fa990805dd 100644 --- a/htdocs/langs/es_ES/margins.lang +++ b/htdocs/langs/es_ES/margins.lang @@ -22,7 +22,7 @@ ProductService=Producto o servicio AllProducts=Todos los productos y servicios ChooseProduct/Service=Elija el producto o servicio ForceBuyingPriceIfNull=Forzar precio de compra/coste al precio de venta si no se define -ForceBuyingPriceIfNullDetails=Si el precio de compra/coste no se ha definido, y esta opción está activada, el margen será cero en la línea (precio de compra/coste = precio de venta), de lo contrario el margen será igual al sugerido por defecto. +ForceBuyingPriceIfNullDetails=Si no se proporciona el precio de compra / costo cuando agregamos una nueva línea, y esta opción está "ON", el margen será 0 en la nueva línea (precio de compra / costo = precio de venta). Si esta opción está "DESACTIVADA" (recomendada), el margen será igual al valor sugerido por defecto (y puede ser del 100% si no se puede encontrar un valor por defecto). MARGIN_METHODE_FOR_DISCOUNT=Método de gestión de descuentos globales UseDiscountAsProduct=Como un producto UseDiscountAsService=Como un servicio diff --git a/htdocs/langs/es_ES/members.lang b/htdocs/langs/es_ES/members.lang index 726d56b3bb8..656b756efad 100644 --- a/htdocs/langs/es_ES/members.lang +++ b/htdocs/langs/es_ES/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Listado de miembros borrador (a validar) MembersListValid=Listado de miembros validados MembersListUpToDate=Listado de miembros válidos con suscripción actualizada MembersListNotUpToDate=Listado de miembros válidos con suscripción caducada +MembersListExcluded=Lista de miembros excluidos MembersListResiliated=Listado de los miembros dados de baja MembersListQualified=Listado de los miembros cualificados MenuMembersToValidate=Miembros borrador MenuMembersValidated=Miembros validados +MenuMembersExcluded=Miembros excluidos MenuMembersResiliated=Miembros de baja MembersWithSubscriptionToReceive=Miembros a la espera de recibir afiliación MembersWithSubscriptionToReceiveShort=Suscripción a recibir @@ -47,9 +49,12 @@ MemberStatusActiveLate=Afiliación expirada MemberStatusActiveLateShort=No al día MemberStatusPaid=Afiliaciones al día MemberStatusPaidShort=Al día +MemberStatusExcluded=Miembro excluido +MemberStatusExcludedShort=Excluido MemberStatusResiliated=Miembro de baja MemberStatusResiliatedShort=De baja MembersStatusToValid=Miembros borrador +MembersStatusExcluded=Miembros excluidos MembersStatusResiliated=Miembros de baja MemberStatusNoSubscription=Validado (no se necesita suscripción) MemberStatusNoSubscriptionShort=Validado @@ -82,6 +87,8 @@ Physical=Físico Moral=Jurídico MorAndPhy=Moral y Físico Reenable=Reactivar +ExcludeMember=Excluir a un miembro +ConfirmExcludeMember=¿Está seguro de que desea excluir a este miembro? ResiliateMember=Dar de baja un miembro ConfirmResiliateMember=¿Está seguro de querer dar de baja a este miembro? DeleteMember=Eliminar un miembro @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Plantilla del e-mail a enviar a un DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Plantilla del e-mail para usar para enviar e-mail a un miembro en un nuevo registro de suscripción DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Plantilla del e-mail a enviar cuando una membresía esté a punto de expirar DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Plantilla del e-mail a enviar a un miembro cuando un miembro se de de baja +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=E-mail emisor para los e-mails automáticos DescADHERENT_ETIQUETTE_TYPE=Formato páginas etiquetas DescADHERENT_ETIQUETTE_TEXT=Texto a imprimir en la dirección de las etiquetas de cada miembro @@ -162,6 +170,7 @@ DocForLabels=Generación de etiquetas de direcciones SubscriptionPayment=Pago cuota LastSubscriptionDate=Fecha de la última cotización LastSubscriptionAmount=Importe de la última cotización +LastMemberType=Último tipo de miembro MembersStatisticsByCountries=Estadísticas de miembros por país MembersStatisticsByState=Estadísticas de miembros por departamento/provincia/región MembersStatisticsByTown=Estadísticas de miembros por población diff --git a/htdocs/langs/es_ES/modulebuilder.lang b/htdocs/langs/es_ES/modulebuilder.lang index 7f8008aa4cd..0974ccd8292 100644 --- a/htdocs/langs/es_ES/modulebuilder.lang +++ b/htdocs/langs/es_ES/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Quiero generar algunos documentos del objeto. IncludeDocGenerationHelp=Si marca esto, se generará código para agregar un panel "Generar documento" en el registro. ShowOnCombobox=Mostrar valor en el combobox KeyForTooltip=Clave para tooltip -CSSClass=Clase CSS +CSSClass=CSS para editar / crear formulario +CSSViewClass=CSS para formulario de lectura +CSSListClass=CSS para lista NotEditable=No editable ForeignKey=Foreign key TypeOfFieldsHelp=Tipo de campos: <br> varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' significa que agregamos un botón + después del combo para crear el registro, 'filtro' puede ser 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' por ejemplo) diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index 14aa5ba7ccc..4b7a1bf7461 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -16,6 +16,8 @@ ToOrder=Realizar pedido MakeOrder=Realizar pedido SupplierOrder=Pedido a proveedor SuppliersOrders=Pedidos a proveedor +SaleOrderLines=Líneas de orden de venta +PurchaseOrderLines=Líneas de pedido de compra SuppliersOrdersRunning=Pedidos a proveedor en curso CustomerOrder=Pedido de cliente CustomersOrders=Pedidos diff --git a/htdocs/langs/es_ES/other.lang b/htdocs/langs/es_ES/other.lang index 0e4f2c2c4e6..f02f402b153 100644 --- a/htdocs/langs/es_ES/other.lang +++ b/htdocs/langs/es_ES/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Empresa con actividades múltiples (todos los módulos principale CreatedBy=Creado por %s ModifiedBy=Modificado por %s ValidatedBy=Validado por %s +SignedBy=Firmado por %s ClosedBy=Cerrado por %s CreatedById=Id usuario que ha creado ModifiedById=Id de usuario que ha realizado último cambio @@ -244,6 +245,7 @@ NewKeyIs=Esta es su nueva contraseña para iniciar sesión NewKeyWillBe=Su nueva contraseña para iniciar sesión en el software será ClickHereToGoTo=Haga click aquí para ir a %s YouMustClickToChange=Sin embargo, debe hacer click primero en el siguiente enlace para validar este cambio de contraseña +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Si usted no ha solicitado este cambio, simplemente ignore este email. Sus credenciales son guardadas de forma segura. IfAmountHigherThan=si el importe es mayor que <strong>%s</strong> SourcesRepository=Repositorio de los fuentes diff --git a/htdocs/langs/es_ES/productbatch.lang b/htdocs/langs/es_ES/productbatch.lang index 1a6500487f1..7e9513db440 100644 --- a/htdocs/langs/es_ES/productbatch.lang +++ b/htdocs/langs/es_ES/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Usar numeración por lotes/series -ProductStatusOnBatch=Sí (se necesita lote/serie) +ProductStatusOnBatch=Si (lote requerido) +ProductStatusOnSerial=Sí (se requiere un número de serie único) ProductStatusNotOnBatch=No (no se usa lote/serie) -ProductStatusOnBatchShort=Sí +ProductStatusOnBatchShort=Lote +ProductStatusOnSerialShort=Serie ProductStatusNotOnBatchShort=No Batch=Lote/Serie atleast1batchfield=Fecha de caducidad o Fecha de venta o Lote/Numero de Serie @@ -22,3 +24,12 @@ ProductLotSetup=Configuración del módulo lotes/series ShowCurrentStockOfLot=Mostrar el stock actual de este producto/lote ShowLogOfMovementIfLot=Ver los movimientos de stock de este producto/lote StockDetailPerBatch=Detalle de stock por lote +SerialNumberAlreadyInUse=El número de serie %s ya se utiliza para el producto %s +TooManyQtyForSerialNumber=Solo puede tener un producto %s para el número de serie %s +BatchLotNumberingModules=Opciones para la generación automática de productos por lotes gestionados por lotes +BatchSerialNumberingModules=Opciones para la generación automática de productos por lotes gestionados por números de serie +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Cantidad a agregar para cada código de barras / lote / serie escaneado + diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 6511c425686..4ee991b8a18 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Tasa IVA (para este producto/proveedor) DiscountQtyMin=Descuento para esta cantidad NoPriceDefinedForThisSupplier=Ningún precio/cant. definido para este proveedor/producto NoSupplierPriceDefinedForThisProduct=Ningún precio/cant. proveedor definida para este producto +PredefinedItem=Elemento predefinido PredefinedProductsToSell=Producto predefinido PredefinedServicesToSell=Servicio predefinido PredefinedProductsAndServicesToSell=Productos/servicios predefinidos a la venta @@ -313,7 +314,7 @@ LastUpdated=Última actualización CorrectlyUpdated=Actualizado correctamente PropalMergePdfProductActualFile=Archivos que se usan para añadir en el PDF Azur son PropalMergePdfProductChooseFile=Seleccione los archivos PDF -IncludingProductWithTag=Productos/servicios incluidos en el tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Precio por defecto, el precio real puede depender del cliente WarningSelectOneDocument=Seleccione al menos un documento DefaultUnitToShow=Unidad diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index 31513b0cd20..c3d001e9b7a 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumido ListOfTasks=Listado de tareas GoToListOfTimeConsumed=Ir al listado de tiempos consumidos GanttView=Vista de Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Listado de presupuestos asociados al proyecto ListOrdersAssociatedProject=Listado de pedidos de clientes asociados al proyecto ListInvoicesAssociatedProject=Listado de facturas a clientes asociadas al proyecto @@ -234,7 +235,7 @@ OppStatusPENDING=Pendiente OppStatusWON=Ganado OppStatusLOST=Perdido Budget=Presupuesto -AllowToLinkFromOtherCompany=Permitir vincular proyecto de otra empresa <br> <br> <u> Valores admitidos: </u><br> - Mantener vacío: puede vincular cualquier proyecto de la empresa (predeterminado) <br> - "todo": puede vincular cualquier proyecto, incluso proyectos de otras empresas <br> - Una lista de identificación de terceros separada por comas: puede vincular todos los proyectos de esos terceros definidos (Ejemplo: 123,4795,53) <br> +AllowToLinkFromOtherCompany=Permitir vincular proyecto de otra empresa <br> <br> <u> Valores admitidos: </u><br> - Mantener vacío: puede vincular cualquier proyecto de la empresa (predeterminado) <br> - "all": puede vincular cualquier proyecto, incluso proyectos de otras empresas <br> - Una lista de identificación de terceros separada por comas: puede vincular todos los proyectos de esos terceros definidos (Ejemplo: 123,4795,53) <br> LatestProjects=Últimos %s presupuestos LatestModifiedProjects=Últimos %s proyectos modificados OtherFilteredTasks=Otras tareas filtradas @@ -268,3 +269,7 @@ OneLinePerTask=Una línea por tarea OneLinePerPeriod=Una línea por período RefTaskParent=Ref. Tarea principal ProfitIsCalculatedWith=El beneficio se calcula usando +AddPersonToTask=Agregar también a las tareas +UsageOrganizeEvent=Uso: Organización de eventos +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Clasifique el proyecto como cerrado cuando se completen todas sus tareas (progreso 100%%) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Nota: los proyectos existentes con todas las tareas en 100%% no se verán afectados: tendrás que cerrarlos manualmente. Esta opción solo afecta a proyectos abiertos. diff --git a/htdocs/langs/es_ES/propal.lang b/htdocs/langs/es_ES/propal.lang index b0d6536d10d..62505a106a3 100644 --- a/htdocs/langs/es_ES/propal.lang +++ b/htdocs/langs/es_ES/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=¿Está seguro de querer clonar el presupuesto <b>%s</b>? ConfirmReOpenProp=¿Está seguro de querer reabrir el presupuesto <b>%s</b>? ProposalsAndProposalsLines=Presupuestos a clientes y líneas de presupuestos ProposalLine=Línea de presupuesto +ProposalLines=Líneas de presupuesto AvailabilityPeriod=Tiempo de entrega SetAvailability=Definir el tiempo de entrega AfterOrder=desde la firma diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index c40c86b03c9..aa551813b9c 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Stock faltante StockAtDate=Stock a fecha -StockAtDateInPast=Fecha en el pasado -StockAtDateInFuture=Fecha en el futuro +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks por lotes/serie LotSerial=Lotes/Series LotSerialList=Listado de lotes/series @@ -37,8 +37,8 @@ AllWarehouses=Todos los almacenes IncludeEmptyDesiredStock=Incluir también stock negativo con stock deseado indefinido IncludeAlsoDraftOrders=Incluir también pedidos borrador Location=Lugar -LocationSummary=Nombre corto del lugar -NumberOfDifferentProducts=Número de productos diferentes +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Numero total de productos LastMovement=Último movimiento LastMovements=Últimos movimientos @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Valor de stocks UserWarehouseAutoCreate=Crear automáticamente existencias/almacén propio del usuario en la creación del usuario AllowAddLimitStockByWarehouse=Administrar también el valor del stock mínimo y deseado de la cupla (producto-almacén) además del valor del stock mínimo y deseado por producto RuleForWarehouse=Regla para almacenes -WarehouseAskWarehouseDuringPropal=Establecer un almacén para presupuestos de venta +WarehouseAskWarehouseOnThirparty=Establecer un almacén en un tercero +WarehouseAskWarehouseDuringPropal=Establecer un almacén en presupuestos comerciales WarehouseAskWarehouseDuringOrder=Indicar un almacén en pedidos de clientes UserDefaultWarehouse=Indicar un almacén en usuarios MainDefaultWarehouse=Almacén por defecto @@ -97,15 +98,16 @@ RealStockDesc=El stock físico o real es la stock que tiene actualmente en sus a RealStockWillAutomaticallyWhen=El stock real cambiará automáticamente de acuerdo con esta regla (según configuración del módulo de stock): VirtualStock=Stock virtual VirtualStockAtDate=Stock virtual a fecha -VirtualStockAtDateDesc=Stock virtual una vez que se procesen todos los pedidos pendientes que se planea realizar antes de la fecha +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished VirtualStockDesc=El stock virtual es el stock que obtendrá una vez que todas las acciones abiertas/pendientes (que afecten al stock) serán cerradas (pedidos a proveedor del proveedor recibidos, pedidos de clientes enviados, ...) +AtDate=En la fecha 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=Valor (PMP) -AverageUnitPricePMPDesc=El precio unitario promedio de entrada que tuvimos que pagar a los proveedores para que el producto estuviera en nuestras existencias. +AverageUnitPricePMPDesc=El precio unitario promedio de entrada que tuvimos que gastar para obtener 1 unidad de producto en nuestro stock. SellPriceMin=Precio de venta unitario EstimatedStockValueSellShort=Valor de venta EstimatedStockValueSell=Valor de venta @@ -145,7 +147,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 on "%s". RecordMovement=Registrar transferencia ReceivingForSameOrder=Recepciones de este pedido StockMovementRecorded=Movimiento de stock registrado @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=El nivel de stock debe ser suficiente para añadir e StockMustBeEnoughForOrder=El nivel de stock debe ser suficiente para añadir el producto/servicio al pedido (se realiza comprobación del stock real actual al agregar una línea en el pedido según las reglas del módulo stocks) StockMustBeEnoughForShipment= El nivel de stock debe ser suficiente para añadir el producto/servicio en el envío (se realiza comprobación del stock real actual al agregar una línea en el envío según las reglas del módulo stocks) MovementLabel=Etiqueta del movimiento -TypeMovement=Tipo de movimiento +TypeMovement=Dirección de movimiento DateMovement=Fecha de movimiento InventoryCode=Movimiento o código de inventario IsInPackage=Contenido en el paquete @@ -183,6 +185,7 @@ inventoryCreatePermission=Crear nuevo inventario inventoryReadPermission=Ver inventarios inventoryWritePermission=Actualizar inventarios inventoryValidatePermission=Validar inventario +inventoryDeletePermission=Eliminar inventario inventoryTitle=Inventario inventoryListTitle=Inventarios inventoryListEmpty=Sin inventario en progreso @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Se requiere stock para elegir qué lote usa ForceTo=Forzar AlwaysShowFullArbo=Mostrar el árbol completo del almacén en la ventana emergente de enlaces del almacén (Advertencia: esto puede disminuir drásticamente el rendimiento) StockAtDatePastDesc=Puede ver aquí el stock (stock real) en una fecha determinada en el pasado -StockAtDateFutureDesc=Puede ver aquí el stock (stock virtual) en una fecha determinada en el futuro +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Stock actual InventoryRealQtyHelp=Establezca el valor en 0 para restablecer la cantidad <br> Mantenga el campo vacío o elimine la línea para mantenerlo sin cambios -UpdateByScaning=Actualizar escaneando +UpdateByScaning=Llene la cantidad real escaneando UpdateByScaningProductBarcode=Actualización por escaneo (código de barras del producto) UpdateByScaningLot=Actualización por escaneo (lote | código de barras de serie) DisableStockChangeOfSubProduct=Desactive el cambio de stock de todos los subproductos de este Kit durante este movimiento. +ImportFromCSV=Importar lista CSV de movimientos +ChooseFileToImport=Cargue el archivo y luego haga clic en el icono %s para seleccionar el archivo como archivo de importación de origen ... +SelectAStockMovementFileToImport=seleccione un archivo de movimiento de stock para importar +InfoTemplateImport=El archivo cargado debe tener este formato (* son campos obligatorios): <br> Almacén de origen * | Almacén de destino * | Producto * | Cantidad * | Lote / número de serie <br> El separador de caracteres CSV debe ser "<b> %s </b>" +LabelOfInventoryMovemement=Inventario %s +ReOpen=Reabrir +ConfirmFinish=¿Confirmas el cierre del inventario? Esto generará todos los movimientos de stock para actualizar su stock. +ObjectNotFound=%s no encontrado +MakeMovementsAndClose=Generar movimientos y cerrar +AutofillWithExpected=Llene la cantidad real con la cantidad esperada diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index d66117c0ab4..3ca5ccc0155 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Proveedores SuppliersInvoice=Factura proveedor +SupplierInvoices=Facturas proveedor ShowSupplierInvoice=Ver factura de proveedor NewSupplier=Nuevo proveedor History=Histórico diff --git a/htdocs/langs/es_ES/ticket.lang b/htdocs/langs/es_ES/ticket.lang index 2ff65db0cfc..2fb5cd1f69d 100644 --- a/htdocs/langs/es_ES/ticket.lang +++ b/htdocs/langs/es_ES/ticket.lang @@ -70,6 +70,8 @@ Deleted=Eliminado # Dict Type=Tasa Severity=Gravedad +TicketGroupIsPublic=El grupo es público +TicketGroupIsPublicDesc=Si un grupo de tickets es público, será visible en el formulario al crear un ticket desde la interfaz pública. # Email templates MailToSendTicketMessage=Enviar e-mail desde ticket @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Mostrar el logotipo del módulo en la interfaz pública TicketsShowModuleLogoHelp=Active esta opción para ocultar el logotipo en las páginas de la interfaz pública TicketsShowCompanyLogo=Mostrar el logotipo de la empresa en la interfaz pública TicketsShowCompanyLogoHelp=Active esta opción para ocultar el logotipo de la empresa principal en las páginas de la interfaz pública -TicketsEmailAlsoSendToMainAddress=También envíe notificaciones a la dirección de e-mail principal -TicketsEmailAlsoSendToMainAddressHelp=Active esta opción para enviar un e-mail a la dirección "E-mail de notificación de" (consulte la configuración a continuación) +TicketsEmailAlsoSendToMainAddress=También envíe una notificación a la dirección de correo electrónico principal +TicketsEmailAlsoSendToMainAddressHelp=Habilite esta opción para enviar también un correo electrónico a la dirección definida en la configuración "%s" (consulte la pestaña "%s") TicketsLimitViewAssignedOnly=Restringir la visualización de los tickets asignados al usuario actual (no aplicable para usuarios externos, siempre estará limitada al tercero del que dependen) TicketsLimitViewAssignedOnlyHelp=Solo los tickets asignados al usuario actual serán visibles. No se aplica a un usuario con derechos de gestión de tickets. TicketsActivatePublicInterface=Activar interfaz pública. @@ -126,10 +128,10 @@ TicketNumberingModules=Módulo de numeración de tickets TicketsModelModule=Plantillas de documentos para tickets TicketNotifyTiersAtCreation=Notificar a los terceros en la creación 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 +TicketsPublicNotificationNewMessage=Enviar correo electrónico (s) cuando se agrega un nuevo mensaje / comentario a un ticket 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) TicketPublicNotificationNewMessageDefaultEmail=Notificaciones por e-mail a (actualización) -TicketPublicNotificationNewMessageDefaultEmailHelp=Envíe notificaciones de mensajes nuevos por e-mail a esta dirección si el ticket no tiene un usuario asignado o si el usuario no tiene un e-mail. +TicketPublicNotificationNewMessageDefaultEmailHelp=Envíe un correo electrónico a esta dirección para cada notificación de mensaje nuevo si el ticket no tiene un usuario asignado o si el usuario no tiene ningún correo electrónico conocido. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Últimos tickets modificados BoxLastModifiedTicketDescription=Últimos %s tickets modificados BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No hay tickets modificados recientemente +BoxTicketType=Número de tickets abiertos por tipo +BoxTicketSeverity=Número de tickets abiertos por gravedad +BoxNoTicketSeverity=No hay tickets abiertos +BoxTicketLastXDays=Número de tickets nuevos por días los últimos %s días +BoxTicketLastXDayswidget = Número de tickets nuevos por días los últimos X días +BoxNoTicketLastXDays=No hay entradas nuevas los últimos días %s +BoxNumberOfTicketByDay=Número de tickets nuevos por día +BoxNewTicketVSClose=Número de tickets nuevos de hoy en comparación con los tickets cerrados de hoy +TicketCreatedToday=Ticket creado hoy +TicketClosedToday=Ticket cerrado hoy diff --git a/htdocs/langs/es_ES/users.lang b/htdocs/langs/es_ES/users.lang index bfc709a9e2f..8e59820c70a 100644 --- a/htdocs/langs/es_ES/users.lang +++ b/htdocs/langs/es_ES/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=Usuarios y sus propiedades. DomainUser=Usuario de dominio Reactivate=Reactivar CreateInternalUserDesc=Este formulario le permite crear un usuario interno para su empresa/organización. Para crear un usuario externo (cliente, proveedor, etc), use el botón "Crear una cuenta de usuario" desde la ficha de un contacto del tercero. -InternalExternalDesc=Un usuario <b> interno </b> es un usuario que forma parte de su empresa/organización. <br> Un usuario <b> externo </b> es un cliente, proveedor u otro (La creación de un usuario externo para un tercero se puede hacer desde el registro de contacto del tercero). <br> <br> En ambos casos, los permisos definen los derechos en Dolibarr, también el usuario externo puede tener un administrador de menú diferente al usuario interno (Ver Inicio - Configuración - Entorno) +InternalExternalDesc=Un usuario <b>interno</b> es un usuario que forma parte de su empresa / organización, o es un usuario asociado fuera de su organización que puede necesitar ver más datos que datos relacionados con su empresa (el sistema de permisos definirá lo que puede o puede ver o hacer). <br> Un usuario <b> externo </b> es un cliente, proveedor u otro que debe ver ÚNICAMENTE datos relacionados con él mismo (la creación de un usuario externo para un tercero se puede realizar desde el registro de contacto del tercero). <br> <br> En ambos casos, debe otorgar permisos sobre las funciones que el usuario necesita. PermissionInheritedFromAGroup=El permiso se concede ya que lo hereda de un grupo al cual pertenece el usuario. Inherited=Heredado UserWillBe=El usuario creado será diff --git a/htdocs/langs/es_ES/website.lang b/htdocs/langs/es_ES/website.lang index 7ea28bc2c96..673c7f003f8 100644 --- a/htdocs/langs/es_ES/website.lang +++ b/htdocs/langs/es_ES/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost= <u>Usar con Apache/NGinx /...</u><br>Crea en su servidor we ExampleToUseInApacheVirtualHostConfig=Ejemplo para usar en la configuración del host virtual Apache: YouCanAlsoTestWithPHPS=En el entorno de desarrollo, es posible que prefiera probar el sitio con el servidor web incrustado de PHP (se requiere PHP 5.5) ejecutando <br><strong> php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Ejecute su sitio web con otro proveedor de alojamiento Dolibarr</u> <br> Si no tiene un servidor web como Apache o NGinx disponible en Internet, puede exportar e importar su sitio web a otra instancia de Dolibarr proporcionada por otro proveedor de alojamiento de Dolibarr que brinde una integración completa con el módulo del sitio web. Puede encontrar una lista de algunos proveedores de hosting Dolibarr en <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Compruebe también que el host virtual tiene <strong>%s</strong> en archivos en <strong>%s</strong> +CheckVirtualHostPerms=Compruebe también que el usuario del host virtual (por ejemplo, www-data) tiene <strong>%s</strong>permisos en archivos en <br><strong>%s</strong> ReadPerm=Leido WritePerm=Escribir TestDeployOnWeb=Prueba/despliegue en la web PreviewSiteServedByWebServer=<u>Vista previa de %s en una nueva pestaña.</u> <br><br>%s será servido por un servidor web externo (como Apache, Nginx, IIS). Debe instalar y configurar este servidor antes de apuntar al directorio:<br><strong>%s</strong><br> URL servida por el servidor externo: <br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Vista previa %s en una nueva pestaña.</u> <br> <br> El %s será servido por el servidor de Dolibarr por lo que no necesita instalar ningún servidor web extra (como Apache, Nginx, IIS). <br> El inconveniente es que la URL de las páginas no amigables y comienzan con la ruta de su Dolibarr. <br> URL que sirve Dolibarr: <br><strong>%s</strong> <br> <br>Para utilizar su propio servidor web externo para servir esta web, cree un host virtual en su servidor web que apunte al directorio<br> <strong>%s</strong><br> luego escriba el nombre de este servidor virtual y haga clic en el otro botón de vista previa. +PreviewSiteServedByDolibarr= <u> Obtenga una vista previa de %s en una pestaña nueva. </u> <br> <br> El %s será servido por el servidor Dolibarr por lo que no necesita ningún servidor web adicional (como Apache, Nginx, IIS) para ser instalado. <br> El inconveniente es que las URL de las páginas no son fáciles de usar y comienzan con la ruta de tu Dolibarr. <br> URL servida por Dolibarr: <br> <strong> %s </strong> <br> <br> Para utilizar su propio servidor web exterior al servicio de este sitio web, crear una máquina virtual en su servidor Web que señala en el directorio <br> <strong> %s </strong> <br> a continuación, introduzca el nombre de este servidor virtual en las propiedades de este sitio web y haga clic en el enlace "Probar / Implementar en la web". VirtualHostUrlNotDefined=URL del Host Virtual servido por un servidor externo no definido NoPageYet=No hay páginas todavía YouCanCreatePageOrImportTemplate=Puede crear una nueva página o importar una plantilla de sitio web completa @@ -137,3 +137,11 @@ PagesRegenerated=%s página(s)/contenedor(s) regenerados RegenerateWebsiteContent=Regenerar archivos de caché del sitio web AllowedInFrames=Permitido en marcos DefineListOfAltLanguagesInWebsiteProperties=Defina la lista de todos los idiomas disponibles en las propiedades del sitio web. +GenerateSitemaps=Generar archivo de mapa del sitio del sitio web +ConfirmGenerateSitemaps=Si confirma, borrará el archivo de mapa del sitio existente ... +ConfirmSitemapsCreation=Confirmar la generación del mapa del sitio +SitemapGenerated=Mapa del sitio generado +ImportFavicon=Favicon +ErrorFaviconType=El favicon debe ser png +ErrorFaviconSize=El favicon debe tener un tamaño de 32x32 +FaviconTooltip=Sube una imagen que debe ser un png de 32x32 diff --git a/htdocs/langs/es_ES/zapier.lang b/htdocs/langs/es_ES/zapier.lang index cc63194a91e..553a04438ff 100644 --- a/htdocs/langs/es_ES/zapier.lang +++ b/htdocs/langs/es_ES/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier para Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier para el módulo Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr +ZapierForDolibarrSetup=Configuración de Zapier para Dolibarr ZapierDescription=Interfaz con Zapier +ZapierAbout=Sobre el módulo Zapier +ZapierSetupPage=No es necesario realizar una configuración en el lado de Dolibarr para utilizar Zapier. Sin embargo, debe generar y publicar un paquete en zapier para poder usar Zapier con Dolibarr. Consulte la documentación sobre <a href="https://wiki.dolibarr.org/index.php/Module_Zapier"> en esta página wiki </a>. diff --git a/htdocs/langs/es_GT/accountancy.lang b/htdocs/langs/es_GT/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_GT/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_GT/admin.lang b/htdocs/langs/es_GT/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_GT/admin.lang +++ b/htdocs/langs/es_GT/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_GT/modulebuilder.lang b/htdocs/langs/es_GT/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_GT/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_GT/products.lang b/htdocs/langs/es_GT/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_GT/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_GT/website.lang b/htdocs/langs/es_GT/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_GT/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_GT/withdrawals.lang b/htdocs/langs/es_GT/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_GT/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_HN/accountancy.lang b/htdocs/langs/es_HN/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_HN/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_HN/admin.lang b/htdocs/langs/es_HN/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_HN/admin.lang +++ b/htdocs/langs/es_HN/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_HN/modulebuilder.lang b/htdocs/langs/es_HN/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_HN/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_HN/products.lang b/htdocs/langs/es_HN/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_HN/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_HN/website.lang b/htdocs/langs/es_HN/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_HN/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_HN/withdrawals.lang b/htdocs/langs/es_HN/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_HN/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_MX/accountancy.lang b/htdocs/langs/es_MX/accountancy.lang index d6c90c3b1ce..d5919ef1940 100644 --- a/htdocs/langs/es_MX/accountancy.lang +++ b/htdocs/langs/es_MX/accountancy.lang @@ -79,7 +79,6 @@ VentilatedinAccount=Agregado exitosamente a la cuenta contable NotVentilatedinAccount=No añadido a la cuenta contable XLineSuccessfullyBinded=%s productos / servicios vinculados con éxito a una cuenta contable XLineFailedToBeBinded=%s productos / servicios no estaban vinculados a ninguna cuenta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comience la ordenación de la página "Enlazar para hacer" por los elementos más recientes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comience la ordenación de la página "Enlace realizado" por los elementos más recientes BANK_DISABLE_DIRECT_INPUT=Deshabilitar el registro directo de la transacción en la cuenta bancaria diff --git a/htdocs/langs/es_MX/admin.lang b/htdocs/langs/es_MX/admin.lang index 2f40f90a92a..afc2e0f6850 100644 --- a/htdocs/langs/es_MX/admin.lang +++ b/htdocs/langs/es_MX/admin.lang @@ -221,19 +221,19 @@ DisableLinkToHelpCenter=Ocultar enlace &quot; <b>Necesita ayuda o soporte</b> &q DisableLinkToHelp=Ocultar enlace a ayuda en línea &quot; <b>%s</b> &quot; WarningSettingSortOrder=Advertencia, establecer un orden predeterminado puede resultar en un error técnico al pasar a la página de lista si "campo" es un campo desconocido. Si experimenta un error de este tipo, vuelva a esta página para eliminar el orden predeterminado y restaurar el comportamiento predeterminado. Module20Name=Propuestas -Module25Name=Ordenes de venta Module30Name=Facturas Module40Name=Vendedores -Module59000Desc=Module to follow margins +Module3400Name=Redes Sociales DictionaryAccountancyJournal=Diarios de contabilidad DictionarySocialNetworks=Redes Sociales Upgrade=Actualizar +ShowBugTrackLink=Show link "<strong>%s</strong>" LDAPFieldFirstName=Nombre(s) -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) 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 <strong> %s </strong>. Para que este directorio sea procesado por Dolibarr, debe configurar su <strong> conf/conf.php </strong> para agregar las 2 líneas de directiva: <strong> $dolibarr_main_url_root_alt='/custom'; </strong> <br> <strong> $dolibarr_main_document_root_alt='%s/custom'; </strong> MailToSendProposal=Propuestas de clientes MailToSendInvoice=Facturas de clientes MailToSendSupplierOrder=Ordenes de compra +MailToSendSupplierInvoice=Facturas de proveedor OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/bills.lang b/htdocs/langs/es_MX/bills.lang index 4ea66beab2f..6e54fb35a3c 100644 --- a/htdocs/langs/es_MX/bills.lang +++ b/htdocs/langs/es_MX/bills.lang @@ -1,8 +1,10 @@ # Dolibarr language file - Source file is en_US - bills BillsCustomers=Facturas de clientes BillsCustomer=Factura del cliente -BillsCustomersUnpaid=Facturas de clientes no pagadas -BillsCustomersUnpaidForCompany=Facturas de clientes no pagadas por %s +BillsSuppliers=Facturas de proveedor +BillsCustomersUnpaid=Facturas de cliente no pagadas +BillsCustomersUnpaidForCompany=Facturas de cliente no pagadas por %s +BillsSuppliersUnpaid=Facturas de proveedor no pagadas BillsLate=Pagos atrasados BillsStatistics=Estadísticas de facturas de clientes DisabledBecauseNotErasable=Desactivado porque no se puede borrar @@ -26,10 +28,15 @@ NoInvoiceToCorrect=Ninguna factura para corregir InvoiceHasAvoir=Fue fuente de una o varias notas de crédito InvoiceCustomer=Factura del cliente CustomerInvoice=Factura del cliente +CustomersInvoices=Facturas de clientes +SuppliersInvoices=Facturas de proveedor +SupplierBills=Facturas de proveedor ConfirmDeletePayment=Are you sure you want to delete this payment ? PaymentAmount=Importe de pago +AddBill=Crear factura o nota de crédito BillStatusDraft=Borrador (necesita ser validado) BillStatusPaid=Pagado +BillStatusPaidBackOrConverted=Reembolso de nota de crédito o marcado como crédito disponible BillStatusStarted=Iniciado BillShortStatusPaid=Pagado BillShortStatusConverted=Pagado @@ -38,12 +45,22 @@ BillShortStatusStarted=Iniciado BillShortStatusClosedUnpaid=Cerrada BillFrom=De BillTo=Hacia +SupplierBillsToPay=Facturas de proveedor no pagadas CustomerBillsUnpaid=Facturas de clientes no pagadas Billed=Facturada CreditNote=Nota de crédito +CreditNotes=Notas de crédito +DiscountFromCreditNote=Descuento de nota de crédito %s +NoteReason=Nota / Razón ReasonDiscount=Razón +InvoiceNote=Nota de factura +PaymentNote=Nota de pago +DisabledBecauseNotEnouthCreditNote=Para eliminar una factura de situación del ciclo, el total de la nota de crédito de esta factura debe cubrir este total de la factura PaymentConditionShortPT_ORDER=Pedido PaymentTypeCB=Tarjeta de crédito PaymentTypeShortCB=Tarjeta de crédito PayedByThisPayment=Liquidado en este pago +ClosePaidCreditNotesAutomatically=Clasifica automáticamente todas las notas de crédito como "Pagadas" cuando el reembolso se realiza en su totalidad. +NoteListOfYourUnpaidInvoices=Nota: Esta lista contiene solo facturas de terceros con los que está vinculado como representante de ventas. +ErrorOutingSituationInvoiceCreditNote=No se pudo sacar la nota de crédito vinculada. situationInvoiceShortcode_S=D diff --git a/htdocs/langs/es_MX/bookmarks.lang b/htdocs/langs/es_MX/bookmarks.lang new file mode 100644 index 00000000000..826bd7a1ccf --- /dev/null +++ b/htdocs/langs/es_MX/bookmarks.lang @@ -0,0 +1,11 @@ +# Dolibarr language file - Source file is en_US - bookmarks +AddThisPageToBookmarks=Agregar página actual a marcadores +ListOfBookmarks=Lista de marcadores +ShowBookmark=Ver marcador +ReplaceWindow=Reemplazar pestaña actual +BehaviourOnClick=Comportamiento cuando se selecciona una URL de marcador +SetHereATitleForLink=Asignar nombre para el marcador +UseAnExternalHttpLinkOrRelativeDolibarrLink=Utilice un enlace externo/absoluto (https://URL) o un enlace interno/relativo (/DOLIBARR_ROOT/htdocs/...) +ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Elija si la página vinculada debe abrirse en la pestaña actual o en una pestaña nueva +BookmarksManagement=Gestor de marcadores +BookmarksMenuShortCut=Ctrl + Mayús + m diff --git a/htdocs/langs/es_MX/boxes.lang b/htdocs/langs/es_MX/boxes.lang index 681fe36e07c..8d31d1307bc 100644 --- a/htdocs/langs/es_MX/boxes.lang +++ b/htdocs/langs/es_MX/boxes.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes -BoxLoginInformation=Información de Login +BoxLoginInformation=Información de Sesión BoxLastRssInfos=Información RSS BoxLastProducts=Últimos %s Productos/Servicios BoxLastSupplierBills=Últimas facturas de proveedor @@ -7,7 +7,7 @@ BoxLastCustomerBills=Últimas facturas de clientes BoxOldestUnpaidCustomerBills=Facturas de clientes sin pagar más antiguas BoxOldestUnpaidSupplierBills=Facturas de proveedores sin pagar más antiguas BoxLastProposals=Últimas propuestas comerciales -BoxLastCustomerOrders=Últimos pedidos de venta +BoxLastCustomerOrders=Últimos pedidos BoxCurrentAccounts=Saldo de cuentas abiertas BoxSuppliersOrdersPerMonth=Órdenes a proveedor por mes BoxTitleLastModifiedPropals=Últimas %s cotizaciones modificadas diff --git a/htdocs/langs/es_MX/categories.lang b/htdocs/langs/es_MX/categories.lang new file mode 100644 index 00000000000..2ffb4e3f26f --- /dev/null +++ b/htdocs/langs/es_MX/categories.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - categories +Rubriques=Etiquetas/Categorías diff --git a/htdocs/langs/es_MX/companies.lang b/htdocs/langs/es_MX/companies.lang index 811526bc5ac..180ac68ceaf 100644 --- a/htdocs/langs/es_MX/companies.lang +++ b/htdocs/langs/es_MX/companies.lang @@ -22,7 +22,6 @@ ThirdPartyEmail=Correo electrónico del tercero ThirdPartyCustomersWithIdProf12=Clientes con %s o %s ToCreateContactWithSameName=Creará automáticamente un contacto/dirección con la misma información en tercero. En la mayoría de los casos, incluso si su tercero es una persona física, la creación de un tercero solo es suficiente. ParentCompany=Empresa matriz -ReportByQuarter=Reporte por tasa CivilityCode=Código de civilidad RegisteredOffice=Oficina registrada Lastname=Apellido @@ -213,7 +212,6 @@ UniqueThirdParties=Total de terceros InActivity=Abierta OutstandingBillReached=Max. para la cuenta pendiente alcanzada OrderMinAmount=Cantidad mínima por pedido -MonkeyNumRefModelDesc=Devuelve un número con formato %syymm-nnnn para el código de cliente y %syymm-nnnn para código de proveedor donde yy es el año, mm el mes y nnnn una secuencia numérica sin ruptura y sin regresar a 0. LeopardNumRefModelDesc=El código es libre. Este código puede ser modificado en cualquier momento. ManagingDirectors=Administrador(es) (CEO, Director, Presidente...) MergeOriginThirdparty=Tercero duplicado (tercero que deseas eliminar) diff --git a/htdocs/langs/es_MX/main.lang b/htdocs/langs/es_MX/main.lang index b2b9ca9f0e5..8348317d53f 100644 --- a/htdocs/langs/es_MX/main.lang +++ b/htdocs/langs/es_MX/main.lang @@ -139,16 +139,10 @@ Login=Inicio de sesión CurrentLogin=Inicio de sesión actual May=Mayo December=diciembre -Month05=Mayo MonthShort01=Ene MonthShort04=Abr -MonthShort05=Mayo MonthShort08=Ago MonthShort12=Dic -MonthVeryShort02=V -MonthVeryShort03=L -MonthVeryShort05=L -MonthVeryShort09=D DateFormatYYYYMM=MM-YYYY DateFormatYYYYMMDD=DD-MM-YYYY DateFormatYYYYMMDDHHMM=DD-MM-YYYY HH:SS @@ -269,6 +263,7 @@ ShortThursday=MJ Select2NotFound=No se encontró ningún resultado Select2Enter=Entrar SearchIntoCustomerInvoices=Facturas de clientes +SearchIntoSupplierInvoices=Facturas de proveedor SearchIntoSupplierOrders=Ordenes de compra SearchIntoCustomerProposals=Propuestas comerciales SearchIntoExpenseReports=Reporte de gastos diff --git a/htdocs/langs/es_MX/modulebuilder.lang b/htdocs/langs/es_MX/modulebuilder.lang index 4805c2fa2c0..82299e4a90a 100644 --- a/htdocs/langs/es_MX/modulebuilder.lang +++ b/htdocs/langs/es_MX/modulebuilder.lang @@ -9,3 +9,4 @@ PageForList=Página PHP para la lista de registro PathToModulePackage=Ruta del módulo/aplicación zip SpaceOrSpecialCharAreNotAllowed=No se permiten espacios ni caracteres especiales. FileNotYetGenerated=Archivo aún no generado +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_MX/orders.lang b/htdocs/langs/es_MX/orders.lang index a3bb0ddd512..c63c7477cc5 100644 --- a/htdocs/langs/es_MX/orders.lang +++ b/htdocs/langs/es_MX/orders.lang @@ -1,6 +1,49 @@ # Dolibarr language file - Source file is en_US - orders +OrdersArea=Área de pedidos de clientes +SuppliersOrdersArea=Área de órdenes de compra +OrderCard=Tarjeta de pedido +OrderId=ID de pedido +NewOrderSupplier=Nueva orden de compra +ToOrder=Crear orden +MakeOrder=Crear orden +SupplierOrder=Orden de compra +SuppliersOrders=Ordenes de compra +SuppliersOrdersRunning=Ordenes de compra actuales +CustomerOrder=Pedidos +SuppliersOrdersToProcess=Órdenes de compra a procesar StatusOrderCanceledShort=Cancelado +StatusOrderSentShort=En proceso +StatusOrderSent=Envío en proceso +StatusOrderOnProcessShort=Ordenado +StatusOrderProcessedShort=Procesada +StatusOrderDelivered=Entregado +StatusOrderDeliveredShort=Entregado +StatusOrderToBillShort=Entregado +StatusOrderToProcessShort=Procesar StatusOrderCanceled=Cancelado -PDFEinsteinDescription=A complete order model +StatusOrderDraft=Borrador (necesita ser validado) +StatusOrderOnProcess=Pedido: recepción en espera +StatusOrderOnProcessWithValidation=Pedido: recepción o validación en espera +StatusOrderProcessed=Procesada +StatusOrderToBill=Entregado +Ordered=Ordenado +OptionToSetOrderBilledNotEnabled=La opción del módulo Flujo de trabajo, para establecer el pedido en 'Facturado' automáticamente cuando se valida la factura, no está habilitada, por lo que deberá configurar el estado de los pedidos en 'Facturado' manualmente después de que se haya generado la factura. +IfValidateInvoiceIsNoOrderStayUnbilled=Si la validación de la factura es 'No', el pedido permanecerá en el estado 'No facturado' hasta que se valide la factura. +CloseReceivedSupplierOrdersAutomatically=Cierre el pedido al estado "%s" automáticamente si se reciben todos los productos. +SetShippingMode=Establecer modo de envío +WithReceptionFinished=Con recepción terminada StatusSupplierOrderCanceledShort=Cancelado +StatusSupplierOrderSentShort=En proceso +StatusSupplierOrderSent=Envío en proceso +StatusSupplierOrderOnProcessShort=Ordenado +StatusSupplierOrderProcessedShort=Procesada +StatusSupplierOrderDelivered=Entregado +StatusSupplierOrderDeliveredShort=Entregado +StatusSupplierOrderToBillShort=Entregado +StatusSupplierOrderToProcessShort=Procesar StatusSupplierOrderCanceled=Cancelado +StatusSupplierOrderDraft=Borrador (necesita ser validado) +StatusSupplierOrderOnProcess=Pedido: recepción en espera +StatusSupplierOrderOnProcessWithValidation=Pedido: recepción o validación en espera +StatusSupplierOrderProcessed=Procesada +StatusSupplierOrderToBill=Entregado diff --git a/htdocs/langs/es_MX/productbatch.lang b/htdocs/langs/es_MX/productbatch.lang index 997e8f021db..6a138d9ffa7 100644 --- a/htdocs/langs/es_MX/productbatch.lang +++ b/htdocs/langs/es_MX/productbatch.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Usar el número de lote/serie ProductStatusOnBatch=Sí (lote/serie) requerido +ProductStatusOnSerial=Sí (numero de serie único requerido) ProductStatusNotOnBatch=No (lote/serie no utilizado) atleast1batchfield=Fecha de caducidad o Fecha de venta o número de Lote/serie batch_number=Número de Lote/Serie diff --git a/htdocs/langs/es_MX/products.lang b/htdocs/langs/es_MX/products.lang index af9eb0e2ac2..8ade985e293 100644 --- a/htdocs/langs/es_MX/products.lang +++ b/htdocs/langs/es_MX/products.lang @@ -5,7 +5,6 @@ ErrorProductBadRefOrLabel=Valor incorrecto para referencia o etiqueta. ProductsAndServicesArea=Área de productos y servicios ProductsArea=Área de producto SetDefaultBarcodeType=Establecer el tipo de código de barras -AssociatedProductsAbility=Enable Kits (set of several products) KeywordFilter=Filtro de palabras clave NoMatchFound=No se encontraron coincidencias DeleteProduct=Eliminar un producto / servicio diff --git a/htdocs/langs/es_MX/suppliers.lang b/htdocs/langs/es_MX/suppliers.lang index f0609ce1413..1f4aa3e931c 100644 --- a/htdocs/langs/es_MX/suppliers.lang +++ b/htdocs/langs/es_MX/suppliers.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - suppliers Suppliers=Vendedores +SupplierInvoices=Facturas de proveedor diff --git a/htdocs/langs/es_MX/website.lang b/htdocs/langs/es_MX/website.lang index ff12c0bdb52..92219c9ce78 100644 --- a/htdocs/langs/es_MX/website.lang +++ b/htdocs/langs/es_MX/website.lang @@ -1,3 +1,5 @@ # Dolibarr language file - Source file is en_US - website NoPageYet=Sin páginas aun GrabImagesInto=Insertar también las imágenes encontradas en CSS y página. +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_MX/withdrawals.lang b/htdocs/langs/es_MX/withdrawals.lang index 2f810c0c725..98cde29ac46 100644 --- a/htdocs/langs/es_MX/withdrawals.lang +++ b/htdocs/langs/es_MX/withdrawals.lang @@ -5,4 +5,3 @@ Rejects=Rechazos StatusPaid=Pagado StatusRefused=Rechazado StatusMotif4=Órdenes de venta -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_PA/accountancy.lang b/htdocs/langs/es_PA/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_PA/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_PA/admin.lang b/htdocs/langs/es_PA/admin.lang index eb11d0d5c6f..b6ade31f4f5 100644 --- a/htdocs/langs/es_PA/admin.lang +++ b/htdocs/langs/es_PA/admin.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - admin VersionUnknown=Desconocido -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_PA/modulebuilder.lang b/htdocs/langs/es_PA/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_PA/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_PA/products.lang b/htdocs/langs/es_PA/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_PA/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_PA/website.lang b/htdocs/langs/es_PA/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_PA/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_PA/withdrawals.lang b/htdocs/langs/es_PA/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_PA/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_PE/accountancy.lang b/htdocs/langs/es_PE/accountancy.lang index 94dd1838fd8..cf9e532ffbf 100644 --- a/htdocs/langs/es_PE/accountancy.lang +++ b/htdocs/langs/es_PE/accountancy.lang @@ -27,7 +27,6 @@ EndProcessing=Proceso finalizado. Lineofinvoice=Línea de factura VentilatedinAccount=Vinculado con éxito a la cuenta contable NotVentilatedinAccount=No vinculado a la cuenta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comienza la clasificación de la página "Vinculación a hacer" por los elementos más recientes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comienza la clasificación de la página "Encuadernación realizada" por los elementos más recientes ACCOUNTING_LENGTH_DESCRIPTION=Truncar la descripción de los productos y servicios en los listados después de los caracteres x (mejor = 50) diff --git a/htdocs/langs/es_PE/admin.lang b/htdocs/langs/es_PE/admin.lang index 2e7678563b1..c5149bbb2de 100644 --- a/htdocs/langs/es_PE/admin.lang +++ b/htdocs/langs/es_PE/admin.lang @@ -2,13 +2,12 @@ VersionProgram=Versión del programa VersionLastInstall=Instalar versión inicial Module30Name=Facturas -Module59000Desc=Module to follow margins Permission91=Consultar impuestos e IGV Permission92=Crear/modificar impuestos e IGV Permission93=Eliminar impuestos e IGV DictionaryVAT=Tasa de IGV o tasa de impuesto a las ventas +ShowBugTrackLink=Show link "<strong>%s</strong>" UnitPriceOfProduct=Precio unitario sin IGV de un producto -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) OptionVatMode=IGV adeudado MailToSendInvoice=Facturas de Clientes OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Use a ; char as separator to extract or set several properties. diff --git a/htdocs/langs/es_PE/bills.lang b/htdocs/langs/es_PE/bills.lang index 201a9d74882..232d6721737 100644 --- a/htdocs/langs/es_PE/bills.lang +++ b/htdocs/langs/es_PE/bills.lang @@ -5,6 +5,7 @@ InvoiceAvoir=Nota de crédito InvoiceAvoirAsk=Nota de crédito para corregir factura InvoiceCustomer=Factura de cliente CustomerInvoice=Factura de cliente +CustomersInvoices=Facturas de clientes BillShortStatusClosedUnpaid=Cerrado ConfirmClassifyPaidPartiallyReasonDiscountNoVat=El resto a pagar <b>(%s %s)</b> es un descuento acordado después de la factura. Acepto perder el IGV de este descuento AmountOfBillsByMonthHT=Importe de las facturas por mes (Sin IGV) diff --git a/htdocs/langs/es_PE/main.lang b/htdocs/langs/es_PE/main.lang index 02f38a9869b..256d3198c63 100644 --- a/htdocs/langs/es_PE/main.lang +++ b/htdocs/langs/es_PE/main.lang @@ -50,7 +50,6 @@ Run=Ejecutar Show=Mostrar Hide=Ocultar SearchOf=Buscar -ReOpen=Re-Abrir Upload=Subir AmountVAT=Importe impuesto MulticurrencyAmountVAT=Importe impuesto, moneda original diff --git a/htdocs/langs/es_PE/modulebuilder.lang b/htdocs/langs/es_PE/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_PE/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_PE/products.lang b/htdocs/langs/es_PE/products.lang index 59238285ddf..e682fe300a6 100644 --- a/htdocs/langs/es_PE/products.lang +++ b/htdocs/langs/es_PE/products.lang @@ -3,5 +3,5 @@ ProductRef=Ref. de producto ProductLabel=Etiqueta del producto ProductServiceCard=Ficha Productos/Servicios ProductOrService=Producto o Servicio -AssociatedProductsAbility=Enable Kits (set of several products) +ListOfStockMovements=Lista de movimientos de stock ExportDataset_produit_1=Productos diff --git a/htdocs/langs/es_PE/stocks.lang b/htdocs/langs/es_PE/stocks.lang index aa3e15a560f..1a973f55756 100644 --- a/htdocs/langs/es_PE/stocks.lang +++ b/htdocs/langs/es_PE/stocks.lang @@ -1,4 +1,12 @@ # Dolibarr language file - Source file is en_US - stocks +MovementId=ID de Movimiento +StockMovementForId=ID de Movimiento %d +ListMouvementStockProject=Lista de movimientos de stock asociados al proyecto QtyDispatchedShort=Cant. despachada +MassMovement=Movimiento masivo +StockMovementRecorded=Movimiento de stock grabado +MovementLabel=Etiqueta de movimiento MovementCorrectStock=Corrección de stock del producto %s inventoryEdit=Editar +AddProduct=Agregar +DisableStockChangeOfSubProduct=Desactiva el cambio de stock para todos los productos de este Kit durante este movimiento. diff --git a/htdocs/langs/es_PE/website.lang b/htdocs/langs/es_PE/website.lang index 85fd95deb49..344f2e6ae70 100644 --- a/htdocs/langs/es_PE/website.lang +++ b/htdocs/langs/es_PE/website.lang @@ -1,2 +1,4 @@ # Dolibarr language file - Source file is en_US - website ReadPerm=Leer +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_PE/withdrawals.lang b/htdocs/langs/es_PE/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_PE/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_PY/accountancy.lang b/htdocs/langs/es_PY/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_PY/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_PY/admin.lang b/htdocs/langs/es_PY/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_PY/admin.lang +++ b/htdocs/langs/es_PY/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_PY/modulebuilder.lang b/htdocs/langs/es_PY/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_PY/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_PY/products.lang b/htdocs/langs/es_PY/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_PY/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_PY/website.lang b/htdocs/langs/es_PY/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_PY/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_PY/withdrawals.lang b/htdocs/langs/es_PY/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_PY/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_PY/zapier.lang b/htdocs/langs/es_PY/zapier.lang index c7cc16646c5..4a8cb0da0fc 100644 --- a/htdocs/langs/es_PY/zapier.lang +++ b/htdocs/langs/es_PY/zapier.lang @@ -1,3 +1,3 @@ # Dolibarr language file - Source file is en_US - zapier ModuleZapierForDolibarrDesc =Zapier para modulo Dolibarr -ZapierForDolibarrSetup =Instalacion de Zapier para Dolibarr +ZapierForDolibarrSetup=Instalacion de Zapier para Dolibarr diff --git a/htdocs/langs/es_US/accountancy.lang b/htdocs/langs/es_US/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_US/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_US/admin.lang b/htdocs/langs/es_US/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_US/admin.lang +++ b/htdocs/langs/es_US/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_US/modulebuilder.lang b/htdocs/langs/es_US/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_US/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_US/products.lang b/htdocs/langs/es_US/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_US/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_US/website.lang b/htdocs/langs/es_US/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_US/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_US/withdrawals.lang b/htdocs/langs/es_US/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_US/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_UY/accountancy.lang b/htdocs/langs/es_UY/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_UY/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_UY/admin.lang b/htdocs/langs/es_UY/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/es_UY/admin.lang +++ b/htdocs/langs/es_UY/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_UY/modulebuilder.lang b/htdocs/langs/es_UY/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_UY/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_UY/products.lang b/htdocs/langs/es_UY/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/es_UY/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_UY/website.lang b/htdocs/langs/es_UY/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_UY/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_UY/withdrawals.lang b/htdocs/langs/es_UY/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/es_UY/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_VE/accountancy.lang b/htdocs/langs/es_VE/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/es_VE/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/es_VE/admin.lang b/htdocs/langs/es_VE/admin.lang index d395e4cecd0..74b465f966a 100644 --- a/htdocs/langs/es_VE/admin.lang +++ b/htdocs/langs/es_VE/admin.lang @@ -4,7 +4,6 @@ VersionLastUpgrade=Última actualización de la versión ConfirmPurgeSessions=¿De verdad quieres purgar todas las sesiones? Esto desconectará a todos los usuarios (excepto a usted). SetupArea=Parametrizaje NotConfigured=Módulo / Aplicación no configurada -Module59000Desc=Module to follow margins Permission254=Modificar la contraseña de otros usuarios Permission255=Eliminar o desactivar otros usuarios Permission256=Consultar sus permisos @@ -30,6 +29,5 @@ WatermarkOnDraftSupplierProposal=Marca de agua en solicitudes de precios a prove LDAPMemberObjectClassListExample=Lista de ObjectClass que definen los atributos de un registro (ej: top,inetOrgPerson o top,user for active directory) LDAPUserObjectClassListExample=Lista de ObjectClass que definen los atributos de un registro (ej: top,inetOrgPerson o top,user for active directory) LDAPContactObjectClassListExample=Lista de objectClass que definen los atributos de un registro (ej: top,inetOrgPerson o top,user for active directory) -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_VE/modulebuilder.lang b/htdocs/langs/es_VE/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/es_VE/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/es_VE/orders.lang b/htdocs/langs/es_VE/orders.lang index af9af547c83..f1790ff6eef 100644 --- a/htdocs/langs/es_VE/orders.lang +++ b/htdocs/langs/es_VE/orders.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - orders StatusOrderDeliveredShort=Emitido -PDFEinsteinDescription=A complete order model StatusSupplierOrderDraftShort=A validar StatusSupplierOrderValidatedShort=Validada StatusSupplierOrderDelivered=Emitido diff --git a/htdocs/langs/es_VE/products.lang b/htdocs/langs/es_VE/products.lang index 53eae0774e3..7c5fda8bea0 100644 --- a/htdocs/langs/es_VE/products.lang +++ b/htdocs/langs/es_VE/products.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - products TMenuProducts=Productos y servicios ProductStatusNotOnBuyShort=Fuera compra -AssociatedProductsAbility=Enable Kits (set of several products) PriceExpressionEditorHelp2=Puede acceder a los atributos adicionales con variables como <b>#extrafield_myextrafieldkey#</b> y variables globales con <b>#global_mycode#</b> diff --git a/htdocs/langs/es_VE/website.lang b/htdocs/langs/es_VE/website.lang new file mode 100644 index 00000000000..eb66189bb95 --- /dev/null +++ b/htdocs/langs/es_VE/website.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - website +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/es_VE/withdrawals.lang b/htdocs/langs/es_VE/withdrawals.lang index 0512b713a32..fb9616a1788 100644 --- a/htdocs/langs/es_VE/withdrawals.lang +++ b/htdocs/langs/es_VE/withdrawals.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - withdrawals StatusPaid=Pagada -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/et_EE/accountancy.lang b/htdocs/langs/et_EE/accountancy.lang index 170d73a6bac..1e7d1a312f3 100644 --- a/htdocs/langs/et_EE/accountancy.lang +++ b/htdocs/langs/et_EE/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index abc17b9297f..d3320e12ec5 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Luba uued ühendused YourSession=Sinu sessioon Sessions=Kasutajate sessioonid WebUserGroup=Veebiserveri kasutaja/grupp +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Märkus: jah töötab vaid siis, kui moodul <b>%s</b> on sisse l RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Turvaseaded +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Viga: see moodul nõuab PHP versiooni %s või uuemat. ErrorModuleRequireDolibarrVersion=Viga: see moodul nõuab Dolibarri versiooni %s või uuemat. @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Tühjenda PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Tühjenda nüüd @@ -232,6 +234,7 @@ BoxesAvailable=Saadaolevad vidinad BoxesActivated=Aktiveeritud vidinad ActivateOn=Aktiveeri lehel ActiveOn=Aktiveeritud lehel +ActivatableOn=Activatable on SourceFile=Lähtekoodi fai AvailableOnlyIfJavascriptAndAjaxNotDisabled=Saadaval ainult siis, kui JavaScript pole keelatud Required=Nõutud @@ -347,9 +350,10 @@ LastActivationAuthor=Viimane aktiveerimise autor LastActivationIP=Viimane aktiveerimise IP UpdateServerOffline=Update server offline WithCounter=Manage a counter -GenericMaskCodes=Sa võid sisestada suvalise numeratsiooni maski. Järgnevas maskis saab kasutada järgmisi silte:<br><b>{000000}</b> vastab arvule, mida suurendatakse iga sündmuse %s korral. Sisesta niipalju nulle, kui soovid loenduri pikkuseks. Loendurile lisatakse vasakult alates niipalju nulle, et ta oleks maskiga sama pikk.<br><b>{000000+000}</b> on eelmisega sama, kuid esimesele %s lisatakse nihe, mis vastab + märgist paremal asuvale arvule.<br><b>{000000@x}</b> on eelmisega sama, ent kuuni x jõudmisel nullitakse loendur (x on 1 ja 12 vahel, või 0 seadistuses määratletud majandusaasta alguse kasutamiseks, või 99 loenduri nullimiseks iga kuu alguses). Kui kasutad seda funktsiooni ja x on 2 või kõrgem, siis on jada {yy}{mm} or {yyyy}{mm} nõutud.<br><b>{dd}</b> päev (01 kuni 31).<br><b>{mm}</b> kuu (01 kuni 12).<br><b>{yy}</b>, <b>{yyyy}</b> või <b>{y}</b> aasta 2, 4 või 1 numbri kasutamisks.<br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Kõik teised maskis olevad tähemärgid jäävad puutuamata.<br>Tühikud ei ole lubatud.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Näiteks 2007-03-01 loodud kolmas isik:</u> <br> GenericMaskCodes4c=<u>Näiteks 2007-03-01 loodud toode:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Tarnijad 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Toimetajad Module49Desc=Toimetaja haldamine Module50Name=Tooted @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind konverteerimise võimekus Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Sotsiaalvõrgud +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Personalihaldus Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-ettevõte Module5000Desc=Võimaldab hallata mitut ettevõtet -Module6000Name=Töövoog -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Väliste ja sisemiste kasutajate ja õiguste loomine/muutm Permission254=Ainult väliste kasutajate loomine/muutmine Permission255=Teiste kasutajate paroolide muutmine Permission256=Teiste kasutajate kustutamine või keelamine -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=CA vaatamine Permission272=Arvete vaatamine Permission273=Arvete väljastamine @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Sündmuste turvaaudit +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Antud käsu peab käivitama käsurealt pärast kasutajaga <b>%s</b> sisse logimist või lisades -W võtme käsu lõppu parooli <b>%s</b> kasutamiseks. YourPHPDoesNotHaveSSLSupport=Antud PHP ei võimalda SSL funktsioone DownloadMoreSkins=Veel alla laetavaid kujundusi -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Osaline tõlge @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Täiendavad atribuudid ExtraFieldsLines=Lisaatribuudid (read) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Kasutajanimi (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Otsingufilter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Kasutajanimi (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Täielik nimi @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Müügikonto kood AccountancyCodeBuy=Ostukonto kood +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Tegevuste ja päevakava mooduli seadistamine PasswordTogetVCalExport=Ekspordilingi autoriseerimise võti +SecurityKey = Security Key PastDelayVCalExport=Ära ekspordi tegevusi, mis on vanemad kui AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/et_EE/banks.lang b/htdocs/langs/et_EE/banks.lang index 2838587c4c8..81e77744f0e 100644 --- a/htdocs/langs/et_EE/banks.lang +++ b/htdocs/langs/et_EE/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/et_EE/bills.lang b/htdocs/langs/et_EE/bills.lang index 6fcc6f48b23..aa1b3d111a5 100644 --- a/htdocs/langs/et_EE/bills.lang +++ b/htdocs/langs/et_EE/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Müügiarve CustomerInvoice=Müügiarve CustomersInvoices=Müügiarved SupplierInvoice=Tarnija arve -SuppliersInvoices=Tarnijate arved +SuppliersInvoices=Tarnija arved +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Tarnija arve -SupplierBills=ostuarved +SupplierBills=Tarnija arved Payment=Makse PaymentBack=Tagasimakse CustomerInvoicePaymentBack=Tagasimakse @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Juba tehtud maksed PaymentsBackAlreadyDone=Refunds already done PaymentRule=Maksereegel PaymentMode=Makse tüüp +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Makse tüüp (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Muutuv summa (%% kogusummast) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Pangaülekanne PaymentTypeShortVIR=Pangaülekanne @@ -494,12 +498,16 @@ Cash=Sularaha Reported=Hilinenud DisabledBecausePayments=Pole võimalik, kuna on mõningaid makseid CantRemovePaymentWithOneInvoicePaid=Ei saa makset eemaldada, kuna vähemalt üks arve on märgitud makstuks +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Oodatud makse CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Makstud selle maksega 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Maksa ToMakePaymentBack=Maksa tagasi @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Tagastab numbri formaadiga %syymm-nnnn tavaliste arvete jaoks ja %syymm-nnnn kreeditarvete jaoks, kus yy on aasta, mm on kuu ja nnnn on katkestusteta jada, mis ei lähe kunagi 0 tagasi. -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Arve algusega $syymm on juba olemas ja ei ole antud jada mudeliga ühtiv. Eemalda see või muuda selle nimi antud mooduli aktiveerimiseks. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/et_EE/boxes.lang b/htdocs/langs/et_EE/boxes.lang index 3212c908291..4fca825fabb 100644 --- a/htdocs/langs/et_EE/boxes.lang +++ b/htdocs/langs/et_EE/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Raamatupidamine +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/et_EE/categories.lang b/htdocs/langs/et_EE/categories.lang index f288163f0d9..f7eeeaf60b3 100644 --- a/htdocs/langs/et_EE/categories.lang +++ b/htdocs/langs/et_EE/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/et_EE/companies.lang b/htdocs/langs/et_EE/companies.lang index 6bafeb504b3..004a976937a 100644 --- a/htdocs/langs/et_EE/companies.lang +++ b/htdocs/langs/et_EE/companies.lang @@ -43,9 +43,10 @@ Individual=Eraisik ToCreateContactWithSameName=Loob automaatselt kontakti / aadressi, millel on sama teave kui kolmanda osapoole all. Enamikul juhtudel, isegi kui teie kolmas osapool on füüsiline isik, piisab ainult kolmanda osapoole loomisest. ParentCompany=Emaettevõte Subsidiaries=Tütarettevõtted -ReportByMonth=Aruanne kuude kaupa -ReportByCustomers=Kliendi aruanne -ReportByQuarter=Aruanne määra alusel +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Sisekorraeeskiri RegisteredOffice=Peakontor Lastname=Perekonnanimi @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (sireen) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, vana APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registrinumber ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (sotsiaalkindlustus number) ProfId3PT=Prof Id 3 (Commercial rekordarv) ProfId4PT=Prof Id 4 (Konservatooriumis) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Hetkel maksmata summa OutstandingBill=Suurim võimalik maksmata arve OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimaalne tellimuse summa -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kood on vaba, seda saab igal ajal muuta. ManagingDirectors=Haldaja(te) nimi (CEO, direktor, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/et_EE/compta.lang b/htdocs/langs/et_EE/compta.lang index 35f06da633f..a23b73cef69 100644 --- a/htdocs/langs/et_EE/compta.lang +++ b/htdocs/langs/et_EE/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=KM kogutud StatusToPay=Maksta SpecialExpensesArea=Kõigi erimaksete ala +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Müügiarve makse PaymentSupplierInvoice=Ostuarve makse PaymentSocialContribution=Social/fiscal tax payment PaymentVat=KM makse +AutomaticCreationPayment=Automatically record the payment ListPayment=Maksete nimekiri ListOfCustomerPayments=Klientide maksete nimekiri ListOfSupplierPayments=Tarnija maksete nimekiri @@ -104,6 +106,8 @@ LT2PaymentES=IRPF makse LT2PaymentsES=IRPF maksed VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Tšeki vastuvõtmise kuupäev 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Režiim <b>%stekkepõhise raamatupidamise KM%s</b>. CalcModeVATEngagement=Režiim <b>%stulude-kulude KM%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Sisend- ja väljundkäibemaks kliendi alusel VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg alamtüüp InvoiceLinesToDispatch=Saadetavate arvete read ByProductsAndServices=By product and service RefExt=Väline viide -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Viide tellimusele Mode1=Meetod 1 Mode2=Meetod 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/et_EE/ecm.lang b/htdocs/langs/et_EE/ecm.lang index b234192073f..c3b54ff39b5 100644 --- a/htdocs/langs/et_EE/ecm.lang +++ b/htdocs/langs/et_EE/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/et_EE/errors.lang b/htdocs/langs/et_EE/errors.lang index 4d3ae37fabc..81de1b5c8c9 100644 --- a/htdocs/langs/et_EE/errors.lang +++ b/htdocs/langs/et_EE/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Ei leidnud kausta <b>%s</b> (vale rada, valed õigused või on ErrorFunctionNotAvailableInPHP=Selle võimaluse jaoks on vaja funktsiooni <b>%s</b>, kuid see ei ole antud PHP versiooni/seadistusega saadaval. ErrorDirAlreadyExists=Selle nimega kaust on juba olemas. ErrorFileAlreadyExists=Selle nimega fail on juba olemas. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Fail ei jõudnud täielikult serverisse. ErrorNoTmpDir=Ajutist kausta %s ei ole olemas. ErrorUploadBlockedByAddon=PHP/Apache pistik blokeeris üleslaadimise. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/et_EE/externalsite.lang b/htdocs/langs/et_EE/externalsite.lang index d4a0b2c3ee1..7295cbd8936 100644 --- a/htdocs/langs/et_EE/externalsite.lang +++ b/htdocs/langs/et_EE/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Seadista link välisele lehele -ExternalSiteURL=Välise lehe URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=ExternalSite moodul ei ole õigesti seadistatud. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/et_EE/main.lang b/htdocs/langs/et_EE/main.lang index c8174781715..86a6e3aae9b 100644 --- a/htdocs/langs/et_EE/main.lang +++ b/htdocs/langs/et_EE/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Muutm kuupäev IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Kinnitamise kuupäev +DateSigning=Signing date DateClosing=Lõpetamise kuupäev DateDue=Tähtaeg DateValue=Väärtuse kuupäev @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Ühiku hind PriceU=ÜH PriceUHT=ÜH (neto) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Summa AmountInvoice=Arve summa @@ -389,6 +390,8 @@ AmountTotal=Kogusumma AmountAverage=Keskmine summa PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Protsent Total=Kokku SubTotal=Vahesumma @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Aktiivne keel CurrentTheme=Aktiivne teema CurrentMenuManager=Aktiivne menüü haldaja @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontaktid SearchIntoMembers=Liikmed SearchIntoUsers=Kasutajad SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projektid SearchIntoMO=Manufacturing Orders SearchIntoTasks=Ülesanded @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Mõjutatud isik Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/et_EE/margins.lang b/htdocs/langs/et_EE/margins.lang index 3640a325a38..1dd50286ba4 100644 --- a/htdocs/langs/et_EE/margins.lang +++ b/htdocs/langs/et_EE/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Marginaalide info ProductMargins=Toodete marginaalid CustomerMargins=Klientide marginaalid SalesRepresentativeMargins=Müügiesindajate tasud +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Toode või teenus AllProducts=Kõik tooted ja teenused ChooseProduct/Service=Vali toode või teenus 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Üldiste allahindluste marginaali meetod UseDiscountAsProduct=Tootena UseDiscountAsService=Teenusena @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Tootmishind UnitCharges=Ühiku kulud Charges=Kulud AgentContactType=Müügiagendi kontakti liik -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +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 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). +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). diff --git a/htdocs/langs/et_EE/members.lang b/htdocs/langs/et_EE/members.lang index fc49d7214b9..fcf4718f143 100644 --- a/htdocs/langs/et_EE/members.lang +++ b/htdocs/langs/et_EE/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Mustandi staatuses olevate liikmete nimekiri (vajab kinnitami MembersListValid=Kinnitatud liikmete nimekiri MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Kvalifitseeritud liikmete nimekiri MenuMembersToValidate=Liikmete mustand MenuMembersValidated=Kinnitatud liikmed +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Kasutajad, kelle liikmemaks on saada MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Aegunud MemberStatusPaid=Liikmemaks ajakohane MemberStatusPaidShort=Ajakohane +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Liikmete mustand +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Kinnitatud @@ -82,6 +87,8 @@ Physical=Füüsiline Moral=Moraalne MorAndPhy=Moral and Physical Reenable=Luba uuesti +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Kustuta liige @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Siltide lehe formaat DescADHERENT_ETIQUETTE_TEXT=Liikmete aadressikaartidele trükitav tekst @@ -162,6 +170,7 @@ DocForLabels=Loo aadressilehed SubscriptionPayment=Liikmemaks LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Liikmete statistika riigi alusel MembersStatisticsByState=Liikmete statistika osariigi/provintsi alusel MembersStatisticsByTown=Liikmete statistika linna alusel diff --git a/htdocs/langs/et_EE/modulebuilder.lang b/htdocs/langs/et_EE/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/et_EE/modulebuilder.lang +++ b/htdocs/langs/et_EE/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/et_EE/orders.lang b/htdocs/langs/et_EE/orders.lang index d9bcab4cab8..9d6a928579c 100644 --- a/htdocs/langs/et_EE/orders.lang +++ b/htdocs/langs/et_EE/orders.lang @@ -16,6 +16,8 @@ ToOrder=Telli MakeOrder=Telli SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Müügitellimused @@ -141,11 +143,12 @@ OrderByEMail=E-post 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=Lihtne tellimuse mude PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Koosta tellimuste kohta arved +CreateInvoiceForThisSupplier=Koosta tellimuste kohta arved NoOrdersToInvoice=Pole ühtki tellimust, mille kohta arve esitada CloseProcessedOrdersAutomatically=Liigita kõik valitud tellimused "Töödeldud". OrderCreation=Tellimuse loomine diff --git a/htdocs/langs/et_EE/other.lang b/htdocs/langs/et_EE/other.lang index 3183083b1aa..ba2ede545ba 100644 --- a/htdocs/langs/et_EE/other.lang +++ b/htdocs/langs/et_EE/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Lõi %s ModifiedBy=Muutis %s ValidatedBy=Kinnitas %s +SignedBy=Signed by %s ClosedBy=Sulges %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=Uued sisselogimise tunnused NewKeyWillBe=Uus tarkvarasse sisselogimise salasõna on ClickHereToGoTo=Klõpsa siia, et minna %s YouMustClickToChange=Esmalt pead klõpsa järgneval lingil, et kinnitada salasõna muutmine +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Kui Sina ei palunud seda muudatust, siis ignoreeri antud kirja ja mingeid muudatusi ei toimu. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/et_EE/productbatch.lang b/htdocs/langs/et_EE/productbatch.lang index 3a9bea23b43..c3e0711af7c 100644 --- a/htdocs/langs/et_EE/productbatch.lang +++ b/htdocs/langs/et_EE/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Jah +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ei Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/et_EE/products.lang b/htdocs/langs/et_EE/products.lang index 8554d961291..d8abbac338d 100644 --- a/htdocs/langs/et_EE/products.lang +++ b/htdocs/langs/et_EE/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Õigesti uuendatud PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Ühik diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index c739c5c289f..9f5ee9b09d3 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/et_EE/propal.lang b/htdocs/langs/et_EE/propal.lang index 6896ec81b00..5a5197a0900 100644 --- a/htdocs/langs/et_EE/propal.lang +++ b/htdocs/langs/et_EE/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Saada pakkumine kirja teel DatePropal=Pakkumise kuupäev DateEndPropal=Kehtib kuni ValidityDuration=Kehtivuse kestvus -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Pakkumist %s ei leitud AddToDraftProposals=Lisa pakkumise mustandisse @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Pakkumine ja selle read ProposalLine=Pakkumise read +ProposalLines=Proposal lines AvailabilityPeriod=Saadavuse viivitus SetAvailability=Määratle saadavuse viivitus AfterOrder=pärast tellimist @@ -85,3 +85,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/et_EE/stocks.lang b/htdocs/langs/et_EE/stocks.lang index 760b0f0dbbc..0fa5f181ced 100644 --- a/htdocs/langs/et_EE/stocks.lang +++ b/htdocs/langs/et_EE/stocks.lang @@ -19,8 +19,8 @@ Stock=Laojääk Stocks=Laojäägid MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Asukoht -LocationSummary=Asukoha lühike nimi -NumberOfDifferentProducts=Erinevate toodete arv +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Toodete koguarv LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Ladude väärtus 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 hind -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Ühiku müügihind EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/et_EE/suppliers.lang b/htdocs/langs/et_EE/suppliers.lang index 217a3267e3a..9aa574d97a1 100644 --- a/htdocs/langs/et_EE/suppliers.lang +++ b/htdocs/langs/et_EE/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Tarnijad SuppliersInvoice=Tarnija arve +SupplierInvoices=Tarnija arved ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Ajalugu diff --git a/htdocs/langs/et_EE/ticket.lang b/htdocs/langs/et_EE/ticket.lang index fd7ed8ea019..6d1f9cfe586 100644 --- a/htdocs/langs/et_EE/ticket.lang +++ b/htdocs/langs/et_EE/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Liik Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/et_EE/users.lang b/htdocs/langs/et_EE/users.lang index 8966333a09b..1facf9d2742 100644 --- a/htdocs/langs/et_EE/users.lang +++ b/htdocs/langs/et_EE/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Eemalda grupist PasswordChangedAndSentTo=Salasõna muudetud ja saadetud aadressile <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Kasutaja <b>%s</b> salasõna muutmise plave saadetud aadressile <b>%s</b>. +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=Kasutajad ja grupid LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domeeni kasutaja %s Reactivate=Aktiveeri uuesti 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Õigus on antud, kuna see pärineb mõnest grupist, kuhu kasutaja kuulub Inherited=Päritud +UserWillBe=Created user will be UserWillBeInternalUser=Loodav kasutaja on sisemine kasutaja (kuna ei ole seotud mõne kolmanda isikuga) UserWillBeExternalUser=Loodav kasutaja on väline kasutaja (kuna on seotud mõne kolmanda isikuga) IdPhoneCaller=Helistaja ID @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/et_EE/website.lang b/htdocs/langs/et_EE/website.lang index 780b74ae7da..119edcd437d 100644 --- a/htdocs/langs/et_EE/website.lang +++ b/htdocs/langs/et_EE/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Loe WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/et_EE/zapier.lang b/htdocs/langs/et_EE/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/et_EE/zapier.lang +++ b/htdocs/langs/et_EE/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/eu_ES/accountancy.lang b/htdocs/langs/eu_ES/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/eu_ES/accountancy.lang +++ b/htdocs/langs/eu_ES/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index 5f99e070cd3..081ca0887ca 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Konexioaren blokeoa kendu YourSession=Zure sesioa Sessions=Users Sessions WebUserGroup=Web-zerbitzariaren erabiltzailea/taldea +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Segurtasunaren konfigurazioa +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Errorea, modulu honek PHP-ren %s bertsioa -edo handiagoa- behar du ErrorModuleRequireDolibarrVersion=Errorea, modulu honek Dolibarr-en %s bertsioa -edo handiagoa- behar du @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Garbitu PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Orain garbitu @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Aktibatu on ActiveOn=Aktibatuta on +ActivatableOn=Activatable on SourceFile=Iturri-fitxategia AvailableOnlyIfJavascriptAndAjaxNotDisabled=Eskuragarri soilik JavaScript ezgaituta ez badago Required=Beharrezkoa @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editoreak Module49Desc=Editoreak kudeatzea Module50Name=Produktuak @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/eu_ES/banks.lang b/htdocs/langs/eu_ES/banks.lang index bac80483712..0f6fba01760 100644 --- a/htdocs/langs/eu_ES/banks.lang +++ b/htdocs/langs/eu_ES/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/eu_ES/bills.lang b/htdocs/langs/eu_ES/bills.lang index 714c0da8670..4d23de8e6d0 100644 --- a/htdocs/langs/eu_ES/bills.lang +++ b/htdocs/langs/eu_ES/bills.lang @@ -52,11 +52,12 @@ Invoices=Fakturak InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Jada egindako ordainketak PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/eu_ES/boxes.lang b/htdocs/langs/eu_ES/boxes.lang index 42d5a977df9..acce860d953 100644 --- a/htdocs/langs/eu_ES/boxes.lang +++ b/htdocs/langs/eu_ES/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/eu_ES/categories.lang b/htdocs/langs/eu_ES/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/eu_ES/categories.lang +++ b/htdocs/langs/eu_ES/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/eu_ES/companies.lang b/htdocs/langs/eu_ES/companies.lang index 4318ea805b7..1ab18739b29 100644 --- a/htdocs/langs/eu_ES/companies.lang +++ b/htdocs/langs/eu_ES/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/eu_ES/compta.lang b/htdocs/langs/eu_ES/compta.lang index af1267b60ab..1e19182ea3a 100644 --- a/htdocs/langs/eu_ES/compta.lang +++ b/htdocs/langs/eu_ES/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/eu_ES/ecm.lang b/htdocs/langs/eu_ES/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/eu_ES/ecm.lang +++ b/htdocs/langs/eu_ES/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/eu_ES/errors.lang b/htdocs/langs/eu_ES/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/eu_ES/errors.lang +++ b/htdocs/langs/eu_ES/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/eu_ES/externalsite.lang b/htdocs/langs/eu_ES/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/eu_ES/externalsite.lang +++ b/htdocs/langs/eu_ES/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/eu_ES/main.lang b/htdocs/langs/eu_ES/main.lang index b048eaf318c..02604cf919e 100644 --- a/htdocs/langs/eu_ES/main.lang +++ b/htdocs/langs/eu_ES/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontratuak SearchIntoMembers=Kideak SearchIntoUsers=Erabiltzaileak SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Proiektuak SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/eu_ES/margins.lang b/htdocs/langs/eu_ES/margins.lang index 97ed5f003fe..45a42e5a367 100644 --- a/htdocs/langs/eu_ES/margins.lang +++ b/htdocs/langs/eu_ES/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/eu_ES/members.lang b/htdocs/langs/eu_ES/members.lang index 25c40cd7806..ea607afb344 100644 --- a/htdocs/langs/eu_ES/members.lang +++ b/htdocs/langs/eu_ES/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/eu_ES/modulebuilder.lang b/htdocs/langs/eu_ES/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/eu_ES/modulebuilder.lang +++ b/htdocs/langs/eu_ES/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/eu_ES/orders.lang b/htdocs/langs/eu_ES/orders.lang index ea157944645..8ccc334ca9d 100644 --- a/htdocs/langs/eu_ES/orders.lang +++ b/htdocs/langs/eu_ES/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=E-posta OrderByWWW=Online OrderByPhone=Telefonoa # 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/eu_ES/other.lang b/htdocs/langs/eu_ES/other.lang index 8b1593d5f6c..0601f3818ea 100644 --- a/htdocs/langs/eu_ES/other.lang +++ b/htdocs/langs/eu_ES/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/eu_ES/productbatch.lang b/htdocs/langs/eu_ES/productbatch.lang index fa8e5e62d68..ba538918c69 100644 --- a/htdocs/langs/eu_ES/productbatch.lang +++ b/htdocs/langs/eu_ES/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Bai +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ez Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/eu_ES/products.lang b/htdocs/langs/eu_ES/products.lang index 0827f43bd6d..09b267fccb6 100644 --- a/htdocs/langs/eu_ES/products.lang +++ b/htdocs/langs/eu_ES/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index 71a1ed5245a..645cb61ef75 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/eu_ES/propal.lang b/htdocs/langs/eu_ES/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/eu_ES/propal.lang +++ b/htdocs/langs/eu_ES/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/eu_ES/stocks.lang b/htdocs/langs/eu_ES/stocks.lang index fa21c48cb73..3a9406782cc 100644 --- a/htdocs/langs/eu_ES/stocks.lang +++ b/htdocs/langs/eu_ES/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stock-ak MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Kokapena -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/eu_ES/suppliers.lang b/htdocs/langs/eu_ES/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/eu_ES/suppliers.lang +++ b/htdocs/langs/eu_ES/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/eu_ES/ticket.lang b/htdocs/langs/eu_ES/ticket.lang index 086d398b0a1..9ad3a4dc0ae 100644 --- a/htdocs/langs/eu_ES/ticket.lang +++ b/htdocs/langs/eu_ES/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Mota Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/eu_ES/users.lang b/htdocs/langs/eu_ES/users.lang index c3d64917656..d9063bea80e 100644 --- a/htdocs/langs/eu_ES/users.lang +++ b/htdocs/langs/eu_ES/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/eu_ES/website.lang b/htdocs/langs/eu_ES/website.lang index 921f6edf20f..48ec32f15d5 100644 --- a/htdocs/langs/eu_ES/website.lang +++ b/htdocs/langs/eu_ES/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/eu_ES/zapier.lang b/htdocs/langs/eu_ES/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/eu_ES/zapier.lang +++ b/htdocs/langs/eu_ES/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/fa_IR/accountancy.lang b/htdocs/langs/fa_IR/accountancy.lang index 794149d01cf..a83717e547a 100644 --- a/htdocs/langs/fa_IR/accountancy.lang +++ b/htdocs/langs/fa_IR/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=سطور بند شدۀ صورت‌حساب‌ها ExpenseReportLines=سطور گزارش هزینه‌ها که باید بند شوند ExpenseReportLinesDone=سطور بندشدۀ گزارش هزینه‌ها IntoAccount=بندکردن سطر به حساب حسابداری -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=بندکردن @@ -209,7 +209,7 @@ Codejournal=دفتر JournalLabel=برچسب دفتر NumPiece=شمارۀ بخش TransactionNumShort=تعداد تراکنش‌ها -AccountingCategory=گروه‌های دل‌خواه +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=در این قسمت می‌توانید گروه‌های متشکل از حساب‌حساب‌داری بسازید. این گروه‌ها برای گزارش‌های دل‌خواه حساب‌داری استفاده می‌شود. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=سطوری که هنوز بند نشده‌اند، ## Import ImportAccountingEntries=ورودی‌های حساب‌داری +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Date export WarningReportNotReliable=هشدار! این گزارش بر مبنای دفتر کل نمی‌باشد، بنابراین دربردارندۀ تراکنش‌هائی که به شکل دستی در دفترکل ویرایش شده‌اند نیست. در صورتی که دفترنویسی شما روزآمد باشد، نمای «دفترنویسی» دقیق‌تر است. ExpenseReportJournal=دفتر گزارش هزینه‌ها InventoryJournal=دفتر انبار + +NAccounts=%s accounts diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 44b56b29436..6665602a932 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=حذف قفل اتصال YourSession=نشست شما Sessions=نشست‌های کاربران WebUserGroup=کاربرِ/گروهِ سرویس‌دهندۀ‌وب +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=به نظر می‌رسد پیکربندی PHP شما امکان فهرست‌کردن نشست‌های فعال را نداشته باشد. ممکن است پوشه‌ای که برای ذخیرۀ نشست‌ها مورد استفاده است (<b>%s</b>) حفاظت شده باشد (مثلا بواسطۀ مجوزهای سیستم‌عامل یا با تمهیدات open_basedir در PHP). @@ -62,6 +63,7 @@ IfModuleEnabled=توجه: «بله» تنها در صورتی مؤثر است ک RemoveLock=فایل <b>%s</b> را در صورت موجود بودن تغییر دهید تا امکان استفاده از ابزار نصب/روزآمدسازی وجود داشته باشد. RestoreLock=فایل <b>%s</b> را با مجوز فقط خواندنی بازیابی کنید تا امکان استفاده از ابزار نصب/روزآمدسازی را غیرفعال کنید. SecuritySetup=برپاسازی امنیتی +PHPSetup=PHP setup SecurityFilesDesc=در این قسمت گزینه‌های مربوط به امنیت بارگذاری فایل را تعریف کنید ErrorModuleRequirePHPVersion=خطا! این واحد نیازمند PHP نسخۀ %s یا بالاتر دارد ErrorModuleRequireDolibarrVersion=خطا! این واحد نیاز به Dolibarr  نسخۀ %s یا بالاتر را دارد @@ -154,7 +156,7 @@ SystemToolsAreaDesc=این واحد دربردارندۀ عوامل مربوط Purge=پاک‌کردن PurgeAreaDesc=این صفحه به شما امکان حذف همۀ فایل‌های تولید شده و ذخیره شده با Dolibarr  را می‌دهد (فایل‌های موقت یا همۀ فایلهای داخل پوشۀ <b>%s</b>). استفاده از این قابلیت در شرایط عادی ضرورتی ندارد. این قابلیت برای کاربرانی ایجاد شده است که میزبانی وبگاه آن‌ها امکان حذف فایل‌هائی که توسط سرویس‌دهندۀ وب ایجاد شده‌اند را نداده است. PurgeDeleteLogFile=حذف فایل‌های گزارش‌کار، شامل تعریف <b>%s</b> برای واحد گزارش‌کار سامانه Syslog (خطری برای از دست دادن داده‌ها نیست) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=حذف همۀ فایل‌های موجود در پوشۀ: <b>%s</b>. <br> این باعث حذف همۀ مستنداتی که به عناصر مربوطند ( اشخاص سوم، صورت‌حساب و غیره ...)، فایل‌هائی که به واحد ECM ارسال شده‌اند، نسخه‌برداری‌های پشتیبان بانک‌داده و فایل‌های موقت خواهد شد. PurgeRunNow=شروع پاک‌سازی @@ -232,6 +234,7 @@ BoxesAvailable=وسایل در دسترس BoxesActivated=وسایل فعال شده ActivateOn=فعال کردن در ActiveOn=فعال شده در +ActivatableOn=Activatable on SourceFile=فایل منبع AvailableOnlyIfJavascriptAndAjaxNotDisabled=فقط در صورتی که JavaScript غیرفعال نباشد در دسترس است Required=ضروری @@ -347,9 +350,10 @@ LastActivationAuthor=آخرین سازندۀ فعال‌کننده LastActivationIP=آخرین درگاه‌اینترنتی فعال‌کننده UpdateServerOffline=به‌روز‌رسانی برون‌خطی-Offline سرویس‌دهنده WithCounter=مدیریت شمارنده -GenericMaskCodes=شما می‌توانید هر نوع قالب شماره‌دهی مورد نظر خود را تعیین کنید. در این قالب، برچسب‌های زیر قابل استفاده هستند: <br><b>{000000}</b> که مربوط به عددی است که در هر %s به آن افزوده می‌شود. بسته به تعداد شماره‌هائی که لازم دارید، صفر قرار دهید. شمارنده، به تعداد صفرهای موجود از سمت چپ تکمیل خواهد شد تا به تعداد صفرهای قالب، داشته باشد. <br><b>{000000+000}</b> مثل مورد قبل، با این تفاوت که شمارنده با عدد جایگزین پس از علامت + به عنوان اولین شمارۀ %s استفاده خواهد شد. <br><b>{000000@x}</b> همانند مورد قبل با این تفاوت که شمارنده پس از رسیدن به ماه x صفر خواهد شد (x عددی بین 1 و 12 است، یا 0 برای استفاده از ماه‌های ابتدائی سال مالی تعریف شده در پیکربندی، یا 99 برای صفر شدن در هر ماه). در صورتی که این گزینه استفاده شود و x برابر با 2 یابیشتر باشد، توالی {yy}{mm} یا {yyyy}{mm} مورد نیاز خواهد بود. <br><b>{dd}</b> روز (01 تا 31). <br><b>{mm}</b> ماه (01 تا 12). <br><b>{yy}</b>، <b>{yyyy}</b> یا <b>{y}</b> سال 2، 4 رقمی یا 1 رقمی. <br> -GenericMaskCodes2=<b>{cccc}</b> شمارۀ مشتری با تعیین تعداد اعداد <br><b> {cccc000}</b> شمارۀ مشتری با تعیین تعداد عدد به همراه یک شمارنده مخصوص مشتری. این شمارنده مخصوص در هنگام ازنوشدن شمارندۀ سراسری صفر خواهد شد. <br><b>{tttt}</b> شمارۀ نوع شخص سوم با تعیین تعداد حروف (به فهرست خانه-برپاسازی-واژه‌نامه-انواع شخص سوم) نگاه کنید. در صورتی که این برچسب را اضافه کنید، شمارنده برای هر یک از انواع شخص سوم، متفاوت خواهد بود.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=تمام حروف موجود در قالب دست‌نخورده باقی خواهد ماند. <br> امکان درج فاصل وجود نداد.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>مثال برای 99م %s مربوط به شخص سومی با نام TheCompany، با تاریخ 2007-01-31: </u><br> GenericMaskCodes4b=<u>به عنوان مثال در شخص‌سوم ایجاد شده در 2007-03-01:</u> <br> GenericMaskCodes4c=<u>به عنوان مثال در محصول ایجاد شده در 2007/03/01:</u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=خالی رها کردن این بخش به معنا ExtrafieldParamHelpselect=فهرست مقادیر باید به صورت سطور به شکل key,value باشد (که key نمی‌تواند برابر با 0 باشد.)<br><br> برای مثال: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>برای برخورداری از فهرستی وابسته به فهرست دیگری از مشخصات تکمیلی:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>برای برخورداری از یک فهرست وابسته به یک فهرست دیگر:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=فهرست مقادیر باید سطوری به شکل key,value باشد که (که key نمی‌تواند برابر با 0 باشد) <br><br> برای مثال: <br>1,value1<br>2,value2 <br>3,value3<br>... ExtrafieldParamHelpradio=فهرست مقادیر باید سطوری به شکل key,value باشد که (که key نمی‌تواند برابر با 0 باشد) <br><br> برای مثال: <br>1,value1<br>2,value2 <br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=فهرست مقادیری که از یک جدول گرفته می‌شود <br>روش درج: table_name:label_field:id_field::filter<br>مثال: c_typent:libelle:id::filter<br><br>filter می‌تواند یک آزمایش ساده باشد (مثال active=1) برای نمایش مقدار فعال <br> شما همچنین می‌توانید از $ID$ در فیلتر استفاده نمائید که شناسۀ کنونی شیء فعلی است <br>برای انجام جستار SELECTدر فیلتر از $SEL$<br>اگر بخواهید از extrafields در فیلتر استفاده نمائید، از روش‌درج extra.fieldcode=... استفاده نمائید، (که کد فیلتر، همان کد extrafiled است)<br><br> باری دریافت ک فهرست وابسته به یک فهرست تکمیلی از مشخصه‌ها دیگر:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>برای دریافت یک فهرست وابسته به یک فهرست دیگر:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=کتابخانۀ قابل استفاده برای تولید PDF @@ -541,6 +545,8 @@ Module40Name=فروشندگان Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) Module42Name=گزارش‌کار اشکال‌یابی Module42Desc=امکانات گزارش‌برداری (فایل، گزارش‌کار سامانه، ...). این گزارش کارها مربوط به مقاصد فنی/اشکال‌یابی هستند. +Module43Name=نوار اشکال‌یابی +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=ویراستاران Module49Desc=مدیریت ویراستارها Module50Name=محصولات @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=قابلیت‌های تبدیل GeoIP Maxmind Module3200Name=بایگانی‌های تغییرناپذیر Module3200Desc=فعال کردن یک گزارش کاری غیرقابل تغییر. رخدادها به صورت بلادرنگ بایگانی خواهند شد. گزارش به صورت یک جدول فقط‌خواندنی از رخدادهای زنجیره‌ای در آمده که قابلیت صادرات دارند. برای بعضی از کشورها این واحد، اجباری است. +Module3400Name=شبکه‌های اجتماعی +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=مدیریت منابع انسانی Module4000Desc=مدیریت منابع انسانی (مدیریت شعبه، قراردادهای کارمندان و حس‌ها) Module5000Name=چند-شرکتی Module5000Desc=به شما امکان مدیریت شرکت‌های متعدد را می‌دهد -Module6000Name=گردش‌کار -Module6000Desc=مدیریت گردش‌کار (ساخت خودکار اشیاء و/یا تغییر خودکار وضعیت) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=وبگاه‌ها 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. Module20000Name=مدیریت درخواست مرخصی @@ -805,7 +813,8 @@ PermissionAdvanced253=ساخت/ویرایش کاربران داخلی/خارجی Permission254=ساخت/ویرایش کاربران خارجی Permission255=تغییر گذرواژۀ سایر کاربران Permission256=حذف یا غیرفعال‌کردن سایر کاربران -Permission262=گسترش دسترسی به همۀ اشخاص سوم (نه فقط اشخاص‌سومی که کاربر مربوط به آن نمایندۀ فروش باشد). <br> برای کاربران خارجی مؤثر نیست (همواره برای پیشنهادها، سفارشات، صورت‌حساب‌ها و قراردادها و غیره محدود به خود هستند). <br> برای طرح‌ها مؤثر نیست ( فقط نقش‌ها-rules ، قابل نمایش بودند و انتساب‌ها در مجوزهای طرح مربوطه مهم است). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=ملاحظۀ CA Permission272=ملاحظۀ صورت‌حساب‌ها Permission273=صادرکردن صورت‌حساب‌ها @@ -1175,7 +1184,8 @@ SetupDescription2=دو واحد بعدی الزامی هستند (دو ورود SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=سایر عناوین فهرست برپاسازی برای مدیریت مقادیر اختیاری. -LogEvents=رویدادهای بازرسی امنیتی +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=بازرسی InfoDolibarr=دربارۀ Dolibarr InfoBrowser=دربارۀ مرورگر @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=به نظر لازم است روند به‌ه YouMustRunCommandFromCommandLineAfterLoginToUser=شما باید این سطر دستور را پس از ورود به خط فرمان با کاربر <b>%s</b> اجرا کنید یا این‌که گزینۀ -W را در انتهای فرمان برای اعلام گذرواژۀ <b>%s</b> به‌کار گیرید. YourPHPDoesNotHaveSSLSupport=توابع SSL در PHP شما موجود نیست DownloadMoreSkins=پوسته‌های بیشتر برای دریافت -SimpleNumRefModelDesc=شمارۀ مرجع را با حالت %syymm-nnnn باز می‌گرداند، که yy سال است، mm ماه و nnnn یک ترتیب بدون نوسازی. +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=نمایش شناسۀ حرفه‌ای و نشانی ShowVATIntaInAddress=پنهان کردن شمارۀ م‌ب‌اا داخل‌جامعه‌ای-اروپا به‌همراه نشانی‌ها TranslationUncomplete=ترجمه جزئی @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=سرور واسط-proxy : نام/نشانی MAIN_PROXY_PORT=سرور واسط-proxy: درگاه MAIN_PROXY_USER=سرور واسط-proxy: نام‌کاربری/ورود MAIN_PROXY_PASS=سرور واسط-proxy: گذرواژه -DefineHereComplementaryAttributes=سایر مشخصات مورد نظر را در صورت نیاز به شامل کردن برای %s وار نمائید +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=ویژگی‌های تکمیلی ExtraFieldsLines=ویژگی‌های تکمیلی (سطور) ExtraFieldsLinesRec=ویژگی‌های تکمیلی (سطور قالب‌های صورت‌حساب) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=ورود (unix) LDAPFieldLoginExample=مثال: uid LDAPFilterConnection=صافی جستجو LDAPFilterConnectionExample=مثال: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=ورود (سامبا، Active Directory) LDAPFieldLoginSambaExample=مثال: samaccountname LDAPFieldFullname=نام‌کامل @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=شرکت شما برای عدم استفاده از م AccountancyCode=کد حساب‌داری AccountancyCodeSell=کد حساب فروش AccountancyCodeBuy=کد حساب خرید +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=برپاسازی واحد رخدادها و جلسات PasswordTogetVCalExport=کلید برای اعتباردهی به پیوند صادرات +SecurityKey = Security Key PastDelayVCalExport=عدم صادرکردن رخداد قدیمی‌تر از AGENDA_USE_EVENT_TYPE=استفاده از انواع رخداد (قابل‌مدیریت در برپاسازی-> واژه‌نامه‌ها -> انواع رخدادهای جلسات) AGENDA_USE_EVENT_TYPE_DEFAULT=ثبت خودکار این مقدار پیش‌فرض برای نوع رخداد در برگۀ ساخت رخداد @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=رنگ پس‌زمینۀ سطور فرد جدول BackgroundTableLineEvenColor=رنگ پس‌زمینۀ سطور زوج جدول MinimumNoticePeriod=حداقل بازۀ خبردهی (درخواست مرخصی شما باید حداقل با این فاصلۀ زمانی انجام شود) NbAddedAutomatically=تعداد روزهائی که باید به شمارنده‌های کاربران (به شکل خودکار) در هر ماه اضافه شود -EnterAnyCode=این بخش حاوی ارجاعی به یک سطر شناسه است. مقدار دل‌خواه خود را وارد نمائید، اما بدون نویسه‌های خاص. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. Enter0or1=Enter 0 or 1 UnicodeCurrency=در اینجا بین دو براکت فهرست اعداد بایت‌هائی را که نمایاندۀ نماد واحدپولی است وارد نمائید. برای مثال، برای $ مقدار [36] را وارد نمائید، برای ریال برزیل R$ مقدار [82,36] و برای €، مقدار [8364] ColorFormat=رنگ RGB در مبنای HEX، مثال: FF0000 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=فاصلۀحاشیۀ پائین PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=تنظیمات خاصی برای این واحدموردنیاز نیست SetToYesIfGroupIsComputationOfOtherGroups=در صورتی که این گروه جهت محاسبۀ سایر گروه‌هاست این گزینه را انتخاب کنید -EnterCalculationRuleIfPreviousFieldIsYes=در صورتی که بخش قبلی به "بله" تنظیم شده باشد، قاعدۀ محاسبه را وارد نمائید (برای مثال 'CODEGRP1+CODEGRP2') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=چندین نوع زبان پیدا شد RemoveSpecialChars=حذف نویسه‌های خاص COMPANY_AQUARIUM_CLEAN_REGEX=گزینش Regex برای پاک کردن مقدار (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=برپاسازی واحد شبکه‌های اجتماعی EnableFeatureFor=فعال کردن‌قابلیت‌ها برای <strong>%s</strong> VATIsUsedIsOff=نکته: این گزینه برای استفاده از مالیات‌برفروش یا مالیات‌برارزش‌افزوده در فهرست %s - %s به حالت <strong>خاموش</strong> درآمده است، بنابراین مالیات‌برفروش و مالیات بر ارزش افزوده در عملیات فروش همواره برابر با 0 خواهد بود. SwapSenderAndRecipientOnPDF=جابه‌جا کردن محل ارسال‌کننده و دریافت کننده در سندهای PDF -FeatureSupportedOnTextFieldsOnly=هشدار! این قابلیت تنها در بخش‌های نشوتاری پشتیبانی می‌شود. به‌هرحال مؤلفۀ نشانی اینترتی action=create و action=edit باید تنظیم شده یا این‌که نام صفحه باید با 'new.php' تمام شود تا این قابلیت را به‌حرکت‌اندازد. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=جمع‌کنندۀ رایانامه EmailCollectorDescription=افزودن یک وظیفۀ زمان‌بندی شده و یک صفحۀ برپاسازی برای پویش منظم بخش‌های رایانامه (با استفاده از از پرتکل IMAP) و ثبت رایانامه‌هائی که در برنامۀ شما دریافت شده در محل درست و/یا ایجاد خودکار چند ردیف (مثل سرنخ‌ها). NewEmailCollector=یک جمع‌کنندۀ رایانامۀ جدید @@ -2049,8 +2062,11 @@ UseDebugBar=استفاده از نوار اشکال‌یابی DEBUGBAR_LOGS_LINES_NUMBER=تعداد آخرین سطور گزارش‌کار برای حفظ در کنسول WarningValueHigherSlowsDramaticalyOutput=هشدار! مقادیر بزرگ خروجی را به‌شدت کند می‌کند ModuleActivated=واحد %s فعال شده و باعث کاهش سرعت رابط کاربری می‌شود +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=اشکال صادارات با همگان به اشتراک گذاشته شدند ExportSetup=برپاسازی واحد صادرات ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/fa_IR/banks.lang b/htdocs/langs/fa_IR/banks.lang index 74e84caae12..4f30cc9681d 100644 --- a/htdocs/langs/fa_IR/banks.lang +++ b/htdocs/langs/fa_IR/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=تعهدنامۀ SEPAی شما FindYourSEPAMandate=این تعهدنامۀ SEPAی شماست تا شرکت ما را مجاز کند سفارش پرداخت مستقیم از بانک داشته باشد. آن را امضا شده بازگردانید (نسخۀ اسکن‌شدۀ برگۀ امضا شده) یا آن را توسط رایانامه ارسال کنید: AutoReportLastAccountStatement=پرکردن خودکار بخش "شمارۀ شرح کار بانک" با آخرین شمارۀ شرح کار در هنگام وفق دادن CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/fa_IR/bills.lang b/htdocs/langs/fa_IR/bills.lang index 4a28819cc88..9f20ff13d72 100644 --- a/htdocs/langs/fa_IR/bills.lang +++ b/htdocs/langs/fa_IR/bills.lang @@ -52,11 +52,12 @@ Invoices=صورت‌حساب‌ها InvoiceLine=سطر صورت‌حساب InvoiceCustomer=صورت‌حساب مشتری CustomerInvoice=صورت‌حساب مشتری -CustomersInvoices=صورت‌حساب‌های مشتریان +CustomersInvoices=صورت‌حساب مشتری SupplierInvoice=صورت‌حساب فروشنده -SuppliersInvoices=صورت‌حاسب‌های فروشنده +SuppliersInvoices=صورت‌حساب فروشندگان +SupplierInvoiceLines=Vendor invoice lines SupplierBill=صورت‌حساب فروشنده -SupplierBills=صور‌ت‌حساب تامین‌کنندگان +SupplierBills=صورت‌حساب فروشندگان Payment=پرداخت PaymentBack=بازپس‌گیری CustomerInvoicePaymentBack=بازپس‌گیری @@ -81,6 +82,8 @@ PaymentsAlreadyDone=پرداخت‌هائی که قبلا انجام شده PaymentsBackAlreadyDone=Refunds already done PaymentRule=مقررات پرداخت PaymentMode=نوع پرداخ +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=کارت اعتباری/نقدی PaymentTypePP=PayPal IdPaymentMode=نوع پرداخت (شناسه) @@ -373,6 +376,7 @@ DateLastGeneration=تاریخ آخرین تولید DateLastGenerationShort=تاریخ آخرین تولید MaxPeriodNumber=حداکثر تعداد تولید صورت‌حساب NbOfGenerationDone=تعداد صورت‌حساب‌هائی که تا کنون تولید شده +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=تعداد تولیدهای انجام شده MaxGenerationReached=حداکثر تعداد قابل تولید به‌سررسیده InvoiceAutoValidate=تائید خودکار صورت‌حساب‌ها @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=ظرف 14 روز پس از آخرماه FixAmount=Fixed amount - 1 line with label '%s' VarAmount=مبلغ متغیر ( %% کل ) VarAmountOneLine=مبلغ متغیر ( %% کل ) - 1 سطر با برچسب "%s" -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=انتقال بانکی PaymentTypeShortVIR=انتقال بانکی @@ -494,12 +498,16 @@ Cash=پول‌نقد Reported=تأخیرکرده DisabledBecausePayments=ممکن نیست، زیرا دارای پرداخت هم هست CantRemovePaymentWithOneInvoicePaid=امکان حذف این پرداخت نیست زیرا حداقل یک صورت‌حساب به‌عنوان پرداخت‌شده وجود دارد +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=پرداخت مورد انتظار CantRemoveConciliatedPayment=امکان حذف پرداخت تطبیق‌داده شده وجود ندارد PayedByThisPayment=پرداخت شده توسط این پرداخت 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=همۀ صورت‌حساب‌های بدون باقی‌ماندۀ پرداخت به صورت خودکار به وضعیت "پرداخت شده" بسته خواهد شد. ToMakePayment=پرداخت ToMakePaymentBack=پس‌دادن‌پرداخت @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=شما باید ابتدا یک صورت PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=قالب PDF صورت‌حساب Sponge. یک قالب کامل صورت‌حساب PDFCrevetteDescription=قالب PDF صورت‌حساب Crevette. یک قالب کامل صورت‌حساب برای صورت‌حساب‌های وضعیت -TerreNumRefModelDesc1=بازگرداندن عدد با شکل %syymm-nnnn برای صورت‌حساب‌های استاندارد و %syymm-nnnn برای یادداشت‌های اعتباری که در آن yy نمایندۀ سال، mm ماه و nnnn یک شمارنده بدون توقف و بدون بازگشت به 0 است -MarsNumRefModelDesc1=بازگرداندن عدد با شکل %syymm-nnnn برای صورت‌حساب‌های استاندارد و %s yymm-nnnn برای صورت‌حساب‌های جایگزین و %syymm-nnnn برای صورت‌حساب‌های پیش‌پرداخت و %syymm-nnnn برای یادداشت‌های اعتباری است که در آن yy نمایندۀ سال، mm ماه و nnnn یک شمارنده بدون توقف و بدون بازگشت به 0 است +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=صورت‌حسابی که با $syymm شروع می‌شود قبلا وجود داشته و با این نوع ترتیب شماره همخوان نیست. آن را حذف کرده یا تغییر نام دهید تا این واحد فعال شود -CactusNumRefModelDesc1=بازگرداندن عدد با شکل %s yymm-nnnn برای صورت‌حساب‌های استاندارد و %s yymm-nnnn برای یادداشت‌های اعتباری و %syymm-nnnn برای پیش پرداخت است که در آن yy نمایندۀ سال، mm ماه و nnnn یک شمارنده بدون توقف و بدون بازگشت به 0 است +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=طرف‌تماس خدمات فر InvoiceFirstSituationAsk=صورت‌حساب اولین وضعیت InvoiceFirstSituationDesc=<b>صورت‌حساب‌های وضعیت</b> با وضعیت‌هائی گره خورده‌اند که مربوط به پیشرفت کار هستند، برای مثال پیشرفت یک ساختمان. هر وضعیت با یک صورت‌حساب گره خورده است. InvoiceSituation=صورت‌حساب وضعیت +PDFInvoiceSituation=صورت‌حساب وضعیت InvoiceSituationAsk=صورت‌حساب در پی وضعیت InvoiceSituationDesc=وضعیت جدیدی در پس وضعیتی که اکنون موجود است بسازید SituationAmount=مبلغ (خالص) صورت‌حساب وضعیت @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=در صورتی که می‌خواهید ای DeleteRepeatableInvoice=حذف صورت‌حساب قالبی ConfirmDeleteRepeatableInvoice=آیا مطمئنید می‌خواهید این صورت‌حساب قالبی را حذف کنید؟ CreateOneBillByThird=ساخت یک صورت‌حساب برای هر شخص سوم (در غیر این‌صور، یک صورت‌حساب برای هر سفارش) -BillCreated=(%s) صورت‌حساب ساخته شد +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=وضعیت تولید سند DoNotGenerateDoc=عدم تولید فایل سن AutogenerateDoc=تولید خودکار فایل سند @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/fa_IR/boxes.lang b/htdocs/langs/fa_IR/boxes.lang index 644922a4949..f0348d2040c 100644 --- a/htdocs/langs/fa_IR/boxes.lang +++ b/htdocs/langs/fa_IR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=اطلاعات ورود BoxLastRssInfos=اطلاعات RSS BoxLastProducts=آخرین %s محصول/خدما @@ -17,9 +18,13 @@ BoxLastActions=آخرین فعالیت‌ها BoxLastContracts=آخرین قراردادها BoxLastContacts=آخرین طرف‌های تماس/نشانی‌ها BoxLastMembers=آخرین اعضاء +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=آخرین واسطه‌گری‌ها BoxCurrentAccounts=ماندۀ حساب‌های باز BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=آخرین %s اخبار از %s BoxTitleLastProducts=خدمات/محصولات: آخرین %s تغییریافته BoxTitleProductsAlertStock=محصولات: هشدار موجودی @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=حسابداری +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/fa_IR/categories.lang b/htdocs/langs/fa_IR/categories.lang index 5c7ca6a0f2e..b815c3aa17f 100644 --- a/htdocs/langs/fa_IR/categories.lang +++ b/htdocs/langs/fa_IR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌ه CustomersCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های مشتریان MembersCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های اعضا ContactsCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های طرف‌های تماس -AccountsCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های حساب‌ها +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های طرح‌ها UsersCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های کاربران SubCats=زیردسته‌ها @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=نمایش کلیدواژه/دسته‌بندی ByDefaultInList=به طور پیش‌فرض در فهرست ChooseCategory=انتخاب دسته‌بندی -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/fa_IR/companies.lang b/htdocs/langs/fa_IR/companies.lang index ab78f11dd02..d29507f145e 100644 --- a/htdocs/langs/fa_IR/companies.lang +++ b/htdocs/langs/fa_IR/companies.lang @@ -43,9 +43,10 @@ Individual=فرد خصوصی ToCreateContactWithSameName=به طور خودکار با همین اطلاعات یک طرف/تماس نشانی شبیه به شخص‌سوم در ذیل این شخص‌سوم خواهد ساخت. در اکثر موارد، حتی در صورتی‌که که شخص‌سوم، یک شخص فیزیکی باشد، ساختن یک شخص‌سوم، کافی است. ParentCompany=شرکت والد Subsidiaries=شرکتهای تابعه -ReportByMonth=گزارش ماهانه -ReportByCustomers=گزارش مشتری -ReportByQuarter=گزارش بر اساس نرخ +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=کد ملی RegisteredOffice=دفتر ثبتی Lastname=نام خانوادگی @@ -172,14 +173,20 @@ ProfId1ES=شناسۀ کاری 1 (CIF/NIF) ProfId2ES=شناسۀ کاری 2 (شمارۀ امنیت اجتماعی) ProfId3ES=شناسۀ کاری 3 (CNAE) ProfId4ES=شناسۀ کاری 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=شناسۀ کاری 1 (SIREN) ProfId2FR=شناسۀ کاری 2 (SIRET) ProfId3FR=شناسۀ کاری 3 (NAF, old APE) ProfId4FR=شناسۀ کاری 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=شمارۀ ثبت ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=شناسۀ کاری 1 (R.C.S. Luxembourg) ProfId2LU=شناسۀ کاری 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=شناسۀ کاری 1 (NIPC) ProfId2PT=شناسۀ کاری 2 (شمارۀ تامین اجتماعی) ProfId3PT=شناسۀ کاری 3 (Commercial Record number) ProfId4PT=شناسۀ کاری 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=شناسۀ کاری 1 (OGRN) ProfId2RU=شناسۀ کاری 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=صورت‌حساب‌های درانتظار کنونی OutstandingBill=حداکثر تعداد صورت‌حساب‌های درانتظار OutstandingBillReached=حداکثر تعداد رسیدن به صورت‌حساب‌های درانتظار OrderMinAmount=حداقل مقدار سفارش -MonkeyNumRefModelDesc=یک عدد به شکل %s yymm-nnnn برای این کد مشتری و %s yymm-nnnn برای فروشنده باز می‌گرداند که yy برابر با سال، mm برابر با ماه و nnnn یک سریال بدون توقف و بدون بازگشت به 0 است. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=این کد آزاد است و می‌تواند در هر زمانی ویرایش شود. ManagingDirectors=نام مدیر (مدیرعامل، مدیر، رئیس...)() MergeOriginThirdparty=نسخه‌برداری از شخص سوم (شخص‌سومی که می‌خواهید حذف کنید) diff --git a/htdocs/langs/fa_IR/compta.lang b/htdocs/langs/fa_IR/compta.lang index 5e300643567..b8b215c8b96 100644 --- a/htdocs/langs/fa_IR/compta.lang +++ b/htdocs/langs/fa_IR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=خریدهای SGST VATCollected=مالیات‌بر‌ارزش‌افزودۀ جمع‌آوری شده StatusToPay=قابل پرداخت SpecialExpensesArea=ناحیۀ انجام همۀ پرداخت‌های خاص +VATExpensesArea=Area for all TVA payments SocialContribution=مالیات اجتماعی و ساختاری SocialContributions=مالیات‌های اجتماعی و ساختاری SocialContributionsDeductibles=مالیات‌های اجتماعی و ساختاری کسرپذیر @@ -85,6 +86,7 @@ PaymentCustomerInvoice=پرداخت صورت‌حساب مشتری PaymentSupplierInvoice=پرداخت صورت‌حساب فروشنده PaymentSocialContribution=پرداخت مالیات اجتماعی/ساختاری PaymentVat=پرداخت مالیات‌برارزش‌افزوده +AutomaticCreationPayment=Automatically record the payment ListPayment=فهرست پرداخت‌ها ListOfCustomerPayments=فهرست پرداخت‌های مشتری ListOfSupplierPayments=فهرست‌پرداخت‌های مربوط به فروشنده @@ -104,6 +106,8 @@ LT2PaymentES=پرداخت IRPF LT2PaymentsES=پرداخت‌های IRPF VATPayment=پرداخت مالیات بر فروش VATPayments=پرداخت‌های مالیات بر فروش +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=بازپس‌گیری مالیات‌برفروش NewVATPayment=یک پرداخت جدید مالیات‌برفروش NewLocalTaxPayment=یک پرداخت جدید مالیات %s @@ -134,9 +138,17 @@ NoWaitingChecks=هیچ چکی در انتظار وصول شدن نیست DateChequeReceived=تاریخ دریافت چک NbOfCheques=تعداد چک‌ها PaySocialContribution=پرداخت مالیات اجتماعی/ساختاری -ConfirmPaySocialContribution=آیا مطمئنید می‌خواهید این مالیات ساختاری یا اجتماعی را به صورت پرداخت شده طبقه‌بندی کنید؟ +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=حذف یک پرداخت مالیات اجتماعی/ساختاری -ConfirmDeleteSocialContribution=آیا مطمئن هستید می‌خواهید پرداخت این مالیات اجتماعی/ساختاری را حذف کنید؟ +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=مالیات‌های اجتماعی و ساختاری و پرداخت‌ها CalcModeVATDebt=حالت <b>%sحساب‌داری مالیات‌بر‌ارزش افزوده تعهدی%s</b>. CalcModeVATEngagement=حالت <b>%sمالیات بر ارزش افزوده در ازای درآمد-هزینه%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- این شامل همۀ پرداخت‌های واقعی صو RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- شامل همۀ پرداخت‌های دریافت‌شدۀ مؤثر صورت‌حساب‌های مشتریان است. <br> -این بسته به تاریخ پرداخت این صورت‌حساب‌هاست<br> RulesCATotalSaleJournal=شامل همۀ سطور بستانکار دفترفروش‌روزانه است +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=شامل همۀ ردیف‌های دفترکل دارای حساب‌حساب‌داری است که در گروه‌های "هزینه" یا "درآمد" باشند RulesResultBookkeepingPredefined=شامل همۀ ردیف‌های دفترکل دارای حساب‌حساب‌داری است که در گروه‌های "هزینه" یا "درآمد" باشند RulesResultBookkeepingPersonalized=نمایش دهندۀ ردیف دفترکل شما با حساب‌های حساب‌درای است <b> گروه‌بندی‌شده توسط گروه‌های شخصی‌سازی‌شده</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=گزارش مالیات‌برفروش بر حسب شخ VATReportByCustomers=گزارش مالیات‌برفروش بر حسب مشتری VATReportByCustomersInInputOutputMode=گزارش بر حسب مالیات‌بر‌ارزش‌افزوده جمع‌آوری و پرداخت شده VATReportByQuartersInInputOutputMode=گزارش بر حسب مالیات‌برفروش جمع‌آوری و پرداخت شده +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=گزارش مالیات 2 بر اساس نرخ LT2ReportByQuarters=گزارش مالیات 3 بر اساس نرخ LT1ReportByQuartersES=گزارش بر اساس نرخ RE @@ -217,7 +231,7 @@ Pcg_subtype=زیر گروه PCG InvoiceLinesToDispatch=سطور قابل ارسال صورت‌حساب ByProductsAndServices=بر حسب محصول و خدمات RefExt=ارجاع خارجی -ToCreateAPredefinedInvoice=برای ساخت یک صورت‌حساب قالبی، یک صورت‌حساب استاندارد ساخته و سپس بدون تائیداعتبار آن روی کلید «%s» کلیک کنید. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=پیوند به سفارش Mode1=روش 1 Mode2=روش 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=حساب‌حساب‌داری اختصاصی ACCOUNTING_ACCOUNT_SUPPLIER=حساب حساب‌داری استفاده شده برای اشخاص سوم ACCOUNTING_ACCOUNT_SUPPLIER_Desc=حساب‌حساب‌داری اختصاصی تعریف شده در کارت شخص‌سوم تنها برای حساب‌داری دفترمعین استفاده می‌شود. اگر حساب‌حساب‌داری اختصاصی مشتری در کارت شخص‌سوم تعریف نشده باشد، این یکی فقط برای دفترکل‌مرکزی و به‌عنوان مقدار پیش‌فرض حسابداری دفترمعین استفاده می‌شود. ConfirmCloneTax=نسخه‌برداری از یک مالیات اجتماعی/ساختاری را تائید کنید +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=نسخه‌برداری برای ماه آینده SimpleReport=گزارش ساده AddExtraReport=گزارش‌های دیگر (افزودن گزارش‌های مشتری خارجی و داخلی) @@ -253,7 +269,8 @@ AccountingAffectation=انتساب حساب‌داری LastDayTaxIsRelatedTo=آخرین روز دورۀ مالیاتی مربوط به VATDue=مالیات بر فروش مطالبه شده ClaimedForThisPeriod=مطالبه شده برای دورۀ -PaidDuringThisPeriod=پرداخت شده برای این دوره +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=بر حسب نرخ مالیات‌برفروش TurnoverbyVatrate=گردش‌مالی صورت‌حساب‌شده بر حسب نرخ مالیات بر فروش TurnoverCollectedbyVatrate=گردش‌مالی دریافت‌شده بر حسب نرخ مالیات بر فروش @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/fa_IR/ecm.lang b/htdocs/langs/fa_IR/ecm.lang index b1e4bd200ec..c8b1c8e7b2f 100644 --- a/htdocs/langs/fa_IR/ecm.lang +++ b/htdocs/langs/fa_IR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=فایل‌ها در پایگاه داده فهرس ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 43ad72288b6..80e7a42b99d 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=پوشۀ <b>%s</b> یافت نشد. (مسیر نادرست، م ErrorFunctionNotAvailableInPHP=برای این قابلیت، تابع <b>%s</b> نیاز است اما در این برپاسازی/نسخۀ PHP موجود نیست. ErrorDirAlreadyExists=قبلا یک پوشه با همین نام وجود داشته است. ErrorFileAlreadyExists=قبلا یک فایل به همین نام وجود داشته است. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=فایل به طور کامل توسط سرور دریافت نشده است. ErrorNoTmpDir=پوشۀ موقت %s وجود ندارد. ErrorUploadBlockedByAddon=امکان ارسال توسط یک افزونۀ PHP/Apache مسدود شده است @@ -226,6 +227,7 @@ ErrorDuringChartLoad=خطا در هنگام بارگذاری نمودار حسا ErrorBadSyntaxForParamKeyForContent=برای مؤلفۀ keyforcontent نگارش بدی وارد شده است. باید مقداری داشته باشد که با %s یا %s آغاز شود. ErrorVariableKeyForContentMustBeSet=خطا، مقدارثابت با نام %s (با محتوای متنی قابل نمایش) یا %s (با نشانی بیرونی قابل نمایش) باید تنظیم شده باشد. ErrorURLMustStartWithHttp=نشانی اینترنتی %s باید با http://  یا https:// آغاز گرد +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=خطا، ارجاع جدید قبلا استفاده شده است ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. ErrorSearchCriteriaTooSmall=Search criteria too small. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/fa_IR/externalsite.lang b/htdocs/langs/fa_IR/externalsite.lang index 4f8e8888c6b..8fde4592056 100644 --- a/htdocs/langs/fa_IR/externalsite.lang +++ b/htdocs/langs/fa_IR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=تنظیم پیوند به وبگاه بیرونی -ExternalSiteURL=نشانی‌اینترنتی وبگاه بیرونی +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=واحد ExternalSite  به درستی پیکربندی نشده است ExampleMyMenuEntry=عنوان فهرست من diff --git a/htdocs/langs/fa_IR/main.lang b/htdocs/langs/fa_IR/main.lang index e24969fbdf7..e06cabfcf01 100644 --- a/htdocs/langs/fa_IR/main.lang +++ b/htdocs/langs/fa_IR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=تاریخ اصلاح IPModification=Modification IP DateLastModification=آخرین تاریخ اصلاح DateValidation=تاریخ اعتباردهی +DateSigning=Signing date DateClosing=تاریخ بسته شدن DateDue=تاریخ موعدپرداخت DateValue=تاریخ مقداردهی @@ -361,7 +362,7 @@ UnitPriceHTCurrency=مبلغ واحد (بدون .) (واحد پولی) UnitPriceTTC=قیمت واحد PriceU=U.P. PriceUHT=U.P. (خالص) -PriceUHTCurrency=U.P (واحدپولی) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (با مالیات) Amount=مبلغ AmountInvoice=مبلغ صورت‌حساب @@ -389,6 +390,8 @@ AmountTotal=مبلغ کل AmountAverage=میانگین مبلغ PriceQtyMinHT=حداقل تعداد برای مبلغ (بدون مالیات) PriceQtyMinHTCurrency=حداقل تعداد برای مبلغ (بدون مالیات) (واحد پولی) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=درصد Total=جمع‌کل SubTotal=جمع جزء @@ -724,7 +727,7 @@ MenuMembers=اعضاء MenuAgendaGoogle=دستورکار گوگل MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=محدودیت Dolibarr (فهرست خانه-برپاسازی-امنیت): %s کیلوبایت، محدودیت PHP برابر با: %s کیلوبایت -NoFileFound=هیچ سندی در این پوشه ذخیره نشده است +NoFileFound=No documents uploaded CurrentUserLanguage=زبان کنونی CurrentTheme=پوستۀ کنونی CurrentMenuManager=مدیرفهرست کنونی @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=حذف عبارت '%s' SomeTranslationAreUncomplete=برخی از زبان‌های قابل انتخاب ممکن است تنها به شکل ناقص ترجمه شده باشد یا دارای خطا باشند. لطفا برای تکمیل و تصحیح زبان مورد نظر خود در <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> ثبت نام نمائید و اصلاحات مورد نظر خود را انجام دهید. -DirectDownloadLink=پیوند دریافت مستقیم (عمومی/خارجی) -DirectDownloadInternalLink=پیوند دریافت مستقیم (نیازمند ورود و مجوز) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=دریافت DownloadDocument=دریافت سن ActualizeCurrency=به‌روز‌رسانی نرخ واحدپولی @@ -1013,6 +1018,7 @@ SearchIntoContacts=طرف‌تماس‌ها SearchIntoMembers=اعضاء SearchIntoUsers=کاربران SearchIntoProductsOrServices=محصولات یا خدمات +SearchIntoBatch=Lots / Serials SearchIntoProjects=طرح‌ها SearchIntoMO=Manufacturing Orders SearchIntoTasks=وظایف @@ -1049,12 +1055,13 @@ KeyboardShortcut=میان‌بر صفحه‌کلید AssignedTo=منتسب به Deletedraft=حذف پیش‌نویس ConfirmMassDraftDeletion=تائید حذف دستجمعی پیش‌نویس -FileSharedViaALink=فایل به‌اشتراک‌گذاشته شده با پیوند +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=ابتدا یک شخص‌سوم انتخاب کنید YouAreCurrentlyInSandboxMode=شما فعلا در حالت "شن‌بازی" %s قرار دارید Inventory=انبار AnalyticCode=کد Analytic TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=نمایش اطلاعات بیشتر NoFilesUploadedYet=لطفا ابتدا یک سند بالاگذاری نمائید SeePrivateNote=ملاحظۀ یادداشت خصوصی @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/fa_IR/margins.lang b/htdocs/langs/fa_IR/margins.lang index ca2b20809a8..9cff4ab05ed 100644 --- a/htdocs/langs/fa_IR/margins.lang +++ b/htdocs/langs/fa_IR/margins.lang @@ -16,12 +16,13 @@ MarginDetails=جزئیات حاشیه ProductMargins=حاشیۀ محصولات CustomerMargins=حاشیۀ مشتری SalesRepresentativeMargins=حاشیه‌های نمایندۀ فروش +ContactOfInvoice=Contact of invoice UserMargins=حاشیه‌های کاربر ProductService=محصولات و خدمات AllProducts=همۀ محصولات و خدمات ChooseProduct/Service=انتخاب محصول و یا خدمات ForceBuyingPriceIfNull=الزام مبلغ خرید/هزینه به قیمت فروش، در صورتی که تعریف نشده باشد -ForceBuyingPriceIfNullDetails=در صورتی که مبلغ خرید/هزینه تعریف نشده باشد، و این گزینه "روشن" باشد، حاشیۀ این سطر صفر خواهد بود (مبلغ خرید/هزینه = قیمت فروش)، در غیر این‌صورت اگر ("خاموش") باشد، حاشیه برابر با پیش‌فرض پیشنهادی خواهد بود. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=روش حاشیه برای تخفیف‌های سراسری UseDiscountAsProduct=به عنوان یک محصول UseDiscountAsService=به عنوان خدمات @@ -36,7 +37,7 @@ CostPrice=قیمت هزینه UnitCharges=عوارض واحد Charges=عوارض AgentContactType=نوع طرف‌تماس نمایندۀ تجاری -AgentContactTypeDetails=تعیین طرف‌تماس (پیوند شده روی صورت‌حساب‌ها) برای گزارش حاشیۀ بر حسب نمایندۀ فروش +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=نرخ باید یک مقدار عددی باشد markRateShouldBeLesserThan100=نرخ نشان باید کم‌تر از 100 باشد ShowMarginInfos=نمایش اطلاعات حاشیه‌ها diff --git a/htdocs/langs/fa_IR/members.lang b/htdocs/langs/fa_IR/members.lang index d3f532cc95e..bd42466f112 100644 --- a/htdocs/langs/fa_IR/members.lang +++ b/htdocs/langs/fa_IR/members.lang @@ -21,10 +21,12 @@ MembersListToValid=لیست اعضای پیش نویس (به اعتبار شود MembersListValid=لیست اعضای معتبر MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=لیست اعضای واجد شرایط MenuMembersToValidate=عضو پیش نویس MenuMembersValidated=اعضای اعتبار +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=کاربران با اشتراک برای دریافت MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=منقضی شده MemberStatusPaid=اشتراک به روز MemberStatusPaidShort=به روز +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=عضو پیش نویس +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=معتبر شد @@ -82,6 +87,8 @@ Physical=فیزیکی Moral=اخلاقی MorAndPhy=Moral and Physical Reenable=را دوباره فعال کنید +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=حذف عضو @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=فرمت صفحه برچسب ها DescADHERENT_ETIQUETTE_TEXT=متن چاپ شده بر روی ورق آدرس عضو @@ -162,6 +170,7 @@ DocForLabels=تولید ورق آدرس SubscriptionPayment=پرداخت اشتراک LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=آمار کاربران بر اساس کشور MembersStatisticsByState=آمار کاربران توسط ایالت / استان MembersStatisticsByTown=آمار کاربران توسط شهر diff --git a/htdocs/langs/fa_IR/modulebuilder.lang b/htdocs/langs/fa_IR/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/fa_IR/modulebuilder.lang +++ b/htdocs/langs/fa_IR/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/fa_IR/orders.lang b/htdocs/langs/fa_IR/orders.lang index c1eb5ddfe45..94e00a837b7 100644 --- a/htdocs/langs/fa_IR/orders.lang +++ b/htdocs/langs/fa_IR/orders.lang @@ -16,6 +16,8 @@ ToOrder=ایجاد سفارش MakeOrder=ساخت سفارش SupplierOrder=سفارش خرید SuppliersOrders=سفارش‌های خرید +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=سفارش‌های خرید کنونی CustomerOrder=سفارش فروش CustomersOrders=سفارش‌های فروش @@ -141,11 +143,12 @@ OrderByEMail=رایانامه OrderByWWW=برخط OrderByPhone=تلفن # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=یک نمونۀ سادۀ سفارش PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=صدور صورت‌حساب سفارش‌ها +CreateInvoiceForThisSupplier=صدور صورت‌حساب سفارش‌ها NoOrdersToInvoice=هیچ سفارشی قابل صدور صورت‌حساب نیست CloseProcessedOrdersAutomatically=همۀ سفارش‌های انتخاب شده را "پردازش شده" طبقه‌بندی کن. OrderCreation=ساخت سفارش diff --git a/htdocs/langs/fa_IR/other.lang b/htdocs/langs/fa_IR/other.lang index a52e9a0dee7..a7339c81ea6 100644 --- a/htdocs/langs/fa_IR/other.lang +++ b/htdocs/langs/fa_IR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=ایجاد شده توسط٪ s ModifiedBy=اصلاح شده توسط٪ s ValidatedBy=تایید شده توسط٪ s +SignedBy=Signed by %s ClosedBy=بسته شده توسط٪ s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=این کلید جدید خود را برای ورود به سایت ا NewKeyWillBe=کلید جدید را برای ورود به نرم افزار خواهد بود ClickHereToGoTo=برای رفتن به٪ s اینجا را کلیک کنید YouMustClickToChange=با این حال شما باید اول بر روی لینک زیر کلیک کنید تا اعتبار این تغییر رمز عبور +ConfirmPasswordChange=Confirm password change ForgetIfNothing=اگر شما این تغییر را درخواست نکرده، فقط این ایمیل را فراموش کرده ام. اعتبار نامه های شما امن نگهداری می شود. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/fa_IR/productbatch.lang b/htdocs/langs/fa_IR/productbatch.lang index f0f55c13c8e..6542fcb3563 100644 --- a/htdocs/langs/fa_IR/productbatch.lang +++ b/htdocs/langs/fa_IR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=استفاده از شمارۀ سری‌ساخت/سریال -ProductStatusOnBatch=بله (نیاز به شمارۀ سری‌ساخت/سریال) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=خیر ( بدون نیاز به شمارۀ سری‌ساخت/سریال) -ProductStatusOnBatchShort=بله +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=خیر Batch=سری‌ساخت/سریال atleast1batchfield=تاریخ‌مصرف یا تاریخ‌فروش یا شمارۀ سری‌ساخت/سریال @@ -22,3 +24,12 @@ ProductLotSetup=برپاسازی قابلیت سری‌ساخت/شماره‌س ShowCurrentStockOfLot=نمایش موجودی فعلی برای زوج محصول/سری‌ساخت ShowLogOfMovementIfLot=نمایش گزارش‌کار جابجائی‌های مربوط به زوج محصول/سری‌ساخت StockDetailPerBatch=جزئیات موجودی هر سری‌ساخت +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/fa_IR/products.lang b/htdocs/langs/fa_IR/products.lang index ff7edf92df5..61db4341804 100644 --- a/htdocs/langs/fa_IR/products.lang +++ b/htdocs/langs/fa_IR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=نرخ م.ب.ا.ا. (برای این فروشنده/م DiscountQtyMin=تخفیف برای این مقدار NoPriceDefinedForThisSupplier=قیمت/مقدار برای این فروشنده/محصول تعریف نشده است NoSupplierPriceDefinedForThisProduct=قیمت/مقدار برای این محصول تعریف نشده است +PredefinedItem=Predefined item PredefinedProductsToSell=محصول ازپیش‌تعریف‌شده PredefinedServicesToSell=خدمات از پیش‌تعریف‌شده PredefinedProductsAndServicesToSell=محصول/خدمات از پیش‌تعریف‌شده برای فروش @@ -313,7 +314,7 @@ LastUpdated=آخرین به‌روزرسانی CorrectlyUpdated=به‌درستی به‌روز‌شد PropalMergePdfProductActualFile=فایل‌های قابل استفاده برای اضافه کردن به PDF Azur PropalMergePdfProductChooseFile=انتخاب فایل‌های PDF -IncludingProductWithTag=شامل‌کردن محصولات/خدمات به‌واسطۀ کلیدواژه +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=قیمت پیش‌فرض، قیمت واقعی ممکن است به مشتری وابسته باشد. WarningSelectOneDocument=لطفا حداقل یک سند انتخاب کنید DefaultUnitToShow=واحد diff --git a/htdocs/langs/fa_IR/projects.lang b/htdocs/langs/fa_IR/projects.lang index ab3c12c4568..51af354f7d8 100644 --- a/htdocs/langs/fa_IR/projects.lang +++ b/htdocs/langs/fa_IR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=فهرست وظایف GoToListOfTimeConsumed=رجوع به فهرست زمان صرف شده GanttView=نمای گانت +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=فهرست پیشنهادهای تجاری مرتبط با طرح ListOrdersAssociatedProject=فهرست سفارش‌های فروش مربوط به طرح ListInvoicesAssociatedProject=فهرست صورت‌حساب مشتریان مربوط به طرح @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/fa_IR/propal.lang b/htdocs/langs/fa_IR/propal.lang index 69b9dfd470f..d64ab1eabaf 100644 --- a/htdocs/langs/fa_IR/propal.lang +++ b/htdocs/langs/fa_IR/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=ارسال پیشنهاد تجاری از طریق پست DatePropal=تاریخ پیشنهاد DateEndPropal=اعتبار تاریخ پایان ValidityDuration=مدت اعتبار -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal٪ s را یافت نشد AddToDraftProposals=اضافه کردن به پیش نویس پیشنهاد @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=پیشنهاد تجاری و خطوط ProposalLine=خط پیشنهاد +ProposalLines=Proposal lines AvailabilityPeriod=تاخیر در دسترس SetAvailability=تنظیم تاخیر در دسترس AfterOrder=پس از سفارش @@ -85,3 +85,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/fa_IR/stocks.lang b/htdocs/langs/fa_IR/stocks.lang index c41e21fe88c..8a946698488 100644 --- a/htdocs/langs/fa_IR/stocks.lang +++ b/htdocs/langs/fa_IR/stocks.lang @@ -19,8 +19,8 @@ Stock=موجودی Stocks=موجودی MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=موجودی به‌واسطۀ سری‌ساخت/شماره‌سری LotSerial=سری‌ساخت/شماره‌سریال LotSerialList=فهرست سری‌ساخت/شماره‌سریال @@ -37,8 +37,8 @@ AllWarehouses=همۀ انبارها IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=دربرگرفتن سفارش‌های پیش‌نویس Location=محل -LocationSummary=نام‌کوتاه محل -NumberOfDifferentProducts=تعداد عناوین محصولات +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=تعداد کل محصولات LastMovement=آخرین جابجائی‌ها LastMovements=آخرین جابه‌جائی‌ها @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=ارزش انبار UserWarehouseAutoCreate=ساخت خودکار انبار کاربر در هنگام ساخت کاربر 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=انبار پیش‌فرض @@ -97,15 +98,16 @@ RealStockDesc=موجودی فیزیکی/واقعی موجودی‌هائی هس RealStockWillAutomaticallyWhen=موجودی واقعی با توجه به این قاعده ویرایش خواهد شد (طوری که در واحد موجودی تعریف شده است): VirtualStock=موجودی مجازی VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=شناسۀ انبار DescWareHouse=توضیحات مربوط به انبار LieuWareHouse=محل انبار WarehousesAndProducts=انبارها و محصولا WarehousesAndProductsBatchDetail=انبارها و محصولات (با جزئیات مربوط به سری‌ساخت/سریال) AverageUnitPricePMPShort=قیمت میانگین متوازن -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=قیمت فروش واحد EstimatedStockValueSellShort=مقدار برای فروش EstimatedStockValueSell=مقدار برای فروش @@ -145,7 +147,7 @@ Replenishments=دوباره‌پر‌کردن NbOfProductBeforePeriod=تعداد موجودی %s پیش از بازۀ انتخابی (< %s) NbOfProductAfterPeriod=تعداد موجودی %s پس از بازۀ انتخابی (> %s) MassMovement=جابجائی انبوه -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". +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 on "%s". RecordMovement=ثبت جابجائی ReceivingForSameOrder=رسیدهای این سفارش StockMovementRecorded=جابجائی موجودی‌ها ثبت شد @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=میزان موجودی باید به حدی کاف StockMustBeEnoughForOrder=میزان موجودی باید به حدی کافی باشد که بتوان یک محصول/خدمت را به سفارش اضافه کرد ( بررسی در خصوص موجودی واقعی در هنگام افزودن یک سطر به سفارش و هر قدر قاعدۀ تغییر خودکار تعیین کند رخ می‌هد) StockMustBeEnoughForShipment= میزان موجودی باید به حدی کافی باشد که بتوان یک محصول/خدمت را به حمل‌ونقل سپرد ( بررسی در خصوص موجودی واقعی در هنگام افزودن یک سطر به برگۀ حمل‌ونقل و هر قدر قاعدۀ تغییر خودکار تعیین کند رخ می‌هد) MovementLabel=عنوان جابجائی -TypeMovement=نوع جابجائی +TypeMovement=Direction of movement DateMovement=تاریخ جابجائی InventoryCode=کد فهرست یا جابجائی IsInPackage=در یک بسته قرار گرفته است @@ -183,6 +185,7 @@ inventoryCreatePermission=ساخت یک فهرست‌موجودی inventoryReadPermission=نمایش فهرست‌موجودی inventoryWritePermission=روزآمدسازی فهرست‌موجودی‌ inventoryValidatePermission=تائیداعتبار فهرست‌موجودی +inventoryDeletePermission=Delete inventory inventoryTitle=فهرست‌موجودی inventoryListTitle=فهرست‌های‌موجودی inventoryListEmpty=هیچ فهرست‌بندی‌موجودی در جریان نیست @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=فایل را بالاگذاری کرده و سپس روی نشانک %s کلیک کرده تا به‌عنوان فایل منبع واردات استفاده شود. +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/fa_IR/suppliers.lang b/htdocs/langs/fa_IR/suppliers.lang index 6bd62edc318..d4e1e96be7c 100644 --- a/htdocs/langs/fa_IR/suppliers.lang +++ b/htdocs/langs/fa_IR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=فروشندگان SuppliersInvoice=صورت‌حساب فروشنده +SupplierInvoices=صورت‌حساب فروشندگان ShowSupplierInvoice=نمایش صورت‌حساب فروشنده NewSupplier=فروشندۀ جدید History=سابقه diff --git a/htdocs/langs/fa_IR/ticket.lang b/htdocs/langs/fa_IR/ticket.lang index 8f525262ab5..7a7e7755a33 100644 --- a/htdocs/langs/fa_IR/ticket.lang +++ b/htdocs/langs/fa_IR/ticket.lang @@ -70,6 +70,8 @@ Deleted=حذف شده # Dict Type=نوع Severity=حساسیت +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=برای ارسال رایانامه از برگۀ پیا @@ -114,8 +116,8 @@ TicketsShowModuleLogo=نمایش نماد واحد، در رابط عمومی TicketsShowModuleLogoHelp=این گزینه را برای پنهان کردن نماد واحد در صفحات رابط عمومی استفاده کنید TicketsShowCompanyLogo=نمایش نماد شرکت در رابط عمومی TicketsShowCompanyLogoHelp=این گزینه را برای پنعان کردن نماد شرکت اصلی در صفحات رابط عمومی استفاده کنید -TicketsEmailAlsoSendToMainAddress=همچنین ارسال رایانامه به نشانی‌رایانامۀ اصلی -TicketsEmailAlsoSendToMainAddressHelp=این گزینه را فعال کنید تا یک رایانامه به نشانی "ارسال آگاهی‌رسانی از" فرستاده شود (تنظیمات زیر را ببینید) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=محدود کردن نمایش برگۀ‌پشتیبانی به کاربر فعلی (برای کاربران خارجی مؤثر نیست، همواره محدود به شخص‌سومی که بدان مربوطند دارد) TicketsLimitViewAssignedOnlyHelp=تنها برگه‌هائی که به کاربر فعلی نسبت داده شده است قابل رؤیت است. این شامل کاربرانی که مجوزهای مدیریت برگه‌های پشتیبانی را دارند نمی‌شود. TicketsActivatePublicInterface=فعال کردن رابط عمومی @@ -126,10 +128,10 @@ TicketNumberingModules=واحد شماره‌دهی برگه‌های پشتیب TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=اطلاع‌رسانی به شخص‌سوم در هنگام ساخت TicketsDisableCustomerEmail=همواره در هنگامی که یک برگۀ‌پشتیبانی از طریق رابط عمومی ساخته می‌شود، قابلیت رایانامه غیرفعال شود -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=آخرین برگه‌های ویرایش شده BoxLastModifiedTicketDescription=آخرین %s برگۀ‌پشتیبانی ویرایش شده BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=هیچ برگۀپشتیبانی ویرایش نشده شد +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/fa_IR/users.lang b/htdocs/langs/fa_IR/users.lang index 72e544afadd..2140aa7a6f4 100644 --- a/htdocs/langs/fa_IR/users.lang +++ b/htdocs/langs/fa_IR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=پاک کردن از گروه PasswordChangedAndSentTo=گذرواژه تغییر یافت و به <b>%s</b> ارسال شد. PasswordChangeRequest=درخواست تغییر گذرواژۀ برای <b>%s</b> PasswordChangeRequestSent=درخواست تغییر گذرواژه برای <b>%s</b> به <b>%s</b> ارسال شد +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=تائید بازنشانی گذرواژه MenuUsersAndGroups=کاربران و گروهها LastGroupsCreated=آخرین %s گروه ساخته شده @@ -70,9 +72,10 @@ ExportDataset_user_1=کاربران و مشخصات آنها DomainUser=کاربر دامنه %s Reactivate=دوباره فعال کردن CreateInternalUserDesc=این برگه به شما امکان ایجاد یک کاربر داخلی در شرکت/مؤسسۀ شما را می‌دهد. برای ساخت یک کاربر خارجی (مشتری، فروشنده، غیره) از گزینۀ "ساخت کاربر Dolibarr" از برگۀ تماس شخص سوم وی اقدام نمائید. -InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=اجازه‌ها اعطا شده زیرا از یک گروه‌کاربری ارث‌گرفته شده است Inherited=ارث‌گرفته +UserWillBe=Created user will be UserWillBeInternalUser=کاربری که ایجاد می‌شود یک کاربر داخلی خواهد بود (زیرا به یک شخص‌سوم معین پیوند نشده است) UserWillBeExternalUser=کاربری که ایجاد می‌شود یک کاربر خارجی خواهد بود (زیرا به یک شخص‌سوم معین پیوند شده است) IdPhoneCaller=شناسۀ تماس‌گیرنده تلفن @@ -109,8 +112,10 @@ UserAccountancyCode=کد حساب‌داری کاربر UserLogoff=خروج کاربر UserLogged=کاربر وارد شده DateOfEmployment=Employment date -DateEmployment=تاریخ شروع استخدام +DateEmployment=Employment +DateEmploymentstart=تاریخ شروع استخدام DateEmploymentEnd=تاریخ پایان استخدام +RangeOfLoginValidity=Date range of login validity CantDisableYourself=شما نمی‌توانید ردیف کاربری خود را غیرفعال کنید ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator diff --git a/htdocs/langs/fa_IR/website.lang b/htdocs/langs/fa_IR/website.lang index 5c5a464d39c..74d725122d7 100644 --- a/htdocs/langs/fa_IR/website.lang +++ b/htdocs/langs/fa_IR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=خواندن WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/fa_IR/zapier.lang b/htdocs/langs/fa_IR/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/fa_IR/zapier.lang +++ b/htdocs/langs/fa_IR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/fi_FI/accountancy.lang b/htdocs/langs/fi_FI/accountancy.lang index 9b30fe43792..6d5d6b0a422 100644 --- a/htdocs/langs/fi_FI/accountancy.lang +++ b/htdocs/langs/fi_FI/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Sitoa @@ -209,7 +209,7 @@ Codejournal=Päiväkirja JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 1eda1356201..75c9a3b2f22 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Poista yhteyksien esto YourSession=Istuntosi Sessions=Käyttäjien istunnot WebUserGroup=Web-palvelimen käyttäjä / ryhmä +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Verkon juurihakemiston tiedostojen käyttöoikeudet PermissionsOnFile=Tiedoston %s käyttöoikeudet NoSessionFound=PHP:n asetukset estävät aktiivisten istuntojen listaamisen. Istuntojen tallennushakemisto (<b>%s</b>) voi olla suojattu (Käyttöjärjestelmäoikeudet tai PHP: n open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Huomaa: kyllä on tehokas vain, jos <b>moduuli %s</b> on käytö RemoveLock=Mahdollistaaksesi Päivitys-/Asennustyökalun käytön, poista/nimeä uudelleen tarvittaessa tiedosto <b>%s</b> RestoreLock=Palauta tiedosto <b>%s</b> vain lukuoikeuksin. Tämä estää myöhemmän Päivitys-/Asennustyökalun käytön SecuritySetup=Turvallisuusasetukset +PHPSetup=PHP setup SecurityFilesDesc=Määritä tänne tiedostojen siirtämiseen palvelimelle liittyvät turvallisuusasetukset ErrorModuleRequirePHPVersion=Virhe, tämä moduuli vaatii PHP version %s tai uudemman ErrorModuleRequireDolibarrVersion=Virhe, tämä moduuli vaatii Dolibarr: in version %s tai uudemman @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Pääkäyttäjien toiminnot. Valitse valikosta haluttu omina Purge=Poista PurgeAreaDesc=Tällä sivulla voit poistaa kaikki Dolibarrin luomat tai tallentamat tiedostot (väliaikaiset tiedostot tai kaikki tiedostot hakemistossa <b> %s </b>). Tämän ominaisuuden käyttäminen ei yleensä ole tarpeen. Se on kiertotapa käyttäjille, joiden Dolibarria isännöi palveluntarjoaja, joka ei tarjoa oikeuksia poistaa verkkopalvelimen luomia tiedostoja. PurgeDeleteLogFile=Poista lokitiedostot, mukaan lukien <b> %s </b>, joka on määritetty Syslog-moduulille (ei vaaraa menettää tietoja) -PurgeDeleteTemporaryFiles=Poista kaikki loki- ja väliaikaiset tiedostot (ei vaaraa menettää tietoja). Huomaa: Väliaikaiset tiedostot poistetaan vain, jos temp-hakemisto luotiin yli 24 tuntia sitten. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Poista loki ja väliaikaiset tiedostot PurgeDeleteAllFilesInDocumentsDir=Poista kaikki tiedostot hakemistosta: <b> %s </b>. <br> Tämä poistaa kaikki luodut asiakirjat, jotka liittyvät elementteihin (kolmannet osapuolet, laskut jne.), ECM-moduuliin ladatut tiedostot, tietokannan varmuuskopiot ja väliaikaiset tiedostot. PurgeRunNow=Siivoa nyt @@ -232,6 +234,7 @@ BoxesAvailable=Widgetit saatavilla BoxesActivated=Widget aktivoitu ActivateOn=Aktivoi ActiveOn=Aktivoitu +ActivatableOn=Activatable on SourceFile=Lähdetiedosto AvailableOnlyIfJavascriptAndAjaxNotDisabled=Käytettävissä vain, jos JavaScript käytössä Required=Vaadittu @@ -347,9 +350,10 @@ LastActivationAuthor=Viimeisin taho, joka on suorittanut aktivoinnin LastActivationIP=Viimeinen aktiivinen IP UpdateServerOffline=Palvelimen offline-päivitys WithCounter=Laskurin hallinta -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Kaikki muut merkit ja maski pysyy ennallaan. <br> Välilyönnit eivät ole sallittuja. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Esimerkki kolmannen osapuolen luotu 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Esimerkiksi tuotteille luotu 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Jos jätät tämän kentän tyhjäksi, tämä arvo t ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=Arvoluettelon on oltava rivejä, joissa on muoto: avain,arvo (missä avain ei voi olla 0) <br> <br> esimerkiksi: <br> 1,arvo1 <br> 2,arvo2 <br> 3,arvo3 <br> ... ExtrafieldParamHelpradio=Arvoluettelon on oltava rivejä, joissa on muoto: avain,arvo (missä avain ei voi olla 0) <br> <br> esimerkiksi: <br> 1,arvo1 <br> 2,arvo2 <br> 3,arvo3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Käytettävä kirjasto PDF:n luomiseen @@ -469,7 +473,7 @@ EraseAllCurrentBarCode=Poista kaikki nykyiset viivakoodi arvot ConfirmEraseAllCurrentBarCode=Haluatko varmasti poistaa kaikki nykyiset viivakoodiarvot? AllBarcodeReset=Kaikki viivakoodi arvot on poistettu NoBarcodeNumberingTemplateDefined=Viivakoodimallin numerointia ei ole otettu käyttöön viivakoodimoduulin asetuksissa. -EnableFileCache=Enable file cache +EnableFileCache=Ota tiedostojen välimuisti käyttöön ShowDetailsInPDFPageFoot=Lisää alatunnisteeseen lisätietoja, kuten yrityksen osoite tai esimiehen nimi (ammattitunnusten, yrityksen pääoman ja ALV-numeron lisäksi). NoDetails=Alatunnisteessa ei ole lisätietoja DisplayCompanyInfo=Näytä yrityksen osoitetiedot @@ -541,6 +545,8 @@ Module40Name=Toimittajat Module40Desc=Toimittajien ja ostojen hallinta (ostotilaukset ja toimittajien laskutus) Module42Name=Debug Logit Module42Desc=Kirjaustoiminnot (tiedosto, syslog, ...). Tällaiset lokit ovat teknisiä/virheenkorjaustarkoituksia varten. +Module43Name=Virheenkorjauspalkki +Module43Desc=Työkalu kehittäjälle, joka lisää virheenkorjauspalkin selaimeesi. Module49Name=Toimitus Module49Desc=Editors' hallinta Module50Name=Tuotteet @@ -594,16 +600,16 @@ Module400Desc=Management of projects, leads/opportunities and/or tasks. You can Module410Name=Webcalendar Module410Desc=Webcalendar yhdentyminen Module500Name=Verot ja erityiskustannukset -Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...) +Module500Desc=Muiden kulujen hallinta (myyntiverot, sosiaaliverot tai pääomaverot, osingot jne.) Module510Name=Palkat -Module510Desc=Record and track employee payments +Module510Desc=Kirjaa ja seuraa työntekijöiden maksuja Module520Name=Lainat Module520Desc=Lainojen hallinnointi Module600Name=Notifications on business event Module600Desc=Send email notifications triggered by a business event: per user (setup defined on each user), per third-party contacts (setup defined on each third party) or by specific emails Module600Long=Note that this module sends emails in real-time when a specific business event occurs. If you are looking for a feature to send email reminders for agenda events, go into the setup of module Agenda. Module610Name=Tuotevaihtoehdot -Module610Desc=Creation of product variants (color, size etc.) +Module610Desc=Tuotevaihtoehtojen luominen (väri, koko jne.) Module700Name=Lahjoitukset Module700Desc=Lahjoituksien hallinnointi Module770Name=Kuluraportit @@ -623,28 +629,30 @@ Module2200Desc=Use maths expressions for auto-generation of prices Module2300Name=Ajastetut työt Module2300Desc=Ajastettujen töiden hallinnointi (alias cron or chrono table) Module2400Name=Events/Agenda -Module2400Desc=Track events. Log automatic events for tracking purposes or record manual events or meetings. This is the principal module for good Customer or Vendor Relationship Management. +Module2400Desc=Seuraa tapahtumia. Kirjaa automaattiset tapahtumat seurantatarkoituksiin tai tallenna manuaaliset tapahtumat tai kokoukset. Tämä on tärkein asiakas- tai toimittajasuhteiden hallinnan moduuli. Module2500Name=DMS / ECM -Module2500Desc=Document Management System / Electronic Content Management. Automatic organization of your generated or stored documents. Share them when you need. +Module2500Desc=Asiakirjojen hallintajärjestelmä / elektroninen sisällönhallinta. Luomiesi tai tallennettujen asiakirjojesi automaattinen järjestäminen. Jaa ne tarvittaessa. Module2600Name=API / verkkopalvelut (SOAP-palvelin) Module2600Desc=Ota käyttöön Dolibarr SOAP -palvelin, joka tarjoaa API-palveluita Module2610Name=API / verkkopalvelut (REST-palvelin) Module2610Desc=Ota käyttöön API-palveluita tarjoava Dolibarr REST -palvelin Module2660Name=Kutsu verkkopalveluita (SOAP-asiakas) -Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Only Purchase orders are currently supported.) +Module2660Desc=Ota käyttöön Dolibarr-verkkopalvelusovellus (voidaan käyttää tietojen / pyyntöjen siirtämiseen ulkoisille palvelimille. Vain ostotilauksia tuetaan tällä hetkellä.) Module2700Name=Gravatar Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Needs Internet access Module2800Desc=FTP Ohjelma Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind tulokset valmiuksia -Module3200Name=Unalterable Archives +Module3200Name=Muuttamattomat arkistot Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Sosiaaliset verkostot +Module3400Desc=Ota sosiaalisten verkostojen kentät käyttöön kolmansille osapuolille ja osoitteille (skype, twitter, facebook, ...). Module4000Name=Henkilöstöhallinta -Module4000Desc=Human resources management (management of department, employee contracts and feelings) +Module4000Desc=Henkilöstöjohtaminen (osaston hallinta, työsuhteet ja tunteet) Module5000Name=Multi-yhtiö Module5000Desc=Avulla voit hallita useita yrityksiä -Module6000Name=Työtehtävät -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Nettisivut 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. Module20000Name=Poissaolopyyntöjen hallinta @@ -679,7 +687,7 @@ Module63000Name=Resurssit Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events Permission11=Lue laskut Permission12=Luo laskut -Permission13=Invalidate customer invoices +Permission13=Mitätöi asiakaslaskut Permission14=Vahvistetut laskut Permission15=Lähetä laskut sähköpostilla Permission16=Luo maksut laskuille @@ -696,7 +704,7 @@ Permission32=Luoda / muuttaa tuotetta / palvelua Permission34=Poista tuotteita / palveluita Permission36=Vienti tuotteet / palvelut Permission38=Vie tuotteita -Permission39=Ignore minimum price +Permission39=Ohita vähimmäishinta 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) @@ -711,7 +719,7 @@ Permission70=Invalidate interventions Permission71=Lue jäseniä Permission72=Luoda / muuttaa jäsenten Permission74=Poista jäseniä -Permission75=Setup types of membership +Permission75=Määritä jäsenyystyypit Permission76=Vie dataa Permission78=Lue tilauksia Permission79=Luoda / muuttaa tilaukset @@ -805,7 +813,8 @@ PermissionAdvanced253=Luo / muokkaa sisäiset / ulkoiset käyttäjät ja käytt Permission254=Poista tai poistaa muiden käyttäjien Permission255=Muokkaa käyttäjien salasanoja Permission256=Poista käyttäjiä -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Lue CA Permission272=Lue laskut Permission273=Laskutuksen @@ -911,8 +920,8 @@ Permission1232=Luo/Muokkaa toimittajien laskuja Permission1233=Vahvista myyjän laskut Permission1234=Poista toimittajien laskuja Permission1235=Lähetä toimittajien laskut sähköpostilla -Permission1236=Export vendor invoices, attributes and payments -Permission1237=Export purchase orders and their details +Permission1236=Vie toimittajan laskut, määritteet ja maksut +Permission1237=Vie ostotilaukset ja niiden tiedot Permission1251=Suorita massa tuonnin ulkoisten tiedot tietokantaan (tiedot kuormitus) Permission1321=Vienti asiakkaan laskut, ominaisuudet ja maksut Permission1322=Avaa uudelleen maksettu lasku @@ -994,11 +1003,11 @@ Permission941603=Vahvista kuitit Permission941604=Lähetä kuitit sähköpostitse Permission941605=Vie kuitit Permission941606=Poista kuitit -DictionaryCompanyType=Third-party types +DictionaryCompanyType=Kolmannen osapuolen tyypit DictionaryCompanyJuridicalType=Third-party legal entities DictionaryProspectLevel=Prospect potential level for companies DictionaryProspectContactLevel=Prospect potential level for contacts -DictionaryCanton=States/Provinces +DictionaryCanton=Osavaltiot / provinssit DictionaryRegion=Alueiden DictionaryCountry=Maat DictionaryCurrency=Valuutat @@ -1006,9 +1015,9 @@ DictionaryCivility=Honorific titles DictionaryActions=Types of agenda events DictionarySocialContributions=Types of social or fiscal taxes DictionaryVAT=ALV- ja Myyntiveroprosentit -DictionaryRevenueStamp=Amount of tax stamps +DictionaryRevenueStamp=Veroleimojen määrä DictionaryPaymentConditions=Maksuehdot -DictionaryPaymentModes=Payment Modes +DictionaryPaymentModes=Maksutavat DictionaryTypeContact=Yhteystiedot tyypit DictionaryTypeOfContainer=Website - Type of website pages/containers DictionaryEcotaxe=Ympäristöveron (WEEE) @@ -1020,7 +1029,7 @@ DictionaryStaff=Työntekijöiden lukumäärä DictionaryAvailability=Toimituksen viivästyminen DictionaryOrderMethods=Tilaaminen menetelmät DictionarySource=Alkuperä ehdotusten / tilaukset -DictionaryAccountancyCategory=Personalized groups for reports +DictionaryAccountancyCategory=Räätälöidyt ryhmät raportteja varten DictionaryAccountancysystem=Models for chart of accounts DictionaryAccountancyJournal=Kirjanpitotilityypit DictionaryEMailTemplates=Mallisähköpostit @@ -1031,32 +1040,32 @@ DictionaryProspectStatus=Prospect status for companies DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Vapaan tyyppi DictionaryOpportunityStatus=Lead status for project/lead -DictionaryExpenseTaxCat=Expense report - Transportation categories -DictionaryExpenseTaxRange=Expense report - Range by transportation category +DictionaryExpenseTaxCat=Kuluraportti - Kuljetuskategoriat +DictionaryExpenseTaxRange=Kuluraportti - alue kuljetusluokittain DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +TypeOfUnit=Yksikön tyyppi SetupSaved=Asetukset tallennettu SetupNotSaved=Asetuksia ei tallennettu -BackToModuleList=Back to Module list +BackToModuleList=Takaisin moduuliluetteloon BackToDictionaryList=Back to Dictionaries list -TypeOfRevenueStamp=Type of tax stamp +TypeOfRevenueStamp=Veroleiman tyyppi VATManagement=Myyntiverojen hallinta VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the Sales Tax rate follows the active standard rule:<br>If the seller is not subject to Sales tax, then Sales tax defaults to 0. End of rule.<br>If the (seller's country = buyer's country), then the Sales tax by default equals the Sales tax of the product in the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to the customs office in their country and not to the seller. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT defaults to the VAT rate of the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.<br>In any other case the proposed default is Sales tax=0. End of rule. -VATIsNotUsedDesc=By default the proposed Sales tax is 0 which can be used for cases like associations, individuals or small companies. +VATIsNotUsedDesc=Oletusarvoisesti ehdotettu myyntivero on 0, jota voidaan käyttää esimerkiksi yhdistyksiin, yksityishenkilöihin tai pieniin yrityksiin. VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. VATIsNotUsedExampleFR=In France, it means associations that are non Sales tax declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (Sales tax in franchise) and paid a franchise Sales tax without any Sales tax declaration. This choice will display the reference "Non applicable Sales tax - art-293B of CGI" on invoices. ##### Local Taxes ##### -TypeOfSaleTaxes=Type of sales tax +TypeOfSaleTaxes=Myyntiveron tyyppi LTRate=Kurssi LocalTax1IsNotUsed=Älä käytä toista veroa -LocalTax1IsUsedDesc=Use a second type of tax (other than first one) -LocalTax1IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax1IsUsedDesc=Käytä toista verotyyppiä (muuta kuin ensimmäistä) +LocalTax1IsNotUsedDesc=Älä käytä muuta verotyyppiä (muuta kuin ensimmäistä) LocalTax1Management=Toisen tyyppinen vero LocalTax1IsUsedExample= LocalTax1IsNotUsedExample= LocalTax2IsNotUsed=Älä käytä kolmatta veroa -LocalTax2IsUsedDesc=Use a third type of tax (other than first one) -LocalTax2IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax2IsUsedDesc=Käytä kolmatta verotyyppiä (muu kuin ensimmäinen) +LocalTax2IsNotUsedDesc=Älä käytä muuta verotyyppiä (muuta kuin ensimmäistä) LocalTax2Management=Kolmannen tyypin vero LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= @@ -1071,7 +1080,7 @@ LocalTax2IsNotUsedDescES=Oletuksena ehdotettu IRPF on 0. Loppu sääntö. LocalTax2IsUsedExampleES=Espanjassa, freelancer ja itsenäisten ammatinharjoittajien, jotka tarjoavat palveluja ja yrityksiä, jotka ovat valinneet verojärjestelmän moduuleja. LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. 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 +UseRevenueStamp=Käytä veroleimaa UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) CalcLocaltax=Raportit paikallisista veroista CalcLocaltax1=Myynnit - Ostot @@ -1085,7 +1094,7 @@ LabelUsedByDefault=Label käyttää oletusarvoisesti, jos ei ole käännös löy LabelOnDocuments=Label asiakirjoihin LabelOrTranslationKey=Label or translation key ValueOfConstantKey=Value of a configuration constant -ConstantIsOn=Option %s is on +ConstantIsOn=Vaihtoehto %s on päällä NbOfDays=Päivien lukumäärä AtEndOfMonth=Kuukauden lopussa CurrentNext=Nykyinen / Seuraava @@ -1143,7 +1152,7 @@ CompanyCurrency=Valuutta CompanyObject=Yrityksen toimiala IDCountry=Maan tunnus Logo=Logo -LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) +LogoDesc=Yrityksen päälogo. Käytetään luotuihin asiakirjoihin (PDF, ...) LogoSquarred=Logo LogoSquarredDesc=Täytyy olla neliön mallinnen(leveys=korkeus). Sitä voidaan käyttää esim. valikkorivillä DoNotSuggestPaymentMode=Eivät viittaa siihen, @@ -1159,14 +1168,14 @@ Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Projektia ei suljettu ajoissa Delays_MAIN_DELAY_TASKS_TODO=Suunniteltuja tehtäviä tekemättä Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Tilausta ei ole käsitelty Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Ostotilausta ei ole käsitelty -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Proposal not closed -Delays_MAIN_DELAY_PROPALS_TO_BILL=Proposal not billed -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Service to activate -Delays_MAIN_DELAY_RUNNING_SERVICES=Expired service +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Ehdotusta ei suljettu +Delays_MAIN_DELAY_PROPALS_TO_BILL=Ehdotusta ei laskutettu +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Aktivoitava palvelu +Delays_MAIN_DELAY_RUNNING_SERVICES=Vanhentunut palvelu Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Avoin ostovelka Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Avoin myyntisaaminen Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Pending bank reconciliation -Delays_MAIN_DELAY_MEMBERS=Delayed membership fee +Delays_MAIN_DELAY_MEMBERS=Viivästynyt jäsenmaksu Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done Delays_MAIN_DELAY_EXPENSEREPORTS=Hyväksyttävissä olevat kuluraportit Delays_MAIN_DELAY_HOLIDAYS=Hyväksyttävissä olevat vapaa-anomukset @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security Audit tapahtumat +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Auditointi InfoDolibarr=Tietoja Dolibarrista InfoBrowser=Tietoja selaimesta @@ -1183,8 +1193,8 @@ InfoOS=Tietoja OS InfoWebServer=Tietoja Netti Serveristä InfoDatabase=Tietoja Tietokannasta InfoPHP=Tietoja PHP -InfoPerf=About Performances -InfoSecurity=About Security +InfoPerf=Tietoja suorituskyvystä +InfoSecurity=Tietoja turvallisuudesta BrowserName=Selaimen nimi BrowserOS=Selaimen OS ListOfSecurityEvents=Luettelo Dolibarr turvallisuus tapahtumat @@ -1208,8 +1218,8 @@ TriggerDisabledByName=Käynnistäjät tässä tiedosto on poistettu, <b>joita-NO TriggerDisabledAsModuleDisabled=Käynnistäjät tähän tiedostoon pois päältä kuin <b>moduuli %s</b> on poistettu käytöstä. TriggerAlwaysActive=Käynnistäjät tässä tiedosto on aina aktiivinen, mikä on aktivoitu Dolibarr moduulit. TriggerActiveAsModuleActive=Käynnistäjät tähän tiedostoon ovat aktiivisia <b>moduuli %s</b> on käytössä. -GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. -DictionaryDesc=Insert all reference data. You can add your values to the default. +GeneratedPasswordDesc=Valitse menetelmä, jota käytetään automaattisesti luotuihin salasanoihin. +DictionaryDesc=Lisää kaikki viitetiedot. Voit lisätä omia arvoja oletusarvoon. ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. MiscellaneousDesc=Kaikki turvallisuuteen liittyvät parametrit määritetään täällä. LimitsSetup=Rajat / Tarkkuus @@ -1243,43 +1253,43 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Sinun on suoritettava tämä komento komentoriviltä jälkeen kirjautua kuori käyttäjän <b>%s.</b> YourPHPDoesNotHaveSSLSupport=SSL toimintoja ei saatavilla PHP DownloadMoreSkins=Lisää nahat ladata -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Osittainen käännös -MAIN_DISABLE_METEO=Disable meteorological view +MAIN_DISABLE_METEO=Poista meteorologinen näkymä käytöstä MeteoStdMod=Standardi tila MeteoStdModEnabled=Standardi tila aktivoitu MeteoPercentageMod=Prosenttitila MeteoPercentageModEnabled=Prosenttitila käytössä MeteoUseMod=Klikkaa käyttääksesi %s TestLoginToAPI=Testikirjautuminen -ProxyDesc=Some features of Dolibarr require internet access. Define here the internet connection parameters such as access through a proxy server if necessary. +ProxyDesc=Jotkin Dolibarrin ominaisuudet edellyttävät internetyhteyttä. Määritä tässä Internet-yhteysparametrit, kuten pääsy välityspalvelimen kautta tarvittaessa. ExternalAccess=Ulkoinen / sisäinen pääsy MAIN_PROXY_USE=Käytä välityspalvelinta (muuten yhteys on suoraan Internetiin) MAIN_PROXY_HOST=Proxy-palvelin: Nimi/Osoite MAIN_PROXY_PORT=Proxy-palvelin: Portti MAIN_PROXY_USER=Proxy-palvelin: Käyttäjätunnus MAIN_PROXY_PASS=Proxy-palvelin: Salasana -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Täydentävät ominaisuudet -ExtraFieldsLines=Complementary attributes (lines) -ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) -ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) -ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) -ExtraFieldsThirdParties=Complementary attributes (third party) -ExtraFieldsContacts=Complementary attributes (contacts/address) -ExtraFieldsMember=Complementary attributes (member) -ExtraFieldsMemberType=Complementary attributes (member type) -ExtraFieldsCustomerInvoices=Complementary attributes (invoices) -ExtraFieldsCustomerInvoicesRec=Complementary attributes (templates invoices) -ExtraFieldsSupplierOrders=Complementary attributes (orders) -ExtraFieldsSupplierInvoices=Complementary attributes (invoices) -ExtraFieldsProject=Complementary attributes (projects) -ExtraFieldsProjectTask=Complementary attributes (tasks) -ExtraFieldsSalaries=Complementary attributes (salaries) -ExtraFieldHasWrongValue=Attribute %s has a wrong value. -AlphaNumOnlyLowerCharsAndNoSpace=only alphanumericals and lower case characters without space +ExtraFieldsLines=Täydentävät määritteet (rivit) +ExtraFieldsLinesRec=Täydentävät määritteet (mallilaskurivit) +ExtraFieldsSupplierOrdersLines=Täydentävät määritteet (tilausrivit) +ExtraFieldsSupplierInvoicesLines=Täydentävät määritteet (laskurivit) +ExtraFieldsThirdParties=Täydentävät määritteet (kolmas osapuoli) +ExtraFieldsContacts=Täydentävät määritteet (yhteystiedot / osoite) +ExtraFieldsMember=Täydentävät määritteet (jäsen) +ExtraFieldsMemberType=Täydentävät määritteet (jäsenen tyyppi) +ExtraFieldsCustomerInvoices=Täydentävät määritteet (laskut) +ExtraFieldsCustomerInvoicesRec=Täydentävät määritteet (laskujen mallit) +ExtraFieldsSupplierOrders=Täydentävät määritteet (tilaukset) +ExtraFieldsSupplierInvoices=Täydentävät määritteet (laskut) +ExtraFieldsProject=Täydentävät määritteet (projektit) +ExtraFieldsProjectTask=Täydentävät määritteet (tehtävät) +ExtraFieldsSalaries=Täydentävät määritteet (palkat) +ExtraFieldHasWrongValue=Attribuutilla %s on väärä arvo. +AlphaNumOnlyLowerCharsAndNoSpace=vain aakkosnumeeriset ja pienet kirjaimet ilman välilyöntiä SendmailOptionNotComplete=Varoitus, joissakin Linux-järjestelmissä, lähettää sähköpostia sähköpostisi, sendmail toteuttaminen setup on conatins optio-ba (parametri mail.force_extra_parameters tulee php.ini tiedosto). Jos jotkut vastaanottajat eivät koskaan vastaanottaa sähköposteja, yrittää muokata tätä PHP parametrin mail.force_extra_parameters =-ba). PathToDocuments=Polku asiakirjoihin PathDirectory=Hakemisto @@ -1317,9 +1327,9 @@ PreloadOPCode=Esiladattua OPCode-koodia käytetään AddRefInList=Display Customer/Vendor ref. info list (select list or combobox) and most of hyperlink.<br>Third Parties will appear with a name format of "CC12345 - SC45678 - The Big Company corp." instead of "The Big Company corp". AddAdressInList=Display Customer/Vendor adress info list (select list or combobox)<br>Third Parties will appear with a name format of "The Big Company corp. - 21 jump street 123456 Big town - USA" instead of "The Big Company corp". AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)<br>Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand". -AskForPreferredShippingMethod=Ask for preferred shipping method for Third Parties. +AskForPreferredShippingMethod=Kysy ensisijaista lähetystapaa kolmansille osapuolille. FieldEdition=Alalla painos %s -FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) +FillThisOnlyIfRequired=Esimerkki: +2 (täytä vain, jos aikavyöhykkeen siirtymäongelmia esiintyy) GetBarCode=Hanki viivakoodi NumberingModules=Numerointimallit DocumentModules=Asiakirjamallit @@ -1330,8 +1340,8 @@ PasswordGenerationPerso=Palauta salasana henkilökohtaisesti määrittämäsi ko SetupPerso=Kokoonpanosi mukaan PasswordPatternDesc=Password pattern description ##### Users setup ##### -RuleForGeneratedPasswords=Rules to generate and validate passwords -DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page +RuleForGeneratedPasswords=Säännöt salasanojen luomiseen ja vahvistamiseen +DisableForgetPasswordLinkOnLogonPage=Älä näytä "Unohtunut salasana" -linkkiä kirjautumissivulla UsersSetup=Käyttäjät moduuli setup UserMailRequired=Uuden käyttäjän luomiseen tarvitaan sähköposti UserHideInactive=Piilota passiiviset käyttäjät kaikista yhdistelmäluetteloista (ei suositella: tämä voi tarkoittaa, että et voi suodattaa tai etsiä vanhoja käyttäjiä joillakin sivuilla) @@ -1341,8 +1351,8 @@ GroupsDocModules=Document templates for documents generated from a group record HRMSetup=Henkilöstöhallinta moduulin asetukset ##### Company setup ##### CompanySetup=Yritykset moduulin asetukset -CompanyCodeChecker=Options for automatic generation of customer/vendor codes -AccountCodeManager=Options for automatic generation of customer/vendor accounting codes +CompanyCodeChecker=Vaihtoehdot asiakas- / toimittajakoodien automaattiseen luomiseen +AccountCodeManager=Vaihtoehdot asiakkaan / toimittajan kirjanpitokoodien automaattiseen luomiseen NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.<br>Recipients of notifications can be defined: NotificationsDescUser=* käyttäjää kohden, yksi käyttäjä kerrallaan. NotificationsDescContact=* kolmansien osapuolten yhteystietoja (asiakkaita tai toimittajia) kohti, yksi yhteyshenkilö kerrallaan. @@ -1353,9 +1363,9 @@ WatermarkOnDraft=Vesileima asiakirjaluonnos JSOnPaimentBill=Aktivoi ominaisuus maksurivien automaattiseen täyttämiseen maksulomakkeella CompanyIdProfChecker=Rules for Professional IDs MustBeUnique=Täytyy olla uniikki? -MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ? -MustBeInvoiceMandatory=Mandatory to validate invoices? -TechnicalServicesProvided=Technical services provided +MustBeMandatory=Pakollinen kolmansien osapuolten luominen (jos alv-numero tai yritystyyppi on määritelty)? +MustBeInvoiceMandatory=Pakollinen laskujen vahvistaminen? +TechnicalServicesProvided=Tarjotut tekniset palvelut #####DAV ##### WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access. WebDavServer=Root URL of %s server: %s @@ -1366,14 +1376,14 @@ BillsSetup=Laskut-moduulin asetukset BillsNumberingModule=Laskut ja hyvityslaskut numerointiin moduuli BillsPDFModules=Laskun asiakirjojen malleja BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type -PaymentsPDFModules=Payment documents models +PaymentsPDFModules=Maksutositteiden mallit ForceInvoiceDate=Force laskun päivämäärästä validointiin päivämäärä -SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice -SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account -SuggestPaymentByChequeToAddress=Suggest payment by check to +SuggestedPaymentModesIfNotDefinedInInvoice=Ehdotettu maksutapa laskussa oletuksena, jos sitä ei ole määritelty laskussa +SuggestPaymentByRIBOnAccount=Ehdota maksua tilisiirtona +SuggestPaymentByChequeToAddress=Ehdota maksua sekillä FreeLegalTextOnInvoices=Laskun viesti WatermarkOnDraftInvoices=Watermark on draft invoices (none if empty) -PaymentsNumberingModule=Payments numbering model +PaymentsNumberingModule=Maksujen numerointimalli SuppliersPayment=Toimittajien maksut SupplierPaymentSetup=Toimittajamaksujen asetukset ##### Proposals ##### @@ -1390,19 +1400,19 @@ SupplierProposalNumberingModules=Price requests suppliers numbering models SupplierProposalPDFModules=Price requests suppliers documents models FreeLegalTextOnSupplierProposal=Free text on price requests suppliers WatermarkOnDraftSupplierProposal=Watermark on draft price requests suppliers (none if empty) -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Ask for bank account destination of price request +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Kysy hintapyynnön pankkitilin kohde WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Pyydä lähdevarasto tilaukselle ##### Suppliers Orders ##### -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Kysy ostotilauksen pankkitilin kohde ##### Orders ##### -SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order -OrdersSetup=Sales Orders management setup +SuggestedPaymentModesIfNotDefinedInOrder=Ehdotettu maksutila myyntitilauksessa oletusarvoisesti, jos sitä ei ole määritetty tilauksessa +OrdersSetup=Myyntitilausten hallinnan määritys OrdersNumberingModules=Tilaukset numerointiin modules OrdersModelModule=Tilaa asiakirjojen malleja FreeLegalTextOnOrders=Vapaa tekstihaku tilauksissa WatermarkOnDraftOrders=Watermark on draft orders (none if empty) -ShippableOrderIconInList=Add an icon in Orders list which indicate if order is shippable -BANK_ASK_PAYMENT_BANK_DURING_ORDER=Ask for bank account destination of order +ShippableOrderIconInList=Lisää Tilaukset-luetteloon kuvake, joka ilmoittaa, voidaanko tilaus toimittaa +BANK_ASK_PAYMENT_BANK_DURING_ORDER=Kysy tilauksen pankkitilin kohde ##### Interventions ##### InterventionsSetup=Interventions moduulin asetukset FreeLegalTextOnInterventions=Vapaa teksti interventio asiakirjojen @@ -1410,18 +1420,18 @@ FicheinterNumberingModules=Väliintulo numerointiin modules TemplatePDFInterventions=Väliintulo kortin asiakirjojen malleja WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty) ##### Contracts ##### -ContractsSetup=Contracts/Subscriptions module setup +ContractsSetup=Sopimukset / Tilaukset-moduulin asetukset ContractsNumberingModules=Sopimukset numerointi moduulit TemplatePDFContracts=Sopimuspohjat FreeLegalTextOnContracts=Vapaa sana sopimuksissa -WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) +WatermarkOnDraftContractCards=Vesileima sopimusluonnoksissa (ei käytössä jos jätetään tyhjäksi) ##### Members ##### MembersSetup=Jäsenet moduulin asetukset MemberMainOptions=Päävaihtoehtoa AdherentLoginRequired= Hallitse Sisään jokaiselle jäsenelle -AdherentMailRequired=Email required to create a new member +AdherentMailRequired=Uuden jäsenen luomiseen vaaditaan sähköpostiosoite MemberSendInformationByMailByDefault=Checkbox lähettää vahvistusviestin jäsenille on oletusarvoisesti -VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes +VisitorCanChooseItsPaymentMode=Vierailija voi valita käytettävissä olevista maksutavoista MEMBER_REMINDER_EMAIL=Enable automatic reminder <b>by email</b> of expired subscriptions. Note: Module <strong>%s</strong> must be enabled and correctly setup to send reminders. MembersDocModules=Document templates for documents generated from member record ##### LDAP setup ##### @@ -1465,7 +1475,7 @@ LDAPDnContactActive=Yhteystietojen synkronointi LDAPDnContactActiveExample=Aktiivihiili / Unactivated synkronointi LDAPDnMemberActive=Jäsenten synkronointi LDAPDnMemberActiveExample=Aktiivihiili / Unactivated synkronointi -LDAPDnMemberTypeActive=Members types' synchronization +LDAPDnMemberTypeActive=Jäsentyyppien synkronointi LDAPDnMemberTypeActiveExample=Aktiivihiili / Unactivated synkronointi LDAPContactDn=Dolibarr yhteystietosi DN LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=society,dc=Täydellinen DN (ex: ou= yhteystietoja, dc= yhteiskunta, dc= com) @@ -1488,11 +1498,11 @@ LDAPTestSynchroContact=Testaa yhteystietojen synkronointi LDAPTestSynchroUser=Testaa käyttäjien synkronointi LDAPTestSynchroGroup=Testaa ryhmien synkronointi LDAPTestSynchroMember=Testaa jäsenten synkronointi -LDAPTestSynchroMemberType=Test member type synchronization +LDAPTestSynchroMemberType=Testaa jäsentyyppien synkronointi LDAPTestSearch= Testaa LDAP-haku LDAPSynchroOK=Synkronointi testi onnistunut LDAPSynchroKO=Epäonnistui synkronointi testi -LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that the connection to the server is correctly configured and allows LDAP updates +LDAPSynchroKOMayBePermissions=Synkronointitesti epäonnistui. Tarkista, että yhteys palvelimeen on määritetty oikein ja sallii LDAP-päivitykset LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP yhteyden LDAP-palvelin onnistunut (Server= %s, Port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP yhteyden LDAP-palvelimeen ei onnistunut (Server= %s, Port= %s) LDAPBindOK=Connect/Authenticate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Esimerkki: uid LDAPFilterConnection=Hakusuodatin LDAPFilterConnectionExample=Esimerkki: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Esimerkki: samaccountname LDAPFieldFullname=Koko nimi @@ -1520,24 +1531,24 @@ LDAPFieldFirstNameExample=Esimerkki: givenName LDAPFieldMail=Sähköpostiosoite LDAPFieldMailExample=Esimerkki: mail LDAPFieldPhone=Työpuhelin -LDAPFieldPhoneExample=Example: telephonenumber +LDAPFieldPhoneExample=Esimerkki: puhelinnumero LDAPFieldHomePhone=Henkilökohtainen puhelin -LDAPFieldHomePhoneExample=Example: homephone +LDAPFieldHomePhoneExample=Esimerkki: kotipuhelin LDAPFieldMobile=Matkapuhelin -LDAPFieldMobileExample=Example: mobile +LDAPFieldMobileExample=Esimerkki: matkapuhelin LDAPFieldFax=Faksinumero LDAPFieldFaxExample=Example: facsimiletelephonenumber LDAPFieldAddress=Katuosoite -LDAPFieldAddressExample=Example: street +LDAPFieldAddressExample=Esimerkki: katuosoite LDAPFieldZip=Postinumero -LDAPFieldZipExample=Example: postalcode +LDAPFieldZipExample=Esimerkki: postinumero LDAPFieldTown=Kaupunki LDAPFieldTownExample=Example: l LDAPFieldCountry=Maa LDAPFieldDescription=Kuvaus -LDAPFieldDescriptionExample=Example: description -LDAPFieldNotePublic=Public Note -LDAPFieldNotePublicExample=Example: publicnote +LDAPFieldDescriptionExample=Esimerkki: kuvaus +LDAPFieldNotePublic=Julkinen huomautus +LDAPFieldNotePublicExample=Esimerkki: julkinenhuomautus LDAPFieldGroupMembers= Ryhmän jäsenet LDAPFieldGroupMembersExample= Example: uniqueMember LDAPFieldBirthdate=Syntymäaika @@ -1548,9 +1559,9 @@ LDAPFieldSidExample=Example: objectsid LDAPFieldEndLastSubscription=Päiväys merkintää varten LDAPFieldTitle=Asema LDAPFieldTitleExample=Esimerkiksi: titteli -LDAPFieldGroupid=Group id +LDAPFieldGroupid=Ryhmätunnus LDAPFieldGroupidExample=Exemple : gidnumber -LDAPFieldUserid=User id +LDAPFieldUserid=Käyttäjätunnus LDAPFieldUseridExample=Exemple : uidnumber LDAPFieldHomedirectory=Kotihakemisto LDAPFieldHomedirectoryExample=Exemple : homedirectory @@ -1564,11 +1575,11 @@ LDAPDescMembers=Tällä sivulla voit määritellä LDAP attributes nimi LDAP puu LDAPDescMembersTypes=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members types. LDAPDescValues=Esimerkki arvot on suunniteltu <b>OpenLDAP</b> kanssa seuraavat ladattu kaavat: <b>core.schema, cosine.schema, inetorgperson.schema).</b> Jos käytät thoose arvot ja OpenLDAP, muokata LDAP config file <b>slapd.conf</b> on kaikki thoose kaavat ladattu. ForANonAnonymousAccess=Jotta autentikoitu acces (for a kirjoitusoikeuksia esimerkiksi) -PerfDolibarr=Performance setup/optimizing report -YouMayFindPerfAdviceHere=This page provides some checks or advice related to performance. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +PerfDolibarr=Suorituskyvyn määritys / optimointiraportti +YouMayFindPerfAdviceHere=Tällä sivulla on joitain suoritukseen liittyviä tarkastuksia tai neuvoja. +NotInstalled=Ei asennettu. +NotSlowedDownByThis=Ei hidasta tätä. +NotRiskOfLeakWithThis=Ei vuotoriskiä tällä. ApplicativeCache=Applicative cache MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.<br>More information here <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Note that a lot of web hosting provider does not provide such cache server. MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. @@ -1576,13 +1587,13 @@ MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is OPCodeCache=OPCode cache NoOPCodeCacheFound=No OPCode cache found. Maybe you are using an OPCode cache other than XCache or eAccelerator (good), or maybe you don't have OPCode cache (very bad). HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) -FilesOfTypeCached=Files of type %s are cached by HTTP server -FilesOfTypeNotCached=Files of type %s are not cached by HTTP server -FilesOfTypeCompressed=Files of type %s are compressed by HTTP server -FilesOfTypeNotCompressed=Files of type %s are not compressed by HTTP server -CacheByServer=Cache by server +FilesOfTypeCached=HTTP-palvelin tallentaa välimuistiin tyypin %s tiedostot +FilesOfTypeNotCached=HTTP-palvelin ei tallenna välimuistiin tyypin %s tiedostoja +FilesOfTypeCompressed=HTTP-palvelin pakkaa tyypin %s tiedostot +FilesOfTypeNotCompressed=HTTP-palvelin ei pakkaa tyypin %s tiedostoja +CacheByServer=Välimuisti palvelimen mukaan CacheByServerDesc=For example using the Apache directive "ExpiresByType image/gif A2592000" -CacheByClient=Cache by browser +CacheByClient=Välimuisti selaimen mukaan CompressionOfResources=Compression of HTTP responses CompressionOfResourcesDesc=For example using the Apache directive "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers @@ -1597,10 +1608,10 @@ ProductSetup=Tuotteet Moduuli setup ServiceSetup=Services-moduuli asennus ProductServiceSetup=Tuotteet ja palvelut moduulien asennus NumberOfProductShowInSelect=Yhdistelmäluetteloissa näytettävien tuotteiden enimmäismäärä (0 = ei rajoitusta) -ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup) -DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms -OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document -AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product +ViewProductDescInFormAbility=Näytä tuotekuvaukset lomakkeissa (muuten näkyvät työkaluvihjeen ponnahdusikkunassa) +DoNotAddProductDescAtAddLines=Älä lisää tuotekuvausta (tuotekortilta), kun lisäät rivejä lomakkeisiin +OnProductSelectAddProductDesc=Tuotteen kuvauksen käyttäminen, kun lisäät tuotteen asiakirjan riviksi +AutoFillFormFieldBeforeSubmit=Täytä kuvauksen syöttökenttä automaattisesti tuotteen kuvauksella DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal @@ -1623,7 +1634,7 @@ YouCanUseDOL_DATA_ROOT=Voit käyttää DOL_DATA_ROOT / dolibarr.log varten lokit ErrorUnknownSyslogConstant=Constant %s ei ole tunnettu syslog vakio 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=Number of backup logs to keep +SyslogFileNumberOfSaves=Säilytettävien varmuuskopiointilokien määrä ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency ##### Donations ##### DonationsSetup=Lahjoitus-moduulin asetukset @@ -1644,15 +1655,15 @@ BarcodeDescC128=Viivakoodityyppi C128 BarcodeDescDATAMATRIX=Viivakoodityyppi Datamatrix BarcodeDescQRCODE=Viivakoodityyppi QR GenbarcodeLocation=Bar code generation command line tool (used by internal engine for some bar code types). Must be compatible with "genbarcode".<br>For example: /usr/local/bin/genbarcode -BarcodeInternalEngine=Internal engine +BarcodeInternalEngine=Sisäinen moottori BarCodeNumberManager=Manager to auto define barcode numbers ##### Prelevements ##### -WithdrawalsSetup=Setup of module Direct Debit payments +WithdrawalsSetup=Suoraveloitusmoduulin asetukset ##### ExternalRSS ##### ExternalRSSSetup=Ulkopuolinen RSS tuonnin setup NewRSS=Uusi RSS-syöte RSSUrl=RSS URL -RSSUrlExample=An interesting RSS feed +RSSUrlExample=Mielenkiintoinen RSS-syöte ##### Mailing ##### MailingSetup=Sähköpostituksen moduulin asetukset MailingEMailFrom=Sender email (From) for emails sent by emailing module @@ -1663,7 +1674,7 @@ NotificationSetup=Email Notification module setup NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module FixedEmailTarget=Edunsaajavaltiot ##### Sendings ##### -SendingsSetup=Shipping module setup +SendingsSetup=Lähetysmoduulin asetukset SendingsReceiptModel=Lähettävä vastaanottanut malli SendingsNumberingModules=Lähetysten numerointi moduulit SendingsAbility=Support shipping sheets for customer deliveries @@ -1683,7 +1694,7 @@ FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines fo FCKeditorForMailing= WYSIWIG luominen / painos postitusten FCKeditorForUserSignature=WYSIWIG creation/edition of user signature FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) -FCKeditorForTicket=WYSIWIG creation/edition for tickets +FCKeditorForTicket=WYSIWIG tikettien luominen / muokkaus ##### Stock ##### StockSetup='Varasto' - moduulin asetukset IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. @@ -1713,7 +1724,7 @@ DetailLevel=Tasolla (-1: ylävalikosta 0: header-valikko&gt; 0-valikon ja alival ModifMenu=Valikko muutos DeleteMenu=Poista valikosta ConfirmDeleteMenu=Are you sure you want to delete menu entry <b>%s</b>? -FailedToInitializeMenu=Failed to initialize menu +FailedToInitializeMenu=Valikon alustaminen epäonnistui ##### Tax ##### TaxSetup=Taxes, social or fiscal taxes and dividends module setup OptionVatMode=Vaihtoehto d'exigibilit de TVA @@ -1736,12 +1747,14 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Kirjanpitotili AccountancyCodeSell=Myyntien tili AccountancyCodeBuy=Ostojen tili +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Toimet ja esityslistan moduulin asetukset PasswordTogetVCalExport=Avain sallia viennin linkki +SecurityKey = Security Key PastDelayVCalExport=Älä viedä tapauksessa vanhempia kuin AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) -AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form +AGENDA_USE_EVENT_TYPE_DEFAULT=Aseta tämä oletusarvo automaattisesti tapahtuman tyypille tapahtuman luontilomakkeessa 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 view do you want to open by default when selecting menu Agenda @@ -1754,7 +1767,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ClickToDialSetup='Click To Dial'-moduulin asetukset ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> that will be replaced with clicktodial password (defined on user card). 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 +ClickToDialUseTelLink=Käytä vain linkkiä "tel:" puhelinnumeroihin 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=Kassapääte @@ -1805,7 +1818,7 @@ SuppliersSetup='Toimittaja' - moduulin asetukset SuppliersCommandModel=Complete template of Purchase Order SuppliersCommandModelMuscadet=Complete template of Purchase Order (old implementation of cornas template) SuppliersInvoiceModel=Complete template of Vendor Invoice -SuppliersInvoiceNumberingModel=Vendor invoices numbering models +SuppliersInvoiceNumberingModel=Toimittajan laskujen numerointimallit IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=GeoIP Maxmind moduuli setup @@ -1818,9 +1831,9 @@ TestGeoIPResult=Testaus muuntaminen IP -> maa ProjectsNumberingModules=Hankkeet numerointi moduuli ProjectsSetup=Hankkeen moduuli setup ProjectsModelModule=Hankkeen raportti asiakirjan malli -TasksNumberingModules=Tasks numbering module -TaskModelModule=Tasks reports document model -UseSearchToSelectProject=Wait until a key is pressed before loading content of Project combo list.<br>This may improve performance if you have a large number of projects, but it is less convenient. +TasksNumberingModules=Tehtävien numerointimoduuli +TaskModelModule=Tehtäväraporttien asiakirjamalli +UseSearchToSelectProject=Odota, kunnes näppäintä painetaan, ennen kuin lataat Project-yhdistelmäluettelon sisällön. <br> Tämä voi parantaa suorituskykyä, jos sinulla on paljon projekteja, mutta se vähentää käyttömukavuutta. ##### ECM (GED) ##### ##### Fiscal Year ##### AccountingPeriods=Tilikaudet @@ -1832,7 +1845,7 @@ DeleteFiscalYear=Poista tilikausi ConfirmDeleteFiscalYear=Haluatko varmasti poistaa tämän tilikauden? ShowFiscalYear=Näytä tilikausi AlwaysEditable=Voi aina muokata -MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application) +MAIN_APPLICATION_TITLE=Pakota sovelluksen näkyvä nimi (varoitus: oman nimesi asettaminen tähän voi rikkoa automaattisen täytön sisäänkirjautumisominaisuuden käytettäessä DoliDroid-mobiilisovellusta) NbMajMin=Minimi määrä isoja merkkejä NbNumMin=Minimi määrä numero merkkejä NbSpeMin=Minimi määrä erikoismerkkejä @@ -1841,66 +1854,66 @@ NoAmbiCaracAutoGeneration=Älä käytä erikoismerkkejä ("1","l","i","|","0","O SalariesSetup=Palkka moduulin asetukset SortOrder=Lajittelujärjestys Format=Formaatti -TypePaymentDesc=0:Customer payment type, 1:Vendor payment type, 2:Both customers and suppliers payment type -IncludePath=Include path (defined into variable %s) +TypePaymentDesc=0: Asiakkaan maksutapa, 1: Toimittajan maksutapa, 2: Sekä asiakkaiden että toimittajien maksutapa +IncludePath=Sisällytä polku (määritelty muuttujaan %s) ExpenseReportsSetup=Kuluraportit moduulin asetukset -TemplatePDFExpenseReports=Document templates to generate expense report document +TemplatePDFExpenseReports=Asiakirjamallit kuluraportti-asiakirjan luomiseksi ExpenseReportsRulesSetup=Setup of module Expense Reports - Rules -ExpenseReportNumberingModules=Expense reports numbering module +ExpenseReportNumberingModules=Kuluraporttien numerointimoduuli NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. YouMayFindNotificationsFeaturesIntoModuleNotification=You may find options for email notifications by enabling and configuring the module "Notification". -ListOfNotificationsPerUser=List of automatic notifications per user* +ListOfNotificationsPerUser=Luettelo automaattisista ilmoituksista käyttäjää kohti * ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact** -ListOfFixedNotifications=List of automatic fixed notifications -GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users -GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses -Threshold=Threshold -BackupDumpWizard=Wizard to build the database dump file -BackupZipWizard=Wizard to build the archive of documents directory -SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: -SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform. -InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature. +ListOfFixedNotifications=Luettelo automaattisista kiinteistä ilmoituksista +GoOntoUserCardToAddMore=Siirry käyttäjän ilmoitukset -välilehteen lisätäksesi tai poistaaksesi ilmoituksia käyttäjille +GoOntoContactCardToAddMore=Siirry kolmannen osapuolen välilehdelle Ilmoitukset, jos haluat lisätä tai poistaa ilmoituksia kontakteille / osoitteille +Threshold=Kynnys +BackupDumpWizard=Ohjattu toiminto tietokannan dump-tiedoston rakentamiseen +BackupZipWizard=Ohjattu toiminto asiakirjojen arkiston rakentamiseen +SomethingMakeInstallFromWebNotPossible=Ulkoisen moduulin asennus ei ole mahdollista verkkoliitännästä seuraavasta syystä: +SomethingMakeInstallFromWebNotPossible2=Tästä syystä tässä kuvattu päivitysprosessi on manuaalinen prosessi, jonka vain etuoikeutettu käyttäjä voi suorittaa. +InstallModuleFromWebHasBeenDisabledByFile=Järjestelmänvalvoja on poistanut ulkoisen moduulin asennuksen sovelluksesta. Sinun on pyydettävä häntä poistamaan tiedosto <strong> %s </strong> tämän ominaisuuden sallimiseksi. ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to add the 2 directive lines:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong> -HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over +HighlightLinesOnMouseHover=Korosta taulukon rivit hiiren liikkuessa niiden päällä 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) TextTitleColor=Sivun otsikon tekstin väri LinkColor=Linkkien värit -PressF5AfterChangingThis=Press CTRL+F5 on keyboard or clear your browser cache after changing this value to have it effective +PressF5AfterChangingThis=Paina näppäimistön CTRL + F5 tai tyhjennä selaimen välimuisti muutettuasi tämän arvon, jotta se tulee voimaan NotSupportedByAllThemes=Will works with core themes, may not be supported by external themes BackgroundColor=Taustaväri TopMenuBackgroundColor=Taustaväri ylävalikolle TopMenuDisableImages=Piilota kuvat ylävalikosta LeftMenuBackgroundColor=Taustaväri alavalikolle -BackgroundTableTitleColor=Background color for Table title line -BackgroundTableTitleTextColor=Text color for Table title line -BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableTitleColor=Taulukon otsikkorivin taustaväri +BackgroundTableTitleTextColor=Taulukon otsikkorivin tekstin väri +BackgroundTableTitleTextlinkColor=Taulukon otsikkolinkkirivin tekstin väri BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines -MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) -NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. -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 +MinimumNoticePeriod=Vähimmäisilmoitusaika (lomapyyntösi on tehtävä ennen tätä viivettä) +NbAddedAutomatically=Käyttäjälaskureihin lisättyjen päivien määrä (automaattisesti) kuukaudessa +EnterAnyCode=Tämä kenttä sisältää viitteen linjan tunnistamiseksi. Syötä haluamasi arvo ilman erikoismerkkejä. +Enter0or1=Syötä 0 tai 1 +UnicodeCurrency=Kirjoita tähän aaltosulkeiden väliin, luettelo tavunumerosta, joka edustaa valuuttasymbolia. Esimerkiksi: kirjoita $: lle [36] - Brasilian real:lle R $ [82,36] - €: lle, kirjoita [8364] +ColorFormat=RGB-väri on HEX-muodossa, esim .: 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 +PositionIntoComboList=Viivan sijainti yhdistelmäluetteloissa 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. UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card. OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100). TemplateForElement=This template record is dedicated to which element -TypeOfTemplate=Type of template -TemplateIsVisibleByOwnerOnly=Template is visible to owner only +TypeOfTemplate=Mallin tyyppi +TemplateIsVisibleByOwnerOnly=Malli näkyy vain omistajalle VisibleEverywhere=Näkyvillä kaikkialla VisibleNowhere=Visible nowhere FixTZ=Aikavyöhyke korjaus -FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) +FillFixTZOnlyIfRequired=Esimerkki: +2 (täytä vain, jos ongelmia ilmenee) ExpectedChecksum=Oletettu tarkistussumma CurrentChecksum=Nykyinen tarkistussumma ExpectedSize=Oletettu koko CurrentSize=Nykyinen koko -ForcedConstants=Required constant values +ForcedConstants=Vaaditut kiinteät arvot MailToSendProposal=Tarjoukset asiakkaille MailToSendOrder=Asiakkaan tilaukset MailToSendInvoice=Asiakkaiden laskut @@ -1916,43 +1929,43 @@ MailToMember=Jäsenet MailToUser=Käyttäjät MailToProject=Projektit MailToTicket=Tiketit -ByDefaultInList=Show by default on list view -YouUseLastStableVersion=You use the latest stable version -TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites) -TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) -ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes. -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 <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> 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. +ByDefaultInList=Näytä oletuksena luettelonäkymässä +YouUseLastStableVersion=Käytät uusinta vakaata versiota +TitleExampleForMajorRelease=Esimerkki viestistä, jonka avulla voit ilmoittaa tästä suuresta julkaisusta (käytä sitä vapaasti verkkosivustollasi) +TitleExampleForMaintenanceRelease=Esimerkki viestistä, jonka avulla voit ilmoittaa tästä ylläpitoversiosta (käytä sitä vapaasti verkkosivustoillasi) +ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s on saatavana. Versio %s on merkittävä julkaisu, jossa on paljon uusia ominaisuuksia sekä käyttäjille että kehittäjille. Voit ladata sen https://www.dolibarr.org -portaalin latausalueelta (alihakemiston vakaa versio). Voit lukea täydellisen luettelon muutoksista <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a>. +ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s on saatavana. Versio %s on ylläpitoversio, joten sisältää vain virhekorjauksia. Suosittelemme kaikkia käyttäjiä päivittämään tähän versioon. Ylläpitoversio ei tuo uusia ominaisuuksia tai muutoksia tietokantaan. Voit ladata sen https://www.dolibarr.org -portaalin latausalueelta (alihakemiston vakaa versio). Voit lukea täydellisen luettelon muutoksista <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a>. +MultiPriceRuleDesc=Kun vaihtoehto "Useat hintatasot tuotetta / palvelua kohti" on käytössä, voit määrittää kullekin tuotteelle eri hinnat (yksi hintatasoa kohti). Ajan säästämiseksi voit kirjoittaa tähän säännön, jolla lasketaan hintataso jokaiselle tasolle ensimmäisen tason hinnan perusteella, joten sinun on annettava vain kunkin tuotteen ensimmäisen tason hinta. Tämä sivu on suunniteltu säästämään aikaa, mutta on hyödyllinen vain, jos kunkin tason hinnat ovat suhteessa ensimmäiseen tasoon. Voit sivuuttaa tämän sivun useimmissa tapauksissa. ModelModulesProduct=Mallipohjat tuotedokumentaatiolle -WarehouseModelModules=Templates for documents of warehouses +WarehouseModelModules=Mallit varastojen asiakirjoille 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) -AllPublishers=All publishers -UnknownPublishers=Unknown publishers +SeeChangeLog=Katso muutoslokitiedosto (vain englanniksi) +AllPublishers=Kaikki julkaisijat +UnknownPublishers=Tuntemattomat julkaisijat AddRemoveTabs=Lisää tai poista välilehti -AddDataTables=Add object tables -AddDictionaries=Add dictionaries tables -AddData=Add objects or dictionaries data +AddDataTables=Lisää kohdetaulukot +AddDictionaries=Lisää sanakirjatauluja +AddData=Lisää kohteita tai sanakirjatietoja AddBoxes=Lisää widgettejä AddSheduledJobs=Lisää Ajastettuja Töitä -AddHooks=Add hooks +AddHooks=Lisää koukut AddTriggers=Add triggers AddMenus=Lisää valikoita AddPermissions=Lisää käyttöoikeuksia AddExportProfiles=Lisää vientiprofiileja AddImportProfiles=Lisää tuontiprofiileja AddOtherPagesOrServices=Lisää sivuja tai palveluita -AddModels=Add document or numbering templates +AddModels=Lisää asiakirja- tai numerointimallit AddSubstitutions=Add keys substitutions -DetectionNotPossible=Detection not possible -UrlToGetKeyToUseAPIs=Url to get token to use API (once token has been received it is saved in database user table and must be provided on each API call) +DetectionNotPossible=Tunnistaminen ei ole mahdollista +UrlToGetKeyToUseAPIs=URL-osoite hakeaksesi tunnuksen käyttämään API-rajapintaa (kun tunnus on vastaanotettu, se tallennetaan tietokannan käyttäjätauluun ja se on annettava jokaisessa API-kutsussa) ListOfAvailableAPIs=Luettelo saatavilla olevista API:sta -activateModuleDependNotSatisfied=Module "%s" depends on module "%s", that is missing, so module "%1$s" may not work correctly. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise -CommandIsNotInsideAllowedCommands=The command you are trying to run is not in the list of allowed commands defined in parameter <strong>$dolibarr_main_restrict_os_commands</strong> in the <strong>conf.php</strong> file. -LandingPage=Landing page -SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments -ModuleEnabledAdminMustCheckRights=Module has been activated. Permissions for activated module(s) were given to admin users only. You may need to grant permissions to other users or groups manually if necessary. +activateModuleDependNotSatisfied=Moduuli "%s" riippuu moduulista "%s", joka puuttuu, joten moduuli "%1$s" ei välttämättä toimi oikein. Asenna moduuli "%2$s" tai poista moduuli "%1$s" käytöstä, jos haluat olla turvassa yllätyksiltä +CommandIsNotInsideAllowedCommands=Komentoa, jota yrität suorittaa, ei ole parametrissa <strong> $ dolibarr_main_restrict_os_commands </strong> määritetyssä sallittujen komentojen luettelossa <strong> conf.php </strong>. +LandingPage=Aloitussivu +SamePriceAlsoForSharedCompanies=Jos käytät usean yrityksen moduulia, valinnalla "Yksi hinta", hinta on myös sama kaikille yrityksille, jos tuotteet jaetaan ympäristöjen välillä +ModuleEnabledAdminMustCheckRights=Moduuli on aktivoitu. Aktivoitujen moduulien käyttöoikeudet annettiin vain järjestelmänvalvojan käyttäjille. Saatat joutua myöntämään käyttöoikeudet muille käyttäjille tai ryhmille manuaalisesti tarvittaessa. UserHasNoPermissions=Käyttäjän oikeuksia ei määritetty TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "%s")<br>Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "%s" in days)<br>Use "Current/Next" to have payment term date being the first Nth of the month after delta (delta is field "%s", N is stored into field "%s") BaseCurrency=Reference currency of the company (go into setup of company to change this) @@ -1963,27 +1976,27 @@ 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. +MAIN_DOCUMENTS_LOGO_HEIGHT=Logon korkeus PDF-muodossa +NothingToSetup=Tämä moduuli ei vaadi erityisiä määrityksiä. 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') -SeveralLangugeVariatFound=Several language variants found +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 +SeveralLangugeVariatFound=Löytyi useita kielivaihtoehtoja RemoveSpecialChars=Poista erikoismerkit COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX) -COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed -GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact) +COMPANY_DIGITARIA_UNIQUE_CODE=Kopiota ei sallita +GDPRContact=Tietosuojavastaava (tietosuojavastaava, tietosuoja- tai GDPR-yhteyshenkilö) GDPRContactDesc=If you store data about European companies/citizens, you can name the contact who is responsible for the General Data Protection Regulation here -HelpOnTooltip=Help text to show on tooltip -HelpOnTooltipDesc=Put text or a translation key here for the text to show in a tooltip when this field appears in a form -YouCanDeleteFileOnServerWith=You can delete this file on the server with Command Line:<br>%s +HelpOnTooltip=Ohjeteksti näytettäväksi työkaluvihjeessä +HelpOnTooltipDesc=Lisää teksti tai käännösavain tähän, jotta teksti näkyy työkaluvihjessä, kun tämä kenttä näkyy lomakkeessa +YouCanDeleteFileOnServerWith=Voit poistaa tämän tiedoston palvelimelta komentorivillä: <br> %s ChartLoaded=Tilikartta ladattu -SocialNetworkSetup=Setup of module Social Networks +SocialNetworkSetup=Sosiaalisten verkostojen moduulin asetukset EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. -EmailCollector=Email collector +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +EmailCollector=Sähköpostin kerääjä EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=Uusi postinkerääjä EMailHost=IMAP-palvelin @@ -1991,21 +2004,21 @@ MailboxSourceDirectory=Sähköpostin lähdehakemisto MailboxTargetDirectory=Postilaatikon kohdehakemisto EmailcollectorOperations=Keräilijän tehtävät toiminnot EmailcollectorOperationsDesc=Toiminnot suoritetaan ylhäältä alas järjestyksessä -MaxEmailCollectPerCollect=Max number of emails collected per collect +MaxEmailCollectPerCollect=Kerätyn sähköpostin enimmäismäärä keräystä kohti CollectNow=Kerää nyt -ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date of latest collect try -DateLastcollectResultOk=Date of latest collect success -LastResult=Latest result -EmailCollectorConfirmCollectTitle=Email collect confirmation -EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? +ConfirmCloneEmailCollector=Haluatko varmasti kloonata sähköpostin kerääjän %s? +DateLastCollectResult=Viimeisimmän keräysyrityksen päivämäärä +DateLastcollectResultOk=Viimeisimmän onnistuneen keräyksen päivämäärä +LastResult=Viimeisin tulos +EmailCollectorConfirmCollectTitle=Sähköpostikeräyksen vahvistus +EmailCollectorConfirmCollect=Haluatko suorittaa tämän keräilijän kokoelman nyt? NoNewEmailToProcess=Ei uutta käsiteltävää sähköpostia (vastaavat suodattimet) NothingProcessed=Mitään ei tehty -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 link to third party if it was loaded by a previous operation) -CodeLastResult=Latest result code +XEmailsDoneYActionsDone=%s -sähköpostia hyväksytty, %s sähköpostien käsittely onnistuneesti (%s-tietuetta / tehtävää suoritettu) +RecordEvent=Tallenna sähköpostitapahtuma +CreateLeadAndThirdParty=Luo liidi (ja tarvittaessa kolmas osapuoli) +CreateTicketAndThirdParty=Luo tiketti (ja linkitä kolmanteen osapuoleen, jos se on ladattu edellisellä toiminnolla) +CodeLastResult=Viimeisin tuloskoodi NbOfEmailsInInbox=Lähdehakemistossa olevien sähköpostien määrä LoadThirdPartyFromName=Lataa kolmannen osapuolen haku sivustolta %s (vain lataus) LoadThirdPartyFromNameOrCreate=Lataa kolmannen osapuolen haku sivustolta %s (luo, jos sitä ei löydy) @@ -2024,56 +2037,61 @@ ResourceSetup=Resurssimoduulin määritys UseSearchToSelectResource=Käytä hakulomaketta resurssin valitsemiseksi (pikavalikon sijaan). DisabledResourceLinkUser=Poista ominaisuus käytöstä linkittääksesi resurssin käyttäjiin DisabledResourceLinkContact=Poista ominaisuus käytöstä linkittääksesi resurssin kontakteihin -EnableResourceUsedInEventCheck=Enable feature to check if a resource is in use in an event +EnableResourceUsedInEventCheck=Ota ominaisuus käyttöön tarkistaaksesi, onko resurssi käytössä tapahtumassa ConfirmUnactivation=Vahvista moduulin nollaus OnMobileOnly=Vain pienellä näytöllä (älypuhelin) -DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) -MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person -MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links. +DisableProspectCustomerType=Poista käytöstä "Prospekti + Asiakas" -tyyppi (joten kolmannen osapuolen on oltava "Prospekti" tai "Asiakas", mutta ei voi olla molempia) +MAIN_OPTIMIZEFORTEXTBROWSER=Yksinkertaista käyttöliittymää sokeille +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Ota tämä vaihtoehto käyttöön, jos olet sokea henkilö tai jos käytät sovellusta tekstiselaimesta, kuten Lynx tai Links. MAIN_OPTIMIZEFORCOLORBLIND=Vaihda käyttöliittymän väriä värisokeille sopivaksi -MAIN_OPTIMIZEFORCOLORBLINDDesc=Enable this option if you are a color blind person, in some case interface will change color setup to increase contrast. +MAIN_OPTIMIZEFORCOLORBLINDDesc=Ota tämä vaihtoehto käyttöön, jos olet värisokea, joissakin tapauksissa käyttöliittymä muuttaa väriasetuksia kontrastin lisäämiseksi. Protanopia=Protanopia Deuteranopes=Deuteranopes Tritanopes=Tritanopes -ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' -DefaultCustomerType=Default thirdparty type for "New customer" creation form -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 +ThisValueCanOverwrittenOnUserLevel=Kukin käyttäjä voi korvata tämän arvon käyttäjän sivulta - välilehti '%s' +DefaultCustomerType=Kolmannen osapuolen oletustyyppi uuden asiakkaan luontilomakkeelle +ABankAccountMustBeDefinedOnPaymentModeSetup=Huomaa: Pankkitili on määritettävä jokaisen maksutavan moduulissa (Paypal, Stripe, ...), jotta tämä ominaisuus toimisi. +RootCategoryForProductsToSell=Myytävien tuotteiden pääluokka +RootCategoryForProductsToSellDesc=Jos määritelty, vain tämän luokan tuotteet tai tämän luokan alatuotteet ovat saatavilla myyntipisteessä DebugBar=Virheenkorjauspalkki -DebugBarDesc=Toolbar that comes with a plenty of tools to simplify debugging +DebugBarDesc=Työkalupalkki, joka sisältää runsaasti työkaluja virheenkorjauksen yksinkertaistamiseksi DebugBarSetup=Virheenkorjauspalkin asetukset GeneralOptions=Yleiset asetukset -LogsLinesNumber=Number of lines to show on logs tab +LogsLinesNumber=Lokit-välilehdessä näytettävien rivien määrä UseDebugBar=Käytä virheenkorjauspalkkia DEBUGBAR_LOGS_LINES_NUMBER=Konsolissa pidettävien lokirivien määrä WarningValueHigherSlowsDramaticalyOutput=Varoitus, suuremmat arvot hidastavat merkittävästi ohjelmaa ModuleActivated=Moduuli %son aktiivinen ja hidastaa ohjelmaa +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Jos olet tuotantoympäristössä, määritä tämän ominaisuuden arvoksi %s. AntivirusEnabledOnUpload=Virustorjunta käytössä ladatuissa tiedostoissa -EXPORTS_SHARE_MODELS=Export models are share with everybody +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode +EXPORTS_SHARE_MODELS=Vientimallit jaetaan kaikkien kanssa ExportSetup=Vienti-moduulin asetukset -ImportSetup=Setup of module Import +ImportSetup=tuontimoduulin asetukset InstanceUniqueID=Instanssin ID SmallerThan=Pienempi kuin LargerThan=Suurempi kuin 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/. +WithGMailYouCanCreateADedicatedPassword=Jos otit käyttöön kaksivaiheisen vahvistuksen Gmail-tilillä, on suositeltavaa luoda erillinen toinen salasana sovellukselle sen sijaan, että käyttäisit omaa tilin salasanasi osoitteessa 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? +DeleteEmailCollector=Poista sähköpostin kerääjä +ConfirmDeleteEmailCollector=Haluatko varmasti poistaa tämän sähköpostin kerääjän? RecipientEmailsWillBeReplacedWithThisValue=Vastaanottajien sähköpostiosoitteet korvataan aina tällä arvolla AtLeastOneDefaultBankAccountMandatory=Vähintään 1 pankkitili täytyy määrittää RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access. IPListExample=127.0.0.1 192.168.0.2 [::1] BaseOnSabeDavVersion=Perustuu SabreDAV-versioon NotAPublicIp=Ei julkinen IP-osoite -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=Tee anonyymi Ping '+1' Dolibarr-säätiön palvelimelle (tehdään vain kerran asennuksen jälkeen), jotta säätiö voi laskea Dolibarr-asennuksen määrän. FeatureNotAvailableWithReceptionModule=Ominaisuus ei käytettävissä kun moduuli Vastaanotto on aktiivinen EmailTemplate=Mallisähköposti EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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=Ominaisuus ei käytettävissä kun moduuli Vastaanotto on aktiivinen @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Tämän arvon vaihtamista arvoon %s suositellaan tu DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Maa (jos määritelty annetulle maalle) YouMayFindSecurityAdviceHere=Löydät tietoturva-neuvoja täältä -ModuleActivatedMayExposeInformation=Tämä moduuli saattaa paljastaa arkaluontoisia tietoja. Jos et tarvitse sitä, poista se käytöstä. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=Kehitykseen suunniteltu moduuli on otettu käyttöön. Älä ota sitä käyttöön tuotantoympäristössä. CombinationsSeparator=Tuoteyhdistelmien erotinmerkki SeeLinkToOnlineDocumentation=Katso esimerkkejä linkistä online-dokumentaatioon ylävalikossa SHOW_SUBPRODUCT_REF_IN_PDF=Jos käytetään moduulin <b> %s </b> ominaisuutta "%s", näytä yksityiskohdat paketin alituotteista PDF-muodossa. AskThisIDToYourBank=Ota yhteyttä pankkiisi saadaksesi tämän tunnuksen +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/fi_FI/banks.lang b/htdocs/langs/fi_FI/banks.lang index 7d3b78bdd23..3d6580bde09 100644 --- a/htdocs/langs/fi_FI/banks.lang +++ b/htdocs/langs/fi_FI/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=SEPA-toimeksiantonne 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/fi_FI/bills.lang b/htdocs/langs/fi_FI/bills.lang index 765ef285f83..9ac2ed704b1 100644 --- a/htdocs/langs/fi_FI/bills.lang +++ b/htdocs/langs/fi_FI/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Asiakkaan lasku CustomerInvoice=Asiakkaan lasku CustomersInvoices=Asiakkaiden laskut SupplierInvoice=Vendor invoice -SuppliersInvoices=Toimittajien laskut +SuppliersInvoices=Toimittajan laskut +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=tavarantoimittajien laskut +SupplierBills=Toimittajan laskut Payment=Maksu PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Maksut jo PaymentsBackAlreadyDone=Refunds already done PaymentRule=Maksu sääntö PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Luottokortti PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Päivämäärä viimeiselle luonnille DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Hyväksy laskut automaattisesti @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=14 päivää kuun loputtua FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variable amount (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Pankkisiirto PaymentTypeShortVIR=Pankkisiirto @@ -494,12 +498,16 @@ Cash=Kassa Reported=Myöhässä DisabledBecausePayments=Ole mahdollista, koska on olemassa joitakin maksuja CantRemovePaymentWithOneInvoicePaid=Ei voi poistaa maksua koska siellä on ainakin laskulla luokiteltu maksanut +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Odotettu maksu CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Maksanut tämän maksun 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Maksa ToMakePaymentBack=Takaisin maksu @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill alkaen $ syymm jo olemassa, ja ei ole yhteensopiva tämän mallin järjestyksessä. Poistaa sen tai nimetä sen aktivoida tämän moduulin. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Poista laskupohja ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s lasku(a) luotu +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file diff --git a/htdocs/langs/fi_FI/boxes.lang b/htdocs/langs/fi_FI/boxes.lang index 896e6895a4f..9fa1c9f36ed 100644 --- a/htdocs/langs/fi_FI/boxes.lang +++ b/htdocs/langs/fi_FI/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS tiedot BoxLastProducts=Viimeisimmät %sTuotteet/Palvelut @@ -17,9 +18,13 @@ BoxLastActions=Viimeisimmät käsittelyt BoxLastContracts=Viimeisimmät sopimukset BoxLastContacts=Viimeisimmät käsitellyt yhteystiedot BoxLastMembers=Viimeisimmät käyttäjät +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Viimeisimmät välitykset BoxCurrentAccounts=Avoimet saatavat yhteensä BoxTitleMemberNextBirthdays=Käyttäjien syntymäpäivät tässä kuussa +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Viimeisimmät %s uutiset %s BoxTitleLastProducts=Tuotteet/Palvelut: viimeisimmät %s muokatut BoxTitleProductsAlertStock=Tuotteet: saldohälytys @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Kirjanpito +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/fi_FI/categories.lang b/htdocs/langs/fi_FI/categories.lang index 8738530c575..c98bca84e12 100644 --- a/htdocs/langs/fi_FI/categories.lang +++ b/htdocs/langs/fi_FI/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/fi_FI/companies.lang b/htdocs/langs/fi_FI/companies.lang index 9501c740d2c..5be2288c86c 100644 --- a/htdocs/langs/fi_FI/companies.lang +++ b/htdocs/langs/fi_FI/companies.lang @@ -43,9 +43,10 @@ Individual=Yksityishenkilö ToCreateContactWithSameName=Luo automaattisesti yhteystiedot/osoitteen sidosryhmän tiedoilla sidosryhmän alaisuuteen. Yleensä, vaikka sidosryhmä olisi henkilö, pelkkä sidosryhmän luominen riittää. ParentCompany=Emoyhtiö Subsidiaries=Tytäryhtiöt -ReportByMonth=Raportti kuukausittain -ReportByCustomers=Raportti asiakkaiden mukaan -ReportByQuarter=Raportti tuloksittain +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Siviilisääty RegisteredOffice=Kotipaikka Lastname=Sukunimi @@ -172,14 +173,20 @@ ProfId1ES=ALV-numero 1 (CIF / NIF Espanja) ProfId2ES=Prof Id 2 (Henkilötunnus) ProfId3ES=Prof tunnus 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate numero) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (Siret) ProfId3FR=Prof Id 3 (NAF, vanha APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Sosiaaliturva numero) ProfId3PT=Prof Id 3 (Commercial Record numero) ProfId4PT=Prof Id 4 (konservatorio) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Professori Id 1 (OGRN) ProfId2RU=Professori Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Avoin lasku OutstandingBill=Avointen laskujen enimmäismäärä OutstandingBillReached=Avointen laskujen enimmäismäärä saavutettu OrderMinAmount=Vähimmäistilausmäärä -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Asiakas / toimittaja-koodi on maksuton. Tämä koodi voidaan muuttaa milloin tahansa. ManagingDirectors=Johtajien nimet (TJ, johtaja, päällikkö...) MergeOriginThirdparty=Monista sidosryhmä (sidosryhmä jonka haluat poistaa) diff --git a/htdocs/langs/fi_FI/compta.lang b/htdocs/langs/fi_FI/compta.lang index d75596e0a5b..d8680739af0 100644 --- a/htdocs/langs/fi_FI/compta.lang +++ b/htdocs/langs/fi_FI/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Alv StatusToPay=Maksaa SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Asiakas laskun maksu PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal veron maksu PaymentVat=ALV-maksu +AutomaticCreationPayment=Automatically record the payment ListPayment=Luettelo maksut ListOfCustomerPayments=Luettelo asiakkaan maksut ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Maksu LT2PaymentsES=IRPF maksut VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Cheque vastaanotto panos päivämäärä 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Linkki Tilauksiin Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/fi_FI/ecm.lang b/htdocs/langs/fi_FI/ecm.lang index c086c8f47c7..3adcc59a368 100644 --- a/htdocs/langs/fi_FI/ecm.lang +++ b/htdocs/langs/fi_FI/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/fi_FI/errors.lang b/htdocs/langs/fi_FI/errors.lang index df9826daae0..feec6b25b64 100644 --- a/htdocs/langs/fi_FI/errors.lang +++ b/htdocs/langs/fi_FI/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> ei löytynyt (Bad polku, väärä oikeudet ErrorFunctionNotAvailableInPHP=<b>Tehtävä %s</b> tarvitaan tätä ominaisuutta, mutta ei ole käytettävissä tässä versiossa / setup PHP. ErrorDirAlreadyExists=A-hakemisto on jo olemassa. ErrorFileAlreadyExists=Tämän niminen tiedosto on jo olemassa. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Tiedosto ei saanut kokonaan palvelimelta. ErrorNoTmpDir=Tilapäinen directy %s ei ole. ErrorUploadBlockedByAddon=Lähetä estetty PHP / Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/fi_FI/externalsite.lang b/htdocs/langs/fi_FI/externalsite.lang index 603e504cabe..1926b6e7f01 100644 --- a/htdocs/langs/fi_FI/externalsite.lang +++ b/htdocs/langs/fi_FI/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup linkki ulkoiseen sivustoon -ExternalSiteURL=Ulkoisen sivuston osoite (URL) +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Ulkoisen sivuston Moduuli ei ole oikein konfiguroitu. ExampleMyMenuEntry=Omassa valikossa diff --git a/htdocs/langs/fi_FI/main.lang b/htdocs/langs/fi_FI/main.lang index edbfc59d018..0e6d21e4a82 100644 --- a/htdocs/langs/fi_FI/main.lang +++ b/htdocs/langs/fi_FI/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Muokattu IPModification=Muokkaajan IP DateLastModification=Viimeisimmän muokkauksen päivämäärä DateValidation=Vahvistettu +DateSigning=Signing date DateClosing=Suljettu DateDue=Eräpäivä DateValue=Arvopäivä @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Yksikköhinta PriceU=A-hinta PriceUHT=Veroton hinta -PriceUHTCurrency=U.P (valuutta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Verollinen hinta Amount=Määrä AmountInvoice=Laskun summa @@ -389,6 +390,8 @@ AmountTotal=Yhteissumma AmountAverage=Keskimääräinen summa PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Prosenttia Total=Yhteensä SubTotal=Välisumma @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Nykyinen kieli CurrentTheme=Nykyinen teema CurrentMenuManager=Nykyinen valikkohallinta @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Suora latauslinkki (julkinen/ulkoinen) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Lataa DownloadDocument=Lataa dokumentti ActualizeCurrency=Päivitä valuuttakurssi @@ -1013,6 +1018,7 @@ SearchIntoContacts=Yhteystiedot SearchIntoMembers=Jäsenet SearchIntoUsers=Käyttäjät SearchIntoProductsOrServices=Tuotteet tai palvelut +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projektit SearchIntoMO=Valmistustilaukset SearchIntoTasks=Tehtävät @@ -1049,12 +1055,13 @@ KeyboardShortcut=Pikanäppäin AssignedTo=Vaikuttaa Deletedraft=Poista luonnos ConfirmMassDraftDeletion=Luonnosten massapoistamisen vahvistus -FileSharedViaALink=Tiedosto jaettu linkin kautta +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Valitse ensin kolmas osapuoli ... YouAreCurrentlyInSandboxMode=Olet tällä hetkellä %s "sandbox" -tilassa Inventory=Varasto AnalyticCode=Analyyttinen koodi TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Näytä lisää tietoja NoFilesUploadedYet=Lataa ensin asiakirja SeePrivateNote=Katso yksityinen huomautus @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/fi_FI/margins.lang b/htdocs/langs/fi_FI/margins.lang index d1b075c7bc3..866a85e11e7 100644 --- a/htdocs/langs/fi_FI/margins.lang +++ b/htdocs/langs/fi_FI/margins.lang @@ -22,7 +22,7 @@ ProductService=Tuote tai palvelu AllProducts=Kaikki tuotteet ja palvelut ChooseProduct/Service=Valitse tuote tai palvelu 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=tuotteeksi UseDiscountAsService=palveluksi diff --git a/htdocs/langs/fi_FI/members.lang b/htdocs/langs/fi_FI/members.lang index ada2de4e243..ee9821fd4f7 100644 --- a/htdocs/langs/fi_FI/members.lang +++ b/htdocs/langs/fi_FI/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Luettelo luonnoksen jäsenten (jotka on vahvistettu) MembersListValid=Luettelo voimassa jäseniä MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Luettelo pätevistä jäsenistä MenuMembersToValidate=Luonnos jäseniä MenuMembersValidated=Validoidut jäseniä +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Jäsenet Merkintäoikeuksien vastaanottaa MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Lakkaa MemberStatusPaid=Tilaus ajan tasalla MemberStatusPaidShort=Ajan tasalla +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Luonnos jäseniä +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Hyväksytty @@ -82,6 +87,8 @@ Physical=Fyysinen Moral=Moraalinen MorAndPhy=Moral and Physical Reenable=Ottaa ne uudelleen +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Poista jäseneksi @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Etiketit muodossa DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Luo osoite arkkia (malli lähtö todella setup: <b>%s)</b> SubscriptionPayment=Tilaus maksu LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Jäsenten tilastot maittain MembersStatisticsByState=Jäsenten tilastot valtio / lääni MembersStatisticsByTown=Jäsenten tilastot kaupunki diff --git a/htdocs/langs/fi_FI/modulebuilder.lang b/htdocs/langs/fi_FI/modulebuilder.lang index 0e6dd72354d..23fe1bd694b 100644 --- a/htdocs/langs/fi_FI/modulebuilder.lang +++ b/htdocs/langs/fi_FI/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/fi_FI/orders.lang b/htdocs/langs/fi_FI/orders.lang index 6ad75f3c205..e4c9e7599b3 100644 --- a/htdocs/langs/fi_FI/orders.lang +++ b/htdocs/langs/fi_FI/orders.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=Asiakkaiden tilausalue -SuppliersOrdersArea=Purchase orders area +SuppliersOrdersArea=Ostotilaukset OrderCard=Tilauskortti OrderId=Tilausnumero Order=Tilaus @@ -11,23 +11,25 @@ OrderDate=Tilauspäivämäärä OrderDateShort=Tilauspäivä OrderToProcess=Jotta prosessi NewOrder=Uusi tilaus -NewOrderSupplier=New Purchase Order +NewOrderSupplier=Uusi Ostotilaus ToOrder=Tee tilaus MakeOrder=Tee tilaus -SupplierOrder=Purchase order -SuppliersOrders=Purchase orders -SuppliersOrdersRunning=Current purchase orders -CustomerOrder=Sales Order +SupplierOrder=Ostotilaus +SuppliersOrders=Ostotilaukset +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines +SuppliersOrdersRunning=Avoimet Ostotilaukset +CustomerOrder=Myyntitilaus CustomersOrders=Myyntitilaukset -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 +CustomersOrdersRunning=Avoimet myyntitilaukset +CustomersOrdersAndOrdersLines=Myyntitilaukset ja tilauksen tarkennukset +OrdersDeliveredToBill=Laskutetut Myyntitilaukset +OrdersToBill=Toimitetut Myyntitilaukset +OrdersInProcess=Käsittelyssä olevat Myyntitilaukset +OrdersToProcess=Käsittelyä tarvitsevat Myyntitilaukset +SuppliersOrdersToProcess=Käsittelyä tarvitsevat Ostotilaukset +SuppliersOrdersAwaitingReception=Ostotilaukset jotka odottavat saapumista +AwaitingReception=Odottaa saapumista StatusOrderCanceledShort=Peruutettu StatusOrderDraftShort=Vedos StatusOrderValidatedShort=Hyväksytty @@ -47,7 +49,7 @@ StatusOrderCanceled=Peruutettu StatusOrderDraft=Luonnos (vaatii vahvistuksen) StatusOrderValidated=Hyväksytty StatusOrderOnProcess=Tilattu - Odotaa vastaanottoa -StatusOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusOrderOnProcessWithValidation=Tilattu - Odottaa saapumista tai validointia StatusOrderProcessed=Käsitelty StatusOrderToBill=Toimitettu StatusOrderApproved=Hyväksytty @@ -56,41 +58,41 @@ StatusOrderReceivedPartially=Osittain saapunut StatusOrderReceivedAll=Kaikki tuotteet vastaanotettu ShippingExist=Lähetys on olemassa QtyOrdered=Tilattu Kpl -ProductQtyInDraft=Product quantity into draft orders -ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered +ProductQtyInDraft=Tuotemäärät kesken oleville tilauksille +ProductQtyInDraftOrWaitingApproved=Tuotemäärät kesken oleville tai hyväksytyille ostotilauksille, joita ei vielä tilattu MenuOrdersToBill=Toimitetut tilaukset MenuOrdersToBill2=Laskutettavat tilaukset ShipProduct=Toimita tuote CreateOrder=Luo tilaus RefuseOrder=Kiellä tilaus ApproveOrder=Hyväksy tilaus -Approve2Order=Approve order (second level) +Approve2Order=Hyväksy tilaus (toisen vaiheen hyväksyntä) ValidateOrder=Hyväksy tilaus UnvalidateOrder=Käsittele tilaus uudestaan DeleteOrder=Poista tilaus CancelOrder=Peruuta tilaus -OrderReopened= Order %s re-open +OrderReopened= Tilaus %s uudelleenavaus AddOrder=Luo tilaus -AddPurchaseOrder=Create purchase order -AddToDraftOrders=Add to draft order +AddPurchaseOrder=Muodosta Ostotilaus +AddToDraftOrders=Lisää kesken olevalle tilaukselle ShowOrder=Näytä tilaus -OrdersOpened=Orders to process -NoDraftOrders=No draft orders -NoOrder=No order -NoSupplierOrder=No purchase order -LastOrders=Latest %s sales orders -LastCustomerOrders=Latest %s sales orders -LastSupplierOrders=Latest %s purchase orders +OrdersOpened=Käsittelyä odottavat tilaukset +NoDraftOrders=Ei kesken olevia tilauksia +NoOrder=Ei tilausta +NoSupplierOrder=Ei ostotilausta +LastOrders=Viimeisimmät %s Myyntitilaukset +LastCustomerOrders=Viimeisimmät %s Myyntitilaukset +LastSupplierOrders=Viimeisimmät %sOstotilaukset LastModifiedOrders=Viimeisimmät %s muokatut tilaukset AllOrders=Kaikki tilaukset NbOfOrders=Tilausten määrä OrdersStatistics=Tilausten tilastot -OrdersStatisticsSuppliers=Purchase order statistics +OrdersStatisticsSuppliers=Ostotilaus statistiikka NumberOfOrdersByMonth=Tilausmäärät kuukausittain -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +AmountOfOrdersByMonthHT=Kuukauden tilausten määrä (ilman alv) ListOfOrders=Tilausluettelo CloseOrder=Sulje tilaus -ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed. +ConfirmCloseOrder=Oletko varma että haluat merkitä tilauksen toimitetuksi? Kun se on toimitettu niin sen voi laskuttaa. ConfirmDeleteOrder=Haluatko varmasti poistaa tämän tilauksen? ConfirmValidateOrder=Haluatko varmasti vahvistaa tämän tilauksen nimelle <b>%s</b>? ConfirmUnvalidateOrder=Haluatko varmasti palauttaa tilauksen <b>%s</b> luonnostilaan? @@ -99,7 +101,7 @@ ConfirmMakeOrder=Haluatko varmasti vahvistaa tekemäsi tilauksen <b>%s</b>? GenerateBill=Luo lasku ClassifyShipped=Luokittele toimitetuksi DraftOrders=Tilausluonnokset -DraftSuppliersOrders=Draft purchase orders +DraftSuppliersOrders=Kesken olevat Ostotilaukset OnProcessOrders=Käsittelyssä olevat tilaukset RefOrder=Tilausviite RefCustomerOrder=Asiakkaan viite @@ -128,9 +130,9 @@ TypeContact_commande_external_SHIPPING=Yhteystiedot asiakkaan toimitukseen TypeContact_commande_external_CUSTOMER=Asiakas ottaa yhteyttä seurantaan, jotta TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order TypeContact_order_supplier_internal_SHIPPING=Edustaja toimitus seurantaan -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=Toimittajan laskun kontakti +TypeContact_order_supplier_external_SHIPPING=Toimittajan toimitus kontakti +TypeContact_order_supplier_external_CUSTOMER=Toimittajan kontakti seurantaa varten Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Vakiota COMMANDE_SUPPLIER_ADDON ei ole määritelty Error_COMMANDE_ADDON_NotDefined=Vakiota COMMANDE_ADDON ei ole määritelty Error_OrderNotChecked=Yhtään tilausta ei ole valittuna laskulle @@ -141,23 +143,24 @@ OrderByEMail=Sähköposti OrderByWWW=Online OrderByPhone=Puhelin # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=Täydellinen tilausmalli (vanha Eratosthene template) +PDFEratostheneDescription=Täydellinen tilausmalli PDFEdisonDescription=Yksinkertainen tilausmalli -PDFProformaDescription=A complete Proforma invoice template +PDFProformaDescription=Täydellinen Proforma lasku template CreateInvoiceForThisCustomer=Laskuta tilaukset +CreateInvoiceForThisSupplier=Laskuta tilaukset NoOrdersToInvoice=Yhtään tilausta ei ole laskutettavaksi -CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -OrderCreation=Order creation +CloseProcessedOrdersAutomatically=Kuittaa kaikki valitut tilaukset. +OrderCreation=Tilauksen muodostaminen Ordered=Tilattu -OrderCreated=Your orders have been created -OrderFail=An error happened during your orders creation -CreateOrders=Create orders +OrderCreated=Tilauksesi on muodostettu +OrderFail=Tapahtui virhe muodostettaessa tilausta. +CreateOrders=Tee tilaukset ToBillSeveralOrderSelectCustomer=To create an invoice for several orders, click first onto customer, then choose "%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 +SetShippingMode=Anna rahtitapa WithReceptionFinished=With reception finished #### supplier orders status StatusSupplierOrderCanceledShort=Peruttu @@ -179,7 +182,7 @@ StatusSupplierOrderCanceled=Peruttu StatusSupplierOrderDraft=Luonnos (vaatii vahvistuksen) StatusSupplierOrderValidated=Hyväksytty StatusSupplierOrderOnProcess=Tilattu - Odotaa vastaanottoa -StatusSupplierOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusSupplierOrderOnProcessWithValidation=Tilattu - Odottaa saapumista tai validointia StatusSupplierOrderProcessed=Käsitelty StatusSupplierOrderToBill=Toimitettu StatusSupplierOrderApproved=Hyväksytty diff --git a/htdocs/langs/fi_FI/other.lang b/htdocs/langs/fi_FI/other.lang index d3b6219e6db..e56b76868d9 100644 --- a/htdocs/langs/fi_FI/other.lang +++ b/htdocs/langs/fi_FI/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Muuttanut %s ValidatedBy=Vahvistaja %s +SignedBy=Signed by %s ClosedBy=Suljettu %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/fi_FI/productbatch.lang b/htdocs/langs/fi_FI/productbatch.lang index 4e163e82e15..1b0614a2c73 100644 --- a/htdocs/langs/fi_FI/productbatch.lang +++ b/htdocs/langs/fi_FI/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Käytä erää / sarjanumeroa -ProductStatusOnBatch=Kyllä (erä / sarja käytössä) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Ei (erä / sarja ei ole käytössä) -ProductStatusOnBatchShort=Kyllä +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ei Batch=Erä/Sarjanumero atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ ProductLotSetup=Moduulin erän / sarjan asetukset ShowCurrentStockOfLot=Näytä nykyinen varasto pari tuotetta / erää kohti ShowLogOfMovementIfLot=Näytä siirto lokit pari tuotetta / erää kohti StockDetailPerBatch=Varastotiedot erää kohden +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/fi_FI/products.lang b/htdocs/langs/fi_FI/products.lang index ba1a344683f..9ea5a554395 100644 --- a/htdocs/langs/fi_FI/products.lang +++ b/htdocs/langs/fi_FI/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Valitse PDF tiedostot -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Yksikkö diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index 3f9f197f844..1f49da052b2 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Tehtävälista GoToListOfTimeConsumed=Go to list of time consumed GanttView=GANTT näkymä +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/fi_FI/propal.lang b/htdocs/langs/fi_FI/propal.lang index 2f96f9ee357..b17b251df4d 100644 --- a/htdocs/langs/fi_FI/propal.lang +++ b/htdocs/langs/fi_FI/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Lähetä tarjous postitse DatePropal=Tarjouspäivämäärä DateEndPropal=Viimeinen voimassaolopäivä ValidityDuration=Voimassaolo kesto -CloseAs=Aseta tilaksi SetAcceptedRefused=Aseta hyväksytty/hylätty ErrorPropalNotFound=Propal %s ei löydy AddToDraftProposals=Lisää tarjousluonnos @@ -60,6 +59,7 @@ ConfirmClonePropal=Haluatko varmasti monistaa tarjouksen <b>%s</b>? ConfirmReOpenProp=Haluatko varmasti avata uudestaan tarjouksen <b>%s</b>? ProposalsAndProposalsLines=Kaupalliset ehdotusta ja linjat ProposalLine=Tarjousrivi +ProposalLines=Proposal lines AvailabilityPeriod=Saatavuus viive SetAvailability=Aseta saatavuus viive AfterOrder=tilauksesta @@ -85,3 +85,8 @@ ProposalCustomerSignature=Kirjallinen hyväksyntä, päivämäärä ja allekirjo 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/fi_FI/stocks.lang b/htdocs/langs/fi_FI/stocks.lang index d244c5578d0..60d143e3df2 100644 --- a/htdocs/langs/fi_FI/stocks.lang +++ b/htdocs/langs/fi_FI/stocks.lang @@ -19,8 +19,8 @@ Stock=Kanta Stocks=Varastot MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Lieu -LocationSummary=Lyhyt nimi sijainti -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Kokonaismäärä tuotteet LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Varastot arvo 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Id-varasto DescWareHouse=Kuvaus varasto LieuWareHouse=Lokalisointi varasto WarehousesAndProducts=Varastot ja tuotteet WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) AverageUnitPricePMPShort=Value -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Myynnin Yksikköhinta EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Varasto inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Uudelleenavaa +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/fi_FI/suppliers.lang b/htdocs/langs/fi_FI/suppliers.lang index ced411126ca..9b8956498e0 100644 --- a/htdocs/langs/fi_FI/suppliers.lang +++ b/htdocs/langs/fi_FI/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Toimittajat SuppliersInvoice=Vendor invoice +SupplierInvoices=Toimittajan laskut ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Historia diff --git a/htdocs/langs/fi_FI/ticket.lang b/htdocs/langs/fi_FI/ticket.lang index ff13c391829..b184456e137 100644 --- a/htdocs/langs/fi_FI/ticket.lang +++ b/htdocs/langs/fi_FI/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tyyppi Severity=Vakavuus +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Sähköpostin lähettäminen lipun viestistä @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Ota tämä vaihtoehto käyttöön, jos haluat lähettää sähköpostiviestin sähköpostiosoitteeseen "Ilmoitusviesti osoitteesta" (katso alla oleva asetus) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Aktivoi julkinen käyttöliittymä @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/fi_FI/users.lang b/htdocs/langs/fi_FI/users.lang index bc2fe0013df..97f20b34cf5 100644 --- a/htdocs/langs/fi_FI/users.lang +++ b/htdocs/langs/fi_FI/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Poista ryhmästä PasswordChangedAndSentTo=Salasana muutettu ja <b>lähetetään %s.</b> PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Pyynnön vaihtaa <b>salasana %s lähetetään %s.</b> +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=Käyttäjät & ryhmät LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain käyttäjän %s Reactivate=Uudelleenaktivoi 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Lupa myönnettiin, koska periytyy yhden käyttäjän ryhmä. Inherited=Peritty +UserWillBe=Created user will be UserWillBeInternalUser=Luotu käyttäjä on sisäinen käyttäjä (koska ei liity erityistä kolmannelle osapuolelle) UserWillBeExternalUser=Luotu käyttäjä tulee ulkopuolinen käyttäjä (koska liittyy erityistä kolmannelle osapuolelle) IdPhoneCaller=Id puhelimeen soittajan @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/fi_FI/website.lang b/htdocs/langs/fi_FI/website.lang index 218d9313551..4bd6e9e73de 100644 --- a/htdocs/langs/fi_FI/website.lang +++ b/htdocs/langs/fi_FI/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Luettu WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/fi_FI/zapier.lang b/htdocs/langs/fi_FI/zapier.lang index 4465a404aee..d485fc959cd 100644 --- a/htdocs/langs/fi_FI/zapier.lang +++ b/htdocs/langs/fi_FI/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier Dolibarr:lle -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier Dolibarr-moduulille - -# -# Admin page -# -ZapierForDolibarrSetup = Zapier Dolibarr:lle asetukset +ZapierForDolibarrSetup=Zapier Dolibarr:lle asetukset ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/fr_BE/accountancy.lang b/htdocs/langs/fr_BE/accountancy.lang index 5f291cc8cb7..11b91eb3db3 100644 --- a/htdocs/langs/fr_BE/accountancy.lang +++ b/htdocs/langs/fr_BE/accountancy.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - accountancy Processing=Exécution Lineofinvoice=Lignes de facture -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) Doctype=Type de document ErrorDebitCredit=Débit et crédit ne peuvent pas être non-nuls en même temps TotalMarge=Marge de ventes totale diff --git a/htdocs/langs/fr_BE/admin.lang b/htdocs/langs/fr_BE/admin.lang index a497b785c93..4b1e1bad526 100644 --- a/htdocs/langs/fr_BE/admin.lang +++ b/htdocs/langs/fr_BE/admin.lang @@ -16,8 +16,7 @@ FormToTestFileUploadForm=Formulaire pour tester l'upload de fichiers (selon la c IfModuleEnabled=Note: oui ne fonctionne que si le module <b>%s</b> est activé Module20Name=Propales Module30Name=Factures -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" Target=Objectif OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_BE/bills.lang b/htdocs/langs/fr_BE/bills.lang index 6ec8a0357c9..a6a4763aef9 100644 --- a/htdocs/langs/fr_BE/bills.lang +++ b/htdocs/langs/fr_BE/bills.lang @@ -12,7 +12,6 @@ CorrectInvoice=Corriger facture %s CorrectionInvoice=Facture de correction UsedByInvoice=Utilisée pour payer la facture %s PredefinedInvoices=Factures prédéfinies -SupplierBills=factures fournisseurs Payment=Paiement Payments=Paiements DeletePayment=Supprimer paiement @@ -38,4 +37,3 @@ PaymentTypeShortLIQ=En espèces PaymentTypeCB=Carte de crédit PaymentTypeShortCB=Carte de crédit Cash=En espèces -TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn pour les factures et %syymm-nnnn pour les notes de crédits où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0 diff --git a/htdocs/langs/fr_BE/modulebuilder.lang b/htdocs/langs/fr_BE/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/fr_BE/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_BE/products.lang b/htdocs/langs/fr_BE/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/fr_BE/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_BE/withdrawals.lang b/htdocs/langs/fr_BE/withdrawals.lang index 76b150a8eb2..eb336cadcc0 100644 --- a/htdocs/langs/fr_BE/withdrawals.lang +++ b/htdocs/langs/fr_BE/withdrawals.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - withdrawals StatusTrans=Envoyé -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/fr_CA/accountancy.lang b/htdocs/langs/fr_CA/accountancy.lang index 62afd3dc49d..ef78367de7a 100644 --- a/htdocs/langs/fr_CA/accountancy.lang +++ b/htdocs/langs/fr_CA/accountancy.lang @@ -87,7 +87,6 @@ LineOfExpenseReport=Ligne de rapport de dépenses NoAccountSelected=Aucun compte comptable sélectionné VentilatedinAccount=Lié avec succès au compte comptable XLineFailedToBeBinded=%s produits / services n'étaient liés à aucun compte comptable -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Commencez le tri de la page "Reliure à faire" par les éléments les plus récents ACCOUNTING_LIST_SORT_VENTILATION_DONE=Commencez le tri de la page "Reliure faite" par les éléments les plus récents ACCOUNTING_LENGTH_DESCRIPTION=Tronquer la description des produits et services dans les listes après les caractères X (Best = 50) diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index ab2f51e65eb..4cd705f4634 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -59,7 +59,6 @@ LastStableVersion=Dernière version stable LastActivationDate=Dernière date d'activation LastActivationAuthor=Dernier auteur d'activation LastActivationIP=Dernière activation IP -GenericMaskCodes2=<B> {cccc} </ b> le code client sur n caractères <br> <b> {cccc000} </ b> le code client sur n caractères est suivi d'un compteur dédié au client. Ce compteur dédié au client est réinitialisé au même moment que le compteur global. <B> {tttt} </ b> Le code de type tiers sur n caractères (voir menu Accueil - Configuration - Dictionnaire - Types de tiers) . Si vous ajoutez cette étiquette, le compteur sera différent pour chaque type de tiers. GenericMaskCodes4a=<br><u> Exemple au 99th %s du tiers TheCompany, avec la date 2007-01-31: </u> GenericMaskCodes5=<b>ABC{yy}{mm}-{000000}</b> donnera <b>ABC0701-000099</b><br><b>{0000+100@1}-ZZZ/{dd}/XXX</b> donnera <b>0199-ZZZ/31/XXX</b><br><b>IN{yy}{mm}-{0000}-{t}</b> donnera <b>IN0701-0099-A</b> si le type d'entreprise est 'Responsable Inscripto' avec un code pour le type 'A_RI' DisableLinkToHelp=Masquer lien vers l'aide en ligne "<b>%s</b>" @@ -97,7 +96,6 @@ Module2660Name=WebServices appel ( client SOAP ) Module4000Name=Gestion des ressources humaines Module10000Name=Sites Internet Module55000Name=Sondage, enquête ou vote -Module59000Desc=Module to follow margins Permission45=Exportation de projets Permission76=Exporter des données Permission91=Consulter les charges et la TPS/TVH @@ -161,10 +159,10 @@ WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Demandez une source d'entrepôt pour l'ordr ShippableOrderIconInList=Ajouter un icône dans la liste des commandes qui indique si la commande est expédiable. LDAPAdminDnExample=DN complet (ex: cn = admin, dc = exemple, dc = com ou cn = Administrateur, cn = Utilisateurs, dc = exemple, dc = com pour le répertoire actif) LDAPFieldTitle=Poste +MemcachedNotAvailable=Aucun cache applicatif trouvé. Vous pouvez accélérer les performances de Dolibarr en installant un serveur de cache Memcached et un module de cache applicatif exploitant ce serveur.<br>Plus d'info sur la page <a href="http://wiki.dolibarr.org/index.php/Module_MemCached">http://wiki.dolibarr.org/index.php/Module_MemCached</a>. Notez que de nombreux hébergeurs low-cost ne fournissent pas de tels serveurs de cache dans leur infrastructure. DefaultSortOrder=Ordres de tri par défaut DefaultFocus=Champs de mise au point par défaut MergePropalProductCard=Activez dans le produit/service, l'option onglet de fichiers attachés pour fusionner le produit PDF le document à la proposition PDF azur si le produit/service est dans la proposition -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseUnits=Définir une unité de mesure pour la quantité lors de la commande, l'édition de la proposition ou les lignes de facture IsNotADir=n'est pas un répertoire BarcodeDescDATAMATRIX=Codebarre de type Datamatrix @@ -209,7 +207,6 @@ BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires BackgroundTableLineEvenColor=Couleur de fond même pour les lignes de table MinimumNoticePeriod=Période minimale de préavis (Votre demande de congé doit être fait avant ce délai) NbAddedAutomatically=Nombre de jours ajoutés aux compteurs d'utilisateurs (automatiquement) chaque mois -EnterAnyCode=Ce champ contient une référence pour identifier la ligne. Entrez une valeur de votre choix, mais sans caractères spéciaux. ColorFormat=La couleur RVB est en format HEX, par exemple: FF0000 PositionIntoComboList=Position de la ligne dans les listes déroulantes SellTaxRate=Taxes de vente diff --git a/htdocs/langs/fr_CA/bills.lang b/htdocs/langs/fr_CA/bills.lang index f7dff6b4a4f..a08d3fbe9b5 100644 --- a/htdocs/langs/fr_CA/bills.lang +++ b/htdocs/langs/fr_CA/bills.lang @@ -77,10 +77,9 @@ PaymentTypeTRA=Procédure bancaire PaymentTypeShortTRA=Brouillon ChequeMaker=Émetteur du chèque/transfert DepositId=Identifiant de dépot +CreditNoteConvertedIntoDiscount=Ce %s a été converti en %s YouMustCreateStandardInvoiceFirstDesc=Vous devez d'abord créer une facture standard et la convertir en «modèle» pour créer une nouvelle facture modèle PDFCrevetteDescription=Facture modèle PDF Crevette. Un modèle de facture complet pour les factures de situation -MarsNumRefModelDesc1=Numéro de retour avec le format %syymm-nnnn pour les factures standard, %syymm-nnnn pour les factures de remplacement, %syymm-nnnn pour les factures de versement et %syymm-nnnn pour les notes de crédit où il est année, mm est le mois et nnnn est une séquence sans interruption et non Retourner à 0 -CactusNumRefModelDesc1=Numéro de retour avec le format %syymm-nnnn pour les factures standard, %syymm-nnnn pour les notes de crédit et %syymm-nnnn pour les factures de versement de paiement où yy est l'année, mm est le mois et nnnn est une séquence sans interruption et aucun retour à 0 SituationAmount=Montant de facture de situation (no tax.) NotLastInCycle=Cette facture n'est pas la dernière en cycle et ne doit pas être modifiée. situationInvoiceShortcode_S=D @@ -92,4 +91,3 @@ ToCreateARecurringInvoice=Pour créer une facture récurrente pour ce contrat , ToCreateARecurringInvoiceGene=Pour générer des factures à venir régulièrement et manuellement , allez dans le menu <strong>%s - %s - %s</strong>. DeleteRepeatableInvoice=Supprimer la facture du modèle ConfirmDeleteRepeatableInvoice=Êtes-vous sûr de vouloir supprimer la facture du modèle? -BillCreated=%s facture (s) créée (s) diff --git a/htdocs/langs/fr_CA/categories.lang b/htdocs/langs/fr_CA/categories.lang index ce7287abbe9..482ef9dfa42 100644 --- a/htdocs/langs/fr_CA/categories.lang +++ b/htdocs/langs/fr_CA/categories.lang @@ -2,7 +2,6 @@ Rubriques=Tags/Catégories RubriquesTransactions=Tags / Catégories de transactions MembersCategoriesArea=Espace tags/catégories de membres -AccountsCategoriesArea=Étiquettes / catégories de comptes ProjectsCategoriesArea=Zone de tags / catégories de projets ImpossibleAddCat=Impossible d'ajouter le tag / catégorie %s ProductIsInCategories=Produit/service appartient aux tags/catégories suivant(e)s diff --git a/htdocs/langs/fr_CA/compta.lang b/htdocs/langs/fr_CA/compta.lang index 67522c477f0..677933700ee 100644 --- a/htdocs/langs/fr_CA/compta.lang +++ b/htdocs/langs/fr_CA/compta.lang @@ -38,9 +38,7 @@ ByExpenseIncome=Par dépenses et revenus LastCheckReceiptShort=Dernier %s vérifier les reçus NoWaitingChecks=Aucun chèque en attente de dépôt. PaySocialContribution=Payer une charge sociale -ConfirmPaySocialContribution=Êtes-vous sûr de vouloir classer cette charge sociale à payée ? DeleteSocialContribution=Effacer charge sociale -ConfirmDeleteSocialContribution=Êtes-vous sûr de vouloir supprimer cette charge sociale ? ExportDataset_tax_1=Charges sociales et paiements CalcModeVATDebt=Mode <b>%sTPS/TVH sur débit%s</b>. CalcModeVATEngagement=Mode <b>%s TPS/TVH sur encaissement%s</b>. @@ -53,7 +51,6 @@ RulesVATDueServices=- Pour les services, le rapport inclut les TVA TAXES) des fa WarningDepositsNotIncluded=Les factures de acompte ne sont pas incluses dans cette version avec ce module de comptabilité. DatePaymentTermCantBeLowerThanObjectDate=La date limite de règlement ne peut être inférieure à la date de l'object Pcg_version=Modèles de plan comptable -ToCreateAPredefinedInvoice=Pour créer une facture de modèle, créez une facture standard, puis, sans la valider, cliquez sur le bouton "%s". CalculationRuleDesc=Pour calculer le total de TPS/TVH, il existe 2 modes:<br>Le mode 1 consiste à arrondir la TPS/TVH de chaque ligne et à sommer cet arrondi.<br>Le mode 2 consiste à sommer la TPS/TVH de chaque ligne puis à l'arrondir.<br>Les résultats peuvent différer de quelques centimes. Le mode par défaut est le mode <b>%s</b>. ACCOUNTING_VAT_PAY_ACCOUNT=Compte comptable par défaut pour payer la TVA ACCOUNTING_ACCOUNT_CUSTOMER=Compte comptable utilisé pour les tiers clients diff --git a/htdocs/langs/fr_CA/main.lang b/htdocs/langs/fr_CA/main.lang index 75d2c1a9515..c65ead929f9 100644 --- a/htdocs/langs/fr_CA/main.lang +++ b/htdocs/langs/fr_CA/main.lang @@ -56,7 +56,6 @@ CurrencyRate=Taux de conversion monétaire UseLocalTax=Inclure taxe UnitPriceTTC=Prix unitaire tx incl. PriceUHT=Prix -PriceUHTCurrency=U.P (devise) PriceUTTC=P.U. (tx incl.) AmountTTCShort=Montant (tx incl.) AmountTTC=Montant (tx incl.) diff --git a/htdocs/langs/fr_CA/margins.lang b/htdocs/langs/fr_CA/margins.lang index b32e70a5949..afb4d8f174f 100644 --- a/htdocs/langs/fr_CA/margins.lang +++ b/htdocs/langs/fr_CA/margins.lang @@ -12,7 +12,6 @@ UserMargins=Marges de l'utilisateur ProductService=Produit et service ChooseProduct/Service=Choisissez un produit ou un service ForceBuyingPriceIfNull=Force achat / prix de revient au prix de vente si non défini -ForceBuyingPriceIfNullDetails=Si le prix d'achat / coût non défini, et cette option "ON", la marge sera nulle en ligne (prix d'achat / coût = prix de vente), sinon ("OFF"), marge sera égal au défaut suggéré. MARGIN_METHODE_FOR_DISCOUNT=Méthode de marge pour les réductions globales UseDiscountAsProduct=En tant que produit UseDiscountAsService=En tant que service @@ -25,7 +24,6 @@ CostPrice=Prix ​​de revient UnitCharges=Frais unitaires Charges=Des charges AgentContactType=Type de contact d'agent commercial -AgentContactTypeDetails=Définir le type de contact (lié sur les factures) sera utilisé pour le rapport de marge par représentant de vente rateMustBeNumeric=Le taux doit être une valeur numérique markRateShouldBeLesserThan100=Le taux de marquage devrait être inférieur à 100 ShowMarginInfos=Afficher les infos de marge diff --git a/htdocs/langs/fr_CA/modulebuilder.lang b/htdocs/langs/fr_CA/modulebuilder.lang index 2c9957b48a1..a482f9657e2 100644 --- a/htdocs/langs/fr_CA/modulebuilder.lang +++ b/htdocs/langs/fr_CA/modulebuilder.lang @@ -6,3 +6,4 @@ ModuleBuilderDeschooks=Cet onglet est dédié aux crochets. ModuleBuilderDescwidgets=Cet onglet est dédié à la gestion / création de widgets. DangerZone=Zone dangereuse DescriptionLong=Longue description +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_CA/productbatch.lang b/htdocs/langs/fr_CA/productbatch.lang index 84804506aca..128f91cc12c 100644 --- a/htdocs/langs/fr_CA/productbatch.lang +++ b/htdocs/langs/fr_CA/productbatch.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Utilisation du lot / numéro de série -ProductStatusOnBatch=Oui (lot / série requise) ProductStatusNotOnBatch=Non (lot / série non utilisé) Batch=Lot / série atleast1batchfield=Date de livraison ou date de vente ou Lot / Numéro de série diff --git a/htdocs/langs/fr_CA/products.lang b/htdocs/langs/fr_CA/products.lang index c438e57c302..897ca360dc9 100644 --- a/htdocs/langs/fr_CA/products.lang +++ b/htdocs/langs/fr_CA/products.lang @@ -53,7 +53,6 @@ SetDefaultBarcodeType=Définir le type de code à barres BarcodeValue=Valeur du code à barres NoteNotVisibleOnBill=Note (non visible sur les factures, propositions ...) ServiceLimitedDuration=Si le produit est un service à durée limitée: -AssociatedProductsAbility=Enable Kits (set of several products) ParentProductsNumber=Nombre de produits d'emballage pour les parents ParentProducts=Produits parentaux KeywordFilter=Filtre à mots clés @@ -139,7 +138,6 @@ AddUpdater=Ajouter une mise à jour UpdateInterval=Intervalle de mise à jour (minutes) CorrectlyUpdated=Correctement mis à jour PropalMergePdfProductActualFile=Les fichiers utilisés pour ajouter au PDF Azur sont / sont -IncludingProductWithTag=Y compris produit / service avec étiquette NbOfQtyInProposals=Qté dans les propositions ClinkOnALinkOfColumn=Cliquez sur un lien de la colonne %s pour obtenir une vue détaillée ... TranslatedLabel=Etiquette traduite diff --git a/htdocs/langs/fr_CA/stocks.lang b/htdocs/langs/fr_CA/stocks.lang index de1faa14427..e485e3a8efd 100644 --- a/htdocs/langs/fr_CA/stocks.lang +++ b/htdocs/langs/fr_CA/stocks.lang @@ -13,7 +13,6 @@ ErrorWarehouseRefRequired=Le nom de référence de l'entrepôt est requis StockMovementForId=ID de mouvement %d ListMouvementStockProject=Liste des mouvements de stock associés au projet StocksArea=Zone d'entrepôts -LocationSummary=Nom abrégé MassStockTransferShort=Transfert de stock de masse NumberOfUnit=Nombre d'unités UnitPurchaseValue=Prix ​​unitaire d'achat diff --git a/htdocs/langs/fr_CA/withdrawals.lang b/htdocs/langs/fr_CA/withdrawals.lang index 75020c6fcaf..d1c2577c8d4 100644 --- a/htdocs/langs/fr_CA/withdrawals.lang +++ b/htdocs/langs/fr_CA/withdrawals.lang @@ -56,7 +56,6 @@ SEPAFormYourBAN=Votre nom de compte bancaire (IBAN) SEPAFormYourBIC=Votre code d'identification de banque (BIC) ModeFRST=Paiement unique PleaseCheckOne=Veuillez cocher un seul -ICS=Creditor Identifier CI for direct debit InfoCreditSubject=Paiement de l'ordre de paiement de débit direct %s par la banque InfoCreditMessage=La ligne de paiement de débit direct %s a été payée par la banque <br> Données de paiement: %s InfoTransSubject=Transmission de l'ordre de paiement de débit direct %s à la banque diff --git a/htdocs/langs/fr_CH/accountancy.lang b/htdocs/langs/fr_CH/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/fr_CH/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/fr_CH/admin.lang b/htdocs/langs/fr_CH/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/fr_CH/admin.lang +++ b/htdocs/langs/fr_CH/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/modulebuilder.lang b/htdocs/langs/fr_CH/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/fr_CH/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_CH/products.lang b/htdocs/langs/fr_CH/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/fr_CH/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CH/withdrawals.lang b/htdocs/langs/fr_CH/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/fr_CH/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/fr_CI/accountancy.lang b/htdocs/langs/fr_CI/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/fr_CI/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/fr_CI/admin.lang b/htdocs/langs/fr_CI/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/fr_CI/admin.lang +++ b/htdocs/langs/fr_CI/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/modulebuilder.lang b/htdocs/langs/fr_CI/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/fr_CI/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_CI/products.lang b/htdocs/langs/fr_CI/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/fr_CI/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CI/withdrawals.lang b/htdocs/langs/fr_CI/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/fr_CI/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/fr_CM/accountancy.lang b/htdocs/langs/fr_CM/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/fr_CM/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/fr_CM/admin.lang b/htdocs/langs/fr_CM/admin.lang index b68a0680537..619ae5f8bd4 100644 --- a/htdocs/langs/fr_CM/admin.lang +++ b/htdocs/langs/fr_CM/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/modulebuilder.lang b/htdocs/langs/fr_CM/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/fr_CM/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_CM/products.lang b/htdocs/langs/fr_CM/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/fr_CM/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CM/withdrawals.lang b/htdocs/langs/fr_CM/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/fr_CM/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 4441dd4e1f9..68c6f4841c5 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -126,7 +126,7 @@ AccountBalance=Balance des comptes ObjectsRef=Référence de l'objet source CAHTF=Total achat fournisseur HT TotalExpenseReport=Total note de frais -InvoiceLines=Lignes de factures à ventiler +InvoiceLines=Lignes de factures à lier InvoiceLinesDone=Lignes de factures liées ExpenseReportLines=Lignes de notes de frais à lier ExpenseReportLinesDone=Lignes de notes de frais liées @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Libellé journal NumPiece=Numéro de pièce TransactionNumShort=Num. transaction -AccountingCategory=Groupes personnalisés +AccountingCategory=Custom group GroupByAccountAccounting=Affichage par compte comptable GroupBySubAccountAccounting=Affichage par compte auxiliaire AccountingAccountGroupsDesc=Vous pouvez définir ici des groupes de comptes comptable. Il seront utilisés pour les reporting comptables personnalisés @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lignes non encore liées, utilisez le menu <a href="% ## Import ImportAccountingEntries=Écritures comptables +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Date d'export WarningReportNotReliable=Attention : ce rapport n'est pas basé sur le grand livre et ne contient donc pas les écritures manuelles qui lui ont été ajoutées. Si votre journalisation est à jour, la vue depuis le grand livre sera plus précise. ExpenseReportJournal=Journal des notes de frais InventoryJournal=Journal d'inventaire + +NAccounts=%s accounts diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 93eaaea1772..5d46f36ab0f 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Lever blocage des connexions YourSession=Votre session Sessions=Sessions utilisateurs WebUserGroup=Utilisateur/groupe du serveur Web +PermissionsOnFiles=Permissions sur les fichiers PermissionsOnFilesInWebRoot=Permissions sur les fichiers du répertoire racine PermissionsOnFile=Permissions sur le fichier %s NoSessionFound=Votre PHP ne semble pas pouvoir lister les sessions actives. Le répertoire de sauvegarde des sessions (<b>%s</b>) est peut être protégé (Par exemple, par les permissions de l'OS ou par la directive open_basedir de votre PHP, ce qui d'un point de vue sécurité est une bonne chose). @@ -57,11 +58,12 @@ SetupArea=Configuration UploadNewTemplate=Téléverser un / des nouveau(x) modèle(s) FormToTestFileUploadForm=Formulaire de test d'envoi de fichier (selon options choisies) ModuleMustBeEnabled=Le module <b>%s</b>doit être activé -ModuleIsEnabled=Le module <b>%s</b>à été désactivé +ModuleIsEnabled=Le module/application <b>%s</b> a été activé IfModuleEnabled=Rem: oui est effectif uniquement si le module <b>%s</b> est activé RemoveLock=Effacer le fichier <b>%s</b> s'il existe afin d'autoriser l'outil de mise à jour. RestoreLock=Replacer un fichier <b>%s</b>, en ne donnant que les droits de lecture sur ce fichier, afin d'interdire à nouveau les mises à jour. SecuritySetup=Configuration de la sécurité +PHPSetup=PHP setup SecurityFilesDesc=Définissez ici les options de sécurité des téléchargements de fichiers ErrorModuleRequirePHPVersion=Erreur, ce module requiert une version %s ou supérieure de PHP ErrorModuleRequireDolibarrVersion=Erreur, ce module requiert une version %s ou supérieure de Dolibarr @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Cet espace offre des fonctions d'administration diverses. Ut Purge=Purger PurgeAreaDesc=Cette page vous permet d'effacer tous les fichiers construits ou stockés par Dolibarr (fichiers temporaires ou tous les fichiers du répertoire <b>%s</b>). L'utilisation de cette fonction n'est pas nécessaire. Elle est fournie pour les utilisateurs qui hébergent Dolibarr chez un hébergeur qui n'offre pas les permissions de supprimer les fichiers sauvegardés par le serveur Web. PurgeDeleteLogFile=Effacer les fichiers de traces de debug, incluant <b>%s</b> défini dans le module 'Journaux et traces' (pas de risque de perte de données) -PurgeDeleteTemporaryFiles=Effacer tous les fichiers de log et fichiers temporaires (pas de risque de perte de données). Note : La suppression s'applique aux fichiers supprimés depuis plus de 24 heures. +PurgeDeleteTemporaryFiles=Supprimer tous les fichiers journaux et temporaires (aucun risque de perte de données). Le paramètre peut être "tempfilesold", "logfiles" ou les deux "tempfilesold + logfiles". Remarque : la suppression des fichiers temporaires est effectuée uniquement si le répertoire temporaire qui le contient a été créé il y a plus de 24 heures. PurgeDeleteTemporaryFilesShort=Effacer les fichiers de log et fichiers temporaires PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire <b>%s</b>. <br>Les fichiers temporaires mais aussi les fichiers «dumps» de sauvegarde de base de données, les fichiers joints aux éléments (tiers, factures, ...) ou fichiers stockés dans le module GED seront irrémédiablement effacés. PurgeRunNow=Lancer la purge maintenant @@ -223,7 +225,7 @@ Nouveauté=Nouveauté AchatTelechargement=Acheter/télécharger GoModuleSetupArea=Pour déployer/installer un nouveau module, rendez vous dans la zone de configuration des modules : <a href="%s">%s</a> DoliStoreDesc=DoliStore, la place de marché officielle des modules et extensions complémentaires pour Dolibarr ERP/CRM -DoliPartnersDesc=Liste de quelques sociétés qui peuvent fournir/développer des modules ou fonctions sur mesure. <br>Remarque: Dolibarr étant une application Open Source,<i>toute</i>société Open Source connaissant le langage PHP peut fournir du développement spécifique. +DoliPartnersDesc=Liste de quelques sociétés qui peuvent fournir/développer des modules ou fonctions sur mesure. <br>Remarque: Dolibarr étant une application Open Source, <i>toute société</i> connaissant le langage PHP peut fournir du développement spécifique. WebSiteDesc=Sites fournisseurs à consulter pour trouver plus de modules (extensions)... DevelopYourModuleDesc=Quelques pistes pour développer votre propre module/application... URL=URL @@ -232,6 +234,7 @@ BoxesAvailable=Widgets disponibles BoxesActivated=Widgets activés ActivateOn=Activer sur ActiveOn=Active sur +ActivatableOn=Activable sur SourceFile=Fichier source AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponible uniquement si Javascript activé Required=Requis @@ -284,7 +287,7 @@ MAIN_MAIL_SMTP_SERVER=Nom d'hôte ou adresse IP du serveur SMTP/SMTPS (Par défa MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Port du serveur SMTP/SMTPS (Non défini dans le PHP sur les systèmes de type Unix) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Nom d'hôte ou adresse IP du serveur SMTP/SMTPS (Non défini dans le PHP sur les systèmes de type Unix) MAIN_MAIL_EMAIL_FROM=Adresse email de l'émetteur pour l'envoi d'emails automatiques (Par défaut dans php.ini: <b>%s</b>) -MAIN_MAIL_ERRORS_TO=E-mail utilisé les retours d'erreur (champ "Errors-To" dans les e-mails envoyés) +MAIN_MAIL_ERRORS_TO=E-mail utilisé pour les retours d'erreur (champ "Errors-To" dans les e-mails envoyés) MAIN_MAIL_AUTOCOPY_TO= Envoyer systématiquement une copie cachée (Bcc) des emails envoyés à MAIN_DISABLE_ALL_MAILS=Désactiver globalement tout envoi d'emails (pour mode test ou démos) MAIN_MAIL_FORCE_SENDTO=Envoyer tous les emails à (au lieu des vrais destinataires, à des fins de test) @@ -350,6 +353,7 @@ WithCounter=Gérer un compteur GenericMaskCodes=Vous pouvez saisir tout masque de numérotation. Dans ce masque, les balises suivantes peuvent être utilisées:<br><b>{000000}</b> correspond à un numéro qui sera incrémenté à chaque %s. Mettre autant de zéro que la longueur désirée du compteur. Le compteur sera complété par des 0 à gauche afin d'avoir autant de zéro que dans le masque.<br><b>{000000+000}</b> idem que précédemment mais un décalage correspondant au nombre à droite du + est appliqué dès la première %s.<br><b>{000000@x}</b> idem que précédemment mais le compteur est remis à zéro le xème mois de l'année (x entre 1 et 12, ou 0 pour utiliser le mois de début d'exercice fiscal défini dans votre configuration, ou 99 pour remise à zéro chaque mois). Si cette option est utilisée et x vaut 2 ou plus, alors la séquence {yy}{mm} ou {yyyy}{mm} est obligatoire. <br><b>{dd}</b> jour (01 à 31).<br><b>{mm}</b> mois (01 à 12).<br><b>{yy}</b>, <b>{yyyy}</b> ou <b>{y}</b> année sur 2, 4 ou 1 chiffres.<br> GenericMaskCodes2=<b>{cccc}</b> : code client sur n caractères<br><b>{cccc000}</b> : code client sur n caractères suivi d'un compteur propre au client. Ce compteur propre au client est remis à zéro en même temps que le compteur général.<br><b>{tttt}</b> code du type de tiers sur n caractères (Voir menu Accueil > Configuration > Dictionnaires > Types de tiers). Si vous ajoutez cet élément au masque de numérotation, le compteur sera différent pour chaque type de tiers.<br> GenericMaskCodes3=Tout autre caractère dans le masque sera laissé inchangé.<br>Les espaces ne sont pas permis.<br> +GenericMaskCodes3EAN=Tous les autres caractères du masque resteront intacts (sauf * ou ? en 13ème position dans EAN13). <br>Les espaces ne sont pas autorisés.<br> Dans EAN13, le dernier caractère après le dernier } en 13ème position doit être * ou ? . Il sera remplacé par la clé calculée.<br> GenericMaskCodes4a=<u>Exemple sur la 99eme %s du tiers LaCompanie faite le 31/01/2007:</u><br> GenericMaskCodes4b=<u>Exemple sur un tiers créé le 31/03/2007 :</u><br> GenericMaskCodes4c=<u>Exemple sur un produit/service créé le 31/03/2007 :</u><br> @@ -445,7 +449,7 @@ ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur (où la cl ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur (où la clé ne peut être '0')<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>... ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur (où la clé ne peut être '0')<br><br> par exemple : <br>1,valeur1<br>2,valeur2<br>3,valeur3<br>... ExtrafieldParamHelpsellist=Les paramètres de la liste viennent d'une table<br>Syntax : table_name:label_field:id_field::filter<br>Exemple : c_typent:libelle:id::filter<br><br>- id_field est nécessairement une clé primaire de type int<br>- filter peut être un simple test (e.g. active=1 pour seulement montrer les valeurs actives)<br>Vous pouvez aussi utiliser $ID$ dans le filtre qui est le ID actuel de l'objet<br>Pour faire un SELECT dans le filtre, utilisez le mot clé $SEL$ pour passer outre la protection système anti-injection<br>Si vous voulez filtrer sur un extrafield, utilisez la syntaxe extra.fieldcode=... (ou fieldcode est le code de l'extrafield)<br><br>Pour avoir une liste qui dépend d'un autre attribut complémentaire:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>Pour avoir une liste qui dépend d'une autre liste:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Les paramètres de la liste proviennent d'une table<br>:Syntaxe : nom_de_la_table:libelle_champ:id_champ::filtre<br>Exemple : c_typent:libelle:id::filter<br><br>le filtre peut n'est qu'un test (ex : active=1) pour n'afficher que les valeurs actives.<br>Vous pouvez aussi utiliser $ID$ dans les filtres pour indiquer l'ID de l'élément courant.<br>Pour utiliser un SELECT dans un filtre, utilisez $SEL$<br>Pour filtrer sur un attribut supplémentaire, utilisez la syntaxeextra.fieldcode=... (ou fieldcode est le code de l'attribut supplémentaire)<br><br>Pour afficher une liste dépendant d'un autre attribut supplémentaire : <br>c_typent:libelle:id:options_<i>code_liste_parente</i>|colonne_parente:filtre <br><br>Pour afficher une liste dépendant d'une autre liste : <br>c_typent:libelle:id:<i>code_liste_parente</i>|colonne_parente:filter +ExtrafieldParamHelpchkbxlst=Les paramètres de la liste proviennent d'une table<br>:Syntaxe : nom_de_la_table:libelle_champ:id_champ::filtresql<br>Exemple : c_typent:libelle:id::filtresql<br><br>le filtre peut être un simple test (ex : active=1) pour n'afficher que les valeurs actives.<br>Vous pouvez aussi utiliser $ID$ dans les filtres pour indiquer l'ID de l'élément courant.<br>Pour utiliser un SELECT dans un filtre, utilisez $SEL$<br>Pour filtrer sur un attribut supplémentaire, utilisez la syntaxe extra.fieldcode=... (ou fieldcode est le code de l'attribut supplémentaire)<br><br>Pour afficher une liste dépendant d'un autre attribut supplémentaire : <br>c_typent:libelle:id:options_<i>code_list_parent</i>|colonne_parente:filtre <br><br>Pour afficher une liste dépendant d'une autre liste : <br>c_typent:libelle:id:<i>code_liste_parente</i>|colonne_parente:filter ExtrafieldParamHelplink=Les paramètres doivent être ObjectName:Classpath <br> Syntaxe: ObjectName:Classpath ExtrafieldParamHelpSeparator=Garder vide pour un simple séparateur <br> Définissez-le sur 1 pour un séparateur auto-déroulant (ouvert par défaut pour une nouvelle session, puis le statut est conservé pour la session de l'utilisateur) <br> Définissez ceci sur 2 pour un séparateur auto-déroulant (réduit par défaut pour une nouvelle session, puis l'état est conservé pour chaque session d'utilisateur). LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF @@ -510,7 +514,7 @@ WatermarkOnDraftExpenseReports=Filigrane sur les notes de frais AttachMainDocByDefault=Définissez cette valeur sur 1 si vous souhaitez joindre le document principal au courrier électronique par défaut (si applicable) FilesAttachedToEmail=Joindre le fichier SendEmailsReminders=Envoyer des rappels agenda par e-mails -davDescription=Ajout d'un composant pour devenir un serveur DAV +davDescription=Ajout d'un composant pour devenir un serveur WebDAV DAVSetup=Configuration du module DAV DAV_ALLOW_PRIVATE_DIR=Activer le répertoire privé générique (répertoire dédié WebDAV nommé "private" - identification requise) DAV_ALLOW_PRIVATE_DIRTooltip=Le répertoire privé générique est un répertoire WebDAV auquel tout le monde peut accéder avec son login / mot de passe. @@ -541,6 +545,8 @@ Module40Name=Fournisseurs Module40Desc=Gestion des fournisseurs et des achats (commandes et factures fournisseurs) Module42Name=Journaux et traces de Debug Module42Desc=Systèmes de logs ( fichier, syslog,... ). De tels logs ont un but technique / de débogage. +Module43Name=Barre de débogage +Module43Desc=Un outil pour les développeurs ajoutant une barre de débogage dans votre navigateur. Module49Name=Éditeurs Module49Desc=Gestion des éditeurs Module50Name=Produits @@ -590,7 +596,7 @@ Module320Desc=Ajout de flux d'informations RSS dans les écrans Dolibarr Module330Name=Marque-pages et raccourci Module330Desc=Créez des raccourcis, toujours accessibles, vers les pages internes ou externes auxquelles vous accédez fréquemment Module400Name=Projets ou Opportunités -Module400Desc=Gestion des projets, opportunités/affaires et/ou tâches. Vous pouvez aussi assigner tous les autres éléments (facture, commande, proposition, intervention, ...) à un projet et avoir une vue transverse depuis la vue projet. +Module400Desc=Gestion des projets, leads/opportunités/affaires et/ou tâches. Vous pouvez aussi assigner tous les autres éléments (facture, commande, proposition, intervention, ...) à un projet et avoir une vue transverse depuis la vue projet. Module410Name=Webcalendar Module410Desc=Interface avec le calendrier Webcalendar Module500Name=Taxes et dépenses spéciales @@ -630,7 +636,7 @@ Module2600Name=API/Web services (serveur SOAP) Module2600Desc=Active le server SOAP Dolibarr fournissant des services API Module2610Name=API/Web services (serveur REST) Module2610Desc=Active le server REST Dolibarr fournissant des services API -Module2660Name=Appelle de Webservices externes (client SOAP) +Module2660Name=Appel de Webservices externes (client SOAP) Module2660Desc=Activez le client Dolibarr de services Web (Peut être utilisé pour pousser des données/demandes vers des serveurs externes. Seules les commandes Fournisseurs sont prises en charge pour le moment) Module2700Name=Gravatar Module2700Desc=Utilise le service en ligne Gravatar (www.gravatar.com) pour afficher les photos d'utilisateurs/adhérents (en fonction leur email). Besoin d'un accès Internet @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Capacités de conversion GeoIP Maxmind Module3200Name=Archives/Logs Inaltérables Module3200Desc=Active la journalisation de certains événements métiers dans une log/archive inaltérable. Les événements sont archivés en temps réel. L'archive est une table d'événements chaînés qui peut être lu uniquement et exporté. Ce module permet d'être compatible avec les exigences des lois de certains pays (comme par exemple la loi Finance 2016 ou norme 525 en France). +Module3400Name=Réseaux sociaux +Module3400Desc=Activez les champs de réseaux sociaux dans les tiers et les adresses (skype, twitter, facebook, ...). Module4000Name=GRH Module4000Desc=Gestion des ressources humaines (gestion du département, contrats des employés et appréciations) Module5000Name=Multi-société Module5000Desc=Permet de gérer plusieurs sociétés -Module6000Name=Workflow -Module6000Desc=Gestion du workflow (création automatique d'objet et / ou changement automatique d'état) +Module6000Name=Workflow Inter-modules +Module6000Desc=Gestion du workflow entre différents modules (création automatique d'objet et / ou de changement automatique d'état) Module10000Name=Sites web Module10000Desc=Créer des sites web (publiques) avec un éditeur WYSIWYG. Il s'agit d'un CMS orienté webmaster ou développeur (il est préférable de connaître les langages HTML et CSS). Il suffit de configurer votre serveur web (Apache, Nginx, ....) pour qu'il pointe vers le répertoire Dolibarr dédié afin de le faire fonctionner sur Internet avec votre propre nom de domaine. Module20000Name=Demandes de congés @@ -805,7 +813,8 @@ PermissionAdvanced253=Créer/modifier les utilisateurs internes/externes et leur Permission254=Créer/modifier les utilisateurs externes seulement Permission255=Modifier le mot de passe des autres utilisateurs Permission256=Supprimer ou désactiver les autres utilisateurs -Permission262=Étendre l'accès à tous les tiers (pas seulement ceux dont l'utilisateur est enregistré en tant que commercial). <br>Non effectif pour les utilisateurs externes (toujours limités à eux-mêmes sur les propositions commerciales, commandes, factures, contrats, etc).<br>Non effectif sur les projets (seules s'appliquent les permissions propres au module projet, et les règles de visibilité et d'assignation du projet) +Permission262=Étendre l'accès à tous les tiers ET leurs objets (pas seulement ceux dont l'utilisateur est enregistré en tant que commercial). <br>Non effectif pour les utilisateurs externes (toujours limités à eux-mêmes sur les propositions commerciales, commandes, factures, contrats, etc).<br>Non effectif sur les projets (seules s'appliquent les permissions propres au module projet, et les règles de visibilité et d'assignation du projet) +Permission263=Étendre l'accès à tous les tiers SANS leurs objets (pas seulement les tiers pour lesquels l'utilisateur est un représentant commercial). <br> Non efficace pour les utilisateurs externes (toujours limités à eux-mêmes pour les propositions, commandes, factures, contrats, etc.). <br> Non efficace pour les projets (seules les règles sur les autorisations de projet, la visibilité et l'attribution sont importantes). Permission271=Consulter le chiffre d'affaires Permission272=Consulter les factures Permission273=Émettre les factures @@ -875,7 +884,7 @@ 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=Lisez les notes de frais de tout le monde +Permission777=Lire les notes de frais de tout le monde Permission778=Créer / modifier les notes de frais de tout le monde Permission779=Exporter les notes de frais Permission1001=Consulter les stocks @@ -1175,7 +1184,8 @@ SetupDescription2=Les deux étapes obligatoires sont les deux premières entrée SetupDescription3=<a href="%s">%s -> %s</a><br><br>Paramètres basiques pour personnaliser le comportement par défaut du logiciel (comportement lié au pays par exemple). SetupDescription4=<a href="%s"> %s -> %s </a><br> <br>Ce logiciel est un ensemble de plusieurs modules/applications. Les fonctionnalités en rapport avec vos besoins doivent être activées et configurées. Les entrées menus seront ajoutées avec l'activation de ces modules. SetupDescription5=Les autres entrées de configuration gèrent des paramètres facultatifs. -LogEvents=Événements d'audit de sécurité +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit de sécurité InfoDolibarr=Infos Dolibarr InfoBrowser=Infos navigateur @@ -1197,7 +1207,7 @@ CompanyFundationDesc=Modifiez les informations de votre société/organisation. AccountantDesc=Si vous avez un comptable externe, vous pouvez saisir ici ses informations. AccountantFileNumber=Code comptable DisplayDesc=Vous pouvez choisir ici tous les paramètres liés à l'apparence de Dolibarr -AvailableModules=Modules/applications installés +AvailableModules=Modules/applications disponibles ToActivateModule=Pour activer des modules, aller dans l'espace Configuration (Accueil->Configuration->Modules). SessionTimeOut=Délai expiration des sessions SessionExplanation=Ce nombre garanti que la session n'expire pas avant ce délai, lorsque le nettoyage des sessions est assurés par le mécanisme de nettoyage interne à PHP (et aucun autre). Le nettoyage interne de sessions PHP ne garantie pas que la session expire juste au moment de ce délai. Elle expirera après ce délai, mais au moment du nettoyage des sessions, qui a lieu toutes les <b>%s/%s</b> accès environ, mais uniquement lors d'accès fait par d'autres sessions (si la valeur est 0, cela signifie que le nettoyage des session est fait par un process externe).<br>Note: sur certains serveurs munis d'un mécanisme de nettoyage de session externe (cron sous Debian, Ubuntu…), le sessions peuvent être détruites après un délai, défini par une configuration extérieure, quelle que soit la valeur saisie ici. @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Nom/Adresse du serveur proxy mandataire MAIN_PROXY_PORT=Port du serveur proxy mandataire MAIN_PROXY_USER=Identifiant pour passer le serveur proxy mandataire MAIN_PROXY_PASS=Mot de passe pour passer le serveur proxy mandataire -DefineHereComplementaryAttributes=Définissez ici la liste des attributs supplémentaires que vous voulez gérer sur les %s. +DefineHereComplementaryAttributes=Définissez des attributs supplémentaires ou personnalisés qui seront ajoutés a : %s. ExtraFields=Attributs supplémentaires ExtraFieldsLines=Attributs supplémentaires (lignes) ExtraFieldsLinesRec=Attributs supplémentaires (ligne de factures modèles) @@ -1308,7 +1318,7 @@ YouUseBestDriver=Vous utilisez le driver %s qui est le driver recommandé actuel YouDoNotUseBestDriver=Vous utilisez le pilote %s mais le pilote %s est recommandé. NbOfObjectIsLowerThanNoPb=Vous avez seulement %s %s dans la base de données. Cela ne nécessite aucune optimisation particulière. SearchOptim=Optimisation des recherches -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can 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. +YouHaveXObjectUseSearchOptim=Vous avez %s %s dans la base de données. Vous devez ajouter la constante %s à 1 dans Accueil-Configuration-Autre. Ceci limite la recherche au début des chaînes, ce qui permet à la base de données d'utiliser des index et vous devriez obtenir une réponse immédiate. YouHaveXObjectAndSearchOptimOn=Vous avez %s %s dans la base de données et la constante %s est définie sur 1 dans Accueil-Configuration-Autre. BrowserIsOK=Vous utilisez le navigateur Web %s. Ce navigateur est correct pour la sécurité et la performance. BrowserIsKO=Vous utilisez le navigateur %s. Ce navigateur est déconseillé pour des raisons de sécurité, performance et qualité des pages restituées. Nous vous recommandons d'utiliser Firefox, Chrome, Opera ou Safari. @@ -1326,7 +1336,7 @@ DocumentModules=Modèles de documents ##### Module password generation PasswordGenerationStandard=Renvoie un mot de passe généré selon l'algorythme interne de Dolibarr :%s caractères contenant chiffres et minuscules PasswordGenerationNone=Ne pas suggérer un mot de passe généré. Le mot de passe doit être entré manuellement. -PasswordGenerationPerso=Retourner un mot de passe en fonction de votre configuration personnellement défini. +PasswordGenerationPerso=Renvoie un mot de passe en fonction d'une configuration personnalisée. SetupPerso=Selon votre configuration PasswordPatternDesc=Description du masque du mot de passe ##### Users setup ##### @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Identifiant (unix) LDAPFieldLoginExample=Exemple : uid LDAPFilterConnection=Filtre de recherche LDAPFilterConnectionExample=Exemple : &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Exemple: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Identifiant (samba, activedirectory) LDAPFieldLoginSambaExample=Exemple : samaccountname LDAPFieldFullname=Prénom Nom @@ -1570,7 +1581,7 @@ NotInstalled=Non installé. NotSlowedDownByThis=Non ralenti par cela. NotRiskOfLeakWithThis=Pas de risque de fuite de données avec cela. ApplicativeCache=Cache applicatif -MemcachedNotAvailable=Aucun cache applicatif trouvé. Vous pouvez accélérer les performances de Dolibarr en installant un serveur de cache Memcached et un module de cache applicatif exploitant ce serveur.<br>Plus d'info sur la page <a href="http://wiki.dolibarr.org/index.php/Module_MemCached">http://wiki.dolibarr.org/index.php/Module_MemCached</a>. Notez que de nombreux hébergeurs low-cost ne fournissent pas de tels serveurs de cache dans leur infrastructure. +MemcachedNotAvailable=Aucun cache applicatif trouvé. Vous pouvez accélérer les performances de Dolibarr en installant un serveur de cache Memcached et un module de cache applicatif exploitant ce serveur.<br>Plus d'info ici<a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">https://wiki.dolibarr.org/index.php/Module_MemCached</a>.<br>Notez que de nombreux hébergeurs low-cost ne fournissent pas de tels serveurs de cache dans leur infrastructure. MemcachedModuleAvailableButNotSetup=Le module memcached pour le cache applicatif a été trouvé mais la configuration de ce module n'est pas complète. MemcachedAvailableAndSetup=Le module memcached dédié à l'utilisation du serveur de cache memcached est activé. OPCodeCache=Cache OPCode @@ -1599,9 +1610,9 @@ ProductServiceSetup=Configuration des modules Produits et Services NumberOfProductShowInSelect=Nombre maximum de produits dans les listes déroulantes (0=aucune limite) ViewProductDescInFormAbility=Afficher les descriptions de produits dans les formulaires (sinon, comme info-bulle contextuelle) DoNotAddProductDescAtAddLines=Ne pas ajouter la description du produit (saisie sur sa fiche) à l'ajout d'un produit -OnProductSelectAddProductDesc=Comment utiliser la description des produits à leur ajout dans un ligne de document +OnProductSelectAddProductDesc=Comment utiliser la description des produits lors de l'ajout d'un produit en tant que ligne d'un document AutoFillFormFieldBeforeSubmit=Remplir automatiquement le champ description avec la description du produit -DoNotAutofillButAutoConcat=Ne pas remplir automatiquement le champ description avec la description du produit. La description sera concaténée à la description du produit. +DoNotAutofillButAutoConcat=Ne pas remplir automatiquement le champ de saisie avec la description du produit. La description du produit sera concaténée automatiquement avec la description saisie. DoNotUseDescriptionOfProdut=La description du produit ne sera jamais ajoutée dans la description des lignes MergePropalProductCard=Ajoute dans l'onglet Fichiers joints des produits/services, une option pour fusionner le document PDF du produit au PDF des propositions Azur si le produit/services est inclut dans la proposition. ViewProductDescInThirdpartyLanguageAbility=Afficher la description des produits sur les formulaires dans la langue du tiers (sinon dans la langue de l'utilisateur) @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Votre société/institution est définie comme non assu AccountancyCode=Code comptable AccountancyCodeSell=Code comptable vente AccountancyCodeBuy=Code comptable achat +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Laissez la case à cocher "Créer automatiquement le paiement" vide par défaut lors de la création d'une nouvelle taxe ##### Agenda ##### AgendaSetup=Configuration du module actions et agenda PasswordTogetVCalExport=Clé pour autoriser le lien d'exportation +SecurityKey = Security Key PastDelayVCalExport=Ne pas exporter les événements de plus de AGENDA_USE_EVENT_TYPE=Utiliser les types d'événements (gérés dans le menu Configuration -> Dictionnaires -> Type d'événements de l'agenda) AGENDA_USE_EVENT_TYPE_DEFAULT=Configurez automatiquement cette valeur par défaut pour le type d'événement dans le formulaire de création d'événement. @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tables MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai) NbAddedAutomatically=Nombre de jours ajoutés aux compteurs des utilisateurs (automatiquement) chaque mois -EnterAnyCode=Ce champ contient une référence pour identifier le champ. Entrez une valeur de votre choix, mais sans caractères spéciaux. +EnterAnyCode=Ce champ contient une référence pour identifier l'enregistrement. Entrez une valeur de votre choix, mais sans caractères spéciaux. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Entrez la règle de calcul si le champ précédent a été défini sur Oui.<br>Par exemple:<br>CODEGRP1 + CODEGRP2 SeveralLangugeVariatFound=Plusieurs variantes de langue trouvées RemoveSpecialChars=Supprimer les caractères spéciaux COMPANY_AQUARIUM_CLEAN_REGEX=Filtre Regex pour nettoyer la valeur (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Configuration du module Réseaux Sociaux EnableFeatureFor=Activer les fonctionnalités pour <strong> %s </strong> VATIsUsedIsOff=Remarque: l'option d'utilisation de la taxe de vente ou de la TVA a été définie sur <strong> Désactivée </strong> dans le menu %s - %s, aussi la taxe de vente ou la TVA utilisée sera toujours égale à 0 pour les ventes. SwapSenderAndRecipientOnPDF=Inverser la position des adresses expéditeurs et destinataires sur les documents PDF -FeatureSupportedOnTextFieldsOnly=Attention, fonctionnalité prise en charge sur les champs de texte uniquement. De plus, un paramètre d'URL action=create ou action=edit doit être défini OU le nom de la page doit se terminer par 'new.php' pour déclencher cette fonctionnalité. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Collecteur de courrier électronique EmailCollectorDescription=Ajoute un travail planifié et une page de configuration pour analyser régulièrement les boîtes aux lettres (à l'aide du protocole IMAP) et enregistrer les courriers électroniques reçus dans votre application, au bon endroit et/ou créer automatiquement certains enregistrements (comme des opportunités). NewEmailCollector=Nouveau collecteur d'email @@ -2049,8 +2062,11 @@ UseDebugBar=Utilisez la barre de débogage DEBUGBAR_LOGS_LINES_NUMBER=Nombre de dernières lignes de logs à conserver dans la console WarningValueHigherSlowsDramaticalyOutput=Attention, les valeurs élevées ralentissent considérablement les affichages ModuleActivated=Le module %s est activé et ralentit l'interface +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Sur un environnement de production, vous devriez régler ce paramètre sur %s. AntivirusEnabledOnUpload=Antivirus activé sur le téléversement des fichiers +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Les modèles d'exportation sont partagés avec tout le monde ExportSetup=Configuration du module Export ImportSetup=Configuration du module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Effectuez un ping «+1» anonyme sur le serveur de la fondatio FeatureNotAvailableWithReceptionModule=Fonction non disponible lorsque le module Réception est activée EmailTemplate=Modèle d'e-mail EMailsWillHaveMessageID=Les e-mails auront une étiquette 'References' correspondant à cette syntaxe +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Si vous souhaitez que certains textes de votre PDF soient dupliqués dans 2 langues différentes dans le même PDF généré, vous devez définir ici cette deuxième langue pour que le PDF généré contienne 2 langues différentes dans la même page, celle choisie lors de la génération du PDF et celle-ci (seuls quelques modèles PDF prennent en charge cette fonction). Gardez vide pour 1 langue par PDF. FafaIconSocialNetworksDesc=Entrez ici le code d'une icône FontAwesome. Si vous ne savez pas ce qu'est FontAwesome, vous pouvez utiliser la valeur générique fa-address-book. FeatureNotAvailableWithReceptionModule=Fonction non disponible lorsque le module Réception est activée @@ -2088,10 +2106,19 @@ MailToSendEventPush=Rappel d'événement par e-mail SwitchThisForABetterSecurity=Remplacer cette valeur par %s est recommandé pour plus de sécurité DictionaryProductNature= Nature de produit CountryIfSpecificToOneCountry=Pays (si spécifique à un pays donné) -YouMayFindSecurityAdviceHere=Trouvez ici des conseils de sécurité. -ModuleActivatedMayExposeInformation=Ce module peut exposer des données sensibles. Si il n'est pas nécessaire, désactivez-le. +YouMayFindSecurityAdviceHere=Vous trouverez ici des informations et conseils de sécurité. +ModuleActivatedMayExposeInformation=Cette extension PHP peut exposer des données sensibles. Si vous n'en avez pas besoin, désactivez-la. ModuleActivatedDoNotUseInProduction=Un module conçu pour le développement a été activé. Ne l'activez pas sur un environnement de production CombinationsSeparator=Séparateur de caractères pour les combinaisons de produits SeeLinkToOnlineDocumentation=Suivez le lien vers la documentation en ligne depuis le menu du haut pour des exemples SHOW_SUBPRODUCT_REF_IN_PDF=Afficher les détails des sous-produits d'un kit dans les PDF si la fonctionnalité "%s" du module <b>%s</b> est activée. AskThisIDToYourBank=Contacter votre établissement bancaire pour obtenir ce code +AdvancedModeOnly=Autorisation disponible en mode Autorisations avancées uniquement +ConfFileIsReadableOrWritableByAnyUsers=Le fichier conf est lisible ou inscriptible par tous les utilisateurs. Donnez l'autorisation à l'utilisateur et au groupe du serveur Web uniquement. +MailToSendEventOrganization=Organisation d'événements +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 072fd057dbf..0b4afd8e06e 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -4,7 +4,7 @@ Actions=Événements Agenda=Agenda TMenuAgenda=Agenda Agendas=Agendas -LocalAgenda=Calendrier interne +LocalAgenda=Calendrier par défaut ActionsOwnedBy=Propriétaire de l'événement ActionsOwnedByShort=Propriétaire AffectedTo=Affecté à @@ -20,7 +20,7 @@ MenuToDoActions=Événements incomplets MenuDoneActions=Événements terminés MenuToDoMyActions=Mes événem. incomplets MenuDoneMyActions=Mes événem. terminés -ListOfEvents=Liste des événements (calendrier interne) +ListOfEvents=Liste des événements (calendrier par défaut) ActionsAskedBy=Événements enregistrés par ActionsToDoBy=Événements affectés à ActionsDoneBy=Événements réalisés par @@ -119,6 +119,7 @@ MRP_MO_UNVALIDATEInDolibarr=OF mis à l'état de brouillon MRP_MO_PRODUCEDInDolibarr=OF réalisé MRP_MO_DELETEInDolibarr=OF supprimé MRP_MO_CANCELInDolibarr=OF annulé +PAIDInDolibarr=%s payé ##### End agenda events ##### AgendaModelModule=Modèle de document pour les événements DateActionStart=Date de début @@ -130,7 +131,7 @@ AgendaUrlOptions4=<b>logint=%s</b>pour limiter l'export aux actions assignées AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> pour restreindre aux événements associés au projet <b>__PROJECT_ID__</b>. AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> pour exclure les événements automatiques. AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> pour inclure les événements de type congé. -AgendaShowBirthdayEvents=Afficher les anniversaires de contacts +AgendaShowBirthdayEvents=Anniversaires des contacts AgendaHideBirthdayEvents=Masquer les anniversaires de contacts Busy=Occupé ExportDataset_event1=Liste des événements de l'agenda diff --git a/htdocs/langs/fr_FR/assets.lang b/htdocs/langs/fr_FR/assets.lang index b3de8a0f525..d93545cb6a4 100644 --- a/htdocs/langs/fr_FR/assets.lang +++ b/htdocs/langs/fr_FR/assets.lang @@ -61,5 +61,7 @@ MenuListTypeAssets = Liste # # Module # +Asset=Immobilisations NewAssetType=Nouveau type d'immobilisation NewAsset=Nouvelle immobilisation +ConfirmDeleteAsset=Voulez-vous vraiment supprimer cet élément? diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index b6ccc999c82..e97c2480b1c 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Votre mandat SEPA FindYourSEPAMandate=Voici votre mandat SEPA pour autoriser notre société à réaliser les prélèvements depuis votre compte bancaire. Merci de retourner ce mandat signé (scan du document signé) ou en l'envoyant par courrier à AutoReportLastAccountStatement=Remplissez automatiquement le champ 'numéro de relevé bancaire' avec le dernier numéro lors du rapprochement CashControl=Contrôle de caisse POS -NewCashFence=Nouvelle clôture de caisse +NewCashFence=Nouvelle ouverture ou clôture de caisse BankColorizeMovement=Coloriser les mouvements BankColorizeMovementDesc=Si cette fonction est activée, vous pouvez choisir une couleur de fond spécifique pour les mouvements de débit ou de crédit. BankColorizeMovementName1=Couleur de fond pour les mouvements de débit BankColorizeMovementName2=Couleur de fond pour le mouvement de crédit IfYouDontReconcileDisableProperty=Si vous ne réalisez pas le rapprochement bancaire sur certains comptes bancaires, désactivez la fonctionnalité "%s" pour ne plus afficher cette alerte. NoBankAccountDefined=Aucun compte bancaire défini +NoRecordFoundIBankcAccount=Aucun enregistrement trouvé dans le compte bancaire. Généralement, cela se produit lorsqu'un enregistrement a été supprimé manuellement de la liste des transactions dans le compte bancaire (par exemple lors d'un rapprochement du compte bancaire). Une autre raison est que le paiement a été enregistré lorsque le module "%s" était désactivé. diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index b5588c21df3..4b321bd3464 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Facture client CustomerInvoice=Facture client CustomersInvoices=Factures clients SupplierInvoice=Facture fournisseur -SuppliersInvoices=Factures fournisseurs +SuppliersInvoices=Factures fournisseur +SupplierInvoiceLines=Lignes de facture fournisseur SupplierBill=Facture fournisseur -SupplierBills=Factures fournisseurs +SupplierBills=Factures fournisseur Payment=Règlement PaymentBack=Remboursement CustomerInvoicePaymentBack=Rembourser @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Versements déjà effectués PaymentsBackAlreadyDone=Remboursements déjà effectués PaymentRule=Mode de paiement PaymentMode=Mode de règlement +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Carte débit/crédit PaymentTypePP=PayPal IdPaymentMode=Type de paiement (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date de la dernière génération DateLastGenerationShort=Date de dernière génération MaxPeriodNumber=Nombre maximum de génération NbOfGenerationDone=Nombre de génération de facture déjà réalisées +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Nb de générations réalisée MaxGenerationReached=Nombre maximum de générations atteint InvoiceAutoValidate=Valider les factures automatiquement @@ -450,7 +454,7 @@ RegulatedOn=Réglé le ChequeNumber=Chèque N° ChequeOrTransferNumber=Chèque/Virement N° ChequeBordereau=Vérifier -ChequeMaker=Chèque/Virement N° +ChequeMaker=Emetteur du chèque/virement ChequeBank=Banque du chèque CheckBank=Chèque NetToBePaid=Net à payer @@ -483,7 +487,7 @@ ChequeDeposits=Dépôts de chèques Cheques=Chèques DepositId=Id dépôt NbCheque=Nombre de chèques -CreditNoteConvertedIntoDiscount=Ce %s a été converti en %s +CreditNoteConvertedIntoDiscount=Cette %s a été convertie en %s UsBillingContactAsIncoiveRecipientIfExist=Utiliser l'adresse du contact de type 'contact facturation' plutôt que l'adresse du tiers comme destinataire des factures ShowUnpaidAll=Afficher tous les impayés ShowUnpaidLateOnly=Afficher uniquement les factures impayées en retard @@ -494,12 +498,16 @@ Cash=Liquide Reported=Différé DisabledBecausePayments=Non disponible car il existe des paiements CantRemovePaymentWithOneInvoicePaid=Suppression impossible quand il existe au moins une facture classée payée. +CantRemovePaymentVATPaid=Impossible de supprimer le paiement car la déclaration de TVA est classée payée +CantRemovePaymentSalaryPaid=Impossible de supprimer le paiement car le salaire est classé comme étant payé ExpectedToPay=Paiement attendu CantRemoveConciliatedPayment=Suppression d'un paiement rapproché impossible PayedByThisPayment=Règlé par ce paiement ClosePaidInvoicesAutomatically=Classer "Payée" toutes les factures standard, d'acompte ou de remplacement quand le paiement est complet. ClosePaidCreditNotesAutomatically=Classer automatiquement à "Payé" les factures d'avoirs quand le remboursement est complet. ClosePaidContributionsAutomatically=Classer automatiquement à "Payé" la contribution sociale ou fiscale quand les paiements sont complets. +ClosePaidVATAutomatically=Classez automatiquement la déclaration de TVA comme «Payée» lorsque le paiement est entièrement effectué. +ClosePaidSalaryAutomatically=Classez automatiquement le salaire comme «payé» lorsque le paiement est entièrement effectué. AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures avec un reste à payer nul seront automatiquement fermées au statut "Payé". ToMakePayment=Payer ToMakePaymentBack=Rembourser @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Pour créer une facture modèle, vous deve PDFCrabeDescription=Modèle de facture PDF Crabe. Un modèle de facture complet (ancienne implémentation du modèle Sponge) PDFSpongeDescription=Modèle de facture PDF Sponge. Un modèle de facture complet PDFCrevetteDescription=Modèle de facture PDF Crevette (modèle complet pour les factures de situation) -TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn pour les factures et factures de remplacement, %syymm-nnnn pour les avoirs et %syymm-nnnn pour les acomptes où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0 -MarsNumRefModelDesc1=Renvoie une numérotation au format %syymm-nnnn pour les factures standards, %syymm-nnnn pour les factures de remplacement, %syymm-nnnn pour les factures d'acompte et %syymm-nnnn pour les factures d'avoir où yy est l'année, mm le mois et nnnn un compteur sans rupture ni retour à zéro. +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Une facture commençant par $syymm existe déjà et est incompatible avec cet modèle de numérotation. Supprimez-la ou renommez-la pour activer ce module. -CactusNumRefModelDesc1=Renvoie un numéro au format %syymm-nnnn pour les factures standards, %syymm-nnnn pour les factures d'avoir et %syymm-nnnn pour les factures d'acompte où yy est l'année, mm le mois et nnnn un compteur sans rupture ni retour à zéro. +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Raison de la clôture anticipée EarlyClosingComment=Note de clôture anticipée ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Si vous avez besoin que de telles factures soi DeleteRepeatableInvoice=Supprimer facture modèle ConfirmDeleteRepeatableInvoice=Est-ce votre sûr de vouloir supprimer la facture modèle ? CreateOneBillByThird=Créer une facture par tiers (sinon, une facture par commande) -BillCreated=%s facture(s) créée(s) +BillCreated=%s facture(s) générée(s) +BillXCreated=Facture %s générée StatusOfGeneratedDocuments=Statut de génération du document DoNotGenerateDoc=Ne pas générer le fichier AutogenerateDoc=Auto-génerer le fichier diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index 7fd402af050..e54f69e69bf 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistiques sur les principaux objets métier de la base de données BoxLoginInformation=Informations de connexion BoxLastRssInfos=Flux d'information RSS BoxLastProducts=Les %s derniers produits/services enregistrés @@ -17,9 +18,13 @@ BoxLastActions=Derniers évènements BoxLastContracts=Derniers contrats BoxLastContacts=Derniers contacts/adresses BoxLastMembers=Derniers adhérents +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Dernières interventions BoxCurrentAccounts=Balance des comptes ouverts BoxTitleMemberNextBirthdays=Anniversaires de ce mois (adhérents) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Les %s dernières informations de %s BoxTitleLastProducts=Les %s derniers produits/services modifiés BoxTitleProductsAlertStock=Produits en alerte stock @@ -95,8 +100,8 @@ LastXMonthRolling=Les %s derniers mois tournant ChooseBoxToAdd=Ajouter le widget au tableau de bord BoxAdded=Le widget a été ajouté dans votre tableau de bord BoxTitleUserBirthdaysOfMonth=Anniversaires de ce mois (utilisateurs) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document +BoxLastManualEntries=Dernières entrées en comptabilité saisies manuellement ou sans document source +BoxTitleLastManualEntries=Les %s derniers enregistrements saisis manuellement ou sans document source NoRecordedManualEntries=Pas d'entrées manuelles en comptabilité BoxSuspenseAccount=Comptage des opérations de comptabilité avec compte d'attente BoxTitleSuspenseAccount=Nombre de lignes non allouées @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Les %s dernières expéditions clients NoRecordedShipments=Aucune expédition client BoxCustomersOutstandingBillReached=Clients dont l'en-cours de facturation est dépassé # Pages -AccountancyHome=Comptabilité +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Espace Comptabilité ValidatedProjects=Projets validés diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 5e292b0b637..9e3d3fcbf62 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -56,7 +56,8 @@ Paymentnumpad=Type de pavé pour entrer le paiement Numberspad=Pavé numérique BillsCoinsPad=Pavé avec montant des Pièces et Billets DolistorePosCategory=Modules TakePOS et autres solutions de PDV pour Dolibarr -TakeposNeedsCategories=TakePOS a besoin des catégories de produits pour fonctionner +TakeposNeedsCategories=TakePOS a besoin d'au moins une catégorie de produits pour fonctionner +TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS a besoin d'au moins 1 catégorie de produits dans la catégorie <b> %s </b> pour fonctionner OrderNotes=Notes de commande CashDeskBankAccountFor=Compte par défaut à utiliser pour les paiements en NoPaimementModesDefined=Aucun mode de paiement défini dans la configuration de TakePOS @@ -99,7 +100,7 @@ CashDeskRefNumberingModules=Module de numérotation pour le POS CashDeskGenericMaskCodes6 = <br>La balise <b> {TN} </b> 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 -SaleStartedAt=Ventes démarrées le %s +SaleStartedAt=Ventes démarrées à %s ControlCashOpening=Pop-up de contrôle de caisse à l'ouverture du POS CloseCashFence=Clôturer la caisse CashReport=Rapport de caisse @@ -124,3 +125,5 @@ ModuleReceiptPrinterMustBeEnabled=Le module Imprimante de reçus doit d'abord av AllowDelayedPayment=Autoriser le paiement différé PrintPaymentMethodOnReceipts=Imprimer le mode de paiement sur les tickets | reçus WeighingScale=échelle de poids +ShowPriceHT = Afficher la colonne prix hors taxes +ShowPriceHTOnReceipt = Afficher la colonne prix hors taxes à la réception diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index a28bf476eeb..872d04cfa1b 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Espace tags/catégories de fournisseurs CustomersCategoriesArea=Espace tags/catégories de clients MembersCategoriesArea=Espace tags/catégories adhérents ContactsCategoriesArea=Espace tags/catégories de contacts -AccountsCategoriesArea=Espace des tags/categories +AccountsCategoriesArea=Espace des tags/categories de comptes bancaires ProjectsCategoriesArea=Zone des tags/catégories des projets UsersCategoriesArea=Espace tags/catégories des utlisateurs SubCats=Sous-catégories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assigner cette catégorie au fournisseur ShowCategory=Afficher tag/catégorie ByDefaultInList=Par défaut dans la liste ChooseCategory=Choisissez une catégorie -StocksCategoriesArea=Catégories d'entrepôts -ActionCommCategoriesArea=Catégories d'évènements +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Catégories des pages-conteneurs UseOrOperatorForCategories=Utiliser l'opérateur 'ou' pour les catégories diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index 9b5721326d1..d663185936b 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -64,10 +64,11 @@ ActionAC_SHIP=Envoi bon d'expédition par email ActionAC_SUP_ORD=Envoi commande fournisseur par email ActionAC_SUP_INV=Envoi facture fournisseur par email ActionAC_OTH=Autre -ActionAC_OTH_AUTO=Évènements insérés automatiquement +ActionAC_OTH_AUTO=Autre auto ActionAC_MANUAL=Événements insérés manuellement ActionAC_AUTO=Événements insérés automatiquement -ActionAC_OTH_AUTOShort=Auto +ActionAC_OTH_AUTOShort=Autre +ActionAC_EVENTORGANIZATION=Événements d'organisation d'événements Stats=Statistiques de vente StatusProsp=Status prospection DraftPropals=Propositions brouillons diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index c07b5c4611f..d4a26e93344 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -45,6 +45,7 @@ ParentCompany=Maison mère Subsidiaries=Filiales ReportByMonth=Rapport par mois ReportByCustomers=Rapport par client +ReportByThirdparties=Report per thirdparty ReportByQuarter=Rapport par taux CivilityCode=Code civilité RegisteredOffice=Siège social @@ -172,14 +173,20 @@ ProfId1ES=Id. prof. 1 (CIF/NIF) ProfId2ES=Id. prof. 2 (Num. sécurité social) ProfId3ES=Id. prof. 3 (CNAE) ProfId4ES=Id. prof. 4 (Num. Collégiale) -ProfId5ES=Numéro EORI +ProfId5ES=Prof Id 5 (numéro EORI) ProfId6ES=- ProfId1FR=Id. prof. 1 (SIREN) ProfId2FR=Id. prof. 2 (SIRET) ProfId3FR=Id. prof. 3 (NAF-APE) ProfId4FR=Id. prof. 4 (RCS/RM) -ProfId5FR=Numéro EORI +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Numéro d'enregistrement ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=Numéro EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Id. prof. 1 (NIPC) ProfId2PT=Id. prof. 2 (Num. sécurité social) ProfId3PT=Id. prof. 3 (Num. enreg. commercial) ProfId4PT=Id. prof. 4 (Conservatory) -ProfId5PT=Numéro EORI +ProfId5PT=Prof Id 5 (numéro EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Id. prof. 1 (CUI) ProfId2RO=Id. prof. 2 (Nr. Înmatriculare) ProfId3RO=Id. prof. 3 (CAEN) ProfId4RO=Id prof 5 (EUID) -ProfId5RO=Numéro EORI +ProfId5RO=Prof Id 5 (numéro EORI) ProfId6RO=- ProfId1RU=Id. prof.1 (OGRN) ProfId2RU=Id. prof.2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Montant encours OutstandingBill=Montant encours autorisé OutstandingBillReached=Montant encours autorisé dépassé OrderMinAmount=Montant minimum pour la commande -MonkeyNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn pour les codes clients et %syymm-nnnn pour les codes fournisseurs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Code libre sans vérification. Peut être modifié à tout moment. ManagingDirectors=Nom du(des) gestionnaire(s) (PDG, directeur, président...) MergeOriginThirdparty=Tiers en doublon (le tiers que vous voulez supprimer) diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 648d8541d28..38574580e7b 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=TVA sur les achats VATCollected=TVA récupérée StatusToPay=A payer SpecialExpensesArea=Espace des paiements particuliers +VATExpensesArea=Espace pour tous les paiements de TVA SocialContribution=Charge sociale ou fiscale SocialContributions=Charges fiscales ou sociales SocialContributionsDeductibles=Charge ou taxe déductible @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Règlement facture client PaymentSupplierInvoice=Règlement facture fournisseur PaymentSocialContribution=Paiement de charges fiscales/sociales PaymentVat=Règlement TVA +AutomaticCreationPayment=Enregistrez automatiquement le paiement ListPayment=Liste des règlements ListOfCustomerPayments=Liste des règlements clients ListOfSupplierPayments=Liste des règlements fournisseurs @@ -104,6 +106,8 @@ LT2PaymentES=Règlement IRPF LT2PaymentsES=Règlements IRPF VATPayment=Règlement TVA VATPayments=Règlements TVA +VATDeclarations=Déclarations de TVA +VATDeclaration=Déclaration de TVA VATRefund=Remboursement TVA NewVATPayment=Nouveau paiement de TVA NewLocalTaxPayment=Nouveau paiement charge %s @@ -134,9 +138,17 @@ NoWaitingChecks=Pas de chèques en attente de remise DateChequeReceived=Date réception chèque NbOfCheques=Nb de chèques PaySocialContribution=Payer une charge sociale/fiscale -ConfirmPaySocialContribution=Êtes-vous sûr de vouloir classer cette charge sociale ou fiscale à payée ? +PayVAT=Payer une déclaration de TVA +PaySalary=Payer un salaire +ConfirmPaySocialContribution=Voulez-vous vraiment classer cette taxe sociale ou fiscale comme payée? +ConfirmPayVAT=Voulez-vous vraiment classer cette déclaration de TVA comme payée ? +ConfirmPaySalary=Voulez-vous vraiment classer ce salaire comme payée ? DeleteSocialContribution=Effacer une charge fiscale ou sociale -ConfirmDeleteSocialContribution=Êtes-vous sûr de vouloir supprimer ce paiement de taxe sociale/fiscale ? +DeleteVAT=Supprimer une déclaration de TVA +DeleteSalary=Supprimer un salaire +ConfirmDeleteSocialContribution=Voulez-vous vraiment supprimer ce paiement de taxe sociale / fiscale? +ConfirmDeleteVAT=Voulez-vous vraiment supprimer cette déclaration de TVA ? +ConfirmDeleteSalary=Êtes-vous sûr de vouloir supprimer ce salaire ? ExportDataset_tax_1=Taxes sociales et fiscales et paiements CalcModeVATDebt=Mode <b>%sTVA sur débit%s</b>. CalcModeVATEngagement=Mode <b>%sTVA sur encaissement%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Il comprend les paiements réels effectués sur les factures, RulesCADue=- Il inclut les factures clients dues, qu'elles soient payées ou non.<br>- Il se base sur la date de facturation de ces factures.<br> RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.<br>- Il se base sur la date de règlement de ces factures<br> RulesCATotalSaleJournal=Il comprend toutes les lignes du journal de vente. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Cela inclut les enregistrements dans votre Grand Livre ayant les comptes de comptabilité qui ont le groupe "EXPENSE" ou "INCOME" RulesResultBookkeepingPredefined=Cela inclut les enregistrements dans votre Grand Livre ayant les comptes de comptabilité qui ont le groupe "EXPENSE" ou "INCOME" RulesResultBookkeepingPersonalized=Cela inclut les enregistrements dans votre Grand Livre ayant les comptes de comptabilité <b>regroupés par les groupes personnalisés</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Rapport TVA par Tiers VATReportByCustomers=Rapport par client VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées VATReportByQuartersInInputOutputMode=Rapport par taux des TVA collectées et payées +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Rapport Tax 2 par Taux LT2ReportByQuarters=Rapport Tax 3 par Taux LT1ReportByQuartersES=Rapport par taux de RE @@ -217,7 +231,7 @@ Pcg_subtype=Sous classe de compte InvoiceLinesToDispatch=Lignes de factures à ventiler ByProductsAndServices=Par produit et service RefExt=Référence externe -ToCreateAPredefinedInvoice=Pour créer une facture modèle, créez d'abord une facture standard, puis, avant la validation, cliquez sur le bouton %s. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Lier à une commande Mode1=Mode 1 Mode2=Mode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Le compte comptable dédié défini sur la fich ACCOUNTING_ACCOUNT_SUPPLIER=Compte comptable utilisé pour les tiers fournisseur ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Le compte de comptabilité dédié défini sur la fiche Tiers sera utilisé pour la comptabilité auxiliaire uniquement. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité auxiliaire si le compte de comptabilité fournisseur dédié au tiers n'est pas défini. ConfirmCloneTax=Confirmer le clonage de la charge sociale/fiscale +ConfirmCloneVAT=Confirmer le clonage d'une déclaration de TVA +ConfirmCloneSalary=Confirmer le clonage d'un salaire CloneTaxForNextMonth=Cloner pour le mois suivant SimpleReport=Rapport simple AddExtraReport=Rapports complémentaires (Ajouter le rapport client local et international) @@ -253,7 +269,8 @@ AccountingAffectation=Compte affecté LastDayTaxIsRelatedTo=Dernier jour de la période pour laquelle la taxe est due VATDue=TVA réclamée ClaimedForThisPeriod=Réclamé pour la période -PaidDuringThisPeriod=Payé durant la période +PaidDuringThisPeriod=Payé pour cette période +PaidDuringThisPeriodDesc=Il s'agit de la somme de tous les paiements liés aux déclarations de TVA qui ont une date de fin de période dans la plage de dates sélectionnée ByVatRate=Par taux de TVA TurnoverbyVatrate=Chiffre d'affaire facturé par taux de TVA TurnoverCollectedbyVatrate=Chiffre d'affaires encaissé par taux de TVA @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Chiffre d'affaires d'achat collecté RulesPurchaseTurnoverDue=- Il comprend les factures dues par le fournisseur, qu'elles soient payées ou non. <br> - Il est basé sur la date de facturation de ces factures. <br> RulesPurchaseTurnoverIn=- Il comprend tous les paiements effectifs des factures effectuées aux fournisseurs. <br> - Il est basé sur la date de paiement de ces factures <br> RulesPurchaseTurnoverTotalPurchaseJournal=Il comprend toutes les lignes de débit du journal d'achat. +RulesPurchaseTurnoverOfExpenseAccounts=Il comprend (débit - crédit) des lignes pour les comptes produits dans le groupe EXPENSE ReportPurchaseTurnover=Chiffre d'affaires d'achat facturé ReportPurchaseTurnoverCollected=Chiffre d'affaires d'achat encaissé IncludeVarpaysInResults = Inclure les paiements divers dans les rapports diff --git a/htdocs/langs/fr_FR/donations.lang b/htdocs/langs/fr_FR/donations.lang index 4464246f024..9b29059e039 100644 --- a/htdocs/langs/fr_FR/donations.lang +++ b/htdocs/langs/fr_FR/donations.lang @@ -7,7 +7,6 @@ AddDonation=Créer un don NewDonation=Nouveau don DeleteADonation=Effacer le don ConfirmDeleteADonation=Êtes-vous sûr de vouloir supprimer ce don ? -ShowDonation=Montrer don PublicDonation=Don public DonationsArea=Espace dons DonationStatusPromiseNotValidated=Promesse non validée @@ -33,3 +32,4 @@ DONATION_ART238=Afficher article 238 du CGI si vous êtes concernés DONATION_ART885=Afficher article 885 du CGI si vous êtes concernés DonationPayment=Paiement du don DonationValidated=Don %s validé +DonationUseThirdparties=Utiliser un tiers existant comme coordonnées des donateurs diff --git a/htdocs/langs/fr_FR/ecm.lang b/htdocs/langs/fr_FR/ecm.lang index 37fb3ee4a69..3e6e3e37bad 100644 --- a/htdocs/langs/fr_FR/ecm.lang +++ b/htdocs/langs/fr_FR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Fichier non indexé dans la base de données. Télé ExtraFieldsEcmFiles=Attributs supplémentaires des fichiers de la GED ExtraFieldsEcmDirectories=Attributs supplémentaires des dossiers de la GED ECMSetup=Configuration du module de gestion de documents (GED) +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index f2e046506f7..072653e95b5 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -8,7 +8,7 @@ ErrorBadEMail=email %s invalide ErrorBadMXDomain=L'adresse e-mail %s ne semble pas correcte (le domaine n'a pas d'enregistrement MX valide) ErrorBadUrl=Url %s invalide ErrorBadValueForParamNotAString=Mauvaise valeur de paramètre. Ceci arrive lors d'une tentative de traduction d'une clé non renseignée. -ErrorRefAlreadyExists=La référence <b>%s</b> existe déjà. +ErrorRefAlreadyExists=Le référence <b>%s</b> existe déjà. ErrorLoginAlreadyExists=L'identifiant %s existe déjà. ErrorGroupAlreadyExists=Le groupe %s existe déjà. ErrorRecordNotFound=Enregistrement non trouvé. @@ -59,6 +59,7 @@ ErrorDirNotFound=Répertoire <b>%s</b> introuvable (Mauvais chemin, permissions ErrorFunctionNotAvailableInPHP=La fonction <b>%s</b> est requise pour cette fonctionnalité mais n'est pas disponible dans cette version/installation de PHP. ErrorDirAlreadyExists=Un répertoire portant ce nom existe déjà. ErrorFileAlreadyExists=Un fichier portant ce nom existe déjà. +ErrorDestinationAlreadyExists=Un fichier portant le nom <b>%s</b> existe déjà. ErrorPartialFile=Fichier non reçu intégralement par le serveur. ErrorNoTmpDir=Répertoire temporaire de réception %s inexistant. ErrorUploadBlockedByAddon=Upload bloqué par un plugin PHP/Apache. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Erreur lors du chargement du tableau de compte. Si certains ErrorBadSyntaxForParamKeyForContent=Mauvaise syntaxe pour le paramètre keyforcontent. La valeur doit commencer par %s ou %s ErrorVariableKeyForContentMustBeSet=Erreur, la constante nommée %s (avec le contenu de texte à afficher) ou %s (avec l'adresse externe à afficher) doit être fixée. ErrorURLMustStartWithHttp=L'URL %s doit commencer par http:// ou https:// +ErrorHostMustNotStartWithHttp=L'URL %s ne doit PAS commencer par http:// ou https:// ErrorNewRefIsAlreadyUsed=Erreur, la nouvelle référence est déjà utilisée ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Erreur, supprimer le paiement lié à une facture clôturée n'est pas possible. ErrorSearchCriteriaTooSmall=Critère de recherche trop petit. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=L’interface publique n’a pas été activée ErrorLanguageRequiredIfPageIsTranslationOfAnother=La langue d'une nouvelle page, si elle est la traduction d'une autre page, doit être définie ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=La langue d'une nouvelle page, si elle est définie comme traduction d'une autre page, ne peut pas être la langue principale. ErrorAParameterIsRequiredForThisOperation=Un paramètre est obligatoire pour cette opération +ErrorDateIsInFuture=Erreur, la date ne peut pas être dans le futur. +ErrorAnAmountWithoutTaxIsRequired=Erreur, le montant est obligatoire +ErrorAPercentIsRequired=Erreur, le pourcentage doit être indiqué correctement. +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # 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. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Avertissement, échec de l’ajout d’u WarningTheHiddenOptionIsOn=Attention, l'option cachée <b>%s</b> est activée WarningCreateSubAccounts=Attention, vous ne pouvez pas créer directement un compte auxiliaire, vous devez créer un tiers ou un utilisateur et leur attribuer un code comptable pour les retrouver dans cette liste WarningAvailableOnlyForHTTPSServers=Disponible uniquement si une connexion sécurisée HTTPS est utilisée +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=Le propriétaire de l'utilisateur est requis +ErrorActionCommBadType=Le type d'événement sélectionné (id: %n, code: %s) n'existe pas dans le dictionnaire des types d'événement diff --git a/htdocs/langs/fr_FR/externalsite.lang b/htdocs/langs/fr_FR/externalsite.lang index 63194e8b836..04f3ebd8fc8 100644 --- a/htdocs/langs/fr_FR/externalsite.lang +++ b/htdocs/langs/fr_FR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Configuration du lien vers le site externe -ExternalSiteURL=URL du site externe +ExternalSiteURL=URL du site externe du contenu iFrame HTML ExternalSiteModuleNotComplete=La configuration du module "Site externe" est incomplète. ExampleMyMenuEntry=Mon entrée de menu diff --git a/htdocs/langs/fr_FR/holiday.lang b/htdocs/langs/fr_FR/holiday.lang index fe9dff2d86f..718123f56b0 100644 --- a/htdocs/langs/fr_FR/holiday.lang +++ b/htdocs/langs/fr_FR/holiday.lang @@ -9,7 +9,7 @@ AddCP=Créer une demande de congés DateDebCP=Date Début DateFinCP=Date Fin DraftCP=Brouillon -ToReviewCP=En attente d'approbation +ToReviewCP=En approbation ApprovedCP=Approuvée CancelCP=Annulée RefuseCP=Refusée @@ -80,9 +80,9 @@ UserCP=Utilisateur ErrorAddEventToUserCP=Une erreur est survenue durant l'ajout du congé exceptionnel. AddEventToUserOkCP=L'ajout du congé exceptionnel à bien été effectué. MenuLogCP=Voir historique modif. -LogCP=Historique de la mise à jours de jours de congés disponibles +LogCP=Historique des mises à jour de jours de congés disponibles ActionByCP=Réalisée par -UserUpdateCP=Pour l'utilisateur +UserUpdateCP=Mis à jour pour PrevSoldeCP=Précédent Solde NewSoldeCP=Nouveau Solde alreadyCPexist=Une demande de congés a déjà été faite sur cette période. diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 3788acb53c4..5408ca6e4c7 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -129,7 +129,7 @@ Notifications=Notifications NotificationsAuto=Notifications automatiques NoNotificationsWillBeSent=Aucune notification automatique prévue pour ce type d'événement et de tiers. ANotificationsWillBeSent=1 notification automatique sera envoyée par e-mail -SomeNotificationsWillBeSent=%s notification(s) automatique(s) sera enviyée par e-mail +SomeNotificationsWillBeSent=%s notification(s) automatique(s) sera(seront) envoyée(s) par e-mail AddNewNotification=Souscrire à une nouvelle notification automatique (cible/évènement) ListOfActiveNotifications=Liste de toutes les souscriptions (cibles/évènements) pour des notifications emails automatiques ListOfNotificationsDone=Liste des toutes les notifications automatiques envoyées par e-mail @@ -175,5 +175,5 @@ Answered=Répondu IsNotAnAnswer=N'est pas une réponse (e-mail initial) IsAnAnswer=Est une réponse à un e-mail initial RecordCreatedByEmailCollector=Enregistrement créé par le Collecteur d'e-mails%s depuis l'email %s -DefaultBlacklistMailingStatus=Statut par défaut des contacts qui refusent les emailing +DefaultBlacklistMailingStatus=Statut par défaut des contacts pour refuser les emailing DefaultStatusEmptyMandatory=Vide mais obligatoire diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 70f50c7eea3..32ee14fb0c7 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Date modif. IPModification=Modification IP DateLastModification=Date de dernière modification DateValidation=Date validation +DateSigning=Date de signature DateClosing=Date clôture DateDue=Date échéance DateValue=Date valeur @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Prix ​​unitaire (HT) (devise) UnitPriceTTC=Prix unitaire TTC PriceU=P.U. PriceUHT=P.U. HT -PriceUHTCurrency=P.U. HT (devise) +PriceUHTCurrency=P.U net (devise) PriceUTTC=P.U TTC Amount=Montant AmountInvoice=Montant facture @@ -389,6 +390,8 @@ AmountTotal=Montant total AmountAverage=Montant moyen PriceQtyMinHT=Prix quantité min. HT PriceQtyMinHTCurrency=Prix quantité min. (HT) (devise) +PercentOfOriginalObject=Pourcentage de l'objet d'origine +AmountOrPercent=Montant ou pourcentage Percentage=Pourcentage Total=Total SubTotal=Sous-total @@ -724,7 +727,7 @@ 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 +NoFileFound=Pas de documents téléversés CurrentUserLanguage=Langue utilisateur actuelle CurrentTheme=Thème courant CurrentMenuManager=Gestionnaire de menu courant @@ -899,8 +902,10 @@ ViewAccountList=Voir le grand livre ViewSubAccountList=Voir le grand livre auxiliaire RemoveString=Supprimer la chaine '%s' SomeTranslationAreUncomplete=Certaines des langues proposées peuvent n'être traduites que partiellement ou contenir des erreurs. Aidez-nous à corriger votre langue en vous inscrivant à l'adresse <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/</a> pour ajouter vos améliorations. -DirectDownloadLink=Lien de téléchargement direct (public/externe) -DirectDownloadInternalLink=Lien de téléchargement direct (requiert d'être logué et autorisé) +DirectDownloadLink=Lien de téléchargement public +PublicDownloadLinkDesc=Seul le lien est nécessaire pour télécharger le fichier +DirectDownloadInternalLink=Lien de téléchargement privé +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Téléchargement DownloadDocument=Télécharger le document ActualizeCurrency=Mettre à jour le taux de devise @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Adhérents SearchIntoUsers=Utilisateurs SearchIntoProductsOrServices=Produits ou services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projets SearchIntoMO=Ordres de fabrication SearchIntoTasks=Tâches @@ -1055,6 +1061,7 @@ YouAreCurrentlyInSandboxMode=Vous travaillez actuellement dans le mode "bac à s Inventory=Inventaire AnalyticCode=Code analytique TMenuMRP=GPAO +ShowCompanyInfos=Afficher les infos de l'entreprise ShowMoreInfos=Afficher plus d'informations NoFilesUploadedYet=Merci de téléverser un document d'abord SeePrivateNote=Voir note privée @@ -1116,7 +1123,9 @@ EventReminder=Rappel d'événement UpdateForAllLines=Mise à jour de toutes les lignes OnHold=En attente Civility=Civilité -AffectTag=Affecter une catégorie -ConfirmAffectTag=Affectation de catégories en masse +AffectTag=Affecter un tag/catégorie +ConfirmAffectTag=Affecter les tags en masse ConfirmAffectTagQuestion=Êtes-vous sur de vouloir affecter ces catégories aux %s lignes sélectionnées ? -CategTypeNotFound=Aucune catégorie trouvée +CategTypeNotFound=Aucun type de tag trouvé pour ce type d'enregistrements +CopiedToClipboard=Copié dans le presse-papier +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index ff64d7516ca..fabd7851aad 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -22,7 +22,7 @@ ProductService=Produit ou Service AllProducts=Tous les produits et services ChooseProduct/Service=Choisissez le produit ou le service ForceBuyingPriceIfNull=Forcer le prix d'achat au prix de vente si non renseigné -ForceBuyingPriceIfNullDetails=Si le prix d'achat/revient n'est pas défini, et que cette option est "ON", la marge sera de zéro sur la ligne (le prix d'achat/revient = prix de vente), autrement ("OFF"), la marge sera égale à la valeur suggérée par défaut. +ForceBuyingPriceIfNullDetails=Si le prix d'achat/revient n'est pas défini quand on ajouter une nouvelle ligne, et que cette option est "ON", la marge sera de 0 sur la nouvelle ligne (le prix d'achat/revient = prix de vente). Si l'option est à "OFF" (recommandé), la marge sera égale à la valeur suggérée par défaut (et peut être 100% si aucune valeur par défaut n'est trouvé). MARGIN_METHODE_FOR_DISCOUNT=Méthode de gestion des remises globales UseDiscountAsProduct=Comme un produit UseDiscountAsService=Comme un service diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index ea52dc21d7a..dff2f9c885b 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Liste des adhérents brouillons (à valider) MembersListValid=Liste des adhérents valides MembersListUpToDate=Liste des adhérents validés avec une adhésion à jour MembersListNotUpToDate=Liste des adhérents validés avec une adhésion expirée +MembersListExcluded=List of excluded members MembersListResiliated=Liste des adhérents résiliés MembersListQualified=Liste des adhérents qualifiés MenuMembersToValidate=Adhérents brouillons MenuMembersValidated=Adhérents validés +MenuMembersExcluded=Excluded members MenuMembersResiliated=Adhérents résiliés MembersWithSubscriptionToReceive=Adhérents avec cotisation à recevoir MembersWithSubscriptionToReceiveShort=Cotisations à recevoir @@ -47,11 +49,14 @@ MemberStatusActiveLate=Adhésion/cotisation expirée MemberStatusActiveLateShort=Expiré MemberStatusPaid=Adhésions à jour MemberStatusPaidShort=A jour +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Adhérent résilié MemberStatusResiliatedShort=Résilié MembersStatusToValid=Adhérents brouillons +MembersStatusExcluded=Excluded members MembersStatusResiliated=Adhérents résiliés -MemberStatusNoSubscription=Validé (pas de cotisations nécessaires) +MemberStatusNoSubscription=Validé (pas de cotisation nécessaire) MemberStatusNoSubscriptionShort=Validé SubscriptionNotNeeded=Aucune cotisation requise NewCotisation=Nouvelle adhésion @@ -82,6 +87,8 @@ Physical=Physique Moral=Morale MorAndPhy=Morales et physiques Reenable=Réactiver +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Résilier un adhérent ConfirmResiliateMember=Êtes-vous sûr de vouloir résilier cet adhérent ? DeleteMember=Effacer un membre @@ -95,7 +102,7 @@ FollowingLinksArePublic=Les liens suivants sont des pages accessibles à tous et PublicMemberList=Liste des membres publics BlankSubscriptionForm=Formulaire d'auto-inscription publique BlankSubscriptionFormDesc=Dolibarr peut vous fournir un URL/site web public afin de permettre aux visiteurs externes de faire une demande d'inscription à la fondation. Si un module de paiement est actif, un formulaire de paiement sera également fourni automatiquement. -EnablePublicSubscriptionForm=Activer le formulaire d'auto-inscription public du site +EnablePublicSubscriptionForm=Activer le formulaire public d'auto-inscription ForceMemberType=Forcer le type d'adhérent ExportDataset_member_1=Adhérents et adhésions ImportDataset_member_1=Adhérents @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modèle d'email à utiliser pour e DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Modèle d'email électronique à utiliser pour envoyer un courrier électronique à un membre lors de l'enregistrement d'une nouvelle cotisation DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modèle d'email électronique à utiliser pour envoyer un rappel par courrier électronique lorsque l'adhésion est sur le point d'expirer DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Modèle d'email utilisé pour envoyer un email à un adhérent lors de l'annulation d'adhésion +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Email émetteur pour les mails automatiques DescADHERENT_ETIQUETTE_TYPE=Format pages étiquettes DescADHERENT_ETIQUETTE_TEXT=Texte imprimé sur les planches d'adresses adhérent @@ -162,6 +170,7 @@ DocForLabels=Génération d'étiquettes d'adresses SubscriptionPayment=Paiement cotisation LastSubscriptionDate=Date de dernière adhésion LastSubscriptionAmount=Montant dernière adhésion +LastMemberType=Last Member type MembersStatisticsByCountries=Statistiques des membres par pays MembersStatisticsByState=Statistiques des membres par département/province/canton MembersStatisticsByTown=Statistiques des membres par ville diff --git a/htdocs/langs/fr_FR/modulebuilder.lang b/htdocs/langs/fr_FR/modulebuilder.lang index 15d87656f4b..d2ed35e1282 100644 --- a/htdocs/langs/fr_FR/modulebuilder.lang +++ b/htdocs/langs/fr_FR/modulebuilder.lang @@ -106,7 +106,7 @@ TryToUseTheModuleBuilder=Si vous connaissez SQL et PHP, vous pouvez utiliser l'a SeeTopRightMenu=Voir <span class="fa fa-bug"></span> à droite de votre barre de menu principal AddLanguageFile=Ajouter le fichier de langue YouCanUseTranslationKey=Vous pouvez utiliser ici une clé qui est la clé de traduction trouvée dans le fichier de langue (voir l'onglet "Langues") -DropTableIfEmpty=(Supprimer la table si elle est vide) +DropTableIfEmpty=(Supprimer la table si vide) TableDoesNotExists=La table %s n'existe pas TableDropped=La table %s a été supprimée InitStructureFromExistingTable=Construire la chaîne du tableau de structure d'une table existante @@ -133,11 +133,13 @@ IncludeDocGeneration=Je veux générer des documents à partir de l'objet IncludeDocGenerationHelp=Si vous cochez cette case, du code sera généré pour ajouter une section "Générer un document" sur la fiche de l'objet. ShowOnCombobox=Afficher la valeur dans la liste déroulante KeyForTooltip=Clé pour l'info-bulle -CSSClass=Classe CSS +CSSClass=CSS pour le formulaire d'édition / création +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Non éditable ForeignKey=Clé étrangère TypeOfFieldsHelp=Type de champs: <br> varchar (99), double (24,8), réel, texte, html, datetime, timestamp, integer, integer:NomClasse:cheminrelatif/vers/classfile.class.php [:1[:filtre]] ('1' signifie nous ajoutons un bouton + après le combo pour créer l'enregistrement, 'filter' peut être 'status = 1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' par exemple) AsciiToHtmlConverter=Convertisseur Ascii en HTML AsciiToPdfConverter=Convertisseur Ascii en PDF TableNotEmptyDropCanceled=La table n’est pas vide. La suppression a été annulée. -ModuleBuilderNotAllowed=Le module builder est activé mais son accès n'est pas autorisé à l'utilisateur courant +ModuleBuilderNotAllowed=Le module builder est activé mais son accès n'est pas autorisé pour votre utilisateur diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index 51807552945..4cfa8e0035d 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -81,24 +81,22 @@ ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dan Workstation=Poste de travail Workstations=Postes de travail WorkstationsDescription=Gestion des postes de travail -WorkstationSetup = Workstations setup +WorkstationSetup = Configuration du module Poste de travail WorkstationSetupPage = Configuration du module Poste de travail -WorkstationAbout = About Workstation -WorkstationAboutPage = Workstations about page WorkstationList=Liste des postes de travail WorkstationCreate=Ajouter un nouveau poste de travail -ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ? +ConfirmEnableWorkstation=Voulez-vous vraiment activer le poste de travail <b>%s</b>? EnableAWorkstation=Activer le module Poste de travail -ConfirmDisableWorkstation=Êtes-vous sûr de vouloir désactiver le module Poste de travail <b>%s</b> ? +ConfirmDisableWorkstation=Voulez-vous vraiment désactiver la station de travail <b>%s</b>? DisableAWorkstation=Désactiver un poste de travail DeleteWorkstation=Supprimer NbOperatorsRequired=Nombre d'opérateurs requis THMOperatorEstimated=THM estimé de l'opérateur THMMachineEstimated=THM machine estimé WorkstationType=Type de poste de travail -Human=umain +Human=Humain Machine=Machine HumanMachine=Humain/machine WorkstationArea=Espace Poste de travail Machines=Machines -THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item +THMEstimatedHelp=Ce taux permet de définir un coût prévisionnel de l'article diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 8437178e8e5..5b49fcf64bd 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -16,6 +16,8 @@ ToOrder=Passer commande MakeOrder=Passer commande SupplierOrder=Commande fournisseur SuppliersOrders=Commandes fournisseurs +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Commandes fournisseurs en cours CustomerOrder=Commande client CustomersOrders=Commandes @@ -142,10 +144,11 @@ OrderByWWW=En ligne OrderByPhone=Téléphone # Documents models PDFEinsteinDescription=Un modèle de commande complet (ancienne implémentation du modèle Eratosthène) -PDFEratostheneDescription=Un modèle de commande complet  +PDFEratostheneDescription=Un modèle de commande complet PDFEdisonDescription=Modèle de commande simple PDFProformaDescription=Un modèle de facture Proforma complet CreateInvoiceForThisCustomer=Facturer commandes +CreateInvoiceForThisSupplier=Facturer commandes NoOrdersToInvoice=Pas de commandes facturables CloseProcessedOrdersAutomatically=Classer automatiquement à "Traitées" les commandes sélectionnées. OrderCreation=Date de création diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 3023cd7216e..433f72df63d 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Société avec de multiples activités (tous les modules principa CreatedBy=Créé par %s ModifiedBy=Modifié par %s ValidatedBy=Validé par %s +SignedBy=Signé par %s ClosedBy=Clôturé par %s CreatedById=Id utilisateur créateur ModifiedById=Id utilisateur du dernier changement @@ -244,6 +245,7 @@ NewKeyIs=Voici vos nouveaux identifiants pour vous connecter NewKeyWillBe=Vos nouveaux identifiants pour vous connecter à l'application seront ClickHereToGoTo=Cliquez ici pour aller sur %s YouMustClickToChange=Vous devez toutefois auparavant cliquer sur le lien suivant, afin de valider ce changement de mot de passe +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Si vous n'êtes pas à l'origine de cette demande, ignorez simplement ce message. Vos identifiants restent sécurisés. IfAmountHigherThan=Si le montant est supérieur à <strong>%s</strong> SourcesRepository=Répertoire pour les sources diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 162af66827c..5a1ddd19ae8 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Utiliser les numéros de lots/série -ProductStatusOnBatch=Oui (Lot/Série requis) +ProductStatusOnBatch=Lot (requis) +ProductStatusOnSerial=Numéro de série (doit être unique pour chaque équipement) ProductStatusNotOnBatch=Non (Lot/Série non utilisé) -ProductStatusOnBatchShort=Oui +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=N°série ProductStatusNotOnBatchShort=Non Batch=Lot/Série atleast1batchfield=Date limite utilisation optimale, de consommation ou numéro de lot/série @@ -22,3 +24,11 @@ ProductLotSetup=Configuration du module lot/série ShowCurrentStockOfLot=Afficher le stock actuel pour le couple produit / lot ShowLogOfMovementIfLot=Afficher l'historique des mouvements de couple produit / lot StockDetailPerBatch=Stock détaillé par lot +SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le produit %s +TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un produit %s avec le numéro de série %s +BatchLotNumberingModules=Modèle de génération et contrôle des numéros de lot +BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série +ManageLotMask=Masque personnalisé +CustomMasks=Ajoute une option pour définir le masque dans la fiche produit +LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot +SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 5610a674018..4d4e2ce6fac 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Taux TVA (pour ce produit/fournisseur) DiscountQtyMin=Remise par défaut quantité min. NoPriceDefinedForThisSupplier=Aucun prix/qté défini pour ce fournisseur/produit NoSupplierPriceDefinedForThisProduct=Aucun prix/qté fournisseur défini pour ce produit +PredefinedItem=Article prédéfini PredefinedProductsToSell=Produits prédéfinis en vente PredefinedServicesToSell=Services prédéfinis en vente PredefinedProductsAndServicesToSell=Produits/Services prédéfinis en vente @@ -313,7 +314,7 @@ LastUpdated=Dernière mise à jour CorrectlyUpdated=Mise à jour avec succès PropalMergePdfProductActualFile=Fichiers utilisés pour l'ajout au PDF Azur sont PropalMergePdfProductChooseFile=Sélectionnez les fichiers PDF -IncludingProductWithTag=Comprenant produit / service avec tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Prix ​​par défaut, le prix réel peut dépendre du client WarningSelectOneDocument=Sélectionnez au moins un document DefaultUnitToShow=Unité diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 1affdad0889..9599f880936 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consommé ListOfTasks=Liste de tâches GoToListOfTimeConsumed=Aller à la liste des temps consommés GanttView=Vue Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Liste des propositions commerciales associées au projet ListOrdersAssociatedProject=Liste des commandes clients associées au projet ListInvoicesAssociatedProject=Liste des factures clients associées au projet @@ -240,7 +241,7 @@ LatestModifiedProjects=Les %s derniers projets modifiés OtherFilteredTasks=Autres tâches filtrées NoAssignedTasks=Aucune tâche assignée (assignez un projet/tâche à l'utilisateur depuis la liste déroulante utilisateur en haut pour pouvoir saisir du temps dessus) ThirdPartyRequiredToGenerateInvoice=Un tiers doit être défini sur le projet pour pouvoir le facturer. -ChooseANotYetAssignedTask=Choisissez une tâches qui ne vous est pas encore assignée +ChooseANotYetAssignedTask=Choisissez une tâche qui ne vous est pas encore assignée # Comments trans AllowCommentOnTask=Autoriser les utilisateurs à ajouter des commentaires sur les tâches AllowCommentOnProject=Autoriser les commentaires utilisateur sur les projets @@ -268,3 +269,7 @@ OneLinePerTask=Une ligne par tâche OneLinePerPeriod=Une ligne par période RefTaskParent=Réf. Tâche parent ProfitIsCalculatedWith=Le bénéfice est calculé sur la base de +AddPersonToTask=Ajouter également aux tâches +UsageOrganizeEvent=Utilisation: Organisation d'événements +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index 64199c5248d..6727ad21a8a 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Envoyer proposition commerciale par email DatePropal=Date de proposition DateEndPropal=Date de fin de validité ValidityDuration=Durée de validité -CloseAs=Positionner le statut à SetAcceptedRefused=Accepter/Refuser ErrorPropalNotFound=Propale %s inexistante AddToDraftProposals=Ajouter à proposition brouillon @@ -60,6 +59,7 @@ ConfirmClonePropal=Êtes-vous sûr de vouloir cloner la proposition commerciale ConfirmReOpenProp=Êtes-vous sûr de vouloir réouvrir la proposition commerciale <b>%s</b> ? ProposalsAndProposalsLines=Propositions commerciales clients et lignes de propositions ProposalLine=Ligne de proposition +ProposalLines=Proposal lines AvailabilityPeriod=Délai de livraison SetAvailability=Définir le délai de livraison AfterOrder=après commande @@ -85,20 +85,8 @@ 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 +IdProposal=ID de la proposition commerciale IdProduct=ID produit PrParentLine=Ligne parent de proposition -LineBuyPriceHT=Prix ​​d'achat Montant net de taxe pour la ligne +LineBuyPriceHT=Prix d'achat HT de la ligne + diff --git a/htdocs/langs/fr_FR/salaries.lang b/htdocs/langs/fr_FR/salaries.lang index f4138177a16..4005859617f 100644 --- a/htdocs/langs/fr_FR/salaries.lang +++ b/htdocs/langs/fr_FR/salaries.lang @@ -2,12 +2,15 @@ SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Compte comptable utilisé pour les utilisateurs SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=Le compte comptable défini sur la fiche utilisateur sera utilisé uniquement pour la comptabilité auxiliaire. Celui-ci sera utilisé pour le grand livre et comme valeur par défaut de la comptabilité auxiliaire si le compte dédié de l'utilisateur n'est pas défini. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Compte comptable par défaut pour les paiements de salaires +CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary Salary=Salaire Salaries=Salaires -NewSalaryPayment=Nouveau règlement de salaire +NewSalary=Nouveau salaire +NewSalaryPayment=Nouveau salaire AddSalaryPayment=Ajouter paiement de salaire SalaryPayment=Règlement salaire SalariesPayments=Règlements des salaires +SalariesPaymentsOf=Salaries payments of %s ShowSalaryPayment=Afficher règlement de salaire THM=Tarif horaire moyen TJM=Tarif journalier moyen diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 444c546b853..811f64f0d84 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Stocks manquants StockAtDate=Stock à date -StockAtDateInPast=Date dans le passé -StockAtDateInFuture=Date future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks par lot/série LotSerial=Lots/séries LotSerialList=Liste des numéros de lots/séries @@ -37,8 +37,8 @@ AllWarehouses=Tous les entrepôts IncludeEmptyDesiredStock=Inclure aussi les stocks négatifs quand le stock désiré optimal n'est pas défini IncludeAlsoDraftOrders=Inclure également les commandes brouillons Location=Lieu -LocationSummary=Nom court du lieu -NumberOfDifferentProducts=Nombre de produits différents +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Nombre total de produits LastMovement=Dernier mouvement LastMovements=Derniers mouvements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Valorisation des stocks UserWarehouseAutoCreate=Créer automatiquement un stock/entrepôt propre à l'utilisateur lors de sa création AllowAddLimitStockByWarehouse=Gérez également les valeurs des stocks minimums et souhaités par paire (produit-entrepôt) en plus des valeurs de minimums et souhaités par produit RuleForWarehouse=Règle pour les entrepôts -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Définir un entrepôt sur les propositions commerciales WarehouseAskWarehouseDuringOrder=Définir un entrepôt sur les commandes UserDefaultWarehouse=Définir un entrepôt sur les utilisateurs MainDefaultWarehouse=Entrepôt par défaut @@ -97,15 +98,16 @@ RealStockDesc=Le stock physique ou réel est le stock présent dans les entrepô RealStockWillAutomaticallyWhen=Le stock réel sera modifié selon ces règles (voir la configuration du module Stock) : VirtualStock=Stock virtuel 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 +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished 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) +AtDate=À date 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) -AverageUnitPricePMPDesc=Le prix unitaire moyen d'entrée que nous avons dû payer aux fournisseurs pour intégrer le produit dans notre stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Prix de vente unitaire EstimatedStockValueSellShort=Valeur à la vente EstimatedStockValueSell=Valeur vente @@ -127,7 +129,7 @@ VirtualDiffersFromPhysical=Selon les paramètres d'incrémentation et décrémen UseRealStockByDefault=Utiliser le stock réel, plutôt que le stock virtuel, pour le réapprovisionnement ReplenishmentCalculation=La quantité à commander sera (quantité souhaitée - stock réel) au lieu de (quantité souhaitée - stock virtuel) UseVirtualStock=Utilisation du stock virtuel -UsePhysicalStock=Utilisation du stock réel +UsePhysicalStock=Utilisation du stock physique CurentSelectionMode=Mode de sélection en cours CurentlyUsingVirtualStock=Stock virtuel CurentlyUsingPhysicalStock=Stock réel @@ -145,7 +147,7 @@ Replenishments=Réapprovisionnement NbOfProductBeforePeriod=Quantité du produit <b>%s</b> en stock avant la période sélectionnée (< <b>%s</b>) NbOfProductAfterPeriod=Quantité du produit <b>%s</b> en stock après la période sélectionnée (> <b>%s</b>) MassMovement=Mouvement en masse -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". +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 on "%s". RecordMovement=Enregistrer transfert ReceivingForSameOrder=Réceptions pour cette commande StockMovementRecorded=Mouvement de stocks enregistré @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Le niveau de stock doit être suffisant pour ajouter StockMustBeEnoughForOrder=Le niveau de stock doit être suffisant pour ajouter ce produit/service à la commande (la vérification est faite sur le stock réel lors de l'ajout de la ligne de commande, quelquesoit la règle de modification automatique de stock) StockMustBeEnoughForShipment= Le niveau de stock doit être suffisant pour ajouter ce produit/service à l'expédition (la vérification est faite sur le stock réel lors de l'ajout de la ligne à l'expédition, quelquesoit la règle de modification automatique de stock) MovementLabel=Libellé du mouvement -TypeMovement=Type de mouvement +TypeMovement=Sens du mouvement DateMovement=Date de mouvement InventoryCode=Code mouvement ou inventaire IsInPackage=Inclus dans un package @@ -183,6 +185,7 @@ inventoryCreatePermission=Créer un nouvel inventaire inventoryReadPermission=Voir les inventaires inventoryWritePermission=Mettre à jour les inventaires inventoryValidatePermission=Valider l'inventaire +inventoryDeletePermission=Supprimer l'inventaire inventoryTitle=Inventaire inventoryListTitle=inventaires inventoryListEmpty=Aucun inventaire en cours @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Le module Stock est requis pour choisir une ForceTo=Forcer à AlwaysShowFullArbo=Afficher l'arborescence complète de l'entrepôt sur la popup du lien entrepôt (Avertissement: cela peut réduire considérablement les performances) 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Stock actuel -InventoryRealQtyHelp=Définissez la valeur sur 0 pour réinitialiser la quantité <br> Gardez le champ vide ou supprimez la ligne pour qu'il reste inchangé -UpdateByScaning=Mise à jour par scan +InventoryRealQtyHelp=Définissez la valeur sur 0 pour réinitialiser la quantité <br> Gardez le champ vide ou supprimez la ligne pour qu'elle reste inchangé +UpdateByScaning=Remplir la quantité réelle en scannant UpdateByScaningProductBarcode=Mettre à jour par scan (code-barres produit) UpdateByScaningLot=Mise à jour par scan (code barres lot/série) -DisableStockChangeOfSubProduct=Désactiver les mouvements de stock des composants pour tout mouvement de stock de ce kit +DisableStockChangeOfSubProduct=Désactiver les mouvements de stock des composants pour ce mouvement de stock. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Ajoutez le fichier à importer puis cliquez sur le pictogramme %s pour le sélectionner comme fichier source d'import… +SelectAStockMovementFileToImport=sélectionnez un fichier de mouvement de stock à importer +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventaire %s +ReOpen=Réouvrir +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/fr_FR/supplier_proposal.lang b/htdocs/langs/fr_FR/supplier_proposal.lang index 72d73007f0c..fabfa805777 100644 --- a/htdocs/langs/fr_FR/supplier_proposal.lang +++ b/htdocs/langs/fr_FR/supplier_proposal.lang @@ -13,6 +13,7 @@ SupplierProposalArea=Zone des propositions de fournisseurs SupplierProposalShort=Proposition commerciale fournisseur SupplierProposals=Propositions commerciales fournisseurs SupplierProposalsShort=Propositions commerciale fournisseurs +AskPrice=Demande de prix NewAskPrice=Nouvelle demande de prix ShowSupplierProposal=Afficher demande de prix AddSupplierProposal=Créer une demande de prix @@ -52,3 +53,6 @@ SupplierProposalsToClose=Propositions commerciales fournisseurs à fermer SupplierProposalsToProcess=Propositions commerciales fournisseurs à traiter LastSupplierProposals=Les %s dernières demandes de prix AllPriceRequests=Toutes les demandes de prix +TypeContact_supplier_proposal_external_SHIPPING=Contact fournisseur pour la livraison +TypeContact_supplier_proposal_external_BILLING=Contact fournisseur pour la facturation +TypeContact_supplier_proposal_external_SERVICE=Commercial du suivi des propositions diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index c3d4873d1bd..0d0bf4528a5 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Fournisseurs SuppliersInvoice=Facture fournisseur +SupplierInvoices=Factures fournisseur ShowSupplierInvoice=Montrer la facture fournisseur NewSupplier=Nouveau fournisseur History=Historique diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index d2dbef92452..f97eeb7c35c 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -70,6 +70,8 @@ Deleted=Supprimé # Dict Type=Type Severity=Sévérité +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Pour envoyer un e-mail depuis un ticket @@ -115,7 +117,7 @@ TicketsShowModuleLogoHelp=Activer cette option pour cacher le logo du module dan TicketsShowCompanyLogo=Afficher le logo de la société dans l'interface publique TicketsShowCompanyLogoHelp=Activez cette option pour masquer le logo de la société dans les pages de l'interface publique TicketsEmailAlsoSendToMainAddress=Envoyer également une notification à l'adresse e-mail principale -TicketsEmailAlsoSendToMainAddressHelp=Activer cette option pour envoyer un email à "Email de notification de" adresse (voir configuration ci-dessous) +TicketsEmailAlsoSendToMainAddressHelp=Activer cette option pour envoyer aussi un email à l'adresse définie dans la configuration "%s" (Voir onglet "%s") TicketsLimitViewAssignedOnly=Limiter l'afficher des tickets assignés à l'utilisateur courant (non valable pour les utilisateurs externes, toujours limité par le tiers dont ils dépendent) TicketsLimitViewAssignedOnlyHelp=Seuls les tickets affectés à l'utilisateur actuel seront visibles. Ne s'applique pas à un utilisateur disposant de droits de gestion des tickets. TicketsActivatePublicInterface=Activer l'interface publique @@ -126,10 +128,10 @@ TicketNumberingModules=Module de numérotation des tickets TicketsModelModule=Modèles de documents pour les tickets TicketNotifyTiersAtCreation=Notifier le tiers à la création 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é +TicketsPublicNotificationNewMessage=Envoyer un ou des emails lorsqu’un nouveau message/commentaire est ajouté à un ticket 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) TicketPublicNotificationNewMessageDefaultEmail=Emails de notifications à (mise à jour) -TicketPublicNotificationNewMessageDefaultEmailHelp=Envoyez une notification email de nouveau message à cette adresse si le ticket n’a pas d’utilisateur assigné ou si l’utilisateur n’a pas d’email. +TicketPublicNotificationNewMessageDefaultEmailHelp=Envoyez un email à cette adresse email pour chaque nouveau message de notifications si le ticket n'a pas d'utilisateur assigné ou si l'utilisateur n'a pas d'email connu. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Derniers tickets modifiés BoxLastModifiedTicketDescription=Les %s derniers tickets modifiés BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Pas de tickets modifiés récemment +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/fr_FR/trips.lang b/htdocs/langs/fr_FR/trips.lang index efb5b645a3d..25e174f28a6 100644 --- a/htdocs/langs/fr_FR/trips.lang +++ b/htdocs/langs/fr_FR/trips.lang @@ -29,11 +29,11 @@ ExpenseReportApprovedMessage=La note de frais %s a été approuvée.<br>- Utilis ExpenseReportRefused=Une note de frais a été refusée ExpenseReportRefusedMessage=La note de frais %s a été refusée.<br>- Utilisateur : %s<br>- Refusée par : %s<br>- Motif du refus : %s<br>Cliquez ici pour afficher la note de frais: %s ExpenseReportCanceled=Une note de frais a été annulée -ExpenseReportCanceledMessage=La note de frais %s a été annulée.<br>- Utilisateur : %s<br>- Annulée par : %s<br>- Motif de l'annulation : %s<br>Cliquez ici pour afficher la note de frais %s +ExpenseReportCanceledMessage=La note de frais %s a été annulée.<br>- Utilisateur : %s<br>- Annulée par : %s<br>- Motif de l'annulation :%s<br>Cliquez ici pour afficher la note de frais %s ExpenseReportPaid=Une note de frais a été réglée ExpenseReportPaidMessage=La note de frais %s a été réglée.<br>- Utilisateur : %s<br>- Réglée par : %s<br>Cliquez ici pour afficher la note de frais %s TripId=Id note de frais -AnyOtherInThisListCanValidate=Personne à informer pour la validation. +AnyOtherInThisListCanValidate=Personne à informer pour la validation de la demande. TripSociete=Information société TripNDF=Informations note de frais PDFStandardExpenseReports=Modèle de note de frais PDF standard @@ -49,7 +49,7 @@ TF_PEAGE=Péage TF_ESSENCE=Carburant TF_HOTEL=Hôtel TF_TAXI=Taxi -EX_KME=frais kilométriques +EX_KME=Frais kilométriques EX_FUE=Carburant EX_HOT=Hôtel EX_PAR=Stationnement @@ -110,7 +110,7 @@ ExpenseReportPayment=Paiement des notes de frais ExpenseReportsToApprove=Notes de frais à approuver ExpenseReportsToPay=Notes de frais à payer ConfirmCloneExpenseReport=Êtes-vous sûr de vouloir cloner cette note de frais ? -ExpenseReportsIk=index des frais kilométriques des notes de frais +ExpenseReportsIk=Configuration des indemnités kilométriques ExpenseReportsRules=Règle de note de frais ExpenseReportIkDesc=Vous pouvez modifier le calcul des indemnités kilométriques par catégories et gammes précédemment définies. <b>d</b> est la distance en kilomètres. ExpenseReportRulesDesc=Vous pouvez créer ou mettre à jour toutes les règles de calcul. Cette règle sera utilisée à la création d'une note de frais par un utilisateur. @@ -145,7 +145,7 @@ nolimitbyEX_DAY=par jour (sans limite) nolimitbyEX_MON=par mois (sans limite) nolimitbyEX_YEA=par an (sans limite) nolimitbyEX_EXP=par ligne (sans limite) -CarCategory=Catégorie de voiture +CarCategory=Catégorie de véhicule ExpenseRangeOffset=Montant décalage: %s RangeIk=Barème kilométrique AttachTheNewLineToTheDocument=Lié la ligne à un document téléversé diff --git a/htdocs/langs/fr_FR/users.lang b/htdocs/langs/fr_FR/users.lang index 73b9e504f74..a3085eb5d56 100644 --- a/htdocs/langs/fr_FR/users.lang +++ b/htdocs/langs/fr_FR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Supprimer du groupe PasswordChangedAndSentTo=Mot de passe changé et envoyé à <b>%s</b>. PasswordChangeRequest=Demande de changement de mot de passe pour <b> %s </b> PasswordChangeRequestSent=Demande de changement de mot de passe pour <b>%s</b> envoyée à <b>%s</b>. +IfLoginExistPasswordRequestSent=Si cet identifiant est un compte valide, un e-mail de ré-initialisation du mot de passe a été envoyé. +IfEmailExistPasswordRequestSent=Si cet email est un compte valide, un e-mail de ré-initialisation du mot de passe a été envoyé. ConfirmPasswordReset=Confirmer réinitialisation du mot de passe MenuUsersAndGroups=Utilisateurs & Groupes LastGroupsCreated=Les %s derniers groupes créés @@ -70,9 +72,10 @@ ExportDataset_user_1=Utilisateurs et attributs DomainUser=Utilisateur du domaine %s Reactivate=Réactiver CreateInternalUserDesc=Ce formulaire permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utilisez le bouton 'Créer compte utilisateur' qui se trouve sur la fiche du contact du tiers. -InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur qui fait partie de votre société/institution.<br>Un utilisateur <b>externe</b> est un compte utilisateur pour un client, fournisseur ou autre (La création d'un utilisateur externe pour un tiers peut etre fait depuis la fiche d'un contact de tiers). <br><br>Dans les deux cas, les permissions déterminent les accès aux fonctionnalités. De plus, les utilisateurs externes peuvent avoir un gestionnaire de menu différent des utilisateurs internes (Voir Accueil > configuration > Affichage) +InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur qui fait partie de votre société/institution ou un partenaire en dehors de votre organisation qui peut avoir besoin de voir plus de données que les données en rapport avec sa société (le système de permission définira ce qu'il peut ou ne peut pas voir).<br>Un utilisateur <b>externe</b> est un compte utilisateur pour un client, fournisseur ou autre qui ne doit voir QUE les données en rapport avec lui même (La création d'un utilisateur externe pour un tiers peut etre fait depuis la fiche d'un contact de tiers). <br><br>Dans les deux cas, vous devez définir les permissions des fonctionnalités dont l'utilisateur a besoin. PermissionInheritedFromAGroup=La permission est accordée car héritée d'un groupe auquel appartient l'utilisateur. Inherited=Hérité +UserWillBe=Créé par l'utilisateur UserWillBeInternalUser=L'utilisateur créé sera un utilisateur interne (car non lié à un tiers en particulier) UserWillBeExternalUser=L'utilisateur créé sera un utilisateur externe (car lié à un tiers en particulier) IdPhoneCaller=Identifiant appelant (téléphone) @@ -109,8 +112,10 @@ UserAccountancyCode=Code comptable de l'utilisateur UserLogoff=Déconnexion de l'utilisateur UserLogged=Utilisateur connecté DateOfEmployment=Date d'embauche -DateEmployment=Date d'embauche +DateEmployment=Emploi +DateEmploymentstart=Date d'embauche DateEmploymentEnd=Date de fin d'emploi +RangeOfLoginValidity=Période de validité de l'identifiant CantDisableYourself=Vous ne pouvez pas désactiver votre propre compte utilisateur ForceUserExpenseValidator=Forcer le valideur des notes de frais ForceUserHolidayValidator=Forcer le valideur des congés diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index ce277cc5f52..3af0b44c17c 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u> Utilisation avec Apache/NGinx/...</u> <br> Créez sur vot ExampleToUseInApacheVirtualHostConfig=Exemple à utiliser dans la configuration de l'hôte virtuel Apache: YouCanAlsoTestWithPHPS=<u> Utilisation avec un serveur PHP incorporé </u> <br> Sous environnement de développement, vous pouvez préférer tester le site avec le serveur Web PHP intégré (PHP 5.5 requis) en exécutant <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP=<u>Exécutez votre site Web avec un autre fournisseur d'hébergement Dolibarr</u> <br> Si vous ne disposez pas d'un serveur Web tel qu'Apache ou NGinx sur Internet, vous pouvez exporter et importer votre site Web vers une autre instance de Dolibarr fournie par un autre fournisseur d'hébergement Dolibarr offrant une intégration complète avec le module de site Web. Vous pouvez trouver une liste de certains hébergeurs Dolibarr sur <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Vérifiez également que le virtual host a la permission <strong> %s </strong> sur les fichiers dans <strong> %s </strong> +CheckVirtualHostPerms=Vérifiez également que l'utilisateur du virtual host (par exemple www-data) a la permission <strong> %s </strong> sur les fichiers dans<br><strong> %s </strong> ReadPerm=Lire WritePerm=Écrire TestDeployOnWeb=Tester/déployer sur le web PreviewSiteServedByWebServer=<u>Prévisualiser %s dans un nouvel onglet.</u><br><br>. Le %s sera servi par un serveur web externe (comme Apache, Nginx, IIS). Vous pouvez installer et configurer ce serveur auparavant pour pointer sur le répertoire : <br><strong>%s</strong><br> URL servie par un serveur externe: <br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Aperçu %s dans un nouvel onglet.</u><br><br>Le %s sera servi par le serveur Dolibarr donc aucun serveur Web supplémentaire (comme Apache, Nginx, IIS) n'est nécessaire.<br>L'inconvénient est que l'URL des pages ne sont pas sexy et commencent par un chemin de votre Dolibarr.<br>URL servie par Dolibarr:<br><strong>%s</strong><br><br>Pour utiliser votre propre serveur web externe pour servir ce site web, créez un virtual host sur vote serveur web qui pointe sur le répertoire<br><strong>%s</strong><br> ensuite entrez le nom de ce virtual host et cliquer sur le bouton d'affichage de l'aperçu. +PreviewSiteServedByDolibarr=<u>Aperçu %s dans un nouvel onglet.</u><br><br>Le %s sera servi par le serveur Dolibarr aussi aucun serveur Web supplémentaire (comme Apache, Nginx, IIS) n'est nécessaire.<br>L'inconvénient est que l'URL des pages ne sont pas sexy et commencent par un chemin de votre Dolibarr.<br>URL servie par Dolibarr:<br><strong>%s</strong><br><br>Pour utiliser votre propre serveur web externe pour servir ce site web, créez un virtual host sur votre serveur web qui pointe sur le répertoire<br><strong>%s</strong><br> ensuite entrez le nom de ce virtual host dans les propriétés de ce site web et cliquer sur le lien "Tester/Déployer sur le web". VirtualHostUrlNotDefined=URL du virtual host servit par le serveur web externe non défini NoPageYet=Pas de page pour l'instant YouCanCreatePageOrImportTemplate=Vous pouvez créer une nouvelle page ou importer un modèle de site Web complet. @@ -115,7 +115,7 @@ MyWebsitePages=Mes pages de site web SearchReplaceInto=Rechercher | Remplacer dans ReplaceString=Nouvelle chaîne CSSContentTooltipHelp=Entrez ici le contenu CSS. Pour éviter tout conflit avec le CSS de l'application, veillez à ajouter toutes les déclarations avec la classe .bodywebsite. Par exemple: <br><br> #mycssselector, input.myclass: survol {...} <br> doit être <br> .bodywebsite #mycssselector, .bodywebsite input.myclass: hover {...} <br><br> Remarque: Si vous avez un fichier volumineux sans ce préfixe, vous pouvez utiliser 'lessc' pour le convertir afin d'ajouter le préfixe .bodywebsite partout. -LinkAndScriptsHereAreNotLoadedInEditor=Avertissement: Ce contenu est affiché uniquement lorsque le site est accessible depuis un serveur. Il n'est pas utilisé en mode édition. Par conséquent, si vous devez charger des fichiers javascript également en mode édition, ajoutez simplement la balise 'script src=...' dans la page. +LinkAndScriptsHereAreNotLoadedInEditor=Avertissement: Ce contenu est affiché uniquement lorsque le site est accéder depuis un serveur. Il n'est pas pris en compte en mode édition. Par conséquent, si vous devez charger des fichiers javascript également en mode édition, ajoutez simplement la balise 'script src=...' dans la page. Dynamiccontent=Exemple de page à contenu dynamique ImportSite=Importer modèle de site web EditInLineOnOff=Mode 'Modifier en ligne' est %s @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/conteneur(s) régénéré(s) RegenerateWebsiteContent=Régénérer les fichiers de cache du site Web AllowedInFrames=Autorisé dans les Frames DefineListOfAltLanguagesInWebsiteProperties=Définir la liste des langues disponibles dans les propriétés du site web. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/fr_FR/withdrawals.lang b/htdocs/langs/fr_FR/withdrawals.lang index 771fcfbcc83..fb3e624423c 100644 --- a/htdocs/langs/fr_FR/withdrawals.lang +++ b/htdocs/langs/fr_FR/withdrawals.lang @@ -42,10 +42,10 @@ LastWithdrawalReceipt=Les %s derniers bons de prélèvements MakeWithdrawRequest=Faire une demande de prélèvement MakeBankTransferOrder=Faire une demande de virement WithdrawRequestsDone=%s demandes de prélèvements enregistrées -BankTransferRequestsDone=%s demande de prélèvement enregistrée +BankTransferRequestsDone=%s demandes de prélèvements enregistrées ThirdPartyBankCode=Code banque du tiers NoInvoiceCouldBeWithdrawed=Aucune facture traitée avec succès. Vérifiez que les factures sont sur les sociétés avec un BAN par défaut valide et que le BAN a un RUM avec le mode <strong> %s </strong>. -WithdrawalCantBeCreditedTwice=Ce bon de prélèvement est déjà classé crédité ; cette opération ne peut pas être réalisée deux fois, car cela pourrait engendrer des doublons dans les paiements et les écritures bancaires. +WithdrawalCantBeCreditedTwice=Le virement est déjà marqué comme étant crédité ; cela ne peut pas être fait deux fois, cela créerait potentiellement des paiements et des saisies bancaires en double. ClassCredited=Classer crédité ClassCreditedConfirm=Êtes-vous sûr de vouloir classer ce bon de prélèvement comme crédité sur votre compte bancaire ? TransData=Date de transmission @@ -133,8 +133,8 @@ SEPARCUR=SEPA RCUR SEPAFRST=SEPA FRST ExecutionDate=Date d'éxecution CreateForSepa=Créer fichier de prélèvement automatique -ICS=Identifiant du créditeur (CI) du prélèvement -ICSTransfer=Identifiant créditeur (CI) du virement bancaire +ICS=Identifiant du créditeur CI du prélèvement +ICSTransfer=Identifiant créditeur CI du virement bancaire END_TO_END=Balise XML SEPA "EndToEndId" - Identifiant unique attribué par transaction USTRD=Balise XML SEPA "Non structurée" ADDDAYS=Ajouter des jours à la date d'exécution @@ -150,4 +150,4 @@ InfoRejectMessage=Bonjour, <br><br> l'ordre de prélèvement de la facture %s li 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. ErrorICSmissing=ICS manquant pour le compte bancaire %s -TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Le montant total de l'ordre de prélèvement diffère de la somme des lignes diff --git a/htdocs/langs/fr_FR/zapier.lang b/htdocs/langs/fr_FR/zapier.lang index cdd9e953847..c8f0d311f1f 100644 --- a/htdocs/langs/fr_FR/zapier.lang +++ b/htdocs/langs/fr_FR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier pour Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Module Zapier pour Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configuration de Zapier pour Dolibarr +ZapierForDolibarrSetup=Configuration de Zapier pour Dolibarr ZapierDescription=Interface avec Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/fr_GA/accountancy.lang b/htdocs/langs/fr_GA/accountancy.lang deleted file mode 100644 index 552865118f1..00000000000 --- a/htdocs/langs/fr_GA/accountancy.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - accountancy -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) diff --git a/htdocs/langs/fr_GA/admin.lang b/htdocs/langs/fr_GA/admin.lang index ca2cbd16ab0..140767493ca 100644 --- a/htdocs/langs/fr_GA/admin.lang +++ b/htdocs/langs/fr_GA/admin.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - admin Module20Name=Devis Module30Name=Factures -Module59000Desc=Module to follow margins -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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/modulebuilder.lang b/htdocs/langs/fr_GA/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/fr_GA/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/fr_GA/products.lang b/htdocs/langs/fr_GA/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/fr_GA/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_GA/withdrawals.lang b/htdocs/langs/fr_GA/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/fr_GA/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/gl_ES/accountancy.lang b/htdocs/langs/gl_ES/accountancy.lang index de9a83b813d..9a9114c4fdc 100644 --- a/htdocs/langs/gl_ES/accountancy.lang +++ b/htdocs/langs/gl_ES/accountancy.lang @@ -131,7 +131,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=Conta contable total Ventilate=Contabilizar @@ -143,7 +143,7 @@ Lineofinvoice=Liña da factura LineOfExpenseReport=Liña de informe de gastos NoAccountSelected=Non foi seleccionada conta contable VentilatedinAccount=Contabilizada con éxito na conta contable -NotVentilatedinAccount=Conta sen contabilización na contabilidad +NotVentilatedinAccount=Conta sen contabilización na contabilidade XLineSuccessfullyBinded=%s produtos/servizos relacionados correctamente nunha conta contable XLineFailedToBeBinded=%s produtos/servizos sen conta contable @@ -169,8 +169,8 @@ ACCOUNTING_EXPENSEREPORT_JOURNAL=Informe de gastos diario 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 (Perdas) +ACCOUNTING_RESULT_PROFIT=Conta contable de resultado (Beneficio) +ACCOUNTING_RESULT_LOSS=Conta contable de resultado (Perdas) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Diario de peche ACCOUNTING_ACCOUNT_TRANSFER_CASH=Conta contable de transferencia bancaria @@ -180,21 +180,21 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Conta contable de operacións pendentes de asignar DONATION_ACCOUNTINGACCOUNT=Conta contable de rexistro de doacións/subvencións ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Conta contable de rexistro subscricións -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Conta contable por defecto para rexistrar os ingresos do cliente +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Conta contable por defecto para rexistrar os ingresos realizados polo cliente -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Conta contable predeterminada para os produtos comprados (usada se non están definidos na folla de produtos) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Conta contable predeterminada para os produtos comprados na CEE (usados se non están definidos na folla de produto) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Conta contable predeterminada para os produtos comprados e importados fóra da CEE (usada se non está definido na folla de produto) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Conta contable predeterminada para os produtos vendidos (usada se non están definidos na folla de produtos) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Conta contable predeterminada para os produtos vendidos na CEE (usados se non están definidos na folla de produto) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Conta contable predeterminada para os produtos vendidos e exportados fóra da CEE (usados se non están definidos na folla de produto) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Conta contable predeterminada para os produtos comprados (usada se non está definida na folla de produtos) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Conta contable predeterminada para os produtos comprados na CEE (usada se non está definida na folla de produto) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Conta contable predeterminada para os produtos comprados e importados fóra da CEE (usada se non está definida na folla de produto) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Conta contable predeterminada para os produtos vendidos (usada se non está definida na folla de produtos) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Conta contable predeterminada para os produtos vendidos na CEE (usada se non está definida na folla de produto) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Conta contable predeterminada para os produtos vendidos e exportados fóra da CEE (usada se non está definida na folla de produto) -ACCOUNTING_SERVICE_BUY_ACCOUNT=Conta contable predeterminada para os servizos comprados (usada se non están definidos na folla de servizos) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Conta contable predeterminada para os servizos comprados na CEE (usada se non está definido na folla de servizos) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Conta contable predeterminada para os servizos comprados e importados fóra da CEE (úsase se non está definido na folla de servizos) -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=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) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Conta contable predeterminada para os servizos comprados (usada se non está definida na folla de servizos) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Conta contable predeterminada para os servizos comprados na CEE (usada se non está definida na folla de servizos) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Conta contable predeterminada para os servizos comprados e importados fóra da CEE (úsase se non está definida na folla de servizos) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Conta contable predeterminada para os servizos vendidos (usada se non está definida na folla de servizos) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Conta contable predeterminada para os servizos vendidos en EU (usada se non está definida na folla de servizos) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Conta contable predeterminada para os servizos vendidos e exportados fora da EU (usada se non está definida na folla de servizos) Doctype=Tipo de documento Docdate=Data @@ -209,10 +209,10 @@ Codejournal=Diario JournalLabel=Etiqueta diario NumPiece=Apunte TransactionNumShort=Núm. transacción -AccountingCategory=Grupos persoalizados +AccountingCategory=Grupo persoalizado GroupByAccountAccounting=Agrupar por conta contable GroupBySubAccountAccounting=Agrupar por subconta contable -AccountingAccountGroupsDesc=Pode definir aquí algúns grupos de contas contables. Serán usadas para informes de contabilidade personalizados. +AccountingAccountGroupsDesc=Pode definir aquí algúns grupos de contas contables. Serán usadas para informes de contabilidade persoalizados. ByAccounts=Por contas ByPredefinedAccountGroups=Por grupos predefinidos ByPersonalizedAccountGroups=Por grupos persoalizados @@ -222,7 +222,7 @@ DeleteMvt=Eliminar liñas do Libro Maior DelMonth=Mes a eliminar DelYear=Ano a eliminar DelJournal=Diario a eliminar -ConfirmDeleteMvt=Isto eliminará todas as liñas da contabilidade do ano/mes e/ou dun diario específico. (Precísase alo menos un criterio). Terá que reutilizar a función '% s' para que o rexistro eliminado volte ao libro maior. +ConfirmDeleteMvt=Isto eliminará todas as liñas da contabilidade do ano/mes e/ou dun diario específico. (Precísase alo menos un criterio). Terá que reutilizar a función '%s' para que o rexistro eliminado volte ao libro maior. ConfirmDeleteMvtPartial=Isto eliminará a transacción d da contabilidade (eliminaranse todas as liñas relacionadas coa mesma transacción) FinanceJournal=Diario financiero ExpenseReportsJournal=Diario informe de gastos @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Non é posible autodetectar, utilice o menú <a href= ## Import ImportAccountingEntries=Entradas contables +ImportAccountingEntriesFECFormat=Entradas contables: formato FEC +FECFormatJournalCode=Código de Diario (IdDiario) +FECFormatJournalLabel=Etiqueta de Diario (EtiqDiario) +FECFormatEntryNum=Número de peza (NumEscritura) +FECFormatEntryDate=Data da peza (DataEscritura) +FECFormatGeneralAccountNumber=Número de conta xeral (NumConta) +FECFormatGeneralAccountLabel=Etiqueta de conta xeral (EtiqConta) +FECFormatSubledgerAccountNumber=Número de conta do Libro Maior (NumLibMaior) +FECFormatSubledgerAccountLabel=Etiqueta de conta do Libro Maior (EtiqLibMaior) +FECFormatPieceRef=Referencia da peza (RefPeza) +FECFormatPieceDate=Data de creación da peza (DataPeza) +FECFormatLabelOperation=Etiqueta da operación (EcritureLib) +FECFormatDebit=Débito (Débito) +FECFormatCredit=Crédito (Crédito) +FECFormatReconcilableCode=Código conciliable (Idconcilia) +FECFormatReconcilableDate=Data conciliable (DataCoinci) +FECFormatValidateDate=Data da peza validada (DataValidada) +FECFormatMulticurrencyAmount=Importe multidivisa (Importedivisa) +FECFormatMulticurrencyCode=Código multidivisa (Idivisa) + 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 +InventoryJournal=Diario de inventario + +NAccounts=%s contas diff --git a/htdocs/langs/gl_ES/admin.lang b/htdocs/langs/gl_ES/admin.lang index 4d03682d5ef..6a53c55d19c 100644 --- a/htdocs/langs/gl_ES/admin.lang +++ b/htdocs/langs/gl_ES/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Eliminar bloqueo de conexións YourSession=A súa sesión Sessions=Sesións de usuarios WebUserGroup=Usuario/grupo do servidor web +PermissionsOnFiles=Permisos en ficheiros PermissionsOnFilesInWebRoot=Permisos de ficheiros no directorio web raiz PermissionsOnFile=Permisos de ficheiro %s NoSessionFound=Parece que o seu PHP non pode listar as sesións activas. O directorio de gardado automático de sesións (<b>%s</b>) pode estar protexido (por exemplo, polos permisos do sistema operativo ou pola directiva open_basedir do seu PHP). @@ -57,11 +58,12 @@ SetupArea=Configuración UploadNewTemplate=Nova(s) prantilla(s) actualizada(s) FormToTestFileUploadForm=Formulario de proba de subida de ficheiro (según opcións escollidas) ModuleMustBeEnabled=O módulo/aplicación <b>%s</b> debe estar activado -ModuleIsEnabled=The O módulo/aplicación <b>%s</b> has foi activado +ModuleIsEnabled=O módulo/aplicación <b>%s</b> foi activado IfModuleEnabled=Nota: só é eficaz se o módulo <b>%s</b> está activado RemoveLock=Elimine o ficheiro <b>%s</b>, se existe, para permitir a utilidade de actualización. RestoreLock=Substituir un ficheiro <b>%s</b>, dándolle só dereitos de lectura a este ficheiro con el fin de prohibir nuevas actualizaciones. SecuritySetup=Configuración da seguridade +PHPSetup=Configuración PHP SecurityFilesDesc=Defina aquí as opcións de seguridade relacionadas coa subida de ficheiros. ErrorModuleRequirePHPVersion=Erro, este módulo require unha versión %s ou superior de PHP ErrorModuleRequireDolibarrVersion=Erro, este módulo require unha versión %s ou superior de Dolibarr @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Esta área ofrece distintas funcións de administración. Ut Purge=Purga PurgeAreaDesc=Esta páxina permitelle borrar todos os ficheiros xerados ou almacenados por Dolibarr (ficheiros temporais ou todos os ficheiros do directorio <b>%s</b>). O uso desta función non é precisa. Se proporciona como solución para os usuarios cuxos Dolibarr atópanse nun provedor que non ofrece permisos para eliminar os ficheiros xerados polo servidor web. PurgeDeleteLogFile=Eliminar ficheiros de rexistro, incluidos <b> %s</b> definidos polo módulo Syslog (sen risco de perda de datos) -PurgeDeleteTemporaryFiles=Eliminar todos os logs e ficheros temporais (sen risco de perda de datos). Nota: A eliminación dos ficheiros temporais é realizada só de o directorio temporal foi creado hai mas de 24h. +PurgeDeleteTemporaryFiles=Elimina todos os ficheiros de rexistro e temporais (non hai risco de perder datos). O parámetro pode ser "tempfilesold", "logfiles" ou ambos "tempfilesold + logfiles". Nota: a eliminación de ficheiros temporais só se fai se o directorio temporal creouse hai máis de 24 horas. PurgeDeleteTemporaryFilesShort=Eliminar logs e ficheiros temporais. PurgeDeleteAllFilesInDocumentsDir=Eliminar todos os ficheiros do directorio <b>%s</b>. <br> Isto eliminará todos os documentos xerados relacionados con elementos (terceiros, facturas, etc...), ficheiros actualizados no módulo ECM, copias de seguridade de bases de datos e ficheiros temporais. PurgeRunNow=Purgar agora @@ -173,7 +175,7 @@ YouCanDownloadBackupFile=Os ficheiros xerados poden descargarse agora NoBackupFileAvailable=Ningunha copia dispoñible ExportMethod=Método de exportación ImportMethod=Método de importación -ToBuildBackupFileClickHere=Para crear unha copia, faga click <a href="%s">aquí</a>. +ToBuildBackupFileClickHere=Para crear unha copia, prema <a href="%s">aquí</a>. ImportMySqlDesc=Para importar un ficheiro de copia de seguridade de MYQL, pode usar phpMyAdmin a través do se aloxamento web ou usar o comando mysql desde a liña de comandos <br> Por exemplo: ImportPostgreSqlDesc=Para importar unha copia de seguridade, debe usar o comando pg_restore dende a línea de comandos: ImportMySqlCommand=%s %s < meuficheirobackup.sql @@ -204,7 +206,7 @@ FeatureDisabledInDemo=Opción deshabilitada no demo FeatureAvailableOnlyOnStable=Funcionaliade dispoñible exclusivamente en versións oficiais estables BoxesDesc=Os paneis son compoñentes que amosan algunha información que pode engadires para persoalizar algunhas páxinas. Pode escoller entre amosar ou non o panel seleccionando a páxina de destino e facendo clic en 'Activar', ou facendo clic na papeleira para desactivalo. OnlyActiveElementsAreShown=Só os elementos de <a href="%s">módulos activados</a> son amosados. -ModulesDesc=Os módulos/aplicacións determinan qué funcionalidade está habilitada no software. Algúns módulos requiren permisos que teñen que ser concedidos aos usuarios logo de activar o módulo. Faga clic no botón<span class="small valignmiddle"> %s </span>de acendido/apagado de cada módulo para habilitar ou desactivar un módulo/aplicación. +ModulesDesc=Os módulos/aplicacións determinan qué funcionalidade está habilitada no software. Algúns módulos requiren permisos que teñen que ser concedidos aos usuarios logo de activar o módulo. Prema no botón<span class="small valignmiddle"> %s </span>de acendido/apagado de cada módulo para habilitar ou desactivar un módulo/aplicación. ModulesMarketPlaceDesc=Pode atopar mais módulos para descargar en sitios web externos da Internet ... ModulesDeployDesc=Se os permisos no seu sistema de ficheiros llo permiten, pode utilizar esta ferramenta para instalar un módulo externo. O módulo estará entón visible na lapela <strong>%s</strong>. ModulesMarketPlaces=Procurar módulos externos... @@ -232,6 +234,7 @@ BoxesAvailable=Paneis dispoñibles BoxesActivated=Paneis activos ActivateOn=Activar en ActiveOn=Activo en +ActivatableOn=Pódese activar en SourceFile=Ficheiro orixe AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dispoñible só se Javascript e Ajax non están desactivados Required=Requirido @@ -347,9 +350,10 @@ LastActivationAuthor=Último autor de activación LastActivationIP=Última IP activa UpdateServerOffline=Actualizar servidor offline WithCounter=Con contador -GenericMaskCodes=Pode introducir calquera máscara numérica. Nsta máscara, pode utilizar as seguintes etiquetas:<br><b>{000000} </b> corresponde a un número que incrementase en cada un de %s. Introduza tantos ceros como lonxitude desexa amosar. O contador complétase a partir de ceros pola esquerda coa finalidade de ter tantos ceros como a máscara. <br> <b> {000000+000}</ b> Igual que o anterior, cunha compensación correspondente ao número á dereita do sinal + aplícase a partires do primeiro %s. <br> <b> {000000@x}</b> igual que o anterior, pero o contador restablecese a cero cando chega a x meses (x entre 1 e 12). Se esta opción é utilizada e x é de 2 ou superior, entón a secuencia {yy}{mm} o {yyyy}{mm} tamén é precisa. <br> <b> {dd} </b> días (01 a 31). <br><b> {mm}</b> mes (01 a 12). <br><b>{yy}</b>, <b>{yyyy}</b> ou <b>{y}</b> ano en 2, 4 ou 1 cifra.<br> -GenericMaskCodes2=<b>{cccc}</b> código de cliente con n caracteres<br><b>{cccc000}</b> código de cliente con n caracteres é seguido por un contador adicado a clientes. Este contador adicado a clientes será reseteado ao mismo tempo que o contador global.<br><b>{tttt}</b> O código do tipo de empresa con n caracteres (vexa diccionarios->tipos de empresa).<br> +GenericMaskCodes=Pode introducir calquera máscara de numeración. Nesta máscara pódense usar as seguintes etiquetas: <br><b> {000000} </b> corresponde a un número que se incrementará en cada %s. Introduza tantos ceros como a lonxitude desexada do contador. O contador completarase con ceros desde a esquerda para ter tantos ceros como a máscara.<br><b>{000000+000}</b>igual que o anterior pero aplícase unha compensación correspondente ao número á dereita do signo + a partir do primeiro %s.<br><b> {000000@x} </b>igual que o anterior pero o contador restablécese a cero cando se alcanza o mes x (x entre 1 e 12 ou 0 para usar os primeiros meses do ano fiscal definidos na súa configuración ou 99 para restablecer a cero cada mes). Se se usa esta opción e x é 2 ou superior, entón tamén é necesaria a secuencia {yy} {mm} ou {yyyy} {mm}. <br><b>{dd} </b> días (01 a 31) .<br><b>{mm} </b>meses (01 a 12) . <br><b>{yy}</b>,<b>{yyyy}</b> ou <b>{y}</b>anos sobre 2, 4 ou 1 números.<br> +GenericMaskCodes2=<b>{cccc}</b> o código do cliente en n caracteres<br><b> {cccc000}</b>o código do cliente en n caracteres é seguido dun contador adicado ao cliente. Este contador adicado ao cliente restablécese ao mesmo tempo que o contador global.<br><b> {tttt}</b> O código do tipo de terceiros en n caracteres (ver menú Inicio - Configuración - Dicionario - Tipos de terceiros). Se engade esta etiqueta, o contador será diferente para cada tipo de terceiro <br> GenericMaskCodes3=Calquera outro caracter na máscara quedará sen cambios. <br>Non son permitidos espazos <br> +GenericMaskCodes3EAN=Os demais caracteres da máscara permanecerán intactos (excepto * ou? na 13ª posición en EAN13).<br> Non están permitidos espazos.<br> En EAN13, o último carácter despois do último } na 13ª posición debería ser * ou ?. Substituirase pola chave calculada.<br> GenericMaskCodes4a=<u>Exemplo no 99th %s do terceiro a Empresa con data do 31/01/2007: </u><br> GenericMaskCodes4b=<u>Exemplo sobre un terceiro creado o 31/03/2007:</u><br> GenericMaskCodes4c=<u>Exemplo nun produto/servizo creado o 31/03/2007:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Deixar este campo en branco significa que este valor ExtrafieldParamHelpselect=A listaxe de parámetros ten que ser key,valor<br><br> por exemplo: <br>1,value1<br>2,value2<br>3,value3<br>...<br><br>Para ter unha lista en funcion de campos adicionais de lista:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>Para ter unha lista en función doutra:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=A listaxe de parámetros debe ser ser liñas con formato key,value (onde key non pode ser '0')<br><br> por exemplo: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=A listaxe de parámetros tiene que ser key,valor (onde key non pode ser 0)<br><br> por exemplo: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=A listaxe de parámetros provén dunha táboa <br> Syntax: table_name:label_field:id_field::filter <br> Exemplo: c_typent: libelle:id::filter <br> <br> - id_field é necesariamente unha chave int primaria <br> -filter pode ser unha proba sinxela (por exemplo, activa = 1) Para amosar só o valor activo <br> Tamén pode utilizar $ID$ no filtro o cal é o id do obxecto actual <br> Para facer un SELECT no filtro de uso $SEL$ <br> se desexa filtrar en campos adicionais pode utilizar a sintaxe extra.fieldcode=... (onde código de campo é o código de campo adicional) <br> <br> Para que a lista dependa doutra lista de campos adicionais list: <br> c_typent:libelle:id: options_ <i> parent_list_code </i> |parent_column:filter <br> <br> Para que a lista dependa doutra lista: <br> c_typent:libelle:id: <i> parent_list_code </i> |parent_column:filter -ExtrafieldParamHelpchkbxlst=A listaxe de parámetros provén dunha táboa <br> Sintaxe: table_name:label_field:id_field::filter<br> Exemplo: c_typent: libelle: id:: filter <br> <br> o filtro pode ser unha proba sinxela (por exemplo, activa = 1) Para amosar só o valor activo <br> Tamén pode utilizar $ID$ no filtro no que é o id do obxecto actual <br> Para facer un SELECT no filtro use $SEL$ <br> se desexa filtrar en campos adicionais pode utilizar a sintaxe extra.fieldcode = ... (onde o código de campo é o código de campo adicional) <br> <br> Para que a lista dependa doutra lista de campos adicionais: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> |parent_column: filter <br> <br> Para que a lista dependa doutra lista: <br> c_typent: libelle:id: <i> parent_list_code </i> |parent_column:filter +ExtrafieldParamHelpsellist=A listaxe de valores provén dunha táboa<br> Sintaxe:table_name:label_field:id_field::filtersql<br> Exemplo:c_typent:libelle:id::filtersql<br><br>-id_field é necesariamente unha chave int primaria <br>-filtersql é unha condición SQL. Pode ser unha proba sinxela (por exemplo, active=1) para amosar só o valor actual <br> Tamén pode utilizar $ID$ no filtro o cal é o id activo do obxecto actual <br> Para facer un SELECT no filtro use a palabra chave $SEL$ para ignorar a protección antiinxección.<br>Se quere filtrar en campos adicionais extrafields use a sintaxe extra.fieldcode=...(onde o código do campo é o código do campo adicional extrafield)<br><br>Para ter a listaxe dependendo doutra listaxe de atributos complementarios:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filtro<br><br>Para ter a listaxe dependendo doutra listaxe:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=A listaxe de valores provén dunha táboa<br> Sintaxe:table_name:label_field:id_field::filtersq<br>Exemplo:c_typent:libelle:id::filtersql<br><br> O filtro pode ser unha proba sinxela (por exemplo, active=1) para amosar só o valor actual<br>tamén pode utilizar $ID$ no filtro o cal é o ID activo do obxecto actual<br> Para facer un SELECT no filtro use $SEL$<br> se desexa filtrar en campos adicionais extrafields use a sintaxe extra.fieldcode=...(onde o código de campo é o código do campo adicional extrafield)<br><br>Para ter a listaxe dependendo doutra listaxe de campos adicionais:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter<br><br>Para ter a listaxe dependendo doutra listaxe:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Os parámetros deben ser ObjectName:Classpath<br>Sintaxe: ObjectName:Classpath ExtrafieldParamHelpSeparator=Manter baleiro para un separador simple. <br> Estableza isto en 1 para un separador colapsado (aberto por defecto para a nova sesión, entón o estado manterase para cada sesión de usuario) <br> Estableza isto a 2 para un separador colapsado (contraído por defecto para a nova sesión, o estado mantense antes de cada sesión de usuario) LibraryToBuildPDF=Libreria usada na xeración dos PDF @@ -453,7 +457,7 @@ LocalTaxDesc=Algúns países poden aplicar dous ou tres impostos en cada liña d SMS=SMS LinkToTestClickToDial=Insira un número de teléfono ao que chamar para amosar unha ligazón e probar a URL ClickToDial para o usuario <strong>%s </strong> RefreshPhoneLink=Refrescar ligazón -LinkToTest=Ligazón seleccionable xarada para o usuario <strong>%s</strong> (faga clic no número de teléfono para probar) +LinkToTest=Ligazón seleccionable xarada para o usuario <strong>%s</strong> (prema no número de teléfono para probar) KeepEmptyToUseDefault=Deixe baleiro este campo para usar o valor por defecto KeepThisEmptyInMostCases=En moitos casos, pode deixar este campo baleiro. DefaultLink=Ligazón por defecto @@ -541,6 +545,8 @@ Module40Name=Provedores Module40Desc=Provedores e xestión de compras (pedimentos de compra e facturación de provedores) Module42Name=Rexistros de depuración Module42Desc=Xeración de logs (ficheiros, syslog,...). Ditos rexistros son para propósitos técnicos/depuración. +Module43Name=Barra de depuración +Module43Desc=Unha ferramenta para que o programador engada unha barra de depuración no seu navegador. Module49Name=Editores Module49Desc=Xestión de editores Module50Name=Produtos @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Capacidades de conversión GeoIP Maxmind Module3200Name=Ficheiros inalterables Module3200Desc=Activar o rexistro inalterable de eventos empresarais. Os eventos arquívanse en tempo real. O rexistro é unha taboa de sucesos encadeados que poden lerse e exportar. Este módulo pode ser obrigatorio nalgúns países. +Module3400Name=Redes sociais +Module3400Desc=Active os campos das redes sociais en terceiros e enderezos (skype, twitter, facebook, ...). Module4000Name=RRHH Module4000Desc=Departamento de Recursos Humanos (xestión do departamento, contratos de empregados) Module5000Name=Multi-empresa Module5000Desc=Permite xestionar varias empresas -Module6000Name=Fluxo de traballo -Module6000Desc=Xestión de fluxos de traballo (creación automática dun obxecto e/ou cambio de estado automático) +Module6000Name=Fluxo de traballo entre módulos +Module6000Desc=Xestión do fluxo de traballo entre diferentes módulos (creación automática de obxectos e/ou cambio de estado automático) Module10000Name=Sitios web Module10000Desc=Crea sitios web (públicos) cun editor WYSIWYG. Trátase dun CMS orientado a administradores web ou desenvolvedores (é mellor coñecer linguaxe HTML e CSS). Só ten que configurar o seu servidor web (Apache, Nginx, ...) para que apunte ao directorio Dolibarr adicado para que estexa en liña en internet co seu propio nome de dominio. Module20000Name=Xestión de días libres retribuidos @@ -670,7 +678,7 @@ Module54000Desc=A impresión directa (sen abrir os documentos) usa o interfaz Cu Module55000Name=Enquisa ou Voto Module55000Desc=Módulo para facer enquisas en líña ou votos (como Doodle, Studs, Rdvz, ...) Module59000Name=Marxes -Module59000Desc=Modulo para controlar marxes +Module59000Desc=Módulo para xestionar os marxes de beneficio Module60000Name=Comisións Module60000Desc=Módulo para xestionar aas comisións de venda Module62000Name=Incoterms @@ -770,7 +778,7 @@ Permission182=Crear/modificar pedimentos a provedores Permission183=Validar pedimentos a provedores Permission184=Aprobar pedimentos a provedores Permission185=Ordenar ou cancelar pedimentos a provedores -Permission186=Recibir pedimentos de provedores +Permission186=Recibir pedimentos a provedores Permission187=Pechar pedimentos a provedores Permission188=Anular pedimentos a provedores Permission192=Crear liñas @@ -805,7 +813,8 @@ PermissionAdvanced253=Crear/modificar usuarios internos/externos e os seus permi Permission254=Crear/modificar únicamente usuarios externos Permission255=Modificar o contrasinal doutros usuarios Permission256=Eliminar ou desactivar outros usuarios -Permission262=Ampliar o acceso a todos os terceiros (non só aos terceiros dos que o usuario é comercial).<br>Non efectivo para usuarios externos (sempre están limitados aos seus propios orzamentos, facturas, contratos, etc.).<br>Non efectivo para proxectos (só permisos de visión e asignación dos proxectos). +Permission262=Ampliar o acceso a todos os terceiros E aos seus obxectos (non só aos terceiros para os que o usuario é representante da venda).<br> Non é efectivo para usuarios externos (sempre limitados a eles mesmos para orzamentos, pedimentos, facturas, contratos, etc.). <br> Non é efectivo para proxectos (só as regras en permisos de proxectos, visibilidade e asuntos de asignación). +Permission263=Ampliar o acceso a todos os terceiros SEN os seus obxectos (non só a terceiros para os que o usuario é representante da venda).<br> Non é efectivo para usuarios externos (sempre limitado a eles mesmos para orzamentos, pedimentos, facturas, contratos, etc.). <br> Non é efectivo para proxectos (só as regras en permisos de proxectos, visibilidade e asuntos de asignación). Permission271=Consultar o CA Permission272=Consultar facturas Permission273=Emitir facturas @@ -899,11 +908,11 @@ Permission1183=Crear/modificar pedimentos a provedores Permission1184=Validar pedimentos a provedores Permission1185=Aprobar pedimentos a provedores Permission1186=Enviar pedimentos a provedores -Permission1187=Recibir pedimentos de provedores +Permission1187=Recibir pedimentos a provedores Permission1188=Pechar pedimentos a provedores Permission1189=Marcar/Desmarcar a recepción dunha orde de compra Permission1190=Aprobar (segunda aprobación) pedimentos a provedores -Permission1191=Exportar pedimentos de provedores e os seus atributos +Permission1191=Exportar pedimentos a provedores e os seus atributos Permission1201=Obter resultado dunha exportación Permission1202=Crear/codificar exportacións Permission1231=Consultar facturas de provedores @@ -912,7 +921,7 @@ Permission1233=Validar facturas de provedores Permission1234=Eliminar facturas de provedores Permission1235=Enviar facturas de provedores por correo Permission1236=Exportar facturas de provedores, campos adicionais e pagamentos -Permission1237=Exportar pedimentos de provedores xunto cos seus detalles +Permission1237=Exportar pedimentos a provedores xunto cos seus detalles Permission1251=Lanzar as importacións en masa á base de datos (carga de datos) Permission1321=Exportar facturas a clientes, campos adicionais e cobros Permission1322=Reabrir unha factura pagada @@ -1175,7 +1184,8 @@ SetupDescription2=As seguintes dúas seccións son obrigatorias (as dúas primei SetupDescription3=<a href="%s">%s->%s</a> <br><br> Parámetros básicos usados para persoalizar o comportamento por defecto de Dolibarr (ex. características relacionadas co país) SetupDescription4=<a href="%s">%s -> %s</a> <br><br> Este software é unha colección de moitos módulos/aplicacións, todos eles mais ou menos independentes. Os módulos relevantes que precisas deben ser activados e configurados. Novos elementos/opcións serán engadidos aos menús coa activación do módulo. SetupDescription5=Outras entradas do menú de configuración xestionan parámetros opcionais. -LogEvents=Auditoría da seguridade de eventos +AuditedSecurityEvents=Eventos de seguridade auditados +NoSecurityEventsAreAduited=Non se auditan eventos de seguridade. Pode activalos no menu %s Audit=Auditoría InfoDolibarr=Sobre Dolibarr InfoBrowser=Sobre o Navegador @@ -1193,7 +1203,7 @@ LogEventDesc=Pode habilitar o rexistro de eventos de seguridade aquí. Os admini AreaForAdminOnly=Os parámetros de configuración poden ser tratados por <b>usuarios administradores</b> exclusivamente. SystemInfoDesc=A información do sistema é información técnica accesible en modo lectura para administradores exclusivamente. SystemAreaForAdminOnly=Esta área é accesible aos usuarios administradores exclusivamente. Os permisos dos usuarios de Dolibarr non permiten cambiar esta restricción. -CompanyFundationDesc=Edite a información da súa empresa/entidade. Faga clic no botón "%s" a pé de páxina cando remate +CompanyFundationDesc=Edite a información da súa empresa/entidade. Prema no botón "%s" a pé de páxina cando remate AccountantDesc=Se ten un contable/auditor externo, pode editar aquí a súa información. AccountantFileNumber=Número de ficheiro DisplayDesc=Pode modificar aquí todos os parámetros relacionados coa apariencia do Dolibarr @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Parece preciso realizar o proceso de actualiza YouMustRunCommandFromCommandLineAfterLoginToUser=Debe executar esta orde dende unha shell despois de ter iniciado sesión co usuario <b>%s</b> ou debe engadir a opción -W ao final da liña para proporcionar un contrasinal de <b> %s </b> YourPHPDoesNotHaveSSLSupport=Funcións SSL non dispoñibles no seu PHP DownloadMoreSkins=Mais temas para descargar -SimpleNumRefModelDesc=Volta un número baixo o formato %syymm-nnnn donde y é o ano, mm o mes e nnnn un contador secuencial sen ruptura e sen regresar a 0 +SimpleNumRefModelDesc=Devolve o número de referencia no formato %s yymm-nnnn onde yy é o ano, mm é o mes e nnnn é un número secuencial de incremento automático sen restablecer ShowProfIdInAddress=Amosa o identificador profisional nos enderezos dos documentos ShowVATIntaInAddress=Ocultar o CIF intracomunitario nos enderezos dos documentos TranslationUncomplete=Tradución parcial @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Nome/Enderezo do servidor proxy MAIN_PROXY_PORT=Porto do servidor proxy MAIN_PROXY_USER=Login do servidor proxy MAIN_PROXY_PASS=Contrasinal do servidor proxy -DefineHereComplementaryAttributes=Defina aquí a listaxe de campos adicionais, non dispoñibles por defecto, e que desexa xestionar para %s. +DefineHereComplementaryAttributes=Defina os atributos adicionais / personalizacións que se deben engadir a: %s ExtraFields=Campos adicionais ExtraFieldsLines=Campos adicionais (liñas) ExtraFieldsLinesRec=Campos adicionais (prantillas de liñas de facturas) @@ -1287,7 +1297,7 @@ SendmailOptionMayHurtBuggedMTA=A función para enviar correos usando o método " TranslationSetup=Configuración de tradución TranslationKeySearch=Buscar unha chave ou cadea de tradución TranslationOverwriteKey=Sobreescribir una cadena traducida -TranslationDesc=Como configurar o idioma de visualización:<br>* Por defecto Sistema: menu <strong>Inicio - Configuración - Entorno</strong><br>* Por usuario: faga clic no nome de usuario na parte superior da pantalla e modifique a pestana <strong> Configuración da visualización do usuario </strong> na tarxeta de usuario. +TranslationDesc=Como configurar o idioma de visualización:<br>* Por defecto Sistema: menu <strong>Inicio - Configuración - Entorno</strong><br>* Por usuario: prema no nome de usuario na parte superior da pantalla e modifique a pestana <strong> Configuración da visualización do usuario </strong> na tarxeta de usuario. TranslationOverwriteDesc=Tamén pode reemplazar cadeas enchendo a seguinte táboa. Escolla o seu idioma no menú despregable "%s", insira a cadea de clave de tradución en "%s" e a súa nova tradución en "%s" TranslationOverwriteDesc2=Podes usar a outra pestana para axudarche a saber que clave de tradución usar TranslationString=Cadea traducida @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Inicio de sesión (unix) LDAPFieldLoginExample=Exemplo : uid LDAPFilterConnection=Filtro de búsqueda LDAPFilterConnectionExample=Exemplo : &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Exemplo: & (objectClass = groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Exemplo : samaccountname LDAPFieldFullname=Nome completo @@ -1606,7 +1617,7 @@ DoNotUseDescriptionOfProdut=A descrición do produto nunca se incluirá na descr MergePropalProductCard=Activar no produto/servizo a pestana Documentos unha opción para fusionar documentos PDF de produtos ao orzamento PDF azur se o produto/servizo atópase no orzamento ViewProductDescInThirdpartyLanguageAbility=Amosar as descricións dos produtos no idioma do terceiro UseSearchToSelectProductTooltip=Tamén, se ten un gran número de produtos (> 100 000), pode aumentar a velocidade configurando PRODUCT_DONOTSEARCH_ANYWHERE constante en 1 en Configuración-> Outro. A busca limitarase entón ao comezo da cadea. -UseSearchToSelectProduct=Agard a que prema unha tecla antes de cargar o contido da listaxe combinada de produtos (Isto pode aumentar o rendemento se ten un gran número de produtos, pero é menos conveniente) +UseSearchToSelectProduct=Agarda a que prema unha tecla antes de cargar o contido da listaxe combinada de produtos (Isto pode aumentar o rendemento se ten un gran número de produtos, pero é menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras predeterminado para usar en produtos SetDefaultBarcodeTypeThirdParties=Tipo de código de barras predeterminado para usar con terceiros UseUnits=Defina unha unidade de medida para Cantidade durante a edición de liñas de orzamento, pedimento ou factura @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=A súa empresa está cofigurada para que non use o IVE AccountancyCode=Código de contabilidade AccountancyCodeSell=Conta de venda. código AccountancyCodeBuy=Conta de compras código +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Manteña a caixa de verificación "Crear automáticamente o pagamento" baleira por defecto cando cree unha nova taxa ##### Agenda ##### AgendaSetup=Configuración do módulo de eventos e axenda PasswordTogetVCalExport=Chave para autorizar a ligazón de exportación +SecurityKey = Chave de seguridade PastDelayVCalExport=Non exportar eventos anteriores a AGENDA_USE_EVENT_TYPE=Usar tipos de eventos (xestionados no menú Configuración -> Dicionarios -> Tipo de eventos da axenda) AGENDA_USE_EVENT_TYPE_DEFAULT=Definir automaticamente este valor predeterminado para o tipo de evento no formulario de creación de eventos @@ -1751,7 +1764,7 @@ AGENDA_REMINDER_EMAIL=Activar a lembranza de eventos <b> por correo electrónico AGENDA_REMINDER_EMAIL_NOTE=Nota: A frecuencia da tarefa %s debe ser suficiente para asegurarse de que as lembranzas se envían no momento correcto. AGENDA_SHOW_LINKED_OBJECT=Amosar o obxecto ligado á vista de axenda ##### Clicktodial ##### -ClickToDialSetup=Faga clic para marcar a configuración do módulo +ClickToDialSetup=Prema para marcar a configuración do módulo ClickToDialUrlDesc=Url chamada cando se fai un clic na imaxe do teléfono. En URL, pode usar etiquetas <br> <b> __PHONETO__ </b> que se substituirán polo número de teléfono da persoa á que chamar <br> <b> __PHONEFROM__ </b> que se substituirá polo número de teléfono persoa (túa) <br> <b> __LOGIN__ </b> que se substituirá por inicio de sesión clicktodial (definido na tarxeta de usuario) <br> <b> __PASS__ </b> que se substituirá por contrasinal clicktodial (definido na tarxeta de usuario). ClickToDialDesc=Este módulo cambia os números de teléfono cando se usa un ordenador de escritorio por ligazóns onde se pode facer clic. Un clic chamará ao número. Isto pódese empregar para iniciar a chamada cando se usa un teléfono por software no seu escritorio ou cando se usa un sistema CTI baseado no protocolo SIP por exemplo. Nota: Cando se usa un teléfono intelixente, sempre se pode facer clic nos números de teléfono. ClickToDialUseTelLink=Use só unha ligazón "tel:" nos números de teléfono @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Marxe inferior en PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Altura para logotipo en PDF NothingToSetup=Non é precisa ningunha configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Configure isto en sí, se este grupo é un cálculo doutros grupos -EnterCalculationRuleIfPreviousFieldIsYes=Introduza a regra de cálculo se o campo anterior estaba configurado en Si (por exemplo 'CODEGRP1+CODEGRP2') +EnterCalculationRuleIfPreviousFieldIsYes=Introduza a regra de cálculo se o campo anterior estivo establecido en Si. <br>Por exemplo:<br> CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Atopáronse varias variantes de idioma RemoveSpecialChars=Eliminar caracteres especiais COMPANY_AQUARIUM_CLEAN_REGEX=Filtro de rexistro para limpar o valor (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Configuración do módulo Redes sociais EnableFeatureFor=Activar funcións para <strong>%s</strong> VATIsUsedIsOff=Nota: A opción para usar Vendas IVE ou IVE configurouse como <strong> Desactivado </strong> no menú %s -%s, polo que Vendas IVE ou IVE empregados serán sempre 0 para as vendas. SwapSenderAndRecipientOnPDF=Cambiar a posición do remitente e do destinatario en documentos PDF -FeatureSupportedOnTextFieldsOnly=Aviso, característica admitida só nos campos de texto. Tamén debe definirse un parámetro URL action=create ou action=edit Ou o nome da páxina debe rematar con 'new.php' para activar esta función. +FeatureSupportedOnTextFieldsOnly=Aviso, función compatible só cos campos de texto e listaxes combinadas. Tamén debe definirse un parámetro URL action=create ou action=edit OU o nome da páxina debe rematar con 'new.php' al trigger de esta función. EmailCollector=Receptor de correo electrónico EmailCollectorDescription=Engade unha tarefa programada e unha páxina de configuración para escanear regularmente caixas de correo electrónico (usando o protocolo IMAP) e gardarr os correos electrónicos recibidos na súa aplicación no lugar axeitado e/ou crear algúns rexistros automaticamente (como clientes potenciais). NewEmailCollector=Novo receptor de correo electrónico @@ -2049,8 +2062,11 @@ UseDebugBar=Use a barra de debug DEBUGBAR_LOGS_LINES_NUMBER=Número de últimas liñas de rexistro para manter na consola. WarningValueHigherSlowsDramaticalyOutput=Advertencia, os valores altos ralentizan enormemente a saída. ModuleActivated=O módulo %s está activado e ralentiza a interface +ModuleActivatedWithTooHighLogLevel=O módulo %s está activado cun nivel de rexistro demasiado alto (tente usar un nivel inferior para mellor rendemento) +ModuleSyslogActivatedButLevelNotTooVerbose=O módulo %s está activado e o nivel de log (%s) é correcto (non moi detallado) IfYouAreOnAProductionSetThis=Se está nun entorno de produción, debe establecer esta propiedade en %s.. AntivirusEnabledOnUpload=Antivirus activado nos ficheiros actualizados +SomeFilesOrDirInRootAreWritable=Algúns ficheiros ou directorios non están en modo de só lectura EXPORTS_SHARE_MODELS=Os modelos de exportación son compartidos con todos. ExportSetup=Configuración do módulo de exportación. ImportSetup=Configuración do módulo Importación @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Fai un Ping anónimo '+1' ao servidor da fundación Dolibarr ( FeatureNotAvailableWithReceptionModule=Función non dispoñible cando a recepción do módulo está activada EmailTemplate=Modelo para correo electrónico EMailsWillHaveMessageID=Os correos electrónicos terán unha etiqueta "Referencias" que coincide con esta sintaxe +PDF_SHOW_PROJECT=Amosar proxecto no documento +ShowProjectLabel=Etiqueta do proxecto PDF_USE_ALSO_LANGUAGE_CODE=Se desexa ter algúns textos no seu PDF duplicados en 2 idiomas diferentes no mesmo PDF xerado, debe configurar aquí este segundo idioma para que o PDF xerado conteña 2 idiomas diferentes na mesma páxina, o elixido ao xerar PDF e este (só algúns modelos PDF soportan isto). Mantéñase baleiro por un idioma por PDF. FafaIconSocialNetworksDesc=Introduza aquí o código dunha icona FontAwesome. Se non sabe o que é FontAwesome, pode usar o valor xenérico fa-address-book. FeatureNotAvailableWithReceptionModule=Función non dispoñible cando a recepción do módulo está activada @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Modificar este valor a %s é recomendable para maio DictionaryProductNature= Natureza do produto CountryIfSpecificToOneCountry=País (se é específico dun determinado país) YouMayFindSecurityAdviceHere=Pode atopar avisos de seguridade aquí -ModuleActivatedMayExposeInformation=Este módulo pode expor datos sensible. Se non o precisa, desactive. +ModuleActivatedMayExposeInformation=Esta extensión de PHP pode amosar datos sensibles. Se non a precisa, desactivea ModuleActivatedDoNotUseInProduction=Un módulo deseñado para desenvolvemento foi activado. Non o active nun entorno de produción. CombinationsSeparator=Caracter separador para combinación de produtos SeeLinkToOnlineDocumentation=Ver ligazón á documentación en liña no menú superior con exemplos SHOW_SUBPRODUCT_REF_IN_PDF=Se se usa a función "%s" do módulo <b>%s</b>, amosa os detalles dos subprodutos dun kit en PDF. AskThisIDToYourBank=Póñase en contacto co seu banco para obter esta identificación +AdvancedModeOnly=Permiso dispoñible só en modo de permisos avanzados +ConfFileIsReadableOrWritableByAnyUsers=Calquera usuario pode ler ou escribir o ficheiro conf. Dar permiso só ao usuario e ao grupo do servidor web. +MailToSendEventOrganization=Organización de eventos +AGENDA_EVENT_DEFAULT_STATUS=Estado predeterminado do evento ao crear un evento desde o formulario +YouShouldDisablePHPFunctions=Debería desactivar as funcións PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Agás se precisa executar comandos do sistema (para o módulo Traballo programado, ou executar o antivirus na liña de comandos externa por exemplo), debería ddescativar as funcións PHP +NoWritableFilesFoundIntoRootDir=Non se atoparon ficheiros ou directorios con permisos de escritura dos programas comúns no directorio raíz (Bo) +RecommendedValueIs=Recomendado %s +ARestrictedPath=Un path restrinxido diff --git a/htdocs/langs/gl_ES/agenda.lang b/htdocs/langs/gl_ES/agenda.lang index b0328266609..95a0a0be7dc 100644 --- a/htdocs/langs/gl_ES/agenda.lang +++ b/htdocs/langs/gl_ES/agenda.lang @@ -4,7 +4,7 @@ Actions=Eventos Agenda=Axenda TMenuAgenda=Axenda Agendas=Axendas -LocalAgenda=Calendario interno +LocalAgenda=Calendario por defecto ActionsOwnedBy=Evento propiedade de ActionsOwnedByShort=Propietario AffectedTo=Asignada a @@ -14,13 +14,13 @@ EventsNb=Número de eventos ListOfActions=Listaxe de eventos EventReports=Informes de evento Location=Localización -ToUserOfGroup=Enento asignado a calquera usuario do grupo +ToUserOfGroup=Evento asignado a calquera usuario do grupo EventOnFullDay=Evento para todo o(s) día(s) MenuToDoActions=Todos os eventos incompletos MenuDoneActions=Todos os eventos rematados MenuToDoMyActions=Meus eventos incompletos MenuDoneMyActions=Meus eventos rematados -ListOfEvents=Listaxe de acontecementos (calendario interno) +ListOfEvents=Listaxe de eventos (calendario por defecto) ActionsAskedBy=Eventos rexistrados por ActionsToDoBy=Eventos asignados a ActionsDoneBy=Eventos realizados por @@ -31,7 +31,7 @@ ViewWeek=Vista semanal ViewPerUser=Vista por usuario ViewPerType=Vista por tipo AutoActions= Inclusión automática na axenda -AgendaAutoActionDesc= Aquí podes definir os eventos que queras que Dolibarr cre automáticamente in Agenda. Se non sinalas nada, só as accións manuais serán visualizadas na axenda. O seguemento automático de accións comerciais sobre obxectos (validación, cambio de estado, non será gardado. +AgendaAutoActionDesc= Aquí podes definir os eventos que queras que Dolibarr cre automáticamente en Axenda. Se non sinalas nada, só as accións manuais serán visualizadas na axenda. O seguemento automático de accións comerciais sobre obxectos (validación, cambio de estado), non será gardado. AgendaSetupOtherDesc= Esta páxina ten opcións que permiten a configuración da exportación dos eventos de Dolibarr a un calendario externo (Thunderbird, Google Calendar etc...) AgendaExtSitesDesc=Esta páxina permite configurar fontes externas de calendarios para ver os seus eventos dentro da axenda Dolibarr. ActionsEvents=Eventos para que Dolibarr cre unha acción na axenda automáticamente @@ -119,6 +119,7 @@ MRP_MO_UNVALIDATEInDolibarr=OF establecida a borrador MRP_MO_PRODUCEDInDolibarr=OF producida MRP_MO_DELETEInDolibarr=OF eliminada MRP_MO_CANCELInDolibarr=OF cancelada +PAIDInDolibarr=%s xa pago ##### End agenda events ##### AgendaModelModule=Prantillas de documentos para eventos DateActionStart=Data de inicio @@ -130,7 +131,7 @@ AgendaUrlOptions4=<b>logint=%s</b>para restrinxir saída as accións asignadas a AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> para restrinxir saída de accións asociadas ao proxecto <b>__PROJECT_ID__</b>. AgendaUrlOptionsNotAutoEvent=<b>notactiontype = systemauto</b> para excluir o evento automáticamente. AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> a incluir eventos de vacacións. -AgendaShowBirthdayEvents=Amosar cumpreanos dos contactos +AgendaShowBirthdayEvents=Aniversarios dos contactos AgendaHideBirthdayEvents=Ocultar cumpreanos dos contactos Busy=Ocupado ExportDataset_event1=Listaxe de eventos da axenda diff --git a/htdocs/langs/gl_ES/banks.lang b/htdocs/langs/gl_ES/banks.lang index bbcfd6fd8f9..c262df8c706 100644 --- a/htdocs/langs/gl_ES/banks.lang +++ b/htdocs/langs/gl_ES/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automaticanete cubra a etiqueta 'numero de extracto bancario' co último número de extracto de cando fixo a reconciliación CashControl=Control de caixa TPV -NewCashFence=Pehe de nova caixa +NewCashFence=Nova apertura ou peche de caixa BankColorizeMovement=Colorear os movementos BankColorizeMovementDesc=Se esta función está activada, pode escoller unha cor específica do fondo dos movementos de crédito ou de débito BankColorizeMovementName1=Cor de fondo para movementos de débito BankColorizeMovementName2=Cor de fondo para os movementos de crédito IfYouDontReconcileDisableProperty=Se non aplica as reconciliacións bancarias nalgunhas contas bancarias, desactivar as propiedades "%s" nelas apara eliminar este aviso. NoBankAccountDefined=Non está definida a conta bancaria +NoRecordFoundIBankcAccount=Non foi atopado ningún rexistro na conta bancaria. Normalmente, isto ocorre cando un rexistro foi eliminado manualmente da listaxe de transaccións da conta bancaria (por exemplo, durante a conciliación da conta bancaria). Outro motivo é que o pagamento foi rexistrado cando o modulo "%s estivo" desactivado. diff --git a/htdocs/langs/gl_ES/bills.lang b/htdocs/langs/gl_ES/bills.lang index a5ca9f3aeff..32a35a392fd 100644 --- a/htdocs/langs/gl_ES/bills.lang +++ b/htdocs/langs/gl_ES/bills.lang @@ -54,7 +54,8 @@ InvoiceCustomer=Factura a cliente CustomerInvoice=Factura a cliente CustomersInvoices=Facturas a clientes SupplierInvoice=Factura de provedor -SuppliersInvoices=Facturas provedores +SuppliersInvoices=Facturas de provedores +SupplierInvoiceLines=Liñas de factura do provedor SupplierBill=Factura de provedor SupplierBills=Facturas de provedores Payment=Pagamento @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pagamentos efectuados PaymentsBackAlreadyDone=Reembolsos xa efectuados PaymentRule=Forma de pagamento PaymentMode=Forma de pagamento +DefaultPaymentMode=Tipo de pagamento predeterminado +DefaultBankAccount=Conta bancaria predeterminada PaymentTypeDC=Tarxeta de Débito/Crédito PaymentTypePP=PayPal IdPaymentMode=Tipo de pagamento (id) @@ -329,7 +332,7 @@ 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 +OrderBilled=Pedimento facturado DonationPaid=Doación paga PaymentNumber=Número de pagamento RemoveDiscount=Eliminar desconto @@ -373,6 +376,7 @@ DateLastGeneration=Data da última xeración DateLastGenerationShort=Data última xeración MaxPeriodNumber=Nº máximo de facturas a xerar NbOfGenerationDone=Número de facturas xa xeradas +NbOfGenerationOfRecordDone=Número de xeración de rexistros xa realizadas NbOfGenerationDoneShort=Número de xeracións feitas MaxGenerationReached=Máximo número de xeracións alcanzado InvoiceAutoValidate=Validar facturas automáticamente @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=14 días a fin de més FixAmount=Importe fixo -1 liña coa etiqueta %s VarAmount=Importe variable (%% total) VarAmountOneLine=Cantidade variable (%% tot.) - 1 liña coa etiqueta '%s' -VarAmountAllLines=Cantidade variable (%% tot.) - as mesmas liñas +VarAmountAllLines=Cantidade variable (%% tot.)- Todas as liñas desde a orixe # PaymentType PaymentTypeVIR=Transferencia bancaria PaymentTypeShortVIR=Transferencia bancaria @@ -494,12 +498,16 @@ 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. +CantRemovePaymentVATPaid=Non se pode eliminar o pago porque a declaración do IVE está clasificada como pagada +CantRemovePaymentSalaryPaid=Non se pode eliminar o pago xa que o salario está clasificado como pagado 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 +ClosePaidVATAutomatically=Clasifique automaticamente a declaración de IVE como "Pago" cando o pagamento é feito por completo. +ClosePaidSalaryAutomatically=Clasifique automaticamente o salario como "Pagado" cando o pagamento é realizado por completo. AllCompletelyPayedInvoiceWillBeClosed=Todas as facturas cun resto a pagar 0 serán automáticamente pechadas ao estado "Pagada". ToMakePayment=Pagar ToMakePaymentBack=Reembolsar @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Primeiro ten que crear unha factura están PDFCrabeDescription=Modelo PDF de factura Crabe. Un modelo de factura completo (implementación antiga do modelo Sponge) PDFSpongeDescription=Modelo PDF de factura Sponge. Un modelo de factura completo PDFCrevetteDescription=Modelo PDF de factura Crevette. Un modelo de factura completo para as facturas de situación -TerreNumRefModelDesc1=Número de devolución co formato %syymm-nnnn para as facturas estándar e %syymm-nnnn para as notas de crédito onde aa é ano, mm é mes e nnnn é unha secuencia sen interrupción e sen retorno a 0 -MarsNumRefModelDesc1=Número de devolución co formato %syymm-nnnn para as facturas estándar, %syymm-nnnn para as facturas de reposición, %syymm-nnnn para as facturas de pago inicial e %syymm-nnnn para as notas de crédito onde aa é ano, mm é mes e nnnn é unha secuencia sen interrupción e sen retorno a 0 +TerreNumRefModelDesc1=Devolve o número no formato %s yymm-nnnn para as facturas estándar e %s yymm-nnnn para as notas de crédito onde aa é ano, mm é mes e nnnn é un número secuencial de incremento automático sen interrupción e sen retorno a 0 +MarsNumRefModelDesc1=Devolve o número no formato %s yymm-nnnn para as facturas estándar, %s yymm-nnnn para as facturas rectificativas, %s yymm-nnnn para as facturas de anticipo e %s yymm-nnnn para as notas de crédito onde o ano é mm, mm é mes e nnnn é unha número secuencial de incremento automático sen interrupción e sen retorno a 0 TerreNumRefModelError=Xa existe unha factura que comeza con $syymm e non é compatible con este modelo de secuencia. Elimina ou renoméao para activar este módulo. -CactusNumRefModelDesc1=Número de devolución co formato %syymm-nnnn para as facturas estándar, %syymm-nnnn para as notas de crédito e %syymm-nnnn para as facturas de pago inicial onde aa é ano, mm é mes e nnnn é unha secuencia sen interrupción e sen devolución a 0 +CactusNumRefModelDesc1=Devolve un número no formato %s yymm-nnnn para as facturas estándar, %s yymm-nnnn para as notas de crédito e %s yymm-nnnn para as facturas de anticipo onde aa é ano, mm é mes e nnnn é un número secuencial de incremento automático sen interrupción e sen retorno a 0 EarlyClosingReason=Motivo de peche anticipado EarlyClosingComment=Nota de peche anticipado ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Se precisa xerar estas facturas automaticament DeleteRepeatableInvoice=Eliminar factura modelo ConfirmDeleteRepeatableInvoice=¿Está certo de que quere eliminar a factura modelo? CreateOneBillByThird=Crear unha factura por terceiro (se non, unha factura por pedimento) -BillCreated=Creáronse %s factura(s) +BillCreated=%s factura(s) xerada +BillXCreated=Factura %s xerada StatusOfGeneratedDocuments=Estado da xeración de documentos DoNotGenerateDoc=Non xerar ficheiro de documento AutogenerateDoc=Xerar automaticamente un ficheiro de documento diff --git a/htdocs/langs/gl_ES/boxes.lang b/htdocs/langs/gl_ES/boxes.lang index 9012a5b62ac..9ac7e2e7401 100644 --- a/htdocs/langs/gl_ES/boxes.lang +++ b/htdocs/langs/gl_ES/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Estatísticas sobre os principais obxectos comerciais na base de datos BoxLoginInformation=Información login BoxLastRssInfos=Fíos de información RSS BoxLastProducts=Últimos %s produtos/servizos @@ -17,9 +18,13 @@ BoxLastActions=Últimas accións BoxLastContracts=Últimos contratos BoxLastContacts=Últimos contactos/enderezos BoxLastMembers=Últimos membros +BoxLastModifiedMembers=Últimos membros modificados +BoxLastMembersSubscriptions=Últimas subscricións de membros BoxFicheInter=Últimas intervencións BoxCurrentAccounts=Balance de contas abertas BoxTitleMemberNextBirthdays=Cumpreanos neste mes (Membros) +BoxTitleMembersByType=Membros por tipo +BoxTitleMembersSubscriptionsByYear=Subscricións de membros por ano BoxTitleLastRssInfos=Últimas %s novas de %s BoxTitleLastProducts=Produtos/Servizos: Últimos %s modificados BoxTitleProductsAlertStock=Produtos: alerta de stock @@ -46,7 +51,7 @@ BoxTitleLastModifiedDonations=Últimas %s doacións/subvencións modificadas BoxTitleLastModifiedExpenses=Últimos %s informes de gastos modificados BoxTitleLatestModifiedBoms=Últimos %s MRP modificados BoxTitleLatestModifiedMos=Últimos %s ordes de fabricación modificadas -BoxTitleLastOutstandingBillReached=Superouse o máximo de clientes con pendente +BoxTitleLastOutstandingBillReached=Clientes con máximo pendente superado BoxGlobalActivity=Actividade global (facturas, orzamentos, ordes) BoxGoodCustomers=Bos clientes BoxTitleGoodCustomers=%s Bos clientes @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Últimos %s envíos a clientes NoRecordedShipments=Ningún envío a cliente rexistrado BoxCustomersOutstandingBillReached=Alcanzáronse os clientes cun límite pendente # Pages -AccountancyHome=Contabilidade +UsersHome=Usuarios e grupos internos +MembersHome=Membros internos +ThirdpartiesHome=Terceiros internos +TicketsHome=Tickets internos +AccountancyHome=Contabilidade interna ValidatedProjects=Proxectos validados diff --git a/htdocs/langs/gl_ES/categories.lang b/htdocs/langs/gl_ES/categories.lang index 13f95f1a8dc..7abe3fbe746 100644 --- a/htdocs/langs/gl_ES/categories.lang +++ b/htdocs/langs/gl_ES/categories.lang @@ -2,7 +2,7 @@ Rubrique=Etiqueta/Categoría Rubriques=Etiquetas/Categorías RubriquesTransactions=Etiquetas/Categorías de transaccións -categories=etiquetas/categorias +categories=etiquetas/categorías NoCategoryYet=Ningunha etiqueta/categoría deste tipo creada In=En AddIn=Engadir en @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Área etiquetas/categorías Provedores CustomersCategoriesArea=Área etiquetas/categorías Clientes MembersCategoriesArea=Área etiquetas/categorías Membros ContactsCategoriesArea=Área etiquetas/categorías de Contactos -AccountsCategoriesArea=Área etiquetas/categorías Contables +AccountsCategoriesArea=Etiquetas cuentas bancarias/Área categorías ProjectsCategoriesArea=Área etiquetas/categorías Proxectos UsersCategoriesArea=Área etiquetas/categorías Usuarios SubCats=Subcategorías @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Asignar categoría ao provedor ShowCategory=Amosar etiqueta/categoría ByDefaultInList=Por defecto na listaxe ChooseCategory=Escoller categoría -StocksCategoriesArea=Categorías de almacéns -ActionCommCategoriesArea=Categorías de eventos +StocksCategoriesArea=Categorías de almacén +ActionCommCategoriesArea=Categorías de evento WebsitePagesCategoriesArea=Categorías de contedores de páxina UseOrOperatorForCategories=Uso ou operador para categorías diff --git a/htdocs/langs/gl_ES/companies.lang b/htdocs/langs/gl_ES/companies.lang index bb98f3309db..1e6ce90501d 100644 --- a/htdocs/langs/gl_ES/companies.lang +++ b/htdocs/langs/gl_ES/companies.lang @@ -45,7 +45,8 @@ ParentCompany=Sede empresa Subsidiaries=Filiais ReportByMonth=Informe por mes ReportByCustomers=Informe por cliente -ReportByQuarter=Informe por taxa +ReportByThirdparties=Informe por terceiro +ReportByQuarter=Informe por tarifa CivilityCode=Código cortesía RegisteredOffice=Domicilio social Lastname=Apelidos @@ -172,14 +173,20 @@ ProfId1ES=Id Prof. 1 (CIF/NIF) ProfId2ES=Id Prof. 2 (Número Seguridade Social) ProfId3ES=Id Prof 3 (CNAE) ProfId4ES=Id Prof 4 (Número de colexiado) -ProfId5ES=Número EORI +ProfId5ES=Prof Id 5 (Número EORI) ProfId6ES=- ProfId1FR=Id Prof 1 (SIREN) ProfId2FR=Id Prof 2 (SIRET) ProfId3FR=Id Prof 3 (NAF, antigo APE) ProfId4FR=Id Prof 4 (RCS/RM) -ProfId5FR=Número EORI +ProfId5FR=Prof Id 5 (número EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Número rexistro ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=Número EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Negocios permitidos) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Id Prof 1 (NIPC) ProfId2PT=Id Prof. 2 (Número segurança social) ProfId3PT=Id Prof. 3 (Número rexistro comercial) ProfId4PT=Id Prof 4 (Conservatorio) -ProfId5PT=Número EORI +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=Número EORI +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Id prof. 1 (OGRN) ProfId2RU=Id prof. 2 (INN) @@ -359,7 +367,7 @@ VATIntraManualCheck=Pode tamén verificar manualmente na web da Comisión Europe ErrorVATCheckMS_UNAVAILABLE=Comprobación imposible. O servizo de comprobación non é fornecido polo Estado membro (%s). NorProspectNorCustomer=Nin cliente, nin cliente potencial JuridicalStatus=Forma xurídica -Workforce=TRaballadores +Workforce=Traballadores Staff=Empregados ProspectLevelShort=Potencial ProspectLevel=Cliente potencial @@ -441,7 +449,7 @@ CurrentOutstandingBill=Risco alcanzado OutstandingBill=Importe máximo para facturas pendentes OutstandingBillReached=Importe máximo para facturas pendentes OrderMinAmount=Importe mínimo para pedimento -MonkeyNumRefModelDesc=Devolve un número co formato %syymm-nnnn para os códigos de clientes e %syymm-nnnn para os códigos dos provedores, onde yy é o ano, mm é o mes e nnnn é unha secuencia sen ruptura e sen voltar a 0. +MonkeyNumRefModelDesc=Devolve un número no formato %s yymm-nnnn para o código do cliente e %s yymm-nnnn para o código do provedor onde aa é ano, mm é mes e nnnn é un número secuencial de incremento automático sen interrupción e sen retorno a 0. LeopardNumRefModelDesc=Código libre. Pode ser modificado en calquera momento. ManagingDirectors=Administrador(es) (CEO, director, presidente, etc.) MergeOriginThirdparty=Terceiro duplicado (terceiro a eliminar) diff --git a/htdocs/langs/gl_ES/compta.lang b/htdocs/langs/gl_ES/compta.lang index 92a135523c0..ae6b5e0ca8b 100644 --- a/htdocs/langs/gl_ES/compta.lang +++ b/htdocs/langs/gl_ES/compta.lang @@ -37,7 +37,7 @@ VATReceived=IVE repercutido VATToCollect=IVE compras VATSummary=Balance de IVE mensual VATBalance=Balance de IVE -VATPaid=IVE pagado +VATPaid=IVE xa pago LT1Summary=Resumo do imposto 2 RE LT2Summary=Resumo do imposto 3 IRPF LT1SummaryES=Balance de RE @@ -65,6 +65,7 @@ LT2SupplierIN=Compras SGST VATCollected=IVE recuperado StatusToPay=A pagar SpecialExpensesArea=Área de pagamentos especiais +VATExpensesArea=Área para todos os pagos de IVE SocialContribution=Impostos sociais ou fiscais SocialContributions=Impostos sociais ou fiscais SocialContributionsDeductibles=Impostos sociais ou fiscais deducibles @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Cobro factura ao cliente PaymentSupplierInvoice=Pagamento factura de provedor PaymentSocialContribution=Pagamentos taxas sociais/fiscais PaymentVat=Pagamento IVE +AutomaticCreationPayment=Rexistra automaticamente o pagamento ListPayment=Listaxe de pagamentos ListOfCustomerPayments=Listaxe de pagamentos de clientes ListOfSupplierPayments=Listaxe de pagamentos a provedores @@ -104,6 +106,8 @@ LT2PaymentES=Pagamento de IRPF LT2PaymentsES=Pagamentos de IRPF VATPayment=Pagamento de IVE VATPayments=Pagamentos de IVE +VATDeclarations=Liquidacións de IVE +VATDeclaration=Liquidación de IVE VATRefund=Devolución IVE NewVATPayment=Novo pagamento IVE NewLocalTaxPayment=Novo pagamento de %s @@ -113,9 +117,9 @@ ShowVatPayment=Consultar pagamentos de IVE TotalToPay=Total a pagar BalanceVisibilityDependsOnSortAndFilters=O saldo é visible nesta lista só se a táboa está ordenada en %s e filtrada nunha 1 conta bancaria (sen outros filtros) CustomerAccountancyCode=Código contable cliente -SupplierAccountancyCode=Código contable provedor -CustomerAccountancyCodeShort=Cód. conta cliente -SupplierAccountancyCodeShort=Cód. conta provedor +SupplierAccountancyCode=Conta contable provedor +CustomerAccountancyCodeShort=Conta cont. cliente +SupplierAccountancyCodeShort=Conta cont. provedor AccountNumber=Número de conta NewAccountingAccount=Nova conta Turnover=Volume de vendas emitidas @@ -134,9 +138,17 @@ 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? +PayVAT=Pagar liquidación de IVE +PaySalary=Pagar unha tarxeta salarial +ConfirmPaySocialContribution=Está certo de querer clasificar este imposto social ou fiscal como pagado? +ConfirmPayVAT=Está certo de querer clasificar esta liquidación de IVE como pagada? +ConfirmPaySalary=Esta certo de querer clasificar esta tarxeta salarial como paga? DeleteSocialContribution=Eliminar un pagamento de taxa social ou fiscal -ConfirmDeleteSocialContribution=¿Está certo de querer eliminar este pagamento de taxa social/fiscal? +DeleteVAT=Eliminar a liquidación de IVE +DeleteSalary=Eliminar unha tarxeta salarial +ConfirmDeleteSocialContribution=Está certo de querer eliminar este pago de impostos sociais/fiscais? +ConfirmDeleteVAT=Está certo de querer eliminar esta liquidacion de IVE? +ConfirmDeleteSalary=Está certo de querer eliminar este salario? ExportDataset_tax_1=taxas sociais e fiscais e pagamentos CalcModeVATDebt=Modo <b>%sIVE sobre facturas emitidas%s</b>. CalcModeVATEngagement=Modo <b>%sIVE sobre facturas cobradas%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Inclúe os pagamentos realizados sobre as facturas, os gastos RulesCADue=- Inclúe as facturas a clientes, estexan xa pagas ou non.<br>- Baseado na data de validación das mesmas.<br> RulesCAIn=- Inclúe os pagamentos efectuados das facturas a clientes.<br>- Baseado na data de pagamento das mesmas<br> RulesCATotalSaleJournal=Inclúe todas as líñas de crédito do diario de vendas. +RulesSalesTurnoverOfIncomeAccounts=Inclúe (crédito - débito) de liñas para contas de produtos no gupo INGRESOS 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 <b>agrupadas por grupos persoalizados</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Amosar detalles desta tarifa LT1ReportByQuarters=Informe do imposto 2 IRPF por taxa LT2ReportByQuarters=Informe do imposto 3 IRPF por taxa LT1ReportByQuartersES=Informe de RE por taxa @@ -217,7 +231,7 @@ Pcg_subtype=Subtipo de conta InvoiceLinesToDispatch=Líñas de facturas a contabilizar ByProductsAndServices=Por produtos e servizos RefExt=Ref. externa -ToCreateAPredefinedInvoice=Para crear unha factura modelo, cree unha factura estándar e, sen validala, prema nos botóns "%s". +ToCreateAPredefinedInvoice=Para crear unha factura modelo, cree unha factura estándar e, sen validala, prema no botón "%s". LinkedOrder=Ligar a pedimento Mode1=Método 1 Mode2=Método 2 @@ -227,14 +241,16 @@ TurnoverPerProductInCommitmentAccountingNotRelevant=O informe do volume de negoc TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=O informe do volume de negocio recadado por tipo de imposto sobre a venda non está dispoñible. Este informe só está dispoñible para o volume de negocio facturado. 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=Código contable empregado para terceiros clientes -ACCOUNTING_ACCOUNT_CUSTOMER_Desc=O código contable adicado definido na tarxeta de terceiros usarase só para a contabilidade ddo Sub Libro Maior. Este usarase para o Libro Maior e como valor predeterminado da contabilidade de Sub Libro Maior se non se define unha conta contable de cliente adicada a terceiros. -ACCOUNTING_ACCOUNT_SUPPLIER=Código contable empregado por terceiros provedores +ACCOUNTING_VAT_SOLD_ACCOUNT=Conta contable por defecto para o IVE de vendas (usada se non é definida no diccionario de IVE) +ACCOUNTING_VAT_BUY_ACCOUNT=Conta contable por defecto para o IVE de compras (usada se non é definida no diccionario de IVE) +ACCOUNTING_VAT_PAY_ACCOUNT=Conta contable por defecto para o pagamento de IVE +ACCOUNTING_ACCOUNT_CUSTOMER=Conta contable empregada para terceiros clientes +ACCOUNTING_ACCOUNT_CUSTOMER_Desc=A conta contable adicada definida na tarxeta de terceiros usarase só para a contabilidade do Sub Libro Maior. Esta usarase para o Libro Maior e como valor predeterminado da contabilidade de Sub Libro Maior se non se define unha conta contable de cliente adicada a terceiros. +ACCOUNTING_ACCOUNT_SUPPLIER=Conta contable empregada por terceiros provedores ACCOUNTING_ACCOUNT_SUPPLIER_Desc=A conta de contabilidade adicada definida na tarxeta de terceiros usarase só para a contabilidade d a conta maior. Esta usarase para o libro maior e como valor predeterminado da contabilidade de maior se non se define unha conta de contas de provedores adicada a terceiros. ConfirmCloneTax=Confirmar a clonación dunha taxa social/fiscal +ConfirmCloneVAT=Confirmar a clonación dunha liquidación de IVE +ConfirmCloneSalary=Confirmar o clonado dun salario CloneTaxForNextMonth=Clonarla para o próximo mes SimpleReport=Informe simple AddExtraReport=Informes adicionais (engade informe de clientes extranxeiros e locais) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Pagado neste período +PaidDuringThisPeriodDesc=Esta é a suma de todos os pagamentos ligados ás liquidacións de IVE que teñen unha data de finalización do período no rango de datas seleccionado ByVatRate=Por taxa de imposto TurnoverbyVatrate=Volume de vendas emitidas por tipo de imposto TurnoverCollectedbyVatrate=Volume de vendas cobradas por tipo de imposto @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Volume de compras recollido RulesPurchaseTurnoverDue=- Inclúe as facturas vencidas do provedor se se pagan ou non. <br>- Baséase na data da factura destas facturas<br> RulesPurchaseTurnoverIn=- Inclúe todos os pagamentos efectivos das facturas feitos aos provedores<br>- Baséase na data de pagamento destas facturas<br> RulesPurchaseTurnoverTotalPurchaseJournal=Inclúe todas as liñas de débito do diario de compras. +RulesPurchaseTurnoverOfExpenseAccounts=Inclúe (crédito - débito) de liñas para contas de produtos no gupo GASTOS ReportPurchaseTurnover=Volume compras facturadas ReportPurchaseTurnoverCollected=Volume de compras abonadas IncludeVarpaysInResults = Inclúe varios pagos en informes diff --git a/htdocs/langs/gl_ES/ecm.lang b/htdocs/langs/gl_ES/ecm.lang index eb6c9efa259..c85c97b756f 100644 --- a/htdocs/langs/gl_ES/ecm.lang +++ b/htdocs/langs/gl_ES/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Ficheiro aínda non indexado na base de datos (tente ExtraFieldsEcmFiles=Extrafields en ficheiros ECM ExtraFieldsEcmDirectories=Extrafields en directorios ECM ECMSetup=Configuración ECM +GenerateImgWebp=Duplica todas as imaxes con outra versión con formato .webp +ConfirmGenerateImgWebp=Se confirma, xerará unha imaxe en formato .webp para todas as imaxes incluídas neste cartafol e no cartafol fillo ... +ConfirmImgWebpCreation=Confirmar a duplicación de todas as imaxes +SucessConvertImgWebp=Imaxes duplicadas correctamente diff --git a/htdocs/langs/gl_ES/errors.lang b/htdocs/langs/gl_ES/errors.lang index 4e0a15fee05..604b367d989 100644 --- a/htdocs/langs/gl_ES/errors.lang +++ b/htdocs/langs/gl_ES/errors.lang @@ -44,7 +44,7 @@ ErrorBadImageFormat=O ficheiro de imaxe non ten un formato compatible (o seu PHP ErrorBadDateFormat=O valor '%s' ten un formato de data erroneo ErrorWrongDate=A data non correcta! ErrorFailedToWriteInDir=Erro ao escribir no directorio %s -ErrorFoundBadEmailInFile=Atopouse unha sintaxe de correo electrónico incorrecta para % s liñas no ficheiro (exemplo liña %s con correo electrónico=%s) +ErrorFoundBadEmailInFile=Atopouse unha sintaxe de correo electrónico incorrecta para %s liñas no ficheiro (exemplo liña %s con correo electrónico=%s) ErrorUserCannotBeDelete=Non pode eliminarse o usuario. É posible que esté asociado a entidades do Dolibarr ErrorFieldsRequired=Non se completaron algúns campos obrigatorios ErrorSubjectIsRequired=O asunto do correo electrónico é obligatorio @@ -59,6 +59,7 @@ ErrorDirNotFound=Non se atopou o directorio <b>%s</b> (camiño incorrecto, permi ErrorFunctionNotAvailableInPHP=A función <b>%s</b> é precisa para esta característica pero non está dispoñible nesta versión/configuración de PHP. ErrorDirAlreadyExists=Xa existe un directorio con este nome. ErrorFileAlreadyExists=Xa existe un ficheiro con este nome. +ErrorDestinationAlreadyExists=Outro ficheiro co mesmo nome <b>%s</b> xa existe ErrorPartialFile=Ficheiro non recibido completamente polo servidor. ErrorNoTmpDir=Non existe o directorio temporal %s. ErrorUploadBlockedByAddon=Subida bloqueada por un plugin PHP/Apache. @@ -87,15 +88,15 @@ ErrorModuleRequireJavascript=Non se debe desactivar Javascript para que esta fun ErrorPasswordsMustMatch=Os dous contrasinais escritos deben coincidir entre si ErrorContactEMail=Produciuse un erro técnico. Póñase en contacto co administrador no seguinte correo electrónico <b>%s</b> e proporcione o código de erro <b>%s</b> na súa mensaxe ou engada unha copia desta páxina. ErrorWrongValueForField=O campo <b>%s</b>:'<b>%s</b>' non coincide coa regra <b>%s</b> -ErrorFieldValueNotIn=Campo <b>%s</b>:'<b>%s</b>' non é un valor atopado no campo <b>%s</b> de <b>%s</ b > +ErrorFieldValueNotIn=Campo <b>%s</b>:'<b>%s</b>' non é un valor atopado no campo <b>%s</b> de <b>%s</b> ErrorFieldRefNotIn=Campo <b>%s</b>:'<b>%s</b>' non é unha referencia <b>%s</b> existente ErrorsOnXLines=Atopáronse %s erros ErrorFileIsInfectedWithAVirus=O programa antivirus non puido validar o ficheiro (o ficheiro pode estar infectado por un virus) ErrorSpecialCharNotAllowedForField=Non se permiten caracteres especiais para o campo %s ErrorNumRefModel=Existe unha referencia na base de datos (%s) e non é compatible con esta regra de numeración. Elimine o rexistro ou renomee a referencia para activar este módulo. -ErrorQtyTooLowForThisSupplier=Cantidad insuficiente para este proveedor o no hay precio definido en este producto para este proveedor -ErrorOrdersNotCreatedQtyTooLow=Algunos pedidos no se han creado debido a una cantidad demasiado baja -ErrorModuleSetupNotComplete=La configuración del módulo parece incompleta. Vaya a Inicio - Configuración - Módulos para completarla. +ErrorQtyTooLowForThisSupplier=Cantidade insuficiente para este proveedor ou non hai prezo definido neste produto para este provedor +ErrorOrdersNotCreatedQtyTooLow=Algúns pedidos non foron creados debido a unha cantidade demasiado baixa +ErrorModuleSetupNotComplete=Aconfiguración do módulo %s parece incompleta. Vaia a Inicio - Configuración - Módulos para completala. ErrorBadMask=Erro na máscara ErrorBadMaskFailedToLocatePosOfSequence=Erro, máscara sen número de secuencia ErrorBadMaskBadRazMonth=Erro, valor de restablecemento incorrecto @@ -128,7 +129,7 @@ ErrorLinesCantBeNegativeOnDeposits=As liñas non poden ser negativas nun depósi ErrorQtyForCustomerInvoiceCantBeNegative=A cantidade da liña para as facturas do cliente non pode ser negativa ErrorWebServerUserHasNotPermission=A conta de usuario <b>%s </b>usada para executar o servidor web non ten permiso para iso ErrorNoActivatedBarcode=Non hai ningún tipo de código de barras activado -ErrUnzipFails=Fallou ao descomprimir% s con ZipArchive +ErrUnzipFails=Fallou ao descomprimir %s con ZipArchive ErrNoZipEngine=Non hai motor neste PHP para comprimir/descomprimir o ficheiro %s ErrorFileMustBeADolibarrPackage=O ficheiro %s debe ser un paquete zip Dolibarr ErrorModuleFileRequired=Debe seleccionar un ficheiro de paquete do módulo Dolibarr @@ -197,17 +198,17 @@ ErrorStockIsNotEnoughToAddProductOnShipment=Non hai suficiente stock de produto ErrorStockIsNotEnoughToAddProductOnProposal=Non hai suficiente stock de produto %s para engadilo a unha nova cotización. ErrorFailedToLoadLoginFileForMode=Erro ao obter a clave de acceso para o modo '%s'. ErrorModuleNotFound=Non se atopou o ficheiro do módulo. -ErrorFieldAccountNotDefinedForBankLine=Valor da conta maior non indicado para a liña de orixe% s (% s) -ErrorFieldAccountNotDefinedForInvoiceLine=O valor da conta do libro maior non indicado para o identificador de factura% s (% s) -ErrorFieldAccountNotDefinedForLine=Valor para a conta do libro maior non indicado para a liña (% s) -ErrorBankStatementNameMustFollowRegex=Erro, o nome do estado da conta bancaria debe seguir a seguinte regra de sintaxe% s +ErrorFieldAccountNotDefinedForBankLine=Valor da conta maior non indicado para a liña de orixe %s (%s) +ErrorFieldAccountNotDefinedForInvoiceLine=O valor da conta do libro maior non indicado para o identificador de factura %s (%s) +ErrorFieldAccountNotDefinedForLine=Valor para a conta do libro maior non indicado para a liña (%s) +ErrorBankStatementNameMustFollowRegex=Erro, o nome do estado da conta bancaria debe seguir a seguinte regra de sintaxe %s ErrorPhpMailDelivery=Comprobe que non usa un número elevado de destinatarios e que o seu contido de correo electrónico non é similar ao spam. Pídelle tamén ao seu administrador que comprobe os ficheiros do firewall e os rexistros do servidor para obter información máis completa. ErrorUserNotAssignedToTask=O usuario debe ser asignado á tarefa para poder ingresar o tempo consumido. ErrorTaskAlreadyAssigned=Tarefa xa asignada ao usuario ErrorModuleFileSeemsToHaveAWrongFormat=O paquete do módulo parece ter un formato incorrecto. ErrorModuleFileSeemsToHaveAWrongFormat2=Debe existir polo menos un directorio obrigatorio no zip do módulo: <strong>%s</strong> ou <strong>%s</strong> ErrorFilenameDosNotMatchDolibarrPackageRules=O nome do paquete do módulo (<strong>%s</strong>) non coincide coa sintaxe do nome agardada: <strong>%s</strong> -ErrorDuplicateTrigger=Erro, nome de triggerr duplicado %s. Xa se cargou desde% s. +ErrorDuplicateTrigger=Erro, nome de triggerr duplicado %s. Xa se cargou desde %s. ErrorNoWarehouseDefined=Erro, sen almacéns definidos. ErrorBadLinkSourceSetButBadValueForRef=A ligazón que usa non é válida. Defínese unha "fonte" para o pago, pero o valor para "ref" non é válido. ErrorTooManyErrorsProcessStopped=Demasiados erros. O proceso detívose. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Erro ao cargar o plan de contabilidade. Se non se cargaron ErrorBadSyntaxForParamKeyForContent=Sintaxe incorrecta para o parémetro keyforcontent. Debe ter un valor que comece por %s ou %s ErrorVariableKeyForContentMustBeSet=Erro, debe establecerse a constante co nome %s (con contido de texto para amosar) ou %s (con URL externo para amosar). ErrorURLMustStartWithHttp=O URL %s debe comezar con http:// ou https:// +ErrorHostMustNotStartWithHttp=O nome do host %s NON debe comezar con http:// ou https:// ErrorNewRefIsAlreadyUsed=Erro, a nova referencia xa está empregada ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Erro, non é posible eliminar o pago ligado a unha factura pechada. ErrorSearchCriteriaTooSmall=Os criterios de busca son demasiado pequenos. @@ -240,7 +242,7 @@ ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Erro, o idioma é obrigato ErrorLanguageOfTranslatedPageIsSameThanThisPage=Erro, o idioma da páxina traducida é o mesmo que este. ErrorBatchNoFoundForProductInWarehouse=Non se atopou ningún lote/serie para o produto "%s" no almacén "%s". ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Non hai cantidade suficiente para este lote/serie do produto "%s" no almacén "%s". -ErrorOnlyOneFieldForGroupByIsPossible=Só é posible un campo para "Agrupar por" (descártanse outros) +ErrorOnlyOneFieldForGroupByIsPossible=Só é posible 1 un campo para "Agrupar por" (descártanse outros) ErrorTooManyDifferentValueForSelectedGroupBy=Atopouse demasiado valor diferente (máis de <b>%s </b>) para o campo "<b>%s</b>", polo que non podemos usalo como "Agrupar por" para gráficos. Eliminouse o campo "Agrupar por". ¿Quería usalo como eixo X? ErrorReplaceStringEmpty=Erro, a cadea para substituír está baleira ErrorProductNeedBatchNumber=Erro, o produto '<b>%s</b>' precisa un número de lote/serie @@ -251,10 +253,14 @@ ErrorLoginDateValidity=Erro, este inicio de sesión está fóra do intervalo de ErrorValueLength=A lonxitude do campo "<b>%s</b>" debe ser superior a "<b>%s</b>" ErrorReservedKeyword=A palabra '<b>%s</b>' é unha palabra chave reservada ErrorNotAvailableWithThisDistribution=Non dispoñible con esta distribución -ErrorPublicInterfaceNotEnabled=Inf¡terfaz público non activada +ErrorPublicInterfaceNotEnabled=Interfaz pública non activada ErrorLanguageRequiredIfPageIsTranslationOfAnother=O idioma da nova páxina debe definirse se se define como tradución doutra páxina ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=O idioma da nova páxina non debe ser o idioma de orixe se se define como tradución doutra páxina ErrorAParameterIsRequiredForThisOperation=É obrigado un parámetro para esta operación +ErrorDateIsInFuture=Erro, a data non pode ser no futuro +ErrorAnAmountWithoutTaxIsRequired=Erro, a cantidade é obrigatoria +ErrorAPercentIsRequired=Erro, prégase cubra a porcentaxe correctamente +ErrorYouMustFirstSetupYourChartOfAccount=Primeiro debe configurar o seu plan de contas # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=O seu parámetro PHP upload_max_filesize (%s) é superior ao parámetro PHP post_max_size (%s). Esta non é unha configuración consistente. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Aviso, non se puido engadir a entrada do WarningTheHiddenOptionIsOn=Aviso, a opción oculta <b>%s</b> está activa. WarningCreateSubAccounts=Aviso, non pode crear directamente unha subconta, debe crear un terceiro ou un usuario e asignarlles un código contable para atopalos nesta listaxe WarningAvailableOnlyForHTTPSServers=Dispoñible só se usa conexión segura HTTPS. +WarningModuleXDisabledSoYouMayMissEventHere=Non foi activado o módulo %s . Pode que perda moitos eventos aquí +ErrorActionCommPropertyUserowneridNotDefined=É preciso o supervisor do usuario +ErrorActionCommBadType=O tipo de evento seleccionado (id: %n, código: %s) non existe no diccionario Tipo de Evento diff --git a/htdocs/langs/gl_ES/exports.lang b/htdocs/langs/gl_ES/exports.lang index 92d24c84a79..aeb080ad0b7 100644 --- a/htdocs/langs/gl_ES/exports.lang +++ b/htdocs/langs/gl_ES/exports.lang @@ -33,7 +33,7 @@ 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. +FormatedExportDesc1=Esta área permitelle 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 @@ -54,7 +54,7 @@ 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... +ChooseFormatOfFileToImport=Escolla o formato de ficheiro que desexa importar e prema 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 diff --git a/htdocs/langs/gl_ES/externalsite.lang b/htdocs/langs/gl_ES/externalsite.lang index 2f4b06c67ed..660ce32365c 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 da ligazón ao sitio web externo -ExternalSiteURL=URL do sitio web externo +ExternalSiteURL=URL do sitio externo do contido iframe HTML ExternalSiteModuleNotComplete=O módulo do sitio externo non foi configurado correctamente. ExampleMyMenuEntry=O meu menú de entrada diff --git a/htdocs/langs/gl_ES/main.lang b/htdocs/langs/gl_ES/main.lang index affae88508a..8e9b9d817ff 100644 --- a/htdocs/langs/gl_ES/main.lang +++ b/htdocs/langs/gl_ES/main.lang @@ -73,7 +73,7 @@ SetDate=Fixar data SelectDate=Seleccione unha data SeeAlso=Vexa tamén %s SeeHere=Vexa aquí -ClickHere=Faga clic aquí +ClickHere=Prema aquí Here=Aquí Apply=Aplicar BackgroundColorByDefault=Cor de fondo por defecto @@ -83,7 +83,7 @@ FileSaved=O ficheiro foi gardado correctamente FileUploaded=O ficheiro subiuse correctamente FileTransferComplete=Ficheiro(s) subidos(s) correctamente FilesDeleted=Ficheiros(s) eliminados correctamente -FileWasNotUploaded=Un ficheiro foi seleccionado para axuntar, pero ainda non foi subido. Faga clic en "Axuntar este ficheiro" para subilo. +FileWasNotUploaded=Un ficheiro foi seleccionado para axuntar, pero ainda non foi subido. Prema en "Axuntar este ficheiro" para subilo. NbOfEntries=Nº de entradas GoToWikiHelpPage=Ler a axuda en liña (é preciso acceso a Internet ) GoToHelpPage=Ler a axuda @@ -278,6 +278,7 @@ DateModificationShort=Data modif. IPModification=Modificación IP DateLastModification=Última data de modificación DateValidation=Data de validación +DateSigning=Data de sinatura DateClosing=Data de peche DateDue=Data de vencemento DateValue=Data do valor @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Prezo unitario (sen impostos) (moeda) UnitPriceTTC=Prezo unitario PriceU=P.U. PriceUHT=P.U. -PriceUHTCurrency=P.U. (divisa) +PriceUHTCurrency=U.P (neto) (moeda) PriceUTTC=P.U.(+IVE) Amount=Importe AmountInvoice=Importe factura @@ -389,6 +390,8 @@ AmountTotal=Importe total AmountAverage=Importe medio PriceQtyMinHT=Prezo cantidade min. PriceQtyMinHTCurrency=Prezo cantidade min. (moeda) +PercentOfOriginalObject=Porcentaxe do obxecto orixinal +AmountOrPercent=Cantidade ou porcentaxe Percentage=Porcentaxe Total=Total SubTotal=Subtotal @@ -534,7 +537,7 @@ General=Xeral Size=Tamaño OriginalSize=Tamaño orixinal Received=Recibido -Paid=Pagamento +Paid=Xa pago Topic=Asunto ByCompanies=Por terceiros ByUsers=Por usuario @@ -698,7 +701,7 @@ RecordsGenerated=%s rexistro(s) xerado(s) AutomaticCode=Creación automática de código FeatureDisabled=Función desactivada MoveBox=Mover panel -Offered=Sen cargo +Offered=S/Custo NotEnoughPermissions=Non ten permisos para esta acción SessionName=Nome sesión Method=Método @@ -724,7 +727,7 @@ MenuMembers=Membros MenuAgendaGoogle=Axenda Google MenuTaxesAndSpecialExpenses=Taxas | Gastos especiais ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú Inicio-configuración-seguridade): %s Kb, PHP limit: %s Kb -NoFileFound=Non hai documentos gardados neste directorio +NoFileFound=Non se cargaron documentos CurrentUserLanguage=Idioma actual CurrentTheme=Tema actual CurrentMenuManager=Xestor menú actual @@ -840,7 +843,7 @@ XMoreLines=%s líña(s) ocultas ShowMoreLines=Amosar mais/menos liñas PublicUrl=URL pública AddBox=Engadir caixa -SelectElementAndClick=Seleccione un elemento e faga clic %s +SelectElementAndClick=Seleccione un elemento e prema %s PrintFile=Imprimir Ficheiro %s ShowTransaction=Amosar rexistro na conta bancaria ShowIntervention=Amosar intervención @@ -899,8 +902,10 @@ ViewAccountList=Ver Libro Maior ViewSubAccountList=Ver subconta Libro Maior RemoveString=Eliminar cadea '%s' SomeTranslationAreUncomplete=Algúns dos idiomas ofrecidos poden estar parcialmente traducidos ou poden conter erros. Axuda a corrixir teu idioma rexistrándose en <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">http://transifex.com/projects/p/dolibarr/</a>. -DirectDownloadLink=Ligazón de descarga directa (público/externo) -DirectDownloadInternalLink=Ligazón de descarga directa (precisa estar rexistrado e precisa permisos) +DirectDownloadLink=Ligazón pública de descarga +PublicDownloadLinkDesc=Só é precisa a ligazón para descargar o ficheiro +DirectDownloadInternalLink=Ligazón privada de descarga +PrivateDownloadLinkDesc=Precisa estar logueado e ter permisos para ver ou descargar o ficheiro Download=Descargar DownloadDocument=Descargar o documento ActualizeCurrency=Actualizar o tipo de cambio @@ -908,7 +913,7 @@ Fiscalyear=Ano fiscal ModuleBuilder=Módulo e aplicación Builder SetMultiCurrencyCode=Establecer moeda BulkActions=Accións masivas -ClickToShowHelp=Faga clic para amosar a axuda sobre ferramentas +ClickToShowHelp=Prema para amosar a axuda sobre ferramentas WebSite=Sitio web WebSites=Sitios web WebSiteAccounts=Contas do sitio web @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contactos SearchIntoMembers=Membros SearchIntoUsers=Usuarios SearchIntoProductsOrServices=Produtos ou servizos +SearchIntoBatch=Lotes / Series SearchIntoProjects=Proxectos SearchIntoMO=Ordes de fabricación SearchIntoTasks=Tarefas @@ -1049,12 +1055,13 @@ KeyboardShortcut=Atallo de teclado AssignedTo=Asignada a Deletedraft=Eliminar borrador ConfirmMassDraftDeletion=Confirmación de borrado en masa -FileSharedViaALink=Ficheiro compartido ao través dunha ligazón +FileSharedViaALink=Ficheiro compartido cunha ligazón pública SelectAThirdPartyFirst=Selecciona un terceiro antes... YouAreCurrentlyInSandboxMode=Estás actualmente no modo %s "sandbox" Inventory=Inventario AnalyticCode=Código analítico TMenuMRP=MRP +ShowCompanyInfos=Amosar información sobre a empresa ShowMoreInfos=Amosar mais información NoFilesUploadedYet=Pregase cargue un documento primeiro SeePrivateNote=Ver nota privada @@ -1070,16 +1077,16 @@ NoArticlesFoundForTheKeyword=Artigo non atopado para a busca de '<strong>%s</str NoArticlesFoundForTheCategory=Artigo non atopado na categoría ToAcceptRefuse=A aceptar | rexeitar ContactDefault_agenda=Evento -ContactDefault_commande=Orde +ContactDefault_commande=Pedimento ContactDefault_contrat=Contrato ContactDefault_facture=Factura ContactDefault_fichinter=Intervención -ContactDefault_invoice_supplier=Factura provedor -ContactDefault_order_supplier=Orde de compra +ContactDefault_invoice_supplier=Factura de provedor +ContactDefault_order_supplier=Pedimento a provedor ContactDefault_project=Proxecto ContactDefault_project_task=Tarefa -ContactDefault_propal=Proposta -ContactDefault_supplier_proposal=Proposta de provedor +ContactDefault_propal=Orzamento +ContactDefault_supplier_proposal=Orzamento de provedor ContactDefault_ticket=Ticket ContactAddedAutomatically=Engadido contacto dende os contactos de terceiros More=Mais @@ -1120,3 +1127,5 @@ AffectTag=Poñer etiqueta ConfirmAffectTag=Poñer etiqueta masiva ConfirmAffectTagQuestion=Está certo de que quere poñer ás etiquetas dos rexistros seleccionados %s? CategTypeNotFound=Non se atopou ningún tipo de etiqueta para o tipo de rexistros +CopiedToClipboard=Copiado a portapapeis +InformationOnLinkToContract=Este importe é só o total de todas as liñas do contrato. Non se ten en conta ningunha noción de tempo. diff --git a/htdocs/langs/gl_ES/margins.lang b/htdocs/langs/gl_ES/margins.lang index 0e2749a1157..dab074772fb 100644 --- a/htdocs/langs/gl_ES/margins.lang +++ b/htdocs/langs/gl_ES/margins.lang @@ -22,7 +22,7 @@ ProductService=Produto ou servizo 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. +ForceBuyingPriceIfNullDetails=Se o prezo de compra/custo non se proporciona cando engadimos unha nova liña e esta opción está "ACTIVADA", a marxe será 0 na nova liña (prezo de compra/custo = prezo de venda). Se esta opción está "DESACTIVADA" (recomendada), a marxe será igual ao valor suxerido por defecto (e pode ser do 100% se non se atopa ningún valor predeterminado).  MARGIN_METHODE_FOR_DISCOUNT=Método de xestión de descontos globais UseDiscountAsProduct=Como un produto UseDiscountAsService=Como un servizo diff --git a/htdocs/langs/gl_ES/members.lang b/htdocs/langs/gl_ES/members.lang index aefe3b7e52d..a3cda215b7f 100644 --- a/htdocs/langs/gl_ES/members.lang +++ b/htdocs/langs/gl_ES/members.lang @@ -19,12 +19,14 @@ MembersCards=Carnés de membros MembersList=Listaxe de membros MembersListToValid=Listaxe de membros borrador (a validar) MembersListValid=Listaxe de membros validados -MembersListUpToDate=Lista de membros válidos con subscrición actualizada -MembersListNotUpToDate=Lista de membros válidos con data vencida na subscrición +MembersListUpToDate=Listaxe de membros válidos con subscrición actualizada +MembersListNotUpToDate=Listaxe de membros válidos con data vencida na subscrición +MembersListExcluded=Listaxe de membros excluídos MembersListResiliated=Listaxe dos membros dados de baixa MembersListQualified=Listaxe dos membros cualificados MenuMembersToValidate=Membros borrador MenuMembersValidated=Membros validados +MenuMembersExcluded=Menbros excluídos MenuMembersResiliated=Membros de baixa MembersWithSubscriptionToReceive=Membros agardando recibir afiliación MembersWithSubscriptionToReceiveShort=Agardando afiliación @@ -47,9 +49,12 @@ MemberStatusActiveLate=Afiliación expirada MemberStatusActiveLateShort=Expirado MemberStatusPaid=Afiliacións ao día MemberStatusPaidShort=Ao día +MemberStatusExcluded=Membro excluído +MemberStatusExcludedShort=Excluído MemberStatusResiliated=Membro de baixa MemberStatusResiliatedShort=De baixa MembersStatusToValid=Membros en borrador +MembersStatusExcluded=Menbros excluídos MembersStatusResiliated=Membros de baixa MemberStatusNoSubscription=Validado (non precisa afiliación) MemberStatusNoSubscriptionShort=Validado @@ -82,6 +87,8 @@ Physical=Físico Moral=Xurídico MorAndPhy=Xurídico e Físico Reenable=Reactivar +ExcludeMember=Excluír un membro +ConfirmExcludeMember=Está certo de querer excluír a este membro? ResiliateMember=Dar de baixa a un membro ConfirmResiliateMember=¿Está certo de querer dar de baixa a este membro? DeleteMember=Eliminar un membro @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modelo de correo electrónico para DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Modelo de correo electrónico para usar para enviar correo electrónico a membros na nova gravación de subscrición DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modelo de correo electrónico para usar para enviar recordatorios cando a subscrición está a piques de caducar DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Modelo de correo electrónico a usar para enviar a membros ao cancelar a subscrición +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Modelo de correo electrónico a usar para o envío de correo electrónico a un membro excluído DescADHERENT_MAIL_FROM=Correo electrónico do remitente para correos electrónicos automáticos DescADHERENT_ETIQUETTE_TYPE=Formato de páxinas de etiquetas DescADHERENT_ETIQUETTE_TEXT=Texto impreso nas follas de enderezos dos membros @@ -162,6 +170,7 @@ DocForLabels=Xeración de etiquetas de enderezos SubscriptionPayment=Pagamento cota LastSubscriptionDate=Data da última cotización LastSubscriptionAmount=Importe da última cotización +LastMemberType=Último tipo de Membro MembersStatisticsByCountries=Estatísticas de membros por país MembersStatisticsByState=Estatísticas de membros por provincia/pais MembersStatisticsByTown=Estatísticas de membros por poboación diff --git a/htdocs/langs/gl_ES/modulebuilder.lang b/htdocs/langs/gl_ES/modulebuilder.lang index c5e4535245b..ffc915782df 100644 --- a/htdocs/langs/gl_ES/modulebuilder.lang +++ b/htdocs/langs/gl_ES/modulebuilder.lang @@ -58,7 +58,7 @@ DatabaseIndex=Índice da base de datos FileAlreadyExists=O ficheiro %s xa existe TriggersFile=Ficheiro para o código de trigger HooksFile=Ficheiro para o código de hooks -ArrayOfKeyValues=​​= Matriz de chave-valor +ArrayOfKeyValues=​​Matriz de chave-valor ArrayOfKeyValuesDesc=Matriz de chaves e valores se o campo é unha lista combinada con valores fixos WidgetFile=Ficheiro widget CSSFile=Ficheiro CSS @@ -85,7 +85,7 @@ ListOfPermissionsDefined=Listaxe de permisos definidos SeeExamples=Ver exemplos aquí EnabledDesc=Condición para ter activo este campo (Exemplos: 1 ou $ conf-> global-> MYMODULE_MYOPTION) VisibleDesc=¿É visible o campo? (Exemplos: 0= Nunca visible, 1= Visible na lista e crear/actualizar/ver formularios, 2= Visible só na lista, 3= Visible só na forma de crear/actualizar/ver (non lista), 4= Visible na lista e actualizar/ver formulario só (non crear), 5= Visible só no formulario de visualización final da lista (non crear, non actualizar). <br> <br> Usar un valor negativo significa que o campo non se amosa por defecto na lista, pero pódese seleccionar para ver). <br> <br> Pode ser unha expresión, por exemplo: <br> preg_match ('/ public /', $ _SERVER ['PHP_SELF'])?0:1 <br> ($ usuario-> dereitos->vacacións->definir_ vacacións?1:0) -DisplayOnPdfDesc=Amosar este campo en documentos PDF compatibles, pode xestionar a posición co campo "Posición". <br/> Actualmente, os modelos de PDF compatibles coñecidos son: eratosthene (pedimento), espadon (envío), sponge (facturas), cian ( orzamento), cornas (pedimento de provedor) <br/> <br/> <strong> Para documento: </strong> <br/> 0= non amosado <br/> 1= visualización <br/> 2= visualización só se non está baleiro <br/> <br/> <strong> Para liñas de documento: </strong> <br/> 0= non amosado <br/> 1= amosado nunha columna <br/> 3= amosado en liña columna de descrición despois da descrición <br/> 4= amosar na columna de descrición despois da descrición só se non está baleira +DisplayOnPdfDesc=Amosar este campo en documentos PDF compatibles, pode xestionar a posición co campo "Posición". <br/> Actualmente, os modelos de PDF compatibles coñecidos son: eratosthene (pedimento), espadon (envío), sponge (facturas), cian ( orzamento), cornas (pedimento a provedor) <br/> <br/> <strong> Para documento: </strong> <br/> 0= non amosado <br/> 1= visualización <br/> 2= visualización só se non está baleiro <br/> <br/> <strong> Para liñas de documento: </strong> <br/> 0= non amosado <br/> 1= amosado nunha columna <br/> 3= amosado en liña columna de descrición despois da descrición <br/> 4= amosar na columna de descrición despois da descrición só se non está baleira DisplayOnPdf=Amosar en PDF IsAMeasureDesc=¿Pódese acumular o valor do campo para obter un total na lista? (Exemplos: 1 ou 0) SearchAllDesc=¿O campo utilízase para facer unha procura desde a ferramenta de busca rápida? (Exemplos: 1 ou 0) @@ -133,7 +133,9 @@ IncludeDocGeneration=Quero xerar algúns documentos a partir do obxecto IncludeDocGenerationHelp=Se marca isto, xerarase algún código para engadir unha caixa "Xerar documento" no rexistro. ShowOnCombobox=Mostrar o valor en combobox KeyForTooltip=Chave para a información sobre ferramentas -CSSClass=Clase CSS +CSSClass=CSS para editar/crear formulario +CSSViewClass=CSS para formulario de lectura +CSSListClass=CSS para a listaxe NotEditable=Non editable ForeignKey=Chave estranxeira TypeOfFieldsHelp=Tipo de campos: <br> varchar (99), double (24,8), real, text, html, datetime, timestamp, integer, integer: ClassName:relativepath/to/classfile.class.php[:1[:filter]] ("1" significa que engadimos un botón + despois do combo para crear o rexistro, "filter" pode ser "status=1 AND fk_user=__USER_ID AND entity IN (__SHARED_ENTITIES__)" por exemplo) diff --git a/htdocs/langs/gl_ES/orders.lang b/htdocs/langs/gl_ES/orders.lang index c7a3ac01b3d..10bc3214df4 100644 --- a/htdocs/langs/gl_ES/orders.lang +++ b/htdocs/langs/gl_ES/orders.lang @@ -16,6 +16,8 @@ ToOrder=Realizar pedimento MakeOrder=Realizar pedimento SupplierOrder=Pedimento a provedor SuppliersOrders=Pedimentos a provedores +SaleOrderLines=Liñas de pedimentos de venda +PurchaseOrderLines=Liñas de pedimentos de compras SuppliersOrdersRunning=Pedimentos a provedores actuais CustomerOrder=Pedimento cliente CustomersOrders=Pedimentos de clientes @@ -80,7 +82,7 @@ NoOrder=Sen pedimentos NoSupplierOrder=Sen orde de compra LastOrders=Últimos %s pedimentos de clientes LastCustomerOrders=Últimos %s pedimentos de clientes -LastSupplierOrders=Últimas %s pedimentos de provedor +LastSupplierOrders=Últimos %s pedimentos a provedor LastModifiedOrders=Últimos %s pedimentos de clientes modificados AllOrders=Todos os pedimentos NbOfOrders=Número de pedimentos @@ -98,8 +100,8 @@ ConfirmCancelOrder=¿Está certo de querer anular este pedimento? ConfirmMakeOrder=¿Está certo de querer confirmar este pedimento en fecha de <b>%s</b> ? GenerateBill=Facturar ClassifyShipped=Clasificar enviado -DraftOrders=Pedimentos borrador -DraftSuppliersOrders=Ordes de pedimentos borrador +DraftOrders=Pedimentos de cliente borrador +DraftSuppliersOrders=Pedimentos a provedor borrador OnProcessOrders=Pedimentos en proceso RefOrder=Ref. pedimento RefCustomerOrder=Ref. pedimento para o cliente @@ -107,7 +109,7 @@ RefOrderSupplier=Ref. pedimento para o provedor RefOrderSupplierShort=Ref. ped. prov. SendOrderByMail=Enviar pedimento por e-mail ActionsOnOrder=Eventos sobre o pedimento -NoArticleOfTypeProduct=Non hai artigos de tipo 'producto' y por lo tanto enviables en este pedimento +NoArticleOfTypeProduct=Non hai artigos de tipo 'produto' polo que non hai artigo que se poida enviar neste pedimento OrderMode=Método de pedimento AuthorRequest=Autor/Solicitante UserWithApproveOrderGrant=Usuarios habilitados para aprobar os pedimentos @@ -116,9 +118,9 @@ ConfirmCloneOrder=¿Está certo de querer clonar este pedimento <b>%s</b>? DispatchSupplierOrder=Recepción do pedimento a provedor %s FirstApprovalAlreadyDone=Primeira aprobación realizada SecondApprovalAlreadyDone=Segunda aprobación realizada -SupplierOrderReceivedInDolibarr=Pedimento de provedor %s recibido %s -SupplierOrderSubmitedInDolibarr=Pedimento de provedor %s solicitado -SupplierOrderClassifiedBilled=Pedimento de provedor %s facturado +SupplierOrderReceivedInDolibarr=Pedimento a provedor %s recibido %s +SupplierOrderSubmitedInDolibarr=Pedimento a provedor %s solicitado +SupplierOrderClassifiedBilled=Pedimento a provedor %s facturado OtherOrders=Outros pedimentos ##### Types de contacts ##### TypeContact_commande_internal_SALESREPFOLL=Responsable seguemento do pedimento cliente @@ -146,7 +148,7 @@ PDFEratostheneDescription=Modelo de pedimento completo (logo...) PDFEdisonDescription=Modelo de pedimento simple PDFProformaDescription=Unha factura proforma completa (logo...) CreateInvoiceForThisCustomer=Facturar pedimentos de cliente -CreateInvoiceForThisSupplier=Facturar pedimentos de provedor +CreateInvoiceForThisSupplier=Facturar pedimentos a provedor NoOrdersToInvoice=Sen pedimentos facturables CloseProcessedOrdersAutomatically=Clasificar automáticamente como "Procesados" os pedimentos seleccionados. OrderCreation=Creación pedimento diff --git a/htdocs/langs/gl_ES/other.lang b/htdocs/langs/gl_ES/other.lang index 5a52b287896..295fc5bd4ba 100644 --- a/htdocs/langs/gl_ES/other.lang +++ b/htdocs/langs/gl_ES/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Empresa con actividades múltiples (todos os módulos principais) CreatedBy=Creado por %s ModifiedBy=Modificado por %s ValidatedBy=Validado por %s +SignedBy=Asinado por %s ClosedBy=Pechado por %s CreatedById=Id usuario que foi creado ModifiedById=Id de usuario no que foi realizado último cambio @@ -175,7 +176,7 @@ SizeUnitinch=pulgada SizeUnitfoot=pe SizeUnitpoint=punto BugTracker=Incidencias -SendNewPasswordDesc=Este formulario permítelle solicitar un novo contrasinal. Enviarase ao seu enderezo de correo electrónico. <br> O cambio será efectivo unha vez faga clic na ligazón de confirmación do correo electrónico. <br> Comprobe a súa caixa de entrada. +SendNewPasswordDesc=Este formulario permítelle solicitar un novo contrasinal. Enviarase ao seu enderezo de correo electrónico. <br> O cambio será efectivo unha vez prema na ligazón de confirmación do correo electrónico. <br> Comprobe a súa caixa de entrada. BackToLoginPage=Voltar á páxina de inicio de sesión AuthenticationDoesNotAllowSendNewPassword=O modo de autenticación é <b>% s </b>. <br> Neste modo, Dolibarr non pode saber nin cambiar o seu contrasinal. <br> Póñase en contacto co administrador do sistema se quere cambiar o seu contrasinal. EnableGDLibraryDesc=Instalar ou habilitar a biblioteca GD na súa instalación de PHP para usar esta opción. @@ -195,7 +196,7 @@ NumberOfUnitsProposals=Número de unidades nos orzamentos a clientes NumberOfUnitsCustomerOrders=Número de unidades nos pedimentos de clientes NumberOfUnitsCustomerInvoices=Número de unidades nas facturas a clientes NumberOfUnitsSupplierProposals=Número de unidades nos orzamentos de provedores -NumberOfUnitsSupplierOrders=Número de unidades nos pedimentos de provedores +NumberOfUnitsSupplierOrders=Número de unidades nos pedimentos a provedores NumberOfUnitsSupplierInvoices=Número de unidades nas facturas de provedores NumberOfUnitsContracts=Número de unidades en contratos NumberOfUnitsMos=Número de unidades a producir nos pedimentos de fabricación @@ -228,7 +229,7 @@ CurrentInformationOnImage=Esta herramienta le permite cambiar el tamaño o cuadr ImageEditor=Editor de imaxe YouReceiveMailBecauseOfNotification=Vostede está a recibir esta mensaxe porque o seu correo electrónico está subscrito a algunhas notificacións automáticas para informalo acerca de eventos especiais do programa %s de %s. YouReceiveMailBecauseOfNotification2=O evento en cuestión é o seguinte: -ThisIsListOfModules=Amosámoslle un listado de módulos preseleccionados para este perfil de demostración (nesta demo só os mais comúns son accesibles). Axuste as súas preferencias e faga clic en "Iniciar". +ThisIsListOfModules=Amosámoslle un listado de módulos preseleccionados para este perfil de demostración (nesta demo só os mais comúns son accesibles). Axuste as súas preferencias e prema en "Iniciar". UseAdvancedPerms=Usar os dereitos avanzados nos permisos dalgúns módulos FileFormat=Formato de ficheiro SelectAColor=Escolla unha cor @@ -242,8 +243,9 @@ ResetPassword=Renovar contrasinal RequestToResetPasswordReceived=Foi recibida unha solicitude para cambiar o seu contrasinal de Dolibarr NewKeyIs=Este é o seu novo contrasinal para iniciar sesión NewKeyWillBe=O seu novo contradinal para iniciar sesión no software será -ClickHereToGoTo=Faga click aquí para ir a %s +ClickHereToGoTo=Prema aquí para ir a %s YouMustClickToChange=Porén, debe facer click primeiro na seguinte ligazón para validar este cambio de contrasinal +ConfirmPasswordChange=Confirmar o cambio de contrasinal ForgetIfNothing=Se vostede non ten solicitado este cambio, simplemente ignore este correo electrónico. A súas credenciais son gardadas de forma segura. IfAmountHigherThan=Se o importe é maior que <strong>%s</strong> SourcesRepository=Repositorio das fontes diff --git a/htdocs/langs/gl_ES/productbatch.lang b/htdocs/langs/gl_ES/productbatch.lang index 79377f94908..73b91172fde 100644 --- a/htdocs/langs/gl_ES/productbatch.lang +++ b/htdocs/langs/gl_ES/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Usar numeración por lote/serie -ProductStatusOnBatch=Sí (é preciso lote/serie) +ProductStatusOnBatch=Sí (lote obrigatorio) +ProductStatusOnSerial=Sí (é preciso un número de serie único) ProductStatusNotOnBatch=Non (non é preciso lote/serie) -ProductStatusOnBatchShort=Sí +ProductStatusOnBatchShort=Lote +ProductStatusOnSerialShort=Serie ProductStatusNotOnBatchShort=Non Batch=Lote/Serie atleast1batchfield=Data de caducidade ou data de venda ou número de Lote/Serie @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=O número de serie %s xa é usado para o produto %s +TooManyQtyForSerialNumber=Só pode ter un produto %s para o número de serie %s +BatchLotNumberingModules=Opcións para a xeración automática de lotes de produtos xestionados por lotes +BatchSerialNumberingModules=Opcións para a xeración automática de lotes de produtos xestionados por números de serie +CustomMasks=Engada unha opción para definir a máscara na tarxeta do produto +LotProductTooltip=Engada unha opción na tarxeta do produto para definir unha máscara de número de lote dedicada +SNProductTooltip=Engada unha opción na tarxeta do produto para definir unha máscara de número de serie dedicada +QtyToAddAfterBarcodeScan=Cant. a engadir por cada código de barras/lote/serie escaneado + diff --git a/htdocs/langs/gl_ES/products.lang b/htdocs/langs/gl_ES/products.lang index ba1300b6c83..daae06a5d63 100644 --- a/htdocs/langs/gl_ES/products.lang +++ b/htdocs/langs/gl_ES/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Tasa IVE (para este produto/provedor) DiscountQtyMin=Desconto para esta cantidade NoPriceDefinedForThisSupplier=Ningún prezo/cant. definido para este provedor/produto NoSupplierPriceDefinedForThisProduct=Ningún prezo/cant. a provedor definida para este produto +PredefinedItem=Elemento predefinido PredefinedProductsToSell=Produtos predefinidos PredefinedServicesToSell=Servizos predefinidos PredefinedProductsAndServicesToSell=Produtos/servizos predefinidos á venda @@ -168,7 +169,7 @@ BuyingPrices=Prezos de compra CustomerPrices=Prezos a clientes SuppliersPrices=Prezos a provedores SuppliersPricesOfProductsOrServices=Prezos de provedores (de produtos ou servizos) -CustomCode=Aduanda / Mercadoría / Código HS +CustomCode=Aduana/Mercadoría/Código HS CountryOrigin=País de orixe RegionStateOrigin=Rexión de orixe StateOrigin=Estado|Provincia de orixe @@ -313,7 +314,7 @@ LastUpdated=Última actualización CorrectlyUpdated=Actualizado correctamente PropalMergePdfProductActualFile=Ficheiros usados para engadir no PDF Azur son PropalMergePdfProductChooseFile=Seleccione os ficheiros PDF -IncludingProductWithTag=Produtos/servizos incluidos coa etiqueta +IncludingProductWithTag=Inclúe produtos/servizos con etiqueta DefaultPriceRealPriceMayDependOnCustomer=Prezo por defecto, ou prezo real pode depender do cliente WarningSelectOneDocument=Seleccione alo menos un documento DefaultUnitToShow=Unidade diff --git a/htdocs/langs/gl_ES/projects.lang b/htdocs/langs/gl_ES/projects.lang index 55a7a3e1624..3a9604e685c 100644 --- a/htdocs/langs/gl_ES/projects.lang +++ b/htdocs/langs/gl_ES/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumido ListOfTasks=Listaxe de tarefas GoToListOfTimeConsumed=Ir á listaxe de tempos empregados GanttView=Vista de Gantt +ListWarehouseAssociatedProject=Listaxe de almacéns asociados ao proxecto ListProposalsAssociatedProject=Listaxe de orzamentos asociados ao proxecto ListOrdersAssociatedProject=Listaxe de pedimentos de clientes asociados ao proxecto ListInvoicesAssociatedProject=Listaxe de facturas a clientes asociadas ao proxecto @@ -268,3 +269,7 @@ OneLinePerTask=Unha liña por tarefa OneLinePerPeriod=Unha liña por período RefTaskParent=Ref. Tarefa Pai ProfitIsCalculatedWith=Beneficio está calculado usando +AddPersonToTask=Engadir tamén ás tarefas +UsageOrganizeEvent=Uso: organización de eventos +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Clasificar o proxecto como pechado cando se completen todas as súas tarefas (100 %% progreso) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Nota: os proxectos existentes con todas as tarefas en progreso do 100 %% non se verán afectados: terá que pechalos manualmente. Esta opción só afecta a proxectos abertos. diff --git a/htdocs/langs/gl_ES/propal.lang b/htdocs/langs/gl_ES/propal.lang index af8b0cff643..a082b72181a 100644 --- a/htdocs/langs/gl_ES/propal.lang +++ b/htdocs/langs/gl_ES/propal.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - propal -Proposals=Orzamentos -Proposal=Orzamento +Proposals=Orzamentos a clientes +Proposal=Orzamento a cliente ProposalShort=Orzamento -ProposalsDraft=Orzamentos borrador -ProposalsOpened=Orzamentos abertos -CommercialProposal=Orzamento -PdfCommercialProposalTitle=Orzamento +ProposalsDraft=Orzamentos a cliente borrador +ProposalsOpened=Orzamentos a cliente abertos +CommercialProposal=Orzamento a cliente +PdfCommercialProposalTitle=Orzamento a cliente ProposalCard=Ficha orzamento NewProp=Novo orzamento NewPropal=Novo orzamento @@ -59,6 +59,7 @@ ConfirmClonePropal=¿Está certo de querer clonar o orzamento <b>%s</b>? ConfirmReOpenProp=¿Está certo de abrir de novo o orzamento <b>%s</b>? ProposalsAndProposalsLines=Orzamentos e liñas de orzamentos ProposalLine=Liña de orzamento +ProposalLines=Liñas do orzamento AvailabilityPeriod=Tempo de entrega SetAvailability=Definir o tempo de entrega AfterOrder=dende a sinatura diff --git a/htdocs/langs/gl_ES/salaries.lang b/htdocs/langs/gl_ES/salaries.lang index 53100c1c694..577ba84d964 100644 --- a/htdocs/langs/gl_ES/salaries.lang +++ b/htdocs/langs/gl_ES/salaries.lang @@ -2,12 +2,15 @@ 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 +CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=De xeito predeterminado, deixe baleira a opción "Crear automaticamente un pago total" ao crear un Salario Salary=Salario Salaries=Salarios -NewSalaryPayment=Novo pagamento de salario +NewSalary=Novo salario +NewSalaryPayment=Nova pagamento de salario AddSalaryPayment=Engadir pagamento de salario SalaryPayment=Pagamento de salario SalariesPayments=Pagamentos de salarios +SalariesPaymentsOf=Pago de salarios de %s ShowSalaryPayment=Ver pagamento de salario THM=Taxa media por hora TJM=Taxa media por día diff --git a/htdocs/langs/gl_ES/stocks.lang b/htdocs/langs/gl_ES/stocks.lang index 489350367f1..bde18dd1aa5 100644 --- a/htdocs/langs/gl_ES/stocks.lang +++ b/htdocs/langs/gl_ES/stocks.lang @@ -38,7 +38,7 @@ IncludeEmptyDesiredStock=Inclúe tamén stock negativo con stock desexado indefi IncludeAlsoDraftOrders=Incluir tamén pedimentos borrador Location=Localización LocationSummary=Nome curto da localización -NumberOfDifferentProducts=Número de produtos diferentes +NumberOfDifferentProducts=Número de produtos únicos NumberOfProducts=Numero total de produtos LastMovement=Último movemento LastMovements=Últimos movementos @@ -62,8 +62,9 @@ EnhancedValueOfWarehouses=Valor de stocks en almacén UserWarehouseAutoCreate=Crea automáticamente un almacén de usuarios ao crear un usuario AllowAddLimitStockByWarehouse=Xestionar tamén o valor do stock mínimo e desexado por emparellamento (produto-almacén) ademais do valor do stock mínimo e stock desexado por produto RuleForWarehouse=Regras para almacén -WarehouseAskWarehouseDuringPropal=Establecer un almacén en orzamento a cliente -WarehouseAskWarehouseDuringOrder=Establecer un almacén para pedimentos de provedor +WarehouseAskWarehouseOnThirparty=Establecer un almacén en terceiros +WarehouseAskWarehouseDuringPropal=Establecer un almacén en orzamentos a clientes +WarehouseAskWarehouseDuringOrder=Establecer un almacén para pedimentos a provedor UserDefaultWarehouse=Establecer un almacén para usuarios MainDefaultWarehouse=Almacén por defecto MainDefaultWarehouseUser=Usar un almacén por defecto para cada usuario @@ -80,8 +81,8 @@ DeStockOnValidateOrder=Diminuír o stock real na validación do pedimento de pro DeStockOnShipment=Diminuír o stock real na validación do envío DeStockOnShipmentOnClosing=Diminúe o stock real cando o envío está pechado ReStockOnBill=Aumenta o stock real na validación da factura/nota de crédito do provedor -ReStockOnValidateOrder=Aumenta o stock real na aprobación do pedimento de provedor -ReStockOnDispatchOrder=Aumentar o stock real no envío manual ao almacén, despois da recepción da mercadoría do pedimento de provedor +ReStockOnValidateOrder=Aumenta o stock real na aprobación do pedimento a provedor +ReStockOnDispatchOrder=Aumentar o stock real no envío manual ao almacén, despois da recepción da mercadoría do pedimento a provedor StockOnReception=Aumento o stock real na validación da recepción StockOnReceptionOnClosing=Aumenta o stock real cando pecha a recepción OrderStatusNotReadyToDispatch=O pedimento de cliente aínda non ten ou non ten un estado que permite o envío de produtos en almacéns. @@ -97,15 +98,16 @@ RealStockDesc=O stock físico/real é o stock actualmente existente nos almacén RealStockWillAutomaticallyWhen=O stock real modificarase segundo esta regra (como se define no módulo Stock): VirtualStock=Stock virtual VirtualStockAtDate=Stock virtual á data -VirtualStockAtDateDesc=Stock virtual unha vez finalizados todos os pedidos pendentes que se prevé facer antes da data +VirtualStockAtDateDesc=Stock virtual unha vez que finalicen todos os pedimentos pendentes que van ser procesados antes da data escollida VirtualStockDesc=O stock virtual é o stock calculado dispoñible unha vez pechadas todas as accións abertas/pendentes (que afectan ao stock) (pedimentos a provedor recibidos, pedimentos de cliente enviados, pedimentos de fabricación producidos, etc.) +AtDate=Na data IdWarehouse=Id. almacén DescWareHouse=Descrición almacén LieuWareHouse=Localización almacén WarehousesAndProducts=Almacéns e produtos WarehousesAndProductsBatchDetail=Almacéns e produtos (con detalle por lote/serie) AverageUnitPricePMPShort=Prezo medio ponderado (PMP) -AverageUnitPricePMPDesc=O prezo unitario medio de entrada que houbo que pagar aos provedores para que o produto estivese no noso stock. +AverageUnitPricePMPDesc=O prezo unitario medio de entrada que houbo que gastar para conseguir 1 unidade de produto no noso stock. SellPriceMin=Prezo de venda unitario EstimatedStockValueSellShort=Valor de venda EstimatedStockValueSell=Valor de venda @@ -138,14 +140,14 @@ IncludeProductWithUndefinedAlerts = Inclúe tamén stock negativo para produtos WarehouseForStockDecrease=Para o decremento de stock usarase o almacén <b>%s</b> WarehouseForStockIncrease=Para o incremento de stock usarase o almacén <b>%s</b> ForThisWarehouse=Para este almacén -ReplenishmentStatusDesc=Esta é unha listaxe de todos os produtos cun stock inferior ao stock desexado (ou inferior ao valor de alerta se a caixa de verificación "só alerta" está marcada). Usando a caixa de verificación, pode crear pedimentos de provedor para cubrir a diferenza. +ReplenishmentStatusDesc=Esta é unha listaxe de todos os produtos cun stock inferior ao stock desexado (ou inferior ao valor de alerta se a caixa de verificación "só alerta" está marcada). Usando a caixa de verificación, pode crear pedimentos a provedor para cubrir a diferenza. ReplenishmentStatusDescPerWarehouse=Se desexa unha reposición baseada na cantidade desexada definida por almacén, debe engadir un filtro no almacén. ReplenishmentOrdersDesc=Esta é unha listaxe de todos os pedimentos a provedor abertos, incluídos os produtos predefinidos. Aquí só son visibles os pedimentos abertos con produtos predefinidos, polo que os pedimentos poden afectar ao stock.. Replenishments=Reposicións NbOfProductBeforePeriod=Cantidade de produto %s en stock antes do período seleccionado (<%s) NbOfProductAfterPeriod=Cantidade de produto %s en stock despois do período seleccionado (>%s) MassMovement=Movementos en masa -SelectProductInAndOutWareHouse=Seleccione un almacén de orixe e un almacén de destino, un produto e unha cantidade e prema en "%s". Unha vez feito isto para todos os movementos precisos, faga clic en "%s". +SelectProductInAndOutWareHouse=Escolla un almacén de orixe e un almacén de destino, un produto e unha cantidade e prema en "%s". Unha vez feito isto para todos os movementos precisos, prema en "%s" RecordMovement=Rexistrar transferencia ReceivingForSameOrder=Recepcións deste pedimento StockMovementRecorded=Movemento de stock rexistrado @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=O nivel de stock debe ser suficiente para engadir pr StockMustBeEnoughForOrder=O nivel de stock debe ser suficiente para engadir produto/servizo ao pedimento (a comprobación faise no stock real actual ao engadir unha liña no pedimento calquera que sexa a regra para o cambio de stock automático) StockMustBeEnoughForShipment= O nivel de stock debe ser suficiente para engadir produto/servizo ao envío (a comprobación faise no stock real actual cando se engade unha liña ao envío calquera que sexa a regra para o cambio automático de stock) MovementLabel=Etiqueta do movemento -TypeMovement=Tipo de movemento +TypeMovement=Sentido do movemento DateMovement=Data de movemento InventoryCode=Movemento ou código de inventario IsInPackage=Contido no paquete @@ -169,13 +171,13 @@ NoPendingReceptionOnSupplierOrder=Non agárdanse recepcións do pedimento a prov ThisSerialAlreadyExistWithDifferentDate=Este número de lote/serie (<strong>%s</strong>) xa existe, pero cunha data de caducidade ou venda distinta (atopada <strong>%s</strong> pero vostede introduce <strong>%s</strong>). OpenAll=Aberto para todas as accións OpenInternal=Aberto só a accións internas -UseDispatchStatus=Use un estado de envío (aprobar/rexeitar) para as liñas de produtos na recepción do pedimento de provedor +UseDispatchStatus=Use un estado de envío (aprobar/rexeitar) para as liñas de produtos na recepción do pedimento a provedor OptionMULTIPRICESIsOn=A opción "varios prezos por segmento" está activada. Significa que un produto ten varios prezos de venda polo que o valor para a venda non se pode calcular ProductStockWarehouseCreated=Límite stock para alertas e stock óptimo desxeado creado correctamente ProductStockWarehouseUpdated=Límite stock para alertas e stock óptimo desexado actualizado correctamente ProductStockWarehouseDeleted=Límite stock para alertas e stock óptimo desexado eliminado correctamente AddNewProductStockWarehouse=Indicar novo límite para alertas e stock óptimo desexado -AddStockLocationLine=Disminúa a cantidade, e a continuación, faga clic para agregar outro almacén para este produto +AddStockLocationLine=Disminúa a cantidade, e a continuación, prema para agregar outro almacén para este produto InventoryDate=Data inventario NewInventory=Novo inventario inventorySetup = Configuración inventario @@ -183,6 +185,7 @@ inventoryCreatePermission=Crear novo inventario inventoryReadPermission=Ver inventarios inventoryWritePermission=Actualizar inventarios inventoryValidatePermission=Validar inventario +inventoryDeletePermission=Eliminar inventario inventoryTitle=Inventario inventoryListTitle=Inventarios inventoryListEmpty=Sen inventario en progreso @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock é solicitado para escoller que lote ForceTo=Forzar a AlwaysShowFullArbo=Mostrar a árbore completa do almacén na ventá emerxente das ligazóns do almacén (aviso: isto pode diminuír drasticamente o rendemento) StockAtDatePastDesc=Aquí pode ver o stock (stock real) nunha data determinada no pasado -StockAtDateFutureDesc=Aquí pode ver o stock (stock virtual) nunha data determinada no futuro +StockAtDateFutureDesc=Pode ver aquí o stock (stock virtual) nunha data determinada no futuro CurrentStock=Stock actual InventoryRealQtyHelp=Estableza o valor en 0 para restablecer cantidade<br> Manteña o campo baleiro ou elimine a liña para mantelo sen cambios -UpdateByScaning=Actualiza escaneando +UpdateByScaning=Enche a cantidade real escaneando UpdateByScaningProductBarcode=Actualiza por escaneo (código de barras do produto) UpdateByScaningLot=Actualiza por escano (código de barras lote/serie) DisableStockChangeOfSubProduct=Desactive o cambio de stock de todos os subprodutos deste produto composto durante este movemento. +ImportFromCSV=Importar listaxe de movementos en CSV +ChooseFileToImport=Escolla o ficheiro de importación e prema na imaxe %s para seleccionalo como ficheiro orixe de importación... +SelectAStockMovementFileToImport=Seleccionar un ficheiro a importar dos movementos de stock +InfoTemplateImport=O ficheiro cargado precisa ter este formato (* son campos obrigatorios): <br> Almacén orixe* | Almacén destino* | Produto* | Cantidade* | Número de Lote/Serie <br> CSV debe ser " <b>%s</b>" +LabelOfInventoryMovemement=Inventario %s +ReOpen=Abrir de novo +ConfirmFinish=Confirma o peche do inventario? Isto xerará todos os movementos de stock para actualizar o seu stock +ObjectNotFound=%s non foi atopado +MakeMovementsAndClose=Xera movementos e pecha +AutofillWithExpected=Encher a cantidade real coa cantidade agardada diff --git a/htdocs/langs/gl_ES/suppliers.lang b/htdocs/langs/gl_ES/suppliers.lang index 1d835ebdedb..b49ac0b2e86 100644 --- a/htdocs/langs/gl_ES/suppliers.lang +++ b/htdocs/langs/gl_ES/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Provedores SuppliersInvoice=Factura de provedor +SupplierInvoices=Facturas de provedores ShowSupplierInvoice=Ver factura de provedor NewSupplier=Novo provedor History=Histórico diff --git a/htdocs/langs/gl_ES/ticket.lang b/htdocs/langs/gl_ES/ticket.lang index d9268409b20..9d4e31f46f1 100644 --- a/htdocs/langs/gl_ES/ticket.lang +++ b/htdocs/langs/gl_ES/ticket.lang @@ -70,6 +70,8 @@ Deleted=Eliminado # Dict Type=Tipo Severity=Gravidade +TicketGroupIsPublic=O grupo é público +TicketGroupIsPublicDesc=Se un grupo de tickets é público, será visible no formulario cando se crea un ticket desde a interface pública # Email templates MailToSendTicketMessage=Enviar correo electrónico dende ticket @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Amosar o logotipo do módulo na interfaz pública TicketsShowModuleLogoHelp=Active esta opción para ocultar o logotipo nas páxinas da interfaz pública TicketsShowCompanyLogo=Amosar o logotipo da empresa na interfaz pública TicketsShowCompanyLogoHelp=Active esta opción para ocultar o logotipo da empresa principal nas páxinas da interfaz pública -TicketsEmailAlsoSendToMainAddress=Envíe tamén notificacións a enderezo de correo electrónico principal -TicketsEmailAlsoSendToMainAddressHelp=Active esta opción para enviar un correo electrónico ao enderezo "Notificación de correo electrónico desde" (ver configuración a continuación) +TicketsEmailAlsoSendToMainAddress=Envíe tamén unha notificación ao enderezo de correo electrónico principal +TicketsEmailAlsoSendToMainAddressHelp=Active esta opción para enviar tamén un correo electrónico ao enderezo definido na configuración "%s" (ver lapela "%s") TicketsLimitViewAssignedOnly=Restrinxir a visualización aos tickets asignados ao usuario actual (non é efectivo para usuarios externos, limítase sempre ao terceiro do que dependen) TicketsLimitViewAssignedOnlyHelp=Só serán visibles os tickets asignados ao usuario actual. Non se aplica a un usuario con dereitos de xestión de tickets. TicketsActivatePublicInterface=Activar a interface pública @@ -126,10 +128,10 @@ TicketNumberingModules=Módulo de numeración de entradas TicketsModelModule=Modelos de documentos para os tickets TicketNotifyTiersAtCreation=Notificar a terceiros a creación TicketsDisableCustomerEmail=Desactiva sempre os correos electrónicos cando se crea un ticket desde a interface pública -TicketsPublicNotificationNewMessage=Enviar correo electrónico cando se engada unha nova mensaxe +TicketsPublicNotificationNewMessage=Envíe correo(s) electrónico(s) cando se engada unha nova mensaxe/comentario a un ticket TicketsPublicNotificationNewMessageHelp=Enviar correo electrónico cando se engada unha nova mensaxe desde a interface pública (ao usuario asignado ou ao correo electrónico de notificacións a (actualizar) e/ou ao correo electrónico de notificacións a) TicketPublicNotificationNewMessageDefaultEmail=Correo electrónico de notificacións a (actualizar) -TicketPublicNotificationNewMessageDefaultEmailHelp=Envía por correo electrónico novas mensaxes a este enderezo se o ticket non ten asignado un usuario ou o usuario non ten un correo electrónico. +TicketPublicNotificationNewMessageDefaultEmailHelp=Envía un correo electrónico a este enderezo para cada nova mensaxe de notificación se o ticket non ten un usuario asignado ou se o usuario non ten ningún correo electrónico coñecido. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Últimos tickets modificados BoxLastModifiedTicketDescription=Últimos %s tickets modificados BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Non hai tickets modificados recentemente +BoxTicketType=Número de tickets abertos por tipo +BoxTicketSeverity=Número de tickets abertos por gravidade +BoxNoTicketSeverity=Número de tickets abertos +BoxTicketLastXDays=Número de tickets abertos por días nos últimos %s días +BoxTicketLastXDayswidget = Número de novos tickets por días nos últimos X días +BoxNoTicketLastXDays=Sen novos tickets nos últimos %s días +BoxNumberOfTicketByDay=Número de novos tickets por día +BoxNewTicketVSClose=Número de novos tickets hoxe fronte a tickets pechados hoxe +TicketCreatedToday=Ticket creado hoxe +TicketClosedToday=Ticket pechado hoxe diff --git a/htdocs/langs/gl_ES/users.lang b/htdocs/langs/gl_ES/users.lang index 18657d820b1..908619e45e0 100644 --- a/htdocs/langs/gl_ES/users.lang +++ b/htdocs/langs/gl_ES/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=Usuarios e as súas propiedades. DomainUser=Usuario de dominio Reactivate=Reactivar CreateInternalUserDesc=Este formulario permitelle engadir un usuario interno para a súa empresa/organización. Para crear un usuario externo (cliente, provedor, etc...), use o botón "Crear usuario Dolibarr" dende unha ficha dun contacto do terceiro. -InternalExternalDesc=Un usuario <b>interno</b> é un usuario que pertence a súa empresa/organización.<br>Un usuario <b>externo</b> é un usuario cliente, provedor ou outro.<br><br>Nos dous casos, os permisos de usuarios definen os dereitos de acceso, pero o usuario externo pode a maiores ter un xestor de menús diferente ao usuario interno (véxase Inicio - Configuración - Entorno) +InternalExternalDesc=Un usuario <b>interno</b> é un usuario que forma parte da súa empresa/organización ou é un usuario socio fóra da súa organización que pode precisar ver máis datos que os datos relacionados coa súa empresa (o sistema de permisos definirá o que pode ou non ver ou facer). <br>Un usuario <b>externo</b> é un cliente, provedor ou outro que debe ver SÓ datos relacionados con el mesmo (A creación dun usuario externo para un terceiro pódese facer a partir do rexistro de contacto do terceiro) .<br><br>En ambos casos , debe conceder permisos sobre as funcións que precisa o usuario. PermissionInheritedFromAGroup=O permiso concédese xa que o hereda dun grupo ao cal pertence o usuario. Inherited=Heredado UserWillBe=Será o usuario creado diff --git a/htdocs/langs/gl_ES/website.lang b/htdocs/langs/gl_ES/website.lang index 7691822ddf4..6c78521e7b5 100644 --- a/htdocs/langs/gl_ES/website.lang +++ b/htdocs/langs/gl_ES/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u> Usar con Apache/NGinx/... </u> <br> Cree no seu servidor ExampleToUseInApacheVirtualHostConfig=Exemplo para usar na configuración do host virtual Apache: YouCanAlsoTestWithPHPS=<u> Usar con servidor incorporado PHP </u> <br> No entorno de desenvolvemento, pode que prefira probar o sitio co servidor web incorporado PHP (é preciso PHP 5.5) executando <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP=<u> Execute o seu sitio web con outro provedor de hospedaxe Dolibarr </u> <br> Se non ten un servidor web como Apache ou NGinx dispoñible en internet, pode exportar e importar o seu sitio web a outro Dolibarr por outro provedor de hospedaxe Dolibarr que proporciona unha integración completa co módulo do sitio web. Pode atopar unha lista dalgúns provedores de hospedaxe Dolibarr en <a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org </a> -CheckVirtualHostPerms=Comprobe tamén que o servidor virtual ten permiso <strong>%s </strong> para ficheiros en <br> <strong>%s </strong> -ReadPerm=Lido -WritePerm=Escribe +CheckVirtualHostPerms=Comprobe tamén que o usuario do host virtual (por exemplo, www-data) ten permisos de <strong>%s</strong> nos ficheiros en <br><strong>%s</strong> +ReadPerm=Ler +WritePerm=Escribir TestDeployOnWeb=Probar/despregar na web PreviewSiteServedByWebServer=<u> Previsualizar %s nunha nova pestana. </u> <br> <br> O %s será servido por un servidor web externo (como Apache, Nginx, IIS). Debe instalar e configurar este servidor antes para apuntar ao directorio: <br> <strong>%s </strong> <br> URL ofrecido por un servidor externo: <br> <strong>%s </strong> -PreviewSiteServedByDolibarr=<u> Previsualizar %s nunha nova lapela. </u> <br> <br> O servidor Dolibarr servirá o %s polo que non precisa instalar ningún servidor web adicional (como Apache, Nginx, IIS). <br> O inconveniente é que o URL das páxinas non é fácil de usar e empeza co camiño do Dolibarr. <br> URL servido por Dolibarr: <br> <strong>%s </strong> <br> < br> Para usar o seu propio servidor web externo para servir este sitio web, cree un servidor virtual no seu servidor web que apunte no directorio <br> <strong>%s </strong> <br> e logo introduza o nome deste servidor virtual e faga clic no outro botón de vista previa. +PreviewSiteServedByDolibarr=<u>Previsualiza %s nunha nova lapela</u><br><br> O servidor Dolibarr servirá o %s polo que non precisa ningún servidor web adicional (como Apache, Nginx, IIS) para ser instalado. <br> O inconveniente é que as URL das páxinas non son fáciles de usar e comezan polo enderezo do seu Dolibarr.<br>URL ofrecido por Dolibarr: <br><strong>%s</strong><br><br> Para usar o seu propio servidor web externo para visualizar este sitio web, cree un servidor virtual no seu servidor web que apunte ao directorio <br><strong>%s</strong><br> entón introduza o nome deste servidor virtual nas propiedades deste sitio web e faga clic na ligazón "Probar/Implementar na web". VirtualHostUrlNotDefined=O URL do host virtual ofrecido por un servidor web externo non está definido NoPageYet=Aínda non hai páxinas YouCanCreatePageOrImportTemplate=Pode crear unha nova páxina ou importar un modelo de sitio web completo @@ -137,3 +137,11 @@ PagesRegenerated=%s páxina(s)/contedor(es) rexenerados RegenerateWebsiteContent=Rexenerar ficheiros de caché do sitio web AllowedInFrames=Permitido en marcos DefineListOfAltLanguagesInWebsiteProperties=Define a listaxe de todos os idiomas dispoñibles nas propiedades do sitio web. +GenerateSitemaps=Xera un ficheiro de mapa do sitio web +ConfirmGenerateSitemaps=Se confirmas, borrará o ficheiro de mapa do sitio existente ... +ConfirmSitemapsCreation=Confirma a xeración do mapa do sitio +SitemapGenerated=Mapa do sitio xerado +ImportFavicon=Favicon +ErrorFaviconType=A favicon debe estar no formato png +ErrorFaviconSize=A favicon debe ter o tamaño 32x32 +FaviconTooltip=Cargue unha imaxe en formato png de 32x32 diff --git a/htdocs/langs/gl_ES/zapier.lang b/htdocs/langs/gl_ES/zapier.lang index 64d3db80452..60d4d375420 100644 --- a/htdocs/langs/gl_ES/zapier.lang +++ b/htdocs/langs/gl_ES/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier para Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = Zapier para modulo de Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr +ModuleZapierForDolibarrDesc = Zapier para módulo de Dolibarr +ZapierForDolibarrSetup=Configuración de Zapier para Dolibarr ZapierDescription=Interfaz con Zapier +ZapierAbout=Sobre o módulo Zapier +ZapierSetupPage=Non é precisa unha configuración en Dolibarr para usar Zapier. Porén, debe xerar e publicar un paquete en zapier para poder usar Zapier con Dolibarr. Ver a documentación nesta <a href="https://wiki.dolibarr.org/index.php/Module_Zapier"> páxina wiki</a>. diff --git a/htdocs/langs/he_IL/accountancy.lang b/htdocs/langs/he_IL/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/he_IL/accountancy.lang +++ b/htdocs/langs/he_IL/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 73aaf8f75be..32374680393 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=הסרת הנעילה חיבור YourSession=הפגישה שלך Sessions=Users Sessions WebUserGroup=שרת אינטרנט המשתמש / קבוצה +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=הערה: כן, הוא יעיל רק אם <b>%s</b> מודול RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=הגדרת אבטחה +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=שגיאה, מודול זה דורש %s PHP גירסה ומעלה ErrorModuleRequireDolibarrVersion=שגיאה, מודול זה דורש %s Dolibarr גרסה ומעלה @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=לטהר עכשיו @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=הפעל על ActiveOn=הופעל על +ActivatableOn=Activatable on SourceFile=מקור הקובץ AvailableOnlyIfJavascriptAndAjaxNotDisabled=אפשרות זו זמינה רק אם JavaScript לא מבוטלת Required=דרוש @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Update server offline WithCounter=Manage a counter -GenericMaskCodes=אתה רשאי להיכנס לכל מסכת מספור. במסכת זו, התגים הבאים יכול לשמש: <br> <b>{000000}</b> המתאים למספר אשר יהיה מוגדל על %s כל אחד. הזן כמו אפסים רבים ככל האורך הרצוי של הדלפק. נגד יושלם עד אפסים משמאל כדי שיהיה כמו אפסים רבים ככל המסכה. <br> <b>{000} 000000</b> זהה לקודם, אך קוזז המתאים למספר בצד ימין של סימן + מיושם החל מיום %s הראשונים. <br> <b>{000000 @ x}</b> זהה לקודם אבל הדלפק מתאפס לאפס כאשר x חודש הוא הגיע (x בין 1 ל 12 או 0 כדי להשתמש בחודשים הראשונים של שנת הכספים מוגדרת בהגדרות שלך). אם אפשרות זו בשימוש, x הוא 2 או יותר, אז רצף {yy} {מ&quot;מ} או {yyyy} {מ&quot;מ} נדרש גם. <br> <b>Dd {}</b> היום (01 עד 31). <br> <b>{מ&quot;מ}</b> החודש (01 עד 12). <br> <b>{Yy}, {yyyy}</b> או <b>{y}</b> השנה על 2, 4 או 1 מספרים. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=כל הדמויות האחרות מסכת יישאר ללא שינוי. <br> מקומות אסורים. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>למשל על צד שלישי נוצר 2007/03/01:</u> <br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=העורכים Module49Desc=עורך ההנהלה Module50Name=מוצרים @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind המרות יכולות Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=רב החברה Module5000Desc=מאפשר לך לנהל מספר רב של חברות -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=יצירה / שינוי משתמשים פנימיים / ח Permission254=יצירה / שינוי משתמשים חיצוניים בלבד Permission255=שינוי סיסמה משתמשים אחרים Permission256=מחיקה או ביטול של משתמשים אחרים -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=לקרוא CA Permission272=לקרוא חשבוניות Permission273=להוציא חשבוניות @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=ביקורת אבטחה אירועים +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=ביקורת InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=עליך להפעיל את הפקודה משורת הפקודה לאחר ההתחברות להפגיז עם <b>%s</b> משתמש או עליך להוסיף-W אפשרות בסוף של שורת הפקודה כדי לספק את הסיסמה <b>%s.</b> YourPHPDoesNotHaveSSLSupport=פונקציות שאינן זמינות ב-SSL-PHP DownloadMoreSkins=עוד סקינים להורדה -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=תרגום חלקי @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=משלימים תכונות ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=התחברות (Unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=חיפוש מסנן LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=התחברות (סמבה, ActiveDirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=שם פרטי @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=אירועים מודול ההתקנה סדר היום PasswordTogetVCalExport=מפתח לאשר הקישור יצוא +SecurityKey = Security Key PastDelayVCalExport=לא יצא אירוע מבוגרת AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/he_IL/banks.lang b/htdocs/langs/he_IL/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/he_IL/banks.lang +++ b/htdocs/langs/he_IL/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/he_IL/bills.lang b/htdocs/langs/he_IL/bills.lang index bd6e6e6d277..7652c9c8301 100644 --- a/htdocs/langs/he_IL/bills.lang +++ b/htdocs/langs/he_IL/bills.lang @@ -52,11 +52,12 @@ Invoices=חשבוניות InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/he_IL/boxes.lang b/htdocs/langs/he_IL/boxes.lang index bc3d4ba7b02..7c4f6c06dc8 100644 --- a/htdocs/langs/he_IL/boxes.lang +++ b/htdocs/langs/he_IL/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/he_IL/categories.lang b/htdocs/langs/he_IL/categories.lang index d01b7fcecb9..a5d458690e2 100644 --- a/htdocs/langs/he_IL/categories.lang +++ b/htdocs/langs/he_IL/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/he_IL/companies.lang b/htdocs/langs/he_IL/companies.lang index d1b5cde4dac..67d1824c77c 100644 --- a/htdocs/langs/he_IL/companies.lang +++ b/htdocs/langs/he_IL/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/he_IL/compta.lang b/htdocs/langs/he_IL/compta.lang index 6635b8b2829..11fdc1b46fc 100644 --- a/htdocs/langs/he_IL/compta.lang +++ b/htdocs/langs/he_IL/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/he_IL/ecm.lang b/htdocs/langs/he_IL/ecm.lang index d0ef90500e6..f7c6c005d5b 100644 --- a/htdocs/langs/he_IL/ecm.lang +++ b/htdocs/langs/he_IL/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/he_IL/errors.lang b/htdocs/langs/he_IL/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/he_IL/errors.lang +++ b/htdocs/langs/he_IL/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/he_IL/externalsite.lang b/htdocs/langs/he_IL/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/he_IL/externalsite.lang +++ b/htdocs/langs/he_IL/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/he_IL/main.lang b/htdocs/langs/he_IL/main.lang index 05e91914906..fad1276c2e6 100644 --- a/htdocs/langs/he_IL/main.lang +++ b/htdocs/langs/he_IL/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=אנשי קשר SearchIntoMembers=משתמשים SearchIntoUsers=משתמשים SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=פרוייקטים SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/he_IL/margins.lang b/htdocs/langs/he_IL/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/he_IL/margins.lang +++ b/htdocs/langs/he_IL/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/he_IL/members.lang b/htdocs/langs/he_IL/members.lang index 5940fb7ea57..bd46c1c1a51 100644 --- a/htdocs/langs/he_IL/members.lang +++ b/htdocs/langs/he_IL/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/he_IL/modulebuilder.lang b/htdocs/langs/he_IL/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/he_IL/modulebuilder.lang +++ b/htdocs/langs/he_IL/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/he_IL/orders.lang b/htdocs/langs/he_IL/orders.lang index bf68541e4ac..271fe5e3894 100644 --- a/htdocs/langs/he_IL/orders.lang +++ b/htdocs/langs/he_IL/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/he_IL/other.lang b/htdocs/langs/he_IL/other.lang index d8012ef5cac..6928a0fc65e 100644 --- a/htdocs/langs/he_IL/other.lang +++ b/htdocs/langs/he_IL/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/he_IL/productbatch.lang b/htdocs/langs/he_IL/productbatch.lang index 88effdec06a..4f0e21fcc0e 100644 --- a/htdocs/langs/he_IL/productbatch.lang +++ b/htdocs/langs/he_IL/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=כן +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=לא Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/he_IL/products.lang b/htdocs/langs/he_IL/products.lang index d9cb3f15d68..f399b0e7852 100644 --- a/htdocs/langs/he_IL/products.lang +++ b/htdocs/langs/he_IL/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index 22aa61251a1..c0cc539e828 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/he_IL/propal.lang b/htdocs/langs/he_IL/propal.lang index 92883dd0599..b76f1a85658 100644 --- a/htdocs/langs/he_IL/propal.lang +++ b/htdocs/langs/he_IL/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/he_IL/stocks.lang b/htdocs/langs/he_IL/stocks.lang index 5d1abeffa0d..3c1991530bf 100644 --- a/htdocs/langs/he_IL/stocks.lang +++ b/htdocs/langs/he_IL/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=מניות MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/he_IL/suppliers.lang b/htdocs/langs/he_IL/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/he_IL/suppliers.lang +++ b/htdocs/langs/he_IL/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/he_IL/ticket.lang b/htdocs/langs/he_IL/ticket.lang index 39e0b9f8175..e9e3b33d874 100644 --- a/htdocs/langs/he_IL/ticket.lang +++ b/htdocs/langs/he_IL/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/he_IL/users.lang b/htdocs/langs/he_IL/users.lang index afbb1e993be..a313f6fb6c9 100644 --- a/htdocs/langs/he_IL/users.lang +++ b/htdocs/langs/he_IL/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/he_IL/website.lang b/htdocs/langs/he_IL/website.lang index e476cd982a3..934d7bdb850 100644 --- a/htdocs/langs/he_IL/website.lang +++ b/htdocs/langs/he_IL/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/he_IL/zapier.lang b/htdocs/langs/he_IL/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/he_IL/zapier.lang +++ b/htdocs/langs/he_IL/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/hi_IN/accountancy.lang b/htdocs/langs/hi_IN/accountancy.lang index 46d584fa5d7..fd8d8a31ba6 100644 --- a/htdocs/langs/hi_IN/accountancy.lang +++ b/htdocs/langs/hi_IN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/hi_IN/admin.lang b/htdocs/langs/hi_IN/admin.lang index 5adf390f9fa..51e5e387403 100644 --- a/htdocs/langs/hi_IN/admin.lang +++ b/htdocs/langs/hi_IN/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=कनेक्शन लॉक हटाए YourSession=आपका सत्र Sessions=उपयोगकर्ताओं का सत्र WebUserGroup=वेब सर्वर उपयोगकर्ता / समूह +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=आपका PHP कॉन्फ़िगरेशन सक्रिय सत्रों की सूची की अनुमति नहीं देता है। सत्र संरक्षण के लिए उपयोग की गई डायरेक्टरी ( <b>%s</b>) शायद संरक्षित की गई है (उदाहरण के लिए OS अनुमतियाँ या PHP निर्देशक द्वारा open_basedir)। @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/hi_IN/banks.lang b/htdocs/langs/hi_IN/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/hi_IN/banks.lang +++ b/htdocs/langs/hi_IN/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/hi_IN/bills.lang b/htdocs/langs/hi_IN/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/hi_IN/bills.lang +++ b/htdocs/langs/hi_IN/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/hi_IN/boxes.lang b/htdocs/langs/hi_IN/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/hi_IN/boxes.lang +++ b/htdocs/langs/hi_IN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/hi_IN/categories.lang b/htdocs/langs/hi_IN/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/hi_IN/categories.lang +++ b/htdocs/langs/hi_IN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/hi_IN/companies.lang b/htdocs/langs/hi_IN/companies.lang index 1481398db45..eb559cc5f9e 100644 --- a/htdocs/langs/hi_IN/companies.lang +++ b/htdocs/langs/hi_IN/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/hi_IN/compta.lang b/htdocs/langs/hi_IN/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/hi_IN/compta.lang +++ b/htdocs/langs/hi_IN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/hi_IN/ecm.lang b/htdocs/langs/hi_IN/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/hi_IN/ecm.lang +++ b/htdocs/langs/hi_IN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/hi_IN/errors.lang b/htdocs/langs/hi_IN/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/hi_IN/errors.lang +++ b/htdocs/langs/hi_IN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/hi_IN/externalsite.lang b/htdocs/langs/hi_IN/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/hi_IN/externalsite.lang +++ b/htdocs/langs/hi_IN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/hi_IN/main.lang b/htdocs/langs/hi_IN/main.lang index 7f67e16d9ea..295f37e2c16 100644 --- a/htdocs/langs/hi_IN/main.lang +++ b/htdocs/langs/hi_IN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/hi_IN/margins.lang b/htdocs/langs/hi_IN/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/hi_IN/margins.lang +++ b/htdocs/langs/hi_IN/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/hi_IN/members.lang b/htdocs/langs/hi_IN/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/hi_IN/members.lang +++ b/htdocs/langs/hi_IN/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/hi_IN/modulebuilder.lang b/htdocs/langs/hi_IN/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/hi_IN/modulebuilder.lang +++ b/htdocs/langs/hi_IN/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/hi_IN/orders.lang b/htdocs/langs/hi_IN/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/hi_IN/orders.lang +++ b/htdocs/langs/hi_IN/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/hi_IN/other.lang b/htdocs/langs/hi_IN/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/hi_IN/other.lang +++ b/htdocs/langs/hi_IN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/hi_IN/productbatch.lang b/htdocs/langs/hi_IN/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/hi_IN/productbatch.lang +++ b/htdocs/langs/hi_IN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/hi_IN/products.lang b/htdocs/langs/hi_IN/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/hi_IN/products.lang +++ b/htdocs/langs/hi_IN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/hi_IN/projects.lang b/htdocs/langs/hi_IN/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/hi_IN/projects.lang +++ b/htdocs/langs/hi_IN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/hi_IN/propal.lang b/htdocs/langs/hi_IN/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/hi_IN/propal.lang +++ b/htdocs/langs/hi_IN/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/hi_IN/stocks.lang b/htdocs/langs/hi_IN/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/hi_IN/stocks.lang +++ b/htdocs/langs/hi_IN/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/hi_IN/suppliers.lang b/htdocs/langs/hi_IN/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/hi_IN/suppliers.lang +++ b/htdocs/langs/hi_IN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/hi_IN/ticket.lang b/htdocs/langs/hi_IN/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/hi_IN/ticket.lang +++ b/htdocs/langs/hi_IN/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/hi_IN/users.lang b/htdocs/langs/hi_IN/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/hi_IN/users.lang +++ b/htdocs/langs/hi_IN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/hi_IN/website.lang b/htdocs/langs/hi_IN/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/hi_IN/website.lang +++ b/htdocs/langs/hi_IN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/hi_IN/zapier.lang b/htdocs/langs/hi_IN/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/hi_IN/zapier.lang +++ b/htdocs/langs/hi_IN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/hr_HR/accountancy.lang b/htdocs/langs/hr_HR/accountancy.lang index f5ba4bd62f1..7d4d1ccfde6 100644 --- a/htdocs/langs/hr_HR/accountancy.lang +++ b/htdocs/langs/hr_HR/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Broj komada TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -226,7 +226,7 @@ ConfirmDeleteMvt=This will delete all operation lines of the accounting for the 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=Financijski izvještaj uključujući sve tipove plačanja po bankovnom računom +DescFinanceJournal=Financijski izvještaj uključujući sve tipove plaćanja po bankovnom računom 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 @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index 7e0ec932d8e..9ca8d8e1a08 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -21,7 +21,7 @@ RemoteSignature=Remote distant signature (more reliable) FilesMissing=Nedostaju datoteke FilesUpdated=Nadograđene datoteke FilesModified=Preinačene datoteke -FilesAdded=Added Files +FilesAdded=Dodane datoteke 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 @@ -37,6 +37,7 @@ UnlockNewSessions=Otključaj spajanje YourSession=Vaša sesija Sessions=Users Sessions WebUserGroup=Web Server korisnik/grupa +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Napomena: DA je efektivno samo ako je modul <b>%s</b> omogućen RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Postavke sigurnosti +PHPSetup=PHP setup SecurityFilesDesc=Ovdje definirajte opcije vezane za sigurnost kod uploada datoteka. ErrorModuleRequirePHPVersion=Greška, ovaj modul zahtjeva PHP verziju %s ili višu ErrorModuleRequireDolibarrVersion=Greška, ovaj modul zahtjeva Dolibarr verzije %s ili više @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Trajno izbriši PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Izbriši sada @@ -232,6 +234,7 @@ BoxesAvailable=Dostupni dodaci BoxesActivated=Aktivirani dodaci ActivateOn=Aktiviraj na ActiveOn=Aktivirano na +ActivatableOn=Activatable on SourceFile=Izvorna datoteka AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dostupno samo ako JavaScript nije onemogućena Required=Obavezno @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Nadogradi server offline WithCounter=Manage a counter -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Svi preostali znakovi u predlošku će ostati nepromjenjeni.<br>Razmak nije dozvoljen.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Primjer na komitentu kreiranog 2007-03-01:</u><br> GenericMaskCodes4c=<u>Primjer na proizvodu kreiranog 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Biblioteka korištena za kreiranje PDF-a @@ -541,6 +545,8 @@ Module40Name=Dobavljači 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Urednici Module49Desc=Upravljanje urednicima Module50Name=Proizvodi @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind mogućnosti konverzije Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Djelatnici Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi tvrtka Module5000Desc=Dozvoljava upravljanje multi tvrtkama -Module6000Name=Tijek rada -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Web lokacije 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Izradi/izmjeni interne/vanjske korisnike i dozvole Permission254=Izradi/izmjeni samo vanjske korisnike Permission255=Izmjeni lozinku ostalih korisnika Permission256=Obriši ili isključi ostale korisnike -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Čitaj CA Permission272=Čitaj račune Permission273=Izdaj račun @@ -914,7 +923,7 @@ Permission1235=Send vendor invoices by email Permission1236=Export vendor invoices, attributes and payments Permission1237=Export purchase orders and their details Permission1251=Pokreni masovni uvoz vanjskih podataka u bazu (učitavanje podataka) -Permission1321=Izvezi račune kupaca, atribute i plačanja +Permission1321=Izvezi račune kupaca, atribute i plaćanja Permission1322=Reopen a paid bill Permission1421=Export sales orders and attributes Permission1521=Read documents @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Pregled sigurnosnih događaja +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Revizija InfoDolibarr=O Dolibarr instalaciji InfoBrowser=O pregledniku @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL funkcije nisu dostupne u vašem PHP DownloadMoreSkins=Više skinova za skinuti -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Parcijalni prijevod @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Dodatni atributi ExtraFieldsLines=Dodatni atributi (stavke) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1347,7 +1357,7 @@ NotificationsDesc=Email notifications can be sent automatically for some Dolibar NotificationsDescUser=* per user, one user at a time. NotificationsDescContact=* per third-party contacts (customers or vendors), one contact at a time. NotificationsDescGlobal=* or by setting global email addresses in this setup page. -ModelModules=Document Templates +ModelModules=Predlošci dokumenta DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...) WatermarkOnDraft=Vodeni žig na skici dokumenta JSOnPaimentBill=Activate feature to autofill payment lines on payment form @@ -1373,7 +1383,7 @@ SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account SuggestPaymentByChequeToAddress=Suggest payment by check to FreeLegalTextOnInvoices=Slobodan unos teksta na računu WatermarkOnDraftInvoices=Vodeni žig na skici računa (ništa ako se ostavi prazno) -PaymentsNumberingModule=Način označavanja plačanja +PaymentsNumberingModule=Način označavanja plaćanja SuppliersPayment=Vendor payments SupplierPaymentSetup=Vendor payments setup ##### Proposals ##### @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Prijava (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Filter pretraživanja LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Prijava (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Puno ime @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Konto prodaje AccountancyCodeBuy=Konto nabave +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Podešavanje modula događaja i agende PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Ne izvoziti događaj stariji od AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1762,7 +1775,7 @@ CashDeskSetup=Point of Sales module setup CashDeskThirdPartyForSell=Default generic third party to use for sales CashDeskBankAccountForSell=Zadani račun za prijem gotovinskih uplata CashDeskBankAccountForCheque=Default account to use to receive payments by check -CashDeskBankAccountForCB=Zadani račun za prijem plačanja kreditnim karticama +CashDeskBankAccountForCB=Zadani račun za prijem plaćanja kreditnim karticama CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock). CashDeskIdWareHouse=Forsiraj i ograniči skladište za skidanje zaliha @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Boja pozadine za neparne redove u tablici BackgroundTableLineEvenColor=Boja pozadine za parne redove u tablici MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2072,8 +2088,10 @@ 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 +EmailTemplate=Email predložak EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2081,17 +2099,26 @@ 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 +TemplateAdded=Predložak dodan +TemplateUpdated=Predložak ažuriran +TemplateDeleted=Predložak obrisan MailToSendEventPush=Event reminder email SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/hr_HR/banks.lang b/htdocs/langs/hr_HR/banks.lang index 6e93525512f..71f59ee02c2 100644 --- a/htdocs/langs/hr_HR/banks.lang +++ b/htdocs/langs/hr_HR/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/hr_HR/bills.lang b/htdocs/langs/hr_HR/bills.lang index 7e46e523ab2..96218a407d9 100644 --- a/htdocs/langs/hr_HR/bills.lang +++ b/htdocs/langs/hr_HR/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=Izlazni račun CustomersInvoices=Izlazni računi SupplierInvoice=Ulazni račun SuppliersInvoices=Ulazni računi +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Ulazni račun SupplierBills=Ulazni računi Payment=Plaćanja @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Izvršena plaćanja PaymentsBackAlreadyDone=Refunds already done PaymentRule=Način plaćanja PaymentMode=Način plaćanja +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debitna/kreditna kartica PaymentTypePP=PayPal IdPaymentMode=Način plaćanja (id) @@ -373,6 +376,7 @@ DateLastGeneration=Datum zadnjeg generiranja DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Automatska ovjera računa @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Iznos u postotku (%% od ukupno) VarAmountOneLine=Iznos u postotku (%% ukupno) - jedan redak s oznakom '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankovni prijenos PaymentTypeShortVIR=Bankovni prijenos @@ -457,7 +461,7 @@ NetToBePaid=Netto za platiti PhoneNumber=Tel FullPhoneNumber=Telefon TeleFax=Fax -PrettyLittleSentence=Prihvati iznos dospjelih plačanja čekovima izdanih u moje ime kao Član računovodstvene udruge odobrenih od Porezne uprave +PrettyLittleSentence=Prihvati iznos dospjelih plaćanja čekovima izdanih u moje ime kao Član računovodstvene udruge odobrenih od Porezne uprave IntracommunityVATNumber=Intra-Community VAT ID PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to @@ -494,12 +498,16 @@ Cash=Gotovina Reported=Odgođeno DisabledBecausePayments=Nije moguće obzirom da postoje neka plaćanja CantRemovePaymentWithOneInvoicePaid=Plaćanje se ne može izbrisati obzirom da postoji barem jedan račun koji je označen kao plaćen +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Očekivano plaćanje CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Plaćeno s ovom uplatom 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Plati ToMakePaymentBack=Povrat @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Kako biste izradili novi predložak račun PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=PDF račun prema Crevette predlošku. Kompletan predložak računa za etape -TerreNumRefModelDesc1=Vraća broj u formatu %syymm-nnnn za standardne račune i %syymm-nnnn za odobrenja gdje je yy godina, mm je mjesec i nnnn je sljedni broj bez prekida i bez mogučnosti povratka na 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Račun koji počinje s $syymm već postoji i nije kompatibilan s ovim modelom označivanja. Maknite ili promjenite kako biste aktivirali ovaj modul. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=Račun prve etape InvoiceFirstSituationDesc=<b>Račun etape</b> je vezan za etape vezane za napredovanje, npr. napredovanje gradnje. Svaka etapa je vezana za račun. InvoiceSituation=Račun etape +PDFInvoiceSituation=Račun etape InvoiceSituationAsk=Račun slijedi etapu InvoiceSituationDesc=Kreiranje nove etapu koja prati postojeću SituationAmount=Iznos računa etape (net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Izbriši predložak računa ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/hr_HR/boxes.lang b/htdocs/langs/hr_HR/boxes.lang index 62c1870fd62..ae67f203a6a 100644 --- a/htdocs/langs/hr_HR/boxes.lang +++ b/htdocs/langs/hr_HR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Zadnje akcije BoxLastContracts=Zadnji ugovori BoxLastContacts=Zadnji kontakti/adrese BoxLastMembers=Zadnji članovi +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Zadnje intervencije BoxCurrentAccounts=Stanje otvorenog računa BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Zadnjih %s novosti od %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Računovodstvo +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/hr_HR/categories.lang b/htdocs/langs/hr_HR/categories.lang index 38b81102ca5..a4eb2e7ac20 100644 --- a/htdocs/langs/hr_HR/categories.lang +++ b/htdocs/langs/hr_HR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Sučelje kategorija kupaca MembersCategoriesArea=Sučelje kategorija članova ContactsCategoriesArea=Sučelje kategorija kontakta -AccountsCategoriesArea=Sučelje tagova/kategorija računa +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Sučelje kategorija projekata UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Prikaži kategoriju ByDefaultInList=Po predefiniranom na listi ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/hr_HR/companies.lang b/htdocs/langs/hr_HR/companies.lang index ab89dcbabc0..b78643dfe85 100644 --- a/htdocs/langs/hr_HR/companies.lang +++ b/htdocs/langs/hr_HR/companies.lang @@ -43,9 +43,10 @@ Individual=Privatna osoba 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=Matična tvrtka Subsidiaries=Podružnice -ReportByMonth=Izvještaji po mjesecu -ReportByCustomers=Izvještaji po kupcu -ReportByQuarter=Izvještaj po stopi +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Kod uljudnosti RegisteredOffice=Sjedište Lastname=Prezime @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registracijski broj ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Dokaz ID 3 (broj komercijalnog podatka) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Trenutno otvoreni računi OutstandingBill=Maksimalno za otvorene račune OutstandingBillReached=Dosegnut maksimum neplaćenih računa OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Ova šifra je besplatne. Ova šifra se može modificirati u bilo koje vrijeme. ManagingDirectors=Ime vlasnika(ce) ( CEO, direktor, predsjednik uprave...) MergeOriginThirdparty=Dupliciran komitent (komitent koji želite obrisati) diff --git a/htdocs/langs/hr_HR/compta.lang b/htdocs/langs/hr_HR/compta.lang index 78940a5a086..673feed340f 100644 --- a/htdocs/langs/hr_HR/compta.lang +++ b/htdocs/langs/hr_HR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=PDV prikupljen StatusToPay=Za platiti SpecialExpensesArea=Sučelji svih specijalnih plaćanja +VATExpensesArea=Area for all TVA payments SocialContribution=Društveni ili fisklani porez SocialContributions=Društveni ili fiskanlni porezi SocialContributionsDeductibles=Odbitak društveni ili fiskalni porezi @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Uplata računa kupca PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Plaćanje društveni/fiskalni porez PaymentVat=PDV plaćanje +AutomaticCreationPayment=Automatically record the payment ListPayment=Popis plaćanja ListOfCustomerPayments=Popis uplata kupaca ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF plaćanje LT2PaymentsES=IRPF plaćanja VATPayment=Plaćanje poreza prodaje VATPayments=Plaćanja poreza kod prodaje +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=Nema čekova koji čekaju depozit. DateChequeReceived=Datum zaprimanja čeka NbOfCheques=No. of checks PaySocialContribution=Plati društveni/fiskalni porez -ConfirmPaySocialContribution=Jeste li sigurni da želite svrstati ovaj društveni/fiskalni porez kao plaćeno ? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Obriši plaćanje društvenog ili fiskalnog poreza -ConfirmDeleteSocialContribution=Jeste li sigurni da želite obrisati ovu uplatu društveni/fiskalni poreza +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Društveni i fiskalni porezi i plaćanja CalcModeVATDebt=Način <b>%sPDV na računovodstvene usluge%s</b> CalcModeVATEngagement=Način <b>%sPDV na prihode-troškove%s</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Uključuje stvarne uplate po računima, troškove, PDV i pla RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Izvještaj prikupljenog i plaćenog PDV-a kupaca VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Izvještaj po RE stopi @@ -217,7 +231,7 @@ Pcg_subtype=Pcg podtip InvoiceLinesToDispatch=Stavke računa za otpremu ByProductsAndServices=By product and service RefExt=Vanjska ref. -ToCreateAPredefinedInvoice=Za kreiranje predloška računa, izradite stadardni račun, onda, bez ovjeravanja, kliknite na gumb "%s" +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Poveži s narudžbom Mode1=Način 1 Mode2=Način 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Kloniraj za sljedeći mjesec SimpleReport=Jednostavan izvještaj AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/hr_HR/dict.lang b/htdocs/langs/hr_HR/dict.lang index 70addf50db2..2e3f562c742 100644 --- a/htdocs/langs/hr_HR/dict.lang +++ b/htdocs/langs/hr_HR/dict.lang @@ -21,7 +21,7 @@ CountryNL=Nizozemska CountryHU=Mađarska CountryRU=Rusija CountrySE=Švedska -CountryCI=Obala Bjelokosti +CountryCI=Obala Slonovače CountrySN=Senegal CountryAR=Argentina CountryCM=Kamerun @@ -116,7 +116,7 @@ CountryHM=Heard Island and McDonald CountryVA=Holy See (Vatican City State) CountryHN=Honduras CountryHK=Hong Kong -CountryIS=Iceland +CountryIS=Island CountryIN=Indija CountryID=Indonezija CountryIR=Iran @@ -131,7 +131,7 @@ CountryKI=Kiribati CountryKP=Sjeverna Korea CountryKR=Južna Korea CountryKW=Kuvajt -CountryKG=Kyrgyzstan +CountryKG=Kirgistan CountryLA=Lao CountryLV=Latvija CountryLB=Libanon @@ -160,7 +160,7 @@ CountryMD=Moldavija CountryMN=Mongolia CountryMS=Monserrat CountryMZ=Mozambik -CountryMM=Myanmar (Burma) +CountryMM=Mijanmar (Burma) CountryNA=Nambija CountryNR=Nauru CountryNP=Nepal @@ -223,7 +223,7 @@ CountryTO=Tonga CountryTT=Trinidad i Tobago CountryTR=Turska CountryTM=Turkmenistan -CountryTC=Turks and Caicos Islands +CountryTC=Otočje Turks i Caicos CountryTV=Tuvalu CountryUG=Uganda CountryUA=Ukrajina @@ -277,7 +277,7 @@ CurrencySingMGA=Ariary CurrencyMUR=Mauritius rupees CurrencySingMUR=Mauritius rupee CurrencyNOK=Norveških Kruna -CurrencySingNOK=Norwegian kronas +CurrencySingNOK=Norveške krune CurrencyTND=Tuniških Dinara CurrencySingTND=Tuniški Dinar CurrencyUSD=SAD Dolara @@ -290,7 +290,7 @@ CurrencyXOF=CFA Francs BCEAO CurrencySingXOF=CFA Franc BCEAO CurrencyXPF=CFP Francs CurrencySingXPF=CFP Franc -CurrencyCentEUR=cents +CurrencyCentEUR=centi CurrencyCentSingEUR=Cent CurrencyCentINR=paisa CurrencyCentSingINR=paise @@ -307,7 +307,7 @@ DemandReasonTypeSRC_WOM=Usmeno DemandReasonTypeSRC_PARTNER=Suradnik DemandReasonTypeSRC_EMPLOYEE=Zaposlenik DemandReasonTypeSRC_SPONSORING=Sponzorstvo -DemandReasonTypeSRC_SRC_CUSTOMER=Incoming contact of a customer +DemandReasonTypeSRC_SRC_CUSTOMER=dolazni kontakti kupca #### Paper formats #### PaperFormatEU4A0=4A0 format PaperFormatEU2A0=2A0 format @@ -330,24 +330,24 @@ PaperFormatCAP5=Format P5 Canada PaperFormatCAP6=Format P6 Canada #### Expense report categories #### ExpAutoCat=Auto -ExpCycloCat=Moped -ExpMotoCat=Motorbike -ExpAuto3CV=3 CV -ExpAuto4CV=4 CV -ExpAuto5CV=5 CV -ExpAuto6CV=6 CV -ExpAuto7CV=7 CV -ExpAuto8CV=8 CV -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 +ExpCycloCat=moped +ExpMotoCat=motocikl +ExpAuto3CV=3 CV - životopis +ExpAuto4CV=4 CV - životopis +ExpAuto5CV=5 CV - životopis +ExpAuto6CV=6 CV - životopis +ExpAuto7CV=7 CV - životopis +ExpAuto8CV=8 CV - životopis +ExpAuto9CV=9 CV - životopis +ExpAuto10CV=10 CV - životopis +ExpAuto11CV=11 CV - životopis +ExpAuto12CV=12 CV - životopis +ExpAuto3PCV=3 CV - životopisa i više +ExpAuto4PCV=4 CV - životopisa i više +ExpAuto5PCV=5 CV - životopisa i više +ExpAuto6PCV=6 CV - životopisa i više +ExpAuto7PCV=7 CV - životopisa i više +ExpAuto8PCV=8 CV - životopisa i više ExpAuto9PCV=9 CV and more ExpAuto10PCV=10 CV and more ExpAuto11PCV=11 CV and more diff --git a/htdocs/langs/hr_HR/donations.lang b/htdocs/langs/hr_HR/donations.lang index d7c4d18809a..cdbc20b9611 100644 --- a/htdocs/langs/hr_HR/donations.lang +++ b/htdocs/langs/hr_HR/donations.lang @@ -17,7 +17,7 @@ DonationStatusPromiseValidatedShort=Ovjereno DonationStatusPaidShort=Primljeno DonationTitle=Račun za donaciju DonationDate=Donation date -DonationDatePayment=Datum plačanja +DonationDatePayment=Datum plaćanja ValidPromess=Ovjeri obečanje DonationReceipt=Račun za donaciju DonationsModels=Modeli dokumenata za račune donacija @@ -32,3 +32,4 @@ DONATION_ART238=Prikaži članak 238 iz CGI ako ste zabrinuti DONATION_ART885=Prikaži članak 885 iz CGI ako ste zabrinuti DonationPayment=Isplata donacije DonationValidated=Donation %s validated +DonationUseThirdparties=Use an existing thirdparty as coordinates of donators diff --git a/htdocs/langs/hr_HR/ecm.lang b/htdocs/langs/hr_HR/ecm.lang index 7aec59051ed..b7f918045e2 100644 --- a/htdocs/langs/hr_HR/ecm.lang +++ b/htdocs/langs/hr_HR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/hr_HR/errors.lang b/htdocs/langs/hr_HR/errors.lang index cf19fd01b31..7a646f39d3f 100644 --- a/htdocs/langs/hr_HR/errors.lang +++ b/htdocs/langs/hr_HR/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/hr_HR/externalsite.lang b/htdocs/langs/hr_HR/externalsite.lang index e938e493903..1c3fb21742a 100644 --- a/htdocs/langs/hr_HR/externalsite.lang +++ b/htdocs/langs/hr_HR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Postavljanje linkova na vanjske web stranice -ExternalSiteURL=URL vanjske stranice +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite nije ispravno podešen. ExampleMyMenuEntry=Moj izbornik unos diff --git a/htdocs/langs/hr_HR/interventions.lang b/htdocs/langs/hr_HR/interventions.lang index 44d89525dfd..a101f2af983 100644 --- a/htdocs/langs/hr_HR/interventions.lang +++ b/htdocs/langs/hr_HR/interventions.lang @@ -33,17 +33,15 @@ SendInterventionByMail=Send intervention by email InterventionCreatedInDolibarr=Intervencija %s kreirana InterventionValidatedInDolibarr=Intervencija %s ovjerena InterventionModifiedInDolibarr=Intervencija %s promjenjena -InterventionClassifiedBilledInDolibarr=Intervencija %s je postavljena "Naplačena" -InterventionClassifiedUnbilledInDolibarr=Intervencija %s je postavljena "Nenaplačena" +InterventionClassifiedBilledInDolibarr=Intervencija %s je postavljena "Naplaćena" +InterventionClassifiedUnbilledInDolibarr=Intervencija %s je postavljena "Nenaplaćena" InterventionSentByEMail=Intervention %s sent by email InterventionDeletedInDolibarr=Intervencija %s obrisana InterventionsArea=Sučelje intervencija DraftFichinter=Skica intervencija LastModifiedInterventions=Zadnje %s izmijenjene intervencije FichinterToProcess=Interventions to process -##### Types de contacts ##### TypeContact_fichinter_external_CUSTOMER=Sljedeći kontakt kupca -# Modele numérotation PrintProductsOnFichinter=Ispiši također stavke tipa "proizvod" (ne samo usluge) na kartici intervencija PrintProductsOnFichinterDetails=intervencije generirane iz narudžbi UseServicesDurationOnFichinter=Koristi trajanje usluge za intervencije generirane iz narudžbi @@ -53,7 +51,6 @@ InterventionStatistics=Statistika intervencija 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 Intervencije InterRef=Ref. Intervencije InterDateCreation=Datum kreiranja @@ -65,3 +62,7 @@ InterLineId=Stavka ID InterLineDate=Stavka datuma InterLineDuration=Stavka trajanja InterLineDesc=Stavka opisa +RepeatableIntervention=Template of intervention +ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template +Reopen=Ponovo otvori +ConfirmReopenIntervention=Are you sure you want to open back the intervention <b>%s</b>? diff --git a/htdocs/langs/hr_HR/loan.lang b/htdocs/langs/hr_HR/loan.lang index b09829a0974..206a2004e1e 100644 --- a/htdocs/langs/hr_HR/loan.lang +++ b/htdocs/langs/hr_HR/loan.lang @@ -16,8 +16,8 @@ LoanAccountancyInsuranceCode=Accounting account insurance LoanAccountancyInterestCode=Accounting account interest ConfirmDeleteLoan=Potvrdite brisanje kredita LoanDeleted=Kredit je uspješno obrisan -ConfirmPayLoan=Potvrdite označivanje isplačen kredit -LoanPaid=Kredit isplačen +ConfirmPayLoan=Potvrdite označivanje isplaćen kredit +LoanPaid=Kredit isplaćen ListLoanAssociatedProject=List of loan associated with the project AddLoan=Create loan FinancialCommitment=Financial commitment diff --git a/htdocs/langs/hr_HR/main.lang b/htdocs/langs/hr_HR/main.lang index ad0c07d9405..da1d8d59dd1 100644 --- a/htdocs/langs/hr_HR/main.lang +++ b/htdocs/langs/hr_HR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Datum izmjene IPModification=Modification IP DateLastModification=Datum zadnje izmjene DateValidation=Datum ovjere +DateSigning=Signing date DateClosing=Datum zatvaranja DateDue=Datum dospijeća DateValue=Datum vrijednosti @@ -360,8 +361,8 @@ UnitPriceHT=Jedinična cijena (bez poreza) UnitPriceHTCurrency=Jedinična cijena (bez poreza) (u valuti) UnitPriceTTC=Jedinična cijena PriceU=Jed. cij. -PriceUHT=J.C. netto -PriceUHTCurrency=J.C. (valuta) +PriceUHT=Jedinična cijena +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=J.C. (s porezom) Amount=Iznos AmountInvoice=Iznos računa @@ -389,6 +390,8 @@ AmountTotal=Ukupan iznos AmountAverage=Prosječan iznos PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Postotak Total=Ukupno SubTotal=Sveukupno @@ -396,7 +399,7 @@ TotalHTShort=Ukupno (bez poreza) TotalHT100Short=Total 100%% (excl.) TotalHTShortCurrency=Total (excl. in currency) TotalTTCShort=Ukupno s PDV-om -TotalHT=Ukupno netto +TotalHT=Ukupno bez PDV-a TotalHTforthispage=Ukupno (bez PDV-a) na ovoj stranici Totalforthispage=Ukupno na ovoj stranici TotalTTC=Ukupno s PDV-om @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Trenutni jezik CurrentTheme=Trenutna tema CurrentMenuManager=Trenutni upravitelj izbornikom @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Ukloni redak '%s' SomeTranslationAreUncomplete=Neki od ponuđenih jezika možda su djelomično prevedeni ili sadrže greške. Molim vas pomozite ispraviti vaš jezik prijavom na <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a>. Ne budite pizde! -DirectDownloadLink=Poveznica za izravno preuzimanje (dostupno javno) -DirectDownloadInternalLink=Poveznica za izravno preuzimanje (potrebna prijava i dopuštenje) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Preuzimanje DownloadDocument=Preuzimanje dokumenta ActualizeCurrency=Upiši novi tečaj @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakti SearchIntoMembers=Članovi SearchIntoUsers=Korisnici SearchIntoProductsOrServices=Proizvodi ili usluge +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekti SearchIntoMO=Proizvodni nalozi SearchIntoTasks=Zadaci @@ -1049,12 +1055,13 @@ KeyboardShortcut=Kratica tipkovnice AssignedTo=Dodijeljeno korisniku Deletedraft=Obriši skicu ConfirmMassDraftDeletion=Potvrda masovnog brisanja skica -FileSharedViaALink=Datoteka podijeljena putem poveznice +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Prvo izaberite treću osobu... YouAreCurrentlyInSandboxMode=Trenutno ste %s u "sandbox" načinu rada Inventory=Zalihe AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Molim prvo učitajte dokument SeePrivateNote=Vidi privatne bilješke @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/hr_HR/margins.lang b/htdocs/langs/hr_HR/margins.lang index 0ee046592c7..3a284d29ae7 100644 --- a/htdocs/langs/hr_HR/margins.lang +++ b/htdocs/langs/hr_HR/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Detalji marže ProductMargins=Marže proizvoda CustomerMargins=Marže kupaca SalesRepresentativeMargins=Marže prodajnog predstavnika +ContactOfInvoice=Contact of invoice UserMargins=Korisničke marže ProductService=Proizvod ili usluga AllProducts=Svi proizvodi i usluge ChooseProduct/Service=Odaberite proizvod ili uslugu ForceBuyingPriceIfNull=Forsiraj kupovno/troškovnu cijenu kao prodajnu cijenu ako nije definirano -ForceBuyingPriceIfNullDetails=Ako kupovna/troškovna cijena nije definirana, i ova opcija je uključena, marža će biti nula na stavki ( kupovno/troškovna cijena = prodajna cijena), u protivnom (isključeno), marža će biti jednaka sugeriranoj vrijednosti. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Načini marže za globalne rabate UseDiscountAsProduct=Kao proizvod UseDiscountAsService=Kao usluga @@ -36,7 +37,7 @@ CostPrice=Cijena troška UnitCharges=Troškovi jedinice Charges=Troškovi AgentContactType=Vrsta kontakta komercijalnog agenta -AgentContactTypeDetails=Odredite koji tip kontakta (povezan na računu) će biti korišten za izvještaj marže po prodajnom predstavniku +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=Stopa mora biti brojčana vrijednost markRateShouldBeLesserThan100=Mark rate should be lower than 100 ShowMarginInfos=Prikaži infomacije o marži diff --git a/htdocs/langs/hr_HR/members.lang b/htdocs/langs/hr_HR/members.lang index 93393c63c22..38526538e24 100644 --- a/htdocs/langs/hr_HR/members.lang +++ b/htdocs/langs/hr_HR/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Popis članova u skicama ( za ovjeru ) MembersListValid=Popis valjanih članova MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Popis kvalificiranih članova MenuMembersToValidate=Skice članova MenuMembersValidated=Ovjereni članovi +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Članovi koji primaju pretplatu MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,15 +49,18 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Isteklo MemberStatusPaid=Pretplata valjana MemberStatusPaidShort=Valjano +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Skice članova +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Ovjereno SubscriptionNotNeeded=No subscription needed NewCotisation=Novi doprinos -PaymentSubscription=Novo plačanje doprinosa +PaymentSubscription=Novo plaćanje doprinosa SubscriptionEndDate=Datum kraja pretplate MembersTypeSetup=Podešavanje tipa članova MemberTypeModified=Member type modified @@ -82,6 +87,8 @@ Physical=Fizički Moral=Moralno MorAndPhy=Moral and Physical Reenable=Ponovo omogući +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Obriši člana @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format stranice naljepnica DescADHERENT_ETIQUETTE_TEXT=Tekst za ispis na adresnim listovima člana @@ -153,7 +161,7 @@ MoreActions=Dodatna akcija za snimanje MoreActionsOnSubscription=Dodatne akcije, predloži kao zadano kod pohrane pretplate MoreActionBankDirect=Create a direct entry on bank account MoreActionBankViaInvoice=Create an invoice, and a payment on bank account -MoreActionInvoiceOnly=Izradi račun bez plačanja +MoreActionInvoiceOnly=Izradi račun bez plaćanja LinkToGeneratedPages=Genereiraj vizit kartu LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member. DocForAllMembersCards=Generiraj vizit karte za sve članove @@ -162,6 +170,7 @@ DocForLabels=Generiraj listu adresa SubscriptionPayment=Plaćanje pretplate LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Statistika članova po zemlji MembersStatisticsByState=Statistika članova po regiji/provinciji MembersStatisticsByTown=Statistika članova po gradu diff --git a/htdocs/langs/hr_HR/modulebuilder.lang b/htdocs/langs/hr_HR/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/hr_HR/modulebuilder.lang +++ b/htdocs/langs/hr_HR/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/hr_HR/orders.lang b/htdocs/langs/hr_HR/orders.lang index aaf54f0eb6c..348ac6e7afc 100644 --- a/htdocs/langs/hr_HR/orders.lang +++ b/htdocs/langs/hr_HR/orders.lang @@ -16,6 +16,8 @@ ToOrder=Napravi narudžbu MakeOrder=Napravi narudžbu SupplierOrder=Narudžba dobavljaču SuppliersOrders=Narudžbe dobavljačima +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Otvorene narudžbe dobavljačima CustomerOrder=Narudžbenica CustomersOrders=Narudžbe kupaca diff --git a/htdocs/langs/hr_HR/other.lang b/htdocs/langs/hr_HR/other.lang index e96a3a7a4a4..9f094795773 100644 --- a/htdocs/langs/hr_HR/other.lang +++ b/htdocs/langs/hr_HR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Izradio %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=ID korisnika koji je mjenjao @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/hr_HR/productbatch.lang b/htdocs/langs/hr_HR/productbatch.lang index c037eb13c00..6a93cae8f4f 100644 --- a/htdocs/langs/hr_HR/productbatch.lang +++ b/htdocs/langs/hr_HR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Koristi lot/serijski broj -ProductStatusOnBatch=DA (lot/serijski broj potreban) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=NE (lot/serijski broj ne koristi) -ProductStatusOnBatchShort=DA +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=NE Batch=Lot/serijski broj atleast1batchfield=Upotrebljivo datum ili datum isteka ili lot/serijski broj @@ -16,9 +18,18 @@ printEatby=Upotrebljivo: %s printSellby=Istek: %s printQty=Količina: %d AddDispatchBatchLine=Dodaj stavku za otpremu na police -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. +WhenProductBatchModuleOnOptionAreForced=Kad je modul Lot / Serial uključen, automatsko smanjenje zaliha vrši se preko 'Smanjivanje stvarnih zaliha prilikom potvrde otpreme', a automatski način povećanja vrši se preko 'Povećanje stvarnih zaliha pri ručnoj otpremi u skladišta' i ne može se uređivati. Ostale mogućnosti možete definirati kako želite. ProductDoesNotUseBatchSerial=Ovaj proizvod ne koristi lot/serijski broj -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 +ProductLotSetup=Podešavanje modula serije +ShowCurrentStockOfLot=Prikaži trenutne zalihe za par proizvod/serija +ShowLogOfMovementIfLot=Prikaži dnevnik kretanja za par proizvod/serija +StockDetailPerBatch=Detalji zaliha po serijama +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/hr_HR/products.lang b/htdocs/langs/hr_HR/products.lang index 62d40d82a31..13595eda6c3 100644 --- a/htdocs/langs/hr_HR/products.lang +++ b/htdocs/langs/hr_HR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Upisani proizvodi i usluge na prodaju @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Ispravno promjenjeno PropalMergePdfProductActualFile=Datoteke za dodati u PDF Azur su/je PropalMergePdfProductChooseFile=Odaberite PDF datoteke -IncludingProductWithTag=Ukljući proizvode/usluge iz kategorije +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Predefinirana cijena, stvarna cijena može ovisiti o kupcu WarningSelectOneDocument=Molimo odaberite barem jedan dokument DefaultUnitToShow=Jedinica diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index ff826d9e7a5..04e1fbc2c24 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Popis zadataka GoToListOfTimeConsumed=Idi na popis utrošenog vremena GanttView=Gantogram +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Popis komercijalnih prijedloga vezanih za projekt ListOrdersAssociatedProject=Popis narudžbenica vezanih za projekt ListInvoicesAssociatedProject=Popis računa kupaca koji se odnose na projekt @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/hr_HR/propal.lang b/htdocs/langs/hr_HR/propal.lang index 88e72c46a1b..a592fdd040e 100644 --- a/htdocs/langs/hr_HR/propal.lang +++ b/htdocs/langs/hr_HR/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Pošalji ponudu e-poštom DatePropal=Datum ponude DateEndPropal=Vrijedi do ValidityDuration=Vrijedi do -CloseAs=Postavi status na SetAcceptedRefused=Postavi prihvaćeno/odbijeno ErrorPropalNotFound=Ponuda %s nije pronađena AddToDraftProposals=Dodati skici ponude @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Ponude i stavke ProposalLine=Stavka ponude +ProposalLines=Proposal lines AvailabilityPeriod=Rok isporuke SetAvailability=Odredi rok isporuke AfterOrder=poslije narudžbe @@ -85,3 +85,8 @@ ProposalCustomerSignature=Potvrda narudžbe; pečat tvrtke, datum i potpis 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/hr_HR/stocks.lang b/htdocs/langs/hr_HR/stocks.lang index 66ac338fa3a..2cf9bf1d206 100644 --- a/htdocs/langs/hr_HR/stocks.lang +++ b/htdocs/langs/hr_HR/stocks.lang @@ -19,8 +19,8 @@ Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zaliha po lot/serijskom LotSerial=Lot/serijski LotSerialList=Popis lot/serijskih brojeva @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Lokacija -LocationSummary=Kratki naziv lokacije -NumberOfDifferentProducts=Broj različitih proizvoda +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Ukupan broj proizvoda LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Vrijednost skladišta 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 cijena -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Jed. prodajna cijena EstimatedStockValueSellShort=Vrijednost za prodaju EstimatedStockValueSell=Vrijednost za prodaju @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Primke za narudžbu StockMovementRecorded=Kretanja zaliha zabilježeno @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Oznaka kretanja -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Kretanje ili inventarni kod IsInPackage=Sadržane u grupiranim proizvodima @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Zalihe inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Ponovo otvori +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/hr_HR/suppliers.lang b/htdocs/langs/hr_HR/suppliers.lang index 7c3d64f8d0b..e0ad809810f 100644 --- a/htdocs/langs/hr_HR/suppliers.lang +++ b/htdocs/langs/hr_HR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Dobavljači SuppliersInvoice=Ulazni račun +SupplierInvoices=Ulazni računi ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Povijest diff --git a/htdocs/langs/hr_HR/ticket.lang b/htdocs/langs/hr_HR/ticket.lang index 7a4ddd8295d..720848a5c1d 100644 --- a/htdocs/langs/hr_HR/ticket.lang +++ b/htdocs/langs/hr_HR/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Vrsta Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/hr_HR/users.lang b/htdocs/langs/hr_HR/users.lang index d1f3b04be64..e0e20643d90 100644 --- a/htdocs/langs/hr_HR/users.lang +++ b/htdocs/langs/hr_HR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Ukloni iz grupe PasswordChangedAndSentTo=Lozinka je promjenjena i poslana <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Zahtjev za promjenom lozinke za <b>%s</b> je poslana <b>%s</b>. +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=Korisnici & Grupe LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Korisnik na domeni %s Reactivate=Reaktiviraj 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Dozvola odobrena jer je nasljeđeno od jedne od korisničkih grupa. Inherited=Nasljeđeno +UserWillBe=Created user will be UserWillBeInternalUser=Kreirani korisnik će biti interni korisnik (jer nije vezan za određenog komitenta) UserWillBeExternalUser=Kreirani korisnik će biti vanjski korisnik (jer je vezan za određenog komitenta) IdPhoneCaller=Pozivatelj ID @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=Odjava korisnika UserLogged=Korisnik prijavljen DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/hr_HR/website.lang b/htdocs/langs/hr_HR/website.lang index 893a4042577..02ecf7128ff 100644 --- a/htdocs/langs/hr_HR/website.lang +++ b/htdocs/langs/hr_HR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/hr_HR/zapier.lang b/htdocs/langs/hr_HR/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/hr_HR/zapier.lang +++ b/htdocs/langs/hr_HR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/hu_HU/accountancy.lang b/htdocs/langs/hu_HU/accountancy.lang index 342be1b6de1..16c6008d9e7 100644 --- a/htdocs/langs/hu_HU/accountancy.lang +++ b/htdocs/langs/hu_HU/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index 76ed7753d26..92e6e5d9fb9 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Új kapcsolatok engedélyezése YourSession=Az Ön munkamenete Sessions=Felhasználói munkamenetek WebUserGroup=Webszerver felhasználója / csoportja +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Úgy tűnik, hogy a PHP-konfigurációja nem engedélyezi az aktív munkamenetek felsorolását. A munkamenetek mentéséhez használt könyvtár (<b>%s</b>) védett lehet (például operációs rendszer jogosultság vagy open_basedir PHP irányelv). @@ -62,6 +63,7 @@ IfModuleEnabled=Megjegyzés: az 'igen' csak akkor eredményes, ha a <b>%s</b> mo RemoveLock=Távolítsa el / nevezze át a(z) <b>%s</b> fájlt, ha létezik, hogy engedélyezze a Frissítés / Telepítés eszközt. RestoreLock=Állítsa vissza az <b>%s</b> fájlt, csak olvasási jogokat engedélyezzen, hogy le lehessen tiltani a Frissítés / Telepítés eszköz további használatát. SecuritySetup=Biztonsági beállítások +PHPSetup=PHP setup SecurityFilesDesc=Határozza meg a fájlok feltöltésének biztonságával kapcsolatos lehetőségeket. ErrorModuleRequirePHPVersion=Hiba történt, ez a modul a Dolibarr %s, vagy újabb verzióját igényli ErrorModuleRequireDolibarrVersion=Hiba történt, ez a modul a Dolibarr %s, vagy újabb verzióját igényli @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Ez a terület adminisztrációs lehetőségeket biztosít. A Purge=Tisztítsd PurgeAreaDesc=Ezen az oldalon törölheti a Dolibarr által létrehozott vagy tárolt összes fájlt (ideiglenes fájlok vagy az <b>%s</b> könyvtárban lévő fájlok). Ennek a szolgáltatásnak a használata általában nem szükséges. Megkerülő megoldásként szolgál azoknak a felhasználóknak, akiknek a Dolibarr-ját olyan szolgáltató üzemelteti, amely nem engedélyezi a webszerver által generált fájlok törlését. PurgeDeleteLogFile=Naplófájlok törlése, beleértve a(z) <b>%s</b> fájlt, amely a Syslog modulhoz lett megadva (nincs adatvesztés kockázata) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Az összes fájlt törölése ebben a könyvtárban: <b> %s </b>. <br> Ezzel törölheti az elemekhez kapcsolódó összes generált dokumentumot (harmadik felek, számlák stb.), az ECM modulba feltöltött fájlokat, az adatbázis biztonsági mentési ürlapjait és az ideiglenes fájlokat. PurgeRunNow=Ürítsd ki most @@ -232,6 +234,7 @@ BoxesAvailable=Elérhető widgetek BoxesActivated=Aktivált widgetek ActivateOn=Aktiválás ActiveOn=Aktiválódik +ActivatableOn=Activatable on SourceFile=Forrás fájl AvailableOnlyIfJavascriptAndAjaxNotDisabled=Csak ha a JavaScript nincs letiltva Required=Kötelező @@ -347,9 +350,10 @@ LastActivationAuthor=A legutóbbi aktiválás végrehajtója LastActivationIP=A legutóbbi aktiválás IP címe UpdateServerOffline=A szerver offline frissítése WithCounter=Számláló kezelése -GenericMaskCodes=Megadhat bármilyen számozás maszk. Ebben a maszk, az alábbi címkék is használhatók: <br> <b>{000000}</b> felel meg egy számot, amelyet fogja megnövelni minden %s. Adja meg a nullákat, mint annyi a kívánt méretre a számláló. A számláló tölti nullákkal balról annak érdekében, hogy minél több nullák, mint a maszk. <br> <b>{000000} 000</b> ugyanaz, mint korábban, hanem ellensúlyozza számának megfelelő jobbra a + jel alkalmazzák kezdve az első %s. <br> <b>{000000} @ x</b> ugyanaz, mint korábban, de a számláló lenullázódik, ha havi x-ért (x 1 és 12 között, vagy 0 használni a korai hónapokban a pénzügyi év van megadva a konfiguráció). Ha ezt az opciót használjuk, és az x 2 vagy magasabb, akkor a sorozat nn {} {} vagy {mm yyyy}} {mm is szükség van. <br> <b>{} Dd</b> nap (01 31). <br> <b>{} Mm</b> hónap (01-12). <br> <b>Yy {}, {ÉÉÉÉ}</b> vagy <b>{} y</b> évben több mint 2, 4 vagy 1 számokat. <br> -GenericMaskCodes2=<b>{cccc}</b> az ügyfélkód n karakteren <br> <b>{cccc000}</b> az n karakteren lévő ügyfélkódot egy ügyfélnek szánt számláló követi. Ez az ügyfélnek szánt számláló egyidejűleg nullázódik a globális számlálóval. <br> <b>{tttt}</b> A partner típusának kódja n karakteren (lásd: Kezdőlap - Beállítás - Szótár - Partnerek típusai). Ha hozzáadja ezt a címkét, a számlálók különböznek minden partner típusától. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Az összes többi karakter a maszkban marad érintetlen. <br> A szóközök nem megengedettek. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u> Példa a ValamilyenVállalat partner 99. %s, 2007-01-31 dátummal: </u> <br> GenericMaskCodes4b=<u>Példa: a harmadik fél létre 2007/03/01:</u> <br> GenericMaskCodes4c=<u>Példa egy 2007-03-01-én létrehozott termékre: </u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Ha ezt a mezőt üresen hagyja, akkor ez az érték ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=Az értékek listájának soroknak kell lennie formátumkulccsal, értékkel (ahol a kulcs nem lehet „0”) <br> <br> például: <br>1,érték1<br>2,érték2<br>3, érték3<br> ... ExtrafieldParamHelpradio=Az értékek listájának soroknak kell lennie formátumkulccsal, értékkel (ahol a kulcs nem lehet „0”) <br> <br> például: <br>1,érték1<br>2,érték2<br>3, érték3<br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=A paramétereknek ObjectName:Classpath típusúnak kell lennie <br> Szintaxis: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=A PDF létrehozásához használt programkönyvtár @@ -541,6 +545,8 @@ Module40Name=Eladók Module40Desc=Szállítók és beszerzésmenedzsment (beszerzési megrendelések és szállítói számlák kiszámlázása) Module42Name=Hibanaplók Module42Desc=Naplózási lehetőségek (fájl, syslog, ...). Az ilyen naplók műszaki / hibakeresési célokra szolgálnak. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Szerkesztők Module49Desc=Szerkesztő vezetése Module50Name=Termékek @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP MaxMind konverziók képességek Module3200Name=Megváltoztathatatlan archívumok Module3200Desc=Az üzleti események megváltoztathatatlan naplójának engedélyezése. Az eseményeket valós időben archiválódnak. A napló csak olvasható táblázat, amely exportálható láncolt eseményekből áll. Ez a modul egyes országokban kötelező lehet. +Module3400Name=Közösségi hálózatok +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Humánerőforrás menedzsment (osztály vezetése, munkavállalói szerződések és elégedettség) Module5000Name=Több-cég Module5000Desc=Több vállalat kezelését teszi lehetővé -Module6000Name=Munkafolyamat -Module6000Desc=Munkafolyamat-menedzsment (objektum automatikus létrehozása és/vagy automatikus állapotváltozás) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Weboldalak Module10000Desc=Készítsen (nyilvános) webhelyeket egy WYSIWYG szerkesztővel. Ez egy webmester vagy fejlesztőorientált CMS (jobb, ha ismerjük a HTML és a CSS nyelvet). Csak állítsa be a webszervert (Apache, Nginx, ...), hogy mutasson a dedikált Dolibarr könyvtárra, hogy online legyen az interneten saját domain nevével. Module20000Name=Kérelmek kezelésének engedélyezése @@ -805,7 +813,8 @@ PermissionAdvanced253=Létrehozza / módosítja belső / külső felhasználók Permission254=Létrehozása / módosítása csak a külső felhasználók számára Permission255=Módosíthat más felhasználó jelszavát Permission256=Törlése vagy tiltsa le más felhasználók -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Olvassa CA Permission272=Olvassa számlák Permission273=Számlák kibocsátása @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Az "Egyéb beállítás" menü az opcionális paramétereket tartalmazza. -LogEvents=Biztonsági audit események +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Könyvvizsgálat InfoDolibarr=A Dolibarr jellemzői InfoBrowser=A böngésző jellemzői @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Úgy tűnik, hogy szükséges a frissítési f YouMustRunCommandFromCommandLineAfterLoginToUser=Kell futtatni ezt a parancsot a parancssorból bejelentkezés után a shell felhasználói <b>%s</b> vagy hozzá kell-W opció végén parancsot, hogy <b>%s</b> jelszót. YourPHPDoesNotHaveSSLSupport=SSL funkció nem áll rendelkezésre a PHP DownloadMoreSkins=További bőrök letöltése -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Részleges fordítás @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy szerver: Név / Cím MAIN_PROXY_PORT=Proxy szerver: Port MAIN_PROXY_USER=Proxy szerver: Bejelentkezés / Felhasználó MAIN_PROXY_PASS=Proxy szerver: Jelszó -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Kiegészítő tulajdonságok ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Bejelentkezés (unix) LDAPFieldLoginExample=Példa: uid LDAPFilterConnection=Keresés szűrő LDAPFilterConnectionExample=Példa: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Bejelentkezés (samba, ActiveDirectoryba) LDAPFieldLoginSambaExample=Példa: samaccountname LDAPFieldFullname=Keresztnév @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Eladás számviteli kódja AccountancyCodeBuy=Vétel számviteli kódja +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Rendezvények és napirend modul beállítási PasswordTogetVCalExport=Főbb kiviteli engedélyezésének linket +SecurityKey = Security Key PastDelayVCalExport=Ne export esetén, mint a régebbi AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/hu_HU/banks.lang b/htdocs/langs/hu_HU/banks.lang index ccc93640d6a..70e8abcf1be 100644 --- a/htdocs/langs/hu_HU/banks.lang +++ b/htdocs/langs/hu_HU/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/hu_HU/bills.lang b/htdocs/langs/hu_HU/bills.lang index e4837b5f8ae..fb9b77eecf9 100644 --- a/htdocs/langs/hu_HU/bills.lang +++ b/htdocs/langs/hu_HU/bills.lang @@ -52,11 +52,12 @@ Invoices=Számlák InvoiceLine=Számla tételsor InvoiceCustomer=Vásárlói számla CustomerInvoice=Vásárlói számla -CustomersInvoices=Vásárlók számlái +CustomersInvoices=Ügyfél számlák SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Szállítói számlák +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=beszállítók számlái +SupplierBills=Szállítói számlák Payment=Fizetés PaymentBack=Visszatérítés CustomerInvoicePaymentBack=Visszatérítés @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Fizetve PaymentsBackAlreadyDone=Refunds already done PaymentRule=Fizetési szabály PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Változó összeg (%% össz.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Banki átutalás PaymentTypeShortVIR=Banki átutalás @@ -494,12 +498,16 @@ Cash=Készpénz Reported=Késik DisabledBecausePayments=Nem lehetséges, mert van némi kifizetés CantRemovePaymentWithOneInvoicePaid=Nem lehet eltávolítani a fizetést, hiszen legalább egy számla kifizettetként osztályozott +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Várható fizetés CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Ezzel a fizetéssel fizetve 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Kifizetés ToMakePaymentBack=Visszafizetés @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A $syymm kezdődéssel már létezik számla, és nem kompatibilis ezzel a sorozat modellel. Töröld le vagy nevezd át, hogy aktiválja ezt a modult. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/hu_HU/boxes.lang b/htdocs/langs/hu_HU/boxes.lang index ead5517a357..5c57fdeffb2 100644 --- a/htdocs/langs/hu_HU/boxes.lang +++ b/htdocs/langs/hu_HU/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Nyitott számla egyenleg BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/hu_HU/categories.lang b/htdocs/langs/hu_HU/categories.lang index f16ea1f8280..33c8f09ef3a 100644 --- a/htdocs/langs/hu_HU/categories.lang +++ b/htdocs/langs/hu_HU/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/hu_HU/companies.lang b/htdocs/langs/hu_HU/companies.lang index 7848c56a7d1..dcb4a078cde 100644 --- a/htdocs/langs/hu_HU/companies.lang +++ b/htdocs/langs/hu_HU/companies.lang @@ -43,9 +43,10 @@ Individual=Magánszemély ToCreateContactWithSameName=Automatikusan létrehoz egy névjegyet / címet ugyanazzal az információval, mint a partner a partner alatt. A legtöbb esetben, még ha a partner is fizikai személy, elegendő egy partner létrehozása. ParentCompany=Anyavállalat Subsidiaries=Leányvállalatok -ReportByMonth=Jelentés hónap szerint -ReportByCustomers=Jelentése ügyfél szerint -ReportByQuarter=Jelentés %-onként +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Udvariassági kód RegisteredOffice=Bejegyzett iroda Lastname=Vezetéknév @@ -172,14 +173,20 @@ ProfId1ES=Szakma ID 1 (CIF / NIF) ProfId2ES=Szakma ID 2 (Társadalombiztosítási szám) ProfId3ES=Szakma Id 3 (CNAE) ProfId4ES=Szakma Id 4 (Collegiate szám) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Szakma ID 1 (SIREN) ProfId2FR=Szakma ID 2 (SIRET) ProfId3FR=Szakma Id 3 (NAF, régi APE) ProfId4FR=Szakma Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Regisztrációs szám ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Technikai azonosító 1 (Luxemburg) ProfId2LU=Technikai azonosító 2 (Üzlet engedélye) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Szakma ID 1 (NIPC) ProfId2PT=Szakma ID 2 (Társadalombiztosítási szám) ProfId3PT=Szakma Id 3 (Kereskedelmi azonosító szám) ProfId4PT=Szakma Id 4 (Konzervatórium) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Szakma id 1 (CUI) ProfId2RO=Szakma ID 2 (regisztrációs szám) ProfId3RO=Szakma ID 3 (CAEN) ProfId4RO=Szakma ID 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Szakma ID 1 (OGRN) ProfId2RU=Szakma ID 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Jelenlegi kintlévőség OutstandingBill=Maximális kintlévőség OutstandingBillReached=Max. a kintlévőség elért OrderMinAmount=Minimális rendelési összeg -MonkeyNumRefModelDesc=Visszaad egy számot %syymm-nnnn formátumban az ügyfélkódhoz, és %syymm-nnnn formátumú eladói kódhoz, ahol yy év, mm hónap és nnnn szünet nélküli sorozat 0-kal feltöltve. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=A kód szabad. Ez a kód bármikor módosítható. ManagingDirectors=Vezető(k) neve (ügyvezető, elnök, igazgató) MergeOriginThirdparty=Duplikált partner (a partnert törlésre kerül) diff --git a/htdocs/langs/hu_HU/compta.lang b/htdocs/langs/hu_HU/compta.lang index 58ff2d8bdcf..d18b2a6e017 100644 --- a/htdocs/langs/hu_HU/compta.lang +++ b/htdocs/langs/hu_HU/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Beszedett HÉA StatusToPay=Fizetni SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Ügyfél számla fizetési PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Szociális/költségvetési adó fizetés PaymentVat=ÁFA-fizetés +AutomaticCreationPayment=Automatically record the payment ListPayment=A fizetési lista ListOfCustomerPayments=Ügyfelek fizetési listája ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=Fizetési IRPF LT2PaymentsES=IRPF kifizetések VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Ellenőrizze a fogadás dátumát 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=Külső hiv -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link a rendelésre Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/hu_HU/ecm.lang b/htdocs/langs/hu_HU/ecm.lang index 7665135017e..97b5acbda3b 100644 --- a/htdocs/langs/hu_HU/ecm.lang +++ b/htdocs/langs/hu_HU/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=A fájl még nincs indexelve az adatbázisba (prób ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/hu_HU/errors.lang b/htdocs/langs/hu_HU/errors.lang index 66351dfdb7e..a9d1fcea36b 100644 --- a/htdocs/langs/hu_HU/errors.lang +++ b/htdocs/langs/hu_HU/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>%s</b> könyvtár nem található (Rossz út, rossz engedél ErrorFunctionNotAvailableInPHP=Funkció <b>%s</b> van szükség, de ez a funkció nem érhető el ez a verzió / beállítását PHP. ErrorDirAlreadyExists=A könyvtár ezzel a névvel már létezik. ErrorFileAlreadyExists=Egy ugyanilyen nevű fájl már létezik. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=A fájlt nem sikerült teljesen feltölteni. ErrorNoTmpDir=A %s ideiglenes könyvtár nem létezik. ErrorUploadBlockedByAddon=A feltöltést akadályozza valamilyen PHP / Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/hu_HU/externalsite.lang b/htdocs/langs/hu_HU/externalsite.lang index eff95943d10..73ab6fbae3a 100644 --- a/htdocs/langs/hu_HU/externalsite.lang +++ b/htdocs/langs/hu_HU/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Külső weboldalra mutató link beállítása -ExternalSiteURL=Külső oldal URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Az ExternalSite modul nincs megfelelően beállítva. ExampleMyMenuEntry=A menüpontom diff --git a/htdocs/langs/hu_HU/main.lang b/htdocs/langs/hu_HU/main.lang index 8b26160d391..0e272c3cc49 100644 --- a/htdocs/langs/hu_HU/main.lang +++ b/htdocs/langs/hu_HU/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Szerk. dátuma IPModification=Modification IP DateLastModification=Utolsó módosítás dátuma DateValidation=Hitelesítés dátuma +DateSigning=Signing date DateClosing=Lezárás dátuma DateDue=Határidő DateValue=Érték dátuma @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Egységár (ÁFA nélkül) (valuta) UnitPriceTTC=Egység ár PriceU=E.Á. PriceUHT=E.Á. (nettó) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=E.Á. (adóval) Amount=Mennyiség AmountInvoice=Számla mennyiség @@ -389,6 +390,8 @@ AmountTotal=Teljes mennyiség AmountAverage=Átlag mennyiség PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Százalék Total=Végösszeg SubTotal=Részösszeg @@ -724,7 +727,7 @@ MenuMembers=Tagok MenuAgendaGoogle=Google naptár MenuTaxesAndSpecialExpenses=Adók | Különleges kiadások ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb -NoFileFound=Nincs mentett dokumentum ebben a könyvtárban +NoFileFound=No documents uploaded CurrentUserLanguage=Jelenlegi nyelv CurrentTheme=Jelenlegi téma CurrentMenuManager=Jelenlegi menü-menedzser @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Távolítsa el a '%s' karakterláncot SomeTranslationAreUncomplete=A felkínált nyelvek némelyike csak részben fordítható le, vagy hibákat tartalmazhat. Kérjük, segítsen nyelvének javításában az <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> címen regisztrálva. -DirectDownloadLink=Közvetlen letöltési link (nyilvános / külső) -DirectDownloadInternalLink=Link a közvetlen letöltéshez (belépés és jogosultság szükséges) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Letöltés DownloadDocument=Dokumentum letöltése ActualizeCurrency=Árfolyam frissítése @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kapcsolatok SearchIntoMembers=Tagok SearchIntoUsers=Felhasználók SearchIntoProductsOrServices=Termékek vagy Szolgáltatások +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projektek SearchIntoMO=Gyártási rendelések SearchIntoTasks=Tennivalók @@ -1049,12 +1055,13 @@ KeyboardShortcut=Billentyűparancs AssignedTo=Hozzárendelve Deletedraft=Vázlat törlése ConfirmMassDraftDeletion=Vázlatok tömeges törlésének megerősítése -FileSharedViaALink=A fájl megosztva link segítségével +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Először válassza ki a harmadik felet ... YouAreCurrentlyInSandboxMode=Jelenleg %s "sandbox" módban van Inventory=Készletnyilvántartás AnalyticCode=Analitikai kód TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=További infók megjelenítése NoFilesUploadedYet=Először töltsön fel egy dokumentumot SeePrivateNote=Lásd a privát jegyzetet @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/hu_HU/margins.lang b/htdocs/langs/hu_HU/margins.lang index 634fb7c4ec2..15ed72656ed 100644 --- a/htdocs/langs/hu_HU/margins.lang +++ b/htdocs/langs/hu_HU/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Termék vagy Szolgáltatás 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/hu_HU/members.lang b/htdocs/langs/hu_HU/members.lang index c191087ddb9..22c84e6b1d0 100644 --- a/htdocs/langs/hu_HU/members.lang +++ b/htdocs/langs/hu_HU/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Tagok listája tervezet (érvényesíteni kell) MembersListValid=Érvényes tagok listája MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Kilépett tagok listája MembersListQualified=Képesítéssel rendelkező tagok listája MenuMembersToValidate=Draft tagjai MenuMembersValidated=Jóváhagyott tagjai +MenuMembersExcluded=Excluded members MenuMembersResiliated=Kilépett tagok MembersWithSubscriptionToReceive=Tagok előfizetés kapni MembersWithSubscriptionToReceiveShort=Előfizetés a fogadáshoz @@ -47,9 +49,12 @@ MemberStatusActiveLate=Az előfizetés lejárt MemberStatusActiveLateShort=Lejárt MemberStatusPaid=Előfizetés naprakész MemberStatusPaidShort=Naprakész +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Kiléptetett tag MemberStatusResiliatedShort=Kilépett MembersStatusToValid=Draft tagjai +MembersStatusExcluded=Excluded members MembersStatusResiliated=Kilépett tagok MemberStatusNoSubscription=Ellenörzött (előfizetés nem szükséges) MemberStatusNoSubscriptionShort=Hitelesítetve @@ -82,6 +87,8 @@ Physical=Fizikai Moral=Erkölcsi MorAndPhy=Moral and Physical Reenable=Újra bekapcsolja +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Tag kiléptetése ConfirmResiliateMember=Valóban ki szeretné léptetni az adott tagot? DeleteMember=Tag törlése @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=A tagoknak küldött tagérvényes DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=A tagoknak küldött új előfizetés felvételéhez használatos e-mail sablon. DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Az előfizetés lejáratára emlékeztető e-mail sablonja. DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Az előfizetés lemondásakor kiküldött e-mail sablonja. +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Feladó e-mail címe az automatikus e-mailekhez DescADHERENT_ETIQUETTE_TYPE=Oldal formátuma címkék DescADHERENT_ETIQUETTE_TEXT=A tag címzési lapjára nyomtatott szöveg @@ -162,6 +170,7 @@ DocForLabels=Létrehoz cím lap (a kimeneti formátum tulajdonképpen setup: <b> SubscriptionPayment=Előfizetés kiegyenlítése LastSubscriptionDate=A legutóbbi előfizetés fizetési dátuma. LastSubscriptionAmount=A legutóbbi előfizetés összege +LastMemberType=Last Member type MembersStatisticsByCountries=Országonkénti tagstatisztika. MembersStatisticsByState=Tartományonkénti tagstatisztika. MembersStatisticsByTown=Városonkénti tagstatisztika. diff --git a/htdocs/langs/hu_HU/modulebuilder.lang b/htdocs/langs/hu_HU/modulebuilder.lang index d257f8a1b0b..9192d12ec83 100644 --- a/htdocs/langs/hu_HU/modulebuilder.lang +++ b/htdocs/langs/hu_HU/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/hu_HU/orders.lang b/htdocs/langs/hu_HU/orders.lang index 8b1b0ac0e74..02ff5a44729 100644 --- a/htdocs/langs/hu_HU/orders.lang +++ b/htdocs/langs/hu_HU/orders.lang @@ -16,6 +16,8 @@ ToOrder=Rendelés készítése MakeOrder=Rendelés készítése SupplierOrder=Beszerzési megrendelés SuppliersOrders=Megrendelések +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Jelenlegi beszerzési megrendelések CustomerOrder=Értékesítési megrendelés CustomersOrders=Értékesítési megrendelések @@ -87,7 +89,7 @@ NbOfOrders=Megrendelések száma OrdersStatistics=Rendelési statisztikák OrdersStatisticsSuppliers=Beszerzési statisztikák NumberOfOrdersByMonth=Megrendelések száma havonta -AmountOfOrdersByMonthHT=Megrendelések száma havonta (adó nélkül) +AmountOfOrdersByMonthHT=Megrendelések értéke havonta (adó nélkül) ListOfOrders=Megrendelések listája CloseOrder=Megrendelés lezárása ConfirmCloseOrder=Biztos benne, hogy ezt a megrendelést kézbesítettre állítja? A kézbesített megrendelés állítható számlázottra. @@ -141,11 +143,12 @@ OrderByEMail=E-mail OrderByWWW=Online OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=Teljes megrendelési modell +PDFEinsteinDescription=Teljes megrendelési modell (az Eratosthene sablon régi megvalósítása) PDFEratostheneDescription=Teljes megrendelési modell PDFEdisonDescription=Egyszerű megrendelési sablon PDFProformaDescription=Teljes Proforma számlasablon CreateInvoiceForThisCustomer=Megrendelések számlázása +CreateInvoiceForThisSupplier=Megrendelések számlázása NoOrdersToInvoice=Nincsenek számlázandó megrendelések CloseProcessedOrdersAutomatically=Minden kijelölt megrendelés jelölése 'Feldolgozott'-nak. OrderCreation=Megrendelés készítés diff --git a/htdocs/langs/hu_HU/other.lang b/htdocs/langs/hu_HU/other.lang index db482da70da..1ae365c60f9 100644 --- a/htdocs/langs/hu_HU/other.lang +++ b/htdocs/langs/hu_HU/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Készítette %s ModifiedBy=Módosította %s ValidatedBy=Érvényesíti %s +SignedBy=Signed by %s ClosedBy=Lezárta %s CreatedById=Étrehozó ID ModifiedById=A legutóbbi változtatást elvégező felhasználó azonosítója @@ -244,6 +245,7 @@ NewKeyIs=Ez az új kulcs a bejelentkezéshez NewKeyWillBe=A szoftverbe való bejelentkezéshez szükséges új kulcsa ClickHereToGoTo=Ide kattintva lépjen az %s oldalra YouMustClickToChange=Először rá kell kattintania a következő linkre a jelszó megváltoztatásának érvényesítéséhez +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Ha nem kérte ezt a változtatást, felejtse el ezt az e-mailt. A hitelesítő adatait biztonságban tartjuk. IfAmountHigherThan=Ha a mennyiség nagyobb, mint <strong>%s</strong> SourcesRepository=Források tárolója diff --git a/htdocs/langs/hu_HU/productbatch.lang b/htdocs/langs/hu_HU/productbatch.lang index 6ba8d2aef98..a5e5e3c4906 100644 --- a/htdocs/langs/hu_HU/productbatch.lang +++ b/htdocs/langs/hu_HU/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Igen +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nem Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/hu_HU/products.lang b/htdocs/langs/hu_HU/products.lang index 6add4db3590..ddf05f19e41 100644 --- a/htdocs/langs/hu_HU/products.lang +++ b/htdocs/langs/hu_HU/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Áfakulcs (ehhez az eladóhoz / termékhez) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=Ehhez a gyártóhoz / termékhez nincs megadva ár / mennyiség NoSupplierPriceDefinedForThisProduct=Ehhez a termékhez nincs meghatározva eladási ár / mennyiség +PredefinedItem=Predefined item PredefinedProductsToSell=Előre meghatározott termék PredefinedServicesToSell=Előre meghatározott szolgáltatás PredefinedProductsAndServicesToSell=Előre meghatározott termékek / szolgáltatások eladásra @@ -313,7 +314,7 @@ LastUpdated=Legutolsó frissítés CorrectlyUpdated=Rendben frissítve PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=PDF fájlok kiválasztása -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Kérjük, válasszon legalább egy dokumentumot DefaultUnitToShow=Egység diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index faec1be92fe..0a5f58045ef 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Feladatok listája GoToListOfTimeConsumed=Ugrás az elfogyasztott idő listájára GanttView=Gantt nézet +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=A projekttel kapcsolatos kereskedelmi javaslatok felsorolása ListOrdersAssociatedProject=A projekthez kapcsolódó értékesítési rendelések listája ListInvoicesAssociatedProject=A projekttel kapcsolatos ügyfélszámlák listája @@ -268,3 +269,7 @@ OneLinePerTask=Feladatonként egy sor OneLinePerPeriod=Periódusonként egy sor RefTaskParent=Ref. Szülői feladat ProfitIsCalculatedWith=A nyereség kiszámítása +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/hu_HU/propal.lang b/htdocs/langs/hu_HU/propal.lang index b98a6e90f41..6ec551c8c84 100644 --- a/htdocs/langs/hu_HU/propal.lang +++ b/htdocs/langs/hu_HU/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Küldés e-mailben kereskedelmi javaslat DatePropal=Születési javaslat DateEndPropal=Érvényesség vége dátuma ValidityDuration=Érvényesség időtartama -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal %s nem található AddToDraftProposals=Add to draft proposal @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Üzleti ajánlat és vonalak ProposalLine=Javaslat vonal +ProposalLines=Proposal lines AvailabilityPeriod=Elérhetőség késleltetés SetAvailability=Állítsa be a rendelkezésre álló késedelem AfterOrder=rendezés után @@ -85,3 +85,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/hu_HU/stocks.lang b/htdocs/langs/hu_HU/stocks.lang index d6a04f7d23e..983d4c646dd 100644 --- a/htdocs/langs/hu_HU/stocks.lang +++ b/htdocs/langs/hu_HU/stocks.lang @@ -19,8 +19,8 @@ Stock=Készlet Stocks=Készletek MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Készletek tétel/cikkszám alapján LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Hely -LocationSummary=Hely rövid neve -NumberOfDifferentProducts=Termékek száma összesen +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Termékek összesen LastMovement=Utolsó mozgatás LastMovements=Utolsó mozgatások @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Raktárak értéke UserWarehouseAutoCreate=Felhasználói raktár automatikus létrehozása felhasználó hozzáadásakor 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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ár -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Értékesítés Egységár EstimatedStockValueSellShort=Eladási érték EstimatedStockValueSell=Eladási érték @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Mozgatás rögzítése ReceivingForSameOrder=Megrendelés nyugtái StockMovementRecorded=Rögzített készletmozgások @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Mozgás címkéje -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Mozgás vagy leltár kód IsInPackage=Csomag tartalmazza @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Készletnyilvántartás inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/hu_HU/suppliers.lang b/htdocs/langs/hu_HU/suppliers.lang index ddee07d0144..9f6541ea875 100644 --- a/htdocs/langs/hu_HU/suppliers.lang +++ b/htdocs/langs/hu_HU/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Eladók SuppliersInvoice=Vendor invoice +SupplierInvoices=Szállítói számlák ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Történet diff --git a/htdocs/langs/hu_HU/ticket.lang b/htdocs/langs/hu_HU/ticket.lang index eca711a1cf2..59c439326d2 100644 --- a/htdocs/langs/hu_HU/ticket.lang +++ b/htdocs/langs/hu_HU/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Típus Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/hu_HU/users.lang b/htdocs/langs/hu_HU/users.lang index 45af45e609f..9e9179eeb7c 100644 --- a/htdocs/langs/hu_HU/users.lang +++ b/htdocs/langs/hu_HU/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Eltávolítás a csoportból PasswordChangedAndSentTo=A jelszó megváltoztatva és elküldve: <b>%s</b>. PasswordChangeRequest=Jelszó megváltoztatásának kérése <b>%s</b> PasswordChangeRequestSent=<b>%s</b> által kért jelszóváltoztatás el lett küldve ide: <b>%s</b>. +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=A jelszó visszaállításának megerősítése MenuUsersAndGroups=Felhasználók és csoportok LastGroupsCreated=Legutóbb létrehozott %s csoportok @@ -70,9 +72,10 @@ ExportDataset_user_1=Felhasználók és tulajdonságaik DomainUser=Domain felhasználók %s Reactivate=Újra aktiválás CreateInternalUserDesc=Ez az űrlap lehetővé teszi belső felhasználó létrehozását a vállalatban/szervezetben. Külső felhasználó (vevő, eladó stb.) létrehozásához használja a 'Dolibarr felhasználó létrehozása' gombot a partner névjegykártyáján. -InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Engedélyek megadva mert örökölte az egyik csoporttól. Inherited=Örökölve +UserWillBe=Created user will be UserWillBeInternalUser=Létrehozta felhasználó lesz egy belső felhasználó (mivel nem kapcsolódik az adott harmadik fél) UserWillBeExternalUser=Létrehozott felhasználó lesz egy külső felhasználó (mivel kapcsolódnak az adott harmadik fél) IdPhoneCaller=Telfon hívó azonosító @@ -109,8 +112,10 @@ 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 +DateEmployment=Employment +DateEmploymentstart=A foglalkoztatás kezdő dátuma DateEmploymentEnd=A foglalkoztatás befejezési dátuma +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Saját felhasználói rekordját nem tilthatja le ForceUserExpenseValidator=A költségjelentés érvényesítésének kényszerítése ForceUserHolidayValidator=A szabadságkérelem érvényesítése diff --git a/htdocs/langs/hu_HU/website.lang b/htdocs/langs/hu_HU/website.lang index d7e4a43010d..df9bc9385e8 100644 --- a/htdocs/langs/hu_HU/website.lang +++ b/htdocs/langs/hu_HU/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Használjon beépített PHP szerverrel</u> <br> Fejlesztői környezetben a futtatással inkább tesztelheti a webhelyet a beágyazott PHP szerverrel (PHP 5.5 szükséges) <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Futtassa weboldalát egy másik Dolibarr tárhely szolgáltatóval</u> <br> Ha még nem áll rendelkezésre internetes szerver, például Apache vagy NGinx, akkor exportálhatja és importálhatja webhelyét egy másik Dolibarr példányra, amelyet egy másik Dolibarr tárhely szolgáltató biztosít, és amely teljes mértékben integrálja a webhely modult. Néhány Dolibarr tárhely-szolgáltató felsorolását a <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org oldalon</a> találja -CheckVirtualHostPerms=Ellenőrizze azt is, hogy a virtuális gazdagép rendelkezik-e <strong>%s</strong> engedéllyel a fájlokba <br> <strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Olvas WritePerm=Ír TestDeployOnWeb=Tesztelés / telepítés az interneten PreviewSiteServedByWebServer=<u>Előnézet %s új fülön.</u> <br><br> Az %s-et egy külső webszerver fogja kiszolgálni (például Apache, Nginx, IIS). A kiszolgáló telepítése és telepítése előtt telepítenie kell a könyvtárat: <br> <strong>%s</strong> <br> Külső szerver által kiszolgált URL: <br> <strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Előnézet %s új fülön.</u> <br><br> Az %s-et a Dolibarr szerver fogja kiszolgálni, így nincs szüksége további webszerverre (például Apache, Nginx, IIS) a telepítéshez. <br> Kényelmetlen az, hogy az oldalak URL-je nem felhasználóbarát, és a Dolibarr útvonalával kezdődik. <br> URL szolgáltatója: Dolibarr: <br> <strong>%s</strong> <br><br> Ha saját külső webszervert szeretne használni ennek a webhelynek a kiszolgálására, hozzon létre egy virtuális gazdagépet a webkiszolgálón, amely a könyvtárba mutat <br> <strong>%s</strong> <br> majd írja be a virtuális szerver nevét, majd kattintson a másik előnézeti gombra. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=A külső webszerver által kiszolgált virtuális gazdagép URL-je nincs meghatározva NoPageYet=Még nincs oldal YouCanCreatePageOrImportTemplate=Készíthet új oldalt, vagy importálhat egy teljes webhelysablont @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/hu_HU/zapier.lang b/htdocs/langs/hu_HU/zapier.lang index 24de04023f3..70cb3185d52 100644 --- a/htdocs/langs/hu_HU/zapier.lang +++ b/htdocs/langs/hu_HU/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr modul - -# -# Admin page -# -ZapierForDolibarrSetup = Zapier for Dolibarr beállítása +ZapierForDolibarrSetup=Zapier for Dolibarr beállítása ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/id_ID/accountancy.lang b/htdocs/langs/id_ID/accountancy.lang index f8548a63d79..8f2c1104d2a 100644 --- a/htdocs/langs/id_ID/accountancy.lang +++ b/htdocs/langs/id_ID/accountancy.lang @@ -16,18 +16,18 @@ ThisService=Layanan ini ThisProduct=Produk ini DefaultForService=Standar untuk Layanan DefaultForProduct=Standar untuk Produk -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty +ProductForThisThirdparty=Produk untuk pihak ketiga ini +ServiceForThisThirdparty=Layanan untuk pihak ketiga ini CantSuggest=Tidak bisa menyarankan AccountancySetupDoneFromAccountancyMenu=Kebanyakan aturan akutansi dilakukan dari bilah menu %s -ConfigAccountingExpert=Configuration of the module accounting (double entry) +ConfigAccountingExpert=Konfigurasi akuntansi modul (entri ganda) Journalization=Pencatatan Jurnal Journals=Jurnal JournalFinancial=Jurnal Keuangan BackToChartofaccounts=Akun grafik pembalik Chartofaccounts=Tabel Akun -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfSubaccounts=Bagan akun individu +ChartOfIndividualAccountsOfSubsidiaryLedger=Bagan akun individu dari buku besar pembantu CurrentDedicatedAccountingAccount=Akun sekarang yang dipakai AssignDedicatedAccountingAccount=Akun baru untuk ditambahkan InvoiceLabel=Label Tagihan @@ -37,8 +37,8 @@ OtherInfo=Informasi lain DeleteCptCategory=Hilangkan akun akutansi dari grup ConfirmDeleteCptCategory=Apakah Anda yakin untuk menghilangkan akun akutansi ini dari grup akun akutansi? JournalizationInLedgerStatus=Status Pencatatan Jurnal -AlreadyInGeneralLedger=Already transferred in accounting journals and ledger -NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger +AlreadyInGeneralLedger=Sudah ditransfer dalam jurnal akuntansi dan buku besar +NotYetInGeneralLedger=Belum ditransfer ke jurnal dan buku besar GroupIsEmptyCheckSetup=Grup kosong, periksa pengaturan grup akuntansi yang dipersonalisasi DetailByAccount=Tampilkan rincian berdasarkan akun AccountWithNonZeroValues=Akun dengan nilai bukan nol @@ -47,10 +47,10 @@ CountriesInEEC=Negara di EEC CountriesNotInEEC=Negara bukan di EEC CountriesInEECExceptMe=Negara di EEC kecuali %s CountriesExceptMe=Semua negara kecuali %s -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 -VueBySubAccountAccounting=View by accounting subaccount +AccountantFiles=Ekspor dokumen sumber +ExportAccountingSourceDocHelp=Dengan alat ini, Anda dapat mengekspor agenda sumber (daftar dan PDF) yang digunakan untuk menghasilkan akuntansi Anda. Untuk mengekspor jurnal Anda, gunakan entri menu %s - %s. +VueByAccountAccounting=Lihat berdasarkan akun akuntansi +VueBySubAccountAccounting=Lihat menurut sub-akun akuntansi MainAccountForCustomersNotDefined=Akun akuntansi utama untuk pelanggan tidak ditentukan dalam pengaturan MainAccountForSuppliersNotDefined=Akun akuntansi utama untuk vendor tidak ditentukan dalam pengaturan @@ -86,7 +86,7 @@ AccountancyAreaDescAnalyze=LANGKAH %s: Tambahkan atau sunting transaksi yang ada AccountancyAreaDescClosePeriod=LANGKAH %s: Tutup periode sehingga kita tidak dapat melakukan modifikasi di masa mendatang. -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) +TheJournalCodeIsNotDefinedOnSomeBankAccount=Langkah wajib dalam penyiapan belum selesai (jurnal kode akuntansi tidak ditentukan untuk semua rekening bank) Selectchartofaccounts=Pilih bagan akun aktif ChangeAndLoad=Ubah dan muat Addanaccount=Tambahkan sebuah akun akuntansi @@ -96,8 +96,8 @@ SubledgerAccount=Akun sub Buku Besar SubledgerAccountLabel=Label akun sub Buku Besar ShowAccountingAccount=Tampilkan akun akuntansi ShowAccountingJournal=Tampilkan jurnal akuntansi -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=Tampilkan akun akuntansi dalam buku besar +ShowAccountingAccountInJournals=Tampilkan akun akuntansi di jurnal AccountAccountingSuggest=Akun akuntansi yang disarankan MenuDefaultAccounts=Akun standar MenuBankAccounts=Akun bank @@ -119,7 +119,7 @@ ExpenseReportsVentilation=Penjilidan laporan pengeluaran CreateMvts=Buat transaksi baru UpdateMvts=Modifikasi sebuah transaksi ValidTransaction=Validasi transaksi -WriteBookKeeping=Register transactions in accounting +WriteBookKeeping=Daftarkan transaksi dalam akuntansi Bookkeeping=Buku Besar BookkeepingSubAccount=Subledger AccountBalance=Saldo akun @@ -131,7 +131,7 @@ InvoiceLinesDone=Baris faktur terikat ExpenseReportLines=Baris laporan pengeluaran untuk dijilidkan dan diikat ExpenseReportLinesDone=Baris laporan pengeluaran terikat IntoAccount=Jilidkan baris dengan akun akuntansi -TotalForAccount=Total untuk akun akuntansi +TotalForAccount=Total akun akuntansi Ventilate=Jilidkan @@ -147,7 +147,7 @@ NotVentilatedinAccount=Tidak terikat pada akun akuntansi XLineSuccessfullyBinded=%s produk/layanan berhasil diikat ke akun akuntansi XLineFailedToBeBinded=Produk/layanan %s tidak terikat pada akun akuntansi mana pun -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Jumlah baris maksimum pada daftar dan halaman jilid (disarankan: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Mulailah menyortir halaman "Binding to do" oleh elemen-elemen terbaru ACCOUNTING_LIST_SORT_VENTILATION_DONE=Mulailah menyortir halaman "Binding done" oleh elemen-elemen terbaru @@ -159,8 +159,8 @@ 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_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTING_DATE_START_BINDING=Tentukan tanggal untuk mulai mengikat & mentransfer akuntansi. Di bawah tanggal ini, transaksi tidak akan dialihkan ke akuntansi. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=Pada transfer akuntansi, pilih periode yang ditampilkan secara default ACCOUNTING_SELL_JOURNAL=Jurnal Penjualan ACCOUNTING_PURCHASE_JOURNAL=Jurnal Pembelian @@ -180,7 +180,7 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Akun akuntansi tunggu DONATION_ACCOUNTINGACCOUNT=Akun akuntansi untuk mendaftarkan sumbangan ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Akun akuntansi untuk mendaftar langganan -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Akun akuntansi secara default untuk mendaftarkan deposit pelanggan ACCOUNTING_PRODUCT_BUY_ACCOUNT=Akun akuntansi secara default untuk produk yang dibeli (digunakan jika tidak didefinisikan dalam lembar produk) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Akun akuntansi secara default untuk produk yang dibeli di EEC (digunakan jika tidak didefinisikan dalam lembar produk) @@ -201,33 +201,33 @@ Docdate=Tanggal Docref=Referensi LabelAccount=Label Akun LabelOperation=Operasi label -Sens=Direction -AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make +Sens=Arah +AccountingDirectionHelp=Untuk akun akuntansi pelanggan, gunakan Kredit untuk mencatat pembayaran yang Anda terima <br> Untuk akun akuntansi pemasok, gunakan Debit untuk mencatat pembayaran yang Anda lakukan LetteringCode=Kode huruf Lettering=Tulisan Codejournal=Jurnal JournalLabel=Label jurnal NumPiece=Jumlah potongan TransactionNumShort=Tidak. transaksi -AccountingCategory=Grup yang dipersonalisasi -GroupByAccountAccounting=Group by general ledger account -GroupBySubAccountAccounting=Group by subledger account +AccountingCategory=Custom group +GroupByAccountAccounting=Kelompokkan menurut akun buku besar +GroupBySubAccountAccounting=Kelompokkan menurut akun subledger AccountingAccountGroupsDesc=Anda dapat mendefinisikan di sini beberapa grup akun akuntansi. Mereka akan digunakan untuk laporan akuntansi yang dipersonalisasi. ByAccounts=Dengan akun ByPredefinedAccountGroups=Oleh kelompok yang telah ditentukan ByPersonalizedAccountGroups=Oleh grup yang dipersonalisasi ByYear=Tahun NotMatch=Tidak diatur -DeleteMvt=Delete some operation lines from accounting +DeleteMvt=Hapus beberapa jalur operasi dari akuntansi DelMonth=Bulan untuk dihapus DelYear=Tahun untuk dihapus DelJournal=Jurnal untuk dihapus -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) +ConfirmDeleteMvt=Ini akan menghapus semua baris operasi akuntansi untuk tahun / bulan dan / atau untuk jurnal tertentu (Setidaknya satu kriteria diperlukan). Anda harus menggunakan kembali fitur '%s' agar catatan yang dihapus kembali ke buku besar. +ConfirmDeleteMvtPartial=Ini akan menghapus transaksi dari akunting (semua jalur operasi yang terkait dengan transaksi yang sama akan dihapus) FinanceJournal=Finance journal ExpenseReportsJournal=Jurnal biaya laporan 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 Journals and Ledger. +DescJournalOnlyBindedVisible=Ini adalah tampilan catatan yang terikat ke akun akuntansi dan dapat dicatat ke dalam Jurnal dan Buku Besar. VATAccountNotDefined=Akun untuk PPN tidak ditentukan ThirdpartyAccountNotDefined=Akun untuk pihak ketiga tidak ditentukan ProductAccountNotDefined=Akun untuk produk tidak ditentukan @@ -253,7 +253,7 @@ PaymentsNotLinkedToProduct=Pembayaran tidak terkait dengan produk / layanan apa OpeningBalance=Saldo awal ShowOpeningBalance=Tampilkan saldo awal HideOpeningBalance=Sembunyikan saldo awal -ShowSubtotalByGroup=Show subtotal by level +ShowSubtotalByGroup=Tunjukkan subtotal menurut level Pcgtype=Grup akun PcgtypeDesc=Grup akun digunakan sebagai kriteria 'filter' dan 'pengelompokan' yang telah ditentukan sebelumnya untuk beberapa laporan akuntansi. Misalnya, 'PENGHASILAN' atau 'BEBAN' digunakan sebagai grup untuk akun akuntansi produk untuk membangun laporan pengeluaran / pendapatan. @@ -276,11 +276,11 @@ DescVentilExpenseReport=Konsultasikan di sini daftar garis laporan pengeluaran y DescVentilExpenseReportMore=Jika Anda mengatur akun akuntansi pada jenis garis laporan pengeluaran, aplikasi akan dapat membuat semua ikatan antara garis laporan pengeluaran Anda dan akun akuntansi dari bagan akun Anda, cukup dengan satu klik dengan tombol<strong>"%s" </strong>. Jika akun tidak ditetapkan pada kamus biaya atau jika Anda masih memiliki beberapa baris yang tidak terikat pada akun apa pun, Anda harus membuat manual yang mengikat dari menu "<strong> %s </strong>". DescVentilDoneExpenseReport=Konsultasikan di sini daftar garis laporan pengeluaran dan akun akuntansi biayanya -Closure=Annual closure +Closure=Penutupan tahunan DescClosure=Konsultasikan di sini jumlah gerakan berdasarkan bulan yang tidak divalidasi & tahun fiskal sudah terbuka OverviewOfMovementsNotValidated=Langkah 1 / Ikhtisar gerakan yang tidak divalidasi. (Diperlukan untuk menutup tahun fiskal) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated +AllMovementsWereRecordedAsValidated=Semua pergerakan dicatat sebagai divalidasi +NotAllMovementsCouldBeRecordedAsValidated=Tidak semua pergerakan dapat direkam sebagai divalidasi ValidateMovements=Validasi gerakan DescValidateMovements=Setiap modifikasi atau penghapusan tulisan, huruf dan penghapusan akan dilarang. Semua entri untuk latihan harus divalidasi jika tidak, penutupan tidak akan mungkin @@ -300,10 +300,10 @@ Accounted=Disumbang dalam buku besar NotYetAccounted=Belum diperhitungkan dalam buku besar ShowTutorial=Perlihatkan Tutorial NotReconciled=Tidak didamaikan -WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view +WarningRecordWithoutSubledgerAreExcluded=Peringatan, semua operasi tanpa akun subledger ditentukan disaring dan dikecualikan dari tampilan ini ## Admin -BindingOptions=Binding options +BindingOptions=Opsi mengikat ApplyMassCategories=Terapkan kategori secara massal AddAccountFromBookKeepingWithNoCategories=Akun yang tersedia belum dalam grup yang dipersonalisasi CategoryDeleted=Kategori untuk akun akuntansi telah dihapus @@ -323,9 +323,9 @@ ErrorAccountingJournalIsAlreadyUse=Jurnal ini sudah digunakan AccountingAccountForSalesTaxAreDefinedInto=Catatan: Akun akuntansi untuk Pajak penjualan didefinisikan ke dalam menu<b>%s</b>-<b>%s </b> NumberOfAccountancyEntries=Jumlah entri NumberOfAccountancyMovements=Jumlah gerakan -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) +ACCOUNTING_DISABLE_BINDING_ON_SALES=Nonaktifkan pengikatan & transfer akuntansi pada penjualan (faktur pelanggan tidak akan diperhitungkan dalam akuntansi) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Nonaktifkan pengikatan & transfer akuntansi pada pembelian (faktur vendor tidak akan diperhitungkan dalam akuntansi) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Nonaktifkan pengikatan & transfer akuntansi pada laporan pengeluaran (laporan pengeluaran tidak akan diperhitungkan dalam akuntansi) ## Export ExportDraftJournal=Ekspor draft jurnal @@ -345,11 +345,11 @@ Modelcsv_LDCompta10=Ekspor untuk LD Compta (v10 & lebih tinggi) Modelcsv_openconcerto=Ekspor untuk OpenConcerto (Uji) Modelcsv_configurable=Ekspor CSV Dapat Dikonfigurasi Modelcsv_FEC=Ekspor FEC -Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) +Modelcsv_FEC2=Ekspor FEC (Dengan penulisan tanggal / dokumen dibalik) Modelcsv_Sage50_Swiss=Ekspor untuk Sage 50 Swiss Modelcsv_winfic=Ekspor Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Ekspor untuk Gestinum (v3) +Modelcsv_Gestinumv5Export untuk Gestinum (v5) ChartofaccountsId=Bagan akun Id ## Tools - Init accounting account on product / service @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Baris belum terikat, gunakan menu <a href="%s"> %s </ ## Import ImportAccountingEntries=Entri akuntansi +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Tanggal ekspor WarningReportNotReliable=Peringatan, laporan ini tidak didasarkan pada Buku Besar, jadi tidak mengandung transaksi yang dimodifikasi secara manual di Buku Besar. Jika jurnal Anda sudah mutakhir, tampilan pembukuan lebih akurat. ExpenseReportJournal=Jurnal Laporan Biaya InventoryJournal=Jurnal Persediaan + +NAccounts=%s accounts diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index 6053f1fcc05..91c88376980 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Hapuskan penguncian koneksi. YourSession=Sesi Anda Sessions=Sesi Pengguna WebUserGroup=Server web pengguna / grup +PermissionsOnFiles=Izin pada file PermissionsOnFilesInWebRoot=Izin pada file di direktori root web PermissionsOnFile=Izin pada file %s NoSessionFound=Konfigurasi PHP Anda tampaknya tidak diizinkan untuk membuat daftar untuk sesi yang aktif. Direktori yang digunakan untuk menyimpan sesi (<b>%s</b>) mungkin dilindungi (misalnya pengaturan izin OS atau oleh pengaturan direktif PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Catatan: Ya akan hanya efektif ketika modul <b>%s</b> diaktifkan RemoveLock=Hapus / ganti nama berkas <b>%s</b> jika sudah ada, untuk memperbolehkan pemakaian alat Perbarui / Instal. RestoreLock=Pulihkan berkas <b>%s</b>, dengan izin baca saja, untuk menonaktifkan pemakaian alat Pembaruan / Instal lebih lanjut. SecuritySetup=Pengaturan Keamanan +PHPSetup=Pengaturan PHP SecurityFilesDesc=Tetapkan di sini untuk opsi yang terkait dengan keamanan tentang mengunggah berkas. ErrorModuleRequirePHPVersion=Kesalahan, modul ini membutuhkan versi PHP %s atau lebih tinggi ErrorModuleRequireDolibarrVersion=Kesalahan, modul ini membutuhkan versi Dolibarr %s atau lebih tinggi @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Area ini menyediakan fungsi administrasi. Gunakan menu untuk Purge=Perbersihan PurgeAreaDesc=Halaman ini memungkinkan Anda untuk menghapus semua file yang dihasilkan atau disimpan oleh Dolibarr (file sementara atau semua file di<b>%s</b>direktori). Menggunakan fitur ini biasanya tidak diperlukan. Ini disediakan sebagai solusi untuk pengguna yang Dolibarr di-host oleh penyedia yang tidak menawarkan izin untuk menghapus file yang dihasilkan oleh server web. PurgeDeleteLogFile=Hapus file log, termasuk<b>%s</b>didefinisikan untuk modul Syslog (tidak ada risiko kehilangan data) -PurgeDeleteTemporaryFiles=Hapus semua log dan file sementara (tidak ada risiko kehilangan data). Catatan: Penghapusan file sementara dilakukan hanya jika direktori temp (sementara) dibuat lebih dari 24 jam yang lalu. +PurgeDeleteTemporaryFiles=Hapus semua log dan file sementara (tidak ada risiko kehilangan data). Parameter dapat berupa 'tempfilesold', 'logfiles' atau keduanya 'tempfilesold + logfiles'. Catatan: Penghapusan file sementara dilakukan hanya jika direktori temp dibuat lebih dari 24 jam yang lalu. PurgeDeleteTemporaryFilesShort=Hapus log dan file sementara PurgeDeleteAllFilesInDocumentsDir=Hapus semua file dalam direktori:<b>%s </b>. <br> Ini akan menghapus semua dokumen yang dihasilkan terkait dengan elemen (pihak ketiga, faktur dll ...), file yang diunggah ke dalam modul ECM, kesedihan cadangan database dan file sementara. PurgeRunNow=Bersihkan sekarang @@ -232,6 +234,7 @@ BoxesAvailable=Widget tersedia BoxesActivated=Widget diaktifkan ActivateOn=Aktifkan aktif ActiveOn=Diaktifkan pada +ActivatableOn=Dapat diaktifkan pada SourceFile=Berkas sumber AvailableOnlyIfJavascriptAndAjaxNotDisabled=Hanya tersedia jika JavaScript tidak dinonaktifkan Required=Diperlukan @@ -347,9 +350,10 @@ LastActivationAuthor=Penulis aktivasi terbaru LastActivationIP=IP aktivasi terbaru UpdateServerOffline=Perbarui server offline WithCounter=Kelola penghitung -GenericMaskCodes=Anda dapat memasukkan topeng penomoran apa saja. Dalam topeng ini, tag berikut dapat digunakan: <br><b>{000000}</b>sesuai dengan nomor yang akan ditambahkan pada setiap %s. Masukkan angka nol sebanyak panjang penghitung yang diinginkan. Penghitung akan diisi oleh nol dari kiri untuk memiliki nol sebanyak topeng. <br><b>{000000 + 000}</b>sama seperti sebelumnya tetapi offset yang sesuai dengan angka di sebelah kanan tanda + diterapkan mulai %s pertama. <br><b>{000000 @ x}</b>sama seperti sebelumnya tetapi penghitung diatur ulang ke nol ketika bulan x tercapai (x antara 1 dan 12, atau 0 untuk menggunakan bulan-bulan awal tahun fiskal yang ditentukan dalam konfigurasi Anda, atau 99 untuk mengatur ulang agar nol setiap bulan). Jika opsi ini digunakan dan x adalah 2 atau lebih tinggi, maka urutan {yy} {mm} atau {yyyy} {mm} juga diperlukan. <br><b>{dd}</b>hari (01 hingga 31). <br><b>{mm}</b>bulan (01 hingga 12). <br><b>{yy} </b>,<b>{yyyy}</b>atau<b>{y} a09afb7fb7f7fbf07fbf07fbf0f0fbf0f0f0f0f0f0f0f0f0f0f0f0f0f00f0f0f0f0f0f0f00f0f07f0f07f0f07f3f0f07fb0f0f07fbf07fbf07fbf07fb0fb0f0f07f4f0f07 <br> -GenericMaskCodes2=<b>{cccc}</b>kode klien pada n karakter <br><b>{cccc000} a09a4b739 aa pelanggan diikutkan dengan pelanggan pada kode pelanggan. Penghitung yang didedikasikan untuk pelanggan ini disetel ulang bersamaan dengan penghitung global. <br><b>{tttt}</b>Kode tipe pihak ketiga pada n karakter (lihat menu Beranda - Pengaturan - Kamus - Jenis pihak ketiga). Jika Anda menambahkan tag ini, penghitung akan berbeda untuk setiap jenis pihak ketiga. <br> -GenericMaskCodes3=Semua karakter lain di topeng akan tetap utuh. <br> Spasi tidak diperbolehkan. <br> +GenericMaskCodes=Anda dapat memasukkan topeng penomoran apa pun. Dalam topeng ini, tag berikut dapat digunakan: <br> <b> {000000} </b> sesuai dengan angka yang akan bertambah pada setiap %s. Masukkan angka nol sebanyak panjang penghitung yang diinginkan. Penghitung akan diselesaikan dengan angka nol dari kiri untuk mendapatkan angka nol sebanyak topeng. <br> <b> {000000 + 000} </b> sama dengan yang sebelumnya tetapi offset yang sesuai dengan nomor di sebelah kanan tanda + diterapkan mulai dari %s pertama. <br> <b> {000000 @ x} </b> sama dengan yang sebelumnya tetapi penghitung disetel ulang ke nol saat bulan x tercapai (x antara 1 dan 12, atau 0 untuk menggunakan bulan-bulan awal tahun fiskal yang ditentukan dalam konfigurasi Anda, atau 99 hingga reset ke nol setiap bulan). Jika opsi ini digunakan dan x adalah 2 atau lebih tinggi, maka urutan {yy} {mm} atau {yyyy} {mm} juga diperlukan. <br> <b> {dd} </b> hari (01 hingga 31). <br> <b> {mm} </b> bulan (01 hingga 12). <br> <b> {yy} </b>, <b> {yyyy} </b> atau <b> {y} a09a4b739 nomor. <br> +GenericMaskCodes2= <b> {cccc} </b> kode klien pada karakter n <br> <b> {cccc000} a09a4b739f17f17f8z0 karakter khusus untuk klien yang dikhususkan untuk klien. Penghitung yang didedikasikan untuk pelanggan ini disetel ulang pada waktu yang sama dengan penghitung global. <br> <b> {tttt} </b> Kode jenis pihak ketiga pada n karakter (lihat menu Home - Setup - Dictionary - Jenis pihak ketiga). Jika Anda menambahkan tag ini, penghitung akan berbeda untuk setiap jenis pihak ketiga. <br> +GenericMaskCodes3=Semua karakter lain di topeng akan tetap utuh. <br> Spasi tidak dibolehkan. <br> +GenericMaskCodes3EAN=Semua karakter lain di topeng akan tetap utuh (kecuali * atau? Di posisi 13 di EAN13). <br> Spasi tidak dibolehkan. <br> Dalam EAN13, karakter terakhir setelah last} di posisi ke-13 harus * atau? . Ini akan diganti dengan kunci yang dihitung. <br> GenericMaskCodes4a= <u> Contoh pada ke-99 %s dari pihak ketiga TheCompany, dengan tanggal 2007-01-31: </u> <br> GenericMaskCodes4b= <u> Contoh pihak ketiga dibuat pada 2007-03-01: </u> <br> GenericMaskCodes4c= <u> Contoh pada produk yang dibuat pada 2007-03-01: </u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Membiarkan baris ini kosong berarti nilai ini akan d ExtrafieldParamHelpselect=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0') <br> <br> misalnya: <br> 1, nilai1<br>2, nilai2 a0342fccfda0b3f0f0f0fb0f0f0fb03 daftar tergantung pada daftar atribut pelengkap lain: <br> 1, nilai1 | options_ <i> parent_list_code </i>: parent_key<br>2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> dalam rangka untuk memiliki daftar tergantung pada daftar lain: <br> 1, nilai1 | <i> parent_list_code </i>: parent_key<br>2, value2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0') <br> <br> misalnya: <br> 1, value1<br>2, value2 a0342fccfda2b3f0f3f0f3f ExtrafieldParamHelpradio=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0') <br> <br> misalnya: <br> 1, value1<br>2, value2 a0342fccfda2b3f0f3f0f3f -ExtrafieldParamHelpsellist=Daftar nilai berasal dari tabel <br> Sintaks: nama_tabel: label_field: id_field :: filter <br> Contoh: c_typent: libelle: id :: filter <br> <br> - id_field adalah kunci utama = 1) untuk menampilkan hanya nilai aktif <br> Anda juga dapat menggunakan $ ID $ in filter yang merupakan id saat ini dari objek <br> Untuk menggunakan SELECT ke dalam filter, gunakan kata kunci $ SEL $ untuk melewati perlindungan anti-injeksi. <br> jika Anda ingin memfilter extrafields gunakan sintaks extra.fieldcode = ... (di mana kode field adalah kode dari extrafield) <br> <br> Untuk memiliki daftar tergantung pada daftar atribut pelengkap lainnya: <br> c_typ: libelle: id19bz0 <i> parent_list_code </i> | parent_column: filter <br> <br> Untuk memiliki daftar yang bergantung pada daftar lain: <br> c_typent: libelle: id_col33_list: parentkolom -ExtrafieldParamHelpchkbxlst=Daftar nilai berasal dari tabel<br>Sintaks: table_name: label_field: id_field :: filter<br>Contoh: c_typent: libelle: id :: filter <br> <br> filter a hanya dapat ditampilkan sebagai contoh a juga dapat menggunakan $ ID $ dalam penyihir filter adalah id saat ini dari objek saat ini<br>Untuk melakukan SELECT dalam menggunakan $ SEL $ <br> jika Anda ingin memfilter pada extrafields gunakan sintaks extra.fieldcode = ... (di mana kode baris adalah kode extrafield) <br> <br> dalam rangka untuk memiliki daftar tergantung pada daftar atribut pelengkap lain: <br> c_typent: Libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> dalam rangka untuk memiliki daftar tergantung pada daftar lain: c_typent <br>: libelle: id: <i> parent_list_code </i> | parent_column: filter +ExtrafieldParamHelpsellist=Daftar nilai berasal dari tabel <br> Sintaks: nama_tabel: label_field: id_field :: filtersql <br> Contoh: c_typent: libelle: id :: filterql <br> a0342fccfccfda19bz0 - id_342 adalah kondisi kunci SQL. Ini bisa menjadi tes sederhana (misalnya aktif = 1) untuk menampilkan hanya nilai aktif <br> Anda juga dapat menggunakan $ ID $ in filter yang merupakan id saat ini dari objek saat ini <br> Untuk menggunakan SELECT ke dalam filter, gunakan kata kunci $ SEL $ to melewati perlindungan anti injeksi. <br> jika Anda ingin memfilter extrafields gunakan sintaks extra.fieldcode = ... (di mana kode field adalah kode extrafield) <br> <br> Untuk memiliki daftar bergantung pada daftar atribut pelengkap lainnya: <br> c_typ <i> parent_list_code </i> | parent_column: filter <br> <br> Agar daftar bergantung pada daftar lain: <br> c_typent: libelle +ExtrafieldParamHelpchkbxlst=Daftar nilai berasal dari tabel <br> Sintaks: table_name:label_field:id_field::filtersql <br> Contoh: c_typent:libelle:id::filtersql <br> nilai aktif hanya dapat menguji (co active=1) juga dapat menggunakan $ ID $ di filter witch adalah id saat ini dari objek saat ini <br> Untuk melakukan SELECT di filter gunakan $ SEL $ <br> jika Anda ingin memfilter extrafields gunakan sintaks extra.fieldcode = ... (di mana kode bidang adalah kode extrafield) <br> <br> dalam rangka untuk memiliki daftar tergantung pada daftar atribut pelengkap lain: <br> c_typent: Libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> dalam rangka untuk memiliki daftar tergantung pada daftar lain: c_typent <br><br>untuk memiliki daftar tergantung pada daftar lain:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameter harus ObjectName: Classpath <br> Sintaks: ObjectName: Classpath ExtrafieldParamHelpSeparator=Biarkan kosong untuk pemisah sederhana<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendor Module40Desc=Vendor dan manajemen pembelian (pesanan pembelian dan penagihan faktur pemasok) Module42Name=Debug Log Module42Desc=Fasilitas pencatatan (file, syslog, ...). Log semacam itu untuk tujuan teknis / debug. +Module43Name=Bilah Debug +Module43Desc=Alat untuk pengembang yang menambahkan bilah debug di browser Anda. Module49Name=Editor Module49Desc=Manajemen editor Module50Name=Produk @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind kemampuan konversi Module3200Name=Arsip yang Tidak Dapat Diubah Module3200Desc=Aktifkan log peristiwa bisnis yang tidak dapat diubah. Perihal diarsipkan secara waktu nyata. Log adalah tabel read-only peristiwa dirantai yang dapat diekspor. Modul ini mungkin wajib untuk beberapa negara. +Module3400Name=Jaringan sosial +Module3400Desc=Aktifkan bidang Jaringan Sosial ke pihak ketiga dan alamat (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Manajemen sumber daya manusia (manajemen departemen, kontrak dan perasaan karyawan) Module5000Name=Multi-perusahaan Module5000Desc=Memungkinkan Anda mengelola banyak perusahaan -Module6000Name=Alur kerja -Module6000Desc=Manajemen alur kerja (pembuatan objek dan / atau perubahan status otomatis) +Module6000Name=Alur Kerja Antar-modul +Module6000Desc=Manajemen alur kerja antara modul yang berbeda (pembuatan objek secara otomatis dan / atau perubahan status otomatis) Module10000Name=Situs web Module10000Desc=Buat situs web (publik) dengan editor WYSIWYG. Ini adalah CMS berorientasi webmaster atau pengembang (lebih baik untuk mengetahui bahasa HTML dan CSS). Cukup atur server web Anda (Apache, Nginx, ...) untuk menunjuk ke direktori Dolibarr khusus untuk memilikinya online di internet dengan nama domain Anda sendiri. Module20000Name=Tinggalkan Manajemen Permintaan @@ -805,7 +813,8 @@ PermissionAdvanced253=Membuat / memodifikasi pengguna dan izin internal / ekster Permission254=Buat / modifikasi hanya pengguna eksternal Permission255=Merubah Kata Sandi Pengguna Lain Permission256=Hapus atau nonaktifkan pengguna lain -Permission262=Perluas akses ke semua pihak ketiga (tidak hanya pihak ketiga yang pengguna itu adalah perwakilan penjualan). <br> Tidak efektif untuk pengguna eksternal (selalu terbatas pada diri mereka sendiri untuk proposal, pesanan, faktur, kontrak, dll.). <br> Tidak efektif untuk proyek (hanya aturan tentang izin proyek, visibilitas dan masalah penugasan). +Permission262=Memperluas akses ke semua pihak ketiga DAN objek mereka (tidak hanya pihak ketiga yang pengguna sebagai perwakilan penjualannya). <br> Tidak efektif untuk pengguna eksternal (selalu terbatas pada diri mereka sendiri untuk proposal, pesanan, faktur, kontrak, dll.). <br> Tidak efektif untuk proyek (hanya aturan tentang izin proyek, visibilitas, dan masalah penugasan). +Permission263=Memperluas akses ke semua pihak ketiga TANPA objek mereka (tidak hanya pihak ketiga yang pengguna sebagai perwakilan penjualannya). <br> Tidak efektif untuk pengguna eksternal (selalu terbatas pada diri mereka sendiri untuk proposal, pesanan, faktur, kontrak, dll.). <br> Tidak efektif untuk proyek (hanya aturan tentang izin proyek, visibilitas, dan masalah penugasan). Permission271=Baca CA Permission272=Membaca Nota Permission273=Mengeluarkan Nota @@ -1175,7 +1184,8 @@ SetupDescription2=Dua bagian berikut ini wajib (dua entri pertama dalam menu Pen SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Parameter dasar yang digunakan untuk menyesuaikan perilaku default aplikasi Anda (mis. untuk fitur terkait negara). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Perangkat lunak ini adalah serangkaian banyak modul / aplikasi. Modul yang terkait dengan kebutuhan Anda harus diaktifkan dan dikonfigurasi. Entri menu akan muncul dengan aktivasi modul-modul ini. SetupDescription5=Entri menu Pengaturan lainnya mengatur parameter opsional. -LogEvents=Perihal audit keamanan +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=Tentang Dolibarr InfoBrowser=Tentang Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Menjalankan proses pemutakhiran tampaknya dipe YouMustRunCommandFromCommandLineAfterLoginToUser=Anda harus menjalankan perintah ini dari baris perintah setelah masuk ke shell dengan pengguna <b>%s</b> atau Anda harus menambahkan opsi -W di akhir baris perintah untuk memberikan kata kunci <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Fungsi SSL tidak tersedia di PHP Anda DownloadMoreSkins=Lebih banyak skin untuk diunduh -SimpleNumRefModelDesc=Mengembalikan nomor referensi dengan format %syymm-nnnn di mana yy adalah tahun, mm adalah bulan dan nnnn berurutan tanpa reset +SimpleNumRefModelDesc=Mengembalikan nomor referensi dalam format %syymm-nnnn di mana yy adalah tahun, mm adalah bulan dan nnnn adalah nomor auto-incrementing berurutan tanpa reset ShowProfIdInAddress=Tampilkan id profesional dengan alamat ShowVATIntaInAddress=Sembunyikan nomor PPN intra-Komunitas dengan alamat TranslationUncomplete=Terjemahan sebagian @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Server proxy: Nama / Alamat MAIN_PROXY_PORT=Server proxy: Port MAIN_PROXY_USER=Server proxy: Login / Pengguna MAIN_PROXY_PASS=Server proxy: Kata sandi -DefineHereComplementaryAttributes=Tetapkan di sini atribut tambahan / khusus yang ingin Anda sertakan untuk: %s +DefineHereComplementaryAttributes=Tentukan atribut tambahan / khusus yang harus ditambahkan ke: %s ExtraFields=Atribut pelengkap ExtraFieldsLines=Atribut pelengkap (garis) ExtraFieldsLinesRec=Atribut pelengkap (templat garis faktur) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Contoh: uid LDAPFilterConnection=Filter pencarian LDAPFilterConnectionExample=Contoh: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Contoh: & (objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, direktori directed) LDAPFieldLoginSambaExample=Contoh: samaccountname LDAPFieldFullname=Nama lengkap @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Perusahaan Anda telah ditetapkan untuk tidak menggunaka AccountancyCode=Kode Akuntansi AccountancyCodeSell=Akun penjualan. kode AccountancyCodeBuy=Beli akun. kode +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Kosongkan kotak centang "Buat pembayaran secara otomatis" secara default saat membuat pajak baru ##### Agenda ##### AgendaSetup=Pengaturan modul agenda dan agenda PasswordTogetVCalExport=Kunci untuk mengotorisasi tautan ekspor +SecurityKey = Security Key PastDelayVCalExport=Jangan ekspor agenda yang lebih lama dari AGENDA_USE_EVENT_TYPE=Gunakan jenis agenda (dikelola dalam Pengaturan menu -> Kamus -> Jenis agenda agenda) AGENDA_USE_EVENT_TYPE_DEFAULT=Secara otomatis mengatur nilai default ini untuk jenis agenda di agenda buat formulir @@ -1879,7 +1892,7 @@ 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=Baris ini berisi referensi untuk mengidentifikasi baris. Masukkan nilai apa pun pilihan Anda, tetapi tanpa karakter khusus. +EnterAnyCode=Bidang ini berisi referensi untuk mengidentifikasi garis. 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 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Margin bawah pada PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Tinggi untuk logo di 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 baris sebelumnya disetel ke Ya (Misalnya 'CODEGRP1 + CODEGRP2') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Beberapa varian bahasa ditemukan RemoveSpecialChars=Hapus karakter khusus COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter untuk membersihkan nilai (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Pengaturan modul Jejaring Sosial EnableFeatureFor=Aktifkan fitur untuk<strong>%s </strong> VATIsUsedIsOff=Catatan: Opsi untuk menggunakan Pajak Penjualan atau PPN telah ditetapkan ke<strong>Off </strong> 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 baris 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 hanya didukung pada bidang teks dan daftar kombo. Juga parameter URL action = create atau action = edit harus disetel 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 @@ -2049,8 +2062,11 @@ UseDebugBar=Gunakan bilah debug DEBUGBAR_LOGS_LINES_NUMBER=Jumlah baris log terakhir untuk disimpan di konsol WarningValueHigherSlowsDramaticalyOutput=Peringatan, nilai yang lebih tinggi memperlambat output yang dramatis ModuleActivated=Modul %s diaktifkan dan memperlambat antarmuka +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Jika Anda berada di lingkungan produksi, Anda harus menyetel properti ini ke %s. AntivirusEnabledOnUpload=Antivirus diaktifkan pada file yang diunggah +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Model ekspor dibagi dengan semua orang ExportSetup=Pengaturan ekspor modul ImportSetup=Pengaturan impor modul @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Buat Ping anonim '+1' ke server fondasi Dolibarr (dilakukan 1 FeatureNotAvailableWithReceptionModule=Fitur tidak tersedia ketika Penerimaan modul diaktifkan EmailTemplate=Template untuk email EMailsWillHaveMessageID=Email akan memiliki tag 'Referensi' yang cocok dengan sintaks ini +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Jika Anda ingin agar beberapa teks dalam PDF Anda digandakan dalam 2 bahasa berbeda dalam PDF yang dihasilkan sama, Anda harus mengatur di sini bahasa kedua ini sehingga PDF yang dihasilkan akan berisi 2 bahasa berbeda di halaman yang sama, yang dipilih saat membuat PDF dan yang ini ( hanya beberapa templat PDF yang mendukung ini). Biarkan kosong untuk 1 bahasa per PDF. FafaIconSocialNetworksDesc=Masukkan di sini kode ikon FontAwesome. Jika Anda tidak tahu apa itu FontAwesome, Anda dapat menggunakan fa-address-book nilai umum. FeatureNotAvailableWithReceptionModule=Fitur tidak tersedia ketika Penerimaan modul diaktifkan @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Direkomendasikan untuk mengganti nilai ini ke %s un DictionaryProductNature= Sifat produk CountryIfSpecificToOneCountry=Negara (jika khusus untuk negara tertentu) YouMayFindSecurityAdviceHere=Anda mungkin menemukan nasihat keamanan di sini -ModuleActivatedMayExposeInformation=Modul ini dapat mengekspos data sensitif. Jika Anda tidak membutuhkannya, nonaktifkan. +ModuleActivatedMayExposeInformation=Ekstensi PHP ini dapat mengekspos data sensitif. Jika Anda tidak membutuhkannya, nonaktifkan. ModuleActivatedDoNotUseInProduction=Modul yang dirancang untuk pengembangan telah diaktifkan. Jangan mengaktifkannya di lingkungan produksi. CombinationsSeparator=Karakter pemisah untuk kombinasi produk SeeLinkToOnlineDocumentation=Lihat tautan ke dokumenter online di menu atas untuk mengetahui contohnya SHOW_SUBPRODUCT_REF_IN_PDF=Jika fitur "%s" modul <b> %s </b> digunakan, tampilkan detail subproduk kit di PDF. AskThisIDToYourBank=Hubungi bank Anda untuk mendapatkan ID ini +AdvancedModeOnly=Izin hanya tersedia dalam mode izin Lanjutan +ConfFileIsReadableOrWritableByAnyUsers=File conf dapat dibaca atau ditulis oleh semua pengguna. Berikan izin kepada pengguna dan grup server web saja. +MailToSendEventOrganization=Organisasi Acara +AGENDA_EVENT_DEFAULT_STATUS=Status acara default saat membuat acara dari formulir +YouShouldDisablePHPFunctions=Anda harus menonaktifkan fungsi PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/id_ID/agenda.lang b/htdocs/langs/id_ID/agenda.lang index e3bcae405c6..069d27df0b4 100644 --- a/htdocs/langs/id_ID/agenda.lang +++ b/htdocs/langs/id_ID/agenda.lang @@ -4,7 +4,7 @@ Actions=Perihal Agenda=Agenda TMenuAgenda=Agenda Agendas=Agenda -LocalAgenda=Kalender internal +LocalAgenda=Kalender default ActionsOwnedBy=Perihal yang dimiliki oleh ActionsOwnedByShort=Pemilik AffectedTo=Ditugaskan untuk @@ -14,13 +14,13 @@ EventsNb=Jumlah kejadian ListOfActions=Daftar kejadian EventReports=Laporan agenda Location=Tempat -ToUserOfGroup=Agenda yang ditugaskan untuk setiap pengguna dalam grup +ToUserOfGroup=Event assigned to any user in the group EventOnFullDay=Perihal di sepanjang hari (s) MenuToDoActions=Semua peristiwa yang tidak lengkap MenuDoneActions=Semua agenda dihentikan MenuToDoMyActions=Perihal lengkap saya MenuDoneMyActions=Perihal saya dihentikan -ListOfEvents=Daftar agenda (kalender internal) +ListOfEvents=Daftar acara (kalender default) ActionsAskedBy=Perihal yang dilaporkan oleh ActionsToDoBy=Perihal ditugaskan untuk ActionsDoneBy=Perihal yang dilakukan oleh @@ -119,6 +119,7 @@ MRP_MO_UNVALIDATEInDolibarr=MO diatur ke konsep status MRP_MO_PRODUCEDInDolibarr=MO diproduksi MRP_MO_DELETEInDolibarr=MO dihapus MRP_MO_CANCELInDolibarr=MO dibatalkan +PAIDInDolibarr=%s paid ##### End agenda events ##### AgendaModelModule=Templat dokumen untuk agenda DateActionStart=Tanggal mulai @@ -130,7 +131,7 @@ AgendaUrlOptions4=<b>logint = %s</b>untuk membatasi output ke tindakan yang dite AgendaUrlOptionsProject=<b>project = __ PROJECT_ID__</b>untuk membatasi output ke tindakan yang terkait dengan proyek<b>__PROJECT_ID__ </b>. AgendaUrlOptionsNotAutoEvent=<b>notactiontype = systemauto</b>untuk mengecualikan agenda otomatis. AgendaUrlOptionsIncludeHolidays=<b>includeholidays = 1</b>untuk memasukkan agenda liburan. -AgendaShowBirthdayEvents=Tampilkan ulang tahun kontak +AgendaShowBirthdayEvents=Ulang tahun kontak AgendaHideBirthdayEvents=Sembunyikan ulang tahun kontak Busy=Sibuk ExportDataset_event1=Daftar agenda agenda @@ -152,6 +153,7 @@ ActionType=Jenis agenda DateActionBegin=Mulai tanggal agenda ConfirmCloneEvent=Apakah Anda yakin ingin mengkloning agenda<b>%s </b>? RepeatEvent=Ulangi agenda +OnceOnly=Once only EveryWeek=Setiap minggu EveryMonth=Setiap bulan DayOfMonth=Hari dalam sebulan @@ -165,4 +167,4 @@ 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 +BrowserPush=Browser Popup Notification diff --git a/htdocs/langs/id_ID/banks.lang b/htdocs/langs/id_ID/banks.lang index d7bdb21cbd5..cdb2c57e5cf 100644 --- a/htdocs/langs/id_ID/banks.lang +++ b/htdocs/langs/id_ID/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Mandat SEPA Anda FindYourSEPAMandate=Ini adalah mandat SEPA Anda untuk mengotorisasi perusahaan kami untuk melakukan pemesanan debit langsung ke bank Anda. Kembalikan ditandatangani (pindai dokumen yang ditandatangani) atau kirimkan melalui pos ke AutoReportLastAccountStatement=Isi kolom 'nomor rekening bank' secara otomatis dengan nomor pernyataan terakhir saat melakukan rekonsiliasi CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Warnai gerakan BankColorizeMovementDesc=Jika fungsi ini diaktifkan, Anda dapat memilih warna latar belakang spesifik untuk gerakan debit atau kredit BankColorizeMovementName1=Warna latar belakang untuk pergerakan debit BankColorizeMovementName2=Warna latar belakang untuk pergerakan kredit IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/id_ID/bills.lang b/htdocs/langs/id_ID/bills.lang index 7107c90a497..69108eb724c 100644 --- a/htdocs/langs/id_ID/bills.lang +++ b/htdocs/langs/id_ID/bills.lang @@ -52,11 +52,12 @@ Invoices=Tagihan - tagihan InvoiceLine=Baris tagihan InvoiceCustomer=Tagihan pelanggan CustomerInvoice=Tagihan pelanggan -CustomersInvoices=Semua tagihan pelanggan +CustomersInvoices=Customer invoices SupplierInvoice=Faktur vendor -SuppliersInvoices=Faktur vendor +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Faktur vendor -SupplierBills=semua tagihan untuk semua pemasok / supplier +SupplierBills=Vendor invoices Payment=Pembayaran PaymentBack=Pengembalian dana CustomerInvoicePaymentBack=Pengembalian dana @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pembayaran - pembayaran yang sudah selesai PaymentsBackAlreadyDone=Pengembalian dana sudah dilakukan PaymentRule=Aturan pembayaran PaymentMode=Tipe pembayaran +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Kartu Debit / Kredit PaymentTypePP=PayPal IdPaymentMode=Jenis Pembayaran (id) @@ -373,6 +376,7 @@ DateLastGeneration=Tanggal generasi terbaru DateLastGenerationShort=Tanggal gen terbaru. MaxPeriodNumber=Maks. jumlah pembuatan faktur NbOfGenerationDone=Jumlah pembuatan faktur sudah dilakukan +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Jumlah generasi yang dilakukan MaxGenerationReached=Jumlah generasi maksimum yang dicapai InvoiceAutoValidate=Validasi faktur secara otomatis @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Dalam 14 hari setelah akhir bulan FixAmount=Jumlah tetap - 1 baris dengan label '%s' VarAmount=Jumlah variabel (%% tot.) VarAmountOneLine=Jumlah variabel (%% tot.) - 1 baris dengan label '%s' -VarAmountAllLines=Jumlah variabel (%% tot.) - semua baris yang sama +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=transfer Bank PaymentTypeShortVIR=transfer Bank @@ -494,12 +498,16 @@ Cash=Tunai Reported=Terlambat DisabledBecausePayments=Tidak mungkin karena ada beberapa pembayaran CantRemovePaymentWithOneInvoicePaid=Tidak dapat menghapus pembayaran karena setidaknya ada satu faktur yang diklasifikasikan dibayar +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Pembayaran yang diharapkan CantRemoveConciliatedPayment=Tidak dapat menghapus pembayaran yang direkonsiliasi PayedByThisPayment=Dibayar dengan pembayaran ini ClosePaidInvoicesAutomatically=Klasifikasi secara otomatis semua standar, uang muka atau faktur pengganti sebagai "Dibayar" ketika pembayaran dilakukan seluruhnya. ClosePaidCreditNotesAutomatically=Klasifikasi secara otomatis semua catatan kredit sebagai "Dibayar" ketika pengembalian dana dilakukan seluruhnya. ClosePaidContributionsAutomatically=Klasifikasi secara otomatis semua kontribusi sosial atau fiskal sebagai "Dibayar" ketika pembayaran dilakukan seluruhnya. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Semua faktur tanpa sisa pembayaran akan ditutup secara otomatis dengan status "Dibayar". ToMakePayment=Membayar ToMakePaymentBack=Membalas @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Anda harus membuat faktur standar terlebih PDFCrabeDescription=Faktur templat PDF faktur Templat faktur lengkap (penerapan lama templat Sponge) PDFSpongeDescription=Faktur Templat PDF Faktur. Templat faktur lengkap PDFCrevetteDescription=Crevette templat PDF faktur. Templat faktur lengkap untuk faktur situasi -TerreNumRefModelDesc1=Kembalikan angka dengan format %syymm-nnnn untuk faktur standar dan %syymm-nnnn untuk nota kredit di mana yy adalah tahun, mm adalah bulan dan nnnn adalah urutan tanpa istirahat dan tanpa pengembalian ke 0 -MarsNumRefModelDesc1=Membalikkan angka dengan format %syymm-nnnn untuk faktur standar, %syymm-nnnn untuk faktur pengganti, %syymm-nnnn untuk faktur uang muka dan %syymm-nnnn untuk nota kredit dimana yy adalah tahun, mm adalah bulan dan nnnn adalah urutan tanpa jeda dan tanpa balik kembali ke 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Tagihan yang dimulai dengan $ syymm sudah ada dan tidak kompatibel dengan model urutan ini. Hapus atau ubah nama untuk mengaktifkan modul ini. -CactusNumRefModelDesc1=Kembalikan nomor dengan format %syymm-nnnn untuk faktur standar, %syymm-nnnn untuk nota kredit dan %syymm-nnnn untuk faktur uang muka di mana Anda berada di tahun, tidak ada bulan dan tidak ada bulan serta tidak ada bulan dan tidak ada bulan serta tidak ada bulan dan tidak ada bulan serta tidak ada bulan dan tidak ada kiriman. +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Alasan penutupan awal EarlyClosingComment=Catatan penutupan awal ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Kontak layanan vendor InvoiceFirstSituationAsk=Faktur situasi pertama InvoiceFirstSituationDesc=Faktur situasi<b></b> terkait dengan situasi yang terkait dengan perkembangan, misalnya perkembangan konstruksi. Setiap situasi terkait dengan faktur. InvoiceSituation=Faktur situasi +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Faktur mengikuti situasi InvoiceSituationDesc=Buat situasi baru setelah yang sudah ada SituationAmount=Jumlah faktur situasi (bersih) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Jika Anda perlu membuat faktur seperti itu sec DeleteRepeatableInvoice=Hapus faktur templat ConfirmDeleteRepeatableInvoice=Yakin ingin menghapus faktur templat? CreateOneBillByThird=Buat satu faktur per pihak ketiga (jika tidak, satu faktur per pesanan) -BillCreated=tagihan %s dibuat +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status pembuatan dokumen DoNotGenerateDoc=Jangan menghasilkan file dokumen AutogenerateDoc=Menghasilkan file dokumen secara otomatis @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Faktur pemasok dihapus UnitPriceXQtyLessDiscount=Harga satuan x Jumlah - Diskon CustomersInvoicesArea=Area penagihan pelanggan SupplierInvoicesArea=Area penagihan pemasok +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/id_ID/boxes.lang b/htdocs/langs/id_ID/boxes.lang index 9ffe9c3402a..0106417ec18 100644 --- a/htdocs/langs/id_ID/boxes.lang +++ b/htdocs/langs/id_ID/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Informasi Login BoxLastRssInfos=Informasi RSS BoxLastProducts=Produk / Layanan %s terbaru @@ -17,9 +18,13 @@ BoxLastActions=Tindakan terbaru BoxLastContracts=Kontrak terbaru BoxLastContacts=Kontak / alamat terbaru BoxLastMembers=Anggota terbaru +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Intervensi terbaru BoxCurrentAccounts=Buka saldo akun BoxTitleMemberNextBirthdays=Ulang tahun bulan ini (anggota) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Berita %s terbaru dari %s BoxTitleLastProducts=Produk / Layanan: %s terakhir dimodifikasi BoxTitleProductsAlertStock=Produk: peringatan stok @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Pengiriman pelanggan %s terbaru NoRecordedShipments=Tidak ada pengiriman pelanggan yang direkam BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Akuntansi +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/id_ID/categories.lang b/htdocs/langs/id_ID/categories.lang index d37a907add2..502485f4aca 100644 --- a/htdocs/langs/id_ID/categories.lang +++ b/htdocs/langs/id_ID/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Area label/kategori Vendor CustomersCategoriesArea=Area label/kategori Pelanggan MembersCategoriesArea=Area label/kategori Anggota ContactsCategoriesArea=Area label/kategori Kontak -AccountsCategoriesArea=Area label/kategori Akun +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Area label/kategori Proyek UsersCategoriesArea=Area label/kategori Pengguna SubCats=Sub-kategori @@ -68,14 +68,14 @@ ThisCategoryHasNoItems=Kategori ini tidak mengandung barang apa pun. CategId=Label/id kategori ParentCategory=Parent tag/category ParentCategoryLabel=Label of parent tag/category -CatSupList=List of vendors tags/categories -CatCusList=List of customers/prospects tags/categories +CatSupList=Daftar tag / kategori vendor +CatCusList=Daftar tag / kategori pelanggan / prospek CatProdList=Daftar label/kategori produk CatMemberList=Daftar label/kategori anggota CatContactList=List of contacts tags/categories CatProjectsList=List of projects tags/categories CatUsersList=List of users tags/categories -CatSupLinks=Links between vendors and tags/categories +CatSupLinks=Tautan antara vendor dan tag / kategori CatCusLinks=Tautan antara pelanggan/prospek dan label/kategori CatContactsLinks=Tautan antara kontak/alamat dan label/kategori CatProdLinks=Tautan antara produk/layanan dan label/kategori @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Tampilkan label/kategori ByDefaultInList=Secara default dalam daftar ChooseCategory=Pilih Kategori -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Gunakan atau operator untuk kategori diff --git a/htdocs/langs/id_ID/commercial.lang b/htdocs/langs/id_ID/commercial.lang index 743517f4c85..816692c1453 100644 --- a/htdocs/langs/id_ID/commercial.lang +++ b/htdocs/langs/id_ID/commercial.lang @@ -64,10 +64,11 @@ ActionAC_SHIP=Kirim pengiriman melalui surat ActionAC_SUP_ORD=Kirim pesanan pembelian melalui surat ActionAC_SUP_INV=Kirim faktur vendor melalui surat ActionAC_OTH=Lainnya -ActionAC_OTH_AUTO=Acara yang dimasukkan secara otomatis +ActionAC_OTH_AUTO=Otomatis lainnya ActionAC_MANUAL=Acara yang dimasukkan secara manual ActionAC_AUTO=Acara yang dimasukkan secara otomatis -ActionAC_OTH_AUTOShort=Mobil +ActionAC_OTH_AUTOShort=Lainnya +ActionAC_EVENTORGANIZATION=Event organization events Stats=Statistik penjualan StatusProsp=Status prospek DraftPropals=Menyusun proposal komersial diff --git a/htdocs/langs/id_ID/companies.lang b/htdocs/langs/id_ID/companies.lang index 08b96e96903..adf0a9abd4a 100644 --- a/htdocs/langs/id_ID/companies.lang +++ b/htdocs/langs/id_ID/companies.lang @@ -43,9 +43,10 @@ Individual=Privasi individu ToCreateContactWithSameName=Secara otomatis akan membuat kontak/alamat dengan informasi yang sama dengan pihak ketiga di bawah pihak ketiga. Dalam kebanyakan kasus, bahkan jika pihak ketiga Anda adalah orang fisik, membuat pihak ketiga saja sudah cukup. ParentCompany=Perusahaan utama Subsidiaries=Entitas Anak -ReportByMonth=Laporkan berdasarkan bulan -ReportByCustomers=Laporkan oleh pelanggan -ReportByQuarter=Laporkan berdasarkan kurs +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Kode peradaban RegisteredOffice=Kantor terdaftar Lastname=nama keluarga @@ -136,7 +137,7 @@ ProfId1BE=Id Prof 1 (nomor profesional) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=Nomor EORI ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) @@ -148,7 +149,7 @@ ProfId1CH=UID-Nummer ProfId2CH=- ProfId3CH=Id Prof 1 (nomor Federal) ProfId4CH=Prof Id 2 (Nomor Catatan Komersial) -ProfId5CH=EORI number +ProfId5CH=Nomor EORI ProfId6CH=- ProfId1CL=Id Prof 1 (R.U.T.) ProfId2CL=- @@ -166,20 +167,26 @@ ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=Nomor EORI ProfId6DE=- ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Nomor jaminan sosial) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (nomor perguruan tinggi) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (nomor EORI) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, APE lama) ProfId4FR=Id Prof 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (nomor EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Nomor pendaftaran ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Indo. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Indo. prof. 2 (Izin usaha) ProfId3LU=- @@ -225,13 +233,13 @@ ProfId1NL=Jumlah KVK ProfId2NL=- ProfId3NL=- ProfId4NL=Burgerservicenummer (BSN) -ProfId5NL=EORI number +ProfId5NL=Nomor EORI ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Nomor jaminan sosial) ProfId3PT=Prof Id 3 (Nomor Catatan Komersial) ProfId4PT=Prof Id 4 (Konservatori) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (nomor EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Matnmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -358,7 +366,7 @@ VATIntraCheckableOnEUSite=Periksa ID PPN intra-Komunitas di situs web Komisi Ero VATIntraManualCheck=Anda juga dapat memeriksa secara manual di situs web Komisi Eropa <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Periksa tidak mungkin. Layanan cek tidak disediakan oleh negara anggota (%s). NorProspectNorCustomer=Bukan prospek, bukan pelanggan -JuridicalStatus=Business entity type +JuridicalStatus=Jenis entitas bisnis Workforce=Workforce Staff=karyawan ProspectLevelShort=Potensi @@ -441,7 +449,7 @@ CurrentOutstandingBill=Tagihan terutang saat ini OutstandingBill=Maks. untuk tagihan luar biasa OutstandingBillReached=Maks. untuk tagihan luar biasa tercapai OrderMinAmount=Jumlah minimum untuk pesanan -MonkeyNumRefModelDesc=Kembalikan nomor dengan format %syymm-nnnn untuk kode pelanggan dan %syymm-nnnn untuk kode vendor di mana yy adalah tahun, mm adalah bulan dan nnn adalah urutan tanpa istirahat dan tidak ada pengembalian ke 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kode ini gratis. Kode ini dapat dimodifikasi kapan saja. ManagingDirectors=Nama manajer (CEO, direktur, presiden ...) MergeOriginThirdparty=Duplikat pihak ketiga (pihak ketiga yang ingin Anda hapus) diff --git a/htdocs/langs/id_ID/compta.lang b/htdocs/langs/id_ID/compta.lang index 9e62c742f29..1d7b8a7b043 100644 --- a/htdocs/langs/id_ID/compta.lang +++ b/htdocs/langs/id_ID/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=Pembelian SGST VATCollected=PPN dikumpulkan StatusToPay=Membayar SpecialExpensesArea=Area untuk semua pembayaran khusus +VATExpensesArea=Area for all TVA payments SocialContribution=Pajak sosial atau fiskal SocialContributions=Pajak sosial atau fiskal SocialContributionsDeductibles=Pajak sosial atau fiskal yang dapat dikurangkan @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Pembayaran faktur pelanggan PaymentSupplierInvoice=pembayaran faktur vendor PaymentSocialContribution=Pembayaran pajak sosial / fiskal PaymentVat=Pembayaran PPN +AutomaticCreationPayment=Automatically record the payment ListPayment=Daftar pembayaran ListOfCustomerPayments=Daftar pembayaran pelanggan ListOfSupplierPayments=Daftar pembayaran vendor @@ -104,6 +106,8 @@ LT2PaymentES=Pembayaran IRPF LT2PaymentsES=Pembayaran IRPF VATPayment=Pembayaran pajak penjualan VATPayments=Pembayaran pajak penjualan +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Pengembalian pajak penjualan NewVATPayment=Pembayaran pajak penjualan baru NewLocalTaxPayment=Pembayaran pajak %s baru @@ -134,9 +138,17 @@ NoWaitingChecks=Tidak ada cek yang menunggu setoran. DateChequeReceived=Periksa tanggal penerimaan NbOfCheques=Jumlah cek PaySocialContribution=Membayar pajak sosial / fiskal -ConfirmPaySocialContribution=Anda yakin ingin mengklasifikasikan pajak sosial atau fiskal ini sebagai yang dibayarkan? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Yakin ingin mengklasifikasikan pajak sosial atau fiskal ini sebagai dibayar? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Hapus pembayaran pajak sosial atau fiskal +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card ConfirmDeleteSocialContribution=Anda yakin ingin menghapus pembayaran pajak sosial / fiskal ini? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Pajak dan pembayaran sosial dan fiskal CalcModeVATDebt=Mode<b>%sVAT pada komitmen akuning%s </b>. CalcModeVATEngagement=Mode<b>%sVAT pada pendapatan-pengeluaran%s </b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Ini termasuk pembayaran nyata yang dilakukan pada faktur, bia RulesCADue=- Ini termasuk tagihan pelanggan apakah mereka dibayar atau tidak. <br> - Ini didasarkan pada tanggal penagihan faktur ini. <br> RulesCAIn=- Ini termasuk semua pembayaran faktur yang diterima dari pelanggan. <br> - Ini didasarkan pada tanggal pembayaran faktur ini <br> RulesCATotalSaleJournal=Ini mencakup semua jalur kredit dari jurnal Sale. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Ini termasuk catatan dalam Buku Besar Anda dengan akun akuntansi yang memiliki grup "EXPENSE" atau "INCOME" RulesResultBookkeepingPredefined=Ini termasuk catatan dalam Buku Besar Anda dengan akun akuntansi yang memiliki grup "EXPENSE" atau "INCOME" RulesResultBookkeepingPersonalized=Ini menunjukkan catatan dalam Buku Besar Anda dengan akun akuntansi<b>yang dikelompokkan berdasarkan grup yang dipersonalisasi </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Laporan pajak penjualan oleh pihak ketiga VATReportByCustomers=Laporan pajak penjualan oleh pelanggan VATReportByCustomersInInputOutputMode=Laporan oleh pelanggan PPN dikumpulkan dan dibayar VATReportByQuartersInInputOutputMode=Laporkan tarif pajak Penjualan menurut pajak yang dikumpulkan dan dibayarkan +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Laporkan pajak 2 dengan tarif LT2ReportByQuarters=Laporkan pajak 3 dengan tarif LT1ReportByQuartersES=Laporkan dengan kurs RE @@ -217,7 +231,7 @@ Pcg_subtype=Subtipe Pcg InvoiceLinesToDispatch=Jalur faktur untuk dikirim ByProductsAndServices=Berdasarkan produk dan layanan RefExt=Ref eksternal -ToCreateAPredefinedInvoice=Untuk membuat faktur templat, buat faktur standar, lalu, tanpa memvalidasinya, klik tombol "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Tautan ke pesanan Mode1=Metode 1 Mode2=Metode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Akun akuntansi khusus yang ditentukan pada kart ACCOUNTING_ACCOUNT_SUPPLIER=Akun akuntansi digunakan untuk pihak ketiga vendor ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Akun akuntansi khusus yang ditentukan pada kartu pihak ketiga akan digunakan hanya untuk akuntansi Subledger. Yang ini akan digunakan untuk Buku Besar Umum dan sebagai nilai default akuntansi Subledger jika akun akuntansi vendor khusus pada pihak ketiga tidak didefinisikan. ConfirmCloneTax=Konfirmasikan klon pajak sosial / fiskal +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Mengkloningnya untuk bulan depan SimpleReport=Laporan sederhana AddExtraReport=Laporan tambahan (tambahkan laporan pelanggan asing dan nasional) @@ -253,7 +269,8 @@ AccountingAffectation=Penugasan akuntansi LastDayTaxIsRelatedTo=Hari terakhir periode pajak terkait dengan VATDue=Pajak penjualan diklaim ClaimedForThisPeriod=Diklaim untuk periode tersebut -PaidDuringThisPeriod=Dibayar selama periode ini +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Dengan tarif pajak penjualan TurnoverbyVatrate=Omzet ditagih oleh tarif pajak penjualan TurnoverCollectedbyVatrate=Omset dikumpulkan oleh tarif pajak penjualan @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Turnover pembelian dikumpulkan RulesPurchaseTurnoverDue=- Ini termasuk faktur jatuh tempo pemasok apakah mereka dibayar atau tidak. <br> - Ini didasarkan pada tanggal faktur faktur ini. <br> RulesPurchaseTurnoverIn=- Ini mencakup semua pembayaran faktur yang dilakukan kepada pemasok secara efektif. <br> - Ini didasarkan pada tanggal pembayaran faktur ini <br> RulesPurchaseTurnoverTotalPurchaseJournal=Ini mencakup semua saluran debit dari jurnal pembelian. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Beli turnover yang ditagih ReportPurchaseTurnoverCollected=Turnover pembelian dikumpulkan IncludeVarpaysInResults = Sertakan berbagai pembayaran dalam laporan diff --git a/htdocs/langs/id_ID/cron.lang b/htdocs/langs/id_ID/cron.lang index 226c36001ea..5b2df4ba2b8 100644 --- a/htdocs/langs/id_ID/cron.lang +++ b/htdocs/langs/id_ID/cron.lang @@ -7,8 +7,8 @@ Permission23103 = Hapus pekerjaan terjadwal Permission23104 = Jalankan pekerjaan yang Dijadwalkan # Admin CronSetup=Penyiapan manajemen pekerjaan terjadwal -URLToLaunchCronJobs=URL to check and launch qualified cron jobs from a browser -OrToLaunchASpecificJob=Or to check and launch a specific job from a browser +URLToLaunchCronJobs=URL untuk memeriksa dan meluncurkan tugas cron yang memenuhi syarat dari browser +OrToLaunchASpecificJob=Atau untuk memeriksa dan meluncurkan pekerjaan tertentu dari browser KeyForCronAccess=Kunci keamanan untuk URL untuk meluncurkan pekerjaan cron FileToLaunchCronJobs=Baris perintah untuk memeriksa dan meluncurkan pekerjaan cron yang berkualitas CronExplainHowToRunUnix=Pada lingkungan Unix Anda harus menggunakan entri crontab berikut untuk menjalankan baris perintah setiap 5 menit @@ -58,7 +58,7 @@ CronNote=Komentar CronFieldMandatory=Bidang %s wajib diisi CronErrEndDateStartDt=Tanggal akhir tidak boleh sebelum tanggal mulai StatusAtInstall=Status pada pemasangan modul -CronStatusActiveBtn=Schedule +CronStatusActiveBtn=Susunan acara CronStatusInactiveBtn=Nonaktifkan CronTaskInactive=Pekerjaan ini dinonaktifkan CronId=Indo diff --git a/htdocs/langs/id_ID/dict.lang b/htdocs/langs/id_ID/dict.lang index 041ea709e95..898b5877893 100644 --- a/htdocs/langs/id_ID/dict.lang +++ b/htdocs/langs/id_ID/dict.lang @@ -21,7 +21,7 @@ CountryNL=Belanda CountryHU=Hungaria CountryRU=Rusia CountrySE=Swedia -CountryCI=Pantai Ivoiry +CountryCI=pantai Gading CountrySN=Senegal CountryAR=Argentina CountryCM=Kamerun diff --git a/htdocs/langs/id_ID/ecm.lang b/htdocs/langs/id_ID/ecm.lang index 3702ead5f33..22be2855e7b 100644 --- a/htdocs/langs/id_ID/ecm.lang +++ b/htdocs/langs/id_ID/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File belum diindeks ke dalam basis data (coba unggah ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index 73af84cd831..17842a411a5 100644 --- a/htdocs/langs/id_ID/errors.lang +++ b/htdocs/langs/id_ID/errors.lang @@ -8,7 +8,7 @@ ErrorBadEMail=Email %s salah ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url %s salah ErrorBadValueForParamNotAString=Nilai buruk untuk parameter Anda. Biasanya ditambahkan ketika terjemahan tidak ada. -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorRefAlreadyExists=Referensi <b> %s </b> sudah ada. ErrorLoginAlreadyExists=Login %s sudah ada. ErrorGroupAlreadyExists=Grup %s sudah ada. ErrorRecordNotFound=Rekaman tidak ditemukan. @@ -59,6 +59,7 @@ ErrorDirNotFound=Direktori<b>%s</b>tidak ditemukan (Jalur salah, izin salah, ata ErrorFunctionNotAvailableInPHP=Fungsi<b>%s</b>diperlukan untuk fitur ini tetapi tidak tersedia dalam versi / pengaturan PHP ini. ErrorDirAlreadyExists=Direktori dengan nama ini sudah ada. ErrorFileAlreadyExists=File dengan nama ini sudah ada. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File tidak diterima sepenuhnya oleh server. ErrorNoTmpDir=Directy directy %s tidak ada. ErrorUploadBlockedByAddon=Unggah diblokir oleh plugin PHP / Apache. @@ -78,7 +79,7 @@ ErrorExportDuplicateProfil=Nama profil ini sudah ada untuk set ekspor ini. ErrorLDAPSetupNotComplete=Pencocokan Dolibarr-LDAP tidak lengkap. ErrorLDAPMakeManualTest=File .ldif telah dibuat di direktori %s. Cobalah memuatnya secara manual dari baris perintah untuk mendapatkan informasi lebih lanjut tentang kesalahan. ErrorCantSaveADoneUserWithZeroPercentage=Tidak dapat menyimpan tindakan dengan "status tidak dimulai" jika bidang "dilakukan oleh" juga diisi. -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorRefAlreadyExists=Referensi <b> %s </b> sudah ada. ErrorPleaseTypeBankTransactionReportName=Masukkan nama laporan bank tempat entri harus dilaporkan (Format YYYYMM atau YYYYMMDD) ErrorRecordHasChildren=Gagal menghapus catatan karena memiliki beberapa catatan anak. ErrorRecordHasAtLeastOneChildOfType=Objek memiliki setidaknya satu anak tipe %s @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Kesalahan saat memuat bagan akun. Jika beberapa akun tidak ErrorBadSyntaxForParamKeyForContent=Sintaks buruk untuk parameter keyforcontent Harus memiliki nilai yang dimulai dengan %s atau %s ErrorVariableKeyForContentMustBeSet=Kesalahan, konstanta dengan nama %s (dengan konten teks untuk ditampilkan) atau %s (dengan url eksternal untuk ditampilkan) harus disetel. ErrorURLMustStartWithHttp=URL %s harus dimulai dengan http: // atau https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Kesalahan, referensi baru sudah digunakan ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Kesalahan, menghapus pembayaran yang ditautkan ke faktur tertutup tidak dimungkinkan. ErrorSearchCriteriaTooSmall=Kriteria pencarian terlalu kecil. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Parameter PHP Anda upload_max_filesize (%s) lebih tinggi dari parameter PHP post_max_size (%s). Ini bukan pengaturan yang konsisten. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/id_ID/externalsite.lang b/htdocs/langs/id_ID/externalsite.lang index b01b1beeb95..8834275846a 100644 --- a/htdocs/langs/id_ID/externalsite.lang +++ b/htdocs/langs/id_ID/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Atur tautan ke situs web eksternal -ExternalSiteURL=URL Situs Eksternal +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite tidak dikonfigurasi dengan benar. ExampleMyMenuEntry=Entri menu saya diff --git a/htdocs/langs/id_ID/ftp.lang b/htdocs/langs/id_ID/ftp.lang index f55fc1107e8..97fdf0fefce 100644 --- a/htdocs/langs/id_ID/ftp.lang +++ b/htdocs/langs/id_ID/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Penyiapan modul Klien FTP -NewFTPClient=Pengaturan koneksi FTP baru -FTPArea=Area FTP -FTPAreaDesc=Layar ini menunjukkan tampilan server FTP. -SetupOfFTPClientModuleNotComplete=Pengaturan modul klien FTP tampaknya tidak lengkap -FTPFeatureNotSupportedByYourPHP=PHP Anda tidak mendukung fungsi FTP -FailedToConnectToFTPServer=Gagal terhubung ke server FTP (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Gagal masuk ke server FTP dengan login / kata sandi yang ditentukan +FTPClientSetup=Penyiapan modul Klien FTP atau SFTP +NewFTPClient=Pengaturan koneksi FTP / FTPS baru +FTPArea=Area FTP / FTPS +FTPAreaDesc=Layar ini menunjukkan tampilan server FTP dan SFTP. +SetupOfFTPClientModuleNotComplete=Penyiapan modul klien FTP atau SFTP tampaknya tidak lengkap +FTPFeatureNotSupportedByYourPHP=PHP Anda tidak mendukung fungsi FTP atau SFTP +FailedToConnectToFTPServer=Gagal terhubung ke server (server %s, port %s) +FailedToConnectToFTPServerWithCredentials=Gagal masuk ke server dengan login / kata sandi yang ditentukan FTPFailedToRemoveFile=Gagal menghapus file<b>%s </b>. FTPFailedToRemoveDir=Gagal menghapus direktori<b>%s </b>: periksa izin dan direktori tersebut kosong. FTPPassiveMode=Mode pasif -ChooseAFTPEntryIntoMenu=Pilih situs FTP dari menu ... +ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... FailedToGetFile=Gagal mendapatkan file %s diff --git a/htdocs/langs/id_ID/holiday.lang b/htdocs/langs/id_ID/holiday.lang index 8d92bbbc9c4..2032b5791b0 100644 --- a/htdocs/langs/id_ID/holiday.lang +++ b/htdocs/langs/id_ID/holiday.lang @@ -13,7 +13,7 @@ ToReviewCP=Menunggu persetujuan ApprovedCP=Disetujui CancelCP=Dibatalkan RefuseCP=Ditolak -ValidatorCP=Penyetuju +ValidatorCP=Pemberi persetujuan ListeCP=Daftar cuti Leave=Permintaan cuti pergi LeaveId=Tinggalkan ID @@ -39,11 +39,11 @@ TitreRequestCP=Tinggalkan permintaan TypeOfLeaveId=Jenis ID cuti TypeOfLeaveCode=Jenis kode cuti TypeOfLeaveLabel=Jenis label cuti -NbUseDaysCP=Jumlah hari liburan yang dikonsumsi -NbUseDaysCPHelp=Perhitungan memperhitungkan hari yang tidak bekerja dan hari libur yang ditentukan dalam kamus. -NbUseDaysCPShort=Hari dikonsumsi -NbUseDaysCPShortInMonth=Hari dikonsumsi dalam sebulan -DayIsANonWorkingDay=%s adalah hari yang tidak bekerja +NbUseDaysCP=Jumlah hari cuti digunakan +NbUseDaysCPHelp=The calculation takes into account the non-working days and the holidays defined in the dictionary. +NbUseDaysCPShort=Days of leave +NbUseDaysCPShortInMonth=Days of leave in month +DayIsANonWorkingDay=%s is a non-working day DateStartInMonth=Tanggal mulai di bulan DateEndInMonth=Tanggal akhir dalam sebulan EditCP=Edit @@ -80,14 +80,14 @@ UserCP=Pengguna ErrorAddEventToUserCP=Terjadi kesalahan saat menambahkan cuti luar biasa. AddEventToUserOkCP=Penambahan cuti luar biasa telah selesai. MenuLogCP=Lihat perubahan log -LogCP=Log pembaruan hari liburan yang tersedia -ActionByCP=Dilakukan oleh -UserUpdateCP=Untuk pengguna +LogCP=Log dari semua pembaruan yang dibuat untuk "Saldo Cuti" +ActionByCP=diperbaharui oleh +UserUpdateCP=Diperbarui untuk PrevSoldeCP=Saldo sebelumnya NewSoldeCP=Keseimbangan baru alreadyCPexist=Permintaan cuti telah dilakukan pada periode ini. -FirstDayOfHoliday=Hari pertama liburan -LastDayOfHoliday=Hari libur terakhir +FirstDayOfHoliday=Hari awal permintaan cuti +LastDayOfHoliday=Permintaan cuti hari terakhir BoxTitleLastLeaveRequests=Permintaan cuti yang dimodifikasi %s terbaru HolidaysMonthlyUpdate=Pembaruan bulanan ManualUpdate=Pembaruan manual @@ -104,8 +104,8 @@ LEAVE_SICK=Cuti sakit LEAVE_OTHER=Cuti lainnya LEAVE_PAID_FR=Liburan berbayar ## Configuration du Module ## -LastUpdateCP=Pembaruan otomatis terbaru dari alokasi cuti -MonthOfLastMonthlyUpdate=Bulan pembaruan otomatis terbaru dari alokasi cuti +LastUpdateCP=Pembaruan otomatis terakhir dari alokasi cuti +MonthOfLastMonthlyUpdate=Month of last automatic update of leave allocation UpdateConfCPOK=Berhasil diperbarui. Module27130Name= Manajemen permintaan cuti Module27130Desc= Manajemen permintaan cuti @@ -125,8 +125,8 @@ HolidaysCanceledBody=Permintaan cuti Anda untuk %s ke %s telah dibatalkan. FollowedByACounter=1: Jenis cuti ini harus diikuti oleh penghitung. Penghitung bertambah secara manual atau otomatis dan ketika permintaan cuti divalidasi, penghitung dikurangi. <br> 0: Tidak diikuti oleh penghitung. NoLeaveWithCounterDefined=Tidak ada tipe cuti yang ditentukan yang perlu diikuti oleh penghitung GoIntoDictionaryHolidayTypes=Masuk ke<strong>Beranda - Setup - Kamus - Jenis cuti </strong> untuk mengatur berbagai jenis daun. -HolidaySetup=Pengaturan modul Liburan -HolidaysNumberingModules=Tinggalkan model penomoran permintaan +HolidaySetup=Setup of module Leave +HolidaysNumberingModules=Numbering models for leave requests TemplatePDFHolidays=Template untuk permintaan cuti PDF FreeLegalTextOnHolidays=Teks gratis di PDF WatermarkOnDraftHolidayCards=Tanda air pada permintaan cuti konsep diff --git a/htdocs/langs/id_ID/mails.lang b/htdocs/langs/id_ID/mails.lang index 6d4d3003efc..ed918cac7a5 100644 --- a/htdocs/langs/id_ID/mails.lang +++ b/htdocs/langs/id_ID/mails.lang @@ -127,12 +127,12 @@ NoEmailSentBadSenderOrRecipientEmail=Tidak ada email yang dikirim. Pengirim atau # Module Notifications Notifications=Notifikasi 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=Subscribe to a new automatic email notification (target/event) -ListOfActiveNotifications=List all active subscriptions (targets/events) for automatic email notification -ListOfNotificationsDone=List all automatic email notifications sent +NoNotificationsWillBeSent=Tidak ada pemberitahuan email otomatis yang direncanakan untuk jenis acara dan perusahaan ini +ANotificationsWillBeSent=1 notifikasi otomatis akan dikirim melalui email +SomeNotificationsWillBeSent=%s notifikasi otomatis akan dikirim melalui email +AddNewNotification=Berlangganan pemberitahuan email otomatis baru (target / acara) +ListOfActiveNotifications=Buat daftar semua langganan aktif (target / acara) untuk pemberitahuan email otomatis +ListOfNotificationsDone=Cantumkan semua pemberitahuan email otomatis yang dikirim MailSendSetupIs=Konfigurasi pengiriman email telah diatur ke '%s'. Mode ini tidak dapat digunakan untuk mengirim email masal. MailSendSetupIs2=Anda pertama-tama harus pergi, dengan akun admin, ke dalam menu %sHome - Setup - EMails%s untuk mengubah parameter<strong>'%s' </strong> untuk menggunakan mode ' %s'. Dengan mode ini, Anda dapat masuk ke pengaturan server SMTP yang disediakan oleh Penyedia Layanan Internet Anda dan menggunakan fitur kirim email dengan skala besar. MailSendSetupIs3=Jika Anda memiliki pertanyaan tentang cara mengatur server SMTP Anda, Anda dapat bertanya ke %s. diff --git a/htdocs/langs/id_ID/main.lang b/htdocs/langs/id_ID/main.lang index 92771fd72b5..fd738bd65fa 100644 --- a/htdocs/langs/id_ID/main.lang +++ b/htdocs/langs/id_ID/main.lang @@ -30,7 +30,7 @@ NoTranslation=Tanpa terjemahan Translation=Terjemahan CurrentTimeZone=TimeZone PHP (Server) EmptySearchString=Masukkan kriteria pencarian yang tidak kosong -EnterADateCriteria=Enter a date criteria +EnterADateCriteria=Masukkan kriteria tanggal NoRecordFound=Tidak ada catatan yang ditemukan NoRecordDeleted=Tidak ada catatan yang dihapus NotEnoughDataYet=Tidak cukup data @@ -87,8 +87,8 @@ FileWasNotUploaded=File dipilih untuk lampiran tetapi belum diunggah. Klik pada NbOfEntries=Jumlah entri GoToWikiHelpPage=Baca bantuan online (Diperlukan akses Internet) GoToHelpPage=Baca bantuan -DedicatedPageAvailable=There is a dedicated help page related to your current screen -HomePage=Home Page +DedicatedPageAvailable=Ada halaman bantuan khusus yang terkait dengan layar Anda saat ini +HomePage=Halaman Beranda RecordSaved=Rekam disimpan RecordDeleted=Rekam dihapus RecordGenerated=Rekaman dihasilkan @@ -159,7 +159,7 @@ RemoveLink=Hapus tautan AddToDraft=Tambahkan ke konsep Update=Membarui Close=Menutup -CloseAs=Set status to +CloseAs=Setel status ke CloseBox=Hapus widget dari dasbor Anda Confirm=Konfirmasi ConfirmSendCardByMail=Apakah Anda benar-benar ingin mengirim konten kartu ini melalui pos ke<b>%s </b>? @@ -201,7 +201,7 @@ ReOpen=Buka kembali Upload=Unggah ToLink=Link Select=Pilih -SelectAll=Select all +SelectAll=Pilih Semua Choose=Memilih Resize=Ubah ukuran ResizeOrCrop=Ubah Ukuran atau Pangkas @@ -224,7 +224,7 @@ Value=Nilai PersonalValue=Nilai pribadi NewObject=%s baru NewValue=Nilai baru -OldValue=Old value %s +OldValue=Nilai lama %s CurrentValue=Nilai sekarang Code=Kode Type=Tipe @@ -263,7 +263,7 @@ Cards=Kartu-kartu Card=Kartu Now=Sekarang HourStart=Mulai jam -Deadline=Deadline +Deadline=Tenggat waktu Date=Tanggal DateAndHour=Tanggal dan jam DateToday=Tanggal hari ini @@ -272,12 +272,13 @@ DateStart=Tanggal mulai DateEnd=Tanggal Akhir DateCreation=Tangga dibuat DateCreationShort=Creat. tanggal -IPCreation=Creation IP +IPCreation=IP Pembuatan DateModification=Tanggal modifikasi DateModificationShort=Modif. tanggal -IPModification=Modification IP +IPModification=Modifikasi IP DateLastModification=Tanggal modifikasi terbaru DateValidation=Tanggal validasi +DateSigning=Signing date DateClosing=Tanggal Penutupan DateDue=Batas waktu DateValue=Tanggal nilai @@ -329,7 +330,7 @@ Morning=Pagi Afternoon=Sore Quadri=Quadri MonthOfDay=Bulan dalam sehari -DaysOfWeek=Days of week +DaysOfWeek=Hari-hari dalam seminggu HourShort=H MinuteShort=M N Rate=Menilai @@ -361,13 +362,13 @@ UnitPriceHTCurrency=Harga satuan (tidak termasuk) (mata uang) UnitPriceTTC=Patokan harga PriceU=NAIK. PriceUHT=NAIK. (bersih) -PriceUHTCurrency=U.P (mata uang) +PriceUHTCurrency=U.P (bersih) (mata uang) PriceUTTC=NAIK. (termasuk pajak) Amount=Jumlah AmountInvoice=Jumlah tagihan AmountInvoiced=Jumlah yang ditagih -AmountInvoicedHT=Amount invoiced (excl. tax) -AmountInvoicedTTC=Amount invoiced (inc. tax) +AmountInvoicedHT=Jumlah yang ditagih (tidak termasuk pajak) +AmountInvoicedTTC=Jumlah yang ditagih (termasuk pajak) AmountPayment=Jumlah pembayaran AmountHTShort=Jumlah (tidak termasuk) AmountTTCShort=Jumlah (termasuk pajak) @@ -380,7 +381,7 @@ MulticurrencyPaymentAmount=Jumlah pembayaran, mata uang asli MulticurrencyAmountHT=Jumlah (tidak termasuk pajak), mata uang asli MulticurrencyAmountTTC=Jumlah (termasuk pajak), mata uang asli MulticurrencyAmountVAT=Pajak jumlah, mata uang asli -MulticurrencySubPrice=Amount sub price multi currency +MulticurrencySubPrice=Jumlah sub harga multi mata uang AmountLT1=Jumlah pajak 2 AmountLT2=Jumlah pajak 3 AmountLT1ES=Jumlah RE @@ -389,6 +390,8 @@ AmountTotal=Jumlah total AmountAverage=Jumlah rata-rata PriceQtyMinHT=Kuantitas harga min. (tidak termasuk pajak) PriceQtyMinHTCurrency=Kuantitas harga min. (tidak termasuk pajak) (mata uang) +PercentOfOriginalObject=Persen dari benda asli +AmountOrPercent=Jumlah atau persen Percentage=Persentase Total=Total SubTotal=Subtotal @@ -438,7 +441,7 @@ RemainToPay=Tetap membayar Module=Modul / Aplikasi Modules=Modul / Aplikasi Option=Pilihan -Filters=Filters +Filters=Filter List=Daftar FullList=Daftar lengkap FullConversation=Percakapan penuh @@ -500,7 +503,7 @@ By=Oleh From=Dari FromDate=Dari FromLocation=Dari -at=at +at=di to=untuk To=untuk and=dan @@ -523,7 +526,7 @@ Draft=Konsep Drafts=Draf StatusInterInvoiced=Faktur Validated=Divalidasi -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Divalidasi (Untuk memproduksi) Opened=Buka OpenAll=Buka semua) ClosedAll=Tertutup (Semua) @@ -656,7 +659,7 @@ SupplierPreview=Pratinjau vendor ShowCustomerPreview=Tampilkan pratinjau pelanggan ShowSupplierPreview=Tampilkan pratinjau vendor RefCustomer=Ref. pelanggan -InternalRef=Internal ref. +InternalRef=Referensi internal Currency=Mata uang InfoAdmin=Informasi untuk administrator Undo=Membuka @@ -671,14 +674,14 @@ Response=Tanggapan Priority=Prioritas SendByMail=Kirim melalui email MailSentBy=Email dikirim oleh -NotSent=Not sent +NotSent=Tidak terkirim TextUsedInTheMessageBody=Badan email SendAcknowledgementByMail=Kirim email konfirmasi SendMail=Mengirim email Email=Email NoEMail=Tidak ada email AlreadyRead=Sudah baca -NotRead=Unread +NotRead=Belum dibaca NoMobilePhone=Tidak ada ponsel Owner=Pemilik FollowingConstantsWillBeSubstituted=Konstanta berikut akan diganti dengan nilai yang sesuai. @@ -705,7 +708,7 @@ Method=metode Receive=Menerima CompleteOrNoMoreReceptionExpected=Lengkap atau tidak ada yang lebih diharapkan ExpectedValue=Nilai yang diharapkan -ExpectedQty=Expected Qty +ExpectedQty=Qty yang diharapkan PartialWoman=Sebagian TotalWoman=Total NeverReceived=Tidak pernah menerima @@ -724,7 +727,7 @@ 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 +NoFileFound=Tidak ada dokumen yang diunggah CurrentUserLanguage=Bahasa saat ini CurrentTheme=Tema saat ini CurrentMenuManager=Manajer menu saat ini @@ -895,12 +898,14 @@ Miscellaneous=Lain-lain Calendar=Kalender GroupBy=Kelompokkan oleh ... ViewFlatList=Lihat daftar datar -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +ViewAccountList=Lihat buku besar +ViewSubAccountList=Lihat buku besar sub-akun RemoveString=Hapus string '%s' SomeTranslationAreUncomplete=Beberapa bahasa yang ditawarkan mungkin hanya diterjemahkan sebagian atau mengandung kesalahan. Tolong bantu untuk memperbaiki bahasa Anda dengan mendaftar di <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/</a> untuk menambahkan perbaikan dari Anda. -DirectDownloadLink=Tautan unduhan langsung (publik / eksternal) -DirectDownloadInternalLink=Tautan unduhan langsung (perlu dicatat dan perlu izin) +DirectDownloadLink=Tautan unduhan publik +PublicDownloadLinkDesc=Hanya tautan yang diperlukan untuk mengunduh file +DirectDownloadInternalLink=Tautan unduhan pribadi +PrivateDownloadLinkDesc=Anda harus masuk dan Anda memerlukan izin untuk melihat atau mengunduh file Download=Unduh DownloadDocument=Unduh dokumen ActualizeCurrency=Perbarui kurs mata uang @@ -965,39 +970,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 +one=satu +two=dua +three=tiga +four=empat +five=lima +six=enam +seven=tujuh +eight=delapan +nine=sembilan +ten=sepuluh +eleven=sebelas +twelve=duabelas +thirteen=ketiga belas +fourteen=empat belas +fifteen=limabelas +sixteen=enambelas +seventeen=tujuh belas +eighteen=delapan belas +nineteen=sembilan belas +twenty=dua puluh +thirty=tigapuluh +forty=empat puluh +fifty=lima puluh +sixty=enam puluh +seventy=tujuh puluh +eighty=delapan puluh +ninety=sembilan puluh +hundred=ratus +thousand=ribu +million=juta +billion=milyar +trillion=triliun +quadrillion=milion lipat empat SelectMailModel=Pilih templat email SetRef=Tetapkan ref Select2ResultFoundUseArrows=Beberapa hasil ditemukan. Gunakan panah untuk memilih. @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontak SearchIntoMembers=Anggota SearchIntoUsers=Pengguna SearchIntoProductsOrServices=Produk atau layanan +SearchIntoBatch=Banyak / Serial SearchIntoProjects=Proyek SearchIntoMO=Pesanan Manufaktur SearchIntoTasks=Tugas @@ -1028,9 +1034,9 @@ SearchIntoCustomerShipments=Pengiriman pelanggan SearchIntoExpenseReports=Laporan biaya SearchIntoLeaves=Keluar SearchIntoTickets=Tiket -SearchIntoCustomerPayments=Customer payments -SearchIntoVendorPayments=Vendor payments -SearchIntoMiscPayments=Miscellaneous payments +SearchIntoCustomerPayments=Pembayaran pelanggan +SearchIntoVendorPayments=Pembayaran vendor +SearchIntoMiscPayments=Pembayaran lain-lain CommentLink=Komentar NbComments=Jumlah komentar CommentPage=Ruang komentar @@ -1049,12 +1055,13 @@ KeyboardShortcut=Pintasan keyboard AssignedTo=Ditugaskan untuk Deletedraft=Hapus konsep ConfirmMassDraftDeletion=Draft konfirmasi penghapusan massal -FileSharedViaALink=File dibagikan melalui tautan +FileSharedViaALink=File dibagikan dengan tautan publik SelectAThirdPartyFirst=Pilih pihak ketiga terlebih dahulu ... YouAreCurrentlyInSandboxMode=Anda saat ini dalam mode "sandbox" %s Inventory=Inventaris AnalyticCode=Kode analitik TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Tampilkan Lebih Banyak Info NoFilesUploadedYet=Harap unggah dokumen terlebih dahulu SeePrivateNote=Lihat catatan pribadi @@ -1098,25 +1105,27 @@ 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 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. +InformationMessage=Informasi +Used=Bekas +ASAP=Secepatnya +CREATEInDolibarr=Rekam %s dibuat +MODIFYInDolibarr=Rekam %s diubah +DELETEInDolibarr=Rekam %s dihapus +VALIDATEInDolibarr=Rekam %s divalidasi +APPROVEDInDolibarr=Rekam %s disetujui +DefaultMailModel=Model Email Default +PublicVendorName=Nama publik vendor +DateOfBirth=Tanggal lahir +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Token keamanan telah kedaluwarsa, jadi tindakan telah dibatalkan. Silahkan coba lagi. UpToDate=Up-to-date -OutOfDate=Out-of-date -EventReminder=Event Reminder -UpdateForAllLines=Update for all lines -OnHold=On hold -Civility=Civility -AffectTag=Affect Tag -ConfirmAffectTag=Bulk Tag Affect -ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? -CategTypeNotFound=No tag type found for type of records +OutOfDate=Kadaluarsa +EventReminder=Pengingat Acara +UpdateForAllLines=Perbarui untuk semua lini +OnHold=Tertahan +Civility=Kesopanan +AffectTag=Mempengaruhi Tag +ConfirmAffectTag=Pengaruh Tag Massal +ConfirmAffectTagQuestion=Yakin ingin memengaruhi tag ke %s rekaman yang dipilih()? +CategTypeNotFound=Tidak ada jenis tag yang ditemukan untuk jenis rekaman +CopiedToClipboard=Disalin ke papan klip +InformationOnLinkToContract=Jumlah ini hanyalah total dari semua garis kontrak. Tidak ada gagasan tentang waktu yang dipertimbangkan. diff --git a/htdocs/langs/id_ID/margins.lang b/htdocs/langs/id_ID/margins.lang index 0eda647eaf5..97e362f1e73 100644 --- a/htdocs/langs/id_ID/margins.lang +++ b/htdocs/langs/id_ID/margins.lang @@ -22,7 +22,7 @@ ProductService=Produk atau Layanan AllProducts=Semua produk dan layanan ChooseProduct/Service=Pilih produk atau layanan ForceBuyingPriceIfNull=Harga beli / biaya paksa untuk harga jual jika tidak ditentukan -ForceBuyingPriceIfNullDetails=Jika harga beli / biaya tidak ditentukan, dan opsi ini "ON", margin akan menjadi nol on-line (harga beli / biaya = harga jual), jika tidak ("OFF"), marge akan sama dengan standar yang disarankan. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Metode margin untuk diskon global UseDiscountAsProduct=Sebagai produk UseDiscountAsService=Sebagai layanan diff --git a/htdocs/langs/id_ID/members.lang b/htdocs/langs/id_ID/members.lang index ca769abddcb..39cec55bfa0 100644 --- a/htdocs/langs/id_ID/members.lang +++ b/htdocs/langs/id_ID/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Daftar anggota konsep (akan divalidasi) MembersListValid=Daftar anggota yang valid MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Daftar anggota yang diberhentikan MembersListQualified=Daftar anggota yang memenuhi syarat MenuMembersToValidate=Anggota konsep MenuMembersValidated=Anggota yang divalidasi +MenuMembersExcluded=Excluded members MenuMembersResiliated=Anggota yang diberhentikan MembersWithSubscriptionToReceive=Anggota dengan berlangganan untuk menerima MembersWithSubscriptionToReceiveShort=Berlangganan untuk menerima @@ -47,9 +49,12 @@ MemberStatusActiveLate=Berlangganan kedaluwarsa MemberStatusActiveLateShort=Kedaluwarsa MemberStatusPaid=Berlangganan terbaru MemberStatusPaidShort=Mutakhir +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Anggota yang diberhentikan MemberStatusResiliatedShort=Dihentikan MembersStatusToValid=Anggota konsep +MembersStatusExcluded=Excluded members MembersStatusResiliated=Anggota yang diberhentikan MemberStatusNoSubscription=Divalidasi (tidak perlu berlangganan) MemberStatusNoSubscriptionShort=Divalidasi @@ -82,6 +87,8 @@ Physical=Fisik Moral=Moral MorAndPhy=Moral and Physical Reenable=Diaktifkan kembali +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Hentikan anggota ConfirmResiliateMember=Anda yakin ingin memberhentikan anggota ini? DeleteMember=Hapus anggota @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Template email yang digunakan untu DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Template email untuk digunakan untuk mengirim email ke anggota pada rekaman langganan baru DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Template email yang akan digunakan untuk mengirim pengingat email ketika langganan hampir kedaluwarsa DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Template email yang digunakan untuk mengirim email ke anggota pada pembatalan anggota +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Mengirim Email untuk email otomatis DescADHERENT_ETIQUETTE_TYPE=Format halaman label DescADHERENT_ETIQUETTE_TEXT=Teks dicetak pada lembar alamat anggota @@ -162,6 +170,7 @@ DocForLabels=Buat lembar alamat SubscriptionPayment=Pembayaran berlangganan LastSubscriptionDate=Tanggal pembayaran berlangganan terakhir LastSubscriptionAmount=Jumlah langganan terbaru +LastMemberType=Last Member type MembersStatisticsByCountries=Statistik anggota menurut negara MembersStatisticsByState=Statistik anggota menurut negara bagian / provinsi MembersStatisticsByTown=Statistik anggota menurut kota diff --git a/htdocs/langs/id_ID/modulebuilder.lang b/htdocs/langs/id_ID/modulebuilder.lang index aeecb827d2a..e573b8011ba 100644 --- a/htdocs/langs/id_ID/modulebuilder.lang +++ b/htdocs/langs/id_ID/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Saya ingin menghasilkan beberapa dokumen dari objek IncludeDocGenerationHelp=Jika Anda mencentang ini, beberapa kode akan dibuat untuk menambahkan kotak "Hasilkan dokumen" pada catatan. ShowOnCombobox=Tunjukkan nilai ke dalam kotak kombo KeyForTooltip=Kunci untuk tooltip -CSSClass=Kelas CSS +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Tidak dapat diedit ForeignKey=Kunci asing TypeOfFieldsHelp=Jenis bidang: <br> varchar (99), ganda (24,8), real, teks, html, datetime, timestamp, integer, integer: ClassName: relativepath / to / classfile.class.php [: 1 [: filter]] ('1' berarti kita menambahkan tombol + setelah kombo untuk membuat catatan, 'filter' dapat berupa 'status = 1 DAN fk_user = __USER_ID DAN entitas IN (__SHARED_ENTITIES__)' misalnya) diff --git a/htdocs/langs/id_ID/orders.lang b/htdocs/langs/id_ID/orders.lang index 69f583b6e2c..7a89dad6b4e 100644 --- a/htdocs/langs/id_ID/orders.lang +++ b/htdocs/langs/id_ID/orders.lang @@ -16,6 +16,8 @@ ToOrder=Buat pesanan MakeOrder=Buat pesanan SupplierOrder=Pesanan pembelian SuppliersOrders=Order pembelian +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Pesanan pembelian saat ini CustomerOrder=Order penjualan CustomersOrders=Pesanan Penjualan diff --git a/htdocs/langs/id_ID/other.lang b/htdocs/langs/id_ID/other.lang index dc4e9b6e401..9e98004abe1 100644 --- a/htdocs/langs/id_ID/other.lang +++ b/htdocs/langs/id_ID/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Perusahaan dengan berbagai kegiatan (semua modul utama) CreatedBy=Dibuat oleh %s ModifiedBy=Dimodifikasi oleh %s ValidatedBy=Divalidasi oleh %s +SignedBy=Signed by %s ClosedBy=Ditutup oleh %s CreatedById=ID pengguna yang dibuat ModifiedById=ID pengguna yang membuat perubahan terbaru @@ -244,6 +245,7 @@ NewKeyIs=Ini adalah kunci baru Anda untuk login NewKeyWillBe=Kunci baru Anda untuk masuk ke perangkat lunak adalah ClickHereToGoTo=Klik di sini untuk pergi ke %s YouMustClickToChange=Namun Anda harus terlebih dahulu mengklik tautan berikut untuk memvalidasi perubahan kata sandi ini +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Jika Anda tidak meminta perubahan ini, lupakan saja email ini. Kredensial Anda tetap aman. IfAmountHigherThan=Jika jumlah lebih tinggi dari<strong>%s </strong> SourcesRepository=Repositori untuk sumber diff --git a/htdocs/langs/id_ID/productbatch.lang b/htdocs/langs/id_ID/productbatch.lang index 492da146be3..bd5348169ac 100644 --- a/htdocs/langs/id_ID/productbatch.lang +++ b/htdocs/langs/id_ID/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Gunakan lot / nomor seri -ProductStatusOnBatch=Ya (diperlukan banyak seri) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Tidak (banyak / serial tidak digunakan) -ProductStatusOnBatchShort=Ya +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Tidak Batch=Lot / Serial atleast1batchfield=Makan-menurut tanggal atau Jual-menurut tanggal atau Lot / nomor seri @@ -22,3 +24,12 @@ ProductLotSetup=Pengaturan lot modul / serial ShowCurrentStockOfLot=Tampilkan stok saat ini untuk produk / lot pasangan ShowLogOfMovementIfLot=Tampilkan log pergerakan untuk produk / lot pasangan StockDetailPerBatch=Detail stok per lot +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/id_ID/products.lang b/htdocs/langs/id_ID/products.lang index aa10df00723..86fe0893b1e 100644 --- a/htdocs/langs/id_ID/products.lang +++ b/htdocs/langs/id_ID/products.lang @@ -108,10 +108,10 @@ 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 -AssociatedProductsAbility=Enable Kits (set of several products) +AssociatedProductsAbility=Aktifkan Kit (set beberapa produk) VariantsAbility=Enable Variants (variations of products, for example color, size) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +AssociatedProducts=Kit +AssociatedProductsNumber=Jumlah produk yang menyusun kit ini ParentProductsNumber=Jumlah produk kemasan induk ParentProducts=Produk induk IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Tarif PPN (untuk vendor / produk ini) DiscountQtyMin=Diskon untuk qty ini. NoPriceDefinedForThisSupplier=Tidak ada harga / jumlah yang ditentukan untuk vendor / produk ini NoSupplierPriceDefinedForThisProduct=Tidak ada harga / qty vendor yang ditentukan untuk produk ini +PredefinedItem=Predefined item PredefinedProductsToSell=Produk yang Ditentukan sebelumnya PredefinedServicesToSell=Layanan yang Ditentukan sebelumnya PredefinedProductsAndServicesToSell=Produk / layanan yang telah ditentukan untuk dijual @@ -313,7 +314,7 @@ LastUpdated=Pembaruan terbaru CorrectlyUpdated=Diperbaharui dengan benar PropalMergePdfProductActualFile=File digunakan untuk menambahkan ke Azur PDF adalah / adalah PropalMergePdfProductChooseFile=Pilih file PDF -IncludingProductWithTag=Termasuk produk / layanan dengan tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Harga default, harga sebenarnya mungkin tergantung pada pelanggan WarningSelectOneDocument=Silakan pilih setidaknya satu dokumen DefaultUnitToShow=Satuan diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index b10e1fcca51..bf2e4cbb771 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Daftar tugas GoToListOfTimeConsumed=Buka daftar waktu yang digunakan GanttView=Lihat Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Daftar proposal komersial terkait dengan proyek ListOrdersAssociatedProject=Daftar pesanan penjualan terkait dengan proyek ListInvoicesAssociatedProject=Daftar faktur pelanggan yang terkait dengan proyek @@ -268,3 +269,7 @@ OneLinePerTask=Satu baris per tugas OneLinePerPeriod=Satu baris per periode RefTaskParent=Ref. Tugas Induk ProfitIsCalculatedWith=Keuntungan dihitung menggunakan +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/id_ID/propal.lang b/htdocs/langs/id_ID/propal.lang index c7ab7ad356c..64ab11a79d1 100644 --- a/htdocs/langs/id_ID/propal.lang +++ b/htdocs/langs/id_ID/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Kirim proposal komersial melalui surat DatePropal=Tanggal pengajuan DateEndPropal=Tanggal berakhir validitas ValidityDuration=Durasi validitas -CloseAs=Setel status ke SetAcceptedRefused=Set diterima / ditolak ErrorPropalNotFound=Propal %s tidak ditemukan AddToDraftProposals=Tambahkan ke konsep proposal @@ -60,6 +59,7 @@ ConfirmClonePropal=Yakin ingin mengkloning proposal komersial<b>%s </b>? ConfirmReOpenProp=Anda yakin ingin membuka kembali proposal komersial<b>%s </b>? ProposalsAndProposalsLines=Proposal dan jalur komersial ProposalLine=Garis proposal +ProposalLines=Proposal lines AvailabilityPeriod=Keterlambatan ketersediaan SetAvailability=Setel penundaan ketersediaan AfterOrder=setelah pesanan @@ -85,3 +85,8 @@ ProposalCustomerSignature=Penerimaan tertulis, stempel perusahaan, tanggal dan t ProposalsStatisticsSuppliers=Statistik proposal proposal vendor CaseFollowedBy=Kasus diikuti oleh SignedOnly=Hanya yang ditandatangani +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line + diff --git a/htdocs/langs/id_ID/recruitment.lang b/htdocs/langs/id_ID/recruitment.lang index 97ceb8dc169..5609f1d4027 100644 --- a/htdocs/langs/id_ID/recruitment.lang +++ b/htdocs/langs/id_ID/recruitment.lang @@ -18,59 +18,59 @@ # # Module label 'ModuleRecruitmentName' -ModuleRecruitmentName = Recruitment +ModuleRecruitmentName = Perekrutan # Module description 'ModuleRecruitmentDesc' -ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions +ModuleRecruitmentDesc = Kelola dan ikuti kampanye perekrutan untuk posisi pekerjaan baru # # Admin page # -RecruitmentSetup = Recruitment setup +RecruitmentSetup = Pengaturan perekrutan 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 +RecruitmentSetupPage = Masuk di sini pengaturan opsi utama untuk modul rekrutmen +RecruitmentArea=Area perekrutan +PublicInterfaceRecruitmentDesc=Halaman pekerjaan publik adalah URL publik untuk menunjukkan dan menjawab pekerjaan terbuka. Ada satu tautan berbeda untuk setiap pekerjaan terbuka, ditemukan di setiap catatan pekerjaan. +EnablePublicRecruitmentPages=Aktifkan halaman publik dari pekerjaan terbuka # # 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 position -PositionsToBeFilled=Job positions -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +About = Tentang +RecruitmentAbout = Tentang Rekrutmen +RecruitmentAboutPage = Rekrutmen tentang halaman +NbOfEmployeesExpected=Nb karyawan yang diharapkan +JobLabel=Label posisi pekerjaan +WorkPlace=Tempat kerja +DateExpected=Tanggal yang diharapkan +FutureManager=Manajer masa depan +ResponsibleOfRecruitement=Bertanggung jawab atas perekrutan +IfJobIsLocatedAtAPartner=Jika pekerjaan terletak di tempat mitra +PositionToBeFilled=Posisi pekerjaan +PositionsToBeFilled=Posisi pekerjaan +ListOfPositionsToBeFilled=Daftar posisi pekerjaan +NewPositionToBeFilled=Posisi pekerjaan baru -JobOfferToBeFilled=Job position 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 application -ListOfCandidatures=List of applications -RequestedRemuneration=Requested remuneration -ProposedRemuneration=Proposed remuneration -ContractProposed=Contract proposed -ContractSigned=Contract signed -ContractRefused=Contract refused -RecruitmentCandidature=Application -JobPositions=Job positions -RecruitmentCandidatures=Applications -InterviewToDo=Interview to do -AnswerCandidature=Application answer -YourCandidature=Your application -YourCandidatureAnswerMessage=Thanks you for your application.<br>... -JobClosedTextCandidateFound=The job position is closed. The position has been filled. -JobClosedTextCanceled=The job position is closed. -ExtrafieldsJobPosition=Complementary attributes (job positions) -ExtrafieldsCandidatures=Complementary attributes (job applications) -MakeOffer=Make an offer +JobOfferToBeFilled=Posisi pekerjaan yang harus diisi +ThisIsInformationOnJobPosition=Informasi posisi pekerjaan yang akan diisi +ContactForRecruitment=Kontak untuk perekrutan +EmailRecruiter=Perekrut email +ToUseAGenericEmail=Untuk menggunakan email umum. Jika tidak ditentukan, email dari penanggung jawab perekrutan akan digunakan +NewCandidature=Aplikasi baru +ListOfCandidatures=Daftar aplikasi +RequestedRemuneration=Remunerasi yang diminta +ProposedRemuneration=Remunerasi yang diusulkan +ContractProposed=Kontrak diusulkan +ContractSigned=Kontrak telah ditandatangani +ContractRefused=Kontrak ditolak +RecruitmentCandidature=Aplikasi +JobPositions=Posisi kerja +RecruitmentCandidatures=Lamaran +InterviewToDo=Wawancara untuk dilakukan +AnswerCandidature=Jawaban lamaran +YourCandidature=Lamaran Anda +YourCandidatureAnswerMessage=Terima kasih atas lamaran Anda. <br> ... +JobClosedTextCandidateFound=Posisi pekerjaan ditutup. Posisi sudah terisi. +JobClosedTextCanceled=Posisi pekerjaan ditutup. +ExtrafieldsJobPosition=Atribut pelengkap (posisi pekerjaan) +ExtrafieldsCandidatures=Atribut pelengkap (lamaran pekerjaan) +MakeOffer=Buat sebuah penawaran diff --git a/htdocs/langs/id_ID/stocks.lang b/htdocs/langs/id_ID/stocks.lang index fb71e9c978f..3c974a5f2eb 100644 --- a/htdocs/langs/id_ID/stocks.lang +++ b/htdocs/langs/id_ID/stocks.lang @@ -19,8 +19,8 @@ Stock=Persediaan Stocks=Stok MissingStocks=Stok yang hilang StockAtDate=Stok pada tanggal -StockAtDateInPast=Tanggal di saat lalu -StockAtDateInFuture=Tanggal di saat mendatang +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stok berdasarkan lot/serial LotSerial=Lot/Serial LotSerialList=Daftar lot/serial @@ -37,8 +37,8 @@ AllWarehouses=Semua gudang IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Sertakan juga konsep pesanan Location=Tempat -LocationSummary=Lokasi nama pendek -NumberOfDifferentProducts=Jumlah produk yang berbeda +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total jumlah produk LastMovement=Gerakan terbaru LastMovements=Gerakan terbaru @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Nilai gudang UserWarehouseAutoCreate=Buat gudang pengguna secara otomatis saat membuat pengguna AllowAddLimitStockByWarehouse=Kelola juga nilai untuk stok minimum dan yang diinginkan per pasangan (gudang produk) selain nilai untuk stok minimum dan yang diinginkan per produk RuleForWarehouse=Aturan untuk gudang -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Atur gudang berdasarkan pesanan Penjualan UserDefaultWarehouse=Tetapkan gudang pada Pengguna MainDefaultWarehouse=Gudang bawaan @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Stok virtual pda tanggal -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Gudang id DescWareHouse=Deskripsi gudang LieuWareHouse=Gudang lokalisasi WarehousesAndProducts=Gudang dan produk WarehousesAndProductsBatchDetail=Gudang dan produk (dengan detail per lot/serial) AverageUnitPricePMPShort=Harga rata-rata yang ditimbang -AverageUnitPricePMPDesc=Input harga rata-rata unit yang harus dibayarkan kepada pemasok untuk memasukkan produk ke dalam stok. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Harga Jual Unit EstimatedStockValueSellShort=Nilai jual EstimatedStockValueSell=Nilai jual @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Rekam transfer ReceivingForSameOrder=Tanda terima untuk pesanan ini StockMovementRecorded=Pergerakan stok tercatat @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Tingkat stok harus cukup untuk menambahkan produk/la StockMustBeEnoughForOrder=Tingkat stok harus cukup untuk menambahkan produk/layanan ke pesanan (pemeriksaan dilakukan pada stok riil saat ini ketika menambahkan garis ke dalam urutan apa pun aturan untuk perubahan stok otomatis) StockMustBeEnoughForShipment= Tingkat stok harus cukup untuk menambahkan produk/layanan ke pengiriman (pemeriksaan dilakukan pada stok riil saat ini ketika menambahkan garis ke dalam pengiriman apa pun aturan untuk perubahan stok otomatis) MovementLabel=Label gerakan -TypeMovement=Jenis gerakan +TypeMovement=Direction of movement DateMovement=Tanggal pergerakan InventoryCode=Kode pergerakan atau inventaris IsInPackage=Terkandung dalam paket @@ -183,6 +185,7 @@ inventoryCreatePermission=Buat inventaris baru inventoryReadPermission=Lihat persediaan inventoryWritePermission=Perbarui inventaris inventoryValidatePermission=Validasi inventaris +inventoryDeletePermission=Delete inventory inventoryTitle=Inventaris inventoryListTitle=Persediaan inventoryListEmpty=Tidak ada inventaris yang sedang berjalan @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock diperlukan untuk memilih lot yang aka 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Stok saat ini InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/id_ID/suppliers.lang b/htdocs/langs/id_ID/suppliers.lang index 1147eaa92c5..924dd5a2b97 100644 --- a/htdocs/langs/id_ID/suppliers.lang +++ b/htdocs/langs/id_ID/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendor SuppliersInvoice=Faktur vendor +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Tampilkan Faktur Penjual NewSupplier=Vendor baru History=Riwayat diff --git a/htdocs/langs/id_ID/ticket.lang b/htdocs/langs/id_ID/ticket.lang index 2a25919c9be..a27bcf47bcd 100644 --- a/htdocs/langs/id_ID/ticket.lang +++ b/htdocs/langs/id_ID/ticket.lang @@ -70,6 +70,8 @@ Deleted=Dihapus # Dict Type=Tipe Severity=Kerasnya +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Untuk mengirim email dari pesan tiket @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Tampilkan logo modul di antarmuka publik TicketsShowModuleLogoHelp=Aktifkan opsi ini untuk menyembunyikan modul logo di halaman-halaman antarmuka publik TicketsShowCompanyLogo=Tampilkan logo perusahaan di antarmuka publik TicketsShowCompanyLogoHelp=Aktifkan opsi ini untuk menyembunyikan logo perusahaan utama di halaman-halaman antarmuka publik -TicketsEmailAlsoSendToMainAddress=Juga kirim pemberitahuan ke alamat email utama -TicketsEmailAlsoSendToMainAddressHelp=Aktifkan opsi ini untuk mengirim email ke alamat "Email pemberitahuan dari" (lihat penyiapan di bawah) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Batasi tampilan untuk tiket yang ditetapkan untuk pengguna saat ini (tidak berlaku untuk pengguna eksternal, selalu terbatas pada pihak ketiga tempat mereka bergantung) TicketsLimitViewAssignedOnlyHelp=Hanya tiket yang ditetapkan untuk pengguna saat ini yang akan terlihat. Tidak berlaku untuk pengguna dengan hak pengelolaan tiket. TicketsActivatePublicInterface=Aktifkan antarmuka publik @@ -126,10 +128,10 @@ TicketNumberingModules=Modul penomoran tiket TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Beri tahu pihak ketiga saat membuat TicketsDisableCustomerEmail=Selalu nonaktifkan email saat tiket dibuat dari antarmuka publik -TicketsPublicNotificationNewMessage=Kirim email saat pesan baru ditambahkan +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=Kirim email ketika pesan baru ditambahkan dari antarmuka publik (ke pengguna yang ditetapkan atau email notifikasi ke (pembaruan) dan/atau email notifikasi ke) TicketPublicNotificationNewMessageDefaultEmail=Email pemberitahuan ke (perbarui) -TicketPublicNotificationNewMessageDefaultEmailHelp=Kirim email pemberitahuan pesan baru ke alamat ini jika tiket tidak memiliki pengguna yang ditugaskan atau pengguna tidak memiliki email. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Tiket modifikasi terbaru BoxLastModifiedTicketDescription=Tiket termodifikasi %s terbaru BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Tidak ada tiket yang dimodifikasi baru-baru ini +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/id_ID/users.lang b/htdocs/langs/id_ID/users.lang index 8a5d6ee6cdc..0a72eb0f88b 100644 --- a/htdocs/langs/id_ID/users.lang +++ b/htdocs/langs/id_ID/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Hapus dari grup PasswordChangedAndSentTo=Kata sandi diubah dan dikirim ke<b>%s </b>. PasswordChangeRequest=Permintaan untuk mengubah kata sandi untuk<b>%s </b> PasswordChangeRequestSent=Permintaan untuk mengubah kata sandi untuk<b>%s</b>dikirim ke<b>%s </b>. +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=Konfirmasikan setel ulang kata sandi MenuUsersAndGroups=Pengguna & Grup LastGroupsCreated=Grup %s terbaru dibuat @@ -70,9 +72,10 @@ ExportDataset_user_1=Pengguna dan propertinya DomainUser=Pengguna domain %s Reactivate=Mengaktifkan kembali CreateInternalUserDesc=Formulir ini memungkinkan Anda untuk membuat pengguna internal di perusahaan/organisasi Anda. Untuk membuat pengguna eksternal (pelanggan, vendor dll.), Gunakan tombol 'Buat Pengguna Dolibarr' dari kartu kontak pihak ketiga itu. -InternalExternalDesc=Pengguna<b>internal</b>adalah pengguna yang merupakan bagian dari perusahaan/organisasi Anda. <br> Pengguna<b>eksternal</b>adalah pelanggan, vendor, atau lainnya (Membuat pengguna eksternal untuk pihak ketiga dapat dilakukan dari catatan kontak pihak ketiga). <br> <br> Dalam kedua kasus, izin menentukan hak pada Dolibarr, juga pengguna eksternal dapat memiliki menu manager yang berbeda dari pengguna internal (Lihat Home - Setup - Display) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Izin diberikan karena diwarisi dari salah satu grup pengguna. Inherited=Warisan +UserWillBe=Created user will be UserWillBeInternalUser=Pengguna yang dibuat akan menjadi pengguna internal (karena tidak tertaut ke pihak ketiga tertentu) UserWillBeExternalUser=Pengguna yang dibuat akan menjadi pengguna eksternal (karena ditautkan ke pihak ketiga tertentu) IdPhoneCaller=Penelepon telepon id @@ -109,8 +112,10 @@ UserAccountancyCode=Kode akuntansi pengguna UserLogoff=Logout pengguna UserLogged=Pengguna login DateOfEmployment=Tanggal masuk kerja -DateEmployment=Tanggal Mulai Pekerjaan +DateEmployment=Employment +DateEmploymentstart=Employment Start Date DateEmploymentEnd=Tanggal Akhir Pekerjaan +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Anda tidak dapat menonaktifkan catatan pengguna Anda sendiri ForceUserExpenseValidator=Paksa validator laporan pengeluaran ForceUserHolidayValidator=Validator permintaan cuti paksa diff --git a/htdocs/langs/id_ID/website.lang b/htdocs/langs/id_ID/website.lang index eb522b5a859..76842810881 100644 --- a/htdocs/langs/id_ID/website.lang +++ b/htdocs/langs/id_ID/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost= <u>Gunakan dengan Apache / NGinx /...</u><br> Buat di server ExampleToUseInApacheVirtualHostConfig=Contoh untuk digunakan dalam pengaturan host virtual Apache: YouCanAlsoTestWithPHPS= <u>Gunakan dengan server yang telah tertanam PHP</u> <br>Pada lingkungan pengembangan software, Anda dapat memilih untuk menguji situs dengan server web yang tertanam PHP (PHP 5.5 diperlukan) dengan menjalankan<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP= <u> Jalankan situs web Anda dengan penyedia Hosting Dolibarr lain integrasi dengan modul Situs web. Anda dapat menemukan daftar beberapa penyedia hosting Dolibarr di <a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org </a> -CheckVirtualHostPerms=Periksa juga bahwa virtual host memiliki izin<strong>%s </strong> pada file ke <br><strong>%sf07f +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Baca WritePerm=Menulis TestDeployOnWeb=Uji / gunakan di web PreviewSiteServedByWebServer= <u>Pratinjau %s di tab baru.</u><br><br>%s akan dilayani oleh server web eksternal (seperti Apache, Nginx, IIS). Anda harus menginstal dan mengatur server ini sebelum merujuk pada direktori:<br><strong>%s</strong><br>URL dilayani oleh server eksternal: <br><strong>%s</strong> -PreviewSiteServedByDolibarr= <u> Pratinjau %s di tab baru. </u> <br> <br> %s akan dilayani oleh server Dolibarr sehingga tidak memerlukan server web tambahan (seperti Apache, Nginx, IIS) untuk diinstal. <br> Yang tidak nyaman adalah URL halaman tidak ramah pengguna dan mulai dengan jalur Dolibarr Anda. <br> URL dilayani oleh Dolibarr: <br><strong>%s </strong> <br> <br> Untuk menggunakan web eksternal server Anda sendiri untuk melayani situs web ini, membuat virtual host pada server web Anda titik pada direktori <br><strong>%s </strong> <br> kemudian masukkan nama server virtual ini dan klik tombol pratinjau lainnya. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL dari host virtual yang dilayani oleh server web eksternal tidak ditentukan NoPageYet=Belum ada halaman YouCanCreatePageOrImportTemplate=Anda dapat membuat halaman baru atau mengimpor template situs web lengkap @@ -137,3 +137,11 @@ PagesRegenerated=%s halaman / wadah dibuat ulang RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/id_ID/zapier.lang b/htdocs/langs/id_ID/zapier.lang index c0506eac4b9..dcf888549aa 100644 --- a/htdocs/langs/id_ID/zapier.lang +++ b/htdocs/langs/id_ID/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier untuk Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier untuk modul Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Pengaturan Zapier untuk Dolibarr +ZapierForDolibarrSetup=Pengaturan Zapier untuk Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/is_IS/accountancy.lang b/htdocs/langs/is_IS/accountancy.lang index 5c45bf600e6..c88d86a406c 100644 --- a/htdocs/langs/is_IS/accountancy.lang +++ b/htdocs/langs/is_IS/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index 2b6093184ff..a7fdf70d5f1 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Fjarlægja tengingu læsa YourSession=Tími þinn Sessions=Users Sessions WebUserGroup=Vefþjóninn notandi / hópur +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Ath: er já aðeins gild ef <b>einingin %s </b> er virkt RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Öryggi skipulag +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Villa, þessa einingu þarf PHP útgáfa %s eða hærri ErrorModuleRequireDolibarrVersion=Villa, þessa einingu þarf Dolibarr útgáfu %s eða hærri @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Hreinsa nú @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Virkja á ActiveOn=Virkja á +ActivatableOn=Activatable on SourceFile=Frumskrár AvailableOnlyIfJavascriptAndAjaxNotDisabled=Aðeins í boði ef JavaScript er ekki fatlaður Required=Krafist @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Update server offline WithCounter=Manage a counter -GenericMaskCodes=Þú getur fært inn hvaða tala lagsins. Í þessu maska gæti eftirfarandi tög að nota: <br> <b>(000000)</b> samsvarar fjölda sem verður incremented á hverjum %s . Sláðu inn eins mörg núll og löngun lengd borðið. Teljarinn verður lokið við núllum frá vinstri til að fá eins mörg núll og lagsins. <br> <b>(000000 000)</b> sami eins og fyrri en að vega upp á móti sem svarar til fjölda til hægri á + merki er notað sem hófst á fyrsta %s . <br> <b>(000000 @ x)</b> sami eins og fyrri en borðið er endurstilla á núll þegar mánaðar x er náð (x á milli 1 og 12). Ef þessi möguleiki er notaður og x er 2 eða hærra, þá röð (YY) (mm) eða (áááá) (mm) er einnig nauðsynleg. <br> <b>(Dd)</b> dag (01-31). <br> <b>(Mm)</b> mánuði (01-12). <br> <b>(YY), (áááá)</b> eða <b>(y)</b> ár yfir 2, 4 eða 1 númer. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Allir aðrir stafir í möskva haldast óbreytt. <br> Bil eru ekki leyfð. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Dæmi um þriðja aðila skapa á 2007/3/1:</u> <br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Ritstjórar Module49Desc=Ritstjórainnskráning stjórnun Module50Name=Vörur @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind viðskipti viðbúnað Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-fyrirtæki Module5000Desc=Leyfir þér að stjórna mörgum fyrirtækjum -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Búa til / breyta innri / ytri notendur og leyfi Permission254=Eyða eða gera öðrum notendum Permission255=Búa til / breyta eigin upplýsingar um notandann sinn Permission256=Breyta eigin lykilorð hans -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Lesa CA Permission272=Lesa reikningum Permission273=Útgáfudagur reikningum @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Öryggi endurskoðun viðburðir +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Úttekt InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Þú verður að keyra þessa skipun frá stjórn lína eftir innskráningu í skel með <b>notandann %s .</b> YourPHPDoesNotHaveSSLSupport=SSL virka ekki í boði í PHP þinn DownloadMoreSkins=Fleiri skinn til að sækja -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Algjör þýðing @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Fyllingar eiginleika ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Tenging (Unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Leita sía LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Tenging (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Firstname Nafn @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Aðgerðir og dagskrá mát skipulag PasswordTogetVCalExport=Lykill að heimila útflutning hlekkur +SecurityKey = Security Key PastDelayVCalExport=Ekki flytja atburður eldri en AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/is_IS/banks.lang b/htdocs/langs/is_IS/banks.lang index dbe306c9acb..040391c6a6f 100644 --- a/htdocs/langs/is_IS/banks.lang +++ b/htdocs/langs/is_IS/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/is_IS/bills.lang b/htdocs/langs/is_IS/bills.lang index 2b7e4a74e70..a7a13d7f07e 100644 --- a/htdocs/langs/is_IS/bills.lang +++ b/htdocs/langs/is_IS/bills.lang @@ -52,11 +52,12 @@ Invoices=Kvittanir InvoiceLine=Invoice línu InvoiceCustomer=Viðskiptavinur Reikningar CustomerInvoice=Viðskiptavinur Reikningar -CustomersInvoices=reikninga viðskiptavinar +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=birgjum reikninga +SupplierBills=Vendor invoices Payment=Greiðsla PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Greiðslur gert þegar PaymentsBackAlreadyDone=Refunds already done PaymentRule=Greiðsla regla PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Millifærslu PaymentTypeShortVIR=Millifærslu @@ -494,12 +498,16 @@ Cash=Cash Reported=Seinkun DisabledBecausePayments=Ekki hægt þar sem það er einhvers greiðslur CantRemovePaymentWithOneInvoicePaid=Get ekki fjarlægt greiðslu þar er að minnsta kosti á reikning flokkast borgað +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Væntanlegur greiðslu CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Borgað af þessari greiðslu 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A frumvarpið hófst með $ syymm er til nú þegar og er ekki með þessari tegund af röð. Fjarlægja hana eða gefa henni nýtt heiti þess að virkja þessa einingu. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/is_IS/boxes.lang b/htdocs/langs/is_IS/boxes.lang index fdb47cd6d8f..a4b8ba5261f 100644 --- a/htdocs/langs/is_IS/boxes.lang +++ b/htdocs/langs/is_IS/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Bókhalds +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/is_IS/categories.lang b/htdocs/langs/is_IS/categories.lang index b5b63e566bb..d86daa422be 100644 --- a/htdocs/langs/is_IS/categories.lang +++ b/htdocs/langs/is_IS/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/is_IS/companies.lang b/htdocs/langs/is_IS/companies.lang index 86883bf1c40..6e0b43dedfa 100644 --- a/htdocs/langs/is_IS/companies.lang +++ b/htdocs/langs/is_IS/companies.lang @@ -43,9 +43,10 @@ Individual=Einstaklingur 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=Móðurfélag Subsidiaries=Dótturfélög -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Skýrsla hlutfall +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility kóða RegisteredOffice=Skráð skrifstofa Lastname=Lastname @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF / nEf) ProfId2ES=Prof Id 2 (Kennitala) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate tala) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (Siren) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, gamall MANNAPI) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Kennitala) ProfId3PT=Prof Id 3 (Commercial Record tala) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Viðskiptavinur / birgir númerið er ókeypis. Þessi kóði getur breytt hvenær sem er. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/is_IS/compta.lang b/htdocs/langs/is_IS/compta.lang index b281068b1a6..ea24fde663b 100644 --- a/htdocs/langs/is_IS/compta.lang +++ b/htdocs/langs/is_IS/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VSK safnað StatusToPay=Til að borga SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Viðskiptavinur Reikningar greiðslu PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VSK-greiðslu +AutomaticCreationPayment=Automatically record the payment ListPayment=Listi yfir greiðslur ListOfCustomerPayments=Listi yfir greiðslur viðskiptavina ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Greiðsla LT2PaymentsES=IRPF Greiðslur VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Athugaðu móttöku inntak dagsetningu 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/is_IS/ecm.lang b/htdocs/langs/is_IS/ecm.lang index 5e10a48494b..e228a4b76d9 100644 --- a/htdocs/langs/is_IS/ecm.lang +++ b/htdocs/langs/is_IS/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/is_IS/errors.lang b/htdocs/langs/is_IS/errors.lang index 82755eaab2b..953b11adbb4 100644 --- a/htdocs/langs/is_IS/errors.lang +++ b/htdocs/langs/is_IS/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>Listinn %s </b> fannst ekki (Bad slóð, rangt leyfi eða a ErrorFunctionNotAvailableInPHP=<b>Virka %s </b> er krafist fyrir þessa aðgerð, en er ekki til staðar í þessari útgáfu / skipulag af PHP. ErrorDirAlreadyExists=A möppu með þessu nafni er þegar til. ErrorFileAlreadyExists=Skrá með þessu nafni er þegar til. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Skrá fékk ekki alveg við þjóninn. ErrorNoTmpDir=Tímabundin directy %s er ekki til. ErrorUploadBlockedByAddon=Hlaða læst með PHP / Apache tappi. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/is_IS/externalsite.lang b/htdocs/langs/is_IS/externalsite.lang index 117b42da288..871f44e7367 100644 --- a/htdocs/langs/is_IS/externalsite.lang +++ b/htdocs/langs/is_IS/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Skipulag tengjast ytri vef -ExternalSiteURL=Ytri Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/is_IS/main.lang b/htdocs/langs/is_IS/main.lang index 0c0dae311ad..de34867d736 100644 --- a/htdocs/langs/is_IS/main.lang +++ b/htdocs/langs/is_IS/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. dagsetning IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Löggilding dagur +DateSigning=Signing date DateClosing=Lokadegi DateDue=Gjalddagi DateValue=Gildi dagsetningu @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Eining verðs PriceU=UPP PriceUHT=UP (nettó) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Upphæð AmountInvoice=Invoice upphæð @@ -389,6 +390,8 @@ AmountTotal=Samtals upphæð AmountAverage=Meðalupphæð PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Prósenta Total=Samtals SubTotal=Millisamtala @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Valið tungumál CurrentTheme=Núverandi þema CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Tengiliðir SearchIntoMembers=Meðlimir SearchIntoUsers=Notendur SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Verkefni SearchIntoMO=Manufacturing Orders SearchIntoTasks=Verkefni @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Áhrifum á Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/is_IS/margins.lang b/htdocs/langs/is_IS/margins.lang index a6630619786..8dee352103a 100644 --- a/htdocs/langs/is_IS/margins.lang +++ b/htdocs/langs/is_IS/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Vara eða þjónusta 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/is_IS/members.lang b/htdocs/langs/is_IS/members.lang index c1e58714440..c883a16219c 100644 --- a/htdocs/langs/is_IS/members.lang +++ b/htdocs/langs/is_IS/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Listi yfir meðlimi drög (verður staðfest) MembersListValid=Listi yfir gildar meðlimir MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Listi yfir viðurkennda meðlimir MenuMembersToValidate=Drög að meðlimir MenuMembersValidated=Fullgilt aðildarríki +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Meðlimir með áskrift að fá MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Útrunnið MemberStatusPaid=Áskrift upp til dagsetning MemberStatusPaidShort=Upp til dagsetning +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Drög að meðlimir +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Staðfest @@ -82,6 +87,8 @@ Physical=Líkamleg Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Eyða meðlimur @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Snið af merki síðu DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Mynda lak heimilisfang (Format fyrir framleiðsla raunverulega skip SubscriptionPayment=Áskrift greiðslu LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Notendur tölfræði eftir landi MembersStatisticsByState=Notendur tölfræði eftir fylki / hérað MembersStatisticsByTown=Notendur tölfræði eftir bænum diff --git a/htdocs/langs/is_IS/modulebuilder.lang b/htdocs/langs/is_IS/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/is_IS/modulebuilder.lang +++ b/htdocs/langs/is_IS/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/is_IS/orders.lang b/htdocs/langs/is_IS/orders.lang index b212a477896..76fbd1f19ee 100644 --- a/htdocs/langs/is_IS/orders.lang +++ b/htdocs/langs/is_IS/orders.lang @@ -16,6 +16,8 @@ ToOrder=Gera röð MakeOrder=Gera röð SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Sími # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Einföld röð líkan 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/is_IS/other.lang b/htdocs/langs/is_IS/other.lang index fb1ea9d9c80..30613bdb7e5 100644 --- a/htdocs/langs/is_IS/other.lang +++ b/htdocs/langs/is_IS/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Búið til af %s ModifiedBy=Breytt af %s ValidatedBy=Staðfestar af %s +SignedBy=Signed by %s ClosedBy=Lokað eftir %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/is_IS/productbatch.lang b/htdocs/langs/is_IS/productbatch.lang index 43b7f793dca..6217af6114c 100644 --- a/htdocs/langs/is_IS/productbatch.lang +++ b/htdocs/langs/is_IS/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Já +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nei Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/is_IS/products.lang b/htdocs/langs/is_IS/products.lang index a43c32766fd..9edc7be7038 100644 --- a/htdocs/langs/is_IS/products.lang +++ b/htdocs/langs/is_IS/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index 8e693b106e7..72e7c2c3466 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/is_IS/propal.lang b/htdocs/langs/is_IS/propal.lang index 04d060e1982..7ed33b66462 100644 --- a/htdocs/langs/is_IS/propal.lang +++ b/htdocs/langs/is_IS/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Senda auglýsing tillögu með tölvupósti DatePropal=Dagsetning tillögu DateEndPropal=Date lok gildistíma ValidityDuration=Gildistími Lengd -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal %s fannst ekki AddToDraftProposals=Add to draft proposal @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Auglýsing tillögunnar og línur ProposalLine=Tillaga línu +ProposalLines=Proposal lines AvailabilityPeriod=Framboð töf SetAvailability=Setja framboð töf AfterOrder=eftir því skyni @@ -85,3 +85,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/is_IS/stocks.lang b/htdocs/langs/is_IS/stocks.lang index 9741ab77235..7f6f5d25511 100644 --- a/htdocs/langs/is_IS/stocks.lang +++ b/htdocs/langs/is_IS/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Verðbréf MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Staðsetning -LocationSummary=Stutt nafn staðsetning -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Heildarfjöldi vörur LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Vöruhús gildi 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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=Vegið meðalverð -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selja Unit verð EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/is_IS/suppliers.lang b/htdocs/langs/is_IS/suppliers.lang index 36840ab9189..c9b83a3b331 100644 --- a/htdocs/langs/is_IS/suppliers.lang +++ b/htdocs/langs/is_IS/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Saga diff --git a/htdocs/langs/is_IS/ticket.lang b/htdocs/langs/is_IS/ticket.lang index 113be596543..05766c00998 100644 --- a/htdocs/langs/is_IS/ticket.lang +++ b/htdocs/langs/is_IS/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tegund Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/is_IS/users.lang b/htdocs/langs/is_IS/users.lang index faca236ce4c..4106e08f75c 100644 --- a/htdocs/langs/is_IS/users.lang +++ b/htdocs/langs/is_IS/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Fjarlægja úr hópi PasswordChangedAndSentTo=Lykilorð breyst og sendur <b>til %s .</b> PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Beiðni um að breyta lykilorðinu <b>fyrir %s </b> sent <b>til %s .</b> +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=Notendur & Groups LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Lén notanda %s Reactivate=Endurvekja 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Heimild veitt vegna þess að arfur frá einni í hópnum notanda. Inherited=Arf +UserWillBe=Created user will be UserWillBeInternalUser=Búið notandi vilja vera innri notanda (vegna þess að ekki tengd við ákveðna þriðja aðila) UserWillBeExternalUser=Búið notandi vilja vera ytri notandi (vegna þess að tengjast ákveðnum þriðja aðila) IdPhoneCaller=Auðkenni sími sem hringir @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/is_IS/website.lang b/htdocs/langs/is_IS/website.lang index bcec388e753..9b1431a77d8 100644 --- a/htdocs/langs/is_IS/website.lang +++ b/htdocs/langs/is_IS/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Lesa WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/is_IS/zapier.lang b/htdocs/langs/is_IS/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/is_IS/zapier.lang +++ b/htdocs/langs/is_IS/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/it_CH/admin.lang b/htdocs/langs/it_CH/admin.lang index c1d306ec390..619ae5f8bd4 100644 --- a/htdocs/langs/it_CH/admin.lang +++ b/htdocs/langs/it_CH/admin.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - admin +ShowBugTrackLink=Show link "<strong>%s</strong>" OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>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_CH/modulebuilder.lang b/htdocs/langs/it_CH/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/it_CH/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/it_CH/products.lang b/htdocs/langs/it_CH/products.lang deleted file mode 100644 index 2a38b9b0181..00000000000 --- a/htdocs/langs/it_CH/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/it_IT/accountancy.lang b/htdocs/langs/it_IT/accountancy.lang index 7651e63da89..a15261e9558 100644 --- a/htdocs/langs/it_IT/accountancy.lang +++ b/htdocs/langs/it_IT/accountancy.lang @@ -131,7 +131,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=Totale per conto contabile +TotalForAccount=Total accounting account Ventilate=Associa @@ -209,7 +209,7 @@ Codejournal=Giornale JournalLabel=Etichetta del giornale NumPiece=Numero del pezzo TransactionNumShort=Num. transazione -AccountingCategory=Gruppi personalizzati +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Qui puoi definire alcuni gruppi di conti contabili. Saranno utilizzati per rapporti contabili personalizzati. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index 29b516e2c33..0c18bd7788e 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Rimuovi il blocco connessioni YourSession=La tua sessione Sessions=Sessioni utente WebUserGroup=Utente/gruppo del server web (per esempio www-data) +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=La tua configurazione PHP sembra non permetta di mostrare le sessioni attive. La directory utilizzata per salvare le sessioni (<b>%s</b>) potrebbe non essere protetta (per esempio tramite permessi SO oppure dalla direttiva PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Nota: funziona solo se il <b>modulo %s</b> è attivo RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Impostazioni per la sicurezza +PHPSetup=PHP setup SecurityFilesDesc=Definire qui le impostazioni relative alla sicurezza per l'upload dei files. ErrorModuleRequirePHPVersion=Errore: questo modulo richiede almeno la versione %s di PHP. ErrorModuleRequireDolibarrVersion=Errore: questo modulo richiede almeno la versione %s di Dolibarr @@ -84,7 +86,7 @@ AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a JavascriptDisabled=JavaScript disattivato UsePreviewTabs=Utilizza i tabs per l'anteprima ShowPreview=Vedi anteprima -ShowHideDetails=Show-Hide details +ShowHideDetails=Mostra-Nascondi dettagli PreviewNotAvailable=Anteprima non disponibile ThemeCurrentlyActive=Tema attualmente attivo MySQLTimeZone=TimeZone MySql (database) @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Questa area fornisce funzioni di amministrazione. Usa il men Purge=Pulizia PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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=Eliminia il file log, compreso <b>%s</b> definito per il modulo Syslog (nessun rischio di perdita di dati) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Procedo all'eliminazione @@ -232,6 +234,7 @@ BoxesAvailable=Widget disponibili BoxesActivated=Widget attivi ActivateOn=Attiva sul ActiveOn=Attivi sul +ActivatableOn=Activatable on SourceFile=File sorgente AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponibile solo se JavaScript e Ajax non sono disattivati Required=Richiesto @@ -347,9 +350,10 @@ LastActivationAuthor=Ultimo LastActivationIP=Latest activation IP UpdateServerOffline=Update server offline WithCounter=Gestisci un contatore -GenericMaskCodes=Puoi inserire uno schema di numerazione. In questo schema, possono essere utilizzati i seguenti tag : <br><b> {000000} </b> Corrisponde a un numero che sarà incrementato ad ogni aggiunta di %s. Inserisci il numero di zeri equivalente alla lunghezza desiderata per il contatore. Verranno aggiunti zeri a sinistra fino alla lunghezza impostata per il contatore. <br><b> {000000+000} </b> Come il precedente, ma con un offset corrispondente al numero a destra del segno + che viene applicato al primo inserimento %s. <br> <b> {000000@x} </b> Come sopra, ma il contatore viene reimpostato a zero quando si raggiunge il mese x (x compreso tra 1 e 12). Se viene utilizzata questa opzione e x è maggiore o uguale a 2, diventa obbligatorio inserire anche la sequenza {yy}{mm} o {yyyy}{mm}. <br> <b> {dd} </b> giorno (da 01 a 31). <br> <b> {mm} </b> mese (da 01 a 12). <br> <b> {yy} </b>, <b> {yyyy} </b> o <b> {y} </b> anno con 2, 4 o 1 cifra.<br> -GenericMaskCodes2=<b>{cccc}</b>il codice cliente di n caratteri<br><b>{cccc000}</b> il codice cliente di n caratteri è seguito da un contatore dedicato per cliente. Questo contatore dedicato per i clienti è azzerato allo stesso tempo di quello globale.<br><b>{tttt}</b> Il codice di terze parti composto da n caratteri (vedi menu Home - Impostazioni - dizionario - tipi di terze parti). Se aggiungi questa etichetta, il contatore sarà diverso per ogni tipo di terze parti<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Tutti gli altri caratteri nello schema rimarranno inalterati. <br> Gli spazi non sono ammessi. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Esempio sulla novantanovesima %s del contatto, con la data il 31/01/2007:</u> <br> GenericMaskCodes4b=<u>Esempio : il 99esimo cliente/fornitore viene creato 31/01/2007:</u> <br> GenericMaskCodes4c=<u>Esempio su prodotto creato il 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Libreria utilizzata per generare PDF @@ -541,6 +545,8 @@ Module40Name=Fornitori Module40Desc=Gestione fornitori e acquisti (ordini e fatture) Module42Name=Debug Logs Module42Desc=Strumenti di tracciamento (file, syslog, ...). Questi strumenti sono per scopi tecnici/correzione. +Module43Name=Barra di debug +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redazione Module49Desc=Gestione redattori Module50Name=Prodotti @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Localizzazione degli accessi tramite GeoIP Maxmind Module3200Name=Archivi inalterabili Module3200Desc=Abilita un registro inalterabile degli eventi aziendali. Gli eventi sono archiviati in tempo reale. Il registro è una tabella di sola lettura degli eventi concatenati che possono essere esportati. Questo modulo potrebbe essere obbligatorio per alcuni paesi. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Risorse umane Module4000Desc=Gestione delle risorse umane (gestione dei dipartimenti e contratti dipendenti) Module5000Name=Multiazienda Module5000Desc=Permette la gestione di diverse aziende -Module6000Name=Flusso di lavoro -Module6000Desc=Gestione flussi di lavoro (creazione automatica di oggetti e / o cambio di stati automatico) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Siti web Module10000Desc=Crea siti Web (pubblici) con un editor WYSIWYG. Si tratta di un CMS orientato a webmaster o sviluppatori (richiesta conoscenza di linguaggio HTML e CSS). Basta configurare il proprio server Web (Apache, Nginx, ...) in modo che punti alla directory Dolibarr dedicata per averlo online su Internet con il proprio nome di dominio. Module20000Name=Richieste ferie / permesso @@ -762,7 +770,7 @@ Permission167=Esportare contratti Permission171=Vedi viaggi e spese (propri e i suoi subordinati) Permission172=Crea/modifica nota spese Permission173=Elimina nota spese -Permission174=Read all trips and expenses +Permission174=Vedere tutti i viaggi e le spese Permission178=Esporta note spese Permission180=Vedere fornitori Permission181=Read purchase orders @@ -800,12 +808,13 @@ Permission244=Vedere contenuto delle categorie nascoste Permission251=Vedere altri utenti e gruppi PermissionAdvanced251=Vedere altri utenti Permission252=Creare/modificare altri utenti e gruppi e propri permessi -Permission253=Create/modify other users, groups and permissions +Permission253=Creare/Modificare altri utenti, gruppi e permessi PermissionAdvanced253=Creare/modificare utenti interni/esterni e permessi Permission254=Eliminare o disattivare altri utenti Permission255=Cambiare le password di altri utenti Permission256=Eliminare o disabilitare altri utenti -Permission262=Estendere l'accesso a tutte le terze parti (non solo le terze parti per le quali tale utente è un rappresentante di vendita). <br> Non efficace per gli utenti esterni (sempre limitato a se stessi per proposte, ordini, fatture, contratti, ecc.). <br> Non efficace per i progetti (solo le regole sulle autorizzazioni del progetto, la visibilità e le questioni relative all'assegnazione). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Vedere CA Permission272=Vedere fatture Permission273=Emettere fatture @@ -942,11 +951,11 @@ Permission10001=Read website content Permission10002=Create/modify website content (html and javascript content) Permission10003=Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers. Permission10005=Delete website content -Permission20001=Read leave requests (your leave and those of your subordinates) -Permission20002=Create/modify your leave requests (your leave and those of your subordinates) +Permission20001=Vedere le richieste di ferie (tue e dei tuoi subordinati) +Permission20002=Creare / modificare le tue richieste di ferie (le tue ferie e quelle dei tuoi subordinati) Permission20003=Eliminare le richieste di ferie -Permission20004=Read all leave requests (even of user not subordinates) -Permission20005=Create/modify leave requests for everybody (even of user not subordinates) +Permission20004=Vedere tutte le richieste di ferie (anche di utenti non subordinati) +Permission20005=Creare / modificare richieste di ferie per tutti (anche di utenti non subordinati) Permission20006=Amministrazione richieste di ferie/permessi (impostazione e aggiornamento del bilancio) Permission20007=Approvare le richieste di ferie Permission23001=Leggi lavoro pianificato @@ -978,7 +987,7 @@ Permission55001=Leggi sondaggi Permission55002=Crea/modifica sondaggi Permission59001=Leggi margini commerciali Permission59002=Definisci margini commerciali -Permission59003=Read every user margin +Permission59003=Vedere ogni margine utente Permission63001=Leggi risorse Permission63002=Crea/modifica risorse Permission63003=Elimina risorsa @@ -1175,7 +1184,8 @@ SetupDescription2=Le 2 seguenti sezioni sono obbligatorie (le prime 2 sezioni ne SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Parametri di base utilizzati per personalizzare il comportamento predefinito dell'applicazione (ad es. per le funzionalità relative al paese). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Questo software è una suite di molti moduli / applicazioni. I moduli relativi alle tue esigenze devono essere abilitati e configurati. Le voci di menu verranno visualizzate con l'attivazione di questi moduli. SetupDescription5=Altre voci di menu consentono la gestione di parametri opzionali. -LogEvents=Eventi di audit di sicurezza +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=Informazioni su Dolibarr InfoBrowser=Informazioni browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=È necessario eseguire questo comando dal riga di comando dopo il login in una shell con l'utente <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Il PHP del server non supporta SSL DownloadMoreSkins=Scarica altre skin -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Nei documenti mostra identità professionale completa di: ShowVATIntaInAddress=Nascondi il numero di partita IVA intracomunitaria negli indirizzi TranslationUncomplete=Traduzione incompleta @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Definire gli eventuali attributi aggiuntivi / campi personalizzati che devono essere inclusi negli oggetti: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Campi extra ExtraFieldsLines=Attributi complementari (righe) ExtraFieldsLinesRec=Attributi complementari (righe di template di fattura) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (Unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Filtro di ricerca LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, ActiveDirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Cognome Nome @@ -1696,7 +1707,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nuovo menu MenuHandler=Gestore menu MenuModule=Modulo sorgente -HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) +HideUnauthorizedMenu=Nascondi i menù non autorizzati anche per gli utenti interni (altrimenti sarà solamente disabilitato) DetailId=Id menu DetailMenuHandler=Gestore menu dove mostrare il nuovo menu DetailMenuModule=Nome del modulo, per le voci di menu provenienti da un modulo @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=La tua azienda è stata definita per non utilizzare l'I AccountancyCode=Accounting Code AccountancyCodeSell=Codice contabilità vendite AccountancyCodeBuy=Codice contabilità acquisti +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Impostazioni modulo agenda PasswordTogetVCalExport=Chiave per autorizzare l'esportazione di link +SecurityKey = Security Key PastDelayVCalExport=Non esportare evento più vecchio di AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ 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) NbAddedAutomatically=Numero di giorni aggiunti ai contatori di utenti (automaticamente) ogni mese -EnterAnyCode=Questo campo contiene un riferimento per identificare la linea. Inserisci qualsiasi valore di tua scelta, ma senza caratteri speciali. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1953,7 +1966,7 @@ CommandIsNotInsideAllowedCommands=The command you are trying to run is not in th LandingPage=Landing page SamePriceAlsoForSharedCompanies=If you use a multicompany module, with the choice "Single price", the price will also be the same for all companies if products are shared between environments ModuleEnabledAdminMustCheckRights=Il modulo è stato attivato. Le autorizzazioni per i moduli attivati ​​sono state fornite solo agli utenti amministratori. Potrebbe essere necessario concedere le autorizzazioni ad altri utenti o gruppi manualmente, se necessario. -UserHasNoPermissions=This user has no permissions defined +UserHasNoPermissions=Questo utente non ha alcun permesso assegnato TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "%s")<br>Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "%s" in days)<br>Use "Current/Next" to have payment term date being the first Nth of the month after delta (delta is field "%s", N is stored into field "%s") BaseCurrency=Valuta di riferimento della compagnia (vai nella configurazione della compagnia per cambiarla) WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with French laws (Loi Finance 2016). @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Sono state trovate diverse varianti linguistiche RemoveSpecialChars=Rimuovi caratteri speciali COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Scambia la posizione dell'indirizzo del mittente e del destinatario sui documenti PDF -FeatureSupportedOnTextFieldsOnly=Attenzione, funzionalità supportata solo nei campi di testo. Inoltre, è necessario impostare un parametro URL action = create o action = edit OPPURE il nome della pagina deve terminare con 'new.php' per attivare questa funzione. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Aggiungi un lavoro programmato e una pagina di configurazione per scansionare regolarmente caselle di posta elettronica (usando il protocollo IMAP) e registrare le email ricevute nella tua applicazione, nel posto giusto e / o creare automaticamente alcuni record (come i lead). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ UseDebugBar=Usa la barra di debug 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Impostazione del modulo Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Effettua un ping anonimo '+1' al server della Fondazione Dolib 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 +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Se vuoi avere alcuni testi nel tuo PDF duplicato in 2 lingue diverse nello stesso PDF generato, devi impostare qui la seconda lingua in modo che il PDF generato contenga 2 lingue diverse nella stessa pagina, quella scelta durante la generazione del PDF e questa ( solo pochi modelli PDF supportano questa opzione). Mantieni vuoto per 1 lingua per PDF. FafaIconSocialNetworksDesc=Inserisci qui il codice di un'icona FontAwesome. Se non sai cos'è FontAwesome, puoi utilizzare il valore generico fa-address-book. FeatureNotAvailableWithReceptionModule=Funzione non disponibile quando la ricezione del modulo è abilitata @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Natura del prodotto CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/it_IT/banks.lang b/htdocs/langs/it_IT/banks.lang index 0391c90cf1b..b665c67accb 100644 --- a/htdocs/langs/it_IT/banks.lang +++ b/htdocs/langs/it_IT/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=I tuoi mandati SEPA FindYourSEPAMandate=Questo è il tuo mandato SEPA che autorizza la nostra azienda ad effettuare un ordine di addebito diretto alla tua banca. Da restituire firmata (scansione del documento firmato) o inviato all'indirizzo email AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Colora i movimenti BankColorizeMovementDesc=Se questa funzione è abilitata, è possibile scegliere il colore di sfondo specifico per i movimenti di debito o credito BankColorizeMovementName1=Colore di sfondo per il movimento di debito BankColorizeMovementName2=Colore di sfondo per il movimento del credito IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/it_IT/bills.lang b/htdocs/langs/it_IT/bills.lang index fb10fd9b8d9..f4e57625340 100644 --- a/htdocs/langs/it_IT/bills.lang +++ b/htdocs/langs/it_IT/bills.lang @@ -55,8 +55,9 @@ CustomerInvoice=Fattura attive CustomersInvoices=Fatture attive SupplierInvoice=Fattura fornitore SuppliersInvoices=Fatture Fornitore +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Fattura fornitore -SupplierBills=Fatture passive +SupplierBills=Fatture Fornitore Payment=Pagamento PaymentBack=Rimborso CustomerInvoicePaymentBack=Rimborso @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pagamenti già fatti PaymentsBackAlreadyDone=Rimborso già effettuato PaymentRule=Regola pagamento PaymentMode=Tipo di pagamento +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Carta di Debito/Credito PaymentTypePP=PayPal IdPaymentMode=Tipo di pagamento (id) @@ -111,7 +114,7 @@ CancelBill=Annulla una fattura SendRemindByMail=Inviare promemoria via email DoPayment=Registra pagamento DoPaymentBack=Emetti rimborso -ConvertToReduc=Mark as credit available +ConvertToReduc=Converti in sconto assoluto ConvertExcessReceivedToReduc=Convert excess received into available credit ConvertExcessPaidToReduc=Convert excess paid into available discount EnterPaymentReceivedFromCustomer=Inserisci il pagamento ricevuto dal cliente @@ -272,9 +275,9 @@ Repeatables=Modelli ChangeIntoRepeatableInvoice=Converti in modello di fattura CreateRepeatableInvoice=Crea modello di fattura CreateFromRepeatableInvoice=Crea da modello di fattura -CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details +CustomersInvoicesAndInvoiceLines=Fatture attive e dettagli CustomersInvoicesAndPayments=Fatture attive e pagamenti -ExportDataset_invoice_1=Customer invoices and invoice details +ExportDataset_invoice_1=Fatture attive e dettagli ExportDataset_invoice_2=Fatture clienti e pagamenti ProformaBill=Fattura proforma: Reduction=Sconto @@ -310,8 +313,8 @@ DiscountType=Tipo sconto NoteReason=Note/Motivo ReasonDiscount=Motivo dello sconto DiscountOfferedBy=Sconto concesso da -DiscountStillRemaining=Discounts or credits available -DiscountAlreadyCounted=Discounts or credits already consumed +DiscountStillRemaining=Sconti o crediti disponibili +DiscountAlreadyCounted=Sconti o crediti già consumati CustomerDiscounts=Sconto clienti SupplierDiscounts=Vendors discounts BillAddress=Indirizzo di fatturazione @@ -373,6 +376,7 @@ DateLastGeneration=Data dell'ultima generazione DateLastGenerationShort=Data ultima gen. MaxPeriodNumber=Numero massimo di fatture da generare NbOfGenerationDone=Numero di fatture generate già create +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Numero di generazione eseguita MaxGenerationReached=Numero massimo di generazioni raggiunto InvoiceAutoValidate=Convalida le fatture automaticamente @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Pagamento a 14 giorni fine mese FixAmount=Importo fisso - 1 riga con etichetta "%s" VarAmount=Importo variabile (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Importo variabile (%% tot.) - tutte le stesse righe +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bonifico bancario PaymentTypeShortVIR=Bonifico bancario @@ -459,8 +463,8 @@ FullPhoneNumber=Telefono TeleFax=Fax PrettyLittleSentence=L'importo dei pagamenti in assegni emessi in nome mio viene accettato in qualità di membro di una associazione approvata dalla Amministrazione fiscale. IntracommunityVATNumber=Intra-Community VAT ID -PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to -PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to +PaymentByChequeOrderedTo=I pagamenti tramite assegno (tasse incluse) devono essere intestati a %s, \n +PaymentByChequeOrderedToShort=I pagamenti tramite assegno (tasse incluse) devono essere intestati a SendTo=spedire a PaymentByTransferOnThisBankAccount=Pagamento tramite Bonifico sul seguente Conto Bancario VATIsNotUsedForInvoice=* Non applicabile IVA art-293B del CGI @@ -494,12 +498,16 @@ Cash=Contanti Reported=Segnalato DisabledBecausePayments=Impossibile perché ci sono dei pagamenti CantRemovePaymentWithOneInvoicePaid=Impossibile rimuovere il pagamento. C'è almeno una fattura classificata come pagata +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Pagamento previsto CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Pagato con questo pagamento ClosePaidInvoicesAutomatically=Classify "Paid" all standard, down-payment or replacement invoices paid entirely. ClosePaidCreditNotesAutomatically=Classifica come "Pagata" tutte le note di credito interamente rimborsate ClosePaidContributionsAutomatically=Classify "Paid" all social or fiscal contributions paid entirely. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Paga ToMakePaymentBack=Rimborsa @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Per creare un nuovo modelo bisogna prima c PDFCrabeDescription=Modello di fattura PDF Crabe. Un modello completo di fattura (vecchia implementazione del modello Sponge) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Modello di fattura Crevette. Template completo per le fatture (Modello raccomandato) -TerreNumRefModelDesc1=Restituisce un numero nel formato %syymm-nnnn per le fatture, %syymm-nnnn per le note di credito e %syymm-nnnn per i versamenti, dove yy è l'anno, mm è il mese e nnnn è una sequenza progressiva, senza salti e che non si azzera. -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. +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 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 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Motivo di chiusura anticipata EarlyClosingComment=Nota di chiusura anticipata ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Elimina template di fattura ConfirmDeleteRepeatableInvoice=Sei sicuro di voler eliminare il modello di fattura? CreateOneBillByThird=Crea una fattura per soggetto terzo (altrimenti, una fatture per ordine) -BillCreated=%s fattura creata +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Stato della generazione del documento DoNotGenerateDoc=Non generare il documento AutogenerateDoc=Genera automaticamente il documento diff --git a/htdocs/langs/it_IT/boxes.lang b/htdocs/langs/it_IT/boxes.lang index c9877141918..111b2988d7b 100644 --- a/htdocs/langs/it_IT/boxes.lang +++ b/htdocs/langs/it_IT/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Informazioni di login BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Ultime azioni BoxLastContracts=Ultimi contratti BoxLastContacts=Ultimi contatti/indirizzi BoxLastMembers=Ultimi membri +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Ultimi interventi BoxCurrentAccounts=Saldo conti aperti BoxTitleMemberNextBirthdays=Compleanni di questo mese (membri) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Ultime %s notizie da %s BoxTitleLastProducts=Prodotti/Servizi: ultimi %s modificati BoxTitleProductsAlertStock=Prodotti: allerta scorte @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Ultime %s spedizioni cliente NoRecordedShipments=Nessuna spedizione cliente registrata BoxCustomersOutstandingBillReached=Clienti con limite eccezionale raggiunto # Pages -AccountancyHome=Contabilità +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Progetti convalidati diff --git a/htdocs/langs/it_IT/categories.lang b/htdocs/langs/it_IT/categories.lang index 8de361ac0e1..f3d7cf290e0 100644 --- a/htdocs/langs/it_IT/categories.lang +++ b/htdocs/langs/it_IT/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Area tag/categorie fornitori CustomersCategoriesArea=Area tag/categorie clienti MembersCategoriesArea=Area tag/categorie membri ContactsCategoriesArea=Area tag/categorie contatti -AccountsCategoriesArea=Area tag/categorie conti +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Area tag/categorie progetti UsersCategoriesArea=Users tags/categories area SubCats=Sub-categorie @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assegna la categoria al fornitore ShowCategory=Mostra tag/categoria ByDefaultInList=Default nella lista ChooseCategory=Choose category -StocksCategoriesArea=Categorie magazzini -ActionCommCategoriesArea=Categorie eventi +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Pagina-Contenitore delle 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 a5ca94be7b1..8bbcf4e6bab 100644 --- a/htdocs/langs/it_IT/companies.lang +++ b/htdocs/langs/it_IT/companies.lang @@ -43,9 +43,10 @@ Individual=Privato 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=Società madre Subsidiaries=Controllate -ReportByMonth=Rapporto per mese -ReportByCustomers=Segnalato dal cliente -ReportByQuarter=Report per trimestre +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Titolo RegisteredOffice=Sede legale Lastname=Cognome @@ -172,14 +173,20 @@ ProfId1ES=CIF/NIF ProfId2ES=Núm seguridad social ProfId3ES=CNAE ProfId4ES=Núm colegiado -ProfId5ES=Codice EORI +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=SIREN ProfId2FR=SIRET ProfId3FR=NAF, vecchio APE ProfId4FR=RCS/RM -ProfId5FR=Codice EORI +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=Cod. Fisc. ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -198,11 +205,12 @@ ProfId3IN=- ProfId4IN=- ProfId5IN=- ProfId6IN=- -ProfId1IT=- -ProfId2IT=- -ProfId3IT=- -ProfId4IT=- +ProfId1IT=C.C.I.A.A. +ProfId2IT=R.E.A. +ProfId3IT=Iscr. trib. +ProfId4IT=Cod. Fisc. ProfId5IT=Codice EORI +ProfId6IT=Cod. Fisc. ProfId1LU=Id. prof. 1 (R.C.S. Lussemburgo) ProfId2LU=Id. prof. 2 (Permesso d'affari) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=NIPC ProfId2PT=numero di sicurezza sociale ProfId3PT=numero registrazione commerciale ProfId4PT=Conservatorio -ProfId5PT=Codice EORI +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=Ninea @@ -255,7 +263,7 @@ ProfId1RO=Prof ID 1 (CUI) ProfId2RO=Prof ID 2 (Nr. Immatricolazione) ProfId3RO=Prof ID 3 (CAEN) ProfId4RO=Prof ID 5 (EUID) -ProfId5RO=Codice EORI +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=OGRN ProfId2RU=INN @@ -400,7 +408,7 @@ ExportCardToFormat=Esportazione scheda nel formato ContactNotLinkedToCompany=Contatto non collegato ad alcuna società DolibarrLogin=Dolibarr login NoDolibarrAccess=Senza accesso a Dolibarr -ExportDataset_company_1=Third-parties (companies/foundations/physical people) and their properties +ExportDataset_company_1=Soggetti terzi (aziende, fondazioni, persone fisiche) e dettagli ExportDataset_company_2=Contatti e loro attributi ImportDataset_company_1=Third-parties and their properties ImportDataset_company_2=Third-parties additional contacts/addresses and attributes @@ -441,7 +449,7 @@ CurrentOutstandingBill=Fatture scadute OutstandingBill=Max. fattura in sospeso OutstandingBillReached=Raggiunto il massimo numero di fatture scadute OrderMinAmount=Quantità minima per l'ordine -MonkeyNumRefModelDesc=Restituisce un numero con formato %syymm-nnnn per il codice cliente e %syymm-nnnn per il codice fornitore, in cui yy è l'anno, mm è il mese e nnnn è una sequenza progressiva senza interruzioni e che non ritorna a 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Codice cliente/fornitore libero. Questo codice può essere modificato in qualsiasi momento. ManagingDirectors=Nome Manager(s) (CEO, direttore, presidente...) MergeOriginThirdparty=Duplica soggetto terzo (soggetto terzo che stai eliminando) diff --git a/htdocs/langs/it_IT/compta.lang b/htdocs/langs/it_IT/compta.lang index a7638fb2824..0ef1e6a1a0c 100644 --- a/htdocs/langs/it_IT/compta.lang +++ b/htdocs/langs/it_IT/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=IVA incassata StatusToPay=Pagare SpecialExpensesArea=Area per pagamenti straordinari +VATExpensesArea=Area for all TVA payments SocialContribution=Tassa o contributo SocialContributions=Tasse o contributi SocialContributionsDeductibles=Tasse o contributi deducibili @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Pagamento fattura attiva PaymentSupplierInvoice=pagamento fattura fornitore PaymentSocialContribution=Pagamento delle imposte sociali/fiscali PaymentVat=Pagamento IVA +AutomaticCreationPayment=Automatically record the payment ListPayment=Elenco dei pagamenti ListOfCustomerPayments=Elenco dei pagamenti dei clienti ListOfSupplierPayments=Elenco dei pagamenti fornitore @@ -104,6 +106,8 @@ LT2PaymentES=Pagamento IRPF (Spagna) LT2PaymentsES=Pagamenti IRPF (Spagna) VATPayment=Pagamento IVA VATPayments=Pagamenti IVA +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Rimborso IVA NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=Nessun assegno in attesa di deposito. DateChequeReceived=Data di ricezione assegno NbOfCheques=No. of checks PaySocialContribution=Paga tassa/contributo -ConfirmPaySocialContribution=Sei sicuro di voler classificare questa tassa/contributo come pagato? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Cancella il pagamento della tassa/contributo -ConfirmDeleteSocialContribution=Sei sicuro di voler cancellare il pagamento di questa tassa/contributo? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Tasse/contributi e pagamenti CalcModeVATDebt=Modalità <b>%sIVA su contabilità d'impegno%s</b>. CalcModeVATEngagement=Calcola <b>%sIVA su entrate-uscite%s</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Include i pagamenti reali di fatture, spese e IVA. <br>- Si b RulesCADue=- Include le fatture scadute del cliente indipendentemente dal fatto che siano pagate o meno. <br> - Si basa sulla data di fatturazione di queste fatture. <br> RulesCAIn=- Comprende le fatture effettivamente pagate dai clienti.<br/>- Si basa sulla data dei pagamenti.<br/> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Report per IVA cliente riscossa e pagata VATReportByQuartersInInputOutputMode=Resoconto imposte di vendita, sia riscosse che pagate +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Sottotipo Pcg InvoiceLinesToDispatch=Riga di fattura da spedire *consegnare ByProductsAndServices=Per prodotti e servizi RefExt=Referente esterno -ToCreateAPredefinedInvoice=Per creare un modello di fattura, crea una fattura standard e poi, senza convalidarla, clicca sul pulsante "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Collega a ordine Mode1=Metodo 1 Mode2=Metodo 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clona nel mese successivo SimpleReport=Report semplice AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Per aliquota iva di vendita TurnoverbyVatrate=Fatturato per aliquota iva di vendita TurnoverCollectedbyVatrate=Fatturato per aliquota iva di vendita @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Fatturato di acquisto raccolto RulesPurchaseTurnoverDue=- Include le fatture scadute del fornitore, che siano pagate o meno. <br> - Si basa sulla data di fatturazione di queste fatture. <br> RulesPurchaseTurnoverIn=- Comprende tutti i pagamenti effettivi delle fatture effettuate ai fornitori. <br> - Si basa sulla data di pagamento di queste fatture <br> RulesPurchaseTurnoverTotalPurchaseJournal=Include tutte le righe di addebito dal giornale di registrazione acquisti. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Fatturato di acquisto fatturato ReportPurchaseTurnoverCollected=Fatturato di acquisto raccolto IncludeVarpaysInResults = Includere vari pagamenti nei rapporti diff --git a/htdocs/langs/it_IT/ecm.lang b/htdocs/langs/it_IT/ecm.lang index 0eef308f02a..d08a079e0d9 100644 --- a/htdocs/langs/it_IT/ecm.lang +++ b/htdocs/langs/it_IT/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File non indicizzato nel database (prova a caricarlo ExtraFieldsEcmFiles=File Ecm campi extra ExtraFieldsEcmDirectories=Directory Ecm campi extra ECMSetup=Configurazione ECM +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/it_IT/errors.lang b/htdocs/langs/it_IT/errors.lang index ec5b4234b48..9841a0c1b03 100644 --- a/htdocs/langs/it_IT/errors.lang +++ b/htdocs/langs/it_IT/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> non trovata (percorso errato, permessi erra ErrorFunctionNotAvailableInPHP=Per questa funzione occorre l'estensione <b>%s</b>, ma non è disponibile in questa versione/configurazione di PHP. ErrorDirAlreadyExists=Esiste già una directory con questo nome. ErrorFileAlreadyExists=Esiste già un file con questo nome. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File non completamente ricevuto dal server. ErrorNoTmpDir=La directory temporanea %s non esiste. ErrorUploadBlockedByAddon=Upload bloccato da un plugin di Apache/PHP @@ -213,7 +214,7 @@ ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' ErrorTooManyErrorsProcessStopped=Troppi errori. Il processo è stato bloccato. ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Mass validation is not possible when option to increase/decrease stock is set on this action (you must validate one by one so you can define the warehouse to increase/decrease) ErrorObjectMustHaveStatusDraftToBeValidated=Object %s must have status 'Draft' to be validated. -ErrorObjectMustHaveLinesToBeValidated=Object %s must have lines to be validated. +ErrorObjectMustHaveLinesToBeValidated=L'oggetto %s deve contenere almeno una riga per essere convalidato. ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Only validated invoices can be sent using the "Send by email" mass action. ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a predefined product or not ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Error, the new reference is already used ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Errore! Impossibile eliminare un pagamento collegato ad una fattura Pagata. ErrorSearchCriteriaTooSmall=Search criteria too small. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=L'interfaccia pubblica non è stata abilitata ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/it_IT/externalsite.lang b/htdocs/langs/it_IT/externalsite.lang index c0610ca571d..98a9f5ba9fb 100644 --- a/htdocs/langs/it_IT/externalsite.lang +++ b/htdocs/langs/it_IT/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Imposta collegamento a sito esterno -ExternalSiteURL=Indirizzo del sito esterno +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Il modulo ExternalSite non è configurato correttamente. ExampleMyMenuEntry=La mia voce di menu diff --git a/htdocs/langs/it_IT/main.lang b/htdocs/langs/it_IT/main.lang index b7ba2b5fe0e..839b58d9f6c 100644 --- a/htdocs/langs/it_IT/main.lang +++ b/htdocs/langs/it_IT/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Data modif. IPModification=Modification IP DateLastModification=Data ultima modifica DateValidation=Data di convalida +DateSigning=Signing date DateClosing=Data di chiusura DateDue=Data di scadenza DateValue=Data di valuta @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Prezzo unitario (netto) (valuta) UnitPriceTTC=Prezzo unitario (lordo) PriceU=P.U. PriceUHT=P.U.(netto) -PriceUHTCurrency=P.U. (valuta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=P.U.(lordo) Amount=Importo AmountInvoice=Importo della fattura @@ -389,6 +390,8 @@ AmountTotal=Importo totale AmountAverage=Importo medio PriceQtyMinHT=Prezzo quantità min. tasse escluse PriceQtyMinHTCurrency=Prezzo per quantità min. (tasse escluse) (valuta) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentuale Total=Totale SubTotal=Totale parziale @@ -523,7 +526,7 @@ Draft=Bozza Drafts=Bozze StatusInterInvoiced=Fatturato Validated=Convalidato -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Convalidato (da produrre) Opened=Aperto OpenAll=Open (All) ClosedAll=Closed (All) @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Lingua dell'utente CurrentTheme=Tema attuale CurrentMenuManager=Gestore dei menu attuale @@ -870,8 +873,8 @@ TooManyRecordForMassAction=Too many records selected for mass action. The action NoRecordSelected=Nessun record selezionato MassFilesArea=File creati da azioni di massa ShowTempMassFilesArea=Mostra i file creati da azioni di massa -ConfirmMassDeletion=Bulk Delete confirmation -ConfirmMassDeletionQuestion=Are you sure you want to delete the %s selected record(s)? +ConfirmMassDeletion=Conferma eliminazione massiva +ConfirmMassDeletionQuestion=Vuoi davvero eliminare %s record selezionati? RelatedObjects=Oggetti correlati ClassifyBilled=Classificare fatturata ClassifyUnbilled=Classifica non pagata @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Rimuovi la stringa '%s' SomeTranslationAreUncomplete=Alcune traduzioni potrebbero essere incomplete, o contenere errori. In questi casi, registrandoti su <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">transifex.com/projects/p/dolibarr/</a>, avrai la possibilità di proporre modifiche, contribuendo così al miglioramento di Dolibarr. -DirectDownloadLink=Link diretto per il download (pubblico/esterno) -DirectDownloadInternalLink=Link per il download diretto (richiede accesso e permessi validi) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Scarica documento ActualizeCurrency=Aggiorna tasso di cambio @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contatti SearchIntoMembers=Membri SearchIntoUsers=Utenti SearchIntoProductsOrServices=Prodotti o servizi +SearchIntoBatch=Lots / Serials SearchIntoProjects=Progetti SearchIntoMO=Ordini di produzione SearchIntoTasks=Compiti @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tasto scelta rapida AssignedTo=Azione assegnata a Deletedraft=Elimina bozza ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File condiviso con un link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Seleziona prima un Soggetto terzo... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventario AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Mostra maggiori informazioni NoFilesUploadedYet=Please upload a document first SeePrivateNote=Vedi nota privata @@ -1109,7 +1116,7 @@ APPROVEDInDolibarr=Record %s approved DefaultMailModel=Default Mail Model PublicVendorName=Public name of vendor DateOfBirth=Data di nascita -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Token di autenticazione non più valido, azione eliminata. Prego riprovare UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/it_IT/margins.lang b/htdocs/langs/it_IT/margins.lang index ca1f9ef2849..5fbef6dd78e 100644 --- a/htdocs/langs/it_IT/margins.lang +++ b/htdocs/langs/it_IT/margins.lang @@ -22,7 +22,7 @@ ProductService=Prodotto o servizio AllProducts=Tutti i prodotti e servizi ChooseProduct/Service=Scegli prodotto o servizio 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Metodo di margine per sconti globali UseDiscountAsProduct=Come prodotto UseDiscountAsService=Come servizio diff --git a/htdocs/langs/it_IT/members.lang b/htdocs/langs/it_IT/members.lang index 6cc29b824a4..a4e6d97dacb 100644 --- a/htdocs/langs/it_IT/members.lang +++ b/htdocs/langs/it_IT/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Elenco dei membri del progetto (da convalidare) MembersListValid=Elenco dei membri validi MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Elenco dei membri qualificati MenuMembersToValidate=Membri da convalidare MenuMembersValidated=Membri convalidati +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Membri con adesione da riscuotere MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Scaduta MemberStatusPaid=Adesione aggiornata MemberStatusPaidShort=Aggiornata +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Membri da convalidare +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Convalidato (nessun abbonamento necessario) MemberStatusNoSubscriptionShort=convalidato @@ -82,6 +87,8 @@ Physical=Fisica Moral=Giuridica MorAndPhy=Moral and Physical Reenable=Riattivare +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Elimina membro @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Formato etichette DescADHERENT_ETIQUETTE_TEXT=Testo da stampare nel campo indirizzo di un membro @@ -162,6 +170,7 @@ DocForLabels=Genera etichette con indirizzi (formato di output impostato: <b>%s< SubscriptionPayment=Pagamento adesione LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Statistiche per paese MembersStatisticsByState=Statistiche per stato/provincia MembersStatisticsByTown=Statistiche per città diff --git a/htdocs/langs/it_IT/modulebuilder.lang b/htdocs/langs/it_IT/modulebuilder.lang index 12630bc2936..1dfd74bba94 100644 --- a/htdocs/langs/it_IT/modulebuilder.lang +++ b/htdocs/langs/it_IT/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Desidero generare alcuni documenti da questo oggetto 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=Chiave per tooltip -CSSClass=Classe CSS +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Non modificabile ForeignKey=Chiave esterna TypeOfFieldsHelp=Tipo di campi: <br> 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) diff --git a/htdocs/langs/it_IT/orders.lang b/htdocs/langs/it_IT/orders.lang index 2a3069cbb23..2929e323c70 100644 --- a/htdocs/langs/it_IT/orders.lang +++ b/htdocs/langs/it_IT/orders.lang @@ -16,6 +16,8 @@ ToOrder=Ordinare MakeOrder=Fare ordine SupplierOrder=Ordine d'acquisto SuppliersOrders=Ordini d'acquisto +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Ordini d'acquisto in corso CustomerOrder=Sales Order CustomersOrders=Ordini Cliente @@ -85,7 +87,7 @@ LastModifiedOrders=ultimi %s ordini modificati AllOrders=Tutti gli ordini NbOfOrders=Numero di ordini OrdersStatistics=Statistiche ordini -OrdersStatisticsSuppliers=Purchase order statistics +OrdersStatisticsSuppliers=Stastistiche ordini d'acquisto NumberOfOrdersByMonth=Numero di ordini per mese AmountOfOrdersByMonthHT=Importo ordini per mese (al netto delle imposte) ListOfOrders=Elenco degli ordini @@ -113,11 +115,11 @@ AuthorRequest=Autore della richiesta UserWithApproveOrderGrant=Utente autorizzato ad approvare ordini PaymentOrderRef=Riferimento pagamento ordine %s ConfirmCloneOrder=Vuoi davvero clonare l'ordine <b>%s</b>? -DispatchSupplierOrder=Receiving purchase order %s +DispatchSupplierOrder=Ricezione dell'ordine di acquisto %s FirstApprovalAlreadyDone=Prima approvazione già fatta SecondApprovalAlreadyDone=Seconda approvazione già fatta -SupplierOrderReceivedInDolibarr=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted +SupplierOrderReceivedInDolibarr=Ordine fornitore %s ricevuto %s +SupplierOrderSubmitedInDolibarr=Ordine di acquisto %s inviato SupplierOrderClassifiedBilled=Purchase Order %s set billed OtherOrders=Altri ordini ##### Types de contacts ##### diff --git a/htdocs/langs/it_IT/other.lang b/htdocs/langs/it_IT/other.lang index 31a5514c3b0..de5e093c618 100644 --- a/htdocs/langs/it_IT/other.lang +++ b/htdocs/langs/it_IT/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Gestire una piccola o media azienda con più attività (tutti i m CreatedBy=Creato da %s ModifiedBy=Modificato da %s ValidatedBy=Convalidato da %s +SignedBy=Signed by %s ClosedBy=Chiuso da %s CreatedById=Id utente che ha creato ModifiedById=Id utente ultima modifica @@ -244,6 +245,7 @@ NewKeyIs=Queste sono le tue nuove credenziali di accesso NewKeyWillBe=Le tue nuove credenziali per loggare al software sono ClickHereToGoTo=Clicca qui per andare a %s YouMustClickToChange=Devi cliccare sul seguente link per validare il cambio della password +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Se non hai richiesto questo cambio, lascia perdere questa mail. Le tue credenziali sono mantenute al sicuro. IfAmountHigherThan=Se l'importo è superiore a <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/it_IT/productbatch.lang b/htdocs/langs/it_IT/productbatch.lang index 94881e30be0..805186c19ab 100644 --- a/htdocs/langs/it_IT/productbatch.lang +++ b/htdocs/langs/it_IT/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Usa lotto/numero di serie -ProductStatusOnBatch=Sì (è richiesto il lotto/numero di serie) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (è richiesto il lotto/numero di serie) -ProductStatusOnBatchShort=Sì +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lotto/numero di serie atleast1batchfield=Data di scadenza o lotto/numero di serie @@ -22,3 +24,12 @@ ProductLotSetup=Configurazione del modulo lotto/numero di serie ShowCurrentStockOfLot=Mostra la scorta disponibile per la coppia prodotto/lotto ShowLogOfMovementIfLot=Mostra il log dei movimenti per la coppia prodotto/lotto StockDetailPerBatch=Dettagli magazzino per lotto +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/it_IT/products.lang b/htdocs/langs/it_IT/products.lang index dfc71f3ed8f..3a648b2422a 100644 --- a/htdocs/langs/it_IT/products.lang +++ b/htdocs/langs/it_IT/products.lang @@ -64,7 +64,7 @@ ProductStatusNotOnSellShort=Non in vendita ProductStatusOnBuy=Acquistabile ProductStatusNotOnBuy=Da non acquistare ProductStatusOnBuyShort=Acquistabile -ProductStatusNotOnBuyShort=Obsoleto +ProductStatusNotOnBuyShort=Da non acquistare UpdateVAT=Aggiorna iva UpdateDefaultPrice=Aggiornamento prezzo predefinito UpdateLevelPrices=Aggiorna prezzi per ogni livello @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Aliquota IVA (per questo fornitore / prodotto) DiscountQtyMin=Sconto per questa quantità NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Prodotto predefinito PredefinedServicesToSell=Servizio predefinito PredefinedProductsAndServicesToSell=Prodotti/servizi predefiniti per la vendita @@ -313,7 +314,7 @@ LastUpdated=Ultimo aggiornamento CorrectlyUpdated=Aggiornato correttamente PropalMergePdfProductActualFile=I file utilizzano per aggiungere in PDF Azzurra sono / è PropalMergePdfProductChooseFile=Selezionare i file PDF -IncludingProductWithTag=Compreso prodotto/servizio con tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Prezzo predefinito, prezzo reale può dipendere cliente WarningSelectOneDocument=Seleziona almeno un documento DefaultUnitToShow=Unità diff --git a/htdocs/langs/it_IT/projects.lang b/htdocs/langs/it_IT/projects.lang index b30159947c7..315dbd04e4a 100644 --- a/htdocs/langs/it_IT/projects.lang +++ b/htdocs/langs/it_IT/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Elenco dei compiti GoToListOfTimeConsumed=Vai all'elenco del tempo impiegato GanttView=Vista Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Elenco delle proposte commerciali relative al progetto ListOrdersAssociatedProject=Elenco degli ordini cliente relativi al progetto ListInvoicesAssociatedProject=Elenco delle fatture cliente associate al progetto @@ -268,3 +269,7 @@ OneLinePerTask=Una riga per compito OneLinePerPeriod=Una riga per periodo RefTaskParent=Ref. Attività genitore ProfitIsCalculatedWith=Il profitto viene calcolato utilizzando +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/it_IT/propal.lang b/htdocs/langs/it_IT/propal.lang index 7eb57f84fb0..c6e224b8793 100644 --- a/htdocs/langs/it_IT/propal.lang +++ b/htdocs/langs/it_IT/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=Vuoi davvero clonare il preventivo<b>%s</b>? ConfirmReOpenProp=Vuoi davvero riaprire il preventivo <b>%s</b>? ProposalsAndProposalsLines=Preventivo e righe ProposalLine=Riga di preventivo +ProposalLines=Proposal lines AvailabilityPeriod=Tempi di consegna SetAvailability=Imposta i tempi di consegna AfterOrder=dopo ordine diff --git a/htdocs/langs/it_IT/stocks.lang b/htdocs/langs/it_IT/stocks.lang index b2da8fe996d..161a6eea248 100644 --- a/htdocs/langs/it_IT/stocks.lang +++ b/htdocs/langs/it_IT/stocks.lang @@ -19,8 +19,8 @@ Stock=Scorta Stocks=Scorte MissingStocks=Scorte mancanti StockAtDate=Scorte alla data -StockAtDateInPast=Data nel passato -StockAtDateInFuture=Data in futuro +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Scorte per lotto / seriale LotSerial=Lotti / Seriali LotSerialList=Elenco lotti / seriali @@ -37,8 +37,8 @@ AllWarehouses=Tutti i magazzini IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Includi anche bozze di ordini Location=Ubicazione -LocationSummary=Ubicazione abbreviata -NumberOfDifferentProducts=Numero di differenti prodotti +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Numero totale prodotti LastMovement=Ultimo movimento LastMovements=Ultimi movimenti @@ -62,7 +62,8 @@ 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=Regola per i magazzini -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Imposta un magazzino sugli ordini di vendita UserDefaultWarehouse=Imposta un magazzino per gli utenti MainDefaultWarehouse=Magazzino predefinito @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Stock virtuale alla data -VirtualStockAtDateDesc=Stock virtuale una volta terminati tutti gli ordini in sospeso che si prevede di eseguire prima della data +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished 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.) +AtDate=At date 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 ponderata prezzo -AverageUnitPricePMPDesc=Il prezzo unitario medio di input che abbiamo dovuto pagare ai fornitori per ottenere il prodotto nel nostro magazzino. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Prezzo di vendita unitario EstimatedStockValueSellShort=Valori di vendita EstimatedStockValueSell=Valori di vendita @@ -145,7 +147,7 @@ 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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Ricezioni per questo ordine StockMovementRecorded=Movimentazione di scorte registrata @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Etichetta per lo spostamento di magazzino -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Codice di inventario o di spostamento IsInPackage=Contenuto nel pacchetto @@ -183,6 +185,7 @@ inventoryCreatePermission=Crea nuovo inventario inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventario inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -225,20 +228,30 @@ ListInventory=Elenco StockSupportServices=Stock management supports Services StockSupportServicesDesc=By default, you can stock only products of type "product". You may also stock a product of type "service" if both module Services and this option are enabled. ReceiveProducts=Ricevi prodotti -StockIncreaseAfterCorrectTransfer=Increase by correction/transfer -StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer -StockIncrease=Stock increase -StockDecrease=Stock decrease +StockIncreaseAfterCorrectTransfer=Aumento tramite correzione/trasferimento +StockDecreaseAfterCorrectTransfer=Diminuzione tramite correzione/trasferimento +StockIncrease=Aumento scorte +StockDecrease=Diminuzione scorte InventoryForASpecificWarehouse=Inventario per un magazzino specifico InventoryForASpecificProduct=Inventario per un prodotto specifico 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Scorta attuale InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Scegli il file da importare e poi clicca sull'icona %s +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Riapri +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/it_IT/suppliers.lang b/htdocs/langs/it_IT/suppliers.lang index e178c00850b..c963ccaa797 100644 --- a/htdocs/langs/it_IT/suppliers.lang +++ b/htdocs/langs/it_IT/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Fornitori SuppliersInvoice=Fattura fornitore +SupplierInvoices=Fatture Fornitore ShowSupplierInvoice=Vedi fattura fornitore NewSupplier=Nuovo fornitore History=Storico diff --git a/htdocs/langs/it_IT/ticket.lang b/htdocs/langs/it_IT/ticket.lang index e40b57082bf..84791ff6656 100644 --- a/htdocs/langs/it_IT/ticket.lang +++ b/htdocs/langs/it_IT/ticket.lang @@ -19,17 +19,17 @@ # Module56000Name=Ticket -Module56000Desc=Sistema di ticket per la gestione di problemi o richieste +Module56000Desc=Sistema di tickets per la gestione di problemi o richieste Permission56001=Visualizza tickets -Permission56002=Modify tickets -Permission56003=Delete tickets +Permission56002=Modifica tickets +Permission56003=Cancella tickets Permission56004=Manage tickets Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on) -TicketDictType=Ticket - Types -TicketDictCategory=Ticket - Groupes -TicketDictSeverity=Ticket - Severities +TicketDictType=Ticket - Tipologie +TicketDictCategory=Ticket - Gruppi +TicketDictSeverity=Ticket - Importanza TicketDictResolution=Ticket - Risoluzione TicketTypeShortCOM=Commercial question @@ -45,13 +45,13 @@ TicketSeverityShortHIGH=Alto TicketSeverityShortBLOCKING=Critico, bloccante ErrorBadEmailAddress=Campo '%s' non corretto -MenuTicketMyAssign=My tickets -MenuTicketMyAssignNonClosed=My open tickets -MenuListNonClosed=Open tickets +MenuTicketMyAssign=Miei tickets +MenuTicketMyAssignNonClosed=Miei tickets aperti +MenuListNonClosed=Tickets aperti TypeContact_ticket_internal_CONTRIBUTOR=Contributore -TypeContact_ticket_internal_SUPPORTTEC=Assigned user -TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking +TypeContact_ticket_internal_SUPPORTTEC=Assegnato a +TypeContact_ticket_external_SUPPORTCLI=Contatto cliente / tracciamento incidente TypeContact_ticket_external_CONTRIBUTOR=External contributor OriginEmail=Email source @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tipo Severity=Gravità +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Per inviare e-mail dal messaggio ticket @@ -77,7 +79,7 @@ MailToSendTicketMessage=Per inviare e-mail dal messaggio ticket # # Admin page # -TicketSetup=Ticket module setup +TicketSetup=Ticket impostazioni TicketSettings=Impostazioni TicketSetupPage= TicketPublicAccess=A public interface requiring no identification is available at the following url @@ -97,7 +99,7 @@ PublicInterface=Interfaccia pubblica TicketUrlPublicInterfaceLabelAdmin=Alternative URL for public interface TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the server must act as a proxy on this new URL) TicketPublicInterfaceTextHomeLabelAdmin=Welcome text of the public interface -TicketPublicInterfaceTextHome=You can create a support ticket or view existing from its identifier tracking ticket. +TicketPublicInterfaceTextHome=Puoi creare una richiesta si assistenza/supporto oppure visualizzarne uno esistente con il suo numero ID di richiesta. TicketPublicInterfaceTextHomeHelpAdmin=The text defined here will appear on the home page of the public interface. TicketPublicInterfaceTopicLabelAdmin=Interface title TicketPublicInterfaceTopicHelp=This text will appear as the title of the public interface. @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Attivare l'interfaccia pubblica @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Modelli di documenti per i ticket TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Invia e-mail quando viene aggiunto un nuovo messaggio +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -155,7 +157,7 @@ CreateTicket=Create ticket EditTicket=Edita ticket TicketsManagement=Gestione dei ticket CreatedBy=Creato da -NewTicket=New Ticket +NewTicket=Nuovo Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type TicketCategory=Gruppo @@ -198,7 +200,7 @@ TicketGoIntoContactTab=Please go into "Contacts" tab to select them TicketMessageMailIntro=Introduction TicketMessageMailIntroHelp=Questo testo viene aggiunto solo all'inizio dell'email e non verrà salvato TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email -TicketMessageMailIntroText=Hello,<br>A new response was sent on a ticket that you contact. Here is the message:<br> +TicketMessageMailIntroText=Buongiorno,<br>Abbiamo risposto alla sua richiesta. Messaggio:<br> TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket. TicketMessageMailSignature=Firma TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved. @@ -251,32 +253,32 @@ ShowListTicketWithTrackId=Visualizza l'elenco dei ticket dall'ID traccia ShowTicketWithTrackId=Display ticket from track ID 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=Conferma creazione ticket - Rif. %s (ID biglietto pubblico %s) -TicketNewEmailSubjectCustomer=New support ticket +MesgInfosPublicTicketCreatedWithTrackId=Un nuovo ticket è stato creato con ID: %s e Rif: %s. +PleaseRememberThisId=Conserva il numero di richiesta, potrebbe essere utile per risalire velocemente al suo ticket. +TicketNewEmailSubject=Conferma creazione ticket - Rif. %s (Numero ID della richiesta: %s) +TicketNewEmailSubjectCustomer=Nuovo ticket di supporto 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. -TicketNewEmailBodyInfosTicket=Information for monitoring the ticket -TicketNewEmailBodyInfosTrackId=Ticket tracking number: %s +TicketNewEmailBodyInfosTicket=Informazioni utili per tua richiesta +TicketNewEmailBodyInfosTrackId=Numero ID della tua richiesta: %s TicketNewEmailBodyInfosTrackUrl=Puoi seguire l'avanzamento del ticket cliccando il link qui sopra TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket in the specific interface by clicking the following link TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface. TicketPublicInfoCreateTicket=Questo modulo consente di registrare un ticket di supporto nel nostro sistema di gestione ticketing. TicketPublicPleaseBeAccuratelyDescribe=Descrivi il problema dettagliatamente. Fornisci più informazioni possibili per consentirci di identificare la tua richiesta. -TicketPublicMsgViewLogIn=Please enter ticket tracking ID +TicketPublicMsgViewLogIn=Inserisci qui il numero della sua richista ID TicketTrackId=Public Tracking ID OneOfTicketTrackId=One of your tracking ID -ErrorTicketNotFound=Ticket with tracking ID %s not found! +ErrorTicketNotFound=Richiesta numero ID %s non trovata! Subject=Oggetto ViewTicket=Vedi ticket ViewMyTicketList=Vedi l'elenco dei miei ticket ErrorEmailMustExistToCreateTicket=Error: email address not found in our database -TicketNewEmailSubjectAdmin=Nuovo biglietto creato - Rif. %s (ID biglietto pubblico %s) +TicketNewEmailSubjectAdmin=Nuovo ticket creato - Rif. %s (ID biglietto pubblico %s) TicketNewEmailBodyAdmin=<p>Ticket has just been created with ID #%s, see information:</p> SeeThisTicketIntomanagementInterface=See ticket in management interface TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled -ErrorEmailOrTrackingInvalid=Bad value for tracking ID or email +ErrorEmailOrTrackingInvalid=Numero richiesta ID o email errata OldUser=Old user NewUser=Nuovo utente NumberOfTicketsByMonth=Numero di ticket per mese @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/it_IT/users.lang b/htdocs/langs/it_IT/users.lang index 199b2cb1d45..cc86bc427f5 100644 --- a/htdocs/langs/it_IT/users.lang +++ b/htdocs/langs/it_IT/users.lang @@ -68,11 +68,11 @@ CreateDolibarrThirdParty=Crea soggetto terzo LoginAccountDisableInDolibarr=Account disattivato in Dolibarr UsePersonalValue=Usa valore personalizzato InternalUser=Utente interno -ExportDataset_user_1=Users and their properties +ExportDataset_user_1=Utenti e dettagli DomainUser=Utente di dominio %s Reactivate=Riattiva CreateInternalUserDesc=Questo modulo permette di creare un utente interno per la vostra Azienda/Fondazione. Per creare un utente esterno (cliente, fornitore, ...), utilizzare il pulsante "Crea utente" nella scheda soggetti terzi. -InternalExternalDesc=Un utente <b> interno </b> è un utente che fa parte della tua azienda / organizzazione. <br> Un utente <b> esterno </b> è 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). <br> <br> 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) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Autorizzazioni ereditate dall'appartenenza al gruppo. Inherited=Ereditato UserWillBe=L'utente creato sarà diff --git a/htdocs/langs/it_IT/website.lang b/htdocs/langs/it_IT/website.lang index 64f05d19a0a..b6762895710 100644 --- a/htdocs/langs/it_IT/website.lang +++ b/htdocs/langs/it_IT/website.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - website Shortname=Codice -WebsiteSetupDesc=Create here the websites you wish to use. Then go into menu Websites to edit them. +WebsiteSetupDesc=Crea qui i siti web che desideri utilizzare. Quindi vai nel menu Siti Web per modificarli. DeleteWebsite=Cancella sito web -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=Sei sicuro di voler eliminare questo sito web? Verranno rimosse anche tutte le pagine e i suoi contenuti. I file caricati (come quelli nella directory medias, nel modulo ECM, ...) non verranno cancellati. WEBSITE_TYPE_CONTAINER=Type of page/container WEBSITE_PAGE_EXAMPLE=Web page to use as example WEBSITE_PAGENAME=Titolo/alias della pagina @@ -46,12 +46,12 @@ SetHereVirtualHost= <u> Usa con Apache / NGinx / ... </u> <br> Crea sul tuo serv ExampleToUseInApacheVirtualHostConfig=Esempio da utilizzare nella configurazione dell'host virtuale Apache: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Controlla anche che l'utente dell'host virtuale (ad esempio www-data) abbia <strong> %s </strong> le autorizzazioni sui file in <br> <strong> %s ReadPerm=Da leggere WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr= <u> Anteprima %s in una nuova scheda. </u> <br> <br> %s sarà servito dal server Dolibarr pertanto non è necessario alcun server web aggiuntivo (come Apache, Nginx, IIS) per essere installato. <br> L'inconveniente è che gli URL delle pagine non sono facili da usare e iniziano con il percorso del tuo Dolibarr. <br> URL servito da Dolibarr: <br> <strong> %s </strong> <br> <br> Per utilizzare il proprio server web esterno per servire questo sito, creare un host virtuale sul server Web che punta sulla directory <br> <strong> %s </strong> <br> quindi immettere il nome di questo server virtuale nelle proprietà di questo sito Web e fare clic sul collegamento "Test / Distribuisci sul Web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -91,9 +91,9 @@ YouMustDefineTheHomePage=You must first define the default Home 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. <br> 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 -WebsiteRootOfImages=Root directory for website images -SubdirOfPage=Sub-directory dedicated to page +ImagesShouldBeSavedInto=Le immagini devono essere salvate in una cartella +WebsiteRootOfImages=Cartella principale per le immagini del sito +SubdirOfPage=Cartella dedicata alla pagina AliasPageAlreadyExists=Alias page <strong>%s</strong> already exists CorporateHomePage=Corporate Home page EmptyPage=Empty page @@ -137,3 +137,11 @@ PagesRegenerated=%s pagina(e)/contenitore(i) rigenerato RegenerateWebsiteContent=Rigenera i file della cache del sito web AllowedInFrames=Consentito nel frame DefineListOfAltLanguagesInWebsiteProperties=Definisce l'elenco di tutte le lingue disponibili nelle proprietà del sito web. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/it_IT/zapier.lang b/htdocs/langs/it_IT/zapier.lang index 5ec7be329d2..93f50b1fd94 100644 --- a/htdocs/langs/it_IT/zapier.lang +++ b/htdocs/langs/it_IT/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier per Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier per modulo Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Installazione di Zapier per Dolibarr +ZapierForDolibarrSetup=Installazione di Zapier per Dolibarr ZapierDescription=Interfaccia con Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ja_JP/accountancy.lang b/htdocs/langs/ja_JP/accountancy.lang index 5b7b279db04..3a11fa8d804 100644 --- a/htdocs/langs/ja_JP/accountancy.lang +++ b/htdocs/langs/ja_JP/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=請求書の境界線 ExpenseReportLines=紐付けする経費報告書の行 ExpenseReportLinesDone=経費報告書の境界線 IntoAccount=会計科目との紐付け行 -TotalForAccount=会計科目の合計 +TotalForAccount=総会計勘定 Ventilate=紐付 @@ -209,7 +209,7 @@ Codejournal=仕訳帳 JournalLabel=仕訳帳ラベル NumPiece=個数番号 TransactionNumShort=数トランザクション -AccountingCategory=パーソナライズされたグループ +AccountingCategory=カスタムグループ GroupByAccountAccounting=総勘定元帳勘定によるグループ化 GroupBySubAccountAccounting=補助元帳アカウントでグループ化 AccountingAccountGroupsDesc=ここで、会計科目のいくつかのグループを定義できる。それらは、パーソナライズされた会計レポートに使用される。 @@ -279,8 +279,8 @@ DescVentilDoneExpenseReport=経費報告書の行とその手数料会計科目 Closure=年次閉鎖 DescClosure=検証されていない月ごとの動きの数とすでに開いている会計年度をここで参照すること OverviewOfMovementsNotValidated=ステップ1 /検証されていない動きの概要。 (決算期に必要) -AllMovementsWereRecordedAsValidated=すべての動きは検証済みとして記録された -NotAllMovementsCouldBeRecordedAsValidated=すべての動きを検証済みとして記録できるわけではない +AllMovementsWereRecordedAsValidated=すべての動きは検証済として記録された +NotAllMovementsCouldBeRecordedAsValidated=すべての動きを検証済として記録できるわけではない ValidateMovements=動きを検証する DescValidateMovements=書き込み、レタリング、削除の変更または削除は禁止される。演習のすべてのエントリを検証する必要がある。検証しないと、閉じることができない。 @@ -385,7 +385,7 @@ SaleEECWithoutVATNumber=VATなしのEECでの販売ですが、取引先のVATID ## Dictionary Range=会計科目の範囲 -Calculated=計算済み +Calculated=計算済 Formula=式 ## Error @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=まだ紐付けされていない行。メニュー<a ## Import ImportAccountingEntries=会計仕訳 +ImportAccountingEntriesFECFormat=会計項目 - FEC形式 +FECFormatJournalCode=コード 日記帳 (JournalCode) +FECFormatJournalLabel=ラベル 日記帳 (JournalLib) +FECFormatEntryNum=単体番号 (EcritureNum) +FECFormatEntryDate=単体日付 (EcritureDate) +FECFormatGeneralAccountNumber=一般勘定番号 (CompteNum) +FECFormatGeneralAccountLabel=一般勘定ラベル (CompteLib) +FECFormatSubledgerAccountNumber=補助元帳勘定番号 (CompAuxNum) +FECFormatSubledgerAccountLabel=補助元帳勘定番号 (CompAuxLib) +FECFormatPieceRef=単体識別符号 (PieceRef) +FECFormatPieceDate=単体日付作成 (PieceDate) +FECFormatLabelOperation=ラベル 運用 (EcritureLib) +FECFormatDebit=借方 (Debit) +FECFormatCredit=貸方(Credit) +FECFormatReconcilableCode=調整可能なコード (EcritureLet) +FECFormatReconcilableDate=調整可能日付 (DateLet) +FECFormatValidateDate=検証された単体日付 (ValidDate) +FECFormatMulticurrencyAmount=多通貨額 (Montantdevise) +FECFormatMulticurrencyCode=他通貨 コード (Idevise) + DateExport=日付のエクスポート WarningReportNotReliable=警告、このレポートは元帳に基づいていないため、元帳で手動で変更されたトランザクションは含まれていない。仕訳帳化が最新の場合、簿記ビューはより正確です。 ExpenseReportJournal=経費報告仕訳帳 InventoryJournal=在庫仕訳帳 + +NAccounts=%sアカウント diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index fc6e2f4da0b..0cfbdae5f0d 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=接続ロックを解除する YourSession=あなたのセッション Sessions=利用者のセッション WebUserGroup=Webサーバのユーザ/グループ +PermissionsOnFiles=ファイルのアクセス許可 PermissionsOnFilesInWebRoot=Webルートディレクトリ内のファイルに対するアクセス許可 PermissionsOnFile=ファイル%sのアクセス許可 NoSessionFound=PHP構成では、アクティブなセッションの一覧表示が許可されていないもよう。セッションの保存に使用されるディレクトリ ( <b> %s </b> ) は、保護されている可能性がある ( たとえば、OSのアクセス許可またはPHPディレクティブopen_basedirによって ) 。 @@ -45,7 +46,7 @@ DBSortingCharset=データソート用のデータベース·キャラセット HostCharset=ホストのキャラセット ClientCharset=クライアントのキャラセット ClientSortingCharset=クライアントの文字照合則 -WarningModuleNotActive=モジュール<b>%sを</b>有効<b>に</b>する必要<b>が</b>ある +WarningModuleNotActive=モジュール<b>%s</b>を有効にする必要がある WarningOnlyPermissionOfActivatedModules=ここには、活性化されたモジュールに関連する権限のみが表示される。ホーム->設定->モジュール ページで他のモジュールを活性化できる。 DolibarrSetup=Dolibarrインストールまたはアップグレード InternalUser=内部ユーザ @@ -62,6 +63,7 @@ IfModuleEnabled=注:【はい】は、モジュールの<b>%sが</b>有効<b> RemoveLock=ファイル<b>%s </b>が存在する場合、それを削除/改名することで、更新/インストール のツールが使用可能になる。 RestoreLock=ファイル<b>%s </b>を読取権限のみで復元すると、これ以上の更新/インストール のツール使用が不可になる。 SecuritySetup=セキュリティの設定 +PHPSetup=PHPのセットアップ SecurityFilesDesc=ファイルのアップロードに関するセキュリティ関連オプションをここで定義。 ErrorModuleRequirePHPVersion=エラー、このモジュールは、PHPのバージョン%s以上が必要 ErrorModuleRequireDolibarrVersion=エラー、このモジュールはDolibarrバージョン%s以上が必要 @@ -101,7 +103,7 @@ NextValueForDeposit=次の値 ( 頭金 ) NextValueForReplacements=次の値 ( 置換 ) MustBeLowerThanPHPLimit=注:現在、PHP構成では、このパラメーターの値に関係なく、アップロードの最大ファイルサイズが<b> %s </b>%sに制限されている。 NoMaxSizeByPHPLimit=注:お使いのPHP設定では無制限 -MaxSizeForUploadedFiles=アップロードファイルの最大サイズ ( 0 べてのアップロードを禁止 ) +MaxSizeForUploadedFiles=アップロードファイルの最大サイズ ( 0 で、すべてのアップロード禁止 ) UseCaptchaCode=ログインページで、グラフィカルコード ( CAPTCHA ) を使用して AntiVirusCommand=アンチウイルスのコマンドへのフルパス AntiVirusCommandExample=ClamAvデーモンの例: ( clamav-daemonが必要 ) /usr/bin/clamdscan <br> ClamWinの例: ( 非常に非常に遅い ) c:\\Program~1\\ClamWin\\bin\\clamscan.exe @@ -154,7 +156,7 @@ SystemToolsAreaDesc=この領域は管理機能を提供する。メニューを Purge=パージ PurgeAreaDesc=このページでは、Dolibarrによって生成または保存されたすべてのファイル ( 一時ファイルまたは<b> %s </b>ディレクトリ内のすべてのファイル ) を削除できる。通常、この機能を使用する必要はない。これは、Webサーバーによって生成されたファイルを削除する権限を提供しないプロバイダーによってDolibarrがホストされているユーザの回避策として提供されている。 PurgeDeleteLogFile=Syslogモジュール用に定義された<b>%s </b>を含むログファイルを削除する ( データを失うリスクはない ) -PurgeDeleteTemporaryFiles=すべてのログファイルと一時ファイルを削除する(データを失うリスクなし)。注:一時ファイルの削除は、一時ディレクトリが24時間以上前に作成された場合にのみ実行される。 +PurgeDeleteTemporaryFiles=すべてのログファイルと一時ファイルを削除する(データを失うリスクはない)。パラメータは、'tempfilesold'、 'logfiles'、または両方の 'tempfilesold+logfiles' にすることができる。注:一時ファイルの削除は、一時ディレクトリが24時間以上前に作成された場合にのみ実行される。 PurgeDeleteTemporaryFilesShort=ログと一時ファイルを削除する PurgeDeleteAllFilesInDocumentsDir=ディレクトリ:<b> %s</b> 内のすべてのファイルを削除する。 <br>これにより、要素 ( 取引先、請求書など ) に関連する生成されたすべてのドキュメント、ECMモジュールにアップロードされたファイル、データベースのバックアップダンプ、および一時ファイルが削除される。 PurgeRunNow=今パージ @@ -232,6 +234,7 @@ BoxesAvailable=利用可能なウィジェット BoxesActivated=ウィジェットがアクティブ化されました ActivateOn=でアクティブに ActiveOn=でアクティブ化 +ActivatableOn=でアクティブ化可能 SourceFile=ソースファイル AvailableOnlyIfJavascriptAndAjaxNotDisabled=JavaScriptが無効になっていない場合にのみ使用可能 Required=必須 @@ -347,9 +350,10 @@ LastActivationAuthor=最新のアクティベーション作成者 LastActivationIP=最新のアクティベーションIP UpdateServerOffline=サーバーをオフラインで更新する WithCounter=カウンターを管理する -GenericMaskCodes=任意の番号マスクを入力することができる。このマスクには、以下のタグを使用することができる。 <br> <b>{000000}</b>各%sにインクリメントされる番号に対応している。カウンタの希望の長さなどの多くのゼロとして入力する。カウンタは、マスクとして多くのゼロとして持たせるために、左からゼロで完了する予定。 <br> <b>{000000+000}</b>以前のが、最初の%sから始まる適用されている+記号の右にある数字に対応するオフセットと同じ。 <br> <b>{000000@x}</b>前のと同じ が、カウンタがx月に達した時にゼロにリセットされる (xは 1〜12、または0の間でコンフィギュレーションで定義された会計年度の初めの数ヶ月を使用するか、99で毎月ゼロにリセット ) 。このオプションを使用すると、xが2以上である場合、 {yy}{mm} または {yyyy}{mm} のシーケンスも要求される。 <br> <b>{dd}</b>日 ( 01〜31 ) 。 <br> <b>{mm}</b>月 ( 01〜12 ) 。 <br><b>{yy}</b>、<b>{yyyy}</b>または <b>{y}</b> 年は 2、4、または1桁の数値。 <br> -GenericMaskCodes2= <b> {cccc} </b>n文字のクライアントコード<br><b> {cccc000} </b>n文字のクライアントコードの後にカウンターが続く。お客様専用のこのカウンターは、グローバルカウンターと同時にリセットされる。 <br> <b> {tttt} </b> n文字のt取引先種別のコード ( メニュー【ホーム】-【設定】-【辞書】-【取引先の種別】を参照 ) 。このタグを追加すると、取引先の種類ごとにカウンターが異なる。 <br> +GenericMaskCodes=任意の番号付マスクを入力できる。このマスクでは、次のタグを使用できる。<br><b> {000000} </b>は、各%sでインクリメントされる番号に対応する。カウンタで希望する桁数と同じ数のゼロを入力する。カウンタは、マスクのゼロと同じ桁数になるよう、左からゼロを補完する。 <br> <b>{000000+000}</b>前のものと同じだが、+記号の右側の数字に対応するオフセットが最初の%sから適用される。 <br> <b> {000000@x} </b>前のものと同じだが、月xに達するとカウンタがゼロにリセットされる(xは1から12の間、または設定で定義された会計年度の最初の月を使用する場合は0、または99で毎月ゼロにリセット)。このオプションが使用され、xが2以上の場合、シーケンス{yy} {mm}または{yyyy} {mm}も必要。 <br> <b> {dd}</b>日(01から31)。 <br> <b> {mm} </b> 月(01から12)。 <br> <b> {yy} </b>,<b> {yyyy} </b>または<b> {y} </b> 1,2,4桁の年<br> +GenericMaskCodes2= <b> {cccc} </b>n文字のクライアントコード<br><b> {cccc000} </b>n文字のクライアントコードの後に顧客専用カウンタが続く。顧客専用カウンタと、グローバルカウンタは、同時にリセットされる。 <br> <b> {tttt} </b> n文字の取引先タイプのコード(メニュー 【ホーム】-【セットアップ】-【辞書】-【取引先のタイプ】を参照)。このタグを追加すると、取引先の種類ごとにカウンタが異なる。 <br> GenericMaskCodes3=マスク内の他のすべての文字はそのまま残る。 <br>スペースは許可されていない。 <br> +GenericMaskCodes3EAN=マスク内の他のすべての文字はそのまま残る(EAN13の13番目の位置にある*または?を除く)。 <br>スペースは許可されていない。 <br> EAN13では、最後の}の後の13番目の位置は*または? のみで、計算されたキーに置き換えられる。 <br> GenericMaskCodes4a= <u>取引先 TheCompany の99番目の%sの例、日付 2007-01-31:</u> <br> GenericMaskCodes4b=<u>2007-03-01に作成された取引先の例:</u> <br> GenericMaskCodes4c= <u> 2007-03-01に作成された製品の例:</u> <br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=このフィールドを空白のままにすると ExtrafieldParamHelpselect=値のリストは、 key,value形式 (key は '0' 以外) の行であること。<br><br> 例: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>別の補完属性リストに応じたリストを作るには:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>別のリストに応じたリストを作るには:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=値のリストは、 key,value形式 (key は '0' 以外) の行であること<br><br>例 : <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=値のリストは、 key,value形式 (key は '0' 以外) の行であること<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=値のリストはテーブルから取得される<br>構文:table_name:label_field:id_field :: filter <br>例:c_typent:libelle:id :: filter <br> <br> --id_fieldは必然的にプライマリintキーa0342fccfda = 1 ) アクティブな値のみを表示するには<br>現在のオブジェクトの現在のIDであるフィルタで$ ID $を使用することもできる<br>フィルタにSELECTを使用するには、キーワード$ SEL $を使用してインジェクション防止保護をバイパスする。 <br>エクストラフィールドでフィルタリングする場合は、構文extra.fieldcode = ... ( フィールドコードはエクストラフィールドのコード ) を使用する。<br><br>別の補完属性リストに依存するリストを作成するには:<br> c_typent:libelle:id:options_ <i> parent_list_code </i> | parent_column:filter <br> <br>リストを別のリストに依存させるには:<br> c_typent:libelle:id:<i> parent_list_code -ExtrafieldParamHelpchkbxlst=値のリストはテーブルから取得される<br>構文:table_name:label_field:id_field :: filter <br>例:c_typent:libelle:id :: filter <br> <br>フィルタは、アクティブな値a0342cfのみを表示する簡単なテスト ( 例:active = 1 ) にすることができるフィルタで$ ID $を使用することもできる。witchは現在のオブジェクトの現在のID。<br>フィルタでSELECTを実行するには、エクストラフィールドでフィルタリングする場合は$ SEL $ <br>を使用する。構文extra.fieldcode = ...を使用する ( フィールドコードはエクストラフィールドのコード ) <br> <br>別の補完属性リストに依存するリストを作成するには、次のようにする。 libelle:id:<i> parent_list_code </i> | parent_column:filter +ExtrafieldParamHelpsellist=値のリストはテーブルから取得される<br>構文: table_name:label_field:id_field::filtersql<br>例: c_typent:libelle:id::filtersql<br><br>- id_field は整数のプライマリキーが必須<br>- filtersql は SQL 条件文。アクティブな値のみを表示する簡単なテストでもよい (例 active=1) <br>フィルタで $ID$ を使用することもでき、それは現在のオブジェクトの現在のID <br>フィルタで SELECT を使うには、キーワード $SEL$ を使うことで、インジェクション対抗防御を回避できる。<br>エクストラフィールドでフィルタするには、構文 extra.fieldcode=... (ここで、フィールドコードはエクストラフィールドのコード)を使用する <br><br>別の補完属性リストに依存するリストを作成するには:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>別のリストに依存したリストを作成するには:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=値のリストはテーブルから取得される<br>Syntax: table_name:label_field:id_field::filtersql<br>例: c_typent:libelle:id::filtersql<br><br>フィルターは、簡単なテスト (例 active=1) で、アクティブな値のみを表示する<br>フィルタで $ID$ を使用することもでき、それは現在のオブジェクトの現在のID<br>フィルタで SELECT を実行するには、 $SEL$ を使う<br>エクストラフィールドでフィルタするには、構文 extra.fieldcode=... (ここで、フィールドコードはエクストラフィールドのコード)を使用する<br><br>別の補完属性リストに依存するリストを作成するには:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>別のリストに依存したリストを作成するには:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=パラメータはObjectName:Classpathでなければなりません<br>構文:ObjectName:Classpath ExtrafieldParamHelpSeparator=単純なセパレーターの場合は空のままにする<br>折りたたみセパレーターの場合はこれを1に設定する ( 新規セッションの場合はデフォルトで開き、ユーザセッションごとにステータスが保持される ) <br>折りたたみセパレーターの場合はこれを2に設定する ( 新規セッションの場合はデフォルトで折りたたむ。ステータスは各ユーザセッションの間保持される ) LibraryToBuildPDF=PDF生成に使用されるライブラリ @@ -487,7 +491,7 @@ UseDoubleApproval=金額 ( 税抜き ) が...より高い場合は、3段階の WarningPHPMail=警告:アプリケーションから電子メールを送信するための設定は、デフォルトの汎用設定を使用している。多くの場合、いくつかの理由から、デフォルトの設定ではなく、メールサービスプロバイダーのメールサーバーを使用するように送信メールを設定することをお勧めする。 WarningPHPMailA=-電子メールサービスプロバイダーのサーバーを使用すると、電子メールの信頼性が向上するため、スパムとしてフラグが立てられることなく配信可能性が向上する。 WarningPHPMailB=-一部の電子メールサービスプロバイダー ( Yahooなど ) では、独自のサーバー以外のサーバーから電子メールを送信することを許可していない。現在の設定では、電子メールプロバイダーのサーバーではなく、アプリケーションのサーバーを使用して電子メールを送信するため、一部の受信者 ( 制限付きDMARCプロトコルと互換性のある受信者 ) は、電子メールプロバイダーと一部の電子メールプロバイダーを受け入れることができるかどうかを電子メールプロバイダーに尋ねる。 ( Yahooのように ) サーバーが彼らのものではないために「いいえ」と応答する場合がある。そのため、送信された電子メールの一部が配信を受け入れられない場合がある ( 電子メールプロバイダーの送信クォータにも注意すること ) 。 -WarningPHPMailC=-独自の電子メールサービスプロバイダーのSMTPサーバーを使用して電子メールを送信することも興味深いので、アプリケーションから送信されるすべての電子メールもメールボックスの「送信済み」ディレクトリに保存される。 +WarningPHPMailC=-独自の電子メールサービスプロバイダーのSMTPサーバーを使用して電子メールを送信することも興味深いので、アプリケーションから送信されるすべての電子メールもメールボックスの「送信済」ディレクトリに保存される。 WarningPHPMailD=メソッド「PHPMail」が本当に使用したいメソッドである場合は、Home-Setup-Otherで定数MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUPを1に追加することで、この警告を削除できる。 WarningPHPMail2=電子メールSMTPプロバイダーが電子メールクライアントをいくつかのIPアドレスに制限する必要がある場合 ( 非常にまれ ) 、これはERP CRMアプリケーションのメールユーザエージェント ( MUA ) のIPアドレス :<strong> %s</strong>。 WarningPHPMailSPF=送信者のメールアドレスのドメイン名がSPFレコードで保護されている場合 ( ドメイン名登録事業者に尋ねる ) 、ドメインのDNSのSPFレコードに次のIPを追加する必要がある:<strong> %s</strong>。 @@ -541,6 +545,8 @@ Module40Name=仕入先s Module40Desc=仕入先と購入管理 ( 発注書とサプライヤーの請求書の請求 ) Module42Name=デバッグログ Module42Desc=ロギング機能 ( ファイル、syslog、... ) 。このようなログは、技術/デバッグを目的としている。 +Module43Name=デバッグバー +Module43Desc=開発者がブラウザにデバッグバーを追加するためのツール。 Module49Name=エディタ Module49Desc=エディタの管理 Module50Name=製品 @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=のGeoIP Maxmindの変換機能 Module3200Name=変更不可能なアーカイブ Module3200Desc=ビジネスイベントの変更不可能なログを有効にする。イベントはリアルタイムでアーカイブされる。ログは、エクスポート可能な連鎖イベントの読み取り専用テーブル。このモジュールは、国によっては必須の場合がある。 +Module3400Name=ソーシャルネットワーク +Module3400Desc=ソーシャルネットワークフィールドを取引先とアドレス(skype、twitter、facebookなど)に対して有効化する。 Module4000Name=HRM Module4000Desc=人事管理 ( 部門の管理、従業員の契約と感情 ) Module5000Name=マルチ法人 Module5000Desc=あなたが複数の企業を管理することができる -Module6000Name=ワークフロー -Module6000Desc=ワークフロー管理 ( オブジェクトの自動作成および/または自動ステータス変更 ) +Module6000Name=モジュール間ワークフロー +Module6000Desc=異なるモジュール間のワークフロー管理(オブジェクトの自動作成および/または自動ステータス変更) Module10000Name=ウェブサイト Module10000Desc=WYSIWYGエディターを使用してWebサイト ( 公開 ) を作成する。これはウェブマスターまたは開発者向けのCMS ( HTMLとCSS言語を知っている方が良い ) 。専用のDolibarrディレクトリを指すようにWebサーバー ( Apache、Nginxなど ) を設定するだけで、独自のドメイン名を使用してインターネット上でオンラインにできる。 Module20000Name=リクエスト管理を終了 @@ -805,7 +813,8 @@ PermissionAdvanced253=内部/外部ユーザおよびアクセス許可を作成 Permission254=変更の作成/外部ユーザのみ Permission255=他のユーザのパスワードを変更する Permission256=他のユーザを削除するか、または無効にする -Permission262=すべての取引先 ( そのユーザが営業担当者である取引先だけでなく ) へのアクセスを拡張する。 <br>外部ユーザには効果的ではない ( 提案、注文、請求書、契約などについては常に自分自身に限定される ) 。 <br>プロジェクトには効果的ではない ( プロジェクトの権限、可視性、および割り当てに関するルールのみが重要 ) 。 +Permission262=すべての取引先とそのオブジェクト(ユーザが営業担当者である取引先だけでなく)へのアクセスを拡張する。 <br>外部ユーザには効果的ではない(提案、注文、請求書、契約などについては常に自分自身に限定される)。 <br>プロジェクトには効果的ではない(プロジェクトの権限、可視性、および割り当てに関するルールのみが重要)。 +Permission263=オブジェクトなしで、すべての取引先にアクセスを拡張する(ユーザが営業担当者である取引先だけでなく)。 <br>外部ユーザには効果的ではない(提案、注文、請求書、契約などについては常に自分自身に限定される)。 <br>プロジェクトには効果的ではない(プロジェクトの権限、可視性、および割り当てに関するルールのみが重要)。 Permission271=CAを読む Permission272=請求書をお読みください Permission273=問題の請求書 @@ -915,7 +924,7 @@ Permission1236=仕入先の請求書、属性、支払いをエクスポート Permission1237=注文書とその詳細をエクスポート Permission1251=データベース ( データロード ) に外部データの大量インポートを実行する Permission1321=顧客の請求書、属性、および支払いをエクスポート -Permission1322=支払い済みの請求書を再開する +Permission1322=支払い済の請求書を再開する Permission1421=受注と属性をエクスポート Permission1521=ドキュメントを読む Permission1522=ドキュメントを削除する @@ -1175,7 +1184,8 @@ SetupDescription2=次の2つのセクションは必須 ( 【設定】メニュ SetupDescription3= <a href="%s"> %s-> %s </a> <br> <br>アプリケーションのデフォルトの動作をカスタマイズするために使用される基本パラメーター ( 国関連の機能など ) 。 SetupDescription4= <a href="%s"> %s-> %s </a> <br> <br>このソフトウェアは、多くのモジュール/アプリケーションのスイート。ニーズに関連するモジュールを有効にして構成する必要がある。これらのモジュールをアクティブにすると、メニューエントリが表示される。 SetupDescription5=その他の設定メニューエントリは、オプションのパラメータを管理する。 -LogEvents=セキュリティ監査イベント +AuditedSecurityEvents=監査されるセキュリティイベント +NoSecurityEventsAreAduited=セキュリティイベントは監査されない。メニュー%sから有効にできる Audit=監査 InfoDolibarr=Dolibarrについて InfoBrowser=ブラウザについて @@ -1210,7 +1220,7 @@ TriggerAlwaysActive=このファイル内のトリガーがアクティブにDol TriggerActiveAsModuleActive=モジュール<b>%sが</b>有効<b>になっ</b>ているとして、このファイル内のトリガーがアクティブになる。 GeneratedPasswordDesc=自動生成されたパスワードに使用する方法を選択する。 DictionaryDesc=すべての参照データを挿入する。デフォルトに値を追加できる。 -ConstDesc=このページでは、他のページでは使用できないパラメーターを編集 ( オーバーライド ) できる。これらは主に、開発者/高度なトラブルシューティング専用の予約済みパラメーター。 +ConstDesc=このページでは、他のページでは使用できないパラメーターを編集 ( オーバーライド ) できる。これらは主に、開発者/高度なトラブルシューティング専用の予約済パラメーター。 MiscellaneousDesc=他のすべてのセキュリティ関連パラメータはここで定義される。 LimitsSetup=制限/精密設定 LimitsDesc=Dolibarrが使用する制限、精度、最適化をここで定義できる @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=アップグレードプロセスの実行が YouMustRunCommandFromCommandLineAfterLoginToUser=あなたは、ユーザ<b>%s、</b>シェルへのログイン後にコマンドラインからこのコマンドを実行する必要があるか、追加する必要がある-Wオプションをコマンドラインの末尾に<b>%s</b>パスワード<b>を</b>提供する。 YourPHPDoesNotHaveSSLSupport=あなたのPHPでのSSLの機能は使用できない DownloadMoreSkins=ダウンロードするには多くのスキン -SimpleNumRefModelDesc=%syymm-nnnnの形式で参照番号を返する。ここで、yyは年、mmは月、nnnnはリセットなしで連続している。 +SimpleNumRefModelDesc=参照番号を%syymm-nnnnの形式で返す。ここで、yyは年、mmは月、nnnnはリセットなしの順次自動インクリメント番号。 ShowProfIdInAddress=住所とともにプロのIDを表示する ShowVATIntaInAddress=コミュニティ内のVAT番号を住所で非表示にする TranslationUncomplete=部分的な翻訳 @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=プロキシサーバー:名前/住所 MAIN_PROXY_PORT=プロキシサーバー:ポート MAIN_PROXY_USER=プロキシサーバー:ログイン/ユーザ MAIN_PROXY_PASS=プロキシサーバー:パスワード -DefineHereComplementaryAttributes=ここで、含める追加/カスタム属性を定義する:%s +DefineHereComplementaryAttributes=追加する必要のある追加/カスタム属性を定義する:%s ExtraFields=補完的な属性 ExtraFieldsLines=補完的な属性 ( 行 ) ExtraFieldsLinesRec=補完的な属性 ( 請求書行のテンプレート ) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=ログイン ( UNIX ) LDAPFieldLoginExample=例:uid LDAPFilterConnection=検索フィルタ LDAPFilterConnectionExample=例:& ( objectClass = inetOrgPerson ) +LDAPGroupFilterExample=例:&(objectClass=groupOfUsers) LDAPFieldLoginSamba=ログイン ( サンバ、ActiveDirectoryを ) LDAPFieldLoginSambaExample=例:samaccountname LDAPFieldFullname=ファーストネーム @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=あなたの法人はVATを使用しないように定 AccountancyCode=会計コード AccountancyCodeSell=販売会計コード AccountancyCodeBuy=購入会計コード +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=新しい税金を作成するときは、デフォルトで「支払いを自動的に作成する」チェックボックスを空のままにする ##### Agenda ##### AgendaSetup=イベントと議題モジュールの設定 PasswordTogetVCalExport=エクスポートのリンクを許可するキー +SecurityKey = セキュリティキー PastDelayVCalExport=より古いイベントはエクスポートしない AGENDA_USE_EVENT_TYPE=イベント種別を使用する ( メニューの【設定】-> 【辞書】-> 【アジェンダイベントの種別】で管理 ) AGENDA_USE_EVENT_TYPE_DEFAULT=イベント作成フォームでイベントの種別にこのデフォルト値を自動的に設定する @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=奇数のテーブルラインの背景色 BackgroundTableLineEvenColor=偶数のテーブルラインの背景色 MinimumNoticePeriod=最小通知期間 ( 休暇申請はこの遅延の前に行う必要がある ) NbAddedAutomatically=ユーザのカウンターに毎月 ( 自動的に ) 追加される日数 -EnterAnyCode=このフィールドには、行を識別するための参照が含まれている。特殊文字を使用せずに、任意の値を入力する。 +EnterAnyCode=このフィールドには、ラインを識別するための参照が含まれている。任意の値を入力すること、たただし、特殊文字は不可。 Enter0or1=0または1を入力すること UnicodeCurrency=中括弧、通貨記号を表すバイト番号のリストの間にここに入力する。例:$の場合は【36】と入力する-ブラジルレアルの場合はR $ 【82,36】-€の場合は【8364】と入力する ColorFormat=RGBカラーはHEX形式 例: FF0000 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=PDFの下マージン MAIN_DOCUMENTS_LOGO_HEIGHT=PDFのロゴの高さ NothingToSetup=このモジュールに必要な特定の設定はない。 SetToYesIfGroupIsComputationOfOtherGroups=このグループが他のグループの計算である場合は、これをyesに設定する -EnterCalculationRuleIfPreviousFieldIsYes=前のフィールドが「はい」に設定されている場合は、計算ルールを入力する ( たとえば、「CODEGRP1 + CODEGRP2」 ) +EnterCalculationRuleIfPreviousFieldIsYes=前のフィールドが「はい」に設定されている場合は、計算ルールを入力。 <br>例:<br> CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=いくつかの言語バリアントが見つかりました RemoveSpecialChars=特殊文字を削除する COMPANY_AQUARIUM_CLEAN_REGEX=値をクリーンアップするための正規表現フィルタ ( COMPANY_AQUARIUM_CLEAN_REGEX ) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=モジュールソーシャルネットワークの設定 EnableFeatureFor=<strong> %s</strong>の機能を有効にする VATIsUsedIsOff=注:消費税またはVATを使用するオプションは、メニュー%s-%sで<strong> Off </strong>に設定されているため、消費税または使用される付加価値税は常に0になる。 SwapSenderAndRecipientOnPDF=PDFドキュメントの送信者と受信者のアドレス位置を入れ替えます -FeatureSupportedOnTextFieldsOnly=警告、機能はテキストフィールドでのみサポートされている。また、この機能をトリガーするには、URLパラメータ action=create または action=edit を設定するか、ページ名が 'new.php' で終わる必要がある。 +FeatureSupportedOnTextFieldsOnly=警告、機能性はテキストフィールドとコンボリストでのみサポートされる。また、この機能性を引き出すには、URLパラメータ action=create または action=edit を設定するか、ページ名が 'new.php' で終わる必要がある。 EmailCollector=メールコレクター EmailCollectorDescription=スケジュールされたジョブと設定ページを追加して、 ( IMAPプロトコルを使用して ) 定期的に電子メールボックスをスキャンし、アプリケーションに受信した電子メールを適切な場所で記録したり、いくつかの記録を自動的に作成したりする ( 引合など ) 。 NewEmailCollector=新規Eメールコレクター @@ -2049,8 +2062,11 @@ UseDebugBar=デバッグバーを使用する DEBUGBAR_LOGS_LINES_NUMBER=コンソールに保持する最後のログ行の数 WarningValueHigherSlowsDramaticalyOutput=警告、値を大きくすると出力が劇的に遅くなる ModuleActivated=モジュール%sがアクティブ化され、インターフェイスの速度が低下する +ModuleActivatedWithTooHighLogLevel=モジュール%sが高すぎるログレベルでアクティブ化されている(パフォーマンスの向上のため、より低いレベルの使用を試すべき) +ModuleSyslogActivatedButLevelNotTooVerbose=モジュール%sがアクティブ化され、ログレベル(%s)が正しい(冗長すぎない) IfYouAreOnAProductionSetThis=実稼働環境を使用している場合は、このプロパティを%sに設定する必要がある。 AntivirusEnabledOnUpload=アップロードされたファイルでウイルス対策が有効になっている +SomeFilesOrDirInRootAreWritable=一部のファイルやディレクトリが読み取り専用モードになっていません EXPORTS_SHARE_MODELS=エクスポートモデルは誰とでも共有 ExportSetup=モジュールエクスポートの設定 ImportSetup=モジュールインポートの設定 @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Dolibarr Foundationサーバーに匿名のPing「+1」を作 FeatureNotAvailableWithReceptionModule=モジュールの受信が有効になっている場合、この機能は使用できない EmailTemplate=メールのテンプレート EMailsWillHaveMessageID=電子メールには、この構文に一致するタグ「参照」がある +PDF_SHOW_PROJECT=ドキュメントにプロジェクトを表示 +ShowProjectLabel=プロジェクトラベル PDF_USE_ALSO_LANGUAGE_CODE=PDF内の一部のテキストを同じ生成PDFで2つの異なる言語で複製する場合は、ここでこの2番目の言語を設定して、生成されたPDFに同じページに2つの異なる言語が含まれるようにする必要がある。1つはPDFの生成時に選択され、もう1つは ( これをサポートしているPDFテンプレートはごくわずか ) 。 PDFごとに1つの言語を空のままにする。 FafaIconSocialNetworksDesc=FontAwesomeアイコンのコードをここに入力する。 FontAwesomeとは何かわからない場合は、一般的な値fa-address-bookを使用できる。 FeatureNotAvailableWithReceptionModule=モジュールの受信が有効になっている場合、この機能は使用できない @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=セキュリティを強化するために、この DictionaryProductNature= 製品の性質 CountryIfSpecificToOneCountry=国 ( 特定の国に固有の場合 ) YouMayFindSecurityAdviceHere=ここにセキュリティアドバイザリがある -ModuleActivatedMayExposeInformation=このモジュールは機密データを公開する可能性がある。不要な場合は無効にすること。 +ModuleActivatedMayExposeInformation=このPHP拡張機能は、機密データを公開する可能性がある。不要な場合は無効にすること。 ModuleActivatedDoNotUseInProduction=開発用に設計されたモジュールが有効になった。実稼働環境では有効にしないこと。 CombinationsSeparator=製品の組み合わせの区切り文字 SeeLinkToOnlineDocumentation=例については、トップメニューのオンラインドキュメントへのリンクを参照すること SHOW_SUBPRODUCT_REF_IN_PDF=モジュール<b>%s </b>の機能「%s」を使用する場合は、キットの副産物の詳細をPDFで表示すること。 AskThisIDToYourBank=このIDを取得するには、銀行に問い合わせること +AdvancedModeOnly=許可は、高度な許可モードでのみ使用可能 +ConfFileIsReadableOrWritableByAnyUsers=confファイルは、どのユーザでも読み取りまたは書き込みが可能。 Webサーバーのユーザとグループにのみアクセス許可を与える。 +MailToSendEventOrganization=イベント組織 +AGENDA_EVENT_DEFAULT_STATUS=フォームからイベントを作成するときのデフォルトのイベントステータス +YouShouldDisablePHPFunctions=PHP関数を無効にする必要がある +IfCLINotRequiredYouShouldDisablePHPFunctions=システムコマンドを実行する必要がある場合を除いて(たとえば、モジュールのスケジュールされたジョブの場合、または外部コマンドラインアンチウイルスを実行する場合)、PHP関数を無効にする必要がある。 +NoWritableFilesFoundIntoRootDir=共通プログラムの書き込み可能なファイルまたはディレクトリがルートディレクトリに見つからない(良好) +RecommendedValueIs=推奨:%s +ARestrictedPath=制限されたパス diff --git a/htdocs/langs/ja_JP/banks.lang b/htdocs/langs/ja_JP/banks.lang index b7097ecbc9f..45874c79be1 100644 --- a/htdocs/langs/ja_JP/banks.lang +++ b/htdocs/langs/ja_JP/banks.lang @@ -112,7 +112,7 @@ MenuBankInternalTransfer=内部転送 TransferDesc=ある口座から別の口座に転送すると、Dolibarrは2つのレコード(ソース口座の借方とターゲット口座の貸方)を書込む。同じ金額(記号を除く)、ラベル、日付がこの取引に使用される) TransferFrom=期初 TransferTo=期末 -TransferFromToDone=<b>%s %s</b> %sからの<b>%s</b>への転送が記録されています。 +TransferFromToDone=<b>%s %s</b> %sからの<b>%s</b>への転送が記録されている。 CheckTransmitter=振込 ValidateCheckReceipt=この小切手領収書を検証するか? ConfirmValidateCheckReceipt=この小切手領収書を検証してもよいか?一度検証すると変更できなくなる。 @@ -154,7 +154,7 @@ NoBANRecord=BANレコードなし DeleteARib=BANレコードを削除 ConfirmDeleteRib=このBANレコードを削除してもよいか? RejectCheck=小切手が返送されました -ConfirmRejectCheck=このチェックを拒否済みとしてマークしてもよいか? +ConfirmRejectCheck=このチェックを拒否済としてマークしてもよいか? RejectCheckDate=小切手が返却された日付 CheckRejected=小切手が返送されました CheckRejectedAndInvoicesReopened=返送された小切手と請求書が再開される @@ -174,10 +174,11 @@ YourSEPAMandate=あなたのSEPA指令 FindYourSEPAMandate=これは、当法人が銀行に口座振替を注文することを承認するSEPA指令です。署名済(署名済ドキュメントをスキャン)で返送するか、メールで送付すること AutoReportLastAccountStatement=照合を行うときに、フィールド「銀行取引明細書の番号」に最後の取引明細書番号を自動的に入力する CashControl=POS現金出納帳制御 -NewCashFence=新規現金出納帳の締め +NewCashFence=新規キャッシュデスクの開閉 BankColorizeMovement=移動に色を付ける BankColorizeMovementDesc=この機能が有効になっている場合は、借方または貸方の移動に特定の背景色を選択できます BankColorizeMovementName1=借方移動の背景色 BankColorizeMovementName2=クレジット移動の背景色 IfYouDontReconcileDisableProperty=一部の銀行口座で銀行照合を行わない場合は、それらのプロパティ "%s"を無効にして、この警告を削除すること。 NoBankAccountDefined=銀行口座が定義されていない +NoRecordFoundIBankcAccount=銀行口座にレコードが見つかならい。通常、これは、銀行口座のトランザクションのリストからレコードが手動で削除された場合に発生する(たとえば、銀行口座の照合中)。もう1つ別の理由としては、モジュール「%s」が無効化されたまま支払いが記録されたこと。 diff --git a/htdocs/langs/ja_JP/bills.lang b/htdocs/langs/ja_JP/bills.lang index 0fd32cc6afc..6dcd35ad561 100644 --- a/htdocs/langs/ja_JP/bills.lang +++ b/htdocs/langs/ja_JP/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=得意先請求書 CustomersInvoices=顧客請求書 SupplierInvoice=仕入先請求書 SuppliersInvoices=仕入先請求書 +SupplierInvoiceLines=仕入先の請求書行 SupplierBill=仕入先請求書 SupplierBills=仕入先請求書 Payment=支払 @@ -81,6 +82,8 @@ PaymentsAlreadyDone=支払は実行済 PaymentsBackAlreadyDone=払戻は実行済 PaymentRule=支払ルール PaymentMode=支払種別 +DefaultPaymentMode=デフォルト支払種別 +DefaultBankAccount=デフォルト銀行口座 PaymentTypeDC=デビット/クレジットカード PaymentTypePP=PayPal IdPaymentMode=支払種別(id) @@ -373,6 +376,7 @@ DateLastGeneration=最新世代の日付 DateLastGenerationShort=最新世代の日付 MaxPeriodNumber=最大請求書の生成回数 NbOfGenerationDone=すでに行われた請求書の生成数 +NbOfGenerationOfRecordDone=すでに処理済のレコード生成数 NbOfGenerationDoneShort=行われた世代の数 MaxGenerationReached=最大世代数に達しました InvoiceAutoValidate=請求書を自動的に検証する @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=月末から14日以内 FixAmount=固定金額-ラベル「%s」の1行 VarAmount=可変量(%% tot。) VarAmountOneLine=可変量(%% tot。)-ラベル「%s」の1行 -VarAmountAllLines=可変量(%% tot。)-すべて同じ行 +VarAmountAllLines=可変数量(%% tot.)-原点からのすべての行 # PaymentType PaymentTypeVIR=銀行の転送 PaymentTypeShortVIR=銀行の転送 @@ -494,12 +498,16 @@ Cash=現金 Reported=遅延 DisabledBecausePayments=いくつかの支払があるので不可 CantRemovePaymentWithOneInvoicePaid=支払済に分類される請求書が少なくとも一つあるので支払を削除できない +CantRemovePaymentVATPaid=VAT申告は支払い済に分類されているため、支払いを削除できない +CantRemovePaymentSalaryPaid=給与は支払済に分類されているため、支払を削除できない ExpectedToPay=予想される支払 CantRemoveConciliatedPayment=調整済の支払を削除できない PayedByThisPayment=この支払によって支払った ClosePaidInvoicesAutomatically=支払が完全に行われると、すべての標準、頭金、または交換の請求書が「支払済」として自動的に分類される。 ClosePaidCreditNotesAutomatically=払戻が完全に行われると、すべての貸方表が「支払済」として自動的に分類される。 ClosePaidContributionsAutomatically=支払が完全に行われると、すべての社会的または財政的貢献を「支払済」として自動的に分類。 +ClosePaidVATAutomatically=支払いが完全に行われると、VAT申告が「支払い済」として自動的に分類される。 +ClosePaidSalaryAutomatically=支払が完全に行われると、給与は自動的に ”支払済" に分類される。 AllCompletelyPayedInvoiceWillBeClosed=残りの支払がないすべての請求書は、ステータス「支払済」で自動的に閉じられる。 ToMakePayment=支払う ToMakePaymentBack=返済 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=最初に標準請求書を作成し、そ PDFCrabeDescription=請求書PDFテンプレートクレイブ。完全な請求書テンプレート(Spongeテンプレートの古い実装) PDFSpongeDescription=請求書PDFテンプレートスポンジ。完全な請求書テンプレート PDFCrevetteDescription=請求書PDFテンプレートクレベット。シチュエーション請求書の完全な請求書テンプレート -TerreNumRefModelDesc1=戻る数値の書式は、標準請求書の場合は%syymm-nnnn、貸方表の場合は%syymm-nnnn、ここで yy は年、mm は月、nnnn は欠番なく連続した0に戻らない数値 -MarsNumRefModelDesc1=戻る数値の書式は、標準請求書の場合は%syymm-nnnn、交換請求書の場合は%syymm-nnnn、頭金請求書の場合は%syymm-nnnn、貸方表の場合は%syymm-nnnn、ここで yy は年、mm は月、nnnn は欠番なく連続した0に戻らない数値 +TerreNumRefModelDesc1=戻る数値の形式は、標準請求書の場合は%syymm-nnnnの形式、貸方票の場合は%syymm-nnnnの形式。ここで、yyは年、mmは月、nnnnは自動増加順次番号で切れ目なく0戻りしない数値。 +MarsNumRefModelDesc1= 戻る数値の形式は、標準請求書の場合は%syymm-nnnn の形式、交換請求書の場合は %syymm-nnnn の形式、頭金請求書の場合は %syymm-nnnn の形式 、貸方票の場合は %syymm-nnnn の形式。ここで、 yy は年、mm は月、nnnn は自動増加順次番号で切れ目なく0戻りしない数値。 TerreNumRefModelError=$ syymm始まる法案はすでに存在し、シーケンスのこのモデルと互換性がない。それを削除するか、このモジュールを有効にするために名前を変更。 -CactusNumRefModelDesc1=戻る数値の書式は、標準の請求書の場合は%syymm-nnnn、貸方表の場合は%syymm-nnnn、頭金の請求書の場合は%syymm-nnnn、ここで yy は年、mm は月、nnnn は欠番なく連続した0に戻らない数値 +CactusNumRefModelDesc1=戻る数値の形式は、標準請求書の場合は%syymm-nnnn の形式、貸方票の場合は%syymm-nnnn の形式、頭金請求書の場合は%syymm-nnnn の形式。ここで、 yy は年、mm は月、nnnn は自動増加順次番号で切れ目なく0戻しない数値。 EarlyClosingReason=早期閉鎖理由 EarlyClosingComment=早期クロージングノート ##### Types de contacts ##### @@ -563,6 +571,7 @@ DeleteRepeatableInvoice=テンプレートの請求書を削除する ConfirmDeleteRepeatableInvoice=テンプレートの請求書を削除してもよいか? CreateOneBillByThird=取引先ごとに1つの請求書を作成する(それ以外の場合は、注文ごとに1つの請求書を作成する) BillCreated=%s請求書(s)が作成された +BillXCreated=請求書%sが生成された StatusOfGeneratedDocuments=ドキュメント生成のステータス DoNotGenerateDoc=ドキュメントファイルを生成しない AutogenerateDoc=ドキュメントファイルの自動生成 diff --git a/htdocs/langs/ja_JP/boxes.lang b/htdocs/langs/ja_JP/boxes.lang index 6f69a9dff73..62533b2e742 100644 --- a/htdocs/langs/ja_JP/boxes.lang +++ b/htdocs/langs/ja_JP/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=データベース内の主要ビジネスオブジェクトに関する統計 BoxLoginInformation=ログイン情報 BoxLastRssInfos=RSS情報 BoxLastProducts=最新の%s製品/サービス @@ -17,9 +18,13 @@ BoxLastActions=最新のアクション BoxLastContracts=最新の契約 BoxLastContacts=最新の連絡先/住所 BoxLastMembers=最新のメンバー +BoxLastModifiedMembers=最新の変更されたメンバ +BoxLastMembersSubscriptions=最新のメンバサブスクリプション BoxFicheInter=最新の介入 BoxCurrentAccounts=口座残高 BoxTitleMemberNextBirthdays=今月の誕生日(会員) +BoxTitleMembersByType=タイプ別のメンバ +BoxTitleMembersSubscriptionsByYear=年ごとのメンバサブスクリプション BoxTitleLastRssInfos=%sからの最新の%sニュース BoxTitleLastProducts=製品/サービス:最後に変更された%s BoxTitleProductsAlertStock=製品:在庫アラート @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=最新の%s顧客出荷 NoRecordedShipments=顧客の出荷は記録されていない BoxCustomersOutstandingBillReached=上限に達した顧客 # Pages +UsersHome=ユーザとグループ +MembersHome=メンバシップ +ThirdpartiesHome=取引先 +TicketsHome=チケット AccountancyHome=会計 -ValidatedProjects=検証済みプロジェクト +ValidatedProjects=検証済プロジェクト diff --git a/htdocs/langs/ja_JP/categories.lang b/htdocs/langs/ja_JP/categories.lang index dc3c74ec703..6d0c80849a4 100644 --- a/htdocs/langs/ja_JP/categories.lang +++ b/htdocs/langs/ja_JP/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=ベンダーのタグ/カテゴリ領域 CustomersCategoriesArea=顧客タグ/カテゴリ領域 MembersCategoriesArea=メンバータグ/カテゴリエリア ContactsCategoriesArea=連絡先タグ/カテゴリ領域 -AccountsCategoriesArea=アカウントタグ/カテゴリ領域 +AccountsCategoriesArea=銀行口座のタグ/カテゴリ領域 ProjectsCategoriesArea=プロジェクトタグ/カテゴリ領域 UsersCategoriesArea=ユーザータグ/カテゴリ領域 SubCats=サブカテゴリ diff --git a/htdocs/langs/ja_JP/companies.lang b/htdocs/langs/ja_JP/companies.lang index 536e29cf292..b82d69f57e3 100644 --- a/htdocs/langs/ja_JP/companies.lang +++ b/htdocs/langs/ja_JP/companies.lang @@ -43,9 +43,10 @@ Individual=個人 ToCreateContactWithSameName=取引先の下にある取引先と同じ情報で連絡先/住所を自動作成。ほとんどの場合、取引先が実在の人物であっても、取引先を作成するだけで十分。 ParentCompany=親会社 Subsidiaries=子会社 -ReportByMonth=月別報告書 -ReportByCustomers=顧客別報告書 -ReportByQuarter=料金別報告書 +ReportByMonth=月次レポート +ReportByCustomers=顧客ごとのレポート +ReportByThirdparties=仕入先ごとのレポート +ReportByQuarter=料金ごとのレポート CivilityCode=敬称コード RegisteredOffice=登録事務所 Lastname=姓 @@ -172,14 +173,20 @@ ProfId1ES=職 Id 1 (CIF/NIF) ProfId2ES=職 Id 2 (Social security number) ProfId3ES=職 Id 3 (CNAE) ProfId4ES=職 Id 4 (Collegiate number) -ProfId5ES=EORI番号 +ProfId5ES=職 Id 5 (EORI番号) ProfId6ES=- ProfId1FR=職 Id 1 (SIREN) ProfId2FR=職 Id 2 (SIRET) ProfId3FR=職 Id 3 (NAF, old APE) ProfId4FR=職 Id 4 (RCS/RM) -ProfId5FR=EORI番号 +ProfId5FR=職 Id 5(numéroEORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=登録番号 ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI番号 +ProfId6IT=- ProfId1LU=Id. 職 1 (R.C.S. Luxembourg) ProfId2LU=Id. 職 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=職 Id 1 (NIPC) ProfId2PT=職 Id 2 (Social security number) ProfId3PT=職 Id 3 (Commercial Record number) ProfId4PT=職 Id 4 (Conservatory) -ProfId5PT=EORI番号 +ProfId5PT=職 Id 5(EORI番号) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=職 Id 1 (CUI) ProfId2RO=職 Id 2 (Nr. Înmatriculare) ProfId3RO=職 Id 3 (CAEN) ProfId4RO=職 Id 5 (EUID) -ProfId5RO=EORI番号 +ProfId5RO=職 Id 5(EORI番号) ProfId6RO=- ProfId1RU=職 Id 1 (OGRN) ProfId2RU=職 Id 2 (INN) @@ -439,15 +447,15 @@ ThirdPartyIsClosed=閉鎖した取引先 ProductsIntoElements=%s に対する製品/サービスの一覧 CurrentOutstandingBill=現在の未払い勘定 OutstandingBill=未払い勘定での最大値 -OutstandingBillReached=受領済み未払い勘定での最大値 +OutstandingBillReached=受領済未払い勘定での最大値 OrderMinAmount=注文の最小数量 -MonkeyNumRefModelDesc=顧客コードの場合は%syymm-nnnn、ベンダーコードの場合は%syymm-nnnnの形式の数値を返すよ。ここで、yyは年、mmは月、nnnnは途切れずに連続する数で0に戻らないもの。 +MonkeyNumRefModelDesc=戻る数値の形式は、顧客コードの場合は%syymm-nnnn の形式、仕入先コードの場合は%syymm-nnnn の形式。ここで、yyは年、mmは月、nnnnは自動増加順次番号で切れ目なく0戻りしない数値。 LeopardNumRefModelDesc=顧客/サプライヤーコードは無料です。このコードは、いつでも変更することができます。 ManagingDirectors=管理職(s)名称 (CEO, 部長, 社長...) MergeOriginThirdparty=重複する取引先 (削除したい取引先) MergeThirdparties=仕入先sを集約 ConfirmMergeThirdparties=この取引先を現在の取引先に融合したいのね、いいよね?リンクされたすべてのオブジェクト(請求書、注文など...)は現在の取引先に移動され、この取引先には削除されるよ。 -ThirdpartiesMergeSuccess=仕入先sは集約済み +ThirdpartiesMergeSuccess=仕入先sは集約済 SaleRepresentativeLogin=販売担当者のログイン SaleRepresentativeFirstname=販売担当者の姓名の名 SaleRepresentativeLastname=販売担当者の姓 diff --git a/htdocs/langs/ja_JP/compta.lang b/htdocs/langs/ja_JP/compta.lang index 379785639bb..f5d31e8c3c9 100644 --- a/htdocs/langs/ja_JP/compta.lang +++ b/htdocs/langs/ja_JP/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGSTの購入 VATCollected=付加価値税回収した StatusToPay=支払に SpecialExpensesArea=すべての特別支払のエリア +VATExpensesArea=すべてのTVA支払いの領域 SocialContribution=社会税または財政税 SocialContributions=社会税または財政税 SocialContributionsDeductibles=控除可能な社会税または財政税 @@ -85,6 +86,7 @@ PaymentCustomerInvoice=顧客の請求書支払 PaymentSupplierInvoice=ベンダーの請求書支払 PaymentSocialContribution=社会/財政税支払 PaymentVat=付加価値税支払 +AutomaticCreationPayment=支払いを自動的に記録する ListPayment=支払のリスト ListOfCustomerPayments=顧客支払のリスト ListOfSupplierPayments=ベンダー支払のリスト @@ -104,6 +106,8 @@ LT2PaymentES=IRPF支払 LT2PaymentsES=IRPF支払 VATPayment=消費税支払 VATPayments=消費税支払 +VATDeclarations=VAT申告 +VATDeclaration=VAT宣言 VATRefund=消費税還付 NewVATPayment=新規消費税支払 NewLocalTaxPayment=新規税金%s支払 @@ -134,9 +138,17 @@ NoWaitingChecks=入金待ちの小切手はない。 DateChequeReceived=受付の日付を確認すること NbOfCheques=小切手の数 PaySocialContribution=社会税/財政税を支払う -ConfirmPaySocialContribution=この社会税または財政税を支払済みとして分類してもよいか? +PayVAT=VAT申告を支払う +PaySalary=給与カードを支払う +ConfirmPaySocialContribution=この社会税または財政税を支払済として分類してもよいか? +ConfirmPayVAT=このVAT申告を有料として分類してもよいか? +ConfirmPaySalary=この給与カードを支払済として分類してもよいか? DeleteSocialContribution=社会税または財政税支払を削除する +DeleteVAT=VAT宣言を削除する +DeleteSalary=給与カードを削除する ConfirmDeleteSocialContribution=この社会的/財政的納税を削除してもよいか? +ConfirmDeleteVAT=このVAT申告を削除してもよいか? +ConfirmDeleteSalary=この給与を削除してもよいか? ExportDataset_tax_1=社会的および財政的な税金と支払 CalcModeVATDebt=コミットメントアカウンティングのモード<b>%sVAT%s</b>。 CalcModeVATEngagement=収入のモード<b>%sVAT-expenses%s</b>。 @@ -163,6 +175,7 @@ RulesResultInOut=-これには、請求書、経費、VAT、および給与に RulesCADue=-支払の有無にかかわらず、顧客の期日請求書が含まれる。 <br>-これらの請求書の請求日に基づいている。 <br> RulesCAIn=-これには、顧客から受け取った請求書のすべての有効な支払が含まれる。 <br>-これらの請求書支払日に基づいている<br> RulesCATotalSaleJournal=これには、販売仕訳帳のすべての貸方行が含まれる。 +RulesSalesTurnoverOfIncomeAccounts=それには、グループINCOMEでの製品勘定の (貸方-借方) 行が含まれる。 RulesAmountOnInOutBookkeepingRecord=これには、グループ「EXPENSE」または「INCOME」を持つ会計勘定を持つ元帳のレコードが含まれる RulesResultBookkeepingPredefined=これには、グループ「EXPENSE」または「INCOME」を持つ会計勘定を持つ元帳のレコードが含まれる RulesResultBookkeepingPersonalized=パーソナライズされたグループ</b>によってグループ化された会計アカウント<b>を使用して元帳にレコードが表示される @@ -183,6 +196,7 @@ VATReportByThirdParties=第三者による消費税レポート VATReportByCustomers=顧客による消費税レポート VATReportByCustomersInInputOutputMode=収集され支払われた顧客によるVATの報告 VATReportByQuartersInInputOutputMode=徴収され支払われた税金の販売税率による報告 +VATReportShowByRateDetails=このレートの詳細を表示する LT1ReportByQuarters=税率2を報告する LT2ReportByQuarters=税率3を報告する LT1ReportByQuartersES=RE率によるレポート @@ -217,7 +231,7 @@ Pcg_subtype=Pcgサブ種別 InvoiceLinesToDispatch=発送する請求書明細 ByProductsAndServices=製品およびサービス別 RefExt=外部参照 -ToCreateAPredefinedInvoice=テンプ率請求書を作成するには、標準の請求書を作成し、それを検証せずに、ボタン「%s」をクリックする。 +ToCreateAPredefinedInvoice=テンプレート請求書を作成するには、標準の請求書を作成し、それを検証せずに、ボタン「%s」をクリックする。 LinkedOrder=注文へのリンク Mode1=方法1 Mode2=方法2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=サードパーティカードで定義され ACCOUNTING_ACCOUNT_SUPPLIER=ベンダーのサードパーティに使用される会計アカウント ACCOUNTING_ACCOUNT_SUPPLIER_Desc=サードパーティカードで定義された専用の会計アカウントは、補助元帳の会計にのみ使用される。これは総勘定元帳に使用され、サードパーティの専用仕入先会計勘定が定義されていない場合は補助元帳会計のデフォルト値として使用される。 ConfirmCloneTax=社会税/財政税のクローンを確認する +ConfirmCloneVAT=VAT宣言のクローンを確認する +ConfirmCloneSalary=給与のクローンを確認する CloneTaxForNextMonth=来月のためにそれをクローンする SimpleReport=簡単なレポート AddExtraReport=追加レポート(海外および国内の顧客レポートを追加) @@ -253,7 +269,8 @@ AccountingAffectation=会計の割り当て LastDayTaxIsRelatedTo=期間の最終日税は関連している VATDue=消費税が請求されました ClaimedForThisPeriod=期間中請求 -PaidDuringThisPeriod=この期間中に支払われた +PaidDuringThisPeriod=この期間に支払われた +PaidDuringThisPeriodDesc=これは、選択した日付範囲内の期末日を持つVAT申告にリンクされたすべての支払いの合計。 ByVatRate=売却税率 TurnoverbyVatrate=売上税率での請求済売上高 TurnoverCollectedbyVatrate=売上税率での回収済売上高 @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=回収済購入取引高 RulesPurchaseTurnoverDue=-支払の有無にかかわらず、サプライヤーの期日請求書が含まれる。 <br>-これらの請求書の請求日に基づいている。 <br> RulesPurchaseTurnoverIn=-これには、サプライヤーに対して行われた請求書のすべての有効な支払が含まれる。 <br>-これらの請求書支払日に基づいている<br> RulesPurchaseTurnoverTotalPurchaseJournal=これには、購入仕訳帳からのすべての借方明細が含まれる。 +RulesPurchaseTurnoverOfExpenseAccounts=それには、グループEXPENSEでの製品勘定の (借方-貸方) 行が含まれる。 ReportPurchaseTurnover=請求済購入取引高 ReportPurchaseTurnoverCollected=回収済購入取引高 IncludeVarpaysInResults = レポートにさまざまな支払を含める diff --git a/htdocs/langs/ja_JP/dict.lang b/htdocs/langs/ja_JP/dict.lang index 38dbf01c4e3..38e701fc853 100644 --- a/htdocs/langs/ja_JP/dict.lang +++ b/htdocs/langs/ja_JP/dict.lang @@ -112,7 +112,7 @@ CountryGN=ギニー CountryGW=ギニアビサウ CountryGY=ガイアナ CountryHT=ハイチ -CountryHM=ハード島とマクドナルド +CountryHM=ハード島とマクドナルド諸島 CountryVA=ローマ法王庁(バチカン市国) CountryHN=ホンジュラス CountryHK=香港 @@ -132,12 +132,12 @@ CountryKP=北朝鮮 CountryKR=韓国 CountryKW=クウェート CountryKG=キルギス -CountryLA=ラオ語 +CountryLA=ラオス CountryLV=ラトビア CountryLB=レバノン CountryLS=レソト CountryLR=リベリア -CountryLY=リビアの +CountryLY=リビア CountryLI=リヒテンシュタイン CountryLT=リトアニア CountryLU=ルクセンブルグ @@ -177,7 +177,7 @@ CountryNO=ノルウェー CountryOM=オマーン CountryPK=パキスタン CountryPW=パラオ -CountryPS=パレスチナ自治区、 +CountryPS=パレスチナ自治区 CountryPA=パナマ CountryPG=パプアニューギニア CountryPY=パラグアイ @@ -191,7 +191,7 @@ CountryRE=レユニオン CountryRO=ルーマニア CountryRW=ルワンダ CountrySH=セントヘレナ島 -CountryKN=セントクリストファーネビス +CountryKN=セントクリストファー・ネイビス CountryLC=セントルシア CountryPM=サンピエール島·ミクロン島 CountryVC=セントビンセントおよびグレナディーン諸島 @@ -256,9 +256,9 @@ CivilityMTRE=マスタ CivilityDR=ドクター ##### Currencies ##### Currencyeuros=ユーロ -CurrencyAUD=豪ドルs +CurrencyAUD=豪ドル CurrencySingAUD=豪ドル -CurrencyCAD=カナダドルs +CurrencyCAD=カナダドル CurrencySingCAD=カナダドル CurrencyCHF=スイスフラン CurrencySingCHF=スイスフラン @@ -266,7 +266,7 @@ CurrencyEUR=ユーロ CurrencySingEUR=ユーロ CurrencyFRF=フランスのフラン CurrencySingFRF=フランスフラン -CurrencyGBP=英ポンドs +CurrencyGBP=イギリス・ポンド CurrencySingGBP=英ポンド CurrencyINR=インドルピー CurrencySingINR=インドルピー @@ -276,11 +276,11 @@ CurrencyMGA=アリアリ CurrencySingMGA=アリアリ CurrencyMUR=モーリシャスルピー CurrencySingMUR=モーリシャスルピー -CurrencyNOK=ノルウェークローネs +CurrencyNOK=ノルウェークローネ CurrencySingNOK=ノルウェークローネ CurrencyTND=チュニジアディナール CurrencySingTND=チュニジアディナール -CurrencyUSD=米ドルs +CurrencyUSD=米ドル CurrencySingUSD=米ドル CurrencyUAH=グリブナ CurrencySingUAH=グリブナ diff --git a/htdocs/langs/ja_JP/ecm.lang b/htdocs/langs/ja_JP/ecm.lang index cd0cf844f89..bbec3ce2d28 100644 --- a/htdocs/langs/ja_JP/ecm.lang +++ b/htdocs/langs/ja_JP/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=ファイルはまだデータベースにインデ ExtraFieldsEcmFiles=ExtrafieldsEcmファイル ExtraFieldsEcmDirectories=ExtrafieldsEcmディレクトリ ECMSetup=ECMセットアップ +GenerateImgWebp=すべての画像を.webp形式の別のバージョンで複製する +ConfirmGenerateImgWebp=確認すると、現在このフォルダとそのサブフォルダ...にあるすべての画像に対して .webp形式の画像が生成される +ConfirmImgWebpCreation=すべての画像の重複を確認する +SucessConvertImgWebp=画像が正常に複製された diff --git a/htdocs/langs/ja_JP/errors.lang b/htdocs/langs/ja_JP/errors.lang index 40d07d1e85b..bf03fa63a87 100644 --- a/htdocs/langs/ja_JP/errors.lang +++ b/htdocs/langs/ja_JP/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=ディレクトリが見つかりません<b>%s(PHP</b> openbas ErrorFunctionNotAvailableInPHP=関数<b>%sは、</b>この機能を使用するために必要となるが、このバージョンの/ PHPのセットアップでは使用できない。 ErrorDirAlreadyExists=この名前のディレクトリがすでに存在している。 ErrorFileAlreadyExists=この名前を持つファイルがすでに存在している。 +ErrorDestinationAlreadyExists=<b> %s</b>という名前の別のファイルが既に存在する。 ErrorPartialFile=ファイルはサーバーで完全に受け取っていない。 ErrorNoTmpDir=一時的なdirectyの%sが存在しません。 ErrorUploadBlockedByAddon=PHP / Apacheプラグインによってブロックされてアップロードする。 @@ -214,7 +215,7 @@ ErrorTooManyErrorsProcessStopped=エラーが多すぎる。プロセスが停 ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=このアクションで在庫を増減するオプションが設定されている場合、一括検証はできない(増加/減少する倉庫を定義できるように、1つずつ検証する必要がある) ErrorObjectMustHaveStatusDraftToBeValidated=オブジェクト%sを検証するには、ステータスが "ドラフト" である必要がある。 ErrorObjectMustHaveLinesToBeValidated=オブジェクト%sには、検証する行が必要だ。 -ErrorOnlyInvoiceValidatedCanBeSentInMassAction= "電子メールで送信" 一括アクションを使用して送信できるのは、検証済みの請求書のみだ。 +ErrorOnlyInvoiceValidatedCanBeSentInMassAction= "電子メールで送信" 一括アクションを使用して送信できるのは、検証済の請求書のみだ。 ErrorChooseBetweenFreeEntryOrPredefinedProduct=記事が事前定義された製品であるかどうかを選択する必要がある ErrorDiscountLargerThanRemainToPaySplitItBefore=あなたが適用しようとする割引は、支払うべき残りよりも大きいだ。前に割引を2つの小さな割引に分割する。 ErrorFileNotFoundWithSharedLink=ファイルが見つからなかった。共有キーが変更されたか、ファイルが最近削除された可能性がある。 @@ -226,6 +227,7 @@ ErrorDuringChartLoad=勘定科目表の読み込み中にエラーが発生し ErrorBadSyntaxForParamKeyForContent=paramkeyforcontentの構文が正しくない。 %sまたは%sで始まる値が必要だ ErrorVariableKeyForContentMustBeSet=エラー、名前%s(表示するテキストコンテンツ付き)または%s(表示する外部URL付き)の定数を設定する必要がある。 ErrorURLMustStartWithHttp=URL %sは http:// または https:// で始まる必要がある +ErrorHostMustNotStartWithHttp=ホスト名%sは、http:// または https:// で始まらないこと ErrorNewRefIsAlreadyUsed=エラー、新規参照はすでに使用されている ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=エラー、クローズされた請求書にリンクされた支払いを削除することはできない。 ErrorSearchCriteriaTooSmall=検索条件が小さすぎる。 @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=パブリックインターフェイスが有効 ErrorLanguageRequiredIfPageIsTranslationOfAnother=別のページの翻訳として設定されている場合は、新しいページの言語を定義する必要がある ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=新しいページの言語は、別ページの翻訳として設定されている場合、ソース言語にしないこと ErrorAParameterIsRequiredForThisOperation=この操作にはパラメーターが必須です +ErrorDateIsInFuture=エラー、日付を未来にすることはできない +ErrorAnAmountWithoutTaxIsRequired=エラー、数量は必須 +ErrorAPercentIsRequired=エラー、パーセンテージを正しく入力すること +ErrorYouMustFirstSetupYourChartOfAccount=最初に勘定科目表を設定する必要がある # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHPパラメータ upload_max_filesize(%s)は、PHPパラメータ post_max_size(%s)よりも大きくなっている。これは一貫した設定ではない。 @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=警告、ECMデータベースインデ WarningTheHiddenOptionIsOn=警告、非表示のオプション<b> %s</b>がオンになっている。 WarningCreateSubAccounts=警告、サブアカウントを直接作成することはできない。このリストでそれらを見つけるには、サードパーティまたはユーザーを作成し、それらにアカウンティングコードを割り当てる必要がある WarningAvailableOnlyForHTTPSServers=HTTPSで保護された接続を使用している場合にのみ使用できます。 +WarningModuleXDisabledSoYouMayMissEventHere=モジュール%sが有効になっていない。そのため、ここでは多くのイベントを見逃す可能性がある。 +ErrorActionCommPropertyUserowneridNotDefined=ユーザの所有者が必要 +ErrorActionCommBadType=選択したイベント種別 (id: %n, code: %s) がイベント種別辞書に存在しない diff --git a/htdocs/langs/ja_JP/externalsite.lang b/htdocs/langs/ja_JP/externalsite.lang index e13d16f892d..69f71eced9c 100644 --- a/htdocs/langs/ja_JP/externalsite.lang +++ b/htdocs/langs/ja_JP/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=外部ウェブサイトへのリンクを設定 -ExternalSiteURL=外部サイトのURL +ExternalSiteURL=HTMLiframeコンテンツの外部サイトURL ExternalSiteModuleNotComplete=モジュールExternalSite(外部サイト)が正しく構成されていませんでした。 ExampleMyMenuEntry=私のメニューエントリ diff --git a/htdocs/langs/ja_JP/install.lang b/htdocs/langs/ja_JP/install.lang index 042be5d8fa0..79ddd3fbe8f 100644 --- a/htdocs/langs/ja_JP/install.lang +++ b/htdocs/langs/ja_JP/install.lang @@ -23,13 +23,13 @@ ErrorPHPDoesNotSupportUTF8=PHPインストールはUTF8関数をサポートし ErrorPHPDoesNotSupportIntl=PHPインストールはIntl関数をサポートしない。 ErrorPHPDoesNotSupportxDebug=PHPインストールは、拡張デバッグ機能をサポートしない。 ErrorPHPDoesNotSupport=PHPインストールは、%s関数をサポートしない。 -ErrorDirDoesNotExists=ディレクトリの%sが存在しません。 +ErrorDirDoesNotExists=%sディレクトリが存在しません。 ErrorGoBackAndCorrectParameters=戻ってパラメータを確認/修正すること。 ErrorWrongValueForParameter=あなたは、パラメータ '%s' に間違った値を入力した可能性がある。 ErrorFailedToCreateDatabase=データベース %s を作成できなかった。 ErrorFailedToConnectToDatabase=データベース %s への接続に失敗した。 ErrorDatabaseVersionTooLow=データベースのバージョン (%s) が古すぎる。 バージョン %s 以降が必要。 -ErrorPHPVersionTooLow=あまりにも古いPHPバージョン。バージョン%sが必要。 +ErrorPHPVersionTooLow=PHPのバージョンが古すぎます。バージョン%sが必要です。 ErrorConnectedButDatabaseNotFound=サーバーへの接続は成功したが、データベース '%s'が見つかりません。 ErrorDatabaseAlreadyExists=データベース %s は既に存在する。 IfDatabaseNotExistsGoBackAndUncheckCreate=データベースが存在しない場合は、戻って "データベースの作成" オプションをオンにする。 @@ -39,16 +39,16 @@ PHPVersion=PHPのバージョン License=ライセンスを使用して ConfigurationFile=設定ファイル WebPagesDirectory=ウェブページが保存されているディレクトリ -DocumentsDirectory=アップロードし、生成されたドキュメントを格納するディレクトリ +DocumentsDirectory=アップロードされたドキュメントや生成されたドキュメントを格納するディレクトリ URLRoot=URLのルート -ForceHttps=力安全な接続(HTTPS) +ForceHttps=セキュアな接続(HTTPS)を強制する CheckToForceHttps=セキュアな接続(https)を強制的にこのオプションをチェックすること。 <br>これは、WebサーバがSSL証明書を使用して構成されている必要がある。 DolibarrDatabase=Dolibarrデータベース DatabaseType=データベース種別 DriverType=ドライバ種別 Server=サーバー ServerAddressDescription=データベースサーバーの名前またはIP住所。データベースサーバーがWebサーバーと同じサーバーでホストされている場合、通常は「localhost」。 -ServerPortDescription=データベース·サーバーのポート。不明の場合は、空の保管すること。 +ServerPortDescription=データベース・サーバーのポート。不明な場合は空欄のままにしてください。 DatabaseServer=データベース·サーバー DatabaseName=データベース名 DatabasePrefix=データベーステーブルプレフィックス @@ -68,7 +68,7 @@ ServerConnection=サーバーへの接続 DatabaseCreation=データベースの作成 CreateDatabaseObjects=データベースオブジェクトの作成 ReferenceDataLoading=参照データのロード -TablesAndPrimaryKeysCreation=テーブルと主キーの作成 +TablesAndPrimaryKeysCreation=テーブルと初期キーの作成 CreateTableAndPrimaryKey=テーブルの%sを作成する CreateOtherKeysForTable=テーブルの%sの外部キーとインデックスを作成する OtherKeysCreation=外部キーとインデックスの作成 @@ -78,8 +78,8 @@ PleaseTypePassword=パスワードを入力すること。空のパスワード PleaseTypeALogin=ログインを入力すること! PasswordsMismatch=パスワードが異なる。もう一度お試しください。 SetupEnd=設定の終了 -SystemIsInstalled=このインストールは満了。 -SystemIsUpgraded=Dolibarrが正常にアップグレードされている。 +SystemIsInstalled=インストールが完了しました。 +SystemIsUpgraded=Dolibarrが正常にアップグレードされました。 YouNeedToPersonalizeSetup=あなたのニーズに合わせてDolibarrを設定する必要がある(外観、機能、...).これを行うには、下記のリンクをクリックすること。 AdminLoginCreatedSuccessfuly=Dolibarr 管理者ログイン '<b>%s</b>' の作成が成功した。 GoToDolibarr=Dolibarrに行く @@ -213,5 +213,5 @@ YouTryInstallDisabledByDirLock=アプリケーションは自己アップグレ YouTryInstallDisabledByFileLock=アプリケーションは自己アップグレードを試みたが、インストール/アップグレードページはセキュリティのために無効になっている(dolibarrドキュメントディレクトリにロックファイル<strong> install.lock </strong>が存在するため)。 <br> ClickHereToGoToApp=アプリケーションに移動するには、ここをクリックすること ClickOnLinkOrRemoveManualy=アップグレードが進行中の場合は、しばらく待つこと。そうでない場合は、次のリンクをクリックすること。この同じページが常に表示される場合は、documentsディレクトリのinstall.lockファイルを削除/名前変更する必要がある。 -Loaded=ロード済み +Loaded=ロード済 FunctionTest=機能テスト diff --git a/htdocs/langs/ja_JP/languages.lang b/htdocs/langs/ja_JP/languages.lang index 1a4ab927428..a5503951b7a 100644 --- a/htdocs/langs/ja_JP/languages.lang +++ b/htdocs/langs/ja_JP/languages.lang @@ -8,7 +8,7 @@ Language_bn_BD=ベンガル語 Language_bn_IN=ベンガル語(インド) Language_bg_BG=ブルガリア語 Language_bs_BA=ボスニア語 -Language_ca_ES=カタルにゃ語 +Language_ca_ES=カタロニア語 Language_cs_CZ=チェコ語 Language_da_DA=デンマーク語 Language_da_DK=デンマーク語 @@ -59,7 +59,7 @@ Language_fr_NC=フランス(ニューカレドニア) Language_fr_SN=フランス語(セネガル) Language_fy_NL=フリジア語 Language_gl_ES=ガリシア語 -Language_he_IL=ヘブライ語の +Language_he_IL=ヘブライ語 Language_hi_IN=ヒンディー語(インド) Language_hr_HR=クロアチア語 Language_hu_HU=ハンガリー語 @@ -89,7 +89,7 @@ Language_ru_RU=ロシア語 Language_ru_UA=ロシア語(ウクライナ) Language_tr_TR=トルコ語 Language_sl_SI=スロベニア語 -Language_sv_SV=スウエーデん語 +Language_sv_SV=スウェーデン語 Language_sv_SE=スウェーデン語 Language_sq_AL=アルバニア語 Language_sk_SK=スロバキア語 diff --git a/htdocs/langs/ja_JP/main.lang b/htdocs/langs/ja_JP/main.lang index ef5a5e7ff91..9a56b5c791e 100644 --- a/htdocs/langs/ja_JP/main.lang +++ b/htdocs/langs/ja_JP/main.lang @@ -66,7 +66,7 @@ ErrorCantLoadUserFromDolibarrDatabase=Dolibarrデータベース内のユーザ ErrorNoVATRateDefinedForSellerCountry=エラー、国%s 'に対して定義されていないのVAT率。 ErrorNoSocialContributionForSellerCountry=エラー、国 '%s'に定義された社会/財政税タイプがありません。 ErrorFailedToSaveFile=エラー、ファイルを保存に失敗しました。 -ErrorCannotAddThisParentWarehouse=すでに既存の倉庫の子である親倉庫を追加しようとしています +ErrorCannotAddThisParentWarehouse=すでに既存の倉庫の子である親倉庫を追加しようとしている MaxNbOfRecordPerPage=パージ当たりの最大レコード数 NotAuthorized=その実行には権限が不足 SetDate=日付を設定する @@ -94,7 +94,7 @@ RecordDeleted=レコード削除 RecordGenerated=レコード生成 LevelOfFeature=機能のレベル NotDefined=未定義 -DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr認証モードは、構成ファイル<b> conf.php</b>で<b>%s</b>に設定されています。 <br>これは、パスワードデータベースがDolibarrの外部にあるため、このフィールドを変更しても効果がない可能性があることを意味します。 +DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr認証モードは、構成ファイル<b> conf.php</b>で<b>%s</b>に設定されている。 <br>これは、パスワードデータベースがDolibarrの外部にあるため、このフィールドを変更しても効果がない可能性があることを意味します。 Administrator=管理者 Undefined=未定義 PasswordForgotten=パスワード忘れたの? @@ -144,15 +144,15 @@ PeriodEndDate=期間の終了日 SelectedPeriod=選択した期間 PreviousPeriod=前回の期間 Activate=活性化 -Activated=活性化済み +Activated=活性化済 Closed=閉じた Closed2=閉じた NotClosed=未閉鎖 -Enabled=有効化済み +Enabled=有効化済 Enable=有効化 -Deprecated=廃止済み +Deprecated=廃止済 Disable=無効化 -Disabled=無効化済み +Disabled=無効化済 Add=加える AddLink=リンクを追加 RemoveLink=リンクを削除 @@ -278,6 +278,7 @@ DateModificationShort=MODIF。日付 IPModification=変更IP DateLastModification=最新の変更日 DateValidation=検証日 +DateSigning=署名日 DateClosing=日付を閉じる DateDue=期日 DateValue=値の日付 @@ -361,7 +362,7 @@ UnitPriceHTCurrency=単価(除く)(通貨) UnitPriceTTC=単価 PriceU=UP PriceUHT=UP(純額) -PriceUHTCurrency=U.P(通貨) +PriceUHTCurrency=U.P (正味) (通貨) PriceUTTC=アップ。 (税込) Amount=量 AmountInvoice=請求額 @@ -389,6 +390,8 @@ AmountTotal=合計金額 AmountAverage=平均額 PriceQtyMinHT=価格数量最小(税抜) PriceQtyMinHTCurrency=価格数量最小(税抜き)(通貨) +PercentOfOriginalObject=元のオブジェクトのパーセント +AmountOrPercent=数量またはパーセント Percentage=割合 Total=合計 SubTotal=小計 @@ -724,7 +727,7 @@ MenuMembers=メンバー MenuAgendaGoogle=Googleの議題 MenuTaxesAndSpecialExpenses=税金|特別経費 ThisLimitIsDefinedInSetup=Dolibarr制限(メニューホームセットアップ·セキュリティ):%s KB、PHP制限:%s KB -NoFileFound=このディレクトリに保存されない文書ません +NoFileFound=ドキュメントがアップロードされていない CurrentUserLanguage=現在の言語 CurrentTheme=現在のテーマ CurrentMenuManager=現在のメニューマネージャー @@ -866,7 +869,7 @@ DeleteLine=行を削除 ConfirmDeleteLine=この行を削除してもよろしいですか? ErrorPDFTkOutputFileNotFound=エラー:ファイルは生成されませんでした。 'pdftk'コマンドが$ PATH環境変数(linux / unixのみ)に含まれるディレクトリーにインストールされていることを確認するか、システム管理者に連絡してください。 NoPDFAvailableForDocGenAmongChecked=チェックされたレコードの中でドキュメント生成に使用できるPDFがありませんでした -TooManyRecordForMassAction=マスアクション用に選択されたレコードが多すぎます。アクションは、%sレコードのリストに制限されています。 +TooManyRecordForMassAction=マスアクション用に選択されたレコードが多すぎます。アクションは、%sレコードのリストに制限されている。 NoRecordSelected=レコードが選択されていません MassFilesArea=大量アクションによって作成されたファイルの領域 ShowTempMassFilesArea=大量アクションによって作成されたファイルの領域を表示する @@ -888,9 +891,9 @@ ExportList=エクスポートリスト ExportOptions=エクスポートオプション IncludeDocsAlreadyExported=すでにエクスポートされたドキュメントを含める ExportOfPiecesAlreadyExportedIsEnable=すでにエクスポートされたピースのエクスポートが有効になります -ExportOfPiecesAlreadyExportedIsDisable=すでにエクスポートされたピースのエクスポートは無効になっています +ExportOfPiecesAlreadyExportedIsDisable=すでにエクスポートされたピースのエクスポートは無効になっている AllExportedMovementsWereRecordedAsExported=エクスポートされたすべての動きは、エクスポートされたものとして記録されました -NotAllExportedMovementsCouldBeRecordedAsExported=エクスポートされたすべての動きをエクスポート済みとして記録できるわけではありません +NotAllExportedMovementsCouldBeRecordedAsExported=エクスポートされたすべての動きをエクスポート済として記録できるわけではありません Miscellaneous=その他 Calendar=カレンダー GroupBy=グループ化... @@ -899,8 +902,10 @@ ViewAccountList=元帳を表示 ViewSubAccountList=補助科目元帳を表示 RemoveString=文字列 '%s'を削除します SomeTranslationAreUncomplete=提供された言語の一部において、翻訳がほんの部分的だったり誤っていたりなの。自分の言語の訂正を助けたい人は、<a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> に登録して、改善案を追加してね。 -DirectDownloadLink=直接ダウンロードリンク(公開/外部) -DirectDownloadInternalLink=直接ダウンロードリンク(ログに記録する必要があり、権限が必要です) +DirectDownloadLink=公開ダウンロードリンク +PublicDownloadLinkDesc=ファイルのダウンロードにはリンクのみが必要 +DirectDownloadInternalLink=プライベートダウンロードリンク +PrivateDownloadLinkDesc=ログに記録する必要があり、ファイルを表示またはダウンロードするためのアクセス許可が必要 Download=ダウンロード DownloadDocument=ドキュメントをダウンロード ActualizeCurrency=為替レートを更新する @@ -1006,13 +1011,14 @@ Select2Enter=入る Select2MoreCharacter=以上のキャラクター Select2MoreCharacters=以上の文字 Select2MoreCharactersMore= <strong>検索構文:</strong> <br> <kbd> <strong> | </strong> </kbd> <kbd> OR </kbd>(| B)</kbd>と<br> <kbd> <strong> * </strong> </kbd> <kbd>任意の文字</kbd>(* b)の<br> <kbd> <strong> ^ </strong> </kbd> <kbd>スタート</kbd>と(^ AB)<br> <kbd> <strong> $ </strong> </kbd> <kbd>エンド( ab $)<br> -Select2LoadingMoreResults=より多くの結果を読み込んでいます... +Select2LoadingMoreResults=より多くの結果を読み込んでいる... Select2SearchInProgress=進行中の検索... SearchIntoThirdparties=サードパーティ SearchIntoContacts=コンタクト SearchIntoMembers=メンバー SearchIntoUsers=ユーザー SearchIntoProductsOrServices=製品またはサービス +SearchIntoBatch=ロット/シリアル SearchIntoProjects=プロジェクト SearchIntoMO=製造オーダー SearchIntoTasks=タスク @@ -1049,12 +1055,13 @@ KeyboardShortcut=キーボードショートカット AssignedTo=影響を受ける Deletedraft=下書き削除 ConfirmMassDraftDeletion=下書き大量削除確 -FileSharedViaALink=リンクを介して共有されるファイル +FileSharedViaALink=パブリックリンクと共有されているファイル SelectAThirdPartyFirst=最初にサードパーティを選択してください... -YouAreCurrentlyInSandboxMode=現在、%s「サンドボックス」モードになっています +YouAreCurrentlyInSandboxMode=現在、%s「サンドボックス」モードになっている Inventory=在庫 AnalyticCode=分析コード TMenuMRP=MRP +ShowCompanyInfos=法人情報を表示する ShowMoreInfos=詳細情報を表示 NoFilesUploadedYet=最初にドキュメントをアップロードしてください SeePrivateNote=プライベートノートを見る @@ -1104,7 +1111,7 @@ ASAP=できるだけ速やかに CREATEInDolibarr=作成されたレコード%s MODIFYInDolibarr=レコード%sが変更されました DELETEInDolibarr=レコード%sが削除されました -VALIDATEInDolibarr=検証済みのレコード%s +VALIDATEInDolibarr=検証済のレコード%s APPROVEDInDolibarr=承認された記録%s DefaultMailModel=デフォルトのメールモデル PublicVendorName=ベンダーの公開名 @@ -1120,3 +1127,5 @@ AffectTag=タグに影響を与える ConfirmAffectTag=バルクタグの影響 ConfirmAffectTagQuestion=選択した%sレコード(s)のタグに影響を与えてもよいか? CategTypeNotFound=レコードのタイプのタグタイプが見つからない +CopiedToClipboard=クリップボードにコピー +InformationOnLinkToContract=この金額は、契約のすべての行の合計にすぎません。時間の概念は考慮されていない。 diff --git a/htdocs/langs/ja_JP/margins.lang b/htdocs/langs/ja_JP/margins.lang index ab5f6299a45..8303105bb25 100644 --- a/htdocs/langs/ja_JP/margins.lang +++ b/htdocs/langs/ja_JP/margins.lang @@ -22,7 +22,7 @@ ProductService=製品やサービス AllProducts=すべての製品とサービス ChooseProduct/Service=製品またはサービスを選択すること ForceBuyingPriceIfNull=定義されていない場合、購入/原価を販売価格に強制する -ForceBuyingPriceIfNullDetails=購入/原価が定義されておらず、このオプションが「オン」の場合、利益はオンラインでゼロになる(購入/原価=販売価格)。それ以外の場合(「オフ」)、利益は提案されたデフォルトと等しくなる。 +ForceBuyingPriceIfNullDetails=新規行を追加するときに購入/原価が提供されておらず、このオプションが「オン」の場合、新規行のマージンは0になる(購入/原価=販売価格)。このオプションが「オフ」(推奨)の場合、マージンはデフォルトで提案されている値と等しくなる(デフォルト値が見つからない場合は100%%になる可能性がある)。 MARGIN_METHODE_FOR_DISCOUNT=グローバル割引の利益方式 UseDiscountAsProduct=製品として UseDiscountAsService=サービスとして diff --git a/htdocs/langs/ja_JP/members.lang b/htdocs/langs/ja_JP/members.lang index bbea9f1697c..417d21d59b5 100644 --- a/htdocs/langs/ja_JP/members.lang +++ b/htdocs/langs/ja_JP/members.lang @@ -9,7 +9,7 @@ UserNotLinkedToMember=ユーザーがメンバにリンクされていない ThirdpartyNotLinkedToMember=メンバにリンクされていない取引先 MembersTickets=メンバチケット FundationMembers=Foundationのメンバ -ListOfValidatedPublicMembers=検証済みのパブリックメンバのリスト +ListOfValidatedPublicMembers=検証済のパブリックメンバのリスト ErrorThisMemberIsNotPublic=このメンバは、パブリックではない ErrorMemberIsAlreadyLinkedToThisThirdParty=別のメンバ(名前<b>:%s、</b>ログイン<b>:%s)</b>は既に取引先製の<b>%s</b>にリンクされている。第三者が唯一のメンバ(およびその逆)にリンクすることはできないので、最初にこのリンクを削除する。 ErrorUserPermissionAllowsToLinksToItselfOnly=セキュリティ上の理由から、あなたはすべてのユーザーが自分のものでないユーザーにメンバをリンクすることができるように編集する権限を付与する必要がある。 @@ -21,10 +21,12 @@ MembersListToValid=ドラフトのメンバのリスト(検証する) MembersListValid=有効なメンバのリスト MembersListUpToDate=最新のサブスクリプションを持つ有効なメンバのリスト MembersListNotUpToDate=サブスクリプションが古くなっている有効なメンバのリスト +MembersListExcluded=除外されたメンバのリスト MembersListResiliated=終了したメンバのリスト MembersListQualified=修飾されたメンバのリスト MenuMembersToValidate=ドラフトのメンバ MenuMembersValidated=検証メンバ +MenuMembersExcluded=除外されたメンバ MenuMembersResiliated=終了したメンバ MembersWithSubscriptionToReceive=受け取るために、サブスクリプションを持つメンバ MembersWithSubscriptionToReceiveShort=受け取るサブスクリプション @@ -47,11 +49,14 @@ MemberStatusActiveLate=サブスクリプションの有効期限が切れた MemberStatusActiveLateShort=期限切れの MemberStatusPaid=最新のサブスクリプション MemberStatusPaidShort=最新の +MemberStatusExcluded=除外されたメンバ +MemberStatusExcludedShort=除外 MemberStatusResiliated=終了メンバ MemberStatusResiliatedShort=終了しました MembersStatusToValid=ドラフトのメンバ +MembersStatusExcluded=除外されたメンバ MembersStatusResiliated=終了したメンバ -MemberStatusNoSubscription=検証済み(サブスクリプションは不要) +MemberStatusNoSubscription=検証済(サブスクリプションは不要) MemberStatusNoSubscriptionShort=検証 SubscriptionNotNeeded=サブスクリプションは必要ない NewCotisation=新規貢献 @@ -82,6 +87,8 @@ Physical=物理的な Moral=道徳 MorAndPhy=道徳的および物理的 Reenable=再度有効にする +ExcludeMember=メンバを除外する +ConfirmExcludeMember=このメンバを除外してもよろしいですか? ResiliateMember=メンバを終了する ConfirmResiliateMember=このメンバを終了してもよいか? DeleteMember=メンバを削除する @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=メンバの検証時にメンバ DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=新規サブスクリプションの記録でメンバに電子メールを送信するために使用する電子メールテンプレート DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=サブスクリプションの有効期限が近づいたときにメールリマインダーを送信するために使用するメールテンプレート DescADHERENT_EMAIL_TEMPLATE_CANCELATION=メンバのキャンセル時にメンバに電子メールを送信するために使用する電子メールテンプレート +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=メンバーの除外時にメンバーに電子メールを送信するために使用する電子メールテンプレート DescADHERENT_MAIL_FROM=自動メールの送信者メール DescADHERENT_ETIQUETTE_TYPE=ラベルページのフォーマット DescADHERENT_ETIQUETTE_TEXT=メンバのアドレスシートに印刷されたテキスト @@ -162,6 +170,7 @@ DocForLabels=アドレスシート<b>(:%s</b>出力の形式は実際の設定 SubscriptionPayment=サブスクリプション費用の支払い LastSubscriptionDate=最新のサブスクリプション支払いの日付 LastSubscriptionAmount=最新のサブスクリプションの量 +LastMemberType=前回のメンバー種別 MembersStatisticsByCountries=国別メンバ統計 MembersStatisticsByState=都道府県/州によってメンバの統計 MembersStatisticsByTown=町によってメンバの統計 diff --git a/htdocs/langs/ja_JP/modulebuilder.lang b/htdocs/langs/ja_JP/modulebuilder.lang index cd03bfe05a8..0c1e7ea97fb 100644 --- a/htdocs/langs/ja_JP/modulebuilder.lang +++ b/htdocs/langs/ja_JP/modulebuilder.lang @@ -100,7 +100,7 @@ PermissionsDefDescTooltip=モジュール/アプリケーションによって HooksDefDesc=定義する:管理したいフックのコンテキストを <b>module_parts['hooks']</b> プロパティのモジュール記述子の中に。 (コンテキストのリストは、コアコードで '<b>initHooks(</b>' を検索すると見つかる).<br>編集する:フックされた関数のコードを追加するためのフックファイルを。 (フック可能な関数は、コアコードで '<b>executeHooks</b>' を検索すると見つかる). TriggerDefDesc=実行されるビジネスイベントごとに実行するコードをトリガーファイルで定義する。 SeeIDsInUse=インストールで使用されているIDを確認する -SeeReservedIDsRangeHere=予約済みIDの範囲を参照すること +SeeReservedIDsRangeHere=予約済IDの範囲を参照すること ToolkitForDevelopers=Dolibarr開発者向けのツールキット TryToUseTheModuleBuilder=SQLとPHPの知識がある場合は、ネイティブモジュールビルダーウィザードを使用できる。 <br>モジュール<strong>%s </strong>を有効にし、右上のメニューで<span class="fa fa-bug"></span>をクリックしてウィザードを使用する。 <br>警告:これは高度な開発者機能。本番サイトで</b>実験ではなく<b>を実行すること。 SeeTopRightMenu=右上のメニューの<span class="fa fa-bug"></span>を参照すること @@ -133,7 +133,9 @@ IncludeDocGeneration=オブジェクトからいくつかのドキュメント IncludeDocGenerationHelp=これをチェックすると、レコードに「ドキュメントの生成」ボックスを追加するためのコードが生成される。 ShowOnCombobox=コンボボックスに値を表示する KeyForTooltip=ツールチップのキー -CSSClass=CSSクラス +CSSClass=フォーム 編集/作成 用のCSS +CSSViewClass=読取フォーム用CSS +CSSListClass=リストのCSS NotEditable=編集不可 ForeignKey=外部キー TypeOfFieldsHelp=フィールドの種別:<br>varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' は、コンボの後に+ボタンを追加してレコードを作成することを意味する、 'filter' は例えば、 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' ) diff --git a/htdocs/langs/ja_JP/orders.lang b/htdocs/langs/ja_JP/orders.lang index 2699436c7ea..8a44ed499bb 100644 --- a/htdocs/langs/ja_JP/orders.lang +++ b/htdocs/langs/ja_JP/orders.lang @@ -16,6 +16,8 @@ ToOrder=順序を作る MakeOrder=順序を作る SupplierOrder=注文書 SuppliersOrders=注文書 +SaleOrderLines=販売注文ライン +PurchaseOrderLines=購入注文ライン SuppliersOrdersRunning=現在の注文書 CustomerOrder=販売注文 CustomersOrders=受注 @@ -46,8 +48,8 @@ StatusOrderReceivedAllShort=受け取った製品 StatusOrderCanceled=キャンセル StatusOrderDraft=下書き(検証する必要がある) StatusOrderValidated=検証 -StatusOrderOnProcess=注文済み-スタンバイ受信 -StatusOrderOnProcessWithValidation=注文済み-スタンバイ受信または検証 +StatusOrderOnProcess=注文済-スタンバイ受信 +StatusOrderOnProcessWithValidation=注文済-スタンバイ受信または検証 StatusOrderProcessed=処理 StatusOrderToBill=請求する StatusOrderApproved=承認された @@ -57,7 +59,7 @@ StatusOrderReceivedAll=受け取ったすべての製品 ShippingExist=出荷が存在する QtyOrdered=数量は、注文された ProductQtyInDraft=下書き注文への製品数量 -ProductQtyInDraftOrWaitingApproved=下書き注文または承認済み注文への製品数量、まだ注文されていない +ProductQtyInDraftOrWaitingApproved=下書き注文または承認済注文への製品数量、まだ注文されていない MenuOrdersToBill=法案に注文 MenuOrdersToBill2=請求可能な注文 ShipProduct=船積 @@ -90,7 +92,7 @@ NumberOfOrdersByMonth=月別受注数 AmountOfOrdersByMonthHT=月別のご注文金額(税込) ListOfOrders=注文の一覧 CloseOrder=密集隊形 -ConfirmCloseOrder=この注文を配信済みに設定してもよいか?注文が配信されると、請求に設定できる。 +ConfirmCloseOrder=この注文を配信済に設定してもよいか?注文が配信されると、請求に設定できる。 ConfirmDeleteOrder=この注文を削除してもよいか? ConfirmValidateOrder=この注文を<b>%s </b>という名前で検証してもよいか? ConfirmUnvalidateOrder=注文<b>%s </b>を下書きステータスに復元してもよいか? @@ -148,14 +150,14 @@ PDFProformaDescription=完全な 見積請求書 テンプレート CreateInvoiceForThisCustomer=請求書注文 CreateInvoiceForThisSupplier=請求書注文 NoOrdersToInvoice=請求可能な注文はない -CloseProcessedOrdersAutomatically=選択したすべての注文を「処理済み」に分類する。 +CloseProcessedOrdersAutomatically=選択したすべての注文を「処理済」に分類する。 OrderCreation=注文の作成 Ordered=順序付けられた OrderCreated=注文が作成された OrderFail=注文の作成中にエラーが発生した CreateOrders=注文を作成する ToBillSeveralOrderSelectCustomer=複数の注文の請求書を作成するには、最初に顧客をクリックしてから、「%s」を選択する。 -OptionToSetOrderBilledNotEnabled=モジュールワークフローのオプションで、請求書検証時に注文を自動的に「請求済み」に設定するオプションが有効になっていないため、請求書が生成された後、注文のステータスを手動で「請求済み」に設定する必要がある。 +OptionToSetOrderBilledNotEnabled=モジュールワークフローのオプションで、請求書検証時に注文を自動的に「請求済」に設定するオプションが有効になっていないため、請求書が生成された後、注文のステータスを手動で「請求済」に設定する必要がある。 IfValidateInvoiceIsNoOrderStayUnbilled=請求書検証が「いいえ」の場合、請求書が検証されるまで、注文はステータス「未請求」のままになる。 CloseReceivedSupplierOrdersAutomatically=すべての製品を受け取ったら、注文を自動的にステータス「%s」に閉じる。 SetShippingMode=配送モードを設定する @@ -179,8 +181,8 @@ StatusSupplierOrderReceivedAllShort=受け取った製品 StatusSupplierOrderCanceled=キャンセル StatusSupplierOrderDraft=下書き(検証する必要がある) StatusSupplierOrderValidated=検証 -StatusSupplierOrderOnProcess=注文済み-スタンバイ受信 -StatusSupplierOrderOnProcessWithValidation=注文済み-スタンバイ受信または検証 +StatusSupplierOrderOnProcess=注文済-スタンバイ受信 +StatusSupplierOrderOnProcessWithValidation=注文済-スタンバイ受信または検証 StatusSupplierOrderProcessed=処理 StatusSupplierOrderToBill=請求する StatusSupplierOrderApproved=承認された diff --git a/htdocs/langs/ja_JP/other.lang b/htdocs/langs/ja_JP/other.lang index b3fda9e5699..4656b0420d0 100644 --- a/htdocs/langs/ja_JP/other.lang +++ b/htdocs/langs/ja_JP/other.lang @@ -20,7 +20,7 @@ ZipFileGeneratedInto=<b> %s</b>に生成されたZipファイル。 DocFileGeneratedInto=<b> %s</b>に生成されたドキュメントファイル。 JumpToLogin=切断された。ログインページに移動... MessageForm=オンライン支払いフォームのメッセージ -MessageOK=確認済みの支払いの返品ページのメッセージ +MessageOK=確認済の支払いの返品ページのメッセージ MessageKO=キャンセルされた支払いの返品ページのメッセージ ContentOfDirectoryIsNotEmpty=このディレクトリの内容は空ではない。 DeleteAlsoContentRecursively=チェックすると、すべてのコンテンツが再帰的に削除される @@ -30,18 +30,18 @@ PreviousYearOfInvoice=請求日の前年 NextYearOfInvoice=請求日の翌年 DateNextInvoiceBeforeGen=次の請求書の日付(生成前) DateNextInvoiceAfterGen=次の請求書の日付(生成後) -GraphInBarsAreLimitedToNMeasures=Grapicsは、「バー」モードの%sメジャーに制限されています。代わりに、モード「ライン」が自動的に選択された。 -OnlyOneFieldForXAxisIsPossible=現在、X軸として使用できるフィールドは1つだけ 。最初に選択されたフィールドのみが選択されています。 +GraphInBarsAreLimitedToNMeasures=Grapicsは、「バー」モードの%sメジャーに制限されている。代わりに、モード「ライン」が自動的に選択された。 +OnlyOneFieldForXAxisIsPossible=現在、X軸として使用できるフィールドは1つだけ 。最初に選択されたフィールドのみが選択されている。 AtLeastOneMeasureIsRequired=測定には少なくとも1つのフィールドが必要 AtLeastOneXAxisIsRequired=X軸には少なくとも1つのフィールドが必要 LatestBlogPosts=最新のブログ投稿 -Notify_ORDER_VALIDATE=検証済みの販売注文 +Notify_ORDER_VALIDATE=検証済の販売注文 Notify_ORDER_SENTBYMAIL=メールで送信された販売注文 Notify_ORDER_SUPPLIER_SENTBYMAIL=電子メールで送信された注文書 Notify_ORDER_SUPPLIER_VALIDATE=記録された発注書 Notify_ORDER_SUPPLIER_APPROVE=注文書が承認された Notify_ORDER_SUPPLIER_REFUSE=注文書が拒否された -Notify_PROPAL_VALIDATE=検証済みの顧客の提案 +Notify_PROPAL_VALIDATE=検証済の顧客の提案 Notify_PROPAL_CLOSE_SIGNED=顧客提案は署名された Notify_PROPAL_CLOSE_REFUSED=顧客の提案は拒否された Notify_PROPAL_SENTBYMAIL=電子メールによって送信された商業提案 @@ -59,7 +59,7 @@ Notify_BILL_SUPPLIER_VALIDATE=ベンダーの請求書が検証された Notify_BILL_SUPPLIER_PAYED=支払われたベンダーの請求書 Notify_BILL_SUPPLIER_SENTBYMAIL=メールで送信されるベンダーの請求書 Notify_BILL_SUPPLIER_CANCELED=ベンダーの請求書がキャンセルされた -Notify_CONTRACT_VALIDATE=検証済みの契約 +Notify_CONTRACT_VALIDATE=検証済の契約 Notify_FICHINTER_VALIDATE=介入検証 Notify_FICHINTER_ADD_CONTACT=介入への連絡先を追加 Notify_FICHINTER_SENTBYMAIL=郵送による介入 @@ -90,7 +90,7 @@ PredefinedMailTest=__(こんにちは)__\nこれは__EMAIL__に送信される PredefinedMailTestHtml=__(Hello)__ <br>これは__EMAIL__に送信される<b>テスト</b>メール (テストという単語は太字にする必要がある)。 <br>行はキャリッジリターンで区切られる。 <br> <br> __USER_SIGNATURE__ PredefinedMailContentContract=__(こんにちは)__\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoice=__(こんにちは)__\n\n添付の請求書__REF__をご覧ください\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendInvoiceReminder=__(こんにちは)__\n\n請求書__REF__が支払われていないよう 。請求書のコピーがリマインダーとして添付されています。\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__(こんにちは)__\n\n請求書__REF__が支払われていないよう 。請求書のコピーがリマインダーとして添付されている。\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendProposal=__(こんにちは)__\n\n添付の売買契約提案書__REF__を見つけること\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendSupplierProposal=__(こんにちは)__\n\n添付の価格リクエストを見つけること__REF__\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendOrder=__(こんにちは)__\n\n添付の注文__REF__を見つけること\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ @@ -114,6 +114,7 @@ DemoCompanyAll=複数の活動を行う法人(すべてのメインモジュー CreatedBy=%sによって作成された ModifiedBy=%sによって変更された ValidatedBy=%sによって検証 +SignedBy=%sによる署名 ClosedBy=%sによって閉じ CreatedById=作成したユーザーID ModifiedById=最新の変更を行ったユーザーID @@ -200,7 +201,7 @@ NumberOfUnitsSupplierInvoices=ベンダーの請求書のユニット数 NumberOfUnitsContracts=契約ユニット数 NumberOfUnitsMos=製造指図で生産するユニットの数 EMailTextInterventionAddedContact=新規介入%sが割り当てられた。 -EMailTextInterventionValidated=介入%sが検証されています。 +EMailTextInterventionValidated=介入%sが検証されている。 EMailTextInvoiceValidated=請求書%sが検証された。 EMailTextInvoicePayed=請求書%sが支払われた。 EMailTextProposalValidated=提案%sが検証された。 @@ -224,7 +225,7 @@ NewLength=新規幅 NewHeight=新規高さ NewSizeAfterCropping=トリミング後の新規サイズ DefineNewAreaToPick=(あなたが反対側の角に達するまで、イメージ上で左クリックをドラッグ)選択するには、画像を新たな領域を定義する。 -CurrentInformationOnImage=このツールは、画像のサイズ変更やトリミングに役立つように設計されています。これは現在編集されている画像に関する情報 +CurrentInformationOnImage=このツールは、画像のサイズ変更やトリミングに役立つように設計されている。これは現在編集されている画像に関する情報 ImageEditor=イメージエディタ YouReceiveMailBecauseOfNotification=あなたのメールアドレスは%sの%sソフトウェアに特定のイベントを通知されるターゲットのリストに追加されているため、このメッセージが表示される。 YouReceiveMailBecauseOfNotification2=このイベントは次のとおり 。 @@ -244,6 +245,7 @@ NewKeyIs=これはログインするための新規キー NewKeyWillBe=ソフトウェアにログインするための新規キーは次のようになる ClickHereToGoTo=%sに移動するには、ここをクリックすること YouMustClickToChange=ただし、このパスワードの変更を検証するには、最初に次のリンクをクリックする必要がある +ConfirmPasswordChange=パスワードの変更を確認する ForgetIfNothing=この変更をリクエストしなかった場合は、このメールを忘れてください。あなたの資格情報は安全に保たれる。 IfAmountHigherThan=<strong> %s</strong>よりも多い場合 SourcesRepository=ソースのリポジトリ diff --git a/htdocs/langs/ja_JP/productbatch.lang b/htdocs/langs/ja_JP/productbatch.lang index 7c05340b95e..88985c01ebe 100644 --- a/htdocs/langs/ja_JP/productbatch.lang +++ b/htdocs/langs/ja_JP/productbatch.lang @@ -1,24 +1,35 @@ # ProductBATCH language file - en_US - ProductBATCH -ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) -ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=はい -ProductStatusNotOnBatchShort=なし -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 +ManageLotSerial=ロット/シリアル 番号を使用 +ProductStatusOnBatch=はい(ロットが必要) +ProductStatusOnSerial=はい(一意のシリアル番号が必要) +ProductStatusNotOnBatch=いえ (ロット/シリアル 不要) +ProductStatusOnBatchShort=ロット +ProductStatusOnSerialShort=シリアル +ProductStatusNotOnBatchShort=いえ +Batch=ロット/シリアル +atleast1batchfield=賞味期限、消費期限、ロット/シリアル 番号 +batch_number=ロット/シリアル 番号 +BatchNumberShort=ロット/シリアル +EatByDate=賞味期限 +SellByDate=消費期限 +DetailBatchNumber=ロット/シリアル 詳細 +printBatch=ロット/シリアル: %s +printEatby=賞味: %s +printSellby=消費: %s +printQty=数量: %d +AddDispatchBatchLine=保存期限割当の行を追加 +WhenProductBatchModuleOnOptionAreForced=モジュールロット/シリアルがオンの場合、自動在庫減少は強制的に「出荷検証時に実在庫を削減」し、自動増加モードは強制的に「倉庫への手動割当で実在庫を増やす」となり、編集は不可。他のオプションは必要に応じて定義可能。 +ProductDoesNotUseBatchSerial=この製品はロット/シリアル番号を不使用 +ProductLotSetup=モジュールのロット/シリアルの設定 +ShowCurrentStockOfLot=組合せ 製品/ロットの現在在庫を表示 +ShowLogOfMovementIfLot=組合せ 製品/ロットの移動ログを表示 +StockDetailPerBatch=ロットごとの在庫詳細 +SerialNumberAlreadyInUse=シリアル番号%sはすでに製品%sに使用されている +TooManyQtyForSerialNumber=シリアル番号%sに対して使用できる製品%sは1つだけ。 +BatchLotNumberingModules=ロット管理のバッチ製品の自動生成のオプション +BatchSerialNumberingModules=シリアル番号で管理されるバッチ製品の自動生成のオプション +CustomMasks=製品カードにマスクを定義するオプションを追加する +LotProductTooltip=製品カードにオプションを追加して、専用のバッチ番号マスクを定義する +SNProductTooltip=製品カードに専用のシリアル番号マスクを定義するオプションを追加する +QtyToAddAfterBarcodeScan=スキャンされたバーコード/ロット/シリアルごとに追加する数量 + diff --git a/htdocs/langs/ja_JP/products.lang b/htdocs/langs/ja_JP/products.lang index 6357a357c87..d09196cc603 100644 --- a/htdocs/langs/ja_JP/products.lang +++ b/htdocs/langs/ja_JP/products.lang @@ -86,13 +86,13 @@ ErrorProductAlreadyExists=参照%sした製品はすでに存在している。 ErrorProductBadRefOrLabel=参照またはラベルの間違った値。 ErrorProductClone=製品またはサービスの複製を作成しようとしたときに問題が発生した。 ErrorPriceCantBeLowerThanMinPrice=エラー、価格は最低価格より低くすることはできない。 -Suppliers=仕入先s +Suppliers=仕入先 SupplierRef=仕入先SKU ShowProduct=製品を表示 ShowService=サービスを表示 -ProductsAndServicesArea=製品とサービスエリア -ProductsArea=製品分野 -ServicesArea=サービスエリア +ProductsAndServicesArea=製品とサービス部門 +ProductsArea=製品部門 +ServicesArea=サービス部門 ListOfStockMovements=在庫変動のリスト BuyingPrice=買価 PriceForEachProduct=特定の価格の製品 @@ -119,7 +119,7 @@ IfZeroItIsNotUsedByVirtualProduct=0の場合、この製品はどのキットで KeywordFilter=キーワードフィルタ CategoryFilter=カテゴリフィルタ ProductToAddSearch=追加するには、製品検索 -NoMatchFound=マッチするものが見つからない +NoMatchFound=該当なし ListOfProductsServices=製品/サービスのリスト ProductAssociationList=このキットのコンポーネント(s)である製品/サービスのリスト ProductParentList=この製品をコンポーネントとして含むキットのリスト @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT率(この仕入先/製品の場合) DiscountQtyMin=この数量の割引。 NoPriceDefinedForThisSupplier=この仕入先/製品の価格/数量は定義されていない NoSupplierPriceDefinedForThisProduct=この製品の仕入先価格/数量は定義されていない +PredefinedItem=事前定義されたアイテム PredefinedProductsToSell=事前定義された製品 PredefinedServicesToSell=事前定義されたサービス PredefinedProductsAndServicesToSell=販売する事前定義された製品/サービス @@ -313,7 +314,7 @@ LastUpdated=最新のアップデート CorrectlyUpdated=正しく更新された PropalMergePdfProductActualFile=PDF Azur に追加するために使用するファイルは PropalMergePdfProductChooseFile=PDFファイルを選択 -IncludingProductWithTag=タグ付きの製品/サービスを含む +IncludingProductWithTag=タグ付きの製品/サービスを含める DefaultPriceRealPriceMayDependOnCustomer=デフォルト価格、実際の価格は顧客によって異なる場合がある WarningSelectOneDocument=少なくとも1つのドキュメントを選択すること DefaultUnitToShow=単位 @@ -380,7 +381,7 @@ DoNotRemovePreviousCombinations=以前のバリアントを削除しないこと UsePercentageVariations=パーセンテージバリエーションを使用 PercentageVariation=変動率 ErrorDeletingGeneratedProducts=既存の製品バリアントを削除しようとしたときにエラーが発生した -NbOfDifferentValues=異なる値の数 +NbOfDifferentValues=バリエーション登録数 NbProducts=製品数 ParentProduct=親製品 HideChildProducts=バリアント製品を非表示にする diff --git a/htdocs/langs/ja_JP/projects.lang b/htdocs/langs/ja_JP/projects.lang index 1f6b71c6b85..4921c3bdd8d 100644 --- a/htdocs/langs/ja_JP/projects.lang +++ b/htdocs/langs/ja_JP/projects.lang @@ -83,12 +83,13 @@ TheReportedProgressIsLessThanTheCalculatedProgressionByX=宣言された実際 TheReportedProgressIsMoreThanTheCalculatedProgressionByX=宣言された実際の進捗状況は、消費の進捗状況よりも%sです。 ProgressCalculated=消費の進捗状況 WhichIamLinkedTo=私がリンクしている -WhichIamLinkedToProject=私はプロジェクトにリンクしています +WhichIamLinkedToProject=私はプロジェクトにリンクしている Time=時間 TimeConsumed=消費 ListOfTasks=タスクのリスト GoToListOfTimeConsumed=消費時間のリストに移動 GanttView=ガントビュー +ListWarehouseAssociatedProject=プロジェクトに関連する倉庫のリスト ListProposalsAssociatedProject=プロジェクトに関連する商業提案のリスト ListOrdersAssociatedProject=プロジェクトに関連する販売注文のリスト ListInvoicesAssociatedProject=プロジェクトに関連する顧客の請求書のリスト @@ -268,3 +269,7 @@ OneLinePerTask=タスクごとに1行 OneLinePerPeriod=期間ごとに1行 RefTaskParent=参照符号親タスク ProfitIsCalculatedWith=利益は以下を使用して計算される +AddPersonToTask=タスクにも追加 +UsageOrganizeEvent=使用法:イベント組織 +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=すべてのタスクが完了したら、プロジェクトをクローズとして分類する(100%%の進行状況) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=注:100%%の進行状況にあるすべてのタスクを持つ既存のプロジェクトは影響を受けない。手動で閉じる必要があります。このオプションは、開いているプロジェクトにのみ影響する。 diff --git a/htdocs/langs/ja_JP/propal.lang b/htdocs/langs/ja_JP/propal.lang index 16cd30b6bfa..dc8eb2c7609 100644 --- a/htdocs/langs/ja_JP/propal.lang +++ b/htdocs/langs/ja_JP/propal.lang @@ -33,7 +33,7 @@ PropalStatusSigned=(要請求)署名 PropalStatusNotSigned=(クローズ)署名されていない PropalStatusBilled=請求 PropalStatusDraftShort=下書き -PropalStatusValidatedShort=検証済み(オープン) +PropalStatusValidatedShort=検証済(オープン) PropalStatusClosedShort=閉じた PropalStatusSignedShort=署名された PropalStatusNotSignedShort=署名されていない @@ -59,6 +59,7 @@ ConfirmClonePropal=売買契約提案書 <b>%s </b>のクローンを作成し ConfirmReOpenProp=売買契約提案書 <b>%s </b>を開いてよいか? ProposalsAndProposalsLines=売買契約提案書や行 ProposalLine=提案書ライン +ProposalLines=提案ライン AvailabilityPeriod=可用性の遅延 SetAvailability=可用性の遅延を設定 AfterOrder=ご注文後 diff --git a/htdocs/langs/ja_JP/stocks.lang b/htdocs/langs/ja_JP/stocks.lang index 85fd2d27614..869a0a87d34 100644 --- a/htdocs/langs/ja_JP/stocks.lang +++ b/htdocs/langs/ja_JP/stocks.lang @@ -37,8 +37,8 @@ AllWarehouses=すべての倉庫 IncludeEmptyDesiredStock=未定義の希望在庫で負の在庫も含める IncludeAlsoDraftOrders=ドラフト注文も含める Location=場所 -LocationSummary=短い名前の場所 -NumberOfDifferentProducts=異なる製品の数 +LocationSummary=場所の短い名前 +NumberOfDifferentProducts=ユニークな製品の数 NumberOfProducts=商品の合計数 LastMovement=最新の動き LastMovements=最新の動き @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=倉庫の値 UserWarehouseAutoCreate=ユーザーの作成時にユーザー倉庫を自動的に作成する AllowAddLimitStockByWarehouse=製品ごとの最小在庫と希望在庫の値に加えて、ペアリングごとの最小在庫と希望在庫の値(製品倉庫)も管理する。 RuleForWarehouse=倉庫のルール -WarehouseAskWarehouseDuringPropal=販売推進に倉庫を設定する +WarehouseAskWarehouseOnThirparty=取引先に倉庫を設定する +WarehouseAskWarehouseDuringPropal=商業提案に倉庫を設定する WarehouseAskWarehouseDuringOrder=販売注文に倉庫を設定する UserDefaultWarehouse=ユーザーに倉庫を設定する MainDefaultWarehouse=デフォルトの倉庫 @@ -97,15 +98,16 @@ RealStockDesc=現物/実在庫は、現在倉庫にある在庫 。 RealStockWillAutomaticallyWhen=実際の在庫は、このルールに従って変更される(在庫モジュールで定義されている)。 VirtualStock=仮想在庫 VirtualStockAtDate=日付での仮想在庫 -VirtualStockAtDateDesc=日付より前に行われる予定のすべての保留中の注文が終了すると、仮想在庫が発生する +VirtualStockAtDateDesc=仮想在庫、かつての保留中の注文で、 選択した日付より前に処理される予定のものが、完了となる VirtualStockDesc=仮想在庫は、すべてのオープン/保留アクション(在庫に影響を与える)が閉じられたときに使用可能な計算された在庫 (発注書の受領、販売注文の出荷、製造注文の作成など)。 +AtDate=日付で IdWarehouse=イド倉庫 DescWareHouse=説明倉庫 LieuWareHouse=ローカリゼーション倉庫 WarehousesAndProducts=倉庫と製品 WarehousesAndProductsBatchDetail=倉庫および製品(ロット/シリアルごとの詳細付き) AverageUnitPricePMPShort=加重平均価格 -AverageUnitPricePMPDesc=製品を在庫に入れるためにサプライヤーに支払わなければならなかった入力平均単価。 +AverageUnitPricePMPDesc=1ユニットの製品を在庫に入れるために費やさなければならなかった入力平均単価。 SellPriceMin=販売単価 EstimatedStockValueSellShort=販売価値 EstimatedStockValueSell=販売価値 @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=在庫レベルは、製品/サービスを請求書 StockMustBeEnoughForOrder=在庫レベルは、注文に製品/サービスを追加するのに十分でなければなりません(自動在庫変更のルールに関係なく、注文にラインを追加するときに現在の実際の在庫でチェックが行われる) StockMustBeEnoughForShipment= 在庫レベルは、製品/サービスを出荷に追加するのに十分でなければなりません(自動在庫変更のルールに関係なく、出荷にラインを追加するときに現在の実際の在庫でチェックが行われる) MovementLabel=動きのラベル -TypeMovement=動きの種類 +TypeMovement=移動方向 DateMovement=移動日 InventoryCode=移動または在庫コード IsInPackage=パッケージに含まれている @@ -183,6 +185,7 @@ inventoryCreatePermission=新規在庫を作成する inventoryReadPermission=在庫を見る inventoryWritePermission=在庫を更新する inventoryValidatePermission=在庫を検証する +inventoryDeletePermission=在庫目録を削除 inventoryTitle=在庫 inventoryListTitle=在庫 inventoryListEmpty=進行中の在庫はない @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=使用するロットを選択するには ForceTo=強制する AlwaysShowFullArbo=倉庫リンクのポップアップに倉庫の完全なツリーを表示する(警告:これによりパフォーマンスが大幅に低下する可能性がある) StockAtDatePastDesc=過去の特定の日付の在庫(実際の在庫)をここで表示できる -StockAtDateFutureDesc=将来の特定の日付の在庫(仮想在庫)をここで表示できる +StockAtDateFutureDesc=将来の特定の日付の在庫(仮想在庫)をここで表示できる CurrentStock=現在の在庫 InventoryRealQtyHelp=値を0に設定して、数量をリセットする。<br>フィールドを空のままにするか、行を削除して、変更しないこと。 -UpdateByScaning=スキャンして更新する +UpdateByScaning=スキャンして実際の数量を入力 UpdateByScaningProductBarcode=スキャンによる更新(製品バーコード) UpdateByScaningLot=スキャンによる更新(ロット|シリアルバーコード) DisableStockChangeOfSubProduct=この移動中は、このキットのすべての副産物の在庫変更を無効にする。 +ImportFromCSV=移動のCSVリストをインポート +ChooseFileToImport=ファイルをアップロードし、%sアイコンをクリックして、ソースインポートファイルとしてファイルを選択する。 +SelectAStockMovementFileToImport=インポートする在庫品移動ファイルを選択 +InfoTemplateImport=アップロードされたファイルは次の形式が必要 (*は必須フィールド):<br> 元倉庫* | 先倉庫* | 製品* | 数量* | ロット/シリアル番号<br>CSV文字区切は「<b>%s</b>」であること +LabelOfInventoryMovemement=在庫目録%s +ReOpen=再開 +ConfirmFinish=在庫の閉鎖を確認するか?これにより、在庫を更新するためのすべての在庫移動が生成される。 +ObjectNotFound=%sが見つからない +MakeMovementsAndClose=移動を生成して閉じる +AutofillWithExpected=実際の数量を予想数量で埋める diff --git a/htdocs/langs/ja_JP/suppliers.lang b/htdocs/langs/ja_JP/suppliers.lang index 09fd760b180..4a8a74fd271 100644 --- a/htdocs/langs/ja_JP/suppliers.lang +++ b/htdocs/langs/ja_JP/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=仕入先s SuppliersInvoice=仕入先請求書 +SupplierInvoices=仕入先請求書 ShowSupplierInvoice=仕入先の請求書を表示する NewSupplier=新規仕入先 History=歴史 @@ -15,7 +16,7 @@ SomeSubProductHaveNoPrices=一部のサブ製品には価格が定義されて AddSupplierPrice=購入価格を追加 ChangeSupplierPrice=購入価格の変更 SupplierPrices=仕入先価格 -ReferenceSupplierIsAlreadyAssociatedWithAProduct=この仕入先リファレンスは、すでに製品に関連付けられています:%s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=この仕入先リファレンスは、すでに製品に関連付けられている:%s NoRecordedSuppliers=仕入先は記録されていない SupplierPayment=仕入先の支払 SuppliersArea=仕入先エリア diff --git a/htdocs/langs/ja_JP/ticket.lang b/htdocs/langs/ja_JP/ticket.lang index 9b6e686cb03..1730e1d0e0e 100644 --- a/htdocs/langs/ja_JP/ticket.lang +++ b/htdocs/langs/ja_JP/ticket.lang @@ -59,7 +59,7 @@ Notify_TICKET_SENTBYMAIL=メールでチケットメッセージを送信する # Status Read=読む -Assigned=割り当て済み +Assigned=割り当て済 InProgress=進行中 NeedMoreInformation=情報を待っている Answered=答えた @@ -70,6 +70,8 @@ Deleted=削除 # Dict Type=タイプ Severity=重大度 +TicketGroupIsPublic=グループは公開されている +TicketGroupIsPublicDesc=チケットグループがパブリックの場合、パブリックインターフェイスからチケットを作成するときにフォームに表示される # Email templates MailToSendTicketMessage=チケットメッセージからメールを送信するには @@ -114,8 +116,8 @@ TicketsShowModuleLogo=パブリックインターフェイスにモジュール TicketsShowModuleLogoHelp=このオプションを有効にすると、パブリックインターフェイスのページでロゴモジュールが非表示になる TicketsShowCompanyLogo=パブリックインターフェイスに法人のロゴを表示する TicketsShowCompanyLogoHelp=このオプションを有効にすると、パブリックインターフェイスのページで主要法人のロゴが非表示になる。 -TicketsEmailAlsoSendToMainAddress=メインのメールアドレスにも通知を送信する -TicketsEmailAlsoSendToMainAddressHelp=このオプションを有効にすると、「通知メールの送信元」アドレスにメールが送信される(以下の設定を参照)。 +TicketsEmailAlsoSendToMainAddress=また、メインの電子メールアドレスに通知を送信する +TicketsEmailAlsoSendToMainAddressHelp=このオプションを有効にすると、セットアップ「%s」で定義されたアドレスにも電子メールが送信される(タブ「%s」を参照)。 TicketsLimitViewAssignedOnly=現在のユーザーに割り当てられたチケットに表示を制限する(外部ユーザーには無効で、常に依存しているサードパーティに制限される) TicketsLimitViewAssignedOnlyHelp=現在のユーザーに割り当てられているチケットのみが表示される。チケット管理権を持つユーザーには適用されない。 TicketsActivatePublicInterface=パブリックインターフェイスをアクティブ化する @@ -126,10 +128,10 @@ TicketNumberingModules=チケット番号付けモジュール TicketsModelModule=チケットのドキュメントテンプレート TicketNotifyTiersAtCreation=作成時にサードパーティに通知する TicketsDisableCustomerEmail=パブリックインターフェイスからチケットを作成するときは、常にメールを無効にすること -TicketsPublicNotificationNewMessage=新規メッセージが追加されたときにメール(s)を送信する +TicketsPublicNotificationNewMessage=新規メッセージ/コメントがチケットに追加されたときにメール(s)を送信する TicketsPublicNotificationNewMessageHelp=新規メッセージがパブリックインターフェイスから追加されたときに電子メール(s)を送信する(割り当てられたユーザーまたは通知電子メールを(更新)および/または通知電子メールに) TicketPublicNotificationNewMessageDefaultEmail=通知メール(更新) -TicketPublicNotificationNewMessageDefaultEmailHelp=チケットにユーザーが割り当てられていない場合、またはユーザーに電子メールがない場合は、このアドレスに新規メッセージ通知を電子メールで送信する。 +TicketPublicNotificationNewMessageDefaultEmailHelp=チケットにユーザが割り当てられていない場合、またはユーザに既知の電子メールがない場合は、新規メッセージ通知ごとにこのアドレスに電子メールを送信する。 # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=最新の変更されたチケット BoxLastModifiedTicketDescription=最新の%s変更チケット BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=最近変更されたチケットはない +BoxTicketType=タイプ別のオープンチケットの数 +BoxTicketSeverity=重大度別のオープンチケットの数 +BoxNoTicketSeverity=開いているチケットなし +BoxTicketLastXDays=過去%s日ごとの新規チケットの数 +BoxTicketLastXDayswidget = 過去X日間の日ごとの新規チケットの数 +BoxNoTicketLastXDays=過去%s日間に新規チケットなし +BoxNumberOfTicketByDay=日ごとの新規チケット数 +BoxNewTicketVSClose=今日の新規チケットと今日の終息チケットの数 +TicketCreatedToday=今日作成されたチケット +TicketClosedToday=本日終息したチケット diff --git a/htdocs/langs/ja_JP/users.lang b/htdocs/langs/ja_JP/users.lang index a4e6141c8a5..63ad09b98ed 100644 --- a/htdocs/langs/ja_JP/users.lang +++ b/htdocs/langs/ja_JP/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=ユーザとそのプロパティ DomainUser=ドメインユーザ%s Reactivate=再アクティブ化 CreateInternalUserDesc=このフォームを使用すると、法人/組織に内部ユーザを作成できる。外部ユーザ(顧客、仕入先など)を作成するには、その取引先の連絡先カードから Dolibarrユーザの作成 ボタンを使用する。 -InternalExternalDesc=<b>内部</b>ユーザは、法人/組織の一部であるユーザ。 <br> <b>外部</b>ユーザは、顧客、仕入先、またはその他(取引先の外部ユーザの作成は、取引先の連絡先レコードから実行できる)。 <br> <br>どちらの場合も、権限はDolibarrの権限を定義し、外部ユーザも内部ユーザとは異なるメニューマネージャーを持つことができる( ホーム - 設定 - 表示 を参照) +InternalExternalDesc=<b>内部</b>ユーザは、法人/組織の一部であるユーザ、または法人に関連するデータよりも多くのデータを表示する必要がある組織外のパートナーユーザ(許可システムは、彼が見るまたは実行することの可・不可を定義)。 <br> <b>外部</b>ユーザは、自分に関連するデータのみを表示する必要がある顧客、仕入先、またはその他のユーザ(取引先の外部ユーザの作成は、取引先の連絡先レコードから実行できる)。 <br> <br>どちらの場合も、ユーザが必要とする機能に対するアクセス許可を付与する必要がある。 PermissionInheritedFromAGroup=ユーザのグループのいずれかから継承されたので、許可が付与される。 Inherited=継承された UserWillBe=作成されたユーザは @@ -81,7 +81,7 @@ UserWillBeExternalUser=作成したユーザ(特に取引先にリンクされ IdPhoneCaller=イドの電話発信 NewUserCreated=ユーザの%s作成 NewUserPassword=%s用パスワードの変更 -NewPasswordValidated=新規パスワードは検証済みであり、ログインするには今すぐ使用する必要がある。 +NewPasswordValidated=新規パスワードは検証済であり、ログインするには今すぐ使用する必要がある。 EventUserModified=ユーザの%sは変更 UserDisabled=ユーザの%sが無効になって UserEnabled=ユーザ%sは、アクティブ diff --git a/htdocs/langs/ja_JP/website.lang b/htdocs/langs/ja_JP/website.lang index 8be0c5e5529..dc0e8a6e15f 100644 --- a/htdocs/langs/ja_JP/website.lang +++ b/htdocs/langs/ja_JP/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Apache/NGinx/...で使用 </u><br>専用の仮想ホスト ExampleToUseInApacheVirtualHostConfig=Apache仮想ホストのセットアップで使用する例: YouCanAlsoTestWithPHPS=<u>PHP組み込みサーバーでの使用</u><br>開発環境では、 PHP組み込みWebサーバ (PHP 5.5 が必要) でサイトをテストするのが都合がいいなら、次のコマンドを動かす<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP= <u>別のDolibarrホスティングプロバイダーでWebサイトを実行する</u><br>インターネット上でApacheやNGinxなどのWebサーバーを利用できない場合は、完全なDolibarrホスティングプロバイダーが提供する別のDolibarrインスタンスにWebサイトをエクスポートおよびインポートできる。ウェブサイトモジュールとの統合。いくつかのDolibarrホスティングプロバイダーのリストは、<a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org</a>にある。 -CheckVirtualHostPerms=また、仮想ホストが<br> <strong> %s</strong>へのファイルに対する権限<strong>%s</strong>を持っていることを確認すること。 +CheckVirtualHostPerms=また、仮想ホストユーザー(www-dataなど)が、 <strong> %s </strong> 権限があり、ファイルに対して<br><strong>%s</strong>へが可能であることをも確認する。 ReadPerm=読む WritePerm=書く TestDeployOnWeb=Webでのテスト/デプロイ PreviewSiteServedByWebServer=<u>新規タブで %s をプレビュー。</u><br><br> %s は、外部Webサーバ (Apache, Nginx, IIS など) から提供される。 以下のディレクトリを指定するには、当該サーバをインストールして設定する必要あり:<br><strong>%s</strong><br>URL は外部サーバ:<br><strong>%s</strong> による -PreviewSiteServedByDolibarr= <u>新規タブで%sをプレビューする。 </u> <br> <br> %sはDolibarrサーバーによって提供されるため、追加のWebサーバー(Apache、Nginx、IISなど)をインストールする必要はない。 <br>不便なのは、ページのURLがユーザーフレンドリーではなく、Dolibarrのパスで始まること。 URL <br> Dolibarrによって提供:<br> <strong> %s </strong> <br> <br>ディレクトリ<br> <strong> %s </strong> <br>上のポイントは、この仮想サーバーの名前を入力するWebサーバー上の仮想ホストを作成し、このウェブサイトを提供するために、独自の外部Webサーバーを使用するには他のプレビューボタンをクリックする。 +PreviewSiteServedByDolibarr= <u>新しいタブで%sをプレビューする。 </u> <br> <br> %sはDolibarrサーバーによって提供されるため、追加のWebサーバー(Apache、Nginx、IISなど)をインストールする必要はない。 <br>不便なのは、ページのURLがユーザーフレンドリーではなく、Dolibarrのパスで始まることです。 URL <br> Dolibarrによって提供:<br> <strong> %s </strong> <br> <br>ディレクトリ<br> <strong> %s </strong> <br>上のポイントは、この仮想サーバーの名前を入力するWebサーバー上の仮想ホストを作成し、このウェブサイトを提供するために、独自の外部Webサーバーを使用するにはこのWebサイトのプロパティで、[Webでのテスト/展開]リンクをクリックする。 VirtualHostUrlNotDefined=外部Webサーバーによって提供される仮想ホストのURLが定義されていない NoPageYet=まだページはない YouCanCreatePageOrImportTemplate=新規ページを作成するか、完全なWebサイトテンプレートをインポートできる @@ -88,7 +88,7 @@ SorryWebsiteIsCurrentlyOffLine=申し訳ないが、このウェブサイトは WEBSITE_USE_WEBSITE_ACCOUNTS=Webサイトのアカウントテーブルを有効にする WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=テーブルを有効にして、各Webサイト/サードパーティのWebサイトアカウント(ログイン/パス)を保存する YouMustDefineTheHomePage=最初にデフォルトのホームページを定義する必要がある -OnlyEditionOfSourceForGrabbedContentFuture=警告:外部WebページをインポートしてWebページを作成することは、経験豊富なユーザーのために予約されています。ソースページの複雑さによっては、インポートの結果が元のページと異なる場合がある。また、ソースページが一般的なCSSスタイルまたは競合するJavaScriptを使用している場合、このページで作業するときにWebサイトエディターの外観や機能が損なわれる可能性がある。この方法はページを作成するためのより迅速な方法ですが、最初から、または提案されたページテンプレートから新規ページを作成することをお勧めする。 <br>取得した外部ページで使用すると、インラインエディタが正しく機能しない場合があることにも注意すること。 +OnlyEditionOfSourceForGrabbedContentFuture=警告:外部WebページをインポートしてWebページを作成することは、経験豊富なユーザーのために予約されている。ソースページの複雑さによっては、インポートの結果が元のページと異なる場合がある。また、ソースページが一般的なCSSスタイルまたは競合するJavaScriptを使用している場合、このページで作業するときにWebサイトエディターの外観や機能が損なわれる可能性がある。この方法はページを作成するためのより迅速な方法ですが、最初から、または提案されたページテンプレートから新規ページを作成することをお勧めする。 <br>取得した外部ページで使用すると、インラインエディタが正しく機能しない場合があることにも注意すること。 OnlyEditionOfSourceForGrabbedContent=コンテンツが外部サイトから取得された場合は、HTMLソースのエディションのみが可能。 GrabImagesInto=cssとページにある画像も取得する。 ImagesShouldBeSavedInto=画像はディレクトリに保存する必要がある @@ -129,7 +129,7 @@ MainLanguage=主な言語 OtherLanguages=他の言語 UseManifest=マニフェスト.jsonファイルを提供する PublicAuthorAlias=公開著者エイリアス -AvailableLanguagesAreDefinedIntoWebsiteProperties=利用可能な言語はウェブサイトのプロパティに定義されています +AvailableLanguagesAreDefinedIntoWebsiteProperties=利用可能な言語はウェブサイトのプロパティに定義されている ReplacementDoneInXPages=%sページまたはコンテナで行われた交換 RSSFeed=RSSフィード RSSFeedDesc=このURLを使用して、タイプ「blogpost」の最新記事のRSSフィードを取得できる。 @@ -137,3 +137,11 @@ PagesRegenerated=%sページ(s)/コンテナ(s)が再生成された RegenerateWebsiteContent=Webサイトのキャッシュファイルを再生成する AllowedInFrames=フレームで許可 DefineListOfAltLanguagesInWebsiteProperties=使用可能なすべての言語のリストをWebサイトのプロパティに定義する。 +GenerateSitemaps=ウェブサイトサイトマップファイルを生成する +ConfirmGenerateSitemaps=確定すると、既存のサイトマップファイルが消去される... +ConfirmSitemapsCreation=サイトマップの生成を確認する +SitemapGenerated=生成されたサイトマップ +ImportFavicon=ファビコン +ErrorFaviconType=ファビコンはpngを必要とする +ErrorFaviconSize=ファビコンのサイズは32x32を必要とする +FaviconTooltip=32x32のpngを必要とする画像をアップロードする diff --git a/htdocs/langs/ja_JP/zapier.lang b/htdocs/langs/ja_JP/zapier.lang index bbad7895588..c0c8a9a383c 100644 --- a/htdocs/langs/ja_JP/zapier.lang +++ b/htdocs/langs/ja_JP/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' -ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr -ZapierDescription=Interface with Zapier +ModuleZapierForDolibarrName = Dolibarr対応 Zapier +ModuleZapierForDolibarrDesc = Dolibarrモジュール対応 Zapier +ZapierForDolibarrSetup=Dolibarr対応 Zapier を設定 +ZapierDescription=Zapier とのインタフェース +ZapierAbout=モジュールZapierについて +ZapierSetupPage=Zapierを使用するためにDolibarr側でセットアップする必要はない。ただし、DolibarrでZapierを使用できるようにするには、zapierでパッケージを生成して公開する必要がある。 <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">このwikiページ</a>のドキュメントを参照すること。 diff --git a/htdocs/langs/ka_GE/accountancy.lang b/htdocs/langs/ka_GE/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/ka_GE/accountancy.lang +++ b/htdocs/langs/ka_GE/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/ka_GE/admin.lang b/htdocs/langs/ka_GE/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/ka_GE/admin.lang +++ b/htdocs/langs/ka_GE/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ka_GE/banks.lang b/htdocs/langs/ka_GE/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/ka_GE/banks.lang +++ b/htdocs/langs/ka_GE/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ka_GE/bills.lang b/htdocs/langs/ka_GE/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/ka_GE/bills.lang +++ b/htdocs/langs/ka_GE/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/ka_GE/boxes.lang b/htdocs/langs/ka_GE/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/ka_GE/boxes.lang +++ b/htdocs/langs/ka_GE/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/ka_GE/categories.lang b/htdocs/langs/ka_GE/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/ka_GE/categories.lang +++ b/htdocs/langs/ka_GE/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ka_GE/companies.lang b/htdocs/langs/ka_GE/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/ka_GE/companies.lang +++ b/htdocs/langs/ka_GE/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/ka_GE/compta.lang b/htdocs/langs/ka_GE/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/ka_GE/compta.lang +++ b/htdocs/langs/ka_GE/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/ka_GE/ecm.lang b/htdocs/langs/ka_GE/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/ka_GE/ecm.lang +++ b/htdocs/langs/ka_GE/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ka_GE/errors.lang b/htdocs/langs/ka_GE/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/ka_GE/errors.lang +++ b/htdocs/langs/ka_GE/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ka_GE/externalsite.lang b/htdocs/langs/ka_GE/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/ka_GE/externalsite.lang +++ b/htdocs/langs/ka_GE/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ka_GE/main.lang b/htdocs/langs/ka_GE/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/ka_GE/main.lang +++ b/htdocs/langs/ka_GE/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ka_GE/margins.lang b/htdocs/langs/ka_GE/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/ka_GE/margins.lang +++ b/htdocs/langs/ka_GE/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/ka_GE/members.lang b/htdocs/langs/ka_GE/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/ka_GE/members.lang +++ b/htdocs/langs/ka_GE/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/ka_GE/modulebuilder.lang b/htdocs/langs/ka_GE/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/ka_GE/modulebuilder.lang +++ b/htdocs/langs/ka_GE/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/ka_GE/orders.lang b/htdocs/langs/ka_GE/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/ka_GE/orders.lang +++ b/htdocs/langs/ka_GE/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/ka_GE/other.lang b/htdocs/langs/ka_GE/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/ka_GE/other.lang +++ b/htdocs/langs/ka_GE/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/ka_GE/productbatch.lang b/htdocs/langs/ka_GE/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/ka_GE/productbatch.lang +++ b/htdocs/langs/ka_GE/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ka_GE/products.lang b/htdocs/langs/ka_GE/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/ka_GE/products.lang +++ b/htdocs/langs/ka_GE/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ka_GE/propal.lang b/htdocs/langs/ka_GE/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/ka_GE/propal.lang +++ b/htdocs/langs/ka_GE/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/ka_GE/stocks.lang b/htdocs/langs/ka_GE/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/ka_GE/stocks.lang +++ b/htdocs/langs/ka_GE/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ka_GE/suppliers.lang b/htdocs/langs/ka_GE/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/ka_GE/suppliers.lang +++ b/htdocs/langs/ka_GE/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/ka_GE/ticket.lang b/htdocs/langs/ka_GE/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/ka_GE/ticket.lang +++ b/htdocs/langs/ka_GE/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ka_GE/users.lang b/htdocs/langs/ka_GE/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/ka_GE/users.lang +++ b/htdocs/langs/ka_GE/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/ka_GE/website.lang b/htdocs/langs/ka_GE/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/ka_GE/website.lang +++ b/htdocs/langs/ka_GE/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ka_GE/zapier.lang b/htdocs/langs/ka_GE/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/ka_GE/zapier.lang +++ b/htdocs/langs/ka_GE/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/km_KH/accountancy.lang b/htdocs/langs/km_KH/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/km_KH/accountancy.lang +++ b/htdocs/langs/km_KH/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/km_KH/admin.lang b/htdocs/langs/km_KH/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/km_KH/admin.lang +++ b/htdocs/langs/km_KH/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/km_KH/banks.lang b/htdocs/langs/km_KH/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/km_KH/banks.lang +++ b/htdocs/langs/km_KH/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/km_KH/bills.lang b/htdocs/langs/km_KH/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/km_KH/bills.lang +++ b/htdocs/langs/km_KH/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/km_KH/boxes.lang b/htdocs/langs/km_KH/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/km_KH/boxes.lang +++ b/htdocs/langs/km_KH/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/km_KH/categories.lang b/htdocs/langs/km_KH/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/km_KH/categories.lang +++ b/htdocs/langs/km_KH/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/km_KH/companies.lang b/htdocs/langs/km_KH/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/km_KH/companies.lang +++ b/htdocs/langs/km_KH/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/km_KH/compta.lang b/htdocs/langs/km_KH/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/km_KH/compta.lang +++ b/htdocs/langs/km_KH/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/km_KH/ecm.lang b/htdocs/langs/km_KH/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/km_KH/ecm.lang +++ b/htdocs/langs/km_KH/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/km_KH/errors.lang b/htdocs/langs/km_KH/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/km_KH/errors.lang +++ b/htdocs/langs/km_KH/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/km_KH/externalsite.lang b/htdocs/langs/km_KH/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/km_KH/externalsite.lang +++ b/htdocs/langs/km_KH/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/km_KH/main.lang b/htdocs/langs/km_KH/main.lang index af9d6ca0889..3a8d17ec853 100644 --- a/htdocs/langs/km_KH/main.lang +++ b/htdocs/langs/km_KH/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/km_KH/margins.lang b/htdocs/langs/km_KH/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/km_KH/margins.lang +++ b/htdocs/langs/km_KH/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/km_KH/members.lang b/htdocs/langs/km_KH/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/km_KH/members.lang +++ b/htdocs/langs/km_KH/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/km_KH/modulebuilder.lang b/htdocs/langs/km_KH/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/km_KH/modulebuilder.lang +++ b/htdocs/langs/km_KH/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/km_KH/orders.lang b/htdocs/langs/km_KH/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/km_KH/orders.lang +++ b/htdocs/langs/km_KH/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/km_KH/other.lang b/htdocs/langs/km_KH/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/km_KH/other.lang +++ b/htdocs/langs/km_KH/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/km_KH/productbatch.lang b/htdocs/langs/km_KH/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/km_KH/productbatch.lang +++ b/htdocs/langs/km_KH/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/km_KH/products.lang b/htdocs/langs/km_KH/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/km_KH/products.lang +++ b/htdocs/langs/km_KH/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/km_KH/projects.lang b/htdocs/langs/km_KH/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/km_KH/projects.lang +++ b/htdocs/langs/km_KH/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/km_KH/propal.lang b/htdocs/langs/km_KH/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/km_KH/propal.lang +++ b/htdocs/langs/km_KH/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/km_KH/stocks.lang b/htdocs/langs/km_KH/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/km_KH/stocks.lang +++ b/htdocs/langs/km_KH/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/km_KH/suppliers.lang b/htdocs/langs/km_KH/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/km_KH/suppliers.lang +++ b/htdocs/langs/km_KH/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/km_KH/ticket.lang b/htdocs/langs/km_KH/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/km_KH/ticket.lang +++ b/htdocs/langs/km_KH/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/km_KH/users.lang b/htdocs/langs/km_KH/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/km_KH/users.lang +++ b/htdocs/langs/km_KH/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/km_KH/website.lang b/htdocs/langs/km_KH/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/km_KH/website.lang +++ b/htdocs/langs/km_KH/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/km_KH/zapier.lang b/htdocs/langs/km_KH/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/km_KH/zapier.lang +++ b/htdocs/langs/km_KH/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/kn_IN/accountancy.lang b/htdocs/langs/kn_IN/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/kn_IN/accountancy.lang +++ b/htdocs/langs/kn_IN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/kn_IN/admin.lang b/htdocs/langs/kn_IN/admin.lang index 5322b65bb8f..f0d117c5ea5 100644 --- a/htdocs/langs/kn_IN/admin.lang +++ b/htdocs/langs/kn_IN/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/kn_IN/banks.lang b/htdocs/langs/kn_IN/banks.lang index c3c0461c34d..10b886178a1 100644 --- a/htdocs/langs/kn_IN/banks.lang +++ b/htdocs/langs/kn_IN/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/kn_IN/bills.lang b/htdocs/langs/kn_IN/bills.lang index 0e7712812aa..a1be5f9460b 100644 --- a/htdocs/langs/kn_IN/bills.lang +++ b/htdocs/langs/kn_IN/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/kn_IN/boxes.lang b/htdocs/langs/kn_IN/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/kn_IN/boxes.lang +++ b/htdocs/langs/kn_IN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/kn_IN/categories.lang b/htdocs/langs/kn_IN/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/kn_IN/categories.lang +++ b/htdocs/langs/kn_IN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/kn_IN/companies.lang b/htdocs/langs/kn_IN/companies.lang index 63f3c11bf02..02ffb5f7a43 100644 --- a/htdocs/langs/kn_IN/companies.lang +++ b/htdocs/langs/kn_IN/companies.lang @@ -43,9 +43,10 @@ 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=ಪೋಷಕ ಸಂಸ್ಥೆ Subsidiaries=ಅಂಗಸಂಸ್ಥೆಗಳು -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=ದರದ ವರದಿ +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=ಸೌಜನ್ಯದ ಕೋಡ್ RegisteredOffice=ನೋಂದಾಯಿತ ಕಚೇರಿ Lastname=ಕೊನೆಯ ಹೆಸರು @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=ನೋಂದಣಿ ಸಂಖ್ಯೆ ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=ಪ್ರಸ್ತುತ ಬಾಕಿ ಉಳಿದಿರ OutstandingBill=ಗರಿಷ್ಟ ಬಾಕಿ ಉಳಿದಿರುವ ಬಿಲ್ ಮೊತ್ತ OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=ಕೋಡ್ ಉಚಿತ. ಈ ಕೋಡ್ ಯಾವುದೇ ಸಮಯದಲ್ಲಿ ಮಾರ್ಪಡಿಸಬಹುದಾಗಿದೆ. ManagingDirectors=ಮ್ಯಾನೇಜರ್ (ಗಳು) ಹೆಸರು (ಸಿಇಒ, ನಿರ್ದೇಶಕ, ಅಧ್ಯಕ್ಷ ...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/kn_IN/compta.lang b/htdocs/langs/kn_IN/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/kn_IN/compta.lang +++ b/htdocs/langs/kn_IN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/kn_IN/ecm.lang b/htdocs/langs/kn_IN/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/kn_IN/ecm.lang +++ b/htdocs/langs/kn_IN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/kn_IN/errors.lang b/htdocs/langs/kn_IN/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/kn_IN/errors.lang +++ b/htdocs/langs/kn_IN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/kn_IN/externalsite.lang b/htdocs/langs/kn_IN/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/kn_IN/externalsite.lang +++ b/htdocs/langs/kn_IN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/kn_IN/main.lang b/htdocs/langs/kn_IN/main.lang index 28a3acd9245..c486eab476a 100644 --- a/htdocs/langs/kn_IN/main.lang +++ b/htdocs/langs/kn_IN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/kn_IN/margins.lang b/htdocs/langs/kn_IN/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/kn_IN/margins.lang +++ b/htdocs/langs/kn_IN/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/kn_IN/members.lang b/htdocs/langs/kn_IN/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/kn_IN/members.lang +++ b/htdocs/langs/kn_IN/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/kn_IN/modulebuilder.lang b/htdocs/langs/kn_IN/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/kn_IN/modulebuilder.lang +++ b/htdocs/langs/kn_IN/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/kn_IN/orders.lang b/htdocs/langs/kn_IN/orders.lang index 744ee716964..8ae27a2c870 100644 --- a/htdocs/langs/kn_IN/orders.lang +++ b/htdocs/langs/kn_IN/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online 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/kn_IN/other.lang b/htdocs/langs/kn_IN/other.lang index 4ba716c6a71..65ae9f5a554 100644 --- a/htdocs/langs/kn_IN/other.lang +++ b/htdocs/langs/kn_IN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/kn_IN/productbatch.lang b/htdocs/langs/kn_IN/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/kn_IN/productbatch.lang +++ b/htdocs/langs/kn_IN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/kn_IN/products.lang b/htdocs/langs/kn_IN/products.lang index b4ed2eaee15..8981b3b6729 100644 --- a/htdocs/langs/kn_IN/products.lang +++ b/htdocs/langs/kn_IN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/kn_IN/propal.lang b/htdocs/langs/kn_IN/propal.lang index 8254c0e8f24..2a78427687e 100644 --- a/htdocs/langs/kn_IN/propal.lang +++ b/htdocs/langs/kn_IN/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/kn_IN/stocks.lang b/htdocs/langs/kn_IN/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/kn_IN/stocks.lang +++ b/htdocs/langs/kn_IN/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/kn_IN/suppliers.lang b/htdocs/langs/kn_IN/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/kn_IN/suppliers.lang +++ b/htdocs/langs/kn_IN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/kn_IN/ticket.lang b/htdocs/langs/kn_IN/ticket.lang index 70bcd0c2f87..852cabefb2b 100644 --- a/htdocs/langs/kn_IN/ticket.lang +++ b/htdocs/langs/kn_IN/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/kn_IN/users.lang b/htdocs/langs/kn_IN/users.lang index 9a79e68dbc5..56b77126d93 100644 --- a/htdocs/langs/kn_IN/users.lang +++ b/htdocs/langs/kn_IN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/kn_IN/website.lang b/htdocs/langs/kn_IN/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/kn_IN/website.lang +++ b/htdocs/langs/kn_IN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/kn_IN/zapier.lang b/htdocs/langs/kn_IN/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/kn_IN/zapier.lang +++ b/htdocs/langs/kn_IN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ko_KR/accountancy.lang b/htdocs/langs/ko_KR/accountancy.lang index b0285ae6cf3..55af80d01e8 100644 --- a/htdocs/langs/ko_KR/accountancy.lang +++ b/htdocs/langs/ko_KR/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=묶음 처리된 청구서 항목 ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=회계계좌로 연결 -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=묶음 처리 @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index 6962ec7c3b3..0a4eaa689a5 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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=Syslog 모듈(데이타 손실 위험 없음) <b>%s</b>에 의해 정읜된 돌리바 로그파일 -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=지금 제거하기 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ko_KR/banks.lang b/htdocs/langs/ko_KR/banks.lang index b62d0312322..e50fd22f1f0 100644 --- a/htdocs/langs/ko_KR/banks.lang +++ b/htdocs/langs/ko_KR/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ko_KR/bills.lang b/htdocs/langs/ko_KR/bills.lang index d08cd322216..9c4c8589dfe 100644 --- a/htdocs/langs/ko_KR/bills.lang +++ b/htdocs/langs/ko_KR/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice CustomersInvoices=고객 송장 SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/ko_KR/boxes.lang b/htdocs/langs/ko_KR/boxes.lang index 9c95a128986..d26b6fe49f9 100644 --- a/htdocs/langs/ko_KR/boxes.lang +++ b/htdocs/langs/ko_KR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=최근 작업 BoxLastContracts=최근 계약 BoxLastContacts=최근 연락처 / 주소 BoxLastMembers=최근 회원 +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=최근 개입 BoxCurrentAccounts=미결제 잔액 BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=최신 %s 뉴스 %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/ko_KR/categories.lang b/htdocs/langs/ko_KR/categories.lang index e10c2c97c83..7c956eef157 100644 --- a/htdocs/langs/ko_KR/categories.lang +++ b/htdocs/langs/ko_KR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ko_KR/companies.lang b/htdocs/langs/ko_KR/companies.lang index ae5af71d69f..4ad4fe599ff 100644 --- a/htdocs/langs/ko_KR/companies.lang +++ b/htdocs/langs/ko_KR/companies.lang @@ -43,9 +43,10 @@ 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=모회사 Subsidiaries=자회사 -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=비율별 보고서 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=성격 코드 RegisteredOffice=등록 된 사무실 Lastname=성씨 @@ -172,14 +173,20 @@ ProfId1ES=프로필 Id 1 (CIF / NIF) ProfId2ES=프로필 ID2 (사회보장번호) ProfId3ES=프로필 Id 3 (CNAE) ProfId4ES=프로필 Id 4 (대학생 번호) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=프로필 ID 1 (SIREN) ProfId2FR=프로필 Id 2 (SIRET) ProfId3FR=프로필 Id 3 (NAF, 구 APE) ProfId4FR=프로필 Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=등록 번호 ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=프로필 Id 1 (룩셈부르크) ProfId2LU=프로필 Id 2 (사업 허가) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=프로필 Id 1 (NIPC) ProfId2PT=프로필 Id 2 (사회 보장 번호) ProfId3PT=프로필 Id 3 (상업 기록 번호) ProfId4PT=프로필 Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=프로필 Id 1 (OGRN) ProfId2RU=프로필 Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=현재 미결제 금액 OutstandingBill=미결 한도 OutstandingBillReached=미결 한도 금액 도달 OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=코드는 무료입니다. 이 코드는 언제든지 수정할 수 있습니다. ManagingDirectors=관리자 이름 (CEO, 이사, 사장 ...) MergeOriginThirdparty=중복 된 협력업체 (삭제하려는 협력업체) diff --git a/htdocs/langs/ko_KR/compta.lang b/htdocs/langs/ko_KR/compta.lang index 199ba3514ef..320af6ec40b 100644 --- a/htdocs/langs/ko_KR/compta.lang +++ b/htdocs/langs/ko_KR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=주문 링크 Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/ko_KR/ecm.lang b/htdocs/langs/ko_KR/ecm.lang index b2d850ab449..2773e8f3a74 100644 --- a/htdocs/langs/ko_KR/ecm.lang +++ b/htdocs/langs/ko_KR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ko_KR/errors.lang b/htdocs/langs/ko_KR/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/ko_KR/errors.lang +++ b/htdocs/langs/ko_KR/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ko_KR/externalsite.lang b/htdocs/langs/ko_KR/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/ko_KR/externalsite.lang +++ b/htdocs/langs/ko_KR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ko_KR/main.lang b/htdocs/langs/ko_KR/main.lang index 82a305bbc21..82fe0c19c0b 100644 --- a/htdocs/langs/ko_KR/main.lang +++ b/htdocs/langs/ko_KR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=수정날짜 IPModification=Modification IP DateLastModification=최종 수정일 DateValidation=검사날짜 +DateSigning=Signing date DateClosing=마감날짜 DateDue=만기일자 DateValue=계약날짜 @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=단가 PriceU=U.P. PriceUHT=U.P. (정액) -PriceUHTCurrency=U.P (통화) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (세금 포함) Amount=금액 AmountInvoice=송장 금액 @@ -389,6 +390,8 @@ AmountTotal=합계금액 AmountAverage=평균금액 PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=백분율 Total=합계 SubTotal=소계 @@ -724,7 +727,7 @@ MenuMembers=회원 MenuAgendaGoogle=구글 의제 MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr한계 (메뉴 홈-설정-보안): %s Kb, PHP 한계: %s Kb -NoFileFound=이 디렉토리에 저장된 문서가 없습니다. +NoFileFound=No documents uploaded CurrentUserLanguage=현재 언어 CurrentTheme=현재 테마 CurrentMenuManager=현재 메뉴 관리자 @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString='%s'문자열을 제거하십시오. SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=다운로드 DownloadDocument=Download document ActualizeCurrency=환율 업데이트 @@ -1013,6 +1018,7 @@ SearchIntoContacts=연락처 SearchIntoMembers=구성원 SearchIntoUsers=사용자 SearchIntoProductsOrServices=제품 또는 서비스 +SearchIntoBatch=Lots / Serials SearchIntoProjects=프로젝트 SearchIntoMO=Manufacturing Orders SearchIntoTasks=할 일 @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ko_KR/margins.lang b/htdocs/langs/ko_KR/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/ko_KR/margins.lang +++ b/htdocs/langs/ko_KR/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/ko_KR/members.lang b/htdocs/langs/ko_KR/members.lang index 8aad13d15da..a3729c68600 100644 --- a/htdocs/langs/ko_KR/members.lang +++ b/htdocs/langs/ko_KR/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=확인 함 @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/ko_KR/modulebuilder.lang b/htdocs/langs/ko_KR/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/ko_KR/modulebuilder.lang +++ b/htdocs/langs/ko_KR/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/ko_KR/orders.lang b/htdocs/langs/ko_KR/orders.lang index 9cf03886f08..15ea1253bc4 100644 --- a/htdocs/langs/ko_KR/orders.lang +++ b/htdocs/langs/ko_KR/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=이메일 OrderByWWW=Online 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/ko_KR/other.lang b/htdocs/langs/ko_KR/other.lang index 0b663c08491..bd2b6719256 100644 --- a/htdocs/langs/ko_KR/other.lang +++ b/htdocs/langs/ko_KR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/ko_KR/productbatch.lang b/htdocs/langs/ko_KR/productbatch.lang index 7f2279f01bf..27e4cbad761 100644 --- a/htdocs/langs/ko_KR/productbatch.lang +++ b/htdocs/langs/ko_KR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=생산일련번호 사용 -ProductStatusOnBatch=예(생산일련번호필요) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=아니오(생산일련번호사용안함) -ProductStatusOnBatchShort=예 +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=아니 Batch=생산일련번호 atleast1batchfield=소비기한 날짜 또는 판매기한 날짜 또는 일련번호 @@ -22,3 +24,12 @@ ProductLotSetup=일련번호 모듈 설정 ShowCurrentStockOfLot=묶음제품 또는 일련번호별제품 현 재고보기 ShowLogOfMovementIfLot=묶음제품 또는 일련번호별제품 이동기록 보기 StockDetailPerBatch=일련번호별 재고내역 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ko_KR/products.lang b/htdocs/langs/ko_KR/products.lang index 390f2b13e95..556f1558ac9 100644 --- a/htdocs/langs/ko_KR/products.lang +++ b/htdocs/langs/ko_KR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index d4b5dc5134b..15df7bd0c3a 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ko_KR/propal.lang b/htdocs/langs/ko_KR/propal.lang index 26a86464f91..2008257bfca 100644 --- a/htdocs/langs/ko_KR/propal.lang +++ b/htdocs/langs/ko_KR/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -89,3 +89,4 @@ 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/stocks.lang b/htdocs/langs/ko_KR/stocks.lang index 3e6cd88b1b2..3cbf0afc509 100644 --- a/htdocs/langs/ko_KR/stocks.lang +++ b/htdocs/langs/ko_KR/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=위치 -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ko_KR/suppliers.lang b/htdocs/langs/ko_KR/suppliers.lang index 7b04cc321ad..40fa1361caf 100644 --- a/htdocs/langs/ko_KR/suppliers.lang +++ b/htdocs/langs/ko_KR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=기록보기 diff --git a/htdocs/langs/ko_KR/ticket.lang b/htdocs/langs/ko_KR/ticket.lang index dbcd6edb987..211a1bd4526 100644 --- a/htdocs/langs/ko_KR/ticket.lang +++ b/htdocs/langs/ko_KR/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=유형 Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ko_KR/users.lang b/htdocs/langs/ko_KR/users.lang index ed097818f62..8b54361b072 100644 --- a/htdocs/langs/ko_KR/users.lang +++ b/htdocs/langs/ko_KR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/ko_KR/website.lang b/htdocs/langs/ko_KR/website.lang index 1136b43873a..59cc6587e4c 100644 --- a/htdocs/langs/ko_KR/website.lang +++ b/htdocs/langs/ko_KR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ko_KR/zapier.lang b/htdocs/langs/ko_KR/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/ko_KR/zapier.lang +++ b/htdocs/langs/ko_KR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/lo_LA/accountancy.lang b/htdocs/langs/lo_LA/accountancy.lang index cfd6f41fbc9..9298e3177e4 100644 --- a/htdocs/langs/lo_LA/accountancy.lang +++ b/htdocs/langs/lo_LA/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index fe18cd7ac67..83482cae80f 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/lo_LA/banks.lang b/htdocs/langs/lo_LA/banks.lang index 4259ed5cc2d..65fcec00a0c 100644 --- a/htdocs/langs/lo_LA/banks.lang +++ b/htdocs/langs/lo_LA/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/lo_LA/bills.lang b/htdocs/langs/lo_LA/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/lo_LA/bills.lang +++ b/htdocs/langs/lo_LA/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/lo_LA/boxes.lang b/htdocs/langs/lo_LA/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/lo_LA/boxes.lang +++ b/htdocs/langs/lo_LA/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/lo_LA/categories.lang b/htdocs/langs/lo_LA/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/lo_LA/categories.lang +++ b/htdocs/langs/lo_LA/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/lo_LA/companies.lang b/htdocs/langs/lo_LA/companies.lang index a4225bc1cfb..99a4a7485f1 100644 --- a/htdocs/langs/lo_LA/companies.lang +++ b/htdocs/langs/lo_LA/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/lo_LA/compta.lang b/htdocs/langs/lo_LA/compta.lang index a84839cd09a..efb8593aa8f 100644 --- a/htdocs/langs/lo_LA/compta.lang +++ b/htdocs/langs/lo_LA/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/lo_LA/ecm.lang b/htdocs/langs/lo_LA/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/lo_LA/ecm.lang +++ b/htdocs/langs/lo_LA/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/lo_LA/errors.lang b/htdocs/langs/lo_LA/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/lo_LA/errors.lang +++ b/htdocs/langs/lo_LA/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/lo_LA/externalsite.lang b/htdocs/langs/lo_LA/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/lo_LA/externalsite.lang +++ b/htdocs/langs/lo_LA/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/lo_LA/main.lang b/htdocs/langs/lo_LA/main.lang index de3709bef9f..454f69f07e5 100644 --- a/htdocs/langs/lo_LA/main.lang +++ b/htdocs/langs/lo_LA/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/lo_LA/margins.lang b/htdocs/langs/lo_LA/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/lo_LA/margins.lang +++ b/htdocs/langs/lo_LA/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/lo_LA/members.lang b/htdocs/langs/lo_LA/members.lang index 9bcf361cd42..6786011e692 100644 --- a/htdocs/langs/lo_LA/members.lang +++ b/htdocs/langs/lo_LA/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/lo_LA/modulebuilder.lang b/htdocs/langs/lo_LA/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/lo_LA/modulebuilder.lang +++ b/htdocs/langs/lo_LA/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/lo_LA/orders.lang b/htdocs/langs/lo_LA/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/lo_LA/orders.lang +++ b/htdocs/langs/lo_LA/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/lo_LA/other.lang b/htdocs/langs/lo_LA/other.lang index 9bc54506b86..9b6ee4c9d19 100644 --- a/htdocs/langs/lo_LA/other.lang +++ b/htdocs/langs/lo_LA/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/lo_LA/productbatch.lang b/htdocs/langs/lo_LA/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/lo_LA/productbatch.lang +++ b/htdocs/langs/lo_LA/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/lo_LA/products.lang b/htdocs/langs/lo_LA/products.lang index 0398a6604ac..610f1575d84 100644 --- a/htdocs/langs/lo_LA/products.lang +++ b/htdocs/langs/lo_LA/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index 3dfd70c6444..1926aed46c7 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/lo_LA/propal.lang b/htdocs/langs/lo_LA/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/lo_LA/propal.lang +++ b/htdocs/langs/lo_LA/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/lo_LA/stocks.lang b/htdocs/langs/lo_LA/stocks.lang index 6397b23e96b..85e2246d09a 100644 --- a/htdocs/langs/lo_LA/stocks.lang +++ b/htdocs/langs/lo_LA/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/lo_LA/suppliers.lang b/htdocs/langs/lo_LA/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/lo_LA/suppliers.lang +++ b/htdocs/langs/lo_LA/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/lo_LA/ticket.lang b/htdocs/langs/lo_LA/ticket.lang index b2bea2dcbcd..f8eede2eb93 100644 --- a/htdocs/langs/lo_LA/ticket.lang +++ b/htdocs/langs/lo_LA/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/lo_LA/users.lang b/htdocs/langs/lo_LA/users.lang index cb9c22e9c30..519378d65cf 100644 --- a/htdocs/langs/lo_LA/users.lang +++ b/htdocs/langs/lo_LA/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=ລຶບຈາກກຸ່ມ PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/lo_LA/website.lang b/htdocs/langs/lo_LA/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/lo_LA/website.lang +++ b/htdocs/langs/lo_LA/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/lo_LA/zapier.lang b/htdocs/langs/lo_LA/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/lo_LA/zapier.lang +++ b/htdocs/langs/lo_LA/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/lt_LT/accountancy.lang b/htdocs/langs/lt_LT/accountancy.lang index 30578cf5a3c..c36e8e20b73 100644 --- a/htdocs/langs/lt_LT/accountancy.lang +++ b/htdocs/langs/lt_LT/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Priskirtos sąskaitų faktūrų eilutės ExpenseReportLines=Išlaidų ataskaitų eilutės, kurias reikia priskirti ExpenseReportLinesDone=Priskirtos išlaidų ataskaitų eilutės IntoAccount=Priskirta eilutė su apskaitos sąskaita -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Priskirti @@ -209,7 +209,7 @@ Codejournal=Žurnalas JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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=Išlaidų ataskaitos žurnalas InventoryJournal=Inventoriaus žurnalas + +NAccounts=%s accounts diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index 72b82a109b5..42dfa614740 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Pašalinti prisijungimų užraktą YourSession=Jūsų sesija Sessions=Users Sessions WebUserGroup=Tinklo serverio naudotojas/grupė +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Pastaba: Patvirtinimas yra efektyvus tik, kai modulis <b>%s</b> RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Apsaugos paruošimas +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Klaida, šis modulis reikalauja PHP versijos %s ar aukštesnės ErrorModuleRequireDolibarrVersion=Klaida, šiam moduliui reikalinga Dolibarr versija %s arba aukštesnė @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Išvalyti PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Išvalyti dabar @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Aktyvavimą įjungti ActiveOn=Aktyvavimas įjungtas +ActivatableOn=Activatable on SourceFile=Pirminis išeities failas AvailableOnlyIfJavascriptAndAjaxNotDisabled=Galimas tik tuomet, kai JavaScript neišjungtas Required=Reikalingas @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Atnaujinti serverį offline WithCounter=Manage a counter -GenericMaskCodes=Galite įvesti bet kokį užmaskuotą numeravimą. Šiame maskavime naudojamos sekančios žymės:<br><b>{000000}</b> atitinka skaičių, kuris bus padidinamas vienetu kiekvienam%s. Įveskite nulių iki pageidaujamo skaitiklio ilgio. Skaitiklis bus užpildomas nuliais iš kairės iki pilno skaitiklio ilgio. <br><b>{000000+000}</b> toks kaip paskutinis, bet nuokrypis atitinkantis numerį dešinėje už + ženklo taikomas pradedant pirmu %s. <br><b>{000000@x}</b> toks pat kaip ankstesnis, bet skaitiklis apnulinamas, kai pasiekiamas mėnuo x (x tarp 1 ir 12, arba naudojamas 0 pirmaisiais fiskalinių metų mėnesiais kaip aprašyta konfigūracijoje, arba 99 apnulinimui kiekvieną mėnesį). Jei ši opcija yra naudojama ir x yra 2 ar didesnis, tada seka {yy}{mm} arba {yyyy}{mm} taip pat reikalinga. <br><b>{dd}</b> diena (nuo 01 iki 31). <br><b>{mm}</b> mėnuo (nuo 01 iki 12). <br><b>{yy}<b/>, <b>{yyyy}</b> arba <b>{y}</b> metai, 2, 4 arba 1 skaitmenys. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Visi kiti simboliai maskuotėje išliks nepakitę.<br>Tarpai neleidžiami.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Trečios šalies pavyzdys sukurtas 2007-03-01:</u><br> GenericMaskCodes4c=<u>Produkto pavyzdys sukurtas 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redaktoriai Module49Desc=Redaktoriaus valdymas Module50Name=Produktai @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP MaxMind konvertavimo galimybes Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Žmogiškųjų išteklių valdymas (HRM) Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi įmonė Module5000Desc=Jums leidžiama valdyti kelias įmones -Module6000Name=Darbo eiga -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Sukurti/keisti vidaus/išorės vartotojus ir leidimus Permission254=Sukurti/keisti tik išorės vartotojus Permission255=Keisti kitų vartotojų slaptažodžius Permission256=Ištrinti ar išjungti kitus vartotojus -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Skaityti CA Permission272=Skaityti sąskaitas faktūras Permission273=Išrašyti sąskaitas faktūras @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Saugumo audito įvykiai +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Auditas InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Jūs turite paleisti šią komandą iš komandinės eilutės po vartotojo <b>%s</b> prisijungimo prie apvalkalo arba turite pridėti -W opciją komandinės eilutės pabaigoje slaptažodžio <b>%s</b> pateikimui. YourPHPDoesNotHaveSSLSupport=SSL funkcijos negalimos Jūsų PHP DownloadMoreSkins=Parsisiųsti daugiau grafinių vaizdų (skins) -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Dalinis vertimas @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Papildomi požymiai ExtraFieldsLines=Papildomi atributai (linijos) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Prisijungti (Unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Paieškos filtras LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Prisijungti (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Pilnas pavadinimas/vardas @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Pardavimo sąskaita. Kodas AccountancyCodeBuy=Pirkimo sąskaita. Kodas +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Įvykių ir operacijų modulio nustatymas PasswordTogetVCalExport=Eksporto sąsajos leidimo mygtukas +SecurityKey = Security Key PastDelayVCalExport=Neeksportuoti įvykių senesnių nei AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/lt_LT/banks.lang b/htdocs/langs/lt_LT/banks.lang index 2b529a086e7..2e254c32eba 100644 --- a/htdocs/langs/lt_LT/banks.lang +++ b/htdocs/langs/lt_LT/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/lt_LT/bills.lang b/htdocs/langs/lt_LT/bills.lang index 62fb5167f97..598541d0fa3 100644 --- a/htdocs/langs/lt_LT/bills.lang +++ b/htdocs/langs/lt_LT/bills.lang @@ -52,11 +52,12 @@ Invoices=Sąskaitos-faktūros InvoiceLine=Sąskaitos-faktūros linija InvoiceCustomer=Kliento sąskaita-faktūra CustomerInvoice=Kliento sąskaita-faktūra -CustomersInvoices=Klientų sąskaitos-faktūros +CustomersInvoices=Klientų sąskaitos faktūros SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=tiekėjų sąskaitos-faktūros +SupplierBills=Vendor invoices Payment=Mokėjimas PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Jau atlikti mokėjimai PaymentsBackAlreadyDone=Refunds already done PaymentRule=Mokėjimo taisyklė PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debetinė / Kreditinė kortelė PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Vėliausio generavimo data DateLastGenerationShort=Data vėliausio gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Automatiškai patvirtinti sąskaitas faktūras @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Kintamas dydis (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Banko pervedimas PaymentTypeShortVIR=Banko pervedimas @@ -494,12 +498,16 @@ Cash=Grynieji pinigai Reported=Uždelstas DisabledBecausePayments=Neįmanoma nuo tada, kai atsirado kai kurie mokėjimai CantRemovePaymentWithOneInvoicePaid=Negalima pašalinti mokėjimo, nuo tada kai čia yra bent viena sąskaita-faktūra priskirta apmokėtoms +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Laukiamas mokėjimas CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Sumokėta šiuo mokėjimu 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Mokėti ToMakePaymentBack=Grąžinti @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Grąžinimo numeris formatu %syymm-nnnn standartinėms sąskaitoms-faktūroms ir %syymm-nnnn kreditinėms sąskaitoms, kur yy yra metai, mm mėnuo ir nnnn yra seka be pertrūkių ir be grįžimo į 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Sąskaita, prasidedanti $syymm, jau egzistuoja ir yra nesuderinama su šiuo sekos modeliu. Pašalinkite ją arba pakeiskite jį, kad aktyvuoti šį modulį. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/lt_LT/boxes.lang b/htdocs/langs/lt_LT/boxes.lang index 897ee6b984c..32ff1f94d93 100644 --- a/htdocs/langs/lt_LT/boxes.lang +++ b/htdocs/langs/lt_LT/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Atidarytų sąskaitų balansas BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Apskaita +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/lt_LT/categories.lang b/htdocs/langs/lt_LT/categories.lang index 345dd6c3781..0b13dfb377a 100644 --- a/htdocs/langs/lt_LT/categories.lang +++ b/htdocs/langs/lt_LT/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/lt_LT/companies.lang b/htdocs/langs/lt_LT/companies.lang index 5094a5a14dc..b562188197b 100644 --- a/htdocs/langs/lt_LT/companies.lang +++ b/htdocs/langs/lt_LT/companies.lang @@ -43,9 +43,10 @@ Individual=Privatus asmuo 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=Motininė įmonė Subsidiaries=Dukterinės įmonės -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Ataskaita pagal tarifą +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Mandagumo kodeksas RegisteredOffice=Buveinės registracijos adresas Lastname=Pavardė @@ -172,14 +173,20 @@ ProfId1ES=Prof ID 1 (CIF/NIF) ProfId2ES=Prof ID 2 (Socialinio draudimo numeris) ProfId3ES=Prof ID 3 (CNAE) ProfId4ES=Prof ID 4 (Collegiate skaičius) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof ID 1 (SIRENOS) ProfId2FR=Prof ID 2 (SIRET) ProfId3FR=Prof ID 3 (NBS, senas APE) ProfId4FR=Prof ID 4 (RBS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registracijos numeris ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=ID Prof. 1 (R.C.S. Luxembourg) ProfId2LU=ID Prof. 2 (Verslo leidimas) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof ID 1 (NIPC) ProfId2PT=Prof ID 2 (Socialinio draudimo numeris) ProfId3PT=Prof ID 3 (Komercinio Registro numeris) ProfId4PT=Prof ID 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof ID 1 (OGRN) ProfId2RU=Prof ID 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Dabartinė neapmokėta sąskaita-faktūra OutstandingBill=Neapmokėtų sąskaitų-faktūrų maksimumas OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kodas yra nemokamas. Šis kodas gali būti modifikuotas bet kada. ManagingDirectors=Vadovo (-ų) pareigos (Vykdantysis direktorius (CEO), direktorius, prezidentas ...) MergeOriginThirdparty=Dubliuoti trečiąją šalį (trečiąją šalį, kurią norite ištrinti) diff --git a/htdocs/langs/lt_LT/compta.lang b/htdocs/langs/lt_LT/compta.lang index a0c6fe59908..04c4a15acc0 100644 --- a/htdocs/langs/lt_LT/compta.lang +++ b/htdocs/langs/lt_LT/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Gautas PVM StatusToPay=Mokėti SpecialExpensesArea=Visų specialių atsiskaitymų sritis +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Kliento sąskaitos-faktūros mokėjimas PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Socialinio / fiskalinio mokesčio mokėjimas PaymentVat=PVM mokėjimas +AutomaticCreationPayment=Automatically record the payment ListPayment=Mokėjimų sąrašas ListOfCustomerPayments=Kliento mokėjimų sąrašas ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF mokėjimas LT2PaymentsES=IRPF mokėjimai VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Čekio gavimo data 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Režimas <b>%sPVM nuo įsipareigojimų apskaitos%s</b>. CalcModeVATEngagement=Režimas <b>%sPVM nuo pajamų-išlaidų%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Ataskaita pagal Kliento gautą ir sumokėtą PVM VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg potipis InvoiceLinesToDispatch=Sąskaitos-faktūros eilutės išsiuntimui ByProductsAndServices=By product and service RefExt=Išorinė nuoroda -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Metodas 1 Mode2=Metodas 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/lt_LT/ecm.lang b/htdocs/langs/lt_LT/ecm.lang index 9a3de9c22f6..6fe852b4340 100644 --- a/htdocs/langs/lt_LT/ecm.lang +++ b/htdocs/langs/lt_LT/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/lt_LT/errors.lang b/htdocs/langs/lt_LT/errors.lang index ee2fb18e9e6..81019d9a6b0 100644 --- a/htdocs/langs/lt_LT/errors.lang +++ b/htdocs/langs/lt_LT/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Aplankas <b>%s</b> nerastas (blogas kelias, neteisingos teisės ErrorFunctionNotAvailableInPHP=Funkcija <b>%s</b> yra reikalinga šiai savybei, bet nėra galima šioje PHP versijoje/nustatymuose. ErrorDirAlreadyExists=Aplankas su tokiu pavadinimu jau egzistuoja. ErrorFileAlreadyExists=Failas tokiu pavadinimu jau egzistuoja. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Failas pilnai negautas serveryje. ErrorNoTmpDir=Laikinas aplankas %s neegzistuoja. ErrorUploadBlockedByAddon=Įkėlimas užblokuotas PHP/Apache įskiepio. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/lt_LT/externalsite.lang b/htdocs/langs/lt_LT/externalsite.lang index 1196c8466c0..863500a456c 100644 --- a/htdocs/langs/lt_LT/externalsite.lang +++ b/htdocs/langs/lt_LT/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Nustatymų nuoroda į išorinę interneto svetainę -ExternalSiteURL=Išorinės svetainės URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modulis ExternalSite nebuvo tinkamai sukonfigūruotas. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/lt_LT/main.lang b/htdocs/langs/lt_LT/main.lang index 20eab7ac66c..3c1ea88cadb 100644 --- a/htdocs/langs/lt_LT/main.lang +++ b/htdocs/langs/lt_LT/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Pakeitimo data IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Patvirtinimo data +DateSigning=Signing date DateClosing=Uždarymo data DateDue=Laukiama data DateValue=Įvertinimo data @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Vieneto kaina PriceU=Kaina vnt. PriceUHT=Vnt. kaina (be PVM) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Vnt. kaina (su PVM) Amount=Suma AmountInvoice=Sąskaitos-faktūros suma @@ -389,6 +390,8 @@ AmountTotal=Bendra suma AmountAverage=Vidutinė suma PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procentai Total=Visas SubTotal=Tarpinė suma @@ -724,7 +727,7 @@ 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ų +NoFileFound=No documents uploaded CurrentUserLanguage=Dabartinė vartojama kalba CurrentTheme=Dabartinė tema CurrentMenuManager=Dabartinis meniu valdytojas @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Adresatai SearchIntoMembers=Nariai SearchIntoUsers=Vartotojai SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projektai SearchIntoMO=Manufacturing Orders SearchIntoTasks=Uždaviniai @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Priskirtas Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/lt_LT/margins.lang b/htdocs/langs/lt_LT/margins.lang index 6f4906fd592..88a1b6a45f0 100644 --- a/htdocs/langs/lt_LT/margins.lang +++ b/htdocs/langs/lt_LT/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Maržos detalės ProductMargins=Produkto maržos CustomerMargins=Kliento maržos SalesRepresentativeMargins=Prekybos atstovo maržos +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Produktas ar Paslaugos AllProducts=Visi produktai ir paslaugos ChooseProduct/Service=Pasirinkite produktą ar paslaugą 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Maržos metodas visuotinėms nuolaidoms UseDiscountAsProduct=Kaip produktas UseDiscountAsService=Kaip paslauga @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Savikaina UnitCharges=Vieneto sąnaudos Charges=Sąnaudos AgentContactType=Prekybos agento kontakto tipas -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +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 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). +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). diff --git a/htdocs/langs/lt_LT/members.lang b/htdocs/langs/lt_LT/members.lang index b63bb1dc36d..bcf36c5bced 100644 --- a/htdocs/langs/lt_LT/members.lang +++ b/htdocs/langs/lt_LT/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Numatomų narių sąrašas (tvirtinimui) MembersListValid=Patvirtintų galiojančių narių sąrašas MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Slaptų narių sąrašas (qualified) MenuMembersToValidate=Projektiniai nariai MenuMembersValidated=Patvirtinti nariai +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Nariai, kurių pasirašymą reikia gauti MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Pasibaigęs MemberStatusPaid=Pasirašymas atnaujintas MemberStatusPaidShort=Atnaujinta +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Projektiniai nariai +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Galiojantis @@ -82,6 +87,8 @@ Physical=Fizinis Moral=Moralinis MorAndPhy=Moral and Physical Reenable=Įjungti vėl +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Ištrinti narį @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Etikečių puslapio formatas DescADHERENT_ETIQUETTE_TEXT=Spausdinamas tekstas ant nario adreso puslapių @@ -162,6 +170,7 @@ DocForLabels=Sukurti adresų lapus SubscriptionPayment=Pasirašymo apmokėjimas LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Narių statistiniai duomenys pagal šalį MembersStatisticsByState=Narių statistiniai duomenys pagal valstybę/regioną MembersStatisticsByTown=Narių statistiniai duomenys pagal miestus diff --git a/htdocs/langs/lt_LT/modulebuilder.lang b/htdocs/langs/lt_LT/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/lt_LT/modulebuilder.lang +++ b/htdocs/langs/lt_LT/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/lt_LT/orders.lang b/htdocs/langs/lt_LT/orders.lang index 274f41645fa..a287e8f6dd8 100644 --- a/htdocs/langs/lt_LT/orders.lang +++ b/htdocs/langs/lt_LT/orders.lang @@ -16,6 +16,8 @@ ToOrder=Sudaryti užsakymą MakeOrder=Sudaryti užsakymą SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=El. paštas OrderByWWW=Prisijungęs (online) OrderByPhone=Telefonas # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Paprastas užsakymo modelis PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Pateikti sąskaitą užsakymams +CreateInvoiceForThisSupplier=Pateikti sąskaitą užsakymams NoOrdersToInvoice=Nėra užsakymų, kuriems galima išrašyti sąskaitą CloseProcessedOrdersAutomatically=Klasifikuoti "Apdoroti" visus pasirinktus užsakymus. OrderCreation=Užsakymo kūrimas diff --git a/htdocs/langs/lt_LT/other.lang b/htdocs/langs/lt_LT/other.lang index 3a40679f01b..2e84175f9bf 100644 --- a/htdocs/langs/lt_LT/other.lang +++ b/htdocs/langs/lt_LT/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Sukurta %s ModifiedBy=Modifikuota %s ValidatedBy=Patvirtinta %s +SignedBy=Signed by %s ClosedBy=Uždaryta %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=Tai nauji Jūsų prisijungimo raktai NewKeyWillBe=Jūsų naujas prisijungimo prie programos raktas bus ClickHereToGoTo=Spauskite čia norėdami pereiti į %s YouMustClickToChange=Pirmiausia turite paspausti ant šios nuorodos ir patvirtinti šį slaptažodžio pakeitimą +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Jei neprašėte šio pakeitimo, tiesiog pamirškite šį pranešimą. Jūsų mandatai yra saugūs. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/lt_LT/productbatch.lang b/htdocs/langs/lt_LT/productbatch.lang index 05645d1ec1d..9f5b8e2cef9 100644 --- a/htdocs/langs/lt_LT/productbatch.lang +++ b/htdocs/langs/lt_LT/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Naudoti partiją / serijos numerį -ProductStatusOnBatch=Taip (reikalinga partija / serijos numeris) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Ne (Nenaudojama partija / serijos numeris) -ProductStatusOnBatchShort=Taip +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ne Batch=Partija / Serijos numeris atleast1batchfield=Valgymo data arba Pardavimo data arba Partijos / Serijos numeris @@ -22,3 +24,12 @@ ProductLotSetup=Partijos / serijos numerio modulio sąranka ShowCurrentStockOfLot=Rodyti dabartinias atsargas kelių prekių / partijų ShowLogOfMovementIfLot=Show log of movements for couple product/lot StockDetailPerBatch=Stock detail per lot +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/lt_LT/products.lang b/htdocs/langs/lt_LT/products.lang index f3905beb77a..f0af4d4c6d4 100644 --- a/htdocs/langs/lt_LT/products.lang +++ b/htdocs/langs/lt_LT/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Vienetas diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index 81e5adaaefc..935c29a1b8a 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/lt_LT/propal.lang b/htdocs/langs/lt_LT/propal.lang index 51ffddc97b0..3721ae9bbf2 100644 --- a/htdocs/langs/lt_LT/propal.lang +++ b/htdocs/langs/lt_LT/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Siųsti komercinį pasiūlymą paštu DatePropal=Pasiūlymo data DateEndPropal=Galiojimo pabaigos data ValidityDuration=Galiojimo trukmė -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Pasiūlymas %s nerastas AddToDraftProposals=Pridėti į pasiūlymo projektą @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Komercinis pasiūlymas ir eilutės ProposalLine=Pasiūlymo eilutė +ProposalLines=Proposal lines AvailabilityPeriod=Tinkamumo vėlavimas SetAvailability=Nustatykite tinkamumo vėlavimą AfterOrder=po užsakymo @@ -85,3 +85,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/lt_LT/stocks.lang b/htdocs/langs/lt_LT/stocks.lang index bcb4de636b7..c2efa5da6da 100644 --- a/htdocs/langs/lt_LT/stocks.lang +++ b/htdocs/langs/lt_LT/stocks.lang @@ -19,8 +19,8 @@ Stock=Atsargos Stocks=Atsargos MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Vieta -LocationSummary=Trumpas vietos pavadinimas -NumberOfDifferentProducts=Skirtingų produktų skaičius +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Viso produktų skaičius LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Sandėlių vertė 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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ė kaina -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Vieneto pardavimo kaina EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Įplaukos už šį užsakymą StockMovementRecorded=Įrašyti atsargų judėjimai @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Atidaryti iš naujo +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/lt_LT/suppliers.lang b/htdocs/langs/lt_LT/suppliers.lang index ec0170cc1f1..c15c50ee9ca 100644 --- a/htdocs/langs/lt_LT/suppliers.lang +++ b/htdocs/langs/lt_LT/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Istorija diff --git a/htdocs/langs/lt_LT/ticket.lang b/htdocs/langs/lt_LT/ticket.lang index 0dbbd874bab..d6841d70ed6 100644 --- a/htdocs/langs/lt_LT/ticket.lang +++ b/htdocs/langs/lt_LT/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tipas Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/lt_LT/users.lang b/htdocs/langs/lt_LT/users.lang index b8d26906c5d..1fd600809a0 100644 --- a/htdocs/langs/lt_LT/users.lang +++ b/htdocs/langs/lt_LT/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Pašalinti iš grupės PasswordChangedAndSentTo=Slaptažodis pakeistas ir išsiųstas į <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Prašymas pakeisti slaptažodį <b>%s</b> išsiųstą į <b>%s</b> +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=Vartotojai ir grupės LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domeno Vartotojas %s Reactivate=Atgaivinti 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Leidimas suteiktas, nes paveldėtas iš vieno grupės vartotojų Inherited=Paveldėtas +UserWillBe=Created user will be UserWillBeInternalUser=Sukurtas vartotojas bus vidinis vartotojas (nes nėra susietas su konkrečia trečiąja šalimi) UserWillBeExternalUser=Sukurtas vartotojas bus išorinis vartotojas (nes susietas su konkrečia trečiąja šalimi) IdPhoneCaller=Skambinančiojo telefonu ID @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/lt_LT/website.lang b/htdocs/langs/lt_LT/website.lang index 6a589a71fd8..123ffa6cf1e 100644 --- a/htdocs/langs/lt_LT/website.lang +++ b/htdocs/langs/lt_LT/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Skaityti WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/lt_LT/zapier.lang b/htdocs/langs/lt_LT/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/lt_LT/zapier.lang +++ b/htdocs/langs/lt_LT/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/lv_LV/accountancy.lang b/htdocs/langs/lv_LV/accountancy.lang index 9825eac154e..b2c5a7029ea 100644 --- a/htdocs/langs/lv_LV/accountancy.lang +++ b/htdocs/langs/lv_LV/accountancy.lang @@ -16,8 +16,8 @@ ThisService=Šis pakalpojums ThisProduct=Šis produkts DefaultForService=Noklusējums pakalpojumam DefaultForProduct=Noklusējums produktam -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty +ProductForThisThirdparty=Produkts šai trešajai pusei +ServiceForThisThirdparty=Pakalpojums šai trešajai pusei CantSuggest=Nevar ieteikt AccountancySetupDoneFromAccountancyMenu=Lielākā daļa grāmatvedības iestatīšanas tiek veikta no izvēlnes %s ConfigAccountingExpert=Moduļa uzskaites konfigurācija (dubultā ieraksts) @@ -50,7 +50,7 @@ CountriesExceptMe=Visas valstis, izņemot %s AccountantFiles=Eksportēt pirmdokumentus ExportAccountingSourceDocHelp=Izmantojot šo rīku, varat eksportēt avota notikumus (sarakstu un PDF failus), kas tika izmantoti grāmatvedības ģenerēšanai. Lai eksportētu žurnālus, izmantojiet izvēlnes ierakstu %s - %s. VueByAccountAccounting=Skatīt pēc grāmatvedības konta -VueBySubAccountAccounting=View by accounting subaccount +VueBySubAccountAccounting=Skatīt pēc grāmatvedības apakškonta MainAccountForCustomersNotDefined=Galvenais grāmatvedības konts klientiem, kas nav definēti iestatījumos MainAccountForSuppliersNotDefined=Galvenais grāmatvedības konts piegādātājiem, kas nav definēti iestatījumos @@ -131,7 +131,7 @@ InvoiceLinesDone=Iesaistīto rēķinu līnijas ExpenseReportLines=Izdevumu atskaites līnijas, kas saistītas ExpenseReportLinesDone=Saistītās izdevumu pārskatu līnijas IntoAccount=Bind line ar grāmatvedības kontu -TotalForAccount=Kopā grāmatvedības kontā +TotalForAccount=Total accounting account Ventilate=Saistīt @@ -147,7 +147,7 @@ NotVentilatedinAccount=Nav saistošs grāmatvedības kontam XLineSuccessfullyBinded=%s produkti/pakalpojumi, kas veiksmīgi piesaistīti grāmatvedības kontam XLineFailedToBeBinded=%s produkti/pakalpojumi nav saistīti ar nevienu grāmatvedības kontu -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maksimālais rindu skaits saraksta un iesiešanas lapā (ieteicams: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Sāciet lappuses "Saistīšanu darīt" šķirošanu ar jaunākajiem elementiem ACCOUNTING_LIST_SORT_VENTILATION_DONE=Sāciet lappuses "Saistīšana pabeigta" šķirošanu ar jaunākajiem elementiem @@ -201,17 +201,17 @@ Docdate=Datums Docref=Atsauce LabelAccount=Konta nosaukums LabelOperation=Etiķetes darbība -Sens=Direction -AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make +Sens=Virziens +AccountingDirectionHelp=Klienta grāmatvedības kontā izmantojiet kredītu, lai reģistrētu saņemto maksājumu <br> Piegādātāja grāmatvedības kontā izmantojiet Debets, lai reģistrētu veikto maksājumu LetteringCode=Burtu kods Lettering=Burti Codejournal=Žurnāls JournalLabel=Žurnāla etiķete NumPiece=Gabala numurs TransactionNumShort=Num. darījums -AccountingCategory=Personalizētas grupas -GroupByAccountAccounting=Group by general ledger account -GroupBySubAccountAccounting=Group by subledger account +AccountingCategory=Custom group +GroupByAccountAccounting=Grupēt pēc galvenās grāmatas konta +GroupBySubAccountAccounting=Grupēt pēc apakšzinēja konta AccountingAccountGroupsDesc=Šeit jūs varat definēt dažas grāmatvedības kontu grupas. Tie tiks izmantoti personificētiem grāmatvedības pārskatiem. ByAccounts=Pēc kontiem ByPredefinedAccountGroups=Iepriekš definētās grupas @@ -253,7 +253,7 @@ PaymentsNotLinkedToProduct=Maksājums nav saistīts ar kādu produktu / pakalpoj OpeningBalance=Sākuma bilance ShowOpeningBalance=Rādīt sākuma atlikumu HideOpeningBalance=Slēpt sākuma atlikumu -ShowSubtotalByGroup=Show subtotal by level +ShowSubtotalByGroup=Rādīt starpsummu pēc līmeņa Pcgtype=Kontu grupa PcgtypeDesc=Kontu grupa tiek izmantota kā iepriekš definēti “filtra” un “grupēšanas” kritēriji dažiem grāmatvedības pārskatiem. Piemēram, “IENĀKUMS” vai “IZDEVUMI” tiek izmantoti kā produktu uzskaites kontu grupas, lai izveidotu izdevumu / ienākumu pārskatu. @@ -276,11 +276,11 @@ DescVentilExpenseReport=Konsultējieties šeit ar izdevumu pārskatu rindiņu sa DescVentilExpenseReportMore=Ja jūs izveidojat grāmatvedības kontu uz izdevumu pārskata rindiņu veida, programma varēs visu saistību starp jūsu rēķina pārskatu rindiņām un jūsu kontu diagrammas grāmatvedības kontu veikt tikai ar vienu klikšķi, izmantojot pogu <strong> "%s" </strong>. Ja kontam nav iestatīta maksu vārdnīca vai ja jums joprojām ir dažas rindiņas, kurām nav saistības ar kādu kontu, izvēlnē "<strong> %s </ strong>" būs jāveic manuāla piesaistīšana. DescVentilDoneExpenseReport=Konsultējieties šeit ar izdevumu pārskatu rindu sarakstu un to maksu grāmatvedības kontu -Closure=Annual closure +Closure=Gada slēgšana DescClosure=Šeit apskatiet neapstiprināto kustību skaitu mēnesī, un fiskālie gadi jau ir atvērti OverviewOfMovementsNotValidated=1. solis / Nepārvērtēts kustību pārskats. (Nepieciešams, lai slēgtu fiskālo gadu) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated +AllMovementsWereRecordedAsValidated=Visas kustības tika reģistrētas kā apstiprinātas +NotAllMovementsCouldBeRecordedAsValidated=Ne visas kustības varēja reģistrēt kā apstiprinātas ValidateMovements=Apstipriniet kustības DescValidateMovements=Jebkādas rakstīšanas, burtu un izdzēsto tekstu izmaiņas vai dzēšana būs aizliegtas. Visi vingrinājumu ieraksti ir jāapstiprina, pretējā gadījumā aizvēršana nebūs iespējama @@ -300,7 +300,7 @@ Accounted=Uzskaitīts virsgrāmatā NotYetAccounted=Vēl nav uzskaitīti virsgrāmatā ShowTutorial=Rādīt apmācību NotReconciled=Nesaskaņots -WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view +WarningRecordWithoutSubledgerAreExcluded=Brīdinājums: visas darbības, kurās nav definēts apakškārtas konts, tiek filtrētas un izslēgtas no šī skata ## Admin BindingOptions=Iesiešanas iespējas @@ -345,11 +345,11 @@ Modelcsv_LDCompta10=Eksports LD Compta (v10 un jaunākiem) Modelcsv_openconcerto=Eksportēt OpenConcerto (tests) Modelcsv_configurable=Eksportēt CSV konfigurējamu Modelcsv_FEC=Eksporta FEC -Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) +Modelcsv_FEC2=Eksportēt FEC (ar datumu ģenerēšanas / dokumenta maiņu) Modelcsv_Sage50_Swiss=Eksports uz Sage 50 Šveici Modelcsv_winfic=Eksportēt Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Gestinum eksports (v3) +Modelcsv_Gestinumv5Export Gestinum (v5) ChartofaccountsId=Kontu konts. Id ## Tools - Init accounting account on product / service @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Līnijas, kas vēl nav saistītas, izmantojiet izvēl ## Import ImportAccountingEntries=Grāmatvedības ieraksti +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Eksporta datums WarningReportNotReliable=Brīdinājums. Šis pārskats nav balstīts uz grāmatvedi, tādēļ tajā nav darījumu, kas Manuāli ir manuāli modificēts. Ja žurnāls ir atjaunināts, grāmatvedības skats ir precīzāks. ExpenseReportJournal=Izdevumu atskaites žurnāls InventoryJournal=Inventāra žurnāls + +NAccounts=%s accounts diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index 88ecbad779e..dd60ceda643 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -37,8 +37,9 @@ UnlockNewSessions=Noņemt savienojuma bloķēšanu YourSession=Jūsu sesija Sessions=Lietotāju sesijas WebUserGroup=Web servera lietotājs/grupa -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +PermissionsOnFiles=Permissions on files +PermissionsOnFilesInWebRoot=Atļaujas failiem tīmekļa saknes direktorijā +PermissionsOnFile=Atļaujas failā %s NoSessionFound=Šķiet, ka jūsu PHP konfigurācija neļauj iekļaut aktīvās sesijas. Direktorija, kuru izmanto sesiju saglabāšanai (<b>%s</b>), var būt aizsargāta (piemēram, ar OS atļaujām vai PHP direktīvu open_basedir). DBStoringCharset=Datu bāzes kodējuma datu uzglabāšanai DBSortingCharset=Datu bāzes rakstzīmju kopa, lai kārtotu datus @@ -56,12 +57,13 @@ GUISetup=Attēlojums SetupArea=Iestatījumi UploadNewTemplate=Augšupielādēt jaunu veidni (-es) FormToTestFileUploadForm=Forma, lai pārbaudītu failu augšupielādi (pēc uiestatītajiem parametriem) -ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled -ModuleIsEnabled=The module/application <b>%s</b> has been enabled +ModuleMustBeEnabled=Jāiespējo modulis / lietojumprogramma <b> %s </b> +ModuleIsEnabled=Modulis / lietojumprogramma <b> %s </b> ir iespējota IfModuleEnabled=Piezīme: jā, ir efektīva tikai tad, ja modulis <b>%s</b> ir iespējots RemoveLock=Ja ir, noņemiet/pārdēvējiet failu <b>%s</b>, lai varētu izmantot atjaunināšanas/instalēšanas rīku. RestoreLock=Atjaunojiet failu <b>%s</b> tikai ar lasīšanas atļauju, lai atspējotu jebkādu turpmāku atjaunināšanas/instalēšanas rīka izmantošanu. SecuritySetup=Drošības iestatījumi +PHPSetup=PHP setup SecurityFilesDesc=Šeit definējiet ar drošību saistītās iespējas failu augšupielādei. ErrorModuleRequirePHPVersion=Kļūda, šim modulim ir nepieciešama PHP versija %s vai augstāka ErrorModuleRequireDolibarrVersion=Kļūda, šim modulim nepieciešama Dolibarr versija %s vai augstāka @@ -154,8 +156,8 @@ SystemToolsAreaDesc=Šī sadaļa nodrošina administrēšanas funkcijas. Izmanto Purge=Tīrīt PurgeAreaDesc=Šī lapa ļauj izdzēst visus Dolibarr ģenerētos vai glabātos failus (pagaidu faili vai visi faili <b> %s </b> direktorijā). Šīs funkcijas izmantošana parasti nav nepieciešama. Tas tiek nodrošināts kā risinājums lietotājiem, kuru Dolibarr uztur pakalpojumu sniedzējs, kas nepiedāvā atļaujas, lai dzēstu tīmekļa servera ģenerētos failus. PurgeDeleteLogFile=Dzēsiet žurnāla failus, tostarp <b>%s</b>, kas definēti Syslog modulim (nav datu pazaudēšanas riska). -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete log and temporary files +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFilesShort=Dzēst žurnālu un pagaidu failus PurgeDeleteAllFilesInDocumentsDir=Dzēsiet visus failus direktorijā: <b> %s </b>. <br> Tas izdzēsīs visus radītos dokumentus, kas saistīti ar elementiem (trešajām personām, rēķiniem utt.), ECM modulī augšupielādētiem failiem, datu bāzes rezerves izgāztuvēm un pagaidu failus. PurgeRunNow=Tīrīt tagad PurgeNothingToDelete=Nav mapes vai failu, kurus jādzēš. @@ -232,6 +234,7 @@ BoxesAvailable=Pieejamie logrīki BoxesActivated=Logrīki aktivizēti ActivateOn=Aktivizēt ActiveOn=Aktivizēts +ActivatableOn=Activatable on SourceFile=Avota fails AvailableOnlyIfJavascriptAndAjaxNotDisabled=Pieejams tikai tad, ja JavaScript nav atslēgts Required=Nepieciešams @@ -257,7 +260,7 @@ ReferencedPreferredPartners=Ieteicamie partneri OtherResources=Citi resursi ExternalResources=Ārējie resursi SocialNetworks=Sociālie tīkli -SocialNetworkId=Social Network ID +SocialNetworkId=Sociālā tīkla ID ForDocumentationSeeWiki=Par lietotāju vai attīstītājs dokumentācijas (Doc, FAQ ...), <br> ieskatieties uz Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=Par jebkuru citu jautājumu/palīdzību, jūs varat izmantot Dolibarr forumu: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Šeit ir daži resursi, lai iegūtu Dolibarr palīdzību un atbalstu. @@ -347,9 +350,10 @@ LastActivationAuthor=Jaunākais aktivizētāja autors LastActivationIP=Jaunākā aktivizācijas IP adrese UpdateServerOffline=Atjaunināšanas serveris bezsaistē WithCounter=Pārvaldīt skaitītāju -GenericMaskCodes=Jūs varat ievadīt jebkuru numerācijas masku. Šajā maska, šādus tagus var izmantot: <br> <b>{000000}</b> atbilst skaitam, kas tiks palielināts par katru %s. Ievadīt tik daudz nullēm, kā vajadzīgajā garumā letes. Skaitītājs tiks pabeigts ar nullēm no kreisās puses, lai būtu tik daudz nullēm kā masku. <br> <b>{000000 000}</b> tāds pats kā iepriekšējais, bet kompensēt atbilst noteiktam skaitam pa labi uz + zīmi tiek piemērots, sākot ar pirmo %s. <br> <b>{000000 @ x}</b> tāds pats kā iepriekšējais, bet skaitītājs tiek atiestatīts uz nulli, kad mēnesī x ir sasniegts (x no 1 līdz 12, 0 vai izmantot agri no finanšu gada mēnešiem, kas noteiktas konfigurācijas, 99 vai atiestatīt uz nulli katru mēnesi ). Ja šis variants tiek izmantots, un x ir 2 vai vairāk, tad secība {gggg} {mm} vai {GGGG} {mm} ir arī nepieciešama. <br> <b>{Dd}</b> diena (no 01 līdz 31). <br> <b>{Mm}</b> mēnesi (no 01 līdz 12). <br> <b>{Yy}, {GGGG}</b> vai <b>{y}</b> gadu vairāk nekā 2, 4 vai 1 numuri. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Visas citas rakstzīmes masku paliks neskartas.<br>Atstarpes nav atļautas.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Piemērs 99. %s no trešās personas TheCompany, ar datumu 2007-01-31: </u><br> GenericMaskCodes4b=<u>Piemērs trešā persona veidota 2007-03-01:</u><br> GenericMaskCodes4c=<u>Piemērs produkts veidots 2007-03-01:</u><br> @@ -377,7 +381,7 @@ ExamplesWithCurrentSetup=Piemēri ar pašreizējo konfigurāciju ListOfDirectories=Saraksts OpenDocument veidnes katalogi ListOfDirectoriesForModelGenODT=Saraksts ar direktorijām, kurās ir veidnes faili ar OpenDocument formātu. <br> <br> Ievietojiet šeit pilnu direktoriju ceļu. <br> Pievienojiet karodziņu atpakaļ starp eah direktoriju. <br> Lai pievienotu GED moduļa direktoriju, pievienojiet šeit <b > DOL_DATA_ROOT / ecm / yourdirectoryname </b>. <br> <br> Faili šajos katalogos beidzas ar <b> .odt </b> vai <b> .ods </b>. NumberOfModelFilesFound=ODT / ODS veidņu failu skaits, kas atrodams šajos katalogos -ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Sintakses piemēri: <br> c: \\ myapp \\ mydocumentdir \\ mysubdir <br> / home / myapp / mydocumentdir / mysubdir <br> DOL_DATA_ROOT / ecm / ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Lai uzzinātu, kā izveidot odt dokumentu veidnes, pirms saglabājot tos šajās mapēs, lasīt wiki dokumentāciju: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Vārda/Uzvārda atrašanās vieta @@ -408,7 +412,7 @@ UrlGenerationParameters=Parametri, lai nodrošinātu drošas saites SecurityTokenIsUnique=Izmantojiet unikālu securekey parametru katram URL EnterRefToBuildUrl=Ievadiet atsauci objektam %s GetSecuredUrl=Saņemt aprēķināto URL -ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) +ButtonHideUnauthorized=Slēpt neatļautu darbību pogas arī iekšējiem lietotājiem (citādi pelēks) OldVATRates=Vecā PVN likme NewVATRates=Jaunā PVN likme PriceBaseTypeToChange=Pārveidot par cenām ar bāzes atsauces vērtību, kas definēta tālāk @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Atstājot šo lauku tukšu, tas nozīmē, ka šī v ExtrafieldParamHelpselect=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0') <br> <br>, piemēram,: 1, vērtība1 <br> 2, vērtība2 <br> kods3, vērtība3 < br> ... <br> <br> Lai saraksts būtu atkarīgs no cita papildinošā atribūtu saraksta: <br> 1, vērtība1 | opcijas_ <i> vecāku_līmeņa kods </i>: vecāku_skava <br> 2, vērtība2 | opcijas_ <i> vecāku saraksts_code </i>: parent_key <br> <br> Lai saraksts būtu atkarīgs no cita saraksta: <br> 1, vērtība1 | <i> vecāku saraksts_code </i>: vecāku_skava <br> 2, vērtība2 | <i> vecāku saraksts_code </i>: vecāku_poga ExtrafieldParamHelpcheckbox=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0') <br> <br>, piemēram,: 1, vērtība1 <br> 2, vērtība2 <br> 3, vērtība3 < br> ... ExtrafieldParamHelpradio=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0') <br> <br>, piemēram,: 1, vērtība1 <br> 2, vērtība2 <br> 3, vērtība3 < br> ... -ExtrafieldParamHelpsellist=Vērtību saraksts tiek iegūts no tabulas <br> Sintakse: table_name: label_field: id_field :: filter <br> Piemērs: c_typent: libelle: id :: filter <br> - id_field ir a2f a2 = 1) lai parādītu tikai aktīvo vērtību <br>. Filtrā var izmantot arī $ ID $, kas ir pašreizējā objekta <br> ID. Lai filtrā izmantotu SELECT, izmantojiet atslēgvārdu $ SEL $, lai apietu pretinjicēšanas aizsardzību. <br>, ja vēlaties filtrēt ekstrefieldos, izmantojiet sintaksi extra.fieldcode = ... (kur lauka kods ir extrafield kods) <br> <br> Lai saraksts būtu atkarīgs no cita papildu atribūtu saraksta: <br>: <br> <i> parent_list_code </i> | parent_column: filter <br> <br> Lai saraksts būtu atkarīgs no cita saraksta: <br> c_typent: libelle: ID: a04927 -ExtrafieldParamHelpchkbxlst=Vērtību saraksts nāk no tabulas <br> Sintakse: table_name: label_field: id_field :: filtrs <br> piemērs: c_typent: libelle: id :: filtrs <br> <br> filtrs var būt vienkāršs tests (piemēram, aktīvs = 1 ), lai parādītu tikai aktīvo vērtību <br> Jūs varat arī izmantot $ ID $ filtru raganā, kas ir pašreizējā objekta pašreizējais ID <br> Lai SELECT veiktu filtru, izmantojiet $ SEL $ <br>, ja vēlaties filtrēt uz ekrāna. syntax extra.fieldcode = ... (ja lauka kods ir extrafield kods) <br> <br> Lai iegūtu sarakstu atkarībā no cita papildu atribūtu saraksta: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | vecāku_krāsa: filtrs <br> <br> Lai iegūtu sarakstu atkarībā no cita saraksta: <br> c_typent: libelle: id: <i> vecāku saraksts_code </i> | vecāku_ sleja: filtrs +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parametriem jābūt ObjectName: Classpath <br> Sintakse: ObjectName: Classpath ExtrafieldParamHelpSeparator=Vienkārša atdalītāja atstāšana tukša <br> Iestatiet to uz 1 sabrūkošajam atdalītājam (pēc noklusējuma atveriet jaunu sesiju, pēc tam katras lietotāja sesijai tiek saglabāts statuss) <br> Iestatiet to uz 2 sabrukušajam atdalītājam (jaunajai sesijai pēc noklusējuma sabrūk, pēc tam katras lietotāja sesijas laikā tiek saglabāts statuss) LibraryToBuildPDF=Bibliotēka, ko izmanto PDF veidošanai @@ -541,6 +545,8 @@ Module40Name=Pārdevēji Module40Desc=Pārdevēju un pirkumu vadība (pirkumu pasūtījumi un rēķini par piegādātāja rēķiniem) Module42Name=Atkļūdošanas žurnāli Module42Desc=Žurnalēšana (fails, syslog, ...). Šādi žurnāli ir paredzēti tehniskiem / atkļūdošanas nolūkiem. +Module43Name=Atkļūdošanas josla +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redaktors Module49Desc=Redaktora vadība Module50Name=Produkti @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP MaxMind pārveidošanu iespējas Module3200Name=Nemainīgi arhīvi Module3200Desc=Iespējojiet nemainīgu biznesa notikumu žurnālu. Notikumi tiek arhivēti reāllaikā. Žurnāls ir tikai lasāmu tabulu ķēdes notikumus, kurus var eksportēt. Šis modulis dažās valstīs var būt obligāts. +Module3400Name=Sociālie tīkli +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Cilvēkresursu vadība (departamenta vadība, darbinieku līgumi un jūtas) Module5000Name=Multi-kompānija Module5000Desc=Ļauj jums pārvaldīt vairākus uzņēmumus -Module6000Name=Darba plūsma -Module6000Desc=Darbplūsmas vadība (automātiska objekta izveide un / vai automātiska statusa maiņa) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Mājas lapas Module10000Desc=Izveidojiet vietnes (publiskas) ar WYSIWYG redaktoru. Šī ir tīmekļa pārziņa vai izstrādātāja orientēta CMS (labāk ir zināt HTML un CSS valodu). Vienkārši iestatiet savu tīmekļa serveri (Apache, Nginx, ...), lai norādītu uz atvēlēto Dolibarr direktoriju, lai tas būtu tiešsaistē internetā ar savu domēna vārdu. Module20000Name=Atvaļinājumu pieprasījumu pārvaldība @@ -670,7 +678,7 @@ Module54000Desc=Tiešā druka (neatverot dokumentus), izmantojot Cups IPP saskar Module55000Name=Aptauja vai balsojums Module55000Desc=Izveidot tiešsaistes aptaujas, aptaujas vai balsis (piemēram, Doodle, Studs, RDVz utt.) Module59000Name=Malas -Module59000Desc=Module to follow margins +Module59000Desc=Modulis, lai ievērotu piemales Module60000Name=Komisijas Module60000Desc=Modulis lai pārvaldītu komisijas Module62000Name=Inkoterms @@ -805,7 +813,8 @@ PermissionAdvanced253=Izveidot/mainīt iekšējoss/ārējos lietotājus un atļa Permission254=Izveidot/mainīt ārējos lietotājus tikai Permission255=Mainīt citu lietotāju paroli Permission256=Izdzēst vai bloķēt citus lietotājus -Permission262=Paplašināt piekļuvi visām trešajām personām (ne tikai trešām personām, kurām šis lietotājs ir pārdošanas pārstāvis). <br> Nav spēkā attiecībā uz ārējiem lietotājiem (vienmēr tikai attiecībā uz priekšlikumiem, pasūtījumiem, rēķiniem, līgumiem uc). Nav efektīvs projektiem (tikai noteikumi par projektu atļaujām, redzamību un uzdevumiem). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Lasīt CA Permission272=Lasīt rēķinus Permission273=Izrakstīt rēķinus @@ -838,10 +847,10 @@ Permission402=Izveidot/mainīt atlaides Permission403=Apstiprināt atlaides Permission404=Dzēst atlaides Permission430=Izmantot Debug Bar -Permission511=Read payments of salaries (yours and subordinates) +Permission511=Lasīt algu maksājumus (jūsu un padoto) Permission512=Izveidojiet / modificējiet algu maksājumus Permission514=Dzēst algu maksājumus -Permission517=Read payments of salaries of everybody +Permission517=Izlasiet visiem algu maksājumus Permission519=Eksportēt algas Permission520=Lasīt aizdevumus Permission522=Izveidot / labot aizdevumus @@ -1175,7 +1184,8 @@ SetupDescription2=Šīs divas sadaļas ir obligātas (divi pirmie ieraksti iesta SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Pamata parametri, ko izmanto, lai pielāgotu ar jūsu lietojumprogrammu saistīto noklusējuma uzvedību (piemēram, valstij). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Šī programmatūra ir daudzu moduļu / lietojumprogrammu komplekts. Ar jūsu vajadzībām saistītajiem moduļiem jābūt iespējotiem un konfigurētiem. Parādīsies izvēlnes ieraksti, aktivizējot šos moduļus. SetupDescription5=Citi iestatījumu izvēlnes ieraksti pārvalda izvēles parametrus. -LogEvents=Drošības audita notikumi +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audits InfoDolibarr=Par Dolibarr InfoBrowser=Pārlūkprogrammas info @@ -1184,7 +1194,7 @@ InfoWebServer=Par tīmekļa serveri InfoDatabase=Par datubāzi InfoPHP=Par PHP InfoPerf=Par izpildījumiem -InfoSecurity=About Security +InfoSecurity=Par drošību BrowserName=Pārlūkprogrammas nosaukums BrowserOS=Pārlūkprogrammas OS ListOfSecurityEvents=Saraksts ar Dolibarr drošības pasākumiem @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Šķiet, ka nepieciešams veikt atjaunināšan YouMustRunCommandFromCommandLineAfterLoginToUser=Jums ir palaist šo komandu no komandrindas pēc pieteikšanās uz apvalks ar lietotāju <b>%s,</b> vai jums ir pievienot-W iespēju beigās komandrindas, lai sniegtu <b>%s</b> paroli. YourPHPDoesNotHaveSSLSupport=SSL funkcijas, kas nav pieejama jūsu PHP DownloadMoreSkins=Vairāki izskati lejupielādei -SimpleNumRefModelDesc=Atgriež atsauces numuru ar formātu %syymm-nnnn, kur yy ir gads, mm ir mēnesis un nnnn ir secīgs bez atiestatīšanas +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Rādīt profesionālo ID ar adresēm ShowVATIntaInAddress=Slēpt Kopienas iekšējo PVN numuru ar adresēm TranslationUncomplete=Daļējs tulkojums @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Starpniekserveris: nosaukums/adrese MAIN_PROXY_PORT=Starpniekserveris: ports MAIN_PROXY_USER=Starpniekserveris: pieteikšanās/lietotājs MAIN_PROXY_PASS=Starpniekserveris: parole -DefineHereComplementaryAttributes=Šeit norādiet visus papildu / pielāgotos atribūtus, kurus vēlaties iekļaut: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Papildus atribūti ExtraFieldsLines=Papildinošas atribūti (līnijas) ExtraFieldsLinesRec=Papildu atribūti (veidņu rēķinu līnijas) @@ -1308,7 +1318,7 @@ YouUseBestDriver=Jūs izmantojat draiveri %s, kas ir labākais šobrīd pieejams YouDoNotUseBestDriver=Jūs izmantojat draiveri %s, bet ieteicams ir %s. NbOfObjectIsLowerThanNoPb=Jums datu bāzē ir tikai %s %s. Tam nav nepieciešama īpaša optimizācija. SearchOptim=Meklēšanas optimizācija -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can 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. +YouHaveXObjectUseSearchOptim=Jums datu bāzē ir %s %s. Pastāvīgo %s var pievienot vienumam 1 sadaļā Mājas iestatīšana - Cits. Ierobežojiet meklēšanu tikai virkņu sākumā, kas ļauj datu bāzei izmantot indeksus, un jums nekavējoties jāsaņem atbilde. YouHaveXObjectAndSearchOptimOn=Jums datu bāzē ir %s %s, un konstante %s mapē Mājas iestatīšana ir iestatīta uz 1. BrowserIsOK=Jūs izmantojat tīmekļa pārlūku %s. Šī pārlūkprogramma ir droša un ātrdarbīgs. BrowserIsKO=Jūs izmantojat tīmekļa pārlūku %s. Šī pārlūka informācija ir slikta izvēle drošībai, veiktspējai un uzticamībai. Mēs iesakām izmantot Firefox, Chrome, Opera vai Safari. @@ -1316,7 +1326,7 @@ PHPModuleLoaded=Tiek ielādēts PHP komponents %s PreloadOPCode=Tiek izmantots iepriekš ielādēts OPCode AddRefInList=Rādīt klientu / pārdevēju ref. info saraksts (atlasiet sarakstu vai kombinēto) un lielākā daļa hipersaites. <br> Trešās puses parādīsies ar nosaukumu "CC12345 - SC45678 - Lielais uzņēmums". "Lielā uzņēmuma korpuss" vietā. AddAdressInList=Rādīt klienta / pārdevēja adrešu sarakstu (izvēlieties sarakstu vai kombināciju) <br> Trešās puses parādīsies ar nosaukumu "Lielās kompānijas korpuss - 21 lēkt iela 123456", nevis "Lielā uzņēmuma korpuss". -AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)<br>Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand". +AddEmailPhoneTownInContactList=Parādīt kontaktpersonas e-pastu (vai tālruņus, ja tie nav definēti) un pilsētas informācijas sarakstu (atlasīt sarakstu vai kombinēto lodziņu) 59 65 66 - Parīze ", nevis" Dupond Durand ". AskForPreferredShippingMethod=Pieprasiet vēlamo piegādes metodi trešajām pusēm. FieldEdition=Izdevums lauka %s FillThisOnlyIfRequired=Piemērs: +2 (aizpildiet tikai, ja sastopaties ar problēmām) @@ -1423,7 +1433,7 @@ AdherentMailRequired=Lai izveidotu jaunu dalībnieku, nepieciešams e-pasts MemberSendInformationByMailByDefault=Rūtiņu, lai nosūtītu pasta apstiprinājums locekļiem (validāciju vai jauns abonements) ir ieslēgts pēc noklusējuma VisitorCanChooseItsPaymentMode=Apmeklētājs var izvēlēties no pieejamiem maksājumu veidiem MEMBER_REMINDER_EMAIL=Iespējot automātisku atgādinājumu <b> pa e-pastu </b> par beidzies abonementi. Piezīme. Modulim <strong> %s </strong> jābūt iespējotai un pareizi iestatītai, lai nosūtītu atgādinājumus. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Dokumentu veidnes dokumentiem, kas ģenerēti no dalībnieku ieraksta ##### LDAP setup ##### LDAPSetup=LDAP iestatījumi LDAPGlobalParameters=Globālie parametri @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Lietotājs (Unix) LDAPFieldLoginExample=Piemērs: uid LDAPFilterConnection=Meklēšanas filtrs LDAPFilterConnectionExample=Piemērs: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Lietotāja vārds (samba, Aktīvā direktorija) LDAPFieldLoginSambaExample=Piemērs: kāds konta nosaukums LDAPFieldFullname=Vārds un uzvārds @@ -1566,9 +1577,9 @@ LDAPDescValues=Piemērs vērtības ir paredzētas <b>OpenLDAP</b> ar šādām ie ForANonAnonymousAccess=Par apstiprinātu piekļuvi (par rakstīšanas piekļuvi piemēram) PerfDolibarr=Performance uzstādīšana / optimizēt ziņojums YouMayFindPerfAdviceHere=Šajā lapā ir sniegtas dažas pārbaudes vai ieteikumi saistībā ar veiktspēju. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=Nav ieinstalets. +NotSlowedDownByThis=Tas nav palēnināts. +NotRiskOfLeakWithThis=Ar to nav noplūdes riska. ApplicativeCache=Applicative kešatmiņa MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.<br>More information here <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Note that a lot of web hosting provider does not provide such cache server. MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. @@ -1598,13 +1609,13 @@ ServiceSetup=Pakalpojumu moduļa uzstādīšana ProductServiceSetup=Produktu un pakalpojumu moduļu uzstādīšana NumberOfProductShowInSelect=Maksimālais produktu skaits, kas jāparāda kombinētajos atlases sarakstos (0 = bez ierobežojuma) ViewProductDescInFormAbility=Rādīt produktu aprakstus veidlapās (citādi tiek rādīts rīkjoslas uznirstošajā logā) -DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms -OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document -AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product -DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. -DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents +DoNotAddProductDescAtAddLines=Nepievienojiet produkta aprakstu (no produkta kartes), iesniedzot veidlapu pievienošanas rindas +OnProductSelectAddProductDesc=Kā izmantot produktu aprakstu, pievienojot produktu kā dokumenta rindu +AutoFillFormFieldBeforeSubmit=Automātiski aizpildiet apraksta ievades lauku ar produkta aprakstu +DoNotAutofillButAutoConcat=Neaizpildiet ievades lauku automātiski ar produkta aprakstu. Produkta apraksts tiks automātiski savienots ar ievadīto aprakstu. +DoNotUseDescriptionOfProdut=Produkta apraksts nekad netiks iekļauts dokumentu rindu aprakstā MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) +ViewProductDescInThirdpartyLanguageAbility=Parādīt produktu aprakstus veidlapās trešās puses valodā (citādi lietotāja valodā) UseSearchToSelectProductTooltip=Arī tad, ja jums ir liels produktu skaits (> 100 000), varat palielināt ātrumu, iestatot iestatījumu -> Cits iestatījumu konstante PRODUCT_DONOTSEARCH_ANYWHERE uz 1. Tad meklēšana būs tikai virknes sākums. UseSearchToSelectProduct=Pagaidiet, kamēr nospiedīsiet taustiņu, pirms ievietojat produktu kombinēto sarakstu saturu (tas var palielināt veiktspēju, ja jums ir daudz produktu, taču tas ir mazāk ērts). SetDefaultBarcodeTypeProducts=Noklusējuma svītrkoda veids izmantojams produktiem @@ -1679,7 +1690,7 @@ AdvancedEditor=Uzlabotais redaktors ActivateFCKeditor=Aktivizēt uzlabotos redaktoru: FCKeditorForCompany=WYSIWYG izveidi / izdevums no elementiem apraksta un piezīmi (izņemot produktu / pakalpojumu) FCKeditorForProduct=WYSIWYG radīšana / izdevums produktu / pakalpojumu apraksts un atzīmēt -FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <span class="warning">Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.</span> +FCKeditorForProductDetails=WYSIWIG produktu detaļu līniju izveide / izdevums visām vienībām (priekšlikumi, pasūtījumi, rēķini utt.). <span class="warning"> Brīdinājums: Šīs opcijas izmantošana šajā gadījumā nav ieteicama, jo, veidojot PDF failus, tas var radīt problēmas ar īpašām rakstzīmēm un lapu formatēšanu. </span> FCKeditorForMailing= WYSIWYG izveide/ izdevums masveida emailings (Tools-> e-pastu) FCKeditorForUserSignature=WYSIWYG izveide/labošana lietotāja paraksta FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) @@ -1696,7 +1707,7 @@ NotTopTreeMenuPersonalized=Personalizētas izvēlnes, kas nav saistītas ar augs NewMenu=Jauna izvēlne MenuHandler=Izvēlnes apstrādātājs MenuModule=Avota modulis -HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) +HideUnauthorizedMenu=Slēpt neatļautas izvēlnes arī iekšējiem lietotājiem (tikai pelēcīgi citādi) DetailId=Id izvēlne DetailMenuHandler=Izvēlne administrators, kur rādīt jaunu izvēlni DetailMenuModule=Moduļa nosaukums, ja izvēlnes ierakstam nāk no moduļa @@ -1736,19 +1747,21 @@ YourCompanyDoesNotUseVAT=Jūsu uzņēmumam ir noteikts, ka PVN netiek izmantots AccountancyCode=Grāmatvedības kods AccountancyCodeSell=Tirdzniecība kontu. kods AccountancyCodeBuy=Iegādes konta. kods +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Notikumi un kārtības modulis uzstādīšana PasswordTogetVCalExport=Galvenais atļaut eksporta saiti +SecurityKey = Security Key PastDelayVCalExport=Neeksportē notikums, kuri vecāki par AGENDA_USE_EVENT_TYPE=Izmantojiet notikumu tipus (tiek pārvaldīti izvēlnē Iestatīšana -> Vārdnīcas -> Darba kārtības notikumu veids). 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=Kuru skatu vēlaties atvērt pēc noklusējuma, izvēloties izvēlni Agenda -AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). +AGENDA_REMINDER_BROWSER=Iespējojiet notikuma atgādinājumu <b> lietotāja pārlūkprogrammā </b> (Kad ir atgādinājuma datums, pārlūkprogramma parāda uznirstošo logu. Katrs lietotājs var atspējot šādus paziņojumus pārlūka paziņojumu iestatījumos). AGENDA_REMINDER_BROWSER_SOUND=Iespējot skaņas paziņojumu -AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event). -AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment. +AGENDA_REMINDER_EMAIL=Iespējojiet notikuma atgādinājumu <b>, nosūtot e-pastus </b> (katram notikumam var noteikt atgādinājuma opciju / aizkavi). +AGENDA_REMINDER_EMAIL_NOTE=Piezīme. Uzdevuma %s biežumam jābūt pietiekamam, lai pārliecinātos, ka atgādinājums tiek nosūtīts pareizajā brīdī. 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 @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Atrasti vairāki valodu varianti RemoveSpecialChars=Noņemt īpašās rakstzīmes COMPANY_AQUARIUM_CLEAN_REGEX=Regex filtrs tīrajai vērtībai (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Moduļa Sociālo tīklu iestatīšana EnableFeatureFor=Iespējot funkcijas <strong> %s </strong> VATIsUsedIsOff=Piezīme. Izvēlnē %s - %s izvēlētā pārdošanas nodokļa vai PVN izmantošana ir iestatīta uz <strong> Izslēgts </strong>, tāpēc pārdošanas nodoklis vai izmantotais PVN vienmēr būs 0 pārdošanai. SwapSenderAndRecipientOnPDF=Pārsūtīt sūtītāja un adresāta adreses pozīciju PDF dokumentos -FeatureSupportedOnTextFieldsOnly=Brīdinājums, funkcija tiek atbalstīta tikai teksta laukos. Jāiestata arī URL parametrs action = Create vai action = rediģēt. VAI lapas nosaukumam jābeidzas ar 'new.php', lai aktivizētu šo funkciju. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=E-pasta savācējs EmailCollectorDescription=Pievienojiet ieplānoto darbu un iestatīšanas lapu, lai regulāri skenētu e-pasta kastes (izmantojot IMAP protokolu) un ierakstītu savā pieteikumā saņemtos e-pasta ziņojumus pareizajā vietā un / vai automātiski izveidotu ierakstus (piemēram, vadus). NewEmailCollector=Jauns e-pasta savācējs @@ -1990,12 +2003,12 @@ EMailHost=E-pasta IMAP serveris MailboxSourceDirectory=Pastkastes avota katalogs MailboxTargetDirectory=Pastkastes mērķa direktorija EmailcollectorOperations=Darbi, ko veic savācējs -EmailcollectorOperationsDesc=Operations are executed from top to bottom order +EmailcollectorOperationsDesc=Darbības tiek veiktas no augšas uz leju secībā MaxEmailCollectPerCollect=Maksimālais savākto e-pasta ziņojumu skaits CollectNow=Savākt tagad ConfirmCloneEmailCollector=Vai tiešām vēlaties klonēt e-pasta kolekcionāru %s? -DateLastCollectResult=Date of latest collect try -DateLastcollectResultOk=Date of latest collect success +DateLastCollectResult=Pēdējā savākšanas mēģinājuma datums +DateLastcollectResultOk=Pēdējo savākšanas panākumu datums LastResult=Jaunākais rezultāts EmailCollectorConfirmCollectTitle=E-pasts apkopo apstiprinājumu EmailCollectorConfirmCollect=Vai vēlaties savākt šīs kolekcijas kolekciju tagad? @@ -2013,7 +2026,7 @@ WithDolTrackingID=Ziņojums no sarunas, kuru aizsāka pirmais e-pasts, kas nosū WithoutDolTrackingID=Ziņojums no sarunas, kuru aizsāka pirmais e-pasts, kuru NAV nosūtīts no Dolibarr WithDolTrackingIDInMsgId=Ziņojums nosūtīts no Dolibarr WithoutDolTrackingIDInMsgId=Ziņojums NAV nosūtīts no Dolibarr -CreateCandidature=Create job application +CreateCandidature=Izveidot darba pieteikumu FormatZip=Pasta indekss MainMenuCode=Izvēlnes ievades kods (mainmenu) ECMAutoTree=Rādīt automātisko ECM koku @@ -2049,8 +2062,11 @@ UseDebugBar=Izmantojiet atkļūdošanas joslu DEBUGBAR_LOGS_LINES_NUMBER=Pēdējo žurnālu rindu skaits, kas jāsaglabā konsolē WarningValueHigherSlowsDramaticalyOutput=Brīdinājums, augstākas vērtības palēnina dramatisko izeju ModuleActivated=Modulis %s ir aktivizēts un palēnina saskarni -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) +IfYouAreOnAProductionSetThis=Ja izmantojat ražošanas vidi, šim rekvizītam ir jāiestata kā %s. +AntivirusEnabledOnUpload=Augšupielādētajos failos ir iespējota antivīruss +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Eksporta modeļi ir kopīgi ar visiem ExportSetup=Moduļa Eksportēšana iestatīšana ImportSetup=Moduļa importēšanas iestatīšana @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Izveidojiet anonīmu Ping '+1' Dolibarr pamata serverim (to ve FeatureNotAvailableWithReceptionModule=Funkcija nav pieejama, ja ir iespējota moduļa uztveršana EmailTemplate=E-pasta veidne EMailsWillHaveMessageID=E-pastam būs tags “Atsauces”, kas atbilst šai sintaksei +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Ja vēlaties, lai daži PDF faili tiktu dublēti 2 dažādās valodās tajā pašā ģenerētajā PDF failā, jums šeit ir jāiestata šī otrā valoda, lai ģenerētais PDF saturētu vienā un tajā pašā lappusē 2 dažādas valodas, vienu izvēloties, ģenerējot PDF, un šo ( tikai dažas PDF veidnes to atbalsta). Vienā PDF formātā atstājiet tukšumu 1 valodā. FafaIconSocialNetworksDesc=Šeit ievadiet FontAwesome ikonas kodu. Ja jūs nezināt, kas ir FontAwesome, varat izmantot vispārīgo vērtību fa-adrešu grāmata. FeatureNotAvailableWithReceptionModule=Funkcija nav pieejama, ja ir iespējota moduļa uztveršana @@ -2088,10 +2106,19 @@ MailToSendEventPush=Notikuma atgādinājuma e-pasts SwitchThisForABetterSecurity=Lai nodrošinātu lielāku drošību, ieteicams šo vērtību pārslēgt uz %s DictionaryProductNature= Produkta veids CountryIfSpecificToOneCountry=Valsts (ja tā ir konkrēta valsts) -YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. -ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. -CombinationsSeparator=Separator character for product combinations -SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples -SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. -AskThisIDToYourBank=Contact your bank to get this ID +YouMayFindSecurityAdviceHere=Šeit varat atrast drošības konsultācijas +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. +ModuleActivatedDoNotUseInProduction=Izstrādei paredzētais modulis ir iespējots. Neiespējojiet to ražošanas vidē. +CombinationsSeparator=Atdalītāja raksturs produktu kombinācijām +SeeLinkToOnlineDocumentation=Piemēru skatiet saiti uz tiešsaistes dokumentēšanu augšējā izvēlnē +SHOW_SUBPRODUCT_REF_IN_PDF=Ja tiek izmantots moduļa <b> %s </b> līdzeklis "%s", parādiet sīkāku informāciju par komplekta apakšproduktiem PDF formātā. +AskThisIDToYourBank=Lai iegūtu šo ID, sazinieties ar savu banku +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/lv_LV/banks.lang b/htdocs/langs/lv_LV/banks.lang index 0bf310b3a54..584af7af25e 100644 --- a/htdocs/langs/lv_LV/banks.lang +++ b/htdocs/langs/lv_LV/banks.lang @@ -173,11 +173,12 @@ SEPAMandate=SEPA mandāts YourSEPAMandate=Jūsu SEPA mandāts FindYourSEPAMandate=Tas ir jūsu SEPA mandāts, lai pilnvarotu mūsu uzņēmumu veikt tiešā debeta pasūtījumu savai bankai. Atgriezt to parakstu (skenēt parakstīto dokumentu) vai nosūtīt pa pastu uz AutoReportLastAccountStatement=Veicot saskaņošanu, automātiski aizpildiet lauka “bankas izraksta numurs” ar pēdējo izraksta numuru -CashControl=POS cash desk control -NewCashFence=New cash desk closing +CashControl=POS kases kontrole +NewCashFence=New cash desk opening or closing BankColorizeMovement=Krāsojiet kustības BankColorizeMovementDesc=Ja šī funkcija ir iespējota, jūs varat izvēlēties īpašu fona krāsu debeta vai kredīta pārvietošanai BankColorizeMovementName1=Debeta kustības fona krāsa BankColorizeMovementName2=Kredīta aprites fona krāsa -IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. -NoBankAccountDefined=No bank account defined +IfYouDontReconcileDisableProperty=Ja dažos bankas kontos neveicat bankas saskaņošanu, atspējojiet rekvizītu "%s", lai noņemtu šo brīdinājumu. +NoBankAccountDefined=Nav noteikts bankas konts +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/lv_LV/bills.lang b/htdocs/langs/lv_LV/bills.lang index 8e6763b543f..d3144af8df2 100644 --- a/htdocs/langs/lv_LV/bills.lang +++ b/htdocs/langs/lv_LV/bills.lang @@ -52,11 +52,12 @@ Invoices=Rēķini InvoiceLine=Rēķina līnija InvoiceCustomer=Klienta rēķins CustomerInvoice=Klienta rēķins -CustomersInvoices=Klientu rēķini +CustomersInvoices=Klienta rēķini SupplierInvoice=Piegādātāja rēķins -SuppliersInvoices=Piegādātāju rēķini +SuppliersInvoices=Piegādātāja rēķini +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Piegādātāja rēķins -SupplierBills=piegādātāju rēķini +SupplierBills=Piegādātāja rēķini Payment=Maksājums PaymentBack=Atmaksa CustomerInvoicePaymentBack=Atmaksa @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Jau samaksāts PaymentsBackAlreadyDone=Jau veiktas atmaksas PaymentRule=Maksājuma noteikums PaymentMode=Maksājuma veids +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debet karte/ kredīt karte PaymentTypePP=PayPal IdPaymentMode=Maksājuma veids (id) @@ -373,6 +376,7 @@ 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 +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Veicamās paaudzes skaits MaxGenerationReached=Maksimālais sasniegto paaudžu skaits InvoiceAutoValidate=Rēķinus automātiski apstiprināt @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=14 dienu laikā pēc mēneša beigām FixAmount=Fiksēta summa - 1 rinda ar etiķeti '%s' VarAmount=Mainīgais apjoms (%% kop.) VarAmountOneLine=Mainīgā summa (%% kopā) - 1 rinda ar etiķeti '%s' -VarAmountAllLines=Mainīgs daudzums (%% kops.) - visas tās pašas līnijas +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankas pārskaitījums PaymentTypeShortVIR=Bankas pārskaitījums @@ -494,12 +498,16 @@ Cash=Skaidra nauda Reported=Kavējas DisabledBecausePayments=Nav iespējams, kopš šeit ir daži no maksājumiem CantRemovePaymentWithOneInvoicePaid=Nevar dzēst maksājumu, jo eksistē kaut viens rēķins, kas klasificēts kā samaksāts +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Gaidāmais maksājums CantRemoveConciliatedPayment=Nevar noņemt saskaņoto maksājumu PayedByThisPayment=Samaksāts ar šo maksājumu ClosePaidInvoicesAutomatically=Automātiski klasificējiet visus standarta, priekšapmaksas vai rezerves rēķinus kā “Apmaksāts”, ja maksājums ir pilnībā veikts. ClosePaidCreditNotesAutomatically=Automātiski klasificējiet visas kredītzīmes kā "Apmaksātu", kad atmaksa tiek veikta pilnībā. ClosePaidContributionsAutomatically=Automātiski klasificējiet visas sociālās vai fiskālās iemaksas kā &quot;Apmaksātās&quot;, ja maksājums tiek veikts pilnībā. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Visi rēķini, kuriem nav jāmaksā, tiks automātiski aizvērti ar statusu "Paid". ToMakePayment=Maksāt ToMakePaymentBack=Atmaksāt @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Vispirms vispirms jāizveido standarta rē PDFCrabeDescription=Rēķina PDF veidne Krabis. Pilna rēķina veidne (vecā Sponge veidnes ieviešana) PDFSpongeDescription=Rēķina PDF veidne Sponge. Pilnīga rēķina veidne PDFCrevetteDescription=Rēķina PDF veidne Crevette. Pabeigta rēķina veidne situāciju rēķiniem -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Atgriež numuru ar formātu %syymm-nnnn par standarta rēķiniem, %syymm-nnnn par nomainītajiem rēķiniem, %syymm-nnnn par norēķinu rēķiniem un %syymm-nnnn par kredītzīmēm, kur yy ir gads, mm ir mēnesis, un nnnn ir secība bez pārtraukuma un nē atgriezties pie 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Rēķinu sākot ar syymm $ jau pastāv un nav saderīgs ar šo modeli secību. Noņemt to vai pārdēvēt to aktivizētu šo moduli. -CactusNumRefModelDesc1=Atgriešanās numurs ar formātu %syymm-nnnn standarta rēķiniem, %syymm-nnnn par kredītzīmēm un %syymm-nnnn par norēķinu rēķiniem, kur yy ir gads, mm ir mēnesis, un nnnn ir secība bez pārtraukuma un nav atgriezta 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Priekšlaicīgas slēgšanas iemesls EarlyClosingComment=Priekšlaicīgās slēgšanas piezīme ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Ja jums ir nepieciešams, lai šādi rēķini DeleteRepeatableInvoice=Dzēst veidnes rēķinu ConfirmDeleteRepeatableInvoice=Vai tiešām vēlaties izdzēst veidnes rēķinu? CreateOneBillByThird=Izveidojiet vienu rēķinu par trešo pusi (citādi, vienu rēķinu par pasūtījumu) -BillCreated=izveidots (-i) %s rēķins (-i) +BillCreated=%s ģenerēts (-i) rēķins (-i) +BillXCreated=Rēķins %s izveidots StatusOfGeneratedDocuments=Dokumentu ģenerēšanas statuss DoNotGenerateDoc=Neveidot dokumenta failu AutogenerateDoc=Auto ģenerēt dokumenta failu diff --git a/htdocs/langs/lv_LV/boxes.lang b/htdocs/langs/lv_LV/boxes.lang index ff805fefef0..803487a2bbe 100644 --- a/htdocs/langs/lv_LV/boxes.lang +++ b/htdocs/langs/lv_LV/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistika par galvenajiem biznesa objektiem datu bāzē BoxLoginInformation=Pieteikšanās informācija BoxLastRssInfos=RSS informācija BoxLastProducts=Jaunākie %s Produkti/Pakalpojumi @@ -17,9 +18,13 @@ BoxLastActions=Jaunākās darbības BoxLastContracts=Jaunākie līgumi BoxLastContacts=Jaunākie kontakti/adreses BoxLastMembers=Jaunākie dalībnieki +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Jaunākās intervences BoxCurrentAccounts=Atvērto kontu atlikums BoxTitleMemberNextBirthdays=Šī mēneša dzimšanas dienas (dalībnieki) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Jaunākās %s ziņas no %s BoxTitleLastProducts=Produkti / Pakalpojumi: pēdējais %s modificēts BoxTitleProductsAlertStock=Produkti: krājumu brīdinājums @@ -46,12 +51,12 @@ BoxTitleLastModifiedDonations=Jaunākie %s labotie ziedojumi BoxTitleLastModifiedExpenses=Jaunākie %s modificētie izdevumu pārskati BoxTitleLatestModifiedBoms=Jaunākās %s modificētās BOM BoxTitleLatestModifiedMos=Jaunākie %s modificētie ražošanas pasūtījumi -BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded +BoxTitleLastOutstandingBillReached=Pārsniegti klienti ar maksimālo nesamaksāto summu BoxGlobalActivity=Global darbība (pavadzīmes, priekšlikumi, rīkojumi) BoxGoodCustomers=Labi klienti BoxTitleGoodCustomers=%s Labi klienti BoxScheduledJobs=Plānoti darbi -BoxTitleFunnelOfProspection=Lead funnel +BoxTitleFunnelOfProspection=Svina piltuve FailedToRefreshDataInfoNotUpToDate=Neizdevās atsvaidzināt RSS plūsmu. Pēdējoreiz veiksmīgi atsvaidzināšanas datums: %s LastRefreshDate=Jaunākais atsvaidzināšanas datums NoRecordedBookmarks=Nav definētas grāmatzīmes. @@ -95,8 +100,8 @@ LastXMonthRolling=Jaunākais %s mēnesis ritošais ChooseBoxToAdd=Pievienojiet logrīku savam informācijas panelim BoxAdded=Jūsu vadības panelī ir pievienots logrīks BoxTitleUserBirthdaysOfMonth=Šī mēneša dzimšanas dienas (lietotāji) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document +BoxLastManualEntries=Jaunākais grāmatvedības ieraksts, kas ievadīts manuāli vai bez avota dokumenta +BoxTitleLastManualEntries=%s jaunākais ieraksts, kas ievadīts manuāli vai bez avota dokumenta NoRecordedManualEntries=Grāmatvedībā nav manuālu ierakstu BoxSuspenseAccount=Grāmatvedības operācija ar pagaidu kontu BoxTitleSuspenseAccount=Nepiešķirto līniju skaits @@ -105,7 +110,11 @@ 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 -BoxCustomersOutstandingBillReached=Customers with oustanding limit reached +BoxCustomersOutstandingBillReached=Ir sasniegti klienti ar ierobežojumu # Pages -AccountancyHome=Grāmatvedība +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Apstiprināti projekti diff --git a/htdocs/langs/lv_LV/categories.lang b/htdocs/langs/lv_LV/categories.lang index bde3733eac6..de310bd04c0 100644 --- a/htdocs/langs/lv_LV/categories.lang +++ b/htdocs/langs/lv_LV/categories.lang @@ -14,12 +14,12 @@ SuppliersCategoriesArea=Pārdevēju atzīmes / kategorijas CustomersCategoriesArea=Klientu atslēgvārdi/sadaļu apgabals MembersCategoriesArea=Dalībnieku atslēgvārdi/sadaļu apgabals ContactsCategoriesArea=Kontaktu tagi / sadaļu apgabals -AccountsCategoriesArea=Kontu atzīmes / kategoriju apgabals +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projektu tagi / kategoriju apgabals UsersCategoriesArea=Lietotāju tagu / kategoriju apgabals SubCats=Apakšsadaļas CatList=Atslēgvārdu/sadaļu saraksts -CatListAll=List of tags/categories (all types) +CatListAll=Tagu / kategoriju saraksts (visi veidi) NewCategory=Jauna etiķete/sadaļa ModifCat=Labot etiķeti/sadaļu CatCreated=Etiķete/sadaļa izveidota @@ -66,34 +66,34 @@ UsersCategoriesShort=Lietotāju atzīmes / kategorijas StockCategoriesShort=Noliktavas tagi / kategorijas ThisCategoryHasNoItems=Šajā kategorijā nav nevienas preces. CategId=Tag /sadaļas ID -ParentCategory=Parent tag/category -ParentCategoryLabel=Label of parent tag/category -CatSupList=List of vendors tags/categories -CatCusList=List of customers/prospects tags/categories +ParentCategory=Vecāku atzīme / kategorija +ParentCategoryLabel=Vecāku taga / kategorijas etiķete +CatSupList=Pārdevēju tagu / kategoriju saraksts +CatCusList=Klientu / potenciālo klientu tagu / kategoriju saraksts CatProdList=Produktu tagu / kategoriju saraksts CatMemberList=Dalībnieku tagu / kategoriju saraksts -CatContactList=List of contacts tags/categories -CatProjectsList=List of projects tags/categories -CatUsersList=List of users tags/categories -CatSupLinks=Links between vendors and tags/categories +CatContactList=Kontaktu tagu / kategoriju saraksts +CatProjectsList=Projektu tagu / kategoriju saraksts +CatUsersList=Lietotāju tagu / kategoriju saraksts +CatSupLinks=Saikne starp pārdevējiem un tagiem / kategorijām CatCusLinks=Saiknes starp klientiem / perspektīvām un tagiem / kategorijām CatContactsLinks=Saiknes starp kontaktiem / adresēm un tagiem / kategorijām CatProdLinks=Saiknes starp produktiem / pakalpojumiem un tagiem / kategorijām CatMembersLinks=Links between members and tags/categories -CatProjectsLinks=Links between projects and tags/categories -CatUsersLinks=Links between users and tags/categories +CatProjectsLinks=Saikne starp projektiem un tagiem / kategorijām +CatUsersLinks=Saites starp lietotājiem un tagiem / kategorijām DeleteFromCat=Noņemt no tagiem / kategorijas ExtraFieldsCategories=Complementary attributes CategoriesSetup=Tagu / kategoriju iestatīšana CategorieRecursiv=Link with parent tag/category automatically CategorieRecursivHelp=Ja opcija ir ieslēgta, pievienojot produktu apakškategorijai, produkts tiks pievienots arī vecākajai kategorijai. AddProductServiceIntoCategory=Add the following product/service -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Piešķirt kategoriju klientam +AddSupplierIntoCategory=Piešķirt kategoriju piegādātājam ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Izvēlies sadaļu -StocksCategoriesArea=Noliktavu kategorijas -ActionCommCategoriesArea=Pasākumu kategorijas +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Lapu konteineru kategorijas UseOrOperatorForCategories=Izmantojiet vai operatoru kategorijām diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index 6790975f63a..3cb2ec3dd62 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -43,9 +43,10 @@ Individual=Privātpersona ToCreateContactWithSameName=Automātiski izveidos kontaktu / adresi ar tādu pašu informāciju kā trešā persona trešās puses ietvaros. Vairumā gadījumu pat tad, ja jūsu trešā persona ir fiziska persona, pietiek ar trešās personas izveidošanu vien. ParentCompany=Mātes uzņēmums Subsidiaries=Filiāles -ReportByMonth=Atskaite par mēnesi -ReportByCustomers=Klienta ziņojums -ReportByQuarter=Kursa/ reitinga ziņojums +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Pieklājība kods RegisteredOffice=Juridiskā adrese Lastname=Uzvārds @@ -124,7 +125,7 @@ ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-Nr) ProfId3AT=Prof Id 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=EORI numurs ProfId6AT=- ProfId1AU=Prof ID 1 (ABN) ProfId2AU=- @@ -136,7 +137,7 @@ ProfId1BE=Prof ID 1 (Professional skaits) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=EORI numurs ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) @@ -148,7 +149,7 @@ ProfId1CH=UID-Nummer ProfId2CH=- ProfId3CH=Prof ID 1 (Federālā skaits) ProfId4CH=Prof Id 2 (Tirdzniecības Ieraksta numurs) -ProfId5CH=EORI number +ProfId5CH=EORI numurs ProfId6CH=- ProfId1CL=Prof ID 1 (RUT) ProfId2CL=- @@ -166,20 +167,26 @@ ProfId1DE=Prof ID 1 (USt.-IDNR) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=EORI numurs ProfId6DE=- ProfId1ES=Prof ID 1 (CIF / NIF) ProfId2ES=Prof Id 2 (Sociālās apdrošināšanas numurs) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate numurs) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof ID 1 (Sirēnas) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NBS, vecais APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Reģistrācijas numurs ProfId2GB=- ProfId3GB=SIC @@ -202,12 +209,13 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=EORI numurs +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=EORI numurs ProfId6LU=- ProfId1MA=Id prof. 1 (RC) ProfId2MA=Id prof. 2 (PATENTE) @@ -225,13 +233,13 @@ ProfId1NL=KVK nummurs ProfId2NL=- ProfId3NL=- ProfId4NL=Burgerservicenummer (BSN) -ProfId5NL=EORI number +ProfId5NL=EORI numurs ProfId6NL=- ProfId1PT=Prof ID 1 (NIPC) ProfId2PT=Prof Id 2 (Sociālās apdrošināšanas numurs) ProfId3PT=Prof Id 3 (Tirdzniecības Ieraksta numurs) ProfId4PT=Prof Id 4 (konservatorija) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=1. prof. ID (CUI) ProfId2RO=Prof Id 2 (Nr. Manmatriculare) ProfId3RO=3. profils (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof ID 1 (BIN) ProfId2RU=Prof Id 2 (INN) @@ -358,7 +366,7 @@ VATIntraCheckableOnEUSite=Pārbaudiet Kopienas iekšējo PVN identifikācijas nu VATIntraManualCheck=Jūs varat manuāli pārbaudīt arī Eiropas Komisijas vietnē <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Pārbaude nav iespējams. Pārbaudes pakalpojums netiek nodrošināts no dalībvalsts (%s). NorProspectNorCustomer=Nav izredzes, ne klients -JuridicalStatus=Business entity type +JuridicalStatus=Uzņēmējdarbības vienības tips Workforce=Darbaspēks Staff=Darbinieki ProspectLevelShort=Potenciāls @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Maks. par izcilu rēķinu OutstandingBillReached=Maks. par izcilu rēķinu OrderMinAmount=Minimālā pasūtījuma summa -MonkeyNumRefModelDesc=Atgrieziet numuru ar kodu %syymm-nnnn klienta kodam un %syymm-nnnn par pārdevēja kodu, kur yy ir gads, mm ir mēnesis, un nnnn ir secība bez pārtraukuma un nav atgriezties pie 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kods ir bez maksas. Šo kodu var mainīt jebkurā laikā. ManagingDirectors=Menedžera(u) vārds (CEO, direktors, prezidents...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/lv_LV/compta.lang b/htdocs/langs/lv_LV/compta.lang index ad769c0e9d3..7fddc3b40e3 100644 --- a/htdocs/langs/lv_LV/compta.lang +++ b/htdocs/langs/lv_LV/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST pirkumi VATCollected=Iekasētais PVN StatusToPay=Jāsamaksā SpecialExpensesArea=Sadaļa visiem īpašajiem maksājumiem +VATExpensesArea=Area for all TVA payments 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 @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Klienta rēķina apmaksa PaymentSupplierInvoice=pārdevēja rēķina apmaksa PaymentSocialContribution=Social/fiscal tax payment PaymentVat=PVN maksājumi +AutomaticCreationPayment=Automatically record the payment ListPayment=Maksājumu saraksts ListOfCustomerPayments=Klientu maksājumu saraksts ListOfSupplierPayments=Pārdevēja maksājumu saraksts @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Maksājumu LT2PaymentsES=IRPF Maksājumi VATPayment=Tirdzniecības nodokļa samaksa VATPayments=Tirdzniecības nodokļa maksājumi +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=PVN atmaksa NewVATPayment=Jauns apgrozījuma nodokļa maksājums NewLocalTaxPayment=Jauns nodokļa %s maksājums @@ -111,7 +115,7 @@ Refund=Atmaksa SocialContributionsPayments=Sociālo/fiskālo nodokļu maksājumi ShowVatPayment=Rādīt PVN maksājumu TotalToPay=Summa -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted on %s and filtered on 1 bank account (with no other filters) +BalanceVisibilityDependsOnSortAndFilters=Atlikums šajā sarakstā ir redzams tikai tad, ja tabula ir sakārtota %s un filtrēta 1 bankas kontā (bez citiem filtriem) CustomerAccountancyCode=Klienta grāmatvedības kods SupplierAccountancyCode=Pārdevēja grāmatvedības kods CustomerAccountancyCodeShort=Klienta. konta. kods @@ -134,13 +138,21 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Pārbaudiet uzņemšanas datumu NbOfCheques=Pārbaužu skaits PaySocialContribution=Maksāt sociālo/fiskālo nodokli -ConfirmPaySocialContribution=Vai tiešām vēlaties klasificēt šo sociālo vai fiskālo nodokli kā samaksātu? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Dzēst sociālo vai fiskālo nodokļu maksājumu -ConfirmDeleteSocialContribution=Vai tiešām vēlaties dzēst šo sociālo / fiskālo nodokļu maksājumu? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Sociālie un fiskālie nodokļi un maksājumi CalcModeVATDebt=Mode <b>%sVAT par saistību accounting%s.</b> CalcModeVATEngagement=Mode <b>%sVAT par ienākumu-expense%sS.</b> -CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. +CalcModeDebt=Zināmu reģistrēto dokumentu analīze, pat ja tie vēl nav uzskaitīti grāmatā. CalcModeEngagement=Zināma reģistrēto maksājumu analīze, pat ja tie vēl nav uzskaitīti Ledger. CalcModeBookkeeping=Grāmatvedības grāmatiņas žurnālā publicēto datu analīze. CalcModeLT1= Mode <b>%sRE on customer invoices - suppliers invoices%s</b> @@ -154,8 +166,8 @@ AnnualSummaryInputOutputMode=Ienākumu un izdevumu bilance, gada kopsavilkums AnnualByCompanies=Ieņēmumu un izdevumu līdzsvars pēc iepriekš definētām kontu grupām AnnualByCompaniesDueDebtMode=Ieņēmumu un izdevumu bilance, detalizēti pēc iepriekš definētām grupām, režīms <b> %sClaims-Debts%s </b> norādīja <b> Saistību grāmatvedība </b>. AnnualByCompaniesInputOutputMode=Ieņēmumu un izdevumu līdzsvars, detalizēti pēc iepriekš definētām grupām, režīms <b> %sIncomes-Expenses%s </b> norādīja <b> naudas līdzekļu uzskaiti </b>. -SeeReportInInputOutputMode=See <b>%sanalysis of payments%s</b> for a calculation based on <b>recorded payments</b> made even if they are not yet accounted in Ledger -SeeReportInDueDebtMode=See <b>%sanalysis of recorded documents%s</b> for a calculation based on known <b>recorded documents</b> even if they are not yet accounted in Ledger +SeeReportInInputOutputMode=Skatiet <b> %s maksājumu analīzi s%s </b> aprēķinam, kura pamatā ir <b> reģistrētie maksājumi </b>, pat ja tie vēl nav veikti. +SeeReportInDueDebtMode=Skatiet <b> %sanalizēto dokumentu analīzi s%s </b>, lai aprēķinātu, pamatojoties uz zināmiem <b> ierakstītiem dokumentiem </b>, pat ja tie vēl nav SeeReportInBookkeepingMode=See <b>%sanalysis of bookeeping ledger table%s</b> for a report based on <b>Bookkeeping Ledger table</b> RulesAmountWithTaxIncluded=- Uzrādītas summas ir ar visiem ieskaitot nodokļus RulesResultDue=- Tas ietver nesamaksātos rēķinus, izdevumus, PVN, ziedojumus neatkarīgi no tā, vai tie ir samaksāti. Ietver arī algas. <br> - tas ir balstīts uz rēķinu izrakstīšanas datumu un izdevumu vai nodokļu samaksas termiņu. Algām, kas noteiktas ar Algas moduli, tiek izmantots maksājuma valutēšanas datums. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- Tajā ir iekļauti klienta rēķini, par kuriem ir samaksāts. <br> - tas ir balstīts uz šo rēķinu apmaksas datumu. <br> RulesCAIn=- Tas ietver visus no klientiem saņemto rēķinu faktiskos maksājumus. <br> - Tas ir balstīts uz šo rēķinu apmaksas datumu RulesCATotalSaleJournal=Tas ietver visas kredītlīnijas no pārdošanas žurnāla. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Tas ietver jūsu Ledger ierakstu ar grāmatvedības kontiem, kuriem ir grupa "IZDEVUMS" vai "IENĀKUMS" RulesResultBookkeepingPredefined=Tas ietver jūsu Ledger ierakstu ar grāmatvedības kontiem, kuriem ir grupa "IZDEVUMS" vai "IENĀKUMS" RulesResultBookkeepingPersonalized=Tas rāda jūsu grāmatvedībā ierakstu ar grāmatvedības kontiem <b>grupējot pēc personalizētām grupām</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Trešo personu pārdošanas nodokļa pārskats VATReportByCustomers=Pārdošanas nodokļa pārskats pēc klienta VATReportByCustomersInInputOutputMode=Ziņojums klientu PVN iekasē un izmaksā VATReportByQuartersInInputOutputMode=Ienākuma nodokļa likmes aprēķins par iekasēto un samaksāto nodokli +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Ziņot par nodokli 2 pēc likmes LT2ReportByQuarters=Ziņojiet par nodokli 3 pēc likmes LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=PCG apakštipu InvoiceLinesToDispatch=Rēķina līnijas nosūtīšanas ByProductsAndServices=Pēc produkta un pakalpojuma RefExt=Ārējā ref -ToCreateAPredefinedInvoice=Lai izveidotu veidnes rēķinu, izveidojiet standarta rēķinu, pēc tam, neapstiprinot to, noklikšķiniet uz pogas "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Saite uz pasūtījumu Mode1=Metode 1 Mode2=Metode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Īpašais grāmatvedības konts, kas noteikts t ACCOUNTING_ACCOUNT_SUPPLIER=Pārdevēja trešo personu grāmatvedības konts ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Trešās puses kartē noteiktais īpašais grāmatvedības konts tiks izmantots tikai Subledger grāmatvedībai. Tas tiks izmantots galvenajai grāmatai un Subledger grāmatvedības noklusējuma vērtība, ja nav definēts īpašs pārdevēja grāmatvedības konts trešajā pusē. ConfirmCloneTax=Apstipriniet sociālā / fiskālā nodokļa klonu +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Klonēt nākošam mēnesim SimpleReport=Vienkāršs pārskats AddExtraReport=Papildu pārskati (pievienojiet ārvalstu un valsts klientu pārskatu) @@ -253,7 +269,8 @@ AccountingAffectation=Grāmatvedības uzskaite LastDayTaxIsRelatedTo=Nodokļa pēdējā diena ir saistīta ar VATDue=Pieprasītais pārdošanas nodoklis ClaimedForThisPeriod=Pretendē uz periodu -PaidDuringThisPeriod=Apmaksāts šajā periodā +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Ar pārdošanas nodokļa likmi TurnoverbyVatrate=Apgrozījums, par kuru tiek aprēķināta pārdošanas nodokļa likme TurnoverCollectedbyVatrate=Apgrozījums, kas iegūts, pārdodot nodokli @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Apkopots pirkumu apgrozījums RulesPurchaseTurnoverDue=- Tajā ir iekļauti piegādātāja rēķini par samaksu neatkarīgi no tā, vai tie ir samaksāti. <br> - tas ir balstīts uz šo rēķinu izrakstīšanas datumu. <br> RulesPurchaseTurnoverIn=- Tas ietver visus faktiskos rēķinu maksājumus, kas veikti piegādātājiem. <br> - tas ir balstīts uz šo rēķinu apmaksas datumu <br> RulesPurchaseTurnoverTotalPurchaseJournal=Tas ietver visas pirkuma žurnāla debeta līnijas. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Par pirkuma apgrozījumu izrakstīts rēķins ReportPurchaseTurnoverCollected=Apkopots pirkumu apgrozījums IncludeVarpaysInResults = Pārskatos iekļaujiet dažādus maksājumus diff --git a/htdocs/langs/lv_LV/ecm.lang b/htdocs/langs/lv_LV/ecm.lang index 15b962b9de2..d2c5fd13c9d 100644 --- a/htdocs/langs/lv_LV/ecm.lang +++ b/htdocs/langs/lv_LV/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Meklēt pēc atslēgvārdiem ECMSearchByEntity=Meklēt pēc objekta ECMSectionOfDocuments=Dokumentu sadaļas ECMTypeAuto=Automātiski -ECMDocsBy=Documents linked to %s +ECMDocsBy=Dokumenti, kas saistīti ar %s ECMNoDirectoryYet=Nav izveidots katalogs ShowECMSection=Rādīt katalogu DeleteSection=Dzēst direktoriju @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Fails vēl nav indeksēts datu bāzē (mēģiniet to ExtraFieldsEcmFiles=Extrafields Ecm failus ExtraFieldsEcmDirectories=Extrafields Ecm direktoriji ECMSetup=ECM iestatīšana +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/lv_LV/errors.lang b/htdocs/langs/lv_LV/errors.lang index 60299570880..e04c4e58a21 100644 --- a/htdocs/langs/lv_LV/errors.lang +++ b/htdocs/langs/lv_LV/errors.lang @@ -8,7 +8,7 @@ ErrorBadEMail=E-pasts %s ir nepareizs ErrorBadMXDomain=E-pasts %s nepareizs (domēnam nav derīga MX ieraksta) ErrorBadUrl=Url %s ir nepareizs ErrorBadValueForParamNotAString=Jūsu parametra nepareiza vērtība. Tas parasti parādās, ja trūkst tulkojuma. -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorRefAlreadyExists=Atsauce <b> %s </b> jau pastāv. ErrorLoginAlreadyExists=Lietotājs %s jau pastāv. ErrorGroupAlreadyExists=Grupa %s jau pastāv. ErrorRecordNotFound=Ierakstīt nav atrasts. @@ -50,7 +50,7 @@ ErrorFieldsRequired=Daži nepieciešamie lauki netika aizpildīti. ErrorSubjectIsRequired=E-pasta tēma ir nepieciešama ErrorFailedToCreateDir=Neizdevās izveidot direktoriju. Pārbaudiet, vai Web servera lietotājam ir tiesības rakstīt uz Dolibarr dokumentus direktorijā. Ja parametrs <b>safe_mode</b> ir iespējots uz šo PHP, pārbaudiet, Dolibarr php faili pieder web servera lietotājam (vai grupa). ErrorNoMailDefinedForThisUser=Nav definēts e-pasts šim lietotājam -ErrorSetupOfEmailsNotComplete=Setup of emails is not complete +ErrorSetupOfEmailsNotComplete=E-pastu iestatīšana nav pabeigta ErrorFeatureNeedJavascript=Šai funkcijai ir nepieciešams aktivizēt javascript. Mainīt to var iestatījumi - attēlojums. ErrorTopMenuMustHaveAParentWithId0=Tipa &quot;Top&quot; izvēlnē nevar būt mātes ēdienkarti. Put ar 0 mātes izvēlnes vai izvēlēties izvēlni tips &quot;pa kreisi&quot;. ErrorLeftMenuMustHaveAParentId=Tipa 'Kreiso' izvēlne jābūt vecākiem id. @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> nav atrasts (Bad ceļš, aplamas tiesības ErrorFunctionNotAvailableInPHP=Funkcija <b>%s</b> ir nepieciešama šī funkcija, bet nav pieejams šajā versijā / uzstādīšanas PHP. ErrorDirAlreadyExists=Direrktorija ar šādu nosaukumu jau pastāv. ErrorFileAlreadyExists=Fails ar šādu nosaukumu jau eksistē. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Serveris failu nav saņemis pilnīgi. ErrorNoTmpDir=Pagaidu direktorija %s neeksistē. ErrorUploadBlockedByAddon=Augšupielāde bloķēja ar PHP/Apache spraudni. @@ -78,7 +79,7 @@ ErrorExportDuplicateProfil=Šāds profila nosaukums jau eksistē šim eksportam. ErrorLDAPSetupNotComplete=Dolibarr-LDAP saskaņošana nav pilnīga. ErrorLDAPMakeManualTest=. LDIF fails ir radīts direktorija %s. Mēģināt ielādēt manuāli no komandrindas, lai būtu vairāk informācijas par kļūdām. ErrorCantSaveADoneUserWithZeroPercentage=Nevar saglabāt darbību ar statusu, kas nav startēts, ja arī aizpildīts lauks "done by". -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorRefAlreadyExists=Atsauce <b> %s </b> jau pastāv. ErrorPleaseTypeBankTransactionReportName=Lūdzu, ievadiet bankas izraksta nosaukumu, kurā ieraksts jāpaziņo (formāts GGGGMM vai GGGGMMDD). ErrorRecordHasChildren=Neizdevās dzēst ierakstu, jo tajā ir daži bērnu ieraksti. ErrorRecordHasAtLeastOneChildOfType=Objektam ir vismaz viens bērns no tipa %s @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Kļūda, ielādējot kontu diagrammu. Ja daži konti netika ErrorBadSyntaxForParamKeyForContent=Slikta sintakse param keyforcontent. Jābūt vērtībai, kas sākas ar %s vai %s ErrorVariableKeyForContentMustBeSet=Kļūda, ir jāiestata konstants ar nosaukumu %s (ar teksta saturu, kas jāparāda) vai %s (ar ārējo URL). ErrorURLMustStartWithHttp=URL %s jāsāk ar http: // vai https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Kļūda, jaunā atsauce jau ir izmantota ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Kļūda, dzēšot maksājumu, kas sasaistīts ar slēgtu rēķinu. ErrorSearchCriteriaTooSmall=Meklēšanas kritēriji ir pārāk mazi. @@ -248,13 +250,17 @@ ErrorProductDoesNotNeedBatchNumber=Kļūda, produkts '<b> %s </b>' nepieņem par ErrorFailedToReadObject=Kļūda, neizdevās nolasīt <b> tipa objektu. %s ErrorParameterMustBeEnabledToAllwoThisFeature=Kļūda, parametram <b> %s </b> jābūt iespējotam <b> conf / conf.php <b>, lai iekšējais darba plānotājs varētu izmantot komandrindas saskarni ErrorLoginDateValidity=Kļūda, šī pieteikšanās ir ārpus derīguma datumu diapazona -ErrorValueLength=Length of field '<b>%s</b>' must be higher than '<b>%s</b>' -ErrorReservedKeyword=The word '<b>%s</b>' is a reserved keyword -ErrorNotAvailableWithThisDistribution=Not available with this distribution -ErrorPublicInterfaceNotEnabled=Public interface was not enabled -ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page -ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page -ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorValueLength=Lauka '<b> %s </b>' garumam jābūt lielākam par '<b> %s </b>' +ErrorReservedKeyword=Vārds “<b> %s </b>” ir rezervēts atslēgvārds +ErrorNotAvailableWithThisDistribution=Nav pieejams ar šo izplatīšanu +ErrorPublicInterfaceNotEnabled=Publiskā saskarne netika iespējota +ErrorLanguageRequiredIfPageIsTranslationOfAnother=Jaunās lapas valoda ir jādefinē, ja tā ir iestatīta kā citas lapas tulkojums +ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=Jaunas lapas valoda nedrīkst būt avota valoda, ja tā ir iestatīta kā citas lapas tulkojums +ErrorAParameterIsRequiredForThisOperation=Šai darbībai ir obligāts parametrs +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Jūsu PHP parametrs upload_max_filesize (%s) ir augstāks nekā PHP parametrs post_max_size (%s). Šī nav konsekventa iestatīšana. @@ -286,4 +292,7 @@ WarningSomeBankTransactionByChequeWereRemovedAfter=Daži bankas darījumi tika n WarningFailedToAddFileIntoDatabaseIndex=Brīdinājums, neizdevās pievienot faila ierakstu ECM datu bāzes rādītāju tabulā WarningTheHiddenOptionIsOn=Brīdinājums: slēpta opcija <b> %s </b> ir ieslēgta. WarningCreateSubAccounts=Brīdinājums: jūs nevarat izveidot tieši apakškontu, jums ir jāizveido trešā puse vai lietotājs un jāpiešķir viņiem grāmatvedības kods, lai tos atrastu šajā sarakstā -WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningAvailableOnlyForHTTPSServers=Pieejams tikai tad, ja tiek izmantots HTTPS drošais savienojums. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/lv_LV/externalsite.lang b/htdocs/langs/lv_LV/externalsite.lang index de165ef0b5b..925c1286ec8 100644 --- a/htdocs/langs/lv_LV/externalsite.lang +++ b/htdocs/langs/lv_LV/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Ārējo vietņu iestatīšana -ExternalSiteURL=Ārējā Vietnes URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modulis ExternalSite nav pareizi konfigurēts. ExampleMyMenuEntry=Manas izvēlnes ieraksti diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index 9e137712141..0c7cf3ecaf8 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -30,7 +30,7 @@ NoTranslation=Nav iztulkots Translation=Tulkošana CurrentTimeZone=Laika josla PHP (servera) EmptySearchString=Ievadiet meklēšanas kritērijus -EnterADateCriteria=Enter a date criteria +EnterADateCriteria=Ievadiet datuma kritērijus NoRecordFound=Nav atrasti ieraksti NoRecordDeleted=Neviens ieraksts nav dzēsts NotEnoughDataYet=Nepietiek datu @@ -87,7 +87,7 @@ FileWasNotUploaded=Fails ir izvēlēts pielikumam, bet vēl nav augšupielādē NbOfEntries=Ierakstu skaits GoToWikiHelpPage=Lasīt tiešsaistes palīdzību (nepieciešams interneta piekļuve) GoToHelpPage=Lasīt palīdzību -DedicatedPageAvailable=There is a dedicated help page related to your current screen +DedicatedPageAvailable=Ir īpaša palīdzības lapa, kas saistīta ar jūsu pašreizējo ekrānu HomePage=Mājas lapa RecordSaved=Ieraksts saglabāts RecordDeleted=Ieraksts dzēsts @@ -201,7 +201,7 @@ ReOpen=Atvērt pa jaunu Upload=Augšupielādēt ToLink=Saite Select=Atlasīt -SelectAll=Select all +SelectAll=Izvēlēties visus Choose=Izvēlēties Resize=Samazināt ResizeOrCrop=Mainīt izmērus vai apgriezt @@ -224,7 +224,7 @@ Value=Vērtība PersonalValue=Personīgā vērtība NewObject=Jauns %s NewValue=Jaunā vērtība -OldValue=Old value %s +OldValue=Vecā vērtība %s CurrentValue=Pašreizējā vērtība Code=Kods Type=Tips @@ -263,7 +263,7 @@ Cards=Kartes Card=Karte Now=Tagad HourStart=Sākuma stunda -Deadline=Deadline +Deadline=Nodošanas laiks Date=Datums DateAndHour=Datums un laiks DateToday=Šodienas datums @@ -272,12 +272,13 @@ DateStart=Sākuma datums DateEnd=Beigu datums DateCreation=Izveidošanas datums DateCreationShort=Izv. datums -IPCreation=Creation IP +IPCreation=Izveides IP DateModification=Labošanas datums DateModificationShort=Modif. datums -IPModification=Modification IP +IPModification=Modifikācijas IP DateLastModification=Jaunākais labošanas datums DateValidation=Apstiprināšanas datums +DateSigning=Signing date DateClosing=Beigu datums DateDue=Izpildes datums DateValue=Valutēšanas datums @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Vienības cena (izņemot) (valūta) UnitPriceTTC=Vienības cena PriceU=UP PriceUHT=UP (neto) -PriceUHTCurrency=ASV (valūta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Summa AmountInvoice=Rēķina summa @@ -389,6 +390,8 @@ AmountTotal=Kopējā summa AmountAverage=Vidējā summa PriceQtyMinHT=Cenu daudzums min. (bez nodokļiem) PriceQtyMinHTCurrency=Cenu daudzums min. (bez nodokļa) (valūta) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procentuālā attiecība Total=Kopsumma SubTotal=Starpsumma @@ -438,7 +441,7 @@ RemainToPay=Vēl jāsamaksā Module=Module/Application Modules=Moduļi/lietojumprogrammas Option=Iespējas -Filters=Filters +Filters=Filtri List=Saraksts FullList=Pilns saraksts FullConversation=Pilna saruna @@ -656,7 +659,7 @@ SupplierPreview=Pārdevēja priekšskatījums ShowCustomerPreview=Rādīt klientu priekšskatījumu ShowSupplierPreview=Rādīt pārdevēja priekšskatījumu RefCustomer=Ref. klienta -InternalRef=Internal ref. +InternalRef=Iekšējā atsauce Currency=Valūta InfoAdmin=Informācija administratoriem Undo=Atcelt @@ -724,7 +727,7 @@ 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ā +NoFileFound=No documents uploaded CurrentUserLanguage=Pašreizējā valoda CurrentTheme=Pašreizējā tēma CurrentMenuManager=Pašreizējais izvēlnes pārvaldnieks @@ -899,8 +902,10 @@ ViewAccountList=Skatīt virsgrāmatu ViewSubAccountList=Skatīt apakškonta virsgrāmatu RemoveString=Noņemt virkni '%s' SomeTranslationAreUncomplete=Dažas piedāvātās valodas var būt tikai daļēji tulkotas vai var saturēt kļūdas. Lūdzu, palīdziet labot savu valodu, reģistrējoties <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a>, lai pievienotu savus uzlabojumus. -DirectDownloadLink=Tiešā lejupielādes saite (publiska / ārēja) -DirectDownloadInternalLink=Tiešā lejupielādes saite (ir jāreģistrē un tai ir nepieciešamas atļaujas). +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Lejupielādēt DownloadDocument=Lejupielādēt dokumentu ActualizeCurrency=Atjaunināt valūtas kursu @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakti SearchIntoMembers=Dalībnieki SearchIntoUsers=Lietotāji SearchIntoProductsOrServices=Preces un pakalpojumi +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekti SearchIntoMO=Ražošanas pasūtījumi SearchIntoTasks=Uzdevumi @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tastatūras saīsne AssignedTo=Piešķirts Deletedraft=Dzēst melnrakstu ConfirmMassDraftDeletion=Projekta masveida dzēšanas apstiprinājums -FileSharedViaALink=Fails koplietots, izmantojot saiti +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Vispirms izvēlieties trešo pusi ... YouAreCurrentlyInSandboxMode=Pašlaik esat %s "smilšu kastes" režīmā Inventory=Inventārs AnalyticCode=Analītiskais kods TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Rādīt vairāk informācijas NoFilesUploadedYet=Lūdzu, vispirms augšupielādējiet dokumentu SeePrivateNote=Skatīt privāto piezīmi @@ -1113,10 +1120,12 @@ SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Drošības pilnvaras d UpToDate=Aktuāls OutOfDate=Novecojis EventReminder=Atgādinājums par notikumu -UpdateForAllLines=Update for all lines +UpdateForAllLines=Atjauninājums visām līnijām OnHold=On hold -Civility=Civility -AffectTag=Affect Tag -ConfirmAffectTag=Bulk Tag Affect -ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? -CategTypeNotFound=No tag type found for type of records +Civility=Laipnība +AffectTag=Ietekmēt tagu +ConfirmAffectTag=Masveida tagu ietekme +ConfirmAffectTagQuestion=Vai tiešām vēlaties ietekmēt atlasītā (-o) ieraksta (-u) %s tagus? +CategTypeNotFound=Ierakstu veidam nav atrasts neviens tagu tips +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/lv_LV/margins.lang b/htdocs/langs/lv_LV/margins.lang index 1334860b81f..92c24a82dc9 100644 --- a/htdocs/langs/lv_LV/margins.lang +++ b/htdocs/langs/lv_LV/margins.lang @@ -22,7 +22,7 @@ ProductService=Produkts vai pakalpojums AllProducts=Visi produkti un pakalpojumi ChooseProduct/Service=Izvēlies preci vai pakalpojumu 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Maržinālā metode pasaules atlaides UseDiscountAsProduct=Kā produktu UseDiscountAsService=Kā pakalpojums diff --git a/htdocs/langs/lv_LV/members.lang b/htdocs/langs/lv_LV/members.lang index fdb1ac592bf..f8c18b6e851 100644 --- a/htdocs/langs/lv_LV/members.lang +++ b/htdocs/langs/lv_LV/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Saraksts projektu dalībnieki (tiks apstiprināts) MembersListValid=Derīgo dalībnieku saraksts MembersListUpToDate=Derīgu dalībnieku saraksts ar atjauninātu abonementu MembersListNotUpToDate=Derīgo dalībnieku saraksts ar novecojušu abonementu +MembersListExcluded=List of excluded members MembersListResiliated=Dzēsto dalībnieku saraksts MembersListQualified=Saraksts kvalificētiem locekļiem MenuMembersToValidate=Projektu dalībnieki MenuMembersValidated=Apstiprināti biedri +MenuMembersExcluded=Excluded members MenuMembersResiliated=Izslēgtie dalībnieki MembersWithSubscriptionToReceive=Dalībniekiem ar abonementu, lai saņemtu MembersWithSubscriptionToReceiveShort=Abonēšana saņemt @@ -47,9 +49,12 @@ MemberStatusActiveLate=Abonements beidzies MemberStatusActiveLateShort=Beidzies MemberStatusPaid=Abonēšana atjaunināta MemberStatusPaidShort=Aktuāls +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Apturēts dalībnieks MemberStatusResiliatedShort=Izbeigta MembersStatusToValid=Projektu dalībnieki +MembersStatusExcluded=Excluded members MembersStatusResiliated=Izbeigti dalībnieki MemberStatusNoSubscription=Validēts (abonēšana nav nepieciešama) MemberStatusNoSubscriptionShort=Apstiprināts @@ -80,8 +85,10 @@ DeleteType=Dzēst VoteAllowed=Balsot atļauts Physical=Fizisks Moral=Morāls -MorAndPhy=Moral and Physical +MorAndPhy=Morāls un fizisks Reenable=Atkārtoti ieslēdzams +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Izslēgt dalībnieku ConfirmResiliateMember=Vai tiešām vēlaties pārtraukt šo dalībnieku? DeleteMember=Dzēst dalībnieku @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-pasta veidne, kas jāizmanto, la DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-pasta veidne, ko izmanto, lai nosūtītu e-pastu dalībniekam jaunā abonēšanas ierakstā DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-pasta veidne, ko izmanto, lai nosūtītu e-pasta atgādinājumu, kad abonements drīz beigsies DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-pasta veidne, kas jāizmanto, lai nosūtītu e-pastu dalībniekam dalībnieka atcelšanas laikā +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion 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ībnieku adrešu lapām @@ -162,6 +170,7 @@ DocForLabels=Izveidot adrešu lapas SubscriptionPayment=Abonēšanas maksa LastSubscriptionDate=Pēdējā abonēšanas maksājuma datums LastSubscriptionAmount=Jaunākās abonēšanas summa +LastMemberType=Last Member type MembersStatisticsByCountries=Dalībnieku statistika pa valstīm MembersStatisticsByState=Dalībnieku statistika pēc štatiem/provincēm MembersStatisticsByTown=Dalībnieku statistika pa pilsētām @@ -177,7 +186,7 @@ MenuMembersStats=Statistika LastMemberDate=Pēdējā biedra datums LatestSubscriptionDate=Jaunākais piereģistrēšanās datums MemberNature=Dalībnieka raksturs -MembersNature=Nature of members +MembersNature=Locekļu raksturs Public=Informācija ir publiska NewMemberbyWeb=Jauns dalībnieks pievienots. Gaida apstiprinājumu NewMemberForm=Jauna dalībnieka forma diff --git a/htdocs/langs/lv_LV/modulebuilder.lang b/htdocs/langs/lv_LV/modulebuilder.lang index 04eba6b459c..223e15e547e 100644 --- a/htdocs/langs/lv_LV/modulebuilder.lang +++ b/htdocs/langs/lv_LV/modulebuilder.lang @@ -40,7 +40,7 @@ PageForCreateEditView=PHP lapa, lai izveidotu / rediģētu / skatītu ierakstu PageForAgendaTab=PHP lappuse notikumu cilnē PageForDocumentTab=PHP lapas cilnei PageForNoteTab=PHP lapa piezīmju cilnē -PageForContactTab=PHP page for contact tab +PageForContactTab=PHP lapa kontaktu cilnei PathToModulePackage=Ceļš uz moduļa / pieteikuma pakotnes rāvienu PathToModuleDocumentation=Ceļš uz moduļa / lietojumprogrammas dokumentācijas failu (%s) SpaceOrSpecialCharAreNotAllowed=Spaces vai speciālās rakstzīmes nav atļautas. @@ -106,7 +106,7 @@ TryToUseTheModuleBuilder=Ja jums ir zināšanas par SQL un PHP, jūs varat izman SeeTopRightMenu=Augšējā labajā izvēlnē skatiet <span class="fa fa-bug"></span> AddLanguageFile=Pievienot valodas failu YouCanUseTranslationKey=Šeit varat izmantot atslēgu, kas ir tulkošanas atslēga, kas tiek atrasta valodas failā (sk. Cilni "Valodas"). -DropTableIfEmpty=(Destroy table if empty) +DropTableIfEmpty=(Iznīcināt tabulu, ja tā ir tukša) TableDoesNotExists=Tabula %s neeksistē TableDropped=Tabula %s dzēsta InitStructureFromExistingTable=Veidojiet esošās tabulas struktūras masīva virkni @@ -133,11 +133,13 @@ IncludeDocGeneration=Es gribu no objekta ģenerēt dažus dokumentus IncludeDocGenerationHelp=Ja to atzīmēsit, tiks izveidots kāds kods, lai ierakstam pievienotu rūtiņu “Ģenerēt dokumentu”. ShowOnCombobox=Rādīt vērtību kombinētajā lodziņā KeyForTooltip=Rīka padoma atslēga -CSSClass=CSS klase +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Nav rediģējams ForeignKey=Sveša atslēga TypeOfFieldsHelp=Lauku tips: <br> varchar (99), double (24,8), real, text, html, datetime, timestamp, integer, integer: ClassName: reliapath / to / classfile.class.php [: 1 [: filter]] ('1' nozīmē mēs pievienojam pogu + pēc kombināta, lai izveidotu ierakstu; “filtrs” var būt “status = 1 UN fk_user = __USER_ID UN entītija (piemēram, __SHARED_ENTITIES__)”. AsciiToHtmlConverter=Ascii uz HTML pārveidotāju AsciiToPdfConverter=Ascii uz PDF pārveidotāju TableNotEmptyDropCanceled=Tabula nav tukša. Dzēšana tika atcelta. -ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. +ModuleBuilderNotAllowed=Moduļu veidotājs ir pieejams, bet nav atļauts jūsu lietotājam. diff --git a/htdocs/langs/lv_LV/orders.lang b/htdocs/langs/lv_LV/orders.lang index 1276c32c910..e7e3c67ade4 100644 --- a/htdocs/langs/lv_LV/orders.lang +++ b/htdocs/langs/lv_LV/orders.lang @@ -16,6 +16,8 @@ ToOrder=Veicot pasūtījumu MakeOrder=Veicot pasūtījumu SupplierOrder=Pirkuma pasūtījums SuppliersOrders=Pirkuma pasūtījumi +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Pašreizējie pirkumu pasūtījumi CustomerOrder=Pārdošanas pasūtījums CustomersOrders=Pārdošanas pasūtījumi diff --git a/htdocs/langs/lv_LV/other.lang b/htdocs/langs/lv_LV/other.lang index 73b65a6e40b..2a1d6e280fb 100644 --- a/htdocs/langs/lv_LV/other.lang +++ b/htdocs/langs/lv_LV/other.lang @@ -78,7 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Izdevumu pārskats apstiprināts (nepieciešams a Notify_EXPENSE_REPORT_APPROVE=Izdevumu pārskats ir apstiprināts Notify_HOLIDAY_VALIDATE=Atteikt pieprasījumu apstiprināt (nepieciešams apstiprinājums) Notify_HOLIDAY_APPROVE=Atvaļinājuma pieprasījums apstiprināts -Notify_ACTION_CREATE=Added action to Agenda +Notify_ACTION_CREATE=Pievienoja darbību dienaskārtībai SeeModuleSetup=See setup of module %s NbOfAttachedFiles=Skaits pievienotos failus / dokumentus TotalSizeOfAttachedFiles=Kopējais apjoms pievienotos failus / dokumentus @@ -114,6 +114,7 @@ DemoCompanyAll=Uzņēmums ar vairākām darbībām (visi galvenie moduļi) CreatedBy=Izveidoja %s ModifiedBy=Laboja %s ValidatedBy=Apstiprināja %s +SignedBy=Signed by %s ClosedBy=Slēdza %s CreatedById=Lietotāja id kurš izveidojis ModifiedById=Lietotāja id kurš veica pēdējās izmaiņas @@ -216,7 +217,7 @@ EMailTextExpenseReportValidated=Izdevumu pārskats %s ir pārbaudīts. EMailTextExpenseReportApproved=Izdevumu pārskats %s ir apstiprināts. EMailTextHolidayValidated=Atstāt pieprasījumu %s ir apstiprināta. EMailTextHolidayApproved=Atstāt pieprasījumu %s ir apstiprināts. -EMailTextActionAdded=The action %s has been added to the Agenda. +EMailTextActionAdded=Darbība %s ir pievienota darba kārtībai. ImportedWithSet=Ievešanas datu kopu DolibarrNotification=Automātiska paziņošana ResizeDesc=Ievadiet jaunu platumu <b>vai</b> jaunu augstumu. Attiecība būs jātur laikā izmēru maiņas ... @@ -244,6 +245,7 @@ NewKeyIs=Tas ir jūsu jaunās atslēgas, lai pieteiktos NewKeyWillBe=Jūsu jaunais galvenais, lai pieteiktos uz programmatūru, būs ClickHereToGoTo=Klikšķiniet šeit, lai dotos uz %s YouMustClickToChange=Jums ir Taču vispirms noklikšķiniet uz šīs saites, lai apstiprinātu šo paroles maiņa +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Ja Jums nav lūgt šīs izmaiņas, vienkārši aizmirst šo e-pastu. Jūsu akreditācijas dati tiek glabāti drošībā. IfAmountHigherThan=Ja summa pārsniedz <strong>%s </strong> SourcesRepository=Repository for sources @@ -261,7 +263,7 @@ ContactCreatedByEmailCollector=Kontaktpersona / adrese, ko izveidojis e-pasta ko ProjectCreatedByEmailCollector=Projekts, ko izveidojis e-pasta savācējs no e-pasta MSGID %s TicketCreatedByEmailCollector=Biļete, ko izveidojis e-pasta kolekcionārs no e-pasta MSGID %s OpeningHoursFormatDesc=Izmantojiet taustiņu -, lai nodalītu darba un aizvēršanas stundas. <br> Izmantojiet atstarpi, lai ievadītu dažādus diapazonus. <br> Piemērs: 8.-12 -PrefixSession=Prefix for session ID +PrefixSession=Sesijas ID prefikss ##### Export ##### ExportsArea=Eksportēšanas sadaļa diff --git a/htdocs/langs/lv_LV/productbatch.lang b/htdocs/langs/lv_LV/productbatch.lang index 88e5c429844..56a27a10ebc 100644 --- a/htdocs/langs/lv_LV/productbatch.lang +++ b/htdocs/langs/lv_LV/productbatch.lang @@ -1,24 +1,35 @@ # ProductBATCH language file - en_US - ProductBATCH -ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) -ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Jā +ManageLotSerial=Izmantot partijas / sērijas numuru +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) +ProductStatusNotOnBatch=Nav (partija / sērijas numurs netiek izmantots) +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nē -Batch=Lot/Serial +Batch=Lot/seriāls atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number batch_number=Partijas/sērijas numurs BatchNumberShort=Partija/Sērijas numurs -EatByDate=Eat-by date -SellByDate=Sell-by date +EatByDate=Derīguma termiņš +SellByDate=Derīguma termiņš DetailBatchNumber=Lot/Serial details printBatch=Lot/Serial: %s printEatby=Eat-by: %s -printSellby=Sell-by: %s +printSellby=Pārdeva: %s printQty=Daudz.: %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. +WhenProductBatchModuleOnOptionAreForced=Kad modulis Lot / Serial ir ieslēgts, automātiskais krājumu samazinājums ir spiests "Samazināt reālo krājumus kuģošanas apstiprinājumā", un automātiskais palielināšanas režīms ir spiests "Palielināt reālos krājumus, manuāli nosūtīt uz noliktavām" un tos nevar rediģēt. Citas iespējas var definēt pēc vajadzības. 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 +ProductLotSetup=Moduļu partijas / sērijas uzstādīšana +ShowCurrentStockOfLot=Parādīt pašreizējo krājumu par pāris produktu / partiju +ShowLogOfMovementIfLot=Rādīt žurnālu par kustību pāriem produktam / partijai +StockDetailPerBatch=Krājumu dati par partiju +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/lv_LV/products.lang b/htdocs/langs/lv_LV/products.lang index 575c475d3b8..9341d32b295 100644 --- a/htdocs/langs/lv_LV/products.lang +++ b/htdocs/langs/lv_LV/products.lang @@ -108,8 +108,8 @@ 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 -AssociatedProductsAbility=Enable Kits (set of several products) -VariantsAbility=Enable Variants (variations of products, for example color, size) +AssociatedProductsAbility=Iespējot komplektus (vairāku produktu komplekts) +VariantsAbility=Iespējot variantus (produktu variācijas, piemēram, krāsa, izmērs) AssociatedProducts=Komplekti AssociatedProductsNumber=Produktu skaits, kas veido šo komplektu ParentProductsNumber=Number of parent packaging product @@ -141,6 +141,7 @@ VATRateForSupplierProduct=PVN likme (šim pārdevējam / produktam) DiscountQtyMin=Atlaide šim daudzumam. NoPriceDefinedForThisSupplier=Šim pārdevējam / produktam nav noteikta cena / daudzums NoSupplierPriceDefinedForThisProduct=Šim produktam nav noteikta pārdevēja cena / daudzums +PredefinedItem=Predefined item PredefinedProductsToSell=Iepriekš definēts produkts PredefinedServicesToSell=Iepriekš definēts pakalpojums PredefinedProductsAndServicesToSell=Iepriekš definēti produkti/pakalpojumi, kurus pārdot @@ -168,10 +169,10 @@ BuyingPrices=Iepirkšanas cenas CustomerPrices=Klienta cenas SuppliersPrices=Pārdevēja cenas SuppliersPricesOfProductsOrServices=Pārdevēja cenas (produktiem vai pakalpojumiem) -CustomCode=Customs|Commodity|HS code +CustomCode=Muita | prece | HS kods CountryOrigin=Izcelsmes valsts -RegionStateOrigin=Region origin -StateOrigin=State|Province origin +RegionStateOrigin=Reģiona izcelsme +StateOrigin=Valsts | Provinces izcelsme Nature=Produkta veids (materiāls / gatavs) NatureOfProductShort=Produkta veids NatureOfProductDesc=Izejviela vai gatavais produkts @@ -242,7 +243,7 @@ AlwaysUseFixedPrice=Izmantot fiksētu cenu PriceByQuantity=Dažādas cenas apjomam DisablePriceByQty=Atspējot cenas pēc daudzuma PriceByQuantityRange=Daudzuma diapazons -MultipriceRules=Automatic prices for segment +MultipriceRules=Automātiskas cenas segmentam UseMultipriceRules=Izmantojiet cenu segmenta noteikumus (definēti produktu moduļa iestatījumos), lai automātiski aprēķinātu visu pārējo segmentu cenas saskaņā ar pirmo segmentu PercentVariationOver=%% variation over %s PercentDiscountOver=%% discount over %s @@ -290,7 +291,7 @@ PriceExpressionEditorHelp5=Available global values: PriceMode=Cenas veids PriceNumeric=Numurs DefaultPrice=Noklusējuma cena -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Iepriekšējo noklusēto cenu žurnāls ComposedProductIncDecStock=Increase/Decrease stock on parent change ComposedProduct=Apakš produkti MinSupplierPrice=Minimālā iepirkuma cena @@ -313,7 +314,7 @@ LastUpdated=Pēdējo reizi atjaunots CorrectlyUpdated=Pareizi atjaunināts PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Izvēlieties PDF failus -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Noklusējuma cena, reālā cena var būt atkarīga no klienta WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Vienība diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index d33723cf2ac..ca93cb7043e 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -85,10 +85,11 @@ ProgressCalculated=Progress patēriņa jomā WhichIamLinkedTo=ar kuru esmu saistīts WhichIamLinkedToProject=kuru esmu piesaistījis projektam Time=Laiks -TimeConsumed=Consumed +TimeConsumed=Patērēts ListOfTasks=Uzdevumu saraksts GoToListOfTimeConsumed=Pāriet uz patērētā laika sarakstu GanttView=Ganta skats +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Ar projektu saistīto komerciālo priekšlikumu saraksts ListOrdersAssociatedProject=Ar projektu saistīto pārdošanas pasūtījumu saraksts ListInvoicesAssociatedProject=Saraksts ar klienta rēķiniem, kas saistīti ar projektu @@ -268,3 +269,7 @@ OneLinePerTask=Viena rinda katram uzdevumam OneLinePerPeriod=Viena rindiņa vienam periodam RefTaskParent=Ref. Vecāku uzdevums ProfitIsCalculatedWith=Peļņa tiek aprēķināta, izmantojot +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/lv_LV/propal.lang b/htdocs/langs/lv_LV/propal.lang index 7ae48a997c1..868562cdf15 100644 --- a/htdocs/langs/lv_LV/propal.lang +++ b/htdocs/langs/lv_LV/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Nosūtīt komerciālo priekšlikumu pa pastu DatePropal=Priekšlikuma datums DateEndPropal=Derīguma beigu datums ValidityDuration=Derīguma termiņš -CloseAs=Iestatīt statusu uz SetAcceptedRefused=Iestatījums ir pieņemts / noraidīts ErrorPropalNotFound=Piedāvājums %s nav atrasts AddToDraftProposals=Pievienot pie priekšlikuma projektā @@ -60,6 +59,7 @@ ConfirmClonePropal=Vai tiešām vēlaties klonēt komerciālo priekšlikumu <b> ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial priekšlikumu un līnijas ProposalLine=Priekšlikuma līnija +ProposalLines=Proposal lines AvailabilityPeriod=Pieejamība kavēšanās SetAvailability=Uzstādīt pieejamību kavēšanos AfterOrder=pēc pasūtījuma @@ -85,3 +85,8 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature ProposalsStatisticsSuppliers=Pārdevēja priekšlikumi statistikai CaseFollowedBy=Lieta seko SignedOnly=Tikai parakstīts +IdProposal=Priekšlikuma ID +IdProduct=Produkta ID +PrParentLine=Priekšlikuma vecāku līnija +LineBuyPriceHT=Pirkt cenu Summa bez nodokļiem līnijai + diff --git a/htdocs/langs/lv_LV/stocks.lang b/htdocs/langs/lv_LV/stocks.lang index 91412191b93..2f36be754a0 100644 --- a/htdocs/langs/lv_LV/stocks.lang +++ b/htdocs/langs/lv_LV/stocks.lang @@ -19,8 +19,8 @@ Stock=Krājums Stocks=Krājumi MissingStocks=Trūkst krājumu StockAtDate=Krājumi datumā -StockAtDateInPast=Datums pagātnē -StockAtDateInFuture=Datums nākotnē +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Krājumi pēc partijas/sērijas LotSerial=Daudz / sērijas nr LotSerialList=Partijas saraksts / sērijas nr @@ -34,11 +34,11 @@ 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 negative stock with undefined desired stock +IncludeEmptyDesiredStock=Iekļaujiet arī negatīvo krājumu ar nenoteiktu vēlamo krājumu IncludeAlsoDraftOrders=Iekļaujiet arī pasūtījumu projektus Location=Vieta -LocationSummary=Īsais atrašanās vietas nosaukums -NumberOfDifferentProducts=Dažādu produktu skaits +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Kopējais produktu skaits LastMovement=Pēdējā pārvietošana LastMovements=Pēdējās pārvietošanas @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Noliktavas vērtība UserWarehouseAutoCreate=Lietotāja noliktavas izveide, izveidojot lietotāju AllowAddLimitStockByWarehouse=Pārvaldiet arī minimālā un vēlamā krājuma vērtību pārī (produkta noliktava), papildus minimālā un vēlamā krājuma vērtībai vienam produktam RuleForWarehouse=Noteikumi noliktavām -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Iestatiet noliktavu pārdošanas pasūtījumiem UserDefaultWarehouse=Iestatiet noliktavu lietotājiem MainDefaultWarehouse=Noklusētā noliktava @@ -97,15 +98,16 @@ RealStockDesc=Fiziskā / reālā krājumi ir krājumi, kas pašlaik atrodas noli RealStockWillAutomaticallyWhen=Reālais krājums tiks mainīts saskaņā ar šo noteikumu (kā noteikts Stock modulī): VirtualStock=Virtuālie krājumi 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 +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished 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.) +AtDate=At date 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ē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ā. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Pārdošanas Vienības cena EstimatedStockValueSellShort=Pārdošanas cena EstimatedStockValueSell=Pārdošanas cena @@ -123,9 +125,9 @@ DesiredStockDesc=Šī krājuma summa būs vērtība, ko izmanto krājumu papildi StockToBuy=Lai pasūtītu Replenishment=Papildinājums ReplenishmentOrders=Papildināšanas pasūtījumus -VirtualDiffersFromPhysical=According to increase/decrease stock options, physical stock and virtual stock (physical stock + open orders) may differ -UseRealStockByDefault=Use real stock, instead of virtual stock, for replenishment feature -ReplenishmentCalculation=Amount to order will be (desired quantity - real stock) instead of (desired quantity - virtual stock) +VirtualDiffersFromPhysical=Saskaņā ar akciju opciju palielināšanu / samazināšanu fiziskais krājums un virtuālais krājums (fiziskais krājums + atvērtie pasūtījumi) var atšķirties +UseRealStockByDefault=Papildināšanas funkcijai izmantojiet reālo krājumu, nevis virtuālos krājumus +ReplenishmentCalculation=Pasūtījuma summa būs (vēlamais daudzums - reālais krājums), nevis (vēlamais daudzums - virtuālais krājums) UseVirtualStock=Izmantot virtuālu noliktavu UsePhysicalStock=Izmantot reālu noliktavu CurentSelectionMode=Pašreizējais izvēles režīms @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Ierakstīt pārvietošanu ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Krājumu pārvietošana saglabāta @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Krājumu līmenim ir jābūt pietiekamam, lai produk StockMustBeEnoughForOrder=Krājuma līmenim ir jābūt pietiekamam, lai produktu / pakalpojumu pasūtītam pēc pasūtījuma (pārbaudiet, vai pašreizējā reālā krājumā tiek pievienota rinda, lai kāds būtu noteikums automātiskai krājumu maiņai). StockMustBeEnoughForShipment= Krājumu līmenim ir jābūt pietiekamam, lai produktu / pakalpojumu nosūtītu sūtījumam (pārbaudiet pašreizējo reālo krājumu, pievienojot līniju sūtījumā neatkarīgi no automātiskās krājumu maiņas) MovementLabel=Kustības marķējums -TypeMovement=Kustības veids +TypeMovement=Direction of movement DateMovement=Pārvietošanas datums InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Izveidot jaunu inventāru inventoryReadPermission=Skatīt krājumus inventoryWritePermission=Atjaunināt krājumus inventoryValidatePermission=Pārbaudīt inventāru +inventoryDeletePermission=Delete inventory inventoryTitle=Inventārs inventoryListTitle=Inventāri inventoryListEmpty=Netiek veikta neviena inventarizācija @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Lai izvēlētos izmantojamo partiju, ir nep 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ē +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Pašreizējais krājums InventoryRealQtyHelp=Iestatiet vērtību 0, lai atiestatītu daudzumu <br>. Saglabājiet lauku tukšu vai noņemiet līniju, lai paliktu nemainīgs -UpdateByScaning=Atjauniniet, skenējot +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Atjaunināšana, skenējot (produkta svītrkods) UpdateByScaningLot=Atjaunināt, skenējot (partija | sērijas svītrkods) -DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +DisableStockChangeOfSubProduct=Deaktivizējiet krājumu maiņu visiem šī komplekta apakšproduktiem šīs kustības laikā. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Atvērt pa jaunu +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/lv_LV/suppliers.lang b/htdocs/langs/lv_LV/suppliers.lang index 622db59bf5d..e4a2d1ba3df 100644 --- a/htdocs/langs/lv_LV/suppliers.lang +++ b/htdocs/langs/lv_LV/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Pārdevēji SuppliersInvoice=Piegādātāja rēķins +SupplierInvoices=Piegādātāja rēķini ShowSupplierInvoice=Rādīt piegādātāja rēķinu NewSupplier=Jauns pārdevējs History=Vēsture @@ -38,7 +39,7 @@ MenuOrdersSupplierToBill=Pirkuma pasūtījumi rēķinam NbDaysToDelivery=Piegādes termiņš (dienas) DescNbDaysToDelivery=Šī pasūtījuma produktu ilgākais piegādes termiņš SupplierReputation=Pārdevēja reputācija -ReferenceReputation=Reference reputation +ReferenceReputation=Atsauces reputācija DoNotOrderThisProductToThisSupplier=Nepasūtīt NotTheGoodQualitySupplier=Zemas kvalitātes ReputationForThisProduct=Reputācija diff --git a/htdocs/langs/lv_LV/ticket.lang b/htdocs/langs/lv_LV/ticket.lang index 43c18d15509..1b104899e32 100644 --- a/htdocs/langs/lv_LV/ticket.lang +++ b/htdocs/langs/lv_LV/ticket.lang @@ -70,6 +70,8 @@ Deleted=Dzēsts # Dict Type=Veids Severity=Smagums +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Lai nosūtītu e-pastu no pieteikuma @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Parādiet moduļa logotipi publiskajā saskarnē TicketsShowModuleLogoHelp=Iespējojiet šo opciju, lai slēptu logotipa moduli publiskās saskarnes lapās TicketsShowCompanyLogo=Parādīt uzņēmuma logotipi publiskā saskarnē TicketsShowCompanyLogoHelp=Iespējojiet šo opciju, lai slēptu galvenā uzņēmuma logotipi publiskās saskarnes lapās -TicketsEmailAlsoSendToMainAddress=Arī nosūtiet paziņojumu uz galveno e-pasta adresi -TicketsEmailAlsoSendToMainAddressHelp=Iespējojiet šo opciju, lai nosūtītu e-pastu uz adresi "Paziņojuma e-pasta adrese" (skatiet iestatījumu zemāk). +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Ierobežot displeju līdz pašreizējam lietotājam piešķirtajām biļetēm (nav efektīvs ārējiem lietotājiem, vienmēr ierobežojiet to ar trešo personu, kurai tie ir atkarīgi) TicketsLimitViewAssignedOnlyHelp=Tiks redzamas tikai pašreizējam lietotājam piešķirtās biļetes. Neattiecas uz lietotāju ar biļešu pārvaldīšanas tiesībām. TicketsActivatePublicInterface=Aktivizēt publisko saskarni @@ -123,13 +125,13 @@ TicketsActivatePublicInterfaceHelp=Publiskā saskarne ļauj apmeklētājiem izve TicketsAutoAssignTicket=Automātiski piešķirt lietotāju, kas izveidojis biļeti TicketsAutoAssignTicketHelp=Veidojot biļeti, lietotājs var automātiski piešķirt biļeti. TicketNumberingModules=Čeku numerācijas modulis -TicketsModelModule=Document templates for tickets +TicketsModelModule=Biļešu dokumentu veidnes TicketNotifyTiersAtCreation=Paziņot trešajai pusei radīšanas laikā 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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) TicketPublicNotificationNewMessageDefaultEmail=Paziņojumu e-pasts adresātam (atjaunināt) -TicketPublicNotificationNewMessageDefaultEmailHelp=Sūtiet pa e-pastu jaunu ziņojumu paziņojumus uz šo adresi, ja biļetei nav piešķirts lietotājs vai lietotājam nav e-pasta. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Jaunākie labotie pieteikumi BoxLastModifiedTicketDescription=Jaunākās %s lanbotās biļetes BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Nav nesen labotu pieteikumu +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/lv_LV/users.lang b/htdocs/langs/lv_LV/users.lang index ad46b5bbf5a..a654848e06a 100644 --- a/htdocs/langs/lv_LV/users.lang +++ b/htdocs/langs/lv_LV/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=Lietotāji un to īpašības DomainUser=Domēna lietotājs %s Reactivate=Aktivizēt CreateInternalUserDesc=Šī veidlapa ļauj izveidot iekšējo lietotāju savā uzņēmumā/organizācijā. Lai izveidotu ārēju lietotāju (klientu, pārdevēju utt.), Izmantojiet trešās puses kontakta kartītes pogu “Izveidot Dolibarr lietotāju”. -InternalExternalDesc=<b> iekšējais </b> lietotājs ir lietotājs, kas ietilpst jūsu uzņēmumā / organizācijā. <br> <b> ārējais </b> lietotājs ir klients, pārdevējs vai cits (Ārēja lietotāja izveidošanu trešai personai var veikt no trešās puses kontaktu ieraksta). <br> <br> Abos gadījumos atļaujas nosaka tiesības uz Dolibarr, arī ārējam lietotājam var būt atšķirīgs izvēlnes pārvaldnieks nekā iekšējam lietotājam (sk. Sākums - Iestatīšana - Displejs). +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Atļauja piešķirta, jo mantojis no viena lietotāja grupai. Inherited=Iedzimta UserWillBe=Izveidotais lietotājs būs diff --git a/htdocs/langs/lv_LV/website.lang b/htdocs/langs/lv_LV/website.lang index 42971c9e293..af85a06422d 100644 --- a/htdocs/langs/lv_LV/website.lang +++ b/htdocs/langs/lv_LV/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Piemērs izmantošanai Apache virtuālā resursdatora iestatīšanā: YouCanAlsoTestWithPHPS=<u> Izmantojiet ar PHP serveri. </u> <br> Izstrādājot vidi, jūs varat izvēlēties testēt vietni ar PHP tīmekļa serveri (nepieciešams PHP 5.5), palaižot <br><strong> php -S 0.0. 0.0 8080-t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Izmantojiet savu vietni kopā ar citu Dolibarr mitināšanas pakalpojumu sniedzēju</u> <br> Ja jums nav pieejams tāds interneta serveris kā Apache vai NGinx, varat eksportēt un importēt savu vietni citā Dolibarr instancē, kuru nodrošina cits Dolibarr mitināšanas pakalpojumu sniedzējs un kas nodrošina pilnīgu integrāciju ar vietnes moduli. Dažu Dolibarr mitināšanas pakalpojumu sniedzēju sarakstu varat atrast vietnē <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Pārbaudiet arī to, vai virtuālajam serverim ir atļauja <strong>%s</strong> failiem vietnē <br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Lasīt WritePerm=Rakstīt TestDeployOnWeb=Pārbaudiet / izvietojiet tīmeklī PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u> Priekšskatīt %s jaunā cilnē. </ u> <br> <br> Dolibarr serveris izsniegs %s, tāpēc tam nevajadzēs instalēt papildu tīmekļa serveri (piemēram, Apache, Nginx, IIS). < br> Nelabvēlīgi ir tas, ka lapu URL nav lietotājam draudzīgs un sākas ar jūsu Dolibarr ceļu. <br> URL, ko izsniedz Dolibarr: <br> <strong> %s </ strong> <br> <br> Lai izmantotu savu ārējais tīmekļa serveris, kas kalpo šai vietnei, izveido virtuālo saimniekdatoru savā tīmekļa serverī, kas norādīts direktorijā <br> <strong> %s </ strong> <br>, pēc tam ievadiet šī virtuālā servera nosaukumu un noklikšķiniet uz citas priekšskatījuma pogas . +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=Virtuālā resursdatora adrese, kuru apkalpo ārējs tīmekļa serveris, nav definēts NoPageYet=Vēl nav nevienas lapas YouCanCreatePageOrImportTemplate=Jūs varat izveidot jaunu lapu vai importēt pilnu vietnes veidni @@ -100,7 +100,7 @@ EmptyPage=Tukša lapa ExternalURLMustStartWithHttp=Ārējam URL ir jāsākas ar http: // vai https: // ZipOfWebsitePackageToImport=Augšupielādējiet vietnes veidņu pakotnes ZIP failu ZipOfWebsitePackageToLoad=vai izvēlieties pieejamo iegultās vietnes veidņu paketi -ShowSubcontainers=Show dynamic content +ShowSubcontainers=Rādīt dinamisko saturu InternalURLOfPage=Lapas iekšējais URL ThisPageIsTranslationOf=Šī lapa / konteiners ir tulkojums ThisPageHasTranslationPages=Šajā lapā / konteinerā ir tulkojums @@ -135,5 +135,13 @@ RSSFeed=RSS barotne RSSFeedDesc=Izmantojot šo URL, varat iegūt RSS plūsmu no jaunākajiem rakstiem ar veidu “blogpost” PagesRegenerated=reģenerēta %s lapa (s) / konteiners (-i) RegenerateWebsiteContent=Atjaunojiet tīmekļa vietnes kešatmiņas failus -AllowedInFrames=Allowed in Frames -DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +AllowedInFrames=Atļauts rāmjos +DefineListOfAltLanguagesInWebsiteProperties=Vietņu rekvizītos definējiet visu pieejamo valodu sarakstu. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/lv_LV/zapier.lang b/htdocs/langs/lv_LV/zapier.lang index 01aa75944cb..c524a9afb6f 100644 --- a/htdocs/langs/lv_LV/zapier.lang +++ b/htdocs/langs/lv_LV/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier priekš Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Par zapier Dolibarr moduli - -# -# Admin page -# -ZapierForDolibarrSetup = Zapier iestatīšana Dolibarr -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Zapier iestatīšana Dolibarr +ZapierDescription=Saskarne ar Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/mk_MK/accountancy.lang b/htdocs/langs/mk_MK/accountancy.lang index 9940d0fea92..ea5914defc9 100644 --- a/htdocs/langs/mk_MK/accountancy.lang +++ b/htdocs/langs/mk_MK/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index b6770cce1bb..95637c0e773 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Производи @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/mk_MK/banks.lang b/htdocs/langs/mk_MK/banks.lang index 17caf495566..8763554c1a2 100644 --- a/htdocs/langs/mk_MK/banks.lang +++ b/htdocs/langs/mk_MK/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/mk_MK/bills.lang b/htdocs/langs/mk_MK/bills.lang index 1391d39e8e9..998873668db 100644 --- a/htdocs/langs/mk_MK/bills.lang +++ b/htdocs/langs/mk_MK/bills.lang @@ -52,11 +52,12 @@ Invoices=Фактури InvoiceLine=Invoice line InvoiceCustomer=Фактура на клиент CustomerInvoice=Фактура на клиент -CustomersInvoices=Customers invoices +CustomersInvoices=Фактури на клиенти SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Фактури на добавувачи +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Фактури на добавувачи Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/mk_MK/boxes.lang b/htdocs/langs/mk_MK/boxes.lang index 36416e0f36c..00aa55643c7 100644 --- a/htdocs/langs/mk_MK/boxes.lang +++ b/htdocs/langs/mk_MK/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Информации за логирање BoxLastRssInfos=RSS информација BoxLastProducts=Најнови %s Производи / Услуги @@ -17,9 +18,13 @@ BoxLastActions=Најнови активности BoxLastContracts=Најнови договори BoxLastContacts=Најнови контакти/адреси BoxLastMembers=Најнови членови +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Најнови интервенции BoxCurrentAccounts=Состојба на сметка BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Најнови %s новости од %s BoxTitleLastProducts=Производи/Услуги: најнови %sизменети BoxTitleProductsAlertStock=Производи: предупредување за залиха @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Сметководство +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/mk_MK/categories.lang b/htdocs/langs/mk_MK/categories.lang index 52327db3510..cb184028464 100644 --- a/htdocs/langs/mk_MK/categories.lang +++ b/htdocs/langs/mk_MK/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/mk_MK/companies.lang b/htdocs/langs/mk_MK/companies.lang index 2d27d1b69a4..08beacc3f25 100644 --- a/htdocs/langs/mk_MK/companies.lang +++ b/htdocs/langs/mk_MK/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/mk_MK/compta.lang b/htdocs/langs/mk_MK/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/mk_MK/compta.lang +++ b/htdocs/langs/mk_MK/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/mk_MK/ecm.lang b/htdocs/langs/mk_MK/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/mk_MK/ecm.lang +++ b/htdocs/langs/mk_MK/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/mk_MK/errors.lang b/htdocs/langs/mk_MK/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/mk_MK/errors.lang +++ b/htdocs/langs/mk_MK/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/mk_MK/externalsite.lang b/htdocs/langs/mk_MK/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/mk_MK/externalsite.lang +++ b/htdocs/langs/mk_MK/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/mk_MK/main.lang b/htdocs/langs/mk_MK/main.lang index 5f2722a96ff..4eeeea5c4d3 100644 --- a/htdocs/langs/mk_MK/main.lang +++ b/htdocs/langs/mk_MK/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Корисници SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Доделен на Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/mk_MK/margins.lang b/htdocs/langs/mk_MK/margins.lang index b9d52dcfdc6..cfce89ab23e 100644 --- a/htdocs/langs/mk_MK/margins.lang +++ b/htdocs/langs/mk_MK/margins.lang @@ -1,44 +1,45 @@ # Dolibarr language file - Source file is en_US - marges -Margin=Margin -Margins=Margins -TotalMargin=Total Margin -MarginOnProducts=Margin / Products -MarginOnServices=Margin / Services -MarginRate=Margin rate +Margin=Маргина +Margins=Маргини +TotalMargin=Вкупна Маргина +MarginOnProducts=Маргина / Производи +MarginOnServices=Маргина / Услуги +MarginRate=Стапка на маргина 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 -UserMargins=User margins -ProductService=Product or Service -AllProducts=All products and services -ChooseProduct/Service=Choose product or service +InputPrice=Влезна цена +margin=Управување со профитните маржи (маргини) +margesSetup=Подесување за профитните маргини +MarginDetails=Детали за маргините +ProductMargins=Маргина на производ +CustomerMargins=Маргина на клиент +SalesRepresentativeMargins=Маргина на продажен агент +ContactOfInvoice=Contact of invoice +UserMargins=Маргина на корисник +ProductService=Производ или Услуга +AllProducts=Сите Производи и Услуги +ChooseProduct/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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts -UseDiscountAsProduct=As a product -UseDiscountAsService=As a service -UseDiscountOnTotal=On subtotal +UseDiscountAsProduct=Како Производ +UseDiscountAsService=Како Услуга +UseDiscountOnTotal=На СУБТОТАЛ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 -CostPrice=Cost price +MargeType3=Маргина на Цената на чинење +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Цена на чинење 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 sale representative -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 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). +AgentContactType=Тип на контакт за комерцијалист +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=Стапката мора да биде нумеричка вредност +markRateShouldBeLesserThan100=Стапката на ознака треба да биде помала од 100 +ShowMarginInfos=Покажи информации за Маргина +CheckMargins=Детали за Маргините +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). diff --git a/htdocs/langs/mk_MK/members.lang b/htdocs/langs/mk_MK/members.lang index 3f292176083..e83f0e44759 100644 --- a/htdocs/langs/mk_MK/members.lang +++ b/htdocs/langs/mk_MK/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Список на предлог-членови (што тр MembersListValid=Листа на валидни членови MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Листа на исклучени членови MembersListQualified=Листа на квалификувани членови MenuMembersToValidate=Предлог членови MenuMembersValidated=Валидни членови +MenuMembersExcluded=Excluded members MenuMembersResiliated=Исклучени членови MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Истечена претплата MemberStatusActiveLateShort=Истечен MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Исклучен член MemberStatusResiliatedShort=Исклучен MembersStatusToValid=Предлог членови +MembersStatusExcluded=Excluded members MembersStatusResiliated=Исклучени членови MemberStatusNoSubscription=Потврдено (нема потреба од претплата) MemberStatusNoSubscriptionShort=Валидирано @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/mk_MK/modulebuilder.lang b/htdocs/langs/mk_MK/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/mk_MK/modulebuilder.lang +++ b/htdocs/langs/mk_MK/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/mk_MK/orders.lang b/htdocs/langs/mk_MK/orders.lang index e4280056461..6486bfe423d 100644 --- a/htdocs/langs/mk_MK/orders.lang +++ b/htdocs/langs/mk_MK/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/mk_MK/other.lang b/htdocs/langs/mk_MK/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/mk_MK/other.lang +++ b/htdocs/langs/mk_MK/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/mk_MK/productbatch.lang b/htdocs/langs/mk_MK/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/mk_MK/productbatch.lang +++ b/htdocs/langs/mk_MK/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/mk_MK/products.lang b/htdocs/langs/mk_MK/products.lang index 6deddbe7334..9b980716330 100644 --- a/htdocs/langs/mk_MK/products.lang +++ b/htdocs/langs/mk_MK/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/mk_MK/propal.lang b/htdocs/langs/mk_MK/propal.lang index 93d5926a7bb..efc76e36c4a 100644 --- a/htdocs/langs/mk_MK/propal.lang +++ b/htdocs/langs/mk_MK/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/mk_MK/stocks.lang b/htdocs/langs/mk_MK/stocks.lang index 2b36b21b77a..d5de0203ece 100644 --- a/htdocs/langs/mk_MK/stocks.lang +++ b/htdocs/langs/mk_MK/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/mk_MK/suppliers.lang b/htdocs/langs/mk_MK/suppliers.lang index 2e78526a9ed..4e7cb54ca03 100644 --- a/htdocs/langs/mk_MK/suppliers.lang +++ b/htdocs/langs/mk_MK/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Фактури на добавувачи ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/mk_MK/ticket.lang b/htdocs/langs/mk_MK/ticket.lang index 8b74414e186..5b6dab8eefd 100644 --- a/htdocs/langs/mk_MK/ticket.lang +++ b/htdocs/langs/mk_MK/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/mk_MK/users.lang b/htdocs/langs/mk_MK/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/mk_MK/users.lang +++ b/htdocs/langs/mk_MK/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/mk_MK/website.lang b/htdocs/langs/mk_MK/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/mk_MK/website.lang +++ b/htdocs/langs/mk_MK/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/mk_MK/zapier.lang b/htdocs/langs/mk_MK/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/mk_MK/zapier.lang +++ b/htdocs/langs/mk_MK/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/mn_MN/accountancy.lang b/htdocs/langs/mn_MN/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/mn_MN/accountancy.lang +++ b/htdocs/langs/mn_MN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/mn_MN/admin.lang b/htdocs/langs/mn_MN/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/mn_MN/admin.lang +++ b/htdocs/langs/mn_MN/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/mn_MN/banks.lang b/htdocs/langs/mn_MN/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/mn_MN/banks.lang +++ b/htdocs/langs/mn_MN/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/mn_MN/bills.lang b/htdocs/langs/mn_MN/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/mn_MN/bills.lang +++ b/htdocs/langs/mn_MN/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/mn_MN/boxes.lang b/htdocs/langs/mn_MN/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/mn_MN/boxes.lang +++ b/htdocs/langs/mn_MN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/mn_MN/categories.lang b/htdocs/langs/mn_MN/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/mn_MN/categories.lang +++ b/htdocs/langs/mn_MN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/mn_MN/companies.lang b/htdocs/langs/mn_MN/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/mn_MN/companies.lang +++ b/htdocs/langs/mn_MN/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/mn_MN/compta.lang b/htdocs/langs/mn_MN/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/mn_MN/compta.lang +++ b/htdocs/langs/mn_MN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/mn_MN/ecm.lang b/htdocs/langs/mn_MN/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/mn_MN/ecm.lang +++ b/htdocs/langs/mn_MN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/mn_MN/errors.lang b/htdocs/langs/mn_MN/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/mn_MN/errors.lang +++ b/htdocs/langs/mn_MN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/mn_MN/externalsite.lang b/htdocs/langs/mn_MN/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/mn_MN/externalsite.lang +++ b/htdocs/langs/mn_MN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/mn_MN/main.lang b/htdocs/langs/mn_MN/main.lang index 5cf9981a8a0..888daf47649 100644 --- a/htdocs/langs/mn_MN/main.lang +++ b/htdocs/langs/mn_MN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/mn_MN/margins.lang b/htdocs/langs/mn_MN/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/mn_MN/margins.lang +++ b/htdocs/langs/mn_MN/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/mn_MN/members.lang b/htdocs/langs/mn_MN/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/mn_MN/members.lang +++ b/htdocs/langs/mn_MN/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/mn_MN/modulebuilder.lang b/htdocs/langs/mn_MN/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/mn_MN/modulebuilder.lang +++ b/htdocs/langs/mn_MN/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/mn_MN/orders.lang b/htdocs/langs/mn_MN/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/mn_MN/orders.lang +++ b/htdocs/langs/mn_MN/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/mn_MN/other.lang b/htdocs/langs/mn_MN/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/mn_MN/other.lang +++ b/htdocs/langs/mn_MN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/mn_MN/productbatch.lang b/htdocs/langs/mn_MN/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/mn_MN/productbatch.lang +++ b/htdocs/langs/mn_MN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/mn_MN/products.lang b/htdocs/langs/mn_MN/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/mn_MN/products.lang +++ b/htdocs/langs/mn_MN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/mn_MN/projects.lang b/htdocs/langs/mn_MN/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/mn_MN/projects.lang +++ b/htdocs/langs/mn_MN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/mn_MN/propal.lang b/htdocs/langs/mn_MN/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/mn_MN/propal.lang +++ b/htdocs/langs/mn_MN/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/mn_MN/stocks.lang b/htdocs/langs/mn_MN/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/mn_MN/stocks.lang +++ b/htdocs/langs/mn_MN/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/mn_MN/suppliers.lang b/htdocs/langs/mn_MN/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/mn_MN/suppliers.lang +++ b/htdocs/langs/mn_MN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/mn_MN/ticket.lang b/htdocs/langs/mn_MN/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/mn_MN/ticket.lang +++ b/htdocs/langs/mn_MN/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/mn_MN/users.lang b/htdocs/langs/mn_MN/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/mn_MN/users.lang +++ b/htdocs/langs/mn_MN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/mn_MN/website.lang b/htdocs/langs/mn_MN/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/mn_MN/website.lang +++ b/htdocs/langs/mn_MN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/mn_MN/zapier.lang b/htdocs/langs/mn_MN/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/mn_MN/zapier.lang +++ b/htdocs/langs/mn_MN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/nb_NO/accountancy.lang b/htdocs/langs/nb_NO/accountancy.lang index bc97267e787..df6bcaaf778 100644 --- a/htdocs/langs/nb_NO/accountancy.lang +++ b/htdocs/langs/nb_NO/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bundne fakturalinjer ExpenseReportLines=Utgiftsrapport-linjer som skal bindes ExpenseReportLinesDone=Bundne utgiftsrapport-linjer IntoAccount=Bind linje med regnskapskonto -TotalForAccount=Totalt for regnskapskonto +TotalForAccount=Antall regnskapskonti Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journaletikett NumPiece=Del nummer TransactionNumShort=Transaksjonsnummer -AccountingCategory=Personlige grupper +AccountingCategory=Custom group GroupByAccountAccounting=Gruppere etter hovedbokskonto GroupBySubAccountAccounting=Gruppere etter sub-hovedbokskonto AccountingAccountGroupsDesc=Her kan du definere noen grupper regnskapskonti. De vil bli brukt til personlige regnskapsrapporter. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Linjer som ennå ikke er bundet, bruk menyen <a href= ## Import ImportAccountingEntries=Regnskapsposter +ImportAccountingEntriesFECFormat=Regnskapsoppføringer - FEC-format +FECFormatJournalCode=Kodejournal (JournalCode) +FECFormatJournalLabel=Etikettjournal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Dato eksport WarningReportNotReliable=Advarsel, denne rapporten er ikke basert på hovedboken, så den inneholder ikke transaksjoner endret manuelt i hovedboken. Hvis journaliseringen din er oppdatert, er bokføringsvisningen mer nøyaktig. ExpenseReportJournal=Utgiftsrapport-journal InventoryJournal=Inventar-journal + +NAccounts=%s accounts diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index a839e55d031..61da8abc721 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Fjern forbindelseslås YourSession=Din økt Sessions=Brukers økter WebUserGroup=Webserver bruker/gruppe +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Tillatelser for filer i rotkatalogen på web PermissionsOnFile=Tillatelser på fil %s NoSessionFound=Din PHP-konfigurasjon ser ut til å ikke tillate oppføring av aktive økter. Mappen som brukes til å lagre økter (<b> %s </b>) kan være beskyttet (for eksempel av operativsystemer eller ved hjelp av PHP-direktivet open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Merk: Ja er bare effektiv hvis modulen <b>%s</b> er aktivert RemoveLock=Fjern/endre navn på filen <b>%s</b> hvis den eksisterer, for å tillate bruk av oppdaterings-/installeringsverktøyet. RestoreLock=Gjenopprett filen <b>%s</b> med kun leserettigheter, for å deaktivere bruk av oppdateringsverktøyet. SecuritySetup=Sikkerhetsinnstillinger +PHPSetup=PHP setup SecurityFilesDesc=Her defineres valg relatert til sikkerhet ved opplasting av filer. ErrorModuleRequirePHPVersion=Feil: Denne modulen krever PHP versjon %s eller høyere ErrorModuleRequireDolibarrVersion=Feil: Denne modulen krever Dolibarr versjon %s eller høyere @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Dette området viser administrasjonsfunksjoner. Bruk menyen Purge=Utrenskning PurgeAreaDesc=Denne siden lar deg slette alle filer som er generert eller lagret av Dolibarr (midlertidige filer eller alle filer i katalogen <b> %s </b>). Bruk av denne funksjonen er normalt ikke nødvendig. Den leveres som en løsning for brukere hvis Dolibarr er vert for en leverandør som ikke tilbyr tillatelser for å slette filer generert av webserveren. PurgeDeleteLogFile=Slett loggfiler, inkludert <b>%s</b> definert for Syslog-modulen (ingen risiko for å miste data) -PurgeDeleteTemporaryFiles=Slett alle loggfiler og midlertidige filer (ingen risiko for å miste data). Merk: Sletting av midlertidige filer gjøres bare hvis temp-katalogen ble opprettet for mer enn 24 timer siden. +PurgeDeleteTemporaryFiles=Slett alle logg- og midlertidige filer (ingen risiko for å miste data). Parameteren kan være 'tempfilesold', 'logfiles' eller begge 'tempfilesold + logfiles'. Merk: Sletting av midlertidige filer gjøres bare hvis temp-katalogen ble opprettet for mer enn 24 timer siden. PurgeDeleteTemporaryFilesShort=Slett loggfiler og midlertidige filer PurgeDeleteAllFilesInDocumentsDir=Slett alle filer i katalogen: <b> %s </b>. <br> Dette vil slette alle genererte dokumenter relatert til elementer (tredjeparter, fakturaer etc ...), filer lastet opp i ECM-modulen, database backup dumper og midlertidig filer. PurgeRunNow=Start utrenskning @@ -232,6 +234,7 @@ BoxesAvailable=Tilgjengelige widgeter BoxesActivated=Aktiverte widgeter ActivateOn=Aktivert på ActiveOn=Aktivert på +ActivatableOn=Aktiverbar på SourceFile=Kildefil AvailableOnlyIfJavascriptAndAjaxNotDisabled=Tilgjengelig bare hvis Javascript og Ajax er aktivert Required=Påkrevet @@ -314,7 +317,7 @@ ModulesSetup=Moduler/Applikasjonsoppsett ModuleFamilyBase=System ModuleFamilyCrm=Customer Relationship Management (CRM) ModuleFamilySrm=Vendor Relationship Management (VRM) -ModuleFamilyProducts=Produktledelse (PM) +ModuleFamilyProducts=Varehåndtering (PM) ModuleFamilyHr=Human Resource Management (HRM) ModuleFamilyProjects=Prosjekter/Samarbeid ModuleFamilyOther=Annet @@ -347,9 +350,10 @@ LastActivationAuthor=Siste aktiveringsforfatter LastActivationIP=Siste aktivering IP UpdateServerOffline=Oppdater serveren offline WithCounter=Administrer en teller -GenericMaskCodes=Her kan du legge inn nummereringsmal. I malen kan du bruke følgende tagger:<br><b>{000000}</b> tilsvarer et tall som økes ved hver %s. Angi så mange nuller som du ønsker at lengden på telleren skal være. Telleren vil ha ledende nuller i henhold til malens lengde. <br><b>{000000+000}</b> samme som forrige, men med en forskyvning til høyre for + tegnet, starter fra første %s. <br><b>{000000@x}</b> samme som forrige, men telleren starter fra null når måned x nås (x mellom 1 og 12). Hvis dette valget brukes og x er 2 eller mer kreves også sekvensen {yy}{mm} eller {yyyy}{mm} kreves også. <br><b>{dd}</b> dag (01 til 31).<br><b>{mm}</b> måned (01 til 12).<br><b>{yy}</b>, <b>{yyyy}</b> eller <b>{y}</b> årstall over 2, 4 eller 1 siffer. <br> <b>{cccc000}</b> klientkoden på n tegn etterfulgt av en klientreferanse uten forskyvning og nullet med den globale telleren.<br><br>Alle andre tegn i malen vil forbli intakte.<br>Mellomrom er ikke tillatt.<br><br><u>Eksempel på den 99de %s av tredjeparten blir 31/01/2007:</u><br><b>ABC{yy}{mm}-{000000}</b> vil gi <b>ABC0701-000099</b><br><b>{0000+100}-ZZZ/{dd}/XXX</b> vil gi <b>0199-ZZZ/31/XXX</b><br> -GenericMaskCodes2=<B> {cccc} </b> klientkoden på n tegn <br> <b> {cccc000} </b> klientkoden på n tegn etterfølges av en teller dedikert til kunden. Denne telleren tilbakestilles samtidig med global teller. <br> <b> {tttt} </b> Koden til tredjepartstype på n tegn (se menyen Hjem - Oppsett - Ordbok - Typer av tredjeparter) . Hvis du legger til denne taggen, vil telleren være forskjellig for hver type tredjepart. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Alle andre tegn i masken vil være intakt. <br> Mellomrom er ikke tillatt. <br> +GenericMaskCodes3EAN=Alle andre tegn i masken forblir intakte (unntatt * eller ? I 13. posisjon i EAN13). <br> Mellomrom er ikke tillatt. <br> I EAN13 skal det siste tegnet etter det siste} i 13. posisjon være * eller? . Den vil bli erstattet av den beregnede nøkkelen. <br> GenericMaskCodes4a=<u>Eksempel på 99. %s fra tredjepart TheCompany, med dato 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Eksempel på tredjepart opprettet på 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Eksempel på vare opprettet 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Hvis dette feltet er tomt, vil denne verdien bli lag ExtrafieldParamHelpselect=Liste over verdier må være linjer med formatet nøkkel,verdi (hvor nøkkelen ikke kan være '0')<br><br>for eksempel:<br>1,verdi1<br>2,verdi2<br>kode3,verdi3<br>...<br><br>For å få listen avhengig av en annen komplementær attributtliste:<br>1,verdi1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>: parent_key<br><br>For å få listen avhengig av en annen liste:<br>1,verdi1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=Liste over verdier må være linjer med formatet nøkkel,verdi (hvor nøkkelen ikke kan være '0')<br><br>for eksempel:<br>1,verdi1 <br>2,verdi2<br>3,verdi3<br> ... ExtrafieldParamHelpradio=Liste over verdier må være linjer med formatet nøkkel,verdi (hvor nøkkelen ikke kan være '0')<br><br>for eksempel:<br>1,verdi1 <br>2,verdi2<br>3,verdi3<br> ... -ExtrafieldParamHelpsellist=Liste over verdier kommer fra en tabell <br> Syntaks: table_name:label_field:id_field::filter<br> Eksempel: c_typent:libelle:id::filter<br><br> - id_field er nødvendigvis en primær nøkkel<br> Filter kan være en enkel test (f.eks active=1) for å vise bare aktiv verdi <br> Du kan også bruke $ID$ i filteret som er gjeldende id for gjeldende objekt <br> For å bruke en SELECT i filteret, bruk nøkkelordet $SEL$ for å omgå anti-injeksjonsbeskyttelse. <br> Hvis du vil filtrere på ekstrafelt, bruk syntaks ekstra.fieldcode=... (hvor feltkode er koden til extrafield) <br> <br> For å ha listen avhengig av en annen utfyllende attributtliste: <br>c_typent:libelle:id:options_12<i> parent_list_code </i>|parent_column:filter <br><br> For å ha listen avhengig av en annen liste: <br> c_typent:libelle:id:<br>parent_list_code<br>|parent_column:filter\n  -ExtrafieldParamHelpchkbxlst=Liste over verdier kommer fra en tabell <br> Syntaks: table_name:label_field:id_field::filter <br> Eksempel: c_typent:libelle:id::filter<br><br> filter kan være en enkel test (f.eks. Aktiv=1 ) for å vise bare aktiv verdi<br>Du kan også bruke $ID$ i filter, som er gjeldende ID for nåværende objekt<br>For å utføre en SELECT i filter, bruk $SEL$<br>Hvis du vil filtrere på ekstrafeltbruk bruk syntaks extra.fieldcode=... (der feltkoden er koden til ekstrafelt)<br><br>For å få listen avhengig av en annen komplementær attributtliste:<br>c_typent:libelle:id:options_<i>parent_list_code </i> |parent_column:filter<br><br>For å få listen avhengig av en annen liste:<br>c_typent:libelle:id:<i>parent_list_code</i> |parent_column:filter +ExtrafieldParamHelpsellist=Liste over verdier kommer fra en tabell<br>Syntax: table_name:label_field:id_field::filtersql<br>Eksempel: c_typent:libelle:id::filtersql<br><br>- id_field er nødvendigvis en primær int-nøkkel<br>- filtersql er en SQL-tilstand. Det kan være en enkel test (f.eks. active=1) for å bare vise aktiv verdi<br>Du kan også bruke $ID$ i filteret som er gjeldende id for gjeldende objekt<br>For å bruke et SELECT i filteret, bruk nøkkelordet $SEL$ for å omgå beskyttelse mot injeksjon.<br>Hvis du vil filtrere på ekstrafelt, bruk syntaksen extra.fieldcode=... (hvor feltkode er koden til ekstrafeltet)<br><br>For å ha listen avhengig av en annen komplementær attributtliste:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>For å ha listen avhengig av en annen liste: <br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=Liste over verdier kommer fra en tabell<br>Syntax: table_name:label_field:id_field::filtersql<br>Eksempel: c_typent:libelle:id::filtersql<br><br>filteret kan være en enkel test (f.eks active=1) for kun å vise aktive verdier<br>Du kan også bruke $ID$ i filtre, som er gjeldende ID for gjeldende objekt<br>For å utføre SELECT i filter, bruk $SEL$<br>Hvis du vil filtrere ekstrafelte, bruk syntaks extra.fieldcode=... (der feltkode er koden til ekstrafeltet)<br><br>For å ha listen avhengig av en annen komplementær attributtliste:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>For å ha listen avhengig av en annen liste:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parametere må være ObjectName:Classpath <br> Syntaks: ObjectName:Classpath ExtrafieldParamHelpSeparator=Hold tomt for en enkel separator <br> Sett dette til 1 for en kollaps-separator (åpnes som standard for ny økt, da beholdes status for hver brukerøkt) <br> Sett dette til 2 for en kollaps-separator (kollapset som standard for ny økt, da holdes status foran hver brukerøkt) LibraryToBuildPDF=Bibliotek brukt for PDF-generering @@ -541,6 +545,8 @@ Module40Name=Leverandører Module40Desc=Leverandører og innkjøpshåndtering (innkjøpsordrer og fakturering av leverandørfakturaer) Module42Name=Feilsøkingslogger Module42Desc=Loggfunksjoner (fil, syslog, ...). Slike logger er for tekniske/feilsøkingsformål. +Module43Name=Debug Bar +Module43Desc=Et utviklerverktøy for å legge til en feilsøkingslinje i nettleseren din. Module49Name=Redigeringsprogram Module49Desc=Behandling av redigeringsprogram Module50Name=Varer @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind konverteringsegenskaper Module3200Name=Uforanderlige arkiver Module3200Desc=Aktiver en uforanderlig logg over forretningshendelser. Hendelser arkiveres i sanntid. Loggen er en skrivebeskyttet tabell med kjedede hendelser som kan eksporteres. Denne modulen kan være obligatorisk for enkelte land. +Module3400Name=Sosiale nettverk +Module3400Desc=Aktiver felt for sosiale nettverk i tredjeparter og adresser (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=HRM (håndtering av avdeling, arbeidskontrakter og personell) Module5000Name=Multi-selskap Module5000Desc=Lar deg administrere flere selskaper -Module6000Name=Arbeidsflyt -Module6000Desc=Arbeidsflytbehandling (automatisk opprettelse av objekt og/eller automatisk statusendring) +Module6000Name=Intermoduler Arbeidsflyt +Module6000Desc=Arbeidsflytstyring mellom forskjellige moduler (automatisk oppretting av objekt og/eller automatisk statusendring) Module10000Name=Websider Module10000Desc=Lag nettsteder (offentlige) med en WYSIWYG-redigerer. Dette er en webmaster eller utviklerorientert CMS (det er bedre å kunne HTML og CSS språk). Bare konfigurer webserveren din (Apache, Nginx, ...) for å peke på den dedikerte Dolibarr-katalogen for å ha den online på internett med ditt eget domenenavn. Module20000Name=Håndtering av permisjonsforespørsler @@ -805,7 +813,8 @@ PermissionAdvanced253=Opprett/endre interne/eksterne brukere og tillatelser Permission254=Opprett/modifiser kun eksterne brukere Permission255=Opprett/endre egen brukerinformasjon Permission256=Slett eller deaktiver andre brukere -Permission262=Utvid tilgangen til alle tredjeparter (ikke bare tredjeparter der brukeren er en salgsrepresentant).<br>Virker ikke på eksterne brukere (alltid begrenset til egne tilbud, ordre, fakturaer, kontrakter mm).<br>Virker ikke på prosjekter (kun regler for prosjekttillatelser, synlighet og tildeling gjelder). +Permission262=Utvid tilgangen til alle tredjeparter OG deres objekter (ikke bare tredjeparter som brukeren er salgsrepresentant for). <br> Ikke effektiv for eksterne brukere (alltid begrenset til seg selv for tilbud, ordre, fakturaer, kontrakter osv.). <br> Ikke effektiv for prosjekter (bare regler for prosjekttillatelser, synlighet og oppgaver). +Permission263=Utvid tilgangen til alle tredjeparter UTEN deres objekter (ikke bare tredjeparter som brukeren er salgsrepresentant for). <br> Ikke effektiv for eksterne brukere (alltid begrenset til seg selv for tilbud, ordre, fakturaer, kontrakter osv.). <br> Ikke effektiv for prosjekter (bare regler for prosjekttillatelser, synlighet og oppgaver). Permission271=Vis CA Permission272=Vis fakturaer Permission273=Opprett fakturaer @@ -1175,7 +1184,8 @@ SetupDescription2=Følgende to seksjoner er obligatoriske (de to første oppfør SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Grunnleggende parametere som brukes til å tilpasse standardoppførselen til applikasjonen din (for eksempel landrelaterte funksjoner). SetupDescription4=<a href="%s">%s -> %s</a><br><br> Denne programvaren er en serie med mange moduler/applikasjoner. Modulene relatert til dine behov må være aktivert og konfigurert. Menyoppføringer vises ved aktivering av disse modulene. SetupDescription5=Annet oppsett menyoppføringer styrer valgfrie parametere. -LogEvents=Hendelser relatert til sikkerhet +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Revisjon InfoDolibarr=Om Dolibarr InfoBrowser=Om nettleser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Kjøring av oppgraderingen ser ut til å være YouMustRunCommandFromCommandLineAfterLoginToUser=Du må kjøre denne kommandoen fra kommandolinjen etter innlogging til et skall med brukeren <b>%s.</b> YourPHPDoesNotHaveSSLSupport=SSL funksjoner ikke tilgjengelige i din PHP DownloadMoreSkins=Flere skins å laste ned -SimpleNumRefModelDesc=Returner referansenummeret med format %syymm-nnnn der åå er år, er mm måned og nnnn er en sekvens uten hull og uten tilbakestilling +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Vis Profesjonell ID med adresser ShowVATIntaInAddress=Skjul intra-Community MVA-numre med adresse TranslationUncomplete=Delvis oversettelse @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy-server: Navn/adresse MAIN_PROXY_PORT=Proxy-server: Port MAIN_PROXY_USER=Proxy-server: Log-in/bruker MAIN_PROXY_PASS=Proxy-server: Passord -DefineHereComplementaryAttributes=Her kan du definere noen ekstra/egendefinerte attributter som du vil inkludere for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Komplementære attributter ExtraFieldsLines=Utfyllende attributter (linjer) ExtraFieldsLinesRec=Komplementære attributter (fakturalinjermaler ) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Eksempel: uid LDAPFilterConnection=Søkefilter LDAPFilterConnectionExample=Eksempel : &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Eksempel : samaccountname LDAPFieldFullname=Fullt navn @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Ditt firma er definert til ikke å bruke MVA (Hjem - Op AccountancyCode=Regnskapskode AccountancyCodeSell=Kontokode for salg AccountancyCodeBuy=Kontokode for innkjøp +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Hold avkrysningsboksen "Opprett automatisk betalingen" tom som standard når du oppretter en ny avgift ##### Agenda ##### AgendaSetup=Innstillinger for modulen hendelser og agenda PasswordTogetVCalExport=Nøkkel for å autorisere eksportlenke +SecurityKey = Security Key PastDelayVCalExport=Ikke eksporter hendelser eldre enn AGENDA_USE_EVENT_TYPE=Bruk hendelsestyper (administrert i menyoppsett -> Ordbøker -> Type agendahendelser) AGENDA_USE_EVENT_TYPE_DEFAULT=Angi denne standardverdien automatisk for type hendelse i skjema for hendelsesoppretting @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Bakgrunnsfarge for oddetalls-tabellinjer BackgroundTableLineEvenColor=Bakgrunnsfarge for partalls-tabellinjer MinimumNoticePeriod=Frist for beskjed (Feriesøknaden må sendes inn før denne fristen) NbAddedAutomatically=Antall dager pr. måned som blir lagt til av brukerenes tellere(automatisk) -EnterAnyCode=Dette feltet inneholder en referanse til identifikasjon av linje. Bruk kun verdier uten spesialkarakterer +EnterAnyCode=Dette feltet inneholder en referanse for å identifisere linjen. Skriv inn hvilken som helst verdi du ønsker, men uten spesialtegn. 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 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=Bunnmarg på PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Høyde for logo på 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Flere språkvarianter funnet RemoveSpecialChars=Fjern spesialtegn COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter til ren verdi (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Oppsett av modul Sosiale nettverk EnableFeatureFor=Aktiver funksjoner for <strong> %s </strong> VATIsUsedIsOff=Merk: Muligheten til å bruke MVA er satt til <strong> Av </strong> i menyen %s - %s, så MVA vil alltid være 0 for salg. SwapSenderAndRecipientOnPDF=Bytt posisjoner for avsender- og mottakeradresse på PDF -FeatureSupportedOnTextFieldsOnly=Advarsel, funksjonen støttes kun i tekstfelt. Også en URL-parameter action=create eller action=edit må settes ELLER sidenavnet må avsluttes med 'new.php' for å starte denne funksjonen. +FeatureSupportedOnTextFieldsOnly=Advarsel, funksjonen støttes bare i tekstfelt og kombinasjonslister. Også en URL-parameter handling=opprett eller handling=redigering må angis ELLER sidenavnet må slutte med 'new.php' for å utløse denne funksjonen. EmailCollector=E-post samler EmailCollectorDescription=Legg til en planlagt jobb og en oppsettside for å jevnlig skanne etter e-post (ved hjelp av IMAP-protokollen) og registrere e-postmeldinger mottatt i applikasjonen, på riktig sted og/eller opprett poster automatisk (som kundeemner). NewEmailCollector=Ny e-postsamler @@ -2049,8 +2062,11 @@ UseDebugBar=Bruk feilsøkingsfeltet DEBUGBAR_LOGS_LINES_NUMBER=Nummer på siste logglinjer å beholde i konsollen WarningValueHigherSlowsDramaticalyOutput=Advarsel, høyere verdier reduserer resultatet dramatisk ModuleActivated=Modul %s er aktivert og bremser grensesnittet +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Hvis du er i et produksjonsmiljø, bør du sette denne egenskapen til %s. AntivirusEnabledOnUpload=Antivirus aktivert på opplastede filer +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Eksportmodellene er delt med alle ExportSetup=Oppsett av modul Eksport ImportSetup=Oppsett av importmodul @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Utfør et anonymt Ping '+1' til Dolibarr foundation-serveren ( FeatureNotAvailableWithReceptionModule=Funksjonen er ikke tilgjengelig når modulen Mottak er aktivert EmailTemplate=Mal for e-post EMailsWillHaveMessageID=E-postmeldinger vil være merket 'Referanser' som samsvarer med denne syntaksen +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Hvis du vil at tekst i PDF-en din skal dupliseres på 2 forskjellige språk i samme genererte PDF, må du angi dette andre språket, slik at generert PDF vil inneholde 2 forskjellige språk på samme side, det som er valgt når du genererer PDF og dette ( bare få PDF-maler støtter dette). Hold tom for ett språk per PDF. FafaIconSocialNetworksDesc=Skriv inn koden til et FontAwesome-ikon. Hvis du ikke vet hva som er FontAwesome, kan du bruke den generelle verdien fa-adresseboken. FeatureNotAvailableWithReceptionModule=Funksjonen er ikke tilgjengelig når modulen Mottak er aktivert @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Det anbefales å bytte denne verdien til %s for mer DictionaryProductNature= Varens art CountryIfSpecificToOneCountry=Land (hvis spesifikt for et gitt land) YouMayFindSecurityAdviceHere=Du kan finne sikkerhetsrådgivning her -ModuleActivatedMayExposeInformation=Denne modulen kan avsløre sensitive data. Hvis du ikke trenger det, deaktiver det. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=En modul designet for utvikling er aktivert. Ikke aktiver det i et produksjonsmiljø. CombinationsSeparator=Skilletegn for varekombinasjoner SeeLinkToOnlineDocumentation=Se lenke til online dokumentasjon i toppmenyen for eksempler SHOW_SUBPRODUCT_REF_IN_PDF=Hvis funksjonen "%s" til modul <b> %s </b> brukes, kan du vise detaljer om undervarer av et sett på PDF. AskThisIDToYourBank=Kontakt banken din for å få denne ID-en +AdvancedModeOnly=Tillatelse bare tilgjengelig i avansert tillatelsesmodus +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Hendelse organisasjon +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/nb_NO/banks.lang b/htdocs/langs/nb_NO/banks.lang index 3830db8bba9..0de8696fb38 100644 --- a/htdocs/langs/nb_NO/banks.lang +++ b/htdocs/langs/nb_NO/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Ditt SEPA-mandat FindYourSEPAMandate=Dette er ditt SEPA-mandat for å autorisere vårt firma til å utføre direktedebitering til din bank. Send det i retur signert (skanning av det signerte dokumentet) eller send det via post til AutoReportLastAccountStatement=Fyll feltet 'Antall bankoppgaver' automatisk med siste setningsnummer når du avstemmer CashControl=POS kassekontroll -NewCashFence=Ny kasseavslutning +NewCashFence=New cash desk opening or closing BankColorizeMovement=Fargelegg bevegelser BankColorizeMovementDesc=Hvis denne funksjonen er aktivert, kan du velge spesifikk bakgrunnsfarge for debet- eller kredittbevegelser BankColorizeMovementName1=Bakgrunnsfarge for debetbevegelse BankColorizeMovementName2=Bakgrunnsfarge for kredittbevegelse IfYouDontReconcileDisableProperty=Hvis du ikke foretar bankavstemninger på noen bankkontoer, deaktiverer du egenskapen"%s" for å fjerne denne advarselen. NoBankAccountDefined=Ingen bankkonto definert +NoRecordFoundIBankcAccount=Ingen poster funnet på bankkontoen. Vanligvis skjer dette når en post er slettet manuelt fra listen over transaksjoner på bankkontoen (for eksempel under en avstemming av bankkontoen). En annen årsak er at betalingen ble registrert da modulen "%s" ble deaktivert. diff --git a/htdocs/langs/nb_NO/bills.lang b/htdocs/langs/nb_NO/bills.lang index 4e1c65ac58f..5ad3d1ac255 100644 --- a/htdocs/langs/nb_NO/bills.lang +++ b/htdocs/langs/nb_NO/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=Kundefaktura CustomersInvoices=Kundefakturaer SupplierInvoice=Leverandørfaktura SuppliersInvoices=Leverandørfakturaer +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Leverandørfaktura SupplierBills=Leverandørfakturaer Payment=Betaling @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Betalinger allerede utført PaymentsBackAlreadyDone=Refusjon allerede gjort PaymentRule=Betalingsregel PaymentMode=Betalingstype +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debet/kredit-kort PaymentTypePP=PayPal IdPaymentMode=Betalingstype (ID) @@ -239,8 +242,8 @@ ExcessReceived=Overskytende ExcessPaid=For mye betalt EscompteOffered=Rabatt innrømmet (betalt før forfall) EscompteOfferedShort=Rabatt -SendBillRef=Innsendelse av faktura %s -SendReminderBillRef=Innsendelse av faktura %s (påminnelse) +SendBillRef=Faktura %s +SendReminderBillRef=Faktura %s (påminnelse) NoDraftBills=Ingen fakturakladder NoOtherDraftBills=Ingen andre fakturakladder NoDraftInvoices=Ingen fakturakladder @@ -373,6 +376,7 @@ DateLastGeneration=Dato for siste generering DateLastGenerationShort=Dato siste generering MaxPeriodNumber=Maks antall fakturagenereringer NbOfGenerationDone=Antall fakturagenereringer allerede gjort +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Antall genereringer gjort MaxGenerationReached=Maks antall genereringer nådd InvoiceAutoValidate=Valider fakturaer automatisk @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Innen 14 dager etter slutten av måneden FixAmount=Fast beløp - 1 linje med etiketten '%s' VarAmount=Variabelt beløp VarAmountOneLine=Variabel mengde (%% tot.) - 1 linje med etikett '%s' -VarAmountAllLines=Variabelt beløp (%% tot.) - alle like linjer +VarAmountAllLines=Variabelt beløp (%% tot.) - alle linjer fra opprinnelse # PaymentType PaymentTypeVIR=Bankoverførsel PaymentTypeShortVIR=Bankoverførsel @@ -494,12 +498,16 @@ Cash=Kontant Reported=Forsinket DisabledBecausePayments=Ikke mulig siden det er noen betalinger CantRemovePaymentWithOneInvoicePaid=Kan ikke fjerne betalingen siden det er minst en faktura som er klassifisert som betalt +CantRemovePaymentVATPaid=Kan ikke fjerne betaling siden MVA-deklarasjonen er klassifisert betalt +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Forventet innbetaling CantRemoveConciliatedPayment=Kan ikke fjerne avtalt beløp PayedByThisPayment=Betales av denne innbetalingen ClosePaidInvoicesAutomatically=Klassifiser automatisk alle standard-, forskudds- eller erstatningsfakturaer som "Betalt" når betalingen er fullført. ClosePaidCreditNotesAutomatically=Klassifiser automatisk alle kreditnotaer som "Betalt" når refusjonen er fullført. ClosePaidContributionsAutomatically=Klassifiser automatisk alle sosiale eller skattemessige bidrag som "Betalt" når betalingen er fullstendig utført. +ClosePaidVATAutomatically=Klassifiser automatisk MVA-erklæring som "Betalt" når betalingen er fullført. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Alle fakturaer uten gjenværende å betale vil automatisk bli stengt med status "Betalt". ToMakePayment=Betal ToMakePaymentBack=Tilbakebetal @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Du må først lage en standardfaktura og s PDFCrabeDescription=PDF-fakturamal Crabe. En komplett fakturamal (gammel implementering av Sponge-mal) PDFSpongeDescription=PDF Fakturamal Sponge. En komplett fakturamal PDFCrevetteDescription=PDF fakturamal Crevette. En komplett mal for delfaktura -TerreNumRefModelDesc1=Returnerer nummer med format %syymm-nnnn for standardfaktura og %syymm-nnnn for kreditnota, der yy er året, mm måned og nnnn er et løpenummer som starter på 0+1. -MarsNumRefModelDesc1=Returnerer et nummer med format %syymm-nnnn for standardfakturaer, %syymm-nnnn for erstatningsfakturaer, %syymm-nnnn for nedbetalingsfakturaer og %syymm-nnnn for kreditnotater hvor yy er år, mm er måned og nnnn er en sekvens uten pause og ingen retur til 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=En faktura som starter med $sååmm finnes allerede og er ikke kompatibel med denne nummereringsmodulen. Du må slette den eller gi den ett nytt navn for å aktivere denne modulen. -CactusNumRefModelDesc1=Returnerer et nummer med format %syymm-nnnn for standardfakturaer, %syymm-nnnn for kreditnotater og %syymm-nnnn for nedbetalingsfakturaer hvor yy er år, mm er måned og nnnn er en sekvens uten pause og ingen retur til 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Årsaken til tidlig avslutning EarlyClosingComment=Tidlig avslutning notat ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Hvis du vil opprette slike fakturaer automatis DeleteRepeatableInvoice=Slett fakturamal ConfirmDeleteRepeatableInvoice=Er du sikker på at du vil CreateOneBillByThird=Opprett en faktura pr. tredjepart (ellers en faktura pr. ordre) -BillCreated=%s faktura(er) opprettet +BillCreated=%s faktura(er) generert +BillXCreated=Faktura %s generert StatusOfGeneratedDocuments=Status for dokumentgenerering DoNotGenerateDoc=Ikke generer dokumentfil AutogenerateDoc=Autogenerer dokumentfil diff --git a/htdocs/langs/nb_NO/boxes.lang b/htdocs/langs/nb_NO/boxes.lang index 7f5f1011b58..e16bdcc4fdb 100644 --- a/htdocs/langs/nb_NO/boxes.lang +++ b/htdocs/langs/nb_NO/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistikk over viktigste forretningsobjekter i databasen BoxLoginInformation=Innloggingsinformasjon BoxLastRssInfos=RSS-informasjon BoxLastProducts=Siste %s Varer/Tjenester @@ -17,9 +18,13 @@ BoxLastActions=Siste hendelser BoxLastContracts=Siste kontrakter BoxLastContacts=Siste kontakter/adresser BoxLastMembers=Siste medlemmer +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Siste intervensjoner BoxCurrentAccounts=Åpne kontobalanse BoxTitleMemberNextBirthdays=Fødselsdager denne måneden (medlemmer) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Siste %s nyheter fra %s BoxTitleLastProducts=Varer/Tjenester: siste %s endret BoxTitleProductsAlertStock=Varer: lagervarsel @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Siste %s kundeforsendelser NoRecordedShipments=Ingen registrert kundesending BoxCustomersOutstandingBillReached=Kunder med utestående grense nådd # Pages -AccountancyHome=Regnskap +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validerte prosjekter diff --git a/htdocs/langs/nb_NO/categories.lang b/htdocs/langs/nb_NO/categories.lang index fcce83f42ff..e9d51fae4d2 100644 --- a/htdocs/langs/nb_NO/categories.lang +++ b/htdocs/langs/nb_NO/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Område for leverandørkoder/-kategorier CustomersCategoriesArea=Område for kunde-merker/kategorier MembersCategoriesArea=Område for medlems-merker/kategorier ContactsCategoriesArea=Område for kontakters merker/kategorier -AccountsCategoriesArea=Område for kontomerker/-kategorier +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Prosjekters merker/kategori-område UsersCategoriesArea=Område for brukertagger/-kategorier SubCats=Underkategorier @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Tilordne kategori til leverandør ShowCategory=Vis merke/kategori ByDefaultInList=Som standard i liste ChooseCategory=Velg kategori -StocksCategoriesArea=Lager Kategorier -ActionCommCategoriesArea=Hendelseskategorier +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Side-Container Kategorier UseOrOperatorForCategories=Bruker eller operatør for kategorier diff --git a/htdocs/langs/nb_NO/companies.lang b/htdocs/langs/nb_NO/companies.lang index d3302eb55c9..ebb5306c4a0 100644 --- a/htdocs/langs/nb_NO/companies.lang +++ b/htdocs/langs/nb_NO/companies.lang @@ -43,9 +43,10 @@ Individual=Privatperson ToCreateContactWithSameName=Vil automatisk opprette en kontakt/adresse med samme informasjon som tredjeparten, under tredjeparten. I de fleste tilfeller, selv om tredjeparten er en privatperson, vil det være nok å opprette en tredjepart ParentCompany=Morselskap Subsidiaries=Datterselskaper -ReportByMonth=Rapporter etter måned -ReportByCustomers=Rapporter etter kunde -ReportByQuarter=Rapporter pr sats +ReportByMonth=Rapport per måned +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code (ikke i Norge) RegisteredOffice=Registered office (ikke i Norge) Lastname=Etternavn @@ -172,14 +173,20 @@ ProfId1ES=Prof ID 1 (CIF / NIF) ProfId2ES=Prof ID 2 (personnummer) ProfId3ES=Prof ID 3 (CNAE) ProfId4ES=Prof ID 4 (Collegiate nummer) -ProfId5ES=EORI-nummer +ProfId5ES=Prof Id 5 (EORI-nummer) ProfId6ES=- ProfId1FR=Prof ID 1 (SIREN) ProfId2FR=Prof ID 2 (SIRET) ProfId3FR=Prof ID 3 (NAF, gammel APE) ProfId4FR=Prof ID 4 (RCS/RM) -ProfId5FR=EORI-nummer +ProfId5FR=Prof Id 5 (EORI-nummer) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof Id 1 (Registreringsnummer) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI-nummer +ProfId6IT=- ProfId1LU=Prof. ID 1 (R.C.S Luxembourg) ProfId2LU=Prof. ID (Forretningslisens) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof ID 1 (NIPC) ProfId2PT=Prof ID 2 (Personnummer) ProfId3PT=Prof ID 3 (Commercial Record number) ProfId4PT=Prof ID 4 (Conservatory) -ProfId5PT=EORI-nummer +ProfId5PT=Prof Id 5 (EORI-nummer) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI-nummer +ProfId5RO=Prof Id 5 (EORI-nummer) ProfId6RO=- ProfId1RU=Prof ID 1 (OGRN) ProfId2RU=Prof ID 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Gjeldende utestående regning OutstandingBill=Max. utestående beløp OutstandingBillReached=Maksimun utestående beløp nådd OrderMinAmount=Minimumsbeløp for bestilling -MonkeyNumRefModelDesc=Returner nummer med format %syymm-nnnn for kundekode og %syymm-nnnn for leverandørkode hvor yy er år, mm er måned og nnnn er en sekvens uten pause og ingen retur til 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Fri kode. Denne koden kan endres når som helst. ManagingDirectors=(E) navn (CEO, direktør, president ...) MergeOriginThirdparty=Dupliser tredjepart (tredjepart du vil slette) diff --git a/htdocs/langs/nb_NO/compta.lang b/htdocs/langs/nb_NO/compta.lang index 81f72a4f4d7..9739b3a0a96 100644 --- a/htdocs/langs/nb_NO/compta.lang +++ b/htdocs/langs/nb_NO/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST kjøp VATCollected=MVA samlet StatusToPay=Å betale SpecialExpensesArea=Område for spesielle betalinger +VATExpensesArea=Område for alle TVA-betalinger SocialContribution=Skatt eller avgift SocialContributions=Skatter eller avgifter SocialContributionsDeductibles=Fradragsberettigede avgifter @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Kundefaktura-betaling PaymentSupplierInvoice=betaling av leverandørfaktura PaymentSocialContribution=Skatter- og avgiftsbetaling PaymentVat=MVA betaling +AutomaticCreationPayment=Automatically record the payment ListPayment=Liste over betalinger ListOfCustomerPayments=Liste over kundebetalinger ListOfSupplierPayments=Liste over leverandørbetalinger @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Betaling LT2PaymentsES=IRPF Betalinger VATPayment=MVA-betaling VATPayments=MVA-betalinger +VATDeclarations=MVA-deklarasjoner +VATDeclaration=Mva-deklarasjon VATRefund=MVA-refundering NewVATPayment=Ny MVA-betaling NewLocalTaxPayment=Ny MVA %s betaling @@ -134,9 +138,17 @@ NoWaitingChecks=Ingen sjekker venter på å bli satt inn. DateChequeReceived=Dato for sjekkmottak NbOfCheques=Antall sjekker PaySocialContribution=Betal skatt/avgift -ConfirmPaySocialContribution=Er du sikker på at du vil klassifisere denne skatten/avgiften som betalt? +PayVAT=Betal en MVA-deklarasjon +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Er du sikker på at du vil klassifisere denne sosiale eller skatterelaterte betalingen som utført? +ConfirmPayVAT=Er du sikker på at du vil klassifisere denne MVA-deklarasjonen som betalt? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Slett en skatt eller avgift -ConfirmDeleteSocialContribution=Er du sikker på at du vil slette denne skatten/avgiften? +DeleteVAT=Slett en MVA-deklarasjon +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Er du sikker på at du vil slette denne sosiale/skatterelaterte betalingen? +ConfirmDeleteVAT=Er du sikker på at du vil slette denne MVA-deklarasjonen? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Skatte- og avgiftsbetalinger CalcModeVATDebt=Modus <b>%sMVA ved commitment regnskap%s</b>. CalcModeVATEngagement=Modus <b>%sMVA på inntekt-utgifter%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Inkluderer betalinger gjort mot fakturaer, utgifter, MVA og l RulesCADue=- Inkluderer kundens forfalte fakturaer enten de er betalt eller ikke. <br> - Basert på faktureringsdato for disse fakturaene. <br> RulesCAIn=- Inkluderer alle betalinger av fakturaer mottatt fra klienter. <br> - Er basert på betalingsdatoen for disse fakturaene <br> RulesCATotalSaleJournal=Den inkluderer alle kredittlinjer fra salgsjournalen. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Inkluderer poster i hovedboken med regnskapskontoer som har gruppen "UTGIFTER" eller "INNTEKT" RulesResultBookkeepingPredefined=Inkluderer poster i hovedboken med regnskapskontoer som har gruppen "UTGIFTER" eller "INNTEKT" RulesResultBookkeepingPersonalized=Viser poster i hovedboken med regnskapskontoer <b> gruppert etter tilpassede grupper </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=MVA-rapport etter tredjepart VATReportByCustomers=MVA-rapport etter kunde VATReportByCustomersInInputOutputMode=Rapport over innhentet og betalt MVA etter kunde VATReportByQuartersInInputOutputMode=Rapport etter MVA-sats av MVA innkrevd og betalt +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Rapporter MVA-2 etter sats LT2ReportByQuarters=Rapporter MVA-3 etter sats LT1ReportByQuartersES=Rapport etter RE sats @@ -217,7 +231,7 @@ Pcg_subtype=Kontoplan undertype InvoiceLinesToDispatch=Fakturalinjer for utsendelse ByProductsAndServices=Etter varer og tjenester RefExt=Ekstern referanse -ToCreateAPredefinedInvoice=For å lage en fakturamal, lag først en standardfaktura uten å validere den, klikk på "%s".| +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Lenke til ordre Mode1=Metode 1 Mode2=Metode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Den dedikerte regnskapskontoen som er definert ACCOUNTING_ACCOUNT_SUPPLIER=Regnskapskonto brukt til leverandør-tredjepart ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Den dedikerte regnskapskonto som er definert på tredjepartskort, vil kun bli brukt til subledger. Denne vil bli brukt til hovedboken og som standardverdi for Subledger-regnskap hvis dedikert leverandørkonto på tredjepart ikke er definert. ConfirmCloneTax=Bekreft kloning av skatt/avgiftsbetaling +ConfirmCloneVAT=Bekreft kloning av MVA-deklarasjon +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Klon for neste måned SimpleReport=Enkel rapport AddExtraReport=Ekstrarapporter (legg til internasjonale og nasjonale kunderapporter) @@ -253,7 +269,8 @@ AccountingAffectation=Regnskapsoppgave LastDayTaxIsRelatedTo=Siste dag i perioden MVA er knyttet til VATDue=MVA innkrevd ClaimedForThisPeriod=Innkrevd for perioden -PaidDuringThisPeriod=Betalt i denne perioden +PaidDuringThisPeriod=Betalt for denne perioden +PaidDuringThisPeriodDesc=Dette er summen av alle betalinger knyttet til MVA-deklarasjoner som har en sluttdato i den valgte datoperioden ByVatRate=Etter MVA-sats TurnoverbyVatrate=Omsetning fakturert etter MVA-sats TurnoverCollectedbyVatrate=Omsetning etter MVA-sats @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Kjøpsomsetning mottatt RulesPurchaseTurnoverDue=- Inkluderer leverandørens forfalte fakturaer enten de er betalt eller ikke. <br> - Basert på fakturadato for disse fakturaene. <br> RulesPurchaseTurnoverIn=- Inkluderer alle leverandørbetalinger som er utført. <br> - Basert på betalingsdatoen for disse fakturaene <br> RulesPurchaseTurnoverTotalPurchaseJournal=Inkluderer alle debetlinjer fra kjøpsjournalen. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Kjøpsomsetning fakturert ReportPurchaseTurnoverCollected=Kjøpsomsetning mottatt IncludeVarpaysInResults = Inkluder forskjellige betalinger i rapportene diff --git a/htdocs/langs/nb_NO/ecm.lang b/htdocs/langs/nb_NO/ecm.lang index 4e037c091f6..4d538a9eb7d 100644 --- a/htdocs/langs/nb_NO/ecm.lang +++ b/htdocs/langs/nb_NO/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Filen er ikke indeksert i databasen (prøv å laste ExtraFieldsEcmFiles=Ekstrafelt Ecm Filer ExtraFieldsEcmDirectories=Ekstrafelt Ecm-mapper ECMSetup=ECM-oppsett +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/nb_NO/errors.lang b/htdocs/langs/nb_NO/errors.lang index 798e6598202..2c5e1915bc7 100644 --- a/htdocs/langs/nb_NO/errors.lang +++ b/htdocs/langs/nb_NO/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> ble ikke funnet (feil bane, feil rettighete ErrorFunctionNotAvailableInPHP=Funksjonen <b>%s</b> kreves for denne funksjonen, men den er ikke tilgjengelig i denne versjonen/oppsettet av PHP. ErrorDirAlreadyExists=En mappe med dette navnet eksisterer allerede. ErrorFileAlreadyExists=En fil med dette navnet finnes allerede. +ErrorDestinationAlreadyExists=En annen fil med navnet <b> %s </b> eksisterer allerede. ErrorPartialFile=Filen ble ikke fullstendig mottatt av server. ErrorNoTmpDir=Midlertidig mappe %s finnes ikke. ErrorUploadBlockedByAddon=Opplastning blokkert av en PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Feil ved lasting av kart over kontoer. Hvis noen kontoer ik ErrorBadSyntaxForParamKeyForContent=Feil syntaks for parameter keyforcontent. Må ha en verdi som starter med %s eller %s ErrorVariableKeyForContentMustBeSet=Feil, konstanten med navn %s (med tekstinnhold som skal vises) eller %s (med ekstern url til visning) må settes. ErrorURLMustStartWithHttp=URL %s må starte med http:// eller https:// +ErrorHostMustNotStartWithHttp=Vertsnavnet %s må IKKE starte med http:// eller https:// ErrorNewRefIsAlreadyUsed=Feil, den nye referansen er allerede brukt ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Feil, å slette betaling knyttet til en lukket faktura er ikke mulig. ErrorSearchCriteriaTooSmall=For lite søkekriterier. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Offentlig grensesnitt var ikke aktivert ErrorLanguageRequiredIfPageIsTranslationOfAnother=Språket til den nye siden må defineres hvis den er angitt som oversettelse av en annen side ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=Språket på den nye siden må ikke være kildespråket hvis det er angitt som oversettelse av en annen side ErrorAParameterIsRequiredForThisOperation=En parameter er obligatorisk for denne operasjonen +ErrorDateIsInFuture=Feil, datoen kan ikke settes frem i tid +ErrorAnAmountWithoutTaxIsRequired=Feil, beløp er obligatorisk +ErrorAPercentIsRequired=Feil, fyll ut prosentandelen riktig +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP-parameteren upload_max_filesize (%s) er høyere enn PHP-parameteren post_max_size (%s). Dette er ikke et konsistent oppsett. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Advarsel, kunne ikke legge til filoppfø WarningTheHiddenOptionIsOn=Advarsel, det skjulte alternativet <b> %s </b> er på. WarningCreateSubAccounts=Advarsel, du kan ikke opprette en underkonto direkte, du må opprette en tredjepart eller en bruker og tildele dem en regnskapskode for å finne dem i denne listen WarningAvailableOnlyForHTTPSServers=Bare tilgjengelig hvis du bruker HTTPS-sikret tilkobling. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/nb_NO/externalsite.lang b/htdocs/langs/nb_NO/externalsite.lang index 7a530d73f28..f7f6bf1e47a 100644 --- a/htdocs/langs/nb_NO/externalsite.lang +++ b/htdocs/langs/nb_NO/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Oppsett av lenke til ekstern nettside -ExternalSiteURL=Ekstern nettstedadresse +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modulen Ekstern Side ble ikke riktig konfigurert. ExampleMyMenuEntry=Meny overskrift diff --git a/htdocs/langs/nb_NO/main.lang b/htdocs/langs/nb_NO/main.lang index 15410c383e2..511b46ca210 100644 --- a/htdocs/langs/nb_NO/main.lang +++ b/htdocs/langs/nb_NO/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Mod. dato IPModification=Modifikasjons-IP DateLastModification=Siste endringsdato DateValidation=Validert den +DateSigning=Signing date DateClosing=Lukket den DateDue=Forfallsdato DateValue=Verdi dato @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Enhetspris (ekskl.) (Valuta) UnitPriceTTC=Enhetspris PriceU=Pris PriceUHT=Pris (netto) -PriceUHTCurrency=U.P (valuta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inkl. avgift) Amount=Beløp AmountInvoice=Fakturabeløp @@ -389,6 +390,8 @@ AmountTotal=Totaltbeløp AmountAverage=Gjennomsnittsbeløp PriceQtyMinHT=Pris min mengde. (ekskl. MVA) PriceQtyMinHTCurrency=Pris min mengde. (ekskl. MVA) (valuta) +PercentOfOriginalObject=Prosent av originalobjektet +AmountOrPercent=Beløp eller prosent Percentage=Prosent Total=Totalt SubTotal=Subtotal @@ -724,7 +727,7 @@ MenuMembers=Medlemmer MenuAgendaGoogle=Google agenda MenuTaxesAndSpecialExpenses=Avgifter | Spesielle utgifter ThisLimitIsDefinedInSetup=Dolibarr grense (Menu home-setup-security): %s Kb, PHP grense: %s Kb -NoFileFound=Ingen dokumenter er lagret i denne mappen +NoFileFound=No documents uploaded CurrentUserLanguage=Gjeldende språk CurrentTheme=Gjeldende tema CurrentMenuManager=Nåværende menymanager @@ -899,8 +902,10 @@ ViewAccountList=Vis hovedbok ViewSubAccountList=Vis underkonto hovedbok RemoveString=Fjern strengen '%s' SomeTranslationAreUncomplete=Noen av språkene som tilbys kan bare oversettes delvis eller kan inneholde feil. Vennligst hjelp å korrigere språket ditt ved å registrere deg på <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> for å legge til forbedringene dine. -DirectDownloadLink=Direkte nedlastingslink (offentlig/ekstern) -DirectDownloadInternalLink=Direkte nedlastingslink (må være logget på og trenger tillatelser) +DirectDownloadLink=Offentlig nedlastingskobling +PublicDownloadLinkDesc=Kun koblingen kreves for å laste ned filen +DirectDownloadInternalLink=Privat nedlastningskobling +PrivateDownloadLinkDesc=Du må være innlogget og ha tillatelse for å se eller laste ned filen Download=Last ned DownloadDocument=Last ned dokument ActualizeCurrency=Oppdater valutakurs @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakter SearchIntoMembers=Medlemmer SearchIntoUsers=Brukere SearchIntoProductsOrServices=Varer eller tjenester +SearchIntoBatch=Lots / Serials SearchIntoProjects=Prosjekter SearchIntoMO=Produksjonsordrer SearchIntoTasks=Oppgaver @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tastatursnarvei AssignedTo=Tildelt Deletedraft=Slett utkast ConfirmMassDraftDeletion=Bekreftelse av massesletting av kladder -FileSharedViaALink=Fil delt via en lenke +FileSharedViaALink=Fil delt med en offentlig lenke SelectAThirdPartyFirst=Velg en tredjepart først ... YouAreCurrentlyInSandboxMode=Du er for øyeblikket i %s "sandbox" -modus Inventory=Varetelling AnalyticCode=Analytisk kode TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Vis mer info NoFilesUploadedYet=Vennligst last opp et dokument først SeePrivateNote=Se privat notat @@ -1120,3 +1127,5 @@ AffectTag=Påvirk merke ConfirmAffectTag=Påvirk bulkmerke ConfirmAffectTagQuestion=Er du sikker på at du vil påvirke merker til valgte %s post(er)? CategTypeNotFound=Ingen merketype funnet for denne post-typen +CopiedToClipboard=Kopiert til utklippstavlen +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/nb_NO/margins.lang b/htdocs/langs/nb_NO/margins.lang index 58d4549ded6..693ff867bdb 100644 --- a/htdocs/langs/nb_NO/margins.lang +++ b/htdocs/langs/nb_NO/margins.lang @@ -22,7 +22,7 @@ ProductService=Vare eller tjeneste AllProducts=Alle varer og tjenester ChooseProduct/Service=Velg vare eller tjenester ForceBuyingPriceIfNull=Tving innkjøps-/kostpris til utsalgspris hvis udefinert -ForceBuyingPriceIfNullDetails=Hvis innkjøps-/kostpris ikke er definert, og denne opsjonen er "PÅ", vil margin bli satt til null på linjen (innkjøps-/kostpris = utsalgspris). Ellers ("AV") vil margin bli satt til foreslått standard. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin-metode for globale rabatter UseDiscountAsProduct=Som vare UseDiscountAsService=Som tjeneste @@ -37,7 +37,7 @@ CostPrice=Kostpris UnitCharges=Enhets-avgifter Charges=Avgifter AgentContactType=Kommersiell agent kontakttype -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. +AgentContactTypeDetails=Definer hvilken kontakttype (lenket på fakturaer) som skal brukes til marginrapport per kontakt/adresse. Vær oppmerksom på at det ikke er pålitelig å lese statistikk for en kontakt siden kontakten i de fleste tilfeller ikke er definert eksplisitt på fakturaene. rateMustBeNumeric=Sats må ha en numerisk verdi markRateShouldBeLesserThan100=Dekningsbidrag skal være lavere enn 100 ShowMarginInfos=Vis info om marginer diff --git a/htdocs/langs/nb_NO/members.lang b/htdocs/langs/nb_NO/members.lang index 38f06382279..cff5ad25764 100644 --- a/htdocs/langs/nb_NO/members.lang +++ b/htdocs/langs/nb_NO/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Liste over medlems-utkast (må valideres) MembersListValid=Liste over gyldige medlemmer MembersListUpToDate=Liste over gyldige medlemmer med oppdatert abonnement MembersListNotUpToDate=Liste over gyldige medlemmer med utdatert abonnement +MembersListExcluded=List of excluded members MembersListResiliated=Liste over terminerte medlemmer MembersListQualified=Liste over kvalifiserte medlemmer MenuMembersToValidate=Utkast medlemmer MenuMembersValidated=Validerte medlemmer +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminerte medlemmer MembersWithSubscriptionToReceive=Medlemmer som venter på abonnement MembersWithSubscriptionToReceiveShort=Abonnement på å motta @@ -47,9 +49,12 @@ MemberStatusActiveLate=Abonnement utgått MemberStatusActiveLateShort=Utløpt MemberStatusPaid=Abonnement oppdatert MemberStatusPaidShort=Oppdatert +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminert medlem MemberStatusResiliatedShort=Terminert MembersStatusToValid=Utkast medlemmer +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminerte medlemmer MemberStatusNoSubscription=Validert (ingen abonnement nødvendig) MemberStatusNoSubscriptionShort=Validert @@ -82,6 +87,8 @@ Physical=Fysisk Moral=Moralsk MorAndPhy=Moralsk og fysisk Reenable=Reaktiverer +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminer et medlem ConfirmResiliateMember=Er du sikker på at du vil terminere dette medlemmet? DeleteMember=Slette et medlem @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-postmal til bruk for å sende e- DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-postmal til bruk for å sende e-post til et medlem på nytt abonnementsopptak DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-postmal som brukes til å sende epostpåminnelse når abonnementet er i ferd med å utløpe DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-postmal til bruk for å sende e-post til et medlem ved kansellering av medlemskap +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Avsenderadresse for automatisk e-post DescADHERENT_ETIQUETTE_TYPE=Side for etikettformat DescADHERENT_ETIQUETTE_TEXT=Tekst trykt på medlemsadresse ark @@ -162,6 +170,7 @@ DocForLabels=Generer adresseark SubscriptionPayment=Abonnementsbetaling LastSubscriptionDate=Dato for siste abonnementsbetaling LastSubscriptionAmount=Beløp på siste abonnement +LastMemberType=Last Member type MembersStatisticsByCountries=Medlemsstatistikk etter land MembersStatisticsByState=Medlemsstatistikk etter delstat/provins MembersStatisticsByTown=Medlemsstatistikk etter by diff --git a/htdocs/langs/nb_NO/modulebuilder.lang b/htdocs/langs/nb_NO/modulebuilder.lang index 24ffaf2f737..90e1fcf7f63 100644 --- a/htdocs/langs/nb_NO/modulebuilder.lang +++ b/htdocs/langs/nb_NO/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Jeg vil generere noen dokumenter fra objektet IncludeDocGenerationHelp=Hvis du krysser av for dette, genereres det kode for å legge til en "Generer dokument" -boksen på posten. ShowOnCombobox=Vis verdi i kombinasjonsboks KeyForTooltip=Nøkkel for verktøytips -CSSClass=CSS klasse +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Ikke redigerbar ForeignKey=Fremmed nøkkel TypeOfFieldsHelp=Type felt: <br> 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) diff --git a/htdocs/langs/nb_NO/orders.lang b/htdocs/langs/nb_NO/orders.lang index 550f74ff5be..0731675c368 100644 --- a/htdocs/langs/nb_NO/orders.lang +++ b/htdocs/langs/nb_NO/orders.lang @@ -16,6 +16,8 @@ ToOrder=Lag ordre MakeOrder=Opprett ordre SupplierOrder=Innkjøpsordre SuppliersOrders=Innkjøpsordre +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Nåværende innkjøpsordre CustomerOrder=Salgsordre CustomersOrders=Salgsordre @@ -141,11 +143,12 @@ OrderByEMail=E-post OrderByWWW=Online OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=En komplett ordremodell +PDFEinsteinDescription=En komplett ordremodell (gammel implementering av Eratosthene mal) PDFEratostheneDescription=En komplett ordremodell PDFEdisonDescription=En enkel ordremodell PDFProformaDescription=En komplett Proforma-fakturamal CreateInvoiceForThisCustomer=Fakturer ordrer +CreateInvoiceForThisSupplier=Fakturer ordrer NoOrdersToInvoice=Ingen fakturerbare ordrer CloseProcessedOrdersAutomatically=Klassifiser alle valgte bestillinger "Behandlet". OrderCreation=Opprett ordre diff --git a/htdocs/langs/nb_NO/other.lang b/htdocs/langs/nb_NO/other.lang index 5f24b072d78..5e6c9f56243 100644 --- a/htdocs/langs/nb_NO/other.lang +++ b/htdocs/langs/nb_NO/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Firma med mange aktiviteter (alle hovedmoduler) CreatedBy=Laget av %s ModifiedBy=Endret av %s ValidatedBy=Validert av %s +SignedBy=Signed by %s ClosedBy=Lukket av %s CreatedById=Bruker-ID som opprettet ModifiedById=Bruker-ID som gjorde siste endring @@ -244,6 +245,7 @@ NewKeyIs=Dette er din nye innloggingsnøkkel NewKeyWillBe=Ny nøkkel for innlogging er ClickHereToGoTo=Klikk her for å gå til %s YouMustClickToChange=Du må først klikke på følgende lenke for å validere passord-endringen +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Hvis det ikke er du som har bedt om endringen, kan du glemme denne e-posten. Dine opplysninger er trygge IfAmountHigherThan=Hvis beløpet er høyere enn<strong>%s</strong> SourcesRepository=Oppbevaring av kilder diff --git a/htdocs/langs/nb_NO/productbatch.lang b/htdocs/langs/nb_NO/productbatch.lang index bf4cc11d07a..31167037a32 100644 --- a/htdocs/langs/nb_NO/productbatch.lang +++ b/htdocs/langs/nb_NO/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Bruk lot/serienummer -ProductStatusOnBatch=Ja (lot/serienummer påkrevd) +ProductStatusOnBatch=Ja (LOT påkrevd) +ProductStatusOnSerial=Ja (unikt serienummer kreves) ProductStatusNotOnBatch=Nei (lot/serienummer ikke i bruk) -ProductStatusOnBatchShort=Ja +ProductStatusOnBatchShort=LOT +ProductStatusOnSerialShort=Serie ProductStatusNotOnBatchShort=Nei Batch=Lot/serienummer atleast1batchfield=Siste forbruksdato, siste salgsdato eller lot/serienummer @@ -16,9 +18,18 @@ printEatby=Siste forbruksdato: %s printSellby=Siste salgsdato: %s printQty=Ant: %d AddDispatchBatchLine=Legg til en linje for holdbarhetsdato -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. +WhenProductBatchModuleOnOptionAreForced=Når modulen Lot/Serie er aktivert, er automatisk lagernedgang tvunget til å 'Redusere reelt lager ved fraktgodkjennelse' og automatisk økningsmodus er tvunget til å "Øke virkelige lagre ved manuell forsendelse til lager" og kan ikke redigeres. Andre alternativer kan defineres etter ønske. ProductDoesNotUseBatchSerial=Denne varen har ikke lot/serienummer ProductLotSetup=Oppsett av model Lot/serienmmer ShowCurrentStockOfLot=Vis gjeldende beholdning for vare/lot ShowLogOfMovementIfLot=Vis logg over bevegelser for vare/lot StockDetailPerBatch=Varedetaljer pr. lot +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/nb_NO/products.lang b/htdocs/langs/nb_NO/products.lang index de0d515bf59..ebefd4f4d91 100644 --- a/htdocs/langs/nb_NO/products.lang +++ b/htdocs/langs/nb_NO/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=MVA (for denne leverandøren/varen) DiscountQtyMin=Rabatt for denne kvantiteten. NoPriceDefinedForThisSupplier=Ingen pris/antall definert for denne leverandøren/varen NoSupplierPriceDefinedForThisProduct=Ingen leverandørpris/antall definert for denne varen +PredefinedItem=Forhåndsdefinert vare PredefinedProductsToSell=Forhåndsdefinert vare PredefinedServicesToSell=Forhåndsdefinert tjeneste PredefinedProductsAndServicesToSell=Salg av forhåndsdefinerte varer/tjenester @@ -313,7 +314,7 @@ LastUpdated=Siste oppdatering CorrectlyUpdated=Korrekt oppdatert PropalMergePdfProductActualFile=Filer brukt for å legge til i PDF Azur er PropalMergePdfProductChooseFile=Velg PDF-filer -IncludingProductWithTag=Inkludert vare/tjeneste med merke +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Standardpris, virkelig pris avhenger av kunde WarningSelectOneDocument=Velg minst ett dokument DefaultUnitToShow=Enhet diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index d0c4f24d93e..c71833daf26 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Forbrukt ListOfTasks=Oppgaveliste GoToListOfTimeConsumed=Gå til liste for tidsbruk GanttView=Gantt visning +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Liste over tilbud knyttet til prosjektet ListOrdersAssociatedProject=Liste over salgsordre knyttet til prosjektet ListInvoicesAssociatedProject=Liste over kundefakturaer knyttet til prosjektet @@ -268,3 +269,7 @@ OneLinePerTask=Én linje per oppgave OneLinePerPeriod=Én linje per periode RefTaskParent=Ref. forelderoppgave ProfitIsCalculatedWith=Fortjenesten beregnes ved å bruke +AddPersonToTask=Legg også til i oppgaver +UsageOrganizeEvent=Bruk: Hendelse Organisasjon +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Klassifiser prosjektet som lukket når alle oppgavene er fullført (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Merk: eksisterende prosjekter med alle oppgaver på 100%%-fremdrift blir ikke berørt: du må lukke dem manuelt. Dette alternativet påvirker bare åpne prosjekter. diff --git a/htdocs/langs/nb_NO/propal.lang b/htdocs/langs/nb_NO/propal.lang index d4353a29a1d..296889c4a3c 100644 --- a/htdocs/langs/nb_NO/propal.lang +++ b/htdocs/langs/nb_NO/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=Er du sikker på at du vil klone tilbudet <b>%s</b>? ConfirmReOpenProp=Er du sikker på at du vil gjenåpne tilbudet <b>%s</b>? ProposalsAndProposalsLines=Tilbud og linjer ProposalLine=Tilbudslinje +ProposalLines=Proposal lines AvailabilityPeriod=Tilgjengelig forsinkelse SetAvailability=Sett tilgjengelig forsinkelse AfterOrder=etter bestilling diff --git a/htdocs/langs/nb_NO/salaries.lang b/htdocs/langs/nb_NO/salaries.lang index 101cae004e7..ce3cfe76d66 100644 --- a/htdocs/langs/nb_NO/salaries.lang +++ b/htdocs/langs/nb_NO/salaries.lang @@ -2,12 +2,15 @@ SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Regnskapskonto brukt til tredjepartsbrukere SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=Regnskapskontoen som er definert på brukerkort, vil kun bli brukt til bruk av Subledger regnskap. Denne vil bli brukt til hovedboken og som standardverdi for Subledger-regnskap hvis dedikert bruker-regnskapskonto ikke er definert. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Regnskapskonto som standard for lønnsutbetalinger +CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT=By default, leave empty the option "Automatically create a total payment" when creating a Salary Salary=Lønn Salaries=Lønn -NewSalaryPayment=Ny lønnsutbetaling +NewSalary=New salary +NewSalaryPayment=Nytt lønnskort AddSalaryPayment=Legg til lønnsutbetaling SalaryPayment=Lønnsutbetaling SalariesPayments=Lønnsutbetalinger +SalariesPaymentsOf=Salaries payments of %s ShowSalaryPayment=Vis lønnsutbetaling THM=Gjennomsnittlig timepris TJM=Gjennomsnittlig dagspris diff --git a/htdocs/langs/nb_NO/stocks.lang b/htdocs/langs/nb_NO/stocks.lang index 11a434e3082..831423ab16a 100644 --- a/htdocs/langs/nb_NO/stocks.lang +++ b/htdocs/langs/nb_NO/stocks.lang @@ -19,8 +19,8 @@ Stock=Lagerbeholdning Stocks=Lagerbeholdning MissingStocks=Manglende varer StockAtDate=Varebeholdning på dato -StockAtDateInPast=Tidligere dato -StockAtDateInFuture=Senere dato +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Lager etter LOT/serienummer LotSerial=Lot/serienummer LotSerialList=Liste over lot/serienummer @@ -37,8 +37,8 @@ AllWarehouses=Alle lager IncludeEmptyDesiredStock=Inkluder også negativ beholdning med udefinert ønsket beholdning IncludeAlsoDraftOrders=Inkluder også ordrekladd Location=Lokasjon -LocationSummary=Kort navn på lokasjon -NumberOfDifferentProducts=Antall forskjellige varer +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Totalt antall varer LastMovement=Siste bevegelse LastMovements=Siste bevegelser @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Lagerverdi UserWarehouseAutoCreate=Opprett et brukerlager automatisk når du oppretter en bruker AllowAddLimitStockByWarehouse=Administrer verdi for minimum og ønsket lager per sammenkobling (varelager) i tillegg til verdien for minimum og ønsket lager pr. vare RuleForWarehouse=Regel for lagre -WarehouseAskWarehouseDuringPropal=Sett et varehus på tilbud +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Sett varehus på tilbud WarehouseAskWarehouseDuringOrder=Sett et lager på salgsordrer UserDefaultWarehouse=Sett et lager på brukere MainDefaultWarehouse=Standard lager @@ -97,15 +98,16 @@ RealStockDesc=Fysisk/reelt lager er beholdningen du for øyeblikket har i dine i RealStockWillAutomaticallyWhen=Virkelig beholdning vil bli endret i henhold til denne regelen (som definert i Lager-modulen): VirtualStock=Virtuell beholdning VirtualStockAtDate=Virtuell beholdning på dato -VirtualStockAtDateDesc=Virtuell beholdning når alle planlagte ordrer før datoen, er fullført +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished VirtualStockDesc=Virtuell lagerbeholdning er den beregnede beholdningen som er tilgjengelig når alle åpne/ventende handlinger (som påvirker varer) er lukket (mottatte innkjøpsordrer, leverte salgsordrer, utførte produksjonsordrer osv.) +AtDate=På dato IdWarehouse=Lager-ID DescWareHouse=Beskrivelse av lager LieuWareHouse=Lagerlokasjon WarehousesAndProducts=Lager og varer WarehousesAndProductsBatchDetail=Lager og varer (med detaljer pr. lot/serienummer) AverageUnitPricePMPShort=Vektet gjennomsnittspris -AverageUnitPricePMPDesc=Gjennomsnittlig enhetspris betalt til leverandører for å få varen på lager. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Utsalgspris EstimatedStockValueSellShort=Verdi å selge EstimatedStockValueSell=Verdi å selge @@ -145,7 +147,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 et kilde-varehus og et mål-varehus, en vare og et antall, og klikk deretter "%s". Når dette er gjort for alle nødvendige bevegelser, klikker du 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 on "%s". RecordMovement=Postoverføring ReceivingForSameOrder=Kvitteringer for denne ordren StockMovementRecorded=Registrerte varebevegelser @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Lagernivå må være høyt nok til å legge varen/tj StockMustBeEnoughForOrder=Lagernivå må være høyt nok til å legge varen/tjenesten til ordre (sjekk er gjort mot dagens virkelige lagernivå når du legger til en linje i ordren i forhold til hva som er regelen for automatisk lagerendring) StockMustBeEnoughForShipment= Lagernivå må være høyt nok til å legge varen/tjenesten til levering (sjekk er gjort mot dagens virkelige lagernivå når du legger til en linje i leveringen i forhold til hva som er regelen for automatisk lagerendring) MovementLabel=Bevegelsesetikett -TypeMovement=Type bevegelse +TypeMovement=Direction of movement DateMovement=Dato for bevegelse InventoryCode=Bevegelse eller varelager IsInPackage=Innhold i pakken @@ -183,6 +185,7 @@ inventoryCreatePermission=Opprett ny varetelling inventoryReadPermission=Vis varetellinger inventoryWritePermission=Oppdater oversikt inventoryValidatePermission=Valider varetelling +inventoryDeletePermission=Delete inventory inventoryTitle=Varetelling inventoryListTitle=Varetellinger inventoryListEmpty=Ingen varetelling pågår @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Det kreves lagerbeholdning for å velge hvi ForceTo=Tving til AlwaysShowFullArbo=Vis hele lagertreet med popup av lagerkoblinger (Advarsel: Dette kan redusere ytelsen dramatisk) StockAtDatePastDesc=Her kan du se varen (reell beholdning) på en tidligere dato -StockAtDateFutureDesc=Her kan du se varen (virtuell beholdning) på en gitt dato i fremtiden +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Nåværende varebeholdning InventoryRealQtyHelp=Sett verdi til 0 for å tilbakestille antall <br> Hold feltet tomt, eller fjern linjen, for å holde uendret -UpdateByScaning=Oppdater ved å skanne +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Oppdater ved skanning (varestrekkode) UpdateByScaningLot=Oppdater ved skanning (LOT/seriell strekkode) DisableStockChangeOfSubProduct=Deaktiver lagerendringen for alle delvaren til dette settet under denne bevegelsen. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Last opp fil og klikk deretter på %s ikonet for å velge fil som kilde-importfil ... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Gjenåpne +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/nb_NO/suppliers.lang b/htdocs/langs/nb_NO/suppliers.lang index c7ade0f65bb..8eb97040929 100644 --- a/htdocs/langs/nb_NO/suppliers.lang +++ b/htdocs/langs/nb_NO/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Leverandører SuppliersInvoice=Leverandørfaktura +SupplierInvoices=Leverandørfakturaer ShowSupplierInvoice=Vis leverandørfaktura NewSupplier=Ny leverandør History=Historikk diff --git a/htdocs/langs/nb_NO/ticket.lang b/htdocs/langs/nb_NO/ticket.lang index 63f1717d97e..0b207326a40 100644 --- a/htdocs/langs/nb_NO/ticket.lang +++ b/htdocs/langs/nb_NO/ticket.lang @@ -70,6 +70,8 @@ Deleted=Slettede # Dict Type=Type Severity=Alvorlighetsgrad +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Å sende epost fra supportseddel-melding @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Vis modulens logo i det offentlige grensesnittet TicketsShowModuleLogoHelp=Aktiver dette alternativet for å skjule modullogoen på sidene i det offentlige grensesnittet TicketsShowCompanyLogo=Vis logoen til firmaet i det offentlige grensesnittet TicketsShowCompanyLogoHelp=Aktiver dette alternativet for å skjule logoen til hovedselskapet på sidene i det offentlige grensesnittet -TicketsEmailAlsoSendToMainAddress=Send også melding til hovedadressen -TicketsEmailAlsoSendToMainAddressHelp=Aktiver dette alternativet for å sende en epost til "Varslings-epost" -adresse (se oppsett under) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Begrens visningen til supportsedler tildelt den nåværende brukeren (ikke effektiv for eksterne brukere, alltid begrenset til den tredjepart de er avhengige av) TicketsLimitViewAssignedOnlyHelp=Bare supportsedler som er tildelt den nåværende brukeren, vil være synlige. Gjelder ikke for en bruker med administrasjonsrettigheter. TicketsActivatePublicInterface=Aktiver det offentlige grensesnittet @@ -126,10 +128,10 @@ TicketNumberingModules=Supportseddel nummereringsmodul TicketsModelModule=Dokumentmaler for billetter TicketNotifyTiersAtCreation=Varsle tredjepart ved opprettelse 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=Send epost(er) når en ny melding legges til fra det offentlige grensesnittet (til tildelt bruker eller varslings-eposten til (oppdatering) og/eller varslings-eposten til) TicketPublicNotificationNewMessageDefaultEmail=E-postvarsler til (oppdatere) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send epost med ny melding til denne adressen hvis billetten ikke er tildelt en bruker eller brukeren ikke har epost. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Siste endrede supportsedler BoxLastModifiedTicketDescription=Siste %s endrede supportsedler BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Ingen nylig endrede supportsedler +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/nb_NO/users.lang b/htdocs/langs/nb_NO/users.lang index f7c58956678..b1ac5feb529 100644 --- a/htdocs/langs/nb_NO/users.lang +++ b/htdocs/langs/nb_NO/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=Brukere og deres egenskaper DomainUser=Domenebruker %s Reactivate=Reaktiver CreateInternalUserDesc=Dette skjemaet gir deg mulighet til å opprette en intern bruker til din bedrift/organisasjon. For å opprette en ekstern bruker (kunde, leverandør, ...), bruk knappen "Opprett Dolibarr-bruker" fra tredjeparts kontaktkort. -InternalExternalDesc=En <b>intern</b> bruker er en bruker som er en del av din bedrift/organisasjon. <br>En<b>ekstern</b> bruker er en kunde, leverandør eller annet (Å opprette en ekstern bruker for en tredjepart kan gjøres fra kontaktkortet til tredjepart).<br><br> I begge tilfeller defineres rettigheter i Dolibarr, også ekstern bruker kan ha en annen menystyrer enn intern bruker (se Hjem - Oppsett - Display) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Rettigheter innvilget fordi de er arvet av en brukegruppe. Inherited=Arvet UserWillBe=Opprettet bruker vil være diff --git a/htdocs/langs/nb_NO/website.lang b/htdocs/langs/nb_NO/website.lang index 9cdf3dc0695..314d7173fc5 100644 --- a/htdocs/langs/nb_NO/website.lang +++ b/htdocs/langs/nb_NO/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Bruk med Apache/NGinx/...</u><br>Opprett på webserveren d ExampleToUseInApacheVirtualHostConfig=Eksempel på Apache virtuelt vertsoppsett: YouCanAlsoTestWithPHPS= <u> Bruk med PHP-innebygd server </u> <br> I utviklingsmiljø kan du foretrekke å teste nettstedet med PHP-innebygd webserver (PHP 5.5 nødvendig) ved å kjøre <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP=<u>Kjør nettstedet ditt med en annen leverandør av Dolibarr Hosting</u> <br> Hvis du ikke har en webserver som Apache eller NGinx tilgjengelig på internett, kan du eksportere og importere nettstedet til en annen Dolibarr-forekomst levert av en annen Dolibarr-leverandør som gir full integrasjon med nettstedsmodulen. Du kan finne en liste over noen Dolibarr-vertsleverandører på <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Sjekk også at virtuell vert har tillatelse <strong>%s</strong> på filer til <br><strong>%s</strong> +CheckVirtualHostPerms=Sjekk også at den virtuelle vertsbrukeren (for eksempel www-data) har <strong>%s</strong> tillatelser på filer i<br><strong>%s</strong> ReadPerm=Les WritePerm=Skriv TestDeployOnWeb=Test/distribuer på nett PreviewSiteServedByWebServer=<u> Forhåndsvis %s i en ny fane. </u><br><br>%s vil bli servet av en ekstern webserver (som Apache, Nginx, IIS). Du må installere og sette opp denne serveren før du peker på katalogen:<br><strong>%s</strong><br>URL servet av ekstern server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u> Forhåndsvis %s i en ny fanei.</u><br><br>%s blir servet av Dolibarr-serveren, slik at den ikke trenger at en ekstra webserver (som Apache, Nginx, IIS) installeres.<br>Ulempen er at nettadressen til sidene ikke er brukervennlig og begynner med banen til Dolibarr. <br> URL servet av Dolibarr:<br><strong>%s</strong> <br> <br> For å bruke din egen eksterne webserver for å betjene dette nettstedet, opprett en virtuell vert på webserveren din som peker på katalogen<br><strong>%s</strong><br>, og skriv deretter inn navnet til denne virtuelle serveren og klikk på den andre forhåndsvisningsknappen . +PreviewSiteServedByDolibarr= <u> Forhåndsvisning %s i en ny fane. </u><br><br> %s vil bli utført av Dolibarr-serveren, slik at den ikke trenger noen ekstra webserver (som Apache, Nginx, IIS) for å installeres. <br> Det ubeleilige er at nettadressene til sidene ikke er brukervennlige og starter med banen til Dolibarr. <br> URL fra Dolibarr: <br><strong>%s</strong><br><br> for å bruke din egen eksterne webserver til å tjene dette nettstedet, opprett en virtuell maskin på webserveren som peker på katalogen <br> <strong> %s </strong> <br> , skriv deretter inn navnet på denne virtuelle serveren i egenskapene til dette nettstedet og klikk på lenken "Test/implementer på nett". VirtualHostUrlNotDefined=URL til ekstern webserver ikke definert NoPageYet=Ingen sider ennå YouCanCreatePageOrImportTemplate=Du kan opprette en ny side eller importere en full nettsidemal @@ -137,3 +137,11 @@ PagesRegenerated=%s side(r)/container(e) regenerert RegenerateWebsiteContent=Regenerer cache-filer på nettstedet AllowedInFrames=Tillatt i frames DefineListOfAltLanguagesInWebsiteProperties=Definer liste over alle tilgjengelige språk i nettstedsegenskaper. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/nb_NO/zapier.lang b/htdocs/langs/nb_NO/zapier.lang index 5ab1b99ecf3..9a5e822d3c5 100644 --- a/htdocs/langs/nb_NO/zapier.lang +++ b/htdocs/langs/nb_NO/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr-modul - -# -# Admin page -# -ZapierForDolibarrSetup = Oppsett av Zapier for Dolibarr -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Oppsett av Zapier for Dolibarr +ZapierDescription=Grensesnitt med Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ne_NP/accountancy.lang b/htdocs/langs/ne_NP/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/ne_NP/accountancy.lang +++ b/htdocs/langs/ne_NP/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/ne_NP/admin.lang b/htdocs/langs/ne_NP/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/ne_NP/admin.lang +++ b/htdocs/langs/ne_NP/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ne_NP/banks.lang b/htdocs/langs/ne_NP/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/ne_NP/banks.lang +++ b/htdocs/langs/ne_NP/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ne_NP/bills.lang b/htdocs/langs/ne_NP/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/ne_NP/bills.lang +++ b/htdocs/langs/ne_NP/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/ne_NP/boxes.lang b/htdocs/langs/ne_NP/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/ne_NP/boxes.lang +++ b/htdocs/langs/ne_NP/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/ne_NP/categories.lang b/htdocs/langs/ne_NP/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/ne_NP/categories.lang +++ b/htdocs/langs/ne_NP/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ne_NP/companies.lang b/htdocs/langs/ne_NP/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/ne_NP/companies.lang +++ b/htdocs/langs/ne_NP/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/ne_NP/compta.lang b/htdocs/langs/ne_NP/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/ne_NP/compta.lang +++ b/htdocs/langs/ne_NP/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/ne_NP/ecm.lang b/htdocs/langs/ne_NP/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/ne_NP/ecm.lang +++ b/htdocs/langs/ne_NP/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ne_NP/errors.lang b/htdocs/langs/ne_NP/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/ne_NP/errors.lang +++ b/htdocs/langs/ne_NP/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ne_NP/externalsite.lang b/htdocs/langs/ne_NP/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/ne_NP/externalsite.lang +++ b/htdocs/langs/ne_NP/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ne_NP/main.lang b/htdocs/langs/ne_NP/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/ne_NP/main.lang +++ b/htdocs/langs/ne_NP/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ne_NP/margins.lang b/htdocs/langs/ne_NP/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/ne_NP/margins.lang +++ b/htdocs/langs/ne_NP/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/ne_NP/members.lang b/htdocs/langs/ne_NP/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/ne_NP/members.lang +++ b/htdocs/langs/ne_NP/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/ne_NP/modulebuilder.lang b/htdocs/langs/ne_NP/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/ne_NP/modulebuilder.lang +++ b/htdocs/langs/ne_NP/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/ne_NP/orders.lang b/htdocs/langs/ne_NP/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/ne_NP/orders.lang +++ b/htdocs/langs/ne_NP/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/ne_NP/other.lang b/htdocs/langs/ne_NP/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/ne_NP/other.lang +++ b/htdocs/langs/ne_NP/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/ne_NP/productbatch.lang b/htdocs/langs/ne_NP/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/ne_NP/productbatch.lang +++ b/htdocs/langs/ne_NP/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ne_NP/products.lang b/htdocs/langs/ne_NP/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/ne_NP/products.lang +++ b/htdocs/langs/ne_NP/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/ne_NP/projects.lang b/htdocs/langs/ne_NP/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/ne_NP/projects.lang +++ b/htdocs/langs/ne_NP/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ne_NP/propal.lang b/htdocs/langs/ne_NP/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/ne_NP/propal.lang +++ b/htdocs/langs/ne_NP/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/ne_NP/stocks.lang b/htdocs/langs/ne_NP/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/ne_NP/stocks.lang +++ b/htdocs/langs/ne_NP/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ne_NP/suppliers.lang b/htdocs/langs/ne_NP/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/ne_NP/suppliers.lang +++ b/htdocs/langs/ne_NP/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/ne_NP/ticket.lang b/htdocs/langs/ne_NP/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/ne_NP/ticket.lang +++ b/htdocs/langs/ne_NP/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ne_NP/users.lang b/htdocs/langs/ne_NP/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/ne_NP/users.lang +++ b/htdocs/langs/ne_NP/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/ne_NP/website.lang b/htdocs/langs/ne_NP/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/ne_NP/website.lang +++ b/htdocs/langs/ne_NP/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ne_NP/zapier.lang b/htdocs/langs/ne_NP/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/ne_NP/zapier.lang +++ b/htdocs/langs/ne_NP/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/nl_BE/accountancy.lang b/htdocs/langs/nl_BE/accountancy.lang index b778d524492..080da3b8334 100644 --- a/htdocs/langs/nl_BE/accountancy.lang +++ b/htdocs/langs/nl_BE/accountancy.lang @@ -20,7 +20,6 @@ UpdateMvts=Wijzigen van een transactie Processing=Verwerken EndProcessing=Verwerking beëindigd Lineofinvoice=Factuur lijn -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) Docdate=Datum Docref=Artikelcode TotalVente=Totaal omzet voor belastingen diff --git a/htdocs/langs/nl_BE/admin.lang b/htdocs/langs/nl_BE/admin.lang index 9e36971311b..c28e7e34745 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -149,7 +149,6 @@ InfDirAlt=Sinds versie 3 is het mogelijk om een alternatieve rootmap te definië InfDirExample=<br> <strong>Verklaar</strong> het dan in het bestand <strong>conf.php</strong> <br> $ Dolibarr_main_url_root_alt='/custom' <br> $ Dolibarr_main_document_root_alt='/pad/of/Dolibarr/htdocs/custom' <br> Als deze regels worden becommentarieerd met "#", schakelt u ze gewoon uit door het teken "#" te verwijderen. LastStableVersion=Nieuwste stabiele versie LastActivationIP=Laatste activerings-IP -GenericMaskCodes2=<b>{cccc}</b> de clientcode van n tekens <br> <b>{cccc000}</b> de <b>klantcode</b> op n tekens wordt gevolgd door een teller voor de klant. Deze teller die aan de klant is toegewezen, wordt tegelijkertijd opnieuw ingesteld als de globale teller. <br> <b>{tttt}</b> De code van het type van een derde partij op n tekens (zie menu Home - Instellingen - Woordenboek - Typen derde partijen). Als u deze tag toevoegt, verschilt de teller voor elk type derde partij. <br> GenericMaskCodes4a=<u>Voorbeeld op de 99e %s van de derde partij TheCompany, met datum 31-01-2007:</u> <br> GenericMaskCodes5=<b>ABC {jj} {mm} - {000000}</b> geeft <b>ABC0701-000099</b> <br> <b>{0000 + 100 @ 1} -ZZZ / {dd} / XXX</b> geeft <b>0199-ZZZ / 31 / XXX</b> <br> <b>IN {jj} {mm} - {0000} - {t}</b> geeft <b>IN0701-0099-A</b> als het type bedrijf 'Responsable Inscripto' is met code voor het type dat 'A_RI' is UMask=Umask parameter voor nieuwe bestanden op een Unix- / Linux- / BSD-bestandssysteem. @@ -201,6 +200,7 @@ ModuleCompanyCodePanicum=Retourneer een lege boekhoudcode. Module40Name=Verkoper Module1780Name=Labels/Categorien Module1780Desc=Label/categorie maken (producten, klanten, leveranciers, contacten of leden) +Module3400Name=Sociale Netwerken Permission22=Creëer / wijzig offertes Permission24=Valideer offertes Permission32=Creëer / wijzig producten / diensten @@ -225,6 +225,7 @@ DatabasePassword=Databasewachwoord Skin=Uiterlijksthema DefaultSkin=Standaard uiterlijksthema CompanyCurrency=Belangrijkste valuta +ShowBugTrackLink=Show link "<strong>%s</strong>" InfoWebServer=Over webserver InfoDatabase=Over de database AccountantFileNumber=Code voor boekhouder diff --git a/htdocs/langs/nl_BE/bills.lang b/htdocs/langs/nl_BE/bills.lang index 460b3139e48..ecf29a418a7 100644 --- a/htdocs/langs/nl_BE/bills.lang +++ b/htdocs/langs/nl_BE/bills.lang @@ -4,6 +4,7 @@ BillsCustomer=Klantfactuur BillsCustomersUnpaid=Onbetaalde klantfacturen BillsCustomersUnpaidForCompany=Onbetaalde afnemersfacturen voor %s DisabledBecauseNotErasable=Niet mogelijk omdat het niet kan worden gewist +CustomersInvoices=Klantfacturen PaymentBack=Teruggave CustomerInvoicePaymentBack=Teruggave CreateCreditNote=Aanmaak krediet nota @@ -13,6 +14,7 @@ StatusOfGeneratedInvoices=Lijst van genereerde facturen BillStatusDraft=Conceptfactuur (moet worden gevalideerd) BillShortStatusClosedUnpaid=Afgesloten ErrorVATIntraNotConfigured=Intracommunautair btw-nummer nog niet gedefinieerd +BillTo=Geadresseerd aan LastCustomersBills=Laatste %s klantfacturen AmountOfBillsByMonthHT=Factuurbedrag per maand (ex BTW) RemainderToBill=Nog te factureren diff --git a/htdocs/langs/nl_BE/boxes.lang b/htdocs/langs/nl_BE/boxes.lang index 030c0a528c9..ec54c5aa572 100644 --- a/htdocs/langs/nl_BE/boxes.lang +++ b/htdocs/langs/nl_BE/boxes.lang @@ -24,4 +24,3 @@ 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/categories.lang b/htdocs/langs/nl_BE/categories.lang index 9d86adc7acd..9f02159c12d 100644 --- a/htdocs/langs/nl_BE/categories.lang +++ b/htdocs/langs/nl_BE/categories.lang @@ -10,7 +10,6 @@ ProductsCategoriesArea=Producten/Diensten tags/categorieën omgeving CustomersCategoriesArea=Klanten tags/categorieën omgeving MembersCategoriesArea=Leden tags/categorieën omgeving ContactsCategoriesArea=Contacten tags/categorieën omgeving -AccountsCategoriesArea=Accounts tags/categorieën omgeving ProjectsCategoriesArea=Projecten tags/categorieën omgeving CatList=Lijst van tags/categorieën NewCategory=Nieuwe tag/categorie diff --git a/htdocs/langs/nl_BE/companies.lang b/htdocs/langs/nl_BE/companies.lang index b62eb40a97c..3c215ffb8f4 100644 --- a/htdocs/langs/nl_BE/companies.lang +++ b/htdocs/langs/nl_BE/companies.lang @@ -14,8 +14,6 @@ ThirdParty=Derde partij ThirdParties=Derden ThirdPartySuppliers=Verkopers ThirdPartyType=Soort derde partij -ReportByMonth=Rapport per maand -ReportByCustomers=Rapport per klant RegisteredOffice=Maarschappelijke zetel NatureOfThirdParty=Aard van derden StateShort=Staat diff --git a/htdocs/langs/nl_BE/compta.lang b/htdocs/langs/nl_BE/compta.lang index 26787bfc20f..3e62ccae353 100644 --- a/htdocs/langs/nl_BE/compta.lang +++ b/htdocs/langs/nl_BE/compta.lang @@ -18,9 +18,7 @@ Refund=Teruggave CustomerAccountancyCodeShort=Klantcode SupplierAccountancyCodeShort=Leverancierscode PaySocialContribution=Betaal een sociale bijdrage/belasting -ConfirmPaySocialContribution=Bent u zeker dat u deze sociale bijdrage/belasting als "betaald" wil classeren? DeleteSocialContribution=Verwijder betaling sociale bijdrage/belasting -ConfirmDeleteSocialContribution=Bent u zeker dat u deze sociale bijdrage/belasting betaling wil verwijderen? ExportDataset_tax_1=sociale bijdragen/belastingen en betalingen CalcModeLT1Debt=Modus <b>%sRE op afnemersfacturen%s</b> CalcModeLT1Rec=Modus <b>%sRE op leveranciersfacturen%s</b> diff --git a/htdocs/langs/nl_BE/externalsite.lang b/htdocs/langs/nl_BE/externalsite.lang index 9fdddaacccf..4f3aab4c69f 100644 --- a/htdocs/langs/nl_BE/externalsite.lang +++ b/htdocs/langs/nl_BE/externalsite.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link naar externe website -ExternalSiteURL=Externe Site URL ExternalSiteModuleNotComplete=Module ExternalSite werd niet correct geconfigureerd. diff --git a/htdocs/langs/nl_BE/main.lang b/htdocs/langs/nl_BE/main.lang index 293c494d51e..0e84429bb41 100644 --- a/htdocs/langs/nl_BE/main.lang +++ b/htdocs/langs/nl_BE/main.lang @@ -62,7 +62,7 @@ UserModificationShort=Modif. gebruiker UserValidationShort=Geldig. gebruiker CurrencyRate=Wisselkoers van valuta UserModif=Gebruiker van laatste update -PriceUHTCurrency=UP (valuta) +Amount=Hoeveelheid MulticurrencyRemainderToPay=Blijf betalen, oorspronkelijke valuta MulticurrencyAmountHT=Bedrag (excl. Btw), oorspronkelijke valuta MulticurrencyAmountTTC=Bedrag (incl. Btw), oorspronkelijke valuta diff --git a/htdocs/langs/nl_BE/margins.lang b/htdocs/langs/nl_BE/margins.lang index 329a0adf015..c2f7c5946ca 100644 --- a/htdocs/langs/nl_BE/margins.lang +++ b/htdocs/langs/nl_BE/margins.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - margins MarginOnProducts=Marge / Producten ForceBuyingPriceIfNull=Gebruik de koop/kost prijs als verkoopsprijs indien niet gedefinieerd -ForceBuyingPriceIfNullDetails=Indien koop/kost prijs niet gedefinieerd is, en deze optie is "ON", dan zal de marge nul zijn op deze lijn (koop/kost prijs = verkoopsprijs), anderzijds ("OFF"), marge zal gelijk zijn aan het gesuggereerde voorstel. UseDiscountAsProduct=Als een product MargeType3=Marge op kostprijs AgentContactType=Contacttype van commercieel medewerker diff --git a/htdocs/langs/nl_BE/modulebuilder.lang b/htdocs/langs/nl_BE/modulebuilder.lang new file mode 100644 index 00000000000..fe17c59910b --- /dev/null +++ b/htdocs/langs/nl_BE/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty diff --git a/htdocs/langs/nl_BE/ticket.lang b/htdocs/langs/nl_BE/ticket.lang index 943c019bd35..f1e3f473db3 100644 --- a/htdocs/langs/nl_BE/ticket.lang +++ b/htdocs/langs/nl_BE/ticket.lang @@ -46,8 +46,6 @@ TicketsShowModuleLogo=Geef het logo van de module weer in de openbare interface TicketsShowModuleLogoHelp=Schakel deze optie in om de logo module te verbergen op de pagina's van de openbare interface TicketsShowCompanyLogo=Geef het logo van het bedrijf weer in de openbare interface TicketsShowCompanyLogoHelp=Schakel deze optie in om het logo van het hoofdbedrijf te verbergen op de pagina's van de openbare interface -TicketsEmailAlsoSendToMainAddress=Stuur ook een bericht naar het hoofd e-mailadres -TicketsEmailAlsoSendToMainAddressHelp=Schakel deze optie in om een ​​e-mail te sturen naar het e-mailadres "Kennisgevings e-mail van" (zie onderstaande instellingen) TicketsLimitViewAssignedOnlyHelp=Alleen tickets die aan de huidige gebruiker zijn toegewezen, zijn zichtbaar. Is niet van toepassing op een gebruiker met rechten voor ticket beheer. TicketsActivatePublicInterface=Activeer de publieke interface TicketsActivatePublicInterfaceHelp=Met de openbare interface kunnen bezoekers tickets maken. diff --git a/htdocs/langs/nl_BE/withdrawals.lang b/htdocs/langs/nl_BE/withdrawals.lang deleted file mode 100644 index facdefc082f..00000000000 --- a/htdocs/langs/nl_BE/withdrawals.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/nl_NL/accountancy.lang b/htdocs/langs/nl_NL/accountancy.lang index 13032515f54..bcbe3e6525d 100644 --- a/htdocs/langs/nl_NL/accountancy.lang +++ b/htdocs/langs/nl_NL/accountancy.lang @@ -4,7 +4,7 @@ Accounting=Boekhouding ACCOUNTING_EXPORT_SEPARATORCSV=Kolom separator voor export bestand ACCOUNTING_EXPORT_DATE=Datumnotatie voor exportbestand ACCOUNTING_EXPORT_PIECE=Exporteer het aantal stuks -ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account +ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Exporteer met algemeen account ACCOUNTING_EXPORT_LABEL=Export label ACCOUNTING_EXPORT_AMOUNT=Export bedrag ACCOUNTING_EXPORT_DEVISE=Export valuta @@ -16,8 +16,8 @@ ThisService=Deze dienst ThisProduct=Dit product DefaultForService=Standaard bij dienst DefaultForProduct=Standaard bij product -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty +ProductForThisThirdparty=Product voor deze relatie +ServiceForThisThirdparty=Service voor deze relatie CantSuggest=Geen voorstel AccountancySetupDoneFromAccountancyMenu=Meeste instellingen boekhouding worden gedaan vanuit menu %s ConfigAccountingExpert=Configuratie van boekhoud-module (dubbel boekhouden) @@ -131,7 +131,7 @@ InvoiceLinesDone=Gekoppelde factuurregels ExpenseReportLines=Te koppelen kostenboekingen ExpenseReportLinesDone=Gekoppelde kostenboekingen IntoAccount=Koppel regel aan grootboekrekening -TotalForAccount=Totaal grootboekrekening +TotalForAccount=Total accounting account Ventilate=Koppelen @@ -209,7 +209,7 @@ Codejournal=Journaal JournalLabel=Journaal label NumPiece=Boekingstuk TransactionNumShort=Transactienummer -AccountingCategory=Gepersonaliseerde groepen +AccountingCategory=Custom group GroupByAccountAccounting=Groeperen op grootboekrekening GroupBySubAccountAccounting=Groepeer op subgrootboekrekening AccountingAccountGroupsDesc=Hier kunt u enkele grootboekrekening-groepen definiëren. Deze worden gebruikt voor gepersonaliseerde boekhoudrapporten. @@ -227,7 +227,7 @@ ConfirmDeleteMvtPartial=Hiermee wordt de boeking uit de boekhouding verwijderd ( FinanceJournal=Kas/Bank journaal ExpenseReportsJournal=Overzicht resultaatrekening DescFinanceJournal=Financieel journaal inclusief alle soorten betalingen per kas/bankrekening -DescJournalOnlyBindedVisible=Deze boeking is gebonden aan een boekhoudkundige rekening en kan worden opgenomen in de dagboeken en het grootboek. +DescJournalOnlyBindedVisible=Deze boeking is gekoppeld aan een tegenrekening en kan worden opgenomen in de dagboeken en het grootboek. VATAccountNotDefined=BTW rekeningen niet gedefinieerd ThirdpartyAccountNotDefined=Grootboekrekening van relatie niet gedefinieerd ProductAccountNotDefined=Grootboekrekening producten niet gedefinieerd @@ -323,8 +323,8 @@ ErrorAccountingJournalIsAlreadyUse=Dit dagboek is al in gebruik AccountingAccountForSalesTaxAreDefinedInto=Opmerking: Grootboekrekeningen voor BTW worden vastgelegd in menukeuze <b>%s</b>-<b>%s</b> NumberOfAccountancyEntries=Aantal boekingen NumberOfAccountancyMovements=Aantal veranderingen -ACCOUNTING_DISABLE_BINDING_ON_SALES=Schakel het koppelen en doorboeken naar de boekhouding van verkopen uit (facturen van klanten worden niet in aanmerking genomen in de boekhouding) -ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Schakel het koppelen en doorboeken naar de boekhouding op inkopen uit (facturen van leveranciers worden niet meegerekend in de boekhouding) +ACCOUNTING_DISABLE_BINDING_ON_SALES=Schakel het koppelen en doorboeken naar de boekhouding van verkopen uit (facturen van klanten worden niet opgenomen in de boekhouding) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Schakel het koppelen en doorboeken naar de boekhouding van inkopen uit (facturen van leveranciers worden niet doorgeboekt in de boekhouding) ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Schakel het koppelen en doorboeken naar de boekhouding van onkostendeclaraties uit (met onkostendeclaraties wordt geen rekening gehouden in de boekhouding) ## Export @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Regels die nog niet zijn gebonden, gebruik het menu < ## Import ImportAccountingEntries=Boekingen +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Exportdatum WarningReportNotReliable=Waarschuwing, dit rapport is niet gebaseerd op het grootboek, dus bevat het niet de transactie die handmatig in het grootboek is gewijzigd. Als uw journalisatie up-to-date is, is de weergave van de boekhouding nauwkeuriger. ExpenseReportJournal=Kostenoverzicht InventoryJournal=Inventarisatie + +NAccounts=%s accounts diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 7459ec2257a..226316eaa51 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Verwijder sessieblokkering YourSession=Uw sessie Sessions=Gebruikerssessies WebUserGroup=Webserver gebruiker / groep +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Machtigingen voor bestanden in de hoofdmap van het web PermissionsOnFile=Rechten op bestand %s NoSessionFound=Uw PHP-configuratie lijkt geen lijst van actieve sessies toe te staan. De map die wordt gebruikt om sessies op te slaan ( <b>%s</b> ) kan worden beschermd (bijvoorbeeld door OS machtigingen of door PHP richtlijn open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Opmerking: Ja, is alleen effectief als module <b>%s</b> is geact RemoveLock=Verwijder / hernoem het bestand <b>%s</b> als het bestaat, om het gebruik van de update / installatie-tool toe te staan. RestoreLock=Herstel het bestand <b>%s</b> , met alleen leesrechten, om verder gebruik van de update / installatie-tool uit te schakelen. SecuritySetup=Beveiligingsinstellingen +PHPSetup=PHP setup SecurityFilesDesc=Definieer hier de opties met betrekking tot beveiliging bij het uploaden van bestanden. ErrorModuleRequirePHPVersion=Fout, deze module vereist PHP versie %s of hoger. ErrorModuleRequireDolibarrVersion=Fout, deze module vereist Dolibarr versie %s of hoger. @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Dit gebied biedt beheerfuncties. Gebruik het menu om de gewe Purge=Leegmaken PurgeAreaDesc=Op deze pagina kunt u alle bestanden verwijderen die zijn gegenereerd of opgeslagen door Dolibarr (tijdelijke bestanden of alle bestanden in de map <b>%s</b> ). Het gebruik van deze functie is normaal gesproken niet nodig. Het wordt aangeboden als een oplossing voor gebruikers van wie Dolibarr wordt gehost door een provider die geen machtigingen biedt voor het verwijderen van bestanden die zijn gegenereerd door de webserver. PurgeDeleteLogFile=Verwijder logbestanden <b>%s</b> aangemaakt door de Syslog module (Geen risico op verlies van gegevens) -PurgeDeleteTemporaryFiles=Verwijder alle log- en tijdelijke bestanden (geen risico op gegevensverlies). Opmerking: tijdelijke bestanden worden alleen verwijderd als de tijdelijke map meer dan 24 uur geleden is gemaakt. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Verwijder logboek en tijdelijke bestanden PurgeDeleteAllFilesInDocumentsDir=Verwijder alle bestanden in de map: <b>%s</b> . <br> Hiermee worden alle gegenereerde documenten met betrekking tot elementen (relaties, facturen, enz ...), bestanden die zijn geüpload naar de ECM module, database back-up dumps en tijdelijke bestanden verwijderd. PurgeRunNow=Nu opschonen @@ -232,6 +234,7 @@ BoxesAvailable=Beschikbare widgets BoxesActivated=Widgets geactiveerd ActivateOn=Activeren op ActiveOn=Geactiveerd op +ActivatableOn=Activatable on SourceFile=Bronbestand AvailableOnlyIfJavascriptAndAjaxNotDisabled=Alleen beschikbaar als JavaScript en AJAX niet zijn uitgeschakeld Required=Verplicht @@ -347,9 +350,10 @@ LastActivationAuthor=Laatste activeringsauteur LastActivationIP=Laatste activering IP-adres UpdateServerOffline=Updateserver offline WithCounter=Beheer een teller -GenericMaskCodes=U kunt elk gewenst maskernummer invoeren. In dit masker, kunnen de volgende tags worden gebruikt:<br><b>{000000}</b> correspondeert met een nummer welke vermeerderd zal worden op elke %s. Voer zoveel nullen in als de gewenste lengte van de teller. De teller wordt aangevuld met nullen vanaf links zodat er zoveel nullen zijn als in het masker.<br><b>{000000+000}</b> hetzelfde als voorgaand maar een offset corresponderend met het nummer aan de rechterkant van het + teken is toegevoegd startend op de eerste %s. <br><b>{000000@x}</b> hetzelfde als voorgaande maar de teller wordt gereset naar nul, wanneer maand x is bereikt (x tussen 1 en 12). Als deze optie is gebruikt en x is 2 of hoger, dan is de volgorde {yy}{mm} of {yyyy}{mm} ook vereist. <br><b>{dd}</b> dag (01 t/m 31).<br><b>{mm}</b> maand (01 t/m 12).<br><b>{yy}</b>, <b>{yyyy}</b> of <b>{y}</b> jaat over 2, 4 of 1 nummer(s). <br> -GenericMaskCodes2=<b>{cccc}</b>de cliëntcode op n tekens<br> <b>{cccc000}</b> de cliëntcode op n tekens wordt gevolgd door een teller die is toegewezen aan de klant. Deze teller voor de klant wordt op hetzelfde moment gereset als de globale teller.<br><b> {tttt}</b> De code van het type van derden op n tekens (zie menu Home - Set-up - Woordenboek - Soorten derden) . Als u deze label toevoegt, is de teller anders voor elk type derde partij.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Alle andere karakters in het masker zullen intact blijven.<br>Spaties zijn niet toegestaan.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Voorbeeld op de 99e %s van relaties TheCompany, met datum 2007-01-31: </u><br> GenericMaskCodes4b=<u>Voorbeeld van een Klant gecreëerd op 2007-03-01:</u><br> GenericMaskCodes4c=<u>Voorbeeld op product gemaakt op 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Dit veld leeg laten betekent dat deze waarde zonder ExtrafieldParamHelpselect=Lijst met waarden moeten regels zijn met opmaaksleutel, waarde (waar sleutel niet '0' kan zijn) <br><br> bijvoorbeeld: <br> 1, waarde1 <br> 2, value2 <br> code3, waarde3 <br> ... <br><br> Om de lijst afhankelijk van een andere aanvullende attributenlijst te krijgen: <br> 1, waarde1 | options_ <i>parent_list_code</i> : parent_key <br> 2, <i>value2</i> | options_ <i>parent_list_code</i> : parent_key <br><br> Om de lijst afhankelijk van een andere lijst te krijgen: <br> 1, waarde1 | <i>parent_list_code</i> : parent_key <br> 2, waarde2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=Lijst met waarden moeten regels zijn met opmaaksleutel, waarde (waar sleutel niet '0' kan zijn) <br><br> bijvoorbeeld: <br> 1, waarde1 <br> 2, value2 <br> 3, waarde3 <br> ... ExtrafieldParamHelpradio=Lijst met waarden moeten regels zijn met opmaaksleutel, waarde (waar sleutel niet '0' kan zijn) <br><br> bijvoorbeeld: <br> 1, waarde1 <br> 2, value2 <br> 3, waarde3 <br> ... -ExtrafieldParamHelpsellist=Lijst met waarden komen van een tabel<br>Syntax: table_name:label_field:id_field::filter<br>Bijvoorbeeld: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Lijst met waarden komt uit een tabel <br> Syntaxis: tabelnaam: labelveld: id_veld :: filter <br> Voorbeeld: c_typent: libelle: id :: filter <br><br> filter kan een eenvoudige test zijn (bijv. actief = 1) om alleen de actieve waarde weer te geven <br> U kunt ook $ ID $ gebruiken in filter waarvan de huidige id van het huidige object is <br> Gebruik $ SEL $ om een SELECT in filter te doen <br> Als u op extra velden wilt filteren, gebruikt u syntaxis extra.fieldcode = ... (waarbij veldcode de code van extraveld is) <br><br> Om de lijst afhankelijk van een andere aanvullende attributenlijst te krijgen: <br> c_typent: libelle: id: options_ <i>parent_list_code</i> | parent_column: filter <br><br> Om de lijst afhankelijk van een andere lijst te krijgen: <br> c_typent: libelle: id: <i>parent_list_code</i> | parent_column: filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters moeten Objectnaam: Classpath<br> Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Blijf leeg voor een eenvoudig scheidingsteken <br> Stel dit in op 1 voor een samenvouwend scheidingsteken (standaard geopend voor nieuwe sessie, dan wordt de status behouden voor elke gebruikerssessie) <br> Stel dit in op 2 voor een samenvouwend scheidingsteken (standaard samengevouwen voor nieuwe sessie, dan wordt de status behouden voor elke gebruikerssessie) LibraryToBuildPDF=Gebruikte library voor generen PDF @@ -541,6 +545,8 @@ Module40Name=Leveranciers Module40Desc=Leveranciers en inkoopbeheer (inkooporders en facturering van leveranciersfacturen) Module42Name=Debug logs Module42Desc=Mogelijkheden voor een log (file,syslog, ...). Deze log-files zijn voor technische/debug ondersteuning. +Module43Name=Foutopsporingsbalk +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editorbeheer Module50Name=Producten @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Capaciteitconversie GeoIP Maxmind Module3200Name=Niet aanpasbare archieven Module3200Desc=Schakel een niet aanpasbaar logboek van zakelijke evenementen in. Evenementen worden in realtime gearchiveerd. Het logboek is een alleen-lezen tabel met gekoppelde gebeurtenissen die kunnen worden geëxporteerd. Deze module kan voor sommige landen verplicht zijn. +Module3400Name=Sociale netwerken +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (afdelingsbeheer, werknemerscontracten en sentiment) Module5000Name=Multi-bedrijf Module5000Desc=Hiermee kunt meerdere bedrijven beheren in Dolibarr -Module6000Name=Workflow -Module6000Desc=Workflow management (automatisch aanmaken van object en/of automatische statusverandering) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites Module10000Desc=Maak websites (openbaar) met een WYSIWYG-editor. Dit is een webmaster of ontwikkelaar gericht CMS (kennis van HTML- en CSS-taal is gewenst). Stel uw webserver (Apache, Nginx, ...) in zodat deze naar de speciale Dolibarr-directory verwijst om deze online op internet te hebben met uw eigen domeinnaam. Module20000Name=Verlof aanvraagbeheer @@ -670,7 +678,7 @@ Module54000Desc=Direct afdrukken (zonder de documenten te openen) met behulp van Module55000Name=Poll, Onderzoek of Stemmen Module55000Desc=Maak online polls, enquêtes of stemmen (zoals Doodle, Studs, RDVz enz ...) Module59000Name=Marges -Module59000Desc=Module to follow margins +Module59000Desc=Module om de marges te volgen Module60000Name=Commissies Module60000Desc=Module om commissies te beheren Module62000Name=Incoterms @@ -805,7 +813,8 @@ PermissionAdvanced253=Creëer / wijzig de rechten van internet / externe gebruik Permission254=Verwijderen of uitschakelen van andere gebruikers 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). <br> Niet effectief voor externe gebruikers (altijd beperkt tot zichzelf voor voorstellen, bestellingen, facturen, contracten, enz.). <br> Niet effectief voor projecten (alleen regels over projectmachtigingen, zichtbaarheid en toewijzingsaangelegenheden). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Lees CA Permission272=Facturen inzien Permission273=Facturen uitgeven @@ -1175,7 +1184,8 @@ SetupDescription2=De volgende twee secties zijn verplicht (de twee eerste vermel SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Basisparameters die worden gebruikt om het standaardgedrag van uw toepassing aan te passen (bijvoorbeeld voor landgerelateerde functies). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Dit programma is een samenstelling van vele modules / applicaties. De modules die betrekking hebben op uw behoeften moeten worden ingeschakeld en geconfigureerd. Menu-items verschijnen met de activering van deze modules. SetupDescription5=Andere items in het Setup-menu beheren optionele parameters. -LogEvents=Veiligheidsauditgebeurtenissen +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=Over Dolibarr InfoBrowser=Over Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Het uitvoeren van het upgradeproces lijkt vere YouMustRunCommandFromCommandLineAfterLoginToUser=U dient dit commando vanaf de opdrachtregel uit te voeren, na ingelogd te zijn als gebruiker <b>%s</b>. Of u dient het commando uit te breiden door de -W optie mee te geven zodat u het wachtwoord kunt opgeven. YourPHPDoesNotHaveSSLSupport=SSL functies niet beschikbaar in uw PHP installatie DownloadMoreSkins=Meer uiterlijkthema's om te downloaden -SimpleNumRefModelDesc=Retourneert het referentienummer met het formaat %syymm-nnnn waarbij yy jaar is, mm is maand en nnnn is sequentieel zonder reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Toon professionele id met adressen ShowVATIntaInAddress=Verberg intracommunautair btw-nummer met adressen TranslationUncomplete=Onvolledige vertaling @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxyserver: naam/adres MAIN_PROXY_PORT=Proxyserver: poort MAIN_PROXY_USER=Proxyserver: Inloggen/Gebruiker MAIN_PROXY_PASS=Proxy-server: wachtwoord -DefineHereComplementaryAttributes=Definieer hier eventuele aanvullende/aangepaste kenmerken waarvoor u wilt worden opgenomen: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Aanvullende attributen ExtraFieldsLines=Aanvullende kenmerken (lijnen) ExtraFieldsLinesRec=Aanvullende attributen (sjablonen factuurregels) @@ -1308,7 +1318,7 @@ YouUseBestDriver=U gebruikt stuurprogramma %s, het beste stuurprogramma dat mome YouDoNotUseBestDriver=U gebruikt stuurprogramma %s maar stuurprogramma %s wordt aanbevolen. NbOfObjectIsLowerThanNoPb=U hebt alleen %s %s in de database. Dit vereist geen specifieke optimalisatie. SearchOptim=Zoekmachine optimalisatie -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can 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. +YouHaveXObjectUseSearchOptim=U hebt %s %s in de database. U kunt de constante %s toevoegen aan 1 in Home-Instellingen-Andere instellingen. Beperk de zoekopdracht tot het begin van strings, waardoor de database indexen kan gebruiken en u onmiddellijk antwoord zou moeten krijgen. YouHaveXObjectAndSearchOptimOn=U hebt %s %s in de database en constante %s is ingesteld op 1 in Home-Setup-Other. BrowserIsOK=U gebruikt de webbrowser %s. Deze browser is geschikt voor beveiliging en prestaties. BrowserIsKO=U gebruikt de webbrowser %s. Deze browser staat bekend als een slechte keuze voor beveiliging, prestaties en betrouwbaarheid. We raden aan om Firefox, Chrome, Opera of Safari te gebruiken. @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Gebruikersnaam (Unix) LDAPFieldLoginExample=Voorbeeld: uid LDAPFilterConnection=Zoekfilter LDAPFilterConnectionExample=Voorbeeld: &amp; (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Gebruikersnaam (samba, activedirectory) LDAPFieldLoginSambaExample=Voorbeeld: samaccountname LDAPFieldFullname=Voornaam Achternaam @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Uw bedrijf is ingesteld als zijnde vrijgesteld van BTW AccountancyCode=Grootboekrekening AccountancyCodeSell=Boekhoudkundige afnemerscode AccountancyCodeBuy=Boekhoudkundige leverancierscode +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Acties- en agendamoduleinstellingen PasswordTogetVCalExport=autorisatiecode van de exportlink +SecurityKey = Security Key PastDelayVCalExport=Exporteer geen gebeurtenissen ouder dan AGENDA_USE_EVENT_TYPE=Gebruik gebeurtenistypen (beheerd in menu Setup -&gt; Woordenboeken -&gt; Type agenda-evenementen) AGENDA_USE_EVENT_TYPE_DEFAULT=Stel deze standaardwaarde automatisch in voor het type evenement in het formulier voor het maken van een evenement @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Achtergrondkleur voor oneven tabellijnen BackgroundTableLineEvenColor=Achtergrondkleur voor gelijkmatige tabellijnen MinimumNoticePeriod=Minimale opzegtermijn (uw verlofaanvraag moet vóór deze vertraging worden gedaan) NbAddedAutomatically=Aantal dagen toegevoegd aan tellers van gebruikers (automatisch) elke maand -EnterAnyCode=Dit veld bevat een referentie om de lijn te identificeren. Voer een waarde naar keuze in, maar zonder speciale tekens. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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 &#39;CODEGRP1 + CODEGRP2&#39;) +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Verschillende taalvarianten gevonden RemoveSpecialChars=Verwijder speciale tekens COMPANY_AQUARIUM_CLEAN_REGEX=Regex-filter om waarde te reinigen (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Installatie van module Sociale netwerken EnableFeatureFor=Functies inschakelen voor <strong>%s</strong> VATIsUsedIsOff=Opmerking: De optie om omzetbelasting of btw te gebruiken is ingesteld op <strong>Uit</strong> in het menu %s - %s, dus gebruikte omzetbelasting of btw is altijd 0 voor verkoop. SwapSenderAndRecipientOnPDF=Wissel afzender- en ontvangeradrespositie op PDF-documenten in -FeatureSupportedOnTextFieldsOnly=Waarschuwing, functie wordt alleen ondersteund op tekstvelden. Ook moet een URL-parameter action = create of action = edit worden ingesteld OF de paginanaam moet eindigen op &#39;new.php&#39; om deze functie te activeren. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email verzamelaar EmailCollectorDescription=Voeg een geplande taak en een installatiepagina toe om regelmatig e-mailboxen te scannen (met het IMAP-protocol) en ontvangen e-mails op te nemen in uw toepassing, op de juiste plaats en / of maak automatisch enkele records aan (zoals leads). NewEmailCollector=Nieuwe e-mailverzamelaar @@ -2049,8 +2062,11 @@ UseDebugBar=Gebruik de foutopsporingsbalk DEBUGBAR_LOGS_LINES_NUMBER=Aantal laatste logboekregels dat in de console moet worden bewaard WarningValueHigherSlowsDramaticalyOutput=Waarschuwing, hogere waarden vertragen de uitvoer dramatisch ModuleActivated=Module %s is geactiveerd en vertraagt de interface +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=Als u zich in een productieomgeving bevindt, moet u deze eigenschap instellen op %s. AntivirusEnabledOnUpload=Antivirus ingeschakeld op geüploade bestanden +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Exportmodellen zijn met iedereen te delen ExportSetup=Installatie van exportmodule ImportSetup=Instellen van module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Maak een anonieme ping &#39;+1&#39; naar de Dolibarr-fundering FeatureNotAvailableWithReceptionModule=Functie niet beschikbaar wanneer module-ontvangst is ingeschakeld EmailTemplate=Sjabloon voor e-mail EMailsWillHaveMessageID=E-mails hebben een tag 'Verwijzingen' die overeenkomen met deze syntaxis +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Als u wilt dat sommige teksten in uw PDF worden gedupliceerd in 2 verschillende talen in dezelfde gegenereerde PDF, moet u hier deze tweede taal instellen, zodat de gegenereerde PDF 2 verschillende talen op dezelfde pagina bevat, degene die is gekozen bij het genereren van PDF en deze ( slechts enkele PDF-sjablonen ondersteunen dit). Voor 1 taal per pdf leeg houden. FafaIconSocialNetworksDesc=Voer hier de code van een FontAwesome-pictogram in. Als je niet weet wat FontAwesome is, kun je het generieke waarde fa-adresboek gebruiken. FeatureNotAvailableWithReceptionModule=Functie niet beschikbaar wanneer module-ontvangst is ingeschakeld @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Het wijzigen van deze waarde naar %s wordt aanbevol DictionaryProductNature= Aard van het product CountryIfSpecificToOneCountry=Land (indien specifiek voor een bepaald land) YouMayFindSecurityAdviceHere=Mogelijk vindt u hier beveiligingsadvies -ModuleActivatedMayExposeInformation=Deze module kan gevoelige gegevens blootleggen. Schakel het uit als u het niet nodig heeft. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=Een module ontworpen voor de ontwikkeling is ingeschakeld. Schakel het niet in bij een productieomgeving. CombinationsSeparator=Scheidingsteken voor productcombinaties SeeLinkToOnlineDocumentation=Zie link naar online documentatie in het bovenste menu voor voorbeelden SHOW_SUBPRODUCT_REF_IN_PDF=Als de functie "%s" van module <b>%s</b> wordt gebruikt, toon dan de details van subproducten van een kit op PDF. AskThisIDToYourBank=Neem contact op met uw bank om deze ID te krijgen +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/nl_NL/banks.lang b/htdocs/langs/nl_NL/banks.lang index 5350f4939a7..b96756964f8 100644 --- a/htdocs/langs/nl_NL/banks.lang +++ b/htdocs/langs/nl_NL/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Uw SEPA mandaat FindYourSEPAMandate=Met deze SEPA machtiging geeft u ons bedrijf toestemming een opdracht ter incasso te sturen naar uw bank. Retourneer het ondertekend (scan van het ondertekende document) of stuur het per e-mail naar AutoReportLastAccountStatement=Vul bij het automatisch afstemmen het veld 'aantal bankafschriften' in met het laatste afschrift nummer. CashControl=POS kassa controle -NewCashFence=Nieuwe kassa sluiting +NewCashFence=New cash desk opening or closing BankColorizeMovement=Inkleuren mutaties BankColorizeMovementDesc=Als deze functie is ingeschakeld, kunt u een specifieke achtergrondkleur kiezen voor debet- of creditmutaties BankColorizeMovementName1=Achtergrondkleur voor debetmutatie BankColorizeMovementName2=Achtergrondkleur voor creditmutatie IfYouDontReconcileDisableProperty=Als u op sommige bankrekeningen geen bankafstemmingen uitvoert, schakelt u de eigenschap "%s" uit om deze waarschuwing te verwijderen. -NoBankAccountDefined=No bank account defined +NoBankAccountDefined=Geen bankrekening gedefinieerd +NoRecordFoundIBankcAccount=Geen record gevonden in de bankrekening. Vaak gebeurt dit wanneer een record handmatig is verwijderd uit de lijst van banktransacties (bijvoorbeeld tijdens een reconciliatie van de bankrekening). Een andere reden is dat de betaling was vastgelegd terwijl module "%s" was uitgeschakeld. diff --git a/htdocs/langs/nl_NL/bills.lang b/htdocs/langs/nl_NL/bills.lang index 845323b0228..67c2d0e00a5 100644 --- a/htdocs/langs/nl_NL/bills.lang +++ b/htdocs/langs/nl_NL/bills.lang @@ -52,11 +52,12 @@ Invoices=Facturen InvoiceLine=Factuur online InvoiceCustomer=Afnemersfactuur CustomerInvoice=Afnemersfactuur -CustomersInvoices=Afnemersfacturen +CustomersInvoices=Klantenfactuur SupplierInvoice=Factuur leverancier -SuppliersInvoices=Facturen leveranciers +SuppliersInvoices=Inkoopfacturen +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Factuur leverancier -SupplierBills=leveranciersfacturen +SupplierBills=Inkoopfacturen Payment=Betaling PaymentBack=Terugbetaling CustomerInvoicePaymentBack=Terugbetaling @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Betalingen gedaan PaymentsBackAlreadyDone=Al betaalde restitutie PaymentRule=Betalingsvoorwaarde PaymentMode=Betaalwijze +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debet / Kredietkaart PaymentTypePP=PayPal IdPaymentMode=Betaalwijze (id) @@ -373,6 +376,7 @@ DateLastGeneration=Aanmaakdatum laatste factuur DateLastGenerationShort=Datum laatste aanmaak MaxPeriodNumber=Max. aantal factuurgeneratie NbOfGenerationDone=Aantal reeds aangemaakte facturen +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Aantal malen gegenereerd MaxGenerationReached=Maximum aantal aanmaken bereikt InvoiceAutoValidate=Valideer facturen automatisch @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Binnen 14 dagen na het einde van de maand FixAmount=Vast bedrag - 1 regel met label '%s' VarAmount=Variabel bedrag (%% tot.) VarAmountOneLine=Variabel aantal (%% tot.) - 1 regel met label '%s' -VarAmountAllLines=Variabel bedrag (%% tot.) - allemaal dezelfde regels +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankoverboeking PaymentTypeShortVIR=Bankoverboeking @@ -494,12 +498,16 @@ Cash=Contant Reported=Uitgestelde DisabledBecausePayments=Niet beschikbaar omdat er betalingen bestaan CantRemovePaymentWithOneInvoicePaid=Verwijder onmogelijk wanneer er minstens een factuur betaald is ingedeeld. +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Verwachte betaling CantRemoveConciliatedPayment=Kan de afgestemde betaling niet verwijderen PayedByThisPayment=Betaald door deze betaling ClosePaidInvoicesAutomatically=Classificeer automatisch alle standaard, aanbetaling of vervangende facturen als "Betaald" wanneer de betaling volledig is uitgevoerd. ClosePaidCreditNotesAutomatically=Classificeer automatisch alle creditnota's als "Betaald" wanneer de terugbetaling volledig is gedaan. ClosePaidContributionsAutomatically=Classificeer automatisch alle sociale of fiscale bijdragen als "Betaald" bij volledige betaling. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Alle volledig betaalde facturen worden automatisch afgesloten met de status "Betaald". ToMakePayment=Betaal ToMakePaymentBack=Terugbetalen @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Maak eerst een standaard factuur en conver PDFCrabeDescription=Factuur PDF-sjabloon Crabe. Een volledig factuursjabloon (oude implementatie van Sponge-sjabloon) PDFSpongeDescription=Factuur PDF-sjabloon Sponge. Een complete sjabloon voor een factuur PDFCrevetteDescription=Factuur PDF-sjabloon 'Crevette'. Een compleet sjabloon voor facturen -TerreNumRefModelDesc1=Geeft een getal in de vorm van %syymm-nnnn voor standaard facturen en %syymm-nnnn voor creditnota's, met yy voor jaar, mm voor maand en nnnn als opeenvolgende getallenreeks die niet terug op 0 komt -MarsNumRefModelDesc1=Weergave met het formaat %syymm-nnnn voor standaardfacturen, %syymm-nnnn voor vervangende facturen, %syymm-nnnn voor aanbetalingsfacturen en %syymm-nnnn voor creditfacturen, waas yy staat voor jaar, mm voor maand en nnnn is de volgorde met geen onderbreking en geen 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Een wetsvoorstel te beginnen met $ syymm bestaat al en is niet compatibel met dit model van de reeks. Verwijderen of hernoemen naar deze module te activeren. -CactusNumRefModelDesc1=Weergave met het formaat %syymm-nnnn voor standaardfacturen, %syymm-nnnn voor creditnota's en %syymm-nnnn voor facturen met vooruitbetaling waarbij yy jaar is, mm is maand en nnnn een reeks is zonder onderbreking +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Vroege afsluiting reden EarlyClosingComment=Vroege afsluiting opmerking ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Als u dergelijke facturen automatisch wilt lat DeleteRepeatableInvoice=Verwijder tijdelijke factuur ConfirmDeleteRepeatableInvoice=Weet u zeker dat u dit sjabloon factuur wilt verwijderen? CreateOneBillByThird=Orders samentrekken tot één factuur aan per relatie (anders voor elke bestelling één factuur) -BillCreated=%s rekening(en) gecreëerd +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status aanmaken document DoNotGenerateDoc=Maak documentbestand niet aan AutogenerateDoc=Automatisch aanmaken documentbestand diff --git a/htdocs/langs/nl_NL/boxes.lang b/htdocs/langs/nl_NL/boxes.lang index 49eff98a42e..c6f5429c714 100644 --- a/htdocs/langs/nl_NL/boxes.lang +++ b/htdocs/langs/nl_NL/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistieken over de belangrijkste bedrijfsobjecten in de database BoxLoginInformation=Login Informatie BoxLastRssInfos=RSS-informatie BoxLastProducts=Nieuwste %s producten / services @@ -17,9 +18,13 @@ BoxLastActions=Laatste acties BoxLastContracts=Laatste contracten BoxLastContacts=Laatste contactpersonen- / adressenlijst BoxLastMembers=Laatste leden +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Laatste interventies BoxCurrentAccounts=Saldo van de geopende rekening BoxTitleMemberNextBirthdays=Verjaardagen van deze maand (leden) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Laatste %s nieuws van %s BoxTitleLastProducts=Producten / Diensten: laatste %s bewerkt BoxTitleProductsAlertStock=Producten: voorraadalarm @@ -95,8 +100,8 @@ LastXMonthRolling=De laatste %s maand overschrijdende ChooseBoxToAdd=Voeg widget toe aan uw dashboard BoxAdded=Widget is toegevoegd in je dashboard BoxTitleUserBirthdaysOfMonth=Verjaardagen van deze maand (gebruikers) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document +BoxLastManualEntries=Laatste record in boekhouding handmatig ingevoerd of zonder bron-document +BoxTitleLastManualEntries=%s laatste record handmatig of zonder bron-document ingevoerd NoRecordedManualEntries=Geen handmatige invoer opgenomen in boekhouding BoxSuspenseAccount=Tel boekhoudkundige bewerking met tussenrekening BoxTitleSuspenseAccount=Aantal niet-toegewezen lijnen @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Laatste %s klantverzendingen NoRecordedShipments=Geen geregistreerde klantverzending BoxCustomersOutstandingBillReached=Klanten met bereikt limiet # Pages -AccountancyHome=Boekhouden +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Gevalideerde projecten diff --git a/htdocs/langs/nl_NL/categories.lang b/htdocs/langs/nl_NL/categories.lang index 1f1c51d1027..41621088c83 100644 --- a/htdocs/langs/nl_NL/categories.lang +++ b/htdocs/langs/nl_NL/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Gebied met tags / categorieën voor leveranciers CustomersCategoriesArea=Klanten kenmerken/categorieën omgeving MembersCategoriesArea=Leden kenmerken/categorieën omgeving ContactsCategoriesArea=Contacten labels/categorieën omgeving -AccountsCategoriesArea=Labels/categorieën rekeningen +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Labels/categorieën projecten UsersCategoriesArea=Gebruikers tags / categorieën gebied SubCats=Sub-categorieën @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Wijs categorie toe aan leverancier ShowCategory=Toon label/categorie ByDefaultInList=Standaard in de lijst ChooseCategory=Kies categorie -StocksCategoriesArea=Categorieën voor magazijnen -ActionCommCategoriesArea=Categorieën voor gebeurtenissen +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea= Categorieën voor Page-Container UseOrOperatorForCategories=Gebruik of operator voor categorieën diff --git a/htdocs/langs/nl_NL/companies.lang b/htdocs/langs/nl_NL/companies.lang index c310afcbe4b..87945631845 100644 --- a/htdocs/langs/nl_NL/companies.lang +++ b/htdocs/langs/nl_NL/companies.lang @@ -43,9 +43,10 @@ Individual=Particulier ToCreateContactWithSameName=Maakt automatisch een contact / adres met dezelfde informatie als de derde partij onder de derde partij. In de meeste gevallen, zelfs als uw derde partij een fysiek persoon is, is het voldoende om alleen een derde partij te maken. ParentCompany=Moedermaatschappij Subsidiaries=Dochterondernemingen -ReportByMonth=Rapportage per maand -ReportByCustomers=Overzicht op klant -ReportByQuarter=Rapportage naar kwartaal +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Aanspreekvorm RegisteredOffice=Statutaire zetel Lastname=Achternaam @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI-nummer +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof. id 1 (SIREN) ProfId2FR=Prof. id 2 (SIRET) ProfId3FR=Prof. Id 3 (NAF, oude APE) ProfId4FR=Prof. id 4 (RCS / RM) -ProfId5FR=EORI-nummer +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof. id 1 (Registratienummer) ProfId2GB=- ProfId3GB=Prof. Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI-nummer +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxemburg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof. id 1 (NIPC) ProfId2PT=Prof. id 2 (Social security number) ProfId3PT=Prof. Id 3 (Commercial Record aantal) ProfId4PT=Prof. id 4 (Conservatorium) -ProfId5PT=EORI-nummer +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI-nummer +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Huidige openstaande rekening OutstandingBill=Max. voor openstaande rekening OutstandingBillReached=Max. krediet voor openstaande facturen is bereikt OrderMinAmount=Minimum orderbedrag -MonkeyNumRefModelDesc=Retourneer een getal met de notatie %syymm-nnnn voor de klantcode en %syymm-nnnn voor de leverancierscode waarbij yy jaar, mm is maand en nnnn een reeks is zonder pauze en geen terugkeer naar 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Afnemers- / leverancierscode is vrij. Deze code kan te allen tijde worden gewijzigd. ManagingDirectors=Manager(s) Naam (CEO, directeur, voorzitter ...) MergeOriginThirdparty=Dupliceren third party (third party die u wilt verwijderen) diff --git a/htdocs/langs/nl_NL/compta.lang b/htdocs/langs/nl_NL/compta.lang index 79d8621996a..36e512303e3 100644 --- a/htdocs/langs/nl_NL/compta.lang +++ b/htdocs/langs/nl_NL/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST-aankopen VATCollected=Geïnde BTW StatusToPay=Te betalen SpecialExpensesArea=Ruimte voor alle bijzondere betalingen +VATExpensesArea=Area for all TVA payments SocialContribution=Sociale of fiscale heffingen/belasting SocialContributions=Sociale of fiscale heffingen/belastingen SocialContributionsDeductibles=Aftrekbare sociale/fiscale lasten/belastingen @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Afnemersfactuur betaling PaymentSupplierInvoice=Betaling leverancier PaymentSocialContribution=Sociale/fiscale belastingbetaling PaymentVat=BTW betaling +AutomaticCreationPayment=Automatically record the payment ListPayment=Betalingenlijst ListOfCustomerPayments=Afnemersbetalingenlijst ListOfSupplierPayments=Lijst met leveranciersbetalingen @@ -104,6 +106,8 @@ LT2PaymentES=IRPF betaling LT2PaymentsES=IRPF Betalingen VATPayment=Betaling verkoop-belasting VATPayments=Betalingen verkoop-belasting +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=BTW Terugbetaling NewVATPayment=Nieuwe betaling BTW NewLocalTaxPayment=Nieuwe belasting %s betaling @@ -134,9 +138,17 @@ NoWaitingChecks=Geen cheques om af te storten. DateChequeReceived=Ontvangstdatum cheque NbOfCheques=Aantal cheques PaySocialContribution=Betaal een sociale/fiscale vordering -ConfirmPaySocialContribution=Weet u zeker dat u deze sociale of fiscale belasting wilt classificeren als betaald? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Verwijder een sociale/fiscale betaling -ConfirmDeleteSocialContribution=Weet u zeker dat u deze sociale- of fiscale belasting-betaling wilt verwijderen? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Sociale- en fiscale belastingen en betalingen CalcModeVATDebt=Mode <b>%sBTW op verbintenissenboekhouding %s.</b> CalcModeVATEngagement=Mode <b>%sBTW op de inkomens-uitgaven %s.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Het omvat de echte betalingen op facturen, uitgaven, btw en s RulesCADue=- Het omvat de verschuldigde facturen van de klant, of ze nu zijn betaald of niet. <br> - Het is gebaseerd op de factureringsdatum van deze facturen. <br> RulesCAIn=- Het omvat alle effectieve betalingen van facturen ontvangen van klanten. <br> - Het is gebaseerd op de betaaldatum van deze facturen <br> RulesCATotalSaleJournal=Het omvat alle kredietlijnen uit het verkoopdagboek. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Het bevat een record in uw grootboek met boekhoudrekeningen met de groep "KOSTEN" of "INKOMSTEN" RulesResultBookkeepingPredefined=Het bevat een record in uw grootboek met boekhoudrekeningen met de groep "KOSTEN" of "INKOMSTEN" RulesResultBookkeepingPersonalized=Het toont record in uw grootboek met boekhoudrekeningen <b>gegroepeerd op gepersonaliseerde groepen</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Verkoopbelastingrapport door relatie VATReportByCustomers=BTW-overzicht per klant VATReportByCustomersInInputOutputMode=Bevestigd door de klant btw geïnd en betaald VATReportByQuartersInInputOutputMode=Rapportage per belasting tarief van belasting geïnd en betaald +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Rapporteer belasting 2 per tarief LT2ReportByQuarters=Belastingaangifte 3 per tarief LT1ReportByQuartersES=Rapport per RE-tarief @@ -217,7 +231,7 @@ Pcg_subtype=Boekhouding ondersoort InvoiceLinesToDispatch=Factuurregels te verzenden ByProductsAndServices=Op product en service RefExt=Externe ref -ToCreateAPredefinedInvoice=Om een sjabloonfactuur te maken, maakt u een standaardfactuur en klikt u zonder deze te valideren op de knop "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=gekoppeld aan bestelling Mode1=Methode 1 Mode2=Methode 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=De speciale account die is gedefinieerd op de k ACCOUNTING_ACCOUNT_SUPPLIER=Grootboekrekening crediteuren ACCOUNTING_ACCOUNT_SUPPLIER_Desc=De speciale boekhoudrekening die op een kaart van een derde is gedefinieerd, wordt alleen voor boekhouding van Subledger gebruikt. Deze wordt gebruikt voor het grootboek en als standaardwaarde voor de boekhouding van de subadministratie als er geen accountadministratie voor leveranciers bij derden is gedefinieerd. ConfirmCloneTax=Bevestig de kloon van een sociale / fiscale belasting +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Kloon het voor volgende maand SimpleReport=Eenvoudig rapport AddExtraReport=Extra rapportages (voeg een rapport van binnen- en buitenlandse relaties toe) @@ -253,7 +269,8 @@ AccountingAffectation=Boekhoudopdracht LastDayTaxIsRelatedTo=Laatste dag van de periode waarop de belasting betrekking heeft VATDue=Verkoopbelasting geclaimd ClaimedForThisPeriod=Geclaimd voor de periode -PaidDuringThisPeriod=Betaald tijdens deze periode +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Per verkoop belastingtarief TurnoverbyVatrate=Omzet gefactureerd per omzetbelasting-tarief TurnoverCollectedbyVatrate=Omzet per BTW tarief @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Verzamelde inkoop-omzet RulesPurchaseTurnoverDue=- Het bevat de verschuldigde facturen van de leverancier, of ze nu zijn betaald of niet. <br> - Het is gebaseerd op de factuurdatum van deze facturen. <br> RulesPurchaseTurnoverIn=- Het omvat alle effectieve betalingen van facturen aan leveranciers. <br> - Het is gebaseerd op de betalingsdatum van deze facturen <br> RulesPurchaseTurnoverTotalPurchaseJournal=Het bevat alle debetregels uit het inkoopdagboek. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Inkoopbedrag gefactureerd ReportPurchaseTurnoverCollected=Verzamelde inkoop-omzet IncludeVarpaysInResults = Neem verschillende betalingen op in rapporten diff --git a/htdocs/langs/nl_NL/ecm.lang b/htdocs/langs/nl_NL/ecm.lang index b0b224d1835..4fbc753042e 100644 --- a/htdocs/langs/nl_NL/ecm.lang +++ b/htdocs/langs/nl_NL/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Bestand nog niet geïndexeerd in database (probeer d ExtraFieldsEcmFiles=Extrafields Ecm-bestanden ExtraFieldsEcmDirectories=Extrafields Ecm-mappen ECMSetup=ECM-instellingen +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/nl_NL/errors.lang b/htdocs/langs/nl_NL/errors.lang index e829cd22faf..754f7955bb9 100644 --- a/htdocs/langs/nl_NL/errors.lang +++ b/htdocs/langs/nl_NL/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Map <b>%s</b> niet gevonden (Verkeerd pad, te weinig rechten of ErrorFunctionNotAvailableInPHP=Functie <b>%s</b> is vereist voor deze functionaliteit, maar is niet beschikbaar in deze versie / installatie van PHP. ErrorDirAlreadyExists=Er bestaat al een map met deze naam. ErrorFileAlreadyExists=Er bestaat al een bestand met deze naam. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Het bestand is niet volledig ontvangen door de server. ErrorNoTmpDir=Tijdelijke map %s bestaat niet. ErrorUploadBlockedByAddon=Upload geblokkeerd door een PHP- en / of Apache-plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Fout bij het laden van een rekeningschema. Als enkele accou ErrorBadSyntaxForParamKeyForContent=Onjuiste syntaxis voor param keyforcontent. Moet een waarde hebben die begint met %s of %s ErrorVariableKeyForContentMustBeSet=Fout, de constante met de naam %s (met tekstinhoud om te tonen) of %s (met externe URL om te tonen) moet worden ingesteld. ErrorURLMustStartWithHttp=URL %s moet beginnen met http: // of https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Fout, de nieuwe referentie is al gebruikt ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Fout, verwijder betaling gekoppeld aan een gesloten factuur is niet mogelijk. ErrorSearchCriteriaTooSmall=Zoekcriteria te klein. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Publieke interface was niet ingeschakeld ErrorLanguageRequiredIfPageIsTranslationOfAnother=De taal van een nieuwe pagina moet worden gedefinieerd als deze is ingesteld als een vertaling van een andere pagina ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=De taal van de nieuwe pagina mag niet de brontaal zijn als deze is ingesteld als vertaling van een andere pagina ErrorAParameterIsRequiredForThisOperation=Een parameter is verplicht voor deze bewerking +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Uw PHP-parameter upload_max_filesize (%s) is hoger dan PHP-parameter post_max_size (%s). Dit is geen consistente opstelling. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Pas op, het toevoegen van bestandsinvoer WarningTheHiddenOptionIsOn=Pas op, de verborgen optie <b>%s</b> is ingeschakeld. WarningCreateSubAccounts=Waarschuwing, u kunt niet rechtstreeks een subaccount aanmaken, u moet een derde partij of een gebruiker aanmaken en hen een boekhoudcode toewijzen om ze in deze lijst te vinden WarningAvailableOnlyForHTTPSServers=Alleen beschikbaar als u een beveiligde HTTPS-verbinding gebruikt. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/nl_NL/externalsite.lang b/htdocs/langs/nl_NL/externalsite.lang index 1a4033fb34b..1685de63461 100644 --- a/htdocs/langs/nl_NL/externalsite.lang +++ b/htdocs/langs/nl_NL/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Instellingen voor de link naar een externe website -ExternalSiteURL=Externe website URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module Externe Site werd niet correct geconfigureerd. ExampleMyMenuEntry=Mijn menu-item diff --git a/htdocs/langs/nl_NL/main.lang b/htdocs/langs/nl_NL/main.lang index e55cb6e1942..a74a1521259 100644 --- a/htdocs/langs/nl_NL/main.lang +++ b/htdocs/langs/nl_NL/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Wijzigingsdatum IPModification=Wijziging IP DateLastModification=Laatste wijzigingsdatum DateValidation=Validatiedatum +DateSigning=Signing date DateClosing=Sluitingsdatum DateDue=Vervaldatum DateValue=Valutadatum @@ -361,9 +362,9 @@ UnitPriceHTCurrency=Eenheidsprijs (excl.) (Valuta) UnitPriceTTC=Eenheidsprijs (bruto) PriceU=E.P. PriceUHT=EP (netto) -PriceUHTCurrency=Valuta +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. belasting) -Amount=Hoeveelheid +Amount=Bedrag AmountInvoice=Factuurbedrag AmountInvoiced=Gefactureerd bedrag AmountInvoicedHT=Gefactureerd bedrag (excl. BTW) @@ -389,6 +390,8 @@ AmountTotal=Totaal bedrag AmountAverage=Gemiddeld bedrag PriceQtyMinHT=Prijs hoeveelheid min. (excl. belasting) PriceQtyMinHTCurrency=Prijs hoeveelheid min. (excl. belasting) (valuta) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Totaal SubTotal=Subtotaal @@ -724,7 +727,7 @@ MenuMembers=Leden MenuAgendaGoogle=Google-agenda MenuTaxesAndSpecialExpenses=Belastingen | Bijzondere kosten ThisLimitIsDefinedInSetup=Dolibarr limiet (Menu Home-Instellingen-Beveiliging): %s Kb, PHP grens: %s Kb -NoFileFound=Geen documenten die zijn opgeslagen in deze map +NoFileFound=No documents uploaded CurrentUserLanguage=Huidige taal CurrentTheme=Actuele thema CurrentMenuManager=Huidige menu manager @@ -899,8 +902,10 @@ ViewAccountList=Grootboek bekijken ViewSubAccountList=Bekijk het grootboek van de subrekening RemoveString='%s' string verwijderen SomeTranslationAreUncomplete=Sommige aangeboden talen zijn mogelijk slechts gedeeltelijk vertaald of kunnen fouten bevatten. Help ons om uw taal te corrigeren door u te registreren op <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> om uw verbeteringen toe te voegen. -DirectDownloadLink=Directe download link (openbaar/extern) -DirectDownloadInternalLink=Directe downloadlink (moet worden gelogd en heeft machtigingen nodig) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Downloaden DownloadDocument=Download document ActualizeCurrency=Bijwerken valutakoers @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacten SearchIntoMembers=Leden SearchIntoUsers=Gebruikers SearchIntoProductsOrServices=Diensten of Producten +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projecten SearchIntoMO=Productieorders SearchIntoTasks=Taken @@ -1049,12 +1055,13 @@ KeyboardShortcut=Sneltoets AssignedTo=Geaffecteerden Deletedraft=Concept verwijderen ConfirmMassDraftDeletion=Bevestiging van de massa-verwijdering -FileSharedViaALink=Bestand gedeeld via een link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Selecteer eerst een derde ... YouAreCurrentlyInSandboxMode=U bent momenteel in de %s "sandbox" -modus Inventory=Inventarisering AnalyticCode=Analisten code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Meer info weergeven NoFilesUploadedYet=Upload eerst een document SeePrivateNote=Zie privébrief @@ -1120,3 +1127,5 @@ AffectTag=Heeft invloed op de tag ConfirmAffectTag=invloed op bulk-tag ConfirmAffectTagQuestion=Weet u zeker dat u tags wilt beïnvloeden voor de %s geselecteerde record (s)? CategTypeNotFound=Geen tag-soort gevonden voor type records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/nl_NL/margins.lang b/htdocs/langs/nl_NL/margins.lang index fd532245afa..dae8b70553b 100644 --- a/htdocs/langs/nl_NL/margins.lang +++ b/htdocs/langs/nl_NL/margins.lang @@ -22,7 +22,7 @@ ProductService=Trainning of Dienst AllProducts=Alle Trainingen en Diensten ChooseProduct/Service=Kies Training of Dienst ForceBuyingPriceIfNull=Forceren inkoop/kostprijs naar verkoopprijs als dit niet is gedefinieerd -ForceBuyingPriceIfNullDetails=Als inkoop / kostprijs niet is gedefinieerd en deze optie staat op "AAN", zal de marge nul zijn (inkoop / kostprijs = verkoopprijs). Indien ("UIT"), zal marge gelijk zijn aan de voorgestelde standaard. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Marge methode voor globale discounts UseDiscountAsProduct=Als een training UseDiscountAsService=Als een dienst diff --git a/htdocs/langs/nl_NL/members.lang b/htdocs/langs/nl_NL/members.lang index ee9c303d352..4a98f54c8d8 100644 --- a/htdocs/langs/nl_NL/members.lang +++ b/htdocs/langs/nl_NL/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Lijst van conceptleden (te valideren) MembersListValid=Lijst van geldige leden MembersListUpToDate=Geldige leden met een up-to-date abonnement MembersListNotUpToDate=Geldige leden met een verouderd abonnement +MembersListExcluded=List of excluded members MembersListResiliated=Lijst verwijderde leden MembersListQualified=Lijst van gekwalificeerde leden MenuMembersToValidate=Conceptleden MenuMembersValidated=Gevalideerde leden +MenuMembersExcluded=Excluded members MenuMembersResiliated=Verwijderde leden MembersWithSubscriptionToReceive=Leden die abonnement moeten ontvangen MembersWithSubscriptionToReceiveShort=Abonnement ontvangen @@ -47,9 +49,12 @@ MemberStatusActiveLate=Abonnement verlopen MemberStatusActiveLateShort=Verlopen MemberStatusPaid=Abonnement bijgewerkt MemberStatusPaidShort=Bijgewerkt +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Verwijderd lid MemberStatusResiliatedShort=Verwijderd MembersStatusToValid=Conceptleden +MembersStatusExcluded=Excluded members MembersStatusResiliated=Verwijderde leden MemberStatusNoSubscription=Gevalideerd (geen abonnement vereist) MemberStatusNoSubscriptionShort=Gevalideerd @@ -82,6 +87,8 @@ Physical=Fysiek Moral=Moreel MorAndPhy=Moreel en fysiek Reenable=Opnieuw inschakelen +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Verwijder een lid ConfirmResiliateMember=Weet je zeker dat je dit lidmaatschap wilt beëindigen? DeleteMember=Lid verwijderen @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-mailsjabloon om te gebruiken om DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-mailsjabloon om te gebruiken om e-mail naar een lid te sturen bij nieuwe abonnementopname DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-mailsjabloon om te gebruiken om e-mailherinnering te verzenden wanneer het abonnement afloopt DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-mailsjabloon om te gebruiken om e-mail naar een lid te verzenden bij annulering van een lid +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=E-mail afzender voor automatische e-mails DescADHERENT_ETIQUETTE_TYPE=Etikettenformaat DescADHERENT_ETIQUETTE_TEXT=Tekst op leden adres-blad @@ -162,6 +170,7 @@ DocForLabels=Genereer adresvellen (formaat voor de uitvoer zoals ingesteld: <b>% SubscriptionPayment=Betaling van abonnement LastSubscriptionDate=Datum van laatste abonnementbetaling LastSubscriptionAmount=Bedrag van het laatste abonnement +LastMemberType=Last Member type MembersStatisticsByCountries=Leden statistieken per land MembersStatisticsByState=Leden statistieken per staat / provincie MembersStatisticsByTown=Leden van de statistieken per gemeente diff --git a/htdocs/langs/nl_NL/modulebuilder.lang b/htdocs/langs/nl_NL/modulebuilder.lang index 767bee4b08a..8d622f598cf 100644 --- a/htdocs/langs/nl_NL/modulebuilder.lang +++ b/htdocs/langs/nl_NL/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Ik wil enkele documenten genereren van het object IncludeDocGenerationHelp=Als u dit aanvinkt, wordt er een code gegenereerd om een vak "Document genereren" aan de record toe te voegen. ShowOnCombobox=Waarde weergeven in combobox KeyForTooltip=Sleutel voor knopinfo -CSSClass=CSS-klasse +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Niet bewerkbaar ForeignKey=Vreemde sleutel TypeOfFieldsHelp=Type velden: <br> varchar (99), dubbel (24,8), real, tekst, html, datetime, timestamp, integer, integer: ClassName: relativepath / to / classfile.class.php [: 1 [: filter]] ('1' betekent we voegen een + -knop toe na de combo om het record te maken, 'filter' kan 'status = 1 EN fk_user = __USER_ID EN entiteit IN (bijvoorbeeld __SHARED_ENTITIES__)' zijn) diff --git a/htdocs/langs/nl_NL/orders.lang b/htdocs/langs/nl_NL/orders.lang index 9ec42fd206a..ca02737b418 100644 --- a/htdocs/langs/nl_NL/orders.lang +++ b/htdocs/langs/nl_NL/orders.lang @@ -16,6 +16,8 @@ ToOrder=Te bestellen MakeOrder=Opdracht indienen SupplierOrder=Bestelling SuppliersOrders=Inkooporders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Huidige inkooporders CustomerOrder=Klantorder CustomersOrders=Verkooporders diff --git a/htdocs/langs/nl_NL/other.lang b/htdocs/langs/nl_NL/other.lang index 3b019f24cb7..15ae208dd41 100644 --- a/htdocs/langs/nl_NL/other.lang +++ b/htdocs/langs/nl_NL/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Bedrijf met meerdere activiteiten (alle hoofdmodules) CreatedBy=Gecreëerd door %s ModifiedBy=Gewijzigd door %s ValidatedBy=Gevalideerd door %s +SignedBy=Signed by %s ClosedBy=Gesloten door %s CreatedById=Aangemaakt door gebruiker ID ModifiedById=Gebruikers-ID van diegene die de laatste wijziging heeft aangebracht @@ -244,6 +245,7 @@ NewKeyIs=Dit is uw nieuwe sleutel om in te loggen NewKeyWillBe=Uw nieuwe sleutel in te loggen zal zijn ClickHereToGoTo=Klik hier om naar %s YouMustClickToChange=Je moet echter wel eerst klikken op de volgende link om de wachtwoord wijziging te valideren +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Als u deze wijziging niet heeft aangevraagd, negeer deze e-mail. Uw referenties blijven veilig bewaard. IfAmountHigherThan=Indien bedrag hoger dan <strong>%s</strong> SourcesRepository=Repository voor bronnen diff --git a/htdocs/langs/nl_NL/productbatch.lang b/htdocs/langs/nl_NL/productbatch.lang index 3c77db06fef..8f65a606600 100644 --- a/htdocs/langs/nl_NL/productbatch.lang +++ b/htdocs/langs/nl_NL/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Gebruik lot / serienummer -ProductStatusOnBatch=Ja (lot / serienummer vereist) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Nee (lot / serial niet gebruikt) -ProductStatusOnBatchShort=Ja +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nee Batch=Lot / Serienummer atleast1batchfield=Vervaldatum of uiterste verkoopdatum of Lot / Serienummer @@ -22,3 +24,12 @@ ProductLotSetup=Module instellingen voor lot/serial ShowCurrentStockOfLot=Toon huidige voorraad voor product/lot paar ShowLogOfMovementIfLot=Toon bewegingslogboek voor product/lot paar StockDetailPerBatch=Voorraad details per lot +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/nl_NL/products.lang b/htdocs/langs/nl_NL/products.lang index 0e20bb8eea2..50675925d5f 100644 --- a/htdocs/langs/nl_NL/products.lang +++ b/htdocs/langs/nl_NL/products.lang @@ -22,7 +22,7 @@ ProductVatMassChangeDesc=Deze tool werkt het btw-tarief bij dat op <b><u>ALLE</u MassBarcodeInit=Mass barcode init MassBarcodeInitDesc=Deze pagina kan worden gebruikt om een ​​streepjescode op objecten die geen streepjescode hebben gedefinieerd. Controleer voor dat setup van de module barcode is ingesteld. ProductAccountancyBuyCode=Grootboeknummer inkoopboek -ProductAccountancyBuyIntraCode=Boekhoudcode (aankoop intracommunautair) +ProductAccountancyBuyIntraCode=Grootboeknummer (aankoop intracommunautair) ProductAccountancyBuyExportCode=Boekhoudcode (import importeren) ProductAccountancySellCode=Grootboeknummer verkoopboek ProductAccountancySellIntraCode=Grootboekrekening (verkoop binnen de Gemeenschap) @@ -141,6 +141,7 @@ VATRateForSupplierProduct=BTW-tarief (voor deze leverancier / dit product) DiscountQtyMin=Korting bij dit aantal NoPriceDefinedForThisSupplier=Geen prijs / aantal gedefinieerd voor deze leverancier / product NoSupplierPriceDefinedForThisProduct=Geen leveranciersprijs / aantal gedefinieerd voor dit product +PredefinedItem=Predefined item PredefinedProductsToSell=Voorgedefinieerd product PredefinedServicesToSell=Vooraf gedefinieerde service PredefinedProductsAndServicesToSell=Voorgedefinieerde producten/diensten voor koop @@ -313,7 +314,7 @@ LastUpdated=Laatst bijgewerkt CorrectlyUpdated=Correct bijgewerkt PropalMergePdfProductActualFile=Gebruikte bestanden om toe te voegen aan PDF Azur zijn/is PropalMergePdfProductChooseFile=Selecteer PDF bestanden -IncludingProductWithTag=Inclusief product/dienst met label +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Standaard verkoopprijs, echte verkoopprijs kan bij klant zijn vastgelegd WarningSelectOneDocument=Selecteer tenminste één document DefaultUnitToShow=Eenheid diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index f0262ca798c..16fa0f84f88 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Lijst met taken GoToListOfTimeConsumed=Ga naar de lijst met tijd die is verbruikt GanttView=Gantt-weergave +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Lijst van de commerciële voorstellen met betrekking tot het project ListOrdersAssociatedProject=Lijst met verkooporders gerelateerd aan het project ListInvoicesAssociatedProject=Lijst met klantfacturen gerelateerd aan het project @@ -268,3 +269,7 @@ OneLinePerTask=Eén regel per taak OneLinePerPeriod=Eén regel per periode RefTaskParent=Ref. Bovenliggende taak ProfitIsCalculatedWith=Winst wordt berekend met +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/nl_NL/propal.lang b/htdocs/langs/nl_NL/propal.lang index ed9e284c461..cecfecdff60 100644 --- a/htdocs/langs/nl_NL/propal.lang +++ b/htdocs/langs/nl_NL/propal.lang @@ -59,6 +59,7 @@ ConfirmClonePropal=Weet u zeker dat u offerte <b>%s</b> wilt kopiëren? ConfirmReOpenProp=Weet u zeker dat u offerte <b>%s</b> opnieuw wilt openen? ProposalsAndProposalsLines=Offertes en offerteregels ProposalLine=Offerteregel +ProposalLines=Proposal lines AvailabilityPeriod=Leveringstermijn SetAvailability=Bepaal leveringstermijn AfterOrder=na bestelling diff --git a/htdocs/langs/nl_NL/stocks.lang b/htdocs/langs/nl_NL/stocks.lang index db940c6cf37..bdbeef3b7d2 100644 --- a/htdocs/langs/nl_NL/stocks.lang +++ b/htdocs/langs/nl_NL/stocks.lang @@ -19,8 +19,8 @@ Stock=Voorraad Stocks=Voorraden MissingStocks=Ontbrekende voorraad StockAtDate=Voorraden op datum -StockAtDateInPast=Datum uit het verleden -StockAtDateInFuture=Toekomstige datum +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Voorraad volgorde op lot/serienummer LotSerial=Partij/Serienummer LotSerialList=Overzicht van partij/serienummers @@ -37,8 +37,8 @@ AllWarehouses=Alle magazijnen IncludeEmptyDesiredStock=Voeg ook een negatieve voorraad toe met een ongedefinieerde gewenste voorraad IncludeAlsoDraftOrders=Neem ook conceptorders op Location=Locatie -LocationSummary=Korte naam locatie -NumberOfDifferentProducts=Aantal verschillende producten +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Totaal aantal producten LastMovement=Laatste verplaatsing LastMovements=Laatste mutaties @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Voorraadwaardering UserWarehouseAutoCreate=Creëer automatisch een gebruikersmagazijn wanneer u een gebruiker aanmaakt AllowAddLimitStockByWarehouse=Beheer ook de waarde voor minimale en gewenste voorraad per paar (productmagazijn) naast de waarde voor minimale en gewenste voorraad per product RuleForWarehouse=Voorwaarden magazijnen -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Stel een magazijn in op Verkooporders UserDefaultWarehouse=Stel een magazijn in op gebruikers MainDefaultWarehouse=Standaardmagazijn @@ -97,15 +98,16 @@ RealStockDesc=Fysieke/echte voorraad is de voorraad die momenteel in de magazijn RealStockWillAutomaticallyWhen=De werkelijke voorraad wordt aangepast volgens deze regel (zoals gedefinieerd in de module Voorraad): VirtualStock=Virtuele voorraad VirtualStockAtDate=Virtuele voorraad op datum -VirtualStockAtDateDesc=Virtuele voorraad zodra alle lopende bestellingen die volgens de planning vóór de datum moeten worden gedaan, zijn voltooid +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished VirtualStockDesc=Virtuele voorraad is de berekende voorraad die beschikbaar is zodra alle openstaande / lopende acties (die van invloed zijn op voorraden) zijn gesloten (inkooporders ontvangen, verkooporders verzonden, productieorders geproduceerd, enz.) +AtDate=At date IdWarehouse=Magazijn-ID DescWareHouse=Beschrijving magazijn LieuWareHouse=Localisatie magazijn WarehousesAndProducts=Magazijn en producten WarehousesAndProductsBatchDetail=Magazijnen en producten (met detail per lot/serieenummer) AverageUnitPricePMPShort=Waardering (PMP) -AverageUnitPricePMPDesc=De input gemiddelde eenheidsprijs die we aan leveranciers moesten betalen om het product in onze voorraad te krijgen. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Verkopen Prijs per Eenheid EstimatedStockValueSellShort=Verkoopwaarde EstimatedStockValueSell=Verkoopwaarde @@ -145,7 +147,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=Selecteer een bronmagazijn en een doelmagazijn, een product en een hoeveelheid en klik op "%s". Zodra dit is gedaan voor alle vereiste bewegingen, klikt u 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 on "%s". RecordMovement=Vastleggen verplaatsing ReceivingForSameOrder=Ontvangsten voor deze bestelling StockMovementRecorded=Geregistreerde voorraadbewegingen @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Het voorraadniveau moet voldoende zijn om het produc StockMustBeEnoughForOrder=Het voorraadniveau moet voldoende zijn om product / dienst aan de bestelling toe te voegen (controle wordt uitgevoerd op de huidige reële voorraad wanneer een regel wordt toegevoegd, ongeacht de regel voor automatische voorraadwijziging) StockMustBeEnoughForShipment= Voorraadniveau moet voldoende zijn om product / dienst aan verzending toe te voegen (controle wordt uitgevoerd op huidige reële voorraad bij het toevoegen van een regel aan verzending, ongeacht de regel voor automatische voorraadwijziging) MovementLabel=Label van de verplaatsing -TypeMovement=Type beweging +TypeMovement=Direction of movement DateMovement=Datum van verplaatsing InventoryCode=Verplaatsing of inventaris code IsInPackage=Vervat in pakket @@ -183,6 +185,7 @@ inventoryCreatePermission=Aanmaken nieuwe inventarisatie inventoryReadPermission=Bekijk inventarisaties inventoryWritePermission=Bijwerken inventarisaties inventoryValidatePermission=Inventarisatie goedkeuren +inventoryDeletePermission=Delete inventory inventoryTitle=Inventarisering inventoryListTitle=Inventariseringen inventoryListEmpty=Geen inventarisering in opbouw @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Voorraad is vereist om te kiezen welk lot t ForceTo=Toevoegen aan AlwaysShowFullArbo=Volledige boomstructuur van magazijn weergeven op pop-up van magazijnkoppelingen (Waarschuwing: dit kan de prestaties drastisch verminderen) StockAtDatePastDesc=U kunt hier de echte voorraad op een bepaalde datum in het verleden bekijken -StockAtDateFutureDesc=U kunt hier de virtuele voorraad op een bepaalde datum in de toekomst bekijken +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Huidige voorraad InventoryRealQtyHelp=Stel de waarde in op 0 om het aantal te resetten<br>Veld leeg laten of regel verwijderen om ongewijzigd te houden -UpdateByScaning=Update door te scannen +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update door scan (product barcode) UpdateByScaningLot=Update door scan (partij/serie barcode) DisableStockChangeOfSubProduct=De-activeer tijdens deze bewerking de voorraad voor alle subproducten van deze kit. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Heropenen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/nl_NL/suppliers.lang b/htdocs/langs/nl_NL/suppliers.lang index dd087ffdb83..e6f61a6c2da 100644 --- a/htdocs/langs/nl_NL/suppliers.lang +++ b/htdocs/langs/nl_NL/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Leveranciers SuppliersInvoice=Factuur leverancier +SupplierInvoices=Inkoopfacturen ShowSupplierInvoice=Toon factuur van leverancier NewSupplier=Nieuwe leverancier History=Geschiedenis diff --git a/htdocs/langs/nl_NL/ticket.lang b/htdocs/langs/nl_NL/ticket.lang index 51f8fe3a18c..bcfe4a2f113 100644 --- a/htdocs/langs/nl_NL/ticket.lang +++ b/htdocs/langs/nl_NL/ticket.lang @@ -70,6 +70,8 @@ Deleted=Verwijderd # Dict Type=Type Severity=Prioriteit +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Om e-mail van ticket bericht te verzenden @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Toon het logo van de module in de openbare interface TicketsShowModuleLogoHelp=Schakel deze optie in om het logo op de pagina's van de openbare interface te verbergen TicketsShowCompanyLogo=Toon het logo van het bedrijf in de openbare interface TicketsShowCompanyLogoHelp=Schakel deze optie in om het logo van het bedrijf op de pagina's van de openbare interface te verbergen -TicketsEmailAlsoSendToMainAddress=Stuur ook een melding naar het hoofd e-mailadres -TicketsEmailAlsoSendToMainAddressHelp=Schakel deze optie in om een e-mail te verzenden naar het adres "E-mailmelding van" (zie onderstaande instellingen) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Beperk de weergave tot tickets die zijn toegewezen aan de huidige gebruiker (niet effectief voor externe gebruikers, altijd beperkt tot de derde partij waarvan ze afhankelijk zijn) TicketsLimitViewAssignedOnlyHelp=Alleen tickets die zijn toegewezen aan de huidige gebruiker zijn zichtbaar. Is niet van toepassing op een gebruiker met toegangsrechten voor tickets. TicketsActivatePublicInterface=Publieke interface activeren @@ -126,10 +128,10 @@ TicketNumberingModules=Nummering module voor tickets TicketsModelModule=Documentsjablonen voor tickets TicketNotifyTiersAtCreation=Breng relatie op de hoogte bij het aanmaken 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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) TicketPublicNotificationNewMessageDefaultEmail=E-mailmeldingen voor (update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Stuur e-mailmeldingen voor nieuwe berichten naar dit adres als aan het ticket geen gebruiker is toegewezen of de gebruiker geen e-mail heeft. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Laatst gewijzigde tickets BoxLastModifiedTicketDescription=Laatste %s gewijzigde tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Geen recent gewijzigde tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/nl_NL/users.lang b/htdocs/langs/nl_NL/users.lang index d22bd138009..3866d958572 100644 --- a/htdocs/langs/nl_NL/users.lang +++ b/htdocs/langs/nl_NL/users.lang @@ -72,7 +72,7 @@ ExportDataset_user_1=Gebruikers en hun eigenschappen DomainUser=Domeingebruikersaccount %s Reactivate=Reactiveren CreateInternalUserDesc=Met dit formulier kunt u een interne gebruiker in uw bedrijf / organisatie maken. Om een externe gebruiker (klant, leverancier etc. ..) aan te maken, gebruikt u de knop "Aanmaken Dolibarr gebruiker" van de contactkaart van die relatie. -InternalExternalDesc=Een <b> interne </b>-gebruiker is een gebruiker die deel uitmaakt van uw bedrijf / organisatie. <br> Een externe <b> externe </b>-gebruiker is een klant, leverancier of andere (het aanmaken van een externe gebruiker voor een derde partij kan worden gedaan vanuit het contactrecord van de derde partij). <br> <br> In beide gevallen definieert de machtiging rechten op Dolibarr, ook kan de externe gebruiker een andere menumanager hebben dan de interne gebruiker (zie Home - Setup - Display) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Toestemming verleend, omdat geërfd van een bepaalde gebruikersgroep. Inherited=Overgeërfd UserWillBe=De aangemaakte gebruiker zal zijn diff --git a/htdocs/langs/nl_NL/website.lang b/htdocs/langs/nl_NL/website.lang index a2424762f54..8dc5e4b9675 100644 --- a/htdocs/langs/nl_NL/website.lang +++ b/htdocs/langs/nl_NL/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u> Gebruik met Apache / NGinx / ... </u> <br> Creëer op uw ExampleToUseInApacheVirtualHostConfig=Voorbeeld om te gebruiken in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Gebruik met PHP embedded server</u> <br> In een ontwikkelomgeving kunt u de site het liefst testen met de ingebouwde PHP-webserver (PHP 5.5 vereist) <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Beheer uw website met een andere Dolibarr Hosting-provider</u> <br> Als u geen webserver zoals Apache of NGinx beschikbaar heeft op internet, kunt u uw website exporteren en importeren in een ander Dolibarr-exemplaar van een andere Dolibarr-hostingprovider die volledige integratie met de websitemodule biedt. U kunt een lijst met sommige Dolibarr-hostingproviders vinden op <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Controleer ook of virtuele host toestemming <strong>%s heeft</strong> voor bestanden in <br> <strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Lezen WritePerm=Schrijven TestDeployOnWeb=Testen / implementeren op internet PreviewSiteServedByWebServer=<u>Voorbeeld %s op een nieuw tabblad.</u> <br><br> De %s wordt bediend door een externe webserver (zoals Apache, Nginx, IIS). U moet deze server installeren en instellen voordat u naar de map verwijst: <br> <strong>%s</strong> <br> URL aangeboden door externe server: <br> <strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Voorbeeld %s op een nieuw tabblad.</u> <br><br> De %s wordt bediend door de Dolibarr-server, dus er is geen extra webserver (zoals Apache, Nginx, IIS) nodig om te worden geïnstalleerd. <br> Het onhandige is dat de URL van pagina's niet gebruiksvriendelijk is en begint met het pad van uw Dolibarr. <br> URL aangeboden door Dolibarr: <br> <strong>%s</strong> <br><br> Als u uw eigen externe webserver wilt gebruiken om deze website te bedienen, maakt u een virtuele host op uw webserver die naar de directory verwijst <br> <strong>%s</strong> <br> voer vervolgens de naam van deze virtuele server in en klik op de andere voorbeeldknop. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL van de virtuele host bediend door externe webserver niet gedefinieerd NoPageYet=Nog geen pagina's YouCanCreatePageOrImportTemplate=U kunt een nieuwe pagina maken of een volledige websitesjabloon importeren @@ -137,3 +137,11 @@ PagesRegenerated=%s pagina ('s) / container (s) her-aangemaakt RegenerateWebsiteContent=Genereer cachebestanden van websites opnieuw AllowedInFrames=Toegestaan in frames DefineListOfAltLanguagesInWebsiteProperties=Definieer een lijst van alle beschikbare talen in website-eigenschappen. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/nl_NL/zapier.lang b/htdocs/langs/nl_NL/zapier.lang index f9f576f9fbe..f36e42cd18a 100644 --- a/htdocs/langs/nl_NL/zapier.lang +++ b/htdocs/langs/nl_NL/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier voor Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier voor Dolibarr-module - -# -# Admin page -# -ZapierForDolibarrSetup = Installatie van Zapier voor Dolibarr +ZapierForDolibarrSetup=Installatie van Zapier voor Dolibarr ZapierDescription=Interface met Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/pl_PL/accountancy.lang b/htdocs/langs/pl_PL/accountancy.lang index f7345886c7e..dab89cc501b 100644 --- a/htdocs/langs/pl_PL/accountancy.lang +++ b/htdocs/langs/pl_PL/accountancy.lang @@ -10,36 +10,36 @@ ACCOUNTING_EXPORT_AMOUNT=Eksportuj kwoty ACCOUNTING_EXPORT_DEVISE=Eksportuj waluty Selectformat=Wybierz format dla pliku ACCOUNTING_EXPORT_FORMAT=Wybierz format dla pliku -ACCOUNTING_EXPORT_ENDLINE=Select the carriage return type +ACCOUNTING_EXPORT_ENDLINE=Wybierz typ powrotu karetki ACCOUNTING_EXPORT_PREFIX_SPEC=Przedrostek w nazwie pliku ThisService=Ta usługa ThisProduct=Ten produkt DefaultForService=Domyślny dla usługi DefaultForProduct=Domyślny dla produktu -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty +ProductForThisThirdparty=Produkt dla tego kontrahenta +ServiceForThisThirdparty=Usługa dla tego kontrahenta CantSuggest=Nie mogę zasugerować -AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s -ConfigAccountingExpert=Configuration of the module accounting (double entry) +AccountancySetupDoneFromAccountancyMenu=Większość ustawień księgowości odbywa się z menu %s +ConfigAccountingExpert=Konfiguracja rozliczania modułu (podwójny wpis) Journalization=Dokumentowanie Journals=Dzienniki JournalFinancial=Dzienniki finansowe BackToChartofaccounts=Zwróć plan kont Chartofaccounts=Plan kont -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfSubaccounts=Plan kont indywidualnych +ChartOfIndividualAccountsOfSubsidiaryLedger=Plan kont indywidualnych księgi pomocniczej CurrentDedicatedAccountingAccount=Aktualne dedykowane konto AssignDedicatedAccountingAccount=Nowe konto do przypisania InvoiceLabel=Etykieta faktury -OverviewOfAmountOfLinesNotBound=Overview of amount of lines not bound to an accounting account -OverviewOfAmountOfLinesBound=Overview of amount of lines already bound to an accounting account +OverviewOfAmountOfLinesNotBound=Przegląd ilości linii niezwiązanych z kontem księgowym +OverviewOfAmountOfLinesBound=Przegląd ilości linii już powiązanych z kontem księgowym OtherInfo=Inne informacje DeleteCptCategory=Usuń konto księgowe z grupy -ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group? +ConfirmDeleteCptCategory=Czy na pewno chcesz usunąć to konto księgowe z grupy kont księgowych? JournalizationInLedgerStatus=Status dokumentowania -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 +AlreadyInGeneralLedger=Już przeniesione w dziennikach księgowych i księdze +NotYetInGeneralLedger=Jeszcze nie przeniesione w dziennikach księgowych i księdze rachunkowej +GroupIsEmptyCheckSetup=Grupa jest pusta, sprawdź konfigurację spersonalizowanej grupy księgowej DetailByAccount=Pokaż szczegóły konta AccountWithNonZeroValues=Konta z wartościami niezerowymi ListOfAccounts=Lista kont @@ -47,57 +47,57 @@ CountriesInEEC=Kraje UE CountriesNotInEEC=Kraje spoza UE CountriesInEECExceptMe=Kraje UE oprócz %s CountriesExceptMe=Wszystkie kraje oprócz %s -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 -VueBySubAccountAccounting=View by accounting subaccount +AccountantFiles=Eksportuj dokumenty źródłowe +ExportAccountingSourceDocHelp=Za pomocą tego narzędzia możesz wyeksportować zdarzenia źródłowe (listy i pliki PDF), które zostały użyte do wygenerowania Twojej księgowości. Aby wyeksportować swoje dzienniki, użyj pozycji menu %s - %s. +VueByAccountAccounting=Wyświetl według konta księgowego +VueBySubAccountAccounting=Wyświetl według subkonta księgowego MainAccountForCustomersNotDefined=Główne konto księgowe dla klientów nie zdefiniowane w ustawieniach MainAccountForSuppliersNotDefined=Główne konto rozliczeniowe dla dostawców niezdefiniowane w konfiguracji MainAccountForUsersNotDefined=Główne konto księgowe dla użytkowników nie zdefiniowane w ustawieniach MainAccountForVatPaymentNotDefined=Główne konto księgowe dla płatności VAT nie zdefiniowane w ustawieniach -MainAccountForSubscriptionPaymentNotDefined=Main accounting account for subscription payment not defined in setup +MainAccountForSubscriptionPaymentNotDefined=Główne konto księgowe dla płatności za subskrypcję nie zostało zdefiniowane w konfiguracji AccountancyArea=Strefa księgowości -AccountancyAreaDescIntro=Usage of the accountancy module is done in several step: +AccountancyAreaDescIntro=Korzystanie z modułu księgowości odbywa się w kilku etapach: AccountancyAreaDescActionOnce=Następujące akcje są wykonywane zwykle tylko raz lub raz w roku... -AccountancyAreaDescActionOnceBis=Next steps should be done to save you time in future by suggesting you the correct default accounting account when making the journalization (writing record in Journals and General ledger) +AccountancyAreaDescActionOnceBis=Należy podjąć kolejne kroki, aby zaoszczędzić czas w przyszłości, sugerując prawidłowe domyślne konto księgowe podczas sporządzania dziennika (zapis w dziennikach i księdze głównej) AccountancyAreaDescActionFreq=Następujące akcje są wykonywane zwykle każdego miesiąca, tygodnia lub dnia dla naprawdę wielkich firm... -AccountancyAreaDescJournalSetup=STEP %s: Create or check content of your journal list from 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 +AccountancyAreaDescJournalSetup=KROK %s: Utwórz lub sprawdź zawartość listy czasopism z menu %s +AccountancyAreaDescChartModel=KROK %s: Sprawdź, czy istnieje model planu kont lub utwórz go z menu %s +AccountancyAreaDescChart=KROK %s: Wybierz i | lub uzupełnij swój plan kont z menu %s AccountancyAreaDescVat=Krok %s: Zdefiniuj konta księgowe dla każdej stawki VAT. W tym celu użyj pozycji menu %s. -AccountancyAreaDescDefault=STEP %s: Define default accounting accounts. For this, use the menu entry %s. -AccountancyAreaDescExpenseReport=STEP %s: Define default accounting accounts for each type of expense report. For this, use the menu entry %s. +AccountancyAreaDescDefault=KROK %s: Zdefiniuj domyślne konta księgowe. W tym celu użyj pozycji menu %s. +AccountancyAreaDescExpenseReport=KROK %s: Zdefiniuj domyślne konta księgowe dla każdego typu raportu z wydatków. W tym celu użyj pozycji menu %s. AccountancyAreaDescSal=Krok %s: Zdefiniuj domyślne konta księgowe dla płatności i wynagrodzeń. W tym celu użyj pozycji menu %s. -AccountancyAreaDescContrib=STEP %s: Define default accounting accounts for special expenses (miscellaneous taxes). For this, use the menu entry %s. +AccountancyAreaDescContrib=KROK %s: Zdefiniuj domyślne konta księgowe dla wydatków specjalnych (podatki różne). W tym celu użyj pozycji menu %s. AccountancyAreaDescDonation=Krok %s: Zdefiniuj domyśle konta księgowe dla dotacji. W tym celu użyj pozycji menu %s. -AccountancyAreaDescSubscription=STEP %s: Define default accounting accounts for member subscription. For this, use the menu entry %s. -AccountancyAreaDescMisc=STEP %s: Define mandatory default account and default accounting accounts for miscellaneous transactions. For this, use the menu entry %s. -AccountancyAreaDescLoan=STEP %s: Define default accounting accounts for loans. For this, use the menu entry %s. -AccountancyAreaDescBank=STEP %s: Define accounting accounts and journal code for each bank and financial accounts. For this, use the menu entry %s. +AccountancyAreaDescSubscription=KROK %s: Zdefiniuj domyślne konta księgowe dla subskrypcji członków. W tym celu użyj pozycji menu %s. +AccountancyAreaDescMisc=KROK %s: Zdefiniuj obowiązkowe konto domyślne i domyślne konta księgowe dla różnych transakcji. W tym celu użyj pozycji menu %s. +AccountancyAreaDescLoan=KROK %s: Zdefiniuj domyślne konta księgowe dla pożyczek. W tym celu użyj pozycji menu %s. +AccountancyAreaDescBank=KROK %s: Zdefiniuj konta księgowe i kod arkusza dla każdego konta bankowego i finansowego. W tym celu użyj pozycji menu %s. AccountancyAreaDescProd=Krok %s: Zdefiniuj konta księgowe dla swoich produktów/usług. W tym celu użyj pozycji menu %s. -AccountancyAreaDescBind=STEP %s: Check the binding between existing %s lines and accounting account is done, so application will be able to journalize transactions in Ledger in one click. Complete missing bindings. For this, use the menu entry %s. +AccountancyAreaDescBind=KROK %s: Sprawdź powiązanie między istniejącymi liniami %s a kontem księgowym, aby aplikacja mogła zapisywać transakcje w księdze jednym kliknięciem. Uzupełnij brakujące powiązania. W tym celu użyj pozycji menu %s. AccountancyAreaDescWriteRecords=Krok %s: Zapisz transakcje do głównej księgi. W tym celu idź do <strong>%s</strong> i kliknij na przycisk <strong>%s</strong>. -AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and generate reports and exports. +AccountancyAreaDescAnalyze=KROK %s: Dodaj lub edytuj istniejące transakcje oraz generuj raporty i eksporty. -AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future. +AccountancyAreaDescClosePeriod=KROK %s: Zamknij okres, abyśmy nie mogli wprowadzić modyfikacji w przyszłości. -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) +TheJournalCodeIsNotDefinedOnSomeBankAccount=Nie ukończono obowiązkowego kroku konfiguracji (arkusz kodów księgowych nie został zdefiniowany dla wszystkich kont bankowych) Selectchartofaccounts=Wybierz aktywny wykres kont ChangeAndLoad=Zmień i załaduj Addanaccount=Dodaj konto księgowe AccountAccounting=Konto księgowe AccountAccountingShort=Konto -SubledgerAccount=Subledger account -SubledgerAccountLabel=Subledger account label +SubledgerAccount=Konto księgi podrzędnej +SubledgerAccountLabel=Etykieta konta księgi podrzędnej ShowAccountingAccount=Wyświetl konta księgowe ShowAccountingJournal=Wyświetl dziennik konta księgowego -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=Pokaż konto księgowe w księdze +ShowAccountingAccountInJournals=Pokaż konto księgowe w dziennikach AccountAccountingSuggest=Zalecane konto rachunkowe MenuDefaultAccounts=Domyślne konta MenuBankAccounts=Konta bankowe @@ -108,30 +108,30 @@ MenuLoanAccounts=Konta kredytowe MenuProductsAccounts=Konta produktów MenuClosureAccounts=Zamknięte konta MenuAccountancyClosure=Zamknięte -MenuAccountancyValidationMovements=Validate movements +MenuAccountancyValidationMovements=Zatwierdź ruchy ProductsBinding=Konta produktów -TransferInAccounting=Transfer in accounting +TransferInAccounting=Przelew w księgowości RegistrationInAccounting=Rejestracja w rachunkowości Binding=Powiązanie z kontami CustomersVentilation=Powiązania do faktury klienta -SuppliersVentilation=Vendor invoice binding +SuppliersVentilation=Wiązanie faktury dostawcy ExpenseReportsVentilation=Wiążący raport z wydatków CreateMvts=Utwórz nową transakcję UpdateMvts=Modyfikacja transakcji ValidTransaction=Potwierdź transakcję -WriteBookKeeping=Register transactions in accounting +WriteBookKeeping=Zarejestruj transakcje w księgowości Bookkeeping=Księga główna BookkeepingSubAccount=Subledger AccountBalance=Bilans konta -ObjectsRef=Source object ref -CAHTF=Total purchase vendor before tax +ObjectsRef=Obiekt źródłowy ref +CAHTF=Łącznie sprzedawca przed opodatkowaniem TotalExpenseReport=Raport z całkowitych wydatków InvoiceLines=Pozycje faktury do powiązania -InvoiceLinesDone=Bound lines of invoices +InvoiceLinesDone=Powiązane wiersze faktur ExpenseReportLines=Linie raportów kosztów do dowiązania -ExpenseReportLinesDone=Bound lines of expense reports -IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +ExpenseReportLinesDone=Powiązane linie raportów wydatków +IntoAccount=Powiąż linię z kontem księgowym +TotalForAccount=Całkowite konto księgowe Ventilate=Powiąż @@ -147,20 +147,20 @@ NotVentilatedinAccount=Nie dowiązane do konta księgowego XLineSuccessfullyBinded=%sprodukty/usługi z powodzeniem dowiązane do konta księgowego XLineFailedToBeBinded=%s produkty/usługi nie dowiązane do żadnego konta księgowego -ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maksymalna liczba wierszy na stronie listy i wiązania (zalecane: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Rozpocznij sortowanie strony "Dowiązania do zrobienia" po najnowszych elementach ACCOUNTING_LIST_SORT_VENTILATION_DONE=Rozpocznij sortowanie strony "Dowiązania ukończone" po najnowszych elementach -ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50) -ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50) +ACCOUNTING_LENGTH_DESCRIPTION=Skróć opis produktów i usług w ofertach po x znakach (Best = 50) +ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Skróć formularz opisu konta produktów i usług na aukcjach po x znakach (Best = 50) ACCOUNTING_LENGTH_GACCOUNT=Długość głównych kont księgowych (jeżeli ustawisz tutaj wartość na 6, konto '706' będzie miało wygląd '706000' na ekranie) -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. +ACCOUNTING_LENGTH_AACCOUNT=Długość kont księgowych innych firm (jeśli ustawisz tutaj wartość 6, na ekranie konto „401” będzie wyglądać jak „401000”) +ACCOUNTING_MANAGE_ZERO=Pozwól zarządzać różną liczbą zer na końcu konta księgowego. Potrzebne w niektórych krajach (np. W Szwajcarii). Jeśli opcja jest wyłączona (domyślnie), możesz ustawić następujące dwa parametry, aby poprosić aplikację o dodanie wirtualnych zer. 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_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Włącz eksport wersji roboczej w dzienniku +ACCOUNTANCY_COMBO_FOR_AUX=Włącz listę kombi dla konta pomocniczego (może działać wolno, jeśli masz wiele stron trzecich) +ACCOUNTING_DATE_START_BINDING=Określ datę rozpoczęcia wiązania i przeniesienia w księgowości. Poniżej tej daty transakcje nie zostaną przeniesione do księgowości. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=W przypadku przelewu księgowego wybierz domyślnie pokazany okres ACCOUNTING_SELL_JOURNAL=Dziennik sprzedaży ACCOUNTING_PURCHASE_JOURNAL=Dziennik zakupów @@ -169,150 +169,150 @@ ACCOUNTING_EXPENSEREPORT_JOURNAL=Dziennik raportów kosztowych ACCOUNTING_SOCIAL_JOURNAL=Dziennik społecznościowy ACCOUNTING_HAS_NEW_JOURNAL=Ma nowy dziennik -ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) -ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) +ACCOUNTING_RESULT_PROFIT=Rachunek wynikowy (zysk) +ACCOUNTING_RESULT_LOSS=Rachunek wynikowy (strata) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Dziennik zamknięcia -ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer -TransitionalAccount=Transitional bank transfer account +ACCOUNTING_ACCOUNT_TRANSFER_CASH=Rachunek księgowy przelewu przejściowego +TransitionalAccount=Konto przejściowe do przelewów bankowych ACCOUNTING_ACCOUNT_SUSPENSE=Konto księgowe dla oczekujących DONATION_ACCOUNTINGACCOUNT=Konto księgowe dla zarejestrowanych dotatcji -ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions +ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Konto księgowe do rejestracji subskrypcji -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Konto księgowe domyślnie do rejestracji wpłaty klienta -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=Konto księgowe domyślnie dla kupowanych produktów (używane, jeśli nie zostało zdefiniowane w karcie produktu) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Konto księgowe domyślnie dla zakupionych produktów w EWG (używane, jeśli nie zostało zdefiniowane w karcie produktu) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Konto księgowe domyślnie dla produktów zakupionych i importowanych poza EWG (używane, jeśli nie zostało zdefiniowane w karcie produktu) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Konto księgowe używane domyślnie dla sprzedanych produktów (używane jeżeli nie zdefiniowano konta w arkuszu produktu) -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=Konto księgowe domyślnie dla produktów sprzedawanych w EWG (używane, jeśli nie zostało zdefiniowane w karcie produktu) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Konto księgowe domyślnie dla produktów sprzedanych i wyeksportowanych poza EWG (używane, jeśli nie zostały zdefiniowane w karcie produktu) ACCOUNTING_SERVICE_BUY_ACCOUNT=Konto księgowe używane domyślnie dla kupionych usług (używane jeżeli nie zdefiniowano konta w arkuszu produktu) -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=Konto księgowe domyślnie dla zakupionych usług w EWG (używane, jeśli nie zostało zdefiniowane w karcie usług) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Konto księgowe domyślnie dla usług zakupionych i importowanych poza EWG (używane, jeśli nie zostało zdefiniowane w karcie usług) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Konto księgowe używane domyślnie dla sprzedanych usług (używane jeżeli nie zdefiniowano konta w arkuszu produktu) -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=Konto księgowe domyślnie dla usług sprzedawanych w EWG (używane, jeśli nie zostało zdefiniowane w arkuszu usług) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Konto księgowe domyślnie dla usług sprzedawanych i eksportowanych poza EWG (używane, jeśli nie zostało zdefiniowane w arkuszu usług) Doctype=Rodzaj dokumentu Docdate=Data Docref=Odniesienie LabelAccount=Etykieta konta -LabelOperation=Label operation -Sens=Direction -AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make -LetteringCode=Lettering code -Lettering=Lettering +LabelOperation=Operacja na etykiecie +Sens=Kierunek +AccountingDirectionHelp=W przypadku konta księgowego klienta użyj opcji Kredyt, aby zarejestrować otrzymaną płatność <br> W przypadku konta księgowego dostawcy użyj polecenia Debet, aby zarejestrować dokonaną płatność +LetteringCode=Kod literowy +Lettering=Literowanie Codejournal=Dziennik -JournalLabel=Journal label +JournalLabel=Etykieta czasopisma NumPiece=ilość sztuk TransactionNumShort=Numer transakcji -AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by general ledger account -GroupBySubAccountAccounting=Group by subledger account -AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. +AccountingCategory=Custom group +GroupByAccountAccounting=Grupuj według konta księgi głównej +GroupBySubAccountAccounting=Grupuj według konta księgi podrzędnej +AccountingAccountGroupsDesc=Możesz tutaj zdefiniować kilka grup rachunków księgowych. Będą wykorzystywane do tworzenia spersonalizowanych raportów księgowych. ByAccounts=Według kont -ByPredefinedAccountGroups=By predefined groups -ByPersonalizedAccountGroups=By personalized groups +ByPredefinedAccountGroups=Według predefiniowanych grup +ByPersonalizedAccountGroups=Według spersonalizowanych grup ByYear=Według roku NotMatch=Nie ustawione -DeleteMvt=Delete some operation lines from accounting -DelMonth=Month to delete +DeleteMvt=Usuń niektóre linie operacyjne z księgowania +DelMonth=Miesiąc do usunięcia DelYear=Rok do usunęcia DelJournal=Dziennik do usunięcia -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) +ConfirmDeleteMvt=Spowoduje to usunięcie wszystkich linii operacyjnych z rozliczenia roku / miesiąca i / lub określonego dziennika (wymagane jest co najmniej jedno kryterium). Będziesz musiał ponownie użyć funkcji „%s”, aby usunąć usunięty rekord z powrotem w księdze. +ConfirmDeleteMvtPartial=Spowoduje to usunięcie transakcji z księgowania (wszystkie wiersze operacji związane z tą samą transakcją zostaną usunięte) FinanceJournal=Dziennik finansów ExpenseReportsJournal=Dziennik raportów kosztów DescFinanceJournal=Dziennik finansów zawiera wszystkie typy płatności wykonane przez konto bankowe -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. +DescJournalOnlyBindedVisible=To jest widok rekordu, który jest powiązany z kontem księgowym i może być zapisany w dziennikach i księdze. VATAccountNotDefined=Konto dla niezdefiniowanego VATu ThirdpartyAccountNotDefined=Konto dla niezdefiniowanego kontrahenta ProductAccountNotDefined=Konto dla produktu nie zdefiniowane -FeeAccountNotDefined=Account for fee not defined +FeeAccountNotDefined=Konto z opłatą nie zostało zdefiniowane BankAccountNotDefined=Konto dla banku nie zdefiniowane CustomerInvoicePayment=Płatność za fakturę klienta -ThirdPartyAccount=Third-party account +ThirdPartyAccount=Konto innej firmy NewAccountingMvt=Nowa transakcja NumMvts=Ilość transakcji ListeMvts=Lista ruchów ErrorDebitCredit=Debetowych i kredytowych nie może mieć wartość w tym samym czasie AddCompteFromBK=Dodaj konta księgowe do grupy -ReportThirdParty=List third-party account -DescThirdPartyReport=Consult here the list of third-party customers and vendors and their accounting accounts +ReportThirdParty=Wymień konto innej firmy +DescThirdPartyReport=Zapoznaj się z listą klientów i dostawców zewnętrznych oraz ich kont księgowych ListAccounts=Lista kont księgowych -UnknownAccountForThirdparty=Unknown third-party account. We will use %s -UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error -ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. We will use %s -ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. -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 -ShowOpeningBalance=Show opening balance -HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by level +UnknownAccountForThirdparty=Nieznane konto innej firmy. Użyjemy %s +UnknownAccountForThirdpartyBlocking=Nieznane konto innej firmy. Błąd blokowania +ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Konto innej firmy nie zostało zdefiniowane lub firma trzecia nieznana. Użyjemy %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Nieznany podmiot zewnętrzny i księga podrzędna nie została zdefiniowana w płatności. Wartość konta księgi podrzędnej pozostanie pusta. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Konto innej firmy nie zostało zdefiniowane lub firma trzecia nieznana. Błąd blokowania. +UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Nieznane konto innej firmy i konto oczekujące nie zostały zdefiniowane. Błąd blokowania +PaymentsNotLinkedToProduct=Płatność nie jest powiązana z żadnym produktem / usługą +OpeningBalance=Bilans otwarcia +ShowOpeningBalance=Pokaż bilans otwarcia +HideOpeningBalance=Ukryj saldo otwarcia +ShowSubtotalByGroup=Pokaż sumę częściową według poziomu Pcgtype=Grupa konta -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=Grupa kont jest używana jako predefiniowane kryteria „filtru” i „grupowania” w niektórych raportach księgowych. Na przykład „DOCHÓD” lub „WYDATEK” są używane jako grupy dla kont księgowych produktów w celu utworzenia raportu kosztów / dochodów. -Reconcilable=Reconcilable +Reconcilable=Do pogodzenia TotalVente=Łączny obrót przed opodatkowaniem TotalMarge=Całkowita marża sprzedaży -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 <strong>"%s"</strong>. 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 "<strong>%s</strong>". -DescVentilDoneCustomer=Consult here the list of the lines of invoices customers and their product accounting account +DescVentilCustomer=Zapoznaj się z listą wierszy faktur klienta powiązanych (lub nie) z kontem księgowym produktu +DescVentilMore=W większości przypadków, jeśli korzystasz z predefiniowanych produktów lub usług i ustawisz numer konta na karcie produktu / usługi, aplikacja będzie w stanie powiązać wszystkie linie faktury z kontem księgowym planu kont, tylko w jedno kliknięcie przyciskiem <strong> "%s" </strong>. Jeśli konto nie zostało ustawione na kartach produktów / usług lub jeśli nadal masz jakieś linie niepowiązane z kontem, będziesz musiał wykonać ręczne powiązanie z menu „<strong> %s </strong>”. +DescVentilDoneCustomer=Zapoznaj się z listą wierszy odbiorców faktur i ich kontami księgowymi produktów DescVentilTodoCustomer=Powiąż pozycje faktury aktualnie nie związane z kontem księgowym produktu ChangeAccount=Zmień konto księgowe dla zaznaczonych produktów/usług na następujące konto księgowe: 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 <strong>"%s"</strong>. 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 "<strong>%s</strong>". -DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account +DescVentilSupplier=Zapoznaj się z listą wierszy faktur od dostawców powiązanych lub jeszcze niezwiązanych z kontem księgowym produktu (widoczne są tylko rekordy, które nie zostały jeszcze przeniesione w księgowości) +DescVentilDoneSupplier=Zapoznaj się z listą wierszy faktur od dostawców i ich kontami księgowymi +DescVentilTodoExpenseReport=Powiązanie wierszy raportu wydatków, które nie są jeszcze powiązane z kontem rozliczeniowym opłat +DescVentilExpenseReport=Zapoznaj się z listą pozycji raportu wydatków powiązanych (lub nie) z kontem rozliczania opłat +DescVentilExpenseReportMore=Jeśli ustawisz konto księgowe na typ wierszy raportu z wydatków, aplikacja będzie w stanie powiązać wszystkie wiersze raportu z wydatków z kontem księgowym planu kont, jednym kliknięciem za pomocą przycisku <strong> "%s" </strong>. Jeśli konto nie zostało ustawione w słowniku opłat lub jeśli nadal masz jakieś linie niepowiązane z żadnym kontem, będziesz musiał wykonać ręczne powiązanie z menu "<strong> %s </strong>". +DescVentilDoneExpenseReport=Zapoznaj się z listą pozycji raportów wydatków i ich kontem księgowym opłat -Closure=Annual closure -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) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated -ValidateMovements=Validate movements -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 +Closure=Coroczne zamknięcie +DescClosure=Sprawdź tutaj liczbę operacji miesięcznych, które nie zostały zatwierdzone, a lata podatkowe już otwarte +OverviewOfMovementsNotValidated=Krok 1 / Przegląd ruchów, które nie zostały zatwierdzone. (Konieczne do zamknięcia roku podatkowego) +AllMovementsWereRecordedAsValidated=Wszystkie ruchy zostały zarejestrowane jako zatwierdzone +NotAllMovementsCouldBeRecordedAsValidated=Nie wszystkie ruchy można było zarejestrować jako zatwierdzone +ValidateMovements=Zatwierdź ruchy +DescValidateMovements=Jakakolwiek modyfikacja lub usunięcie pisma, napisów i usunięcia będzie zabronione. Wszystkie wpisy do ćwiczenia muszą zostać zatwierdzone, w przeciwnym razie zamknięcie nie będzie możliwe ValidateHistory=Dowiąż automatycznie AutomaticBindingDone=Automatyczne dowiązanie ukończone ErrorAccountancyCodeIsAlreadyUse=Błąd, nie można usunąc tego konta księgowego, ponieważ jest w użyciu -MvtNotCorrectlyBalanced=Movement not correctly balanced. Debit = %s | Credit = %s -Balancing=Balancing +MvtNotCorrectlyBalanced=Ruch nie jest prawidłowo wyważony. Obciążenie = %s | Kredyt = %s +Balancing=Balansowy FicheVentilation=Karta dowiązania GeneralLedgerIsWritten=Transakcje zapisane w księdze głównej -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 +GeneralLedgerSomeRecordWasNotRecorded=Niektóre transakcje nie mogły zostać zapisane w dzienniku. Jeśli nie ma innego komunikatu o błędzie, jest to prawdopodobnie spowodowane tym, że zostały już zapisane w dzienniku. +NoNewRecordSaved=Koniec z zapisem do dziennika ListOfProductsWithoutAccountingAccount=Lista produktów nie dowiązanych do żadnego konta księgowego ChangeBinding=Zmień dowiązanie -Accounted=Accounted in ledger -NotYetAccounted=Not yet accounted in ledger -ShowTutorial=Show Tutorial -NotReconciled=Not reconciled -WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view +Accounted=Rozliczone w księdze +NotYetAccounted=Jeszcze nie uwzględnione w księdze +ShowTutorial=Pokaż Poradnik +NotReconciled=Nie pogodzono się +WarningRecordWithoutSubledgerAreExcluded=Ostrzeżenie, wszystkie operacje bez zdefiniowanego konta księgi podrzędnej są filtrowane i wykluczane z tego widoku ## Admin -BindingOptions=Binding options +BindingOptions=Opcje wiązania ApplyMassCategories=Dodaj masowo kategorie -AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group +AddAccountFromBookKeepingWithNoCategories=Dostępne konto nie jest jeszcze w spersonalizowanej grupie CategoryDeleted=Kategoria dla konta księgowego została usunięta AccountingJournals=Dzienniki kont księgowych AccountingJournal=Dziennik księgowy NewAccountingJournal=Nowy dziennik księgowy ShowAccountingJournal=Wyświetl dziennik konta księgowego -NatureOfJournal=Nature of Journal -AccountingJournalType1=Miscellaneous operations +NatureOfJournal=Charakter dziennika +AccountingJournalType1=Różne operacje AccountingJournalType2=Sprzedaż AccountingJournalType3=Zakupy AccountingJournalType4=Bank @@ -320,68 +320,68 @@ AccountingJournalType5=Raport kosztów AccountingJournalType8=Inwentaryzacja AccountingJournalType9=Ma nowe ErrorAccountingJournalIsAlreadyUse=Ten dziennik jest już w użytku -AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu <b>%s</b> - <b>%s</b> -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) +AccountingAccountForSalesTaxAreDefinedInto=Uwaga: Konta księgowe dla podatku od sprzedaży są zdefiniowane w menu <b> %s </b> - <b> %s </b> +NumberOfAccountancyEntries=Liczba wejść +NumberOfAccountancyMovements=Liczba ruchów +ACCOUNTING_DISABLE_BINDING_ON_SALES=Wyłącz powiązanie i przeniesienie w księgowości sprzedaży (faktury klientów nie będą brane pod uwagę w księgowości) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Wyłącz powiązanie i przeniesienie w księgowości zakupów (faktury dostawcy nie będą brane pod uwagę w księgowości) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Wyłącz powiązanie i przeniesienie w księgowości na zestawieniach wydatków (zestawienia wydatków nie będą brane pod uwagę w księgowości) ## Export ExportDraftJournal=Export dziennika projektu Modelcsv=Model eksportu Selectmodelcsv=Wybierz model eksportu Modelcsv_normal=Standardowy eksport -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_FEC2=Export FEC (With dates generation writing / document reversed) -Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland +Modelcsv_CEGID=Eksport dla CEGID Expert Comptabilité +Modelcsv_COALA=Eksport dla Sage Coala +Modelcsv_bob50=Eksport dla Sage BOB 50 +Modelcsv_ciel=Eksport dla Sage Ciel Compta lub Compta Evolution +Modelcsv_quadratus=Eksport do Quadratus QuadraCompta +Modelcsv_ebp=Eksport do EBP +Modelcsv_cogilog=Eksport do Cogilog +Modelcsv_agiris=Eksport dla Agiris +Modelcsv_LDCompta=Eksport do LD Compta (v9) (test) +Modelcsv_LDCompta10=Eksport do LD Compta (wersja 10 i wyższa) +Modelcsv_openconcerto=Eksport do OpenConcerto (test) +Modelcsv_configurable=Eksportuj plik CSV konfigurowalny +Modelcsv_FEC=Eksportuj FEC +Modelcsv_FEC2=Eksportuj FEC (z odwróceniem generowania dat / dokumentów) +Modelcsv_Sage50_Swiss=Eksport dla Sage 50 Szwajcaria Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) -ChartofaccountsId=Chart of accounts Id +Modelcsv_Gestinumv3=Eksport do Gestinum (v3) +Modelcsv_Gestinumv5Export dla Gestinum (v5) +ChartofaccountsId=Id planu kont ## 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. +InitAccountancy=Rozpocznij księgowość +InitAccountancyDesc=Ta strona może służyć do inicjowania konta księgowego dla produktów i usług, które nie mają konta księgowego zdefiniowanego dla sprzedaży i zakupów. +DefaultBindingDesc=Na tej stronie można ustawić konto domyślne, które będzie używane do łączenia rekordów transakcji dotyczących wynagrodzeń, darowizn, podatków i VAT, gdy żadne konto księgowe nie zostało jeszcze ustawione. +DefaultClosureDesc=Ta strona może służyć do ustawiania parametrów używanych do rozliczania zamknięć. Options=Opcje OptionModeProductSell=Tryb sprzedaży -OptionModeProductSellIntra=Mode sales exported in EEC -OptionModeProductSellExport=Mode sales exported in other countries +OptionModeProductSellIntra=Sprzedaż w trybie eksportowym do EWG +OptionModeProductSellExport=Sprzedaż w trybie eksportowym do innych krajów OptionModeProductBuy=Tryb zakupów -OptionModeProductBuyIntra=Mode purchases imported in EEC -OptionModeProductBuyExport=Mode purchased imported from other countries +OptionModeProductBuyIntra=Zakupy w trybie importowane do EWG +OptionModeProductBuyExport=Zakupiony tryb zaimportowany z innych krajów OptionModeProductSellDesc=Pokaż wszystkie produkty z kontem księgowym dla sprzedaży -OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC. -OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales. +OptionModeProductSellIntraDesc=Pokaż wszystkie produkty z kontem księgowym sprzedaży w EWG. +OptionModeProductSellExportDesc=Pokaż wszystkie produkty z kontem księgowym dla pozostałej sprzedaży zagranicznej. OptionModeProductBuyDesc=Pokaż wszystkie produkty z kontem księgowym dla zakupów -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 +OptionModeProductBuyIntraDesc=Pokaż wszystkie produkty z kontem księgowym do zakupów w EWG. +OptionModeProductBuyExportDesc=Pokaż wszystkie produkty z kontem księgowym do innych zakupów zagranicznych. +CleanFixHistory=Usuń kod księgowy z wierszy, które nie istnieją w planach kont CleanHistory=Resetuj wszystkie dowiązania dla wybranego roku -PredefinedGroups=Predefined groups +PredefinedGroups=Wstępnie zdefiniowane grupy WithoutValidAccount=Bez poprawnego dedykowanego konta WithValidAccount=Z poprawnym dedykowanym kontem -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 -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. +ValueNotIntoChartOfAccount=Ta wartość konta księgowego nie istnieje w planie kont +AccountRemovedFromGroup=Konto zostało usunięte z grupy +SaleLocal=Sprzedaż lokalna +SaleExport=Sprzedaż eksportowa +SaleEEC=Sprzedaż w EWG +SaleEECWithVAT=Sprzedaż w EWG z podatkiem VAT niezerowym, więc przypuszczamy, że NIE jest to sprzedaż wewnątrzwspólnotowa, a sugerowane konto to standardowe konto produktu. +SaleEECWithoutVATNumber=Sprzedaż w EWG bez podatku VAT, ale identyfikator VAT strony trzeciej nie jest zdefiniowany. Wracamy na konto produktu dla sprzedaży standardowej. W razie potrzeby możesz poprawić identyfikator VAT strony trzeciej lub konto produktu. ## Dictionary Range=Zakres konta księgowego @@ -390,19 +390,41 @@ Formula=Formuła ## Error SomeMandatoryStepsOfSetupWereNotDone=Niektóre obowiązkowe kroki konfiguracji nie zostały wykonane. Proszę je uzupełnić. -ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See Home - Setup - Dictionaries) -ErrorInvoiceContainsLinesNotYetBounded=You try to journalize some lines of the invoice <strong>%s</strong>, 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. +ErrorNoAccountingCategoryForThisCountry=Brak dostępnej grupy kont księgowych dla kraju %s (patrz Strona główna - Konfiguracja - Słowniki) +ErrorInvoiceContainsLinesNotYetBounded=Próbujesz zapisywać w dzienniku niektóre wiersze faktury <strong> %s </strong>, ale niektóre inne wiersze nie są jeszcze powiązane z kontem księgowym. Odmawia się dziennikowania wszystkich wierszy faktur dla tej faktury. +ErrorInvoiceContainsLinesNotYetBoundedShort=Niektóre wiersze na fakturze nie są powiązane z kontem księgowym. ExportNotSupported=Ustawiony format exportu nie jest wspierany na tej stronie -BookeppingLineAlreayExists=Lines already existing into bookkeeping +BookeppingLineAlreayExists=Linie już istniejące w księgowości NoJournalDefined=Nie zdefiniowano dziennika -Binded=Lines bound +Binded=Linie związane ToBind=Linie do dowiązania -UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to make the binding manually +UseMenuToSetBindindManualy=Wiersze jeszcze niezwiązane, użyj menu <a href="%s"> %s </a>, aby wykonać powiązanie ręcznie ## 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=Zapisy księgowe +ImportAccountingEntriesFECFormat=Zapisy księgowe - format FEC +FECFormatJournalCode=Dziennik kodu (JournalCode) +FECFormatJournalLabel=Dziennik etykiet (JournalLib) +FECFormatEntryNum=Liczba sztuk (EcritureNum) +FECFormatEntryDate=Data wykonania (EcritureDate) +FECFormatGeneralAccountNumber=Ogólny numer konta (CompteNum) +FECFormatGeneralAccountLabel=Ogólna etykieta konta (CompteLib) +FECFormatSubledgerAccountNumber=Numer konta księgi podrzędnej (CompAuxNum) +FECFormatSubledgerAccountLabel=Numer konta księgi podrzędnej (CompAuxLib) +FECFormatPieceRef=Kawałek ref (PieceRef) +FECFormatPieceDate=Tworzenie daty sztuki (PieceDate) +FECFormatLabelOperation=Operacja etykiety (EcritureLib) +FECFormatDebit=Debet (debet) +FECFormatCredit=Kredyt (kredyt) +FECFormatReconcilableCode=Kod uzgodniony (EcritureLet) +FECFormatReconcilableDate=Data uzgodnienia (DateLet) +FECFormatValidateDate=Zatwierdzona data sztuki (ValidDate) +FECFormatMulticurrencyAmount=Kwota w wielu walutach (Montantdevise) +FECFormatMulticurrencyCode=Kod wielowalutowy (Idevise) + +DateExport=Eksport daty +WarningReportNotReliable=Ostrzeżenie, ten raport nie jest oparty na księdze, więc nie zawiera transakcji zmodyfikowanych ręcznie w księdze. Jeśli dziennikarstwo jest aktualne, widok księgowości jest dokładniejszy. +ExpenseReportJournal=Dziennik wydatków +InventoryJournal=Dziennik zapasów + +NAccounts=%s accounts diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index 68fdfa7587f..d3f0e57c684 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -9,7 +9,7 @@ VersionExperimental=Eksperymentalny VersionDevelopment=Rozwój VersionUnknown=Nieznany VersionRecommanded=Zalecana -FileCheck=Fileset Integrity Checks +FileCheck=Sprawdzanie integralności zestawu plików FileCheckDesc=To narzędzie pozwala sprawdzić integralność plików i konfigurację Twej aplikacji, porównując każdy plik z oficjalnym, w tym wartości niektórych stałych z konfiguracji. Pozwala to ustalić czy jakieś pliki zostały zmodyfikowane (np. przez hakera). FileIntegrityIsStrictlyConformedWithReference=Integralność plików jest ściśle zgodna z referencją. FileIntegrityIsOkButFilesWereAdded=Sprawdzenie integralności plików przebiegło pomyślnie, aczkolwiek jakieś nowe pliki zostały dodane. @@ -17,17 +17,17 @@ FileIntegritySomeFilesWereRemovedOrModified=Sprawdzenie integralności plików z GlobalChecksum=Globalna suma kontrolna MakeIntegrityAnalysisFrom=Wykonaj analizę integralności plików aplikacji z LocalSignature=Wbudowany podpis lokalny (mniej niezawodny) -RemoteSignature=Remote distant signature (more reliable) +RemoteSignature=Zdalny odległy podpis (bardziej niezawodny) FilesMissing=Brakujące pliki FilesUpdated=Aktualizacja plików FilesModified=Zmodyfikowane pliki FilesAdded=Dodane pliki FileCheckDolibarr=Sprawdź integralność plików aplikacji -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 +AvailableOnlyOnPackagedVersions=Plik lokalny do sprawdzania integralności jest dostępny tylko wtedy, gdy aplikacja jest instalowana z oficjalnego pakietu +XmlNotFound=Nie znaleziono pliku integralności XML aplikacji SessionId=ID sesji SessionSaveHandler=Asystent zapisu sesji -SessionSavePath=Session save location +SessionSavePath=Lokalizacja zapisu sesji PurgeSessions=Czyszczenie sesji ConfirmPurgeSessions=Czy na pewno chcesz usunąć wszystkie sesje? Spowoduje to odłączenie każdego użytkownika (oprócz ciebie). NoSessionListWithThisHandler=Obsługa sesji zapisu skonfigurowana w twoim PHP nie pozwala wyświetlić listy uruchomionych sesji. @@ -37,8 +37,9 @@ UnlockNewSessions=Usuwanie blokady połączeń YourSession=Twoja sesja Sessions=Sesje użytkowników WebUserGroup=Serwer sieci Web użytkownik / grupa -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +PermissionsOnFiles=Uprawnienia do plików +PermissionsOnFilesInWebRoot=Uprawnienia do plików w katalogu głównym sieci +PermissionsOnFile=Uprawnienia do pliku %s NoSessionFound=Twoja konfiguracja PHP wydaje się nie pozwalać na wyświetlanie aktywnych sesji. Katalog używany do zapisywania sesji (<b>%s</b>) może być chroniony (na przykład przez uprawnienia systemu operacyjnego lub dyrektywę PHP open_basedir). DBStoringCharset=Kodowanie bazy danych do przechowywania danych DBSortingCharset=Kodowanie bazy danych by sortować dane @@ -56,12 +57,13 @@ GUISetup=Wyświetlanie SetupArea=Konfiguracja UploadNewTemplate=Załaduj nowy szablon(y) FormToTestFileUploadForm=Formularz do wysyłania pliku testowego (według konfiguracji) -ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled -ModuleIsEnabled=The module/application <b>%s</b> has been enabled +ModuleMustBeEnabled=Moduł<b> %s </b> musi być włączony +ModuleIsEnabled=Moduł<b> %s </b> został włączony IfModuleEnabled=Uwaga: tak jest skuteczne tylko wtedy, gdy <b>moduł %s</b> jest aktywny RemoveLock=Usuń/zmień nazwę pliku <b>%s</b> o ile istnieje, aby umożliwić korzystanie z narzędzia Aktualizuj/Instaluj. RestoreLock=Przywróć plik <b>%s</b> o uprawnieniach tylko do odczytu, aby wyłączyć dalsze korzystanie z narzędzia Aktualizuj/Instaluj. SecuritySetup=Ustawienia bezpieczeństwa +PHPSetup=Ustawienia PHP SecurityFilesDesc=Zdefiniuj tutaj opcje związane z bezpieczeństwem przesyłania plików. ErrorModuleRequirePHPVersion=Błąd ten moduł wymaga PHP w wersji %s lub większej ErrorModuleRequireDolibarrVersion=Błąd ten moduł wymaga Dolibarr wersji %s lub większej @@ -75,7 +77,7 @@ DisableJavascriptNote=Uwaga: Do celów testowych lub debugowania. W celu optymal UseSearchToSelectCompanyTooltip=Jeśli masz dużą liczbę kontrahentów (> 100 000), można zwiększyć prędkość przez ustawienie stałej COMPANY_DONOTSEARCH_ANYWHERE na 1 w Ustawienia -> Inne. Wyszukiwanie będzie wtedy ograniczone do rozpoczęcia ciągu znaków. UseSearchToSelectContactTooltip=Jeśli masz dużą liczbę kontrahentów (> 100 000), można zwiększyć prędkość przez ustawienie stałej COMPANY_DONOTSEARCH_ANYWHERE na 1 w Ustawienia -> Inne. Wyszukiwanie będzie wtedy ograniczone do rozpoczęcia ciągu znaków. DelaiedFullListToSelectCompany=Poczekaj na naciśnięcie klawisza przed załadowaniem zawartości kombinowanej listy Strony Trzecie.<br>Może to zwiększyć wydajność, jeśli masz dużą liczbę stron trzecich, ale jest to mniej wygodne. -DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.<br>This may increase performance if you have a large number of contacts, but it is less convenient. +DelaiedFullListToSelectContact=Poczekaj, aż klawisz zostanie naciśnięty przed załadowaniem zawartości combo listy Kontakt. <br> Może to zwiększyć wydajność, jeśli masz dużą liczbę kontaktów, ale jest to mniej wygodne. NumberOfKeyToSearch=Liczba znaków do uruchomienia wyszukiwania: %s NumberOfBytes=Liczba Bajtów SearchString=Szukana fraza @@ -84,7 +86,7 @@ AllowToSelectProjectFromOtherCompany=Na dokumencie kontrahenta można wybrać pr JavascriptDisabled=JavaScript wyłączony UsePreviewTabs=Użyj podgląd karty ShowPreview=Pokaż podgląd -ShowHideDetails=Show-Hide details +ShowHideDetails=Pokaż/Ukryj szczegóły PreviewNotAvailable=Podgląd niedostępny ThemeCurrentlyActive=Temat obecnie aktywny MySQLTimeZone=Strefa czasowa MySQL (baza danych) @@ -99,7 +101,7 @@ NextValueForInvoices=Następna wartość (faktury) NextValueForCreditNotes=Następna wartość (not kredytowych) NextValueForDeposit=Następna wartość (zaliczka) NextValueForReplacements=Następna wartość (zamienniki) -MustBeLowerThanPHPLimit=Uwaga: twoja konfiguracja PHP obecnie ogranicza maksymalny rozmiar pliku do przesłania do <b>%s</b> %s, niezależnie od wartości tego parametru +MustBeLowerThanPHPLimit=Uwaga: twoje ustawienia PHP obecnie ograniczają maksymalny rozmiar pliku do przesłania do <b>%s</b> %s, niezależnie od wartości tego parametru NoMaxSizeByPHPLimit=Uwaga: Brak ustawionego limitu w twojej konfiguracji PHP MaxSizeForUploadedFiles=Maksymalny rozmiar dla twoich przesyłanych plików (0 by zabronić jego przesyłanie/upload) UseCaptchaCode=Użyj graficzny kod (CAPTCHA) na stronie logowania @@ -154,8 +156,8 @@ SystemToolsAreaDesc=Ten Obszar zapewnia funkcje administracyjne. Użyj menu, aby Purge=Czyszczenie PurgeAreaDesc=Ta strona pozwala usunąć wszystkie pliki wygenerowane lub przechowywane przez Dolibarr (pliki tymczasowe lub wszystkie pliki w katalogu <b>%s</b>). Korzystanie z tej funkcji zwykle nie jest konieczne. Jest to obejście dla użytkowników, których Dolibarr jest hostowany przez dostawcę, który nie oferuje uprawnień do usuwania plików wygenerowanych przez serwer WWW. PurgeDeleteLogFile=Usuń pliki logu, wliczając <b>%s</b> zdefiniowany dla modułu Syslog (brak ryzyka utraty danych) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete log and temporary files +PurgeDeleteTemporaryFiles=Usuń wszystkie pliki dziennika i pliki tymczasowe (bez ryzyka utraty danych). Parametrem może być „tempfilesold”, „logfiles” lub oba „tempfilesold + logfiles”. Uwaga: Pliki tymczasowe są usuwane tylko wtedy, gdy katalog tymczasowy został utworzony ponad 24 godziny temu. +PurgeDeleteTemporaryFilesShort=Usuń dziennik i pliki tymczasowe PurgeDeleteAllFilesInDocumentsDir=Usuń wszystkie pliki z katalogu: <b>%s</b>.<br>Spowoduje to usunięcie wszystkich wygenerowanych dokumentów związanych z elementami (strony trzecie, faktury itp.), plików przesłanych do modułu ECM, zrzutów kopii zapasowej bazy danych i plików tymczasowych. PurgeRunNow=Czyść teraz PurgeNothingToDelete=Brak katalogu lub plików do usunięcia. @@ -223,15 +225,16 @@ Nouveauté=Nowość AchatTelechargement=Kup / Pobierz GoModuleSetupArea=Aby wdrożyć/zainstalować nowy moduł, przejdź do obszaru konfiguracji modułów: <a href="%s">%s</a>. DoliStoreDesc=DoliStore, oficjalny kanał dystrybucji zewnętrznych modułów Dolibarr ERP / CRM -DoliPartnersDesc=List of companies providing custom-developed modules or features.<br>Note: since Dolibarr is an open source application, <i>anyone</i> experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Lista firm oferujących niestandardowe moduły lub funkcje. <br> Uwaga: ponieważ Dolibarr jest aplikacją typu open source, <i> każdy </i> mający doświadczenie w programowaniu PHP powinien być w stanie stworzyć moduł. WebSiteDesc=Zewnętrzne strony internetowe dla dodatkowych (innych niż podstawowe) modułów. DevelopYourModuleDesc=Niektóre zagadnienia do opracowania własnego modułu... URL=URL -RelativeURL=Względny adres URL +RelativeURL=Powiązany adres URL BoxesAvailable=Dostępne widgety BoxesActivated=Widgety aktywowane ActivateOn=Uaktywnij ActiveOn=Aktywowany +ActivatableOn=Aktywowane na SourceFile=Plik źródłowy AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dostępne tylko wtedy, gdy JavaScript jest wyłączony Required=Wymagany @@ -257,7 +260,7 @@ ReferencedPreferredPartners=Preferowani Partnerzy OtherResources=Inne zasoby ExternalResources=Zasoby zewnętrzne SocialNetworks=Sieci społecznościowe -SocialNetworkId=Social Network ID +SocialNetworkId=Identyfikator sieci społecznościowej ForDocumentationSeeWiki=Aby zapoznać się z dokumentacją użytkownika lub dewelopera (Doc, FAQ ...), <br> zajrzyj do Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> ForAnswersSeeForum=Aby znaleźć odpowiedzi na pytania / uzyskać dodatkową pomoc, możesz skorzystać z forum Dolibarr : <br> <a href="%s" target="_blank"><b> %s</b></a> HelpCenterDesc1=Oto niektóre zasoby pozwalające uzyskać pomoc i wsparcie z Dolibarr. @@ -276,7 +279,7 @@ NoticePeriod=Okres wypowiedzenia NewByMonth=Nowe według miesiąca Emails=Wiadomości email EMailsSetup=Ustawienia wiadomości email -EMailsDesc=This page allows you to set parameters or options for email sending. +EMailsDesc=Ta strona umożliwia ustawienie parametrów lub opcji wysyłania wiadomości e-mail. EmailSenderProfiles=Profile nadawców wiadomości e-mail EMailsSenderProfileDesc=Możesz pozostawić tę sekcję pustą. Jeśli wpiszesz tutaj adresy e-mail, zostaną one dodane do listy możliwych nadawców dostępnej podczas pisania nowej wiadomości e-mail. MAIN_MAIL_SMTP_PORT=Port SMTP/SMTPS (wartość domyślna w php.ini: <b>%s</b>) @@ -294,7 +297,7 @@ MAIN_MAIL_SMTPS_ID=Identyfikator/login SMTP (jeśli serwer wysyłający wymaga MAIN_MAIL_SMTPS_PW=Hasło SMTP (jeśli serwer wysyłający wymaga uwierzytelnienia) MAIN_MAIL_EMAIL_TLS=Użyj szyfrowania TLS (SSL) MAIN_MAIL_EMAIL_STARTTLS=Użyj szyfrowania TLS (STARTTLS) -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autoryzuj automatyczne podpisy dla certyfikatów MAIN_MAIL_EMAIL_DKIM_ENABLED=Użyj metody uwierzytelniania DKIM do generowania podpisu e-mail MAIN_MAIL_EMAIL_DKIM_DOMAIN=Domena DNS utrzymująca informacje DKIM MAIN_MAIL_EMAIL_DKIM_SELECTOR=Selektor DKIM wskazujący rekord DNS @@ -308,7 +311,7 @@ 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=Napraw tłumaczenie na platformie do tłumaczenia projektu 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 <b>langs/%s</b>. 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 <b>langs/%s</b> and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr +SubmitTranslationENUS=Jeśli tłumaczenie na ten język nie jest kompletne lub znajdziesz błędy, możesz to poprawić, edytując pliki w katalogu <b> langs / %s </b> i przesyłając zmodyfikowane pliki na dolibarr.org/forum lub, jeśli jesteś programistą, za pomocą PR na github.com/Dolibarr/dolibarr ModuleSetup=Moduł konfiguracji ModulesSetup=Ustawienia Modułów/Aplikacji ModuleFamilyBase=System @@ -328,7 +331,7 @@ MenuHandlers=Menu obsługi MenuAdmin=Edytor menu DoNotUseInProduction=Nie używaj w produkcji ThisIsProcessToFollow=Procedura aktualizacji: -ThisIsAlternativeProcessToFollow=Alternatywna konfiguracja do ręcznego przetwarzania: +ThisIsAlternativeProcessToFollow=Alternatywne ustawienia do ręcznego przetwarzania: StepNb=Krok %s FindPackageFromWebSite=Znajdź pakiet zapewniający potrzebne funkcje (na przykład na oficjalnej stronie internetowej %s). DownloadPackageFromWebSite=Pobierz pakiet (na przykład z oficjalnej strony internetowej %s). @@ -338,19 +341,20 @@ SetupIsReadyForUse=Wdrożenie modułu zostało zakończone. Teraz musisz go wł NotExistsDirect=Alternatywny katalog główny nie jest zdefiniowany w istniejącym katalogu.<br> InfDirAlt=Od wersji 3 możliwe jest zdefiniowanie alternatywnego katalogu głównego. Pozwala to na przechowywanie w dedykowanym katalogu wtyczek oraz niestandardowych szablonów. <br>Wystarczy utworzyć katalog w lokalizacji plików Dolibarr (na przykład: niestandardowe).<br> InfDirExample= <br> Następnie zadeklarować je w pliku <strong> conf.php </strong> <br> $ dolibarr_main_url_root_alt = '' / zwyczajem <br> $ dolibarr_main_document_root_alt = '/ path / z / Dolibarr / htdocs / niestandardowej' <br> Jeśli te wiersze są z komentarzem "#", aby umożliwić im , po prostu odkomentuj, usuwając znak „#”. -YouCanSubmitFile=You can upload the .zip file of module package from here: +YouCanSubmitFile=Możesz załadować plik .zip pakietu modułów stąd: CurrentVersion=Aktualna wersja Dolibarr -CallUpdatePage=Browse to the page that updates the database structure and data: %s. +CallUpdatePage=Przejdź do strony, która aktualizuje strukturę bazy danych i dane: %s. LastStableVersion=Ostatnia stabilna wersja LastActivationDate=Data ostatniej aktywacji -LastActivationAuthor=Latest activation author +LastActivationAuthor=Najnowszy autor aktywacji LastActivationIP=Numer IP ostatniej aktywacji UpdateServerOffline=Aktualizacja serwera nieaktywny -WithCounter=Manage a counter -GenericMaskCodes=Można wpisać dowolną maskę numeracji. W tej masce, może stosować następujące tagi: <br> <b>{000000}</b> odpowiada liczbie, która jest zwiększona w każdym% s. Wprowadzić dowolną liczbę zer jako żądaną długość licznika. Licznik zostaną zakończone zerami z lewej, aby mieć jak najwięcej zer jak maski. <br> <b>{000000 + 000}</b> sama jak poprzednia, ale przesunięciem odpowiadającym numerem, na prawo od znaku + odnosi się począwszy od pierwszego% s. <br> <b>{000000} @ x,</b> ale sama jak poprzednia licznik jest wyzerowany, gdy miesiąc osiągnięciu x (x od 1 do 12 lub ​​0 do korzystania pierwszych miesiącach roku podatkowego określone w konfiguracji, lub 99 do wyzerowany co miesiąc ). Jeśli opcja ta jest używana, a x jest 2 lub więcej, wymagana jest również to ciąg {rr} {mm} lub {rrrr} {mm}. <br> <b>{Dd}</b> dni (01 do 31). <br> <b>{Mm}</b> miesięcy (01 do 12). <br> <b>{Rr}, {rrrr}</b> lub <b>{r}</b> roku ponad 2, 4 lub 1 liczb. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +WithCounter=Zarządzaj licznikiem +GenericMaskCodes=Możesz wprowadzić dowolną maskę numeracji. W tej masce można użyć następujących tagów: <br> <b> {000000} </b> odpowiada liczbie, która będzie zwiększana na każdym %s. Wpisz tyle zer, ile chcesz długości licznika. Licznik zostanie uzupełniony zerami od lewej, aby mieć tyle zer, ile jest w masce. <br> <b> {000000 + 000} </b> taki sam jak poprzedni, ale przesunięcie odpowiadające liczbie po prawej stronie znaku + jest stosowane począwszy od pierwszego %s. <br> <b> {000000 @ x} </b> tak samo jak poprzedni, ale licznik jest resetowany do zera po osiągnięciu miesiąca x (x między 1 a 12 lub 0, aby użyć pierwszych miesięcy roku podatkowego zdefiniowanego w konfiguracji lub zerować co miesiąc). Jeśli ta opcja jest używana, a x wynosi 2 lub więcej, to sekwencja {yy} {mm} lub {yyyy} {mm} jest również wymagana. <br> <b> {dd} </b> dzień (od 01 do 31). <br> <b> {mm} </b> miesiąc (od 01 do 12). <br> <b> {yy} </b>, <b> {yyyy} </b> lub <b> {y}</b>rok powyżej 2, 4 lub 1 numerów.<br> +GenericMaskCodes2= <b> {cccc} </b> kod klienta złożony z n znaków <br> <b> {cccc000} </b> to kod klienta, po którym następuje kod klienta. Ten dedykowany klientowi licznik jest resetowany w tym samym czasie co licznik globalny. <br> <b> {tttt} </b> Kod typu strony trzeciej na n znakach (patrz menu Strona Główna - Ustawienia - Słowniki - Rodzaje kontrahentów). Jeśli dodasz ten tag, licznik będzie inny dla każdego typu kontrahenta. <br> GenericMaskCodes3=Wszystkie inne znaki w masce pozostaną nienaruszone. <br> Spacje są niedozwolone. <br> -GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> +GenericMaskCodes3EAN=Wszystkie inne znaki w masce pozostaną nienaruszone (z wyjątkiem * lub? Na 13. pozycji w EAN13). <br> Spacje są niedozwolone. <br> W EAN13 ostatnim znakiem po ostatniej} na 13. pozycji powinno być * lub? . Zostanie on zastąpiony przez wyliczony klucz. <br> +GenericMaskCodes4a= <u> Przykład na 99. %s strony trzeciej TheCompany, z datą 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Przykład kontrahenta utworzonego w dniu 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Przykład produktu utworzony 2007-03-01:</u><br> GenericMaskCodes5=<b>ABC{yy}{mm}-{000000}</b> wyświetli jako <b>ABC0701-000099</b><br><b>{0000+100@1}-ZZZ/{dd}/XXX</b> wyświetli jako <b>0199-ZZZ/31/XXX</b><br><b>IN{yy}{mm}-{0000}-{t}</b> wyświetli jako <b>IN0701-0099-A</b> jeśli rodzaj firmy to 'spółka Z O.O.' z kodem dla typu 'A_RI' @@ -364,266 +368,268 @@ ErrorCantUseRazIfNoYearInMask=Błąd, nie można korzystać z opcji @ na reset l ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Błąd, nie można użyć opcji @ jeżeli sekwencja {rr}{mm} lub {yyyy}{mm} nie jest elementem maski. UMask=Parametr Umask dla nowych plików systemów Unix / Linux / BSD / Mac. UMaskExplanation=Ten parametr pozwala określić uprawnienia ustawione domyślnie na pliki stworzone przez Dolibarr na serwerze (na przykład podczas przesyłania). <br> To musi być wartość ósemkowa (na przykład, 0666 oznacza odczytu i zapisu dla wszystkich). <br> Paramtre Ce ne sert pas sous un serveur Windows. -SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization +SeeWikiForAllTeam=Spójrz na stronę Wiki, aby zapoznać się z listą współpracowników i ich organizacji UseACacheDelay= Opóźnienie dla buforowania odpowiedzi eksportu w sekundach (0 lub puste pole oznacza brak buforowania) DisableLinkToHelpCenter=Ukryj link <b>"Potrzebujesz pomocy lub wsparcia"</b> na stronie logowania DisableLinkToHelp=Ukryj link <b>" %s Pomoc online"</b> w lewym menu -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?<br>This will permanently delete all your data files with no way to restore them (ECM files, attached files...). +AddCRIfTooLong=Nie ma automatycznego zawijania tekstu, zbyt długi tekst nie będzie wyświetlany na dokumentach. W razie potrzeby dodaj znaki powrotu karetki w polu tekstowym. +ConfirmPurge=Czy na pewno chcesz wykonać to czyszczenie? <br> Spowoduje to trwałe usunięcie wszystkich plików danych bez możliwości ich przywrócenia (pliki ECM, załączone pliki ...). MinLength=Minimalna długość LanguageFilesCachedIntoShmopSharedMemory=Pliki. Lang załadowane do pamięci współdzielonej LanguageFile=Plik języka -ExamplesWithCurrentSetup=Examples with current configuration +ExamplesWithCurrentSetup=Przykłady z aktualną konfiguracją ListOfDirectories=Lista katalogów szablonów OpenDocument ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between eah directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b> or <b>.ods</b>. -NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir +NumberOfModelFilesFound=Liczba plików szablonów ODT/ODS znalezionych w tych katalogach +ExampleOfDirectoriesForModelGen=Przykłady składni: <br> c:\\myapp\\mydocumentdir\\mysubdir <br> /home/myapp/mydocumentdir/mysubdir <br> DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Aby dowiedzieć się jak stworzyć szablony dokumentów odt, przed zapisaniem ich w katalogach, zapoznaj się z dokumentacją wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Pozycja Imienia / Nazwiska -DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values: +DescWeather=Poniższe obrazy zostaną wyświetlone na pulpicie nawigacyjnym, gdy liczba późnych działań osiągnie następujące wartości: KeyForWebServicesAccess=Kluczem do korzystania z usług internetowych (parametr &quot;dolibarrkey&quot; w webservices) TestSubmitForm=Formularz testowy wprowadzania -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. +ThisForceAlsoTheme=Korzystanie z tego menedżera menu będzie również używać własnego motywu, niezależnie od wyboru użytkownika. Również ten menedżer menu wyspecjalizowany dla smartfonów nie działa na wszystkich smartfonach. Użyj innego menedżera menu, jeśli napotkasz problemy ze swoim. ThemeDir=Katalog Skórek -ConnectionTimeout=Connection timeout +ConnectionTimeout=Czas połączenia upłynął ResponseTimeout=Przekroczony czas odpowiedzi SmsTestMessage=Wiadomość testowa z PHONEFROM__ __ do __ PHONETO__ ModuleMustBeEnabledFirst=<b>%s</b> moduł musi być włączony przed użyciem tej funkcji. 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 +NoSmsEngine=Brak dostępnego menedżera nadawców SMS-ów. Menedżer nadawców SMS nie jest instalowany z domyślną dystrybucją, ponieważ zależy od zewnętrznego dostawcy, ale można go znaleźć na %s PDF=PDF -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 +PDFDesc=Globalne opcje generowania plików PDF +PDFAddressForging=Zasady dotyczące sekcji adresowej +HideAnyVATInformationOnPDF=Ukryj wszystkie informacje związane z podatkiem od sprzedaży/VAT +PDFRulesForSalesTax=Zasady dotyczące podatku od sprzedaży/VAT PDFLocaltax=Zasady dla %s -HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT -HideDescOnPDF=Hide products description -HideRefOnPDF=Hide products ref. -HideDetailsOnPDF=Hide product lines details -PlaceCustomerAddressToIsoLocation=Use french standard position (La Poste) for customer address position +HideLocalTaxOnPDF=Ukryj stawkę %s w kolumnie Podatek od sprzedaży/VAT +HideDescOnPDF=Ukryj opis produktów +HideRefOnPDF=Ukryj produkty nr ref. +HideDetailsOnPDF=Ukryj szczegóły linii produktów +PlaceCustomerAddressToIsoLocation=Użyj francuskiej pozycji standardowej (La Poste) dla pozycji adresu klienta Library=Biblioteka UrlGenerationParameters=Parametry do zabezpiecznie adresu URL SecurityTokenIsUnique=Użyj unikalnego klucza zabezpieczeń dla każdego adresu EnterRefToBuildUrl=Wprowadź odwołanie do obiektu %s GetSecuredUrl=Pobierz obliczony adres URL -ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) +ButtonHideUnauthorized=Ukryj nieautoryzowane przyciski akcji również dla użytkowników wewnętrznych (w przeciwnym razie tylko wyszarzone) OldVATRates=Poprzednia stawka VAT NewVATRates=Nowa stawka VAT PriceBaseTypeToChange=Zmiana dla cen opartych na wartości referencyjnej ustalonej na -MassConvert=Launch bulk conversion -PriceFormatInCurrentLanguage=Price Format In Current Language +MassConvert=Uruchom konwersję zbiorczą +PriceFormatInCurrentLanguage=Format ceny w aktualnym języku String=Ciąg znaków -String1Line=String (1 line) +String1Line=Ciąg (1 linia) TextLong=Długi tekst -TextLongNLines=Long text (n lines) +TextLongNLines=Długi tekst (n wierszy) HtmlText=Tekst HTML Int=Liczba całkowita Float=Liczba zmiennoprzecinkowa DateAndTime=Data i godzina Unique=Unikalny -Boolean=Boolean (one checkbox) +Boolean=Boolean (jedno pole wyboru) ExtrafieldPhone = Telefon ExtrafieldPrice = Cena ExtrafieldMail = Adres e-mail ExtrafieldUrl = Link ExtrafieldSelect = Wybierz listę ExtrafieldSelectList = Wybierz z tabeli -ExtrafieldSeparator=Separator (not a field) +ExtrafieldSeparator=Separator (nie pole) ExtrafieldPassword=Hasło -ExtrafieldRadio=Radio buttons (one choice only) +ExtrafieldRadio=Przyciski radiowe (tylko jeden wybór) ExtrafieldCheckBox=Pola wyboru -ExtrafieldCheckBoxFromList=Checkboxes from table +ExtrafieldCheckBoxFromList=Pola wyboru z tabeli ExtrafieldLink=Link do obiektu ComputedFormula=Obliczone pole -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: <strong>$db, $conf, $langs, $mysoc, $user, $object</strong>.<br><strong>WARNING</strong>: 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.<br>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.<br><br>Example of formula:<br>$object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)<br><br>Example to reload object<br>(($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'<br><br>Other example of formula to force load of object and its parent object:<br>(($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).<br>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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key -ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath -ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) +ComputedFormulaDesc=Możesz tu wprowadzić formułę, używając innych właściwości obiektu lub dowolnego kodowania PHP, aby uzyskać dynamiczną wartość obliczoną. Możesz używać dowolnych formuł zgodnych z PHP, w tym znaku „?” operator warunku i następujący obiekt globalny: <strong> $db, $conf, $langs, $mysoc, $user, $object </strong>. <br> <strong> OSTRZEŻENIE </strong>: Tylko niektóre właściwości obiektu $object mogą być dostępne. Jeśli potrzebujesz właściwości, które nie są załadowane, po prostu wczytaj obiekt do formuły, tak jak w drugim przykładzie. <br> Użycie pola obliczeniowego oznacza, że nie możesz samodzielnie wprowadzić żadnej wartości z interfejsu. Ponadto, jeśli wystąpi błąd składni, formuła może nic nie zwrócić. <br> <br> Przykład formuły: <br> $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2) <br> <br> Przykład przeładowania obiektu <br>(($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'<br> <br> Inny przykład formuły wymuszającej ładowanie obiektu i jego obiektu nadrzędnego: <br>(($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: „Nie znaleziono projektu nadrzędnego” +Computedpersistent=Zapisz obliczone pole +ComputedpersistentDesc=Obliczone dodatkowe pola zostaną zapisane w bazie danych, jednak wartość zostanie przeliczona tylko wtedy, gdy obiekt tego pola zostanie zmieniony. Jeśli obliczone pole zależy od innych obiektów lub danych globalnych, ta wartość może być nieprawidłowa !! +ExtrafieldParamHelpPassword=Pozostawienie tego pola pustego oznacza, że ta wartość będzie przechowywana bez szyfrowania (pole musi być ukryte tylko z gwiazdką na ekranie). <br> Ustaw `` auto '', aby użyć domyślnej reguły szyfrowania do zapisania hasła w bazie danych (wtedy odczytana wartość będzie tylko hashem, nie ma możliwości odzyskania oryginalnej wartości) +ExtrafieldParamHelpselect=Lista wartości musi być liniami z kluczem formatu, wartością (gdzie klucz nie może wynosić '0') <br> <br> na przykład: <br> 1, wartość1 <br> 2, wartość2 <br> <br> na przykład: <br> 1, wartość1 <br> 2, wartość2 <br> lista zależności od innej uzupełniającej listy atrybutów: <br> 1, wartosc1 | options_ <i> parent_list_code </i>: parent_key <br> 2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> aby mieć listę w zależności od innej listy: <br> 1, wartosc1 | <i> kod_listy_nadrzędnej </i>: klucz_nadrzędny <br> 2, wartość2 | <i> kod_listy_nadrzędnej </i>: klucz_nadrzędny +ExtrafieldParamHelpcheckbox=Lista wartości musi być liniami z kluczem formatu, wartością (gdzie klucz nie może mieć wartości '0') <br> <br> na przykład: <br> 1, wartość1 <br> 2, wartość2 <br> 3, wartość3 ... +ExtrafieldParamHelpradio=Lista wartości musi być liniami z kluczem formatu, wartością (gdzie klucz nie może mieć wartości '0') <br> <br> na przykład: <br> 1, wartość1 <br> 2, wartość2 <br> 3, wartość3 ... +ExtrafieldParamHelpsellist=Lista wartości pochodzi z tabeli <br> Składnia: nazwa_tabeli: etykieta_field: id_field :: filtersql <br> Przykład: c_typent: libelle: id :: filtersql <br> <br> - id_field jest warunkiem afda0 - id_pole jest aql Może to być prosty test (np. Active = 1), aby wyświetlić tylko aktywną wartość <br> Możesz również użyć $ ID $ w filtrze, który jest bieżącym identyfikatorem bieżącego obiektu <br> Aby użyć SELECT w filtrze użyj słowa kluczowego $ SEL $, aby bypass ochrona przed wtryskiem. <br>, jeśli chcesz filtrować na polach zewnętrznych, użyj składni extra.fieldcode = ... (gdzie kod pola jest kodem extrafield) <br> <br> Aby lista zależała od innej uzupełniającej listy atrybutów: a0342fccellefda19bz0: <i> kod_listy_nadrzędnej </i> | kolumna_nadrzędna: filtr <br> <br> Aby lista była zależna od innej listy: <br> c_typent: libelle: id: a049271_kod_podrzędny: a049271_filtr +ExtrafieldParamHelpchkbxlst=Lista wartości pochodzi z tabeli <br> Składnia: nazwa_tabeli: label_field: id_field :: filtersql <br> Przykład: c_typent: libelle: id :: filtersql <br> <br> Filtr wyświetlania może być prostym testem np. Activebz0f = 1 może również użyć $ ID $ w filtrze, który jest bieżącym identyfikatorem bieżącego obiektu <br> Aby wykonać WYBÓR w filtrze, użyj $ SEL $ <br>, jeśli chcesz filtrować na polach zewnętrznych, użyj składni extra.fieldcode = ... (gdzie kod pola to Kod extrafield) <br> <br> W celu uzyskania listy w zależności od innej uzupełniającej listy atrybutów: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filtr <br> <br> W celu uzyskania listy w zależności od innej listy: <br> c_typent: libelle: id: <i> kod_listy_nadrzędnej </i> | kolumna_nadrzędna: filtr +ExtrafieldParamHelplink=Parametry muszą być parametrami ObjectName: Classpath <br> Składnia: ObjectName: Classpath +ExtrafieldParamHelpSeparator=Pozostaw puste dla prostego separatora <br> Ustaw na 1 dla zwijanego separatora (domyślnie otwarty dla nowej sesji, a następnie status jest zachowany dla każdej sesji użytkownika) <br> Ustaw na 2 dla zwijanego separatora (domyślnie zwinięty dla nowej sesji, a następnie status jest zachowywany przed każdą sesją użytkownika) LibraryToBuildPDF=Biblioteka używana do generowania plików PDF -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:<br>1: local tax apply on products and services without vat (localtax is calculated on amount without tax)<br>2: local tax apply on products and services including vat (localtax is calculated on amount + main tax)<br>3: local tax apply on products without vat (localtax is calculated on amount without tax)<br>4: local tax apply on products including vat (localtax is calculated on amount + main vat)<br>5: local tax apply on services without vat (localtax is calculated on amount without tax)<br>6: local tax apply on services including vat (localtax is calculated on amount + tax) +LocalTaxDesc=Niektóre kraje mogą nakładać dwa lub trzy podatki w każdym wierszu faktury. W takim przypadku wybierz rodzaj drugiego i trzeciego podatku oraz jego stawkę. Możliwe typy to: <br> 1: podatek lokalny dotyczy produktów i usług bez VAT (podatek lokalny jest obliczany na podstawie kwoty bez podatku) <br> 2: podatek lokalny dotyczy produktów i usług, w tym VAT (podatek lokalny jest obliczany na podstawie kwoty + podatek główny) <br> 3: podatek lokalny dotyczy produktów bez VAT (podatek lokalny jest obliczany na podstawie kwoty bez podatku) <br> 4: podatek lokalny dotyczy produktów zawierających podatek VAT (podatek lokalny jest obliczany na podstawie kwoty + główny podatek VAT) <br> 5: podatek lokalny dotyczy usług bez VAT (podatek lokalny jest obliczany od kwoty bez podatku) <br> 6: podatek lokalny dotyczy usług, w tym VAT (podatek lokalny jest obliczany od kwoty + podatek) SMS=SMS LinkToTestClickToDial=Wprowadź numer telefonu, aby zobaczyć link do przetestowania url ClickToDial dla <strong>użytkownika% s</strong> RefreshPhoneLink=Odśwież link LinkToTest=Klikalny link wygenerowany dla <strong>użytkownika% s</strong> (kliknij numer telefonu, aby sprawdzić) KeepEmptyToUseDefault=Zostaw puste by używać domyślnych wartości -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +KeepThisEmptyInMostCases=W większości przypadków możesz pozostawić to pole puste. DefaultLink=Domyślny link SetAsDefault=Ustaw jako domyślny ValueOverwrittenByUserSetup=Uwaga, ta wartość może być zastąpiona przez specyficzną konfiguracją użytkownika (każdy użytkownik może ustawić własny clicktodial url) -ExternalModule=External module -InstalledInto=Installed into directory %s -BarcodeInitForThirdparties=Mass barcode init for third-parties +ExternalModule=Moduł zewnętrzny +InstalledInto=Zainstalowany w katalogu %s +BarcodeInitForThirdparties=Masowe inicjowanie kodu kreskowego dla kontrahentów BarcodeInitForProductsOrServices=Masowe generowanie kodów lub reset kodów kreskowych dla usług i produktów -CurrentlyNWithoutBarCode=Currently, you have <strong>%s</strong> record on <strong>%s</strong> %s without barcode defined. +CurrentlyNWithoutBarCode=Obecnie masz rekord <strong> %s </strong> na <strong> %s </strong> %s bez kodu kreskowego. InitEmptyBarCode=Generuj wartość dla kolejnych %s pustych wpisów EraseAllCurrentBarCode=Usuń wszystkie aktualne kody kreskowe ConfirmEraseAllCurrentBarCode=Jesteś pewien, że chcesz usunąć wszystkie aktualne wartości kodów kreskowych? AllBarcodeReset=Wszystkie wartości kodów kreskowych zostały usunięte -NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled in the Barcode module setup. +NoBarcodeNumberingTemplateDefined=Brak włączonego szablonu numerowania kodów kreskowych w konfiguracji modułu kodów kreskowych. EnableFileCache=Włącz cache plików -ShowDetailsInPDFPageFoot=Add more details into footer, such as company address or manager names (in addition to professional ids, company capital and VAT number). -NoDetails=No additional details in footer +ShowDetailsInPDFPageFoot=Dodaj więcej szczegółów w stopce, takich jak adres firmy lub nazwiska menedżerów (oprócz identyfikatorów zawodowych, kapitału firmy i numeru VAT). +NoDetails=Brak dodatkowych szczegółów w stopce DisplayCompanyInfo=Wyświetl adres firmy -DisplayCompanyManagers=Display manager names +DisplayCompanyManagers=Wyświetl nazwy menedżerów DisplayCompanyInfoAndManagers=Wyświetl adres firmy i dane menadżerów -EnableAndSetupModuleCron=If you want to have this recurring invoice generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template using the *Create* button. Note that even if you enabled automatic generation, you can still safely launch manual generation. Generation of duplicates for the same period is not possible. -ModuleCompanyCodeCustomerAquarium=%s followed by customer code for a customer accounting code -ModuleCompanyCodeSupplierAquarium=%s followed by vendor code for a vendor accounting code +EnableAndSetupModuleCron=Jeśli chcesz, aby ta faktura cykliczna była generowana automatycznie, moduł * %s * musi być włączony i poprawnie skonfigurowany. W innym przypadku faktury należy generować ręcznie z tego szablonu za pomocą przycisku * Utwórz *. Pamiętaj, że nawet jeśli włączyłeś automatyczne generowanie, nadal możesz bezpiecznie uruchamiać ręczne generowanie. Generowanie duplikatów za ten sam okres nie jest możliwe. +ModuleCompanyCodeCustomerAquarium=%s, po którym następuje kod klienta dla kodu księgowego klienta +ModuleCompanyCodeSupplierAquarium=%s, po którym następuje kod dostawcy dla kodu księgowego dostawcy ModuleCompanyCodePanicum=Zwróć pusty kod księgowy -ModuleCompanyCodeDigitaria=Returns a compound accounting code according to the name of the third party. The code consists of a prefix that can be defined in the first position followed by the number of characters defined in the third party code. -ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by the number of characters: %s for the customer accounting code. -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).<br>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: 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 increases the trustability of your email, so it increases the deliverablity without being flagged 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. -WarningPHPMailD=If the method 'PHP Mail' is really the method you would like to use, you can remove this warning by adding the constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home - Setup - Other. -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: <strong>%s</strong>. -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: <strong>%s</strong>. +ModuleCompanyCodeDigitaria=Zwraca złożony kod rozliczeniowy zgodnie z nazwą strony trzeciej. Kod składa się z prefiksu, który można zdefiniować na pierwszej pozycji, po którym następuje liczba znaków zdefiniowanych w kodzie strony trzeciej. +ModuleCompanyCodeCustomerDigitaria=%s, po którym następuje skrócona nazwa klienta o liczbę znaków: %s dla kodu księgowego klienta. +ModuleCompanyCodeSupplierDigitaria=%s, po którym następuje skrócona nazwa dostawcy o liczbę znaków: %s dla kodu księgowego dostawcy. +Use3StepsApproval=Domyślnie zamówienia zakupu muszą być tworzone i zatwierdzane przez 2 różnych użytkowników (jeden krok/użytkownik do utworzenia i jeden krok/użytkownik do zatwierdzenia. Należy pamiętać, że jeśli użytkownik ma zarówno uprawnienia do tworzenia, jak i zatwierdzania, wystarczy jeden krok/użytkownik) . Za pomocą tej opcji możesz poprosić o wprowadzenie trzeciego kroku/zatwierdzenia użytkownika, jeśli kwota jest wyższa niż wartość dedykowana (więc konieczne będą 3 kroki: 1 = walidacja, 2 = pierwsze zatwierdzenie i 3 = drugie zatwierdzenie, jeśli kwota jest wystarczająca). <br> Ustaw tę opcję na pustą, jeśli wystarczy jedno zatwierdzenie (2 kroki), ustaw ją na bardzo niską wartość (0,1), jeśli zawsze wymagane jest drugie zatwierdzenie (3 kroki). +UseDoubleApproval=Użyj 3-stopniowego zatwierdzenia, gdy kwota (bez podatku) jest wyższa niż ... +WarningPHPMail=OSTRZEŻENIE: Konfiguracja wysyłania wiadomości e-mail z aplikacji korzysta z domyślnej konfiguracji ogólnej. Często lepiej jest skonfigurować wychodzące wiadomości e-mail tak, aby korzystały z serwera poczty e-mail dostawcy usług e-mail zamiast konfiguracji domyślnej z kilku powodów: +WarningPHPMailA=- Korzystanie z serwera dostawcy usług e-mail zwiększa wiarygodność wiadomości e-mail, a więc zwiększa dostarczalność bez oznaczania jako SPAM +WarningPHPMailB=- Niektórzy dostawcy usług e-mail (np. Yahoo) nie pozwalają na wysyłanie wiadomości e-mail z innego serwera niż ich własny serwer. Twoja obecna konfiguracja wykorzystuje serwer aplikacji do wysyłania wiadomości e-mail, a nie serwer dostawcy poczty e-mail, więc niektórzy odbiorcy (ten zgodny z restrykcyjnym protokołem DMARC) zapytają dostawcę poczty e-mail, czy mogą zaakceptować Twoją wiadomość e-mail i niektórzy dostawcy poczty e-mail (jak Yahoo) może odpowiedzieć „nie”, ponieważ serwer nie należy do nich, więc niewiele z wysłanych przez Ciebie e-maili może nie zostać zaakceptowanych do dostarczenia (uważaj również na limit wysyłania dostawcy poczty e-mail). +WarningPHPMailC=- Używanie serwera SMTP własnego dostawcy usług pocztowych do wysyłania e-maili jest również interesujące, więc wszystkie e-maile wysyłane z aplikacji będą również zapisywane w katalogu „Wysłane” Twojej skrzynki pocztowej. +WarningPHPMailD=Jeśli metoda „PHP Mail” jest rzeczywiście metodą, której chcesz użyć, możesz usunąć to ostrzeżenie, dodając stałą MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP do 1 w menu Strona Główna - Ustawienia - Inne. +WarningPHPMail2=Jeśli Twój dostawca poczty e-mail SMTP musi ograniczyć klienta poczty e-mail do niektórych adresów IP (bardzo rzadko), jest to adres IP agenta użytkownika poczty (MUA) dla aplikacji ERP CRM: <strong> %s </strong>. +WarningPHPMailSPF=Jeśli nazwa domeny w adresie e-mail nadawcy jest chroniona przez rekord SPF (poproś o rejestrację nazwy domeny), musisz dodać następujące adresy IP w rekordzie SPF serwera DNS swojej domeny: <strong> %s </strong>. ClickToShowDescription=Kliknij aby zobaczyć opis -DependsOn=This module needs the module(s) +DependsOn=Ten moduł wymaga modułów RequiredBy=Ten moduł wymagany jest przez moduł(y) -TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field. -PageUrlForDefaultValues=You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value. -PageUrlForDefaultValuesCreate=<br>Example:<br>For the form to create a new third party, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/", so use path like <strong>mymodule/mypage.php</strong> and not custom/mymodule/mypage.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> -PageUrlForDefaultValuesList=<br>Example:<br>For the page that lists third parties, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/" so use a path like <strong>mymodule/mypagelist.php</strong> and not custom/mymodule/mypagelist.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> -AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) -EnableDefaultValues=Enable customization of default values -EnableOverwriteTranslation=Enable usage of overwritten translation -GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. -WarningSettingSortOrder=Warning, setting a default sort order may result in a technical error when going on the list page if field is an unknown field. If you experience such an error, come back to this page to remove the default sort order and restore default behavior. +TheKeyIsTheNameOfHtmlField=To jest nazwa pola HTML. Aby odczytać zawartość strony HTML w celu uzyskania nazwy klucza pola, wymagana jest wiedza techniczna. +PageUrlForDefaultValues=Musisz wprowadzić względną ścieżkę adresu URL strony. Jeśli umieścisz parametry w adresie URL, wartości domyślne będą obowiązywać, jeśli wszystkie parametry będą miały tę samą wartość. +PageUrlForDefaultValuesCreate= <br> Przykład: <br> Formularz do tworzenia nowej strony trzeciej to <strong> %s </strong>. <br> W przypadku adresów URL modułów zewnętrznych zainstalowanych w katalogu niestandardowym nie należy dołączać „custom/”, więc użyj ścieżki takiej jak <strong> mymodule/mypage.php </strong>, a nie custom/mymodule/mypage.php. <br> Jeśli chcesz mieć wartość domyślną tylko wtedy, gdy adres URL ma jakiś parametr, możesz użyć <strong> %s </strong> +PageUrlForDefaultValuesList= <br> Przykład: <br> W przypadku strony z listą stron trzecich jest to <strong> %s </strong>. <br> W przypadku adresów URL modułów zewnętrznych zainstalowanych w katalogu niestandardowym nie należy dołączać „custom/”, więc użyj ścieżki takiej jak <strong> mymodule/mypagelist.php </strong>, a nie custom/mymodule/mypagelist.php. <br> Jeśli chcesz mieć wartość domyślną tylko wtedy, gdy adres URL ma jakiś parametr, możesz użyć <strong> %s </strong> +AlsoDefaultValuesAreEffectiveForActionCreate=Należy również pamiętać, że nadpisywanie wartości domyślnych przy tworzeniu formularzy działa tylko w przypadku stron, które zostały poprawnie zaprojektowane (więc z parametrem akcja = utwórz lub wyświetl ...) +EnableDefaultValues=Włącz dostosowywanie wartości domyślnych +EnableOverwriteTranslation=Włącz użycie tłumaczenia nadpisanego +GoIntoTranslationMenuToChangeThis=Znaleziono tłumaczenie klucza z tym kodem. Aby zmienić tę wartość, należy ją edytować z poziomu Strona Główna - Ustawienia - Tłumaczenia. +WarningSettingSortOrder=Ostrzeżenie, ustawienie domyślnej kolejności sortowania może spowodować błąd techniczny podczas przechodzenia na stronę listy, jeśli pole jest nieznanym polem. Jeśli napotkasz taki błąd, wróć na tę stronę, aby usunąć domyślną kolejność sortowania i przywrócić domyślne zachowanie. Field=Pole -ProductDocumentTemplates=Document templates to generate product document -FreeLegalTextOnExpenseReports=Free legal text on expense reports -WatermarkOnDraftExpenseReports=Watermark on draft expense reports -AttachMainDocByDefault=Set this to 1 if you want to attach main document to email by default (if applicable) -FilesAttachedToEmail=Attach file -SendEmailsReminders=Send agenda reminders by emails -davDescription=Setup a WebDAV server -DAVSetup=Setup of module DAV -DAV_ALLOW_PRIVATE_DIR=Enable the generic private directory (WebDAV dedicated directory named "private" - login required) -DAV_ALLOW_PRIVATE_DIRTooltip=The generic private directory is a WebDAV directory anybody can access with its application login/pass. -DAV_ALLOW_PUBLIC_DIR=Enable the generic public directory (WebDAV dedicated directory named "public" - no login required) +ProductDocumentTemplates=Szablony dokumentów do generowania dokumentów produktowych +FreeLegalTextOnExpenseReports=Dowolny tekst prawny dotyczący zestawień wydatków +WatermarkOnDraftExpenseReports=Znak wodny na projektach raportów z wydatków +AttachMainDocByDefault=Ustaw na 1, jeśli chcesz domyślnie załączyć dokument główny do wiadomości e-mail (jeśli dotyczy) +FilesAttachedToEmail=Załącz plik +SendEmailsReminders=Wysyłaj przypomnienia o agendzie pocztą elektroniczną +davDescription=Skonfiguruj serwer WebDAV +DAVSetup=Ustawienia modułu DAV +DAV_ALLOW_PRIVATE_DIR=Włącz ogólny katalog prywatny (dedykowany katalog WebDAV o nazwie „prywatny” - wymagane zalogowanie) +DAV_ALLOW_PRIVATE_DIRTooltip=Ogólny katalog prywatny to katalog WebDAV, do którego każdy może uzyskać dostęp za pomocą loginu / hasła aplikacji. +DAV_ALLOW_PUBLIC_DIR=Włącz ogólny katalog publiczny (dedykowany katalog WebDAV o nazwie „public” - logowanie nie jest wymagane) DAV_ALLOW_PUBLIC_DIRTooltip=The generic public directory is a WebDAV directory anybody can access (in read and write mode), with no authorization required (login/password account). -DAV_ALLOW_ECM_DIR=Enable the DMS/ECM private directory (root directory of the DMS/ECM module - login required) -DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploaded when using the DMS/ECM module. Similarly as access from the web interface, you will need a valid login/password with adecuate permissions to access it. +DAV_ALLOW_ECM_DIR=Włącz prywatny katalog DMS/ECM (katalog główny modułu DMS/ECM - wymagane logowanie) +DAV_ALLOW_ECM_DIRTooltip=Katalog główny, do którego wszystkie pliki są ładowane ręcznie podczas korzystania z modułu DMS/ECM. Podobnie jak w przypadku dostępu z interfejsu internetowego, będziesz potrzebować ważnego loginu/hasła z odpowiednimi uprawnieniami, aby uzyskać do niego dostęp. # Modules Module0Name=Użytkownicy i grupy Module0Desc=Zarządzanie Użytkownikami/Pracownikami i Grupami -Module1Name=Third Parties -Module1Desc=Companies and contacts management (customers, prospects...) +Module1Name=Kontrahenci +Module1Desc=Zarządzanie firmami i kontaktami (klienci, potencjalni klienci ...) Module2Name=Reklama Module2Desc=Zarządzanie reklamą -Module10Name=Accounting (simplified) -Module10Desc=Simple accounting reports (journals, turnover) based on database content. Does not use any ledger table. +Module10Name=Księgowość (uproszczona) +Module10Desc=Proste raporty księgowe (dzienniki, obroty) na podstawie zawartości bazy danych. Nie używa żadnej tabeli księgi. Module20Name=Propozycje Module20Desc=Zarządzanie propozycjami reklam -Module22Name=Mass Emailings -Module22Desc=Manage bulk emailing +Module22Name=Masowe wiadomości e-mail +Module22Desc=Zarządzaj masowym wysyłaniem e-maili Module23Name=Energia Module23Desc=Monitorowanie zużycia energii -Module25Name=Sales Orders -Module25Desc=Sales order management +Module25Name=Zlecenia sprzedaży +Module25Desc=Zarządzanie zamówieniami sprzedaży Module30Name=Faktury -Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers +Module30Desc=Zarządzanie fakturami i notami kredytowymi dla klientów. Zarządzanie fakturami i notami kredytowymi dla dostawców Module40Name=Dostawcy -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. +Module40Desc=Zarządzanie dostawcami i zakupami (zamówienia i fakturowanie faktur dostawców) +Module42Name=Dzienniki debugowania +Module42Desc=Możliwości logowania (plik, syslog, ...). Takie dzienniki służą do celów technicznych / debugowania. +Module43Name=Pasek debugowania +Module43Desc=Narzędzie dla programistów dodające pasek debugowania w przeglądarce. Module49Name=Edytory Module49Desc=Zarządzanie edytorem Module50Name=Produkty -Module50Desc=Management of Products +Module50Desc=Zarządzanie produktami Module51Name=Masowe wysyłanie poczty Module51Desc=Zarządzanie masowym wysyłaniem poczty papierowej Module52Name=Zapasy -Module52Desc=Stock management +Module52Desc=Zarządzanie zapasami Module53Name=Usługi -Module53Desc=Management of Services +Module53Desc=Zarządzanie usługami Module54Name=Kontrakty/Subskrypcje -Module54Desc=Management of contracts (services or recurring subscriptions) +Module54Desc=Zarządzanie umowami (usługi lub cykliczne subskrypcje) 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=Payments by Direct Debit -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module56Name=Płatność przelewem +Module56Desc=Zarządzanie płatnościami dostawców za pomocą poleceń przelewu. Obejmuje generowanie pliku SEPA dla krajów europejskich. +Module57Name=Płatności poleceniem zapłaty +Module57Desc=Zarządzanie poleceniami zapłaty. Obejmuje generowanie pliku SEPA dla krajów europejskich. Module58Name=ClickToDial Module58Desc=Integracja systemu ClickToDial (Asterisk,...) -Module60Name=Stickers -Module60Desc=Management of stickers +Module60Name=Naklejki +Module60Desc=Zarządzanie naklejkami Module70Name=Interwencje Module70Desc=Zarządzanie interwencjami Module75Name=Koszty wyjazdów i notatki Module75Desc=Zarządzanie kosztami wyjazdów oraz notatkami Module80Name=Wysyłki -Module80Desc=Shipments and delivery note management -Module85Name=Banks & Cash +Module80Desc=Zarządzanie przesyłkami i dowodami dostawy +Module85Name=Banki i Gotówka Module85Desc=Zarządzanie kontami bankowymi lub gotówkowymi -Module100Name=External Site -Module100Desc=Add a link to an external website as a main menu icon. Website is shown in a frame under the top menu. +Module100Name=Witryna zewnętrzna +Module100Desc=Dodaj link do zewnętrznej witryny internetowej jako ikonę menu głównego. Strona internetowa jest pokazana w ramce pod górnym menu. Module105Name=Mailman i SPIP Module105Desc=Interfejs Mailman lub SPIP dla członka modułu Module200Name=LDAP -Module200Desc=LDAP directory synchronization +Module200Desc=Synchronizacja katalogów LDAP Module210Name=PostNuke Module210Desc=Integracja PostNuke Module240Name=Eksport danych -Module240Desc=Tool to export Dolibarr data (with assistance) +Module240Desc=Narzędzie do eksportu danych Dolibarr (z pomocą) Module250Name=Import danych -Module250Desc=Tool to import data into Dolibarr (with assistance) +Module250Desc=Narzędzie do importowania danych do Dolibarr (z pomocą) Module310Name=Członkowie Module310Desc=Zarządzanie członkami fundacji Module320Name=RSS Feed -Module320Desc=Add a RSS feed to Dolibarr pages -Module330Name=Bookmarks & Shortcuts -Module330Desc=Create shortcuts, always accessible, to the internal or external pages to which you frequently access -Module400Name=Projects or Leads -Module400Desc=Management of projects, leads/opportunities and/or tasks. You can also assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view. +Module320Desc=Dodaj kanał RSS do stron Dolibarr +Module330Name=Zakładki i skróty +Module330Desc=Twórz skróty, zawsze dostępne, do wewnętrznych lub zewnętrznych stron, do których często uzyskujesz dostęp +Module400Name=Projekty lub potencjalni klienci +Module400Desc=Zarządzanie projektami, potencjalnymi klientami/możliwościami i/lub zadaniami. Możesz również przypisać dowolny element (fakturę, zamówienie, propozycję, interwencję, ...) do projektu i uzyskać przekrojowy widok z widoku projektu. Module410Name=Webcalendar Module410Desc=Integracja Webcalendar -Module500Name=Taxes & Special Expenses -Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...) +Module500Name=Podatki i wydatki specjalne +Module500Desc=Zarządzanie innymi wydatkami (podatki od sprzedaży, podatki socjalne lub podatkowe, dywidendy, ...) Module510Name=Wynagrodzenia -Module510Desc=Record and track employee payments +Module510Desc=Nagrywaj i śledź płatności pracowników Module520Name=Kredyty Module520Desc=Zarządzanie kredytów -Module600Name=Notifications on business event -Module600Desc=Send email notifications triggered by a business event: per user (setup defined on each user), per third-party contacts (setup defined on each third party) or by specific emails -Module600Long=Note that this module sends emails in real-time when a specific business event occurs. If you are looking for a feature to send email reminders for agenda events, go into the setup of module Agenda. -Module610Name=Product Variants -Module610Desc=Creation of product variants (color, size etc.) +Module600Name=Powiadomienia o wydarzeniach biznesowych +Module600Desc=Wysyłaj powiadomienia e-mail wyzwalane przez zdarzenie biznesowe: na użytkownika (konfiguracja zdefiniowana dla każdego użytkownika), na osobę kontaktową (konfiguracja zdefiniowana dla każdej strony trzeciej) lub przez określone wiadomości e-mail +Module600Long=Należy pamiętać, że ten moduł wysyła wiadomości e-mail w czasie rzeczywistym, gdy ma miejsce określone wydarzenie biznesowe. Jeśli szukasz funkcji wysyłania przypomnień e-mail o wydarzeniach w programie, przejdź do konfiguracji modułu Agenda. +Module610Name=Warianty produktu +Module610Desc=Tworzenie wariantów produktów (kolor, rozmiar itp.) Module700Name=Darowizny Module700Desc=Zarządzanie darowiznami -Module770Name=Expense Reports -Module770Desc=Manage expense reports claims (transportation, meal, ...) -Module1120Name=Vendor Commercial Proposals -Module1120Desc=Request vendor commercial proposal and prices +Module770Name=Raporty Wydatków +Module770Desc=Zarządzaj raportami wydatków (transport, posiłki, ...) +Module1120Name=Oferty handlowe dostawcy +Module1120Desc=Poproś sprzedawcę o ofertę handlową i ceny Module1200Name=Mantis Module1200Desc=Integracja Mantis Module1520Name=Generowanie dokumentu -Module1520Desc=Mass email document generation +Module1520Desc=Masowe generowanie dokumentów e-mail Module1780Name=Tagi / Kategorie Module1780Desc=Tworzenie tagów / kategorii (produktów, klientów, dostawców, kontaktów lub członków) Module2000Name=Edytor WYSIWYG -Module2000Desc=Allow text fields to be edited/formatted using CKEditor (html) +Module2000Desc=Zezwalaj na edycję/formatowanie pól tekstowych za pomocą CKEditor (html) Module2200Name=Dynamiczne Ceny -Module2200Desc=Use maths expressions for auto-generation of prices +Module2200Desc=Użyj wyrażeń matematycznych do automatycznego generowania cen Module2300Name=Zaplanowane zadania Module2300Desc=Zarządzanie zaplanowanymi zadaniami (jak cron lub chrono table) Module2400Name=Wydarzenia/Agenda -Module2400Desc=Track events. Log automatic events for tracking purposes or record manual events or meetings. This is the principal module for good Customer or Vendor Relationship Management. +Module2400Desc=Śledź wydarzenia. Rejestruj automatyczne zdarzenia do celów śledzenia lub rejestruj zdarzenia ręczne lub spotkania. Jest to główny moduł dobrego zarządzania relacjami z klientami lub dostawcami. Module2500Name=SZD / ZZE Module2500Desc=System Zarządzania Dokumentami / Zarządzanie Zawartością Elektroniczną. Automatyczna organizacja twoich wygenerowanych lub składowanych dokumentów. Udostępniaj je kiedy chcesz. Module2600Name=API services (Web services SOAP) @@ -631,55 +637,57 @@ Module2600Desc=Enable the Dolibarr SOAP server providing API services Module2610Name=API services (Web services REST) Module2610Desc=Enable the Dolibarr REST server providing API services Module2660Name=Połączeń WebServices (klient SOAP) -Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Only Purchase orders are currently supported.) +Module2660Desc=Włącz klienta usług sieciowych Dolibarr (może być używany do przesyłania danych/żądań do serwerów zewnętrznych. Obecnie obsługiwane są tylko zamówienia zakupu). Module2700Name=Gravatar -Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Needs Internet access +Module2700Desc=Skorzystaj z internetowego serwisu Gravatar (www.gravatar.com), aby pokazać zdjęcia użytkowników/członków (znalezione wraz z ich e-mailami). Potrzebuje dostępu do internetu Module2800Desc=FTP Client Module2900Name=GeoIPMaxmind Module2900Desc=Możliwości konwersji GeoIP Maxmind -Module3200Name=Unalterable Archives -Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3200Name=Niezmienione archiwa +Module3200Desc=Włącz niezmienny dziennik zdarzeń biznesowych. Wydarzenia są archiwizowane w czasie rzeczywistym. Dziennik jest tabelą tylko do odczytu połączonych zdarzeń, które można wyeksportować. Ten moduł może być obowiązkowy w niektórych krajach. +Module3400Name=Sieci społecznościowe +Module3400Desc=Włącz pola sieci społecznościowych w kontrahentach i adresach (skype, twitter, facebook, ...). Module4000Name=HR Module4000Desc=Zarządzanie zasobami ludzkimi (zarządzanie departamentami, umowami pracowników,...) Module5000Name=Multi-company Module5000Desc=Pozwala na zarządzanie wieloma firmami -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Przepływ pracy między modułami +Module6000Desc=Zarządzanie przepływem pracy pomiędzy różnymi modułami (automatyczne tworzenie obiektu i/lub automatyczna zmiana statusu) Module10000Name=Strony internetowe -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. -Module20000Name=Leave Request Management -Module20000Desc=Define and track employee leave requests -Module39000Name=Product Lots -Module39000Desc=Lots, serial numbers, eat-by/sell-by date management for products -Module40000Name=Multicurrency -Module40000Desc=Use alternative currencies in prices and documents +Module10000Desc=Twórz strony internetowe (publiczne) za pomocą edytora WYSIWYG. To jest CMS zorientowany na webmastera lub programistę (lepiej znać język HTML i CSS). Po prostu skonfiguruj swój serwer WWW (Apache, Nginx, ...), aby wskazywał dedykowany katalog Dolibarr, aby mieć go online w Internecie z własną nazwą domeny. +Module20000Name=Zarządzanie Wnioskami Urlopowymi +Module20000Desc=Definiuj i śledź wnioski pracowników o urlop +Module39000Name=Partie produktów +Module39000Desc=Partie, numery seryjne, zarządzanie datami przydatności do spożycia/sprzedaży dla produktów +Module40000Name=Wielowalutowy +Module40000Desc=Używaj alternatywnych walut w cenach i dokumentach Module50000Name=Paybox -Module50000Desc=Offer customers a PayBox 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...) +Module50000Desc=Zaoferuj klientom stronę płatności online PayBox (karty kredytowe/debetowe). Można to wykorzystać, aby umożliwić swoim klientom dokonywanie płatności ad hoc lub płatności związanych z określonym obiektem Dolibarr (faktura, zamówienie itp.) Module50100Name=POS SimplePOS -Module50100Desc=Point of Sale module SimplePOS (simple POS). +Module50100Desc=Moduł punktów sprzedaży SimplePOS (prosty POS). Module50150Name=POS TakePOS -Module50150Desc=Point of Sale module TakePOS (touchscreen POS, for shops, bars or restaurants). +Module50150Desc=Moduł punktu sprzedaży TakePOS (POS z ekranem dotykowym, dla sklepów, barów lub restauracji). Module50200Name=Paypal -Module50200Desc=Offer customers a PayPal online payment page (PayPal account or 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...) +Module50200Desc=Zaoferuj klientom stronę płatności online PayPal (konto PayPal lub karty kredytowe/debetowe). Można to wykorzystać, aby umożliwić swoim klientom dokonywanie płatności ad hoc lub płatności związanych z określonym obiektem Dolibarr (faktura, zamówienie itp.) 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 Subsidiary Ledgers). Export the ledger in several other accounting software formats. +Module50300Desc=Zaoferuj klientom stronę płatności online Stripe (karty kredytowe/debetowe). Można to wykorzystać, aby umożliwić swoim klientom dokonywanie płatności ad hoc lub płatności związanych z określonym obiektem Dolibarr (faktura, zamówienie itp.) +Module50400Name=Księgowość (podwójny zapis) +Module50400Desc=Zarządzanie księgowością (podwójne zapisy, obsługa Księgi Głównej i Księgi Pomocniczej). Wyeksportuj księgę do kilku innych formatów oprogramowania księgowego. 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). +Module54000Desc=Druk bezpośredni (bez otwierania dokumentów) za pomocą interfejsu Cups IPP (drukarka musi być widoczna z serwera, a CUPS musi być zainstalowany na serwerze). Module55000Name=Poll, Survey or Vote -Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) +Module55000Desc=Twórz ankiety online, ankiety lub głosy (takie jak Doodle, Studs, RDVz itp.) Module59000Name=Marże -Module59000Desc=Module to follow margins +Module59000Desc=Moduł do śledzenia marginesów Module60000Name=Prowizje Module60000Desc=Moduł do zarządzania prowizjami Module62000Name=Formuły handlowe -Module62000Desc=Add features to manage Incoterms +Module62000Desc=Dodaj funkcje do zarządzania Incoterms Module63000Name=Zasoby -Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events +Module63000Desc=Zarządzaj zasobami (drukarki, samochody, pokoje, ...) w celu przydzielania ich do wydarzeń Permission11=Czytaj faktur klientów Permission12=Tworzenie/modyfikacja faktur klientów -Permission13=Invalidate customer invoices +Permission13=Unieważnij faktury klienta Permission14=Walidacja faktur klienta Permission15=Wyślij fakturę klienta poprzez e-mail. Permission16=Tworzenie płatności za faktury klienta @@ -696,18 +704,18 @@ Permission32=Tworzenie / modyfikacja produktów Permission34=Usuwanie produktów Permission36=Podejrzyj / zarządzaj ukrytymi produktami Permission38=Eksport produktów -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) +Permission39=Zignoruj cenę minimalną +Permission41=Przeczytaj projekty i zadania (wspólny projekt i projekty, w sprawie których się kontaktuję). Można również wprowadzić czasochłonne, dla mnie lub mojej hierarchii, przydzielone zadania (grafik) +Permission42=Twórz / modyfikuj projekty (współdzielony projekt i projekty, w sprawie których się kontaktuję). Może również tworzyć zadania i przypisywać użytkowników do projektów i zadań +Permission44=Usuń projekty (projekt współdzielony i projekty, z którymi się kontaktuję) Permission45=Eksportuj projekty Permission61=Czytaj interwencje Permission62=Tworzenie / modyfikacja interwencji Permission64=Usuwanie interwencji Permission67=Eksport interwencji -Permission68=Send interventions by email -Permission69=Validate interventions -Permission70=Invalidate interventions +Permission68=Wysyłaj interwencje pocztą elektroniczną +Permission69=Zatwierdź interwencje +Permission70=Unieważnij interwencje Permission71=Czytaj użytkowników Permission72=Tworzenie / modyfikacja użytkowników Permission74=Usuwanie użytkowników @@ -730,29 +738,29 @@ Permission95=Przeczytaj raporty Permission101=Czytaj ustawienia Permission102=Utwórz / modyfikuj ustawienia Permission104=Walidacja ustawień -Permission105=Send sendings by email +Permission105=Wysyłaj wiadomości e-mailem Permission106=Eksportuj wysyłki Permission109=Usuń wysyłki Permission111=Czytaj raporty finansowe Permission112=Tworzenie / modyfikacja / usuwanie oraz porównywanie transakcji Permission113=Konfiguracja sprawozdań finansowych (tworzenie, zarządzanie kategoriami) -Permission114=Reconcile transactions +Permission114=Uzgodnij transakcje Permission115=Eksport transakcji oraz oświadczeń obrachunkowych Permission116=Przelewy pomiędzy rachunkami -Permission117=Manage checks dispatching +Permission117=Zarządzaj wysyłaniem czeków Permission121=Przeglądaj kontrahentów związanych z użytkownikiem Permission122=Tworzenie / modyfikacja stron trzecich związanych z użytkownikiem Permission125=Usuń kontrahentów związanych z użytkownikiem z użytkownikiem Permission126=Eksport stron trzecich -Permission141=Read all projects and tasks (also private projects for which I am not a contact) -Permission142=Create/modify all projects and tasks (also private projects for which I am not a contact) +Permission141=Przeczytaj wszystkie projekty i zadania (także projekty prywatne, dla których nie jestem osobą kontaktową) +Permission142=Twórz/modyfikuj wszystkie projekty i zadania (także projekty prywatne, dla których nie jestem kontaktem) Permission144=Delete all projects and tasks (also private projects i am not contact for) Permission146=Czytaj dostawców Permission147=Czytaj statystyki -Permission151=Read direct debit payment orders -Permission152=Create/modify a direct debit payment orders -Permission153=Send/Transmit direct debit payment orders -Permission154=Record Credits/Rejections of direct debit payment orders +Permission151=Przeczytaj polecenia zapłaty za polecenie zapłaty +Permission152=Utwórz/zmodyfikuj polecenia zapłaty za polecenie zapłaty +Permission153=Wysyłanie/przesyłanie poleceń zapłaty za polecenie zapłaty +Permission154=Rejestrowanie kredytów/odrzuceń poleceń zapłaty poleceń zapłaty Permission161=Czytaj umowy / subskrypcje Permission162=Tworzenie / modyfikacja umowy / subskrypcji Permission163=Aktywacja usługi / subskrypcji umowy @@ -765,17 +773,17 @@ Permission173=Usuń wyjazdy i wydatki Permission174=Przeczytaj wszystkie wycieczki i koszty Permission178=Eksport wyjazdówi i kosztów Permission180=Czytaj dostawców -Permission181=Read purchase orders -Permission182=Create/modify purchase orders -Permission183=Validate purchase orders -Permission184=Approve purchase orders -Permission185=Order or cancel purchase orders -Permission186=Receive purchase orders -Permission187=Close purchase orders -Permission188=Cancel purchase orders +Permission181=Przeczytaj zamówienia +Permission182=Twórz/modyfikuj zamówienia +Permission183=Weryfikuj zamówienia +Permission184=Zatwierdź zamówienia zakupu +Permission185=Zamów lub anuluj zamówienia +Permission186=Otrzymuj zamówienia +Permission187=Zamknij zamówienia +Permission188=Anuluj zamówienia zakupu Permission192=Tworzenie linii Permission193=Zlikwiduj linię -Permission194=Read the bandwidth lines +Permission194=Przeczytaj linie przepustowości Permission202=Tworzenie połączenia ADSL Permission203=Zamów połączenie zamówień Permission204=Zamów połączenia @@ -800,12 +808,13 @@ Permission244=Zobacz zawartość ukrytych kategorii Permission251=Czytaj innych użytkowników i grupy PermissionAdvanced251=Czytaj innych użytkowników Permission252=Czytaj uprawnienia innych użytkowników -Permission253=Create/modify other users, groups and permissions +Permission253=Twórz/modyfikuj innych użytkowników, grupy i uprawnienia PermissionAdvanced253=Tworzenie / modyfikacja wewnętrznych / zewnętrznych użytkowników i uprawnień Permission254=Tworzenie / modyfikacja jedynie zewnętrznych użytkowników Permission255=Modyfikacja haseł innych użytkowników Permission256=Usuń lub dezaktywuj innych użytkowników -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Rozszerz dostęp na wszystkie osoby trzecie ORAZ ich obiekty (nie tylko osoby trzecie, dla których użytkownik jest przedstawicielem handlowym). <br> Nieefektywne dla użytkowników zewnętrznych (zawsze ograniczone do siebie samych w przypadku ofert, zamówień, faktur, umów itp.). <br> Nieefektywne dla projektów (tylko reguły dotyczące pozwoleń na projekty, widoczności i przydziałów mają znaczenie). +Permission263=Rozszerz dostęp na wszystkie osoby trzecie BEZ ich przedmiotu (nie tylko osoby trzecie, dla których użytkownik jest przedstawicielem handlowym). <br> Nieefektywne dla użytkowników zewnętrznych (zawsze ograniczone do siebie samych w przypadku ofert, zamówień, faktur, umów itp.). <br> Nieefektywne dla projektów (tylko reguły dotyczące pozwoleń na projekty, widoczności i przydziałów mają znaczenie). Permission271=Czytaj CA Permission272=Czytaj faktury Permission273=Wystawienie faktur @@ -815,10 +824,10 @@ Permission283=Usuwanie kontaktów Permission286=Eksport kontaktów Permission291=Czytaj taryfy Permission292=Ustaw uprawnienia dotyczące taryf -Permission293=Modify customer's tariffs -Permission300=Read barcodes -Permission301=Create/modify barcodes -Permission302=Delete barcodes +Permission293=Zmodyfikuj taryfy klienta +Permission300=Czytaj kody kreskowe +Permission301=Twórz/modyfikuj kody kreskowe +Permission302=Usuń kody kreskowe Permission311=Czytaj usługi Permission312=Przypisywanie usługi / subskrypcji do umowy Permission331=Czytaj zakładki @@ -837,11 +846,11 @@ Permission401=Odczytaj zniżki Permission402=Tworzenie / modyfikacja zniżek Permission403=Walidacja zniżek Permission404=Usuwanie zniżek -Permission430=Use Debug Bar -Permission511=Read payments of salaries (yours and subordinates) -Permission512=Create/modify payments of salaries -Permission514=Delete payments of salaries -Permission517=Read payments of salaries of everybody +Permission430=Użyj paska debugowania +Permission511=Czytaj wypłaty wynagrodzeń (twoich i podwładnych) +Permission512=Twórz/modyfikuj wypłaty wynagrodzeń +Permission514=Usuń wypłaty wynagrodzeń +Permission517=Przeczytaj wypłaty wynagrodzeń wszystkich Permission519=Wynagrodzenia eksport Permission520=Czytaj Kredyty Permission522=Tworzenie / modyfikacja kredytów @@ -853,19 +862,19 @@ 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 -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 -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission561=Czytaj polecenia płatności przelewem +Permission562=Utwórz/zmodyfikuj zlecenie płatnicze za pomocą przelewu +Permission563=Wyślij/prześlij polecenie zapłaty przelewem +Permission564=Rekordowe obciążenia/odrzucenia polecenia przelewu +Permission601=Przeczytaj naklejki +Permission602=Twórz/modyfikuj naklejki +Permission609=Usuń naklejki +Permission650=Przeczytaj listy materiałów +Permission651=Utwórz/zaktualizuj listy materiałów +Permission652=Usuń listy materiałów +Permission660=Przeczytaj zamówienie produkcyjne (MO) +Permission661=Utwórz/zaktualizuj zamówienie produkcyjne (MO) +Permission662=Usuń zlecenie produkcyjne (MO) Permission701=Zobacz darowizny Permission702=Tworzenie / modyfikacja darowizn Permission703=Usuń darowizny @@ -875,104 +884,104 @@ 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 +Permission777=Przeczytaj raporty wydatków wszystkich +Permission778=Twórz/modyfikuj raporty wydatków dla wszystkich Permission779=Eksport raportów kosztów Permission1001=Zobacz zasoby Permission1002=Tworzenie / modyfikacja magazynów Permission1003=Usuń magazyny Permission1004=Zobacz przemieszczanie zasobów Permission1005=Tworzenie / modyfikacja przemieszczania zasobów -Permission1101=Read delivery receipts -Permission1102=Create/modify delivery receipts -Permission1104=Validate delivery receipts -Permission1109=Delete delivery receipts -Permission1121=Read supplier proposals -Permission1122=Create/modify supplier proposals -Permission1123=Validate supplier proposals -Permission1124=Send supplier proposals -Permission1125=Delete supplier proposals -Permission1126=Close supplier price requests +Permission1101=Przeczytaj potwierdzenia dostaw +Permission1102=Twórz/modyfikuj potwierdzenia dostaw +Permission1104=Zatwierdź pokwitowania dostaw +Permission1109=Usuń potwierdzenia dostaw +Permission1121=Przeczytaj propozycje dostawców +Permission1122=Twórz/modyfikuj oferty dostawców +Permission1123=Zatwierdź propozycje dostawców +Permission1124=Wyślij propozycje dostawców +Permission1125=Usuń propozycje dostawców +Permission1126=Zamknij zapytania dostawców o cenę Permission1181=Czytaj dostawców -Permission1182=Read purchase orders -Permission1183=Create/modify purchase orders -Permission1184=Validate purchase orders -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 +Permission1182=Przeczytaj zamówienia +Permission1183=Twórz/modyfikuj zamówienia +Permission1184=Weryfikuj zamówienia +Permission1185=Zatwierdź zamówienia zakupu +Permission1186=Zrealizuj zamówienia +Permission1187=Potwierdź otrzymanie zamówień zakupu +Permission1188=Usuń zamówienia zakupu +Permission1189=Zaznacz/odznacz przyjęcie zamówienia zakupu +Permission1190=Zatwierdź (drugie zatwierdzenie) zamówienia zakupu +Permission1191=Eksport zamówień dostawców i ich atrybutów Permission1201=Wygeneruj wyniki eksportu Permission1202=Utwórz / modyfikuj eksport -Permission1231=Read vendor invoices -Permission1232=Create/modify vendor invoices -Permission1233=Validate vendor invoices -Permission1234=Delete vendor invoices -Permission1235=Send vendor invoices by email -Permission1236=Export vendor invoices, attributes and payments -Permission1237=Export purchase orders and their details +Permission1231=Przeczytaj faktury od dostawców +Permission1232=Twórz/modyfikuj faktury od dostawców +Permission1233=Weryfikuj faktury od dostawców +Permission1234=Usuń faktury dostawcy +Permission1235=Wysyłaj faktury dostawcy pocztą elektroniczną +Permission1236=Eksportuj faktury dostawców, atrybuty i płatności +Permission1237=Eksport zamówień i ich szczegółów Permission1251=Uruchom masowy import danych zewnętrznych do bazy danych (wgrywanie danych) Permission1321=Eksport faktur klienta, atrybutów oraz płatności -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) +Permission1322=Otwórz ponownie opłacony rachunek +Permission1421=Eksportuj zamówienia sprzedaży i atrybuty +Permission1521=Przeczytaj dokumenty +Permission1522=Usuń dokumenty +Permission2401=Czytaj akcje (zdarzenia lub zadania) powiązane z jego kontem użytkownika (jeśli jest właścicielem wydarzenia lub właśnie do niego przypisane) +Permission2402=Tworzenie/modyfikowanie działań (wydarzeń lub zadań) powiązanych z jego kontem użytkownika (jeśli jest właścicielem wydarzenia) +Permission2403=Usuń działania (zdarzenia lub zadania) powiązane z jego kontem użytkownika (jeśli właściciel wydarzenia) Permission2411=Czytaj działania (zdarzenia lub zadania) innych osób Permission2412=Tworzenie / modyfikacja działań (zdarzeń lub zadań) innych osób Permission2413=Usuwanie działań (zdarzeń lub zadań) innych osób -Permission2414=Export actions/tasks of others +Permission2414=Eksport działań/zadań innych osób Permission2501=Czytaj / Pobierz dokumenty Permission2502=Pobierz dokumenty Permission2503=Potwierdź lub usuń dokumenty 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 -Permission4004=Export employees -Permission10001=Read website content -Permission10002=Create/modify website content (html and javascript content) -Permission10003=Create/modify website content (dynamic php code). Dangerous, must be reserved to restricted developers. -Permission10005=Delete website content -Permission20001=Read leave requests (your leave and those of your subordinates) -Permission20002=Create/modify your leave requests (your leave and those of your subordinates) +Permission3200=Czytaj zarchiwizowane wydarzenia i odciski palców +Permission3301=Wygeneruj nowe moduły +Permission4001=Zobacz pracowników +Permission4002=Twórz pracowników +Permission4003=Usuń pracowników +Permission4004=Eksportuj pracowników +Permission10001=Przeczytaj zawartość strony internetowej +Permission10002=Twórz/modyfikuj zawartość strony internetowej (zawartość html i javascript) +Permission10003=Twórz/modyfikuj zawartość strony internetowej (dynamiczny kod php). Niebezpieczne, musi być zarezerwowane dla programistów z ograniczeniami. +Permission10005=Usuń zawartość witryny +Permission20001=Przeczytaj wnioski urlopowe (Twoje i Twoich podwładnych) +Permission20002=Twórz/modyfikuj swoje wnioski urlopowe (urlop swój i podwładnych) Permission20003=Delete leave requests -Permission20004=Read all leave requests (even of user not subordinates) -Permission20005=Create/modify leave requests for everybody (even of user not subordinates) +Permission20004=Przeczytaj wszystkie wnioski urlopowe (nawet użytkowników, którzy nie są podwładnymi) +Permission20005=Twórz/modyfikuj wnioski urlopowe dla wszystkich (nawet użytkowników niebędących podwładnymi) Permission20006=Admin leave requests (setup and update balance) -Permission20007=Approve leave requests +Permission20007=Zatwierdź wnioski urlopowe Permission23001=Czytaj Zaplanowane zadania Permission23002=Tworzenie / aktualizacja Zaplanowanych zadań Permission23003=Usuwanie Zaplanowanego zadania Permission23004=Wykonanie Zaplanowanego zadania -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50101=Użyj punktu sprzedaży (SimplePOS) +Permission50151=Użyj punktu sprzedaży (TakePOS) Permission50201=Czytaj transakcje Permission50202=Import transakcji -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 -Permission50414=Delete operations in ledger -Permission50415=Delete all operations by year and journal in ledger -Permission50418=Export operations of the ledger -Permission50420=Report and export reports (turnover, balance, journals, ledger) -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 +Permission50330=Przeczytaj obiekty Zapier +Permission50331=Twórz/aktualizuj obiekty Zapier +Permission50332=Usuń obiekty Zapier +Permission50401=Powiąż produkty i faktury z kontami księgowymi +Permission50411=Czytaj operacje w księdze +Permission50412=Operacje zapisu/edycji w księdze +Permission50414=Usuń operacje w księdze +Permission50415=Usuń wszystkie operacje według roku i arkusza w księdze +Permission50418=Operacje eksportowe księgi +Permission50420=Raporty i raporty eksportowe (obroty, saldo, arkusze, księga) +Permission50430=Zdefiniuj okresy obrachunkowe. Weryfikuj transakcje i zamykaj okresy obrachunkowe. +Permission50440=Zarządzaj planem kont, konfiguruj rachunkowość +Permission51001=Przeczytaj zasoby +Permission51002=Utwórz/zaktualizuj zasoby +Permission51003=Usuń zasoby +Permission51005=Skonfiguruj typy zasobów Permission54001=Druk Permission55001=Czytaj ankiety Permission55002=Tworzenie / modyfikacja ankiet @@ -983,96 +992,96 @@ Permission63001=Czytaj zasoby Permission63002=Utwórz/modyfikuj zasoby Permission63003=Usuń zasoby Permission63004=Dołącz zasoby do zdarzeń w agendzie -Permission64001=Allow direct printing -Permission67000=Allow printing of receipts -Permission68001=Read intracomm report -Permission68002=Create/modify intracomm report -Permission68004=Delete intracomm report -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 level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts -DictionaryCanton=States/Provinces +Permission64001=Zezwalaj na drukowanie bezpośrednie +Permission67000=Zezwalaj na drukowanie paragonów +Permission68001=Przeczytaj raport intracomm +Permission68002=Utwórz/zmodyfikuj raport intracomm +Permission68004=Usuń raport intracomm +Permission941601=Przeczytaj rachunki +Permission941602=Twórz i modyfikuj rachunki +Permission941603=Potwierdź rachunki +Permission941604=Wysyłaj potwierdzenia e-mailem +Permission941605=Wpływy eksportowe +Permission941606=Usuń rachunki +DictionaryCompanyType=Typy kontrahentów +DictionaryCompanyJuridicalType=Osoby prawne będące stronami trzecimi +DictionaryProspectLevel=Potencjalny poziom dla firm +DictionaryProspectContactLevel=Potencjalny poziom kontaktów +DictionaryCanton=Stany/prowincje DictionaryRegion=Regiony DictionaryCountry=Kraje DictionaryCurrency=Waluty -DictionaryCivility=Honorific titles +DictionaryCivility=Tytuły honorowe DictionaryActions=Typy zdarzeń w agendzie DictionarySocialContributions=Rodzaje obciążeń społecznych lub podatków DictionaryVAT=Stawki VAT lub stawki podatku od sprzedaży -DictionaryRevenueStamp=Amount of tax stamps +DictionaryRevenueStamp=Kwota znaków skarbowych DictionaryPaymentConditions=Zasady płatności DictionaryPaymentModes=Tryby płatności DictionaryTypeContact=Typy kontaktu/adresu DictionaryTypeOfContainer=Witryna internetowa - zbiór powiązanych ze sobą stron internetowych DictionaryEcotaxe=Podatku ekologicznego (WEEE) DictionaryPaperFormat=Formaty papieru -DictionaryFormatCards=Card formats -DictionaryFees=Expense report - Types of expense report lines +DictionaryFormatCards=Formaty kart +DictionaryFees=Raport z wydatków - Rodzaje wierszy raportu z wydatków DictionarySendingMethods=Metody wysyłki DictionaryStaff=Liczba zatrudnionych DictionaryAvailability=Opóźnienie dostawy DictionaryOrderMethods=Sposoby zamawiania DictionarySource=Pochodzenie wniosków / zleceń -DictionaryAccountancyCategory=Personalized groups for reports +DictionaryAccountancyCategory=Spersonalizowane grupy raportów DictionaryAccountancysystem=Modele dla planu kont DictionaryAccountancyJournal=Dzienniki księgowe DictionaryEMailTemplates=Szablony wiadomości e-mail DictionaryUnits=Units DictionaryMeasuringUnits=Jednostki pomiarowe DictionarySocialNetworks=Sieci społecznościowe -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 -DictionaryExpenseTaxRange=Expense report - Range by transportation category -DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +DictionaryProspectStatus=Status perspektywiczny dla firm +DictionaryProspectContactStatus=Status potencjalnych kontaktów +DictionaryHolidayTypes=Rodzaje urlopów +DictionaryOpportunityStatus=Status potencjalnego klienta dla projektu/potencjalnego klienta +DictionaryExpenseTaxCat=Raport wydatków - Kategorie transportu +DictionaryExpenseTaxRange=Raport z wydatków - zakres według kategorii transportu +DictionaryTransportMode=Raport Intracomm - tryb transportowy +TypeOfUnit=Rodzaj jednostki SetupSaved=Konfiguracja zapisana SetupNotSaved=Ustawienia nie zapisane BackToModuleList=Powrót do listy modułów BackToDictionaryList=Powrót do listy słowników -TypeOfRevenueStamp=Type of tax stamp +TypeOfRevenueStamp=Rodzaj znaku skarbowego VATManagement=Zarządzanie podatkami od sprzedaży -VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the Sales Tax rate follows the active standard rule:<br>If the seller is not subject to Sales tax, then Sales tax defaults to 0. End of rule.<br>If the (seller's country = buyer's country), then the Sales tax by default equals the Sales tax of the product in the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to the customs office in their country and not to the seller. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT defaults to the VAT rate of the seller's country. End of rule.<br>If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.<br>In any other case the proposed default is Sales tax=0. End of rule. -VATIsNotUsedDesc=By default the proposed Sales tax is 0 which can be used for cases like associations, individuals or small companies. -VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. -VATIsNotUsedExampleFR=In France, it means associations that are non Sales tax declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (Sales tax in franchise) and paid a franchise Sales tax without any Sales tax declaration. This choice will display the reference "Non applicable Sales tax - art-293B of CGI" on invoices. +VATIsUsedDesc=Domyślnie podczas tworzenia prospektów, faktur, zamówień itp. Stawka podatku od sprzedaży jest zgodna z aktywną regułą standardową: <br> Jeśli sprzedawca nie podlega podatkowi od sprzedaży, wówczas podatek od sprzedaży jest domyślnie ustawiony na 0. Koniec reguły. <br> Jeśli (kraj sprzedającego = kraj kupującego), wówczas podatek od sprzedaży jest domyślnie równy podatkowi od sprzedaży produktu w kraju sprzedawcy. Koniec reguły. <br> Jeśli sprzedawca i kupujący znajdują się na terenie Wspólnoty Europejskiej, a towary są produktami związanymi z transportem (transport, spedycja, linia lotnicza), domyślny podatek VAT wynosi 0. Ta zasada zależy od kraju sprzedawcy - skonsultuj się z księgowym. Kupujący powinien zapłacić podatek VAT w urzędzie celnym w swoim kraju, a nie sprzedającemu. Koniec reguły. <br> Jeśli sprzedawca i kupujący znajdują się zarówno we Wspólnocie Europejskiej, a kupujący nie jest firmą (z zarejestrowanym wewnątrzwspólnotowym numerem VAT), wówczas podatek VAT jest domyślnie równy stawce VAT kraju sprzedawcy. Koniec reguły. <br> Jeśli sprzedawca i kupujący znajdują się zarówno we Wspólnocie Europejskiej, a kupującym jest firma (z zarejestrowanym wewnątrzwspólnotowym numerem VAT), wówczas VAT wynosi domyślnie 0. Koniec reguły. <br> W każdym innym przypadku proponowaną wartością domyślną jest podatek obrotowy = 0. Koniec reguły. +VATIsNotUsedDesc=Domyślnie proponowany podatek od sprzedaży wynosi 0 i może być stosowany w przypadkach takich jak stowarzyszenia, osoby fizyczne lub małe firmy. +VATIsUsedExampleFR=We Francji oznacza to firmy lub organizacje posiadające rzeczywisty system podatkowy (rzeczywisty uproszczony lub normalny). System, w którym deklarowany jest podatek VAT. +VATIsNotUsedExampleFR=We Francji oznacza to stowarzyszenia, które nie są zadeklarowane jako podatek od sprzedaży lub firmy, organizacje lub wolne zawody, które wybrały system podatkowy dla mikroprzedsiębiorstw (podatek od sprzedaży na zasadzie franczyzy) i zapłaciły franczyzę Podatek obrotowy bez żadnej deklaracji podatkowej. Ten wybór spowoduje wyświetlenie na fakturach odniesienia „Nie dotyczy podatku od sprzedaży - art-293B CGI”. ##### Local Taxes ##### -TypeOfSaleTaxes=Type of sales tax +TypeOfSaleTaxes=Rodzaj podatku od sprzedaży LTRate=Stawka LocalTax1IsNotUsed=Nie należy używać drugiego podatku -LocalTax1IsUsedDesc=Use a second type of tax (other than first one) -LocalTax1IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax1IsUsedDesc=Użyj drugiego rodzaju podatku (innego niż pierwszy) +LocalTax1IsNotUsedDesc=Nie używaj innego rodzaju podatku (innego niż pierwszy) LocalTax1Management=Drugi rodzaj podatku LocalTax1IsUsedExample= LocalTax1IsNotUsedExample= LocalTax2IsNotUsed=Nie używaj trzeciego podatku -LocalTax2IsUsedDesc=Use a third type of tax (other than first one) -LocalTax2IsNotUsedDesc=Do not use other type of tax (other than first one) +LocalTax2IsUsedDesc=Użyj trzeciego rodzaju podatku (innego niż pierwszy) +LocalTax2IsNotUsedDesc=Nie używaj innego rodzaju podatku (innego niż pierwszy) LocalTax2Management=Trzeci rodzaj podatku LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= LocalTax1ManagementES=RE Management -LocalTax1IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:<br>If the buyer is not subjected to RE, RE by default=0. End of rule.<br>If the buyer is subjected to RE then the RE by default. End of rule.<br> +LocalTax1IsUsedDescES=Stawka RE domyślnie podczas tworzenia prospektów, faktur, zamówień itp. Jest zgodna z aktywną standardową regułą: <br> Jeśli kupujący nie podlega RE, wartość RE domyślnie = 0. Koniec panowania. <br> Jeśli kupujący podlega OZE, to domyślnie RE. Koniec panowania. <br> LocalTax1IsNotUsedDescES=Domyślnie proponowany RE wynosi 0. Koniec zasady. LocalTax1IsUsedExampleES=W Hiszpanii są specjaliści z zastrzeżeniem niektórych szczególnych grup hiszpański IAE. LocalTax1IsNotUsedExampleES=W Hiszpanii są zawodowej i społecznej oraz z zastrzeżeniem pewnych odcinkach hiszpański IAE. LocalTax2ManagementES=IRPF Management -LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices, orders etc. follow the active standard rule:<br>If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.<br>If the seller is subjected to IRPF then the IRPF by default. End of rule.<br> +LocalTax2IsUsedDescES=Domyślnie stawka IRPF podczas tworzenia prospektów, faktur, zamówień itp. Jest zgodna z aktywną standardową regułą: <br> Jeśli sprzedawca nie podlega IRPF, wówczas IRPF domyślnie = 0. Koniec panowania. <br> Jeśli sprzedawca podlega IRPF, to domyślnie IRPF. Koniec panowania. <br> LocalTax2IsNotUsedDescES=Domyślnie proponowany IRPF wynosi 0. Koniec zasady. LocalTax2IsUsedExampleES=W Hiszpanii, freelancerów i przedstawicieli wolnych zawodów, którzy świadczą usługi i przedsiębiorstwa, którzy wybrali system podatkowy modułów. -LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. -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) +LocalTax2IsNotUsedExampleES=W Hiszpanii są to przedsiębiorstwa niepodlegające podatkowemu systemowi modułów. +RevenueStampDesc=„Znaczek skarbowy” to stały podatek na fakturę (nie zależy od kwoty faktury). Może to być również podatek procentowy, ale użycie drugiego lub trzeciego rodzaju podatku jest lepsze w przypadku podatków procentowych, ponieważ znaki skarbowe nie zapewniają żadnego raportowania. Tylko nieliczne kraje stosują ten rodzaj podatku. +UseRevenueStamp=Użyj znaku skarbowego +UseRevenueStampExample=Wartość znaku skarbowego jest domyślnie definiowana w ustawieniach słowników (%s - %s - %s) CalcLocaltax=Raporty odnośnie podatków lokalnych CalcLocaltax1=Sprzedaż - Zakupy CalcLocaltax1Desc=Lokalne raporty Podatki są obliczane z różnicy między sprzedażą localtaxes i localtaxes zakupów @@ -1080,15 +1089,15 @@ CalcLocaltax2=Zakupy CalcLocaltax2Desc=Lokalne raporty Podatki są łącznie localtaxes zakupów CalcLocaltax3=Sprzedaż CalcLocaltax3Desc=Lokalne raporty Podatki są za łączną sprzedaży localtaxes -NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax +NoLocalTaxXForThisCountry=Zgodnie z konfiguracją podatków (patrz %s - %s - %s) Twój kraj nie musi stosować tego rodzaju podatku LabelUsedByDefault=Wytwórnia używany domyślnie, jeśli nie można znaleźć tłumaczenie dla kodu LabelOnDocuments=Etykieta na dokumenty -LabelOrTranslationKey=Label or translation key -ValueOfConstantKey=Value of a configuration constant -ConstantIsOn=Option %s is on -NbOfDays=No. of days +LabelOrTranslationKey=Etykieta lub klucz tłumaczenia +ValueOfConstantKey=Wartość stałej konfiguracji +ConstantIsOn=Opcja %s jest włączona +NbOfDays=Liczba dni AtEndOfMonth=Na koniec miesiąca -CurrentNext=Current/Next +CurrentNext=Bieżący/następny Offset=Offset AlwaysActive=Zawsze aktywne Upgrade=Uaktualnij @@ -1111,7 +1120,7 @@ DatabaseUser=Użytkownik bazy danych DatabasePassword=Hasło bazy danych Tables=Tabele TableName=Nazwa tabeli -NbOfRecord=No. of records +NbOfRecord=Liczba rekordów Host=Serwer DriverType=Typ sterownika SummarySystem=Podsumowanie informacji systemowych @@ -1123,59 +1132,60 @@ Skin=Skórka DefaultSkin=Domyślna skórka MaxSizeList=Maksymalna długość listy DefaultMaxSizeList=Domyślna maksymalna długość listy -DefaultMaxSizeShortList=Default max length for short lists (i.e. in customer card) +DefaultMaxSizeShortList=Domyślna maksymalna długość krótkich list (np. Na karcie klienta) MessageOfDay=Wiadomość dnia MessageLogin=Wiadomość strona logowania LoginPage=Strona logowania BackgroundImageLogin=Obrazek tła PermanentLeftSearchForm=Stały formularz wyszukiwania w lewym menu -DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships -EnableShowLogo=Show the company logo in the menu +DefaultLanguage=Domyślny język +EnableMultilangInterface=Włącz obsługę wielu języków dla relacji z klientami lub dostawcami +EnableShowLogo=Pokaż logo firmy w menu CompanyInfo=Firma/Organizacja -CompanyIds=Company/Organization identities +CompanyIds=Tożsamość firmy/organizacji CompanyName=Nazwa firmy CompanyAddress=Adres CompanyZip=Kod pocztowy CompanyTown=Miasto CompanyCountry=Kraj CompanyCurrency=Główna waluta -CompanyObject=Object of the company -IDCountry=ID country +CompanyObject=Przedmiot firmy +IDCountry=Identifikator kraju 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=Główne logo firmy. Zostanie wykorzystane w generowanych dokumentach (PDF, ...) +LogoSquarred=Logo (kwadratowe) +LogoSquarredDesc=Musi to być kwadratowa ikona (szerokość = wysokość). To logo będzie używane jako ulubiona ikona lub inna potrzeba, na przykład na górnym pasku menu (jeśli nie zostanie wyłączone w konfiguracji wyświetlacza). DoNotSuggestPaymentMode=Nie proponuj NoActiveBankAccountDefined=Brak zdefiniowanego aktywnego konta bankowego OwnerOfBankAccount=Właściciel konta bankowego %s BankModuleNotActive=Moduł Rachunków bankowych jest nie aktywny ShowBugTrackLink=Show link "<strong>%s</strong>" Alerts=Alarmy -DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for: -DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element. -Delays_MAIN_DELAY_ACTIONS_TODO=Planned events (agenda events) not completed -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Project not closed in time -Delays_MAIN_DELAY_TASKS_TODO=Planned task (project tasks) not completed -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Order not processed -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Purchase order not processed -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Proposal not closed -Delays_MAIN_DELAY_PROPALS_TO_BILL=Proposal not billed -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Service to activate -Delays_MAIN_DELAY_RUNNING_SERVICES=Expired service -Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Unpaid vendor invoice -Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Unpaid customer invoice -Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Pending bank reconciliation -Delays_MAIN_DELAY_MEMBERS=Delayed membership fee -Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done -Delays_MAIN_DELAY_EXPENSEREPORTS=Expense report to approve -Delays_MAIN_DELAY_HOLIDAYS=Leave requests to approve -SetupDescription1=Before starting to use Dolibarr some initial parameters must be defined and modules enabled/configured. -SetupDescription2=The following two sections are mandatory (the two first entries in the Setup menu): -SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. -SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Zdarzenia audytu bezpieczeństwa +DelaysOfToleranceBeforeWarning=Opóźnienie przed wyświetleniem ostrzeżenia dotyczącego: +DelaysOfToleranceDesc=Ustaw opóźnienie, zanim ikona alertu %s zostanie wyświetlona na ekranie dla późnego elementu. +Delays_MAIN_DELAY_ACTIONS_TODO=Planowane wydarzenia (wydarzenia w programie) nie zostały zakończone +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Projekt nie został zamknięty na czas +Delays_MAIN_DELAY_TASKS_TODO=Planowane zadanie (zadania projektowe) nie zostało ukończone +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Zamówienie nie zostało przetworzone +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Zamówienie nie zostało przetworzone +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Oferta nie została zamknięta +Delays_MAIN_DELAY_PROPALS_TO_BILL=Oferta nie została rozliczona +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Usługa do aktywacji +Delays_MAIN_DELAY_RUNNING_SERVICES=Usługa wygasła +Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Niezapłacona faktura dostawcy +Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Niezapłacona faktura klienta +Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Oczekujące uzgodnienie bankowe +Delays_MAIN_DELAY_MEMBERS=Opóźniona opłata członkowska +Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Nie dokonano wpłaty czekiem +Delays_MAIN_DELAY_EXPENSEREPORTS=Raport wydatków do zatwierdzenia +Delays_MAIN_DELAY_HOLIDAYS=Zostaw prośby do zatwierdzenia +SetupDescription1=Przed rozpoczęciem korzystania z systemu Dolibarr należy zdefiniować pewne parametry początkowe i włączyć/skonfigurować moduły. +SetupDescription2=Poniższe dwie sekcje są obowiązkowe (dwie pierwsze pozycje w menu Ustawienia): +SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Podstawowe parametry używane do dostosowania domyślnego zachowania aplikacji (np. funkcji związanych z krajem). +SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> To oprogramowanie jest zestawem wielu modułów/aplikacji. Moduły związane z Twoimi potrzebami muszą być włączone i skonfigurowane. Pozycje menu pojawią się po aktywacji tych modułów. +SetupDescription5=Pozycje w menu Inne Ustawienia zarządzają parametrami opcjonalnymi. +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audyt InfoDolibarr=O Dolibarr InfoBrowser=O przeglądarce @@ -1183,204 +1193,204 @@ InfoOS=O systemie InfoWebServer=O serwerze WWW InfoDatabase=O bazie danych InfoPHP=O PHP -InfoPerf=About Performances -InfoSecurity=About Security +InfoPerf=O spektaklach +InfoSecurity=O bezpieczeństwie BrowserName=Nazwa przeglądarki BrowserOS=Przeglądarka OS ListOfSecurityEvents=Lista zdarzeń bezpieczeństwa Dolibarr SecurityEventsPurged=Zdarzenia dotyczące bezpieczeństwa oczyszczone -LogEventDesc=Enable logging for specific security events. Administrators the log via menu <b>%s - %s</b>. Warning, this feature can generate a large amount of data in the database. +LogEventDesc=Włącz rejestrowanie określonych zdarzeń związanych z bezpieczeństwem. Administratorzy dziennika za pośrednictwem menu <b> %s - %s </b>. Ostrzeżenie, ta funkcja może generować dużą ilość danych w bazie danych. AreaForAdminOnly=Parametry mogą być ustawiane tylko przez <b>użytkowników z prawami administratora</b>. SystemInfoDesc=System informacji jest różne informacje techniczne można uzyskać w trybie tylko do odczytu i widoczne tylko dla administratorów. -SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. -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 -DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. +SystemAreaForAdminOnly=Ten obszar jest dostępny tylko dla administratorów. Uprawnienia użytkownika Dolibarr nie mogą zmienić tego ograniczenia. +CompanyFundationDesc=Edytuj informacje o swojej firmie/organizacji. Po zakończeniu kliknij przycisk „%s” u dołu strony. +AccountantDesc=Jeśli masz zewnętrznego księgowego, możesz tutaj edytować jego informacje. +AccountantFileNumber=Kod księgowego +DisplayDesc=W tym miejscu można modyfikować parametry wpływające na wygląd i zachowanie Dolibarr. AvailableModules=Dostępne aplikacje / moduły ToActivateModule=Aby uaktywnić modules, przejdź na konfigurację Powierzchnia. SessionTimeOut=Limit czasu dla sesji -SessionExplanation=This number guarantees that the session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guarantee that the session will expire after this delay. It will expire, after this delay, and when the session cleaner is run, so every <b>%s/%s</b> access, but only during access made by other sessions (if value is 0, it means clearing of session is done only by an external process).<br>Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by an external setup, no matter what the value entered here is. -SessionsPurgedByExternalSystem=Sessions on this server seems to be cleaned by an external mechanism (cron under debian, ubuntu ...), probably every <b>%s</b> seconds (= value of parameter <b>session.gc_maxlifetime</b>), so changing the value here has no effect. You must ask the server administrator to change session delay. +SessionExplanation=Ta liczba gwarantuje, że sesja nigdy nie wygaśnie przed tym opóźnieniem, jeśli czyszczenie sesji jest wykonywane przez wewnętrzne czyszczenie sesji PHP (i nic więcej). Wewnętrzne czyszczenie sesji PHP nie gwarantuje, że sesja wygaśnie po tym opóźnieniu. Wygasa po tym opóźnieniu i po uruchomieniu czyszczenia sesji, więc każdy <b> %s/%s </b>, ale tylko podczas dostępu z innych sesji (jeśli wartość wynosi 0, oznacza to, że kasowanie sesji jest wykonywane tylko przez zewnętrzną proces). <br> Uwaga: na niektórych serwerach z zewnętrznym mechanizmem czyszczenia sesji (cron w debianie, ubuntu ...) sesje mogą zostać zniszczone po okresie zdefiniowanym przez zewnętrzną konfigurację, niezależnie od wprowadzonej tutaj wartości. +SessionsPurgedByExternalSystem=Wydaje się, że sesje na tym serwerze są czyszczone przez zewnętrzny mechanizm (cron w debianie, ubuntu ...), prawdopodobnie każda <b> %s </b> seconds (= value of parameter <b> session.gc_maxlifetime </b>), nie ma tutaj efektu. Musisz poprosić administratora serwera o zmianę opóźnienia sesji. TriggersAvailable=Dostępne wyzwala -TriggersDesc=Triggers are files that will modify the behavior of Dolibarr workflow once copied into the directory <b>htdocs/core/triggers</b>. They realize new actions, activated on Dolibarr events (new company creation, invoice validation, ...). +TriggersDesc=Wyzwalacze to pliki, które zmienią zachowanie przepływu pracy Dolibarr po skopiowaniu do katalogu <b> htdocs / core / triggers </b>. Realizują nowe działania, uruchamiane na wydarzeniach Dolibarr (tworzenie nowej firmy, walidacja faktur, ...). TriggerDisabledByName=Wyzwalacze w tym pliku są wyłączone przez <b>NORUN-suffix</b> w ich imieniu. TriggerDisabledAsModuleDisabled=Wyzwalacze w tym pliku są wyłączone jako <b>modułu %s</b> została wyłączona. TriggerAlwaysActive=Wyzwalacze w tym pliku są zawsze aktywne, niezależnie są aktywowane Dolibarr modułów. TriggerActiveAsModuleActive=Wyzwalacze w tym pliku są aktywne jako <b>modułu %s</b> jest aktywny. -GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords. +GeneratedPasswordDesc=Wybierz metodę, która ma być używana w przypadku haseł generowanych automatycznie. DictionaryDesc=Wprowadź wszystkie potrzebne dane. Wartości można dodać do ustawień domyślnych. -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=Ta strona umożliwia edycję (nadpisanie) parametrów niedostępnych na innych stronach. Są to w większości parametry zarezerwowane tylko dla programistów / zaawansowanego rozwiązywania problemów. MiscellaneousDesc=Inne powiązane parametry bezpieczeństwa są zdefiniowane tutaj LimitsSetup=Ograniczenia / Precision konfiguracji -LimitsDesc=You can define limits, precisions and optimizations used by Dolibarr here -MAIN_MAX_DECIMALS_UNIT=Max. decimals for unit prices -MAIN_MAX_DECIMALS_TOT=Max. decimals for total prices -MAIN_MAX_DECIMALS_SHOWN=Max. decimals for prices <b>shown on screen</b>. Add an ellipsis <b>...</b> after this parameter (e.g. "2...") if you want to see "<b>...</b>" suffixed to the truncated price. -MAIN_ROUNDING_RULE_TOT=Step of rounding range (for countries where rounding is done on something other than base 10. For example, put 0.05 if rounding is done by 0.05 steps) +LimitsDesc=Tutaj możesz zdefiniować limity, dokładności i optymalizacje używane przez Dolibarr +MAIN_MAX_DECIMALS_UNIT=Maks. ułamki dziesiętne dla cen jednostkowych +MAIN_MAX_DECIMALS_TOT=Maks. ułamki dziesiętne dla cen całkowitych +MAIN_MAX_DECIMALS_SHOWN=Maks. wartości dziesiętne dla cen <b> pokazanych na ekranie </b>. Dodaj wielokropek <b> ... </b> po tym parametrze (np. „2 ...”), jeśli chcesz zobaczyć przyrostek „<b> ... </b>” w skróconej cenie. +MAIN_ROUNDING_RULE_TOT=Krok zaokrąglania zakresu (dla krajów, w których zaokrąglanie odbywa się na czymś innym niż podstawa 10. Na przykład wpisz 0,05, jeśli zaokrąglanie odbywa się o 0,05 kroków) UnitPriceOfProduct=Cena netto jednostki produktu -TotalPriceAfterRounding=Total price (excl/vat/incl tax) after rounding +TotalPriceAfterRounding=Cena całkowita (bez / vat / z podatkiem) po zaokrągleniu ParameterActiveForNextInputOnly=Parametr skuteczne wejście tylko dla najbliższych -NoEventOrNoAuditSetup=No security event has been logged. This is normal if Audit has not been enabled in the "Setup - Security - Events" page. -NoEventFoundWithCriteria=No security event has been found for this search criteria. +NoEventOrNoAuditSetup=Żadne zdarzenie dotyczące bezpieczeństwa nie zostało zarejestrowane. Jest to normalne, jeśli Audyt nie został włączony na stronie „Ustawienia - Bezpieczeństwo - Zdarzenia”. +NoEventFoundWithCriteria=Nie znaleziono zdarzenia bezpieczeństwa dla tych kryteriów wyszukiwania. SeeLocalSendMailSetup=Zobacz lokalnej konfiguracji sendmaila -BackupDesc=A <b>complete</b> backup of a Dolibarr installation requires two steps. -BackupDesc2=Backup the contents of the "documents" directory (<b>%s</b>) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes. -BackupDesc3=Backup the structure and contents of your database (<b>%s</b>) into a dump file. For this, you can use the following assistant. -BackupDescX=The archived directory should be stored in a secure place. +BackupDesc=Kompletna kopia zapasowa <b> </b> instalacji Dolibarr wymaga dwóch kroków. +BackupDesc2=Utwórz kopię zapasową zawartości katalogu „dokumenty” (<b> %s </b>) zawierającego wszystkie przesłane i wygenerowane pliki. Obejmuje to również wszystkie pliki zrzutu wygenerowane w kroku 1. Ta operacja może potrwać kilka minut. +BackupDesc3=Utwórz kopię zapasową struktury i zawartości bazy danych (<b> %s </b>) w pliku zrzutu. W tym celu możesz użyć następującego asystenta. +BackupDescX=Zarchiwizowany katalog należy przechowywać w bezpiecznym miejscu. BackupDescY=Wygenerowany plik zrzutu powinny być przechowywane w bezpiecznym miejscu. -BackupPHPWarning=Backup cannot be guaranteed with this method. Previous one recommended. -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 (<b>%s</b>). -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 (<b>%s</b>). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.<br>To restore a backup database into this current installation, you can follow this assistant. +BackupPHPWarning=W przypadku tej metody nie można zagwarantować tworzenia kopii zapasowych. Zalecany poprzedni. +RestoreDesc=Aby przywrócić kopię zapasową Dolibarr, wymagane są dwa kroki. +RestoreDesc2=Przywróć plik kopii zapasowej (na przykład plik zip) katalogu „dokumenty” do nowej instalacji Dolibarr lub do tego katalogu aktualnych dokumentów (<b> %s </b>). +RestoreDesc3=Przywróć strukturę bazy danych i dane z pliku zrzutu kopii zapasowej do bazy danych nowej instalacji Dolibarr lub do bazy danych bieżącej instalacji (<b> %s </b>). Ostrzeżenie, po zakończeniu przywracania musisz użyć loginu/hasła, które istniały od czasu tworzenia kopii zapasowej/instalacji, aby połączyć się ponownie. <br> Aby przywrócić kopię zapasową bazy danych w bieżącej instalacji, możesz postępować zgodnie z tym asystentem. RestoreMySQL=Import MySQL ForcedToByAModule=Ta zasada jest zmuszona <b>do %s</b> przez aktywowany modułu -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 -RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Program version %s differs from Database version %s) +ValueIsForcedBySystem=Ta wartość jest wymuszana przez system. Nie możesz tego zmienić. +PreviousDumpFiles=Istniejące pliki kopii zapasowych +PreviousArchiveFiles=Istniejące pliki archiwów +WeekStartOnDay=Pierwszy dzień tygodnia +RunningUpdateProcessMayBeRequired=Wydaje się, że wymagane jest uruchomienie procesu aktualizacji (wersja programu %s różni się od wersji bazy danych %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Należy uruchomić to polecenie z wiersza polecenia po zalogowaniu się do powłoki z <b>%s</b> użytkownika. YourPHPDoesNotHaveSSLSupport=funkcji SSL nie są dostępne w PHP DownloadMoreSkins=Więcej skórek do pobrania -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset -ShowProfIdInAddress=Show professional id with addresses -ShowVATIntaInAddress=Hide intra-Community VAT number with addresses +SimpleNumRefModelDesc=Zwraca numer referencyjny w formacie %syymm-nnnn, gdzie rr to rok, mm to miesiąc, a nnnn to sekwencyjna liczba automatycznie zwiększająca się bez resetowania +ShowProfIdInAddress=Pokaż identyfikator zawodowy z adresami +ShowVATIntaInAddress=Ukryj wewnątrzwspólnotowy numer VAT wraz z adresami TranslationUncomplete=Częściowe tłumaczenie -MAIN_DISABLE_METEO=Disable meteorological view -MeteoStdMod=Standard mode -MeteoStdModEnabled=Standard mode enabled -MeteoPercentageMod=Percentage mode -MeteoPercentageModEnabled=Percentage mode enabled -MeteoUseMod=Click to use %s +MAIN_DISABLE_METEO=Wyłącz widok meteorologiczny +MeteoStdMod=Tryb standardowy +MeteoStdModEnabled=Tryb standardowy włączony +MeteoPercentageMod=Tryb procentowy +MeteoPercentageModEnabled=Włączono tryb procentowy +MeteoUseMod=Kliknij, aby użyć %s TestLoginToAPI=Przetestuj się zalogować do interfejsu API -ProxyDesc=Some features of Dolibarr require internet access. Define here the internet connection parameters such as access through a proxy server if necessary. -ExternalAccess=External/Internet Access -MAIN_PROXY_USE=Use a proxy server (otherwise access is direct to the internet) -MAIN_PROXY_HOST=Proxy server: Name/Address -MAIN_PROXY_PORT=Proxy server: Port -MAIN_PROXY_USER=Proxy server: Login/User -MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +ProxyDesc=Niektóre funkcje Dolibarr wymagają dostępu do Internetu. Zdefiniuj tutaj parametry połączenia internetowego, takie jak dostęp przez serwer proxy, jeśli to konieczne. +ExternalAccess=Zewnętrzny dostęp +MAIN_PROXY_USE=Użyj serwera proxy (w przeciwnym razie dostęp jest bezpośredni do Internetu) +MAIN_PROXY_HOST=Serwer proxy: nazwa / adres +MAIN_PROXY_PORT=Serwer proxy: port +MAIN_PROXY_USER=Serwer proxy: Login / Użytkownik +MAIN_PROXY_PASS=Serwer proxy: hasło +DefineHereComplementaryAttributes=Zdefiniuj wszelkie dodatkowe/niestandardowe atrybuty, które należy dodać do: %s ExtraFields=Uzupełniające atrybuty ExtraFieldsLines=Atrybuty uzupełniające (linie) -ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) +ExtraFieldsLinesRec=Atrybuty uzupełniające (szablony wierszy faktur) ExtraFieldsSupplierOrdersLines=(Linie uzupełniające atrybuty order) ExtraFieldsSupplierInvoicesLines=Atrybuty uzupełniające (linie na fakturze) -ExtraFieldsThirdParties=Complementary attributes (third party) -ExtraFieldsContacts=Complementary attributes (contacts/address) +ExtraFieldsThirdParties=Atrybuty uzupełniające (firma zewnętrzna) +ExtraFieldsContacts=Atrybuty uzupełniające (kontakty / adres) ExtraFieldsMember=Atrybuty uzupełniające (członek) ExtraFieldsMemberType=Atrybuty uzupełniające (typ członkiem) ExtraFieldsCustomerInvoices=Atrybuty uzupełniające (faktury) -ExtraFieldsCustomerInvoicesRec=Complementary attributes (templates invoices) +ExtraFieldsCustomerInvoicesRec=Atrybuty uzupełniające (szablony faktur) ExtraFieldsSupplierOrders=Zamówienia uzupełniające (atrybuty) ExtraFieldsSupplierInvoices=Atrybuty uzupełniające (faktury) ExtraFieldsProject=Atrybuty uzupełniające (projektów) ExtraFieldsProjectTask=Atrybuty uzupełniające (zadania) -ExtraFieldsSalaries=Complementary attributes (salaries) +ExtraFieldsSalaries=Atrybuty uzupełniające (wynagrodzenia) ExtraFieldHasWrongValue=Atrybut% s ma nieprawidłową wartość. AlphaNumOnlyLowerCharsAndNoSpace=tylko alphanumericals i małe litery bez przestrzeni SendmailOptionNotComplete=Uwaga, w niektórych systemach Linux, aby wysłać e-mail z poczty elektronicznej, konfiguracja wykonanie sendmail musi conatins opcja-ba (mail.force_extra_parameters parametr w pliku php.ini). Jeśli nigdy niektórzy odbiorcy otrzymywać e-maile, spróbuj edytować ten parametr PHP z mail.force_extra_parameters =-ba). PathToDocuments=Ścieżka do dokumentów PathDirectory=Katalog -SendmailOptionMayHurtBuggedMTA=Feature to send mails using method "PHP mail direct" will generate a mail message that might not be parsed correctly by some receiving mail servers. The result is that some mails can't be read by people hosted by those bugged platforms. This is the case for some Internet providers (Ex: Orange in France). This is not a problem with Dolibarr or PHP but with the receiving mail server. You can however add an option MAIN_FIX_FOR_BUGGED_MTA to 1 in Setup - Other to modify Dolibarr to avoid this. However, you may experience problems with other servers that strictly use the SMTP standard. The other solution (recommended) is to use the method "SMTP socket library" which has no disadvantages. +SendmailOptionMayHurtBuggedMTA=Funkcja wysyłania wiadomości e-mail przy użyciu metody „bezpośrednio w PHP” spowoduje wygenerowanie wiadomości e-mail, która może nie zostać poprawnie przeanalizowana przez niektóre odbierające serwery pocztowe. W rezultacie niektóre wiadomości e-mail nie mogą być odczytywane przez osoby hostowane na tych błędnych platformach. Dzieje się tak w przypadku niektórych dostawców Internetu (np. Orange we Francji). Nie jest to problem z Dolibarr czy PHP, ale z odbierającym serwerem pocztowym. Możesz jednak dodać opcję MAIN_FIX_FOR_BUGGED_MTA do 1 w Ustawieniach - Inne, aby zmodyfikować Dolibarr, aby tego uniknąć. Jednak mogą wystąpić problemy z innymi serwerami, które ściśle korzystają ze standardu SMTP. Innym rozwiązaniem (zalecane) jest użycie metody „Biblioteka gniazd SMTP”, która nie ma żadnych wad. TranslationSetup=Ustawienia tłumaczenia TranslationKeySearch=Szukaj klucza lub ciągu tłumaczenia TranslationOverwriteKey=Nadpisz tłumaczony ciąg -TranslationDesc=How to set the display language:<br>* Default/Systemwide: menu <strong>Home -> Setup -> Display</strong><br>* Per user: Click on the username at the top of the screen and modify the <strong>User Display Setup</strong> tab on the user card. -TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the translation key string into "%s" and your new translation into "%s" -TranslationOverwriteDesc2=You can use the other tab to help you know which translation key to use +TranslationDesc=Jak ustawić język wyświetlania: <br> * Domyślnie / Systemwide: menu <strong> Strona Główna -> Ustawienia -> Wyświetlacz </strong> <br> * Na użytkownika: Kliknij nazwę użytkownika u góry ekranu i zmodyfikuj <strong>Ustawienia Wyświetlacza Użytkownika</strong> na karcie użytkownika. +TranslationOverwriteDesc=Możesz także przesłonić ciągi wypełniające poniższą tabelę. Wybierz swój język z listy rozwijanej „%s”, wstaw ciąg klucza tłumaczenia do „%s”, a nowe tłumaczenie do „%s” +TranslationOverwriteDesc2=Możesz skorzystać z drugiej karty, aby dowiedzieć się, którego klucza tłumaczenia użyć TranslationString=Tłumaczony ciąg -CurrentTranslationString=Current translation string -WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least for key or translation string -NewTranslationStringToShow=New translation string to show -OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s -TransKeyWithoutOriginalValue=You forced a new translation for the translation key '<strong>%s</strong>' that does not exist in any language files -TitleNumberOfActivatedModules=Activated modules -TotalNumberOfActivatedModules=Activated modules: <b>%s</b> / <b>%s</b> +CurrentTranslationString=Aktualny ciąg tłumaczenia +WarningAtLeastKeyOrTranslationRequired=Kryteria wyszukiwania są wymagane przynajmniej dla klucza lub ciągu tłumaczenia +NewTranslationStringToShow=Nowy ciąg tłumaczenia do pokazania +OriginalValueWas=Oryginalne tłumaczenie zostanie nadpisane. Pierwotna wartość to: <br> <br> %s +TransKeyWithoutOriginalValue=Wymuszono nowe tłumaczenie klucza tłumaczenia „<strong> %s </strong>”, który nie istnieje w żadnym pliku językowym +TitleNumberOfActivatedModules=Aktywowane moduły +TotalNumberOfActivatedModules=Aktywowane moduły: <b> %s </b> / <b> %s </b> YouMustEnableOneModule=Musisz przynajmniej umożliwić 1 moduł -ClassNotFoundIntoPathWarning=Class %s not found in PHP path +ClassNotFoundIntoPathWarning=Nie znaleziono klasy %s w ścieżce PHP YesInSummer=Tak w lecie -OnlyFollowingModulesAreOpenedToExternalUsers=Note, only the following modules are available to external users (irrespective of the permissions of such users) and only if permissions are granted:<br> +OnlyFollowingModulesAreOpenedToExternalUsers=Uwaga, tylko następujące moduły są dostępne dla użytkowników zewnętrznych (niezależnie od uprawnień takich użytkowników) i tylko w przypadku nadania uprawnień: <br> SuhosinSessionEncrypt=Przechowywania sesji szyfrowane Suhosin ConditionIsCurrently=Stan jest obecnie% s -YouUseBestDriver=You use driver %s which is the best driver currently available. -YouDoNotUseBestDriver=You use driver %s but driver %s is recommended. -NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. +YouUseBestDriver=Używasz sterownika %s, który jest obecnie najlepszym dostępnym sterownikiem. +YouDoNotUseBestDriver=Używasz sterownika %s, ale zalecany jest sterownik %s. +NbOfObjectIsLowerThanNoPb=W bazie danych masz tylko %s %s. Nie wymaga to żadnej szczególnej optymalizacji. SearchOptim=Pozycjonowanie -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can 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. -BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance. -BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari. -PHPModuleLoaded=PHP component %s is loaded -PreloadOPCode=Preloaded OPCode is used -AddRefInList=Display Customer/Vendor ref. info list (select list or combobox) and most of hyperlink.<br>Third Parties will appear with a name format of "CC12345 - SC45678 - The Big Company corp." instead of "The Big Company corp". -AddAdressInList=Display Customer/Vendor adress info list (select list or combobox)<br>Third Parties will appear with a name format of "The Big Company corp. - 21 jump street 123456 Big town - USA" instead of "The Big Company corp". -AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)<br>Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand". -AskForPreferredShippingMethod=Ask for preferred shipping method for Third Parties. +YouHaveXObjectUseSearchOptim=Masz w bazie danych %s %s. Możesz dodać stałą %s do 1 w Strona Główna-Ustawienia-Inne. Ogranicz wyszukiwanie do początku ciągów, dzięki czemu baza danych będzie mogła używać indeksów i powinieneś otrzymać natychmiastową odpowiedź. +YouHaveXObjectAndSearchOptimOn=Masz %s %s w bazie danych, a stała %s jest ustawiona na 1 w Strona Główna-Ustawienia-Inne. +BrowserIsOK=Używasz przeglądarki internetowej %s. Ta przeglądarka jest dobra pod względem bezpieczeństwa i wydajności. +BrowserIsKO=Używasz przeglądarki internetowej %s. Wiadomo, że ta przeglądarka jest złym wyborem pod względem bezpieczeństwa, wydajności i niezawodności. Zalecamy używanie przeglądarki Firefox, Chrome, Opera lub Safari. +PHPModuleLoaded=Ładowany jest komponent PHP %s +PreloadOPCode=Używany jest wstępnie załadowany kod OPCode +AddRefInList=Wyświetl numer klienta/dostawcy lista informacji (lista wyboru lub pole wyboru) i większość hiperłączy. <br> Strony trzecie będą wyświetlane z nazwą w formacie „CC12345 - SC45678 - The Big Company corp”. zamiast „The Big Company corp”. +AddAdressInList=Wyświetl listę informacji o adresach klientów / dostawców (lista wyboru lub pole wyboru) <br> Osoby trzecie będą wyświetlane z nazwą w formacie „The Big Company corp. - 21 jump street 123456 Big town - USA” zamiast „The Big Company corp”. +AddEmailPhoneTownInContactList=Wyświetl kontaktowy adres e-mail (lub telefony, jeśli nie zostały zdefiniowane) i listę informacji o mieście (lista wyboru lub pole wyboru) <br> Kontakty będą wyświetlane z nazwami w formacie „Dupond Durand - dupond.durand@email.com - Paryż” lub „Dupond Durand - 06 07 59 65 66 - Paryż "zamiast" Dupond Durand ". +AskForPreferredShippingMethod=Zapytaj o preferowaną metodę wysyłki dla stron trzecich. FieldEdition=Edycja pola% s FillThisOnlyIfRequired=Przykład: +2 (wypełnić tylko w przypadku strefy czasowej w stosunku problemy są doświadczeni) GetBarCode=Pobierz kod kreskowy -NumberingModules=Numbering models -DocumentModules=Document models +NumberingModules=Numeracja modeli +DocumentModules=Modele dokumentów ##### Module password generation -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. +PasswordGenerationStandard=Zwróć hasło wygenerowane zgodnie z wewnętrznym algorytmem Dolibarr: %s znaków zawierających wspólne liczby i małe litery. +PasswordGenerationNone=Nie sugeruj wygenerowanego hasła. Hasło należy wpisać ręcznie. PasswordGenerationPerso=Powrót hasło zależności osobiście określonej konfiguracji. SetupPerso=Zgodnie z twoją konfiguracją PasswordPatternDesc=Opis wzoru hasła ##### Users setup ##### -RuleForGeneratedPasswords=Rules to generate and validate passwords -DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page +RuleForGeneratedPasswords=Reguły generowania i sprawdzania haseł +DisableForgetPasswordLinkOnLogonPage=Nie pokazuj linka „Zapomniałem hasła” na stronie logowania UsersSetup=Użytkownicy modułu konfiguracji -UserMailRequired=Email required to create a new user -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 +UserMailRequired=Adres e-mail wymagany do utworzenia nowego użytkownika +UserHideInactive=Ukryj nieaktywnych użytkowników na wszystkich listach użytkowników (niezalecane: może to oznaczać, że nie będziesz w stanie filtrować ani wyszukiwać starych użytkowników na niektórych stronach) +UsersDocModules=Szablony dokumentów dla dokumentów generowanych na podstawie rekordu użytkownika +GroupsDocModules=Szablony dokumentów dla dokumentów generowanych z rekordu grupowego ##### HRM setup ##### HRMSetup=Ustawianie modułu HR ##### Company setup ##### CompanySetup=Firmy konfiguracji modułu -CompanyCodeChecker=Options for automatic generation of customer/vendor codes -AccountCodeManager=Options for automatic generation of customer/vendor accounting codes -NotificationsDesc=Email notifications can be sent automatically for some Dolibarr events.<br>Recipients of notifications can be defined: -NotificationsDescUser=* per user, one user at a time. -NotificationsDescContact=* per third-party contacts (customers or vendors), one contact at a time. -NotificationsDescGlobal=* or by setting global email addresses in this setup page. -ModelModules=Document Templates -DocumentModelOdt=Generate documents from OpenDocument templates (.ODT / .ODS files from LibreOffice, OpenOffice, KOffice, TextEdit,...) +CompanyCodeChecker=Opcje automatycznego generowania kodów klientów / dostawców +AccountCodeManager=Opcje automatycznego generowania kodów księgowych klientów / dostawców +NotificationsDesc=Powiadomienia e-mail mogą być wysyłane automatycznie w przypadku niektórych wydarzeń Dolibarr. <br> Odbiorców powiadomień można zdefiniować: +NotificationsDescUser=* na użytkownika, jeden użytkownik na raz. +NotificationsDescContact=* za osobę kontaktową (klienci lub dostawcy), jeden kontakt naraz. +NotificationsDescGlobal=* lub ustawiając globalne adresy e-mail na tej stronie konfiguracji. +ModelModules=Szablony dokumentów +DocumentModelOdt=Generuj dokumenty z szablonów OpenDocument (pliki .ODT / .ODS z LibreOffice, OpenOffice, KOffice, TextEdit, ...) WatermarkOnDraft=Znak wodny w sprawie projektu dokumentu JSOnPaimentBill=Aktywuj funkcję automatyczne wypełnianie linii płatności w formie płatności -CompanyIdProfChecker=Rules for Professional IDs +CompanyIdProfChecker=Zasady dotyczące legitymacji zawodowych MustBeUnique=Musi być unikatowy? -MustBeMandatory=Mandatory to create third parties (if VAT number or type of company defined) ? -MustBeInvoiceMandatory=Mandatory to validate invoices? -TechnicalServicesProvided=Technical services provided +MustBeMandatory=Obowiązkowe do tworzenia kontrahentów (jeśli zdefiniowano numer VAT lub rodzaj firmy)? +MustBeInvoiceMandatory=Obowiązkowe do sprawdzania faktur? +TechnicalServicesProvided=Świadczone usługi techniczne #####DAV ##### -WebDAVSetupDesc=This is the link to access the WebDAV directory. It contains a "public" dir open to any user knowing the URL (if public directory access allowed) and a "private" directory that needs an existing login account/password for access. -WebDavServer=Root URL of %s server: %s +WebDAVSetupDesc=To jest łącze umożliwiające dostęp do katalogu WebDAV. Zawiera katalog „publiczny” otwarty dla każdego użytkownika znającego adres URL (jeśli dostęp do katalogu publicznego jest dozwolony) oraz katalog „prywatny”, do którego dostęp wymaga istniejącego konta logowania / hasła. +WebDavServer=Główny adres URL serwera %s: %s ##### Webcal setup ##### WebCalUrlForVCalExport=Wywóz <b>link %s</b> format jest dostępny na poniższy link: %s ##### Invoices ##### BillsSetup=Konfiguracja modułu faktur BillsNumberingModule=Faktur i not kredytowych numeracji modułu BillsPDFModules=Faktura dokumentów modele -BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type -PaymentsPDFModules=Payment documents models +BillsPDFModulesAccordindToInvoiceType=Modele dokumentów fakturowych według rodzaju faktury +PaymentsPDFModules=Modele dokumentów płatniczych ForceInvoiceDate=Siły daty wystawienia faktury do walidacji daty -SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice -SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account -SuggestPaymentByChequeToAddress=Suggest payment by check to +SuggestedPaymentModesIfNotDefinedInInvoice=Sugerowany tryb płatności na fakturze domyślnie, jeśli nie został zdefiniowany na fakturze +SuggestPaymentByRIBOnAccount=Zaproponuj płatność poprzez wypłatę na konto +SuggestPaymentByChequeToAddress=Zaproponuj płatność czekiem na FreeLegalTextOnInvoices=Wolny tekst na fakturach WatermarkOnDraftInvoices=Znak wodny na projekt faktury (brak jeśli pusty) PaymentsNumberingModule=Model numeracji płatności -SuppliersPayment=Vendor payments -SupplierPaymentSetup=Vendor payments setup +SuppliersPayment=Płatności dostawcy +SupplierPaymentSetup=Konfiguracja płatności dostawcy ##### Proposals ##### PropalSetup=Konfiguracja modułu ofert handlowych ProposalsNumberingModules=Commercial wniosku numeracji modules ProposalsPDFModules=Commercial wniosku dokumenty modeli -SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined on the proposal +SuggestedPaymentModesIfNotDefinedInProposal=Sugerowany tryb płatności w propozycji domyślnie, jeśli nie został zdefiniowany w propozycji FreeLegalTextOnProposal=Darmowy tekstu propozycji WatermarkOnDraftProposal=Znak wodny projektów wniosków komercyjnych (brak jeśli pusty) BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Zapytaj o rachunku bankowego przeznaczenia propozycji @@ -1393,10 +1403,10 @@ WatermarkOnDraftSupplierProposal=Znak wodny w sprawie projektu cenie żąda dost BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Zapytaj o rachunku bankowego przeznaczenia proponowaniu ceny WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Zapytaj o magazyn źródłowy dla zamówienia ##### Suppliers Orders ##### -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Zapytaj o konto bankowe dla zamówienia ##### Orders ##### -SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order -OrdersSetup=Sales Orders management setup +SuggestedPaymentModesIfNotDefinedInOrder=Sugerowany tryb płatności w zleceniu sprzedaży domyślnie, jeśli nie jest zdefiniowany w zamówieniu +OrdersSetup=Konfiguracja zarządzania zleceniami sprzedaży OrdersNumberingModules=Zamówienia numeracji modules OrdersModelModule=Zamów dokumenty modeli FreeLegalTextOnOrders=Wolny tekst na zamówienie @@ -1419,11 +1429,11 @@ WatermarkOnDraftContractCards=Znak wodny w szkicach projektów (brak jeśli pust MembersSetup=Członkowie konfiguracji modułu MemberMainOptions=Główne opcje AdherentLoginRequired= Zarządzanie logowania dla każdego członka -AdherentMailRequired=Email required to create a new member +AdherentMailRequired=Adres e-mail wymagany do utworzenia nowego członka MemberSendInformationByMailByDefault=Checkbox wysłać mail z potwierdzeniem do członków jest domyślnie -VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes -MEMBER_REMINDER_EMAIL=Enable automatic reminder <b>by email</b> of expired subscriptions. Note: Module <strong>%s</strong> must be enabled and correctly setup to send reminders. -MembersDocModules=Document templates for documents generated from member record +VisitorCanChooseItsPaymentMode=Odwiedzający może wybierać spośród dostępnych sposobów płatności +MEMBER_REMINDER_EMAIL=Włącz automatyczne przypominanie <b> przez e-mail </b> o wygasłych subskrypcjach. Uwaga: Moduł <strong> %s </strong> musi być włączony i poprawnie skonfigurowany, aby wysyłać przypomnienia. +MembersDocModules=Szablony dokumentów dla dokumentów wygenerowanych na podstawie rekordu członka ##### LDAP setup ##### LDAPSetup=Konfiguracja LDAP LDAPGlobalParameters=Parametry globalne @@ -1441,17 +1451,17 @@ LDAPSynchronizeUsers=Organizacja użytkowników w LDAP LDAPSynchronizeGroups=Organizacja grup w LDAP LDAPSynchronizeContacts=Organizacja kontaktów w LDAP LDAPSynchronizeMembers=Organizacja członków fundacji w LDAP -LDAPSynchronizeMembersTypes=Organization of foundation's members types in LDAP +LDAPSynchronizeMembersTypes=Organizacja typów członków fundacji w LDAP LDAPPrimaryServer=Podstawowy serwer LDAPSecondaryServer=Dodatkowy serwer LDAPServerPort=Portu serwera -LDAPServerPortExample=Default port: 389 +LDAPServerPortExample=Port domyślny: 389 LDAPServerProtocolVersion=Protokół wersji LDAPServerUseTLS=Użyj TLS LDAPServerUseTLSExample=Twoja użyć serwera LDAP TLS LDAPServerDn=Serwer DN LDAPAdminDn=Administrator DN -LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com for active directory) +LDAPAdminDnExample=Kompletna nazwa wyróżniająca (np .: cn = admin, dc = example, dc = com lub cn = Administrator, cn = Users, dc = example, dc = com dla active directory) LDAPPassword=Hasło administratora LDAPUserDn=Użytkowników DN LDAPUserDnExample=Complete DN (ex: ou=users,dc=society,dc=Kompletny DN (dawniej: ou= users, dc= społeczeństwa, dc= com) @@ -1465,7 +1475,7 @@ LDAPDnContactActive=Kontakty 'synchronizacji LDAPDnContactActiveExample=Aktywuj/Dezaktywuj synchronizację LDAPDnMemberActive=Posłów synchronizacji LDAPDnMemberActiveExample=Aktywuj/Dezaktywuj synchronizację -LDAPDnMemberTypeActive=Members types' synchronization +LDAPDnMemberTypeActive=Synchronizacja typów członków LDAPDnMemberTypeActiveExample=Aktywuj/Dezaktywuj synchronizację LDAPContactDn=Dolibarr kontaktów "DN LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=society,dc=Kompletny DN (dawniej: ou= Kontakty, DC= społeczeństwa, dc= com) @@ -1473,8 +1483,8 @@ LDAPMemberDn=Dolibarr członków DN LDAPMemberDnExample=Complete DN (ex: ou=members,dc=society,dc=Kompletny DN (dawniej: ou= użytkowników, dc= społeczeństwa, dc= com) LDAPMemberObjectClassList=Lista objectClass LDAPMemberObjectClassListExample=Lista objectClass definiowania rekordu atrybutów (np. top, InetOrgPerson górę lub użytkowników do usługi Active Directory) -LDAPMemberTypeDn=Dolibarr members types DN -LDAPMemberTypepDnExample=Complete DN (ex: ou=memberstypes,dc=example,dc=com) +LDAPMemberTypeDn=Członkowie Dolibarr typu DN +LDAPMemberTypepDnExample=Kompletna nazwa wyróżniająca (np. Ou = typ_członków, dc = przykład, dc = com) LDAPMemberTypeObjectClassList=Lista objectClass LDAPMemberTypeObjectClassListExample=Lista objectClass definiowania rekordu atrybutów (np. top, groupOfUniqueNames) LDAPUserObjectClassList=Lista objectClass @@ -1488,125 +1498,126 @@ LDAPTestSynchroContact=Test kontaktu synchronizacji LDAPTestSynchroUser=Test użytkownika synchronizacji LDAPTestSynchroGroup=Test grupy synchronizacji LDAPTestSynchroMember=Test członka synchronizacji -LDAPTestSynchroMemberType=Test member type synchronization +LDAPTestSynchroMemberType=Testuj synchronizację typu elementu członkowskiego LDAPTestSearch= Testowanie wyszukiwania LDAP LDAPSynchroOK=Synchronizacja udany test LDAPSynchroKO=Niepowodzenie testu synchronizacji -LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that the connection to the server is correctly configured and allows LDAP updates +LDAPSynchroKOMayBePermissions=Nieudany test synchronizacji. Sprawdź, czy połączenie z serwerem jest poprawnie skonfigurowane i zezwala na aktualizacje LDAP LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP podłączyć do serwera LDAP powiodło się (Server= %s, port= %s) LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP podłączyć do serwera LDAP nie powiodło się (Server= %s, port= %s) -LDAPBindOK=Connect/Authenticate to LDAP server successful (Server=%s, Port=%s, Admin=%s, Password=%s) -LDAPBindKO=Connect/Authenticate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s) +LDAPBindOK=Pomyślne połączenie / uwierzytelnienie z serwerem LDAP (serwer = %s, port = %s, administrator = %s, hasło = %s) +LDAPBindKO=Połączenie / uwierzytelnienie z serwerem LDAP nie powiodło się (serwer = %s, port = %s, administrator = %s, hasło = %s) LDAPSetupForVersion3=Serwer LDAP skonfigurowany dla wersji 3 LDAPSetupForVersion2=Serwer LDAP skonfigurowany dla wersji 2 LDAPDolibarrMapping=Dolibarr Mapping LDAPLdapMapping=LDAP Mapping LDAPFieldLoginUnix=Login (UNIX) -LDAPFieldLoginExample=Example: uid +LDAPFieldLoginExample=Przykład: uid LDAPFilterConnection=Wyszukaj filtr -LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPFilterConnectionExample=Przykład: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Przykład: & (objectClass = groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) -LDAPFieldLoginSambaExample=Example: samaccountname +LDAPFieldLoginSambaExample=Przykład: samaccountname LDAPFieldFullname=Imię i nazwisko -LDAPFieldFullnameExample=Example: cn -LDAPFieldPasswordNotCrypted=Password not encrypted -LDAPFieldPasswordCrypted=Password encrypted -LDAPFieldPasswordExample=Example: userPassword -LDAPFieldCommonNameExample=Example: cn +LDAPFieldFullnameExample=Przykład: cn +LDAPFieldPasswordNotCrypted=Hasło nie jest zaszyfrowane +LDAPFieldPasswordCrypted=Hasło zaszyfrowane +LDAPFieldPasswordExample=Przykład: hasło użytkownika +LDAPFieldCommonNameExample=Przykład: cn LDAPFieldName=Nazwa -LDAPFieldNameExample=Example: sn +LDAPFieldNameExample=Przykład: sn LDAPFieldFirstName=Imię -LDAPFieldFirstNameExample=Example: givenName +LDAPFieldFirstNameExample=Przykład: givenName LDAPFieldMail=Adres e-mail -LDAPFieldMailExample=Example: mail +LDAPFieldMailExample=Przykład: poczta LDAPFieldPhone=Profesjonalne numer telefonu -LDAPFieldPhoneExample=Example: telephonenumber +LDAPFieldPhoneExample=Przykład: numer telefonu LDAPFieldHomePhone=Osobiste numer telefonu -LDAPFieldHomePhoneExample=Example: homephone +LDAPFieldHomePhoneExample=Przykład: telefon domowy LDAPFieldMobile=Telefon komórkowy -LDAPFieldMobileExample=Example: mobile +LDAPFieldMobileExample=Przykład: mobile LDAPFieldFax=Numer faksu -LDAPFieldFaxExample=Example: facsimiletelephonenumber +LDAPFieldFaxExample=Przykład: numer telefaksu LDAPFieldAddress=Ulica -LDAPFieldAddressExample=Example: street +LDAPFieldAddressExample=Przykład: ulica LDAPFieldZip=Kod pocztowy -LDAPFieldZipExample=Example: postalcode +LDAPFieldZipExample=Przykład: kod pocztowy LDAPFieldTown=Miasto -LDAPFieldTownExample=Example: l +LDAPFieldTownExample=Przykład: l LDAPFieldCountry=Kraj LDAPFieldDescription=Opis -LDAPFieldDescriptionExample=Example: description +LDAPFieldDescriptionExample=Przykład: opis LDAPFieldNotePublic=Notatka publiczna -LDAPFieldNotePublicExample=Example: publicnote +LDAPFieldNotePublicExample=Przykład: notatka publiczna LDAPFieldGroupMembers= Członkowie grupy -LDAPFieldGroupMembersExample= Example: uniqueMember +LDAPFieldGroupMembersExample= Przykład: uniqueMember LDAPFieldBirthdate=Data urodzenia LDAPFieldCompany=Firma -LDAPFieldCompanyExample=Example: o +LDAPFieldCompanyExample=Przykład: o LDAPFieldSid=SID -LDAPFieldSidExample=Example: objectsid +LDAPFieldSidExample=Przykład: objectid LDAPFieldEndLastSubscription=Data zakończenia subskrypcji LDAPFieldTitle=Posada LDAPFieldTitleExample=Przykład: tytuł -LDAPFieldGroupid=Group id -LDAPFieldGroupidExample=Exemple : gidnumber -LDAPFieldUserid=User id -LDAPFieldUseridExample=Exemple : uidnumber -LDAPFieldHomedirectory=Home directory -LDAPFieldHomedirectoryExample=Exemple : homedirectory -LDAPFieldHomedirectoryprefix=Home directory prefix +LDAPFieldGroupid=Identyfikator grupy +LDAPFieldGroupidExample=Przykład: numer gid +LDAPFieldUserid=Identyfikator użytkownika +LDAPFieldUseridExample=Przykład: uidnumber +LDAPFieldHomedirectory=Katalog główny +LDAPFieldHomedirectoryExample=Przykład: katalog główny +LDAPFieldHomedirectoryprefix=Prefiks katalogu głównego LDAPSetupNotComplete=LDAP konfiguracji nie są kompletne (przejdź na innych kartach) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Brak administratora lub hasła. Dostęp do LDAP będzie jedynie anonimowy i tylko w trybie do odczytu. LDAPDescContact=Ta strona pozwala na zdefiniowanie atrybutów LDAP nazwę LDAP drzewa dla każdego danych na Dolibarr kontakty. LDAPDescUsers=Ta strona pozwala na zdefiniowanie atrybutów LDAP nazwę LDAP drzewa dla każdego danych na Dolibarr użytkowników. LDAPDescGroups=Ta strona pozwala na zdefiniowanie atrybutów LDAP nazwę LDAP drzewa dla każdego danych na Dolibarr grupy. LDAPDescMembers=Ta strona pozwala na zdefiniowanie atrybutów LDAP nazwę LDAP drzewa dla każdego danych na Dolibarr użytkowników modułu. -LDAPDescMembersTypes=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members types. +LDAPDescMembersTypes=Ta strona umożliwia zdefiniowanie nazwy atrybutów LDAP w drzewie LDAP dla wszystkich danych znalezionych w typach członków Dolibarr. LDAPDescValues=Przykład wartości są dla <b>OpenLDAP</b> ładowane z następujących schematów: <b>core.schema, cosine.schema, inetorgperson.schema).</b> Jeśli używasz thoose wartości i OpenLDAP, zmodyfikować plik konfiguracyjny LDAP <b>slapd.conf</b> do wszystkich thoose schemas załadowany. ForANonAnonymousAccess=Dla uwierzytelniane dostęp (do zapisu na przykład) -PerfDolibarr=Konfiguracja Wyniki / optymalizacja raport -YouMayFindPerfAdviceHere=This page provides some checks or advice related to performance. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +PerfDolibarr=Raport konfiguracji/optymalizacji wydajności +YouMayFindPerfAdviceHere=Ta strona zawiera kontrole lub porady związane z wydajnością. +NotInstalled=Nie zainstalowany. +NotSlowedDownByThis=Nie jest przez to spowolniony. +NotRiskOfLeakWithThis=Nie ma z tym ryzyka wycieku. ApplicativeCache=Aplikacyjnych cache MemcachedNotAvailable=Nie znaleziono cache aplikacyjnych. Możesz zwiększyć wydajność poprzez zainstalowanie serwera cache i Memcached moduł w stanie korzystać z tego serwera cache. <br> Więcej informacji tutaj <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a> . <br> Należy pamiętać, że wiele hosting provider nie zapewnia takiego serwera cache. MemcachedModuleAvailableButNotSetup=Moduł memcached dla aplikacyjnej cache znaleźć, ale konfiguracja modułu nie jest kompletna. MemcachedAvailableAndSetup=Moduł memcached dedykowane obsłudze serwer memcached jest włączony. OPCodeCache=OPCODE cache -NoOPCodeCacheFound=No OPCode cache found. Maybe you are using an OPCode cache other than XCache or eAccelerator (good), or maybe you don't have OPCode cache (very bad). +NoOPCodeCacheFound=Nie znaleziono pamięci podręcznej OPCode. Może używasz pamięci podręcznej OPCode innej niż XCache lub eAccelerator (dobrze), a może nie masz pamięci podręcznej OPCode (bardzo źle). HTTPCacheStaticResources=Cache HTTP do zasobów statycznych (css, img, JavaScript) FilesOfTypeCached=Pliki typu %s są buforowane przez serwer HTTP FilesOfTypeNotCached=Pliki typu %s nie są buforowane przez serwer HTTP FilesOfTypeCompressed=Pliki typu %s są kompresowane przez serwer HTTP FilesOfTypeNotCompressed=Pliki typu %s nie są kompresowane przez serwer HTTP CacheByServer=Cache przez serwer -CacheByServerDesc=For example using the Apache directive "ExpiresByType image/gif A2592000" +CacheByServerDesc=Na przykład przy użyciu dyrektywy Apache „ExpiresByType image / gif A2592000” CacheByClient=Cache przez przeglądarkę CompressionOfResources=Kompresja odpowiedzi HTTP -CompressionOfResourcesDesc=For example using the Apache directive "AddOutputFilterByType DEFLATE" +CompressionOfResourcesDesc=Na przykład przy użyciu dyrektywy Apache „AddOutputFilterByType DEFLATE” TestNotPossibleWithCurrentBrowsers=Taka automatyczna detekcja nie jest możliwe przy obecnych przeglądarek -DefaultValuesDesc=Here you may define the default value you wish to use when creating a new record, and/or default filters or the sort order when you list records. -DefaultCreateForm=Default values (to use on forms) -DefaultSearchFilters=Default search filters +DefaultValuesDesc=Tutaj możesz zdefiniować domyślną wartość, której chcesz użyć podczas tworzenia nowego rekordu i/lub domyślne filtry lub kolejność sortowania podczas tworzenia listy rekordów. +DefaultCreateForm=Wartości domyślne (do użycia w formularzach) +DefaultSearchFilters=Domyślne filtry wyszukiwania DefaultSortOrder=Domyślna kolejność sortowania -DefaultFocus=Default focus fields -DefaultMandatory=Mandatory form fields +DefaultFocus=Domyślne pola fokusu +DefaultMandatory=Obowiązkowe pola formularza ##### Products ##### ProductSetup=Produkty konfiguracji modułu ServiceSetup=Konfiguracja modułu Usługi ProductServiceSetup=Produkty i usługi moduły konfiguracyjne -NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit) -ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup) -DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms -OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document -AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product -DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically. -DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents -MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal -ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) -UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient) +NumberOfProductShowInSelect=Maksymalna liczba produktów do pokazania na listach wyboru kombi (0 = brak limitu) +ViewProductDescInFormAbility=Wyświetlaj opisy produktów w formularzach (w przeciwnym razie wyświetlane w wyskakującym okienku z etykietką) +DoNotAddProductDescAtAddLines=Nie dodawaj opisu produktu (z karty produktu) przy przesyłaniu dodatkowych wierszy na formularzach +OnProductSelectAddProductDesc=Jak korzystać z opisu produktów podczas dodawania produktu jako linii dokumentu +AutoFillFormFieldBeforeSubmit=Automatycznie wypełnij pole wejściowe opisu opisem produktu +DoNotAutofillButAutoConcat=Nie wypełniaj automatycznie pola wejściowego opisem produktu. Opis produktu zostanie automatycznie dołączony do wprowadzonego opisu. +DoNotUseDescriptionOfProdut=Opis produktu nigdy nie zostanie umieszczony w opisie linii dokumentów +MergePropalProductCard=Aktywuj w zakładce produkt/usługa Załączone Pliki opcję łączenia dokumentu PDF produktu z propozycją PDF azur, jeśli produkt/usługa jest w ofercie +ViewProductDescInThirdpartyLanguageAbility=Wyświetlaj opisy produktów w formularzach w języku strony trzeciej (w innym przypadku w języku użytkownika) +UseSearchToSelectProductTooltip=Jeśli masz dużą liczbę produktów (> 100 000), możesz zwiększyć prędkość, ustawiając stałą PRODUCT_DONOTSEARCH_ANYWHERE na 1 w Ustawienia-> Inne. Wyszukiwanie będzie wtedy ograniczone do początku łańcucha. +UseSearchToSelectProduct=Poczekaj, aż naciśniesz klawisz przed załadowaniem zawartości listy produktów (może to zwiększyć wydajność, jeśli masz dużą liczbę produktów, ale jest to mniej wygodne) SetDefaultBarcodeTypeProducts=Domyślny kod kreskowy typu użyć do produktów SetDefaultBarcodeTypeThirdParties=Domyślny typ kodu kreskowego używanego dla kontahentów UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition @@ -1621,10 +1632,10 @@ SyslogLevel=Poziom SyslogFilename=Nazwa pliku i ścieżka YouCanUseDOL_DATA_ROOT=Możesz użyć DOL_DATA_ROOT / dolibarr.log do pliku w Dolibarr "dokumenty" katalogu. Można ustawić inną ścieżkę do przechowywania tego pliku. ErrorUnknownSyslogConstant=Stała %s nie jest znany syslog stałej -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=Number of backup logs to keep -ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency +OnlyWindowsLOG_USER=W systemie Windows obsługiwana będzie tylko funkcja LOG_USER +CompressSyslogs=Kompresja i tworzenie kopii zapasowych plików dziennika debugowania (generowane przez dziennik modułu do debugowania) +SyslogFileNumberOfSaves=Liczba dzienników kopii zapasowych do zachowania +ConfigureCleaningCronjobToSetFrequencyOfSaves=Skonfiguruj zaplanowane zadanie czyszczenia, aby ustawić częstotliwość tworzenia kopii zapasowych dziennika ##### Donations ##### DonationsSetup=Darowizna konfiguracji modułu DonationsReceiptModel=Szablon otrzymania wpłaty @@ -1647,7 +1658,7 @@ GenbarcodeLocation=Bar generowanie kodu narzędzie wiersza polecenia (używany p BarcodeInternalEngine=Silnik wewnętrznego BarCodeNumberManager=Manager auto zdefiniować numery kodów kreskowych ##### Prelevements ##### -WithdrawalsSetup=Setup of module Direct Debit payments +WithdrawalsSetup=Konfiguracja modułu płatności Poleceniem Zapłaty ##### ExternalRSS ##### ExternalRSSSetup=Zewnętrzne RSS przywóz konfiguracji NewRSS=Nowy kanał RSS @@ -1655,19 +1666,19 @@ RSSUrl=RSS URL RSSUrlExample=Ciekawe RSS ##### Mailing ##### MailingSetup=Moduł konfiguracji e-maila -MailingEMailFrom=Sender email (From) for emails sent by emailing module -MailingEMailError=Return Email (Errors-to) for emails with errors +MailingEMailFrom=E-mail nadawcy (Od) dla wiadomości e-mail wysłanych przez moduł e-mailingu +MailingEMailError=E-mail zwrotny (Errors-to) w przypadku wiadomości e-mail z błędami MailingDelay=Sekund po wysłaniu czekać następnej wiadomości ##### Notification ##### -NotificationSetup=Email Notification module setup -NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module +NotificationSetup=Konfiguracja modułu powiadomień e-mail +NotificationEMailFrom=E-mail nadawcy (Od) dla wiadomości e-mail wysłanych przez moduł Powiadomienia FixedEmailTarget=Odbiorca ##### Sendings ##### -SendingsSetup=Shipping module setup +SendingsSetup=Konfiguracja modułu wysyłkowego SendingsReceiptModel=Wysyłanie otrzymania modelu SendingsNumberingModules=Sendings numerowania modułów SendingsAbility=Obsługuj arkusze wysyłkowe dla dostaw do klientów -NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that are received and signed by customer. Hence the product deliveries receipt is a duplicated feature and is rarely activated. +NoNeedForDeliveryReceipts=W większości przypadków arkusze wysyłkowe są używane zarówno jako arkusze dostaw do klientów (lista produktów do wysłania), jak i arkusze, które są odbierane i podpisywane przez klienta. W związku z tym pokwitowanie dostaw produktów jest funkcją zduplikowaną i rzadko jest aktywowane. FreeLegalTextOnShippings=Dowolny tekst sprawie przemieszczania ##### Deliveries ##### DeliveryOrderNumberingModules=Produkty dostaw otrzymania numeracji modułu @@ -1679,24 +1690,24 @@ AdvancedEditor=Zaawansowany edytor ActivateFCKeditor=Uaktywnij FCKeditor za: FCKeditorForCompany=WYSIWIG tworzenie / edycja spółek opis i notatki FCKeditorForProduct=WYSIWIG tworzenie / edycja produktów / usług "opis i notatki -FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <span class="warning">Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.</span> -FCKeditorForMailing= WYSIWIG tworzenie / edycja wiadomości +FCKeditorForProductDetails=WYSIWIG tworzenie/edycja linii szczegółów produktów dla wszystkich podmiotów (oferty, zamówienia, faktury itp.). <span class="warning"> Ostrzeżenie: Używanie tej opcji w tym przypadku zdecydowanie nie jest zalecane, ponieważ może powodować problemy ze znakami specjalnymi i formatowaniem stron podczas tworzenia plików PDF. </span> +FCKeditorForMailing= Tworzenie/edycja WYSIWYG do masowego e-mailingu (Narzędzia-> eMailing) FCKeditorForUserSignature=WYSIWIG tworzenie / edycja podpisu użytkownika -FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) -FCKeditorForTicket=WYSIWIG creation/edition for tickets +FCKeditorForMail=Tworzenie/edycja WYSIWYG dla całej poczty (z wyjątkiem Narzędzia->eMailing) +FCKeditorForTicket=Tworzenie / edycja WYSIWIG biletów ##### Stock ##### -StockSetup=Stock module setup -IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. +StockSetup=Konfiguracja modułu magazynowego +IfYouUsePointOfSaleCheckModule=Jeśli korzystasz z modułu punktu sprzedaży (POS) dostarczanego domyślnie lub modułu zewnętrznego, ta konfiguracja może zostać zignorowana przez moduł POS. Większość modułów POS jest domyślnie zaprojektowana do natychmiastowego tworzenia faktury i zmniejszania zapasów niezależnie od dostępnych tutaj opcji. Jeśli więc chcesz lub nie chcesz mieć spadku zapasów podczas rejestrowania sprzedaży w punkcie sprzedaży, sprawdź również konfigurację modułu POS. ##### Menu ##### MenuDeleted=Menu skreślony Menu=Menu Menus=Menu TreeMenuPersonalized=Spersonalizowane menu -NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry +NotTopTreeMenuPersonalized=Spersonalizowane menu niepowiązane z pozycją w górnym menu NewMenu=Nowe menu MenuHandler=Menu obsługi MenuModule=Źródło modułu -HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) +HideUnauthorizedMenu=Ukryj nieautoryzowane menu również dla użytkowników wewnętrznych (w przeciwnym razie tylko wyszarzone) DetailId=Id menu DetailMenuHandler=Menu obsługi gdzie pokazać nowe menu DetailMenuModule=Moduł nazwę w menu, jeśli pochodzą z modułem @@ -1708,7 +1719,7 @@ DetailRight=Warunek, aby wyświetlić menu nieautoryzowanych szary DetailLangs=Lang nazwy etykiety kodów DetailUser=Intern / Pomocy Wszystkie Target=Cel -DetailTarget=Target for links (_blank top opens a new window) +DetailTarget=Miejsce docelowe dla linków (_blank top otwiera nowe okno) DetailLevel=Poziom (-1: top menu 0: nagłówek menu&gt; 0 menu i podmenu) ModifMenu=Menu zmiany DeleteMenu=Usuń element menu @@ -1717,13 +1728,13 @@ FailedToInitializeMenu=Nie można zainicjowac menu ##### Tax ##### TaxSetup=Podatki, podatki socjalne lub podatkowe i dywidendy konfiguracji moduł OptionVatMode=Opcja d'exigibilit de TVA -OptionVATDefault=Standard basis +OptionVATDefault=Podstawa standardowa OptionVATDebitOption=Memoriału -OptionVatDefaultDesc=VAT is due:<br>- on delivery of goods (based on invoice date)<br>- on payments for services -OptionVatDebitOptionDesc=VAT is due:<br>- on delivery of goods (based on invoice date)<br>- on invoice (debit) for services -OptionPaymentForProductAndServices=Cash basis for products and services -OptionPaymentForProductAndServicesDesc=VAT is due:<br>- on payment for goods<br>- on payments for services -SummaryOfVatExigibilityUsedByDefault=Time of VAT eligibility by default according to chosen option: +OptionVatDefaultDesc=VAT jest należny: <br> - przy dostawie towaru (na podstawie daty faktury) <br> - przy płatności za usługi +OptionVatDebitOptionDesc=VAT jest należny: <br> - przy dostawie towaru (na podstawie daty faktury) <br> - na fakturze (obciążeniu) za usługi +OptionPaymentForProductAndServices=Podstawa gotówkowa na produkty i usługi +OptionPaymentForProductAndServicesDesc=VAT jest należny: <br> - przy płatności za towary <br> - przy płatności za usługi +SummaryOfVatExigibilityUsedByDefault=Domyślny czas kwalifikowalności VAT według wybranej opcji: OnDelivery=Na dostawy OnPayment=W sprawie wypłaty OnInvoice=Na fakturze @@ -1732,45 +1743,47 @@ SupposedToBeInvoiceDate=Data użyta na fakturze Buy=Kupić Sell=Sprzedać InvoiceDateUsed=Data użyta na fakturze -YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Setup - Company/Organization), so there is no VAT options to setup. +YourCompanyDoesNotUseVAT=Twoja firma została zdefiniowana tak, aby nie używać podatku VAT (Strona Główna - Ustawienia - Firma/Organizacja), więc nie ma opcji dotyczących podatku VAT do skonfigurowania. AccountancyCode=Kod księgowy AccountancyCodeSell=Rachunek sprzedaży. kod AccountancyCodeBuy=Kup konto. kod +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Podczas tworzenia nowego podatku pozostaw domyślnie puste pole wyboru „Automatycznie utwórz płatność” ##### Agenda ##### AgendaSetup=Działania i porządku konfiguracji modułu PasswordTogetVCalExport=Klucz do wywozu zezwolić na link +SecurityKey = Security Key PastDelayVCalExport=Nie starsze niż eksport przypadku -AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) -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 view do you want to open by default when selecting menu Agenda -AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). -AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification -AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event). -AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment. -AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view +AGENDA_USE_EVENT_TYPE=Użyj typów wydarzeń (zarządzanych w menu Ustawienia -> Słowniki -> Typ wydarzeń w programie) +AGENDA_USE_EVENT_TYPE_DEFAULT=Automatycznie ustaw tę domyślną wartość dla typu zdarzenia w formularzu tworzenia wydarzenia +AGENDA_DEFAULT_FILTER_TYPE=Automatycznie ustaw ten typ wydarzenia w filtrze wyszukiwania widoku planu +AGENDA_DEFAULT_FILTER_STATUS=Automatycznie ustawiaj ten stan dla wydarzeń w filtrze wyszukiwania w widoku planu zajęć +AGENDA_DEFAULT_VIEW=Który widok chcesz otworzyć domyślnie po wybraniu menu Plan +AGENDA_REMINDER_BROWSER=Włącz przypomnienie o zdarzeniu <b> w przeglądarce użytkownika </b> (Kiedy nadejdzie data przypomnienia, przeglądarka wyświetli wyskakujące okienko. Każdy użytkownik może wyłączyć takie powiadomienia w ustawieniach powiadomień przeglądarki). +AGENDA_REMINDER_BROWSER_SOUND=Włącz powiadomienia dźwiękowe +AGENDA_REMINDER_EMAIL=Włącz przypomnienie o wydarzeniu <b> przez e-mail </b> (opcję przypomnienia / opóźnienie można zdefiniować dla każdego zdarzenia). +AGENDA_REMINDER_EMAIL_NOTE=Uwaga: częstotliwość zadania %s musi być wystarczająca, aby mieć pewność, że przypomnienie zostanie wysłane w odpowiednim momencie. +AGENDA_SHOW_LINKED_OBJECT=Pokaż połączony obiekt w widoku planu zajęć ##### 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<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> that will be replaced with clicktodial password (defined on user card). -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. +ClickToDialUrlDesc=Adres URL wywoływany po wykonaniu kliknięcia na picto telefonu. W adresie URL, można użyć znaczników <br> <b> __PHONETO__ </b> który zostanie zastąpiony numerem telefonu osoby zadzwonić <br> <b> __PHONEFROM__ </b> który zostanie zastąpiony numerem telefonu dzwoniąc osobę (swoje) <br> <b> __LOGIN__ </b> które zostaną zastąpione clicktodial login (zdefiniowany na karcie użytkownika) <br> <b> __PASS__ </b>, który zostanie zastąpiony hasłem clicktodial (zdefiniowanym na karcie użytkownika). +ClickToDialDesc=Ten moduł zamienia numery telefonów, gdy używasz komputera stacjonarnego, w klikalne linki. Kliknięcie wywoła numer. Można to wykorzystać do nawiązania połączenia telefonicznego podczas korzystania z telefonu programowego na pulpicie lub podczas korzystania na przykład z systemu CTI opartego na protokole SIP. Uwaga: podczas korzystania ze smartfona numery telefonów są zawsze klikalne. 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. +ClickToDialUseTelLinkDesc=Użyj tej metody, jeśli Twoi użytkownicy mają telefon programowy lub interfejs oprogramowania zainstalowany na tym samym komputerze co przeglądarka i wywoływany po kliknięciu łącza w przeglądarce zaczynającego się od „tel:”. Jeśli potrzebujesz pełnego rozwiązania serwerowego (nie ma potrzeby lokalnej instalacji oprogramowania), musisz ustawić to na „Nie” i wypełnić następne pole. ##### Point Of Sale (CashDesk) ##### -CashDesk=Point of Sale -CashDeskSetup=Point of Sales module setup -CashDeskThirdPartyForSell=Default generic third party to use for sales +CashDesk=Punkt sprzedaży +CashDeskSetup=Konfiguracja modułu Point of Sales +CashDeskThirdPartyForSell=Domyślna generyczna firma zewnętrzna do sprzedaży CashDeskBankAccountForSell=Środki pieniężne na rachunku do korzystania sprzedaje -CashDeskBankAccountForCheque=Default account to use to receive payments by check +CashDeskBankAccountForCheque=Domyślne konto używane do otrzymywania płatności czekiem CashDeskBankAccountForCB=Chcesz używać do przyjmowania płatności gotówkowych za pomocą kart kredytowych -CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp -CashDeskDoNotDecreaseStock=Disable stock decrease when a sale is done from Point of Sale (if "no", stock decrease is done for each sale done from POS, irrespective of the option set in module Stock). +CashDeskBankAccountForSumup=Domyślne konto bankowe używane do otrzymywania płatności przez SumUp +CashDeskDoNotDecreaseStock=Wyłącz zmniejszanie zapasów, gdy sprzedaż odbywa się z punktu sprzedaży (jeśli "nie", zmniejszanie zapasów jest dokonywane dla każdej sprzedaży dokonanej z POS, niezależnie od opcji ustawionej w module Zapasy). CashDeskIdWareHouse=Życie i ograniczyć magazyn użyć do spadku magazynie -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. +StockDecreaseForPointOfSaleDisabled=Zmniejszenie zapasów z punktu sprzedaży wyłączone +StockDecreaseForPointOfSaleDisabledbyBatch=Zmniejszenie zapasów w POS nie jest kompatybilne z modułem Zarządzanie seriami / partiami (obecnie aktywne), więc zmniejszanie zapasów jest wyłączone. CashDeskYouDidNotDisableStockDecease=Nie wyłączono zmniejszania zapasów podczas dokonywania sprzedaży w punkcie sprzedaży. Dlatego wymagany jest magazyn. CashDeskForceDecreaseStockLabel=Wymuszono zmniejszenie zapasów dla produktów seryjnych. -CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates. +CashDeskForceDecreaseStockDesc=Zmniejsz najpierw według najstarszych dat przydatności do spożycia i sprzedaży. CashDeskReaderKeyCodeForEnter=Kod klucza dla „Enter” zdefiniowany w czytniku kodów kreskowych (Przykład: 13) ##### Bookmark ##### BookmarkSetup=Zakładka konfiguracji modułu @@ -1797,11 +1810,11 @@ BankOrderGlobal=Ogólny BankOrderGlobalDesc=Ogólna kolejność wyświetlania BankOrderES=Hiszpański BankOrderESDesc=Hiszpański kolejność wyświetlania -ChequeReceiptsNumberingModule=Check Receipts Numbering Module +ChequeReceiptsNumberingModule=Sprawdź moduł numerowania paragonów ##### Multicompany ##### MultiCompanySetup=Firma Multi-Moduł konfiguracji ##### Suppliers ##### -SuppliersSetup=Konfiguracja modułu Dostawcy +SuppliersSetup=Ustawienia modułu dostawcy SuppliersCommandModel=Kompletny szablon zamówienia SuppliersCommandModelMuscadet=Kompletny szablon zamówienia (stara implementacja szablonu cornas) SuppliersInvoiceModel=Kompletny szablon faktury od dostawcy @@ -1845,7 +1858,7 @@ TypePaymentDesc=0: typ płatności odbiorcy, 1: typ płatności dostawcy, 2: typ IncludePath=Dołącz ścieżkę (zdefiniowane w zmiennej% s) ExpenseReportsSetup=Konfiguracja modułu Raporty Kosztów TemplatePDFExpenseReports=Szablony dokumentów w celu wygenerowania raportu wydatków dokument -ExpenseReportsRulesSetup=Konfiguracja modułu "Raporty wydatków" - Reguły +ExpenseReportsRulesSetup=Ustawienia modułu "Raporty wydatków" - Reguły ExpenseReportNumberingModules=Moduł "Numerowanie raportów wydatków" NoModueToManageStockIncrease=Nie Moduł stanie zarządzać automatyczny wzrost akcji zostało aktywowane. Wzrost Zdjęcie zostanie zrobione tylko na ręczne wprowadzanie. YouMayFindNotificationsFeaturesIntoModuleNotification=Opcje powiadomień e-mail można znaleźć, włączając i konfigurując moduł „Powiadomienia”. @@ -1879,11 +1892,11 @@ BackgroundTableLineOddColor=Kolor tła pozostałych lini tabeli BackgroundTableLineEvenColor=Kolor tła dla równomiernych lini tabeli MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=To pole zawiera odniesienie do identyfikacji linii. Wprowadź dowolną wybraną wartość, ale bez znaków specjalnych. 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) +PictoHelp=Nazwa ikony w formacie dolibarr („image.png” w katalogu z bieżącym motywem, „image.png@nom_du_module” w katalogu / img / modułu) 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. @@ -1910,7 +1923,7 @@ MailToSendSupplierRequestForQuotation=Zapytanie ofertowe MailToSendSupplierOrder=Zamówienia zakupowe MailToSendSupplierInvoice=Faktury dostawcy MailToSendContract=Kontrakty -MailToSendReception=Receptions +MailToSendReception=Przyjęcia MailToThirdparty=Kontrahenci MailToMember=Członkowie MailToUser=Użytkownicy @@ -1924,7 +1937,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ć <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a>, 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 +WarehouseModelModules=Szablony dokumentów magazynowych 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) @@ -1955,7 +1968,7 @@ SamePriceAlsoForSharedCompanies=Jeśli korzystasz z modułu MultiCompany, z wybo ModuleEnabledAdminMustCheckRights=Moduł został aktywowany. Uprawnienia do aktywnych modułów są automatycznie przyznawane administratorom systemu. Jeśli trzeba, uprawnienia można ręcznie przyznać innym użytkownikom lub grupom. UserHasNoPermissions=Ten użytkownik nie ma zdefiniowanych uprawnień TypeCdr=Użyj „Brak”, jeśli terminem płatności jest data wystawienia faktury plus delta w dniach (delta to pole „%s”)<br>Użyj „Na koniec miesiąca”, jeśli po delcie data musi zostać przedłużona do końca miesiąca (+ opcjonalny „%s” w dniach)<br>Użyj „Bieżący/Następny”, aby data terminu płatności była pierwszą N-tego miesiąca po delcie (delta to pole „%s”, N jest przechowywane w polu „%s”) -BaseCurrency=Waluta bazowa w firmie (przejdź do Konfiguracja > Firma/Organizacja, aby to zmienić) +BaseCurrency=Waluta referencyjna firmy (przejdź do ustawień firmy, aby to zmienić) WarningNoteModuleInvoiceForFrenchLaw=Ten moduł %s jest zgodny z francuskimi przepisami (Loi Finance 2016). WarningNoteModulePOSForFrenchLaw=Ten moduł %s jest zgodny z francuskimi przepisami (Loi Finance 2016), ponieważ moduł Dzienniki Nieodwracalne jest aktywowany automatycznie. WarningInstallationMayBecomeNotCompliantWithLaw=Próbujesz zainstalować moduł %s, który jest modułem zewnętrznym. Aktywując go zaufasz jego wydawcy, okażesz pewność, że moduł nie wpłynie negatywnie na zachowanie Twojej aplikacji oraz, że jest zgodny z przepisami obowiązującymi w Twoim kraju (%s). Jeśli moduł wprowadzi nielegalną funkcję, staniesz się odpowiedzialny za korzystanie z nielegalnego oprogramowania. @@ -1963,135 +1976,149 @@ 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 +MAIN_DOCUMENTS_LOGO_HEIGHT=Wysokość logo na dokumencie 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”) +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Znaleziono kilka wariantów językowych RemoveSpecialChars=Usuń znaki specjalne COMPANY_AQUARIUM_CLEAN_REGEX=Filtr Regex do czyszczenia wartości (COMPANY_AQUARIUM_CLEAN_REGEX) COMPANY_DIGITARIA_CLEAN_REGEX=Filtr Regex do czyszczenia wartości (COMPANY_DIGITARIA_CLEAN_REGEX) COMPANY_DIGITARIA_UNIQUE_CODE=Duplikat jest niedozwolony -GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact) -GDPRContactDesc=If you store data about European companies/citizens, you can name the contact who is responsible for the General Data Protection Regulation here -HelpOnTooltip=Help text to show on tooltip +GDPRContact=Inspektor ochrony danych osobowych (kontakt w sprawie ochrony danych lub RODO) +GDPRContactDesc=Jeśli przechowujesz dane o europejskich firmach / obywatelach, możesz tutaj wskazać osobę kontaktową odpowiedzialną za ogólne rozporządzenie o ochronie danych +HelpOnTooltip=Tekst pomocy do wyświetlenia w podpowiedzi HelpOnTooltipDesc=Umieść tutaj tekst lub klucz do tłumaczenia, aby tekst był wyświetlany w etykiecie narzędzia, gdy to pole pojawi się w formularzu YouCanDeleteFileOnServerWith=Możesz usunąć ten plik na serwerze za pomocą wiersza poleceń:<br>%s -ChartLoaded=Chart of account loaded -SocialNetworkSetup=Konfiguracja modułu Sieci Społecznościowe +ChartLoaded=Załadowano plan kont +SocialNetworkSetup=Ustawienia modułu Sieci Społecznościowe EnableFeatureFor=Włącz funkcje dla <strong>%s</strong> -VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. -SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. -EmailCollector=Email collector -EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). -NewEmailCollector=New Email Collector -EMailHost=Host of email IMAP server -MailboxSourceDirectory=Mailbox source directory -MailboxTargetDirectory=Mailbox target directory -EmailcollectorOperations=Operations to do by collector -EmailcollectorOperationsDesc=Operations are executed from top to bottom order -MaxEmailCollectPerCollect=Max number of emails collected per collect -CollectNow=Collect now -ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date of latest collect try -DateLastcollectResultOk=Date of latest collect success -LastResult=Latest result -EmailCollectorConfirmCollectTitle=Email collect confirmation -EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? -NoNewEmailToProcess=No new email (matching filters) to process -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 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=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 job application +VATIsUsedIsOff=Uwaga: Opcja korzystania z podatku od sprzedaży lub VAT została ustawiona na <strong> Off </strong> w menu %s - %s, więc podatek od sprzedaży lub VAT będzie zawsze wynosić 0 dla sprzedaży. +SwapSenderAndRecipientOnPDF=Zamień adres nadawcy i adresata w dokumentach PDF +FeatureSupportedOnTextFieldsOnly=Ostrzeżenie, funkcja obsługiwana tylko w polach tekstowych i listach kombi. Również parametr adresu URL action = create lub action = edit musi być ustawiony LUB nazwa strony musi kończyć się na „nowy.php”, aby uruchomić tę funkcję. +EmailCollector=Kolektor e-maili +EmailCollectorDescription=Dodaj zaplanowane zadanie i stronę konfiguracji, aby regularnie skanować skrzynki e-mail (przy użyciu protokołu IMAP) i zapisywać wiadomości e-mail otrzymane w aplikacji we właściwym miejscu i / lub automatycznie tworzyć niektóre rekordy (np. Potencjalnych klientów). +NewEmailCollector=Nowy moduł do zbierania wiadomości e-mail +EMailHost=Host serwera poczty e-mail IMAP +MailboxSourceDirectory=Katalog źródłowy skrzynki pocztowej +MailboxTargetDirectory=Katalog docelowy skrzynki pocztowej +EmailcollectorOperations=Operacje do wykonania przez kolekcjonera +EmailcollectorOperationsDesc=Operacje są wykonywane od góry do dołu +MaxEmailCollectPerCollect=Maksymalna liczba e-maili zebranych na odbiór +CollectNow=Zbierz teraz +ConfirmCloneEmailCollector=Czy na pewno chcesz sklonować moduł zbierający wiadomości e-mail %s? +DateLastCollectResult=Data ostatniej próby odbioru +DateLastcollectResultOk=Data ostatniej pomyślnej zbiórki +LastResult=Ostatni wynik +EmailCollectorConfirmCollectTitle=Potwierdzenie odbioru poczty e-mail +EmailCollectorConfirmCollect=Czy chcesz teraz uruchomić kolekcję dla tego kolekcjonera? +NoNewEmailToProcess=Brak nowych e-maili (pasujących filtrów) do przetworzenia +NothingProcessed=Nic nie zostało zrobione +XEmailsDoneYActionsDone=%s e-maile zakwalifikowane, %s e-maile pomyślnie przetworzone (dla %s rekordu / wykonanych czynności) +RecordEvent=Nagraj wydarzenie e-mail +CreateLeadAndThirdParty=Utwórz potencjalnego klienta (i osobę trzecią, jeśli to konieczne) +CreateTicketAndThirdParty=Utwórz bilet (i link do strony trzeciej, jeśli został załadowany przez poprzednią operację) +CodeLastResult=Kod najnowszego wyniku +NbOfEmailsInInbox=Liczba e-maili w katalogu źródłowym +LoadThirdPartyFromName=Załaduj wyszukiwanie osób trzecich na %s (tylko ładowanie) +LoadThirdPartyFromNameOrCreate=Załaduj wyszukiwanie osób trzecich na %s (utwórz, jeśli nie znaleziono) +WithDolTrackingID=Wiadomość z rozmowy zainicjowanej pierwszym e-mailem wysłanym przez Dolibarr +WithoutDolTrackingID=Wiadomość z rozmowy zainicjowanej pierwszym e-mailem NIE wysłanym od Dolibarr +WithDolTrackingIDInMsgId=Wiadomość wysłana przez Dolibarr +WithoutDolTrackingIDInMsgId=Wiadomość NIE została wysłana z Dolibarr +CreateCandidature=Utwórz podanie o pracę FormatZip=Kod pocztowy -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:<br>objproperty1=SET:the value to set<br>objproperty2=SET:a value with replacement of __objproperty1__<br>objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)<br><br>Use a ; char as separator to extract or set several properties. -OpeningHours=Opening hours -OpeningHoursDesc=Enter here the regular opening hours of your company. -ResourceSetup=Configuration of Resource module -UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). -DisabledResourceLinkUser=Disable feature to link a resource to users -DisabledResourceLinkContact=Disable feature to link a resource to contacts -EnableResourceUsedInEventCheck=Enable feature to check if a resource is in use in an event -ConfirmUnactivation=Confirm module reset -OnMobileOnly=On small screen (smartphone) only -DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) -MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person -MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or 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. +MainMenuCode=Kod wejścia menu (menu główne) +ECMAutoTree=Pokaż automatyczne drzewo ECM +OperationParamDesc=Zdefiniuj wartości, które mają być używane dla obiektu akcji, lub sposób wyodrębniania wartości. Na przykład: <br> objproperty1 = SET: wartość do ustawienia <br> objproperty2 = SET: wartość zastępująca __objproperty1__ <br> objproperty3 = SETIFEMPTY: wartość używana, jeśli objproperty3 nie jest jeszcze zdefiniowana a0342 objproperty3: ([^ \\ s] *) <br> options_myextrafield1 = EXTRACT: SUBJECT: ([^ & # 92; n] *) <br> object.objproperty5 = WYCIĄG: BODY: Nazwa mojej firmy to \\ s ([^ \\ s] *) a0342fccfda <br> Użyj a; char jako separator, aby wyodrębnić lub ustawić kilka właściwości. +OpeningHours=Godziny otwarcia +OpeningHoursDesc=Wpisz tutaj regularne godziny otwarcia swojej firmy. +ResourceSetup=Konfiguracja modułu zasobów +UseSearchToSelectResource=Użyj formularza wyszukiwania, aby wybrać zasób (zamiast listy rozwijanej). +DisabledResourceLinkUser=Wyłącz funkcję łączenia zasobów z użytkownikami +DisabledResourceLinkContact=Wyłącz funkcję łączenia zasobów z kontaktami +EnableResourceUsedInEventCheck=Włącz funkcję, aby sprawdzić, czy zasób jest używany w wydarzeniu +ConfirmUnactivation=Potwierdź reset modułu +OnMobileOnly=Tylko na małym ekranie (smartfonie) +DisableProspectCustomerType=Wyłącz typ strony trzeciej „Prospect + Customer” (więc strona trzecia musi być „Prospect” lub „Customer”, ale nie może być jednocześnie) +MAIN_OPTIMIZEFORTEXTBROWSER=Uproszczony interfejs dla osób niewidomych +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Włącz tę opcję, jeśli jesteś osobą niewidomą lub jeśli używasz aplikacji z przeglądarki tekstowej, takiej jak Lynx lub Links. +MAIN_OPTIMIZEFORCOLORBLIND=Zmień kolor interfejsu dla osoby niewidomej na kolory +MAIN_OPTIMIZEFORCOLORBLINDDesc=Włącz tę opcję, jeśli jesteś osobą niewidomą na kolory, w niektórych przypadkach interfejs zmieni ustawienia kolorów, aby zwiększyć kontrast. Protanopia=Protanopia -Deuteranopes=Deuteranopes -Tritanopes=Tritanopes -ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s' -DefaultCustomerType=Default thirdparty type for "New customer" creation form -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 +Deuteranopes=Deuteranopy +Tritanopes=Tritanopy +ThisValueCanOverwrittenOnUserLevel=Ta wartość może być nadpisana przez każdego użytkownika na jego stronie użytkownika - zakładka „%s” +DefaultCustomerType=Domyślny typ strony trzeciej dla formularza tworzenia „Nowego klienta” +ABankAccountMustBeDefinedOnPaymentModeSetup=Uwaga: aby ta funkcja działała, konto bankowe musi być zdefiniowane w module każdego trybu płatności (Paypal, Stripe, ...). +RootCategoryForProductsToSell=Kategoria główna sprzedawanych produktów +RootCategoryForProductsToSellDesc=W przypadku zdefiniowania w punkcie sprzedaży będą dostępne tylko produkty należące do tej kategorii lub produkty podrzędne z tej kategorii +DebugBar=Pasek debugowania +DebugBarDesc=Pasek narzędzi z wieloma narzędziami upraszczającymi debugowanie 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 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files -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 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. -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. +GeneralOptions=Opcje ogólne +LogsLinesNumber=Liczba wierszy wyświetlanych na karcie dzienników +UseDebugBar=Użyj paska debugowania +DEBUGBAR_LOGS_LINES_NUMBER=Liczba ostatnich wierszy dziennika do zachowania w konsoli +WarningValueHigherSlowsDramaticalyOutput=Ostrzeżenie, wyższe wartości dramatycznie spowalniają produkcję +ModuleActivated=Moduł %s jest aktywowany i spowalnia interfejs +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) +IfYouAreOnAProductionSetThis=W środowisku produkcyjnym należy ustawić tę właściwość na %s. +AntivirusEnabledOnUpload=Antywirus włączony na przesyłanych plikach +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode +EXPORTS_SHARE_MODELS=Modele eksportowe są udostępniane wszystkim +ExportSetup=Konfiguracja eksportu modułu +ImportSetup=Konfiguracja importu modułu +InstanceUniqueID=Unikalny identyfikator instancji +SmallerThan=Mniejszy niż +LargerThan=Większy niż +IfTrackingIDFoundEventWillBeLinked=Zwróć uwagę, że jeśli identyfikator śledzenia obiektu zostanie znaleziony w wiadomości e-mail lub jeśli wiadomość e-mail jest odpowiedzią na wiadomość e-mail, która jest już zebrana i powiązana z obiektem, utworzone zdarzenie zostanie automatycznie połączone ze znanym powiązanym obiektem. +WithGMailYouCanCreateADedicatedPassword=W przypadku konta Gmail, jeśli włączyłeś weryfikację dwuetapową, zaleca się utworzenie dedykowanego drugiego hasła dla aplikacji zamiast używania własnego hasła do konta ze strony https://myaccount.google.com/. +EmailCollectorTargetDir=Przeniesienie wiadomości e-mail do innego tagu / katalogu po pomyślnym przetworzeniu może być pożądanym zachowaniem. Po prostu ustaw tutaj nazwę katalogu, aby skorzystać z tej funkcji (NIE używaj znaków specjalnych w nazwie). Pamiętaj, że musisz również użyć konta logowania do odczytu / zapisu. +EmailCollectorLoadThirdPartyHelp=Możesz użyć tej akcji, aby użyć treści wiadomości e-mail do znalezienia i załadowania istniejącej strony trzeciej do bazy danych. Znaleziona (lub utworzona) osoba trzecia zostanie wykorzystana do następujących działań, które tego wymagają. W polu parametrów możesz użyć na przykład „EXTRACT: BODY: Name: \\ s ([^ \\ s] *)”, jeśli chcesz wyodrębnić nazwę osoby trzeciej z ciągu „Name: name to find” znajdującego się w ciało. +EndPointFor=Punkt końcowy dla %s: %s +DeleteEmailCollector=Usuń moduł zbierający e-maile +ConfirmDeleteEmailCollector=Czy na pewno chcesz usunąć tego kolektora e-maili? +RecipientEmailsWillBeReplacedWithThisValue=E-maile adresatów będą zawsze zastępowane tą wartością +AtLeastOneDefaultBankAccountMandatory=Należy zdefiniować co najmniej 1 domyślne konto bankowe +RESTRICT_ON_IP=Zezwalaj na dostęp tylko do niektórych adresów IP hostów (symbole wieloznaczne nie są dozwolone, użyj spacji między wartościami). Puste oznacza, że każdy host ma dostęp. 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=Przejdź do Konfiguracja -> Widżety +BaseOnSabeDavVersion=Oparty na wersji biblioteki SabreDAV +NotAPublicIp=To nie jest publiczny adres IP +MakeAnonymousPing=Wykonaj anonimowe pingowanie „+1” do serwera fundacji Dolibarr (wykonane 1 raz tylko po instalacji), aby umożliwić fundacji zliczenie liczby instalacji Dolibarr. +FeatureNotAvailableWithReceptionModule=Funkcja niedostępna, gdy włączony jest moduł Odbiór +EmailTemplate=Szablon do wiadomości e-mail +EMailsWillHaveMessageID=E-maile będą miały tag „References” pasujący do tej składni +PDF_SHOW_PROJECT=Pokaż projekt w dokumencie +ShowProjectLabel=Etykieta projektu +PDF_USE_ALSO_LANGUAGE_CODE=Jeśli chcesz, aby niektóre teksty w pliku PDF zostały skopiowane w 2 różnych językach w tym samym wygenerowanym pliku PDF, musisz ustawić tutaj ten drugi język, aby wygenerowany plik PDF zawierał 2 różne języki na tej samej stronie, ten wybrany podczas generowania pliku PDF i ten ( tylko kilka szablonów PDF to obsługuje). Pozostaw puste dla 1 języka na plik PDF. +FafaIconSocialNetworksDesc=Wpisz tutaj kod ikony FontAwesome. Jeśli nie wiesz, co to jest FontAwesome, możesz użyć ogólnej wartości fa-address-book. +FeatureNotAvailableWithReceptionModule=Funkcja niedostępna, gdy włączony jest moduł Odbiór +RssNote=Uwaga: każda definicja źródła danych RSS zawiera widżet, który należy włączyć, aby był dostępny na pulpicie nawigacyjnym +JumpToBoxes=Przejdź do Ustawienia -> 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=Event reminder email -SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security -DictionaryProductNature= Nature of product -CountryIfSpecificToOneCountry=Country (if specific to a given country) -YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. -ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. -CombinationsSeparator=Separator character for product combinations -SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples -SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. -AskThisIDToYourBank=Contact your bank to get this ID +MeasuringScaleDesc=Skala to liczba miejsc, o które trzeba przesunąć część dziesiętną, aby dopasować się do domyślnej jednostki odniesienia. W przypadku typu jednostki „czas” jest to liczba sekund. Wartości od 80 do 99 są wartościami zarezerwowanymi. +TemplateAdded=Dodano szablon +TemplateUpdated=Zaktualizowano szablon +TemplateDeleted=Szablon został usunięty +MailToSendEventPush=E-mail z przypomnieniem o wydarzeniu +SwitchThisForABetterSecurity=W celu zwiększenia bezpieczeństwa zaleca się zmianę tej wartości na %s +DictionaryProductNature= Charakter produktu +CountryIfSpecificToOneCountry=Kraj (jeśli dotyczy danego kraju) +YouMayFindSecurityAdviceHere=Możesz znaleźć porady dotyczące bezpieczeństwa tutaj +ModuleActivatedMayExposeInformation=To rozszerzenie PHP może ujawniać poufne dane. Jeśli jej nie potrzebujesz, wyłącz ją. +ModuleActivatedDoNotUseInProduction=Włączono moduł przeznaczony do rozwoju. Nie włączaj go w środowisku produkcyjnym. +CombinationsSeparator=Znak separatora dla kombinacji produktów +SeeLinkToOnlineDocumentation=Przykłady można znaleźć w odnośniku do dokumentacji online w górnym menu +SHOW_SUBPRODUCT_REF_IN_PDF=Jeśli używana jest funkcja „%s” modułu <b> %s </b>, wyświetl szczegóły podproduktów zestawu w pliku PDF. +AskThisIDToYourBank=Skontaktuj się ze swoim bankiem, aby uzyskać ten identyfikator +AdvancedModeOnly=Zezwolenie dostępne tylko w trybie uprawnień Zaawansowanych +ConfFileIsReadableOrWritableByAnyUsers=Plik conf jest czytelny lub zapisywalny dla każdego użytkownika. Udziel pozwolenia tylko użytkownikowi i grupie serwera WWW. +MailToSendEventOrganization=Organizacja imprez +AGENDA_EVENT_DEFAULT_STATUS=Domyślny status zdarzenia podczas tworzenia zdarzenia z formularza +YouShouldDisablePHPFunctions=Powinieneś wyłączyć funkcje PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/pl_PL/banks.lang b/htdocs/langs/pl_PL/banks.lang index 31fa178b5f7..c7266ccdbbc 100644 --- a/htdocs/langs/pl_PL/banks.lang +++ b/htdocs/langs/pl_PL/banks.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - banks Bank=Bank -MenuBankCash=Banks | Cash +MenuBankCash=Banki | Gotówka MenuVariousPayment=Różne płatności -MenuNewVariousPayment=New Miscellaneous payment +MenuNewVariousPayment=Nowa płatność różne BankName=Nazwa banku FinancialAccount=Konto BankAccount=Konto bankowe @@ -30,26 +30,26 @@ AllTime=Od początku Reconciliation=Rekoncyliacja - uzgadanie stanów kont bankowych RIB=Numer konta bankowego IBAN=Numer IBAN -BIC=BIC/SWIFT code +BIC=Kod BIC / SWIFT SwiftValid=Ważny BIC/SWIFT SwiftVNotalid=Nie ważny BIC/SWIFT IbanValid=Ważny BAN IbanNotValid=Nie ważny BAN -StandingOrders=Direct debit orders +StandingOrders=Polecenia zapłaty StandingOrder=Zamówienie polecenia zapłaty -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByDirectDebit=Płatność poleceniem zapłaty +PaymentByBankTransfers=Płatności przelewem +PaymentByBankTransfer=Płatność przelewem AccountStatement=Wyciąg z konta AccountStatementShort=Wyciąg AccountStatements=Wyciągi z konta LastAccountStatements=Ostatnie wyciągi z konta IOMonthlyReporting=Miesiąc sprawozdawczy -BankAccountDomiciliation=Bank address +BankAccountDomiciliation=numer konta BankAccountCountry=Konto kraju BankAccountOwner=Nazwa właściciela konta BankAccountOwnerAddress=Adres właściciela konta -RIBControlError=Integrity check of values failed. This means the information for this account number is not complete or is incorrect (check country, numbers and IBAN). +RIBControlError=Sprawdzanie integralności wartości nie powiodło się. Oznacza to, że informacje dotyczące tego numeru konta są niekompletne lub nieprawidłowe (sprawdź kraj, numery i IBAN). CreateAccount=Załóż konto NewBankAccount=Nowe konto NewFinancialAccount=Nowy rachunek finansowy @@ -76,53 +76,53 @@ BankTransaction=Wpis bankowy ListTransactions=Lista wpisów ListTransactionsByCategory=Lista wpisów/kategorii TransactionsToConciliate=Wpisy do zaksięgowania -TransactionsToConciliateShort=To reconcile +TransactionsToConciliateShort=Aby się pogodzić Conciliable=Może być rekoncyliowane Conciliate=Uzgodnienie sald Conciliation=Rekoncyliacja -SaveStatementOnly=Save statement only -ReconciliationLate=Reconciliation late +SaveStatementOnly=Zapisz tylko wyciąg +ReconciliationLate=Pojednanie późno IncludeClosedAccount=Dołącz zamknięte rachunki OnlyOpenedAccount=Tylko otwarte konta AccountToCredit=Konto do kredytów AccountToDebit=Konto do obciążania DisableConciliation=Wyłącz funkcję rekoncyliacji dla tego konta ConciliationDisabled=Funkcja rekoncyliacji wyłączona -LinkedToAConciliatedTransaction=Linked to a conciliated entry +LinkedToAConciliatedTransaction=Powiązane z pojednawczym wpisem StatusAccountOpened=Otwarte StatusAccountClosed=Zamknięte AccountIdShort=Liczba LineRecord=Transakcja AddBankRecord=Dodaj wpis AddBankRecordLong=Dodaj wpis ręcznie -Conciliated=Reconciled +Conciliated=Pojednany ConciliatedBy=Rekoncyliowany przez DateConciliating=Data rekoncyliacji -BankLineConciliated=Entry reconciled with bank receipt -Reconciled=Reconciled -NotReconciled=Not reconciled +BankLineConciliated=Wpis uzgodniony z paragonem bankowym +Reconciled=Pojednany +NotReconciled=Nie pogodzono się CustomerInvoicePayment=Płatności klienta SupplierInvoicePayment=Płatność dostawcy SubscriptionPayment=Zaplanowana płatność -WithdrawalPayment=Debit payment order +WithdrawalPayment=Polecenie zapłaty SocialContributionPayment=Płatność za ZUS/podatek -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Transfer kredytowy +BankTransfers=Polecenia przelewu MenuBankInternalTransfer=Przelew wewnętrzny -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) +TransferDesc=Przelew z jednego konta na drugie, Dolibarr zapisze dwa rekordy (obciążenie na koncie źródłowym i kredyt na koncie docelowym). Ta sama kwota (oprócz znaku), etykieta i data zostaną użyte dla tej transakcji) TransferFrom=Od TransferTo=Do TransferFromToDone=Transfer z <b>%s</b> do <b>%s</b> <b>%s</b> %s został zapisany. CheckTransmitter=Nadawca -ValidateCheckReceipt=Validate this check receipt? -ConfirmValidateCheckReceipt=Are you sure you want to validate this check receipt, no change will be possible once this is done? -DeleteCheckReceipt=Delete this check receipt? -ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt? +ValidateCheckReceipt=Potwierdzić potwierdzenie tego czeku? +ConfirmValidateCheckReceipt=Czy na pewno chcesz potwierdzić to pokwitowanie czeku? Gdy to zrobisz, żadna zmiana nie będzie możliwa? +DeleteCheckReceipt=Usunąć to pokwitowanie czeku? +ConfirmDeleteCheckReceipt=Czy na pewno chcesz usunąć to pokwitowanie czeku? BankChecks=Czeki bankowe -BankChecksToReceipt=Checks awaiting deposit -BankChecksToReceiptShort=Checks awaiting deposit +BankChecksToReceipt=Czeki oczekujące na wpłatę +BankChecksToReceiptShort=Czeki oczekujące na wpłatę ShowCheckReceipt=Pokaż sprawdzić otrzymania wpłaty -NumberOfCheques=No. of check +NumberOfCheques=Liczba czeków DeleteTransaction=Usuń wpis ConfirmDeleteTransaction=Czy jesteś pewien, że chcesz usunąć te wpis? ThisWillAlsoDeleteBankRecord=To usunie wygenerowany wpis bankowy @@ -138,11 +138,11 @@ PaymentDateUpdateSucceeded=Data płatności została zaktualizowana pomyślnie PaymentDateUpdateFailed=Data płatności nie mogła zostać zaktualizowana Transactions=Transakcje BankTransactionLine=Wpis bankowy -AllAccounts=All bank and cash accounts +AllAccounts=Wszystkie rachunki bankowe i gotówkowe BackToAccount=Powrót do konta ShowAllAccounts=Pokaż wszystkie konta -FutureTransaction=Future transaction. Unable to reconcile. -SelectChequeTransactionAndGenerate=Select/filter checks to include in the check deposit receipt and click on "Create". +FutureTransaction=Przyszła transakcja. Nie można się pogodzić. +SelectChequeTransactionAndGenerate=Wybierz / filtruj czeki, które mają zostać uwzględnione w potwierdzeniu wpłaty czeku, i kliknij „Utwórz”. InputReceiptNumber=Wybierz wyciąg bankowy związany z postępowania pojednawczego. Użyj schematu: RRRRMM lub RRRRMMDD EventualyAddCategory=Ostatecznie, określić kategorię, w której sklasyfikować rekordy ToConciliate=Do zaksięgowania? @@ -157,27 +157,28 @@ RejectCheck=Czek zwrócony ConfirmRejectCheck=Czy jesteś pewien, ze chcesz oznaczyć ten czek jako odrzucony? RejectCheckDate=Data wrócił kontrola CheckRejected=Czek zwrócony -CheckRejectedAndInvoicesReopened=Check returned and invoices re-open +CheckRejectedAndInvoicesReopened=Czek zwrócony i faktury ponownie otwarte BankAccountModelModule=Szablony dokumentu dla kont bankowych -DocumentModelSepaMandate=Template of SEPA mandate. Useful for European countries in EEC only. -DocumentModelBan=Template to print a page with BAN information. -NewVariousPayment=New miscellaneous payment -VariousPayment=Miscellaneous payment +DocumentModelSepaMandate=Wzór upoważnienia SEPA. Przydatne tylko w krajach europejskich w EWG. +DocumentModelBan=Szablon do wydrukowania strony z informacjami BAN. +NewVariousPayment=Nowa płatność różna +VariousPayment=Różne płatności VariousPayments=Różne płatności -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 -AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation -CashControl=POS cash desk control -NewCashFence=New cash desk closing -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 -IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. -NoBankAccountDefined=No bank account defined +ShowVariousPayment=Pokaż różne płatności +AddVariousPayment=Dodaj inną płatność +VariousPaymentId=Różne identyfikatory płatności +VariousPaymentLabel=Różne etykiety płatności +ConfirmCloneVariousPayment=Potwierdź klon płatności różnej +SEPAMandate=Mandat SEPA +YourSEPAMandate=Twój mandat SEPA +FindYourSEPAMandate=To jest Twoje upoważnienie SEPA do upoważnienia naszej firmy do złożenia polecenia zapłaty w Twoim banku. Zwróć podpisany (skan podpisanego dokumentu) lub wyślij pocztą na adres +AutoReportLastAccountStatement=Automatycznie wypełnij pole „numer wyciągu bankowego” numerem ostatniego wyciągu podczas rozliczenia +CashControl=Kontrola kas kasowych POS +NewCashFence=Otwarcie lub zamknięcie nowej kasy +BankColorizeMovement=Koloruj ruchy +BankColorizeMovementDesc=Jeśli ta funkcja jest włączona, możesz wybrać określony kolor tła dla ruchów debetowych lub kredytowych +BankColorizeMovementName1=Kolor tła dla przelewu debetowego +BankColorizeMovementName2=Kolor tła dla przesunięcia kredytu +IfYouDontReconcileDisableProperty=Jeśli nie dokonasz uzgodnień bankowych na niektórych kontach bankowych, wyłącz na nich właściwość „%s”, aby usunąć to ostrzeżenie. +NoBankAccountDefined=Nie zdefiniowano konta bankowego +NoRecordFoundIBankcAccount=Nie znaleziono rekordu na koncie bankowym. Często dzieje się tak, gdy rekord został ręcznie usunięty z listy transakcji na rachunku bankowym (na przykład podczas uzgadniania rachunku bankowego). Innym powodem jest to, że płatność została zarejestrowana, gdy moduł „%s” był wyłączony. diff --git a/htdocs/langs/pl_PL/bills.lang b/htdocs/langs/pl_PL/bills.lang index ee3d2dbb180..9bd60005f52 100644 --- a/htdocs/langs/pl_PL/bills.lang +++ b/htdocs/langs/pl_PL/bills.lang @@ -6,13 +6,13 @@ BillsCustomer=Faktura klienta BillsSuppliers=Faktury dostawcy BillsCustomersUnpaid=Niezapłacone faktury klienta BillsCustomersUnpaidForCompany=Niezapłacone faktury klienta dla %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s +BillsSuppliersUnpaid=Niezapłacone faktury od dostawcy +BillsSuppliersUnpaidForCompany=Niezapłacone faktury od dostawców za %s BillsLate=Opóźnienia w płatnościach BillsStatistics=Statystyki faktur klientów -BillsStatisticsSuppliers=Vendors invoices statistics +BillsStatisticsSuppliers=Statystyki faktur dostawców DisabledBecauseDispatchedInBookkeeping=Wyłączone, ponieważ faktura została wysłana do księgowości -DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. +DisabledBecauseNotLastInvoice=Wyłączone, ponieważ faktury nie można usunąć. Niektóre faktury zostały zarejestrowane po tej jednej i spowoduje to powstanie dziur w ladzie. DisabledBecauseNotErasable=Wyłączone, ponieważ nie można go usunąć InvoiceStandard=Standardowa faktura InvoiceStandardAsk=Standardowa faktura @@ -25,10 +25,10 @@ InvoiceProFormaAsk=Proforma faktury InvoiceProFormaDesc=<b>Faktura proforma</b> jest obrazem prawdziwej faktury, ale nie ma jeszcze wartości księgowych. InvoiceReplacement=Duplikat faktury InvoiceReplacementAsk=Duplikat faktury do faktury -InvoiceReplacementDesc=<b>Replacement invoice</b> is used to completely replace an invoice with no payment already received.<br><br>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= <b> Faktura zastępcza </b> służy do całkowitego zastąpienia faktury bez otrzymanej płatności. <br> <br> Uwaga: Tylko faktury bez płatności można wymienić. Jeśli zastępowana faktura nie jest jeszcze zamknięta, zostanie automatycznie zamknięta jako „porzucona”. InvoiceAvoir=Nota kredytowa InvoiceAvoirAsk=Edytuj notatkę do skorygowania faktury -InvoiceAvoirDesc=The <b>credit note</b> 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). +InvoiceAvoirDesc=Nota kredytowa <b> </b> to faktura ujemna służąca do skorygowania faktu, że faktura zawiera kwotę różniącą się od kwoty faktycznie zapłaconej (np. Klient zapłacił za dużo przez pomyłkę lub nie zapłaci pełnej kwoty, ponieważ niektóre produkty zostały zwrócone) . invoiceAvoirWithLines=Tworzenie kredytowa Uwaga liniami z faktury pochodzenia invoiceAvoirWithPaymentRestAmount=Tworzenie kredytowa z nieopłacone Uwaga faktury pochodzenia invoiceAvoirLineWithPaymentRestAmount=Nota kredytowa na kwotę pozostałą nieodpłatną @@ -41,9 +41,9 @@ CorrectionInvoice=Korekta faktury UsedByInvoice=Służy do zapłaty faktury %s ConsumedBy=Zużyto przez NotConsumed=Nie zużyto -NoReplacableInvoice=No replaceable invoices +NoReplacableInvoice=Brak wymiennych faktur NoInvoiceToCorrect=Brak faktury do skorygowania -InvoiceHasAvoir=Was source of one or several credit notes +InvoiceHasAvoir=Było źródłem jednej lub kilku not kredytowych CardBill=Karta faktury PredefinedInvoices=Predefiniowane Faktury Invoice=Faktura @@ -52,50 +52,53 @@ Invoices=Faktury InvoiceLine=Pole faktury InvoiceCustomer=Faktura klienta CustomerInvoice=Faktura klienta -CustomersInvoices=Faktury Klientów +CustomersInvoices=Faktury klienta SupplierInvoice=Faktura dostawcy -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Faktury dostawcy +SupplierInvoiceLines=Wiersze faktury dostawcy SupplierBill=Faktura dostawcy -SupplierBills=Faktury Dostawców +SupplierBills=Faktury dostawcy Payment=Płatność PaymentBack=Zwrot CustomerInvoicePaymentBack=Zwrot Payments=Płatności -PaymentsBack=Refunds -paymentInInvoiceCurrency=in invoices currency +PaymentsBack=Zwroty kosztów +paymentInInvoiceCurrency=w walucie faktur PaidBack=Spłacona DeletePayment=Usuń płatności ConfirmDeletePayment=Czy jesteś pewien, że chcesz usunąć tą płatność? -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 +ConfirmConvertToReduc=Czy chcesz zamienić ten %s na dostępny kredyt? +ConfirmConvertToReduc2=Kwota zostanie zapisana wśród wszystkich rabatów i może zostać wykorzystana jako rabat dla bieżącej lub przyszłej faktury dla tego klienta. +ConfirmConvertToReducSupplier=Czy chcesz zamienić ten %s na dostępny kredyt? +ConfirmConvertToReducSupplier2=Kwota zostanie zapisana wśród wszystkich rabatów i może zostać wykorzystana jako rabat dla bieżącej lub przyszłej faktury dla tego dostawcy. +SupplierPayments=Płatności dostawcy ReceivedPayments=Otrzymane płatności ReceivedCustomersPayments=Zaliczki otrzymane od klientów -PayedSuppliersPayments=Payments paid to vendors +PayedSuppliersPayments=Płatności na rzecz dostawców ReceivedCustomersPaymentsToValid=Odebrane płatności klientów do potwierdzenia PaymentsReportsForYear=Raporty płatności dla %s PaymentsReports=Raporty płatności PaymentsAlreadyDone=Płatności już wykonane -PaymentsBackAlreadyDone=Refunds already done +PaymentsBackAlreadyDone=Zwroty już dokonane PaymentRule=Zasady płatności -PaymentMode=Payment Type +PaymentMode=Typ płatności +DefaultPaymentMode=Domyślny typ płatności +DefaultBankAccount=Domyślne konto bankowe PaymentTypeDC=Karta debetowa/kredytowa 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=Typ płatności (identyfikator) +CodePaymentMode=Rodzaj płatności (kod) +LabelPaymentMode=Typ płatności (etykieta) +PaymentModeShort=Typ płatności +PaymentTerm=Termin płatności +PaymentConditions=Zasady płatności +PaymentConditionsShort=Zasady płatności PaymentAmount=Kwota płatności PaymentHigherThanReminderToPay=Płatności wyższe niż upomnienie do zapłaty -HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <br> 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. <br> Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. +HelpPaymentHigherThanReminderToPay=Uwaga, kwota płatności jednego lub więcej rachunków jest wyższa niż kwota pozostająca do spłaty. <br> Edytuj swój wpis, w przeciwnym razie potwierdź i rozważ utworzenie noty kredytowej na nadwyżkę otrzymaną za każdą nadpłaconą fakturę. +HelpPaymentHigherThanReminderToPaySupplier=Uwaga, kwota płatności jednego lub więcej rachunków jest wyższa niż kwota pozostająca do spłaty. <br> Edytuj swój wpis, w przeciwnym razie potwierdź i rozważ utworzenie noty kredytowej na nadwyżkę zapłaconą za każdą nadpłaconą fakturę. ClassifyPaid=Klasyfikacja "wpłacono" -ClassifyUnPaid=Classify 'Unpaid' +ClassifyUnPaid=Sklasyfikuj jako „niezapłacone” ClassifyPaidPartially=Klasyfikacja "wpłacono częściowo" ClassifyCanceled=Klasyfikacja "Porzucono" ClassifyClosed=Klasyfikacja "zamknięte" @@ -106,14 +109,14 @@ AddBill=Tworzenie faktury lub noty kredytowej AddToDraftInvoices=Dodaj do szkicu faktury DeleteBill=Usuń fakturę SearchACustomerInvoice=Szukaj faktury klienta -SearchASupplierInvoice=Search for a vendor invoice +SearchASupplierInvoice=Wyszukaj fakturę od dostawcy CancelBill=Anulowanie faktury SendRemindByMail=Wyślij przypomnienie pocztą e-mail DoPayment=Wprowadź płatność DoPaymentBack=Wprowadź zwrot -ConvertToReduc=Mark as credit available -ConvertExcessReceivedToReduc=Convert excess received into available credit -ConvertExcessPaidToReduc=Convert excess paid into available discount +ConvertToReduc=Oznacz jako dostępny kredyt +ConvertExcessReceivedToReduc=Zamień otrzymane nadwyżki na dostępny kredyt +ConvertExcessPaidToReduc=Zamień zapłaconą nadwyżkę na dostępny rabat EnterPaymentReceivedFromCustomer=Wprowadź płatność otrzymaną od klienta EnterPaymentDueToCustomer=Dokonaj płatności dla klienta DisabledBecauseRemainderToPayIsZero=Nieaktywne, ponieważ upływająca nieopłacona kwota wynosi zero @@ -122,60 +125,60 @@ BillStatus=Status faktury StatusOfGeneratedInvoices=Status generowanych faktur BillStatusDraft=Projekt (musi zostać zatwierdzone) BillStatusPaid=Płatność -BillStatusPaidBackOrConverted=Credit note refund or marked as credit available -BillStatusConverted=Paid (ready for consumption in final invoice) +BillStatusPaidBackOrConverted=Zwrot noty kredytowej lub oznaczony jako dostępny kredyt +BillStatusConverted=Zapłacone (gotowe do spożycia na fakturze końcowej) BillStatusCanceled=Opuszczony BillStatusValidated=Zatwierdzona (trzeba zapłacić) BillStatusStarted=Rozpoczęcie BillStatusNotPaid=Brak zapłaty -BillStatusNotRefunded=Not refunded +BillStatusNotRefunded=Nie podlega zwrotowi BillStatusClosedUnpaid=Zamknięte (nie zapłacone) BillStatusClosedPaidPartially=Opłacone (częściowo) BillShortStatusDraft=Szkic BillShortStatusPaid=Płatność -BillShortStatusPaidBackOrConverted=Refunded or converted -Refunded=Refunded +BillShortStatusPaidBackOrConverted=Zwrócone lub zamienione +Refunded=Zwrócono koszty BillShortStatusConverted=Płatność BillShortStatusCanceled=Opuszczone BillShortStatusValidated=Zatwierdzone BillShortStatusStarted=Rozpoczęcie BillShortStatusNotPaid=Brak wpłaty -BillShortStatusNotRefunded=Not refunded +BillShortStatusNotRefunded=Nie podlega zwrotowi BillShortStatusClosedUnpaid=Zamknięte BillShortStatusClosedPaidPartially=Opłacono (częściowo) PaymentStatusToValidShort=Do potwierdzenia -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 +ErrorVATIntraNotConfigured=Wewnątrzwspólnotowy numer VAT nie został jeszcze zdefiniowany +ErrorNoPaiementModeConfigured=Nie zdefiniowano domyślnego typu płatności. Przejdź do konfiguracji modułu faktur, aby to naprawić. +ErrorCreateBankAccount=Utwórz konto bankowe, a następnie przejdź do panelu Konfiguracja modułu Faktury, aby zdefiniować typy płatności ErrorBillNotFound=Faktura %s nie istnieje -ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. +ErrorInvoiceAlreadyReplaced=Błąd, próbowałeś zweryfikować fakturę w celu zastąpienia faktury %s. Ale ten został już zastąpiony fakturą %s. ErrorDiscountAlreadyUsed=Błąd, zniżka już używana ErrorInvoiceAvoirMustBeNegative=Błąd, korekty faktury muszą mieć negatywny kwotę -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) +ErrorInvoiceOfThisTypeMustBePositive=Błąd, ten typ faktury musi mieć kwotę bez podatku dodatnią (lub zerową) ErrorCantCancelIfReplacementInvoiceNotValidated=Błąd, nie można anulować faktury, która została zastąpiona przez inną fakturę, będącą ciągle w stanie projektu. -ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Ta lub inna część jest już używana, więc serii rabatów nie można usunąć. BillFrom=Od BillTo=Do ActionsOnBill=Działania na fakturze -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 +RecurringInvoiceTemplate=Szablon / Faktura cykliczna +NoQualifiedRecurringInvoiceTemplateFound=Brak cyklicznej faktury szablonowej kwalifikującej się do wygenerowania. +FoundXQualifiedRecurringInvoiceTemplate=Znaleziono %s cyklicznych faktur szablonowych kwalifikujących się do wygenerowania. +NotARecurringInvoiceTemplate=To nie jest cykliczna faktura szablonowa NewBill=Nowa faktura LastBills=Ostatnie %s faktur LatestTemplateInvoices=Ostatnie %sszablonów faktur -LatestCustomerTemplateInvoices=Latest %s customer template invoices -LatestSupplierTemplateInvoices=Latest %s vendor template invoices +LatestCustomerTemplateInvoices=Najnowsze faktury klienta %s +LatestSupplierTemplateInvoices=Najnowsze faktury z szablonu dostawcy %s LastCustomersBills=Ostatnie %s faktur klienta -LastSuppliersBills=Latest %s vendor invoices +LastSuppliersBills=Najnowsze faktury od dostawcy %s AllBills=Wszystkie faktury -AllCustomerTemplateInvoices=All template invoices +AllCustomerTemplateInvoices=Wszystkie faktury szablonowe OtherBills=Inne faktury DraftBills=Projekt faktur CustomersDraftInvoices=Szkic faktur klienta -SuppliersDraftInvoices=Vendor draft invoices +SuppliersDraftInvoices=Sprzedający projekty faktur Unpaid=Należne wpłaty -ErrorNoPaymentDefined=Error No payment defined +ErrorNoPaymentDefined=Błąd Nie zdefiniowano płatności ConfirmDeleteBill=Czy jesteś pewien, że chcesz usunąć tą fakturę? ConfirmValidateBill=Czy jesteś pewien, że chcesz zatwierdzić tą fakturę z numerem <b>%s</b>? ConfirmUnvalidateBill=Czy jesteś pewien, że chcesz przenieść fakturę <b>%s</b> do statusu szkicu? @@ -183,20 +186,20 @@ ConfirmClassifyPaidBill=Czy jesteś pewien, że chcesz zmienić status faktury < ConfirmCancelBill=Czy jesteś pewien, że chcesz anulować fakturę <b>%s</b>? ConfirmCancelBillQuestion=Dlaczego chcesz sklasyfikować tę fakturę jako „porzuconą”? ConfirmClassifyPaidPartially=Czy jesteś pewien, że chcesz zmienić status faktury <b>%s</b> na zapłaconą? -ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? -ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. I regularize the VAT with a credit note. -ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid <b>(%s %s)</b> is a discount granted because payment was made before term. +ConfirmClassifyPaidPartiallyQuestion=Ta faktura nie została całkowicie opłacona. Jaki jest powód zamknięcia tej faktury? +ConfirmClassifyPaidPartiallyReasonAvoir=Pozostałe niezapłacone <b> (%s %s) </b> to rabat przyznany, ponieważ płatność została dokonana przed terminem. Reguluję podatek VAT notą kredytową. +ConfirmClassifyPaidPartiallyReasonDiscount=Pozostałe niezapłacone <b> (%s %s) </b> to rabat przyznany, ponieważ płatność została dokonana przed terminem. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Upływające nieopłacone <b>(%s %s)</b> jest przyznana zniżka, ponieważ płatność została dokonana przed terminem. Akceptuję stracić VAT na tej zniżce. ConfirmClassifyPaidPartiallyReasonDiscountVat=Upływające nieopłacone <b>(% s% s)</b> mają przyznaną zniżkę, ponieważ płatność została dokonana przed terminem. Odzyskano VAT od tej zniżki bez noty kredytowej. ConfirmClassifyPaidPartiallyReasonBadCustomer=Zły klient ConfirmClassifyPaidPartiallyReasonProductReturned=Produkty częściowo zwrócone ConfirmClassifyPaidPartiallyReasonOther=Kwota porzucona z innej przyczyny -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=This choice is possible if your invoice has been provided with suitable comments. (Example «Only the tax corresponding to the price that has been actually paid gives rights to deduction») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=In some countries, this choice might be possible only if your invoice contains correct notes. +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Taki wybór jest możliwy, jeśli do faktury zostały dołączone odpowiednie uwagi. (Przykład «Tylko podatek odpowiadający faktycznie zapłaconej cenie daje prawo do odliczenia») +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=W niektórych krajach ten wybór może być możliwy tylko wtedy, gdy faktura zawiera prawidłowe uwagi. ConfirmClassifyPaidPartiallyReasonAvoirDesc=Użyj tego wyboru, jeśli wszystkie inne nie odpowiadają -ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=A <b>bad customer</b> is a customer that refuses to pay his debt. +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=<b> zły klient </b> to klient, który odmawia spłaty swojego długu. ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Ten wybór jest używany, gdy płatność nie jest kompletna, ponieważ niektóre produkty zostały zwrócone -ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:<br>- payment not complete because some products were shipped back<br>- amount claimed too important because a discount was forgotten<br>In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. +ConfirmClassifyPaidPartiallyReasonOtherDesc=Skorzystaj z tego wyboru, jeśli wszystkie inne nie są odpowiednie, na przykład w następującej sytuacji: <br> - płatność nie została zakończona, ponieważ niektóre produkty zostały odesłane <br> - zgłoszona kwota jest zbyt ważna, ponieważ zapomniano o rabacie <br> We wszystkich przypadkach kwota nadpłacona musi zostać poprawiona w systemie księgowym poprzez utworzenie noty kredytowej. ConfirmClassifyAbandonReasonOther=Inny ConfirmClassifyAbandonReasonOtherDesc=Wybór ten będzie używany we wszystkich innych przypadkach. Na przykład wówczas. gdy planujesz utworzyć fakturę zastępującą. ConfirmCustomerPayment=Potwierdzasz wprowadzenie płatności dla <b>%s</b> %s? @@ -204,39 +207,39 @@ ConfirmSupplierPayment=Potwierdzasz wprowadzenie płatności dla <b>%s</b> %s? ConfirmValidatePayment=Czy jesteś pewny, że chcesz zatwierdzić tą płatność? Nie będzie można wprowadzić zmian po zatwierdzeniu płatności. ValidateBill=Zatwierdź fakturę UnvalidateBill=Niepotwierdzona faktura -NumberOfBills=No. of invoices -NumberOfBillsByMonth=No. of invoices per month +NumberOfBills=Liczba faktur +NumberOfBillsByMonth=Liczba faktur miesięcznie AmountOfBills=Kwota faktury -AmountOfBillsHT=Amount of invoices (net of tax) +AmountOfBillsHT=Kwota faktur (bez podatku) AmountOfBillsByMonthHT=Kwota faktur przez miesiąc (netto) -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=Zezwól na fakturę sytuacyjną +UseSituationInvoicesCreditNote=Zezwalaj na fakturę faktury korygującej sytuację +Retainedwarranty=Zachowana gwarancja +AllowedInvoiceForRetainedWarranty=Zachowana gwarancja, którą można wykorzystać na następujących rodzajach faktur +RetainedwarrantyDefaultPercent=Zachowany domyślny procent gwarancji +RetainedwarrantyOnlyForSituation=Udostępnij „gwarancję zatrzymaną” tylko dla faktur sytuacyjnych +RetainedwarrantyOnlyForSituationFinal=W przypadku faktur sytuacyjnych globalne potrącenie z tytułu „zatrzymanej gwarancji” ma zastosowanie tylko do sytuacji końcowej +ToPayOn=Aby zapłacić na %s +toPayOn=zapłacić na %s +RetainedWarranty=Zachowana gwarancja +PaymentConditionsShortRetainedWarranty=Zachowane warunki płatności gwarancyjnych +DefaultPaymentConditionsRetainedWarranty=Domyślne zachowane warunki płatności gwarancyjnej +setPaymentConditionsShortRetainedWarranty=Ustaw zachowane warunki płatności gwarancyjnej +setretainedwarranty=Ustaw zachowaną gwarancję +setretainedwarrantyDateLimit=Ustaw zachowany limit daty gwarancji +RetainedWarrantyDateLimit=Zachowany termin gwarancji +RetainedWarrantyNeed100Percent=Faktura sytuacyjna musi mieć stan postępu 100%%, aby była wyświetlana w formacie PDF AlreadyPaid=Zapłacono AlreadyPaidBack=Zwrócono -AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments) +AlreadyPaidNoCreditNotesNoDeposits=Już zapłacone (bez not kredytowych i zaliczek) Abandoned=Porzucone RemainderToPay=Nieopłacone RemainderToTake=Pozostała kwota do podjęcia -RemainderToPayBack=Remaining amount to refund +RemainderToPayBack=Pozostała kwota do zwrotu Rest=W oczekiwaniu AmountExpected=Kwota twierdził ExcessReceived=Nadmiar otrzymany -ExcessPaid=Excess paid +ExcessPaid=Nadwyżka zapłacona EscompteOffered=Rabat oferowane (płatność przed kadencji) EscompteOfferedShort=Rabat SendBillRef=Złożenie faktury% s @@ -250,21 +253,21 @@ RemainderToBill=Pozostająca do rachunku SendBillByMail=Wyślij fakturę pocztą e-mail SendReminderBillByMail=Wyślij przypomnienie pocztą e-mail RelatedCommercialProposals=Podobne oferty handlowe -RelatedRecurringCustomerInvoices=Related recurring customer invoices +RelatedRecurringCustomerInvoices=Powiązane powtarzające się faktury klientów MenuToValid=Do ważnych -DateMaxPayment=Payment due on +DateMaxPayment=Termin płatności: DateInvoice=Daty wystawienia faktury -DatePointOfTax=Point of tax +DatePointOfTax=Punkt podatkowy NoInvoice=Nr faktury ClassifyBill=Klasyfikacja faktury -SupplierBillsToPay=Unpaid vendor invoices +SupplierBillsToPay=Niezapłacone faktury od dostawcy CustomerBillsUnpaid=Niezapłacone faktury klienta NonPercuRecuperable=Niepodlegające zwrotowi -SetConditions=Set Payment Terms -SetMode=Set Payment Type -SetRevenuStamp=Set revenue stamp +SetConditions=Ustaw warunki płatności +SetMode=Ustaw typ płatności +SetRevenuStamp=Ustaw znaczek skarbowy Billed=Billed -RecurringInvoices=Recurring invoices +RecurringInvoices=Faktury cykliczne RepeatableInvoice=Szablon faktury RepeatableInvoices=Szablon faktur Repeatable=Szablon @@ -272,15 +275,15 @@ Repeatables=Szablony ChangeIntoRepeatableInvoice=Konwersja do szablonu faktury CreateRepeatableInvoice=Tworzenie szablonu faktury CreateFromRepeatableInvoice=Utwórz z szablonu faktury -CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details +CustomersInvoicesAndInvoiceLines=Faktury dla klientów i dane do faktur CustomersInvoicesAndPayments=Faktury i płatności klienta -ExportDataset_invoice_1=Customer invoices and invoice details +ExportDataset_invoice_1=Faktury dla klientów i dane do faktur ExportDataset_invoice_2=Faktury i płatności klienta ProformaBill=Proforma Bill: Reduction=Rabat -ReductionShort=Disc. +ReductionShort=Dysk. Reductions=Rabaty -ReductionsShort=Disc. +ReductionsShort=Dysk. Discounts=Zniżki AddDiscount=Stwórz zniżkę AddRelativeDiscount=Utwórz powiązaną zniżkę @@ -289,113 +292,114 @@ AddGlobalDiscount=Dodaj zniżki EditGlobalDiscounts=Edytuj bezwzględne zniżki AddCreditNote=Tworzenie noty kredytowej ShowDiscount=Pokaż zniżki -ShowReduc=Show the discount -ShowSourceInvoice=Show the source invoice +ShowReduc=Pokaż zniżkę +ShowSourceInvoice=Pokaż fakturę źródłową RelativeDiscount=Powiązana zniżka GlobalDiscount=Globalne zniżki CreditNote=Nota kredytowa CreditNotes=Noty kredytowe -CreditNotesOrExcessReceived=Credit notes or excess received +CreditNotesOrExcessReceived=Otrzymane noty kredytowe lub nadwyżka Deposit=Zaliczka Deposits=Zaliczki DiscountFromCreditNote=Rabat od kredytu pamiętać %s DiscountFromDeposit=Zaliczki z faktury %s -DiscountFromExcessReceived=Payments in excess of invoice %s -DiscountFromExcessPaid=Payments in excess of invoice %s +DiscountFromExcessReceived=Płatności przekraczające fakturę %s +DiscountFromExcessPaid=Płatności przekraczające fakturę %s AbsoluteDiscountUse=Tego rodzaju kredyt może być użyta na fakturze przed jej zatwierdzeniem -CreditNoteDepositUse=Invoice must be validated to use this kind of credits +CreditNoteDepositUse=Faktura musi zostać zweryfikowana, aby móc korzystać z tego rodzaju kredytów NewGlobalDiscount=Nowe zniżki NewRelativeDiscount=Nowa powiązana zniżka -DiscountType=Discount type +DiscountType=Rodzaj rabatu NoteReason=Uwaga/Powód ReasonDiscount=Powód DiscountOfferedBy=Przyznane przez -DiscountStillRemaining=Discounts or credits available -DiscountAlreadyCounted=Discounts or credits already consumed -CustomerDiscounts=Customer discounts -SupplierDiscounts=Vendors discounts +DiscountStillRemaining=Dostępne rabaty lub kredyty +DiscountAlreadyCounted=Zniżki lub kredyty już wykorzystane +CustomerDiscounts=Rabaty dla klientów +SupplierDiscounts=Sprzedawcy rabaty BillAddress=Bill adres -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) +HelpEscompte=Rabat ten jest rabatem udzielonym klientowi, ponieważ płatność została dokonana przed terminem. +HelpAbandonBadCustomer=Ta kwota została porzucona (klient powiedział, że jest złym klientem) i jest uważana za wyjątkową stratę. +HelpAbandonOther=Ta kwota została porzucona, ponieważ był to błąd (na przykład zły klient lub faktura zastąpiona inną) IdSocialContribution=ID płatności składki ZUS/podatku PaymentId=ID Płatności -PaymentRef=Payment ref. +PaymentRef=Ref. Płatności InvoiceId=ID Faktury InvoiceRef=Nr referencyjny faktury InvoiceDateCreation=Data utworzenia faktury InvoiceStatus=Status faktury InvoiceNote=Notatka do faktury InvoicePaid=Faktura zapłacona -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 +InvoicePaidCompletely=Całkowicie opłacony +InvoicePaidCompletelyHelp=Faktura opłacona w całości. Nie obejmuje to faktur, które są opłacone częściowo. Aby uzyskać listę wszystkich faktur „zamkniętych” lub „niezamkniętych”, użyj filtru statusu faktury. +OrderBilled=Zamówienie zafakturowane +DonationPaid=Wpłacono darowiznę PaymentNumber=Numer płatności RemoveDiscount=Usuń zniżki WatermarkOnDraftBill=Znak wodny na szkicu faktury (brak jeżeli pusty) InvoiceNotChecked=Nie wybrano faktury ConfirmCloneInvoice=Czy jesteś pewien, że chcesz powielić tą fakturę <b>%s</b>? DisabledBecauseReplacedInvoice=Działania wyłączone, ponieważ na fakturze została zastąpiona -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 +DescTaxAndDividendsArea=W tym obszarze prezentowane jest podsumowanie wszystkich płatności dokonanych na wydatki specjalne. Uwzględniono tutaj tylko rekordy z płatnościami w ciągu ustalonego roku. +NbOfPayments=Liczba płatności SplitDiscount=Split zniżki w dwóch -ConfirmSplitDiscount=Are you sure you want to split this discount of <b>%s</b> %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. +ConfirmSplitDiscount=Czy na pewno chcesz podzielić ten rabat <b> %s </b> %s na dwa mniejsze rabaty? +TypeAmountOfEachNewDiscount=Kwota wejściowa dla każdej z dwóch części: +TotalOfTwoDiscountMustEqualsOriginal=Suma dwóch nowych rabatów musi być równa pierwotnej kwocie rabatu. ConfirmRemoveDiscount=Czy jesteś pewien, że chcesz usunąć tą zniżkę? RelatedBill=Powiązana faktura RelatedBills=Powiązane faktury RelatedCustomerInvoices=Powiązane z: faktury klienta -RelatedSupplierInvoices=Related vendor invoices +RelatedSupplierInvoices=Powiązane faktury od dostawców LatestRelatedBill=Ostatnie powiązane faktury -WarningBillExist=Warning, one or more invoices already exist +WarningBillExist=Ostrzeżenie, istnieje już co najmniej jedna faktura MergingPDFTool=Narzędzie do dzielenia PDF -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 -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 +AmountPaymentDistributedOnInvoice=Kwota płatności rozłożona na fakturze +PaymentOnDifferentThirdBills=Zezwalaj na płatności na różnych rachunkach stron trzecich, ale tej samej firmie macierzystej +PaymentNote=Nota płatnicza +ListOfPreviousSituationInvoices=Lista faktur z poprzedniej sytuacji +ListOfNextSituationInvoices=Lista faktur za następną sytuację +ListOfSituationInvoices=Lista faktur sytuacyjnych +CurrentSituationTotal=Całkowita aktualna sytuacja +DisabledBecauseNotEnouthCreditNote=Aby usunąć fakturę sytuacyjną z cyklu, suma faktury korygującej musi obejmować sumę tej faktury +RemoveSituationFromCycle=Usuń tę fakturę z cyklu +ConfirmRemoveSituationFromCycle=Usunąć tę fakturę %s z cyklu? +ConfirmOuting=Potwierdź wyjazd FrequencyPer_d=Co %s dni FrequencyPer_m=Co %s miesięcy FrequencyPer_y=Co %s lat -FrequencyUnit=Frequency unit -toolTipFrequency=Examples:<br><b>Set 7, Day</b>: give a new invoice every 7 days<br><b>Set 3, Month</b>: give a new invoice every 3 month -NextDateToExecution=Date for next invoice generation -NextDateToExecutionShort=Date next gen. -DateLastGeneration=Date of latest generation -DateLastGenerationShort=Date latest gen. -MaxPeriodNumber=Max. number of invoice generation -NbOfGenerationDone=Number of invoice generation already done -NbOfGenerationDoneShort=Number of generation done -MaxGenerationReached=Maximum number of generations reached -InvoiceAutoValidate=Validate invoices automatically -GeneratedFromRecurringInvoice=Generated from template recurring invoice %s -DateIsNotEnough=Date not reached yet -InvoiceGeneratedFromTemplate=Invoice %s generated from recurring template invoice %s -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 +FrequencyUnit=Jednostka częstotliwości +toolTipFrequency=Przykłady: <br> <b> Zestaw 7, dzień </b>: wystawiaj nową fakturę co 7 dni <br> <b> Zestaw 3, miesiąc </b>: wystaw nową fakturę co 3 dni +NextDateToExecution=Data następnego wygenerowania faktury +NextDateToExecutionShort=Data następnego gen. +DateLastGeneration=Data najnowszej generacji +DateLastGenerationShort=Data najnowszej gen. +MaxPeriodNumber=Maks. liczba generowanych faktur +NbOfGenerationDone=Liczba już wygenerowanych faktur +NbOfGenerationOfRecordDone=Liczba wygenerowanych już rekordów +NbOfGenerationDoneShort=Liczba wykonanych generacji +MaxGenerationReached=Osiągnięto maksymalną liczbę pokoleń +InvoiceAutoValidate=Automatycznie weryfikuj faktury +GeneratedFromRecurringInvoice=Wygenerowano z szablonu fakturę cykliczną %s +DateIsNotEnough=Termin jeszcze nie minął +InvoiceGeneratedFromTemplate=Faktura %s wygenerowana z cyklicznej faktury szablonowej %s +GeneratedFromTemplate=Wygenerowano z szablonu faktury %s +WarningInvoiceDateInFuture=Uwaga, data faktury jest późniejsza niż data bieżąca +WarningInvoiceDateTooFarInFuture=Uwaga, data faktury jest zbyt odległa od aktualnej daty ViewAvailableGlobalDiscounts=Pokaż dostępne zniżki -GroupPaymentsByModOnReports=Group payments by mode on reports +GroupPaymentsByModOnReports=Grupuj płatności według trybu na raportach # PaymentConditions Statut=Status -PaymentConditionShortRECEP=Due Upon Receipt -PaymentConditionRECEP=Due Upon Receipt +PaymentConditionShortRECEP=Wymagane przy odbiorze +PaymentConditionRECEP=Wymagane przy odbiorze PaymentConditionShort30D=30 dni PaymentCondition30D=30 dni -PaymentConditionShort30DENDMONTH=30 days of month-end -PaymentCondition30DENDMONTH=Within 30 days following the end of the month +PaymentConditionShort30DENDMONTH=30 dni końca miesiąca +PaymentCondition30DENDMONTH=W ciągu 30 dni od końca miesiąca PaymentConditionShort60D=60 dni PaymentCondition60D=60 dni -PaymentConditionShort60DENDMONTH=60 days of month-end -PaymentCondition60DENDMONTH=Within 60 days following the end of the month +PaymentConditionShort60DENDMONTH=60 dni końca miesiąca +PaymentCondition60DENDMONTH=W ciągu 60 dni od końca miesiąca PaymentConditionShortPT_DELIVERY=Przy dostawie PaymentConditionPT_DELIVERY=Przy dostawie PaymentConditionShortPT_ORDER=Zamówienie @@ -404,52 +408,52 @@ PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50 %% z góry, 50%% przy dostawie PaymentConditionShort10D=10 dni PaymentCondition10D=10 dni -PaymentConditionShort10DENDMONTH=10 days of month-end -PaymentCondition10DENDMONTH=Within 10 days following the end of the month +PaymentConditionShort10DENDMONTH=10 dni końca miesiąca +PaymentCondition10DENDMONTH=W ciągu 10 dni od końca miesiąca PaymentConditionShort14D=14 dni PaymentCondition14D=14 dni -PaymentConditionShort14DENDMONTH=14 days of month-end -PaymentCondition14DENDMONTH=Within 14 days following the end of the month -FixAmount=Fixed amount - 1 line with label '%s' +PaymentConditionShort14DENDMONTH=14 dni końca miesiąca +PaymentCondition14DENDMONTH=W ciągu 14 dni od końca miesiąca +FixAmount=Stała kwota - 1 wiersz z etykietą „%s” VarAmount=Zmienna ilość (%% tot.) -VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountOneLine=Zmienna kwota (%% tot.) - 1 wiersz z etykietą '%s' +VarAmountAllLines=Kwota zmienna (%% tot.) - wszystkie wiersze od początku # PaymentType PaymentTypeVIR=Przelew bankowy PaymentTypeShortVIR=Przelew bankowy -PaymentTypePRE=Direct debit payment order -PaymentTypeShortPRE=Debit payment order +PaymentTypePRE=Polecenie zapłaty +PaymentTypeShortPRE=Polecenie zapłaty PaymentTypeLIQ=Gotówka PaymentTypeShortLIQ=Gotówka PaymentTypeCB=Karta kredytowa PaymentTypeShortCB=Karta kredytowa PaymentTypeCHQ=Czek PaymentTypeShortCHQ=Czek -PaymentTypeTIP=TIP (Documents against Payment) -PaymentTypeShortTIP=TIP Payment -PaymentTypeVAD=Online payment -PaymentTypeShortVAD=Online payment -PaymentTypeTRA=Bank draft +PaymentTypeTIP=WSKAZÓWKA (dokumenty za opłatą) +PaymentTypeShortTIP=WSKAZÓWKA Płatność +PaymentTypeVAD=Płatność online +PaymentTypeShortVAD=Płatność online +PaymentTypeTRA=Przekaz bankowy PaymentTypeShortTRA=Szkic PaymentTypeFAC=Współczynnik PaymentTypeShortFAC=Współczynnik BankDetails=Szczegóły banku BankCode=Kod banku -DeskCode=Branch code +DeskCode=Kod oddziału BankAccountNumber=Numer konta -BankAccountNumberKey=Checksum +BankAccountNumberKey=Suma kontrolna Residence=Adres -IBANNumber=IBAN account number +IBANNumber=Numer konta IBAN IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN klienta +SupplierIBAN=IBAN dostawcy BIC=BIC/SWIFT -BICNumber=BIC/SWIFT code +BICNumber=Kod BIC / SWIFT ExtraInfos=Dodatkowe informacje RegulatedOn=Regulowane ChequeNumber=Czek N ChequeOrTransferNumber=Cheque / Transferu N -ChequeBordereau=Check schedule +ChequeBordereau=Sprawdź harmonogram ChequeMaker=Sprawdź nadajnik / transferu ChequeBank=Bank czek CheckBank=Sprawdź @@ -458,120 +462,130 @@ PhoneNumber=Tel FullPhoneNumber=Telefon TeleFax=Faks PrettyLittleSentence=Akceptuję kwotę płatności przez czeki wystawione w imię moje jako członek rachunkowości stowarzyszenia zatwierdzone przez administracji podatkowej. -IntracommunityVATNumber=Intra-Community VAT ID -PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to -PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to +IntracommunityVATNumber=Wewnątrzwspólnotowy identyfikator VAT +PaymentByChequeOrderedTo=Płatności czekiem (w tym podatek) są płatne na adres %s, wyślij na adres +PaymentByChequeOrderedToShort=Płatności czekiem (z podatkiem) są płatne na konto SendTo=wysłane do -PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account +PaymentByTransferOnThisBankAccount=Płatność przelewem na poniższe konto bankowe VATIsNotUsedForInvoice=* Nie dotyczy sztuki VAT-293B z CGI LawApplicationPart1=Poprzez stosowanie prawa 80,335 do 12/05/80 LawApplicationPart2=towary pozostają własnością -LawApplicationPart3=the seller until full payment of +LawApplicationPart3=sprzedający do pełnej zapłaty kwoty LawApplicationPart4=ich ceny. LimitedLiabilityCompanyCapital=SARL z Stolicy UseLine=Zastosować UseDiscount=Użyj zniżki UseCredit=Wykorzystaj kredyt UseCreditNoteInInvoicePayment=Zmniejszenie płatności z tego nota kredytowa -MenuChequeDeposits=Check Deposits +MenuChequeDeposits=Sprawdź depozyty MenuCheques=Czeki -MenuChequesReceipts=Check receipts +MenuChequesReceipts=Sprawdź paragony NewChequeDeposit=Nowy depozyt -ChequesReceipts=Check receipts -ChequesArea=Check deposits area -ChequeDeposits=Check deposits +ChequesReceipts=Sprawdź paragony +ChequesArea=Sprawdź obszar depozytów +ChequeDeposits=Sprawdź depozyty Cheques=Czeki DepositId=ID depozytu NbCheque=Ilość czeków -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 +CreditNoteConvertedIntoDiscount=Ten %s został przekształcony w %s +UsBillingContactAsIncoiveRecipientIfExist=Jako odbiorcę faktur użyj kontaktu / adresu z typem „osoba kontaktowa ds. Rozliczeń” zamiast adresu strony trzeciej ShowUnpaidAll=Pokaż wszystkie niezapłacone faktury ShowUnpaidLateOnly=Pokaż późno unpaid fakturze tylko PaymentInvoiceRef=Płatność faktury %s ValidateInvoice=Zatwierdź fakturę -ValidateInvoices=Validate invoices +ValidateInvoices=Zatwierdź faktury Cash=Gotówka Reported=Opóźniony DisabledBecausePayments=Nie możliwe, ponieważ istnieją pewne płatności CantRemovePaymentWithOneInvoicePaid=Nie można usunąć płatności, ponieważ istnieje przynajmniej na fakturze sklasyfikowane płatne +CantRemovePaymentVATPaid=Nie można usunąć płatności, ponieważ deklaracja VAT jest klasyfikowana jako zapłacona +CantRemovePaymentSalaryPaid=Nie można usunąć płatności, ponieważ wynagrodzenie jest klasyfikowane jako zapłacone ExpectedToPay=Oczekuje płatności -CantRemoveConciliatedPayment=Can't remove reconciled payment +CantRemoveConciliatedPayment=Nie można usunąć uzgodnionej płatności PayedByThisPayment=Wypłacana przez płatność -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". +ClosePaidInvoicesAutomatically=Automatycznie klasyfikuj wszystkie faktury standardowe, zaliczkowe lub zastępcze jako „Opłacone”, gdy płatność jest wykonana w całości. +ClosePaidCreditNotesAutomatically=Gdy zwrot środków zostanie wykonany w całości, automatycznie klasyfikuj wszystkie noty kredytowe jako „Zapłacone”. +ClosePaidContributionsAutomatically=Automatycznie klasyfikuj wszystkie składki na ubezpieczenie społeczne lub fiskalne jako „opłacone”, gdy płatność została dokonana w całości. +ClosePaidVATAutomatically=Sklasyfikuj automatycznie deklarację VAT jako „Zapłacono”, gdy płatność została wykonana w całości. +ClosePaidSalaryAutomatically=Automatycznie klasyfikuj wynagrodzenie jako „Zapłacone”, gdy płatność jest wykonana w całości. +AllCompletelyPayedInvoiceWillBeClosed=Wszystkie faktury, które nie pozostały do zapłaty, zostaną automatycznie zamknięte ze statusem „Zapłacone”. ToMakePayment=Płacić ToMakePaymentBack=Spłacać ListOfYourUnpaidInvoices=Lista niezapłaconych faktur NoteListOfYourUnpaidInvoices=Uwaga: Ta lista zawiera tylko faktury dla osób trzecich jesteś powiązanych jako przedstawiciel sprzedaży. -RevenueStamp=Tax stamp -YouMustCreateInvoiceFromThird=This option is only available when creating an invoice from tab "Customer" of third party -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) -PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template -PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Zwróć numer w formacie %srrmm-nnnn dla standardowych faktur i %srrmm-nnnn dla not kredytowych, gdzie rr oznacza rok, mm to miesiąc, a nnnn to kolejny niepowtarzalny numer rozpoczynający się od 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +RevenueStamp=Pieczęć podatkowa +YouMustCreateInvoiceFromThird=Ta opcja jest dostępna tylko podczas tworzenia faktury z zakładki „Klient” strony trzeciej +YouMustCreateInvoiceFromSupplierThird=Ta opcja jest dostępna tylko podczas tworzenia faktury z zakładki „Dostawca” strony trzeciej +YouMustCreateStandardInvoiceFirstDesc=Najpierw musisz utworzyć standardową fakturę i przekonwertować ją na „szablon”, aby utworzyć nowy szablon faktury +PDFCrabeDescription=Szablon faktury PDF Crabe. Kompletny szablon faktury (stara implementacja szablonu Sponge) +PDFSpongeDescription=Szablon faktury PDF Gąbka. Kompletny szablon faktury +PDFCrevetteDescription=Szablon faktury PDF Crevette. Kompletny szablon faktury dla faktur sytuacyjnych +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Rachunek zaczynające się od $ syymm już istnieje i nie jest kompatybilne z tym modelem sekwencji. Usuń go lub zmienić jego nazwę, aby włączyć ten moduł. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +EarlyClosingReason=Powód wcześniejszego zamknięcia +EarlyClosingComment=Uwaga dotycząca wczesnego zamknięcia ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Przedstawiciela w ślad za klienta faktura TypeContact_facture_external_BILLING=kontakt faktury klienta TypeContact_facture_external_SHIPPING=kontakt koszty klientów TypeContact_facture_external_SERVICE=kontakt z działem obsługi klienta -TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up vendor invoice +TypeContact_invoice_supplier_internal_SALESREPFOLL=Reprezentatywna kolejna faktura dostawcy TypeContact_invoice_supplier_external_BILLING=Kontakt do faktury sprzedawcy TypeContact_invoice_supplier_external_SHIPPING=Kontakt z dostawcą -TypeContact_invoice_supplier_external_SERVICE=Vendor service contact +TypeContact_invoice_supplier_external_SERVICE=Kontakt serwisowy dostawcy # Situation invoices InvoiceFirstSituationAsk=Pierwsza faktura sytuacja InvoiceFirstSituationDesc=<b>Faktury sytuacji,</b> są związane z sytuacji związanych z progresją np postęp budowy. Każda sytuacja jest związana z fakturą. InvoiceSituation=Sytuacja na fakturze +PDFInvoiceSituation=Sytuacja na fakturze InvoiceSituationAsk=Faktura następujących sytuacji InvoiceSituationDesc=Utwórz nową sytuację po już istniejącej SituationAmount=Kwota Sytuacja faktury (netto) SituationDeduction=Sytuacja odejmowanie ModifyAllLines=Modyfikuj wszystkie linie CreateNextSituationInvoice=Tworzenie kolejnej sytuacji -ErrorFindNextSituationInvoice=Error unable to find next situation cycle ref -ErrorOutingSituationInvoiceOnUpdate=Unable to outing this situation invoice. -ErrorOutingSituationInvoiceCreditNote=Unable to outing linked credit note. -NotLastInCycle=This invoice is not the latest in cycle and must not be modified. +ErrorFindNextSituationInvoice=Błąd nie można znaleźć następnego cyklu sytuacji ref +ErrorOutingSituationInvoiceOnUpdate=Nie można wystawić faktury za tę sytuację. +ErrorOutingSituationInvoiceCreditNote=Nie można wystawić połączonej noty kredytowej. +NotLastInCycle=Ta faktura nie jest najnowszą z cyklu i nie można jej modyfikować. DisabledBecauseNotLastInCycle=Następna sytuacja już istnieje. DisabledBecauseFinal=Sytuacja ta jest ostateczna. -situationInvoiceShortcode_AS=AS +situationInvoiceShortcode_AS=TAK JAK situationInvoiceShortcode_S=Ni CantBeLessThanMinPercent=Postęp nie może być mniejsza niż wartość w poprzedniej sytuacji. NoSituations=Brak otwartych sytuacji InvoiceSituationLast=Ostatnia i główna faktura -PDFCrevetteSituationNumber=Situation N°%s -PDFCrevetteSituationInvoiceLineDecompte=Situation invoice - COUNT +PDFCrevetteSituationNumber=Sytuacja nr %s +PDFCrevetteSituationInvoiceLineDecompte=Faktura sytuacyjna - COUNT PDFCrevetteSituationInvoiceTitle=Sytuacja na fakturze -PDFCrevetteSituationInvoiceLine=Situation N°%s: Inv. N°%s on %s -TotalSituationInvoice=Total situation -invoiceLineProgressError=Invoice line progress can't be greater than or equal to the next invoice line -updatePriceNextInvoiceErrorUpdateline=Error: update price on invoice line: %s -ToCreateARecurringInvoice=To create a recurring invoice for this contract, first create this draft invoice, then convert it into an invoice template and define the frequency for generation of future invoices. -ToCreateARecurringInvoiceGene=To generate future invoices regularly and manually, just go on menu <strong>%s - %s - %s</strong>. -ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated automatically, ask your administrator to enable and setup module <strong>%s</strong>. Note that both methods (manual and automatic) can be used together with no risk of duplication. +PDFCrevetteSituationInvoiceLine=Sytuacja nr %s: Inv. Nr %s na %s +TotalSituationInvoice=Sytuacja całkowita +invoiceLineProgressError=Postęp wiersza faktury nie może być większy lub równy następnemu wierszowi faktury +updatePriceNextInvoiceErrorUpdateline=Błąd: zaktualizuj cenę w wierszu faktury: %s +ToCreateARecurringInvoice=Aby utworzyć fakturę cykliczną dla tej umowy, najpierw utwórz tę wersję roboczą faktury, a następnie przekształć ją w szablon faktury i zdefiniuj częstotliwość generowania przyszłych faktur. +ToCreateARecurringInvoiceGene=Aby regularnie i ręcznie generować przyszłe faktury, po prostu przejdź do menu <strong> %s - %s - %s </strong>. +ToCreateARecurringInvoiceGeneAuto=Jeśli chcesz, aby takie faktury były generowane automatycznie, poproś administratora o włączenie i skonfigurowanie modułu <strong> %s </strong>. Należy pamiętać, że obie metody (ręczna i automatyczna) mogą być używane razem bez ryzyka powielania. DeleteRepeatableInvoice=Usuń szablon faktury -ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? -CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created -StatusOfGeneratedDocuments=Status of document generation -DoNotGenerateDoc=Do not generate document file -AutogenerateDoc=Auto generate document file -AutoFillDateFrom=Set start date for service line with invoice date -AutoFillDateFromShort=Set start date -AutoFillDateTo=Set end date for service line with next invoice date -AutoFillDateToShort=Set end date -MaxNumberOfGenerationReached=Max number of gen. reached +ConfirmDeleteRepeatableInvoice=Czy na pewno chcesz usunąć fakturę z szablonu? +CreateOneBillByThird=Utwórz jedną fakturę na osobę trzecią (w przeciwnym razie jedna faktura na zamówienie) +BillCreated=Wygenerowano faktury %s +BillXCreated=Wygenerowano fakturę %s +StatusOfGeneratedDocuments=Status generowania dokumentu +DoNotGenerateDoc=Nie generuj pliku dokumentu +AutogenerateDoc=Automatycznie generuj plik dokumentu +AutoFillDateFrom=Ustaw datę rozpoczęcia linii serwisowej z datą faktury +AutoFillDateFromShort=Ustaw datę rozpoczęcia +AutoFillDateTo=Ustaw datę zakończenia linii serwisowej z następną datą faktury +AutoFillDateToShort=Ustaw datę zakończenia +MaxNumberOfGenerationReached=Maksymalna liczba gen. osiągnął BILL_DELETEInDolibarr=Faktura usunięta -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +BILL_SUPPLIER_DELETEInDolibarr=Faktura dostawcy została usunięta +UnitPriceXQtyLessDiscount=Cena jednostkowa x ilość - rabat +CustomersInvoicesArea=Obszar rozliczeniowy klienta +SupplierInvoicesArea=Obszar rozliczeniowy dostawcy +FacParentLine=Element nadrzędny linii faktury +SituationTotalRayToRest=Pozostała kwota do zapłaty bez podatku +PDFSituationTitle=Sytuacja nr %d +SituationTotalProgress=Całkowity postęp %d %% diff --git a/htdocs/langs/pl_PL/boxes.lang b/htdocs/langs/pl_PL/boxes.lang index 7dd168a0e77..f7873c1874d 100644 --- a/htdocs/langs/pl_PL/boxes.lang +++ b/htdocs/langs/pl_PL/boxes.lang @@ -1,111 +1,120 @@ # Dolibarr language file - Source file is en_US - boxes -BoxLoginInformation=Login Information -BoxLastRssInfos=RSS Information -BoxLastProducts=Latest %s Products/Services +BoxDolibarrStateBoard=Statystyki dotyczące głównych obiektów biznesowych w bazie danych +BoxLoginInformation=dane logowania +BoxLastRssInfos=Informacje RSS +BoxLastProducts=Najnowsze %s Produkty / usługi BoxProductsAlertStock=Alarm zapasu dla artykułów BoxLastProductsInContract=Ostatnie %s zlecone produkty/usługi -BoxLastSupplierBills=Latest Vendor invoices -BoxLastCustomerBills=Latest Customer invoices +BoxLastSupplierBills=Najnowsze faktury od dostawców +BoxLastCustomerBills=Najnowsze faktury dla klientów BoxOldestUnpaidCustomerBills=Najstarsze niezapłacone faktury klientów -BoxOldestUnpaidSupplierBills=Oldest unpaid vendor invoices +BoxOldestUnpaidSupplierBills=Najstarsze niezapłacone faktury od dostawców BoxLastProposals=Ostatnie propozycje handlowe BoxLastProspects=Ostatnio zmodyfikowane perspektywy BoxLastCustomers=Ostatni modyfikowani klienci BoxLastSuppliers=Ostatni modyfikowani dostawcy -BoxLastCustomerOrders=Latest sales orders +BoxLastCustomerOrders=Najnowsze zamówienia sprzedaży BoxLastActions=Ostatnie zdarzenia BoxLastContracts=Ostatnie kontrakty BoxLastContacts=Ostatnie kontakty/adresy BoxLastMembers=Ostatni członkowie +BoxLastModifiedMembers=Ostatnio zmodyfikowani członkowie +BoxLastMembersSubscriptions=Najnowsze subskrypcje członków BoxFicheInter=Ostatnie interwencje BoxCurrentAccounts=Otwórz bilans konta -BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMemberNextBirthdays=Urodziny w tym miesiącu (członkowie) +BoxTitleMembersByType=Członkowie według typu +BoxTitleMembersSubscriptionsByYear=Subskrypcje członków według roku BoxTitleLastRssInfos=Ostatnie %s wiadomości z %s -BoxTitleLastProducts=Products/Services: last %s modified -BoxTitleProductsAlertStock=Products: stock alert +BoxTitleLastProducts=Produkty / usługi: ostatnio zmodyfikowano %s +BoxTitleProductsAlertStock=Produkty: alert zapasów BoxTitleLastSuppliers=Ostani %s zapisani dostawcy -BoxTitleLastModifiedSuppliers=Vendors: last %s modified -BoxTitleLastModifiedCustomers=Customers: last %s modified +BoxTitleLastModifiedSuppliers=Sprzedawcy: ostatnio zmodyfikowano %s +BoxTitleLastModifiedCustomers=Klienci: ostatnio zmodyfikowano %s BoxTitleLastCustomersOrProspects=Ostatnich %s klientów lub potencjalnych klientów -BoxTitleLastCustomerBills=Latest %s modified Customer invoices -BoxTitleLastSupplierBills=Latest %s modified Vendor invoices -BoxTitleLastModifiedProspects=Prospects: last %s modified +BoxTitleLastCustomerBills=Najnowsze %s zmodyfikowane faktury klienta +BoxTitleLastSupplierBills=Najnowsze %s zmodyfikowane faktury od dostawcy +BoxTitleLastModifiedProspects=Perspektywy: ostatnio zmodyfikowano %s BoxTitleLastModifiedMembers=Ostatnich %s członków BoxTitleLastFicheInter=Ostatnie %s zmodyfikowane interwencje -BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid -BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid -BoxTitleCurrentAccounts=Open Accounts: balances -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception -BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified -BoxMyLastBookmarks=Bookmarks: latest %s +BoxTitleOldestUnpaidCustomerBills=Faktury odbiorcy: najstarsze %s niezapłacone +BoxTitleOldestUnpaidSupplierBills=Faktury od dostawców: najstarsze %s niezapłacone +BoxTitleCurrentAccounts=Otwarte konta: salda +BoxTitleSupplierOrdersAwaitingReception=Zamówienia dostawców oczekujące na przyjęcie +BoxTitleLastModifiedContacts=Kontakty / adresy: ostatnio zmodyfikowano %s +BoxMyLastBookmarks=Zakładki: najnowsze %s BoxOldestExpiredServices=Najstarsze aktywne przeterminowane usługi BoxLastExpiredServices=Ostanich %s najstarszych kontaktów z aktywnymi upływającymi usługami BoxTitleLastActionsToDo=Ostatnich %s zadań do zrobienia BoxTitleLastContracts=Ostatnich %s zmodyfikowanych kontaktów BoxTitleLastModifiedDonations=Ostatnich %s zmodyfikowanych dotacji BoxTitleLastModifiedExpenses=Ostatnich %s zmodyfikowanych raportów kosztów -BoxTitleLatestModifiedBoms=Latest %s modified BOMs -BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders -BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded +BoxTitleLatestModifiedBoms=Najnowsze zmodyfikowane zestawienia komponentów %s +BoxTitleLatestModifiedMos=Najnowsze %s zmodyfikowane zamówienia produkcyjne +BoxTitleLastOutstandingBillReached=Klienci z maksymalną zaległością przekroczeni BoxGlobalActivity=Globalna aktywność (faktury, wnioski, zamówienia) BoxGoodCustomers=Dobrzy klienci BoxTitleGoodCustomers=%s dobrych klientów BoxScheduledJobs=Zaplanowane zadania -BoxTitleFunnelOfProspection=Lead funnel -FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s +BoxTitleFunnelOfProspection=Lejek ołowiu +FailedToRefreshDataInfoNotUpToDate=Nie udało się odświeżyć strumienia RSS. Data ostatniego pomyślnego odświeżenia: %s LastRefreshDate=Data ostatniego odświeżenia NoRecordedBookmarks=Brak zdefiniowanych zakładek ClickToAdd=Kliknij tutaj, aby dodać. NoRecordedCustomers=Brak zarejestrowanych klientów NoRecordedContacts=Brak zapisanych kontaktów NoActionsToDo=Brak działań do wykonania -NoRecordedOrders=No recorded sales orders +NoRecordedOrders=Brak zarejestrowanych zamówień sprzedaży NoRecordedProposals=Brak zarejestrowanych wniosków NoRecordedInvoices=Brak zarejestrowanych faktur klienta NoUnpaidCustomerBills=Brak niezapłaconych faktur klientów -NoUnpaidSupplierBills=No unpaid vendor invoices -NoModifiedSupplierBills=No recorded vendor invoices +NoUnpaidSupplierBills=Brak niezapłaconych faktur od dostawców +NoModifiedSupplierBills=Brak zarejestrowanych faktur od dostawców NoRecordedProducts=Brak zarejestrowanych produktów / usług NoRecordedProspects=Brak potencjalnyc klientów NoContractedProducts=Brak produktów/usług zakontraktowanych NoRecordedContracts=Brak zarejestrowanych kontraktów NoRecordedInterventions=Brak zapisanych interwencji -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 -BoxSuppliersOrdersPerMonth=Vendor Orders per month +BoxLatestSupplierOrders=Najnowsze zamówienia +BoxLatestSupplierOrdersAwaitingReception=Najnowsze zamówienia (z oczekującym odbiorem) +NoSupplierOrder=Brak zarejestrowanego zamówienia +BoxCustomersInvoicesPerMonth=Faktury dla klientów miesięcznie +BoxSuppliersInvoicesPerMonth=Faktury od dostawców miesięcznie +BoxCustomersOrdersPerMonth=Zamówienia sprzedaży miesięcznie +BoxSuppliersOrdersPerMonth=Zamówienia dostawców miesięcznie BoxProposalsPerMonth=Ofert na miesiąc -NoTooLowStockProducts=No products are under the low stock limit -BoxProductDistribution=Products/Services Distribution -ForObject=On %s -BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified -BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified -BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified -BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified +NoTooLowStockProducts=Żadne produkty nie są poniżej niskiego limitu zapasów +BoxProductDistribution=Dystrybucja produktów / usług +ForObject=Na %s +BoxTitleLastModifiedSupplierBills=Faktury od dostawców: ostatnio zmodyfikowano %s +BoxTitleLatestModifiedSupplierOrders=Zamówienia dostawców: ostatnio zmodyfikowano %s +BoxTitleLastModifiedCustomerBills=Faktury klienta: ostatnio zmodyfikowano %s +BoxTitleLastModifiedCustomerOrders=Zamówienia sprzedaży: ostatnio zmodyfikowano %s BoxTitleLastModifiedPropals=Ostatnie %s zmodyfikowane oferty -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Najnowsze zmodyfikowane oferty pracy %s +BoxTitleLatestModifiedCandidatures=Najnowsze zmodyfikowane kandydatury %s ForCustomersInvoices=Faktury Klientów ForCustomersOrders=Zamówienia klientów ForProposals=Oferty LastXMonthRolling=Ostatni %s miesiąc ChooseBoxToAdd=Dodaj widget do swojej tablicy... BoxAdded=Widget został dodany do twojej tablicy -BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document -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 -BoxCustomersOutstandingBillReached=Customers with oustanding limit reached +BoxTitleUserBirthdaysOfMonth=Urodziny w tym miesiącu (użytkownicy) +BoxLastManualEntries=Najnowszy zapis księgowy wprowadzony ręcznie lub bez dokumentu źródłowego +BoxTitleLastManualEntries=%s ostatni rekord wprowadzony ręcznie lub bez dokumentu źródłowego +NoRecordedManualEntries=Brak wpisów ręcznych w księgowości +BoxSuspenseAccount=Policz operacje księgowe z kontem przejściowym +BoxTitleSuspenseAccount=Liczba nieprzydzielonych linii +NumberOfLinesInSuspenseAccount=Liczba linii na koncie przejściowym +SuspenseAccountNotDefined=Konto przejściowe nie jest zdefiniowane +BoxLastCustomerShipments=Ostatnie przesyłki klientów +BoxTitleLastCustomerShipments=Najnowsze przesyłki klientów %s +NoRecordedShipments=Brak zarejestrowanych przesyłek klientów +BoxCustomersOutstandingBillReached=Osiągnięto imponujący limit klientów # Pages -AccountancyHome=Księgowość -ValidatedProjects=Validated projects +UsersHome=Użytkownicy domowi i grupy +MembersHome=Członkostwo domowe +ThirdpartiesHome=Strona główna Osoby trzecie +TicketsHome=Home Bilety +AccountancyHome=Księgowość domowa +ValidatedProjects=Zatwierdzone projekty diff --git a/htdocs/langs/pl_PL/categories.lang b/htdocs/langs/pl_PL/categories.lang index b0372678bc6..61f1d5332cd 100644 --- a/htdocs/langs/pl_PL/categories.lang +++ b/htdocs/langs/pl_PL/categories.lang @@ -10,16 +10,16 @@ modify=modyfikować Classify=Klasyfikacja CategoriesArea=Tagi / obszar Kategorie ProductsCategoriesArea=Produkty / Usługi tagi / obszar kategorie -SuppliersCategoriesArea=Vendors tags/categories area +SuppliersCategoriesArea=Obszar tagów / kategorii dostawców CustomersCategoriesArea=Klienci tagi / obszar kategorie MembersCategoriesArea=Użytkownicy tagi / obszar kategorie ContactsCategoriesArea=Kontakt tagi / obszar kategorie -AccountsCategoriesArea=Obsza tagów / kategorii kont +AccountsCategoriesArea=Obszar tagów / kategorii rachunków bankowych ProjectsCategoriesArea=Obszar tagów / kategorii projektów UsersCategoriesArea=Obszar znaczników/kategorii użytkowników SubCats=Podkategorie CatList=Lista tagów / kategorii -CatListAll=List of tags/categories (all types) +CatListAll=Lista tagów / kategorii (wszystkie typy) NewCategory=Nowy tag / kategoria ModifCat=Modyfikuj tag/kategorię CatCreated=Tag / kategoria stworzona @@ -33,7 +33,7 @@ WasAddedSuccessfully=<b> %s</b> został dodany pomyślnie. ObjectAlreadyLinkedToCategory=Element jest już powiązany z tym tagiem/kategorią. ProductIsInCategories=Produkt/usuługa odnosi się do następujących tagów/kategorii CompanyIsInCustomersCategories=Ten kontrahent jest związany z następującymi kleintami/tagami rozwoju/kategoriami -CompanyIsInSuppliersCategories=This third party is linked to following vendors tags/categories +CompanyIsInSuppliersCategories=Ta strona trzecia jest połączona z następującymi tagami / kategoriami dostawców MemberIsInCategories=Ten członek jest skojarzony z następującymi tagami/kategoriami członków ContactIsInCategories=Ten kontakt odnosi się do następujących tagów/kategorii kontaktów ProductHasNoCategory=Ten produkt/usługa nie jest w żadnym tagu/kategorii @@ -49,11 +49,11 @@ ContentsNotVisibleByAllShort=Treść nie jest widoczna dla wszystkich DeleteCategory=Usuń tag/kategorię ConfirmDeleteCategory=Czy jesteś pewien, że chcesz usunąć ten tag/kategorię? NoCategoriesDefined=Nie zdefiniowano tagu/kategorii -SuppliersCategoryShort=Vendors tag/category +SuppliersCategoryShort=Tag / kategoria dostawcy CustomersCategoryShort=Tag/kategoria klientów ProductsCategoryShort=Tag/kategoria produktu MembersCategoryShort=Tag/kategoria członków -SuppliersCategoriesShort=Vendors tags/categories +SuppliersCategoriesShort=Tagi / kategorie dostawców CustomersCategoriesShort=Tagi/kategorie klientów ProspectsCategoriesShort=Tagi / kategorie potencjalnych klientów CustomersProspectsCategoriesShort=Klienci/potencjalni klienci znaczniki/kategorie @@ -63,37 +63,37 @@ ContactCategoriesShort=Kontakt tagów / kategorii AccountsCategoriesShort=Tagi / kategorie kont ProjectsCategoriesShort=Tagi / kategorie projektów UsersCategoriesShort=Znaczniki/kategorie użytkowników -StockCategoriesShort=Warehouse tags/categories -ThisCategoryHasNoItems=This category does not contain any items. +StockCategoriesShort=Tagi / kategorie magazynowe +ThisCategoryHasNoItems=Ta kategoria nie zawiera żadnych przedmiotów. CategId=Tag / ID kategorii -ParentCategory=Parent tag/category -ParentCategoryLabel=Label of parent tag/category -CatSupList=List of vendors tags/categories -CatCusList=List of customers/prospects tags/categories +ParentCategory=Tag / kategoria nadrzędna +ParentCategoryLabel=Etykieta tagu / kategorii nadrzędnej +CatSupList=Lista tagów / kategorii dostawców +CatCusList=Lista tagów / kategorii klientów / potencjalnych klientów CatProdList=Lista tagów/kategorii produktów CatMemberList=Lista tagów/kategorii członków -CatContactList=List of contacts tags/categories -CatProjectsList=List of projects tags/categories -CatUsersList=List of users tags/categories -CatSupLinks=Links between vendors and tags/categories +CatContactList=Lista tagów / kategorii kontaktów +CatProjectsList=Lista tagów / kategorii projektów +CatUsersList=Lista tagów / kategorii użytkowników +CatSupLinks=Powiązania między dostawcami a tagami / kategoriami CatCusLinks=Powiązania między klientami / perspektyw i tagów / kategorii -CatContactsLinks=Links between contacts/addresses and tags/categories +CatContactsLinks=Powiązania między kontaktami / adresami i tagami / kategoriami CatProdLinks=Powiązania między produktami/usługami i tagami/kategoriami CatMembersLinks=Związki między członkami i tagów / kategorii CatProjectsLinks=Połączenia pomiędzy projektami a tagami / kategoriami -CatUsersLinks=Links between users and tags/categories +CatUsersLinks=Powiązania między użytkownikami a tagami / kategoriami DeleteFromCat=Usuń z tagów/kategorii ExtraFieldsCategories=Atrybuty uzupełniające CategoriesSetup=Tagi / kategorie Konfiguracja CategorieRecursiv=Związek z dominującą tag / kategorii automatycznie -CategorieRecursivHelp=If option is on, when you add a product into a subcategory, product will also be added into the parent category. +CategorieRecursivHelp=Jeśli opcja jest włączona, po dodaniu produktu do podkategorii, produkt zostanie również dodany do kategorii nadrzędnej. AddProductServiceIntoCategory=Dodaj następujący produkt / usługę -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Przypisz kategorię do klienta +AddSupplierIntoCategory=Przypisz kategorię do dostawcy ShowCategory=Pokaż tag / kategoria ByDefaultInList=Domyśłnie na liście ChooseCategory=Wybrane kategorie -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories -WebsitePagesCategoriesArea=Page-Container Categories -UseOrOperatorForCategories=Use or operator for categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories +WebsitePagesCategoriesArea=Kategorie kontenerów stron +UseOrOperatorForCategories=Użyj lub operator dla kategorii diff --git a/htdocs/langs/pl_PL/companies.lang b/htdocs/langs/pl_PL/companies.lang index c5d2714854e..23ec198bec8 100644 --- a/htdocs/langs/pl_PL/companies.lang +++ b/htdocs/langs/pl_PL/companies.lang @@ -24,28 +24,29 @@ ThirdPartyContact=Kontakt/Adres kontrahenta Company=Firma CompanyName=Nazwa firmy AliasNames=Alias (handlowy, znak firmowy, ...) -AliasNameShort=Alias Name +AliasNameShort=Pseudonim Companies=Firmy CountryIsInEEC=Państwo należy do Europejskiej Wspólnoty Gospodarczej -PriceFormatInCurrentLanguage=Price display format in the current language and currency -ThirdPartyName=Third-party name -ThirdPartyEmail=Third-party email -ThirdParty=Third-party -ThirdParties=Third-parties +PriceFormatInCurrentLanguage=Format wyświetlania ceny w aktualnym języku i walucie +ThirdPartyName=Nazwa firmy zewnętrznej +ThirdPartyEmail=E-mail innej firmy +ThirdParty=Firma zewnętrzna +ThirdParties=Kontrahenci ThirdPartyProspects=Potencjalni klienci ThirdPartyProspectsStats=Potencjalni klienci ThirdPartyCustomers=Klienci ThirdPartyCustomersStats=Klienci ThirdPartyCustomersWithIdProf12=Klienci z %s lub %s ThirdPartySuppliers=Dostawcy -ThirdPartyType=Third-party type +ThirdPartyType=Typ firmy zewnętrznej Individual=Osoba prywatna -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. +ToCreateContactWithSameName=Automatycznie utworzy kontakt / adres z tymi samymi informacjami, co strona trzecia w ramach strony trzeciej. W większości przypadków, nawet jeśli Twoja strona trzecia jest osobą fizyczną, wystarczy utworzyć osobę trzecią. ParentCompany=Firma macierzysta Subsidiaries=Oddziały -ReportByMonth=Raport za miesiąc -ReportByCustomers=Report by customer -ReportByQuarter=Raport wg stawek +ReportByMonth=Raport miesięcznie +ReportByCustomers=Raport na klienta +ReportByThirdparties=Zgłoś osobę trzecią +ReportByQuarter=Zgłoś według stawki CivilityCode=Zwrot grzecznościowy RegisteredOffice=Siedziba Lastname=Nazwisko @@ -53,7 +54,7 @@ Firstname=Imię PostOrFunction=Stanowisko UserTitle=Tytuł NatureOfThirdParty=Rodzaj kontrahenta -NatureOfContact=Nature of Contact +NatureOfContact=Charakter kontaktu Address=Adres State=Województwo StateCode=Kod Stanu/Prowincji @@ -71,19 +72,19 @@ Chat=Czat PhonePro=Telefonu służbowy PhonePerso=Telefon prywatny PhoneMobile=Telefon komórkowy -No_Email=Refuse bulk emailings +No_Email=Odrzuć masowe wysyłanie e-maili Fax=Faks Zip=Kod pocztowy Town=Miasto Web=Strona www Poste= Stanowisko DefaultLang=Domyślny język -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 +VATIsUsed=Zastosowany podatek od sprzedaży +VATIsUsedWhenSelling=Określa, czy ta osoba trzecia zawiera podatek od sprzedaży, czy nie, kiedy wystawia fakturę swoim własnym klientom VATIsNotUsed=Nie jest płatnikiem VAT -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 +CopyAddressFromSoc=Skopiuj adres z danych innych firm +ThirdpartyNotCustomerNotSupplierSoNoRef=Osoba trzecia ani klient, ani sprzedawca, brak dostępnych obiektów odsyłających +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Strona trzecia ani klient, ani sprzedawca, rabaty nie są dostępne PaymentBankAccount=Konto bankowe dla płatności OverAllProposals=Propozycje OverAllOrders=Zamówienia @@ -124,7 +125,7 @@ ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-Nr) ProfId3AT=Prof Id 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=Numer EORI ProfId6AT=- ProfId1AU=Prof ID 1 (ABN) ProfId2AU=- @@ -136,7 +137,7 @@ ProfId1BE=Prof ID 1 (Professional number) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=Numer EORI ProfId6BE=- ProfId1BR=- ProfId2BR=IE @@ -148,7 +149,7 @@ ProfId1CH=UID-Nummer ProfId2CH=- ProfId3CH=Prof Id 1 (Federal numer) ProfId4CH=Prof ID 2 (Commercial rekordowa liczba) -ProfId5CH=EORI number +ProfId5CH=Numer EORI ProfId6CH=- ProfId1CL=Prof Id 1 (RUT) ProfId2CL=- @@ -166,20 +167,26 @@ ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof ID 2 (USt. Nr) ProfId3DE=Prof ID 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=Numer EORI ProfId6DE=- ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Id Prof 2 (numer ubezpieczenia społeczne) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Id Prof 4 (liczba Collegiate) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (numer EORI) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof ID 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, stare APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Numer rejestracyjny ProfId2GB=- ProfId3GB=SIC @@ -202,12 +209,13 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=Numer EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Pozwolenie na działalność gospodarczą) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=Numer EORI ProfId6LU=- ProfId1MA=Id prof. 1 (RC) ProfId2MA=Id prof. 2 (Patente) @@ -225,13 +233,13 @@ ProfId1NL=nummer KVK ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId5NL=EORI number +ProfId5NL=Numer EORI ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof ID 2 (numer ubezpieczenia społecznego) ProfId3PT=Prof Id 3 (Commercial rekordowa liczba) ProfId4PT=Prof Id 4 (Konserwatorium) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (numer EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=Ninea @@ -245,7 +253,7 @@ ProfId3TN=Prof Id 3 (Douane code) ProfId4TN=Prof ID 4 (BAN) ProfId5TN=- ProfId6TN=- -ProfId1US=Prof Id (FEIN) +ProfId1US=Identyfikator prof. (FEIN) ProfId2US=- ProfId3US=- ProfId4US=- @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (numer EORI) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -276,25 +284,25 @@ Prospect=Perspektywa CustomerCard=Karta Klienta Customer=Klient CustomerRelativeDiscount=Względny rabat klienta -SupplierRelativeDiscount=Relative vendor discount +SupplierRelativeDiscount=Względna zniżka sprzedawcy CustomerRelativeDiscountShort=Względny rabat CustomerAbsoluteDiscountShort=Bezwzględny rabat CompanyHasRelativeDiscount=Ten klient ma standardowy rabat <b>%s%%</b> CompanyHasNoRelativeDiscount=Ten klient domyślnie nie posiada względnego rabatu -HasRelativeDiscountFromSupplier=You have a default discount of <b>%s%%</b> 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 <b>%s</b> %s -CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for <b>%s</b> %s +HasRelativeDiscountFromSupplier=Masz domyślny rabat <b> %s%% </b> od tego dostawcy +HasNoRelativeDiscountFromSupplier=Nie masz domyślnego rabatu względnego od tego dostawcy +CompanyHasAbsoluteDiscount=Ten klient ma dostępne rabaty (noty kredytowe lub zaliczki) dla <b> %s </b> %s +CompanyHasDownPaymentOrCommercialDiscount=Ten klient ma dostępne rabaty (komercyjne, zaliczki) na <b> %s </b> %s CompanyHasCreditNote=Ten klient nadal posiada noty kredytowe dla <b>%s</b> %s -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor -HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for <b>%s</b> %s from this vendor -HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for <b>%s</b> %s from this vendor -HasCreditNoteFromSupplier=You have credit notes for <b>%s</b> %s from this vendor +HasNoAbsoluteDiscountFromSupplier=Nie masz dostępnego kredytu rabatowego od tego dostawcy +HasAbsoluteDiscountFromSupplier=Masz dostępne rabaty (noty kredytowe lub zaliczki) dla <b> %s </b> %s od tego dostawcy +HasDownPaymentOrCommercialDiscountFromSupplier=Masz dostępne rabaty (komercyjne, zaliczki) dla <b> %s </b> %s od tego dostawcy +HasCreditNoteFromSupplier=Masz noty kredytowe dla <b> %s </b> %s od tego dostawcy CompanyHasNoAbsoluteDiscount=Ten klient nie posiada punktów rabatowych -CustomerAbsoluteDiscountAllUsers=Absolute customer discounts (granted by all users) -CustomerAbsoluteDiscountMy=Absolute customer discounts (granted by yourself) -SupplierAbsoluteDiscountAllUsers=Absolute vendor discounts (entered by all users) -SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) +CustomerAbsoluteDiscountAllUsers=Bezwzględne rabaty dla klientów (udzielane przez wszystkich użytkowników) +CustomerAbsoluteDiscountMy=Absolutne rabaty dla klientów (przyznawane przez Ciebie) +SupplierAbsoluteDiscountAllUsers=Bezwzględne rabaty dostawców (wprowadzone przez wszystkich użytkowników) +SupplierAbsoluteDiscountMy=Absolutne rabaty dostawcy (wprowadzone przez Ciebie) DiscountNone=Żaden Vendor=Sprzedawca Supplier=Sprzedawca @@ -310,7 +318,7 @@ FromContactName=Nazwa: NoContactDefinedForThirdParty=Brak zdefiniowanych kontaktów dla tego kontrahenta NoContactDefined=Brak zdefinowanych kontaktów DefaultContact=Domyślny kontakt/adres -ContactByDefaultFor=Default contact/address for +ContactByDefaultFor=Domyślny kontakt / adres dla AddThirdParty=Dodaj kontrahenta DeleteACompany=Usuń firmę PersonalInformations=Prywatne dane osobowe @@ -319,18 +327,18 @@ CustomerCode=Kod klienta SupplierCode=Kod sprzedawcy CustomerCodeShort=Kod klienta SupplierCodeShort=Kod sprzedawcy -CustomerCodeDesc=Customer Code, unique for all customers -SupplierCodeDesc=Vendor Code, unique for all vendors +CustomerCodeDesc=Kod klienta, unikalny dla wszystkich klientów +SupplierCodeDesc=Kod dostawcy, unikalny dla wszystkich dostawców RequiredIfCustomer=Wymagane, jeżeli Kontrahent jest klientem lub potencjalnym klientem RequiredIfSupplier=Wymagane jeżeli kontrahent jest dostawcą -ValidityControledByModule=Validity controlled by module -ThisIsModuleRules=Rules for this module +ValidityControledByModule=Ważność kontrolowana przez moduł +ThisIsModuleRules=Zasady dla tego modułu ProspectToContact=Potencjalny Klient do kontaktu CompanyDeleted=Firma " %s" usunięta z bazy danych. ListOfContacts=Lista kontaktów/adresów ListOfContactsAddresses=Lista kontaktów/adresów ListOfThirdParties=Lista kontrahentów -ShowCompany=Third Party +ShowCompany=Strona trzecia ShowContact=Kontakt-Adres ContactsAllShort=Wszystkie (bez filtra) ContactType=Typ kontaktu @@ -350,16 +358,16 @@ MyContacts=Moje kontakty Capital=Kapitał CapitalOf=Kapitał %s EditCompany=Edycja firmy -ThisUserIsNot=This user is not a prospect, customer or vendor +ThisUserIsNot=Ten użytkownik nie jest potencjalnym klientem, klientem ani sprzedawcą VATIntraCheck=Sprawdź -VATIntraCheckDesc=The VAT ID must include the country prefix. The link <b>%s</b> uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server. +VATIntraCheckDesc=Identyfikator VAT musi zawierać prefiks kraju. Łącze <b> %s </b> korzysta z usługi europejskiego sprawdzania podatku VAT (VIES), która wymaga dostępu do Internetu z serwera Dolibarr. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do?locale=pl -VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commission website -VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> +VATIntraCheckableOnEUSite=Sprawdź wewnątrzwspólnotowy identyfikator VAT na stronie internetowej Komisji Europejskiej +VATIntraManualCheck=Możesz również sprawdzić ręcznie na stronie internetowej Komisji Europejskiej <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Brak możliwości sprawdzenia. Usługa nie jest dostarczana dla wybranego regionu (%s). -NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Business entity type -Workforce=Workforce +NorProspectNorCustomer=Ani potencjalny klient, ani potencjalny klient +JuridicalStatus=Typ podmiotu gospodarczego +Workforce=Siła robocza Staff=Pracownicy ProspectLevelShort=Potencjał ProspectLevel=Potencjał potencjalnego klienta @@ -381,7 +389,7 @@ TE_MEDIUM=Średnia firma TE_ADMIN=Rządowy TE_SMALL=Mała firma TE_RETAIL=Klient detaliczny -TE_WHOLE=Wholesaler +TE_WHOLE=Hurtownik TE_PRIVATE=Osoba prywatna TE_OTHER=Inny StatusProspect-1=Nie kontaktować się @@ -400,14 +408,14 @@ ExportCardToFormat=Eksport karty do formatu ContactNotLinkedToCompany=Kontakt nie połączony z żadnym kontrahentem DolibarrLogin=Dolibarr login NoDolibarrAccess=Brak dostępu do Dolibarr -ExportDataset_company_1=Third-parties (companies/foundations/physical people) and their properties -ExportDataset_company_2=Contacts and their properties -ImportDataset_company_1=Third-parties and their properties -ImportDataset_company_2=Third-parties additional contacts/addresses and attributes -ImportDataset_company_3=Third-parties Bank accounts -ImportDataset_company_4=Third-parties Sales representatives (assign sales representatives/users to companies) -PriceLevel=Price Level -PriceLevelLabels=Price Level Labels +ExportDataset_company_1=Kontrahenci (firmy/fundacje/osoby fizyczne) i ich własności +ExportDataset_company_2=Kontakty i ich właściwości +ImportDataset_company_1=Kontrahenci i ich właściwości +ImportDataset_company_2=Dodatkowe kontakty/adresy i atrybuty kontrahentów +ImportDataset_company_3=Rachunki bankowe kontrahentów +ImportDataset_company_4=Zewnętrzni przedstawiciele handlowi (przypisywanie przedstawicieli handlowych/użytkowników do firm) +PriceLevel=Poziom cen +PriceLevelLabels=Etykiety cenowe DeliveryAddress=Adres dostawy AddAddress=Dodaj adres SupplierCategory=Kategoria dostawcy @@ -416,7 +424,7 @@ DeleteFile=Usuń plik ConfirmDeleteFile=Czy na pewno chcesz usunąć ten plik? AllocateCommercial=Przypisać do przedstawiciela Organization=Organizacja -FiscalYearInformation=Fiscal Year +FiscalYearInformation=Rok podatkowy FiscalMonthStart=Pierwszy miesiąc roku podatkowego SocialNetworksInformation=Media społecznościowe SocialNetworksFacebookURL=Facebook @@ -425,14 +433,14 @@ SocialNetworksLinkedinURL=Linkedin SocialNetworksInstagramURL=Instagram SocialNetworksYoutubeURL=Youtube SocialNetworksGithubURL=Github -YouMustAssignUserMailFirst=You must create an email for this user prior to being able to add an email notification. +YouMustAssignUserMailFirst=Aby dodać powiadomienie e-mail, musisz utworzyć wiadomość e-mail dla tego użytkownika. YouMustCreateContactFirst=Żeby dodać powiadomienia email, najpierw musisz określić kontakty z poprawnymi adresami email dla kontrahentów ListSuppliersShort=Lista sprzedawców -ListProspectsShort=List of Prospects +ListProspectsShort=Lista perspektyw ListCustomersShort=Lista klientów -ThirdPartiesArea=Third Parties/Contacts -LastModifiedThirdParties=Latest %s modified Third Parties -UniqueThirdParties=Total of Third Parties +ThirdPartiesArea=Osoby trzecie / kontakty +LastModifiedThirdParties=Najnowsze %s zmodyfikowane strony trzecie +UniqueThirdParties=Łączna liczba stron trzecich InActivity=Otwarte ActivityCeased=Zamknięte ThirdPartyIsClosed=Kontrahent jest zamknięty @@ -441,19 +449,19 @@ CurrentOutstandingBill=Biężący, niezapłacony rachunek OutstandingBill=Maksymalna kwota niezapłaconego rachunku OutstandingBillReached=Maksymalna kwota dla niespłaconych rachunków osiągnięta OrderMinAmount=Minimalna kwota dla zamówienia -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Dowolny kod Klienta / Dostawcy. Ten kod może być modyfikowany w dowolnym momencie. ManagingDirectors=Funkcja(e) managera (prezes, dyrektor generalny...) MergeOriginThirdparty=Duplikuj kontrahenta (kontrahenta, którego chcesz usunąć) MergeThirdparties=Scal kontrahentów -ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party, then the third party will be deleted. -ThirdpartiesMergeSuccess=Third parties have been merged +ConfirmMergeThirdparties=Czy na pewno chcesz scalić tę firmę zewnętrzną z obecną? Wszystkie połączone obiekty (faktury, zamówienia, ...) zostaną przeniesione do bieżącej strony trzeciej, a następnie strona trzecia zostanie usunięta. +ThirdpartiesMergeSuccess=Strony trzecie zostały połączone SaleRepresentativeLogin=Login przedstawiciela handlowego SaleRepresentativeFirstname=Imię przedstawiciela handlowego SaleRepresentativeLastname=Nazwisko przedstawiciela handlowego -ErrorThirdpartiesMerge=There was an error when deleting the third parties. Please check the log. Changes have been reverted. -NewCustomerSupplierCodeProposed=Customer or Vendor code already used, a new code is suggested -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +ErrorThirdpartiesMerge=Wystąpił błąd podczas usuwania stron trzecich. Sprawdź dziennik. Zmiany zostały cofnięte. +NewCustomerSupplierCodeProposed=Kod klienta lub dostawcy jest już używany, sugerowany jest nowy kod +KeepEmptyIfGenericAddress=Pozostaw to pole puste, jeśli ten adres jest adresem ogólnym #Imports PaymentTypeCustomer=Typ płatności - Klient PaymentTermsCustomer=Warunki płatności - Klient @@ -463,7 +471,7 @@ PaymentTypeBoth=Typ płatności - Klient i Sprzedawca MulticurrencyUsed=Użyj wielowalutowości MulticurrencyCurrency=Waluta InEEC=Europa (EEC) -RestOfEurope=Rest of Europe (EEC) -OutOfEurope=Out of Europe (EEC) -CurrentOutstandingBillLate=Current outstanding bill late -BecarefullChangeThirdpartyBeforeAddProductToInvoice=Be carefull, depending on your product price settings, you should change thirdparty before adding product to POS. +RestOfEurope=Reszta Europy (EWG) +OutOfEurope=Poza Europą (EWG) +CurrentOutstandingBillLate=Obecny zaległy rachunek spóźniony +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Zachowaj ostrożność, w zależności od ustawień ceny produktu, przed dodaniem produktu do POS należy zmienić osobę trzecią. diff --git a/htdocs/langs/pl_PL/compta.lang b/htdocs/langs/pl_PL/compta.lang index cb71232d049..b71f9c0776d 100644 --- a/htdocs/langs/pl_PL/compta.lang +++ b/htdocs/langs/pl_PL/compta.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - compta -MenuFinancial=Billing | Payment +MenuFinancial=Fakturowanie | Zapłata TaxModuleSetupToModifyRules=Przejdź do <a href="%s">konfiguracji modułu Podatki</a> zmodyfikować zasady obliczania TaxModuleSetupToModifyRulesLT=Przejdź do <a href="%s">konfiguracji firmy</a> zmodyfikować zasady obliczania OptionMode=Opcja dla księgowości @@ -11,7 +11,7 @@ FeatureIsSupportedInInOutModeOnly=Funkcja dostępna tylko w KREDYTÓW-DŁUGI rac VATReportBuildWithOptionDefinedInModule=Kwoty wyświetlane tutaj są obliczane na zasadach określonych w konfiguracji moduly podatkowego LTReportBuildWithOptionDefinedInModule=Kwoty podane tutaj są obliczane na podstawie zasad określonych przez konfigurację firmy. Param=Konfiguracja -RemainingAmountPayment=Amount payment remaining: +RemainingAmountPayment=Pozostała kwota płatności: Account=Konto Accountparent=Nadrzędne konto Accountsparent=Nadrzędne konta @@ -19,8 +19,8 @@ Income=Przychody Outcome=Rozchody MenuReportInOut=Przychody/Koszty ReportInOut=Bilans przychodów i kosztów -ReportTurnover=Turnover invoiced -ReportTurnoverCollected=Turnover collected +ReportTurnover=Zafakturowany obrót +ReportTurnoverCollected=Zebrany obrót PaymentsNotLinkedToInvoice=Płatność nie dowiązana do żadnej faktury, więc nie dowiązana do żadnego kontrahenta PaymentsNotLinkedToUser=Płatnośc nie dowiązana do żadnego użytkownika Profit=Zysk @@ -32,46 +32,47 @@ Credit=Kredyt Piece=Rachunkowość Doc. AmountHTVATRealReceived=HT zebrane AmountHTVATRealPaid=HT 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 +VATToPay=Sprzedaż podatkowa +VATReceived=Otrzymano podatek +VATToCollect=Zakupy podatkowe +VATSummary=Podatek miesięczny +VATBalance=Saldo podatkowe +VATPaid=Zapłacony podatek +LT1Summary=Podsumowanie podatku 2 +LT2Summary=Podsumowanie podatku 3 LT1SummaryES=RE Saldo LT2SummaryES=Balans IRPF LT1SummaryIN=CGST Balance -LT2SummaryIN=SGST Balance -LT1Paid=Tax 2 paid -LT2Paid=Tax 3 paid +LT2SummaryIN=Saldo SGST +LT1Paid=Zapłacony podatek 2 +LT2Paid=Zapłacony podatek 3 LT1PaidES=RE Płatny LT2PaidES=IRPF Płatny -LT1PaidIN=CGST Paid -LT2PaidIN=SGST Paid -LT1Customer=Tax 2 sales -LT1Supplier=Tax 2 purchases +LT1PaidIN=CGST Płatne +LT2PaidIN=SGST płatny +LT1Customer=Sprzedaż podatkowa 2 +LT1Supplier=Podatek 2 zakupy LT1CustomerES=RE sprzedaży LT1SupplierES=RE zakupów -LT1CustomerIN=CGST sales -LT1SupplierIN=CGST purchases -LT2Customer=Tax 3 sales -LT2Supplier=Tax 3 purchases +LT1CustomerIN=Sprzedaż CGST +LT1SupplierIN=Zakupy CGST +LT2Customer=Podatek 3 od sprzedaży +LT2Supplier=Podatek 3 zakupy LT2CustomerES=Sprzedaż IRPF LT2SupplierES=Zakupy IRPF -LT2CustomerIN=SGST sales -LT2SupplierIN=SGST purchases +LT2CustomerIN=Sprzedaż SGST +LT2SupplierIN=Zakupy SGST VATCollected=VAT zebrane StatusToPay=Do zapłaty SpecialExpensesArea=Obszar dla wszystkich specjalnych płatności +VATExpensesArea=Obszar dla wszystkich płatności TVA 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 +SocialContributionsDeductibles=Podatki socjalne lub podatkowe do odliczenia +SocialContributionsNondeductibles=Nie podlegające potrąceniu podatki socjalne lub podatkowe +DateOfSocialContribution=Data podatku socjalnego lub podatkowego +LabelContrib=Wkład etykiety +TypeContrib=Wpisz wkład MenuSpecialExpenses=Koszty specjalne MenuTaxAndDividends=Podatki i dywidendy MenuSocialContributions=ZUS/podatek @@ -79,15 +80,16 @@ MenuNewSocialContribution=Nowa opłata ZUS/podatek NewSocialContribution=Nowa opłata ZUS/podatek AddSocialContribution=Dodaj podatek fiskalny/ZUS ContributionsToPay=Opłata ZUS/podatek do zapłacenia -AccountancyTreasuryArea=Billing and payment area +AccountancyTreasuryArea=Obszar rozliczeń i płatności NewPayment=Nowa płatność PaymentCustomerInvoice=Klient płatności faktury -PaymentSupplierInvoice=vendor invoice payment +PaymentSupplierInvoice=płatność za fakturę dostawcy PaymentSocialContribution=Płatność za ZUS/podatek PaymentVat=Zapłata podatku VAT +AutomaticCreationPayment=Automatycznie rejestruj płatność ListPayment=Wykaz płatności ListOfCustomerPayments=Lista płatności klientów -ListOfSupplierPayments=List of vendor payments +ListOfSupplierPayments=Lista płatności dostawcy DateStartPeriod=Data początku okresu DateEndPeriod=Data końca okresu newLT1Payment=Nowa płatność podatku 2 @@ -102,47 +104,57 @@ LT1PaymentES=RE: Płatność LT1PaymentsES=RE Płatności LT2PaymentES=Płatność IRPF LT2PaymentsES=Płatności IRPF -VATPayment=Sales tax payment -VATPayments=Sales tax payments -VATRefund=Sales tax refund -NewVATPayment=New sales tax payment -NewLocalTaxPayment=New tax %s payment +VATPayment=Zapłata podatku od sprzedaży +VATPayments=Płatności podatku od sprzedaży +VATDeclarations=Deklaracje VAT +VATDeclaration=Deklaracja VAT +VATRefund=Zwrot podatku od sprzedaży +NewVATPayment=Nowa płatność podatku od sprzedaży +NewLocalTaxPayment=Nowa płatność podatku %s Refund=Zwrot SocialContributionsPayments=Płatności za ZUS/podatki ShowVatPayment=Pokaż płatności za podatek VAT TotalToPay=Razem do zapłaty -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted on %s and filtered on 1 bank account (with no other filters) -CustomerAccountancyCode=Customer accounting code -SupplierAccountancyCode=Vendor accounting code +BalanceVisibilityDependsOnSortAndFilters=Saldo jest widoczne na tej liście tylko wtedy, gdy tabela jest posortowana według %s i przefiltrowana na 1 koncie bankowym (bez innych filtrów) +CustomerAccountancyCode=Kod księgowy klienta +SupplierAccountancyCode=Kod księgowy dostawcy CustomerAccountancyCodeShort=Kod księg. klienta SupplierAccountancyCodeShort=Kod rach. dost. AccountNumber=Numer konta NewAccountingAccount=Nowe konto -Turnover=Turnover invoiced -TurnoverCollected=Turnover collected -SalesTurnoverMinimum=Minimum turnover -ByExpenseIncome=By expenses & incomes +Turnover=Zafakturowany obrót +TurnoverCollected=Zebrany obrót +SalesTurnoverMinimum=Minimalny obrót +ByExpenseIncome=Według wydatków i dochodów ByThirdParties=Przez kontrahentów ByUserAuthorOfInvoice=Na autora faktury CheckReceipt=Sprawdź depozyt CheckReceiptShort=Sprawdź depozyt -LastCheckReceiptShort=Latest %s check receipts +LastCheckReceiptShort=Najnowsze potwierdzenia %s NewCheckReceipt=Nowe zniżki NewCheckDeposit=Nowe sprawdzić depozytu NewCheckDepositOn=Nowe sprawdzić depozytu na konto: %s -NoWaitingChecks=No checks awaiting deposit. +NoWaitingChecks=Brak czeków oczekujących na wpłatę. DateChequeReceived=Data rejestracji czeku -NbOfCheques=No. of checks +NbOfCheques=Liczba czeków PaySocialContribution=Zapłać ZUS/podatek -ConfirmPaySocialContribution=Jesteś pewien/a, że chcesz oznaczyć tą opłatę za ZUS lub podatek jako zapłaconą? +PayVAT=Zapłać deklarację VAT +PaySalary=Zapłać kartę płacową +ConfirmPaySocialContribution=Czy na pewno chcesz zaklasyfikować ten podatek socjalny lub podatkowy jako zapłacony? +ConfirmPayVAT=Czy na pewno chcesz sklasyfikować tę deklarację VAT jako zapłaconą? +ConfirmPaySalary=Czy na pewno chcesz sklasyfikować tę kartę wynagrodzenia jako płatną? DeleteSocialContribution=Usuń płatność za ZUS lub podatek -ConfirmDeleteSocialContribution=Jesteś pewien/a, że chcesz oznaczyć tą opłatę za ZUS lub podatek jako zapłaconą? +DeleteVAT=Usuń deklarację VAT +DeleteSalary=Usuń kartę wynagrodzenia +ConfirmDeleteSocialContribution=Czy na pewno chcesz usunąć tę płatność podatku socjalnego / podatkowego? +ConfirmDeleteVAT=Czy na pewno chcesz usunąć tę deklarację VAT? +ConfirmDeleteSalary=Czy na pewno chcesz usunąć to wynagrodzenie? ExportDataset_tax_1=Składki ZUS, podatki i płatności CalcModeVATDebt=<b>Tryb% Svat na rachunkowości zaangażowanie% s.</b> CalcModeVATEngagement=<b>Tryb% Svat na dochody-wydatki% s.</b> -CalcModeDebt=Analysis of known recorded documents 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. +CalcModeDebt=Analiza znanych zapisanych dokumentów, nawet jeśli nie zostały one jeszcze zaksięgowane w księdze. +CalcModeEngagement=Analiza znanych zarejestrowanych płatności, nawet jeśli nie zostały jeszcze zaksięgowane w Księdze Głównej. +CalcModeBookkeeping=Analiza danych zapisanych w tabeli Księgi rachunkowej. CalcModeLT1= <b>Tryb% SRE faktur klienta - dostawcy wystawia faktury% s</b> CalcModeLT1Debt=<b>Tryb% SRE faktur klienta% s</b> CalcModeLT1Rec= <b>Tryb% SRE dostawców fakturuje% s</b> @@ -151,50 +163,52 @@ CalcModeLT2Debt=<b>Tryb% sIRPF faktur klienta% s</b> CalcModeLT2Rec= <b>Tryb% sIRPF od dostawców faktury% s</b> AnnualSummaryDueDebtMode=Saldo przychodów i kosztów, roczne podsumowanie AnnualSummaryInputOutputMode=Saldo przychodów i kosztów, roczne podsumowanie -AnnualByCompanies=Balance of income and expenses, by predefined groups of account -AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by predefined groups, mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>. -AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>. -SeeReportInInputOutputMode=See <b>%sanalysis of payments%s</b> for a calculation based on <b>recorded payments</b> made even if they are not yet accounted in Ledger -SeeReportInDueDebtMode=See <b>%sanalysis of recorded documents%s</b> for a calculation based on known <b>recorded documents</b> even if they are not yet accounted in Ledger -SeeReportInBookkeepingMode=See <b>%sanalysis of bookeeping ledger table%s</b> for a report based on <b>Bookkeeping Ledger table</b> +AnnualByCompanies=Saldo dochodów i wydatków według predefiniowanych grup kont +AnnualByCompaniesDueDebtMode=Bilans dochodów i kosztów, szczegóły według predefiniowanych grup, tryb <b> %s Należności-zadłużenia%s </b> powiedział <b> Rachunkowość zobowiązań a09a4b739f17f8z +AnnualByCompaniesInputOutputMode=Bilans dochodów i kosztów, szczegóły według predefiniowanych grup, tryb <b> %s Przychody-wydatki%s </b> powiedział <b> księgowość kasowa </b>. +SeeReportInInputOutputMode=Zobacz <b> %sanaliza płatnościs%s </b> w celu obliczenia opartego na <b> zarejestrowanych płatnościach </b> dokonanych, nawet jeśli nie zostały jeszcze zaksięgowane w księdze +SeeReportInDueDebtMode=Zobacz <b> %sanalizę zapisanych dokumentów%s </b> w celu obliczenia opartego na znanych <b> zapisanych dokumentach </b>, nawet jeśli nie zostały jeszcze zaksięgowane w księdze +SeeReportInBookkeepingMode=Zobacz <b> %sanaliza tabeli księgi rachunkowej %s </b> dla raportu opartego na <b> Tabela księgi rachunkowej </b> RulesAmountWithTaxIncluded=- Kwoty podane są łącznie z podatkami -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.<br>- 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=- Obejmuje zaległe faktury, wydatki, podatek VAT, darowizny, niezależnie od tego, czy zostały zapłacone, czy nie. Obejmuje również wypłacane pensje. <br> - Opiera się na dacie fakturowania faktur i terminie płatności wydatków lub podatków. W przypadku wynagrodzeń zdefiniowanych w module Wynagrodzenia stosowana jest data waluty płatności. RulesResultInOut=- Obejmuje rzeczywiste płatności dokonywane za faktury, koszty, podatek VAT oraz wynagrodzenia. <br> Opiera się na datach płatności faktur, wygenerowania kosztów, podatku VAT oraz wynagrodzeń. Dla darowizn brana jest pod uwagę data przekazania darowizny. -RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> -RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> -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 <b>grouped by personalized groups</b> -SeePageForSetup=See menu <a href="%s">%s</a> 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 +RulesCADue=- Obejmuje należne faktury klienta, niezależnie od tego, czy są opłacone, czy nie. <br> - Opiera się na dacie rozliczenia tych faktur. <br> +RulesCAIn=- Obejmuje wszystkie efektywne płatności faktur otrzymanych od klientów. <br> - Opiera się na dacie płatności tych faktur <br> +RulesCATotalSaleJournal=Obejmuje wszystkie linie kredytowe z dziennika Sprzedaż. +RulesSalesTurnoverOfIncomeAccounts=Obejmuje (kredyt - debet) linie dla rachunków produktów w grupie PRZYCHODY +RulesAmountOnInOutBookkeepingRecord=Obejmuje zapis w księdze z kontami księgowymi, które mają grupę „WYDATKI” lub „DOCHODY” +RulesResultBookkeepingPredefined=Obejmuje zapis w księdze z kontami księgowymi, które mają grupę „WYDATKI” lub „DOCHODY” +RulesResultBookkeepingPersonalized=Pokazuje zapis w księdze z kontami księgowymi <b> pogrupowanymi według spersonalizowanych grup </b> +SeePageForSetup=W celu konfiguracji patrz menu <a href="%s"> %s </a> +DepositsAreNotIncluded=- Faktury zaliczkowe nie są uwzględniane +DepositsAreIncluded=- Faktury zaliczkowe są wliczone +LT1ReportByMonth=Raport podatkowy 2 według miesiąca +LT2ReportByMonth=Raport podatkowy 3 według miesiąca +LT1ReportByCustomers=Zgłoś podatek 2 przez stronę trzecią +LT2ReportByCustomers=Zgłoś podatek 3 przez stronę trzecią LT1ReportByCustomersES=Sprawozdanie trzecim RE partii LT2ReportByCustomersES=Raport osób trzecich 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 +VATReport=Raport podatku od sprzedaży +VATReportByPeriods=Raport podatku od sprzedaży według okresu +VATReportByMonth=Raport o podatku od sprzedaży według miesięcy +VATReportByRates=Raport podatku od sprzedaży według stawek +VATReportByThirdParties=Raport podatku od sprzedaży przez osoby trzecie +VATReportByCustomers=Raport podatku od sprzedaży według klienta VATReportByCustomersInInputOutputMode=Sprawozdanie VAT klienta gromadzone i wypłacane -VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid -LT1ReportByQuarters=Report tax 2 by rate -LT2ReportByQuarters=Report tax 3 by rate +VATReportByQuartersInInputOutputMode=Raport według stawki podatku od sprzedaży podatku pobranego i zapłaconego +VATReportShowByRateDetails=Pokaż szczegóły tej stawki +LT1ReportByQuarters=Zgłoś podatek 2 według stawki +LT2ReportByQuarters=Zgłoś podatek 3 według stawki LT1ReportByQuartersES=Sprawozdanie stopy RE LT2ReportByQuartersES=Sprawozdanie IRPF stopy SeeVATReportInInputOutputMode=Zobacz raport <b>%sVAT encasement%s</b> na standardowe obliczenia SeeVATReportInDueDebtMode=<b>%sVAT</b> sprawozdanie Zobacz <b>na flow%s</b> do obliczenia z opcją na przepływ RulesVATInServices=- W przypadku usług, raport zawiera przepisów VAT faktycznie otrzymane lub wydane na podstawie daty płatności. -RulesVATInProducts=- For material assets, the report includes the VAT received or issued on the basis of the date of payment. +RulesVATInProducts=- W przypadku aktywów materialnych raport zawiera podatek VAT otrzymany lub wydany na podstawie daty płatności. RulesVATDueServices=- W przypadku usług, raport zawiera faktur VAT należnego, płatnego lub nie, w oparciu o daty wystawienia faktury. -RulesVATDueProducts=- For material assets, the report includes the VAT invoices, based on the invoice date. +RulesVATDueProducts=- Dla aktywów materialnych raport zawiera faktury VAT na podstawie daty wystawienia faktury. OptionVatInfoModuleComptabilite=Uwaga: W przypadku dóbr materialnych, należy użyć daty dostawy do bardziej sprawiedliwego. -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 +ThisIsAnEstimatedValue=To jest podgląd oparty na wydarzeniach biznesowych, a nie na końcowej tabeli księgi, więc ostateczne wyniki mogą się różnić od tych wartości podglądu PercentOfInvoice=%%/faktury NotUsedForGoods=Nie używany od towarów ProposalStats=Statystyki na temat propozycji @@ -209,62 +223,66 @@ PurchasesJournal=Dziennik zakupów DescSellsJournal=Dziennik sprzedaży DescPurchasesJournal=Dziennik zakupów CodeNotDef=Nie zdefiniowany -WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module. +WarningDepositsNotIncluded=Faktury zaliczkowe nie są zawarte w tej wersji z tym modułem księgowym. DatePaymentTermCantBeLowerThanObjectDate=Termin płatności określony nie może być niższa niż data obiektu. -Pcg_version=Chart of accounts models +Pcg_version=Modele planu kont Pcg_type=Typ PCG Pcg_subtype=PCG podtyp InvoiceLinesToDispatch=Linie do wysyłki faktury -ByProductsAndServices=By product and service +ByProductsAndServices=Według produktów i usług RefExt=Ref Zewnętrzne -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link do zamówienia Mode1=Metoda 1 Mode2=Metoda 2 CalculationRuleDesc=Aby obliczyć całkowity podatek VAT, można wykorzystać jedną z dwóch metod: <br> Metoda 1 polega na zaokrągleniu VAT dla każdej pozycji, a następnie ich zsumowaniu. <br> Metoda 2 polega na zsumowaniu wszystkich VAT z każdej pozycji, a następnie zaokrągleniu wyniku. <br> Efekt końcowy może różnić się o kilka groszy. Domyślnym trybem jest tryb <b>%s</b>. -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. +CalculationRuleDescSupplier=W zależności od dostawcy wybierz odpowiednią metodę, aby zastosować tę samą regułę obliczania i uzyskać taki sam wynik, jakiego oczekuje dostawca. +TurnoverPerProductInCommitmentAccountingNotRelevant=Raport dotyczący obrotu zebranego na produkt nie jest dostępny. Ten raport jest dostępny tylko dla zafakturowanych obrotów. +TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=Raport dotyczący obrotu uzyskanego według stawki podatku od sprzedaży jest niedostępny. Ten raport jest dostępny tylko dla zafakturowanych obrotów. CalculationMode=Tryb Obliczanie -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 -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 +AccountancyJournal=Arkusz kodów księgowych +ACCOUNTING_VAT_SOLD_ACCOUNT=Konto księgowe domyślnie dla podatku VAT od sprzedaży (używane, jeśli nie zostało zdefiniowane w ustawieniach słownika VAT) +ACCOUNTING_VAT_BUY_ACCOUNT=Konto księgowe domyślnie dla podatku VAT od zakupów (używane, jeśli nie zostało zdefiniowane w ustawieniach słownika VAT) +ACCOUNTING_VAT_PAY_ACCOUNT=Konto księgowe domyślnie do płacenia podatku VAT +ACCOUNTING_ACCOUNT_CUSTOMER=Konto księgowe używane dla stron trzecich klienta +ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Dedykowane konto księgowe zdefiniowane na karcie osoby trzeciej będzie używane tylko do księgowania w Podedgera. Ta będzie używana dla Księgi Głównej i jako domyślna wartość księgowania Podrzędnego, jeśli dedykowane konto księgowe klienta na stronie trzeciej nie jest zdefiniowane. +ACCOUNTING_ACCOUNT_SUPPLIER=Konto księgowe używane dla stron trzecich dostawcy +ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Dedykowane konto księgowe zdefiniowane na karcie osoby trzeciej będzie używane tylko do księgowania w Podedgera. Ta wartość będzie używana dla Księgi Głównej i jako domyślna wartość księgowania Księgi Podrzędnej, jeśli nie zdefiniowano dedykowanego konta księgowego dostawcy na stronie trzeciej. +ConfirmCloneTax=Potwierdź klon podatku socjalnego / podatkowego +ConfirmCloneVAT=Potwierdź klon deklaracji VAT +ConfirmCloneSalary=Potwierdź klon wynagrodzenia CloneTaxForNextMonth=Powiel to na następny miesiąc SimpleReport=Prosty raport -AddExtraReport=Extra reports (add foreign and national customer report) +AddExtraReport=Dodatkowe raporty (dodaj raport klientów zagranicznych i krajowych) OtherCountriesCustomersReport=Raport o klientach zagranicznych BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Oparty na dwóch pierwszych literach numeru VAT EU, które się różnią od kodu kraju , gdzie zarejetrowana jest Twoja firma. SameCountryCustomersWithVAT=Raport o klientach krajowych BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Oparty na dwóch pierwszych literach numeru VAT EU, które są takie same jak kod kraju, gdzie zarejetrowana jest Twoja firma. -LinkedFichinter=Link to an intervention +LinkedFichinter=Link do interwencji ImportDataset_tax_contrib=ZUS/podatek ImportDataset_tax_vat=Płatności VAT ErrorBankAccountNotFound=Błąd: Konto bankowe nie znalezione FiscalPeriod=Okres rozliczeniowy -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=Lista składek na ubezpieczenia społeczne związanych z projektem +DeleteFromCat=Usuń z grupy księgowej +AccountingAffectation=Cesja księgowa +LastDayTaxIsRelatedTo=Ostatni dzień okresu, którego dotyczy podatek +VATDue=Zażądano podatku od sprzedaży +ClaimedForThisPeriod=Roszczony za okres +PaidDuringThisPeriod=Zapłacono za ten okres +PaidDuringThisPeriodDesc=Jest to suma wszystkich płatności związanych z deklaracjami VAT, które mają datę końca okresu w wybranym zakresie dat +ByVatRate=Według stawki podatku od sprzedaży +TurnoverbyVatrate=Obrót fakturowany według stawki podatku od sprzedaży +TurnoverCollectedbyVatrate=Obrót pobierany według stawki podatku od sprzedaży +PurchasebyVatrate=Zakup według stawki podatku od sprzedaży LabelToShow=Krótka etykieta -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> -RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> -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 +PurchaseTurnover=Obrót zakupowy +PurchaseTurnoverCollected=Zebrany obrót zakupowy +RulesPurchaseTurnoverDue=- Obejmuje należne faktury dostawcy, niezależnie od tego, czy są opłacone, czy nie. <br> - Opiera się na dacie faktury tych faktur. <br> +RulesPurchaseTurnoverIn=- Obejmuje wszystkie efektywne płatności faktur wystawionych dostawcom. <br> - Opiera się na dacie płatności tych faktur <br> +RulesPurchaseTurnoverTotalPurchaseJournal=Obejmuje wszystkie linie debetowe z arkusza zakupów. +RulesPurchaseTurnoverOfExpenseAccounts=Obejmuje linie (debetowo - kredytowe) na rachunki produktów w grupie WYDATKI +ReportPurchaseTurnover=Zafakturowany obrót zakupowy +ReportPurchaseTurnoverCollected=Zebrany obrót zakupowy +IncludeVarpaysInResults = Uwzględnij różne płatności w raportach +IncludeLoansInResults = Uwzględnij pożyczki w raportach diff --git a/htdocs/langs/pl_PL/ecm.lang b/htdocs/langs/pl_PL/ecm.lang index 465958245dd..b39489425ce 100644 --- a/htdocs/langs/pl_PL/ecm.lang +++ b/htdocs/langs/pl_PL/ecm.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - ecm -ECMNbOfDocs=No. of documents in directory +ECMNbOfDocs=Liczba dokumentów w katalogu ECMSection=Katalog ECMSectionManual=Katalog manualny ECMSectionAuto=Katalog automatyczny @@ -14,30 +14,34 @@ ECMNbOfFilesInDir=Ilość plików w katalogu ECMNbOfSubDir=ilość podkatalogów ECMNbOfFilesInSubDir=Liczba plików w podkatalogach ECMCreationUser=Kreator -ECMArea=DMS/ECM area -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. +ECMArea=Obszar DMS / ECM +ECMAreaDesc=Obszar DMS / ECM (system zarządzania dokumentami / elektroniczne zarządzanie treścią) umożliwia szybkie zapisywanie, udostępnianie i wyszukiwanie wszelkiego rodzaju dokumentów w Dolibarr. ECMAreaDesc2=* Automatyczne katalogi wypelniane sa automatycznie podczas dodawania dokumentów z karty elementu <br> * Manualne katalogi mogą być używane do zapisywania dokumentów nie powiązanych z żadnym konkretnym elementem. ECMSectionWasRemoved=Katalog <b>%s</b> został usunięty. -ECMSectionWasCreated=Directory <b>%s</b> has been created. +ECMSectionWasCreated=Utworzono katalog <b> %s </b>. ECMSearchByKeywords=Wyszukiwanie wg słów kluczowych ECMSearchByEntity=Szukaj wg obiektu ECMSectionOfDocuments=Katalogi dokumentów ECMTypeAuto=Automatyczne -ECMDocsBy=Documents linked to %s +ECMDocsBy=Dokumenty powiązane z %s ECMNoDirectoryYet=Brak utworzonego katalogu ShowECMSection=Pokaż katalog DeleteSection=Usuń katalog ConfirmDeleteSection=Czy możesz potwierdzić usunięcie katalogu <b>%s</b>? ECMDirectoryForFiles=Pokrewny katalog dla plików -CannotRemoveDirectoryContainsFilesOrDirs=Removal not possible because it contains some files or sub-directories -CannotRemoveDirectoryContainsFiles=Removal not possible because it contains some files +CannotRemoveDirectoryContainsFilesOrDirs=Usunięcie nie jest możliwe, ponieważ zawiera niektóre pliki lub podkatalogi +CannotRemoveDirectoryContainsFiles=Usunięcie nie jest możliwe, ponieważ zawiera niektóre pliki ECMFileManager=Menedżer plików -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) -ExtraFieldsEcmFiles=Extrafields Ecm Files +ECMSelectASection=Wybierz katalog w drzewie ... +DirNotSynchronizedSyncFirst=Wydaje się, że ten katalog został utworzony lub zmodyfikowany poza modułem ECM. Musisz najpierw kliknąć przycisk „Resync”, aby zsynchronizować dysk i bazę danych w celu pobrania zawartości tego katalogu. +ReSyncListOfDir=Ponownie zsynchronizuj listę katalogów +HashOfFileContent=Skrót zawartości pliku +NoDirectoriesFound=Nie znaleziono katalogów +FileNotYetIndexedInDatabase=Plik nie został jeszcze zindeksowany w bazie danych (spróbuj przesłać go ponownie) +ExtraFieldsEcmFiles=Pliki Extrafields Ecm ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ECMSetup=Konfiguracja ECM +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/pl_PL/errors.lang b/htdocs/langs/pl_PL/errors.lang index bd9179e37d9..826b8bb629f 100644 --- a/htdocs/langs/pl_PL/errors.lang +++ b/htdocs/langs/pl_PL/errors.lang @@ -4,33 +4,33 @@ NoErrorCommitIsDone=Nie ma błędu, zobowiązujemy # Errors ErrorButCommitIsDone=Znalezione błędy, ale mimo to możemy potwierdzić -ErrorBadEMail=Email %s is wrong -ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) +ErrorBadEMail=E-mail %s jest nieprawidłowy +ErrorBadMXDomain=E-mail %s wydaje się nieprawidłowy (domena nie ma prawidłowego rekordu MX) ErrorBadUrl=Url %s jest błędny -ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. +ErrorBadValueForParamNotAString=Zła wartość parametru. Zazwyczaj dołącza się, gdy brakuje tłumaczenia. +ErrorRefAlreadyExists=Odniesienie <b> %s </b> już istnieje. ErrorLoginAlreadyExists=Zaloguj %s już istnieje. ErrorGroupAlreadyExists=Grupa %s już istnieje. ErrorRecordNotFound=Rekord nie został znaleziony. ErrorFailToCopyFile=Nie udało się skopiować pliku '<b>%s</b>' do '<b>%s</b>'. -ErrorFailToCopyDir=Failed to copy directory '<b>%s</b>' into '<b>%s</b>'. +ErrorFailToCopyDir=Nie udało się skopiować katalogu „<b> %s </b>” do „<b> %s </b>”. ErrorFailToRenameFile=Nie można zmienić nazwy pliku '<b>%s</b>' na '<b>%s</b>'. ErrorFailToDeleteFile=Nie można usunąć pliku '<b>%s</b>'. ErrorFailToCreateFile=Nie można utworzyć pliku '<b>%s</b>'. ErrorFailToRenameDir=Nie można zmienić nazwy katalogu <b>%s</b> na <b>%s</b>. ErrorFailToCreateDir=Nie można utworzyć katalogu '<b>%s</b>'. ErrorFailToDeleteDir=Nie można usunąć katalogu '<b %s</b>'. -ErrorFailToMakeReplacementInto=Failed to make replacement into file '<b>%s</b>'. -ErrorFailToGenerateFile=Failed to generate file '<b>%s</b>'. +ErrorFailToMakeReplacementInto=Nie udało się zastąpić pliku „<b> %s </b>”. +ErrorFailToGenerateFile=Nie udało się wygenerować pliku „<b> %s </b>”. ErrorThisContactIsAlreadyDefinedAsThisType=Ten kontakt jest już zdefiniowana jako kontaktowy dla tego typu. ErrorCashAccountAcceptsOnlyCashMoney=To konto bankowe jest kontem gotówkowym, więc akceptuje jedynie płatności gotówkowe ErrorFromToAccountsMustDiffers=Konta źródłowe i docelowe muszą być inne -ErrorBadThirdPartyName=Bad value for third-party name +ErrorBadThirdPartyName=Zła wartość dla nazwy kontrahenta ErrorProdIdIsMandatory=%s jest obowiązkowy ErrorBadCustomerCodeSyntax=Zła skadnia dla kodu klienta -ErrorBadBarCodeSyntax=Bad syntax for barcode. May be you set a bad barcode type or you defined a barcode mask for numbering that does not match value scanned. +ErrorBadBarCodeSyntax=Zła składnia kodu kreskowego. Być może ustawiłeś zły typ kodu kreskowego lub zdefiniowałeś maskę kodu kreskowego dla numeracji, która nie pasuje do zeskanowanej wartości. ErrorCustomerCodeRequired=Wymagany kod klienta -ErrorBarCodeRequired=Barcode required +ErrorBarCodeRequired=Wymagany kod kreskowy ErrorCustomerCodeAlreadyUsed=Kod klienta jest już używany ErrorBarCodeAlreadyUsed=Kod kreskowy już używany ErrorPrefixRequired=Wymaga przedrostka @@ -38,19 +38,19 @@ ErrorBadSupplierCodeSyntax=Zła składnia kodu dostawcy ErrorSupplierCodeRequired=Wymagany kod dostawcy ErrorSupplierCodeAlreadyUsed=Kod dostawcy został już użyty ErrorBadParameters=Złe parametry -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Błędne lub brakujące parametry ErrorBadValueForParameter=Zła wartość '%s' dla parametru '%s' ErrorBadImageFormat=Plik ze zdjęciem ma nie wspierany format (twoje PHP nie wspiera funcji konwersji zdjęć w tym formacie) ErrorBadDateFormat=Wartość '%s' ma zły format daty ErrorWrongDate=Data nie jest poprawna! ErrorFailedToWriteInDir=Nie można zapisać w katalogu %s ErrorFoundBadEmailInFile=Znaleziono nieprawidłową składnię adresu email dla %s linii w pliku (przykładowo linia %s z adresem email %s) -ErrorUserCannotBeDelete=User cannot be deleted. Maybe it is associated to Dolibarr entities. +ErrorUserCannotBeDelete=Nie można usunąć użytkownika. Może jest to związane z podmiotami Dolibarr. ErrorFieldsRequired=Niektóre pola wymagane nie były uzupełnione. ErrorSubjectIsRequired=Temat wiadomości jest wymagany ErrorFailedToCreateDir=Nie można utworzyć katalogu. Sprawdź, czy serwer WWW użytkownik ma uprawnienia do zapisu do katalogu dokumentów Dolibarr. Jeśli parametr <b>safe_mode</b> jest włączona w tym PHP, czy posiada Dolibarr php pliki do serwera internetowego użytkownika (lub grupy). ErrorNoMailDefinedForThisUser=Nie określono adresu email dla tego użytkownika -ErrorSetupOfEmailsNotComplete=Setup of emails is not complete +ErrorSetupOfEmailsNotComplete=Konfiguracja e-maili nie została zakończona ErrorFeatureNeedJavascript=Ta funkcja wymaga do pracy aktywowanego JavaScript. Zmień to w konfiguracji - wyświetlanie. ErrorTopMenuMustHaveAParentWithId0=Menu typu "góry" nie może mieć dominującej menu. Umieść 0 dominującej w menu lub wybrać z menu typu "Lewy". ErrorLeftMenuMustHaveAParentId=Menu typu "Lewy" musi mieć identyfikator rodzica. @@ -59,50 +59,51 @@ ErrorDirNotFound=Nie znaleziono katalogu <b>%s</b> (Bad ścieżki złe uprawnien ErrorFunctionNotAvailableInPHP=Funkcja <b>%s</b> jest wymagana dla tej funkcjonalności, ale nie jest dostępna w tej wersji/konfiguracji PHP. ErrorDirAlreadyExists=Katalog o takiej nazwie już istnieje. ErrorFileAlreadyExists=Plik o takiej nazwie już istnieje. +ErrorDestinationAlreadyExists=Istnieje już inny plik o nazwie <b> %s </b>. ErrorPartialFile=Plik nieodebrany w całości przez serwer. ErrorNoTmpDir=Tymczasowy directy %s nie istnieje. ErrorUploadBlockedByAddon=Prześlij zablokowane / PHP wtyczki Apache. ErrorFileSizeTooLarge=Rozmiar pliku jest zbyt duży. -ErrorFieldTooLong=Field %s is too long. +ErrorFieldTooLong=Pole %s jest za długie. ErrorSizeTooLongForIntType=Rozmiar zbyt długi dal typu int (max %s cyfr) ErrorSizeTooLongForVarcharType=Za dużo znaków dla tego typu (maksymalnie %s znaków) ErrorNoValueForSelectType=Proszę wypełnić wartości dla listy wyboru ErrorNoValueForCheckBoxType=Proszę wypełnić wartości dla listy checkbox ErrorNoValueForRadioType=Proszę wypełnić wartość liście radiowej ErrorBadFormatValueList=Wartość na tej liście nie może mieć więcej niż jeden <u>przecinek: %s,</u> ale wymagany jest przynajmniej jeden: klucz, wartość -ErrorFieldCanNotContainSpecialCharacters=The field <b>%s</b> must not contains special characters. -ErrorFieldCanNotContainSpecialNorUpperCharacters=The field <b>%s</b> must not contain special characters, nor upper case characters and cannot contain only numbers. -ErrorFieldMustHaveXChar=The field <b>%s</b> must have at least %s characters. +ErrorFieldCanNotContainSpecialCharacters=Pole <b> %s </b> nie może zawierać znaków specjalnych. +ErrorFieldCanNotContainSpecialNorUpperCharacters=Pole <b> %s </b> nie może zawierać znaków specjalnych ani wielkich liter i nie może zawierać tylko cyfr. +ErrorFieldMustHaveXChar=Pole <b> %s </b> musi zawierać co najmniej %s znaków. ErrorNoAccountancyModuleLoaded=Nie aktywowano modułu księgowości ErrorExportDuplicateProfil=Ta nazwa profil już istnieje dla tego zestawu eksportu. ErrorLDAPSetupNotComplete=Dolibarr-LDAP dopasowywania nie jest kompletna. ErrorLDAPMakeManualTest=A. LDIF plik został wygenerowany w katalogu %s. Spróbuj załadować go ręcznie z wiersza polecenia, aby mieć więcej informacji na temat błędów. -ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Reference <b>%s</b> already exists. -ErrorPleaseTypeBankTransactionReportName=Please enter the bank statement name where the entry has to be reported (Format YYYYMM or YYYYMMDD) -ErrorRecordHasChildren=Failed to delete record since it has some child records. -ErrorRecordHasAtLeastOneChildOfType=Object has at least one child of type %s -ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into another object. +ErrorCantSaveADoneUserWithZeroPercentage=Nie można zapisać akcji ze stanem „nie rozpoczęto”, jeśli również wypełnione jest pole „wykonane przez”. +ErrorRefAlreadyExists=Odniesienie <b> %s </b> już istnieje. +ErrorPleaseTypeBankTransactionReportName=Proszę podać nazwę wyciągu bankowego, na który należy zgłosić wpis (format YYYYMM or YYYYMMDD) +ErrorRecordHasChildren=Nie udało się usunąć rekordu, ponieważ zawiera on niektóre rekordy podrzędne. +ErrorRecordHasAtLeastOneChildOfType=Obiekt ma co najmniej jedno dziecko typu %s +ErrorRecordIsUsedCantDelete=Nie można usunąć rekordu. Jest już używany lub dołączony do innego obiektu. ErrorModuleRequireJavascript=JavaScript nie może być wyłączony aby korzystać z tej funkcji. Aby włączyć/wyłączyć Javascript, przejdź do menu Start->Ustawienia->Ekran. ErrorPasswordsMustMatch=Oba hasła muszą się zgadzać -ErrorContactEMail=A technical error occured. Please, contact administrator to following email <b>%s</b> and provide the error code <b>%s</b> in your message, or add a screen copy of this page. -ErrorWrongValueForField=Field <b>%s</b>: '<b>%s</b>' does not match regex rule <b>%s</b> -ErrorFieldValueNotIn=Field <b>%s</b>: '<b>%s</b>' is not a value found in field <b>%s</b> of <b>%s</b> -ErrorFieldRefNotIn=Field <b>%s</b>: '<b>%s</b>' is not a <b>%s</b> existing ref -ErrorsOnXLines=%s errors found +ErrorContactEMail=Wystąpił błąd techniczny. Skontaktuj się z administratorem pod następującym adresem e-mail <b> %s </b> i podaj w wiadomości kod błędu <b> %s </b> lub dodaj kopię ekranową tej strony. +ErrorWrongValueForField=Pole <b> %s </b>: '<b> %s </b>' nie jest zgodne z regułą wyrażenia regularnego <b>%s</b> +ErrorFieldValueNotIn=Pole <b> %s </b>: '<b> %s </b>' nie jest wartością znajdującą się w polu <b> %s </b> z <b> %s </b> +ErrorFieldRefNotIn=Pole <b> %s </b>: '<b> %s </b>' nie jest </b>%s</b>istniejącym ref +ErrorsOnXLines=Znaleziono błędy %s ErrorFileIsInfectedWithAVirus=Program antywirusowy nie był w stanie potwierdzić (plik może być zainfekowany przez wirusa) ErrorSpecialCharNotAllowedForField=Znaki specjalne nie są dozwolone dla pola "%s" ErrorNumRefModel=Odniesienia nie istnieje w bazie danych (%s) i nie jest zgodna z tą zasadą numeracji. Zmiana nazwy lub usuwanie zapisu w odniesieniu do aktywacji tego modułu. -ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor -ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities -ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete. +ErrorQtyTooLowForThisSupplier=Ilość za mała dla tego dostawcy lub brak zdefiniowanej ceny dla tego produktu dla tego dostawcy +ErrorOrdersNotCreatedQtyTooLow=Niektóre zamówienia nie zostały utworzone z powodu zbyt małej ilości +ErrorModuleSetupNotComplete=Konfiguracja modułu %s wygląda na niekompletną. Idź do Strona Główna - Ustawienia - Moduły/Aplikacje aby ukończyć konfigurację. ErrorBadMask=Błąd w masce wprowadzania ErrorBadMaskFailedToLocatePosOfSequence=Błąd, maska ​​bez kolejnego numeru ErrorBadMaskBadRazMonth=Błąd, zła wartość zresetowane -ErrorMaxNumberReachForThisMask=Maximum number reached for this mask +ErrorMaxNumberReachForThisMask=Osiągnięto maksymalną liczbę dla tej maski ErrorCounterMustHaveMoreThan3Digits=Licznik musi mieć więcej niż 3 cyfry -ErrorSelectAtLeastOne=Error, select at least one entry. -ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transaction that is conciliated +ErrorSelectAtLeastOne=Błąd, wybierz co najmniej jeden wpis. +ErrorDeleteNotPossibleLineIsConsolidated=Nie można usunąć, ponieważ rekord jest powiązany z transakcją bankową, która jest pojednana ErrorProdIdAlreadyExist=%s jest przypisany do innego państwa ErrorFailedToSendPassword=Nie można wysłać hasła ErrorFailedToLoadRSSFile=Nie dostać kanału RSS. Spróbuj dodać stałą MAIN_SIMPLEXMLLOAD_DEBUG czy komunikaty o błędach nie zawiera wystarczających informacji. @@ -122,34 +123,34 @@ ErrorLoginDoesNotExists=Użytkownik <b>%s</b> nie został znaleziony. ErrorLoginHasNoEmail=Ten użytkownik nie ma adresu e-mail. Proces przerwany. ErrorBadValueForCode=Zła wartość kody zabezpieczeń. Wprowadź nową wartość... ErrorBothFieldCantBeNegative=Pola %s i %s nie może być zarówno negatywny -ErrorFieldCantBeNegativeOnInvoice=Field <strong>%s</strong> 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 <b>%s</b>%%). -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=Pole <strong> %s </strong> nie może być ujemne w przypadku tego typu faktury. Jeśli chcesz dodać linię rabatu, po prostu najpierw utwórz rabat (z pola „%s” na karcie podmiotu trzeciego) i zastosuj go do faktury. +ErrorLinesCantBeNegativeForOneVATRate=Suma wierszy (bez podatku) nie może być ujemna dla danej niezerowej stawki VAT (Znaleziono sumę ujemną dla stawki VAT <b> %s </b> %%). +ErrorLinesCantBeNegativeOnDeposits=Wiersze nie mogą być ujemne w depozycie. Jeśli to zrobisz, napotkasz problemy, kiedy będziesz musiał wykorzystać depozyt w końcowej fakturze. ErrorQtyForCustomerInvoiceCantBeNegative=Ilość linii do faktur dla klientów nie może być ujemna ErrorWebServerUserHasNotPermission=Konto użytkownika <b>%s</b> wykorzystywane do wykonywania serwer WWW nie ma zgody na który ErrorNoActivatedBarcode=Nie Typ aktywny kodów kreskowych ErrUnzipFails=Nie udało się rozpakować% s ZipArchive -ErrNoZipEngine=No engine to zip/unzip %s file in this PHP +ErrNoZipEngine=Brak silnika do spakowania/rozpakowania pliku %s w tym PHP ErrorFileMustBeADolibarrPackage=Plik% s musi być pakiet zip Dolibarr -ErrorModuleFileRequired=You must select a Dolibarr module package file +ErrorModuleFileRequired=Musisz wybrać plik pakietu modułu Dolibarr ErrorPhpCurlNotInstalled=PHP CURL nie jest zainstalowany, to jest niezbędne, aby porozmawiać z Paypal ErrorFailedToAddToMailmanList=Nie udało się dodać% s do% s listy Mailman lub podstawy SPIP ErrorFailedToRemoveToMailmanList=Nie udało się usunąć rekord% s do% s listy Mailman lub podstawy SPIP 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'). +ErrorToConnectToMysqlCheckInstance=Połączenie z bazą danych nie powiodło się. Sprawdź, czy serwer bazy danych jest uruchomiony (na przykład za pomocą mysql/mariadb możesz go uruchomić z wiersza poleceń za pomocą polecenia „sudo service mysql start”). ErrorFailedToAddContact=Nie udało się dodać kontaktu -ErrorDateMustBeBeforeToday=The date must be lower than today -ErrorDateMustBeInFuture=The date must be greater than today +ErrorDateMustBeBeforeToday=Data musi być wcześniejsza niż dzisiaj +ErrorDateMustBeInFuture=Data musi być późniejsza niż dzisiaj 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ł <b>%s</b>, 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 ErrorWarehouseMustDiffers=magazyn źródłowy i docelowy musi być różny ErrorBadFormat=Zły format! -ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any third party. Link member to an existing third party or create a new third party before creating subscription with invoice. +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Błąd, ten członek nie jest jeszcze powiązany z żadnym kontrahentem. Połącz członka z istniejącym kontrahentem lub utwórz nowego kontrahenta przed utworzeniem subskrypcji z fakturą. ErrorThereIsSomeDeliveries=Błąd, występuje kilka dostaw związanych z tą przesyłką. Usunięcie odrzucone. -ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank entry that was reconciled -ErrorCantDeletePaymentSharedWithPayedInvoice=Can't delete a payment shared by at least one invoice with status Paid +ErrorCantDeletePaymentReconciliated=Nie można usunąć płatności, która wygenerowała uzgodniony wpis bankowy +ErrorCantDeletePaymentSharedWithPayedInvoice=Nie można usunąć płatności współdzielonej z co najmniej jedną fakturą o statusie Zapłacona ErrorPriceExpression1=Nie można przypisać do stałej '% s' ErrorPriceExpression2=Nie można przedefiniować wbudowanej funkcji "%s" ErrorPriceExpression3=Niezdefiniowana zmienna '% s' w definicji funkcji @@ -158,7 +159,7 @@ ErrorPriceExpression5=Nieoczekiwany '%s' ErrorPriceExpression6=Błędna liczba argumentów (%s podano, %s oczekiwany) ErrorPriceExpression8=Nieoczekiwany operator '%s' ErrorPriceExpression9=Wystąpił nieoczekiwany błąd -ErrorPriceExpression10=Operator '%s' lacks operand +ErrorPriceExpression10=Operator „%s” nie ma operandu ErrorPriceExpression11=Spodziewając '% s' ErrorPriceExpression14=Dzielenie przez zero ErrorPriceExpression17=Niezdefiniowana zmienna '%s' @@ -166,12 +167,12 @@ ErrorPriceExpression19=Nie znaleziono wyrażenia ErrorPriceExpression20=Puste wyrażenie ErrorPriceExpression21=Pusty wynik '%s' ErrorPriceExpression22=Wynik negatywny '%s' -ErrorPriceExpression23=Unknown or non set variable '%s' in %s -ErrorPriceExpression24=Variable '%s' exists but has no value +ErrorPriceExpression23=Nieznana lub nieustawiona zmienna „%s” w %s +ErrorPriceExpression24=Zmienna „%s” istnieje, ale nie ma wartości ErrorPriceExpressionInternal=Wewnętrzny błąd '%s' ErrorPriceExpressionUnknown=Nieznany błąd '%s' ErrorSrcAndTargetWarehouseMustDiffers=Magazyn źródłowy i docelowy musi być różny -ErrorTryToMakeMoveOnProductRequiringBatchData=Error, trying to make a stock movement without lot/serial information, on product '%s' requiring lot/serial information +ErrorTryToMakeMoveOnProductRequiringBatchData=Błąd podczas próby przesunięcia zapasów bez informacji o partii/serii w produkcie „%s” wymagającym informacji o partii/serii ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=Wszystkie zarejestrowane przyjęcia muszą najpierw zostać zweryfikowane (zatwierdzone lub odrzucone) przed dopuszczeniem ich do wykonania tej akcji ErrorCantSetReceptionToTotalDoneWithReceptionDenied=Wszystkie zarejestrowane przyjęcia muszą najpierw zostać zweryfikowane (zatwierdzone) przed dopuszczeniem ich do wykonania tej akcji ErrorGlobalVariableUpdater0=Żądanie HTTP nie powiodło się z powodu błędu '%s' @@ -182,108 +183,116 @@ ErrorGlobalVariableUpdater4=Klient SOAP nie powiodło się z powodu błędu '% s ErrorGlobalVariableUpdater5=Nie wybrano zmiennej globalnej ErrorFieldMustBeANumeric=Pole <b>%s</b> musi mieć wartość numeryczną ErrorMandatoryParametersNotProvided=Obowiązkowe parametr (y) nie przewidziane -ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead. So you must also enter it's status. -ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s +ErrorOppStatusRequiredIfAmount=Określasz szacunkową kwotę dla tego potencjalnego klienta. Musisz więc również wpisać jego status. +ErrorFailedToLoadModuleDescriptorForXXX=Nie udało się załadować klasy deskryptora modułu dla %s ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad definicja tablicy w menu modułu deskryptora (zły stosunek jakości do kluczowego fk_menu) -ErrorSavingChanges=An error has occurred when saving the changes -ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship +ErrorSavingChanges=Wystąpił błąd podczas zapisywania zmian +ErrorWarehouseRequiredIntoShipmentLine=Magazyn jest wymagany na linii do wysyłki ErrorFileMustHaveFormat=Flik musi mieć format %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' -ErrorSupplierCountryIsNotDefined=Country for this vendor is not defined. Correct this first. -ErrorsThirdpartyMerge=Failed to merge the two records. Request canceled. +ErrorFilenameCantStartWithDot=Nazwa pliku nie może zaczynać się od „.” +ErrorSupplierCountryIsNotDefined=Kraj dla tego dostawcy nie jest zdefiniowany. Popraw to najpierw. +ErrorsThirdpartyMerge=Nie udało się scalić dwóch rekordów. Żądanie anulowane. ErrorStockIsNotEnoughToAddProductOnOrder=Zapas dla artykułu %sjest nie wystarczający, aby dodać go do nowego zamówienia ErrorStockIsNotEnoughToAddProductOnInvoice=Zapas dla artykułu %s jest nie wystarczający, aby dodać go do nowej faktury ErrorStockIsNotEnoughToAddProductOnShipment=Zapas dla artykułu %s jest nie wystarczający, aby dodać go do nowej wysyłki ErrorStockIsNotEnoughToAddProductOnProposal=Zapas dla artykułu %s jest nie wystarczający, aby dodać go do nowej propozycji -ErrorFailedToLoadLoginFileForMode=Failed to get the login key for mode '%s'. -ErrorModuleNotFound=File of module was not found. -ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source line id %s (%s) -ErrorFieldAccountNotDefinedForInvoiceLine=Value for Accounting account not defined for invoice id %s (%s) -ErrorFieldAccountNotDefinedForLine=Value for Accounting account not defined for the line (%s) -ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the following syntax rule %s -ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information. -ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. +ErrorFailedToLoadLoginFileForMode=Nie udało się uzyskać klucza logowania dla trybu „%s”. +ErrorModuleNotFound=Nie znaleziono pliku modułu. +ErrorFieldAccountNotDefinedForBankLine=Wartość dla konta księgowego nie została zdefiniowana dla identyfikatora wiersza źródłowego %s (%s) +ErrorFieldAccountNotDefinedForInvoiceLine=Wartość dla konta księgowego nie została zdefiniowana dla identyfikatora faktury %s (%s) +ErrorFieldAccountNotDefinedForLine=Wartość dla konta księgowego nie została zdefiniowana dla wiersza (%s) +ErrorBankStatementNameMustFollowRegex=Błąd, nazwa wyciągu bankowego musi być zgodna z następującą regułą składni %s +ErrorPhpMailDelivery=Sprawdź, czy nie używasz zbyt dużej liczby odbiorców i czy zawartość wiadomości e-mail nie jest podobna do spamu. Poproś także administratora o sprawdzenie plików dziennika zapory i serwera, aby uzyskać pełniejsze informacje. +ErrorUserNotAssignedToTask=Użytkownik musi być przypisany do zadania, aby móc wprowadzić czasochłonne. ErrorTaskAlreadyAssigned=Zadanie dopisane do użytkownika -ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. -ErrorModuleFileSeemsToHaveAWrongFormat2=At least one mandatory directory must exists into zip of module: <strong>%s</strong> or <strong>%s</strong> -ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong> -ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s. -ErrorNoWarehouseDefined=Error, no warehouses defined. -ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' for payment is defined, but value for 'ref' is not valid. +ErrorModuleFileSeemsToHaveAWrongFormat=Wygląda na to, że pakiet modułów ma nieprawidłowy format. +ErrorModuleFileSeemsToHaveAWrongFormat2=Co najmniej jeden obowiązkowy katalog musi istnieć w pliku ZIP modułu: <strong> %s </strong> lub <strong> %s </strong> +ErrorFilenameDosNotMatchDolibarrPackageRules=Nazwa pakietu modułu (<strong> %s </strong>) nie odpowiada oczekiwanej składni nazwy: <strong> %s </strong> +ErrorDuplicateTrigger=Błąd, zduplikowana nazwa wyzwalacza %s. Już załadowano z %s. +ErrorNoWarehouseDefined=Błąd, nie zdefiniowano magazynów. +ErrorBadLinkSourceSetButBadValueForRef=Link, którego używasz, jest nieprawidłowy. Zdefiniowano „źródło” płatności, ale wartość „ref” jest nieprawidłowa. ErrorTooManyErrorsProcessStopped=Zbyt dużo błędów. Proces został zatrzymany. -ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Mass validation is not possible when option to increase/decrease stock is set on this action (you must validate one by one so you can define the warehouse to increase/decrease) -ErrorObjectMustHaveStatusDraftToBeValidated=Object %s must have status 'Draft' to be validated. -ErrorObjectMustHaveLinesToBeValidated=Object %s must have lines to be validated. -ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Only validated invoices can be sent using the "Send by email" mass action. -ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a predefined product or not -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 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 <strong>%s</strong> 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. -ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s -ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. -ErrorURLMustStartWithHttp=URL %s must start with http:// or 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 <b>%s</b>) for the field '<b>%s</b>', 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 '<b>%s</b>' need a lot/serial number -ErrorProductDoesNotNeedBatchNumber=Error, product '<b>%s</b>' does not accept a lot/serial number -ErrorFailedToReadObject=Error, failed to read object of type <b>%s</b> -ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter <b>%s</b> must be enabled into <b>conf/conf.php<b> to allow use of Command Line Interface by the internal job scheduler -ErrorLoginDateValidity=Error, this login is outside the validity date range -ErrorValueLength=Length of field '<b>%s</b>' must be higher than '<b>%s</b>' -ErrorReservedKeyword=The word '<b>%s</b>' is a reserved keyword -ErrorNotAvailableWithThisDistribution=Not available with this distribution -ErrorPublicInterfaceNotEnabled=Public interface was not enabled -ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page -ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page -ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Masowa walidacja nie jest możliwa, gdy w tej akcji ustawiono opcję zwiększania/zmniejszania zapasów (należy walidować pojedynczo, aby można było zdefiniować magazyn do zwiększania/zmniejszania) +ErrorObjectMustHaveStatusDraftToBeValidated=Obiekt %s musi mieć status „Wersja robocza”, aby został zweryfikowany. +ErrorObjectMustHaveLinesToBeValidated=Obiekt %s musi mieć wiersze do walidacji. +ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Za pomocą akcji masowej „Wyślij e-mailem” można wysyłać tylko zweryfikowane faktury. +ErrorChooseBetweenFreeEntryOrPredefinedProduct=Musisz wybrać, czy artykuł jest produktem predefiniowanym, czy nie +ErrorDiscountLargerThanRemainToPaySplitItBefore=Zniżka, którą próbujesz zastosować, jest większa niż kwota do zapłaty. Podziel rabat na 2 mniejsze rabaty wcześniej. +ErrorFileNotFoundWithSharedLink=Nie znaleziono pliku. Być może klucz udostępniania został zmodyfikowany lub plik został niedawno usunięty. +ErrorProductBarCodeAlreadyExists=Kod kreskowy produktu %s już istnieje w innym numerze referencyjnym produktu. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Należy również pamiętać, że używanie zestawów do automatycznego zwiększania/zmniejszania ilości produktów podrzędnych nie jest możliwe, gdy co najmniej jeden produkt podrzędny (lub produkt podrzędny z produktów podrzędnych) wymaga numeru seryjnego/partii. +ErrorDescRequiredForFreeProductLines=Opis jest obowiązkowy dla linii z darmowym produktem +ErrorAPageWithThisNameOrAliasAlreadyExists=Strona/kontener <strong> %s </strong> ma taką samą nazwę lub alternatywny alias, jak ten, którego próbujesz użyć +ErrorDuringChartLoad=Błąd podczas ładowania planu kont. Jeśli kilka kont nie zostało załadowanych, nadal możesz wprowadzić je ręcznie. +ErrorBadSyntaxForParamKeyForContent=Zła składnia parametru keyforcontent. Musi mieć wartość zaczynającą się od %s lub %s +ErrorVariableKeyForContentMustBeSet=Błąd, należy ustawić stałą o nazwie %s (z treścią tekstową do wyświetlenia) lub %s (z zewnętrznym adresem URL do wyświetlenia). +ErrorURLMustStartWithHttp=URL %s musi zaczynać się od http: // lub https: // +ErrorHostMustNotStartWithHttp=Nazwa hosta %s NIE może zaczynać się od http: // lub https: // +ErrorNewRefIsAlreadyUsed=Błąd, nowe odniesienie jest już używane +ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Błąd, nie można usunąć płatności połączonej z zamkniętą fakturą. +ErrorSearchCriteriaTooSmall=Kryteria wyszukiwania są za małe. +ErrorObjectMustHaveStatusActiveToBeDisabled=Obiekty muszą mieć status „Aktywne”, aby mogły być wyłączone +ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Aby obiekty mogły być włączone, muszą mieć stan „Wersja robocza” lub „Wyłączone” +ErrorNoFieldWithAttributeShowoncombobox=Żadne pola nie mają właściwości „showoncombobox” w definicji obiektu „%s”. Nie ma mowy, żeby pokazać kombolistę. +ErrorFieldRequiredForProduct=Pole „%s” jest wymagane dla produktu %s +ProblemIsInSetupOfTerminal=Problem dotyczy konfiguracji terminala %s. +ErrorAddAtLeastOneLineFirst=Najpierw dodaj co najmniej jedną linię +ErrorRecordAlreadyInAccountingDeletionNotPossible=Błąd, rekord został już przeniesiony do księgowości, usunięcie nie jest możliwe. +ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Błąd, język jest obowiązkowy, jeśli ustawisz stronę jako tłumaczenie innej strony. +ErrorLanguageOfTranslatedPageIsSameThanThisPage=Błąd, język przetłumaczonej strony jest taki sam jak ten. +ErrorBatchNoFoundForProductInWarehouse=Nie znaleziono partii / numeru seryjnego dla produktu „%s” w magazynie „%s”. +ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Brak wystarczającej ilości dla tej partii / serii dla produktu „%s” w magazynie „%s”. +ErrorOnlyOneFieldForGroupByIsPossible=Możliwe jest tylko 1 pole dla „Grupuj według” (pozostałe są odrzucane) +ErrorTooManyDifferentValueForSelectedGroupBy=Znaleziono zbyt wiele różnych wartości (więcej niż <b> %s </b>) dla pola „<b> %s </b>”, więc nie możemy użyć go jako grupy graficznej. Pole „Grupuj według” zostało usunięte. Może chciałeś użyć go jako osi X? +ErrorReplaceStringEmpty=Błąd, ciąg znaków do zamiany jest pusty +ErrorProductNeedBatchNumber=Błąd, produkt „<b> %s </b>” wymaga numeru partii / numeru seryjnego +ErrorProductDoesNotNeedBatchNumber=Błąd, produkt „<b> %s </b>” nie akceptuje numeru partii / numeru seryjnego +ErrorFailedToReadObject=Błąd, nie można odczytać obiektu typu <b> %s </b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Błąd, parametr <b> %s </b> musi być włączony w <b> conf / conf.php <b>, aby umożliwić korzystanie z interfejsu wiersza poleceń przez wewnętrzny harmonogram zadań +ErrorLoginDateValidity=Błąd, ten login jest poza zakresem dat ważności +ErrorValueLength=Długość pola „<b> %s </b>” musi być większa niż „<b> %s </b>” +ErrorReservedKeyword=Słowo „<b> %s </b>” jest zastrzeżonym słowem kluczowym +ErrorNotAvailableWithThisDistribution=Niedostępne w tej dystrybucji +ErrorPublicInterfaceNotEnabled=Interfejs publiczny nie został włączony +ErrorLanguageRequiredIfPageIsTranslationOfAnother=Język nowej strony musi być zdefiniowany, jeśli jest ustawiony jako tłumaczenie innej strony +ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=Język nowej strony nie może być językiem źródłowym, jeśli jest ustawiony jako tłumaczenie innej strony +ErrorAParameterIsRequiredForThisOperation=W przypadku tej operacji parametr jest obowiązkowy +ErrorDateIsInFuture=Błąd, data nie może przypadać w przyszłości +ErrorAnAmountWithoutTaxIsRequired=Błąd, kwota jest obowiązkowa +ErrorAPercentIsRequired=Błąd, proszę poprawnie wpisać wartość procentową +ErrorYouMustFirstSetupYourChartOfAccount=Najpierw musisz ustawić swój plan kont # 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=Twój parametr PHP upload_max_filesize (%s) jest wyższy niż parametr PHP post_max_size (%s). To nie jest spójna konfiguracja. 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. -WarningMandatorySetupNotComplete=Click here to setup mandatory parameters -WarningEnableYourModulesApplications=Click here to enable your modules and applications +WarningMandatorySetupNotComplete=Kliknij tutaj, aby ustawić wymagane parametry +WarningEnableYourModulesApplications=Kliknij tutaj, aby włączyć swoje moduły i aplikacje WarningSafeModeOnCheckExecDir=Uwaga, opcja <b>safe_mode</b> w PHP jest więc polecenia muszą być przechowywane wewnątrz katalogu <b>safe_mode_exec_dir</b> parametrów deklarowanych przez php. WarningBookmarkAlreadyExists=Zakładka z tego tytułu lub ten cel (URL) już istnieje. WarningPassIsEmpty=Ostrzeżenie, hasło do bazy danych jest puste. Jest to luka w zabezpieczeniach. Powinieneś dodać hasło do bazy danych i zmienić wpis w pliku conf.php aby zmiany przyniosły efekt. WarningConfFileMustBeReadOnly=Uwaga, plik konfiguracyjny <b>(htdocs / conf / conf.php)</b> mogą być zastąpione przez serwer internetowy. Jest to poważna luka w zabezpieczeniach. Modyfikowanie uprawnień na wniosek jest w trybie tylko do odczytu dla użytkownika system operacyjny używany przez serwer sieci Web. Jeśli używasz systemu Windows i format FAT na dysku, musisz wiedzieć, że ten system plików nie pozwala na dodawanie uprawnień do pliku, więc nie może być całkowicie bezpieczne. WarningsOnXLines=Ostrzeżeń na linii źródło <b>%s</b> -WarningNoDocumentModelActivated=No model, for document generation, has been activated. A model will be chosen by default until you check your module setup. -WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable the installation/migration tools by adding a file <b>install.lock</b> into directory <b>%s</b>. Omitting the creation of this file is a grave security risk. -WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other Setup). +WarningNoDocumentModelActivated=Żaden model do generowania dokumentów nie został aktywowany. Model zostanie wybrany domyślnie, dopóki nie sprawdzisz konfiguracji modułu. +WarningLockFileDoesNotExists=Ostrzeżenie, po zakończeniu instalacji należy wyłączyć narzędzia do instalacji / migracji, dodając plik <b> install.lock </b> do katalogu <b> %s </b>. Pominięcie utworzenia tego pliku stanowi poważne zagrożenie bezpieczeństwa. +WarningUntilDirRemoved=Wszystkie ostrzeżenia dotyczące bezpieczeństwa (widoczne tylko dla administratorów) pozostaną aktywne tak długo, jak długo będzie obecna luka (lub gdy zostanie dodana stała MAIN_REMOVE_INSTALL_WARNING w Setup-> Other Setup). WarningCloseAlways=Ostrzeżenie, zamykanie odbywa się nawet wtedy, gdy kwota zależy od elementów źródłowych i docelowych. Włącz tę funkcję, z zachowaniem ostrożności. WarningUsingThisBoxSlowDown=Ostrzeżenie, za pomocą tego pola spowolnić poważnie do wszystkich stron zawierających pola. WarningClickToDialUserSetupNotComplete=Konfiguracja ClickToDial informacji dla użytkownika nie są kompletne (patrz zakładka ClickToDial na kartę użytkownika). WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funkcja wyłączona gdy konfiguracja wyświetlania jest zoptymalizowana pod kątem osób niewidomych lub przeglądarek tekstowych. WarningPaymentDateLowerThanInvoiceDate=Termin płatności (%s) jest wcześniejszy niż dzień wystawienia faktury (%s) dla faktury %s. WarningTooManyDataPleaseUseMoreFilters=Zbyt wiele danych (więcej niż% s linii). Proszę używać więcej filtrów lub ustawić stałą% s na wyższy limit. -WarningSomeLinesWithNullHourlyRate=Some times were recorded by some users while their hourly rate was not defined. A value of 0 %s per hour was used but this may result in wrong valuation of time spent. +WarningSomeLinesWithNullHourlyRate=Czasami były rejestrowane przez niektórych użytkowników, a ich stawka godzinowa nie była zdefiniowana. Zastosowano wartość 0 %s na godzinę, ale może to skutkować nieprawidłową oceną poświęconego czasu. WarningYourLoginWasModifiedPleaseLogin=Twój login został zmodyfikowany. Z powodów bezpieczeństwa musisz zalogować się z użyciem nowego loginy przed kolejną czynnością. -WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language -WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists -WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report -WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. -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=Warning, failed to add file entry into ECM database index table -WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 -WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningAnEntryAlreadyExistForTransKey=Istnieje już wpis dotyczący klucza tłumaczenia dla tego języka +WarningNumberOfRecipientIsRestrictedInMassAction=Uwaga, liczba różnych odbiorców jest ograniczona do <b> %s </b> podczas korzystania z akcji masowych na listach +WarningDateOfLineMustBeInExpenseReportRange=Uwaga, data wiersza nie mieści się w zakresie raportu z wydatków +WarningProjectDraft=Projekt jest nadal w trybie roboczym. Nie zapomnij go zweryfikować, jeśli planujesz używać zadań. +WarningProjectClosed=Projekt zamknięty. Najpierw musisz go ponownie otworzyć. +WarningSomeBankTransactionByChequeWereRemovedAfter=Niektóre transakcje bankowe zostały usunięte po wygenerowaniu paragonu zawierającego je. Zatem liczba czeków i suma paragonów może różnić się od liczby i sumy na liście. +WarningFailedToAddFileIntoDatabaseIndex=Ostrzeżenie, nie można dodać wpisu pliku do tabeli indeksów bazy danych ECM +WarningTheHiddenOptionIsOn=Ostrzeżenie, ukryta opcja <b> %s </b> jest włączona. +WarningCreateSubAccounts=Ostrzeżenie, nie możesz bezpośrednio utworzyć konta podrzędnego, musisz utworzyć stronę trzecią lub użytkownika i przypisać im kod księgowy, aby znaleźć je na tej liście +WarningAvailableOnlyForHTTPSServers=Dostępne tylko w przypadku korzystania z bezpiecznego połączenia HTTPS. +WarningModuleXDisabledSoYouMayMissEventHere=Moduł %s nie został włączony. Możesz więc przegapić wiele wydarzeń tutaj. +ErrorActionCommPropertyUserowneridNotDefined=Właściciel użytkownika jest wymagany +ErrorActionCommBadType=Wybrany typ zdarzenia (id: %n, kod: %s) nie istnieje w słowniku typów zdarzeń diff --git a/htdocs/langs/pl_PL/externalsite.lang b/htdocs/langs/pl_PL/externalsite.lang index adf883f8d4d..1f03b277a8b 100644 --- a/htdocs/langs/pl_PL/externalsite.lang +++ b/htdocs/langs/pl_PL/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Skonfiguruj link do zewnętrznej strony internetowej -ExternalSiteURL=Zewnętrzny URL strony +ExternalSiteURL=Adres URL witryny zewnętrznej z treścią elementu iframe HTML ExternalSiteModuleNotComplete=Moduł zewnętrznej strony internetowej nie został skonfigurowany poprawny ExampleMyMenuEntry=Moje wejścia do menu diff --git a/htdocs/langs/pl_PL/main.lang b/htdocs/langs/pl_PL/main.lang index 8d654d34ccd..582ec9ed214 100644 --- a/htdocs/langs/pl_PL/main.lang +++ b/htdocs/langs/pl_PL/main.lang @@ -29,8 +29,8 @@ AvailableVariables=Dostępne zmienne substytucji NoTranslation=Brak tłumaczenia Translation=Tłumaczenie CurrentTimeZone=Strefa czasowa PHP (server) -EmptySearchString=Enter non empty search criterias -EnterADateCriteria=Enter a date criteria +EmptySearchString=Wprowadź niepuste kryteria wyszukiwania +EnterADateCriteria=Wprowadź kryteria daty NoRecordFound=Rekord nie został znaleziony. NoRecordDeleted=Brak usuniętych rekordów NotEnoughDataYet=Za mało danych @@ -53,20 +53,20 @@ ErrorFailedToSendMail=Próba wysłania maila nie udana (nadawca=%s, odbiorca=%s) ErrorFileNotUploaded=Plik nie został załadowany. Sprawdź, czy rozmiar nie przekracza maksymalnej dopuszczalnej wagi, lub czy wolne miejsce jest dostępne na dysku. Sprawdz czy nie ma już pliku o takiej samej nazwie w tym katalogu. ErrorInternalErrorDetected=Wykryto błąd ErrorWrongHostParameter=Niewłaściwy parametr hosta -ErrorYourCountryIsNotDefined=Your country is not defined. Go to Home-Setup-Edit and post the form again. +ErrorYourCountryIsNotDefined=Twój kraj nie jest zdefiniowany. Przejdź do Strona Główna-Konfiguracja-Edycja i ponownie opublikuj formularz. ErrorRecordIsUsedByChild=Nie można usunąć rekordu. Rekord jest używany przez inny rekord potomny. ErrorWrongValue=Błędna wartość ErrorWrongValueForParameterX=Nieprawidłowa wartość dla parametru %s ErrorNoRequestInError=Nie wykryto żadneog błednego zapytania. ErrorServiceUnavailableTryLater=Serwis w tej chwili jest niedostępny. Spróbuj później. ErrorDuplicateField=Zduplikuj niepowtarzalną wartość w polu -ErrorSomeErrorWereFoundRollbackIsDone=Some errors were found. Changes have been rolled back. -ErrorConfigParameterNotDefined=Parameter <b>%s</b> is not defined in the Dolibarr config file <b>conf.php</b>. +ErrorSomeErrorWereFoundRollbackIsDone=Znaleziono błędy. Zmiany zostały wycofane. +ErrorConfigParameterNotDefined=Parametr <b> %s </b> nie jest zdefiniowany w pliku konfiguracyjnym Dolibarr <b> conf.php </b>. ErrorCantLoadUserFromDolibarrDatabase=Nie można znaleźć <b>użytkownika %s</b> Dolibarra w bazie danych. ErrorNoVATRateDefinedForSellerCountry=Błąd, nie określono stawki VAT dla kraju " %s". ErrorNoSocialContributionForSellerCountry=Błąd, brak określonej stopy podatkowej dla kraju '%s'. ErrorFailedToSaveFile=Błąd, nie udało się zapisać pliku. -ErrorCannotAddThisParentWarehouse=You are trying to add a parent warehouse which is already a child of a existing warehouse +ErrorCannotAddThisParentWarehouse=Próbujesz dodać magazyn nadrzędny, który jest już podrzędny w stosunku do istniejącego magazynu MaxNbOfRecordPerPage=Max. ilość wierszy na stronę NotAuthorized=Nie masz autoryzacji aby to zrobić SetDate=Ustaw datę @@ -84,10 +84,10 @@ FileUploaded=Plik został pomyślnie przesłany FileTransferComplete=Plik(i) załadowany pomyślnie FilesDeleted=Plik(i) usunięte pomyślnie FileWasNotUploaded=Wybrano pliku do zamontowaia, ale jeszcze nie wysłano. W tym celu wybierz opcję "dołącz plik". -NbOfEntries=No. of entries +NbOfEntries=Liczba wpisów GoToWikiHelpPage=Przeczytaj pomoc online (wymaga połączenia z internetem) GoToHelpPage=Przeczytaj pomoc -DedicatedPageAvailable=There is a dedicated help page related to your current screen +DedicatedPageAvailable=Istnieje specjalna strona pomocy związana z bieżącym ekranem HomePage=Strona główna RecordSaved=Rekord zapisany RecordDeleted=Rekord usunięty @@ -102,7 +102,7 @@ NoAccount=Brak konta? SeeAbove=Patrz wyżej HomeArea=STRONA GŁÓWNA LastConnexion=Ostatnie logowanie -PreviousConnexion=Previous login +PreviousConnexion=Poprzednie logowanie PreviousValue=Poprzednia wartość ConnectedOnMultiCompany=Podłączono do środowiska ConnectedSince=Połączeno od @@ -113,19 +113,19 @@ RequestLastAccessInError=Ostatni błąd zgłoszeń o dostępie do bazy danych ReturnCodeLastAccessInError=Kod zwrotny ostatniego błędu żądania dostępu do bazy danych InformationLastAccessInError=Informacje o najnowszym błędzie żądania dostępu do bazy danych DolibarrHasDetectedError=Dolibarr wykrył błąd techniczny -YouCanSetOptionDolibarrMainProdToZero=You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information. -InformationToHelpDiagnose=This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to remove such notices) +YouCanSetOptionDolibarrMainProdToZero=Możesz przeczytać plik dziennika lub ustawić opcję $ dolibarr_main_prod na „0” w pliku konfiguracyjnym, aby uzyskać więcej informacji. +InformationToHelpDiagnose=Te informacje mogą być przydatne do celów diagnostycznych (możesz ustawić opcję $ dolibarr_main_prod na „1”, aby usunąć takie powiadomienia) MoreInformation=Więcej informacji TechnicalInformation=Informację techniczne TechnicalID=Techniczne ID -LineID=Line ID +LineID=ID linii NotePublic=Uwaga (publiczna) NotePrivate=Uwaga (prywatna) PrecisionUnitIsLimitedToXDecimals=Dolibarr ustawił ograniczenia dokładności cen jednostkowych <b>do %s</b> miejsc po przecinku. DoTest=Test ToFilter=Filtr NoFilter=Brak filtra -WarningYouHaveAtLeastOneTaskLate=Warning, you have at least one element that has exceeded the tolerance time. +WarningYouHaveAtLeastOneTaskLate=Ostrzeżenie, masz co najmniej jeden element, który przekroczył czas tolerancji. yes=tak Yes=Tak no=nie @@ -162,7 +162,7 @@ Close=Zamknij CloseAs=Ustaw status do CloseBox=Usuń widget ze swojej tablicy Confirm=Potwierdź -ConfirmSendCardByMail=Do you really want to send the content of this card by mail to <b>%s</b>? +ConfirmSendCardByMail=Czy na pewno chcesz wysłać zawartość tej karty pocztą na adres <b> %s </b>? Delete=Skasować Remove=Usunąć Resiliate=Zakończ @@ -176,7 +176,7 @@ NotValidated=Nie potwierdzone Save=Zapisać SaveAs=Zapisz jako SaveAndStay=Zapisz i zostań -SaveAndNew=Save and new +SaveAndNew=Zapisz i nowe TestConnection=Test połączenia ToClone=Duplikuj ConfirmCloneAsk=Czy jesteś pewny, chcesz sklonować objekt<b>%s</b>? @@ -201,7 +201,7 @@ ReOpen=Otwórz ponownie Upload=Wczytaj ToLink=Łącze Select=Wybierz -SelectAll=Select all +SelectAll=Zaznacz wszystko Choose=Wybrać Resize=Zmiana rozmiaru ResizeOrCrop=Zmień rozmiar lub przytnij @@ -224,7 +224,7 @@ Value=Wartość PersonalValue=Osobiste wartości NewObject=Nowy %s NewValue=Nowa wartość -OldValue=Old value %s +OldValue=Stara wartość %s CurrentValue=Aktualna wartość Code=Kod Type=Typ @@ -239,8 +239,8 @@ Family=Rodzina Description=Opis Designation=Opis DescriptionOfLine=Opis pozycji -DateOfLine=Date of line -DurationOfLine=Duration of line +DateOfLine=Data linii +DurationOfLine=Czas trwania linii Model=Szablon dokumentu DefaultModel=Domyślny szablon dokumentu Action=Działanie @@ -263,7 +263,7 @@ Cards=Kartki Card=Karta Now=Teraz HourStart=Godzina startu -Deadline=Deadline +Deadline=Ostateczny termin Date=Data DateAndHour=Data i godzina DateToday=Dzisiejsza data @@ -272,12 +272,13 @@ DateStart=Data rozpoczęcia DateEnd=Data zakończenia DateCreation=Data utworzenia DateCreationShort=Data utworzenia -IPCreation=Creation IP +IPCreation=Utworzenie adresu IP DateModification=Zmiana daty DateModificationShort=Data modyfikacji -IPModification=Modification IP +IPModification=Modyfikacja adresu IP DateLastModification=Data ostatniej zmiany DateValidation=Zatwierdzenie daty +DateSigning=Data podpisania DateClosing=Ostateczny termin DateDue=W trakcie terminu DateValue=Wartość daty @@ -294,7 +295,7 @@ DateApprove2=Termin zatwierdzania (drugie zatwierdzenie) RegistrationDate=Data rejestracji UserCreation=Tworzenie użytkownika UserModification=Modyfikacja użytkownika -UserValidation=Validation user +UserValidation=Użytkownik walidacji UserCreationShort=Utwórz użytkownika UserModificationShort=Zmień użytkownika UserValidationShort=Zły. Użytkownik @@ -329,7 +330,7 @@ Morning=Rano Afternoon=Popołudniu Quadri=Kwadrans MonthOfDay=Dzień miesiąca -DaysOfWeek=Days of week +DaysOfWeek=Dni tygodnia HourShort=H MinuteShort=mn Rate=Stawka @@ -352,52 +353,54 @@ Copy=Kopiowanie Paste=Wklej Default=Domyślny DefaultValue=Wartość domyślna -DefaultValues=Default values/filters/sorting +DefaultValues=Wartości domyślne/filtry/sortowanie Price=Cena PriceCurrency=Cena (waluta) UnitPrice=Cena jednostkowa -UnitPriceHT=Unit price (excl.) -UnitPriceHTCurrency=Unit price (excl.) (currency) +UnitPriceHT=Cena jednostkowa (wył.) +UnitPriceHTCurrency=Cena jednostkowa (wył.) (Waluta) UnitPriceTTC=Cena jednostkowa PriceU=cen/szt. PriceUHT=cen/szt (netto) -PriceUHTCurrency=cen/szt (w walucie) +PriceUHTCurrency=Cena jednostkowa (netto) (waluta) PriceUTTC=Podatek należny/naliczony Amount=Ilość AmountInvoice=Kwota faktury AmountInvoiced=Kwota zafakturowana -AmountInvoicedHT=Amount invoiced (excl. tax) -AmountInvoicedTTC=Amount invoiced (inc. tax) +AmountInvoicedHT=Kwota zafakturowana (bez podatku) +AmountInvoicedTTC=Kwota zafakturowana (z podatkiem) AmountPayment=Kwota płatności -AmountHTShort=Amount (excl.) +AmountHTShort=Kwota (wył.) AmountTTCShort=Kwota (zawierająca VAT) AmountHT=Kwota (Bez VAT) AmountTTC=Kwota (zawierająca VAT) AmountVAT=Kwota podatku VAT -MulticurrencyAlreadyPaid=Already paid, original currency +MulticurrencyAlreadyPaid=Już zapłacono, oryginalna waluta MulticurrencyRemainderToPay=Pozostało do zapłaty, oryginalna waluta MulticurrencyPaymentAmount=Kwota płatności, oryginalna waluta -MulticurrencyAmountHT=Amount (excl. tax), original currency +MulticurrencyAmountHT=Kwota (bez podatku), oryginalna waluta MulticurrencyAmountTTC=Kwota (zVAT), oryginalna waluta MulticurrencyAmountVAT=Kwota VAT, oryginalna waluta -MulticurrencySubPrice=Amount sub price multi currency +MulticurrencySubPrice=Kwota ceny podrzędnej w wielu walutach AmountLT1=Wartość podatku 2 AmountLT2=Wartość podatku 3 AmountLT1ES=Kwota RE AmountLT2ES=Kwota IRPF AmountTotal=Całkowita kwota AmountAverage=Średnia kwota -PriceQtyMinHT=Price quantity min. (excl. tax) -PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PriceQtyMinHT=Cena ilość min. (bez podatku) +PriceQtyMinHTCurrency=Cena ilość min. (bez podatku) (waluta) +PercentOfOriginalObject=Procent oryginalnego obiektu +AmountOrPercent=Kwota lub procent Percentage=Procentowo Total=Razem SubTotal=Po podliczeniu -TotalHTShort=Total (excl.) -TotalHT100Short=Total 100%% (excl.) -TotalHTShortCurrency=Total (excl. in currency) +TotalHTShort=Razem (wył.) +TotalHT100Short=Razem 100%% (wył.) +TotalHTShortCurrency=Razem (bez waluty) TotalTTCShort=Ogółem (z VAT) TotalHT=Total (Bez VAT) -TotalHTforthispage=Total (excl. tax) for this page +TotalHTforthispage=Razem (bez podatku) dla tej strony Totalforthispage=Suma dla tej strony TotalTTC=Ogółem (z VAT) TotalTTCToYourCredit=Ogółem (z VAT) na twoje konto @@ -416,19 +419,19 @@ INCT=Zawiera wszystkie podatki VAT=Stawka VAT VATIN=IGST VATs=Podatek od sprzedaży -VATINs=IGST taxes -LT1=Sales tax 2 -LT1Type=Sales tax 2 type -LT2=Sales tax 3 -LT2Type=Sales tax 3 type +VATINs=Zintegrowany podatek od towarów i usług +LT1=Podatek obrotowy 2 +LT1Type=Rodzaj podatku od sprzedaży 2 +LT2=Podatek obrotowy 3 +LT2Type=Rodzaj podatku od sprzedaży 3 LT1ES=RE LT2ES=IRPF -LT1IN=CGST -LT2IN=SGST -LT1GC=Additionnal cents +LT1IN=Centralny podatek od towarów i usług +LT2IN=Stanowy podatek od towarów i usług +LT1GC=Dodatkowe centy VATRate=Stawka VAT VATCode=Kod stawki podatkowej -VATNPR=Tax Rate NPR +VATNPR=Stawka podatku NPR DefaultTaxRate=Domyślna stawka podatku Average=Średni Sum=Suma @@ -438,10 +441,10 @@ RemainToPay=Pozostało do zapłaty Module=Moduł/Aplikacja Modules=Moduły/Aplikacje Option=Opcja -Filters=Filters +Filters=Filtry List=Lista FullList=Pełna lista -FullConversation=Full conversation +FullConversation=Pełna rozmowa Statistics=Statystyki OtherStatistics=Inne statystyki Status=Stan @@ -461,16 +464,16 @@ ActionNotApplicable=Nie dotyczy ActionRunningNotStarted=By rozpocząć ActionRunningShort=W trakcie ActionDoneShort=Zakończone -ActionUncomplete=Incomplete -LatestLinkedEvents=Latest %s linked events +ActionUncomplete=Niekompletny +LatestLinkedEvents=Najnowsze powiązane wydarzenia %s CompanyFoundation=Firma/Organizacja Accountant=Księgowa ContactsForCompany=Kontakty dla tego zamówienia ContactsAddressesForCompany=Kontakt/adres dla tej części/zamówienia/ AddressesForCompany=Adressy dla części trzeciej -ActionsOnCompany=Events for this third party -ActionsOnContact=Events for this contact/address -ActionsOnContract=Events for this contract +ActionsOnCompany=Wydarzenia dla tej strony trzeciej +ActionsOnContact=Wydarzenia dla tego kontaktu/adresu +ActionsOnContract=Wydarzenia związane z tym kontraktem ActionsOnMember=Informacje o wydarzeniach dla tego uzytkownika ActionsOnProduct=Wydarzenia dotyczące tego produktu NActionsLate=%s późno @@ -488,9 +491,9 @@ Generate=Wygeneruj Duration=Czas trwania TotalDuration=Łączny czas trwania Summary=Podsumowanie -DolibarrStateBoard=Database Statistics -DolibarrWorkBoard=Open Items -NoOpenedElementToProcess=No open element to process +DolibarrStateBoard=Statystyki bazy danych +DolibarrWorkBoard=Otwarte przedmioty +NoOpenedElementToProcess=Brak otwartego elementu do przetworzenia Available=Dostępny NotYetAvailable=Nie są jeszcze dostępne NotAvailable=Niedostępne @@ -500,7 +503,7 @@ By=Przez From=Od FromDate=Z FromLocation=Z -at=at +at=w to=do To=do and=i @@ -521,12 +524,12 @@ Reporting=Raportowanie Reportings=Raportowanie Draft=Szkic Drafts=Robocze -StatusInterInvoiced=Invoiced +StatusInterInvoiced=Zafakturowano Validated=Zatwierdzona -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Zatwierdzony (do produkcji) Opened=Otwarte -OpenAll=Open (All) -ClosedAll=Closed (All) +OpenAll=Otworzone (wszystko) +ClosedAll=Zamknięte (wszystkie) New=Nowy Discount=Rabat Unknown=Nieznany @@ -548,8 +551,8 @@ None=Żaden NoneF=Żaden NoneOrSeveral=Brak lub kilka Late=Późno -LateDesc=An item is defined as Delayed as per the system configuration in menu Home - Setup - Alerts. -NoItemLate=No late item +LateDesc=Pozycja jest definiowana jako Opóźniona zgodnie z konfiguracją systemu w menu Strona główna - Konfiguracja - Alerty. +NoItemLate=Brak spóźnionej pozycji Photo=Obraz Photos=Obrazy AddPhoto=Dodaj obraz @@ -656,7 +659,7 @@ SupplierPreview=Podgląd dostawcy ShowCustomerPreview=Pokaż podgląd klienta ShowSupplierPreview=Pokaż podgląd dostawcy RefCustomer=Nr ref. klient -InternalRef=Internal ref. +InternalRef=Ref. Wewnętrzne Currency=Waluta InfoAdmin=Informacje dla administratorów Undo=Cofnij @@ -669,7 +672,7 @@ FeatureNotYetSupported=Funkcja nie jest jeszcze obsługiwana CloseWindow=Zamknij okno Response=Odpowiedź Priority=Priorytet -SendByMail=Wyślij przez email +SendByMail=Wyślij przez e-mail MailSentBy=E-mail został wysłany przez NotSent=Nie wysłał TextUsedInTheMessageBody=Zawartość emaila @@ -678,13 +681,13 @@ SendMail=Wyślij wiadomość email Email=Adres e-mail NoEMail=Brak e-mail AlreadyRead=Obecnie przeczytane -NotRead=Unread +NotRead=nieprzeczytane NoMobilePhone=Brak telefonu komórkowego Owner=Właściciel FollowingConstantsWillBeSubstituted=Kolejna zawartość będzie zastąpiona wartością z korespondencji. Refresh=Odśwież BackToList=Powrót do listy -BackToTree=Back to tree +BackToTree=Powrót do drzewa GoBack=Wróć CanBeModifiedIfOk=Mogą być zmienione jeśli ważne CanBeModifiedIfKo=Mogą być zmienione, jeśli nie ważne @@ -692,9 +695,9 @@ ValueIsValid=Wartość jest poprawna ValueIsNotValid=Wartość jest niepoprawna RecordCreatedSuccessfully=Wpis utworzony pomyślnie RecordModifiedSuccessfully=Zapis zmodyfikowany pomyślnie -RecordsModified=%s record(s) modified -RecordsDeleted=%s record(s) deleted -RecordsGenerated=%s record(s) generated +RecordsModified=%s zmodyfikowanych rekordów +RecordsDeleted= %s usuniętych rekordó +RecordsGenerated=%swygenerowanych rekordów AutomaticCode=Automatyczny kod FeatureDisabled=Funkcja wyłączona MoveBox=Przenieś widget @@ -705,14 +708,14 @@ Method=Metoda Receive=Odbiór CompleteOrNoMoreReceptionExpected=Pełna lub niczego więcej nie oczekiwano ExpectedValue=Oczekiwana wartość -ExpectedQty=Expected Qty +ExpectedQty=Oczekiwana ilość PartialWoman=Część TotalWoman=Razem NeverReceived=Nigdy nie otrzymała Canceled=Anulowany YouCanChangeValuesForThisListFromDictionarySetup=Wartości dla tej listy można zmieniać w menu Konfiguracja - Słowniki YouCanChangeValuesForThisListFrom=Możesz zmienić wartości dla tej listy z menu %s -YouCanSetDefaultValueInModuleSetup=You can set the default value used when creating a new record in module setup +YouCanSetDefaultValueInModuleSetup=Możesz ustawić domyślną wartość używaną podczas tworzenia nowego rekordu w konfiguracji modułu Color=Kolor Documents=Związanych plików Documents2=Dokumenty @@ -722,9 +725,9 @@ MenuECM=Dokumenty MenuAWStats=AWStats MenuMembers=Członkowie MenuAgendaGoogle=Google agenda -MenuTaxesAndSpecialExpenses=Taxes | Special expenses +MenuTaxesAndSpecialExpenses=Podatki | Wydatki specjalne ThisLimitIsDefinedInSetup=Limit Dollibara (Menu główne-setup-bezpieczeństwo): %s KB, PHP, limit: %s KB -NoFileFound=Brak dokumentów zapisanych w tym katalogu +NoFileFound=Brak wgranych dokumentów CurrentUserLanguage=Język bieżący CurrentTheme=Aktualny temat CurrentMenuManager=Aktualny Menu menager @@ -739,39 +742,39 @@ DateOfSignature=Data podpisu HidePassword=Pokaż polecenie z ukrytym hasłem UnHidePassword=Pokaż prawdziwe polecenie z otwartym hasłem Root=Root -RootOfMedias=Root of public medias (/medias) +RootOfMedias=Katalog główny mediów publicznych (/medias) Informations=Informacja Page=Strona Notes=Uwagi AddNewLine=Dodaj nowy wiersz AddFile=Dodaj plik -FreeZone=Free-text product -FreeLineOfType=Free-text item, type: +FreeZone=Produkt dowolnego tekstu +FreeLineOfType=Element dowolny, wpisz: CloneMainAttributes=Skopiuj obiekt z jego głównymi atrybutami -ReGeneratePDF=Re-generate PDF +ReGeneratePDF=Wygeneruj ponownie PDF PDFMerge=Scalanie/ dzielenie PDF Merge=Scalanie/ dzielenie DocumentModelStandardPDF=Standardowy szablon PDF PrintContentArea=Pokaż stronę do wydruku głównej treści MenuManager=Menu menager -WarningYouAreInMaintenanceMode=Warning, you are in maintenance mode: only login <b>%s</b> is allowed to use the application in this mode. +WarningYouAreInMaintenanceMode=Ostrzeżenie, jesteś w trybie konserwacji: tylko logowanie <b> %s </b> może używać aplikacji w tym trybie. CoreErrorTitle=Błąd systemu CoreErrorMessage=Przepraszamy, napotkano błąd. Skontaktuj się z administratorem w celu sprawdzenia logów lub wyłącz $dolibarr_main_prod=1 aby uzyskać więcej informacji. CreditCard=Karta kredytowa ValidatePayment=Weryfikacja płatności CreditOrDebitCard=Karta debetowa lub kredytowa FieldsWithAreMandatory=Pola <b>%s</b> są obowiązkowe -FieldsWithIsForPublic=Fields with <b>%s</b> are shown in public list of members. If you don't want this, uncheck the "public" box. -AccordingToGeoIPDatabase=(according to GeoIP conversion) +FieldsWithIsForPublic=Pola z <b> %s </b> są wyświetlane na publicznej liście członków. Jeśli tego nie chcesz, odznacz pole „publiczne”. +AccordingToGeoIPDatabase=(zgodnie z konwersją GeoIP) Line=Linia NotSupported=Nie są obsługiwane RequiredField=Pole wymagane Result=Wynik ToTest=Test -ValidateBefore=Item must be validated before using this feature +ValidateBefore=Przed skorzystaniem z tej funkcji należy zweryfikować przedmiot Visibility=Widoczność -Totalizable=Totalizable -TotalizableDesc=This field is totalizable in list +Totalizable=Sumowalne +TotalizableDesc=To pole można podsumować na liście Private=Prywatny Hidden=Ukryty Resources=Zasoby @@ -790,18 +793,18 @@ LinkTo=Link do LinkToProposal=Link do oferty LinkToOrder=Link do zamówienia LinkToInvoice=Link do faktury -LinkToTemplateInvoice=Link to template invoice -LinkToSupplierOrder=Link to purchase order -LinkToSupplierProposal=Link to vendor proposal -LinkToSupplierInvoice=Link to vendor invoice +LinkToTemplateInvoice=Link do szablonu faktury +LinkToSupplierOrder=Link do zamówienia +LinkToSupplierProposal=Link do propozycji dostawcy +LinkToSupplierInvoice=Link do faktury dostawcy LinkToContract=Link do umowy LinkToIntervention=Link do interwencji LinkToTicket=Link do biletu CreateDraft=Utwórz Szic SetToDraft=Wróć do szkicu ClickToEdit=Kliknij by edytować -ClickToRefresh=Click to refresh -EditWithEditor=Edit with CKEditor +ClickToRefresh=Kliknij, aby odświeżyć +EditWithEditor=Edytuj za pomocą CKEditor EditWithTextEditor=Edytuj w edytorze tekstowym EditHTMLSource=Edytuj źródło HTML ObjectDeleted=%s obiekt usunięty @@ -815,7 +818,7 @@ ByDay=Według dnia BySalesRepresentative=Według przedstawiciela handlowego LinkedToSpecificUsers=Podpięty do kontaktu współużytkownika NoResults=Brak wyników -AdminTools=Admin Tools +AdminTools=Narzędzia administracyjne SystemTools=Narzędzia systemowe ModulesSystemTools=Narzędzia modułów Test=Test @@ -845,7 +848,7 @@ PrintFile=Wydrukuj plik %s ShowTransaction=Pokaż wpisy na koncie bankowym ShowIntervention=Pokaż interwencję ShowContract=Pokaż umowę -GoIntoSetupToChangeLogo=Go to Home - Setup - Company to change logo or go to Home - Setup - Display to hide. +GoIntoSetupToChangeLogo=Przejdź do Strona główna - Ustawienia - Firma, aby zmienić logo, lub przejdź do Strona główna - Ustawienia - Wyświetl, aby ukryć. Deny=Zabraniać Denied=Zabroniony ListOf=Lista %s @@ -855,61 +858,63 @@ Genderman=Mężczyzna Genderwoman=Kobieta Genderother=Inne ViewList=Widok listy -ViewGantt=Gantt view -ViewKanban=Kanban view +ViewGantt=Widok Gantta +ViewKanban=Widok Kanban Mandatory=Zleceniobiorca Hello=Witam GoodBye=Do widzenia Sincerely=Z poważaniem -ConfirmDeleteObject=Are you sure you want to delete this object? +ConfirmDeleteObject=Czy na pewno chcesz usunąć ten obiekt? DeleteLine=Usuń linię ConfirmDeleteLine=Czy jesteś pewien, że chcesz usunąć tą linię? -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=Błąd: plik nie został wygenerowany. Sprawdź, czy polecenie „pdftk” jest zainstalowane w katalogu zawartym w zmiennej środowiskowej $PATH (tylko linux/unix) lub skontaktuj się z administratorem systemu. NoPDFAvailableForDocGenAmongChecked=Na potrzeby generowania dokumentów nie było dostępnych plików PDF -TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. +TooManyRecordForMassAction=Wybrano zbyt wiele rekordów do akcji masowej. Akcja jest ograniczona do listy rekordów %s. NoRecordSelected=Nie wybrano wpisu MassFilesArea=Obszar plików zbudowanych masowo ShowTempMassFilesArea=Wyświetl obszar plików zbudowanych masowo -ConfirmMassDeletion=Bulk Delete confirmation -ConfirmMassDeletionQuestion=Are you sure you want to delete the %s selected record(s)? +ConfirmMassDeletion=Potwierdzenie usuwania zbiorczego +ConfirmMassDeletionQuestion=Czy na pewno chcesz usunąć wybrane rekordy %s? RelatedObjects=Powiązane obiekty ClassifyBilled=Oznacz jako zafakturowana -ClassifyUnbilled=Classify unbilled +ClassifyUnbilled=Klasyfikuj niezafakturowane Progress=Postęp ProgressShort=Progr. FrontOffice=Front office BackOffice=Powrót do biura -Submit=Submit +Submit=Zatwierdź View=Widok Export=Eksport Exports=Eksporty ExportFilteredList=Eksportuj przefiltrowaną listę ExportList=Eksportuj listę ExportOptions=Opcje eksportu -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=Uwzględnij dokumenty już wyeksportowane +ExportOfPiecesAlreadyExportedIsEnable=Eksport już wyeksportowanych elementów jest włączony +ExportOfPiecesAlreadyExportedIsDisable=Eksport już wyeksportowanych elementów jest wyłączony +AllExportedMovementsWereRecordedAsExported=Wszystkie eksportowane przemieszczenia były rejestrowane jako eksportowane +NotAllExportedMovementsCouldBeRecordedAsExported=Nie wszystkie wyeksportowane przepływy można było zarejestrować jako wyeksportowane Miscellaneous=Różne Calendar=Kalendarz GroupBy=Grupuj według ViewFlatList=Zobacz płaską listę -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +ViewAccountList=Wyświetl księgę +ViewSubAccountList=Wyświetl księgę subkontową RemoveString=Usuń ciąg '%s' -SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Bezpośredni link do pobierania (publiczny / zewnętrzny) -DirectDownloadInternalLink=Bezpośredni link do pobrania (musisz się zalogować i potrzebujesz uprawnień) +SomeTranslationAreUncomplete=Niektóre z oferowanych języków mogą być przetłumaczone tylko częściowo lub mogą zawierać błędy. Pomóż poprawić język, rejestrując się pod adresem <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> w celu dodania ulepszeń. +DirectDownloadLink=Publiczny link do pobrania +PublicDownloadLinkDesc=Do pobrania pliku wymagane jest tylko łącze +DirectDownloadInternalLink=Prywatny link do pobrania +PrivateDownloadLinkDesc=Musisz być zalogowany i potrzebujesz uprawnień, aby wyświetlić lub pobrać plik Download=Pobierz DownloadDocument=Pobierz dokument ActualizeCurrency=Aktualizuj kurs walut Fiscalyear=Rok podatkowy -ModuleBuilder=Module and Application Builder +ModuleBuilder=Kreator modułów i aplikacji SetMultiCurrencyCode=Ustaw walutę BulkActions=Masowe działania ClickToShowHelp=Kliknij, aby wyświetlić etykietę pomocy -WebSite=Website +WebSite=Strona internetowa WebSites=Strony internetowe WebSiteAccounts=Konta witryny ExpenseReport=Raport kosztów @@ -918,25 +923,25 @@ HR=Dział personalny HRAndBank=HR i Bank AutomaticallyCalculated=Automatycznie przeliczone TitleSetToDraft=Powróć do wersji roboczej -ConfirmSetToDraft=Are you sure you want to go back to Draft status? +ConfirmSetToDraft=Czy na pewno chcesz wrócić do stanu wersji roboczej? ImportId=ID importu Events=Wydarzenia -EMailTemplates=Email templates -FileNotShared=File not shared to external public +EMailTemplates=Szablony wiadomości +FileNotShared=Plik nie jest udostępniony publicznie poza domenę Project=Projekt Projects=Projekty -LeadOrProject=Lead | Project -LeadsOrProjects=Leads | Projects +LeadOrProject=Lead | Projekt +LeadsOrProjects=Leady | Projekty Lead=Lead -Leads=Leads -ListOpenLeads=List open leads -ListOpenProjects=List open projects -NewLeadOrProject=New lead or project +Leads=Leady +ListOpenLeads=Lista otwartych leadów +ListOpenProjects=Lista otwartych projektów +NewLeadOrProject=Nowy lead lub projekt Rights=Uprawnienia LineNb=Linia nr IncotermLabel=Formuły handlowe -TabLetteringCustomer=Customer lettering -TabLetteringSupplier=Vendor lettering +TabLetteringCustomer=Napis klienta +TabLetteringSupplier=Napis dostawcy Monday=Poniedziałek Tuesday=Wtorek Wednesday=Środa @@ -965,39 +970,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 +one=jeden +two=dwa +three=trzy +four=cztery +five=pięć +six=sześć +seven=siedem +eight=osiem +nine=dziewięć +ten=dziesięć +eleven=jedenaście +twelve=dwanaście +thirteen=trzynaście +fourteen=czternaście +fifteen=piętnaście +sixteen=szesnaście +seventeen=siedemnaście +eighteen=osiemnaście +nineteen=dziewiętnaście +twenty=dwadzieścia +thirty=trzydzieści +forty=czterdzieści +fifty=pięćdziesiąt +sixty=sześćdziesiąt +seventy=siedemdziesiąt +eighty=osiemdziesiąt +ninety=dziewięćdziesiąt +hundred=sto +thousand=tysiąc +million=milion +billion=miliard +trillion=kwintylion +quadrillion=kwadrylion SelectMailModel=Wybierz szablon wiadomości email SetRef=Ustaw referencję Select2ResultFoundUseArrows=Znaleziono pewne wyniki. Użyj strzałek, aby wybrać. @@ -1005,7 +1010,7 @@ Select2NotFound=Nie znaleziono wyników Select2Enter=Enter Select2MoreCharacter=lub więcej znaków Select2MoreCharacters=lub więcej znaków -Select2MoreCharactersMore=<strong>Search syntax:</strong><br><kbd><strong> |</strong></kbd><kbd> OR</kbd> (a|b)<br><kbd><strong>*</strong></kbd><kbd> Any character</kbd> (a*b)<br><kbd><strong>^</strong></kbd><kbd> Start with</kbd> (^ab)<br><kbd><strong>$</strong></kbd><kbd> End with</kbd> (ab$)<br> +Select2MoreCharactersMore= <strong> Składnia wyszukiwania: </strong> <br> <kbd> <strong>|</strong> </kbd> <kbd> LUB </kbd> (a|b) <br> <kbd> <strong>*</strong> </kbd> <kbd> Każda postać </kbd> (a*b) <br> <kbd> <strong>^</strong> </kbd> <kbd> Zacznij </kbd> (^ab) <br> <kbd> <strong>$</strong> </kbd> <kbd> kończyć </kbd> ( ab$) <br> Select2LoadingMoreResults=Ładuję więcej wyników... Select2SearchInProgress=Wyszukiwanie w trakcie... SearchIntoThirdparties=Kontrahenci @@ -1013,8 +1018,9 @@ SearchIntoContacts=Kontakty SearchIntoMembers=Członkowie SearchIntoUsers=Użytkownicy SearchIntoProductsOrServices=Produkty lub usługi +SearchIntoBatch=Partie / numery seryjne SearchIntoProjects=Projekty -SearchIntoMO=Manufacturing Orders +SearchIntoMO=Zamówienia produkcyjne SearchIntoTasks=Zadania SearchIntoCustomerInvoices=Faktury klienta SearchIntoSupplierInvoices=Faktury dostawcy @@ -1026,10 +1032,10 @@ SearchIntoInterventions=Interwencje SearchIntoContracts=Kontrakty SearchIntoCustomerShipments=Wysyłki klienta SearchIntoExpenseReports=Zestawienia wydatków -SearchIntoLeaves=Leave +SearchIntoLeaves=Pozostawiać SearchIntoTickets=Bilety -SearchIntoCustomerPayments=Customer payments -SearchIntoVendorPayments=Vendor payments +SearchIntoCustomerPayments=Płatności klientów +SearchIntoVendorPayments=Płatności dostawcy SearchIntoMiscPayments=Różne płatności CommentLink=Komentarze NbComments=Ilość komentarzy @@ -1038,7 +1044,7 @@ CommentAdded=Komentarz dodany CommentDeleted=Komentarz usunięty Everybody=Wszyscy PayedBy=Płacone przez -PayedTo=Paid to +PayedTo=Zapłacono do Monthly=Miesięcznie Quarterly=Kwartalnie Annual=Rocznie @@ -1048,75 +1054,78 @@ LocalAndRemote=Lokalnie i zdalnie KeyboardShortcut=Skróty klawiaturowe AssignedTo=Przypisany do Deletedraft=Usuń szkic -ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link -SelectAThirdPartyFirst=Select a third party first... +ConfirmMassDraftDeletion=Wersja robocza potwierdzenia masowego usunięcia +FileSharedViaALink=Plik udostępniony za pomocą linku publicznego +SelectAThirdPartyFirst=Najpierw wybierz kontrahenta ... YouAreCurrentlyInSandboxMode=Aktualnie korzystasz z trybu "sandbox" %s Inventory=Inwentaryzacja -AnalyticCode=Analytic code +AnalyticCode=Kod analityczny 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 +ShowCompanyInfos=Pokaż informacje o firmie +ShowMoreInfos=Pokaż więcej informacji +NoFilesUploadedYet=Najpierw prześlij dokument +SeePrivateNote=Zobacz notatkę prywatną +PaymentInformation=Informacje dotyczące płatności +ValidFrom=Ważne od +ValidUntil=Ważne do +NoRecordedUsers=Brak użytkowników +ToClose=Do zamknięcia ToProcess=Do przetworzenia -ToApprove=To approve -GlobalOpenedElemView=Global view -NoArticlesFoundForTheKeyword=No article found for the keyword '<strong>%s</strong>' -NoArticlesFoundForTheCategory=No article found for the category -ToAcceptRefuse=To accept | refuse +ToApprove=Do zatwierdzenia +GlobalOpenedElemView=Widok globalny +NoArticlesFoundForTheKeyword=Nie znaleziono artykułu dla słowa kluczowego „<strong> %s </strong>” +NoArticlesFoundForTheCategory=Nie znaleziono artykułów w tej kategorii +ToAcceptRefuse=Do zaakceptowania | odrzucenia ContactDefault_agenda=Wydarzenie ContactDefault_commande=Zamówienie ContactDefault_contrat=Kontrakt ContactDefault_facture=Faktura ContactDefault_fichinter=Interwencja -ContactDefault_invoice_supplier=Supplier Invoice -ContactDefault_order_supplier=Purchase Order +ContactDefault_invoice_supplier=Faktura dostawcy +ContactDefault_order_supplier=Zamówienie ContactDefault_project=Projekt ContactDefault_project_task=Zadanie ContactDefault_propal=Oferta -ContactDefault_supplier_proposal=Supplier Proposal -ContactDefault_ticket=Ticket -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 +ContactDefault_supplier_proposal=Propozycja dostawcy +ContactDefault_ticket=Bilet +ContactAddedAutomatically=Kontakt został dodany z ról kontaktu kontrahenta +More=Więcej +ShowDetails=Pokaż szczegóły +CustomReports=Raporty niestandardowe +StatisticsOn=Statystyki włączone +SelectYourGraphOptionsFirst=Wybierz opcje wykresu, aby zbudować wykres +Measures=Środki +XAxis=Oś X +YAxis=Oś Y. +StatusOfRefMustBe=Status %s musi być %s +DeleteFileHeader=Potwierdź usunięcie pliku +DeleteFileText=Czy na pewno chcesz usunąć ten plik? +ShowOtherLanguages=Pokaż inne języki +SwitchInEditModeToAddTranslation=Przełącz się w tryb edycji, aby dodać tłumaczenia dla tego języka +NotUsedForThisCustomer=Nieużywany dla tego klienta +AmountMustBePositive=Kwota musi być dodatnia +ByStatus=Według statusu InformationMessage=Informacja -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 +Used=Używany +ASAP=Tak szybko, jak to możliwe +CREATEInDolibarr=Utworzono rekord %s +MODIFYInDolibarr=Rekord %s zmodyfikowany +DELETEInDolibarr=Rekord %s został usunięty +VALIDATEInDolibarr=Rekord %s został zweryfikowany +APPROVEDInDolibarr=Rekord %s został zatwierdzony +DefaultMailModel=Domyślny model poczty +PublicVendorName=Publiczna nazwa dostawcy DateOfBirth=Data urodzenia -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. -UpToDate=Up-to-date -OutOfDate=Out-of-date -EventReminder=Event Reminder -UpdateForAllLines=Update for all lines +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Token bezpieczeństwa wygasł, więc akcja została anulowana. Proszę spróbuj ponownie. +UpToDate=Aktualny +OutOfDate=Przeterminowany +EventReminder=Przypomnienie o wydarzeniu +UpdateForAllLines=Aktualizacja dla wszystkich linii OnHold=Wstrzymany -Civility=Civility -AffectTag=Affect Tag -ConfirmAffectTag=Bulk Tag Affect -ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? -CategTypeNotFound=No tag type found for type of records +Civility=Grzeczność +AffectTag=Wpływ na Tag +ConfirmAffectTag=Wpływ tagu zbiorczego +ConfirmAffectTagQuestion=Czy na pewno chcesz wpłynąć na tagi %s wybranych rekordów? +CategTypeNotFound=Nie znaleziono typu tagu dla typu rekordów +CopiedToClipboard=Skopiowane do schowka +InformationOnLinkToContract=Kwota ta to tylko suma wszystkich pozycji zamówienia. Nie bierze się pod uwagę żadnego pojęcia czasu. diff --git a/htdocs/langs/pl_PL/margins.lang b/htdocs/langs/pl_PL/margins.lang index 3b161a492b0..21093727beb 100644 --- a/htdocs/langs/pl_PL/margins.lang +++ b/htdocs/langs/pl_PL/margins.lang @@ -16,29 +16,30 @@ MarginDetails=Szczegóły marży ProductMargins=Marża produktu CustomerMargins=Marża klienta SalesRepresentativeMargins=Sprzedaż marże reprezentatywne +ContactOfInvoice=Kontakt do faktury UserMargins=Marginesy użytkownika ProductService=Produkt lub usługa AllProducts=Wszystkie produkty i usługi ChooseProduct/Service=Wybierz produkt lub usługę ForceBuyingPriceIfNull=Wymuszaj cenę zakupu/cenę fabryczną jako cenę sprzedaży jeżeli ta nie jest zdefiniowana -ForceBuyingPriceIfNullDetails=Jeżeli cena zakupu/koszt nie jest zdefiniowana, a ta opcja jest "ON", marża będzie równa 0 (cena zakupu/koszt = cena sprzedaży), w przeciwnym razie ("OFF"), marża będzie równa sugerowanej domyślnie. +ForceBuyingPriceIfNullDetails=Jeśli cena zakupu / koszt nie zostanie podana podczas dodawania nowej linii, a ta opcja jest włączona, marża w nowej linii będzie wynosić 0 (cena zakupu / koszt = cena sprzedaży). Jeśli ta opcja jest „WYŁĄCZONA” (zalecane), margines będzie równy wartości sugerowanej domyślnie (i może wynosić 100%, jeśli nie można znaleźć wartości domyślnej). MARGIN_METHODE_FOR_DISCOUNT=Sposób na marżę dla globalnych rabatów UseDiscountAsProduct=Jako produkt UseDiscountAsService=Jako usługa UseDiscountOnTotal=Na podsumy MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Określa, czy globalne rabatu jest traktowana jako produktu, usługi lub tylko na sumy częściowej obliczania marży. MARGIN_TYPE=Cena zakupu/cena fabryczna jest sugerowana jako domyślna do obliczenia marży -MargeType1=Margin on Best vendor price -MargeType2=Marża na średniej cenie ważonej +MargeType1=Marża na najlepszej cenie dostawcy +MargeType2=Marża na Średniej Cenie Produktu (ŚCP) MargeType3=Marża na cenie fabrycznej -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Marża od najlepszej ceny zakupu = cena sprzedaży - najlepsza cena dostawcy określona na karcie produktu <br> * Marża od średniej ważonej ceny (WAP) = cena sprzedaży - średnia cena ważona produktu (WAP) lub najlepsza cena dostawcy, jeśli WAP nie został jeszcze zdefiniowany <br> * Marża Cena kosztowa = Cena sprzedaży - Cena własna zdefiniowana na karcie produktu lub WAP, jeśli cena kosztowa nie została zdefiniowana, lub najlepsza cena dostawcy, jeśli WAP nie został jeszcze zdefiniowany CostPrice=Cena fabryczna UnitCharges=Koszty jednostkowe Charges=Opłaty AgentContactType=Przedstawiciel handlowy typ kontaktu -AgentContactTypeDetails=Zdefiniować, jaki rodzaj (związane na fakturach) kontaktowe będą wykorzystywane do raportu marży na reprezentatywną sprzedaż +AgentContactTypeDetails=Zdefiniuj, jaki typ kontaktu (powiązany na fakturach) będzie używany do raportowania marży na kontakt/adres. Należy pamiętać, że czytanie statystyk dotyczących kontaktu nie jest wiarygodne, ponieważ w większości przypadków kontakt może nie być wyraźnie zdefiniowany na fakturach. rateMustBeNumeric=Stawka musi być wartością liczbową markRateShouldBeLesserThan100=Stopa znak powinien być niższy niż 100 ShowMarginInfos=Pokaż informacje o marżę CheckMargins=Szczegóły marż -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). +MarginPerSaleRepresentativeWarning=Raprot marży na użytkownika wykorzystuje połączenie między kontrahentami a przedstawicielami handlowymi w celu obliczenia marży każdego przedstawiciela handlowego. Ponieważ niektórzy kontrahenci mogą nie posiadać przedstawiciela handlowego a niektórzy kontrahenci mogą być połączeni z wieloma przedstawicielami handlowymi, niektóre wartości mogą nie być wliczone w ten raport (jeśli brakuje przedstawiciela handlowego) a niektóre mogą pojawić się w innych wierszach (dla każdego przedstawiciela handlowego). diff --git a/htdocs/langs/pl_PL/members.lang b/htdocs/langs/pl_PL/members.lang index 059bc2dddf4..2089442f991 100644 --- a/htdocs/langs/pl_PL/members.lang +++ b/htdocs/langs/pl_PL/members.lang @@ -6,7 +6,7 @@ Member=Członek Members=Członkowie ShowMember=Pokaż kartę członka UserNotLinkedToMember=Użytkownik nie wiąże się z członkiem -ThirdpartyNotLinkedToMember=Third party not linked to a member +ThirdpartyNotLinkedToMember=Strona trzecia niepowiązana z członkiem MembersTickets=Członkowie Bilety FundationMembers=Członkowie fundacji ListOfValidatedPublicMembers=Wykaz zatwierdzonych publicznej użytkowników @@ -19,20 +19,22 @@ MembersCards=Członkowie wydruku karty MembersList=Lista członków MembersListToValid=Lista szkiców członków (do zatwierdzenia) MembersListValid=Wykaz ważnych członków -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 +MembersListUpToDate=Lista ważnych członków z aktualną subskrypcją +MembersListNotUpToDate=Lista ważnych członków z nieaktualną subskrypcją +MembersListExcluded=Lista wykluczonych członków +MembersListResiliated=Lista członków zakończonych MembersListQualified=Lista członków wykwalifikowanych MenuMembersToValidate=Projekt członków MenuMembersValidated=Zatwierdzeni członkowie +MenuMembersExcluded=Wykluczeni członkowie MenuMembersResiliated=członkowie zakończone MembersWithSubscriptionToReceive=Użytkownicy z subskrypcji otrzymują -MembersWithSubscriptionToReceiveShort=Subscription to receive +MembersWithSubscriptionToReceiveShort=Subskrypcja do odbioru DateSubscription=Data subskrypcji DateEndSubscription=Data końca subskrypcji EndSubscription=Koniec subskrypcji SubscriptionId=ID subskrypcji -WithoutSubscription=Without subscription +WithoutSubscription=Bez abonamentu MemberId=ID członka NewMember=Nowy członek MemberType=Typ członka @@ -43,26 +45,29 @@ MemberStatusDraft=Projekt (do zatwierdzonia) MemberStatusDraftShort=Projekt MemberStatusActive=Zatwierdzony (oczekuje subskrypcji) MemberStatusActiveShort=Zatwierdzony -MemberStatusActiveLate=Subscription expired +MemberStatusActiveLate=Subskrypcja wygasła MemberStatusActiveLateShort=Wygasł MemberStatusPaid=Subskrypcja aktualne MemberStatusPaidShort=Aktualne -MemberStatusResiliated=Terminated member -MemberStatusResiliatedShort=Terminated +MemberStatusExcluded=Wykluczony członek +MemberStatusExcludedShort=Wyłączony +MemberStatusResiliated=Członek usunięty +MemberStatusResiliatedShort=Zakończony MembersStatusToValid=Projekt członków +MembersStatusExcluded=Wykluczeni członkowie MembersStatusResiliated=członkowie zakończone -MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscription=Zweryfikowany (subskrypcja nie jest wymagana) MemberStatusNoSubscriptionShort=Zatwierdzony -SubscriptionNotNeeded=No subscription needed +SubscriptionNotNeeded=Żadna subskrypcja nie jest wymagana NewCotisation=Nowe Wkład PaymentSubscription=Nowy wkład płatności SubscriptionEndDate=Data zakończenia subskrypcji MembersTypeSetup=Ustawienie typu członka -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 +MemberTypeModified=Zmodyfikowany typ członka +DeleteAMemberType=Usuń typ członka +ConfirmDeleteMemberType=Czy na pewno chcesz usunąć ten typ członka? +MemberTypeDeleted=Typ członka został usunięty +MemberTypeCanNotBeDeleted=Nie można usunąć typu członka NewSubscription=Nowa subskrypcja NewSubscriptionDesc=Ta forma pozwala na nagrywanie abonament jako nowy członek fundacji. Jeśli chcesz odnowić subskrypcję (jeśli jest już członkiem), prosimy o kontakt z Rady Fundacji zamiast e-mailem %s. Subscription=Subskrypcja @@ -70,20 +75,22 @@ Subscriptions=Subskrypcje SubscriptionLate=Późno SubscriptionNotReceived=Subskrypcja nigdy nieotrzymana ListOfSubscriptions=Lista subskrypcji -SendCardByMail=Send card by email +SendCardByMail=Wyślij kartkę e-mailem AddMember=Utwórz członka NoTypeDefinedGoToSetup=Żaden członek typów zdefiniowanych. Przejdź do konfiguracji - Członkowie typy NewMemberType=Nowy typ członka -WelcomeEMail=Welcome email +WelcomeEMail=Powitalny e-mail SubscriptionRequired=Subskrypcja wymagana DeleteType=Usuń VoteAllowed=Głosowanie dozwolone Physical=Fizyczne Moral=Moralny -MorAndPhy=Moral and Physical +MorAndPhy=Moralne i fizyczne Reenable=Ponownym włączeniu -ResiliateMember=Terminate a member -ConfirmResiliateMember=Are you sure you want to terminate this member? +ExcludeMember=Wyklucz członka +ConfirmExcludeMember=Czy na pewno chcesz wykluczyć tego członka? +ResiliateMember=Zakończ członka +ConfirmResiliateMember=Czy na pewno chcesz usunąć tego członka? DeleteMember=Usuń członka ConfirmDeleteMember=Czy jesteś pewien, ze chcesz usunąć tego członka (Usunięcie członka spowoduje usunięcie wszystkich jego subskrypcji)? DeleteSubscription=Usuń subskrypcję @@ -91,53 +98,54 @@ ConfirmDeleteSubscription=Czy jesteś pewien, że chcesz usunąć tą subskrypcj Filehtpasswd=htpasswd plik ValidateMember=Validate członkiem ConfirmValidateMember=Czy jesteś pewien, że chcesz zatwierdzić tego członka? -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. +FollowingLinksArePublic=Poniższe linki są otwartymi stronami, które nie są chronione żadnym zezwoleniem firmy Dolibarr. Nie są to strony sformatowane, podane jako przykład, aby pokazać, jak wyświetlić listę członków bazy danych. PublicMemberList=Publicznego liście członków -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=Publiczny formularz samodzielnej subskrypcji +BlankSubscriptionFormDesc=Dolibarr może udostępnić publiczny adres URL / witrynę internetową, aby umożliwić odwiedzającym z zewnątrz proszenie o zapisanie się do fundacji. Jeśli moduł płatności online jest włączony, formularz płatności może być również dostarczony automatycznie. +EnablePublicSubscriptionForm=Włącz publiczną witrynę internetową z formularzem samodzielnej subskrypcji +ForceMemberType=Wymuś typ pręta ExportDataset_member_1=Członkowie i abonamentów ImportDataset_member_1=Członkowie -LastMembersModified=Latest %s modified members -LastSubscriptionsModified=Latest %s modified subscriptions +LastMembersModified=Ostatnio zmodyfikowani członkowie %s +LastSubscriptionsModified=Najnowsze zmodyfikowane subskrypcje %s String=Ciąg znaków Text=Tekst Int=Int. DateAndTime=Data i czas PublicMemberCard=Państwa publiczne karty -SubscriptionNotRecorded=Subscription not recorded +SubscriptionNotRecorded=Subskrypcja nie została nagrana AddSubscription=Tworzenie subskrypcji ShowSubscription=Pokaż sybskrypcje # 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 -SendingReminderActionComm=Sending reminder for agenda event +SendingAnEMailToMember=Wysyłanie e-maila z informacją do członka +SendingEmailOnAutoSubscription=Wysyłanie wiadomości e-mail po automatycznej rejestracji +SendingEmailOnMemberValidation=Wysyłanie wiadomości e-mail z potwierdzeniem nowego członka +SendingEmailOnNewSubscription=Wysyłanie wiadomości e-mail w sprawie nowej subskrypcji +SendingReminderForExpiredSubscription=Wysyłanie przypomnienia o wygasłych subskrypcjach +SendingEmailOnCancelation=Wysyłanie e-maila o anulowaniu +SendingReminderActionComm=Wysyłanie przypomnienia o wydarzeniu w programie # 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=Twoje członkostwo zostało odebrane. +YourMembershipWasValidated=Twoje członkostwo zostało potwierdzone +YourSubscriptionWasRecorded=Twoja nowa subskrypcja została zarejestrowana +SubscriptionReminderEmail=Przypomnienie o subskrypcji +YourMembershipWasCanceled=Twoje członkostwo zostało anulowane CardContent=Treść Twojej karty członka # Text of email templates -ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.<br><br> -ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:<br><br> -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded.<br><br> -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.<br><br> -ThisIsContentOfYourCard=This is a summary of the information we have about you. Please contact us if anything is incorrect.<br><br> -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=Chcemy Cię poinformować, że otrzymaliśmy Twoją prośbę o członkostwo. <br> <br> +ThisIsContentOfYourMembershipWasValidated=Chcemy Cię poinformować, że Twoje członkostwo zostało zweryfikowane przy użyciu następujących informacji: <br> <br> +ThisIsContentOfYourSubscriptionWasRecorded=Chcemy Cię poinformować, że Twoja nowa subskrypcja została nagrana. <br> <br> +ThisIsContentOfSubscriptionReminderEmail=Chcemy Cię poinformować, że Twoja subskrypcja wkrótce wygaśnie lub już wygasła (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Mamy nadzieję, że ją odnowisz. <br> <br> +ThisIsContentOfYourCard=To jest podsumowanie informacji, które posiadamy o Tobie. Skontaktuj się z nami, jeśli coś jest nie tak. <br> <br> +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Temat powiadomienia e-mail otrzymanego w przypadku automatycznego wpisu gościa +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Treść otrzymanego e-maila z powiadomieniem w przypadku automatycznego wpisu gościa +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Szablon wiadomości e-mail używany do wysyłania wiadomości e-mail do członka w ramach automatycznej subskrypcji członka +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Szablon wiadomości e-mail używany do wysyłania wiadomości e-mail do członka w sprawie weryfikacji członka +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Szablon wiadomości e-mail używany do wysyłania wiadomości e-mail do członka w sprawie nowego nagrania subskrypcji +DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Szablon wiadomości e-mail służący do wysyłania przypomnień e-mail o zbliżającym się wygaśnięciu subskrypcji +DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Szablon wiadomości e-mail używany do wysyłania wiadomości e-mail do członka w przypadku anulowania członka +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion +DescADHERENT_MAIL_FROM=Adres e-mail nadawcy dla automatycznych e-maili DescADHERENT_ETIQUETTE_TYPE=Etykiety formacie DescADHERENT_ETIQUETTE_TEXT=Tekst drukowany na arkuszach adresowych członkiem DescADHERENT_CARD_TYPE=Format karty stronę @@ -151,8 +159,8 @@ NoThirdPartyAssociatedToMember=Nr trzeciej związane do tego członka MembersAndSubscriptions= Członkowie i Subscriptions MoreActions=Działanie uzupełniające na nagrywanie MoreActionsOnSubscription=Działania uzupełniające, zasugerował domyślnie podczas nagrywania abonament -MoreActionBankDirect=Create a direct entry on bank account -MoreActionBankViaInvoice=Create an invoice, and a payment on bank account +MoreActionBankDirect=Utwórz bezpośredni wpis na konto bankowe +MoreActionBankViaInvoice=Utwórz fakturę i wpłatę na konto bankowe MoreActionInvoiceOnly=Tworzenie faktury bez zapłaty LinkToGeneratedPages=Generowanie wizytówki LinkToGeneratedPagesDesc=Ekran ten umożliwia generowanie plików PDF z wizytówek dla wszystkich członków lub członka szczególności. @@ -160,24 +168,25 @@ DocForAllMembersCards=Generowanie wizytówek dla wszystkich członków (Format w DocForOneMemberCards=Generowanie wizytówki dla danego użytkownika (Format wyjściowy rzeczywiście setup: <b>%s)</b> DocForLabels=Generowanie arkuszy adres (Format wyjściowy rzeczywiście setup: <b>%s)</b> SubscriptionPayment=Zaplanowana płatność -LastSubscriptionDate=Date of latest subscription payment -LastSubscriptionAmount=Amount of latest subscription +LastSubscriptionDate=Data ostatniej płatności abonamentowej +LastSubscriptionAmount=Ilość ostatniej subskrypcji +LastMemberType=Last Member type MembersStatisticsByCountries=Użytkownicy statystyki według kraju MembersStatisticsByState=Użytkownicy statystyki na State / Province MembersStatisticsByTown=Użytkownicy statystyki na miasto MembersStatisticsByRegion=Użytkownicy statystyki regionu NbOfMembers=Liczba członków -NbOfActiveMembers=Number of current active members +NbOfActiveMembers=Liczba obecnych aktywnych członków NoValidatedMemberYet=Żadna potwierdzona znaleziono użytkowników MembersByCountryDesc=Ten ekran pokaże statystyki członków przez poszczególne kraje. Graficzny zależy jednak na Google usługi online grafów i jest dostępna tylko wtedy, gdy połączenie internetowe działa. MembersByStateDesc=Ten ekran pokazać Wam statystyki członkom przez stan / prowincje / Kanton. MembersByTownDesc=Ten ekran pokaże statystyki członkom przez miasto. MembersStatisticsDesc=Wybierz statystyki chcesz czytać ... MenuMembersStats=Statystyka -LastMemberDate=Latest member date +LastMemberDate=Ostatnia data członka LatestSubscriptionDate=Data ostatniej subskrypcji -MemberNature=Nature of member -MembersNature=Nature of members +MemberNature=Charakter członka +MembersNature=Charakter członków Public=Informacje są publiczne NewMemberbyWeb=Nowy członek dodaje. Oczekuje na zatwierdzenie NewMemberForm=Nowa forma członkiem @@ -188,19 +197,19 @@ TurnoverOrBudget=Obrót (dla firmy) lub Budżet (na fundamencie) DefaultAmount=Domyślną kwotę abonamentu CanEditAmount=Użytkownik może wybrać / edytować kwotę swojej subskrypcji MEMBER_NEWFORM_PAYONLINE=Przejdź na zintegrowanej stronie płatności online -ByProperties=By nature -MembersStatisticsByProperties=Members statistics by nature +ByProperties=Przez naturę +MembersStatisticsByProperties=Statystyki członków według natury MembersByNature=Ten ekran wyświetli statystyki dotyczące członków przez naturę. MembersByRegion=Ten ekran wyświetli statystyki dotyczące członków w regionie. VATToUseForSubscriptions=Stawka VAT użyć do subskrypcji -NoVatOnSubscription=No VAT for subscriptions +NoVatOnSubscription=Brak podatku VAT w przypadku subskrypcji ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produkt stosowany do linii subskrypcji do faktury:% 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 +NameOrCompany=Imię lub firma +SubscriptionRecorded=Subskrypcja została zarejestrowana +NoEmailSentToMember=Żaden e-mail nie został wysłany do członka +EmailSentToMember=E-mail wysłany do członka pod adresem %s +SendReminderForExpiredSubscriptionTitle=Wyślij przypomnienie e-mailem o wygaśnięciu subskrypcji +SendReminderForExpiredSubscription=Wyślij przypomnienie e-mailem do członków, gdy subskrypcja wkrótce wygaśnie (parametr to liczba dni przed końcem subskrypcji na wysłanie przypomnienia. Może to być lista dni oddzielonych średnikiem, na przykład „10; 5; 0; -5 ') +MembershipPaid=Członkostwo opłacone za bieżący okres (do %s) +YouMayFindYourInvoiceInThisEmail=Możesz znaleźć fakturę w załączniku do tej wiadomości e-mail +XMembersClosed=%s członków zamkniętych diff --git a/htdocs/langs/pl_PL/modulebuilder.lang b/htdocs/langs/pl_PL/modulebuilder.lang index e2346e75b40..4df3891247e 100644 --- a/htdocs/langs/pl_PL/modulebuilder.lang +++ b/htdocs/langs/pl_PL/modulebuilder.lang @@ -1,143 +1,145 @@ # 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 <a href="%s" target="_blank">manual development is here</a>. -EnterNameOfModuleDesc=Enter name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) -EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...). The CRUD class file, but also API file, pages to list/add/edit/delete object and SQL files will be generated. -ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): <strong>%s</strong> -ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> -ModuleBuilderDesc4=A module is detected as 'editable' when the file <strong>%s</strong> exists in root of module directory +ModuleBuilderDesc=To narzędzie może być używane tylko przez doświadczonych użytkowników lub programistów. Udostępnia narzędzia do tworzenia lub edycji własnego modułu. Dokumentacja alternatywnego rozwoju ręcznego <a href="%s" target="_blank"> jest tutaj </a>. +EnterNameOfModuleDesc=Wpisz nazwę bez spacji modułu/aplikacji do utworzenia. Używaj wielkich liter do oddzielania słów (na przykład: MyModule, EcommerceForShop, SyncWithMySystem, ...) +EnterNameOfObjectDesc=Wpisz nazwę (bez spacji) obiektu do utworzenia. Używaj wielkich liter do oddzielania słów (na przykład: MyObject, Student, Teacher, ...). Zostanie wygenerowany plik klasy CRUD, ale także plik API, strony do wyświetlenia/dodania/edycji/usunięcia obiektu oraz pliki SQL. +ModuleBuilderDesc2=Ścieżka, w której moduły są generowane/edytowane (pierwszy katalog dla modułów zewnętrznych zdefiniowany w %s): <strong> %s </strong> +ModuleBuilderDesc3=Znaleziono wygenerowane/edytowalne moduły: <strong> %s </strong> +ModuleBuilderDesc4=Moduł jest wykrywany jako „edytowalny”, gdy plik <strong> %s </strong> istnieje w katalogu głównym modułu NewModule=Nowy moduł NewObjectInModulebuilder=Nowy obiekt -ModuleKey=Module key -ObjectKey=Object key -ModuleInitialized=Module initialized -FilesForObjectInitialized=Files for new object '%s' initialized -FilesForObjectUpdated=Files for object '%s' updated (.sql files and .class.php file) -ModuleBuilderDescdescription=Enter here all general information that describe your module. -ModuleBuilderDescspecifications=You can enter here a detailed description of the specifications of your module that is not already structured into other tabs. So you have within easy reach all the rules to develop. Also this text content will be included into the generated documentation (see last tab). You can use Markdown format, but it is recommended to use Asciidoc format (comparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). -ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A CRUD DAO class, SQL files, page to list record of objects, to create/edit/view a record and an API will be generated. -ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module. -ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module. -ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file. -ModuleBuilderDeschooks=This tab is dedicated to hooks. -ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets. -ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module and a "ready to distribute" documentation file. Just click on button to build the package or documentation file. -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! +ModuleKey=Klucz modułu +ObjectKey=Klucz obiektu +ModuleInitialized=Zainicjowano moduł +FilesForObjectInitialized=Zainicjowano pliki dla nowego obiektu „%s” +FilesForObjectUpdated=Zaktualizowano pliki obiektu „%s” (pliki .sql i .class.php) +ModuleBuilderDescdescription=Wpisz tutaj wszystkie ogólne informacje opisujące Twój moduł. +ModuleBuilderDescspecifications=Możesz wprowadzić tutaj szczegółowy opis specyfikacji swojego modułu, który nie został jeszcze podzielony na inne zakładki. Masz więc w zasięgu ręki wszystkie zasady do opracowania. Również ta treść tekstowa zostanie uwzględniona w generowanej dokumentacji (patrz ostatnia zakładka). Możesz użyć formatu Markdown, ale zalecane jest użycie formatu Asciidoc (porównanie między .md i .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). +ModuleBuilderDescobjects=Zdefiniuj tutaj obiekty, którymi chcesz zarządzać za pomocą swojego modułu. Zostanie wygenerowana klasa CRUD DAO, pliki SQL, strona do listy rekordów obiektów, do tworzenia/edycji/przeglądania rekordu oraz API. +ModuleBuilderDescmenus=Ta zakładka jest przeznaczona do definiowania pozycji menu udostępnianych przez Twój moduł. +ModuleBuilderDescpermissions=Ta zakładka jest przeznaczona do definiowania nowych uprawnień, które chcesz nadać modułowi. +ModuleBuilderDesctriggers=To jest widok wyzwalaczy dostarczanych przez Twój moduł. Aby dołączyć kod wykonywany po uruchomieniu wyzwalanego zdarzenia biznesowego, po prostu edytuj ten plik. +ModuleBuilderDeschooks=Ta zakładka jest poświęcona hookom +ModuleBuilderDescwidgets=Ta zakładka jest przeznaczona do zarządzania/tworzenia widgetów. +ModuleBuilderDescbuildpackage=Możesz tutaj wygenerować plik pakietu „gotowy do dystrybucji” (znormalizowany plik .zip) swojego modułu oraz plik dokumentacji „gotowy do dystrybucji”. Wystarczy kliknąć przycisk, aby zbudować pakiet lub plik dokumentacji. +EnterNameOfModuleToDeleteDesc=Możesz usunąć swój moduł. UWAGA: Wszystkie pliki kodowe modułu (wygenerowane lub utworzone ręcznie) ORAZ ustrukturyzowane dane i dokumentacja zostaną usunięte! +EnterNameOfObjectToDeleteDesc=Możesz usunąć obiekt. OSTRZEŻENIE: Wszystkie pliki kodujące (wygenerowane lub utworzone ręcznie) związane z obiektem zostaną usunięte! DangerZone=Strefa niebezpieczna -BuildPackage=Build package -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 <a href="https://www.dolistore.com">DoliStore.com</a>. -BuildDocumentation=Build documentation -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. +BuildPackage=Zbuduj pakiet +BuildPackageDesc=Możesz wygenerować pakiet zip swojej aplikacji, abyś był gotowy do dystrybucji na dowolnym urządzeniu Dolibarr. Możesz go również rozprowadzać lub sprzedawać na platformie handlowej, takiej jak <a href="https://www.dolistore.com"> DoliStore.com </a>. +BuildDocumentation=Zbuduj dokumentację +ModuleIsNotActive=Ten moduł nie jest jeszcze aktywowany. Przejdź do %s, aby udostępnić go na żywo lub kliknij tutaj +ModuleIsLive=Ten moduł został aktywowany. Każda zmiana może zepsuć obecną funkcję na żywo. DescriptionLong=Długi opis -EditorName=Name of editor +EditorName=Nazwa edytora EditorUrl=Link do edytora -DescriptorFile=Descriptor file of module -ClassFile=File for PHP DAO CRUD class -ApiClassFile=File for PHP API class -PageForList=PHP page for list of record -PageForCreateEditView=PHP page to create/edit/view a record -PageForAgendaTab=PHP page for event tab -PageForDocumentTab=PHP page for document tab -PageForNoteTab=PHP page for note tab -PageForContactTab=PHP page for contact tab -PathToModulePackage=Path to zip of module/application package -PathToModuleDocumentation=Path to file of module/application documentation (%s) -SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed. -FileNotYetGenerated=File not yet generated -RegenerateClassAndSql=Force update of .class and .sql files -RegenerateMissingFiles=Generate missing files -SpecificationFile=File of documentation -LanguageFile=File for language -ObjectProperties=Object Properties -ConfirmDeleteProperty=Are you sure you want to delete the property <strong>%s</strong>? This will change code in PHP class but also remove column from table definition of object. -NotNull=Not NULL -NotNullDesc=1=Set database to NOT NULL. -1=Allow null values and force value to NULL if empty ('' or 0). -SearchAll=Used for 'search all' -DatabaseIndex=Database index +DescriptorFile=Plik deskryptora modułu +ClassFile=Plik dla klasy PHP DAO CRUD +ApiClassFile=Plik klasy PHP API +PageForList=Strona PHP z listą rekordów +PageForCreateEditView=Strona PHP do tworzenia/edycji/przeglądania rekordu +PageForAgendaTab=Strona PHP dla zakładki wydarzenia +PageForDocumentTab=Strona PHP dla karty dokumentu +PageForNoteTab=Strona PHP dla zakładki notatek +PageForContactTab=Strona PHP dla zakładki kontaktowej +PathToModulePackage=Ścieżka do pliku ZIP modułu/pakietu aplikacji +PathToModuleDocumentation=Ścieżka do pliku dokumentacji modułu/aplikacji (%s) +SpaceOrSpecialCharAreNotAllowed=Spacje i znaki specjalne są niedozwolone. +FileNotYetGenerated=Plik nie został jeszcze wygenerowany +RegenerateClassAndSql=Wymuś aktualizację plików .class i .sql +RegenerateMissingFiles=Wygeneruj brakujące pliki +SpecificationFile=Plik dokumentacji +LanguageFile=Plik dla języka +ObjectProperties=Właściwości obiektu +ConfirmDeleteProperty=Czy na pewno chcesz usunąć właściwość <strong> %s </strong>? Spowoduje to zmianę kodu w klasie PHP, ale także usunie kolumnę z tabeli definicji obiektu. +NotNull=NOT NULL +NotNullDesc=1 = Ustaw bazę danych na NOT NULL. -1 = Zezwalaj na wartości null i wymuszaj wartość NULL, jeśli jest pusta (`` lub 0). +SearchAll=Używane dla „szukaj we wszystkich” +DatabaseIndex=Indeks bazy danych FileAlreadyExists=Plik %s już istnieje -TriggersFile=File for triggers code -HooksFile=File for hooks code -ArrayOfKeyValues=Array of key-val -ArrayOfKeyValuesDesc=Array of keys and values if field is a combo list with fixed values -WidgetFile=Widget file -CSSFile=CSS file -JSFile=Javascript file -ReadmeFile=Readme file -ChangeLog=ChangeLog file -TestClassFile=File for PHP Unit Test class +TriggersFile=Plik zawierający kod wyzwalaczy +HooksFile=Plik z kodem hooków +ArrayOfKeyValues=Tablica wartości klucz-wartość +ArrayOfKeyValuesDesc=Tablica kluczy i wartości, jeśli pole jest listą kombi ze stałymi wartościami +WidgetFile=Plik widżetu +CSSFile=Plik CSS +JSFile=Plik Javascript +ReadmeFile=Plik Readme +ChangeLog=Plik ChangeLog +TestClassFile=Plik klasy PHP Unit Test SqlFile=Plik SQL -PageForLib=File for the common PHP library -PageForObjLib=File for the PHP library dedicated to object -SqlFileExtraFields=Sql file for complementary attributes -SqlFileKey=Sql file for keys -SqlFileKeyExtraFields=Sql file for keys of complementary attributes -AnObjectAlreadyExistWithThisNameAndDiffCase=An object already exists with this name and a different case -UseAsciiDocFormat=You can use Markdown format, but it is recommended to use Asciidoc format (omparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) -IsAMeasure=Is a measure -DirScanned=Directory scanned -NoTrigger=No trigger -NoWidget=No widget -GoToApiExplorer=API explorer -ListOfMenusEntries=List of menu entries -ListOfDictionariesEntries=List of dictionaries entries -ListOfPermissionsDefined=List of defined permissions -SeeExamples=See examples here -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).<br><br>Using a negative value means field is not shown by default on list but can be selected for viewing).<br><br>It can be an expression, for example:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.<br/>Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>For document :</strong><br/>0 = not displayed <br/>1 = display<br/>2 = display only if not empty<br/><br/><strong>For document lines :</strong><br/>0 = not displayed <br/>1 = displayed in a column<br/>3 = display in line description column after the description<br/>4 = display in description column after the description only if not empty -DisplayOnPdf=Display on PDF -IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) -SearchAllDesc=Is the field used to make a search from the quick search tool? (Examples: 1 or 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 -PermissionsDefDesc=Define here the new permissions provided by your module -MenusDefDescTooltip=The menus provided by your module/application are defined into the array <strong>$this->menus</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>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 <strong>$this->dictionaries</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>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 <strong>$this->rights</strong> into the module descriptor file. You can edit manually this file or use the embedded editor.<br><br>Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. -HooksDefDesc=Define in the <b>module_parts['hooks']</b> property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on '<b>initHooks(</b>' in core code).<br>Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on '<b>executeHooks</b>' in core code). -TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. -SeeIDsInUse=See IDs in use in your installation -SeeReservedIDsRangeHere=See range of reserved IDs -ToolkitForDevelopers=Toolkit for Dolibarr developers -TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the native module builder wizard.<br>Enable the module <strong>%s</strong> and use the wizard by clicking the <span class="fa fa-bug"></span> on the top right menu.<br>Warning: This is an advanced developer feature, do <b>not</b> experiment on your production site! -SeeTopRightMenu=See <span class="fa fa-bug"></span> on the top right menu -AddLanguageFile=Add language file -YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages") -DropTableIfEmpty=(Destroy table if empty) -TableDoesNotExists=The table %s does not exists -TableDropped=Table %s deleted -InitStructureFromExistingTable=Build the structure array string of an existing table -UseAboutPage=Disable the about page -UseDocFolder=Disable the documentation folder -UseSpecificReadme=Use a specific ReadMe -ContentOfREADMECustomized=Note: The content of the README.md file has been replaced with the specific value defined into setup of ModuleBuilder. -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. -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 -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:<br>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. -ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. +PageForLib=Plik wspólnej biblioteki PHP +PageForObjLib=Plik do biblioteki PHP dedykowanej obiektowi +SqlFileExtraFields=SQL dla atrybutów uzupełniających +SqlFileKey=SQL dla kluczy +SqlFileKeyExtraFields=Plik SQL zawierający klucze atrybutów uzupełniających +AnObjectAlreadyExistWithThisNameAndDiffCase=Istnieje już obiekt o tej nazwie i innej wielkości liter +UseAsciiDocFormat=Możesz użyć formatu Markdown, ale zaleca się użycie formatu Asciidoc (porównanie między .md i .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) +IsAMeasure=Jest miarą +DirScanned=Katalog przeskanowany +NoTrigger=Bez wyzwalacza +NoWidget=Brak widżetu +GoToApiExplorer=Eksplorator API +ListOfMenusEntries=Lista pozycji menu +ListOfDictionariesEntries=Lista haseł w słownikach +ListOfPermissionsDefined=Lista zdefiniowanych uprawnień +SeeExamples=Zobacz przykłady tutaj +EnabledDesc=Warunek, aby to pole było aktywne (Przykłady: 1 lub $conf->global->MYMODULE_MYOPTION) +VisibleDesc=Czy pole jest widoczne? (Przykłady: 0 = niewidoczne, 1 = widoczne na liście i utwórz / zaktualizuj / wyświetl formularze, 2 = widoczne tylko na liście, 3 = widoczne tylko w formularzu tworzenia / aktualizacji / przeglądania (nie na liście), 4 = widoczne na liście i tylko aktualizuj / wyświetl formularz (nie twórz), 5 = widoczne tylko w formularzu widoku końca listy (nie tworzy, nie aktualizuje). <br> <br> Użycie wartości ujemnej oznacza, że pole nie jest domyślnie wyświetlane na liście, ale można je wybrać do przeglądania). <br> <br> Może to być wyrażenie, na przykład: <br> preg_match ('/ public /', $ _SERVER ['PHP_SELF'])? 0: 1 <br> ($ user- 1 holiday? +DisplayOnPdfDesc=Wyświetlaj to pole w kompatybilnych dokumentach PDF, możesz zarządzać pozycją za pomocą pola "Pozycja". <br/> Obecnie znane modele kompatybilne PDF są: Eratostenes (kolejność), Espadon (statek), gąbka (faktury), cyjan (PROPAL / cytat), Cornas (kolejność dostawca) <br/> <br/> <strong> Dla dokumentu: nie </strong> <br/> 0 = Wyświetlane <br/> 1 = wskazanie <br/> 2 = wskazanie tylko jeśli nie jest pusta <br/> <br/> <strong> dla linii dokument: </strong> <br/> 0 = nie wyświetlany <br/> 1 = wyświetlane w kolumnie <br/> 3 = wyświetlacza w opisie linii kolumny po opisie <br/> 4 = wyświetlacza w opisie kolumnie za opis tylko wtedy, gdy nie jest pusty +DisplayOnPdf=Wyświetl na dokumencie PDF +IsAMeasureDesc=Czy wartość pola można skumulować, aby uzyskać sumę na liście? (Przykłady: 1 lub 0) +SearchAllDesc=Czy to pole jest używane do wyszukiwania za pomocą narzędzia szybkiego wyszukiwania? (Przykłady: 1 lub 0) +SpecDefDesc=Wpisz tutaj całą dokumentację, którą chcesz dostarczyć wraz z modułem, która nie jest jeszcze zdefiniowana w innych zakładkach. Możesz użyć .md lub lepszej, bogatej składni .asciidoc. +LanguageDefDesc=Wprowadź w tych plikach cały klucz i tłumaczenie dla każdego pliku językowego. +MenusDefDesc=Zdefiniuj tutaj menu dostarczane przez Twój moduł +DictionariesDefDesc=Zdefiniuj tutaj słowniki dostarczone przez Twój moduł +PermissionsDefDesc=Zdefiniuj tutaj nowe uprawnienia zapewniane przez Twój moduł +MenusDefDescTooltip=Menu dostarczane przez moduł / aplikację są zdefiniowane w tablicy <strong> $ this-> menu </strong> w pliku deskryptora modułu. Możesz edytować ten plik ręcznie lub użyć wbudowanego edytora. <br> <br> Uwaga: Po zdefiniowaniu (i ponownej aktywacji modułu) menu są również widoczne w edytorze menu dostępnym dla administratorów na %s. +DictionariesDefDescTooltip=Słowniki dostarczane przez moduł / aplikację są zdefiniowane w tablicy <strong> $ this-> słowniki </strong> w pliku deskryptora modułu. Możesz edytować ten plik ręcznie lub użyć wbudowanego edytora. <br> <br> Uwaga: Po zdefiniowaniu (i ponownej aktywacji modułu) słowniki są również widoczne w obszarze ustawień dla administratorów na %s. +PermissionsDefDescTooltip=Uprawnienia nadawane przez moduł / aplikację są zdefiniowane w tablicy <strong> $ this-> rights </strong> w pliku deskryptora modułu. Możesz edytować ten plik ręcznie lub użyć wbudowanego edytora. <br> <br> Uwaga: Po zdefiniowaniu (i ponownej aktywacji modułu) uprawnienia są widoczne w domyślnej konfiguracji uprawnień %s. +HooksDefDesc=Zdefiniuj we właściwości <b> module_parts ['hooks'] </b>, w deskryptorze modułu, kontekst punktów zaczepienia, którymi chcesz zarządzać (listę kontekstów można znaleźć, wyszukując „<b> initHooksz0f17f17f17kod (a09a4b719f). plik przechwytujący służący do dodawania kodu funkcji przechwyconych (funkcje, które można znaleźć, wyszukując w kodzie podstawowym '<b> executeHooks </b>'). +TriggerDefDesc=Zdefiniuj w pliku wyzwalacza kod, który chcesz wykonać dla każdego wykonywanego zdarzenia biznesowego. +SeeIDsInUse=Zobacz identyfikatory używane w Twojej instalacji +SeeReservedIDsRangeHere=Zobacz zakres zarezerwowanych identyfikatorów +ToolkitForDevelopers=Zestaw narzędzi dla programistów Dolibarr +TryToUseTheModuleBuilder=Jeśli znasz język SQL i PHP, możesz skorzystać z kreatora kreatora modułów natywnych. <br> Włącz moduł <strong> %s </strong> i użyj kreatora, klikając <span class="fa fa-bug"> </span> w prawym górnym menu. <br> Ostrzeżenie: to jest zaawansowana funkcja programisty, <b> nie eksperymentuj </b> w swojej witrynie produkcyjnej! +SeeTopRightMenu=Zobacz <span class="fa fa-bug"> </span> w prawym górnym menu +AddLanguageFile=Dodaj plik językowy +YouCanUseTranslationKey=Możesz tutaj użyć klucza, który jest kluczem tłumaczenia znalezionym w pliku językowym (patrz zakładka „Języki”) +DropTableIfEmpty=(Zniszcz stół, jeśli jest pusty) +TableDoesNotExists=Tabela %s nie istnieje +TableDropped=Tabela %s została usunięta +InitStructureFromExistingTable=Zbuduj ciąg tablicy struktury istniejącej tabeli +UseAboutPage=Wyłącz stronę z informacjami +UseDocFolder=Wyłącz folder dokumentacji +UseSpecificReadme=Użyj określonego pliku ReadMe +ContentOfREADMECustomized=Uwaga: zawartość pliku README.md została zastąpiona określoną wartością zdefiniowaną w ustawieniach modułu ModuleBuilder. +RealPathOfModule=Prawdziwa ścieżka modułu +ContentCantBeEmpty=Zawartość pliku nie może być pusta +WidgetDesc=Możesz tutaj generować i edytować widżety, które zostaną osadzone w Twoim module. +CSSDesc=Możesz tutaj wygenerować i edytować plik ze spersonalizowanym CSS osadzonym w Twoim module. +JSDesc=Możesz tutaj wygenerować i edytować plik ze spersonalizowanym Javascriptem osadzonym w Twoim module. +CLIDesc=Możesz tutaj wygenerować skrypty wiersza poleceń, które chcesz udostępnić w swoim module. +CLIFile=Plik CLI +NoCLIFile=Brak plików CLI +UseSpecificEditorName = Użyj określonej nazwy redaktora +UseSpecificEditorURL = Użyj określonego adresu URL edytora +UseSpecificFamily = Użyj określonej rodziny +UseSpecificAuthor = Użyj konkretnego autora +UseSpecificVersion = Użyj określonej wersji początkowej +IncludeRefGeneration=Odniesienie do obiektu musi być generowane automatycznie +IncludeRefGenerationHelp=Zaznacz tę opcję, jeśli chcesz dołączyć kod do automatycznego zarządzania generowaniem odwołania +IncludeDocGeneration=Chcę wygenerować dokumenty z obiektu +IncludeDocGenerationHelp=Jeśli to zaznaczysz, zostanie wygenerowany kod w celu dodania pola „Generuj dokument” do rekordu. +ShowOnCombobox=Pokaż wartość w combobox +KeyForTooltip=Klucz do podpowiedzi +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list +NotEditable=Nie można edytować +ForeignKey=Klucz obcy +TypeOfFieldsHelp=Typ pól: <br> varchar (99), double (24,8), real, text, html, datetime, timestamp, integer, integer: ClassName: względna ścieżka / do / classfile.class.php [: 1 [: filter]] („1” oznacza, że dodajemy przycisk + po kombinacji w celu utworzenia rekordu, „filter” może mieć wartość „status = 1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)” na przykład) +AsciiToHtmlConverter=Konwerter Ascii na HTML +AsciiToPdfConverter=Konwerter ASCII na PDF +TableNotEmptyDropCanceled=Tabela nie jest pusta. Upuszczenie zostało anulowane. +ModuleBuilderNotAllowed=Kreator modułów jest dostępny, ale nie jest dozwolony dla użytkownika. diff --git a/htdocs/langs/pl_PL/orders.lang b/htdocs/langs/pl_PL/orders.lang index 4705c1b057c..b67799df5fb 100644 --- a/htdocs/langs/pl_PL/orders.lang +++ b/htdocs/langs/pl_PL/orders.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=Obszar zamówień klientów -SuppliersOrdersArea=Purchase orders area +SuppliersOrdersArea=Obszar zamówień OrderCard=Karta zamówienia OrderId=ID zamówienia Order=Zamówienie @@ -11,23 +11,25 @@ OrderDate=Data zamówienia OrderDateShort=Data zamówienia OrderToProcess=Zamówienia do przetworzenia NewOrder=Nowe zamówienie -NewOrderSupplier=New Purchase Order +NewOrderSupplier=Nowe zamówienie ToOrder=Stwórz zamówienie MakeOrder=Stwórz zamówienie SupplierOrder=Zamówienie SuppliersOrders=Zamówienia +SaleOrderLines=Linie zamówień sprzedaży +PurchaseOrderLines=Wiersze zamówienia zakupów SuppliersOrdersRunning=Aktualne zamówienia -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 +CustomerOrder=Zamówienie +CustomersOrders=Zlecenia sprzedaży +CustomersOrdersRunning=Bieżące zamówienia sprzedaży +CustomersOrdersAndOrdersLines=Zamówienia sprzedaży i szczegóły zamówienia +OrdersDeliveredToBill=Zamówienia sprzedaży dostarczane do faktury +OrdersToBill=Dostarczone zamówienia sprzedaży +OrdersInProcess=Zamówienia sprzedaży w trakcie realizacji +OrdersToProcess=Zamówienia sprzedaży do przetworzenia SuppliersOrdersToProcess=Zamówienia do przetworzenia -SuppliersOrdersAwaitingReception=Purchase orders awaiting reception -AwaitingReception=Awaiting reception +SuppliersOrdersAwaitingReception=Zamówienia oczekujące na przyjęcie +AwaitingReception=Oczekiwanie na odbiór StatusOrderCanceledShort=Anulowano StatusOrderDraftShort=Szkic StatusOrderValidatedShort=Zatwierdzone @@ -69,17 +71,17 @@ ValidateOrder=Zatwierdź zamówienie UnvalidateOrder=Niezatwierdzone zamówienie DeleteOrder=Usuń zamówienie CancelOrder=Anuluj zamówienie -OrderReopened= Order %s re-open +OrderReopened= Zamów ponownie %s AddOrder=Stwórz zamówienie -AddPurchaseOrder=Create purchase order +AddPurchaseOrder=Utwórz zamówienie zakupu AddToDraftOrders=Dodaj do szkicu zamówienia ShowOrder=Pokaż zamówienie OrdersOpened=Zamówienia do przygotowania NoDraftOrders=Brak projektów zamówień NoOrder=Brak zamówienia NoSupplierOrder=Brak zamówień -LastOrders=Latest %s sales orders -LastCustomerOrders=Latest %s sales orders +LastOrders=Najnowsze zamówienia sprzedaży %s +LastCustomerOrders=Najnowsze zamówienia sprzedaży %s LastSupplierOrders=Ostatnie %s zamówienia LastModifiedOrders=Ostatnie %s zmodyfikowane zamówienia AllOrders=Wszystkie zamówienia @@ -87,10 +89,10 @@ NbOfOrders=Liczba zleceń OrdersStatistics=Statystyki zamówień OrdersStatisticsSuppliers=Statystyki zamówień NumberOfOrdersByMonth=Liczba zamówień na miesiąc -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +AmountOfOrdersByMonthHT=Ilość zamówień według miesiąca (bez podatku) ListOfOrders=Lista zamówień CloseOrder=Zamknij zamówienie -ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed. +ConfirmCloseOrder=Czy na pewno chcesz ustawić to zamówienie jako dostarczone? Po dostarczeniu zamówienia można ustawić fakturowanie. ConfirmDeleteOrder=Czy jesteś pewien, że chcesz usunąć to zamówienie? ConfirmValidateOrder=Czy jesteś pewien, że chcesz potwierdzić to zamówienie pod nazwą <b>%s</b>? ConfirmUnvalidateOrder=Jesteś pewien, że chcesz przywrócić to zamówienie <b>%s</b> do statusu wersji roboczej? @@ -103,8 +105,8 @@ DraftSuppliersOrders=Szkice zamówień OnProcessOrders=Zamówienia w przygotowaniu RefOrder=Nr referencyjny zamówienia RefCustomerOrder=Powiązane zamówienia dla klienta -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor +RefOrderSupplier=Nr ref. zamówienie dla dostawcy +RefOrderSupplierShort=Nr ref. dostawca zamówienia SendOrderByMail=Wyślij zamówienie pocztą ActionsOnOrder=Zdarzenia dla zamówienia NoArticleOfTypeProduct=Nr artykułu typu "produktu", więc nie shippable artykule tej kolejności @@ -113,24 +115,24 @@ AuthorRequest=Autor wniosku UserWithApproveOrderGrant=Useres przyznane z "zatwierdza zamówienia zgody. PaymentOrderRef=Płatność do zamówienia %s ConfirmCloneOrder=Jesteś pewien, że chcesz zduplikować zamówienie <b>%s</b>? -DispatchSupplierOrder=Receiving purchase order %s +DispatchSupplierOrder=Otrzymanie zamówienia zakupu %s FirstApprovalAlreadyDone=Wykonano pierwsze zatwierdzenie SecondApprovalAlreadyDone=Wykonano drugie zatwierdzenie -SupplierOrderReceivedInDolibarr=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted -SupplierOrderClassifiedBilled=Purchase Order %s set billed +SupplierOrderReceivedInDolibarr=Zamówienie %s otrzymało %s +SupplierOrderSubmitedInDolibarr=Przesłano zamówienie %s +SupplierOrderClassifiedBilled=Zamówienie %s zostało rozliczone OtherOrders=Inne zamówienia ##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order +TypeContact_commande_internal_SALESREPFOLL=Reprezentatywne kolejne zamówienie sprzedaży TypeContact_commande_internal_SHIPPING=Przedstawiciela w ślad za koszty TypeContact_commande_external_BILLING=Kontakt dla faktury klienta TypeContact_commande_external_SHIPPING=Kontakt klienta dla wysyłki TypeContact_commande_external_CUSTOMER=kontakt klienta w ślad za zamówienie -TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order +TypeContact_order_supplier_internal_SALESREPFOLL=Reprezentatywne kolejne zamówienie zakupu TypeContact_order_supplier_internal_SHIPPING=Przedstawiciela w ślad za koszty TypeContact_order_supplier_external_BILLING=Kontakt do faktury sprzedawcy TypeContact_order_supplier_external_SHIPPING=Kontakt z dostawcą -TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order +TypeContact_order_supplier_external_CUSTOMER=Kontakt z dostawcą po kolejnym zamówieniu Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Stała COMMANDE_SUPPLIER_ADDON nie zdefiniowane Error_COMMANDE_ADDON_NotDefined=Stała COMMANDE_ADDON nie zdefiniowane Error_OrderNotChecked=Nie wybrano zamówienia do faktury @@ -141,11 +143,12 @@ OrderByEMail=Adres e-mail OrderByWWW=Online OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=Kompletny model zamówienia (stara implementacja szablonu Eratosthene) +PDFEratostheneDescription=Kompletny model zamówienia PDFEdisonDescription=Prosty model celu -PDFProformaDescription=A complete Proforma invoice template +PDFProformaDescription=Kompletny szablon faktury Proforma CreateInvoiceForThisCustomer=Zamówienia na banknoty +CreateInvoiceForThisSupplier=Zamówienia na banknoty NoOrdersToInvoice=Brak zleceń rozliczanych CloseProcessedOrdersAutomatically=Sklasyfikować "przetwarzane" wszystkie wybrane zamówienia. OrderCreation=Tworzenie zamówienia @@ -154,11 +157,11 @@ OrderCreated=Twoje zamówienia zostały utworzone OrderFail=Podczas tworzenia zamówienia wystąpił błąd CreateOrders=Tworzenie zamówień ToBillSeveralOrderSelectCustomer=Aby utworzyć fakturę za kilka rzędów, kliknij pierwszy na klienta, a następnie wybrać "% 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 -WithReceptionFinished=With reception finished +OptionToSetOrderBilledNotEnabled=Opcja z modułu Workflow, aby automatycznie ustawić zamówienie na „Zafakturowane” po walidacji faktury, nie jest włączona, więc po wygenerowaniu faktury będziesz musiał ręcznie ustawić status zamówień na „Zafakturowane”. +IfValidateInvoiceIsNoOrderStayUnbilled=Jeśli weryfikacja faktury to „Nie”, zamówienie pozostanie w stanie „Niezafakturowane” do momentu potwierdzenia faktury. +CloseReceivedSupplierOrdersAutomatically=Zamknij zamówienie do statusu „%s” automatycznie, jeśli otrzymane zostaną wszystkie produkty. +SetShippingMode=Ustaw tryb wysyłki +WithReceptionFinished=Po zakończeniu odbioru #### supplier orders status StatusSupplierOrderCanceledShort=Anulowany StatusSupplierOrderDraftShort=Projekt diff --git a/htdocs/langs/pl_PL/other.lang b/htdocs/langs/pl_PL/other.lang index 22befcd2e4c..382cac1dde8 100644 --- a/htdocs/langs/pl_PL/other.lang +++ b/htdocs/langs/pl_PL/other.lang @@ -3,47 +3,47 @@ SecurityCode=Kod zabezpieczający NumberingShort=N° Tools=Narzędzia TMenuTools=Narzędzia -ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. +ToolsDesc=Wszystkie narzędzia, które nie są zawarte w innych pozycjach menu, są tutaj zgrupowane. <br> Wszystkie narzędzia są dostępne w lewym menu. Birthday=Urodziny BirthdayAlertOn=urodziny wpisu aktywnych BirthdayAlertOff=urodziny wpisu nieaktywne -TransKey=Translation of the key TransKey -MonthOfInvoice=Month (number 1-12) of invoice date -TextMonthOfInvoice=Month (text) of invoice date -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 <b>%s</b>. -DocFileGeneratedInto=Doc file generated into <b>%s</b>. +TransKey=Tłumaczenie klucza TransKey +MonthOfInvoice=Miesiąc (numer 1-12) daty faktury +TextMonthOfInvoice=Miesiąc (tekst) daty faktury +PreviousMonthOfInvoice=Poprzedni miesiąc (numer 1-12) od daty faktury +TextPreviousMonthOfInvoice=Poprzedni miesiąc (tekst) daty faktury +NextMonthOfInvoice=Kolejny miesiąc (numer 1-12) od daty wystawienia faktury +TextNextMonthOfInvoice=Kolejny miesiąc (tekst) od daty faktury +PreviousMonth=Poprzedni miesiac +CurrentMonth=Obecny miesiąc +ZipFileGeneratedInto=Plik ZIP wygenerowany w <b> %s </b>. +DocFileGeneratedInto=Plik doc wygenerowany w <b> %s </b>. JumpToLogin=Rozłączono. Idź do strony logowania... -MessageForm=Message on online payment form -MessageOK=Message on the return page for a validated payment -MessageKO=Message on the return page for a canceled payment -ContentOfDirectoryIsNotEmpty=Content of this directory is not empty. -DeleteAlsoContentRecursively=Check to delete all content recursively -PoweredBy=Powered by -YearOfInvoice=Year of invoice date -PreviousYearOfInvoice=Previous year of invoice date -NextYearOfInvoice=Following year of invoice date +MessageForm=Wiadomość na formularzu płatności online +MessageOK=Komunikat na stronie zwrotów potwierdzonej płatności +MessageKO=Komunikat na stronie zwrotów dotyczący anulowanej płatności +ContentOfDirectoryIsNotEmpty=Zawartość tego katalogu nie jest pusta. +DeleteAlsoContentRecursively=Zaznacz, aby usunąć rekursywnie całą zawartość +PoweredBy=Obsługiwane przez +YearOfInvoice=Rok daty faktury +PreviousYearOfInvoice=Poprzedni rok od daty wystawienia faktury +NextYearOfInvoice=Kolejny rok od daty wystawienia faktury DateNextInvoiceBeforeGen=Data kolejnej faktury (przed wygenerowaniem) DateNextInvoiceAfterGen=Data następnej faktury (po wygenerowaniu) -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 -Notify_ORDER_VALIDATE=Sales order validated -Notify_ORDER_SENTBYMAIL=Sales order sent by mail -Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email -Notify_ORDER_SUPPLIER_VALIDATE=Purchase order recorded -Notify_ORDER_SUPPLIER_APPROVE=Purchase order approved -Notify_ORDER_SUPPLIER_REFUSE=Purchase order refused +GraphInBarsAreLimitedToNMeasures=Grafika jest ograniczona do taktów %s w trybie „Bars”. Zamiast tego automatycznie wybrano tryb „Linie”. +OnlyOneFieldForXAxisIsPossible=Obecnie możliwe jest tylko 1 pole jako oś X. Wybrano tylko pierwsze wybrane pole. +AtLeastOneMeasureIsRequired=Wymagane jest co najmniej 1 pole do pomiaru +AtLeastOneXAxisIsRequired=Wymagane jest co najmniej 1 pole dla osi X. +LatestBlogPosts=Najnowsze posty na blogu +Notify_ORDER_VALIDATE=Zamówienie sprzedaży zostało zatwierdzone +Notify_ORDER_SENTBYMAIL=Zamówienie sprzedaży wysłane pocztą +Notify_ORDER_SUPPLIER_SENTBYMAIL=Zamówienie wysłane e-mailem +Notify_ORDER_SUPPLIER_VALIDATE=Zarejestrowano zamówienie zakupu +Notify_ORDER_SUPPLIER_APPROVE=Zatwierdzono zamówienie zakupu +Notify_ORDER_SUPPLIER_REFUSE=Zamówienie zostało odrzucone Notify_PROPAL_VALIDATE=Oferta klienta potwierdzona -Notify_PROPAL_CLOSE_SIGNED=Customer proposal closed signed -Notify_PROPAL_CLOSE_REFUSED=Customer proposal closed refused +Notify_PROPAL_CLOSE_SIGNED=Oferta klienta zamknięta i podpisana +Notify_PROPAL_CLOSE_REFUSED=Zamknięta propozycja klienta odrzucona Notify_PROPAL_SENTBYMAIL=Propozycja handlowa wysłana za pośrednictwem wiadomości email Notify_WITHDRAW_TRANSMIT=Wycofanie transmisji Notify_WITHDRAW_CREDIT=Wycofanie kredyt @@ -52,16 +52,16 @@ Notify_COMPANY_CREATE=Kontrahent utworzony Notify_COMPANY_SENTBYMAIL=Maile wysyłane z karty przez osoby trzecie Notify_BILL_VALIDATE=Faktura klienta zatwierdzona Notify_BILL_UNVALIDATE=Faktura klienta nie- zwalidowane -Notify_BILL_PAYED=Customer invoice paid +Notify_BILL_PAYED=Zapłacono fakturę klienta Notify_BILL_CANCEL=Faktura klienta anulowana Notify_BILL_SENTBYMAIL=Faktura klienta wysyłana za pośrednictwem wiadomości email -Notify_BILL_SUPPLIER_VALIDATE=Vendor invoice validated -Notify_BILL_SUPPLIER_PAYED=Vendor invoice paid -Notify_BILL_SUPPLIER_SENTBYMAIL=Vendor invoice sent by mail -Notify_BILL_SUPPLIER_CANCELED=Vendor invoice cancelled +Notify_BILL_SUPPLIER_VALIDATE=Zatwierdzona faktura dostawcy +Notify_BILL_SUPPLIER_PAYED=Zapłacono fakturę dostawcy +Notify_BILL_SUPPLIER_SENTBYMAIL=Faktura dostawcy wysłana pocztą +Notify_BILL_SUPPLIER_CANCELED=Faktura dostawcy anulowana Notify_CONTRACT_VALIDATE=Umowa zatwierdzona Notify_FICHINTER_VALIDATE=Interwencja zatwierdzona -Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention +Notify_FICHINTER_ADD_CONTACT=Dodano kontakt do interwencji Notify_FICHINTER_SENTBYMAIL=Interwencja wysłana za pośrednictwem wiadomości email Notify_SHIPPING_VALIDATE=Wysyłka zatwierdzona Notify_SHIPPING_SENTBYMAIL=Wysyłka wysłane pocztą @@ -74,46 +74,47 @@ Notify_PROJECT_CREATE=Stworzenie projektu Notify_TASK_CREATE=Zadanie utworzone Notify_TASK_MODIFY=Zadanie zmodyfikowane Notify_TASK_DELETE=Zadanie usunięte -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 -Notify_ACTION_CREATE=Added action to Agenda +Notify_EXPENSE_REPORT_VALIDATE=Raport z wydatków zweryfikowany (wymagana akceptacja) +Notify_EXPENSE_REPORT_APPROVE=Zatwierdzono raport wydatków +Notify_HOLIDAY_VALIDATE=Wniosek urlopowy został zatwierdzony (wymagana akceptacja) +Notify_HOLIDAY_APPROVE=Prośba o opuszczenie została zatwierdzona +Notify_ACTION_CREATE=Dodano akcję do agendy SeeModuleSetup=Zobacz konfigurację modułu% s NbOfAttachedFiles=Liczba załączonych plików / dokumentów TotalSizeOfAttachedFiles=Całkowita wielkość załączonych plików / dokumentów MaxSize=Maksymalny rozmiar AttachANewFile=Załącz nowy plik / dokument LinkedObject=Związany obiektu -NbOfActiveNotifications=Number of notifications (no. of recipient emails) -PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__<br>This is a <b>test</b> mail sent to __EMAIL__ (the word test must be in bold).<br>The lines are separated by a carriage return.<br><br>__USER_SIGNATURE__ -PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\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__ -PredefinedMailContentSendProposal=__(Hello)__\n\nPlease find commercial proposal __REF__ attached \n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nPlease find price request __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendOrder=__(Hello)__\n\nPlease find order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -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__ -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__<br><br>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. +NbOfActiveNotifications=Liczba powiadomień (liczba e-maili do odbiorców) +PredefinedMailTest=__(Cześć)__\nTo jest wiadomość testowa wysłana na adres __EMAIL__.\nWiersze są oddzielone znakiem powrotu karetki.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__ (Witaj) __ <br> To jest test <b> </b> wiadomość wysłana na adres __EMAIL__ (słowo test musi być pogrubione). <br> Wiersze są oddzielone znakiem powrotu karetki. <br> <br> __USER_SIGNATURE__ +PredefinedMailContentContract=__(Cześć)__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoice=__(Cześć)__\n\nW załączeniu faktura __REF__\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__(Cześć)__\n\nPrzypominamy, że wydaje się, że faktura __REF__ nie została zapłacona. Dla przypomnienia dołączamy kopię faktury.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendProposal=__(Cześć)__\n\nW załączeniu propozycja handlowa __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierProposal=__(Cześć)__\n\nW załączeniu zapytanie o cenę __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendOrder=__(Cześć)__\n\nW załączeniu zamówienie __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierOrder=__(Cześć)__\n\nW załączeniu przesyłamy nasze zamówienie __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierInvoice=__(Cześć)__\n\nW załączeniu faktura __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendShipping=__(Cześć)__\n\nW załączeniu przesyłka __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendFichInter=__(Cześć)__\n\nW załączeniu interwencja __REF__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentLink=Możesz kliknąć poniższy link, aby dokonać płatności, jeśli nie została jeszcze wykonana.\n\n%s\n\n +PredefinedMailContentGeneric=__(Cześć)__\n\n\n__(Z poważaniem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Przypomnienie o wydarzeniu „__EVENT_LABEL__” w dniu __EVENT_DATE__ o __EVENT_TIME__ <br> <br> To jest wiadomość automatyczna, proszę nie odpowiadać. +DemoDesc=Dolibarr to kompaktowy ERP / CRM obsługujący kilka modułów biznesowych. Demo pokazujące wszystkie moduły nie ma sensu, ponieważ taki scenariusz nigdy się nie zdarzy (kilkaset dostępnych). Tak więc dostępnych jest kilka profili demonstracyjnych. ChooseYourDemoProfil=Wybierz profil demo najlepiej odzwierciedlający twoje potrzeby... -ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection) +ChooseYourDemoProfilMore=... lub stwórz własny profil <br> (ręczny wybór modułu) DemoFundation=Zarządzanie członkami fundacji DemoFundation2=Zarządzanie członkami i kontami bankowymi fundacji DemoCompanyServiceOnly=Firma lub freelancer sprzedający tylko swoje usługi DemoCompanyShopWithCashDesk=Zarządzanie sklepem z kasy -DemoCompanyProductAndStocks=Shop selling products with Point Of Sales -DemoCompanyManufacturing=Company manufacturing products +DemoCompanyProductAndStocks=Kupuj produkty w punkcie sprzedaży +DemoCompanyManufacturing=Firma produkująca produkty DemoCompanyAll=Firma z kilkoma aktywnościami (wszystkie główne moduły) CreatedBy=Utworzone przez %s ModifiedBy=Zmodyfikowane przez %s ValidatedBy=Zatwierdzone przez %s +SignedBy=Podpisano przez %s ClosedBy=Zamknięte przez %s CreatedById=ID użytkownika który stworzył ModifiedById=ID użytkownika, który dokonał ostatnich zmian @@ -139,7 +140,7 @@ Right=Prawo CalculatedWeight=Obliczona waga CalculatedVolume=Obliczona wartość Weight=Waga -WeightUnitton=ton +WeightUnitton=tona WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -175,48 +176,48 @@ SizeUnitinch=cal SizeUnitfoot=stopa SizeUnitpoint=punkt BugTracker=Bug tracker -SendNewPasswordDesc=This form allows you to request a new password. It will be sent to your email address.<br>Change will become effective once you click on the confirmation link in the email.<br>Check your inbox. +SendNewPasswordDesc=Ten formularz umożliwia zażądanie nowego hasła. Zostanie on wysłany na Twój adres e-mail. <br> Zmiana zacznie obowiązywać po kliknięciu linku potwierdzającego w wiadomości e-mail. <br> Sprawdź swoją skrzynkę odbiorczą. BackToLoginPage=Powrót do strony logowania AuthenticationDoesNotAllowSendNewPassword=Uwierzytelnianie w <b>trybie %s.</b> <br> W tym trybie Dolibarr nie może znać ani zmienić hasła. <br> Skontaktuj się z administratorem systemu, jeśli chcesz zmienić swoje hasło. -EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. +EnableGDLibraryDesc=Zainstaluj lub włącz bibliotekę GD w instalacji PHP, aby użyć tej opcji. ProfIdShortDesc=<b>Prof ID %s</b> jest informacji w zależności od trzeciej kraju. <br> Na przykład, dla <b>kraju, %s,</b> jest to <b>kod %s.</b> DolibarrDemo=Demo Dolibarr ERP/CRM StatsByNumberOfUnits=Statystyki dla sum ilości produktów / usług -StatsByNumberOfEntities=Statistics in number of referring entities (no. of invoice, or order...) -NumberOfProposals=Number of proposals -NumberOfCustomerOrders=Number of sales orders +StatsByNumberOfEntities=Statystyki dotyczące liczby podmiotów polecających (nr faktury lub zamówienia ...) +NumberOfProposals=Liczba propozycji +NumberOfCustomerOrders=Liczba zamówień sprzedaży NumberOfCustomerInvoices=Ilość faktur klientów -NumberOfSupplierProposals=Number of vendor proposals -NumberOfSupplierOrders=Number of purchase orders -NumberOfSupplierInvoices=Number of vendor invoices -NumberOfContracts=Number of contracts -NumberOfMos=Number of manufacturing orders -NumberOfUnitsProposals=Number of units on proposals -NumberOfUnitsCustomerOrders=Number of units on sales orders -NumberOfUnitsCustomerInvoices=Number of units on customer invoices -NumberOfUnitsSupplierProposals=Number of units on vendor proposals -NumberOfUnitsSupplierOrders=Number of units on purchase orders -NumberOfUnitsSupplierInvoices=Number of units on vendor invoices -NumberOfUnitsContracts=Number of units on contracts -NumberOfUnitsMos=Number of units to produce in manufacturing orders -EMailTextInterventionAddedContact=A new intervention %s has been assigned to you. +NumberOfSupplierProposals=Liczba propozycji dostawców +NumberOfSupplierOrders=Liczba zamówień +NumberOfSupplierInvoices=Liczba faktur od dostawcy +NumberOfContracts=Liczba umów +NumberOfMos=Liczba zleceń produkcyjnych +NumberOfUnitsProposals=Liczba jednostek w propozycjach +NumberOfUnitsCustomerOrders=Liczba jednostek w zamówieniach sprzedaży +NumberOfUnitsCustomerInvoices=Liczba jednostek na fakturach klienta +NumberOfUnitsSupplierProposals=Liczba jednostek w propozycjach dostawców +NumberOfUnitsSupplierOrders=Liczba jednostek w zamówieniach zakupu +NumberOfUnitsSupplierInvoices=Liczba jednostek na fakturach dostawcy +NumberOfUnitsContracts=Liczba jednostek objętych kontraktami +NumberOfUnitsMos=Liczba jednostek do wyprodukowania w zleceniach produkcyjnych +EMailTextInterventionAddedContact=Przypisano Ci nową interwencję %s. EMailTextInterventionValidated=Interwencja %s zatwierdzona -EMailTextInvoiceValidated=Invoice %s has been validated. -EMailTextInvoicePayed=Invoice %s has been paid. -EMailTextProposalValidated=Proposal %s has been validated. -EMailTextProposalClosedSigned=Proposal %s has been closed signed. -EMailTextOrderValidated=Order %s has been validated. -EMailTextOrderApproved=Order %s has been approved. -EMailTextOrderValidatedBy=Order %s has been recorded by %s. -EMailTextOrderApprovedBy=Order %s has been approved by %s. -EMailTextOrderRefused=Order %s has been refused. -EMailTextOrderRefusedBy=Order %s has been refused by %s. -EMailTextExpeditionValidated=Shipping %s has been validated. -EMailTextExpenseReportValidated=Expense report %s has been validated. -EMailTextExpenseReportApproved=Expense report %s has been approved. -EMailTextHolidayValidated=Leave request %s has been validated. -EMailTextHolidayApproved=Leave request %s has been approved. -EMailTextActionAdded=The action %s has been added to the Agenda. +EMailTextInvoiceValidated=Faktura %s została zweryfikowana. +EMailTextInvoicePayed=Faktura %s została zapłacona. +EMailTextProposalValidated=Oferta %s została zweryfikowana. +EMailTextProposalClosedSigned=Wniosek %s został zamknięty i podpisany. +EMailTextOrderValidated=Zamówienie %s zostało zweryfikowane. +EMailTextOrderApproved=Zamówienie %s zostało zatwierdzone. +EMailTextOrderValidatedBy=Zamówienie %s zostało zarejestrowane przez %s. +EMailTextOrderApprovedBy=Zamówienie %s zostało zatwierdzone przez %s. +EMailTextOrderRefused=Zamówienie %s zostało odrzucone. +EMailTextOrderRefusedBy=Zamówienie %s zostało odrzucone przez %s. +EMailTextExpeditionValidated=Wysyłka %s została zweryfikowana. +EMailTextExpenseReportValidated=Raport z wydatków %s został zweryfikowany. +EMailTextExpenseReportApproved=Raport z wydatków %s został zatwierdzony. +EMailTextHolidayValidated=Wniosek o opuszczenie %s został zatwierdzony. +EMailTextHolidayApproved=Wniosek o urlop %s został zatwierdzony. +EMailTextActionAdded=Akcja %s została dodana do porządku obrad. ImportedWithSet=Przywóz zestaw danych DolibarrNotification=Automatyczne powiadomienie ResizeDesc=Skriv inn ny <b>bredde</b> eller ny høyde. Forhold vil bli holdt under resizing ... @@ -224,7 +225,7 @@ NewLength=Nowa szerokość NewHeight=Nowa waga NewSizeAfterCropping=Nowy rozmiar po przycięciu DefineNewAreaToPick=Definer nytt område på bildet for å plukke (venstre klikk på bildet og dra til du kommer til motsatt hjørne) -CurrentInformationOnImage=This tool was designed to help you to resize or crop an image. This is the information on the current edited image +CurrentInformationOnImage=To narzędzie zostało zaprojektowane, aby pomóc Ci zmienić rozmiar lub przyciąć obraz. To są informacje o aktualnie edytowanym obrazie ImageEditor=Edytor obrazów YouReceiveMailBecauseOfNotification=Du mottar denne meldingen fordi din e-post har blitt lagt til listen over mål for å bli informert om spesielle hendelser i %s programvare av %s. YouReceiveMailBecauseOfNotification2=Denne hendelsen er følgende: @@ -237,31 +238,32 @@ StartUpload=Rozpocznij przesyłanie CancelUpload=Anuluj przesyłanie FileIsTooBig=Plik jest za duży PleaseBePatient=Proszę o cierpliwość... -NewPassword=New password +NewPassword=Nowe hasło ResetPassword=Resetuj hasło -RequestToResetPasswordReceived=A request to change your password has been received. +RequestToResetPasswordReceived=Otrzymano prośbę o zmianę hasła. NewKeyIs=To są twoje nowe klucze do logowania NewKeyWillBe=Twój nowy klucz, aby zalogować się do programu będzie ClickHereToGoTo=Kliknij tutaj, aby przejść do %s YouMustClickToChange=Trzeba jednak najpierw kliknąć na poniższy link, aby potwierdzić tę zmianę hasła +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Jeśli nie zwrócić tę zmianę, po prostu zapomnieć ten e-mail. Twoje dane są przechowywane w sposób bezpieczny. IfAmountHigherThan=Jeśli kwota wyższa niż <strong>%s</strong> SourcesRepository=Źródła dla repozytorium -Chart=Chart +Chart=Wykres PassEncoding=Kodowanie hasła PermissionsAdd=Uprawnienia dodane PermissionsDelete=Uprawnienia usunięte YourPasswordMustHaveAtLeastXChars=Twoje hasło musi składać się z <strong>%s</strong> znaków YourPasswordHasBeenReset=Twoje hasło zostało zresetowane pomyślnie -ApplicantIpAddress=IP address of applicant -SMSSentTo=SMS sent to %s -MissingIds=Missing ids -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.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 -PrefixSession=Prefix for session ID +ApplicantIpAddress=Adres IP wnioskodawcy +SMSSentTo=SMS wysłany na numer %s +MissingIds=Brakujące identyfikatory +ThirdPartyCreatedByEmailCollector=Strona trzecia utworzona przez moduł zbierający wiadomości e-mail z wiadomości e-mail MSGID %s +ContactCreatedByEmailCollector=Kontakt / adres utworzony przez kolektora poczty e-mail z wiadomości e-mail MSGID %s +ProjectCreatedByEmailCollector=Projekt utworzony przez kolektor poczty e-mail z wiadomości e-mail MSGID %s +TicketCreatedByEmailCollector=Bilet utworzony przez zbierającego wiadomości e-mail z wiadomości e-mail MSGID %s +OpeningHoursFormatDesc=Użyj - aby oddzielić godziny otwarcia i zamknięcia. <br> Użyj spacji, aby wprowadzić różne zakresy. <br> Przykład: 8-12 14-18 +PrefixSession=Prefiks identyfikatora sesji ##### Export ##### ExportsArea=Wywóz obszarze @@ -271,20 +273,20 @@ LibraryVersion=Wersja biblioteki ExportableDatas=Eksport danych NoExportableData=Nr eksport danych (bez modułów z eksportowane dane załadowane lub brakujące uprawnienia) ##### External sites ##### -WebsiteSetup=Setup of module website +WebsiteSetup=Konfiguracja strony internetowej modułu WEBSITE_PAGEURL=Link strony WEBSITE_TITLE=Tytuł WEBSITE_DESCRIPTION=Opis -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_IMAGE=Wizerunek +WEBSITE_IMAGEDesc=Względna ścieżka nośnika obrazu. Możesz pozostawić to pole puste, ponieważ jest rzadko używane (może być używane przez zawartość dynamiczną do wyświetlania miniatury na liście postów na blogu). Użyj __WEBSITE_KEY__ w ścieżce, jeśli ścieżka zależy od nazwy witryny (na przykład: obraz / __ WEBSITE_KEY __ / historie / mójimage.png). WEBSITE_KEYWORDS=Słowa kluczowe -LinesToImport=Lines to import +LinesToImport=Linie do zaimportowania -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... +MemoryUsage=Zużycie pamięci +RequestDuration=Czas trwania zapytania +ProductsPerPopularity=Produkty / usługi według popularności +PopuProp=Produkty / usługi według popularności w propozycjach +PopuCom=Produkty / usługi według popularności w Zamówieniach +ProductStatistics=Statystyki produktów / usług +NbOfQtyInOrders=Ilość w zamówieniach +SelectTheTypeOfObjectToAnalyze=Wybierz typ obiektu do analizy ... diff --git a/htdocs/langs/pl_PL/productbatch.lang b/htdocs/langs/pl_PL/productbatch.lang index 35d92225276..8fd61acd09e 100644 --- a/htdocs/langs/pl_PL/productbatch.lang +++ b/htdocs/langs/pl_PL/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Użyj lot / numer seryjny -ProductStatusOnBatch=Tak (lot / numer seryjny wymagany) +ProductStatusOnBatch=Tak (wymagana partia) +ProductStatusOnSerial=Tak (wymagany unikalny numer seryjny) ProductStatusNotOnBatch=Nie (lot / numer seryjny nie wykorzystany) -ProductStatusOnBatchShort=Tak +ProductStatusOnBatchShort=Partia +ProductStatusOnSerialShort=Seryjny ProductStatusNotOnBatchShort=Nie Batch=Lot/Serial atleast1batchfield=Data wykorzystania lub data sprzedaży lub Lot / Numer seryjny @@ -16,9 +18,18 @@ printEatby=Wykorzystaj po: %s printSellby=Sprzedaj po: %s printQty=Ilość: %d AddDispatchBatchLine=Dodaj linię dla przedłużenia wysyłki -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. +WhenProductBatchModuleOnOptionAreForced=Kiedy moduł Grupa Produktów/Numer Seryjny jest włączony, automatyczne zmniejszenie stanu magazynowego jest wymuszone do 'Zmniejszenia fizycznego stanu magazynowego przy zatwierdzeniu wysyłki' i automatyczne zwiększenie stanu magazynowego jest wymuszone do 'Zwiększenia fizycznego stanu magazynowego przy ręcznym wysyłaniu produktów do magazynu' i nie może być edytowane. Inne opcje mogą być zmienione dowolnie. ProductDoesNotUseBatchSerial=Ten produkt nie używa lotu/numeru seryjnego ProductLotSetup=Konfiguracja modułu lot/seria ShowCurrentStockOfLot=Pokaż aktualny zapas dla pasy produkt/lot ShowLogOfMovementIfLot=Pokaż historię przesunięć dla pary produkt/lot StockDetailPerBatch=Szczegóły zapasu po locie +SerialNumberAlreadyInUse=Numer seryjny %s jest już używany dla produktu %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Opcje automatycznego generowania produktów wsadowych zarządzanych partiami +BatchSerialNumberingModules=Opcje automatycznego generowania produktów wsadowych zarządzanych według numerów seryjnych +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/pl_PL/products.lang b/htdocs/langs/pl_PL/products.lang index 3317f16ba9a..7abe05286d0 100644 --- a/htdocs/langs/pl_PL/products.lang +++ b/htdocs/langs/pl_PL/products.lang @@ -17,16 +17,16 @@ Create=Utwórz Reference=Nr referencyjny NewProduct=Nowy produkt NewService=Nowa usługa -ProductVatMassChange=Global VAT Update -ProductVatMassChangeDesc=This tool updates the VAT rate defined on <b><u>ALL</u></b> products and services! +ProductVatMassChange=Globalna aktualizacja podatku VAT +ProductVatMassChangeDesc=To narzędzie aktualizuje stawkę VAT zdefiniowaną dla <b> <u> WSZYSTKIE </u> </b> produktów i usług! MassBarcodeInit=Masowa inicjalizacja kodów kreskowych MassBarcodeInitDesc=Strona ta może być używana do wygenerowania kodu kreskowego dla obiektów nie posiadających zdefiniowanego kodu. Sprawdź wcześniej, czy ustawienia modułu kodu kreskowego jest kompletna. ProductAccountancyBuyCode=Kod księgowy (zakup) -ProductAccountancyBuyIntraCode=Accounting code (purchase intra-community) -ProductAccountancyBuyExportCode=Accounting code (purchase import) +ProductAccountancyBuyIntraCode=Kod księgowy (zakup wewnątrzwspólnotowy) +ProductAccountancyBuyExportCode=Kod księgowy (import zakupów) ProductAccountancySellCode=Kod księgowy (sprzedaż) -ProductAccountancySellIntraCode=Accounting code (sale intra-Community) -ProductAccountancySellExportCode=Accounting code (sale export) +ProductAccountancySellIntraCode=Kod księgowy (sprzedaż wewnątrzwspólnotowa) +ProductAccountancySellExportCode=Kod księgowy (sprzedaż eksport) ProductOrService=Produkt lub usługa ProductsAndServices=Produkty i usługi ProductsOrServices=Produkty lub Usługi @@ -43,7 +43,7 @@ ServicesOnSaleOnly=Usługi tylko na sprzedaż ServicesOnPurchaseOnly=Usługi tylko do zakupu ServicesNotOnSell=Usługi nie na sprzedaż i nie do zakupu ServicesOnSellAndOnBuy=Usługi na sprzedaż i do zakupu -LastModifiedProductsAndServices=Latest %s modified products/services +LastModifiedProductsAndServices=Najnowsze zmodyfikowane produkty / usługi %s LastRecordedProducts=Ostatnie %s zarejestrowanych produktów LastRecordedServices=Ostatnie %s zarejestrowanych usług CardProduct0=Produkt @@ -68,18 +68,18 @@ ProductStatusNotOnBuyShort=Nie do zakupu UpdateVAT=Uaktualnij VAT UpdateDefaultPrice=Uaktualnij domyślną cenę UpdateLevelPrices=Uaktualnij ceny dla każdego poziomu -AppliedPricesFrom=Applied from +AppliedPricesFrom=Zastosowano od SellingPrice=Cena sprzedaży SellingPriceHT=Cena sprzedaży (Bez VAT) SellingPriceTTC=Cena sprzedaży (z podatkiem) SellingMinPriceTTC=Minimalna cena sprzedaży (z podatkiem) -CostPriceDescription=This price field (excl. tax) can be used to store the average amount this product costs to your company. It may be any price you calculate yourself, for example from the average buying price plus average production and distribution cost. -CostPriceUsage=This value could be used for margin calculation. +CostPriceDescription=To pole ceny (bez podatku) może służyć do przechowywania średniej kwoty, jaką ten produkt kosztuje dla Twojej firmy. Może to być każda cena, którą sam obliczysz, na przykład ze średniej ceny zakupu plus średni koszt produkcji i dystrybucji. +CostPriceUsage=Wartość tę można wykorzystać do obliczenia depozytu zabezpieczającego. SoldAmount=Sprzedana ilość PurchasedAmount=Zakupiona ilość NewPrice=Nowa cena -MinPrice=Min. sell price -EditSellingPriceLabel=Edit selling price label +MinPrice=Min. Cena sprzedaży +EditSellingPriceLabel=Edytuj etykietę ceny sprzedaży CantBeLessThanMinPrice=Cena sprzedaży nie może być niższa niż minimalna dopuszczalna dla tego produktu (%s bez podatku). Ten komunikat może się również pojawić po wpisaniu zbyt wysokiego rabatu. ContractStatusClosed=Zamknięte ErrorProductAlreadyExists=Produkt o numerze referencyjnym %s już istnieje. @@ -96,7 +96,7 @@ ServicesArea=Obszar usług ListOfStockMovements=Wykaz przesunięć magazynowych BuyingPrice=Cena zakupu PriceForEachProduct=Produkt z konkretną ceną -SupplierCard=Vendor card +SupplierCard=Karta sprzedawcy PriceRemoved=Cena usunięta BarCode=Kod kreskowy BarcodeType=Typ kodu kreskowego @@ -104,25 +104,25 @@ 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) +FillWithLastServiceDates=Wpisz daty ostatniej linii serwisowej +MultiPricesAbility=Wiele segmentów cenowych na produkt / usługę (każdy klient jest w jednym segmencie cenowym) MultiPricesNumPrices=Ilość cen -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Enable Kits (set of several products) -VariantsAbility=Enable Variants (variations of products, for example color, size) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +DefaultPriceType=Podstawa cen domyślnych (z i bez podatku) przy dodawaniu nowych cen sprzedaży +AssociatedProductsAbility=Enable Kits (zestaw kilku produktów) +VariantsAbility=Włącz warianty (odmiany produktów, na przykład kolor, rozmiar) +AssociatedProducts=Zestawy +AssociatedProductsNumber=Liczba produktów tworzących ten zestaw ParentProductsNumber=Liczba dominującej opakowaniu produktu ParentProducts=Produkt macieżysty -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=Jeśli 0, ten produkt nie jest zestawem +IfZeroItIsNotUsedByVirtualProduct=Jeśli 0, ten produkt nie jest używany przez żaden zestaw KeywordFilter=Filtr słów kluczowych CategoryFilter=Filtr kategorii ProductToAddSearch=Szukaj produktu do dodania NoMatchFound=Nie znaleziono odpowiednika ListOfProductsServices=Lista produktów/usług -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=Lista produktów / usług wchodzących w skład tego zestawu +ProductParentList=Lista zestawów zawierających ten produkt jako składnik ErrorAssociationIsFatherOfThis=Jeden z wybranych produktów jest nadrzędny dla produktu bieżącego DeleteProduct=Usuń produkt/usługę ConfirmDeleteProduct=Czy na pewno chcesz usunąć ten produkt/usługę? @@ -134,20 +134,21 @@ ImportDataset_service_1=Usługi DeleteProductLine=Usuń linię produktu ConfirmDeleteProductLine=Czy na pewno chcesz usunąć tę linię produktu? ProductSpecial=Specjalne -QtyMin=Min. purchase quantity -PriceQtyMin=Price quantity min. -PriceQtyMinCurrency=Price (currency) for this qty. (no discount) -VATRateForSupplierProduct=VAT Rate (for this vendor/product) -DiscountQtyMin=Discount for this qty. -NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product -NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product -PredefinedProductsToSell=Predefined Product -PredefinedServicesToSell=Predefined Service +QtyMin=Ilość minimalna +PriceQtyMin=Cena ilość min. +PriceQtyMinCurrency=Cena (waluta) za tę ilość. (bez rabatu) +VATRateForSupplierProduct=Stawka VAT (dla tego dostawcy / produktu) +DiscountQtyMin=Rabat na tę ilość. +NoPriceDefinedForThisSupplier=Brak zdefiniowanej ceny / ilości dla tego dostawcy / produktu +NoSupplierPriceDefinedForThisProduct=Dla tego produktu nie określono ceny / ilości dostawcy +PredefinedItem=Wstępnie zdefiniowany przedmiot +PredefinedProductsToSell=Predefiniowany produkt +PredefinedServicesToSell=Usługa predefiniowana PredefinedProductsAndServicesToSell=Predefiniowane produkty / usługi do sprzedaży PredefinedProductsToPurchase=Predefiniowane produkty do zakupu PredefinedServicesToPurchase=Predefiniowane usługi do zakupu -PredefinedProductsAndServicesToPurchase=Predefined products/services to purchase -NotPredefinedProducts=Not predefined products/services +PredefinedProductsAndServicesToPurchase=Wstępnie zdefiniowane produkty / usługi do zakupu +NotPredefinedProducts=Niezdefiniowane produkty / usługi GenerateThumb=Wygeneruj miniaturkę ServiceNb=Usługa #%s ListProductServiceByPopularity=Lista produktów/usług ze względu na popularność @@ -156,10 +157,10 @@ ListServiceByPopularity=Wykaz usług ze względu na popularność Finished=Produkty wytwarzane RowMaterial=Surowiec ConfirmCloneProduct=Czy na pewno chcesz powielić produkt lub usługę <b>%s</b>? -CloneContentProduct=Clone all main information of product/service +CloneContentProduct=Sklonuj wszystkie główne informacje o produkcie / usłudze ClonePricesProduct=Powiel ceny -CloneCategoriesProduct=Clone tags/categories linked -CloneCompositionProduct=Clone virtual product/service +CloneCategoriesProduct=Klonuj tagi / kategorie połączone +CloneCompositionProduct=Sklonuj wirtualny produkt / usługę CloneCombinationsProduct=Powiel warianty produktu ProductIsUsed=Ten produkt jest używany NewRefForClone=Referencja nowego produktu/usługi @@ -167,14 +168,14 @@ SellingPrices=Cena sprzedaży BuyingPrices=Cena zakupu CustomerPrices=Ceny klienta SuppliersPrices=Ceny dostawców -SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs|Commodity|HS code +SuppliersPricesOfProductsOrServices=Ceny dostawców (produktów lub usług) +CustomCode=Cła | Towar | Kod HS CountryOrigin=Kraj pochodzenia -RegionStateOrigin=Region origin -StateOrigin=State|Province origin -Nature=Nature of product (material/finished) -NatureOfProductShort=Nature of product -NatureOfProductDesc=Raw material or finished product +RegionStateOrigin=Region pochodzenia +StateOrigin=Stan | prowincja +Nature=Charakter produktu (materiał / wykończenie) +NatureOfProductShort=Charakter produktu +NatureOfProductDesc=Surowiec lub gotowy produkt ShortLabel=Krótka etykieta Unit=Jednostka p=jedn. @@ -198,7 +199,7 @@ m3=m³ liter=litr l=l unitP=Sztuka -unitSET=Set +unitSET=Zestaw unitS=Sekunda unitH=Godzina unitD=Dzień @@ -208,7 +209,7 @@ unitLM=Metr bieżący unitM2=Metr kwadratowy unitM3=Metr sześcienny unitL=Litr -unitT=ton +unitT=tona unitKG=kg unitG=Gram unitMG=mg @@ -219,7 +220,7 @@ unitDM=dm unitCM=cm unitMM=mm unitFT=ft -unitIN=in +unitIN=w unitM2=Metr kwadratowy unitDM2=dm² unitCM2=cm² @@ -240,18 +241,18 @@ CurrentProductPrice=Aktualna cena AlwaysUseNewPrice=Zawsze używaj aktualnej ceny produktu/usługi AlwaysUseFixedPrice=Zastosuj stałą cenę PriceByQuantity=Różne ceny według ilości -DisablePriceByQty=Disable prices by quantity +DisablePriceByQty=Wyłącz ceny według ilości PriceByQuantityRange=Zakres ilości -MultipriceRules=Automatic prices for segment -UseMultipriceRules=Use price segment rules (defined into product module setup) to auto calculate prices of all other segments according to first segment +MultipriceRules=Ceny automatyczne za segment +UseMultipriceRules=Użyj reguł segmentów cenowych (zdefiniowanych w konfiguracji modułu produktu), aby automatycznie obliczyć ceny wszystkich innych segmentów zgodnie z pierwszym segmentem PercentVariationOver=%% Zmiany na% s PercentDiscountOver=%% Rabatu na% s -KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products -VariantRefExample=Examples: COL, SIZE -VariantLabelExample=Examples: Color, Size +KeepEmptyForAutoCalculation=Pozostaw puste, aby to było obliczane automatycznie na podstawie wagi lub objętości produktów +VariantRefExample=Przykłady: COL, SIZE +VariantLabelExample=Przykłady: kolor, rozmiar ### composition fabrication Build=Produkcja -ProductsMultiPrice=Products and prices for each price segment +ProductsMultiPrice=Produkty i ceny w każdym segmencie cenowym ProductsOrServiceMultiPrice=Ceny klienta (produktów lub usług, multi-ceny) ProductSellByQuarterHT=Kwartalne obroty na produktach przed opodatkowaniem ServiceSellByQuarterHT=Kwartalne obroty na usłuigach przed opodatkowaniem @@ -260,48 +261,48 @@ Quarter2=2-i Kwartał Quarter3=3-i Kwartał Quarter4=4-y Kwartał BarCodePrintsheet=Drukuj kod kreskowy -PageToGenerateBarCodeSheets=With this tool, you can print sheets of barcode stickers. Choose format of your sticker page, type of barcode and value of barcode, then click on button <b>%s</b>. +PageToGenerateBarCodeSheets=Za pomocą tego narzędzia możesz drukować arkusze naklejek z kodami kreskowymi. Wybierz format strony z naklejkami, typ kodu kreskowego i wartość kodu kreskowego, a następnie kliknij przycisk <b> %s </b>. NumberOfStickers=Ilość naklejek do wydrukowania na stronie PrintsheetForOneBarCode=Wydrukuj kilka naklejek dla kodu kreskowego BuildPageToPrint=Generowanie strony do druku FillBarCodeTypeAndValueManually=Wypełnij typ kodu kreskowego i wartość ręcznie. FillBarCodeTypeAndValueFromProduct=Wypełnij typ kodu kreskowego i wartości z kodu kreskowego produktu. -FillBarCodeTypeAndValueFromThirdParty=Fill barcode type and value from barcode of a third party. -DefinitionOfBarCodeForProductNotComplete=Definition of type or value of barcode not complete for product %s. -DefinitionOfBarCodeForThirdpartyNotComplete=Definition of type or value of barcode non complete for third party %s. -BarCodeDataForProduct=Barcode information of product %s: -BarCodeDataForThirdparty=Barcode information of third party %s: -ResetBarcodeForAllRecords=Define barcode value for all record (this will also reset barcode value already defined with new values) +FillBarCodeTypeAndValueFromThirdParty=Wypełnij typ i wartość kodu kreskowego z kodu kreskowego strony trzeciej. +DefinitionOfBarCodeForProductNotComplete=Definicja typu lub wartości kodu kreskowego niekompletna dla produktu %s. +DefinitionOfBarCodeForThirdpartyNotComplete=Definicja typu lub wartości kodu kreskowego niekompletnego dla strony trzeciej %s. +BarCodeDataForProduct=Informacje o kodzie kreskowym produktu %s: +BarCodeDataForThirdparty=Informacje o kodzie kreskowym strony trzeciej %s: +ResetBarcodeForAllRecords=Zdefiniuj wartość kodu kreskowego dla całego rekordu (spowoduje to również zresetowanie wartości kodu kreskowego już zdefiniowanej z nowymi wartościami) PriceByCustomer=Różne ceny dla każdego klienta -PriceCatalogue=A single sell price per product/service -PricingRule=Rules for selling prices +PriceCatalogue=Pojedyncza cena sprzedaży za produkt / usługę +PricingRule=Zasady dotyczące cen sprzedaży AddCustomerPrice=Dodaj cenę dla klienta ForceUpdateChildPriceSoc=Ustaw sama cena na zależnych klientów PriceByCustomerLog=Stwórz log z wcześniejszymi cenami dla klienta MinimumPriceLimit=Cena minimalna nie może być niższa niż %s -MinimumRecommendedPrice=Minimum recommended price is: %s +MinimumRecommendedPrice=Minimalna zalecana cena to: %s PriceExpressionEditor=Edytor Cena wyraz PriceExpressionSelected=Wybrany wyraz cena PriceExpressionEditorHelp1="Cena = 2 + 2" lub "2 + 2" dla ustalenia ceny. Użyj; oddzielić wyrażeń PriceExpressionEditorHelp2=Możesz uzyskać dostęp ExtraFields ze zmiennymi jak <b># extrafield_myextrafieldkey #</b> i zmiennych globalnych z <b># global_mycode #</b> -PriceExpressionEditorHelp3=In both product/service and vendor prices there are these variables available:<br><b>#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min#</b> -PriceExpressionEditorHelp4=In product/service price only: <b>#supplier_min_price#</b><br>In vendor prices only: <b>#supplier_quantity# and #supplier_tva_tx#</b> +PriceExpressionEditorHelp3=Zarówno w cenach produktów / usług, jak i dostawców dostępne są następujące zmienne: <br> <b> # tva_tx # # localtax1_tx # # localtax2_tx # # weight # # length # # surface # # price_min # </b> +PriceExpressionEditorHelp4=Tylko w cenie produktu / usługi: <b> # provider_min_price # </b> <br> Tylko w cenach dostawcy: <b> # provider_quantity # and # provider_tva_tx # a09a4b739f17f8z PriceExpressionEditorHelp5=Dostępne wartości globalne: PriceMode=Tryb Cena PriceNumeric=Liczba DefaultPrice=Domyśla cena -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Dziennik poprzednich cen domyślnych ComposedProductIncDecStock=Wzrost / spadek akcji na zmiany dominującej -ComposedProduct=Child products +ComposedProduct=Produkty dla dzieci MinSupplierPrice=Minimalna cena zakupu -MinCustomerPrice=Minimum selling price +MinCustomerPrice=Minimalna cena sprzedaży DynamicPriceConfiguration=Konfiguracja dynamicznych cen -DynamicPriceDesc=You may define mathematical formulae to calculate Customer or Vendor prices. Such formulas can use all mathematical operators, some constants and variables. You can define here the variables you wish to use. If the variable needs an automatic update, you may define the external URL to allow Dolibarr to update the value automatically. -AddVariable=Add Variable -AddUpdater=Add Updater +DynamicPriceDesc=Możesz zdefiniować formuły matematyczne do obliczania cen klientów lub dostawców. Takie formuły mogą wykorzystywać wszystkie operatory matematyczne, niektóre stałe i zmienne. Możesz tutaj zdefiniować zmienne, których chcesz użyć. Jeśli zmienna wymaga automatycznej aktualizacji, możesz zdefiniować zewnętrzny adres URL, aby umożliwić firmie Dolibarr automatyczną aktualizację wartości. +AddVariable=Dodaj zmienną +AddUpdater=Dodaj Updater GlobalVariables=Zmienne globalne -VariableToUpdate=Variable to update -GlobalVariableUpdaters=External updaters for variables +VariableToUpdate=Zmienna do aktualizacji +GlobalVariableUpdaters=Zewnętrzne aktualizatory zmiennych GlobalVariableUpdaterType0=Dane JSON GlobalVariableUpdaterHelp0=Analizuje dane JSON z określonego adresu URL, wartość określa położenie odpowiedniej wartości, GlobalVariableUpdaterHelpFormat0=Format żądania {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"} @@ -313,38 +314,38 @@ LastUpdated=Ostatnia aktualizacja CorrectlyUpdated=Poprawnie zaktualizowane PropalMergePdfProductActualFile=Pliki użyć, aby dodać do PDF Azur są / jest PropalMergePdfProductChooseFile=Wybież plik PDF -IncludingProductWithTag=Dołącz produkt / usługę z tagiem +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Domyślna cena, realna cena może zależeć od klienta WarningSelectOneDocument=Proszę zaznaczyć co najmniej jeden dokument DefaultUnitToShow=Jednostka -NbOfQtyInProposals=Qty in proposals -ClinkOnALinkOfColumn=Click on a link of column %s to get a detailed view... -ProductsOrServicesTranslations=Products/Services translations -TranslatedLabel=Translated label -TranslatedDescription=Translated description -TranslatedNote=Translated notes +NbOfQtyInProposals=Ilość w propozycjach +ClinkOnALinkOfColumn=Kliknij link do kolumny %s, aby uzyskać szczegółowy widok ... +ProductsOrServicesTranslations=Tłumaczenia produktów / usług +TranslatedLabel=Przetłumaczona etykieta +TranslatedDescription=Przetłumaczony opis +TranslatedNote=Przetłumaczone notatki ProductWeight=Waga dla 1 produktu ProductVolume=Objętość 1 produktu WeightUnits=Jednostka wagi VolumeUnits=Jednostka objętości -WidthUnits=Width unit -LengthUnits=Length unit -HeightUnits=Height unit -SurfaceUnits=Surface unit +WidthUnits=Jednostka szerokości +LengthUnits=Jednostka długości +HeightUnits=Jednostka wysokości +SurfaceUnits=Jednostka powierzchniowa SizeUnits=Jednostka rozmiaru DeleteProductBuyPrice=Usuń cenę zakupu -ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price? -SubProduct=Sub product +ConfirmDeleteProductBuyPrice=Czy na pewno chcesz usunąć tę cenę zakupu? +SubProduct=Produkt podrzędny ProductSheet=Arkusz produktu ServiceSheet=Arkusz usługi -PossibleValues=Possible values -GoOnMenuToCreateVairants=Go on menu %s - %s to prepare attribute variants (like colors, size, ...) -UseProductFournDesc=Add a feature to define the descriptions of products defined by the vendors in addition to descriptions for customers -ProductSupplierDescription=Vendor description for the product -UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents) -PackagingForThisProduct=Packaging -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity -QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging +PossibleValues=Możliwa wartość +GoOnMenuToCreateVairants=Przejdź do menu %s - %s, aby przygotować warianty atrybutów (takie jak kolory, rozmiar, ...) +UseProductFournDesc=Dodaj funkcję definiowania opisów produktów zdefiniowanych przez dostawców oprócz opisów dla klientów +ProductSupplierDescription=Opis dostawcy produktu +UseProductSupplierPackaging=Użyj opakowania w cenach dostawcy (przelicz ilości zgodnie z opakowaniem ustawionym na cenie dostawcy podczas dodawania / aktualizowania linii w dokumentach dostawcy) +PackagingForThisProduct=Opakowanie +PackagingForThisProductDesc=Na zamówienie dostawcy automatycznie zamówisz tę ilość (lub wielokrotność tej ilości). Nie może być mniejsza niż minimalna ilość zakupu +QtyRecalculatedWithPackaging=Ilość linii została przeliczona zgodnie z opakowaniem dostawcy #Attributes VariantAttributes=Atrybuty wariantu @@ -352,46 +353,46 @@ ProductAttributes=Atrybuty wariantu dla produktów ProductAttributeName=Atrybut wariantu %s ProductAttribute=Atrybut wariantu ProductAttributeDeleteDialog=Czy jesteś pewien, że chcesz usunąć ten atrybut? Wszystkie wartości zostaną usunięte -ProductAttributeValueDeleteDialog=Are you sure you want to delete the value "%s" with reference "%s" of this attribute? +ProductAttributeValueDeleteDialog=Czy na pewno chcesz usunąć wartość „%s” z odniesieniem „%s” tego atrybutu? ProductCombinationDeleteDialog=Czy jesteś pewien, że chcesz usunąć wariant produktu "<strong>%s</strong>"? -ProductCombinationAlreadyUsed=There was an error while deleting the variant. Please check it is not being used in any object +ProductCombinationAlreadyUsed=Wystąpił błąd podczas usuwania wariantu. Sprawdź, czy nie jest używany w żadnym obiekcie ProductCombinations=Warianty -PropagateVariant=Propagate variants -HideProductCombinations=Hide products variant in the products selector +PropagateVariant=Propaguj warianty +HideProductCombinations=Ukryj wariant produktów w selektorze produktów ProductCombination=Wariant NewProductCombination=Nowy wariant EditProductCombination=Edycja wariantu NewProductCombinations=Nowe warianty -EditProductCombinations=Editing variants -SelectCombination=Select combination +EditProductCombinations=Edycja wariantów +SelectCombination=Wybierz kombinację 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 +Features=funkcje +PriceImpact=Wpływ na cenę +ImpactOnPriceLevel=Wpływ na poziom cen %s +ApplyToAllPriceImpactLevel= Zastosuj na wszystkich poziomach +ApplyToAllPriceImpactLevelHelp=Klikając tutaj, ustawiasz taki sam wpływ ceny na wszystkich poziomach +WeightImpact=Wpływ na wagę NewProductAttribute=Nowy atrybut NewProductAttributeValue=Nowa wartość atrybutu -ErrorCreatingProductAttributeValue=There was an error while creating the attribute value. It could be because there is already an existing value with that reference -ProductCombinationGeneratorWarning=If you continue, before generating new variants, all previous ones will be DELETED. Already existing ones will be updated with the new values -TooMuchCombinationsWarning=Generating lots of variants may result in high CPU, memory usage and Dolibarr not able to create them. Enabling the option "%s" may help reduce memory usage. -DoNotRemovePreviousCombinations=Do not remove previous variants -UsePercentageVariations=Use percentage variations -PercentageVariation=Percentage variation -ErrorDeletingGeneratedProducts=There was an error while trying to delete existing product variants -NbOfDifferentValues=No. of different values -NbProducts=Number of products +ErrorCreatingProductAttributeValue=Wystąpił błąd podczas tworzenia wartości atrybutu. Może to być spowodowane tym, że istnieje już wartość z tym odniesieniem +ProductCombinationGeneratorWarning=Jeśli będziesz kontynuować, przed wygenerowaniem nowych wariantów wszystkie poprzednie zostaną USUNIĘTE. Już istniejące zostaną zaktualizowane o nowe wartości +TooMuchCombinationsWarning=Generowanie wielu wariantów może skutkować dużym obciążeniem procesora i pamięci, a Dolibarr nie będzie w stanie ich utworzyć. Włączenie opcji „%s” może pomóc zmniejszyć użycie pamięci. +DoNotRemovePreviousCombinations=Nie usuwaj poprzednich wariantów +UsePercentageVariations=Użyj odchyleń procentowych +PercentageVariation=Odchylenie procentowe +ErrorDeletingGeneratedProducts=Wystąpił błąd podczas próby usunięcia istniejących wariantów produktu +NbOfDifferentValues=Liczba różnych wartości +NbProducts=Liczba produktów ParentProduct=Produkt macieżysty -HideChildProducts=Hide variant products -ShowChildProducts=Show variant products -NoEditVariants=Go to Parent product card and edit variants price impact in the variants tab -ConfirmCloneProductCombinations=Would you like to copy all the product variants to the other parent product with the given reference? -CloneDestinationReference=Destination product reference -ErrorCopyProductCombinations=There was an error while copying the product variants -ErrorDestinationProductNotFound=Destination product not found +HideChildProducts=Ukryj warianty produktów +ShowChildProducts=Pokaż warianty produktów +NoEditVariants=Przejdź do karty produktu nadrzędnego i edytuj wpływ cen wariantów na karcie wariantów +ConfirmCloneProductCombinations=Czy chcesz skopiować wszystkie warianty produktu do innego produktu macierzystego z podanym numerem referencyjnym? +CloneDestinationReference=Numer referencyjny produktu docelowego +ErrorCopyProductCombinations=Wystąpił błąd podczas kopiowania wariantów produktu +ErrorDestinationProductNotFound=Nie znaleziono produktu docelowego ErrorProductCombinationNotFound=Wariant produktu nie znaleziony -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=Akcja dostępna tylko w wariancie produktu +ProductsPricePerCustomer=Ceny produktów na klientów +ProductSupplierExtraFields=Dodatkowe atrybuty (ceny dostawców) +DeleteLinkedProduct=Usuń produkt podrzędny powiązany z kombinacją diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index 6a19404be3c..2ad158c5d84 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -7,24 +7,24 @@ ProjectsArea=Obszar projektów ProjectStatus=Status projektu SharedProject=Wszyscy PrivateProject=Kontakty projektu -ProjectsImContactFor=Projects for which I am explicitly a contact -AllAllowedProjects=All project I can read (mine + public) +ProjectsImContactFor=Projekty, dla których jestem jawnym kontaktem +AllAllowedProjects=Cały projekt, który mogę przeczytać (mój + publiczny) AllProjects=Wszystkie projekty -MyProjectsDesc=This view is limited to projects you are a contact for +MyProjectsDesc=Ten widok jest ograniczony do projektów, w których jesteś osobą kontaktową ProjectsPublicDesc=Ten widok przedstawia wszystkie projekty, które możesz przeczytać. -TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read. +TasksOnProjectsPublicDesc=Ten widok przedstawia wszystkie zadania w projektach, które możesz czytać. ProjectsPublicTaskDesc=Ten widok przedstawia wszystkie projekty i zadania, które są dozwolone do czytania. ProjectsDesc=Ten widok przedstawia wszystkie projekty (twoje uprawnienia użytkownika pozwalają wyświetlać wszystko). -TasksOnProjectsDesc=This view presents all tasks on all projects (your user permissions grant you permission to view everything). -MyTasksDesc=This view is limited to projects or tasks you are a contact for +TasksOnProjectsDesc=Ten widok przedstawia wszystkie zadania we wszystkich projektach (Twoje uprawnienia użytkownika dają Ci uprawnienia do przeglądania wszystkiego). +MyTasksDesc=Ten widok jest ograniczony do projektów lub zadań, w sprawie których jesteś osobą kontaktową OnlyOpenedProject=Tylko otwarte projekty są widoczne (szkice projektów lub zamknięte projekty są niewidoczne) -ClosedProjectsAreHidden=Closed projects are not visible. +ClosedProjectsAreHidden=Zamknięte projekty nie są widoczne. TasksPublicDesc=Ten widok przedstawia wszystkie projekty i zadania, które możesz przeczytać. TasksDesc=Ten widok przedstawia wszystkie projekty i zadania (twoje uprawnienia mają dostępu do wglądu we wszystko). -AllTaskVisibleButEditIfYouAreAssigned=All tasks for qualified projects are visible, but you can enter time only for task assigned to selected user. Assign task if you need to enter time on it. -OnlyYourTaskAreVisible=Only tasks assigned to you are visible. Assign task to yourself if it is not visible and you need to enter time on it. -ImportDatasetTasks=Tasks of projects -ProjectCategories=Project tags/categories +AllTaskVisibleButEditIfYouAreAssigned=Wszystkie zadania dla zakwalifikowanych projektów są widoczne, ale możesz wprowadzić czas tylko dla zadania przypisanego do wybranego użytkownika. Przypisz zadanie, jeśli chcesz wprowadzić na nim czas. +OnlyYourTaskAreVisible=Widoczne są tylko zadania przypisane do Ciebie. Przydziel sobie zadanie, jeśli nie jest widoczne i musisz wpisać na nim czas. +ImportDatasetTasks=Zadania projektów +ProjectCategories=Tagi / kategorie projektów NewProject=Nowy projekt AddProject=Tworzenie projektu DeleteAProject=Usuń projekt @@ -33,21 +33,21 @@ ConfirmDeleteAProject=Czy usunąć ten projekt? ConfirmDeleteATask=Czy usunąć to zadanie? OpenedProjects=Otwarte projekty OpenedTasks=Otwarte zadania -OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status -OpportunitiesStatusForProjects=Leads amount of projects by status +OpportunitiesStatusForOpenedProjects=Prowadzi liczbę otwartych projektów według statusu +OpportunitiesStatusForProjects=Prowadzi liczbę projektów według statusu ShowProject=Pokaż projekt ShowTask=Pokaż zadanie SetProject=Ustaw projekt NoProject=Żadny projekt niezdefiniowany lub nie jest twoją własnością -NbOfProjects=Number of projects -NbOfTasks=Number of tasks +NbOfProjects=Liczba projektów +NbOfTasks=Liczba zadań TimeSpent=Czas spędzony TimeSpentByYou=Czas spędzony przez Ciebie TimeSpentByUser=Czas spędzony przez użytkownika TimesSpent=Czas spędzony -TaskId=Task ID -RefTask=Task ref. -LabelTask=Task label +TaskId=ID zadania +RefTask=Nr zadania +LabelTask=Etykieta zadania TaskTimeSpent=Czas spędzony na zadaniach TaskTimeUser=Użytkownik TaskTimeNote=Uwaga @@ -56,10 +56,10 @@ TasksOnOpenedProject=Zadania w otwartych projektach WorkloadNotDefined=Czas pracy nie zdefiniowany NewTimeSpent=Czas spędzony MyTimeSpent=Mój czas spędzony -BillTime=Bill the time spent -BillTimeShort=Bill time -TimeToBill=Time not billed -TimeBilled=Time billed +BillTime=Bill spędzony czas +BillTimeShort=Czas rachunku +TimeToBill=Czas nie jest rozliczany +TimeBilled=Rozliczony czas Tasks=Zadania Task=Zadanie TaskDateStart=Data rozpoczęcia zadania @@ -67,77 +67,78 @@ TaskDateEnd=Data zakończenia zadania TaskDescription=Opis zadania NewTask=Nowe zadania AddTask=Tworzenie zadania -AddTimeSpent=Create time spent -AddHereTimeSpentForDay=Add here time spent for this day/task -AddHereTimeSpentForWeek=Add here time spent for this week/task +AddTimeSpent=Twórz spędzony czas +AddHereTimeSpentForDay=Dodaj tutaj czas spędzony na ten dzień / zadanie +AddHereTimeSpentForWeek=Dodaj tutaj czas spędzony na zadanie/w tym tygodniu Activity=Aktywność Activities=Zadania / aktywności MyActivities=Moje zadania / aktywności MyProjects=Moje projekty MyProjectsArea=Obszar moich projektów DurationEffective=Efektywny czas trwania -ProgressDeclared=Declared real progress -TaskProgressSummary=Task progress -CurentlyOpenedTasks=Curently open tasks -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 +ProgressDeclared=Deklarowany rzeczywisty postęp +TaskProgressSummary=Postęp zadania +CurentlyOpenedTasks=Obecnie otwarte zadania +TheReportedProgressIsLessThanTheCalculatedProgressionByX=Deklarowany rzeczywisty postęp jest mniejszy %s niż postęp konsumpcji +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Deklarowany rzeczywisty postęp jest bardziej %s niż postęp konsumpcji +ProgressCalculated=Postęp w konsumpcji +WhichIamLinkedTo=z którym jestem połączony +WhichIamLinkedToProject=który jestem powiązany z projektem Time=Czas -TimeConsumed=Consumed +TimeConsumed=Strawiony ListOfTasks=Lista zadań -GoToListOfTimeConsumed=Go to list of time consumed -GanttView=Gantt View -ListProposalsAssociatedProject=List of the commercial proposals related to the project -ListOrdersAssociatedProject=List of sales orders related to the project -ListInvoicesAssociatedProject=List of customer invoices related to the project -ListPredefinedInvoicesAssociatedProject=List of customer template invoices related to the project -ListSupplierOrdersAssociatedProject=List of purchase orders related to the project -ListSupplierInvoicesAssociatedProject=List of vendor invoices related to the project -ListContractAssociatedProject=List of contracts related to the project -ListShippingAssociatedProject=List of shippings related to the project -ListFichinterAssociatedProject=List of interventions related to the project -ListExpenseReportsAssociatedProject=List of expense reports related to the project -ListDonationsAssociatedProject=List of donations related to the project -ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project -ListSalariesAssociatedProject=List of payments of salaries related to the project -ListActionsAssociatedProject=List of events related to the project -ListMOAssociatedProject=List of manufacturing orders related to the project +GoToListOfTimeConsumed=Przejdź do listy czasochłonnych +GanttView=Widok Gantta +ListWarehouseAssociatedProject=List of warehouses associated to the project +ListProposalsAssociatedProject=Lista ofert handlowych związanych z projektem +ListOrdersAssociatedProject=Lista zamówień sprzedaży związanych z projektem +ListInvoicesAssociatedProject=Lista faktur klientów związanych z projektem +ListPredefinedInvoicesAssociatedProject=Lista faktur dla klientów, wzorcowych związanych z projektem +ListSupplierOrdersAssociatedProject=Lista zamówień związanych z projektem +ListSupplierInvoicesAssociatedProject=Lista faktur dostawców związanych z projektem +ListContractAssociatedProject=Lista umów związanych z projektem +ListShippingAssociatedProject=Lista wysyłek związanych z projektem +ListFichinterAssociatedProject=Lista interwencji związanych z projektem +ListExpenseReportsAssociatedProject=Lista raportów wydatków związanych z projektem +ListDonationsAssociatedProject=Lista darowizn związanych z projektem +ListVariousPaymentsAssociatedProject=Lista różnych płatności związanych z projektem +ListSalariesAssociatedProject=Lista wypłat wynagrodzeń związanych z projektem +ListActionsAssociatedProject=Lista wydarzeń związanych z projektem +ListMOAssociatedProject=Lista zleceń produkcyjnych związanych z projektem ListTaskTimeUserProject=Lista czasu poświęconego na zadania w projekcie -ListTaskTimeForTask=List of time consumed on task +ListTaskTimeForTask=Lista czasu poświęconego na zadanie ActivityOnProjectToday=Dzisiejsza aktywnośc w projekcie ActivityOnProjectYesterday=Wczorajsza aktywność w projekcie ActivityOnProjectThisWeek=Aktywność w projekcie w tym tygodniu ActivityOnProjectThisMonth=Aktywność na projekcie w tym miesiącu ActivityOnProjectThisYear=Aktywność na projekcie w tym roku ChildOfProjectTask=Dziecko projektu / zadania -ChildOfTask=Child of task -TaskHasChild=Task has child +ChildOfTask=Dziecko zadań +TaskHasChild=Zadanie ma dziecko NotOwnerOfProject=Brak właściciela tego prywatnego projektu AffectedTo=Przypisane do -CantRemoveProject=This project can't be removed as it is referenced by some other objects (invoice, orders or other). See tab '%s'. +CantRemoveProject=Tego projektu nie można usunąć, ponieważ odwołują się do niego inne obiekty (faktura, zamówienia lub inne). Zobacz zakładkę „%s”. ValidateProject=Sprawdź projet ConfirmValidateProject=Czy zatwierdzić ten projekt? CloseAProject=Zamknij Projekt ConfirmCloseAProject=Czy zamknąć ten projekt? -AlsoCloseAProject=Also close project (keep it open if you still need to follow production tasks on it) +AlsoCloseAProject=Zamknij także projekt (pozostaw go otwarty, jeśli nadal musisz śledzić na nim zadania produkcyjne) ReOpenAProject=Otwórz projekt ConfirmReOpenAProject=Czy otworzyć na nowo ten projekt? ProjectContact=Kontakty z projektu -TaskContact=Task contacts +TaskContact=Kontakty związane z zadaniami ActionsOnProject=Działania w ramach projektu YouAreNotContactOfProject=Nie jestes kontaktem tego prywatnego projektu -UserIsNotContactOfProject=User is not a contact of this private project +UserIsNotContactOfProject=Użytkownik nie jest kontaktem w tym projekcie prywatnym DeleteATimeSpent=Usuń czas spędzony -ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent? +ConfirmDeleteATimeSpent=Czy na pewno chcesz usunąć ten spędzony czas? DoNotShowMyTasksOnly=Zobacz również zadania nie przypisane do mnie ShowMyTasksOnly=Wyświetl tylko zadania przypisane do mnie -TaskRessourceLinks=Contacts of task +TaskRessourceLinks=Kontakty zadania ProjectsDedicatedToThisThirdParty=Projekty poświęcone tej stronie trzeciej NoTasks=Brak zadań dla tego projektu LinkedToAnotherCompany=Powiązane z innymą częścią trzecią -TaskIsNotAssignedToUser=Task not assigned to user. Use button '<strong>%s</strong>' to assign task now. +TaskIsNotAssignedToUser=Zadanie nie zostało przypisane do użytkownika. Użyj przycisku „<strong> %s </strong>”, aby przypisać zadanie teraz. ErrorTimeSpentIsEmpty=Czas spędzony jest pusty ThisWillAlsoRemoveTasks=To działanie także usunie wszystkie zadania projektu (<b>%s</b> zadania w tej chwili) i wszystkie dane wejścia czasu spędzonego. IfNeedToUseOtherObjectKeepEmpty=Jeżeli pewne obiekty (faktura, zamówienie, ...), należące do innej części trzeciej, muszą być związane z projektem tworzenia, zachowaj to puste by projekt był wielowątkowy -(wiele części trzecich). @@ -148,26 +149,26 @@ CloneProjectFiles=Sklonuj pliki przynależne do projektu CloneTaskFiles=Połączone pliki sklonowanych zadań (jeśli zadania sklonowano) CloneMoveDate=Zaktualizować daty w projekcie/zadaniach od teraz? ConfirmCloneProject=Czy powielić ten projekt? -ProjectReportDate=Change task dates according to new project start date +ProjectReportDate=Zmień daty zadań zgodnie z nową datą rozpoczęcia projektu ErrorShiftTaskDate=Niemożliwe do przesunięcia daty zadania według nowej daty rozpoczęcia projektu ProjectsAndTasksLines=Projekty i zadania ProjectCreatedInDolibarr=Projekt %s utworzony -ProjectValidatedInDolibarr=Project %s validated +ProjectValidatedInDolibarr=Projekt %s został zweryfikowany ProjectModifiedInDolibarr=Projekt %s zmodyfikowany TaskCreatedInDolibarr=Zadanie %s utworzono TaskModifiedInDolibarr=Zadań %s zmodyfikowano TaskDeletedInDolibarr=Zadań %s usunięto -OpportunityStatus=Lead status -OpportunityStatusShort=Lead status -OpportunityProbability=Lead probability -OpportunityProbabilityShort=Lead probab. -OpportunityAmount=Lead amount -OpportunityAmountShort=Lead amount -OpportunityWeightedAmount=Opportunity weighted amount -OpportunityWeightedAmountShort=Opp. weighted amount -OpportunityAmountAverageShort=Average lead amount -OpportunityAmountWeigthedShort=Weighted lead amount -WonLostExcluded=Won/Lost excluded +OpportunityStatus=Status potencjalnego klienta +OpportunityStatusShort=Status potencjalnego klienta +OpportunityProbability=Prawdopodobieństwo ołowiu +OpportunityProbabilityShort=Ołów probab. +OpportunityAmount=Kwota ołowiu +OpportunityAmountShort=Kwota ołowiu +OpportunityWeightedAmount=Kwota ważona szansą sprzedaży +OpportunityWeightedAmountShort=Opp. kwota ważona +OpportunityAmountAverageShort=Średnia kwota ołowiu +OpportunityAmountWeigthedShort=Ważona kwota ołowiu +WonLostExcluded=Wygrane / przegrane wykluczone ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Kierownik projektu TypeContact_project_external_PROJECTLEADER=Lider projektu @@ -181,51 +182,51 @@ 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 -DocumentModelTimeSpent=Project report template for time spent +DocumentModelBeluga=Szablon dokumentu projektu dla przeglądu połączonych obiektów +DocumentModelBaleine=Szablon dokumentu projektu dla zadań +DocumentModelTimeSpent=Szablon raportu projektu dla spędzonego czasu PlannedWorkload=Planowany nakład pracy PlannedWorkloadShort=Nakład pracy ProjectReferers=Powiązane elementy ProjectMustBeValidatedFirst=Projekt musi być najpierw zatwierdzony -FirstAddRessourceToAllocateTime=Assign a user resource as contact of project to allocate time +FirstAddRessourceToAllocateTime=Przypisz zasób użytkownika jako osobę kontaktową w projekcie, aby przydzielić czas InputPerDay=Wejścia na dzień InputPerWeek=Wejścia w tygodniu -InputPerMonth=Input per month -InputDetail=Input detail -TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s +InputPerMonth=Wkład miesięcznie +InputDetail=Dane wejściowe +TimeAlreadyRecorded=Jest to czas już zarejestrowany dla tego zadania / dnia i użytkownika %s ProjectsWithThisUserAsContact=Projekty z tym użytkownika jako kontakt TasksWithThisUserAsContact=Zadania dopisane do tego użytkownika ResourceNotAssignedToProject=Nie przypisane do projektu ResourceNotAssignedToTheTask=Nie dopisane do zadania -NoUserAssignedToTheProject=No users assigned to this project -TimeSpentBy=Time spent by -TasksAssignedTo=Tasks assigned to +NoUserAssignedToTheProject=Brak użytkowników przypisanych do tego projektu +TimeSpentBy=Czas spędzony przez +TasksAssignedTo=Zadania przypisane do AssignTaskToMe=Przypisz zadanie do mnie -AssignTaskToUser=Assign task to %s -SelectTaskToAssign=Select task to assign... +AssignTaskToUser=Przypisz zadanie do %s +SelectTaskToAssign=Wybierz zadanie do przypisania ... AssignTask=Przydzielać ProjectOverview=Przegląd -ManageTasks=Use projects to follow tasks and/or report time spent (timesheets) +ManageTasks=Użyj projektów, aby śledzić zadania i / lub raportować spędzony czas (karty czasu pracy) ManageOpportunitiesStatus=Użyj projekty śledzić pozostawienie danych kontaktowych / opportinuties -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 or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectNbProjectByMonth=Liczba utworzonych projektów według miesiąca +ProjectNbTaskByMonth=Liczba utworzonych zadań według miesiąca +ProjectOppAmountOfProjectsByMonth=Ilość leadów według miesiąca +ProjectWeightedOppAmountOfProjectsByMonth=Ważona liczba potencjalnych klientów według miesiąca +ProjectOpenedProjectByOppStatus=Otwarty projekt | prowadzony przez status potencjalnego klienta +ProjectsStatistics=Statystyki dotyczące projektów lub potencjalnych klientów +TasksStatistics=Statystyki dotyczące zadań projektów lub leadów 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 -OpenedProjectsByThirdparties=Open projects by third parties -OnlyOpportunitiesShort=Only leads -OpenedOpportunitiesShort=Open leads -NotOpenedOpportunitiesShort=Not an open lead -NotAnOpportunityShort=Not a lead -OpportunityTotalAmount=Total amount of leads -OpportunityPonderatedAmount=Weighted amount of leads -OpportunityPonderatedAmountDesc=Leads amount weighted with probability +YouCanCompleteRef=Jeśli chcesz uzupełnić odniesienie jakimś przyrostkiem, zaleca się dodanie znaku -, aby go oddzielić, aby automatyczne numerowanie nadal działało poprawnie dla następnych projektów. Na przykład %s-MYSUFFIX +OpenedProjectsByThirdparties=Otwarte projekty stron trzecich +OnlyOpportunitiesShort=Tylko prowadzi +OpenedOpportunitiesShort=Otwarte leady +NotOpenedOpportunitiesShort=To nie jest otwarty trop +NotAnOpportunityShort=Nie prowadzi +OpportunityTotalAmount=Całkowita liczba potencjalnych klientów +OpportunityPonderatedAmount=Ważona liczba potencjalnych klientów +OpportunityPonderatedAmountDesc=Kwota potencjalnych klientów ważona prawdopodobieństwem OppStatusPROSP=Poszukiwania OppStatusQUAL=Kwalifikacja OppStatusPROPO=Wniosek @@ -234,37 +235,41 @@ OppStatusPENDING=W oczekiwaniu OppStatusWON=Won OppStatusLOST=Zagubiony Budget=Budżet -AllowToLinkFromOtherCompany=Allow to link project from other company<br><br><u>Supported values:</u><br>- Keep empty: Can link any project of the company (default)<br>- "all": Can link any projects, even projects of other companies<br>- A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)<br> -LatestProjects=Latest %s projects -LatestModifiedProjects=Latest %s modified projects -OtherFilteredTasks=Other filtered tasks -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 +AllowToLinkFromOtherCompany=Zezwól na powiązanie projektu z innej firmy <br> <br> <u> Obsługiwane wartości: </u> <br> - Pozostaw puste: można połączyć dowolny projekt firmy z firmy (domyślnie) a0342fcc19 wszystkie projekty: A0342fcc identyfikatory innych firm oddzielone przecinkami: mogą łączyć wszystkie projekty tych podmiotów zewnętrznych (przykład: 123,4795,53) <br> +LatestProjects=Najnowsze projekty %s +LatestModifiedProjects=Najnowsze zmodyfikowane projekty %s +OtherFilteredTasks=Inne filtrowane zadania +NoAssignedTasks=Nie znaleziono przypisanych zadań (przypisz projekt / zadania do bieżącego użytkownika z górnego pola wyboru, aby wprowadzić czas) +ThirdPartyRequiredToGenerateInvoice=Aby móc wystawić fakturę, w projekcie musi być zdefiniowana osoba trzecia. +ChooseANotYetAssignedTask=Wybierz zadanie, które nie zostało Ci jeszcze przydzielone # Comments trans -AllowCommentOnTask=Allow user comments on tasks -AllowCommentOnProject=Allow user comments on projects -DontHavePermissionForCloseProject=You do not have permissions to close the project %s -DontHaveTheValidateStatus=The project %s must be open to be closed -RecordsClosed=%s project(s) closed -SendProjectRef=Information project %s -ModuleSalaryToDefineHourlyRateMustBeEnabled=Module 'Salaries' must be enabled to define employee hourly rate to have time spent valorized -NewTaskRefSuggested=Task ref already used, a new task ref is required -TimeSpentInvoiced=Time spent billed +AllowCommentOnTask=Zezwalaj na komentarze użytkowników do zadań +AllowCommentOnProject=Zezwalaj na komentarze użytkowników w projektach +DontHavePermissionForCloseProject=Nie masz uprawnień, aby zamknąć projekt %s +DontHaveTheValidateStatus=Projekt %s musi być otwarty, aby mógł zostać zamknięty +RecordsClosed=%s projekty zamknięte +SendProjectRef=Projekt informacyjny %s +ModuleSalaryToDefineHourlyRateMustBeEnabled=Moduł „Wynagrodzenia” musi być włączony, aby zdefiniować stawkę godzinową pracownika w celu waloryzacji spędzonego czasu +NewTaskRefSuggested=Numer referencyjny jest już używany, wymagany jest nowy numer referencyjny +TimeSpentInvoiced=Rozliczony czas spędzony TimeSpentForInvoice=Czas spędzony -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. -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 +OneLinePerUser=Jedna linia na użytkownika +ServiceToUseOnLines=Usługa do wykorzystania na liniach +InvoiceGeneratedFromTimeSpent=Faktura %s została wygenerowana na podstawie czasu spędzonego nad projektem +ProjectBillTimeDescription=Sprawdź, czy wprowadzasz grafik dla zadań projektu ORAZ planujesz wygenerować fakturę (y) z grafiku, aby wystawić fakturę klientowi projektu (nie sprawdzaj, czy planujesz utworzyć fakturę, która nie jest oparta na wprowadzonych grafikach). Uwaga: Aby wygenerować fakturę, przejdź do zakładki „Czas spędzony” projektu i wybierz wiersze do uwzględnienia. +ProjectFollowOpportunity=Skorzystaj z okazji +ProjectFollowTasks=Śledź zadania lub spędzony czas +Usage=Stosowanie +UsageOpportunity=Sposób użycia: okazja +UsageTasks=Sposób użycia: zadania +UsageBillTimeShort=Użycie: Bill czas +InvoiceToUse=Projekt faktury do wykorzystania NewInvoice=Nowa faktura -OneLinePerTask=One line per task -OneLinePerPeriod=One line per period -RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using +OneLinePerTask=Jedna linia na zadanie +OneLinePerPeriod=Jedna linia na okres +RefTaskParent=Nr ref. Zadanie rodzica +ProfitIsCalculatedWith=Zysk jest obliczany za pomocą +AddPersonToTask=Dodaj także do zadań +UsageOrganizeEvent=Użycie: Organizacja wydarzeń +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Zaklasyfikuj projekt jako zamknięty po wykonaniu wszystkich jego zadań (postęp 100%%) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Uwaga: nie będzie to miało wpływu na istniejące projekty ze wszystkimi zadaniami o postępie 100%%: będziesz musiał je zamknąć ręcznie. Ta opcja dotyczy tylko otwartych projektów. diff --git a/htdocs/langs/pl_PL/propal.lang b/htdocs/langs/pl_PL/propal.lang index df7e6c64dda..7e25a3622e7 100644 --- a/htdocs/langs/pl_PL/propal.lang +++ b/htdocs/langs/pl_PL/propal.lang @@ -13,16 +13,16 @@ Prospect=Prospect DeleteProp=Usuń propozycję handlową ValidateProp=Zatwierdź propozycję handlową AddProp=Utwórz wniosek -ConfirmDeleteProp=Are you sure you want to delete this commercial proposal? -ConfirmValidateProp=Are you sure you want to validate this commercial proposal under name <b>%s</b>? -LastPropals=Latest %s proposals +ConfirmDeleteProp=Czy na pewno chcesz usunąć tę ofertę handlową? +ConfirmValidateProp=Czy na pewno chcesz zweryfikować tę ofertę handlową pod nazwą <b> %s </b>? +LastPropals=Najnowsze propozycje %s LastModifiedProposals=Ostatnich %s zmodyfikowanych ofert AllPropals=Wszystkie oferty SearchAProposal=Szukaj oferty -NoProposal=No proposal +NoProposal=Brak propozycji ProposalsStatistics=Statystyki ofert handlowych NumberOfProposalsByMonth=Ilość w miesiącu -AmountOfProposalsByMonthHT=Amount by month (excl. tax) +AmountOfProposalsByMonthHT=Kwota według miesiąca (bez podatku) NbOfProposals=Liczba ofert handlowych ShowPropal=Pokaż oferty PropalsDraft=Szkice @@ -33,7 +33,7 @@ PropalStatusSigned=Podpisano (do rachunku) PropalStatusNotSigned=Nie podpisały (zamknięte) PropalStatusBilled=zapowiadane PropalStatusDraftShort=Szkic -PropalStatusValidatedShort=Validated (open) +PropalStatusValidatedShort=Zweryfikowany (otwarty) PropalStatusClosedShort=Zamknięte PropalStatusSignedShort=Podpisany PropalStatusNotSignedShort=Niepodpisany @@ -47,19 +47,19 @@ SendPropalByMail=Wyślij propozycję handlowa emailem DatePropal=Data wniosku DateEndPropal=Data końca obowiązywania ValidityDuration=Ważność czas -CloseAs=Set status to -SetAcceptedRefused=Set accepted/refused +SetAcceptedRefused=Zestaw zaakceptowany / odrzucony ErrorPropalNotFound=Propal %s nie znaleziono AddToDraftProposals=Dodaj do projektu oferty NoDraftProposals=Brak projektu oferty CopyPropalFrom=Stwórz ofertę handlową poprzez skopiowanie istniejącej oferty -CreateEmptyPropal=Create empty commercial proposal or from list of products/services +CreateEmptyPropal=Utwórz pustą ofertę handlową lub z listy produktów / usług DefaultProposalDurationValidity=Domyślny czas ważności wniosku handlowych (w dniach) -UseCustomerContactAsPropalRecipientIfExist=Use contact/address with type 'Contact following-up proposal' if defined instead of third party address as proposal recipient address -ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s</b>? -ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? +UseCustomerContactAsPropalRecipientIfExist=Użyj kontaktu / adresu z typem „Propozycja dalszych działań związanych z kontaktem”, jeśli zdefiniowano ją zamiast adresu strony trzeciej jako adresu odbiorcy propozycji +ConfirmClonePropal=Czy na pewno chcesz sklonować ofertę komercyjną <b> %s </b>? +ConfirmReOpenProp=Czy na pewno chcesz ponownie otworzyć ofertę komercyjną <b> %s </b>? ProposalsAndProposalsLines=Commercial wniosku i linie ProposalLine=Wniosek linii +ProposalLines=Linie propozycji AvailabilityPeriod=Opóźnienie w dostępności SetAvailability=Ustaw opóźnienie w dostępności AfterOrder=od zamówienia @@ -74,14 +74,19 @@ AvailabilityTypeAV_1M=1 miesiąc TypeContact_propal_internal_SALESREPFOLL=Przedstawiciela w ślad za wniosek TypeContact_propal_external_BILLING=Kontakt do klienta w sprawie faktury TypeContact_propal_external_CUSTOMER=kontakt klienta w ślad za wniosek -TypeContact_propal_external_SHIPPING=Customer contact for delivery +TypeContact_propal_external_SHIPPING=Kontakt z klientem w sprawie dostawy # Document models -DocModelAzurDescription=A complete proposal model (old implementation of Cyan template) -DocModelCyanDescription=A complete proposal model +DocModelAzurDescription=Kompletny model oferty (stara implementacja szablonu Cyan) +DocModelCyanDescription=Kompletny model oferty DefaultModelPropalCreate=Domyślny model kreacji. DefaultModelPropalToBill=Domyślny szablon po zamknięciu wniosku biznesowego ( do zafakturowania) DefaultModelPropalClosed=Domyślny szablon po zamknięciu projektu biznesowego ( weryfikowane ) ProposalCustomerSignature=Wpisany akceptacji i pieczęć firmy, data i podpis -ProposalsStatisticsSuppliers=Vendor proposals statistics -CaseFollowedBy=Case followed by -SignedOnly=Signed only +ProposalsStatisticsSuppliers=Statystyki propozycji dostawców +CaseFollowedBy=Przypadek, po którym następuje +SignedOnly=Tylko podpisane +IdProposal=Identyfikator oferty +IdProduct=ID produktu +PrParentLine=Linia nadrzędna oferty pakietowej +LineBuyPriceHT=Cena zakupu Kwota bez podatku dla wiersza + diff --git a/htdocs/langs/pl_PL/stocks.lang b/htdocs/langs/pl_PL/stocks.lang index 889b96b4be4..09b5be9369f 100644 --- a/htdocs/langs/pl_PL/stocks.lang +++ b/htdocs/langs/pl_PL/stocks.lang @@ -3,7 +3,7 @@ WarehouseCard=Karta magazynu Warehouse=Magazyn Warehouses=Magazyny ParentWarehouse=Magazyn nadrzędny -NewWarehouse=New warehouse / Stock Location +NewWarehouse=Nowy magazyn / lokalizacja magazynu WarehouseEdit=Modyfikacja magazynu MenuNewWarehouse=Nowy magazyn WarehouseSource=Magazyn źródłowy @@ -17,10 +17,10 @@ CancelSending=Anuluj wysyłanie DeleteSending=Usuń wysyłanie Stock=Stan Stocks=Stany -MissingStocks=Missing stocks -StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Brakujące zapasy +StockAtDate=Stan na dzień +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zapasy według lotu/nr seryjnego LotSerial=Partie/Serie LotSerialList=Lista partii/serii @@ -28,17 +28,17 @@ Movements=Ruchy ErrorWarehouseRefRequired=Nazwa referencyjna magazynu wymagana ListOfWarehouses=Lista magazynów ListOfStockMovements=Wykaz stanu magazynowego -ListOfInventories=List of inventories +ListOfInventories=Lista zapasów MovementId=ID przesunięcia StockMovementForId=ID przesunięcia %d ListMouvementStockProject=Lista przesunięć zapasu skojarzona z projektem StocksArea=Powierzchnia magazynów -AllWarehouses=All warehouses -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock -IncludeAlsoDraftOrders=Include also draft orders +AllWarehouses=Wszystkie magazyny +IncludeEmptyDesiredStock=Uwzględnij również stan ujemny z nieokreślonym żądanym stanem +IncludeAlsoDraftOrders=Uwzględnij również projekty zamówień Location=Lokacja -LocationSummary=Nazwa skrócona lokalizacji -NumberOfDifferentProducts=Wiele różnych środków +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Łączna liczba produktów LastMovement=Ostatni ruch LastMovements=Ostatnie ruchy @@ -60,52 +60,54 @@ PMPValue=Średnia ważona ceny PMPValueShort=WAP EnhancedValueOfWarehouses=Magazyny wartości UserWarehouseAutoCreate=Utwórz użytkownika dla magazynu kiedy tworzysz użytkownika -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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal -WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders -UserDefaultWarehouse=Set a warehouse on Users +AllowAddLimitStockByWarehouse=Zarządzaj również wartością minimalnego i pożądanego zapasu na parę (magazyn produktów) oprócz wartości minimalnego i pożądanego zapasu na produkt +RuleForWarehouse=Reguła dla magazynów +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Ustaw magazyn na ofertach handlowych +WarehouseAskWarehouseDuringOrder=Ustaw magazyn dla zamówień sprzedaży +UserDefaultWarehouse=Ustaw magazyn dla użytkowników MainDefaultWarehouse=Domyślny magazyn -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 +MainDefaultWarehouseUser=Użyj domyślnej hurtowni dla każdego użytkownika +MainDefaultWarehouseUserDesc=Aktywując tę opcję, podczas tworzenia produktu, na nim zostanie zdefiniowany magazyn przypisany do produktu. Jeśli na użytkowniku nie jest zdefiniowany żaden magazyn, definiowany jest magazyn domyślny. +IndependantSubProductStock=Zapasy produktów i podprodukty są niezależne QtyDispatched=Wysłana ilość QtyDispatchedShort=Ilość wysłana QtyToDispatchShort=Ilość do wysłania -OrderDispatch=Item receipts -RuleForStockManagementDecrease=Choose Rule for automatic stock decrease (manual decrease is always possible, even if an automatic decrease rule is activated) -RuleForStockManagementIncrease=Choose Rule for automatic stock increase (manual increase is always possible, even if an automatic increase rule is activated) -DeStockOnBill=Decrease real stocks on validation of customer invoice/credit note -DeStockOnValidateOrder=Decrease real stocks on validation of sales order +OrderDispatch=Pokwitowania przedmiotów +RuleForStockManagementDecrease=Wybierz regułę automatycznego zmniejszania zapasów (ręczne zmniejszanie jest zawsze możliwe, nawet jeśli aktywowana jest reguła automatycznego zmniejszania) +RuleForStockManagementIncrease=Wybierz regułę automatycznego zwiększania zapasów (ręczne zwiększanie jest zawsze możliwe, nawet jeśli aktywowana jest reguła automatycznego zwiększania zapasów) +DeStockOnBill=Zmniejsz rzeczywiste zapasy po sprawdzeniu faktury klienta / noty kredytowej +DeStockOnValidateOrder=Zmniejsz rzeczywiste zapasy po zatwierdzeniu zamówienia sprzedaży DeStockOnShipment=Zmniejsz realne zapasy magazynu po potwierdzeniu wysyłki -DeStockOnShipmentOnClosing=Decrease real stocks when shipping is set to closed -ReStockOnBill=Increase real stocks on validation of vendor invoice/credit note -ReStockOnValidateOrder=Increase real stocks on purchase order approval -ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouse, after purchase order receipt of goods -StockOnReception=Increase real stocks on validation of reception -StockOnReceptionOnClosing=Increase real stocks when reception is set to closed +DeStockOnShipmentOnClosing=Zmniejsz rzeczywiste zapasy, gdy wysyłka jest zamknięta +ReStockOnBill=Zwiększ rzeczywiste zapasy po sprawdzeniu faktury / faktury od dostawcy +ReStockOnValidateOrder=Zwiększ realne zapasy po zatwierdzeniu zamówienia +ReStockOnDispatchOrder=Zwiększ realne zapasy przy ręcznej wysyłce do magazynu po otrzymaniu zamówienia +StockOnReception=Zwiększ rzeczywiste zapasy po zatwierdzeniu odbioru +StockOnReceptionOnClosing=Zwiększ rzeczywiste zapasy, gdy odbiór jest ustawiony na zamknięty OrderStatusNotReadyToDispatch=Zamówienie nie jest jeszcze lub nie więcej status, który umożliwia wysyłanie produktów w magazynach czas. StockDiffPhysicTeoric=Wyjaśnienia dla różnicy pomiędzy fizycznym i wirtualnych zapasem NoPredefinedProductToDispatch=Nie gotowych produktów dla tego obiektu. Więc nie w czas wysyłki jest wymagane. DispatchVerb=Wysyłka StockLimitShort=Limit zapasu przy którym wystąpi alarm StockLimit=Limit zapasu przy którym wystąpi alarm -StockLimitDesc=(empty) means no warning.<br>0 can be used for a warning as soon as stock is empty. -PhysicalStock=Physical Stock +StockLimitDesc=(pusty) oznacza brak ostrzeżenia. <br> 0 może służyć jako ostrzeżenie, gdy tylko zapasy się wyczerpią. +PhysicalStock=Zapas fizyczny 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): +RealStockDesc=Fizyczne / rzeczywiste zapasy to stany znajdujące się obecnie w magazynach. +RealStockWillAutomaticallyWhen=Rzeczywisty stan magazynowy zostanie zmodyfikowany zgodnie z tą zasadą (zdefiniowaną w module Magazyn): VirtualStock=Wirtualny zapas -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) +VirtualStockAtDate=Wirtualne zapasy na dzień +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen date will be finished +VirtualStockDesc=Zapasy wirtualne to obliczone zapasy dostępne po zamknięciu wszystkich otwartych / oczekujących akcji (mających wpływ na zapasy) (otrzymane zamówienia zakupu, wysłane zamówienia sprzedaży, wyprodukowane zlecenia produkcyjne itp.) +AtDate=W dniu 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 -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=Średnia wejściowa cena jednostkowa, jaką musieliśmy wydać, aby wprowadzić 1 jednostkę produktu do naszego magazynu. SellPriceMin=Cena sprzedaży jednostki EstimatedStockValueSellShort=Wartość sprzedaży EstimatedStockValueSell=Wartość sprzedaży @@ -118,71 +120,72 @@ ThisWarehouseIsPersonalStock=Tym składzie przedstawia osobiste zasobów %s %s SelectWarehouseForStockDecrease=Wybierz magazyn do zmniejszenia zapasu SelectWarehouseForStockIncrease=Wybierz magazyn do zwiększenia zapasu NoStockAction=Brak akcji stock -DesiredStock=Desired Stock -DesiredStockDesc=This stock amount will be the value used to fill the stock by replenishment feature. +DesiredStock=Pożądany zapas +DesiredStockDesc=Ta ilość zapasów będzie wartością używaną do wypełnienia zapasów przez funkcję uzupełniania. StockToBuy=Na zamówienie Replenishment=Uzupełnienie ReplenishmentOrders=Zamówień towarów -VirtualDiffersFromPhysical=According to increase/decrease stock options, physical stock and virtual stock (physical stock + open orders) may differ -UseRealStockByDefault=Use real stock, instead of virtual stock, for replenishment feature -ReplenishmentCalculation=Amount to order will be (desired quantity - real stock) instead of (desired quantity - virtual stock) +VirtualDiffersFromPhysical=W zależności od opcji zwiększania / zmniejszania akcji, akcje fizyczne i akcje wirtualne (akcje fizyczne + zlecenia otwarte) mogą się różnić +UseRealStockByDefault=Użyj prawdziwych zapasów zamiast wirtualnych zapasów do uzupełnienia zapasów +ReplenishmentCalculation=Kwota do zamówienia będzie (żądana ilość - stan rzeczy) zamiast (żądana ilość - stan wirtualny) UseVirtualStock=Użyj wirtualnego zapasu UsePhysicalStock=Użyj fizycznego zapasu CurentSelectionMode=Current selection mode CurentlyUsingVirtualStock=Wirtualny zapas CurentlyUsingPhysicalStock=Fizyczny zapas RuleForStockReplenishment=Reguła dla uzupełnienia zapasów -SelectProductWithNotNullQty=Select at least one product with a qty not null and a vendor +SelectProductWithNotNullQty=Wybierz co najmniej jeden produkt z liczbą inną niż NULL i dostawcą AlertOnly= Tylko alarmy -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Uwzględnij również ujemne zapasy produktów, dla których nie określono żądanej ilości, aby przywrócić je do 0 WarehouseForStockDecrease=<b>Magazyn% s</b> zostaną wykorzystane do zmniejszenia magazynie WarehouseForStockIncrease=<b>Magazyn% s</b> zostaną wykorzystane do zwiększenia magazynie ForThisWarehouse=W tym magazynie -ReplenishmentStatusDesc=This is a list of all products with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked). Using the checkbox, you can create purchase orders to fill the difference. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. -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. +ReplenishmentStatusDesc=To jest lista wszystkich produktów, których stan magazynowy jest niższy niż żądany (lub niższy niż wartość ostrzeżenia, jeśli zaznaczone jest pole wyboru „tylko alert”). Za pomocą pola wyboru możesz tworzyć zamówienia zakupu, aby wypełnić różnicę. +ReplenishmentStatusDescPerWarehouse=Jeśli chcesz uzupełnić zaopatrzenie na podstawie żądanej ilości zdefiniowanej dla magazynu, musisz dodać filtr do magazynu. +ReplenishmentOrdersDesc=To jest lista wszystkich otwartych zamówień, w tym predefiniowanych produktów. W tym miejscu widoczne są tylko otwarte zamówienia ze wstępnie zdefiniowanymi produktami, więc zamówienia mogące mieć wpływ na stan magazynowy. 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=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 +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 on "%s". +RecordMovement=Transfer rekordu ReceivingForSameOrder=Wpływy do tego celu StockMovementRecorded=Przesunięcia zapasu zarejestrowane RuleForStockAvailability=Zasady dotyczące dostępności zapasu -StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to invoice (check is done on current real stock when adding a line into invoice whatever the rule for automatic stock change) -StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) -StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) +StockMustBeEnoughForInvoice=Stan zapasów musi być wystarczający, aby dodać produkt / usługę do faktury (sprawdzenie odbywa się na aktualnym stanie magazynowym podczas dodawania wiersza do faktury, niezależnie od reguły automatycznej zmiany zapasów) +StockMustBeEnoughForOrder=Poziom zapasów musi być wystarczający, aby dodać produkt / usługę do zamówienia (sprawdzenie odbywa się na aktualnym stanie magazynowym podczas dodawania linii do zamówienia, niezależnie od reguły automatycznej zmiany zapasów) +StockMustBeEnoughForShipment= Poziom zapasów musi być wystarczający, aby dodać produkt / usługę do wysyłki (sprawdzenie odbywa się na aktualnym stanie magazynowym podczas dodawania linii do wysyłki, niezależnie od reguły automatycznej zmiany zapasów) MovementLabel=Etykieta ruchu -TypeMovement=Type of movement +TypeMovement=Kierunek ruchu DateMovement=Data przesunięcia InventoryCode=Ruch lub kod inwentaryzacji IsInPackage=Zawarte w pakiecie WarehouseAllowNegativeTransfer=Zapas może być ujemny qtyToTranferIsNotEnough=Nie masz wystarczającego zapasu w magazynie źródłowym i twoje ustawienie nie pozwala na zapas ujemny. -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=Nie masz wystarczających zapasów dla tego numeru partii z magazynu źródłowego, a Twoja konfiguracja nie zezwala na ujemne zapasy (ilość produktu „%s” o partii „%s” to %s w magazynie „%s”). ShowWarehouse=Pokaż magazyn MovementCorrectStock=Korekta zapasu dla artykułu %s MovementTransferStock=Transferuj zapas artykułu %s do innego magazynu InventoryCodeShort=Kod Fv/ Przesunięcia -NoPendingReceptionOnSupplierOrder=No pending reception due to open purchase order +NoPendingReceptionOnSupplierOrder=Brak oczekującego odbioru z powodu otwartego zamówienia ThisSerialAlreadyExistWithDifferentDate=Ten lot/numer seryjny (<strong>%s</strong>) już istnieje ale z inna data do wykorzystania lub sprzedania (znaleziono <strong>%s</strong> a wszedłeś w <strong>%s</strong>) OpenAll=Otwórz dla wszystkich działań OpenInternal=Otwórz tylko dla wewnętrznych działań -UseDispatchStatus=Use a dispatch status (approve/refuse) for product lines on purchase order reception -OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so value for sell can't be calculated +UseDispatchStatus=Użyj statusu wysyłki (Zatwierdź / Odrzuć) dla linii produktów podczas przyjmowania zamówienia +OptionMULTIPRICESIsOn=Włączona jest opcja „kilka cen za segment”. Oznacza to, że produkt ma kilka cen sprzedaży, więc nie można obliczyć wartości sprzedaży ProductStockWarehouseCreated=Limit zapasu dla ostrzeżenia i pożądany optymalny zapas prawidłowo utworzony ProductStockWarehouseUpdated=Limit zapasu dla ostrzeżenia i pożądany optymalny zapas prawidłowo zaktualizowany ProductStockWarehouseDeleted=Limit zapasu dla ostrzeżenia i pożądany optymalny zapas prawidłowo usunięty AddNewProductStockWarehouse=Ustaw nowy limit dla ostrzeżenia i pożądany optymalny zapas -AddStockLocationLine=Decrease quantity then click to add another warehouse for this product +AddStockLocationLine=Zmniejsz ilość, a następnie kliknij, aby dodać kolejny magazyn dla tego produktu InventoryDate=Data inwentaryzacji NewInventory=Nowa inwentaryzacja inventorySetup = Ustawienia inwentaryzacji inventoryCreatePermission=Utwórz nową inwentaryzację inventoryReadPermission=Pokaż inwentaryzacje inventoryWritePermission=Aktualizuj inwentaryzacje -inventoryValidatePermission=Validate inventory +inventoryValidatePermission=Zweryfikuj zasoby +inventoryDeletePermission=Usuń ekwipunek inventoryTitle=Inwentaryzacja inventoryListTitle=Inwentaryzacje inventoryListEmpty=Brak inwentaryzacji w toku @@ -193,52 +196,62 @@ inventoryValidate=Zatwierdzony inventoryDraft=Działa inventorySelectWarehouse=Magazyn zmieniony inventoryConfirmCreate=Utwórz -inventoryOfWarehouse=Inventory for warehouse: %s -inventoryErrorQtyAdd=Error: one quantity is less than zero +inventoryOfWarehouse=Zapasy magazynu: %s +inventoryErrorQtyAdd=Błąd: jedna wielkość jest mniejsza od zera inventoryMvtStock=Według inwentaryzacji inventoryWarningProductAlreadyExists=Te produkt jest już na liście SelectCategory=Filtr kategorii -SelectFournisseur=Vendor filter +SelectFournisseur=Filtr dostawcy inventoryOnDate=Inwentaryzacja -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 +INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Ruchy zapasów będą miały datę inwentaryzacji (zamiast daty walidacji zapasów) +inventoryChangePMPPermission=Pozwól zmienić wartość PMP dla produktu +ColumnNewPMP=Nowa jednostka PMP OnlyProdsInStock=Nie dodawaj produktu bez zapasu TheoricalQty=Theorique qty TheoricalValue=Theorique qty -LastPA=Last BP -CurrentPA=Curent BP -RecordedQty=Recorded Qty -RealQty=Real Qty -RealValue=Real Value -RegulatedQty=Regulated Qty +LastPA=Ostatni BP +CurrentPA=Obecny BP +RecordedQty=Nagrana ilość +RealQty=Rzeczywista ilość +RealValue=Prawdziwa wartość +RegulatedQty=Ilość regulowana AddInventoryProduct=Dodaj produkt do inwentaryzacji AddProduct=Dodaj -ApplyPMP=Apply PMP -FlushInventory=Flush inventory -ConfirmFlushInventory=Do you confirm this action? +ApplyPMP=Zastosuj PMP +FlushInventory=Opróżnij zapasy +ConfirmFlushInventory=Czy potwierdzasz tę akcję? InventoryFlushed=Inwentaryzacja zakończona ExitEditMode=Opuść edycję inventoryDeleteLine=Usuń linię -RegulateStock=Regulate Stock +RegulateStock=Reguluj zapasy ListInventory=Lista -StockSupportServices=Stock management supports Services -StockSupportServicesDesc=By default, you can stock only products of type "product". You may also stock a product of type "service" if both module Services and this option are enabled. -ReceiveProducts=Receive items -StockIncreaseAfterCorrectTransfer=Increase by correction/transfer -StockDecreaseAfterCorrectTransfer=Decrease by correction/transfer -StockIncrease=Stock increase -StockDecrease=Stock decrease -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<br>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) -DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +StockSupportServices=Zarządzanie zapasami wspiera usługi +StockSupportServicesDesc=Domyślnie można składować tylko produkty typu „produkt”. Możesz również przechowywać produkt typu „usługa”, jeśli zarówno Usługi modułu, jak i ta opcja są włączone. +ReceiveProducts=Otrzymuj przedmioty +StockIncreaseAfterCorrectTransfer=Zwiększ przez korektę / transfer +StockDecreaseAfterCorrectTransfer=Zmniejsz przez korektę / przelew +StockIncrease=Zwiększenie zapasów +StockDecrease=Zmniejszenie zapasów +InventoryForASpecificWarehouse=Inwentaryzacja dla konkretnego magazynu +InventoryForASpecificProduct=Zapasy dla konkretnego produktu +StockIsRequiredToChooseWhichLotToUse=Zapas jest wymagany, aby wybrać partię do użycia +ForceTo=Zmusić do +AlwaysShowFullArbo=Wyświetlaj pełne drzewo magazynu w wyskakującym okienku linków do magazynu (Ostrzeżenie: może to znacznie zmniejszyć wydajność) +StockAtDatePastDesc=Możesz tutaj zobaczyć stan zapasów (stan rzeczywisty) w danym dniu w przeszłości +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future +CurrentStock=Aktualny stan +InventoryRealQtyHelp=Ustaw wartość na 0, aby zresetować ilość <br> Pozostaw pole puste lub usuń wiersz, aby zachować niezmienione +UpdateByScaning=Fill real qty by scaning +UpdateByScaningProductBarcode=Zaktualizuj przez skanowanie (kod kreskowy produktu) +UpdateByScaningLot=Aktualizacja przez skanowanie (lot | seryjny kod kreskowy) +DisableStockChangeOfSubProduct=Dezaktywuj zmianę zapasów dla wszystkich podproduktów tego zestawu podczas tego ruchu. +ImportFromCSV=Importuj listę ruchu CSV +ChooseFileToImport=Prześlij plik, a następnie kliknij ikonę %s, aby wybrać plik jako źródłowy plik importu ... +SelectAStockMovementFileToImport=wybierz plik ruchu zapasów do zaimportowania +InfoTemplateImport=Przesłany plik musi mieć ten format (* pola obowiązkowe): <br> Magazyn źródłowy * | Magazyn docelowy * | Produkt * | Ilość * | Numer partii / seryjny <br> Separator znaków CSV musi mieć postać „<b> %s </b>” +LabelOfInventoryMovemement=Zapasy %s +ReOpen=Otworzyć na nowo +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/pl_PL/suppliers.lang b/htdocs/langs/pl_PL/suppliers.lang index e317602a687..8b45068b9d7 100644 --- a/htdocs/langs/pl_PL/suppliers.lang +++ b/htdocs/langs/pl_PL/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Dostawcy SuppliersInvoice=Faktura dostawcy +SupplierInvoices=Faktury dostawcy ShowSupplierInvoice=Pokaż fakturę dostawcy NewSupplier=Nowy dostawca History=Historia @@ -10,20 +11,20 @@ OrderDate=Data zamówienia BuyingPriceMin=Najlepsza cena zakupu BuyingPriceMinShort=Najlepsza cena zakupu TotalBuyingPriceMinShort=Suma cen zakupu podproduktów -TotalSellingPriceMinShort=Total of subproducts selling prices +TotalSellingPriceMinShort=Suma cen sprzedaży produktów podrzędnych SomeSubProductHaveNoPrices=Niektóre podprodukty nie mają zdefiniowanych cen AddSupplierPrice=Dodaj cenę zakupu ChangeSupplierPrice=Zmień cenę zakupu SupplierPrices=Ceny dostawców -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s -NoRecordedSuppliers=No vendor recorded +ReferenceSupplierIsAlreadyAssociatedWithAProduct=To odniesienie do dostawcy jest już powiązane z produktem: %s +NoRecordedSuppliers=Brak zarejestrowanego dostawcy SupplierPayment=Płatność dostawcy SuppliersArea=Obszar dostawcy RefSupplierShort=Symbol dostawcy Availability=Dostępność -ExportDataset_fournisseur_1=Vendor invoices and invoice details +ExportDataset_fournisseur_1=Faktury od dostawców i dane do faktur ExportDataset_fournisseur_2=Faktury i płatności dostawcy -ExportDataset_fournisseur_3=Purchase orders and order details +ExportDataset_fournisseur_3=Zamówienia i szczegóły zamówienień ApproveThisOrder=Zatwierdź to zamówienie ConfirmApproveThisOrder=Czy zaakceptować zamówienie <b>%s</b>? DenyingThisOrder=Odrzuć to zamówienie @@ -31,18 +32,18 @@ ConfirmDenyingThisOrder=Czy odrzucić zamówienie <b>%s</b>? ConfirmCancelThisOrder=Czy anulować zamówienie <b>%s</b>? AddSupplierOrder=Utwórz zamówienie AddSupplierInvoice=Utwórz fakturę dostawcy -ListOfSupplierProductForSupplier=List of products and prices for vendor <b>%s</b> +ListOfSupplierProductForSupplier=Lista produktów i cen dostawcy <b> %s </b> 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 +NbDaysToDelivery=Opóźnienie dostawy (dni) +DescNbDaysToDelivery=Najdłuższe opóźnienie w dostawie produktów z tego zamówienia SupplierReputation=Reputacja dostawcy -ReferenceReputation=Reference reputation +ReferenceReputation=Reputacja referencji DoNotOrderThisProductToThisSupplier=Nie zamawiaj -NotTheGoodQualitySupplier=Low quality +NotTheGoodQualitySupplier=Niska jakość ReputationForThisProduct=Reputacja BuyerName=Nazwa kupującego AllProductServicePrices=Ceny wszystkich produktów/usług -AllProductReferencesOfSupplier=All references of vendor +AllProductReferencesOfSupplier=Wszystkie referencje dostawcy BuyingPriceNumShort=Ceny dostawców diff --git a/htdocs/langs/pl_PL/ticket.lang b/htdocs/langs/pl_PL/ticket.lang index 457e5110c6b..7d704f01740 100644 --- a/htdocs/langs/pl_PL/ticket.lang +++ b/htdocs/langs/pl_PL/ticket.lang @@ -25,51 +25,53 @@ Permission56001=Zobacz bilety Permission56002=Modyfikuj bilety Permission56003=Usuwaj bilety Permission56004=Zarządzaj biletami -Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on) +Permission56005=Zobacz bilety wszystkich stron trzecich (nie dotyczy użytkowników zewnętrznych, zawsze ograniczaj się do strony trzeciej, od której są zależni) TicketDictType=Bilet - Typ -TicketDictCategory=Ticket - Groupes -TicketDictSeverity=Ticket - Severities -TicketDictResolution=Ticket - Resolution +TicketDictCategory=Bilet - grupy +TicketDictSeverity=Bilet - dotkliwości +TicketDictResolution=Bilet - rozwiązanie -TicketTypeShortCOM=Commercial question -TicketTypeShortHELP=Request for functionnal help -TicketTypeShortISSUE=Issue, bug or problem -TicketTypeShortREQUEST=Change or enhancement request +TicketTypeShortCOM=Pytanie handlowe +TicketTypeShortHELP=Prośba o pomoc funkcjonalną +TicketTypeShortISSUE=Problem, błąd lub problem +TicketTypeShortREQUEST=Prośba o zmianę lub ulepszenie TicketTypeShortPROJET=Projekt TicketTypeShortOTHER=Inne TicketSeverityShortLOW=Niski -TicketSeverityShortNORMAL=Normal +TicketSeverityShortNORMAL=Normalna TicketSeverityShortHIGH=Wysoki -TicketSeverityShortBLOCKING=Critical, Blocking +TicketSeverityShortBLOCKING=Krytyczne, blokujące -ErrorBadEmailAddress=Field '%s' incorrect -MenuTicketMyAssign=My tickets -MenuTicketMyAssignNonClosed=My open tickets -MenuListNonClosed=Open tickets +ErrorBadEmailAddress=Pole „%s” jest nieprawidłowe +MenuTicketMyAssign=Moje bilety +MenuTicketMyAssignNonClosed=Moje otwarte bilety +MenuListNonClosed=Otwórz bilety TypeContact_ticket_internal_CONTRIBUTOR=Współpracownik -TypeContact_ticket_internal_SUPPORTTEC=Assigned user -TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking -TypeContact_ticket_external_CONTRIBUTOR=External contributor +TypeContact_ticket_internal_SUPPORTTEC=Przypisany użytkownik +TypeContact_ticket_external_SUPPORTCLI=Kontakt z klientem / śledzenie incydentów +TypeContact_ticket_external_CONTRIBUTOR=Współpracownik zewnętrzny -OriginEmail=Email source -Notify_TICKET_SENTBYMAIL=Send ticket message by email +OriginEmail=Źródło wiadomości e-mail +Notify_TICKET_SENTBYMAIL=Wyślij wiadomość e-mail z biletem # Status Read=Czytać -Assigned=Assigned +Assigned=Przydzielony InProgress=W trakcie -NeedMoreInformation=Waiting for information -Answered=Answered +NeedMoreInformation=Czekam na informacje +Answered=Odpowiedział Waiting=Czekanie Closed=Zamknięte -Deleted=Deleted +Deleted=Usunięto # Dict Type=Typ -Severity=Severity +Severity=Surowość +TicketGroupIsPublic=Grupa jest publiczna +TicketGroupIsPublicDesc=Jeśli grupa biletów jest publiczna, będzie widoczna w formularzu podczas tworzenia biletu z poziomu interfejsu publicznego # Email templates MailToSendTicketMessage=Aby wysłać wiadomość e-mail z wiadomości biletu @@ -77,228 +79,238 @@ MailToSendTicketMessage=Aby wysłać wiadomość e-mail z wiadomości biletu # # Admin page # -TicketSetup=Ticket module setup +TicketSetup=Konfiguracja modułu biletów TicketSettings=Ustawienia 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 -TicketParamModule=Module variable setup -TicketParamMail=Email setup -TicketEmailNotificationFrom=Notification email from +TicketPublicAccess=Publiczny interfejs, który nie wymaga identyfikacji, jest dostępny pod następującym adresem URL +TicketSetupDictionaries=Typ zgłoszenia, ważność i kody analityczne można konfigurować ze słowników +TicketParamModule=Konfiguracja zmiennej modułu +TicketParamMail=Konfiguracja poczty e-mail +TicketEmailNotificationFrom=E-mail z powiadomieniem od TicketEmailNotificationFromHelp=Używany w odpowiedzi na wiadomość biletową na przykład -TicketEmailNotificationTo=Notifications email to -TicketEmailNotificationToHelp=Send email notifications to this address. -TicketNewEmailBodyLabel=Text message sent after creating a ticket -TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added. -TicketParamPublicInterface=Public interface setup -TicketsEmailMustExist=Require an existing email address to create a ticket -TicketsEmailMustExistHelp=In the public interface, the email address should already be filled in the database to create a new ticket. +TicketEmailNotificationTo=Powiadomienia e-mail do +TicketEmailNotificationToHelp=Wysyłaj powiadomienia e-mail na ten adres. +TicketNewEmailBodyLabel=Wiadomość tekstowa wysyłana po utworzeniu biletu +TicketNewEmailBodyHelp=Podany tutaj tekst zostanie wstawiony do wiadomości e-mail potwierdzającej utworzenie nowego zgłoszenia z interfejsu publicznego. Informacje o sprawdzeniu biletu są dodawane automatycznie. +TicketParamPublicInterface=Konfiguracja interfejsu publicznego +TicketsEmailMustExist=Wymagaj istniejącego adresu e-mail, aby utworzyć bilet +TicketsEmailMustExistHelp=W interfejsie publicznym adres e-mail powinien być już wypełniony w bazie danych, aby utworzyć nowy bilet. PublicInterface=Interfejs publiczny -TicketUrlPublicInterfaceLabelAdmin=Alternative URL for public interface -TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the server must act as a proxy on this new URL) -TicketPublicInterfaceTextHomeLabelAdmin=Welcome text of the public interface -TicketPublicInterfaceTextHome=You can create a support ticket or view existing from its identifier tracking ticket. -TicketPublicInterfaceTextHomeHelpAdmin=The text defined here will appear on the home page of the public interface. -TicketPublicInterfaceTopicLabelAdmin=Interface title -TicketPublicInterfaceTopicHelp=This text will appear as the title of the public interface. -TicketPublicInterfaceTextHelpMessageLabelAdmin=Help text to the message entry -TicketPublicInterfaceTextHelpMessageHelpAdmin=This text will appear above the message input area of the user. -ExtraFieldsTicket=Extra attributes -TicketCkEditorEmailNotActivated=HTML editor is not activated. Please put FCKEDITOR_ENABLE_MAIL content to 1 to get it. -TicketsDisableEmail=Do not send emails for ticket creation or message recording -TicketsDisableEmailHelp=By default, emails are sent when new tickets or messages created. Enable this option to disable *all* email notifications -TicketsLogEnableEmail=Enable log by email -TicketsLogEnableEmailHelp=At each change, an email will be sent **to each contact** associated with the ticket. +TicketUrlPublicInterfaceLabelAdmin=Alternatywny adres URL interfejsu publicznego +TicketUrlPublicInterfaceHelpAdmin=Możliwe jest zdefiniowanie aliasu do serwera WWW, a tym samym udostępnienie interfejsu publicznego z innym adresem URL (serwer musi działać jako proxy na tym nowym adresie URL) +TicketPublicInterfaceTextHomeLabelAdmin=Tekst powitalny interfejsu publicznego +TicketPublicInterfaceTextHome=Możesz utworzyć zgłoszenie do pomocy technicznej lub wyświetlić istniejące z jego biletu śledzenia identyfikatora. +TicketPublicInterfaceTextHomeHelpAdmin=Zdefiniowany tutaj tekst pojawi się na stronie głównej interfejsu publicznego. +TicketPublicInterfaceTopicLabelAdmin=Tytuł interfejsu +TicketPublicInterfaceTopicHelp=Ten tekst pojawi się jako tytuł interfejsu publicznego. +TicketPublicInterfaceTextHelpMessageLabelAdmin=Tekst pomocy do wpisu wiadomości +TicketPublicInterfaceTextHelpMessageHelpAdmin=Ten tekst pojawi się nad obszarem wprowadzania wiadomości użytkownika. +ExtraFieldsTicket=Dodatkowe atrybuty +TicketCkEditorEmailNotActivated=Edytor HTML nie jest aktywowany. Ustaw zawartość FCKEDITOR_ENABLE_MAIL na 1, aby ją pobrać. +TicketsDisableEmail=Nie wysyłaj e-maili w celu utworzenia zgłoszenia lub nagrania wiadomości +TicketsDisableEmailHelp=Domyślnie wiadomości e-mail są wysyłane po utworzeniu nowych biletów lub wiadomości. Włącz tę opcję, aby wyłączyć * wszystkie * powiadomienia e-mail +TicketsLogEnableEmail=Włącz logowanie przez e-mail +TicketsLogEnableEmailHelp=Przy każdej zmianie e-mail zostanie wysłany ** do każdego kontaktu ** związanego z biletem. TicketParams=Params -TicketsShowModuleLogo=Display the logo of the module in the public interface -TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface -TicketsShowCompanyLogo=Display the logo of the company in the public interface -TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) -TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) -TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. +TicketsShowModuleLogo=Wyświetl logo modułu w interfejsie publicznym +TicketsShowModuleLogoHelp=Włącz tę opcję, aby ukryć moduł logo na stronach interfejsu publicznego +TicketsShowCompanyLogo=Wyświetl logo firmy w interfejsie publicznym +TicketsShowCompanyLogoHelp=Włącz tę opcję, aby ukryć logo głównej firmy na stronach interfejsu publicznego +TicketsEmailAlsoSendToMainAddress=Wyślij również powiadomienie na główny adres e-mail +TicketsEmailAlsoSendToMainAddressHelp=Włącz tę opcję, aby również wysłać wiadomość e-mail na adres zdefiniowany w ustawieniach „%s” (patrz zakładka „%s”) +TicketsLimitViewAssignedOnly=Ogranicz wyświetlanie do biletów przypisanych do bieżącego użytkownika (nie dotyczy użytkowników zewnętrznych, zawsze ograniczaj się do strony trzeciej, od której zależą) +TicketsLimitViewAssignedOnlyHelp=Widoczne będą tylko bilety przypisane do bieżącego użytkownika. Nie dotyczy użytkownika z uprawnieniami do zarządzania zgłoszeniami. TicketsActivatePublicInterface=Aktywuj publiczny interfejs -TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create tickets. -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 -TicketsModelModule=Document templates for tickets -TicketNotifyTiersAtCreation=Notify third party at creation -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. +TicketsActivatePublicInterfaceHelp=Interfejs publiczny umożliwia każdemu odwiedzającemu tworzenie biletów. +TicketsAutoAssignTicket=Automatycznie przypisz użytkownika, który utworzył bilet +TicketsAutoAssignTicketHelp=Podczas tworzenia biletu użytkownik może zostać automatycznie przypisany do biletu. +TicketNumberingModules=Moduł numeracji biletów +TicketsModelModule=Szablony dokumentów dla biletów +TicketNotifyTiersAtCreation=Powiadom osobę trzecią podczas tworzenia +TicketsDisableCustomerEmail=Zawsze wyłączaj wiadomości e-mail, gdy bilet jest tworzony z interfejsu publicznego +TicketsPublicNotificationNewMessage=Wysyłaj e-maile, gdy do zgłoszenia zostanie dodana nowa wiadomość / komentarz +TicketsPublicNotificationNewMessageHelp=Wysyłaj e-maile, gdy nowa wiadomość zostanie dodana z interfejsu publicznego (do przypisanego użytkownika lub powiadomienie e-mail do (aktualizacja) i / lub powiadomienie e-mailem do) +TicketPublicNotificationNewMessageDefaultEmail=Powiadomienia e-mail do (aktualizacja) +TicketPublicNotificationNewMessageDefaultEmailHelp=Wyślij wiadomość e-mail na ten adres w przypadku każdej nowej wiadomości, jeśli do biletu nie jest przypisany użytkownik lub użytkownik nie ma żadnego znanego adresu e-mail. # # Index & list page # -TicketsIndex=Tickets area -TicketList=List of tickets -TicketAssignedToMeInfos=This page display ticket list created by or assigned to current user -NoTicketsFound=No ticket found -NoUnreadTicketsFound=No unread ticket found -TicketViewAllTickets=View all tickets -TicketViewNonClosedOnly=View only open tickets -TicketStatByStatus=Tickets by status -OrderByDateAsc=Sort by ascending date -OrderByDateDesc=Sort by descending date -ShowAsConversation=Show as conversation list -MessageListViewType=Show as table list +TicketsIndex=Strefa biletów +TicketList=Lista biletów +TicketAssignedToMeInfos=Ta strona wyświetla listę zgłoszeń utworzoną przez lub przypisaną do bieżącego użytkownika +NoTicketsFound=Nie znaleziono biletu +NoUnreadTicketsFound=Nie znaleziono nieprzeczytanego biletu +TicketViewAllTickets=Zobacz wszystkie bilety +TicketViewNonClosedOnly=Wyświetl tylko otwarte bilety +TicketStatByStatus=Bilety według statusu +OrderByDateAsc=Sortuj według rosnącej daty +OrderByDateDesc=Sortuj według malejącej daty +ShowAsConversation=Pokaż jako listę rozmów +MessageListViewType=Pokaż jako listę tabel # # Ticket card # -Ticket=Ticket -TicketCard=Ticket card -CreateTicket=Create ticket -EditTicket=Edit ticket -TicketsManagement=Tickets Management -CreatedBy=Created by -NewTicket=New Ticket -SubjectAnswerToTicket=Ticket answer -TicketTypeRequest=Request type +Ticket=Bilet +TicketCard=Karta biletowa +CreateTicket=Utwórz bilet +EditTicket=Edytuj bilet +TicketsManagement=Zarządzanie zgłoszeniami +CreatedBy=Stworzone przez +NewTicket=Nowy bilet +SubjectAnswerToTicket=Odpowiedź na bilet +TicketTypeRequest=Rodzaj żądania TicketCategory=Grupa -SeeTicket=See ticket -TicketMarkedAsRead=Ticket has been marked as read -TicketReadOn=Read on +SeeTicket=Zobacz bilet +TicketMarkedAsRead=Bilet został oznaczony jako przeczytany +TicketReadOn=Czytaj TicketCloseOn=Ostateczny termin -MarkAsRead=Mark ticket as read -TicketHistory=Ticket history -AssignUser=Assign to user -TicketAssigned=Ticket is now assigned -TicketChangeType=Change type -TicketChangeCategory=Change analytic code +MarkAsRead=Oznacz bilet jako przeczytany +TicketHistory=Historia biletów +AssignUser=Przypisz do użytkownika +TicketAssigned=Bilet jest teraz przypisany +TicketChangeType=Zmień typ +TicketChangeCategory=Zmień kod analityczny TicketChangeSeverity=Zmień istotność -TicketAddMessage=Add a message -AddMessage=Add a message -MessageSuccessfullyAdded=Ticket added -TicketMessageSuccessfullyAdded=Message successfully added -TicketMessagesList=Message list -NoMsgForThisTicket=No message for this ticket -Properties=Classification -LatestNewTickets=Latest %s newest tickets (not read) -TicketSeverity=Severity -ShowTicket=See ticket +TicketAddMessage=Dodaj wiadomość +AddMessage=Dodaj wiadomość +MessageSuccessfullyAdded=Dodano bilet +TicketMessageSuccessfullyAdded=Wiadomość została pomyślnie dodana +TicketMessagesList=Lista wiadomości +NoMsgForThisTicket=Brak wiadomości dla tego biletu +Properties=Klasyfikacja +LatestNewTickets=Najnowsze %s Najnowsze bilety (nieprzeczytane) +TicketSeverity=Surowość +ShowTicket=Zobacz bilet RelatedTickets=Powiązane bilety TicketAddIntervention=Tworzenie interwencji -CloseTicket=Close ticket -CloseATicket=Close a ticket -ConfirmCloseAticket=Confirm ticket closing -ConfirmDeleteTicket=Please confirm ticket deleting -TicketDeletedSuccess=Ticket deleted with success -TicketMarkedAsClosed=Ticket marked as closed -TicketDurationAuto=Calculated duration -TicketDurationAutoInfos=Duration calculated automatically from intervention related -TicketUpdated=Ticket updated -SendMessageByEmail=Send message by email -TicketNewMessage=New message -ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send -TicketGoIntoContactTab=Please go into "Contacts" tab to select them -TicketMessageMailIntro=Introduction -TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved. -TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email -TicketMessageMailIntroText=Hello,<br>A new response was sent on a ticket that you contact. Here is the message:<br> -TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket. +CloseTicket=Zamknij bilet +CloseATicket=Zamknij bilet +ConfirmCloseAticket=Potwierdź zamknięcie biletu +ConfirmDeleteTicket=Potwierdź usunięcie biletu +TicketDeletedSuccess=Bilet został usunięty z powodzeniem +TicketMarkedAsClosed=Bilet oznaczony jako zamknięty +TicketDurationAuto=Obliczony czas trwania +TicketDurationAutoInfos=Czas trwania obliczany automatycznie na podstawie interwencji +TicketUpdated=Bilet zaktualizowany +SendMessageByEmail=Wyślij wiadomość e-mailem +TicketNewMessage=Nowa wiadomość +ErrorMailRecipientIsEmptyForSendTicketMessage=Adresat jest pusty. Nie wysłano e-maila +TicketGoIntoContactTab=Przejdź do zakładki „Kontakty”, aby je wybrać +TicketMessageMailIntro=Wprowadzenie +TicketMessageMailIntroHelp=Ten tekst jest dodawany tylko na początku e-maila i nie zostanie zapisany. +TicketMessageMailIntroLabelAdmin=Wprowadzenie do wiadomości podczas wysyłania wiadomości e-mail +TicketMessageMailIntroText=Witaj, <br> Nowa odpowiedź została wysłana na zgłoszenie, z którym się kontaktujesz. Oto wiadomość: <br> +TicketMessageMailIntroHelpAdmin=Ten tekst zostanie wstawiony przed tekstem odpowiedzi na zgłoszenie. TicketMessageMailSignature=Podpis -TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved. -TicketMessageMailSignatureText=<p>Sincerely,</p><p>--</p> -TicketMessageMailSignatureLabelAdmin=Signature of response email -TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message. -TicketMessageHelp=Only this text will be saved in the message list on ticket card. -TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values. -TimeElapsedSince=Time elapsed since -TicketTimeToRead=Time elapsed before read -TicketContacts=Contacts ticket -TicketDocumentsLinked=Documents linked to ticket -ConfirmReOpenTicket=Confirm reopen this ticket ? -TicketMessageMailIntroAutoNewPublicMessage=A new message was posted on the ticket with the subject %s: -TicketAssignedToYou=Ticket assigned -TicketAssignedEmailBody=You have been assigned the ticket #%s by %s -MarkMessageAsPrivate=Mark message as private -TicketMessagePrivateHelp=This message will not display to external users -TicketEmailOriginIssuer=Issuer at origin of the tickets -InitialMessage=Initial Message -LinkToAContract=Link to a contract -TicketPleaseSelectAContract=Select a contract -UnableToCreateInterIfNoSocid=Can not create an intervention when no third party is defined -TicketMailExchanges=Mail exchanges -TicketInitialMessageModified=Initial message modified -TicketMessageSuccesfullyUpdated=Message successfully updated -TicketChangeStatus=Change status -TicketConfirmChangeStatus=Confirm the status change: %s ? -TicketLogStatusChanged=Status changed: %s to %s -TicketNotNotifyTiersAtCreate=Not notify company at create -Unread=Unread -TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -ErrorTicketRefRequired=Ticket reference name is required +TicketMessageMailSignatureHelp=Ten tekst jest dodawany tylko na końcu wiadomości e-mail i nie zostanie zapisany. +TicketMessageMailSignatureText= <p> Z poważaniem, </p> <p> - </p> +TicketMessageMailSignatureLabelAdmin=Podpis e-maila zwrotnego +TicketMessageMailSignatureHelpAdmin=Ten tekst zostanie wstawiony po wiadomości z odpowiedzią. +TicketMessageHelp=Tylko ten tekst zostanie zapisany na liście wiadomości na karcie biletu. +TicketMessageSubstitutionReplacedByGenericValues=Zmienne podstawienia są zastępowane wartościami ogólnymi. +TimeElapsedSince=Czas, który upłynął od +TicketTimeToRead=Upłynął czas przed przeczytaniem +TicketContacts=Bilet kontaktów +TicketDocumentsLinked=Dokumenty powiązane z biletem +ConfirmReOpenTicket=Potwierdzić ponowne otwarcie tego biletu? +TicketMessageMailIntroAutoNewPublicMessage=Na bilecie została umieszczona nowa wiadomość o temacie %s: +TicketAssignedToYou=Przydzielony bilet +TicketAssignedEmailBody=Przydzielono Ci bilet # %s przez %s +MarkMessageAsPrivate=Oznacz wiadomość jako prywatną +TicketMessagePrivateHelp=Ta wiadomość nie będzie wyświetlana użytkownikom zewnętrznym +TicketEmailOriginIssuer=Wystawca w miejscu pochodzenia biletów +InitialMessage=Wiadomość wstępna +LinkToAContract=Link do umowy +TicketPleaseSelectAContract=Wybierz umowę +UnableToCreateInterIfNoSocid=Nie można utworzyć interwencji, jeśli nie zdefiniowano żadnej osoby trzeciej +TicketMailExchanges=Wymiana poczty +TicketInitialMessageModified=Zmodyfikowano wiadomość początkową +TicketMessageSuccesfullyUpdated=Wiadomość została pomyślnie zaktualizowana +TicketChangeStatus=Zmień status +TicketConfirmChangeStatus=Potwierdź zmianę statusu: %s? +TicketLogStatusChanged=Status zmieniony: %s na %s +TicketNotNotifyTiersAtCreate=Nie powiadamiaj firmy o utworzeniu +Unread=nieprzeczytane +TicketNotCreatedFromPublicInterface=Niedostępne. Bilet nie został utworzony z interfejsu publicznego. +ErrorTicketRefRequired=Nazwa biletu jest wymagana # # Logs # -TicketLogMesgReadBy=Ticket %s read by %s -NoLogForThisTicket=No log for this ticket yet -TicketLogAssignedTo=Ticket %s assigned to %s -TicketLogPropertyChanged=Ticket %s modified: classification from %s to %s -TicketLogClosedBy=Ticket %s closed by %s -TicketLogReopen=Ticket %s re-open +TicketLogMesgReadBy=Bilet %s odczytany przez %s +NoLogForThisTicket=Nie ma jeszcze dziennika dla tego biletu +TicketLogAssignedTo=Bilet %s przypisany do %s +TicketLogPropertyChanged=Bilet %s zmodyfikowano: klasyfikacja od %s do %s +TicketLogClosedBy=Bilet %s zamknięty przez %s +TicketLogReopen=Bilet %s ponownie otwarty # # Public pages # -TicketSystem=Ticket system -ShowListTicketWithTrackId=Display ticket list from track ID -ShowTicketWithTrackId=Display ticket from track ID -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 and Ref %s. -PleaseRememberThisId=Please keep the tracking number that we might ask you later. -TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s) -TicketNewEmailSubjectCustomer=New support ticket -TicketNewEmailBody=This is an automatic email to confirm you have registered a new ticket. -TicketNewEmailBodyCustomer=This is an automatic email to confirm a new ticket has just been created into your account. -TicketNewEmailBodyInfosTicket=Information for monitoring the ticket -TicketNewEmailBodyInfosTrackId=Ticket tracking number: %s -TicketNewEmailBodyInfosTrackUrl=You can view the progress of the ticket by clicking the link above. -TicketNewEmailBodyInfosTrackUrlCustomer=You can view the progress of the ticket in the specific interface by clicking the following link -TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this email! Use the link to reply into the interface. -TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system. +TicketSystem=System biletowy +ShowListTicketWithTrackId=Wyświetl listę biletów z identyfikatora utworu +ShowTicketWithTrackId=Wyświetl bilet z identyfikatora utworu +TicketPublicDesc=Możesz utworzyć zgłoszenie do pomocy technicznej lub sprawdzić na podstawie istniejącego identyfikatora. +YourTicketSuccessfullySaved=Bilet został pomyślnie zapisany! +MesgInfosPublicTicketCreatedWithTrackId=Utworzono nowy bilet o identyfikatorze %s i numerze ref %s. +PleaseRememberThisId=Zachowaj numer śledzenia, o który możemy poprosić później. +TicketNewEmailSubject=Potwierdzenie utworzenia biletu - Ref %s (publiczny identyfikator biletu %s) +TicketNewEmailSubjectCustomer=Nowe zgłoszenie do pomocy technicznej +TicketNewEmailBody=To jest automatyczna wiadomość e-mail potwierdzająca zarejestrowanie nowego biletu. +TicketNewEmailBodyCustomer=To jest automatyczny e-mail potwierdzający, że nowy bilet został właśnie utworzony na Twoim koncie. +TicketNewEmailBodyInfosTicket=Informacje do monitorowania zgłoszenia +TicketNewEmailBodyInfosTrackId=Numer śledzenia biletu: %s +TicketNewEmailBodyInfosTrackUrl=Możesz zobaczyć postęp zgłoszenia, klikając powyższy link. +TicketNewEmailBodyInfosTrackUrlCustomer=Możesz zobaczyć postęp zgłoszenia w określonym interfejsie, klikając poniższy link +TicketEmailPleaseDoNotReplyToThisEmail=Prosimy nie odpowiadać na tę wiadomość! Użyj linku, aby odpowiedzieć w interfejsie. +TicketPublicInfoCreateTicket=Ten formularz umożliwia zarejestrowanie zgłoszenia do pomocy technicznej w naszym systemie zarządzania. TicketPublicPleaseBeAccuratelyDescribe=Proszę dokładnie opisać problem. Podaj jak najwięcej informacji, abyśmy mogli poprawnie zidentyfikować Twoją prośbę. -TicketPublicMsgViewLogIn=Please enter ticket tracking ID -TicketTrackId=Public Tracking ID -OneOfTicketTrackId=One of your tracking ID -ErrorTicketNotFound=Ticket with tracking ID %s not found! +TicketPublicMsgViewLogIn=Wprowadź identyfikator śledzenia biletu +TicketTrackId=Publiczny identyfikator śledzenia +OneOfTicketTrackId=Jeden z Twoich identyfikatorów śledzenia +ErrorTicketNotFound=Nie znaleziono biletu z identyfikatorem śledzenia %s! Subject=Temat ViewTicket=Wyświetl bilet -ViewMyTicketList=View my ticket list -ErrorEmailMustExistToCreateTicket=Error: email address not found in our database -TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s) -TicketNewEmailBodyAdmin=<p>Ticket has just been created with ID #%s, see information:</p> -SeeThisTicketIntomanagementInterface=See ticket in management interface -TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled -ErrorEmailOrTrackingInvalid=Bad value for tracking ID or email -OldUser=Old user +ViewMyTicketList=Wyświetl moją listę biletów +ErrorEmailMustExistToCreateTicket=Błąd: adres e-mail nie został znaleziony w naszej bazie danych +TicketNewEmailSubjectAdmin=Utworzono nowy bilet - ref %s (publiczny identyfikator biletu %s) +TicketNewEmailBodyAdmin= <p> Bilet został właśnie utworzony z ID # %s, zobacz informacje: </p> +SeeThisTicketIntomanagementInterface=Zobacz bilet w interfejsie zarządzania +TicketPublicInterfaceForbidden=Interfejs publiczny biletów nie został włączony +ErrorEmailOrTrackingInvalid=Nieprawidłowa wartość identyfikatora śledzenia lub adresu e-mail +OldUser=Stary użytkownik NewUser=Nowy użytkownik -NumberOfTicketsByMonth=Number of tickets per month -NbOfTickets=Number of tickets +NumberOfTicketsByMonth=Liczba biletów miesięcznie +NbOfTickets=Liczba biletów # notifications -TicketNotificationEmailSubject=Ticket %s updated -TicketNotificationEmailBody=This is an automatic message to notify you that ticket %s has just been updated -TicketNotificationRecipient=Notification recipient -TicketNotificationLogMessage=Log message -TicketNotificationEmailBodyInfosTrackUrlinternal=View ticket into interface -TicketNotificationNumberEmailSent=Notification email sent: %s +TicketNotificationEmailSubject=Bilet %s został zaktualizowany +TicketNotificationEmailBody=To jest automatyczna wiadomość informująca, że bilet %s został właśnie zaktualizowany +TicketNotificationRecipient=Odbiorca powiadomienia +TicketNotificationLogMessage=Komunikat dziennika +TicketNotificationEmailBodyInfosTrackUrlinternal=Wyświetl bilet w interfejsie +TicketNotificationNumberEmailSent=Wysłano powiadomienie e-mail: %s -ActionsOnTicket=Events on ticket +ActionsOnTicket=Wydarzenia na bilecie # # Boxes # -BoxLastTicket=Latest created tickets -BoxLastTicketDescription=Latest %s created tickets +BoxLastTicket=Ostatnio utworzone bilety +BoxLastTicketDescription=Ostatnie utworzone bilety %s BoxLastTicketContent= -BoxLastTicketNoRecordedTickets=No recent unread tickets -BoxLastModifiedTicket=Latest modified tickets -BoxLastModifiedTicketDescription=Latest %s modified tickets +BoxLastTicketNoRecordedTickets=Brak ostatnich nieprzeczytanych biletów +BoxLastModifiedTicket=Najnowsze zmodyfikowane bilety +BoxLastModifiedTicketDescription=Najnowsze zmodyfikowane bilety %s BoxLastModifiedTicketContent= -BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxLastModifiedTicketNoRecordedTickets=Brak ostatnio zmodyfikowanych biletów +BoxTicketType=Liczba otwartych biletów według rodzaju +BoxTicketSeverity=Liczba otwartych zgłoszeń według ważności +BoxNoTicketSeverity=Nie otwarto żadnych biletów +BoxTicketLastXDays=Liczba nowych biletów według dni w ostatnich dniach %s +BoxTicketLastXDayswidget = Liczba nowych biletów według dni ostatnich X dni +BoxNoTicketLastXDays=Brak nowych biletów w ciągu ostatnich %s dni +BoxNumberOfTicketByDay=Liczba nowych biletów w ciągu dnia +BoxNewTicketVSClose=Liczba dzisiejszych nowych biletów w porównaniu z dzisiejszymi zamkniętymi biletami +TicketCreatedToday=Bilet utworzony dzisiaj +TicketClosedToday=Bilet dzisiaj zamknięty diff --git a/htdocs/langs/pl_PL/users.lang b/htdocs/langs/pl_PL/users.lang index e6d255dfee3..e473f26d540 100644 --- a/htdocs/langs/pl_PL/users.lang +++ b/htdocs/langs/pl_PL/users.lang @@ -12,7 +12,7 @@ PasswordChangedTo=Hasło zmieniono na: %s SubjectNewPassword=Twoje nowe hasło dla %s GroupRights=Uprawnienia grupy UserRights=Uprawnienia użytkownika -UserGUISetup=User Display Setup +UserGUISetup=Ustawienia Wyświetlacza Użytkownika DisableUser=Wyłączone DisableAUser=Wyłącz użytkownika DeleteUser=Usuń @@ -34,8 +34,8 @@ ListOfUsers=Lista użytkowników SuperAdministrator=Super Administrator SuperAdministratorDesc=Administrator ze wszystkich praw AdministratorDesc=Administrator -DefaultRights=Default Permissions -DefaultRightsDesc=Define here the <u>default</u> permissions that are automatically granted to a <u>new</u> user (to modify permissions for existing users, go to the user card). +DefaultRights=Uprawnienia domyślne +DefaultRightsDesc=Zdefiniuj tutaj domyślne uprawnienia <u> </u>, które są automatycznie przyznawane nowemu użytkownikowi <u> </u> (aby zmodyfikować uprawnienia dla istniejących użytkowników, przejdź do karty użytkownika). DolibarrUsers=Użytkownicy Dolibarr LastName=Nazwisko FirstName=Imię @@ -46,6 +46,8 @@ RemoveFromGroup=Usuń z grupy PasswordChangedAndSentTo=Hasło zmienione i wysyłane do <b>%s.</b> PasswordChangeRequest=Zgłoszenie zmiany hasła dla <b>%s</b> PasswordChangeRequestSent=Wniosek o zmianę hasła dla <b>%s</b> wysłany do <b>%s</b>. +IfLoginExistPasswordRequestSent=Jeśli ten login jest prawidłowym kontem, wiadomość e-mail umożliwiająca zresetowanie hasła została wysłana. +IfEmailExistPasswordRequestSent=Jeśli ten adres e-mail jest prawidłowym kontem, wiadomość e-mail umożliwiająca zresetowanie hasła została wysłana. ConfirmPasswordReset=Potwierdź zresetowanie hasła MenuUsersAndGroups=Użytkownicy i grupy LastGroupsCreated=Ostatnie %s utworzone grupy @@ -66,19 +68,20 @@ CreateDolibarrThirdParty=Utwórz kontrahenta LoginAccountDisableInDolibarr=Konto wyłączone w Dolibarr. UsePersonalValue=Użyj wartości osobowych InternalUser=Wewnętrzny użytkownik -ExportDataset_user_1=Users and their properties +ExportDataset_user_1=Użytkownicy i ich właściwości DomainUser=Domena użytkownika %s Reactivate=Przywraca -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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) +CreateInternalUserDesc=Ten formularz umożliwia utworzenie wewnętrznego użytkownika w firmie / organizacji. Aby utworzyć użytkownika zewnętrznego (klienta, dostawcę itp.), Użyj przycisku „Utwórz użytkownika Dolibarr” na karcie kontaktowej strony trzeciej. +InternalExternalDesc=Wewnętrzny użytkownik <b> </b> to użytkownik będący częścią Twojej firmy / organizacji lub będący partnerem spoza Twojej organizacji, który może potrzebować więcej danych niż danych związanych z jego firmą (system uprawnień określi, co może lub może nie widzę ani nie robię). <br> Użytkownik zewnętrzny <b> </b> to klient, sprzedawca lub inna osoba, która musi przeglądać TYLKO dane dotyczące siebie (Tworzenie użytkownika zewnętrznego dla strony trzeciej można wykonać z rekordu kontaktu osoby trzeciej). <br> <br> W obu przypadkach należy przyznać uprawnienia do funkcji, których potrzebuje użytkownik. PermissionInheritedFromAGroup=Zezwolenie udzielone ponieważ odziedziczył od jednego z użytkowników grupy. Inherited=Odziedziczone +UserWillBe=Utworzony użytkownik będzie UserWillBeInternalUser=Utworzony użytkownik będzie wewnętrzny użytkownik (ponieważ nie związane z konkretnym trzeciej) UserWillBeExternalUser=Utworzony użytkownik będzie zewnętrzny użytkownik (ponieważ związana z konkretnym trzeciej) 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. +NewPasswordValidated=Twoje nowe hasło zostało potwierdzone i musi być teraz używane do logowania. EventUserModified=Użytkownik %s zmodyfikowany UserDisabled=Użytkownik %s wyłączony UserEnabled=Użytkownik %s aktywowany @@ -94,7 +97,7 @@ NameToCreate=Nazwa kontrahenta do utworzenia YourRole=Twoje role YourQuotaOfUsersIsReached=Limitu aktywnych użytkowników został osiągnięty! NbOfUsers=Ilość użytkowników -NbOfPermissions=No. of permissions +NbOfPermissions=Liczba uprawnień DontDowngradeSuperAdmin=Tylko superadmin niższej wersji superadmin HierarchicalResponsible=Kierownik HierarchicView=Widok hierarchiczny @@ -108,13 +111,15 @@ 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 -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 +DateOfEmployment=Data zatrudnienia +DateEmployment=Zatrudnienie +DateEmploymentstart=Data rozpoczęcia zatrudnienia +DateEmploymentEnd=Data zakończenia zatrudnienia +RangeOfLoginValidity=Zakres dat ważności logowania +CantDisableYourself=Nie możesz wyłączyć własnego rekordu użytkownika +ForceUserExpenseValidator=Wymuś walidator raportu z wydatków +ForceUserHolidayValidator=Wymuś walidator prośby o opuszczenie +ValidatorIsSupervisorByDefault=Domyślnie walidator jest opiekunem użytkownika. Pozostaw puste, aby zachować to zachowanie. +UserPersonalEmail=Osobisty adres e-mail +UserPersonalMobile=Osobisty telefon komórkowy +WarningNotLangOfInterface=Ostrzeżenie, to jest główny język, którym mówi użytkownik, a nie język interfejsu, który wybrał. Aby zmienić język interfejsu widoczny dla tego użytkownika, przejdź do zakładki %s diff --git a/htdocs/langs/pl_PL/website.lang b/htdocs/langs/pl_PL/website.lang index bb7ff022723..28d79383aad 100644 --- a/htdocs/langs/pl_PL/website.lang +++ b/htdocs/langs/pl_PL/website.lang @@ -16,7 +16,7 @@ WEBSITE_ROBOT=Plik robota (robots.txt) WEBSITE_HTACCESS=Plik .htaccess witryny WEBSITE_MANIFEST_JSON=Plik manifest.json witryny WEBSITE_README=Plik README.md -WEBSITE_KEYWORDSDesc=Use a comma to separate values +WEBSITE_KEYWORDSDesc=Wartości rozdziel przecinkami EnterHereLicenseInformation=Tu wprowadź metadane lub informacje licencyjne, które wypełnią plik README.md. Przy rozprowadzaniu Twej witryny jako szablonu, plik ten zostanie dołączony do pakietu tego szablonu. HtmlHeaderPage=Nagłówek HTML (tylko dla tej strony) PageNameAliasHelp=Nazwa lub alias strony. <br> Ten alias służy również do tworzenia adresu URL wspierającego SEO, gdy witrynę obsługuje web serwer (taki jak Apacke, Nginx, ...). Użyj przycisku „<strong>%s</strong>”, aby edytować ten alias. @@ -42,25 +42,25 @@ ViewPageInNewTab=Zobacz stronę w nowej zakładce SetAsHomePage=Ustaw jako stronę domową RealURL=Prawdziwy adres URL ViewWebsiteInProduction=Zobacz stronę używając linków ze strony głównej -SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on<br><strong>%s</strong> -ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: +SetHereVirtualHost= <u> Użyj z Apache / NGinx / ... </u> <br> Utwórz na swoim serwerze internetowym (Apache, Nginx, ...) dedykowany wirtualny host z włączoną obsługą PHP i katalog główny na <br> <strong>%s</strong> +ExampleToUseInApacheVirtualHostConfig=Przykład do użycia w konfiguracji hosta wirtualnego Apache: YouCanAlsoTestWithPHPS=<u> Używaj z wbudowanym serwerem PHP </u> <br>Gdy w środowisku rozwojowym preferujesz testowanie web strony z web serwerem wbudowanym w PHP (wymagane PHP 5.5 lub nowsze), to uruchamiaj<br> <strong> php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Uruchom swoją witrynę u innego dostawcy wystąpień Dolibarr</u><br>Jeśli nie masz dostępnego w internecie web serwera, takiego jak Apache lub NGinx, to możesz eksportować i importować swoją witrynę do innego wystąpienia Dolibarr u kogoś oferującego wystąpienia Dolibarr mające moduł Website w pełni zintegrowany z web serwerem. Listę niektórych dostawców wystąpień Dolibarr znajdziesz w <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Sprawdź także, czy host wirtualny ma uprawnienia <strong>%s</strong> do plików <br> <strong>%s</strong> +CheckVirtualHostPerms=Sprawdź również, czy użytkownik wirtualnego hosta (na przykład dane www) ma <strong> %s </strong> uprawnienia do plików w <br> <strong> %s</strong> ReadPerm=Czytanie WritePerm=Zapis TestDeployOnWeb=Testuj/wdróż na web serwerze PreviewSiteServedByWebServer=<u>Podgląd %s w nowej zakładce.</u><br><br>%s będzie obsługiwana przez zewnętrzny web serwer (np. Apache, Nginx, IIS). Musisz zainstalować i skonfigurować taki web serwer, zanim wskazanie do katalogu:<br><strong>%s</strong><br>URL obsługiwany przez zewnętrzny web serwer:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Podgląd %s w nowej zakładce.</u><br><br>%s będzie obsługiwany przez wewnętrzny - zawarty w Dolibarr - web serwer, przez co żaden dodatkowy web serwer nie musi być instalowany/używany.<br>Niedogodnością takiego rozwiązania są adresy URL stron web, które wtedy rozpoczynając się od ścieżki Twego wystąpienia Dolibarr są przez to nieprzyjazne użytkownikowi.<br>Adres URL obsługiwany przez Dolibarr:<br><strong>%s</strong><br><br>By do obsługi tej web witryny używać zewnętrznego - wobec Twego wystąpienia Dolibarr, ale jednak na tym samym komputerze - web serwera, to musi on działać i być skonfigurowany do obsługi katalogu<br><strong>%s</strong><br> jako swego katalogu głównego. Zatem, w swym lokalnym rzeczywistym web serwerze (jak Apache, Nginx, IIS) dla każdej swej web witryny utwórz i skonfiguruj wirtualny web serwer, po czym podaj jego nazwę i kliknij na inny przycisk do podglądu. +PreviewSiteServedByDolibarr= <u> Podgląd %s w nowej karcie. </u> <br> <br> Serwer %s będzie obsługiwany przez serwer Dolibarr, więc nie jest potrzebny żaden dodatkowy serwer WWW (taki jak Apache, Nginx, IIS) do zainstalowania. <br> Niedogodnością jest to, że adresy URL stron nie są przyjazne dla użytkownika i zaczynają się od ścieżki do Twojego Dolibarra. <br> URL podawane przez Dolibarr: <br> <strong> %s </strong> <br> <br> Aby korzystać z własnego serwera zewnętrznego internetowej, aby służyć tej strony internetowej, stworzenie wirtualnego hosta na serwerze WWW, które punkty na katalogu <br> <strong> %s </strong> <br> następnie wprowadź nazwę tego serwera wirtualnego we właściwościach tej witryny i kliknij łącze „Przetestuj / Wdróż w sieci”. VirtualHostUrlNotDefined=Adres URL wirtualnego hosta obsługiwanego przez zewnętrzny web serwer nie został zdefiniowany NoPageYet=Brak stron YouCanCreatePageOrImportTemplate=Możesz utworzyć nową stronę albo załadować pełny szablon witryny SyntaxHelp=Pomoc na temat określonych wskazówek dotyczących składni YouCanEditHtmlSourceckeditor=Możesz edytować kod źródłowy HTML używając przycisku „Źródło” w edytorze. -YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br> +YouCanEditHtmlSource= <br> <span class="fa fa-bug"> </span> Możesz dołączyć kod PHP do tego źródła za pomocą tagów <strong> &lt;? php? &gt; </strong>. Dostępne są następujące zmienne globalne: $ conf, $ db, $ mysoc, $ user, $ website, $ websitepage, $ weblangs, $ pagelangs. <br> <br> <span class="fa fa-bug"> </span> Możesz także dołączyć zawartość innej strony / kontenera o następującej składni: <br> <strong> a03900aindf7d31Contiaser? ? &gt; </strong> <br> <br> <span class="fa fa-bug"> </span> Można zrobić przekierowanie do innej strony / pojemnik z następującą składnią (Uwaga: Nie Wyjście jakiejkolwiek zawartości przed przekierowaniem): <br> <strong> &lt; php redirectToContainer ( 'alias_of_container_to_redirect_to'); ? &gt; </strong> <br> <br> <span class="fa fa-link"> </span> Aby dodać link do innej strony, użyj składni: <br> <strong> &lt;a href = "alias_of_page_to_link_to.php" &gt;mylink&lt;a&gt; </strong> <br> <br> <span class="fa fa-download"> </span> Aby umieścić link do pobrania </strong> <strong> pliku zapisanego w dokumentach <strong> </strong>, użyj <strong> document.php </strong> wrapper: <br> Przykład, dla pliku w dokumentach / ecm (należy zarejestrować), składnia jest następująca: a0342fcccfdae19bz039 = <br> ] nazwa_pliku.ext "&gt; </strong> <br> Dla pliku w dokumentach / mediach (otwarty katalog dla publicznego dostępu) składnia jest następująca: <br> <strong> a03900dfred31ecz "/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt; </strong> <br> W przypadku pliku udostępnionego za pomocą linku do udostępniania (otwarty dostęp za pomocą klucza współdzielenia hashf pliku: </strong> <br>), dla pliku udostępnionego za pomocą linku do udostępniania (otwarty dostęp przy użyciu klucza współdzielenia hashf pliku: </strong> <br>). /document.php?hashp=publicsharekeyoffile"&gt; </strong> <br> <br> <span class="fa fa-picture-o"> </span> Aby to </strong> <strong> obrazu zapisane do tych <strong> dokumentów </strong>, za pomocą przycisków <strong> viewimage.php </strong> owijający: <br> przykład w przypadku obrazu do dokumentów / media (otwarte katalog dla dostępu publicznego), składnia jest następująca: <br> <strong> &lt;img src = "/ viewimage.php? modulepart = medias&amp;file = [katalog_względny /] nazwa_pliku.ext" a0065c2c071 "a0065c2c071" a0087c2c071 #YouCanEditHtmlSource2=<br><span class="fa fa-picture-o"></span> To include a <strong>image</strong> shared publicaly, use the <strong>viewimage.php</strong> wrapper:<br>Example with a shared key 123456789, syntax is:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> -YouCanEditHtmlSourceMore=<br>More examples of HTML or dynamic code available on <a href="%s" target="_blank">the wiki documentation</a><br>. +YouCanEditHtmlSource2=W przypadku obrazu udostępnionego za pomocą linku do udostępniania (otwarty dostęp przy użyciu klucza współdzielenia skrótu pliku) składnia jest następująca: <br> <strong> &lt;img src = "/ viewimage.php? Hashp = 12345679012 ..." a0012c7dcbe087c65z071 +YouCanEditHtmlSourceMore= <br> Więcej przykładów kodu HTML lub dynamicznego dostępnych w <a href="%s" target="_blank"> dokumentacji wiki </a> <br>. ClonePage=Powiel stronę/pojemnik CloneSite=Duplikuj stronę SiteAdded=Dodano witrynę @@ -80,7 +80,7 @@ BlogPost=Post na blogu WebsiteAccount=Konto witryny WebsiteAccounts=Konta witryny AddWebsiteAccount=Utwórz konto witryny -BackToListForThirdParty=Back to list for the third-party +BackToListForThirdParty=Powrót do listy dla firmy zewnętrznej DisableSiteFirst=Najpierw wyłącz witrynę MyContainerTitle=Tytuł mojej witryny AnotherContainer=W ten sposób można dołączyć zawartość innej web strony/pojemnika (może pojawić się błąd, gdy włączysz obsługę kodu dynamicznego a wbudowany podrzędny pojemnik nie istnieje) @@ -88,7 +88,7 @@ SorryWebsiteIsCurrentlyOffLine=Przepraszamy, ta witryna jest obecnie niedostępn WEBSITE_USE_WEBSITE_ACCOUNTS=Włącz tabelę kont witryny WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Włącz tabelę kont witryny (login/hasło) dla każdej witryny/strony trzeciej YouMustDefineTheHomePage=Najpierw musisz zdefiniować domyślną stronę główną -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.<br>Note also that the inline editor may not works correclty when used on a grabbed external page. +OnlyEditionOfSourceForGrabbedContentFuture=Ostrzeżenie: Tworzenie strony internetowej poprzez importowanie zewnętrznej strony internetowej jest zarezerwowane dla doświadczonych użytkowników. W zależności od złożoności strony źródłowej, wynik importu może różnić się od oryginału. Również jeśli strona źródłowa używa typowych stylów CSS lub konfliktu JavaScript, może to zakłócić wygląd lub funkcje edytora Witryny podczas pracy na tej stronie. Ta metoda jest szybszym sposobem tworzenia strony, ale zaleca się utworzenie nowej strony od podstaw lub na podstawie sugerowanego szablonu strony. <br> Należy również zauważyć, że wbudowany edytor może nie działać poprawnie, gdy jest używany na przechwyconej stronie zewnętrznej. OnlyEditionOfSourceForGrabbedContent=Po zaciągnięciu zawartości z zewnętrznej web witryny możliwa jest jedynie edycja kodu źródłowego HTML GrabImagesInto=Przechwyć także obrazy znalezione w CSS i na stronie. ImagesShouldBeSavedInto=Obrazy powinny być zapisane w katalogu @@ -100,7 +100,7 @@ EmptyPage=Pusta strona ExternalURLMustStartWithHttp=Zewnętrzny adres URL musi zaczynać się od http:// lub https:// ZipOfWebsitePackageToImport=Prześlij plik Zip pakietu szablonu witryny ZipOfWebsitePackageToLoad=lub Wybierz jakiś dostępny wbudowany pakiet szablonu web witryny -ShowSubcontainers=Show dynamic content +ShowSubcontainers=Pokaż zawartość dynamiczną InternalURLOfPage=Wewnętrzny adres URL strony ThisPageIsTranslationOf=Ta strona/pojemnik to tłumaczenie ThisPageHasTranslationPages=Ta strona/pojemnik ma tłumaczenie @@ -115,7 +115,7 @@ MyWebsitePages=Strony mej witryny SearchReplaceInto=Szukaj | Zamień na ReplaceString=Nowy łańcuch CSSContentTooltipHelp=Tu wprowadź kod CSS. W celu uniknięcia konfliktu tego kodu z kodem CSS aplikacji, każdą wprowadzoną tu deklarację poprzedź prefiksem .bodywebsite. Na przykład:<br><br>#mycssselector, input.myclass:hover { ... }<br>zamień na <br>.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }<br><br>Uwaga: Jeżeli masz duży plik z deklaracjami bez tego prefiksu, to możesz użyć 'lessc' do ich konwersji na nowe, poprzedzone prefiksem. -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. +LinkAndScriptsHereAreNotLoadedInEditor=Ostrzeżenie: ta zawartość jest wyprowadzana tylko wtedy, gdy witryna jest uzyskiwana z serwera. Nie jest używany w trybie edycji, więc jeśli chcesz załadować pliki javascript również w trybie edycji, po prostu dodaj swój tag „script src = ...” do strony. Dynamiccontent=Próbka web strony z dynamiczną zawartością ImportSite=Załaduj szablon witryny EditInLineOnOff=Tryb „Edytuj w linii” jest %s @@ -123,17 +123,25 @@ ShowSubContainersOnOff=Tryb wykonywania „zawartości dynamicznej” jest %s GlobalCSSorJS=Globalny plik CSS/JS/Header witryny BackToHomePage=Powrót do strony głównej... TranslationLinks=Linki do tłumaczeń -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.<br>(ref=%s, type=%s, status=%s) +YouTryToAccessToAFileThatIsNotAWebsitePage=Próbujesz uzyskać dostęp do strony, która nie jest dostępna. <br> (ref = %s, typ = %s, status = %s) UseTextBetween5And70Chars=Aby uzyskać dobre praktyki SEO, użyj tekstu od 5 do 70 znaków -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 +MainLanguage=Główny język +OtherLanguages=Inne języki +UseManifest=Podaj plik manifest.json +PublicAuthorAlias=Pseudonim autora publicznego +AvailableLanguagesAreDefinedIntoWebsiteProperties=Dostępne języki są zdefiniowane we właściwościach witryny +ReplacementDoneInXPages=Zamiana wykonana na stronach lub kontenerach %s 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 -RegenerateWebsiteContent=Regenerate web site cache files -AllowedInFrames=Allowed in Frames -DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +RSSFeedDesc=Korzystając z tego adresu URL, możesz uzyskać kanał RSS z najnowszymi artykułami typu „post na blogu” +PagesRegenerated=%s strony / kontenery zostały ponownie wygenerowane +RegenerateWebsiteContent=Zregeneruj pliki pamięci podręcznej witryny internetowej +AllowedInFrames=Dozwolone w ramkach +DefineListOfAltLanguagesInWebsiteProperties=Zdefiniuj listę wszystkich dostępnych języków we właściwościach witryny internetowej. +GenerateSitemaps=Wygeneruj plik mapy witryny internetowej +ConfirmGenerateSitemaps=Jeśli potwierdzisz, usuniesz istniejący plik mapy witryny ... +ConfirmSitemapsCreation=Potwierdź wygenerowanie mapy witryny +SitemapGenerated=Wygenerowano mapę witryny +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/pl_PL/zapier.lang b/htdocs/langs/pl_PL/zapier.lang index bbad7895588..da9769a9faa 100644 --- a/htdocs/langs/pl_PL/zapier.lang +++ b/htdocs/langs/pl_PL/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' -ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr -ZapierDescription=Interface with Zapier +ModuleZapierForDolibarrName = Zapier dla Dolibarr +ModuleZapierForDolibarrDesc = Zapier dla modułu Dolibarr +ZapierForDolibarrSetup=Konfiguracja Zapier dla Dolibarr +ZapierDescription=Interfejs z Zapier +ZapierAbout=O module Zapier +ZapierSetupPage=Nie ma potrzeby instalacji po stronie Dolibarr, aby używać Zapier. Jednak musisz wygenerować i opublikować pakiet na Zapier, aby móc używać Zapier z Dolibarr. Zobacz dokumentację <a href="https://wiki.dolibarr.org/index.php/Module_Zapier"> na tej stronie wiki </a>. diff --git a/htdocs/langs/pt_AO/admin.lang b/htdocs/langs/pt_AO/admin.lang new file mode 100644 index 00000000000..cac0d063f48 --- /dev/null +++ b/htdocs/langs/pt_AO/admin.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - admin +ShowBugTrackLink=Show link "<strong>%s</strong>" diff --git a/htdocs/langs/pt_BR/accountancy.lang b/htdocs/langs/pt_BR/accountancy.lang index e4b7f6b2454..b169f140496 100644 --- a/htdocs/langs/pt_BR/accountancy.lang +++ b/htdocs/langs/pt_BR/accountancy.lang @@ -11,10 +11,14 @@ ACCOUNTING_EXPORT_FORMAT=Selecione o formato do arquivo ACCOUNTING_EXPORT_ENDLINE=Selecione o tipo de retorno do frete ACCOUNTING_EXPORT_PREFIX_SPEC=Especifique o prefixo do nome do arquivo DefaultForService=Padrão para serviço +ProductForThisThirdparty=Produto para este terceiro +ServiceForThisThirdparty=Serviço para este terceiro CantSuggest=Não posso sugerir AccountancySetupDoneFromAccountancyMenu=A maioria das configurações da Contabilidade é feita a partir do menu %s +ConfigAccountingExpert=Configuração do módulo de contabilidade (dupla entrada) Journalization=Lançamento no Livro Chartofaccounts=Plano de contas +ChartOfSubaccounts=Plano de contas individuais InvoiceLabel=Rótulo da fatura OverviewOfAmountOfLinesNotBound=Visão geral do montante das linhas não vinculadas a uma conta contábil OverviewOfAmountOfLinesBound=Visão geral do montante das linhas já vinculadas a uma conta contábil @@ -22,6 +26,8 @@ DeleteCptCategory=Remover conta contábil do grupo ConfirmDeleteCptCategory=Tem certeza de que deseja remover essa conta contábil do grupo de contas contábeis? JournalizationInLedgerStatus=Situação do registro do diário GroupIsEmptyCheckSetup=O grupo está vazio, verifique a configuração do grupo de contabilidade personalizado +AccountantFiles=Exportar documentos de origem +VueByAccountAccounting=Ver por conta contábil MainAccountForCustomersNotDefined=Conta contábil principal para clientes não definidos na configuração MainAccountForUsersNotDefined=Conta contábil principal para usuários não definidos na configuração MainAccountForVatPaymentNotDefined=Conta contábil principal para o pagamento do IVA não definido na configuração @@ -77,7 +83,6 @@ InvoiceLinesDone=Linhas das faturas vinculadas ExpenseReportLines=Relatórios de linhas de despesas obrigatórias ExpenseReportLinesDone=Relatórios de linhas de despesas vinculadas IntoAccount=Vincular linha com conta contábil -TotalForAccount=Total para conta contábil LineId=Linha da ID Processing=Processando EndProcessing=Processo foi finalizado. diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 74da419d9fb..eb7f48d64ed 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -33,6 +33,7 @@ UnlockNewSessions=Remover Bloqueio de Conexão YourSession=Sua Sessão Sessions=Sessões de Usuários WebUserGroup=Servidor Web para usuário/grupo +PermissionsOnFiles=Permissões em arquivos PermissionsOnFilesInWebRoot=Permissões em arquivos no diretório raiz da web PermissionsOnFile=Permissões no arquivo %s NoSessionFound=Sua configuração do PHP parece não permitir listar as sessões ativas. O diretório usado para salvar sessões (<b>%s</ b>) pode estar protegido (por exemplo, pelas permissões do sistema operacional ou pela diretiva PHP "open_basedir"). @@ -50,10 +51,13 @@ InternalUsers=Usuários Internos ExternalUsers=Usuários Externos UploadNewTemplate=Carregar novo(s) tema(s) FormToTestFileUploadForm=Formulário para teste de upload de arquivo +ModuleMustBeEnabled=O módulo/aplicação <b>%s</b> deve ser ativado +ModuleIsEnabled=O modulo/aplicação <b>%s</b> foi ativado IfModuleEnabled=OBS: Sim só é eficaz se o módulo <b>%s</b> estiver ativado RemoveLock=Remove/renomeia o arquivo <b> %s </b> se existir, para permitir o uso da ferramenta atualização/instalação. RestoreLock=Restaura o arquivo <b>%s</b>, com permissão de leitura, para desabilitar qualquer serviço de atualização/instalação SecuritySetup=Conf. de Segurança +PHPSetup=Configuração do PHP SecurityFilesDesc=Defina aqui as opções relacionadas à segurança sobre o carregamento (upload) de arquivos. ErrorModuleRequirePHPVersion=Erro, este módulo requer uma versão %s ou superior de PHP ErrorModuleRequireDolibarrVersion=Erro, este módulo requer uma versão %s ou superior do Dolibarr @@ -65,12 +69,14 @@ DisableJavascript=Desativar as funções Javascript e AJax DisableJavascriptNote=Obs.: Para propósitos de teste ou depuração. Para otimização de cegos ou navegadores de texto, é preferível usar a configuração do perfil do usuário UseSearchToSelectCompanyTooltip=Além disso, se você tem um grande número de terceiros (> 100 000), você pode aumentar a velocidade, definindo COMPANY_DONOTSEARCH_ANYWHERE constante a 1 em Setup-> Outro. Busca, então, ser limitada até o início da string. UseSearchToSelectContactTooltip=Além disso, se você tem um grande número de terceiros (> 100 000), você pode aumentar a velocidade, definindo CONTACT_DONOTSEARCH_ANYWHERE constante a 1 em Setup-> Outro. Busca, então, ser limitada até o início da string. +DelaiedFullListToSelectContact=Aguarde até que uma tecla seja pressionada antes de carregar o conteúdo da lista de combinação de contatos. <br> Isso pode aumentar o desempenho se você tiver um grande número de contatos, mas é menos conveniente. NumberOfBytes=Número de Bytes SearchString=Seqüência de pesquisa NotAvailableWhenAjaxDisabled=Indisponível quando o Ajax esta desativado AllowToSelectProjectFromOtherCompany=No documento de um terceiro, pode-se escolher um projeto conectado a outro terceiro UsePreviewTabs=Usar previsão de digitação na tecla 'tab' ShowPreview=Mostrar Previsão +ShowHideDetails=Mostrar-ocultar detalhes PreviewNotAvailable=Previsão Indisponível ThemeCurrentlyActive=Tema Ativo MySQLTimeZone=Timezone Mysql (do servidor sql) @@ -122,6 +128,8 @@ SystemToolsAreaDesc=Essa área dispõem de funções administrativas. Use esse m Purge=Purgar (apagar tudo) PurgeAreaDesc=Esta página permite deletar todos os arquivos gerados ou armazenados pelo Dolibarr (arquivos temporários ou todos os arquivos no diretório <b>%s</b>). Este recurso é fornecido como uma solução alternativa aos usuários cujo a instalação esteja hospedado num servidor que impeça o acesso as pastas onde os arquivos gerados pelo Dolibarr são armazenados, para excluí-los. PurgeDeleteLogFile=Excluir os arquivos de registro, incluindo o <b>%s</b> definido pelo módulo Syslog (não há risco de perda de dados) +PurgeDeleteTemporaryFiles=Exclua todos os arquivos de log e temporários (sem risco de perda de dados). O parâmetro pode ser 'tempfilesold', 'logfiles' ou ambos 'tempfilesold + logfiles'. Nota: A exclusão de arquivos temporários é feita apenas se o diretório temporário foi criado há mais de 24 horas. +PurgeDeleteTemporaryFilesShort=Excluir arquivos de registro e temporários PurgeDeleteAllFilesInDocumentsDir=Eliminar todos os arquivos do diretório <b>%s</b>. Isto irá excluir todos documentos (Terceiros, faturas, ...), arquivos carregados no módulo ECM, Backups e arquivos temporários PurgeRunNow=Purgar(Apagar) Agora PurgeNothingToDelete=Sem diretório ou arquivos para excluir @@ -179,6 +187,7 @@ BoxesAvailable=Widgets disponíveis BoxesActivated=Widgets ativados ActivateOn=Ativar ActiveOn=Ativa +ActivatableOn=Ativável em SourceFile=Arquivo Fonte AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponível somente se Javascript não estiver desativado UsedOnlyWithTypeOption=Usado por alguns opção agenda única @@ -197,6 +206,7 @@ OfficialWebHostingService=Serviços de hospedagem web referenciados (hospedagem ReferencedPreferredPartners=Parceiro preferido ExternalResources=Fontes externas SocialNetworks=Redes Sociais +SocialNetworkId=ID da rede social ForDocumentationSeeWiki=Documentos para usuários e desenvolvedores (Doc, FAQs...), <br>de uma olhada no Dolibarr Wiki:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Para outras questões/ajudas, você pode usar o forum do Dolibar:<br><b><a href="%s" target="_blank">%s</a></b> CurrentMenuHandler=Gestor atual de menu @@ -248,8 +258,6 @@ LastActivationAuthor=Último autor da ativação LastActivationIP=Último IP de ativação UpdateServerOffline=Atualização de servidor off-line WithCounter=Gerenciar um contador -GenericMaskCodes=Você pode criar suas próprias mascaras para gerar as referências automáticas.<br> Como exemplo inicial a mascara <b>'CLI{000}'</b> vai gerar a ref. <b>CLI001</b>,<b>CLI002</b>,<b>...</b> as mascaras são:<br>Mascara de contagem <b>{0000}</b>, essa mascara vai contar para cada nova ref. ex:<b>0001</b>,<b>0002</b>,<b>0003</b>,<b>...</b><br>Mascara de número inicial ex:<b>{000+100}</b> -> <b>101</b>,<b>102</b>,<b>103</b>,<b>...</b> ex2:<b>{0000+123}</b> -> <b>0124</b>,<b>0125</b>,<b>...</b><br>Mascara da data <b>{dd}</b> dias (01 a 31), <b>{mm}</b> mês (01 a 12), <b>{yy} {yyyy}</b> para anos ex:<b>{dd}/{mm}/{yy}</b> -> <b>28/07/15</b><br> -GenericMaskCodes2=<b> {cccc} </b> o código do cliente em n caracteres <br> <b> {cccc000} </b> o código do cliente em n caracteres é seguido por um contador dedicado ao cliente. Este contador dedicado ao cliente é reiniciado ao mesmo tempo que o contador global. <br> <b> {tttt} </b> O código de tipo de terceiros em n caracteres (consulte o menu Início - Configuração - Dicionário - Tipos de terceiros) . Se você adicionar esta etiqueta, o contador será diferente para cada tipo de terceiro.<br> GenericMaskCodes3=Não é permitido espaços. <br>Mascara fixa, basta colocar uma letra ou número sem <b>{}</b> ex:<b>CLI</b>,<b>FOR</b></b><br> GenericMaskCodes4a=<u>Exemplo com o 99º %s do terceiro ACompanhia, com data 2007-01-31:</u><br> GenericMaskCodes4b=Ex: CLI{dd}{mm}{yy}.{000} -> <b>CLI280715.001</b><br> @@ -294,6 +302,7 @@ UrlGenerationParameters=Parâmetros para URLs de segurança SecurityTokenIsUnique=Usar um único parâmetro na chave de segurança para cada URL EnterRefToBuildUrl=Entre com a referência do objeto %s GetSecuredUrl=Conseguir URL calculada +ButtonHideUnauthorized=Ocultar botões de ação não autorizados também para usuários internos (caso contrário, acinzentados) OldVATRates=Taxa de ICMS antiga NewVATRates=Taxa de ICMS nova PriceBaseTypeToChange=Modificar os preços com base no valor de referência defino em @@ -318,7 +327,6 @@ ComputedpersistentDesc=Campos extra computados serão armazenados no banco de da ExtrafieldParamHelpselect=Lista de valores deve ser linhas com chave de formato, valor (onde a chave não pode ser '0') <br><br> por exemplo: <br> 1, value1 <br> 2, value2 <br> código3, valor3 <br>...<br><br> Para que a lista dependa de outra lista de atributos complementares: <br> 1, valor1 | <i>opções_ pai_list_code</i> : parent_key <br> 2, valor2 | <i>opções_ pai_list_code</i> : parent_key <br><br> Para ter a lista dependendo de outra lista: <br> 1, valor1 | <i>parent_list_code</i> : parent_key <br> 2, value2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=Lista de valores deve ser linhas com chave de formato, valor (onde a chave não pode ser '0') <br><br> por exemplo: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... ExtrafieldParamHelpradio=Lista de valores deve ser linhas com chave de formato, valor (onde a chave não pode ser '0') <br><br> por exemplo: <br> 1, value1 <br> 2, value2 <br> 3, value3 <br> ... -ExtrafieldParamHelpchkbxlst=Lista de valores vem de uma tabela <br> Sintaxe: table_name: label_field: id_field :: filter <br> Exemplo: c_typent: libelle: id :: filter <br><br> filtro pode ser um teste simples (por exemplo, ativo = 1) para exibir apenas o valor ativo <br> Você também pode usar $ID$ no filtro que é o ID atual do objeto atual <br> Para fazer um SELECT no filtro use $SEL$ <br> se você quiser filtrar em extrafields use a sintaxe extra.fieldcode = ... (onde o código de campo é o código do campo extra) <br><br> Para que a lista dependa de outra lista de atributos complementares: <br> c_typent: libelle: id: options_ <i>parent_list_code</i> | parent_column: filter <br><br> Para ter a lista dependendo de outra lista: <br> c_typent: libelle: id: <i>parent_list_code</i> | parent_column: filter ExtrafieldParamHelpSeparator=Mantenha em branco para um separador simples<br>Defina como 1 para um separador de recolhimento (aberto por padrão para nova sessão e, em seguida, o status é mantido para cada sessão do usuário)<br> Defina como 2 para um separador de recolhimento (recolhido por padrão para nova sessão e, em seguida, o status é mantido antes de cada sessão do usuário) LibraryToBuildPDF=Biblioteca usada para a geração de PDF LocalTaxDesc=Alguns países podem aplicar dois ou três impostos em cada linha da fatura. Se este for o caso, escolha o tipo para o segundo e terceiro imposto e sua taxa. Tipo possível são: <br> 1: imposto local aplicável a produtos e serviços sem IVA (a taxa local é calculada sobre o valor sem impostos) <br> 2: imposto local aplicável a produtos e serviços, incluindo IVA (a taxa local é calculada no montante + imposto principal) <br> 3: imposto local aplicável a produtos sem IVA (a taxa local é calculada sobre o valor sem impostos) <br> 4: imposto local aplicável a produtos, incluindo IVA (a taxa local é calculada sobre o valor + IVA principal) <br> 5: imposto local aplicável a serviços sem IVA (a taxa local é calculado sobre o valor sem impostos) <br> 6: imposto local aplicável a serviços, incluindo IVA (a taxa local é calculada sobre o valor + imposto) @@ -387,6 +395,7 @@ Module40Name=Vendedores Module40Desc=Fornecedores e gerenciamento de compras (pedidos e cobrança de faturas de fornecedores) Module42Name=Notas de depuração Module42Desc=Recursos de registro (arquivo, syslog, ...). Tais registros são para propósitos técnicos/debug. +Module43Name=Barra de depuração Module49Desc=Gestor de Editores Module51Name=Cartas Massivos Module51Desc=Gestão de correspondência do massa @@ -448,11 +457,11 @@ Module2660Name=Chamar ServiçosWeb (cliente SOAP) Module2660Desc=Ativar o cliente de serviços da Web Dolibarr (pode ser usado para enviar dados/solicitações para servidores externos. Apenas pedidos de compra são suportados no momento.) Module2700Desc=Use o serviço online Gravatar (www.gravatar.com) para mostrar fotos de usuários/membros (encontrados com seus e-mails). Precisa de acesso à Internet Module2900Desc=Capacidade de conversão com o GeoIP Maxmind +Module3400Name=Redes Sociais Module4000Name=RH Module4000Desc=Gerenciamento de recursos humanos (gerenciamento do departamento, contratos dos funcionários e benefícios) Module5000Name=Multi-Empresas Module5000Desc=Permite gerenciar várias empresas -Module6000Name=Fluxo de Trabalho Module10000Desc=Crie sites (públicos) com um editor WYSIWYG. Este é um CMS orientado a webmasters ou desenvolvedores (é melhor conhecer a linguagem HTML e CSS). Basta configurar seu servidor da Web (Apache, Nginx, ...) para apontar para o diretório Dolibarr dedicado para colocá-lo online na Internet com seu próprio nome de domínio. Module20000Name=Deixar o gerenciamento de solicitações Module20000Desc=Definir e rastrear solicitações de saída de funcionários @@ -580,7 +589,6 @@ PermissionAdvanced253=Criar/Modificar Usuários internos/externos e suas Permiss Permission254=Criar/Modificar Usuários Externos Permission255=Modificar Senha de Outros Usuários Permission256=Deletar ou Desativar Outros Usuários -Permission262=Estender o acesso a todos os terceiros (não apenas terceiros para os quais esse usuário é um representante de vendas). <br> Não é eficaz para usuários externos (sempre limitados a eles próprios para propostas, pedidos, faturas, contratos, etc.). <br> Não é eficaz para projetos (apenas regras sobre permissões de projeto, visibilidade e atribuição de tarefas). Permission271=Ler CA Permission272=Ler Faturas Permission273=Emitir Fatura @@ -611,6 +619,8 @@ Permission402=Criar/Modificar Descontos Permission403=Validar Descontos Permission404=Excluir Descontos Permission430=Use a barra de depuração +Permission511=Ler pagamentos de salários (seus e subordinados) +Permission517=Ler pagamentos de salários de todos Permission519=Salários de exportação Permission520=Leia Empréstimos Permission522=Criar / modificar empréstimos @@ -622,9 +632,19 @@ Permission532=Criar/Modificar Serviços Permission534=Excluir Serviços Permission536=Ver/gerenciar Serviços Ocultos Permission538=Exportar Serviços +Permission561=Ler ordens de pagamento por transferência de crédito +Permission562=Criar / alterar ordem de pagamento por transferência de crédito +Permission563=Enviar / Transmitir ordem de pagamento por transferência de crédito +Permission564=Registrar débitos / rejeições de transferência de crédito +Permission601=Ler adesivos +Permission602=Criar / alterar adesivos +Permission609=Excluir adesivos Permission650=Leia as listas de materiais Permission651=Criar / atualizar listas de materiais Permission652=Excluir listas de materiais +Permission660=Ler pedido de fabricação (MO) +Permission661=Criar / Atualizar Pedido de Fabricação (MO) +Permission662=Excluir Ordem de Fabricação (MO) Permission701=Ler Doações Permission702=Criar/Modificar Doações Permission703=Excluir Doações @@ -634,6 +654,8 @@ Permission773=Excluir relatórios de despesas Permission774=Leia todos os relatórios de despesas (mesmo para o utilizadores Não subordinados) Permission775=Aprovar os relatórios de despesas Permission776=Relatórios de despesas pagas +Permission777=Ler relatórios de despesas de todos +Permission778=Criar / alterar relatórios de despesas de todos Permission779=Exportar - Relatórios de despesas Permission1001=Ler Estoques Permission1002=Criar/Modificar Estoques @@ -656,7 +678,9 @@ Permission1185=Aprovar pedidos Permission1186=Encomenda de pedidos Permission1187=Reconhecer o recebimento de pedidos de compra Permission1188=Excluir pedidos +Permission1189=Marque / desmarque a recepção de um pedido de compra Permission1190=Aprovar pedidos de compra (segunda aprovação) +Permission1191=Exportar pedidos de fornecedores e seus atributos Permission1201=Conseguir Resultado de uma Exportação Permission1202=Criar/Modificar uma Exportação Permission1231=Ler faturas de fornecedores @@ -667,6 +691,8 @@ Permission1236=Exportar faturas, atributos e pagamentos do fornecedor Permission1251=Rodar(run) Importações Massivas de Dados Externos para o Banco de Dados (carregamento de dados) Permission1321=Exportar Faturas de Clientes, Atributos e Pagamentos Permission1322=Reabrir uma nota paga +Permission1521=Ler documentos +Permission1522=Excluir documentos Permission2401=Ler ações (eventos ou tarefas) vinculadas à sua conta de usuário (se o proprietário do evento ou apenas tiver sido atribuído a) Permission2402=Criar / modificar ações (eventos ou tarefas) vinculadas à sua conta de usuário (se for proprietário do evento) Permission2403=Excluir ações (eventos ou tarefas) vinculadas à sua conta de usuário (se for proprietário do evento) @@ -681,6 +707,7 @@ Permission2515=Configurar Diretórios dos Documentos Permission2801=Usar cliente FTP no modo leitura (somente navegador e baixar) Permission2802=Usar cliente FTP no modo escrita (deletar ou upload de arquivos) Permission3200=Leia eventos arquivados e impressões digitais +Permission3301=Gerar novos módulos Permission4001=Visualizar funcionários Permission4002=Criar funcionários Permission4003=Excluir funcionários @@ -700,8 +727,13 @@ Permission23001=Ler Tarefas Agendadas Permission23002=Criar/Atualizar Tarefas Agendadas Permission23003=Excluir Tarefas Agendadas Permission23004=Executar Tarefas Agendadas +Permission50101=Ponto de venda de uso (SimplePOS) +Permission50151=Ponto de venda de uso (TakePOS) Permission50201=Ler Transações Permission50202=Importar Transações +Permission50330=Leia objetos de Zapier +Permission50331=Criar / atualizar objetos de Zapier +Permission50332=Excluir objetos de Zapier Permission50401=Vincular produtos e faturas com contas contábeis Permission50411=Ler operações no livro de registros Permission50412=Gravar/ edirar operações no livro de registros @@ -723,6 +755,17 @@ Permission63001=Ler recursos Permission63002=Criar/Modificar recursos Permission63003=Excluir recursos Permission63004=Conectar os recursos aos eventos da agenda +Permission64001=Permitir impressão direta +Permission67000=Permitir impressão de recibos +Permission68001=Ler o relatório intracomm +Permission68002=Criar / alterar relatório intracomm +Permission68004=Excluir relatório intracomm +Permission941601=Ler recibos +Permission941602=Criar e modificar recibos +Permission941603=Validar recibos +Permission941604=Enviar recibos por e-mail +Permission941605=Exportar recibos +Permission941606=Excluir recibos DictionaryCompanyType=Tipos de terceiros DictionaryCompanyJuridicalType=Entidades jurídicas de terceiros DictionaryProspectLevel=Nível potencial de prospecção para empresas @@ -753,6 +796,8 @@ DictionaryMeasuringUnits=Unidades de Medição DictionarySocialNetworks=Redes Sociais DictionaryProspectStatus=Status em potencial para empresas DictionaryProspectContactStatus=Status do cliente potencial para contatos +DictionaryTransportMode=Relatório intracomm - modo de transporte +TypeOfUnit=Tipo de unidade SetupSaved=Configurações Salvas SetupNotSaved=Configuração não salva BackToModuleList=Voltar à lista do módulo @@ -781,6 +826,7 @@ CalcLocaltax3Desc=Relatorio de taxas locais e o total de taxas locais de vendas LabelUsedByDefault=Etiqueta usado por default se nenhuma tradução não for encontrado para o código =/ LabelOnDocuments=Etiqueta nos documentos ValueOfConstantKey=Valor de uma constante de configuração +ConstantIsOn=A opção %s está ativada NbOfDays=Número de dias CurrentNext=Atual/Próxima Offset=Compensar @@ -813,6 +859,7 @@ MessageOfDay=Mensagem do dia MessageLogin=Mensagem da página de login LoginPage=Página de login PermanentLeftSearchForm=Formulário permanente de pesquisa no menu esquerdo +EnableMultilangInterface=Habilitar suporte multilíngue para relacionamentos com clientes ou fornecedores EnableShowLogo=Mostrar o logotipo da empresa no menu CompanyInfo=Empresa / Organização CompanyIds=Identidades da empresa / organização @@ -837,11 +884,13 @@ Delays_MAIN_DELAY_EXPENSEREPORTS=Relatório de despesas para aprovar Delays_MAIN_DELAY_HOLIDAYS=Solicitações de Licenças para aprovar SetupDescription2=As duas seções a seguir são obrigatórias (as duas primeiras entradas no menu de configuração): SetupDescription5=Outras entradas do menu de configuração gerenciam parâmetros opcionais. -LogEvents=Auditoría de segurança dos eventos +AuditedSecurityEvents=Eventos de segurança que são auditados +NoSecurityEventsAreAduited=Nenhum evento de segurança é auditado. Você pode habilitá-los no menu %s Audit=Auditoría InfoOS=Sobre o SO InfoDatabase=Sobre o banco de dados InfoPerf=Sobre Desempenhos +InfoSecurity=Sobre Segurança BrowserOS=Navegador OS ListOfSecurityEvents=Lista de eventos de segurança do Dolibarr SecurityEventsPurged=Eventos de segurança foram purgados(apagados) @@ -882,12 +931,13 @@ RestoreDesc2=Restaure o arquivo de backup (arquivo zip, por exemplo) do diretór RestoreDesc3=Restaure a estrutura do banco de dados e os dados de um arquivo de despejo de backup no banco de dados da nova instalação do Dolibarr ou no banco de dados desta instalação atual ( <b>%s</b> ). Atenção, assim que a restauração for concluída, você deverá usar um login / senha, que existiu a partir do momento / instalação do backup para se conectar novamente. <br> Para restaurar um banco de dados de backup nesta instalação atual, você pode seguir este assistente. RestoreMySQL=Importar MySQL ForcedToByAModule=Essa Regra é forçada para <b>%s</b> by um módulo ativado +ValueIsForcedBySystem=Este valor foi forçado pelo sistema. Não é permito alterar. PreviousArchiveFiles=Arquivos existentes RunningUpdateProcessMayBeRequired=A execução do processo de atualização parece ser necessária (a versão do programa %s é diferente da versão do banco de dados %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Você deve rodar esse comando na linha de comando (CLI) depois de logar no shell com o usuário <b>%s</b> ou você deve adicionar a opção -W no final da linha de comando para fornecer a senha <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Função SSL functions não está disponível no seu PHP DownloadMoreSkins=Mais skins para baixar -SimpleNumRefModelDesc=Retorna o número de referência com o formato %syymm-nnnn onde yy é ano, mm é mês e nnnn é sequencial sem reset +SimpleNumRefModelDesc=Retorna o número de referência no formato %s yymm-nnnn onde yy é o ano, mm é o mês e nnnn é um número de incremento automático sequencial sem redefinição ShowProfIdInAddress=Mostrar ID profissional com endereços ShowVATIntaInAddress=Ocultar o número de IVA intracomunitário com endereços MeteoStdModEnabled=Modo padrão habilitado @@ -899,7 +949,7 @@ ExternalAccess=Acesso Externo/Internet MAIN_PROXY_USE=Use um servidor proxy (caso contrário, o acesso é direto à internet) MAIN_PROXY_HOST=Servidor proxy: nome/endereço MAIN_PROXY_USER=Servidor Proxy: Login/Usuário -DefineHereComplementaryAttributes=Defina aqui quaisquer atributos adicionais/personalizados que você deseja incluir: %s +DefineHereComplementaryAttributes=Definir quaisquer atributos adicionais / personalizados que devem ser adicionados a: %s ExtraFieldsLinesRec=Atributos complementares (linhas dos temas das faturas) ExtraFieldsSupplierOrdersLines=Atributos complementares (linhas de encomenda) ExtraFieldsThirdParties=Atributos Complementares (Terceiros) @@ -922,6 +972,7 @@ NewTranslationStringToShow=Nova variável de tradução a ser exibida OriginalValueWas=A tradução original foi sobrescrita. O valor original era:<br><br>%s TransKeyWithoutOriginalValue=Você forçou uma nova tradução para a chave de tradução ' <strong>%s</strong> ' que não existe em nenhum arquivo de idioma TitleNumberOfActivatedModules=Módulos ativados +TotalNumberOfActivatedModules=Módulos ativados: <b>%s</b> / <b>%s</b> 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: <br> @@ -930,14 +981,17 @@ ConditionIsCurrently=Condição é atualmente %s YouUseBestDriver=Você usa o driver %s, que é o melhor driver atualmente disponível. NbOfObjectIsLowerThanNoPb=Você tem apenas %s %s no banco de dados. Isso não requer nenhuma otimização específica. SearchOptim=Procurar Otimização +YouHaveXObjectUseSearchOptim=Você tem %s %s no banco de dados. Você pode adicionar a constante %s a 1 em Home-Setup-Other. Limite a pesquisa ao início de strings, o que possibilita que o banco de dados use índices, e você deve obter uma resposta imediata. YouHaveXObjectAndSearchOptimOn=Você tem %s %s no banco de dados e a constante %s é definida como 1 em Home - Setup - Other PHPModuleLoaded=O componente PHP 1 %s está carregado PreloadOPCode=O OPCode pré-carregado está em uso AddRefInList=Mostrar ref. Cliente / fornecedor lista de informações (lista de seleção ou caixa de combinação) e a maior parte do hiperlink. <br> Terceiros aparecerão com um formato de nome "CC12345 - SC45678 - Empresa X." em vez de "Empresa X.". AddAdressInList=Exibir lista de informações de endereço do cliente / fornecedor (lista de seleção ou caixa de combinação) <br> 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". +AddEmailPhoneTownInContactList=Exibir e-mail de contato (ou telefones, se não definido) e lista de informações da cidade (lista de seleção ou combobox). <br> Os contatos aparecerão com o formato de nome "Dupond Durand - dupond.durand@email.com - Paris" ou "Dupond Durand - 06 07 59 65 66 - Paris "em vez de" Dupond Durand ". FillThisOnlyIfRequired=Exemplo: +2 (Preencha somente se compensar o problema do timezone é experiente) NumberingModules=Modelos de numeração DocumentModules=Modelos de documentos +PasswordGenerationStandard=Retornar uma senha gerada de acordo com o algoritmo Dolibarr interno: %s caracteres contendo números compartilhados e caracteres em minúsculos. PasswordGenerationPerso=Retornar uma senha de acordo com a configuração definida para a sua personalidade. PasswordPatternDesc=Descrição do padrão de senha UsersSetup=Configurações de módulo de usuários @@ -1010,6 +1064,7 @@ AdherentMailRequired=O e-mail necessário para criar um novo membro MemberSendInformationByMailByDefault=Marque o checkbox para enviar confirmação de correspondência para membros (validação ou nova contribuição) é ativo por default VisitorCanChooseItsPaymentMode=O visitante pode escolher entre os modos de pagamento disponíveis MEMBER_REMINDER_EMAIL=Ativar lembrete automático <b>por e-mail</b> de assinaturas expiradas. Nota: O módulo <strong>%s</strong> deve estar ativado e configurado corretamente para enviar lembretes. +MembersDocModules=Modelos de documentos para documentos gerados a partir de registro de membro LDAPSetup=Configurações do LDAP LDAPUsersSynchro=Usuários LDAPContactsSynchro=Contatos @@ -1064,6 +1119,7 @@ LDAPTCPConnectKO=Conexão TCP para o servidor LDAP falhou (Servidor=%s, Porta=%s LDAPSetupForVersion3=Servidor LDAP configurado para versão 3 LDAPSetupForVersion2=Servidor LDAP configurado para versão 2 LDAPFilterConnectionExample=Exemplo: &(objectClass = inetOrgPerson) +LDAPGroupFilterExample=Exemplo: & (objectClass=groupOfUsers) LDAPFieldMail=E-Mail LDAPFieldMailExample=Exemplo: mail LDAPFieldPhone=Telefone profissional @@ -1100,6 +1156,8 @@ LDAPDescMembersTypes=Esta página permite que você defina os atributos do nome LDAPDescValues=Exemplos de valores são projetados pelo <b>OpenLDAP</b> seguido dos temas carregados: <b>core.schema, cosine.schema, inetorgperson.schema</b>). Se você usa esses valores e OpenLDAP, modifique seu arquivo de configurações LDAP <b>slapd.conf</b> para ter todos esses temas carregados. ForANonAnonymousAccess=Para um acesso autenticado (para um acesso de escrita por exemplo) PerfDolibarr=Configurações/otimizações de relatório de performance +NotInstalled=Não instalado. +NotRiskOfLeakWithThis=Não há risco de vazamento desta forma. ApplicativeCache=cache de aplicativo MemcachedNotAvailable=Nenhum cache de aplicativo foi encontrado. Você pode aumentar a performance instalando um servidor de cache Memcached e o módulo será capaz de usar esse servidor de cache. Mais informações aqui http://wiki.dolibarr.org/index.php/Module_MemCached_EN. Note que vários provedores de host web não dispõem de tal servidor de cache. MemcachedModuleAvailableButNotSetup=Módulo de aceleração da memória cache está ativado mas a configuração não está completa @@ -1121,7 +1179,13 @@ ServiceSetup=Configurações do módulo de serviços ProductServiceSetup=Configurações dos módulos de produtos e serviços NumberOfProductShowInSelect=Número máximo de produtos para mostrar em listas de seleção de combinação (0 = sem limite) ViewProductDescInFormAbility=Exibir descrições de produtos em formulários (mostrados de outra forma em um pop-up de dicas de ferramentas) +DoNotAddProductDescAtAddLines=Não adicionar descrição do produto (do cartão do produto) no envio, adicione linhas nos formulários +OnProductSelectAddProductDesc=Como usar a descrição dos produtos ao adicionar um produto como uma linha de um documento +AutoFillFormFieldBeforeSubmit=Preencher automaticamente o campo de entrada da descrição com a descrição do produto +DoNotAutofillButAutoConcat=Não preencha automaticamente o campo de entrada com a descrição do produto. A descrição do produto será concatenada com a descrição inserida automaticamente. +DoNotUseDescriptionOfProdut=A descrição do produto nunca será incluída na descrição das linhas de documentos MergePropalProductCard=Ativar na aba Arquivos Anexos ao produto/serviço uma opção para mesclar o documento PDF do produto à proposta PDF se o produto/serviço estiver na proposta +ViewProductDescInThirdpartyLanguageAbility=Exibir descrições de produtos em formulários no idioma do terceiro (caso contrário, no idioma do usuário) SetDefaultBarcodeTypeProducts=Tipo de código de barras default para usar nós produtos SetDefaultBarcodeTypeThirdParties=Tipo de código de barras default para usar nós terceiros UseUnits=Definir uma unidade de medida para a Quantidade durante a edição das linhas do pedido, proposta ou fatura @@ -1132,6 +1196,7 @@ SyslogOutput=Saídas de logs SyslogFilename=Nome do arquivo e caminho YouCanUseDOL_DATA_ROOT=Você pode usar DOL_DATA_ROOT/dolibarr.log para um arquivo de log no diretório dos "documentos" do Dolibarr. ErrorUnknownSyslogConstant=A Constante %s não é conhecida pelas constantes do Syslog +SyslogFileNumberOfSaves=Número de registros de backup para manter ConfigureCleaningCronjobToSetFrequencyOfSaves=Configurar o trabalho agendado de limpeza para definir a frequência de backup de log DonationsSetup=Configurações do módulo de doações DonationsReceiptModel=Templates de recibos de doação @@ -1173,6 +1238,7 @@ FreeLegalTextOnDeliveryReceipts=Texto livre em recibos de entregas ActivateFCKeditor=Editor avançado ativo por: FCKeditorForCompany=Criação/edição do WYSIWIG nas descrições de elementos e nota (exceto produtos/serviços) FCKeditorForProduct=Criação/edição do WYSIWIG nas descrições de produtos/serviços e nota +FCKeditorForProductDetails=Criação / edição WYSIWIG de linhas de detalhes de produtos para todas as entidades (propostas, encomendas, facturas, etc ...). <span class="warning">Aviso: O uso desta opção neste caso não é recomendado, pois pode criar problemas com caracteres especiais e formatação de página ao construir arquivos PDF.</span> FCKeditorForMailing=Criação/edição do WYSIWIG nos E-Mails massivos (ferramentas->emailing) FCKeditorForUserSignature=criação/edição do WYSIWIG nas assinaturas de usuários FCKeditorForMail=Criação/Edição WYSIWIG para todos os e-mails (exceto Ferramentas->eMailing) @@ -1182,6 +1248,7 @@ MenuDeleted=Menu Deletado NotTopTreeMenuPersonalized=Menus personalizados não conectados à uma entrada do menu superior NewMenu=Novo Menu MenuModule=Fonte do módulo +HideUnauthorizedMenu=Ocultar menus não autorizados também para usuários internos (apenas acinzentados caso contrário) DetailId=Menu ID DetailMenuHandler=Gestor de menu onde mostra novo menu DetailMenuModule=Nome do módulo se a entrada do menu vier de um módulo @@ -1209,10 +1276,15 @@ InvoiceDateUsed=Data usada na fatura YourCompanyDoesNotUseVAT=Sua empresa foi definida para não usar o IVA (Home - Configuração - Empresa / Organização), portanto, não há opções de IVA para configuração. AccountancyCodeSell=Código de contas de vendas AccountancyCodeBuy=Código de contas de compras +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Mantenha a caixa de seleção “Criar automaticamente o pagamento” vazia por padrão ao criar um novo imposto 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 visualização você deseja abrir por padrão ao selecionar o menu Agenda +AGENDA_REMINDER_BROWSER=Habilitar o lembrete de evento no <b>navegador do usuário</b> (quando a data do lembrete é atingida, um pop-up é mostrado pelo navegador. Cada usuário pode desabilitar tais notificações na configuração de notificação do navegador). AGENDA_REMINDER_BROWSER_SOUND=Habilitar a notificação sonora +AGENDA_REMINDER_EMAIL=Habilitar lembrete de evento <b>por e-mail </b> (opção de lembrete / atraso pode ser definido em cada evento) +AGENDA_REMINDER_EMAIL_NOTE=Nota: A frequência da tarefa %s deve ser suficiente para garantir que o lembrete seja enviado no momento correto. 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<br><b>__PHONETO__</b> que será substituída pelo número do telefone da pessoa a chamar<br><b>__PHONEFROM__</b> que será substituída pelo telefone da pessoa que está chamando (o seu)<br><b>__LOGIN__</b> que será substituída pelo login clicktodial (definido no cartão do usuário)<br><b>__PASS__</b> que será substituída pela senha clicktodial (definida no cartão do usuário). @@ -1253,6 +1325,7 @@ SuppliersCommandModelMuscadet=Modelo completo do pedido (antiga implementação SuppliersInvoiceModel=Modelo completo da fatura do fornecedor IfSetToYesDontForgetPermission=Se definido como um valor não nulo, não se esqueça de fornecer permissões a grupos ou usuários com permissão para a segunda aprovação GeoIPMaxmindSetup=Configurações do módulo GeoIP Maxmind +PathToGeoIPMaxmindCountryDataFile=Caminho para o arquivo contendo Maxmind ip para tradução do país. <br> Exemplos: <br> /usr/local/share/GeoIP/GeoIP.dat <br> /usr/share/GeoIP/GeoIP.dat <br> /usr/share/GeoIP/GeoLite2-Country.mmdb NoteOnPathLocation=Nota que seu ip para o arquivo de dados do país deve estar dentro do diretório do seu PHP que possa ser lido (Verifique a configuração do seu PHP open_basedir e o sistema de permissões). YouCanDownloadFreeDatFileTo=Você pode baixar uma <b>Versão demo</b> do arquivo Maxmind GeoIP do seu país no %s. YouCanDownloadAdvancedDatFileTo=Você também pode baixar uma versão mais completa, com updates do arquivo Maxmind GeoIP do seu país no %s. @@ -1308,9 +1381,10 @@ BackgroundTableLineOddColor=Cor do fundo para as linhas ímpares da tabela BackgroundTableLineEvenColor=Cor do fundo, mesmo para linhas de tabela MinimumNoticePeriod=O período mínimo de observação (O seu pedido de licença deve ser feito antes de esse atraso) NbAddedAutomatically=Número de dias adicionados para contadores de usuários (automaticamente) a cada mês -EnterAnyCode=Este campo contém uma referência para identificar uma linha. Digite qualquer valor de sua escolha, mas sem caracteres especiais. +EnterAnyCode=Este campo contém uma referência para identificar a linha. Insira qualquer valor de sua escolha, mas sem caracteres especiais. Enter0or1=Digite 0 ou 1 ColorFormat=A cor RGB está no formato HEX, ex.: FF0000 +PictoHelp=Nome do ícone no formato dolibarr ('image.png' se estiver no diretório do tema atual, 'image.png@nom_du_module' se estiver no diretório / img / de um módulo) PositionIntoComboList=Posição de linha em listas de combinação SellTaxRate=Taxa de imposto sobre venda RecuperableOnly=Sim para VAT "Não Percebido, mas Recuperável" dedicado a alguns estados na França. Mantenha o valor como "Não" em todos os outros casos. @@ -1338,6 +1412,7 @@ ExampleOfNewsMessageForMajorRelease=O ERP e CRM Dolibarr %s está disponível. A ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s está disponível. Versão %s é uma versão de manutenção, portanto, contém apenas correções de bugs. Recomendamos que todos os usuários atualizem para esta versão. Uma versão de manutenção não introduz novos recursos ou alterações no banco de dados. Você pode baixá-lo da área de download do portal https://www.dolibarr.org (subdiretório versões estáveis). Você pode ler o <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> para obter uma lista completa de alterações. MultiPriceRuleDesc=Quando a opção "Vários níveis de preços por produto / serviço" está ativada, você pode definir preços diferentes (um por nível de preço) para cada produto. Para poupar tempo, aqui você pode inserir uma regra para calcular automaticamente um preço para cada nível com base no preço do primeiro nível, então você terá que inserir apenas um preço para o primeiro nível para cada produto. Esta página foi projetada para poupar tempo, mas é útil somente se os preços de cada nível forem relativos ao primeiro nível. Você pode ignorar esta página na maioria dos casos. ModelModulesProduct=Temas para os documentos do produto +WarehouseModelModules=Modelos para documentos de armazéns ToGenerateCodeDefineAutomaticRuleFirst=Para gerar códigos automaticamente, você deve primeiro definir um gerente para definir automaticamente o número do código de barras. SeeSubstitutionVars=Veja * nota para a lista das possíveis variáveis de substituição SeeChangeLog=Ver o arquivo ChangeLog (somente em inglês) @@ -1363,6 +1438,7 @@ 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 +EnterCalculationRuleIfPreviousFieldIsYes=Insira a regra de cálculo se o campo anterior foi definido como Sim. <br> Por exemplo: <br> CODEGRP1 + CODEGRP2 SeveralLangugeVariatFound=Várias variantes de idioma encontradas RemoveSpecialChars=Remover caracteres especiais COMPANY_DIGITARIA_CLEAN_REGEX=Filtro Regex para valor limpo (COMPANY_DIGITARIA_CLEAN_REGEX) @@ -1373,11 +1449,14 @@ YouCanDeleteFileOnServerWith=Você pode excluir este arquivo no servidor com a l EnableFeatureFor=Ativar recursos para <strong>%s</strong> VATIsUsedIsOff=Nota: A opção de usar o Imposto sobre vendas ou o IVA foi definida como <strong>Desligada</strong> no menu %s - %s, portanto, o imposto sobre vendas ou IVA usado será sempre 0 para vendas. SwapSenderAndRecipientOnPDF=Troque o remetente e a posição do endereço do destinatário em documentos PDF -FeatureSupportedOnTextFieldsOnly=Atenção, recurso suportado apenas em campos de texto. Além disso, um parâmetro de URL action = create ou action = edit deve ser definido OU o nome da página deve terminar com 'new.php' para acionar esse recurso. +FeatureSupportedOnTextFieldsOnly=Aviso, recurso compatível apenas com campos de texto e listas de combinação. Além disso, um parâmetro de URL ação=criar ou ação=editar deve ser definido OU o nome da página deve terminar com 'new.php' para acionar este recurso. EmailCollectorDescription=Adicione um trabalho agendado e uma página de configuração para verificar regularmente as caixas de e-mail (usando o protocolo IMAP) e registre os e-mails recebidos em seu aplicativo, no lugar certo e / ou crie alguns registros automaticamente (como leads). NewEmailCollector=Novo coletor de e-mail +EmailcollectorOperationsDesc=As operações são executadas de cima para baixo MaxEmailCollectPerCollect=Número máximo de e-mails coletados por coleta ConfirmCloneEmailCollector=Tem certeza de que deseja clonar o coletor de e-mail %s? +DateLastCollectResult=Data da última tentativa de coleta +DateLastcollectResultOk=Data da última coleta bem sucedida LastResult=Último resultado EmailCollectorConfirmCollectTitle=Confirmação de recebimento de e-mail EmailCollectorConfirmCollect=Deseja executar a coleta deste coletor agora? @@ -1385,10 +1464,16 @@ 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 vincular a terceiros se tiver sido carregado por uma operação anterior) 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=Mensagem de conversa iniciada por um primeiro e-mail enviado de Dolibarr +WithoutDolTrackingID=Mensagem de uma conversa iniciada por um primeiro e-mail NÃO enviado pelo Dolibarr +WithDolTrackingIDInMsgId=Mensagem enviada de Dolibarr +WithoutDolTrackingIDInMsgId=Mensagem NÃO enviada de Dolibarr +CreateCandidature=Criar formulário de emprego FormatZip=CEP MainMenuCode=Código de entrada do menu (mainmenu) ECMAutoTree=Mostrar árvore de ECM automática @@ -1399,6 +1484,7 @@ UseSearchToSelectResource=Usa um formulário de busca para a escolha de um recur DisabledResourceLinkUser=Desativar recurso para vincular um recurso a usuários DisabledResourceLinkContact=Desativar recurso para vincular um recurso a contatos EnableResourceUsedInEventCheck=Ativar recurso para verificar se recurso está sendo usado em um evento +DisableProspectCustomerType=Desative o tipo de terceiro "Cliente em potencial + cliente" (portanto, o terceiro deve ser "Cliente em potencial" ou "Cliente", mas não pode ser os dois) MAIN_OPTIMIZEFORTEXTBROWSER=Simplifique a interface para pessoas cegas MAIN_OPTIMIZEFORTEXTBROWSERDesc=Ative esta opção se você for uma pessoa cega ou se usar o aplicativo em um navegador de texto como o Lynx ou o Links. MAIN_OPTIMIZEFORCOLORBLIND=Alterar a cor da interface para daltônicos @@ -1417,12 +1503,16 @@ UseDebugBar=Use a barra de depuração DEBUGBAR_LOGS_LINES_NUMBER=Número de últimas linhas de log para manter no console WarningValueHigherSlowsDramaticalyOutput=Atenção, valores mais altos reduzem drasticamente a saída ModuleActivated=O módulo %s é ativado e torna a interface mais lenta +ModuleSyslogActivatedButLevelNotTooVerbose=O módulo %s está ativado e o nível de registro (%s) está correto (pouco detalhado) +IfYouAreOnAProductionSetThis=Se você estiver em um ambiente de produção, deve definir esta propriedade como %s. +AntivirusEnabledOnUpload=Antivírus habilitado em arquivos carregados EXPORTS_SHARE_MODELS=Modelos de exportação são compartilhar com todos ExportSetup=Configuração do módulo Export 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 de um objeto for encontrado no email, ou se o email for uma resposta de um email já coletado e vinculado a um objeto, o evento criado será automaticamente vinculado ao objeto relacionado conhecido. 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. @@ -1439,6 +1529,8 @@ MakeAnonymousPing=Faça um ping anônimo '+1' no servidor de base Dolibarr (feit FeatureNotAvailableWithReceptionModule=Recurso não disponível quando a recepção do módulo está ativada EmailTemplate=Modelo para e-mail EMailsWillHaveMessageID=Os e-mails terão a tag 'Referências' correspondente a esta sintaxe +PDF_SHOW_PROJECT=Exibir projeto no documento +ShowProjectLabel=Rótulo do Projeto PDF_USE_ALSO_LANGUAGE_CODE=Se você deseja duplicar alguns textos em seu PDF em 2 idiomas diferentes no mesmo PDF gerado, defina aqui esse segundo idioma para que o PDF gerado contenha 2 idiomas diferentes na mesma página, o escolhido ao gerar PDF e este ( apenas alguns modelos de PDF suportam isso). Mantenha em branco para 1 idioma por PDF. FafaIconSocialNetworksDesc=Digite aqui o código de um ícone FontAwesome. Se você não souber o que é FontAwesome, poderá usar o valor genérico fa-address-book. RssNote=Nota: Cada definição de feed RSS fornece um widget que você deve ativar para disponibilizá-lo no painel @@ -1448,4 +1540,19 @@ MeasuringScaleDesc=A escala é o número de casas que você precisa mover a part TemplateAdded=Modelo adicionado TemplateUpdated=Modelo atualizado TemplateDeleted=Modelo excluído +MailToSendEventPush=Email de lembrete de evento +SwitchThisForABetterSecurity=Alternar este valor para %s é recomendado para mais segurança DictionaryProductNature=Natureza do produto +CountryIfSpecificToOneCountry=País (se específico para um determinado país) +YouMayFindSecurityAdviceHere=Você pode encontrar avisos de segurança aqui +ModuleActivatedMayExposeInformation=Esta extensão PHP pode expor dados confidenciais. Se você não precisa disso, desative-o. +ModuleActivatedDoNotUseInProduction=Um módulo projetado para o desenvolvimento foi habilitado. Não o habilite em um ambiente de produção. +CombinationsSeparator=Caractere separador para combinações de produtos +SeeLinkToOnlineDocumentation=Veja o link para a documentação online no menu superior para exemplos +AskThisIDToYourBank=Entre em contato com seu banco para obter este ID +AdvancedModeOnly=Permissão disponível apenas no modo de permissão Avançada +ConfFileIsReadableOrWritableByAnyUsers=O arquivo conf pode ser lido ou gravado por qualquer usuário. Dê permissão apenas ao usuário e grupo do servidor da web. +MailToSendEventOrganization=Organização do Evento +AGENDA_EVENT_DEFAULT_STATUS=Status de evento padrão ao criar um evento a partir do formulário +YouShouldDisablePHPFunctions=Você deve desabilitar funções PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Exceto se você precisar executar comandos do sistema (para o módulo Trabalho agendado ou para executar o antivírus da linha de comando externa, por exemplo), você deve desabilitar as funções do PHP diff --git a/htdocs/langs/pt_BR/agenda.lang b/htdocs/langs/pt_BR/agenda.lang index 3a43dd851ea..2aec949c9ab 100644 --- a/htdocs/langs/pt_BR/agenda.lang +++ b/htdocs/langs/pt_BR/agenda.lang @@ -57,7 +57,6 @@ ProposalSentByEMail=Proposta comercial 1%s enviada por e-mail ContractSentByEMail=Contrato%s enviado por e-mail OrderSentByEMail=Ped. de venda 1%s enviado por e-mail InvoiceSentByEMail=Fat. %s do cliente enviada por e-mail -SupplierOrderSentByEMail=Pedido de compra %s enviado por e-mail ORDER_SUPPLIER_DELETEInDolibarr=Pedido de compra %s excluído SupplierInvoiceSentByEMail=Fatura %s do fornec. enviada por e-mail ShippingSentByEMail=Embarque %s enviado por e-mail diff --git a/htdocs/langs/pt_BR/banks.lang b/htdocs/langs/pt_BR/banks.lang index e57792e9621..eb3c644c1e0 100644 --- a/htdocs/langs/pt_BR/banks.lang +++ b/htdocs/langs/pt_BR/banks.lang @@ -132,9 +132,17 @@ NewVariousPayment=Novo pagamento diverso VariousPayment=Pagamento diverso ShowVariousPayment=Mostrar pagamento diverso AddVariousPayment=Adicionar pagamento diverso +VariousPaymentId=ID de pagamento diverso +VariousPaymentLabel=Rótulo de pagamento diverso +ConfirmCloneVariousPayment=Confirmar clone de pagamento diverso YourSEPAMandate=Seu mandato Área Única de Pagamentos em Euros AutoReportLastAccountStatement=Preencha automaticamente o campo 'número de extrato bancário' com o último número de extrato ao fazer a reconciliação +CashControl=Controle de caixa PDV +NewCashFence=Abertura ou fechamento de um novo caixa BankColorizeMovement=Colorir movimentos BankColorizeMovementDesc=Se esta função estiver ativada, você poderá escolher uma cor de plano de fundo específica para movimentos de débito ou crédito BankColorizeMovementName1=Cor de fundo para movimento de débito BankColorizeMovementName2=Cor de fundo para movimento de crédito +IfYouDontReconcileDisableProperty=Caso não queira fazer reconciliações bancárias em alguma conta bancária, desative a propriedade "%s" nelas para remover este aviso. +NoBankAccountDefined=Nenhuma conta bancária definida +NoRecordFoundIBankcAccount=Nenhum registro encontrado na conta bancária. Normalmente, isso ocorre quando um registro foi excluído manualmente da lista de transações na conta bancária (por exemplo, durante uma reconciliação da conta bancária). Outro motivo é que o pagamento foi registrado quando o módulo "%s" estava desabilitado. diff --git a/htdocs/langs/pt_BR/bills.lang b/htdocs/langs/pt_BR/bills.lang index a20be8fd4bd..9601e9f7915 100644 --- a/htdocs/langs/pt_BR/bills.lang +++ b/htdocs/langs/pt_BR/bills.lang @@ -37,10 +37,8 @@ InvoiceHasAvoir=Foi fonte de uma ou várias notas de crédito CardBill=Ficha da fatura InvoiceCustomer=Fatura de cliente CustomerInvoice=Fatura de cliente -CustomersInvoices=Faturas de clientes SupplierInvoice=Fatura do fornecedores SupplierBill=Fatura do fornecedores -SupplierBills=Faturas de fornecedores PaymentBack=Reembolso CustomerInvoicePaymentBack=Reembolso PaidBack=Reembolso pago @@ -273,7 +271,6 @@ PaymentConditionPT_ORDER=No pedido PaymentConditionPT_5050=50%% adiantado e 50%% na entrega FixAmount=Valor fixo - 1 linha com o rótulo '%s' VarAmount=Variavel valor (%% total) -VarAmountAllLines=Valor variável (%% tot.) - todas as mesmas linhas PaymentTypePRE=Pedido com pagamento em Débito direto PaymentTypeShortPRE=Pedido com pagamento por débito PaymentTypeLIQ=Dinheiro @@ -343,10 +340,7 @@ YouMustCreateInvoiceFromSupplierThird=Essa opção só está disponível ao cria YouMustCreateStandardInvoiceFirstDesc=Você deve criar antes uma fatura padrão e convertê-la em um "tema" para criar um novo tema de fatura PDFCrabeDescription=Modelo de fatura PDF Crabe. Um modelo de fatura completo (implementação antiga do modelo Sponge) PDFCrevetteDescription=Tema Crevette para fatura em PDF. Um tema completo para a situação das faturas -TerreNumRefModelDesc1=Retorna número com formato %syymm-nnnn para padrão de faturas e %syymm-nnnn para notas de crédito onde yy é ano, mm é mês e nnnn é uma sequência numérica sem quebra e sem retorno para 0 -MarsNumRefModelDesc1=Número de retorno com o formato %syymm-nnnn para faturas padrão, %syymm-nnnn para faturas de substituição, %syymm-nnnn para faturas de adiantamento e %syymm-nnnn para notas de crédito onde yy é ano, mm é mês e nnnn é uma seqüência sem interrupção e não retornar para 0 TerreNumRefModelError=Uma conta começa com %syymm já existe e não é compatível com esse modelo de sequência. Remova ou renomeie ele para ativar esse módulo. -CactusNumRefModelDesc1=Número de retorno com o formato %syymm-nnnn para faturas padrão, %syymm-nnnn para notas de crédito e %syymm-nnnn para faturas de adiantamento, onde yy é ano, mm é mês e nnnn é uma seqüência sem quebra e sem retorno para 0 EarlyClosingReason=Motivo de fechamento antecipado EarlyClosingComment=Nota de fechamento antecipado TypeContact_facture_internal_SALESREPFOLL=Representativo seguindo de fatura de cliente @@ -359,6 +353,7 @@ TypeContact_invoice_supplier_external_SHIPPING=Contato de remessa do fornecedor InvoiceFirstSituationAsk=Primeira situação da fatura InvoiceFirstSituationDesc=A <b>situação faturas</b> são amarradas às situações relacionadas com uma progressão, por exemplo, a progressão de uma construção. Cada situação é amarrada a uma fatura. InvoiceSituation=Situação da fatura +PDFInvoiceSituation=Situação da fatura InvoiceSituationAsk=Fatura acompanhando a situação InvoiceSituationDesc=Criar uma nova situação na sequência de um um já existente SituationAmount=Situação montante da fatura (líquida) @@ -380,7 +375,7 @@ ToCreateARecurringInvoiceGene=Para gerar as futuras faturas regular e manualment ToCreateARecurringInvoiceGeneAuto=Se você precisar que essas faturas sejam geradas automaticamente, peça ao seu administrador para ativar e configurar o módulo <strong>%s</strong>. Note que ambos os métodos (manual e automático) podem ser usados juntos sem risco de duplicação. DeleteRepeatableInvoice=Excluir tema de fatura ConfirmDeleteRepeatableInvoice=Você tem certeza que deseja excluir o tema de fatura? -BillCreated=%s conta(s) criada(s) +BillCreated=%s fatura (s) gerada (s) StatusOfGeneratedDocuments=Status da geração de documentos DoNotGenerateDoc=Não gere arquivo de documento BILL_DELETEInDolibarr=Fatura excluída @@ -388,3 +383,5 @@ 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 +FacParentLine=Linha principal da fatura +SituationTotalRayToRest=Restante a pagar sem imposto diff --git a/htdocs/langs/pt_BR/boxes.lang b/htdocs/langs/pt_BR/boxes.lang index 0d2b4f7a911..665ab325650 100644 --- a/htdocs/langs/pt_BR/boxes.lang +++ b/htdocs/langs/pt_BR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Estatísticas sobre os principais objetos de negócios no banco de dados BoxLoginInformation=Informações de Login BoxLastRssInfos=Informação de RSS BoxLastProducts=Últimos %s Produtos/Serviços @@ -11,8 +12,12 @@ BoxLastProposals=Últimas propostas comerciais BoxLastProspects=Últimos prospectos de cliente modificados BoxLastCustomerOrders=Últimas encomendas BoxLastContacts=Últimos contatos/endereços +BoxLastModifiedMembers=Últimos membros modificados +BoxLastMembersSubscriptions=Últimas inscrições de membros BoxCurrentAccounts=Saldo das contas ativas BoxTitleMemberNextBirthdays=Aniversários deste mês (membros) +BoxTitleMembersByType=Membros por tipo +BoxTitleMembersSubscriptionsByYear=Assinaturas de membros por ano BoxTitleLastRssInfos=Últimas %s novidades de %s BoxTitleLastProducts=Produtos/Serviços: %s modificado BoxTitleProductsAlertStock=Produtos: alerta de estoque @@ -34,8 +39,10 @@ BoxLastExpiredServices=Ultimo %s dos contatos com serviço vencido ativo BoxTitleLastModifiedDonations=Últimas %s doações modificadas BoxTitleLatestModifiedBoms=%s BOMs modificadas recentemente BoxTitleLatestModifiedMos=%s ordens de fabricação modificadas recentemente +BoxTitleLastOutstandingBillReached=Clientes com máximo pendente excedido BoxGlobalActivity=Atividade global (faturas, propostas, pedidos) BoxScheduledJobs=Tarefas agendadas +BoxTitleFunnelOfProspection=Funil de lead FailedToRefreshDataInfoNotUpToDate=Falha ao atualizar o fluxo de RSS. Data de atualização mais recente com êxito: %s LastRefreshDate=Ultima data atualizacao NoRecordedBookmarks=Nenhum marcador definido. @@ -64,12 +71,15 @@ BoxTitleLastModifiedCustomerBills=Faturas do cliente: último %s modificado BoxTitleLastModifiedCustomerOrders=Pedidos de Vendas: último %s modificado BoxTitleLastModifiedPropals=Últimas %s propostas modificadas BoxTitleLatestModifiedJobPositions=Últimos %s trabalhos alterados +BoxTitleLatestModifiedCandidatures=Últimas %s candidaturas alteradas ForCustomersInvoices=Faturas de clientes ForCustomersOrders=Pedidos de clientes LastXMonthRolling=Ultima %s mensal ChooseBoxToAdd=Adicionar widget para sua area de notificacoes BoxAdded=A ferramenta foi adicionada no seu painel BoxTitleUserBirthdaysOfMonth=Aniversários deste mês (usuários) +BoxLastManualEntries=Registro mais recente na contabilidade inserido manualmente ou sem documento de origem +BoxTitleLastManualEntries=%s último registro inserido manualmente ou sem documento de origem NoRecordedManualEntries=Nenhuma entrada manual registrada na contabilidade BoxSuspenseAccount=Operação de contabilidade com conta suspensa BoxTitleSuspenseAccount=Número de linhas não alocadas @@ -78,3 +88,10 @@ SuspenseAccountNotDefined=A conta suspensa não está definida BoxLastCustomerShipments=Últimos envios de clientes BoxTitleLastCustomerShipments=%s remessas de clientes mais recentes NoRecordedShipments=Nenhuma remessa de cliente registrada +BoxCustomersOutstandingBillReached=Clientes com limite pendente atingido +UsersHome=Usuários e grupos domésticos +MembersHome=Sócio da casa +ThirdpartiesHome=Terceiros domésticos +TicketsHome=Início Tickets +AccountancyHome=Início contabilidade +ValidatedProjects=Projetos validados diff --git a/htdocs/langs/pt_BR/categories.lang b/htdocs/langs/pt_BR/categories.lang index daab834c237..1b369de1186 100644 --- a/htdocs/langs/pt_BR/categories.lang +++ b/htdocs/langs/pt_BR/categories.lang @@ -11,10 +11,11 @@ SuppliersCategoriesArea=Área tags / categorias de fornecedores CustomersCategoriesArea=Área tags / categorias de Clientes MembersCategoriesArea=Área tags / categorias de Membros ContactsCategoriesArea=Área tags / categorias de Contatos -AccountsCategoriesArea=Tags/categorias da área de Contas +AccountsCategoriesArea=Área tags / categorias de contas bancárias ProjectsCategoriesArea=Projetos area de tags/categorias UsersCategoriesArea=Área de tags / categorias de usuários CatList=Lista de tags/categorias +CatListAll=Lista tags / categorias (todos os tipos) NewCategory=Nova tag/categoria ModifCat=Modificar tag/categoria CatCreated=Tag/categoria criada @@ -56,18 +57,30 @@ UsersCategoriesShort=Tags / categorias de usuários StockCategoriesShort=Tags / categorias de armazém ThisCategoryHasNoItems=Esta categoria não contém nenhum item. CategId=ID Tag / categoria +ParentCategory=Tag / categoria principal +ParentCategoryLabel=Rótulo tag / categoria principal +CatSupList=Lista tags / categorias de fornecedores +CatCusList=Lista de clientes / clientes potenciais / categorias CatProdList=Lista de produtos tags / categorias CatMemberList=Lista de membros tags / categorias +CatContactList=Lista tags / categorias de contatos +CatProjectsList=Lista tags / categorias de projetos +CatUsersList=Lista tags / categorias de usuários +CatSupLinks=Links entre fornecedores e tags / categorias CatCusLinks=Relação/links entre clientes / perspectivas e tags / categorias CatContactsLinks=Links entre contatos / endereços e tags / categorias CatProdLinks=Relação/links entre produtos / serviços e tags / categorias CatMembersLinks=Ligações entre os membros e tags / categorias CatProjectsLinks=Links entre projetos e tags/categorias +CatUsersLinks=Links entre usuários e tags / categorias ExtraFieldsCategories=atributos complementares CategoriesSetup=Configuração Tags / categorias CategorieRecursiv=Fazer a ligação com os pais tag/categoria automaticamente CategorieRecursivHelp=Se a opção estiver ativada, quando você adicionar um produto a uma subcategoria, o produto também será adicionado à categoria pai. AddProductServiceIntoCategory=Adicione o seguinte produto / serviço +AddCustomerIntoCategory=Atribuir categoria ao cliente +AddSupplierIntoCategory=Atribuir categoria ao fornecedor ShowCategory=Mostrar tag / categoria ChooseCategory=Escolher categoria +WebsitePagesCategoriesArea=Categorias de contêiner de página UseOrOperatorForCategories=Use operador para categorias diff --git a/htdocs/langs/pt_BR/companies.lang b/htdocs/langs/pt_BR/companies.lang index 8987f615bd7..a2e555301a3 100644 --- a/htdocs/langs/pt_BR/companies.lang +++ b/htdocs/langs/pt_BR/companies.lang @@ -29,7 +29,6 @@ Individual=Pessoa física ToCreateContactWithSameName=Irá automaticamente criar um contato/endereço com a mesma informação do terceiro. Na maioria dos casos, mesmo que o terceiro seja uma pessoa física, a criação de um único terceiro é suficiente. ParentCompany=Matriz Subsidiaries=Filiais -ReportByQuarter=Relatório pela taxa CivilityCode=Forma de tratamento RegisteredOffice=Escritório registrado Lastname=Sobrenome @@ -180,6 +179,7 @@ ThisUserIsNot=Este usuário não é um cliente em potencial, cliente ou forneced VATIntraCheckDesc=O ID do IVA deve incluir o prefixo do país. O link <b>%s</b> usa o serviço europeu de verificação de IVA (VIES), que requer acesso à Internet do servidor Dolibarr. ErrorVATCheckMS_UNAVAILABLE=Verificação não é possível. Verifique o serviço não é necessário por um membro de estado (%s). NorProspectNorCustomer=Nem possivel cliente, nem cliente +JuridicalStatus=Tipo de entidade comercial ProspectLevelShort=Pos. Cli. ProspectLevel=Possível cliente ContactPublic=Compartilhado @@ -234,7 +234,6 @@ ProductsIntoElements=Lista de produtos/serviços em %s CurrentOutstandingBill=Notas aberta correntes OutstandingBill=Conta excelente OutstandingBillReached=Máx. para dívida a ser alcançado -MonkeyNumRefModelDesc=Retorna um número com o formato %syymm-nnnn para o código do cliente e %syymm-nnnn para o código do fornecedor, onde yy é ano, mm é mês e nnnn é uma sequência sem quebra e sem retorno a 0. LeopardNumRefModelDesc=O código é livre. Esse código pode ser modificado a qualquer hora. ManagingDirectors=Nome do Representante(CEO,Diretor,Presidente...) MergeOriginThirdparty=Duplicar terceiros (terceiros que deseja excluir) @@ -252,3 +251,5 @@ PaymentTypeSupplier=Tipo de pagamento - Fornecedor PaymentTermsSupplier=Termos de pagamento - Fornecedor PaymentTypeBoth=Tipo de Pagamento - Cliente e Fornecedor MulticurrencyUsed=Uso de Multimoeda +CurrentOutstandingBillLate=Atual fatura pendente atrasada +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Cuidado, dependendo das configurações de preço do produto, você deve trocar de fornecedor antes de adicionar o produto ao PDV. diff --git a/htdocs/langs/pt_BR/compta.lang b/htdocs/langs/pt_BR/compta.lang index 1dadb249b1e..fe65cc7a47c 100644 --- a/htdocs/langs/pt_BR/compta.lang +++ b/htdocs/langs/pt_BR/compta.lang @@ -50,6 +50,7 @@ LT2SupplierES=IRPF de compras LT2CustomerIN=Vendas de SGST LT2SupplierIN=Compras SGST VATCollected=ICMS recuperado +VATExpensesArea=Área para todos os pagamentos de IVA SocialContribution=Contribuição fiscal ou social SocialContributions=Encargos sociais e fiscais SocialContributionsDeductibles=Contribuições fiscais ou sociais dedutíveis @@ -82,6 +83,8 @@ LT2PaymentES=Pagamento de IRPF LT2PaymentsES=Pagamentos de IRPF VATPayment=Pagamento da taxa de venda VATPayments=Pagamentos da taxa de venda +VATDeclarations=Declarações de IVA +VATDeclaration=Declaração de IVA VATRefund=Reembolso da taxa sobre vendas SocialContributionsPayments=Pagamentos de impostos sociais / fiscais ShowVatPayment=Ver Pagamentos ICMS @@ -100,9 +103,7 @@ NoWaitingChecks=Sem cheques a depositar. DateChequeReceived=Data introdução de dados de recepção cheque NbOfCheques=Nº. de cheques PaySocialContribution=Quitar um encargo fiscal/social -ConfirmPaySocialContribution=Quer mesmo categorizar esta contribuição fiscal/social como paga? DeleteSocialContribution=Excluir um pagamento taxa social ou fiscal -ConfirmDeleteSocialContribution=Quer mesmo excluir este pagamento de contribuição fiscal/social? ExportDataset_tax_1=Encargos fiscais e sociais e pagamentos CalcModeVATDebt=<b>Modo% S VAT compromisso da contabilidade% s.</b> CalcModeVATEngagement=<b>Modo% SVAT sobre os rendimentos e as despesas% s.</b> @@ -151,7 +152,6 @@ Pcg_version=Modelos de carta de contas Pcg_subtype=PCG subtipo InvoiceLinesToDispatch=Linhas de nota fiscal para envio RefExt=Ref externo -ToCreateAPredefinedInvoice=Para criar um tema para fatura, crie uma fatura padrão e então, sem validá-la, clique no botão "%s". LinkedOrder=Linque para o pedido CalculationRuleDesc=Para calcular o total do VAT, há dois métodos: <br> Método 1 é arredondamento cuba em cada linha, em seguida, soma-los. <br> Método 2 é somando tudo cuba em cada linha, em seguida, o arredondamento resultado. <br> Resultado final pode difere de alguns centavos. O modo padrão é o <b>modo% s.</b> CalculationRuleDescSupplier=De acordo com o fornecedor, escolha o método apropriado para aplicar a mesma regra de cálculo e obter o mesmo resultado esperado pelo fornecedor. diff --git a/htdocs/langs/pt_BR/ecm.lang b/htdocs/langs/pt_BR/ecm.lang index 2e17c5b2760..ec2187e9913 100644 --- a/htdocs/langs/pt_BR/ecm.lang +++ b/htdocs/langs/pt_BR/ecm.lang @@ -16,6 +16,7 @@ ECMAreaDesc2=* As pastas automáticas são geradas automaticamente quando algum ECMSectionWasRemoved=A pasta <b>%s</b> foi eliminada ECMSearchByKeywords=Busca usando palavras chave ECMSearchByEntity=Busca por objeto +ECMDocsBy=Documentos vinculados a %s ShowECMSection=Exibir pasta DeleteSection=Apagar pasta ConfirmDeleteSection=Por favor confirmar a remocao do diretorio <b>%s</b>? @@ -28,3 +29,6 @@ DirNotSynchronizedSyncFirst=Este diretório parece ser criado ou modificado fora ReSyncListOfDir=Sincronizar lista de diretórios HashOfFileContent=Hash do conteúdo do arquivo FileNotYetIndexedInDatabase=Arquivo ainda não indexado no banco de dados (tente voltar a carregá-lo) +ExtraFieldsEcmFiles=Campos extras Arquivos Ecm +ExtraFieldsEcmDirectories=Campos extras Diretórios Ecm +ECMSetup=Configuração ECM diff --git a/htdocs/langs/pt_BR/externalsite.lang b/htdocs/langs/pt_BR/externalsite.lang index 00d4c89c287..31cdbccc008 100644 --- a/htdocs/langs/pt_BR/externalsite.lang +++ b/htdocs/langs/pt_BR/externalsite.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Configurar linque para o website externo +ExternalSiteURL=URL de site externo com conteúdo HTML iframe ExternalSiteModuleNotComplete=O módulo SiteExterno não foi configurado corretamente. ExampleMyMenuEntry=Minha entrada do menu diff --git a/htdocs/langs/pt_BR/main.lang b/htdocs/langs/pt_BR/main.lang index 7792b3ddc3c..c4a455b03d6 100644 --- a/htdocs/langs/pt_BR/main.lang +++ b/htdocs/langs/pt_BR/main.lang @@ -103,6 +103,7 @@ Disabled=Desativado AddLink=Adicionar link RemoveLink=Remover o link Update=Modificar +CloseAs=Configurar status para CloseBox=Remover o widget do seu painel de controle ConfirmSendCardByMail=Você realmente deseja enviar o conteúdo deste cartão por e-mail para <b> %s </ b>? Remove=Retirar @@ -123,6 +124,7 @@ Hide=ocultar ShowCardHere=Mostrar cartão SearchMenuShortCut=Ctrl + Shift + F QuickAdd=Adição rápida +SelectAll=Selecionar tudo Resize=Modificar tamanho ResizeOrCrop=Redimensionar ou cortar Recenter=Recolocar no centro @@ -133,6 +135,7 @@ PasswordRetype=Repetir Senha NoteSomeFeaturesAreDisabled=Antenção, só poucos módulos/funcionalidade foram ativados nesta demo NameSlashCompany=Nome / Companhia PersonalValue=Valor Personalizado +OldValue=Valor antigo %s CurrentValue=Valor atual MultiLanguage=Multi Idioma RefOrLabel=Ref. da etiqueta @@ -146,6 +149,7 @@ Limit=Límite Logout=Sair NoLogoutProcessWithAuthMode=No recurso de desconexão aplicativo com modo de autenticação HourStart=Comece hora +Deadline=Prazo final DateAndHour=Data e hora DateEnd=Data de término DateCreationShort=Data Criação @@ -187,7 +191,6 @@ UnitPriceHTCurrency=Preço unitário (sem) (Moeda) UnitPriceTTC=Preço Unit. Total PriceU=Preço Unit. PriceUHT=Preço Unit. -PriceUHTCurrency=U.P (moeda) PriceUTTC=U.P. (inc. Impostos) Amount=Valor AmountInvoice=Valor Fatura @@ -453,8 +456,6 @@ GroupBy=Agrupar por ViewFlatList=Visão da lista resumida RemoveString=Remover string '%s' SomeTranslationAreUncomplete=Alguns dos idiomas oferecidos podem ser apenas parcialmente traduzidos ou podem conter erros. Por favor, ajude a corrigir o seu idioma registrando-se em <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ < / a> para adicionar suas melhorias. -DirectDownloadLink=Link de download direto (público / externo) -DirectDownloadInternalLink=Link de download direto (precisa ser registrado e precisa de permissões) Download=Baixar DownloadDocument=Descarregar documento ActualizeCurrency=Atualizar taxa de câmbio @@ -501,7 +502,6 @@ Monthly=Por mês Remote=Controlo remoto Deletedraft=Excluir rascunho ConfirmMassDraftDeletion=Confirmação de exclusão de massa de esboço -FileSharedViaALink=Arquivo compartilhado via um link SelectAThirdPartyFirst=Selecione um terceiro primeiro ... YouAreCurrentlyInSandboxMode=No momento você está no %s modo "caixa de areia" AnalyticCode=Código analitico diff --git a/htdocs/langs/pt_BR/margins.lang b/htdocs/langs/pt_BR/margins.lang index a8799ab1c20..36c8bb59d1d 100644 --- a/htdocs/langs/pt_BR/margins.lang +++ b/htdocs/langs/pt_BR/margins.lang @@ -8,10 +8,10 @@ margesSetup=Configuração das margens de lucro ProductMargins=Margens de produtos CustomerMargins=Margems de clientes SalesRepresentativeMargins=Tolerância aos representante de vendas +ContactOfInvoice=Contato da fatura UserMargins=Margens do usuário ProductService=Produto ou serviço ForceBuyingPriceIfNull=Compra Força preço / custo para o preço de venda se não definido -ForceBuyingPriceIfNullDetails=Se o preço de compra / custo não definido, e essa opção "ON", a margem será zero em linha (compra / preço = custo preço de venda), caso contrário ("OFF"), marge será igual ao padrão sugerido. MARGIN_METHODE_FOR_DISCOUNT=Metodologia de margem para descontos globais MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Define se um desconto global e tratado como o produto, serviço, ou somente sob o sub-total na margem. MARGIN_TYPE=Compra / Preço de custo sugerido por padrão para cálculo da margem de diff --git a/htdocs/langs/pt_BR/modulebuilder.lang b/htdocs/langs/pt_BR/modulebuilder.lang index e5120fa2996..2abf9cd2abf 100644 --- a/htdocs/langs/pt_BR/modulebuilder.lang +++ b/htdocs/langs/pt_BR/modulebuilder.lang @@ -57,7 +57,6 @@ IncludeDocGeneration=Gerar alguns documentos a partir do objeto IncludeDocGenerationHelp=Se você marcar isto, um código será gerado para adicionar uma caixa "Gerar documento" ao registro. ShowOnCombobox=Mostrar valor na caixa de combinação KeyForTooltip=Chave para dica de ferramenta -CSSClass=Classe CSS NotEditable=Não editável ForeignKey=Chave estrangeira AsciiToHtmlConverter=Converter ASCII para HTML diff --git a/htdocs/langs/pt_BR/orders.lang b/htdocs/langs/pt_BR/orders.lang index 79cde2cf111..f6d903c07da 100644 --- a/htdocs/langs/pt_BR/orders.lang +++ b/htdocs/langs/pt_BR/orders.lang @@ -111,11 +111,12 @@ TypeContact_order_supplier_external_SHIPPING=Contato de remessa do fornecedor TypeContact_order_supplier_external_CUSTOMER=Ordem de acompanhamento de contato do fornecedor Error_OrderNotChecked=Nenhum pedido seleçionado para se faturar OrderByEMail=E-mail -PDFEinsteinDescription=Modelo de pedido completo +PDFEinsteinDescription=Modelo de pedido completo (implementação antiga do modelo Eratosthene) PDFEratostheneDescription=Modelo completo de pedidos PDFEdisonDescription=O modelo simplificado do pedido PDFProformaDescription=Modelo completo de fatura Proforma CreateInvoiceForThisCustomer=Faturar pedidos +CreateInvoiceForThisSupplier=Faturar pedidos NoOrdersToInvoice=Nenhum pedido faturavel CloseProcessedOrdersAutomatically=Classificar como "processados" todos os pedidos selecionados. OrderCreation=Criação de pedidos diff --git a/htdocs/langs/pt_BR/productbatch.lang b/htdocs/langs/pt_BR/productbatch.lang index 3482315dc9c..214042acf7e 100644 --- a/htdocs/langs/pt_BR/productbatch.lang +++ b/htdocs/langs/pt_BR/productbatch.lang @@ -1,7 +1,9 @@ # Dolibarr language file - Source file is en_US - productbatch ManageLotSerial=Use lote / número de série -ProductStatusOnBatch=Sim (lote / série necessário) +ProductStatusOnBatch=Sim (lote obrigatório) +ProductStatusOnSerial=Sim (número de série exclusivo necessário) ProductStatusNotOnBatch=Não (lote / série não utilizado) +ProductStatusOnBatchShort=Lot. Batch=Lote / Série atleast1batchfield=Compra prazo de validade ou data de venda ou Lote / Número de série batch_number=Lote / Número de série @@ -13,7 +15,13 @@ printEatby=Compra-por: %s printSellby=Venda-por: %s printQty=Qtde: %d AddDispatchBatchLine=Adicione uma linha para Shelf Life expedição +WhenProductBatchModuleOnOptionAreForced=Quando o módulo Lote / Série está ativado, a redução automática de estoque é forçada a 'Diminuir estoques reais na validação do envio' e o modo de aumento automático é forçado a 'Aumentar estoques reais no despacho manual em depósitos' e não pode ser editado. Outras opções podem ser definidas como você deseja. ProductDoesNotUseBatchSerial=Este produto não utiliza Lote / número de série ProductLotSetup=Configuração do módulo lote/nº de série ShowCurrentStockOfLot=Exibir o estoque atual para o produto/lote ShowLogOfMovementIfLot=Exibir o registro de movimentações para o produto/lote +SerialNumberAlreadyInUse=O número de série %s já é usado para o produto %s +TooManyQtyForSerialNumber=Você só pode ter um produto %s para o número de série %s +BatchLotNumberingModules=Opções para geração automática de produtos em lote gerenciados por lotes +BatchSerialNumberingModules=Opções para geração automática de produtos em lote gerenciados por números de série +QtyToAddAfterBarcodeScan=Quantidade a adicionar para cada código de barras / lote / série digitalizada diff --git a/htdocs/langs/pt_BR/products.lang b/htdocs/langs/pt_BR/products.lang index ca73468eb49..a6538a7a297 100644 --- a/htdocs/langs/pt_BR/products.lang +++ b/htdocs/langs/pt_BR/products.lang @@ -166,7 +166,6 @@ GlobalVariableUpdaterType1=Dados WebService GlobalVariableUpdaterHelp1=Analisa os dados WebService de URL especificada, NS especifica o namespace, valor especifica a localização de valor relevante, os dados devem conter os dados para enviar e método é o método chamando WS PropalMergePdfProductActualFile=Usar arquivos para adicionar em PDF Azur são / é PropalMergePdfProductChooseFile=Selecione os arquivos PDF -IncludingProductWithTag=Incluindo produto/serviço com tag DefaultPriceRealPriceMayDependOnCustomer=Preço padrão, o preço real pode depender do cliente NbOfQtyInProposals=Qtde nas Propostas ClinkOnALinkOfColumn=Clique no link da coluna %s para ter uma visão detalhada... diff --git a/htdocs/langs/pt_BR/propal.lang b/htdocs/langs/pt_BR/propal.lang index 637bc0f1179..3e2b3ad68cb 100644 --- a/htdocs/langs/pt_BR/propal.lang +++ b/htdocs/langs/pt_BR/propal.lang @@ -45,6 +45,7 @@ ConfirmClonePropal=Tem certeza que quer clonar a proposta comercial <b>%s</b>? ConfirmReOpenProp=Tem certeza que quer reabrir a proposta comercial <b>%s</b>? ProposalsAndProposalsLines=Propostas para clientes e diretrizes para apresentação de propostas ProposalLine=Linha da Proposta +ProposalLines=Linhas do orçamento AvailabilityPeriod=Prazo de entrega SetAvailability=Atraso de entrega AfterOrder=Apos o pedido @@ -62,3 +63,6 @@ DefaultModelPropalClosed=Modelo padrao no fechamento da proposta comercial (nao ProposalCustomerSignature=Aceite por escrito, carimbo da empresa, data e assinatura ProposalsStatisticsSuppliers=Estatísticas de propostas de fornecedores CaseFollowedBy=Caso seguido por +SignedOnly=Apenas assinado +IdProposal=ID da proposta +IdProduct=ID do produto diff --git a/htdocs/langs/pt_BR/stocks.lang b/htdocs/langs/pt_BR/stocks.lang index dd94641fec9..80ddaec846f 100644 --- a/htdocs/langs/pt_BR/stocks.lang +++ b/htdocs/langs/pt_BR/stocks.lang @@ -10,8 +10,6 @@ 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 @@ -21,6 +19,7 @@ MovementId=ID de movimento StockMovementForId=ID de movimento %d StocksArea=Setor de armazenagem AllWarehouses=Todos os armazéns +IncludeEmptyDesiredStock=Inclui também estoque negativo com estoque desejado indefinido IncludeAlsoDraftOrders=Incluir também projetos de pedidos NumberOfProducts=Número total de produtos LastMovement=Último movimento @@ -34,10 +33,12 @@ 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 +WarehouseAskWarehouseDuringPropal=Definir um armazém em propostas comerciais 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 +MainDefaultWarehouseUserDesc=Ao ativar esta opção, durante a criação de um produto, o armazém atribuído ao produto será definido neste. Se nenhum warehouse for definido no usuário, o warehouse padrão será definido. QtyDispatched=Quantidade despachada QtyDispatchedShort=Qtde despachada QtyToDispatchShort=Qtde a despachar @@ -57,6 +58,9 @@ 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 +VirtualStockAtDate=Estoque virtual na data +VirtualStockDesc=O estoque virtual é o estoque calculado disponível uma vez que todas as ações abertas / pendentes (que afetam os estoques) são fechadas (pedidos de compra recebidos, pedidos de vendas enviados, pedidos de fabricação produzidos, etc) +AtDate=Na data IdWarehouse=Id. armazenamento DescWareHouse=Descrição do armazém LieuWareHouse=Localização do armazenamento @@ -77,6 +81,9 @@ DesiredStockDesc=Esta quantidade será usada para determinar o estoque a ser rep StockToBuy=Para encomendar Replenishment=Reposição ReplenishmentOrders=Pedidos de reposição +VirtualDiffersFromPhysical=De acordo com o aumento / diminuição das opções de ações, o estoque físico e o estoque virtual (estoque físico + pedidos em aberto) podem ser diferentes +UseRealStockByDefault=Usar estoque real, em vez de estoque virtual, para recurso de reposição +ReplenishmentCalculation=O valor do pedido será (quantidade desejada - estoque real) em vez de (quantidade desejada - estoque virtual) UseVirtualStock=Usar estoque virtual UsePhysicalStock=Usar estoque físico CurentlyUsingVirtualStock=Estoque virtual @@ -84,10 +91,12 @@ CurentlyUsingPhysicalStock=Estoque físico RuleForStockReplenishment=Regra para a reposição de estoques SelectProductWithNotNullQty=Selecione pelo menos um produto com uma quantidade não nula e um fornecedor AlertOnly=Alertas apenas +IncludeProductWithUndefinedAlerts =Incluir também estoque negativo para produtos sem quantidade desejada definida, para restaurá-los a 0 WarehouseForStockDecrease=Os arquivos serão utilizados para redução estoque WarehouseForStockIncrease=O arquivos serão utilizados para aumento de ForThisWarehouse=Para este armazenamento ReplenishmentStatusDesc=Esta é uma lista de todos os produtos com um estoque menor que o estoque desejado (ou menor que o valor de alerta, se a caixa de seleção "somente alerta" estiver marcada). Usando a caixa de seleção, você pode criar pedidos para preencher a diferença. +ReplenishmentStatusDescPerWarehouse=Se você deseja um reabastecimento com base na quantidade desejada definida por depósito, você deve adicionar um filtro no depósito. ReplenishmentOrdersDesc=Esta é uma lista de todos os pedidos de compra em aberto, incluindo produtos predefinidos. Somente pedidos abertos com produtos predefinidos, portanto, os pedidos que podem afetar os estoques são visíveis aqui. NbOfProductBeforePeriod=Quantidade de produtos em estoque antes do período selecionado NbOfProductAfterPeriod=Quantidade de produtos em estoque período selecionado depois @@ -125,3 +134,9 @@ 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) +StockAtDatePastDesc=Você pode ver aqui o estoque (estoque real) em uma determinada data no passado +CurrentStock=Estoque atual +InventoryRealQtyHelp=Defina o valor como 0 para redefinir o campo qty <br> Keep vazio ou remova a linha para mantê-lo inalterado +UpdateByScaningProductBarcode=Atualização por digitalização (código de barras do produto) +UpdateByScaningLot=Atualizar por varredura (lote | código de barras serial) +DisableStockChangeOfSubProduct=Desative a mudança de estoque para todos os subprodutos deste Kit durante esta movimentação. diff --git a/htdocs/langs/pt_BR/suppliers.lang b/htdocs/langs/pt_BR/suppliers.lang index e3155bfae84..28c08da7876 100644 --- a/htdocs/langs/pt_BR/suppliers.lang +++ b/htdocs/langs/pt_BR/suppliers.lang @@ -28,6 +28,7 @@ MenuOrdersSupplierToBill=Pedidos de compra para fatura NbDaysToDelivery=Tempo de entrega (dias) DescNbDaysToDelivery=O maior atraso de entrega de produtos deste pedido SupplierReputation=Reputação do fornecedores +ReferenceReputation=Reputação de referência DoNotOrderThisProductToThisSupplier=Não pedir NotTheGoodQualitySupplier=Baixa qualidade AllProductServicePrices=Todos os preços dos produtos / serviços diff --git a/htdocs/langs/pt_BR/ticket.lang b/htdocs/langs/pt_BR/ticket.lang index 2f52343c451..b88555bee7f 100644 --- a/htdocs/langs/pt_BR/ticket.lang +++ b/htdocs/langs/pt_BR/ticket.lang @@ -36,18 +36,14 @@ TicketUrlPublicInterfaceHelpAdmin=É possivel definir um alias para o servidor W TicketsDisableEmail=Não envie e-mails para criação de bilhetes ou gravação de mensagens TicketsDisableEmailHelp=Por padrão, os e-mails são enviados quando novos bilhetes ou mensagens são criados. Ative esta opção para desativar * todas as notificações por e-mail TicketsLogEnableEmail=Ativar log por e-mail -TicketsEmailAlsoSendToMainAddress=Também enviar notificação para o endereço de e-mail principal -TicketsEmailAlsoSendToMainAddressHelp=Ative esta opção para enviar um e-mail para o endereço "Notificação de e-mail de" (veja a configuração abaixo) TicketsLimitViewAssignedOnly=Restringir a exibição aos tiquetes atribuídos ao usuário atual (não efetivo para usuários externos, sempre limitado à terceira parte da qual eles dependem) TicketsLimitViewAssignedOnlyHelp=Somente bilhetes atribuídos ao usuário atual ficarão visíveis. Não se aplica a um usuário com direitos de gerenciamento de bilhetes. TicketsActivatePublicInterfaceHelp=A interface pública permite que qualquer visitante crie bilhetes. 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 diff --git a/htdocs/langs/pt_BR/users.lang b/htdocs/langs/pt_BR/users.lang index 07fd926c913..aff26cf4ed4 100644 --- a/htdocs/langs/pt_BR/users.lang +++ b/htdocs/langs/pt_BR/users.lang @@ -60,7 +60,6 @@ LoginAccountDisableInDolibarr=A conta está desativada no Dolibarr ExportDataset_user_1=Usuários e suas propriedades DomainUser=Usuário de Domínio CreateInternalUserDesc=Este formulário permite que você crie um usuário interno em sua empresa / organização. Para criar um usuário externo (cliente, fornecedor, etc.), use o botão 'Criar usuário Dolibarr' do cartão de contato de terceiros. -InternalExternalDesc=Usuário <b>interno</b> é um usuário que faz parte da sua empresa / organização. <br>Usuário <b>externo</b> é um cliente, fornecedor ou outro (a criação de um usuário externo para terceiros pode ser feita a partir do registro de contatos de terceiros). <br><br>Nos dois casos, as permissões definem os direitos no Dolibarr, também o usuário externo pode ter um gerenciador de menu diferente do usuário interno (consulte Página inicial - Configuração - Tela) PermissionInheritedFromAGroup=A permissão dá-se já que o herda de um grupo ao qual pertence o usuário. UserWillBeInternalUser=Usuario criado sera um usuario interno (porque nao esta conectado a um particular terceiro) UserWillBeExternalUser=Usuario criado sera um usuario externo (porque esta conectado a um particular terceiro) @@ -95,7 +94,7 @@ 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 +DateEmploymentstart=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 ForceUserExpenseValidator=Forçar validação do relatório de despesas diff --git a/htdocs/langs/pt_BR/website.lang b/htdocs/langs/pt_BR/website.lang index 44be6ab3faf..b7439263c5b 100644 --- a/htdocs/langs/pt_BR/website.lang +++ b/htdocs/langs/pt_BR/website.lang @@ -32,7 +32,6 @@ ExampleToUseInApacheVirtualHostConfig=Exemplo a ser usado na configuração do h YouCanAlsoTestWithPHPS=<u> Usar com servidor embutido em PHP </ u> <br> No ambiente de desenvolvimento, você pode preferir testar o site com o servidor da Web incorporado em PHP (o PHP 5.5 é necessário) executando o <strong> php -S 0.0. 0,0: 8080 -t %s </ strong> TestDeployOnWeb=Testar / implementar na web PreviewSiteServedByWebServer=<u> Visualize %s em uma nova guia. </ u> <br> <br> O %s será servido por um servidor web externo (como Apache, Nginx, IIS). Você deve instalar e configurar este servidor antes de apontar para o diretório: <br> <strong> %s </ strong> <br> URL servido por servidor externo: <br> <strong> %s </ strong> -PreviewSiteServedByDolibarr=<u> Visualize %s em uma nova guia. </ u> <br> <br> O %s será servido pelo servidor Dolibarr para que não seja necessário instalar qualquer servidor web extra (como Apache, Nginx, IIS). < br> O inconveniente é que o URL das páginas não é amigável e comece com o caminho do seu Dolibarr. URL de URL servido por Dolibarr: <br> <strong> %s </ strong> <br> <br> Para usar o seu próprio servidor web externo para servir este site, crie um host virtual em seu servidor web que aponte para o diretório <br> <strong> %s </ strong> <br> e digite o nome deste servidor virtual e clique no outro botão de visualização . VirtualHostUrlNotDefined=URL do host virtual veiculado pelo servidor web externo não definido NoPageYet=Ainda não há páginas SyntaxHelp=Ajuda sobre dicas de sintaxe específicas diff --git a/htdocs/langs/pt_BR/zapier.lang b/htdocs/langs/pt_BR/zapier.lang index a89605c4809..a1150fab1bc 100644 --- a/htdocs/langs/pt_BR/zapier.lang +++ b/htdocs/langs/pt_BR/zapier.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - zapier ModuleZapierForDolibarrName =Zapier para Dolibarr ModuleZapierForDolibarrDesc =Módulo Zapier para Dolibarr -ZapierForDolibarrSetup =Configurações do Zapier para Dolibarr +ZapierForDolibarrSetup=Configurações do Zapier para Dolibarr +ZapierDescription=Interface com Zapier diff --git a/htdocs/langs/pt_PT/accountancy.lang b/htdocs/langs/pt_PT/accountancy.lang index 5f98a41fc2e..9c2a8102eac 100644 --- a/htdocs/langs/pt_PT/accountancy.lang +++ b/htdocs/langs/pt_PT/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Linhas vinculadas de faturas ExpenseReportLines=Linhas de relatórios de despesas para vincular ExpenseReportLinesDone=Linhas vinculadas de relatórios de despesas IntoAccount=Vincular linha com a conta contabilística -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Vincular @@ -209,7 +209,7 @@ Codejournal=Diário JournalLabel=Journal label NumPiece=Número da peça TransactionNumShort=Núm. de transação -AccountingCategory=Grupos personalizados +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Você pode definir aqui alguns grupos de conta contábil. Eles serão usados ​​para relatórios contábeis personalizados. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Linhas ainda não encadernadas, use o menu <a href="% ## Import ImportAccountingEntries=Entradas contábeis +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Date export WarningReportNotReliable=Atenção, este relatório não é baseado no Ledger, portanto, não contém transações modificadas manualmente no Ledger. Se a sua periodização estiver atualizada, a visão da contabilidade será mais precisa. ExpenseReportJournal=Diário de relatórios de despesas InventoryJournal=Diário de Inventário + +NAccounts=%s accounts diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 6db6d8a49dc..b5400f7bcac 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -9,7 +9,7 @@ VersionExperimental=Experimental VersionDevelopment=Desenvolvimento VersionUnknown=Desconhecida VersionRecommanded=Recomendada -FileCheck=Fileset Integrity Checks +FileCheck=Verificações de integridade do conjunto de ficheiros 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=A integridade dos ficheiros é ajustada rigorosamente conforme a referência. FileIntegrityIsOkButFilesWereAdded=A verificação de integridade dos arquivos passou, no entanto, alguns novos arquivos foram adicionados. @@ -37,8 +37,9 @@ UnlockNewSessions=Remover bloqueio de ligação YourSession=A sua sessão Sessions=Sessões de usuários WebUserGroup=Utilizador/grupo do servidor da Web -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +PermissionsOnFiles=Permissões em ficheiros +PermissionsOnFilesInWebRoot=Permissões em ficheiros na pasta web principal +PermissionsOnFile=Permissões em ficheiros %s NoSessionFound=Sua configuração de PHP parece não permitir a listagem de sessões ativas. O diretório usado para salvar as sessões (<b> %s </b>) pode ser protegido (por exemplo, pelas permissões do sistema operacional ou pela diretiva open_basedir do PHP). DBStoringCharset=Conjunto de carateres da base de dados para guardar os dados DBSortingCharset=Conjunto de carateres da base de dados para ordenar os dados @@ -62,6 +63,7 @@ IfModuleEnabled=Nota: sim, só é eficaz se o <b>módulo %s</b> estiver ativado RemoveLock=Remova / renomeie o arquivo <b> %s </b> se existir, para permitir o uso da ferramenta Atualizar / Instalar. RestoreLock=Restaure o arquivo <b> %s </b>, apenas com permissão de leitura, para desativar qualquer uso posterior da ferramenta Atualizar / Instalar. SecuritySetup=Configuração de segurança +PHPSetup=PHP setup SecurityFilesDesc=Defina aqui opções relacionadas com a segurança de ficheiros carregados. ErrorModuleRequirePHPVersion=Erro, este módulo requer a versão %s ou superior do PHP ErrorModuleRequireDolibarrVersion=Erro, este módulo requer a versão %s ou superior do Dolibarr @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Esta área fornece funções de administração. Use o menu Purge=Limpar PurgeAreaDesc=Esta página permite excluir todos os arquivos gerados ou armazenados pelo Dolibarr (arquivos temporários ou todos os arquivos no diretório <b> %s </b>). Usar esse recurso normalmente não é necessário. Ele é fornecido como uma solução alternativa para usuários cujo Dolibarr é hospedado por um provedor que não oferece permissões para excluir arquivos gerados pelo servidor da web. PurgeDeleteLogFile=Eliminar os ficheiros de registo, incluindo <b>%s</b> definido para o módulo Syslog (não existe risco de perda de dados) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Exclua todos os arquivos do diretório: <b> %s </b>. <br> Isso excluirá todos os documentos gerados relacionados aos elementos (terceiros, faturas etc ...), arquivos carregados no módulo ECM, despejos de backup de banco de dados e arquivos temporários. PurgeRunNow=Limpar agora @@ -232,6 +234,7 @@ BoxesAvailable=Aplicativos disponíveis BoxesActivated=Aplicativos ativados ActivateOn=Ativar sobre ActiveOn=Ativado sobre +ActivatableOn=Activatable on SourceFile=Ficheiro origem AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponível somente se o JavaScript e Ajax estiverem ativos Required=Requerido @@ -347,9 +350,10 @@ LastActivationAuthor=Autor mais recente de ativação LastActivationIP=Último IP ativo UpdateServerOffline=Atualizar servidor offline WithCounter=Gerir um contador -GenericMaskCodes=Pode introduzir qualquer máscara numérica. Nesta máscara, pode utilizar as seguintes etiquetas: <br><b>{000000}</b> corresponde a um número que se incrementa em cada um de %s. Introduza um número de zeros idêntico ao comprimento do número que deseja mostrar. O contador completar-se-á a partir de zeros pela esquerda de forma a ter tantos zeros como a máscara. <br><b>{000000+000}</b> igual ao anterior, com uma compensação em algarismos correspondente ao número à direita do sinal + que é aplicada a partir do primeiro %s. <br><b>{000000@x}</b> igual ao anterior, mas o contador volta a zero quando se chega ao mês x (x entre 1 e 12, 0 para usar o primeiros meses do mês fiscal definido na sua configuração, 99 para voltar a zero todos os meses). Se esta opção se utiliza e x é igual ou superior a 2, então a sequência {yy}{mm} ou {yyyy}{mm} também é necessária. <br><b>{dd}</b> días (01 a 31). <br><b>{mm}</b> mês (01 a 12). <br><b>{yy}</b>, <b>{yyyy}</b> ou <b>{y}</b> ano formatado em 2, 4 ou 1 algarismos.<br> -GenericMaskCodes2=<b>{cccc}</b> o código do cliente em N carateres<br><b>{cccc000}</b> o código de cliente em N carateres, seguido de um contador dedicado para o cliente. Este contador é reiniciado ao mesmo tempo que o contador global.<br><b>{tttt}</b> O código do tipo de terceiro em N carateres (consulte o menu Início->Configuração->Dicionário->Tipos de terceiros). Se adicionou esta etiqueta, o contador será diferente para cada tipo de terceiro.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Quaisquer outros caracteres na máscara não sofrerão alterações.<br>Não são permitidos espaços.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Exemplo no 99º %s de terceiro 'A Empresa', com a data 31-01-2007:</u><br> GenericMaskCodes4b=<u>Exemplo sobre um terceiro criado a 31-03-2007:</u><br> GenericMaskCodes4c=<u>Exemplo no produto criado a 01-03-2007:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Deixar esse campo em branco significa que esse valor ExtrafieldParamHelpselect=Lista de valores devem ser linhas com chave de formato, o valor (onde chave pode não ser '0') <br> <br> por exemplo: <br> 1, value1 <br> 2, value2 <br> code3, value3 <br> ... <br> <br> A fim de ter o lista dependendo de outra lista de atributos complementares: <br> 1, value1 | options_ <i> parent_list_code </i>: Parent_Key <br> 2, value2 | options_ <i> parent_list_code </i>: Parent_Key <br> <br> para ter a lista de acordo com uma outra lista: <br> 1, value1 | <i> parent_list_code </i>: parent_key <br> 2, valor2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=A lista de valores deve ser composta por linhas com chave de formato, valor (onde a chave não pode ser '0') <br> <br> por exemplo: <br> 1, valor1 <br> 2, valor2 <br>19bz3, valor3 ExtrafieldParamHelpradio=A lista de valores deve ser composta por linhas com chave de formato, valor (onde a chave não pode ser '0') <br> <br> por exemplo: <br> 1, valor1 <br> 2, valor2 <br>19bz3, valor3 -ExtrafieldParamHelpsellist=A lista de valores vem de uma tabela <br> Sintaxe: table_name: label_field: id_field :: filter <br> Exemplo: c_typent: libelle: id :: filter <br> <br> - id_fieldcampo int = 1) para exibir apenas o valor ativo <br> Você também pode usar $ ID $ no filtro que é o id atual do objeto atual <br> Para usar um SELECT no filtro, use a palavra-chave $ SEL $ para ignorar a proteção anti-injeção. <br> se você quiser filtrar por campos extras, use a sintaxe extra.fieldcode = ... (onde o código do campo é o código do campo extra) <br> <br> Para ter a lista dependendo de outra lista de opções de atributos complementares: <br>: libelle: idpent_ c_typent: <i> parent_list_code </i> | parent_column: filtro <br> <br> para ter a lista de acordo com uma outra lista: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: Filtro -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Biblioteca utilizada para gerar PDF @@ -541,6 +545,8 @@ Module40Name=Fornecedores Module40Desc=Fornecedores e gestão de compras (ordens de compra e faturamento de faturas de fornecedores) Module42Name=Registos Debug Module42Desc=Funções de registo de eventos (ficheiro, registo do sistema, ...). Tais registos, são para fins técnicos/depuração. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editores Module49Desc=Gestão de editores Module50Name=Produtos @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Capacidades de conversões GeoIP Maxmind Module3200Name=Arquivos inalteráveis Module3200Desc=Ativar um registro inalterável de eventos de negócios. Eventos são arquivados em tempo real. O log é uma tabela somente leitura de eventos encadeados que podem ser exportados. Este módulo pode ser obrigatório para alguns países. +Module3400Name=Redes sociais +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=GRH Module4000Desc=Gestão de recursos humanos (gestão de departamento e contratos de funcionários) Module5000Name=Multiempresa Module5000Desc=Permite-lhe gerir várias empresas -Module6000Name=Fluxo de trabalho -Module6000Desc=Gerenciamento de fluxo de trabalho (criação automática de objeto e / ou mudança automática de status) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Sites da Web 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. Module20000Name=Gerenciamento de solicitação de licença @@ -805,7 +813,8 @@ PermissionAdvanced253=Criar/modificar utilizadores internos/externos e permissõ Permission254=Criar/modificar apenas utilizadores externos Permission255=Modificar a palavra-passe de outros utilizadores Permission256=Eliminar ou desativar outros utilizadores -Permission262=Estenda o acesso a todos os terceiros (não apenas terceiros para os quais o usuário é um representante de vendas). <br> Não é eficaz para usuários externos (sempre limitados a eles próprios para propostas, pedidos, faturas, contratos, etc.). <br> Não efetivo para projetos (apenas regras sobre permissões de projeto, visibilidade e questões de atribuição). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Consultar CA Permission272=Consultar faturas Permission273=Emitir fatura @@ -1175,7 +1184,8 @@ SetupDescription2=As duas seções a seguir são obrigatórias (as duas primeira SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Parâmetros básicos usados para personalizar o comportamento padrão de seu aplicativo (por exemplo, para recursos relacionados ao país). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Este software é um conjunto de vários módulos / aplicativos. Os módulos relacionados às suas necessidades devem ser habilitados e configurados. As entradas do menu aparecerão com a ativação desses módulos. SetupDescription5=Outras entradas do menu Setup gerenciam parâmetros opcionais. -LogEvents=Eventos de auditoria da segurança +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Auditoria InfoDolibarr=Sobre o Dolibarr InfoBrowser=Sobre o navegador @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=A execução do processo de atualização pare YouMustRunCommandFromCommandLineAfterLoginToUser=Deve executar este comando a partir de uma linha de comandos depois de iniciar a sessão, na linha de comandos, com o utilizador <b>%s</b> ou deve adicionar a opção -W no fim da linha de comando para indicar a palavra-passe <b>%s</b>. YourPHPDoesNotHaveSSLSupport=Funções SSL não estão disponíveis no seu PHP DownloadMoreSkins=Mais temas para descarregar -SimpleNumRefModelDesc=Retorna o número de referência com o formato %syymm-nnnn onde yy é o ano, mm é o mês e nnnn é sequencial sem redefinir +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Mostrar id profissional com endereços ShowVATIntaInAddress=Ocultar número de IVA intracomunitário com endereços TranslationUncomplete=Tradução parcial @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Servidor proxy: Nome / Endereço MAIN_PROXY_PORT=Servidor proxy: porta MAIN_PROXY_USER=Servidor proxy: Login / usuário MAIN_PROXY_PASS=Servidor proxy: senha -DefineHereComplementaryAttributes=Defina aqui quaisquer atributos adicionais / personalizados que deseja incluir: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Atributos complementares ExtraFieldsLines=Atributos complementares (linhas) ExtraFieldsLinesRec=Atributos complementares (linhas de faturas de modelos) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Nome de utilizador (Unix) LDAPFieldLoginExample=Exemplo: uid LDAPFilterConnection=Filtro de pesquisa LDAPFilterConnectionExample=Exemplo: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Nome de utilizador (samba, activedirectory) LDAPFieldLoginSambaExample=Exemplo: samaccountname LDAPFieldFullname=Nome completo @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=A sua empresa foi definida para não utilizar IVA (Iní AccountancyCode=Código de Contabilidade AccountancyCodeSell=Código de contabilidade de vendas AccountancyCodeBuy=Código de contabilidade de compras +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Configuração do módulo "Eventos e agenda" PasswordTogetVCalExport=Chave de autorização para exportação do link vcal. +SecurityKey = Security Key PastDelayVCalExport=Não exportar evento com mais de AGENDA_USE_EVENT_TYPE=Use tipos de eventos (gerenciados no menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Definir automaticamente este valor padrão para o tipo de evento no formulário de criação de evento @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=A cor do fundo para as linhas ímpares da tabela BackgroundTableLineEvenColor=Cor de fundo para linhas pares da tabela MinimumNoticePeriod=Período mínimo de notificação (o seu pedido de licença deve ser feito antes deste período) NbAddedAutomatically=Número de dias adicionados ao contadores dos utilizadores (automaticamente) cada mês -EnterAnyCode=Este campo contém uma referência para identificar a linha. Digite qualquer valor sem caracteres especiais. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Várias variantes de idiomas encontradas RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Filtro Regex para limpar valor (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Configuração do módulo Redes Sociais EnableFeatureFor=Ativar recursos para <strong> %s </ strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Coletor de e-mail EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=Novo coletor de email @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/pt_PT/agenda.lang b/htdocs/langs/pt_PT/agenda.lang index de774f7acff..0a545f07030 100644 --- a/htdocs/langs/pt_PT/agenda.lang +++ b/htdocs/langs/pt_PT/agenda.lang @@ -4,7 +4,7 @@ Actions=Eventos Agenda=Agenda TMenuAgenda=Agenda Agendas=Agendas -LocalAgenda=Calendário interno +LocalAgenda=Calendário predefinido ActionsOwnedBy=Evento de ActionsOwnedByShort=Proprietário AffectedTo=Atribuído a @@ -14,13 +14,13 @@ EventsNb=Número de eventos ListOfActions=Lista de Eventos EventReports=Relatórios de eventos Location=Localização -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=Evento atribuído a qualquer utilizador do grupo EventOnFullDay=Evento para todo(s) o(s) dia(s) MenuToDoActions=Todos os eventos incompletos MenuDoneActions=Todos os eventos terminados MenuToDoMyActions=Os meus eventos incompletos MenuDoneMyActions=Os meus eventos terminados -ListOfEvents=Lista de eventos (calendário interno) +ListOfEvents=Lista de eventos (calendário predefinido) ActionsAskedBy=Eventos reportados por ActionsToDoBy=Eventos atribuídos a ActionsDoneBy=Eventos realizados por @@ -31,8 +31,8 @@ ViewWeek=Vista semanal ViewPerUser=Vista por utilizador ViewPerType=Vista por tipo AutoActions= Preenchimento automático -AgendaAutoActionDesc= Here you may define events which you want Dolibarr to create automatically in Agenda. If nothing is checked, only manual actions will be included in logs and displayed in Agenda. Automatic tracking of business actions done on objects (validation, status change) will not be saved. -AgendaSetupOtherDesc= This page provides options to allow the export of your Dolibarr events into an external calendar (Thunderbird, Google Calendar etc...) +AgendaAutoActionDesc= Aqui você pode definir eventos que deseja que o Dolibarr crie automaticamente na Agenda. Se nada for marcado, apenas as ações manuais serão incluídas nos logs e exibidas na Agenda. O rastreamento automático de ações de negócios feitas em objetos (validação, mudança de status) não será salvo. +AgendaSetupOtherDesc= Esta página oferece opções para permitir a exportação de seus eventos Dolibarr para uma agenda externa (Thunderbird, Google Agenda etc ...) AgendaExtSitesDesc=Esta página permite declarar as fontes externas de calendários para ver os seus eventos na agenda do Dolibarr. ActionsEvents=Eventos em que o Dolibarr criará uma acção em agenda automáticamente EventRemindersByEmailNotEnabled=Os lembretes de eventos por email não foram ativados na configuração do módulo %s. @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Expedição %s, classificada como faturada ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified re-open ShipmentBackToDraftInDolibarr=Shipment %s go back to draft status ShipmentDeletedInDolibarr=Expedição %s, eliminada -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Receção %s validada OrderCreatedInDolibarr=Encomenda %s, criada OrderValidatedInDolibarr=Encomenda %s, validada OrderDeliveredInDolibarr=Encomenda %s, classificada como entregue @@ -72,22 +72,22 @@ OrderBilledInDolibarr=Encomenda %s, classificada como faturada OrderApprovedInDolibarr=Encomenda %s, aprovada OrderRefusedInDolibarr=Encomenda %s, recusada OrderBackToDraftInDolibarr=Encomenda %s, voltou ao estado de rascunho -ProposalSentByEMail=Commercial proposal %s sent by email -ContractSentByEMail=Contract %s sent by email -OrderSentByEMail=Sales order %s sent by email -InvoiceSentByEMail=Customer invoice %s sent by email -SupplierOrderSentByEMail=Purchase order %s sent by email -ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted -SupplierInvoiceSentByEMail=Vendor invoice %s sent by email -ShippingSentByEMail=Shipment %s sent by email +ProposalSentByEMail=Proposta comercial %s enviada por email +ContractSentByEMail=Contrato %s enviado por email +OrderSentByEMail=Pedido de venda %s enviado por e-mail +InvoiceSentByEMail=Fatura do cliente %s enviada por e-mail +SupplierOrderSentByEMail=Pedido de compra %s enviado por e-mail +ORDER_SUPPLIER_DELETEInDolibarr=Ordem de compra %s removida +SupplierInvoiceSentByEMail=Fatura do fornecedor %s enviada por e-mail +ShippingSentByEMail=Remessa %s enviada por e-mail ShippingValidated= Expedição %s, validada -InterventionSentByEMail=Intervention %s sent by email +InterventionSentByEMail=Intervenção %s enviada por email ProposalDeleted=Orçamento eliminado OrderDeleted=Encomenda eliminada InvoiceDeleted=Fatura eliminada -DraftInvoiceDeleted=Draft invoice deleted -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +DraftInvoiceDeleted=Factura rascunho apagada +CONTACT_CREATEInDolibarr=Contacto %s criado +CONTACT_DELETEInDolibarr=Contacto %s apagado PRODUCT_CREATEInDolibarr=O produto %s foi criado PRODUCT_MODIFYInDolibarr=O produto %s foi modificado PRODUCT_DELETEInDolibarr=O produto %s foi eliminado @@ -119,6 +119,7 @@ MRP_MO_UNVALIDATEInDolibarr=MO set to draft status MRP_MO_PRODUCEDInDolibarr=MO produced MRP_MO_DELETEInDolibarr=MO deleted MRP_MO_CANCELInDolibarr=MO canceled +PAIDInDolibarr=%s paid ##### End agenda events ##### AgendaModelModule=Modelos de documento para o evento DateActionStart=Data de início @@ -130,7 +131,7 @@ AgendaUrlOptions4=<b>logint =%s</b> para restringir a saída às ações atribu AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> para que apenas obtenha eventos vinculados ao projeto <b>__PROJECT_ID__ </b>. AgendaUrlOptionsNotAutoEvent=<b> notactiontype = systemauto </ b> para excluir eventos automáticos. AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays. -AgendaShowBirthdayEvents=Mostrar aniversários dos contactos +AgendaShowBirthdayEvents=Birthdays of contacts AgendaHideBirthdayEvents=Ocultar aniversários dos contactos Busy=Ocupado ExportDataset_event1=Lista de eventos da agenda @@ -152,6 +153,7 @@ ActionType=Tipo de evento DateActionBegin=Data de início do evento ConfirmCloneEvent=Tem a certeza que quer clonar o evento <b>%s</b>? RepeatEvent=Repetir evento +OnceOnly=Once only EveryWeek=Semanalmente EveryMonth=Mensalmente DayOfMonth=Dia do mês @@ -165,4 +167,4 @@ 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 +BrowserPush=Browser Popup Notification diff --git a/htdocs/langs/pt_PT/banks.lang b/htdocs/langs/pt_PT/banks.lang index 93df84b3707..71855ac6da8 100644 --- a/htdocs/langs/pt_PT/banks.lang +++ b/htdocs/langs/pt_PT/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Seu mandato SEPA FindYourSEPAMandate=Este é o seu mandato da SEPA para autorizar a nossa empresa a efetuar um pedido de débito direto ao seu banco. Devolva-o assinado (digitalização do documento assinado) ou envie-o por correio para AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/pt_PT/bills.lang b/htdocs/langs/pt_PT/bills.lang index ce7dadc46fc..7ad76c2e3ea 100644 --- a/htdocs/langs/pt_PT/bills.lang +++ b/htdocs/langs/pt_PT/bills.lang @@ -54,9 +54,10 @@ InvoiceCustomer=Fatura a cliente CustomerInvoice=Fatura a cliente CustomersInvoices=Faturas a clientes SupplierInvoice=Fatura de fornecedor -SuppliersInvoices=Faturas de fornecedores +SuppliersInvoices=Faturas do fornecedor +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Fatura de fornecedor -SupplierBills=faturas de fornecedores +SupplierBills=Faturas do fornecedor Payment=Pagamento PaymentBack=Restituição CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Pagamentos já efetuados PaymentsBackAlreadyDone=Reembolsos já feitos PaymentRule=Estado do Pagamento PaymentMode=Tipo de pagamento +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Cartão de débito/crédito PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Data da última geração DateLastGenerationShort=Data mais recente gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Número de geração de faturas já efetuadas +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Número de geração feito MaxGenerationReached=Número máximo de gerações atingidas InvoiceAutoValidate=Validar faturas automaticamente @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Dentro de 14 dias após o final do mês FixAmount=Quantidade fixa - 1 linha com rótulo '%s' VarAmount=Quantidade variável (%% total.) VarAmountOneLine=Quantidade variável (%% tot.) - 1 linha com o rótulo '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Transferência bancária PaymentTypeShortVIR=Transferência bancária @@ -494,12 +498,16 @@ Cash=Numerário Reported=Atrasado DisabledBecausePayments=Não é possível, pois há alguns pagamentos CantRemovePaymentWithOneInvoicePaid=Não é possível remover o pagamento, uma vez que existe pelo menos uma fatura classificada como paga +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Pagamento esperado CantRemoveConciliatedPayment=Não é possível remover o pagamento reconciliado PayedByThisPayment=Pago por esse pagamento ClosePaidInvoicesAutomatically=Classifica automaticamente todas as faturas padrão, de adiantamento ou de substituição como "Pagas" quando o pagamento é feito inteiramente. ClosePaidCreditNotesAutomatically=Classifica automaticamente todas as notas de crédito como "Pagas" quando o reembolso é feito totalmente. ClosePaidContributionsAutomatically=Classify automatically all social or fiscal contributions as "Paid" when payment is done entirely. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Todas as faturas sem sobras a pagar serão automaticamente encerradas com o status "Pago". ToMakePayment=Pagar ToMakePaymentBack=Reembolsar @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Você precisa criar uma fatura padrão pri PDFCrabeDescription=Fatura PDF template Crabe. Um modelo de fatura completo (implementação antiga do modelo Sponge) PDFSpongeDescription=Modelo PDF da fatura Esponja. Um modelo de fatura completo PDFCrevetteDescription=Modelo PDF da fatura Crevette. Um modelo de fatura completo para faturas de situação -TerreNumRefModelDesc1=Devolve o número com o formato %syymm-nnnn para facturas standard e %syymm-nnnn para notas de crédito em que yy é ano, mm é mês e nnnn é uma sequência sem pausa e sem retorno a 0 -MarsNumRefModelDesc1=Devolve o número com o formato %syymm-nnnn para facturas standard, %syymm-nnnn para facturas de substituição, %syymm-nnnn para facturas de adiantamento e %syymm-nnnn para notas de crédito onde yy é ano, mm é mês e nnnn é uma sequência sem pausa e sem voltar para 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Uma conta a começar com $syymm já existe e não é compatível com este modelo de sequencia. Remove-o ou renomeia para activar este modulo -CactusNumRefModelDesc1=Devolve o número com o formato %syymm-nnnn para facturas standard, %syymm-nnnn para notas de crédito e %syymm-nnnn para facturas de adiantamento onde yy é ano, mm é mês e nnnn é uma sequência sem pausa e sem retorno a 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Tem certeza de que deseja excluir a fatura do modelo? CreateOneBillByThird=Crie uma fatura por terceiro (caso contrário, uma fatura por pedido) -BillCreated=%s projeto (s) criado (s) +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Estado da geração de documentos DoNotGenerateDoc=Não gerar arquivo de documento AutogenerateDoc=Auto gerar arquivo de documento diff --git a/htdocs/langs/pt_PT/boxes.lang b/htdocs/langs/pt_PT/boxes.lang index 494becf8c75..0573f7e4001 100644 --- a/htdocs/langs/pt_PT/boxes.lang +++ b/htdocs/langs/pt_PT/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=Informação RSS BoxLastProducts=Produtos / serviços %s mais recentes @@ -17,9 +18,13 @@ BoxLastActions=Últimas ações BoxLastContracts=Últimos contratos BoxLastContacts=Últimos contactos/endereços BoxLastMembers=Últimos membros +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Últimas intervenções BoxCurrentAccounts=Saldo de abertura das contas BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Últimas %s notícias de %s BoxTitleLastProducts=Produtos / serviços: último %s modificado BoxTitleProductsAlertStock=Produtos: alerta de stock @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Contabilidade +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/pt_PT/categories.lang b/htdocs/langs/pt_PT/categories.lang index 57c37b4515a..fdc8741b851 100644 --- a/htdocs/langs/pt_PT/categories.lang +++ b/htdocs/langs/pt_PT/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Área de tags / categorias de fornecedores CustomersCategoriesArea=Área de etiquetas/categorias de clientes MembersCategoriesArea=Área de etiquetas/categorias de membros ContactsCategoriesArea=Área de etiquetas/categorias de contactos -AccountsCategoriesArea=Área de etiquetas/categorias de contas +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Área de etiquetas/categorias de projetos UsersCategoriesArea=Users tags/categories area SubCats=Subcategorias @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Mostrar etiqueta/categoria ByDefaultInList=Por predefinição na lista ChooseCategory=Escolha a categoria -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/pt_PT/companies.lang b/htdocs/langs/pt_PT/companies.lang index 6e9e1163487..4ee185ca7d9 100644 --- a/htdocs/langs/pt_PT/companies.lang +++ b/htdocs/langs/pt_PT/companies.lang @@ -27,9 +27,9 @@ AliasNames=Pseudónimo (comercial, marca registada, ...) AliasNameShort=Nome do alias Companies=Empresas CountryIsInEEC=País faz parte da Comunidade Económica Europeia -PriceFormatInCurrentLanguage=Price display format in the current language and currency +PriceFormatInCurrentLanguage=Formato de preço no idioma e moeda atuais ThirdPartyName=Nome de terceiro -ThirdPartyEmail=Third-party email +ThirdPartyEmail=Email de terceiros ThirdParty=Terceiro ThirdParties=Terceiros ThirdPartyProspects=Clientes Potenciais @@ -43,9 +43,10 @@ Individual=Particular ToCreateContactWithSameName=Criará automaticamente um contato / endereço com as mesmas informações do terceiro sob o terceiro. Na maioria dos casos, mesmo que seu terceiro seja uma pessoa física, criar um terceiro sozinho é suficiente. ParentCompany=Empresa-mãe Subsidiaries=Subsidiárias -ReportByMonth=Relatório por mês -ReportByCustomers=Relatório por cliente -ReportByQuarter=Relatório por trimestre +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Código cortesía RegisteredOffice=Domicilio social Lastname=Apelidos @@ -53,10 +54,10 @@ Firstname=Primeiro Nome PostOrFunction=Posição da tarefa UserTitle=Título NatureOfThirdParty=Natureza do terceiro -NatureOfContact=Nature of Contact +NatureOfContact=Natureza do contacto Address=Direcção State=Concelho -StateCode=State/Province code +StateCode=Código de região StateShort=Concelho Region=Distrito Region-State=Distrito - Concelho @@ -124,7 +125,7 @@ ProfId1AT=ID Prof. 1 (USt.-IdNr) ProfId2AT=ID Prof. 2 (USt.-Nr) ProfId3AT=ID Prof. 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=Número EORI ProfId6AT=- ProfId1AU=ID Prof. 1 (ABN) ProfId2AU=- @@ -172,14 +173,20 @@ ProfId1ES=ID Prof. 1 (CIF/NIF) ProfId2ES=ID Prof. 2 (Número de segurança social) ProfId3ES=ID Prof. 3 (CNAE) ProfId4ES=ID Prof. 4 (Número colegiado) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (Número EORI) ProfId6ES=- ProfId1FR=ID Prof. 1 (SIREN) ProfId2FR=ID Prof. 2 (SIRET) ProfId3FR=ID Prof. 3 (NAF, antigo APE) ProfId4FR=ID Prof. 4 (RCS/RM) -ProfId5FR=Número EORI +ProfId5FR=Prof Id 5 (Número EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Número Registo ProfId2GB=- ProfId3GB=SIC @@ -202,12 +209,13 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=Número EORI +ProfId6IT=- ProfId1LU=ID Prof. 1 (R.C. Luxemburgo) ProfId2LU=ID Prof. 2 (Permissão comercial) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=Número EORI ProfId6LU=- ProfId1MA=ID Prof. 1 (R.C.) ProfId2MA=ID Prof. 2 (Patente) @@ -231,7 +239,7 @@ ProfId1PT=ID Prof. 1 (NIF) ProfId2PT=ID Prof. 2 (Núm. Segurança Social) ProfId3PT=ID Prof. 3 (Núm. Reg. Comercial) ProfId4PT=ID Prof. 4 (Conservatória) -ProfId5PT=Número EORI +ProfId5PT=Prof Id 5 (Número EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (Número EORI) ProfId6RO=- ProfId1RU=ID Prof. 1 (OGRN) ProfId2RU=ID Prof. 2 (INN) @@ -282,11 +290,11 @@ CustomerAbsoluteDiscountShort=Desconto fixo CompanyHasRelativeDiscount=Este cliente tem um desconto por defeito de <b>%s%%</b> CompanyHasNoRelativeDiscount=Este cliente não tem descontos relativos por defeito HasRelativeDiscountFromSupplier=You have a default discount of <b>%s%%</b> from this vendor -HasNoRelativeDiscountFromSupplier=You have no default relative discount from this vendor +HasNoRelativeDiscountFromSupplier=Você não tem desconto relativo predefinido deste fornecedor CompanyHasAbsoluteDiscount=Este cliente tem descontos disponíveis (notas de créditos ou adiantamentos) para <b> %s </ b> %s CompanyHasDownPaymentOrCommercialDiscount=Este cliente tem descontos disponíveis (comerciais, adiantamentos) para <b> %s </ b> %s CompanyHasCreditNote=Este cliente ainda tem notas de crédito para <b>%s</b> %s -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor +HasNoAbsoluteDiscountFromSupplier=Você não tem desconto ou nota de crédito disponível neste fornecedor HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for <b>%s</b> %s from this vendor HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for <b>%s</b> %s from this vendor HasCreditNoteFromSupplier=You have credit notes for <b>%s</b> %s from this vendor @@ -310,7 +318,7 @@ FromContactName=Nome: NoContactDefinedForThirdParty=Não existem contactos definidos para este terceiro NoContactDefined=Nenhum contacto definido para este terceiro DefaultContact=Contacto por Defeito -ContactByDefaultFor=Default contact/address for +ContactByDefaultFor=Contacto / endereço predefinido para AddThirdParty=Criar terceiro DeleteACompany=Eliminar uma Empresa PersonalInformations=Informação Pessoal @@ -330,7 +338,7 @@ CompanyDeleted=A Empresa "%s" foi Eliminada ListOfContacts=Lista de Contactos ListOfContactsAddresses=Lista de Contactos ListOfThirdParties=Lista de Terceiros -ShowCompany=Third Party +ShowCompany=Terceiro ShowContact=Endereço de contacto ContactsAllShort=Todos (sem filtro) ContactType=Tipo de Contacto @@ -358,8 +366,8 @@ VATIntraCheckableOnEUSite=Verifique o ID do IVA intracomunitário no site da Com VATIntraManualCheck=Você também pode verificar manualmente no site da Comissão Europeia <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Verificação Impossivel. O serviço de verificação não é prestado pelo país membro (%s). NorProspectNorCustomer=Não é cliente potencial, nem cliente -JuridicalStatus=Business entity type -Workforce=Workforce +JuridicalStatus=Forma Jurídica +Workforce=Colaboradores Staff=Funcionários ProspectLevelShort=Cli. Potenc. ProspectLevel=Cliente Potencial @@ -441,7 +449,7 @@ CurrentOutstandingBill=Risco alcançado OutstandingBill=Montante máximo para faturas pendentes OutstandingBillReached=Montante máximo para faturas pendente foi alcançado OrderMinAmount=Quantidade mínima para encomenda -MonkeyNumRefModelDesc=Retorna um número com o formato %syymm-nnnn para o código do cliente e %syymm-nnnn para o código do fornecedor, onde yy é year, mm é month e nnnn é uma sequência sem quebra e sem retorno para 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Código de cliente/fornecedor livre sem verificação. pode ser modificado em qualquer momento. ManagingDirectors=Nome Diretor(es) (DE, diretor, presidente ...) MergeOriginThirdparty=Terceiro duplicado (terceiro que deseja eliminar) diff --git a/htdocs/langs/pt_PT/compta.lang b/htdocs/langs/pt_PT/compta.lang index 03ccdc3308f..516a0aaed54 100644 --- a/htdocs/langs/pt_PT/compta.lang +++ b/htdocs/langs/pt_PT/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=Compras do SGST VATCollected=IVA Recuperado StatusToPay=A pagar SpecialExpensesArea=Área para todos os pagamentos especiais +VATExpensesArea=Area for all TVA payments SocialContribution=Imposto social ou fiscal SocialContributions=Impostos sociais ou fiscais SocialContributionsDeductibles=Impostos sociais ou fiscais dedutíveis @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Pagamento de fatura do cliente PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Pagamento da taxa social/fiscal PaymentVat=Pagamento IVA +AutomaticCreationPayment=Automatically record the payment ListPayment=Lista de pagamentos ListOfCustomerPayments=Lista de pagamentos de clientes ListOfSupplierPayments=Lista de pagamentos de fornecedores @@ -104,6 +106,8 @@ LT2PaymentES=Pagamento IRPF LT2PaymentsES=Pagamentos IRPF VATPayment=Pagamento de imposto sobre vendas VATPayments=Pagamentos de impostos sobre vendas +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Reembolso de imposto sobre vendas NewVATPayment=Novo pagamento de impostos sobre vendas NewLocalTaxPayment=Novo imposto %s pagamento @@ -134,9 +138,17 @@ NoWaitingChecks=Nenhum cheque aguarda depósito. DateChequeReceived=Data da receção do cheque NbOfCheques=Nº de cheques PaySocialContribution=Pagar um imposto social/fiscal -ConfirmPaySocialContribution=Tem certeza de que deseja classificar este imposto social ou fiscal como pago? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Eliminar um pagamento de imposto social ou fiscal -ConfirmDeleteSocialContribution=Tem certeza de que deseja eliminar este pagamento de imposto social/fiscal? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Impostos e pagamentos sociais e fiscais CalcModeVATDebt=Modo <b> %sVAT no compromisso accounting%s </ b>. CalcModeVATEngagement=Modo <b> %sVAT em rendimentos-expenses%s </ b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Inclui os pagamentos reais feitos em faturas, despesas, IVA e RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=Inclui todas as linhas de crédito do diário de venda. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Inclui registro em seu livro contábil com contas contábeis que tem o grupo "DESPESA" ou "LUCRO" RulesResultBookkeepingPredefined=Inclui registro em seu livro contábil com contas contábeis que tem o grupo "DESPESA" ou "LUCRO" RulesResultBookkeepingPersonalized=Ele mostra um registro em seu livro contábil com contas contábeis <b> agrupadas por grupos personalizados </ b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Relatório fiscal de vendas de terceiros VATReportByCustomers=Relatório fiscal de venda por cliente VATReportByCustomersInInputOutputMode=Relatório do IVA do cliente recolhido e pago VATReportByQuartersInInputOutputMode=Relatório por taxa de imposto de venda do imposto cobrado e pago +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Relate imposto 2 pela taxa LT2ReportByQuarters=Relate imposto 3 pela taxa LT1ReportByQuartersES=Relatório por taxa de retorno @@ -217,7 +231,7 @@ Pcg_subtype=Subtipo de PCG InvoiceLinesToDispatch=Linhas de fatura para despacho ByProductsAndServices=Por produto e serviço RefExt=Ref externa -ToCreateAPredefinedInvoice=Para criar uma fatura modelo, crie uma fatura padrão e, sem validá-la, clique no botão "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Associar a encomenda Mode1=Método 1 Mode2=Método 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=A conta contábil dedicada definida no cartão ACCOUNTING_ACCOUNT_SUPPLIER=Conta de contabilidade usada para fornecedores de terceiros 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=Confirme o clone de um imposto social / fiscal +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Cloná-la para o mês seguinte SimpleReport=Relatório simples AddExtraReport=Relatórios extras (adicionar relatório de cliente estrangeiro e nacional) @@ -253,7 +269,8 @@ AccountingAffectation=Atribuição contábil LastDayTaxIsRelatedTo=Último dia do período em que o imposto está relacionado VATDue=Imposto de venda reivindicado ClaimedForThisPeriod=Reivindicado pelo período -PaidDuringThisPeriod=Pago durante este período +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Por taxa de imposto de venda TurnoverbyVatrate=Volume de negócios faturado por taxa de imposto sobre vendas TurnoverCollectedbyVatrate=Volume de negócios cobrado pela taxa de imposto sobre vendas @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/pt_PT/ecm.lang b/htdocs/langs/pt_PT/ecm.lang index 7dd458dd801..05e460b49ed 100644 --- a/htdocs/langs/pt_PT/ecm.lang +++ b/htdocs/langs/pt_PT/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Ficheiro ainda não indexado na base de dados (tente ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/pt_PT/errors.lang b/htdocs/langs/pt_PT/errors.lang index 57f8d93ee48..60c54d79eb1 100644 --- a/htdocs/langs/pt_PT/errors.lang +++ b/htdocs/langs/pt_PT/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>%s</b> Directorio não encontrado (caminho mau, permissões ErrorFunctionNotAvailableInPHP=A função <b>%s</b> é requerida por esta Funcionalidade, mas não se encontra disponivel nesta Versão/Instalação de PHP. ErrorDirAlreadyExists=Já existe uma pasta com esse Nome. ErrorFileAlreadyExists=Um arquivo com esse nome já existe. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Arquivo não foi recebido completamente pelo servidor. ErrorNoTmpDir=directorio Temporário %s não existe. ErrorUploadBlockedByAddon=Upload bloqueado por um plugin PHP Apache /. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/pt_PT/externalsite.lang b/htdocs/langs/pt_PT/externalsite.lang index b21c17df0bb..8f9247e1b7e 100644 --- a/htdocs/langs/pt_PT/externalsite.lang +++ b/htdocs/langs/pt_PT/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar ligação para site da Web externo -ExternalSiteURL=URL do Site Externo +ExternalSiteSetup=Configurar hiperligação para o site da Web externo +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=O módulo Site Externo não está configurado correctamente. ExampleMyMenuEntry=Minha entrada de menu diff --git a/htdocs/langs/pt_PT/interventions.lang b/htdocs/langs/pt_PT/interventions.lang index 00fd605bc8a..969f798f133 100644 --- a/htdocs/langs/pt_PT/interventions.lang +++ b/htdocs/langs/pt_PT/interventions.lang @@ -35,7 +35,7 @@ InterventionValidatedInDolibarr=Intervenção %s validada InterventionModifiedInDolibarr=Intervenção %s modificada InterventionClassifiedBilledInDolibarr=Intervenção %s definida como faturada InterventionClassifiedUnbilledInDolibarr=Intervenção %s definida como não faturada -InterventionSentByEMail=Intervention %s sent by email +InterventionSentByEMail=Intervenção %s enviada por email InterventionDeletedInDolibarr=Intervenção %s eliminada InterventionsArea=Área de Intervenções DraftFichinter=Intervenções rascunho @@ -64,3 +64,5 @@ InterLineDuration=Duração da intervenção na linha InterLineDesc=Descrição da intervenção na linha RepeatableIntervention=Template of intervention ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template +Reopen=Reabrir +ConfirmReopenIntervention=Are you sure you want to open back the intervention <b>%s</b>? diff --git a/htdocs/langs/pt_PT/main.lang b/htdocs/langs/pt_PT/main.lang index 69cfcbc202c..c5cecedc64b 100644 --- a/htdocs/langs/pt_PT/main.lang +++ b/htdocs/langs/pt_PT/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Data de Modif. IPModification=Modification IP DateLastModification=A última data de alteração DateValidation=Data de Validação +DateSigning=Signing date DateClosing=Data de Encerramento DateDue=Data de Vencimento DateValue=Data do valor @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Preço por unidade (Excl. IVA) (moeda) UnitPriceTTC=Preço Unitário PriceU=P.U. PriceUHT=P.U. (líquido) -PriceUHTCurrency=P.U. (moeda) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=P.U. (inc. impostos) Amount=Montante AmountInvoice=Montante da Fatura @@ -389,6 +390,8 @@ AmountTotal=Montante Total AmountAverage=Montante médio PriceQtyMinHT=Preço para quandidade min. (excl. IVA) PriceQtyMinHTCurrency=Preço da quantidade min. (excl. IVA) (moeda) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentagem Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ MenuMembers=Membros MenuAgendaGoogle=Agenda Google MenuTaxesAndSpecialExpenses=Taxas | Despesas Especiais ThisLimitIsDefinedInSetup=Límite Dolibarr (Menu inicio->configuração->segurança): %s Kb, PHP limit: %s Kb -NoFileFound=Não existem documentos guardados nesta pasta +NoFileFound=No documents uploaded CurrentUserLanguage=Idioma atual CurrentTheme=Tema Actual CurrentMenuManager=Gestor de menu atual @@ -899,8 +902,10 @@ ViewAccountList=Ver livro-mestre ViewSubAccountList=Ver livro-mestre da subconta RemoveString=Remover texto '%s' SomeTranslationAreUncomplete=Alguns dos idiomas oferecidos podem estar apenas parcialmente traduzidos ou conter erros. Por favor ajude a corrigir o seu idioma registando-se em <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> para adicionar as suas melhorias. -DirectDownloadLink=Link de download direto (público/externo) -DirectDownloadInternalLink=Link de download direto (precisa de ter sessão iniciada e precisa de permissões) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download do documento ActualizeCurrency=Atualizar taxa de conversão da moeda @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contactos SearchIntoMembers=Membros SearchIntoUsers=Utilizadores SearchIntoProductsOrServices=Produtos ou serviços +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projetos SearchIntoMO=Ordens de Fabrico SearchIntoTasks=Tarefas @@ -1049,12 +1055,13 @@ KeyboardShortcut=Atalho de teclado AssignedTo=Atribuído a Deletedraft=Eliminar rascunho ConfirmMassDraftDeletion=Confirmação de eliminação múltipla de rascunhos -FileSharedViaALink=Ficheiro partilhado via link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Seleccione um terceiro em primeiro... YouAreCurrentlyInSandboxMode=Você está atualmente no modo %s "sandbox" Inventory=Inventário AnalyticCode=Código analítico TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Mostrar Mais Informações NoFilesUploadedYet=Por favor envie um documento em primeiro SeePrivateNote=Ver nota privada @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/pt_PT/margins.lang b/htdocs/langs/pt_PT/margins.lang index 78c13ebbe04..3ce049b61cc 100644 --- a/htdocs/langs/pt_PT/margins.lang +++ b/htdocs/langs/pt_PT/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Detalhes da margem ProductMargins=Margens do produto CustomerMargins=Margens do cliente SalesRepresentativeMargins=Margens de representantes de vendas +ContactOfInvoice=Contact of invoice UserMargins=Margens do utilizador ProductService=Produto ou Serviço AllProducts=Todos os produtos e serviços ChooseProduct/Service=Escolher produto ou serviço ForceBuyingPriceIfNull=Forçar compra / preço de custo ao preço de venda, se não definido -ForceBuyingPriceIfNullDetails=Se compra / preço de custo não definido, e esta opção "ON", a margem será zero on line (compra / preço de custo = preço de venda), caso contrário ("OFF"), a margem será igual ao padrão sugerido. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Método de margem para descontos globais UseDiscountAsProduct=Como um produto UseDiscountAsService=Como um serviço @@ -31,12 +32,12 @@ MARGIN_TYPE=Preço de compra / custo sugerido por padrão para cálculo de marge MargeType1=Margem no melhor preço do fornecedor MargeType2=Margem no Preço Médio Ponderado (WAP) MargeType3=Margem no Preço de Custo -MarginTypeDesc=* Margem sobre o melhor preço de compra = Preço de venda - Melhor preço de fornecedor definido no cartão do produto <br> * Margem no preço médio ponderado (WAP) = Preço de venda - Preço médio ponderado pelo produto (WAP) ou melhor preço do fornecedor se WAP ainda não definido br> * Margem no preço de custo = Preço de venda - Preço de custo definido no cartão do produto ou WAP se o preço de custo não estiver definido, ou melhor preço do fornecedor se o WAP ainda não estiver definido +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Preço de custo UnitCharges=Custos unitários Charges=Custos AgentContactType=Tipo de contacto usado para comissionamento -AgentContactTypeDetails=Defina que tipo de contacto (associado em faturas) será usado no relatório de margens, por representante de vendas +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=A taxa deve ser um valor numérico markRateShouldBeLesserThan100=A taxa de marca deve ser menor que 100 ShowMarginInfos=Mostrar informações da margem diff --git a/htdocs/langs/pt_PT/members.lang b/htdocs/langs/pt_PT/members.lang index 861d7820707..d69590f69c2 100644 --- a/htdocs/langs/pt_PT/members.lang +++ b/htdocs/langs/pt_PT/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Lista de Membros rascunho (a Confirmar) MembersListValid=Lista de Membros validados MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Lista de membros inativos MembersListQualified=Lista dos Membros qualificados MenuMembersToValidate=Membros rascunho MenuMembersValidated=Membros validados +MenuMembersExcluded=Excluded members MenuMembersResiliated=Membros inativos MembersWithSubscriptionToReceive=Membros com assinatura para receber MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscrição expirada MemberStatusActiveLateShort=Expirada MemberStatusPaid=Subscrição atualizada MemberStatusPaidShort=Atualizada +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Membro inativo MemberStatusResiliatedShort=Inativo MembersStatusToValid=Membros rascunho +MembersStatusExcluded=Excluded members MembersStatusResiliated=Membros inativos MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validado @@ -82,6 +87,8 @@ Physical=Pessoa Singular Moral=Pessoa Coletiva MorAndPhy=Moral and Physical Reenable=Reactivar +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminar um membro ConfirmResiliateMember=Tem certeza de que deseja encerrar este membro? DeleteMember=Eliminar um membro @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Formato etiquetas DescADHERENT_ETIQUETTE_TEXT=Texto impresso na folhas de endereços dos membros @@ -162,6 +170,7 @@ DocForLabels=Gerar folhas de endereço (Formato de saída realmente configuraç SubscriptionPayment=Pagamento Assinatura LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Membros estatísticas por país MembersStatisticsByState=Membros estatísticas por estado / província MembersStatisticsByTown=Membros estatísticas por localidade diff --git a/htdocs/langs/pt_PT/modulebuilder.lang b/htdocs/langs/pt_PT/modulebuilder.lang index f4005f2db69..4a04d50e4db 100644 --- a/htdocs/langs/pt_PT/modulebuilder.lang +++ b/htdocs/langs/pt_PT/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/pt_PT/orders.lang b/htdocs/langs/pt_PT/orders.lang index 2fc1142e59e..923d1cfc45a 100644 --- a/htdocs/langs/pt_PT/orders.lang +++ b/htdocs/langs/pt_PT/orders.lang @@ -16,6 +16,8 @@ ToOrder=Efetuar encomenda MakeOrder=Efetuar encomenda SupplierOrder=Ordem de compra SuppliersOrders=Ordens de compra +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Ordens de compra atuais CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=On-line OrderByPhone=Telefone # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Um modelo simples de encomenda PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Faturar encomendas +CreateInvoiceForThisSupplier=Faturar encomendas NoOrdersToInvoice=Sem encomendas por faturar CloseProcessedOrdersAutomatically=Classificar todas as encomendas selecionadas como "Processadas". OrderCreation=Criação de encomenda diff --git a/htdocs/langs/pt_PT/other.lang b/htdocs/langs/pt_PT/other.lang index 58dad92008d..965d7efd03d 100644 --- a/htdocs/langs/pt_PT/other.lang +++ b/htdocs/langs/pt_PT/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Empresa com múltiplas atividades (todos os módulos principais) CreatedBy=Criado por %s ModifiedBy=Modificado por %s ValidatedBy=Validado por %s +SignedBy=Signed by %s ClosedBy=Fechado por %s CreatedById=ID do utilizador que criou ModifiedById=ID do utilizador que efetuou a última alteração @@ -244,6 +245,7 @@ NewKeyIs=Estas são as suas novas credenciais para efectuar login NewKeyWillBe=Sua nova chave para acessar o software será ClickHereToGoTo=Clique aqui para ir para %s YouMustClickToChange=No entanto, você deve primeiro clicar no seguinte link para validar esta alteração de palavra-passe +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Se você não solicitou esta alteração, ignore o e-mail. As suas credenciais serão mantidas em segurança. IfAmountHigherThan=Se o montante for maior que <strong>%s</strong> SourcesRepository=Repositório para fontes diff --git a/htdocs/langs/pt_PT/productbatch.lang b/htdocs/langs/pt_PT/productbatch.lang index e03ea4093e0..b06edfcf759 100644 --- a/htdocs/langs/pt_PT/productbatch.lang +++ b/htdocs/langs/pt_PT/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Utilizar lote/número de série -ProductStatusOnBatch=Sim (lote/número de série obrigatório) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Não (não é necessário lote/número de série) -ProductStatusOnBatchShort=Sim +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Não Batch=Lote/Nr. de Série atleast1batchfield=Data de validade ou Data de venda ou Lote/Número de Série @@ -22,3 +24,12 @@ ProductLotSetup=Configuração do módulo Lote/Número de Série ShowCurrentStockOfLot=Mostrar o stock atual para o par produto/lote ShowLogOfMovementIfLot=Mostrar registo de movimentos para cada par produto/lote StockDetailPerBatch=Detalhes do estoque por lote +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/pt_PT/products.lang b/htdocs/langs/pt_PT/products.lang index 45ba3d7cb6a..a80fdcabe16 100644 --- a/htdocs/langs/pt_PT/products.lang +++ b/htdocs/langs/pt_PT/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Produtos/serviços predefinidos para venda @@ -313,7 +314,7 @@ LastUpdated=Última atualização CorrectlyUpdated=Corretamente atualizado PropalMergePdfProductActualFile=Os arquivos usados ​​para adicionar ao PDF Azur são / é PropalMergePdfProductChooseFile=Selecionar ficheiros PDF -IncludingProductWithTag=Incluindo produto / serviço com tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Preço padrão, preço real pode depender do cliente WarningSelectOneDocument=Por favor, selecione pelo menos um documento DefaultUnitToShow=Unidade diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index 77cd1521bfe..e7f30944323 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Lista de tarefas GoToListOfTimeConsumed=Ir para a lista de tempo consumido GanttView=Vista de Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Lista das propostas comerciais relacionadas ao projeto ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=Lista de faturas de clientes relacionadas ao projeto @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/pt_PT/propal.lang b/htdocs/langs/pt_PT/propal.lang index b811205eff0..3d98940c1b8 100644 --- a/htdocs/langs/pt_PT/propal.lang +++ b/htdocs/langs/pt_PT/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Enviar orçamento por correio DatePropal=Data do orçamento DateEndPropal=Válido até ValidityDuration=Duração da Validade -CloseAs=Definir estado como SetAcceptedRefused=Definir aceite/recusado ErrorPropalNotFound=Orçamento %s Inexistente AddToDraftProposals=Adicionar ao orçamento rascunho @@ -60,6 +59,7 @@ ConfirmClonePropal=Tem a certeza que pretende clonar o orçamento <b>%s</b>? ConfirmReOpenProp=Tem a certeza que pretende reabrir o orçamento <b>%s</b>? ProposalsAndProposalsLines=Orçamento e linhas ProposalLine=Linha do orçamento +ProposalLines=Proposal lines AvailabilityPeriod=Disponibilidade atraso SetAvailability=Definir atraso disponibilidade AfterOrder=após a ordem @@ -85,3 +85,8 @@ ProposalCustomerSignature=Aceitação escrita, carimbo da empresa, data e assina 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/pt_PT/stocks.lang b/htdocs/langs/pt_PT/stocks.lang index f45b0a7d580..f8d8e1811d9 100644 --- a/htdocs/langs/pt_PT/stocks.lang +++ b/htdocs/langs/pt_PT/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks por lote/número de série LotSerial=Lotes / Nr. Série LotSerialList=Lista de lote / nr. série @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Localização -LocationSummary=Nome abreviado da localização -NumberOfDifferentProducts=Número de produtos diferentes +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Numero total de produtos LastMovement=Movimentos mais recentes LastMovements=Últimos movimentos @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Valor de stocks UserWarehouseAutoCreate=Crie um armazém de usuários automaticamente ao criar um usuário 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Armazém predefinido @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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=Valor (PMP) -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Vendendo Preço unitário EstimatedStockValueSellShort=Valor para vender EstimatedStockValueSell=Valor para vender @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Transferência de registro ReceivingForSameOrder=Receções para esta encomenda StockMovementRecorded=Movimentos de estoque registrados @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=O nível de estoque deve ser suficiente para adicion StockMustBeEnoughForOrder=O nível de estoque deve ser suficiente para adicionar produto / serviço à ordem (a verificação é feita no estoque real atual ao adicionar uma linha à ordem, qualquer que seja a regra para a troca automática de estoque) StockMustBeEnoughForShipment= O nível de estoque deve ser suficiente para adicionar produto / serviço ao embarque (a verificação é feita no estoque real atual ao adicionar uma linha ao embarque, qualquer que seja a regra para a troca automática de estoque) MovementLabel=Rótulo de movimento -TypeMovement=Tipo de movimento +TypeMovement=Direction of movement DateMovement=Data de movimento InventoryCode=Movimento ou código do inventário IsInPackage=Contido no pacote @@ -183,6 +185,7 @@ inventoryCreatePermission=Criar novo inventário inventoryReadPermission=Visualizar inventários inventoryWritePermission=Atualizar inventários inventoryValidatePermission=Validar inventário +inventoryDeletePermission=Delete inventory inventoryTitle=Inventário inventoryListTitle=Os inventários inventoryListEmpty=Nenhum inventário em andamento @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reabrir +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/pt_PT/suppliers.lang b/htdocs/langs/pt_PT/suppliers.lang index 3449b28052b..8705f09b178 100644 --- a/htdocs/langs/pt_PT/suppliers.lang +++ b/htdocs/langs/pt_PT/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Fornecedores SuppliersInvoice=Fatura de fornecedor +SupplierInvoices=Faturas do fornecedor ShowSupplierInvoice=Mostrar Fatura do Fornecedor NewSupplier=Novo fornecedor History=Histórico diff --git a/htdocs/langs/pt_PT/ticket.lang b/htdocs/langs/pt_PT/ticket.lang index 3b45f4471c9..73f6964c767 100644 --- a/htdocs/langs/pt_PT/ticket.lang +++ b/htdocs/langs/pt_PT/ticket.lang @@ -70,6 +70,8 @@ Deleted=Excluído # Dict Type=Tipo Severity=Severidade +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Para enviar email da mensagem do ticket @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Exibe o logotipo do módulo na interface pública TicketsShowModuleLogoHelp=Ative esta opção para ocultar o módulo de logotipo nas páginas da interface pública TicketsShowCompanyLogo=Exibir o logotipo da empresa na interface pública TicketsShowCompanyLogoHelp=Ative esta opção para ocultar o logotipo da empresa principal nas páginas da interface pública -TicketsEmailAlsoSendToMainAddress=Também enviar notificação para o endereço de email principal -TicketsEmailAlsoSendToMainAddressHelp=Ative esta opção para enviar um email para o endereço "Notificação de email de" (veja a configuração abaixo) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Somente tickets atribuídos ao usuário atual ficarão visíveis. Não se aplica a um usuário com direitos de gerenciamento de tickets. TicketsActivatePublicInterface=Ativar interface pública @@ -126,10 +128,10 @@ TicketNumberingModules=Módulo de numeração de ingressos TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Últimos tickets modificados BoxLastModifiedTicketDescription=Últimos %s tickets modificados BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Nenhum ticket modificado recentemente +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/pt_PT/users.lang b/htdocs/langs/pt_PT/users.lang index ddeade51c09..a97e339f1cd 100644 --- a/htdocs/langs/pt_PT/users.lang +++ b/htdocs/langs/pt_PT/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remover do grupo PasswordChangedAndSentTo=Palavra-passe alterada e enviada para <b>%s</b>. PasswordChangeRequest=Pedido para alterar a palavra-passe a <b> %s </b> PasswordChangeRequestSent=Pedido para alterar a palavra-passe para <b>%s</b> enviada para <b>%s</b>. +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=Confirmar restauração da palavra-passe MenuUsersAndGroups=Utilizadores e Grupos LastGroupsCreated=Ultimos 1%s grupos criados @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Utilizador de Domínio %s Reactivate=Reativar 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=A permissão dá-se já que o herda de um grupo ao qual pertenece o utilizador. Inherited=Herdado +UserWillBe=Created user will be UserWillBeInternalUser=O utilizador criado irá ser um utilizador interno (porque não está interligado com um terceiro em particular) UserWillBeExternalUser=O utilizador criado irá ser um utilizador externo (porque está interligado com um terceiro em particular) IdPhoneCaller=Id. do Chamador (telefone) @@ -109,8 +112,10 @@ UserAccountancyCode=Código de contabilidade do utilizador UserLogoff=Terminar sessão do utilizador UserLogged=Utilizador conectado DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/pt_PT/website.lang b/htdocs/langs/pt_PT/website.lang index 9b4a56eab98..0242ca83fae 100644 --- a/htdocs/langs/pt_PT/website.lang +++ b/htdocs/langs/pt_PT/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u> Usar com servidor embutido em PHP </ u> <br> No ambiente de desenvolvimento, você pode preferir testar o site com o servidor da Web incorporado em PHP (requer PHP 5.5) executando <strong> php -S 0.0. 0,0: 8080 -t %s </ strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Verifique também se o host virtual tem permissão <strong> %s </ strong> em arquivos para o <strong> %s </ strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Ler WritePerm=Escrever TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u> Pré-visualize %s num novo separador. </ u> <br> <br> O %s será servido por um servidor Web externo (como Apache, Nginx, IIS). Você deve instalar e configurar este servidor antes de apontar para o diretório: <br> <strong> %s </ strong> <br> URL fornecida pelo servidor externo: <br> <strong> %s </ strong> -PreviewSiteServedByDolibarr=<u> Prévia %s em uma nova aba. </ u> <br> <br> O %s será servido pelo servidor Dolibarr para que não seja necessário nenhum servidor web extra (como Apache, Nginx, IIS) para ser instalado. br> O inconveniente é que o URL das páginas não é de fácil utilização e começa com o caminho do seu Dolibarr. <br> URL servida por Dolibarr: <br> <strong> %s </ strong> <br> <br> Use o seu próprio servidor web externo para servir este site, criar um host virtual em seu servidor web que aponte no diretório <br> <strong> %s </ strong> <br> em seguida, digite o nome deste servidor virtual e clique no outro botão de pré-visualização . +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL do host virtual servido pelo servidor da web externo não definido NoPageYet=Ainda sem páginas YouCanCreatePageOrImportTemplate=Você pode criar uma nova página ou importar um modelo de site completo @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/pt_PT/zapier.lang b/htdocs/langs/pt_PT/zapier.lang index b5fe0501b73..da5156793a5 100644 --- a/htdocs/langs/pt_PT/zapier.lang +++ b/htdocs/langs/pt_PT/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier para o módulo Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configuração do Zapier para Dolibarr +ZapierForDolibarrSetup=Configuração do Zapier para Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ro_RO/accountancy.lang b/htdocs/langs/ro_RO/accountancy.lang index 390a4165131..345f7a993a9 100644 --- a/htdocs/langs/ro_RO/accountancy.lang +++ b/htdocs/langs/ro_RO/accountancy.lang @@ -1,16 +1,16 @@ # Dolibarr language file - en_US - Accountancy (Double entries) Accountancy=Contabilitate Accounting=Contabilitate -ACCOUNTING_EXPORT_SEPARATORCSV= Separator coloane pentru fisier export -ACCOUNTING_EXPORT_DATE=Format date pentru fisiere export -ACCOUNTING_EXPORT_PIECE=Export the number of piece +ACCOUNTING_EXPORT_SEPARATORCSV=Separator coloane pentru fisier export +ACCOUNTING_EXPORT_DATE=Format date pentru fişiere export +ACCOUNTING_EXPORT_PIECE=Export număr de piesă ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export cu cont global -ACCOUNTING_EXPORT_LABEL=Export Eticheta +ACCOUNTING_EXPORT_LABEL=Export etichetă ACCOUNTING_EXPORT_AMOUNT=Export valoare -ACCOUNTING_EXPORT_DEVISE=Export moneda -Selectformat=Select the format for the file -ACCOUNTING_EXPORT_FORMAT=Select the format for the file -ACCOUNTING_EXPORT_ENDLINE=Selectați tipul returului de transport +ACCOUNTING_EXPORT_DEVISE=Export monedă +Selectformat=Selectaţi formatul de fişier +ACCOUNTING_EXPORT_FORMAT=Selectaţi formatul de fişier +ACCOUNTING_EXPORT_ENDLINE=Selectați tipul de linie nouă ACCOUNTING_EXPORT_PREFIX_SPEC=Specificati prefixul pentru numele fisierului ThisService=Acest serviciu ThisProduct=Acest produs @@ -21,7 +21,7 @@ ServiceForThisThirdparty=Serviciu pentru acest terţ CantSuggest=Nu pot sugera AccountancySetupDoneFromAccountancyMenu=Cele mai multe configurări ale contabilității se fac din meniul %s ConfigAccountingExpert=Configurare modul Contabilitate (partidă dublă) -Journalization=Inregistrari contabile +Journalization=Înregistrări contabile Journals=Jurnale JournalFinancial=Jurnale financiare BackToChartofaccounts=Înapoi la planul de conturi @@ -35,17 +35,17 @@ OverviewOfAmountOfLinesNotBound=Privire de ansamblu a sumei de linii care nu est OverviewOfAmountOfLinesBound=Privire de ansamblu a sumei de linii care este legată deja de un cont contabil OtherInfo=Alte informații DeleteCptCategory=Eliminați contul contabil din grup -ConfirmDeleteCptCategory=Sigur doriți să eliminați acest cont contabil din grupul de conturi contabil? -JournalizationInLedgerStatus=Starea înregistrărilor +ConfirmDeleteCptCategory=Sigur doriți să eliminați acest cont contabil din grupul de conturi? +JournalizationInLedgerStatus=Stare jurnalizare AlreadyInGeneralLedger=Transferat deja în jurnale și registrele contabile NotYetInGeneralLedger=Netransferat încă în jurnale și registrele contabile -GroupIsEmptyCheckSetup=Grupul este gol, verificați configurarea grupului de contabilitate personalizat -DetailByAccount=Afișați detalii pe cont +GroupIsEmptyCheckSetup=Grupul este gol, verificați configurarea grupului personalizat de conturi +DetailByAccount=Afișați detalii după cont AccountWithNonZeroValues=Conturi cu valori nenule -ListOfAccounts=Listă conturilor contabile +ListOfAccounts=Listă conturi CountriesInEEC=Țările din CEE CountriesNotInEEC=Țări care nu se află în CEE -CountriesInEECExceptMe=Țările din CEE, cu excepția celor de la %s +CountriesInEECExceptMe=Țările din CEE, cu excepția celor din %s CountriesExceptMe=Toate țările, cu excepția %s AccountantFiles=Export documente sursă ExportAccountingSourceDocHelp=Cu acest instrument, puteți exporta evenimentele sursă (listă și PDF-uri) care au fost utilizate pentru a vă genera înregistrările contabile. Pentru a vă exporta jurnalele, utilizați intrarea din meniu %s-%s. @@ -60,42 +60,42 @@ MainAccountForSubscriptionPaymentNotDefined=Contul contabil principal pentru pl AccountancyArea=Zona contabilă AccountancyAreaDescIntro=Utilizarea modulului de contabilitate se face în mai multe etape: -AccountancyAreaDescActionOnce=Următoarele acțiuni sunt executate de obicei doar o singură dată sau o dată pe an ... +AccountancyAreaDescActionOnce=Următoarele acțiuni sunt executate de obicei doar o singură dată sau o dată pe an... AccountancyAreaDescActionOnceBis=Următorii pași trebuie făcuți pentru a vă economisi timpul în viitor prin sugerarea contului contabil implicit corect atunci când efectuați jurnalizarea (scrierea înregistrărilor în Jurnale și în registrul Cartea Mare). -AccountancyAreaDescActionFreq=Următoarele acțiuni sunt executate de obicei în fiecare lună, săptămână sau zi pentru companii foarte mari ... +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 +AccountancyAreaDescJournalSetup=PASUL %s: Creați sau verificați conținutul jurnalului din meniul %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. +AccountancyAreaDescVat=PASUL %s: Definire conturi contabile pentru fiecare cotă de TVA. Pentru aceasta, utilizați intrarea în meniu %s. AccountancyAreaDescDefault=PAS %s: Definiți conturile implicite de contabilitate. Pentru aceasta, utilizați intrarea în meniu %s. -AccountancyAreaDescExpenseReport=PASUL %s: Definiți conturile contabile implicite pentru fiecare tip de raport de cheltuieli. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescSal=PASUL %s: Definirea conturilor contabile implicite pentru plata salariilor. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescContrib=PASĂ %s: Definiți conturile implicite de contabilitate pentru cheltuieli speciale (diverse taxe). Pentru aceasta, utilizați intrarea în meniu %s. -AccountancyAreaDescDonation=PASUL %s: Definirea conturilor contabile implicite pentru donații. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescSubscription=PAS %s: Definiți conturile implicite de contabilitate pentru abonamente pentru membri. Pentru aceasta, utilizați intrarea în meniu %s. -AccountancyAreaDescMisc=STEP %s: Definiți conturile implicite implicite și conturile implicite de contabilitate pentru diverse tranzacții. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescLoan=PASUL %s: Definiți conturile contabile implicite pentru împrumuturi. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescBank=PAS %s: Definiți conturile contabile și codul jurnal pentru fiecare bancă și conturile financiare. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescProd=STEP %s: Definirea conturilor contabile pentru produsele / serviciile dvs. Pentru aceasta, utilizați intrarea din meniu %s. +AccountancyAreaDescExpenseReport=PASUL %s: Definire conturi contabile implicite pentru fiecare tip de raport de cheltuieli. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescSal=PASUL %s: Definire conturi contabile implicite pentru plata salariilor. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescContrib=PASUL %s: Definire conturi contabile implicite pentru cheltuieli speciale (taxe diverse). Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescDonation=PASUL %s: Definire conturi contabile implicite pentru donații. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescSubscription=PAS %s: Definiți conturile contabile implicite pentru abonamente pentru membri. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescMisc=PASUL %s: Definire conturi contabile implicite obligatorii și conturi contabile implicite pentru tranzacții diverse. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescLoan=PASUL %s: Definire conturi contabile implicite pentru împrumuturi. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescBank=PASUL %s: Definire conturi contabile și codul de jurnal pentru fiecare bancă și conturi financiare. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescProd=STEP %s: Definire conturi contabile pentru produse/ servicii. Pentru aceasta, utilizați intrarea în meniu %s. -AccountancyAreaDescBind=PASUL %s: Verificați daca asocierea între liniile %s existente și contul contabil este factuta, astfel încât aplicația să poate scrie tranzacțiile în Cartea Mare cu un singur clic. Completați asocierile lipsă. Pentru aceasta, utilizați intrarea din meniu %s. -AccountancyAreaDescWriteRecords=PASUL %s: Scrieti tranzactii in Cartea Mare. Pentru aceasta, accesați meniul <strong> %s </strong>, apoi faceți clic pe butonul <strong> %s </strong>. -AccountancyAreaDescAnalyze=PAS %s: Adăugați sau modificați tranzacțiile existente și generați rapoarte și exporturi. +AccountancyAreaDescBind=PASUL %s: Verifică dacă asocierea între liniile %s existente și contul contabil este făcută, astfel încât aplicația să poate scrie tranzacțiile în Cartea Mare cu un singur clic. Completați asocierile lipsă. Pentru aceasta, utilizați intrarea în meniu %s. +AccountancyAreaDescWriteRecords=PASUL %s: Scrie tranzacţii in Cartea Mare. Pentru aceasta, accesează meniul <strong>%s</strong>, apoi fă clic pe butonul <strong>%s</strong>. +AccountancyAreaDescAnalyze=PASUL %s: Adaugă sau modifică tranzacțiile existente și generează rapoarte și exporturi. -AccountancyAreaDescClosePeriod=PASUL %s: Inchideți perioada, astfel încât să nu putem modifica în viitor. +AccountancyAreaDescClosePeriod=PASUL %s: Închide perioada, astfel încât să nu se poată modifica în viitor. TheJournalCodeIsNotDefinedOnSomeBankAccount=Un pas obligatoriu în configurare nu a fost finalizat (contul contabil jurnal nu este definit pentru toate conturile bancare) -Selectchartofaccounts=Selectați schema activă de conturi +Selectchartofaccounts=Selectați planul activ de conturi ChangeAndLoad=Schimbați și încărcați -Addanaccount=Adauga un cont contabil +Addanaccount=Adaugă un cont contabil AccountAccounting=Cont contabil AccountAccountingShort=Cont SubledgerAccount=Cont de subregistru SubledgerAccountLabel=Eticheta contului registrului contabil ShowAccountingAccount=Afișați contul contabil -ShowAccountingJournal=Arătați jurnalul contabil +ShowAccountingJournal=Afişare jurnal contabil ShowAccountingAccountInLedger=Afişare cont contabil în registru ShowAccountingAccountInJournals=Afişează conturile contabile în jurnale AccountAccountingSuggest=Conturi contabile sugerate @@ -103,7 +103,7 @@ MenuDefaultAccounts=Conturi implicite MenuBankAccounts=Conturi bancare MenuVatAccounts=Conturi de TVA MenuTaxAccounts=Conturi pentru taxe -MenuExpenseReportAccounts=Conturi de rapoarte de cheltuieli +MenuExpenseReportAccounts=Conturi rapoarte de cheltuieli MenuLoanAccounts=Conturi de împrumut MenuProductsAccounts=Conturi de produs MenuClosureAccounts=Conturi de închidere @@ -115,48 +115,48 @@ RegistrationInAccounting=Înregistrare în contabilitate Binding=Asocierea la conturi CustomersVentilation=Asocierea facturii cu clientul SuppliersVentilation=Asocierea facturii cu furnizorul -ExpenseReportsVentilation=Raportul de cheltuieli obligatoriu -CreateMvts=Creați o nouă tranzacție +ExpenseReportsVentilation=Asociere deconturi de cheltuieli +CreateMvts=Creați o tranzacție nouă UpdateMvts=Modificarea unei tranzacții ValidTransaction=Tranzacție validată WriteBookKeeping=Înregistrare tranzacţii în contabilitate Bookkeeping=Cartea mare BookkeepingSubAccount=Registru analitic AccountBalance=Sold cont -ObjectsRef=Referinţă sursă obiect -CAHTF=Cumpărare totală de la furnizor înainte de impozitare -TotalExpenseReport=Raportul total al cheltuielilor +ObjectsRef=Referinţă obiect sursă +CAHTF=Total achiziţii de la furnizor înainte de taxare +TotalExpenseReport=Total deconturi de cheltuieli InvoiceLines=Linii de facturi de asociat -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 pentru contabilitate +InvoiceLinesDone=Asociază liniile de factură +ExpenseReportLines=Linii rapoarte de cheltuieli de asociat +ExpenseReportLinesDone=Linii asociate rapoarte de cheltuieli +IntoAccount=Asociază linia cu contul contabil +TotalForAccount=Total cont contabil -Ventilate=Asociaza -LineId=Id-ul liniei +Ventilate=Asociere +LineId=Id linie Processing=Procesează EndProcessing=Proces finalizat SelectedLines=Linii selectate -Lineofinvoice=Linia facturii -LineOfExpenseReport=Linia de raport de cheltuieli +Lineofinvoice=Linie de factură +LineOfExpenseReport=Linie de raport de cheltuieli NoAccountSelected=Nu a fost selectat niciun cont contabil -VentilatedinAccount=Asociat cu succes la contul de contabilitate +VentilatedinAccount=Asociat cu succes la contul contabil NotVentilatedinAccount=Nu este asociat cu contul contabil XLineSuccessfullyBinded=%s produse/servicii legate cu succes de un cont contabil -XLineFailedToBeBinded=Produsele / serviciile %s nu au fost asociate niciunui cont contabil +XLineFailedToBeBinded=Produsele/serviciile %s nu au fost asociate niciunui cont contabil ACCOUNTING_LIMIT_LIST_VENTILATION=Numărul maxim de linii în liste și pe pagina de legare (recomandat: 50) -ACCOUNTING_LIST_SORT_VENTILATION_TODO=Începeți sortarea paginii "Asocieri de făcut" după cele mai recente elemente -ACCOUNTING_LIST_SORT_VENTILATION_DONE=Începeți sortarea paginii "Asocieri făcute" după cele mai recente elemente +ACCOUNTING_LIST_SORT_VENTILATION_TODO=Începe sortarea paginii "Asocieri de făcut" după cele mai recente elemente +ACCOUNTING_LIST_SORT_VENTILATION_DONE=Începe sortarea paginii "Asocieri făcute" după cele mai recente elemente -ACCOUNTING_LENGTH_DESCRIPTION=Tăiați descrierea produselor și serviciilor în înregistrări după x caractere (Best = 50) -ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Tăiați formularul de descriere a contului de produse și servicii în înregistrări după x caractere (Best = 50) +ACCOUNTING_LENGTH_DESCRIPTION=Tăiați descrierea produselor și serviciilor în înregistrări după x caractere (Cel mai bine = 50) +ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Trunchiază descrierea contării de produse și servicii în înregistrări după x caractere (Cel mai bine = 50) ACCOUNTING_LENGTH_GACCOUNT=Lungimea conturilor contabile generale (Dacă setați valoarea la 6 aici, contul "706" va apărea pe ecran ca "706000") -ACCOUNTING_LENGTH_AACCOUNT=Lungimea contului contabil terţ (Dacă setați valoarea la 6 aici, contul '401' va apărea ca '401000' pe ecran) +ACCOUNTING_LENGTH_AACCOUNT=Lungimea contului contabil pentru terţ (Dacă setați valoarea la 6 aici, contul '401' va apărea ca '401000' pe ecran) ACCOUNTING_MANAGE_ZERO=Permite gestionarea unui număr diferit de zerouri la sfârșitul unui cont contabil. Cerut de unele țări (precum Elveția). Dacă este setat la oprit (implicit), puteți seta următorii doi parametri pentru a cere aplicației să adauge zerouri virtuale. -BANK_DISABLE_DIRECT_INPUT=Dezactivați înregistrarea directă a tranzacției în contul bancar +BANK_DISABLE_DIRECT_INPUT=Dezactivează î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. @@ -164,117 +164,117 @@ ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=La transferul contabil, selectați perioad ACCOUNTING_SELL_JOURNAL=Jurnal vânzări ACCOUNTING_PURCHASE_JOURNAL=Jurnal cumpărări -ACCOUNTING_MISCELLANEOUS_JOURNAL=Journal Diverse -ACCOUNTING_EXPENSEREPORT_JOURNAL=Jurnalul raportului de cheltuieli +ACCOUNTING_MISCELLANEOUS_JOURNAL=Jurnal diverse +ACCOUNTING_EXPENSEREPORT_JOURNAL=Jurnalul rapoartelor de cheltuieli ACCOUNTING_SOCIAL_JOURNAL=Jurnal Asigurări Sociale ACCOUNTING_HAS_NEW_JOURNAL=Are un nou jurnal -ACCOUNTING_RESULT_PROFIT=Contul contabil rezultat (Profit) -ACCOUNTING_RESULT_LOSS=Contul contabil rezultat (pierdere) +ACCOUNTING_RESULT_PROFIT=Contul contabil rezultat (Profit) +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 +ACCOUNTING_ACCOUNT_TRANSFER_CASH=Cont contabil de virament pentru transfer bancar 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_ACCOUNT_SUSPENSE=Cont contabil de avans +DONATION_ACCOUNTINGACCOUNT=Contul contabil pentru înregistrarea donațiilor +ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Cont contabil pentru a înregistra abonamente ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT= Cont contabil implicit pentru înregistra depunerilor clientului 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_ACCOUNT=Cont contabil implicit pentru produsele vândute (vor fi utilizate dacă nu sunt definite în fișa produsului) 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_ACCOUNT=Cont contabil implicit pentru serviciile achiziţionate (va fi utilizat dacă nu este definit în fișa serviciului) 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_ACCOUNT=Cont contabil implicit pentru serviciile vândute (va fi utilizat dacă nu este definit în fișa de servicii) 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 +Docdate=Data documentului Docref=Referinţă LabelAccount=Etichetă cont -LabelOperation=Etichetarea operaţiei +LabelOperation=Etichetă operaţie Sens=Direcţie AccountingDirectionHelp=Pentru un cont contabil al unui client, utilizați Credit pentru a înregistra o plată pe care ați primit-o <br> Pentru un cont contabil al unui furnizor, utilizați Debit pentru a înregistra o plată pe care o efectuați -LetteringCode=Codul de scriere +LetteringCode=Codul de numerotare Lettering=Numerotare -Codejournal=Journal +Codejournal=Jurnal JournalLabel=Eticheta jurnalului -NumPiece=Număr nota contabila -TransactionNumShort=Numărul tranzacţiei -AccountingCategory=Grupuri personalizate +NumPiece=Număr notă contabilă +TransactionNumShort=Nr. tranzacţie +AccountingCategory=Grupă personalizată GroupByAccountAccounting=Grupare după cont registru GroupBySubAccountAccounting=Grupare după cont de subregistru -AccountingAccountGroupsDesc=Puteți defini aici câteva grupuri de conturi de contabilitate. Acestea vor fi utilizate pentru rapoarte contabile personalizate. -ByAccounts=Prin conturi -ByPredefinedAccountGroups=Prin grupuri predefinite -ByPersonalizedAccountGroups=Prin grupuri personalizate -ByYear=Pe ani +AccountingAccountGroupsDesc=Puteți defini aici câteva grupe de conturi contabile. Acestea vor fi utilizate pentru rapoarte contabile personalizate. +ByAccounts=După conturi +ByPredefinedAccountGroups=După grupe predefinite +ByPersonalizedAccountGroups=După grupe personalizate +ByYear=După an NotMatch=Nu este setat DeleteMvt=Ștergeți câteva linii operate din contabilitate DelMonth=Luna care se şterge -DelYear=Anul pentru ștergere -DelJournal=Jurnalul de șters +DelYear=An de șters +DelJournal=Jurnal de șters ConfirmDeleteMvt=Aceasta va șterge toate liniile operate în contabilitate pentru anul/luna și/sau pentru un jurnal specific (este necesar cel puțin un criteriu). Va trebui să refolosiți caracteristica '%s' pentru a înregistra înregistrarea ștearsă în registru.  ConfirmDeleteMvtPartial=Aceasta va șterge tranzacția din contabilitate (toate liniile de operațiuni legate de aceeași tranzacție vor fi șterse) FinanceJournal=Jurnal Bancă ExpenseReportsJournal=Jurnalul rapoartelor de cheltuieli -DescFinanceJournal=Jurnal de finanțe, care include toate tipurile de plăți prin cont bancar +DescFinanceJournal=Jurnal financiar bancar, include toate tipurile de plăți efectuate prin conturile bancare DescJournalOnlyBindedVisible=Aceasta este o vedere a înregistrării care este legată de un cont contabil și poate fi înregistrată în Jurnale și contabilitate. -VATAccountNotDefined=Contul de TVA nu a fost definit -ThirdpartyAccountNotDefined=Contul pentru o terță parte nu este definit +VATAccountNotDefined=Contul contabil de TVA nu a fost definit +ThirdpartyAccountNotDefined=Contul pentru terț nu este definit ProductAccountNotDefined=Contul pentru produs nu este definit -FeeAccountNotDefined=Contul pentru taxă nu este definit +FeeAccountNotDefined=Contul contabil pentru cheltuieli nu este definit BankAccountNotDefined=Contul pentru bancă nu este definit -CustomerInvoicePayment=Incasare factura client +CustomerInvoicePayment=Încasare factură client ThirdPartyAccount=Cont de terţ NewAccountingMvt=Tranzacție nouă NumMvts=Numărul tranzacției ListeMvts=Lista mișcărilor ErrorDebitCredit=Debitul și creditul nu pot avea o valoare, în același timp, -AddCompteFromBK=Adăugați conturi contabile grupului +AddCompteFromBK=Adaugă conturi contabile la grupă ReportThirdParty=Lista conturilor terţilor -DescThirdPartyReport=Consultați aici lista clienților și furnizorilor terți și conturile lor contabile +DescThirdPartyReport=Consultă aici lista terţilor clienților și furnizori și conturile lor contabile ListAccounts=Lista conturilor contabile UnknownAccountForThirdparty=Cont terț necunoscut. Vom folosi %s -UnknownAccountForThirdpartyBlocking=Cont terț necunoscut. Eroare de blocare +UnknownAccountForThirdpartyBlocking=Cont terț necunoscut. Eroare blocantă ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Cont analitic de terţ nedefinit sau terţ necunoscut. Se va folosi%s ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Terț necunoscut și/sau cont analitic alocat nedefinit la plată. Se va menține valoarea contului analitic ca necompletat. -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 +ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Contul terț nu este definit sau este necunoscut. Eroare blocantă. +UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Cont contabil de terți necunoscut și cont de avans nedefinit. Eroare blocantă +PaymentsNotLinkedToProduct=Plata nu este legată de vreun produs/serviciu OpeningBalance=Sold iniţial de deschidere ShowOpeningBalance=Afişează soldurile de deschidere HideOpeningBalance=Ascunde soldurile de deschidere ShowSubtotalByGroup=Afișează subtotalul după nivel -Pcgtype=Grup de conturi +Pcgtype=Grupă de conturi 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=Compensabil TotalVente=Cifra de afaceri totală înainte de impozitare -TotalMarge=Total Marje vânzări +TotalMarge=Total marje vânzări -DescVentilCustomer=Consultați aici lista liniilor de facturare pentru clienți asociate (sau nu) contului contabil al produsului -DescVentilMore=În majoritatea cazurilor, dacă utilizați produse sau servicii predefinite și setați numărul contului de pe cardul de produs / serviciu, aplicația va putea să facă legătura între liniile dvs. de facturare și contul contabil al planului dvs. de conturi, doar în un singur clic <strong> "%s" </strong>. Dacă contul nu a fost setat pe cardurile de produs/serviciu sau dacă mai aveți încă unele linii care nu sunt legate la un cont, va trebui să faceți o legare manuală de la menu "<strong> %s </strong>". -DescVentilDoneCustomer=Consultați aici lista liniilor de facturare pentru clienți și a contului contabil al produselor lor -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: +DescVentilCustomer=Consultă aici lista liniilor de facturare clienți asociate (sau nu) contului contabil al produsului +DescVentilMore=În majoritatea cazurilor, dacă utilizați produse sau servicii predefinite și setați numărul contului pe fişa de produs/serviciu, aplicația va putea să facă asociere dintre liniile tale de factură și contul contabil, doar printr-un singur clic pe butonul <strong>"%s"</strong>. Dacă contul contabil nu a fost setat pe fişele de produs/serviciu sau dacă mai aveți încă unele linii care nu sunt asociate la un cont, va trebui să faceți o asociere manuală din meniul "<strong>%s</strong>". +DescVentilDoneCustomer=Consultă aici lista liniilor de facturare pentru clienți și a contului contabil al produselor lor +DescVentilTodoCustomer=Asociază 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=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 <strong> „%s“ </strong>. Î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<strong> %s </strong>". -DescVentilDoneExpenseReport=Consultați aici lista liniilor rapoartelor privind cheltuielile și contul contabil a taxelor lor +DescVentilTodoExpenseReport=Asociere linii de rapoarte de cheltuieli care nu sunt deja asociate unui cont contabil de cheltuieli +DescVentilExpenseReport=Consultă aici lista liniilor de rapoarte cheltuieli asociate (sau nu) unui cont contabil de cheltuieli +DescVentilExpenseReportMore=Dacă configurezi contul contabil pe linii de raportare a tipurilor de cheltuieli, aplicația va putea face toate legăturile între liniile tale de raportare a cheltuielilor și contul contabil din planul tău de conturi, printr-un singur clic <strong>"%s"</strong>. În cazul în care contul nu a fost stabilit în dicționarul de taxe sau dacă ai încă anumite linii care nu sunt legate de niciun cont, va trebui să faci o legare manuală din meniul "<strong>%s</strong>". +DescVentilDoneExpenseReport=Consultați aici lista liniilor rapoartelor de cheltuieli și contul contabil a taxelor lor Closure=Închidere anuală DescClosure=Consultați aici numărul de tranzacţii lunare care nu sunt validate și se află în anii fiscali deschişi @@ -285,50 +285,50 @@ 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ă ValidateHistory=Asociază automat -AutomaticBindingDone=Asociere automată făcută +AutomaticBindingDone=Asociere automată finalizată ErrorAccountancyCodeIsAlreadyUse=Eroare, nu puteți șterge acest cont contabil, deoarece este folosit -MvtNotCorrectlyBalanced=Mișcarea nu este corectă în balanţă. Debit = %s | Credit = %s +MvtNotCorrectlyBalanced=Contarea nu este corect echilibrată. Debit = %s | Credit = %s Balancing=în balanţă -FicheVentilation=Card asociat +FicheVentilation=Fişă asociere GeneralLedgerIsWritten=Tranzacțiile sunt scrise în Cartea Mare -GeneralLedgerSomeRecordWasNotRecorded=Unele tranzacții nu au putut fi înregistrate periodic. Dacă nu există niciun alt mesaj de eroare, acest lucru se datorează, probabil, faptului că au fost deja înregistrate în jurnal. +GeneralLedgerSomeRecordWasNotRecorded=Unele tranzacții nu au putut fi înregistrate în jurnal. Dacă nu există niciun alt mesaj de eroare, acest lucru se datorează, probabil, faptului că au fost deja înregistrate în jurnal. NoNewRecordSaved=Nu se mai înregistrează nicio intrare în jurnal. ListOfProductsWithoutAccountingAccount=Lista produselor care nu sunt asociate unui cont contabil ChangeBinding=Schimbați asocierea Accounted=Contabilizat în jurnal - Cartea Mare -NotYetAccounted=Nu a fost încă înregistrată în jurnal - Cartea Mare +NotYetAccounted=Nu a fost încă înregistrată în jurnalul Cartea Mare ShowTutorial=Arată tutorial -NotReconciled=Nu este conciliat +NotReconciled=Nu este decontat WarningRecordWithoutSubledgerAreExcluded=Atenție, toate operațiunile fără cont de subregistru definit sunt filtrate și excluse din această vizualizare ## Admin BindingOptions=Opțiuni de legare -ApplyMassCategories=Aplica categorii bulk +ApplyMassCategories=Aplicare în masă la categorii AddAccountFromBookKeepingWithNoCategories=Contul contabil disponibil nu este încă într-o grupă personalizată CategoryDeleted=Categoria pentru contul contabil a fost eliminată -AccountingJournals=Jurnalele contabile -AccountingJournal=Jurnalul contabil +AccountingJournals=Jurnale contabile +AccountingJournal=Jurnal contabil NewAccountingJournal=Jurnal contabil nou -ShowAccountingJournal=Arătați jurnalul contabil +ShowAccountingJournal=Afişare jurnal contabil NatureOfJournal= Natura jurnalului AccountingJournalType1=Operațiuni diverse AccountingJournalType2=Vânzări AccountingJournalType3=Achiziţii AccountingJournalType4=Banca -AccountingJournalType5=Raport Cheltuieli +AccountingJournalType5=Raport de Cheltuieli AccountingJournalType8=Inventar AccountingJournalType9=Are nou ErrorAccountingJournalIsAlreadyUse=Acest jurnal este deja folosit -AccountingAccountForSalesTaxAreDefinedInto=Note: contul contabil pentru taxe de vânzări tax este definit în menu <b> %s </b> - <b> %s </b> -NumberOfAccountancyEntries=Number de intrări +AccountingAccountForSalesTaxAreDefinedInto=Notă: contul contabil pentru taxe de vânzări este definit în meniul <b>%s</b> - <b>%s</b> +NumberOfAccountancyEntries=Număr de intrări NumberOfAccountancyMovements=Număr de mișcări ACCOUNTING_DISABLE_BINDING_ON_SALES=Dezactivați legarea și transferul în contabilitate pentru vânzări (facturile clienților nu vor fi luate în considerare în contabilitate) ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Dezactivați legarea și transferul în contabilitate pentru achiziții (facturile furnizor nu vor fi luate în considerare în contabilitate) ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Dezactivați legarea și transferul în contabilitate pentru rapoartele de cheltuieli (rapoartele de cheltuieli nu vor fi luate în considerare în contabilitate) ## Export -ExportDraftJournal=Exportați proiectul de jurnal +ExportDraftJournal=Export jurnal schiţă Modelcsv=Model export Selectmodelcsv=Selectează un model de export Modelcsv_normal=Export clasic @@ -350,32 +350,32 @@ Modelcsv_Sage50_Swiss=Export pentru Sage 50 Switzerland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export pentru Gestinum (v3) Modelcsv_Gestinumv5Export pentru Gestinum (v5) -ChartofaccountsId=Id-ul listei de conturi +ChartofaccountsId=Id plan de conturi ## Tools - Init accounting account on product / service -InitAccountancy=Init contabilitate +InitAccountancy=Iniţializare 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. +DefaultBindingDesc=Această pagină poate fi utilizată pentru a seta un cont contabil implicit care să fie folosit pentru a asocia înregistrările tranzacțiilor cu privire la plăţi salarii, donații, impozite și taxe atunci când nu a fost deja stabilit niciun cont contabil. DefaultClosureDesc= Această pagină poate fi utilizată pentru a seta parametrii folosiți pentru închiderile contabile. Options=Opţiuni -OptionModeProductSell=Mod vanzari +OptionModeProductSell=Mod vânzări OptionModeProductSellIntra=Mod vânzări export în CEE OptionModeProductSellExport=Mod vânzări export în alte ţări -OptionModeProductBuy=Mod cumparari +OptionModeProductBuy=Mod cumpărări 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. +OptionModeProductSellDesc=Afișează toate produsele care au cont contabil definit 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. +OptionModeProductBuyDesc=Afișează toate produsele care au cont contabil definit pentru achiziții. 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 -WithoutValidAccount=Fără un cont dedicat valabil -WithValidAccount=Cu un cont dedicat valabil -ValueNotIntoChartOfAccount=Această valoare a contului contabil nu există în planul de conturi +CleanFixHistory=Elimină contul contabil din linii care nu există în planul de conturi +CleanHistory=Resetează toate asocierile pentru anul selectat +PredefinedGroups=Grupe predefinite +WithoutValidAccount=Fără un cont dedicat valid +WithValidAccount=Cu un cont dedicat valid +ValueNotIntoChartOfAccount=Acest cont contabil nu există în planul de conturi AccountRemovedFromGroup=Cont contabil eliminat din grupă SaleLocal=Vânzare locală SaleExport=Vânzare la export @@ -384,25 +384,47 @@ SaleEECWithVAT=Vânzarea în CEE cu cota TVA diferită de zero, deci presupunem 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 +Range=Interval cont contabil Calculated=Calculat -Formula=Formula +Formula=Formulă ## Error -SomeMandatoryStepsOfSetupWereNotDone=Câțiva pași obligatorii de configurare nu au fost făcuți, vă rugăm să-i completați -ErrorNoAccountingCategoryForThisCountry=Nu există un grup de conturi contabile disponibil pentru țara %s (Consultați Acasă - Configurare - Dicționare) -ErrorInvoiceContainsLinesNotYetBounded=Încercați să treceţi în jurnal câteva linii ale facturii <strong> %s </strong>, dar alte linii nu sunt încă legate de contul contabil. Jurnalizarea tuturor liniilor de facturare pentru această factură este refuzată +SomeMandatoryStepsOfSetupWereNotDone=Câțiva pași obligatorii de configurare nu au fost făcuți, efectuează-i +ErrorNoAccountingCategoryForThisCountry=Nu există grupe de conturi contabile disponibile pentru țara %s (Consultă Acasă - Setări - Dicționare) +ErrorInvoiceContainsLinesNotYetBounded=Încercați să treceţi în jurnal câteva linii ale facturii <strong>%s</strong>, dar alte linii nu au un cont contabil asociat. Jurnalizarea tuturor liniilor pentru această factură este respinsă. ErrorInvoiceContainsLinesNotYetBoundedShort=Unele linii de pe factură nu sunt legate de contul contabil. -ExportNotSupported=Formatul exportat nu este suportat in aceasta pagina +ExportNotSupported=Formatul exportat setat nu este suportat în această pagină BookeppingLineAlreayExists=Linii deja existente în contabilitate NoJournalDefined=Nici un jurnal nu a fost definit Binded=Linii asociate ToBind=Linii de asociat -UseMenuToSetBindindManualy=Linii care nu sunt încă legate, utilizați meniul <a href="%s"> %s </a> pentru a face legarea manual +UseMenuToSetBindindManualy=Linii care nu sunt încă asociate, utilizează meniul <a href="%s">%s</a> pentru a face asocierea manual ## Import -ImportAccountingEntries=Intrările contabile +ImportAccountingEntries=Intrări contabile +ImportAccountingEntriesFECFormat=Înregistrări contabile - format FEC +FECFormatJournalCode=Cod jurnal (JournalCode) +FECFormatJournalLabel=Etichetă jurnal (JournalLib) +FECFormatEntryNum=Număr notă contabilă (EcritureNum) +FECFormatEntryDate=Dată notă contabilă (EcritureDate) +FECFormatGeneralAccountNumber=Număr cont general (CompteNum) +FECFormatGeneralAccountLabel=Etichetă cont general (CompteLib) +FECFormatSubledgerAccountNumber=Număr cont subregistru (CompAuxNum) +FECFormatSubledgerAccountLabel=Număr cont subregistru (CompAuxLib) +FECFormatPieceRef=Ref notă contabilă (PieceRef) +FECFormatPieceDate=Dată creare notă contabilă (PieceDate) +FECFormatLabelOperation=Etichetă operaţiune (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Cod reconciliabil (EcritureLet) +FECFormatReconcilableDate=Dată reconciliere (DateLet) +FECFormatValidateDate=Dată validare notă contabilă (ValidDate) +FECFormatMulticurrencyAmount=Sumă multi-monedă (Montantdevise) +FECFormatMulticurrencyCode=Cod multi-monedă (Idevise) + DateExport=Dată export -WarningReportNotReliable=Atenție, acest raport nu se bazează pe registrul contabil, deci nu conține o tranzacție modificată manual în registru contabil. Dacă jurnalele dvs. sunt actualizate, vizualizarea contabilă este mai precisă. +WarningReportNotReliable=Atenție, acest raport nu se bazează pe registrul contabil, deci nu conține o tranzacție modificată manual în registru contabil. Dacă jurnalele sunt actualizate, vizualizarea contabilă este mai precisă. ExpenseReportJournal=Jurnalul raportului de cheltuieli InventoryJournal=Jurnal inventar + +NAccounts=%s conturi diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 2ae296c86f8..8d2e5b49903 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -4,7 +4,7 @@ Version=Versiune Publisher=Editor VersionProgram=Versiune program VersionLastInstall=Versiunea iniţială instalată -VersionLastUpgrade=Ultima versiune upgrade +VersionLastUpgrade=Ultima versiune actualizare VersionExperimental=Experimental VersionDevelopment=Dezvoltare VersionUnknown=Necunoscut @@ -15,38 +15,39 @@ FileIntegrityIsStrictlyConformedWithReference=Integritatea fișierelor este in s FileIntegrityIsOkButFilesWereAdded=Verificarea integrității fișierelor a reușit, totuși au fost adăugate unele fișiere noi. FileIntegritySomeFilesWereRemovedOrModified=Verificarea integrității fișierelor a eșuat. Unele fișiere au fost modificate, eliminate sau adăugate. GlobalChecksum=Sumă de control globală -MakeIntegrityAnalysisFrom=Analizați integritatea fișierelor de aplicații de la +MakeIntegrityAnalysisFrom=Analizați integritatea fișierelor aplicației din LocalSignature=Semnătura locală încorporată (mai puțin fiabilă) RemoteSignature=Semnătura remote (mai fiabilă) 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 +FileCheckDolibarr=Verificați integritatea fișierelor aplicației 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 +XmlNotFound=Integritatea fișierului XML al aplicației nu a fost găsit SessionId=ID sesiune -SessionSaveHandler=Handler pentru a salva sesiunile +SessionSaveHandler=Handler pentru salvarea sesiunilor 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. +ConfirmPurgeSessions=Chiar vrei să ștergi toate sesiunile? Acest lucru va deconecta fiecare utilizator (cu excepția ta). +NoSessionListWithThisHandler=Handlerul sesiunii salvate configurat în PHP nu permite afișarea tuturor sesiunilor in derulare. LockNewSessions=Blocare conexiuni noi -ConfirmLockNewSessions=Sigur doriți să restricționați orice nouă conexiune Dolibarr către dvs.? Numai utilizatorul <b> %s </b> se va putea conecta după aceea. +ConfirmLockNewSessions=Sigur doriți să restricționați orice nouă conexiune Dolibarr? Numai utilizatorul <b> %s </b> se va putea conecta după aceea. UnlockNewSessions=Înlăturaţi blocarea conexiunilor -YourSession=Sesiunea dvs +YourSession=Sesiunea ta Sessions=Sesiuni utilizatori WebUserGroup=Utilizator/grup Web Server +PermissionsOnFiles=Permisiuni pe fişiere PermissionsOnFilesInWebRoot=Permisiunile fişierelor din directorul web rădăcină PermissionsOnFile=Permisiuni pe fişierul %s NoSessionFound=Configurația dvs. PHP pare să nu permită listarea sesiunilor active. Directorul utilizat pentru salvarea sesiunilor (<b> %s </b>) 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 +DBStoringCharset=Set caractere al bazei de date pentru stocare +DBSortingCharset=Set de caractere al bazei de date pentru sortare HostCharset=Charset gazdă ClientCharset=Set de caractere client -ClientSortingCharset=Compararea clienților -WarningModuleNotActive=<b>Modulul %s</b> trebuie să fie activat -WarningOnlyPermissionOfActivatedModules=Numai permisiunile legate de modulele activate sunt prezentate aici. Aveţi posibilitatea să activaţi alte module în Setup - Pagina Module. +ClientSortingCharset=Îmbinare client +WarningModuleNotActive=Modulul <b> %s </b> trebuie să fie activat +WarningOnlyPermissionOfActivatedModules=Numai permisiunile legate de modulele activate sunt prezentate aici. Aveţi posibilitatea să activaţi alte module în Acasă->Setări->Module. DolibarrSetup=Dolibarr instalare sau actualizare InternalUser=Utilizator intern ExternalUser=Utilizator extern @@ -54,238 +55,240 @@ InternalUsers=Utilizatori interni ExternalUsers=Utilizatori externi GUISetup=Afişare SetupArea=Setări -UploadNewTemplate=Încărcați șabloane noi -FormToTestFileUploadForm=Formular pentru testarear încărcării de fişiere (în funcţie de configurare) +UploadNewTemplate=Încărcați șabloan(e) noi +FormToTestFileUploadForm=Formular pentru testarea încărcării de fişiere (în funcţie de configurare) ModuleMustBeEnabled=Modulul/aplicația <b>%s</b> trebuie să fie activată ModuleIsEnabled=Modulul/aplicația <b>%s</b> a fost activată -IfModuleEnabled=Notă: Da este folositor numai dacă modul <b>%s</b> este activat -RemoveLock=Eliminați / redenumiți fișierul <b> %s </b> dacă există, pentru a permite utilizarea instrumentului Actualizare / Instalare. -RestoreLock=Restaurați fișierul <b> %s </b>, numai cu permisiunea de citire, pentru a dezactiva orice viitoare utilizare a instrumentului Actualizare / Instalare. -SecuritySetup=Setări Securitate +IfModuleEnabled=Notă: da este folositor numai dacă modulul <b>%s</b> este activat +RemoveLock=Eliminați/redenumiți fișierul <b> %s </b> dacă există, pentru a permite utilizarea instrumentului Actualizare/ Instalare. +RestoreLock=Restaurați fișierul <b>%s</b>, numai cu permisiunea de citire, pentru a dezactiva orice viitoare utilizare a instrumentului Actualizare/Instalare. +SecuritySetup=Setări securitate +PHPSetup=Configuraţie PHP SecurityFilesDesc=Definiți aici opțiunile legate de securitatea încărcării fișierelor. -ErrorModuleRequirePHPVersion=Eroare, acest modul necesită PHP versiunea %s sau mai mare -ErrorModuleRequireDolibarrVersion=Eroare, acest modul Dolibarr necesită versiunea %s sau mai mare -ErrorDecimalLargerThanAreForbidden=Eroare, o precizie mai mare decât <b>%s</b> nu este suportat. -DictionarySetup=Setări Dictionar +ErrorModuleRequirePHPVersion=Eroare, acest modul necesită versiunea PHP %s sau mai nouă +ErrorModuleRequireDolibarrVersion=Eroare, acest modul necesită versiunea Dolibarr %s sau mai nouă +ErrorDecimalLargerThanAreForbidden=Eroare, o precizie mai mare de <b>%s</b> nu este suportată. +DictionarySetup=Setări dicţionar Dictionary=Dicţionare -ErrorReservedTypeSystemSystemAuto=Valorile 'system' și 'systemauto' pentru tip sunt rezervate. Puteți utiliza 'user' ca valoare pentru a adăuga propriile dvs. înregistrări +ErrorReservedTypeSystemSystemAuto=Valorile 'system' și 'systemauto' pentru tip sunt rezervate. Puteți utiliza 'user' ca valoare pentru a adăuga înregistrări proprii ErrorCodeCantContainZero=Codul nu poate conţine valoarea 0 -DisableJavascript=Dezactivează funcţiile JavaScript si Ajax -DisableJavascriptNote= \nNotă: În scop de testare sau de depanare. Pentru optimizare pentru persoanele nevăzătoare sau browserele de text, ați putea prefera să utilizați configurarea pe profilul utilizatorului -UseSearchToSelectCompanyTooltip= De asemenea, dacă aveți un număr mare de terţi (> 100 000), puteți crește viteza prin setarea constantei COMPANY_DONOTSEARCH_ANYWHERE la 1 la Setup->Other. Căutarea va fi limitată la începutul șirului. +DisableJavascript=Dezactivează funcţiile JavaScript şi Ajax +DisableJavascriptNote=Notă: În scop de testare sau de depanare. Pentru optimizare pentru persoanele nevăzătoare sau browserele de text, ați putea prefera să utilizați configurarea pe profilul utilizatorului +UseSearchToSelectCompanyTooltip= De asemenea, dacă aveți un număr mare de terţi (> 100 000), puteți crește viteza prin setarea constantei COMPANY_DONOTSEARCH_ANYWHERE la 1 în Setări->Alte setări. Căutarea va fi limitată de la începutul șirului. UseSearchToSelectContactTooltip=De asemenea, dacă aveți un număr mare de terţi (> 100 000), puteți crește viteza prin setarea constantei COMPANY_DONOTSEARCH_ANYWHERE la 1 la Setup->Other. Căutarea va fi limitată la începutul șirului. -DelaiedFullListToSelectCompany=Așteptați până când o tastă este apăsată înainte de a încărca conținutul listei combo-urilor terțe. <br> Acest lucru ar putea crește performanța dacă aveți un număr mare de terțe părți, dar este mai puțin convenabil. +DelaiedFullListToSelectCompany=Așteptați până când o tastă este apăsată înainte de a încărca conținutul listelor combo terțe. <br> Acest lucru ar putea crește performanța dacă aveți un număr mare de terți , dar este mai puțin convenabilă. DelaiedFullListToSelectContact=Așteptați până când este apăsată o tastă înainte de a încărca conținutul listei combinate Contact.<br> Acest lucru poate crește performanța dacă aveți un număr mare de contacte, dar este mai puțin convenabil. -NumberOfKeyToSearch=Număr de caractere care să declanșeze căutarea: %s +NumberOfKeyToSearch=Numărul de caractere care să declanșeze căutarea: %s NumberOfBytes=Număr de octeți SearchString=Șir de căutare -NotAvailableWhenAjaxDisabled=Nu este disponibil, atunci când Ajax cu handicap +NotAvailableWhenAjaxDisabled=Nu este disponibil, atunci când Ajax este dezactivat AllowToSelectProjectFromOtherCompany=Pe documentul unui terț, puteți alege un proiect legat de un alt terț JavascriptDisabled=JavaScript dezactivat -UsePreviewTabs=Utilizaţi taburile previzualizare +UsePreviewTabs=Utilizaţi taburile de previzualizare ShowPreview=Arată previzualizare ShowHideDetails=Afişare-Ascundere detalii -PreviewNotAvailable=Preview nu este disponibil -ThemeCurrentlyActive=Tema activă în prezent -MySQLTimeZone=TimeZone MySql (database) +PreviewNotAvailable=Preview indisponibil +ThemeCurrentlyActive=Tema activă curentă +MySQLTimeZone=TimeZone MySql (baza de date) TZHasNoEffect=Datele sunt stocate și returnate de serverul de baze de date ca și cum ar fi păstrate ca șir trimis. Fusul orar are efect doar atunci când se folosește funcția UNIX_TIMESTAMP (care nu ar trebui să fie utilizată de Dolibarr, astfel că baza de date TZ nu ar trebui să aibă efect, chiar dacă este schimbată după introducerea datelor). Space=Spaţiu Table=Tabel Fields=Câmpuri Index=Index -Mask=Masca +Mask=Mască NextValue=Următoarea valoare -NextValueForInvoices=Urmatoarea valoare (facturi) -NextValueForCreditNotes=Urmatoarea valoare (credit note) -NextValueForDeposit=Valoarea următoare (plata în avans) -NextValueForReplacements=Urmatoarea valoare(înlocuiri) +NextValueForInvoices=Următoarea valoare (facturi) +NextValueForCreditNotes=Următoarea valoare (note de credit) +NextValueForDeposit=Următoarea valoare (plăţi în avans) +NextValueForReplacements=Următoarea valoare(facturi de înlocuire) MustBeLowerThanPHPLimit=Notă: Configuraţia ta PHP permite încărcarea de fişiere cu dimensiuni de până la <b>%s</b>%s, indiferent de valoarea acestui parametru -NoMaxSizeByPHPLimit=Notă: Nicio limită setată în configuraţia dvs. PHP +NoMaxSizeByPHPLimit=Notă: Nicio limită setată în configuraţia 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 +UseCaptchaCode=Utilizaţi codul grafic (CAPTCHA) pe pagina de autentificare AntiVirusCommand=Calea completă la comanda antivirus AntiVirusCommandExample=Exemplu pentru ClamAv Daemon (necesită clamav-daemon): /usr/bin/clamdscan<br>Exemplu pentru ClamWin (foarte foarte lent): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe -AntiVirusParam= Mai multe despre parametrii în linia de comandă +AntiVirusParam= Mai multe despre parametrii liniei de comandă AntiVirusParamExample=Exemplu pentru ClamAv Daemon: --fdpass<br>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 +ComptaSetup=Setări modul Contabilitate +UserSetup=Setări modul Utilizatori +MultiCurrencySetup=Configurare multi-monedă MenuLimits=Limite şi precizii MenuIdParent=ID Meniu părinte -DetailMenuIdParent=ID-ul meniului părinte (0 pentru top meniu ) -DetailPosition=Sortează numărul meniu pentru a defini poziţia +DetailMenuIdParent=ID-ul meniului părinte (0 pentru meniu top) +DetailPosition=Număr de ordine pentru a defini poziţia în meniu AllMenus=Toate -NotConfigured=Modulul / aplicația nu a fost configurată +NotConfigured=Modulul/aplicația nu a fost configurată Active=Activ SetupShort=Setări OtherOptions=Alte opţiuni OtherSetup=Alte setări CurrentValueSeparatorDecimal=Separator zecimal CurrentValueSeparatorThousand=Separator mii -Destination=Destinaţii +Destination=Destinaţie IdModule=ID Modul IdPermissions=ID Permisiuni LanguageBrowserParameter=Parametru %s -LocalisationDolibarrParameters=Parametrii localizării +LocalisationDolibarrParameters=Parametri localizare ClientTZ=Time Zone client (utilizator) -ClientHour=Client Time(utilizator) -OSTZ=Time Zone Server OS +ClientHour=Timp client (utilizator) +OSTZ=Time Zone OS Server PHPTZ=Time Zone Server PHP DaylingSavingTime=Ora de vară (utilizator) -CurrentHour=Timp PHP (server) -CurrentSessionTimeOut=Sesiunea curentă timeout +CurrentHour=Timp PHP (server) +CurrentSessionTimeOut=Timeout sesiune curentă YouCanEditPHPTZ=Pentru a seta un alt fus de orar PHP (nu se cere), puteți încerca să adăugați un fișier .htaccess cu o linie ca "SetEnv TZ Europe / Paris" HoursOnThisPageAreOnServerTZ=Atenție, contrar altor ecrane, orele din această pagină nu sunt în fusul orar local, ci în fusul orar al serverului. Box=Widget -Boxes=Widgeturi +Boxes=Widget-uri MaxNbOfLinesForBoxes=Numărul maxim de linii pentru widget-uri AllWidgetsWereEnabled=Toate widgeturile disponibile sunt activate -PositionByDefault=Poziţia implicită +PositionByDefault=Ordinea implicită Position=Poziţie -MenusDesc=Managerii de meniuri au stabilit conținutul celor două bare de meniu (orizontală și verticală). -MenusEditorDesc=Editorul de meniuri vă permite să definiți intrări personalizate din meniu. Folosiți-l cu grijă pentru a evita instabilitatea și intrările de meniuri care nu pot fi accesate permanent. <br> Unele module adaugă meniuri (mai ales în meniul <b> Toate </b>). Dacă eliminați din greșeală unele dintre aceste intrări, le puteți restabili dezactivând și reînființând modulul. +MenusDesc=Managerii de meniuri stabilesc conținutul celor două bare de meniu (orizontală și verticală). +MenusEditorDesc=Editorul de meniuri vă permite să definiți intrări personalizate din meniu. Folosiți-l cu grijă pentru a evita instabilitatea și intrările de meniuri care nu pot fi accesate permanent. <br> Unele module adaugă meniuri (mai ales în meniul <b>Toate</b>). Dacă eliminați din greșeală unele dintre aceste intrări, le puteți restabili dezactivând și reactivând modulul. MenuForUsers=Meniu pentru utilizatori -LangFile=Fişiere. Lang -Language_en_US_es_MX_etc=Limba (en_US, es_MX, ...) +LangFile=fişier .lang +Language_en_US_es_MX_etc=Limbă (en_US, es_MX, ...) System=Sistem -SystemInfo=Informaţii Sistem -SystemToolsArea=Instrumente Sistem +SystemInfo=Informaţii sistem +SystemToolsArea=Instrumente sistem SystemToolsAreaDesc=Această zonă oferă funcții de administrare. Utilizați meniul pentru a alege caracteristica cerută. Purge=Curăţenie -PurgeAreaDesc=Această pagină vă permite să ștergeți toate fișierele generate sau stocate de Dolibarr (fișiere temporare sau toate fișierele din directorul <b> %s </b>). Utilizarea acestei funcții nu este în mod normal necesară. Este oferită ca soluție pentru utilizatorii care găzduiesc Dolibarr la un furnizor care nu oferă permisiuni de ștergere a fișierelor generate de serverul web. -PurgeDeleteLogFile=Ștergeți fișierele din jurnal, inclusiv <b> %s </ b> definite pentru modulul Syslog (fără risc de pierdere a datelor) -PurgeDeleteTemporaryFiles= Ștergeți toate fișierele jurnal și temporare (fără risc de pierdere a datelor). Notă: Ștergerea fișierelor temporare se face numai dacă directorul temporar a fost creat acum mai mult de 24 de ore.  +PurgeAreaDesc=Această pagină vă permite să ștergeți toate fișierele generate sau stocate de Dolibarr (fișiere temporare sau toate fișierele din directorul <b>%s</b>). Utilizarea acestei funcții nu este în mod normal necesară. Este oferită ca soluție pentru utilizatorii care găzduiesc Dolibarr la un furnizor care nu oferă permisiuni de ștergere a fișierelor generate de serverul web. +PurgeDeleteLogFile=Ștergeți fișierele din jurnal, inclusiv <b> %s </b> definite pentru modulul Syslog (fără risc de pierdere a datelor) +PurgeDeleteTemporaryFiles=Ștergeți toate fișierele jurnal și temporare (fără risc de pierdere a datelor). Parametrul poate fi 'tempfilesold', 'logfiles' sau ambele 'tempfilesold + logfiles'. Notă: Ștergerea fișierelor temporare se face numai dacă directorul temporar a fost creat acum mai mult de 24 de ore. PurgeDeleteTemporaryFilesShort=Ștergeți fișierele jurnal și temporare -PurgeDeleteAllFilesInDocumentsDir=Ștergeți toate fișierele din directorul: <b>%s</b>.<br>\nAceasta va șterge toate documentele generate legate de elemente (terțe părți, facturi etc.), fișierele încărcate în modulul ECM, gropile de rezervă pentru baze de date și fișierele temporare . -PurgeRunNow=Elimină acum -PurgeNothingToDelete=Nici un director sau fișier de șters. -PurgeNDirectoriesDeleted=<b> %s</b> fişiere sau directoare şterse. +PurgeDeleteAllFilesInDocumentsDir=Ștergeți toate fișierele din directorul: <b>%s</b>.<br>Aceasta va șterge toate documentele generate legate de elemente (terțe părți, facturi etc.), fișierele încărcate în modulul ECM, backup-urile pentru baze de date și fișierele temporare. +PurgeRunNow=Curăţă acum +PurgeNothingToDelete=Niciun director sau fișier de șters. +PurgeNDirectoriesDeleted=<b>%s</b> fişiere sau directoare şterse. PurgeNDirectoriesFailed=Nu s-au putut șterge fișierele sau directoarele <b> %s </b>. -PurgeAuditEvents=Elimină toate evenimentele de securitate +PurgeAuditEvents=Şterge toate evenimentele de securitate ConfirmPurgeAuditEvents=Sigur doriți să eliminați toate evenimentele de securitate? Toate jurnalele de securitate vor fi șterse, nu vor fi eliminate alte date. GenerateBackup=Generează backup Backup=Backup Restore=Restaurare -RunCommandSummary=Backup poate fi lansat cu următoarea comandă -BackupResult=Backup rezultat +RunCommandSummary=Backup-ul poate fi lansat cu următoarea comandă +BackupResult=Rezultat backup BackupFileSuccessfullyCreated=Fişier backup generat YouCanDownloadBackupFile=Fișierul generat poate fi acum descărcat NoBackupFileAvailable=Niciun fişier backup disponibil. -ExportMethod=Metodă Export -ImportMethod=Metodă Import -ToBuildBackupFileClickHere=To build a backup file, click <a href=Pentru a construi un fişier de rezervă, faceţi clic <a href="%s">aici.</a> -ImportMySqlDesc=Pentru a importa un fișier de backup MySQL, puteți folosi phpMyAdmin prin intermediul găzduirii dvs. sau puteți folosi comanda mysql din linia de comandă. <br> De exemplu: -ImportPostgreSqlDesc=Pentru a importa un fişier copie de siguranţă, trebuie să utilizaţi pg_restore de comandă de la linia de comandă: -ImportMySqlCommand=%s %s &lt;mybackupfile.sql +ExportMethod=Metodă export +ImportMethod=Metodă import +ToBuildBackupFileClickHere=Pentru a crea un fişier backup, apasă <a href="%s">aici</a>. +ImportMySqlDesc=Pentru a importa un fișier de backup MySQL, puteți folosi phpMyAdmin prin intermediul găzduirii dvs. sau puteți folosi comanda mysql din linia de comandă. <br>De exemplu: +ImportPostgreSqlDesc=Pentru a importa un fişier backup, trebuie să utilizaţi comands pg_restore din linia de comandă: +ImportMySqlCommand=%s %s < mybackupfile.sql ImportPostgreSqlCommand=%s %s mybackupfile.sql -FileNameToGenerate=Nume fișier pentru copiere de rezervă: +FileNameToGenerate=Nume fișier pentru backup: 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 +CommandsToDisableForeignKeysForImportWarning=Necesar dacă doriți să puteţi restaura sqldump-ul mai târziu +ExportCompatibility=Compatibilitatea fişierului de export generat ExportUseMySQLQuickParameter=Foloseşte parametrul --quick ExportUseMySQLQuickParameterHelp=Parametrul '--quick' ajută la limitarea consumului de memorie RAM pentru tabelele mari. -MySqlExportParameters=Parametrii export MySQL +MySqlExportParameters=Parametri export MySQL PostgreSqlExportParameters= Parametrii export PostgreSQL -UseTransactionnalMode=Utilizaţi mod tranzacţional -FullPathToMysqldumpCommand=Calea completă la comanda mysqldump -FullPathToPostgreSQLdumpCommand=Calea completă la comanda pg_dump +UseTransactionnalMode=Utilizare mod tranzacţional +FullPathToMysqldumpCommand=Calea completă către comanda mysqldump +FullPathToPostgreSQLdumpCommand=Calea completă către comanda pg_dump AddDropDatabase=Adaugă comanda DROP DATABASE AddDropTable=Adaugă comanda DROP TABLE ExportStructure=Structură NameColumn=Nume coloane -ExtendedInsert=Instrucşiunea Extended INSERT -NoLockBeforeInsert=Nu există instrucţiunea LOCK în jurul INSERT -DelayedInsert=Insert cu întărziere -EncodeBinariesInHexa=Codifică date binar în hexazecimal +ExtendedInsert=INSERT extins +NoLockBeforeInsert=Nu există instrucţiunea LOCK în INSERT +DelayedInsert=Insert cu întârziere +EncodeBinariesInHexa=Codifică datele binare în hexazecimal IgnoreDuplicateRecords=Ignorați erorile de înregistrare duplicat (INSERT IGNORE) -AutoDetectLang=Autodetect (browser limbă) +AutoDetectLang=Autodetecţie (limba browser-ului) 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 <a href="%s"> module activate </a> sunt afişate. +FeatureAvailableOnlyOnStable=Funcționalitate disponibilă numai pe versiuni oficiale stabile +BoxesDesc=Widget-urile 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 'Activare' sau făcând clic pe coșul de gunoi pentru dezactivare. +OnlyActiveElementsAreShown=Numai elementele din <a href="%s">module activate</a> sunt afişate. 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<span class="small valignmiddle">%s</span> 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 <strong> %s </strong>. -ModulesMarketPlaces=Găsiți aplicația / modulele externe -ModulesDevelopYourModule=Dezvoltați-vă propriile aplicații / module +ModulesDeployDesc=Dacă permisiunile sistemului de fișiere permit acest lucru, puteți utiliza acest instrument pentru a implementa un modul extern. Modulul va fi apoi vizibil în fişa <strong>%s</strong>. +ModulesMarketPlaces=Găsiți aplicații/module externe +ModulesDevelopYourModule=Dezvoltați-vă propriile aplicații/module ModulesDevelopDesc=De asemenea, va puteți dezvolta propriul modul sau puteți găsi un partener pentru a vă dezvolta unul. -DOLISTOREdescriptionLong=În loc să porniți site-ul web <a href="https://www.dolistore.com"> www.dolistore.com </a> pentru a găsi un modul extern, puteți utiliza acest instrument încorporat care va efectua căutarea pe piața externă pentru dvs. (poate fi lentă, are nevoie de acces la internet) ... +DOLISTOREdescriptionLong=În loc să porniți site-ul web <a href="https://www.dolistore.com">www.dolistore.com</a> pentru a găsi un modul extern, puteți utiliza acest instrument încorporat care va efectua căutarea pe piața externă pentru dvs. (poate fi lentă, are nevoie de acces la internet) ... NewModule=Modul nou FreeModule=Liber CompatibleUpTo=Compatibil cu versiunea %s NotCompatible=Acest modul nu pare compatibil cu Dolibarr %s (Min %s - Max %s). CompatibleAfterUpdate=Acest modul necesită o actualizare la Dolibarr %s (Min %s - Max %s). -SeeInMarkerPlace=Consultați Market place -SeeSetupOfModule=Vezi setare modul %s +SeeInMarkerPlace=Consultați pe Market place +SeeSetupOfModule=Vezi setările modului %s Updated=Updatat Nouveauté=Noutate AchatTelechargement=Cumpărați / Descărcați -GoModuleSetupArea=Pentru a implementa / instala un nou modul, accesați zona de configurare a modulelor: <a href="%s"> %s </a>. -DoliStoreDesc=DoliStore, market place oficial pentru module externe Dolibarr ERP / CRM +GoModuleSetupArea=Pentru a implementa/instala un nou modul, accesați zona de configurare a modulelor: <a href="%s">%s</a>. +DoliStoreDesc=DoliStore, marketplace oficial pentru module externe Dolibarr ERP/CRM DoliPartnersDesc=Lista companiilor care furnizează module sau funcții dezvoltate personalizat.<br>Notă: Având în vedere că Dolibarr este o aplicație open source, <i>orice</i> 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 ... +DevelopYourModuleDesc=Unele soluții pentru a vă dezvolta propriul modul... URL=URL RelativeURL=URL relativ -BoxesAvailable=Widgeturi disponibile -BoxesActivated=Widgeturile activate +BoxesAvailable=Widget-uri disponibile +BoxesActivated=Widget-uri activate ActivateOn=Activaţi pe ActiveOn=Activat pe +ActivatableOn=Activabil pe SourceFile=Fişier sursă AvailableOnlyIfJavascriptAndAjaxNotDisabled=Disponibil numai dacă nu este dezactivat JavaScript Required=Solicitat -UsedOnlyWithTypeOption=Folosit numai de unele optiuni agenda +UsedOnlyWithTypeOption=Folosit numai de unele opţiuni agendă Security=Securitate -Passwords=Parolele +Passwords=Parole DoNotStoreClearPassword=Criptați parolele stocate în baza de date (nu ca text simplu). Este foarte recomandat să activați această opțiune. MainDbPasswordFileConfEncrypted=Criptați parola bazei de date stocată în conf.php. Este foarte recomandat să activați această opțiune. -InstrucToEncodePass=Pentru a fi parola codificată în dosarul <b>conf.php</b>, înlocuiţi linia <br><b>$dolibarr_main_db_pass="...";</b><br>by<br><b>$dolibarr_main_db_pass="crypted:%s";</b> -InstrucToClearPass=Pentru a avea o parolă decodificată în fișierul <b> conf.php </b>, înlocuiți linia <br> <b> $dolibarr_main_db_pass = "cripted:..."; </b> <br> cu <br> <b> $ dolibarr_main_db_pass = "%s"; </br> +InstrucToEncodePass=Pentru a codifica parola în fişierul <b>conf.php</b>, înlocuiţi linia <br><b>$dolibarr_main_db_pass="...";</b><br>cu<br><b>$dolibarr_main_db_pass="crypted:%s";</b> +InstrucToClearPass=Pentru a avea o parolă decodificată(în clar) în fișierul <b>conf.php </b>, înlocuiți linia <br> <b>$dolibarr_main_db_pass="crypted:..."; </b> <br> cu <br> <b>$dolibarr_main_db_pass = "%s"; </b> ProtectAndEncryptPdfFiles=Protejați fișierele PDF generate. Acest lucru NU este recomandat, deoarece încalcă generarea PDF în bloc. -ProtectAndEncryptPdfFilesDesc=Protecția unui document PDF îi permite să fie citit și imprimat cu orice browser PDF. Cu toate acestea, editarea și copierea nu mai sunt posibile. Rețineți că utilizarea acestei funcții face nefunctională construirea unui fișier PDF global . +ProtectAndEncryptPdfFilesDesc=Protecția unui document PDF îi permite să fie citit și imprimat cu orice browser PDF. Cu toate acestea, editarea și copierea nu mai sunt posibile. Rețineți că utilizarea acestei funcții face nefuncţională construirea unui fișier PDF global . Feature=Funcţionalitate -DolibarrLicense=Licenţa -Developpers=Dezvoltatori / colaboratori +DolibarrLicense=Licenţă +Developpers=Dezvoltatori/contributori OfficialWebSite=Site-ul oficial Dolibarr OfficialWebSiteLocal=Site-ul web local (%s) OfficialWiki=Documentația Dolibarr / Wiki OfficialDemo=Dolibarr demo online -OfficialMarketPlace=Oficial loc pe piaţă pentru modulelor externe / addons +OfficialMarketPlace=Marketplace-ul oficial al modulelor/suplimentelor externe OfficialWebHostingService=Referinţă Servicii de web hosting (Cloud hosting) -ReferencedPreferredPartners=Parteneri preferati +ReferencedPreferredPartners=Parteneri preferaţi OtherResources=Alte resurse ExternalResources=Resurse externe -SocialNetworks=Retele sociale +SocialNetworks=Reţele sociale SocialNetworkId=ID reţea socială -ForDocumentationSeeWiki=Pentru utilizator sau developer documentaţia (doc, FAQs ...), <br> aruncăm o privire la Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> -ForAnswersSeeForum=Pentru orice alte întrebări / ajutor, se poate utiliza Dolibarr forum: <br> <a href="%s" target="_blank"><b> %s</b></a> +ForDocumentationSeeWiki=Pentru utilizator sau developer documentaţia (doc, FAQs ...), <br> este disponibilă la Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> +ForAnswersSeeForum=Pentru orice alte întrebări/ajutor, se poate utiliza Dolibarr forum: <br> <a href="%s" target="_blank"><b> %s</b></a> HelpCenterDesc1=Iată câteva resurse pentru a obține ajutor și asistență cu Dolibarr. -HelpCenterDesc2=Unele dintre aceste resurse sunt disponibile numai în <b> engleză </b>. -CurrentMenuHandler=Gestionarul meniu curent +HelpCenterDesc2=Unele dintre aceste resurse sunt disponibile numai în <b>engleză</b>. +CurrentMenuHandler=Gestionar meniu curent MeasuringUnit=Unitate de măsură LeftMargin=Marginea stângă -TopMargin=Marginea superioar‮a -PaperSize=Tipul hârtiei +TopMargin=Marginea superioar‮ă +PaperSize=Tip hârtie Orientation=Orientare SpaceX=Spaţiul X SpaceY=Spaţiul Y -FontSize=Marimea fontului +FontSize=Mărime font Content=Conţinut -NoticePeriod=Perioadă notita +NoticePeriod=Perioadă notificare NewByMonth=Nou pe lună -Emails=E-mailuri -EMailsSetup=Setarea e-mailurilor -EMailsDesc=Această pagină vă permite să setați parametri sau opțiuni pentru trimiterea e-mailurilor. -EmailSenderProfiles=Profilurile expeditorului mailurilor -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: <b> %s </b>) -MAIN_MAIL_SMTP_SERVER=Gazdă SMTP / SMTPS (valoarea implicită în php.ini: <b> %s </b>) -MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Portul SMTP / SMTPS (nu este definit în PHP pe sistemele de tip Unix) -MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Gazdă SMTP / SMTPS (nu este definită în PHP pe sistemele de tip Unix) -MAIN_MAIL_EMAIL_FROM=E-mailul expeditorului pentru e-mailurile automate (valoarea implicită în php.ini: <b> %s </b>) -MAIN_MAIL_ERRORS_TO=E-mailul utilizat pentru e-mailurile care se întorc cu erori (câmpurile "Erori-To" în e-mailurile trimise) -MAIN_MAIL_AUTOCOPY_TO= Copiați (Bcc) toate e-mailurile trimise către +Emails=Email-uri +EMailsSetup=Setare emailuri +EMailsDesc=Această pagină vă permite să setați parametri sau opțiuni pentru trimiterea de email-uri. +EmailSenderProfiles=Profilurile expeditorului de emailuri +EMailsSenderProfileDesc=Puteți lăsa această secțiune goală. Dacă introduceți câteva emailuri 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: <b>%s</b>) +MAIN_MAIL_SMTP_SERVER=Gazdă SMTP/SMTPS (valoarea implicită în php.ini: <b>%s</b>) +MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Portul SMTP/SMTPS (nu este definit în PHP pe sistemele de tip Unix) +MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Gazdă SMTP/SMTPS (nu este definită în PHP pe sistemele de tip Unix) +MAIN_MAIL_EMAIL_FROM=Emailul expeditorului pentru emailurile automate (valoarea implicită în php.ini: <b>%s</b>) +MAIN_MAIL_ERRORS_TO=Emailul utilizat pentru emailurile care se întorc cu erori (câmpurile 'Error-To' din emailurile trimise) +MAIN_MAIL_AUTOCOPY_TO= Copie (Bcc) pentru toate emailurile 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=Sugerați e-mailuri ale angajaților (dacă sunt definiți) în lista destinatarului predefinit atunci când scrieți un nou e-mail @@ -300,98 +303,99 @@ MAIN_MAIL_EMAIL_DKIM_DOMAIN=Domeniul de e-mail pentru utilizare cu dkim MAIN_MAIL_EMAIL_DKIM_SELECTOR=Numele selectorului dkim MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Cheie privată pentru semnarea dkim MAIN_DISABLE_ALL_SMS=Dezactivați toate trimiterile prin SMS (în scopuri de testare sau demonstrații) -MAIN_SMS_SENDMODE=Metoda de utilizare pentru trimiterea SMS-urilor +MAIN_SMS_SENDMODE=Metoda de utilizare pentru trimiterea SMS-urilor MAIN_MAIL_SMS_FROM=Numărul de telefon implicit pentru expeditor prin SMS MAIN_MAIL_DEFAULT_FROMTYPE=E-mailul implicit al expeditorului pentru trimiterea manuală (e-mailul utilizatorului sau e-mailul companiei) -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. +UserEmail=Email utilizator +CompanyEmail=Email companie +FeatureNotAvailableOnLinux=Caracteristică indisponibilă pe sistemele tip Unix. Testaţi-vă programul sendmail 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 <b> langs / %s </b> și trimiteți modificarea la www.transifex.com/dolibarr-association/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 <b>langs/%s</b> ş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 +ModuleSetup=Configurare modul +ModulesSetup=Configurare Module/Aplicație ModuleFamilyBase=Sistem -ModuleFamilyCrm=Gestionarea relațiilor cu clienții (CRM) -ModuleFamilySrm=Gestionarea relațiilor cu furnizorii (VRM) +ModuleFamilyCrm=Managementul relațiilor cu clienții (CRM) +ModuleFamilySrm=Managementul relațiilor cu furnizorii (VRM) ModuleFamilyProducts=Gestionarea produselor (PM) ModuleFamilyHr=Management Resurse Umane (HR) -ModuleFamilyProjects=Proiecte +ModuleFamilyProjects=Proiecte/Munca în echipă ModuleFamilyOther=Altele ModuleFamilyTechnic=Instrumente Multi-module -ModuleFamilyExperimental=Module Experimentale -ModuleFamilyFinancial=Module financiare (Contabilitate / Trezorerie) +ModuleFamilyExperimental=Module experimentale +ModuleFamilyFinancial=Module financiare (Contabilitate/Trezorerie) ModuleFamilyECM=ECM -ModuleFamilyPortal=Site-uri web și alte aplicații frontale +ModuleFamilyPortal=Site-uri web și alte aplicații frontend ModuleFamilyInterface=Interfețe cu sisteme externe -MenuHandlers=Manager Meniu -MenuAdmin=Editor Meniu +MenuHandlers=Manageri Meniu +MenuAdmin=Editor meniu DoNotUseInProduction=Nu utilizaţi în producţie ThisIsProcessToFollow=Procedura de upgrade: ThisIsAlternativeProcessToFollow=Aceasta este o configurare alternativă de procesare manuală: StepNb=Pasul %s FindPackageFromWebSite=Găsiți un pachet care oferă funcțiile de care aveți nevoie (de exemplu, pe site-ul oficial %s). DownloadPackageFromWebSite=Descărcați pachetul (de exemplu de pe site-ul oficial %s). -UnpackPackageInDolibarrRoot=Despachetați / dezarhivați fișierele arhivate în directorul serverului Dolibarr: <b> %s </b> -UnpackPackageInModulesRoot=Pentru a implementa / instala un modul extern, despachetați / dezarhivați fișierele arhivate în directorul serverului dedicat modulelor externe: <br> <b> %s </b> -SetupIsReadyForUse=Implementarea modulului a fost terminată. Cu toate acestea, trebuie să activați și să configurați modulul în aplicația dvs. accesând modulele de configurare a paginii: <a href="%s"> %s </a>. +UnpackPackageInDolibarrRoot=Despachetați/dezarhivați fișierele arhivate în directorul serverului sistemului: <b>%s</b> +UnpackPackageInModulesRoot=Pentru a implementa/instala un modul extern, despachetați/dezarhivați fișierele arhivate în directorul serverului dedicat modulelor externe: <br><b>%s</b> +SetupIsReadyForUse=Implementarea modulului a fost terminată. Cu toate acestea, trebuie să activați și să configurați modulul în aplicația dvs. accesând modulele de configurare a paginii: <a href="%s">%s</a>. NotExistsDirect=Directorul rădăcină alternativ nu este atribuit unui director existent. <br> -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. <br> Doar creați un director in rădăcina Dolibarr (de exemplu: personalizat).<br> -InfDirExample=<br> Atunci declarați în fișierul <strong> conf.php </strong> <br> $ dolibarr_main_url_root_alt = '/ custom' <br> $ dolibarr_main_document_root_alt = '/ calea / din / dolibarr / htdocs / personalizat' <br> Dacă aceste linii sunt comentate cu "#", pentru a le activa, doar anulaţi comentarea prin eliminarea caracterului "#". +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. <br> Doar creați un director in rădăcina sistemului (de exemplu: personalizat).<br> +InfDirExample=<br> Atunci declarați în fișierul <strong>conf.php</strong> <br> $dolibarr_main_url_root_alt='/ custom' <br> $dolibarr_main_document_root_alt = '/path/of/dolibarr/htdocs/custom' <br> Dacă aceste linii sunt comentate cu "#", pentru a le activa, doar anulaţi comentarea prin eliminarea caracterului "#". 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. +CallUpdatePage=Navigați la pagina care actualizează structura și datele din baza de date: %s. LastStableVersion=Ultima versiune stabilă LastActivationDate=Ultima dată de activare 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: <br> <b>{000000}</b> 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. <br> <b>{000000} +000</b> fel ca și anterior, dar o compensare corespunzător cu numărul din dreapta semnului + se aplică începând cu prima %s. <br> <b>{000000 @ x}</b> 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ă. <br> <b>{Dd}</b> zi (01 la 31). <br> <b>{Mm}</b> luni (01 la 12). <br> <b>{AA}, {AAAA}</b> sau <b>{y}</b> an peste 2, 4 sau 1 numere. <br> -GenericMaskCodes2=<b> {cccc} </b> codul clientului pe n caractere <br><b> {cccc000} </b> 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. <br> <b> {tttt} </b> 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<br>\n -GenericMaskCodes3=Toate celelalte caractere în masca va rămâne intactă. <br> Spaţiile nu sunt permise. <br> -GenericMaskCodes4a=<u> Exemplu privind al 99-lea %s terț TheCompany, cu data 2007-01-31: </u> <br> -GenericMaskCodes4b=<u>Exemplu de la o terţă parte a creat pe 2007-03-01:</u> <br> -GenericMaskCodes4c=<u>Examplu pe produs creat pe 2007-03-01:</u><br> -GenericMaskCodes5=<b> ABC{yy}{mm}-{000000}</b> va da <b> ABC0701-000099 </b> <br> <b> {0000+100@1}-ZZZ/{dd}/XXX</b> va da <b> 0199-ZZZ/31/XXX</b> <br> <b> IN{yy}{mm}-{0000}-{t} </b> va da <b> IN0701-0099-A </b> dacă tipul companiei este "Responsible Inscripto" cu codul pentru tipul care este "A_RI" -GenericNumRefModelDesc=Întoarceţi-vă un număr de personalizabil definite în conformitate cu o masca. -ServerAvailableOnIPOrPort=Server este disponibil la <b>adresa %s</b> pe <b>portul %s</b> -ServerNotAvailableOnIPOrPort=Serverul nu este disponibil la <b>adresa %s</b> pe <b>portul %s</b> -DoTestServerAvailability=Test server de conectivitate +GenericMaskCodes=Puteți introduce orice mască de numerotare. În această mască, pot fi utilizate următoarele etichete: <br><b>{000000}</b> corespunde unui număr care va fi incrementat pe fiecare %s. Introduceți la fel de multe zerouri ca lungimea dorită a contorului. Contorul va fi completat de zerouri din stânga pentru a avea la fel de multe zerouri ca masca. <br><b>{000000+000}</b> la fel ca și precedentul, dar un offset corespunzător numărului din dreapta semnului + se aplică începând cu primul %s. <br><b>{000000@x}</b> la fel ca și precedentul, dar contorul este resetat la zero când se atinge luna x (x între 1 și 12 sau 0 pentru a utiliza primele luni ale anului fiscal definit în configurația ta sau 99 pentru a reveni la zero în fiecare lună). Dacă se folosește această opțiune și x este 2 sau mai mare, atunci este necesară și secvența {yy}{mm} sau {yyyy}{mm}. <br><b>{dd}</b> zi (01 până la 31). <br><b>{mm}</b> lună (01 până la 12). <br><b>{yy}</b>, <b>{aaaa}</b> sau <b>{y}</b> an peste 2, 4 sau 1 numere.<br>  +GenericMaskCodes2=<b>{cccc}</b> codul clientului pe n caractere<br><b> {cccc000}</b> codul clientului pe n caractere urmat de un contor dedicat clientului. Acest contor dedicat clientului este resetat în același timp cu contorul global.<br><b>{tttt}</b> Codul tipului de terț pe n caractere (consultați meniul Acasă - Setări - Dicționare - Tipuri de terți). Dacă adăugați această etichetă, contorul va fi diferit pentru fiecare tip de terț.<br> +GenericMaskCodes3=Toate celelalte caractere din mască vor rămâne intacte. <br> Spaţiile nu sunt permise. <br> +GenericMaskCodes3EAN=Toate celelalte caractere din mască vor rămâne intacte (cu excepția * sau ? în poziția a 13-a din EAN13). <br>Spațiile nu sunt permise. <br>În EAN13, ultimul caracter după ultima} în poziția a 13-a ar trebui să fie * sau ? . Acesta va fi înlocuit cu cheia calculată.<br> +GenericMaskCodes4a=<u>Exemplu privind al 99-lea %s terț Comania, cu data 2007-01-31:</u><br> +GenericMaskCodes4b=<u>Exemplu de terţ creat pe 2007-03-01:</u><br> +GenericMaskCodes4c=<u>Exemplu pe produs creat pe 2007-03-01:</u><br> +GenericMaskCodes5=<b> ABC{yy}{mm}-{000000}</b> va da <b> ABC0701-000099 </b> <br> <b> {0000+100@1}-ZZZ/{dd}/XXX</b> va da <b> 0199-ZZZ/31/XXX</b> <br> <b> IN{yy}{mm}-{0000}-{t} </b> va da <b> IN0701-0099-A </b> dacă tipul companiei este 'Responsible Inscripto' cu codul pentru tipul 'A_RI' +GenericNumRefModelDesc=Întoarce un număr de personalizabil definit în conformitate cu o mască. +ServerAvailableOnIPOrPort=Serverul este disponibil la adresa <b>%s</b> pe portul <b>%s</b> +ServerNotAvailableOnIPOrPort=Serverul nu este disponibil la adresa <b>%s</b> pe portul <b>%s</b> +DoTestServerAvailability=Test conectivitate server DoTestSend=Test de trimitere -DoTestSendHTML=Test trimiterea HTML -ErrorCantUseRazIfNoYearInMask=Eroare, nu se poate folosi opțiunea @ resetează contor la fiecare an, dacă secvența {yy} sau {yyyy} nu este în mască. -ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Eroare, nu poate utilizator @ opţiune dacă secvenţa (aa) (mm) sau (AAAA) (mm) nu este în masca. -UMask=UMask parametru pentru noi imagini pe Unix / Linux / BSD sistem de fişiere. -UMaskExplanation=Acest parametru permite să se definească permissions stabilit, în mod implicit pe fişierele create de Dolibarr pe server (în timpul de încărcare, de exemplu). <br> Acesta trebuie să fie de octal valoare (de exemplu, 0666 înseamnă citi şi scrie pentru toată lumea). <br> Ce paramtre ne sert pas sous un serveur Windows. +DoTestSendHTML=Test trimitere HTML +ErrorCantUseRazIfNoYearInMask=Eroare, nu se poate folosi opțiunea @ pentru a reseta contorul la fiecare an, dacă secvența {yy} sau {yyyy} nu este în mască. +ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Eroare, nu se poate utiliza opţiunea @ dacă secvenţa {yy}{mm} sau {yyyy}{mm} nu este în mască. +UMask=Parametrul UMask pentru fişiere noi în sistemul de fişiere Unix/Linux/BSD/Mac. +UMaskExplanation=Acest parametru îţi permite să defineşti permisiuni implicite pe fişierele create de sistem pe server (în timpul încărcării, de exemplu). <br> Acesta trebuie să fie o valoare octală (de exemplu, 0666 înseamnă citire şi scriere pentru toată lumea). <br> Acest parametru nu se poate utiliza pe un server Windows. SeeWikiForAllTeam=Uitați-vă la pagina Wiki pentru o listă de contribuitori și organizațiiile lor -UseACacheDelay= Întârziere pentru caching de export de răspuns în câteva secunde (0 sau gol pentru nici un cache) -DisableLinkToHelpCenter=Ascundere link-ul <b>"Aveţi nevoie de ajutor sau sprijin"</b> de la pagina de login +UseACacheDelay= Întârziere răspuns pentru caching de export în secunde (0 sau gol pentru nici un cache) +DisableLinkToHelpCenter=Ascundere link <b>'Aveţi nevoie de ajutor sau suport'</b> de pe pagina de autentificare DisableLinkToHelp=Ascunde link-ul Ajutor Online "<b>%s</b>" AddCRIfTooLong=Nu există nici o adaptare automată a textului, textul prea lung nu va fi afișat pe documente. Vă rugăm să apăsaţi tasta ENTER în zona de text, dacă este necesar. -ConfirmPurge=Sigur doriți să executați această curățare ? <br> Aceasta va șterge definitiv toate fișierele de date fără nici o modalitate de a le reconstitui (fișiere ECM, fișiere atașate ...). +ConfirmPurge=Sigur doriți să executați această curățare? <br> Aceasta va șterge definitiv toate fișierele de date fără nici o modalitate de a le reconstitui (fișiere ECM, fișiere atașate ...). MinLength=Lungimea minimă -LanguageFilesCachedIntoShmopSharedMemory=Fişierele .lang încărcate în memorie partajata +LanguageFilesCachedIntoShmopSharedMemory=Fişierele .lang încărcate în memoria partajată LanguageFile=Fișier lingvistic ExamplesWithCurrentSetup=Exemple cu configurația curentă -ListOfDirectories=Lista de directoare OpenDocument template-uri -ListOfDirectoriesForModelGenODT=Lista de directoare care conţin fişiere șablon in format OpenDocument.<br><br>puneţi aici intreaga cale de directoare.<br>Intoarceţi-va la inceputul textului la fiecare director.<br>Pentru a adăuga un director de modul GED, adăugaţi aici <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Fişierele în aceste directoare trebuie să se termine cu <b>.odt</b> or <b>.ods</b>. -NumberOfModelFilesFound=Numărul de fișiere șablon ODT / ODS găsite în aceste directoare +ListOfDirectories=Lista de directoare cu şabloane OpenDocument +ListOfDirectoriesForModelGenODT=Lista de directoare care conţin fişiere șablon in format OpenDocument.<br><br>puneţi aici întreaga cale spre directoare.<br>Adăugaţi un Enter după fiecare director.<br>Pentru a adăuga un director de modul ECM, adăugaţi aici <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Fişierele din aceste directoare trebuie să se termine cu <b>.odt</b> sau <b>.ods</b>. +NumberOfModelFilesFound=Numărul de fișiere șablon ODT/ODS găsite în aceste directoare ExampleOfDirectoriesForModelGen=Exemple de sintaxă:<br> c:\\ myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir -FollowingSubstitutionKeysCanBeUsed=<br> Pentru a şti cum să vă creaţi şabloane DOCX, ODT documente, înainte de a le stoca în aceste directoare, citiţi documentaţia wiki: +FollowingSubstitutionKeysCanBeUsed=<br> Pentru a şti cum să vă creaţi şabloane de documente ODT, înainte de a le stoca în aceste directoare, citiţi documentaţia wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template -FirstnameNamePosition=Poziţia Prenume / Nume -DescWeather=Următoarele imagini vor fi afișate pe tabloul de bord atunci când numărul ultimelor acțiuni va atinge următoarele valori: -KeyForWebServicesAccess=Pentru a utiliza Web Services (parametru &quot;dolibarrkey&quot; în WebServices) -TestSubmitForm=Intrare test de formă -ThisForceAlsoTheme=Utilizând acest meniu, managerul va folosi și propria temă indiferent de alegerea utilizatorului. De asemenea, acest manager de meniu specializat pentru smartphone-uri nu funcționează pe toate smartphone-urile. Utilizați un alt manager de meniuri dacă întâmpinați probleme cu smartphone-ul dvs. -ThemeDir=Director Teme +FirstnameNamePosition=Poziţia Prenumelui/Numelui +DescWeather=Următoarele imagini vor fi afișate în tabloul de bord atunci când numărul ultimelor acțiuni va atinge următoarele valori: +KeyForWebServicesAccess=Cheie utilizare Web Services (parametru "dolibarrkey" în WebServices) +TestSubmitForm=Test introducere date în formular +ThisForceAlsoTheme=Utilizând acest meniu, managerul va folosi și propria temă indiferent de alegerea utilizatorului. De asemenea, acest manager de meniu specializat pentru smartphone-uri nu funcționează pe toate smartphone-urile. Utilizează un alt manager de meniuri dacă întâmpini probleme pe smartphone-ul tău. +ThemeDir=Director teme ConnectionTimeout=Pauză de conectare -ResponseTimeout=Răspuns timeout -SmsTestMessage=Mesaj de test de la PHONEFROM__ __ la __ PHONETO__ -ModuleMustBeEnabledFirst=Modulul <b> %s</b> trebuie să fie activat daca aveti nevoie de aceasta functie -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 +ResponseTimeout=Timeout răspuns +SmsTestMessage=SMS de test de la __PHONEFROM__ to __PHONETO__ +ModuleMustBeEnabledFirst=Modulul <b>%s</b> trebuie să fie activat daca aveti nevoie de aceasta funcţionalitate. +SecurityToken=Cheia pentru URL-uri securizate +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 unul pe %s PDF=PDF PDFDesc=Opţiuni globale pentru generarea PDF PDFAddressForging=Reguli pentru secţiunea adresă @@ -402,122 +406,122 @@ 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 -PlaceCustomerAddressToIsoLocation=Utilizați poziția standard franceză (La Poste) pentru poziția adresei clienților +PlaceCustomerAddressToIsoLocation=Utilizați poziția standard franceză (La Poste) pentru poziționarea adresei clienților Library=Bibliotecă -UrlGenerationParameters=Parametrii pentru a asigura URL-uri -SecurityTokenIsUnique=Utilizaţi un unic parametru securekey pentru fiecare URL -EnterRefToBuildUrl=Introduceţi de referinţă pentru %s obiect +UrlGenerationParameters=Parametrii pentru URL-uri securizate +SecurityTokenIsUnique=Utilizaţi un parametru unic securekey pentru fiecare URL +EnterRefToBuildUrl=Introdu referinţa pentru obiectul %s GetSecuredUrl=Obţineţi URL-ul calculat -ButtonHideUnauthorized= Ascunde butoanele de acțiune neautorizate și pentru utilizatorii interni (doar gri în caz contrar)  -OldVATRates=Vechea rată TVA -NewVATRates=Noua rată TVA -PriceBaseTypeToChange=Modifică la prețuri cu valoarea de referință de bază definit pe +ButtonHideUnauthorized= Ascunde butoanele de acțiune neautorizate și pentru utilizatorii interni (doar gri în caz contrar) +OldVATRates=Vechea cotă de TVA +NewVATRates=Noua cotă de TVA +PriceBaseTypeToChange=Modifică prețurile cu valoarea de referință de bază definită pe MassConvert=Lansați conversia în bloc -PriceFormatInCurrentLanguage=Formatul prețului în format de valută -String=String +PriceFormatInCurrentLanguage=Formatul prețului în formatul limbii curente +String=Text String1Line=String (1 linie) -TextLong=Long text +TextLong=Text lung TextLongNLines=Text lung (n linii) HtmlText=Text HTML Int=Întreg Float=Float -DateAndTime=Data şi ora +DateAndTime=Dată şi oră Unique=Unic Boolean=Boolean (o casetă de selectare) ExtrafieldPhone = Telefon ExtrafieldPrice = Preţ ExtrafieldMail = Email ExtrafieldUrl = Url -ExtrafieldSelect = Select Listă -ExtrafieldSelectList = Select din tabel +ExtrafieldSelect = Listă de selecţie +ExtrafieldSelectList = Selecţie din tabel ExtrafieldSeparator=Separator (nu un câmp) ExtrafieldPassword=Parolă ExtrafieldRadio=Butoane radio (doar o singură alegere) -ExtrafieldCheckBox=Casetele de selectare -ExtrafieldCheckBoxFromList=Căsuțele de selectare din tabel +ExtrafieldCheckBox=Casete de bifare +ExtrafieldCheckBoxFromList=Casete de selectare din tabel ExtrafieldLink=Link către un obiect ComputedFormula=Câmp calculat 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: <strong>$db, $conf, $langs, $mysoc, $user, $object</strong>.<br><strong>ATENŢIE</strong>: 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.<br> 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 <br><br>Exemplu de formulă<br>$object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)<br><br>Exemplu cu reîncărcarea obiectului<br>(($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'<br><br>Un alt exemplu de formulă pentru a forța încărcarea obiectului și a obiectului său părinte:<br>(($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). <br> 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ă) -ExtrafieldParamHelpselect=Lista de valori trebuie să fie linii cu format cheie,valoare (unde cheia nu poate fi "0") <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> code3,valoare3 <br> ... <br> <br> Pentru a avea lista în funcție de o altă listă de atribute complementare: <br> 1, valoare1| opţiuni_<i> parent_list_code </i>: parent_key <br> 2,valoare2|opţiuni_ <i> parent_list_code </i>: parent_key <br><br> Pentru a avea lista în funcție de altă listă: <br> 1, valoare1| <i> parent_list_code </i>: parent_key <br> 2, valoare2| <i> parent_list_code </i>: parent_key -ExtrafieldParamHelpcheckbox=Lista de valori trebuie să fie linii cu format cheie,valoare ( cheia nu poate fi "0") <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> 3,valoare3 <br> ... -ExtrafieldParamHelpradio=Lista de valori trebuie să fie linii cu format cheie,valoare ( cheia nu poate fi "0") <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> 3,valoare3 <br> ... -ExtrafieldParamHelpsellist=Lista valorilor provine dintr-un tabel <br>Sintaxă: table_name:label_field: id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field este în mod necesar o cheie integer primară<br>- filtrul poate fi un test simplu (de exemplu, activ = 1) pentru a afișa numai valorile active<br> De asemenea, puteți utiliza $ID$ în filtru, care este id-ul obiectului curent <br>Pentru a utiliza un SELECT în filtru, utilizați cuvântul cheie $SEL$ pentru a ocoli protecția anti-injecție. <br>Dacă doriți să filtrați pe câmpuri suplimentare, utilizați sintaxa extra.fieldcode =... (unde codul de câmp este codul extracâmpului)<br><br> Pentru a avea lista în funcție de o altă listă de atribute complementare:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br> Pentru a avea lista în funcție de o altă listă:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Lista de valori vine dintr-un tabel<br>Sintaxă: table_name:label_field:id_field::filter<br>Examplu: c_typent:libelle:id::filter<br><br>filtrul poate fi un simplu test (ex active=1) pentru a afişa doar valoarea activă<br>De asemenea se poate utiliza $ID$ în filtrul care este ID-ul curent al obiectului curent<br>Pentru a face o SELECTARE în filtru folosiţi $SEL$<br>dacă doriţi să filtraţi în extracâmpuri folosiţi sintaxa extra.fieldcode=... (unde codul câmpului este codul extracâmpului)<br><br>Pentru a avea lista în funcție de o altă listă de atribute complementare:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>Pentru a avea lista în funcție de o altă listă :<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +Computedpersistent=Câmp calculat stocat +ComputedpersistentDesc=Extracâmpurile calculate vor fi stocate în baza de date, cu toate acestea, valorile lor vor fi recalculate numai atunci când obiectul acestui câmp este modificat. Dacă câmpul calculat depinde de alte obiecte sau date globale, aceste valori ar putea fi greșite!! +ExtrafieldParamHelpPassword=Lăsând acest câmp necompletat înseamnă că această valoare va fi stocată fără criptare (câmpul trebuie ascuns cu steluţe pe ecran). <br> Setaţi 'auto' pentru utilizarea regulii de criptare implicită la salvarea parolei în baza de date (atunci valoarea citită va fi numai hash, nefiind nici o şansă de a recupera valoarea inițială) +ExtrafieldParamHelpselect=Lista de valori trebuie să fie linii cu formatul cheie,valoare (unde cheia nu poate fi '0') <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> code3,valoare3 <br>... <br> <br> Pentru a avea lista în funcție de o altă listă de atribute complementare: <br> 1, valoare1| options_<i> parent_list_code</i>:parent_key<br> 2,valoare2|options_ <i>parent_list_code</i>:parent_key<br><br> Pentru a avea lista în funcție de altă listă: <br>1, valoare1|<i>parent_list_code</i>:parent_key<br>2,valoare2|<i>parent_list_code</i>:parent_key +ExtrafieldParamHelpcheckbox=Lista de valori trebuie să fie linii cu formatul cheie,valoare (unde cheia nu poate fi "0") <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> 3,valoare3 <br> ... +ExtrafieldParamHelpradio=Lista de valori trebuie să fie linii cu formatul cheie,valoare (unde cheia nu poate fi '0') <br> <br> de exemplu: <br> 1,valoare1 <br> 2,valoare2 <br> 3,valoare3 <br> ... +ExtrafieldParamHelpsellist=Lista valorilor provine dintr-un tabel<br> Sintaxă: table_name:label_field:id_field::filtersql<br>Exemplu: c_typent:libelle:id::filtersql<br><br>- id_field este în mod necesar o cheie int primară<br>- filtersql este o condiție SQL. Poate fi un test simplu (de exemplu, activ = 1) pentru a afișa numai valoarea activă<br> Puteți utiliza, de asemenea, $ID$ în filtru, care este ID-ul curent al obiectului curent <br>Pentru a utiliza un SELECT în filtru, utilizați cuvântul cheie $SEL$ pentru a ocoli protecţia anti-injecție.<br>dacă doriți să filtrați pe câmpuri suplimentare utilizați sintaxa extra.fieldcode=... (unde codul câmpului este codul câmpului extrafield)<br><br> Pentru a avea lista în funcție de o altă listă de atribute complementare:<br> c_typent:libelle:id:options_<i>parent_list_code</i>| parent_column:filter <br><br> Pentru a avea lista în funcție de altă listă: <br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=Lista valorilor provine dintr-un tabel <br>Sintaxă: table_name:label_field:id_field::filtersql<br>Exemplu: c_typent:libelle:id::filtersql<br><br>filtru care poate fi un test simplu (de exemplu, activ = 1) pentru a afișa doar valoarea activă<br> Puteți utiliza, de asemenea, $ID$ în filtru care este ID-ul curent al obiectului curent<br> Pentru a efectua o selecție în filtru folosiți $SEL$<br> dacă doriți să filtrați pe câmpuri suplimentare utilizați sintaxa extra.fieldcode=... (unde codul de câmp este codul câmpului extra)<br><br> Pentru a avea o listă dependentă de un de atribut complementar:<br> c_typent:libelle:id:options_<i>parent_list_code</i>| parent_column:filter <br><br>Pentru a avea o listă în funcție de altă listă:<br> c_typent:libelle:id:<i> parent_list_code</i>|parent_column: filter ExtrafieldParamHelplink=Parametrii trebuie să fie ObjectName:Classpath<br>Sintaxă: ObjectName: Classpath ExtrafieldParamHelpSeparator=Păstrați liber pentru un separator simplu <br> Setați acest lucru la 1 pentru un separator care se prăbușește (deschis în mod implicit pentru o nouă sesiune, apoi starea este păstrată pentru fiecare sesiune de utilizator) <br> Setați acest lucru la 2 pentru un separator care se prăbușește (se prăbușește implicit pentru o nouă sesiune, apoi starea este păstrată pentru fiecare sesiune a utilizatorului) LibraryToBuildPDF=Bibliotecă utilizată pentru generarea PDF-urilor LocalTaxDesc=Unele țări pot aplica două sau trei taxe pe fiecare linie de facturare. Dacă este cazul, alegeți tipul pentru a doua și a treia taxă și rata acestora. Tipuri posibile sunt: <br> 1: taxa locală se aplică produselor și serviciilor fără TVA (localtax se calculează pe valoare fără taxă)<br> 2: taxa locală se aplică produselor și serviciilor, inclusiv TVA (localtax se calculează în funcție de valoare+ taxa principală ) <br>3: taxa locală se aplică produselor fără TVA (localtax se calculează pe valoare fără taxă) <br>4: taxa locală se aplică produselor şi includ tva (localtax se calculeaza pe valoare + TVA principală) <br> 5: taxa locală se aplică serviciilor fără TVA (localtax se calculează pe valoarea fără TVA) <br> 6: taxa locală se aplică serviciilor, inclusiv TVA (localtax se calculează pe sumă + taxă) SMS=SMS -LinkToTestClickToDial=Introduceți un număr de telefon pentru a afișa un link de test ClickToDial Url pentru utilizatorul<strong>%s</strong> -RefreshPhoneLink=Refresh link +LinkToTestClickToDial=Introdu un număr de telefon pentru a afișa un link de test ClickToDial Url pentru utilizatorul <strong>%s</strong> +RefreshPhoneLink=Link refresh LinkToTest=Link accesibil generat pentru utilizatorul <strong>%s</strong> (faceți clic pe numărul de telefon pentru a testa) -KeepEmptyToUseDefault=Lasă gol pentru utilizarea valorii implicite +KeepEmptyToUseDefault=Lasă necompletat pentru utilizarea valorii implicite 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=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 <strong> %s </strong>inregistrari pe <strong> %s</strong> %s fără cod de bare definit. -InitEmptyBarCode=Valoare inițializare pentru următoarele %s înregistrări goale +BarcodeInitForThirdparties=Coduri de bare în masă pentru terți +BarcodeInitForProductsOrServices=Iniţializare sau resetare coduri de bare în masă pentru produse şi servicii +CurrentlyNWithoutBarCode=În prezent, aveţi <strong>%s</strong> înregistrări pe <strong>%s</strong> %s fără cod de bare definit. +InitEmptyBarCode=Valoare de inițializare pentru următoarele %s înregistrări goale EraseAllCurrentBarCode=Ștergeți toate valorile curente de coduri de bare ConfirmEraseAllCurrentBarCode=Sigur doriți să ștergeți toate valorile actuale ale codurilor de bare? -AllBarcodeReset=Toate valorile codurilor de bare au fost eliminate -NoBarcodeNumberingTemplateDefined=Nu este activat niciun șablon de cod de bare de numere în modulul de configurare Cod de bare -EnableFileCache=Activați memoria cache a fișierelor +AllBarcodeReset=Toate valorile codurilor de bare au fost şterse +NoBarcodeNumberingTemplateDefined=Nu este activat niciun șablon de cod de bare de numere în configurare modulului Coduri de bare +EnableFileCache=Activați memoria cache cu fișiere ShowDetailsInPDFPageFoot=Adăugați mai multe detalii în subsolul paginii, cum ar fi adresa companiei sau numele managerului (în plus față de ID-urile profesionale, capitalul companiei și numărul de identificare fiscală TVA). NoDetails=Nu există detalii suplimentare în subsolul paginii -DisplayCompanyInfo=Afiseaza adresa societatii -DisplayCompanyManagers=Afiseaza nume manager -DisplayCompanyInfoAndManagers=Afișați numele companiei și numele managerului -EnableAndSetupModuleCron=Dacă doriți ca această factură recurentă să fie generată automat, modulul * %s * trebuie să fie activat și setat corect. În caz contrar, generarea de facturi trebuie făcută manual din acest șablon utilizând butonul * Creare *. Rețineți că, chiar dacă ați activat generarea automată, puteți lansa manual generarea manuală. Generarea de duplicate pentru aceeași perioadă nu este posibilă. +DisplayCompanyInfo=Afişează adresa societăţii +DisplayCompanyManagers=Afişează nume manager +DisplayCompanyInfoAndManagers=Afișează numele companiei și numele managerului +EnableAndSetupModuleCron=Dacă doriți ca această factură recurentă să fie generată automat, modulul *%s* trebuie să fie activat și setat corect. În caz contrar, generarea de facturi trebuie făcută manual din acest șablon utilizând butonul *Creare*. Rețineți că, chiar dacă ați activat generarea automată, puteți lansa manual generarea. Generarea de duplicate pentru aceeași perioadă nu este posibilă. ModuleCompanyCodeCustomerAquarium=%s urmat de codul clientului pentru un cod contabil al clientului -ModuleCompanyCodeSupplierAquarium=%s urmat de codul furnizorului pentru un cod contabil al furnizorului -ModuleCompanyCodePanicum=Returneaza un cod contabil gol. +ModuleCompanyCodeSupplierAquarium=%s urmat de codul furnizorului pentru un cont contabil al furnizorului +ModuleCompanyCodePanicum=Returnează un cod contabil gol. ModuleCompanyCodeDigitaria=Redă un cod contabil compus în funcție de numele terțului. Codul constă dintr-un prefix care poate fi definit în prima poziție, urmat de numărul de caractere definite în codul terț. -ModuleCompanyCodeCustomerDigitaria=%s urmat de numele clientului trunchiat de numărul de caractere: %s pentru codul de contabilitate al clientului. -ModuleCompanyCodeSupplierDigitaria=%s urmată de numele furnizorului trunchiat de numărul de caractere: %s pentru codul contabil al furnizorului. -Use3StepsApproval=În mod implicit, comenzile de cumpărare trebuie să fie create și aprobate de 2 utilizatori diferiți (un pas/utilizator de creat și un pas/utilizator de aprobat. Rețineți că, dacă utilizatorul are atât permisiunea de a crea și de a aproba, va fi suficient un pas/un utilizator). Puteți solicita această opțiune pentru a introduce un al treilea pas/aprobare pentru utilizatori, dacă suma este mai mare decât o valoare dedicată (astfel încât vor fi necesari 3 pași: 1 = validare, 2 = prima aprobare și 3 = o a doua aprobare dacă suma este suficientă). <br> Setați acest lucru la gol, dacă este suficientă o aprobare (2 pași), setați-o la o valoare foarte mică (0,1) dacă este întotdeauna necesară o a doua aprobare (3 pași). -UseDoubleApproval=Utilizați o aprobare de 3 pași atunci când suma (fără taxă) este mai mare decât ... +ModuleCompanyCodeCustomerDigitaria=%s urmat de numele clientului trunchiat la numărul de caractere: %s pentru codul de contabilitate al clientului. +ModuleCompanyCodeSupplierDigitaria=%s urmată de numele furnizorului trunchiat la numărul de caractere: %s pentru codul contabil al furnizorului. +Use3StepsApproval=În mod implicit, comenzile de achiziţie trebuie să fie create și aprobate de 2 utilizatori diferiți (un pas/utilizator de creat și un pas/utilizator de aprobat. Rețineți că, dacă utilizatorul are atât permisiunea de a crea și de a aproba, va fi suficient un pas/un utilizator). Puteți solicita această opțiune pentru a introduce un al treilea pas/aprobare pentru utilizatori, dacă suma este mai mare decât o valoare dedicată (astfel încât vor fi necesari 3 pași: 1 = validare, 2 = prima aprobare și 3 = o a doua aprobare dacă suma este suficientă). <br> Setați acest lucru la gol, dacă este suficientă o aprobare (2 pași), setați-o la o valoare foarte mică (0,1) dacă este întotdeauna necesară o a doua aprobare (3 pași). +UseDoubleApproval=Utilizați o aprobare în 3 pași atunci când suma (fără taxă) este mai mare decât... WarningPHPMail=ATENŢIE: Configurarea pentru trimitea de email-uri din aplicație utilizează configurarea generică implicită. De multe ori este mai bine să configurați email-urile de ieșire pentru a utiliza serverul de email al furnizorului dvs. de servicii email în loc de configurarea implicită din mai multe motive: WarningPHPMailA=- Utilizarea serverului furnizorului de servicii de e-mail crește fiabilitatea e-mailului dvs., astfel încât crește livrabilitatea fără a fi semnalată ca SPAM WarningPHPMailB=- Unii furnizori de servicii de email (cum ar fi Yahoo) nu vă permit să trimiteți un email de pe alt server decât propriul server. Configurarea dvs. actuală utilizează serverul aplicației pentru a trimite email-uri și nu serverul furnizorului dvs. de email, deci unii destinatari (cei compatibili cu protocolul restrictiv DMARC), vă vor întreba furnizorul de email dacă vă pot accepta emailul și unii furnizori de email (cum ar fi Yahoo) poate răspunde "nu" deoarece serverul nu este al lor, așa că puține emailuri trimise pot să nu fie acceptate pentru livrare (aveți grijă și la cota de trimitere a furnizorului dvs. de email). WarningPHPMailC=- Utilizând serverul SMTP al furnizorului de servicii email pentru a trimite email-uri este, de asemenea, interesantă, astfel încât toate email-urile trimise din aplicație vor fi, de asemenea, salvate în directorul "Trimise" al cutiei poștale. WarningPHPMailD=Dacă metoda „PHP Mail” este cu adevărat metoda pe care ați dori să o utilizați, puteți elimina acest avertisment adăugând constanta MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP la 1 în Acasă - Configurare - Altele. -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: <strong> %s </strong>. -WarningPHPMailSPF= Dacă numele de domeniu din adresa dvs. de e-mail a expeditorului este protejat de o înregistrare SPF (vă rugăm să vă înregistrați numele domeniului), trebuie să adăugați următoarele adrese IP în înregistrarea SPF a DNS-ului domeniului dvs.:<strong>%s</strong>. +WarningPHPMail2=Dacă furnizorul dvs. de e-mail SMTP trebuie să restricționeze clientul de email la unele adrese IP (foarte rar), aceasta este adresa IP a agentului utilizator de email (MUA) pentru aplicația ERP CRM: <strong>%s</strong>. +WarningPHPMailSPF=Dacă numele de domeniu din adresa dvs. de e-mail a expeditorului este protejat de o înregistrare SPF (vă rugăm să vă înregistrați numele domeniului), trebuie să adăugați următoarele adrese IP în înregistrarea SPF a DNS-ului domeniului dvs.:<strong>%s</strong>. 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) +DependsOn=Acest modul are nevoie de modulul(lele) +RequiredBy=Acest modul este solicitat de modulul(lele) TheKeyIsTheNameOfHtmlField=Acesta este numele câmpului HTML. Cunoștințele tehnice sunt necesare pentru a citi conținutul paginii HTML pentru a obține numele cheie al unui câmp. -PageUrlForDefaultValues=Trebuie să introduceți calea relativă a adresei URL a paginii. Dacă includeți parametrii în URL, valorile implicite vor fi eficiente dacă toți parametrii sunt setați la aceeași valoare. -PageUrlForDefaultValuesCreate=<br> Exemplu: <br> Pentru formularul de creare a unei terțe părți noi este <strong> %s </strong>. <br> Pentru URL-ul modulelor externe instalate în directorul personalizat, nu includeți "personalizat/" , astfel folosiți o cale ca <strong> mymodule / mypage.php </strong> și nu personalizat /mymodule/mypage.php. <br> Dacă doriți valoarea implicită numai dacă url are un anumit parametru, puteți utiliza <strong> %s </strong> -PageUrlForDefaultValuesList=<br> Exemplu: <br> Pentru pagina care afișează terțe părți, este <strong> %s </strong>. <br> Pentru URL-ul modulelor externe instalate în directorul personalizat, nu includeți "personalizat / utilizati o cale ca <strong> mymodule / mypagelist.php </strong> și nu personalizat /mymodule/mypagelist.php. <br> Dacă doriți valoarea implicită numai dacă URL-ul are un anumit parametru, puteți utiliza <strong> %s </strong> -AlsoDefaultValuesAreEffectiveForActionCreate=De asemenea, rețineți că suprascrierea valorilor implicite pentru crearea de forme funcționează numai pentru paginile care au fost proiectate corect (deci cu parametrul de acțiune = crează sau prezintă ...) +PageUrlForDefaultValues=Trebuie să introduceți calea relativă a adresei URL a paginii. Dacă includeți parametrii în URL, valorile implicite vor fi efective dacă toți parametrii sunt setați la aceeași valoare. +PageUrlForDefaultValuesCreate=<br> Exemplu: <br> Pentru formularul de creare a unui terți nou este <strong>%s</strong>. <br> Pentru URL-ul modulelor externe instalate în directorul custom, nu include "custom/" , foloseşte o cale ca <strong>mymodule/mypage.php</strong> și nu custom/mymodule/mypage.php. <br> Foloseşte valoarea implicită numai dacă url-ul are un anumit parametru, <strong> %s</strong> +PageUrlForDefaultValuesList=<br> Exemplu: <br> Pentru pagina care afișează terți, este <strong>%s</strong>. <br> Pentru URL-ul modulelor externe instalate în directorul personalizat, nu include "custom/" utilizează o cale ca <strong>mymodule/mypagelist.php</strong> și nu custom/mymodule/mypagelist.php. <br> Utilizează valoarea implicită numai dacă URL-ul are un anumit parametru, <strong>%s</strong> +AlsoDefaultValuesAreEffectiveForActionCreate=De asemenea, rețineți că suprascrierea valorilor implicite pentru crearea de formulare funcționează numai pentru paginile care au fost proiectate corect (deci cu parametrul de action=create sau view...) EnableDefaultValues=Activați personalizarea valorilor implicite -EnableOverwriteTranslation=Activați utilizarea traducerilor suprascrise -GoIntoTranslationMenuToChangeThis=A fost găsită o traducere pentru cheia cu acest cod. Pentru a modifica această valoare, trebuie să o editați din Acasă-Configurare-Traducere. -WarningSettingSortOrder=Avertisment, setarea unei ordini de sortare implicite poate duce la o eroare tehnică atunci când mergeți în lista paginii dacă câmpul este un câmp necunoscut. Dacă întâmpinați o astfel de eroare, reveniți la această pagină pentru a elimina ordinea de sortare implicită și pentru a restabili comportamentul implicit. +EnableOverwriteTranslation=Activați utilizarea traducerilor cu suprascriere +GoIntoTranslationMenuToChangeThis=A fost găsită o traducere pentru cheia cu acest cod. Pentru a modifica această valoare, trebuie să o editați din Acasă-Setări-Traduceri. +WarningSettingSortOrder=Atenţie, setarea unei ordini de sortare implicite poate duce la o eroare tehnică atunci când mergeți în lista paginii dacă câmpul este un câmp necunoscut. Dacă întâmpinați o astfel de eroare, reveniți la această pagină pentru a elimina ordinea de sortare implicită și pentru a restabili comportamentul implicit. Field=Câmp -ProductDocumentTemplates=Șabloane de documente pentru a genera documentul produsului -FreeLegalTextOnExpenseReports=Text legal gratuit pe rapoartele de cheltuieli +ProductDocumentTemplates=Șabloane de documente pentru a genera fişa de produs +FreeLegalTextOnExpenseReports=Text legal liber pe rapoartele de cheltuieli WatermarkOnDraftExpenseReports=Filigran pe rapoartele de cheltuieli -AttachMainDocByDefault=Setați această valoare la 1 dacă doriți să atașați documentul principal la e-mail în mod prestabilit (dacă este cazul) +AttachMainDocByDefault=Setați această valoare la 1 dacă doriți să atașați documentul principal la email în mod prestabilit (dacă este cazul) FilesAttachedToEmail=Ataşează fişier -SendEmailsReminders=Trimiteți mementouri de agendă prin e-mailuri +SendEmailsReminders=Trimiteți mementouri din agendă pe email davDescription=Configurați un server WebDAV DAVSetup=Configurarea modulului DAV -DAV_ALLOW_PRIVATE_DIR=Activați directorul privat generic (directorul dedicat WebDAV denumit „privat” - este necesară autentificare) -DAV_ALLOW_PRIVATE_DIRTooltip=Directorul privat generic este un director WebDAV pe care oricine îl poate accesa cu identificarea/ parola aplicației sale. -DAV_ALLOW_PUBLIC_DIR=Activați directorul public generic (director dedicat WebDAV denumit „public” - nu este necesară autentificare) -DAV_ALLOW_PUBLIC_DIRTooltip=Directorul public generic este un director WebDAV pe care îl poate accesa oricine (în modul citire și scriere), fără a fi necesară autorizarea (identificare / parolă). -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. +DAV_ALLOW_PRIVATE_DIR=Activați directorul privat generic (directorul dedicat WebDAV denumit "privat" - este necesară autentificarea) +DAV_ALLOW_PRIVATE_DIRTooltip=Directorul privat generic este un director WebDAV pe care oricine îl poate accesa cu identificatorul/parola din aplicația sa. +DAV_ALLOW_PUBLIC_DIR=Activare director public generic (director dedicat WebDAV denumit "public" - nu este necesară autentificarea) +DAV_ALLOW_PUBLIC_DIRTooltip=Directorul public generic este un director WebDAV pe care îl poate accesa oricine (în modul citire și scriere), fără a fi necesară autorizarea (identificare/parolă). +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 sunt 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=Utilizatori & Grupuri Module0Desc=Managementul Utilizatorilor/Angajaților și al Grupurilor @@ -525,150 +529,154 @@ Module1Name=Terți Module1Desc=Gestionarea companiilor și a contactelor (clienți, prospecţi...) Module2Name=Comercial Module2Desc=Management Comercial -Module10Name=Contabilitate (simplificată) +Module10Name=Contabilitate (în partidă simplă) Module10Desc=Rapoarte contabile simple (jurnale, cifre de afaceri) bazate pe conținutul bazei de date. Nu folosește niciun registru contabil. -Module20Name=Oferte +Module20Name=Oferte comerciale Module20Desc=Managementul Ofertelor Comerciale -Module22Name=Mass e-mailuri -Module22Desc=Gestionați e-mailurile în bloc +Module22Name=Newslettere +Module22Desc=Transmitere şi gestionare newslettere Module23Name=Energie Module23Desc=Monitorizarea consumului de energie -Module25Name=Comenzile de vânzări -Module25Desc=Gestionarea comenzilor de vânzări +Module25Name=Comenzi de vânzări +Module25Desc=Managementul 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 +Module30Desc=Gestionarea facturilor și a notelor de credit pentru clienți. Gestionarea facturilor și a notelor de credit pentru furnizori Module40Name=Furnizori 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. +Module42Name=Jurnale de depanare +Module42Desc=Facilități de jurnalizare (fișier, syslog, ...). Aceste jurnale sunt pentru scopuri tehnice/de depanare. +Module43Name=Debug bar +Module43Desc=Un instrument pentru dezvoltatori care adaugă o bară de depanare în browserul dvs. Module49Name=Editori -Module49Desc=Managementul Editorilor +Module49Desc=Managementul editorilor Module50Name=Produse Module50Desc=Gestionarea produselor -Module51Name=Mass-mailing -Module51Desc=Mass-mailing hârtie "de gestionare a +Module51Name=Scrisori +Module51Desc=Gestionarea scrisorilor, corespondenţei poştale Module52Name=Stocuri Module52Desc=Gestionarea stocurilor Module53Name=Servicii Module53Desc=Gestiunea serviciilor -Module54Name=Contracte / Abonamente +Module54Name=Contracte/Abonamente Module54Desc=Gestionarea contractelor (servicii sau abonamente periodice) Module55Name=Coduri de bare -Module55Desc=Coduri de bare "de gestionare a +Module55Desc=Managementul codurilor de bare 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 +Module58Desc=Integrare cu un sistem ClickToDial (Asterisk, ...) Module60Name=Stickere Module60Desc=Management stickere Module70Name=Intervenţii -Module70Desc=Managementul Intervenţiilor -Module75Name=Ordine de deplasare şi Note de Cheltuieli -Module75Desc=Managementul Ordinele de deplasare şi Notelor de Cheltuieli +Module70Desc=Managementul intervenţiilor +Module75Name=Ordine de deplasare - delegaţie şi Note de Cheltuieli +Module75Desc=Managementul Ordinelor de deplasare şi Notelor de Cheltuieli Module80Name=Livrări -Module80Desc=Livrările și gestionarea notei de livrare +Module80Desc=Livrăril și gestionarea notelor de livrare Module85Name=Bănci și numerar -Module85Desc=Managementul conturilor bancare şi in numerar +Module85Desc=Managementul conturilor bancare şi a celor de numerar Module100Name=Site extern Module100Desc=Adăugați un link către un site web extern ca pictogramă de meniu principal. Website-ul este afișat într-un cadru sub meniul principal. Module105Name=Mailman şi SIP -Module105Desc=Interfaţă Mailman sau SPIP pentru modul membru +Module105Desc=Interfaţă Mailman sau SPIP pentru modul Membri Module200Name=LDAP Module200Desc=Sincronizarea directorului LDAP Module210Name=PostNuke -Module210Desc=PostNuke integrare -Module240Name=Exportul de date +Module210Desc=Integrare PostNuke +Module240Name=Export date Module240Desc=Instrument pentru export date din Dolibarr (asistat) -Module250Name=Date importurile +Module250Name=Import date Module250Desc=Instrument pentru import date în Dolibarr (asistat) Module310Name=Membri -Module310Desc=Fundatia membri de management +Module310Desc=Managementul membrilor unei fundaţii Module320Name=Feed RSS -Module320Desc=Adăugați un feed RSS la paginile Dolibarr +Module320Desc=Adăugați un feed RSS la paginile sistemului Module330Name=Marcaje & comenzi rapide Module330Desc=Creați comenzi rapide, întotdeauna accesibile, paginilor interne sau externe pe care le accesați frecvent -Module400Name=Proiecte sau inițiative -Module400Desc=Gestionarea proiectelor, a potențialilor și / sau a sarcinilor. De asemenea, puteți asocia orice element (factură, comandă, propunere, intervenție, ...) unui proiect și obține o vedere transversală din vizualizarea proiectului. -Module410Name=Webcalendar -Module410Desc=Webcalendar integrare +Module400Name=Proiecte sau oportunităţi +Module400Desc=Gestionarea proiectelor, a lead-urilor/oportunităţilor și/sau a task-urilor. De asemenea, puteți asocia orice element (factură, comandă, propunere, intervenție, ...) unui proiect și puteţi obține o vedere transversală proiectului. +Module410Name=Calendar web +Module410Desc=Integrare calendar web Module500Name=Taxe și cheltuieli speciale -Module500Desc=Gestionarea altor cheltuieli (impozite de vânzare, taxe sociale sau fiscale, dividende, ...) +Module500Desc=Gestionarea altor cheltuieli (taxe de vânzare, taxe sociale sau fiscale, dividende, ...) Module510Name=Salarii Module510Desc=Înregistrați și urmăriți plățile angajaților Module520Name=Credite Module520Desc=Gestionarea creditelor -Module600Name=Notificări privind evenimentul de afaceri -Module600Desc=Trimiteți notificări prin e-mail declanșate de un eveniment de afaceri: pentru fiecare utilizator (setarea definită pentru fiecare utilizator), pentru contacte terțe (setare definită pentru fiecare terț) sau pentru e-mailuri specifice -Module600Long=Rețineți că acest modul trimite e-mailuri în timp real când apare un anumit eveniment de afaceri. Dacă sunteți în căutarea unei funcții pentru a trimite memento-uri de e-mail pentru evenimente de agendă, mergeți la configurarea agendei modulului. +Module600Name=Notificări pe eveniment de afaceri +Module600Desc=Trimiteți notificări prin email declanșate de un eveniment de afaceri: pentru fiecare utilizator (setarea definită pentru fiecare utilizator), pentru contacte terțe (setare definită pentru fiecare terț) sau pentru emailuri specifice +Module600Long=Rețineți că acest modul trimite emailuri în timp real când apare un anumit eveniment de afaceri. Dacă sunteți în căutarea unei funcții pentru a trimite remindere pe email pentru evenimentele din agendă, mergeți la configurarea modulului Agendă. Module610Name=Variante de produs Module610Desc=Crearea de variante de produse (culoare, dimensiune etc.) -Module700Name=Donatii -Module700Desc=MAnagementul Donaţiilor +Module700Name=Donaţii +Module700Desc=Managementul Donaţiilor Module770Name=Rapoarte de cheltuieli -Module770Desc=Gestionați cererile de rapoarte de cheltuieli (transport, masă, ...) -Module1120Name=Propuneri comerciale ale furnizorilor -Module1120Desc=Solicitați vânzătorului propunerea comercială și prețurile +Module770Desc=Gestionați cererile de decontare de cheltuieli (transport, masă, ...) +Module1120Name=Oferte comerciale de la furnizori +Module1120Desc=Solicitați furnizorilor oferte şi cereri de prețuri Module1200Name=Mantis -Module1200Desc=Mantis integrare -Module1520Name=Generare Document -Module1520Desc=Generarea de documente de mass e-mail -Module1780Name=Tag-uri / Categorii +Module1200Desc=Integrare Mantis +Module1520Name=Generare document +Module1520Desc=Generarea de newslettere +Module1780Name=Tag-uri/Categorii Module1780Desc=Creați etichete/categorii (produse, clienti, furnizori, contacte sau membri) -Module2000Name=Fckeditor -Module2000Desc=Permite câmpurilor de text să fie editate / formatate folosind CKEditor (html) +Module2000Name=Fckeditor editor WYSIWYG +Module2000Desc=Permite câmpurilor de text să fie editate/formatate folosind CKEditor (html) Module2200Name=Preţuri dinamice -Module2200Desc=Utilizați expresii de matematică pentru generarea automată a prețurilor -Module2300Name=Joburi programate -Module2300Desc=Gestionarea planificată a locurilor de muncă (alias cron sau tabelul chrono) -Module2400Name=Evenimente / Agenda -Module2400Desc=Urmăriți evenimentele. Înregistrați evenimente automate pentru a urmări scopurile sau pentru a înregistra evenimente sau întâlniri manuale. Acesta este modulul principal pentru o bună gestionare a relațiilor cu clienții sau furnizorii. +Module2200Desc=Utilizați expresii matematice pentru generarea automată a prețurilor +Module2300Name=Joburi de sistem programate +Module2300Desc=Gestionarea planificată a joburilor de sistem (alias cron sau chrono) +Module2400Name=Evenimente/Agendă +Module2400Desc=Urmăriți evenimentele. Înregistrați evenimente automate sau manual pentru a nota activităţi sau întâlniri. Acesta este modulul principal pentru o bună gestionare a relațiilor cu clienții sau furnizorii. Module2500Name=DMS / ECM -Module2500Desc=Sistemul de management al documentelor / Gestiunea conținutului electronic. Organizarea automată a documentelor dvs. generate sau stocate. Împărțiți-le când aveți nevoie. -Module2600Name=API/Web services (SOAP server) -Module2600Desc=Activați serviciile serverului Dolibarr SOAP care furnizează servicii API -Module2610Name=Servicii API/Web (serverul REST) -Module2610Desc=Activați serverul Dolibarr REST furnizând servicii API +Module2500Desc=Sistemul de management al documentelor / Gestiunea conținutului electronic. Organizarea automată a documentelor tale generate sau stocate. Le poţi partaja dacă este necesar. +Module2600Name=Servicii API/Web (SOAP server) +Module2600Desc=Activați serverul SOAP pentru a furniza servicii API +Module2610Name=Servicii API/Web (server REST) +Module2610Desc=Activare server REST pentru furnizarea de servicii API Module2660Name=Call WebServices (SOAP client) -Module2660Desc=Activați clientul de servicii Web Dolibarr (Poate fi folosit pentru a împinge datele / cererile către servere externe. În prezent, sunt acceptate numai comenzile de cumpărare.) +Module2660Desc=Activați clientul de servicii Web (Poate fi folosit pentru a împinge datele/cererile către servere externe. În prezent, sunt acceptate numai comenzile de achiziţie.) Module2700Name=Gravatar -Module2700Desc=Utilizați serviciul Gravatar online (www.gravatar.com) pentru a afișa fotografia utilizatorilor / membrilor (găsite cu e-mailurile lor). Necesită acces la Internet +Module2700Desc=Utilizați serviciul Gravatar online (www.gravatar.com) pentru a afișa fotografia utilizatorilor/membrilor (găsite pe baza adreselor de email). Necesită acces la Internet Module2800Desc=FTP Client Module2900Name=GeoIPMaxmind -Module2900Desc=GeoIP conversii Maxmind capacităţile -Module3200Name=Arhivele nealterabile +Module2900Desc=Capabilităţi de conversie GeoIP Maxmind +Module3200Name=Jurnale Nealterabile Module3200Desc=Activează un jurnal inalterabil al evenimentelor de afaceri. Evenimentele sunt arhivate în timp real. Jurnalul este o tabelă cu functie doar de citire a evenimentelor în lanț care pot fi exportate. Acest modul poate fi obligatoriu pentru unele țări. +Module3400Name=Reţele sociale +Module3400Desc=Activați câmpurile Rețele sociale la terți și adrese (skype, twitter, facebook, ...). Module4000Name=HRM -Module4000Desc=Managementul resurselor umane (managementul departamentului, contracte și păreri ale angajaților) +Module4000Desc=Managementul resurselor umane (management departamente, contracte de muncă și experienţa angajaților) Module5000Name=Multi-societate 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) +Module6000Name=Flux de lucru inter-module +Module6000Desc=Gestionarea fluxului de lucru între diferite module (crearea automată a obiectului și/sau schimbarea automată a stării) Module10000Name=Site-uri 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 Module39000Desc=Loturi, numere seriale, administrare consum de date eat-by/sell-by pentru produse -Module40000Name=Mai multe cursuri valutare -Module40000Desc=Utilizați cursuri valutare alternative în prețuri și documente +Module40000Name=Multimonedă +Module40000Desc=Utilizați monede alternative în prețuri și documente Module50000Name=Paybox -Module50000Desc=Oferiți clienților o pagină pentru plata online PayBox (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.) +Module50000Desc=Oferiți clienților o pagină pentru plata online PayBox (carduri de credit/debit). Aceasta poate fi utilizată pentru a permite clienților să efectueze plăți ad-hoc sau plăți legate de un anumit obiect din sistem (factură, comandă etc.) Module50100Name=POS SimplePOS -Module50100Desc=Punct de vânzare modul SimplePOS (POS simplu). +Module50100Desc=Punct de vânzare modulul SimplePOS (POS simplu). Module50150Name=POS TakePOS 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 -Module50300Desc=Oferiți clienţilor o pagină Stripe de plată online (carduri de credit/debit). Aceasta poate fi utilizată pentru a permite clienţilor să facă plăţi ad-hoc sau plăţi legate de un anumit obiect Dolibarr (factură, comandă etc ...) -Module50400Name=Contabilitate (intrare dublă) +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 să efectueze plăți ad-hoc sau plăți legate de un anumit obiect din sistem (factură, comandă etc...) +Module50300Name=Stripe +Module50300Desc=Oferiți clienţilor o pagină Stripe de plată online (carduri de credit/debit). Aceasta poate fi utilizată pentru a permite clienţilor să facă plăţi ad-hoc sau plăţi legate de un anumit obiect sistem (factură, comandă etc ...) +Module50400Name=Contabilitate (partidă dublă) Module50400Desc=Managementul contabilității (partidă dublă, suport jurnale contabile principale şi subsidiare- de filială). Exportați registrele în mai multe alte formate utilizate de software-uri de contabilitate.  -Module54000Name=Print lP IPrinter -Module54000Desc=Imprimare directă (fără a deschide documentele) utilizând interfața Cups IPP (Imprimanta trebuie să fie vizibilă pe server, and CUPS trebuie să fie instalat pe server). -Module55000Name=Sondaj, supraveghere sau vot -Module55000Desc=Creați sondaje online, sondaje sau voturi (cum ar fi Doodle, Studs, RDVz etc ...) +Module54000Name=Print lPP +Module54000Desc=Imprimare directă (fără a deschide documentele) utilizând interfața Cups IPP (Imprimanta trebuie să fie vizibilă pe server, şi CUPS trebuie să fie instalat pe server). +Module55000Name=Sondaj, Chestionar sau Vot +Module55000Desc=Creați sondaje online, chestionare sau voturi (cum ar fi Doodle, Studs, RDVz etc...) Module59000Name=Marje Module59000Desc=Modul pentru urmărirea marjelor Module60000Name=Comisioane @@ -676,183 +684,184 @@ Module60000Desc=Modul management comisioane Module62000Name=Incoterm Module62000Desc=Adăugați caracteristici pentru a gestiona Incoterms Module63000Name=Resurse -Module63000Desc=Gestionați resursele (imprimante, mașini, camere, ...) pentru a le aloca evenimentelor -Permission11=Citeşte facturi -Permission12=Creaţi/Modificare facturi +Module63000Desc=Gestionarea resurselor (imprimante, mașini, camere, ...) pentru a le aloca evenimentelor +Permission11=Citeşte facturi clienţi +Permission12=Creare/modificare facturi clienţi Permission13=Invalidează facturi client -Permission14=Facturi client validate -Permission15=Trimite facturi prin e-mail -Permission16=Crearea de plăţi pentru facturile -Permission19=Ştergere facturi +Permission14=Validare facturi client +Permission15=Trimite facturi client pe email +Permission16=Creare de plăţi pentru facturile client +Permission19=Ştergere facturi clienţi Permission21=Citeşte oferte comerciale -Permission22=Creare / Modificare oferte comerciale -Permission24=Oferte comerciale validate -Permission25=Trimite oferte comerciale -Permission26=Inchide oferte comerciale +Permission22=Creare/modificare oferte comerciale +Permission24=Validare oferte comerciale +Permission25=Trimitere oferte comerciale +Permission26=Închidere oferte comerciale Permission27=Ştergere oferte comerciale Permission28=Export oferte comerciale -Permission31=Citiţi cu produse / servicii -Permission32=Creare / Modificare produse / servicii -Permission34=Ştergere produse / servicii -Permission36=Exportul de produse / servicii -Permission38=Exportul de produse +Permission31=Citeşte produse/servicii +Permission32=Creare/modificare produse/servicii +Permission34=Ştergere produse/servicii +Permission36=Vizualizare/administrare de produse/servicii ascunse +Permission38=Export de produse/servicii Permission39=Ignoră preţul minim de vânzare -Permission41=Citiți proiectele și sarcinile (proiecte și proiecte comune pentru care sunt persoană de contact). Se poate, de asemenea, să introduceți timpul consumat, pentru mine sau pentru ierarhia mea, asupra sarcinilor atribuite (Timesheet) -Permission42=Creați/modificați proiecte (proiecte și proiecte comune pentru care sunt persoană de contact). De asemenea, se pot crea sarcini și se pot atribui utilizatorilor proiecte și sarcini -Permission44=Ștergeți proiectele (proiectul comun și proiectele pentru care sunt persoană de contact) +Permission41=Citeşte proiectele și task-urile (proiecte partajate și proiecte care sunt persoană de contact). Se poate, de asemenea, să introduci timpul consumat, pentru mine sau pentru ierarhia mea, asupra task-urilor atribuite (Timesheet) +Permission42=Creare/modificare proiecte (proiecte partajate și proiecte la care este persoană de contact). De asemenea, poate crea task-uri și poate atribui utilizatori la proiecte și tak-uri +Permission44=Șterge proiecte (proiecte partajate și proiecte pentru care este persoană de contact) Permission45=Export proiecte Permission61=Citeşte intervenţii -Permission62=Creare / Modificare intervenţii +Permission62=Creare/modificare intervenţii Permission64=Ştergere intervenţii Permission67=Export intervenţii Permission68=Trimitere intervenţii pe email Permission69=Validează intervenţii Permission70=Invalidează intervenţii -Permission71=Citeşte membrii -Permission72=Creare / Modificare membri +Permission71=Citeşte membri +Permission72=Creare/modificare membri Permission74=Ştergere membri Permission75=Configurare tipuri membri -Permission76=Export Date +Permission76=Export date Permission78=Citeşte abonamente -Permission79=Creare / Modificare abonamente -Permission81=Citeşte ordinelor clienţilor -Permission82=Creare / Modificare ordinelor clienţilor -Permission84=Validate ordinelor clienţilor -Permission86=Trimite ordinelor clienţilor -Permission87=Inchide ordinelor clienţilor -Permission88=Anulare ordinelor clienţilor -Permission89=Ştergere ordinelor clienţilor +Permission79=Creare/modificare abonamente +Permission81=Citeşte comenzile de vânzare +Permission82=Creare/modificare comenzi de vânzare +Permission84=Validare comenzi de vânzare +Permission86=Trimitere comenzi de vânzare +Permission87=Închidere comenzi de vânzare +Permission88=Anulare comenzi de vânzare +Permission89=Ştergere comenzi de vânzare Permission91=Citeste taxe sociale sau fiscale și tva -Permission92=Creare / Modificare taxe sociale sau fiscale si tva -Permission93=Sterge taxe sociale sau fiscale si tva -Permission94=Export taxe sociale sau fiscale si tva +Permission92=Creare/modificare taxe sociale sau fiscale şi tva +Permission93=Şterge taxe sociale sau fiscale şi tva +Permission94=Export taxe sociale sau fiscale şi tva Permission95=Citeşte rapoarte -Permission101=Citeşte sendings -Permission102=Creare / Modificare Livrare -Permission104=Validează livrari -Permission105=Trimitere expediţii pe email +Permission101=Citeşte livrări +Permission102=Creare/modificare livrări +Permission104=Validare livrări +Permission105=Trimitere livrări pe email Permission106=Export livrări -Permission109=Ştergere sendings -Permission111=Citeşte conturile financiare -Permission112=Crea / modifica / delete şi compara tranzacţiile +Permission109=Şterge livrări +Permission111=Citeşte conturi financiare +Permission112=Creare/modificare/ştergere şi comparare tranzacţii Permission113=Configurare conturi financiare( creare, gestionare categorii) Permission114=Decontați tranzacțiile -Permission115=Tranzacţii de export şi în declaraţiile -Permission116=Transferuri între conturile -Permission117=Gestionați cecuri de expediţie -Permission121=Citiţi cu terţe părţi legate de utilizator -Permission122=Creare / Modificare terţe părţi legate de utilizator -Permission125=Ştergere terţe părţi legate de utilizator +Permission115=Export tranzacţii şi declaraţii contabile +Permission116=Transferuri între conturi +Permission117=Gestionare remitere cecuri +Permission121=Citiţi terţi asociaţi la utilizator +Permission122=Creare/modificare terţi asociaţi la utilizator +Permission125=Ştergere terţi asociaţi la utilizator Permission126=Export terţi -Permission141=Citește toate proiectele și sarcinile (inclusiv proiectele private pentru care nu sunt persoană de contact) -Permission142=Creați/modificați toate proiectele și sarcinile (inclusiv proiectele private pentru care nu sunt persoană de contact) -Permission144=Şterge toate proiectele și sarcinile (inclusiv proiectele private pentru care nu sunt persoană de contact) -Permission146=Citiţi cu furnizorii -Permission147=Citeşte stats -Permission151=Citiți comenzile de plată prin debitare directă -Permission152=Creați/modificați un ordin de plată prin debit direct +Permission141=Citește toate proiectele și task-urile (inclusiv proiectele private pentru care nu este persoană de contact) +Permission142=Creare/modificare toate proiectele și task-urile (inclusiv proiectele private pentru care nu este persoană de contact) +Permission144=Şterge toate proiectele și task-urile (inclusiv proiectele private pentru care nu sunt persoană de contact) +Permission146=Citeşte furnizorii +Permission147=Citeşte statisticile +Permission151=Citeşte ordinele de plată prin debitare directă +Permission152=Creare/modificare ordin de plată prin debit direct Permission153=Trimite/transmite ordine de plată prin debit direct -Permission154=Inregistreaza creditarea/respingerea ordinelor de plată prin debitare directă -Permission161=Citește contracte / abonamente -Permission162=Creare / modificare contracte / abonamente -Permission163=Activează un serviciu / abonament al unui contract -Permission164=Dezactivarea unui serviciu / abonament al unui contract -Permission165=Ștergeți contracte / abonamente -Permission167=Export Contracte -Permission171=Citiți delegatiile și cheltuielile (ale dvs. și ale subordonaților dvs.) -Permission172=Creare / Modificare ordin de deplasare şi cheltuieli -Permission173=Ştergere ordin de deplasare şi cheltuieli -Permission174=Citeşte toate ordinele de deplasare şi cheltuieli -Permission178=Export ordin de deplasare şi cheltuieli -Permission180=Citiţi cu furnizorii -Permission181=Citiți comenzile de achiziţie -Permission182=Creați/modificați comenzile de achiziţie -Permission183=Validați comenzile de achiziţie -Permission184=Aprobați comenzile de achiziţie -Permission185=Ordonați sau anulați comenzile de achiziţie -Permission186=Primiți comenzile de achiziţie -Permission187=Închideţi comenzile de achiziţie -Permission188=Anulaţi comenzile de achiziţie -Permission192=Creaţi linii +Permission154=Înregistrează creditarea/respingerea ordinelor de plată prin debitare directă +Permission161=Citește contracte/abonamente +Permission162=Creare/modificare contracte/abonamente +Permission163=Activează un serviciu/abonament al unui contract +Permission164=Dezactivează un serviciu/abonament al unui contract +Permission165=Șterge contracte/abonamente +Permission167=Export contracte +Permission171=Citeşte delegatiile și cheltuielile (ale sale și ale subordonaților săi) +Permission172=Creare/modificare ordin de deplasare şi cheltuieli +Permission173=Ştergere ordine de deplasare şi rapoarte de cheltuieli +Permission174=Citeşte toate delegaţiile şi cheltuielile +Permission178=Export ordine de deplasare şi rapoarte de cheltuieli +Permission180=Citeşte furnizorii +Permission181=Citeşte comenzile de achiziţie +Permission182=Creați/modificare comenzi de achiziţie +Permission183=Validare comenzi de achiziţie +Permission184=Aprobare comenzi de achiziţie +Permission185=Comandă sau anulare comenzi de achiziţie +Permission186=Recepţie comenzi de achiziţie +Permission187=Închidere comenzi de achiziţie +Permission188=Anulare comenzi de achiziţie +Permission192=Creare linii Permission193=Anulare linii -Permission194=Citiți liniile de lățime de bandă -Permission202=Creaţi conexiuni ADSL -Permission203=Ordinul de conexiuni ordinelor -Permission204=Ordinul de conexiuni +Permission194=Citeşte liniile de lățime de bandă +Permission202=Creare conexiuni ADSL +Permission203=Solicită comanda pachetelor +Permission204=Comadă pachetele Permission205=Gestionare conexiuni -Permission206=Citiţi cu conexiuni -Permission211=Citeşte de telefonie -Permission212=Ordinul linii -Permission213=Activaţi-line -Permission214=Setup de telefonie -Permission215=Setup furnizori -Permission221=Citeşte emailings -Permission222=Creare / Modificare emailings (subiect, beneficiarii ...) -Permission223=Validate emailings (permite trimiterea) -Permission229=Ştergere emailings -Permission237=Vezi destinatari și informații -Permission238=Trimitere emailuri manuală -Permission239=Şterge emailurile după validare sau trimitere +Permission206=Citeşte conexiuni +Permission211=Citeşte Telefonie +Permission212=Comandă linii +Permission213=Activare linie +Permission214=Configurare Telefonie +Permission215=Configurare furnizori +Permission221=Citeşte newslettere +Permission222=Creare/modificare newslettere (subiect, destinatari..) +Permission223=Validare newslettere (permite trimiterea) +Permission229=Şterge newslettere +Permission237=Vizualizare destinatari și informații +Permission238=Trimitere manuală emailuri +Permission239=Şterge newslettere după validare sau trimitere Permission241=Citeşte categorii -Permission242=Creare / Modificare categorii -Permission243=Ştergere categorii -Permission244=A se vedea conţinutul ascunse categorii +Permission242=Creare/modificare categorii +Permission243=Şterge categorii +Permission244=Vede conţinutul din categoriile ascunse Permission251=Citeşte alţi utilizatori şi grupuri -PermissionAdvanced251=Citeste alţi utilizatori +PermissionAdvanced251=Citeşte alţi utilizatori 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 -Permission255=Creaţi / modifica propriile informaţii de utilizator +Permission253=Creare/modificare alți utilizatori, grupuri și permisiuni +PermissionAdvanced253=Creare/modificare utilizatori interni/externi şi permisiuni +Permission254=Creare/modificare doar utilizatori externi +Permission255=Creare/modificare propriile informaţii de utilizator Permission256=Modificare propria parolă -Permission262=Extindeți accesul la toţi terţii (nu numai terţii pentru care utilizatorul este un reprezentant de vânzări). <br> Nu este eficient pentru utilizatori externi (întotdeauna se autolimiteaza la propuneri, comenzi, facturi, contracte etc..). <br> Nu este eficient pentru proiecte (doar reguli privind permisiunile proiectului, aspectul vizibilității și atribuții). +Permission262=Extindeți accesul la toţi terții ȘI la obiectele acestora (nu numai la terții pentru care utilizatorul este reprezentant de vânzări). <br>Nu este eficient pentru utilizatorii externi (întotdeauna limitat la ei înșiși pentru propuneri, comenzi, facturi, contracte etc.). <br>Nu este eficient pentru proiecte (numai reguli privind permisiunile proiectului, vizibilitate și probleme de atribuire). +Permission263=Extindeți accesul la toţi terții FĂRĂ obiectele lor (nu numai la terții pentru care utilizatorul este reprezentant de vânzări). <br>Nu este eficient pentru utilizatorii externi (întotdeauna limitat la ei înșiși pentru propuneri, comenzi, facturi, contracte etc.). <br>Nu este eficient pentru proiecte (numai reguli privind permisiunile proiectului, vizibilitate și probleme de atribuire). Permission271=Citeşte CA Permission272=Citeşte facturi -Permission273=Problema facturilor +Permission273=Emitere facturi Permission281=Citeşte contacte -Permission282=Creare / Modificare contacte -Permission283=Ştergere contacte -Permission286=Exportaţi contacte +Permission282=Creare/modificare contacte +Permission283=Şterge contacte +Permission286=Export contacte Permission291=Citeşte tarife -Permission292=Setaţi permisiunile cu privire la tarifele de -Permission293=Modificați tarifele clientului -Permission300=Citiți coduri de bare -Permission301=Creați/modificați coduri de bare -Permission302=Ștergeți codurile de bare +Permission292=Setare permisiuni pe tarifele de +Permission293=Modificare tarife client +Permission300=Citire coduri de bare +Permission301=Creare/modificare coduri de bare +Permission302=Șterge coduri de bare Permission311=Citeşte servicii -Permission312=Atribuire serviciu / abonament la contract -Permission331=Citiţi cu marcaje -Permission332=Creare / Modificare marcaje -Permission333=Ştergeţi marcaje -Permission341=Citeste permisiunile proprii -Permission342=Crearea / modificarea datelor sale de utilizator proprie -Permission343=Modifica parola proprie +Permission312=Atribuire serviciu/abonament la contract +Permission331=Citire marcaje +Permission332=Creare/modificare marcaje +Permission333=Şterge marcaje +Permission341=Citeşte permisiunile proprii +Permission342=Creare/modificarea date proprii de utilizator +Permission343=Modifică parola proprie Permission344=Modificare permisiuni proprii -Permission351=Citeşte Grupuri -Permission352=Grupuri de permisiuni de citire -Permission353=Crearea / modificarea grupurilor de -Permission354=Şterge sau dezactiva grupuri +Permission351=Citeşte grupuri +Permission352=Citeşte permisiuni de grupuri +Permission353=Creare/modificare grupuri +Permission354=Şterge sau dezactivează grupuri Permission358=Export utilizatori -Permission401=Citiţi cu reduceri -Permission402=Creare / Modificare reduceri -Permission403=Validate reduceri -Permission404=Ştergere reduceri -Permission430=Utilizați bara de depanare -Permission511=Vizualizare plăți salarii (ale dvs. și ale subordonaților) -Permission512=Creare / Modificare plata salariilor -Permission514=Şterge plata salariilor +Permission401=Citeşte reduceri discount-uri +Permission402=Creare/modificare discount-uri +Permission403=Validare discount-uri +Permission404=Şterge discount-uri +Permission430=Utilizare bară de depanare +Permission511=Vizualizare plăți salarii (ale tale și ale subordonaților) +Permission512=Creare/modificare plăţi salarii +Permission514=Şterge plăţi salarii Permission517=Vizualizare plăţilor salariilor tuturor Permission519=Export salarii -Permission520=Citeşte credite -Permission522=Creare/modificare credite -Permission524=Şterge credite -Permission525=Accesați calculatorul de credite -Permission527=Imprumuturi externe +Permission520=Citeşte credite împrumuturi +Permission522=Creare/modificare credite împrumuturi +Permission524=Şterge credite împrumuturi +Permission525=Accesare calculator de credite +Permission527=Export credite împrumuturi Permission531=Citeşte servicii -Permission532=Creare / Modificare servicii -Permission534=Ştergere servicii -Permission536=A se vedea / administra serviciile ascunse -Permission538=Exportul de servicii +Permission532=Creare/modificare servicii +Permission534=Şterge servicii +Permission536=Vede/administrează serviciile ascunse +Permission538=Export servicii Permission561=Citire ordine de plată prin transfer de credit Permission562=Creare/modificare comandă de plată prin transfer de credit Permission563=Trimitere/Transmitere comanda de plată prin transfer de credit @@ -860,129 +869,129 @@ Permission564=Înregistrare debite/respingeri de transfer de credit Permission601=Citeşte stickere Permission602=Creare/modificare stickere Permission609=Şterge stickere -Permission650=Citiți facturile de materiale -Permission651=Creați / actualizați facturile de materiale -Permission652=Ștergeți facturile de materiale +Permission650=Citeşte Bonuri de consum +Permission651=Creare/actualizare Bonuri de consum +Permission652=Șterge bonuri de consum Permission660=Citire Comandă de producţie (MO) Permission661=Creare/Actualizare Comandă de producţie (MO) Permission662=Ştergere Comandă de producţie (MO) -Permission701=Citiţi donaţii -Permission702=Creare / Modificare donaţii +Permission701=Citeşte donaţii +Permission702=Creare/modificare donaţii Permission703=Ştergere donaţii -Permission771=Citiți rapoartele de cheltuieli (ale dvs. și ale subordonaților dvs.) -Permission772=Creare / Modificare Raport Cheltuieli +Permission771=Citeşte rapoarte de cheltuieli (ale sale și ale subordonaților săi) +Permission772=Creare/modificare rapoarte de cheltuieli 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 +Permission774=Citeşte toate rapoartele de cheltuieli (chiar și pentru utilizatorii care nu sunt subordonații săi) +Permission775=Aprobă rapoarte de cheltuieli +Permission776=Plăteşte rapoartele de cheltuieli Permission777=Citire rapoarte de cheltuieli ale tuturor Permission778=Creare/modificare rapoarte de cheltuieli pentru toţi -Permission779=Export Rapoarte Cheltuieli +Permission779=Export rapoarte de cheltuieli Permission1001=Citeşte stocuri -Permission1002=Creare / modificare depozite -Permission1003=Ștergere depozite -Permission1004=Citeşte stoc deplasările -Permission1005=Creare / Modificare stoc deplasările +Permission1002=Creare/modificare depozite +Permission1003=Șterge depozite +Permission1004=Citeşte mişcările de stoc +Permission1005=Creare/modificare mişcare de stoc 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 -Permission1124=Trimiteți propunerile furnizorilor -Permission1125=Ștergeți propunerile furnizorilor -Permission1126=Închideți cererile de preț ale furnizorului -Permission1181=Citiţi cu furnizorii -Permission1182=Citiți purchase orders -Permission1183=Creați/modificați comenzile de achiziţie -Permission1184=Validați comenzile de achiziţie -Permission1185=Aprobați comenzile de achiziţie -Permission1186=Comanda comenzi de cumpărare -Permission1187=Recunoașteți bonul comenzii de cumpărare -Permission1188=Șterge comenzile de cumpărare +Permission1121=Citeşte oferte furnizori +Permission1122=Creare/modificare oferte furnizori +Permission1123=Validare oferte furnizori +Permission1124=Trimitere oferte furnizor +Permission1125=Șterge oferte furnizori +Permission1126=Închide cereri de preț la furnizori +Permission1181=Citeşte furnizori +Permission1182=Citire comenzi de achiziţie +Permission1183=Creare/modificare comenzi de achiziţie +Permission1184=Validare comenzi de achiziţie +Permission1185=Aprobare comenzi de achiziţie +Permission1186=Execută comenzi de achiziţie +Permission1187=Recunoașteți bonul comenzii de achiziţie +Permission1188=Șterge comenzi de achiziţie Permission1189=Bifați/Debifați recepția comenzii de achiziţie Permission1190=Aprobă comenzile de achiziție (a doua aprobare) Permission1191=Export comenzi de achiziţie cu atribute -Permission1201=Obţineţi rezultatul unui export -Permission1202=Creare / Modificare de export -Permission1231=Citiți facturile furnizorilor -Permission1232=Creați/modificați facturile furnizorilor -Permission1233=Valideaza facturile furnizorilor -Permission1234=Șterge facturile furnizorilor -Permission1235=Trimite facturile furnizorului pe email -Permission1236=Exportați facturile furnizorilor, atributele și plățile -Permission1237=Exportați comenzile de achiziție și detaliile acestora -Permission1251=Run masa importurile de date externe în baza de date (date de sarcină) -Permission1321=Export client facturi, atribute şi plăţile +Permission1201=Descarcă rezultatul unui export de date +Permission1202=Creare/modificare export de date +Permission1231=Citeşte facturi furnizori +Permission1232=Creare/modificare facturi furnizori +Permission1233=Validare facturi furnizori +Permission1234=Șterge facturi furnizori +Permission1235=Trimite facturi furnizor pe email +Permission1236=Export facturi furnizori, atribute și plăți +Permission1237=Export comenzi de achiziție și detaliile acestora +Permission1251=Execută importurile de date externe în baza de date (încărcare date) +Permission1321=Export facturi clienţi, atribute şi plăţi Permission1322=Redeschide o factură plătită -Permission1421=Exportaţi comenzi de vânzări și atribute +Permission1421=Export comenzi de vânzări și atribute Permission1521=Citeşte documente Permission1522=Ştergere documente -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 -Permission2414=Acțiuni de export/sarcini ale altora -Permission2501=Citeşte documente -Permission2502=Trimiteti sau şterge documente +Permission2401=Citeşte acțiuni (evenimente sau task-uri) legate de contul său de utilizator (dacă este proprietar al unui eveniment sau doar i s-a atribuit) +Permission2402=Creare/modificare acțiuni (evenimente sau task-uri) legate de contul său de utilizator (dacă este proprietar al evenimentului) +Permission2403=Șterge acțiuni (evenimente sau task-uri) legate de contul său de utilizator (dacă este proprietar al evenimentului) +Permission2411=Citeşte acţiuni (evenimente sau task-uri) ale altor persoane +Permission2412=Creare/modificarea acţiuni (evenimente sau task-uri) ale altor persoane +Permission2413=Şterge acţiuni (evenimente sau task-uri) ale altor persoane +Permission2414=Export acțiuni activităţi/task-uri ale altora +Permission2501=Citeşte/descarcă documente +Permission2502=Descărcare documente Permission2503=Trimite sau şterge documente -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 +Permission2515=Configurare directoare documente +Permission2801=Foloseşte clientul FTP în modul de citire (numai navigare și descărcare) +Permission2802=Foloseşte clientul FTP în modul de scriere (ştergere şi încărcare fişiere) +Permission3200=Citeşte evenimente arhivate și amprente digitale Permission3301=Generare module noi -Permission4001=Vezi angajații -Permission4002=Creați angajați -Permission4003=Ștergeți angajații -Permission4004=Exportați angajații -Permission10001=Citiți conținutul site-ului web -Permission10002=Creați / modificați conținutul site-ului web (html și conținut javascript) -Permission10003=Creați / modificați conținutul site-ului web (cod php dinamic). Periculos, trebuie rezervat dezvoltatorilor restricționați. -Permission10005=Ștergeți conținutul site-ului web -Permission20001=Citiți cererile de concediu (concediul dvs. și cele ale subordonaților dvs) -Permission20002=Creați/modificați cererile dvs. de concediu (concediul și cele ale subordonaților dvs.) +Permission4001=Vede angajații +Permission4002=Creare angajați +Permission4003=Șterge angajați +Permission4004=Export angajați +Permission10001=Citeşte conținut site web +Permission10002=Creare/modificare conținut site web (html și conținut javascript) +Permission10003=Creare/modificare conținut site web (cod php dinamic). Periculos, trebuie rezervat dezvoltatorilor restricționați. +Permission10005=Șterge conținut site web +Permission20001=Citeşte cererile de concediu (concediul său și cele ale subordonaților săi) +Permission20002=Creare/modificare cereri de concediu (concediul său și cele ale subordonaților săi) 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ţă) +Permission20004=Citeşte toate cererile de concediu (chiar și pentru utilizatorii care nu-i sunt subordonați) +Permission20005=Creare/modificare cereri de concediu pentru toată lumea (chiar și pentru utilizatorii care nu-i sunt subordonați) +Permission20006=Administrare cereri de concediu (configurare şi actualizare balanţă) Permission20007=Aprobare cereri de concediu -Permission23001=Citeste Joburi programate -Permission23002=Creare/Modificare job programat +Permission23001=Citeşte Joburi programate +Permission23002=Creare/modificare job programat Permission23003=Şterge Joburi programate Permission23004=Execută Joburi programate Permission50101=Utilizează Punct de vânzare POS (SimplePOS) Permission50151=Utilizează Punct de vânzare POS (TakePOS) Permission50201=Citeşte tranzacţii -Permission50202=Tranzacţiilor de import +Permission50202=Import tranzacţii Permission50330=Citeşte obiecte Zapier Permission50331=Creare/Actualizare obiecte Zapier Permission50332=Şterge obiecte Zapier -Permission50401=Uniți produsele și facturile cu conturile contabile -Permission50411=Citiți operațiunile din cartea mare -Permission50412=Scrieți/editați operațiunile în cartea mare -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) +Permission50401=Asociază produsele și facturile cu conturile contabile +Permission50411=Citeşte operațiunile din cartea mare +Permission50412=Scriere/editare operațiuni în cartea mare +Permission50414=Șterge operațiuni în cartea mare +Permission50415=Șterge toate operațiunile după an și jurnal în cartea mare +Permission50418=Export operațiuni din cartea mare +Permission50420=Rapoarte și export de rapoarte (cifră de afaceri, balanţe, jurnale, carte mare) 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 +Permission54001=Tipărire +Permission55001=Citeşte sondaje chestionare vot +Permission55002=Creare/modificare sondaje chestionare vot Permission59001=Citeşte marje comerciale Permission59002=Defineşte marje comerciale -Permission59003=Citeşte marjele fiecarui utilizator -Permission63001=Citiți resursele -Permission63002=Creaţi/modificaţi resursele -Permission63003=Ștergeți resursele -Permission63004=Asociaţi resursele la agenda de evenimentele +Permission59003=Citeşte marjele fiecărui utilizator +Permission63001=Citeşte resurse +Permission63002=Creare/modificare resurse +Permission63003=Șterge resurse +Permission63004=Asociere resurse la evenimentelele din agendă Permission64001=Permite tipărirea directă Permission67000=Permite tipărirea de bonuri chitanţe fiscale Permission68001=Citeşte raportare intracomunitară @@ -995,7 +1004,7 @@ Permission941604=Trimitere bonuri chitanţe pe email Permission941605=Export bonuri chitanţe Permission941606=Ştergere bonuri chitanţe DictionaryCompanyType=Tipuri de terţi -DictionaryCompanyJuridicalType=Entități juridice terțe +DictionaryCompanyJuridicalType=Tipuri entități juridice terți DictionaryProspectLevel=Nivel potenţial prospect pentru companii DictionaryProspectContactLevel=Nivel potenţial prospect pentru contacte DictionaryCanton=State/Provincii @@ -1003,272 +1012,273 @@ DictionaryRegion=Regiuni DictionaryCountry=Ţări DictionaryCurrency=Monede DictionaryCivility=Titluri onorifice -DictionaryActions=Tipuri evenimente agenda -DictionarySocialContributions=Tipuri de taxe sociale si fiscale -DictionaryVAT=Cote TVA sau Cote Taxe Vanzări +DictionaryActions=Tipuri evenimente agendă +DictionarySocialContributions=Tipuri de taxe sociale sau fiscale +DictionaryVAT=Cote de TVA sau Cote Taxe Vânzări DictionaryRevenueStamp=Valoarea taxei de timbru DictionaryPaymentConditions=Termeni de plată DictionaryPaymentModes=Modalităţi de plată DictionaryTypeContact=Tipuri Contact/adresă -DictionaryTypeOfContainer=Website - tip de pagini / containere de site -DictionaryEcotaxe=Ecotax (DEEE) +DictionaryTypeOfContainer=Website - tip de pagini/containere +DictionaryEcotaxe=Ecotaxă (DEEE) DictionaryPaperFormat=Formate hârtie -DictionaryFormatCards=Formaturi de card -DictionaryFees=Raportul de cheltuieli - Linii de tipuri de rapoarte de cheltuieli -DictionarySendingMethods=Metode Livrare +DictionaryFormatCards=Formate de card +DictionaryFees=Raportul de cheltuieli - Tipuri linii de cheltuieli +DictionarySendingMethods=Metode de livrare DictionaryStaff=Număr de angajaţi -DictionaryAvailability=Livrare întârziere +DictionaryAvailability=Întârzieri livrare DictionaryOrderMethods=Metode de comandă -DictionarySource=Originea ofertei / comenzi +DictionarySource=Originea ofertei/comenzii DictionaryAccountancyCategory=Grupuri personalizate pentru rapoarte -DictionaryAccountancysystem=Model pentru plan de conturi -DictionaryAccountancyJournal=Jurnalele contabile -DictionaryEMailTemplates=Șabloane de e-mail +DictionaryAccountancysystem=Modele planuri de conturi +DictionaryAccountancyJournal=Jurnale contabile +DictionaryEMailTemplates=Șabloane email DictionaryUnits=Unităţi DictionaryMeasuringUnits=Unități de măsură -DictionarySocialNetworks=Retele sociale +DictionarySocialNetworks=Reţele sociale DictionaryProspectStatus=Status prospect pentru companii DictionaryProspectContactStatus=Status prospect pentru contacte DictionaryHolidayTypes=Tipuri de concediu -DictionaryOpportunityStatus=Stare de conducere pentru proiect/conducere +DictionaryOpportunityStatus=Stare lead-uri pentru proiect/oportunitate DictionaryExpenseTaxCat=Raport de cheltuieli - Categorii de transport DictionaryExpenseTaxRange=Raport de cheltuieli - Gama de categorii de transport DictionaryTransportMode=Raportare intracomunitară - Mod transport TypeOfUnit=Tip de unitate -SetupSaved=Setup salvate -SetupNotSaved=Seturea nu a fost salvată +SetupSaved=Setări salvate +SetupNotSaved=Setarea nu a fost salvată BackToModuleList=Înapoi la lista Module -BackToDictionaryList=Înapoi la lista de Dicționare -TypeOfRevenueStamp=Tip de taxei de timbru +BackToDictionaryList=Înapoi la lista de dicționare +TypeOfRevenueStamp=Tip taxă de timbru VATManagement=Gestionarea taxelor de vânzare VATIsUsedDesc=Implicit atunci când creați proiecte, facturi, comenzi etc. rata taxei pe vânzări respectă regula standard activă <br> Dacă furnizorul nu este supus taxei pe vânzări , atunci taxa pe vânzări este implicit 0. Sfârșitul regulii. <br> Dacă țara (furnizorului= țara cumpărătorului), atunci taxa pe vânzări este implicit este egală cu taxa de vânzare a cumpărătorului. Sfârșitul regulii. <br> În cazul în care furnizorul şi cumpărătorul sunt ambii în Comunitatea Europeană şi bunurile sunt legate de transportul produselor (transport, livrare, linii aeriene), valoarea implicita a TVA este 0. Această regulă depinde de țara furnizorului - consultați contabilul dvs. TVA-ul ar trebui plătit de către cumpărători la biroul vamal din țara lor şi nu de către furnizor. Sfârșitul regulii. <br> În cazul în care furnizorul şi cumpărătorul sunt ambii în Comunitatea Europeană şi cumpărătorul nu sunt persoane juridice (cu o înregistrare intracomunitara de TVA), TVA-ul devine implicit egal cu TVA-ul din țara furnizorului. Sfârșitul regulii. <br> În cazul în care furnizorul şi cumpărătorul sunt ambii în Comunitatea Europeană şi cumpărătorul este o persoană juridică (cu o înregistrare intracomunitara de TVA), atunci TVA este implicit 0. Sfârșitul regulii. <br> În orice alt caz, valoarea implicită propusă a taxei de vânzare este = 0. Sfârșitul regulii. VATIsNotUsedDesc=Implicit, taxa de vânzare propusă este 0, ea poate fi utilizată pentru cazuri precum asociații, persoane fizice sau companii mici. -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. +VATIsUsedExampleFR=În Franța, se referă la companii sau organizații care au un sistem fiscal real (Simplificat real sau normă de venit). Un sistem în care TVA este declarat. +VATIsNotUsedExampleFR=În Franța, înseamnă că sunt declarate asociații sau societăţi care nu sunt plătitoare de taxe, 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=Tipuri taxe vânzări -LTRate=Rată -LocalTax1IsNotUsed=Nu utilizează taxa secundă +LTRate=Cotă +LocalTax1IsNotUsed=Nu utilizează taxa secundară LocalTax1IsUsedDesc=Utilizați un al doilea tip de taxă (alta decât prima) LocalTax1IsNotUsedDesc=Nu utilizați al doilea tip de taxă (alta decât prima) -LocalTax1Management=Tip secund taxă +LocalTax1Management=Tip taxă secundară LocalTax1IsUsedExample= LocalTax1IsNotUsedExample= -LocalTax2IsNotUsed=Nu utilizează taxa treia +LocalTax2IsNotUsed=Nu utilizează taxa 3 LocalTax2IsUsedDesc=Utilizați un al treilea tip de taxă (alta decât prima) LocalTax2IsNotUsedDesc=Nu utilizați al doilea tip de taxă (alta decât prima) -LocalTax2Management=Tipul trei al taxei +LocalTax2Management=Al treilea tip de taxă LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= -LocalTax1ManagementES=RE Management +LocalTax1ManagementES=Management RE LocalTax1IsUsedDescES=Rata RE în mod implicit la crearea propecţilor, facturilor, comenzilor etc. respectă regula standard activă: <br> Dacă cumpărătorul nu este supus ratei RE, RE impliciy va fi 0. Sfârșitul regulii. <br> Dacă cumpărătorul este supus ratei RE, este RE implicit. Sfârșitul regulii. <br> -LocalTax1IsNotUsedDescES=În mod implicit RE propus este 0. Sfârşitul regulă. +LocalTax1IsNotUsedDescES=În mod implicit RE propus este 0. Sfârşitul regulii. 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. -LocalTax2ManagementES=IRPF Management -LocalTax2IsUsedDescES=Rata IRPF în mod implicit când se creează perspective, facturi, comenzi etc. respectă regula standard activă <br> Dacă furnizorul nu este supus IRPF, atunci IRPF implicit = 0. Sfârșitul regulii. <br> Dacă furnizorul este supus IRPF atunci IRPF este implicit. Sfârșitul regulii. <br> -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. +LocalTax1IsNotUsedExampleES=În Spania sunt profesionişti şi societăţile care intră în incidenţa anumitor secţiuni ale IAE spaniole. +LocalTax2ManagementES=Management IRPF +LocalTax2IsUsedDescES=Rata IRPF în mod implicit când se creează prospecţi, facturi, comenzi etc. respectă regula standard activă <br> Dacă furnizorul nu este supus IRPF, atunci IRPF implicit = 0. Sfârșitul regulii. <br> Dacă furnizorul este supus IRPF atunci IRPF este implicit. Sfârșitul regulii. <br> +LocalTax2IsNotUsedDescES=În mod implicit IRPF propus este 0. Sfârşit regulă. +LocalTax2IsUsedExampleES=În Spania, liber profesioniştii şi specialiştii independenţi, care prestează servicii şi companiile care au ales sistemul de impozitare pe module. LocalTax2IsNotUsedExampleES=În Spania, sunt întreprinderi care nu sunt supuse sistemului de taxare pe module. 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 +CalcLocaltax1Desc=Rapoartele de Taxe locale sunt calculate ca diferenţă dintre taxele locale de vânzare şi taxele locale de cumpărare CalcLocaltax2=Achiziţii -CalcLocaltax2Desc=Rapoarte Taxe Locale este totalul taxelor locale de cumpărare +CalcLocaltax2Desc=Rapoartele de Taxe Locale sunt totalul taxelor locale de cumpărare CalcLocaltax3=Vânzări -CalcLocaltax3Desc=Rapoarte Taxe Locale este totalul taxelor locale de vanzare +CalcLocaltax3Desc=Rapoartele de Taxe Locale sunt totalul taxelor locale de vânzare 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 +LabelUsedByDefault=Eticheta utilizată în mod implicit în cazul în care nu găseşte un cod de traducere LabelOnDocuments=Eticheta de pe documente LabelOrTranslationKey=Etichetă sau cheie de traducere ValueOfConstantKey=Valoarea unei constante de configurare ConstantIsOn=Opţiunea %s este activă NbOfDays=Nr. de zile AtEndOfMonth=La sfârşitul lunii -CurrentNext=Curent / Urmatoarea +CurrentNext=Curentă/Următoare Offset=Decalaj AlwaysActive=Întotdeauna activ -Upgrade=Upgrade -MenuUpgrade=Upgrade / Extinde -AddExtensionThemeModuleOrOther=Implementați / instalați aplicația externă / modul -WebServer=Server Web -DocumentRootServer=Server Web este directorul rădăcină +Upgrade=Actualizare +MenuUpgrade=Actualizare / Extindere +AddExtensionThemeModuleOrOther=Implementare/instalare modul/aplicaţie externă +WebServer=Server web +DocumentRootServer= Directorul rădăcină al server-ului web DataRootServer=Directorul de fişiere de date IP=IP Port=Port -VirtualServerName=Virtual server de nume -OS=OS -PhpWebLink=Web link-PHP +VirtualServerName=Nume virtual server +OS=Sistem de operare +PhpWebLink=Web-link PHP Server=Server -Database=Baza de date -DatabaseServer=Baza de date gazdă -DatabaseName=Baza de date nume -DatabasePort=Baza de date port -DatabaseUser=Baza de date de utilizator -DatabasePassword=Baza de date parola +Database=Bază de date +DatabaseServer=Gazdă bază de date +DatabaseName=Nume bază de date +DatabasePort=Port bază de date +DatabaseUser=Utilizator bază de date +DatabasePassword=Parolă bază de date Tables=Tabele -TableName=Nume Tabel -NbOfRecord=Nr de înregistrări +TableName=Nume tabel +NbOfRecord=Nr. de înregistrări Host=Server -DriverType=Driver de tip -SummarySystem=Sistemul de informaţii rezumat -SummaryConst=Lista tuturor Dolibarr setarea parametrilor -MenuCompanySetup=Compania/Instituția -DefaultMenuManager= Manager meniul Standard -DefaultMenuSmartphoneManager=Manager meniul Smartphone -Skin=Tema vizuală -DefaultSkin=Tema vizuală Implicită -MaxSizeList=Lungime max pentru lista -DefaultMaxSizeList=Lungime max implicită pentru lista -DefaultMaxSizeShortList=Lungimea maximă implicită pentru listele scurte (de ex. în cardul clientului) +DriverType=Tip driver +SummarySystem=Rezumat informaţii sistem +SummaryConst=Lista tuturor parametrilor de configurare ai sistemului +MenuCompanySetup=Companie/Organizaţie +DefaultMenuManager= Manager meniu standard +DefaultMenuSmartphoneManager=Manager meniu smartphone +Skin=Temă vizuală +DefaultSkin=Temă vizuală implicită +MaxSizeList=Lungime maximă pentru liste +DefaultMaxSizeList=Lungime maximă implicită pentru liste +DefaultMaxSizeShortList=Lungimea maximă implicită pentru listele scurte (de ex. în fişa client) MessageOfDay=Mesajul zilei -MessageLogin=Mesaj pagina login +MessageLogin=Mesaj pagină de autentificare LoginPage=Pagină de autentificare BackgroundImageLogin=Imagine de fundal -PermanentLeftSearchForm=Formular de căutare permanent in meniu din stânga +PermanentLeftSearchForm=Formular permanent de căutare permanent în meniul din stânga DefaultLanguage=Limba implicită 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 +CompanyInfo=Companie/Organizaţie +CompanyIds=Identități companie/organizație CompanyName=Nume CompanyAddress=Adresă -CompanyZip=Zip +CompanyZip=Cod poştal CompanyTown=Oraş CompanyCountry=Ţară CompanyCurrency=Moneda principală -CompanyObject=Obiectul companiei +CompanyObject=Obiectul de activitate al companiei IDCountry=ID ţară Logo=Logo 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ă +DoNotSuggestPaymentMode=Nu sugera NoActiveBankAccountDefined=Niciun cont bancar activ definit -OwnerOfBankAccount=Titular de cont bancar %s -BankModuleNotActive=Conturi bancare de module nu a permis +OwnerOfBankAccount=Titularul contului bancar %s +BankModuleNotActive=Modulul Conturi bancare nu este activat ShowBugTrackLink=Arată link-ul "<strong>%s</strong>" Alerts=Alerte -DelaysOfToleranceBeforeWarning=Întârziere înainte de a afișa o alertă de avertizare pentru: +DelaysOfToleranceBeforeWarning=Durată înainte de afișarea unei alerte pentru: DelaysOfToleranceDesc=Setați întârzierea înainte ca o pictogramă de alertă %s să apară pe ecran pentru ultimul element. -Delays_MAIN_DELAY_ACTIONS_TODO=Evenimente planificate (evenimente din agendă) nu au fost finalizate -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Proiectul nu a fost închis în timp -Delays_MAIN_DELAY_TASKS_TODO=Sarcina planificată (sarcinile proiectului) nu a fost finalizată +Delays_MAIN_DELAY_ACTIONS_TODO=Evenimente planificate (evenimente din agendă) nefinalizate +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Proiectul nu a fost închis la timp +Delays_MAIN_DELAY_TASKS_TODO=Task-ul planificat (task-urile proiectului) nu a fost finalizat Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Comanda nu a fost procesată -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Comanda de aprovizionare nu a fost procesată -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Propunerea nu este închisă -Delays_MAIN_DELAY_PROPALS_TO_BILL=Propunerea nu a fost facturată -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Serviciul pentru activare +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Comanda de achiziţie nu a fost procesată +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Oferta nu este închisă +Delays_MAIN_DELAY_PROPALS_TO_BILL=Oferta nu a fost facturată +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Serviciu de activat Delays_MAIN_DELAY_RUNNING_SERVICES=Serviciu expirat Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Factura furnizor neachitată Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Factura client neachitată Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=În așteptarea reconcilierii bancare 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_EXPENSEREPORTS=Raport de cheltuieli de aprobat 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. +SetupDescription1=Înainte de a începe să utilizați sistemul, unii parametri inițiali trebuie să fie definiți şi anumite module activate/configurate. SetupDescription2=Următoarele două secțiuni sunt obligatorii (primele două intrări din meniul de configurare) SetupDescription3=<a href="%s">%s->%s</a><br><br>Parametri de bază folosiți pentru a personaliza comportamentul implicit al aplicației (de exemplu, pentru funcțiile legate de țară). SetupDescription4=<a href="%s">%s->%s</a><br><br>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 +SetupDescription5=Meniul Alte setări gestionează parametrii opționali. +AuditedSecurityEvents=Evenimentele de securitate care sunt auditate +NoSecurityEventsAreAduited=Niciun eveniment de securitate nu este auditat. Le poţi activa din meniul %s Audit=Audit -InfoDolibarr=Despre Dolibarr -InfoBrowser=Despre Browser -InfoOS=Despre SO -InfoWebServer=Despre Server Web -InfoDatabase=Despre Baza de date +InfoDolibarr=Despre sistem +InfoBrowser=Despre browser +InfoOS=Despre sistemul de operare +InfoWebServer=Despre serverul web +InfoDatabase=Despre baza de date InfoPHP=Despre PHP -InfoPerf=Despre Performanţe +InfoPerf=Despre performanţe InfoSecurity=Despre securitate -BrowserName=Nume Browser +BrowserName=Nume browser BrowserOS=Browser OS -ListOfSecurityEvents=Lista de evenimente Dolibarr de securitate -SecurityEventsPurged=Evenimentelor de securitate epurate -LogEventDesc=Activați autentificarea pentru anumite evenimente de securitate. Administratorii se autentificaprin meniu <b> %s - %s </b>. Atenție, această caracteristică poate genera o cantitate mare de date în baza de date. -AreaForAdminOnly=Parametrii de configurare pot fi setați numai de <b> utilizatorii administratori </b>. -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 +ListOfSecurityEvents=Listă evenimente de securitate a sistemului +SecurityEventsPurged=Evenimentele de securitate au fost şterse +LogEventDesc=Activați autentificarea pentru anumite evenimente de securitate. Administratorii se autentifica prin meniul <b>%s - %s</b>. Atenție, această caracteristică poate genera o cantitate mare de date în baza de date. +AreaForAdminOnly=Parametrii de configurare pot fi setați numai de <b>utilizatorii administratori</b>. +SystemInfoDesc=Informațiile de sistem sunt informații tehnice diverse pe care le poţi accesa numai în modul citire, fiind vizibile numai pentru administratori. +SystemAreaForAdminOnly=Această zonă este disponibilă numai pentru administratori. Permisiunile utilizatorilor de sistem nu pot modifica această restricție. 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. +DisplayDesc=Parametrii care afectează aspectul şi comportamentul sistemului 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 +ToActivateModule=Pentru a activa module, du-te la zona de configurare (Acasă->Setări-Module). +SessionTimeOut=Timeout 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 <b> %s / %s </b>, 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). <br> 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=Sesiunile de pe acest server par a fi şterse, curățate de un mecanism extern (cron sub debian, ubuntu ...), probabil fiecare la fiecare <b>%s</b> secunde (=valoarea parametrului <b>session.gc_maxlifetime</b>),  \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 <b> htdocs / core / triggers </b>. Ei realizează acțiuni noi, activate la evenimentele Dolibarr (creare de noi companii, validare facturi ...). -TriggerDisabledByName=Declanşările în acest dosar sunt dezactivate <b>de-NoRun</b> sufix în numele lor. -TriggerDisabledAsModuleDisabled=Declanşările în acest dosar sunt dezactivate ca <b>modul %s</b> este dezactivat. -TriggerAlwaysActive=Declanşările în acest dosar sunt întotdeauna activ, ce sunt activate Dolibarr module. -TriggerActiveAsModuleActive=Declanşările în acest dosar sunt active ca <b>modul %s</b> este activată. +TriggersAvailable=Triggeri disponibili +TriggersDesc=Triggerele sunt fișiere care vor modifica comportamentul fluxului de lucru din sistem după copierea în directorul <b>htdocs/core/triggers</b>. Ei realizează acțiuni noi, activate de evenimentele de sistem (creare de noi companii, validare facturi ...). +TriggerDisabledByName=Trigger-ele din acest fişier sunt dezactivate de sufixul <b>-NORUN</b> din denumirea lor. +TriggerDisabledAsModuleDisabled=Triggerele din acest fişier sunt dezactivate pentru că modul <b>%s</b> este dezactivat. +TriggerAlwaysActive=Triggere-le din acest fişier sunt întotdeauna active, pe măsură ce sunt activate module. +TriggerActiveAsModuleActive=Trigger-ele din acest fişier sunt active pe măsură ce modulul <b>%s</b>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. +DictionaryDesc=Introduceți toate datele de referință. Poţii adăuga valorile tale la valorile implicite. 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 -MAIN_MAX_DECIMALS_UNIT=Nr. max. de zecimale pentru preţurile unitare -MAIN_MAX_DECIMALS_TOT=Nr. max. de zecimale pentru preţurile finale -MAIN_MAX_DECIMALS_SHOWN=Nr. max. de zecimale pentru preţurile <b> afișate pe ecran </b>. Adăugați o elipsă <b> ... </b> după acest parametru (de ex. "2 ...") dacă doriți să vedeți "<b> ... </b>" suficient pentru preţul trunchiat +LimitsSetup=Limite/Precizii +LimitsDesc=Puteți defini limite, precizii şi optimizări utilizate de sistem aici +MAIN_MAX_DECIMALS_UNIT=Nr. max. de zecimale pentru preţurile unitare +MAIN_MAX_DECIMALS_TOT=Nr. max. de zecimale pentru preţurile totale +MAIN_MAX_DECIMALS_SHOWN=Nr. max. de zecimale pentru preţurile <b>afișate pe ecran </b>. Adăugați o elipsă <b> ... </b> după acest parametru (de ex. "2 ...") dacă doriți să vedeți "<b> ... </b>" sufixat pentru preţul trunchiat MAIN_ROUNDING_RULE_TOT=Pasul intervalului de rotunjire (pentru țările în care rotunjirea se face pe altceva decât baza 10. De exemplu, puneți 0,05 dacă rotunjirea se face cu 0,05 pași) -UnitPriceOfProduct=preţul unitar net al unui produs -TotalPriceAfterRounding=Preț total (fără TVA / TVA inclus) după rotunjire -ParameterActiveForNextInputOnly=Parametru de eficient pentru următoarea intrare numai -NoEventOrNoAuditSetup=Nu a fost înregistrat niciun eveniment de securitate. Acest lucru este normal dacă Auditul nu a fost activat în pagina "Configurare - Securitate - Evenimente". +UnitPriceOfProduct=Preţul unitar net al unui produs +TotalPriceAfterRounding=Preț total (fără TVA/TVA/cu TVA) după rotunjire +ParameterActiveForNextInputOnly=Parametru efectiv numai pentru următoarea introducere +NoEventOrNoAuditSetup=Nu a fost înregistrat niciun eveniment de securitate. Acest lucru este normal dacă Auditul nu a fost activat în pagina "Setări - Securitate - Evenimente". 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 <b> completă </b> copie de rezervă a unei instalări Dolibarr necesită doi pași. +SeeLocalSendMailSetup=Vezi configurarea locală sendmail +BackupDesc=Un backup <b>complet</b> al unei instalări de sistem necesită doi pași. BackupDesc2=Copia de rezervă a conținutului directorului „documente” (<b>%s</b>) 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 (<b> %s </b>) într-un cos de gunoi. Pentru aceasta, puteți utiliza următorul asistent +BackupDesc3=Faceţi o copie de rezervă la structura și conținutul bazei de date (<b>%s</b>) într-un fişier dump. 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. -BackupPHPWarning=Copia de rezervă nu poate fi garantată prin această metodă. Copia anterioră recomandată. -RestoreDesc=Pentru a restabili o copie de rezervă Dolibarr, sunt necesari doi pași. -RestoreDesc2=Restabiliți fișierul de rezervă (de exemplu, fișierul zip) al directorului "documente" la o nouă instalație Dolibarr sau în acest director de documente actualey (<b> %s </b>). -RestoreDesc3=Restaurați structura bazei de date și datele dintr-un fișier de memorie de rezervă în baza de date a noii instalări Dolibarr sau în baza de date a instalării curente (<b> %s </b>). Avertisment, odată ce restaurarea este completă, trebuie să utilizați o autentificare care a existat din timpul instalarea copiei de rezervă pentru a vă conecta din nou. <br> Pentru a restabili baza de date a copiei de rezervă în această instalare curentă, puteți urma acest asistent. -RestoreMySQL=MySQL import -ForcedToByAModule=Această regulă este obligat <b>la %s</b> către un activat modulul +BackupDescY=Fişierul dump generat trebuie să fie stocat într-un loc sigur. +BackupPHPWarning=Copia backup nu poate fi garantată prin această metodă. Copia anterioră este recomandată. +RestoreDesc=Pentru a restabili o copie de rezervă a sistemului, sunt necesari doi pași. +RestoreDesc2=Restauraţi backup-ul (de exemplu, fișierul zip) al directorului "documente" la o nouă instalare de Dolibarr sau în acest director de documente curent (<b>%s</b>). +RestoreDesc3=Restaurați structura bazei de date și datele dintr-un fișier de backup pentru o nouă instalare de sistem sau pentru instalarea curentă (<b>%s</b>). Atenţie, odată ce restaurarea este completă, trebuie să utilizați o autentificare care a existat la momentul backup-ului. <br> Pentru a restabili baza de date din backup în această instalare , poţi urma acest asistent. +RestoreMySQL=Import MySQL +ForcedToByAModule=Această regulă este forţată la <b>%s</b> de către un modul activat ValueIsForcedBySystem=Această valoare este impusă forțat de sistem. Nu o poți schimba. -PreviousDumpFiles=Fișiere de rezervă existente +PreviousDumpFiles=Fișiere backup existente 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 <b>%s</b> utilizator. -YourPHPDoesNotHaveSSLSupport=SSL funcţii nu sunt disponibile în PHP dvs. -DownloadMoreSkins=Mai multe teme de descărcat -SimpleNumRefModelDesc=Returnează numărul de referință cu formatul%syymm-nnnn unde yy este anul, mm este luna and nnnn este secvențială fără resetare -ShowProfIdInAddress=Afișați id profesional cu adrese -ShowVATIntaInAddress=Ascunde TVA ul intracomunitar cu adrese -TranslationUncomplete=Parţială traducere -MAIN_DISABLE_METEO=Dezactivați vizualizarea meteorologică -MeteoStdMod=Mod Standard -MeteoStdModEnabled=Modul Standard activat -MeteoPercentageMod=Mod Procent -MeteoPercentageModEnabled=Modul Procent activat +YouMustRunCommandFromCommandLineAfterLoginToUser=Trebuie să rulaţi această comandă din linia de comandă shell cu utilizatorul <b>%s</b> sau adaugă opţiunea -W la sfârşitul comenzii pentru a furniza parola de <b>%s</b>. +YourPHPDoesNotHaveSSLSupport=Funcţiile SSL funcţii nu sunt disponibile în PHP. +DownloadMoreSkins=Mai multe teme de descărcat +SimpleNumRefModelDesc=Returnează numărul de referință în formatul %s yymm-nnnn unde yy este anul, mm este luna și nnnn este un număr secvențial cu incrementare automată fără resetare +ShowProfIdInAddress=Afișare id profesional cu adrese +ShowVATIntaInAddress=Ascunde cota de TVA intracomunitar cu adrese +TranslationUncomplete=Traducere parţială +MAIN_DISABLE_METEO=Dezactivare vizualizarea meteorologică +MeteoStdMod=Mod standard +MeteoStdModEnabled=Modul standard activat +MeteoPercentageMod=Mod procentual +MeteoPercentageModEnabled=Mod procentual activat MeteoUseMod=Faceți clic pentru a utiliza %s -TestLoginToAPI=Testaţi logati pentru a API -ProxyDesc=Unele caracteristici ale Dolibarr necesită acces la internet. Definiți aici parametrii conexiunii la internet, cum ar fi accesul prin intermediul unui server proxy, dacă este necesar +TestLoginToAPI=Test autentificare la API +ProxyDesc=Unele caracteristici ale sistemului necesită acces la internet. Definiți aici parametrii conexiunii la internet, cum ar fi accesul prin intermediul unui server proxy, dacă este necesar ExternalAccess=Acces Extern/Internet MAIN_PROXY_USE=Utilizați un server proxy (altfel accesul este direct la internet) -MAIN_PROXY_HOST=Server proxy: Nume/adresa +MAIN_PROXY_HOST=Server proxy: Nume/Adresă MAIN_PROXY_PORT=Server proxy: Port -MAIN_PROXY_USER=Server proxy: Autentificare/Utilizator -MAIN_PROXY_PASS=Server proxy: Parola -DefineHereComplementaryAttributes=Definiți aici orice atribute suplimentare/personalizate pe care doriți să le includeți pentru: %s +MAIN_PROXY_USER=Server proxy: Nume de autentificare/Utilizator +MAIN_PROXY_PASS=Server proxy: Parolă +DefineHereComplementaryAttributes=Definiți orice atribute suplimentare/personalizate care trebuie adăugate la: %s ExtraFields=Atribute complementare ExtraFieldsLines=Atribute complementare (linii) ExtraFieldsLinesRec=Atribute complementare (linii de șabloane de facturi) ExtraFieldsSupplierOrdersLines=Atribute complementare (linii de comandă) -ExtraFieldsSupplierInvoicesLines=Atribute complementare (linii de facturare) +ExtraFieldsSupplierInvoicesLines=Atribute complementare (linii de factură) ExtraFieldsThirdParties=Atribute complementare (terți) -ExtraFieldsContacts=Atribute complementare (contacte /adrese) +ExtraFieldsContacts=Atribute complementare (contacte/adrese) ExtraFieldsMember=Atribute complementare (membri) ExtraFieldsMemberType=Atribute complementare (tip membri) ExtraFieldsCustomerInvoices=Atribute complementare (facturi) @@ -1276,20 +1286,20 @@ ExtraFieldsCustomerInvoicesRec=Atribute complementare (șabloane facturi) ExtraFieldsSupplierOrders=Atribute complementare (comenzi) ExtraFieldsSupplierInvoices=Atribute complementare (facturi) ExtraFieldsProject=Atribute complementare (proiecte) -ExtraFieldsProjectTask=Atribute complementare (sarcini) +ExtraFieldsProjectTask=Atribute complementare (task-uri) 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). -PathToDocuments=Cale de acces documente +AlphaNumOnlyLowerCharsAndNoSpace=numai caractere minuscule, alfanumerice fără spaţiu +SendmailOptionNotComplete=Atenţie, pe unele sisteme Linux, pentru a trimite email, configurarea de execuţie sendmail trebuie să conţină opţiunea -ba (parametrul mail.force_extra_parameters în fişierul php.ini). Dacă unii din destinatari nu primesc email-urile deloc, încearcă să editezi acest parametru PHP cu mail.force_extra_parameters = -ba). +PathToDocuments=Cale documente PathDirectory=Director -SendmailOptionMayHurtBuggedMTA=Funcția de trimitere a e-mailurilor utilizând metoda "PHP mail direct" va genera un mesaj pe e-mail care ar putea să nu fie analizat corect de către unele servere de e-mail . Rezultatul este că unele e-mailuri nu pot fi citite de persoanele găzduite de acele platforme cu probleme. Acesta este cazul pentru unii furnizori de Internet (Ex: Orange în Franța). Aceasta nu este o problemă cu Dolibarr sau PHP, ci cu serverul de mail. Cu toate acestea, puteți adăuga o opțiune MAIN_FIX_FOR_BUGGED_MTA la 1 din Setup - Other pentru a modifica Dolibarr pentru a evita acest lucru. Cu toate acestea, este posibil să întâmpinați probleme cu alte servere care utilizează strict standardul SMTP. Cealaltă soluție (recomandată) este utilizarea metodei "SMTP socket library" care nu are dezavantaje. -TranslationSetup=Configurarea traducerii +SendmailOptionMayHurtBuggedMTA=Funcția de trimitere a e-mailurilor utilizând metoda "PHP mail direct" va genera un mesaj email care ar putea să nu fie analizat corect de către unele servere de email . Rezultatul este că unele email-uri nu pot fi citite de persoanele găzduite de acele platforme cu probleme. Acesta este cazul pentru unii furnizori de Internet (Ex: Orange în Franța). Aceasta nu este o problemă de sistem sau de PHP, ci cu server-ul de mail. Cu toate acestea, puteți adăuga o opțiune MAIN_FIX_FOR_BUGGED_MTA la 1 din Setări - Alte setări ca Dolibarr să poată evita acest lucru. Cu toate acestea, este posibil să întâmpinați probleme cu alte servere care utilizează strict standardul SMTP. Cealaltă soluție (recomandată) este utilizarea metodei "SMTP socket library" care nu are aceste dezavantaje. +TranslationSetup=Configurare traducere TranslationKeySearch=Căutați o cheie sau un șir de traducere TranslationOverwriteKey=Suprascrieți un șir de traducere -TranslationDesc=Cum pentru a seta limba de afișare: <br> * Default / systemwide: menu <strong>Acasă -> Configurare-> Afișaj </strong> <br> * Per utilizator: Faceți clic pe numele utilizatorului în partea de sus a ecranului și modificați fila <strong> Afișare utilizator Setare </strong> pe card de utilizator. -TranslationOverwriteDesc=Puteți, de asemenea, să înlocuiți șiruri de caractere care completează urmatorul tabel . Alegeți limba dvs. din meniul derulant "%s", inserați șirul de chei de traducere în "%s" si noua dvs. traducere în "%s" -TranslationOverwriteDesc2=Puteți utiliza cealaltă filă pentru a vă ajuta să aflați ce cheie de traducere trebuie să se utilizeze +TranslationDesc=Cum se setează limba de afișare: <br>* Implicit/Pentru tot sistemul: meniul <strong>Acasă -> Setări -> Afișare</strong> <br>* Per utilizator: Clic pe numele utilizatorului în partea de sus a ecranului și modificați fila <strong>Setări afișare utilizator</strong> din fişa de utilizator. +TranslationOverwriteDesc=Poți, de asemenea, să înlocuieşti șiruri de caractere care completează următorul tabel . Alege limba ta din meniul derulant "%s", inserează șirul cheie de traducere în "%s" şi noua ta traducere în "%s" +TranslationOverwriteDesc2=Puteți utiliza cealaltă filă pentru a te ajuta să afli ce cheie de traducere trebuie să se utilizeze TranslationString=Șir de traducere CurrentTranslationString=Șirul de traducere curent WarningAtLeastKeyOrTranslationRequired=Un criteriu de căutare este necesar cel puțin pentru o cheie sau un șir de traducere @@ -1301,8 +1311,8 @@ TotalNumberOfActivatedModules=Module activate: <b>%s</b> / <b>%s</b> YouMustEnableOneModule=Trebuie activat cel puţin 1 modul ClassNotFoundIntoPathWarning=Clasa %s nu a fost găsită în calea PHP YesInSummer=Da în vară -OnlyFollowingModulesAreOpenedToExternalUsers=Rețineți că numai următoarele module sunt disponibile pentru utilizatorii externi (indiferent de permisiunile unor astfel de utilizatori) și numai dacă sunt acordate permisiuni:<br> -SuhosinSessionEncrypt=Stocarea sesiune criptată prin Suhosin +OnlyFollowingModulesAreOpenedToExternalUsers=Rețineți că doar următoarele module sunt disponibile pentru utilizatorii externi (indiferent de permisiunile acestora) și numai dacă sunt acordate permisiunile următoare:<br> +SuhosinSessionEncrypt=Stocare 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. @@ -1314,240 +1324,241 @@ BrowserIsOK=Utilizați browserul web %s. Acest browser este ok pentru securitate 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=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.<br> 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).<br> 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". +AddRefInList=Afișează lista cu informaţii Client/Furnizor (listă de selecţie sau combo) și cea mai mare parte a hiperlinkului.<br> Terții vor apărea în formatul "CC12345 - SC45678 - Marea companie SRL". în loc de "Marea companie SRL". +AddAdressInList=Afișați adresa în lista clientului/furnizorului (listă de selecție sau combo).<br> Terții vor apărea cu numele formatat la "Big Company corp - 21 jump street 123456 Big city - USA" în loc de "Big Company corp". AddEmailPhoneTownInContactList=Afișați adresa de email de contact (sau telefoanele dacă nu este definită) și lista cu orașe (lista combo sau caseta combinată)<br> Contactele vor apărea cu formatul de nume "Dupond Durand - dupond.durand@email.com - Paris" sau "Dupond Durand - 06 07 59 65 66 - Paris" în loc de "Dupond Durand". -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 +AskForPreferredShippingMethod=Solicitați o metodă de transport agreată cu terţii. +FieldEdition=Editarea câmpului %s +FillThisOnlyIfRequired=Exemplu: +2 (completați numai dacă există probleme cu decalajul de fus orar) +GetBarCode=Preia cod de bare NumberingModules=Modele de numerotare DocumentModules=Şabloane documente ##### Module password generation PasswordGenerationStandard=Returnați o parolă generată conform algoritmului intern Dolibarr: %scaractere numere și litere mici. -PasswordGenerationNone=Nu sugerați o parolă generată. Parola trebuie introdusă manual. -PasswordGenerationPerso=Returnați o parolă în funcție de configurația dvs. personal definită. -SetupPerso=În funcție de configurația dvs. +PasswordGenerationNone=Nu sugera o parolă generată. Parola trebuie introdusă manual. +PasswordGenerationPerso=Returnați o parolă în funcție de configurația ta personalizată. +SetupPerso=În funcție de configurația ta PasswordPatternDesc=Descrierea modelului de parolă ##### Users setup ##### 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 +UsersSetup=Configurare modul Utilizatori +UserMailRequired=Emailul este necesar pentru crearea unui utilizator nou 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 ##### -CompanySetup=Setări Modul Terţi +CompanySetup=Setări modul Terţi CompanyCodeChecker=Opțiuni pentru generarea automată a codurilor de client/furnizor AccountCodeManager=Opțiuni pentru generarea automată a codurilor contabile de client/furnizor -NotificationsDesc=Anunțurile prin e-mail pot fi trimise automat pentru unele evenimente Dolibarr. <br> Destinatarii notificărilor pot fi definiți: -NotificationsDescUser=* pe utilizator, câte un utilizator la un moment dat. -NotificationsDescContact=* pe contacte terți (clienți sau furnizori), câte un contact la un moment dat -NotificationsDescGlobal=* sau prin setarea adreselor globale de e-mail în această pagină de configurare +NotificationsDesc=Notificările prin email pot fi trimise automat pentru unele evenimente din sistem.<br> Destinatarii notificărilor pot fi definiți: +NotificationsDescUser=* per utilizator, câte un utilizator la un moment dat. +NotificationsDescContact=* per contacte terți (clienți sau furnizori), câte un contact la un moment dat +NotificationsDescGlobal=* sau prin setarea adreselor globale de email în această pagină de configurare ModelModules=Șabloane de documente -DocumentModelOdt=Generați documente din șabloanele OpenDocument (fișiere .ODT / .ODS de la LibreOffice, OpenOffice, KOffice, TextEdit, ...) -WatermarkOnDraft=Watermark pe schiţa de document -JSOnPaimentBill=Activaţi funcţia de autocompletare a liniilor de plata pe formularul de plată +DocumentModelOdt=Generați documente din șabloanele OpenDocument (fișiere .ODT / .ODS din LibreOffice, OpenOffice, KOffice, TextEdit, ...) +WatermarkOnDraft=Watermark pe documentul schiţă +JSOnPaimentBill=Activaţi funcţia de autocompletare a liniilor de plată pe formularul de plată CompanyIdProfChecker=Reguli pentru ID-uri profesionale -MustBeUnique=Trebuie sa fie unic? +MustBeUnique=Trebuie să fie unic? MustBeMandatory=Obligatoriu pentru a crea terți (dacă TVA-ul sau tipul de companie este definit)? MustBeInvoiceMandatory=Este obligatorie validarea facturilor? TechnicalServicesProvided=Servicii tehnice furnizate #####DAV ##### -WebDAVSetupDesc=Acesta este linkul pentru a accesa directorul WebDAV. Acesta conține un director "public" deschis oricărui utilizator care cunoaște adresa URL (dacă este permis accesul la un director public) și un director "privat" care are nevoie de un cont de acces / parolă existent pentru acces. -WebDavServer=Rădăcina URL a %s: serverului %s +WebDAVSetupDesc=Acesta este linkul de acces la directorul WebDAV. Acesta conține un director "public" deschis oricărui utilizator care cunoaște adresa URL (dacă este permis accesul la un director public) și un director "privat" care are nevoie de un cont de acces/parolă existent. +WebDavServer=URL-ul rădăcină %s pentru serverul: %s ##### Webcal setup ##### -WebCalUrlForVCalExport=O export se leagă de <b>format %s</b> este disponibil la următoarea adresă: %s +WebCalUrlForVCalExport=Un export asociat la formatul <b>%s</b> este disponibil la următoarea adresă: %s ##### Invoices ##### -BillsSetup=Facturi modul de configurare -BillsNumberingModule=Facturi şi note de credit, modul de numerotare -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 +BillsSetup=Configurare modul Facturi +BillsNumberingModule=Mod de numerotare Facturi şi note de credit +BillsPDFModules=Şabloane documente Factura +BillsPDFModulesAccordindToInvoiceType=Şabloane documente tip factură în funcție de tipul de factură +PaymentsPDFModules=Şabloane documente de plată +ForceInvoiceDate=Forţează data facturii la data de validare 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 -WatermarkOnDraftInvoices=Filigranul pe facturile schiţă (niciunul daca e gol) +SuggestPaymentByChequeToAddress=Sugerați plata de prin cec la +FreeLegalTextOnInvoices=Text liber pe facturi +WatermarkOnDraftInvoices=Filigranul pe facturile schiţă (niciunul dacă e gol) PaymentsNumberingModule=Model de numerotare a plăților -SuppliersPayment=Plățile furnizorului -SupplierPaymentSetup=Configurarea plăților furnizorului +SuppliersPayment=Plăți furnizori +SupplierPaymentSetup=Configurare plăți furnizor ##### Proposals ##### -PropalSetup=Modul configurare Oferte Comerciale -ProposalsNumberingModules=Modele numerotare Oferte Comerciale -ProposalsPDFModules=Modele documente Oferte Comerciale +PropalSetup=Configurare modul Oferte Comerciale +ProposalsNumberingModules=Modele numerotare Oferte comerciale +ProposalsPDFModules=Şabloane documente Oferte comerciale 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 +BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Cere contul bancar de destinație pe ofertă ##### SupplierProposal ##### -SupplierProposalSetup=Configurarea modului de cerere de ofertă de la furnizor -SupplierProposalNumberingModules=Numerotarea modului de cerere de ofertă de la furnizor -SupplierProposalPDFModules=Modele de documente de tip cerere de ofertă -FreeLegalTextOnSupplierProposal=Textul liber pe cererile de ofertă de la furnizori -WatermarkOnDraftSupplierProposal=Watermark privind furnizorii de cereri de ofertă (nu este cazul dacă este gol) -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Cereţi contul bancar al beneficiarului în cazul unei cereri de ofertă -WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Cereţi sursa depozitului pentru comandă +SupplierProposalSetup=Configurare modul Cerere de ofertă de la furnizor +SupplierProposalNumberingModules=Model de numerotare pentru cererile de preţuri la furnizori +SupplierProposalPDFModules=Şabloane documente de tip cerere de preţ la furnizori +FreeLegalTextOnSupplierProposal=Text liber pe cererile de preţ la furnizori +WatermarkOnDraftSupplierProposal=Watermark pe cererile de preţ la furnizor schiţă (nu se aplică dacă nu se completează) +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Solicită contul bancar destinaţie în cazul unei cereri de preţ +WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Cereţi depozitul sursă pentru comandă ##### Suppliers Orders ##### BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Cereţi contul bancar al beneficiarului unei comenzi de achiziție ##### Orders ##### 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 -FreeLegalTextOnOrders=Free text de pe ordinele de -WatermarkOnDraftOrders=Filigranul pe comenzile schiţă (niciunul daca e gol) -ShippableOrderIconInList=Adaugă un icon în lista Comenzilor care indica daca comanda este expediabilă -BANK_ASK_PAYMENT_BANK_DURING_ORDER=Cere contul bancar destinație al comenzii +OrdersNumberingModules=Modele de numerotare comenzi +OrdersModelModule=Şabloane documente comenzi +FreeLegalTextOnOrders=Text liber pe comenzi +WatermarkOnDraftOrders=Watermark pe comenzile schiţă (niciunul dacă e gol) +ShippableOrderIconInList=Adaugă un icon în lista Comenzilor care indică dacă comanda este livrabilă +BANK_ASK_PAYMENT_BANK_DURING_ORDER=Solicită contul bancar destinație al comenzii ##### Interventions ##### -InterventionsSetup=Intervenţii de modul de configurare -FreeLegalTextOnInterventions=Textul gratuit pe documente de intervenţie -FicheinterNumberingModules=Modulele de intervenţie de numerotare -TemplatePDFInterventions=Modele documente fişă intervenţie -WatermarkOnDraftInterventionCards=Filigranul pe documentele fişelor de intervenţie (niciunul daca e gol) +InterventionsSetup=Configurare modul Intervenţii +FreeLegalTextOnInterventions=Text liber pe documentele de intervenţie +FicheinterNumberingModules=Modele de numerotare pentru intervenţie +TemplatePDFInterventions=Şabloane documente Fişă intervenţie +WatermarkOnDraftInterventionCards=Filigranul pe documentele fişelor de intervenţie (niciunul dacă e gol) ##### Contracts ##### -ContractsSetup=Configurare modul Contracte / Abonamente -ContractsNumberingModules=Contracte de numerotare module -TemplatePDFContracts=Modele documente contracte -FreeLegalTextOnContracts=Free text pe contracte -WatermarkOnDraftContractCards=Filigranul pe contractele ciornă (niciunul daca e gol) +ContractsSetup=Configurare modul Contracte/Abonamente +ContractsNumberingModules=Modele numerotare Contracte +TemplatePDFContracts=Şaboane documente contracte +FreeLegalTextOnContracts=Text liber pe contracte +WatermarkOnDraftContractCards=Filigranul de pe contractele schiţă (niciunul dacă nu se completează) ##### Members ##### -MembersSetup=Membrii modul de configurare -MemberMainOptions=Principalele opţiuni -AdherentLoginRequired= Gestiona un Autentificare pentru fiecare membru -AdherentMailRequired=E-mail necesar pentru a crea un nou membru -MemberSendInformationByMailByDefault=Validare pentru a trimite mail de confirmare a membrilor este în mod implicit +MembersSetup=Configurare modul Membri +MemberMainOptions=Opţiuni principale +AdherentLoginRequired= Gestionează autentificarea pentru fiecare membru +AdherentMailRequired=Emailul este necesar pentru a crea un nou membru +MemberSendInformationByMailByDefault=Opţiunea de a trimite email de confirmare a membrilor(validare sau confirmare adeziune) este activă în mod implicit VisitorCanChooseItsPaymentMode=Vizitatorul poate alege din modurile disponibile de plată -MEMBER_REMINDER_EMAIL=Activați memento automat <b> prin email </b> de abonamente expirate. Notă: Modul <strong> %s </strong> trebuie să fie activat and setat corect pentru a trimite mementouri. +MEMBER_REMINDER_EMAIL=Activați reminder automat <b>prin email</b> pentru adeziunile expirate. Notă: Modul <strong>%s</strong> trebuie să fie activat and setat corect pentru a trimite remindere. MembersDocModules=Șabloane documente pentru documentele generate din înregistrarea membrilor ##### LDAP setup ##### -LDAPSetup=LDAP Setup -LDAPGlobalParameters=Global parametrii +LDAPSetup=Configurare LDAP +LDAPGlobalParameters=Parametri globali LDAPUsersSynchro=Utilizatori LDAPGroupsSynchro=Grupuri LDAPContactsSynchro=Contacte LDAPMembersSynchro=Membri -LDAPMembersTypesSynchro=Tipuri Membri -LDAPSynchronization=LDAP de sincronizare -LDAPFunctionsNotAvailableOnPHP=LDAP funcţii nu sunt availbale pe PHP +LDAPMembersTypesSynchro=Tipuri membri +LDAPSynchronization=Sincronizare LDAP +LDAPFunctionsNotAvailableOnPHP=Funcţiile LDAP nu sunt disponibile în PHP LDAPToDolibarr=LDAP -> Dolibarr DolibarrToLDAP=Dolibarr -> LDAP LDAPNamingAttribute=Cheie în LDAP -LDAPSynchronizeUsers=Sincronizaţi Dolibarr utilizatorii cu LDAP -LDAPSynchronizeGroups=Sincronizaţi Dolibarr grupuri cu LDAP -LDAPSynchronizeContacts=Sincronizaţi Dolibarr contacte cu LDAP -LDAPSynchronizeMembers=Sincronizarea membrilor Dolibarr Fundaţia modulul cu LDAP +LDAPSynchronizeUsers=Organizare utilizatori în LDAP +LDAPSynchronizeGroups=Organizare grupuri în LDAP +LDAPSynchronizeContacts=Organizare contacte în LDAP +LDAPSynchronizeMembers=Organizare membri fundaţie în LDAP LDAPSynchronizeMembersTypes=Organizarea tipurilor de membri ai fundației în LDAP -LDAPPrimaryServer=Primar server -LDAPSecondaryServer=Secundar server +LDAPPrimaryServer=Server primar +LDAPSecondaryServer=Server secundar LDAPServerPort=Port server -LDAPServerPortExample=Portul implicit: 389 -LDAPServerProtocolVersion=Protocol versiunea +LDAPServerPortExample=Port implicit: 389 +LDAPServerProtocolVersion=Versiune protocol LDAPServerUseTLS=Utilizaţi TLS -LDAPServerUseTLSExample=Parerea LDAP server utilizează TLS +LDAPServerUseTLSExample=Serverul tău LDAP utilizează TLS LDAPServerDn=Server DN LDAPAdminDn=Administrator DN -LDAPAdminDnExample=Completati DN (de ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com pentru directorul activ) +LDAPAdminDnExample=Completati DN (de ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com pentru Active Directory) LDAPPassword=Parolă de administrator LDAPUserDn=Users' DN -LDAPUserDnExample=Complete DN (ex: ou=users,dc=society,dc=Finalizarea DN (ex: ou= users, dc= societate, dc= com) -LDAPGroupDn=Grupuri 'DN -LDAPGroupDnExample=Complete DN (ex: ou=groups,dc=society,dc=Finalizarea DN (ex: ou= grupuri, dc= societate, dc= com) -LDAPServerExample=Adresa serverului (ex: localhost, 192.168.0.2, ldaps: / / ldap.example.com /) -LDAPServerDnExample=Complete DN (ex: dc=company,dc=Finalizarea DN (ex: dc= companie, dc= com) -LDAPDnSynchroActive=Utilizatori şi grupuri de sincronizare -LDAPDnSynchroActiveExample=LDAP a Dolibarr sau Dolibarr la LDAP de sincronizare -LDAPDnContactActive=Contacte "sincronizare -LDAPDnContactActiveExample=Activat / Unactivated de sincronizare -LDAPDnMemberActive=Membrilor de sincronizare -LDAPDnMemberActiveExample=Activat / Unactivated de sincronizare -LDAPDnMemberTypeActive=Sincronizarea tipurilor de membri -LDAPDnMemberTypeActiveExample=Activat / Unactivated de sincronizare -LDAPContactDn=Dolibarr contacte 'DN -LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=society,dc=Finalizarea DN (ex: ou= contacte, dc= societate, dc= com) -LDAPMemberDn=Dolibarr membrilor DN -LDAPMemberDnExample=Complete DN (ex: ou=members,dc=society,dc=Finalizarea DN (ex: ou= membri, dc= societate, dc= com) -LDAPMemberObjectClassList=Lista de objectClass -LDAPMemberObjectClassListExample=Lista de objectClass definirea record atributele (ex: top, inetOrgPerson sau de sus, utilizatorul pentru Active Directory) -LDAPMemberTypeDn=Membrii Dolibarr tip DN -LDAPMemberTypepDnExample=DN complet (ex: ou = tipuridemembri, dc = exemplu, dc = com) -LDAPMemberTypeObjectClassList=Lista de objectClass -LDAPMemberTypeObjectClassListExample=Lista de objectClass definirea record atributele (ex: top, groupOfUniqueNames) +LDAPUserDnExample=FQDN (ex: ou= users, dc= societate, dc= com) +LDAPGroupDn=Grupuri DN +LDAPGroupDnExample=FQDN (ex: ou=groups,dc=example,dc=com) +LDAPServerExample=Adresa serverului (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/) +LDAPServerDnExample=FQDN (ex: dc=example,dc=com) +LDAPDnSynchroActive=Sincronizare de utilizatori şi grupuri +LDAPDnSynchroActiveExample=Sincronizare LDAP către Dolibarr sau Dolibarr către LDAP +LDAPDnContactActive=Sincronizare contacte +LDAPDnContactActiveExample=Sicronizare activată/neactivată +LDAPDnMemberActive=Sincronizare membri +LDAPDnMemberActiveExample=Sincronizare activată/dezactivată +LDAPDnMemberTypeActive=Sincronizare tipuri de membri +LDAPDnMemberTypeActiveExample=Sinconizare activată/dezactivată +LDAPContactDn=DN contacte Dolibarr +LDAPContactDnExample=FQDN (ex: ou=contacts,dc=example,dc=com) +LDAPMemberDn=DN membri Dolibarr +LDAPMemberDnExample= FQDN (ex: ou=members,dc=example,dc=com) +LDAPMemberObjectClassList=Listă objectClass +LDAPMemberObjectClassListExample=Lista de objectClass care definesc atributele înregistrării (ex: top,inetOrgPerson or top,user pentru Active Directory) +LDAPMemberTypeDn=DN tip membri Dolibarr +LDAPMemberTypepDnExample=FQDN (ex: ou=memberstypes,dc=example,dc=com) +LDAPMemberTypeObjectClassList=Listă objectClass +LDAPMemberTypeObjectClassListExample=Lista de objectClass care definesc înregistrările atribut (ex: top, groupOfUniqueNames) LDAPUserObjectClassList=Lista de objectClass -LDAPUserObjectClassListExample=Lista de objectClass definirea record atributele (ex: top, inetOrgPerson sau de sus, utilizatorul pentru Active Directory) +LDAPUserObjectClassListExample=Lista objectClass care definesc atributele înregistrării (ex: top, inetOrgPerson sau top, utilizatorul pentru Active Directory) LDAPGroupObjectClassList=Lista de objectClass -LDAPGroupObjectClassListExample=Lista de objectClass definirea record atributele (ex: top, groupOfUniqueNames) -LDAPContactObjectClassList=Lista de objectClass -LDAPContactObjectClassListExample=Lista de objectClass definirea record atributele (ex: top, inetOrgPerson sau de sus, utilizatorul pentru Active Directory) +LDAPGroupObjectClassListExample=Lista objectClass care definesc atributele înregistrării(ex: top, groupOfUniqueNames) +LDAPContactObjectClassList=Listă objectClass +LDAPContactObjectClassListExample=Lista de objectClass care definesc înregistrările atribut (ex: top, inetOrgPerson sau top, user pentru Active Directory) LDAPTestConnect=Test conexiune LDAP -LDAPTestSynchroContact=Test de contact de sincronizare -LDAPTestSynchroUser=Test de utilizator de sincronizare -LDAPTestSynchroGroup=Test de sincronizare a grupului -LDAPTestSynchroMember=Test membru de sincronizare -LDAPTestSynchroMemberType=Testați sincronizarea de tip membru +LDAPTestSynchroContact=Test sincronizare contacte +LDAPTestSynchroUser=Test sincronizare utilizator +LDAPTestSynchroGroup=Test sincronizare grup +LDAPTestSynchroMember=Test sincronizare membru +LDAPTestSynchroMemberType=Testați sincronizare tip membru LDAPTestSearch= Test căutare LDAP LDAPSynchroOK=Sincronizare încercare reuşită LDAPSynchroKO=Eşuare încercare de sincronizare -LDAPSynchroKOMayBePermissions=Testul de sincronizare eșuat. Verificați că conexiunea la server este corect configurată și permite actualizarea LDAP -LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=TCP se conecteze la serverul LDAP de succes (Server= %s, port= %s) -LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=TCP se conecteze la serverul LDAP a eşuat (Server= %s, port= %s) +LDAPSynchroKOMayBePermissions=Testul de sincronizare a eșuat. Verificați dacă conexiunea la server este corect configurată și permite actualizarea LDAP +LDAPTCPConnectOK=Conectare TCP la serverul LDAP cu succes (Server=%s, Port=%s) +LDAPTCPConnectKO=Conectare TCP la serverul LDAP eşuată (Server= %s, port= %s) LDAPBindOK=Conectare/Autentificare la serverul LDAP cu succes (Server = %s, Port = %s, Admin = %s, Parolă= %s) -LDAPBindKO=Conectare/Autentificare la serverul LDAP eșuată (Server = %s, Port = %s, Admin = %s, Parolă= %s) -LDAPSetupForVersion3=LDAP server configurat pentru versiunea 3 -LDAPSetupForVersion2=LDAP server configurat pentru versiunea 2 -LDAPDolibarrMapping=Dolibarr Mapping -LDAPLdapMapping=LDAP Mapping +LDAPBindKO=Conectare/Autentificare la server-ul LDAP eșuată (Server = %s, Port = %s, Admin = %s, Parolă= %s) +LDAPSetupForVersion3=Server LDAP configurat pentru versiunea 3 +LDAPSetupForVersion2=Server LDAPconfigurat pentru versiunea 2 +LDAPDolibarrMapping=Mapare Dolibarr +LDAPLdapMapping=Mapare LDAP LDAPFieldLoginUnix=Login (Unix) -LDAPFieldLoginExample=Examplu: uid -LDAPFilterConnection=Cautati filtru -LDAPFilterConnectionExample=Examplu: & (objectClass = inetOrgPerson) +LDAPFieldLoginExample=Exemplu: uid +LDAPFilterConnection=Filtru de căutare +LDAPFilterConnectionExample=Exemplu: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Exemplu: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) -LDAPFieldLoginSambaExample=Examplu: samaccountname -LDAPFieldFullname=Prenume Nume -LDAPFieldFullnameExample=Examplu: cn +LDAPFieldLoginSambaExample=Exemplu: samaccountname +LDAPFieldFullname=Nume complet +LDAPFieldFullnameExample=Exemplu: cn LDAPFieldPasswordNotCrypted=Parola nu este criptată LDAPFieldPasswordCrypted=Parolă criptată -LDAPFieldPasswordExample=Examplu: userPassword -LDAPFieldCommonNameExample=Examplu: cn +LDAPFieldPasswordExample=Exemplu: userPassword +LDAPFieldCommonNameExample=Exemplu: cn LDAPFieldName=Nume -LDAPFieldNameExample=Examplu: sn +LDAPFieldNameExample=Exemplu: sn LDAPFieldFirstName=Prenume -LDAPFieldFirstNameExample=Examplu: givenName -LDAPFieldMail=Adresa de e-mail -LDAPFieldMailExample=Examplu: mail -LDAPFieldPhone=Numărul de telefon profesional -LDAPFieldPhoneExample=Examplu: telephonenumber -LDAPFieldHomePhone=Personale numărul de telefon -LDAPFieldHomePhoneExample=Examplu: homephone +LDAPFieldFirstNameExample=Exemplu: givenName +LDAPFieldMail=Adresă email +LDAPFieldMailExample=Exemplu: mail +LDAPFieldPhone=Nr. telefon profesional +LDAPFieldPhoneExample=Exemplu: telephonenumber +LDAPFieldHomePhone=Numărul de telefon personal +LDAPFieldHomePhoneExample=Exemplu: homephone LDAPFieldMobile=Telefon celular -LDAPFieldMobileExample=Examplu: mobile -LDAPFieldFax=Număr de fax -LDAPFieldFaxExample=Examplu: facsimiletelephonenumber -LDAPFieldAddress=Strada -LDAPFieldAddressExample=Examplu: stradă +LDAPFieldMobileExample=Exemplu: mobile +LDAPFieldFax=Nr de fax +LDAPFieldFaxExample=Exemplu: facsimiletelephonenumber +LDAPFieldAddress=Stradă +LDAPFieldAddressExample=Exemplu: stradă LDAPFieldZip=Zip -LDAPFieldZipExample=Examplu: postalcode +LDAPFieldZipExample=Exemplu: postalcode LDAPFieldTown=Oraş -LDAPFieldTownExample=Examplu: l +LDAPFieldTownExample=Exemplu: l LDAPFieldCountry=Ţară LDAPFieldDescription=Descriere -LDAPFieldDescriptionExample=Examplu: descriere -LDAPFieldNotePublic=Note Publice -LDAPFieldNotePublicExample=Examplu: publicnote -LDAPFieldGroupMembers= Membrii grupului -LDAPFieldGroupMembersExample= Examplu: uniqueMember +LDAPFieldDescriptionExample=Exemplu: descriere +LDAPFieldNotePublic=Note publice +LDAPFieldNotePublicExample=Exemplu: publicnote +LDAPFieldGroupMembers= Membri grup +LDAPFieldGroupMembersExample= Exemplu: uniqueMember LDAPFieldBirthdate=Data naşterii LDAPFieldCompany=Companie -LDAPFieldCompanyExample=Examplu: o +LDAPFieldCompanyExample=Exemplu: o LDAPFieldSid=SID -LDAPFieldSidExample=Examplu: objectsid -LDAPFieldEndLastSubscription=Data de sfârşit de abonament +LDAPFieldSidExample=Exemplu: objectsid +LDAPFieldEndLastSubscription=Data de sfârşit abonament LDAPFieldTitle=Funcţie -LDAPFieldTitleExample=Examplu: titlu +LDAPFieldTitleExample=Exemplu: titlu LDAPFieldGroupid=Id grup LDAPFieldGroupidExample=Exemplu : gidnumber LDAPFieldUserid=Id utilizator @@ -1555,362 +1566,364 @@ 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. -LDAPDescUsers=Această pagină vă permite să definiţi numele atribute LDAP LDAP în copac pentru fiecare date găsite pe Dolibarr utilizatori. -LDAPDescGroups=Această pagină vă permite să definiţi numele atribute LDAP LDAP în copac pentru fiecare date găsite pe Dolibarr grupuri. -LDAPDescMembers=Această pagină vă permite să definiţi numele atribute LDAP LDAP în copac pentru fiecare găsit date cu privire la modul de Dolibarr membri. -LDAPDescMembersTypes=Această pagină vă permite să definiți numele atributelor LDAP în arborele LDAP pentru fiecare dată găsită pe tipurile de membri Dolibarr. -LDAPDescValues=Exemplu de valori sunt proiectate pentru <b>OpenLDAP</b> încărcate cu următoarele scheme: <b>core.schema, cosine.schema, inetorgperson.schema).</b> Dacă utilizaţi thoose valori şi OpenLDAP, vă modifica LDAP fişier de configurare <b>slapd.conf</b> de a avea toate thoose scheme încărcate. +LDAPSetupNotComplete=Configurarea LDAP nu este completă (mergi şi pe celelalte file) +LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Contul de administrator sau parola nu au fost furnizate. Accesul LDAP va fi anonim şi doar în modul citire. +LDAPDescContact=Această pagină vă permite să definiţi numele atributelor LDAP în arborele LDAP pentru datele găsite în contactele Dolibarr. +LDAPDescUsers=Această pagină vă permite să definiţi numele atributelor LDAP în arborele LDAP pentru datele găsite în utilizatorii Dolibarr. +LDAPDescGroups=Această pagină vă permite să definiţi numele de atribute LDAP în arborele LDAP pentru datele găsite în grupurile Dolibarr. +LDAPDescMembers=Această pagină vă permite să definiţi numele atributelor LDAP în arborele LDAP pentru datele din modulul membri Dolibarr. +LDAPDescMembersTypes=Această pagină îţi permite să defineşti numele atributelor LDAP în arborele LDAP pentru fiecare dată găsită pe tipurile de membri Dolibarr. +LDAPDescValues=Exemplu de valori care sunt proiectate pentru <b>OpenLDAP</b> încărcate cu următoarele scheme: <b>core.schema, cosine.schema, inetorgperson.schema).</b> Dacă utilizezi aceste valori şi OpenLDAP, modifică fişierul de configurare LDAP <b>slapd.conf</b> pentru a avea toate aceste scheme încărcate. ForANonAnonymousAccess=Pentru un acces autentificat (pentru o scriere de exemplu) -PerfDolibarr=Raport performanţă setări/optimizări -YouMayFindPerfAdviceHere=Această pagină oferă unele verificări sau sfaturi legate de performanță. +PerfDolibarr=Configurare performanţă/raport optimizări +YouMayFindPerfAdviceHere=Această pagină oferă unele verificări sau sfaturi de îmbunătăţire a performanței. NotInstalled=Neinstalat NotSlowedDownByThis=Nu este încetinit de aceasta NotRiskOfLeakWithThis=Nu există riscul de divulgare cu aceasta. ApplicativeCache=Cache aplicativ -MemcachedNotAvailable=Niciun cache aplicatie găsit. Puteți îmbunătăți performanța prin instalarea unui server de cache memcached și un modul capabil de a utiliza acest server cache. <br>Mai multe informatii aici <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.\n<br>Rețineți că o mulțime de furnizor de web hosting nu oferă astfel de server de cache. -MemcachedModuleAvailableButNotSetup=Modulul memcahed pentru aplicarea cache este găsit dar nu este configurat complet -MemcachedAvailableAndSetup=Modulul Memcached pentru a utiliza serverul memcached este activat. +MemcachedNotAvailable=Niciun cache aplicabil nu a fost găsit. Poți îmbunătăți performanța prin instalarea unui server de cache memcached și unui modul capabil de a utiliza acest server cache. <br>Mai multe informaţii aici <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Reține că o mulțime de furnizori de găzduire web nu oferă astfel de server de cache. +MemcachedModuleAvailableButNotSetup=Modulul memcahed pentru aplicare cache a fost găsit dar nu este complet configurat. +MemcachedAvailableAndSetup=Modulul Memcached dedicat utilizării cu serverul memcached este activat. OPCodeCache=Cache OPCode -NoOPCodeCacheFound=Nu a fost găsită o memorie cache OPCode. Poate că utilizați o memorie cache OPCode, alta decât XCache sau eAccelerator (bună), sau poate că nu aveți memorie OPCode cache (foarte rău). -HTTPCacheStaticResources=HTTP cache pentru resursele statice (CSS, img, javascript) +NoOPCodeCacheFound=Nu a fost găsită o memorie cache OPCode. Poate că utilizezi o memorie cache OPCode, alta decât XCache sau eAccelerator (bună), sau poate că nu ai memorie cache OPCode (foarte rău). +HTTPCacheStaticResources=Cache HTTP pentru resursele statice (css, img, javascript) FilesOfTypeCached=Fișierele de tip %s sunt puse în cache de serverul HTTP FilesOfTypeNotCached=Fișierele de tip %s nu sunt puse în cache de serverul HTTP FilesOfTypeCompressed=Fișierele de tip %s sunt comprimate de serverul HTTP FilesOfTypeNotCompressed=Fișierele de tip %s nu sunt comprimate de serverul HTTP CacheByServer=Cache pe server -CacheByServerDesc=De exemplu, utilizând directiva Apache "ExpiresByType image / gif A2592000" -CacheByClient=Cache pe browser -CompressionOfResources=Compresie a răspunsului HTTP +CacheByServerDesc=De exemplu, utilizând directiva Apache "ExpiresByType image/gif A2592000" +CacheByClient=Cache în browser +CompressionOfResources=Compresie răspunsuri HTTP CompressionOfResourcesDesc=De exemplu, utilizând directiva Apache "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=O astfel de detectare automată nu este posibilă cu browserele curente DefaultValuesDesc=Aici puteți defini valoarea implicită pe care doriți să o utilizați când creați o nouă înregistrare, şi/sau filtrele implicite sau ordinea de sortare când listați înregistrările. -DefaultCreateForm=Valorile implicite (de utilizat pe formulare) -DefaultSearchFilters=Filtrele de căutare implicite +DefaultCreateForm=Valori implicite (de utilizat pe formulare) +DefaultSearchFilters=Filtre de căutare implicite DefaultSortOrder=Ordine de sortare implicite -DefaultFocus=Câmpurile de focalizare implicite +DefaultFocus=Câmpuri de focus implicite DefaultMandatory=Campuri obligatorii ale formularului ##### Products ##### -ProductSetup=Produse modul de configurare -ServiceSetup=Servicii de modul de configurare -ProductServiceSetup=Produse şi Servicii de module de configurare +ProductSetup=Configurare modul Produse +ServiceSetup=Configurare modul Servicii +ProductServiceSetup=Configurare module Produse şi Servicii NumberOfProductShowInSelect=Numărul maxim de produse pentru a fi afișate în listele de selectare combo (0 = fără limită) ViewProductDescInFormAbility=Afișează descrierile produsului în formulare (altfel este afișat într-un pop-up de tip tooltip) DoNotAddProductDescAtAddLines=Nu adăuga descrierea produsului (din fișa produsului) la adăugarea de linii pe formulare OnProductSelectAddProductDesc=Cum se utilizează descrierea produselor atunci când se adaugă un produs ca linie a unui document AutoFillFormFieldBeforeSubmit=Completați automat câmpul de introducere a descrierii cu descrierea produsului -DoNotAutofillButAutoConcat=Nu completa automat câmpul de introducere cu descrierea produsului. Descrierea produsului va fi concatenată automat cu descrierea introdusă.  +DoNotAutofillButAutoConcat=Nu completa automat câmpul de introducere cu descrierea produsului. Descrierea produsului va fi concatenată automat cu descrierea introdusă. DoNotUseDescriptionOfProdut=Descrierea produsului nu va fi niciodată inclusă în descrierea liniilor de pe documente -MergePropalProductCard=Activați în fișier atașat la produs/serviciu o opțiune de îmbinare a produsului de tip document PDF la propunerea PDF azur dacă produsul/serviciul se află în propunere -ViewProductDescInThirdpartyLanguageAbility=Afișați descrierile produselor în formulare în limba terțului (altfel în limba utilizatorului)  -UseSearchToSelectProductTooltip=De asemenea, dacă aveți un număr mare de number de produse (> 100 000), puteți crește viteza prin configurarea constantă a PRODUCT_DONOTSEARCH_ANYWHERE la 1 în Configurare-> Altele. Căutarea va fi apoi limitată la începutul șirului. -UseSearchToSelectProduct=Așteptați până când apăsați o tastă înainte de a încărca conținutul listei combo-ului de produse (aceasta poate crește performanța dacă aveți un număr mare de produse, dar este mai puțin convenabil) -SetDefaultBarcodeTypeProducts=Implicit tip de cod de bare de a utiliza pentru produse -SetDefaultBarcodeTypeThirdParties=Implicit tip de cod de bare de a utiliza pentru terţi +MergePropalProductCard=Activează la produs/serviciu în fişa Fişiere ataşate o opțiune de îmbinare a documentelor PDF la oferta PDF dacă produsul/serviciul este pe ofertă +ViewProductDescInThirdpartyLanguageAbility=Afișați descrierile produselor în formulare în limba terțului (altfel în limba utilizatorului) +UseSearchToSelectProductTooltip=De asemenea, dacă aveți un număr mare de produse (> 100 000), poți crește viteza prin configurarea constantei PRODUCT_DONOTSEARCH_ANYWHERE la 1 în Setări->Alte setări. Căutarea va fi limitată la începutul șirului. +UseSearchToSelectProduct=Așteaptă până se apasă o tastă înainte de a încărca conținutul listei combo de produse (aceasta poate crește performanța dacă ai un număr mare de produse, dar este mai puțin convenabil) +SetDefaultBarcodeTypeProducts=Tip implicit cod de bare de utilizat pentru produse +SetDefaultBarcodeTypeThirdParties= Tip implicit cod de bare de utilizat pentru terţi UseUnits=Definiți o unitate de măsură pentru Cantitate în timpul ediției pentru comenzi, propuneri sau linii de facturare ProductCodeChecker= Modul pentru generare de cod de produs și verificare (produs sau serviciu) -ProductOtherConf= Configurare Produse / Servicii +ProductOtherConf= Configurare Produs / Serviciu IsNotADir=nu este director! ##### Syslog ##### -SyslogSetup=Syslog modul de configurare +SyslogSetup=Configurare modul Syslog SyslogOutput=Jurnal de ieşire -SyslogFacility=Facilitatea +SyslogFacility=Facilitate SyslogLevel=Nivel -SyslogFilename=Nume fişier şi calea -YouCanUseDOL_DATA_ROOT=Puteţi folosi DOL_DATA_ROOT / dolibarr.log pentru un fişier de log în Dolibarr "Documente" director. Aveţi posibilitatea să setaţi o altă cale de a păstra acest fişier. -ErrorUnknownSyslogConstant=Constant %s nu este un cunoscut syslog constant +SyslogFilename=Nume fişier şi cale +YouCanUseDOL_DATA_ROOT=Poţi folosi DOL_DATA_ROOT/dolibarr.log ca fişier de log în directorul "documents". Ai posibilitatea să setezi o altă cale de stocare a acestui fişier. +ErrorUnknownSyslogConstant=Constanta %s nu este o constantă cunoscută Syslog OnlyWindowsLOG_USER=Pe Windows, numai facilitatea LOG_USER va fi acceptată -CompressSyslogs=Comprimarea și copierea de rezervă a fișierelor jurnal de depanare (generate de modulul Log pentru depanare) +CompressSyslogs=Comprimarea și backup-ul fișierelor jurnal de depanare (generate de modulul Log pentru depanare) SyslogFileNumberOfSaves=Număr log-uri de backup de păstrat -ConfigureCleaningCronjobToSetFrequencyOfSaves=Configurați curățarea lucrării programate pentru a configura frecvența copiei de rezervă a autentificărilor +ConfigureCleaningCronjobToSetFrequencyOfSaves=Configurați jobul de curăţare setaţi frecvența backup-urilor ##### Donations ##### -DonationsSetup=Donatii modul de configurare -DonationsReceiptModel=Format de donatie la primirea +DonationsSetup=Configurare modul Donaţii +DonationsReceiptModel=Şablon chitanţă donaţie ##### Barcode ##### -BarcodeSetup=Coduri de bare de configurare -PaperFormatModule=Imprimare in format modulul -BarcodeEncodeModule=Coduri de bare de tip de codificare -CodeBarGenerator=Generator de coduri de bare -ChooseABarCode=Nu generator definit -FormatNotSupportedByGenerator=Format nu sunt acceptate de acest generator -BarcodeDescEAN8=Coduri de bare de tip EAN8 -BarcodeDescEAN13=Coduri de bare de tip EAN13 -BarcodeDescUPC=Coduri de bare de tip UPC -BarcodeDescISBN=Coduri de bare de tip ISBN -BarcodeDescC39=Coduri de bare de tip C39 -BarcodeDescC128=Coduri de bare de tip C128 -BarcodeDescDATAMATRIX=Cod de bare de tip Datamatrix -BarcodeDescQRCODE=Cod de bare de tip QR code -GenbarcodeLocation=Instrument pentru linia de comandă de generare de coduri de bare (utilizat de motorul intern pentru anumite tipuri de coduri de bare). Trebuie să fie compatibil cu "genbarcode". <br> De exemplu: / usr / local / bin / genbarcode +BarcodeSetup=Configurare Coduri de bare +PaperFormatModule=Modul Format tipărire +BarcodeEncodeModule=Tip codificare Coduri de bare +CodeBarGenerator=Generator coduri de bare +ChooseABarCode=Niciun generator definit +FormatNotSupportedByGenerator=Format nesuportat de acest generator +BarcodeDescEAN8=Cod de bare tip EAN8 +BarcodeDescEAN13=Cod de bare tip EAN13 +BarcodeDescUPC=Cod de bare tip UPC +BarcodeDescISBN=Cod de bare tip ISBN +BarcodeDescC39=Cod de bare tip C39 +BarcodeDescC128=Cod de bare tip C128 +BarcodeDescDATAMATRIX=Cod de bare tip Datamatrix +BarcodeDescQRCODE=Cod de bare tip QR code +GenbarcodeLocation=Instrument pentru linia de comandă de generare de coduri de bare (utilizat de motorul intern pentru anumite tipuri de coduri de bare). Trebuie să fie compatibil cu "genbarcode". <br> De exemplu: /usr/local/bin/genbarcode BarcodeInternalEngine=Motor intern -BarCodeNumberManager=Manager pentru autodefinire numere coduri bare +BarCodeNumberManager=Manager autodefinire numere coduri bare ##### Prelevements ##### -WithdrawalsSetup=Configurarea modulului de plăți debit direct +WithdrawalsSetup=Configurare modul Plăți debit direct ##### ExternalRSS ##### -ExternalRSSSetup=Extern RSS importurile setup -NewRSS=New RSS Feed -RSSUrl=RSS URL -RSSUrlExample=Un interesant RSS feed +ExternalRSSSetup=Configurare import RSS extern +NewRSS=Feed RSS nou +RSSUrl=URL RSS +RSSUrlExample=Un feed RSS interesant ##### Mailing ##### -MailingSetup=Să trimiteţi un email la modul de instalare -MailingEMailFrom=Expeditor e-mail (de la) pentru e-mailurile trimise prin modul de trimitere e-mailuri -MailingEMailError=Returnați e-mail (Erori-la) pentru e-mailuri cu erori -MailingDelay=Secunde de asteptare pentru trimiterea urmatorului mesaj +MailingSetup=Configurare modul Newslettere +MailingEMailFrom=Expeditor email (De la) pentru email-urile trimise prin modulul Newslettere +MailingEMailError=Email retur (Erori-la) pentru erori email +MailingDelay=Secunde de aşteptare pentru trimiterea următorului email ##### Notification ##### -NotificationSetup=Configurarea modulului de notificare prin e-mail -NotificationEMailFrom=E-mail expeditor (De la) pentru e-mailurile trimise de modulul Notificări -FixedEmailTarget=Recipient +NotificationSetup=Configurare modul Notificare pe email +NotificationEMailFrom=Email expeditor (De la) pentru email-urile trimise de modulul Notificări +FixedEmailTarget=Destinatar ##### Sendings ##### -SendingsSetup=Configurare a modulului de expediere +SendingsSetup=Configurare modul Livrări SendingsReceiptModel=Trimiterea primirea model -SendingsNumberingModules=Trimiteri de numerotare module -SendingsAbility=Foi de transport suport pentru livrările către clienți. -NoNeedForDeliveryReceipts=În majoritatea cazurilor, foile de expediere sunt utilizate atât ca foi pentru livrările clienților (lista de produse care trebuie trimise), cât și pentru foile care sunt primite și semnate de către client. Prin urmare, foaia de confirmare a livrărilor de produse este o caracteristică duplicată și este rar activată. -FreeLegalTextOnShippings=Text liber pe livrari +SendingsNumberingModules=Modele de numerotare livrări +SendingsAbility=Suport avize de expediţie pentru livrările către clienți. +NoNeedForDeliveryReceipts=În majoritatea cazurilor, avizele de expediţie sunt utilizate atât pentru livrările către clienți (lista produselor care trebuie expediate), cât și pentru confirmarea şi semnarea de către client. Prin urmare, nota de confirmare a livrărilor de produse este o caracteristică duplicată și este rar activată. +FreeLegalTextOnShippings=Text liber pe livrări ##### Deliveries ##### -DeliveryOrderNumberingModules=Produse livrările primirea modul de numerotare -DeliveryOrderModel=Produse livrările primirea model -DeliveriesOrderAbility=Suport produse livrările încasări -FreeLegalTextOnDeliveryReceipts=Free text încasări la livrare +DeliveryOrderNumberingModules=Model de numerotare pentru recepţia livărilor de produse +DeliveryOrderModel=Şablon recepţie produse de la furnizor +DeliveriesOrderAbility=Suport note de livrare produse +FreeLegalTextOnDeliveryReceipts=Text liber pe notele de recepţie produse ##### FCKeditor ##### AdvancedEditor=Editor avansat -ActivateFCKeditor=Activaţi FCKeditor pentru: -FCKeditorForCompany=WYSIWIG crearea / editie a companiilor şi de note descriere -FCKeditorForProduct=WYSIWIG crearea / editie a produselor / serviciilor "descrierea şi nota +ActivateFCKeditor=Activaţi editorul avansat pentru: +FCKeditorForCompany=Creare/editare WYSIWIG a elementelor de descriere şi note (exceptând produse/servicii) +FCKeditorForProduct=Creare/editare WYSIWIG descriere şi note produse/servicii FCKeditorForProductDetails=Crearea/editarea WYSIWIG a liniilor de detalii ale produselor pentru toate entitățile (propuneri, comenzi, facturi, etc.).<span class="warning"> Atenţie: Utilizarea acestei opțiuni pentru acest caz nu este serios recomandată, deoarece poate crea probleme cu caracterele speciale și formatarea paginilor atunci când creați fișiere PDF.</span> -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) +FCKeditorForMailing= Creare/editare WYSIWIG pentru newslettere (Instrumente->Newslettere) +FCKeditorForUserSignature=Creare/editare WYSIWIG a semnăturii utilizatorilor +FCKeditorForMail=Creare/editare WYSIWIG pentru toate email-urile (cu excepția Instrumente->Newletter) 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. +StockSetup=Configurare modul Stocuri +IfYouUsePointOfSaleCheckModule=Dacă utilizezi modulul Punct de vânzare (POS) furnizat în mod implicit sau de un modul extern, această configurare poate fi ignorată de modulul POS. Cele mai multe module POS sunt proiectate în mod implicit să creeze o factură imediat și să scadă din stoc, indiferent de opțiunile de aici. Deci, dacă ai nevoie sau nu să faci o scădere din stoc la înregistrarea unei vânzări de pe POS, verifică și configurarea modulului POS. ##### Menu ##### -MenuDeleted=Meniu eliminat +MenuDeleted=Meniu şters Menu=Meniu Menus=Meniuri TreeMenuPersonalized=Meniuri personalizate -NotTopTreeMenuPersonalized=Meniuri personalizate care nu sunt legate de o intrare de meniu de sus -NewMenu=New meniul -MenuHandler=Meniu manipulant -MenuModule=Sursa de modul +NotTopTreeMenuPersonalized=Meniuri personalizate care nu sunt legate de o intrare din meniu de sus +NewMenu=Meniu nou +MenuHandler=Handler meniu +MenuModule=Modul sursă HideUnauthorizedMenu=Ascunde meniurile neautorizate și pentru utilizatorii interni (doar gri altfel) -DetailId=Id-ul pentru meniul -DetailMenuHandler=Meniu manipulant în cazul în care pentru a arăta noul meniu -DetailMenuModule=Modul de intrare în meniu numele dacă provin dintr-un modul -DetailType=Tip de meniu (sus sau stanga) -DetailTitre=Meniu etichetă sau eticheta cod pentru traducere -DetailUrl=URL-ul în cazul în care meniul va trimite (absolute URL sau link-ul extern de legătură cu http://) -DetailEnabled=Conditia pentru a afişa sau nu intrare -DetailRight=Conditia pentru a afişa neautorizate gri meniuri -DetailLangs=Lang de nume de fişier pentru eticheta cod de traducere +DetailId=Id meniu +DetailMenuHandler=Handler meniu utilizat pentru afişarea noului meniu +DetailMenuModule=Numele modulului dacă intrarea în meniu provine dintr-un modul +DetailType=Tip meniu (sus sau stânga) +DetailTitre=Etichetă meniu sau cod etichetă pentru traducere +DetailUrl=URL-ul la care te trimite meniul (URL absolut sau link extern de legătură cu http://) +DetailEnabled=Condiţia pentru a afişa sau nu elementul +DetailRight=Condiţia pentru a afişa meniurile gri neautorizate +DetailLangs=Nume fişier lang pentru cod etichetă de traducere DetailUser=Intern / Extern / Toate Target=Ţintă DetailTarget=Țintă pentru linkuri (_blank top deschide o fereastră nouă) -DetailLevel=Nivel (-1: meniul de sus, 0: antet meniu,&gt; 0 meniu şi submeniu) -ModifMenu=Schimbare Meniu -DeleteMenu=Ştergere intrare în meniu -ConfirmDeleteMenu=Sunteţi sigur că doriţi să ştergeţi meniul de intrare <b>%s</b>? +DetailLevel=Nivel (-1: meniul de sus, 0: meniu antet,>0 meniu şi submeniu) +ModifMenu=Modificare meniu +DeleteMenu=Şterge element din meniu +ConfirmDeleteMenu=Sunteţi sigur că doriţi să ştergeţi elementul <b>%s</b> din meniu? FailedToInitializeMenu=Eroare la inițializarea meniului ##### Tax ##### -TaxSetup=Modul de configurare pentru impozite, taxe sociale sau fiscale și dividende -OptionVatMode=Opţiunea de exigibilit de TVA +TaxSetup=Configurare modul Taxe sociale sau fiscale şi dividente +OptionVatMode=Plătitor de TVA OptionVATDefault=Bază standard -OptionVATDebitOption=Bazată pe debit +OptionVATDebitOption=Bază acumulare debit OptionVatDefaultDesc=TVA se datorează: <br> - pentru livrare de mărfuri (bazată pe facturare) <br> - Pe plăţi pentru servicii OptionVatDebitOptionDesc=TVA se datorează: <br> - pentru livrare de mărfuri (bazată pe facturare) <br> - pe facturi(debit) pentru servicii -OptionPaymentForProductAndServices=Baza de numerar pentru produse și servicii -OptionPaymentForProductAndServicesDesc=TVA se datorează: <br> - pe plăti pentru mărfuri <br> - pe plăti pentru servicii -SummaryOfVatExigibilityUsedByDefault=Timpul pentru alegerea TVA implicit în funcție de opțiunea aleasă: -OnDelivery=Pe livrare -OnPayment=Pe plată -OnInvoice=Pe factura -SupposedToBePaymentDate=Plata data de utilizat, dacă nu se cunoaşte data de livrare -SupposedToBeInvoiceDate=Data facturii utilizat -Buy=Cumpăra +OptionPaymentForProductAndServices=Numerar pentru produse și servicii +OptionPaymentForProductAndServicesDesc=TVA datorat: <br> - pe plăti pentru mărfuri <br> - pe plăti pentru servicii +SummaryOfVatExigibilityUsedByDefault=Momentul implicit al eligibilității TVA în funcție de opțiunea aleasă: +OnDelivery=La livrare +OnPayment=La plată +OnInvoice=La factură +SupposedToBePaymentDate=Se utilizează data plăţii, dacă nu se cunoaşte data de livrare +SupposedToBeInvoiceDate=Se utilizează data facturii +Buy=Cumpără Sell=Vinde -InvoiceDateUsed=Data facturii utilizat -YourCompanyDoesNotUseVAT=Compania dvs. a fost definită ca să nu folosească TVA (Acasă - Configurare - Companie / Organizare), deci nu există opțiuni de TVA la configurare. +InvoiceDateUsed=Se utilizează data facturii +YourCompanyDoesNotUseVAT=Compania ta a fost definită ca să nu folosească taxa TVA (Acasă - Setări - Companie/Organizaţie), deci nu există opțiuni de configurare TVA. AccountancyCode=Cod contabil -AccountancyCodeSell=Cont vânzare. cod -AccountancyCodeBuy=Cont cumpărare. cod +AccountancyCodeSell=Cont contabil vânzare +AccountancyCodeBuy=Cont contabil achiziţie +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Păstrați caseta de selectare "Creare automată plată" goală în mod implicit atunci când creați o nouă taxă ##### Agenda ##### -AgendaSetup=Acţiuni de ordine de zi şi de modul de configurare -PasswordTogetVCalExport=Cheia de a autoriza export link -PastDelayVCalExport=Nu de export eveniment mai în vârstă decât -AGENDA_USE_EVENT_TYPE=Utilizați tipuri de evenimente (gestionate în menu Configuare-> Dicționare -> Tipul agendei de evenimente) -AGENDA_USE_EVENT_TYPE_DEFAULT=Puneți automat această valoare implicită pentru tipul de eveniment în formularul de creare a evenimentului +AgendaSetup=Configurare modul Evenimente şi Agendă +PasswordTogetVCalExport=Cheie de autorizare export link +SecurityKey = Cheie de securitate +PastDelayVCalExport=Nu exporta evenimente mai vechi de +AGENDA_USE_EVENT_TYPE=Utilizați tipuri de evenimente (gestionate în menu Setări->Dicționare->Tip evenimente agendă) +AGENDA_USE_EVENT_TYPE_DEFAULT=Setează 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=Ce vizualizare doriți să deschideți implicit atunci când selectați meniul Agenda AGENDA_REMINDER_BROWSER=Activați memento-uri evenimente în <b>browserul utilizatorului</b> (Când este atinsă data de reamintire, browserul afișează un popup. Fiecare utilizator poate dezactiva astfel de notificări din configurarea sa de notificări browser). AGENDA_REMINDER_BROWSER_SOUND=Activați notificarea sonoră AGENDA_REMINDER_EMAIL=Activați memento evenimente <b>prin email</b> (opțiunea de reamintire/întârziere poate fi definită pentru fiecare eveniment). -AGENDA_REMINDER_EMAIL_NOTE= Notă: Frecvența sarcinii %s trebuie să fie suficientă pentru a vă asigura că reamintirea este trimisă la momentul corect. +AGENDA_REMINDER_EMAIL_NOTE= Notă: Frecvența task-ului %s trebuie să fie suficientă pentru a vă asigura că reamintirea este trimisă la momentul corect. 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 <br> <b> __PHONETO__ </b> care va fi înlocuit cu numărul de telefon al persoanei de apelat <br> <b> __PHONEFROM__ </b> care va fi înlocuit cu numărul de telefon al apelantului (al tău) <br> <b> __LOGIN__ </b>, care va fi înlocuit cu autentificare clicktodial (definită pe cartela de utilizator) <br> <b> __PASS__ </b> care va fi înlocuit cu parola clicktodial (definită pe cartela de utilizator). +ClickToDialSetup=Configurare modul Click To Dial +ClickToDialUrlDesc=URL-ul se apelează când se face clic pe pictograma telefon. În URL, poţi utiliza etichete <br> <b> __PHONETO__ </b> care vor fi înlocuite cu numărul de telefon al persoanei de apelat <br><b>__PHONEFROM__</b> care va fi înlocuit cu numărul de telefon al apelantului (al tău) <br> <b>__LOGIN__</b> , care va fi înlocuit cu numele de autentificare clicktodial (definită pe fişa utilizator) <br><b>__PASS__</b> care va fi înlocuit cu parola clicktodial (definită pe fişa utilizator). 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 +ClickToDialUseTelLink=Utilizează doar link "tel:" pe numerele de telefon +ClickToDialUseTelLinkDesc=Utilizați această metodă dacă utilizatorii dvs. au un smartphone sau o interfață software instalată pe același computer ca browserul și poţi apela când faci clic pe un link din browser care începe cu "tel:". Dacă aveți nevoie de o soluție completă de server (fără instalarea software locală), trebuie să setați această opțiune la "Nu" și să completați câmpul următor. ##### Point Of Sale (CashDesk) ##### CashDesk=POS -CashDeskSetup=Configurare Modul POS +CashDeskSetup=Configurare modul POS 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 +CashDeskBankAccountForSell=Cont implicit pentru încasări numerar +CashDeskBankAccountForCheque=Cont implicit utilizat pentru plăţi cu cecuri +CashDeskBankAccountForCB=Cont implicit utilizat pentru a primi plăţi efectuate cu carduri de credit 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. +CashDeskDoNotDecreaseStock=Dezactivează scăderea stocului atunci când o vânzare se face prin POS (dacă "nu", scăderea 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ă utilizeze scăderea de stoc +StockDecreaseForPointOfSaleDisabled=Scăderea stocului la vânzarea făcută prin POS este dezactivată +StockDecreaseForPointOfSaleDisabledbyBatch=Scăderea stocului la plata prin POS nu este compatibilă cu modulul Management loturi/serii (activat î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ă specificarea unui depozit. 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. +BookmarkSetup=Configurare modul Bookmark-uri +BookmarkDesc=Acest modul vă permite să gestionați marcajele. De asemenea, puteți adăuga comenzi rapide la orice pagini din sistem sau site-uri externe din meniul din stânga. NbOfBoomarkToShow=Numărul maxim de marcaje în stânga pentru a afişa meniul ##### WebServices ##### -WebServicesSetup=WebServices modul de configurare -WebServicesDesc=Prin activarea acestui modul, Dolibarr devenit un serviciu de web server pentru a oferi diverse servicii web. -WSDLCanBeDownloadedHere=WSDL Descriptorul de fişier cu condiţia serviceses pot fi download aici -EndPointIs=Clienții SOAP trebuie să își trimită cererile la punctul final Dolibarr disponibil la adresa URL +WebServicesSetup=Configurare modul WebServices +WebServicesDesc=Activând acest modul, sistemul devine server de servicii web şi oferă diverse diverse funcţionalităţi de interconectare şi comunicare cu alte sisteme. +WSDLCanBeDownloadedHere=Fişierele descriptor WSDL pentru serviciile furnizate poate fi descărcat de aici +EndPointIs=Clienții SOAP trebuie să își trimită cererile către endpoint-ul sistemului disponibil la adresa URL ##### API #### ApiSetup=Configurare Modul API -ApiDesc=Prin activarea acestui modul, Dolibarr devine un server REST pentru furnizare de diverse servicii web. +ApiDesc=Prin activarea acestui modul, Sistemul devine un server REST pentru furnizarea de diverse servicii web. ApiProductionMode=Activați modul de producție (aceasta va activa utilizarea unei memorii cache pentru gestionarea serviciilor) -ApiExporerIs=Puteți explora și testa API-urile la adresa URL +ApiExporerIs=Poţi explora și testa API-urile la adresa URL OnlyActiveElementsAreExposed=Doar elementele din modulele activate sunt expuse ApiKey=Cheie pentru API -WarningAPIExplorerDisabled=Exploratorul API a fost dezactivat. Exploratorul API nu este obligat să furnizeze servicii API . Este un instrument pentru dezvoltator de a găsi/testa API-urile REST. Dacă aveți nevoie de acest instrument, mergeți la gestionarea din module API REST pentru a-l activa. +WarningAPIExplorerDisabled=Exploratorul API a fost dezactivat. Exploratorul API nu este necesar pentru furnizarea de servicii API . Este un instrument de dezvoltatori pentru a găsi/testa API-urile REST. Dacă aveți nevoie de acest instrument, mergeți la configurarea modului API REST pentru a-l activa. ##### Bank ##### -BankSetupModule=Banca modul de configurare -FreeLegalTextOnChequeReceipts=Text liber pe chitanţe -BankOrderShow=Afişarea ordinea de conturi bancare pentru ţările care folosesc &quot;numărul de bancă detaliate&quot; +BankSetupModule=Configurare modul Bănci +FreeLegalTextOnChequeReceipts=Text liber pe chitanţe cec +BankOrderShow=Afişarea ordinea pentru conturi bancare pentru ţările care folosesc "numărul bancar detaliat" BankOrderGlobal=General -BankOrderGlobalDesc=General, pentru afişaj -BankOrderES=Spaniol -BankOrderESDesc=Spaniolă de afişare pentru -ChequeReceiptsNumberingModule=Modul de verificare a numerotării chitanţelor +BankOrderGlobalDesc=Ordine de afişare generală +BankOrderES=Spaniolă +BankOrderESDesc=Ordine de afişare Spaniolă +ChequeReceiptsNumberingModule=Model de numerotare chitanţe cec ##### Multicompany ##### -MultiCompanySetup=Multi-societate modul setup +MultiCompanySetup=Configurare modul Multi-companie ##### Suppliers ##### -SuppliersSetup=Configurarea modulului furnizor +SuppliersSetup=Configurare modul Furnizori 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 +SuppliersInvoiceNumberingModel=Modele de numerotare a facturilor furnizor 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 +GeoIPMaxmindSetup=Configurare modul GeoIP Maxmind PathToGeoIPMaxmindCountryDataFile=Calea spre fişierul Maxmind care conţine translatarea IP la ţară.<br>Exemple:<br>/usr/local/share/GeoIP/GeoIP.dat<br>/usr/share/GeoIP/GeoIP.dat<br>/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 <b>versiune demo gratuită</b> a ţării dosar GeoIP Maxmind la %s. -YouCanDownloadAdvancedDatFileTo=Puteţi descărca de asemenea, o <b>versiune</b> mai <b>completă, cu actualizari ale</b> ţării dosar GeoIP Maxmind la %s. -TestGeoIPResult=Test de o conversie de IP -> ţară +NoteOnPathLocation=Reţine că fişierul de conversie IP la ţară trebuie să fie într-un director citibil de PHP (Verifică configurarea PHP open_basedir şi permisiunile de fişiere). +YouCanDownloadFreeDatFileTo=Puteţi descărca o <b>versiune demo gratuită</b> a fişierului de ţară GeoIP Maxmind de la %s. +YouCanDownloadAdvancedDatFileTo=Puteţi descărca de asemenea, o <b>versiune mai completă, cu actualizări</b> ale fişierului de ţară GeoIP Maxmind de la %s. +TestGeoIPResult=Test conversie IP -> ţară ##### Projects ##### -ProjectsNumberingModules=Proiecte de numerotare modulul -ProjectsSetup=Proiect modul de configurare -ProjectsModelModule=Proiectul de raport document model -TasksNumberingModules=Model de numerotaţie al taskurilor -TaskModelModule=Modele de document de rapoarte taskuri -UseSearchToSelectProject=Așteptați până când este apăsat o tastă înainte de a încărca conținutul listei proiectului combo. <br> Aceasta poate îmbunătăți performanţa dacă aveți un number mare de proiecte, dar este mai puțin convenabil. +ProjectsNumberingModules=Model de numerotare Proiecte +ProjectsSetup=Configurare modul Proiecte +ProjectsModelModule=Şablon document Raport de proiect +TasksNumberingModules=Model de numerotare taskuri +TaskModelModule=Şabloane document rapoarte taskuri +UseSearchToSelectProject=Așteptați până când este apăsat o tastă înainte de a încărca conținutul listei combo de Proiecte. <br> Aceasta poate îmbunătăți performanţa dacă aveți un număr mare de proiecte, dar este mai puțin convenabil. ##### ECM (GED) ##### ##### Fiscal Year ##### AccountingPeriods=Perioade contabiile AccountingPeriodCard=Perioadă contabilă -NewFiscalYear=Perioadă contabilă nouă  +NewFiscalYear=Perioadă contabilă nouă OpenFiscalYear=Deschide perioada contabilă -CloseFiscalYear=Închide perioada contabila +CloseFiscalYear=Închide perioada contabilă DeleteFiscalYear=Ștergeți perioada contabilă -ConfirmDeleteFiscalYear=Sigur doriți să ștergeți această perioadă contabila? +ConfirmDeleteFiscalYear=Sigur doriți să ștergeți această perioadă contabilă? ShowFiscalYear=Arată perioada contabilă AlwaysEditable=Permite a fi editat mereu -MAIN_APPLICATION_TITLE=Forțează numele vizibil al aplicare (avertisment: setarea propriul nume aici poate duce la eliminarea facilitaţii de conectare automată atunci când se utilizează aplicația mobilă DoliDroid) -NbMajMin=Numărul minim al caracterelor majuscule -NbNumMin=Numărul minim al caracterelor minuscule -NbSpeMin=Numărul minim al caracterelor speciale -NbIteConsecutive=Numărul maxim al caracterelor care se repetă -NoAmbiCaracAutoGeneration=Nu utiliza caractere ambigue ("1","l","i","|","0","O") pentru generare automată -SalariesSetup=Configurare modul salarii -SortOrder=Ordine sortare +MAIN_APPLICATION_TITLE=Forțează numele vizibil al aplicaţiei (atenţie: setarea propriul nume aici poate duce la eliminarea facilitaţii de conectare automată atunci când se utilizează aplicația mobilă DoliDroid) +NbMajMin=Numărul minim de caractere majuscule +NbNumMin=Numărul minim de caractere minuscule +NbSpeMin=Numărul minim de caractere speciale +NbIteConsecutive=Numărul maxim de caractere care se repetă +NoAmbiCaracAutoGeneration=Nu utiliza caractere ambigue ("1","l","i","|","0","O") la generarea automată +SalariesSetup=Configurare modul Salarii +SortOrder=Ordine de sortare Format=Format -TypePaymentDesc=0: tipul de plată al clientului, 1: tipul de plată al furnizorului, 2: tipul de plată al clienților și al furnizorilor -IncludePath=Include calea (definita in variabila %s) -ExpenseReportsSetup=Configurarea modului rapoartelor de cheltuieli -TemplatePDFExpenseReports=Șabloane de documente pentru a genera un document de raportare a cheltuielilor -ExpenseReportsRulesSetup=Configurare din module Rapoarte de cheltuieli - Reguli -ExpenseReportNumberingModules=Modul de numerotare a rapoartelor de cheltuieli +TypePaymentDesc=0: tip de plată al clientului, 1: tip de plată al furnizorului, 2: tip de plată al clienților și al furnizorilor +IncludePath=Include calea (definită în variabila %s) +ExpenseReportsSetup=Configurarea modului Rapoarte de cheltuieli +TemplatePDFExpenseReports=Șabloane de documente pentru generarea rapoartelor de cheltuieli +ExpenseReportsRulesSetup=Configurare modul Rapoarte de cheltuieli - Reguli +ExpenseReportNumberingModules=Model 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". +YouMayFindNotificationsFeaturesIntoModuleNotification=Puteți găsi opțiuni pentru notificările prin email activând şi configurând modulul "Notificare". 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 +GoOntoUserCardToAddMore=Accesați fişa "Notificări" a unui utilizator pentru a adăuga sau elimina notificări GoOntoContactCardToAddMore=Accesați fila "Notificări" a terțului pentru a adăuga sau elimina notificări pentru contacte/adrese Threshold=Prag 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 <strong> %s </strong> pentru a permite această caracteristică -ConfFileMustContainCustom=Instalarea sau construirea unui modul extern din aplicație trebuie să salveze fişierele modulului în directorul <strong> %s </strong>. Pentru a avea acest director procesat de Dolibarr, trebuie să vă configuraţi<strong> conf / conf.php </strong> pentru a adăuga 2 linii directoare: <br> <strong> $ dolibarr_main_url_root_alt = '/ custom'; </strong> <br> <strong> $ dolibarr_main_document_root_alt = '%s / personalizat'; </strong> -HighlightLinesOnMouseHover=Evidențiați liniile tabelului când mișcarea mouse-ului trece peste ele +SomethingMakeInstallFromWebNotPossible2=Din acest motiv, procesul de actualizare descris aici este un proces manual pe care numai un utilizator privilegiat îl poate face. +InstallModuleFromWebHasBeenDisabledByFile=Instalarea de module externe din aplicație a fost dezactivată de administrator. Trebuie să-i soliciţi să şteargă fişierul <strong>%s</strong> pentru a permite această caracteristică. +ConfFileMustContainCustom=Instalarea sau construirea unui modul extern din aplicație trebuie să salveze fişierele în directorul <strong>%s</strong>. Pentru a putea fi folosit de sistem, trebuie să configurezi<strong>conf/conf.php</strong> adaugă 2 linii de directivă: <br> <strong>$dolibarr_main_url_root_alt='/custom';</strong> <br><strong> $dolibarr_main_document_root_alt='%s/custom';</strong> +HighlightLinesOnMouseHover=Evidențiați liniile tabelului când treceţi cu mouse-ul peste ele 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 +TextTitleColor=Culoarea textului pentru titlul de pagină 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ă -NotSupportedByAllThemes=Va funcționa cu teme de bază, poate nu este susținută de teme externe -BackgroundColor=Culoare Background -TopMenuBackgroundColor=Culoare Background pentru Top menu -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 +PressF5AfterChangingThis=Apăsați CTRL + F5 sau ștergeți memoria cache a browserului după ce ați modificat această valoare pentru a se aplica +NotSupportedByAllThemes=Va funcționa cu teme de bază, poate nu este suportată de teme externe +BackgroundColor=Culoare fundal +TopMenuBackgroundColor=Culoare fundal pentru meniul de Sus +TopMenuDisableImages=Ascundeți imaginile în meniul de sus +LeftMenuBackgroundColor=Culoare fundal pentru meniul Stânga +BackgroundTableTitleColor=Culoarea de fundal pentru linia de titlu a tabelului +BackgroundTableTitleTextColor=Culoarea textului pentru linia de titlu a tabelelor 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) +BackgroundTableLineOddColor=Culoarea de fundal pentru liniile impare ale tabelelor +BackgroundTableLineEvenColor=Culoarea de fundal pentru liniile pare ale tabelelor +MinimumNoticePeriod=Perioada minimă de notificare (cererea ta de concediu trebuie făcută înainte de această perioadă) 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. +EnterAnyCode=Acest câmp conține o referință pentru identificarea liniei. Introduceți orice valoare la alegere, dar fără caractere speciale. 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] +UnicodeCurrency=Introdu aici între paranteze, lista de octeți care reprezintă simbolul monedei. De exemplu: pentru $, introdu [36] - pentru Real brazilian R$ [82,36] - pentru €, introdu [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. -UrlTrackingDesc=Dacă furnizorul sau serviciul de transport oferă o pagină sau un site web pentru a verifica starea expedierilor dvs., puteți să o introduceți aici. Puteți utiliza tasta {TRACKID} în parametrii adresei URL, astfel încât sistemul să îl înlocuiască cu numărul de urmărire introdus de utilizator în cartea de expediere. -OpportunityPercent=Când creați o iniţiativă, veți defini o valoare estimată a proiectului/iniţiativei. În funcție de starea iniţiativei, această valoare poate fi înmulțită cu această rată pentru a evalua o valoare totală generată de toți potențialii clienți. Valoarea este un procentaj (între 0 și 100). +SellTaxRate=Cota taxei de vânzare +RecuperableOnly=Da pentru TVA "neperceput, dar recuperabil" dedicat pentru unele regiuni din Franța. Mențineți valoarea "Nu" în toate celelalte cazuri. +UrlTrackingDesc=Dacă furnizorul sau serviciul de livrare oferă o pagină sau un site web pentru a verifica starea expedierilor dvs., puteți să o introduceți aici. Puteți utiliza codul {TRACKID} în parametrii adresei URL, astfel încât sistemul să îl înlocuiască cu numărul de urmărire AWB introdus de utilizator în fişa livrării. +OpportunityPercent=Când creați unlead, veți defini o valoare estimată a proiectului/lead-ului. În funcție de starea lead-ului, această valoare poate fi înmulțită cu acest procentaj pentru a evalua o valoare totală generată pentru toți potențialii clienți. Valoarea este un procentaj (între 0 și 100). TemplateForElement=Această înregistrare șablon este dedicată pentru elementul care -TypeOfTemplate=Tip Model -TemplateIsVisibleByOwnerOnly=Șablonul este vizibil numai pentru proprietar +TypeOfTemplate=Tip şablon +TemplateIsVisibleByOwnerOnly=Șablonul este vizibil numai de proprietar VisibleEverywhere=Vizibil peste tot VisibleNowhere=Invizibil -FixTZ=Fixează TimeZone -FillFixTZOnlyIfRequired=Examplu: +2 (completați numai dacă se întâlnește o problemă) +FixTZ=TimeZone fix +FillFixTZOnlyIfRequired=Exemplu: +2 (completați numai dacă se întâlnește o problemă) ExpectedChecksum=Checksum așteptat CurrentChecksum=Checksum curent ExpectedSize=Dimensiune aşteptată CurrentSize=Dimensiune curentă ForcedConstants=Valori constante necesare -MailToSendProposal=Oferte Clienti -MailToSendOrder=Ordine de vânzări -MailToSendInvoice=Facturi Clienţi +MailToSendProposal=Oferte clienţi +MailToSendOrder=Comenzi de vânzări +MailToSendInvoice=Facturi clienţi MailToSendShipment=Livrări MailToSendIntervention=Intervenţii -MailToSendSupplierRequestForQuotation=Cerere de cotaţie -MailToSendSupplierOrder=Comenzile de achiziție -MailToSendSupplierInvoice=Facturi Furnizori +MailToSendSupplierRequestForQuotation=Cerere de ofertă +MailToSendSupplierOrder=Comenzi de achiziție +MailToSendSupplierInvoice=Facturi furnizori MailToSendContract=Contracte -MailToSendReception=Receptii +MailToSendReception=Recepţii MailToThirdparty=Terţi MailToMember=Membri MailToUser=Utilizatori @@ -1919,74 +1932,74 @@ MailToTicket=Tichete ByDefaultInList=Afișați în mod implicit în vizualizarea listei YouUseLastStableVersion=Utilizați ultima versiune stabilă TitleExampleForMajorRelease=Exemplu de mesaj pe care îl puteți utiliza pentru a anunța această lansare majoră (nu ezitați să o utilizați pe site-urile dvs.) -TitleExampleForMaintenanceRelease=Exemplu de mesaj pe care îl puteți utiliza pentru a anunța această mentenanţă majoră (nu ezitați să o utilizați pe site-urile dvs.) -ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s este disponibil. Versiunea %s este o versiune majoră cu o mulţime de caracteristici noi atât pentru utilizatori cât şi pentru dezvoltatori . Puteți să o descărcați din https://www.dolibarr.org (versiuni stabile subdirector). Puteți să citiţi<a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> pentru lista completă a modificărilor. -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<a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> 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 +TitleExampleForMaintenanceRelease=Exemplu de mesaj pe care îl puteți utiliza pentru a anunța această versiune de întreţinere majoră (nu ezitați să o utilizați pe site-uri) +ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s este disponibil. Versiunea %s este o versiune majoră cu o mulţime de caracteristici noi atât pentru utilizatori cât şi pentru dezvoltatori . Puteți să o descărcați de la https://www.dolibarr.org (subdirectorul versiuni stabile). Puteți consulta <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> pentru lista completă a modificărilor. +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 să facă actualizarea 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 (subdirector versiuni stabile). Puteți să citiţi<a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> 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 economisi timp, aici poţi introduce o regulă de calcul automat a unui 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 documente pentru 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ă) +ToGenerateCodeDefineAutomaticRuleFirst=Pentru a putea genera automat coduri de bare, trebuie mai întâi să definiți un manager de auto-definire pentru numărul de cod de bare. +SeeSubstitutionVars=Consultați * nota pentru lista variabilelor de substituţie posibile +SeeChangeLog=Vezi fişierul ChangeLog (numai în engleză) AllPublishers=Toți editorii UnknownPublishers=Editori necunoscuți -AddRemoveTabs=Add sau inlatura taburi -AddDataTables=Adăugați tabelele de obiect -AddDictionaries=Adăugați tabele de dicționare -AddData=Adăugați date desptre obiecte sau dicționare -AddBoxes=Adăugați widget-uri -AddSheduledJobs=Adăugați lucrări programate -AddHooks=Adăugați elemente de agăţare -AddTriggers=Adăugați declanșatoare -AddMenus=Add meniuri -AddPermissions=Add permisiunii -AddExportProfiles=Add profile export -AddImportProfiles=Add profile import +AddRemoveTabs=Adăugaţi sau eliminaţi fişe +AddDataTables=Adăugați tabele obiect +AddDictionaries=Adăugare tabele de dicționare +AddData=Adăugare date despre obiecte sau dicționare +AddBoxes=Adăugare widget-uri +AddSheduledJobs=Adăugare joburi programate +AddHooks=Adăugare hook-uri +AddTriggers=Adăugare triggere +AddMenus=Adăugare meniuri +AddPermissions=Adăugare permisiuni +AddExportProfiles=Adăugare profile de export date +AddImportProfiles=Adăugare profile de import date AddOtherPagesOrServices=Adăugați alte pagini sau servicii AddModels=Adăugați șabloane de document sau de numerotare -AddSubstitutions=Adăugați chei de înlocuire +AddSubstitutions=Adăugați chei de substituţie DetectionNotPossible=Detectarea nu este posibilă -UrlToGetKeyToUseAPIs=URL pentru a obține tokenul pentru a utiliza API (odată ce a fost primit token este salvată în tabelul cu baza de date a utilizatorului şi trebuie să fie furnizat pentru fiecare apel API) -ListOfAvailableAPIs=List de API-uri disponibile -activateModuleDependNotSatisfied=Modulul "%s" depinde de modulul "%s", care lipsește, astfel că modulul "%1$s" este posibil ca să nu funcționeze corect. Instalați modulul "%2$s" sau dezactivați modulul "%1$s" dacă doriți să fiți în siguranță de orice surpriză -CommandIsNotInsideAllowedCommands=Comanda pe care încercați să o executați nu este în lista comenzilor permise definite în parametrul <strong> $ dolibarr_main_restrict_os_commands </strong> în fişierul<strong> conf.php </strong>. -LandingPage=Pagina de destinație -SamePriceAlsoForSharedCompanies=Dacă utilizați un modul multi-companie, cu opțiunea "preț unic", prețul va fi, de asemenea, același pentru toate companiile dacă produsele sunt partajate între medii -ModuleEnabledAdminMustCheckRights=Modulul a fost activat. Permisiunile pentru modulul (modulele) activate au fost acordate numai administratorilor. Poate fi necesar să acordați permisiuni manuale altor utilizatori sau grupuri dacă este necesar. -UserHasNoPermissions=Acest utilizator nu are definite permisiuni -TypeCdr=Utilizați "Niciunul" dacă data termenului de plată este data facturii plus o delta în zile (delta este câmpul "%s") <br> Utilizați "La sfârșitul lunii" dacă, după delta, date trebuie mărită pentru a ajunge la sfârșitul lunii (+ un opțional "%s" în zile) <br> Utilizați "Curent / Următor" pentru a aveadata termenului de plată fiind primul Nth din lună după delta (delta este câmpul "%s" N este stocat în câmpul "%s") -BaseCurrency=Valuta de referință a companiei (mergeți în configurarea companiei pentru a schimba acest lucru) +UrlToGetKeyToUseAPIs=URL pentru obținerea token-ului de utilizare API (odată ce a fost primit token acesta este salvat în tabela user în baza de date şi trebuie să fie transmis pentru fiecare apel API) +ListOfAvailableAPIs=Listă API-uri disponibile +activateModuleDependNotSatisfied=Modulul "%s" depinde de modulul "%s", care lipsește, astfel că modulul "%1$s" este posibil ca să nu funcționeze corect. Instalați modulul "%2$s" sau dezactivați modulul "%1$s" dacă nu doriți surprize neplăcute +CommandIsNotInsideAllowedCommands=Comanda pe care încercați să o executați nu este în lista comenzilor permise definite în parametrul <strong>$dolibarr_main_restrict_os_commands</strong> în fişierul <strong>conf.php</strong>. +LandingPage=Landing page +SamePriceAlsoForSharedCompanies=Dacă utilizați un modul multi-companie, cu opțiunea "Preț unic", prețul va fi, de asemenea, același pentru toate companiile dacă produsele sunt partajate între entităţi +ModuleEnabledAdminMustCheckRights=Modulul a fost activat. Permisiunile pentru modulul(ele) activate au fost acordate numai administratorilor. Poate fi necesar să acordați manual permisiuni altor utilizatori sau grupuri dacă este necesar. +UserHasNoPermissions=Acest utilizator nu are permisiuni definite +TypeCdr=Utilizează "Nimic" dacă data termenului de plată este data facturii plus o diferenţă în zile (delta este câmpul "%s") <br> Utilizează "La sfârșitul lunii" dacă, după diferenţă, data trebuie mărită pentru a ajunge la sfârșitul lunii (+ opțional "%s" în zile) <br> Utilizează "Curent/Următor" pentru a avea data termenului de plată ca fiind a N-a zi din lună după diferenţă (delta este câmpul "%s"; N este stocat în câmpul "%s") +BaseCurrency=Moneda de referință a companiei (mergeți în configurarea companiei pentru a schimba acest lucru) WarningNoteModuleInvoiceForFrenchLaw=Acest modul %s respectă legile franceze (Loi Finance 2016). -WarningNoteModulePOSForFrenchLaw=Acest modul %s respectă legile franceze (Loi Finance 2016) deoarece modulul Autentificări ireversibile este automat activat. -WarningInstallationMayBecomeNotCompliantWithLaw=Încercați să instalați modulul %s care este un modul extern. Activarea unui modul extern înseamnă că aveți încredere în editorul modulului şi că sunteți sigur (ă) că acest modul nu afectează negativ comportamentul aplicației dvs., şi este în concordanţă cu legile țării dvs. (%s). Dacă modulul introduce o o caracteristică ilegală, devii responsabil pentru utilizarea software-ului ilegal. +WarningNoteModulePOSForFrenchLaw=Acest modul %s respectă legile franceze (Loi Finance 2016) deoarece modulul Jurnale Nealterabile este automat activat. +WarningInstallationMayBecomeNotCompliantWithLaw=Încercați să instalați modulul %s care este un modul extern. Activarea unui modul extern presupune că aveți încredere în editorul modulului şi că sunteți sigur că acest modul nu afectează negativ comportamentul aplicației şi este în concordanţă cu legile țării tale (%s). Dacă modulul introduce o o caracteristică ilegală, devii responsabil pentru utilizarea necorespunzătoare a software-ului. 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") +SetToYesIfGroupIsComputationOfOtherGroups=Setați la da dacă acest grup este calculat din alte grupuri +EnterCalculationRuleIfPreviousFieldIsYes=Introdu regula de calcul dacă câmpul anterior a fost setat la Da. <br> De exemplu:<br> 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=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 +GDPRContactDesc=Dacă stocați date despre companii/cetățeni europeni, puteți numi persoana de contact care este responsabilă cu GDPR - Regulamentul general privind protecția datelor aici HelpOnTooltip=Text de ajutor care să apară pe butonul de sugestii HelpOnTooltipDesc=Puneți un text sau o cheie de traducere aici pentru ca textul să apară într-o sugestie atunci când acest câmp apare într-un formular -YouCanDeleteFileOnServerWith=Puteți șterge acest fișier pe server cu Linia de comandă: <br> %s -ChartLoaded=Schema de cont încărcată -SocialNetworkSetup=Configurarea modulelor Rețele sociale -EnableFeatureFor=Activați caracteristici pentru <strong> %s </strong> -VATIsUsedIsOff=Nota: Opțiunea de a utiliza impozitul pe vânzări sau TVA a fost setată la <strong>Oprit</strong> în meniu %s - %s, astfel încât impozitul pe vânzări sau TVA utilizate vor fi întotdeauna 0 pentru vânzări. +YouCanDeleteFileOnServerWith=Puteți șterge acest fișier de pe server din linia de comandă: <br> %s +ChartLoaded=Planul de conturi a fost încărcat +SocialNetworkSetup=Configurarea modulului Rețele sociale +EnableFeatureFor=Activați caracteristici pentru <strong>%s</strong> +VATIsUsedIsOff=Nota: Opțiunea de a utiliza impozitul pe vânzări sau taxa TVA a fost setată la <strong>Oprit</strong> în meniul %s - %s, astfel încât impozitul pe vânzări sau taxa TVA utilizate vor fi întotdeauna 0 pentru vânzări. 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). -NewEmailCollector=Noul colector de e-mailuri -EMailHost=Gazdă a serverului de email IMAP +FeatureSupportedOnTextFieldsOnly=Atenție, caracteristică acceptată numai pe câmpurile de text și pe listele combinate. De asemenea, trebuie setat un parametru URL action=create sau action=edit SAU numele paginii trebuie să se termine cu 'new.php' pentru a declanșa această caracteristică. +EmailCollector=Colector de emailuri +EmailCollectorDescription=Adăugați un job programat și o pagină de configurare pentru a scana în mod regulat căsuţele de email (utilizând protocolul IMAP) și pentru a înregistra emailurile primite în aplicația ta, la locul potrivit și/sau pentru a crea automat înregistrări (cum ar fi clienții). +NewEmailCollector=Colector de emailuri nou +EMailHost=Server gazdă 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 @@ -1998,45 +2011,45 @@ DateLastCollectResult=Data ultimei încercări de colectare DateLastcollectResultOk=Data ultimei colectări cu succes LastResult=Ultimul rezultat EmailCollectorConfirmCollectTitle=Confirmarea colectării de emailuri -EmailCollectorConfirmCollect=Doriți să rulați acum colecția pentru acest colector? +EmailCollectorConfirmCollect=Doriți să rulați acum colectarea pentru acest colector de email-uri? NoNewEmailToProcess=Niciun email de procesat (care sa se potriveasca cu filtrele) -NothingProcessed=Nimic nu s-a făcut -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) +NothingProcessed=Nu s-a făcut nimic +XEmailsDoneYActionsDone=%semail-uri calificate, %s email-uri procesate cu succes (pentru %s înregistrări/acţiuni efectuate) +RecordEvent=Înregistrați evenimentul de email +CreateLeadAndThirdParty=Creați lead oportunitate (și terț, dacă este necesar) 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=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 -WithDolTrackingIDInMsgId=Mesaj transmis de la Dolibarr -WithoutDolTrackingIDInMsgId= Mesajul NU a fost trimis de la Dolibarr +WithDolTrackingID=Mesaj dintr-o conversație inițiată de un prim e-mail trimis de la sistem +WithoutDolTrackingID=Mesaj dintr-o conversație inițiată de un prim e-mail NU trimis din sistem +WithDolTrackingIDInMsgId=Mesaj transmis din sistem +WithoutDolTrackingIDInMsgId=Mesajul NU a fost trimis din acest sistem CreateCandidature=Creare aplicare la job FormatZip=Zip -MainMenuCode=Codul de introducere a meniului (meniu principal) +MainMenuCode=Codul de intrare a meniului (meniu principal) ECMAutoTree=Afișați arborele ECM automat OperationParamDesc=Definiți valorile de utilizat pentru obiectul acțiunii sau modul de extragere a valorilor. De exemplu: <br>objproperty1=SET:valoarea de setat<br>objproperty2=SET:o valoare de înlocuire a __objproperty1__<br>objproperty3=SETIFEMPTY:valoare folosită dacă objproperty3 nu este încă definită<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:Denumirea companiei mele este\\s([^\\s]*)<br><br>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 +DisabledResourceLinkUser=Dezactivați funcţia care conectează o resursă la utilizatori +DisabledResourceLinkContact=Dezactivați funcţia care conectează o resursă la contacte EnableResourceUsedInEventCheck=Activează funcţionalitatea de verificare a resurselor în uz pe un eveniment ConfirmUnactivation=Confirmați resetarea modulului -OnMobileOnly=Numai pe ecranul mic (smartphone) +OnMobileOnly=Numai pe ecrane mici (smartphone) DisableProspectCustomerType=Dezactivați tipul terțului „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_OPTIMIZEFORTEXTBROWSERDesc=Activați această opțiune dacă sunteți o persoană nevăzătoare sau dacă utilizați aplicația dintr-un browser text precum Lynx sau Links. 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" +ThisValueCanOverwrittenOnUserLevel=Această valoare poate fi suprascrisă de fiecare utilizator de pe pagina sa de utilizator - fişa '%s' +DefaultCustomerType=Tipul implicit al terțului pentru formularul de creare "Client nou" 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 @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Modulul %s este activat cu un nivel de jurnalizare prea ridicat (încearcă să utilizezi un nivel inferior pentru performanțe mai bune) +ModuleSyslogActivatedButLevelNotTooVerbose=Modulul %s este activat și nivelul jurnalului (%s) este corect (nu prea detaliat)  IfYouAreOnAProductionSetThis=Dacă eşti într-un mediu de producţie, ar trebui să setezi această proprietate la %s. AntivirusEnabledOnUpload=Antivirusul este activat pentru fişierele încărcate +SomeFilesOrDirInRootAreWritable=Unele fișiere sau directoare nu sunt în modul de citire exclusivă EXPORTS_SHARE_MODELS=Modele de export date sunt partajate cu toată lumea ExportSetup=Configurare modul Export ImportSetup=Configurare modul Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Trimiteţi un Ping anonim '+1' către serverul fundației Doli 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_SHOW_PROJECT=Afişează proiectul în document +ShowProjectLabel=Etichetă proiect 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Schimbarea acestei valori la %s este recomandată p DictionaryProductNature= Natură produs CountryIfSpecificToOneCountry=Țară (dacă este specifică unei anumite țări) YouMayFindSecurityAdviceHere=Aici puteți găsi recomandări de securitate -ModuleActivatedMayExposeInformation=Acest modul poate expune date sensibile. Dacă nu aveți nevoie de el, dezactivați-l. +ModuleActivatedMayExposeInformation=Această extensie PHP poate expune date sensibile. Dacă nu o foloseşti, dezactiveaz-o. ModuleActivatedDoNotUseInProduction=Un modul conceput pentru dezvoltare a fost activat. Nu-l activați într-un mediu de producție. CombinationsSeparator=Caracter separator pentru combinații de produse SeeLinkToOnlineDocumentation=Pentru exemple, consultați linkul către documentația online din meniul de sus SHOW_SUBPRODUCT_REF_IN_PDF=Dacă se folosește caracteristica "%s" a modulului <b>%s</b>, afișați detalii despre subprodusele unui kit în PDF. -AskThisIDToYourBank=Contactați banca dvs. pentru a obține acest ID +AskThisIDToYourBank=Contactați banca pentru a obține acest ID +AdvancedModeOnly=Permisiunea este disponibilă numai în modul Permisiuni avansate +ConfFileIsReadableOrWritableByAnyUsers=Fișierul conf poate fi citit sau scris de orice utilizator. Acordă permisiunea doar utilizatorului și grupului serverului web. +MailToSendEventOrganization=Organizarea evenimentelor +AGENDA_EVENT_DEFAULT_STATUS=Starea implicită a evenimentului când creaţi un eveniment din formular +YouShouldDisablePHPFunctions=Ar trebui să dezactivezi funcțiile PHP +IfCLINotRequiredYouShouldDisablePHPFunctions=Cu excepția cazului în care trebuie să rulezi comenzi de sistem (pentru modulul Joburi programate sau pentru a rula linia de comandă externă Antivirus, de exemplu), trebuie să dezactivezi funcțiile PHP +NoWritableFilesFoundIntoRootDir=Nu au fost găsite în directorul rădăcină fișiere sau directoare scriptibile ale programelor comune (OK)  +RecommendedValueIs=Recomandat: %s +ARestrictedPath=O cale restricţionată diff --git a/htdocs/langs/ro_RO/banks.lang b/htdocs/langs/ro_RO/banks.lang index 0ca440a7b50..e923a31fa89 100644 --- a/htdocs/langs/ro_RO/banks.lang +++ b/htdocs/langs/ro_RO/banks.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - banks -Bank=Banca -MenuBankCash=Bănci | Casa -MenuVariousPayment=Diverse plăţi +Bank=Bancă +MenuBankCash=Bănci | Caserie +MenuVariousPayment=Plăţi diverse MenuNewVariousPayment=Plată nouă diversă BankName=Nume bancă FinancialAccount=Cont @@ -9,124 +9,124 @@ BankAccount=Cont bancar BankAccounts=Conturi bancare BankAccountsAndGateways=Conturi bancare | Gateway-uri ShowAccount=Arată Cont -AccountRef=Contul financiar ref -AccountLabel=Contul financiar etichetă -CashAccount=Cont Casa -CashAccounts=Conturi Casa +AccountRef=Ref cont financiar +AccountLabel=Etichetă cont financiar +CashAccount=Cont Casă +CashAccounts=Conturi de Casă CurrentAccounts=Conturi curente -SavingAccounts=Conturi economii -ErrorBankLabelAlreadyExists=Eticheta Contului financiar există deja +SavingAccounts=Conturi de economii +ErrorBankLabelAlreadyExists=Eticheta contului financiar există deja BankBalance=Sold BankBalanceBefore=Soldul înainte BankBalanceAfter=Soldul după BalanceMinimalAllowed=Sold minim permis BalanceMinimalDesired=Sold minim dorit InitialBankBalance=Sold Iniţial -EndBankBalance=Sold Final -CurrentBalance=Sold Curent -FutureBalance=Sold Viitor -ShowAllTimeBalance=Arată soldul de început -AllTime=De la inceput +EndBankBalance=Sold final +CurrentBalance=Sold curent +FutureBalance=Sold viitor +ShowAllTimeBalance=Arată soldul iniţial +AllTime=De la început Reconciliation=Reconciliere -RIB=Număr Cont Bancă +RIB=Număr Cont Bancar IBAN=Cod IBAN -BIC=cod BIC/SWIFT -SwiftValid=BIC/SWIFT valabil +BIC=Cod BIC/SWIFT +SwiftValid=BIC/SWIFT valid SwiftVNotalid=BIC/SWIFT invalid -IbanValid=BAN valabil -IbanNotValid=BAN invalid -StandingOrders=Comenzi debit direct -StandingOrder=Ordin de plată direct +IbanValid=IBAN valid +IbanNotValid=IBAN invalid +StandingOrders=Ordine de debit direct +StandingOrder=Ordin de plată debit direct PaymentByDirectDebit=Plată prin direct debit PaymentByBankTransfers=Plăţi prin transfer de credit PaymentByBankTransfer=Plată prin transfer credit -AccountStatement=Extras Cont +AccountStatement=Extras cont AccountStatementShort=Extras AccountStatements=Extrase Cont LastAccountStatements=Ultimele extrase de cont IOMonthlyReporting=Raport Lunar BankAccountDomiciliation=Adresa băncii -BankAccountCountry=Tară Cont -BankAccountOwner=Nume Proprietar Cont -BankAccountOwnerAddress=Adresă Proprietar Cont -RIBControlError=Verificarea corectitudinii a eșuat. Aceasta înseamnă că informațiile pentru acest număr de cont nu sunt complete sau sunt incorecte (bifați țara, numerele și IBAN). +BankAccountCountry=Ţară Cont +BankAccountOwner=Nume deţinător cont +BankAccountOwnerAddress=Adresă deţinător Cont +RIBControlError=Verificarea de integritate a eșuat. Aceasta înseamnă că informațiile pentru acest număr de cont nu sunt complete sau sunt incorecte (bifați țara, numerele și IBAN). CreateAccount=Crează cont NewBankAccount=Cont nou NewFinancialAccount=Cont financiar nou MenuNewFinancialAccount=Cont financiar nou EditFinancialAccount=Editare cont -LabelBankCashAccount=Etichetă Banca sau Casa +LabelBankCashAccount=Etichetă Bancă sau Casă AccountType=Tip Cont -BankType0=Cont economii +BankType0=Cont de economii BankType1=Cont curent sau card de credit BankType2=Cont numerar AccountsArea=CONTURI -AccountCard=Fişa Cont +AccountCard=Fişă Cont DeleteAccount=Şterge cont ConfirmDeleteAccount=Sunteţi sigur că doriţi să ştergeţi acest cont? Account=Cont BankTransactionByCategories=Înregistrări bancare pe categorii -BankTransactionForCategory=Înregistrări bancare pentru categorii <b> %s </b> -RemoveFromRubrique=Eliminaţi link-ul cu categoria +BankTransactionForCategory=Înregistrări bancare pentru categoria <b>%s</b> +RemoveFromRubrique=Elimină link-ul cu categoria RemoveFromRubriqueConfirm=Sigur doriți să eliminați legătura dintre intrare și categorie? -ListBankTransactions=List de intrări bancare -IdTransaction=ID-ul tranzacţiei +ListBankTransactions=Listă de intrări bancare +IdTransaction=ID tranzacţie BankTransactions=Intrări bancare -BankTransaction=Intrare bancară -ListTransactions=Lista înregistrări -ListTransactionsByCategory=Lista înregistrări/categorii +BankTransaction=Intrare tranzacţie bancară +ListTransactions=Listă înregistrări +ListTransactionsByCategory=Listă înregistrări/categorii TransactionsToConciliate=Intrări pentru reconciliere TransactionsToConciliateShort=De compensat -Conciliable=Decontabil -Conciliate=Deconteaza -Conciliation=Conciliere +Conciliable=Poate fi decontabil +Conciliate=Decontare +Conciliation=Reconciliere SaveStatementOnly=Salvați numai declarația -ReconciliationLate=Reconciliere târzie -IncludeClosedAccount=Includeţi conturile închise -OnlyOpenedAccount=Numai conturile deschise -AccountToCredit=Cont de credit -AccountToDebit=Cont de debit +ReconciliationLate=Reconciliere întârziată +IncludeClosedAccount=Include conturile închise +OnlyOpenedAccount=Doar conturile deschise +AccountToCredit=Cont de creditat +AccountToDebit=Cont de debitat DisableConciliation=Dezactivaţi reconcilierea pentru acest cont ConciliationDisabled=Reconciliere dezactivată -LinkedToAConciliatedTransaction=Conectat la o intrare conciliată +LinkedToAConciliatedTransaction=Asociat la o intrare conciliată StatusAccountOpened=Deschis StatusAccountClosed=Închis -AccountIdShort=Cod +AccountIdShort=Cont LineRecord=Tranzacţie AddBankRecord=Adaugă intrare -AddBankRecordLong=Adăugați intrarea manual +AddBankRecordLong=Adăugă intrare manuală Conciliated=Reconciliat ConciliatedBy=Decontat de -DateConciliating=Data Decontare +DateConciliating=Data decontare BankLineConciliated=Intrare compensată cu extras bancar Reconciled=Reconciliat NotReconciled=Nu este conciliat -CustomerInvoicePayment=Plată Client -SupplierInvoicePayment=Plata furnizorului +CustomerInvoicePayment=Plată client +SupplierInvoicePayment=Plată furnizor SubscriptionPayment=Plată cotizaţie WithdrawalPayment=Ordin de plată de debit -SocialContributionPayment=Plata taxe sociale sau fiscale și tva +SocialContributionPayment=Plată taxe sociale/fiscale și TVA 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) +TransferDesc=La un transfer de la un cont la altul, sistemul va scrie două înregistrări (un debit în contul sursă și un credit în contul destinaţie). Aceeași sumă (cu excepția semnului), eticheta și data va fi utilizată pentru această tranzacție) TransferFrom=De la TransferTo=La -TransferFromToDone=Un viramentr de la <b>%s</b> la <b> %s </b> de<b> %s</b> %s a fost creată. +TransferFromToDone=Un transfer de la <b>%s</b> la <b> %s </b> de<b>%s</b> %s a fost înregistrat. CheckTransmitter=Emiţător -ValidateCheckReceipt=Validați această chitanță de confirmare? -ConfirmValidateCheckReceipt=Sigur doriți să validați această chitanță de verificare, nu va fi posibilă nicio modificare după ce aceasta va fi efectuată? -DeleteCheckReceipt=Ștergeți această chitanță de confirmare? -ConfirmDeleteCheckReceipt=Sigur stergeți această chitanță de confirmare?  +ValidateCheckReceipt=Validați această chitanță cec? +ConfirmValidateCheckReceipt=Sigur doriți să validați această chitanță cec, nu va mai fi posibilă nicio modificare după ce aceasta va fi efectuată? +DeleteCheckReceipt=Ștergeți această chitanță cec? +ConfirmDeleteCheckReceipt=Sigur stergeți această chitanță cec? BankChecks=Cecuri bancare BankChecksToReceipt=CEC-uri spre încasare BankChecksToReceiptShort=CEC-uri spre încasare ShowCheckReceipt=Arată borderou de cecuri remise -NumberOfCheques=Nr. cecului -DeleteTransaction=Ștergeți intrarea +NumberOfCheques=Nr. cecuri +DeleteTransaction=Șterge intrare ConfirmDeleteTransaction=Sigur doriți să ștergeți această intrare? ThisWillAlsoDeleteBankRecord=Aceasta va șterge, de asemenea, intrarea bancară generată -BankMovements=Mişcările +BankMovements=Mişcări PlannedTransactions=Intrări planificate Graph=Grafice ExportDataset_banque_1=Înregistrări bancare și extras de cont @@ -135,49 +135,50 @@ TransactionOnTheOtherAccount=Tranzacţie pe de alt cont PaymentNumberUpdateSucceeded=Număr plată actualizat cu succes PaymentNumberUpdateFailed=Numărul plaţii nu a putut fi actualizat PaymentDateUpdateSucceeded=Data plăţii actualizată cu succes -PaymentDateUpdateFailed=Data Plata nu a putut fi actualizată +PaymentDateUpdateFailed=Data plăţii nu a putut fi actualizată Transactions=Tranzacţii BankTransactionLine=Intrare bancară AllAccounts=Toate conturile bancare și de numerar -BackToAccount=Inapoi la cont +BackToAccount=Înapoi la cont ShowAllAccounts=Arată pentru toate conturile FutureTransaction=Tranzacție viitoare. Imposibil de reconciliat. -SelectChequeTransactionAndGenerate=Selectați / filtrați cecurile pentru a include în chitanța de depozit de cec și faceți clic pe "Creați" -InputReceiptNumber=Alegeți extrasul de cont privitor la conciliere. Folosiţi o valoare numerică sortabile : YYYYMM sau YYYYMMDD -EventualyAddCategory=În cele din urmă, precizează o categorie în care să clasezi înregistrările -ToConciliate=Să se acorde? -ThenCheckLinesAndConciliate=Apoi, verifică liniile prezente în extrasul de bancă şi click -DefaultRIB=IBAN Implicit -AllRIB=Tot BAN -LabelRIB=Etichetă BAN -NoBANRecord=Nicio înregistrare BAN -DeleteARib=Ștergeți înregistrarea BAN -ConfirmDeleteRib=Sigur doriți să ștergeți această înregistrare BAN? +SelectChequeTransactionAndGenerate=Selectează/filtrează cecurile de inclus în chitanța de depozit de cec și fă clic pe "Creare" +InputReceiptNumber=Alegeți extrasul de cont privitor la conciliere. Folosiţi o valoare numerică sortabilă : YYYYMM sau YYYYMMDD +EventualyAddCategory=În cele din urmă, specifică o categorie în care să clasezi înregistrările +ToConciliate=Să se deconteze? +ThenCheckLinesAndConciliate=Apoi, verifică liniile prezente în extrasul bancar şi dă click +DefaultRIB=IBAN implicit +AllRIB=Toate IBAN-urile +LabelRIB=Etichetă IBAN +NoBANRecord=Nicio înregistrare IBAN +DeleteARib=Șterge înregistrare IBAN +ConfirmDeleteRib=Sigur doriți să ștergeți această înregistrare IBAN? RejectCheck=Cec returnat ConfirmRejectCheck=Sigur doriți să marcați acest cec ca respins? -RejectCheckDate=data cecului ce a fost returnat +RejectCheckDate=Data la care cecul a fost returnat CheckRejected=Cec returnat 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. +BankAccountModelModule=Șabloane documente pentru conturi bancare +DocumentModelSepaMandate=Şablon mandat SEPA. Util doar pentru țările din spaţiul CEE. +DocumentModelBan=Șablon pagină tipăribilă cu informații despre IBAN. NewVariousPayment=Plată diversă nouă VariousPayment=Plată diversă -VariousPayments=Diverse plăţi +VariousPayments=Plăţi diverse ShowVariousPayment=Afişare plăţi diverse AddVariousPayment=Adaugă plată diversă VariousPaymentId=ID plată diversă VariousPaymentLabel=Etichetă plată diversă ConfirmCloneVariousPayment=Confirmă clona unei plăţi diverse 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 +YourSEPAMandate=Mandatul tău SEPA +FindYourSEPAMandate=Acesta este mandatul tău SEPA pentru a autoriza compania noastră să efectueze un ordin de debitare directă către banca ta. Returnaţi-l semnat (document scanat 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=Control POS casierie -NewCashFence=Închidere nouă de casierie +NewCashFence=Deschidere sau închidere nouă a casei de numerar 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 -IfYouDontReconcileDisableProperty= Dacă nu faceți reconcilieri bancare pe unele conturi bancare, dezactivați proprietatea "%s" de pe ele pentru a elimina acest avertisment.  +IfYouDontReconcileDisableProperty= Dacă nu faceți decontări bancare pe unele conturi bancare, dezactivați proprietatea "%s" de pe ele pentru a elimina acest avertisment NoBankAccountDefined=Nu a fost definit niciun cont bancar +NoRecordFoundIBankcAccount=Nu s-a găsit nicio înregistrare în contul bancar. În mod obișnuit, acest lucru se întâmplă atunci când o înregistrare a fost ștearsă manual din lista tranzacțiilor din contul bancar (de exemplu, în timpul decontării contului bancar). Un alt motiv este că plata a fost înregistrată când modulul "%s" a fost dezactivat. diff --git a/htdocs/langs/ro_RO/bills.lang b/htdocs/langs/ro_RO/bills.lang index 074863b0148..c06f7e92184 100644 --- a/htdocs/langs/ro_RO/bills.lang +++ b/htdocs/langs/ro_RO/bills.lang @@ -5,30 +5,30 @@ BillsCustomers=Facturi Clienţi BillsCustomer=Factură Client BillsSuppliers=Facturi Furnizori BillsCustomersUnpaid=Facturi clienţi neîncasate -BillsCustomersUnpaidForCompany=Facturi clienți neplătite pentru%s -BillsSuppliersUnpaid=Facturi furnizor neplătite -BillsSuppliersUnpaidForCompany=Facturi furnizor neplătite pentru %s +BillsCustomersUnpaidForCompany=Facturi clienți neîncasate pentru%s +BillsSuppliersUnpaid=Facturi furnizor neachitate +BillsSuppliersUnpaidForCompany=Facturi furnizor neachitate pentru %s BillsLate=Plăţi întârziate BillsStatistics=Statistici Facturi Clienţi BillsStatisticsSuppliers=Statistici facturi furnizor 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 +DisabledBecauseNotErasable=Dezactivat pentru că nu poate fi şters InvoiceStandard=Factură Standard InvoiceStandardAsk=Factură Standard InvoiceStandardDesc=Acest tip de factură este factura comună. -InvoiceDeposit=Factura de plată în avans -InvoiceDepositAsk=Factura de plată în avans +InvoiceDeposit=Factură de plată în avans +InvoiceDepositAsk=Factură de plată în avans InvoiceDepositDesc=Acest tip de factură se face atunci când a fost primită o factură de plată în avans InvoiceProForma=Factură Proformă InvoiceProFormaAsk=Factură Proformă InvoiceProFormaDesc=<b>Factura Proformă </b> 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 +InvoiceReplacement=Factură de înlocuire +InvoiceReplacementAsk=Factură de înlocuire a altei facturi InvoiceReplacementDesc=<b>Factura de înlocuire</b> este folosită pentru a înlocui o factură care nu a fost achitată.<br><br>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 +InvoiceAvoir=Notă de credit InvoiceAvoirAsk=Nota de credit pentru a corecta factura -InvoiceAvoirDesc=<b> Nota de credit </b> 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). +InvoiceAvoirDesc=<b>Nota de credit</b> 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 moment ce a returnat o parte din produse). invoiceAvoirWithLines=Creați Nota de credit cu liniile din factura sursă invoiceAvoirWithPaymentRestAmount=Creați Nota de credit cu valoarea neachitată a facturii sursă invoiceAvoirLineWithPaymentRestAmount=Notă de credit pentru valoarea rămasă neplătită @@ -43,7 +43,7 @@ ConsumedBy=Consumat de NotConsumed=Neconsumat NoReplacableInvoice=Nu există facturi înlocuibile NoInvoiceToCorrect=Nicio factură de corectat -InvoiceHasAvoir=A fost sursa una sau mai multor note de credit +InvoiceHasAvoir=A fost sursa uneia sau mai multor note de credit CardBill=Fişă Factură PredefinedInvoices=Facturi Predefinite Invoice=Factură @@ -52,17 +52,18 @@ Invoices=Facturi InvoiceLine=Linie Factură InvoiceCustomer=Factură Client CustomerInvoice=Factură Client -CustomersInvoices=Facturi Clienţi -SupplierInvoice=Factura furnizor -SuppliersInvoices=Facturi Furnizori -SupplierBill=Factura furnizor -SupplierBills=Facturi Furnizori +CustomersInvoices=Facturi clienţi +SupplierInvoice=Factură furnizor +SuppliersInvoices=Facturi furnizori +SupplierInvoiceLines=Linii de factură furnizor +SupplierBill=Factură furnizor +SupplierBills=Facturi furnizori Payment=Plată PaymentBack=Rambursare CustomerInvoicePaymentBack=Rambursare Payments=Plăţi PaymentsBack=Rambursări -paymentInInvoiceCurrency=in moneda facturii +paymentInInvoiceCurrency=în moneda facturii PaidBack=Restituit DeletePayment=Ştergere plată ConfirmDeletePayment=Sunteţi sigur că doriţi să ştergeţi această plată? @@ -70,10 +71,10 @@ ConfirmConvertToReduc=Vrei să converteşti această %s într-un credit disponib 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 +SupplierPayments=Plăți furnizor ReceivedPayments=Încasări primite -ReceivedCustomersPayments=Încasări Clienţi -PayedSuppliersPayments=Plăţi plătite furnizorilor +ReceivedCustomersPayments=Încasări de la clienţi +PayedSuppliersPayments=Plăţi către furnizori ReceivedCustomersPaymentsToValid=Încasări Clienţi de validat PaymentsReportsForYear=Rapoarte Plăţi pentru %s PaymentsReports=Rapoarte Plăţi @@ -81,25 +82,27 @@ PaymentsAlreadyDone=Plăţi deja efectuate PaymentsBackAlreadyDone=Rambursări efectuate deja PaymentRule=Mod de Plată PaymentMode=Tipul plăţii -PaymentTypeDC=Card de debit/de credit +DefaultPaymentMode=Tip de plată implicit +DefaultBankAccount=Cont bancar implicit +PaymentTypeDC=Card de debit/credit PaymentTypePP=PayPal IdPaymentMode=Tipul plăţii (id) CodePaymentMode=Tipul plăţii (cod) -LabelPaymentMode=Tipul plăţii (etichetă) +LabelPaymentMode=Tipul plăţii (denumire) PaymentModeShort=Tipul plăţii -PaymentTerm=Termenul plăţii +PaymentTerm=Termen de plată PaymentConditions=Termeni de plată PaymentConditionsShort=Termeni de plată PaymentAmount=Sumă de plată PaymentHigherThanReminderToPay=Plată mai mare decât restul de plată HelpPaymentHigherThanReminderToPay=Atenție, suma de plată a uneia sau mai multor facturi este mai mare decât suma rămasă neachitată. <br> Modificați intrarea dvs., în caz contrar confirmați şi luați în considerare crearea unei note de credit pentru suma în exces primită pentru fiecare sumă primită în plus. -HelpPaymentHigherThanReminderToPaySupplier=Atenție, suma de plată a uneia sau mai multor facturi este mai mare decât suma rămasă neachitată. <br> Modificați intrarea dvs., în caz contrar confirmați şi luați în considerare crearea unei note de credit pentru suma în exces primită pentru fiecare sumă plătită în plus. +HelpPaymentHigherThanReminderToPaySupplier=Atenție, suma de plată a uneia sau mai multor facturi este mai mare decât suma rămasă neachitată. <br> Modifică intrarea, în caz contrar confirmă şi ia în considerare crearea unei note de credit pentru suma în exces primită pentru fiecare factură cu excendent. ClassifyPaid=Clasează "Platită" -ClassifyUnPaid=Clasează "Neplătită" -ClassifyPaidPartially=Clasează "Platită Parţial" -ClassifyCanceled=Clasează "Abandonată" -ClassifyClosed=Clasează "Închisă" -ClassifyUnBilled=Clasează Nefacturat +ClassifyUnPaid=Clasează ca 'Neplătită' +ClassifyPaidPartially=Clasează ca 'Plătită parţial' +ClassifyCanceled=Clasează ca 'Abandonată' +ClassifyClosed=Clasează ca 'Închisă' +ClassifyUnBilled=Clasează ca 'Nefacturată' CreateBill=Crează Factura CreateCreditNote=Creare Notă de credit AddBill=Crează Factura sau Notă de Credit @@ -108,17 +111,17 @@ DeleteBill=Ştergere factura SearchACustomerInvoice=Caută o factură client SearchASupplierInvoice=Căutați o factură furnizor CancelBill=Anulează o factură -SendRemindByMail=Trimite memento prin e-mail -DoPayment=Introduce o plată -DoPaymentBack=Introduceți rambursarea +SendRemindByMail=Trimite reminder pe email +DoPayment=Introdu o plată +DoPaymentBack=Introdu rambursarea ConvertToReduc=Marchează ca credit disponibil -ConvertExcessReceivedToReduc=Transformați excesul primit în credit disponibil -ConvertExcessPaidToReduc=Conversia excesului plătit în reducerea disponibilă +ConvertExcessReceivedToReduc=Transformă excedentul încasat în credit disponibil +ConvertExcessPaidToReduc=Converteşte excendentul plătit în reducere disponibilă EnterPaymentReceivedFromCustomer=Introduceţi o încasare de la client EnterPaymentDueToCustomer=Introduceţi o plată restituire pentru client DisabledBecauseRemainderToPayIsZero=Dezactivată pentru că restul de plată este zero PriceBase=Preţul de bază -BillStatus=Status Factura +BillStatus=Status factură StatusOfGeneratedInvoices=Status factură generată BillStatusDraft=Schiţă (de validat) BillStatusPaid=Plătite @@ -128,11 +131,11 @@ BillStatusCanceled=Abandonate BillStatusValidated=Validate (de plată) BillStatusStarted=Începută BillStatusNotPaid=Neplătită -BillStatusNotRefunded=Nerabursabil +BillStatusNotRefunded=Nerambursabil BillStatusClosedUnpaid=Închisă (neplătită) BillStatusClosedPaidPartially=Platite (parţial) BillShortStatusDraft=Schiţă -BillShortStatusPaid=Platite +BillShortStatusPaid=Plătite BillShortStatusPaidBackOrConverted=Rambursată sau convertită Refunded=Rambursată BillShortStatusConverted=Plătite @@ -140,11 +143,11 @@ BillShortStatusCanceled=Abandonată BillShortStatusValidated=Validată BillShortStatusStarted=Începută BillShortStatusNotPaid=Neplatită -BillShortStatusNotRefunded=Nerabursabil +BillShortStatusNotRefunded=Nerambursabil BillShortStatusClosedUnpaid=Închisă BillShortStatusClosedPaidPartially=Platită (parţial) PaymentStatusToValidShort=De validat -ErrorVATIntraNotConfigured=Codul TVA intracomunitar nu a fost încă definit +ErrorVATIntraNotConfigured=Codul de TVA intracomunitar nu a fost încă definit ErrorNoPaiementModeConfigured=Nu a fost definit niciun tip de plată implicit. Accesați modul de configurare a modulelor de facturare pentru a remedia această problemă. ErrorCreateBankAccount=Creați un cont bancar, apoi mergeți la panoul de configurare din modulul factură pentru a defini tipurile de plăți ErrorBillNotFound=Factura %s nu există @@ -153,39 +156,39 @@ ErrorDiscountAlreadyUsed=Eroare, reducerea a fost deja utilizată ErrorInvoiceAvoirMustBeNegative=Eroare, factura de corecţie trebuie să aibă o valoare negativă 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ă. +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Această parte sau alta este deja utilizată, astfel încât seria de reduceri nu poate fi eliminată. BillFrom=De la BillTo=La -ActionsOnBill=Evenimente pe factura +ActionsOnBill=Evenimente pe factură RecurringInvoiceTemplate=Șablon / factură recurentă NoQualifiedRecurringInvoiceTemplateFound=Nu există un model de factură potrivit pentru generare. FoundXQualifiedRecurringInvoiceTemplate=Au fost găsite %s modele de facturi recurente potrivite pentru generare. NotARecurringInvoiceTemplate=Nu este un model de factură recurentă. NewBill=Factură nouă -LastBills=Ultimele%s facturi -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 +LastBills=Ultimele %s facturi +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 +AllCustomerTemplateInvoices=Toate șabloanele de factură OtherBills=Alte facturi DraftBills=Facturi schiţă CustomersDraftInvoices=Facturi client schiţă SuppliersDraftInvoices=Facturi furnizor schiţă Unpaid=Neachitate -ErrorNoPaymentDefined=Eroare Nu este definită plata +ErrorNoPaymentDefined=Eroare Nu este definită nicio plată ConfirmDeleteBill=Sunteţi sigur că doriţi să ştergeţi această factură? -ConfirmValidateBill=Sigur doriţi să validaţi această factură cu referinţa<b>%s</b>? -ConfirmUnvalidateBill=Sigur doriţi să schimbaţi factura <b>%s</b>la statusul de schiţă ? -ConfirmClassifyPaidBill=Sigur doriţi să schimbaţi factura <b>%s</b>la statusul plătită ? -ConfirmCancelBill=Sigur doriţi să anulaţi factura <b> %s</b> ? -ConfirmCancelBillQuestion=De ce doriți clasificarea acestei facturi ca "abandonată"? -ConfirmClassifyPaidPartially=Sigur doriţi să schimbaţi factura <b>%s</b>la statusul plătită ? -ConfirmClassifyPaidPartiallyQuestion=Acestă factură nu a fost plătită complet. Care este motivul închiderii acestei facturi? +ConfirmValidateBill=Sigur doriţi să validaţi factura cu referinţa <b>%s</b>? +ConfirmUnvalidateBill=Sigur doriţi să schimbaţi factura <b>%s</b> la statusul de schiţă? +ConfirmClassifyPaidBill=Sigur doriţi să schimbaţi factura <b>%s</b> la statusul Plătită ? +ConfirmCancelBill=Sigur doriţi să anulaţi factura <b>%s</b> ? +ConfirmCancelBillQuestion=De ce doriți clasificarea acestei facturi ca 'abandonată'? +ConfirmClassifyPaidPartially=Sigur doriţi să schimbaţi factura <b>%s</b> la statusul Plătită ? +ConfirmClassifyPaidPartiallyQuestion=Acestă factură nu a fost achitată complet. Care este motivul închiderii acestei facturi? ConfirmClassifyPaidPartiallyReasonAvoir=Rămasă neplătită <b> (%s %s) </b> este o reducere acordată deoarece plata a fost făcută înainte de termen. Regularizez TVA-ul cu notă de credit. -ConfirmClassifyPaidPartiallyReasonDiscount=Rămâne neplătit <b> (%s %s) </b> este o reducere acordată pentru că plata a fost făcută înainte de termen. +ConfirmClassifyPaidPartiallyReasonDiscount=Rest neachitat <b> (%s %s) </b> este o reducere acordată pentru că plata a fost făcută înainte de termen. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Restul de plată <b>( %s %s)</b> este un discount acordat la plată, pentru că a fost făcută înainte de termen. Accept piarderea TVA-ului pentru această reducere. ConfirmClassifyPaidPartiallyReasonDiscountVat=Restul de plată <b>( %s %s)</b> este un discount acordat la plată, pentru că a fost făcută înainte de termen. Recuperez TVA-ul de pe această reducere fără o notă de credit. ConfirmClassifyPaidPartiallyReasonBadCustomer=Client rău platnic @@ -194,20 +197,20 @@ ConfirmClassifyPaidPartiallyReasonOther=Creanţă abandonată din alte motive ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Această alegere este posibilă dacă factura dvs. a fost furnizată cu comentarii adecvate. (Exemplu «Numai impozitul care corespunde prețului plătit efectiv dă dreptul la deducere») ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=În unele țări, această alegere ar putea fi posibilă numai dacă factura conține note corecte. ConfirmClassifyPaidPartiallyReasonAvoirDesc=Utilizaţi această opţiune dacă toate celelalte nu se potrivesc -ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=Un <b> client rău</b> este un client care refuză să-și plătească datoria. +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=Un <b>client rău</b> este un client care refuză să-și achite datoria. ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Această opţiune este utilizată atunci când plata nu este completă, deoarece unele produse au fost returnate -ConfirmClassifyPaidPartiallyReasonOtherDesc=Utilizați această opțiune dacă toate celelalte nu sunt potrivite, de exemplu în următoarea situație: <br> - plata nu este completă deoarece unele produse au fost returnate <br> - suma revendicată prea importantă deoarece o reducere a fost uitată <br> În toate cazurile, suma depășită trebuie corectată în sistemul contabil prin crearea unei note de credit. +ConfirmClassifyPaidPartiallyReasonOtherDesc=Utilizați această opțiune dacă toate celelalte nu sunt potrivite, de exemplu în următoarea situație: <br> - plata nu este completă deoarece unele produse au fost returnate <br> - suma revendicată este prea importantă deoarece o reducere a fost uitată <br> În toate cazurile, suma depășită trebuie corectată în sistemul contabil prin crearea unei note de credit. ConfirmClassifyAbandonReasonOther=Altele ConfirmClassifyAbandonReasonOtherDesc=Această opţiune va fi folosită în toate celelalte cazuri. De exemplu, dacă ai dori să creezi o factura de inlocuire a facturii. ConfirmCustomerPayment=Confirmaţi introducerea plăţii pentru <b>%s</b> %s ? ConfirmSupplierPayment=Confirmaţi introducerea plăţii pentru <b>%s</b> %s ? -ConfirmValidatePayment=Sunteți sigur că doriți validarea acestei plăti? Nici o schimbare nu mai este posibilă după validarea plății. +ConfirmValidatePayment=Sunteți sigur că doriți validarea acestei plăti? Nicio modificare nu mai este posibilă după validarea plății. ValidateBill=Validează factura UnvalidateBill=Devalidează factura -NumberOfBills=Numar de facturi +NumberOfBills=Nr. de facturi NumberOfBillsByMonth=Nr. de facturi pe lună AmountOfBills=Valoare facturi -AmountOfBillsHT=Suma facturilor (fără impozit) +AmountOfBillsHT=Suma facturilor (fără taxe) AmountOfBillsByMonthHT=Valoarea facturilor pe luni (fără tva) UseSituationInvoices=Permite utilizare factură centralizatoare UseSituationInvoicesCreditNote=Permite utilizare factură centralizatoare @@ -252,16 +255,16 @@ SendReminderBillByMail=Trimite memento prin e-mail RelatedCommercialProposals=Oferte comerciale asociate RelatedRecurringCustomerInvoices=Facturi recurente client asociate MenuToValid=De validat -DateMaxPayment=Plata datorată la +DateMaxPayment=Dată scadenţă la DateInvoice=Data facturării -DatePointOfTax=Impozitare +DatePointOfTax=Impozitare taxare NoInvoice=Nicio factură ClassifyBill=Clasează factura -SupplierBillsToPay=Facturi neplătite pentru furnizor +SupplierBillsToPay=Facturi furnizor neplătite CustomerBillsUnpaid=Facturi clienţi neîncasate NonPercuRecuperable=Nerecuperabilă -SetConditions=Setați termenii de plată -SetMode=Setați tipul de plată +SetConditions=Setare termeni de plată +SetMode=Setare tip de plată SetRevenuStamp=Timbru fiscal Billed=Facturat RecurringInvoices=Facturi recurente @@ -272,9 +275,9 @@ Repeatables=Modele ChangeIntoRepeatableInvoice=Converteşte in model factură CreateRepeatableInvoice=Crează model factură CreateFromRepeatableInvoice=Crează din model factură -CustomersInvoicesAndInvoiceLines=Facturi ale clienților si detalii ale facturilor +CustomersInvoicesAndInvoiceLines=Facturi clienți şi detalii CustomersInvoicesAndPayments=Facturi Clienţi şi plăţi -ExportDataset_invoice_1=Facturi ale clienților si detalii ale facturilor +ExportDataset_invoice_1=Facturi clienți şi detalii ExportDataset_invoice_2=Facturi Clienţi şi plăţi ProformaBill=Factură Proforma : Reduction=Reducere @@ -313,10 +316,10 @@ DiscountOfferedBy=Acordate de DiscountStillRemaining=Reduceri sau credite disponibile DiscountAlreadyCounted=Reduceri sau credite deja consumate CustomerDiscounts=Reducere pentru clienți -SupplierDiscounts=Reducerea furnizorilor +SupplierDiscounts=Reduceri furnizori BillAddress=Adresa de facturare HelpEscompte=Această reducere este o reducere acordată clientului, deoarece plata a fost efectuată înainte de termen. -HelpAbandonBadCustomer=Această sumă a fost abandonată (clientul a declarat că este un client rău) și este considerată o pierdere excepțională. +HelpAbandonBadCustomer=Această sumă a fost abandonată (clientul a fost declarat ca rău-platnic) și este considerată o pierdere excepțională. HelpAbandonOther=Această sumă a fost abandonată deoarece a fost o eroare (client greșit sau factură înlocuită de alta, de exemplu) IdSocialContribution=Id Plata taxa sociala / fiscala PaymentId=ID Plată @@ -337,10 +340,10 @@ WatermarkOnDraftBill=Filigran pe facturile schiţă (nimic dacă gol) InvoiceNotChecked=Nicio factură selectată ConfirmCloneInvoice=Sigur doriţi să clonaţi această factură <b> %s</b>? DisabledBecauseReplacedInvoice=Acţiunea dezactivată, pentru că factura a fost înlocuită -DescTaxAndDividendsArea=Această zonă prezintă un rezumat al tuturor plăților efectuate pentru cheltuieli speciale. Numai înregistrările cu plăți în cursul anului fix sunt incluse aici. -NbOfPayments=Numărul plății +DescTaxAndDividendsArea=Această zonă prezintă un rezumat al tuturor plăților efectuate pentru cheltuieli speciale. Numai înregistrările cu plăți în cursul anului sunt incluse aici. +NbOfPayments=Nr. de plăți SplitDiscount=Imparte reducerea în două -ConfirmSplitDiscount=Sigur doriți să împărțiți această reducere la două reduceri mai mici de <b> %s </b> %s? +ConfirmSplitDiscount=Sigur doriți să împărțiți această reducere de <b>%s</b> %s în două reduceri mai mici? TypeAmountOfEachNewDiscount=Suma de intrare pentru fiecare din cele două părți: TotalOfTwoDiscountMustEqualsOriginal=Suma celor două noi reduceri trebuie să fie egală cu suma discountului inițial. ConfirmRemoveDiscount=Sigur doriţi să eliminaţi această reducere? @@ -366,23 +369,24 @@ FrequencyPer_d=La fiecare %s zile FrequencyPer_m=La fiecare %s luni FrequencyPer_y=La fiecare %s ani FrequencyUnit=Unitate de frecvență -toolTipFrequency=Exemple: <br> <b> Configurează 7, Zi </b>: da o nouă factură la fiecare 7 zile <br> <b> Configurează 3, Lună </b>: da o nouă factură la fiecare 3 luni +toolTipFrequency=Exemple: <br><b>Setează 7, Zi</b>: generează o nouă factură la fiecare 7 zile<br><b>Setează 3, Lună</b>: generează o nouă factură la fiecare 3 luni NextDateToExecution=Data pentru următoarea generare a facturii -NextDateToExecutionShort=Data următoarei gen. +NextDateToExecutionShort=Data următoarei generări. DateLastGeneration=Ultima dată de generare -DateLastGenerationShort=Data ultimei gen. -MaxPeriodNumber=Numărul maxim de generare a facturilor -NbOfGenerationDone=Numărul de generații de facturi deja efectuate -NbOfGenerationDoneShort=Numărul de generații efectuate -MaxGenerationReached=Numărul maxim de generații atins +DateLastGenerationShort=Data ultimei generări. +MaxPeriodNumber=Nr. maxim de facturi generate +NbOfGenerationDone=Număr de generări de facturi deja efectuate +NbOfGenerationOfRecordDone=Numărul de generare de înregistrări deja realizat +NbOfGenerationDoneShort=Număr de generări efectuate +MaxGenerationReached=Numărul maxim de generări a fost atins 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=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 +WarningInvoiceDateInFuture=Atenţie, data facturii este mai mare decât data curentă +WarningInvoiceDateTooFarInFuture=Atenţie, data facturii este prea îndepărtată de data curentă +ViewAvailableGlobalDiscounts=Vezi reduceri disponibile GroupPaymentsByModOnReports=Grupare plăţi după tip în rapoarte # PaymentConditions Statut=Status @@ -398,7 +402,7 @@ PaymentConditionShort60DENDMONTH=60 zile la sfarsitul lunii PaymentCondition60DENDMONTH=In 60 zile dupa sfarsitul lunii PaymentConditionShortPT_DELIVERY=La livrare PaymentConditionPT_DELIVERY=La livrare -PaymentConditionShortPT_ORDER=Comanda +PaymentConditionShortPT_ORDER=Ordin de plată PaymentConditionPT_ORDER=Pe comandă PaymentConditionShortPT_5050=50-50 PaymentConditionPT_5050=50%% în avans, 50%% la livrare @@ -413,11 +417,11 @@ PaymentCondition14DENDMONTH=În termen de 14 zile de la sfârșitul lunii FixAmount=Sumă fixă - 1 linie cu eticheta '%s' VarAmount=Valoare variabilă (%% tot.) VarAmountOneLine=Cantitate variabilă (%% tot.) - 1 rând cu eticheta "%s" -VarAmountAllLines=Sumă variabilă (%% tot.) - aceiaşi pe toate liniile +VarAmountAllLines=Valoare variabilă (%% tot.) - toate liniile de origine # PaymentType PaymentTypeVIR=Transfer bancar PaymentTypeShortVIR=Transfer bancar -PaymentTypePRE=Ordin de plata prin debit direct +PaymentTypePRE=Ordin de plată prin direct debit PaymentTypeShortPRE=Ordin de plată de debit PaymentTypeLIQ=Numerar PaymentTypeShortLIQ=Numerar @@ -427,8 +431,8 @@ PaymentTypeCHQ=Cec PaymentTypeShortCHQ=Cec PaymentTypeTIP=D/ P (Documente contra plata) PaymentTypeShortTIP=D/ P Plata -PaymentTypeVAD=Plata online -PaymentTypeShortVAD=Plata online +PaymentTypeVAD=Plată online +PaymentTypeShortVAD=Plată online PaymentTypeTRA=Schita banca PaymentTypeShortTRA=Schita PaymentTypeFAC=Factor @@ -437,14 +441,14 @@ BankDetails=Coordonate Bancă BankCode=Cod Bancă DeskCode=Codul filialei BankAccountNumber=Număr cont -BankAccountNumberKey=checksum +BankAccountNumberKey=Sumă de control Residence=Adresă -IBANNumber=Numărul contului IBAN +IBANNumber=Nr. cont IBAN IBAN=IBAN CustomerIBAN=IBAN client SupplierIBAN=IBAN furnizor BIC=BIC / SWIFT -BICNumber=cod BIC/SWIFT +BICNumber=Cod BIC/SWIFT ExtraInfos=Informaţii suplimentare RegulatedOn=Plătite pe ChequeNumber=Cec Nr @@ -459,10 +463,10 @@ FullPhoneNumber=Telefon TeleFax=Fax PrettyLittleSentence=Accept plata sumelor datorate prin cecurile emise pe numele meu ca un membru al unei asociații de contabilitate aprobată de către administrația fiscală. IntracommunityVATNumber=Cod de identificare TVA intracomunitar -PaymentByChequeOrderedTo=Verificați plățile (inclusiv taxele) sunt plătibile la %s, trimiteți la -PaymentByChequeOrderedToShort=Plățilecu cec (inclusiv taxele) se fac către +PaymentByChequeOrderedTo=Plăți cu cec (cu taxe) achitate către %s, predate +PaymentByChequeOrderedToShort=Plățile cu cec (cu taxe) se fac către SendTo=trimis la -PaymentByTransferOnThisBankAccount=Plata prin transfer către următorul cont bancar +PaymentByTransferOnThisBankAccount=Plată prin transfer către următorul cont bancar VATIsNotUsedForInvoice=* TVA neaplicabil art-293B din CGI LawApplicationPart1=Prin aplicarea legii 80.335 din 12.05.80 LawApplicationPart2=mărfurile rămân în proprietatea @@ -473,49 +477,53 @@ UseLine=Aplică UseDiscount=Aplică discount UseCredit=Utilizează credit UseCreditNoteInInvoicePayment=Reduce suma de plată cu acest credit -MenuChequeDeposits=Verificați depozitele +MenuChequeDeposits=Cecuri MenuCheques=Cecuri -MenuChequesReceipts=Verificați chitanțele +MenuChequesReceipts=File cec NewChequeDeposit=Depozit nou -ChequesReceipts=Verificați chitanțele -ChequesArea=Verificați zona depozitelor -ChequeDeposits=Verificați depozitele +ChequesReceipts=File cec +ChequesArea=Cecuri +ChequeDeposits=Cecuri Cheques=Cecuri DepositId=Depozit id NbCheque=Număr cecuri CreditNoteConvertedIntoDiscount=Acest %s a fost transformat în %s -UsBillingContactAsIncoiveRecipientIfExist=Utilizați contactul / adresa cu tipul de "contact de facturare" în loc de adresa terțului ca destinatar pentru facturi +UsBillingContactAsIncoiveRecipientIfExist=Utilizați contactul/adresa de tipul de "contact de facturare" în loc de adresa terțului ca destinatar pentru facturi ShowUnpaidAll=Afişează toate facturile neachitate ShowUnpaidLateOnly=Afişează numai facturile întârziate la plată PaymentInvoiceRef=Plată factură %s ValidateInvoice=Validează factura -ValidateInvoices=Validați facturile +ValidateInvoices=Validare facturi Cash=Numerar Reported=Întârziat DisabledBecausePayments=Nu este posibil, deoarece există unele plăţi CantRemovePaymentWithOneInvoicePaid=Nu se poate elimina plata deoarece există cel puțin o factură clasificată plătită +CantRemovePaymentVATPaid=Nu se poate elimina plata deoarece declarația de TVA este clasificată ca fiind plătită +CantRemovePaymentSalaryPaid=Nu se poate elimina plata deoarece salariul este clasificat plătit ExpectedToPay=Plată prevăzută CantRemoveConciliatedPayment=Nu se poate elimina plata reconciliată PayedByThisPayment=Achitat cu aceasta plată 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". +ClosePaidVATAutomatically=Clasificați automat declarația TVA ca "Plătită" atunci când plata se face în întregime. +ClosePaidSalaryAutomatically=Clasificați automat salariul ca "Plătit" atunci când plata se face în întregime. +AllCompletelyPayedInvoiceWillBeClosed=Toate facturile fără niciun rest 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ă 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ț +YouMustCreateInvoiceFromThird=Această opțiune este disponibilă numai când creați o factură din fişa "Client" a unui terț +YouMustCreateInvoiceFromSupplierThird=Această opțiune este disponibilă numai când creați o factură din fişa "Furnizor" a unui terț YouMustCreateStandardInvoiceFirstDesc=Intai se poate crea o factură standard si se transforma in model pentru a avea un nou model de factura. 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 +TerreNumRefModelDesc1=Returnează numărul în format %syymm-nnnn pentru facturile standard și %syymm-nnnn pentru notele de credit în care yy este anul, mm este luna și nnnn este un număr secvențial de auto-incrementare fără întrerupere și fără revenire la 0 +MarsNumRefModelDesc1=Returnează numărul în format %syymm-nnnn pentru facturile standard, %syymm-nnnn pentru facturile de înlocuire, %syymm-nnnn pentru facturile de avans și %syymm-nnnn pentru notele de credit în care yy este anul, mm este luna și nnnn este un număr secvențial de creștere automată fără întrerupere și fără revenire 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 +CactusNumRefModelDesc1=Returnează un număr în format %syymm-nnnn pentru facturile standard, %syymm-nnnn pentru note de credit și %syymm-nnnn pentru facturile de avans în care yy este anul, mm este luna, iar nnnn este un număr secvențial de incrementare automată fără întrerupere și fără revenire la 0 EarlyClosingReason= Motiv de închidere timpurie EarlyClosingComment=Notă de închidere timpurie ##### Types de contacts ##### @@ -523,15 +531,15 @@ TypeContact_facture_internal_SALESREPFOLL=Responsabil urmarire factură client TypeContact_facture_external_BILLING=Contact facturare client TypeContact_facture_external_SHIPPING=Contact livrare client TypeContact_facture_external_SERVICE=Contact service client -TypeContact_invoice_supplier_internal_SALESREPFOLL=Factură reprezentantă furnizor -TypeContact_invoice_supplier_external_BILLING=Contactul facturii furnizorului -TypeContact_invoice_supplier_external_SHIPPING=Contactul furnizorului de transport -TypeContact_invoice_supplier_external_SERVICE=Contactul furnizorului de servicii +TypeContact_invoice_supplier_internal_SALESREPFOLL=Reprezentant urmărire facturi al furnizorului +TypeContact_invoice_supplier_external_BILLING=Contact de facturare al furnizorului +TypeContact_invoice_supplier_external_SHIPPING=Contact de livrare al furnizorului +TypeContact_invoice_supplier_external_SERVICE=Contact de servicii al furnizorului # Situation invoices InvoiceFirstSituationAsk=Prima factură de situaţie pentru lucrări de construcţii InvoiceFirstSituationDesc=<b>Factura de situație</b> este legată de progresia unei lucrări, de exemplu progresia unei construcții. Fiecare situație este legată de o factură. InvoiceSituation=Factură de situaţie -PDFInvoiceSituation=Factura de situaţie +PDFInvoiceSituation=Factură de situaţie InvoiceSituationAsk=Factură urmarind situaţia InvoiceSituationDesc=Creaza o situatie noua urmarind una existenta deja SituationAmount=Valoare (neta) factură de situaţie @@ -545,7 +553,7 @@ NotLastInCycle=Aceasta factura nu este ultima din serie si nu trebuie modificata DisabledBecauseNotLastInCycle=Urmatoarea situatie deja exista DisabledBecauseFinal=Aceasta situatie este finala situationInvoiceShortcode_AS=LA FEL CA -situationInvoiceShortcode_S=D +situationInvoiceShortcode_S=S CantBeLessThanMinPercent=Progresul nu poate fi mai mic decat valoarea lui in precedenta situatie NoSituations=Nicio situatie deschisa InvoiceSituationLast=Factură finală si generală @@ -555,28 +563,29 @@ PDFCrevetteSituationInvoiceTitle=Factura de situaţie PDFCrevetteSituationInvoiceLine=Situația Nr. %s: Inv. Nr %s pe %s TotalSituationInvoice=Total situaţie invoiceLineProgressError=Progresul liniei din factură nu poate fi egal sau mai mare decat următoarea linie -updatePriceNextInvoiceErrorUpdateline=Eroare: actualizați prețul pe linia de facturare: %s +updatePriceNextInvoiceErrorUpdateline=Eroare: actualizare preț pe linia de facturare: %s ToCreateARecurringInvoice=Pentru a crea o factură recurentă la acest contract, se creeaza intai o factura schita, apoi se transforma cu un model de factura si se defineste frecventa generarii facturilor urmatoare. ToCreateARecurringInvoiceGene=Meniu pentru a crea facturi recurente manual <strong>%s - %s - %s</strong>. -ToCreateARecurringInvoiceGeneAuto=Dacă trebuie să generați automat astfel de facturi, cereți administratorului să activeze și să configureze modulul <strong> %s </strong>. Rețineți că ambele metode (manuală și automată) pot fi utilizate împreună fără riscul dublării. -DeleteRepeatableInvoice=Ștergeți șablonul facturii +ToCreateARecurringInvoiceGeneAuto=Dacă trebuie să generezi automat astfel de facturi, cere administratorului să activeze și să configureze modulul <strong> %s </strong>. Reține că ambele metode (manuală și automată) pot fi utilizate împreună fără riscul dublării. +DeleteRepeatableInvoice=Șterge șablon factură ConfirmDeleteRepeatableInvoice=Sigur doriți să ștergeți factura șablon? -CreateOneBillByThird=Creați o factură / terț (altfel, o factură pe comandă) -BillCreated= %s facturi create -StatusOfGeneratedDocuments=Starea generării de documente -DoNotGenerateDoc=Nu generați fișierul de documente +CreateOneBillByThird=Creați o factură pentru un terț (altfel, o factură pe o comandă) +BillCreated=%s factur(i) generate +BillXCreated=Factura %s a fost generată +StatusOfGeneratedDocuments=Status generare document +DoNotGenerateDoc=Nu genera fișierul document AutogenerateDoc=Generați automat fișierul document AutoFillDateFrom=Setați data de începere pentru linia de servicii cu data facturii AutoFillDateFromShort=Setați data de începere -AutoFillDateTo=Setați data de încheiere pentru linia de servicii cu data următoare a facturii +AutoFillDateTo=Setați data de încheiere pentru linia de servicii cu data facturii următoare AutoFillDateToShort=Setați data de încheiere -MaxNumberOfGenerationReached=Numărul maxim de gen. atins +MaxNumberOfGenerationReached=Numărul maxim de generări a fost atins BILL_DELETEInDolibarr=Factură ştearsă BILL_SUPPLIER_DELETEInDolibarr=Factură furnizor ştearsă -UnitPriceXQtyLessDiscount=Preţ unitar x Cantitate - Discount +UnitPriceXQtyLessDiscount=Preţ unitar x Cantitate - Discount CustomersInvoicesArea=Facturare clienţi SupplierInvoicesArea=Facturare furnizori FacParentLine=Linie de facturare părinte -SituationTotalRayToRest=Restul de plătit fără taxe +SituationTotalRayToRest=Rest de plată fără taxe PDFSituationTitle=Situaţia nr. %d SituationTotalProgress=Progres total %d %% diff --git a/htdocs/langs/ro_RO/boxes.lang b/htdocs/langs/ro_RO/boxes.lang index 6cc341fa46f..c755a8664f6 100644 --- a/htdocs/langs/ro_RO/boxes.lang +++ b/htdocs/langs/ro_RO/boxes.lang @@ -1,14 +1,15 @@ # Dolibarr language file - Source file is en_US - boxes -BoxLoginInformation=Informații de autentificare -BoxLastRssInfos=Informații RSS -BoxLastProducts=Ultimele %s Produse / Servicii -BoxProductsAlertStock=Alere Stoc pentru produse +BoxDolibarrStateBoard=Statistici privind principalele obiecte de afaceri din baza de date +BoxLoginInformation=Informații autentificare +BoxLastRssInfos=Flux RSS +BoxLastProducts=Ultimele %s Produse/Servicii +BoxProductsAlertStock=Alerte stoc produse BoxLastProductsInContract=Ultimele %s produse/ servicii contractate -BoxLastSupplierBills=Ultimele facturi ale furnizorilor -BoxLastCustomerBills=Ultimele facturi ale clienților +BoxLastSupplierBills=Ultimele facturi furnizori +BoxLastCustomerBills=Ultimele facturi client BoxOldestUnpaidCustomerBills=Cele mai vechi facturi clienţi neîncasate -BoxOldestUnpaidSupplierBills=Cele mai vechi facturi neachitate ale vânzătorului -BoxLastProposals=Ultimele oferte +BoxOldestUnpaidSupplierBills=Cele mai vechi facturi furnizori neachitate +BoxLastProposals=Ultimele oferte comerciale BoxLastProspects=Ultimii prospecţi modificaţi BoxLastCustomers=Ultimii clienţi modificaţi BoxLastSuppliers=Ultimii furnizori modificaţi @@ -17,41 +18,45 @@ BoxLastActions=Ultimele acţiuni BoxLastContracts=Ultimele contracte BoxLastContacts=Ultimele contacte/ adrese BoxLastMembers=Ultimii membri +BoxLastModifiedMembers=Ultimii membri modificaţi +BoxLastMembersSubscriptions=Ultimele adeziuni de membri BoxFicheInter=Ultimele intervenţii BoxCurrentAccounts=Sold conturi deschise -BoxTitleMemberNextBirthdays=Aniversări în acreastă lună (membri) +BoxTitleMemberNextBirthdays=Aniversări în această lună (membri) +BoxTitleMembersByType=Membri după tip +BoxTitleMembersSubscriptionsByYear=Adeziuni membri după an BoxTitleLastRssInfos=Ultimele %s noutăţi de la %s -BoxTitleLastProducts=Produse / Servicii: ultima %s modificată +BoxTitleLastProducts=Produse/Servicii: ultimele %s modificate BoxTitleProductsAlertStock=Produse: avertizare stoc BoxTitleLastSuppliers=Ultimii %s furnizori înregistraţi -BoxTitleLastModifiedSuppliers=Furnizori: ultima %s modificată -BoxTitleLastModifiedCustomers=Clienții: ultima %s modificată -BoxTitleLastCustomersOrProspects=Ultimii %s clienti sau prospecţi +BoxTitleLastModifiedSuppliers=Furnizori: ultimii %s modificaţi +BoxTitleLastModifiedCustomers=Clienți: ultimii %s modificaţi +BoxTitleLastCustomersOrProspects=Ultimii %s clienţi sau prospecţi 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 +BoxTitleOldestUnpaidCustomerBills=Facturi clienţi: ultimile %s neplătite +BoxTitleOldestUnpaidSupplierBills=Facturi furnizori: ultimile %s neachitate BoxTitleCurrentAccounts=Conturi deschise: balanțe BoxTitleSupplierOrdersAwaitingReception=Comenzi de achiziţie în aşteptare -BoxTitleLastModifiedContacts=Contacte / Adrese: ultima %s modificată +BoxTitleLastModifiedContacts=Contacte/Adrese: ultimile %s modificate 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 +BoxTitleLastContracts=Ultimele %s contracte modificate BoxTitleLastModifiedDonations=Ultimele %s donaţii modificate BoxTitleLastModifiedExpenses=Ultimele %s deconturi modificare -BoxTitleLatestModifiedBoms=Ultimile %sbonuri de consum modificate +BoxTitleLatestModifiedBoms=Ultimile %s bonuri de consum modificate BoxTitleLatestModifiedMos=Ultimile %s comenzi de producţie modificate BoxTitleLastOutstandingBillReached=Clienţii cu restanţe mai mari decât limita de credit acceptată -BoxGlobalActivity=Activitate globală ( facturi, oferte, comenzi) +BoxGlobalActivity=Activitate globală (facturi, oferte, comenzi) BoxGoodCustomers=Clienţi buni BoxTitleGoodCustomers=%s Clienţi buni BoxScheduledJobs=Joburi programate -BoxTitleFunnelOfProspection=Lead funnel +BoxTitleFunnelOfProspection=Funnel lead-uri FailedToRefreshDataInfoNotUpToDate=Actualizarea fluxului RSS a eșuat. Ultima actualizare reușită: %s LastRefreshDate=Ultima dată reîmprospătare NoRecordedBookmarks=Niciun bookmark definit. @@ -63,40 +68,40 @@ NoRecordedOrders=Nu sunt înregistrate comenzi de vânzări NoRecordedProposals=Nicio ofertă înregistrată NoRecordedInvoices=Nu sunt înregistrate facturi clienţi NoUnpaidCustomerBills=Nu sunt facturi clienţi neachitate -NoUnpaidSupplierBills=Nu sunt facturi furnizori neachitate -NoModifiedSupplierBills=Nu sunt facturi furnizori înregistrate +NoUnpaidSupplierBills=Nu sunt facturi furnizor neachitate +NoModifiedSupplierBills=Nu sunt facturi furnizor înregistrate NoRecordedProducts=Niciun produs / serviciu înregistrat NoRecordedProspects=Niciun prospect înregistrat NoContractedProducts=Niciun produs / serviciu contractat NoRecordedContracts=Niciun contract înregistrat NoRecordedInterventions=Nicio intervenție înregistrată -BoxLatestSupplierOrders=Ultimele comenzi de cumpărături +BoxLatestSupplierOrders=Ultimele comenzi de achiziţie BoxLatestSupplierOrdersAwaitingReception=Ultimile comenzi de achiziţie (în aşteptarea recepţiei) -NoSupplierOrder=Nu sunt înregistrate comenzi de cumpărături +NoSupplierOrder=Nu sunt înregistrate comenzi de achiziţie BoxCustomersInvoicesPerMonth=Facturi clienți pe lună BoxSuppliersInvoicesPerMonth=Facturi furnizori pe lună BoxCustomersOrdersPerMonth=Comenzi de vânzări pe lună BoxSuppliersOrdersPerMonth=Comenzi furnizori pe lună BoxProposalsPerMonth=Oferte pe luni NoTooLowStockProducts=Niciun produs sub limita minimă de stoc -BoxProductDistribution= Distribuție de produse/servicii +BoxProductDistribution= Distribuția pe produse/servicii 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 +BoxTitleLastModifiedSupplierBills= Facturi furnizor: ultimele %s modificate +BoxTitleLatestModifiedSupplierOrders=Comenzi furnizor: ultimele %s modificate +BoxTitleLastModifiedCustomerBills=Facturi clienți: ultimele %s modificate +BoxTitleLastModifiedCustomerOrders=Comenzi de vânzări: ultimele %s modificate BoxTitleLastModifiedPropals=Ultimele %s oferte modificate BoxTitleLatestModifiedJobPositions=Ultimile %s joburi modificate -BoxTitleLatestModifiedCandidatures=Ultimile %scandidaturi modificate +BoxTitleLatestModifiedCandidatures=Ultimile %s candidaturi job 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 +ChooseBoxToAdd=Adăugați widget pe dashboard +BoxAdded=Widget-ul a fost adăugat în tabloul tău de bord BoxTitleUserBirthdaysOfMonth=Aniversări în această lună (utilizatori) -BoxLastManualEntries=Ultimile înregistrări în contabilitate introduse manual sau fără document sursă  -BoxTitleLastManualEntries=%s ultimele înregistrări introduse manual sau fără document sursă  +BoxLastManualEntries=Ultimile înregistrări în contabilitate introduse manual sau fără document sursă +BoxTitleLastManualEntries=Ultimele %s înregistrări introduse manual sau fără document sursă NoRecordedManualEntries=Nici o înregistrare manuală în contabilitate BoxSuspenseAccount=Contorizează operaţiunea contabilă cu contul suspendat BoxTitleSuspenseAccount=Număr linii nealocate @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Ultimile %s livrări către clienţi NoRecordedShipments=Nici o livrare către clienţi BoxCustomersOutstandingBillReached=Clienţi care au epuizat limita de credit # Pages +UsersHome=Utilizatori și grupuri +MembersHome=Calitate de membru +ThirdpartiesHome=Terţi +TicketsHome=Tichete AccountancyHome=Contabilitate ValidatedProjects=Proiecte validate diff --git a/htdocs/langs/ro_RO/categories.lang b/htdocs/langs/ro_RO/categories.lang index 5bce5a6db56..efbd177ea76 100644 --- a/htdocs/langs/ro_RO/categories.lang +++ b/htdocs/langs/ro_RO/categories.lang @@ -1,24 +1,24 @@ # Dolibarr language file - Source file is en_US - categories Rubrique=Tag/Categorie Rubriques=Tag-uri/Categorii -RubriquesTransactions=Tag-uri/Categorii de tranzacții +RubriquesTransactions=Tag-uri/categorii tranzacții categories=tag-uri/categorii -NoCategoryYet=Niciun tag/categorie de acest tip creată +NoCategoryYet=Niciun tag/categorie de acest tip creat In=În -AddIn=Adăugă în +AddIn=Adaugă în modify=modifică -Classify=Clasează +Classify=Clasifică CategoriesArea=Tag-uri/Categorii -ProductsCategoriesArea=Taguri/Categorii Produse/Servicii +ProductsCategoriesArea=Tag-uri/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 +AccountsCategoriesArea=Tag-uri/categorii conturi bancare ProjectsCategoriesArea=Tag-uri/categorii proiecte UsersCategoriesArea=Tag-uri/categorii utilizatori SubCats=Subcategorii -CatList=Lista tag-uri/categorii +CatList=Listă tag-uri/categorii CatListAll=Listă tag-uri/categorii (toate tipurile) NewCategory=Tag/categorie nouă ModifCat=Modifică tag/categorie @@ -33,9 +33,9 @@ WasAddedSuccessfully=<b> %s</b> 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 tag-uri/categorii de furnizori +CompanyIsInSuppliersCategories=Acest terț este asociat la 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 +ContactIsInCategories=Acest contact este asociat cu următoarele tag-uri/categorii de 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 @@ -79,7 +79,7 @@ CatSupLinks=Legături î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 -CatMembersLinks=Legături între membri şi tag-uri/categorii +CatMembersLinks=Asocieri între membri şi tag-uri/categorii CatProjectsLinks=Asocieri între proiecte și tag-uri/categorii CatUsersLinks=Legături între utilizatori şi tag-uri/categorii DeleteFromCat=Elimină din tag-uri/categoriii diff --git a/htdocs/langs/ro_RO/companies.lang b/htdocs/langs/ro_RO/companies.lang index 044d0a52957..3b606f937a1 100644 --- a/htdocs/langs/ro_RO/companies.lang +++ b/htdocs/langs/ro_RO/companies.lang @@ -1,20 +1,20 @@ # Dolibarr language file - Source file is en_US - companies ErrorCompanyNameAlreadyExists=Numele societăţii %s există deja. Alegeţi un altul. -ErrorSetACountryFirst=Setaţi mai întâi ţară +ErrorSetACountryFirst=Setaţi mai întâi ţara SelectThirdParty=Selectaţi un terţ ConfirmDeleteCompany=Sigur doriți să ștergeți această companie și toate informațiile moștenite? -DeleteContact=Şterge un contact +DeleteContact=Şterge un contact/adresă ConfirmDeleteContact=Sigur doriți să ștergeți acest contact și toate informațiile moștenite? MenuNewThirdParty=Terț nou MenuNewCustomer=Client nou MenuNewProspect=Prospect nou MenuNewSupplier=Furnizor nou -MenuNewPrivateIndividual=Particular nou +MenuNewPrivateIndividual=Persoană fizică nouă NewCompany=Companie nouă (prospect, client, furnizor) NewThirdParty=Terț nou (prospect, client, furnizor) -CreateDolibarrThirdPartySupplier=Creează un terț (furnizor) +CreateDolibarrThirdPartySupplier=Crează un terț (furnizor) CreateThirdPartyOnly=Creare terţ -CreateThirdPartyAndContact=Creați un terț + un contact pentru copil +CreateThirdPartyAndContact=Creați un terț + un contact asociat ProspectionArea=Prospecţi IdThirdParty=ID Terţ IdCompany=ID Societate @@ -23,7 +23,7 @@ ThirdPartyContacts=Contacte terți ThirdPartyContact=Contact/adresă terț Company=Societate CompanyName=Nume societate -AliasNames=Alias (comercial, marca inregistrata, ...) +AliasNames=Alias (comercial, marcă inregistrată, ...) AliasNameShort=Alias Companies=Societăţi CountryIsInEEC=Țara se află în interiorul Comunității Economice Europene @@ -40,14 +40,15 @@ ThirdPartyCustomersWithIdProf12=Clienţii cu %s sau %s ThirdPartySuppliers=Furnizori ThirdPartyType=Tip de terț 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ă. +ToCreateContactWithSameName=Va crea automat o persoană de contact/adresă cu aceleași informații ca și a terțului. În cele mai multe cazuri, chiar dacă terțul este o persoană fizică, este suficientă doar crearea terțului. ParentCompany=Societatea-mamă -Subsidiaries=Filiale -ReportByMonth=Raportați pe lună -ReportByCustomers=Raportați pe client -ReportByQuarter=Raport pe rată +Subsidiaries=Filiale - sedii +ReportByMonth=Raport pe lună +ReportByCustomers=Raport pe client +ReportByThirdparties=Raport pe terţ +ReportByQuarter=Raport pe cotă CivilityCode=Mod adresare -RegisteredOffice=Sediul social +RegisteredOffice=Sediu social Lastname=Nume Firstname=Prenume PostOrFunction=Funcţie @@ -57,34 +58,34 @@ NatureOfContact=Natură contact Address=Adresă State=Regiune/Judeţ StateCode=Cod judeţ/provincie -StateShort=Stare +StateShort=Stat Region=Regiune -Region-State=Region - Țară +Region-State=Regiune - Țară Country=Ţară CountryCode=Cod ţară CountryId=ID Ţară Phone=Telefon PhoneShort=Telefon Skype=Skype -Call=Apel +Call=Apel telefonic Chat=Chat PhonePro=Telefon prof. PhonePerso=Telefon pers. PhoneMobile=Telefon mobil -No_Email=Refuză email-urile bulk +No_Email=Refuză newslettere Fax=Fax -Zip=Cod postal +Zip=Cod poştal Town=Oraş Web=Web Poste= Funcţie DefaultLang=Limba implicită 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=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ă +VATIsNotUsed=Taxa pe vânzări TVA nu este utilizată +CopyAddressFromSoc=Copiați adresa de la terț +ThirdpartyNotCustomerNotSupplierSoNoRef=Terțul nu este nici client, nici furnizor, nu există obiecte la care se pot face referință +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Terțul nu este nici client, nici furnizor, reducerile nu sunt disponibile +PaymentBankAccount=Cont bancar pentru înregistrarea plăţilor OverAllProposals=Oferte OverAllOrders=Comenzi OverAllInvoices=Facturi @@ -100,10 +101,10 @@ WrongCustomerCode=Cod client invalid WrongSupplierCode=Cod furnizor invalid CustomerCodeModel=Model cod client SupplierCodeModel=Model cod furnizor -Gencod=Coduri de bare +Gencod=Cod de bare ##### Professional ID ##### ProfId1Short=Prof. id 1 -ProfId2Short=Prof. ID 2 +ProfId2Short=Prof. id 2 ProfId3Short=Prof. id 3 ProfId4Short=Prof. id 4 ProfId5Short=Prof. Id 5 @@ -114,124 +115,131 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 ProfId6=Profesional ID 6 -ProfId1AR=Id-ul prof. 1 (CUIL) -ProfId2AR=Id-ul prof. 2 (Venituri brute) +ProfId1AR=Prof Id 1 (CUIT/CUIL) +ProfId2AR=Prof Id 2 (Venituri brute) ProfId3AR=- ProfId4AR=- ProfId5AR=- ProfId6AR=- -ProfId1AT=Prof Id-ul 1 (USt.-IdNr) -ProfId2AT=Prof Id-ul 2 (USt.-NR) -ProfId3AT=Prof Id-ul 3 (Handelsregister-Nr.) +ProfId1AT=Prof Id 1 (USt.-IdNr) +ProfId2AT=Prof Id 2 (USt.-Nr) +ProfId3AT=Prof Id 3 (Handelsregister-Nr.) ProfId4AT=- ProfId5AT=Nr EORI ProfId6AT=- -ProfId1AU=Prof Id-ul 1 (ABN) +ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- ProfId3AU=- ProfId4AU=- ProfId5AU=- ProfId6AU=- -ProfId1BE=Prof Id-ul 1 (Professionnel Număr) +ProfId1BE=Prof Id 1 (Număr profesional) ProfId2BE=- ProfId3BE=- ProfId4BE=- ProfId5BE=Nr EORI ProfId6BE=- ProfId1BR=- -ProfId2BR=IE (Inregistrare Statala) -ProfId3BR=IE (Inregistrare Municipala) +ProfId2BR=IE (Înregistrare Statală) +ProfId3BR=IE (Înregistrare Municipală) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS ProfId1CH=Nr UID ProfId2CH=- -ProfId3CH=Prof Id-ul 1 (Federal număr) -ProfId4CH=Prof. ID 2 (Număr de înregistrare comercială) +ProfId3CH=Prof Id 1 (Număr federal) +ProfId4CH=Prof. Id 2 (Număr de înregistrare comercială) ProfId5CH=Nr EORI ProfId6CH=- -ProfId1CL=Prof. Id-ul 1 (RUT) +ProfId1CL=Prof. Id 1 (R.U.T.) ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- ProfId6CL=- -ProfId1CO=Prof. Id-ul 1 (RUT) +ProfId1CO=Prof. Id 1 (R.U.T.) ProfId2CO=- ProfId3CO=- ProfId4CO=- ProfId5CO=- ProfId6CO=- -ProfId1DE=Prof Id-ul 1 (USt.-IdNr) -ProfId2DE=Prof Id-ul 2 (USt.-NR) -ProfId3DE=Prof Id-ul 3 (Handelsregister-Nr.) +ProfId1DE=Prof Id 1 (USt.-IdNr) +ProfId2DE=Prof Id 2 (USt.-Nr) +ProfId3DE=Prof Id 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=Nr EORI ProfId6DE=- -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=Nr EORI +ProfId1ES=Prof Id 1 (CIF/CNP) +ProfId2ES=Prof. Id 2 (SSN) +ProfId3ES=Prof Id 3 (CNAE) +ProfId4ES=Prof Id 4 (Collegiate number) +ProfId5ES=Prof Id 5 (Număr EORI) ProfId6ES=- -ProfId1FR=Prof Id-ul 1 (SIREN) -ProfId2FR=Prof Id-ul 2 (SIRET) -ProfId3FR=Prof Id 3 (NAF, vechi APE) -ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=Nr EORI +ProfId1FR=Prof Id 1 (SIREN) +ProfId2FR=Prof Id 2 (SIRET) +ProfId3FR=Prof Id 3 (NAF, vechiul APE) +ProfId4FR=Prof Id 4 (RCS/RM) +ProfId5FR=Prof Id 5 (Număr EORI) ProfId6FR=- -ProfId1GB=Prof Id-ul 1 (numărul de înregistrare) +ProfId1ShortFR=CIF/CUI +ProfId2ShortFR=Nr. Reg. Com./J +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- +ProfId1GB=Număr de înregistrare ProfId2GB=- -ProfId3GB=Prof Id 3 (SIC) +ProfId3GB=SIC ProfId4GB=- ProfId5GB=- ProfId6GB=- -ProfId1HN=Id prof. univ. 1 (RTN) +ProfId1HN=Id prof. 1 (RTN) ProfId2HN=- ProfId3HN=- ProfId4HN=- ProfId5HN=- ProfId6HN=- -ProfId1IN=Id-ul prof. 1 (NIF) -ProfId2IN=Prof ID 2 -ProfId3IN=Prof Id-ul 3 -ProfId4IN=Id-ul prof. univ 4 -ProfId5IN=Prof ID 5 +ProfId1IN=Prof Id 1 (TIN) +ProfId2IN=Prof Id 2 (PAN) +ProfId3IN=Prof Id 3 (SRVC TAX) +ProfId4IN=Prof Id 4 +ProfId5IN=Prof Id 5 ProfId6IN=- ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=Nr EORI +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- ProfId4LU=- ProfId5LU=Nr EORI ProfId6LU=- -ProfId1MA=Id prof. univ. 1 (RC) -ProfId2MA=Id prof. univ. 2 (Patente) -ProfId3MA=Id prof. univ. 3 (IF) -ProfId4MA=Id prof. univ. 4 (CNSS) +ProfId1MA=Id prof. 1 (R.C.) +ProfId2MA=Id prof. 2 (Patente) +ProfId3MA=Id prof. 3 (I.F.) +ProfId4MA=Id prof. 4 (C.N.S.S.) ProfId5MA=Id prof. 5 (I.C.E.) ProfId6MA=- -ProfId1MX=Prof. Id-ul 1 (RFC). -ProfId2MX=Prof. Id-ul 2 (R.. P. IMSS) -ProfId3MX=Prof. ID 3 (Carta Profesional) +ProfId1MX=Prof Id 1 (R.F.C). +ProfId2MX=Prof Id 2 (R..P. IMSS) +ProfId3MX=Prof Id 3 (Profesional Charter) ProfId4MX=- ProfId5MX=- ProfId6MX=- ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- -ProfId4NL=- +ProfId4NL=Burgerservicenummer (BSN) ProfId5NL=Nr EORI ProfId6NL=- -ProfId1PT=Prof Id-ul 1 (NIPC) -ProfId2PT=Prof Id-ul 2 (Social Security Number) -ProfId3PT=Prof Id 3 (Comerciale număr record) -ProfId4PT=Prof Id 4 (Conservatorul) -ProfId5PT=Nr EORI +ProfId1PT=Prof Id 1 (NIPC) +ProfId2PT=Prof Id 2 (Social security number) +ProfId3PT=Prof Id 3 (Commercial Record number) +ProfId4PT=Prof Id 4 (Conservator) +ProfId5PT=Prof Id 5 (Număr EORI) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -239,13 +247,13 @@ ProfId3SN=- ProfId4SN=- ProfId5SN=- ProfId6SN=- -ProfId1TN=Prof Id-ul 1 (RC) -ProfId2TN=Prof Id-ul 2 (Fiscal matricule) -ProfId3TN=Prof Id 3 (Douane cod) +ProfId1TN=Prof Id 1 (RC) +ProfId2TN=Prof Id 2 (Matricolă Fiscală) +ProfId3TN=Prof Id 3 (Cod Douane) ProfId4TN=Prof Id 4 (BAN) ProfId5TN=- ProfId6TN=- -ProfId1US=Id-ul prof (FEIN) +ProfId1US=Prof Id (FEIN) ProfId2US=- ProfId3US=- ProfId4US=- @@ -255,12 +263,12 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Reg Com) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=Nr EORI +ProfId5RO=Prof Id 5 (Număr EORI) ProfId6RO=- -ProfId1RU=Prof. Id-ul 1 (OGRN) -ProfId2RU=Prof. Id-ul 2 (DCI) -ProfId3RU=Prof. ID 3 (KPP) -ProfId4RU=Prof. Id-ul 4 (OKPO) +ProfId1RU=Prof Id 1 (OGRN) +ProfId2RU=Prof Id 2 (INN) +ProfId3RU=Prof Id 3 (KPP) +ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- ProfId6RU=- ProfId1DZ=RC @@ -270,31 +278,31 @@ ProfId4DZ=NIS VATIntra=Cod TVA VATIntraShort=Cod TVA VATIntraSyntaxIsValid=Sintaxa este validă -VATReturn=Restituire TVA +VATReturn=Rerturnare TVA ProspectCustomer=Prospect / Client Prospect=Prospect -CustomerCard=Fişa Client +CustomerCard=Fişă client Customer=Client CustomerRelativeDiscount=Discount relativ client SupplierRelativeDiscount=Discount relativ furnizor CustomerRelativeDiscountShort=Discount relativ CustomerAbsoluteDiscountShort=Discount absolut -CompanyHasRelativeDiscount=Acest client are un discount <b>de %s%%</b> -CompanyHasNoRelativeDiscount=Acest client nu are nici un discount în mod implicit +CompanyHasRelativeDiscount=Acest client are un discount de <b>%s%%</b> +CompanyHasNoRelativeDiscount=Acest client nu are nici un discount relativ implicit HasRelativeDiscountFromSupplier=Aveți un discount implicit de <b> %s%% </b> 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 <b> %s </b> %s -CompanyHasDownPaymentOrCommercialDiscount=Acest client are discount-uri disponibile (comerciale, plăți în avans) pentru <b> %s </b> %s +CompanyHasAbsoluteDiscount=Acest client are discount-uri disponibile (note de credit sau plăți în avans) pentru <b>%s</b> %s +CompanyHasDownPaymentOrCommercialDiscount=Acest client are discount-uri disponibile (comerciale, plăți în avans) pentru <b>%s</b> %s CompanyHasCreditNote=Acest client are încă note de credit pentru <b>%s</b> %s 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 <b> %s </b> %s de la acest furnizor -HasDownPaymentOrCommercialDiscountFromSupplier=Aveți discount-uri disponibile (comerciale, plăți în avans) pentru <b> %s </b> %s de la acest furnizor -HasCreditNoteFromSupplier=Aveți note de credit pentru <b> %s </b> %s de la acest furnizor -CompanyHasNoAbsoluteDiscount=Acest client nu are nici discount de credit disponibil +HasAbsoluteDiscountFromSupplier=Aveți discount-uri disponibile (note de credit sau plăți în avans) pentru <b>%s</b> %s de la acest furnizor +HasDownPaymentOrCommercialDiscountFromSupplier=Aveți discount-uri disponibile (comerciale, plăți în avans) pentru <b>%s</b> %s de la acest furnizor +HasCreditNoteFromSupplier=Aveți note de credit pentru <b>%s</b> %s de la acest furnizor +CompanyHasNoAbsoluteDiscount=Acest client nu are niciun 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.) +CustomerAbsoluteDiscountMy=Reduceri absolute ale clienților (acordate de tine) SupplierAbsoluteDiscountAllUsers=Discount-uri absolute ale furnizorului (introduse de toți utilizatorii) -SupplierAbsoluteDiscountMy=Discount-uri absolute ale furnizorilor (introduse de dvs.) +SupplierAbsoluteDiscountMy=Discount-uri absolute ale furnizorilor (introduse de tine) DiscountNone=Niciunul Vendor=Furnizor Supplier=Furnizor @@ -303,7 +311,7 @@ AddContactAddress=Creare contact/adresă EditContact=Editare contact EditContactAddress=Editare contact/adresă Contact=Contact/Adresă -Contacts=Contacte +Contacts=Contacte/Adrese ContactId=Id contact ContactsAddresses=Contacte/Adrese FromContactName=Nume: @@ -313,7 +321,7 @@ DefaultContact=Contact/adresă implicită ContactByDefaultFor=Contact/adresă implicită pentru AddThirdParty=Creare terţ DeleteACompany=Şterge o societate -PersonalInformations=Informaţii personale +PersonalInformations=Date personale AccountancyCode=Cont contabil CustomerCode=Cod client SupplierCode=Cod furnizor @@ -323,12 +331,12 @@ CustomerCodeDesc=Cod client, unic pentru toți clienți SupplierCodeDesc=Cod furnizor, unic pentru toți furnizorii RequiredIfCustomer=Obligatoriu, dacă un terţ este un client sau prospect RequiredIfSupplier=Obligatoriu dacă terțul este un furnizor -ValidityControledByModule=Valabilitate controlată de modul +ValidityControledByModule=Validitate controlată de modul ThisIsModuleRules=Reguli pentru acest modul ProspectToContact=Prospect de contactat -CompanyDeleted=Societatea " %s" a fost ştearsă din baza de date. +CompanyDeleted=Societatea "%s" a fost ştearsă din baza de date. ListOfContacts=Listă contacte/adrese -ListOfContactsAddresses=Lista contacte/adrese +ListOfContactsAddresses=Listă contacte/adrese ListOfThirdParties=Listă terți ShowCompany=Terţ ShowContact=Contact-Adresă @@ -336,14 +344,14 @@ ContactsAllShort=Toate (fără filtru) ContactType=Tip contact ContactForOrders=Contact comenzi ContactForOrdersOrShipments=Contact comenzi sau livrări -ContactForProposals=Contact ofertă +ContactForProposals=Contact ofertă comercială 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ă +NoContactForAnyOrder=Acest contact nu este persoană de contact pentru nicio comandă +NoContactForAnyOrderOrShipments=Acest contact nu este persoană de contact pentru nicio comandă sau livrare +NoContactForAnyProposal=Acest contact nu este persoană de contact pentru nicio ofertă comercială +NoContactForAnyContract=Acest contact nu este contact pentru niciun contract +NoContactForAnyInvoice=Acest contact nu este persoană de contact pentru nicio factură NewContact=Contact nou NewContactAddress=Contact/adresă nouă MyContacts=Contactele mele @@ -351,16 +359,16 @@ Capital=Capital 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 <b> %s </b> utilizează serviciul european de verificare TVA (VIES), care necesită acces la internet de pe serverul Dolibarr. +VATIntraCheck=Verificare VIES +VATIntraCheckDesc=Codul TVA trebuie să includă prefixul țării. Linkul <b>%s</b> utilizează serviciul european de verificare TVA (VIES), care necesită acces la internet de pe serverul sistemului. 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 UE <a href="%s" target="_blank"> %s </a> -ErrorVATCheckMS_UNAVAILABLE=Verificare imposibilă. Verificaţi dacă serviciul este furnizat de către statul membru ( %s). +VATIntraCheckableOnEUSite=Verificați codul TVA intracomunitar pe site-ul web al Comisiei Europene +VATIntraManualCheck=De asemenea, puteți verifica manual pe site-ul web al UE <a href="%s" target="_blank">%s</a> +ErrorVATCheckMS_UNAVAILABLE=Verificare imposibilă. Verificaţi dacă serviciul este furnizat de către statul membru (%s). NorProspectNorCustomer=Nici prospect, nici client JuridicalStatus=Tipul entității comerciale -Workforce=Forţa de muncă -Staff=Angajati +Workforce=Nr. angajaţi +Staff=Angajaţi ProspectLevelShort=Potenţial ProspectLevel=Potenţial prospect ContactPrivate=Privat @@ -373,7 +381,7 @@ PL_NONE=Niciunul PL_UNKNOWN=Necunoscut PL_LOW=Scăzut PL_MEDIUM=Mediu -PL_HIGH=Mare +PL_HIGH=Ridicat TE_UNKNOWN=- TE_STARTUP=Startup TE_GROUP=Companie mare @@ -381,7 +389,7 @@ TE_MEDIUM=Companie medie TE_ADMIN=Instituţie publică TE_SMALL=Companie mică TE_RETAIL=Vânzător cu amănuntul -TE_WHOLE=Angrosist +TE_WHOLE=Grosist TE_PRIVATE=Persoană fizică TE_OTHER=Alt StatusProspect-1=Nu contacta @@ -397,11 +405,11 @@ 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=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 +ContactNotLinkedToCompany=Contact neasociat la un terţ +DolibarrLogin=Nume de autentificare +NoDolibarrAccess=Utilizator fără acces în sistem +ExportDataset_company_1=Terți (companii/fundații/persoane fizice) și proprietățile acestora +ExportDataset_company_2=Persoane 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 Terți @@ -425,13 +433,13 @@ 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 +YouMustAssignUserMailFirst=Trebuie să adăugaţi un email pentru acest utilizator înainte de a putea adăuga o notificare prin email. +YouMustCreateContactFirst=Pentru a putea adaugă notificări pe email, este necesară definirea unor contacte pentru terţi cu adresă de email validă +ListSuppliersShort=Listă furnizori ListProspectsShort=Listă prospecţi ListCustomersShort=Listă clienți ThirdPartiesArea=Terți/Contacte -LastModifiedThirdParties=Ultimii %sTerţi modificaţi +LastModifiedThirdParties=Ultimii %s Terţi modificaţi UniqueThirdParties=Total terţi InActivity=Deschis ActivityCeased=Închis @@ -440,30 +448,30 @@ 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 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. +OrderMinAmount=Cantitatea minimă de comandă +MonkeyNumRefModelDesc=Întoarce un număr în format %syymm-nnnn pentru codul clientului și %syymm-nnnn pentru codul furnizorului în care yy este anul, mm este luna și nnnn este un număr secvențial de incrementare automată fără întrerupere și fără 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 +MergeThirdparties=Îmbinare 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=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. +ErrorThirdpartiesMerge=A apărut o eroare la ștergerea terților. Verificați jurnalul. S-a revenit la setările anterioare. 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=Condiţii de plată - Client +PaymentTermsCustomer=Termeni de plată - Client PaymentTypeSupplier=Tip de plată - Furnizor PaymentTermsSupplier=Termen de plată - Furnizor PaymentTypeBoth=Tip plată - Client şi Furnizor -MulticurrencyUsed=Utilizați mai multe monede -MulticurrencyCurrency=Moneda +MulticurrencyUsed=Se utilizează mai multe monede +MulticurrencyCurrency=Monedă InEEC=Europa (CEE) RestOfEurope=Restul Europei (CEE) OutOfEurope=În afara Europei (CEE) CurrentOutstandingBillLate=Factura curentă restantă este întârziată -BecarefullChangeThirdpartyBeforeAddProductToInvoice=Aveți grijă, în funcție de setările de preț ale produsului, ar trebui să schimbați terții înainte de a adăuga produsul la POS. +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Aveți grijă, în funcție de setările de preț ale produsului, ar trebui să schimbați terțul înainte de a adăuga produsul la POS. diff --git a/htdocs/langs/ro_RO/compta.lang b/htdocs/langs/ro_RO/compta.lang index bd3bde9e637..d4ae7a6a2b7 100644 --- a/htdocs/langs/ro_RO/compta.lang +++ b/htdocs/langs/ro_RO/compta.lang @@ -1,63 +1,63 @@ # Dolibarr language file - Source file is en_US - compta MenuFinancial=Facturare | Plăți TaxModuleSetupToModifyRules=Du-te la <a href="%s"> Configurare modul Taxe</a> pentru a modifica regulile de calcul -TaxModuleSetupToModifyRulesLT=Du-te la <a href="%s">Companie setup </a> pentru a modifica regulile de calcul -OptionMode=Opţiunea pentru ţinerea contabilitate -OptionModeTrue=Opţiunea Venituri -Cheltuieli +TaxModuleSetupToModifyRulesLT=Du-te la <a href="%s">Setare Companie</a> pentru a modifica regulile de calcul +OptionMode=Opţiune pentru evidenţa contabilă +OptionModeTrue=Opţiunea Venituri-Cheltuieli OptionModeVirtual=Opţiunea Creanţe-Datorii -OptionModeTrueDesc=În acest context, se calculează cifra de afaceri de peste de plăţi (data de plăţi). \\ nThe valabilitate a cifrelor este asigurată numai în cazul în care cartea-ţinerea este analizată prin intrare / ieşire de pe conturi, prin intermediul facturilor. +OptionModeTrueDesc=În acest context, se calculează cifra de afaceri din plăţi (data de plată). Validitatea cifrelor este asigurată numai în cazul în care evidenţa contabilă este analizată prin intrare/ieşire de pe conturi, prin intermediul facturilor. OptionModeVirtualDesc=În acest context, cifra de afaceri se calculează pe facturi (data de validare). Când aceste facturi se datorează, indiferent dacă acestea au fost plătite sau nu, ele sunt enumerate în cifra de afaceri de ieşire. -FeatureIsSupportedInInOutModeOnly=Caracteristicã disponibil doar în CREDITE-DEBTS Mod de contabilitate (a se vedea modul de configurare de contabilitate) -VATReportBuildWithOptionDefinedInModule=Sumele prezentate aici sunt calculate folosind regulile definite de modul de configurare fiscale. -LTReportBuildWithOptionDefinedInModule=Sumele prezentate aici sunt calculate folosind regulile definite de modul de configurare Companie. +FeatureIsSupportedInInOutModeOnly=Caracteristicã disponibilă doar în modul contabil CREDITE-DEBITE (vezi Configurare modul Contabilitate) +VATReportBuildWithOptionDefinedInModule=Sumele prezentate aici sunt calculate folosind regulile definite de modul de configurare fiscală. +LTReportBuildWithOptionDefinedInModule=Sumele prezentate aici sunt calculate folosind regulile definite în configurarea Companiei. Param=Setări -RemainingAmountPayment=Sumă de plata rămasă: +RemainingAmountPayment=Sumă rămasă de plată: Account=Cont -Accountparent=Contul mamă -Accountsparent=Conturile-mamă +Accountparent=Cont părinte +Accountsparent=Conturile părinte Income=Venituri Outcome=Cheltuieli -MenuReportInOut=Venituri / Rezultate +MenuReportInOut=Venituri / Cheltuieli ReportInOut=Soldul veniturilor și al cheltuielilor ReportTurnover=Cifra de afaceri facturată ReportTurnoverCollected=Cifra de afaceri colectată -PaymentsNotLinkedToInvoice=Plăţile nu sunt legate de orice factură, astfel încât nu au legătură cu o terţă parte -PaymentsNotLinkedToUser=Plăţile nu sunt legate de orice utilizator +PaymentsNotLinkedToInvoice=Plăţile neasociate la facturi, nelegate la terţi +PaymentsNotLinkedToUser=Plăţi neasociate niciunui utilizator Profit=Profit -AccountingResult=Rezultatl contabil +AccountingResult=Rezultat contabil BalanceBefore=Sold (înainte) Balance=Sold Debit=Debit Credit=Credit Piece= Doc. contabilitate AmountHTVATRealReceived=TVA colectat -AmountHTVATRealPaid=TVA platit -VATToPay=Vânzări fiscale -VATReceived=Taxa primită -VATToCollect=Achiziții fiscale +AmountHTVATRealPaid=TVA plătit +VATToPay=TVA de plată +VATReceived=TVA colectată +VATToCollect=TVA de colectat VATSummary=Taxă lunară -VATBalance=Soldul fiscal -VATPaid=Taxa platită -LT1Summary=Sumarul taxei 2 -LT2Summary=Sumarul taxei 3 -LT1SummaryES=RE Sold +VATBalance=Sold TVA +VATPaid=Taxă platită +LT1Summary=Sumar taxă 2 +LT2Summary=Sumar taxă 3 +LT1SummaryES=Sold RE LT2SummaryES=Sold IRPF LT1SummaryIN=Sold CGST LT2SummaryIN=Sold SGST LT1Paid=Taxa 2 plătită LT2Paid=Taxa 3 plătită -LT1PaidES=RE Platit +LT1PaidES=RE Plătit LT2PaidES=IRPF plătit LT1PaidIN=CGST plătit LT2PaidIN=SGST plătit -LT1Customer=Vânzări fiscale 2 -LT1Supplier=Taxă achiziții 2 -LT1CustomerES=RE vanzări -LT1SupplierES=RE cumpărări +LT1Customer=Vânzări taxa 2 +LT1Supplier=Achiziţii taxa 2 +LT1CustomerES=Vânzări RE +LT1SupplierES=Achiziţii RE LT1CustomerIN=Vânzări CGST LT1SupplierIN=Achiziții CGST -LT2Customer=Vânzări fiscale 3 -LT2Supplier=Taxă achiziții 3 +LT2Customer=Vânzări taxa 3 +LT2Supplier=Achiziţii taxa 3 LT2CustomerES=IRPF de vânzări LT2SupplierES=IRPF achiziţii LT2CustomerIN=Vânzări SGST @@ -65,58 +65,62 @@ LT2SupplierIN=Achiziții SGST VATCollected=TVA colectat StatusToPay=De plată SpecialExpensesArea=Plăţi speciale -SocialContribution=Taxa sociala / fiscala +VATExpensesArea=Zonă pentru toate plățile de TVA +SocialContribution=Taxa socială/fiscală 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 +LabelContrib=Etichetă contribuție +TypeContrib=Tip contribuție MenuSpecialExpenses=Cheltuieli speciale MenuTaxAndDividends=Impozite şi dividende -MenuSocialContributions=Taxe sociale / fiscale -MenuNewSocialContribution=Tax social/fiscal nou -NewSocialContribution=Taxa sociala/fiscala noua -AddSocialContribution=Adăugați o taxă socială/fiscală -ContributionsToPay=Taxe sociale / fiscale de plata +MenuSocialContributions=Taxe sociale/fiscale +MenuNewSocialContribution=Taxă socială/fiscală nouă +NewSocialContribution=Taxa socială/fiscală nouă +AddSocialContribution=Adaugă o taxă socială/fiscală +ContributionsToPay=Taxe sociale/fiscale de plată AccountancyTreasuryArea=Zona de facturare și de plată NewPayment=Plată nouă PaymentCustomerInvoice=Plată factură client -PaymentSupplierInvoice=plata facturii furnizorilor -PaymentSocialContribution=Plata taxe sociale sau fiscale +PaymentSupplierInvoice=Plată factură furnizor +PaymentSocialContribution=Plată taxe sociale sau fiscale PaymentVat=Plată TVA +AutomaticCreationPayment=Înregistrare automată a plăţii ListPayment=Listă plăţi ListOfCustomerPayments=Listă plăţi clienţi -ListOfSupplierPayments=Lista plăților furnizorului +ListOfSupplierPayments=Listă plăți furnizori DateStartPeriod=Dată început perioadă DateEndPeriod=Dată sfârşit perioadă newLT1Payment=Plată taxă nouă 2 newLT2Payment=Plată taxă nouă 3 -LT1Payment=Plata taxa 2 -LT1Payments=Plati taxa 2 -LT2Payment=Plata taxa 3 -LT2Payments=Plati taxa 3 +LT1Payment=Plată taxa 2 +LT1Payments=Plăti taxa 2 +LT2Payment=Plată taxa 3 +LT2Payments=Plăţi taxa 3 newLT1PaymentES=Plată nouă RE newLT2PaymentES=Plată nouă IRPF -LT1PaymentES=RE Plată -LT1PaymentsES=RE Plăţi -LT2PaymentES=IRPF de plata +LT1PaymentES=Plată RE +LT1PaymentsES=Plăţi RE +LT2PaymentES=Plată IRPF LT2PaymentsES=Plăţi IRPF -VATPayment=Plata taxei pe vânzări -VATPayments=Plăți pentru impozitul pe vânzări -VATRefund=Rambursarea taxei pe vânzări -NewVATPayment=Plata noului impozit pe vânzări +VATPayment=Plată TVA +VATPayments=Plăți TVA +VATDeclarations=Declaraţii TVA +VATDeclaration=Declaraţie TVA +VATRefund=Rambursare TVA +NewVATPayment=Plată nouă TVA NewLocalTaxPayment=Plata pentru %s taxa nouă Refund=Rambursare -SocialContributionsPayments=Plata taxe sociale sau fiscale +SocialContributionsPayments=Plăţi de taxe sociale/fiscale ShowVatPayment=Arata plata TVA TotalToPay=Total de plată BalanceVisibilityDependsOnSortAndFilters= Soldul este vizibil în această listă numai dacă tabelul este sortat și filtrat pe %s 1 cont bancar (fără alte filtre) -CustomerAccountancyCode=Codul contabilității clienților -SupplierAccountancyCode=Codul contabil al furnizorului +CustomerAccountancyCode=Cod contabil client +SupplierAccountancyCode=Codul contabil furnizor CustomerAccountancyCodeShort=Cont contabil client SupplierAccountancyCodeShort=Cont contabil furnizor -AccountNumber=Numărul de cont +AccountNumber=Număr cont NewAccountingAccount=Cont nou Turnover=Cifra de afaceri facturată TurnoverCollected=Cifra de afaceri colectată @@ -125,117 +129,129 @@ ByExpenseIncome= După cheltuieli & venituri ByThirdParties=După terţi ByUserAuthorOfInvoice=După autorul facturii CheckReceipt=Borderou de cecuri remise -CheckReceiptShort=Borderou cecuri +CheckReceiptShort=Borderou încasări cecuri LastCheckReceiptShort=Ultimele %s cecuri remise NewCheckReceipt=Discount nou NewCheckDeposit=New verifica depozit NewCheckDepositOn=New verifica depozit în contul: %s NoWaitingChecks=CEC-uri spre încasare -DateChequeReceived=Data primire Cec -NbOfCheques=Numărul de cecuri -PaySocialContribution=Plăteate o taxă socială / fiscala -ConfirmPaySocialContribution=Sunteţi sigur că doriţi să clasaţi această taxă ca plătită? -DeleteSocialContribution=Sterge o plata taxe sociale sau fiscale -ConfirmDeleteSocialContribution=Sunteţi sigur că doriţi să ştergeţi această plată taxa sociala/fiscala? +DateChequeReceived=Dată primire Cec +NbOfCheques=Nr. cecuri +PaySocialContribution=Plăteşte o taxă socială/fiscală +PayVAT=Plătește o declarație de TVA +PaySalary=Plată salariu pe card +ConfirmPaySocialContribution=Sigur doriți să clasificați acest impozit/taxă socială sau fiscală drept plătită? +ConfirmPayVAT=Sigur doriți să clasificați această declarație de TVA drept plătită? +ConfirmPaySalary=Sigur doriți să clasificați acest salariu pe card drept plătit? +DeleteSocialContribution=Şterge o plată de taxe sociale sau fiscale +DeleteVAT=Şterge o declaraţie de TVA +DeleteSalary=Şterge un card de salarii +ConfirmDeleteSocialContribution=Sigur doriți să ștergeți această plată pentru taxa fiscală/socială? +ConfirmDeleteVAT=Sigur doriți să ștergeți această declarație de TVA? +ConfirmDeleteSalary=Sigur doriți să ștergeți acest salariu? ExportDataset_tax_1=Taxe sociale și fiscale și plăți CalcModeVATDebt=Mod <b>%s TVA pe baza contabilității de angajament %s</b>. -CalcModeVATEngagement=Mod <b>%s TVA pe baza venituri-cheltuieli%s.</b> +CalcModeVATEngagement=Mod <b>%s TVA pe bază venituri-cheltuieli%s.</b> CalcModeDebt= Analiza documentelor înregistrate cunoscute chiar dacă acestea nu sunt încă introduse în registru contabil. CalcModeEngagement=Analiza plăților înregistrate cunoscute, chiar dacă acestea nu sunt încă înregistrate în registru. CalcModeBookkeeping=Analiza datelor publicate în tabelul registrului contabil. -CalcModeLT1= Mode <b>%sRE pe facturi clienţi - facturi furnizori %s</b> -CalcModeLT1Debt=Mode <b>%sRE pe facturi clienţi%s</b> -CalcModeLT1Rec= Mode <b>%sRE pe facturi furnizori%s</b> -CalcModeLT2= Mode <b>%sIRPF pe facturi clienţi - facturi furnizori%s</b> -CalcModeLT2Debt=Mode <b>%sIRPF pe facturi clienţi%s</b> -CalcModeLT2Rec= Mode <b>%sIRPF pe facturi furnizori%s</b> +CalcModeLT1= Mod <b>%sRE pe facturi clienţi - facturi furnizori %s</b> +CalcModeLT1Debt=Mod <b>%sRE pe facturi clienţi%s</b> +CalcModeLT1Rec= Mod <b>%sRE pe facturi furnizori%s</b> +CalcModeLT2= Mod <b>%sIRPF pe facturi clienţi - facturi furnizori%s</b> +CalcModeLT2Debt=Mod <b>%sIRPF pe facturi clienţi%s</b> +CalcModeLT2Rec= Mod <b>%sIRPF pe facturi furnizori%s</b> AnnualSummaryDueDebtMode=Balanța de venituri și cheltuieli, rezumat anual AnnualSummaryInputOutputMode=Balanța de venituri și cheltuieli, rezumat anual -AnnualByCompanies=Soldul veniturilor și al cheltuielilor, pe grupuri predefinite de cont -AnnualByCompaniesDueDebtMode=Soldul veniturilor și cheltuielilor, detaliu după grupuri predefinite, modul <b> %sCereri-Datorii%s </b> a spus <b> Contabilitatea de angajament </b>. -AnnualByCompaniesInputOutputMode=Soldul veniturilor și cheltuielilor, detaliile după grupuri predefinite, modul <b> %sVenituri-cheltuieli%s </b> a spus <b> contabilitatea numerică </b>. +AnnualByCompanies=Soldul veniturilor și al cheltuielilor, pe grupe predefinite de conturi +AnnualByCompaniesDueDebtMode=Soldul veniturilor și cheltuielilor, detaliate după grupuri predefinite, modul <b>%sCreanţe-Datorii%s </b> aşa zisa <b>Contabilitate de angajament</b>. +AnnualByCompaniesInputOutputMode=Soldul veniturilor și cheltuielilor, detaliate după grupuri predefinite, modul <b>%sVenituri-Cheltuieli%s</b> aşa zisa <b>Contabilitate numerică</b>. SeeReportInInputOutputMode=Consultați <b>%s analiza plăților %s</b> pentru un calcul bazat pe <b>plățile înregistrate</b> efectuate chiar dacă acestea nu sunt încă contabilizate în Registru SeeReportInDueDebtMode=Consultați <b>%s analiza documentelor înregistrate %s</b> pentru un calcul pe baza <b>documentelor înregistrate</b> cunoscute, chiar dacă acestea nu sunt încă contabilizate în Registru SeeReportInBookkeepingMode=Consultați <b>%sanaliza registrului contabil%s</b> pentru un raport bazat pe <b>Registrul de contabilitate</b> -RulesAmountWithTaxIncluded=- Valoarea afişată este cu toate taxele incluse +RulesAmountWithTaxIncluded=- Valorile afişate sunt cu toate taxele incluse RulesResultDue=- Include facturi restante, cheltuieli, TVA, donații indiferent dacă sunt plătite sau nu. Include și salariile plătite. <br>- 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. <br> - Se ia în calcul data plăţii facturilor, cheltuielilor, TVA-ului și salariilor . RulesCADue=- Include facturile client scadente indiferent dacă sunt încasate sau nu. <br>- Se bazează pe data emiterii acestor facturi.<br> RulesCAIn=- include toate plățile efective ale facturilor primite de la clienți. <br> - se bazează pe data de plată a acestor facturi <br> 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" -RulesResultBookkeepingPredefined=Acesta include înregistrarea în registrul dvs. cu conturi contabile care are grupul "CHELTUIELI" sau "VENIT" -RulesResultBookkeepingPersonalized=Se înregistrează în registrul dvs. cu conturi contabile <b> grupate după grupuri personalizate </b> -SeePageForSetup=Vedeți meniul <a href="%s"> %s </a> pentru configurare +RulesSalesTurnoverOfIncomeAccounts=Include (credit - debit) linii pentru conturile de produse din grupul VENITURI +RulesAmountOnInOutBookkeepingRecord=Acesta include înregistrarea în Registrul contabil cu conturi contabile din grupa "CHELTUIELI" sau "VENITURI" +RulesResultBookkeepingPredefined=Acesta include înregistrarea în Registrul contabil cu conturi contabile din grupa "CHELTUIELI" sau "VENITURI" +RulesResultBookkeepingPersonalized=Se înregistrează în registrul tău contabil cu conturile <b> grupate în grupe personalizate</b> +SeePageForSetup=Vezi meniul <a href="%s"> %s </a> pentru configurare DepositsAreNotIncluded=- Facturile de plată în avans nu sunt incluse DepositsAreIncluded=- Sunt incluse facturile de plată în avans LT1ReportByMonth=Taxa 2 raportare lunară LT2ReportByMonth=Taxa 3 raportare lunară -LT1ReportByCustomers=Raportați taxa 2 de către un terț -LT2ReportByCustomers=Raportați taxa 3 de către un terț +LT1ReportByCustomers=Raportare taxa 2 după un terț +LT2ReportByCustomers=Raport taxa 3 după terţi LT1ReportByCustomersES=Raport pe terţ RE -LT2ReportByCustomersES=Raport de terţă parte IRPF -VATReport=Raport privind impozitul pe vânzare -VATReportByPeriods=Raport privind impozitul pe vânzare după perioadă +LT2ReportByCustomersES=Raport IRPF după terţi +VATReport=Raport TVA +VATReportByPeriods=Raport TVA după perioade VATReportByMonth=Taxa pe vânzări TVA raportare lunară -VATReportByRates=Raport privind impozitul pe vânzare pe tarife -VATReportByThirdParties=Raportul privind impozitul pe vânzări de către terți -VATReportByCustomers=Raportul privind impozitul pe vânzări de către client +VATReportByRates=Raport TVA pe cote +VATReportByThirdParties=Raport TVA pe terți +VATReportByCustomers=Raport TVA după client VATReportByCustomersInInputOutputMode=Raport după TVA client colectat și plătit -VATReportByQuartersInInputOutputMode=Raportați cu privire la rata de impozitare a vânzărilor pentru taxa colectată și plătită -LT1ReportByQuarters=Raportați impozitul 2 în funcție de rată -LT2ReportByQuarters=Raportați impozitul 3 în funcție de rată -LT1ReportByQuartersES=Raport pe rată RE -LT2ReportByQuartersES=Raport pe rată IRPF -SeeVATReportInInputOutputMode=A se vedea raportul <b>%sVAT encasement%s</b> pentru un calcul standard -SeeVATReportInDueDebtMode=A se vedea raportul <b>privind %sVAT flow%s</b> pentru un calcul, cu o opţiune de pe fluxul -RulesVATInServices=- Pentru servicii, raportul include regularizările de TVA efectiv primite sau emise pe baza datelor plăților. +VATReportByQuartersInInputOutputMode=Raport TVA după taxa colectată și plătită +VATReportShowByRateDetails=Arată detalii despre această cotă +LT1ReportByQuarters=Raport taxa 2 după cotă +LT2ReportByQuarters=Raport taxa 3 după cotă +LT1ReportByQuartersES=Raport după cota RE +LT2ReportByQuartersES=Raport pe cotă IRPF +SeeVATReportInInputOutputMode=Vezi raportul <b>%sVAT încasat%s</b> pentru un calcul standard +SeeVATReportInDueDebtMode=Vezi raportul <b>%s TVA %s</b> pentru un calcul cu opţiune pe fluxul +RulesVATInServices=- Pentru servicii, raportul include regularizările de TVA efectiv primite sau emise pe baza datei plăților. RulesVATInProducts=- Pentru activele materiale, raportul include TVA primită sau emisă pe baza datei plății. RulesVATDueServices=- Pentru servicii, raportul include facturi TVA-ului datorat, plătite sau nu, în funcţie de data facturii. RulesVATDueProducts=- Pentru active materiale, raportul include facturile cu TVA, pe baza datei facturii. OptionVatInfoModuleComptabilite=Notă: Pentru bunuri materiale, ar trebui să utilizeze la data livrării să fie mai echitabil. ThisIsAnEstimatedValue=Aceasta este o previzualizare, bazată pe evenimente de afaceri și nu pe tabelul final, astfel încât rezultatele finale pot fi diferite de aceste valori de previzualizare -PercentOfInvoice=%%/factura +PercentOfInvoice=%%/factură NotUsedForGoods=Nu sunt utilizate pentru cumpărarea de bunuri -ProposalStats=Statistici privind ofertele -OrderStats=Statistici privind comenzile +ProposalStats=Statistici oferte comeciale +OrderStats=Statistici comenzi InvoiceStats=Statistici privind facturile -Dispatch=Dispecerizare +Dispatch=Expediere Dispatched=Expediate -ToDispatch=De expediat -ThirdPartyMustBeEditAsCustomer=A treia parte trebuie să fie definit ca un client -SellsJournal=Jurnalul de vânzări -PurchasesJournal=Jurnalul de cumpărări -DescSellsJournal=Jurnalul de vânzări -DescPurchasesJournal=Jurnalul de cumpărări +ToDispatch=De expediat +ThirdPartyMustBeEditAsCustomer=Terţul trebuie să fie definit ca şi client +SellsJournal=Jurnal de vânzări +PurchasesJournal=Jurnal de cumpărări +DescSellsJournal=Jurnal de vânzări +DescPurchasesJournal=Jurnal de cumpărări CodeNotDef=Nedefinit WarningDepositsNotIncluded=Facturile de plată în avans nu sunt incluse în această versiune cu acest modul de contabilitate. DatePaymentTermCantBeLowerThanObjectDate=Termenul de plată nu poate fi mai mic decât data obiectului. -Pcg_version=Diagramă de modele de conturi -Pcg_type=Pcg tip -Pcg_subtype=Pcg subtip +Pcg_version=Planuri de conturi +Pcg_type=Tip Pcg +Pcg_subtype=Subtip Pcg InvoiceLinesToDispatch=Linii factură de expediat ByProductsAndServices=Pe produs și serviciu RefExt=Referinţă externă -ToCreateAPredefinedInvoice= Pentru a crea o factură model/ template, se crează o factură standard, apoi, fără a fi validată, se apasă pe butonul "%s". -LinkedOrder=Link către comandă +ToCreateAPredefinedInvoice=Pentru a crea o factură șablon, creați o factură standard, apoi, fără a o valida, faceți clic pe butonul "%s". +LinkedOrder=Comandă asociată Mode1=Metoda 1 Mode2=Metoda 2 CalculationRuleDesc=Pentru a calcula totalul TVA, există două metode: <br> Metoda 1 este rotunjirea TVA-ului pe fiecare linie, apoi însumarea lor. <br> Metoda 2 este însumarea tututor TVA rilor de pe fiecare linie, apoi rotunjirea rezultatului. <br> Rezultatul final poate fi diferit cu câțiva cenți. Modul implicit este <b>%s</b>. CalculationRuleDescSupplier=În funcție de furnizor, alegeți metoda potrivită pentru a aplica aceeași regulă de calcul și obțineți același rezultat așteptat de către furnizor. TurnoverPerProductInCommitmentAccountingNotRelevant=Raportul cifrei de afaceri colectat pe produs nu este disponibil. Acest raport este disponibil numai pentru cifra de afaceri facturată. -TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=Raportul cifrei de afaceri colectat pe rata de impozitare a vânzării nu este disponibil. Acest raport este disponibil numai pentru cifra de afaceri facturată. +TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=Raportul cifrei de afaceri colectate după cota TVA nu este disponibil. Acest raport este disponibil numai pentru cifra de afaceri facturată. CalculationMode=Mod calcul -AccountancyJournal=Jurnalul codului de contabilitate -ACCOUNTING_VAT_SOLD_ACCOUNT=Contul de contabilitate implicit pentru TVA la vânzări (utilizat dacă nu este definit în setarea dicționarului TVA) -ACCOUNTING_VAT_BUY_ACCOUNT=Contul de contabilitate implicit pentru TVA la achiziții (utilizat dacă nu este definit în setarea dicționarului TVA) -ACCOUNTING_VAT_PAY_ACCOUNT=Contul de contabilitate implicit pentru plata TVA -ACCOUNTING_ACCOUNT_CUSTOMER=Contul de contabilitate utilizat pentru terț client -ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Contul contabil dedicat definit pe cardul terț va fi utilizat numai pentru subregistrul contabilitate . Aceasta va fi utilizat pentru registrul general și ca valoare implicită pentru subregistru contabill dacă nu este definit contul contabil dedicat clienților de la terți. -ACCOUNTING_ACCOUNT_SUPPLIER=Contul de conturi utilizat pentru terții furnizori -ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Contul contabil dedicat definit pe cardul terț va fi utilizat numai pentru subregistru de contabilitate . Acesta va fi utilizat pentru registrul general și ca valoare implicită a contabilității din subregistru dacă nu este definit contul de contabilitate dedicat vânzătorului de la un terț. -ConfirmCloneTax=Confirmați clona unei taxe sociale fiscale -CloneTaxForNextMonth=Clonaţi-o pentru luna următoare +AccountancyJournal=Jurnal contabil +ACCOUNTING_VAT_SOLD_ACCOUNT=Contul contabil implicit pentru TVA la vânzări (utilizat dacă nu este definit în setarea dicționarului TVA) +ACCOUNTING_VAT_BUY_ACCOUNT=Contul contabil implicit pentru TVA la achiziții (utilizat dacă nu este definit în setarea dicționarului TVA) +ACCOUNTING_VAT_PAY_ACCOUNT=Contul contabil implicit pentru plata TVA +ACCOUNTING_ACCOUNT_CUSTOMER=Contul contabil utilizat pentru terți clienţi +ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Contul contabil dedicat definit pe fişa terțului va fi utilizat numai pentru subregistrul contabilitate . Aceasta va fi utilizat pentru registrul general și ca valoare implicită pentru subregistru contabill dacă nu este definit contul contabil dedicat clienților de la terți. +ACCOUNTING_ACCOUNT_SUPPLIER=Contul contabil utilizat pentru terți furnizori +ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Contul contabil dedicat definit pe fişa terțului va fi utilizat numai pentru subregistrul contabil. Acesta va fi utilizat pentru Registrul general și ca valoare implicită a contabilității din subregistru dacă nu este definit contul contabil de vânzare asociat la un terț. +ConfirmCloneTax=Confirmare clonare taxă socială/fiscală +ConfirmCloneVAT=Confirmați clonarea unei declarații de TVA +ConfirmCloneSalary=Confirmare clonare salariu +CloneTaxForNextMonth=Clonare pentru luna următoare SimpleReport=Raport simplu AddExtraReport=Rapoarte suplimentare (adăugați raportul clienților străini și naționali) OtherCountriesCustomersReport=Raport clienţi externi @@ -243,28 +259,30 @@ BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Pe baza pr SameCountryCustomersWithVAT=Raport clienţi interni BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Pe baza primelor două litere ale codului de TVA ca fiind același cu codul de țară al companiei dumneavoastră LinkedFichinter= Link către intervenție -ImportDataset_tax_contrib=Taxe sociale / fiscale +ImportDataset_tax_contrib=Taxe sociale/fiscale ImportDataset_tax_vat=Plăți TVA ErrorBankAccountNotFound= Eroare: cont bancar nu a fost găsit FiscalPeriod=Perioadă contabilă ListSocialContributionAssociatedProject=Lista contribuțiilor sociale asociate proiectului -DeleteFromCat=Eliminați din grupul de contabilitate -AccountingAffectation=Contabilitate +DeleteFromCat=Eliminare din grupa contabilă +AccountingAffectation=Asociere conturi contabile LastDayTaxIsRelatedTo=Ultima zi a perioadei în care se aplică taxa VATDue=Taxa de vânzare a fost revendicată ClaimedForThisPeriod=Revendicată pentru perioada -PaidDuringThisPeriod=Plătit în această perioadă -ByVatRate=Prin cota de impozit pe vânzare -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=Cifră de afaceri achiziţii -PurchaseTurnoverCollected=Cifra de afaceri colectată achiziţii +PaidDuringThisPeriod=Plătit pentru această perioadă +PaidDuringThisPeriodDesc=Aceasta este suma tuturor plăților legate de declarațiile de TVA care au o dată de sfârșit de perioadă în intervalul de date selectat +ByVatRate=După cota TVA +TurnoverbyVatrate=Cifra de afaceri facturată după cota TVA +TurnoverCollectedbyVatrate=Cifra de afaceri colectată după cota TVA +PurchasebyVatrate=Achiziţii după cota de TVA +LabelToShow=Etichetă scurtă +PurchaseTurnover=Cifră de afaceri din achiziţii +PurchaseTurnoverCollected=Cifra de afaceri colectată din achiziţii RulesPurchaseTurnoverDue=- Include facturile restante la furnizori indiferent dacă sunt achitate sau nu. - <br>Se bazează pe data de emitere a acestor facturi.<br> RulesPurchaseTurnoverIn=- Include toate plățile efectuate ale facturilor de la furnizori. <br>- Se bazează pe data la care s-au plătit aceste facturi<br> 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 +RulesPurchaseTurnoverOfExpenseAccounts=Include (debit - credit) linii pentru conturi de produse din grupul CHELTUIELI +ReportPurchaseTurnover=Cifra de afaceri pe achiziţii facturate +ReportPurchaseTurnoverCollected=Cifra de afaceri colectată din achiziţii IncludeVarpaysInResults = Include plăţile diverse în rapoarte IncludeLoansInResults = Includeți creditele - împrumuturile în rapoarte diff --git a/htdocs/langs/ro_RO/ecm.lang b/htdocs/langs/ro_RO/ecm.lang index f8c93629ab9..d987ac9d0f1 100644 --- a/htdocs/langs/ro_RO/ecm.lang +++ b/htdocs/langs/ro_RO/ecm.lang @@ -1,43 +1,47 @@ # Dolibarr language file - Source file is en_US - ecm -ECMNbOfDocs=Număr de documente în director +ECMNbOfDocs=Nr. de documente în director ECMSection=Director -ECMSectionManual=Director Manual -ECMSectionAuto=Director Automat +ECMSectionManual=Director manual +ECMSectionAuto=Director automat ECMSectionsManual=Arbore manual ECMSectionsAuto=Arbore automat ECMSections=Directoare -ECMRoot=Rădăcină ECM Electronic Content Management -ECMNewSection=Director Nou -ECMAddSection=Adaugă Director +ECMRoot=ECM rădăcină +ECMNewSection=Director nou +ECMAddSection=Adaugă director ECMCreationDate=Data creării ECMNbOfFilesInDir=Număr fişiere în director ECMNbOfSubDir=Număr sub-directoare ECMNbOfFilesInSubDir=Număr fișiere în sub-directoare ECMCreationUser=Creator -ECMArea=Domeniul DMS Document Management System / ECM Electronic Content Management -ECMAreaDesc=Domeniul DMS / ECM (Document Management System / Electronic Content Management) vă permite să salvați, să partajați și să căutați rapid toate tipurile de documente din Dolibarr. +ECMArea=DMS/ECM +ECMAreaDesc=DMS/ECM (Document Management System / Electronic Content Management) vă permite să salvați, să partajați și să căutați rapid toate tipurile de documente în Dolibarr. ECMAreaDesc2=* Directoarele automate sunt completate în mod automat atunci când se adaugă documentele din fişa acelui element. <br> * Directoarele manuale poate fi folosite pentru a salva documente ce nu sunt legate de un anumit element. -ECMSectionWasRemoved=Directorul <b>%s</b> a fost ştears. +ECMSectionWasRemoved=Directorul <b>%s</b> a fost şters. ECMSectionWasCreated=Directorul <b> %s </b> a fost creat. -ECMSearchByKeywords=Caută dupa cuvinte cheie +ECMSearchByKeywords=Caută după cuvinte cheie ECMSearchByEntity=Caută după obiect -ECMSectionOfDocuments=Directoare documente +ECMSectionOfDocuments=Directoare documente ECMTypeAuto=Automat ECMDocsBy=Documente asociate la %s -ECMNoDirectoryYet=Niciun directorul creat +ECMNoDirectoryYet=Niciun director creat ShowECMSection=Arată director -DeleteSection=Elimină director +DeleteSection=Şterge director ConfirmDeleteSection=Puteți confirma că doriți să ștergeți directorul <b> %s</b>? -ECMDirectoryForFiles=Director relativ pentru fişierele +ECMDirectoryForFiles=Director relativ pentru fişiere CannotRemoveDirectoryContainsFilesOrDirs=Eliminarea nu este posibilă deoarece conține anumite fișiere sau subdirectoare CannotRemoveDirectoryContainsFiles=Eliminarea nu este posibilă deoarece conține unele fișiere -ECMFileManager=Manager Fişiere -ECMSelectASection=Selectați un director din arbore ... +ECMFileManager=Manager fişiere +ECMSelectASection=Selectați un director din arbore... DirNotSynchronizedSyncFirst=Acest director pare să fie creat sau modificat în afara modulului ECM Electronic Content Management. Trebuie să faceți clic mai întâi pe butonul "Resync" pentru a sincroniza discul și baza de date pentru a obține conținutul acestui director. -ReSyncListOfDir=Resincronizați lista directoarelor +ReSyncListOfDir=Resincronizare listă directoare HashOfFileContent=Hash-ul conținutului fișierului NoDirectoriesFound=Nu s-au găsit directoare FileNotYetIndexedInDatabase=Fișierul nu este încă indexat în baza de date (încercați să îl reîncărcați) ExtraFieldsEcmFiles=Extracâmpuri Fişiere ECM ExtraFieldsEcmDirectories=Extracâmpuri Directoare ECM ECMSetup=Configurare ECM +GenerateImgWebp=Duplică toate imaginile cu o altă versiune în format .webp +ConfirmGenerateImgWebp=Dacă confirmi, vei genera o imagine în format .webp pentru toate imaginile aflate în prezent în acest folder și subfolderul său... +ConfirmImgWebpCreation=Confirmă duplicarea tuturor imaginilor +SucessConvertImgWebp=Imaginile au fost duplicate cu succes diff --git a/htdocs/langs/ro_RO/errors.lang b/htdocs/langs/ro_RO/errors.lang index 01159bce39a..d31612d2443 100644 --- a/htdocs/langs/ro_RO/errors.lang +++ b/htdocs/langs/ro_RO/errors.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - errors # No errors -NoErrorCommitIsDone=Ncio eroare, dăm commit +NoErrorCommitIsDone=Nicio eroare, dăm commit # Errors ErrorButCommitIsDone=Erori constatate dar încă nevalidate ErrorBadEMail=Emailul %s este greșit @@ -9,223 +9,225 @@ ErrorBadMXDomain=Email-ul %s pare greșit (domeniul nu are nicio înregistrare M ErrorBadUrl=Url-ul %s este greşit ErrorBadValueForParamNotAString=Valoare greșită pentru parametru. Se adaugă, în general, atunci când traducerea lipsește. ErrorRefAlreadyExists=Referinţa <b>%s</b> există deja. -ErrorLoginAlreadyExists=Login %s există deja. +ErrorLoginAlreadyExists=Login-ul %s există deja. ErrorGroupAlreadyExists=Grupul %s există deja. -ErrorRecordNotFound=Înregistrarea nu a fost găsit. -ErrorFailToCopyFile=Nu a reuşit să copiaţi fişierul <b>&quot;%s&quot;</b> în <b>&quot;%s&quot;.</b> -ErrorFailToCopyDir=Nu a reușit să copieze directorul "<b> %s </b>" în "<b> %s </b>". -ErrorFailToRenameFile=Nu a reuşit să redenumiţi fişierul <b>&quot;%s&quot;</b> în <b>&quot;%s&quot;.</b> -ErrorFailToDeleteFile=Nu a reuşit să eliminaţi fişierul <b>" %s".</b> -ErrorFailToCreateFile=Nu a reuşit să creeze fişierul <b>" %s".</b> -ErrorFailToRenameDir=Nu a reuşit să redenumiţi directorul <b>" %s"</b> în <b>" %s".</b> -ErrorFailToCreateDir=Nu a reuşit să crea directorul <b>" %s".</b> -ErrorFailToDeleteDir=Esec pentru a şterge directorul <b>" %s".</b> -ErrorFailToMakeReplacementInto=Nu a reușit să înlocuiască în fișierul "<b> %s </b>". -ErrorFailToGenerateFile=Nu a reușit să genereze fișierul"<b> %s </b>". -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. +ErrorRecordNotFound=Înregistrarea nu a fost găsită. +ErrorFailToCopyFile=Eşec la copierea fişierului <b>%s</b> în <b>%s</b>. +ErrorFailToCopyDir=Eşec la copierea directorului '<b>%s</b>' în '<b>%s</b>'. +ErrorFailToRenameFile=Eşec la redenumirea fişierului <b>%s</b> în <b>%s</b>. +ErrorFailToDeleteFile=Eşec la ştergerea fişierului '<b>%s</b>'. +ErrorFailToCreateFile=Nu s-a putut creea fişierul '<b>%s</b>'. +ErrorFailToRenameDir=Eşec la redenumirea directorului '<b>%s</b>' în '<b>%s</b>'. +ErrorFailToCreateDir=Nu s-a putut crea directorul '<b>%s</b>'. +ErrorFailToDeleteDir=Nu s-a putut şterge directorul '<b>%s</b>'. +ErrorFailToMakeReplacementInto=Nu s-a putut înlocui în fișierul '<b>%s</b>'. +ErrorFailToGenerateFile=Nu s-a putut genera fișierul '<b>%s</b>'. +ErrorThisContactIsAlreadyDefinedAsThisType=Acest contact este deja definit ca persoană de contact de acest tip. +ErrorCashAccountAcceptsOnlyCashMoney=Acest cont bancar este un cont de numerar, sunt accepate doar plăţi de tip cash. +ErrorFromToAccountsMustDiffers=Contul bancar sursă şi contul bancar destinaţie trebuie să fie diferite. 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ă. -ErrorCustomerCodeRequired=Clientul codul necesar -ErrorBarCodeRequired=Codul de bare necesar -ErrorCustomerCodeAlreadyUsed=Clientul codul folosit deja -ErrorBarCodeAlreadyUsed=Codul de bare utilizat deja -ErrorPrefixRequired=Prefix necesare -ErrorBadSupplierCodeSyntax=Sintaxă greșită pentru codul furnizorului -ErrorSupplierCodeRequired=Codul furnizorului este necesar -ErrorSupplierCodeAlreadyUsed=Codul furnizorului deja folosit -ErrorBadParameters=Bad parametrii +ErrorBadCustomerCodeSyntax=Sintaxă eronată 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 numerotare care nu se potrivește cu valoarea scanată. +ErrorCustomerCodeRequired=Codul client este obligatoriu +ErrorBarCodeRequired=Codul de bare este obligatoriu +ErrorCustomerCodeAlreadyUsed=Codul de clientul este folosit deja +ErrorBarCodeAlreadyUsed=Codul de bare este utilizat deja +ErrorPrefixRequired=Prefix obligatoriu +ErrorBadSupplierCodeSyntax=Sintaxă greșită pentru codul furnizor +ErrorSupplierCodeRequired=Codul furnizor este obligatoriu +ErrorSupplierCodeAlreadyUsed=Codul furnizorului este deja folosit +ErrorBadParameters=Parametri eronaţi 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=&quot;%s&quot; Valoarea are formatul de dată greşit -ErrorWrongDate=Data nu este corecta! -ErrorFailedToWriteInDir=Nu a reuşit să scrie în directorul %s -ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=Found incorecte de email sintaxă pentru %s linii în fişier (de exemplu linia de e-mail cu %s= %s) -ErrorUserCannotBeDelete=Utilizatorul nu poate fi șters. Poate este asociat entităților Dolibarr. -ErrorFieldsRequired=Unele campuri obligatorii nu au fost ocupate. -ErrorSubjectIsRequired=Tema e-mailului este necesară -ErrorFailedToCreateDir=Nu a reuşit să creeze un director. Verificaţi ca server Web utilizator are permisiuni pentru a scrie în directorul de Dolibarr documente. Dacă <b>safe_mode</b> parametru este activat pe această PHP, Dolibarr verifica faptul că fişierele PHP detine la server web utilizator (sau grup). -ErrorNoMailDefinedForThisUser=Nu mail definite pentru acest utilizator -ErrorSetupOfEmailsNotComplete=Configurarea email-urilor nu este finalizată -ErrorFeatureNeedJavascript=Această caracteristică JavaScript trebuie activat pentru a fi la locul de muncă. Schimbare în acest setup - display. -ErrorTopMenuMustHaveAParentWithId0=Un meniu de tip "Top" nu poate avea un părinte de meniu. Pune-0 în meniul părinte sau alege un meniu de tip "stânga". -ErrorLeftMenuMustHaveAParentId=Un meniu de tip "stânga" trebuie să aibă o mamă id. -ErrorFileNotFound=Fişierul nu a fost găsit (Bad calea, greşit permisiunile de acces refuzat sau de openbasedir parametru) -ErrorDirNotFound=Director <b>%s</b> nu a fost găsit (calea Bad, permisiuni greşite sau acces refuzat de către openbasedir PHP, sau safe_mode parametru) -ErrorFunctionNotAvailableInPHP=<b>Funcţia %s</b> este necesar pentru această funcţie, dar nu este disponibil în această versiune / setup de PHP. +ErrorBadValueForParameter=Valoare incorectă '%s' pentru parametrul '%s' +ErrorBadImageFormat=Fișierul de imagine nu are un format acceptat (Configuraţia PHP nu are funcții de conversie pentru acest format) +ErrorBadDateFormat=Valoarea '%s' are formatul de dată greşit +ErrorWrongDate=Data nu este corectă! +ErrorFailedToWriteInDir=Nu s-a reuşit scrierea în directorul %s +ErrorFoundBadEmailInFile=S-a găsit o sintaxă de email incorectă pentru liniile %s din fișier (exemplu de linie %s cu email=%s) +ErrorUserCannotBeDelete=Utilizatorul nu poate fi șters. Poate este asociat unor entități de sistem. +ErrorFieldsRequired=Unele câmpuri obligatorii nu au fost completate. +ErrorSubjectIsRequired=Subiectul emailului este obligatoriu +ErrorFailedToCreateDir=Eşec la crearea unui director. Verificaţi dacă user-ul server-ului web are permisiuni pentru a scrie în directorul de documente. Dacă parametrul <b>safe_mode</b> este activat în PHP, verifică dacă user-ul sistem deţine fişierele de pe server(sau grup). +ErrorNoMailDefinedForThisUser=Nicio adresă de email definită pentru acest utilizator +ErrorSetupOfEmailsNotComplete=Configurarea emailurilor nu este finalizată +ErrorFeatureNeedJavascript=Această caracteristică necesită ca JavaScript să fie activat pentru a funcţiona. Modificaţi în Setări - Afişare. +ErrorTopMenuMustHaveAParentWithId0=Un meniu de tip 'Top' nu poate avea un meniu părinte. Pune 0 la meniul părinte sau alege un meniu de tip 'Stânga'. +ErrorLeftMenuMustHaveAParentId=Un meniu de tip 'Stânga' trebuie să aibă un id părinte. +ErrorFileNotFound=Fişierul <b>%s</b> nu a fost găsit (cale eronată, greşit permisiunile de acces greşite sau refuzate de PHP openbasedir sau parametrul safe_mode) +ErrorDirNotFound=Directorul <b>%s</b> nu a fost găsit (cale eronată, permisiuni greşite sau acces refuzat de către openbasedir PHP, sau parametrul safe_mode) +ErrorFunctionNotAvailableInPHP=Funcţia <b>%s</b> este necesară pentru această caracteristică, dar nu este disponibilă în această versiune/configuraţie de PHP. ErrorDirAlreadyExists=Un director cu acest nume există deja. ErrorFileAlreadyExists=Un fişier cu acest nume există deja. -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. +ErrorDestinationAlreadyExists=Un fişier cu numele <b>%s</b> există deja. +ErrorPartialFile=Fişierul nu a fost recepţionat complet de server. +ErrorNoTmpDir=Directorul temporar %s nu există. +ErrorUploadBlockedByAddon=Încărcarea este blocată de un plugin PHP/Apache. ErrorFileSizeTooLarge=Dimensiunea fişierului este prea mare. 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 +ErrorSizeTooLongForIntType=Dimensiunea este prea mare pentru tipul int (%s cifre maxim) +ErrorSizeTooLongForVarcharType=Dimensiune prea mare pentru tipul string(%s caractere maxim) ErrorNoValueForSelectType=Completaţi valorile pentru lista de selecţie ErrorNoValueForCheckBoxType=Completaţi valorile pentru lista checkbox ErrorNoValueForRadioType=Completaţi valorile pentru lista radio ErrorBadFormatValueList=Valorile din lista nu pot avea mai mult de o virgulă: <u>%s</u>, dar trebuie să aibă cel puțin o: cheie, valoare -ErrorFieldCanNotContainSpecialCharacters=Câmpul <b> %s </b> nu trebuie să conțină caractere speciale. -ErrorFieldCanNotContainSpecialNorUpperCharacters=Câmpul <b> %s </b> nu trebuie să conțină caractere speciale sau majuscule și nu poate conține numai numere. -ErrorFieldMustHaveXChar=Câmpul <b> %s </b> trebuie să aibă cel puțin %scaractere . -ErrorNoAccountancyModuleLoaded=Modul de contabilitate neactivat -ErrorExportDuplicateProfil=Acest profil nume există deja pentru acest set de export. -ErrorLDAPSetupNotComplete=Dolibarr-LDAP de potrivire nu este completă. -ErrorLDAPMakeManualTest=A. Ldif fişier a fost generat în directorul %s. Încercaţi să încărcaţi manual de la linia de comandă pentru a avea mai multe informatii cu privire la erori. +ErrorFieldCanNotContainSpecialCharacters=Câmpul <b>%s</b> nu trebuie să conțină caractere speciale. +ErrorFieldCanNotContainSpecialNorUpperCharacters=Câmpul <b>%s</b> nu trebuie să conțină caractere speciale sau majuscule și nu poate conține numai numere. +ErrorFieldMustHaveXChar=Câmpul <b>%s</b> trebuie să aibă cel puțin %scaractere. +ErrorNoAccountancyModuleLoaded=Modulul Contabilitate nu este activat +ErrorExportDuplicateProfil=Acest nume de profil există deja pentru acest set de export. +ErrorLDAPSetupNotComplete=Potrivirea Dolibarr-LDAP nu este finalizată. +ErrorLDAPMakeManualTest=Un fişier .ldif a fost generat în directorul %s. Încercaţi să încărcaţi manual din linia de comandă pentru a avea mai multe informatii cu privire la erori. ErrorCantSaveADoneUserWithZeroPercentage=Nu se poate salva o acțiune cu "starea nu a început" dacă se completează și câmpul "efectuat de". ErrorRefAlreadyExists=Referinţa <b>%s</b> există deja. ErrorPleaseTypeBankTransactionReportName=Introduceți numele contului bancar unde trebuie raportată înregistrarea (Format YYYYMM sau YYYYMMDD) -ErrorRecordHasChildren=Nu s-a reușit ștergerea înregistrării deoarece are unele înregistrări copii. +ErrorRecordHasChildren=Nu s-a reușit ștergerea înregistrării deoarece are unele înregistrări copil. ErrorRecordHasAtLeastOneChildOfType=Obiectul are cel puțin o copie de tipul %s ErrorRecordIsUsedCantDelete=Nu se poate șterge înregistrarea. Este deja folosită sau inclusă în alt obiect. -ErrorModuleRequireJavascript=Javascript nu trebuie să fie dezactivate pentru a avea această facilitate de lucru. Pentru a activa / dezactiva Javascript, du-te la meniul Home-> Configurare-> Display. +ErrorModuleRequireJavascript=Javascript nu trebuie să fie dezactivat pentru a avea această caresteristică funcţională. Pentru a activa/dezactiva Javascript, du-te la meniul Acasă->Setări->Afişare. ErrorPasswordsMustMatch=Ambele parolele tastate trebuie să se potrivească reciproc -ErrorContactEMail=A apărut o eroare tehnică. Vă rugăm să contactați administratorul la următorul e-mail <b> %s </b> și să-i furnizați codul de eroare <b> %s </b> în mesajul dvs. sau să adăugați o copie de pe ecran a acestei pagini. -ErrorWrongValueForField=Câmp <b> %s </b>: '<b> %s </b>' nu se potrivește cu regula regex <b> %s </b> -ErrorFieldValueNotIn=Câmp <b> %s </b>: '<b> %s </b>' nu este o valoare găsită în câmpul <b> %s </b> din <b> %s </b> -ErrorFieldRefNotIn=Câmpul <b> %s </b>: '<b> %s </b>' nu este un <b> %s </b> ref -ErrorsOnXLines=%serori găsite -ErrorFileIsInfectedWithAVirus=Programul antivirus nu a validet fisierul (fisierul ar putea fi infectat cu un virus) -ErrorSpecialCharNotAllowedForField=Caractere speciale nu sunt permise pentru domeniul "%s" -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 +ErrorContactEMail=A apărut o eroare tehnică. Contactați administratorul tehnic la următoarea adresă de email <b>%s</b> și furnizați-i codul de eroare <b>%s</b> în mesaj sau adăugați-i o copie de ecran a acestei pagini. +ErrorWrongValueForField=Câmpul <b>%s</b>: '<b>%s</b>' nu se potrivește cu regula regex <b>%s</b> +ErrorFieldValueNotIn=Câmpul <b>%s</b>: '<b>%s</b>' nu este o valoare găsită în câmpul <b>%s</b> din <b>%s</b> +ErrorFieldRefNotIn=Câmpul <b>%s</b>: '<b>%s</b>' nu este o <b> %s </b> referinţă existentă +ErrorsOnXLines=%s erori găsite +ErrorFileIsInfectedWithAVirus=Programul antivirus nu a validat fişierul (fişierul ar putea fi infectat cu un virus) +ErrorSpecialCharNotAllowedForField=Caracterele speciale nu sunt permise pentru câmpul "%s" +ErrorNumRefModel=O referinţă există în baza de date (%s) şi nu este compatibilă cu această regulă de numerotare. Şterge sau redenumeşte referinţa pentru a activa acest model. +ErrorQtyTooLowForThisSupplier=Cantitate prea mică pentru acest furnizor sau niciun preț definit pentru acest produs de la acest furnizor ErrorOrdersNotCreatedQtyTooLow=Unele comenzi nu au fost create datorită cantităților prea mici 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 +ErrorBadMask=Eroare pe mască +ErrorBadMaskFailedToLocatePosOfSequence=Eroare, mască fără secvenţă de numerotare +ErrorBadMaskBadRazMonth=Eroare, valoare de resetare eronată +ErrorMaxNumberReachForThisMask=Numărul maxim a fost atins pentru această mască +ErrorCounterMustHaveMoreThan3Digits=Contorul trebuie sa aibă mai mult de 3 cifre 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 -ErrorFailedToLoadRSSFile=Nu pentru a obţine RSS feed. Încercaţi să adăugaţi MAIN_SIMPLEXMLLOAD_DEBUG constantă în cazul în care mesajele de eroare nu furnizează suficiente informaţii. +ErrorDeleteNotPossibleLineIsConsolidated=Ștergerea nu este posibilă deoarece înregistrarea este legată de o tranzacție bancară care este decontată +ErrorProdIdAlreadyExist=%s este atribuit unui alt terţ +ErrorFailedToSendPassword=Eşec la trimiterea parolei +ErrorFailedToLoadRSSFile=Eşec la obţinerea feed-ului RSS. Încercaţi să adăugaţi constanta MAIN_SIMPLEXMLLOAD_DEBUG în cazul în care mesajele de eroare nu furnizează suficiente informaţii. ErrorForbidden=Acces restricționat. <De> Încercați să accesați o pagină, zonă sau caracteristică a unui modul fără a fi autentificat sau pentru care utilizatorul dvs. nu are permisiunile necesare. -ErrorForbidden2=Permisiunea pentru acest login poate fi definită de către administratorul dvs. Dolibarr din meniul %s-> %s. -ErrorForbidden3=Se pare că Dolibarr nu este utilizat autentificate printr-o sesiune. Aruncati o privire la documentaţia de instalare Dolibarr să ştie cum să gestioneze authentications (htaccess, mod_auth sau alte ...). -ErrorNoImagickReadimage=Funcţia imagick_readimage nu este gasit in acest PHP. Nu poate fi previzualizare disponibilă. Administratorii pot dezactiva această filă din meniul Setup - Display. -ErrorRecordAlreadyExists=Record există deja +ErrorForbidden2=Permisiunea pentru acest nume de autentificare poate fi definită de către administratorul sistemului din meniul %s->%s. +ErrorForbidden3=Se pare că sistemul nu este utilizat printr-o sesiune cu autentificare. Aruncati o privire în documentaţia de instalare pentru a şti cum să gestionaţi autentificările (htaccess, mod_auth sau altele...). +ErrorNoImagickReadimage=Clasa Imagick nu a fost găsită în PHP. Nu este disponibilă previzualizarea. Administratorii pot dezactiva această filă din meniul Setări - Afişare. +ErrorRecordAlreadyExists=Înregistrarea există deja ErrorLabelAlreadyExists=Această etichetă există deja -ErrorCantReadFile=Nu a reuşit să citească fişierul " %s" -ErrorCantReadDir=Nu a reuşit să citesc directorul ' %s' -ErrorBadLoginPassword=Bad valoarea de autentificare sau parola -ErrorLoginDisabled=Contul dvs. a fost dezactivat -ErrorFailedToRunExternalCommand=Nu a reuşit să rulaţi comanda externe. Verificaţi aceasta este disponibilă şi runnable de către dumneavoastră PHP de server. Dacă PHP <b>Safe Mode</b> este activat, comanda verifica că este în interiorul unui director definite de parametru <b>safe_mode_exec_dir.</b> -ErrorFailedToChangePassword=Nu a reuşit să schimbaţi parola -ErrorLoginDoesNotExists=User login <b>cu %s</b> 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 +ErrorCantReadFile=Eşec la citirea fişierului '%s' +ErrorCantReadDir=Eşec la citirea directorului ' %s' +ErrorBadLoginPassword=Autentificare sau parolă eronată +ErrorLoginDisabled=Contul tău a fost dezactivat +ErrorFailedToRunExternalCommand=Eşec la rularea comenzii externe. Verifică aceasta este disponibilă şi rulabilă în PHP pe server. Dacă PHP <b>Safe Mode</b> este activat, verifică dacă comanda este în interiorul unui director definit de parametrul <b>safe_mode_exec_dir</b>. +ErrorFailedToChangePassword=Eşec la schimbarea parolei +ErrorLoginDoesNotExists=Contul de utilizator <b>%s</b> nu a putut fi găsit. +ErrorLoginHasNoEmail=Acest utilizator nu are nici o adresa de email. Procesul a fost anulat. +ErrorBadValueForCode=Cod de securitate eronat. Încercaţi cu un cod nou... +ErrorBothFieldCantBeNegative=Câmpurile %s şi %s nu pot fi ambele negative ErrorFieldCantBeNegativeOnInvoice=Câmpul <strong>%s</strong> 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 <b>%s</b>%%). 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 <b>%s</b> folosite pentru a executa serverul de web nu are permisiunea, pentru că +ErrorQtyForCustomerInvoiceCantBeNegative=Cantitatea pentru linia unei facturi client nu poate fi negativă. +ErrorWebServerUserHasNotPermission=Contul de utilizator <b>%s</b> folosit pentru a execuţia serverului de web nu are permisiunea pentru aceasta ErrorNoActivatedBarcode=Niciun tip de coduri de bare activat ErrUnzipFails=Eşec la dezarhivarea fişierului %s cu ZipArchive -ErrNoZipEngine=Nu există niciun motor pentru a arhiva/dezarhiva fișierul %s în acest PHP +ErrNoZipEngine=Nu există niciun motor pentru a arhiva/dezarhiva fișierul %s în această configuraţie PHP 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 +ErrorModuleFileRequired=Trebuie să selectați un fișier pachet de modul Dolibarr +ErrorPhpCurlNotInstalled=PHP CURL nu 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 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 +ErrorFailedToValidatePasswordReset=Eşec la resetarea parolei. Este posibil să fi fost folosit deja acest link (acest link poate fi folosit doar o singură dată). Dacă nu, încercați să reluaţi procesul de resetare. +ErrorToConnectToMysqlCheckInstance=Conectarea la baza de date eșuată. Verificați serverul de bază de date că funcţionează (de exemplu, cu mysql/mariadb, îl puteți lansa din linia de comandă cu 'sudo service mysql start'). +ErrorFailedToAddContact=Eşec la adaugarea contactului 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 <b>%s</b> 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 -ErrorBadFormat=Format gresit! -ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Eroare, acest membru nu este încă legat de niciun terț. Conectați un membru la un terț existent sau creați un terț nou înainte de a crea abonament la factură. -ErrorThereIsSomeDeliveries=Eroare, există unele livrări legate de acest transport. Ștergere refuzată. +ErrorPHPNeedModule=Eroare, PHP trebuie să aibă modulul <b>%s</b> instalat pentru a utiliza această funcţionalitate. +ErrorOpenIDSetupNotComplete=Ai setat fișierul de configurare al sistemului permisiunea de autentificare cu OpenID, dar URL-ul serviciului OpenID nu este definit în constanta %s +ErrorWarehouseMustDiffers=Depozitul sursă și depozitul țintă trebuie să difere +ErrorBadFormat=Format greşit! +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Eroare, acest membru nu este încă asociat unui terț. Asociază un membru la un terț existent sau crează un terț nou înainte de a crea factura de adeziune - cotizaţie. +ErrorThereIsSomeDeliveries=Eroare, există unele expedieri legate de această livrare. Ștergere refuzată. ErrorCantDeletePaymentReconciliated=Nu se poate șterge o plată care a generat o intrare bancară care a fost reconciliată -ErrorCantDeletePaymentSharedWithPayedInvoice=Nu se poate șterge o plată partajată de cel puțin o factură cu starea plătită +ErrorCantDeletePaymentSharedWithPayedInvoice=Nu se poate șterge o plată conţinută de cel puțin o factură cu starea Plătită ErrorPriceExpression1=Nu se poate atribui la constanta '%s' -ErrorPriceExpression2=Nu se poate redefini funcția built-in '%s' -ErrorPriceExpression3=Variabila nedefinita '%s' în definiția funcției +ErrorPriceExpression2=Nu se poate redefini funcția built-in '%s' +ErrorPriceExpression3=Variabilă nedefinită '%s' în definiția funcției ErrorPriceExpression4=Caracter ilegal '%s' ErrorPriceExpression5=Neașteptat '%s' ErrorPriceExpression6=Număr greșit de argumente (%s dat, %s așteptat) ErrorPriceExpression8=Operator neașteptat '%s' ErrorPriceExpression9=A apărut o eroare neașteptată ErrorPriceExpression10=Operatorul '%s' nu are operand -ErrorPriceExpression11=Asteptam '%s' -ErrorPriceExpression14=Împărţirea la zero, +ErrorPriceExpression11=Aşteptam '%s' +ErrorPriceExpression14=Împărţire la zero, ErrorPriceExpression17=Variabila '%s' nedefinită ErrorPriceExpression19=Expresia nu a fost găsită ErrorPriceExpression20=Expresie goală ErrorPriceExpression21=Rezultat gol '%s' ErrorPriceExpression22=Rezultat negativ '%s' -ErrorPriceExpression23=Variabila necunoscută sau nestabilită "%s" în %s -ErrorPriceExpression24=Variabila "%s" există, dar nu are nicio valoare +ErrorPriceExpression23=Variabilă necunoscută sau nesetată '%s' în %s +ErrorPriceExpression24=Variabila '%s' există, dar nu are nicio valoare ErrorPriceExpressionInternal=Eroare internă '%s' -ErrorPriceExpressionUnknown=Eroare Necunoscută '%s' -ErrorSrcAndTargetWarehouseMustDiffers=Depozitul sursă și țintă trebuie să difere -ErrorTryToMakeMoveOnProductRequiringBatchData=Eroare, încercarea de a face o mișcare de stocuri fără informații ca nr. lot/serial, pe produsul '%s' care necesită informații de nr. lot/serial +ErrorPriceExpressionUnknown=Eroare necunoscută '%s' +ErrorSrcAndTargetWarehouseMustDiffers=Depozitul sursă și depozitul țintă trebuie să difere +ErrorTryToMakeMoveOnProductRequiringBatchData=Eroare, se încearcă efectuarea unei mișcări de stoc fără informații ca nr. de lot/serie, pentru produsul '%s' care necesită aceste informații ErrorCantSetReceptionToTotalDoneWithReceptionToApprove= Toate recepțiile înregistrate trebuie mai întâi verificate (aprobate sau respinse) înainte de a se permite efectuarea acestei acțiuni. ErrorCantSetReceptionToTotalDoneWithReceptionDenied= Toate recepțiile înregistrate trebuie mai întâi verificate (aprobate) înainte de a se permite efectuarea acestei acțiuni. -ErrorGlobalVariableUpdater0=Cerere HTTP esuat cu eroarea '%s' -ErrorGlobalVariableUpdater1=Format JSON Invalid '%s' -ErrorGlobalVariableUpdater2=Lipsa parametru '%s' +ErrorGlobalVariableUpdater0=Cererea HTTP a eşuat cu eroarea '%s' +ErrorGlobalVariableUpdater1=Format JSON invalid '%s' +ErrorGlobalVariableUpdater2=Lipsă parametru '%s' ErrorGlobalVariableUpdater3=Datele solicitate nu a fost găsite -ErrorGlobalVariableUpdater4=Client SOAP esuat cu eroarea '%s' -ErrorGlobalVariableUpdater5=Nicio varialbila globala selectata -ErrorFieldMustBeANumeric=Campul <b>%s</b> trebuie sa fie o valoare numerica +ErrorGlobalVariableUpdater4=Client SOAP eşuat cu eroarea '%s' +ErrorGlobalVariableUpdater5=Nicio variabilă globală selectată +ErrorFieldMustBeANumeric=Câmpul <b>%s</b> trebuie să fie de tip numeric ErrorMandatoryParametersNotProvided= Parametrii obligatorii nu au fost furnizați -ErrorOppStatusRequiredIfAmount=Ați stabilit o sumă estimată pentru acest exemplu. De asemenea, trebuie să-i introduceți și statutul . -ErrorFailedToLoadModuleDescriptorForXXX=Nu s-a încărcat clasa descriptorilor de module pentru %s +ErrorOppStatusRequiredIfAmount=Ați stabilit o sumă estimată pentru acest lead. De asemenea, trebuie să-i introduci și statusul. +ErrorFailedToLoadModuleDescriptorForXXX=Nu s-a încărcat clasa descriptor de modul pentru %s ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Definire greșită pentru Menu Array in descriptorul modulului (valoare greșită pentru cheia fk_menu) 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' +ErrorFileMustHaveFormat=Fişierul trebuie să aibă formatul %s 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ă. +ErrorSupplierCountryIsNotDefined=Țara pentru acest furnizor nu este definită. Corectați mai întâi. +ErrorsThirdpartyMerge=Nu s-au putut îmbina cele două înregistrări. Comanda a fost anulată. ErrorStockIsNotEnoughToAddProductOnOrder=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o comandă nouă. ErrorStockIsNotEnoughToAddProductOnInvoice=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o nouă factură. -ErrorStockIsNotEnoughToAddProductOnShipment=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o expediere nouă. -ErrorStockIsNotEnoughToAddProductOnProposal=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o nouă propunere. +ErrorStockIsNotEnoughToAddProductOnShipment=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o livrare nouă. +ErrorStockIsNotEnoughToAddProductOnProposal=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o ofertă nouă. ErrorFailedToLoadLoginFileForMode=Nu s-a reușit obținerea cheii de conectare pentru modul '%s'. ErrorModuleNotFound=Fișierul modulului nu a fost găsit. -ErrorFieldAccountNotDefinedForBankLine=Valoarea contului de contabilitate nu este definită pentru id-ul liniei sursă %s (%s) -ErrorFieldAccountNotDefinedForInvoiceLine=Valoarea contului de contabilitate nu este definită pentru id-ul facturii %s (%s) -ErrorFieldAccountNotDefinedForLine=Valoarea pentru contul de contabilitate nu este definită pentru linia (%s) -ErrorBankStatementNameMustFollowRegex=Eroare, numele declarației bancare trebuie să respecte următoarea regulă de sintaxă %s -ErrorPhpMailDelivery=Verificați dacă nu utilizați un număr prea mare de destinatari și că conținutul dvs. de e-mail nu este similar cu cel al unui Spam. Cereți, de asemenea, administratorului dvs. să verifice fișierele de firewall și de jurnale de server pentru informații mai complete. -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. +ErrorFieldAccountNotDefinedForBankLine=Contul contabil nu este definit pentru id-ul liniei sursă %s (%s) +ErrorFieldAccountNotDefinedForInvoiceLine=Contul contabil nu este definit pentru id-ul facturii %s (%s) +ErrorFieldAccountNotDefinedForLine=Contul contabil nu este definit pentru linia (%s) +ErrorBankStatementNameMustFollowRegex=Eroare, numele extrasului bancar trebuie să respecte următoarea regulă de sintaxă %s +ErrorPhpMailDelivery=Verificați dacă nu utilizați un număr prea mare de destinatari și că conținutul email-ului nu este similar cu cel al unui Spam. Cere, de asemenea, administratorului să verifice fișierele de firewall și de jurnale de server pentru informații mai complete. +ErrorUserNotAssignedToTask=Utilizatorul trebuie să fie atribuit task-ului pentru a putea introduce timpul consumat. +ErrorTaskAlreadyAssigned=Task atribuit deja utilizatorului +ErrorModuleFileSeemsToHaveAWrongFormat=Pachetul de modul pare să aibă un format greșit. ErrorModuleFileSeemsToHaveAWrongFormat2=Cel puțin un director trebuie să existe obligatoriu în arhiva zip a modulului: <strong>%s</strong> sau <strong>%s</strong> -ErrorFilenameDosNotMatchDolibarrPackageRules=Numele pachetului de module (<strong> %s </strong>) nu se potrivește cu sintaxa numelui așteptat: <strong> %s </strong> -ErrorDuplicateTrigger=Eroare, numele de declanșare duplicat %s. Deja încărcat de la %s. +ErrorFilenameDosNotMatchDolibarrPackageRules=Numele pachetului de modul (<strong> %s</strong>) nu se potrivește cu sintaxa de denumire așteptată: <strong>%s</strong> +ErrorDuplicateTrigger=Eroare, nume de trigger duplicat %s. Este deja încărcat de %s. ErrorNoWarehouseDefined=Eroare, nu au fost definite depozite. ErrorBadLinkSourceSetButBadValueForRef=Linkul pe care îl utilizați nu este valid. O "sursă" pentru plată este definită, dar valoarea pentru "ref" nu este validă. ErrorTooManyErrorsProcessStopped=Prea multe erori. Procesul a fost oprit. -ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Validarea în masă nu este posibilă atunci când opțiunea de creștere/scădere a stocului este setată pentru această acțiune (trebuie să validezi unul câte unul pentru a putea defini depozitul pentru a crește/micșora) -ErrorObjectMustHaveStatusDraftToBeValidated=Obiectul %s trebuie să aibă statutul de "Schiţă" pentru a fi validat. +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=Validarea în masă nu este posibilă atunci când opțiunea de creștere/scădere a stocului este setată pentru această acțiune (trebuie să validezi unul câte unul pentru a putea defini depozitul de creștere/micșorare) +ErrorObjectMustHaveStatusDraftToBeValidated=Obiectul %s trebuie să aibă statusul "Schiţă" pentru a fi validat. ErrorObjectMustHaveLinesToBeValidated=Obiectul %s trebuie să aibă linii ca să fie validat. -ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Numai facturile validate pot fi trimise utilizând acțiunea de masă "Trimiteți prin e-mail". -ErrorChooseBetweenFreeEntryOrPredefinedProduct=Trebuie să alegeți dacă articolul este un produs predefinit sau nu +ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Numai facturile validate pot fi trimise utilizând acțiunea de masă "Trimite pe email". +ErrorChooseBetweenFreeEntryOrPredefinedProduct=Trebuie să bifaţi dacă articolul este un produs predefinit sau nu ErrorDiscountLargerThanRemainToPaySplitItBefore=Reducerea pe care încercați să o aplicați este mai mare decât restul de plată. Împărțiți reducerea în 2 reduceri mai mici înainte. -ErrorFileNotFoundWithSharedLink=Dosarul nu a fost găsit. Poate fi modificată cheia de distribuire sau fișierul a fost eliminat recent. -ErrorProductBarCodeAlreadyExists=Codul de bare al produsului %s există deja în altă referință la produs. +ErrorFileNotFoundWithSharedLink=Fişierul nu a fost găsit. Poate s-a modificat cheia de partajare sau fișierul a fost eliminat recent. +ErrorProductBarCodeAlreadyExists=Codul de bare al produsului %s există deja la altă referință de produs. ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Rețineți, de asemenea, că utilizarea kiturilor pentru a crește/micșora automat subprodusele nu este posibilă atunci când cel puțin un subprodus (sau subprodus al subproduselor) are nevoie de un număr de serie/lot. -ErrorDescRequiredForFreeProductLines=Descrierea este obligatorie pentru liniile cu produse gratuite -ErrorAPageWithThisNameOrAliasAlreadyExists=Pagina/containerul <strong> %s </strong> are același nume sau un alias alternativ ca cel pe care încercați să îl utilizați +ErrorDescRequiredForFreeProductLines=Descrierea este obligatorie pentru liniile cu produse text liber +ErrorAPageWithThisNameOrAliasAlreadyExists=Pagina/containerul <strong>%s</strong> are același nume sau un alias alternativ ca cel pe care încercați să îl utilizați ErrorDuringChartLoad=Eroare la încărcarea schemei de conturi. În cazul în care câteva conturi nu au fost încărcate, le puteți introduce în continuare manual. 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:// +ErrorHostMustNotStartWithHttp=Numele gazdei %s NU trebuie să înceapă cu http:// sau https:// 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. @@ -252,38 +254,45 @@ ErrorValueLength=Lungimea câmpului '<b>%s</b>' trebuie să fie mai mare de '<b> ErrorReservedKeyword=Cuvântul '<b>%s</b>' este un cuvânt cheie rezervat ErrorNotAvailableWithThisDistribution=Nu este disponibil cu această distribuție ErrorPublicInterfaceNotEnabled=Interfaţa publică nu a fost activată -ErrorLanguageRequiredIfPageIsTranslationOfAnother=Limba noii pagini trebuie definită dacă este setată ca traducere a altei pagini  -ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother= Limba nooi pagini nu trebuie să fie limba sursă dacă este setată ca traducere a altei pagini  +ErrorLanguageRequiredIfPageIsTranslationOfAnother=Limba noii pagini trebuie definită dacă este setată ca traducere a altei pagini +ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother= Limba noii pagini nu trebuie să fie limba sursă dacă este setată ca traducere a altei pagini ErrorAParameterIsRequiredForThisOperation=Un parametru este obligatoriu pentru această operațiune +ErrorDateIsInFuture=Eroare, data nu poate fi în viitor +ErrorAnAmountWithoutTaxIsRequired=Eroare, suma este obligatorie +ErrorAPercentIsRequired=Eroare, completați procentajul corect +ErrorYouMustFirstSetupYourChartOfAccount=Trebuie să setezi mai întâi planul de conturi # Warnings 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 aici pentru a seta parametrii obligatorii WarningEnableYourModulesApplications=Click aici pentru a activa modulele şi aplicaţiile tale -WarningSafeModeOnCheckExecDir=Atenţie, PHP <b>safe_mode</b> opţiune este pe atât de comandă trebuie să fie depozitate într-un director declarate de <b>safe_mode_exec_dir</b> 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. -WarningConfFileMustBeReadOnly=Atenţie, fişierul de configurare dvs. <b>(htdocs / conf / conf.php)</b> poate fi suprascrise de către serverul de web. Aceasta este o gaura de securitate grave. Modificare permisiuni pe fişier pentru a fi citit în modul doar pentru utilizatorul sistemului de operare folosit de server Web. Dacă utilizaţi Windows şi formatul FAT pentru discul dvs., vă trebuie să ştiţi că acest sistem de fişier nu se permite to adăuga permisiuni la dosar, deci nu poate fi complet safe. -WarningsOnXLines=Avertismentele privind sursa <b>%s</b> linii +WarningSafeModeOnCheckExecDir=Atenţie, opţiunea PHP <b>safe_mode</b> este activă deci comanda trebuie să fie într-un director declarat în parametrul PHP <b>safe_mode_exec_dir</b>. +WarningBookmarkAlreadyExists=Un marcaj cu acest titlu sau adresă (URL) există deja. +WarningPassIsEmpty=Atenţie, parola bazei de date este nulă. Aceasta reprezintă o problemă de securitate. Ar trebui să adaugi o parolă pentru conectarea la baza de date şi să modifici în fişierul conf.php, pentru a reflecta acest lucru. +WarningConfFileMustBeReadOnly=Atenţie, fişierul tău de configurare (<b>htdocs/conf/conf.php</b>) poate fi suprascris de către serverul web. Aceasta este o problemă de securitate gravă. Modifică permisiunile pe fişier pentru a putea fi doar citit de utilizatorul sistemului de operare folosit de server-ul web. Dacă utilizaţi Windows şi formatul de partiţionare FAT, nu este posibil să adaugi permisiuni pe director, deci nu poate fi safe. +WarningsOnXLines=Avertismente pe <b>%s</b> înregistrare(ări) sursă WarningNoDocumentModelActivated=Nu a fost activat niciun model, pentru generarea de documente. Un model va fi ales în mod implicit până când verificați configurarea modulului. -WarningLockFileDoesNotExists=Avertisment, odată ce configurația este terminată, trebuie să dezactivați instrumentele de instalare/migrare adăugând un fișier <b> install.lock </b> în directorul <b> %s </b>. Omiterea creării acestui fișier reprezintă un risc serios de securitate. -WarningUntilDirRemoved=Toate avertismentele de securitate (vizibile numai de către utilizatorii administrației) vor rămâne active, atâta timp cât vulnerabilitatea este prezentă (sau că MAIN_REMOVE_INSTALL_WARNING este adăugată constant în Setup-> Other Setup). -WarningCloseAlways=Atenţie, închiderea are loc chiar dacă suma diferă. Nu activati aceasta funcţionalitate decât în cunoaștinţă de cauză. -WarningUsingThisBoxSlowDown=Atenție, folosind această casetă încetiniţi serios toate paginile ce arată caseta. -WarningClickToDialUserSetupNotComplete=Setările informațiilor ClickToDial pentru userul dvs. nu sunt complete (vezi tabul ClickToDial pe fişal dvs. de utilizator). -WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcţionalitate dezactivată atunci când configurarea de afișare este optimizată pentru nevăzători sau de browsere text . -WarningPaymentDateLowerThanInvoiceDate=Data plăţii(%s) este mai veche decât data facturii (%s) pentru factura %s +WarningLockFileDoesNotExists=Atenţie, o dată ce configurarea este finalizată, trebuie să dezactivați instrumentele de instalare/migrare adăugând un fișier <b>install.lock</b> în directorul <b> %s </b>. Omiterea creării acestui fișier reprezintă un risc serios de securitate. +WarningUntilDirRemoved=Toate avertismentele de securitate (vizibile numai de către utilizatorii administratori) vor rămâne active, atâta timp cât vulnerabilitatea este prezentă (sau constanta MAIN_REMOVE_INSTALL_WARNING este adăugată în Setări->Alte setări). +WarningCloseAlways=Atenţie, închiderea are loc chiar dacă suma diferă. Nu activati aceasta funcţionalitate decât în cunoștinţă de cauză. +WarningUsingThisBoxSlowDown=Atenție, folosind această casetă încetiniţi serios toate paginile care afişează caseta. +WarningClickToDialUserSetupNotComplete=Setările informațiilor ClickToDial pentru utilizatorul tău nu sunt complete (vezi tabul ClickToDial pe fişal dvs. de utilizator). +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcţionalitate dezactivată atunci când configurarea de afișare este optimizată pentru nevăzători sau pentru browsere text . +WarningPaymentDateLowerThanInvoiceDate=Data plăţii(%s) este anterioară datei facturii (%s) pentru factura %s WarningTooManyDataPleaseUseMoreFilters= Prea multe date (mai mult de %s linii). Folosiți mai multe filtre sau setați constanta %s la o limită superioară. -WarningSomeLinesWithNullHourlyRate=Unele perioade de timp au fost înregistrate de unii utilizatori în timp ce rata lor orară nu a fost definită. A fost utilizată o valoare de 0 %s pe oră, dar acest lucru poate duce la o evaluare greșită a timpului petrecut. +WarningSomeLinesWithNullHourlyRate=Unele perioade de timp consumat au fost înregistrate de unii utilizatori care nu aveau tariful orar definit. A fost utilizată valoarea 0 %s pe oră, dar acest lucru poate duce la o evaluare financiară greșită a timpului consumat. WarningYourLoginWasModifiedPleaseLogin=Utilizatorul-ul a fost modificat. Din motive de securitate, va trebui să vă conectați cu noul dvs. utilizator înainte de următoarea acțiune. -WarningAnEntryAlreadyExistForTransKey=Există deja o intrare pentru cheia de traducere pentru această limbă -WarningNumberOfRecipientIsRestrictedInMassAction=Avertisment, numărul destinatarului diferit este limitat la <b> %s </b> când se utilizează acțiunile de masă din liste -WarningDateOfLineMustBeInExpenseReportRange=Avertisment, data liniei nu este în intervalul raportului de cheltuieli -WarningProjectDraft=Proiectul este încă în modul schiţă. Nu uitați să îl validați dacă intenționați să utilizați sarcini. +WarningAnEntryAlreadyExistForTransKey=Există deja o intrare pe cheia de traducere pentru această limbă +WarningNumberOfRecipientIsRestrictedInMassAction=Avertisment, numărul de destinatari diferiţi este limitat la <b> %s </b> când se utilizează acțiunile de masă din liste +WarningDateOfLineMustBeInExpenseReportRange=Atenţie, data liniei nu este în intervalul raportului de cheltuieli +WarningProjectDraft=Proiectul este încă în modul schiţă. Nu uitați să îl validați dacă intenționați să utilizați task-uri. WarningProjectClosed=Proiectul este închis. Trebuie să-l redeschideți mai întâi. 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=Atenţie , nu s-a putut adăuga fișierului în tabela index al bazei de date ECM WarningTheHiddenOptionIsOn=Atenţie, opţiunea ascunsă <b>%s</b> este activă. WarningCreateSubAccounts=Atenție, nu puteți crea direct un cont secundar, trebuie să creați un terț sau un utilizator și să le atribuiți un cod contabil pentru a le găsi în această listă WarningAvailableOnlyForHTTPSServers=Disponibil numai dacă se utilizează conexiunea securizată HTTPS. +WarningModuleXDisabledSoYouMayMissEventHere=Modulul %s nu a fost activat. Este posibil să pierdeți o mulțime de evenimente aici.  +ErrorActionCommPropertyUserowneridNotDefined=Utilizatorul deţinător este obligatoriu +ErrorActionCommBadType=Tipul evenimentului selectat (id: %n, cod: %s) nu există în dicţionarul Tipuri evenimente diff --git a/htdocs/langs/ro_RO/externalsite.lang b/htdocs/langs/ro_RO/externalsite.lang index a66dc1f4189..1b2e130a3d5 100644 --- a/htdocs/langs/ro_RO/externalsite.lang +++ b/htdocs/langs/ro_RO/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Link-ul de instalare pentru site-ul extern -ExternalSiteURL=URL-ul site-ului extern +ExternalSiteURL=URL-ul site-ului extern care va fi conținut în iframe HTML ExternalSiteModuleNotComplete=Modulul Site extern nu a fost configurat corespunzător. -ExampleMyMenuEntry=Intrare Meniul meu +ExampleMyMenuEntry=Intrare în Meniul meu diff --git a/htdocs/langs/ro_RO/main.lang b/htdocs/langs/ro_RO/main.lang index 8edaaa8f73e..ae771d583c1 100644 --- a/htdocs/langs/ro_RO/main.lang +++ b/htdocs/langs/ro_RO/main.lang @@ -15,14 +15,14 @@ FormatDateShortJavaInput=dd.MM.yyyy FormatDateShortJQuery=dd.mm.yy FormatDateShortJQueryInput=dd.mm.yy FormatHourShortJQuery=HH:MI -FormatHourShort=%H:%M +FormatHourShort=%H:%M %p FormatHourShortDuration=%H:%M -FormatDateTextShort=%d %b %Y -FormatDateText=%d %B %Y +FormatDateTextShort=%d %b, %Y +FormatDateText=%d %B ,%Y FormatDateHourShort=%d.%m.%Y %H:%M FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p -FormatDateHourTextShort=%d %b %Y %H:%M -FormatDateHourText=%d %B %Y %H:%M +FormatDateHourTextShort=%d %b, %Y, %H:%M %p +FormatDateHourText=%d %B, %Y, %H:%M %p DatabaseConnection=Conexiunea la baza de date NoTemplateDefined=Nu există șablon disponibil pentru acest tip de email AvailableVariables=Variabile de substituţie disponibile @@ -53,20 +53,20 @@ 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 +ErrorYourCountryIsNotDefined=Țara ta. nu este definită. Mergi în Acasă-Setări-Editare și completaţi din nou formularul. +ErrorRecordIsUsedByChild=Nu s-a reușit ștergerea acestei înregistrări. Această înregistrare este utilizată de cel puțin înregistrare dependentă 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 nu au fost salvate. -ErrorConfigParameterNotDefined=Parametrul <b> %s </b> nu este definit în fișierul de configurare Dolibarr <b> conf.php </b>. +ErrorConfigParameterNotDefined=Parametrul <b>%s</b> nu este definit în fișierul de configurare al sistemului <b>conf.php</b>. ErrorCantLoadUserFromDolibarrDatabase=Utilizatorul<b>%s</b> 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 +ErrorCannotAddThisParentWarehouse=Încercați să adăugați un depozit părinte care este deja subaltern a unui depozit existent MaxNbOfRecordPerPage=Numărul maxim de înregistrări pe pagină NotAuthorized=Nu aveţi dreptul să faceţi asta. SetDate=Setează data @@ -91,10 +91,10 @@ DedicatedPageAvailable=Există o pagină de ajutor dedicată legată de ecranul HomePage=Acasă RecordSaved=Înregistrare salvată RecordDeleted=Înregistrare ştearsă -RecordGenerated=Înregistrată generată +RecordGenerated=Înregistrare generată LevelOfFeature=Nivel funcţionalităţi NotDefined=Nedefinit -DolibarrInHttpAuthenticationSoPasswordUseless=Modul de autentificare Dolibarr este setat la <b> %s </b> în fișierul de configurare <b> conf.php </b>. <br> Aceasta înseamnă că baza de date pentru parole este externă pentru Dolibarr, deci schimbarea acestui câmp poate să nu aibă efect. +DolibarrInHttpAuthenticationSoPasswordUseless=Modul de autentificare în sistem este setat la <b>%s</b> în fișierul de configurare <b>conf.php</b>. <br> 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=Ai uitat parola? @@ -105,14 +105,14 @@ LastConnexion=Ultima autentificare PreviousConnexion=Autentificarea anterioară PreviousValue=Valoare anterioară ConnectedOnMultiCompany=Conectat la entitatea -ConnectedSince=Conectat de +ConnectedSince=Conectat din 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ă +DolibarrHasDetectedError=Sistemul a întâmpinat 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 notificări) MoreInformation=Mai multe informaţii @@ -121,7 +121,7 @@ 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 <b>%s</b> zecimale. +PrecisionUnitIsLimitedToXDecimals=Sistemul a fost de configurat cu o limită de precizie pentru prețuri unitare de <b>%s</b> zecimale. DoTest=Test ToFilter=Filtru NoFilter=Fără filtru @@ -157,28 +157,28 @@ Add=Adaugă AddLink=Adaugă link RemoveLink=Eliminaţi link AddToDraft=Adaugă la schiţă -Update=Modifică +Update=Modificare Close=Închide CloseAs=Setați starea la 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 <b> %s </b>? -Delete=Şterge -Remove=Elimină +Confirm=Confirmare +ConfirmSendCardByMail=Chiar doriți să trimiteți conținutul acestei fişe prin poștă la <b>%s</b>? +Delete=Ştergere +Remove=Eliminare Resiliate=Termină -Cancel=Anulează +Cancel=Anulare Modify=Modifică -Edit=Editează +Edit=Editare Validate=Validează ValidateAndApprove=Validează şi aprobă ToValidate=De validat NotValidated=Nevalidată -Save=Salvează -SaveAs=Salvează ca +Save=Salvare +SaveAs=Salvare ca SaveAndStay=Salvează şi rămâi aici SaveAndNew=Salvează şi mergi la pagină nouă TestConnection=Test conexiune -ToClone=Clonează +ToClone=Clonare ConfirmCloneAsk=Eşti sigur că vrei să clonezi obiectul <b>%s</b>? ConfirmClone=Alegeți datele pe care doriți să le clonați: NoCloneOptionsSpecified=Nu există date definite pentru a clona . @@ -188,33 +188,33 @@ Run=Lansează CopyOf=Copie la Show=Afişează Hide=Ascunde -ShowCardHere=Arăta fişa aici +ShowCardHere=Arată fişa Search=Caută SearchOf=Căutare SearchMenuShortCut=Ctrl + shift + f QuickAdd=Adăugare rapidă QuickAddMenuShortCut=Ctrl + shift + l -Valid=Validează -Approve=Aprobaţi -Disapprove=Dezaproba -ReOpen=Redeaschide -Upload=Încărcați +Valid=Valid +Approve=Aprobare +Disapprove=Dezaprobă +ReOpen=Redeschide +Upload=Încărcare ToLink=Link -Select=Selectaţi +Select=Selectare SelectAll=Selectează toate Choose=Alege -Resize=Redimensionează -ResizeOrCrop=Redimensionați sau decupați -Recenter=Recentrează +Resize=Redimensionare +ResizeOrCrop=Redimensionare sau decupare +Recenter=Recentrare Author=Autor User=Utilizator Users=Utilizatori Group=Grup Groups=Grupuri -NoUserGroupDefined=Niciun grup utilizator definit +NoUserGroupDefined=Niciun grup de utilizatori definit Password=Parola PasswordRetype=Repetă parola -NoteSomeFeaturesAreDisabled=Atenţie, o mulţime de funcţionalităţi / module sunt dezactivate în această demonstraţie. +NoteSomeFeaturesAreDisabled=Atenţie, o mulţime de funcţionalităţi/module sunt dezactivate în această instanţă demonstrativă. Name=Nume NameSlashCompany=Nume/Companie Person=Persoană @@ -234,7 +234,7 @@ Note=Notă Title=Titlu Label=Etichetă RefOrLabel=Ref. sau etichetă -Info=Loguri +Info=Jurnal Family=Familie Description=Descriere Designation=Descriere @@ -242,7 +242,7 @@ DescriptionOfLine=Descriere de linie DateOfLine=Data liniei DurationOfLine=Durata liniei Model=Șablonul documentului -DefaultModel=Șablonul documentului implicit +DefaultModel=Șablonul implicit document Action=Eveniment About=Despre Number=Număr @@ -266,7 +266,7 @@ HourStart=Oră start Deadline=Termen limită Date=Dată DateAndHour=Dată şi oră -DateToday=Astazi +DateToday=Astăzi DateReference=Data referinţă DateStart=Dată începere DateEnd=Dată sfîrşit @@ -278,10 +278,11 @@ DateModificationShort=Dată modif. IPModification=IP modificare DateLastModification=Data ultimei modificări DateValidation=Dată validare +DateSigning=Data semnării DateClosing=Dată închidere DateDue=Dată scadenţă -DateValue=Dată decontare -DateValueShort=Dată decontare +DateValue=Dată valoare +DateValueShort=Dată valoare DateOperation=Dată operare DateOperationShort=Dată ope. DateLimit=Dată limită @@ -331,9 +332,9 @@ Quadri=Trimestru MonthOfDay=Luna curentă DaysOfWeek=Zilele săptămânii HourShort=H -MinuteShort=mn -Rate=Rată -CurrencyRate=Rata de conversie valutară +MinuteShort=min +Rate=Curs +CurrencyRate=Curs de schimb monedă UseLocalTax=Include taxe Bytes=Octeţi KiloBytes=Kiloocteţi @@ -361,8 +362,8 @@ UnitPriceHTCurrency=Prețul unitar(fără taxe)(fără valută) UnitPriceTTC=Preț unitar PriceU=P.U. PriceUHT=PU(net) -PriceUHTCurrency=P.U (monedă) -PriceUTTC=P.U.(incl. taxe) +PriceUHTCurrency=P.U (net) (monedă) +PriceUTTC=P.U.(cu taxe) Amount=Valoare AmountInvoice=Valoare factură AmountInvoiced=Suma facturată @@ -389,6 +390,8 @@ AmountTotal=Valoare totală AmountAverage=Valoare medie PriceQtyMinHT=Preţ cantitate min. (fără taxe) PriceQtyMinHTCurrency=Preţ cantitate min. (fără taxe) (valută) +PercentOfOriginalObject=Procentul din obiectul original +AmountOrPercent=Valoare sau procent Percentage=Procentaj Total=Total SubTotal=Subtotal @@ -397,38 +400,38 @@ 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ă +TotalHTforthispage=Total (fără taxe) pentru această pagină Totalforthispage=Total pentru această pagină -TotalTTC=Total (inc. tax) -TotalTTCToYourCredit=Total (taxa Inc) în creditul dvs -TotalVAT=Total TVA +TotalTTC=Total (cu taxe) +TotalTTCToYourCredit=Total (cu taxe) în creditul tău +TotalVAT=Total taxe TotalVATIN=Total IGST -TotalLT1=Total tax 2 -TotalLT2=Total tax 3 +TotalLT1=Total taxa 2 +TotalLT2=Total taxa 3 TotalLT1ES=Total RE TotalLT2ES=Total IRPF TotalLT1IN=Total CGST TotalLT2IN=Total SGST -HT=Fără impozit -TTC=Inc. taxe -INCVATONLY=Include TVA +HT=Fără taxe +TTC=Cu taxe +INCVATONLY=Incl. TVA INCT=Include toate taxele VAT=TVA VATIN=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 -LT2Type=Tip impozit pe vânzări 3 +LT1=Taxa pe vânzări 2 +LT1Type=Tip taxă pe vânzări 2 +LT2=Taxă pe vânzări 3 +LT2Type=Tip taxă pe vânzări 3 LT1ES=RE LT2ES=IRPF LT1IN=CGST LT2IN=SGST LT1GC=Procente adiţionale -VATRate=Taxa TVA +VATRate=Cota TVA VATCode=Cod cotă TVA -VATNPR=Rata impozitului NPR +VATNPR=Cotă taxă NPR DefaultTaxRate=Cotă taxă implicită Average=Medie Sum=Suma @@ -456,35 +459,35 @@ Comment=Comentează Comments=Comentarii ActionsToDo=Evenimente de făcut ActionsToDoShort=De făcut -ActionsDoneShort=Făcut +ActionsDoneShort=Efectuat ActionNotApplicable=Nu se aplică ActionRunningNotStarted=De început ActionRunningShort=În progres -ActionDoneShort=Terminat +ActionDoneShort=Finalizat ActionUncomplete=Incomplet LatestLinkedEvents=Ultimele %s evenimente asociate CompanyFoundation=Companie/Organizație Accountant=Contabil -ContactsForCompany=Contacte pentru aceast terţ -ContactsAddressesForCompany=Contacte pentru aceast terţ +ContactsForCompany=Contacte pentru acest terţ +ContactsAddressesForCompany=Contacte/adrese pentru acest terţ AddressesForCompany=Adrese pentru acest terţ -ActionsOnCompany=Evenimente pentru acest terț +ActionsOnCompany=Evenimente pe acest terț 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 făcut -Completed=Complet +Completed=Terminat Running=În progres RequestAlreadyDone=Cerere deja înregistrată Filter=Filtru FilterOnInto=Criteriu Cautare '<strong>%s</strong>' in câmpurile %s -RemoveFilter=Îndepărtați filtrul +RemoveFilter=Îndepărtare filtru ChartGenerated=Grafice generate ChartNotGenerated=Grafic negenerat GeneratedOn=Generat pe %s -Generate=Generează +Generate=Generare Duration=Durată TotalDuration=Durată totală Summary=Sumar @@ -492,7 +495,7 @@ DolibarrStateBoard=Statistici bază de date DolibarrWorkBoard=Deschideți elementele NoOpenedElementToProcess=Nici un element deschis care trebuie procesat Available=Disponibil -NotYetAvailable=Nedisponibil încă +NotYetAvailable=Indisponibil încă NotAvailable=Indisponibil Categories=Tag-uri/categorii Category=Tag/categorie @@ -501,7 +504,7 @@ From=De la FromDate=De la FromLocation=De la at=la -to=la +to=până la To=la and=şi or=sau @@ -537,7 +540,7 @@ Received=Primit Paid=Plătit Topic=Subiect ByCompanies=După terți -ByUsers=De către utilizator +ByUsers=De utilizator Links=Link-uri Link=Link Rejects=Respingeri @@ -548,17 +551,17 @@ None=Niciunul 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. +LateDesc=Un element este definit ca Întârziat conform configurației sistemului din meniul Acasă - Setări - Alerte. NoItemLate=Nimic întârziat Photo=Foto Photos=Fotografii AddPhoto=Adaugă foto DeletePicture=Şterge foto -ConfirmDeletePicture=Confirmaţi ştergere foto ? +ConfirmDeletePicture=Confirmaţi ştergerea fotografiei? Login=Autentificare LoginEmail=Autentificare (email) -LoginOrEmail=Autentificare sau Email -CurrentLogin=Login curent +LoginOrEmail=Nume de autentificare sau Email +CurrentLogin=Autentificarea curentă EnterLoginDetail=Introduceți datele de autentificare January=Ianuarie February=Februarie @@ -596,25 +599,25 @@ MonthShort09=sep MonthShort10=oct MonthShort11=nov MonthShort12=dec -MonthVeryShort01=J -MonthVeryShort02=V -MonthVeryShort03=L +MonthVeryShort01=I +MonthVeryShort02=F +MonthVeryShort03=M MonthVeryShort04=A -MonthVeryShort05=L -MonthVeryShort06=J -MonthVeryShort07=J +MonthVeryShort05=M +MonthVeryShort06=I +MonthVeryShort07=I MonthVeryShort08=A -MonthVeryShort09=D +MonthVeryShort09=S MonthVeryShort10=O MonthVeryShort11=N MonthVeryShort12=D AttachedFiles=Fişiere şi documente ataşate -JoinMainDoc=Alăturați-vă documentului principal +JoinMainDoc=Alăturați documentului principal DateFormatYYYYMM=YYYY-MM DateFormatYYYYMMDD=YYYY-MM-DD -DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH: SS -ReportName=Nume Raport -ReportPeriod=Perioadă Raport +DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH:SS +ReportName=Nume raport +ReportPeriod=Perioadă de raportare ReportDescription=Descriere Report=Raport Keyword=Cuvânt cheie @@ -629,7 +632,7 @@ ReadPermissionNotAllowed=Citirea nu este permisă AmountInCurrency=Valoare în moneda %s Example=Exemplu Examples=Exemple -NoExample=Nu exemplu +NoExample=Niciun exemplu FindBug=Raportaţi o eroare NbOfThirdParties=Număr terţi NbOfLines=Număr linii @@ -639,22 +642,22 @@ Referers=Obiecte asociate TotalQuantity=Cantitatea totală DateFromTo=De la %s la %s DateFrom=Începând cu %s -DateUntil=Până în %s -Check=Verifică +DateUntil=Până la %s +Check=Bifaţi Uncheck=Debifați Internal=Intern External=Extern -Internals=Interne +Internals=Intern Externals=Extern Warning=Atenţie Warnings=Avertismente BuildDoc=Generează Doc -Entity=Mediu -Entities=Entităţile -CustomerPreview=Preview Client +Entity=Entitate +Entities=Entităţi +CustomerPreview=Previzualizare client SupplierPreview=Previzualizare furnizor -ShowCustomerPreview=Afişează Preview client -ShowSupplierPreview=Afișați previzualizarea furnizorului +ShowCustomerPreview=Afişează preview client +ShowSupplierPreview=Afișează previzualizare furnizor RefCustomer=Ref. client InternalRef=Ref. internă Currency=Moneda @@ -669,48 +672,48 @@ FeatureNotYetSupported=Funcţionalitate încă nesuportată CloseWindow=Închide fereastra Response=Răspuns Priority=Prioritate -SendByMail=Trimis prin email -MailSentBy=E-mail trimis de +SendByMail=Trimis pe email +MailSentBy=Email trimis de NotSent=Nu a fost trimis -TextUsedInTheMessageBody=Continut Email -SendAcknowledgementByMail=Trimite confirmare email -SendMail=Trimite un email +TextUsedInTheMessageBody=Conţinut email +SendAcknowledgementByMail=Trimite email cu confirmare +SendMail=Trimite email Email=Email NoEMail=Niciun email AlreadyRead=Citit deja -NotRead=Necitită -NoMobilePhone=Fără număr mobil -Owner=Proprietar +NotRead=Necitit +NoMobilePhone=Fără număr de telefon mobil +Owner=Deţinător FollowingConstantsWillBeSubstituted=Următoarele constante vor fi înlocuite cu valoarea corespunzătoare. Refresh=Refresh -BackToList=Inapoi la lista +BackToList=Înapoi la listă BackToTree=Înapoi la arbore GoBack=Du-te înapoi CanBeModifiedIfOk=Poate fi modificat, dacă e valid CanBeModifiedIfKo=Poate fi modificat, dacă nu e valid ValueIsValid=Valoarea este validă ValueIsNotValid=Valoarea nu este validă -RecordCreatedSuccessfully=Înregistrarea creată cu succes +RecordCreatedSuccessfully=Înregistrare creată cu succes RecordModifiedSuccessfully=Înregistrare modificată cu succes RecordsModified=Înregistrările (Înregistrarea) %s au fost modificate -RecordsDeleted=Înregistrările (Înregistrarea) %s au fost șterse -RecordsGenerated=Înregistrările (Înregistrarea) generate de %s +RecordsDeleted=Înregistrările(rarea) %s au fost șterse +RecordsGenerated=%s înregistrare(ări) au fost generate AutomaticCode=Cod automat FeatureDisabled=Funcţionalitate dezactivată MoveBox=Mutați widgetul Offered=Oferit NotEnoughPermissions=Nu aveţi permisiuni pentru această acţiune -SessionName=Nume Sesiune -Method=Metoda +SessionName=Nume sesiune +Method=Metodă Receive=Recepţionează -CompleteOrNoMoreReceptionExpected=Completă sau nimic de așteptat -ExpectedValue=Valoarea estimată +CompleteOrNoMoreReceptionExpected=Finalizat sau nu se mai aşteaptă recepţia +ExpectedValue=Valoarea aşteptată ExpectedQty=Cantitate aşteptată PartialWoman=Parţial TotalWoman=Total NeverReceived=Niciodată primit Canceled=Anulată -YouCanChangeValuesForThisListFromDictionarySetup=Puteți modifica valorile pentru această listă din meniul Setare - Dicţionare +YouCanChangeValuesForThisListFromDictionarySetup=Puteți modifica valorile pentru această listă din meniul Setări - Dicţionare YouCanChangeValuesForThisListFrom=Puteți modifica valorile pentru această listă din meniul %s YouCanSetDefaultValueInModuleSetup=Puteți seta valoarea implicită utilizată la crearea unei noi înregistrări în configurarea modulului Color=Culoare @@ -721,57 +724,57 @@ MenuAccountancy=Contabilitate MenuECM=Documente MenuAWStats=AWStats MenuMembers=Membri -MenuAgendaGoogle=Agenda Google +MenuAgendaGoogle=Agendă Google MenuTaxesAndSpecialExpenses=Taxe | Cheltuieli speciale ThisLimitIsDefinedInSetup=Limită Dolibarr (Menu Home-setup-securitate): %s Kb, PHP limita: %s Kb -NoFileFound=Niciun document salvat în acest director, +NoFileFound=Niciun document încărcat CurrentUserLanguage=Limba curentă CurrentTheme=Tema curentă CurrentMenuManager=Manager meniu curent Browser=Browser -Layout=Schemă +Layout=Layout Screen=Ecran DisabledModules=Module dezactivate For=Pentru ForCustomer=Pentru clienţi Signature=Semnătură DateOfSignature=Data semnării -HidePassword=Afișare comanda cu parola ascunsă -UnHidePassword=Afișare comanda reală cu parola în clar +HidePassword=Afișare comandă cu parola ascunsă +UnHidePassword=Afișare comandă reală cu parola în clar Root=Rădăcină RootOfMedias=Director rădăcină pentru media public (/medias) -Informations=Informatie +Informations=Informaţii Page=Pagină Notes=Note AddNewLine=Adaugă linie nouă AddFile=Adaugă fişier FreeZone=Text liber pentru produs -FreeLineOfType=Element text gratuit, tip: +FreeLineOfType=Element text liber, tip: CloneMainAttributes=Clonează obiect cu atributele sale principale -ReGeneratePDF=Regenerați PDF -PDFMerge=Îmbină PDF -Merge=Îmbină +ReGeneratePDF=Re-generare PDF +PDFMerge=Îmbinare PDF +Merge=Îmbinare DocumentModelStandardPDF=Șablon standard PDF -PrintContentArea=Afişaţi pagina pentru imprimat în zona conţinutului principal +PrintContentArea=Afişaţi pagina de imprimat în zona principală de conţinut MenuManager=Manager Meniu -WarningYouAreInMaintenanceMode=Atenție, sunteți în modul de întreținere: este permisă numai utilizarea sistemului de conectare <b> %s </b> în acest mod. +WarningYouAreInMaintenanceMode=Atenție, sunteți în modul de întreținere: este permisă numai conectarea utilizatorului <b> %s </b> î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. CreditCard=Card de credit -ValidatePayment=Validează plata +ValidatePayment=Validare plată CreditOrDebitCard=Card de credit sau debit FieldsWithAreMandatory=Campurile marcate cu <b>%s</b> sunt obligatorii -FieldsWithIsForPublic=Câmpurile cu <b> %s </b> sunt afișate în lista publică de membri. Dacă nu doriți acest lucru, debifați caseta "publică". +FieldsWithIsForPublic=Câmpurile cu <b>%s</b> sunt afișate în lista publică de membri. Dacă nu doriți acest lucru, debifați caseta "public". AccordingToGeoIPDatabase=(conform conversiei GeoIP) Line=Linie NotSupported=Nesuportat RequiredField=Câmp obligatoriu Result=Rezultat -ToTest=Testează +ToTest=Testare ValidateBefore=Elementul trebuie validat înainte de a utiliza această caracteristică Visibility=Vizibilitate Totalizable=Totalizabil -TotalizableDesc=Acest câmp este totalizat în listă +TotalizableDesc=Acest câmp este totalizabil în listă Private=Privată Hidden=Ascunsă Resources=Resurse @@ -785,73 +788,73 @@ IM=Mesagerie instant NewAttribute=Atribut nou AttributeCode=Cod Atribut URLPhoto=Url către foto/logo -SetLinkToAnotherThirdParty=Link către un alt terţ -LinkTo=Link la -LinkToProposal=Link la propunere +SetLinkToAnotherThirdParty=Asociază cu un alt terţ +LinkTo=Asociere la +LinkToProposal=Asociere la ofertă LinkToOrder=Link către comandă -LinkToInvoice=Link la factura -LinkToTemplateInvoice=Link la factura șablon +LinkToInvoice=Link la factură +LinkToTemplateInvoice=Link la șablon factură LinkToSupplierOrder=Link la comanda de achiziție -LinkToSupplierProposal=Link la propunerea vânzătorului -LinkToSupplierInvoice=Link la factura furnizorului -LinkToContract=Link la contract -LinkToIntervention=Link la intervenție +LinkToSupplierProposal=Link la ofertă furnizor +LinkToSupplierInvoice=Link la factură furnizor +LinkToContract=Asociere la contract +LinkToIntervention=Asociere la intervenție LinkToTicket=Link la tichet -CreateDraft=Creareză schiţă -SetToDraft=Inapoi la schiţă -ClickToEdit=Clic pentru a edita -ClickToRefresh=Faceți clic pentru a actualiza -EditWithEditor=Editați cu CKEditor -EditWithTextEditor=Editați cu editor de text -EditHTMLSource=Editați Sursa HTML -ObjectDeleted=Obiect %s şters +CreateDraft=Creare schiţă +SetToDraft=Înapoi la schiţă +ClickToEdit=Clic pentru editare +ClickToRefresh=Click pentru refresh +EditWithEditor=Editare cu CKEditor +EditWithTextEditor=Editare cu editor de text +EditHTMLSource=Editare sursă HTML +ObjectDeleted=Obiectul %s a fost şters ByCountry=Pe ţară ByTown=Pe oraş ByDate=Pe dată -ByMonthYear=Pe luna / an -ByYear=Pe ani -ByMonth=Pe luni +ByMonthYear=Pe lună/an +ByYear=Pe an +ByMonth=Pe lună ByDay=Pe zi BySalesRepresentative=Pe reprezentant de vânzări -LinkedToSpecificUsers=Link către un contact utilizator particular -NoResults=Niciun Rezultat +LinkedToSpecificUsers=Asociat la un utilizator specific +NoResults=Niciun rezultat AdminTools=Instrumente de administrare -SystemTools=Instrumente Sistem -ModulesSystemTools=Module Instrumente +SystemTools=Instrumente de sistem +ModulesSystemTools=Instrumente module Test=Test Element=Element NoPhotoYet=Nicio imagine disponibilă Dashboard=Tablou de bord MyDashboard=Panoul meu de control -Deductible=Deductibile +Deductible=Deductibil from=de la toward=spre Access=Acces SelectAction=Selectați acțiune -SelectTargetUser=Selectați utilizatorul / angajatul țintă -HelpCopyToClipboard=Utilizați Ctrl + C pentru a copia în clipboard -SaveUploadedFileWithMask=Salvați fișierul pe server cu numele "<strong>%s</strong>" (altfel"%s") +SelectTargetUser=Selectați utilizatorul/angajatul țintă +HelpCopyToClipboard=Foloseşte Ctrl+C pentru a copia în clipboard +SaveUploadedFileWithMask=Salvați fișierul pe server cu numele "<strong>%s</strong>" (altfel "%s") OriginFileName=Nume fişier original SetDemandReason=Setează sursa -SetBankAccount=Defineste Cont bancar -AccountCurrency=Valuta contului +SetBankAccount=Definire Cont bancar +AccountCurrency=Moneda contului ViewPrivateNote=Vezi notițe XMoreLines=%s linii(e) ascunse ShowMoreLines=Afișează mai multe/mai puține linii PublicUrl=URL Public -AddBox=Adauga box +AddBox=Adaugă box SelectElementAndClick=Selectați un element și faceți clic pe %s -PrintFile=Printeaza Fisierul %s +PrintFile=Tipăreşte fişierul %s ShowTransaction=Afișați intrarea în contul bancar 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. +GoIntoSetupToChangeLogo=Accesați Acasă - Setări - 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 Gender=Gen -Genderman=Barbat +Genderman=Bărbat Genderwoman=Femeie Genderother=Altele ViewList=Vedere listă @@ -860,21 +863,21 @@ ViewKanban=Vedere Kanban Mandatory=Obligatoriu Hello=Salut GoodBye=La revedere -Sincerely=Cu sinceritate +Sincerely=Cu stimă ConfirmDeleteObject=Eşti sigur că vrei să ştergi acest obiect? DeleteLine=Şterge linie ConfirmDeleteLine=Sigur doriți să ștergeți această linie? 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 +NoPDFAvailableForDocGenAmongChecked=Nu au fost disponibile PDF-uri pentru generarea de documente din înregistrările selectate 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 MassFilesArea=Zona pentru fişiere generate prin acţiuni în masă ShowTempMassFilesArea=Afişează zona pentru fişiere generate prin acţiuni în masă -ConfirmMassDeletion=Confirmarea afişării în bloc +ConfirmMassDeletion=Confirmare ştergere în bloc ConfirmMassDeletionQuestion=Sigur doriți să ștergeți %s înregistrările(înregistrarea) selectate? RelatedObjects=Obiecte asociate ClassifyBilled=Clasează facturată -ClassifyUnbilled=Clasificați nefacturabil +ClassifyUnbilled=Clasează nefacturată Progress=Progres ProgressShort=Progr. FrontOffice=Front office @@ -883,9 +886,9 @@ Submit=Trimite View=Vizualizare Export=Export Exports=Exporturi -ExportFilteredList=Exportați lista filtrată -ExportList=Exportați lista -ExportOptions=Opţiuni Export +ExportFilteredList=Export listă filtrată +ExportList=Export listă +ExportOptions=Opţiuni export IncludeDocsAlreadyExported=Include documentele deja exportate ExportOfPiecesAlreadyExportedIsEnable=Exportul elementelor deja exportate este activat ExportOfPiecesAlreadyExportedIsDisable=Exportul elementelor deja exportate este dezactivat @@ -893,32 +896,34 @@ AllExportedMovementsWereRecordedAsExported=Toate mişcările exportate au fost NotAllExportedMovementsCouldBeRecordedAsExported=Nu toate mişcările exportate au putut fi înregistrate ca exportate Miscellaneous=Diverse Calendar=Calendar -GroupBy=A se grupa cu... -ViewFlatList=Vizualizați lista plată +GroupBy=Grupare după... +ViewFlatList=Vizualizare listă aplatizată ViewAccountList=Afişare registru ViewSubAccountList=Afişare registru analitice -RemoveString=Eliminați șirul "%s" -SomeTranslationAreUncomplete=Unele dintre limbile oferite pot fi traduse numai parțial sau pot conține erori. Vă rugăm să vă ajutați să vă corectați limba prin înscrierea la <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> pentru a vă adăuga îmbunătățirile. -DirectDownloadLink=Link direct de descărcare (public / extern) -DirectDownloadInternalLink=Link direct de descărcare (trebuie înregistrare și are nevoie de permisiuni) -Download=Descarcă -DownloadDocument=Descărcați documentul -ActualizeCurrency=Actualizați cursul valutar +RemoveString=Eliminați șirul '%s' +SomeTranslationAreUncomplete=Unele dintre limbile oferite pot fi traduse numai parțial sau pot conține erori. Vă rugăm să vă corectați limba prin înscrierea în <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> pentru a îmbunătăți traducerea. +DirectDownloadLink=Link de descărcare public +PublicDownloadLinkDesc=Doar linkul este necesar pentru a descărca fișierul +DirectDownloadInternalLink=Link de descărcare privat +PrivateDownloadLinkDesc=Trebuie să fiți conectat și aveți nevoie de permisiuni pentru a vizualiza sau descărca fișierul +Download=Descărcare +DownloadDocument=Descărcare document +ActualizeCurrency=Actualizare curs valutar Fiscalyear=An fiscal 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 -WebSite=Website +SetMultiCurrencyCode=Setare monedă +BulkActions=Acțiuni în masă +ClickToShowHelp=Faceți clic pentru a afișa instrumentele de ajutor +WebSite=Site WebSites=Site-uri WebSiteAccounts=Conturi de site -ExpenseReport=Raport Cheltuieli -ExpenseReports=Rapoarte Cheltuieli +ExpenseReport=Decont de cheltuieli +ExpenseReports=Deconturi de cheltuieli HR=Resurse Umane -HRAndBank=Resurse Umane si Banca +HRAndBank=Resurse Umane şi Banca AutomaticallyCalculated=Calculat automat -TitleSetToDraft=Întoarceți-vă la schiță -ConfirmSetToDraft=Sigur doriți să vă întoarceți la Starea Schiței? +TitleSetToDraft=Revenire la schiță +ConfirmSetToDraft=Sigur doriți să vă întoarceți la starea Schiță? ImportId=ID import Events=Evenimente EMailTemplates=Șabloane de email @@ -929,14 +934,14 @@ LeadOrProject=Oportunitate | Proiect LeadsOrProjects=Oportunităţi | Proiecte Lead=Oportunitate Leads=Oportunităţi -ListOpenLeads=Listează oportunităţi deschise -ListOpenProjects=Listează proiecte deschise -NewLeadOrProject=Proiect sau oportunitate nouă +ListOpenLeads=Listă lead-uri deschise +ListOpenProjects=Listă proiecte deschise +NewLeadOrProject=Proiect sau lead nou Rights=Permisiuni LineNb=Linia nr. IncotermLabel=Incoterm -TabLetteringCustomer=Inscripția clientului -TabLetteringSupplier=Inscripția vânzătorului +TabLetteringCustomer=Numerotare client +TabLetteringSupplier=Numerotare furnizor Monday=Luni Tuesday=Marţi Wednesday=Miercuri @@ -949,7 +954,7 @@ TuesdayMin=Ma WednesdayMin=Mi ThursdayMin=Jo FridayMin=Vi -SaturdayMin=Sa +SaturdayMin=Sâ SundayMin=Du Day1=Luni Day2=Marţi @@ -999,43 +1004,44 @@ 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. -Select2NotFound=Niciun rezultat gasit -Select2Enter=Introduce +SetRef=Setează ref +Select2ResultFoundUseArrows=S-au găsit rezultate. Utilizați săgețile pentru selecţie. +Select2NotFound=Niciun rezultat găsit +Select2Enter=Introdu Select2MoreCharacter=sau mai multe caractere Select2MoreCharacters=sau mai multe caractere -Select2MoreCharactersMore=<strong> Sintaxă de căutare: </strong> <br> <kbd> <strong> | </strong> </kbd> <kbd> SAU </kbd> (a | b) <br> <kbd> <strong> * </strong> </kbd> <kbd> Orice caracter </kbd> (a * b) <br> <kbd> <strong> ^ </strong> </kbd> <kbd> începe cu </kbd> (^ ab) <br> <kbd> <strong> $ </strong> </kbd> <kbd> Se termină cu </kbd> ( ab $) <br> -Select2LoadingMoreResults=Se incarca mai multe rezultate... -Select2SearchInProgress=Cautare in progres... +Select2MoreCharactersMore=<strong>Sintaxă de căutare:</strong> <br> <kbd> <strong> | </strong> </kbd> <kbd> SAU </kbd> (a|b) <br> <kbd> <strong> * </strong> </kbd> <kbd> Orice caracter</kbd> (a*b) <br> <kbd> <strong> ^ </strong> </kbd> <kbd> Începe cu </kbd> (^ab) <br> <kbd> <strong>$</strong> </kbd> <kbd> Se termină cu </kbd> (ab$) <br> +Select2LoadingMoreResults=Se încarcă mai multe rezultate... +Select2SearchInProgress=Căutare în curs... SearchIntoThirdparties=Terţi SearchIntoContacts=Contacte SearchIntoMembers=Membri SearchIntoUsers=Utilizatori SearchIntoProductsOrServices=Produse sau servicii +SearchIntoBatch=Loturi / Serii SearchIntoProjects=Proiecte SearchIntoMO=Comenzi de producţie SearchIntoTasks=Taskuri SearchIntoCustomerInvoices=Facturi Clienţi SearchIntoSupplierInvoices=Facturi Furnizori -SearchIntoCustomerOrders=Ordine de vânzări -SearchIntoSupplierOrders=Comenzile de achiziție +SearchIntoCustomerOrders=Comenzi de vânzare +SearchIntoSupplierOrders=Comenzi de achiziție SearchIntoCustomerProposals=Oferte Comerciale -SearchIntoSupplierProposals=Propunerile furnizorilor +SearchIntoSupplierProposals=Oferte furnizori SearchIntoInterventions=Intervenţii SearchIntoContracts=Contracte SearchIntoCustomerShipments=Livrări Client SearchIntoExpenseReports=Rapoarte Cheltuieli -SearchIntoLeaves=Concediu -SearchIntoTickets=Tichete +SearchIntoLeaves=Concedii +SearchIntoTickets=Tichete de suport SearchIntoCustomerPayments=Plăţi ale clienţilor -SearchIntoVendorPayments=Plățile furnizorului -SearchIntoMiscPayments=Diverse plăţi +SearchIntoVendorPayments=Plăți furnizori +SearchIntoMiscPayments=Plăţi diverse CommentLink=Comentarii NbComments=Număr de comentarii CommentPage=Spațiu de comentarii -CommentAdded=Comentariu adăugat -CommentDeleted=Comentariul șters +CommentAdded=Comentariul a fost adăugat +CommentDeleted=Comentariul a fost șters Everybody=Toată lumea PayedBy=Plătite de PayedTo=Plătit lui @@ -1043,18 +1049,19 @@ Monthly=Lunar Quarterly=Trimestrial Annual=Anual Local=Local -Remote=la distanta -LocalAndRemote=Local și la distanță -KeyboardShortcut=Comanda rapidă de la tastatură +Remote=La distanţă +LocalAndRemote=Local și La distanță +KeyboardShortcut=Comandă rapidă de la tastatură AssignedTo=Atribuit lui -Deletedraft=Ștergeți schița -ConfirmMassDraftDeletion=Confirmarea ștergerii schitelor in masă -FileSharedViaALink=Fișierul partajat printr-un link +Deletedraft=Șterge schița +ConfirmMassDraftDeletion=Confirmare ștergere schiţe în masă +FileSharedViaALink=Fișier partajat cu un link public SelectAThirdPartyFirst=Selectați mai întâi un terț ... -YouAreCurrentlyInSandboxMode=În prezent, sunteți în %s modul "sandbox" +YouAreCurrentlyInSandboxMode=În prezent, eşti în modul %s "sandbox" Inventory=Inventar -AnalyticCode=Codul analitic +AnalyticCode=Cod analitic TMenuMRP=MRP +ShowCompanyInfos=Arată informaţii companie ShowMoreInfos=Arată mai multe informaţii NoFilesUploadedYet=Încarcă un document mai întâi SeePrivateNote=Afişare notă privată @@ -1070,7 +1077,7 @@ NoArticlesFoundForTheKeyword=Nici un articol găsit pentru expresia '<strong>%s< NoArticlesFoundForTheCategory=Nici un articol în această categorie ToAcceptRefuse=De acceptat | refuzat ContactDefault_agenda=Eveniment -ContactDefault_commande=Comanda +ContactDefault_commande=Comandă ContactDefault_contrat=Contract ContactDefault_facture=Factură ContactDefault_fichinter=Intervenţie @@ -1120,3 +1127,5 @@ AffectTag=Afectează eticheta ConfirmAffectTag=Afectare multiplă etichete ConfirmAffectTagQuestion=Sigur doriți să afectați etichetele înregistrărilor %s selectat(e)? CategTypeNotFound=Nu s-a găsit niciun tip de etichetă pentru tipul de înregistrări +CopiedToClipboard=Copiat în clipboard +InformationOnLinkToContract=Această sumă este doar totalul tuturor liniilor contractului. Nici o noțiune de timp nu este luată în considerare. diff --git a/htdocs/langs/ro_RO/margins.lang b/htdocs/langs/ro_RO/margins.lang index 38a23322f9f..5bb23aacf18 100644 --- a/htdocs/langs/ro_RO/margins.lang +++ b/htdocs/langs/ro_RO/margins.lang @@ -5,14 +5,14 @@ Margins=Marje TotalMargin=Total Marjă MarginOnProducts=Marjă / Produse MarginOnServices=Marjă / Servicii -MarginRate=Rată Marjă -MarkRate=Rată marcă -DisplayMarginRates=Afişează ratele marjă -DisplayMarkRates=Afişează rate marcă +MarginRate=Cotă Marjă +MarkRate=Cotă marcă +DisplayMarginRates=Afişează cotă marjă +DisplayMarkRates=Afişează cotă marcă InputPrice=Preţ intrare -margin=Managementul marje profit -margesSetup=Setare Management marje profit -MarginDetails=Detalii Marjă +margin=Management marje profit +margesSetup=Configurare Management marje profit +MarginDetails=Detalii marjă ProductMargins=Marjă Produs CustomerMargins=Marje Client SalesRepresentativeMargins=Marje Reprezentanţi vănzări @@ -21,25 +21,25 @@ UserMargins=Marje Utilizator ProductService=Produs sau serviciu AllProducts=Toate produsele şi serviciile ChooseProduct/Service=Alege produs sau serviciu -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 +ForceBuyingPriceIfNull=Forțaţi prețul de achiziţie/de cost la prețul de vânzare, dacă nu este definit +ForceBuyingPriceIfNullDetails=Dacă prețul de achiziţie/cost nu este furnizat atunci când adăugăm o nouă linie, iar această opțiune este „ACTIVĂ”, marja va fi 0 pe noua linie (preț de achiziţie/cost = preț de vânzare). Dacă această opțiune este „INACTIVĂ” (recomandat), marja va fi egală cu valoarea sugerată implicit (și poate fi de 100% dacă nu se găsește nicio valoare implicită). +MARGIN_METHODE_FOR_DISCOUNT=Metoda de marjă pentru reduceri 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=Prețul de cumpărare / cost sugerat implicit pentru calcularea marjei +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Definiţi dacă discount-ul global e tratat ca un produs, serviciu, sau numai pe total la calcularea marjei. +MARGIN_TYPE=Prețul de achiziţie/cost sugerat implicit pentru calcularea marjei MargeType1=Marja la prețul cel mai bun al furnizororului -MargeType2=Marja privind prețul mediu ponderat (WAP) +MargeType2=Marja la 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 <br> * 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ă <br> 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 +UnitCharges=Cheltuieli unitare Charges=Cheltuieli AgentContactType=Tip contact agent comercial -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 +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=Cota trebuie să fie numerică +markRateShouldBeLesserThan100=Cota mărcii trebuie să fie mai mică de 100 ShowMarginInfos=Arată informaţii marjă 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 e5001621e0d..ffbf1906aaa 100644 --- a/htdocs/langs/ro_RO/members.lang +++ b/htdocs/langs/ro_RO/members.lang @@ -1,206 +1,215 @@ # Dolibarr language file - Source file is en_US - members MembersArea=Membri -MemberCard=Fişă Membru -SubscriptionCard=Fişă Cotizaţie +MemberCard=Fişă membru +SubscriptionCard=Fişă cotizaţie Member=Membru Members=Membri -ShowMember=Arată fişa Membru -UserNotLinkedToMember=Utilizator nelegat la un Membru -ThirdpartyNotLinkedToMember=Terț care nu este legat de un membru -MembersTickets=Tichete Membri -FundationMembers=Membri Asociaţiei -ListOfValidatedPublicMembers=Listă Membri publici validaţi +ShowMember=Arată fişa membrului +UserNotLinkedToMember=Utilizator neasociat la la un membru +ThirdpartyNotLinkedToMember=Terț neasociat la un membru +MembersTickets=Tichete membri +FundationMembers=Membri fundaţie +ListOfValidatedPublicMembers=Listă membri publici validaţi ErrorThisMemberIsNotPublic=Acest membru nu este public ErrorMemberIsAlreadyLinkedToThisThirdParty=Un alt membru <b>(nume:<b>%s</b>, login: <b>%s</b>) este deja legat la un terţ<b>%s</b> . Eliminaţi acest link mai întâi deoarece deoarece un terţ nu poate fi legat decât la membru (şi invers). -ErrorUserPermissionAllowsToLinksToItselfOnly=Din motive de securitate, trebuie să aveţi drepturi de a modifica toţi utilizatorii de a putea lega un membru către un utilizator altul decât dvs. -SetLinkToUser=Link către un utilizator Dolibarr -SetLinkToThirdParty=Link către un terţ Dolibarr -MembersCards=Carţi de vizită membri -MembersList=Lista de membri -MembersListToValid=Lista membri schiţă (de validat) +ErrorUserPermissionAllowsToLinksToItselfOnly=Din motive de securitate, trebuie să aveţi drepturi de a modifica toţi utilizatorii pentru a putea asocia un membru unui utilizator altul decât tine. +SetLinkToUser=Asociere utilizator sistem +SetLinkToThirdParty=Asociere terţ din sistem +MembersCards=Carţi de vizită membri +MembersList=Listă de membri +MembersListToValid=Listă membri schiţă (de validat) MembersListValid=Lista de membri validaţi -MembersListUpToDate=Lista membrilor valizi cu abonament actualizat -MembersListNotUpToDate=Lista membrilor valizi cu abonament expirat +MembersListUpToDate=Lista membrilor valizi cu adeziune actualizată +MembersListNotUpToDate=Lista membrilor valizi cu adeziune expirată +MembersListExcluded=Lista membrilor excluşi MembersListResiliated=Lista membrilor desființați -MembersListQualified=Lista de membri calificaţi +MembersListQualified=Listă de membri calificaţi MenuMembersToValidate=Membri schiţă MenuMembersValidated=Membri validaţi -MenuMembersResiliated=Membrii desființați +MenuMembersExcluded=Membri excluşi +MenuMembersResiliated=Membri desființați MembersWithSubscriptionToReceive=Membri cu cotizaţia de încasat MembersWithSubscriptionToReceiveShort=Cotizaţie de încasat -DateSubscription=Data Adeziune -DateEndSubscription=Dată Sfârşit Adeziune +DateSubscription=Dată adeziune +DateEndSubscription=Dată sfârşit adeziune EndSubscription=Sfârşit Adeziune SubscriptionId=ID Adeziune -WithoutSubscription=Fără abonament -MemberId=ID Membru +WithoutSubscription=Fără cotizaţie +MemberId=ID membru NewMember=Membru nou MemberType=Tip Membru -MemberTypeId=ID Tip Membru -MemberTypeLabel=Etichetă Tip Membru -MembersTypes=Tipuri Membri -MemberStatusDraft=Schiţă (cererea tebuie validata) -MemberStatusDraftShort=Draft -MemberStatusActive=Validat (în aşteptareacotizatiei) -MemberStatusActiveShort=Validată -MemberStatusActiveLate=Abonament expirat +MemberTypeId=ID tip membru +MemberTypeLabel=Etichetă tip membru +MembersTypes=Tipuri membri +MemberStatusDraft=Schiţă (cererea trebuie validată) +MemberStatusDraftShort=Schiţă +MemberStatusActive=Validat (în aşteptarea cotizatiei) +MemberStatusActiveShort=Validat +MemberStatusActiveLate=Adeziune expirată MemberStatusActiveLateShort=Expirat -MemberStatusPaid=Cotiaţia la zi +MemberStatusPaid=Cotizaţie la zi MemberStatusPaidShort=La zi +MemberStatusExcluded=Membru exclus +MemberStatusExcludedShort=Exclus MemberStatusResiliated=Membru desființat MemberStatusResiliatedShort=Desființat MembersStatusToValid=Membri schiţă +MembersStatusExcluded=Membri excluşi MembersStatusResiliated=Membrii desființați MemberStatusNoSubscription=Validată(nu este necesară cotizarea) -MemberStatusNoSubscriptionShort=Validată +MemberStatusNoSubscriptionShort=Validat SubscriptionNotNeeded=Nu este necesară cotizarea NewCotisation=Cotizaţie nouă -PaymentSubscription=Plată cotizaţie nouă +PaymentSubscription=Plată nouă cotizaţie SubscriptionEndDate=Data de final a adeziunii -MembersTypeSetup=Setări Tipuri membri +MembersTypeSetup=Configurări Tipuri membri MemberTypeModified=Tip de membru modificat -DeleteAMemberType=Ștergeți un tip de membru +DeleteAMemberType=Șterge un tip de membru ConfirmDeleteMemberType=Sigur doriți să ștergeți acest tip de membru? MemberTypeDeleted=Tip de membru șters MemberTypeCanNotBeDeleted=Tipul de membru nu poate fi șters -NewSubscription=Adeziune Nouă -NewSubscriptionDesc=Acest formular vă permite să înregistraţi ca un membru nou al Fundaţiei. Dacă doriţi să reînnoiţi adeziunea dumneavoastră (dacă sunteţi deja membru), vă rugăm să contactaţi conducerea Fundaţiei prin e-mail %s . +NewSubscription=Adeziune nouă +NewSubscriptionDesc=Acest formular vă permite să vă înregistraţi ca membru nou al fundaţiei. Dacă doriţi să vă reînnoiţi adeziunea (dacă sunteţi deja membru), vă rugăm să contactaţi conducerea fundaţiei pe email la %s . Subscription=Cotizaţie Subscriptions=Cotizaţii SubscriptionLate=Întârziat SubscriptionNotReceived=Cotizaţie neîncasată -ListOfSubscriptions=Lista cotizaţii -SendCardByMail=Trimiteți un card prin e-mail +ListOfSubscriptions=Listă cotizaţii +SendCardByMail=Trimite card pe email AddMember=Creare membru -NoTypeDefinedGoToSetup=Niciun tip de membru definit. Du-te la meniul "Tipuri Membri" -NewMemberType=Tip Membru nou -WelcomeEMail=Mail de bun venit -SubscriptionRequired=Necxesită Cotizaţie +NoTypeDefinedGoToSetup=Niciun tip de membru definit. Du-te la meniul "Tipuri membri" +NewMemberType=Tip membru nou +WelcomeEMail=Email de bun venit +SubscriptionRequired=Necesită Cotizaţie DeleteType=Şterge VoteAllowed=Drept de vot Physical=Fizică -Moral=Morală +Moral=Juridică MorAndPhy=Persoană fizică şi Juridică -Reenable=Reactivaţi -ResiliateMember=Desfiinţaţi un membru +Reenable=Reactivare +ExcludeMember=Exclude membru +ConfirmExcludeMember=Eşti sigur că vrei să excluzi acest membru? +ResiliateMember=Desfiinţare membru ConfirmResiliateMember=Sigur doriți să desfiinţaţi acest membru? -DeleteMember=Ştergeţi un membru +DeleteMember=Şterge un membru ConfirmDeleteMember=Sigur doriți să ștergeți acest membru (Ștergerea unui membru va șterge toate abonamentele sale)? -DeleteSubscription=Ştergeţi o adeziune +DeleteSubscription=Şterge o adeziune ConfirmDeleteSubscription=Sigur doriți să ștergeți acest abonament? Filehtpasswd=Fişier htpasswd -ValidateMember=Validaţi un membru +ValidateMember=Validare membru ConfirmValidateMember=Sigur doriți să validați acest membru? -FollowingLinksArePublic=Următoarele link-uri sunt pagini deschise care nu sunt protejate de nicio permisiune Dolibarr. Acestea nu sunt pagini formatate, oferite ca exemplu pentru a arăta cum să listați baza de date a membrilor. -PublicMemberList=Lista Membri publici -BlankSubscriptionForm=Formular de auto-abonare publică -BlankSubscriptionFormDesc=Dolibarr vă poate oferi un URL / site public pentru a permite vizitatorilor externi să ceară abonarea la fundație. Dacă este activat un modul de plată online, poate fi furnizat automat și un formular de plată. -EnablePublicSubscriptionForm=Activați site-ul public cu formular de auto abonare -ForceMemberType=Forțați tipul de membru -ExportDataset_member_1=Membrii şi adeziuni +FollowingLinksArePublic=Următoarele link-uri sunt pagini deschise care nu sunt protejate de nicio permisiune a sistemului. Acestea nu sunt pagini formatate, oferite ca exemplu pentru a arăta cum să listați baza de date a membrilor. +PublicMemberList=Listă membri publici +BlankSubscriptionForm=Formular de auto-adeziune publică +BlankSubscriptionFormDesc=Sistemul poate oferi un URL/site public pentru a permite vizitatorilor externi să solicite adeziunea/abonarea la fundație/asociaţie. Dacă este activat un modul de plată online, poate fi furnizat automat și un formular de plată. +EnablePublicSubscriptionForm=Activare site public cu formular de autoînscriere +ForceMemberType=Forțează tipul de membru +ExportDataset_member_1=Membri şi adeziuni ImportDataset_member_1=Membri LastMembersModified=Ultimii %s membri modificaţi -LastSubscriptionsModified=Ultimele %sabonamente modificate +LastSubscriptionsModified=Ultimele %s adeziuni modificate String=Şir de caractere Text=Text -Int=Int -DateAndTime=Data şi ora -PublicMemberCard=Fişa Membru public -SubscriptionNotRecorded=Abonamentul nu a fost înregistrat +Int=Întreg +DateAndTime=Dată şi oră +PublicMemberCard=Fişă Membru public +SubscriptionNotRecorded=Adeziunea ta nu a fost înregistrată AddSubscription=Creare adeziune ShowSubscription=Afişează adeziune # Label of email templates -SendingAnEMailToMember=Trimiterea emailului de informare membrilor -SendingEmailOnAutoSubscription=Trimiterea emailului la înregistrarea automată -SendingEmailOnMemberValidation=Trimiterea emailului la validarea noului membru -SendingEmailOnNewSubscription=Trimiterea unui email la noul abonament -SendingReminderForExpiredSubscription=Trimiterea unui memento pentru abonamentele expirate -SendingEmailOnCancelation=Trimiterea emailului la anulare -SendingReminderActionComm=Se trimite memento pentru evenimentul din agendă +SendingAnEMailToMember=Trimitere email de informare membri +SendingEmailOnAutoSubscription=Trimitere email la înregistrarea automată +SendingEmailOnMemberValidation=Trimitere email la validarea noului membru +SendingEmailOnNewSubscription=Trimitere email la o adeziune/abonament nou +SendingReminderForExpiredSubscription=Trimitere reminder pentru adeziunile/abonamentele expirate +SendingEmailOnCancelation=Trimitere email la anulare +SendingReminderActionComm=Se trimite reminder pentru evenimentul din agendă # Topic of email templates -YourMembershipRequestWasReceived=Statutul tău de membru a fost primit -YourMembershipWasValidated=Statutul tău de membru a fost validat +YourMembershipRequestWasReceived=Adeziunea ta de membru a fost primită +YourMembershipWasValidated=Adeziunea, statutul tău de membru a fost validat YourSubscriptionWasRecorded=Noul dvs. abonament a fost înregistrat -SubscriptionReminderEmail=Memento pentru abonament -YourMembershipWasCanceled=Statutul dvs. de membru a fost anulat -CardContent=Continutul fişei dvs de membru +SubscriptionReminderEmail=Reminder pentru cotizaţie +YourMembershipWasCanceled=Statutul tău de membru a fost anulat +CardContent=Conţinutul fişei tale de membru # Text of email templates -ThisIsContentOfYourMembershipRequestWasReceived=Vrem să vă informăm că cererea dvs. de statut membru a fost primită. <br> <br> -ThisIsContentOfYourMembershipWasValidated=Vrem să vă informăm că cererea dvs. de statut de membru a fost validată cu următoarele informații: <br> <br> +ThisIsContentOfYourMembershipRequestWasReceived=Vrem să vă informăm că cererea dvs. de adeziune ca membru a fost primită. <br> <br> +ThisIsContentOfYourMembershipWasValidated=Vrem să vă informăm că cererea dvs. de adeziune ca membru a fost validată cu următoarele informații: <br> <br> ThisIsContentOfYourSubscriptionWasRecorded=Vrem să vă informăm că noul dvs. abonament a fost înregistrat. <br> <br> -ThisIsContentOfSubscriptionReminderEmail=Dorim să vă informăm că abonamentul dvs. este pe cale să expire sau a expirat deja (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Sperăm că il veți reînnoi. <br> <br> +ThisIsContentOfSubscriptionReminderEmail=Dorim să vă informăm că adeziunea/abonamentul dvs. este pe cale să expire sau a expirat deja (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Sperăm că il veți reînnoi. <br> <br> ThisIsContentOfYourCard=Acesta este un rezumat al informațiilor pe care le avem despre dvs. Vă rugăm să ne contactați dacă ceva este incorect. <br> <br> -DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subiectul emailului de notificare primit în cazul auto înscrierii a unui oaspete +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subiectul emailului de notificare primit în cazul autoînscrierii unui oaspete/vizitator DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Conținutul emailului de notificare primit în cazul înscrierii automate a unui oaspete -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Șablonul de email pe care să-l utilizați pentru a trimite un email unui membru pentru autoinscriere -DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Șablonul de email pe care să-l utilizați pentru a trimite un e-mail către un membru pe baza validării membrilor -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Șablon de email pe care să-l utilizați pentru a trimite un email unui membru la o înregistrare nouă a abonamentului -DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Șablon de email pe care să îl utilizați pentru a trimite memento-ul de email atunci când abonamentul urmează să expire -DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Șablonul de email pe care să-l utilizați pentru a trimite un email către un membru în cazul anularii +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Șablonul de email pe care să-l utilizați pentru a trimite un email unui membru pentru autoînscriere +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Șablonul de email pe care să-l utilizați pentru a trimite un email către un membru pe baza validării adeziunii +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Șablon de email pe care să îl utilizezi pentru a trimite un email unui membru la o înregistrare nouă de adeziune/abonament +DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Șablon de email pe care să îl utilizezi pentru a trimite reminder-ul pe email atunci când adeziunea/abonamentul urmează să expire +DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Șablonul de email pe care îl utilizezi pentru a trimite un email către un membru în cazul anulării +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Șablon email de utilizat pentru a trimite email unui membru cu privire la excludere DescADHERENT_MAIL_FROM=Expeditor email pentru emailuri automate DescADHERENT_ETIQUETTE_TYPE=Format pagină etichete -DescADHERENT_ETIQUETTE_TEXT=Text imprimat pe foaia de adresă a membrului -DescADHERENT_CARD_TYPE=Formatul pagini card membru -DescADHERENT_CARD_HEADER_TEXT=Text imprimat în susul cardului de membru -DescADHERENT_CARD_TEXT=Text imprimat pe carduri de membru -DescADHERENT_CARD_TEXT_RIGHT=Text tipărit pe carduri de membru (aliniat la dreapta) -DescADHERENT_CARD_FOOTER_TEXT=Text imprimat în josul de cardului de membru +DescADHERENT_ETIQUETTE_TEXT=Text imprimat pe eticheta de adresă a membrului +DescADHERENT_CARD_TYPE=Format card membru +DescADHERENT_CARD_HEADER_TEXT=Text imprimat sus pe cardul de membru +DescADHERENT_CARD_TEXT=Text imprimat pe cardurile de membru (aliniere la stânga) +DescADHERENT_CARD_TEXT_RIGHT=Text tipărit pe cardurile de membru (aliniat la dreapta) +DescADHERENT_CARD_FOOTER_TEXT=Text imprimat în josul cardului de membru ShowTypeCard=Arată tipul ' %s' HTPasswordExport=Generare fişier htpassword -NoThirdPartyAssociatedToMember=Niciun terţ asociat la acest membru -MembersAndSubscriptions= Membrii şi cotizaţii +NoThirdPartyAssociatedToMember=Niciun terţ asociat la acest membru +MembersAndSubscriptions= Membri şi cotizaţii MoreActions=Acţiuni suplimentare la înregistrare -MoreActionsOnSubscription=Acţiuni suplimentare , sugerate predefinit când inregistrăm o cotizaţie +MoreActionsOnSubscription=Acţiuni suplimentare , sugerate predefinite când inregistrăm o cotizaţie/abonament MoreActionBankDirect=Creați o intrare directă în contul bancar MoreActionBankViaInvoice=Creați o factură și o plată în contul bancar MoreActionInvoiceOnly=Crează o factură fără plată -LinkToGeneratedPages=Generaţi carti vizita -LinkToGeneratedPagesDesc=Acest ecran vă permite să generaţi fişiere PDF cu cărţi de vizită pentru toţi membri dvs. sau pentru un anumit membru. -DocForAllMembersCards=Generaţi cărţi de vizita pentru toţi membrii -DocForOneMemberCards=Generaţi cărţi de vizită pentru un anumit membru -DocForLabels=Generaţi etichete adrese +LinkToGeneratedPages=Generare cărţi de vizită +LinkToGeneratedPagesDesc=Acest ecran îţi permite să generezi fişiere PDF cu cărţi de vizită pentru toţi membri sau pentru un anumit membru. +DocForAllMembersCards=Generează cărţi de vizită pentru toţi membrii +DocForOneMemberCards=Generează cărţi de vizită pentru un anumit membru +DocForLabels=Generare etichete adrese SubscriptionPayment=Plată cotizaţie -LastSubscriptionDate=Data ultimei plăți pentru abonament -LastSubscriptionAmount=Suma ultimului abonament +LastSubscriptionDate=Data ultimei plăți a cotizaţiei/abonamentului +LastSubscriptionAmount=Suma ultimei cotizaţii/abonament +LastMemberType=Tipul ultimului membru MembersStatisticsByCountries=Statistici Membri după ţară -MembersStatisticsByState=Statistici Membri după regiune / judeţ -MembersStatisticsByTown=Statistici Membri după oraşe -MembersStatisticsByRegion=Statistici Membri după regiune -NbOfMembers=Număr membri +MembersStatisticsByState=Statistici Membri după judeţ/regiune +MembersStatisticsByTown=Statistici Membri după oraş +MembersStatisticsByRegion=Statistici Membri după regiune +NbOfMembers=Număr membri NbOfActiveMembers=Numărul curent de membri activi NoValidatedMemberYet=Niciun membru validat găsit -MembersByCountryDesc=Acest ecran vă arată statisticile cu privire la membrii după ţări. Graficul depinde serviciul on-line Google grafic şi este disponibil numai în cazul în care conexiunea la internet este activă. -MembersByStateDesc=Acest ecran vă arată statisticile cu privire la membrii după regiuni / judeţe. -MembersByTownDesc=Acest ecran vă arată statisticile cu privire la membrii după oraşe. -MembersStatisticsDesc=Alege statisticile pe care doriţi să le citiţi ... +MembersByCountryDesc=Acest ecran îţi arată statistici cu privire la membri după ţări. Graficul depinde serviciul on-line Google grafic şi este disponibil numai în cazul în care conexiunea la internet este activă. +MembersByStateDesc=Acest ecran îţi arată statistici cu privire la membri după regiuni/judeţe. +MembersByTownDesc=Acest ecran îţi afişează statistici cu privire la membri după oraş. +MembersStatisticsDesc=Alege statisticile pe care doreşti să le citeşti... MenuMembersStats=Statistici -LastMemberDate=Ultima dată de membru -LatestSubscriptionDate=Ultima dată de abonament +LastMemberDate=Data ultimului membru +LatestSubscriptionDate=Ultima dată a abonamentului/cotizaţiei MemberNature=Natură membru MembersNature=Natura membrilor Public=Profil public NewMemberbyWeb=Membru nou adăugat. În aşteptarea validării NewMemberForm=Formular Membru nou -SubscriptionsStatistics=Statistici privind cotizaţiile +SubscriptionsStatistics=Statistici privind cotizaţiile/abonamentele NbOfSubscriptions=Număr cotizaţii -AmountOfSubscriptions=Valoare cotizaţii +AmountOfSubscriptions=Valoarea cotizaţiilor TurnoverOrBudget=Cifra de afaceri (pentru o companie), sau Bugetul (pentru o fundaţie) -DefaultAmount=Valoarea implicită a cotizaţiei -CanEditAmount=Vizitatorul poate alege / modifica valoarea cotizaţiei sale -MEMBER_NEWFORM_PAYONLINE=Mergi la pagina integrată de plata online -ByProperties=Prin natura -MembersStatisticsByProperties=Statistica membrilor după natură -MembersByNature=Acest ecran va afiseaza statisticile pe membrii dupa forma juridica -MembersByRegion=Acest ecran va afiseaza statisticile pe membrii dupa regiune. -VATToUseForSubscriptions=Rata TVA utilizată pentru înscrieri -NoVatOnSubscription=Fără TVA pentru abonamente -ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produs folosit pentru linia abonamentului în factura: %s +DefaultAmount=Valoarea implicită a cotizaţiei/abonamentului +CanEditAmount=Vizitatorul poate alege/modifica valoarea cotizaţiei sale +MEMBER_NEWFORM_PAYONLINE=Mergi la pagina integrată de plată online +ByProperties=După natură +MembersStatisticsByProperties=Statistici membri după natură +MembersByNature=Acest ecran afişează statistici membri după forma juridică +MembersByRegion=Acest ecran afişează statistici membri după regiune. +VATToUseForSubscriptions=Cota TVA utilizată pentru înscrieri +NoVatOnSubscription=Fără TVA pentru cotizaţii +ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produs folosit pentru linia de abonament/cotizaţie în factura: %s NameOrCompany=Nume sau companie -SubscriptionRecorded=Abonament înregistrat +SubscriptionRecorded=Cotizaţie/Abonament înregistrat NoEmailSentToMember=Nu a fost trimis niciun email membrilor -EmailSentToMember=Email trimis la membru la %s -SendReminderForExpiredSubscriptionTitle=Trimiteți un memento prin email pentru abonamentul expirat -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 +EmailSentToMember=Email trimis la membru de la %s +SendReminderForExpiredSubscriptionTitle=Trimite un remainder pe email pentru abonament/adeziune expirată +SendReminderForExpiredSubscription=Trimite un remainder pe email membrilor când adeziunea/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=Adeziune plătită pentru perioada curentă (până la %s) +YouMayFindYourInvoiceInThisEmail=Găseşti factura ta atașată acestui email XMembersClosed=%s membru(i) închis diff --git a/htdocs/langs/ro_RO/modulebuilder.lang b/htdocs/langs/ro_RO/modulebuilder.lang index 219513f661d..f2f79082872 100644 --- a/htdocs/langs/ro_RO/modulebuilder.lang +++ b/htdocs/langs/ro_RO/modulebuilder.lang @@ -1,26 +1,26 @@ # Dolibarr language file - Source file is en_US - loan 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 <a href="%s" target="_blank">dezvoltare software alternativă se găsește aici</a>. -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. +EnterNameOfModuleDesc=Introduceți numele modulului/aplicației care va fi creat, 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. Utilizează majusculă pentru a separa cuvintele (De exemplu: MyObject, Student, Profesor ...). Se va genera și fișierul clasă CRUD, dar și fișierul API, paginile de listare/adăugare/editare/ștergere ale obiectului și fișierele SQL. ModuleBuilderDesc2=Calea unde sunt generate/editate modulele (primul director pentru module externe definite în %s): <strong>%s</strong> -ModuleBuilderDesc3=Module generate sau editabile găsite: <strong> %s </strong> -ModuleBuilderDesc4=Un modul este detectat ca "editabil" atunci când fișierul <strong> %s </strong> există în rădăcina directorului modulului +ModuleBuilderDesc3=Module generate/editabile găsite: <strong>%s</strong> +ModuleBuilderDesc4=Un modul este detectat ca "editabil" atunci când fișierul <strong>%s</strong> există în directorul rădăcină al modulului NewModule=Modul nou NewObjectInModulebuilder=Obiect nou -ModuleKey=Modul cheie -ObjectKey=Obiect cheie +ModuleKey=Cheie modul +ObjectKey=Cheie obiect ModuleInitialized=Modulul a fost inițializat -FilesForObjectInitialized=Fișierele pentru obiectul nou "%s" inițializate -FilesForObjectUpdated=Fișierele pentru obiectul "%s" actualizate (fișierele .sql și fișierul .class.php) +FilesForObjectInitialized=Fișierele pentru noul obiect "%s" au fost inițializate +FilesForObjectUpdated=Fișierele pentru obiectul "%s" au fost actualizate (fișierele .sql și fișierul .class.php) ModuleBuilderDescdescription=Introduceți aici toate informațiile generale care descriu modulul dvs. -ModuleBuilderDescspecifications=Puteți introduce aici o descriere detaliată a specificațiilor modulului dvs. care nu este deja structurată în alte file. Deci, puteți ajunge ușor la toate regulile pe care trebuie să le dezvoltați. De asemenea, acest conținut de text va fi inclus în documentația generată (a se vedea ultima filă). Puteți utiliza formatul Markdown, dar este recomandat să utilizați formatul Asciidoc (comparație între .md și .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). -ModuleBuilderDescobjects=Definiți aici obiectele pe care doriți să le gestionați împreună cu modulul. O clasă CRUD DAO, fișierele SQL, pagina pentru listarea obiectelor, pentru a crea / edita / vizualiza o înregistrare și un API vor fi generate. +ModuleBuilderDescspecifications=Poți introduce aici o descriere detaliată a specificațiilor modulului care nu este deja structurată în alte file. Deci, poți îndeplini ușor cerinţele de dezvoltare. De asemenea, acest conținut text va fi inclus în documentația generată (a se vedea ultima filă). Poți utiliza formatul Markdown, dar este recomandat să utilizezi formatul Asciidoc (comparație între .md și .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). +ModuleBuilderDescobjects=Definiți aici obiectele pe care doriți să le gestionați împreună cu modulul. O clasă CRUD DAO, fișierele SQL, pagina pentru listarea obiectelor, pentru a creare/editare/vizualizare înregistrări și un API vor fi generate. ModuleBuilderDescmenus=Această filă este dedicată definirii intrărilor de meniuri furnizate de modulul dvs. -ModuleBuilderDescpermissions=Această filă este dedicată definirii noilor permisiuni pe care doriți să le furnizați împreună cu modulul. -ModuleBuilderDesctriggers=Aceasta este vizualizarea declanșatorilor furnizați de modulul dvs. Pentru a include codul executat atunci când este lansat un eveniment de afaceri declanșat, trebuie doar să editați acest fișier. -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. +ModuleBuilderDescpermissions=Această filă este dedicată definirii de noi permisiuni pe care vrei să le furnizezi împreună cu modulul. +ModuleBuilderDesctriggers=Aceasta este vizualizarea trigger-ilor furnizați de modulul tău. Pentru a include codul executat atunci când este lansat un eveniment de afaceri declanșat, trebuie doar să editezi acest fișier. +ModuleBuilderDeschooks=Această filă este dedicată cârligelor hooks. +ModuleBuilderDescwidgets=Această filă este dedicată administrării/construirii de widget-uri. +ModuleBuilderDescbuildpackage=Puteți genera aici un fișier pachet "pregătit pentru distribuire" (un fișier .zip) al modulului tău și un fișier de documentație "gata de distribuire". Doar fă clic pe buton pentru a construi pachetul sau documentația. 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ă @@ -36,12 +36,12 @@ DescriptorFile=Fișier descriptor al modulului ClassFile=Fișier pentru clasa PHP DAO CRUD ApiClassFile=Fișier pentru clasa PHP API PageForList=Pagina PHP pentru lista de înregistrări -PageForCreateEditView=Pagina PHP pentru a crea/edita/vizualiza o înregistrare +PageForCreateEditView=Pagina PHP pentru creare/editare/vizualizare înregistrare PageForAgendaTab=Pagina PHP pentru fila eveniment PageForDocumentTab=Pagina PHP pentru fila document PageForNoteTab=Pagina PHP pentru fila note -PageForContactTab=Pagina PHP pentru fila contact -PathToModulePackage=Calea pentru zipul pachetului de module/aplicații +PageForContactTab=Pagină PHP pentru fişa de contact +PathToModulePackage=Calea pentru arhiva zip a pachetului modul/aplicație 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 @@ -50,67 +50,67 @@ RegenerateMissingFiles=Generați fișierele lipsă SpecificationFile=Fişier de documentaţie LanguageFile=Fișier pentru limbă ObjectProperties=Proprietăţi obiect -ConfirmDeleteProperty=Sigur doriți să ștergeți proprietatea <strong> %s </strong>? Acest lucru va schimba codul în clasa PHP, dar va elimina și coloana din definiția tabelului de obiect. +ConfirmDeleteProperty=Sigur doriți să ștergeți proprietatea <strong>%s</strong>? 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). -SearchAll=Folosit pentru "căutarea tuturor" +NotNullDesc=1 = Setează baza de date la NOT NULL. -1 = Permite valorile null și valoarea forțată la NULL dacă este goală ('' sau 0). +SearchAll=Folosit pentru "căutare tot" DatabaseIndex=Indexul bazei de date FileAlreadyExists=Fișierul %s există deja -TriggersFile=Fișier pentru codul declanșatorilor -HooksFile=Fișier pentru codul cârligelor -ArrayOfKeyValues=Mulțimea de valori cheie +TriggersFile=Fișier pentru codul triggerelor +HooksFile=Fișier cod hooks +ArrayOfKeyValues=Mulțime de cheie-valoare ArrayOfKeyValuesDesc=Mulțimea de chei și valori dacă câmpul este o listă combo cu valori fixe WidgetFile=Fișier widget 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 +TestClassFile=Fișier clasă pentru PHP Unit Test +SqlFile=Fişier SQL 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 +SqlFileExtraFields=Fişier SQL pentru atributele complementare +SqlFileKey=Fişier SQL pentru chei 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) +AnObjectAlreadyExistWithThisNameAndDiffCase=Un obiect există deja cu acest nume și cu un alt format +UseAsciiDocFormat=Poţi utiliza formatul Markdown, dar este recomandat să utilizezi formatul Asciidoc (vezi comparaţia între .md și .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) IsAMeasure=Este o măsură DirScanned=Directorul scanat -NoTrigger=Niciun declanșator +NoTrigger=Niciun trigger NoWidget=Nu există widget GoToApiExplorer=Explorer API ListOfMenusEntries=Lista intrărilor din meniu 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) +EnabledDesc=Condiție de activare a acestui câmp (Exemple: 1 sau $conf->global->MYMODULE_MYOPTION) 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).<br><br> Utilizarea unei valori negative înseamnă că câmp nu este afișat implicit în listă, dar poate fi selectat pentru vizualizare).<br><br>Poate fi o expresie, de exemplu: <br>preg_match ('/ public /', $ _SERVER ['PHP_SELF'])? 0: 1 <br>($ 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”.<br/> În prezent, modelele PDF compatibile cunoscute sunt: ​​eratosten (comandă), espadon (livrare), sponge (facturi), cyan (propunere/ofertă), cornas (comandă achiziţie)<br/><br/><strong> Pentru documente: </strong><br/>0 = nu se afișează <br/>1 = se afișează <br/>2 = se afișează dacă este completat <br/><br/><strong>Pentru linii de document: </strong><br/>0 = nu se afişează <br/>1 = se afișează într-o coloană <br/>3 = se afișează în coloana descriere după descriere <br/>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. +IsAMeasureDesc=Poate fi cumulată valoarea câmpului pentru a obține un total în listă? (Exemple: 1 sau 0) +SearchAllDesc=Este folosit câmpul pentru a face o căutare cu 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 îmbogăţită .asciidoc. +LanguageDefDesc=Introdu în aceste fișiere, toate cheile de traducere și traducerea pentru fiecare fișier lingvistic. 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 <strong>$this->menus</strong> în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat.<br><br> 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 <strong>$ this->dictionaries</strong> în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat.<br><br> 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 <strong>$ this->rights</strong> în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat. <br><br>Notă: Modulul o dată definit (și reactivat), permisiunile sunt vizibile în configurarea de bază a permisiunilor %s. -HooksDefDesc=Definiți în proprietatea <b> module_parts ['hooks'] </b>, î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 '<b> initHooks (</b>' din codul principal) <br> 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 '<b> executeHooks </b>' î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. -SeeReservedIDsRangeHere=Vedeți o gamă de ID-uri rezervate -ToolkitForDevelopers=Toolkit pentru dezvoltatorii Dolibarr -TryToUseTheModuleBuilder=Dacă aveți cunoștințe despre SQL și PHP, puteți folosi asistentul nativ modul builder. <br> Activați modulul <strong> %s </strong> și utilizați asistentul dând clic pe <span class="fa fa-bug"> </span> din meniul din dreapta sus. <br> Atenție: Aceasta este o caracteristică avansată a dezvoltatorului, nu efectuați experimentul <b> pe </b> pe site-ul dvs. de producție! -SeeTopRightMenu=Vedeți <span class="fa fa-bug"> </span> din meniul din dreapta sus -AddLanguageFile=Adăugați fișierul de limbă -YouCanUseTranslationKey=Puteți folosi aici o cheie care este cheia de traducere găsită în fișierul de limbă (vezi fila "Limbi") +HooksDefDesc=Definiți în proprietatea <b>module_parts['hooks'] </b>, în descriptorul modulului, contextul de cârlige pe care doreşti să îl gestionezi (lista de contexte poate fi găsită printr-o căutare după '<b>initHooks(</b>' în codul nucleu) <br> Editează fișierul cârlig hook pentru a adăuga cod cu funcțiile tale (funcțiile care pot fi legate pot fi găsite printr-o căutare după '<b>executeHooks</b>' în codul nucleu). +TriggerDefDesc=Definiți în fișierul trigger codul pe care doriți să-l executați pentru fiecare eveniment urmărit. +SeeIDsInUse=Vezi ID-urile utilizate în instalarea ta. +SeeReservedIDsRangeHere=Vezi gama de ID-uri rezervate +ToolkitForDevelopers=Toolkit pentru dezvoltatorii de sistem Dolibarr +TryToUseTheModuleBuilder=Dacă ai cunoștințe de SQL și PHP, poți folosi asistentul nativ Modul Builder. <br> Activează modulul <strong>%s</strong> și utilizează asistentul dând clic pe <span class="fa fa-bug"> </span> din meniul din dreapta sus. <br> Atenție: Aceasta este o caracteristică avansată de dezvoltare, <b>nu</b> experimenta pe instanţele de producție! +SeeTopRightMenu=Vezi <span class="fa fa-bug"></span> din meniul din dreapta sus +AddLanguageFile=Adăugă fișierul de limbă +YouCanUseTranslationKey=Poți folosi aici o cheie care este cheia de traducere găsită în fișierul de limbă (vezi fila "Limbi") DropTableIfEmpty=(Distruge tabelul dacă este gol) TableDoesNotExists=Tabelul %s nu există TableDropped=Tabelul %s a fost șters InitStructureFromExistingTable=Construiți șirul de structură al unui tabel existent -UseAboutPage=Dezactivați pagina +UseAboutPage=Dezactivați pagina Despre UseDocFolder=Dezactivați dosarul de documentare UseSpecificReadme=Utilizați un anumit ReadMe ContentOfREADMECustomized=Notă: Conținutul fișierului README.md a fost înlocuit cu valoarea specifică definită la configurarea ModuleBuilder. @@ -133,11 +133,13 @@ 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 +CSSClass=CSS pentru editare/creare formular +CSSViewClass=CSS pentru vizualizare formular +CSSListClass=CSS pentru listă NotEditable=Needitabil ForeignKey=Cheie străină TypeOfFieldsHelp=Tip de câmpuri: <br>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ă. -ModuleBuilderNotAllowed=Generatorul de module este disponibil, dar nu este permis utilizatorului dvs. +ModuleBuilderNotAllowed=Generatorul de module este disponibil, dar nu-ţi este permis să-l utilizezi. diff --git a/htdocs/langs/ro_RO/orders.lang b/htdocs/langs/ro_RO/orders.lang index 9bbc1d3ffed..70f60db5b53 100644 --- a/htdocs/langs/ro_RO/orders.lang +++ b/htdocs/langs/ro_RO/orders.lang @@ -1,34 +1,36 @@ # Dolibarr language file - Source file is en_US - orders -OrdersArea=Comenzi Clienţi -SuppliersOrdersArea=Zonă de comenzi de achiziție +OrdersArea=Comenzi clienţi +SuppliersOrdersArea=Comenzi de achiziție OrderCard=Fişă Comandă OrderId=ID Comandă Order=Comandă -PdfOrderTitle=Comanda +PdfOrderTitle=Comandă Orders=Comenzi -OrderLine=Linie Comandă -OrderDate=Dată Comandă +OrderLine=Linie comandă +OrderDate=Dată comandă OrderDateShort=Data comandă OrderToProcess=Comandă de procesat NewOrder=Comandă nouă -NewOrderSupplier=Comandă achiziţie nouă +NewOrderSupplier=Comandă de achiziţie nouă ToOrder=Plasează comanda MakeOrder=Plasează comanda SupplierOrder=Comandă de achiziție -SuppliersOrders=Comenzile de achiziție -SuppliersOrdersRunning=Comenzile de achiziție actuale -CustomerOrder=Comandă de vânzări -CustomersOrders=Comenzile de vânzări -CustomersOrdersRunning=Comenzile de vânzări curente +SuppliersOrders=Comenzi de achiziție +SaleOrderLines=Linii comandă de vânzare +PurchaseOrderLines=Linii comandă de achiziţie +SuppliersOrdersRunning=Comenzi de achiziție curente +CustomerOrder=Comandă de vânzare +CustomersOrders=Comenzi de vânzări +CustomersOrdersRunning=Comenzi de vânzări curente CustomersOrdersAndOrdersLines=Comenzi de vânzări și detalii de comandă -OrdersDeliveredToBill=Comenzile de vânzări livrate la facturare +OrdersDeliveredToBill=Comenzi de vânzări livrate de facturat 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 +OrdersToProcess=Comenzi de vânzări de procesat +SuppliersOrdersToProcess=Comenzi de achiziţie de procesat SuppliersOrdersAwaitingReception=Comenzi de achiziţie în aşteptarea recepţiei AwaitingReception=În aşteptarea recepţiei -StatusOrderCanceledShort=Anulata +StatusOrderCanceledShort=Anulată StatusOrderDraftShort=Schiţă StatusOrderValidatedShort=Validat StatusOrderSentShort=În curs de procesare @@ -46,91 +48,91 @@ StatusOrderReceivedAllShort=Produse primite StatusOrderCanceled=Anulată StatusOrderDraft=Schiţă (de validat) StatusOrderValidated=Validată -StatusOrderOnProcess=Comandate - receptie standby -StatusOrderOnProcessWithValidation=Comandat - În așteptarea recepţiei sau validării +StatusOrderOnProcess=Comandate - în aşteptarea recepţiei +StatusOrderOnProcessWithValidation=Comandate - În așteptarea recepţiei sau validării StatusOrderProcessed=Procesată StatusOrderToBill=Livrată StatusOrderApproved=Aprobată StatusOrderRefused=Refuzată StatusOrderReceivedPartially=Parţial recepţionată StatusOrderReceivedAll=Toate produsele primite -ShippingExist=O expediţie există +ShippingExist=O livrare există QtyOrdered=Cant. comandată -ProductQtyInDraft=Cantitate produs in comenzi draft -ProductQtyInDraftOrWaitingApproved=Cantitate produs in comenzi draft sau aprobate necomandate inca +ProductQtyInDraft=Cantitate produs în comenzile schiţă +ProductQtyInDraftOrWaitingApproved=Cantitate produs în comenzi schiţă sau aprobate dar necomandate încă MenuOrdersToBill=Comenzi livrate MenuOrdersToBill2=Comenzi facturabile -ShipProduct=Expediază produs -CreateOrder=Crează Comanda -RefuseOrder=Refuză comanda -ApproveOrder=Aprobă comanda -Approve2Order=Aprobă comanda ( nivel doi ) -ValidateOrder=Validează comanda -UnvalidateOrder=Devalidează comandă -DeleteOrder=Şterge comada -CancelOrder=Anulează comanda -OrderReopened= Comanda %sredeschisă -AddOrder=Crează comanda +ShipProduct=Livrare produs +CreateOrder=Creare comandă +RefuseOrder=Refuz comandă +ApproveOrder=Aprobare comandă +Approve2Order=Aprobă comanda (nivel doi) +ValidateOrder=Validare comandă +UnvalidateOrder=Devalidare comandă +DeleteOrder=Ştergere comadă +CancelOrder=Anulare comandă +OrderReopened= Comanda %s a fost redeschisă +AddOrder=Creare comandă AddPurchaseOrder=Creare comandă de achiziţie AddToDraftOrders=Adaugă la comanda schiţă -ShowOrder=Afişează comanda +ShowOrder=Afişare comandă OrdersOpened=Comenzi de procesat -NoDraftOrders=Nicio comandă schiţă +NoDraftOrders=Nicio comandă schiţă NoOrder=Nicio comandă NoSupplierOrder=Nicio comandă de achiziție LastOrders=Ultimele %s comenzi de vânzări -LastCustomerOrders=Ultimele%s comenzi de vânzări -LastSupplierOrders=Ultimele%s comenzi de achiziție +LastCustomerOrders=Ultimele %s comenzi de vânzări +LastSupplierOrders=Ultimele %s comenzi de achiziție LastModifiedOrders=Ultimele %s comenzi modificate AllOrders=Toate comenzile -NbOfOrders=Numar comenzi -OrdersStatistics=Statistici Comenzi +NbOfOrders=Număr comenzi +OrdersStatistics=Statistici comenzi OrdersStatisticsSuppliers=Statistici privind comenzile de achiziție -NumberOfOrdersByMonth=Numar comenzi pe luni -AmountOfOrdersByMonthHT=Suma comenzilor pe lună (fără taxă) -ListOfOrders=Lista comenzi -CloseOrder=Inchide comanda -ConfirmCloseOrder=Sigur doriți să setați această comandă pentru a fi livrată? Odată ce o comandă este livrată, ea poate fi setată la factură. +NumberOfOrdersByMonth=Număr comenzi pe luni +AmountOfOrdersByMonthHT=Suma comenzilor pe lună (fără taxe) +ListOfOrders=Listă comenzi +CloseOrder=Închidere comandă +ConfirmCloseOrder=Sigur doriți să setați această comandă pentru a fi livrată? Odată ce o comandă este livrată, ea poate fi setată ca facturabilă. ConfirmDeleteOrder=Sigur doriți să ștergeți această comandă? -ConfirmValidateOrder=Sigur doriți să validați această comandă sub numele <b> %s </b>? -ConfirmUnvalidateOrder=Sigur doriți să restaurați ordinea <b> %s </b> pentru a schița starea? +ConfirmValidateOrder=Sigur doriți să validați această comandă sub numele <b>%s</b>? +ConfirmUnvalidateOrder=Sigur doriți să restaurați comanda <b> %s </b> la starea de schiță? ConfirmCancelOrder=Sigur doriți să anulați această comandă? -ConfirmMakeOrder=Sigur doriți să confirmați că ați făcut această comandă pe <b> %s </b>? -GenerateBill=Generează Factură +ConfirmMakeOrder=Sigur doriți să confirmați că ați făcut această comandă pe <b>%s</b>? +GenerateBill=Generare Factură ClassifyShipped=Clasează livrată DraftOrders=Comenzi schiţă -DraftSuppliersOrders=Schiţă de ordine de cumpărare -OnProcessOrders=Comenzi în curs de tratare +DraftSuppliersOrders=Comenzi de achiziţie schiţă +OnProcessOrders=Comenzi în curs de procesare RefOrder=Ref. comandă -RefCustomerOrder=Ref. comenzii pentru client -RefOrderSupplier=Ref. comanzii pentru furnizor -RefOrderSupplierShort=Ref. furnizorului comenzii -SendOrderByMail=Trimite comanda prin e-mail -ActionsOnOrder=Evenimente pe comanda -NoArticleOfTypeProduct=Nici un articol de tip "produs", astfel încât nici un articol expediabil pentru această comandă +RefCustomerOrder=Ref. comandă pentru client +RefOrderSupplier=Ref. comandă pentru furnizor +RefOrderSupplierShort=Ref. comandă furnizor +SendOrderByMail=Trimitere comandă pe email +ActionsOnOrder=Evenimente pe comandă +NoArticleOfTypeProduct=Nici un articol de tip 'produs', deci niciun articol livrabil pentru această comandă OrderMode=Metoda de comandă AuthorRequest=Autor cerere -UserWithApproveOrderGrant=Utilizatorii cu permisiuni acordate de "aproba comenzi" . -PaymentOrderRef=Plata comandă %s -ConfirmCloneOrder=Sigur doriți să clonați această comandă <b> %s </b>? -DispatchSupplierOrder=Primirea comenzii de achiziție %s +UserWithApproveOrderGrant=Utilizatorii cu permisiuni acordate de "aprobare comenzi". +PaymentOrderRef=Plată comandă %s +ConfirmCloneOrder=Sigur doriți să clonați această comandă <b>%s</b>? +DispatchSupplierOrder=Recepţia comenzii de achiziție %s FirstApprovalAlreadyDone=Prima aprobare a fost deja făcută SecondApprovalAlreadyDone=A doua aprobare a fost deja făcută -SupplierOrderReceivedInDolibarr=Comanda de achiziţie%s primită %s -SupplierOrderSubmitedInDolibarr=Comanda de achiziţie %s trimisă -SupplierOrderClassifiedBilled=Comanda de achiziţie%s facturată +SupplierOrderReceivedInDolibarr=Comanda de achiziţie %s a fost recepţionată %s +SupplierOrderSubmitedInDolibarr=Comanda de achiziţie %s a fost trimisă +SupplierOrderClassifiedBilled=Comanda de achiziţie %s a fost setată ca facturată OtherOrders=Alte comenzi ##### Types de contacts ##### TypeContact_commande_internal_SALESREPFOLL=Reprezentant urmărire comandă de vânzări -TypeContact_commande_internal_SHIPPING=Responsabil urmărire expediere comandă client -TypeContact_commande_external_BILLING=Contact client facturare comandă -TypeContact_commande_external_SHIPPING=Contact client livrare comandă +TypeContact_commande_internal_SHIPPING=Responsabil urmărire livrare comandă client +TypeContact_commande_external_BILLING=Contact client facturare comandă +TypeContact_commande_external_SHIPPING=Contact client livrare comandă TypeContact_commande_external_CUSTOMER=Contact client urmărire comandă TypeContact_order_supplier_internal_SALESREPFOLL=Reprezentant urmărire comandă de achiziție -TypeContact_order_supplier_internal_SHIPPING=Responsabil recepţie comandă furnizor -TypeContact_order_supplier_external_BILLING=Contactul facturii furnizorului -TypeContact_order_supplier_external_SHIPPING=Contactul furnizorului de transport -TypeContact_order_supplier_external_CUSTOMER=Comandă de urmărire a contactului furnizorului +TypeContact_order_supplier_internal_SHIPPING=Responsabil recepţie comandă furnizor +TypeContact_order_supplier_external_BILLING=Contact facturare furnizor +TypeContact_order_supplier_external_SHIPPING=Contact livrare furnizor +TypeContact_order_supplier_external_CUSTOMER=Contact furnizor urmărire comandă Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constanta COMMANDE_SUPPLIER_ADDON nedefinită Error_COMMANDE_ADDON_NotDefined=Constanta COMMANDE_ADDON nedefinită Error_OrderNotChecked=Nicio comandă de facturat selectată @@ -143,26 +145,26 @@ OrderByPhone=Telefon # Documents models PDFEinsteinDescription=Un şablon de comandă (implementare veche a şablonului Eratosthene) PDFEratostheneDescription=Un şablon complet de comadă -PDFEdisonDescription=Un simplu pentru model +PDFEdisonDescription=Un model simplu de comadă PDFProformaDescription=Un şablon complet de factură Proforma CreateInvoiceForThisCustomer=Comenzi facturate CreateInvoiceForThisSupplier=Comenzi facturate NoOrdersToInvoice=Nicio comandă facturabilă -CloseProcessedOrdersAutomatically=Clasează automat "Procesat" toate comenzile selectate. +CloseProcessedOrdersAutomatically=Clasează ca "Procesate" toate comenzile selectate. OrderCreation=Creare comandă Ordered=Comandat -OrderCreated=Comenzile dvs au fost generate -OrderFail=O eroare întâlnită în timpul creării comezilor dvs -CreateOrders=Crează Comenzi +OrderCreated=Comenzile tale au fost create +OrderFail=A apărut o eroare în timpul creării comezilor tale +CreateOrders=Creare comenzi ToBillSeveralOrderSelectCustomer=Pentru crearea unei facturi pentru câteva comenzi, click mai întâi pe client apoi alege "%s". -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ă. +OptionToSetOrderBilledNotEnabled=Opțiune pentru modulul Flux de lucru, 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=Închide automat comanda cu statusul "%s" dacă toatele produsele au fost recepţionate. -SetShippingMode=Setați modul de expediere -WithReceptionFinished=Recepţionat integral +SetShippingMode=Setați modul de livrare +WithReceptionFinished=Recepţionată integral #### supplier orders status -StatusSupplierOrderCanceledShort=Anulata -StatusSupplierOrderDraftShort=Draft +StatusSupplierOrderCanceledShort=Anulată +StatusSupplierOrderDraftShort=Schiţă StatusSupplierOrderValidatedShort=Validată StatusSupplierOrderSentShort=În curs StatusSupplierOrderSent=Livrare în curs @@ -176,10 +178,10 @@ StatusSupplierOrderRefusedShort=Refuzat StatusSupplierOrderToProcessShort=De procesat StatusSupplierOrderReceivedPartiallyShort=Parţial recepţionată StatusSupplierOrderReceivedAllShort=Produse primite -StatusSupplierOrderCanceled=Anulata -StatusSupplierOrderDraft=Schiţă (cererea tebuie validata) +StatusSupplierOrderCanceled=Anulată +StatusSupplierOrderDraft=Schiţă (trebuie validată) StatusSupplierOrderValidated=Validată -StatusSupplierOrderOnProcess=Comandate - receptie standby +StatusSupplierOrderOnProcess=Comandate - în asteptarea recepţiei StatusSupplierOrderOnProcessWithValidation=Comandat - recepție în așteptare sau validare StatusSupplierOrderProcessed=Procesate StatusSupplierOrderToBill=Livrate diff --git a/htdocs/langs/ro_RO/other.lang b/htdocs/langs/ro_RO/other.lang index 1f6709568f6..318effe7aa2 100644 --- a/htdocs/langs/ro_RO/other.lang +++ b/htdocs/langs/ro_RO/other.lang @@ -5,25 +5,25 @@ Tools=Instrumente TMenuTools=Instrumente ToolsDesc=Toate instrumentele care nu sunt incluse în alte intrări în meniu sunt grupate aici. <br> Toate instrumentele pot fi accesate prin meniul din stânga. Birthday=Zi de naştere -BirthdayAlertOn=ziua de nastere de alertă activă -BirthdayAlertOff=ziua de nastere de alertă inactiv +BirthdayAlertOn=alertă zi de naştere activă +BirthdayAlertOff=alertă zi de naştere inactivă TransKey=Traducerea cheii TransKey -MonthOfInvoice=Luna (numărul 1-12) de la data facturării -TextMonthOfInvoice=Luna (textul) datei facturii +MonthOfInvoice=Luna datei de facturare(numeric 1-12) +TextMonthOfInvoice=Luna datei facturii (text) PreviousMonthOfInvoice=Luna anterioară (numărul 1-12) de la data facturării -TextPreviousMonthOfInvoice=Luna anterioară (textul) datei facturii -NextMonthOfInvoice=Luna următoare (numărul 1-12) de la data facturării -TextNextMonthOfInvoice=În luna următoare (textul) datei facturii +TextPreviousMonthOfInvoice=Luna anterioară (text) din data facturii +NextMonthOfInvoice=Luna următoare (numărl 1-12) din data facturii +TextNextMonthOfInvoice=Luna următoare (text) din data facturii PreviousMonth=Luna anterioară CurrentMonth=Luna curentă -ZipFileGeneratedInto=Fișierul Zip generat în <b> %s </b>. -DocFileGeneratedInto=Fișierul doc generat în <b> %s </b>. -JumpToLogin=Deconectată. Accesați pagina de conectare ... +ZipFileGeneratedInto=Fișier zip generat în <b>%s</b>. +DocFileGeneratedInto=Fișierul doc generat în <b>%s</b>. +JumpToLogin=Deconectat. Accesați pagina de conectare ... MessageForm=Mesaj pe formularul de plată online -MessageOK=Mesaj pe pagina de returnare pentru o plată validată -MessageKO=Mesaj de pe pagina de returnare pentru o plată anulată +MessageOK=Mesaj la întoarcerea în pagină după o plată validată +MessageKO=Mesaj la întoarcerea în pagină după o plată anulată ContentOfDirectoryIsNotEmpty=Conținutul acestui director nu este gol. -DeleteAlsoContentRecursively=Verificați pentru a șterge tot conținutul recursiv +DeleteAlsoContentRecursively=Bifaţi pentru a șterge tot conținutul recursiv PoweredBy=Dezvoltat de YearOfInvoice=Anul datei facturii PreviousYearOfInvoice=Anul anterior datei facturii @@ -35,109 +35,110 @@ OnlyOneFieldForXAxisIsPossible=Doar 1 câmp este posibil pentru axa X. Doar prim 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 -Notify_ORDER_SUPPLIER_VALIDATE=Comanda de aprovizionare înregistrată -Notify_ORDER_SUPPLIER_APPROVE=Comanda de aprovizionare aprobată -Notify_ORDER_SUPPLIER_REFUSE=Comanda de aprovizionare a fost refuzată -Notify_PROPAL_VALIDATE=Ofertă client validată -Notify_PROPAL_CLOSE_SIGNED=Propunerea clientului a fost semnată -Notify_PROPAL_CLOSE_REFUSED=Propunerea clientului a fost refuzată -Notify_PROPAL_SENTBYMAIL=Ofertă comercială trimisă prin mail -Notify_WITHDRAW_TRANSMIT=Transmitere de retragere -Notify_WITHDRAW_CREDIT=Credit de retragere -Notify_WITHDRAW_EMIT=Isue retragere -Notify_COMPANY_CREATE=Terţ a creat -Notify_COMPANY_SENTBYMAIL=Emailuri trimise din cardul terţului -Notify_BILL_VALIDATE=Factura client validată +Notify_ORDER_VALIDATE=Comanda de vânzare a fost validată +Notify_ORDER_SENTBYMAIL=Comanda de vânzare a fost trimisă prin poștă +Notify_ORDER_SUPPLIER_SENTBYMAIL=Comanda de achiziţie a fost trimisă pe email +Notify_ORDER_SUPPLIER_VALIDATE=Comanda de achiziţie a fost înregistrată +Notify_ORDER_SUPPLIER_APPROVE=Comanda de achiziţie a fost aprobată +Notify_ORDER_SUPPLIER_REFUSE=Comanda de achiziţie a fost refuzată +Notify_PROPAL_VALIDATE=Oferta client a fost validată +Notify_PROPAL_CLOSE_SIGNED=Oferta comercială a fost acceptată şi semnată de client +Notify_PROPAL_CLOSE_REFUSED=Oferta comercială a fost refuzată de client +Notify_PROPAL_SENTBYMAIL=Ofertă comercială a fost trimisă prin poştă +Notify_WITHDRAW_TRANSMIT=Transmitere retragere de sumă +Notify_WITHDRAW_CREDIT=Retragere de credit +Notify_WITHDRAW_EMIT=Efectuați retragerea +Notify_COMPANY_CREATE=Terţul a fost creat +Notify_COMPANY_SENTBYMAIL=Email-uri trimise din fişa terţului +Notify_BILL_VALIDATE=Factura client a fost validată Notify_BILL_UNVALIDATE=Factura client nevalidată -Notify_BILL_PAYED=Factura de client plătită -Notify_BILL_CANCEL=Factura client anulat -Notify_BILL_SENTBYMAIL=Factura client trimis prin e-mail -Notify_BILL_SUPPLIER_VALIDATE=Factura furnizorului validată -Notify_BILL_SUPPLIER_PAYED=Factura furnizorului plătită -Notify_BILL_SUPPLIER_SENTBYMAIL=Factura furnizorului a fost trimisă prin poștă -Notify_BILL_SUPPLIER_CANCELED=Factura furnizorului a fost anulată -Notify_CONTRACT_VALIDATE=Contract validate -Notify_FICHINTER_VALIDATE=De intervenţie validate -Notify_FICHINTER_ADD_CONTACT=Adaugat contact la Interventie -Notify_FICHINTER_SENTBYMAIL=Intervenţie trimisă prin mail -Notify_SHIPPING_VALIDATE=Transport validate -Notify_SHIPPING_SENTBYMAIL=Transport trimise prin poştă -Notify_MEMBER_VALIDATE=Membru validate +Notify_BILL_PAYED=Factura client a fost plătită +Notify_BILL_CANCEL=Factura client a fost anulată +Notify_BILL_SENTBYMAIL=Factura client a fost trimisă pe email +Notify_BILL_SUPPLIER_VALIDATE=Factura furnizor a fost validată +Notify_BILL_SUPPLIER_PAYED=Factura furnizor a fost achitată +Notify_BILL_SUPPLIER_SENTBYMAIL=Factura furnizor a fost trimisă prin poștă +Notify_BILL_SUPPLIER_CANCELED=Factura furnizor a fost anulată +Notify_CONTRACT_VALIDATE=Contractul a fost validat +Notify_FICHINTER_VALIDATE=Intervenţia a fost validată +Notify_FICHINTER_ADD_CONTACT=Adăugare contact la intervenţie +Notify_FICHINTER_SENTBYMAIL=Intervenţie trimisă prin poştă +Notify_SHIPPING_VALIDATE=Livrarea a fost validată +Notify_SHIPPING_SENTBYMAIL=Livrarea a trimisă prin poştă +Notify_MEMBER_VALIDATE=Membrul a fost validat Notify_MEMBER_MODIFY=Membru modificat -Notify_MEMBER_SUBSCRIPTION=Membru subscris -Notify_MEMBER_RESILIATE=Membru terminat -Notify_MEMBER_DELETE=Membre elimină +Notify_MEMBER_SUBSCRIPTION=Membru abonat +Notify_MEMBER_RESILIATE=Membru anulat +Notify_MEMBER_DELETE=Membru şters Notify_PROJECT_CREATE=Creare proiect Notify_TASK_CREATE=Task creat Notify_TASK_MODIFY=Task modificat -Notify_TASK_DELETE=Task sters -Notify_EXPENSE_REPORT_VALIDATE=Raportul de cheltuieli validat (aprobarea necesară) -Notify_EXPENSE_REPORT_APPROVE=Raportul privind cheltuielile a fost aprobat -Notify_HOLIDAY_VALIDATE=Lăsați cererea validată (este necesară aprobarea) -Notify_HOLIDAY_APPROVE=Lăsați cererea aprobată +Notify_TASK_DELETE=Task şters +Notify_EXPENSE_REPORT_VALIDATE=Raportul de cheltuieli a fost validat (aprobarea este necesară) +Notify_EXPENSE_REPORT_APPROVE=Raportul de cheltuieli a fost aprobat +Notify_HOLIDAY_VALIDATE=Cererea de concediu a fost validată (este necesară aprobarea) +Notify_HOLIDAY_APPROVE=Cererea de concediu a fost aprobată Notify_ACTION_CREATE=Acţiune adăugată în Agendă SeeModuleSetup=Vezi setare modul %s -NbOfAttachedFiles=Numărul de ataşat fişiere / documente -TotalSizeOfAttachedFiles=Total marimea ataşat fişiere / documente +NbOfAttachedFiles=Număr de fişiere/documente ataşate +TotalSizeOfAttachedFiles=Mărimea totală a fişierelor/documentelor ataşate 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)__\nAcesta este un email de test trimis către __EMAIL__.\nAceste rânduri sunt separate prin carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__<br>Acesta este un email de <b>test</b> trimis către __EMAIL__ (cuvântul test ar trebui să fie scris îngroşat).<br>Aceste rânduri sunt separate prin carriage return.<br><br>__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__ -PredefinedMailContentSendProposal=__(Salut)__\n\nGăsiţi propunerea comercială __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierProposal=__(Salut)__\n\nVă rugăm să consultați solicitarea de preț __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendOrder=__(Salut)__\n\nGăsiţi comanda __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendSupplierOrder=__(Salut)__\n\nConsultați comanda __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -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__ -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__ -PredefinedMailContentSendActionComm=Memento eveniment "__EVENT_LABEL__" în data de __EVENT_DATE__ la ora __EVENT_TIME__<br><br> Acesta este un mesaj automat, vă rugăm să nu răspundeți. -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 <br> (selectarea manuală a modulelor) -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 +AttachANewFile=Ataşare fişier/document nou +LinkedObject=Obiect asociat +NbOfActiveNotifications=Număr de notificări (număr de adrese de email destinatar) +PredefinedMailTest=__(Hello)__\nAcesta este un email de test trimis către __EMAIL__.\nRândurile sunt separate de prin carriage return.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__(Hello)__<br>Acesta este un email de <b>test</b> trimis către __EMAIL__ (cuvântul test ar trebui să fie scris îngroşat).<br>Aceste rânduri sunt separate de un caracter de linie nouă.<br><br>__USER_SIGNATURE__ +PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\n\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoice=__(Hello)__\n\n\nGăsiţi factura __REF__ atașată\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__(Hello)__\n\nDorim să vă reamintim că factura __REF__ pare să nu fi fost achitată. V-am ataşat o copie a facturii.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendProposal=__(Hello)__\n\nRegăsiţi ataşată oferta noastră comercială __REF__ \n\n\n__(Sincerely)__\n\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nVă rugăm să consultați solicitarea noastră de preț __REF__ atașată în vederea unei viitoare achiziţii \n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendOrder=__(Hello)__\n\nGăsiţi comanda __REF__ atașată\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nConsultați comanda __REF__ atașată\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nVă rugăm să consultați factura __REF__ atașată\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendShipping=__(Hello)__\n\nGăsiţi detalii privind livrarea __REF__ atașat\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendFichInter=__(Hello)__\n\nConsultați detaliile pentru lucrarea de intervenție __REF__ atașată\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentLink=Puteți accesa link-ul de mai jos pentru a efectua plata dacă nu aţi făcut-o deja.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Reminder eveniment "__EVENT_LABEL__" în data de __EVENT_DATE__ la ora __EVENT_TIME__<br><br> Acesta este un mesaj automat, vă rugăm să nu răspundeți. +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 de module sunt disponibile). În concluzie, sunt disponibile mai multe profiluri demo. +ChooseYourDemoProfil=Alege profilul demonstrativ care se potrivește cel mai bine nevoilor tale... +ChooseYourDemoProfilMore=...sau construiți propriul profil <br> (selectarea manuală a modulelor) +DemoFundation=Gestionarea membrilor unui fundaţii +DemoFundation2=Gestionaţi membrii şi conturile bancare ale unei fundaţii +DemoCompanyServiceOnly=Companie sau freelancer cu vânzare de servicii +DemoCompanyShopWithCashDesk=Gestionaţi un magazin cu casă de marcat 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 -ValidatedBy=Validate de %s -ClosedBy=Închise de %s -CreatedById=Id Utilizator care a creat -ModifiedById=Id utilizator care a făcut ultima modificare -ValidatedById=Id Utilizator care a validat -CanceledById=Id Utilizator care a anulat -ClosedById=Id Utilizator care a închis -CreatedByLogin=Login Utilizator care a creat -ModifiedByLogin=Nume utilizator care a făcut ultima modificare -ValidatedByLogin=Login Utilizator care a validat -CanceledByLogin=Login Utilizator care a anulat -ClosedByLogin=Login Utilizator care a inchis -FileWasRemoved=Fişier a fost şters -DirWasRemoved=Director a fost eliminat +ValidatedBy=Validat de %s +SignedBy=Semnat de %s +ClosedBy=Închis de %s +CreatedById=Id-ul utilizatorului care a creat +ModifiedById=Id-ul utilizatorului care a făcut ultima modificare +ValidatedById=Id-ul utilizatorului care a validat +CanceledById=Id-ul utilizatorului care a anulat +ClosedById=Id-ul utilizatorului care a închis +CreatedByLogin=Utilizatorul care a creat +ModifiedByLogin=Utilizatorul care a făcut ultima modificare +ValidatedByLogin=Utilizatorul care a validat +CanceledByLogin=Utilizatorul care a anulat +ClosedByLogin=Utilizatorul care a închis +FileWasRemoved=Fişier %s a fost şters +DirWasRemoved=Directorul %s a fost şters FeatureNotYetAvailable=Caracteristică care nu este încă disponibilă în versiunea curentă -FeaturesSupported=Caracteristici acceptate -Width=Lărgime +FeaturesSupported=Caracteristici disponibile +Width=Lăţime Height=Înălţime -Depth=Adancime -Top=Top -Bottom=De jos +Depth=Adâncime +Top=Sus +Bottom=Jos Left=Stânga Right=Dreapta -CalculatedWeight=Calculat în greutate -CalculatedVolume=Calculat volum +CalculatedWeight=Greutate calculată +CalculatedVolume=Volum calculat Weight=Greutate WeightUnitton=tonă WeightUnitkg=kg @@ -150,7 +151,7 @@ LengthUnitm=m LengthUnitdm=dm LengthUnitcm=cm LengthUnitmm=mm -Surface=Modul +Surface=Suprafaţă SurfaceUnitm2=m² SurfaceUnitdm2=dm² SurfaceUnitcm2=cm² @@ -175,84 +176,85 @@ SizeUnitinch=inch SizeUnitfoot=picior SizeUnitpoint=punct BugTracker=Bug tracker -SendNewPasswordDesc=Acest formular vă permite să solicitați o nouă parolă. Acesta va fi trimis la adresa ta de email. <br> Schimbarea va intra în vigoare odată ce faceți clic pe link-ul de confirmare din email. <br> Verificați Inbox-ul -BackToLoginPage=Înapoi la pagina de login -AuthenticationDoesNotAllowSendNewPassword=Mod de autentificare <b>este %s.</b> <br> În acest mod, Dolibarr nu poate şi nici nu ştiu să-ţi schimbi parola. <br> Contactaţi administratorul de sistem, dacă doriţi să vă schimbaţi parola. -EnableGDLibraryDesc=Instalați sau activați biblioteca GD din instalarea dvs. PHP pentru a utiliza această opțiune. -ProfIdShortDesc=<b>Prof Id-ul %s</b> este una de informaţii în funcţie de ţară terţă parte. <br> De exemplu, pentru <b>ţara %s,</b> este <b>codul %s.</b> -DolibarrDemo=Demo Dolibarr ERP / CRM -StatsByNumberOfUnits=Statistici pentru suma cantităţilor produselor / serviciilor -StatsByNumberOfEntities=Statistici în numărul entităților care fac trimitere (numărul de factură sau comanda ...) -NumberOfProposals=Numărul de propuneri -NumberOfCustomerOrders=Numărul de ordine de vânzare -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 +SendNewPasswordDesc=Acest formular vă permite să solicitați o nouă parolă. Acesta va fi trimis la adresa ta de email. <br> Schimbarea parolei va intra în vigoare după ce faceți clic pe link-ul de confirmare din email. <br> Verificați Inbox-ul +BackToLoginPage=Înapoi la pagina de conectare +AuthenticationDoesNotAllowSendNewPassword=Metoda de autentificare este <b>%s</b>. <br> În acest mod, sistemul nu poate şti şi nici nu poate să-ţi schimbe parola. <br> Contactează administratorul de sistem dacă vrei să-ţi schimbi parola. +EnableGDLibraryDesc=Instalați sau activați biblioteca GD în configuraţia PHP pentru a utiliza această opțiune. +ProfIdShortDesc=<b>Prof Id %s</b> este identificator profesional alocat în funcţie de ţara terţului.<br> De exemplu, pentru <b> %s</b> este codul <b>%s</b>. +DolibarrDemo=Demo Dolibarr ERP/CRM +StatsByNumberOfUnits=Statistici pentru suma cantităţilor produselor/serviciilor +StatsByNumberOfEntities=Statistici cantitative privind entitățile referite (numărul de facturi sau de comenzi ...) +NumberOfProposals=Număr de oferte comerciale +NumberOfCustomerOrders=Număr de comenzi de vânzare +NumberOfCustomerInvoices=Număr de facturi client +NumberOfSupplierProposals=Număr de oferte furnizor +NumberOfSupplierOrders=Număr de comenzi de achiziţie +NumberOfSupplierInvoices=Număr de facturi furnizor 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 +NumberOfUnitsProposals=Numărul de unități pe oferte +NumberOfUnitsCustomerOrders=Numărul de unități din comenzile de vânzare +NumberOfUnitsCustomerInvoices=Numărul de unități din facturile clienților +NumberOfUnitsSupplierProposals=Numărul de unități din ofertele furnizorilor NumberOfUnitsSupplierOrders=Numărul de unități din comenzile de achiziție -NumberOfUnitsSupplierInvoices=Numărul de unități pe facturile furnizorului +NumberOfUnitsSupplierInvoices=Numărul de unități din facturile furnizorilor 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ă +NumberOfUnitsMos=Număr unităţi de fabricat din comenzile de producţie +EMailTextInterventionAddedContact=Ţi-a fost atribuită o nouă intervenție %s. +EMailTextInterventionValidated=Intervenţia %s a fost validată EMailTextInvoiceValidated=Factura %s a fost validată. -EMailTextInvoicePayed=Factura %s a fost plătită. -EMailTextProposalValidated=Propunerea %s a fost validată. -EMailTextProposalClosedSigned=Propunerea %s a fost închisă semnată. -EMailTextOrderValidated=Ordinul %s a fost validat. -EMailTextOrderApproved=Ordinul %s a fost aprobat. -EMailTextOrderValidatedBy=Ordinul %s a fost înregistrat de %s. -EMailTextOrderApprovedBy=Ordinul %s a fost aprobat de %s. -EMailTextOrderRefused=Ordinul %s a fost refuzat. -EMailTextOrderRefusedBy=Ordinul %s a fost refuzat de %s. -EMailTextExpeditionValidated=Transportul %s a fost validat. -EMailTextExpenseReportValidated=Raportul de cheltuieli %s a fost validat. +EMailTextInvoicePayed=Factura %s a fost achitată. +EMailTextProposalValidated=Oferta comercială %s a fost validată. +EMailTextProposalClosedSigned=Oferta comercială %s a fost semnată şi închisă. +EMailTextOrderValidated=Comanda %s a fost validată. +EMailTextOrderApproved=Comanda %s a fost aprobată. +EMailTextOrderValidatedBy=Comanda %s a fost înregistrată de %s. +EMailTextOrderApprovedBy=Comanda %s a fost aprobată de %s. +EMailTextOrderRefused=Comanda %s a fost refuzată. +EMailTextOrderRefusedBy=Comanda %s a fost refuzată de %s. +EMailTextExpeditionValidated=Livrarea %s a fost validată. +EMailTextExpenseReportValidated=Decontul de cheltuieli %s a fost validat. EMailTextExpenseReportApproved=Raportul de cheltuieli %s a fost aprobat. EMailTextHolidayValidated=Cererea de concediu %s a fost validată. EMailTextHolidayApproved=Cererea de concediu %s a fost aprobată. EMailTextActionAdded=Acțiunea %s a fost adăugată în Agendă. ImportedWithSet=Import de date -DolibarrNotification=Notificare Automată -ResizeDesc=Introduceţi lăţimea noi <b>sau</b> înălţimea noi. Raportul va fi păstrat în timpul redimensionare ... +DolibarrNotification=Notificare automată +ResizeDesc=Introduceţi noua lăţime <b>SAU</b> noua înălţime. Raportul va fi păstrat în timpul redimensionării... NewLength=Lăţime nouă NewHeight=Înălţime nouă -NewSizeAfterCropping=noi dimensiuni după recoltare -DefineNewAreaToPick=Definiţi zona noi pe imagine pentru a alege (click stanga pe imagine, apoi glisaţi până când ajunge la coltul opus) +NewSizeAfterCropping=Noile dimensiuni după decupare +DefineNewAreaToPick=Definiţi o zonă nouă pe imagine (click stînga pe imagine, apoi glisaţi până când ajungeţi la colţul opus) CurrentInformationOnImage=Acest instrument a fost conceput pentru a vă ajuta să redimensionați sau să decupați o imagine. Acestea sunt informațiile despre imaginea curentă editată -ImageEditor=Editor de imagine -YouReceiveMailBecauseOfNotification=Veţi primi acest mesaj deoarece adresa dvs. de email a fost adăugat la lista de obiective care urmează să fie informat cu privire la evenimentele special în software-ul de %s %s. -YouReceiveMailBecauseOfNotification2=Acest eveniment este următoarea: -ThisIsListOfModules=Aceasta este o listă de module preselectate de acest profil de demo-ul (numai modulele cele mai comune sunt vizibile în această demonstraţie). Editeaza aceasta să aibă un demo mai personalizate şi apăsaţi pe &quot;Start&quot;. +ImageEditor=Editor de imagini +YouReceiveMailBecauseOfNotification=Primeşti acest email pentru că adresa ta a fost adăugata în lista de destinatari care urmează să fie informaţi cu privire la acţiunile/evenimentele care se întâmplă în %s sistem de %s. +YouReceiveMailBecauseOfNotification2=Urmează acest eveniment: +ThisIsListOfModules=Aceasta este o listă de module preselectate pentru acest profil demonstrativ (doar modulele cele mai comune sunt vizibile în această demonstraţie). Modifică aici pentru a avea un demo personalizat şi apasă butonul "Start". UseAdvancedPerms=Utilizaţi permisiunile avansate ale unor module FileFormat=Format fişier SelectAColor=Alege o culoare -AddFiles=Adaugă fişiere +AddFiles=Adaugă fişiere StartUpload=Începeţi încărcarea CancelUpload=Anulaţi încărcarea -FileIsTooBig=Fişiere este prea mare +FileIsTooBig=Fişierele sunt prea mari PleaseBePatient=Vă rugăm să aveţi răbdare ... NewPassword=Parolă nouă -ResetPassword=Resetează parola -RequestToResetPasswordReceived=A fost primită o solicitare de modificare a parolei. -NewKeyIs=Aceasta este noua cheie pentru login -NewKeyWillBe=Noua dvs. cheie pentru a vă conecta la software-ul va fi +ResetPassword=Resetare parolă +RequestToResetPasswordReceived=Am primit de la tine o solicitare de modificare a parolei. +NewKeyIs=Acestea sunt noile tale credenţiale pentru autentificare +NewKeyWillBe=Noua ta cheie pentru conectarea la sistem va fi ClickHereToGoTo=Click aici pentru a merge la %s YouMustClickToChange=Trebuie însă mai întâi să faceți clic pe link-ul următor pentru a valida această schimbare a parolei -ForgetIfNothing=Dacă nu ați solicitat această schimbare, ignoraţi acest e-mail. Datele dvs. sunt păstrate în condiții de siguranță. -IfAmountHigherThan=Daca valoarea mai mare <strong>%s</strong> +ConfirmPasswordChange=Confirmare schimbare parolă +ForgetIfNothing=Dacă nu ați solicitat această schimbare, ignoraţi acest email. Datele tale sunt păstrate în condiții de siguranță. +IfAmountHigherThan=Daca valoarea este mai mare de <strong>%s</strong> SourcesRepository=Depozit pentru surse Chart=Diagramă -PassEncoding=Codarea parolelor +PassEncoding=Codarea parolei PermissionsAdd=Au fost adăugate permisiuni PermissionsDelete=Permisiunile au fost eliminate -YourPasswordMustHaveAtLeastXChars=Parola dvs. trebuie să aibă cel puțin <strong> %s </strong> caractere -YourPasswordHasBeenReset=Parola dvs. a fost resetată cu succes +YourPasswordMustHaveAtLeastXChars=Parola ta trebuie să aibă cel puțin <strong>%s</strong> caractere +YourPasswordHasBeenReset=Parola ta a fost resetată cu succes ApplicantIpAddress=Adresa IP a solicitantului SMSSentTo=SMS trimis la %s MissingIds=ID-uri lipsă @@ -264,27 +266,27 @@ OpeningHoursFormatDesc=Foloseşte un - pentru a separa orele de lucru.<br>Folose PrefixSession=Prefix pentru ID-ul sesiunii ##### Export ##### -ExportsArea=Export -AvailableFormats=Formatele disponibile -LibraryUsed=Librairie -LibraryVersion=Versiunea bibliotecii -ExportableDatas=Date Exportabile -NoExportableData=Nu exportabil de date (nu module cu exportabil date încărcate, sau lipsă permissions) +ExportsArea=Export date +AvailableFormats=Formate disponibile +LibraryUsed=Librărie utilizată +LibraryVersion=Versiune bibliotecă +ExportableDatas=Date exportabile +NoExportableData=Nu sunt date exportabile (niciun module cu date exportabile nu a fost încărcat, sau lipsă permisiuni) ##### External sites ##### WebsiteSetup=Configurare modul website -WEBSITE_PAGEURL=URL pagina +WEBSITE_PAGEURL=URL pagină WEBSITE_TITLE=Titlu WEBSITE_DESCRIPTION=Descriere WEBSITE_IMAGE=Imagine 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 +WEBSITE_KEYWORDS=Cuvinte cheie LinesToImport=Linii de import 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 +PopuProp=Produse/servicii după popularitate pe ofertele comerciale +PopuCom=Produse/servicii după popularitate pe comenzile de vânzare ProductStatistics=Statistici produse/servicii NbOfQtyInOrders=Cantitate în comenzi SelectTheTypeOfObjectToAnalyze=Selectează tipul obiectului de analizat... diff --git a/htdocs/langs/ro_RO/productbatch.lang b/htdocs/langs/ro_RO/productbatch.lang index 62da9588ecf..c3703344839 100644 --- a/htdocs/langs/ro_RO/productbatch.lang +++ b/htdocs/langs/ro_RO/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Foloseşte lot / număr de serie -ProductStatusOnBatch=Da (Lot / Număr de serie cerut) +ProductStatusOnBatch=Da (lot necesar) +ProductStatusOnSerial=Da (este necesar un număr de serie unic) ProductStatusNotOnBatch=Nu (Lot / Număr de serie nefolosit) -ProductStatusOnBatchShort=Da +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serie ProductStatusNotOnBatchShort=Nu Batch=Lot / Serie atleast1batchfield=Data expirării sau data vânzării sau lot / serie @@ -15,10 +17,19 @@ printBatch=Lot/Serie: %s printEatby=Expiră la : %s printSellby=Vândut la: %s printQty=Cant: %d -AddDispatchBatchLine=Adauga o linie pentru trimiterea perioadei de valabilitate +AddDispatchBatchLine=Adaugă o linie pentru trimiterea perioadei de valabilitate WhenProductBatchModuleOnOptionAreForced=Când modulul Lot / Serial este activat, scăderea automată a stocurilor este forțată la "Reducerea stocurilor reale la validarea livrărilor" și modul automat de creștere este forțat la "Cresterea stocurilor reale la expedierea manuală în depozite" și nu poate fi editat. Alte opțiuni pot fi definite așa cum doriți. ProductDoesNotUseBatchSerial=Acest produs nu foloseste numărul de lot / serie ProductLotSetup=Configurarea lotului / numărului serial al modulului ShowCurrentStockOfLot=Afișați stocul curent pentru cuplu de produs/lot ShowLogOfMovementIfLot=Afișați jurnalul mișcărilor pentru cuplu de produs/lot StockDetailPerBatch=Detaliu stoc pe lot +SerialNumberAlreadyInUse=Seria %s este deja utilizată pentru produsul %s +TooManyQtyForSerialNumber=Poți avea un singur produs %s pentru numărul de serie %s +BatchLotNumberingModules=Opțiuni pentru generarea automată de produse lot gestionate pe loturi +BatchSerialNumberingModules=Opțiuni pentru generarea automată de produse lot gestionate prin numere de serie +CustomMasks=Adaugă o opţiune pentru definire mască în fişa produsului +LotProductTooltip=Adaugă o opțiune în fişa de produs pentru a defini o mască dedicată numărului de lot +SNProductTooltip=Adaugă o opțiune în fişa de produs pentru a defini o mască dedicată numărului de serie +QtyToAddAfterBarcodeScan=Cantitate de adăugat pentru fiecare cod de bare/lot/serie scanată + diff --git a/htdocs/langs/ro_RO/products.lang b/htdocs/langs/ro_RO/products.lang index dec5f4abd1c..1e5f07f0e12 100644 --- a/htdocs/langs/ro_RO/products.lang +++ b/htdocs/langs/ro_RO/products.lang @@ -1,48 +1,48 @@ # Dolibarr language file - Source file is en_US - products ProductRef=Ref. produs ProductLabel=Etichetă produs -ProductLabelTranslated=Etichetă de produs tradusă +ProductLabelTranslated=Etichetă produs tradusă ProductDescription=Descriere produs -ProductDescriptionTranslated=Descrierea produsului tradus +ProductDescriptionTranslated=Descriere tradusă produs ProductNoteTranslated=Nota de produs tradusă -ProductServiceCard=Fişe Produse / Servicii +ProductServiceCard=Fişă Produs/Serviciu TMenuProducts=Produse TMenuServices=Servicii Products=Produse Services=Servicii Product=Produs Service=Serviciu -ProductId=ID produs / serviciu -Create=Crează +ProductId=ID produs/serviciu +Create=Creare Reference=Referinţă NewProduct=Produs nou NewService=Serviciu nou -ProductVatMassChange=Actualizarea TVA globală -ProductVatMassChangeDesc=Acest instrument actualizează rata TVA definită pe <b> <u> ALL </u> </b>produse și servicii! -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=Cod contabil (achiziţie intra-comunitară) +ProductVatMassChange=Actualizare TVA globală +ProductVatMassChangeDesc=Acest instrument actualizează cota de TVA definită pe <b><u>TOATE</u></b> produsele și serviciile! +MassBarcodeInit=Iniţializare coduri 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 definite. Verificați înainte dacă modulul cod de bare este complet configurat. +ProductAccountancyBuyCode=Cont contabil (achiziție) +ProductAccountancyBuyIntraCode=Cont 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) +ProductAccountancySellCode=Cont contabil (vânzări) +ProductAccountancySellIntraCode=Cont contabil (vânzări intracomunitare) +ProductAccountancySellExportCode=Cont contabil (vânzări la export) ProductOrService=Produs sau serviciu -ProductsAndServices=Produse si Servicii +ProductsAndServices=Produse şi Servicii ProductsOrServices=Produse sau servicii -ProductsPipeServices=Produse|Servicii +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 +ProductsOnSaleOnly=Produse doar de vânzare +ProductsOnPurchaseOnly=Produse doar pentru achiziţie +ProductsNotOnSell=Produse care nu sunt de vânzare și nici de achiziţionat +ProductsOnSellAndOnBuy=Produse de vânzare sau de achiziţionat 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 +ServicesOnPurchaseOnly=Servicii doar de achiziţionat +ServicesNotOnSell=Servicii care nu sunt nici de vânzare și nici de achiziţionat +ServicesOnSellAndOnBuy=Servicii de vânzare sau de achiziţionat LastModifiedProductsAndServices=Ultimile %s produse/servicii modificate LastRecordedProducts=Ultimele %s produse înregistrate LastRecordedServices=Ultimele %s servicii înregistrate @@ -50,133 +50,134 @@ CardProduct0=Produs CardProduct1=Serviciu Stock=Stoc MenuStocks=Stocuri -Stocks=Stocurile și locația (depozitul) produselor -Movements=Transferuri -Sell=Vinde -Buy=Cumpărare -OnSell=Pentru desfacere -OnBuy=Pentru achiziţionare -NotOnSell=Nu pentru desfacere -ProductStatusOnSell=Pentru desfacere -ProductStatusNotOnSell=Nu pentru desfacere -ProductStatusOnSellShort=Pentru desfacere -ProductStatusNotOnSellShort=Nu pentru desfacere -ProductStatusOnBuy=Pentru achiziţionare -ProductStatusNotOnBuy=Nu pentru achiziţionare -ProductStatusOnBuyShort=Pentru achiziţionare -ProductStatusNotOnBuyShort=Nu pentru achiziţionare -UpdateVAT=Actualizeaza tva -UpdateDefaultPrice=Actualizați prețul implicit -UpdateLevelPrices=Actualizați prețurile pentru fiecare nivel +Stocks=Stocuri și locație (depozit) produse +Movements=Mişcări +Sell=Vânzare +Buy=Achiziţie +OnSell=De vânzare +OnBuy=De achiziţionat +NotOnSell=Nu pentru vânzare +ProductStatusOnSell=De vânzare +ProductStatusNotOnSell=Nu pentru vânzare +ProductStatusOnSellShort=De vânzare +ProductStatusNotOnSellShort=Nu pentru vânzare +ProductStatusOnBuy=Pentru achiziţie +ProductStatusNotOnBuy=Nu pentru achiziţie +ProductStatusOnBuyShort=Pentru achiziţie +ProductStatusNotOnBuyShort=Nu pentru achiziţie +UpdateVAT=Actualizare TVA +UpdateDefaultPrice=Actualizare preț implicit +UpdateLevelPrices=Actualizare prețuri pentru fiecare nivel AppliedPricesFrom=Aplicată de la -SellingPrice=Preţul de vânzare -SellingPriceHT=Prețul de vânzare (fără taxă) -SellingPriceTTC=Preţul de vânzare (incl. taxe) -SellingMinPriceTTC=Prețul minim de vânzare (inclusiv taxa) -CostPriceDescription=Acest câmp de preț (fără taxă) poate fi utilizat pentru a stoca pretul de cost mediu. Poate fi orice preț pe care îl calculați dvs., de exemplu din prețul mediu de achiziție plus costul mediu de producție și distribuție. +SellingPrice=Preţ de vânzare +SellingPriceHT=Preț de vânzare (fără taxe) +SellingPriceTTC=Preţ de vânzare (cu taxe) +SellingMinPriceTTC=Preț minim de vânzare (cu taxe) +CostPriceDescription=Acest câmp de preț (fără taxe) poate fi utilizat pentru a stoca preţul de cost mediu pentru compania ta. Poate fi orice preț pe care îl calculați, de exemplu din prețul mediu de achiziție plus costul mediu de producție și distribuție. CostPriceUsage=Această valoare ar putea fi utilizată pentru calcularea marjei. -SoldAmount=Suma vândută -PurchasedAmount=Sumă achiziționată +SoldAmount=Cantitate vândută +PurchasedAmount=Cantitate achiziționată NewPrice=Preţ nou -MinPrice=Prețul minim de vânzare -EditSellingPriceLabel=Editați eticheta prețului de vânzare -CantBeLessThanMinPrice=Prețul de vânzare nu poate fi mai mic decât minimul permis pentru acest produs (%s fără tva). Acest mesaj poate apărea, de asemenea, dacă tastați o reducere prea important. +MinPrice=Preț minim de vânzare +EditSellingPriceLabel=Editare etichetă preț vânzare +CantBeLessThanMinPrice=Prețul de vânzare nu poate fi mai mic decât minimul permis pentru acest produs (%s fără taxe). Acest mesaj poate apărea, de asemenea, dacă aplicați o reducere prea mare. ContractStatusClosed=Închis ErrorProductAlreadyExists=Un produs cu referinţa %s există deja. -ErrorProductBadRefOrLabel=Valoare greșită pentru referință sau eticheta. -ErrorProductClone=A apărut o problemă în timp ce sw încerca clonarea produsului sau a serviciului. +ErrorProductBadRefOrLabel=Valoare eronată pentru referință sau etichetă. +ErrorProductClone=A apărut o problemă în timp ce se încerca clonarea produsului sau a serviciului. ErrorPriceCantBeLowerThanMinPrice=Eroare, prețul nu poate fi mai mic decât prețul minim. Suppliers=Furnizori -SupplierRef=Furnizor SKU -ShowProduct=Afişează produs +SupplierRef=SKU furnizor +ShowProduct=Afişează produs ShowService=Afişează serviciu ProductsAndServicesArea=Produse şi Servicii ProductsArea=Produse ServicesArea=Servicii -ListOfStockMovements=Lista mişcări stoc -BuyingPrice=Preț de cumpărare +ListOfStockMovements=Listă mişcări de stoc +BuyingPrice=Preț de achiziţie PriceForEachProduct=Produse cu prețuri specifice -SupplierCard=Cardul furnizorului +SupplierCard=Fişă furnizor PriceRemoved=Preţ şters BarCode=Coduri de bare -BarcodeType=Tip Coduri de bare +BarcodeType=Tip cod de bare SetDefaultBarcodeType=Setări tip cod de bare -BarcodeValue=Valoarea coduri de bare +BarcodeValue=Valoare cod 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=Baza prețurilor în mod implicit (cu sau fără taxe) la adăugarea noilor prețuri de vânzare -AssociatedProductsAbility=Activare kituri (set de mai multe produse)  -VariantsAbility=Activare variante (variații ale produselor, de exemplu, culoare, dimensiune) +FillWithLastServiceDates=Completează cu datele ultimelor linii de servicii +MultiPricesAbility=Segmente multiple de preț pentru fiecare produs/serviciu (oricare client se află într-un singur segment de preț) +MultiPricesNumPrices=Număr de preţuri +DefaultPriceType=Bază de prețuri implicită (cu sau fără taxe) la adăugarea noilor prețuri de vânzare +AssociatedProductsAbility=Activare kituri (seturi alcătuite din mai multe produse) +VariantsAbility=Activare variante de produs (variații ale produselor, de exemplu, culoare, dimensiune) AssociatedProducts=Kit-uri AssociatedProductsNumber=Numărul de produse care compun acest kit -ParentProductsNumber=Numărul pachetelor produselor părinte +ParentProductsNumber=Numărul produselor părinte din pachet ParentProducts=Produse-mamă -IfZeroItIsNotAVirtualProduct=Dacă este 0, acest produs nu este un kit. +IfZeroItIsNotAVirtualProduct=Dacă este 0, acest produs nu este un kit IfZeroItIsNotUsedByVirtualProduct=Dacă este 0, acest produs nu este utilizat de niciun kit -KeywordFilter=Filtru de cuvinte cheie -CategoryFilter=Categorie filtru -ProductToAddSearch=Cauta produse de adăugat +KeywordFilter=Filtru cuvinte cheie +CategoryFilter=Filtru categorie +ProductToAddSearch=Caută produse pentru adăugare NoMatchFound=Niciun rezultat găsit -ListOfProductsServices=Lista de produse/servicii +ListOfProductsServices=Listă de produse/servicii ProductAssociationList=Lista produselor/serviciilor care sunt componentă(e) ale acestui kit ProductParentList=Lista kit-urilor cu acest produs ca şi componentă -ErrorAssociationIsFatherOfThis=Un produs este selectat de părinte cu curent produs -DeleteProduct=A şterge un produs / serviciu -ConfirmDeleteProduct=Sunteţi sigur că doriţi să ştergeţi acest produs / serviciu? -ProductDeleted=Produse / servicii " %s" şterse din baza de date. +ErrorAssociationIsFatherOfThis=Un produs selectat este părinte cu produsul curent +DeleteProduct=Şterge un produs/serviciu +ConfirmDeleteProduct=Sunteţi sigur că doriţi să ştergeţi acest produs/serviciu? +ProductDeleted=Produse/servicii "%s" au fost şterse din baza de date. ExportDataset_produit_1=Produse ExportDataset_service_1=Servicii ImportDataset_produit_1=Produse ImportDataset_service_1=Servicii -DeleteProductLine=Ştergeţi linia de produse -ConfirmDeleteProductLine=Sunteţi sigur că doriţi să ştergeţi această linie de produse? +DeleteProductLine=Şterge linia de produs +ConfirmDeleteProductLine=Sunteţi sigur că doriţi să ştergeţi această linie de produs? ProductSpecial=Special -QtyMin= Cantitate minimă cumpărată +QtyMin= Cantitate minimă de achiziţionat PriceQtyMin=Preţ cantitate minimă -PriceQtyMinCurrency=Preț (valută) pentru această cantitate. (fără reducere) -VATRateForSupplierProduct=TVA (pentru acest furnizor/produs) -DiscountQtyMin=Reducere pentru acest produs. +PriceQtyMinCurrency=Preț (monedă) pentru această cantitate. (fără discount) +VATRateForSupplierProduct=Cota TVA (pentru acest furnizor/produs) +DiscountQtyMin=Reducere pentru această cantitate. NoPriceDefinedForThisSupplier=Nu există preț/cantitate definite pentru acest furnizor/produs NoSupplierPriceDefinedForThisProduct=Nici un preț/cantitate furnizor nu este definită pentru acest produs +PredefinedItem=Element predefinit PredefinedProductsToSell=Produs predefinit PredefinedServicesToSell=Serviciu predefinit -PredefinedProductsAndServicesToSell=Produse/Servicii Predefinite pentru vânzare -PredefinedProductsToPurchase=Produse Predefinite pentru cumpărare -PredefinedServicesToPurchase=Servicii Predefinite pentru cumpărare -PredefinedProductsAndServicesToPurchase=Produse/servicii predefinite pentru achiziționare -NotPredefinedProducts=Produse/servicii nepredefinite -GenerateThumb=Generaţi thumb -ServiceNb=Service # %s -ListProductServiceByPopularity=Lista de produse / servicii de popularitate -ListProductByPopularity=Lista de produse / servicii de popularitate -ListServiceByPopularity=Lista de servicii de către popularitate +PredefinedProductsAndServicesToSell=Produse/servicii predefinite pentru vânzare +PredefinedProductsToPurchase=Produse predefinite pentru achiziţie +PredefinedServicesToPurchase=Servicii predefinite pentru achiziţie +PredefinedProductsAndServicesToPurchase=Produse/servicii predefinite pentru achiziție +NotPredefinedProducts=Produse/servicii non-predefinite +GenerateThumb=Generare thumbnail +ServiceNb=Serviciu #%s +ListProductServiceByPopularity=Lista de produse/servicii după popularitate +ListProductByPopularity=Listă de produse după popularitate +ListServiceByPopularity=Listă servicii după popularitate Finished=Produs fabricat RowMaterial=Materie primă -ConfirmCloneProduct=Sunteți sigur că doriți să clonați produsul sau serviciul <b> %s </b>? +ConfirmCloneProduct=Sunteți sigur că doriți să clonați produsul sau serviciul <b>%s</b>? CloneContentProduct=Clonați toate informațiile principale ale produsului/serviciului -ClonePricesProduct=Clonează preţurile +ClonePricesProduct=Clonare preţuri CloneCategoriesProduct=Clonare tag-uri/categorii asociate -CloneCompositionProduct=Clonează produsul / serviciul virtual -CloneCombinationsProduct=Clonați variantele de produs +CloneCompositionProduct=Clonare produs/serviciu virtual +CloneCombinationsProduct=Clonare variante de produs ProductIsUsed=Acest produs este utilizat -NewRefForClone=Ref. de produs / serviciu nou -SellingPrices=Preţuri vânzare -BuyingPrices=Prețuri de achiziționare -CustomerPrices=Preţuri Client -SuppliersPrices=Prețurile furnizorului -SuppliersPricesOfProductsOrServices=Prețurile furnizorilor (de produse sau servicii) +NewRefForClone=Ref. noului produs/serviciu +SellingPrices=Preţuri de vânzare +BuyingPrices=Prețuri de achiziție +CustomerPrices=Preţuri client +SuppliersPrices=Prețuri furnizor +SuppliersPricesOfProductsOrServices=Prețuri furnizori (pentru produse sau servicii) CustomCode=Cod vamal/Marfă/Cod HS CountryOrigin=Ţara de origine RegionStateOrigin=Regiune de origine -StateOrigin=Judeţ/regiune de origine +StateOrigin=Ţară|Regiune de origine Nature=Natură produs(materie primă/produs finit) NatureOfProductShort=Natură produs NatureOfProductDesc=Materie primă sau produs finit -ShortLabel=Etichetă scurta -Unit=Unit +ShortLabel=Etichetă scurtă +Unit=Unitate p=u. set=set se=set @@ -192,7 +193,7 @@ gram=gram g=g meter=metru m=m -lm=lm +lm=ml m2=m² m3=m³ liter=litru @@ -205,7 +206,7 @@ unitD=Zi unitG=Gram unitM=Metru unitLM=Metru liniar -unitM2=Metru patrat +unitM2=Metru pătrat unitM3=Metru cub unitL=Litru unitT=tonă @@ -220,7 +221,7 @@ unitCM=cm unitMM=mm unitFT=ft unitIN=inch -unitM2=Metru patrat +unitM2=Metru pătrat unitDM2=dm² unitCM2=cm² unitMM2=mm² @@ -234,90 +235,90 @@ unitFT3=ft³ unitIN3=in³ unitOZ3=uncie unitgallon=galon -ProductCodeModel=Model ref Produs -ServiceCodeModel=Model ref Serviciu +ProductCodeModel=Şablon ref Produs +ServiceCodeModel=Şablon ref Serviciu CurrentProductPrice=Preţ curent -AlwaysUseNewPrice=Întotdeauna foloseşte preţul curent al produsului/serviciului -AlwaysUseFixedPrice=Foloseşte preţul fix -PriceByQuantity=Preţuri diferite pe cantitate -DisablePriceByQty=Dezactivați prețurile în funcție de cantitate +AlwaysUseNewPrice=Foloseşte întotdeauna preţul curent al produsului/serviciului +AlwaysUseFixedPrice=Foloseşte preţ fix +PriceByQuantity=Preţuri diferite în funcţie de cantitate +DisablePriceByQty=Dezactivare prețuri în funcție de cantitate PriceByQuantityRange=Interval cantitate MultipriceRules=Prețuri automate pentru segment -UseMultipriceRules=Utilizați regulile segmentului de preț (definite în configurarea modulului de produs) pentru a calcula automat prețurile tuturor celorlalte segmente în funcție de primul segment +UseMultipriceRules=Utilizați regulile segmentului de preț (definite în configurarea modulului Produse) pentru a calcula automat prețurile tuturor celorlalte segmente în funcție de primul segment 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 +KeepEmptyForAutoCalculation=Păstrați gol pentru a calcula automat din greutatea sau din volumul de produse VariantRefExample=Exemple: COL, SIZE VariantLabelExample=Exemple: Culoare, Dimensiune ### composition fabrication Build=Produce ProductsMultiPrice=Produsele și prețurile pentru fiecare segment de preț -ProductsOrServiceMultiPrice=Prețurile clienților (de produse sau servicii, prețuri multiple) -ProductSellByQuarterHT=Produsul cifrei de afaceri trimestrial înainte de impozitare -ServiceSellByQuarterHT=Rata de afaceri trimestrială din servicii înainte de impozitare +ProductsOrServiceMultiPrice=Prețuri clienți (de produse sau servicii, prețuri multiple) +ProductSellByQuarterHT=Cifra de afaceri trimestrială aferentă produselor înainte de taxare impozitare +ServiceSellByQuarterHT=Cifra de afaceri trimestrială aferentă serviciilor înainte de taxare impozitare Quarter1=Trimestru 1. Quarter2=Trimestru 2. Quarter3=Trimestru 3. Quarter4=Trimestru 4. -BarCodePrintsheet=Printeaza cod de bare -PageToGenerateBarCodeSheets=Cu acest instrument, puteți tipări foi de autocolante cu coduri de bare. Alegeți formatul paginii dvs. de autocolant, tipul de cod de bare și valoarea codului de bare, apoi faceți clic pe butonul <b> %s </b>. -NumberOfStickers=Numărul de autocolante de printat pe pagina -PrintsheetForOneBarCode=Print câteva autocolante pentru un cod de bare -BuildPageToPrint=Generare pagina pentru imprimantă -FillBarCodeTypeAndValueManually=Completați tip cod de bare și valoarea manual. -FillBarCodeTypeAndValueFromProduct=Completați tip cod de bare și valoareadin codul de bare al produsului. +BarCodePrintsheet=Tipărire cod de bare +PageToGenerateBarCodeSheets=Cu acest instrument, puteți tipări autocolante cu coduri de bare. Alegeți formatul paginii de autocolant, tipul de cod de bare și valoarea codului de bare, apoi faceți clic pe butonul <b>%s</b>. +NumberOfStickers=Număr de autocolante de tipărit pe pagină +PrintsheetForOneBarCode=Tipăriţi mai multe autocolante pentru un cod de bare +BuildPageToPrint=Generare pagină pentru tipărire +FillBarCodeTypeAndValueManually=Completare manuală tip şi valoare cod de bare. +FillBarCodeTypeAndValueFromProduct=Completați tip cod de bare și valoare din codul de bare al produsului. FillBarCodeTypeAndValueFromThirdParty=Completați tipul și valoarea codului de bare de la codul de bare al unui terț -DefinitionOfBarCodeForProductNotComplete=Definiția tipului sau valorii codului de bare nu este completă pentru produsul %s. -DefinitionOfBarCodeForThirdpartyNotComplete=Definiția tipului sau valorii codului de bare nu este completat pentru un terț %s. -BarCodeDataForProduct=Informații despre codul de bare al produsului %s: -BarCodeDataForThirdparty=Informații despre codul de bare al terților %s: +DefinitionOfBarCodeForProductNotComplete=Definiția tipului sau valorii codului de bare nu este completată pentru produsul %s. +DefinitionOfBarCodeForThirdpartyNotComplete=Definiția tipului sau valorii codului de bare nu este completat pentru terțul %s. +BarCodeDataForProduct=Info cod de bare produs %s: +BarCodeDataForThirdparty=Info cod de bare terț %s: ResetBarcodeForAllRecords=Definiți valoarea codului de bare pentru toate înregistrările (aceasta va reseta, de asemenea, valoarea codului de bare deja definită cu valori noi) -PriceByCustomer=Diferite prețuri pentru fiecare client -PriceCatalogue=Un singur preț de vânzare pentru fiecare produs / serviciu +PriceByCustomer=Prețuri diferite pentru fiecare client +PriceCatalogue=Un singur preț de vânzare pentru fiecare produs/serviciu PricingRule=Reguli privind prețurile de vânzare -AddCustomerPrice=Add Preţ pe client -ForceUpdateChildPriceSoc=Setează acelasi preţ pe subsidiarele clientuli -PriceByCustomerLog=Jurnalul prețurile anterioare ale clienților +AddCustomerPrice=Adaugă preţ pe client +ForceUpdateChildPriceSoc=Setează acelasi preţ pe subsidiarele clientului +PriceByCustomerLog=Jurnalul prețurilor anterioare ale clienților MinimumPriceLimit=Prețul minim nu poate fi mai mic decât %s MinimumRecommendedPrice=Prețul minim recomandat este: %s PriceExpressionEditor=Editor expresie preț PriceExpressionSelected=Expresie preț selectatată -PriceExpressionEditorHelp1="pret = 2 + 2" sau "2 + 2" pentru setarea pretului. Foloseste ; tpentru separarea expresiilor -PriceExpressionEditorHelp2=Puteți accesa ExtraFields cu variabile precum <b> # extrafield_myextrafieldkey # </b> și variabilele globale cu <b> # global_mycode # </b> -PriceExpressionEditorHelp3=În ambele prețuri de produs / serviciu și furnizor există aceste variabile disponibile: <br> <b> # tva_tx # # localtax1_tx # # localtax2_tx # # greutate # # lungime # # suprafață # # price_min # </b> -PriceExpressionEditorHelp4=Doar în prețul produsului / serviciului: <b> # supplier_min_price # </b> <br> Doar în prețurile furnizorilor: <b> # supplier_quantity # și # supplier_tva_tx # </b> +PriceExpressionEditorHelp1="price = 2 + 2" sau "2 + 2" pentru setarea preţului. Foloseste ; pentru a separa expresiile +PriceExpressionEditorHelp2=Puteți accesa Extracâmpuri cu variabile precum <b>#extrafield_myextrafieldkey#</b> și variabilele globale cu <b>#global_mycode#</b> +PriceExpressionEditorHelp3=În ambele prețuri de produs/serviciu și preţuri furnizor există aceste variabile disponibile:<br> <b>#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min#</b> +PriceExpressionEditorHelp4=Doar în prețul produsului/serviciului: <b># supplier_min_price#</b><br> Doar în prețurile furnizorilor: <b>#supplier_quantity# și #supplier_tva_tx#</b> PriceExpressionEditorHelp5=Valori globale disponibile: -PriceMode=Mod preț +PriceMode=Mod de preț PriceNumeric=Număr -DefaultPrice=Preț Implicit +DefaultPrice=Preț implicit DefaultPriceLog=Jurnalul preţurilor implicite anterioare -ComposedProductIncDecStock=Mărește/micșorează stoc pe schimbări sintetice -ComposedProduct=Produse pentru copii -MinSupplierPrice=Preţul minim de achiziţie -MinCustomerPrice=Prețul minim de vânzare +ComposedProductIncDecStock=Mărire/micșorare de stoc la modificarea produselor părinte +ComposedProduct=Produse copil +MinSupplierPrice=Preţ minim de achiziţie +MinCustomerPrice=Preț minim de vânzare DynamicPriceConfiguration=Setarea dinamică a prețului DynamicPriceDesc=Puteți defini formule matematice pentru a calcula prețurile clienților sau furnizorilor. Astfel de formule pot folosi toți operatorii matematici, unele constante și variabile. Puteți defini aici variabilele pe care doriți să le utilizați. Dacă variabila are nevoie de o actualizare automată, puteți defini adresa URL externă pentru a permite Dolibarr să actualizeze automat valoarea. -AddVariable=Adăugați variabilă -AddUpdater=Adăugați Updater +AddVariable=Adăugare variabilă +AddUpdater=Adăugare actualizator GlobalVariables=Variabile globale VariableToUpdate=Variabilă de actualizat 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"} -GlobalVariableUpdaterType1=Datele WebService -GlobalVariableUpdaterHelp1=Analizează datele WebService din adresa URL specificată, NS specifică spațiul de nume, VALUE specifică locația valorii relevante, DATA ar trebui să conțină datele de trimis și METHOD este metoda WS apelantă +GlobalVariableUpdaterType1=Date WebService +GlobalVariableUpdaterHelp1=Analizează datele WebService din adresa URL specificată, NS specifică spațiul de nume, VALUE specifică locația valorii relevante, DATA ar trebui să conțină datele de trimis și METHOD este metoda apelantă GlobalVariableUpdaterHelpFormat1=Formatul pentru solicitare este {"URL": "http://example.com/urlofws", "VALUE": "array,targetvalue", "NS": "http://example.com/urlofns", "METHOD": "myWSMethod", "DATA": {"your": "data", "to": "send"}} UpdateInterval=Interval de actualizare (minute) LastUpdated=Ultima actualizare -CorrectlyUpdated=Actualizată corect -PropalMergePdfProductActualFile=Fișierele de adăugat în PDF Azur sunt / este -PropalMergePdfProductChooseFile=Selectați fișiere PDF -IncludingProductWithTag=Inclusiv produsul / serviciul cu etichetă -DefaultPriceRealPriceMayDependOnCustomer=Prețul implicit, prețul real poate depinde de client +CorrectlyUpdated=Actualizat corect +PropalMergePdfProductActualFile=Fișierele de adăugat în PDF Azur sunt/este +PropalMergePdfProductChooseFile=Selectare fișiere PDF +IncludingProductWithTag=Include produsele/serviciile cu tag-ul +DefaultPriceRealPriceMayDependOnCustomer=Preț implicit, prețul real poate depinde de client WarningSelectOneDocument=Selectați cel puțin un document -DefaultUnitToShow=Unit -NbOfQtyInProposals=Cantitate în propuneri +DefaultUnitToShow=Unitate +NbOfQtyInProposals=Cantitate în oferte ClinkOnALinkOfColumn=Faceți clic pe un link al coloanei %s pentru a obține o afișare detaliată ... ProductsOrServicesTranslations=Traduceri de produse/servicii TranslatedLabel=Etichetă tradusă @@ -332,64 +333,64 @@ 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? +DeleteProductBuyPrice=Șterge preț de achiziție +ConfirmDeleteProductBuyPrice=Sigur doriți să ștergeți acest preț de achiziţie? SubProduct=Subprodus -ProductSheet=Fișa produsului -ServiceSheet=Foaia de service +ProductSheet=Fișă produs +ServiceSheet=Fişă serviciu PossibleValues=Valori posibile -GoOnMenuToCreateVairants=Mergeți în meniul %s - %s pentru a pregăti variantele atributelor (cum ar fi culorile, mărimea, ...) +GoOnMenuToCreateVairants=Mergeți în meniul %s - %s pentru a pregăti atributele variantelor de produs (cum ar fi culorile, mărimea, ...) 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=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 -PackagingForThisProductDesc=Pe comanda de achiziţie, veți comanda automat această cantitate (sau un multiplu al acestei cantități). Nu poate fi mai mică decât cantitatea minimă de cumpărare -QtyRecalculatedWithPackaging=Cantitatea liniei a fost recalculată conform unităţii de ambalare a furnizorului +UseProductSupplierPackaging=Utilizați împachetările la prețurile furnizor (recalculați cantitățile în funcție de împachetările stabilite la prețurile de furnizor atunci când adăugați/actualizați linia în documentele furnizorului) +PackagingForThisProduct=Împachetare +PackagingForThisProductDesc=Pe comanda de achiziţie, veți comanda automat această cantitate (sau un multiplu al acestei cantități). Nu poate fi mai mică decât cantitatea minimă de achiziţie +QtyRecalculatedWithPackaging=Cantitatea liniei a fost recalculată conform împachetării furnizorului #Attributes -VariantAttributes=Atribute variabile -ProductAttributes=Atribute variabile pentru produse -ProductAttributeName=Atribut variabil%s -ProductAttribute=Atribut variabil +VariantAttributes=Atribute variantă +ProductAttributes=Atribute pentru variante de produs +ProductAttributeName=Atribut variantă %s +ProductAttribute=Atribut variantă ProductAttributeDeleteDialog=Sigur doriți să ștergeți acest atribut? Toate valorile vor fi șterse ProductAttributeValueDeleteDialog=Sigur doriți să ștergeți valoarea "%s" cu referința "%s" din acest atribut? -ProductCombinationDeleteDialog=Sigur doriți să ștergeți varianta produsului "<strong> %s </strong>"? -ProductCombinationAlreadyUsed=A apărut o eroare la ștergerea variantei. Verificați că nu este folosită în nici un obiect +ProductCombinationDeleteDialog=Sigur doriți să ștergeți varianta de produs "<strong>%s</strong>"? +ProductCombinationAlreadyUsed=A apărut o eroare la ștergerea variantei. Verificați că nu este folosită de niciun obiect ProductCombinations=Variante -PropagateVariant=Variante de propagare -HideProductCombinations=Ascunde varianta de produse în selectorul de produse +PropagateVariant=Propagare variante de produs +HideProductCombinations=Ascunde varianta de produs în selectorul de produse ProductCombination=Variantă -NewProductCombination=Noua variantă -EditProductCombination=Varianta de editare -NewProductCombinations=Noi variante -EditProductCombinations=Varianta de editare -SelectCombination=Selectați combinația +NewProductCombination=Variantă nouă +EditProductCombination=Editare variantă de produs +NewProductCombinations=Variante noi +EditProductCombinations=Editare variante de produs +SelectCombination=Selectare combinație ProductCombinationGenerator=Generator de variante Features=Caracteristici -PriceImpact=Impactul prețului +PriceImpact=Impactul asupra 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 +WeightImpact=Impactul asupra greutăţii NewProductAttribute=Atribut nou NewProductAttributeValue=Valoare nouă a atributului ErrorCreatingProductAttributeValue=A apărut o eroare la crearea valorii atributului. Ar putea fi pentru că există deja o valoare cu această referință -ProductCombinationGeneratorWarning=Dacă veți continua, înainte de a genera noi variante, toate cele anterioare vor fi STERSE. Cele deja existente vor fi actualizate cu noile valori -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. +ProductCombinationGeneratorWarning=Dacă veți continua, înainte de a genera noi variante, toate cele anterioare vor fi ŞTERSE. Cele deja existente vor fi actualizate cu noile valori +TooMuchCombinationsWarning=Generarea de numeroase variante poate avea ca rezultat utilizarea excesivă a procesorului şi memoriei, iar sistemul nu le va putea crea. Activarea opțiunii "%s" poate ajuta la reducerea utilizării memoriei. DoNotRemovePreviousCombinations=Nu eliminați variantele anterioare -UsePercentageVariations=Utilizați variații procentuale +UsePercentageVariations=Utilizare variații procentuale 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=Număr de produse -ParentProduct=Produsul Părinte -HideChildProducts=Ascundeți variantele produselor -ShowChildProducts=Afișați variantele produselor -NoEditVariants=Accesați cardul de produse Părinte și modificați impactul prețurilor variantelor în fila variante +ParentProduct=Produs părinte +HideChildProducts=Ascundeți variantele de produs +ShowChildProducts=Afișare variante de produs +NoEditVariants=Accesați fişa produsul părinte și modificați impactul asupra prețurilor variantelor în fişa Variante ConfirmCloneProductCombinations=Doriți să copiați toate variantele de produs la celălalt produs părinte cu referința dată? -CloneDestinationReference=Destinație referință produs +CloneDestinationReference=Referință produs destinație ErrorCopyProductCombinations=A apărut o eroare la copierea variantelor de produs -ErrorDestinationProductNotFound=Destinația produsului nu a fost găsita +ErrorDestinationProductNotFound=Produsul destinația nu a fost găsit ErrorProductCombinationNotFound=Varianta de produs nu a fost găsită ActionAvailableOnVariantProductOnly=Acțiune disponibilă numai pentru varianta de produs ProductsPricePerCustomer=Preţuri produs per clienţi diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index f56ec6dd958..41389259f5d 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -1,176 +1,177 @@ # Dolibarr language file - Source file is en_US - projects RefProject=Ref. proiect -ProjectRef=Referinţă de proiect -ProjectId=ID proiect -ProjectLabel=Eticheta proiectului +ProjectRef=Referinţă proiect +ProjectId=ID Proiect +ProjectLabel=Etichetă proiect ProjectsArea=Proiecte -ProjectStatus=Statut Proiect +ProjectStatus=Status proiect SharedProject=Toată lumea -PrivateProject=Contacte Proiect +PrivateProject=Contacte proiect ProjectsImContactFor=Proiecte pentru care sunt persoană de contact în mod explicit -AllAllowedProjects=Toate proiectele pe care le pot citi (mie + public) +AllAllowedProjects=Toate proiectele pe care le pot citi (ale mele + cele publice) AllProjects=Toate proiectele -MyProjectsDesc=Această vizualizare este limitată la proiectele pentru care sunteți de contactat -ProjectsPublicDesc=Această vedere prezintă toate proiectele la care aveţi permisiunea să le citiţi. -TasksOnProjectsPublicDesc=Această vizualizare prezintă toate sarcinile pe care aveți permisiunea să le citiți. -ProjectsPublicTaskDesc=Această vedere prezintă toate proiectele şi activităţile care sunt permise să le citiţi. -ProjectsDesc=Această vedere prezintă toate proiectele (permisiuni de utilizator va acorda permisiunea de a vizualiza totul). -TasksOnProjectsDesc=Această vizualizare prezintă toate sarcinile din toate proiectele (permisiunile utilizatorului vă acordă permisiunea de a vizualiza totul). -MyTasksDesc=Această vizualizare este limitată la proiectele sau sarcinile pentru care sunteți de contactat -OnlyOpenedProject=Sunt vizibile numai proiectele deschise (proiectele în starea de proiect sau în starea închisă nu sunt vizibile). +MyProjectsDesc=Această vizualizare este limitată la proiectele pentru care sunteți contactat +ProjectsPublicDesc=Această vedere prezintă toate proiectele la care aveţi permisiunea de citire. +TasksOnProjectsPublicDesc=Această vizualizare prezintă toate task-urile pe care aveți permisiunea să le citiți. +ProjectsPublicTaskDesc=Această vedere prezintă toate proiectele şi task-urile care sunt permise să le citiţi. +ProjectsDesc=Această vedere prezintă toate proiectele (permisiuni acordate pentru a vizualiza tot). +TasksOnProjectsDesc=Această vizualizare prezintă toate task-urile din toate proiectele (permisiuni acordate pentru a vizualiza tot). +MyTasksDesc=Această vizualizare este limitată la proiectele sau task-urile pentru care sunteți contact +OnlyOpenedProject=Sunt vizibile numai proiectele deschise (proiectele schiţă sau închise nu sunt vizibile). ClosedProjectsAreHidden=Proiectele închise nu sunt vizibile. -TasksPublicDesc=Această vedere prezintă toate proiectele şi activităţile care sunt permise să le citiţi. -TasksDesc=Această vedere prezintă toate proiectele şi sarcinile (permisiuni de utilizator va acorda permisiunea de a vizualiza totul). -AllTaskVisibleButEditIfYouAreAssigned=Toate sarcinile pentru proiectele calificate sunt vizibile, însă puteți introduce timp doar pentru sarcina atribuită utilizatorului selectat. Atribuiți sarcină dacă trebuie să introduceți timp pe ea. -OnlyYourTaskAreVisible=Numai sarcinile atribuite dvs. vă sunt vizibile. Atribuiți-vă sarcina dacă nu este vizibilă și trebuie să introduceți timp pe ea. -ImportDatasetTasks=Sarcinile proiectelor -ProjectCategories=Etichete/categorii de proiecte +TasksPublicDesc=Această vedere prezintă toate proiectele şi task-urile pentru care aveţi permisiunea de a le citi. +TasksDesc=Această vedere prezintă toate proiectele şi task-urile (drepturile îţi permit să vezi totul). +AllTaskVisibleButEditIfYouAreAssigned=Toate task-urile pentru proiectele calificate sunt vizibile, însă puteți introduce timp consumat doar pe task-ul atribuit utilizatorului selectat. Atribuiți task-ul dacă trebuie să introduceți timp consumat pe el. +OnlyYourTaskAreVisible=Numai task-urile atribuite ţie sunt vizibile. Atribuiți-vă task-ul dacă nu este vizibil și trebuie să îţi aloci timp pe el. +ImportDatasetTasks=Task-uri proiecte +ProjectCategories=Etichete/categorii proiecte NewProject=Proiect nou AddProject=Creare proiect -DeleteAProject=Şterge proiect +DeleteAProject=Şterge proiect DeleteATask=Şterge task ConfirmDeleteAProject=Sigur doriți să ștergeți acest proiect? -ConfirmDeleteATask=Sigur doriți să ștergeți această sarcină? +ConfirmDeleteATask=Sigur doriți să ștergeți acest task? OpenedProjects=Proiecte deschise -OpenedTasks=Sarcini deschise -OpportunitiesStatusForOpenedProjects=Conduce cantitatea de proiecte deschise în funcție de statut -OpportunitiesStatusForProjects=Conduce cantitatea de proiecte în funcție de statut +OpenedTasks=Task-uri deschise +OpportunitiesStatusForOpenedProjects=Sumă lead-uri din proiectele deschise în funcție de status +OpportunitiesStatusForProjects=Sumă lead-uri din priecte în funcție de status ShowProject=Afişează proiect -ShowTask=Arată sarcină +ShowTask=Arată task SetProject=Setare proiect -NoProject=Niciun proiect definit sau responsabil +NoProject=Niciun proiect definit sau la care sunt responsabil NbOfProjects=Număr proiecte NbOfTasks=Număr task-uri -TimeSpent=Timp comsumat -TimeSpentByYou=Timpul consumat da tine -TimeSpentByUser=Timp consumat pe utilizator +TimeSpent=Timp consumat +TimeSpentByYou=Timpul consumat de tine +TimeSpentByUser=Timp consumat de utilizator TimesSpent=Timpi consumaţi TaskId=ID task RefTask=Ref. task LabelTask=Denumire task -TaskTimeSpent=Timp consumat pe task +TaskTimeSpent=Timp consumat pe task-uri TaskTimeUser=Utilizator -TaskTimeNote=Nota -TaskTimeDate=Data -TasksOnOpenedProject=Sarcini privind proiectele deschise +TaskTimeNote=Notă +TaskTimeDate=Dată +TasksOnOpenedProject=Task-uri de pe proiectele deschise WorkloadNotDefined=Volumul de muncă nu este definit NewTimeSpent=Timpi consumaţi MyTimeSpent=Timpul meu consumat -BillTime=Facturează timpul petrecut +BillTime=Facturează timpul consumat BillTimeShort=Timp facturat TimeToBill=Timp nefacturat TimeBilled=Timp facturat Tasks=Taskuri Task=Task -TaskDateStart=Data start task -TaskDateEnd=Data de final task +TaskDateStart=Dată start task +TaskDateEnd=Dată finalizare task TaskDescription=Descriere task NewTask=Task nou -AddTask=Creare sarcină -AddTimeSpent=Creați timp petrecut -AddHereTimeSpentForDay=Adăugați aici timpul petrecut pentru această zi / sarcină +AddTask=Creare task +AddTimeSpent=Creare timp consumat +AddHereTimeSpentForDay=Adăugați aici timpul consumat pe această zi/task AddHereTimeSpentForWeek=Adaugă aici timpul consumat pe săptămână/task Activity=Activitate -Activities=Activităţi / Taskuri -MyActivities=Activităţile / Taskurile mele +Activities=Activităţi/Task-uri +MyActivities=Activităţile/Task-urile mele MyProjects=Proiectele mele -MyProjectsArea=Zona proiectelor mele +MyProjectsArea=Proiectele mele DurationEffective=Durata efectivă ProgressDeclared=Progres real declarat TaskProgressSummary=Progres task -CurentlyOpenedTasks=Taskuri deschise recent +CurentlyOpenedTasks=Task-uri deschise recent TheReportedProgressIsLessThanTheCalculatedProgressionByX=Progresul real declarat este mai mic cu %s decât progresul consumului TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Progresul real declarat este mai mare cu %s decât progresul consumului -ProgressCalculated=Progres consum +ProgressCalculated=Progres pe consum WhichIamLinkedTo=la care sunt atribuit WhichIamLinkedToProject=pentru care sunt atribuit la proiect Time=Timp TimeConsumed=Consumat -ListOfTasks=Lista de sarcini -GoToListOfTimeConsumed=Accesați lista de timp consumată +ListOfTasks=Listă de task-uri +GoToListOfTimeConsumed=Accesați lista de timpi consumaţi GanttView=Vizualizare Gantt -ListProposalsAssociatedProject=Lista propunerilor comerciale aferente proiectului +ListWarehouseAssociatedProject=Lista depozitelor asociate la proiect +ListProposalsAssociatedProject=Lista ofertelor comerciale aferente proiectului ListOrdersAssociatedProject=Lista comenzilor de vânzări aferente proiectului -ListInvoicesAssociatedProject=Lista facturilor pentru clienți aferente proiectului -ListPredefinedInvoicesAssociatedProject=Lista facturilor de șablon client aferente proiectului +ListInvoicesAssociatedProject=Lista facturilor pentru clienți aferente proiectului +ListPredefinedInvoicesAssociatedProject=Lista facturilor șablon de client aferente proiectului ListSupplierOrdersAssociatedProject=Lista comenzilor de achiziție aferente proiectului -ListSupplierInvoicesAssociatedProject=Lista facturilor furnizorilor aferente proiectului +ListSupplierInvoicesAssociatedProject=Lista facturilor furnizor aferente proiectului ListContractAssociatedProject=Lista contractelor aferente proiectului -ListShippingAssociatedProject=Lista expedierilor aferente proiectului +ListShippingAssociatedProject=Lista livrărilor aferente proiectului ListFichinterAssociatedProject=Lista intervențiilor aferente proiectului ListExpenseReportsAssociatedProject=Lista rapoartelor de cheltuieli aferente proiectului ListDonationsAssociatedProject=Lista donațiilor aferente proiectului -ListVariousPaymentsAssociatedProject=Lista diverselor plăți aferente proiectului +ListVariousPaymentsAssociatedProject=Lista plăților diverse aferente proiectului ListSalariesAssociatedProject=Lista plăților salariale aferente proiectului ListActionsAssociatedProject=Lista evenimentelor aferente proiectului ListMOAssociatedProject=Lista comenzilor de producţie aferente proiectului -ListTaskTimeUserProject=Lista timpului consumat pe sarcinile proiectului -ListTaskTimeForTask=Listă de timp consumat pe sarcină +ListTaskTimeUserProject=Lista de timpi consumaţi pe task-urile proiectului +ListTaskTimeForTask=Listă de timpi consumaţi pe task ActivityOnProjectToday=Activitatea pe proiect astăzi ActivityOnProjectYesterday=Activitatea pe proiect ieri ActivityOnProjectThisWeek=Activitatea de pe proiect în această săptămână ActivityOnProjectThisMonth=Activitatea de pe proiect în această lună ActivityOnProjectThisYear=Activitatea de pe proiect în acest an -ChildOfProjectTask=Copil al proiectului / taskului -ChildOfTask=Copil de sarcină -TaskHasChild=Sarcina are copil -NotOwnerOfProject=Nu este proprietar al acestui proiect privat +ChildOfProjectTask=Subunitate a proiectului/task-ului +ChildOfTask=Subunitate de task +TaskHasChild=Task-ul are subtask-uri +NotOwnerOfProject=Nu este deţinătorul acestui proiect privat AffectedTo=Alocat la 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 +CloseAProject=Închide proiect ConfirmCloseAProject=Sigur doriți să închideți acest proiect? -AlsoCloseAProject=De asemenea, închideți proiectul (păstrați-l deschis dacă totuși trebuie să urmați sarcini de producție pe acesta) -ReOpenAProject=Redeschide Proiect +AlsoCloseAProject=De asemenea, închideți proiectul (păstrați-l deschis dacă totuși trebuie să urmăriţi task-uri de producție pe acesta) +ReOpenAProject=Re-deschide proiect ConfirmReOpenAProject=Sigur doriți să redeschideți acest proiect? -ProjectContact=Contacte proiect -TaskContact=Contacte de sarcină +ProjectContact=Contacte proiect +TaskContact=Contacte task-uri ActionsOnProject=Evenimente pe proiect YouAreNotContactOfProject=Nu sunteţi un contact al acestui proiect privat UserIsNotContactOfProject=Utilizatorul nu este un contact al acestui proiect privat -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 +DeleteATimeSpent=Şterge timpul consumat +ConfirmDeleteATimeSpent=Sigur doriți să ștergeți acest timp consumat? +DoNotShowMyTasksOnly=Afişează, de asemenea, şi task-urile ce nu-mi sunt atribuite +ShowMyTasksOnly=Afişează numai task-urile atribuite mie TaskRessourceLinks=Contacte task ProjectsDedicatedToThisThirdParty=Proiecte dedicate acestui terţ -NoTasks=Nr sarcini pentru acest proiect -LinkedToAnotherCompany=Legat de terţi, alta -TaskIsNotAssignedToUser=Activitate nealocată utilizatorului. Utilizați butonul "<strong> %s </strong>" pentru a atribui sarcina acum. +NoTasks=Niciun task pe acest proiect +LinkedToAnotherCompany=Asociat la un alt terţ +TaskIsNotAssignedToUser=Task nealocat utilizatorului. Foloseşte butonul '<strong>%s</strong>' pentru a atribui task-ul acum. ErrorTimeSpentIsEmpty=Timpul consumat nu este completat -ThisWillAlsoRemoveTasks=Această acţiune va şterge, de asemenea, toate taskurile proiectului (<b>%s</b> ) la acest moment şitoţi timpii petrecuţi. -IfNeedToUseOtherObjectKeepEmpty=Dacă unele obiecte (facturi, comenzi, ...), care aparţin altui terţ, trebuie să fie legate de proiect, pentru creare, menţine acest gol pentru a avea proiectul fiind multiterţi. -CloneTasks=Clonează taskuri +ThisWillAlsoRemoveTasks=Această acţiune va şterge, de asemenea, toate task-urile proiectului (<b>%s</b> task-uri la acest moment) şi toţi timpii consumaţi. +IfNeedToUseOtherObjectKeepEmpty=Dacă unele obiecte (facturi, comenzi, ...), care aparţin altui terţ, trebuie să fie asociate la proiect pentru creare, menţine gol pentru a avea un proiect multi-terţi. +CloneTasks=Clonează task-uri CloneContacts=Clonează contacte CloneNotes=Clonează note -CloneProjectFiles=Clonează proiect fişiere ataşate -CloneTaskFiles=Clonează task(uri) fişiere ataşate (dacă task (urile) clonate) -CloneMoveDate=Actualizați datele proiectului/sarcinii de acum? -ConfirmCloneProject=Sunteți sigur ca doriți clonarea acest proiect? -ProjectReportDate=Schimbați datele sarcinii în funcție de data de începere a proiectului -ErrorShiftTaskDate=Imposibil de schimbat data taskului conform cu noua data de debut a proiectului -ProjectsAndTasksLines=Proiecte şi taskuri +CloneProjectFiles=Clonează fişierele ataşate proiectului +CloneTaskFiles=Clonează fişierele ataşate task(urilor) (dacă task(urile) au fost clonate) +CloneMoveDate=Actualizați datele proiectului/task-urilor începând de acum? +ConfirmCloneProject=Sunteți sigur că doriți clonarea acest proiect? +ProjectReportDate=Schimbați datele task-ului în funcție de data de începere a proiectului +ErrorShiftTaskDate=Imposibil de schimbat data taskului conform cu noua dată de debut a proiectului +ProjectsAndTasksLines=Proiecte şi task-uri ProjectCreatedInDolibarr=Proiect %s creat -ProjectValidatedInDolibarr=Proiect %s validat -ProjectModifiedInDolibarr=Proiect %s modificat -TaskCreatedInDolibarr=Task %s creat -TaskModifiedInDolibarr=Task %s modificat -TaskDeletedInDolibarr=Task %s sters -OpportunityStatus=Starea oportunităţii -OpportunityStatusShort=Starea oportunităţii -OpportunityProbability=Probabilitatea oportunităţii -OpportunityProbabilityShort=Probabilitatea oportunităţii -OpportunityAmount=Valoarea oportunităţii -OpportunityAmountShort=Valoarea oportunităţii -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 +ProjectValidatedInDolibarr=Proiectul %s a fost validat +ProjectModifiedInDolibarr=Proiectul %s a fost modificat +TaskCreatedInDolibarr=Task-ul %s a fost creat +TaskModifiedInDolibarr=Task-ul %s a fost modificat +TaskDeletedInDolibarr=Task-ul %s a fost şters +OpportunityStatus=Status lead +OpportunityStatusShort=Status lead +OpportunityProbability=Probabilitate lead +OpportunityProbabilityShort=Probab. lead +OpportunityAmount=Valoare lead +OpportunityAmountShort=Valoare lead +OpportunityWeightedAmount=Valoare ponderată lead +OpportunityWeightedAmountShort=Val. ponderată lead +OpportunityAmountAverageShort=Valoare medie lead +OpportunityAmountWeigthedShort=Valoare ponderată lead +WonLostExcluded=Exclus Câștigat/Pierdut ##### Types de contacts ##### -TypeContact_project_internal_PROJECTLEADER=Şef de Proiect -TypeContact_project_external_PROJECTLEADER=Şef de Proiect +TypeContact_project_internal_PROJECTLEADER=Coordonator proiect +TypeContact_project_external_PROJECTLEADER=Coordonator proiect TypeContact_project_internal_PROJECTCONTRIBUTOR=Contributor TypeContact_project_external_PROJECTCONTRIBUTOR=Contributor TypeContact_project_task_internal_TASKEXECUTIVE=Responsabil @@ -181,83 +182,83 @@ 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 -DocumentModelTimeSpent=Șablonul de raport al proiectului pentru timpul petrecut -PlannedWorkload=Volum de lucru Planificat -PlannedWorkloadShort=Volum de muncă +DocumentModelBeluga=Șablon de document de proiect pentru prezentarea obiectelor asociate +DocumentModelBaleine=Șablon de document de proiect pentru task-uri +DocumentModelTimeSpent=Șablonul de raport al proiectului pentru timpul consumat +PlannedWorkload=Volum de lucru planificat +PlannedWorkloadShort=Volum de lucru ProjectReferers=Obiecte asociate ProjectMustBeValidatedFirst=Proiectul trebuie validat mai întâi FirstAddRessourceToAllocateTime=Atribuie o resursă utilizator ca şi contact al proiectului pentru a aloca timp -InputPerDay=Intrare pe zi -InputPerWeek=Intrare pe saptamana +InputPerDay=Input pe zi +InputPerWeek=Input pe saptamană 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 -TasksWithThisUserAsContact=Sarcini atribuite acestui utilizator +InputDetail=Detalii input +TimeAlreadyRecorded=Acesta este timpul consumat deja înregistrat pentru acest task/zi și utilizator %s +ProjectsWithThisUserAsContact=Proiecte la care acest utilizator este contact +TasksWithThisUserAsContact=Task-uri atribuite acestui utilizator ResourceNotAssignedToProject=Nu sunt alocate proiectului -ResourceNotAssignedToTheTask=Nu este atribuit sarcinii +ResourceNotAssignedToTheTask=Nu este atribuit task-ului NoUserAssignedToTheProject=Nu au fost alocat niciun utilizator acestui proiect -TimeSpentBy=Timpul petrecut de -TasksAssignedTo=Sarcină atribuită -AssignTaskToMe=Acordă-mi sarcina -AssignTaskToUser=Atribuiți sarcina la %s -SelectTaskToAssign=Selectați sarcina pentru a atribui ... +TimeSpentBy=Timpul consumat de +TasksAssignedTo=Task-uri atribuite lui +AssignTaskToMe=Acordă-mi task-ul +AssignTaskToUser=Atribuie task-ul lui %s +SelectTaskToAssign=Selectați task-ul de atribuit... AssignTask=Atribuie ProjectOverview=Prezentare generală -ManageTasks=Utilizați proiectele pentru a urmări sarcinile și / sau pentru a raporta timpul petrecut (foi de pontaj) -ManageOpportunitiesStatus=Utilizați proiectele pentru a urma instrucţiunile/ oportunitățile -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 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 +ManageTasks=Utilizați proiectele pentru a urmări task-urile și/sau pentru a raporta timpul consumat (foi de pontaj) +ManageOpportunitiesStatus=Utilizați proiectele pentru a urmări lead-urile/oportunitățile +ProjectNbProjectByMonth=Nr. proiecte create lunar +ProjectNbTaskByMonth=Nr. de task-uri create lunar +ProjectOppAmountOfProjectsByMonth=Sumă de lead-uri lunar +ProjectWeightedOppAmountOfProjectsByMonth=Suma ponderată a lead-urilor pe lună +ProjectOpenedProjectByOppStatus=Proiect|lead deschis după status +ProjectsStatistics=Statistici pe proiecte sau lead-uri +TasksStatistics=Statisticile pe task-urile proiectelor sau lead-urilor +TaskAssignedToEnterTime=Task atribuit. Introducerea de timp pe acest task ar trebui să fie posibilă. +IdTaskTime=Id timp task +YouCanCompleteRef=Dacă doriți să completați referinţa cu un sufix, este recomandat să adăugați un caracter - pentru al separa, astfel încât numerotarea automată să funcționeze corect pentru proiectele următoare. De exemplu %s-MYSUFFIX OpenedProjectsByThirdparties=Proiecte deschise de terți -OnlyOpportunitiesShort=Numai conducerea -OpenedOpportunitiesShort=Oportunităţi deschise -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 +OnlyOpportunitiesShort=Doar lead-uri +OpenedOpportunitiesShort=Lead-uri deschise +NotOpenedOpportunitiesShort=Niciun lead deschis +NotAnOpportunityShort=Nu este un lead +OpportunityTotalAmount=Valoarea totală a lead-urilor +OpportunityPonderatedAmount=Valoarea ponderată a lead-urilor +OpportunityPonderatedAmountDesc=Suma ponderată a lead-urilor cu probabilitate OppStatusPROSP=Prospectare OppStatusQUAL=Calificare OppStatusPROPO=Ofertă OppStatusNEGO=Negociere -OppStatusPENDING=In asteptarea -OppStatusWON=Castigat +OppStatusPENDING=În aşteptare +OppStatusWON=Câştigat OppStatusLOST=Pierdut Budget=Buget -AllowToLinkFromOtherCompany=Permite conectarea proiectului de la o altă companie <br> <br> <u> Valori acceptate: </u> <br> - Păstrați gol: Poate lega orice proiect al companiei (implicit) <br> - "all": Poate lega orice proiecte, chiar proiecte ale altor companii <br> - ID-urile terților separate prin virgule: pot lega toate proiectele din aceste părți terțe (Exemplu: 123,4795,53) <br> +AllowToLinkFromOtherCompany=Permite asocierea proiectului pe la o altă companie <br><br><u> Valori acceptate: </u><br> - Păstrați gol: Poate asocia orice proiect al companiei (implicit) <br> - "all": Poate asocia orice proiecte, chiar proiecte ale altor companii <br> - ID-urile terților separate prin virgule: poate asocia toate proiectele acestor terți (Exemplu: 123,4795,53)<br> LatestProjects=Ultimele %s proiecte 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) +OtherFilteredTasks=Alte task-uri filtrate +NoAssignedTasks=Nu au fost găsite task-uri atribuite (atribuiți proiectul/task-urile utilizatorului curent din caseta de selectare superioară pentru a introduce timp pe acesta) ThirdPartyRequiredToGenerateInvoice=Un terț trebuie definit pe proiect pentru a putea să fie facturat. 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 +AllowCommentOnTask=Permiteți comentarii de la utilizatori pe task-uri +AllowCommentOnProject=Permiteți comentarii de la utilizatori pe proiecte DontHavePermissionForCloseProject=Nu aveți permisiuni pentru a închide proiectul %s DontHaveTheValidateStatus=Proiectul %s trebuie să fie deschis pentru a fi închis -RecordsClosed=%sProiect(e) închis(e) -SendProjectRef=Proiect de informare %s -ModuleSalaryToDefineHourlyRateMustBeEnabled=Modulul "Salarii" trebuie să fie activat pentru a defini rata orară a angajatului pentru a avea timpul petrecut valorificat -NewTaskRefSuggested=Referatul de sarcini deja utilizat, este necesară o nouă sarcină -TimeSpentInvoiced=Timp petrecut facturat +RecordsClosed=%s proiect(e) închise +SendProjectRef=Info proiect %s +ModuleSalaryToDefineHourlyRateMustBeEnabled=Modulul 'Salarii' trebuie să fie activat pentru a defini tariful orar al angajatului pentru valorificarea timpului consumat +NewTaskRefSuggested=Taskul de referinţă este deja utilizat, este necesară un nou task +TimeSpentInvoiced=Timp consumat facturat 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=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 +OneLinePerUser=O linie per utilizator +ServiceToUseOnLines=Serviciu de utilizat pe linii +InvoiceGeneratedFromTimeSpent=Factura %s a fost generată cu timpul consumat pe proiect +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 "Timp consumat" a proiectului și selectați liniile pe care să le includeți. +ProjectFollowOpportunity=Urmăreşte lead-ul +ProjectFollowTasks=Urmăreşte task-urile sau timpul consumat Usage=Utilizare UsageOpportunity=Utilizare: Oportunitate UsageTasks=Utilizare: Task-uri @@ -266,5 +267,9 @@ InvoiceToUse=Şablon factură de utilizat NewInvoice=Factură nouă OneLinePerTask=O linie per task OneLinePerPeriod=O linie per perioadă -RefTaskParent=Ref. task părinte +RefTaskParent=Ref. Task Părinte ProfitIsCalculatedWith=Profitul este calculat utilizând +AddPersonToTask=Adaugă și la task-uri +UsageOrganizeEvent=Utilizare: Organizare eveniment +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Clasificați proiectul ca închis când toate task-urile sale sunt finalizate (100%% progres) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Notă: proiectele existente cu toate task-urile la 100 %% progres nu vor fi afectate: va trebui să le închideți manual. Această opțiune afectează doar proiectele deschise. diff --git a/htdocs/langs/ro_RO/propal.lang b/htdocs/langs/ro_RO/propal.lang index 9cc3450abe0..f046b81ddc6 100644 --- a/htdocs/langs/ro_RO/propal.lang +++ b/htdocs/langs/ro_RO/propal.lang @@ -1,28 +1,28 @@ # Dolibarr language file - Source file is en_US - propal -Proposals=Oferte Comerciale -Proposal=Ofertă Comercială +Proposals=Oferte comerciale +Proposal=Ofertă comercială ProposalShort=Ofertă -ProposalsDraft=Oferte Comerciale schiţă -ProposalsOpened=Propuneri comerciale deschise -CommercialProposal=Ofertă Comercială -PdfCommercialProposalTitle=Ofertă Comercială -ProposalCard=Fişă Ofertă -NewProp=Ofertă Comercială Nouă -NewPropal=Ofertă Nouă +ProposalsDraft=Oferte comerciale schiţă +ProposalsOpened=Oferte comerciale deschise +CommercialProposal=Ofertă comercială +PdfCommercialProposalTitle=Ofertă comercială +ProposalCard=Fişă ofertă +NewProp=Ofertă comercială nouă +NewPropal=Ofertă nouă Prospect=Prospect -DeleteProp=Ştergere Ofertă Comercială -ValidateProp=Validează Ofertă Comercială -AddProp=Crează ofertă -ConfirmDeleteProp=Sigur doriți să ștergeți această propunere comercială? -ConfirmValidateProp=Sigur doriți să validați această propunere comercială sub numele <b> %s </b>? -LastPropals=Ultimele %s oferte +DeleteProp=Ştergere ofertă comercială +ValidateProp=Validare ofertă comercială +AddProp=Creare ofertă +ConfirmDeleteProp=Sigur doriți să ștergeți această ofertă comercială? +ConfirmValidateProp=Sigur doriți să validați această ofertă comercială sub numele <b>%s</b>? +LastPropals=Ultimele %s oferte comerciale LastModifiedProposals=Ultimele %s oferte modificate AllPropals=Toate ofertele SearchAProposal=Caută o ofertă -NoProposal=Nici o propunere +NoProposal=Nicio ofertă ProposalsStatistics=Statistici oferte comerciale NumberOfProposalsByMonth=Număr pe luni -AmountOfProposalsByMonthHT=Suma pe lună (fără taxă) +AmountOfProposalsByMonthHT=Sumă pe lună (fără taxe) NbOfProposals=Număr oferte comerciale ShowPropal=Afişează oferta PropalsDraft=Schiţe @@ -30,38 +30,38 @@ PropalsOpened=Deschis PropalStatusDraft=Schiţă (de validat) PropalStatusValidated=Validată (ofertă deschisă) PropalStatusSigned=Semnată (de facturat) -PropalStatusNotSigned=Nesemnată (inchisă) +PropalStatusNotSigned=Nesemnată (închisă) PropalStatusBilled=Facturată PropalStatusDraftShort=Schiţă -PropalStatusValidatedShort=Validat (deschis) +PropalStatusValidatedShort=Validată (deschisă) PropalStatusClosedShort=Închisă PropalStatusSignedShort=Semnată PropalStatusNotSignedShort=Nesemnată PropalStatusBilledShort=Facturată -PropalsToClose=Oferte Comerciale de închis -PropalsToBill=Oferte Comerciale semnate de facturat -ListOfProposals=Lista ofertelor comerciale +PropalsToClose=Oferte comerciale de închis +PropalsToBill=Oferte comerciale semnate de facturat +ListOfProposals=Listă oferte comerciale ActionsOnPropal=Evenimente pe ofertă RefProposal=Ref. Ofertă comercială SendPropalByMail=Trimite oferta comercială pe mail -DatePropal=Dată ofertă -DateEndPropal=Data valabilităţii -ValidityDuration=Durata de valabilitate -CloseAs=Setați starea la -SetAcceptedRefused=Set acceptat/refuzat -ErrorPropalNotFound=Propunearea %s nu a fost găsită -AddToDraftProposals=Adaugă ofertă schiţă +DatePropal=Dată ofertă +DateEndPropal=Dată valabilitate +ValidityDuration=Durată de valabilitate +SetAcceptedRefused=Setează ca acceptată/refuzată +ErrorPropalNotFound=Oferta %s nu a fost găsită +AddToDraftProposals=Adaugă la ofertă schiţă NoDraftProposals=Nicio ofertă schiţă -CopyPropalFrom=Crează ofertă comercială prin copierea uneia existente -CreateEmptyPropal=Creați o propunere comercială goală sau dintr-o listă de produse/servicii -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ă <b> %s </b>? -ConfirmReOpenProp=Sigur doriți să redeschideți oferta comercială <b> %s </b>? -ProposalsAndProposalsLines=Oferte Comerciale si linii -ProposalLine=Linie Ofertă -AvailabilityPeriod=Disponibilitate Livrare -SetAvailability=Setează disponibilitatea livrării +CopyPropalFrom=Creare ofertă comercială prin copierea uneia existente +CreateEmptyPropal=Creare propunere comercială goală sau dintr-o listă de produse/servicii +DefaultProposalDurationValidity=Durata valabilităţii implicite a ofertei (în zile) +UseCustomerContactAsPropalRecipientIfExist=Utilizați contactul/adresa cu tipul de "Contact urmărire ofertă" dacă este definit în locul adresei terțului ca adresă destinatar a ofertei +ConfirmClonePropal=Sigur doriți să clonați oferta comercială <b>%s</b>? +ConfirmReOpenProp=Sigur doriți să redeschideți oferta comercială <b>%s</b>? +ProposalsAndProposalsLines=Ofertă comercială şi linii +ProposalLine=Linie ofertă +ProposalLines=Linii ofertă +AvailabilityPeriod=Disponibilitate livrare +SetAvailability=Setează disponibilitatea de livrare AfterOrder=după comandă OtherProposals=Alte oferte ##### Availability ##### @@ -72,16 +72,21 @@ AvailabilityTypeAV_3W=3 săptămâni AvailabilityTypeAV_1M=1 lună ##### Types de contacts ##### TypeContact_propal_internal_SALESREPFOLL=Reprezentant urmărire ofertă -TypeContact_propal_external_BILLING=Contact client facturare propunere +TypeContact_propal_external_BILLING=Contact client pentru facturare ofertă TypeContact_propal_external_CUSTOMER=Contact client urmărire ofertă -TypeContact_propal_external_SHIPPING=Contactul clientului pentru livrare +TypeContact_propal_external_SHIPPING=Contactul client pentru livrare # Document models DocModelAzurDescription=Un şablon complet pentru ofertă(vechea implementare a şablonului Cyan) DocModelCyanDescription=Un şablon complet pentru ofertă DefaultModelPropalCreate=Crează model implicit DefaultModelPropalToBill=Model implicit la închiderea unei oferte comerciale (de facturat) DefaultModelPropalClosed=Model implicit la închiderea unei oferte comerciale (nefacturat) -ProposalCustomerSignature=Acceptarea scrisă, ștampila companiei, data și semnătura -ProposalsStatisticsSuppliers=Statistici privind propunerile furnizorilor +ProposalCustomerSignature=Acordul scris, ștampila companiei, data și semnătura +ProposalsStatisticsSuppliers=Statistici oferte furnizori CaseFollowedBy=Caz urmat de SignedOnly=Doar semnată +IdProposal=ID Ofertă +IdProduct=ID Produs +PrParentLine=Linie părinte ofertă +LineBuyPriceHT=Taxare la preţul net de achiziţie pentru linia respectivă + diff --git a/htdocs/langs/ro_RO/stocks.lang b/htdocs/langs/ro_RO/stocks.lang index 50d0128e8fc..e13759c966b 100644 --- a/htdocs/langs/ro_RO/stocks.lang +++ b/htdocs/langs/ro_RO/stocks.lang @@ -3,17 +3,17 @@ WarehouseCard=Fişă Depozit Warehouse=Depozit Warehouses=Depozite ParentWarehouse=Depozit general -NewWarehouse=Depozit nou / locație stoc -WarehouseEdit=Modifică depozit +NewWarehouse=Depozit/locaţie stoc nouă +WarehouseEdit=Modificare depozit MenuNewWarehouse=Depozit nou -WarehouseSource=Depozit Sursa +WarehouseSource=Depozit sursă WarehouseSourceNotDefined=Niciun depozit definit, AddWarehouse=Creați un depozit AddOne=Adaugă unul DefaultWarehouse=Depozit implicit WarehouseTarget=Depozit ţintă -ValidateSending=Şterge expedierea -CancelSending=Anulează expediere +ValidateSending=Şterge expediere +CancelSending=Anulare expediere DeleteSending=Şterge expediere Stock=Stoc Stocks=Stocuri @@ -25,220 +25,233 @@ StocksByLotSerial=Stocuri după lot/serie LotSerial=Loturi/Serii LotSerialList=Listă lot/serii Movements=Mişcări -ErrorWarehouseRefRequired=Referința Depozit este obligatorie -ListOfWarehouses=Lista depozite -ListOfStockMovements=Lista mişcări de stoc -ListOfInventories=Lista inventarelor -MovementId=ID-ul de mișcare +ErrorWarehouseRefRequired=Referința depozit este obligatorie +ListOfWarehouses=Listă depozite +ListOfStockMovements=Listă mişcări de stoc +ListOfInventories=Listă inventare +MovementId=ID mișcare StockMovementForId=ID-ul de mișcare %d -ListMouvementStockProject=Lista miscărilor de stoc asociate proiectului +ListMouvementStockProject=Lista mişcărilor de stoc asociate proiectului StocksArea=Depozite AllWarehouses=Toate depozitele IncludeEmptyDesiredStock= Include și stocul negativ cu stoc dorit nedefinit -IncludeAlsoDraftOrders=Includeți, de asemenea, schiţele de proiecte +IncludeAlsoDraftOrders=Includeți, de asemenea, comenzile schiţă Location=Locație -LocationSummary=Nume scurt locaţie -NumberOfDifferentProducts=Numărul de produse diferite -NumberOfProducts=Număr total produse +LocationSummary=Numele scurt al locaţiei +NumberOfDifferentProducts=Număr de produse unice +NumberOfProducts=Număr total de produse LastMovement=Ultima mișcare LastMovements=Ultimele mișcări Units=Unităţi Unit=Unitate -StockCorrection=Corecția stocurilor +StockCorrection=Corecție stoc CorrectStock=Corectează stoc -StockTransfer=Transfer stoc -TransferStock=Transferați stocul -MassStockTransferShort=Transfer stocurilor în masă +StockTransfer=Transfer stoc +TransferStock=Transfer stoc +MassStockTransferShort=Transfer stocuri în masă StockMovement=Transfer stoc -StockMovements=Transferuri stoc -NumberOfUnit=Număr unităţi -UnitPurchaseValue=Preţ unitar cumpărare +StockMovements=Mişcări de stoc +NumberOfUnit=Număr de unităţi +UnitPurchaseValue=Preţ de achiziţie unitar StockTooLow=Stoc insuficient StockLowerThanLimit=Stoc mai mic decât limita de alertă (%s) -EnhancedValue=Valoric -PMPValue=Valoric PMP +EnhancedValue=Valoare +PMPValue=PMP PMPValueShort=WAP EnhancedValueOfWarehouses=Stoc valoric UserWarehouseAutoCreate=Creați automat un depozit utilizator atunci când creați un utilizator -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 +AllowAddLimitStockByWarehouse=Gestionează, de asemenea, valoarea pentru stocul minim și cel dorit pe perechi (produs-depozit), pe lângă valoarea pentru stocul minim și stoc dorit pe produs RuleForWarehouse=Reguli pentru depozite -WarehouseAskWarehouseDuringPropal=Setează un depozit pe oferta comercială +WarehouseAskWarehouseOnThirparty=Setează un depozit pe terţ +WarehouseAskWarehouseDuringPropal=Setează un depozit pe ofertele comerciale WarehouseAskWarehouseDuringOrder=Setează un depozit pe comenzile de vânzare UserDefaultWarehouse=Setează un depozit pe utilizatori MainDefaultWarehouse=Depozit implicit 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 +QtyDispatched=Cantitate expediată +QtyDispatchedShort=Cantitate expediată QtyToDispatchShort=Cant de expediat -OrderDispatch=Chitanțe pe elemente -RuleForStockManagementDecrease=Alegeți regula pentru scăderea automată a stocului (reducerea manuală este întotdeauna posibilă, chiar dacă este activată o regulă de scădere automată) -RuleForStockManagementIncrease=Alegeți regula pentru creșterea automată a stocului (creșterea manuală este întotdeauna posibilă, chiar dacă este activată o regulă de creștere automată) -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=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 +OrderDispatch=Expediere comandă +RuleForStockManagementDecrease=Alege regula pentru scăderea automată a stocului (reducerea manuală este întotdeauna posibilă, chiar dacă este activată o regulă de scădere automată) +RuleForStockManagementIncrease=Alege regula pentru creșterea automată a stocului (creșterea manuală este întotdeauna posibilă, chiar dacă este activată o regulă de creștere automată) +DeStockOnBill=Reduce stocurile reale la validarea facturii client/notei de credit +DeStockOnValidateOrder=Reduceți stocurile reale la validarea comenzii de vânzare +DeStockOnShipment=Descreşte stocul fizic în baza livrărilor validate +DeStockOnShipmentOnClosing=Reduceți stocurile reale atunci când livrarea este închisă +ReStockOnBill=Crește stocurile reale la validarea facturii furnizor/notei de credit +ReStockOnValidateOrder=Crește stocurile reale la aprobarea comenzii de achiziție +ReStockOnDispatchOrder=Crește stocurile reale la expedierea manuală în depozit, după primirea comenzii de achiziţie a bunurilor 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ă. -DispatchVerb=Dispecerizează -StockLimitShort=Limita pentru alerta -StockLimit=Stoc limită pentru alerta -StockLimitDesc=(gol) înseamnă nici un avertisment. <br> 0 poate fi folosit pentru un avertisment imediat ce stocul este gol. -PhysicalStock=Stocul fizic -RealStock=Stoc Real -RealStockDesc=Stocul fizic / real este stocul aflat în prezent în depozite. +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 cel virtual +NoPredefinedProductToDispatch=Nu sunt produse predefinite pentru acest obiect. Deci, nici o operaţiune de stoc nu este necesară. +DispatchVerb=Expediere +StockLimitShort=Limită de alertă +StockLimit=Stoc limită de alertă +StockLimitDesc=(gol) înseamnă nici un avertisment. <br> 0 poate fi folosit pentru un avertisment imediat ce stocul s-a epuizat. +PhysicalStock=Stoc fizic +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 +VirtualStock=Stoc virtual 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 +VirtualStockAtDateDesc=Stoc virtual până ce toate comenzile în așteptare care sunt planificate să fie procesate înainte de data aleasă vor fi terminate  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.) +AtDate=La data de IdWarehouse=ID depozit DescWareHouse=Descriere depozit LieuWareHouse=Localizare depozit WarehousesAndProducts=Depozite şi produse -WarehousesAndProductsBatchDetail=Depozite și produse (cu detalii pe lot / serie) -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. +WarehousesAndProductsBatchDetail=Depozite și produse (cu detalii pe lot/serie) +AverageUnitPricePMPShort=PMP +AverageUnitPricePMPDesc=Prețul mediu de intrare pe care l-am cheltuit pentru a obține 1 unitate de produs în stoc. SellPriceMin=Preţ vânzare unitar -EstimatedStockValueSellShort=Valoarea ieşire -EstimatedStockValueSell=Valoarea ieşire -EstimatedStockValueShort=Valoarea de intrare a stocului -EstimatedStockValue=Valoarea de intrare a stocului PMP +EstimatedStockValueSellShort=Valoare de ieşire +EstimatedStockValueSell=Valoare de ieşire +EstimatedStockValueShort=Valoarea de intrare în stoc +EstimatedStockValue=Valoarea de intrare în stoc DeleteAWarehouse=Şterge un depozit -ConfirmDeleteWarehouse=Sigur doriți să ștergeți depozitul <b> %s </b>? -PersonalStock=Stoc Personal %s +ConfirmDeleteWarehouse=Sigur doriți să ștergeți depozitul <b>%s</b>? +PersonalStock=Stoc personal %s ThisWarehouseIsPersonalStock=Acest depozit reprezinta stocul personal al lui %s %s -SelectWarehouseForStockDecrease=Alege depozitul pentru scăderea stocului -SelectWarehouseForStockIncrease=Alege depozitul pentru creşterea stocului +SelectWarehouseForStockDecrease=Alege depozitul pentru scăderea stocului +SelectWarehouseForStockIncrease=Alege depozitul pentru creşterea de stoc NoStockAction=Nicio actiune pe stoc -DesiredStock=Stocul dorit +DesiredStock=Stoc dorit DesiredStockDesc=Această cantitate stoc va fi valoarea utilizată pentru a umple stocul prin reaprovizionare. -StockToBuy=De comandat +StockToBuy=De comandat Replenishment=Reaprovizionare -ReplenishmentOrders=Comenzi reaprovizionare +ReplenishmentOrders=Comenzi de reaprovizionare VirtualDiffersFromPhysical=În funcție de opţiunile de creștere/reducere de stoc, stocul fizic și stocul virtual(stoc fizic + comenzi deschise) pot diferi UseRealStockByDefault=Utilizează stocul real, în loc de stocul virtual, pentru caracteristica de reaprovizionare -ReplenishmentCalculation=Cantitatea comandată va fi (cantitatea dorită - stocul real) în loc de (cantitatea dorită - stocul virtual)  -UseVirtualStock=Utilizeaza Stoc Virtual -UsePhysicalStock=Utilizeaza Stoc Fizic -CurentSelectionMode=Mod selectie curent -CurentlyUsingVirtualStock=Stoc Virtual -CurentlyUsingPhysicalStock=Stoc Fizic +ReplenishmentCalculation=Cantitatea comandată va fi (cantitatea dorită - stocul real) în loc de (cantitatea dorită - stocul virtual) +UseVirtualStock=Utilizează Stoc virtual +UsePhysicalStock=Utilizează Stoc fizic +CurentSelectionMode=Mod de selecţie curent +CurentlyUsingVirtualStock=Stoc virtual +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 +AlertOnly= Doar alerte IncludeProductWithUndefinedAlerts = Includeți și stocuri negative pentru produsele fără cantitatea dorită definită, pentru a le restabili la 0 -WarehouseForStockDecrease=Depozitul <b>%s</b> va fi utilizat pentru scăderea stocului -WarehouseForStockIncrease=Depozitul <b>%s</b> va fi utilizat pentru creşterea stocului +WarehouseForStockDecrease=Depozitul <b>%s</b> va fi utilizat pentru scăderea de stoc +WarehouseForStockIncrease=Depozitul <b>%s</b> va fi utilizat pentru creşterea de stoc 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. +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 "doar alertă"). Dacă utilizați checkbox-ul, puteți crea comenzi de achiziție pentru reaprovizionare diferență. 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. +ReplenishmentOrdersDesc=Aceasta este o listă a tuturor comenzilor de achiziţie 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 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 +SelectProductInAndOutWareHouse=Selectează un depozit sursă și un depozit țintă, un produs și o cantitate, apoi fă clic pe "%s". După ce ai făcut acest lucru pentru toate mișcările necesare, fă clic pe "%s". +RecordMovement=Înregistreză transfer ReceivingForSameOrder=Recepţii pentru această comandă -StockMovementRecorded=Mişcări stoc înregistrate +StockMovementRecorded=Mişcări de stoc înregistrate RuleForStockAvailability=Reguli pentru cereri stoc -StockMustBeEnoughForInvoice=Nivelul stocului trebuie să fie suficient pentru a adăuga produsul / serviciul la factură (verificarea se face pe baza stocului real atunci când se adaugă o linie în factură, indiferent de regula pentru schimbarea automată a acțiunilor) -StockMustBeEnoughForOrder=Nivelul stocului trebuie să fie suficient pentru a adăuga produsul / serviciul la comandă (verificarea se face pe stocul real actual atunci când se adaugă o linie în ordine indiferent de regula pentru schimbarea automată a stocului) -StockMustBeEnoughForShipment= Nivelul stocului trebuie să fie suficient pentru a adăuga produsul / serviciul la expediere (verificarea se face pe stocul real actual atunci când se adaugă o linie în transport, indiferent de regula pentru schimbarea automată a stocului) -MovementLabel=Eticheta transferului -TypeMovement=Tip de mișcare +StockMustBeEnoughForInvoice=Nivelul stocului trebuie să fie suficient pentru a adăuga produsul/serviciul în factură (verificarea se face pe baza stocului real atunci când se adaugă o linie în factură, indiferent de regula de schimbare automată) +StockMustBeEnoughForOrder=Nivelul stocului trebuie să fie suficient pentru a adăuga produsul/serviciul la comandă (verificarea se face pe stocul real actual atunci când se adaugă o linie în ordine indiferent de regula pentru schimbarea automată a stocului) +StockMustBeEnoughForShipment= Nivelul stocului trebuie să fie suficient pentru a adăuga produsul/serviciul la livrare (verificarea se face pe stocul real actual atunci când se adaugă o linie în livrare, indiferent de regula de schimbare automată a stocului) +MovementLabel=Eticheta mişcării de stoc +TypeMovement=Direcţia mişcării DateMovement=Data mișcării -InventoryCode=Codul de inventar sau transfer -IsInPackage=Continute in pachet +InventoryCode=Cod de inventar sau transfer +IsInPackage=Conţinute în pachet WarehouseAllowNegativeTransfer=Stocul poate fi negativ -qtyToTranferIsNotEnough=Nu aveți suficiente stocuri din depozitul sursă și configurația dvs. nu permite stocuri negative. +qtyToTranferIsNotEnough=Nu ai stoc suficient în depozitul sursă și configurația ta nu permite stocuri negative. 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 +MovementCorrectStock=Corecție stoc pentru produsul %s +MovementTransferStock=Transfer de stoc pentru produsul %s în alt depozit InventoryCodeShort=Cod de facturare/mișcare NoPendingReceptionOnSupplierOrder=Nu există recepție în așteptare din cauza comenzii de achiziție deschise -ThisSerialAlreadyExistWithDifferentDate=Acest lot / număr serial (<strong> %s </strong>) există deja, dar cu o dată diferită de consum sau de vânzare (găsită <strong> %s </strong> dar introduceți <strong> %s </strong>). +ThisSerialAlreadyExistWithDifferentDate=Acest număr de lot/serie (<strong> %s </strong>) există deja, dar cu o dată diferită de consum sau de vânzare (găsit ca <strong> %s </strong> dar poţi introduce <strong> %s</strong>). OpenAll=Deschis pentru toate acțiunile -OpenInternal=Deschideți numai pentru acțiuni interne +OpenInternal=Deschis numai pentru acțiuni interne UseDispatchStatus=Utilizați un stadiu de expediere (aprobați/refuzați) pentru linii de produse la recepția comenzii de achiziție -OptionMULTIPRICESIsOn=Opțiunea "mai multe prețuri pe segment" este activată. Înseamnă că un produs are mai multe prețuri de vânzare, astfel încât valoarea pentru vânzare nu poate fi calculată -ProductStockWarehouseCreated=Limita de stoc pentru alertă și stocul optim dorit creată corect -ProductStockWarehouseUpdated=Limita de stoc pentru alertă și stoc optim optim dorit actualizată corect -ProductStockWarehouseDeleted=Limita de stoc pentru alertă și stocul optim dorit ștearsă corect -AddNewProductStockWarehouse=Stabiliți o nouă limită pentru stocul optim dorit și de alertă -AddStockLocationLine=Reduceți cantitatea, apoi faceți clic pentru a adăuga un alt depozit pentru acest produs +OptionMULTIPRICESIsOn=Opțiunea "mai multe prețuri pe segment" este activată. Înseamnă că un produs are mai multe prețuri de vânzare, astfel încât valoarea preţului de vânzare nu poate fi calculată +ProductStockWarehouseCreated=Limită de stoc pentru alertă și stocul optim dorit au fost create corect. +ProductStockWarehouseUpdated=Limită de stoc pentru alertă și stocul optim dorit au fost actualizate corect. +ProductStockWarehouseDeleted=Limita de stoc pentru alertă și stocul optim dorit au fost șterse corect +AddNewProductStockWarehouse=Setează o nouă limită de stoc pentru alertă şi stocul optim dorit +AddStockLocationLine=Redu cantitatea, apoi fă clic pentru a adăuga un alt depozit pentru acest produs InventoryDate=Data inventarului NewInventory=Inventar nou -inventorySetup = Organizarea inventarului -inventoryCreatePermission=Creați un inventar nou -inventoryReadPermission=Vedeți inventarele -inventoryWritePermission=Actualizați inventarele -inventoryValidatePermission=Validați inventarul +inventorySetup = Configurare Inventar +inventoryCreatePermission=Crează un inventar nou +inventoryReadPermission=Vede inventare +inventoryWritePermission=Actualizare inventare +inventoryValidatePermission=Validare inventar +inventoryDeletePermission=Şterge inventar inventoryTitle=Inventar -inventoryListTitle=Inventarele +inventoryListTitle=Inventare inventoryListEmpty=Nu există inventar în curs -inventoryCreateDelete=Creați/ștergeți inventarul +inventoryCreateDelete=Creare/Ştergere inventar inventoryCreate=Crează nou inventoryEdit=Editare inventoryValidate=Validată -inventoryDraft=În service -inventorySelectWarehouse=Alegerea depozitului -inventoryConfirmCreate=Crează -inventoryOfWarehouse=Inventarul pentru depozit: %s +inventoryDraft=În curs +inventorySelectWarehouse=Alege depozitul +inventoryConfirmCreate=Creare +inventoryOfWarehouse=Inventar pentru depozitul: %s inventoryErrorQtyAdd=Eroare: o cantitate este mai mică decât zero inventoryMvtStock=Prin inventar inventoryWarningProductAlreadyExists=Acest produs este deja în listă -SelectCategory=Categorie filtru +SelectCategory=Filtru categorie SelectFournisseur=Filtru furnizor inventoryOnDate=Inventar -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 +INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Mișcările de stoc vor avea data inventarierii (în loc de data validării inventarului) +inventoryChangePMPPermission=Permite modificare valoare PMP pentru un produs +ColumnNewPMP=PMP nou OnlyProdsInStock=Nu adăugați produsul fără stoc TheoricalQty=Cantitate teoretică TheoricalValue=Cantitate teoretică -LastPA=Ultimul BP -CurrentPA=BP Curent +LastPA=Ultimul PA +CurrentPA=PA curent RecordedQty=Cantitate înregistrată RealQty=Cantitate reală RealValue=Valoare reală -RegulatedQty=Cantitate reglementată +RegulatedQty=Cantitate reglată AddInventoryProduct=Adăugați produsul în inventar AddProduct=Adaugă -ApplyPMP=Aplicați PMP +ApplyPMP=Aplică PMP FlushInventory=Goliţi inventarul ConfirmFlushInventory=Confirmați această acțiune? -InventoryFlushed=Inventarul golit -ExitEditMode=Ieșiți din ediție +InventoryFlushed=Inventarul a fost golit +ExitEditMode=Ieșire din editare inventoryDeleteLine=Şterge linie RegulateStock=Reglează stocul -ListInventory=Lista -StockSupportServices=Gestiunea stocurilor suportă Servicii -StockSupportServicesDesc=În mod implicit, puteți stoca numai produse de tipul "produs". Puteți, de asemenea, să stocați un produs de tip "serviciu", dacă sunt activate atât funcția Servicii, cât și această opțiune. -ReceiveProducts=Primiți articole -StockIncreaseAfterCorrectTransfer=Măriți prin corecție/transfer -StockDecreaseAfterCorrectTransfer=Scădeți prin corecție/transfer -StockIncrease=Creșterea stocului -StockDecrease=Scăderea stocului +ListInventory=Listă +StockSupportServices=Gestiunea stocurilor suportă şi Servicii +StockSupportServicesDesc=În mod implicit, poți stoca numai produse de tipul "produs". Puteți, de asemenea, să stocați un produs de tip "serviciu", dacă este activat modulul Servicii, cât și această opțiune. +ReceiveProducts=Recepţie produse +StockIncreaseAfterCorrectTransfer=Măreşte prin corecție/transfer +StockDecreaseAfterCorrectTransfer=Scade prin corecție/transfer +StockIncrease=Creștere stoc +StockDecrease=Scădere stoc 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 +StockAtDateFutureDesc=Poţi vizualiza aici stocul (stocul virtual) la o dată specificată în viitor CurrentStock=Stoc curent InventoryRealQtyHelp=Setați valoarea la 0 pentru a reseta câmpul cantitate<br> Lăsaţi necompletat, sau eliminaţi linia, pentru a păstra neschimbat -UpdateByScaning=Actualizare prin scanare +UpdateByScaning=Completează catitatea reală prin scanare UpdateByScaningProductBarcode=Actualizare prin scanare (cod de bare produs) UpdateByScaningLot=Actualizare prin scanare (cod de bare lot|serie) DisableStockChangeOfSubProduct= Dezactivare modificare de stoc pentru toate subprodusele acestui kit în timpul acestei mișcări. +ImportFromCSV=Import listă CSV cu mişcări +ChooseFileToImport=Încărcați fișierul, apoi dați clic pe pictograma %s pentru a selecta fișierul ca sursă de import... +SelectAStockMovementFileToImport=selectează un fişier cu mişcări de stoc pentru import +InfoTemplateImport=Fișierul încărcat trebuie să aibă acest format (* sunt câmpuri obligatorii):<br> Depozit sursă* | Depozit țintă* | Produs* | Cantitate* | Număr lot/serie <br>Separatorul de caractere CSV trebuie să fie "<b>%s</b>" +LabelOfInventoryMovemement=Inventar %s +ReOpen=Redeschide +ConfirmFinish=Confirmi închiderea inventarului? Aceasta va genera toate mișcările stocului pentru actualizare. +ObjectNotFound=%s nu a fost găsit +MakeMovementsAndClose=Generează mişcări şi închide +AutofillWithExpected=Completează cantitatea reală cu cantitatea așteptată diff --git a/htdocs/langs/ro_RO/suppliers.lang b/htdocs/langs/ro_RO/suppliers.lang index e4051441e49..f2891790714 100644 --- a/htdocs/langs/ro_RO/suppliers.lang +++ b/htdocs/langs/ro_RO/suppliers.lang @@ -1,48 +1,49 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Furnizori -SuppliersInvoice=Factura furnizorului -ShowSupplierInvoice=Afișați factura furnizorului +SuppliersInvoice=Factură furnizor +SupplierInvoices=Facturi furnizori +ShowSupplierInvoice=Afișați factura furnizor NewSupplier=Furnizor nou History=Istoric -ListOfSuppliers=Lista furnizori -ShowSupplier=Afișează furnizorul +ListOfSuppliers=Listă furnizori +ShowSupplier=Afișează furnizor 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 +BuyingPriceMin=Cel mai bun preț de achiziţie +BuyingPriceMinShort=Cel mai bun preț de achiziţie +TotalBuyingPriceMinShort=Total prețuri de achiziţie subproduse TotalSellingPriceMinShort=Totalul prețurilor de vânzare ale subproduselor SomeSubProductHaveNoPrices=Unele sub-produse nu au un preț definit -AddSupplierPrice=Adăugați prețul de cumpărare -ChangeSupplierPrice=Modificați prețul de achiziție -SupplierPrices=Prețurile furnizorului +AddSupplierPrice=Adăugare preț de achiziţie +ChangeSupplierPrice=Modificare preț de achiziție +SupplierPrices=Prețuri furnizor 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 +SupplierPayment=Plată furnizor +SuppliersArea=Furnizor RefSupplierShort=Ref. furnizor Availability=Disponibilitate 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=Sigur doriți să aprobați comanda <b> %s </b>? -DenyingThisOrder=Refuză aceasta comanda -ConfirmDenyingThisOrder=Sigur doriți să refuzați această comandă <b> %s </b>? -ConfirmCancelThisOrder=Sigur doriți să anulați această comandă <b> %s </b>? -AddSupplierOrder=Creați comanda de aprovizionare -AddSupplierInvoice=Creați factura furnizorilor -ListOfSupplierProductForSupplier=Lista de produse și prețuri pentru vânzător <b> %s </b> -SentToSuppliers=Trimite furnizorilor -ListOfSupplierOrders=Lista comenzilor de achiziție -MenuOrdersSupplierToBill=Comenzi de achiziție pentru facturare -NbDaysToDelivery=întârziere de livrare (zile) +ExportDataset_fournisseur_2=Facturi și plăți furnizori +ExportDataset_fournisseur_3=Comenzi de achiziţie și detalii comenzi +ApproveThisOrder=Aprobă această comandă +ConfirmApproveThisOrder=Sigur doriți să aprobați comanda <b>%s</b>? +DenyingThisOrder=Refuză această comandă +ConfirmDenyingThisOrder=Sigur doriți să refuzați această comandă <b>%s</b>? +ConfirmCancelThisOrder=Sigur doriți să anulați această comandă <b>%s</b>? +AddSupplierOrder=Creare comandă de achiziţie +AddSupplierInvoice=Creare factură furnizor +ListOfSupplierProductForSupplier=Listă de produse și prețuri pentru furnizor <b>%s</b> +SentToSuppliers=Trimite la furnizori +ListOfSupplierOrders=Listă comenzi de achiziție +MenuOrdersSupplierToBill=Comenzi de achiziție de facturat +NbDaysToDelivery=Întârziere livrare (zile) DescNbDaysToDelivery=Cea mai lungă întârziere de livrare a produselor din această comandă -SupplierReputation=Reputația furnizorului +SupplierReputation=Reputație furnizor ReferenceReputation=Reputație de referință DoNotOrderThisProductToThisSupplier=Nu comanda NotTheGoodQualitySupplier=Calitate scăzută -ReputationForThisProduct=Reputatie +ReputationForThisProduct=Reputaţie BuyerName=Numele cumpărătorului -AllProductServicePrices=Toate preturile produselor / serviciilor +AllProductServicePrices=Toate preţurile produselor/serviciilor AllProductReferencesOfSupplier=Toate referinţele furnizorului -BuyingPriceNumShort=Prețurile furnizorului +BuyingPriceNumShort=Prețuri furnizor diff --git a/htdocs/langs/ro_RO/ticket.lang b/htdocs/langs/ro_RO/ticket.lang index 70ee1b31ebd..ba08e876e88 100644 --- a/htdocs/langs/ro_RO/ticket.lang +++ b/htdocs/langs/ro_RO/ticket.lang @@ -18,14 +18,14 @@ # Generic # -Module56000Name=Tichete -Module56000Desc=Sistem de tichete pentru gestionarea problemelor sau a cererilor +Module56000Name=Tichete de suport +Module56000Desc=Sistem de tichete pentru gestionarea problemelor sau a cererilor, suport şi asistenţă tehnică -Permission56001=Vedeți tichetele +Permission56001=Vedeți tichetele de suport Permission56002=Modifică tichete Permission56003=Șterge tichete Permission56004=Gestionați tichetele -Permission56005=Vedeți tichetele tuturor terților (nu sunt eficiente pentru utilizatorii externi, întotdeauna se limitează la terțul de care depind) +Permission56005=Vedeți tichetele tuturor terților (nu este efectiv pentru utilizatorii externi, întotdeauna se limitează la terțul de care depind) TicketDictType=Tipuri de tichete TicketDictCategory=Tichet - Grupuri @@ -44,32 +44,34 @@ TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Mare TicketSeverityShortBLOCKING=Critic, blocant -ErrorBadEmailAddress=Câmpul "%s" este incorect +ErrorBadEmailAddress=Câmpul '%s' este incorect MenuTicketMyAssign=Tichetele mele MenuTicketMyAssignNonClosed=Tichetele mele deschise MenuListNonClosed=Tichete deschise TypeContact_ticket_internal_CONTRIBUTOR=Contributor TypeContact_ticket_internal_SUPPORTTEC=Utilizator atribuit -TypeContact_ticket_external_SUPPORTCLI=Urmărirea contactului/incidentului cu clientul -TypeContact_ticket_external_CONTRIBUTOR=Contribuitor extern +TypeContact_ticket_external_SUPPORTCLI=Contact client urmărire incidente +TypeContact_ticket_external_CONTRIBUTOR=Contributor extern -OriginEmail=Sursa emailului +OriginEmail=Email sursă Notify_TICKET_SENTBYMAIL=Trimite mesaj tichet pe email # Status Read=Citit Assigned=Atribuit -InProgress=In progres +InProgress=În curs NeedMoreInformation=În aşteptarea de informaţii -Answered=Răspuns -Waiting=Aşteptare +Answered=S-a răspuns +Waiting=În aşteptare Closed=Închis Deleted=Șters # Dict Type=Tip Severity=Gravitate +TicketGroupIsPublic=Grupul este public +TicketGroupIsPublicDesc=Dacă un grup de tichete este public, acesta va fi vizibil în formular la crearea unui tichet din interfața publică # Email templates MailToSendTicketMessage=Pentru a trimite emailuri din mesajul tichetului @@ -77,70 +79,70 @@ MailToSendTicketMessage=Pentru a trimite emailuri din mesajul tichetului # # Admin page # -TicketSetup=Setări modulului Tichete +TicketSetup=Configurare modul Tichete de suport TicketSettings=Configurări TicketSetupPage= -TicketPublicAccess=O interfață publică care nu necesită identificare este disponibilă la următorul URL +TicketPublicAccess=O interfață publică care nu necesită identificarea este disponibilă la următorul URL TicketSetupDictionaries=Tipul tichetului, severitatea și codurile analitice sunt configurabile din dicționare -TicketParamModule=Setări modulului Variabile +TicketParamModule=Setări variabile modul TicketParamMail=Setări email -TicketEmailNotificationFrom=Notificare de email de la -TicketEmailNotificationFromHelp=Folosit în mesajul tichetului de răspuns prin exemplu -TicketEmailNotificationTo=Notificările trimise prin email la -TicketEmailNotificationToHelp=Trimiteți notificări prin email la această adresă. +TicketEmailNotificationFrom=Notificare email de la +TicketEmailNotificationFromHelp=Folosit în mesajul tichetului de răspuns de exemplu +TicketEmailNotificationTo=Notificările trimise pe email la +TicketEmailNotificationToHelp=Trimite notificări prin email la această adresă. TicketNewEmailBodyLabel=Mesaj text trimis după crearea unui tichet TicketNewEmailBodyHelp=Textul specificat aici va fi inserat în emailul care confirmă crearea unui nou tichet din interfața publică. Informațiile privind consultarea tichetului sunt adăugate automat. -TicketParamPublicInterface=Setări interfeței publice +TicketParamPublicInterface=Setări interfață publică TicketsEmailMustExist=Solicitați o adresă de email existentă pentru a crea un tichet -TicketsEmailMustExistHelp=În interfața publică, adresa de email ar trebui deja completată în baza de date pentru a crea un tichet nou. -PublicInterface=Interfața publică +TicketsEmailMustExistHelp=În interfața publică, adresa de email ar trebui să fie deja completată în baza de date pentru a crea un tichet nou. +PublicInterface=Interfață publică TicketUrlPublicInterfaceLabelAdmin=URL alternativ pentru interfața publică -TicketUrlPublicInterfaceHelpAdmin=Este posibil să definiți un alias serverului web și astfel să puneți la dispoziție interfața publică cu o alt URL (serverul trebuie să acționeze ca proxy pe acest nou URL) -TicketPublicInterfaceTextHomeLabelAdmin=Textul interfeței publice de bun venit -TicketPublicInterfaceTextHome=Puteți crea un tichet de asistență sau vizualiza unul existent din tichetul de identificare. -TicketPublicInterfaceTextHomeHelpAdmin=Textul definit aici va apărea pe pagina de pornire a interfeței publice. -TicketPublicInterfaceTopicLabelAdmin=Titlul interfeței -TicketPublicInterfaceTopicHelp=Acest text va apărea ca titlu al interfeței publice. +TicketUrlPublicInterfaceHelpAdmin=Este posibil să definiți un alias pentru serverul web și astfel să puneți la dispoziție interfața publică cu un alt URL (serverul trebuie să acționeze ca proxy pe acest nou URL) +TicketPublicInterfaceTextHomeLabelAdmin=Textul de bun venit din interfeța publică +TicketPublicInterfaceTextHome=Puteți crea un tichet de asistență sau vizualiza unul existent pe baza identificatorului de urmărire. +TicketPublicInterfaceTextHomeHelpAdmin=Textul definit aici va apărea pe pagina de start a interfeței publice. +TicketPublicInterfaceTopicLabelAdmin=Titlu interfață +TicketPublicInterfaceTopicHelp=Acest text va apărea ca titlu în interfaţai publică. TicketPublicInterfaceTextHelpMessageLabelAdmin=Text de ajutor la intrarea în mesaj TicketPublicInterfaceTextHelpMessageHelpAdmin=Acest text va apărea deasupra zonei de intrare a mesajului utilizatorului. -ExtraFieldsTicket=Extra atribute -TicketCkEditorEmailNotActivated=Editorul HTML nu este activat. Puneți conținutul FCKEDITOR_ENABLE_MAIL la 1 pentru a-l obține. -TicketsDisableEmail=Nu trimiteți emailuri pentru crearea tichetelor sau înregistrarea mesajelor -TicketsDisableEmailHelp=Implicit, emailurile sunt trimise atunci când se creează noi tichete sau mesaje. Activați această opțiune pentru a dezactiva * toate * notificările prin email +ExtraFieldsTicket=Atribute suplimentare +TicketCkEditorEmailNotActivated=Editorul HTML nu este activat. Setaţi constanta FCKEDITOR_ENABLE_MAIL la valoarea 1 pentru a-l activa. +TicketsDisableEmail=Nu trimite email-uri pentru crearea tichetelor sau înregistrarea mesajelor +TicketsDisableEmailHelp=Implicit, email-urile sunt trimise atunci când se creează tichete sau mesaje noi. Activați această opțiune pentru a dezactiva *toate* notificările prin email TicketsLogEnableEmail=Activați jurnalul prin email -TicketsLogEnableEmailHelp=La fiecare schimbare, se va trimite un email ** la fiecare contact ** asociat cu tichetul. +TicketsLogEnableEmailHelp=La fiecare schimbare, se va trimite un email **la fiecare contact** asociat cu tichetul. TicketParams=Parametri TicketsShowModuleLogo=Afișați sigla modulului în interfața publică -TicketsShowModuleLogoHelp=Activați această opțiune pentru a ascunde modulul de logo-uri în paginile interfeței publice +TicketsShowModuleLogoHelp=Activați această opțiune pentru a ascunde sigla modulului în paginile interfeței publice TicketsShowCompanyLogo=Afișați logo-ul companiei în interfața publică TicketsShowCompanyLogoHelp=Activați această opțiune pentru a ascunde sigla companiei principale în paginile interfeței publice -TicketsEmailAlsoSendToMainAddress=Trimiteți, de asemenea, o notificare adresei principale de email -TicketsEmailAlsoSendToMainAddressHelp=Activați această opțiune pentru a trimite un email la adresa "Email de notificare de la" (consultați configurarea de mai jos) -TicketsLimitViewAssignedOnly=Restricționați afișarea la tichetele alocate utilizatorului actual (nu este eficient pentru utilizatorii externi, întotdeauna să fie limitat la terțul de care depind) -TicketsLimitViewAssignedOnlyHelp=Numai biletele alocate utilizatorului actual vor fi vizibile. Nu se aplică unui utilizator cu drepturi de gestionare a biletelor. -TicketsActivatePublicInterface=Activați interfața publică -TicketsActivatePublicInterfaceHelp=Interfața publică permite vizitatorilor să creeze bilete. -TicketsAutoAssignTicket=Desemnați automat utilizatorul care a creat tichetul +TicketsEmailAlsoSendToMainAddress=De asemenea, trimite o notificare la adresa principală de email +TicketsEmailAlsoSendToMainAddressHelp=Activați această opțiune pentru a trimite, de asemenea, un email la adresa definită în setarea "%s" (consultă fila "%s") +TicketsLimitViewAssignedOnly=Restricționează afișarea la tichetele alocate utilizatorului actual (nu este eficient pentru utilizatorii externi, întotdeauna să fie limitat la terțul de care depind) +TicketsLimitViewAssignedOnlyHelp=Numai tichetele alocate utilizatorului curent vor fi vizibile. Nu se aplică unui utilizator cu drepturi de gestionare a tichetelor. +TicketsActivatePublicInterface=Activare interfață publică +TicketsActivatePublicInterfaceHelp=Interfața publică permite vizitatorilor să creeze tichete. +TicketsAutoAssignTicket=Atribuiţi automat utilizatorul care a creat tichetul TicketsAutoAssignTicketHelp=La crearea unui tichet, utilizatorul poate fi automat alocat tichetului. TicketNumberingModules=Modul de numerotare a tichetelor TicketsModelModule=Şabloane documente pentru tichete TicketNotifyTiersAtCreation=Notificați terțul la creare 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 +TicketsPublicNotificationNewMessage=Trimite email(uri) atunci când un nou mesaj/comentariu este adăugat la un tichet 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. +TicketPublicNotificationNewMessageDefaultEmail=Notificări email către (actualizare) +TicketPublicNotificationNewMessageDefaultEmailHelp=Trimite un email la această adresă pentru fiecare notificare de mesaj nou dacă tichetul nu are un utilizator atribuit sau dacă utilizatorul nu are niciun email cunoscut. # # Index & list page # -TicketsIndex=Tichete -TicketList=Lista de tichete +TicketsIndex=Tichete de suport +TicketList=Listă 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=Nici un tichet necitit +NoUnreadTicketsFound=Niciun tichet necitit TicketViewAllTickets=Vezi toate tichetele -TicketViewNonClosedOnly=Vedeți numai tichetele deschise -TicketStatByStatus=Tichete după statut +TicketViewNonClosedOnly=Afişează numai tichetele deschise +TicketStatByStatus=Tichete după status OrderByDateAsc=Sortare după dată ascendent OrderByDateDesc=Sortare după dată descendent ShowAsConversation=Afişare ca listă de conversaţie @@ -150,31 +152,31 @@ MessageListViewType=Afişare listă ca tabel # Ticket card # Ticket=Tichet -TicketCard=Card tichet -CreateTicket=Creează un tichet -EditTicket=Editați tichetul -TicketsManagement=Managementul tichetelor +TicketCard=Fişă tichet +CreateTicket=Creare tichet +EditTicket=Editare tichet +TicketsManagement=Managementul tichetelor de suport tehnic incidente CreatedBy=Creat de NewTicket=Tichet nou -SubjectAnswerToTicket=Tichet de răspuns +SubjectAnswerToTicket=Răspuns la tichet TicketTypeRequest=Tip de solicitare TicketCategory=Grup -SeeTicket=Vedeți tichetul +SeeTicket=Vezi tichetul TicketMarkedAsRead=Tichetul a fost marcat ca citit TicketReadOn=Citește mai departe -TicketCloseOn=Dată închidere -MarkAsRead=Marcați tichetul ca citit -TicketHistory=Istoricul tichetului -AssignUser=Alocați utilizatorului +TicketCloseOn=Dată de închidere +MarkAsRead=Marchează tichetul ca citit +TicketHistory=Istoric tichet +AssignUser=Atribuire la utilizator TicketAssigned=Tichetul este acum atribuit -TicketChangeType=Modificați tipul -TicketChangeCategory=Modificați codul analitic -TicketChangeSeverity=Schimbați severitatea +TicketChangeType=Modificare tip +TicketChangeCategory=Modificare cod analitic +TicketChangeSeverity=Modificare severitate TicketAddMessage=Adaugă un mesaj AddMessage=Adaugă un mesaj MessageSuccessfullyAdded=Tichet adăugat TicketMessageSuccessfullyAdded=Mesaj adăugat cu succes -TicketMessagesList=Lista de mesaje +TicketMessagesList=Listă de mesaje NoMsgForThisTicket=Niciun mesaj pentru acest tichet Properties=Clasificare LatestNewTickets=Ultimele %s cele mai noi tichete (necitite) @@ -182,99 +184,99 @@ TicketSeverity=Gravitate ShowTicket=Vedeți tichetul RelatedTickets=Tichete conexe TicketAddIntervention=Crează intervenţie -CloseTicket=Închideți tichetul -CloseATicket=Închideți un tichet +CloseTicket=Închide tichet +CloseATicket=Închide un tichet ConfirmCloseAticket=Confirmați închiderea tichetului -ConfirmDeleteTicket=Va rog confirmați ștergerea tichetului -TicketDeletedSuccess=Tichet șters cu succes +ConfirmDeleteTicket=Confirmați ștergerea tichetului +TicketDeletedSuccess=Tichet a fost șters cu succes TicketMarkedAsClosed=Tichet marcat ca închis TicketDurationAuto=Durata calculată -TicketDurationAutoInfos=Durata calculată automat de la intervenția asociată +TicketDurationAutoInfos=Durata calculată automat din intervenția asociată TicketUpdated=Tichetul a fost actualizat -SendMessageByEmail=Trimiteți un mesaj prin email +SendMessageByEmail=Trimite un mesaj pe email TicketNewMessage=Mesaj nou -ErrorMailRecipientIsEmptyForSendTicketMessage=Destinatarul este gol. Nu trimiteți email -TicketGoIntoContactTab=Accesați fila "Persoane de contact" pentru a le selecta +ErrorMailRecipientIsEmptyForSendTicketMessage=Destinatarul este gol. Nu se trimite email +TicketGoIntoContactTab=Accesează fila "Contacte" pentru a le selecta TicketMessageMailIntro=Introducere TicketMessageMailIntroHelp=Acest text este adăugat numai la începutul emailului și nu va fi salvat. TicketMessageMailIntroLabelAdmin=Introducere în mesaj când trimiteți un email -TicketMessageMailIntroText=Bună ziua, <br> Un nou răspuns a fost trimis pe un tichet pe care îl contactați. Iată mesajul: <br> +TicketMessageMailIntroText=Salut, <br> Un nou răspuns a fost trimis pe tichetul pe care l-ai deschis. Iată mesajul: <br> TicketMessageMailIntroHelpAdmin=Acest text va fi inserat înaintea textului de răspuns la tichet. TicketMessageMailSignature=Semnătură TicketMessageMailSignatureHelp=Acest text este adăugat numai la sfârșitul emailului și nu va fi salvat. -TicketMessageMailSignatureText=<p>Cu stimă, </p> <p> - </p> +TicketMessageMailSignatureText=<p>Cu stimă, </p> <p>--</p> TicketMessageMailSignatureLabelAdmin=Semnătura emailului de răspuns TicketMessageMailSignatureHelpAdmin=Acest text va fi inserat după mesajul de răspuns. -TicketMessageHelp=Numai acest text va fi salvat în lista de mesaje de pe cardul de tichete. +TicketMessageHelp=Numai acest text va fi salvat în lista de mesaje de pe fişa tichetului. TicketMessageSubstitutionReplacedByGenericValues=Variabilele de substituție sunt înlocuite cu valori generice. TimeElapsedSince=Timpul trecut de atunci TicketTimeToRead=Timpul trecut înainte de citire -TicketContacts=Tichet de contact +TicketContacts=Contacte tichet TicketDocumentsLinked=Documente legate de tichet ConfirmReOpenTicket=Confirmați redeschiderea acestui tichet? TicketMessageMailIntroAutoNewPublicMessage=Un nou mesaj a fost postat pe tichet cu subiectul %s: TicketAssignedToYou=Tichet atribuit -TicketAssignedEmailBody=Ați fost atribuit tichetului # %s de către %s +TicketAssignedEmailBody=Ai fost atribuit tichetului # %s de către %s MarkMessageAsPrivate=Marcați mesajul ca privat TicketMessagePrivateHelp=Acest mesaj nu va fi afișat utilizatorilor externi TicketEmailOriginIssuer=Emitent la originea tichetelor InitialMessage=Mesaj inițial -LinkToAContract=Legătura la un contract +LinkToAContract=Asociere la un contract TicketPleaseSelectAContract=Selectați un contract UnableToCreateInterIfNoSocid=Nu se poate crea o intervenție atunci când nu este definit niciun terț TicketMailExchanges=Schimburi de corespondență -TicketInitialMessageModified=Mesajul inițial modificat -TicketMessageSuccesfullyUpdated=Mesaj actualizat cu succes +TicketInitialMessageModified=Mesajul inițial a fost modificat +TicketMessageSuccesfullyUpdated=Mesajul a fost actualizat cu succes TicketChangeStatus=Modifică starea TicketConfirmChangeStatus=Confirmați modificarea stării: %s? -TicketLogStatusChanged=Starea modificată: %s la %s -TicketNotNotifyTiersAtCreate=Nu notificați compania la crearea +TicketLogStatusChanged=Stare modificată: din %s la %s +TicketNotNotifyTiersAtCreate=Nu notificați compania la creare Unread=Necitită TicketNotCreatedFromPublicInterface=Indisponibil. Tichetul nu a fost creat din interfaţa publică. -ErrorTicketRefRequired=Denumirea de referință al tichetului este necesară +ErrorTicketRefRequired=Referința de tichet este necesară # # Logs # -TicketLogMesgReadBy=Tichetul %s citit de %s -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=Tichetul %s re-deschis +TicketLogMesgReadBy=Tichetul %s a fost citit de %s +NoLogForThisTicket=Nu există jurnal pentru acest tichet încă +TicketLogAssignedTo=Tichetul %s a fost atribuit lui %s +TicketLogPropertyChanged=Tichet %s modificat: clasificat din %s la %s +TicketLogClosedBy=Tichet %s a fost închis de %s +TicketLogReopen=Tichetul %s a fost re-deschis # # Public pages # -TicketSystem=Sistemul de tichete -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. +TicketSystem=Sistem de tichete +ShowListTicketWithTrackId=Afișează lista de tichete din ID-ul de urmărire +ShowTicketWithTrackId=Afișează tichetul din ID-ul de urmărire +TicketPublicDesc=Puteți crea un tichet de asistență sau să verificaţi unul existent pe baza ID-ului. YourTicketSuccessfullySaved=Tichetul a fost salvat cu succes! -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. +MesgInfosPublicTicketCreatedWithTrackId=Un nou tichet a fost creat cu ID-ul %s şi Ref %s. +PleaseRememberThisId=Păstrați numărul de urmărire pe care vi l-am putea solicita ulterior. 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. -TicketNewEmailBodyInfosTicket=Informații pentru monitorizarea tichetului +TicketNewEmailBody=Acesta este un email automat de confirmare a faptului că ați înregistrat un tichet nou. +TicketNewEmailBodyCustomer=Acesta este un email automat de confirmare că un nou tichet a fost creat în contul tău. +TicketNewEmailBodyInfosTicket=Informații privind monitorizarea tichetului TicketNewEmailBodyInfosTrackId=Numărul de urmărire a tichetului: %s TicketNewEmailBodyInfosTrackUrl=Puteți vedea evoluția tichetului făcând clic pe linkul de mai sus. -TicketNewEmailBodyInfosTrackUrlCustomer=Puteți vedea progresul tichetului în interfața specifică făcând clic pe următorul link -TicketEmailPleaseDoNotReplyToThisEmail=Nu răspundeți direct la acest email! Utilizați linkul pentru a răspunde la interfață. -TicketPublicInfoCreateTicket=Acest formular vă permite să înregistrați un tichet de asistență în sistemul nostru de management. +TicketNewEmailBodyInfosTrackUrlCustomer=Puteți vedea statusul tichetului în interfața specifică făcând clic pe următorul link +TicketEmailPleaseDoNotReplyToThisEmail=Nu răspundeți direct la acest email! Utilizați linkul pentru a răspunde în interfață. +TicketPublicInfoCreateTicket=Acest formular vă permite să înregistrați un tichet de asistență în sistemul nostru de management al lucrărilor. 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=ID tracking public -OneOfTicketTrackId=Unul dintre ID-urile tale de tracking +TicketTrackId=ID urmărire public +OneOfTicketTrackId=Unul dintre ID-urile tale de urmărire 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 +ViewTicket=Afişare tichet +ViewMyTicketList=Afişează lista mea de tichete ErrorEmailMustExistToCreateTicket=Eroare: adresa de email nu a fost găsită în baza noastră de date TicketNewEmailSubjectAdmin=Un nou tichet creat - Ref %s(ID tichet public %s) TicketNewEmailBodyAdmin=<p> Tichetul tocmai a fost creat cu ID # %s, vezi informațiile: </p> -SeeThisTicketIntomanagementInterface=Vedeți tichetul în interfața de gestionare +SeeThisTicketIntomanagementInterface=Vezi tichetul în interfața de management TicketPublicInterfaceForbidden=Interfața publică pentru tichete nu a fost activată ErrorEmailOrTrackingInvalid=Valoare incorectă pentru ID tracking sau email OldUser=Utilizator anterior @@ -282,12 +284,12 @@ NewUser=Utilizator nou NumberOfTicketsByMonth=Număr de tichete pe lună NbOfTickets=Număr de tichete # notifications -TicketNotificationEmailSubject=Tichet %s actualizat +TicketNotificationEmailSubject=Tichetul %s a fost actualizat TicketNotificationEmailBody=Acesta este un mesaj automat care vă anunță că tichetul%s tocmai a fost actualizat -TicketNotificationRecipient=Notificare destinatar -TicketNotificationLogMessage=Mesaj de mesaj -TicketNotificationEmailBodyInfosTrackUrlinternal=Vedeți tichetul în interfață -TicketNotificationNumberEmailSent=Emailul de notificare a fost trimis: %s +TicketNotificationRecipient=Destinatar notificare +TicketNotificationLogMessage=Jurnal notificare tichet +TicketNotificationEmailBodyInfosTrackUrlinternal=Afişează tichetul în interfață +TicketNotificationNumberEmailSent=Email-ul de notificare a fost trimis: %s ActionsOnTicket=Evenimente pe tichet @@ -295,10 +297,20 @@ ActionsOnTicket=Evenimente pe tichet # Boxes # BoxLastTicket=Ultimele tichete create -BoxLastTicketDescription= Ultimele %s tichete create +BoxLastTicketDescription=Ultimele %s tichete create BoxLastTicketContent= BoxLastTicketNoRecordedTickets=Niciun tichet recent necitit BoxLastModifiedTicket=Ultimele tichete modificate -BoxLastModifiedTicketDescription=Ultimele %s bilete modificate +BoxLastModifiedTicketDescription=Ultimele %s tichet modificate BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Nu există tichete modificate recent +BoxTicketType=Număr tichete deschise după tip +BoxTicketSeverity=Număr tichete deschise după severitate +BoxNoTicketSeverity=Nr. tichete deschise +BoxTicketLastXDays=Numărul de tichete noi după zile din ultimele %s zile +BoxTicketLastXDayswidget = Numărul de tichete noi pe zile în ultimele X zile +BoxNoTicketLastXDays=Niciun tichet nou în ultimele %s zile +BoxNumberOfTicketByDay=Număr tichete noi după zi +BoxNewTicketVSClose=Numărul de tichete noi de astăzi comparativ cu tichetele închise de astăzi +TicketCreatedToday=Tichet creat azi +TicketClosedToday=Tichet închis azi diff --git a/htdocs/langs/ro_RO/trips.lang b/htdocs/langs/ro_RO/trips.lang index 92727210426..b0024168f4b 100644 --- a/htdocs/langs/ro_RO/trips.lang +++ b/htdocs/langs/ro_RO/trips.lang @@ -1,43 +1,43 @@ # Dolibarr language file - Source file is en_US - trips -ShowExpenseReport=Arată raportul cheltuielilor -Trips=Rapoarte Cheltuieli -TripsAndExpenses=Rapoarte Cheltuieli -TripsAndExpensesStatistics=Statistici Rapoarte Cheltuieli -TripCard=Fişa Raport cheltuieli -AddTrip=Creare Raport cheltuieli +ShowExpenseReport=Arată raportul de cheltuieli +Trips=Rapoarte de cheltuieli +TripsAndExpenses=Rapoarte de cheltuieli +TripsAndExpensesStatistics=Statistici Rapoarte de cheltuieli +TripCard=Fişă Raport de cheltuieli +AddTrip=Creare raport de cheltuieli ListOfTrips=Listă rapoarte de cheltuieli -ListOfFees=Lista note cheltuieli -TypeFees=Tipuri taxe -ShowTrip=Arată raportul cheltuielilor +ListOfFees=Listă taxe şi onorarii +TypeFees=Tipuri taxe şi onorarii +ShowTrip=Arată raport de cheltuieli NewTrip=Raport de cheltuieli nou -LastExpenseReports=Ultimele%s rapoarte de cheltuieli +LastExpenseReports=Ultimele %s rapoarte de cheltuieli AllExpenseReports=Toate rapoartele de cheltuieli CompanyVisited=Compania/instituția vizitată -FeesKilometersOrAmout=Valoarea sau kilometri +FeesKilometersOrAmout=Valoare 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 cheltuieli -ClassifyRefunded=Clasează 'Rambursată' +ListToApprove=În așteptarea aprobării +ExpensesArea=Rapoarte de 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. <br> - Utilizator: %s <br> - Perioada: %s <br> 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. <br> %s, ați refuzat să aprobați raportul de cheltuieli din acest motiv: %s. <br> A fost propusă o nouă versiune și vă așteaptă aprobarea. <br> - Utilizator: %s <br> - Perioada: %s <br> Faceți clic aici pentru validare: %s +ExpenseReportWaitingForReApproval=Un raport de cheltuieli a fost trimis pentru re-aprobare +ExpenseReportWaitingForReApprovalMessage=Un raport de cheltuieli a fost trimis și așteaptă o nouă aprobare. <br> %s, ați refuzat să aprobați raportul de cheltuieli din acest motiv: %s. <br> A fost propusă o nouă versiune și așteaptă aprobarea. <br> - Utilizator: %s <br> - Perioada: %s <br> Faceți clic aici pentru validare: %s ExpenseReportApproved=A fost aprobat un raport de cheltuieli ExpenseReportApprovedMessage=Raportul de cheltuieli %s a fost aprobat. <br> - Utilizator: %s <br> - Aprobat de: %s <br> Faceți clic aici pentru a afișa raportul de cheltuieli: %s -ExpenseReportRefused=Un raport de cheltuieli a fost refuzat -ExpenseReportRefusedMessage=Raportul de cheltuieli %s a fost refuzat. <br> - Utilizator: %s <br> - Refuzat de: %s <br> - Motiv pentru refuz: %s <br> Click aici pentru a vedea raportul de cheltuieli: %s +ExpenseReportRefused=Un raport de cheltuieli a fost respins +ExpenseReportRefusedMessage=Raportul de cheltuieli %s a fost respins. <br> - Utilizator: %s <br> - Respins de: %s <br> - Motiv refuz: %s <br> Click aici pentru a vedea raportul de cheltuieli: %s ExpenseReportCanceled=Un raport de cheltuieli a fost anulat ExpenseReportCanceledMessage=Raportul de cheltuieli %s a fost anulat. <br> - Utilizator: %s <br> - Anulat de: %s <br> - Motivul pentru anulare: %s <br> Click aici pentru a afișa raportul de cheltuieli: %s ExpenseReportPaid=Un raport de cheltuieli a fost plătit ExpenseReportPaidMessage=Raportul de cheltuieli %s a fost plătit. <br> - Utilizator: %s <br> - Plătit de: %s <br> Faceți clic aici pentru a afișa raportul de cheltuieli: %s -TripId=ID Raport de cheltuieli -AnyOtherInThisListCanValidate=Persoana care trebuie informată pentru validare. +TripId=ID raport de cheltuieli +AnyOtherInThisListCanValidate=Persoana care trebuie informată la validarea pentru validarea cererii. TripSociete=Informații companie -TripNDF=Raport de cheltuieli privind informațiile +TripNDF=Informaţii raport de cheltuieli PDFStandardExpenseReports=Șablon standard pentru generarea unui document PDF pentru raportul de cheltuieli -ExpenseReportLine=Line raport de cheltuieli +ExpenseReportLine=Linie raport de cheltuieli TF_OTHER=Altele TF_TRIP=Transport TF_LUNCH=Prânz @@ -50,102 +50,102 @@ TF_ESSENCE=Combustibil TF_HOTEL=Hotel TF_TAXI=Taxi EX_KME=Cheltuieli de deplasare -EX_FUE=Variaţia costurilor cu combustibilul +EX_FUE=Combustibil - valoare actuală EX_HOT=Hotel -EX_PAR=Variaţia costurilor cu parcarea -EX_TOL=Variaţia costurilor cu vama -EX_TAX=Diverse taxe +EX_PAR=Parcare - valoare actuală +EX_TOL=Vamă - valoare actuală +EX_TAX=Taxe diverse EX_IND=Decontare abonament transport -EX_SUM=Întreținere -EX_SUO=Papetărie - rechizite +EX_SUM=Întreținere reparaţii +EX_SUO=Papetărie-rechizite EX_CAR=Închirieri mașini EX_DOC=Documentație 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_CAM=Întreţinere şi reparaţii - valoare estimată EX_EMM=Masă angajați EX_GUM=Masă oaspeți EX_BRE=Mic dejun -EX_FUE_VP=Valoarea actuală a combustibilului -EX_TOL_VP=Valoarea actuală a vămii -EX_PAR_VP=Valoarea actuală a parcării -EX_CAM_VP=Valoarea actuală a întreţinerii şi reparaţiilor +EX_FUE_VP=Combustibil - valoare estimată +EX_TOL_VP=Vamă - valoare estimată +EX_PAR_VP=Parcare - valoare estimată +EX_CAM_VP=Întreţinere şi reparaţii - valoare estimată DefaultCategoryCar=Modul implicit de transport -DefaultRangeNumber=Numărul intervalului implicit +DefaultRangeNumber=Număr interval implicit 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" +Error_EXPENSEREPORT_ADDON_NotDefined=Eroare, regula de numerotare a rapoartelor de cheltuieli nu a fost definită în configurarea modulului "Rapoarte 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 +AucuneLigne=Nu există încă nici un raport de cheltuieli declarat ModePaiement=Mod plată -VALIDATOR=Utilizator responsabil cu aprobarea +VALIDATOR=Responsabil cu aprobarea VALIDOR=Aprobat de AUTHOR=Înregistrat de -AUTHORPAIEMENT=Plătite de +AUTHORPAIEMENT=Plătit de REFUSEUR=Respins de CANCEL_USER=Șters de MOTIF_REFUS=Motiv MOTIF_CANCEL=Motiv DATE_REFUS=Dată respingere DATE_SAVE=Dată validare -DATE_CANCEL=Data anulare +DATE_CANCEL=Dată anulare DATE_PAIEMENT=Data plăţii BROUILLONNER=Redeschide ExpenseReportRef=Ref. raport de cheltuieli -ValidateAndSubmit=Validareaza și trimite pentru aprobare -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? +ValidateAndSubmit=Validează și trimite pentru aprobare +ValidatedWaitingApproval=Validat(în așteptarea aprobării) +NOT_AUTHOR=Tu nu esti autorul acestui raport de cheltuieli. Operaţiune anulată. +ConfirmRefuseTrip=Sigur doriți să respingeţi acest raport de cheltuieli? ValideTrip=Aprobă raport de cheltuieli ConfirmValideTrip=Sunteți sigur că doriți să aprobaţi acest 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"? +BrouillonnerTrip=Readuceţi raportul de cheltuieli înapoi la starea "Schiţă" +ConfirmBrouillonnerTrip=Sigur doriți să readuceţi raportul de cheltuieli la starea "Schiţă"? 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=Plată Raport cheltuieli -ExpenseReportsToApprove=Rapoartele de cheltuieli pentru aprobare -ExpenseReportsToPay=Rapoartele de cheltuieli pentru plată +ExpenseReportPayment=Plată raport de cheltuieli +ExpenseReportsToApprove=Rapoarte de cheltuieli de aprobat +ExpenseReportsToPay=Rapoarte de cheltuieli de plătit ConfirmCloneExpenseReport=Sigur doriți să clonați acest raport de cheltuieli? -ExpenseReportsIk=Indicele pretului /km din raportul de cheltuieli +ExpenseReportsIk=Configurare taxe de kilometraj ExpenseReportsRules=Regulile rapoartelor de cheltuieli -ExpenseReportIkDesc=Puteți modifica calculul cheltuielilor/km pe categorii și pe gama care au fost definite anterior. <b> d </b> este distanța în kilometri +ExpenseReportIkDesc=Puteți modifica calculul cheltuielilor/km pe categorii și pe gama care au fost definite anterior. <b>d</b> 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=Diferenţă expenseReportCoef=Coeficient -expenseReportTotalForFive=Exemplu cu <u> d </u> = 5 +expenseReportTotalForFive=Exemplu cu <u>d</u> = 5 expenseReportRangeFromTo=de la %d până la %d -expenseReportRangeMoreThan=mai mult decât %d +expenseReportRangeMoreThan=mai mult de %d expenseReportCoefUndefined=(valoarea nu este definită) expenseReportCatDisabled=Categorie dezactivată - vedeți dicționarul c_exp_tax_cat expenseReportRangeDisabled=Interval dezactivat - vedeți dicționarul c_exp_tax_range expenseReportPrintExample=offset + (d x coef) = %s -ExpenseReportApplyTo=Aplicaţi pentru +ExpenseReportApplyTo=Aplică la ExpenseReportDomain=Domeniu de aplicat ExpenseReportLimitOn=Limită la ExpenseReportDateStart=Dată început -ExpenseReportDateEnd=Data de sfârşit +ExpenseReportDateEnd=Dată de sfârşit ExpenseReportLimitAmount=Valoare limită ExpenseReportRestrictive=Restrictiv AllExpenseReport=Toate tipurile de rapoarte de cheltuieli OnExpense=Linie de cheltuieli -ExpenseReportRuleSave=Regula raportului de cheltuieli a fost salvată +ExpenseReportRuleSave=Regula de raport de cheltuieli a fost salvată ExpenseReportRuleErrorOnSave=Eroare: %s 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) byEX_YEA=pe an (limitare la %s) -byEX_EXP=de linie (limitare la %s) +byEX_EXP=pe linie (limitare la %s) ExpenseReportConstraintViolationWarning=Constrângere violare id [%s]: %s este superior lui %s %s nolimitbyEX_DAY=pe zi (fără limitare) nolimitbyEX_MON=pe lună (fără limitare) nolimitbyEX_YEA=pe an (fără limitare) -nolimitbyEX_EXP=prin linie (fără limitare) -CarCategory=Categorie de autovehicule -ExpenseRangeOffset=Suma compensării: %s +nolimitbyEX_EXP=pe linie (fără limitare) +CarCategory=Categorie vehicule +ExpenseRangeOffset=Sumă de compensat: %s RangeIk=Interval de kilometri 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 a2e0627163f..e908a92e7fc 100644 --- a/htdocs/langs/ro_RO/users.lang +++ b/htdocs/langs/ro_RO/users.lang @@ -5,11 +5,11 @@ GroupCard=Fişă grup Permission=Permisiune Permissions=Permisiuni EditPassword=Modificare parolă -SendNewPassword=Trimite o parolă nouă -SendNewPasswordLink=Trimiteți link de resetare parolă +SendNewPassword=Generează şi trimite o parolă nouă +SendNewPasswordLink=Trimite link de resetare parolă ReinitPassword=Generează o parolă nouă PasswordChangedTo=Parola schimbată la: %s -SubjectNewPassword=Noua dvs. parolă pentru %s +SubjectNewPassword=Noua ta parolă pentru %s GroupRights=Grup de permisiuni UserRights=Permisiuni utilizator UserGUISetup=Configurare afișare utilizator @@ -19,66 +19,69 @@ DeleteUser=Şterge DeleteAUser=Şterge un utilizator EnableAUser=Activează un utilizator DeleteGroup=Şterge -DeleteAGroup=Ştergeţi un grup -ConfirmDisableUser=Sigur doriți să dezactivați utilizatorul <b> %s </b>? -ConfirmDeleteUser=Sigur doriți să ștergeți utilizatorul <b> %s </b>? -ConfirmDeleteGroup=Sigur doriți să ștergeți grupul <b> %s </b>? -ConfirmEnableUser=Sigur doriți să activați utilizatorul <b> %s </b>? -ConfirmReinitPassword=Sigur doriți să generați o nouă parolă pentru utilizatorul <b> %s </b>? -ConfirmSendNewPassword=Sigur doriți să generați și să trimiteți o nouă parolă pentru utilizatorul <b> %s </b>? +DeleteAGroup=Şterge un grup +ConfirmDisableUser=Sigur doriți să dezactivați utilizatorul <b>%s</b>? +ConfirmDeleteUser=Sigur doriți să ștergeți utilizatorul <b>%s</b>? +ConfirmDeleteGroup=Sigur doriți să ștergeți grupul <b>%s</b>? +ConfirmEnableUser=Sigur doriți să activați utilizatorul <b>%s</b>? +ConfirmReinitPassword=Sigur doriți să generați o nouă parolă pentru utilizatorul <b>%s</b>? +ConfirmSendNewPassword=Sigur doriți să generați și să trimiteți o nouă parolă pentru utilizatorul <b>%s</b>? NewUser=Utilizator nou CreateUser=Creare utilizator -LoginNotDefined=Numele de login nu este definit. +LoginNotDefined=Numele de utilizator nu este definit. NameNotDefined=Numele nu este definit. ListOfUsers=Listă utilizatori SuperAdministrator=Super Administrator SuperAdministratorDesc=Administrator global, cu toate drepturile AdministratorDesc=Administrator DefaultRights=Permisiuni implicite -DefaultRightsDesc=Definiți aici permisiunile <u> implicite </u> care sunt acordate automat unui utilizator <u> nou </u> (pentru a modifica permisiunile pentru utilizatorii existenți, accesați cardul de utilizator). -DolibarrUsers=Utilizatori Dolibarr +DefaultRightsDesc=Definiți aici permisiunile <u>implicite</u> care sunt acordate automat unui utilizator <u>nou</u> (pentru a modifica permisiunile pentru utilizatorii existenți, accesați fişa utilizatorului). +DolibarrUsers=Utilizatori sistem LastName=Nume FirstName=Prenume ListOfGroups=Listă grupuri NewGroup=Grup nou CreateGroup=Creare grup RemoveFromGroup=Înlăturare din grup -PasswordChangedAndSentTo=Parola a fost schimbată şi trimisă <b>la %s.</b> -PasswordChangeRequest=Solicitare de modificarea parolei pentru <b> %s </b> -PasswordChangeRequestSent=Cerere pentru a schimba parola <b>pentru %s %s</b> la trimis. -ConfirmPasswordReset=Confirmați resetarea parolei +PasswordChangedAndSentTo=Parola a fost schimbată şi trimisă către <b>%s</b>. +PasswordChangeRequest=Solicitare de modificare a parolei pentru <b>%s</b> +PasswordChangeRequestSent=Cererea de schimbare a parolei pentru <b>%s</b> a fost trimisă către <b>%s</b>. +IfLoginExistPasswordRequestSent=Dacă acest nume de utilizator este valid, a fost trimis un email pentru resetarea parolei. +IfEmailExistPasswordRequestSent=Dacă această adresă de email este corectă, a fost trimis un email pentru resetarea parolei. +ConfirmPasswordReset=Confirmare resetare parolă MenuUsersAndGroups=Utilizatori & Grupuri -LastGroupsCreated=Ultimele %s grupuri create de +LastGroupsCreated=Ultimele %s grupuri create LastUsersCreated=Ultimii %s utilizatori creaţi 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 +ListOfUsersInGroup=Listă utilizatori în acest grup +ListOfGroupsForUser=Listă grupuri pentru acest utilizator +LinkToCompanyContact=Link către un terţ/contact 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 +LinkedToDolibarrUser=Asociază la utilizator +LinkedToDolibarrThirdParty=Asociază la un terţ din sistem +CreateDolibarrLogin=Creare utilizator +CreateDolibarrThirdParty=Creare terţ +LoginAccountDisableInDolibarr=Cont dezactivat în sistem. +UsePersonalValue=Utilizare setări personalizate +InternalUser=Utilizator intern +ExportDataset_user_1=Utilizatori și proprietățile acestora +DomainUser=Utilizator de domeniu %s 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=Un utilizator <b>intern</b> este un utilizator care face parte din compania / organizația dvs.<br> Un utilizator <b>extern</b> este un client, un furnizor sau altul (Crearea unui utilizator extern pentru un terț se poate face din înregistrarea de contact a unui terț).<br> <br>Î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. +CreateInternalUserDesc=Acest formular vă permite să creați un utilizator intern în compania/organizația ta. Pentru a crea un utilizator extern (client, furnizor etc.), utilizați butonul 'Creare utilizator sistem' de pe fişa de contact a terțului. +InternalExternalDesc=Un utilizator <b>intern</b> este un utilizator care face parte din compania/organizația ta sau este un utilizator partener în afara organizației tale. care ar putea avea nevoie să vadă mai multe date decât date legate de compania sa (sistemul de permisiuni va defini ce poate sau nu).<br>Un utilizator <b>extern</b> este un client, un furnizor sau altul care trebuie să vizualizeze DOAR datele referitoare la el însuși (Crearea unui utilizator extern pentru un terț se poate face din înregistrarea de contact a terțului). <br><br>În ambele cazuri , trebuie să acorzi permisiuni pentru funcțiile de care are nevoie utilizatorul. +PermissionInheritedFromAGroup=Permisiunea este acordată deoarece este 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 +UserWillBe=Utilizatorul creat va fi +UserWillBeInternalUser=Utilizatorul creat va fi un utilizator intern (pentru că nu este asociat unui terţ) +UserWillBeExternalUser=Utilizatorul creat va fi un utilizator extern (deoarece este asociat unui terţ) +IdPhoneCaller=Id apelant telefonic NewUserCreated=Utilizatorul %s a fost creat -NewUserPassword=Schimba parola pentru %s -NewPasswordValidated=Noua ta parolă a fost validată şi trebuie folosită de acum pentru a te loga. +NewUserPassword=Schimbă parola pentru %s +NewPasswordValidated=Noua ta parolă a fost validată şi trebuie folosită din acest moment pentru a te autentifica. EventUserModified=Utilizatorul %s a fost modificat UserDisabled=Utilizatorul %s a fost dezactivat UserEnabled=Utilizatorul %s a fost activat @@ -86,21 +89,21 @@ 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? +ConfirmCreateContact=Sigur doriți să creați un cont de acces în sistem pentru această persoană de contact? +ConfirmCreateLogin=Sigur doriți să creați un cont de acces în sistem pentru acest membru? ConfirmCreateThirdParty=Sigur doriți să creați un terţ pentru acest membru? -LoginToCreate=Nume login de creat +LoginToCreate=Nume de utilizator 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 +NbOfUsers=Nr. de utilizatori +NbOfPermissions=Nr. de permisiuni DontDowngradeSuperAdmin=Numai un superadmin poate declasa un superadmin HierarchicalResponsible=Supervizor HierarchicView=Vedere ierarhică -UseTypeFieldToChange=Foloseşte câmpul Tip pentru schimbare +UseTypeFieldToChange=Foloseşte câmpul Tip pentru a modifica OpenIDURL=URL OpenID -LoginUsingOpenID=Utilizați OpenID pentru login +LoginUsingOpenID=Utilizați OpenID pentru autentificare WeeklyHours=Ore lucrate(pe săptămână) ExpectedWorkedHours=Numărul estimat de ore lucrate săptămânal ColorUser=Culoare utilizator @@ -109,11 +112,13 @@ UserAccountancyCode=Cod contabil utilizator UserLogoff=Deconectare utilizator UserLogged=Utilizator autentificat DateOfEmployment=Data angajării -DateEmployment=Data începerii angajării +DateEmployment=Loc de muncă, ocupaţie +DateEmploymentstart=Data începerii angajării DateEmploymentEnd=Data încetării angajării +RangeOfLoginValidity=Intervalul temporal pentru care autentificarea în sistem este valabilă CantDisableYourself=Nu vă puteți dezactiva propria înregistrare de utilizator -ForceUserExpenseValidator=Forţează validarea raportului de cheltuieli -ForceUserHolidayValidator=Forţează validarea cererii de concediu +ForceUserExpenseValidator=Persoana care are dreptul de a valida raportul de cheltuieli +ForceUserHolidayValidator=Persoana care are dreptul de a valida cererea de concediu ValidatorIsSupervisorByDefault=În mod implicit, validatorul este supervizorul utilizatorului. Nu completaţi pentru a păstra acest comportament. UserPersonalEmail=Email personal UserPersonalMobile=Telefon mobil personal diff --git a/htdocs/langs/ro_RO/website.lang b/htdocs/langs/ro_RO/website.lang index f1ca739ae33..c5e4eb67f7a 100644 --- a/htdocs/langs/ro_RO/website.lang +++ b/htdocs/langs/ro_RO/website.lang @@ -1,110 +1,110 @@ # Dolibarr language file - Source file is en_US - website 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. +WebsiteSetupDesc=Creați aici site-urile pe care doriți să le utilizați. Apoi intrați în meniul Site-uri pentru a le edita. DeleteWebsite=Şterge website 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 -WEBSITE_ALIASALT=Nume / pseudonime alternative de pagini +WEBSITE_TYPE_CONTAINER=Tipul paginii/containerului +WEBSITE_PAGE_EXAMPLE=Pagină web de utilizat ca exemplu +WEBSITE_PAGENAME=Nume/alias pagină +WEBSITE_ALIASALT=Nume alternative/pseudonime pagină WEBSITE_ALIASALTDesc=Utilizați aici o listă cu alte nume / aliasuri, astfel încât pagina poate fi accesată și folosind alte nume / aliasuri (de exemplu vechiul nume după redenumirea aliasului pentru a functionalbacklinkul pe vechiul link/nume). Sintaxa este: <br> alternativename1, alternativename2, ... WEBSITE_CSS_URL=Adresa URL a fișierului CSS extern -WEBSITE_CSS_INLINE=Conținutul fișierelor CSS (comun pentru toate paginile) +WEBSITE_CSS_INLINE=Conținutul fișierului CSS (comun pentru toate paginile) 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_HTML_HEADER=Adăugare î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_HTACCESS=Fișier .htaccess site 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. <br> 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 "<strong> %s </strong>" 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 +EditTheWebSiteForACommonHeader=Notă: dacă doriți să definiți un antet personalizat pentru toate paginile, modificați antetul la nivelul site-ului şi nu la nivelul paginii/containerului. +MediaFiles=Librărie media EditCss=Editare proprietăţi website -EditMenu=Edit meniu -EditMedias=Editați mediile +EditMenu=Editare meniu +EditMedias=Editare media EditPageMeta=Editare proprietăţi pagină/container -EditInLine=Editați inline -AddWebsite=Adaugă pagina web -Webpage=Pagina web / container -AddPage=Adăugați o pagină / un container +EditInLine=Editare inline +AddWebsite=Adaugă site web +Webpage=Pagină/container web +AddPage=Adaugă o pagină/container PageContainer=Pagina -PreviewOfSiteNotYetAvailable=Previzualizarea site-ului dvs. web <strong> %s </strong> nu este încă disponibil. Mai întâi trebuie să '<strong> Importați un șablon complet de site-uri web </strong>' sau doar '<strong> Adăugați o pagină / container </strong>'. -RequestedPageHasNoContentYet=Pagina solicitată cu id %s nu are încă conținut, sau fișierul cache cache.php a fost eliminat. Editați conținutul paginii pentru a rezolva această problemă. -SiteDeleted=Site-ul Web "%s" a fost șters -PageContent=Pagina/recipient -PageDeleted=Pagina / recipientul '%s' site-ului %s a fost șters -PageAdded=Pagina / recipient '%s' adăugată -ViewSiteInNewTab=Vizualizați site-ul în fila nouă -ViewPageInNewTab=Afișați pagina în fila nouă -SetAsHomePage=Seteaza ca pagina Home -RealURL=Real URL +PreviewOfSiteNotYetAvailable=Previzualizarea site-ului dvs. web <strong> %s </strong> nu este încă disponibilă. Mai întâi trebuie să '<strong> Importați un șablon complet de site </strong>' sau doar să '<strong>Adăugați o pagină/container </strong>'. +RequestedPageHasNoContentYet=Pagina solicitată cu id %s nu are încă conținut, sau fișierul cache .tpl.php a fost eliminat. Editați conținutul paginii pentru a rezolva această problemă. +SiteDeleted=Site-ul web "%s" a fost șters +PageContent=Pagină/Container +PageDeleted=Pagina/containerul '%s' site-ului %s a fost șters +PageAdded=Pagina/containerul '%s' a fost adăugat +ViewSiteInNewTab=Vizualizare site într-o filă nouă +ViewPageInNewTab=Afișare pagină în filă nouă +SetAsHomePage=Setează ca pagină Home +RealURL=URL real ViewWebsiteInProduction=Vizualizați site-ul web utilizând URL-urile de home SetHereVirtualHost=<u>Utilizați cu Apache/NGinx/...</u><br> Creați pe serverul dvs. web (Apache, Nginx, ...) un vhost dedicat cu PHP activat și un director Root activat pentru<br><strong>%s</strong> ExampleToUseInApacheVirtualHostConfig=Exemplu configuraţie utilizabilă vhost Apache: -YouCanAlsoTestWithPHPS=<u> Utilizarea cu serverul încorporat PHP </u> <br> În mediul de dezvoltare, puteți prefera să testați site-ul cu serverul web încorporat PHP (PHP 5.5 necesar) executând <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> +YouCanAlsoTestWithPHPS=<u> Utilizare cu serverul PHP încorporat</u> <br> În mediul de dezvoltare, vei prefera să testezi site-ul cu serverul web PHP încorporat (PHP 5.5 necesar) executând <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Rulaţi website-ul dvs. la un alt furnizor de găzduire Dolibarr</u><br> 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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a>  -CheckVirtualHostPerms=Verificați, de asemenea, că gazda virtuală are permisiunea <strong> %s </strong> pe fișiere în <br> <strong> %s </strong> -ReadPerm=Citit -WritePerm=Scrie -TestDeployOnWeb=Testați/implementați pe web -PreviewSiteServedByWebServer=<u>Previzualizați %s într-o filă nouă. </u> <br> <br> %s va fi deservit de un server web extern (cum ar fi Apache, Nginx, IIS). Trebuie să instalați și să configurați acest server înainte să indicați directorul: <br> <strong> %s </strong> <br> URL deservit de server extern: <br> <strong> %s </strong> -PreviewSiteServedByDolibarr=<u> Previzualizați %s într-o filă nouă. </u> <br> <br> %s va fi deservit de serverul Dolibarr, deci nu are nevoie de nici un server web suplimentar (cum ar fi Apache, Nginx, IIS) care să fie instalat. <br> Inconvenientul este că adresa URL a paginilor nu este ușor de utilizat și începe cu calea Dolibarr. <br> URL deservită de Dolibarr: <br> <strong> %s </strong> <br> <br> Pentru a utiliza propriul server de web extern pentru a servi acestui site web, de a crea o gazdă virtuală de pe serverul de web acel punct de pe directorul <br> <strong> %s </strong> <br> apoi introduceți numele acestui server virtual și faceți clic pe celălalt buton de previzualizare. -VirtualHostUrlNotDefined=URL-ul gazdei virtuale deservite de serverul web extern nu este definit -NoPageYet=Nici o pagină +CheckVirtualHostPerms=Verificați, de asemenea, dacă utilizatorul gazdă virtuală (de exemplu, www-data) are permisiuni <strong>%s</strong> pentru fișiere în <br><strong>%s</strong> +ReadPerm=Citire +WritePerm=Scriere +TestDeployOnWeb=Testare/implementare pe web +PreviewSiteServedByWebServer=<u>Previzualizați %s într-o filă nouă. </u> <br> <br> %s va fi deservit de un server web extern (cum ar fi Apache, Nginx, IIS). Trebuie să instalați și să configurați acest server înainte să indicați directorul: <br> <strong> %s </strong> <br> URL server extern: <br> <strong> %s </strong> +PreviewSiteServedByDolibarr=<u>Previzualizare %s într-o filă nouă. </u><br><br> Acest %s va fi servit de serverul Dolibarr, astfel încât să nu fie nevoie de niciun server web suplimentar (cum ar fi Apache, Nginx, IIS) pentru a fi instalat.<br> Inconvenientul este că adresele URL ale paginilor nu sunt ușor de utilizat și începeți cu calea Dolibarr.<br>URL dvs. servit de Dolibarr:<br><strong>%s</strong><br><br> Pentru a utiliza propriul server web extern pentru a servi acest site web, creați virtualhost pe serverul dvs. web care indică directorul <br><strong>%s</strong><br>, apoi introduceți numele acestui virtualhost în proprietățile acestui site și faceți clic pe pe linkul "Testare/Impementare pe web". +VirtualHostUrlNotDefined=URL virtualhost server web extern nu este definit +NoPageYet=Nicio pagină încă 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 +SyntaxHelp=Ajutor şi sfaturi pentru sintaxa specifică YouCanEditHtmlSourceckeditor=Puteți edita codul sursă HTML folosind butonul "Sursă" din editor. YouCanEditHtmlSource=<br><span class="fa fa-bug"></span>Puteți include codul PHP în această sursă folosind etichete<strong>&lt;?php?&gt;</strong>. Sunt disponibile următoarele variabile globale: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs. <br><br><span class="fa fa-bug"></span>Puteți include, de asemenea, conținutul unei alte Pagini/Container cu următoarea sintaxă: <br><strong>&lt;?php includeContainer ('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> 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): <br><strong>&lt;?php redirectToContainer ('alias_of_container_to_redirect_to'); ?&gt; </strong><br><br><span class="fa fa-link"></span>Pentru a adăuga o legătură la o altă pagină, utilizați sintaxa: <br><strong>&lt;a href ="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt; </strong><br><br><span class="fa fa-download"></span>Pentru a include un <strong>link de descărcare</strong> fișier stocat în <strong>directorul documentelor</strong>, utilizați wrapper-ul <strong>document.php</strong>: <br>Exemplu, pentru un fișier din documente/ECM (trebuie să fie înregistrat), sintaxa este:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br> Pentru un fișier din documente/media (director deschis pentru acces public), sintaxa este:<br><strong>&lt;a href ="/document.php?modulepart= medias&file=[relative_dir/]indicafilename.ext"&gt;</strong><br> Pentru un fișier partajat cu o legătură de partajare (acces deschis folosind cheia hash de partajare a fișierului), sintaxa este: <br><strong>&lt;a href="/ document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> Pentru a include o <strong>imagine</strong> stocată în <strong>directorul de documente</strong>, utilizați wrapper-ul <strong>viewimage.php</strong>: <br>Exemplu, pentru o imagine din documente/media (director deschis pentru acces public), sintaxa este: <br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br> #YouCanEditHtmlSource2=<br><span class="fa fa-picture-o"></span> To include a <strong>image</strong> shared publicaly, use the <strong>viewimage.php</strong> wrapper:<br>Example with a shared key 123456789, syntax is:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> YouCanEditHtmlSource2=Pentru o imagine partajată cu un link de partajare (acces deschis folosind cheia de distribuire a fișierului), sintaxa este:<br><strong> &lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> YouCanEditHtmlSourceMore=<br>Mai multe exemple de cod HTML sau dinamic sunt disponibile în<a href="%s" target="_blank"> documentația wiki</a><br>. -ClonePage=Clona pagina/container -CloneSite=Clonează site-ul +ClonePage=Clonare pagină/container +CloneSite=Clonare site SiteAdded=Site adăugat -ConfirmClonePage=Introduceți codul/pseudonimul paginii noi și dacă este o traducere a paginii clonate. +ConfirmClonePage=Introduceți codul/aliasul paginii noi și dacă este o traducere a paginii clonate. PageIsANewTranslation=Noua pagină este o traducere a paginii curente? LanguageMustNotBeSameThanClonedPage=Clonați o pagină ca o traducere. Limba paginii noi trebuie să fie diferită de limba paginii sursă. ParentPageId=ID-ul paginii părinte -WebsiteId=ID-ul site-ului -CreateByFetchingExternalPage=Creați pagina/container prin preluarea paginii de la adresa URL externă ... -OrEnterPageInfoManually=Sau să creați o pagină de la zero sau dintr-un șablon de pagină ... -FetchAndCreate=Aduceți și creați -ExportSite=Exportați site-ul +WebsiteId=ID site +CreateByFetchingExternalPage=Creare pagină/container prin preluarea paginii de la adresa URL externă... +OrEnterPageInfoManually=Sau creați o pagină de la zero, sau dintr-un șablon de pagină... +FetchAndCreate=Adu și crează +ExportSite=Export site ImportSite=Importați șablonul de site web -IDOfPage=ID paginii -Banner=Afis -BlogPost=Postare pe blog -WebsiteAccount=Contul site-ului -WebsiteAccounts=Conturi de site -AddWebsiteAccount=Creați un cont de site web +IDOfPage=ID pagină +Banner=Afiş banner +BlogPost=Postare blog +WebsiteAccount=Cont site +WebsiteAccounts=Conturi site +AddWebsiteAccount=Creare cont site web BackToListForThirdParty=Înapoi la lista terţilor -DisableSiteFirst=Dezactivați mai întâi site-ul web +DisableSiteFirst=Dezactivează mai întâi site-ul web MyContainerTitle=Titlul site-ului meu web 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ț +WEBSITE_USE_WEBSITE_ACCOUNTS=Activare tabel cont site web +WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Activează tabelul de stocare conturile site-uri web (nume de autentificare/parolă) pentru fiecare site/terț YouMustDefineTheHomePage=Mai întâi trebuie să definiți pagina de Home implicită 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. <br>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 +OnlyEditionOfSourceForGrabbedContent=Numai editarea 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 WebsiteRootOfImages=Directorul rădăcină pentru imaginile de pe site SubdirOfPage=Subdirector dedicat paginii -AliasPageAlreadyExists=Pagina Alias <strong> %s </strong> există deja +AliasPageAlreadyExists=Pagina alias <strong>%s</strong> există deja CorporateHomePage=Pagina de Home a companiei -EmptyPage=Pagina goală +EmptyPage=Pagină goală ExternalURLMustStartWithHttp=Adresa URL externă trebuie să înceapă cu http:// sau https:// ZipOfWebsitePackageToImport=Încărcați fișierul Zip cu pachetul șablon website ZipOfWebsitePackageToLoad=sau Alegeți un pachet șablon website încorporat disponibil ShowSubcontainers=Afişare 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. +ThisPageIsTranslationOf=Această pagină/container este o traducere a +ThisPageHasTranslationPages=Această pagină/container are traducere +NoWebSiteCreateOneFirst=Niciun site nu a fost creat încă. Creați unul mai întâi. GoTo=Mergi la DynamicPHPCodeContainsAForbiddenInstruction=Adăugați cod PHP dinamic care conține instrucțiunea PHP '<strong>%s</strong>' 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. @@ -116,13 +116,13 @@ 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: <br><br>#mycssselector, input.myclass: hover {...}<br>trebuie să fie <br> .bodywebsite #mycssselector, .bodywebsite input.myclass: hover {...} <br><br>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 +Dynamiccontent=Exemplu de pagină cu conținut dinamic ImportSite=Importați șablonul de site web 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 +TranslationLinks=Link-uri traducere YouTryToAccessToAFileThatIsNotAWebsitePage=Încercați să accesați o pagină care nu este disponibilă <br>(ref =%s, type =%s, status =%s) UseTextBetween5And70Chars=Pentru optimizare SEO, utilizați un text între 5 și 70 de caractere MainLanguage=Limba principală @@ -132,8 +132,16 @@ 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=Puteți obține un flux RSS al celor mai recente articole cu tipul 'blogpost' folosind această adresă URL +RSSFeedDesc=Puteți obține un flux RSS al celor mai recente articole de tipul 'blogpost' folosind această adresă URL PagesRegenerated=%s pagină(i) /container(e) regenerate RegenerateWebsiteContent=Regenerați fișierele cache ale site-ului web AllowedInFrames=Permis în Frame-uri DefineListOfAltLanguagesInWebsiteProperties=Definiți lista tuturor limbilor disponibile în proprietățile site-ului web. +GenerateSitemaps=Generează fişierul sitemap pentru website +ConfirmGenerateSitemaps=Dacă confirmi, vei şterge fişierul sitemap existent... +ConfirmSitemapsCreation=Confirmare generare sitemap +SitemapGenerated=Sitemap generat +ImportFavicon=Favicon +ErrorFaviconType=Favicon-ul trebuie să fie png +ErrorFaviconSize=Favicon-ul trebuie să fie de dimensiunea 32x32 +FaviconTooltip=Încarcă o imagine care este png de 32x32 diff --git a/htdocs/langs/ro_RO/zapier.lang b/htdocs/langs/ro_RO/zapier.lang index b57810cb893..a5a62efa301 100644 --- a/htdocs/langs/ro_RO/zapier.lang +++ b/htdocs/langs/ro_RO/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier pentru Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Modul Zapier pentru Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Configurare modul Zapier pentru Dolibarr -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Configurare modul Zapier pentru Dolibarr +ZapierDescription=Interfaţare cu Zapier +ZapierAbout=Despre modulul Zapier +ZapierSetupPage=Nu este nevoie de o configurare pe partea Dolibarr pentru a utiliza Zapier. Cu toate acestea, trebuie să generezi și să publici un pachet pe zapier pentru a putea utiliza Zapier cu Dolibarr. Consultă documentația de pe <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">această pagină wiki</a>. diff --git a/htdocs/langs/ru_RU/accountancy.lang b/htdocs/langs/ru_RU/accountancy.lang index 2b44d84c585..626f22f3a36 100644 --- a/htdocs/langs/ru_RU/accountancy.lang +++ b/htdocs/langs/ru_RU/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Привязка @@ -209,7 +209,7 @@ Codejournal=Журнал JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Бухгалтерские записи +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Дата экспорта WarningReportNotReliable=Внимание, этот отчет не основан на Гроссбухе, поэтому не содержит транзакции, измененные вручную в Гроссбухе. Если журналирование актуально, бухгалтерский учет будет более точным. ExpenseReportJournal=Журнал отчетов о затратах InventoryJournal=Журнал инвентарного учета + +NAccounts=%s accounts diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 621f545e086..8ec9e3b6d0f 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Удалить блокировку подключений YourSession=Ваша сессия Sessions=Пользовательские сессии WebUserGroup=Пользователь / группа Web-сервера +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Кажется, ваша конфигурация PHP не позволяет отображать активные сеансы. Каталог, используемый для сохранения сеансов ( <b>%s</b> ), может быть защищен (например, разрешениями ОС или директивой PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Примечание: "Да" влияет только тогд RemoveLock=Удалите/переименуйте файл <b>%s</b>, если он существует, чтобы разрешить использование инструмента обновления/установки. RestoreLock=Восстановите файл <b>%s</b> с разрешением только для чтение, чтобы отключить дальнейшее использование инструмента обновления/установки. SecuritySetup=Настройка безопасности +PHPSetup=PHP setup SecurityFilesDesc=Определите здесь параметры, связанные с безопасностью загрузки файлов. ErrorModuleRequirePHPVersion=Ошибка, этот модуль требует PHP версии %s или выше ErrorModuleRequireDolibarrVersion=Ошибка, этот модуль требует Dolibarr версии %s или выше @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Эта область обеспечивает функци Purge=Очистить PurgeAreaDesc=Эта страница позволяет вам удалить все файлы, созданные или сохраненные Dolibarr (временные файлы или все файлы в каталоге <b> %s</b> ). Использование этой функции обычно не требуется. Он предоставляется в качестве обходного пути для пользователей, чей Dolibarr размещен поставщиком, который не предлагает разрешения на удаление файлов, созданных веб-сервером. PurgeDeleteLogFile=Удаление файлов журналов, включая <b>%s</b> определенный для модуля Syslog (без риска потери данных) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Удалить все файлы в каталоге: <b>%s</b> . <br> Это удалит все сгенерированные документы, связанные с элементами (контрагенты, счета и т.д.), файлы, загруженные в модуль ECM, резервные копии базы данных и временные файлы. PurgeRunNow=Очистить сейчас @@ -232,6 +234,7 @@ BoxesAvailable=Доступные виджеты BoxesActivated=Включенные виджеты ActivateOn=Активировать ActiveOn=Активирован +ActivatableOn=Activatable on SourceFile=Исходный файл AvailableOnlyIfJavascriptAndAjaxNotDisabled=Доступно, только если JavaScript не отключен Required=Обязательный @@ -347,9 +350,10 @@ LastActivationAuthor=Последний активированный автор LastActivationIP=Последний активированный IP-адрес UpdateServerOffline=Сервер обновления недоступен WithCounter=Управление счетчиком -GenericMaskCodes=Вы можете ввести любую цифровую маску. В этой маске можно использовать следующие тэги:<br><b>{000000}</b> соответствующий номер будет увеличиваться для каждого %s. Введите столько нулей сколько соответствует длине счетчика. Счетчик будет заполнен слева нулями в таком количестве как указано в маске. <br><b>{000000+000}</b> как предыдущая, но со смещением на количество справа + знаки начиная с первого %s. <br><b>{000000@x}</b> то же что и предыдущее, но счетчик будет обнулен когда наступит месяц Х (x может быть от 1 до 12, or 0 для использования заранее или налоговый год определен в вашей конфигурации, или 99 для обнуления каждый месяц). Если эта опция используется и х равен 2 или более чем последовательность {yy}{mm} или {yyyy}{mm} это тоже необходимо. <br><b>{dd}</b> день (от 01 до 31).<br><b>{mm}</b> месяц (от 01 до 12).<br><b>{yy}</b>, <b>{yyyy}</b> или <b>{y}</b> год указывается 2, 4 или 1 цифрами. <br> -GenericMaskCodes2=<b>{cccc}</b> код клиента на n символов <br> <b> {cccc000} </b> код клиента на n символов с счетчиком, предназначенным для клиента. Этот счетчик, предназначенный для клиента, сбрасывается в то же время, что и глобальный счетчик. <br> <b> {tttt} </b> Код контрагента для n символов (см. Меню «Главная страница - Настройка - Словарь - Типы контрагентов») , Если вы добавите этот тег, счетчик будет отличаться для каждого типа контрагента. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Все остальные символы в маске останутся нетронутыми. <br>Пробелы не допускается. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<U> Пример для 99-го %s контрагента Компании с датой 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Пример контрагента созданного 2007-03-01:</u> <br> GenericMaskCodes4c=<u>Пример товара созданного 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Оставьте это поле пустым, чт ExtrafieldParamHelpselect=Список значений должен быть строками формата: ключ, значение (где ключ не может быть равен 0) <br><br> например: <br> 1, значение1 <br> 2, значение2 <br> code3, значение3 <br> ... <br><br> Чтобы иметь список в зависимости от другого списка дополнительных атрибутов: <br> 1, значение1|options_ <i>parent_list_code</i> : parent_key <br> 2, значение2|options_ <i>parent_list_code</i> : parent_key <br><br> Чтобы иметь список в зависимости от другого списка: <br> 1, значение1 | <i>parent_list_code</i> : parent_key <br> 2, значение2 | <i>parent_list_code</i> : parent_key ExtrafieldParamHelpcheckbox=Список значений должен быть строками с форматом: ключ, значение (где ключ не может быть равен 0) <br><br> например: <br> 1, значение1 <br> 2, значение2 <br> 3, значение3 <br> ... ExtrafieldParamHelpradio=Список значений должен быть строками с форматом: ключ, значение (где ключ не может быть равен 0) <br><br> например: <br> 1, значение1 <br> 2, значение2 <br> 3, значение3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Список значений поступает из таблицы <br> Синтаксис: table_name:label_field:id_field::filter <br> Пример: c_typent: libelle:id::filter <br><br> Фильтр может быть простым тестом (например, active = 1) для отображения только активного значения <br> Вы также можете использовать $ID$ в фильтре с текущим идентификатором текущего объекта. <br> Чтобы сделать SELECT в фильтре, используйте $SEL$ <br> если вы хотите фильтровать extrafield, используйте синтаксис extra.fieldcode = ... (где code field - это код extrafield) <br><br> Чтобы иметь список в зависимости от другого списка дополнительных атрибутов: <br> c_typent:libelle:id: options_ <i>parent_list_code</i>|parent_column: filter <br><br> Чтобы иметь список в зависимости от другого списка: <br> c_typent: ibelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Библиотека используемая для создания PDF-файлов @@ -541,6 +545,8 @@ Module40Name=Поставщики Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) Module42Name=Отчет об ошибках Module42Desc=Средства регистрации (file, syslog, ...). Такие журналы предназначены для технических/отладочных целей. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Редакторы Module49Desc=Управления редактором Module50Name=Продукция @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Подключение к службе GeoIP MaxMind для преобразования IP-адреса в название страны Module3200Name=Неограниченные архивы Module3200Desc=Включите неизменяемый журнал деловых событий. События архивируются в режиме реального времени. Журнал представляет собой доступную только для чтения таблицу связанных событий, которые можно экспортировать. Этот модуль может быть обязательным для некоторых стран. +Module3400Name=Социальные сети +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Управление персоналом Module4000Desc=Управление персоналом (управление отделом, контракты и чувства сотрудников) Module5000Name=Группы компаний Module5000Desc=Управление группами компаний -Module6000Name=Бизнес-Процесс -Module6000Desc=Управление рабочим процессом (автоматическое создание объекта и/или автоматическое изменение статуса) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Веб-сайты 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. Module20000Name=Управление запросами на отпуск @@ -805,7 +813,8 @@ PermissionAdvanced253=Создать / изменить внутренних / Permission254=Создать / изменить только внешних пользователей Permission255=Изменить пароли других пользователей Permission256=Удалить или отключить других пользователей -Permission262=Расширить доступ ко всем контрагентам (не только контрагентам, для которых этот пользователь является торговым представителем). <br> Не действует для внешних пользователей (всегда ограничены предложениями, заказами, счетами, контрактами и т. д.). <br> Не действует для проектов (только правила разрешений, видимости и назначения). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Читать CA Permission272=Читать счета Permission273=Выпуск счетов @@ -1175,7 +1184,8 @@ SetupDescription2=Следующие два раздела являются об SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Другие пункты меню настройки управляют дополнительными параметрами. -LogEvents=Безопасность ревизии события +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Аудит InfoDolibarr=О Dolibarr InfoBrowser=О браузере @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Похоже требуется запуск YouMustRunCommandFromCommandLineAfterLoginToUser=Вы должны запустить эту команду из командной строки после Войти в оболочку с пользователем <b>%s.</b> YourPHPDoesNotHaveSSLSupport=SSL функций, не доступных в PHP DownloadMoreSkins=Дополнительные шкуры для загрузки -SimpleNumRefModelDesc=Возвращать справочный в формате %syymm-nnnn, где yy - год, mm - месяц, а nnnn - последовательность без сброса +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Показать профессиональный идентификатор с адресами ShowVATIntaInAddress=Скрыть номер НДС внутри Сообщества с адресами TranslationUncomplete=Частичный перевод @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Прокси-сервер: имя / адрес MAIN_PROXY_PORT=Прокси-сервер: Порт MAIN_PROXY_USER=Прокси-сервер: Логин MAIN_PROXY_PASS=Прокси-сервер: пароль -DefineHereComplementaryAttributes=Определите здесь любые дополнительные / пользовательские атрибуты, которые вы хотите включить для: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Дополнительные атрибуты ExtraFieldsLines=Дополнительные атрибуты (строки) ExtraFieldsLinesRec=Дополнительные атрибуты (шаблоны счетов-фактур) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Логин (Unix) LDAPFieldLoginExample=Пример: UID LDAPFilterConnection=Фильтр поиска LDAPFilterConnectionExample=Пример: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Логин (самба, activedirectory) LDAPFieldLoginSambaExample=Пример: samaccountname LDAPFieldFullname=Фамилия Имя @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=В вашей компании определено, ч AccountancyCode=Бухгалтерский код AccountancyCodeSell=Бух. код продаж AccountancyCodeBuy=Бух. код покупок +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Настройка модуля событий и повестки дня PasswordTogetVCalExport=Ключевые разрешить экспорт ссылке +SecurityKey = Security Key PastDelayVCalExport=Не экспортировать события старше AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Цвет фона для нечетных строк BackgroundTableLineEvenColor=Цвет фона для четных строк таблицы MinimumNoticePeriod=Минимальный период уведомления (ваш запрос на отпуск должен быть выполнен до этой задержки) NbAddedAutomatically=Количество дней, добавленных в счетчики пользователей (автоматически) каждый месяц -EnterAnyCode=Это поле содержит ссылку для идентификации строки. Введите любое значение по вашему выбору, но без специальных символов. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Было найдено несколько вариантов языка RemoveSpecialChars=Удаление специальных символов COMPANY_AQUARIUM_CLEAN_REGEX=Фильтр регулярных выражений для очистки значения (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Настройка модуля Социальные сети EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Примечание: В меню %s - %s для параметра «Использовать налог с продаж или НДС» было установлено значение <strong>Выкл.</strong> , поэтому для продаж всегда используется 0 налога с продаж или НДС. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/ru_RU/banks.lang b/htdocs/langs/ru_RU/banks.lang index c5f91b7749e..c1c19cf04e0 100644 --- a/htdocs/langs/ru_RU/banks.lang +++ b/htdocs/langs/ru_RU/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Ваш мандат SEPA 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/ru_RU/bills.lang b/htdocs/langs/ru_RU/bills.lang index 35266712613..1dc31d36f5f 100644 --- a/htdocs/langs/ru_RU/bills.lang +++ b/htdocs/langs/ru_RU/bills.lang @@ -52,11 +52,12 @@ Invoices=Счета-фактуры InvoiceLine=Строка счета-фактуры InvoiceCustomer=Счёт клиента CustomerInvoice=Счёт клиента -CustomersInvoices=Счета-фактуры Покупателей +CustomersInvoices=Счета клиента SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Счета-фактуры поставщика +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=счета-фактуры Поставщиков +SupplierBills=Счета-фактуры поставщика Payment=Платеж PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Платежи уже сделаны PaymentsBackAlreadyDone=Refunds already done PaymentRule=Правила оплаты PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Произвольное значение (%% от суммы) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Банковский перевод PaymentTypeShortVIR=Банковский перевод @@ -494,12 +498,16 @@ Cash=Наличные Reported=Задержан DisabledBecausePayments=Невозможно, поскольку есть некоторые платежи CantRemovePaymentWithOneInvoicePaid=Не удается удалить оплаты поскольку есть по крайней мере один счет-фактура классифицированный как 'оплачен' +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Ожидаемые платежи CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Оплачен этим платежом 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Платить ToMakePaymentBack=Возврат платежа @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Функция возвращает номер в формате %syymm-nnnn для стандартных счетов и %syymm-nnnn для кредитных авизо, где yy год, mm месяц и nnnn является непрерывной последовательностью и не возвращает 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Документ, начинающийся с $syymm, уже существует и не совместим с этой моделью последовательности. Удалите или переименуйте его, чтобы активировать этот модуль. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/ru_RU/boxes.lang b/htdocs/langs/ru_RU/boxes.lang index 7cfe3e8a6e7..afe6542def5 100644 --- a/htdocs/langs/ru_RU/boxes.lang +++ b/htdocs/langs/ru_RU/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Информация для входа BoxLastRssInfos=RSS информация BoxLastProducts=Последние %s Продукты/ Услуги @@ -17,9 +18,13 @@ BoxLastActions=Последние действия BoxLastContracts=Последние контракты BoxLastContacts=Последние контакты/адреса BoxLastMembers=Последние участники +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Последние вмешательства BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Последние %s новостей от %s BoxTitleLastProducts=Продукты/Услуги: последних %s изменений BoxTitleProductsAlertStock=Продукты: имеющиеся оповещения @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Бухгалтерия +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/ru_RU/categories.lang b/htdocs/langs/ru_RU/categories.lang index fc188dff315..f70d36de5f5 100644 --- a/htdocs/langs/ru_RU/categories.lang +++ b/htdocs/langs/ru_RU/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Раздел тегов/категорий постав CustomersCategoriesArea=Раздел тегов/категорий клиентов MembersCategoriesArea=Раздел тегов/категорий участников ContactsCategoriesArea=Раздел тегов/категорий контактов -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Раздел тегов/категорий проектов UsersCategoriesArea=Раздел тегов/категорий пользователей SubCats=Подкатегории @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Показать тег/категорию ByDefaultInList=By default in list ChooseCategory=Выберите категорию -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/ru_RU/companies.lang b/htdocs/langs/ru_RU/companies.lang index 2f8f9c2005b..b38a6ba0a2f 100644 --- a/htdocs/langs/ru_RU/companies.lang +++ b/htdocs/langs/ru_RU/companies.lang @@ -43,9 +43,10 @@ Individual=Физическое лицо ToCreateContactWithSameName=Будет автоматически создан контакт/адрес с той информацией которая связывает контрагента с контрагентом. В большинстве случаев, даже если контрагент является физическим лицом, достаточно создать одного контрагента. ParentCompany=Материнская компания Subsidiaries=Филиалы -ReportByMonth=Отчет за месяц -ReportByCustomers=Отчет клиента -ReportByQuarter=Отчет по рейтингу +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Код корректности RegisteredOffice=Зарегистрированный офис Lastname=Фамилия @@ -172,14 +173,20 @@ ProfId1ES=Проф Id 1 (CIF / NIF) ProfId2ES=Проф Id 2 (номер социального страхования) ProfId3ES=Проф Id 3 (CNAE) ProfId4ES=Проф Id 4 (Энциклопедический номер) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Проф Id 1 (SIREN) ProfId2FR=Проф Id 2 (SIRET) ProfId3FR=Проф Id 3 (NAF, старые APE) ProfId4FR=Проф Id 4 (RCS / РМ) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Проф ID 1 (регистрационный номер) ProfId2GB=- ProfId3GB=Проф Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Я бы. проф. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Разрешенный бизнес) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Проф ID 1 (NIPC) ProfId2PT=Проф Id 2 (номера социального страхования) ProfId3PT=Проф Id 3 (коммерческий Запись номер) ProfId4PT=Проф Id 4 (Консерватория) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (ОГРН) ProfId2RU=Prof Id 2 (ИНН) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Валюта неуплаченного счёта OutstandingBill=Максимальный неуплаченный счёт OutstandingBillReached=Достигнут максимум не оплаченных счетов OrderMinAmount=Минимальная сумма заказа -MonkeyNumRefModelDesc=Возвращает число в формате %syymm-nnnn для кода клиента и %syymm-nnnn для кода поставщика, где yy - год, mm - месяц, а nnnn - последовательность без разрыва и без сброса. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Код покупателю/поставщику не присваивается. Он может быть изменен в любое время. ManagingDirectors=Имя управляющего или управляющих (Коммерческого директора, директора, президента...) MergeOriginThirdparty=Копия контрагента (контрагент которого вы хотите удалить) diff --git a/htdocs/langs/ru_RU/compta.lang b/htdocs/langs/ru_RU/compta.lang index c7e9361c99f..75ed2fffd16 100644 --- a/htdocs/langs/ru_RU/compta.lang +++ b/htdocs/langs/ru_RU/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=НДС собрали StatusToPay=Для оплаты SpecialExpensesArea=Раздел для всех специальных платежей +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Заказчиком оплаты счетов-факту PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Социальный/налоговый сбор PaymentVat=НДС платеж +AutomaticCreationPayment=Automatically record the payment ListPayment=Список платежей ListOfCustomerPayments=Список клиентов платежи ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF оплаты LT2PaymentsES=IRPF платежей VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Чек при ввода даты 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Отчёт по собранному и оплаченному НДС клиента VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Отчёт по ставке RE @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Строки счёта для отправки ByProductsAndServices=By product and service RefExt=Внешняя ссылка -ToCreateAPredefinedInvoice=Для создания шаблона счёта создайте стандартный счёт, а затем нажмите кнопку "%s" без его сохранения. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Ссылка для заказа Mode1=Метод 1 Mode2=Метод 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Клонировать для следующего месяца SimpleReport=Простой отчет AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/ru_RU/ecm.lang b/htdocs/langs/ru_RU/ecm.lang index b943f9d58e0..fc73bb1c472 100644 --- a/htdocs/langs/ru_RU/ecm.lang +++ b/htdocs/langs/ru_RU/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index 3bcf15212e8..57d20e606ad 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> не найден (Неверный пут ErrorFunctionNotAvailableInPHP=<b>Функция %s</b> необходим для этой функции, но не доступен в этой версии / настройки PHP. ErrorDirAlreadyExists=Директория с таким именем уже существует. ErrorFileAlreadyExists=Файл с этим именем уже существует. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Файл не получил полностью на сервер. ErrorNoTmpDir=Временная директория %s не существует. ErrorUploadBlockedByAddon=Добавить заблокирован PHP / Apache плагин. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/ru_RU/externalsite.lang b/htdocs/langs/ru_RU/externalsite.lang index ef3735cae09..f4987dd02cb 100644 --- a/htdocs/langs/ru_RU/externalsite.lang +++ b/htdocs/langs/ru_RU/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Установка ссылки на внешний веб-сайт -ExternalSiteURL=URL внешнего сайта +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Модуль ВнешнийСайт не был надлежащим образом настроен. ExampleMyMenuEntry=Пункт "Моё меню" diff --git a/htdocs/langs/ru_RU/main.lang b/htdocs/langs/ru_RU/main.lang index ac8383b1f2f..6d10082dbb5 100644 --- a/htdocs/langs/ru_RU/main.lang +++ b/htdocs/langs/ru_RU/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Дата изм. IPModification=Modification IP DateLastModification=Дата последнего изменения DateValidation=Дата проверки +DateSigning=Signing date DateClosing=Дата закрытия DateDue=Срок выполнения DateValue=Дата зачисления @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Цена за единицу (без налога) (валю UnitPriceTTC=Цена за единицу PriceU=Цена ед. PriceUHT=Цена ед. (нетто) -PriceUHTCurrency=Цена (валюта) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Цена ед. (с налогом) Amount=Сумма AmountInvoice=Сумма счета-фактуры @@ -389,6 +390,8 @@ AmountTotal=Общая сумма AmountAverage=Средняя сумма PriceQtyMinHT=Цена за мин. количество (без налога) PriceQtyMinHTCurrency=Цена за мин. количество (без налога) (валюта) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Процент Total=Всего SubTotal=Подитог @@ -724,7 +727,7 @@ MenuMembers=Участники MenuAgendaGoogle=Google agenda MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Лимит Dolibarr (Меню Главная-Настройки-Безопасность): %s Кб, лимит PHP: %s Кб -NoFileFound=Нет документов, сохраненных в этом каталоге +NoFileFound=No documents uploaded CurrentUserLanguage=Текущий язык CurrentTheme=Текущая тема CurrentMenuManager=Менеджер текущего меню @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Удалить строку '%s' SomeTranslationAreUncomplete=Некоторые из предлагаемых языков пакетов могут быть переведены только частично или могут содержать ошибки. Пожалуйста, помогите исправить ваш язык, зарегистрировавшись по адресу <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/,</a> чтобы добавить свои улучшения. -DirectDownloadLink=Прямая ссылка для скачивания (общедоступная/внешняя) -DirectDownloadInternalLink=Прямая ссылка для скачивания (требуется регистрация и необходимые разрешения) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Загрузка DownloadDocument=Скачать документ ActualizeCurrency=Обновить текущий курс @@ -1013,6 +1018,7 @@ SearchIntoContacts=Контакты SearchIntoMembers=Участники SearchIntoUsers=Пользователи SearchIntoProductsOrServices=Продукты или услуги +SearchIntoBatch=Lots / Serials SearchIntoProjects=Проекты SearchIntoMO=Manufacturing Orders SearchIntoTasks=Задание @@ -1049,12 +1055,13 @@ KeyboardShortcut=Сочетание клавиш AssignedTo=Ответств. Deletedraft=Удалить черновик ConfirmMassDraftDeletion=Подтверждение пакетного удаления Черновиков -FileSharedViaALink=Файл, общий доступ по ссылке +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Сначала выберите контрагента ... YouAreCurrentlyInSandboxMode=В настоящее время вы в %s режиме "песочницы" Inventory=Инвентаризация AnalyticCode=Аналитический код TMenuMRP=ППМ +ShowCompanyInfos=Show company infos ShowMoreInfos=Показать больше информации NoFilesUploadedYet=Пожалуйста, загрузите сначала документ SeePrivateNote=Смотреть личную заметку @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/ru_RU/margins.lang b/htdocs/langs/ru_RU/margins.lang index 61546dd6e58..a205fac2481 100644 --- a/htdocs/langs/ru_RU/margins.lang +++ b/htdocs/langs/ru_RU/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Детали наценки ProductMargins=Товарные наценки CustomerMargins=Наценки клиентов SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=Пользовательские наценки ProductService=Продукт или Услуга AllProducts=Все продукты и услуги ChooseProduct/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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=Как товар UseDiscountAsService=Как услуга @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Себестоимость 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 sale representative +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=Ставка должна быть числом markRateShouldBeLesserThan100=Mark rate should be lower than 100 ShowMarginInfos=Показать инф-цию о наценке 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). +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). diff --git a/htdocs/langs/ru_RU/members.lang b/htdocs/langs/ru_RU/members.lang index c2587c40060..2e01c0c009d 100644 --- a/htdocs/langs/ru_RU/members.lang +++ b/htdocs/langs/ru_RU/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Список кандидатов в участники (на MembersListValid=Список действительных участников MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Список квалифицированных участников MenuMembersToValidate=Проект участники MenuMembersValidated=Подтвержденные участники +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Члены с подпиской на получение MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Истек MemberStatusPaid=Подписка до даты MemberStatusPaidShort=До даты +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Проект участники +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Утверждена @@ -82,6 +87,8 @@ Physical=Физическая Moral=Моральные MorAndPhy=Moral and Physical Reenable=Снова +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Удаление члена @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Этикетки формате DescADHERENT_ETIQUETTE_TEXT=Текст, который будет напечетан на адресном листе пользователя @@ -162,6 +170,7 @@ DocForLabels=Создание листов адрес (формат для вы SubscriptionPayment=Абонентская плата LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Члены статистику по странам MembersStatisticsByState=Члены статистики штата / провинции MembersStatisticsByTown=Члены статистики города diff --git a/htdocs/langs/ru_RU/modulebuilder.lang b/htdocs/langs/ru_RU/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/ru_RU/modulebuilder.lang +++ b/htdocs/langs/ru_RU/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/ru_RU/orders.lang b/htdocs/langs/ru_RU/orders.lang index 5e148001e53..6910f244aa4 100644 --- a/htdocs/langs/ru_RU/orders.lang +++ b/htdocs/langs/ru_RU/orders.lang @@ -16,6 +16,8 @@ ToOrder=Сделать заказ MakeOrder=Сделать заказ SupplierOrder=Purchase order SuppliersOrders=Заказы +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Заказы на продажу @@ -141,11 +143,12 @@ OrderByEMail=Адрес электронной почты OrderByWWW=Интернет OrderByPhone=Телефон # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Простая модель для PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Оплатить заказы +CreateInvoiceForThisSupplier=Оплатить заказы NoOrdersToInvoice=Нет заказов для оплаты CloseProcessedOrdersAutomatically=Отметить "В обработке" все выделенные заказы OrderCreation=Создание заказа diff --git a/htdocs/langs/ru_RU/other.lang b/htdocs/langs/ru_RU/other.lang index 2a5bf106504..1a1f99c8c45 100644 --- a/htdocs/langs/ru_RU/other.lang +++ b/htdocs/langs/ru_RU/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Создан %s ModifiedBy=Модифицированное% по S ValidatedBy=Подтверждено %s +SignedBy=Signed by %s ClosedBy=Закрытые% по S CreatedById=ID пользователя, который создал ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=Ваши новые ключи для доступа NewKeyWillBe=Ваш новый ключ для доступа к ПО будет ClickHereToGoTo=Нажмите сюда, чтобы перейти к %s YouMustClickToChange=Однако, вы должны сначала нажать на ссылку для подтверждения изменения пароля +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Если вы не запрашивали эти изменения, забудьте про это электронное письмо. Ваши данные в безопасности. IfAmountHigherThan=Если количество более чем <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/ru_RU/productbatch.lang b/htdocs/langs/ru_RU/productbatch.lang index 371476b81dc..befbae44568 100644 --- a/htdocs/langs/ru_RU/productbatch.lang +++ b/htdocs/langs/ru_RU/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Использовать номер партии/серийный номер -ProductStatusOnBatch=Да (требуется серийный номер/номер партии) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Нет (серийный номер/номер партии не используется) -ProductStatusOnBatchShort=Да +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Нет Batch=Партии/серийный номер atleast1batchfield=Дата уплаты или дата продажи или Лот / Серийный номер @@ -22,3 +24,12 @@ ProductLotSetup=Настройка лота / серийного модуля ShowCurrentStockOfLot=Показать текущий запас для пары товара / лота ShowLogOfMovementIfLot=Показать журнал движений для пары product / lot StockDetailPerBatch=Детальная информация о лоте +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/ru_RU/products.lang b/htdocs/langs/ru_RU/products.lang index 105d51de4e7..fca1501a90e 100644 --- a/htdocs/langs/ru_RU/products.lang +++ b/htdocs/langs/ru_RU/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Предустановленные товары/услуги для продажи @@ -313,7 +314,7 @@ LastUpdated=Последнее обновление CorrectlyUpdated=Правильно обновлено PropalMergePdfProductActualFile=Файлы, используемые для добавления в PDF Azur, являются PropalMergePdfProductChooseFile=Выберите PDF-файлы -IncludingProductWithTag=Включая товар/услугу с тегом +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Цена по умолчанию, реальная цена может зависеть от клиента WarningSelectOneDocument=Выберите хотя бы один документ DefaultUnitToShow=Единица diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index 2b752094276..2ae71da669f 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/ru_RU/propal.lang b/htdocs/langs/ru_RU/propal.lang index bd139cfed29..4575b0dc66e 100644 --- a/htdocs/langs/ru_RU/propal.lang +++ b/htdocs/langs/ru_RU/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Отправить коммерческое предложен DatePropal=Дата предложения DateEndPropal=Дата окончания действия ValidityDuration=Срок действия -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Пропал% не найдены AddToDraftProposals=Добавить проект коммерческого предложения @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Коммерческое предложение и линий ProposalLine=Предложение линия +ProposalLines=Proposal lines AvailabilityPeriod=Наличие задержки SetAvailability=Задержка устанавливается доступность AfterOrder=после заказа @@ -85,3 +85,8 @@ ProposalCustomerSignature=Письменное подтверждение, пе 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/ru_RU/stocks.lang b/htdocs/langs/ru_RU/stocks.lang index 25e96f3910c..5b0fc6b9aaf 100644 --- a/htdocs/langs/ru_RU/stocks.lang +++ b/htdocs/langs/ru_RU/stocks.lang @@ -19,8 +19,8 @@ Stock=Фондовый Stocks=Акции MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Вместо -LocationSummary=Сокращенное наименование расположение -NumberOfDifferentProducts=Кол-во различных продуктов +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Общее количество продукции LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Склады стоимости 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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=Виртуальный запас VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Идентификатор склад DescWareHouse=Описание склада LieuWareHouse=Локализация склад WarehousesAndProducts=Склады и продукты WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) AverageUnitPricePMPShort=Значение -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Продажа Цена за штуку EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,7 @@ Replenishments=Пополнения NbOfProductBeforePeriod=Количество продукта %s в остатке на начало выбранного периода (< %s) NbOfProductAfterPeriod=Количество продукта %s в остатке на конец выбранного периода (< %s) MassMovement=Массовое перемещение -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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Получатели заказа StockMovementRecorded=Перемещения остатков записаны @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Инвентарная ведомость inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Открыть заново +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/ru_RU/suppliers.lang b/htdocs/langs/ru_RU/suppliers.lang index 80f0528ac10..bbfecb4779f 100644 --- a/htdocs/langs/ru_RU/suppliers.lang +++ b/htdocs/langs/ru_RU/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Поставщики SuppliersInvoice=Vendor invoice +SupplierInvoices=Счета-фактуры поставщика ShowSupplierInvoice=Show Vendor Invoice NewSupplier=Новый поставщик History=История diff --git a/htdocs/langs/ru_RU/ticket.lang b/htdocs/langs/ru_RU/ticket.lang index 708af1e5769..4c4bf7788a3 100644 --- a/htdocs/langs/ru_RU/ticket.lang +++ b/htdocs/langs/ru_RU/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Тип Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/ru_RU/users.lang b/htdocs/langs/ru_RU/users.lang index d2a34f41a12..b4072589ddc 100644 --- a/htdocs/langs/ru_RU/users.lang +++ b/htdocs/langs/ru_RU/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Удалить из группы PasswordChangedAndSentTo=Пароль изменен и направил <b>в %s.</b> PasswordChangeRequest=Запрос на изменение пароля для <b>%s</b> PasswordChangeRequestSent=Запрос на изменение пароля <b>для %s направлено %s.</b> +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=Подтвердите сброс пароля MenuUsersAndGroups=Пользователи и Группы LastGroupsCreated=Последние %s созданные группы @@ -70,9 +72,10 @@ ExportDataset_user_1=Пользователи и их свойства DomainUser=Домен пользователя %s Reactivate=Возобновить CreateInternalUserDesc=Эта форма позволяет вам создать внутреннего пользователя в вашей компании. Чтобы создать внешнего пользователя (клиента, поставщика и т.д.), используйте кнопку «Создать пользователя Dolibarr» из карточки контакта этого контрагента. -InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Разрешение предоставляется, поскольку унаследовал от одного из пользователей в группы. Inherited=Унаследованный +UserWillBe=Created user will be UserWillBeInternalUser=Созданный пользователь будет внутреннего пользователя (потому что не связаны с определенным третьим лицам) UserWillBeExternalUser=Созданный пользователь будет внешний пользователь (из-за связанных с определенной третьей стороны) IdPhoneCaller=Идентификатор телефона абонента @@ -109,8 +112,10 @@ UserAccountancyCode=Код учета пользователя UserLogoff=Выход пользователя UserLogged=Пользователь вошел DateOfEmployment=Employment date -DateEmployment=Дата начала трудоустройства +DateEmployment=Employment +DateEmploymentstart=Дата начала трудоустройства DateEmploymentEnd=Дата окончания занятости +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Вы не можете отключить свою собственную запись пользователя ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator diff --git a/htdocs/langs/ru_RU/website.lang b/htdocs/langs/ru_RU/website.lang index 775344b328a..8637448b60d 100644 --- a/htdocs/langs/ru_RU/website.lang +++ b/htdocs/langs/ru_RU/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Читать WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/ru_RU/zapier.lang b/htdocs/langs/ru_RU/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/ru_RU/zapier.lang +++ b/htdocs/langs/ru_RU/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/ru_UA/admin.lang b/htdocs/langs/ru_UA/admin.lang new file mode 100644 index 00000000000..cac0d063f48 --- /dev/null +++ b/htdocs/langs/ru_UA/admin.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - admin +ShowBugTrackLink=Show link "<strong>%s</strong>" diff --git a/htdocs/langs/sk_SK/accountancy.lang b/htdocs/langs/sk_SK/accountancy.lang index e3377be2231..fb708cba3c6 100644 --- a/htdocs/langs/sk_SK/accountancy.lang +++ b/htdocs/langs/sk_SK/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Viazané riadky faktúr ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Priradiť riadok k účnovnému účtu -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Priradiť @@ -209,7 +209,7 @@ Codejournal=časopis JournalLabel=Journal label NumPiece=Číslo kusu TransactionNumShort=Num. transakcie -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index bae00fceb7e..9a671606ef1 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Povoliť nové pripojenia YourSession=Vaša relácia Sessions=Users Sessions WebUserGroup=Webový server užívateľ / skupina +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Poznámka: áno je účinné len vtedy, ak je modul <b>%s</b> za RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Bezpečnostné nastavenia +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Chyba, tento modul vyžaduje PHP verzia %s alebo vyššia ErrorModuleRequireDolibarrVersion=Chyba, tento modul vyžaduje Dolibarr verzie %s alebo vyššia @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Očistiť PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Vyčistiť teraz @@ -232,6 +234,7 @@ BoxesAvailable=Dostupné doplnky BoxesActivated=Aktivované doplnky ActivateOn=Aktivácia na ActiveOn=Aktivovaná +ActivatableOn=Activatable on SourceFile=Zdrojový súbor AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dostupné len v prípade, že je JavaScript nie je zakázaný Required=Potrebný @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Aktualizovať server offline WithCounter=Manage a counter -GenericMaskCodes=Môžete zadať akékoľvek masku číslovanie. V tejto maske, by mohli byť použité nasledovné značky: <br> <b>{000000}</b> zodpovedá množstvu, ktoré sa zvýšia na každej %s. Vložiť počet núl na požadovanú dĺžku pultu. Počítadlo sa vyplní nulami zľava, aby sa čo najviac nuly ako maska. <br> <b>{000000} 000</b> rovnako ako predchádzajúce, ale posun zodpovedá číslu na pravej strane znamienko + je aplikovaný začína na prvej %s. <br> <b>{000000 @ x}</b> rovnaká ako predchádzajúca, ale počítadlo sa resetuje na nulu, keď je mesiac x hodnoty (x medzi 1 a 12 alebo 0, používať prvých mesiacoch fiškálneho roka definované v konfigurácii, alebo 99 pre resetovanie na nulu každý mesiac ). Ak je táto voľba sa používa, a x je 2 alebo vyššia, potom postupnosť {yy} {mm} alebo {yyyy} {} mm je tiež potrebné. <br> <b>{Dd}</b> deň (01 až 31). <br> <b>{Mm}</b> mesiac (01 až 12). <br> <b>{Yy}, {RRRR}</b> alebo <b>{y}</b> ročne po dobu 2, 4 alebo 1 číslice. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Všetky ostatné znaky v maske zostanú nedotknuté. <br> Medzery nie sú povolené. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Príklad na tretie osoby vytvorené na 03.1.2007:</u> <br> GenericMaskCodes4c=<u>Príklad produktu vytvorili na 03.1.2007:</u> <br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Knižnica používaná pre generovanie PDF @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redakcia Module49Desc=Editor pre správu Module50Name=Produkty @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP MaxMind konverzie možnosti Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-spoločnosť Module5000Desc=Umožňuje spravovať viac spoločností -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Web stránky 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Vytvoriť / upraviť interné / externé užívateľa a op Permission254=Vytvoriť / upraviť externí používatelia iba Permission255=Upraviť ostatným používateľom heslo Permission256=Odstrániť alebo zakázať ostatným užívateľom -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Prečítajte CA Permission272=Prečítajte si faktúry Permission273=Vydanie faktúry @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Udalosti bezpečnostný audit +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=O Dolibarre InfoBrowser=O prehliadači @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Je nutné spustiť tento príkaz z príkazového riadka po prihlásení do shellu s užívateľskými <b>%s</b> alebo musíte pridať parameter-w na konci príkazového riadku, aby <b>%s</b> heslo. YourPHPDoesNotHaveSSLSupport=SSL funkcia nie je k dispozícii vo vašom PHP DownloadMoreSkins=Ďalšie skiny k stiahnutiu -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Čiastočný preklad @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Doplnkové atribúty ExtraFieldsLines=Doplnkové atribúty (linky) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Prihlásenie (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Vyhľadávací filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Prihlásenie (samba, ActiveDirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Celé meno @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Predaj účtu. kód AccountancyCodeBuy=Nákup účet. kód +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Akcie a agenda Nastavenie modulu PasswordTogetVCalExport=Kľúč povoliť export odkaz +SecurityKey = Security Key PastDelayVCalExport=Neexportovať udalosti staršie ako AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Farba pozadia pre nepárne riadky tabuľky BackgroundTableLineEvenColor=Farba pozadia pre párne riadky tabuľky MinimumNoticePeriod=Minimálny oznamovací čas ( Vaša požiadávka musi byť zaznamenaná pred týmto časom ) NbAddedAutomatically=Počet dní pridaných do počítadla užívateľov ( automaticky ) každý mesiac -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sk_SK/banks.lang b/htdocs/langs/sk_SK/banks.lang index 877a8abd81b..0cea1cfce0f 100644 --- a/htdocs/langs/sk_SK/banks.lang +++ b/htdocs/langs/sk_SK/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sk_SK/bills.lang b/htdocs/langs/sk_SK/bills.lang index ec49d768103..34636cf7302 100644 --- a/htdocs/langs/sk_SK/bills.lang +++ b/htdocs/langs/sk_SK/bills.lang @@ -52,11 +52,12 @@ Invoices=Faktúry InvoiceLine=Faktúra linka InvoiceCustomer=Zákazník faktúra CustomerInvoice=Zákazník faktúra -CustomersInvoices=Zákazníci faktúry +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=dodávatelia faktúry +SupplierBills=Vendor invoices Payment=Platba PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Platby neurobili PaymentsBackAlreadyDone=Refunds already done PaymentRule=Platba pravidlo PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Dátum posledného generovania faktúr DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Overiť faktúrý automaticky @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variabilná čiastka (%% celk.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankový prevod PaymentTypeShortVIR=Bankový prevod @@ -494,12 +498,16 @@ Cash=Hotovosť Reported=Oneskorený DisabledBecausePayments=Not possible since there are some payments CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Predpokladaný platba CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Zaplatené touto platbou 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Zaplatiť ToMakePaymentBack=Oplatiť @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Bill počnúc $ syymm už existuje a nie je kompatibilný s týmto modelom sekvencie. Vyberte ju a premenujte ho na aktiváciu tohto modulu. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Zmazať šablónu faktúrý ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sk_SK/boxes.lang b/htdocs/langs/sk_SK/boxes.lang index 8036acd4779..9d0739d199a 100644 --- a/htdocs/langs/sk_SK/boxes.lang +++ b/htdocs/langs/sk_SK/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Najnovšie akcie BoxLastContracts=Najnovšie zmluvy BoxLastContacts=Najnovšie kontakty/adresy BoxLastMembers=Najnovší užívatelia +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Najnovšie zásahy BoxCurrentAccounts=Otvoriť zostatok na účte BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Najnovšie %s novinky z %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Účtovníctvo +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sk_SK/categories.lang b/htdocs/langs/sk_SK/categories.lang index 9c7e4ed9951..3fcf110da7f 100644 --- a/htdocs/langs/sk_SK/categories.lang +++ b/htdocs/langs/sk_SK/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sk_SK/companies.lang b/htdocs/langs/sk_SK/companies.lang index fc39a7f1038..513a5cb3ce9 100644 --- a/htdocs/langs/sk_SK/companies.lang +++ b/htdocs/langs/sk_SK/companies.lang @@ -43,9 +43,10 @@ Individual=Súkromná osoba 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=Materská spoločnosť Subsidiaries=Dcérske spoločnosti -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Správa sadzby +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Zdvorilosť kód RegisteredOffice=Sídlo spoločnosti Lastname=Priezvisko @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Prof Id 2 (Číslo sociálneho poistenia) ProfId3ES=Prof ID 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate číslo) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (siréna) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof ID 3 (NAF, starý APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registračné číslo ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (Nipča) ProfId2PT=Prof Id 2 (Číslo sociálneho poistenia) ProfId3PT=Prof ID 3 (obchodný Záznam číslo) ProfId4PT=Prof Id 4 (konzervatórium) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=Ninea @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. za vynikajúce účet OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kód je zadarmo. Tento kód je možné kedykoľvek zmeniť. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/sk_SK/compta.lang b/htdocs/langs/sk_SK/compta.lang index 2f3486a9535..c9e2fc18a94 100644 --- a/htdocs/langs/sk_SK/compta.lang +++ b/htdocs/langs/sk_SK/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Vybrané DPH StatusToPay=Zaplatiť SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Zákazník faktúru PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Platba sociálnej/fiškálnej dane PaymentVat=DPH platba +AutomaticCreationPayment=Automatically record the payment ListPayment=Zoznam platieb ListOfCustomerPayments=Zoznam zákazníckych platieb ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF platby LT2PaymentsES=IRPF Platby VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Skontrolujte dátum príjmu 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Režim <b>%sVAT na záväzky accounting%s.</b> CalcModeVATEngagement=Režim <b>%sVAT z príjmov-expense%sS.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Správa zákazníka DPH vyzdvihnúť a zaplatiť VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=PCG podtyp InvoiceLinesToDispatch=Faktúra linky na expedíciu ByProductsAndServices=By product and service RefExt=Externé ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Metóda 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sk_SK/ecm.lang b/htdocs/langs/sk_SK/ecm.lang index dc31605d394..690a626db44 100644 --- a/htdocs/langs/sk_SK/ecm.lang +++ b/htdocs/langs/sk_SK/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sk_SK/errors.lang b/htdocs/langs/sk_SK/errors.lang index 30e9dea3094..2cd5196ebaf 100644 --- a/htdocs/langs/sk_SK/errors.lang +++ b/htdocs/langs/sk_SK/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Adresár <b>%s</b> nebol nájdený (Bad cesta, zlé oprávnenia ErrorFunctionNotAvailableInPHP=Funkcia <b>%s</b> je nutné pre túto funkciu, ale nie je k dispozícii v tejto verzii / nastavenie PHP. ErrorDirAlreadyExists=Adresár s týmto názvom už existuje. ErrorFileAlreadyExists=Súbor s týmto názvom už existuje. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Súbor nedostali úplne servera. ErrorNoTmpDir=Dočasné direct %s neexistuje. ErrorUploadBlockedByAddon=Pridať zablokovaný PHP / Apache pluginu. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sk_SK/externalsite.lang b/htdocs/langs/sk_SK/externalsite.lang index fc5548dc148..97c6ec00e38 100644 --- a/htdocs/langs/sk_SK/externalsite.lang +++ b/htdocs/langs/sk_SK/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Nastavenie odkaz na externé webové stránky -ExternalSiteURL=Externé URL stránok +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite nebol správne nakonfigurovaný. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sk_SK/main.lang b/htdocs/langs/sk_SK/main.lang index b86251db431..d5521db463a 100644 --- a/htdocs/langs/sk_SK/main.lang +++ b/htdocs/langs/sk_SK/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modify. dátum IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Dátum overenia +DateSigning=Signing date DateClosing=Uzávierka DateDue=Dátum splatnosti DateValue=Hodnota dáta @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Jednotková cena PriceU=UP PriceUHT=UP (bez DPH) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Množstvo AmountInvoice=Fakturovaná čiastka @@ -389,6 +390,8 @@ AmountTotal=Celková čiastka AmountAverage=Priemerná suma PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percento Total=Celkový SubTotal=Medzisúčet @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Aktuálny jazyk CurrentTheme=Aktuálna téma CurrentMenuManager=Aktuálna ponuka manažér @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakty SearchIntoMembers=Členovia SearchIntoUsers=Užívatelia SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekty SearchIntoMO=Manufacturing Orders SearchIntoTasks=Úlohy @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Priradené Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sk_SK/margins.lang b/htdocs/langs/sk_SK/margins.lang index 6edaad446c3..84d626fe3ec 100644 --- a/htdocs/langs/sk_SK/margins.lang +++ b/htdocs/langs/sk_SK/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin detaily ProductMargins=Produktové marže CustomerMargins=Zákazníkov marže SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Produkt alebo služba AllProducts=Všetky produkty a služby ChooseProduct/Service=Vyberte produkt alebo službu 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Marža metóda pre globálne zľavy UseDiscountAsProduct=Ako produkt UseDiscountAsService=Ako služba @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Veľkoobchodná cena UnitCharges=Jednotkové náklady Charges=Poplatky AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +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 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). +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). diff --git a/htdocs/langs/sk_SK/members.lang b/htdocs/langs/sk_SK/members.lang index 56754d13691..30d4aeab7e3 100644 --- a/htdocs/langs/sk_SK/members.lang +++ b/htdocs/langs/sk_SK/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Zoznam návrhov členov (má byť overený) MembersListValid=Zoznam platných členov MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Zoznam kvalifikovaných členov MenuMembersToValidate=Návrhy členov MenuMembersValidated=Overené členov +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Členovia s predplatným dostávať MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Vypršala MemberStatusPaid=Zasielanie noviniek aktuálnej MemberStatusPaidShort=Až do dnešného dňa +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Návrhy členov +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Overené @@ -82,6 +87,8 @@ Physical=Fyzikálne Moral=Morálna MorAndPhy=Moral and Physical Reenable=Znovu povoliť +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Odstránenie člena @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Formát etikety stránku DescADHERENT_ETIQUETTE_TEXT=Text tlačený na listoch členských adrese @@ -162,6 +170,7 @@ DocForLabels=Vytvoriť adresy listy SubscriptionPayment=Odberatelská platba LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Členovia Štatistiky podľa krajiny MembersStatisticsByState=Členovia štatistika štát / provincia MembersStatisticsByTown=Členovia štatistika podľa mesta diff --git a/htdocs/langs/sk_SK/modulebuilder.lang b/htdocs/langs/sk_SK/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/sk_SK/modulebuilder.lang +++ b/htdocs/langs/sk_SK/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sk_SK/orders.lang b/htdocs/langs/sk_SK/orders.lang index 826364134cd..25ae9d5d360 100644 --- a/htdocs/langs/sk_SK/orders.lang +++ b/htdocs/langs/sk_SK/orders.lang @@ -16,6 +16,8 @@ ToOrder=Objednať MakeOrder=Objednať SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=E-mail OrderByWWW=Online OrderByPhone=Telefón # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Jednoduchý model, aby PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Bill objednávky +CreateInvoiceForThisSupplier=Bill objednávky NoOrdersToInvoice=Žiadne objednávky zúčtovateľné CloseProcessedOrdersAutomatically=Klasifikovať &quot;spracovanie&quot; všetky vybrané príkazy. OrderCreation=Objednať tvorba diff --git a/htdocs/langs/sk_SK/other.lang b/htdocs/langs/sk_SK/other.lang index cdf766025a8..98646eb50a8 100644 --- a/htdocs/langs/sk_SK/other.lang +++ b/htdocs/langs/sk_SK/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Vytvoril %s ModifiedBy=Zmenil %s ValidatedBy=Overená %s +SignedBy=Signed by %s ClosedBy=Uzavrel %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=To je vaše nové kľúče k prihláseniu NewKeyWillBe=Váš nový kľúč pre prihlásenie do softvéru bude ClickHereToGoTo=Kliknite tu pre prechod na %s YouMustClickToChange=Musíte však najprv kliknúť na nasledujúci odkaz pre potvrdenie tejto zmeny hesla +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Ak ste o túto zmenu, stačí zabudnúť na tento e-mail. Vaše prihlasovacie údaje sú v bezpečí. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/sk_SK/productbatch.lang b/htdocs/langs/sk_SK/productbatch.lang index 75f99b9b524..c2af074a693 100644 --- a/htdocs/langs/sk_SK/productbatch.lang +++ b/htdocs/langs/sk_SK/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Áno +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nie Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sk_SK/products.lang b/htdocs/langs/sk_SK/products.lang index ad7d3f5440e..d4db52e208b 100644 --- a/htdocs/langs/sk_SK/products.lang +++ b/htdocs/langs/sk_SK/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Preddefinovaný produkt/služba na predaj @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Správne upravené PropalMergePdfProductActualFile=Súbor na pridanie do PDF Azur sú/je PropalMergePdfProductChooseFile=Vybrať PDF súbory -IncludingProductWithTag=Zahrnúť produkt/službu so štítkom +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Základná cena, skutočná cena môže záležať podľa zákazníka WarningSelectOneDocument=Prosím zvoľte minimálne jeden dokument DefaultUnitToShow=Jednotka diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index 43af18884d9..112e55c7285 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sk_SK/propal.lang b/htdocs/langs/sk_SK/propal.lang index f0dcc6781b0..1df76fa3d75 100644 --- a/htdocs/langs/sk_SK/propal.lang +++ b/htdocs/langs/sk_SK/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Poslať obchodný návrh poštou DatePropal=Dátum návrhu DateEndPropal=Platnosť koncový dátum ValidityDuration=Platnosť trvania -CloseAs=Nastaviť status na SetAcceptedRefused=Nastaviť Akceptované/Odmietnuté ErrorPropalNotFound=Prepáli %s nebol nájdený AddToDraftProposals=Pridať do predlohy návrhu @@ -60,6 +59,7 @@ ConfirmClonePropal=Určite chcete duplikovať komerčnú ponuku <b>%s</b>? ConfirmReOpenProp=Určite chcete znova otvoriť komerčnú ponuku <b>%s</b>? ProposalsAndProposalsLines=Komerčné návrh a vedenie ProposalLine=Návrh linky +ProposalLines=Proposal lines AvailabilityPeriod=Dostupnosť meškanie SetAvailability=Nastavte si obsadenosť meškanie AfterOrder=po objednaní @@ -85,3 +85,8 @@ ProposalCustomerSignature=Písomná akceptácia, firemná pečiatka, dátum a po 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/sk_SK/stocks.lang b/htdocs/langs/sk_SK/stocks.lang index 0f1519c6e37..24456ee31a7 100644 --- a/htdocs/langs/sk_SK/stocks.lang +++ b/htdocs/langs/sk_SK/stocks.lang @@ -19,8 +19,8 @@ Stock=Zásoba Stocks=Zásoby MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zásoby podľa LOT/Serial LotSerial=LOTs/Sériové čísla LotSerialList=Zoznam LOT/sériovych čísel @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Umiestnenie -LocationSummary=Krátky názov umiestnenia -NumberOfDifferentProducts=Počet rôznych výrobkov +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Celkový počet produktov LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Sklady hodnota 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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á priemerná cena -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Predajná jednotka Cena EstimatedStockValueSellShort=Počet na predaj EstimatedStockValueSell=Počet na predaj @@ -145,7 +147,7 @@ Replenishments=Splátky NbOfProductBeforePeriod=Množstvo produktov %s na sklade, než zvolené obdobie (&lt;%s) NbOfProductAfterPeriod=Množstvo produktov %s na sklade po zvolené obdobie (&gt; %s) MassMovement=Hromadný pohyb -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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Bločky tejto objednávky StockMovementRecorded=Zaznamenané pohyby zásob @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Štítok pohybu -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Presun alebo skladový kód IsInPackage=Vložené do balíka @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sk_SK/suppliers.lang b/htdocs/langs/sk_SK/suppliers.lang index b9949c65301..8fe139b6ade 100644 --- a/htdocs/langs/sk_SK/suppliers.lang +++ b/htdocs/langs/sk_SK/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=História diff --git a/htdocs/langs/sk_SK/ticket.lang b/htdocs/langs/sk_SK/ticket.lang index f45e4fb3067..54eae76b82c 100644 --- a/htdocs/langs/sk_SK/ticket.lang +++ b/htdocs/langs/sk_SK/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Typ Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sk_SK/users.lang b/htdocs/langs/sk_SK/users.lang index 3c707abb9c5..4a3baedf95d 100644 --- a/htdocs/langs/sk_SK/users.lang +++ b/htdocs/langs/sk_SK/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Odstrániť zo skupiny PasswordChangedAndSentTo=Heslo bolo zmenené a poslaný do <b>%s.</b> PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Žiadosť o zmenu hesla <b>%s</b> zaslaná <b>%s.</b> +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=Používatelia a skupiny LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Užívateľ domény %s Reactivate=Reaktivácia 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Povolenie udelené, pretože dedia z jednej zo skupiny užívateľov. Inherited=Zdedený +UserWillBe=Created user will be UserWillBeInternalUser=Vytvorený užívateľ bude interný užívateľ (pretože nie je spojený s určitou treťou stranou) UserWillBeExternalUser=Vytvorený užívateľ bude externý užívateľ (pretože súvisí s určitou treťou stranou) IdPhoneCaller=Id telefón volajúceho @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=Odhlásiť užívateľa UserLogged=Užívateľ prihlásený DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/sk_SK/website.lang b/htdocs/langs/sk_SK/website.lang index e1cfe004a2f..e962c91d16e 100644 --- a/htdocs/langs/sk_SK/website.lang +++ b/htdocs/langs/sk_SK/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Čítať WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sk_SK/zapier.lang b/htdocs/langs/sk_SK/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sk_SK/zapier.lang +++ b/htdocs/langs/sk_SK/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/sl_SI/accountancy.lang b/htdocs/langs/sl_SI/accountancy.lang index 9ca8ca3875d..7e9490abb5e 100644 --- a/htdocs/langs/sl_SI/accountancy.lang +++ b/htdocs/langs/sl_SI/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Revija JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 8e4740be5cc..801722cc765 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Odstrani blokado povezovanja YourSession=Vaša seja Sessions=Users Sessions WebUserGroup=Spletni strežnik uporabnik / skupina +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Opomba: 'Da' velja samo, če je omogočen modul <b>%s</b> RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Varnostne nastavitve +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Napaka, ta modul zahteva PHP različico %s ali višjo ErrorModuleRequireDolibarrVersion=Napaka, Ta modul zahteva Dolibarr različico %s ali višjo @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Počisti PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Počisti zdaj @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Aktiviran na ActiveOn=Aktiven na +ActivatableOn=Activatable on SourceFile=Izvorna datoteka AvailableOnlyIfJavascriptAndAjaxNotDisabled=Na voljo samo, če JavaScript in Ajax nista onemogočena Required=Zahtevano @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=Posodobitev strežnika brez povezave WithCounter=Manage a counter -GenericMaskCodes=Vnesete lahko kakršnokoli številčno masko. V tej maski lahko uporabite naslednje oznake:<br><b>{000000}</b> ustreza številki, ki se poveča pri vsakem %s. Vnesite toliko ničel, kot je želena dolžina števca. Števec se bo zapolnil z ničlami na levi strani, da bi velikost ustrezala maski. <br><b>{000000+000}</b> enako kot prej, vendar je desno od znaka + odmik, ki je uporabljen na prvi %s. <br><b>{000000@x}</b> enako kot prej, vendar se števec resetira na 0, ko se doseže mesec x (x je med 1 in 12). Če je uporabljena ta opcija, ,in je x enak ali večji od 2, je zahtevana tudi sekvenca {yy}{mm} ali {yyyy}{mm}. <br><b>{dd}</b> dan (01 do 31).<br><b>{mm}</b> mesec (01 do 12).<br><b>{yy}</b>, <b>{yyyy}</b> ali <b>{y}</b> leto, izraženo z 2, 4 ali 1 številko. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Vsi ostali znaki v maski bodo ostali nedotaknjeni.<br>Presledki niso dovoljeni.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Primer partnerja 99, kreiranega 2007-03-01:</u><br> GenericMaskCodes4c=<u>Primer proizvoda, kreiranega 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Urejevalniki Module49Desc=Upravljanje urejevalnikov Module50Name=Proizvodi @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=Možnost konverzije GeoIP Maxmind Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Skupine podjetij Module5000Desc=Omogoča upravljaje skupine podjetij -Module6000Name=Potek dela -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Kreiranje/spreminjanje notranjih/zunanjih uporabnikov in d Permission254=Brisanje ali onemogočenje ostalih uporabnikov Permission255=Kreiranje/spreminjanje lastnih uporabniških informacij Permission256=Spreminjanje lastnega gesla -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Branje CA Permission272=Branje računov Permission273=Izdaja računov @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Dogodki v zvezi z nadzorovanjem varnosti +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Nadzor InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=Ta ukaz morate pognati iz ukazne vrstice po prijavi v sistem kot uporabnik <b>%s</b>. YourPHPDoesNotHaveSSLSupport=SSL funkcije niso na voljo v vašem PHP DownloadMoreSkins=Prenos dodatnih preoblek -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Delni prevod @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Koplementarni atributi ExtraFieldsLines=Koplementarni atributi (postavke) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Firstname Name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Računovodska koda prodaje AccountancyCodeBuy=Računovodska koda nabave +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Nastavitev modula za aktivnosti in dnevni red PasswordTogetVCalExport=Ključ za avtorizacijo izvoznega linka +SecurityKey = Security Key PastDelayVCalExport=Ne izvažaj dogodekov, starejših od AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Barva ozadja za lihe vrstice tabele BackgroundTableLineEvenColor=Barva ozadja za sode vrstice tabele MinimumNoticePeriod=Minimalni rok za obvestilo (Vaš zahtevek za odsotnost mora biti podan pred tem rokom) NbAddedAutomatically=Število dodanih dni pri števcu uporabnikov (avtomatsko) vsak mesec -EnterAnyCode=To polje vsebuje referenco identifikacijske vrstice. Vnesite poljubno vrednost, vendar brez posebnih znakov. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sl_SI/banks.lang b/htdocs/langs/sl_SI/banks.lang index 71a06145d5c..7a25b6f14c3 100644 --- a/htdocs/langs/sl_SI/banks.lang +++ b/htdocs/langs/sl_SI/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sl_SI/bills.lang b/htdocs/langs/sl_SI/bills.lang index 2070ff6f437..f2991ee9dc1 100644 --- a/htdocs/langs/sl_SI/bills.lang +++ b/htdocs/langs/sl_SI/bills.lang @@ -52,9 +52,10 @@ Invoices=Računi InvoiceLine=Vrstica računa InvoiceCustomer=Račun za kupca CustomerInvoice=Račun za kupca -CustomersInvoices=Računi za kupce +CustomersInvoices=Fakture za kupce SupplierInvoice=Faktura dobavitelja SuppliersInvoices=Fakture dobaviteljev +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Faktura dobavitelja SupplierBills=Fakture dobaviteljev Payment=Plačilo @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Izvršena plačila PaymentsBackAlreadyDone=Izvedena vračila PaymentRule=Pravilo plačila PaymentMode=Tip plačila +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debetna/Kreditna kartica PaymentTypePP=PayPal IdPaymentMode=Tip plačila (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variabilni znesek (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bančni transfer PaymentTypeShortVIR=Bančni transfer @@ -494,12 +498,16 @@ Cash=Gotovina Reported=Odlog DisabledBecausePayments=Ni možno zaradi nekaterih odprtih plačil CantRemovePaymentWithOneInvoicePaid=Brisanje plačila ni možno, ker je vsaj en račun označen kot plačan +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Pričakovano plačilo CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=Plačano s tem plačilom 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Plačati ToMakePaymentBack=Vrniti plačilo @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Predlaga številko v formatu %syymm-nnnn za standardne račune in %syymm-nnnn za dobropise kjer je yy leto, mm mesec in nnnn zaporedna številka brez presledkov in večja od 0 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Račun z začetkom $syymm že obstaja in ni kompatibilen s tem modelom zaporedja. Odstranite ga ali ga preimenujte za aktiviranje tega modula. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=Račun za prvo situacijo InvoiceFirstSituationDesc=<b>Situacijski računi</b> so vezani na situacijo glede na napredek, na primer na napredek gradnje. Vska situacija je povezana z računom. InvoiceSituation=Situacijski račun +PDFInvoiceSituation=Situacijski račun InvoiceSituationAsk=Račun, ki sledi situaciji InvoiceSituationDesc=Ustvari novo situacijo, ki sledi obstoječi SituationAmount=Vrednost računa za situacijo (neto) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sl_SI/boxes.lang b/htdocs/langs/sl_SI/boxes.lang index 0bd7b6a8519..f0d05cd02f3 100644 --- a/htdocs/langs/sl_SI/boxes.lang +++ b/htdocs/langs/sl_SI/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Zadnje akcije BoxLastContracts=Najnovejše pogodbe BoxLastContacts=Najnovejši stiki/naslovi BoxLastMembers=Najnovejši člani +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Zadnje intervencije BoxCurrentAccounts=Odpri stanje računov BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Zadnje %s novice od %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Računovodstvo +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sl_SI/categories.lang b/htdocs/langs/sl_SI/categories.lang index 187bd536897..34c34fcd4f2 100644 --- a/htdocs/langs/sl_SI/categories.lang +++ b/htdocs/langs/sl_SI/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Področje značk/kategorij kupcev MembersCategoriesArea=Področje značk/kategorij članov ContactsCategoriesArea=Področje značk/kategorij kontaktov -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Pokaži značko/kategorijo ByDefaultInList=Privzeto na seznamu ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sl_SI/companies.lang b/htdocs/langs/sl_SI/companies.lang index 95e4d763b46..0bfae25b4a8 100644 --- a/htdocs/langs/sl_SI/companies.lang +++ b/htdocs/langs/sl_SI/companies.lang @@ -43,9 +43,10 @@ Individual=Posameznik 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=Lastniško podjetje Subsidiaries=Podružnice -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Poročilo po četrtletjih +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Vljudnostni naziv RegisteredOffice=Registrirana poslovalnica Lastname=Priimek @@ -172,14 +173,20 @@ ProfId1ES=(CNAE) ProfId2ES=(Social security number) ProfId3ES=(IAE) ProfId4ES=(Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Prof Id 1 (Registration Number) ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxemburg) ProfId2LU=Id. prof. 2 (Dovoljenje za poslovanje) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN== ProfId2SN== @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof ID 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Trenutni neplačan račun OutstandingBill=Max. za neplačan račun OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Koda kupca / dobavitelja po želji. Lahko jo kadarkoli spremenite. ManagingDirectors=Ime direktorja(ev) (CEO, direktor, predsednik...) MergeOriginThirdparty=Podvojen partner (partner, ki ga želite zbrisati) diff --git a/htdocs/langs/sl_SI/compta.lang b/htdocs/langs/sl_SI/compta.lang index 2f71f9efc4f..41861379acc 100644 --- a/htdocs/langs/sl_SI/compta.lang +++ b/htdocs/langs/sl_SI/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Zbir DDV StatusToPay=Za plačilo SpecialExpensesArea=Področje za posebna plačila +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Plačilo računa kupca PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Plačilo socialnega/fiskalnega davka PaymentVat=Plačilo DDV +AutomaticCreationPayment=Automatically record the payment ListPayment=Seznam plačil ListOfCustomerPayments=Seznam plačil kupcev ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Plačilo LT2PaymentsES=Plačila IRPF VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Vnos datuma prejema čeka 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Poročilo o pobranem in plačanem DDV po kupcih VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg podtip InvoiceLinesToDispatch=Vrstice računa za odpremo ByProductsAndServices=By product and service RefExt=Externa ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Povezava do naročila Mode1=Metoda 1 Mode2=Metoda 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sl_SI/ecm.lang b/htdocs/langs/sl_SI/ecm.lang index b90e1d73431..36cc2a6fce7 100644 --- a/htdocs/langs/sl_SI/ecm.lang +++ b/htdocs/langs/sl_SI/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sl_SI/errors.lang b/htdocs/langs/sl_SI/errors.lang index ef8cfd2d53f..a212d74fcf3 100644 --- a/htdocs/langs/sl_SI/errors.lang +++ b/htdocs/langs/sl_SI/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Mapa <b>%s</b> ni bila najdena (Napačna pot, nimate dovoljenj ErrorFunctionNotAvailableInPHP=Za to opcijo je zahtevana funkcija <b>%s</b>, ki pa ni na voljo v tej verziji/nastavitvah PHP. ErrorDirAlreadyExists=Mapa z enakim imenom že obstaja. ErrorFileAlreadyExists=Datoteka z enakim imenom že obstaja. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=V strežnik ni bila prenešena celotna datoteka. ErrorNoTmpDir=Začasna mapa %s ne obstaja. ErrorUploadBlockedByAddon=PHP/Apache vtičnik je blokiral nalaganje. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sl_SI/externalsite.lang b/htdocs/langs/sl_SI/externalsite.lang index a539e4e6046..e2794de1ed6 100644 --- a/htdocs/langs/sl_SI/externalsite.lang +++ b/htdocs/langs/sl_SI/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup se povezujejo na zunanji strani -ExternalSiteURL=Zunanja stran URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul za zunanjo stran ni bil konfiguriran pravilno ExampleMyMenuEntry=Moj menijski vnos diff --git a/htdocs/langs/sl_SI/main.lang b/htdocs/langs/sl_SI/main.lang index 7f2afe8aebe..696fca76795 100644 --- a/htdocs/langs/sl_SI/main.lang +++ b/htdocs/langs/sl_SI/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Dat.spr. IPModification=Modification IP DateLastModification=Datum zadnje spremembe DateValidation=Datum potrditve +DateSigning=Signing date DateClosing=Datum zaključka DateDue=Datum zapadlosti DateValue=Datum veljavnosti @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Cena enote PriceU=C.E. PriceUHT=C.E. (neto) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=C.E. (z davkom) Amount=Znesek AmountInvoice=Znesek računa @@ -389,6 +390,8 @@ AmountTotal=Skupni znesek AmountAverage=Povprečni znesek PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procent Total=Skupaj SubTotal=Delna vsota @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Trenutni jezik CurrentTheme=Trenutna tema CurrentMenuManager=Trenutni upravljalnik menija @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakti SearchIntoMembers=Člani SearchIntoUsers=Uporabniki SearchIntoProductsOrServices=Proizvodi ali storitve +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekti SearchIntoMO=Manufacturing Orders SearchIntoTasks=Naloge @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Se nanaša na Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sl_SI/margins.lang b/htdocs/langs/sl_SI/margins.lang index 82ef67e05d1..3c620843f04 100644 --- a/htdocs/langs/sl_SI/margins.lang +++ b/htdocs/langs/sl_SI/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Podatki o marži ProductMargins=Marže proizvoda CustomerMargins=Marže kupcev SalesRepresentativeMargins=Marža prodajnega predstavnika +ContactOfInvoice=Contact of invoice UserMargins=Marže uporabnikov ProductService=Proizvod ali storitev AllProducts=Vsi proizvodi in storitve ChooseProduct/Service=Izberi proizvod ali storitev 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Metoda marž pri globalnih popustih UseDiscountAsProduct=Kot proizvod UseDiscountAsService=Kot storitev @@ -31,14 +32,14 @@ MARGIN_TYPE=Privzeto predlagana nabavna cena s stroški za izračun marže MargeType1=Margin on Best vendor price MargeType2=Marža na uravnoteženo povprečno ceno (WAP) MargeType3=Margin on Cost Price -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Stroškovna cena UnitCharges=Stroški po enoti Charges=Stroški AgentContactType=Tip kontakta komercialnega agenta -AgentContactTypeDetails=Določa, kateri tip kontakta (povezava na računu) bo uporabljen za poročilo o maržah po prodajnih predstavnikih +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=Stopnja mora biti numerična vrednost markRateShouldBeLesserThan100=Označena vrednost mora biti manjša od 100 ShowMarginInfos=Prikaži informacije o marži 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). +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). diff --git a/htdocs/langs/sl_SI/members.lang b/htdocs/langs/sl_SI/members.lang index 43b207cd33f..f98d2483e3c 100644 --- a/htdocs/langs/sl_SI/members.lang +++ b/htdocs/langs/sl_SI/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Seznam predlaganih članov (potrebna potrditev) MembersListValid=Seznam potrjenih članov MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Seznam kvalificiranih članov MenuMembersToValidate=Predlagani člani MenuMembersValidated=Potrjeni člani +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Člani, ki morajo plačati članarino MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Pretečen MemberStatusPaid=Posodobljene članarine MemberStatusPaidShort=Posodobljene +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Predlagani člani +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Potrjen @@ -82,6 +87,8 @@ Physical=Fizično Moral=Moralno MorAndPhy=Moral and Physical Reenable=Ponovno omogoči +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Izbriši člana @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format nalepk DescADHERENT_ETIQUETTE_TEXT=Tekst na evidenčnem listu člana @@ -162,6 +170,7 @@ DocForLabels=Ustvari seznam naslovov (Format za izhod dejanske nastavitve: <b>%s SubscriptionPayment=Plačilo naročnine LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Statistika članov po državah MembersStatisticsByState=Statistika članov po deželah MembersStatisticsByTown=Statistika članov po mestih diff --git a/htdocs/langs/sl_SI/modulebuilder.lang b/htdocs/langs/sl_SI/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/sl_SI/modulebuilder.lang +++ b/htdocs/langs/sl_SI/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sl_SI/orders.lang b/htdocs/langs/sl_SI/orders.lang index 637417dddd2..67146107a56 100644 --- a/htdocs/langs/sl_SI/orders.lang +++ b/htdocs/langs/sl_SI/orders.lang @@ -16,6 +16,8 @@ ToOrder=Potrebno naročiti MakeOrder=Izdelaj naročilo SupplierOrder=Nabavni nalog SuppliersOrders=Nabavni nalogi +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Trenutni nabavni nalogi CustomerOrder=Naročilo CustomersOrders=Naročila diff --git a/htdocs/langs/sl_SI/other.lang b/htdocs/langs/sl_SI/other.lang index e5b75647b50..1ead2e7ba58 100644 --- a/htdocs/langs/sl_SI/other.lang +++ b/htdocs/langs/sl_SI/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Kreiral %s ModifiedBy=Spremenil %s ValidatedBy=Potrdil %s +SignedBy=Signed by %s ClosedBy=Zaključil %s CreatedById=ID uporabnika, ki je ustvaril ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=To so vaši novi podatki za prijavo NewKeyWillBe=Vaši novi podatki za prijavo v program bodo ClickHereToGoTo=K.iknite tukaj za vstop v %s YouMustClickToChange=Vendar morate najprej klikniti na naslednji link za potrditev spremembe gesla +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Če niste zahtevali te spremembe, enostavno pozabite na ta email. Vaši prijavni podatki so varno shranjeni. IfAmountHigherThan=Če je znesek večji od <strong>%s</strong> SourcesRepository=Shramba virov diff --git a/htdocs/langs/sl_SI/productbatch.lang b/htdocs/langs/sl_SI/productbatch.lang index 80b78d893bc..5f2d0d4391a 100644 --- a/htdocs/langs/sl_SI/productbatch.lang +++ b/htdocs/langs/sl_SI/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Da +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ne Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sl_SI/products.lang b/htdocs/langs/sl_SI/products.lang index 7fb5405f77f..80844772fa8 100644 --- a/htdocs/langs/sl_SI/products.lang +++ b/htdocs/langs/sl_SI/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Vnaprej določeni proizvodi/storitve za prodajo @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Pravilno posodobljeno PropalMergePdfProductActualFile=Datoteke za dodatek k PDF Azur so/je PropalMergePdfProductChooseFile=Izberi PDF datoteke -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Privzeta cena, dejanska cena je odvisna od kupca WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Enota diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 452a680f3b5..369419c4bd9 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sl_SI/propal.lang b/htdocs/langs/sl_SI/propal.lang index b09b8e05d61..be279d8ba0f 100644 --- a/htdocs/langs/sl_SI/propal.lang +++ b/htdocs/langs/sl_SI/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Pošlji komercialno ponudbo po pošti DatePropal=Datum ponudbe DateEndPropal=Datum veljavnosti ponudbe ValidityDuration=Trajanje veljavnosti -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Ponudbe %s ne najdem AddToDraftProposals=Dodaj osnutku ponudbe @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Komercialna ponudba in vrstice ProposalLine=Vrstica ponudbe +ProposalLines=Proposal lines AvailabilityPeriod=Dobavni rok SetAvailability=Nastavi dobavni rok AfterOrder=od naročila @@ -85,3 +85,8 @@ ProposalCustomerSignature=Pisna potrditev, žig podjetja, datum in podpis 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/sl_SI/stocks.lang b/htdocs/langs/sl_SI/stocks.lang index b46640afdac..5ba283a55d1 100644 --- a/htdocs/langs/sl_SI/stocks.lang +++ b/htdocs/langs/sl_SI/stocks.lang @@ -19,8 +19,8 @@ Stock=Zaloga Stocks=Zaloge MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zaloga po lotu/serijski številki LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Lokacija -LocationSummary=Kratko ime lokacije -NumberOfDifferentProducts=Število različnih proizvodov +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Skupno število proizvodov LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Vrednost skladišč 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 cena -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Prodajna cena za enoto EstimatedStockValueSellShort=Prodajna vrednost EstimatedStockValueSell=Prodajna vrednost @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Prevzem tega naročila StockMovementRecorded=Zapisan premik zaloge @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Nalepka gibanja -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Koda gibanja ali zaloge IsInPackage=Vsebina paketa @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sl_SI/suppliers.lang b/htdocs/langs/sl_SI/suppliers.lang index 4d36a165272..3d8988b89e7 100644 --- a/htdocs/langs/sl_SI/suppliers.lang +++ b/htdocs/langs/sl_SI/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Fakture dobaviteljev +SupplierInvoices=Fakture dobaviteljev ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Zgodovina diff --git a/htdocs/langs/sl_SI/ticket.lang b/htdocs/langs/sl_SI/ticket.lang index c8506ca6800..91ff26bb370 100644 --- a/htdocs/langs/sl_SI/ticket.lang +++ b/htdocs/langs/sl_SI/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tip Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sl_SI/users.lang b/htdocs/langs/sl_SI/users.lang index dc70d4adfde..c972ea9c230 100644 --- a/htdocs/langs/sl_SI/users.lang +++ b/htdocs/langs/sl_SI/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Odstrani iz skupine PasswordChangedAndSentTo=Geslo spremenjeno in poslano <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Zahtevek za spremembo gesla <b>%s</b> poslan <b>%s</b>. +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=Uporabniki & Skupine LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Uporabnik domene %s Reactivate=Ponovno aktiviraj 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Dovoljenje dodeljeno zaradi podedovanja od druge uporabniške skupine. Inherited=Podedovan +UserWillBe=Created user will be UserWillBeInternalUser=Kreiran uporabnik bo interni uporabnik (ker ni povezan z določenim partnerjem) UserWillBeExternalUser=Kreiran uporabnik bo zunanji uporabnik (ker je povezan z določenim partnerjem) IdPhoneCaller=ID klicatelja po telefonu @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/sl_SI/website.lang b/htdocs/langs/sl_SI/website.lang index 26e7a852a93..73e092221d8 100644 --- a/htdocs/langs/sl_SI/website.lang +++ b/htdocs/langs/sl_SI/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Preberite WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sl_SI/zapier.lang b/htdocs/langs/sl_SI/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sl_SI/zapier.lang +++ b/htdocs/langs/sl_SI/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/sq_AL/accountancy.lang b/htdocs/langs/sq_AL/accountancy.lang index b2c8f38576a..cf63cf33a99 100644 --- a/htdocs/langs/sq_AL/accountancy.lang +++ b/htdocs/langs/sq_AL/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Lidh @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index ce21ede1d21..ce7acbd1055 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Sesioni juaj Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Konfigurimet e sigurisё +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=Gabim, ky modul kërkon PHP version %s ose më të lartë ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %s or higher @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Spastro PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=Spastro tani @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Produkte @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Lexo CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sq_AL/banks.lang b/htdocs/langs/sq_AL/banks.lang index 6feb31b8e9c..550abf21df5 100644 --- a/htdocs/langs/sq_AL/banks.lang +++ b/htdocs/langs/sq_AL/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sq_AL/bills.lang b/htdocs/langs/sq_AL/bills.lang index 43b1a6ce65e..8445a107298 100644 --- a/htdocs/langs/sq_AL/bills.lang +++ b/htdocs/langs/sq_AL/bills.lang @@ -52,11 +52,12 @@ Invoices=Faturat InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sq_AL/boxes.lang b/htdocs/langs/sq_AL/boxes.lang index c5cf2d90ba8..ac4d7487c63 100644 --- a/htdocs/langs/sq_AL/boxes.lang +++ b/htdocs/langs/sq_AL/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Veprimet e fundit BoxLastContracts=Kontratat e fundit BoxLastContacts=Kontaktet/Adresat e fundit BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sq_AL/categories.lang b/htdocs/langs/sq_AL/categories.lang index 66125ff271d..a5d69cc6d3c 100644 --- a/htdocs/langs/sq_AL/categories.lang +++ b/htdocs/langs/sq_AL/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sq_AL/companies.lang b/htdocs/langs/sq_AL/companies.lang index 63049256431..067cf0318cf 100644 --- a/htdocs/langs/sq_AL/companies.lang +++ b/htdocs/langs/sq_AL/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Mbiemri @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/sq_AL/compta.lang b/htdocs/langs/sq_AL/compta.lang index c587a416989..2a67833777f 100644 --- a/htdocs/langs/sq_AL/compta.lang +++ b/htdocs/langs/sq_AL/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sq_AL/ecm.lang b/htdocs/langs/sq_AL/ecm.lang index 9fd3b1f30cd..29f3fa1f5bf 100644 --- a/htdocs/langs/sq_AL/ecm.lang +++ b/htdocs/langs/sq_AL/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sq_AL/errors.lang b/htdocs/langs/sq_AL/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/sq_AL/errors.lang +++ b/htdocs/langs/sq_AL/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sq_AL/externalsite.lang b/htdocs/langs/sq_AL/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/sq_AL/externalsite.lang +++ b/htdocs/langs/sq_AL/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sq_AL/main.lang b/htdocs/langs/sq_AL/main.lang index ba2fa0a111d..7dab8226cc8 100644 --- a/htdocs/langs/sq_AL/main.lang +++ b/htdocs/langs/sq_AL/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sq_AL/margins.lang b/htdocs/langs/sq_AL/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/sq_AL/margins.lang +++ b/htdocs/langs/sq_AL/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/sq_AL/members.lang b/htdocs/langs/sq_AL/members.lang index 3625ff0de68..a6d98ca17c5 100644 --- a/htdocs/langs/sq_AL/members.lang +++ b/htdocs/langs/sq_AL/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/sq_AL/modulebuilder.lang b/htdocs/langs/sq_AL/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/sq_AL/modulebuilder.lang +++ b/htdocs/langs/sq_AL/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sq_AL/orders.lang b/htdocs/langs/sq_AL/orders.lang index 0e5aa8847fc..2ed1b8af62e 100644 --- a/htdocs/langs/sq_AL/orders.lang +++ b/htdocs/langs/sq_AL/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email 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=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/sq_AL/other.lang b/htdocs/langs/sq_AL/other.lang index 9540d523083..afd043c5f78 100644 --- a/htdocs/langs/sq_AL/other.lang +++ b/htdocs/langs/sq_AL/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/sq_AL/productbatch.lang b/htdocs/langs/sq_AL/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/sq_AL/productbatch.lang +++ b/htdocs/langs/sq_AL/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sq_AL/products.lang b/htdocs/langs/sq_AL/products.lang index 93dc7f8448c..807f8af9cd0 100644 --- a/htdocs/langs/sq_AL/products.lang +++ b/htdocs/langs/sq_AL/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index 93142ff9135..87655a4d973 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sq_AL/propal.lang b/htdocs/langs/sq_AL/propal.lang index 959d624ee89..7f8918787cc 100644 --- a/htdocs/langs/sq_AL/propal.lang +++ b/htdocs/langs/sq_AL/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/sq_AL/stocks.lang b/htdocs/langs/sq_AL/stocks.lang index 666ede4efd4..87aa4916cc9 100644 --- a/htdocs/langs/sq_AL/stocks.lang +++ b/htdocs/langs/sq_AL/stocks.lang @@ -19,8 +19,8 @@ Stock=Stok Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Vendndodhja -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sq_AL/suppliers.lang b/htdocs/langs/sq_AL/suppliers.lang index b50aa118719..f62604b677e 100644 --- a/htdocs/langs/sq_AL/suppliers.lang +++ b/htdocs/langs/sq_AL/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/sq_AL/ticket.lang b/htdocs/langs/sq_AL/ticket.lang index 5f259230780..8e7d22fb4e0 100644 --- a/htdocs/langs/sq_AL/ticket.lang +++ b/htdocs/langs/sq_AL/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sq_AL/users.lang b/htdocs/langs/sq_AL/users.lang index 0c2b2d29677..736243e4ee5 100644 --- a/htdocs/langs/sq_AL/users.lang +++ b/htdocs/langs/sq_AL/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/sq_AL/website.lang b/htdocs/langs/sq_AL/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/sq_AL/website.lang +++ b/htdocs/langs/sq_AL/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sq_AL/zapier.lang b/htdocs/langs/sq_AL/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sq_AL/zapier.lang +++ b/htdocs/langs/sq_AL/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/sr_RS/accountancy.lang b/htdocs/langs/sr_RS/accountancy.lang index 0f47b67db83..c95be506b7a 100644 --- a/htdocs/langs/sr_RS/accountancy.lang +++ b/htdocs/langs/sr_RS/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Izveštaj JournalLabel=Journal label NumPiece=Deo broj TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/sr_RS/admin.lang b/htdocs/langs/sr_RS/admin.lang index e7d50480139..8e44e169e68 100644 --- a/htdocs/langs/sr_RS/admin.lang +++ b/htdocs/langs/sr_RS/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Ukloni YourSession=Vaša sesija Sessions=Users Sessions WebUserGroup=Web server korisnik/grupa +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sr_RS/banks.lang b/htdocs/langs/sr_RS/banks.lang index 0a1a42832d4..9d4798fc10e 100644 --- a/htdocs/langs/sr_RS/banks.lang +++ b/htdocs/langs/sr_RS/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sr_RS/bills.lang b/htdocs/langs/sr_RS/bills.lang index 2681e6d7762..495c4c104d7 100644 --- a/htdocs/langs/sr_RS/bills.lang +++ b/htdocs/langs/sr_RS/bills.lang @@ -52,11 +52,12 @@ Invoices=Računi InvoiceLine=Linija na računu InvoiceCustomer=Račun kupca CustomerInvoice=Račun kupca -CustomersInvoices=Računi kupaca +CustomersInvoices=Fakture klijenata SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=računi dobavljača +SupplierBills=Vendor invoices Payment=Plaćanje PaymentBack=Povraćaj CustomerInvoicePaymentBack=Povraćaj @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Plaćanje već izvršeno PaymentsBackAlreadyDone=Refunds already done PaymentRule=Pravilo za plaćanje PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Datum najskorijeg generisanja DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Potvrdi račune automatski @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=U roku od 14 dana od poslednjeg dana u tekućem mese FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variable amount (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bankovni prenos PaymentTypeShortVIR=Bankovni prenos @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s račun(a) kreirano +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sr_RS/boxes.lang b/htdocs/langs/sr_RS/boxes.lang index 9f9318be2df..9970ca505c7 100644 --- a/htdocs/langs/sr_RS/boxes.lang +++ b/htdocs/langs/sr_RS/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Otvoreno stanje računa BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Računovodstvo +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sr_RS/categories.lang b/htdocs/langs/sr_RS/categories.lang index f72f3351441..1799529dde1 100644 --- a/htdocs/langs/sr_RS/categories.lang +++ b/htdocs/langs/sr_RS/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Oblast naziva/kategorije dobavljača MembersCategoriesArea=Oblast naziva/kategorije članova ContactsCategoriesArea=Oblast naziva/kategorija kontakata -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Prikaži naziv/kategoriju ByDefaultInList=Podrazumevano u listi ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sr_RS/companies.lang b/htdocs/langs/sr_RS/companies.lang index 154132b33da..4a1049a918d 100644 --- a/htdocs/langs/sr_RS/companies.lang +++ b/htdocs/langs/sr_RS/companies.lang @@ -43,9 +43,10 @@ Individual=Fizičko lice 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=Osnovna kompanija Subsidiaries=SubsidiariesPoslovnice -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Izveštaj po kursu +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Prijavni kod RegisteredOffice=Registrovane kancelarije Lastname=Prezime @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luksemburg) ProfId2LU=Id. prof. 2 (Radna dozvola) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Ime menadžera (CEO, direktor, predsednik...) MergeOriginThirdparty=Duplirani subjekt (subjekt kojeg želite obrisati) diff --git a/htdocs/langs/sr_RS/compta.lang b/htdocs/langs/sr_RS/compta.lang index 122fa300178..64e0a53d9d9 100644 --- a/htdocs/langs/sr_RS/compta.lang +++ b/htdocs/langs/sr_RS/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=Prihodovani PDV StatusToPay=Za plaćanje SpecialExpensesArea=Oblast za sve posebne uplate +VATExpensesArea=Area for all TVA payments SocialContribution=Socijalni i poreski trošak SocialContributions=Socijalni i poreski troškovi SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Uplata po računu klijenta PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Uplata poreza/doprinosa PaymentVat=PDV uplata +AutomaticCreationPayment=Automatically record the payment ListPayment=Lista uplata ListOfCustomerPayments=Lista uplata klijenata ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF uplata LT2PaymentsES=IRPF uplate VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Datum prijema čeka NbOfCheques=No. of checks PaySocialContribution=Uplati porez/doprinose -ConfirmPaySocialContribution=Da li ste sigurni da želite da označite ovaj porez/doprinos kao plaćen ? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Obriši uplatu poreza/doprinosa -ConfirmDeleteSocialContribution=Da li ste sigurni da želite da obrišete ovu uplatu poreza/doprinosa ? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Uplate poreza/doprinosa CalcModeVATDebt=Mod <b>%sPDV u posvećenom računovodstvu%s</b>. CalcModeVATEngagement=Mod <b>%sPDV na prihodima-rashodima%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Sadrži realne uplate računa, troškova, PDV-a i zarada.<br> RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=Izveštaj po prihodovanom i isplaćenom PDV-u po subjektu VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Izveštaj po RE kursu @@ -217,7 +231,7 @@ Pcg_subtype=Pcg pod-tip InvoiceLinesToDispatch=Linije fakture za otpremu ByProductsAndServices=By product and service RefExt=Eksterna ref. -ToCreateAPredefinedInvoice=Da kreirate šablon fakture, kreirajte običnu fakturu pa onda, bez potvrđivanja, kliknite na dugme "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link ka narudžbini Mode1=Metoda 1 Mode2=Metoda 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Dupliraj za sledeći mesec SimpleReport=Skraćeni izveštaj AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sr_RS/ecm.lang b/htdocs/langs/sr_RS/ecm.lang index 6db486d990a..7ced4e58d7f 100644 --- a/htdocs/langs/sr_RS/ecm.lang +++ b/htdocs/langs/sr_RS/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sr_RS/errors.lang b/htdocs/langs/sr_RS/errors.lang index 29ba9a69da3..b52a21dbc85 100644 --- a/htdocs/langs/sr_RS/errors.lang +++ b/htdocs/langs/sr_RS/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Folder <b>%s</b> nije pronađen (pogrešna putanja, nedovoljna ErrorFunctionNotAvailableInPHP=Funkcija <b>%s</b> je neophodna za ovu funkcionalnost, ali nije dostupna u ovoj verziji/konfiguraciji PHP-a. ErrorDirAlreadyExists=Folder sa ovim imenom već postoji. ErrorFileAlreadyExists=Fajl sa ovim imenom već postoji. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Fajl nije u celosti primljen na server. ErrorNoTmpDir=Privremeni folder %s ne postoji. ErrorUploadBlockedByAddon=Upload blokiran PHP/Apache pluginom. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sr_RS/externalsite.lang b/htdocs/langs/sr_RS/externalsite.lang index 2fbe6351fef..7f81e5e93ed 100644 --- a/htdocs/langs/sr_RS/externalsite.lang +++ b/htdocs/langs/sr_RS/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Podesi link ka eksternom sajtu -ExternalSiteURL=Link eksternog sajta +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul eksterni sajt nije ispravno konfigurisan. ExampleMyMenuEntry=Stavka iz mog menija diff --git a/htdocs/langs/sr_RS/main.lang b/htdocs/langs/sr_RS/main.lang index 1630acdddf6..76649f882eb 100644 --- a/htdocs/langs/sr_RS/main.lang +++ b/htdocs/langs/sr_RS/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Dat. izmene IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Datum odobrenja +DateSigning=Signing date DateClosing=Datum zatvaranja DateDue=Rok DateValue=Datum vrednosti @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Jedinična cena PriceU=J.C. PriceUHT=J.C. (neto) -PriceUHTCurrency=U.P (valuta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=J.C. (bruto) Amount=Iznos AmountInvoice=Iznos računa @@ -389,6 +390,8 @@ AmountTotal=Ukupan iznos AmountAverage=Prosečan iznos PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procenat Total=Total SubTotal=Zbir @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Aktivni jezik CurrentTheme=Aktivna tema CurrentMenuManager=Aktivni menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakti SearchIntoMembers=Članovi SearchIntoUsers=Korisnici SearchIntoProductsOrServices=Proizvodi ili usluge +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekti SearchIntoMO=Manufacturing Orders SearchIntoTasks=Zadaci @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Dodeljeno Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sr_RS/margins.lang b/htdocs/langs/sr_RS/margins.lang index b94a04bd436..609fad9ba10 100644 --- a/htdocs/langs/sr_RS/margins.lang +++ b/htdocs/langs/sr_RS/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Detalji marže ProductMargins=Marže proizvoda CustomerMargins=Marže klijenta SalesRepresentativeMargins=Marže agenta prodaje +ContactOfInvoice=Contact of invoice UserMargins=Korisničke marže ProductService=Proizvod ili Usluga AllProducts=Svi proizvodi i usluge ChooseProduct/Service=Izaberi proizvod ili uslugu ForceBuyingPriceIfNull=Frsiraj nabavnu cenu na prodajnu cenu ukoliko nije definisana -ForceBuyingPriceIfNullDetails=Ukoliko nabavna cena nije definisana i ova opcija je aktivna, marža će biti nula za ovu liniju (nabavna cena = prodajna cena). U suprotnom, marža će biti jednaka default vrednosti. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Metoda marže za globalne popuste UseDiscountAsProduct=Kao proizvod UseDiscountAsService=Kao usluga @@ -31,14 +32,14 @@ MARGIN_TYPE=Default nabavna cena za računanje marže MargeType1=Margin on Best vendor price MargeType2=Marža na prosečnu cenu (PC) MargeType3=Marža na cenu koštanja -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=Cena koštanja UnitCharges=Unitarni troškovi Charges=Troškovi AgentContactType=Tip kontakta komercijalnog agenta -AgentContactTypeDetails=Definiše tip kontakta (povezan sa fakturom) koji će biti korišćen za izveštaj marže po agentu prodaje +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=Stopa mora biti numerička markRateShouldBeLesserThan100=Stopa marže mora biti niža od 100 ShowMarginInfos=Prikaži informacije marže 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). +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). diff --git a/htdocs/langs/sr_RS/members.lang b/htdocs/langs/sr_RS/members.lang index 6501fc03581..9999a186486 100644 --- a/htdocs/langs/sr_RS/members.lang +++ b/htdocs/langs/sr_RS/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Lista draft članova (za potvrdu) MembersListValid=Lista potvrđenih članova MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=Lista kvalifikovanih članova MenuMembersToValidate=Draft članovi MenuMembersValidated=Potvrđeni članovi +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Članovi koji treba da prime pretplatu MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Istekla MemberStatusPaid=Pretplata je ažurna MemberStatusPaidShort=Ažurna +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft članovi +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Potvrđen @@ -82,6 +87,8 @@ Physical=Fizičko Moral=Pravno MorAndPhy=Moral and Physical Reenable=Ponovo aktiviraj +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Obriši člana @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format strane naziva DescADHERENT_ETIQUETTE_TEXT=Tekst odštampan na karticama adresa članova @@ -162,6 +170,7 @@ DocForLabels=Generiši karticu adrese SubscriptionPayment=Uplata pretplate LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Statistike članova po zemlji MembersStatisticsByState=Statistike članova po regionu MembersStatisticsByTown=Statistike članova po gradu diff --git a/htdocs/langs/sr_RS/modulebuilder.lang b/htdocs/langs/sr_RS/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/sr_RS/modulebuilder.lang +++ b/htdocs/langs/sr_RS/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sr_RS/orders.lang b/htdocs/langs/sr_RS/orders.lang index 81c0bc994b7..4c3705086e5 100644 --- a/htdocs/langs/sr_RS/orders.lang +++ b/htdocs/langs/sr_RS/orders.lang @@ -16,6 +16,8 @@ ToOrder=Kreiraj narudžbinu MakeOrder=Kreiraj narudžbinu SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email 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žbine PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Naplata narudžbina +CreateInvoiceForThisSupplier=Naplata narudžbina NoOrdersToInvoice=Nema naplativih narudžbina CloseProcessedOrdersAutomatically=Označi sve selektovane narudžbine kao "Obrađene". OrderCreation=Kreacija narudžbine diff --git a/htdocs/langs/sr_RS/other.lang b/htdocs/langs/sr_RS/other.lang index 6abb3f27b1a..f3d16baa5b7 100644 --- a/htdocs/langs/sr_RS/other.lang +++ b/htdocs/langs/sr_RS/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Kreirao %s ModifiedBy=Izmenio %s ValidatedBy=Potvrdio %s +SignedBy=Signed by %s ClosedBy=Zatvorio %s CreatedById=ID korisnika koji je kreirao ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=Ovo su nove informacije za login NewKeyWillBe=Vaša nova informacija za login za softver će biti ClickHereToGoTo=Kliknite ovde da otvorite %s YouMustClickToChange=Prvo morate kliknuti sledeći link da biste potvrdili promenu lozinke +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Ukoliko niste tražili ovu promenu, zaboravite na ovaj email. Vaši parametri za konekciju su bezbedni. IfAmountHigherThan=Ukoliko je iznos veći od <strong>%s</strong> SourcesRepository=Repository koda diff --git a/htdocs/langs/sr_RS/productbatch.lang b/htdocs/langs/sr_RS/productbatch.lang index ab098fa1139..01d589671dc 100644 --- a/htdocs/langs/sr_RS/productbatch.lang +++ b/htdocs/langs/sr_RS/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Koristi serijski broj -ProductStatusOnBatch=Da (serijski broj obavezan) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Ne (serijski broj se ne koristi) -ProductStatusOnBatchShort=Da +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ne Batch=Serija atleast1batchfield=Rok trajanja ili rok prodaje serije @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sr_RS/products.lang b/htdocs/langs/sr_RS/products.lang index 1df147564f2..a55e635e9d7 100644 --- a/htdocs/langs/sr_RS/products.lang +++ b/htdocs/langs/sr_RS/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefinisani proizvodi/usluge za prodaju @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Uspešno ažurirano PropalMergePdfProductActualFile=Fajlovi za dodavanje u PDF Azur su PropalMergePdfProductChooseFile=Selektiraj PDF fajlove -IncludingProductWithTag=Uključivanje proizvoda/usluge sa tagom +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default cena, realna cena može zavisiti od klijenta WarningSelectOneDocument=Molimo izaberite barem jedan dokument DefaultUnitToShow=Jedinica diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index 931194501ee..e50f21a77c8 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Lista zadataka GoToListOfTimeConsumed=Idi na listu utrošenog vremena GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sr_RS/propal.lang b/htdocs/langs/sr_RS/propal.lang index b67ab91efbb..dfc9d754cd3 100644 --- a/htdocs/langs/sr_RS/propal.lang +++ b/htdocs/langs/sr_RS/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Pošalji komercijalnu poudu mailom DatePropal=Datum ponude DateEndPropal=Kraj validnosti ValidityDuration=Trajanje validnosti -CloseAs=Postavi status na SetAcceptedRefused=Postavi prihvaćen/odbijen ErrorPropalNotFound=Ponuda %s nije pronađena AddToDraftProposals=Ubaci u draft ponude @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Komercijalna ponuda i linije ProposalLine=Linija ponude +ProposalLines=Proposal lines AvailabilityPeriod=Čekanje dostupnosti SetAvailability=Postavi trajanje čekanja dostupnosti AfterOrder=posle narudžbine @@ -85,3 +85,8 @@ ProposalCustomerSignature=Pismeno odobrenje, pečat kompanije, datum i potpis 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/sr_RS/stocks.lang b/htdocs/langs/sr_RS/stocks.lang index d33ab3c5d47..c5c04628b64 100644 --- a/htdocs/langs/sr_RS/stocks.lang +++ b/htdocs/langs/sr_RS/stocks.lang @@ -19,8 +19,8 @@ Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Zalihe po seriji LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Lokacija -LocationSummary=Kratak naziv lokacije -NumberOfDifferentProducts=Broj različitih proizvoda +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Ukupan broj proizvoda LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Vrednost magacina 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Id magacina DescWareHouse=Opis magacina LieuWareHouse=Lokacija magacina WarehousesAndProducts=Magacini i proizvodi WarehousesAndProductsBatchDetail=Magacini i proizvodi (sa detaljima po seriji) AverageUnitPricePMPShort=Prosecna cena -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Jedinična prodajna cena EstimatedStockValueSellShort=Prodajna vrednost EstimatedStockValueSell=Prodajna vrednost @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Prijemnice za ovu narudžbinu StockMovementRecorded=Snimljeni prometi zalihe @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Naziv prometa -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Promet ili inventarski kod IsInPackage=Sadržan u paketu @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Ponovo Otvoreno +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sr_RS/suppliers.lang b/htdocs/langs/sr_RS/suppliers.lang index 1bcdd369ceb..60fd4cbf67f 100644 --- a/htdocs/langs/sr_RS/suppliers.lang +++ b/htdocs/langs/sr_RS/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Istorija diff --git a/htdocs/langs/sr_RS/ticket.lang b/htdocs/langs/sr_RS/ticket.lang index 35102542484..b465760e3c8 100644 --- a/htdocs/langs/sr_RS/ticket.lang +++ b/htdocs/langs/sr_RS/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Tip Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sr_RS/users.lang b/htdocs/langs/sr_RS/users.lang index 10c117a0372..e68094fa8e9 100644 --- a/htdocs/langs/sr_RS/users.lang +++ b/htdocs/langs/sr_RS/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Izbaci iz grupe PasswordChangedAndSentTo=Lozinka izmenjena i poslata na <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Zahtev za izmenu lozinke za <b>%s</b> je poslat <b>%s</b>. +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=Korisnici & Grupe LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Korisnik domena %s Reactivate=Reaktiviraj 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Prava su dodeljena jer su nasleđena od jedne od korisnikovih grupa. Inherited=Nasleđeno +UserWillBe=Created user will be UserWillBeInternalUser=Kreirani korisnik će biti interni korisnik (jer nije vezan za određeni subjekat) UserWillBeExternalUser=Kreirani korisnik će biti eksterni (jer je vezan za određeni subjekat) IdPhoneCaller=Id telefonskog poziva @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/sr_RS/website.lang b/htdocs/langs/sr_RS/website.lang index baa3b7e08c8..95a950372c2 100644 --- a/htdocs/langs/sr_RS/website.lang +++ b/htdocs/langs/sr_RS/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Pročitaj WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sr_RS/zapier.lang b/htdocs/langs/sr_RS/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sr_RS/zapier.lang +++ b/htdocs/langs/sr_RS/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/sv_SE/accountancy.lang b/htdocs/langs/sv_SE/accountancy.lang index 384ab4af6a9..38747956cd0 100644 --- a/htdocs/langs/sv_SE/accountancy.lang +++ b/htdocs/langs/sv_SE/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bundet linjer med fakturor ExpenseReportLines=Kostnadsberäkningar rapporterar att förbinda ExpenseReportLinesDone=Förbundna utgiftsrapporter IntoAccount=Bind rad med bokföringskonto -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Binda @@ -209,7 +209,7 @@ Codejournal=Loggbok JournalLabel=Loggboksetikett NumPiece=Stycke nummer TransactionNumShort=Num. transaktion -AccountingCategory=Personliga grupper +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Här kan du definiera vissa grupper av bokföringskonto. De kommer att användas för personliga redovisningsrapporter. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Linjer som ännu inte är bundna, använd menyn <a hr ## Import ImportAccountingEntries=Redovisningsposter +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Date export WarningReportNotReliable=Varning, den här rapporten är inte baserad på huvudboken-modulen, så den innehåller inte transaktioner modifierad manuellt i huvudboken. Om din bokföring är uppdaterad är bokföringsvisningen mer exakt. ExpenseReportJournal=Kostnadsrapportsloggbok InventoryJournal=Inventarieloggbok + +NAccounts=%s accounts diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index 68ba4a916a7..75f460ddcd6 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Ta bort lås för anslutning YourSession=Din session Sessions=Användarsessioner WebUserGroup=Webbserver användare / grupp +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Behörigheter på fil %s NoSessionFound=Din PHP-konfiguration verkar inte tillåta att du registrerar aktiva sessioner. Den katalog som används för att spara sessioner (<b> %s </b>) kan skyddas (till exempel av operatörsbehörigheter eller genom PHP-direktivet open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Anm: ja effektivt endast om modul <b>%s</b> är aktiverat RemoveLock=Ta bort / byt namn på filen <b> %s </b> om den existerar, för att tillåta användning av Update / Install-verktyget. RestoreLock=Återställ fil <b> %s </b>, endast med läsbehörighet, för att inaktivera ytterligare användning av Update / Install-verktyget. SecuritySetup=Säkerhets inställning +PHPSetup=PHP setup SecurityFilesDesc=Definiera här alternativ relaterade till säkerhet om uppladdning av filer. ErrorModuleRequirePHPVersion=Fel, kräver denna modul PHP version %s eller högre ErrorModuleRequireDolibarrVersion=Fel, kräver denna modul Dolibarr version %s eller högre @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Detta område ger administrationsfunktioner. Använd menyn f Purge=Rensa PurgeAreaDesc=På den här sidan kan du radera alla filer som genereras eller lagras av Dolibarr (temporära filer eller alla filer i <b> %s </b> katalog). Att använda den här funktionen är normalt inte nödvändig. Den tillhandahålls som en lösning för användare vars Dolibarr är värd av en leverantör som inte erbjuder behörigheter för att radera filer som genereras av webbservern. PurgeDeleteLogFile=Ta bort loggfiler, inklusive <b> %s </b> definierad för Syslog-modulen (ingen risk att förlora data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Ta bort alla filer i katalogen: <b> %s </b>. <br> Detta tar bort alla genererade dokument relaterade till elementer (tredje part, fakturor etc ...), filer som laddas upp i ECM-modulen, databassäkerhetskopior och tillfälliga filer. PurgeRunNow=Rensa nu @@ -232,6 +234,7 @@ BoxesAvailable=Widgets tillgängliga BoxesActivated=Widgets aktiverade ActivateOn=Aktivera på ActiveOn=Aktiverad på +ActivatableOn=Activatable on SourceFile=Källfil AvailableOnlyIfJavascriptAndAjaxNotDisabled=Endast tillgängligt om JavaScript är inte oduglig Required=Obligatorisk @@ -347,9 +350,10 @@ LastActivationAuthor=Senaste aktiveringsförfattaren LastActivationIP=Senaste aktivering IP UpdateServerOffline=Uppdatera server offline WithCounter=Hantera en räknare -GenericMaskCodes=Du kan ange någon numrering mask. I denna mask skulle följande taggar användas: <br> <b>(000000)</b> motsvarar ett antal som kommer att ökas på varje %s. Ange så många nollor som den önskade längden på disken. Räknaren kommer att fyllas ut med nollor från vänster för att få så många nollor som masken. <br> <b>(000000 000)</b> samma som tidigare men en kompensation som motsvarar det antal till höger om tecknet + tillämpas med början den första %s. <br> <b>(000000 @ x)</b> samma som tidigare, men räknaren återställs till noll när månaden x uppnås (x mellan 1 och 12). Om detta alternativ används och x är 2 eller högre, då sekvensen (yy) (mm) eller (ÅÅÅÅ) (mm) krävs också. <br> <b>(Dd)</b> dag (01 till 31). <br> <b>(Mm)</b> månad (01 till 12). <br> <b>(Yy), (ÅÅÅÅ) eller (y)</b> år under 2, 4 eller ett nummer. <br> -GenericMaskCodes2= <b> {cccc} </b> klientkoden på n tecken <br> <b> {cccc000} </b> klientkoden på n tecken följs av en räknare som är dedikerad till kunden. Denna räknare som är dedikerad till kunden återställs samtidigt som den globala räknaren. <br> <b> {tttt} </b> Koden för tredjepartstyp på n tecken (se menyn Hem - Inställning - Ordbok - Typer av tredje part). Om du lägger till den här taggen kommer räknaren att vara olika för varje typ av tredje part. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Alla andra tecken i masken förblir intakt. <br> Blanksteg är inte tillåtna. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a= <u> Exempel på 99: e %s från tredje part TheCompany, med datum 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Exempel på tredje part som har skapats på 2007/03/01:</u> <br> GenericMaskCodes4c=<u>Exempel på artikel skapad 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Om du lämnar fältet tomt betyder det att detta vä ExtrafieldParamHelpselect=Förteckning över värden måste vara linjer med formatnyckel, värde (där nyckel inte kan vara '0') <br> <br> till exempel: <br> 1, värde1 <br> 2, värde2 <br> code3, värde3 <br> ... <br> <br> För att få lista beroende på en annan komplementär attributlista: <br> 1, värde1 | options_ <i> parent_list_code </i>: parent_key <br> 2, value2 | options_ <i> parent_list_code </i>: parent_key <br> <br> För att få listan beroende på en annan lista: <br> 1, värde1 | <i> parent_list_code </i>: parent_key <br> 2, värde2 | <i> parent_list_code </i>: parent_key ExtrafieldParamHelpcheckbox=Lista över värden måste vara rader med formatnyckel, värde (där nyckel inte kan vara '0') <br> <br> till exempel: <br> 1, värde1 <br> 2, värde2 <br> 3, värde3 <br> ... ExtrafieldParamHelpradio=Lista över värden måste vara rader med formatnyckel, värde (där nyckel inte kan vara '0') <br> <br> till exempel: <br> 1, värde1 <br> 2, värde2 <br> 3, värde3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Lista över värden kommer från en tabell <br> Syntax: tabellnamn: label_field: id_field :: filter <br> Exempel: c_typent: libelle: id :: filter <br> <br> filtret kan vara ett enkelt test (t.ex. aktiv = 1) för att visa endast aktivt värde <br> Du kan också använda $ ID $ i filterhäxa är nuvarande ID för nuvarande objekt <br> För att göra ett SELECT i filter använd $ SEL $ <br> om du vill filtrera på extrafält använder syntax extra.fieldcode = ... (där fältkoden är kod för extrafält) <br> <br> För att få listan beroende på en annan komplementär attributlista: <br> c_typent: libelle: id: options_ <i> parent_list_code </i> | parent_column: filter <br> <br> För att få listan beroende på en annan lista: <br> c_typent: libelle: id: <i> parent_list_code </i> | parent_column: filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Bibliotek som används för PDF-generering @@ -541,6 +545,8 @@ Module40Name=Säljare Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) Module42Name=Felsökningsloggar Module42Desc=Loggningsfunktioner (fil, syslog, ...). Sådana loggar är för tekniska / debug-ändamål. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Redaktion Module49Desc=Redaktör ledning Module50Name=Produkter @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind omvandlingar kapacitet Module3200Name=Oföränderliga arkiv Module3200Desc=Aktivera en oföränderlig logg över affärshändelser. Händelser arkiveras i realtid. Loggen är en skrivskyddad tabell med kedjda händelser som kan exporteras. Denna modul kan vara obligatorisk för vissa länder. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Personalhantering (förvaltningen av avdelningen, anställningskontrakt och känslor) Module5000Name=Multi-bolag Module5000Desc=Gör att du kan hantera flera företag -Module6000Name=Workflow -Module6000Desc=Arbetsflödeshantering (automatisk skapande av objekt och / eller automatisk statusändring) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=webbplatser 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. Module20000Name=Lämna begäranhantering @@ -805,7 +813,8 @@ PermissionAdvanced253=Skapa / ändra interna / externa användare och behörighe Permission254=Ta bort eller inaktivera andra användare Permission255=Skapa / ändra sin egen användarinformation Permission256=Ändra sina egna lösenord -Permission262=Utöka tillgången till alla tredje parter (inte bara tredje part för vilken den användaren är försäljningsrepresentant). <br> Ej effektiv för externa användare (alltid begränsad till sig själva för förslag, order, fakturor, kontrakt etc.). <br> Ej effektiv för projekt (endast regler om projektbehörigheter, synlighet och uppdragsfrågor). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Läs CA Permission272=Läs fakturor Permission273=Utfärda fakturor @@ -1175,7 +1184,8 @@ SetupDescription2=Följande två avsnitt är obligatoriska (de två första inma SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Andra inställningsmenyposter hanterar valfria parametrar. -LogEvents=Säkerhetsgranskning evenemang +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Revision InfoDolibarr=Om Dolibarr InfoBrowser=Om Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Att köra uppgraderingsprocessen verkar vara n YouMustRunCommandFromCommandLineAfterLoginToUser=Du måste köra det här kommandot från kommandoraden efter login till ett skal med användare <b>%s.</b> YourPHPDoesNotHaveSSLSupport=SSL-funktioner inte är tillgängliga i din PHP DownloadMoreSkins=Mer skinn att ladda ner -SimpleNumRefModelDesc=Returnerar referensnumret med format %syymm-nnnn var du är år, mm är månad och nnnn är sekventiell utan återställning +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Visa professionellt id med adresser ShowVATIntaInAddress=Dölj momsnumret inom gemenskapen med adresser TranslationUncomplete=Partiell översättning @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxyserver: Namn / Adress MAIN_PROXY_PORT=Proxyserver: Port MAIN_PROXY_USER=Proxyserver: Logga in / Användare MAIN_PROXY_PASS=Proxyserver: Lösenord -DefineHereComplementaryAttributes=Definiera här några extra / anpassade attribut som du vill inkludera för: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Komplementära egenskaper ExtraFieldsLines=Kompletterande attribut (rader) ExtraFieldsLinesRec=Kompletterande attribut (mallar fakturor linjer) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Logga in (unix) LDAPFieldLoginExample=Exempel: uid LDAPFilterConnection=Sökfilter LDAPFilterConnectionExample=Exempel: & (objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Logga in (samba, ActiveDirectory) LDAPFieldLoginSambaExample=Exempel: Samaccountname LDAPFieldFullname=Förnamn Namn @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Ditt företag har definierats för att inte använda mo AccountancyCode=Redovisningskod AccountancyCodeSell=Försäljning konto. kod AccountancyCodeBuy=Köpa konto. kod +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Åtgärder och dagordning modul inställning PasswordTogetVCalExport=Viktiga att tillåta export länk +SecurityKey = Security Key PastDelayVCalExport=Inte exporterar fall äldre än AGENDA_USE_EVENT_TYPE=Använd händelsetyper (hanteras i menyn Inställningar -> Ordböcker -> Typ av kalenderhändelser) 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 @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Bakgrundsfärg för udda bords linjer BackgroundTableLineEvenColor=Bakgrundsfärg för ännu bords linjer MinimumNoticePeriod=Minsta varseltid (Din ledighet begäran måste göras innan denna försening) NbAddedAutomatically=Antal dagar som läggs till räknare av användare (automatiskt) varje månad -EnterAnyCode=Detta fält innehåller en hänvisning till identifiera linje. Ange något värde i ditt val, men utan specialtecken. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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") +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Flera språkvarianter hittades RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex-filter till rent värde (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Uppställning av modulen Sociala nätverk EnableFeatureFor=Aktivera funktioner för <strong> %s </strong> VATIsUsedIsOff=Obs! Alternativet att använda moms eller moms har ställts till <strong> Av </strong> i menyn %s - %s, så Försäljningsskatt eller moms används alltid 0 för försäljning. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Varning, funktion som endast stöds på textfält. Också en URL-parameter åtgärd = skapa eller åtgärd = redigera måste ställas in ELLER sidnamn måste sluta med "new.php" för att utlösa denna funktion. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=E-post samlare EmailCollectorDescription=Lägg till ett schemalagt jobb och en installationssida för att skanna regelbundet e-postrutor (med IMAP-protokoll) och spela in e-postmeddelanden som tas emot i din ansökan, på rätt plats och / eller skapa några poster automatiskt (som ledningar). NewEmailCollector=Ny e-postsamlare @@ -2049,8 +2062,11 @@ UseDebugBar=Använd felsökningsfältet DEBUGBAR_LOGS_LINES_NUMBER=Antal sista logglinjer för att hålla i konsolen WarningValueHigherSlowsDramaticalyOutput=Varning, högre värden sänker dramaticaly-utgången ModuleActivated=Module %s is activated and slows the interface +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Exportmodeller delas med alla ExportSetup=Inställning av modul Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sv_SE/banks.lang b/htdocs/langs/sv_SE/banks.lang index 42c143d1b0b..3252d7fcc2e 100644 --- a/htdocs/langs/sv_SE/banks.lang +++ b/htdocs/langs/sv_SE/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Ditt SEPA-mandat FindYourSEPAMandate=Detta är ditt SEPA-mandat för att bemyndiga vårt företag att göra direkt debitering till din bank. Returnera det undertecknat (skanna av det signerade dokumentet) eller skicka det via post till AutoReportLastAccountStatement=Fyll i fältet 'Antal kontoutdrag' automatiskt med det sista kontonummeret när avstämning görs CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sv_SE/bills.lang b/htdocs/langs/sv_SE/bills.lang index b1c16852ac5..0059f11c2af 100644 --- a/htdocs/langs/sv_SE/bills.lang +++ b/htdocs/langs/sv_SE/bills.lang @@ -52,11 +52,12 @@ Invoices=Fakturor InvoiceLine=Faktura linje InvoiceCustomer=Kundfaktura CustomerInvoice=Kundfaktura -CustomersInvoices=Kundens fakturor +CustomersInvoices=Kundfakturor SupplierInvoice=Leverantörsfaktura -SuppliersInvoices=Leverantörer fakturor +SuppliersInvoices=Leverantörsfakturor +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Leverantörsfaktura -SupplierBills=leverantörer fakturor +SupplierBills=Leverantörsfakturor Payment=Betalning PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Betalningar redan gjort PaymentsBackAlreadyDone=Refunds already done PaymentRule=Betalningsregel PaymentMode=Betalnings typ +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debet / Kreditkort PaymentTypePP=PayPal IdPaymentMode=Betalningstyp (id) @@ -373,6 +376,7 @@ DateLastGeneration=Datum för senaste generationen DateLastGenerationShort=Datum senaste gen. MaxPeriodNumber=Max. Antal fakturahantering NbOfGenerationDone=Antal fakturahantering redan gjort +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Antal generationer gjort MaxGenerationReached=Maximalt antal generationer som uppnåtts InvoiceAutoValidate=Bekräfta fakturor automatiskt @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Inom 14 dagar efter slutet av månaden FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Variabelt belopp (%% summa) VarAmountOneLine=Variabel mängd (%% tot.) - 1 rad med etikett '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Banköverföring PaymentTypeShortVIR=Banköverföring @@ -494,12 +498,16 @@ Cash=Kontanter Reported=Försenad DisabledBecausePayments=Inte möjlig eftersom det inte finns några betalningar CantRemovePaymentWithOneInvoicePaid=Kan inte ta bort betalning eftersom det finns minst en faktura märkt som betalt +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Förväntad utbetalning CantRemoveConciliatedPayment=Det går inte att ta bort avstämd betalning PayedByThisPayment=Betalas av denna betalning 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Alla fakturor utan återbetalning kommer automatiskt att stängas med status "Betald". ToMakePayment=Betala ToMakePaymentBack=Återbetala @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Du måste först skapa en standardfaktura PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Faktura PDF mall Svamp. En komplett fakturamall PDFCrevetteDescription=Faktura PDF-mall Crevette. En komplett faktura mall för lägesfakturor -TerreNumRefModelDesc1=Återger nummer med formatet %syymm-nnnn för standardfakturor och %syymm-NNNN för kreditnotor där yy är året, mm månaden och nnnn är en sekvens med ingen paus och ingen återgång till 0 -MarsNumRefModelDesc1=Returnummer med format %syymm-nnnn för standardfakturor, %syymm-nnnn för utbytesfakturor, %syymm-nnnn för betalningsfakturor och %syymm-nnnn för kreditnoteringar var du är år, mm är månad och nnnn är en sekvens utan paus och nej återgå till 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Ett lagförslag som börjar med $ syymm finns redan och är inte förenligt med denna modell för sekvens. Ta bort den eller byta namn på den för att aktivera denna modul. -CactusNumRefModelDesc1=Returnummer med format %syymm-nnnn för standardfakturor, %syymm-nnnn för kreditnoteringar och %syymm-nnnn för nedbetalningsfakturor varav år, mm är månad och nnnn är en sekvens utan paus och ingen återgång till 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Leverantörskontakt InvoiceFirstSituationAsk=Första löpande faktura InvoiceFirstSituationDesc=<b>Löpande fakturor</b> avser delfakturor vid pågående arbeten, t.ex. vid ett bygge. InvoiceSituation=Löpande faktura +PDFInvoiceSituation=Löpande faktura InvoiceSituationAsk=Faktura på löpande räkning InvoiceSituationDesc=Skapa en avstämning / faktura på löpande räkning, följande en tidigare SituationAmount=Löpande faktura belopp (netto) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Om du behöver generera sådana fakturor autom DeleteRepeatableInvoice=Ta bort mallfaktura ConfirmDeleteRepeatableInvoice=Är du säker på att du vill ta bort mallfakturan? CreateOneBillByThird=Skapa en faktura per tredje part (annars, en faktura per order) -BillCreated=%s faktura (er) skapade +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status för dokumentgenerering DoNotGenerateDoc=Generera inte dokumentfil AutogenerateDoc=Auto generera dokumentfil @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sv_SE/boxes.lang b/htdocs/langs/sv_SE/boxes.lang index a7deb6f3811..db762d25692 100644 --- a/htdocs/langs/sv_SE/boxes.lang +++ b/htdocs/langs/sv_SE/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=inloggningsinformation BoxLastRssInfos=RSS Information BoxLastProducts=Senaste %s Produkter / tjänster @@ -17,9 +18,13 @@ BoxLastActions=Senaste åtgärderna BoxLastContracts=Senaste kontrakt BoxLastContacts=Senaste kontakter / adresser BoxLastMembers=Senaste medlemmarna +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Senaste interventioner BoxCurrentAccounts=Öppna konton balans BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Senaste %s nyheter från %s BoxTitleLastProducts=Produkter / tjänster: senaste %s modifierad BoxTitleProductsAlertStock=Produkter: lagervarning @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Redovisning +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sv_SE/categories.lang b/htdocs/langs/sv_SE/categories.lang index 821c5b52128..c890dddefa5 100644 --- a/htdocs/langs/sv_SE/categories.lang +++ b/htdocs/langs/sv_SE/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Leverantörer tags / kategorier område CustomersCategoriesArea=Kunder taggar / kategorier område MembersCategoriesArea=Medlemmar taggar / kategorier område ContactsCategoriesArea=Kontakter taggar / kategorier område -AccountsCategoriesArea=Konton taggar / kategorier område +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projektets taggar / kategorier område UsersCategoriesArea=Användare taggar / kategorier område SubCats=Underkategorier @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Visa tagg / kategori ByDefaultInList=Som standard i listan ChooseCategory=Välj kategori -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sv_SE/companies.lang b/htdocs/langs/sv_SE/companies.lang index 1e64d1649c3..2dc085dac75 100644 --- a/htdocs/langs/sv_SE/companies.lang +++ b/htdocs/langs/sv_SE/companies.lang @@ -43,9 +43,10 @@ Individual=Privatperson ToCreateContactWithSameName=Skapar automatiskt en kontakt / adress med samma information som tredjepart under tredjepart. I de flesta fall, även om din tredjepart är en fysisk person, är det bara att skapa en tredjepart. ParentCompany=Moderbolaget Subsidiaries=Dotterbolag -ReportByMonth=Rapportera per månad -ReportByCustomers=Rapportera av kunden -ReportByQuarter=Rapport från kurs +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Hövlighet kod RegisteredOffice=Säte Lastname=Efternamn @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF / NIF) ProfId2ES=Prof Id 2 (Social Security Number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate nummer) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (Siret) ProfId3FR=Prof Id 3 (NAF, gamla APE) ProfId4FR=Prof Id 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registreringsnummer ProfId2GB=- ProfId3GB=Prof Id 3 (SIC) @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxemburg) ProfId2LU=Id. prof. 2 (affärstillstånd) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (personnummer) ProfId3PT=Prof Id 3 (organisationsnummer) ProfId4PT=Prof Id 4 (konservatoriet) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=Ninea @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Obetalda fakturor OutstandingBill=Max för obetald faktura OutstandingBillReached=Max. för enastående räkning uppnådd OrderMinAmount=Minsta belopp för beställning -MonkeyNumRefModelDesc=Returnera ett nummer med formatet %syymm-nnnn för kundkoden och %syymm-nnnn för leverantörskoden där du är år, mm är månad och nnnn är en sekvens utan paus och ingen återgång till 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Kund / leverantör-nummer är ledig. Denna kod kan ändras när som helst. ManagingDirectors=Företagledares namn (vd, direktör, ordförande ...) MergeOriginThirdparty=Duplicera tredjepart (tredjepart du vill ta bort) diff --git a/htdocs/langs/sv_SE/compta.lang b/htdocs/langs/sv_SE/compta.lang index b9ac03cf0ef..2b141e51eb7 100644 --- a/htdocs/langs/sv_SE/compta.lang +++ b/htdocs/langs/sv_SE/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST-inköp VATCollected=Momsintäkterna StatusToPay=Att betala SpecialExpensesArea=Område för alla special betalningar +VATExpensesArea=Area for all TVA payments SocialContribution=Social eller skattemässig skatt SocialContributions=Sociala eller skattemässiga skatter SocialContributionsDeductibles=Avdragsgilla sociala eller skattemässiga skatter @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Kundfaktura betalning PaymentSupplierInvoice=leverantörsfaktura betalning PaymentSocialContribution=Sociala och skattemässiga betalningar PaymentVat=Moms betalning +AutomaticCreationPayment=Automatically record the payment ListPayment=Lista över betalningar ListOfCustomerPayments=Förteckning över kundbetalningar ListOfSupplierPayments=Lista över leverantörsbetalningar @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Betalning LT2PaymentsES=IRPF betalningar VATPayment=Försäljningsskatt betalning VATPayments=Försäljningsskatt betalningar +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Återbetalning av moms NewVATPayment=Ny momsbetalning NewLocalTaxPayment=Ny skatt %s betalning @@ -134,9 +138,17 @@ NoWaitingChecks=Inga kontroller väntar på insättning. DateChequeReceived=Kontrollera datum mottagning ingång NbOfCheques=Antal kontroller PaySocialContribution=Betala en social / skattemässig skatt -ConfirmPaySocialContribution=Är du säker på att du vill märka denna sociala eller skattemässiga skatt som betalad? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Ta bort en social eller skattemässig skattebetalning -ConfirmDeleteSocialContribution=Är du säker på att du vill ta bort denna sociala / skattemässiga skattebetalning? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Sociala och skattemässiga skatter och betalningar CalcModeVATDebt=<b>Läge% svat på redovisning engagemang% s.</b> CalcModeVATEngagement=<b>Läge% svat på inkomster-utgifter% s.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Det inkluderar de reala betalningarna på fakturor, utgifter, RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- Det inkluderar alla effektiva betalningar av fakturor som mottagits från kunder. <br> - Det är baserat på betalningsdatum för dessa fakturor <br> RulesCATotalSaleJournal=Den innehåller alla kreditlinjer från försäljningsloggboken. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Det innehåller post i din huvudboken med bokföringskonto som har gruppen "EXPENSE" eller "INCOME" RulesResultBookkeepingPredefined=Det innehåller post i din huvudboken med bokföringskonto som har gruppen "EXPENSE" eller "INCOME" RulesResultBookkeepingPersonalized=Det visar rekord i din huvudboken med bokföringskonton <b> grupperad av personliga grupper </b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Försäljningsskattrapport från tredje part VATReportByCustomers=Försäljningsskatt rapport från kund VATReportByCustomersInInputOutputMode=Rapport av kunden moms samlas och betalas VATReportByQuartersInInputOutputMode=Rapportera enligt försäljningsskattesats för den skatt som samlats och betalats +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Rapportera skatt 2 efter skatt LT2ReportByQuarters=Rapportera skatt 3 efter skatt LT1ReportByQuartersES=Rapport från RE hastighet @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtyp InvoiceLinesToDispatch=Faktura linjer avsändandet ByProductsAndServices=Efter produkt och service RefExt=Extern ref -ToCreateAPredefinedInvoice=För att skapa en mallfaktura, skapa en standardfaktura, och utan att bekräfta den, klicka på knappen "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Länk för att beställa Mode1=Metod 1 Mode2=Metod 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Det dedikerade bokföringskontot som definieras ACCOUNTING_ACCOUNT_SUPPLIER=Redovisningskonto som används för leverantörs tredje part ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Det dedikerade bokföringskontot som definieras på tredje partskort kommer endast att användas för Subledger-bokföring. Den här kommer att användas för huvudboken och som standardvärde för Subledger-bokföring om en dedikerad leverantörsredovisningskonto på tredjeparten inte är definierad. ConfirmCloneTax=Bekräfta klon av en social / skattemässig skatt +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Klona det för nästa månad SimpleReport=Enkel rapport AddExtraReport=Extra rapporter (lägg till utländsk och nationell kundrapport) @@ -253,7 +269,8 @@ AccountingAffectation=Redovisningsuppdrag LastDayTaxIsRelatedTo=Den sista dagen i vilken skatten är relaterad till VATDue=Försäljningsskatt krävdes ClaimedForThisPeriod=Påstås för perioden -PaidDuringThisPeriod=Betald under denna period +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Med försäljningsskattesats TurnoverbyVatrate=Omsättning fakturerad med försäljningsskattesats TurnoverCollectedbyVatrate=Omsättning upptagen med försäljningsskattesats @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sv_SE/ecm.lang b/htdocs/langs/sv_SE/ecm.lang index 0c633258618..795137d4020 100644 --- a/htdocs/langs/sv_SE/ecm.lang +++ b/htdocs/langs/sv_SE/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Filen är inte indexerad i databasen (försök ladda ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sv_SE/errors.lang b/htdocs/langs/sv_SE/errors.lang index 0ec329c972d..21a4bc7c8f0 100644 --- a/htdocs/langs/sv_SE/errors.lang +++ b/htdocs/langs/sv_SE/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Nummer <b>%s</b> inte hittat (Bad väg, fel behörighet eller ErrorFunctionNotAvailableInPHP=Funktion <b>%s</b> krävs för denna funktion, men finns inte i denna version och konfigureringen av PHP. ErrorDirAlreadyExists=En katalog med detta namn finns redan. ErrorFileAlreadyExists=En fil med detta namn finns redan. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Handlingar den mottagit inte helt av server. ErrorNoTmpDir=Tillfälliga directy %s inte existerar. ErrorUploadBlockedByAddon=Ladda upp blockeras av en PHP / Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Fel vid inmatning av kontoplan. Om några konton inte ladda ErrorBadSyntaxForParamKeyForContent=Dålig syntax för param keyforcontent. Måste ha ett värde som börjar med %s eller %s ErrorVariableKeyForContentMustBeSet=Fel, konstanten med namnet %s (med textinnehåll som ska visas) eller %s (med extern webbadress för att visa) måste ställas in. ErrorURLMustStartWithHttp=URL %s måste börja med http: // eller https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Fel, den nya referensen används redan ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. ErrorSearchCriteriaTooSmall=Search criteria too small. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sv_SE/externalsite.lang b/htdocs/langs/sv_SE/externalsite.lang index e8162ce8502..4076aea29c5 100644 --- a/htdocs/langs/sv_SE/externalsite.lang +++ b/htdocs/langs/sv_SE/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup länk till extern webbplats -ExternalSiteURL=Extern webbplats URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Modul ExternalSite var inte korrekt konfigurerad. ExampleMyMenuEntry=Min meny posten diff --git a/htdocs/langs/sv_SE/main.lang b/htdocs/langs/sv_SE/main.lang index f8603cc6238..3753cd93d14 100644 --- a/htdocs/langs/sv_SE/main.lang +++ b/htdocs/langs/sv_SE/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Ändr. datum IPModification=Modification IP DateLastModification=Senaste ändringsdatum DateValidation=Bekräftelsesdatum +DateSigning=Signing date DateClosing=Sista dag DateDue=Förfallodag DateValue=Valuteringsdag @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Enhetspris (exkl.) (Valuta) UnitPriceTTC=Pris per enhet PriceU=Styckpris PriceUHT=St.pris(net) -PriceUHTCurrency=U.P (valuta) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=UPP. (inkl. skatt) Amount=Belopp AmountInvoice=Fakturabelopp @@ -389,6 +390,8 @@ AmountTotal=Summa AmountAverage=Genomsnittligt belopp PriceQtyMinHT=Pris kvantitet min. (exkl. skatt) PriceQtyMinHTCurrency=Pris kvantitet min. (exkl. skatt) (valuta) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Procent Total=Summa SubTotal=Delsumma @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Nuvarande språk CurrentTheme=Nuvarande tema CurrentMenuManager=Nuvarande menyhanterare @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Ta bort strängen '%s' SomeTranslationAreUncomplete=Några av de språk som erbjuds kan bara översättas delvis eller kan innehålla fel. Snälla hjälp att korrigera ditt språk genom att registrera dig på <a href="https://transifex.com/projects/p/dolibarr/" target="_blank"> https://transifex.com/projects/p/dolibarr/ </a> för att lägga till dina förbättringar. -DirectDownloadLink=Direkt nedladdningslänk (offentlig / extern) -DirectDownloadInternalLink=Direkt nedladdningslänk (måste vara inloggad och behöver behörigheter) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Ladda ner DownloadDocument=Hämta dokument ActualizeCurrency=Uppdatera valutakurs @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kontakter SearchIntoMembers=Medlemmar SearchIntoUsers=Användare SearchIntoProductsOrServices=Produkter eller tjänster +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projekt SearchIntoMO=Manufacturing Orders SearchIntoTasks=Uppgifter @@ -1049,12 +1055,13 @@ KeyboardShortcut=Tangentbordsgenväg AssignedTo=Påverkas i Deletedraft=Ta bort utkast ConfirmMassDraftDeletion=Utkast till massberegningsbekräftelse -FileSharedViaALink=Fil delad via länk +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Välj en tredje part först ... YouAreCurrentlyInSandboxMode=Du befinner dig för närvarande i %s "sandbox" -läget Inventory=Lager AnalyticCode=Analytisk kod TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Visa mer info NoFilesUploadedYet=Var god ladda upp ett dokument först SeePrivateNote=Se privat notering @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sv_SE/margins.lang b/htdocs/langs/sv_SE/margins.lang index 8dfac6fa0cf..2e319949792 100644 --- a/htdocs/langs/sv_SE/margins.lang +++ b/htdocs/langs/sv_SE/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Marginaldetaljer ProductMargins=Produktmarginaler CustomerMargins=Kundmarginaler SalesRepresentativeMargins=Återförsäljares marginaler +ContactOfInvoice=Contact of invoice UserMargins=Användarmarginaler ProductService=Produkt eller tjänst AllProducts=Alla produkter och tjänster ChooseProduct/Service=Välj produkt eller tjänst ForceBuyingPriceIfNull=Tvinga köp / kostpris till försäljningspris om det inte är definierat -ForceBuyingPriceIfNullDetails=Om köp- / kostnadskursen inte definieras, och detta alternativ "ON" kommer marginalen att vara noll på raden (köp / kostnadskurs = försäljningspris), annars ("OFF"), marginal motsvarar föreslagen standard. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Marginalmetod för globala rabatter UseDiscountAsProduct=Som produkt UseDiscountAsService=Som tjänst @@ -36,7 +37,7 @@ CostPrice=Kostnadspris UnitCharges=Enhetspris Charges=Avgifter AgentContactType=Handelsagentens kontakttyp -AgentContactTypeDetails=Definiera vad kontakttyp (länkad på fakturor) kommer att användas för marginalrapport per försäljning representant +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=Betyg måste vara ett numeriskt värde markRateShouldBeLesserThan100=Mark takt bör vara lägre än 100 ShowMarginInfos=Visa marginal information diff --git a/htdocs/langs/sv_SE/members.lang b/htdocs/langs/sv_SE/members.lang index 848cc24cf49..6e0adfe91f2 100644 --- a/htdocs/langs/sv_SE/members.lang +++ b/htdocs/langs/sv_SE/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Förteckning över förslag till medlemmar (att bekräftas) MembersListValid=Förteckning över giltiga medlemmar MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Förteckning över avslutade medlemmar MembersListQualified=Förteckning över kvalificerade ledamöter MenuMembersToValidate=Förslag medlemmar MenuMembersValidated=Bekräftat medlemmar +MenuMembersExcluded=Excluded members MenuMembersResiliated=Avslutade medlemmar MembersWithSubscriptionToReceive=Medlemmar med abonnemang för att ta emot MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Prenumerationen löpte ut MemberStatusActiveLateShort=Utgångna MemberStatusPaid=Prenumeration aktuell MemberStatusPaidShort=Aktuell +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Avslutad medlem MemberStatusResiliatedShort=Avslutad MembersStatusToValid=Förslag medlemmar +MembersStatusExcluded=Excluded members MembersStatusResiliated=Avslutade medlemmar MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Bekräftade @@ -82,6 +87,8 @@ Physical=Fysisk Moral=Moral MorAndPhy=Moral and Physical Reenable=Återaktivera +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Avsluta en medlem ConfirmResiliateMember=Är du säker på att du vill säga upp den här medlemmen? DeleteMember=Ta bort en medlem @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-postmall för att använda för DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-postmall för att skicka e-post till en medlem om ny abonnemangsinspelning DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-postmall för att skicka e-postpåminnelse när prenumerationen är på väg att gå ut DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-postmall för att använda för att skicka e-post till en medlem om medlemsavbeställning +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Avsändare E-post för automatiska e-postmeddelanden DescADHERENT_ETIQUETTE_TYPE=Utformning av etikettsida DescADHERENT_ETIQUETTE_TEXT=Text på medlems adressflik @@ -162,6 +170,7 @@ DocForLabels=Generera adress ark (Format för utgång faktiskt inställning: <b> SubscriptionPayment=Teckning betalning LastSubscriptionDate=Datum för senaste prenumerationsbetalning LastSubscriptionAmount=Antal senaste prenumeration +LastMemberType=Last Member type MembersStatisticsByCountries=Medlemmar statistik per land MembersStatisticsByState=Medlemmar statistik från stat / provins MembersStatisticsByTown=Medlemmar statistik per kommun diff --git a/htdocs/langs/sv_SE/modulebuilder.lang b/htdocs/langs/sv_SE/modulebuilder.lang index 9983f774100..5a6e5f84a0e 100644 --- a/htdocs/langs/sv_SE/modulebuilder.lang +++ b/htdocs/langs/sv_SE/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sv_SE/orders.lang b/htdocs/langs/sv_SE/orders.lang index 089b388185c..5ab7146c133 100644 --- a/htdocs/langs/sv_SE/orders.lang +++ b/htdocs/langs/sv_SE/orders.lang @@ -16,6 +16,8 @@ ToOrder=Gör så MakeOrder=Gör så SupplierOrder=Inköpsorder SuppliersOrders=Beställning +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Nuvarande köporder CustomerOrder=Kundorder CustomersOrders=Försäljningsorder @@ -141,11 +143,12 @@ OrderByEMail=epost OrderByWWW=Nätet OrderByPhone=Telefonen # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=En enkel ordermodell PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Faktura order +CreateInvoiceForThisSupplier=Faktura order NoOrdersToInvoice=Inga order fakturerbar CloseProcessedOrdersAutomatically=Märk "bearbetade" alla valda order. OrderCreation=Order skapning diff --git a/htdocs/langs/sv_SE/other.lang b/htdocs/langs/sv_SE/other.lang index 1f8d1297596..b62c35eb549 100644 --- a/htdocs/langs/sv_SE/other.lang +++ b/htdocs/langs/sv_SE/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Företag med flera aktiviteter (alla huvudmoduler) CreatedBy=Skapad av %s ModifiedBy=Uppdaterad av %s ValidatedBy=Bekräftad av %s +SignedBy=Signed by %s ClosedBy=Stängt av %s CreatedById=Användarkod som skapade ModifiedById=Användar-ID som gjorde senaste ändringen @@ -244,6 +245,7 @@ NewKeyIs=Det här är din nya nycklar för att logga in NewKeyWillBe=Din nya knappen för att logga in på programvaran kommer att vara ClickHereToGoTo=Klicka här för att gå till %s YouMustClickToChange=Du måste dock först klicka på följande länk för att bekräfta detta lösenord förändring +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Om du inte har begärt denna förändring, bara glömma detta mail. Dina referenser förvaras säkert. IfAmountHigherThan=Om mängden högre än <strong> %s </strong> SourcesRepository=Förvaring för källor diff --git a/htdocs/langs/sv_SE/productbatch.lang b/htdocs/langs/sv_SE/productbatch.lang index 6fe4fc70766..f0af71b91fd 100644 --- a/htdocs/langs/sv_SE/productbatch.lang +++ b/htdocs/langs/sv_SE/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Använd batch/serie-nummer -ProductStatusOnBatch=Ja (batch/sere-nummer krävs) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Nej (batch/serie-nummer används ej) -ProductStatusOnBatchShort=Ja +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Nej Batch=Batch/Serie atleast1batchfield=Bäst före-datum eller Batch/Serie-nummer @@ -16,9 +18,18 @@ printEatby=Äter med:%s printSellby=Sälj-med :%s printQty=Antal: %d AddDispatchBatchLine=Lägg en linje för Hållbarhet avsändning -WhenProductBatchModuleOnOptionAreForced=När modulen Lot / Serial är på, är automatisk lagerminskning tvungen att "Minska reella lager vid fraktvalidering" och automatisk ökningsläge är tvungen att "Öka reella lager vid manuell leverans till lager" och kan inte redigeras. Andra alternativ kan definieras som du vill. +WhenProductBatchModuleOnOptionAreForced=När modulen Lot / Serial är på, är automatisk lagerminskning tvungen att "Minska reella lager vid fraktbekräftande" och automatisk ökningsläge är tvungen att "Öka reella lager vid manuell leverans till lager" och kan inte redigeras. Andra alternativ kan definieras som du vill. ProductDoesNotUseBatchSerial=Denna produkt använder ej batch/serie-nummer ProductLotSetup=Inställning av batch/serie modul ShowCurrentStockOfLot=Visa aktuellt lager för sammansatt produkt/parti ShowLogOfMovementIfLot=Visa statestik för sammansatt produkt/parti StockDetailPerBatch=Detaljlager för parti +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sv_SE/products.lang b/htdocs/langs/sv_SE/products.lang index 895502e8464..2d55fe3f896 100644 --- a/htdocs/langs/sv_SE/products.lang +++ b/htdocs/langs/sv_SE/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Momsavgift (för denna leverantör / produkt) DiscountQtyMin=Rabatt för denna mängd. NoPriceDefinedForThisSupplier=Inget pris / antal definierat för denna leverantör / produkt NoSupplierPriceDefinedForThisProduct=Ingen säljare pris / antal definierad för denna produkt +PredefinedItem=Predefined item PredefinedProductsToSell=Fördefinierad produkt PredefinedServicesToSell=Fördefinierad tjänst PredefinedProductsAndServicesToSell=Fördefinierade produkter eller tjänster att sälja @@ -313,7 +314,7 @@ LastUpdated=Senaste uppdatering CorrectlyUpdated=Korrekt uppdaterad PropalMergePdfProductActualFile=Filer använder för att lägga till i PDF Azur är / är PropalMergePdfProductChooseFile=Välj PDF-filer -IncludingProductWithTag=Inklusive produkt / service med tagg +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Standardpris, realt pris kan bero på kund WarningSelectOneDocument=Var god välj minst ett dokument DefaultUnitToShow=Enhet diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index 144d986172d..b7710e22be7 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Lista över uppgifter GoToListOfTimeConsumed=Gå till listan över tidskrävt GanttView=Gantt-vy +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Förteckning över de kommersiella förslagen relaterade till projektet ListOrdersAssociatedProject=Förteckning över försäljningsorder relaterade till projektet ListInvoicesAssociatedProject=Förteckning över kundfakturor relaterade till projektet @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sv_SE/propal.lang b/htdocs/langs/sv_SE/propal.lang index 92ae2b55e00..b5fdaf0092b 100644 --- a/htdocs/langs/sv_SE/propal.lang +++ b/htdocs/langs/sv_SE/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Skicka kommersiella förslag per post DatePropal=Datum för förslag DateEndPropal=Datum sista giltighetsdag ValidityDuration=Giltighet varaktighet -CloseAs=Ställ in status till SetAcceptedRefused=Set accepterad / vägrad ErrorPropalNotFound=Propal %s hittades inte AddToDraftProposals=Lägg till förslagsutkast @@ -60,6 +59,7 @@ ConfirmClonePropal=Är du säker på att du vill klona det kommersiella förslag ConfirmReOpenProp=Är du säker på att du vill öppna tillbaka det kommersiella förslaget <b> %s </b>? ProposalsAndProposalsLines=Kommersiella förslag och linjer ProposalLine=Förslag linje +ProposalLines=Proposal lines AvailabilityPeriod=Tillgänglighet fördröjning SetAvailability=Ställa tillgänglighet fördröjning AfterOrder=Efter att @@ -85,3 +85,8 @@ ProposalCustomerSignature=Skriftligt godkännande, företagsstämpel, datum och ProposalsStatisticsSuppliers=Statistik för leverantörsförslag 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/sv_SE/stocks.lang b/htdocs/langs/sv_SE/stocks.lang index 3979dcebd89..6ecacfe6a99 100644 --- a/htdocs/langs/sv_SE/stocks.lang +++ b/htdocs/langs/sv_SE/stocks.lang @@ -19,8 +19,8 @@ Stock=Lager Stocks=Lager MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Lager per lot / seriell LotSerial=Massor / serier LotSerialList=Lista över parti / serier @@ -37,8 +37,8 @@ AllWarehouses=Alla lager IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Inkludera även utkast till order Location=Plats -LocationSummary=Kortnamn plats -NumberOfDifferentProducts=Antal olika produkter +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Totalt antal produkter LastMovement=Senaste rörelsen LastMovements=Senaste rörelserna @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Lagervärde UserWarehouseAutoCreate=Skapa ett användarlager automatiskt när du skapar en användare 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ RealStockDesc=Fysisk / reell lager är beståndet för närvarande i lagerlokale RealStockWillAutomaticallyWhen=Den reala beståndet kommer att ändras enligt denna regel (enligt definitionen i Stock-modulen): VirtualStock=Virtuellt lager VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=Id lager DescWareHouse=Beskrivning lager LieuWareHouse=Lokalisering lager WarehousesAndProducts=Lager och produkter WarehousesAndProductsBatchDetail=Lager och produkter (med detaljer per lot / serie) AverageUnitPricePMPShort=Vägda genomsnittliga priset -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of 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 @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Spela in överföring ReceivingForSameOrder=Kvitton för denna beställning StockMovementRecorded=Sparade lageröverföringar @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Lagernivå måste vara tillräcklig för att lägga StockMustBeEnoughForOrder=Lagernivå måste vara tillräckligt för att lägga till produkt / tjänst på beställning (check är gjort på nuvarande reellt lager när du lägger till en rad i ordning, oberoende av regeln för automatisk lagerförändring) StockMustBeEnoughForShipment= Lagernivå måste vara tillräcklig för att lägga till produkt / tjänst till leverans (check är gjort på nuvarande reellt lager när du lägger till en rad i leverans, oberoende av regeln för automatisk lagerförändring) MovementLabel=Etikett för lagerrörelse -TypeMovement=Typ av rörelse +TypeMovement=Direction of movement DateMovement=Datum för rörelse InventoryCode=Lagerrörelse- eller inventeringskod IsInPackage=Ingår i förpackning @@ -183,6 +185,7 @@ inventoryCreatePermission=Skapa ny inventering inventoryReadPermission=Visa varulager inventoryWritePermission=Uppdatera varulager inventoryValidatePermission=Bekräfta inventering +inventoryDeletePermission=Delete inventory inventoryTitle=Lager inventoryListTitle=varulager inventoryListEmpty=Ingen inventering pågår @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sv_SE/suppliers.lang b/htdocs/langs/sv_SE/suppliers.lang index 451dba89d0d..c57c7839467 100644 --- a/htdocs/langs/sv_SE/suppliers.lang +++ b/htdocs/langs/sv_SE/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Säljare SuppliersInvoice=Leverantörsfaktura +SupplierInvoices=Leverantörsfakturor ShowSupplierInvoice=Visa leverantörsfaktura NewSupplier=Ny leverantör History=Historia diff --git a/htdocs/langs/sv_SE/ticket.lang b/htdocs/langs/sv_SE/ticket.lang index 95a2fb76ef8..42a21c94cc3 100644 --- a/htdocs/langs/sv_SE/ticket.lang +++ b/htdocs/langs/sv_SE/ticket.lang @@ -70,6 +70,8 @@ Deleted=Raderade # Dict Type=Typ Severity=Allvarlighet +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Att skicka e-post från biljettmeddelande @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Visa modulens logotyp i det offentliga gränssnittet TicketsShowModuleLogoHelp=Aktivera det här alternativet för att dölja logotypmodulen på sidorna i det offentliga gränssnittet TicketsShowCompanyLogo=Visa företagets logotyp i det offentliga gränssnittet TicketsShowCompanyLogoHelp=Aktivera det här alternativet för att dölja huvudbolags logotyp på sidorna i det offentliga gränssnittet -TicketsEmailAlsoSendToMainAddress=Skicka även meddelande till huvudadressen -TicketsEmailAlsoSendToMainAddressHelp=Aktivera det här alternativet för att skicka ett mail till "Notifieringsadress från" -adressen (se inställningen nedan) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Begränsa visningen till biljetter som tilldelats den nuvarande användaren (inte effektiv för externa användare, alltid begränsad till den tredje parten som de är beroende av) TicketsLimitViewAssignedOnlyHelp=Endast biljetter som tilldelats den nuvarande användaren kommer att vara synliga. Gäller inte för en användare med biljettförvaltningsrättigheter. TicketsActivatePublicInterface=Aktivera det offentliga gränssnittet @@ -126,10 +128,10 @@ TicketNumberingModules=Biljettnummermodul TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Meddela tredje part vid skapandet 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Senast ändrade biljetter BoxLastModifiedTicketDescription=Senaste %s modifierade biljetter BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Inga nyligen ändrade biljetter +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sv_SE/users.lang b/htdocs/langs/sv_SE/users.lang index 40d07f9c39b..6b883607b99 100644 --- a/htdocs/langs/sv_SE/users.lang +++ b/htdocs/langs/sv_SE/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Ta bort från grupp PasswordChangedAndSentTo=Lösenord ändras och skickas till <b>%s.</b> PasswordChangeRequest=Begär om ändring av lösenord för <b> %s </b> PasswordChangeRequestSent=Begäran om att ändra lösenord för <b>%s</b> skickas till <b>%s.</b> +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=Bekräfta återställning av lösenord MenuUsersAndGroups=Användare & grupper LastGroupsCreated=Senaste %s grupper skapade @@ -70,9 +72,10 @@ ExportDataset_user_1=Användare och deras egenskaper DomainUser=Domän användare %s Reactivate=Återaktivera CreateInternalUserDesc=I det här formuläret kan du skapa en intern användare i ditt företag / organisation. För att skapa en extern användare (kund, leverantör etc.), använd knappen "Create Dolibarr User" från den tredje partens kontaktkort. -InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Tillstånd beviljas, eftersom ärvt från en av en användares grupp. Inherited=Ärvda +UserWillBe=Created user will be UserWillBeInternalUser=Skapad användare kommer att vara en intern användare (eftersom inte kopplade till en viss tredje part) UserWillBeExternalUser=Skapad användare kommer att vara en extern användare (eftersom kopplat till en viss tredje part) IdPhoneCaller=Id telefonen ringer @@ -109,8 +112,10 @@ UserAccountancyCode=Användarkonto UserLogoff=Användarutloggning UserLogged=Användare loggad DateOfEmployment=Employment date -DateEmployment=Anställningens startdatum +DateEmployment=Employment +DateEmploymentstart=Employment Start Date DateEmploymentEnd=Anställningens slutdatum +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Du kan inte inaktivera din egen användarrekord ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator diff --git a/htdocs/langs/sv_SE/website.lang b/htdocs/langs/sv_SE/website.lang index e04af80c19a..b3c08a3f786 100644 --- a/htdocs/langs/sv_SE/website.lang +++ b/htdocs/langs/sv_SE/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS= <u> Använd med PHP-inbäddad server </u> <br> På utvecklingsmiljö kan du föredra att testa webbplatsen med PHP-inbäddad webbserver (PHP 5.5 krävs) genom att köra <br> <strong> php -S 0.0.0.0:8080 -t %s </strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Kontrollera också att virtuell värd har tillstånd <strong> %s </strong> på filer i <br> <strong> %s </strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Läsa WritePerm=Skriva TestDeployOnWeb=Test / distribuera på webben PreviewSiteServedByWebServer=<u> Förhandsgranska %s i en ny flik. </u> <br> <br> %s kommer att serveras av en extern webbserver (som Apache, Nginx, IIS). Du måste installera och konfigurera den här servern innan du pekar på katalogen: <br> <strong> %s </strong> <br> URL betjänad av extern server: <br> <strong> %s </strong> -PreviewSiteServedByDolibarr= <u> Förhandsgranska %s i en ny flik. </u> <br> <br> %s kommer att serveras av Dolibarr-servern så det behöver inte någon extra webbserver (som Apache, Nginx, IIS) som ska installeras. <br> Det obekvämt är att webbadressen till sidorna inte är användarvänlig och börja med sökvägen till din Dolibarr. <br> URL betjänas av Dolibarr: <br> <strong> %s </strong> <br> <br> Om du vill använda din egen extern webbserver för att tjäna denna webbplats, skapa en virtuell värd på din webbserver som pekar på katalogen <br> <strong> %s </strong> <br> sedan ange namnet på denna virtuella server och klicka på den andra förhandsgranskningsknappen. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL för den virtuella värd som serveras av extern webbserver som inte definierats NoPageYet=Inga sidor ännu YouCanCreatePageOrImportTemplate=Du kan skapa en ny sida eller importera en fullständig webbplatsmall @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sv_SE/zapier.lang b/htdocs/langs/sv_SE/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sv_SE/zapier.lang +++ b/htdocs/langs/sv_SE/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/sw_SW/accountancy.lang b/htdocs/langs/sw_SW/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/sw_SW/accountancy.lang +++ b/htdocs/langs/sw_SW/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/sw_SW/banks.lang b/htdocs/langs/sw_SW/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/sw_SW/banks.lang +++ b/htdocs/langs/sw_SW/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/sw_SW/bills.lang b/htdocs/langs/sw_SW/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/sw_SW/bills.lang +++ b/htdocs/langs/sw_SW/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/sw_SW/boxes.lang b/htdocs/langs/sw_SW/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/sw_SW/boxes.lang +++ b/htdocs/langs/sw_SW/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/sw_SW/categories.lang b/htdocs/langs/sw_SW/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/sw_SW/categories.lang +++ b/htdocs/langs/sw_SW/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/sw_SW/companies.lang b/htdocs/langs/sw_SW/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/sw_SW/companies.lang +++ b/htdocs/langs/sw_SW/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/sw_SW/compta.lang b/htdocs/langs/sw_SW/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/sw_SW/compta.lang +++ b/htdocs/langs/sw_SW/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/sw_SW/ecm.lang b/htdocs/langs/sw_SW/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/sw_SW/ecm.lang +++ b/htdocs/langs/sw_SW/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/sw_SW/errors.lang b/htdocs/langs/sw_SW/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/sw_SW/errors.lang +++ b/htdocs/langs/sw_SW/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/sw_SW/externalsite.lang b/htdocs/langs/sw_SW/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/sw_SW/externalsite.lang +++ b/htdocs/langs/sw_SW/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sw_SW/main.lang b/htdocs/langs/sw_SW/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/sw_SW/main.lang +++ b/htdocs/langs/sw_SW/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/sw_SW/margins.lang b/htdocs/langs/sw_SW/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/sw_SW/margins.lang +++ b/htdocs/langs/sw_SW/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/sw_SW/members.lang b/htdocs/langs/sw_SW/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/sw_SW/members.lang +++ b/htdocs/langs/sw_SW/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/sw_SW/modulebuilder.lang b/htdocs/langs/sw_SW/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/sw_SW/modulebuilder.lang +++ b/htdocs/langs/sw_SW/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/sw_SW/orders.lang b/htdocs/langs/sw_SW/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/sw_SW/orders.lang +++ b/htdocs/langs/sw_SW/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/sw_SW/other.lang b/htdocs/langs/sw_SW/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/sw_SW/other.lang +++ b/htdocs/langs/sw_SW/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/sw_SW/productbatch.lang b/htdocs/langs/sw_SW/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/sw_SW/productbatch.lang +++ b/htdocs/langs/sw_SW/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/sw_SW/products.lang b/htdocs/langs/sw_SW/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/sw_SW/products.lang +++ b/htdocs/langs/sw_SW/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/sw_SW/propal.lang b/htdocs/langs/sw_SW/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/sw_SW/propal.lang +++ b/htdocs/langs/sw_SW/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/sw_SW/stocks.lang b/htdocs/langs/sw_SW/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/sw_SW/stocks.lang +++ b/htdocs/langs/sw_SW/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/sw_SW/suppliers.lang b/htdocs/langs/sw_SW/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/sw_SW/suppliers.lang +++ b/htdocs/langs/sw_SW/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/sw_SW/ticket.lang b/htdocs/langs/sw_SW/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/sw_SW/ticket.lang +++ b/htdocs/langs/sw_SW/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/sw_SW/users.lang b/htdocs/langs/sw_SW/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/sw_SW/users.lang +++ b/htdocs/langs/sw_SW/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/sw_SW/website.lang b/htdocs/langs/sw_SW/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/sw_SW/website.lang +++ b/htdocs/langs/sw_SW/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/sw_SW/zapier.lang b/htdocs/langs/sw_SW/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/sw_SW/zapier.lang +++ b/htdocs/langs/sw_SW/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/th_TH/accountancy.lang b/htdocs/langs/th_TH/accountancy.lang index 6755dca4379..19154161e69 100644 --- a/htdocs/langs/th_TH/accountancy.lang +++ b/htdocs/langs/th_TH/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=วารสาร JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index b816ace6628..90629c0f393 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=ถอดตัวล็อคเชื่อมต่อ YourSession=เซสชั่นของคุณ Sessions=Users Sessions WebUserGroup=ผู้ใช้เว็บเซิร์ฟเวอร์ / กลุ่ม +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=หมายเหตุ: <b>ใช่จะมีผลเฉ RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=การตั้งค่าการรักษาความปลอดภัย +PHPSetup=PHP setup SecurityFilesDesc=Define here options related to security about uploading files. ErrorModuleRequirePHPVersion=ข้อผิดพลาดนี้ต้องใช้โมดูล PHP รุ่น% s หรือสูงกว่า ErrorModuleRequireDolibarrVersion=ข้อผิดพลาดในโมดูลนี้ต้อง s Dolibarr รุ่น% หรือสูงกว่า @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=ล้าง PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=ล้างในขณะนี้ @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=เปิดใช้งานบน ActiveOn=เปิดใช้งานใน +ActivatableOn=Activatable on SourceFile=แฟ้มแหล่งที่มา AvailableOnlyIfJavascriptAndAjaxNotDisabled=มีจำหน่ายเฉพาะในกรณีที่ไม่ได้ใช้งาน JavaScript ปิดการใช้งาน Required=ที่จำเป็น @@ -347,9 +350,10 @@ LastActivationAuthor=Latest activation author LastActivationIP=Latest activation IP UpdateServerOffline=เซิร์ฟเวอร์การอัพเดทออฟไลน์ WithCounter=Manage a counter -GenericMaskCodes=คุณอาจป้อนหน้ากากเลขใด ๆ ในหน้ากากนี้แท็กต่อไปนี้สามารถนำมาใช้: <br> <b>{000000}</b> สอดคล้องกับจำนวนที่จะเพิ่มขึ้นในแต่ละ% s ใส่เลขศูนย์เป็นจำนวนมากตามความยาวที่ต้องการของเคาน์เตอร์ เคาน์เตอร์จะแล้วเสร็จภายในศูนย์จากซ้ายเพื่อให้มีศูนย์มากที่สุดเท่าที่เป็นหน้ากาก <br> <b>{000000} + 000</b> เช่นเดียวกับก่อนหน้านี้ แต่ชดเชยที่สอดคล้องกับจำนวนที่อยู่ทางขวาของเครื่องหมาย + ถูกนำไปใช้ในการเริ่มต้นครั้งแรก% <br> <b>{000000 @ x}</b> เดียวกับก่อนหน้านี้ แต่นับตั้งค่าใหม่เป็นศูนย์เมื่อเดือน x ถึง (x ระหว่างวันที่ 1 และ 12 หรือ 0 จะใช้เดือนแรกของปีงบประมาณที่กำหนดไว้ในการกำหนดค่าของคุณหรือ 99 เพื่อตั้งค่าให้เป็นศูนย์ทุกเดือน ) ถ้าตัวเลือกนี้ถูกนำมาใช้และ x 2 หรือสูงกว่านั้นลำดับ {yy} {} มิลลิเมตรหรือปปปป {} {} มิลลิเมตรจะต้องมี <br> <b>{} วววัน</b> (01-31) <br> <b>{} มิลลิเมตรเดือน</b> (01-12) <br> <b>yy {}, {} หรือปปปป {y}</b> มากกว่าปีที่ 2, 4 หรือ 1 หมายเลข <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=ทุกตัวละครอื่น ๆ ในหน้ากากจะยังคงเหมือนเดิม <br> ช่องว่างที่ไม่ได้รับอนุญาต <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>ตัวอย่างของบุคคลที่สามที่สร้างขึ้นบน 2007/03/01:</u> <br> GenericMaskCodes4c=<u>ตัวอย่างสินค้าที่สร้างขึ้นบน 2007/03/01:</u> <br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=บรรณาธิการ Module49Desc=การจัดการแก้ไข Module50Name=ผลิตภัณฑ์ @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind ความสามารถในการแปลง Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=ระบบบริหารจัดการทรัพยากรบุคคล Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=หลาย บริษัท Module5000Desc=ช่วยให้คุณสามารถจัดการกับหลาย บริษัท -Module6000Name=ขั้นตอนการทำงาน -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=สร้าง / แก้ไขผู้ใช้ภา Permission254=สร้าง / แก้ไขผู้ใช้ภายนอกเท่านั้น Permission255=แก้ไขรหัสผ่านผู้ใช้อื่น ๆ Permission256=ลบหรือปิดการใช้งานผู้ใช้อื่น ๆ -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=อ่าน CA Permission272=อ่านใบแจ้งหนี้ Permission273=ใบแจ้งหนี้ฉบับ @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=ตรวจสอบเหตุการณ์การรักษาความปลอดภัย +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=การตรวจสอบบัญชี InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=<b>คุณต้องเรียกใช้คำสั่งจากบรรทัดคำสั่งนี้หลังจากที่เข้าสู่ระบบไปยังเปลือกกับผู้ใช้% s</b> หรือคุณต้องเพิ่มตัวเลือก -W <b>ที่ท้ายบรรทัดคำสั่งที่จะให้รหัสผ่าน% s</b> YourPHPDoesNotHaveSSLSupport=ฟังก์ชั่น SSL ไม่สามารถใช้ได้ใน PHP ของคุณ DownloadMoreSkins=กินมากขึ้นในการดาวน์โหลด -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=แปลบางส่วน @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=คุณลักษณะที่สมบูรณ์ ExtraFieldsLines=คุณลักษณะเสริม (เส้น) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=เข้าสู่ระบบ (ยูนิกซ์) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=ตัวกรองการค้นหา LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=เข้าสู่ระบบ (samba, ActiveDirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=ชื่อเต็ม @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=บัญชีการขาย รหัส AccountancyCodeBuy=บัญชีซื้อ รหัส +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=กิจกรรมและวาระการติดตั้งโมดูล PasswordTogetVCalExport=กุญแจสำคัญในการอนุญาตการเชื่อมโยงการส่งออก +SecurityKey = Security Key PastDelayVCalExport=อย่าส่งออกเหตุการณ์ที่มีอายุมากกว่า AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=สีพื้นหลังสำหรับส BackgroundTableLineEvenColor=สีพื้นหลังสำหรับแม้แต่เส้นตาราง MinimumNoticePeriod=ระยะเวลาการแจ้งให้ทราบล่วงหน้าขั้นต่ำ (ตามคำขอลาของคุณจะต้องทำก่อนการหน่วงเวลานี้) NbAddedAutomatically=จำนวนวันที่เพิ่มเข้าไปในเคาน์เตอร์ของผู้ใช้ (โดยอัตโนมัติ) ในแต่ละเดือน -EnterAnyCode=ฟิลด์นี้มีการอ้างอิงในการระบุสาย ป้อนค่าที่คุณเลือกได้ แต่ไม่มีตัวอักษรพิเศษ +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/th_TH/banks.lang b/htdocs/langs/th_TH/banks.lang index 0a547bb3422..ec66bfbaf1b 100644 --- a/htdocs/langs/th_TH/banks.lang +++ b/htdocs/langs/th_TH/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/th_TH/bills.lang b/htdocs/langs/th_TH/bills.lang index 444472a0444..5976d3100e4 100644 --- a/htdocs/langs/th_TH/bills.lang +++ b/htdocs/langs/th_TH/bills.lang @@ -52,11 +52,12 @@ Invoices=ใบแจ้งหนี้ InvoiceLine=เส้นใบแจ้งหนี้ InvoiceCustomer=ใบแจ้งหนี้ของลูกค้า CustomerInvoice=ใบแจ้งหนี้ของลูกค้า -CustomersInvoices=ใบแจ้งหนี้ลูกค้า +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=ซัพพลายเออร์ใบแจ้งหนี้ +SupplierBills=Vendor invoices Payment=การชำระเงิน PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=การชำระเงินที่ทำมาแล PaymentsBackAlreadyDone=Refunds already done PaymentRule=กฎการชำระเงิน PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=ปริมาณ (ทีโอที %%.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=โอนเงินผ่านธนาคาร PaymentTypeShortVIR=โอนเงินผ่านธนาคาร @@ -494,12 +498,16 @@ Cash=เงินสด Reported=ล่าช้า DisabledBecausePayments=เป็นไปไม่ได้เนื่องจากมีการชำระเงินบางส่วน CantRemovePaymentWithOneInvoicePaid=ไม่สามารถลบการชำระเงินเนื่องจากมีอย่างน้อยหนึ่งใบแจ้งหนี้แยกจ่าย +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=การชำระเงินที่คาดว่าจะ CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=การชำระเงินโดยการชำระเงินนี้ 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=จ่ายเงิน ToMakePaymentBack=คืนทุน @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=จำนวนกลับมาพร้อมกับรูปแบบ% syymm-nnnn สำหรับใบแจ้งหนี้และมาตรฐาน% syymm-nnnn สำหรับการบันทึกเครดิตที่ yy เป็นปีเป็นเดือนมิลลิเมตรและ nnnn เป็นลำดับที่มีการหยุดพักและกลับไปที่ 0 ไม่มี -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=เริ่มต้นด้วยการเรียกเก็บเงิน $ syymm มีอยู่แล้วและไม่ได้เข้ากันได้กับรูปแบบของลำดับนี้ ลบหรือเปลี่ยนชื่อเพื่อเปิดใช้งานโมดูลนี้ -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=ใบแจ้งหนี้สถานการณ์แรก InvoiceFirstSituationDesc=<b>ใบแจ้งหนี้สถานการณ์จะเชื่อมโยงกับสถานการณ์ที่เกี่ยวข้องกับความก้าวหน้าเช่นความก้าวหน้าของการก่อสร้าง</b> สถานการณ์แต่ละครั้งจะถูกผูกติดอยู่กับใบแจ้งหนี้ InvoiceSituation=ใบแจ้งหนี้สถานการณ์ +PDFInvoiceSituation=ใบแจ้งหนี้สถานการณ์ InvoiceSituationAsk=ใบแจ้งหนี้ดังต่อไปนี้สถานการณ์ InvoiceSituationDesc=สร้างสถานการณ์ใหม่ดังต่อไปนี้อย่างใดอย่างหนึ่งที่มีอยู่แล้ว SituationAmount=จำนวนใบแจ้งหนี้สถานการณ์ (สุทธิ) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/th_TH/boxes.lang b/htdocs/langs/th_TH/boxes.lang index f51f0e660fa..304e06b4448 100644 --- a/htdocs/langs/th_TH/boxes.lang +++ b/htdocs/langs/th_TH/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=ยอดเงินเปิดบัญชี BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=การบัญชี +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/th_TH/categories.lang b/htdocs/langs/th_TH/categories.lang index e61138aee8e..d03372dacbc 100644 --- a/htdocs/langs/th_TH/categories.lang +++ b/htdocs/langs/th_TH/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=ลูกค้าแท็ก / พื้นที่ประเภท MembersCategoriesArea=แท็กสมาชิก / พื้นที่ประเภท ContactsCategoriesArea=แท็กติดต่อ / พื้นที่ประเภท -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=แสดงแท็ก / หมวดหมู่ ByDefaultInList=โดยค่าเริ่มต้นในรายการ ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/th_TH/companies.lang b/htdocs/langs/th_TH/companies.lang index 8956b27f853..27b693be2e4 100644 --- a/htdocs/langs/th_TH/companies.lang +++ b/htdocs/langs/th_TH/companies.lang @@ -43,9 +43,10 @@ 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=บริษัท แม่ Subsidiaries=บริษัท ย่อย -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=รายงานอัตรา +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=รหัสสุภาพ RegisteredOffice=สำนักงานที่สมัครสมาชิก Lastname=นามสกุล @@ -172,14 +173,20 @@ ProfId1ES=ศหมายเลข 1 (CIF / NIF) ProfId2ES=ศหมายเลข 2 (หมายเลขประกันสังคม) ProfId3ES=ศหมายเลข 3 (CNAE) ProfId4ES=ศหมายเลข 4 (วิทยาลัยจำนวน) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=ศหมายเลข 1 (ไซเรน) ProfId2FR=ศหมายเลข 2 (SIRET) ProfId3FR=ศหมายเลข 3 (NAF, APE เก่า) ProfId4FR=ศหมายเลข 4 (RCS / RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=ทะเบียนเลขที่ ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=ศหมายเลข 1 (NIPC) ProfId2PT=ศหมายเลข 2 (หมายเลขประกันสังคม) ProfId3PT=ศหมายเลข 3 (Record พาณิชย์จำนวน) ProfId4PT=ศหมายเลข 4 (เรือน) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=ศหมายเลข 1 (OGRN) ProfId2RU=ศหมายเลข 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=การเรียกเก็บเงินในป OutstandingBill=แม็กซ์ สำหรับการเรียกเก็บเงินที่โดดเด่น OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=รหัสที่เป็นอิสระ รหัสนี้สามารถแก้ไขได้ในเวลาใดก็ได้ ManagingDirectors=ผู้จัดการ (s) ชื่อ (ซีอีโอผู้อำนวยการประธาน ... ) MergeOriginThirdparty=ซ้ำของบุคคลที่สาม (บุคคลที่สามต้องการลบ) diff --git a/htdocs/langs/th_TH/compta.lang b/htdocs/langs/th_TH/compta.lang index a74d5c1967d..e6f46facdf1 100644 --- a/htdocs/langs/th_TH/compta.lang +++ b/htdocs/langs/th_TH/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=ภาษีมูลค่าเพิ่มที่จัดเก็บ StatusToPay=ที่จะต้องจ่าย SpecialExpensesArea=พื้นที่สำหรับการชำระเงินพิเศษทั้งหมด +VATExpensesArea=Area for all TVA payments SocialContribution=ภาษีทางสังคมหรือทางการคลัง SocialContributions=ภาษีทางสังคมหรือทางการคลัง SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=การชำระเงินตามใบแจ้ PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=สังคม / ชำระภาษีการคลัง PaymentVat=การชำระเงินภาษีมูลค่าเพิ่ม +AutomaticCreationPayment=Automatically record the payment ListPayment=รายชื่อของการชำระเงิน ListOfCustomerPayments=รายการชำระเงินของลูกค้า ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF การชำระเงิน LT2PaymentsES=IRPF การชำระเงิน VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=ตรวจสอบวันที่แผนกต้อนรับส่วนหน้า NbOfCheques=No. of checks PaySocialContribution=จ่ายทางสังคม / ภาษีการคลัง -ConfirmPaySocialContribution=คุณแน่ใจหรือว่าต้องการที่จะจัดนี้ภาษีทางสังคมหรือทางการคลังเป็นเงิน? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=ลบชำระภาษีทางสังคมหรือทางการคลัง -ConfirmDeleteSocialContribution=คุณแน่ใจหรือว่าต้องการลบนี้สังคม / ชำระภาษีการคลัง? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=ภาษีสังคมและการคลังและการชำระเงิน CalcModeVATDebt=<b>โหมด% sVAT ความมุ่งมั่นบัญชี%</b> s CalcModeVATEngagement=โหมด <b>sVAT% รายได้ค่าใช้จ่าย-%</b> s @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer VATReportByCustomersInInputOutputMode=รายงานโดยลูกค้าภาษีมูลค่าเพิ่มที่จัดเก็บและเรียกชำระแล้ว VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=รายงานโดยอัตรา RE @@ -217,7 +231,7 @@ Pcg_subtype=ชนิดย่อย PCG InvoiceLinesToDispatch=เส้นที่จะส่งใบแจ้งหนี้ ByProductsAndServices=By product and service RefExt=อ้างอิงภายนอก -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=เชื่อมโยงการสั่งซื้อ Mode1=วิธีที่ 1 Mode2=วิธีที่ 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=โคลนมันสำหรับเดือนถัดไป SimpleReport=รายงานอย่างง่าย AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/th_TH/ecm.lang b/htdocs/langs/th_TH/ecm.lang index d93d9646e22..9e0495720b4 100644 --- a/htdocs/langs/th_TH/ecm.lang +++ b/htdocs/langs/th_TH/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/th_TH/errors.lang b/htdocs/langs/th_TH/errors.lang index 4de399f8493..7803f91686e 100644 --- a/htdocs/langs/th_TH/errors.lang +++ b/htdocs/langs/th_TH/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>สารบบ% s</b> ไม่พบ (เส้นทา ErrorFunctionNotAvailableInPHP=<b>% s</b> ฟังก์ชั่นที่จำเป็นสำหรับคุณลักษณะนี้ แต่ไม่สามารถใช้ได้ในรุ่น / การตั้งค่าของ PHP นี้ ErrorDirAlreadyExists=ไดเรกทอรีที่มีชื่อนี้อยู่แล้ว ErrorFileAlreadyExists=ไฟล์ที่มีชื่อนี้อยู่แล้ว +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=ไฟล์ไม่ได้รับอย่างสมบูรณ์โดยเซิร์ฟเวอร์ ErrorNoTmpDir=ชั่วคราวโดยตรงได้% s ไม่ได้มีอยู่ ErrorUploadBlockedByAddon=อัพโหลดบล็อกโดย PHP / ปลั๊กอินอาปาเช่ @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/th_TH/externalsite.lang b/htdocs/langs/th_TH/externalsite.lang index fcb010a6ab3..f650f17c22f 100644 --- a/htdocs/langs/th_TH/externalsite.lang +++ b/htdocs/langs/th_TH/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=การติดตั้งการเชื่อมโยงไปยังเว็บไซต์ภายนอก -ExternalSiteURL=URL ของเว็บไซต์ภายนอก +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=โมดูล ExternalSite ไม่ได้กำหนดค่าอย่างถูกต้อง ExampleMyMenuEntry=รายการเมนู diff --git a/htdocs/langs/th_TH/main.lang b/htdocs/langs/th_TH/main.lang index 62d14790365..6934a6e98eb 100644 --- a/htdocs/langs/th_TH/main.lang +++ b/htdocs/langs/th_TH/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif วันที่ IPModification=Modification IP DateLastModification=Latest modification date DateValidation=วันที่ตรวจสอบ +DateSigning=Signing date DateClosing=วันปิดสมุดทะเบียน DateDue=วันที่ครบกำหนด DateValue=วันที่คิดมูลค่า @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=ราคาต่อหน่วย PriceU=UP PriceUHT=UP (สุทธิ) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=UP (รวมภาษี). Amount=จำนวน AmountInvoice=จำนวนใบแจ้งหนี้ @@ -389,6 +390,8 @@ AmountTotal=จำนวนเงินรวม AmountAverage=จำนวนเงินเฉลี่ย PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=ร้อยละ Total=ทั้งหมด SubTotal=ไม่ทั้งหมด @@ -724,7 +727,7 @@ MenuMembers=สมาชิก MenuAgendaGoogle=วาระการประชุมของ Google MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr ขีด จำกัด (เมนูที่บ้านการตั้งค่าการรักษาความปลอดภัย):% s Kb, PHP ขีด จำกัด :% s Kb -NoFileFound=ไม่มีเอกสารที่บันทึกไว้ในไดเรกทอรีนี้ +NoFileFound=No documents uploaded CurrentUserLanguage=ภาษาปัจจุบัน CurrentTheme=รูปแบบปัจจุบัน CurrentMenuManager=ผู้จัดการเมนูปัจจุบัน @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=รายชื่อผู้ติดต่อ SearchIntoMembers=สมาชิก SearchIntoUsers=ผู้ใช้ SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=โครงการ SearchIntoMO=Manufacturing Orders SearchIntoTasks=งาน @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=ได้รับมอบหมายให้ Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/th_TH/margins.lang b/htdocs/langs/th_TH/margins.lang index daba5831b4b..0f020953bdf 100644 --- a/htdocs/langs/th_TH/margins.lang +++ b/htdocs/langs/th_TH/margins.lang @@ -16,12 +16,13 @@ MarginDetails=รายละเอียดอัตรากำไรขั้ ProductMargins=อัตรากำไรขั้นต้นของผลิตภัณฑ์ CustomerMargins=อัตรากำไรขั้นต้นของลูกค้า SalesRepresentativeMargins=อัตรากำไรขั้นต้นเป็นตัวแทนขาย +ContactOfInvoice=Contact of invoice UserMargins=อัตรากำไรขั้นต้นของผู้ใช้ ProductService=สินค้าหรือบริการ AllProducts=ผลิตภัณฑ์และบริการทั้งหมด ChooseProduct/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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=วิธี Margin ส่วนลดทั่วโลก UseDiscountAsProduct=เป็นผลิตภัณฑ์ UseDiscountAsService=เป็นบริการ @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=ราคาทุน UnitCharges=ค่าใช้จ่ายต่อหน่วย Charges=ค่าใช้จ่าย AgentContactType=ตัวแทนพาณิชย์ประเภทการติดต่อ -AgentContactTypeDetails=กำหนดประเภทติดต่อ (เชื่อมโยงในใบแจ้งหนี้) จะใช้สำหรับการรายงานอัตรากำไรขั้นต้นต่อตัวแทนขาย +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=อัตราจะต้องเป็นค่าตัวเลข markRateShouldBeLesserThan100=อัตรามาร์คควรจะต่ำกว่า 100 ShowMarginInfos=แสดงขอบข่าวสาร 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). +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). diff --git a/htdocs/langs/th_TH/members.lang b/htdocs/langs/th_TH/members.lang index 90071b79ff1..cb702593656 100644 --- a/htdocs/langs/th_TH/members.lang +++ b/htdocs/langs/th_TH/members.lang @@ -21,10 +21,12 @@ MembersListToValid=รายชื่อสมาชิกร่าง (ที MembersListValid=รายชื่อสมาชิกที่ถูกต้อง MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=รายชื่อสมาชิกที่สิ้นสุดสมาชิกภาพ MembersListQualified=รายชื่อสมาชิกที่ผ่านการรับรอง MenuMembersToValidate=สมาชิกร่าง MenuMembersValidated=สมาชิกผ่านการตรวจสอบ +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=สมาชิกที่มีการสมัครสมาชิกจะได้รับ MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=หมดอายุ MemberStatusPaid=สมัครสมาชิกถึงวันที่ MemberStatusPaidShort=ถึงวันที่ +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=สมาชิกร่าง +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=ผ่านการตรวจสอบ @@ -82,6 +87,8 @@ Physical=กายภาพ Moral=ศีลธรรม MorAndPhy=Moral and Physical Reenable=reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=ลบสมาชิก @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=รูปแบบของหน้าป้าย DescADHERENT_ETIQUETTE_TEXT=ข้อความที่พิมพ์อยู่บนแผ่นสมาชิก @@ -162,6 +170,7 @@ DocForLabels=สร้างแผ่นอยู่ SubscriptionPayment=การชำระเงินการสมัครสมาชิก LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=สถิติสมาชิกตามประเทศ MembersStatisticsByState=สถิติสมาชิกโดยรัฐ / จังหวัด MembersStatisticsByTown=สถิติสมาชิกโดยเมือง diff --git a/htdocs/langs/th_TH/modulebuilder.lang b/htdocs/langs/th_TH/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/th_TH/modulebuilder.lang +++ b/htdocs/langs/th_TH/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/th_TH/orders.lang b/htdocs/langs/th_TH/orders.lang index 256288586d6..dccf12e02ac 100644 --- a/htdocs/langs/th_TH/orders.lang +++ b/htdocs/langs/th_TH/orders.lang @@ -16,6 +16,8 @@ ToOrder=ทำให้การสั่งซื้อ MakeOrder=ทำให้การสั่งซื้อ SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=อีเมล์ OrderByWWW=ออนไลน์ OrderByPhone=โทรศัพท์ # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=รูปแบบการสั่งซื้อที่ง่าย PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=บิลสั่งซื้อ +CreateInvoiceForThisSupplier=บิลสั่งซื้อ NoOrdersToInvoice=ไม่มีการเรียกเก็บเงินการสั่งซื้อ CloseProcessedOrdersAutomatically=จำแนก "แปรรูป" คำสั่งที่เลือกทั้งหมด OrderCreation=การสร้างการสั่งซื้อ diff --git a/htdocs/langs/th_TH/other.lang b/htdocs/langs/th_TH/other.lang index b69c81198d1..aa3544a88b1 100644 --- a/htdocs/langs/th_TH/other.lang +++ b/htdocs/langs/th_TH/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=สร้างโดย% s ModifiedBy=ดัดแปลงโดย% s ValidatedBy=การตรวจสอบโดย% s +SignedBy=Signed by %s ClosedBy=ปิดโดย% s CreatedById=รหัสผู้ใช้ที่สร้าง ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=นี่คือกุญแจใหม่ของคุณเข NewKeyWillBe=คีย์ใหม่ของคุณที่จะเข้าสู่ระบบซอฟแวร์จะเป็น ClickHereToGoTo=คลิกที่นี่เพื่อไปยัง% s YouMustClickToChange=คุณต้อง แต่แรกคลิกที่ลิงค์ต่อไปนี้ในการตรวจสอบการเปลี่ยนแปลงรหัสผ่านนี้ +ConfirmPasswordChange=Confirm password change ForgetIfNothing=หากคุณไม่ได้ขอเปลี่ยนแปลงนี้เพียงแค่ลืมอีเมล์นี้ ข้อมูลประจำตัวของคุณจะถูกเก็บไว้ที่ปลอดภัย IfAmountHigherThan=หากจำนวนเงินที่สูงกว่า <strong>s%</strong> SourcesRepository=พื้นที่เก็บข้อมูลสำหรับแหล่งที่มา diff --git a/htdocs/langs/th_TH/productbatch.lang b/htdocs/langs/th_TH/productbatch.lang index dfedb8b0e17..72ff7f7a24f 100644 --- a/htdocs/langs/th_TH/productbatch.lang +++ b/htdocs/langs/th_TH/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=การใช้งานจำนวนมาก / หมายเลขซีเรีย -ProductStatusOnBatch=ใช่ (มาก / อนุกรมที่จำเป็น) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=ไม่ (มาก / อนุกรมไม่ได้ใช้) -ProductStatusOnBatchShort=ใช่ +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=ไม่ Batch=ล็อต/ลำดับ atleast1batchfield=กินตามวันที่หรือขายโดยวันที่หรือ Lot / หมายเลข Serial @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/th_TH/products.lang b/htdocs/langs/th_TH/products.lang index 5d91c67d7ec..0884e8e05aa 100644 --- a/htdocs/langs/th_TH/products.lang +++ b/htdocs/langs/th_TH/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=ผลิตภัณฑ์ที่กำหนดไว้ล่วงหน้า / บริการที่จะขาย @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=ปรับปรุงอย่างถูกต้อง PropalMergePdfProductActualFile=ไฟล์ที่ใช้ในการเพิ่มเป็น PDF ดาซูร์มี / เป็น PropalMergePdfProductChooseFile=ไฟล์ PDF เลือก -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=ราคาเริ่มต้นราคาที่แท้จริงอาจขึ้นอยู่กับลูกค้า WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=หน่วย diff --git a/htdocs/langs/th_TH/projects.lang b/htdocs/langs/th_TH/projects.lang index dc146212012..80f1d602be7 100644 --- a/htdocs/langs/th_TH/projects.lang +++ b/htdocs/langs/th_TH/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/th_TH/propal.lang b/htdocs/langs/th_TH/propal.lang index 9c13abe8817..9b8ab3dc6b4 100644 --- a/htdocs/langs/th_TH/propal.lang +++ b/htdocs/langs/th_TH/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=ส่งข้อเสนอในเชิงพาณิช DatePropal=วันของข้อเสนอ DateEndPropal=ตั้งแต่วันที่วันที่สิ้นสุด ValidityDuration=ระยะเวลาตั้งแต่วันที่ -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal% s ไม่พบ AddToDraftProposals=เพิ่มลงในร่างข้อเสนอ @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=ข้อเสนอเชิงพาณิชย์และสาย ProposalLine=โฆษณาข้อเสนอ +ProposalLines=Proposal lines AvailabilityPeriod=ความล่าช้าที่ว่าง SetAvailability=ความล่าช้าในการตั้งค่าความพร้อม AfterOrder=หลังจากที่สั่งซื้อ @@ -85,3 +85,8 @@ ProposalCustomerSignature=ยอมรับเขียนประทับ 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/th_TH/stocks.lang b/htdocs/langs/th_TH/stocks.lang index 1ec66e72dee..15a6bdae356 100644 --- a/htdocs/langs/th_TH/stocks.lang +++ b/htdocs/langs/th_TH/stocks.lang @@ -19,8 +19,8 @@ Stock=สต็อกสินค้า Stocks=หุ้น MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=สถานที่ -LocationSummary=ที่ตั้งชื่อสั้น -NumberOfDifferentProducts=จำนวนของผลิตภัณฑ์ที่แตกต่างกัน +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=จำนวนของผลิตภัณฑ์ LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=ค่าโกดัง 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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=หุ้นเสมือนจริง VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=คลังสินค้า Id DescWareHouse=คลังสินค้ารายละเอียด LieuWareHouse=คลังสินค้าภาษาท้องถิ่น WarehousesAndProducts=โกดังและผลิตภัณฑ์ WarehousesAndProductsBatchDetail=โกดังและผลิตภัณฑ์ (ที่มีรายละเอียดมากต่อ / อนุกรม) AverageUnitPricePMPShort=ราคาเฉลี่ยถ่วงน้ำหนัก -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=ราคาขายต่อหน่วย EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,7 @@ Replenishments=replenishments NbOfProductBeforePeriod=ปริมาณของ% s สินค้าในสต็อกก่อนระยะเวลาที่เลือก (<% s) NbOfProductAfterPeriod=จำนวนของผลิตภัณฑ์% s ในสต็อกหลังจากระยะเวลาที่เลือก (>% s) MassMovement=การเคลื่อนไหวมวลชน -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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=ใบเสร็จรับเงินสำหรับการสั่งซื้อนี้ StockMovementRecorded=การเคลื่อนไหวของหุ้นที่บันทึกไว้ @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=ป้ายของการเคลื่อนไหว -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=การเคลื่อนไหวหรือรหัสสินค้าคงคลัง IsInPackage=เป็นแพคเกจที่มีอยู่ @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=เปิดใหม่ +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/th_TH/suppliers.lang b/htdocs/langs/th_TH/suppliers.lang index 4c536fea3e8..5219ed3fb4a 100644 --- a/htdocs/langs/th_TH/suppliers.lang +++ b/htdocs/langs/th_TH/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=ประวัติศาสตร์ diff --git a/htdocs/langs/th_TH/ticket.lang b/htdocs/langs/th_TH/ticket.lang index c66c4830bdf..8f739ef8f71 100644 --- a/htdocs/langs/th_TH/ticket.lang +++ b/htdocs/langs/th_TH/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=ชนิด Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/th_TH/users.lang b/htdocs/langs/th_TH/users.lang index 884f5b91031..68e1691f8bf 100644 --- a/htdocs/langs/th_TH/users.lang +++ b/htdocs/langs/th_TH/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=ลบออกจากกลุ่ม PasswordChangedAndSentTo=<b>เปลี่ยนรหัสผ่านและส่งไปยัง%</b> s PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=<b>ขอเปลี่ยนรหัสผ่านสำหรับ% s ส่งไปยัง%</b> 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=ผู้ใช้และกลุ่ม LastGroupsCreated=Latest %s groups created @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=โดเมนของผู้ใช้% s Reactivate=ฟื้นฟู 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=ได้รับอนุญาตเพราะรับมาจากหนึ่งในกลุ่มของผู้ใช้ Inherited=ที่สืบทอด +UserWillBe=Created user will be UserWillBeInternalUser=ผู้ใช้ที่สร้างจะเป็นผู้ใช้งานภายใน (เพราะไม่เชื่อมโยงกับบุคคลที่สามโดยเฉพาะ) UserWillBeExternalUser=ผู้ใช้ที่สร้างจะเป็นผู้ใช้ภายนอก (เพราะเชื่อมโยงกับบุคคลที่สามโดยเฉพาะ) IdPhoneCaller=id โทรโทรศัพท์ @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/th_TH/website.lang b/htdocs/langs/th_TH/website.lang index 373eab76476..0110af84a4b 100644 --- a/htdocs/langs/th_TH/website.lang +++ b/htdocs/langs/th_TH/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=อ่าน WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/th_TH/zapier.lang b/htdocs/langs/th_TH/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/th_TH/zapier.lang +++ b/htdocs/langs/th_TH/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/tr_TR/accountancy.lang b/htdocs/langs/tr_TR/accountancy.lang index 197742deeac..5568b64c0fa 100644 --- a/htdocs/langs/tr_TR/accountancy.lang +++ b/htdocs/langs/tr_TR/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bağlı fatura satırları ExpenseReportLines=Bağlanacak gider raporu satırları ExpenseReportLinesDone=Bağlanmış gider raporları satırları IntoAccount=Satırı muhasebe hesabına bağla -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bağla @@ -209,7 +209,7 @@ Codejournal=Günlük JournalLabel=Journal label NumPiece=Parça sayısı TransactionNumShort=Num. transaction -AccountingCategory=Kişiselleştirilmiş gruplar +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Muhasebe girişleri +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index e15ec009134..0486dee99fc 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Bağlantı kilidini kaldır YourSession=Oturumunuz Sessions=Kullanıcı Oturumları WebUserGroup=Web sunucusu kullanıcısı/grubu +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=PHP yapılandırmanız aktif oturumların listelenmesine izin vermiyor gibi görünüyor. Oturumları kaydetmek için kullanılan dizin (<b>%s</b>) korunuyor olabilir (örneğin, İşletim Sistemi izinleri veya open_basedir PHP direkti tarafından). @@ -62,6 +63,7 @@ IfModuleEnabled=Not: yalnızca <b>%s</b> modülü etkinleştirildiğinde evet et RemoveLock=<b>%s</b> dosyası mevcutsa, Güncelleme/Yükleme aracının kullanımına izin vermek için kaldırın veya yeniden adlandırın. RestoreLock=Güncelleme/Yükleme aracının daha sonraki kullanımlarına engel olmak için <b>%s</b> dosyasını, sadece okuma iznine sahip olacak şekilde geri yükleyin. SecuritySetup=Güvenlik ayarları +PHPSetup=PHP setup SecurityFilesDesc=Burada dosya yükleme konusunda güvenlikle ilgili seçenekleri tanımlayın. ErrorModuleRequirePHPVersion=Hata, bu modül %s veya daha yüksek PHP sürümü gerektirir ErrorModuleRequireDolibarrVersion=Hata, bu modül %s veya daha yüksek Dolibarr sürümü gerektirir @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Bu alan yönetim işlevlerini sunar. İstenilen özelliği s Purge=Temizleme PurgeAreaDesc=Bu sayfa Dolibarr tarafından oluşturulan veya depolanan tüm dosyaları silmenizi sağlar (<b>%s</b> dizinindeki geçici veya tüm dosyalar). Bu özelliğin kullanılması normalde gerekli değildir. Bu araç, Dolibarr yazılımı web sunucusu tarafından oluşturulan dosyaların silinmesine izin vermeyen bir sağlayıcı tarafından barındırılan kullanıcılar için geçici bir çözüm olarak sunulur. PurgeDeleteLogFile=Syslog modülü için tanımlı <b>%s</b> dosyası da dahil olmak üzere günlük dosyalarını sil (veri kaybetme riskiniz yoktur) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=<b>%s</b> dizinindeki bütün dosyaları sil.<br>Bu işlem, öğelerle (üçüncü partiler, faturalar, v.s.) ilgili oluşturulan tüm dosyaları, ECM modülüne yüklenen dosyaları, veritabanı yedekleme dökümlerini ve geçici dosyaları silecektir. PurgeRunNow=Şimdi temizle @@ -232,6 +234,7 @@ BoxesAvailable=Mevcut ekran etiketleri BoxesActivated=Etkin ekran etiketleri ActivateOn=Etkinleştirme açık ActiveOn=Etkinlik açık +ActivatableOn=Activatable on SourceFile=Kaynak dosyası AvailableOnlyIfJavascriptAndAjaxNotDisabled=Yalnızca JavaScript ve Ajax devre dışı değilse vardır Required=Gerekli @@ -347,9 +350,10 @@ LastActivationAuthor=En son aktivasyon yazarı LastActivationIP=En son aktivasyon IP'si UpdateServerOffline=Güncelleme sunucusu çevrimdışı WithCounter=Bir sayacı yönet -GenericMaskCodes=Herhangi bir numaralandırma maskesi girebilirsiniz. Bu maskede alttaki etiketler kullanılabilir: <br><b>{000000}</ b> her %s te artırılacak bir numaraya karşılık gelir. Sayacın istenilen uzunluğu kadar çok sıfır girin. Sayaç, maskedeki kadar çok sayıda sıfır olacak şekilde soldan sıfırlarla tamamlanacaktır.<br><b>{000000+000}</b> önceki ile aynıdır fakat + işaretinin sağındaki sayıya denk gelen bir sapma ilk %s ten itibaren uygulanır.<br><b>{000000@x}</b> önceki ile aynıdır fakat sayaç x aya ulaşıldığında sıfırlanır (x= 1 ve 12 arasındadır veya yapılandırmada tanımlanan mali yılın ilk aylarını kullanmak için 0 dır). Bu seçenek kullanılırsa ve x= 2 veya daha yüksekse, {yyyy}{mm} veya {yyyy}{mm} dizisi de gereklidir.<br><b>{dd}</b> gün (01 ila 31).<br><b> {mm}</b> ay (01 ila 12).<br><b>{yy}</b>, <b>{yyyy}</b> veya <b>{y}</b> yıl 2, 4 veya 1 sayıları üzerindedir.<br> -GenericMaskCodes2=<b> {cccc} </b> n karakterdeki istemci kodunu <br><b>{cccc000}</b>n karakterdeki istemci kodunu müşteriye atanan bir sayaç tarafından izlenir. Müşteriye ayrılan bu sayaç, global sayaçla aynı anda sıfırlanır. <br><b> {tttt} </b> n karakterdeki üçüncü parti türünün kodu (bkz. Giriş - Kurulum - Sözlük - Üçüncü parti türleri). Eğer bu etiketi eklerseniz, sayaç her üçüncü taraf türü için farklı olacaktır. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Maskede diğer tüm karakterler olduğu gibi kalır.<br>Boşluklara izin verilmez.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a= <u> Üçüncü parti TheCompany'nin 2007-01-31 tarihli 99. %s örneği: </u> <br> GenericMaskCodes4b=<u>2007/03/01 tarihinde oluşturulan üçüncü parti örneği:</u><br> GenericMaskCodes4c=<u>2007-03-01 de oluşturulan ürün için örnek:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=PDF oluşturmada kullanılan kütüphane @@ -541,6 +545,8 @@ Module40Name=Tedarikçiler Module40Desc=Satıcılar ve satın alma yönetimi (satınalma siparişleri ve tedarikçi hesaplarının faturalandırılması) Module42Name=Hata Ayıklama Günlükleri Module42Desc=Günlükleme araçları (dosya, syslog, ...). Bu gibi günlükler teknik/hata ayıklama amaçları içindir. +Module43Name=Hata Ayıklama Çubuğu +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Düzenleyiciler Module49Desc=Düzenleyici yönetimi Module50Name=Ürünler @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind dönüştürme becerileri Module3200Name=Değiştirilemez Arşivler Module3200Desc=Değiştirilemeyen bir iş etkinlikleri günlüğü etkinleştirin. Etkinlikler gerçek zamanlı olarak arşivlenir. Günlük, dışa aktarılabilen zincirlenmiş etkinliklerin salt okunur bir tablosudur. Bu modül bazı ülkeler için zorunlu olabilir. +Module3400Name=Sosyal Ağlar +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=IK Module4000Desc=İnsan kaynakları yönetimi (departman, çalışan sözleşmeleri ve duygu yönetimi) Module5000Name=Çoklu-firma Module5000Desc=Birden çok firmayı yönetmenizi sağlar -Module6000Name=İş akışı -Module6000Desc=İş akışı yönetimi (otomatik nesne oluşturma ve/veya otomatik durum değişikliği) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websiteleri 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. Module20000Name=İzin İstekleri Yönetimi @@ -805,7 +813,8 @@ PermissionAdvanced253=İç/dış kullanıcı ve izinlerini oluştur/değiştir Permission254=Yalnızca dış kullanıcıları oluştur/değiştir Permission255=Diğer kullanıcıların şifrelerini değiştir Permission256=Diğer kullanıcıları sil ya da engelle -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=CA oku Permission272=Fatura oku Permission273=Fatura dağıt @@ -1175,7 +1184,8 @@ SetupDescription2=Aşağıdaki iki bölümün kurulumu zorunludur (Ayarlar menü SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4= <a href="%s"> %s -> %s </a> <br> <br> Bu yazılım birçok modül/uygulama paketidir. Gereksinimlerinizle ilgili modüller etkinleştirilmeli ve yapılandırılmalıdır. Bu modüllerin etkinleştirilmesiyle menü girişleri görünecektir. SetupDescription5=Ayarlar menüsündeki diğer girişler isteğe bağlı parametreleri yönetmenizi sağlar. -LogEvents=Güvenlik denetimi etkinlikleri +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Denetim InfoDolibarr=Dolibarr Bilgileri InfoBrowser=Tarayıcı Bilgileri @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Yükseltme işlemini gerçekleştirmek gerekli YouMustRunCommandFromCommandLineAfterLoginToUser=Bu komutu <b>%s</b> kullanıcısı ile bir kabuğa giriş yaptıktan sonra komut satırından çalıştırabilir ya da parolayı <b>%s</b> elde etmek için komut satırının sonuna –W seçeneğini ekleyebilirsiniz. YourPHPDoesNotHaveSSLSupport=SSL fonksiyonları PHP nizde mevcut değildir DownloadMoreSkins=Daha fazla kaplama indirin -SimpleNumRefModelDesc=Referans numarasını %syyaa-nnnn formatına döndürür, burada yy kısmı yıl, aa kısmı ay ve nnnn kısmı ise sıfırlamasız ardışık sayı serisidir. +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Adreslerle profesyonel kimliği göster ShowVATIntaInAddress=Adreslerde Vergi numarasını gizle TranslationUncomplete=Kısmi çeviri @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy sunucusu: Ad/Adres MAIN_PROXY_PORT=Proxy sunucusu: Bağlantı noktası MAIN_PROXY_USER=Proxy sunucusu: Oturum açma/Kullanıcı MAIN_PROXY_PASS=Proxy sunucusu: Şifre -DefineHereComplementaryAttributes=%s için dahil edilmek istediğiniz ilave/özel nitelikleri buradan tanımlayabilirsiniz +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Tamamlayıcı öznitelikler ExtraFieldsLines=Tamamlayıcı öznitelikler (satırlar) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Oturum aç (Unix) LDAPFieldLoginExample=Örnek: uid LDAPFilterConnection=Arama süzgeçi LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Oturum aç (samba, activedirectory) LDAPFieldLoginSambaExample=Örnek: samaccountname LDAPFieldFullname=Tam Adı @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Firmanız KDV kullanmayacak şekilde tanımlanmış (Gi AccountancyCode=Muhasebe Kodu AccountancyCodeSell=Satış hesap. kodu AccountancyCodeBuy=Alış hesap. kodu +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Etkinlik ve gündem modülü kurulumu PasswordTogetVCalExport=Dışa aktarma bağlantısını yetkilendirme anahtarı +SecurityKey = Security Key PastDelayVCalExport=Bundan daha eski etkinliği dışa aktarma AGENDA_USE_EVENT_TYPE=Etkinlik türleri kullanın (Ayarlar -> Sözlükler -> Gündem etkinlik türleri menüsünden yönetilir) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Tabloda tek satırlar için arka plan rengi BackgroundTableLineEvenColor=Tabloda çift satırlar için arka plan rengi MinimumNoticePeriod=Enaz bildirim süresi (İzin isteğiniz bu süreden önce yapılmalı) NbAddedAutomatically=Her ay (otomatik olarak) bu kullanıcının sayacına eklenen gün sayısı -EnterAnyCode=Bu alan satırın tanınması için bir referans içerir. Özel karakterler hariç seçeceğiniz herhangi bir değeri girebilirsiniz. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Birçok dil varyantı bulundu RemoveSpecialChars=Özel karakterleri kaldır COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Sosyal Ağlar modülünün kurulumu EnableFeatureFor=<strong>%s</strong> için özellikleri etkinleştir VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=PDF üzerindeki gönderen ve alıcı adreslerinin yerini birbiriyle değiştir -FeatureSupportedOnTextFieldsOnly=Uyarı: Bu özellik yalnızca metin alanlarında desteklenir. Bu özelliği tetiklemek için ayrıca bir URL parametresi action=create ya da action=edit ayarlanmalı VEYA sayfa adı 'new.php' ile bitmelidir. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ UseDebugBar=Hata ayıklama çubuğunu kullan DEBUGBAR_LOGS_LINES_NUMBER=Konsolda saklanacak son günlük satırı sayısı WarningValueHigherSlowsDramaticalyOutput=Uyarı, yüksek değerler çıktıyı önemli ölçüde yavaşlatır ModuleActivated=Modül 1 %s etkinleştirilmiştir ve arayüzü yavaşlatıyor. +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Dışa aktarma modelleri herkesle paylaşılır ExportSetup=Dışa aktarma modülünün kurulumu ImportSetup=İçe aktarım modülünün kurulumu @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Alış modül etkinleştirildiğinde özellik kullanılamaz EmailTemplate=E-posta şablonu EMailsWillHaveMessageID=E-postalarda bu sözdizimiyle eşleşen bir 'Referanslar' etiketi bulunacak +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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=Alış modül etkinleştirildiğinde özellik kullanılamaz @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/tr_TR/banks.lang b/htdocs/langs/tr_TR/banks.lang index e89ddad9ee5..d94de5e03ac 100644 --- a/htdocs/langs/tr_TR/banks.lang +++ b/htdocs/langs/tr_TR/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=SEPA yetkiniz FindYourSEPAMandate=Bu, firmamızın bankanıza otomatik ödeme talimatı verebilme yetkisi için SEPA yetkinizdir. İmzalayarak iade edin (imzalı belgeyi tarayarak) veya e-mail ile gönderin AutoReportLastAccountStatement=Uzlaşma yaparken 'banka hesap özeti numarasını' en son hesap özeti numarası ile otomatik olarak doldur CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Hareketleri renklendir BankColorizeMovementDesc=Bu işlev etkinleştirilirse, borçlandırma veya kredi hareketleri için belirli bir arka plan rengi seçebilirsiniz BankColorizeMovementName1=Borç hareketi için arka plan rengi BankColorizeMovementName2=Kredi hareketi için arka plan rengi IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/tr_TR/bills.lang b/htdocs/langs/tr_TR/bills.lang index e55b5dbcfab..f15d588ae96 100644 --- a/htdocs/langs/tr_TR/bills.lang +++ b/htdocs/langs/tr_TR/bills.lang @@ -55,8 +55,9 @@ CustomerInvoice=Müşteri faturası CustomersInvoices=Müşteri faturaları SupplierInvoice=Tedarikçi faturası SuppliersInvoices=Tedarikçi faturaları +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Tedarikçi faturası -SupplierBills=tedarikçi faturaları +SupplierBills=Tedarikçi faturaları Payment=Ödeme PaymentBack=İade CustomerInvoicePaymentBack=İade @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Halihazırda yapılmış ödemeler PaymentsBackAlreadyDone=Geri ödemeler zaten yapıldı PaymentRule=Ödeme kuralı PaymentMode=Ödeme Türü +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Banka/Kredi Kartı PaymentTypePP=PayPal IdPaymentMode=Ödeme Türü (id) @@ -373,6 +376,7 @@ DateLastGeneration=Son oluşturma tarihi DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Oluşturulacak maksimum fatura sayısı NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Faturaları otomatik olarak doğrula @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month FixAmount=Fixed amount - 1 line with label '%s' VarAmount=Değişken tutar (%% top.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Banka havalesi PaymentTypeShortVIR=Banka havalesi @@ -494,12 +498,16 @@ Cash=Nakit Reported=Gecikmiş DisabledBecausePayments=Bazı ödemeler olduğundan dolayı mümkün değil CantRemovePaymentWithOneInvoicePaid=En az bir fatura ödenmiş olarak sınıflandırıldığı için ödemeyi silemezsiniz +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Beklenen ödeme CantRemoveConciliatedPayment=Uzlaştırılan ödeme kaldırılamıyor PayedByThisPayment=Bu ödeme ile ödenmiş 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=Öde ToMakePaymentBack=Geri öde @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Yeni bir fatura şablonu oluşturmak için PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Fatura PDF şablonu Crevette. Durum faturaları için eksiksiz bir fatura şablonu -TerreNumRefModelDesc1=Standart faturalar için numarayı %syymm-nnnn biçiminde ve iade faturaları için %syymm-nnnn biçiminde göster, yy yıl, mm ay ve nnnn boşluksuz ve 0 olmayan bir dizidir. -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=$syymm ile başlayan bir fatura hali hazırda vardır ve bu sıra dizisi için uygun değildir. Bu modülü etkinleştirmek için onu kaldırın ya da adını değiştirin. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=İlk hakediş faturası InvoiceFirstSituationDesc=<b>Hakediş faturaları</b> işin ilerleme durumuyla ilgili faturalardır, örneğin; bir inşaatın ilerleyişi. Her durum bir faturaya bağlanır. InvoiceSituation=Hakediş faturası +PDFInvoiceSituation=Hakediş faturası InvoiceSituationAsk=Hakedişi izleyen fatura InvoiceSituationDesc=Halihazırda olan bir hakedişi izleyen hakediş oluştur SituationAmount=Hakediş faturası tutarı (net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Fatura şablonunu sil ConfirmDeleteRepeatableInvoice=Şablon faturasını silmek istediğinizden emin misiniz? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s fatura oluşturuldu +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Belge oluşturma durumu DoNotGenerateDoc=Belge dosyası üretme AutogenerateDoc=Auto generate document file @@ -571,7 +581,11 @@ AutoFillDateTo=Set end date for service line with next invoice date AutoFillDateToShort=Bitiş tarihini ayarla MaxNumberOfGenerationReached=Max number of gen. reached BILL_DELETEInDolibarr=Fatura silindi -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted +BILL_SUPPLIER_DELETEInDolibarr=Tedarikçi fatura silindi UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/tr_TR/boxes.lang b/htdocs/langs/tr_TR/boxes.lang index 09c86eb5ee9..3a5990ccd75 100644 --- a/htdocs/langs/tr_TR/boxes.lang +++ b/htdocs/langs/tr_TR/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Oturum açma bilgileri BoxLastRssInfos=RSS Bilgisi BoxLastProducts=Son %s Ürün/Hizmet @@ -17,9 +18,13 @@ BoxLastActions=Son eylemler BoxLastContracts=Son sözleşmeler BoxLastContacts=Son kişiler/adresler BoxLastMembers=Son üyeler +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Son müdahaleler BoxCurrentAccounts=Açık hesaplar bakiyesi BoxTitleMemberNextBirthdays=Bu ayın doğum günleri (üyeler) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=%s'dan en son %s haber BoxTitleLastProducts=Ürünler/Hizmetler: değiştirilen son %s BoxTitleProductsAlertStock=Ürünler: stok uyarısı @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Son %s müşteri gönderileri NoRecordedShipments=Kayıtlı müşteri gönderimi yok BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Muhasebe +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Doğrulanmış projeler diff --git a/htdocs/langs/tr_TR/categories.lang b/htdocs/langs/tr_TR/categories.lang index 5369ebbec99..620b2cd832a 100644 --- a/htdocs/langs/tr_TR/categories.lang +++ b/htdocs/langs/tr_TR/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Tedarikçi etiketleri/kategorileri alanı CustomersCategoriesArea=Müşteri etiketleri/kategorileri alanı MembersCategoriesArea=Üyeler etiketleri/kategorileri alanı ContactsCategoriesArea=Kişi etiketleri/kategorileri alanı -AccountsCategoriesArea=Hesap etiketleri/kategorileri alanı +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Proje etiket/kategori alanı UsersCategoriesArea=Kullanıcı Etiketleri/Kategorileri Alanı SubCats=Alt kategoriler @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Etiketi/kategoriyi göster ByDefaultInList=B listede varsayılana göre ChooseCategory=Kategori seç -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Kategoriler için veya operatör kullanın diff --git a/htdocs/langs/tr_TR/companies.lang b/htdocs/langs/tr_TR/companies.lang index b27fea49898..6eda04aac99 100644 --- a/htdocs/langs/tr_TR/companies.lang +++ b/htdocs/langs/tr_TR/companies.lang @@ -43,9 +43,10 @@ Individual=Özel şahıs ToCreateContactWithSameName=Otomatik olarak, üçüncü partinin altında üçüncü partiyle aynı bilgilere sahip olan bir kişi/adres oluşturacaktır. Üçüncü parti eğer bir şahıs ise, sadece üçüncü parti oluşturmak çoğu durumda yeterlidir. ParentCompany=Ana firma Subsidiaries=Bağlı firmalar -ReportByMonth=Aya göre rapor -ReportByCustomers=Müşteriye göre rapor -ReportByQuarter=Orana göre rapor +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Hitap kodu RegisteredOffice=Merkez Lastname=Soyadı @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Sosyal güvenlik numarası) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Üst noı) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof No 1 (SIREN) ProfId2FR=Prof No 2 (SIRET) ProfId3FR=Prof No 3 (NAF, eski APE) ProfId4FR=Prof No 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Kayıt numarası ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Lüksemburg) ProfId2LU=Id. prof. 2 (İş izini) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof No 1 (NIPC) ProfId2PT=Prof No 2 (Sosyal güvenlik numarası) ProfId3PT=Prof No 3 (Ticaret Kayıt numarası) ProfId4PT=Prof No 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Geçerli bekleyen fatura OutstandingBill=Ödenmemiş fatura için ençok tutar OutstandingBillReached=Ödenmemiş fatura için ulaşılan ençok tutar OrderMinAmount=Sipariş için minimum miktar -MonkeyNumRefModelDesc=%syyaa-nnnn biçiminde bir müşteri kodu ve %syyaa-nnnn biçiminde bir tedarikçi kodu oluşur. Buradaki yy yılı, aa ayı, nnnn ise aralıksız ve 0'a dönmeyen bir diziyi ifade eder. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Müşteri/tedarikçi kodu serbesttir. Bu kod herhangi bir zamanda değiştirilebilir. ManagingDirectors=Yönetici(lerin) adı (CEO, müdür, başkan...) MergeOriginThirdparty=Çifte üçüncü parti (silmek istediğiniz üçüncü parti) diff --git a/htdocs/langs/tr_TR/compta.lang b/htdocs/langs/tr_TR/compta.lang index 5889d98d6bd..d3b33a4b579 100644 --- a/htdocs/langs/tr_TR/compta.lang +++ b/htdocs/langs/tr_TR/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=KDV alınan StatusToPay=Ödenecek SpecialExpensesArea=Tüm özel ödemeler alanı +VATExpensesArea=Area for all TVA payments SocialContribution=Sosyal ya da mali vergi SocialContributions=Sosyal ya da mali vergiler SocialContributionsDeductibles=İndirilecek sosyal ya da mali vergiler @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Müşteri fatura ödemesi PaymentSupplierInvoice=Tedarikçi faturası ödemesi PaymentSocialContribution=Sosyal/mali vergi ödemesi PaymentVat=KDV ödeme +AutomaticCreationPayment=Automatically record the payment ListPayment=Ödemeler listesi ListOfCustomerPayments=Müşteri ödemeleri listesi ListOfSupplierPayments=Tedarikçi ödemelerinin listesi @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Ödemesi LT2PaymentsES=IRPF Ödemeleri VATPayment=Satış vergisi ödemesi VATPayments=Satış vergisi ödemeleri +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ NoWaitingChecks=Para yatırılmayı bekleyen çek yok. DateChequeReceived=Çek giriş tarihi NbOfCheques=Çek sayısı PaySocialContribution=Bir sosyal/mali vergi öde -ConfirmPaySocialContribution=Bu sosyal ya da mali vergiyi ödendi olarak sınıflandırmak istediğinizden emin misiniz? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Bir sosyal ya da mali vergi ödemesi sil -ConfirmDeleteSocialContribution=Bu sosyal/mali vergiyi silmek istediğinizden emin misiniz? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Sosyal ve mali vergiler ve ödemeleri CalcModeVATDebt=Mod <b>%sKDV, taahhüt hesabı%s için</b>. CalcModeVATEngagement=Mod <b>%sKDV, gelirler-giderler%s için</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- Faturalarda, giderlerde, KDV inde ve maaşlarda yapılan ger RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- Müşterilerden alınan tüm geçerli fatura ödemelerini içerir. <br> - Faturaların ödeme tarihi temellidir <br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Üçüncü taraflara göre satış vergisi raporu VATReportByCustomers=Müşteriye göre satış vergisi raporu VATReportByCustomersInInputOutputMode=Müşteriye göre alınan ve ödenen KDV raporu VATReportByQuartersInInputOutputMode=Tahsil edilen ve ödenen verginin satış vergisi oranına göre rapor +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=RE Orana göre rapor @@ -217,7 +231,7 @@ Pcg_subtype=Pcg alt türü InvoiceLinesToDispatch=Gönderilecek fatura kalemleri ByProductsAndServices=Ürün ve hizmete göre RefExt=Dış ref -ToCreateAPredefinedInvoice=Bir fatura şablonu oluşturmak için, bir standart fatura oluşturun sonra onu doğrulamadan "%s" düğmesine tıklayın. +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Siparişe bağlantıla Mode1=Yöntem 1 Mode2=Yöntem 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi ACCOUNTING_ACCOUNT_SUPPLIER=Tedarikçi üçüncü partileri için kullanılan muhasebe hesabı 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=Sosyal/mali vergi kopyasının oluşturulmasını onayla +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Sonraki ay için kopyasını oluştur SimpleReport=Basit rapor AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Satış vergisi oranına göre TurnoverbyVatrate=Satış vergisi oranına göre faturalandırılan ciro TurnoverCollectedbyVatrate=Satış vergisi oranına göre toplanan ciro @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Toplanan satın alma cirosu RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- Tedarikçilere yapılan tüm geçerli fatura ödemelerini içerir. <br> - Faturaların ödeme tarihi temellidir <br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Faturalanan satın alma cirosu ReportPurchaseTurnoverCollected=Toplanan satın alma cirosu IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/tr_TR/ecm.lang b/htdocs/langs/tr_TR/ecm.lang index 8302879b82c..380ce8a5ab3 100644 --- a/htdocs/langs/tr_TR/ecm.lang +++ b/htdocs/langs/tr_TR/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Dosya henüz veritabanında dizine eklenmedi (tekrar ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/tr_TR/errors.lang b/htdocs/langs/tr_TR/errors.lang index 8cc4092af00..b2f7a452de6 100644 --- a/htdocs/langs/tr_TR/errors.lang +++ b/htdocs/langs/tr_TR/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=<b>%s</b> dizini bulunamadı (Hatalı yol, yanlış izinler ya ErrorFunctionNotAvailableInPHP=<b>%s</b> işlevi bu özellik için gereklidir ama bu özellik PHP nin bu sürümü/kurulumu için geçerli değildir. ErrorDirAlreadyExists=Bu isimli bir dizin zaten var. ErrorFileAlreadyExists=Bu isimde bir dosya zaten var. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=Dosya sunucu tarafından tamamen alınmadı. ErrorNoTmpDir=Geçici %s dizini yok. ErrorUploadBlockedByAddon=Dosya gönderme PHP/Apache eklentisi tarafından bloke edilmiş. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP'nizdeki upload_max_filesize (%s) parametresi, post_max_size (%s) PHP parametresinden daha yüksek. Bu tutarlı bir kurulum değil. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/tr_TR/externalsite.lang b/htdocs/langs/tr_TR/externalsite.lang index cfb361e8991..43f6d94f301 100644 --- a/htdocs/langs/tr_TR/externalsite.lang +++ b/htdocs/langs/tr_TR/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Dış web sitesine bağlantı ayarla -ExternalSiteURL=Dış Web Sitesi URL'si +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Dış Web Sitesi modülü doğru yapılandırılmamış. ExampleMyMenuEntry=Menü girişim diff --git a/htdocs/langs/tr_TR/main.lang b/htdocs/langs/tr_TR/main.lang index 5fa3692202b..d0e3f166a85 100644 --- a/htdocs/langs/tr_TR/main.lang +++ b/htdocs/langs/tr_TR/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Değiş. tarihi IPModification=Modification IP DateLastModification=Son değiştirilme tarihi DateValidation=Doğrulama tarihi +DateSigning=Signing date DateClosing=Kapanış tarihi DateDue=Vade tarihi DateValue=Satış tarihi @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Birim fiyat (KDV hariç) (para birimi) UnitPriceTTC=Birim fiyat PriceU=B.F. PriceUHT=Birim Fiyat -PriceUHTCurrency=Birim Fiyat (para birimi) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=B.F. (vergi dahil) Amount=Tutar AmountInvoice=Fatura tutarı @@ -389,6 +390,8 @@ AmountTotal=Toplam tutar AmountAverage=Ortalama tutar PriceQtyMinHT=En düşük miktar fiyatı (KDV hariç) PriceQtyMinHTCurrency=En düşük miktar fiyatı (KDV hariç) (para birimi) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Yüzde Total=Toplam SubTotal=Aratoplam @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Geçerli dil CurrentTheme=Geçerli tema CurrentMenuManager=Geçerli menü yöneticisi @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString='%s' dizisini kaldır SomeTranslationAreUncomplete=Sunulan dillerden bazıları sadece kısmen çevrilmiş olabilir veya çeviri hatalarına sahip olabilir. Lütfen <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> adresi üzerinden kayıt yaparak dilinizdeki çeviri hatalarını düzeltmeye yardımcı olun ve yazılımın gelişimine katkıda bulunun. -DirectDownloadLink=Direkt indirme linki (herkese açık/harici) -DirectDownloadInternalLink=Direkt indirme linki (giriş yapılmış olmalı ve izin gerekli) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=İndir DownloadDocument=Belgeyi indir ActualizeCurrency=Para birimini güncelle @@ -1013,6 +1018,7 @@ SearchIntoContacts=Kişiler SearchIntoMembers=Üyeler SearchIntoUsers=Kullanıcılar SearchIntoProductsOrServices=Ürünler ya da hizmetler +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projeler SearchIntoMO=Üretim Emirleri SearchIntoTasks=Görevler @@ -1049,12 +1055,13 @@ KeyboardShortcut=Klavye kısayolu AssignedTo=Görevlendirilen Deletedraft=Taslak sil ConfirmMassDraftDeletion=Toplu taslak silme onayı -FileSharedViaALink=Dosya bir bağlantı üzerinden paylaşıldı +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Önce bir üçüncü parti seçin... YouAreCurrentlyInSandboxMode=Şu anda %s "sandbox" modundasınız Inventory=Envanter AnalyticCode=Analitik kod TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Daha Fazla Bilgi Göster NoFilesUploadedYet=Lütfen önce bir döküman yükleyin SeePrivateNote=Özel nota bakın @@ -1074,7 +1081,7 @@ ContactDefault_commande=Siparişte peşin ContactDefault_contrat=Sözleşme ContactDefault_facture=Fatura ContactDefault_fichinter=Müdahale -ContactDefault_invoice_supplier=Supplier Invoice +ContactDefault_invoice_supplier=Tedarikçi Faturası ContactDefault_order_supplier=Purchase Order ContactDefault_project=Proje ContactDefault_project_task=Görev @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/tr_TR/margins.lang b/htdocs/langs/tr_TR/margins.lang index bca34654bb6..0202d087d2e 100644 --- a/htdocs/langs/tr_TR/margins.lang +++ b/htdocs/langs/tr_TR/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Kar oranı ayrıntıları ProductMargins=Ürün kar oranları CustomerMargins=Müşteri kar oranları SalesRepresentativeMargins=Satış temsilcisi kar oranları +ContactOfInvoice=Contact of invoice UserMargins=Kullanıcı kar oranları ProductService=Ürün veya Hizmet AllProducts=Bütün ürünler ve hizmetler ChooseProduct/Service=Ürün veya hizmet seç ForceBuyingPriceIfNull=Eğer tanımlanmamışsa alış/maliyet fiyatını satış fiyatına zorla -ForceBuyingPriceIfNullDetails=Eğer alış/maliyet fiyatı tanımlanmamışsa ve bu seçenek "AÇIK" ise satırda oran sıfır olacaktır (alış/maliyet fiyatı = satış fiyatı) aksi durumda ("KAPALI") ve oran önerilen varsayılana eşit olacaktır. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Genel indirimler için kar oranı yöntemi UseDiscountAsProduct=Ürün olarak UseDiscountAsService=Hizmet olarak @@ -36,7 +37,7 @@ CostPrice=Maliyet fiyatı UnitCharges=Birim masrafları Charges=Masraflar AgentContactType=Ticari temsilci ilgili tipi -AgentContactTypeDetails=Satış temsilcisine göre kar oranı raporu için kullanılacak kişi türünü (faturala bağlantılı) tanımla +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=Kar oran sayısal bir değer olmalı markRateShouldBeLesserThan100=Yayınlanmış kar oranı 100 den daha düşük olmalı ShowMarginInfos=Kar oranı bilgisi göster diff --git a/htdocs/langs/tr_TR/members.lang b/htdocs/langs/tr_TR/members.lang index ea575b74239..39f105a72eb 100644 --- a/htdocs/langs/tr_TR/members.lang +++ b/htdocs/langs/tr_TR/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Taslak üye listesi (doğrulanacak) MembersListValid=Geçerli üye listesi MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Sona ermiş üyelerin listesi MembersListQualified=Nitelikli üye listesi MenuMembersToValidate=Taslak üyeler MenuMembersValidated=Doğrulanmış üye +MenuMembersExcluded=Excluded members MenuMembersResiliated=Sona ermiş üyeler MembersWithSubscriptionToReceive=Abonelik alacal üyeler MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Abonelik süresi doldu MemberStatusActiveLateShort=Süresi doldu MemberStatusPaid=Abonelik güncel MemberStatusPaidShort=Güncel +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Sona ermiş üye MemberStatusResiliatedShort=Sonlandırılmış MembersStatusToValid=Taslak üyeler +MembersStatusExcluded=Excluded members MembersStatusResiliated=Sona ermiş üyeler MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Doğrulandı @@ -82,6 +87,8 @@ Physical=Fiziksel Moral=Ahlaki MorAndPhy=Moral and Physical Reenable=Yeniden etkinleştirilebilir +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Bir üyeyi sonlandır ConfirmResiliateMember=Bu üyeyi feshetmek istediğinizden emin misiniz? DeleteMember=Üye sil @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Üyelik doğrulama sürecinde abon DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Yeni abonelik kaydı sürecinde aboneye e-posta gönderimi için kullanılacak e-posta şablonu DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Abonelik süresi dolmak üzereyken e-posta hatırlatıcısı göndermek için kullanılacak e-posta şablonu DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Üyelik iptali sürecinde aboneye e-posta gönderimi için kullanılacak e-posta şablonu +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Otomatik e-postalar için gönderen e-posta adresi DescADHERENT_ETIQUETTE_TYPE=Etiket sayfası biçimi DescADHERENT_ETIQUETTE_TEXT=Üye adres sayfalarına yazılan metin @@ -162,6 +170,7 @@ DocForLabels=Adres çizelgeleri oluştur (Çıkış formatı için gerçek ayar SubscriptionPayment=Abonelik ödemesi LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=En son abonelik miktarı +LastMemberType=Last Member type MembersStatisticsByCountries=Ülkeye göre üye istatistikleri MembersStatisticsByState=Eyalete/ile göre üyelik istatistikleri MembersStatisticsByTown=İlçelere göre üyelik istatistikleri diff --git a/htdocs/langs/tr_TR/modulebuilder.lang b/htdocs/langs/tr_TR/modulebuilder.lang index c80a020642b..ae0d37ed1c7 100644 --- a/htdocs/langs/tr_TR/modulebuilder.lang +++ b/htdocs/langs/tr_TR/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Nesneden bazı belgeler oluşturmak istiyorum 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/tr_TR/orders.lang b/htdocs/langs/tr_TR/orders.lang index 36f8948a858..c257cf62b83 100644 --- a/htdocs/langs/tr_TR/orders.lang +++ b/htdocs/langs/tr_TR/orders.lang @@ -16,6 +16,8 @@ ToOrder=Sipariş yap MakeOrder=Sipariş yap SupplierOrder=Tedarikçi siparişi SuppliersOrders=Tedarikçi siparişleri +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Mevcut tedarikçi siparişleri CustomerOrder=Müşteri Siparişi CustomersOrders=Müşteri Siparişleri @@ -155,7 +157,7 @@ OrderCreated=Siparişleriniz oluşturulmuştur OrderFail=Siparişiniz oluşturulması sırasında hata oluştu CreateOrders=Sipariş oluştur ToBillSeveralOrderSelectCustomer=Birden çok siparişe fatura oluşturmak için, önce müşteriye tıkla, sonra "%s" seç -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=Fatura doğrulandığında siparişi otomatik olarak "Faturalandırıldı" olarak ayarlamak için İş Akışı modülünden seçenek etkinleştirilmez, bu nedenle fatura oluşturulduktan sonra siparişlerin durumunu manuel olarak "Faturalandırıldı" olarak ayarlamanız gerekir. IfValidateInvoiceIsNoOrderStayUnbilled=Fatura doğrulaması 'Hayır' ise sipariş, fatura doğrulanana kadar 'Faturalandırılmamış' durumuna geçer. CloseReceivedSupplierOrdersAutomatically=Bütün ürünler kabul edildiğinde sipariş durumunu otomatikman "%s" olarak kapat. SetShippingMode=Gönderim modunu ayarla diff --git a/htdocs/langs/tr_TR/other.lang b/htdocs/langs/tr_TR/other.lang index 66cfdd557cb..0fde88b5ca5 100644 --- a/htdocs/langs/tr_TR/other.lang +++ b/htdocs/langs/tr_TR/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Birden fazla faaliyet gösteren firma (tüm ana modüller) CreatedBy=Oluşturan %s ModifiedBy=Düzenleyen %s ValidatedBy=Doğrulayan %s +SignedBy=Signed by %s ClosedBy=%s tarafından kapatıldı CreatedById=Oluşturanın kullanıcı kimliği ModifiedById=Son değişikliği yapan kullanıcı kimliği @@ -244,6 +245,7 @@ NewKeyIs=Oturum açmak için yeni anahtarınız NewKeyWillBe=Yazılımda oturum açmak için yeni anahtarınız bu olacaktır ClickHereToGoTo=%s bölümüne gitmek için buraya tıklayın YouMustClickToChange=Ancak önce bu şifre değiştirmeyi doğrulamak için aşağıdaki linke tıklamanız gerekir +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Bu değiştirmeyi istemediyseniz, bu e-postayı unutun. Kimlik bilgilerinizi güvenli tutulur. IfAmountHigherThan=Eğer tutar <strong>%s</strong> den büyükse SourcesRepository=Kaynaklar için havuz diff --git a/htdocs/langs/tr_TR/productbatch.lang b/htdocs/langs/tr_TR/productbatch.lang index 42d53f44560..d64adff52ad 100644 --- a/htdocs/langs/tr_TR/productbatch.lang +++ b/htdocs/langs/tr_TR/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Parti/Seri numarası kullan -ProductStatusOnBatch=Evet (parti/seri gerekli) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Hayır (parti/seri kullanılmaz) -ProductStatusOnBatchShort=Evet +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Hayır Batch=Parti/Seri atleast1batchfield=Son Tüketme tarihi ya da Son Satma tarihi ya da Parti/Seri numarası @@ -16,9 +18,18 @@ printEatby=Son tüketim: %s printSellby=Son satış: %s printQty=Miktar: %d AddDispatchBatchLine=Dağıtımda bir Raf Ömrü satırı ekle -WhenProductBatchModuleOnOptionAreForced=Parti/Seri modülü açıkken otomatik stok azalması 'Gönderim doğrulamasında gerçek stokları azalt' şekline, otomatik artış modu ise 'Depolara manuel gönderimde gerçek stokları arttır' şekline zorlanır ve düzenlenemez. Diğer seçenekler istediğiniz gibi tanımlanabilir. +WhenProductBatchModuleOnOptionAreForced=Parti/Seri modülü açıkken otomatik stok azalması 'Gönderim doğrulamasında gerçek stokları azalt' şekline, otomatik artış modu ise 'Depolara manuel gönderimde gerçek stokları artır' şekline zorlanır ve düzenlenemez. Diğer seçenekler istediğiniz gibi tanımlanabilir. ProductDoesNotUseBatchSerial=Bu ürün parti/seri numarası kullanmıyor ProductLotSetup=Parti/seri modülü kurulumu ShowCurrentStockOfLot=Çift ürün/parti için mevcut stoğu göster ShowLogOfMovementIfLot=Çift ürün/parti için hareket günlüğünü göster StockDetailPerBatch=Parti başına stok detayı +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/tr_TR/products.lang b/htdocs/langs/tr_TR/products.lang index f06d6621115..66e8c6516fc 100644 --- a/htdocs/langs/tr_TR/products.lang +++ b/htdocs/langs/tr_TR/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=KDV oranı (bu tedarikçi/ürün için) DiscountQtyMin=Bu miktar için indirim NoPriceDefinedForThisSupplier=Bu tedarikçi/ürün için tanımlanmış fiyat/miktar mevcut değil NoSupplierPriceDefinedForThisProduct=Bu ürün için tanımlanmış tedarikçi fiyatı/miktarı mevcut değil +PredefinedItem=Predefined item PredefinedProductsToSell=Önceden Tanımlanmış Ürün PredefinedServicesToSell=Öntanımlı Hizmet PredefinedProductsAndServicesToSell=Öntanımlı satılan ürünler/hizmetler @@ -313,7 +314,7 @@ LastUpdated=Son güncelleme CorrectlyUpdated=Doru olarak güncellendi PropalMergePdfProductActualFile=PDF Azur'a eklenmek için kullanılacak dosya/lar PropalMergePdfProductChooseFile=PDF dosyası seç -IncludingProductWithTag=Etiketli ürün/hizmet içerir +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Varsayılan fiyat, gerçek fiyat müşteriye bağlı olabilir WarningSelectOneDocument=Lütfen enaz bir belge seçin DefaultUnitToShow=Birim diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index 24cb80a885a..40ada56b53b 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Görevler listesi GoToListOfTimeConsumed=Tüketilen süre listesine git GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=Proje ile ilgili müşteri siparişlerinin listesi ListInvoicesAssociatedProject=Proje ile ilgili müşteri faturalarının listesi @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/tr_TR/propal.lang b/htdocs/langs/tr_TR/propal.lang index 385fa505586..6da99a8822a 100644 --- a/htdocs/langs/tr_TR/propal.lang +++ b/htdocs/langs/tr_TR/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Teklifi e-posta ile gönder DatePropal=Teklif tarihi DateEndPropal=Teklif son geçerlilik tarihi ValidityDuration=Geçerlilik süresi -CloseAs=Durumu buna ayarlayın SetAcceptedRefused=Kabul edildi/reddedildi ayarla ErrorPropalNotFound=%s teklifi bulunamadı AddToDraftProposals=Taslak teklife ekle @@ -60,6 +59,7 @@ ConfirmClonePropal=<b>%s</b> teklifinin kopyasını oluşturmak istediğinizden ConfirmReOpenProp=<b>%s</b> teklifini tekrar açmak istediğinizden emin misiniz ? ProposalsAndProposalsLines=Teklif ve satırları ProposalLine=Teklif satırı +ProposalLines=Proposal lines AvailabilityPeriod=Teslim süresi SetAvailability=Teslim süresi ayarla AfterOrder=siparişten sonra @@ -85,3 +85,8 @@ ProposalCustomerSignature=Kesin sipariş için Firma Kaşesi, Tarih ve İmza ProposalsStatisticsSuppliers=Tedarikçi teklifi istatistikleri 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/tr_TR/stocks.lang b/htdocs/langs/tr_TR/stocks.lang index 07374a8b0f4..373096f7b99 100644 --- a/htdocs/langs/tr_TR/stocks.lang +++ b/htdocs/langs/tr_TR/stocks.lang @@ -19,8 +19,8 @@ Stock=Stok Stocks=Stoklar MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Partiye/ürüne göre stoklar LotSerial=Parti/Seri LotSerialList=Parti/seri listesi @@ -37,8 +37,8 @@ AllWarehouses=Tüm depolar IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Taslak siparişleri de dahil et Location=Konum -LocationSummary=Kısa konum adı -NumberOfDifferentProducts=Farklı ürün sayısı +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Toplam ürün sayısı LastMovement=En son hareket LastMovements=En son hareketler @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Depolar değeri UserWarehouseAutoCreate=Kullanıcı oluştururken otomatik olarak bir kullanıcı deposu oluştur AllowAddLimitStockByWarehouse=Her bir ürün için minimum ve istenen stok değerini yönetmenin yanı sıra her bir eşleştirme (ürün-depo) için de minimum ve istenen stok değerini de yönetin RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Varsayılan depo @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 fiyat -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Satış Birim Fiyatı EstimatedStockValueSellShort=Satış değeri EstimatedStockValueSell=Satış değeri @@ -145,7 +147,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=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". +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 on "%s". RecordMovement=Kayıt transferi ReceivingForSameOrder=Bu siparişten yapılan kabuller StockMovementRecorded=Stok hareketleri kaydedildi @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Faturaya ürün/hizmet eklemek için stok seviyesi y StockMustBeEnoughForOrder=Siparişe ürün/hizmet eklemek için stok seviyesi yeterli olmalıdır (siparişe bir satır eklerken otomatik stok değişimi için ayarlanmış olan kural ne olursa olsun mevcut gerçek stok üzerinde kontrol yapılır) StockMustBeEnoughForShipment= Sevkiyata ürün/hizmet eklemek için stok seviyesi yeterli olmalıdır (sevkiyata bir satır eklerken otomatik stok değişimi için ayarlanmış olan kural ne olursa olsun mevcut gerçek stok üzerinde kontrol yapılır) MovementLabel=Hareket etiketi -TypeMovement=Hareket türü +TypeMovement=Direction of movement DateMovement=Hareket tarihi InventoryCode=Hareket veya stok kodu IsInPackage=Pakette içerilir @@ -183,6 +185,7 @@ inventoryCreatePermission=Yeni envanter oluştur inventoryReadPermission=Envanterleri görüntüle inventoryWritePermission=Envanteri güncelle inventoryValidatePermission=Envanteri doğrula +inventoryDeletePermission=Delete inventory inventoryTitle=Envanter inventoryListTitle=Envanterler inventoryListEmpty=Devam eden envanter yok @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Dosyayı yükleyin ve daha sonra bu dosyayı kaynak içe aktarma dosyası olarak seçmek için %s simgesine tıklayın... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Yeniden aç +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/tr_TR/suppliers.lang b/htdocs/langs/tr_TR/suppliers.lang index 9b51c8028e4..5674056ac79 100644 --- a/htdocs/langs/tr_TR/suppliers.lang +++ b/htdocs/langs/tr_TR/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Tedarikçiler SuppliersInvoice=Tedarikçi faturası +SupplierInvoices=Tedarikçi faturaları ShowSupplierInvoice=Tedarikçi Faturası Göster NewSupplier=Yeni tedarikçi History=Geçmiş diff --git a/htdocs/langs/tr_TR/ticket.lang b/htdocs/langs/tr_TR/ticket.lang index 86bfb2ce139..3e9d1d27461 100644 --- a/htdocs/langs/tr_TR/ticket.lang +++ b/htdocs/langs/tr_TR/ticket.lang @@ -70,6 +70,8 @@ Deleted=Silindi # Dict Type=Türü Severity=Önem seviyesi +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Destek bildirim mesajından e-posta göndermek için @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Genel arayüzde modülün logosunu görüntüle TicketsShowModuleLogoHelp=Genel arayüz sayfalarında logo modülünü gizlemek için bu seçeneği etkinleştirin TicketsShowCompanyLogo=Genel arayüzde firmanın logosunu göster TicketsShowCompanyLogoHelp=Genel arayüz sayfalarında ana firmanın logosunu gizlemek için bu seçeneği etkinleştirin -TicketsEmailAlsoSendToMainAddress=Ayrıca ana e-posta adresine de bildirim gönder -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Genel arayüzü etkinleştir @@ -126,10 +128,10 @@ TicketNumberingModules=Destek bildirimi numaralandırma modülü TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Oluşturunca üçüncü tarafa bildir 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=En son değiştirilen destek bildirimleri BoxLastModifiedTicketDescription=Değiştirilen son %s destek bildirimi BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Yakın zamanda değiştirilmiş destek bildirimi yok +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/tr_TR/users.lang b/htdocs/langs/tr_TR/users.lang index 84b68bfc470..36b671a893b 100644 --- a/htdocs/langs/tr_TR/users.lang +++ b/htdocs/langs/tr_TR/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Gruptan kaldır PasswordChangedAndSentTo=Parola değiştirildi ve <b>%s</b> e gönderildi. PasswordChangeRequest=<b>%s</b> için şifre değiştirme isteği PasswordChangeRequestSent=Parola değiştirildi ve <b>%s</b> e gönderildi. +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=Şifre sıfırlamayı onayla MenuUsersAndGroups=Kullanıcılar ve Gruplar LastGroupsCreated=Oluşturulan son %s grup @@ -70,9 +72,10 @@ ExportDataset_user_1=Kullanıcılar ve özellikleri DomainUser=Etki alanı kullanıcısı %s Reactivate=Yeniden etkinleştir CreateInternalUserDesc=Bu form, firmanız/kuruluşunuz içinde bir iç kullanıcı oluşturmanıza olanak tanır. Bir dış kullanıcı oluşturmak için (müşteri, tedarikçi, vb ...), üçüncü parti kişi kartından 'Dolibarr Kullanıcısı Oluştur' butonunu kullanın. -InternalExternalDesc=Bir <b>İç</b> kullanıcı, firmanızın/kuruluşunuzun parçası olan bir kullanıcıdır.<br>Bir <b>Dış</b> kullanıcı ise, müşteri, tedarikçi veya diğer (Bir üçüncü parti için dış kullanıcı oluşturmak isteniyorsa, oluşturulmak istenen kişinin sayfasında "Bir kullanıcı oluştur" butonu kullanılabilir) bir kullanıcıdır.<br><br>Her iki durumda da, verilen izinler Dolibarr üzerindeki hakları tanımlar. Bunun yanı sıra dış kullanıcı, iç kullanıcıdan farklı bir menü yöneticisine sahip olabilir (Giriş - Ayarlar - Ekran bölümüne bakın). +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=İzin hak tanındı çünkü bir kullanıcının grubundan intikal etti. Inherited=İntikal eden +UserWillBe=Created user will be UserWillBeInternalUser=Oluşturulacak kullanıcı bir iç kullanıcı olacaktır (çünkü belirli bir üçüncü parti ile bağlantılı değildir) UserWillBeExternalUser=Oluşturulacak kullanıcı bir dış kullanıcı olacaktır (çünkü belirli bir üçüncü parti ile bağlantılıdır) IdPhoneCaller=Telefon açanın kimliği @@ -109,8 +112,10 @@ UserAccountancyCode=Kullanıcı muhasebe kodu UserLogoff=Kullanıcı çıkış yaptı UserLogged=Kullanıcı giriş yaptı DateOfEmployment=Employment date -DateEmployment=İşe Başlama Tarihi +DateEmployment=Employment +DateEmploymentstart=İşe Başlama Tarihi DateEmploymentEnd=İşi Bırakma Tarihi +RangeOfLoginValidity=Date range of login validity CantDisableYourself=Kendi kullanıcı kaydınızı devre dışı bırakamazsınız ForceUserExpenseValidator=Gider raporu doğrulayıcısını zorla ForceUserHolidayValidator=İzin isteği doğrulayıcısını zorla diff --git a/htdocs/langs/tr_TR/website.lang b/htdocs/langs/tr_TR/website.lang index 38b93f9cc3a..e779f477ce1 100644 --- a/htdocs/langs/tr_TR/website.lang +++ b/htdocs/langs/tr_TR/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>PHP gömülü sunucu ile kullanın</u><br>Geliştirme ortamında, siteyi PHP gömülü web sunucusu ile test etmeyi tercih edebilirsiniz (PHP 5.5 gerekli)<br><strong>php -S 0.0.0.0:8080 -t%s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Okundu WritePerm=Yaz TestDeployOnWeb=Web'de dene/yayınla PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=Harici web sunucusu tarafından sunulan sanal host URL'si tanımlanmamış NoPageYet=Henüz hiç sayfa yok YouCanCreatePageOrImportTemplate=Yeni bir sayfa oluşturabilir veya tam bir web sitesi şablonunu içe aktarabilirsiniz @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/tr_TR/zapier.lang b/htdocs/langs/tr_TR/zapier.lang index 75c635e864a..f2faffc5728 100644 --- a/htdocs/langs/tr_TR/zapier.lang +++ b/htdocs/langs/tr_TR/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Dolibarr için Zapier -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Dolibarr modülü için Zapier - -# -# Admin page -# -ZapierForDolibarrSetup = Dolibarr için Zapier ayarları +ZapierForDolibarrSetup=Dolibarr için Zapier ayarları ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/uk_UA/accountancy.lang b/htdocs/langs/uk_UA/accountancy.lang index 467fc0b218c..fb5f2043d8e 100644 --- a/htdocs/langs/uk_UA/accountancy.lang +++ b/htdocs/langs/uk_UA/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index 4fa18be466d..bd5556dd25b 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Зняти блокування з'єднання YourSession=Ваш сеанс Sessions=Сеанси користувачів WebUserGroup=Користувач / група веб-сервера +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Здається, що ваша конфігурація PHP не дозволяє перелічити активні сеанси. Каталог, який використовується для збереження сеансів (<b> %s </b>), може бути захищений (наприклад, дозволами ОС або директивою PHP open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Примітка: так діє, лише якщо модуль RemoveLock=Видаліть або перейменуйте файл <b> %s </b>, якщо він існує, щоб дозволити використання інструменту "Оновити / Встановити". RestoreLock=Відновіть файл <b> %s </b>, лише з дозволом для читання, щоб відключити подальше використання інструменту "Оновити / Встановити". SecuritySetup=Налаштування безпеки +PHPSetup=PHP setup SecurityFilesDesc=Встановлені тут параметри пов’язані з безпекою щодо завантаження файлів. ErrorModuleRequirePHPVersion=Помилка, для цього модуля потрібна версія PHP %s або вище ErrorModuleRequireDolibarrVersion=Помилка, для цього модуля потрібна версія Dolibarr %s або вище @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Ця область забезпечує функції ад Purge=Чистка PurgeAreaDesc=Ця сторінка дозволяє видалити всі файли, що були створені або зберігаються Dolibarr (тимчасові файли або всі файли в каталозі <b> %s </b>). Використовувати цю функцію зазвичай не потрібно. Вона надається як рішення для користувачів, у яких Dolibarr розміщений у провайдера, що не надає дозволу на видалення файлів, створених веб-сервером. PurgeDeleteLogFile=Видалення файлів журналів, включаючи <b> %s </b>, визначених для модуля Syslog (немає ризику втрати даних) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Видалить усі файли в каталозі: <b> %s </b>. <br> Це видалить усі згенеровані документи, пов'язані з елементами (контрагенти, рахунки тощо), файли, завантажені в модуль ECM, резервні копії бази даних та тимчасові файли. PurgeRunNow=Очистити зараз @@ -232,6 +234,7 @@ BoxesAvailable=Доступні віджети BoxesActivated=Активні віджети ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Вихідний файл AvailableOnlyIfJavascriptAndAjaxNotDisabled=Доступно лише якщо JavaScript не відключений Required=обов'язково @@ -347,9 +350,10 @@ LastActivationAuthor=Автор останньої активації LastActivationIP=IP останньої активації UpdateServerOffline=Оновити сервер офлайн WithCounter=Управління лічильником -GenericMaskCodes=Ви можете ввести будь-яку маску нумерації. У цій масці можуть бути використані такі теги: <br> <b> {000000} </b> відповідає числу, яке буде збільшуватися для кожного %s. Введіть стільки нулів, скільки потрібно для бажаної довжини лічильника. Лічильник буде заповнений нулями зліва, щоб мати стільки нулів, як і маска. <br> <b> {000000+000} </b> аналогічно попередньому, але зміщення, відповідає номеру праворуч від знака +, застосовується починаючи з першого %s. <br> <b> {000000@x} </b> такий же, як і попередній, але лічильник скидається до нуля, коли досягається місяць x (x між 1 та 12, або 0, щоб використовувати перші місяці фінансового року, визначені у вашій конфігурації, або 99 для скидання в нуль щомісяця). Якщо цей параметр використовується і x дорівнює 2 або вище, також потрібно послідовність {yy} {mm} або {yyyy} {mm}. <br> <b> {dd} </b> день (від 01 до 31). <br> <b> {mm} </b> місяць (від 01 до 12). <br> <b> {yy} </b>, <b> {yyyy} </b> або <b> {y} </b>рік 1, 2 або 4 цифри<br> -GenericMaskCodes2= <b> {cccc} </b> код клієнта на n символів <br> <b> {cccc000}</b>код клієнта на n символів, супроводжується лічильником, призначеним для замовника. Цей лічильник, призначений клієнту, скидається одночасно, з глобальним лічильником. <br> <b> {tttt} </b> Код типу контрагента на n символів (див. меню Домашня сторінка - Налаштування - Словник - Типи контрагентів). Якщо ви додасте цей тег, лічильник буде різним для кожного типу контрагента. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=Усі інші символи в масці залишаться незмінними. <br> Пробіли не допускаються. <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a= <u> Приклад 99-го %s контрагента TheCompany, з датою 2007-01-31: </u> <br> GenericMaskCodes4b=<u>Зразок контрагента, створеного 2007-03-01:</u><br> GenericMaskCodes4c=<u>Зразок товару, створеного 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Залишивши це поле порожнім, ExtrafieldParamHelpselect=Список значень складається з рядків вигляду ключ,значення (де ключ не повинен бути '0') <br><br>Наприклад: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br> У випадку, коли потрібно щоб список залежав від значень іншого додаткового списку:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>У випадку, якщо потрібно мати список залежний від іншого: <br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0") <br> <br>, наприклад: <br> 1,значення1 <br> 2,значення2 <br> 3,значення3 <br> ... ExtrafieldParamHelpradio=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0") <br> <br>, наприклад: <br> 1,значення1 <br> 2,значення2 <br> 3,значення3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Соціальні мережі +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/uk_UA/banks.lang b/htdocs/langs/uk_UA/banks.lang index 5e37c104927..05707f6bc28 100644 --- a/htdocs/langs/uk_UA/banks.lang +++ b/htdocs/langs/uk_UA/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/uk_UA/bills.lang b/htdocs/langs/uk_UA/bills.lang index 2a360131fe2..65df9d227a1 100644 --- a/htdocs/langs/uk_UA/bills.lang +++ b/htdocs/langs/uk_UA/bills.lang @@ -52,11 +52,12 @@ Invoices=Рахунки-фактури InvoiceLine=Рядок рахунку-фактури InvoiceCustomer=Рахунок клієнта CustomerInvoice=Рахунок клієнта -CustomersInvoices=Рахунки-фактури покупців +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=рахунки-фактури постачальників +SupplierBills=Vendor invoices Payment=Платіж PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Платежі вже зроблені PaymentsBackAlreadyDone=Refunds already done PaymentRule=Правила оплати PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ Cash=Готівка Reported=Затриман DisabledBecausePayments=Not possible since there are some payments CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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=Повернення платежу @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/uk_UA/boxes.lang b/htdocs/langs/uk_UA/boxes.lang index 1dd858b093f..3aa0b1dcb95 100644 --- a/htdocs/langs/uk_UA/boxes.lang +++ b/htdocs/langs/uk_UA/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/uk_UA/categories.lang b/htdocs/langs/uk_UA/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/uk_UA/categories.lang +++ b/htdocs/langs/uk_UA/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/uk_UA/companies.lang b/htdocs/langs/uk_UA/companies.lang index e788c649905..ebe9d66cafa 100644 --- a/htdocs/langs/uk_UA/companies.lang +++ b/htdocs/langs/uk_UA/companies.lang @@ -43,9 +43,10 @@ Individual=Фізична особа ToCreateContactWithSameName=Автоматично створить контакт / адресу з тією ж інформацією, що і в контрагента. У більшості випадків, якщо ваш контрагент є фізичною особою, достатньо створити контрагента. ParentCompany=Батьківська компанія Subsidiaries=Дочірні компанії -ReportByMonth=Звіт за місяць -ReportByCustomers=Звіт за покупцем -ReportByQuarter=Звіт за частотою +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Прізвище @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/uk_UA/compta.lang b/htdocs/langs/uk_UA/compta.lang index 717985b9ddc..5b193a6084a 100644 --- a/htdocs/langs/uk_UA/compta.lang +++ b/htdocs/langs/uk_UA/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/uk_UA/ecm.lang b/htdocs/langs/uk_UA/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/uk_UA/ecm.lang +++ b/htdocs/langs/uk_UA/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/uk_UA/errors.lang b/htdocs/langs/uk_UA/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/uk_UA/errors.lang +++ b/htdocs/langs/uk_UA/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/uk_UA/externalsite.lang b/htdocs/langs/uk_UA/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/uk_UA/externalsite.lang +++ b/htdocs/langs/uk_UA/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/uk_UA/main.lang b/htdocs/langs/uk_UA/main.lang index e1d4ca6a387..169682a2c9f 100644 --- a/htdocs/langs/uk_UA/main.lang +++ b/htdocs/langs/uk_UA/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Сума AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Призначено Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/uk_UA/margins.lang b/htdocs/langs/uk_UA/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/uk_UA/margins.lang +++ b/htdocs/langs/uk_UA/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/uk_UA/members.lang b/htdocs/langs/uk_UA/members.lang index 6d44b9fdbea..93aff32cf53 100644 --- a/htdocs/langs/uk_UA/members.lang +++ b/htdocs/langs/uk_UA/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Підтверджений @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/uk_UA/modulebuilder.lang b/htdocs/langs/uk_UA/modulebuilder.lang index 7a72508aa33..1c7e0bbb9bf 100644 --- a/htdocs/langs/uk_UA/modulebuilder.lang +++ b/htdocs/langs/uk_UA/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/uk_UA/orders.lang b/htdocs/langs/uk_UA/orders.lang index a784e083458..af2ffe84443 100644 --- a/htdocs/langs/uk_UA/orders.lang +++ b/htdocs/langs/uk_UA/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/uk_UA/other.lang b/htdocs/langs/uk_UA/other.lang index 6f41e992ef6..b6ca500c280 100644 --- a/htdocs/langs/uk_UA/other.lang +++ b/htdocs/langs/uk_UA/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/uk_UA/productbatch.lang b/htdocs/langs/uk_UA/productbatch.lang index 560bc529c16..15aefb27d54 100644 --- a/htdocs/langs/uk_UA/productbatch.lang +++ b/htdocs/langs/uk_UA/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Так +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Ні Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/uk_UA/products.lang b/htdocs/langs/uk_UA/products.lang index 80d7861289c..095e1fbc0c9 100644 --- a/htdocs/langs/uk_UA/products.lang +++ b/htdocs/langs/uk_UA/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index 0ff4be4d522..5fcfeff9270 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/uk_UA/propal.lang b/htdocs/langs/uk_UA/propal.lang index b9a317ec127..9444a850bd4 100644 --- a/htdocs/langs/uk_UA/propal.lang +++ b/htdocs/langs/uk_UA/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/uk_UA/stocks.lang b/htdocs/langs/uk_UA/stocks.lang index e032197748f..e37edb28c2a 100644 --- a/htdocs/langs/uk_UA/stocks.lang +++ b/htdocs/langs/uk_UA/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Розташування -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/uk_UA/suppliers.lang b/htdocs/langs/uk_UA/suppliers.lang index e3b0758e6c3..70361194561 100644 --- a/htdocs/langs/uk_UA/suppliers.lang +++ b/htdocs/langs/uk_UA/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Постачальники SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/uk_UA/ticket.lang b/htdocs/langs/uk_UA/ticket.lang index aa2c156c056..920703320ae 100644 --- a/htdocs/langs/uk_UA/ticket.lang +++ b/htdocs/langs/uk_UA/ticket.lang @@ -70,6 +70,8 @@ Deleted=Видалено # Dict Type=Тип Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/uk_UA/users.lang b/htdocs/langs/uk_UA/users.lang index c2cd4a91aa4..c72450499b7 100644 --- a/htdocs/langs/uk_UA/users.lang +++ b/htdocs/langs/uk_UA/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/uk_UA/website.lang b/htdocs/langs/uk_UA/website.lang index 447d9de9a65..d63041a9380 100644 --- a/htdocs/langs/uk_UA/website.lang +++ b/htdocs/langs/uk_UA/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Читати WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/uk_UA/zapier.lang b/htdocs/langs/uk_UA/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/uk_UA/zapier.lang +++ b/htdocs/langs/uk_UA/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/uz_UZ/accountancy.lang b/htdocs/langs/uz_UZ/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/uz_UZ/accountancy.lang +++ b/htdocs/langs/uz_UZ/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/uz_UZ/banks.lang b/htdocs/langs/uz_UZ/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/uz_UZ/banks.lang +++ b/htdocs/langs/uz_UZ/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/uz_UZ/bills.lang b/htdocs/langs/uz_UZ/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/uz_UZ/bills.lang +++ b/htdocs/langs/uz_UZ/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/uz_UZ/boxes.lang b/htdocs/langs/uz_UZ/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/uz_UZ/boxes.lang +++ b/htdocs/langs/uz_UZ/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/uz_UZ/categories.lang b/htdocs/langs/uz_UZ/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/uz_UZ/categories.lang +++ b/htdocs/langs/uz_UZ/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/uz_UZ/companies.lang b/htdocs/langs/uz_UZ/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/uz_UZ/companies.lang +++ b/htdocs/langs/uz_UZ/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/uz_UZ/compta.lang b/htdocs/langs/uz_UZ/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/uz_UZ/compta.lang +++ b/htdocs/langs/uz_UZ/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/uz_UZ/ecm.lang b/htdocs/langs/uz_UZ/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/uz_UZ/ecm.lang +++ b/htdocs/langs/uz_UZ/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/uz_UZ/errors.lang b/htdocs/langs/uz_UZ/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/uz_UZ/errors.lang +++ b/htdocs/langs/uz_UZ/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/uz_UZ/externalsite.lang b/htdocs/langs/uz_UZ/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/uz_UZ/externalsite.lang +++ b/htdocs/langs/uz_UZ/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/uz_UZ/main.lang b/htdocs/langs/uz_UZ/main.lang index 1744926874f..642fa95de04 100644 --- a/htdocs/langs/uz_UZ/main.lang +++ b/htdocs/langs/uz_UZ/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/uz_UZ/margins.lang b/htdocs/langs/uz_UZ/margins.lang index b9d52dcfdc6..ad5406409b4 100644 --- a/htdocs/langs/uz_UZ/margins.lang +++ b/htdocs/langs/uz_UZ/margins.lang @@ -16,12 +16,13 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +ContactOfInvoice=Contact of invoice UserMargins=User margins ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service @@ -31,14 +32,14 @@ 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<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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 sale representative +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 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). +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). diff --git a/htdocs/langs/uz_UZ/members.lang b/htdocs/langs/uz_UZ/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/uz_UZ/members.lang +++ b/htdocs/langs/uz_UZ/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/uz_UZ/modulebuilder.lang b/htdocs/langs/uz_UZ/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/uz_UZ/modulebuilder.lang +++ b/htdocs/langs/uz_UZ/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/uz_UZ/orders.lang b/htdocs/langs/uz_UZ/orders.lang index 503955cf5f0..87d196eb22f 100644 --- a/htdocs/langs/uz_UZ/orders.lang +++ b/htdocs/langs/uz_UZ/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Phone # 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/uz_UZ/other.lang b/htdocs/langs/uz_UZ/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/uz_UZ/other.lang +++ b/htdocs/langs/uz_UZ/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/uz_UZ/productbatch.lang b/htdocs/langs/uz_UZ/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/uz_UZ/productbatch.lang +++ b/htdocs/langs/uz_UZ/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/uz_UZ/products.lang b/htdocs/langs/uz_UZ/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/uz_UZ/products.lang +++ b/htdocs/langs/uz_UZ/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/uz_UZ/propal.lang b/htdocs/langs/uz_UZ/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/uz_UZ/propal.lang +++ b/htdocs/langs/uz_UZ/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/uz_UZ/stocks.lang b/htdocs/langs/uz_UZ/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/uz_UZ/stocks.lang +++ b/htdocs/langs/uz_UZ/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/uz_UZ/suppliers.lang b/htdocs/langs/uz_UZ/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/uz_UZ/suppliers.lang +++ b/htdocs/langs/uz_UZ/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/uz_UZ/ticket.lang b/htdocs/langs/uz_UZ/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/uz_UZ/ticket.lang +++ b/htdocs/langs/uz_UZ/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/uz_UZ/users.lang b/htdocs/langs/uz_UZ/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/uz_UZ/users.lang +++ b/htdocs/langs/uz_UZ/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/uz_UZ/website.lang b/htdocs/langs/uz_UZ/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/uz_UZ/website.lang +++ b/htdocs/langs/uz_UZ/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/uz_UZ/zapier.lang b/htdocs/langs/uz_UZ/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/uz_UZ/zapier.lang +++ b/htdocs/langs/uz_UZ/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/vi_VN/accountancy.lang b/htdocs/langs/vi_VN/accountancy.lang index 24ec964a46d..78ba39b6a06 100644 --- a/htdocs/langs/vi_VN/accountancy.lang +++ b/htdocs/langs/vi_VN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Giới hạn dòng hóa đơn ExpenseReportLines=Dòng báo cáo chi phí để ràng buộc ExpenseReportLinesDone=Giới hạn dòng của báo cáo chi phí IntoAccount=Ràng buộc dòng với tài khoản kế toán -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Ràng buộc @@ -209,7 +209,7 @@ Codejournal=Nhật ký JournalLabel=Mã nhật ký NumPiece=Số lượng cái TransactionNumShort=Số Giao dịch -AccountingCategory=Nhóm cá nhân hóa +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Bạn có thể định nghĩa ở đây một số nhóm tài khoản kế toán. Chúng sẽ được sử dụng cho các báo cáo kế toán đã cá nhân hóa. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Các dòng chưa bị ràng buộc, sử dụng menu ## Import ImportAccountingEntries=Ghi sổ kế toán +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=Ngày xuất WarningReportNotReliable=Cảnh báo, báo cáo này không dựa trên Sổ Cái, do đó không chứa giao dịch được sửa đổi thủ công trong Sổ Cái. Nếu nhật ký của bạn được cập nhật, chế độ xem sổ sách chính xác hơn. ExpenseReportJournal=Nhật ký báo cáo chi phí InventoryJournal=Nhật ký tồn kho + +NAccounts=%s accounts diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index 3daf83f7d2b..8ff7409cfac 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Bỏ việc khóa kết nôi YourSession=Phiên làm việc của bạn Sessions=Phiên người dùng WebUserGroup=Người dùng/nhóm trên máy chủ +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Cấu hình PHP của bạn dường như không cho phép liệt kê các phiên hoạt động. Thư mục được sử dụng để lưu phiên ( <b>%s</b> ) có thể được bảo vệ (ví dụ: bằng quyền của hệ điều hành hoặc bằng lệnh open_basingir của PHP). @@ -62,6 +63,7 @@ IfModuleEnabled=Ghi chú: Yes chỉ có tác dụng nếu module <b>%s</b> đư RemoveLock=Xóa / đổi tên tệp <b>%s</b> nếu nó tồn tại, để cho phép sử dụng công cụ Cập nhật / Cài đặt. RestoreLock=Khôi phục tệp <b>%s</b> , chỉ với quyền đọc, để vô hiệu hóa bất kỳ việc sử dụng thêm công cụ Cập nhật / Cài đặt nào. SecuritySetup=Thiết lập an ninh +PHPSetup=PHP setup SecurityFilesDesc=Xác định các tùy chọn ở đây liên quan đến bảo mật về việc tải lên các tệp. ErrorModuleRequirePHPVersion=Lỗi, module này yêu cầu phiên bản PHP %s hoặc mới hơn ErrorModuleRequireDolibarrVersion=Lỗi, module này yêu cầu Dolibarr phiên bản %s hoặc mới hơn @@ -154,7 +156,7 @@ SystemToolsAreaDesc=Khu vực này cung cấp các chức năng quản trị. S Purge=Thanh lọc PurgeAreaDesc=Trang này cho phép bạn xóa tất cả các tệp được tạo hoặc lưu trữ bởi Dolibarr (các tệp tạm thời hoặc tất cả các tệp trong thư mục <b>%s</b> ). Sử dụng tính năng này thường không cần thiết. Nó được cung cấp như một cách giải quyết cho người dùng có Dolibarr được lưu trữ bởi nhà cung cấp không cung cấp quyền xóa các tệp được tạo bởi máy chủ web. PurgeDeleteLogFile=Xóa tập tin nhật ký <b>%s</b> được tạo bởi mô-đun Syslog (không gây nguy hiểm mất dữ liệu) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Xóa tất cả các tệp trong thư mục: <b>%s</b> . <br> Việc này sẽ xóa tất cả các tài liệu được tạo liên quan đến các yếu tố (bên thứ ba, hóa đơn, v.v.), các tệp được tải lên mô-đun ECM, các bản sao lưu cơ sở dữ liệu và các tệp tạm thời. PurgeRunNow=Thanh lọc bây giờ @@ -232,6 +234,7 @@ BoxesAvailable=Widgets có sẵn BoxesActivated=Widgets được kích hoạt ActivateOn=Kích hoạt trên ActiveOn=Đã kích hoạt trên +ActivatableOn=Activatable on SourceFile=Tập tin nguồn AvailableOnlyIfJavascriptAndAjaxNotDisabled=Chỉ có sẵn nếu JavaScript không bị vô hiệu hóa Required=Được yêu cầu @@ -347,9 +350,10 @@ LastActivationAuthor=Tác giả kích hoạt mới nhất LastActivationIP=IP kích hoạt mới nhất UpdateServerOffline=Cập nhật server offline WithCounter=Quản lý bộ đếm -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> mã máy khách trên n ký tự <br> <b>{cccc000}</b> mã máy khách trên n ký tự được theo sau bởi một bộ đếm dành riêng cho khách hàng. Bộ đếm này dành riêng cho khách hàng được đặt lại cùng lúc so với bộ đếm toàn cầu. <br> <b>{tttt}</b> Mã của loại bên thứ ba trên n ký tự (xem menu Trang chủ - Cài đặt - Từ điển - Các loại bên thứ ba). Nếu bạn thêm thẻ này, bộ đếm sẽ khác nhau đối với từng loại bên thứ ba. <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Ví dụ về %s thứ 99 của bên thứ ba TheCompany, với ngày 2007-01-31:</u> <br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=Để trống trường này có nghĩa là giá tr ExtrafieldParamHelpselect=Danh sách các giá trị phải là các dòng có khóa định dạng, giá trị (trong đó khóa không thể là '0') <br><br> ví dụ: <br> 1, giá trị1 <br> 2, giá trị2 <br> mã3, giá trị3 <br> ... <br><br> Để có danh sách tùy thuộc vào danh sách thuộc tính bổ sung khác: <br> 1, value1 | <i>tùy chọn_ Parent_list_code</i> : Parent_key <br> 2, value2 | <i>tùy chọn_ Parent_list_code</i> : Parent_key <br><br> Để có danh sách tùy thuộc vào danh sách khác: <br> 1, giá trị1 | <i>Parent_list_code</i> : Parent_key <br> 2, giá trị2 | <i>Parent_list_code</i> : Parent_key ExtrafieldParamHelpcheckbox=Danh sách các giá trị phải là các dòng có khóa định dạng, giá trị (trong đó khóa không thể là '0') <br><br> ví dụ: <br> 1, giá trị1 <br> 2, giá trị2 <br> 3, giá trị3 <br> ... ExtrafieldParamHelpradio=Danh sách các giá trị phải là các dòng có khóa định dạng, giá trị (trong đó khóa không thể là '0') <br><br> ví dụ: <br> 1, giá trị1 <br> 2, giá trị2 <br> 3, giá trị3 <br> ... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=Danh sách các giá trị đến từ một bảng <br> Cú pháp: tên_bảng: nhãn_field: id_field :: bộ lọc <br> Ví dụ: c_typent: libelle: id :: filter <br><br> bộ lọc có thể là một thử nghiệm đơn giản (ví dụ: active = 1) để chỉ hiển thị giá trị hoạt động <br> Bạn cũng có thể sử dụng $ID$ trong bộ lọc phù thủy là id hiện tại của đối tượng hiện tại <br> Để thực hiện SELECT trong bộ lọc, hãy sử dụng $SEL$ <br> nếu bạn muốn lọc trên các trường ngoài, hãy sử dụng cú pháp Extra.fieldcode = ... (trong đó mã trường là mã của trường ngoài) <br><br> Để có danh sách tùy thuộc vào danh sách thuộc tính bổ sung khác: <br> c_typent: libelle: id: <i>Options_ Parent_list_code</i> | Parent_column: bộ lọc <br><br> Để có danh sách tùy thuộc vào danh sách khác: <br> c_typent: libelle: id: <i>Parent_list_code</i> | Parent_column: bộ lọc +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Giữ trống cho một dấu phân cách đơn giản <br> Đặt giá trị này thành 1 cho dấu phân cách thu gọn (mặc định mở cho phiên mới, sau đó trạng thái được giữ cho mỗi phiên người dùng) <br> Đặt giá trị này thành 2 cho dấu phân cách thu gọn (mặc định được thu gọn cho phiên mới, sau đó trạng thái được giữ trước mỗi phiên người dùng) LibraryToBuildPDF=Thư viện được sử dụng để tạo PDF @@ -541,6 +545,8 @@ Module40Name=Nhà cung cấp Module40Desc=Quản lý nhà cung cấp và mua hàng (Đơn mua và hóa đơn mua hàng) Module42Name=Nhật ký gỡ lỗi Module42Desc=Phương tiện ghi nhật ký (tệp, syslog, ...). Nhật ký như vậy là cho mục đích kỹ thuật / gỡ lỗi. +Module43Name=Thanh gỡ lỗi +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Biên tập Module49Desc=Quản lý biên tập Module50Name=Sản phẩm @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Lưu trữ không thể thay đổi Module3200Desc=Cho phép một bản ghi không thể thay đổi của các sự kiện kinh doanh. Các sự kiện được lưu trữ trong thời gian thực. Nhật ký là một bảng chỉ đọc các sự kiện được xâu chuỗi có thể được xuất dữ liệu. Mô-đun này có thể là bắt buộc đối với một số quốc gia. +Module3400Name=Mạng xã hội +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=Nhân sự Module4000Desc=Quản lý nhân sự (quản lý bộ phận, hợp đồng nhân viên và cảm xúc) Module5000Name=Đa công ty Module5000Desc=Cho phép bạn quản lý đa công ty -Module6000Name=Quy trình làm việc -Module6000Desc=Quản lý quy trình làm việc (tự động tạo đối tượng và / hoặc thay đổi trạng thái tự động) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Trang web Module10000Desc=Tạo trang web (công khai) với trình soạn thảo WYSIWYG. Đây là một quản trị viên web hoặc nhà phát triển hướng CMS (tốt hơn là nên biết ngôn ngữ HTML và CSS). Chỉ cần thiết lập máy chủ web của bạn (Apache, Nginx, ...) để trỏ đến thư mục Dolibarr dành riêng để truy cập trực tuyến trên internet với tên miền của riêng bạn. Module20000Name=Quản lý yêu cầu nghỉ @@ -805,7 +813,8 @@ PermissionAdvanced253=Tạo/chỉnh sửa người sử dụng nội bộ / bên Permission254=Tạo/chỉnh sửa chỉ người dùng bên ngoài Permission255=Chỉnh sửa mật khẩu của người dùng khác Permission256=Xóa hoặc vô hiệu người dùng khác -Permission262=Mở rộng quyền truy cập cho tất cả các bên thứ ba (không chỉ các bên thứ ba mà người dùng đó là đại diện bán hàng). <br> Không hiệu quả đối với người dùng bên ngoài (luôn giới hạn bản thân cho các đề xuất, đơn đặt hàng, hóa đơn, hợp đồng, v.v.). <br> Không hiệu quả đối với các dự án (chỉ các quy tắc về quyền của dự án, khả năng hiển thị và phân công). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Xem CA Permission272=Xem hóa đơn Permission273=Xuất hóa đơn @@ -1175,7 +1184,8 @@ SetupDescription2=Hai phần sau đây là bắt buộc (hai mục đầu tiên SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a> <br> Phần mềm này là một bộ gồm nhiều mô-đun/ứng dụng, tất cả đều ít nhiều độc lập nhau. Các mô-đun liên quan đến nhu cầu của bạn phải được kích hoạt và cấu hình. Các mục/tùy chọn sẽ được thêm vào menu với sự kích hoạt của một mô-đun. SetupDescription5=Các menu thiết lập khác quản lý các tham số tùy chọn. -LogEvents=Sự kiện kiểm toán bảo mật +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Kiểm toán InfoDolibarr=Thông tin về Dolibarr InfoBrowser=Thông tin trình duyệt @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Quá trình chạy nâng cấp dường như l YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=Chức năng SSL không có sẵn trong chương trình PHP DownloadMoreSkins=Nhiều giao diện để tải về -SimpleNumRefModelDesc=Trả về số tham chiếu có định dạng %syymm-nnnn trong đó yy là năm, mm là tháng và nnnn là tuần tự không đặt lại +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Hiển thị id chuyên nghiệp với địa chỉ ShowVATIntaInAddress=Ẩn số VAT Cộng Đồng nội bộ với địa chỉ TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Máy chủ proxy: Tên / Địa chỉ MAIN_PROXY_PORT=Máy chủ proxy: Cổng MAIN_PROXY_USER=Máy chủ proxy: Đăng nhập / Người dùng MAIN_PROXY_PASS=Máy chủ proxy: Mật khẩu -DefineHereComplementaryAttributes=Xác định ở đây bất kỳ thuộc tính bổ sung/tùy chỉnh nào bạn muốn đưa vào: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Thuộc tính bổ sung ExtraFieldsLines=Thuộc tính bổ sung (dòng) ExtraFieldsLinesRec=Thuộc tính bổ sung (dòng hóa đơn mẫu) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Ví dụ: uid LDAPFilterConnection=Bộ lọc tìm kiếm LDAPFilterConnectionExample=Ví dụ: &(objectClass = inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Ví dụ: samaccountname LDAPFieldFullname=Họ và tên @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Công ty của bạn đã được xác định không AccountancyCode=Mã kế toán AccountancyCodeSell=Mã kế toán bán hàng AccountancyCodeBuy=Mã kế toán mua hàng +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Cài đặt module sự kiện và chương trình nghị sự PasswordTogetVCalExport=Khóa được phép xuất liên kết +SecurityKey = Security Key PastDelayVCalExport=Không xuất dữ liệu sự kiện cũ hơn AGENDA_USE_EVENT_TYPE=Sử dụng các loại sự kiện (được quản lý trong menu Cài đặt -> Từ điển -> Loại sự kiện chương trình nghị sự) 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 @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Màu nền của hàng lẻ BackgroundTableLineEvenColor=Màu nền của hàng chẵn MinimumNoticePeriod=Thời gian thông báo tối thiểu (Yêu cầu nghỉ phép của bạn phải được thực hiện trước khi trì hoãn này) NbAddedAutomatically=Số ngày được thêm vào bộ đếm của người dùng (tự động) mỗi tháng -EnterAnyCode=Trường này chứa một tham chiếu để xác định dòng. Nhập bất kỳ giá trị nào bạn chọn, nhưng không có ký tự đặc biệt. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Một số biến thể ngôn ngữ được tìm thấy RemoveSpecialChars=Xóa các ký tự đặc biệt COMPANY_AQUARIUM_CLEAN_REGEX=Bộ lọc Regex để làm sạch giá trị (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Thiết lập mô-đun Mạng xã hội EnableFeatureFor=Kích hoạt tính năng cho <strong>%s</strong> VATIsUsedIsOff=Lưu ý: Tùy chọn sử dụng Thuế bán hàng hoặc VAT đã được đặt thành <strong>Tắt</strong> trong menu %s - %s, vì vậy Thuế bán hàng hoặc Vat được sử dụng sẽ luôn là 0 cho bán hàng. SwapSenderAndRecipientOnPDF=Hoán đổi vị trí địa chỉ người gửi và người nhận trên tài liệu PDF -FeatureSupportedOnTextFieldsOnly=Cảnh báo, tính năng chỉ được hỗ trợ trên các trường văn bản. Ngoài ra, một tham số URL action=create hoặc action=edit phải được đặt OR tên trang phải kết thúc bằng ''new.php' để trigger tính năng này. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Trình thu thập email EmailCollectorDescription=Thêm một công việc được lên lịch và một trang thiết lập để quét các hộp thư điện tử thường xuyên (sử dụng giao thức IMAP) và ghi lại các email nhận được vào ứng dụng của bạn, đúng nơi và/hoặc tự động tạo một số bản ghi (như khách hàng tiềm năng). NewEmailCollector=Trình thu thập email mới @@ -2049,8 +2062,11 @@ UseDebugBar=Sử dụng thanh gỡ lỗi DEBUGBAR_LOGS_LINES_NUMBER=Số dòng nhật ký cuối cùng cần giữ trong bảng điều khiển WarningValueHigherSlowsDramaticalyOutput=Cảnh báo, giá trị cao hơn làm chậm đáng kể ở đầu ra ModuleActivated=Mô-đun %s được kích hoạt và làm chậm giao diện +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Mô hình xuất dữ liệu được chia sẻ với mọi người ExportSetup=Thiết lập mô-đun Xuất dữ liệu ImportSetup=Thiết lập module nhập liệu @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Tạo một Ping ẩn danh '+1' cho máy chủ nền tảng Do FeatureNotAvailableWithReceptionModule=Tính năng không khả dụng khi mô-đun Tiếp nhận được bật EmailTemplate=Mẫu cho email EMailsWillHaveMessageID=Email sẽ có thẻ 'Tài liệu tham khảo' khớp với cú pháp này +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=Nếu bạn muốn có text trong PDF của mình bằng 2 ngôn ngữ khác nhau trong cùng một tệp PDF được tạo, bạn phải đặt ở đây ngôn ngữ thứ hai này để PDF được tạo sẽ chứa 2 ngôn ngữ khác nhau trong cùng một trang, một ngôn ngữ được chọn khi tạo PDF và ngôn ngữ này ( chỉ có vài mẫu PDF hỗ trợ này). Giữ trống cho 1 ngôn ngữ trên mỗi PDF. FafaIconSocialNetworksDesc=Nhập vào đây mã của biểu tượng FontAwgie. Nếu bạn không biết FontAwgie là gì, bạn có thể sử dụng fa-address-book FeatureNotAvailableWithReceptionModule=Tính năng không khả dụng khi mô-đun Tiếp nhận được bật @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/vi_VN/banks.lang b/htdocs/langs/vi_VN/banks.lang index 8a13699a9e8..2aa8dc26f32 100644 --- a/htdocs/langs/vi_VN/banks.lang +++ b/htdocs/langs/vi_VN/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=Ủy quyền SEPA của bạn FindYourSEPAMandate=Đây là ủy quyền SEPA của bạn để ủy quyền cho công ty chúng tôi thực hiện lệnh ghi nợ trực tiếp vào ngân hàng của bạn. Trả lại nó đã ký (quét tài liệu đã ký) hoặc gửi thư đến AutoReportLastAccountStatement=Tự động điền vào trường "số báo cáo ngân hàng" với số sao kê cuối cùng khi thực hiện đối chiếu CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing BankColorizeMovement=Tô màu cho các kết chuyển BankColorizeMovementDesc=Nếu chức năng này được bật, bạn có thể chọn màu nền cụ thể cho các kết chuyển ghi nợ hoặc tín dụng BankColorizeMovementName1=Màu nền cho kết chuyển ghi nợ BankColorizeMovementName2=Màu nền cho kết chuyển ghi có IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/vi_VN/bills.lang b/htdocs/langs/vi_VN/bills.lang index fcbd94c39c7..ddc3663bdc4 100644 --- a/htdocs/langs/vi_VN/bills.lang +++ b/htdocs/langs/vi_VN/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=Hóa đơn khách hàng CustomersInvoices=Hóa đơn khách hàng SupplierInvoice=Hóa đơn nhà cung cấp SuppliersInvoices=Hóa đơn nhà cung cấp +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Hóa đơn nhà cung cấp SupplierBills=Hóa đơn nhà cung cấp Payment=Thanh toán @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Đã thanh toán PaymentsBackAlreadyDone=Đã thanh toán lại PaymentRule=Quy tắc thanh toán PaymentMode=Hình thức thanh toán +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Thẻ tín dụng/Ghi nợ PaymentTypePP=PayPal IdPaymentMode=Hình thức thanh toán (id) @@ -373,6 +376,7 @@ DateLastGeneration=Ngày tạo cuối DateLastGenerationShort=Ngày tạo cuối MaxPeriodNumber=Tối đa số lượng hóa đơn NbOfGenerationDone=Số lượng hóa đơn đã được tạo xong +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Số lượng tạo ra được thực hiện MaxGenerationReached=Số lượng tạo ra tối đa đạt được InvoiceAutoValidate=Xác nhận hóa đơn tự động @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=Trong vòng 14 ngày sau khi kết thúc tháng FixAmount=Số tiền không đổi -1 dòng với nhãn là '%s' VarAmount=Số tiền thay đổi (%% tot.) VarAmountOneLine=Số tiền thay đổi (%% tot.) - 1 dòng có nhãn '%s' -VarAmountAllLines=Số lượng sai khác (%%trên tổng) - tất cả các dòng giống nhau +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Chuyển khoản ngân hàng PaymentTypeShortVIR=Chuyển khoản ngân hàng @@ -494,12 +498,16 @@ Cash=Tiền mặt Reported=Bị trễ DisabledBecausePayments=Không được khi có nhiều khoản thanh toán CantRemovePaymentWithOneInvoicePaid=Không thể xóa bỏ thanh toán khi có ít nhất một hóa đơn được phân loại đã trả +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=Thanh toán dự kiến CantRemoveConciliatedPayment=Không thể xóa đối chiếu thanh toán PayedByThisPayment=Đã trả bởi khoản thanh toán này ClosePaidInvoicesAutomatically=Tự động phân loại tất cả các tiêu chuẩn, giảm thanh toán hoặc hóa đơn thay thế là "Trả tiền" khi thanh toán được thực hiện hoàn thành. ClosePaidCreditNotesAutomatically=Tự động phân loại tất cả các ghi chú tín dụng là "Trả tiền" khi hoàn trả hoàn thành. ClosePaidContributionsAutomatically=Tự động phân loại tất cả các khoản đóng góp xã hội hoặc tài chính là "Trả tiền" khi thanh toán được thực hiện hoàn thành. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=Tất cả các hóa đơn không có phần thanh toán còn lại sẽ được tự động đóng lại với trạng thái "Đã thanh toán";. ToMakePayment=Trả ToMakePaymentBack=Trả lại @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=Trước tiên, bạn phải tạo hóa đ PDFCrabeDescription=Hóa đơn mẫu PDF Crabe. Một mẫu hóa đơn đầy đủ (mẫu đề nghị) PDFSpongeDescription=Hóa đơn PDF mẫu Sponge. Một mẫu hóa đơn hoàn chỉnh PDFCrevetteDescription=Hóa đơn PDF mẫu Crevette. Mẫu hóa đơn hoàn chỉnh cho hóa đơn tình huống -TerreNumRefModelDesc1=Quay về số với định dạng %ssyymm-nnnn cho hóa đơn chuẩn và %syymm-nnnn cho các giấy báo có nơi mà yy là năm, mm là tháng và nnnn là một chuỗi ngắt và không trở về 0 -MarsNumRefModelDesc1=Trả về số có định dạng %syymm-nnnn cho hóa đơn tiêu chuẩn, %syymm-nnnn cho hóa đơn thay thế, %syymm-nnn cho thanh toán giảm và %syymm-nnnn cho ghi chú tín dụng khi yy là năm, mm là tháng và nnnn là chuỗi không ngăn cách và không trả về 0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=Bắt đầu ra một hóa đơn với $syymm mà đã tồn tại thì không tương thích với mô hình này của chuỗi. Xóa bỏ nó hoặc đổi tên nó để kích hoạt module này. -CactusNumRefModelDesc1=Số trả về có định dạng %syymm-nnnn cho các hóa đơn tiêu chuẩn, %syymm-nnnn cho các ghi chú tín dụng và %syymm-nnnn cho giảm thanh toán các hóa đơn khi yy là năm, mm là tháng và nnnn là chuỗi không phân cách và không trả về 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Lý do đóng sớm EarlyClosingComment=Ghi chú lý do đóng sớm ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Liên lạc dịch vụ nhà cung InvoiceFirstSituationAsk=Hóa đơn tình huống đầu InvoiceFirstSituationDesc=Các <b>hoá đơn tình huống</b> được gắn với các tình huống liên quan đến một sự tiến triển, ví dụ như sự tiến triển của một công trình. Mỗi tình huống được gắn với một hóa đơn. InvoiceSituation=Hóa đơn tình huống +PDFInvoiceSituation=Hóa đơn tình huống InvoiceSituationAsk=Hóa đơn theo dõi tình huống InvoiceSituationDesc=Tạo một tình huống mới theo cái đã tồn tại SituationAmount=Số tiền hóa đơn tình huống (chưa thuế) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=Nếu bạn cần tạo các hóa đơn tự DeleteRepeatableInvoice=Xóa hóa đơn mẫu ConfirmDeleteRepeatableInvoice=Bạn có chắc chắn muốn xóa hóa đơn mẫu? CreateOneBillByThird=Tạo 1 hóa đơn theo tổ chức (hoặc, 1 hóa đơn theo đơn hàng) -BillCreated=%s hóa đơn được tạo +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Tình trạng tạo tài liệu DoNotGenerateDoc=Không tạo tệp tài liệu AutogenerateDoc=Tự động tạo tập tin tài liệu @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Hoá đơn Nhà cung cấp đã được xoá UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/vi_VN/boxes.lang b/htdocs/langs/vi_VN/boxes.lang index 20c4c4c059e..e002c44df14 100644 --- a/htdocs/langs/vi_VN/boxes.lang +++ b/htdocs/langs/vi_VN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Thông tin đăng nhập BoxLastRssInfos=Thông tin RSS BoxLastProducts=Sản phẩm/Dịch vụ mới nhất %s @@ -17,9 +18,13 @@ BoxLastActions=Hành động mới nhất BoxLastContracts=Hợp đồng mới nhất BoxLastContacts=Liên lạc / địa chỉ mới nhất BoxLastMembers=Thành viên mới nhất +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Can thiệp mới nhất BoxCurrentAccounts=Số dư tài khoản mở BoxTitleMemberNextBirthdays=Sinh nhật của tháng này (thành viên) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Tin tức mới nhất %s từ %s BoxTitleLastProducts=Sản phẩm / Dịch vụ: %s được sửa đổi lần cuối BoxTitleProductsAlertStock=Sản phẩm: cảnh báo tồn kho @@ -107,5 +112,9 @@ 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 BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Kế toán +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/vi_VN/categories.lang b/htdocs/langs/vi_VN/categories.lang index c7947d9a0d0..45dff33ca44 100644 --- a/htdocs/langs/vi_VN/categories.lang +++ b/htdocs/langs/vi_VN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Khu vực thẻ/ danh mục nhà cung cấp CustomersCategoriesArea=Khu vực thẻ/danh mục khách hàng MembersCategoriesArea=Khu vực thẻ/danh mục thành viên ContactsCategoriesArea=Khu vực thẻ/ danh mục liên lạc -AccountsCategoriesArea=Khu vực thẻ/ danh mục tài khoản +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Khu vực thẻ/ danh mục dự án UsersCategoriesArea=Khu vực thẻ/ danh mục người dùng SubCats=Danh mục con @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Hiển thị thẻ/ danh mục ByDefaultInList=Theo mặc định trong danh sách ChooseCategory=Chọn danh mục -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Sử dụng hoặc điều hành các danh mục diff --git a/htdocs/langs/vi_VN/companies.lang b/htdocs/langs/vi_VN/companies.lang index 38e3c5dad27..a35ab2ab2b0 100644 --- a/htdocs/langs/vi_VN/companies.lang +++ b/htdocs/langs/vi_VN/companies.lang @@ -43,9 +43,10 @@ Individual=Cá nhân ToCreateContactWithSameName=Sẽ tự động tạo một liên hệ/ địa chỉ có cùng thông tin với bên thứ ba dưới bên thứ ba. Trong hầu hết các trường hợp, ngay cả khi bên thứ ba của bạn là một người thực tế, chỉ tạo một bên thứ ba là đủ. ParentCompany=Công ty mẹ Subsidiaries=Các chi nhánh -ReportByMonth=Báo cáo theo tháng -ReportByCustomers=Báo cáo theo khách hàng -ReportByQuarter=Báo cáo theo tỷ lệ +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Mã Civility RegisteredOffice=Trụ sở đăng ký Lastname=Họ @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Giấy phép kinh doanh) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (NaN) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Công nợ hiện tại OutstandingBill=Công nợ tối đa OutstandingBillReached=Tối đa cho hóa đơn chưa thanh toán OrderMinAmount=Số lượng tối thiểu cho đơn hàng -MonkeyNumRefModelDesc=Trả về một số có định dạng %syymm-nnnn cho mã khách hàng và %syymm-nnnn cho mã nhà cung cấp trong đó yy là năm, mm là tháng và nnnn là một chuỗi không ngắt quãng và không trả về 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=Mã này tự do. Mã này có thể được sửa đổi bất cứ lúc nào. ManagingDirectors=Tên quản lý (CEO, giám đốc, chủ tịch...) MergeOriginThirdparty=Sao y bên thứ ba (bên thứ ba bạn muốn xóa) diff --git a/htdocs/langs/vi_VN/compta.lang b/htdocs/langs/vi_VN/compta.lang index fda16aecf93..ea724951735 100644 --- a/htdocs/langs/vi_VN/compta.lang +++ b/htdocs/langs/vi_VN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST mua hàng VATCollected=Thu thuế GTGT StatusToPay=Để trả SpecialExpensesArea=Khu vực dành cho tất cả các khoản thanh toán đặc biệt +VATExpensesArea=Area for all TVA payments 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 @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Thanh toán hóa đơn của khách hàng PaymentSupplierInvoice=Thanh toán hóa đơn nhà cung cấp PaymentSocialContribution=Thanh toán xã hội/ fiscal tax PaymentVat=Nộp thuế GTGT +AutomaticCreationPayment=Automatically record the payment ListPayment=Danh sách thanh toán ListOfCustomerPayments=Danh sách các khoản thanh toán của khách hàng ListOfSupplierPayments=Danh sách thanh toán nhà cung cấp @@ -104,6 +106,8 @@ LT2PaymentES=IRPF thanh toán LT2PaymentsES=IRPF Thanh toán VATPayment=Thanh toán thuế bán hàng VATPayments=Thanh toán thuế bán hàng +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Hoàn thuế bán hàng NewVATPayment=Thêm thanh toán thuế bán hàng NewLocalTaxPayment=Thêm thanh toán thuế %s @@ -134,9 +138,17 @@ NoWaitingChecks=Không có séc chờ đặt cọc DateChequeReceived=Kiểm tra ngày tiếp nhận NbOfCheques=Số lượng séc PaySocialContribution=Nộp thuế xã hội / tài chính -ConfirmPaySocialContribution=Bạn có chắc chắn muốn phân loại thuế xã hội hoặc tài chính này như đã trả? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Xóa một khoản thanh toán thuế xã hội hoặc tài chính -ConfirmDeleteSocialContribution=Bạn có chắc chắn muốn xóa khoản thanh toán thuế xã hội / tài chính này không? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Thuế và tài chính xã hội và thanh toán CalcModeVATDebt=Chế độ <b>%sVAT về kế toán cam kết%s</b>. CalcModeVATEngagement=Chế độ <b>%sVAT đối với thu nhập-chi phí%s.</b> @@ -163,6 +175,7 @@ RulesResultInOut=- Nó bao gồm các khoản thanh toán thực tế được t RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- Nó bao gồm tất cả các khoản thanh toán hiệu quả của hóa đơn nhận được từ khách hàng. <br> - Nó được dựa trên ngày thanh toán của các hóa đơn này <br> RulesCATotalSaleJournal=Nó bao gồm tất cả các hạn mức tín dụng từ nhật ký Bán hàng. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=Nó bao gồm bản ghi trong Sổ cái của bạn với các tài khoản kế toán có nhóm "CHI PHÍ" hoặc "THU NHẬP" RulesResultBookkeepingPredefined=Nó bao gồm bản ghi trong Sổ cái của bạn với các tài khoản kế toán có nhóm "CHI PHÍ" hoặc "THU NHẬP" RulesResultBookkeepingPersonalized=Nó hiển thị ghi nhận trong Sổ cái của bạn với các tài khoản kế toán <b>được nhóm theo các nhóm được cá nhân hóa</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=Báo cáo thuế bán hàng của bên thứ ba VATReportByCustomers=Báo cáo thuế bán hàng của khách hàng VATReportByCustomersInInputOutputMode=Báo cáo của thuế GTGT của khách hàng thu thập và trả VATReportByQuartersInInputOutputMode=Báo cáo thuế suất bán hàng của thuế thu và thuế nộp +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Báo cáo thuế 2 theo thuế suất LT2ReportByQuarters=Báo cáo thuế 3 theo thuế suất LT1ReportByQuartersES=Báo cáo của tỷ lệ RE @@ -217,7 +231,7 @@ Pcg_subtype=PCG chủng InvoiceLinesToDispatch=Dòng hoá đơn để gửi ByProductsAndServices=Theo sản phẩm và dịch vụ RefExt=Ref bên ngoài -ToCreateAPredefinedInvoice=Để tạo hóa đơn mẫu, hãy tạo hóa đơn tiêu chuẩn, sau đó, không xác nhận hóa đơn, nhấp vào nút "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Liên kết để đặt hàng Mode1=Phương pháp 1 Mode2=Phương pháp 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=Tài khoản kế toán chuyên dụng được ACCOUNTING_ACCOUNT_SUPPLIER=Tài khoản kế toán được sử dụng cho nhà cung cấp bên thứ ba ACCOUNTING_ACCOUNT_SUPPLIER_Desc=Tài khoản kế toán chuyên dụng được xác định trên thẻ của bên thứ ba sẽ chỉ được sử dụng cho kế toán Sổ phụ. Cái này sẽ được sử dụng cho Sổ cái và là giá trị mặc định của kế toán Sổ phụ nếu tài khoản kế toán chuyên dụng của nhà cung cấp bên thứ ba không được xác định. ConfirmCloneTax=Xác nhận nhân bản thuế xã hội / tài chính +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Sao chép nó vào tháng tới SimpleReport=Báo cáo đơn giản AddExtraReport=Báo cáo bổ sung (thêm báo cáo khách hàng nước ngoài và quốc nội) @@ -253,7 +269,8 @@ AccountingAffectation=Phân công kế toán LastDayTaxIsRelatedTo=Ngày cuối cùng của kỳ thuế có liên quan đến VATDue=Khiếu nại thuế bán hàng ClaimedForThisPeriod=Thời gian yêu cầu bồi thường -PaidDuringThisPeriod=Được trả tiền trong thời gian này +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=Theo thuế suất bán hàng TurnoverbyVatrate=Doanh thu được lập hóa đơn theo thuế suất bán hàng TurnoverCollectedbyVatrate=Doanh thu được thu thập theo thuế suất bán hàng @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Doanh số hàng mua RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=Nó bao gồm tất cả các dòng ghi nợ từ nhật ký +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE 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 diff --git a/htdocs/langs/vi_VN/ecm.lang b/htdocs/langs/vi_VN/ecm.lang index 631914c3b06..10952377cc4 100644 --- a/htdocs/langs/vi_VN/ecm.lang +++ b/htdocs/langs/vi_VN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=Tệp chưa được lập chỉ mục vào cơ sở ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/vi_VN/errors.lang b/htdocs/langs/vi_VN/errors.lang index 1413520f21d..872a1d3b568 100644 --- a/htdocs/langs/vi_VN/errors.lang +++ b/htdocs/langs/vi_VN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Thư <b>mục% s</b> không tìm thấy (con đường xấu, c ErrorFunctionNotAvailableInPHP=Chức <b>năng% s</b> là cần thiết cho tính năng này nhưng không có sẵn trong phiên bản này / thiết lập PHP. ErrorDirAlreadyExists=Một thư mục với tên này đã tồn tại. ErrorFileAlreadyExists=Một tập tin với tên này đã tồn tại. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File không nhận được hoàn toàn bởi máy chủ. ErrorNoTmpDir=Directy tạm thời% s không tồn tại. ErrorUploadBlockedByAddon=Tải bị chặn bởi một plugin PHP / Apache. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Lỗi khi tải hệ thống tài khoản. Nếu một vài ErrorBadSyntaxForParamKeyForContent=Cú pháp sai cho thông số keycontcontent. Phải có giá trị bắt đầu bằng %s hoặc %s ErrorVariableKeyForContentMustBeSet=Lỗi, hằng số có tên %s (có nội dung văn bản sẽ hiển thị) hoặc %s (có url bên ngoài để hiển thị) phải được đặt. ErrorURLMustStartWithHttp=URL %s phải bắt đầu bằng http: // hoặc https: // +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=Lỗi, tham chiếu mới đã được sử dụng ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Lỗi, xóa thanh toán liên kết với một hóa đơn đã đóng là không thể. ErrorSearchCriteriaTooSmall=Tiêu chí tìm kiếm quá nhỏ. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Giao diện công cộng không được kích ho ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # 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. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/vi_VN/externalsite.lang b/htdocs/langs/vi_VN/externalsite.lang index c7963106440..9292c2606ba 100644 --- a/htdocs/langs/vi_VN/externalsite.lang +++ b/htdocs/langs/vi_VN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Thiết lập liên kết đến trang web bên ngoài -ExternalSiteURL=Địa chỉ trang bên ngoài +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Mô-đun trang web bên ngoài được cấu hình không đúng. ExampleMyMenuEntry=Mục menu của tôi diff --git a/htdocs/langs/vi_VN/main.lang b/htdocs/langs/vi_VN/main.lang index 787b79af04c..b8bef1f3bf1 100644 --- a/htdocs/langs/vi_VN/main.lang +++ b/htdocs/langs/vi_VN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Ngày điều chỉnh IPModification=Modification IP DateLastModification=Ngày sửa đổi mới nhất DateValidation=Ngày xác nhận +DateSigning=Signing date DateClosing=Ngày kết thúc DateDue=Ngày đáo hạn DateValue=Giá trị ngày @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Đơn giá (không bao gồm) (tiền tệ) UnitPriceTTC=Đơn giá PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=Đơn giá (tiền tệ) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=Đơn giá (gồm thuế) Amount=Số tiền AmountInvoice=Số tiền hóa đơn @@ -389,6 +390,8 @@ AmountTotal=Tổng số tiền AmountAverage=Số tiền trung bình PriceQtyMinHT=Giá theo số lượng tối thiểu (không bao gồm thuế) PriceQtyMinHTCurrency=Giá theo số lượng tối thiểu (không bao gồm thuế) (tiền tệ) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Phần trăm Total=Tổng SubTotal=Tổng phụ @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Ngôn ngữ hiện tại CurrentTheme=Theme hiện tại CurrentMenuManager=Quản lý menu hiện tại @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Xóa chuỗi '%s' SomeTranslationAreUncomplete=Một số ngôn ngữ được cung cấp có thể chỉ được dịch một phần hoặc có thể có lỗi. Vui lòng giúp sửa ngôn ngữ của bạn bằng cách đăng ký tại <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> để thêm các cải tiến của bạn. -DirectDownloadLink=Liên kết tải xuống trực tiếp (public/external) -DirectDownloadInternalLink=Liên kết tải xuống trực tiếp (cần phải đăng nhập và cần quyền) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Tải xuống DownloadDocument=Tải tài liệu ActualizeCurrency=Cập nhật tỷ giá tiền tệ @@ -1013,6 +1018,7 @@ SearchIntoContacts=Liên lạc SearchIntoMembers=Thành viên SearchIntoUsers=Người dùng SearchIntoProductsOrServices=Sản phẩm hoặc dịch vụ +SearchIntoBatch=Lots / Serials SearchIntoProjects=Các dự án SearchIntoMO=Đơn đặt hàng sản xuất SearchIntoTasks=Tác vụ @@ -1049,12 +1055,13 @@ KeyboardShortcut=Phim tắt AssignedTo=Giao cho Deletedraft=Xóa dự thảo ConfirmMassDraftDeletion=Xác nhận xóa hàng loạt Dự thảo -FileSharedViaALink=Tập tin được chia sẻ qua một liên kết +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Chọn bên thứ ba trước ... YouAreCurrentlyInSandboxMode=Bạn hiện đang ở chế độ "hộp cát" %s Inventory=Hàng tồn kho AnalyticCode=Mã phân tích TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Hiển thị thêm thông tin NoFilesUploadedYet=Đầu tiên vui lòng tải lên một tài liệu SeePrivateNote=Xem ghi chú riêng @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/vi_VN/margins.lang b/htdocs/langs/vi_VN/margins.lang index cbe99ad407f..25581aea638 100644 --- a/htdocs/langs/vi_VN/margins.lang +++ b/htdocs/langs/vi_VN/margins.lang @@ -22,7 +22,7 @@ ProductService=Sản phẩm hoặc dịch vụ AllProducts=Tất cả các sản phẩm và dịch vụ ChooseProduct/Service=Chọn sản phẩm hoặc dịch vụ ForceBuyingPriceIfNull=Ép buộc mua/giá thành giá bán nếu không được xác định -ForceBuyingPriceIfNullDetails=Nếu giá mua/ giá thành không được xác định và tùy chọn này "BẬT", biên độ lợi nhuận sẽ bằng 0 trên dòng (giá mua/giá thành = giá bán), nếu không ("TẮT"), thì biên độ sẽ bằng với mặc định được đề xuất. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Phương pháp biên giảm giá toàn cầu UseDiscountAsProduct=Là một sản phẩm UseDiscountAsService=Là một dịch vụ diff --git a/htdocs/langs/vi_VN/members.lang b/htdocs/langs/vi_VN/members.lang index 790bb7b013c..5f510070f92 100644 --- a/htdocs/langs/vi_VN/members.lang +++ b/htdocs/langs/vi_VN/members.lang @@ -21,10 +21,12 @@ MembersListToValid=Danh sách thành viên dự thảo (sẽ được xác nhậ MembersListValid=Danh sách thành viên hợp lệ MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=Danh sách thành viên bị chấm dứt MembersListQualified=Danh sách thành viên đủ điều kiện MenuMembersToValidate=Thành viên dự thảo MenuMembersValidated=Thành viên hợp lệ +MenuMembersExcluded=Excluded members MenuMembersResiliated=Thành viên bị chấm dứt MembersWithSubscriptionToReceive=Thành viên có đăng ký để nhận MembersWithSubscriptionToReceiveShort=Đăng ký để nhận @@ -47,9 +49,12 @@ MemberStatusActiveLate=Đăng ký hết hạn MemberStatusActiveLateShort=Đã hết hạn MemberStatusPaid=Đăng ký cập nhật MemberStatusPaidShort=Cập nhật +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Thành viên bị chấm dứt MemberStatusResiliatedShort=Chấm dứt MembersStatusToValid=Thành viên dự thảo +MembersStatusExcluded=Excluded members MembersStatusResiliated=Thành viên bị chấm dứt MemberStatusNoSubscription=Xác nhận (không cần đăng ký) MemberStatusNoSubscriptionShort=Đã xác nhận @@ -82,6 +87,8 @@ Physical=Vật lý Moral=Đạo đức MorAndPhy=Moral and Physical Reenable=Bật lại +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? 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? DeleteMember=Xóa thành viên @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Mẫu email để sử dụng đ DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Mẫu email để sử dụng để gửi email cho thành viên trong bản ghi đăng ký mới DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Mẫu email sẽ sử dụng để gửi email nhắc nhở khi đăng ký sắp hết hạn DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Mẫu email để sử dụng để gửi email cho thành viên khi hủy thành viên +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Email người gửi cho gửi email tự động DescADHERENT_ETIQUETTE_TYPE=Định dạng của trang nhãn DescADHERENT_ETIQUETTE_TEXT=Văn bản in trên tờ địa chỉ thành viên @@ -162,6 +170,7 @@ DocForLabels=Tạo tờ địa chỉ SubscriptionPayment=Đăng ký thanh toán LastSubscriptionDate=Ngày thanh toán đăng ký mới nhất LastSubscriptionAmount=Số tiền đăng ký mới nhất +LastMemberType=Last Member type MembersStatisticsByCountries=Thống kê thành viên theo quốc gia MembersStatisticsByState=Thống kê thành viên theo tiểu bang / tỉnh MembersStatisticsByTown=Thống kê thành viên theo thị trấn diff --git a/htdocs/langs/vi_VN/modulebuilder.lang b/htdocs/langs/vi_VN/modulebuilder.lang index d8c8e376b9b..99ce316be1e 100644 --- a/htdocs/langs/vi_VN/modulebuilder.lang +++ b/htdocs/langs/vi_VN/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=Tôi muốn tạo một số tài liệu từ đối tượ IncludeDocGenerationHelp=Nếu bạn kiểm tra điều này, một số mã sẽ được tạo để thêm hộp "Tạo tài liệu" trong hồ sơ. ShowOnCombobox=Hiển thị giá trị vào combobox KeyForTooltip=Khóa cho tooltip -CSSClass=Lớp CSS +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Không thể chỉnh sửa ForeignKey=Khóa ngoại TypeOfFieldsHelp=Kiểu trường: <br> varchar (99), double (24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' có nghĩa là chúng ta thêm nút + sau khi kết hợp để tạo bản ghi, ví dụ 'bộ lọc' có thể là 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTEER__)') diff --git a/htdocs/langs/vi_VN/orders.lang b/htdocs/langs/vi_VN/orders.lang index f77878edc7b..8cfeed65329 100644 --- a/htdocs/langs/vi_VN/orders.lang +++ b/htdocs/langs/vi_VN/orders.lang @@ -16,6 +16,8 @@ ToOrder=Tạo đơn hàng MakeOrder=Tạo đơn hàng SupplierOrder=Đơn đặt hàng mua SuppliersOrders=Đơn đặt hàng mua +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Đơn đặt hàng mua hiện tại CustomerOrder=Đơn đặt hàng bán CustomersOrders=Đơn bán hàng bán @@ -69,7 +71,7 @@ ValidateOrder=Xác nhận đơn hàng UnvalidateOrder=Đơn hàng chưa xác nhận DeleteOrder=Xóa đơn hàng CancelOrder=Hủy đơn hàng -OrderReopened= Order %s re-open +OrderReopened= Đơn hàng %s được mở lại AddOrder=Tạo đơn hàng AddPurchaseOrder=Tạo đơn hàng mua AddToDraftOrders=Thêm vào đơn hàng dự thảo @@ -141,11 +143,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Điện thoại # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=Mẫu hoàn thiện của đơn hàng (Mẫu cũ của mẫu Eratosthene) +PDFEratostheneDescription=Mẫu đơn hàng hoàn thiện PDFEdisonDescription=Mẫu đơn hàng đơn giản -PDFProformaDescription=A complete Proforma invoice template +PDFProformaDescription=Mẫu hoàn thiện của hoá đơn hình thức CreateInvoiceForThisCustomer=Thanh toán đơn hàng +CreateInvoiceForThisSupplier=Thanh toán đơn hàng NoOrdersToInvoice=Không có đơn hàng có thể lập hóa đơn CloseProcessedOrdersAutomatically=Phân loại "Đã xử lý" cho tất cả các đơn hàng được chọn. OrderCreation=Tạo đơn hàng diff --git a/htdocs/langs/vi_VN/other.lang b/htdocs/langs/vi_VN/other.lang index 5ad76877a81..c92b2668971 100644 --- a/htdocs/langs/vi_VN/other.lang +++ b/htdocs/langs/vi_VN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Công ty có nhiều hoạt động (tất cả các mô-đun ch CreatedBy=Được tạo ra bởi %s ModifiedBy=Được thay đổi bởi %s ValidatedBy=Xác nhận bởi %s +SignedBy=Signed by %s ClosedBy=Đóng bởi %s CreatedById=Id người dùng đã tạo ra ModifiedById=Id người dùng đó đã thực hiện thay đổi mới nhất @@ -244,6 +245,7 @@ NewKeyIs=Đây là chìa khóa mới để đăng nhập NewKeyWillBe=Khóa mới của bạn để đăng nhập vào phần mềm sẽ được ClickHereToGoTo=Click vào đây để đi đến% s YouMustClickToChange=Tuy nhiên, trước tiên bạn phải nhấp vào liên kết sau đây để xác nhận thay đổi mật khẩu này +ConfirmPasswordChange=Confirm password change ForgetIfNothing=Nếu bạn không yêu cầu thay đổi này, chỉ cần quên email này. Thông tin của bạn được lưu giữ an toàn. IfAmountHigherThan=Nếu số tiền cao hơn <strong>%s</strong> SourcesRepository=Kho lưu trữ cho các nguồn diff --git a/htdocs/langs/vi_VN/productbatch.lang b/htdocs/langs/vi_VN/productbatch.lang index 9d5c0bff7e1..d6942190bd5 100644 --- a/htdocs/langs/vi_VN/productbatch.lang +++ b/htdocs/langs/vi_VN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Sử dụng số lô / số sê-ri -ProductStatusOnBatch=Có (lô/ sê-ri được yêu cầu) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=Không (lô/ sê-ri không sử dụng) -ProductStatusOnBatchShort=Có +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=Không Batch=Lô/ Sê-ri atleast1batchfield=Hạn sử dụng hoặc Hạn bán hoặc Lô / Số sê-ri @@ -22,3 +24,12 @@ ProductLotSetup=Thiết lập mô-đun Lô/ Sê-ri ShowCurrentStockOfLot=Hiển thị tồn kho hiện tại cho cặp sản phẩm/ lô ShowLogOfMovementIfLot=Hiển thị nhật ký biến động kho cho cặp sản phẩm/ lô StockDetailPerBatch=Chi tiết tồn kho trên mỗi lô +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/vi_VN/products.lang b/htdocs/langs/vi_VN/products.lang index 2e0982b1ff6..9727502004b 100644 --- a/htdocs/langs/vi_VN/products.lang +++ b/htdocs/langs/vi_VN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=Tỷ lệ VAT (cho nhà cung cấp/ sản phẩm này) DiscountQtyMin=Chiết khấu cho s.lượng này NoPriceDefinedForThisSupplier=Không có giá/ s.lượng được định rõ cho nhà cung cấp/ sản phẩm này NoSupplierPriceDefinedForThisProduct=Không có giá/ s.lượng của nhà cung cấp được định rõ cho sản phẩm này +PredefinedItem=Predefined item PredefinedProductsToSell=Sản phẩm định sẵn PredefinedServicesToSell=Dịch vụ định sẵn PredefinedProductsAndServicesToSell=Sản phẩm/dịch vụ định sẵn để bán @@ -313,7 +314,7 @@ LastUpdated=Cập nhật mới nhất CorrectlyUpdated=Đã cập nhật chính xác PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Chọn file PDF -IncludingProductWithTag=Bao gồm sản phẩm/ dịch vụ được gắn tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Giá mặc định, giá thực có thể phụ thuộc vào khách hàng WarningSelectOneDocument=Hãy chọn ít nhất một tài liệu DefaultUnitToShow=Đơn vị diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 0337979bc3b..e87f7bf0ced 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=Danh sách nhiệm vụ GoToListOfTimeConsumed=Tới danh sách thời gian tiêu thụ GanttView=Chế độ xem Gantt +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=Danh sách các đề xuất thương mại liên quan đến dự án ListOrdersAssociatedProject=Danh sách các đơn đặt hàng bán liên quan đến dự án ListInvoicesAssociatedProject=Danh sách hóa đơn khách hàng liên quan đến dự án @@ -268,3 +269,7 @@ OneLinePerTask=Dòng dòng một công việc OneLinePerPeriod=Một dòng cho một khoảng thời gian RefTaskParent=Tham chiếu công việc cấp cha ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/vi_VN/propal.lang b/htdocs/langs/vi_VN/propal.lang index a9e808d9f5a..6df3d5acfc0 100644 --- a/htdocs/langs/vi_VN/propal.lang +++ b/htdocs/langs/vi_VN/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Gửi đơn hàng đề xuất qua thư DatePropal=Ngày đề xuất DateEndPropal=Ngày hết hiệu lực ValidityDuration=Thời hạn hiệu lực -CloseAs=Đặt trạng thái thành SetAcceptedRefused=Đặt chấp nhận / từ chối ErrorPropalNotFound=Đơn hàng đề xuất %s không tìm thấy AddToDraftProposals=Thêm vào dự thảo đề xuất @@ -60,6 +59,7 @@ ConfirmClonePropal=Bạn có chắc chắn muốn nhân bản đề xuất thư ConfirmReOpenProp=Bạn có chắc chắn muốn mở lại đề xuất thương mại <b>%s</b> ? ProposalsAndProposalsLines=Đơn hàng đề xuất và chi tiết ProposalLine=Chi tiết đơn hàng đề xuất +ProposalLines=Proposal lines AvailabilityPeriod=Độ chậm trễ có thể SetAvailability=Chỉnh thời gian trì hoãn sẵn có AfterOrder=sau đơn hàng @@ -85,7 +85,8 @@ 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 +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line + diff --git a/htdocs/langs/vi_VN/stocks.lang b/htdocs/langs/vi_VN/stocks.lang index d25ecfa620a..1a90a0e49ff 100644 --- a/htdocs/langs/vi_VN/stocks.lang +++ b/htdocs/langs/vi_VN/stocks.lang @@ -19,8 +19,8 @@ Stock=Tồn kho Stocks=Tồn kho MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Tồn kho theo lô / sê-ri LotSerial=Lô/ Sê-ri LotSerialList=Danh sách lô/ sê-ri @@ -37,8 +37,8 @@ AllWarehouses=Tất cả kho IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Bao gồm cả dự thảo đơn đặt hàng Location=Đến từ -LocationSummary=Tên ngắn của địa điểm -NumberOfDifferentProducts=Số lượng sản phẩm khác nhau +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Tổng số sản phẩm LastMovement=Dịch chuyển mới nhất LastMovements=Dịch chuyển mới nhất @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=Giá trị kho UserWarehouseAutoCreate=Tự động tạo người dùng kho khi tạo người dùng AllowAddLimitStockByWarehouse=Quản lý đồng thời giá trị cho tồn kho tối thiểu và mong muốn trên mỗi cặp (sản phẩm - kho) ngoài giá trị cho tồn kho tối thiểu và mong muốn trên mỗi sản phẩm RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Kho mặc định @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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=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. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Đơn giá bán EstimatedStockValueSellShort=Giá trị bán EstimatedStockValueSell=Giá trị bán @@ -145,7 +147,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=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". +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 on "%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 @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Mức tồn kho phải đủ để thêm sản phẩ StockMustBeEnoughForOrder=Mức tồn kho phải đủ để thêm sản phẩm/dịch vụ để đặt hàng (kiểm tra được thực hiện trên tồn kho thực hiện tại khi thêm một dòng vào đơn hàng bất kể quy tắc nào để thay đổi tồn kho tự động) StockMustBeEnoughForShipment= Mức tồn kho phải đủ để thêm sản phẩm / dịch vụ vào lô hàng (kiểm tra được thực hiện trên tồn kho thực hiện tại khi thêm một dòng vào lô hàng bất kể quy tắc thay đổi tồn kho tự động) MovementLabel=Nhãn chuyển kho -TypeMovement=Loại chuyển kho +TypeMovement=Direction of movement DateMovement=Ngày chuyển InventoryCode=Mã chuyển kho hoặc mã kiểm kho IsInPackage=Chứa vào gói @@ -183,6 +185,7 @@ inventoryCreatePermission=Tạo kiểm kho mới inventoryReadPermission=Xem kiểm kho inventoryWritePermission=Cập nhật kiểm kho inventoryValidatePermission=Xác nhận kiểm kho +inventoryDeletePermission=Delete inventory inventoryTitle=Hàng tồn kho inventoryListTitle=Kiểm kho inventoryListEmpty=Không việc kiểm kho trong tiến trình @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Tồn kho là bắt buộc để chọn lô ForceTo=Ép buộc 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Tải lên tệp sau đó nhấp vào biểu tượng %s để lựa chọn tệp là tệp nguồn nhập +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Mở lại +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/vi_VN/suppliers.lang b/htdocs/langs/vi_VN/suppliers.lang index eab38bec619..1bbcdce2cbb 100644 --- a/htdocs/langs/vi_VN/suppliers.lang +++ b/htdocs/langs/vi_VN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Nhà cung cấp SuppliersInvoice=Hóa đơn nhà cung cấp +SupplierInvoices=Hóa đơn nhà cung cấp ShowSupplierInvoice=Hiển thị hóa đơn nhà cung cấp NewSupplier=Nhà cung cấp mới History=Lịch sử diff --git a/htdocs/langs/vi_VN/ticket.lang b/htdocs/langs/vi_VN/ticket.lang index 572f49247ce..dad560fa10f 100644 --- a/htdocs/langs/vi_VN/ticket.lang +++ b/htdocs/langs/vi_VN/ticket.lang @@ -70,6 +70,8 @@ Deleted=Đã xóa # Dict Type=Loại Severity=Mức độ nghiêm trọng +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=Để gửi email từ tin nhắn vé @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Hiển thị logo của mô-đun trong giao diện công c TicketsShowModuleLogoHelp=Cho phép tùy chọn này để ẩn mô-đun logo trong các trang của giao diện công cộng TicketsShowCompanyLogo=Hiển thị logo của công ty trong giao diện công cộng TicketsShowCompanyLogoHelp=Cho phép tùy chọn này để ẩn logo của công ty chính trong các trang của giao diện công cộng -TicketsEmailAlsoSendToMainAddress=Đồng thời gửi thông báo đến địa chỉ email chính -TicketsEmailAlsoSendToMainAddressHelp=Cho phép tùy chọn này để gửi email đến địa chỉ "Thông báo email từ" (xem thiết lập bên dưới) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Hạn chế hiển thị đối với vé được chỉ định cho người dùng hiện tại (không hiệu quả đối với người dùng bên ngoài, luôn bị giới hạn ở bên thứ ba mà họ phụ thuộc) TicketsLimitViewAssignedOnlyHelp=Chỉ có vé được chỉ định cho người dùng hiện tại sẽ hiển thị. Không áp dụng cho người dùng có quyền quản lý vé. TicketsActivatePublicInterface=Kích hoạt giao diện công cộng @@ -126,10 +128,10 @@ TicketNumberingModules=Mô-đun đánh số vé TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Thông báo cho bên thứ ba khi tạo 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 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Vé sửa đổi mới nhất BoxLastModifiedTicketDescription=Vé sửa đổi mới nhất %s BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=Không có vé sửa đổi gần đây +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/vi_VN/users.lang b/htdocs/langs/vi_VN/users.lang index 9297c08b76f..019f7aeb3af 100644 --- a/htdocs/langs/vi_VN/users.lang +++ b/htdocs/langs/vi_VN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Xóa khỏi nhóm PasswordChangedAndSentTo=Mật khẩu thay đổi và gửi đến <b>%s</b>. PasswordChangeRequest=Yêu cầu thay đổi mật khẩu cho <b>%s</b> PasswordChangeRequestSent=Yêu cầu thay đổi mật khẩu cho <b>%s</b> đã gửi đến <b>% s</b>. +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=Xác nhận đặt lại mật khẩu MenuUsersAndGroups=Người dùng & Nhóm LastGroupsCreated=Các nhóm %s mới nhất được tạo @@ -70,9 +72,10 @@ ExportDataset_user_1=Người dùng và các tính chất của họ DomainUser=Domain người dùng %s Reactivate=Kích hoạt lại CreateInternalUserDesc=Biểu mẫu này cho phép bạn tạo một người dùng nội bộ trong công ty/ tổ chức của bạn. Để tạo người dùng bên ngoài (khách hàng, nhà cung cấp, v.v.), hãy sử dụng nút 'Tạo Người dùng Dolibarr' từ thẻ liên lạc của bên thứ ba đó. -InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Quyền được cấp bởi vì được thừa hưởng từ một trong những nhóm của người dùng. Inherited=Được thừa kế +UserWillBe=Created user will be UserWillBeInternalUser=Người dùng tạo ra sẽ là một người dùng nội bộ (vì không liên kết với một bên thứ ba cụ thể) UserWillBeExternalUser=Người dùng tạo ra sẽ là một người dùng bên ngoài (vì liên quan đến một bên thứ ba cụ thể) IdPhoneCaller=Id người gọi điện thoại @@ -109,8 +112,10 @@ 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 +DateEmployment=Employment +DateEmploymentstart=Ngày bắt đầu làm việc DateEmploymentEnd=Ngày kết thúc việc làm +RangeOfLoginValidity=Date range of login validity 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í diff --git a/htdocs/langs/vi_VN/website.lang b/htdocs/langs/vi_VN/website.lang index 5f40936142b..9696a7d6d44 100644 --- a/htdocs/langs/vi_VN/website.lang +++ b/htdocs/langs/vi_VN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Sử dụng với máy chủ nhúng PHP</u> <br> Trên môi trường phát triển, bạn có thể muốn kiểm tra trang web với máy chủ web nhúng PHP (yêu cầu PHP 5.5) bằng cách chạy <br> <strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Chạy trang web của bạn với một nhà cung cấp Dolibarr Hosting khác</u> <br> Nếu bạn không có máy chủ web như Apache hoặc NGinx có sẵn trên internet, bạn có thể xuất và nhập trang web của mình vào một phiên bản Dolibarr khác được cung cấp bởi một nhà cung cấp dịch vụ lưu trữ Dolibarr khác cung cấp tích hợp đầy đủ với mô-đun Trang web. Bạn có thể tìm thấy danh sách một số nhà cung cấp dịch vụ lưu trữ Dolibarr trên <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Kiểm tra xem máy chủ ảo có quyền <strong>%s</strong> trên các tệp vào <br> <strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Đọc WritePerm=Viết TestDeployOnWeb=Kiểm tra / triển khai trên web PreviewSiteServedByWebServer=<u>Xem trước %s trong một tab mới.</u> <br><br> %s sẽ được phục vụ bởi một máy chủ web bên ngoài (như Apache, Nginx, IIS). Bạn phải cài đặt và thiết lập máy chủ này trước khi trỏ đến thư mục: <br> <strong>%s</strong> <br> URL được phục vụ bởi máy chủ bên ngoài: <br> <strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Xem trước %s trong một tab mới.</u> <br><br> %s sẽ được phục vụ bởi máy chủ Dolibarr nên không cần thêm bất kỳ máy chủ web nào (như Apache, Nginx, IIS). <br> Điều bất tiện là URL của các trang không thân thiện với người dùng và bắt đầu bằng đường dẫn Dolibarr của bạn. <br> URL được phục vụ bởi Dolibarr: <br> <strong>%s</strong> <br><br> Để sử dụng máy chủ web bên ngoài của riêng bạn để phục vụ trang web này, hãy tạo một máy chủ ảo trên máy chủ web của bạn trỏ vào thư mục <br> <strong>%s</strong> <br> sau đó nhập tên của máy chủ ảo này và nhấp vào nút xem trước khác. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL của máy chủ ảo được cung cấp bởi máy chủ web bên ngoài không được xác định NoPageYet=Chưa có trang nào YouCanCreatePageOrImportTemplate=Bạn có thể tạo một trang mới hoặc nhập một mẫu trang web đầy đủ @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/vi_VN/zapier.lang b/htdocs/langs/vi_VN/zapier.lang index bbb899dd004..3eb7187a5c5 100644 --- a/htdocs/langs/vi_VN/zapier.lang +++ b/htdocs/langs/vi_VN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier cho Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Mô-đun Zapier cho Dolibarr - -# -# Admin page -# -ZapierForDolibarrSetup = Thiết lập Zapier cho Dolibarr +ZapierForDolibarrSetup=Thiết lập Zapier cho Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/zh_CN/accountancy.lang b/htdocs/langs/zh_CN/accountancy.lang index 5bfcb481baa..1079a11bcfe 100644 --- a/htdocs/langs/zh_CN/accountancy.lang +++ b/htdocs/langs/zh_CN/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=已绑定的发票行 ExpenseReportLines=要绑定的费用行报告 ExpenseReportLinesDone=已绑定的费用报告行 IntoAccount=用会计科目绑定行 -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=绑定 @@ -209,7 +209,7 @@ Codejournal=日记帐 JournalLabel=Journal label NumPiece=件数 TransactionNumShort=Num. transaction -AccountingCategory=会计分类 +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=您可以在此处定义一些会计科目组。它们将用于会计分类报告。 @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=会计分录 +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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=费用报告日常报表 InventoryJournal=库存日常报表 + +NAccounts=%s accounts diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index 0c6ae1ca992..20c23406c24 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -9,8 +9,8 @@ VersionExperimental=试验 VersionDevelopment=开发 VersionUnknown=未知 VersionRecommanded=推荐 -FileCheck=Fileset Integrity Checks -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). +FileCheck=文件集完整性检查 +FileCheckDesc=使用此工具,您可以将文件与正式文件进行比较,以检查文件的完整性和应用程序的设置。也可以检查某些设置常数的值。您可以使用此工具来确定是否已修改任何文件(例如,被黑客入侵)。 FileIntegrityIsStrictlyConformedWithReference=文件完整性严格符合参考。 FileIntegrityIsOkButFilesWereAdded=Files integrity check has passed, however some new files have been added. FileIntegritySomeFilesWereRemovedOrModified=文件完整性检查失败。某些文件已被修改,删除或添加。 @@ -27,7 +27,7 @@ AvailableOnlyOnPackagedVersions=The local file for integrity checking is only av XmlNotFound=找不到程序的Xml完整性文件 SessionId=会话 ID SessionSaveHandler=会话保存处理程序 -SessionSavePath=Session save location +SessionSavePath=会话保存位置 PurgeSessions=清空会话 ConfirmPurgeSessions=您真的要清除所有会话吗?它将断开每个用户(您自己除外)。 NoSessionListWithThisHandler=您 PHP 中设置的保存会话处理程序不允许列出运行中的会话。 @@ -35,14 +35,15 @@ LockNewSessions=锁定新连接 ConfirmLockNewSessions=你确定要限制 Dolibarr 的所有新连接,只允许您自己连入?此后将只有用户 <b>%s</b> 可以连入。 UnlockNewSessions=取消连接锁定 YourSession=你的会话 -Sessions=Users Sessions +Sessions=用户会话 WebUserGroup=Web 服务器用户/组 -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s -NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). +PermissionsOnFiles=Permissions on files +PermissionsOnFilesInWebRoot=Web根目录中文件的权限 +PermissionsOnFile=文件%s的权限 +NoSessionFound=您的PHP配置似乎不允许列出活动会话。可以保护用于保存会话的目录(<b> %s </b>)(例如,通过OS权限或PHP指令open_basedir)。 DBStoringCharset=数据库保存数据的字符编码 DBSortingCharset=数据库排序数据的字符编码 -HostCharset=Host charset +HostCharset=主机字符集 ClientCharset=客户端的字符编码 ClientSortingCharset=客户核对 WarningModuleNotActive=<b> %s </b>模块必须启用 @@ -56,12 +57,13 @@ GUISetup=主题 SetupArea=设置 UploadNewTemplate=上传新模板 FormToTestFileUploadForm=文件上传功能测试 -ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled -ModuleIsEnabled=The module/application <b>%s</b> has been enabled +ModuleMustBeEnabled=必须启用模块/应用程序<b> %s </b> +ModuleIsEnabled=启用了模块/应用程序<b> %s </b> IfModuleEnabled=注:“是”仅在模块 <b>%s</b> 启用时有效 -RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. -RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. +RemoveLock=删除/重命名文件<b> %s </b>(如果存在),以允许使用更新/安装工具。 +RestoreLock=恢复文件<b> %s </b>的只读权限,以禁止升级工具的使用。 SecuritySetup=安全设置 +PHPSetup=PHP setup SecurityFilesDesc=在此定义与上载文件的安全性相关的选项。 ErrorModuleRequirePHPVersion=错误,此模块要求 PHP 版本 %s 或更高 ErrorModuleRequireDolibarrVersion=错误,此模块要求 Dolibarr 版本 %s 或更高 @@ -71,20 +73,20 @@ Dictionary=字典库 ErrorReservedTypeSystemSystemAuto=类型的值'system'和'systemauto'保留。您可以使用“user”作为值来添加自己的记录 ErrorCodeCantContainZero=编码不能包含 0 DisableJavascript=禁用 JavaScript 和 Ajax 功能 -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 +DisableJavascriptNote=注意:用于测试或调试目的。为了针对盲人浏览器或文本浏览器进行优化,您可能更喜欢使用用户个人资料上的设置 UseSearchToSelectCompanyTooltip=此外,如果您有大量第三方(> 100 000),您可以通过在"设置"-> "其他"中将常量COMPANY_DONOTSEARCH_ANYWHERE设置为1来提高速度。然后搜索将限制为以字符串的开头。 UseSearchToSelectContactTooltip=此外,如果您有大量第三方(> 100 000),您可以通过在"设置"-> "其他"中将常量CONTACT_DONOTSEARCH_ANYWHERE设置为1来提高速度。然后搜索将限制为以字符串开头。 DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.<br>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.<br>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 +NumberOfBytes=字节数 +SearchString=搜寻字串 NotAvailableWhenAjaxDisabled=Ajax 禁用时不可用 AllowToSelectProjectFromOtherCompany=在合作方的文档上,可以选择链接到另一个合作方的项目 JavascriptDisabled=禁用 JavaScript UsePreviewTabs=使用预览标签 ShowPreview=显示预览 -ShowHideDetails=Show-Hide details +ShowHideDetails=显示隐藏详细信息 PreviewNotAvailable=无预览 ThemeCurrentlyActive=当前使用的主题 MySQLTimeZone=MySql 服务器的时区 @@ -138,15 +140,15 @@ YouCanEditPHPTZ=To set a different PHP timezone (not required), you can try to a 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=插件 Boxes=插件 -MaxNbOfLinesForBoxes=Max. number of lines for widgets +MaxNbOfLinesForBoxes=插件清单数量最大值 AllWidgetsWereEnabled=全部插件已启用 PositionByDefault=默认顺序 Position=位置 MenusDesc=菜单管理器定义两菜单中的内容(横向和纵向菜单栏)。 -MenusEditorDesc=菜单编辑器允许您定义个性化的菜单项。请谨慎使用,以免造成部分菜单项无法访问,影响 Dolibarr 的稳定性。<br>一些模块会添加菜单项(通常在 <b>所有(All)</b>菜单下)。如果您错误的移除了其中的一些菜单项,可以通过禁用/重新启用相应的模块来恢复。 +MenusEditorDesc=菜单编辑器允许您定义自定义菜单条目。请小心使用,以避免不稳定和永久无法访问的菜单项。<br>某些模块添加菜单项(通常在菜单<b>全部</b>中)。如果您错误地删除了其中一些条目,则可以恢复它们禁用并重新启用该模块。 MenuForUsers=用户菜单 LangFile=.lang 文件 -Language_en_US_es_MX_etc=Language (en_US, es_MX, ...) +Language_en_US_es_MX_etc=语言(en_US,es_MX等) System=系统 SystemInfo=系统信息 SystemToolsArea=系统工具区 @@ -154,8 +156,8 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=清空 PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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=删除系统日志模块定义的日志文件<b>%s</b>(无数据丢失风险) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete log and temporary files +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFilesShort=删除日志和临时文件 PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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=立即清空 PurgeNothingToDelete=未删除目录或文件 @@ -169,7 +171,7 @@ Restore=还原 RunCommandSummary=备份已通过如下命令执行 BackupResult=备份结果 BackupFileSuccessfullyCreated=备份文件生成成功 -YouCanDownloadBackupFile=The generated file can now be downloaded +YouCanDownloadBackupFile=现在可以下载生成的文件 NoBackupFileAvailable=没有可用的备份文件。 ExportMethod=导出方法 ImportMethod=导入方法 @@ -178,13 +180,13 @@ ImportMySqlDesc=To import a MySQL backup file, you may use phpMyAdmin via your h ImportPostgreSqlDesc=导入备份文件,你必须使用 pg_restore 命令行命令: ImportMySqlCommand=%s %s < mybackupfile.sql ImportPostgreSqlCommand=%s %s mybackupfile.sql -FileNameToGenerate=Filename for backup: +FileNameToGenerate=备份文件名: Compression=压缩 CommandsToDisableForeignKeysForImport=导入时禁用 Foreign Key 的命令 CommandsToDisableForeignKeysForImportWarning=如果你希望稍候能恢复您的SQL转储则必须使用。 ExportCompatibility=生成导出文件的兼容性 -ExportUseMySQLQuickParameter=Use the --quick parameter -ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. +ExportUseMySQLQuickParameter=使用--quick参数 +ExportUseMySQLQuickParameterHelp=“ --quick”参数有助于限制大型表的RAM消耗。 MySqlExportParameters=MySQL 导出参数 PostgreSqlExportParameters= PostgreSQL 导出参数 UseTransactionnalMode=使用事务模式 @@ -211,7 +213,7 @@ ModulesMarketPlaces=更多模块... ModulesDevelopYourModule=开发自己的模块 ModulesDevelopDesc=You may also develop your own module or find a partner to develop one for you. DOLISTOREdescriptionLong=Instead of switching on <a href="https://www.dolistore.com">www.dolistore.com</a> 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 +NewModule=新模块 FreeModule=空余 CompatibleUpTo=与版本%s兼容 NotCompatible=此模块似乎与您的Dolibarr %s(Min %s - Max %s)不兼容。 @@ -227,11 +229,12 @@ DoliPartnersDesc=List of companies providing custom-developed modules or feature WebSiteDesc=参考网址查找更多模块... DevelopYourModuleDesc=一些开发自己模块的解决方案...... URL=网址 -RelativeURL=Relative URL +RelativeURL=相关URL BoxesAvailable=插件可用 BoxesActivated=插件已启用 ActivateOn=启用 ActiveOn=启用 +ActivatableOn=可激活 SourceFile=来源文件 AvailableOnlyIfJavascriptAndAjaxNotDisabled=仅当 JavaScript 启用时可用 Required=必要 @@ -247,17 +250,17 @@ ProtectAndEncryptPdfFilesDesc=PDF保护允许在PDF浏览器中阅读和打印PD Feature=功能 DolibarrLicense=授权 Developpers=开发者/贡献者 -OfficialWebSite=Dolibarr official web site +OfficialWebSite=Dolibarr官方网站 OfficialWebSiteLocal=内部网站 (%s) -OfficialWiki=Dolibarr documentation / Wiki +OfficialWiki=Dolibarr文档/ Wiki OfficialDemo=Dolibarr在线演示 OfficialMarketPlace=官方市场提供外部模块/扩展 OfficialWebHostingService=引用网络托管服务(云主机) ReferencedPreferredPartners=首选合作伙伴 OtherResources=其他资源 -ExternalResources=External Resources +ExternalResources=外部资源 SocialNetworks=社交网络 -SocialNetworkId=Social Network ID +SocialNetworkId=社交网络ID ForDocumentationSeeWiki=用户或开发人员用文档(文档,常见问题…),<br>参见 Dolibarr 百科:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=您有任何其他问题/帮助,可以到 Dolibarr 论坛: <br> <b><a href="%s" target="_blank">%s</a></b>简体中文翻译可到Dolibarr爱好者交流Q群技术交流:206239089 HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -285,19 +288,19 @@ MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS 端口 ( Unix 类系统 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: <b>%s</b>) MAIN_MAIL_ERRORS_TO=Email used for error returns emails (fields 'Errors-To' in emails sent) -MAIN_MAIL_AUTOCOPY_TO= BCC 所有发送邮件至 -MAIN_DISABLE_ALL_MAILS=Disable all email sending (for test purposes or demos) -MAIN_MAIL_FORCE_SENDTO=发送电子邮件至(替换真正的收件人,用于测试目的) +MAIN_MAIL_AUTOCOPY_TO= 将所有已发送的电子邮件复制(密件抄送)到 +MAIN_DISABLE_ALL_MAILS=禁用所有电子邮件发送(出于测试目的或演示目的) +MAIN_MAIL_FORCE_SENDTO=发送电子邮件至(替换实际的收件人,用于测试目的) 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_TLS=使用 TLS(SSL)加密 +MAIN_MAIL_EMAIL_STARTTLS=使用TLS(STARTTLS)加密 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 +MAIN_MAIL_EMAIL_DKIM_SELECTOR=dkim选择器名称 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=短信发送方法 @@ -347,9 +350,10 @@ LastActivationAuthor=最新激活作者 LastActivationIP=最新激活IP UpdateServerOffline=离线升级服务器 WithCounter=管理柜台 -GenericMaskCodes=您可自由设置格式掩码。在 %s 格式掩码中, 有如下计数标记可用:<br><b>{000000}</b>表示按顺序递增的序号。序号位数与掩码中0的个数相同,不足自动补零,达最大值后自动归零。<br><b>{000000+000}</b> 同上但 %s 起始序号从 + 后的数值记起。<br><b>{000000@x}</b> 与第一种相同,但序号到X月时自动清零(x=1~12 、0=程序设置中的财年起始月、99=每月清零)。 如果使用此种掩码且 x >= 2 ,则必须同时使用日期掩码 {yy}{mm} 或 {yyyy}{mm}。<br><b>{dd}</b> 天 (01~31)。<br><b>{mm}</b> 月 (01~12)。<br><b>{yy}</b>,<b>{yyyy}</b> 或 <b>{y}</b> 代表 2位, 4位 或 1 位年。<br><br> -GenericMaskCodes2=<b>{cccc}</b> 客户代码<br><b>{cccc000}</b> 客户代码ccc后跟客户引用序号000。<br><b>{tttt}></b> 公司类型代码。(参见公司类型的下拉菜单项目列表)。<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=其它非标记字符将维持不变。<br>不允许使用空格<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>例如: 2007-01-31 第三方“TheCompany”的第99笔 %s :</u> <br> GenericMaskCodes4b=<u>例如合作方创建于 2007-03-01:</u><br> GenericMaskCodes4c=<u>例如: 于 2007-03-1 建立的产品资料:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=已使用资料库以支持生成PDF文件 @@ -466,24 +470,24 @@ BarcodeInitForProductsOrServices=产品或服务条码批量初始化或重置 CurrentlyNWithoutBarCode=目前,您在<strong> %s </ strong> %s上没有定义条形码时有<strong> %s </ strong>记录。 InitEmptyBarCode=初始值为下一个%s空记录 EraseAllCurrentBarCode=抹掉现存所有条码值 -ConfirmEraseAllCurrentBarCode=您确定要删除所有当前条形码值吗? +ConfirmEraseAllCurrentBarCode=您确定要删除所有当前条形码值吗? AllBarcodeReset=所有现存条码值已经被删除 NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled in the Barcode module setup. EnableFileCache=启用文件缓存 ShowDetailsInPDFPageFoot=Add more details into footer, such as company address or manager names (in addition to professional ids, company capital and VAT number). -NoDetails=No additional details in footer +NoDetails=页脚中没有其他详细信息 DisplayCompanyInfo=显示公司地址 DisplayCompanyManagers=显示经理姓名 DisplayCompanyInfoAndManagers=显示公司地址和经理姓名 EnableAndSetupModuleCron=If you want to have this recurring invoice generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template using the *Create* button. Note that even if you enabled automatic generation, you can still safely launch manual generation. Generation of duplicates for the same period is not possible. -ModuleCompanyCodeCustomerAquarium=%s followed by customer code for a customer accounting code -ModuleCompanyCodeSupplierAquarium=%s followed by vendor code for a vendor accounting code +ModuleCompanyCodeCustomerAquarium=%s后跟客户会计代码的客户代码 +ModuleCompanyCodeSupplierAquarium=%s后跟供应商会计代码的合作方供应商代码 ModuleCompanyCodePanicum=返回一个空的科目代码 ModuleCompanyCodeDigitaria=Returns a compound accounting code according to the name of the third party. The code consists of a prefix that can be defined in the first position followed by the number of characters defined in the third party code. ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by the number of characters: %s for the customer accounting code. ModuleCompanyCodeSupplierDigitaria=%s followed by the truncated supplier name by the number of characters: %s for the supplier accounting code. -Use3StepsApproval=默认情况下,需要由2个不同的用户创建和批准采购订单(一步/用户创建和一步/用户批准。请注意,如果用户同时拥有创建和批准权限,则一步/用户就足够了) 。如果金额高于专用值,您可以要求使用此选项引入第三步/用户批准(因此需要3个步骤:1 =验证,2 =首次批准,3 =如果金额足够则为第二批准)。 <br>如果一个批准(2个步骤)足够,则将其设置为空,如果始终需要第二个批准(3个步骤),则将其设置为非常低的值(0.1)。 -UseDoubleApproval=当金额(不含税)高于......时,使用3步批准 +Use3StepsApproval=默认情况下,需要由2个不同的用户创建和批准采购订单(一步/用户创建和一步/用户批准。请注意,如果用户同时拥有创建和批准权限,则一步/用户就足够了) 。如果金额高于专用值,您可以要求使用此选项引入第三步/用户批准(因此需要3个步骤:1 =确认,2 =首次批准,3 =如果金额足够则为第二批准)。 <br>如果一个批准(2个步骤)足够,则将其设置为空,如果始终需要第二个批准(3个步骤),则将其设置为非常低的值(0.1)。 +UseDoubleApproval=当金额(不含税金)高于......时,使用3步批准 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 increases the trustability of your email, so it increases the deliverablity without being flagged 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). @@ -491,16 +495,16 @@ WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to se WarningPHPMailD=If the method 'PHP Mail' is really the method you would like to use, you can remove this warning by adding the constant MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home - Setup - Other. WarningPHPMail2=如果您的电子邮件SMTP提供商需要将电子邮件客户端限制为某些IP地址(非常罕见),则这是您的ERP CRM应用程序的邮件用户代理(MUA)的IP地址:<strong> %s</strong>。 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: <strong>%s</strong>. -ClickToShowDescription=单击以显示说明 -DependsOn=This module needs the module(s) -RequiredBy=本模块被以下模块需要 +ClickToShowDescription=单击以显示描述 +DependsOn=该模块需要模块(集) +RequiredBy=本模块被以下模块(集)需要 TheKeyIsTheNameOfHtmlField=This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field. PageUrlForDefaultValues=You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value. PageUrlForDefaultValuesCreate=<br>Example:<br>For the form to create a new third party, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/", so use path like <strong>mymodule/mypage.php</strong> and not custom/mymodule/mypage.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> PageUrlForDefaultValuesList=<br>Example:<br>For the page that lists third parties, it is <strong>%s</strong>.<br>For URL of external modules installed into custom directory, do not include the "custom/" so use a path like <strong>mymodule/mypagelist.php</strong> and not custom/mymodule/mypagelist.php.<br>If you want default value only if url has some parameter, you can use <strong>%s</strong> AlsoDefaultValuesAreEffectiveForActionCreate=Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...) -EnableDefaultValues=Enable customization of default values -EnableOverwriteTranslation=Enable usage of overwritten translation +EnableDefaultValues=启用自定义默认值 +EnableOverwriteTranslation=启用覆盖翻译 GoIntoTranslationMenuToChangeThis=A translation has been found for the key with this code. To change this value, you must edit it from Home-Setup-translation. WarningSettingSortOrder=警告,如果字段是未知字段,则在列表页面上设置默认排序顺序可能会导致技术错误。如果遇到此类错误,请返回此页面以删除默认排序顺序并恢复默认行为。 Field=字段 @@ -510,7 +514,7 @@ WatermarkOnDraftExpenseReports=草稿费用报告上的水印 AttachMainDocByDefault=如果要在默认情况下将主文档附加到电子邮件,请将此项设置为1(如果适用) FilesAttachedToEmail=附加文件 SendEmailsReminders=通过电子邮件发送议程提醒 -davDescription=Setup a WebDAV server +davDescription=设置WebDAV服务器 DAVSetup=模块DAV的设置 DAV_ALLOW_PRIVATE_DIR=Enable the generic private directory (WebDAV dedicated directory named "private" - login required) DAV_ALLOW_PRIVATE_DIRTooltip=The generic private directory is a WebDAV directory anybody can access with its application login/pass. @@ -541,6 +545,8 @@ Module40Name=供应商 Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) Module42Name=调试日志 Module42Desc=记录设施(文件,系统日志,......)。此类日志用于技术/调试目的。 +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=编辑器 Module49Desc=编辑器管理 Module50Name=产品 @@ -639,12 +645,14 @@ Module2900Name=Maxmind网站的GeoIP全球IP地址数据库 Module2900Desc=Maxmind的geoip数据库的转换能力 Module3200Name=不可改变的档案 Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=社交网络 +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=人事管理 Module4000Desc=人力资源管理(部门管理,员工合同和感受) Module5000Name=多公司 Module5000Desc=允许你管理多个公司 -Module6000Name=工作流程 -Module6000Desc=工作流管理(自动创建对象和/或自动状态更改) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=网站 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=创建/变更内部/外部用户和权限 Permission254=只能创建/变更外部用户资料 Permission255=修改其他用户密码 Permission256=删除或暂时关闭其他用户 -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=读取 CA Permission272=读取发票 Permission273=开具发票 @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=安全稽核事件 +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=安全稽核 InfoDolibarr=关于Dolibarr InfoBrowser=关于浏览器 @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=您必须以 <b>%s</b> 用户在MySQL控制台登陆后通过命令行运行此命令否则您必须在命令行的末尾使用 -W 选项来提供 <b>%s</b> 的密码。 YourPHPDoesNotHaveSSLSupport=SSL 在您的 PHP 中不可用 DownloadMoreSkins=下载更多外观主题 -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=部分翻译 @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=自定义属性 ExtraFieldsLines=自定义属性 (行列) ExtraFieldsLinesRec=补充属性(模板发票行) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=登陆 (Unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=筛选搜索 LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=登陆 (samba,activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=全名 @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=贵公司已被定义为不含增值税 (首页->设定 AccountancyCode=科目代码 AccountancyCodeSell=销售账户代码 AccountancyCodeBuy=采购账户代码 +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=事件及行程模块设置 PasswordTogetVCalExport=导出链接的授权密钥 +SecurityKey = Security Key PastDelayVCalExport=不导出早于这个日期的时间 AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=表格奇数背景颜色 BackgroundTableLineEvenColor=表格偶数背景颜色 MinimumNoticePeriod=最小通知间隔 NbAddedAutomatically=每月添加到用户计数器(自动)的天数 -EnterAnyCode=该字段包含标识行的引用。输入您选择的任何值,但不包含特殊字符。 +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=找到了几种语言变体 RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=正则表达式过滤器清理值(COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/zh_CN/banks.lang b/htdocs/langs/zh_CN/banks.lang index c810652102d..96a4fe4a833 100644 --- a/htdocs/langs/zh_CN/banks.lang +++ b/htdocs/langs/zh_CN/banks.lang @@ -174,10 +174,11 @@ YourSEPAMandate=您的SEPA授权 FindYourSEPAMandate=这是您的SEPA授权,授权我们公司向您的银行直接扣款。返回签名(扫描签名文档)或通过邮件发送给 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/zh_CN/bills.lang b/htdocs/langs/zh_CN/bills.lang index f46fab501c3..114560a8b53 100644 --- a/htdocs/langs/zh_CN/bills.lang +++ b/htdocs/langs/zh_CN/bills.lang @@ -52,9 +52,10 @@ Invoices=发票 InvoiceLine=发票线 InvoiceCustomer=客户发票 CustomerInvoice=客户发票 -CustomersInvoices=客户发票 +CustomersInvoices=顾客发票 SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=供应商发票 +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice SupplierBills=供应商发票 Payment=付款 @@ -81,6 +82,8 @@ PaymentsAlreadyDone=付款已完成 PaymentsBackAlreadyDone=Refunds already done PaymentRule=付款规则 PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=借记卡/信用卡 PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=最新一代的日期 DateLastGenerationShort=最新日期。 MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=已完成的发票数量 +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=完成的代数 MaxGenerationReached=达到最大代数 InvoiceAutoValidate=自动验证发票 @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=在月底之后的14天内 FixAmount=Fixed amount - 1 line with label '%s' VarAmount=可变金额(%% tot.) VarAmountOneLine=可变金额(%% tot。) - 1行标签'%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=银行转帐 PaymentTypeShortVIR=银行转帐 @@ -494,12 +498,16 @@ Cash=现金 Reported=延迟 DisabledBecausePayments=不可操作,因为已经接收了付款 CantRemovePaymentWithOneInvoicePaid=无法删除,因为至少有一份发票被归类为已支付 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is classified paid ExpectedToPay=预期付款 CantRemoveConciliatedPayment=Can't remove reconciled payment PayedByThisPayment=已由此付款来支付 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary as "Paid" when payment is done entirely. AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". ToMakePayment=支付 ToMakePaymentBack=支付 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=您必须先创建标准发票并将其转 PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=发票PDF模板Crevette。情况发票的完整发票模板 -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=标准发票的格式为%syymm-nnnn,换发票为%syymm-nnnn,预付款发票为%syymm-nnnn,yy为年份为%syymm-nnnn,mm为月,nnnn为没有中断的序列回到0 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=返回编号为标准发票的格式为%syymm-nnnn,信用票据为%syymm-nnnn,yy为年的预付款发票为%syymm-nnnn,mm为月,nnnn为没有中断且不返回0的序列 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=第一种情况发票 InvoiceFirstSituationDesc=<b>现状发票</b>与进展相关的情况有关,例如建筑的进展。每种情况都与发票挂钩。 InvoiceSituation=情况发票 +PDFInvoiceSituation=情况发票 InvoiceSituationAsk=根据情况发票 InvoiceSituationDesc=在已有的情况之后创建新情况 SituationAmount=情况发票金额(净额) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=删除模板发票 ConfirmDeleteRepeatableInvoice=您确定要删除模板发票吗? CreateOneBillByThird=每个合作方创建一个发票(否则,每个订单一个发票) -BillCreated=%s条例草案已创建 +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=文件生成的状态 DoNotGenerateDoc=不生成文档文件 AutogenerateDoc=自动生成文档文件 @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/zh_CN/boxes.lang b/htdocs/langs/zh_CN/boxes.lang index 6ff10e54c76..864117c4789 100644 --- a/htdocs/langs/zh_CN/boxes.lang +++ b/htdocs/langs/zh_CN/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=最近的动作 BoxLastContracts=最近的合同 BoxLastContacts=最新联系人/地址 BoxLastMembers=最新会员 +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=最新干预 BoxCurrentAccounts=打开财务会计账单 BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=来自 %s 的最新的 %s 条新闻 BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=会计 +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/zh_CN/categories.lang b/htdocs/langs/zh_CN/categories.lang index 355be943e79..d9f0d4cf96f 100644 --- a/htdocs/langs/zh_CN/categories.lang +++ b/htdocs/langs/zh_CN/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=客户标签/类别区 MembersCategoriesArea=会员标签/分类区 ContactsCategoriesArea=联系人标签/分类信息区 -AccountsCategoriesArea=账户标签/分类区 +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=项目标签/分类区 UsersCategoriesArea=Users tags/categories area SubCats=子类别 @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=显示标签/分类 ByDefaultInList=按默认列表 ChooseCategory=选择类别 -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/zh_CN/companies.lang b/htdocs/langs/zh_CN/companies.lang index 8f852619ac3..0575152ba7d 100644 --- a/htdocs/langs/zh_CN/companies.lang +++ b/htdocs/langs/zh_CN/companies.lang @@ -43,9 +43,10 @@ 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=母公司 Subsidiaries=附属公司 -ReportByMonth=按月报告 -ReportByCustomers=顾客报告 -ReportByQuarter=按报表等级 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=文明守则 RegisteredOffice=注册给办公室 Lastname=姓氏 @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (社保号) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (社保号) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=钢筋混凝土 ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=当前优质账单 OutstandingBill=优质账单最大值 OutstandingBillReached=已达到最大优质账单值 OrderMinAmount=订单的最低金额 -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=客户/供应商代码是免费的。此代码可以随时修改。 ManagingDirectors=公司高管(s)称呼 (CEO, 董事长, 总裁...) MergeOriginThirdparty=重复合伙人(合伙人要删除) diff --git a/htdocs/langs/zh_CN/compta.lang b/htdocs/langs/zh_CN/compta.lang index 4ae180df234..cb4815b8ab6 100644 --- a/htdocs/langs/zh_CN/compta.lang +++ b/htdocs/langs/zh_CN/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST购买 VATCollected=增值税征收 StatusToPay=待支付 SpecialExpensesArea=特殊支付区域 +VATExpensesArea=Area for all TVA payments SocialContribution=社会或财政税 SocialContributions=社会或财政税 SocialContributionsDeductibles=免赔额的社会或财政税 @@ -85,6 +86,7 @@ PaymentCustomerInvoice=客户发票付款 PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=社会/财政税款 PaymentVat=增值税纳税 +AutomaticCreationPayment=Automatically record the payment ListPayment=付款列表 ListOfCustomerPayments=客户付款列表 ListOfSupplierPayments=供应商付款清单 @@ -104,6 +106,8 @@ LT2PaymentES=IRPF付款 LT2PaymentsES=IRPF付款 VATPayment=销售税款 VATPayments=销售税款 +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=销售税退税 NewVATPayment=新的销售税 NewLocalTaxPayment=新税%s付款 @@ -134,9 +138,17 @@ NoWaitingChecks=空空如也——没有等待支票存款 DateChequeReceived=支票接收日期 NbOfCheques=No. of checks PaySocialContribution=支付社会/财政税 -ConfirmPaySocialContribution=你确定想要归类社会或财政税为支付吗? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=删除社会或财政税款 -ConfirmDeleteSocialContribution=你确定要删除这个社会/财政税款吗? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=社会和财政税和付款 CalcModeVATDebt=模式 <b>%sVAT 关于承诺债务%s</b>. CalcModeVATEngagement=模式 <b>%s 增值税收入,支出 %s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- 它包括发票,费用,增值税和工资的实际付款 RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=它包括Sale日常报表中的所有信用额度。 +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=它包括在您的账目中记录具有“EXPENSE”或“INCOME”组的会计科目 RulesResultBookkeepingPredefined=它包括在您的账目中记录具有“EXPENSE”或“INCOME”组的会计科目 RulesResultBookkeepingPersonalized=它在您的分类帐中显示记录,其中会计帐户<b>按个性化组分组</b> @@ -183,6 +196,7 @@ VATReportByThirdParties=第三方销售税报告 VATReportByCustomers=客户销售税报告 VATReportByCustomersInInputOutputMode=每客户增值税征收和支付的报表 VATReportByQuartersInInputOutputMode=按收取和支付的税收的销售税率报告 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=按费率报税2 LT2ReportByQuarters=按费率报税3 LT1ReportByQuartersES=按RE税率报告 @@ -217,7 +231,7 @@ Pcg_subtype=PCG子类型 InvoiceLinesToDispatch=待分配的发票行 ByProductsAndServices=通过产品和服务 RefExt=外部编码 -ToCreateAPredefinedInvoice=要创建模板发票,请创建标准发票,然后在不验证的情况下单击按钮“%s”。 +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=链接到订单 Mode1=方法 1 Mode2=方法 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi ACCOUNTING_ACCOUNT_SUPPLIER=用于供应商合作方的会计帐户 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=复制下一个月 SimpleReport=简报 AddExtraReport=额外报告(添加国外和国家客户报告) @@ -253,7 +269,8 @@ AccountingAffectation=Accounting assignment LastDayTaxIsRelatedTo=税收的最后一天与税收有关 VATDue=销售税索赔 ClaimedForThisPeriod=声称为期间 -PaidDuringThisPeriod=在此期间支付 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=按销售税率计算 TurnoverbyVatrate=营业税按销售税率开具 TurnoverCollectedbyVatrate=按销售税率收取的营业额 @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/zh_CN/ecm.lang b/htdocs/langs/zh_CN/ecm.lang index d97e7b37f7c..5ac4ee9542f 100644 --- a/htdocs/langs/zh_CN/ecm.lang +++ b/htdocs/langs/zh_CN/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=文件尚未编入数据库(尝试重新上传) ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/zh_CN/errors.lang b/htdocs/langs/zh_CN/errors.lang index a7705c06513..0fbfa09aab9 100644 --- a/htdocs/langs/zh_CN/errors.lang +++ b/htdocs/langs/zh_CN/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=目录<b>%s</b>不存在(错误的道路,错误的参数saf ErrorFunctionNotAvailableInPHP=函数<b>%s</b>是需要此功能,但并不在此版本/ PHP设置的。 ErrorDirAlreadyExists=具有此名称的目录已经存在。 ErrorFileAlreadyExists=具有此名称的文件已经存在。 +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=文件未收到了完全由服务器。 ErrorNoTmpDir=临时的说明书%s不存在。 ErrorUploadBlockedByAddon=上传封锁一个PHP / Apache的插件。 @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/zh_CN/externalsite.lang b/htdocs/langs/zh_CN/externalsite.lang index 11107f670be..5ad169c8784 100644 --- a/htdocs/langs/zh_CN/externalsite.lang +++ b/htdocs/langs/zh_CN/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=设置链接到外部网站 -ExternalSiteURL=外部网站网址 +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=外部网站模块配置不正确。 ExampleMyMenuEntry=我的菜单选项 diff --git a/htdocs/langs/zh_CN/main.lang b/htdocs/langs/zh_CN/main.lang index 23a6b0f6baa..917bbfefb1c 100644 --- a/htdocs/langs/zh_CN/main.lang +++ b/htdocs/langs/zh_CN/main.lang @@ -278,6 +278,7 @@ DateModificationShort=变更日期 IPModification=Modification IP DateLastModification=最后修改日期 DateValidation=验证日期 +DateSigning=Signing date DateClosing=截止日期 DateDue=截止日期 DateValue=确认日期 @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=单价 PriceU=单价 PriceUHT=单价(不含税) -PriceUHTCurrency=单价(货币) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=单价(含税) Amount=金额 AmountInvoice=发票金额 @@ -389,6 +390,8 @@ AmountTotal=总金额 AmountAverage=平均金额 PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=百分比 Total=总计 SubTotal=小计 @@ -724,7 +727,7 @@ MenuMembers=会员 MenuAgendaGoogle=谷歌议程 MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=来自Dolibarr本身的大小限制(菜单:home-setup-security)为:%s Kb,而PHP的限制为: %s Kb -NoFileFound=这个目录没保存有文档 +NoFileFound=No documents uploaded CurrentUserLanguage=当前语言 CurrentTheme=当前主题样式 CurrentMenuManager=当前菜单管理器 @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=删除字符串'%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=直接下载链接(公共/外部) -DirectDownloadInternalLink=直接下载链接(需要登录且需要权限) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=下载 DownloadDocument=下载文件 ActualizeCurrency=更新货币汇率 @@ -1013,6 +1018,7 @@ SearchIntoContacts=联系人 SearchIntoMembers=会员 SearchIntoUsers=用户 SearchIntoProductsOrServices=产品或服务 +SearchIntoBatch=Lots / Serials SearchIntoProjects=项目 SearchIntoMO=Manufacturing Orders SearchIntoTasks=任务 @@ -1049,12 +1055,13 @@ KeyboardShortcut=快捷键 AssignedTo=分配给 Deletedraft=删除草稿 ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=文件通过链接共享 +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=库存 AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/zh_CN/margins.lang b/htdocs/langs/zh_CN/margins.lang index 29da0d1f5b6..3de77342399 100644 --- a/htdocs/langs/zh_CN/margins.lang +++ b/htdocs/langs/zh_CN/margins.lang @@ -15,30 +15,31 @@ margesSetup=盈利利润管理设置 MarginDetails=利润明细 ProductMargins=产品利润 CustomerMargins=客户利润 -SalesRepresentativeMargins=Sales representative margins +SalesRepresentativeMargins=销售代表利润率 +ContactOfInvoice=Contact of invoice UserMargins=用户利润 ProductService=产品或服务 AllProducts=全部产品和服务 ChooseProduct/Service=选择产品或服务 ForceBuyingPriceIfNull=如期尚未定义则强制设定买入/成本价格为销售价格 -ForceBuyingPriceIfNullDetails=如果未定义买入/成本价格, 这个选项 "ON", 显示为零 (即买入/成本价格 = 销售价格), 除些之外 ("OFF"), 显示建议的默认值. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=全局纯利润计算方法 UseDiscountAsProduct=作为产品 UseDiscountAsService=作为服务 UseDiscountOnTotal=在小计 -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 +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=定义全局折扣是被视为产品,服务还是仅作为保证金计算的小计。 +MARGIN_TYPE=默认情况下建议的购买/成本价格用于保证金计算 +MargeType1=最佳供应商价格的保证金 MargeType2=加权平均价差 (WAP) MargeType3=成本价格保证金 -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined<br>* 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 +MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card<br>* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined<br>* 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=成本价 UnitCharges=费用单位 Charges=费用 AgentContactType=商业代理联络类型 -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +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=税率必须为数字值 markRateShouldBeLesserThan100=Mark rate 将低于 100 ShowMarginInfos=显示利润信息 CheckMargins=利润明细 -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). +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). diff --git a/htdocs/langs/zh_CN/members.lang b/htdocs/langs/zh_CN/members.lang index 464a3eff1ce..b9dfc7beb43 100644 --- a/htdocs/langs/zh_CN/members.lang +++ b/htdocs/langs/zh_CN/members.lang @@ -21,10 +21,12 @@ MembersListToValid=准会员 (待验证)列表 MembersListValid=有效人员名录 MembersListUpToDate=List of valid members with up-to-date subscription MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=解雇会员列表 MembersListQualified=合格会员列表 MenuMembersToValidate=待定会员 MenuMembersValidated=认证会员 +MenuMembersExcluded=Excluded members MenuMembersResiliated=解雇会员 MembersWithSubscriptionToReceive=接受订阅会员 MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=订阅已过期 MemberStatusActiveLateShort=过期 MemberStatusPaid=认购最新 MemberStatusPaidShort=截至日期 +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=终止的成员 MemberStatusResiliatedShort=终止 MembersStatusToValid=待定会员 +MembersStatusExcluded=Excluded members MembersStatusResiliated=解雇会员 MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=批准 @@ -82,6 +87,8 @@ Physical=普通会员 Moral=荣誉会员 MorAndPhy=Moral and Physical Reenable=重新启用 +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=终止会员 ConfirmResiliateMember=您确定要终止此会员吗? DeleteMember=删除会员 @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=标签纸的格式 DescADHERENT_ETIQUETTE_TEXT=文本打印会员地址表 @@ -162,6 +170,7 @@ DocForLabels=生成地址表 SubscriptionPayment=认购款项 LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=按国别统计人员 MembersStatisticsByState=成员由州/省的统计信息 MembersStatisticsByTown=按村镇统计人员 diff --git a/htdocs/langs/zh_CN/modulebuilder.lang b/htdocs/langs/zh_CN/modulebuilder.lang index 520c9966786..d89035568f3 100644 --- a/htdocs/langs/zh_CN/modulebuilder.lang +++ b/htdocs/langs/zh_CN/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/zh_CN/orders.lang b/htdocs/langs/zh_CN/orders.lang index 5280f9748e6..16f4506f62f 100644 --- a/htdocs/langs/zh_CN/orders.lang +++ b/htdocs/langs/zh_CN/orders.lang @@ -16,6 +16,8 @@ ToOrder=订单填写 MakeOrder=订单填写 SupplierOrder=采购订单 SuppliersOrders=采购订单 +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=当前采购订单 CustomerOrder=Sales Order CustomersOrders=Sales Orders @@ -141,11 +143,12 @@ OrderByEMail=电子邮件 OrderByWWW=在线 OrderByPhone=电话 # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=一份简单的订购模式 PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=计费订单 +CreateInvoiceForThisSupplier=计费订单 NoOrdersToInvoice=没有订单账单 CloseProcessedOrdersAutomatically=归类所有“已处理”的订单。 OrderCreation=创建订单 diff --git a/htdocs/langs/zh_CN/other.lang b/htdocs/langs/zh_CN/other.lang index 8a671ff8156..4169d86762f 100644 --- a/htdocs/langs/zh_CN/other.lang +++ b/htdocs/langs/zh_CN/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=公司有多项活动(所有主要模块) CreatedBy=创建者 %s ModifiedBy=修改者 %s ValidatedBy=由%验证s +SignedBy=Signed by %s ClosedBy=由%闭s CreatedById=创建的用户ID号 ModifiedById=最近变更的用户ID号 @@ -244,6 +245,7 @@ NewKeyIs=你的新登陆码如上 NewKeyWillBe=你的新登陆码将会是 ClickHereToGoTo=点击这里 %s YouMustClickToChange=你要先点击下面的链接来验证密码改变 +ConfirmPasswordChange=Confirm password change ForgetIfNothing=如果不想改密码,直接忽略这个邮件,你的密码将保持原样。 IfAmountHigherThan=如果数额高于 <strong>%s</strong> SourcesRepository=源库 diff --git a/htdocs/langs/zh_CN/productbatch.lang b/htdocs/langs/zh_CN/productbatch.lang index fccb54d3730..76c192781be 100644 --- a/htdocs/langs/zh_CN/productbatch.lang +++ b/htdocs/langs/zh_CN/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=使用批号/序列号 -ProductStatusOnBatch=是 (必须使用批号/序列号) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=否 (不使用批号/序列号) -ProductStatusOnBatchShort=是 +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=否 Batch=批号/序列号 atleast1batchfield=保质期或销售日期或批号/序列号 @@ -16,9 +18,18 @@ printEatby=食用日期: %s printSellby=销售日期: %s printQty=数量: %d AddDispatchBatchLine=添加一个用于货架寿命调度 -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. +WhenProductBatchModuleOnOptionAreForced=当模块批/序列打开时,自动库存减少被强制为“减少运输验证时的实际库存”,并且自动增加模式被强制为“在手动调度到仓库时增加实际库存”并且无法编辑。可以根据需要定义其他选项。 ProductDoesNotUseBatchSerial=此产品不使用批号/序列号 -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 +ProductLotSetup=模块批次/序列的设置 +ShowCurrentStockOfLot=显示成对产品/批次的当前库存 +ShowLogOfMovementIfLot=显示成对产品/批次的动作日志 +StockDetailPerBatch=每批库存详细信息 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/zh_CN/products.lang b/htdocs/langs/zh_CN/products.lang index 71ff5981d18..e6f7f593ce6 100644 --- a/htdocs/langs/zh_CN/products.lang +++ b/htdocs/langs/zh_CN/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=预定产品/服务到销售 @@ -313,7 +314,7 @@ LastUpdated=最新更新 CorrectlyUpdated=当前更新 PropalMergePdfProductActualFile=文件添加到 PDF Azur are/is PropalMergePdfProductChooseFile=选择PDF文件 -IncludingProductWithTag=包括产品/服务标签 +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=默认价格,实际价格可能取决于客户 WarningSelectOneDocument=请至少选择一个文档 DefaultUnitToShow=单位 diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index 29454990c0b..d29983a9419 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=任务列表 GoToListOfTimeConsumed=转到消耗的时间列表 GanttView=甘特视图 +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/zh_CN/propal.lang b/htdocs/langs/zh_CN/propal.lang index 79d10f5e2ba..1937967bd03 100644 --- a/htdocs/langs/zh_CN/propal.lang +++ b/htdocs/langs/zh_CN/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=通过电邮发送报价单 DatePropal=报价日期 DateEndPropal=有效期截止至 ValidityDuration=有效时间 -CloseAs=设置状态 SetAcceptedRefused=设定接受/拒绝 ErrorPropalNotFound=未发现报价单 %s AddToDraftProposals=添加至报价草稿 @@ -60,6 +59,7 @@ ConfirmClonePropal=您确定要克隆商业提案<b> %s </b>吗? ConfirmReOpenProp=您确定要打开商业提案<b> %s </b>吗? ProposalsAndProposalsLines=报价单和报价项目 ProposalLine=报价项目 +ProposalLines=Proposal lines AvailabilityPeriod=交货延迟期 SetAvailability=设置交货延迟期 AfterOrder=下单后 @@ -85,7 +85,8 @@ ProposalCustomerSignature=书面接受,公司盖章,日期和签名 ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only -IdProposal=提案编号 -IdProduct=产品编号 -PrParentLine=提案父行 -LineBuyPriceHT=购买价格扣除税额 +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line + diff --git a/htdocs/langs/zh_CN/stocks.lang b/htdocs/langs/zh_CN/stocks.lang index 8f79f6ef131..979d0a66d28 100644 --- a/htdocs/langs/zh_CN/stocks.lang +++ b/htdocs/langs/zh_CN/stocks.lang @@ -19,8 +19,8 @@ Stock=库存 Stocks=库存 MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=按库存批号/序列号 LotSerial=批号/序列号 LotSerialList=批号/序列号列表 @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=位置 -LocationSummary=位置简称 -NumberOfDifferentProducts=不同的产品数 +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=产品总数 LastMovement=最新移库 LastMovements=最新移库 @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=仓库价值 UserWarehouseAutoCreate=创建用户时自动创建用户仓库 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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=虚拟库存 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date IdWarehouse=编号仓库 DescWareHouse=说明仓库 LieuWareHouse=本地化仓库 WarehousesAndProducts=仓库和产品 WarehousesAndProductsBatchDetail=仓库和产品(各批号/序列号详情) AverageUnitPricePMPShort=加权平均价格 -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=销售单价 EstimatedStockValueSellShort=销量 EstimatedStockValueSell=销量 @@ -145,7 +147,7 @@ Replenishments=补充资金 NbOfProductBeforePeriod=产品数量%s选定期前库存(<%s) NbOfProductAfterPeriod=选定期限后产品数量%s(> %s) MassMovement=批量库存调拨 -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". +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 on "%s". RecordMovement=记录转移 ReceivingForSameOrder=此订单的收据 StockMovementRecorded=库存调拨已记录 @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=调拨标签 -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=行动日期 InventoryCode=调拨或盘点编码 IsInPackage=包含在模块包 @@ -183,6 +185,7 @@ inventoryCreatePermission=创建新库存 inventoryReadPermission=查看库存 inventoryWritePermission=更新库存 inventoryValidatePermission=验证库存 +inventoryDeletePermission=Delete inventory inventoryTitle=库存 inventoryListTitle=存货 inventoryListEmpty=没有库存正在进行中 @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=重新打开 +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/zh_CN/suppliers.lang b/htdocs/langs/zh_CN/suppliers.lang index 0c96e366e26..b53b51c3e06 100644 --- a/htdocs/langs/zh_CN/suppliers.lang +++ b/htdocs/langs/zh_CN/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=供应商 SuppliersInvoice=供应商发票 +SupplierInvoices=供应商发票 ShowSupplierInvoice=显示供应商发票 NewSupplier=新供应商 History=历史 diff --git a/htdocs/langs/zh_CN/ticket.lang b/htdocs/langs/zh_CN/ticket.lang index 4cd03733e48..9546af9bd17 100644 --- a/htdocs/langs/zh_CN/ticket.lang +++ b/htdocs/langs/zh_CN/ticket.lang @@ -70,6 +70,8 @@ Deleted=删除 # Dict Type=类型 Severity=严重 +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=从票证消息发送电子邮件 @@ -114,8 +116,8 @@ TicketsShowModuleLogo=在公共界面中显示模块的徽标 TicketsShowModuleLogoHelp=启用此选项可在公共界面的页面中隐藏徽标模块 TicketsShowCompanyLogo=在公共界面中显示公司的徽标 TicketsShowCompanyLogoHelp=启用此选项可在公共界面的页面中隐藏主公司的徽标 -TicketsEmailAlsoSendToMainAddress=同时向主电子邮件地址发送通知 -TicketsEmailAlsoSendToMainAddressHelp=启用此选项可向“通知电子邮件地址”发送电子邮件(请参阅下面的设置) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=仅显示分配给当前用户的票证。不适用于具有票证管理权限的用户。 TicketsActivatePublicInterface=激活公共接口 @@ -126,10 +128,10 @@ TicketNumberingModules=票据编号模块 TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=最新修改的票据 BoxLastModifiedTicketDescription=最新%s改装票据 BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=没有最近修改的票据 +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/zh_CN/users.lang b/htdocs/langs/zh_CN/users.lang index a1b638ec1dd..eac36116632 100644 --- a/htdocs/langs/zh_CN/users.lang +++ b/htdocs/langs/zh_CN/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=从组中删除 PasswordChangedAndSentTo=密码更改,发送到<b>%s。</b> PasswordChangeRequest=请求更改<b> %s </b>的密码 PasswordChangeRequestSent=要求更改密码<b>的S%</b>发送到<b>%s。</b> +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=确认密码重置 MenuUsersAndGroups=用户和组 LastGroupsCreated=最新创建的%s组 @@ -70,9 +72,10 @@ ExportDataset_user_1=用户及属性 DomainUser=域用户%s Reactivate=重新激活 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=因为从权限授予一个用户的一组继承。 Inherited=遗传 +UserWillBe=Created user will be UserWillBeInternalUser=创建的用户将是一个内部用户(因为没有联系到一个特定的合伙人) UserWillBeExternalUser=创建的用户将是外部用户(因为链接到一个特定的合伙人) IdPhoneCaller=手机来电者身份 @@ -109,8 +112,10 @@ UserAccountancyCode=用户科目代码 UserLogoff=用户注销 UserLogged=用户登录 DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/zh_CN/website.lang b/htdocs/langs/zh_CN/website.lang index 2b160b7e674..30e49125fe1 100644 --- a/htdocs/langs/zh_CN/website.lang +++ b/htdocs/langs/zh_CN/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=还要检查虚拟主机是否有权限<strong> %s </strong>将文件转换为<br> <strong> %s </strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=阅读 WritePerm=写 TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>在新标签页中预览%s。</u> <br> <br> %s将由外部Web服务器(如Apache,Nginx,IIS)提供服务。您必须先安装并设置此服务器才能指向目录:<br> <strong> %s </strong> <br>外部服务器提供的URL:<br> <strong> %s </strong> -PreviewSiteServedByDolibarr=<u>在新选项卡中预览%s。</u> <br> <br> %s将由Dolibarr服务器提供服务,因此不需要安装任何额外的Web服务器(如Apache,Nginx,IIS)。 <br>不方便的是,页面的URL不是用户友好的,并且以Dolibarr的路径开头。<br> Dolibarr提供的URL:<br> <strong> %s </strong> <br> <br>使用您自己的外部Web服务器为此Web站点提供服务,在Web服务器上创建指向目录的虚拟主机<br> <strong> %s </strong> <br>然后输入此虚拟服务器的名称并单击其他预览按钮。 +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=未定义外部Web服务器所服务的虚拟主机的URL NoPageYet=还没有页面 YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/zh_CN/zapier.lang b/htdocs/langs/zh_CN/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/zh_CN/zapier.lang +++ b/htdocs/langs/zh_CN/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/zh_HK/accountancy.lang b/htdocs/langs/zh_HK/accountancy.lang index 9e084932477..786f0194010 100644 --- a/htdocs/langs/zh_HK/accountancy.lang +++ b/htdocs/langs/zh_HK/accountancy.lang @@ -131,7 +131,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account -TotalForAccount=Total for accounting account +TotalForAccount=Total accounting account Ventilate=Bind @@ -209,7 +209,7 @@ Codejournal=Journal JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction -AccountingCategory=Personalized groups +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=You can define here some groups of accounting account. They will be used for personalized accounting reports. @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=Lines not yet bound, use menu <a href="%s">%s</a> to ## Import ImportAccountingEntries=Accounting entries +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + 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 + +NAccounts=%s accounts diff --git a/htdocs/langs/zh_HK/admin.lang b/htdocs/langs/zh_HK/admin.lang index f9a6468d94a..8f4508ada53 100644 --- a/htdocs/langs/zh_HK/admin.lang +++ b/htdocs/langs/zh_HK/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=Remove connection lock YourSession=Your session Sessions=Users Sessions WebUserGroup=Web server user/group +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=Permissions on files in web root directory PermissionsOnFile=Permissions on file %s NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (<b>%s</b>) may be protected (for example by OS permissions or by PHP directive open_basedir). @@ -62,6 +63,7 @@ IfModuleEnabled=Note: yes is effective only if module <b>%s</b> is enabled RemoveLock=Remove/rename file <b>%s</b> if it exists, to allow usage of the Update/Install tool. RestoreLock=Restore file <b>%s</b>, with read permission only, to disable any further use of the Update/Install tool. SecuritySetup=Security setup +PHPSetup=PHP 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 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to Purge=Purge PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in <b>%s</b> 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 <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=Delete log and temporary files PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: <b>%s</b>.<br>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 @@ -232,6 +234,7 @@ BoxesAvailable=Widgets available BoxesActivated=Widgets activated ActivateOn=Activate on ActiveOn=Activated on +ActivatableOn=Activatable on SourceFile=Source file AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled Required=Required @@ -347,9 +350,10 @@ 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:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> 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. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> -GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> 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.<br><b>{tttt}</b> 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.<br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>Example on the 99th %s of the third party TheCompany, with date 2007-01-31:</u><br> GenericMaskCodes4b=<u>Example on third party created on 2007-03-01:</u><br> GenericMaskCodes4c=<u>Example on product created on 2007-03-01:</u><br> @@ -444,8 +448,8 @@ 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')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>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 @@ -541,6 +545,8 @@ Module40Name=Vendors 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. +Module43Name=Debug Bar +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=Editors Module49Desc=Editor management Module50Name=Products @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind conversions capabilities Module3200Name=Unalterable Archives Module3200Desc=Enable an unalterable log of business events. Events are archived in real-time. The log is a read-only table of chained events that can be exported. This module may be mandatory for some countries. +Module3400Name=Social Networks +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=HRM Module4000Desc=Human resources management (management of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies -Module6000Name=Workflow -Module6000Desc=Workflow management (automatic creation of object and/or automatic status change) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=Websites 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. Module20000Name=Leave Request Management @@ -805,7 +813,8 @@ PermissionAdvanced253=Create/modify internal/external users and permissions Permission254=Create/modify external users only Permission255=Modify other users password Permission256=Delete or disable other users -Permission262=Extend access to all third parties (not only third parties for which that user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=Read CA Permission272=Read invoices Permission273=Issue invoices @@ -1175,7 +1184,8 @@ SetupDescription2=The following two sections are mandatory (the two first entrie SetupDescription3=<a href="%s">%s -> %s</a><br><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features). SetupDescription4=<a href="%s">%s -> %s</a><br><br>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. SetupDescription5=Other Setup menu entries manage optional parameters. -LogEvents=Security audit events +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=Audit InfoDolibarr=About Dolibarr InfoBrowser=About Browser @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user <b>%s</b> or you must add -W option at end of command line to provide <b>%s</b> password. YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download -SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is sequential with no reset +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=Show professional id with addresses ShowVATIntaInAddress=Hide intra-Community VAT number with addresses TranslationUncomplete=Partial translation @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=Proxy server: Name/Address MAIN_PROXY_PORT=Proxy server: Port MAIN_PROXY_USER=Proxy server: Login/User MAIN_PROXY_PASS=Proxy server: Password -DefineHereComplementaryAttributes=Define here any additional/custom attributes that you want to be included for: %s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=Complementary attributes ExtraFieldsLines=Complementary attributes (lines) ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=Login (unix) LDAPFieldLoginExample=Example: uid LDAPFilterConnection=Search filter LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=Login (samba, activedirectory) LDAPFieldLoginSambaExample=Example: samaccountname LDAPFieldFullname=Full name @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se AccountancyCode=Accounting Code AccountancyCodeSell=Sale account. code AccountancyCodeBuy=Purchase account. code +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=Events and agenda module setup PasswordTogetVCalExport=Key to authorize export link +SecurityKey = Security Key PastDelayVCalExport=Do not export event older than AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> Type of agenda events) AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) NbAddedAutomatically=Number of days added to counters of users (automatically) each month -EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. 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 @@ -1966,7 +1979,7 @@ 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') +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=Several language variants found RemoveSpecialChars=Remove special characters COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter to clean value (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1982,7 +1995,7 @@ SocialNetworkSetup=Setup of module Social Networks EnableFeatureFor=Enable features for <strong>%s</strong> VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to <strong>Off</strong> in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales. SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents -FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=Email collector EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads). NewEmailCollector=New Email Collector @@ -2049,8 +2062,11 @@ 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 +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export ImportSetup=Setup of module Import @@ -2074,6 +2090,8 @@ MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled EmailTemplate=Template for email EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label 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 @@ -2089,9 +2107,18 @@ SwitchThisForABetterSecurity=Switching this value to %s is recommended for more DictionaryProductNature= Nature of product CountryIfSpecificToOneCountry=Country (if specific to a given country) YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. CombinationsSeparator=Separator character for product combinations SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. AskThisIDToYourBank=Contact your bank to get this ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/zh_HK/banks.lang b/htdocs/langs/zh_HK/banks.lang index 81a23238550..8e2d828c12a 100644 --- a/htdocs/langs/zh_HK/banks.lang +++ b/htdocs/langs/zh_HK/banks.lang @@ -174,10 +174,11 @@ 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 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation CashControl=POS cash desk control -NewCashFence=New cash desk closing +NewCashFence=New cash desk opening or closing 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 IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. NoBankAccountDefined=No bank account defined +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/zh_HK/bills.lang b/htdocs/langs/zh_HK/bills.lang index d5d418affc6..c0eb886a987 100644 --- a/htdocs/langs/zh_HK/bills.lang +++ b/htdocs/langs/zh_HK/bills.lang @@ -52,11 +52,12 @@ Invoices=Invoices InvoiceLine=Invoice line InvoiceCustomer=Customer invoice CustomerInvoice=Customer invoice -CustomersInvoices=Customers invoices +CustomersInvoices=Customer invoices SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Vendor invoices +SupplierInvoiceLines=Vendor invoice lines SupplierBill=Vendor invoice -SupplierBills=suppliers invoices +SupplierBills=Vendor invoices Payment=Payment PaymentBack=Refund CustomerInvoicePaymentBack=Refund @@ -81,6 +82,8 @@ PaymentsAlreadyDone=Payments already done PaymentsBackAlreadyDone=Refunds already done PaymentRule=Payment rule PaymentMode=Payment Type +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=Debit/Credit Card PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -373,6 +376,7 @@ DateLastGeneration=Date of latest generation DateLastGenerationShort=Date latest gen. MaxPeriodNumber=Max. number of invoice generation NbOfGenerationDone=Number of invoice generation already done +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=Number of generation done MaxGenerationReached=Maximum number of generations reached InvoiceAutoValidate=Validate invoices automatically @@ -413,7 +417,7 @@ 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' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Variable amount (%% tot.) - all lines from origin # PaymentType PaymentTypeVIR=Bank transfer PaymentTypeShortVIR=Bank transfer @@ -494,12 +498,16 @@ 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 +CantRemovePaymentVATPaid=Can't remove payment since VAT declaration is classified paid +CantRemovePaymentSalaryPaid=Can't remove payment since salary is 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. +ClosePaidVATAutomatically=Classify automatically VAT declaration as "Paid" when payment is done entirely. +ClosePaidSalaryAutomatically=Classify automatically salary 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 @@ -512,10 +520,10 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) PDFSpongeDescription=Invoice PDF template Sponge. A complete invoice template PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices -TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard 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 -MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment 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 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. -CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### @@ -531,6 +539,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The <b>situation invoices</b> are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. InvoiceSituation=Situation invoice +PDFInvoiceSituation=Situation invoice InvoiceSituationAsk=Invoice following the situation InvoiceSituationDesc=Create a new situation following an already existing one SituationAmount=Situation invoice amount(net) @@ -561,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=If you need to have such invoices generated au DeleteRepeatableInvoice=Delete template invoice ConfirmDeleteRepeatableInvoice=Are your sure you want to delete the template invoice? CreateOneBillByThird=Create one invoice per third party (otherwise, one invoice per order) -BillCreated=%s bill(s) created +BillCreated=%s invoice(s) generated +BillXCreated=Invoice %s generated StatusOfGeneratedDocuments=Status of document generation DoNotGenerateDoc=Do not generate document file AutogenerateDoc=Auto generate document file @@ -575,3 +585,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount CustomersInvoicesArea=Customer billing area SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent +SituationTotalRayToRest=Remainder to pay without taxe +PDFSituationTitle=Situation n° %d +SituationTotalProgress=Total progress %d %% diff --git a/htdocs/langs/zh_HK/boxes.lang b/htdocs/langs/zh_HK/boxes.lang index 9a751483fb1..4d7ee938c91 100644 --- a/htdocs/langs/zh_HK/boxes.lang +++ b/htdocs/langs/zh_HK/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=Statistics on main business objects in database BoxLoginInformation=Login Information BoxLastRssInfos=RSS Information BoxLastProducts=Latest %s Products/Services @@ -17,9 +18,13 @@ BoxLastActions=Latest actions BoxLastContracts=Latest contracts BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages -AccountancyHome=Accountancy +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=Validated projects diff --git a/htdocs/langs/zh_HK/categories.lang b/htdocs/langs/zh_HK/categories.lang index 4ddf0d6093f..9520ef65a83 100644 --- a/htdocs/langs/zh_HK/categories.lang +++ b/htdocs/langs/zh_HK/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=Vendors tags/categories area CustomersCategoriesArea=Customers tags/categories area MembersCategoriesArea=Members tags/categories area ContactsCategoriesArea=Contacts tags/categories area -AccountsCategoriesArea=Accounts tags/categories area +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories @@ -93,7 +93,7 @@ AddSupplierIntoCategory=Assign category to supplier ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/zh_HK/companies.lang b/htdocs/langs/zh_HK/companies.lang index 8dc815b522e..154400c6536 100644 --- a/htdocs/langs/zh_HK/companies.lang +++ b/htdocs/langs/zh_HK/companies.lang @@ -43,9 +43,10 @@ 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 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=Registered office Lastname=Last name @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (Social security number) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=EORI number +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=EORI number +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2 (Social security number) ProfId3PT=Prof Id 3 (Commercial Record number) ProfId4PT=Prof Id 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=EORI number +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -441,7 +449,7 @@ CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Max. for outstanding bill reached OrderMinAmount=Minimum amount for order -MonkeyNumRefModelDesc=Return a number with the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=The code is free. This code can be modified at any time. ManagingDirectors=Manager(s) name (CEO, director, president...) MergeOriginThirdparty=Duplicate third party (third party you want to delete) diff --git a/htdocs/langs/zh_HK/compta.lang b/htdocs/langs/zh_HK/compta.lang index 1afeb6e3727..926cda53c9f 100644 --- a/htdocs/langs/zh_HK/compta.lang +++ b/htdocs/langs/zh_HK/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST purchases VATCollected=VAT collected StatusToPay=To pay SpecialExpensesArea=Area for all special payments +VATExpensesArea=Area for all TVA payments SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes @@ -85,6 +86,7 @@ PaymentCustomerInvoice=Customer invoice payment PaymentSupplierInvoice=vendor invoice payment PaymentSocialContribution=Social/fiscal tax payment PaymentVat=VAT payment +AutomaticCreationPayment=Automatically record the payment ListPayment=List of payments ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of vendor payments @@ -104,6 +106,8 @@ LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments VATPayment=Sales tax payment VATPayments=Sales tax payments +VATDeclarations=VAT declarations +VATDeclaration=VAT declaration VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment @@ -134,9 +138,17 @@ 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? +PayVAT=Pay a VAT declaration +PaySalary=Pay a salary card +ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid ? +ConfirmPayVAT=Are you sure you want to classify this VAT declaration as paid ? +ConfirmPaySalary=Are you sure you want to classify this salary card as paid? DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? +DeleteVAT=Delete a VAT declaration +DeleteSalary=Delete a salary card +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=Social and fiscal taxes and payments CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>. CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>. @@ -163,6 +175,7 @@ RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT RulesCADue=- It includes the customer's due invoices whether they are paid or not. <br>- It is based on the billing date of these invoices.<br> RulesCAIn=- It includes all the effective payments of invoices received from customers.<br>- It is based on the payment date of these invoices<br> RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME 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 <b>grouped by personalized groups</b> @@ -183,6 +196,7 @@ 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 +VATReportShowByRateDetails=Show details of this rate LT1ReportByQuarters=Report tax 2 by rate LT2ReportByQuarters=Report tax 3 by rate LT1ReportByQuartersES=Report by RE rate @@ -217,7 +231,7 @@ Pcg_subtype=Pcg subtype InvoiceLinesToDispatch=Invoice lines to dispatch ByProductsAndServices=By product and service RefExt=External ref -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=Link to order Mode1=Method 1 Mode2=Method 2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on thi 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 +ConfirmCloneVAT=Confirm the clone of a VAT declaration +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=Clone it for next month SimpleReport=Simple report AddExtraReport=Extra reports (add foreign and national customer report) @@ -253,7 +269,8 @@ 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 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=By sale tax rate TurnoverbyVatrate=Turnover invoiced by sale tax rate TurnoverCollectedbyVatrate=Turnover collected by sale tax rate @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=Purchase turnover collected RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not. <br>- It is based on the invoice date of these invoices.<br> RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.<br>- It is based on the payment date of these invoices<br> RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected IncludeVarpaysInResults = Include various payments in reports diff --git a/htdocs/langs/zh_HK/ecm.lang b/htdocs/langs/zh_HK/ecm.lang index 71df60734fb..c4ea8018111 100644 --- a/htdocs/langs/zh_HK/ecm.lang +++ b/htdocs/langs/zh_HK/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM Setup +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/zh_HK/errors.lang b/htdocs/langs/zh_HK/errors.lang index 5b26be724d9..e71c805d506 100644 --- a/htdocs/langs/zh_HK/errors.lang +++ b/htdocs/langs/zh_HK/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=Directory <b>%s</b> not found (Bad path, wrong permissions or a ErrorFunctionNotAvailableInPHP=Function <b>%s</b> is required for this feature but is not available in this version/setup of PHP. ErrorDirAlreadyExists=A directory with this name already exists. ErrorFileAlreadyExists=A file with this name already exists. +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=File not received completely by server. ErrorNoTmpDir=Temporary directy %s does not exists. ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin. @@ -226,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or 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. @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=Public interface was not enabled ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/zh_HK/externalsite.lang b/htdocs/langs/zh_HK/externalsite.lang index da4853df0df..452100c65b3 100644 --- a/htdocs/langs/zh_HK/externalsite.lang +++ b/htdocs/langs/zh_HK/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/zh_HK/main.lang b/htdocs/langs/zh_HK/main.lang index f8ba6f4073c..dc2a83f2015 100644 --- a/htdocs/langs/zh_HK/main.lang +++ b/htdocs/langs/zh_HK/main.lang @@ -278,6 +278,7 @@ DateModificationShort=Modif. date IPModification=Modification IP DateLastModification=Latest modification date DateValidation=Validation date +DateSigning=Signing date DateClosing=Closing date DateDue=Due date DateValue=Value date @@ -361,7 +362,7 @@ UnitPriceHTCurrency=Unit price (excl.) (currency) UnitPriceTTC=Unit price PriceU=U.P. PriceUHT=U.P. (net) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount @@ -389,6 +390,8 @@ AmountTotal=Total amount AmountAverage=Average amount PriceQtyMinHT=Price quantity min. (excl. tax) PriceQtyMinHTCurrency=Price quantity min. (excl. tax) (currency) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=Percentage Total=Total SubTotal=Subtotal @@ -724,7 +727,7 @@ 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 +NoFileFound=No documents uploaded CurrentUserLanguage=Current language CurrentTheme=Current theme CurrentMenuManager=Current menu manager @@ -899,8 +902,10 @@ ViewAccountList=View ledger ViewSubAccountList=View subaccount ledger RemoveString=Remove string '%s' SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at <a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a> to add your improvements. -DirectDownloadLink=Direct download link (public/external) -DirectDownloadInternalLink=Direct download link (need to be logged and need permissions) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=Download DownloadDocument=Download document ActualizeCurrency=Update currency rate @@ -1013,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1049,12 +1055,13 @@ KeyboardShortcut=Keyboard shortcut AssignedTo=Assigned to Deletedraft=Delete draft ConfirmMassDraftDeletion=Draft mass delete confirmation -FileSharedViaALink=File shared via a link +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=Select a third party first... YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note @@ -1120,3 +1127,5 @@ AffectTag=Affect Tag ConfirmAffectTag=Bulk Tag Affect ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? CategTypeNotFound=No tag type found for type of records +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/zh_HK/margins.lang b/htdocs/langs/zh_HK/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/zh_HK/margins.lang +++ b/htdocs/langs/zh_HK/margins.lang @@ -22,7 +22,7 @@ ProductService=Product or Service 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. +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts UseDiscountAsProduct=As a product UseDiscountAsService=As a service diff --git a/htdocs/langs/zh_HK/members.lang b/htdocs/langs/zh_HK/members.lang index 5812248b129..44b583a0041 100644 --- a/htdocs/langs/zh_HK/members.lang +++ b/htdocs/langs/zh_HK/members.lang @@ -21,10 +21,12 @@ 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 out-of-date subscription +MembersListExcluded=List of excluded members MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members +MenuMembersExcluded=Excluded members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -47,9 +49,12 @@ MemberStatusActiveLate=Subscription expired MemberStatusActiveLateShort=Expired MemberStatusPaid=Subscription up to date MemberStatusPaidShort=Up to date +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members +MembersStatusExcluded=Excluded members MembersStatusResiliated=Terminated members MemberStatusNoSubscription=Validated (no subscription needed) MemberStatusNoSubscriptionShort=Validated @@ -82,6 +87,8 @@ Physical=Physical Moral=Moral MorAndPhy=Moral and Physical Reenable=Reenable +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? DeleteMember=Delete a member @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send emai 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_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=Sender Email for automatic emails DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets @@ -162,6 +170,7 @@ DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment LastSubscriptionDate=Date of latest subscription payment LastSubscriptionAmount=Amount of latest subscription +LastMemberType=Last Member type MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town diff --git a/htdocs/langs/zh_HK/modulebuilder.lang b/htdocs/langs/zh_HK/modulebuilder.lang index 845dd12624d..19afb9d95ab 100644 --- a/htdocs/langs/zh_HK/modulebuilder.lang +++ b/htdocs/langs/zh_HK/modulebuilder.lang @@ -133,7 +133,9 @@ 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 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/zh_HK/orders.lang b/htdocs/langs/zh_HK/orders.lang index ad91e1eef63..87d196eb22f 100644 --- a/htdocs/langs/zh_HK/orders.lang +++ b/htdocs/langs/zh_HK/orders.lang @@ -16,6 +16,8 @@ ToOrder=Make order MakeOrder=Make order SupplierOrder=Purchase order SuppliersOrders=Purchase orders +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=Current purchase orders CustomerOrder=Sales Order CustomersOrders=Sales Orders diff --git a/htdocs/langs/zh_HK/other.lang b/htdocs/langs/zh_HK/other.lang index 7a895bb1ca5..0e76e493b5a 100644 --- a/htdocs/langs/zh_HK/other.lang +++ b/htdocs/langs/zh_HK/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=Company with multiple activities (all main modules) CreatedBy=Created by %s ModifiedBy=Modified by %s ValidatedBy=Validated by %s +SignedBy=Signed by %s ClosedBy=Closed by %s CreatedById=User id who created ModifiedById=User id who made latest change @@ -244,6 +245,7 @@ NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s YouMustClickToChange=You must however first click on the following link to validate this password change +ConfirmPasswordChange=Confirm password change ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. IfAmountHigherThan=If amount higher than <strong>%s</strong> SourcesRepository=Repository for sources diff --git a/htdocs/langs/zh_HK/productbatch.lang b/htdocs/langs/zh_HK/productbatch.lang index 54270c4a23b..4414b6ad8d8 100644 --- a/htdocs/langs/zh_HK/productbatch.lang +++ b/htdocs/langs/zh_HK/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=No (lot/serial not used) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=Lot/Serial atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number @@ -22,3 +24,12 @@ 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 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/zh_HK/products.lang b/htdocs/langs/zh_HK/products.lang index 9ecc11ed93d..28853762424 100644 --- a/htdocs/langs/zh_HK/products.lang +++ b/htdocs/langs/zh_HK/products.lang @@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product) DiscountQtyMin=Discount for this qty. NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product +PredefinedItem=Predefined item PredefinedProductsToSell=Predefined Product PredefinedServicesToSell=Predefined Service PredefinedProductsAndServicesToSell=Predefined products/services to sell @@ -313,7 +314,7 @@ LastUpdated=Latest update CorrectlyUpdated=Correctly updated PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductChooseFile=Select PDF files -IncludingProductWithTag=Including product/service with tag +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer WarningSelectOneDocument=Please select at least one document DefaultUnitToShow=Unit diff --git a/htdocs/langs/zh_HK/projects.lang b/htdocs/langs/zh_HK/projects.lang index 05aa1f5a560..d14e52d14e8 100644 --- a/htdocs/langs/zh_HK/projects.lang +++ b/htdocs/langs/zh_HK/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project ListInvoicesAssociatedProject=List of customer invoices related to the project @@ -268,3 +269,7 @@ OneLinePerTask=One line per task OneLinePerPeriod=One line per period RefTaskParent=Ref. Parent Task ProfitIsCalculatedWith=Profit is calculated using +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/zh_HK/propal.lang b/htdocs/langs/zh_HK/propal.lang index 273996ab1b1..edbc08236d3 100644 --- a/htdocs/langs/zh_HK/propal.lang +++ b/htdocs/langs/zh_HK/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 @@ -60,6 +59,7 @@ ConfirmClonePropal=Are you sure you want to clone the commercial proposal <b>%s< ConfirmReOpenProp=Are you sure you want to open back the commercial proposal <b>%s</b>? ProposalsAndProposalsLines=Commercial proposal and lines ProposalLine=Proposal line +ProposalLines=Proposal lines AvailabilityPeriod=Availability delay SetAvailability=Set availability delay AfterOrder=after order @@ -85,3 +85,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/zh_HK/stocks.lang b/htdocs/langs/zh_HK/stocks.lang index a1f55010139..9a14fb38eb1 100644 --- a/htdocs/langs/zh_HK/stocks.lang +++ b/htdocs/langs/zh_HK/stocks.lang @@ -19,8 +19,8 @@ Stock=Stock Stocks=Stocks MissingStocks=Missing stocks StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -37,8 +37,8 @@ AllWarehouses=All warehouses IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=Total number of products LastMovement=Latest movement LastMovements=Latest movements @@ -62,7 +62,8 @@ 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 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=Set a warehouse on Commercial proposals WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -97,15 +98,16 @@ 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 VirtualStockAtDate=Virtual stock at date -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=At date 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 price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -145,7 +147,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 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". +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 on "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order (check is done on current real stock when adding a line into order whatever the rule for automatic stock change) StockMustBeEnoughForShipment= Stock level must be enough to add product/service to shipment (check is done on current real stock when adding a line into shipment whatever the rule for automatic stock change) MovementLabel=Label of movement -TypeMovement=Type of movement +TypeMovement=Direction of movement DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package @@ -183,6 +185,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory +inventoryDeletePermission=Delete inventory inventoryTitle=Inventory inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to us 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 +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=Current stock InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged -UpdateByScaning=Update by scaning +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=Update by scan (product barcode) UpdateByScaningLot=Update by scan (lot|serial barcode) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=Import CSV list of movement +ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... +SelectAStockMovementFileToImport=select a stock movement file to import +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=Inventory %s +ReOpen=Reopen +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/zh_HK/suppliers.lang b/htdocs/langs/zh_HK/suppliers.lang index 03b03c75269..ca9ee174d29 100644 --- a/htdocs/langs/zh_HK/suppliers.lang +++ b/htdocs/langs/zh_HK/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice +SupplierInvoices=Vendor invoices ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=History diff --git a/htdocs/langs/zh_HK/ticket.lang b/htdocs/langs/zh_HK/ticket.lang index 982fff90ffa..df73daf4a0d 100644 --- a/htdocs/langs/zh_HK/ticket.lang +++ b/htdocs/langs/zh_HK/ticket.lang @@ -70,6 +70,8 @@ Deleted=Deleted # Dict Type=Type Severity=Severity +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=To send email from ticket message @@ -114,8 +116,8 @@ TicketsShowModuleLogo=Display the logo of the module in the public interface TicketsShowModuleLogoHelp=Enable this option to hide the logo module in the pages of the public interface TicketsShowCompanyLogo=Display the logo of the company in the public interface TicketsShowCompanyLogoHelp=Enable this option to hide the logo of the main company in the pages of the public interface -TicketsEmailAlsoSendToMainAddress=Also send notification to main email address -TicketsEmailAlsoSendToMainAddressHelp=Enable this option to send an email to "Notification email from" address (see setup below) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=Restrict the display to tickets assigned to the current user (not effective for external users, always be limited to the third party they depend on) TicketsLimitViewAssignedOnlyHelp=Only tickets assigned to the current user will be visible. Does not apply to a user with tickets management rights. TicketsActivatePublicInterface=Activate public interface @@ -126,10 +128,10 @@ TicketNumberingModules=Tickets numbering module TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Notify third party at creation TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket 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. +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=Latest modified tickets BoxLastModifiedTicketDescription=Latest %s modified tickets BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/zh_HK/users.lang b/htdocs/langs/zh_HK/users.lang index 25d9205457b..bbfa16450b0 100644 --- a/htdocs/langs/zh_HK/users.lang +++ b/htdocs/langs/zh_HK/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to <b>%s</b>. PasswordChangeRequest=Request to change password for <b>%s</b> PasswordChangeRequestSent=Request to change password for <b>%s</b> sent to <b>%s</b>. +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 @@ -70,9 +72,10 @@ ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate 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 <b>internal</b> user is a user that is part of your company/organization.<br>An <b>external</b> 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).<br><br>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=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited +UserWillBe=Created user will be UserWillBeInternalUser=Created user will be an internal user (because not linked to a particular third party) UserWillBeExternalUser=Created user will be an external user (because linked to a particular third party) IdPhoneCaller=Id phone caller @@ -109,8 +112,10 @@ UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged DateOfEmployment=Employment date -DateEmployment=Employment Start 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 diff --git a/htdocs/langs/zh_HK/website.lang b/htdocs/langs/zh_HK/website.lang index f17def114b8..7d624915ef0 100644 --- a/htdocs/langs/zh_HK/website.lang +++ b/htdocs/langs/zh_HK/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong> YouCanAlsoDeployToAnotherWHP=<u>Run your web site with another Dolibarr Hosting provider</u><br>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 <a href="https://saas.dolibarr.org" target="_blank">https://saas.dolibarr.org</a> -CheckVirtualHostPerms=Check also that virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=<u>Preview %s in a new tab.</u><br><br>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:<br><strong>%s</strong><br>URL served by external server:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that point on directory<br><strong>%s</strong><br>then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template @@ -137,3 +137,11 @@ PagesRegenerated=%s page(s)/container(s) regenerated RegenerateWebsiteContent=Regenerate web site cache files AllowedInFrames=Allowed in Frames DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/zh_HK/zapier.lang b/htdocs/langs/zh_HK/zapier.lang index bbad7895588..b4cc4ccba4a 100644 --- a/htdocs/langs/zh_HK/zapier.lang +++ b/htdocs/langs/zh_HK/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier for Dolibarr module - -# -# Admin page -# -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup=Setup of Zapier for Dolibarr ZapierDescription=Interface with Zapier +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/langs/zh_TW/accountancy.lang b/htdocs/langs/zh_TW/accountancy.lang index 3b4947efd9a..dea0a0036fa 100644 --- a/htdocs/langs/zh_TW/accountancy.lang +++ b/htdocs/langs/zh_TW/accountancy.lang @@ -16,18 +16,18 @@ ThisService=此服務 ThisProduct=此產品 DefaultForService=服務的預設 DefaultForProduct=產品的預設 -ProductForThisThirdparty=Product for this thirdparty -ServiceForThisThirdparty=Service for this thirdparty +ProductForThisThirdparty=此合作方的產品 +ServiceForThisThirdparty=此合作方的服務 CantSuggest=無法建議 AccountancySetupDoneFromAccountancyMenu=從%s選單的大部分會計設定已完成 -ConfigAccountingExpert=Configuration of the module accounting (double entry) +ConfigAccountingExpert=記帳模組的組態(重複輸入) Journalization=註冊到日記帳 Journals=日記帳 JournalFinancial=財務日記帳 BackToChartofaccounts=回到會計科目表 Chartofaccounts=會計科目表 -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfSubaccounts=個人帳戶圖表 +ChartOfIndividualAccountsOfSubsidiaryLedger=子分類帳的個人帳戶圖表 CurrentDedicatedAccountingAccount=目前的專用帳戶 AssignDedicatedAccountingAccount=新帳戶指派給 InvoiceLabel=發票標籤 @@ -37,8 +37,8 @@ OtherInfo=其他資訊 DeleteCptCategory=從群組移除會計帳戶 ConfirmDeleteCptCategory=您確定要從會計帳戶組中刪除此會計帳戶嗎? JournalizationInLedgerStatus=日誌狀態 -AlreadyInGeneralLedger=Already transferred in accounting journals and ledger -NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger +AlreadyInGeneralLedger=已經轉移到會計日記帳和分類帳中 +NotYetInGeneralLedger=尚未轉移到結帳日記帳和分類帳中 GroupIsEmptyCheckSetup=群組是空的,檢查個人化會計群組的設定 DetailByAccount=依帳戶顯示細節 AccountWithNonZeroValues=非零值的帳戶 @@ -47,10 +47,10 @@ CountriesInEEC=歐盟國家 CountriesNotInEEC=非歐盟國家 CountriesInEECExceptMe=除了%s以外的歐盟國家 CountriesExceptMe=除了%s以外的所有國家 -AccountantFiles=Export source documents +AccountantFiles=匯出來源文件 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 -VueBySubAccountAccounting=View by accounting subaccount +VueByAccountAccounting=依會計科目檢視 +VueBySubAccountAccounting=依會計子分類帳檢視 MainAccountForCustomersNotDefined=在設定中客戶的主要會計帳戶尚未定義 MainAccountForSuppliersNotDefined=在設定中供應商的主要會計帳戶尚未定義 @@ -96,8 +96,8 @@ SubledgerAccount=子帳帳戶 SubledgerAccountLabel=子帳帳戶標籤 ShowAccountingAccount=顯示會計項目 ShowAccountingJournal=顯示會計日記帳 -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=在分類帳中顯示會計科目 +ShowAccountingAccountInJournals=在日記帳中顯示會計科目 AccountAccountingSuggest=建議的會計項目 MenuDefaultAccounts=預設會計項目 MenuBankAccounts=銀行帳戶 @@ -121,7 +121,7 @@ UpdateMvts=交易的修改 ValidTransaction=驗證交易 WriteBookKeeping=Register transactions in accounting Bookkeeping=總帳 -BookkeepingSubAccount=Subledger +BookkeepingSubAccount=子分類帳 AccountBalance=帳戶餘額 ObjectsRef=參考的來源物件 CAHTF=稅前總採購供應商 @@ -131,7 +131,7 @@ InvoiceLinesDone=已關聯的各式發票 ExpenseReportLines=費用報表關聯數 ExpenseReportLinesDone=已關連的費用報表 IntoAccount=會計項目的關聯 -TotalForAccount=會計科目總計 +TotalForAccount=Total accounting account Ventilate=關聯 @@ -201,7 +201,7 @@ Docdate=日期 Docref=參考 LabelAccount=標籤帳戶 LabelOperation=標籤操作 -Sens=Direction +Sens=方向 AccountingDirectionHelp=For an accounting account of a customer, use Credit to record a payment you received<br>For an accounting account of a supplier, use Debit to record a payment you make LetteringCode=字元編碼 Lettering=字元 @@ -209,7 +209,7 @@ Codejournal=日記帳 JournalLabel=日記帳標籤 NumPiece=件數 TransactionNumShort=交易編號 -AccountingCategory=個人化群組 +AccountingCategory=Custom group GroupByAccountAccounting=Group by general ledger account GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=您可定義某些會計科目大類。他們可以在個人化會計報表中使用。 @@ -253,7 +253,7 @@ PaymentsNotLinkedToProduct=付款未連結到任何產品/服務 OpeningBalance=初期餘額 ShowOpeningBalance=顯示初期餘額 HideOpeningBalance=隱藏初期餘額 -ShowSubtotalByGroup=Show subtotal by level +ShowSubtotalByGroup=依級別顯示小計 Pcgtype=會計項目大類 PcgtypeDesc=用作某些會計報告的預定義“過濾器”和“分組”標準的科目組。例如“ INCOME”或“ EXPENSE”用作產品的會計科目組,以建立費用/收入報告。 @@ -276,11 +276,11 @@ DescVentilExpenseReport=在此查閱費用報表行數是否關聯到費用會 DescVentilExpenseReportMore=如果您在費用報告類型上設定會計帳戶,則應用程序將能夠在費用報告和會計科目表的會計帳戶之間進行所有綁定,只需點擊按鈕<strong>“ %s”即可</strong> 。如果未在費用字典中設定帳戶,或者您仍有某些行未綁定到任何帳戶,則必須從選單“ <strong>%s</strong> ”進行手動綁定。 DescVentilDoneExpenseReport=在此查閱費用報表的清單及其費用會計項目。 -Closure=Annual closure +Closure=年度關閉 DescClosure=請在此處查詢依照月份的未經驗證活動數和已經開放的會計年度 OverviewOfMovementsNotValidated=第1步/未驗證移動總覽。 (需要關閉一個會計年度) -AllMovementsWereRecordedAsValidated=All movements were recorded as validated -NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated +AllMovementsWereRecordedAsValidated=所有動作均記錄為已驗證 +NotAllMovementsCouldBeRecordedAsValidated=並非所有動作都可以記錄為已驗證 ValidateMovements=驗證動作 DescValidateMovements=禁止修改,刪除任何文字內容。所有條目都必須經過驗證,否則將無法結案 @@ -303,7 +303,7 @@ NotReconciled=未對帳 WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin -BindingOptions=Binding options +BindingOptions=綁定選項 ApplyMassCategories=套用大量分類 AddAccountFromBookKeepingWithNoCategories=個性化組中尚未有可用帳戶 CategoryDeleted=會計項目的類別已移除 @@ -402,7 +402,29 @@ UseMenuToSetBindindManualy=尚未綁定的行,請使用選單<a href="%s">%s</ ## Import ImportAccountingEntries=會計條目 +ImportAccountingEntriesFECFormat=Accounting entries - FEC format +FECFormatJournalCode=Code journal (JournalCode) +FECFormatJournalLabel=Label journal (JournalLib) +FECFormatEntryNum=Piece number (EcritureNum) +FECFormatEntryDate=Piece date (EcritureDate) +FECFormatGeneralAccountNumber=General account number (CompteNum) +FECFormatGeneralAccountLabel=General account label (CompteLib) +FECFormatSubledgerAccountNumber=Subledger account number (CompAuxNum) +FECFormatSubledgerAccountLabel=Subledger account number (CompAuxLib) +FECFormatPieceRef=Piece ref (PieceRef) +FECFormatPieceDate=Piece date creation (PieceDate) +FECFormatLabelOperation=Label operation (EcritureLib) +FECFormatDebit=Debit (Debit) +FECFormatCredit=Credit (Credit) +FECFormatReconcilableCode=Reconcilable code (EcritureLet) +FECFormatReconcilableDate=Reconcilable date (DateLet) +FECFormatValidateDate=Piece date validated (ValidDate) +FECFormatMulticurrencyAmount=Multicurrency amount (Montantdevise) +FECFormatMulticurrencyCode=Multicurrency code (Idevise) + DateExport=日期輸出 WarningReportNotReliable=警告,此報表非依總帳製作的,所以不含總帳中人工修改的交易。若您日記簿是最新的日期,則記帳檢視會比較準確。 ExpenseReportJournal=費用報表日記帳 InventoryJournal=庫存日記帳 + +NAccounts=%s accounts diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index 3d26c53e461..83ad22dd2f6 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -37,6 +37,7 @@ UnlockNewSessions=移除連線鎖定 YourSession=您的程序 Sessions=用戶程序 WebUserGroup=網頁伺服器用戶/組別 +PermissionsOnFiles=Permissions on files PermissionsOnFilesInWebRoot=網站根目錄中檔案的權限 PermissionsOnFile=檔案%s的權限 NoSessionFound=您的PHP設定似乎不允許列出活動程序。用於保存程序的資料夾( <b>%s</b> )可能受到保護(例如,通過OS權限或PHP指令open_basedir)。 @@ -62,6 +63,7 @@ IfModuleEnabled=註:若模組<b>%s</b>啓用時,「是的」有效。 RemoveLock=如果存在<b>%s</b>檔案,刪除/重新命名文件以允許使用更新/安裝工具。 RestoreLock=還原檔案唯讀權限檔案<b>%s</b> ,以禁止使用更新/安裝工具。 SecuritySetup=安全設定 +PHPSetup=PHP setup SecurityFilesDesc=在此定義上傳檔案相關的安全設定。 ErrorModuleRequirePHPVersion=錯誤,這個模組需要的PHP版本是 %s 或更高版本 ErrorModuleRequireDolibarrVersion=錯誤,這個模組需要 Dolibarr 版本 %s 或更高版本 @@ -154,7 +156,7 @@ SystemToolsAreaDesc=此區域提供管理功能。使用選單選擇所需的功 Purge=清除 PurgeAreaDesc=此頁面允許您刪除Dolibarr產生或儲存的所有文件(暫存檔案或<b>%s</b>目錄中的所有文件)。通常不需要使用此功能。此功能提供無權限刪除Web服務器產生之文件的Dolibarr用戶提供了一種解決方法。 PurgeDeleteLogFile=刪除 log 檔案,包含Syslog 模組的 <b>%s</b> (沒有遺失資料風險) -PurgeDeleteTemporaryFiles=刪除所有紀錄與暫存檔案(沒有丟失資料的風險)。注意:僅對於24小時前於temp資料夾已建立的檔案才執行刪除操作。 +PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago. PurgeDeleteTemporaryFilesShort=刪除紀錄和暫存檔案 PurgeDeleteAllFilesInDocumentsDir=刪除資料夾中的所有檔案: <b>%s</b> 。 <br>這將刪除所有與元件(合作方,發票等)相關的所有產生文件,上傳到ECM模組中的檔案,資料庫備份轉存和臨時文件。 PurgeRunNow=立即清除 @@ -232,6 +234,7 @@ BoxesAvailable=可用小工具 BoxesActivated=小工具已啟用 ActivateOn=啟用 ActiveOn=已啟用 +ActivatableOn=Activatable on SourceFile=來源檔案 AvailableOnlyIfJavascriptAndAjaxNotDisabled=僅當 JavaScript 不是停用時可用 Required=必須 @@ -256,7 +259,7 @@ OfficialWebHostingService=可參考的網站主機服務 (雲端主機) ReferencedPreferredPartners=首選合作夥伴 OtherResources=其他資源 ExternalResources=外部資源 -SocialNetworks=社交網路 +SocialNetworks=社群網路 SocialNetworkId=社群網路 ID ForDocumentationSeeWiki=有關用戶或開發人員的文件(文件,常見問題...), <br>可在Dolibarr維基查閱: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=有關任何其他問題/幫助,您可以使用Dolibarr論壇: <br> <a href="%s" target="_blank"><b>%s</b></a> @@ -347,9 +350,10 @@ LastActivationAuthor=最新啟動的作者 LastActivationIP=最新啟動的 IP UpdateServerOffline=離線更新伺服器 WithCounter=管理計數器 -GenericMaskCodes=您可以輸入任何編號遮罩。在此遮罩中,可以使用以下標籤: <br> <b>{000000}</b>對應一個數字,該數字將在每個%s上遞增。輸入與計數器所需長度一樣多的零。計數器將從左側的零開始補全,以便具有與遮罩一樣多的零。 <br> <b>{000000+000}</b>與上一個相同,但是從第一個%s開始應用與+號右邊的數字相對應的偏移量。 <br> <b>{000000 @ x}</b>與上一個相同,但是當到達月份x時,計數器會重置為零(x在1到12之間,或者為0以使用您配置中定義的會計年度的前幾個月,或者為99每月重置為零)。如果使用此選項並且x為2或更高,則還需要序列{yy} {mm}或{yyyy} {mm}。 <br> <b>{dd}</b>天(01到31)。 <br> <b>{mm}</b>月(01到12)。 <br> <b>{yy}</b> , <b>{yyyy}</b>或<b>{y}</b>年超過2、4或1個數字。 <br> -GenericMaskCodes2=<b>{cccc}</b>客戶端用n個字元的代碼 <br> <b>{cccc000}</b>在n個字元上的客戶代碼後跟一個專門為客戶提供的計數器。此專用於客戶的計數器與全域計數器在同一時間重置。 <br> <b>{tttt}</b>合作方類型用n個字元的代碼(請參閱選單 首頁-設定-分類-合作方類型)。如果增加此標籤,則每種類型的合作方的計數器都將不同。 <br> +GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags can be used:<br><b>{000000}</b> 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. <br><b>{000000+000}</b> same as the previous one but an offset corresponding to the number to the right of the + sign is applied starting on the first %s. <br><b>{000000@x}</b> same as the previous one 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 the sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> +GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated to the customer. This counter dedicated to customer is reset at same time as the global counter.<br><b>{tttt}</b> 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.<br> GenericMaskCodes3=遮罩中的所有其他字元將保持不變。 <br>不允許使用空格。 <br> +GenericMaskCodes3EAN=All other characters in the mask will remain intact (except * or ? in 13th position in EAN13).<br>Spaces are not allowed.<br>In EAN13, the last character after the last } in 13th position should be * or ? . It will be replaced by the calculated key.<br> GenericMaskCodes4a=<u>在日期 2007-01-31 ,第99個%s合作方公司範例:</u><br> GenericMaskCodes4b=<u>位於2007-03-01 建立的合作方範例:</u><br> GenericMaskCodes4c=<u>位於2007-03-01 建立的產品範例:</u><br> @@ -444,8 +448,8 @@ ExtrafieldParamHelpPassword=將欄位保留為空白表示該值將不加密地 ExtrafieldParamHelpselect=數值清單必須為含有關鍵字的行,數值 (關鍵字不能為 '0')<br><br>例如: <br> 1,值1 <br> 2,值2 <br> code3,value3 <br> ... <br><br>為了使此清單取決於另一個互補屬性清單: <br> 1,value1 | options_ <i>parent_list_code</i> :parent_key <br> 2,value2 | options_ <i>parent_list_code</i> :parent_key <br><br>為了使清單取決於另一個清單: <br> 1,值1 | <i>parent_list_code</i> :parent_key <br> 2,值2 | <i>parent_list_code</i> :parent_key ExtrafieldParamHelpcheckbox=數值清單必須為含有關鍵字的行,數值 (關鍵字不能為 '0')<br><br>範例:<br>1,value1<br>2,value2<br>3,value3<br>... ExtrafieldParamHelpradio=數值清單必須為含有關鍵字的行,數值 (關鍵字不能為 '0')<br><br>範例:<br>1,value1<br>2,value2<br>3,value3<br>... -ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filter<br>Example: c_typent:libelle:id::filter<br><br>- id_field is necessarly a primary int key<br>- filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter -ExtrafieldParamHelpchkbxlst=表單中的數值清單<br>語法: table_name:label_field:id_field::filter<br>例如:: c_typent:libelle:id::filter<br><br>篩選可以是一個簡單的測試 (例如 啟動 =1 ) 只顯示啟動的數值<br>您也可以在篩選中使用 $ID$作為目前物件的ID<br>在篩選器中執行 SELECT 則使用 $SEL$<br>若您要在額外欄位篩選使用語法 extra.fieldcode=... (extra.fileldcode為欄位的代碼)<br><br>為使清單明細依賴於另一個補充屬性的清單:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter<br><br>為使清單依賴於另一個補充屬性清單:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarly a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter +ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=保持空白以使用簡單的分隔符號<br>對於折疊分隔符號,將此值設定為1(預設情況下,對於新程序打開,然後為每個用戶程序保留狀態) <br>將其設定為2可折疊分隔符號(預設情況下,新程序已折疊,然後在每個用戶程序中保持狀態) LibraryToBuildPDF=PDF產生器程式庫 @@ -505,7 +509,7 @@ GoIntoTranslationMenuToChangeThis=找到了帶有此代碼的密鑰的翻譯。 WarningSettingSortOrder=警告,如果欄位是未知欄位,則在清單頁面上設定預設的排列順序可能會導致技術錯誤。如果遇到此類錯誤,請返回此頁面以刪除預設的排列順序並恢復預設行為。 Field=欄位 ProductDocumentTemplates=文件範例產生產品文件檔案 -FreeLegalTextOnExpenseReports=費用報告上的免費法律文字 +FreeLegalTextOnExpenseReports=費用報告上的自由法律文字 WatermarkOnDraftExpenseReports=費用報告草稿上的浮水印 AttachMainDocByDefault=若您要預設將主要文件附加到電子郵件(若適用的話),此值設定為 1 FilesAttachedToEmail=附加檔案 @@ -541,6 +545,8 @@ Module40Name=供應商 Module40Desc=供應商和採購管理(採購訂單和供應商發票開票) Module42Name=除錯日誌 Module42Desc=日誌記錄 (file, syslog, ...)。這些日誌是針對技術性以及除錯用途。 +Module43Name=除錯列 +Module43Desc=A tool for developper adding a debug bar in your browser. Module49Name=編輯器 Module49Desc=編輯器管理 Module50Name=產品 @@ -639,12 +645,14 @@ Module2900Name=GeoIPMaxmind Module2900Desc=GeoIP Maxmind轉換功能 Module3200Name=不可改變的檔案 Module3200Desc=啟用不可更改的商業事件日誌。事件是即時存檔的。日誌是可以匯出的鍊式事件的唯讀表格。在某些國家/地區,此模組可能是必需的。 +Module3400Name=社群網路 +Module3400Desc=Enable Social Networks fields into third parties and addresses (skype, twitter, facebook, ...). Module4000Name=人資 Module4000Desc=人力資源管理(部門、員工合約及感受的管理) Module5000Name=多重公司 Module5000Desc=允許您管理多重公司 -Module6000Name=工作流程 -Module6000Desc=工作流程管理(自動建立項目和/或自動更改狀況) +Module6000Name=Inter-modules Workflow +Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change) Module10000Name=網站 Module10000Desc=使用所見即所得編輯器建立網站(公共)。這是一個面向網站管理員或面向開發人員的CMS(最好了解HTML和CSS語言)。只需將您的Web伺服器(Apache,Nginx等)設定為指向專用的Dolibarr資料夾,即可使用您自己的網域名稱在Internet上連線。 Module20000Name=休假申請管理 @@ -805,7 +813,8 @@ PermissionAdvanced253=建立/修改內部/外部用戶資訊和權限 Permission254=只能建立/修改外部用戶資訊 Permission255=修改其他用戶密碼 Permission256=刪除或停用其他用戶 -Permission262=延伸存取全部合作方(不只是合作方的業務代表)。<br>對外部用戶無效(對提案建議書、訂單、發票、通訊錄等)。<br>對專案無效(僅在專案存取、顯示及指派事件的規則) +Permission262=Extend access to all third parties AND their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). +Permission263=Extend access to all third parties WITHOUT their objects (not only third parties for which the user is a sale representative).<br>Not effective for external users (always limited to themselves for proposals, orders, invoices, contracts, etc.).<br>Not effective for projects (only rules on project permissions, visibility and assignment matters). Permission271=讀取 CA Permission272=讀取發票 Permission273=發票問題 @@ -1018,7 +1027,7 @@ DictionaryFees=費用報告-費用報告行的類型 DictionarySendingMethods=出貨方式 DictionaryStaff=員工人數 DictionaryAvailability=遲延交付 -DictionaryOrderMethods=下訂方法 +DictionaryOrderMethods=訂購方式 DictionarySource=原始提案/建議書/訂單 DictionaryAccountancyCategory=報告的個人化組別 DictionaryAccountancysystem=會計科目表模型 @@ -1026,7 +1035,7 @@ DictionaryAccountancyJournal=會計日記帳 DictionaryEMailTemplates=電子郵件範本 DictionaryUnits=單位 DictionaryMeasuringUnits=計算單位 -DictionarySocialNetworks=社會網路 +DictionarySocialNetworks=社群網路 DictionaryProspectStatus=公司的潛在狀態 DictionaryProspectContactStatus=聯絡人的潛在狀態 DictionaryHolidayTypes=休假類型 @@ -1175,7 +1184,8 @@ SetupDescription2=以下兩個部分是必需的(“設定”選單中的前 SetupDescription3= <a href="%s"> %s-> %s </a> <br> <br>用於自訂您的應用程式預設行為的基本參數(例如 跟國家相關的功能)。 SetupDescription4= <a href="%s"> %s-> %s </a> <br> <br>此軟體是許多模組/應用程式的套件。必須啟用和配置與您的需求相關的模組。這些模組啟動後將會顯示在選單上。 SetupDescription5=其他設定選單項目管理可選參數。 -LogEvents=安全稽核事件 +AuditedSecurityEvents=Security events that are audited +NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s Audit=稽核 InfoDolibarr=關於 Dolibarr InfoBrowser=關於瀏覽器 @@ -1243,7 +1253,7 @@ RunningUpdateProcessMayBeRequired=似乎需要執行升級(程式版本%s與 YouMustRunCommandFromCommandLineAfterLoginToUser=用戶<b>%s</b>在登入終端機後您必須從命令列執行此命令,或您必須在命令列末增加 -W 選項以提供 <b>%s</b> 密碼。 YourPHPDoesNotHaveSSLSupport=您的PHP中無法使用SSL功能 DownloadMoreSkins=更多佈景主題下載 -SimpleNumRefModelDesc=返回格式為%syymm-nnnn的參考編號,其中yy是年,mm是月,nnnn是連續的,沒有重置 +SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset ShowProfIdInAddress=顯示帶有地址的專業ID ShowVATIntaInAddress=隱藏帶有地址的歐盟營業稅號 TranslationUncomplete=部分翻譯 @@ -1261,7 +1271,7 @@ MAIN_PROXY_HOST=代理伺服器:名稱/地址 MAIN_PROXY_PORT=代理伺服器:連接埠 MAIN_PROXY_USER=代理伺服器:登入名稱/用戶 MAIN_PROXY_PASS=代理伺服器:密碼 -DefineHereComplementaryAttributes=在此處定義您想要包括的任何其他/自定義屬性:%s +DefineHereComplementaryAttributes=Define any additional / custom attributes that must be added to: %s ExtraFields=補充屬性 ExtraFieldsLines=補充屬性(行) ExtraFieldsLinesRec=補充屬性 ( 範本發票行) @@ -1505,6 +1515,7 @@ LDAPFieldLoginUnix=登入(Unix系統) LDAPFieldLoginExample=範例: uid LDAPFilterConnection=搜尋過濾器 LDAPFilterConnectionExample=範例: &(objectClass=inetOrgPerson) +LDAPGroupFilterExample=Example: &(objectClass=groupOfUsers) LDAPFieldLoginSamba=登入 (samba, activedirectory) LDAPFieldLoginSambaExample=範例: samaccountname LDAPFieldFullname=全名 @@ -1736,9 +1747,11 @@ YourCompanyDoesNotUseVAT=您的公司尚未定義使用營業稅 ( 首頁 - 設 AccountancyCode=會計代碼 AccountancyCodeSell=銷售會計代碼 AccountancyCodeBuy=採購會計代碼 +CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax ##### Agenda ##### AgendaSetup=事件和應辦事項模組設定 PasswordTogetVCalExport=授權匯出連結秘鑰 +SecurityKey = Security Key PastDelayVCalExport=不要匯出早於以下時間的事件 AGENDA_USE_EVENT_TYPE=使用事件類型(在選單設定->分類->應辦事項類型中管理) AGENDA_USE_EVENT_TYPE_DEFAULT=在事件建立表單中自動為事件類型設定此預設值 @@ -1879,7 +1892,7 @@ BackgroundTableLineOddColor=表格奇數行的背景顏色 BackgroundTableLineEvenColor=表格偶數行的背景色 MinimumNoticePeriod=最短通知期限(您的休假申請必須在此之前完成) NbAddedAutomatically=每月(自動)新增到用戶計數器的天數 -EnterAnyCode=此欄位包含用於識別行的參考。輸入您選擇的任何值,但不能包含特殊字元。 +EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters. Enter0or1=輸入0或1 UnicodeCurrency=在括號之間輸入代表貨幣符號的字元數列表。例如:對於$,輸入[36]-對於巴西R $ [82,36]-對於€,輸入[8364] ColorFormat=在 HEX 格式中 RGB 顏色,例如: FF0000 @@ -1966,7 +1979,7 @@ MAIN_PDF_MARGIN_BOTTOM=PDF底部邊距 MAIN_DOCUMENTS_LOGO_HEIGHT=PDF上Logo的高度 NothingToSetup=此模組不需要特別的設定。 SetToYesIfGroupIsComputationOfOtherGroups=若此群組是其他群組的計算值,則將其設定為 "是" -EnterCalculationRuleIfPreviousFieldIsYes=如果先前欄位設定為“是”,則輸入計算規則(例如“ CODEGRP1 + CODEGRP2”) +EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2 SeveralLangugeVariatFound=發現數個語言變數 RemoveSpecialChars=刪除特殊字元 COMPANY_AQUARIUM_CLEAN_REGEX=用正則表達式篩選器清除值(COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1978,11 +1991,11 @@ HelpOnTooltip=工具提示上的幫助文字 HelpOnTooltipDesc=在這裡放入文字或是翻譯鍵以便此欄位顯示在表單時可以顯示在工具提示 YouCanDeleteFileOnServerWith=您可以使用下列命令行在伺服器上刪除此文件: <br> %s ChartLoaded=已載入會計項目表 -SocialNetworkSetup=社交網路模組設定 +SocialNetworkSetup=社群網路模組設定 EnableFeatureFor=為 <strong>%s</strong> 啓用功能 VATIsUsedIsOff=注意:在選單%s-%s中,使用營業稅或增值稅的選項已設定為“ <strong>關閉</strong> ”,因此用於銷售的營業稅或增值稅將始終為0。 SwapSenderAndRecipientOnPDF=交換PDF文件上的發件人和收件人地址位置 -FeatureSupportedOnTextFieldsOnly=警告,僅文字欄位支援此功能。另外,必須設定網址參數action = create或action = edit到OR頁面,名稱必須為'new.php' 才能觸發此功能。 +FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. EmailCollector=電子郵件收集器 EmailCollectorDescription=新增計劃作業和設定頁面以定期掃描信箱(使用IMAP協議),並在正確的位置記錄接收到您應用程式中的電子郵件和/或自動建立一些記錄(例如潛在)。 NewEmailCollector=新電子郵件收集器 @@ -1994,8 +2007,8 @@ EmailcollectorOperationsDesc=全部訂單的操作已執行 MaxEmailCollectPerCollect=每次收集電子郵件的最大數量 CollectNow=立刻收集 ConfirmCloneEmailCollector=您確定要複製電子郵件收集器%s嗎? -DateLastCollectResult=Date of latest collect try -DateLastcollectResultOk=Date of latest collect success +DateLastCollectResult=最新嘗試收集日期 +DateLastcollectResultOk=最新收集成功日期 LastResult=最新結果 EmailCollectorConfirmCollectTitle=郵件收集確認 EmailCollectorConfirmCollect=您是否要立即執行此收集器的收集? @@ -2009,7 +2022,7 @@ CodeLastResult=最新結果代碼 NbOfEmailsInInbox=來源資料夾中的電子郵件數量 LoadThirdPartyFromName=在%s載入合作方搜尋 (僅載入) LoadThirdPartyFromNameOrCreate= 在%s載入合作方搜尋 (如果找不到就建立) -WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithDolTrackingID=來自Dolibarr寄送的第一封電子郵件發起的對話訊息 WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=來自Dolibarr的訊息 WithoutDolTrackingIDInMsgId=未從Dolibarr傳送訊息 @@ -2049,8 +2062,11 @@ UseDebugBar=使用debug bar DEBUGBAR_LOGS_LINES_NUMBER=控制台中可保留的日誌行數 WarningValueHigherSlowsDramaticalyOutput=警告,較高的值會嚴重降低輸出速度 ModuleActivated=模組%s已啟動並顯示於界面上 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. +ModuleActivatedWithTooHighLogLevel=Module %s is activated with a too high logging level (try to use a lower level for better performances) +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) +IfYouAreOnAProductionSetThis=如果您在生產環境中,則應將此屬性設定為%s。 AntivirusEnabledOnUpload=在上傳的檔案已啟用了防病毒功能 +SomeFilesOrDirInRootAreWritable=Some files or directories are not in a read-only mode EXPORTS_SHARE_MODELS=匯出模組功能可分享此模組給所有人 ExportSetup=模組匯出設定 ImportSetup=模組匯入設定 @@ -2074,6 +2090,8 @@ MakeAnonymousPing=對Dolibarr基金會服務器進行匿名Ping'+1'(僅在安 FeatureNotAvailableWithReceptionModule=啟用接收模組後,此功能不可用 EmailTemplate=電子郵件模板 EMailsWillHaveMessageID=電子郵件將具有與此語法匹配的標籤“參考” +PDF_SHOW_PROJECT=Show project on document +ShowProjectLabel=Project Label PDF_USE_ALSO_LANGUAGE_CODE=如果您要在生成同一的PDF中以兩種不同的語言複製一些文字,則必須在此處設置第二種語言讓生成的PDF在同一頁中包含兩種不同的語言,選擇的可以用來生成PDF跟另一種語言(只有少數PDF模板支援此功能)。PDF只有一種語言則留空。 FafaIconSocialNetworksDesc=在此處輸入FontAwesome圖示的代碼。如果您不知道什麼是FontAwesome,則可以使用通用值fa-address-book。 FeatureNotAvailableWithReceptionModule=啟用接收模組後,此功能不可用 @@ -2084,14 +2102,23 @@ MeasuringScaleDesc=比例尺是您必須移動小數部分以匹配默認參考 TemplateAdded=範本已增加 TemplateUpdated=範本已更新 TemplateDeleted=範本已刪除 -MailToSendEventPush=Event reminder email -SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security +MailToSendEventPush=事件提醒電子郵件 +SwitchThisForABetterSecurity=建議將此值變更為%s以提高安全性 DictionaryProductNature= 產品性質 -CountryIfSpecificToOneCountry=Country (if specific to a given country) -YouMayFindSecurityAdviceHere=You may find security advisory here -ModuleActivatedMayExposeInformation=This module may expose sensitive data. If you don't need it, disable it. +CountryIfSpecificToOneCountry=國家(如果特定於給定國家) +YouMayFindSecurityAdviceHere=您可以在這裡找到安全建議 +ModuleActivatedMayExposeInformation=This PHP extension may expose sensitive data. If you don't need it, disable it. ModuleActivatedDoNotUseInProduction=A module designed for the development has been enabled. Do not enable it on a production environment. -CombinationsSeparator=Separator character for product combinations -SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples +CombinationsSeparator=產品組合的分隔符號 +SeeLinkToOnlineDocumentation=有關範例,請參見選單上的線上文件連結。 SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. -AskThisIDToYourBank=Contact your bank to get this ID +AskThisIDToYourBank=請聯絡您的銀行以獲取此ID +AdvancedModeOnly=Permision available in Advanced permission mode only +ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by any users. Give permission to web server user and group only. +MailToSendEventOrganization=Event Organization +AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form +YouShouldDisablePHPFunctions=You should disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions +NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good) +RecommendedValueIs=Recommended: %s +ARestrictedPath=A restricted path diff --git a/htdocs/langs/zh_TW/banks.lang b/htdocs/langs/zh_TW/banks.lang index f3885f17658..3026ef1770b 100644 --- a/htdocs/langs/zh_TW/banks.lang +++ b/htdocs/langs/zh_TW/banks.lang @@ -37,7 +37,7 @@ IbanValid=BAN 有效 IbanNotValid=BAN 無效 StandingOrders=直接轉帳訂單 StandingOrder=直接轉帳訂單 -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=直接付款 PaymentByBankTransfers=信用轉帳付款 PaymentByBankTransfer=銀行轉帳付款 AccountStatement=帳戶對帳單 @@ -106,8 +106,8 @@ SupplierInvoicePayment=供應商付款 SubscriptionPayment=訂閱付款 WithdrawalPayment=借方付款單 SocialContributionPayment=社會/財務稅負繳款單 -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=銀行轉帳 +BankTransfers=銀行轉帳 MenuBankInternalTransfer=內部轉帳 TransferDesc=從一個帳戶轉移到另一個帳戶,Dolibarr將寫入兩個記錄(來源帳戶中的借款方和目標帳戶中的貸款方)。此交易將使用相同的金額(簽名,標籤和日期除外) TransferFrom=從 @@ -166,18 +166,19 @@ VariousPayment=雜項付款 VariousPayments=雜項付款 ShowVariousPayment=顯示雜項付款 AddVariousPayment=新增雜項付款 -VariousPaymentId=Miscellaneous payment ID -VariousPaymentLabel=Miscellaneous payment label -ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment +VariousPaymentId=雜項付款編號 +VariousPaymentLabel=雜項付款標籤 +ConfirmCloneVariousPayment=確認複製的雜項付款 SEPAMandate=歐洲統一支付區要求 YourSEPAMandate=您的歐洲統一支付區要求 FindYourSEPAMandate=這是您SEPA的授權,授權我們公司向您的銀行直接付款。退還已簽名(掃描已簽名文檔)或通過郵件發送至 AutoReportLastAccountStatement=進行對帳時,自動用最後一個對帳單編號填寫“銀行對帳單編號”欄位 -CashControl=POS cash desk control -NewCashFence=New cash desk closing +CashControl=POS收銀台控制 +NewCashFence=New cash desk opening or closing BankColorizeMovement=動作顏色 BankColorizeMovementDesc=如果啟用此功能,則可以為借款方或貸款方動作選擇特定的背景顏色 BankColorizeMovementName1=借款方動作的背景顏色 BankColorizeMovementName2=貸款方動作的背景顏色 -IfYouDontReconcileDisableProperty=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. -NoBankAccountDefined=No bank account defined +IfYouDontReconcileDisableProperty=如果您不對某些銀行帳戶進行銀行對帳,請在其上禁用屬性“ %s”以刪除此警告。 +NoBankAccountDefined=未定義銀行帳戶 +NoRecordFoundIBankcAccount=No record found in bank account. Commonly, this occurs when a record has been deleted manually from the list of transaction in the bank account (for example during a reconciliation of the bank account). Another reason is that the payment was recorded when the module "%s" was disabled. diff --git a/htdocs/langs/zh_TW/bills.lang b/htdocs/langs/zh_TW/bills.lang index 5e5158ca8af..af50c6b9267 100644 --- a/htdocs/langs/zh_TW/bills.lang +++ b/htdocs/langs/zh_TW/bills.lang @@ -55,6 +55,7 @@ CustomerInvoice=客戶發票 CustomersInvoices=客戶發票 SupplierInvoice=供應商發票 SuppliersInvoices=供應商發票 +SupplierInvoiceLines=供應商發票行 SupplierBill=供應商發票 SupplierBills=供應商發票 Payment=付款 @@ -81,6 +82,8 @@ PaymentsAlreadyDone=付款已完成 PaymentsBackAlreadyDone=退款已完成 PaymentRule=付款條件 PaymentMode=付款類型 +DefaultPaymentMode=Default Payment Type +DefaultBankAccount=Default Bank Account PaymentTypeDC=借/貸卡片 PaymentTypePP=PayPal IdPaymentMode=付款類型 (id) @@ -234,8 +237,8 @@ RemainderToPay=未付款餘額 RemainderToTake=剩餘金額 RemainderToPayBack=剩餘金額退款 Rest=待辦中 -AmountExpected=索賠額 -ExcessReceived=收到過多 +AmountExpected=索款額 +ExcessReceived=超額收款 ExcessPaid=超額付款 EscompteOffered=已提供折扣(付款日前付款) EscompteOfferedShort=折扣 @@ -373,6 +376,7 @@ DateLastGeneration=最新的產生日期 DateLastGenerationShort=最新的產生日期 MaxPeriodNumber=產生發票的最大數量 NbOfGenerationDone=已經產生完成的發票數量 +NbOfGenerationOfRecordDone=Number of record generation already done NbOfGenerationDoneShort=已產生完成發票數 MaxGenerationReached=已達到最大產生數量 InvoiceAutoValidate=自動驗證發票 @@ -413,7 +417,7 @@ PaymentCondition14DENDMONTH=月底後的14天內 FixAmount=固定金額-標籤為“ %s”的1行 VarAmount=可變金額 (%% tot.) VarAmountOneLine=可變金額 (%% tot.) - 有標籤 '%s'的一行 -VarAmountAllLines=可變數量(%% tot.)-所有相同行 +VarAmountAllLines=可變金額(%% tot.)-所有行從起點 # PaymentType PaymentTypeVIR=銀行轉帳 PaymentTypeShortVIR=銀行轉帳 @@ -494,12 +498,16 @@ Cash=現金 Reported=已延遲 DisabledBecausePayments=無法付款,因為有一些付款 CantRemovePaymentWithOneInvoicePaid=無法移除此付款,因為至少有一張發票分類已付款 +CantRemovePaymentVATPaid=由於稅金已分類為已付款,因此無法刪除付款 +CantRemovePaymentSalaryPaid=由於薪資已分類為已付款,因此無法刪除付款 ExpectedToPay=預期付款 CantRemoveConciliatedPayment=無法刪除對帳款 PayedByThisPayment=支付這筆款項 ClosePaidInvoicesAutomatically=完全付款後,將所有標準,預付款或替換發票自動分類為“已付款”。 ClosePaidCreditNotesAutomatically=當已完全退款後將所有同意折讓照會通知自動分類為 "已付款"。 ClosePaidContributionsAutomatically=完全付款後,將所有社會或財政捐款自動分類為“已付款”。 +ClosePaidVATAutomatically=完全付款後,自動將稅金分類為“已付款”。 +ClosePaidSalaryAutomatically=完全付款後,薪資會自動分類為“已付款”。 AllCompletelyPayedInvoiceWillBeClosed=所有沒有餘款的發票將自動關閉,狀態為“已付款”。 ToMakePayment=付款 ToMakePaymentBack=退還款項 @@ -512,18 +520,18 @@ YouMustCreateStandardInvoiceFirstDesc=您必須先建立標準發票,然後將 PDFCrabeDescription=發票PDF範本Crabe。完整的發票範本(Sponge範本的舊範本) PDFSpongeDescription=發票PDF範本Sponge。完整的發票範本 PDFCrevetteDescription=發票PDF範本Crevette。狀況發票的完整發票範本 -TerreNumRefModelDesc1=轉回數字的格式,標準發票為%syymm-nnnn 及同意折讓照會通知是%syymm-nnnn,其中 yy 是年,mm 是月,nnnn 是無空白且不返回 0 的序列 -MarsNumRefModelDesc1=轉回數字格式,標準發票為%syymm-nnnn,替換發票為%syymm-nnnn,訂金發票為%syymm-nnnn,同意折讓照會通知為 %syymm-nnnn,其中 yy 是年,mm 是月,nnnn 為無空白且不返回 0 的序列 +TerreNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 +MarsNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 TerreNumRefModelError=以$ syymm開頭的帳單已經存在,並且與該序列模型不符合。將其刪除或重新命名以啟動此模組。 -CactusNumRefModelDesc1=轉回數字格式,標準發票為%syymm-nnnn,同意折讓照會通知為%syymm-nnnn,訂金發票格式為%syymm-nnnn,其中 yy 為年,mm 為月,nnnn 為無空白且不返回0的序列 +CactusNumRefModelDesc1=Return number in the format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0 EarlyClosingReason=提前關閉原因 EarlyClosingComment=提前關閉註記 ##### Types de contacts ##### -TypeContact_facture_internal_SALESREPFOLL=有代表性的後續客戶發票 +TypeContact_facture_internal_SALESREPFOLL=客戶發票聯絡人 TypeContact_facture_external_BILLING=客戶發票聯絡人 TypeContact_facture_external_SHIPPING=客戶運輸聯絡人 TypeContact_facture_external_SERVICE=客戶服務聯絡人 -TypeContact_invoice_supplier_internal_SALESREPFOLL=有代表性的後續供應商發票 +TypeContact_invoice_supplier_internal_SALESREPFOLL=供應商發票聯絡人 TypeContact_invoice_supplier_external_BILLING=供應商發票聯絡人 TypeContact_invoice_supplier_external_SHIPPING=供應商貨運聯絡人 TypeContact_invoice_supplier_external_SERVICE=供應商服務聯絡人 @@ -562,7 +570,8 @@ ToCreateARecurringInvoiceGeneAuto=如果需要自動生成此類發票,請要 DeleteRepeatableInvoice=刪除發票範本 ConfirmDeleteRepeatableInvoice=您確定要刪除發票範本嗎? CreateOneBillByThird=為每個合作方建立一張發票(否則,為每個訂單建立一張發票) -BillCreated=%s帳單已新增 +BillCreated=已產生%s發票 +BillXCreated=已產生發票%s StatusOfGeneratedDocuments=文件產生狀態 DoNotGenerateDoc=不要產生文件檔案 AutogenerateDoc=自動產生文件檔案 diff --git a/htdocs/langs/zh_TW/boxes.lang b/htdocs/langs/zh_TW/boxes.lang index 157b6a17cef..2a6b283482d 100644 --- a/htdocs/langs/zh_TW/boxes.lang +++ b/htdocs/langs/zh_TW/boxes.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - boxes +BoxDolibarrStateBoard=資料庫中主要業務對象的統計資料 BoxLoginInformation=登入資訊 BoxLastRssInfos=RSS資訊 BoxLastProducts=最新%s筆的產品/服務 @@ -17,9 +18,13 @@ BoxLastActions=最新活動 BoxLastContracts=最新合約 BoxLastContacts=最新通訊錄/地址 BoxLastMembers=最新會員 +BoxLastModifiedMembers=Latest modified members +BoxLastMembersSubscriptions=Latest member subscriptions BoxFicheInter=最新干預 BoxCurrentAccounts=開啟帳戶餘額 BoxTitleMemberNextBirthdays=本月生日(會員) +BoxTitleMembersByType=Members by type +BoxTitleMembersSubscriptionsByYear=Members Subscriptions by year BoxTitleLastRssInfos=來自%s的最新%s筆消息 BoxTitleLastProducts=產品/服務:最新%s筆已修改 BoxTitleProductsAlertStock=產品:庫存警報 @@ -95,8 +100,8 @@ LastXMonthRolling=最新%s月份滾動 ChooseBoxToAdd=將小工具加到您的控制板 BoxAdded=小工具已加到您的控制板中 BoxTitleUserBirthdaysOfMonth=本月的生日(用戶) -BoxLastManualEntries=Latest record in accountancy entered manually or without source document -BoxTitleLastManualEntries=%s latest record entered manually or without source document +BoxLastManualEntries=最新手動輸入的會計記錄或沒有來源文件 +BoxTitleLastManualEntries=%s最新已手動輸入記錄或沒有來源文件 NoRecordedManualEntries=會計中沒有手動條目 BoxSuspenseAccount=用暫記帳戶計算會計操作 BoxTitleSuspenseAccount=未分配的行數 @@ -107,5 +112,9 @@ BoxTitleLastCustomerShipments=最新%s筆客戶發貨 NoRecordedShipments=沒有已記錄的客戶發貨 BoxCustomersOutstandingBillReached=達到最大客戶數 # Pages -AccountancyHome=會計 +UsersHome=Home users and groups +MembersHome=Home Membership +ThirdpartiesHome=Home Thirdparties +TicketsHome=Home Tickets +AccountancyHome=Home Accountancy ValidatedProjects=已驗證的專案 diff --git a/htdocs/langs/zh_TW/categories.lang b/htdocs/langs/zh_TW/categories.lang index c92c7a709c4..f0c1333e1c7 100644 --- a/htdocs/langs/zh_TW/categories.lang +++ b/htdocs/langs/zh_TW/categories.lang @@ -14,7 +14,7 @@ SuppliersCategoriesArea=供應商標籤/類別區域 CustomersCategoriesArea=客戶標籤/類別區域 MembersCategoriesArea=會員標籤/類別區域 ContactsCategoriesArea=聯絡人標籤/類別區域 -AccountsCategoriesArea=帳戶標籤/類別區域 +AccountsCategoriesArea=Bank accounts tags/categories area ProjectsCategoriesArea=專案標籤/類別區域 UsersCategoriesArea=用戶標籤/類別區域 SubCats=子類別 @@ -93,7 +93,7 @@ AddSupplierIntoCategory=分配類別給供應商 ShowCategory=顯示標籤/類別 ByDefaultInList=預設在清單中 ChooseCategory=選擇類別 -StocksCategoriesArea=倉庫類別 -ActionCommCategoriesArea=事件類別 +StocksCategoriesArea=Warehouse Categories +ActionCommCategoriesArea=Event Categories WebsitePagesCategoriesArea=頁面容器類別 UseOrOperatorForCategories=類別的使用或運算 diff --git a/htdocs/langs/zh_TW/companies.lang b/htdocs/langs/zh_TW/companies.lang index 8bbc2a0225b..1f51cecff77 100644 --- a/htdocs/langs/zh_TW/companies.lang +++ b/htdocs/langs/zh_TW/companies.lang @@ -43,9 +43,10 @@ Individual=私營個體 ToCreateContactWithSameName=會自動新增一個與合作方具有相同資訊的聯絡人/地址。在大多數情況下,即使您的合作方是自然人,只需建立合作方即可。 ParentCompany=母公司 Subsidiaries=子公司 -ReportByMonth=月報告 -ReportByCustomers=客戶報告 -ReportByQuarter=百分比報告 +ReportByMonth=Report per month +ReportByCustomers=Report per customer +ReportByThirdparties=Report per thirdparty +ReportByQuarter=Report per rate CivilityCode=Civility code RegisteredOffice=已註冊辦公室 Lastname=姓氏 @@ -172,14 +173,20 @@ ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (社會安全號碼) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (學院編號) -ProfId5ES=歐盟增值稅號 +ProfId5ES=Prof Id 5 (EORI number) ProfId6ES=- ProfId1FR=Prof Id 1 (SIREN) ProfId2FR=Prof Id 2 (SIRET) ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) -ProfId5FR=歐盟增值稅號 +ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=註冊號 ProfId2GB=- ProfId3GB=SIC @@ -203,6 +210,7 @@ ProfId2IT=- ProfId3IT=- ProfId4IT=- ProfId5IT=歐盟增值稅號 +ProfId6IT=- ProfId1LU=Id. prof. 1 (R.C.S.盧森堡) ProfId2LU=Id. prof. 2 (營業執照) ProfId3LU=- @@ -231,7 +239,7 @@ ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2(社會安全號碼) ProfId3PT=Prof Id 3(商業記錄碼) ProfId4PT=Prof Id 4 (音樂學院) -ProfId5PT=歐盟增值稅號 +ProfId5PT=Prof Id 5 (EORI number) ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +263,7 @@ ProfId1RO=Prof Id 1 (CUI) ProfId2RO=Prof Id 2 (Nr. Înmatriculare) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=Prof Id 5 (EUID) -ProfId5RO=歐盟增值稅號 +ProfId5RO=Prof Id 5 (EORI number) ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -358,7 +366,7 @@ VATIntraCheckableOnEUSite=檢查在歐盟區網站內的區內營業稅 VATIntraManualCheck=您也可在歐盟網站以人工方式確認<a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=無法檢查。無法使用會員國家(%s)進行檢查服務。 NorProspectNorCustomer=非潛在方或客戶 -JuridicalStatus=業務實體類型 +JuridicalStatus=法人類型 Workforce=員工 Staff=僱員 ProspectLevelShort=潛在等級 @@ -418,7 +426,7 @@ AllocateCommercial=指定業務代表 Organization=組織 FiscalYearInformation=會計年度 FiscalMonthStart=會計年度開始月份 -SocialNetworksInformation=社交網路 +SocialNetworksInformation=社群網路 SocialNetworksFacebookURL=Facebook網址 SocialNetworksTwitterURL=Twitter網址 SocialNetworksLinkedinURL=Linkedin網址 @@ -441,7 +449,7 @@ CurrentOutstandingBill=目前未付款帳單 OutstandingBill=未付款帳單的最大金額 OutstandingBillReached=已達最大金額的未付款帳單 OrderMinAmount=最小訂購量 -MonkeyNumRefModelDesc=客戶代號回復 %s yymm-nnnn ,且供應商代號為 %s yymm-nnnn 的數字格式,其中 yy 指的是年度,mm指的是月份,nnnn指的是不間斷或返回 0 的序號。 +MonkeyNumRefModelDesc=Return a number in the format %syymm-nnnn for the customer code and %syymm-nnnn for the vendor code where yy is year, mm is month and nnnn is a sequencial auto-incrementing number with no break and no return to 0. LeopardNumRefModelDesc=客戶/供應商編號規則不受限制,此編碼可以隨時修改。(可開啟Elephant or Monkey模組來設定編碼規則) ManagingDirectors=主管(們)姓名 (執行長, 部門主管, 總裁...) MergeOriginThirdparty=重複的客戶/供應商 (你想刪除的客戶/供應商) diff --git a/htdocs/langs/zh_TW/compta.lang b/htdocs/langs/zh_TW/compta.lang index 82b499908a9..32228a05a2f 100644 --- a/htdocs/langs/zh_TW/compta.lang +++ b/htdocs/langs/zh_TW/compta.lang @@ -65,6 +65,7 @@ LT2SupplierIN=SGST購買品 VATCollected=已收取營業稅 StatusToPay=付款 SpecialExpensesArea=所有特殊付款區域 +VATExpensesArea=Area for all TVA payments SocialContribution=社會稅或財政稅 SocialContributions=社會稅或財政稅 SocialContributionsDeductibles=可抵扣的社會稅或財政稅 @@ -85,6 +86,7 @@ PaymentCustomerInvoice=客戶發票付款 PaymentSupplierInvoice=供應商發票付款 PaymentSocialContribution=社會/財政稅款付款 PaymentVat=營業稅付款 +AutomaticCreationPayment=Automatically record the payment ListPayment=付款清單 ListOfCustomerPayments=客戶付款清單 ListOfSupplierPayments=供應商付款清單 @@ -104,6 +106,8 @@ LT2PaymentES=IRPF付款 LT2PaymentsES=IRPF付款 VATPayment=營業稅付款 VATPayments=營業稅付款 +VATDeclarations=稅金申報 +VATDeclaration=稅金申報 VATRefund=營業稅退還 NewVATPayment=新營業稅付款 NewLocalTaxPayment=新%s稅金付款 @@ -134,9 +138,17 @@ NoWaitingChecks=沒有支票等待存入。 DateChequeReceived=支票接收日期 NbOfCheques=支票數量 PaySocialContribution=支付社會/財政稅 -ConfirmPaySocialContribution=您確定要將此社會稅或財政稅歸為已繳稅嗎? +PayVAT=支付稅金申報 +PaySalary=支付薪資卡 +ConfirmPaySocialContribution=您確定要將此社會稅或財政稅分類為已付款嗎? +ConfirmPayVAT=您確定要將此稅金申報單分類為已付款嗎? +ConfirmPaySalary=您確定要將此薪資卡分類為已付款嗎? DeleteSocialContribution=刪除社會或財政稅金 -ConfirmDeleteSocialContribution=您確定要刪除此社會/財政稅金嗎? +DeleteVAT=刪除稅金申報 +DeleteSalary=刪除薪資卡 +ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment ? +ConfirmDeleteVAT=Are you sure you want to delete this VAT declaration ? +ConfirmDeleteSalary=Are you sure you want to delete this salary? ExportDataset_tax_1=社會和財政稅金及繳稅 CalcModeVATDebt=<b>%s承諾會計營業稅%s</b>模式. CalcModeVATEngagement=<b>%s收入-支出營業稅%s</b>模式. @@ -163,14 +175,15 @@ RulesResultInOut=-它包括發票,費用,營業稅和薪水的實際付款 RulesCADue=-它包括客戶的到期發票,無論是否已付款。 <br>-它基於這些發票的開票日期。 <br> RulesCAIn=-包括從客戶收到的所有有效發票付款。 <br> -此基於這些發票的付款日期<br> RulesCATotalSaleJournal=它包括“銷售”日記帳中的所有信用額度。 +RulesSalesTurnoverOfIncomeAccounts=It includes (credit - debit) of lines for product accounts in group INCOME RulesAmountOnInOutBookkeepingRecord=它包括分類帳中具有“ 費用”或“ 收入”組的會計帳戶中的記錄 RulesResultBookkeepingPredefined=它包括分類帳中具有“ 支出”或“ 收入”組的會計帳戶中的記錄 RulesResultBookkeepingPersonalized=它顯示會計帳戶分類帳中的記錄, <b>並依個性化組別分組</b> SeePageForSetup=請參考選單<a href="%s">%s</a>進行設定 DepositsAreNotIncluded=-未包含預付款發票 DepositsAreIncluded=-包含預付款發票 -LT1ReportByMonth=Tax 2 report by month -LT2ReportByMonth=Tax 3 report by month +LT1ReportByMonth=稅率2每月報告 +LT2ReportByMonth=稅率3每月報告 LT1ReportByCustomers=合作方稅率2報告 LT2ReportByCustomers=合作方稅率3報告 LT1ReportByCustomersES=合作方RE報告 @@ -183,6 +196,7 @@ VATReportByThirdParties=合作方營業稅報告 VATReportByCustomers=客戶銷售稅報告 VATReportByCustomersInInputOutputMode=依客戶已收繳營業稅報告 VATReportByQuartersInInputOutputMode=依銷售稅率收取和繳納的報告 +VATReportShowByRateDetails=顯示此稅率的詳細訊息 LT1ReportByQuarters=依稅率2報稅 LT2ReportByQuarters=依稅率3報稅 LT1ReportByQuartersES=依RE稅率報稅 @@ -217,7 +231,7 @@ Pcg_subtype=Pcg子類型 InvoiceLinesToDispatch=調度發票行 ByProductsAndServices=依產品和服務 RefExt=外部參考 -ToCreateAPredefinedInvoice=要建立發票範本,請建立標準發票,然後在不對其進行驗證的情況下,點擊按鈕“ %s”。 +ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click on button "%s". LinkedOrder=連線到訂單 Mode1=方法1 Mode2=方法2 @@ -235,6 +249,8 @@ ACCOUNTING_ACCOUNT_CUSTOMER_Desc=合作方卡上定義的專用會計科目將 ACCOUNTING_ACCOUNT_SUPPLIER=供應商合作方使用的會計科目 ACCOUNTING_ACCOUNT_SUPPLIER_Desc=合作方卡上定義的專用會計科目將僅用於子帳會計。如果未定義第三方的專用供應商會計科目,則此科目將用於“總帳”,並作為“子帳”會計的預設值。 ConfirmCloneTax=確認複製社會/財政稅 +ConfirmCloneVAT=確認複製稅金申報 +ConfirmCloneSalary=Confirm the clone of a salary CloneTaxForNextMonth=為下個月複製此稅 SimpleReport=簡易報告 AddExtraReport=其他報告(增加外國和國家客戶報告) @@ -253,7 +269,8 @@ AccountingAffectation=會計分配 LastDayTaxIsRelatedTo=稅期的最後一天 VATDue=要求營業稅 ClaimedForThisPeriod=要求的期間 -PaidDuringThisPeriod=在此期間支付 +PaidDuringThisPeriod=Paid for this period +PaidDuringThisPeriodDesc=This is the sum of all payments linked to VAT declarations which have an end-of-period date in the selected date range ByVatRate=依營業稅率 TurnoverbyVatrate=依營業稅率開票的營業額 TurnoverCollectedbyVatrate=依營業稅率收取的營業額 @@ -264,6 +281,7 @@ PurchaseTurnoverCollected=採購營業額 RulesPurchaseTurnoverDue=-它包括供應商的到期發票,無論是否已付款。 <br>-它基於這些發票的發票日期。 <br> RulesPurchaseTurnoverIn=-它包括對供應商的所有有效發票付款。<br>-此基於這些發票的付款日期<br> RulesPurchaseTurnoverTotalPurchaseJournal=它包括採購日記帳中的所有借方行。 +RulesPurchaseTurnoverOfExpenseAccounts=It includes (debit - credit) of lines for product accounts in group EXPENSE ReportPurchaseTurnover=已開票營業額 ReportPurchaseTurnoverCollected=採購營業額 IncludeVarpaysInResults = 在報告中包括各種付款 diff --git a/htdocs/langs/zh_TW/ecm.lang b/htdocs/langs/zh_TW/ecm.lang index 155f77c6998..8f90c198407 100644 --- a/htdocs/langs/zh_TW/ecm.lang +++ b/htdocs/langs/zh_TW/ecm.lang @@ -41,3 +41,7 @@ FileNotYetIndexedInDatabase=檔案尚未編入資料庫(嘗試重新上傳) ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories ECMSetup=ECM設定 +GenerateImgWebp=Duplicate all images with another version with .webp format +ConfirmGenerateImgWebp=If you confirm, you will generate an image in .webp format for all images currently into this folder and its subfolder... +ConfirmImgWebpCreation=Confirm all images duplication +SucessConvertImgWebp=Images successfully duplicated diff --git a/htdocs/langs/zh_TW/errors.lang b/htdocs/langs/zh_TW/errors.lang index f4f7a6ed0cc..9cf8fe438b5 100644 --- a/htdocs/langs/zh_TW/errors.lang +++ b/htdocs/langs/zh_TW/errors.lang @@ -59,6 +59,7 @@ ErrorDirNotFound=未找到資料夾<b>%s</b>(錯誤的路徑,錯誤的權限 ErrorFunctionNotAvailableInPHP=此功能需要函數<b>%s</b>,但是無法在此PHP版本中使用。 ErrorDirAlreadyExists=具有此名稱的資料夾已經存在。 ErrorFileAlreadyExists=具有此名稱的檔案已經存在。 +ErrorDestinationAlreadyExists=Another file with the name <b>%s</b> already exists. ErrorPartialFile=伺服器未完整的收到檔案。 ErrorNoTmpDir=臨時指示%s不存在。 ErrorUploadBlockedByAddon=PHP / Apache的插件已阻擋上傳。 @@ -226,6 +227,7 @@ ErrorDuringChartLoad=載入會計科目表時出錯。如果幾個帳戶沒有 ErrorBadSyntaxForParamKeyForContent=參數keyforcontent的語法錯誤。必須具有以%s或%s開頭的值 ErrorVariableKeyForContentMustBeSet=錯誤,必須設定名稱為%s(帶有文字內容)或%s(帶有外部網址)的常數。 ErrorURLMustStartWithHttp=網址 %s 必須以 http://或https://開始 +ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https:// ErrorNewRefIsAlreadyUsed=錯誤,新參考已被使用 ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=錯誤,無法刪除連結到已關閉發票的付款。 ErrorSearchCriteriaTooSmall=搜尋條件太小。 @@ -255,6 +257,10 @@ ErrorPublicInterfaceNotEnabled=未啟用公共界面 ErrorLanguageRequiredIfPageIsTranslationOfAnother=The language of new page must be defined if it is set as a translation of another page ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=The language of new page must not be the source language if it is set as a translation of another page ErrorAParameterIsRequiredForThisOperation=A parameter is mandatory for this operation +ErrorDateIsInFuture=Error, the date can't be in the future +ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory +ErrorAPercentIsRequired=Error, please fill in the percentage correctly +ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=您的PHP參數upload_max_filesize(%s)高於PHP參數post_max_size(%s)。這不是相同的設定。 @@ -287,3 +293,6 @@ WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into E WarningTheHiddenOptionIsOn=Warning, the hidden option <b>%s</b> 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 WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. +WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. +ErrorActionCommPropertyUserowneridNotDefined=User's owner is required +ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary diff --git a/htdocs/langs/zh_TW/externalsite.lang b/htdocs/langs/zh_TW/externalsite.lang index 31329ec4e36..1cfac37b239 100644 --- a/htdocs/langs/zh_TW/externalsite.lang +++ b/htdocs/langs/zh_TW/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite ExternalSiteSetup=設定連結到外部網站 -ExternalSiteURL=外部網站網址 +ExternalSiteURL=External Site URL of HTML iframe content ExternalSiteModuleNotComplete=外部網站模組設定不正確。 ExampleMyMenuEntry=我的選單條目 diff --git a/htdocs/langs/zh_TW/mails.lang b/htdocs/langs/zh_TW/mails.lang index c8ad519aa7c..2e602c47207 100644 --- a/htdocs/langs/zh_TW/mails.lang +++ b/htdocs/langs/zh_TW/mails.lang @@ -49,7 +49,7 @@ WarningNoEMailsAdded=沒有新的電子郵件可增加到收件人清單。 ConfirmValidMailing=您確定要驗證此電子郵件嗎? ConfirmResetMailing=警告,通過重新初始化電子郵件<b>%s</b> ,您可以批次發送此電子郵件。你確定要這麼做嗎? ConfirmDeleteMailing=您確定要刪除此電子郵件嗎? -NbOfUniqueEMails=獨特電子郵件的數量 +NbOfUniqueEMails=唯一電子郵件的數量 NbOfEMails=電子郵件數量 TotalNbOfDistinctRecipients=不重複收件人數量 NoTargetYet=尚未定義收件人(在“收件人”分頁上) @@ -126,7 +126,7 @@ TagMailtoEmail=收件人電子郵件(包括html“ mailto:”連結) NoEmailSentBadSenderOrRecipientEmail=沒有發送電子郵件。寄件人或收件人的電子郵件不正確。驗證用戶資料。 # Module Notifications Notifications=通知 -NotificationsAuto=自動通知。 +NotificationsAuto=自動通知 NoNotificationsWillBeSent=沒有為此類型事件和公司計畫的自動電子郵件通知 ANotificationsWillBeSent=1條自動通知將以電子郵件寄送 SomeNotificationsWillBeSent=%s的自動通知將以電子郵件寄送 @@ -164,9 +164,9 @@ AdvTgtCreateFilter=建立過濾器 AdvTgtOrCreateNewFilter=新過濾器名稱 NoContactWithCategoryFound=找不到具有類別的聯絡人/地址 NoContactLinkedToThirdpartieWithCategoryFound=找不到具有類別的聯絡人/地址 -OutGoingEmailSetup=Outgoing emails -InGoingEmailSetup=Incoming emails -OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +OutGoingEmailSetup=外送電子郵件 +InGoingEmailSetup=收到的電子郵件 +OutGoingEmailSetupForEmailing=外送電子郵件(用於模組%s) DefaultOutgoingEmailSetup=與全域寄送電子郵件設定相同的配置 Information=資訊 ContactsWithThirdpartyFilter=帶有合作方過濾器的聯絡人 @@ -175,5 +175,5 @@ Answered=已回覆 IsNotAnAnswer=未回應(原始電子郵件) IsAnAnswer=是一封原始電子郵件的回應 RecordCreatedByEmailCollector=由電子郵件收集器%s從電子郵件%s建立的記錄 -DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing -DefaultStatusEmptyMandatory=Empty but mandatory +DefaultBlacklistMailingStatus=垃圾批量電子郵件的預設聯絡狀態 +DefaultStatusEmptyMandatory=必填 diff --git a/htdocs/langs/zh_TW/main.lang b/htdocs/langs/zh_TW/main.lang index 74cc374cb06..4cdffe835d3 100644 --- a/htdocs/langs/zh_TW/main.lang +++ b/htdocs/langs/zh_TW/main.lang @@ -87,7 +87,7 @@ FileWasNotUploaded=所選定的檔案尚未上傳。點選 "附加檔案"。 NbOfEntries=項目數量 GoToWikiHelpPage=讀取線上幫助 (需要連上網路) GoToHelpPage=讀取幫助 -DedicatedPageAvailable=There is a dedicated help page related to your current screen +DedicatedPageAvailable=有一個與您目前畫面相關的專用幫助頁面 HomePage=首頁 RecordSaved=記錄已儲存 RecordDeleted=記錄已刪除 @@ -224,7 +224,7 @@ Value=值 PersonalValue=個人設定值 NewObject=新 %s NewValue=新值 -OldValue=Old value %s +OldValue=舊數值%s CurrentValue=目前值 Code=代碼 Type=類型 @@ -272,12 +272,13 @@ DateStart=開始日期 DateEnd=結束日期 DateCreation=建立日期 DateCreationShort=建立日 -IPCreation=Creation IP +IPCreation=建立IP DateModification=修改日期 DateModificationShort=修改日 -IPModification=Modification IP +IPModification=修改IP DateLastModification=最新修改日期 DateValidation=驗證日期 +DateSigning=Signing date DateClosing=關閉日期 DateDue=截止日期 DateValue=值的日期 @@ -361,7 +362,7 @@ UnitPriceHTCurrency=單價(不含)(貨幣) UnitPriceTTC=單位價格 PriceU=單價 PriceUHT=單價(淨) -PriceUHTCurrency=單價(貨幣) +PriceUHTCurrency=U.P (net) (currency) PriceUTTC=單價(含稅) Amount=金額 AmountInvoice=發票金額 @@ -389,6 +390,8 @@ AmountTotal=總金額 AmountAverage=平均金額 PriceQtyMinHT=最小數量價格(不含稅) PriceQtyMinHTCurrency=最小數量價格(不含稅)(貨幣) +PercentOfOriginalObject=Percent of original object +AmountOrPercent=Amount or percent Percentage=百分比 Total=總計 SubTotal=小計 @@ -438,7 +441,7 @@ RemainToPay=保持付款 Module=模組/應用程式 Modules=模組/應用程式 Option=選項 -Filters=Filters +Filters=過濾器 List=清單 FullList=全部清單 FullConversation=全部轉換 @@ -656,7 +659,7 @@ SupplierPreview=供應商預覽資訊 ShowCustomerPreview=顯示客戶預覽資訊 ShowSupplierPreview=顯示供應商預覽 RefCustomer=參考客戶 -InternalRef=Internal ref. +InternalRef=內部參考 Currency=貨幣 InfoAdmin=管理員資訊 Undo=復原 @@ -724,7 +727,7 @@ MenuMembers=會員 MenuAgendaGoogle=Google 行事曆 MenuTaxesAndSpecialExpenses=稅金|特別費用 ThisLimitIsDefinedInSetup=Dolibarr 的限制(選單 首頁 - 設定 - 安全): %s Kb, PHP的限制:%s Kb -NoFileFound=此資料夾沒有任何檔案 +NoFileFound=No documents uploaded CurrentUserLanguage=目前語言 CurrentTheme=目前主題 CurrentMenuManager=目前選單管理器 @@ -899,8 +902,10 @@ ViewAccountList=檢視總帳 ViewSubAccountList=檢視子帳戶總帳 RemoveString=移除字串‘%s’ SomeTranslationAreUncomplete=提供的某些語言可能僅被部分翻譯,或者可能包含錯誤。請通過註冊<a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a>來進行改進,以幫助修正您的語言。 -DirectDownloadLink=直接下載連結(公共/外部) -DirectDownloadInternalLink=直接下載連結(需要登入及存取權限) +DirectDownloadLink=Public download link +PublicDownloadLinkDesc=Only the link is required to download the file +DirectDownloadInternalLink=Private download link +PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file Download=下載 DownloadDocument=下載文件 ActualizeCurrency=更新匯率 @@ -1013,6 +1018,7 @@ SearchIntoContacts=通訊錄 SearchIntoMembers=會員 SearchIntoUsers=用戶 SearchIntoProductsOrServices=產品或服務 +SearchIntoBatch=Lots / Serials SearchIntoProjects=專案 SearchIntoMO=製造訂單 SearchIntoTasks=任務 @@ -1049,12 +1055,13 @@ KeyboardShortcut=快捷鍵 AssignedTo=指定人 Deletedraft=刪除草稿 ConfirmMassDraftDeletion=草稿批次刪除確認 -FileSharedViaALink=透過連線分享檔案 +FileSharedViaALink=File shared with a public link SelectAThirdPartyFirst=先選擇合作方(客戶/供應商)... YouAreCurrentlyInSandboxMode=您目前在 %s "沙盒" 模式 Inventory=庫存 AnalyticCode=分析代碼 TMenuMRP=製造資源計劃(MRP) +ShowCompanyInfos=Show company infos ShowMoreInfos=顯示更多信息 NoFilesUploadedYet=請先上傳文件 SeePrivateNote=查看私人筆記 @@ -1115,8 +1122,10 @@ OutOfDate=過期 EventReminder=事件提醒 UpdateForAllLines=更新所有行 OnHold=On hold -Civility=Civility -AffectTag=Affect Tag -ConfirmAffectTag=Bulk Tag Affect -ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)? -CategTypeNotFound=No tag type found for type of records +Civility=稱謂或頭銜 +AffectTag=影響標籤 +ConfirmAffectTag=批量標籤影響 +ConfirmAffectTagQuestion=您確定要影響對%s所選記錄的標籤嗎? +CategTypeNotFound=找不到記錄類型的標籤類型 +CopiedToClipboard=Copied to clipboard +InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration. diff --git a/htdocs/langs/zh_TW/margins.lang b/htdocs/langs/zh_TW/margins.lang index aec566adc67..b3cc74b2402 100644 --- a/htdocs/langs/zh_TW/margins.lang +++ b/htdocs/langs/zh_TW/margins.lang @@ -22,7 +22,7 @@ ProductService=產品或服務 AllProducts=所有產品和服務 ChooseProduct/Service=選擇產品或服務 ForceBuyingPriceIfNull=如果未定義,強制將買入/成本價轉換為賣價 -ForceBuyingPriceIfNullDetails=如果未定義購買/成本價格,並且此選項為“ ON”,則利潤為零上架(購買/成本價格=售價),否則(“ OFF”),利潤等於建議的默認值。 +ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found). MARGIN_METHODE_FOR_DISCOUNT=全球折扣的利潤規則 UseDiscountAsProduct=作為產品 UseDiscountAsService=作為服務 diff --git a/htdocs/langs/zh_TW/members.lang b/htdocs/langs/zh_TW/members.lang index d31b8fa9640..14c60c9ba39 100644 --- a/htdocs/langs/zh_TW/members.lang +++ b/htdocs/langs/zh_TW/members.lang @@ -21,10 +21,12 @@ MembersListToValid=草案會員清單(待確認) MembersListValid=有效會員清單 MembersListUpToDate=最新訂閱的有效會員清單 MembersListNotUpToDate=訂閱過期的有效會員清單 +MembersListExcluded=List of excluded members MembersListResiliated=已被終止會員清單 MembersListQualified=合格會員清單 MenuMembersToValidate=草案會員 MenuMembersValidated=已驗證會員 +MenuMembersExcluded=Excluded members MenuMembersResiliated=已終止會員 MembersWithSubscriptionToReceive=可接收訂閱會員 MembersWithSubscriptionToReceiveShort=接收訂閱 @@ -47,9 +49,12 @@ MemberStatusActiveLate=訂閱已過期 MemberStatusActiveLateShort=已過期 MemberStatusPaid=訂閱最新 MemberStatusPaidShort=最新 +MemberStatusExcluded=Excluded member +MemberStatusExcludedShort=Excluded MemberStatusResiliated=已終止成員 MemberStatusResiliatedShort=已終止 MembersStatusToValid=草案會員 +MembersStatusExcluded=Excluded members MembersStatusResiliated=已終止會員 MemberStatusNoSubscription=已驗證(無需訂閱) MemberStatusNoSubscriptionShort=已驗證 @@ -82,6 +87,8 @@ Physical=自然人 Moral=法人 MorAndPhy=法人與自然人 Reenable=重新啟用 +ExcludeMember=Exclude a member +ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=終止會員 ConfirmResiliateMember=您確定要終止此會員嗎? DeleteMember=刪除會員 @@ -137,6 +144,7 @@ DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=電子郵件範本,用於會員 DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=電子郵件範本,用於新的訂閱記錄時向會員發送電子郵件 DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=電子郵件範本, 用於訂閱即將到期時發送電子郵件提醒 DescADHERENT_EMAIL_TEMPLATE_CANCELATION=電子郵件範本,用於在會員取消時向會員發送電子郵件 +DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion DescADHERENT_MAIL_FROM=自動發送電子郵件之發件人電子郵件 DescADHERENT_ETIQUETTE_TYPE=標籤頁格式 DescADHERENT_ETIQUETTE_TEXT=會員地址列表文字 @@ -162,6 +170,7 @@ DocForLabels=產生地址表 SubscriptionPayment=訂閱付款 LastSubscriptionDate=最新訂閱付款的日期 LastSubscriptionAmount=最新訂閱金額 +LastMemberType=Last Member type MembersStatisticsByCountries=會員統計(國家/城市) MembersStatisticsByState=會員統計(州/省) MembersStatisticsByTown=會員統計(城鎮) diff --git a/htdocs/langs/zh_TW/modulebuilder.lang b/htdocs/langs/zh_TW/modulebuilder.lang index bffd8ecac21..3e33eeafd60 100644 --- a/htdocs/langs/zh_TW/modulebuilder.lang +++ b/htdocs/langs/zh_TW/modulebuilder.lang @@ -133,7 +133,9 @@ IncludeDocGeneration=我想從項目產生一些文件 IncludeDocGenerationHelp=如果選中此選項,將產生一些代碼以在記錄上增加“產生文件”框。 ShowOnCombobox=在組合框中顯示數值 KeyForTooltip=Key for tooltip -CSSClass=CSS類別 +CSSClass=CSS for edit/create form +CSSViewClass=CSS for read form +CSSListClass=CSS for list NotEditable=無法編輯 ForeignKey=外部金鑰 TypeOfFieldsHelp=Type of fields:<br>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) diff --git a/htdocs/langs/zh_TW/orders.lang b/htdocs/langs/zh_TW/orders.lang index 1213c4f6bdb..7d2f56c434e 100644 --- a/htdocs/langs/zh_TW/orders.lang +++ b/htdocs/langs/zh_TW/orders.lang @@ -16,6 +16,8 @@ ToOrder=製作訂單 MakeOrder=製作訂單 SupplierOrder=採購訂單 SuppliersOrders=採購訂單 +SaleOrderLines=Sale order lines +PurchaseOrderLines=Puchase order lines SuppliersOrdersRunning=目前的採購訂單 CustomerOrder=銷售訂單 CustomersOrders=銷售訂單 diff --git a/htdocs/langs/zh_TW/other.lang b/htdocs/langs/zh_TW/other.lang index 9ee8202b562..e424cc39c42 100644 --- a/htdocs/langs/zh_TW/other.lang +++ b/htdocs/langs/zh_TW/other.lang @@ -114,6 +114,7 @@ DemoCompanyAll=有多項活動的公司(所有主要模組) CreatedBy=由%s建立 ModifiedBy=由%s修改 ValidatedBy=由%s驗證 +SignedBy=Signed by %s ClosedBy=由%s關閉 CreatedById=建立的用戶ID ModifiedById=進行最新更改的用戶ID @@ -244,6 +245,7 @@ NewKeyIs=這是您的新登入密碼 NewKeyWillBe=您用於登入軟體的新密鑰將為 ClickHereToGoTo=點擊這裡前往%s YouMustClickToChange=您必須先點擊以下連結驗證此密碼更改 +ConfirmPasswordChange=Confirm password change ForgetIfNothing=如果您沒有請求此更改,請忽略此電子郵件。您的憑證仍保持安全狀態。 IfAmountHigherThan=如果金額高於<strong> %s </strong> SourcesRepository=資料庫 diff --git a/htdocs/langs/zh_TW/productbatch.lang b/htdocs/langs/zh_TW/productbatch.lang index 175d9119178..72db592eb05 100644 --- a/htdocs/langs/zh_TW/productbatch.lang +++ b/htdocs/langs/zh_TW/productbatch.lang @@ -1,8 +1,10 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=使用批次/序號數字 -ProductStatusOnBatch=是的(需要批次/序號) +ProductStatusOnBatch=Yes (lot required) +ProductStatusOnSerial=Yes (unique serial number required) ProductStatusNotOnBatch=不是(不使用批次/序號) -ProductStatusOnBatchShort=Yes +ProductStatusOnBatchShort=Lot +ProductStatusOnSerialShort=Serial ProductStatusNotOnBatchShort=No Batch=批次/序號 atleast1batchfield=有效日期或銷售日期或批次/序號 @@ -22,3 +24,12 @@ ProductLotSetup=批次/序號模組的設定 ShowCurrentStockOfLot=顯示關聯產品/批次的目前庫存 ShowLogOfMovementIfLot=顯示產品/批次的移動記錄 StockDetailPerBatch=每批次的庫存詳細資料 +SerialNumberAlreadyInUse=Serial number %s is already used for product %s +TooManyQtyForSerialNumber=You can only have one product %s for serial number %s +BatchLotNumberingModules=Options for automatic generation of batch products managed by lots +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned + diff --git a/htdocs/langs/zh_TW/products.lang b/htdocs/langs/zh_TW/products.lang index 6b2594c3473..7e05d098a4a 100644 --- a/htdocs/langs/zh_TW/products.lang +++ b/htdocs/langs/zh_TW/products.lang @@ -104,25 +104,25 @@ SetDefaultBarcodeType=設定條碼類型 BarcodeValue=條碼值 NoteNotVisibleOnBill=註解(不會在發票或提案/建議書上顯示) ServiceLimitedDuration=如果產品是一種有期限的服務: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=填寫上次服務日期 MultiPricesAbility=每個產品/服務有多個價格區段(每個客戶屬於一個價格區段) MultiPricesNumPrices=價格數量 DefaultPriceType=增加新銷售價格時的每個預設價格(含稅和不含稅)基準 -AssociatedProductsAbility=Enable Kits (set of several products) -VariantsAbility=Enable Variants (variations of products, for example color, size) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +AssociatedProductsAbility=啟用套件(幾種產品的組合) +VariantsAbility=啟用變數(產品變數,例如顏色,尺寸) +AssociatedProducts=套件 +AssociatedProductsNumber=構成此套件的產品數量 ParentProductsNumber=母套裝產品數 ParentProducts=母產品 -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=如果為0,則此產品不是套件 +IfZeroItIsNotUsedByVirtualProduct=如果為0,則表示此產品未用於任何套件 KeywordFilter=關鍵字過濾 CategoryFilter=分類篩選器 ProductToAddSearch=用搜索新增產品 NoMatchFound=未找到符合的項目 ListOfProductsServices=產品/服務清單 -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=組成此套件的產品/服務清單 +ProductParentList=含有此產品的套件清單 ErrorAssociationIsFatherOfThis=所選產品之一是當前產品的母產品 DeleteProduct=刪除一個產品/服務 ConfirmDeleteProduct=你確定要刪除這個產品/服務? @@ -141,6 +141,7 @@ VATRateForSupplierProduct=營業稅率(此供應商/產品) DiscountQtyMin=此數量的折扣。 NoPriceDefinedForThisSupplier=沒有此供應商/產品定義的價格/數量 NoSupplierPriceDefinedForThisProduct=沒有定義此產品供應商價格/數量 +PredefinedItem=Predefined item PredefinedProductsToSell=預定義產品 PredefinedServicesToSell=預定義服務 PredefinedProductsAndServicesToSell=預定義的可銷售產品/服務 @@ -168,13 +169,13 @@ BuyingPrices=採購價格 CustomerPrices=客戶價格 SuppliersPrices=供應商價格 SuppliersPricesOfProductsOrServices=供應商價格(產品或服務) -CustomCode=Customs|Commodity|HS code +CustomCode=海關|商品| HS碼 CountryOrigin=原產地 -RegionStateOrigin=Region origin -StateOrigin=State|Province origin +RegionStateOrigin=原始產地 +StateOrigin=州|省份 Nature=產品性質(材料/成品) NatureOfProductShort=產品性質 -NatureOfProductDesc=Raw material or finished product +NatureOfProductDesc=產品原料或成品 ShortLabel=短標籤 Unit=單位 p=u. @@ -242,7 +243,7 @@ AlwaysUseFixedPrice=使用固定價格 PriceByQuantity=數量不同的價格 DisablePriceByQty=停用數量價格 PriceByQuantityRange=數量範圍 -MultipriceRules=Automatic prices for segment +MultipriceRules=價格自動分段 UseMultipriceRules=使用價格區段規則(在產品模組設定中定義),根據第一區段自動計算所有其他區段的價格 PercentVariationOver=%%超過%s上的變化 PercentDiscountOver=%%超過%s的折扣 @@ -290,7 +291,7 @@ PriceExpressionEditorHelp5=可用的全域值: PriceMode=價格模式 PriceNumeric=號碼 DefaultPrice=預設價格 -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=舊預設價格紀錄 ComposedProductIncDecStock=母產品變更時增加/減少庫存 ComposedProduct=子產品 MinSupplierPrice=最低採購價格 @@ -313,7 +314,7 @@ LastUpdated=最新更新 CorrectlyUpdated=更新成功 PropalMergePdfProductActualFile=用於增加到PDF Azur的文件是 PropalMergePdfProductChooseFile=選擇PDF文件 -IncludingProductWithTag=包含有標籤的產品/服務 +IncludingProductWithTag=Include products/services with tag DefaultPriceRealPriceMayDependOnCustomer=預設價格,實際價格可能取決於客戶 WarningSelectOneDocument=請至少選擇一份文件 DefaultUnitToShow=單位 @@ -343,7 +344,7 @@ UseProductFournDesc=增加供應商已定義產品描述的功能,以針對客 ProductSupplierDescription=產品的供應商說明 UseProductSupplierPackaging=按照供應商價格使用包裝(在供應商文件中增加/更新行時,根據供應商價格上設定的包裝重新計算數量) PackagingForThisProduct=包裝 -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +PackagingForThisProductDesc=根據供應商訂單,您將自動訂購此數量(或此數量的倍數)。不能少於最低購買數量 QtyRecalculatedWithPackaging=根據供應商的包裝重新計算了生產線的數量 #Attributes @@ -367,9 +368,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 +ImpactOnPriceLevel=影響價格層級%s +ApplyToAllPriceImpactLevel= 使用於所有層級 +ApplyToAllPriceImpactLevelHelp=點擊此處,可以在所有層級上設定相同的價格影響 WeightImpact=重量影響 NewProductAttribute=新屬性 NewProductAttributeValue=新屬性值 diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 81804cf8dcf..2dafa3a1e88 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -89,6 +89,7 @@ TimeConsumed=已消耗 ListOfTasks=任務清單 GoToListOfTimeConsumed=前往工作時間清單 GanttView=甘特圖 +ListWarehouseAssociatedProject=List of warehouses associated to the project ListProposalsAssociatedProject=與專案有關的商業建議書清單 ListOrdersAssociatedProject=與專案相關的銷售訂單清單 ListInvoicesAssociatedProject=與專案相關的客戶發票清單 @@ -268,3 +269,7 @@ OneLinePerTask=每個任務一行 OneLinePerPeriod=每個週期一行 RefTaskParent=參考上層任務 ProfitIsCalculatedWith=利潤計算是使用 +AddPersonToTask=Add also to tasks +UsageOrganizeEvent=Usage: Event Organization +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress) +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects. diff --git a/htdocs/langs/zh_TW/propal.lang b/htdocs/langs/zh_TW/propal.lang index b9822379360..ba1758df186 100644 --- a/htdocs/langs/zh_TW/propal.lang +++ b/htdocs/langs/zh_TW/propal.lang @@ -45,9 +45,8 @@ ActionsOnPropal=提案/建議書上的事件 RefProposal=商業提案/建議書參考 SendPropalByMail=透過郵件發送商業提案/建議書 DatePropal=提案/建議書日期 -DateEndPropal=有效期結束日期 +DateEndPropal=有效期 ValidityDuration=有效期 -CloseAs=將狀態設定為 SetAcceptedRefused=設定為已接受/已拒絕 ErrorPropalNotFound=找不到提案/建議書 %s AddToDraftProposals=加入到提案/建議書草稿 @@ -60,8 +59,9 @@ ConfirmClonePropal=您確定您要完整複製商業提案/建議書<b>%s</b>? ConfirmReOpenProp=您確定要再打開商業提案/建議書<b>%s</b>嗎? ProposalsAndProposalsLines=商業提案/建議書和行 ProposalLine=提案/建議書行 -AvailabilityPeriod=有效期展延 -SetAvailability=設定有效期展延 +ProposalLines=Proposal lines +AvailabilityPeriod=交貨期 +SetAvailability=設定交貨期 AfterOrder=訂單後 OtherProposals=其他提案/建議書 ##### Availability ##### @@ -71,9 +71,9 @@ AvailabilityTypeAV_2W=2個星期 AvailabilityTypeAV_3W=3個星期 AvailabilityTypeAV_1M=1個月 ##### Types de contacts ##### -TypeContact_propal_internal_SALESREPFOLL=代表性的後續提案/建議書 +TypeContact_propal_internal_SALESREPFOLL=提案/建議書聯絡人 TypeContact_propal_external_BILLING=客戶發票聯絡人 -TypeContact_propal_external_CUSTOMER=後續提案/建議書的客戶聯絡人 +TypeContact_propal_external_CUSTOMER=提案/建議書客戶聯絡人 TypeContact_propal_external_SHIPPING=客戶交貨聯絡人 # Document models DocModelAzurDescription=完整的提案/建議書模型(Cyan範本的舊範本) @@ -84,4 +84,9 @@ DefaultModelPropalClosed=當關閉企業提案/建議書時使用的預設範本 ProposalCustomerSignature=書面驗收,公司印章,日期和簽名 ProposalsStatisticsSuppliers=供應商提案/建議書統計 CaseFollowedBy=案件追蹤者 -SignedOnly=Signed only +SignedOnly=僅簽名 +IdProposal=方案/提案編號 +IdProduct=產品編號 +PrParentLine=方案/提案主行 +LineBuyPriceHT=購買價格扣除稅額 + diff --git a/htdocs/langs/zh_TW/stocks.lang b/htdocs/langs/zh_TW/stocks.lang index d28483b5676..db37cf3b2c5 100644 --- a/htdocs/langs/zh_TW/stocks.lang +++ b/htdocs/langs/zh_TW/stocks.lang @@ -18,9 +18,9 @@ DeleteSending=刪除傳送 Stock=庫存 Stocks=庫存 MissingStocks=缺少庫存 -StockAtDate=當時的庫存 -StockAtDateInPast=過去的日期 -StockAtDateInFuture=將來的日期 +StockAtDate=歷史庫存 +StockAtDateInPast=Date in the past +StockAtDateInFuture=Date in the future StocksByLotSerial=依批次/序號的庫存 LotSerial=批次/序號 LotSerialList=批次/序號清單 @@ -37,8 +37,8 @@ AllWarehouses=所有倉庫 IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock IncludeAlsoDraftOrders=包括草稿訂單 Location=位置 -LocationSummary=簡稱位置 -NumberOfDifferentProducts=產品數量 +LocationSummary=Short name of location +NumberOfDifferentProducts=Number of unique products NumberOfProducts=產品總數 LastMovement=最新變動 LastMovements=最新變動(s) @@ -62,7 +62,8 @@ EnhancedValueOfWarehouses=倉庫價值 UserWarehouseAutoCreate=新增用戶時自動新增用戶倉庫 AllowAddLimitStockByWarehouse=除了每個產品的最小和期望庫存值之外,還管理每個配對(產品倉庫)的最小和期望庫存值 RuleForWarehouse=倉庫規則 -WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal +WarehouseAskWarehouseOnThirparty=Set a warehouse on third-party +WarehouseAskWarehouseDuringPropal=為商業提案/建議書設定一個倉庫 WarehouseAskWarehouseDuringOrder=在銷售訂單上設定一個倉庫 UserDefaultWarehouse=在用戶上設定一個倉庫 MainDefaultWarehouse=預設倉庫 @@ -93,19 +94,20 @@ StockLimit=庫存限制的警報 StockLimitDesc=(空白)表示沒有警告。 可將<br>0用作庫存警告。 PhysicalStock=實體庫存 RealStock=實際庫存 -RealStockDesc=實體/實際庫存是當前倉庫中的庫存。 +RealStockDesc=實體/實際庫存是目前倉庫中的庫存。 RealStockWillAutomaticallyWhen=實際庫存將根據以下規則(在“庫存”模組中定義)進行修改: VirtualStock=虛擬庫存 VirtualStockAtDate=截至日期的虛擬庫存 -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockAtDateDesc=Virtual stock once all the pending orders that are planned to be processed before the chosen 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) +AtDate=目前 IdWarehouse=編號倉庫 DescWareHouse=說明倉庫 LieuWareHouse=本地化倉庫 WarehousesAndProducts=倉庫和產品 WarehousesAndProductsBatchDetail=倉庫和產品(有批次/序列的詳細信息) AverageUnitPricePMPShort=加權平均價格 -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=The input average unit price we had to expense to get 1 unit of product into our stock. SellPriceMin=銷售單價 EstimatedStockValueSellShort=銷售價值 EstimatedStockValueSell=銷售價值 @@ -145,7 +147,7 @@ Replenishments=補貨 NbOfProductBeforePeriod=選則期間以前產品%s庫存的數量(<%s) NbOfProductAfterPeriod=選則期間之後產品%s庫存的數量(> %s) MassMovement=全部活動 -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". +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 on "%s". RecordMovement=記錄轉移 ReceivingForSameOrder=此訂單的收據 StockMovementRecorded=庫存變動已記錄 @@ -154,7 +156,7 @@ StockMustBeEnoughForInvoice=庫存水平必須足以將產品/服務新增到發 StockMustBeEnoughForOrder=庫存水平必須足以將產品/服務新增到訂單中(將此筆加到訂單中時,無論自動庫存更改的規則如何,都要對當前實際庫存進行檢查) StockMustBeEnoughForShipment= 庫存水平必須足以將產品/服務新增到發貨中(將此筆加到發貨中時,無論自動庫存更改的規則如何,都要對當前實際庫存進行檢查) MovementLabel=產品移動標籤 -TypeMovement=移動類型 +TypeMovement=Direction of movement DateMovement=移動日期 InventoryCode=移動或庫存代碼 IsInPackage=包含在包裝中 @@ -183,6 +185,7 @@ inventoryCreatePermission=產生新庫存 inventoryReadPermission=檢視庫存 inventoryWritePermission=更新庫存 inventoryValidatePermission=驗證庫存 +inventoryDeletePermission=刪除庫存 inventoryTitle=庫存 inventoryListTitle=庫存(s) inventoryListEmpty=沒有進行中的庫存 @@ -235,10 +238,20 @@ StockIsRequiredToChooseWhichLotToUse=庫存需要選擇要使用的批次 ForceTo=強制到 AlwaysShowFullArbo=在倉庫連結的彈出窗口上顯示完整的倉庫樹狀圖(警告:這可能會大大降低性能) StockAtDatePastDesc=您可以在此處檢視給定之過去日期的庫存(實際庫存) -StockAtDateFutureDesc=您可以在此處檢視給定之未來日期的庫存(虛擬庫存) +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in the future CurrentStock=目前庫存 InventoryRealQtyHelp=將值設定為0以重置數量<br>保持欄位為空或刪除行以保持不變 -UpdateByScaning=以掃描更新 +UpdateByScaning=Fill real qty by scaning UpdateByScaningProductBarcode=掃描更新(產品條碼) UpdateByScaningLot=掃描更新(批次|序列條碼) DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. +ImportFromCSV=匯入CSV移動清單 +ChooseFileToImport=上傳檔案,然後點擊%s圖示以選擇要匯入的檔案... +SelectAStockMovementFileToImport=選擇要匯入的庫存移動檔案 +InfoTemplateImport=Uploaded file needs to have this format (* are mandatory fields):<br>Source Warehouse* | Target Warehouse* | Product* | Quantity* | Lot/serial number<br>CSV character separator must be "<b>%s</b>" +LabelOfInventoryMovemement=%s的庫存 +ReOpen=重新打開 +ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. +ObjectNotFound=%s not found +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Fill real quantity with expected quantity diff --git a/htdocs/langs/zh_TW/suppliers.lang b/htdocs/langs/zh_TW/suppliers.lang index 54f6e586026..1c8d77181c5 100644 --- a/htdocs/langs/zh_TW/suppliers.lang +++ b/htdocs/langs/zh_TW/suppliers.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=供應商 SuppliersInvoice=供應商發票 +SupplierInvoices=供應商發票 ShowSupplierInvoice=顯示供應商發票 NewSupplier=新供應商 History=歷史紀錄 @@ -38,7 +39,7 @@ MenuOrdersSupplierToBill=採購訂單發票 NbDaysToDelivery=交貨延遲時間(天) DescNbDaysToDelivery=此訂單中產品的最長交貨延遲時間 SupplierReputation=供應商信譽 -ReferenceReputation=Reference reputation +ReferenceReputation=參考商譽 DoNotOrderThisProductToThisSupplier=不訂購 NotTheGoodQualitySupplier=低品質 ReputationForThisProduct=信譽 diff --git a/htdocs/langs/zh_TW/ticket.lang b/htdocs/langs/zh_TW/ticket.lang index 8ce934d6b3e..1776b33f613 100644 --- a/htdocs/langs/zh_TW/ticket.lang +++ b/htdocs/langs/zh_TW/ticket.lang @@ -70,6 +70,8 @@ Deleted=已刪除 # Dict Type=類型 Severity=嚴重程度 +TicketGroupIsPublic=Group is public +TicketGroupIsPublicDesc=If a ticket group is public, it will be visible in the form when creating a ticket from the public interface # Email templates MailToSendTicketMessage=從服務單訊息發送電子郵件 @@ -114,8 +116,8 @@ TicketsShowModuleLogo=在公共界面中顯示模組的商標 TicketsShowModuleLogoHelp=啟用此選項可在公共界面的頁面中隱藏商標模組 TicketsShowCompanyLogo=在公共界面上顯示公司商標 TicketsShowCompanyLogoHelp=啟用此選項可在公共界面的頁面中隱藏主要公司的商標 -TicketsEmailAlsoSendToMainAddress=同時發送通知到主要電子郵件地址 -TicketsEmailAlsoSendToMainAddressHelp=啟用此選項可將電子郵件發送到“通知電子郵件來源”地址(請參閱下面的設定) +TicketsEmailAlsoSendToMainAddress=Also send a notification to the main email address +TicketsEmailAlsoSendToMainAddressHelp=Enable this option to also send an email to the address defined into setup "%s" (see tab "%s") TicketsLimitViewAssignedOnly=限制顯示分配給目前用戶的服務單。(對外部用戶無效,始終被限制於他們所依賴的合作方) TicketsLimitViewAssignedOnlyHelp=僅顯示分配給目前用戶的服務單。不適用於具有服務單管理權限的用戶。 TicketsActivatePublicInterface=啟用公共界面 @@ -123,13 +125,13 @@ TicketsActivatePublicInterfaceHelp=公共界面允許任何訪客建立服務單 TicketsAutoAssignTicket=自動分配建立服務單的用戶 TicketsAutoAssignTicketHelp=建立服務單時,可以自動將用戶分配給服務單。 TicketNumberingModules=服務單編號模組 -TicketsModelModule=Document templates for tickets +TicketsModelModule=服務單的文件範本 TicketNotifyTiersAtCreation=建立時通知合作方 TicketsDisableCustomerEmail=從公共界面建立服務單時,始終禁用電子郵件 -TicketsPublicNotificationNewMessage=當有新訊息時寄送電子郵件 +TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is added to a ticket TicketsPublicNotificationNewMessageHelp=當公共界面有新增訊息時寄送電子郵件(給已分配用戶或寄送通知電子郵件給(更新)與/或通知電子郵件給) TicketPublicNotificationNewMessageDefaultEmail=通知電子郵件寄送到(更新) -TicketPublicNotificationNewMessageDefaultEmailHelp=如果沒有分配服務單或用戶沒有電子郵件,請通過電子郵件向此信箱寄送新消息通知。 +TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email. # # Index & list page # @@ -302,3 +304,13 @@ BoxLastModifiedTicket=最新修改的服務單 BoxLastModifiedTicketDescription=最新%s張修改的服務單 BoxLastModifiedTicketContent= BoxLastModifiedTicketNoRecordedTickets=沒有最近修改的服務單 +BoxTicketType=Number of open tickets by type +BoxTicketSeverity=Number of open tickets by severity +BoxNoTicketSeverity=No tickets opened +BoxTicketLastXDays=Number of new tickets by days the last %s days +BoxTicketLastXDayswidget = Number of new tickets by days the last X days +BoxNoTicketLastXDays=No new tickets the last %s days +BoxNumberOfTicketByDay=Number of new tickets by day +BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets +TicketCreatedToday=Ticket created today +TicketClosedToday=Ticket closed today diff --git a/htdocs/langs/zh_TW/users.lang b/htdocs/langs/zh_TW/users.lang index 26680ee4029..26b9aacbd38 100644 --- a/htdocs/langs/zh_TW/users.lang +++ b/htdocs/langs/zh_TW/users.lang @@ -72,10 +72,10 @@ ExportDataset_user_1=用戶及其屬性 DomainUser=網域用戶%s Reactivate=重新啟用 CreateInternalUserDesc=此表單使您可以在公司/組織中建立內部用戶。要建立外部用戶(客戶,供應商等),請使用該第三方聯絡卡中的“建立Dolibarr用戶”按鈕。 -InternalExternalDesc=一位 <b>內部</b> 使用者是您 公司/組織 的一部分。<br>一位 <b>外部</b> 使用者是顧客,供應商或是其他 (可從第三方的聯絡人紀錄為第三方建立一位外部使用者)。<br><br>以上兩種情形,在 Dolibarr 權限定義權利,外部使用者可以使用一個跟內部使用者不同的選單管理器 (見 首頁 - 設定 - 顯示) +InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/organization, or is a partner user outside of your organization that may need to see more data than data related to his company (the permission system will define what he can or can't see or do).<br>An <b>external</b> user is a customer, vendor or other that must view ONLY data related to himself (Creating an external user for a third-party can be done from the contact record of the third-party).<br><br>In both cases, you must grant permissions on the features that the user need. PermissionInheritedFromAGroup=因為從權限授予一個用戶的一組繼承。 Inherited=繼承 -UserWillBe=Created user will be +UserWillBe=建立的用戶將是 UserWillBeInternalUser=建立的用戶將是一個內部用戶(因為沒有連結到一個特定的第三方) UserWillBeExternalUser=建立的用戶將是外部用戶(因為連結到一個特定的第三方) IdPhoneCaller=手機來電者身份 @@ -112,7 +112,7 @@ UserAccountancyCode=用戶帳號 UserLogoff=用戶登出 UserLogged=用戶登入 DateOfEmployment=到職日期 -DateEmployment=就業機會 +DateEmployment=雇傭期間 DateEmploymentstart=入職日期 DateEmploymentEnd=離職日期 RangeOfLoginValidity=登入的有效日期範圍 diff --git a/htdocs/langs/zh_TW/website.lang b/htdocs/langs/zh_TW/website.lang index f83dc275c73..7a2ba12877b 100644 --- a/htdocs/langs/zh_TW/website.lang +++ b/htdocs/langs/zh_TW/website.lang @@ -46,12 +46,12 @@ SetHereVirtualHost=<u>使用Apache/NGinx/...</u><br>建立您的網頁伺服器 ExampleToUseInApacheVirtualHostConfig=在Apache虛擬主機設定中使用的範例: YouCanAlsoTestWithPHPS=在開發環境中<u>使用嵌入式PHP伺服器</u><br>, 您也許想要使用<br><strong>php -S 0.0.0.0:8080 -t %s</strong> 來測試此嵌入式PHP伺服器 (需要PHP 5.5) 的網站 YouCanAlsoDeployToAnotherWHP=<u>在其他Dolibarr網站託管供應商執行您的網站</u> <br>如果您在網路上沒有Apache或NGinx之類的Web伺服器,則可以將網站匯出並匯入到另一個由Dolibarr網站託管供應商提供且有完整整合網站模組。您可以在<a href="https://saas.dolibarr.org" target="_blank"> https://saas.dolibarr.org </a>上找到一些Dolibarr網站託管服務供應商的清單。 -CheckVirtualHostPerms=還要檢查虛擬主機是否具有將<strong> %s </strong>上的許可權轉換為<br> <strong> %s </strong>的權限 +CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has <strong>%s</strong> permissions on files into<br><strong>%s</strong> ReadPerm=閱讀 WritePerm=寫入 TestDeployOnWeb=上線 測試/部署 PreviewSiteServedByWebServer=<u>在新分頁中預覽%s。 </u> <br> <br> %s將由外部Web伺服器(例如Apache,Nginx,IIS)提供服務。您必須先安裝和設定此伺服器,然後再指向目錄:<br> <strong> %s </strong> <br>外部伺服器提供的網址:<br><strong>%s</strong> -PreviewSiteServedByDolibarr=<u>在新分頁中預覽%s。 </u> <br> <br> Dolibarr伺服器將為%s提供服務,因此不需要安裝任何其他Web伺服器(例如Apache,Nginx,IIS)。 <br>的不便之處在於頁面的URL不友好,並且以Dolibarr的路徑開頭。 <br> URL由Dolibarr提供:<br> <strong> %s </strong> <br> <br>要使用自己的外部Web伺服器來服務於這個網站,在您的Web伺服器上建立一個虛擬主機其指向目錄<br> <strong> %s </strong> <br>然後輸入該虛伺服器的名稱然後點擊另一個預覽按鈕。 +PreviewSiteServedByDolibarr=<u>Preview %s in a new tab.</u><br><br>The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.<br>The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.<br>URL served by Dolibarr:<br><strong>%s</strong><br><br>To use your own external web server to serve this web site, create a virtual host on your web server that points on directory<br><strong>%s</strong><br>then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=未定義由外部網站伺服器提供服務的虛擬主機網址 NoPageYet=暫無頁面 YouCanCreatePageOrImportTemplate=您可以建立一個新頁面或匯入完整的網站模板 @@ -100,7 +100,7 @@ EmptyPage=空白頁 ExternalURLMustStartWithHttp=外部網址必須以http://或https://開始 ZipOfWebsitePackageToImport=上傳網站模板包的Zip檔案 ZipOfWebsitePackageToLoad=或選擇一個可用的嵌入式網站模板包 -ShowSubcontainers=Show dynamic content +ShowSubcontainers=顯示動態內容 InternalURLOfPage=頁面的內部網址 ThisPageIsTranslationOf=該頁面/內容是以下內容的翻譯: ThisPageHasTranslationPages=此頁面/內容已翻譯 @@ -135,5 +135,13 @@ RSSFeed=RSS 訂閱 RSSFeedDesc=您可以使用此網址獲得類型為“ blogpost”的最新文章RSS feed。 PagesRegenerated=已重新產生%s頁面/容器 RegenerateWebsiteContent=重新產生網站快取檔案 -AllowedInFrames=Allowed in Frames -DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. +AllowedInFrames=允許在框架中 +DefineListOfAltLanguagesInWebsiteProperties=在網站屬性中定義所有可用語言的清單。 +GenerateSitemaps=Generate website sitemap file +ConfirmGenerateSitemaps=If you confirm, you will erase the existing sitemap file... +ConfirmSitemapsCreation=Confirm sitemap generation +SitemapGenerated=Sitemap Generated +ImportFavicon=Favicon +ErrorFaviconType=Favicon must be png +ErrorFaviconSize=Favicon must be of size 32x32 +FaviconTooltip=Upload an image which needs to be a png of 32x32 diff --git a/htdocs/langs/zh_TW/zapier.lang b/htdocs/langs/zh_TW/zapier.lang index 0d40930b895..83bf36a1885 100644 --- a/htdocs/langs/zh_TW/zapier.lang +++ b/htdocs/langs/zh_TW/zapier.lang @@ -13,17 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# -# Generic -# - -# Module label 'ModuleZapierForDolibarrName' ModuleZapierForDolibarrName = Zapier for Dolibarr -# Module description 'ModuleZapierForDolibarrDesc' ModuleZapierForDolibarrDesc = Zapier的Dolibarr模組 - -# -# Admin page -# -ZapierForDolibarrSetup = Zapier的設定 -ZapierDescription=Interface with Zapier +ZapierForDolibarrSetup=Zapier的設定 +ZapierDescription=Zapier界面 +ZapierAbout=About the module Zapier +ZapierSetupPage=There is no need for a setup on Dolibarr side to use Zapier. However, you must generate and publish a package on zapier to be able to use Zapier with Dolibarr. See documentation on <a href="https://wiki.dolibarr.org/index.php/Module_Zapier">this wiki page</a>. diff --git a/htdocs/loan/calcmens.php b/htdocs/loan/calcmens.php index d5f9704addc..19763c0a924 100644 --- a/htdocs/loan/calcmens.php +++ b/htdocs/loan/calcmens.php @@ -24,18 +24,24 @@ * \brief File to calculate loan monthly payments */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; require DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; -$mens = GETPOST('mens'); -$capital = GETPOST('capital'); -$rate = GETPOST('rate'); -$echance = GETPOST('echeance'); -$nbterm = GETPOST('nbterm'); +$mens = price2num(GETPOST('mens')); +$capital = price2num(GETPOST('capital')); +$rate = price2num(GETPOST('rate')); +$echance = GETPOST('echeance', 'int'); +$nbterm = GETPOST('nbterm', 'int'); top_httphead(); diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 17454356c76..c3c08b6cf2f 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -28,8 +28,12 @@ require '../main.inc.php'; 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'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -45,7 +49,9 @@ $projectid = GETPOST('projectid', 'int'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'loan', $id, '', ''); $object = new Loan($db); @@ -60,16 +66,15 @@ $error = 0; */ $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} +if (empty($reshook)) { // Classify paid - if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->loan->write) - { + if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->loan->write) { $object->fetch($id); - $result = $object->set_paid($user); - if ($result > 0) - { + $result = $object->setPaid($user); + if ($result > 0) { setEventMessages($langs->trans('LoanPaid'), null, 'mesgs'); } else { setEventMessages($loan->error, null, 'errors'); @@ -77,12 +82,10 @@ if (empty($reshook)) } // Delete loan - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->write) - { + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->write) { $object->fetch($id); $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans('LoanDeleted'), null, 'mesgs'); header("Location: list.php"); exit; @@ -92,44 +95,37 @@ if (empty($reshook)) } // Add loan - if ($action == 'add' && $user->rights->loan->write) - { - if (!$cancel) - { + if ($action == 'add' && $user->rights->loan->write) { + if (!$cancel) { $datestart = dol_mktime(12, 0, 0, GETPOST('startmonth', 'int'), GETPOST('startday', 'int'), GETPOST('startyear', 'int')); $dateend = dol_mktime(12, 0, 0, GETPOST('endmonth', 'int'), GETPOST('endday', 'int'), GETPOST('endyear', 'int')); $capital = price2num(GETPOST('capital')); $rate = GETPOST('rate'); - if (!$capital) - { + if (!$capital) { $error++; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("LoanCapital")), null, 'errors'); } - if (!$datestart) - { + if (!$datestart) { $error++; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateStart")), null, 'errors'); } - if (!$dateend) - { + if (!$dateend) { $error++; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateEnd")), null, 'errors'); } - if ($rate == '') - { + if ($rate == '') { $error++; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Rate")), null, 'errors'); } - if (!$error) - { + if (!$error) { $object->label = GETPOST('label'); - $object->fk_bank = GETPOST('accountid'); - $object->capital = $capital; + $object->fk_bank = GETPOST('accountid'); + $object->capital = $capital; $object->datestart = $datestart; - $object->dateend = $dateend; - $object->nbterm = GETPOST('nbterm'); + $object->dateend = $dateend; + $object->nbterm = GETPOST('nbterm'); $object->rate = $rate; $object->note_private = GETPOST('note_private', 'restricthtml'); $object->note_public = GETPOST('note_public', 'restricthtml'); @@ -140,13 +136,24 @@ if (empty($reshook)) $accountancy_account_insurance = GETPOST('accountancy_account_insurance'); $accountancy_account_interest = GETPOST('accountancy_account_interest'); - if ($accountancy_account_capital <= 0) { $object->account_capital = ''; } else { $object->account_capital = $accountancy_account_capital; } - if ($accountancy_account_insurance <= 0) { $object->account_insurance = ''; } else { $object->account_insurance = $accountancy_account_insurance; } - if ($accountancy_account_interest <= 0) { $object->account_interest = ''; } else { $object->account_interest = $accountancy_account_interest; } + if ($accountancy_account_capital <= 0) { + $object->account_capital = ''; + } else { + $object->account_capital = $accountancy_account_capital; + } + if ($accountancy_account_insurance <= 0) { + $object->account_insurance = ''; + } else { + $object->account_insurance = $accountancy_account_insurance; + } + if ($accountancy_account_interest <= 0) { + $object->account_interest = ''; + } else { + $object->account_interest = $accountancy_account_interest; + } $id = $object->create($user); - if ($id <= 0) - { + if ($id <= 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; @@ -156,21 +163,16 @@ if (empty($reshook)) header("Location: list.php"); exit(); } - } - - // Update record - elseif ($action == 'update' && $user->rights->loan->write) - { - if (!$cancel) - { + } elseif ($action == 'update' && $user->rights->loan->write) { + // Update record + if (!$cancel) { $result = $object->fetch($id); $datestart = dol_mktime(12, 0, 0, GETPOST('startmonth', 'int'), GETPOST('startday', 'int'), GETPOST('startyear', 'int')); $dateend = dol_mktime(12, 0, 0, GETPOST('endmonth', 'int'), GETPOST('endday', 'int'), GETPOST('endyear', 'int')); $capital = price2num(GETPOST('capital')); - if (!$capital) - { + if (!$capital) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("LoanCapital")), null, 'errors'); $action = 'edit'; } else { @@ -185,15 +187,26 @@ if (empty($reshook)) $accountancy_account_insurance = GETPOST('accountancy_account_insurance'); $accountancy_account_interest = GETPOST('accountancy_account_interest'); - if ($accountancy_account_capital <= 0) { $object->account_capital = ''; } else { $object->account_capital = $accountancy_account_capital; } - if ($accountancy_account_insurance <= 0) { $object->account_insurance = ''; } else { $object->account_insurance = $accountancy_account_insurance; } - if ($accountancy_account_interest <= 0) { $object->account_interest = ''; } else { $object->account_interest = $accountancy_account_interest; } + if ($accountancy_account_capital <= 0) { + $object->account_capital = ''; + } else { + $object->account_capital = $accountancy_account_capital; + } + if ($accountancy_account_insurance <= 0) { + $object->account_insurance = ''; + } else { + $object->account_insurance = $accountancy_account_insurance; + } + if ($accountancy_account_interest <= 0) { + $object->account_interest = ''; + } else { + $object->account_interest = $accountancy_account_interest; + } } $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -207,20 +220,20 @@ if (empty($reshook)) } // Link to a project - if ($action == 'classin' && $user->rights->loan->write) - { + if ($action == 'classin' && $user->rights->loan->write) { $object->fetch($id); $result = $object->setProject($projectid); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } } - if ($action == 'setlabel' && $user->rights->loan->write) - { + if ($action == 'setlabel' && $user->rights->loan->write) { $object->fetch($id); $result = $object->setValueFrom('label', GETPOST('label'), '', '', 'text', '', $user, 'LOAN_MODIFY'); - if ($result < 0) - setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } } @@ -231,7 +244,9 @@ if (empty($reshook)) $form = new Form($db); $formproject = new FormProjets($db); -if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); +if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); +} $title = $langs->trans("Loan").' - '.$langs->trans("Card"); $help_url = 'EN:Module_Loan|FR:Module_Emprunt'; @@ -239,8 +254,7 @@ llxHeader("", $title, $help_url); // Create mode -if ($action == 'create') -{ +if ($action == 'create') { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -260,8 +274,7 @@ if ($action == 'create') print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Label").'</td><td><input name="label" class="minwidth300" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label')).'" autofocus="autofocus"></td></tr>'; // Bank account - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>'; $form->select_comptes(GETPOST("accountid"), "accountid", 0, "courant=1", 1); // Show list of bank account with courant print '</td></tr>'; @@ -296,8 +309,7 @@ if ($action == 'create') print '<tr><td>'.$langs->trans("Insurance").'</td><td><input name="insurance_amount" size="10" value="'.dol_escape_htmltag(GETPOST("insurance_amount")).'" placeholder="'.$langs->trans('Amount').'"></td></tr>'; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); // Projet associe @@ -315,7 +327,7 @@ if ($action == 'create') print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, true, ROWS_6, '90%'); + $doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_6, '90%'); print $doleditor->Create(1); print '</td></tr>'; @@ -324,13 +336,12 @@ if ($action == 'create') print '<tr>'; print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>'; print '<td>'; - $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, true, ROWS_6, '90%'); + $doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 160, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_6, '90%'); print $doleditor->Create(1); print '</td></tr>'; // Accountancy - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { // Accountancy_account_capital print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("LoanAccountancyCapitalCode").'</td>'; print '<td>'; @@ -379,32 +390,27 @@ if ($action == 'create') } // View -if ($id > 0) -{ +if ($id > 0) { $object = new Loan($db); $result = $object->fetch($id); - if ($result > 0) - { + if ($result > 0) { $head = loan_prepare_head($object); $totalpaid = $object->getSumPayment(); // Confirm for loan - if ($action == 'paid') - { + if ($action == 'paid') { $text = $langs->trans('ConfirmPayLoan'); print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PayLoan'), $text, "confirm_paid", '', '', 2); } - if ($action == 'delete') - { + if ($action == 'delete') { $text = $langs->trans('ConfirmDeleteLoan'); print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteLoan'), $text, 'confirm_delete', '', '', 2); } - if ($action == 'edit') - { + if ($action == 'edit') { print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -422,14 +428,13 @@ if ($id > 0) $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, $user->rights->loan->write, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, $user->rights->loan->write, 'string', '', null, null, '', 1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->loadLangs(array("projects")); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->loan->write) - { - if ($action != 'classify') + if ($user->rights->loan->write) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -466,8 +471,7 @@ if ($id > 0) print '<table class="border centpercent tableforfield">'; // Capital - if ($action == 'edit') - { + if ($action == 'edit') { print '<tr><td class="fieldrequired titlefield">'.$langs->trans("LoanCapital").'</td><td>'; print '<input name="capital" size="10" value="'.$object->capital.'"></td></tr>'; print '</td></tr>'; @@ -476,8 +480,7 @@ if ($id > 0) } // Insurance - if ($action == 'edit') - { + if ($action == 'edit') { print '<tr><td class="titlefield">'.$langs->trans("Insurance").'</td><td>'; print '<input name="insurance_amount" size="10" value="'.$object->insurance_amount.'"></td></tr>'; print '</td></tr>'; @@ -488,8 +491,7 @@ if ($id > 0) // Date start print '<tr><td>'.$langs->trans("DateStart")."</td>"; print "<td>"; - if ($action == 'edit') - { + if ($action == 'edit') { print $form->selectDate($object->datestart, 'start', 0, 0, 0, 'update', 1, 0); } else { print dol_print_date($object->datestart, "day"); @@ -499,8 +501,7 @@ if ($id > 0) // Date end print '<tr><td>'.$langs->trans("DateEnd")."</td>"; print "<td>"; - if ($action == 'edit') - { + if ($action == 'edit') { print $form->selectDate($object->dateend, 'end', 0, 0, 0, 'update', 1, 0); } else { print dol_print_date($object->dateend, "day"); @@ -510,8 +511,7 @@ if ($id > 0) // Nbterms print '<tr><td>'.$langs->trans("Nbterms").'</td>'; print '<td>'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<input name="nbterm" size="4" value="'.$object->nbterm.'">'; } else { print $object->nbterm; @@ -521,8 +521,7 @@ if ($id > 0) // Rate print '<tr><td>'.$langs->trans("Rate").'</td>'; print '<td>'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<input name="rate" size="4" value="'.$object->rate.'">%'; } else { print price($object->rate).'%'; @@ -531,14 +530,12 @@ if ($id > 0) // Accountancy account capital print '<tr>'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<td class="nowrap fieldrequired">'; print $langs->trans("LoanAccountancyCapitalCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 1, 1); } else { print '<input name="accountancy_account_capital" size="16" value="'.$object->account_capital.'">'; @@ -549,8 +546,7 @@ if ($id > 0) print $langs->trans("LoanAccountancyCapitalCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_capital, 1); @@ -565,14 +561,12 @@ if ($id > 0) // Accountancy account insurance print '<tr>'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<td class="nowrap fieldrequired">'; print $langs->trans("LoanAccountancyInsuranceCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 1, 1); } else { print '<input name="accountancy_account_insurance" size="16" value="'.$object->account_insurance.'">'; @@ -583,8 +577,7 @@ if ($id > 0) print $langs->trans("LoanAccountancyInsuranceCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_insurance, 1); @@ -599,14 +592,12 @@ if ($id > 0) // Accountancy account interest print '<tr>'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<td class="nowrap fieldrequired">'; print $langs->trans("LoanAccountancyInterestCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 1, 1); } else { print '<input name="accountancy_account_interest" size="16" value="'.$object->account_interest.'">'; @@ -617,8 +608,7 @@ if ($id > 0) print $langs->trans("LoanAccountancyInterestCode"); print '</td><td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->account_interest, 1); @@ -646,15 +636,14 @@ if ($id > 0) $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_typepayment = c.id"; $sql .= ", ".MAIN_DB_PREFIX."loan as l"; - $sql .= " WHERE p.fk_loan = ".$id; + $sql .= " WHERE p.fk_loan = ".((int) $id); $sql .= " AND p.fk_loan = l.rowid"; $sql .= " AND l.entity IN ( ".getEntity('loan').")"; $sql .= " ORDER BY dp DESC"; //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $total_insurance = 0; @@ -672,8 +661,7 @@ if ($id > 0) print '<td class="right">'.$langs->trans("LoanCapital").'</td>'; print '</tr>'; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -690,8 +678,7 @@ if ($id > 0) $totalpaid = $total_capital; - if ($object->paid == 0 || $object->paid == 2) - { + if ($object->paid == 0 || $object->paid == 2) { print '<tr><td colspan="5" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="nowrap right">'.price($totalpaid, 0, $langs, 0, -1, -1, $conf->currency).'</td></tr>'; print '<tr><td colspan="5" class="right">'.$langs->trans("AmountExpected").' :</td><td class="nowrap right">'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>'; @@ -718,8 +705,7 @@ if ($id > 0) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '<div class="center">'; print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; @@ -732,34 +718,28 @@ if ($id > 0) /* * Buttons actions */ - if ($action != 'edit') - { + if ($action != 'edit') { $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { print '<div class="tabsAction">'; // Edit - if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->write) - { + if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->write) { print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'; } // Emit payment - 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) - { + 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 '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&amp;action=create">'.$langs->trans("DoPayment").'</a></div>'; } // Classify 'paid' - if (($object->paid == 0 || $object->paid == 2) && round($staytopay) <= 0 && $user->rights->loan->write) - { + if (($object->paid == 0 || $object->paid == 2) && round($staytopay) <= 0 && $user->rights->loan->write) { print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&amp;action=paid&amp;token='.newToken().'">'.$langs->trans("ClassifyPaid").'</a></div>'; } // Delete - if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->delete) - { + if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->delete) { print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans("Delete").'</a></div>'; } diff --git a/htdocs/loan/class/index.html b/htdocs/loan/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 1a888375bf3..b628de1b68b 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -131,14 +131,12 @@ class Loan extends CommonObject $sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.nbterm, l.rate, l.note_private, l.note_public, l.insurance_amount,"; $sql .= " l.paid, l.accountancy_account_capital, l.accountancy_account_insurance, l.accountancy_account_interest, l.fk_projet as fk_project"; $sql .= " FROM ".MAIN_DB_PREFIX."loan as l"; - $sql .= " WHERE l.rowid = ".$id; + $sql .= " WHERE l.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -188,36 +186,52 @@ class Loan extends CommonObject // clean parameters $newcapital = price2num($this->capital, 'MT'); - if (empty($this->insurance_amount)) $this->insurance_amount = 0; + if (empty($this->insurance_amount)) { + $this->insurance_amount = 0; + } $newinsuranceamount = price2num($this->insurance_amount, 'MT'); - 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->account_capital)) $this->account_capital = trim($this->account_capital); - if (isset($this->account_insurance)) $this->account_insurance = trim($this->account_insurance); - if (isset($this->account_interest)) $this->account_interest = trim($this->account_interest); - 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; - if (isset($this->fk_project)) $this->fk_project = (int) $this->fk_project; + 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->account_capital)) { + $this->account_capital = trim($this->account_capital); + } + if (isset($this->account_insurance)) { + $this->account_insurance = trim($this->account_insurance); + } + if (isset($this->account_interest)) { + $this->account_interest = trim($this->account_interest); + } + 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; + } + if (isset($this->fk_project)) { + $this->fk_project = (int) $this->fk_project; + } // Check parameters - if (!$newcapital > 0 || empty($this->datestart) || empty($this->dateend)) - { + if (!$newcapital > 0 || empty($this->datestart) || empty($this->dateend)) { $this->error = "ErrorBadParameter"; return -2; } - if (($conf->accounting->enabled) && empty($this->account_capital)) - { + if (($conf->accounting->enabled) && empty($this->account_capital)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyCapitalCode")); return -2; } - if (($conf->accounting->enabled) && empty($this->account_insurance)) - { + if (($conf->accounting->enabled) && empty($this->account_insurance)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInsuranceCode")); return -2; } - if (($conf->accounting->enabled) && empty($this->account_interest)) - { + if (($conf->accounting->enabled) && empty($this->account_interest)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInterestCode")); return -2; } @@ -248,8 +262,7 @@ class Loan extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."loan"); //dol_syslog("Loans::create this->id=".$this->id); @@ -281,47 +294,39 @@ class Loan extends CommonObject $lines_url = $account->get_url('', $this->id, 'loan'); // Delete bank urls - foreach ($lines_url as $line_url) - { - if (!$error) - { + foreach ($lines_url as $line_url) { + if (!$error) { $accountline = new AccountLine($this->db); $accountline->fetch($line_url['fk_bank']); $result = $accountline->delete_urls($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } } // Delete payments - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_loan where fk_loan=".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."loan where rowid=".$this->id; + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."loan where rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -341,8 +346,7 @@ class Loan extends CommonObject { $this->db->begin(); - if (!is_numeric($this->nbterm)) - { + if (!is_numeric($this->nbterm)) { $this->error = 'BadValueForParameterForNbTerm'; return -1; } @@ -360,12 +364,11 @@ class Loan extends CommonObject $sql .= " fk_projet=".(empty($this->fk_project) ? 'NULL' : $this->fk_project).","; $sql .= " fk_user_modif = ".$user->id.","; $sql .= " insurance_amount = '".price2num($this->db->escape($this->insurance_amount))."'"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { @@ -379,12 +382,26 @@ class Loan extends CommonObject /** * Tag loan as paid completely * + * @deprecated + * @see setPaid() * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ public function set_paid($user) { // phpcs:enable + dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE); + return $this->setPaid($user); + } + + /** + * Tag loan as paid completely + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setPaid($user) + { $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; $sql .= " paid = ".$this::STATUS_PAID; $sql .= " WHERE rowid = ".$this->id; @@ -399,14 +416,28 @@ class Loan extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag loan as payement started + * Tag loan as payment started * + * @deprecated + * @see setStarted() * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ public function set_started($user) { // phpcs:enable + dol_syslog(get_class($this)."::set_started is deprecated, use setStarted instead", LOG_NOTICE); + return $this->setStarted($user); + } + + /** + * Tag loan as payment started + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setStarted($user) + { $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; $sql .= " paid = ".$this::STATUS_STARTED; $sql .= " WHERE rowid = ".$this->id; @@ -422,13 +453,26 @@ class Loan extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag loan as payement as unpaid - * + * @deprecated + * @see setUnpaid() * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ public function set_unpaid($user) { // phpcs:enable + dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE); + return $this->setUnpaid($user); + } + + /** + * Tag loan as payement as unpaid + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function setUnpaid($user) + { $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; $sql .= " paid = ".$this::STATUS_UNPAID; $sql .= " WHERE rowid = ".$this->id; @@ -471,22 +515,29 @@ class Loan extends CommonObject $langs->loadLangs(array("customers", "bills")); unset($this->labelStatus); // Force to reset the array of status label, because label can change depending on parameters - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $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"); + 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"); + if ($status == 0 && $alreadypaid > 0) { + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + } } $statusType = 'status1'; - if (($status == 0 && $alreadypaid > 0) || $status == self::STATUS_STARTED) $statusType = 'status3'; - if ($status == 1) $statusType = 'status6'; + 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); } @@ -519,33 +570,40 @@ class Loan extends CommonObject $url = DOL_URL_ROOT.'/loan/card.php?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + 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.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= ($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref); + } $result .= $linkend; return $result; @@ -597,12 +655,13 @@ class Loan extends CommonObject dol_syslog(get_class($this)."::getSumPayment", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $amount = 0; $obj = $this->db->fetch_object($resql); - if ($obj) $amount = $obj->amount ? $obj->amount : 0; + if ($obj) { + $amount = $obj->amount ? $obj->amount : 0; + } $this->db->free($resql); return $amount; @@ -622,31 +681,29 @@ class Loan extends CommonObject { $sql = 'SELECT l.rowid, l.datec, l.fk_user_author, l.fk_user_modif,'; $sql .= ' l.tms'; - $sql .= ' WHERE l.rowid = '.$id; + $sql .= ' WHERE l.rowid = '.((int) $id); dol_syslog(get_class($this).'::info', LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + if ($obj->fk_user_author) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; } - if ($obj->fk_user_modif) - { + 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->jdate($obj->datec); - if (empty($obj->fk_user_modif)) $obj->tms = ""; + if (empty($obj->fk_user_modif)) { + $obj->tms = ""; + } $this->date_modification = $this->db->jdate($obj->tms); $this->db->free($result); diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index 50339359a9d..54d4607ab70 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -129,21 +129,36 @@ class LoanSchedule extends CommonObject $now = dol_now(); // Validate parameters - if (!$this->datep) - { + if (!$this->datep) { $this->error = 'ErrorBadValueForParameter'; return -1; } // Clean parameters - if (isset($this->fk_loan)) $this->fk_loan = (int) $this->fk_loan; - if (isset($this->amount_capital)) $this->amount_capital = trim($this->amount_capital ? $this->amount_capital : 0); - if (isset($this->amount_insurance)) $this->amount_insurance = trim($this->amount_insurance ? $this->amount_insurance : 0); - if (isset($this->amount_interest)) $this->amount_interest = trim($this->amount_interest ? $this->amount_interest : 0); - if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; - 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; + if (isset($this->fk_loan)) { + $this->fk_loan = (int) $this->fk_loan; + } + if (isset($this->amount_capital)) { + $this->amount_capital = trim($this->amount_capital ? $this->amount_capital : 0); + } + if (isset($this->amount_insurance)) { + $this->amount_insurance = trim($this->amount_insurance ? $this->amount_insurance : 0); + } + if (isset($this->amount_interest)) { + $this->amount_interest = trim($this->amount_interest ? $this->amount_interest : 0); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = (int) $this->fk_typepayment; + } + 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; + } $totalamount = $this->amount_capital + $this->amount_insurance + $this->amount_interest; $totalamount = price2num($totalamount); @@ -157,8 +172,7 @@ class LoanSchedule extends CommonObject $this->db->begin(); - if ($totalamount != 0) - { + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element." (fk_loan, datec, datep, amount_capital, amount_insurance, amount_interest,"; $sql .= " fk_typepayment, fk_user_creat, fk_bank)"; $sql .= " VALUES (".$this->fk_loan.", '".$this->db->idate($now)."',"; @@ -172,8 +186,7 @@ class LoanSchedule extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_loan"); } else { $this->error = $this->db->lasterror(); @@ -181,8 +194,7 @@ class LoanSchedule extends CommonObject } } - if ($totalamount != 0 && !$error) - { + if ($totalamount != 0 && !$error) { $this->amount_capital = $totalamount; $this->db->commit(); return $this->id; @@ -224,7 +236,7 @@ class LoanSchedule extends CommonObject $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 .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -280,14 +292,30 @@ 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->fk_payment_loan)) $this->fk_payment_loan = (int) $this->fk_payment_loan; + 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 @@ -311,17 +339,18 @@ class LoanSchedule extends CommonObject $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").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { + if ($error) { $this->db->rollback(); return -1 * $error; } else { @@ -347,18 +376,18 @@ class LoanSchedule extends CommonObject if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -418,15 +447,13 @@ class LoanSchedule extends CommonObject $sql .= " t.fk_user_creat,"; $sql .= " t.fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; - $sql .= " WHERE t.fk_loan = ".$loanid; + $sql .= " WHERE t.fk_loan = ".((int) $loanid); dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $line = new LoanSchedule($this->db); $line->id = $obj->rowid; $line->ref = $obj->rowid; @@ -508,7 +535,7 @@ class LoanSchedule extends CommonObject { $sql = "SELECT p.datep"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan as p "; - $sql .= " WHERE p.fk_loan = ".$loanid; + $sql .= " WHERE p.fk_loan = ".((int) $loanid); $sql .= " ORDER BY p.datep DESC "; $sql .= " LIMIT 1 "; @@ -536,15 +563,16 @@ class LoanSchedule extends CommonObject $sql = "SELECT p.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as p "; - $sql .= " WHERE p.fk_loan = ".$loanid; - if (!empty($datemax)) { $sql .= " AND p.datep > '".$this->db->idate($datemax)."'"; } + $sql .= " WHERE p.fk_loan = ".((int) $loanid); + if (!empty($datemax)) { + $sql .= " AND p.datep > '".$this->db->idate($datemax)."'"; + } $sql .= " AND p.datep <= '".$this->db->idate(dol_now())."'"; $resql = $this->db->query($sql); if ($resql) { - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $result[] = $obj->rowid; } } diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 34acb06f9ce..cf0a8e87f63 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -126,36 +126,58 @@ class PaymentLoan extends CommonObject $now = dol_now(); // Validate parameters - if (!$this->datep) - { + if (!$this->datep) { $this->error = 'ErrorBadValueForParameter'; return -1; } // Clean parameters - if (isset($this->fk_loan)) $this->fk_loan = (int) $this->fk_loan; - if (isset($this->amount_capital)) $this->amount_capital = price2num($this->amount_capital ? $this->amount_capital : 0); - if (isset($this->amount_insurance)) $this->amount_insurance = price2num($this->amount_insurance ? $this->amount_insurance : 0); - if (isset($this->amount_interest)) $this->amount_interest = price2num($this->amount_interest ? $this->amount_interest : 0); - if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; - if (isset($this->num_payment)) $this->num_payment = (int) $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 = (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; + if (isset($this->fk_loan)) { + $this->fk_loan = (int) $this->fk_loan; + } + if (isset($this->amount_capital)) { + $this->amount_capital = price2num($this->amount_capital ? $this->amount_capital : 0); + } + if (isset($this->amount_insurance)) { + $this->amount_insurance = price2num($this->amount_insurance ? $this->amount_insurance : 0); + } + if (isset($this->amount_interest)) { + $this->amount_interest = price2num($this->amount_interest ? $this->amount_interest : 0); + } + if (isset($this->fk_typepayment)) { + $this->fk_typepayment = (int) $this->fk_typepayment; + } + if (isset($this->num_payment)) { + $this->num_payment = (int) $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 = (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; + } $totalamount = $this->amount_capital + $this->amount_insurance + $this->amount_interest; $totalamount = price2num($totalamount); // Check parameters - if ($totalamount == 0) return -1; // Negative amounts are accepted for reject prelevement but not null + if ($totalamount == 0) { + return -1; // Negative amounts are accepted for reject prelevement but not null + } $this->db->begin(); - if ($totalamount != 0) - { + if ($totalamount != 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_loan (fk_loan, datec, datep, amount_capital, amount_insurance, amount_interest,"; $sql .= " fk_typepayment, num_payment, note_private, note_public, fk_user_creat, fk_bank)"; $sql .= " VALUES (".$this->chid.", '".$this->db->idate($now)."',"; @@ -168,8 +190,7 @@ class PaymentLoan extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_loan"); } else { $this->error = $this->db->lasterror(); @@ -177,8 +198,7 @@ class PaymentLoan extends CommonObject } } - if ($totalamount != 0 && !$error) - { + if ($totalamount != 0 && !$error) { $this->amount_capital = $totalamount; $this->db->commit(); return $this->id; @@ -219,14 +239,12 @@ class PaymentLoan extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan 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 .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -276,17 +294,39 @@ class PaymentLoan extends CommonObject $error = 0; // Clean parameters - if (isset($this->fk_loan)) $this->fk_loan = (int) $this->fk_loan; - 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->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; - if (isset($this->num_payment)) $this->num_payment = (int) $this->num_payment; - if (isset($this->note_private)) $this->note = trim($this->note_private); - if (isset($this->note_public)) $this->note = trim($this->note_public); - 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; + if (isset($this->fk_loan)) { + $this->fk_loan = (int) $this->fk_loan; + } + 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->fk_typepayment)) { + $this->fk_typepayment = (int) $this->fk_typepayment; + } + if (isset($this->num_payment)) { + $this->num_payment = (int) $this->num_payment; + } + if (isset($this->note_private)) { + $this->note = trim($this->note_private); + } + if (isset($this->note_public)) { + $this->note = trim($this->note_public); + } + 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; + } // Check parameters @@ -308,19 +348,19 @@ class PaymentLoan extends CommonObject $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").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -347,38 +387,37 @@ class PaymentLoan extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url"; $sql .= " WHERE type='payment_loan' AND url_id=".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_loan"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Set loan unpaid if loan has no other payment - if (!$error) - { + 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) - { + if ($sum_payment == 0) { dol_syslog(get_class($this)."::delete : set loan to unpaid", LOG_DEBUG); - if ($loan->set_unpaid($user) < 1) - { + if ($loan->setUnpaid($user) < 1) { $error++; dol_print_error($this->db); } @@ -402,10 +441,8 @@ class PaymentLoan extends CommonObject //} // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -462,15 +499,16 @@ class PaymentLoan extends CommonObject $error = 0; $this->db->begin(); - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $acc = new Account($this->db); $acc->fetch($accountid); $total = $this->amount_capital; - if ($mode == 'payment_loan') $total = -$total; + if ($mode == 'payment_loan') { + $total = -$total; + } // Insert payment into llx_bank $bank_line_id = $acc->addline( @@ -487,23 +525,21 @@ class PaymentLoan extends CommonObject // Update fk_bank into llx_paiement. // We know the payment who generated the account write - if ($bank_line_id > 0) - { + if ($bank_line_id > 0) { $result = $this->update_fk_bank($bank_line_id); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } // Add link 'payment_loan' in bank_url between payment and bank transaction $url = ''; - if ($mode == 'payment_loan') $url = DOL_URL_ROOT.'/loan/payment/card.php?id='; - if ($url) - { + if ($mode == 'payment_loan') { + $url = DOL_URL_ROOT.'/loan/payment/card.php?id='; + } + if ($url) { $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(payment)', $mode); - if ($result <= 0) - { + if ($result <= 0) { $error++; dol_print_error($this->db); } @@ -511,10 +547,11 @@ 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') - { + 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); + if ($result <= 0) { + dol_print_error($this->db); + } } } else { $this->error = $acc->error; @@ -524,28 +561,23 @@ class PaymentLoan extends CommonObject // Set loan payment started if no set - if (!$error) - { + 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) - { + 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) - { + if ($loan->setStarted($user) < 1) { $error++; dol_print_error($this->db); } } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; - } - else { + } else { $this->db->rollback(); return -1; } @@ -562,13 +594,12 @@ class PaymentLoan extends CommonObject public function update_fk_bank($id_bank) { // phpcs:enable - $sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - $this->fk_bank = $id_bank; + if ($result) { + $this->fk_bank = ((int) $id_bank); return 1; } else { $this->error = $this->db->error(); @@ -590,27 +621,39 @@ class PaymentLoan extends CommonObject { global $langs, $conf; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $label = '<u>'.$langs->trans("Loan").'</u>'; if (!empty($this->id)) { $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->id; } - if ($moretitle) $label .= ' - '.$moretitle; + if ($moretitle) { + $label .= ' - '.$moretitle; + } $url = DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id; $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'; + 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'; + } $linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; $linkend = '</a>'; $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; + 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; diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 8606db2622b..85c958dd545 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -40,7 +40,9 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'loan', $id, '', ''); // Get parameters @@ -54,11 +56,17 @@ if (empty($page) || $page == -1) { $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Loan($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $upload_dir = $conf->loan->dir_output.'/'.dol_sanitizeFileName($object->ref); $modulepart = 'loan'; @@ -68,7 +76,7 @@ $modulepart = 'loan'; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -81,8 +89,7 @@ $title = $langs->trans("Loan").' - '.$langs->trans("Documents"); $help_url = 'EN:Module_Loan|FR:Module_Emprunt'; llxHeader("", $title, $help_url); -if ($object->id) -{ +if ($object->id) { $totalpaid = $object->getSumPayment(); $head = loan_prepare_head($object); @@ -138,8 +145,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/loan/index.html b/htdocs/loan/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index 0d9306aa71f..7ecc41fe4d6 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -38,7 +38,9 @@ $action = GETPOST('action', 'aZ09'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'loan', $id, '', ''); diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 744a6929fc8..f9b08a63a48 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -32,14 +32,18 @@ $langs->loadLangs(array("loan", "compta", "banks", "bills")); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'loan', '', '', ''); $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 +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; @@ -48,8 +52,12 @@ $pagenext = $page + 1; $loan_static = new Loan($db); $extrafields = new ExtraFields($db); -if (!$sortfield) $sortfield = "l.rowid"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "l.rowid"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $search_ref = GETPOST('search_ref', 'int'); $search_label = GETPOST('search_label', 'alpha'); @@ -63,18 +71,22 @@ $optioncss = GETPOST('optioncss', 'alpha'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_label = ""; $search_amount = ""; @@ -97,35 +109,39 @@ $sql .= " SUM(pl.amount_capital) as alreadypaid"; $sql .= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl"; $sql .= " ON l.rowid = pl.fk_loan"; $sql .= " WHERE l.entity = ".$conf->entity; -if ($search_amount) $sql .= natural_search("l.capital", $search_amount, 1); -if ($search_ref) $sql .= " AND l.rowid = ".$db->escape($search_ref); -if ($search_label) $sql .= natural_search("l.label", $search_label); +if ($search_amount) { + $sql .= natural_search("l.capital", $search_amount, 1); +} +if ($search_ref) { + $sql .= " AND l.rowid = ".((int) $search_ref); +} +if ($search_label) { + $sql .= natural_search("l.label", $search_label); +} $sql .= " GROUP BY l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend"; $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -138,24 +154,39 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit llxHeader('', $title, $help_url); -if ($resql) -{ +if ($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 ($search_ref) $param .= "&search_ref=".urlencode($search_ref); - if ($search_label) $param .= "&search_label=".urlencode($search_label); - if ($search_amount) $param .= "&search_amount=".urlencode($search_amount); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + 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_amount) { + $param .= "&search_amount=".urlencode($search_amount); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } $url = DOL_URL_ROOT.'/loan/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $user->rights->loan->write); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -201,10 +232,11 @@ if ($resql) // -------------------------------------------------------------------- $i = 0; $totalarray = array(); - while ($i < ($limit ? min($num, $limit) : $num)) - { + while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } $loan_static->id = $obj->rowid; $loan_static->ref = $obj->rowid; @@ -220,7 +252,7 @@ if ($resql) print '<td>'.dol_trunc($obj->label, 42).'</td>'; // Capital - print '<td class="right maxwidth100">'.price($obj->capital).'</td>'; + print '<td class="right maxwidth100"><span class="amount">'.price($obj->capital).'</span></td>'; // Date start print '<td class="center width100">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>'; @@ -240,8 +272,7 @@ if ($resql) } // If no record found - if ($num == 0) - { + if ($num == 0) { $colspan = 7; //foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 91f32679699..f7930b64c9a 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -44,7 +44,9 @@ $id = GETPOST('id', 'int'); $result = restrictedArea($user, 'loan', $id, '&loan'); $object = new Loan($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $permissionnote = $user->rights->loan->write; // Used by the include of actions_setnotes.inc.php @@ -66,11 +68,10 @@ $title = $langs->trans("Loan").' - '.$langs->trans("Notes"); $help_url = 'EN:Module_Loan|FR:Module_Emprunt'; llxHeader("", $title, $help_url); -if ($id > 0) -{ +if ($id > 0) { /* - * Affichage onglets - */ + * Affichage onglets + */ $totalpaid = $object->getSumPayment(); $head = loan_prepare_head($object); diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index ac76dbf9053..675401e34f9 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -24,7 +24,9 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; -if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +if (!empty($conf->banque->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +} // Load translation files required by the page $langs->loadLangs(array("bills", "banks", "companies", "loan")); @@ -33,15 +35,18 @@ $langs->loadLangs(array("bills", "banks", "companies", "loan")); $id = GETPOST("id", 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // TODO ajouter regle pour restreindre acces paiement //$result = restrictedArea($user, 'facture', $id,''); $payment = new PaymentLoan($db); -if ($id > 0) -{ +if ($id > 0) { $result = $payment->fetch($id); - if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); + if (!$result) { + dol_print_error($db, 'Failed to get payment id '.$id); + } } @@ -50,20 +55,18 @@ if ($id > 0) */ // Delete payment -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->delete) -{ +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->delete) { $db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."loan_schedule SET fk_bank = 0 WHERE fk_bank = ".$payment->fk_bank; + $sql = "UPDATE ".MAIN_DB_PREFIX."loan_schedule SET fk_bank = 0 WHERE fk_bank = ".((int) $payment->fk_bank); $db->query($sql); $fk_loan = $payment->fk_loan; $result = $payment->delete($user); - if ($result > 0) - { + if ($result > 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT."/loan/card.php?id=".$fk_loan); + header("Location: ".DOL_URL_ROOT."/loan/card.php?id=".urlencode($fk_loan)); exit; } else { setEventMessages($payment->error, $payment->errors, 'errors'); @@ -93,8 +96,7 @@ print dol_get_fiche_head($head, $hselected, $langs->trans("PaymentLoan"), -1, 'p /* * Confirm deletion of the payment */ -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2); } @@ -127,10 +129,8 @@ print '<tr><td>'.$langs->trans('NotePrivate').'</td><td>'.nl2br($payment->note_p print '<tr><td>'.$langs->trans('NotePublic').'</td><td>'.nl2br($payment->note_public).'</td></tr>'; // Bank account -if (!empty($conf->banque->enabled)) -{ - if ($payment->bank_account) - { +if (!empty($conf->banque->enabled)) { + if ($payment->bank_account) { $bankline = new AccountLine($db); $bankline->fetch($payment->bank_line); @@ -161,8 +161,7 @@ $sql .= ' AND pl.rowid = '.$payment->id; dol_syslog("loan/payment/card.php", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -176,10 +175,8 @@ if ($resql) print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>'; print "</tr>\n"; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -199,8 +196,7 @@ if ($resql) print '<td class="right">'.price($amount_payed).'</td>'; print "</tr>\n"; - if ($objp->paid == 1) // If at least one invoice is paid, disable delete - { + if ($objp->paid == 1) { // If at least one invoice is paid, disable delete $disable_delete = 1; } $total = $total + $objp->amount_capital; @@ -224,10 +220,8 @@ print '</div>'; print '<div class="tabsAction">'; -if (empty($action) && !empty($user->rights->loan->delete)) -{ - if (!$disable_delete) - { +if (empty($action) && !empty($user->rights->loan->delete)) { + if (!$disable_delete) { print '<a class="butActionDelete" href="card.php?id='.$id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("CantRemovePaymentWithOneInvoicePaid")).'">'.$langs->trans('Delete').'</a>'; diff --git a/htdocs/loan/payment/index.html b/htdocs/loan/payment/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 0c0574c15b4..58783be181e 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -39,10 +39,14 @@ $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'in // Security check $socid = 0; -if ($user->socid > 0) +if ($user->socid > 0) { $socid = $user->socid; -elseif (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); -if (empty($user->rights->loan->write)) accessforbidden(); +} elseif (GETPOSTISSET('socid')) { + $socid = GETPOST('socid', 'int'); +} +if (empty($user->rights->loan->write)) { + accessforbidden(); +} $loan = new Loan($db); $loan->fetch($chid); @@ -51,35 +55,31 @@ $echance = 0; $ls = new LoanSchedule($db); // grab all loanschedule $res = $ls->fetchAll($chid); -if ($res > 0) -{ - foreach ($ls->lines as $l) - { +if ($res > 0) { + foreach ($ls->lines as $l) { $echance++; // Count term pos // last unpaid term - if (empty($l->fk_bank)) - { + if (empty($l->fk_bank)) { $line_id = $l->id; break; - } - // If line_id provided, only count temp pos - elseif ($line_id == $l->id) - { + } elseif ($line_id == $l->id) { + // If line_id provided, only count temp pos break; } } } // Set current line with last unpaid line (only if shedule is used) -if (!empty($line_id)) -{ +if (!empty($line_id)) { $line = new LoanSchedule($db); $res = $line->fetch($line_id); if ($res > 0) { $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; + if (empty($datepaid)) { + $ts_temppaid = $line->datep; + } } } @@ -88,66 +88,59 @@ if (!empty($line_id)) * Actions */ -if ($action == 'add_payment') -{ +if ($action == 'add_payment') { $error = 0; - if ($cancel) - { + if ($cancel) { $loc = DOL_URL_ROOT.'/loan/card.php?id='.$chid; header("Location: ".$loc); exit; } - if (!GETPOST('paymenttype', 'int') > 0) - { + if (!GETPOST('paymenttype', 'int') > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; } - if ($datepaid == '') - { + if ($datepaid == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !GETPOST('accountid', 'int') > 0) - { + if (!empty($conf->banque->enabled) && !GETPOST('accountid', 'int') > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $paymentid = 0; $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')); + 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)) - { + if (!empty($line) && !empty($line->fk_bank)) { setEventMessages($langs->trans('TermPaidAllreadyPaid'), null, 'errors'); $error++; } - if (empty($remaindertopay)) - { + if (empty($remaindertopay)) { setEventMessages('Empty sumpaid', null, 'errors'); $error++; } - if ($amount == 0) - { + if ($amount == 0) { setEventMessages($langs->trans('ErrorNoPaymentDefined'), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); // Create a line of payments @@ -164,38 +157,30 @@ if ($action == 'add_payment') $payment->note_private = GETPOST('note_private', 'restricthtml'); $payment->note_public = GETPOST('note_public', 'restricthtml'); - if (!$error) - { + if (!$error) { $paymentid = $payment->create($user); - if ($paymentid < 0) - { + if ($paymentid < 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', $payment->fk_bank, '', ''); - if (!$result > 0) - { + if (!$result > 0) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } } // Update loan schedule with payment value - if (!$error && !empty($line)) - { + 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)) - { + 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) - { + foreach ($arr_term as $k => $v) { // Update fk_bank for current line - if ($k == $echance) - { + if ($k == $echance) { $ls->lines[$k - 1]->fk_bank = $payment->fk_bank; $ls->lines[$k - 1]->fk_payment_loan = $payment->id; } @@ -204,29 +189,25 @@ if ($action == 'add_payment') $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) - { + if ($result < 1) { setEventMessages(null, $ls->errors, 'errors'); $error++; break; } } - } - else // Only add fk_bank bank to schedule line (mark as paid) + } 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) - { + if ($result < 1) { setEventMessages(null, $line->errors, 'errors'); $error++; } } } - if (!$error) - { + if (!$error) { $db->commit(); $loc = DOL_URL_ROOT.'/loan/card.php?id='.$chid; header('Location: '.$loc); @@ -251,18 +232,16 @@ $form = new Form($db); // Form to create loan's payment -if ($action == 'create') -{ +if ($action == 'create') { $total = $loan->capital; 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; + $sql .= " WHERE fk_loan = ".((int) $chid); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $sumpaid = $obj->total; $db->free(); @@ -282,10 +261,10 @@ if ($action == 'create') print '<table class="border centpercent">'; print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$chid.'">'.$chid.'</a></td></tr>'; - if ($echance > 0) - { - print '<tr><td>'.$langs->trans("Term").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/schedule.php?loanid='.$chid.'#n'.$echance.'">'.$echance.'</a></td></tr>'."\n"; - } + if ($echance > 0) + { + print '<tr><td>'.$langs->trans("Term").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/schedule.php?loanid='.$chid.'#n'.$echance.'">'.$echance.'</a></td></tr>'."\n"; + } print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="2">'.dol_print_date($loan->datestart, 'day')."</td></tr>\n"; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$loan->label."</td></tr>\n"; print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="2">'.price($loan->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>'; @@ -300,108 +279,106 @@ if ($action == 'create') print '<table class="border centpercent">'; print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">'; - 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 "</td>"; - print '</tr>'; + 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 "</td>"; + print '</tr>'; - print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td colspan="2">'; - $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype", 'alphanohtml') : $loan->fk_typepayment, "paymenttype"); - print "</td>\n"; - print '</tr>'; + print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td colspan="2">'; + $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype", 'alphanohtml') : $loan->fk_typepayment, "paymenttype"); + print "</td>\n"; + print '</tr>'; - print '<tr>'; - print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; - print '<td colspan="2">'; - $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $loan->accountid, "accountid", 0, 'courant = '.Account::TYPE_CURRENT, 1); // Show opend bank account list - print '</td></tr>'; + print '<tr>'; + print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; + print '<td colspan="2">'; + $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $loan->accountid, "accountid", 0, 'courant = '.Account::TYPE_CURRENT, 1); // Show opend bank account list + print '</td></tr>'; // Number - print '<tr><td>'.$langs->trans('Numero'); - print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; - print '</td>'; - print '<td colspan="2"><input name="num_payment" type="text" value="'.GETPOST('num_payment', 'alphanohtml').'"></td>'."\n"; - print "</tr>"; + print '<tr><td>'.$langs->trans('Numero'); + print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; + print '</td>'; + print '<td colspan="2"><input name="num_payment" type="text" value="'.GETPOST('num_payment', 'alphanohtml').'"></td>'."\n"; + print "</tr>"; - print '<tr>'; - print '<td class="tdtop">'.$langs->trans("NotePrivate").'</td>'; - print '<td valign="top" colspan="2"><textarea name="note_private" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>'; - print '</tr>'; + print '<tr>'; + print '<td class="tdtop">'.$langs->trans("NotePrivate").'</td>'; + print '<td valign="top" colspan="2"><textarea name="note_private" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>'; + print '</tr>'; - print '<tr>'; - print '<td class="tdtop">'.$langs->trans("NotePublic").'</td>'; - print '<td valign="top" colspan="2"><textarea name="note_public" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>'; - print '</tr>'; + print '<tr>'; + print '<td class="tdtop">'.$langs->trans("NotePublic").'</td>'; + print '<td valign="top" colspan="2"><textarea name="note_public" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>'; + print '</tr>'; - print '</table>'; + print '</table>'; - print dol_get_fiche_end(); + print dol_get_fiche_end(); - print '<table class="noborder centpercent">'; - print '<tr class="liste_titre">'; - print '<td class="left">'.$langs->trans("DateDue").'</td>'; - print '<td class="right">'.$langs->trans("LoanCapital").'</td>'; - print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>'; - print '<td class="right">'.$langs->trans("RemainderToPay").'</td>'; - print '<td class="right">'.$langs->trans("Amount").'</td>'; - print "</tr>\n"; + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + print '<td class="left">'.$langs->trans("DateDue").'</td>'; + print '<td class="right">'.$langs->trans("LoanCapital").'</td>'; + print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>'; + print '<td class="right">'.$langs->trans("RemainderToPay").'</td>'; + print '<td class="right">'.$langs->trans("Amount").'</td>'; + print "</tr>\n"; - print '<tr class="oddeven">'; + print '<tr class="oddeven">'; - if ($loan->datestart > 0) - { + if ($loan->datestart > 0) { print '<td class="left" valign="center">'.dol_print_date($loan->datestart, 'day').'</td>'; } else { print '<td class="center" valign="center"><b>!!!</b></td>'; } - print '<td class="right" valign="center">'.price($loan->capital)."</td>"; + print '<td class="right" valign="center">'.price($loan->capital)."</td>"; - print '<td class="right" valign="center">'.price($sumpaid)."</td>"; + print '<td class="right" valign="center">'.price($sumpaid)."</td>"; - print '<td class="right" valign="center">'.price($loan->capital - $sumpaid)."</td>"; + print '<td class="right" valign="center">'.price($loan->capital - $sumpaid)."</td>"; - print '<td class="right">'; - if ($sumpaid < $loan->capital) - { + print '<td class="right">'; + if ($sumpaid < $loan->capital) { print $langs->trans("LoanCapital").': <input type="text" size="8" name="amount_capital" value="'.(GETPOSTISSET('amount_capital') ?GETPOST('amount_capital') : $amount_capital).'">'; - } - else { + } else { print '-'; } - print '<br>'; - if ($sumpaid < $loan->capital) - { + print '<br>'; + if ($sumpaid < $loan->capital) { print $langs->trans("Insurance").': <input type="text" size="8" name="amount_insurance" value="'.(GETPOSTISSET('amount_insurance') ?GETPOST('amount_insurance') : $amount_insurance).'">'; - } - else { + } else { print '-'; } - print '<br>'; - if ($sumpaid < $loan->capital) - { + print '<br>'; + if ($sumpaid < $loan->capital) { print $langs->trans("Interest").': <input type="text" size="8" name="amount_interest" value="'.(GETPOSTISSET('amount_interest') ?GETPOST('amount_interest') : $amount_interest).'" '.(!empty($line) ? 'disabled title="'.$langs->trans('CantModifyInterestIfScheduleIsUsed').'"' : '').'>'; - } - else { + } else { print '-'; } - print "</td>"; + print "</td>"; - print "</tr>\n"; + print "</tr>\n"; - print '</table>'; + print '</table>'; - print '<br><div class="center">'; - print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; - print '&nbsp; &nbsp;'; - print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - print '</div>'; + print '<br><div class="center">'; + print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; + print '&nbsp; &nbsp;'; + print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; - print "</form>\n"; + print "</form>\n"; } llxFooter(); diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index b9e6783ceca..2969d6958b5 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -35,9 +35,15 @@ $action = GETPOST('action', 'aZ09'); // Security check $socid = 0; -if (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -if (empty($user->rights->loan->calc)) accessforbidden(); +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")); @@ -120,7 +126,9 @@ if ($action == 'updateecheancier' && empty($pay_without_schedule)) { $echeances->lines[$i - 1] = $new_echeance; $i++; } - if ($result > 0) $db->commit(); + if ($result > 0) { + $db->commit(); + } } /* @@ -141,24 +149,23 @@ $morehtmlref = '<div class="refidno">'; $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, 0, 'string', '', 0, 1); $morehtmlref .= $form->editfieldval("Label", 'label', $object->label, $object, 0, 'string', '', null, null, '', 1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->loadLangs(array("projects")); $morehtmlref .= '<br>'.$langs->trans('Project').' : '; - if ($user->rights->loan->write) - { - if ($action != 'classify') + if ($user->rights->loan->write) { + if ($action != 'classify') { //$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref .= '<input type="hidden" name="action" value="classin">'; - $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref .= '</form>'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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)) { @@ -212,14 +219,14 @@ $(document).ready(function() { </script> <?php -if ($pay_without_schedule == 1) +if ($pay_without_schedule == 1) { print '<div class="warning">'.$langs->trans('CantUseScheduleWithLoanStartedToPaid').'</div>'."\n"; +} print '<form name="createecheancier" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="loanid" value="'.$loanid.'">'; -if (count($echeances->lines) > 0) -{ +if (count($echeances->lines) > 0) { print '<input type="hidden" name="action" value="updateecheancier">'; } else { print '<input type="hidden" name="action" value="createecheancier">'; @@ -229,7 +236,9 @@ print '<div class="div-table-responsive-no-min">'; print '<table class="border centpercent">'; print '<tr class="liste_titre">'; $colspan = 6; -if (count($echeances->lines) > 0) $colspan++; +if (count($echeances->lines) > 0) { + $colspan++; +} print '<th class="center" colspan="'.$colspan.'">'; print $langs->trans("FinancialCommitment"); print '</th>'; @@ -245,18 +254,18 @@ print '<th class="center">'.$langs->trans("CapitalRemain"); print '<br>('.price($object->capital, 0, '', 1, -1, -1, $conf->currency).')'; print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">'; print '</th>'; -if (count($echeances->lines) > 0) print '<th class="center">'.$langs->trans('DoPayment').'</th>'; +if (count($echeances->lines) > 0) { + print '<th class="center">'.$langs->trans('DoPayment').'</th>'; +} print '</tr>'."\n"; -if ($object->nbterm > 0 && count($echeances->lines) == 0) -{ +if ($object->nbterm > 0 && count($echeances->lines) == 0) { $i = 1; $capital = $object->capital; $insurance = $object->insurance_amount / $object->nbterm; $insurance = price2num($insurance, 'MT'); $regulInsurance = price2num($object->insurance_amount - ($insurance * $object->nbterm)); - while ($i < $object->nbterm + 1) - { + while ($i < $object->nbterm + 1) { $mens = price2num($echeances->calcMonthlyPayments($capital, $object->rate / 100, $object->nbterm - $i + 1), 'MT'); $int = ($capital * ($object->rate / 12)) / 100; $int = price2num($int, 'MT'); @@ -273,8 +282,7 @@ if ($object->nbterm > 0 && count($echeances->lines) == 0) $i++; $capital = $cap_rest; } -} elseif (count($echeances->lines) > 0) -{ +} elseif (count($echeances->lines) > 0) { $i = 1; $capital = $object->capital; $insurance = $object->insurance_amount / $object->nbterm; @@ -300,14 +308,12 @@ if ($object->nbterm > 0 && count($echeances->lines) == 0) print '<td class="center" id="capital'.$i.'">'.price($cap_rest, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="hi_capital'.$i.'" id ="hi_capital'.$i.'" value="'.$cap_rest.'">'; print '<td class="center">'; - if (!empty($line->fk_bank)) - { + if (!empty($line->fk_bank)) { print $langs->trans('Paid'); - if (!empty($line->fk_payment_loan)) + if (!empty($line->fk_payment_loan)) { print '&nbsp;<a href="'.DOL_URL_ROOT.'/loan/payment/card.php?id='.$line->fk_payment_loan.'">('.img_object($langs->trans("Payment"), "payment").' '.$line->fk_payment_loan.')</a>'; - } - elseif (!$printed) - { + } + } elseif (!$printed) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&amp;action=create">'.$langs->trans('DoPayment').'</a>'; $printed = true; } @@ -323,8 +329,11 @@ print '</div>'; print '</br>'; -if (count($echeances->lines) == 0) $label = $langs->trans("Create"); -else $label = $langs->trans("Save"); +if (count($echeances->lines) == 0) { + $label = $langs->trans("Create"); +} else { + $label = $langs->trans("Save"); +} print '<div class="center"><input class="button" type="submit" value="'.$label.'" '.(($pay_without_schedule == 1) ? 'disabled title="'.$langs->trans('CantUseScheduleWithLoanStartedToPaid').'"' : '').'title=""></div>'; print '</form>'; diff --git a/htdocs/mailmanspip/class/index.html b/htdocs/mailmanspip/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index a0a636dd136..d08f6f65094 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -77,8 +77,7 @@ class MailmanSpip */ public function isSpipEnabled() { - if (defined("ADHERENT_USE_SPIP") && (ADHERENT_USE_SPIP == 1)) - { + if (defined("ADHERENT_USE_SPIP") && (ADHERENT_USE_SPIP == 1)) { return true; } @@ -92,10 +91,8 @@ class MailmanSpip */ public function checkSpipConfig() { - if (defined('ADHERENT_SPIP_SERVEUR') && defined('ADHERENT_SPIP_USER') && defined('ADHERENT_SPIP_PASS') && defined('ADHERENT_SPIP_DB')) - { - if (ADHERENT_SPIP_SERVEUR != '' && ADHERENT_SPIP_USER != '' && ADHERENT_SPIP_PASS != '' && ADHERENT_SPIP_DB != '') - { + if (defined('ADHERENT_SPIP_SERVEUR') && defined('ADHERENT_SPIP_USER') && defined('ADHERENT_SPIP_PASS') && defined('ADHERENT_SPIP_DB')) { + if (ADHERENT_SPIP_SERVEUR != '' && ADHERENT_SPIP_USER != '' && ADHERENT_SPIP_PASS != '' && ADHERENT_SPIP_DB != '') { return true; } } @@ -112,8 +109,7 @@ class MailmanSpip { $resource = getDoliDBInstance('mysql', ADHERENT_SPIP_SERVEUR, ADHERENT_SPIP_USER, ADHERENT_SPIP_PASS, ADHERENT_SPIP_DB, ADHERENT_SPIP_PORT); - if ($resource->ok) - { + if ($resource->ok) { return $resource; } @@ -165,8 +161,7 @@ class MailmanSpip dol_syslog('result curl_exec='.$result); //An error was found, we store it in $this->error for later - if ($result === false || curl_errno($ch) > 0) - { + if ($result === false || curl_errno($ch) > 0) { $this->error = curl_errno($ch).' '.curl_error($ch); dol_syslog('Error using curl '.$this->error, LOG_ERR); } @@ -188,14 +183,11 @@ class MailmanSpip // phpcs:enable dol_syslog(get_class($this)."::add_to_spip"); - if ($this->isSpipEnabled()) - { - if ($this->checkSpipConfig()) - { + if ($this->isSpipEnabled()) { + if ($this->checkSpipConfig()) { $mydb = $this->connectSpip(); - if ($mydb) - { + if ($mydb) { require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $mdpass = dol_hash($object->pass); $htpass = crypt($object->pass, makesalt()); @@ -205,13 +197,20 @@ class MailmanSpip $mydb->close(); - if ($result) - { + 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; } @@ -228,27 +227,31 @@ class MailmanSpip // phpcs:enable dol_syslog(get_class($this)."::del_to_spip"); - if ($this->isSpipEnabled()) - { - if ($this->checkSpipConfig()) - { + if ($this->isSpipEnabled()) { + if ($this->checkSpipConfig()) { $mydb = $this->connectSpip(); - if ($mydb) - { + if ($mydb) { $query = "DELETE FROM spip_auteurs WHERE login='".$object->login."'"; $result = $mydb->query($query); $mydb->close(); - if ($result) - { + 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; } @@ -263,22 +266,17 @@ class MailmanSpip public function is_in_spip($object) { // phpcs:enable - if ($this->isSpipEnabled()) - { - if ($this->checkSpipConfig()) - { + if ($this->isSpipEnabled()) { + if ($this->checkSpipConfig()) { $mydb = $this->connectSpip(); - if ($mydb) - { + if ($mydb) { $query = "SELECT login FROM spip_auteurs WHERE login='".$object->login."'"; $result = $mydb->query($query); - if ($result) - { - if ($mydb->num_rows($result)) - { + if ($result) { + if ($mydb->num_rows($result)) { // nous avons au moins une reponse $mydb->close($result); return 1; @@ -291,9 +289,15 @@ class MailmanSpip $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; } @@ -316,36 +320,32 @@ class MailmanSpip $this->mladded_ok = array(); $this->mladded_ko = array(); - if (!function_exists("curl_init")) - { + if (!function_exists("curl_init")) { $langs->load("errors"); $this->error = $langs->trans("ErrorFunctionNotAvailableInPHP", "curl_init"); return -1; } - if ($conf->adherent->enabled) // Synchro for members - { - if (!empty($conf->global->ADHERENT_MAILMAN_URL)) - { - if ($listes == '' && !empty($conf->global->ADHERENT_MAILMAN_LISTS)) $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS); - else $lists = explode(',', $listes); + if ($conf->adherent->enabled) { // Synchro for members + if (!empty($conf->global->ADHERENT_MAILMAN_URL)) { + if ($listes == '' && !empty($conf->global->ADHERENT_MAILMAN_LISTS)) { + $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS); + } else { + $lists = explode(',', $listes); + } $categstatic = new Categorie($this->db); - foreach ($lists as $list) - { + foreach ($lists as $list) { // Filter on type something (ADHERENT_MAILMAN_LISTS = "mailinglist0,TYPE:typevalue:mailinglist1,CATEG:categvalue:mailinglist2") $tmp = explode(':', $list); - if (!empty($tmp[2])) - { + if (!empty($tmp[2])) { $list = $tmp[2]; - if ($object->element == 'member' && $tmp[0] == 'TYPE' && $object->type != $tmp[1]) // Filter on member type label - { + if ($object->element == 'member' && $tmp[0] == 'TYPE' && $object->type != $tmp[1]) { // Filter on member type label dol_syslog("We ignore list ".$list." because object member type ".$object->type." does not match ".$tmp[1], LOG_DEBUG); continue; } - if ($object->element == 'member' && $tmp[0] == 'CATEG' && !in_array($tmp[1], $categstatic->containing($object->id, 'member', 'label'))) // Filter on member category - { + if ($object->element == 'member' && $tmp[0] == 'CATEG' && !in_array($tmp[1], $categstatic->containing($object->id, 'member', 'label'))) { // Filter on member category dol_syslog("We ignore list ".$list." because object member is not into category ".$tmp[1], LOG_DEBUG); continue; } @@ -354,11 +354,12 @@ class MailmanSpip //We call Mailman to subscribe the user $result = $this->callMailman($object, $conf->global->ADHERENT_MAILMAN_URL, $list); - if ($result === false) - { + if ($result === false) { $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 { @@ -387,36 +388,32 @@ class MailmanSpip $this->mlremoved_ok = array(); $this->mlremoved_ko = array(); - if (!function_exists("curl_init")) - { + if (!function_exists("curl_init")) { $langs->load("errors"); $this->error = $langs->trans("ErrorFunctionNotAvailableInPHP", "curl_init"); return -1; } - if ($conf->adherent->enabled) // Synchro for members - { - if (!empty($conf->global->ADHERENT_MAILMAN_UNSUB_URL)) - { - if ($listes == '' && !empty($conf->global->ADHERENT_MAILMAN_LISTS)) $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS); - else $lists = explode(',', $listes); + if ($conf->adherent->enabled) { // Synchro for members + if (!empty($conf->global->ADHERENT_MAILMAN_UNSUB_URL)) { + if ($listes == '' && !empty($conf->global->ADHERENT_MAILMAN_LISTS)) { + $lists = explode(',', $conf->global->ADHERENT_MAILMAN_LISTS); + } else { + $lists = explode(',', $listes); + } $categstatic = new Categorie($this->db); - foreach ($lists as $list) - { + foreach ($lists as $list) { // Filter on type something (ADHERENT_MAILMAN_LISTS = "mailinglist0,TYPE:typevalue:mailinglist1,CATEG:categvalue:mailinglist2") $tmp = explode(':', $list); - if (!empty($tmp[2])) - { + if (!empty($tmp[2])) { $list = $tmp[2]; - if ($object->element == 'member' && $tmp[0] == 'TYPE' && $object->type != $tmp[1]) // Filter on member type label - { + if ($object->element == 'member' && $tmp[0] == 'TYPE' && $object->type != $tmp[1]) { // Filter on member type label dol_syslog("We ignore list ".$list." because object member type ".$object->type." does not match ".$tmp[1], LOG_DEBUG); continue; } - if ($object->element == 'member' && $tmp[0] == 'CATEG' && !in_array($tmp[1], $categstatic->containing($object->id, 'member', 'label'))) // Filter on member category - { + if ($object->element == 'member' && $tmp[0] == 'CATEG' && !in_array($tmp[1], $categstatic->containing($object->id, 'member', 'label'))) { // Filter on member category dol_syslog("We ignore list ".$list." because object member is not into category ".$tmp[1], LOG_DEBUG); continue; } @@ -425,11 +422,12 @@ class MailmanSpip //We call Mailman to unsubscribe the user $result = $this->callMailman($object, $conf->global->ADHERENT_MAILMAN_UNSUB_URL, $list); - if ($result === false) - { + if ($result === false) { $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 { diff --git a/htdocs/mailmanspip/index.html b/htdocs/mailmanspip/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 437e024a3ae..0e13a072a39 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1,10 +1,10 @@ <?php /* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com> - * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> - * Copyright (C) 2005-2015 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2005-2021 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2008 Matteli * Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es> @@ -12,7 +12,9 @@ * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2020 Demarest Maxime <maxime@indelog.fr> - * Copyright (C) 2020 Charlene Benke <charlie@patas-monkey.com> + * Copyright (C) 2020 Charlene Benke <charlie@patas-monkey.com> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,8 +40,7 @@ // For optional tuning. Enabled if environment variable MAIN_SHOW_TUNING_INFO is defined. $micro_start_time = 0; -if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) -{ +if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) { list($usec, $sec) = explode(" ", microtime()); $micro_start_time = ((float) $usec + (float) $sec); // Add Xdebug code coverage @@ -55,17 +56,21 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) * only be guaranted by escaping data during output. * * @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) + * @param string $type 0=POST, 1=GET, 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) { - // Decode string first + // Decode string first bcause a lot of things are obfuscated by encoding or multiple encoding. // So <svg o&#110;load='console.log(&quot;123&quot;)' become <svg onload='console.log(&quot;123&quot;)' // So "&colon;&apos;" become ":'" (due to ENT_HTML5) - $val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5); - - // TODO loop to decode until no more thing to decode ? + // Loop to decode until no more thing to decode. + //print "before decoding $val\n"; + do { + $oldval = $val; + $val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5); + } while ($oldval != $val); + //print "after decoding $val\n"; // We clean string because some hacks try to obfuscate evil strings by inserting non printable chars. Example: 'java(ascci09)scr(ascii00)ipt' is processed like 'javascript' (whatever is place of evil ascii char) // We should use dol_string_nounprintableascii but function is not yet loaded/available @@ -75,8 +80,7 @@ function testSqlAndScriptInject($val, $type) $inj = 0; // For SQL Injection (only GET are used to be included into bad escaped SQL requests) - if ($type == 1 || $type == 3) - { + if ($type == 1 || $type == 3) { $inj += preg_match('/delete\s+from/i', $val); $inj += preg_match('/create\s+table/i', $val); $inj += preg_match('/insert\s+into/i', $val); @@ -86,12 +90,10 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database $inj += preg_match('/<svg/i', $val); // <svg can be allowed in POST } - if ($type == 3) - { + if ($type == 3) { $inj += preg_match('/select|update|delete|truncate|replace|group\s+by|concat|count|from|union/i', $val); } - if ($type != 2) // Not common key strings, so we can check them both on GET and POST - { + if ($type != 2) { // Not common key strings, so we can check them both on GET and POST $inj += preg_match('/updatexml\(/i', $val); $inj += preg_match('/update.+set.+=/i', $val); $inj += preg_match('/union.+select/i', $val); @@ -110,7 +112,9 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/<object/i', $val); $inj += preg_match('/<script/i', $val); $inj += preg_match('/Set\.constructor/i', $val); // ECMA script 6 - if (!defined('NOSTYLECHECK')) $inj += preg_match('/<style/i', $val); + if (!defined('NOSTYLECHECK')) { + $inj += preg_match('/<style/i', $val); + } $inj += preg_match('/base\s+href/si', $val); $inj += preg_match('/=data:/si', $val); // List of dom events is on https://www.w3schools.com/jsref/dom_obj_event.asp @@ -119,7 +123,7 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/ontouch([a-z]*)\s*=/i', $val); // $inj += preg_match('/on(abort|afterprint|beforeprint|beforeunload|blur|canplay|canplaythrough|change|click|contextmenu|copy|cut)\s*=/i', $val); $inj += preg_match('/on(dblclick|drop|durationchange|ended|error|focus|focusin|focusout|hashchange|input|invalid)\s*=/i', $val); - $inj += preg_match('/on(keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|offline|online|pagehide|pageshow)\s*=/i', $val); + $inj += preg_match('/on(keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|loadend|offline|online|pagehide|pageshow)\s*=/i', $val); $inj += preg_match('/on(paste|pause|play|playing|progress|ratechange|resize|reset|scroll|search|seeking|select|show|stalled|start|submit|suspend)\s*=/i', $val); $inj += preg_match('/on(timeupdate|toggle|unload|volumechange|waiting)\s*=/i', $val); @@ -131,20 +135,24 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/ontouch([a-z]*)\s*=/i', $tmpval); // $inj += preg_match('/on(abort|afterprint|beforeprint|beforeunload|blur|canplay|canplaythrough|change|click|contextmenu|copy|cut)\s*=/i', $tmpval); $inj += preg_match('/on(dblclick|drop|durationchange|ended|error|focus|focusin|focusout|hashchange|input|invalid)\s*=/i', $tmpval); - $inj += preg_match('/on(keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|offline|online|pagehide|pageshow)\s*=/i', $tmpval); + $inj += preg_match('/on(keydown|keypress|keyup|load|loadeddata|loadedmetadata|loadstart|loadend|offline|online|pagehide|pageshow)\s*=/i', $tmpval); $inj += preg_match('/on(paste|pause|play|playing|progress|ratechange|resize|reset|scroll|search|seeking|select|show|stalled|start|submit|suspend)\s*=/i', $tmpval); $inj += preg_match('/on(timeupdate|toggle|unload|volumechange|waiting)\s*=/i', $tmpval); //$inj += preg_match('/on[A-Z][a-z]+\*=/', $val); // To lock event handlers onAbort(), ... $inj += preg_match('/&#58;|&#0000058|&#x3A/i', $val); // refused string ':' encoded (no reason to have it encoded) to lock 'javascript:...' + $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) { - $val = str_replace('enclosure="', 'enclosure=X', $val); // We accept enclosure=" + $val = str_replace('enclosure="', 'enclosure=X', $val); // We accept enclosure=" for the export/import module $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. + if ($type == 2) { + $inj += preg_match('/[:;"\'<>\?\(\){}\$%]/', $val); // PHP_SELF is a file system (or url path without parameters). It can contains spaces. + } + return $inj; } @@ -157,17 +165,14 @@ function testSqlAndScriptInject($val, $type) */ function analyseVarsForSqlAndScriptsInjection(&$var, $type) { - if (is_array($var)) - { - foreach ($var as $key => $value) // Warning, $key may also be used for attacks - { - if (analyseVarsForSqlAndScriptsInjection($key, $type) && analyseVarsForSqlAndScriptsInjection($value, $type)) - { + if (is_array($var)) { + foreach ($var as $key => $value) { // Warning, $key may also be used for attacks + if (analyseVarsForSqlAndScriptsInjection($key, $type) && analyseVarsForSqlAndScriptsInjection($value, $type)) { //$var[$key] = $value; // This is useless } 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"]).')'; + $errormessage = 'Access refused to '.$ip.' by SQL or Script injection protection in main.inc.php - GETPOST type='.htmlentities($type).' paramkey='.htmlentities($key).' paramvalue='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]); print $errormessage; // Add entry into error log if (function_exists('error_log')) { @@ -185,21 +190,22 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type) // Check consistency of NOREQUIREXXX DEFINES -if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && !defined('NOREQUIREMENU')) -{ - print 'If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not set them'; +if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && !defined('NOREQUIREMENU')) { + print 'If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not set them.'; + exit; +} +if (defined('NOREQUIREUSER') && !defined('NOREQUIREMENU')) { + print 'If define NOREQUIREUSER is set, you must also set NOREQUIREMENU or not set it.'; exit; } // Sanity check on URL -if (!empty($_SERVER["PHP_SELF"])) -{ +if (!empty($_SERVER["PHP_SELF"])) { $morevaltochecklikepost = array($_SERVER["PHP_SELF"]); analyseVarsForSqlAndScriptsInjection($morevaltochecklikepost, 2); } // Sanity check on GET parameters -if (!defined('NOSCANGETFORINJECTION') && !empty($_SERVER["QUERY_STRING"])) -{ +if (!defined('NOSCANGETFORINJECTION') && !empty($_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 @@ -207,14 +213,12 @@ if (!defined('NOSCANGETFORINJECTION') && !empty($_SERVER["QUERY_STRING"])) analyseVarsForSqlAndScriptsInjection($morevaltochecklikeget, 1); } // Sanity check on POST -if (!defined('NOSCANPOSTFORINJECTION')) -{ +if (!defined('NOSCANPOSTFORINJECTION')) { analyseVarsForSqlAndScriptsInjection($_POST, 0); } // This is to make Dolibarr working with Plesk -if (!empty($_SERVER['DOCUMENT_ROOT']) && substr($_SERVER['DOCUMENT_ROOT'], -6) !== 'htdocs') -{ +if (!empty($_SERVER['DOCUMENT_ROOT']) && substr($_SERVER['DOCUMENT_ROOT'], -6) !== 'htdocs') { set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); } @@ -224,22 +228,24 @@ require_once 'filefunc.inc.php'; // If there is a POST parameter to tell to save automatically some POST parameters into cookies, we do it. // This is used for example by form of boxes to save personalization of some options. // DOL_AUTOSET_COOKIE=cookiename:val1,val2 and cookiename_val1=aaa cookiename_val2=bbb will set cookie_name with value json_encode(array('val1'=> , )) -if (!empty($_POST["DOL_AUTOSET_COOKIE"])) -{ +if (!empty($_POST["DOL_AUTOSET_COOKIE"])) { $tmpautoset = explode(':', $_POST["DOL_AUTOSET_COOKIE"], 2); $tmplist = explode(',', $tmpautoset[1]); $cookiearrayvalue = array(); - foreach ($tmplist as $tmpkey) - { + foreach ($tmplist as $tmpkey) { $postkey = $tmpautoset[0].'_'.$tmpkey; //var_dump('tmpkey='.$tmpkey.' postkey='.$postkey.' value='.$_POST[$postkey]); - if (!empty($_POST[$postkey])) $cookiearrayvalue[$tmpkey] = $_POST[$postkey]; + if (!empty($_POST[$postkey])) { + $cookiearrayvalue[$tmpkey] = $_POST[$postkey]; + } } $cookiename = $tmpautoset[0]; $cookievalue = json_encode($cookiearrayvalue); //var_dump('setcookie cookiename='.$cookiename.' cookievalue='.$cookievalue); setcookie($cookiename, empty($cookievalue) ? '' : $cookievalue, empty($cookievalue) ? 0 : (time() + (86400 * 354)), '/', null, false, true); // keep cookie 1 year and add tag httponly - if (empty($cookievalue)) unset($_COOKIE[$cookiename]); + if (empty($cookievalue)) { + unset($_COOKIE[$cookiename]); + } } @@ -254,11 +260,12 @@ if (ini_get('session.save_handler') == 'user') { $prefix = dol_getprefix(''); $sessionname = 'DOLSESSID_'.$prefix; $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; -if (!empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime', $_COOKIE[$sessiontimeout]); +if (!empty($_COOKIE[$sessiontimeout])) { + ini_set('session.gc_maxlifetime', $_COOKIE[$sessiontimeout]); +} // 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')) -{ +if (!defined('NOSESSION')) { 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); session_start(); @@ -270,18 +277,21 @@ require_once 'master.inc.php'; // If software has been locked. Only login $conf->global->MAIN_ONLY_LOGIN_ALLOWED is allowed. -if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) -{ +if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { $ok = 0; - if ((!session_id() || !isset($_SESSION["dol_login"])) && !isset($_POST["username"]) && !empty($_SERVER["GATEWAY_INTERFACE"])) $ok = 1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) - elseif (isset($_POST["username"]) && $_POST["username"] == $conf->global->MAIN_ONLY_LOGIN_ALLOWED) $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) - elseif (defined('NOREQUIREDB')) $ok = 1; // We let working pages that don't need database access (xxx.css.php) - elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok = 1; // We let working pages that ask to work even if only login enabled (logout.php) - elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == $conf->global->MAIN_ONLY_LOGIN_ALLOWED) $ok = 1; // We let working if user is allowed admin - if (!$ok) - { - if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != $conf->global->MAIN_ONLY_LOGIN_ALLOWED) - { + if ((!session_id() || !isset($_SESSION["dol_login"])) && !isset($_POST["username"]) && !empty($_SERVER["GATEWAY_INTERFACE"])) { + $ok = 1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) + } elseif (isset($_POST["username"]) && $_POST["username"] == $conf->global->MAIN_ONLY_LOGIN_ALLOWED) { + $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) + } elseif (defined('NOREQUIREDB')) { + $ok = 1; // We let working pages that don't need database access (xxx.css.php) + } elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) { + $ok = 1; // We let working pages that ask to work even if only login enabled (logout.php) + } elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == $conf->global->MAIN_ONLY_LOGIN_ALLOWED) { + $ok = 1; // We let working if user is allowed admin + } + if (!$ok) { + if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != $conf->global->MAIN_ONLY_LOGIN_ALLOWED) { print 'Sorry, your application is offline.'."\n"; 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'; @@ -300,21 +310,21 @@ if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) register_shutdown_function('dol_shutdown'); // Load debugbar -if (!empty($conf->debugbar->enabled) && !GETPOST('dol_use_jmobile') && empty($_SESSION['dol_use_jmobile'])) -{ +if (!empty($conf->debugbar->enabled) && !GETPOST('dol_use_jmobile') && empty($_SESSION['dol_use_jmobile'])) { global $debugbar; include_once DOL_DOCUMENT_ROOT.'/debugbar/class/DebugBar.php'; $debugbar = new DolibarrDebugBar(); $renderer = $debugbar->getRenderer(); - if (empty($conf->global->MAIN_HTML_HEADER)) $conf->global->MAIN_HTML_HEADER = ''; + if (empty($conf->global->MAIN_HTML_HEADER)) { + $conf->global->MAIN_HTML_HEADER = ''; + } $conf->global->MAIN_HTML_HEADER .= $renderer->renderHead(); $debugbar['time']->startMeasure('pageaftermaster', 'Page generation (after environment init)'); } // Detection browser -if (isset($_SERVER["HTTP_USER_AGENT"])) -{ +if (isset($_SERVER["HTTP_USER_AGENT"])) { $tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); $conf->browser->name = $tmp['browsername']; $conf->browser->os = $tmp['browseros']; @@ -322,26 +332,23 @@ if (isset($_SERVER["HTTP_USER_AGENT"])) $conf->browser->layout = $tmp['layout']; // 'classic', 'phone', 'tablet' //var_dump($conf->browser); - if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover = 1; + if ($conf->browser->layout == 'phone') { + $conf->dol_no_mouse_hover = 1; + } } // Set global MAIN_OPTIMIZEFORTEXTBROWSER (must be before login part) -if (GETPOST('textbrowser', 'int') || (!empty($conf->browser->name) && $conf->browser->name == 'lynxlinks')) // If we must enable text browser -{ +if (GETPOST('textbrowser', 'int') || (!empty($conf->browser->name) && $conf->browser->name == 'lynxlinks')) { // If we must enable text browser $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER = 1; } // Force HTTPS if required ($conf->file->main_force_https is 0/1 or 'https dolibarr root url') // $_SERVER["HTTPS"] is 'on' when link is https, otherwise $_SERVER["HTTPS"] is empty or 'off' -if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on')) -{ +if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on')) { $newurl = ''; - if (is_numeric($conf->file->main_force_https)) - { - if ($conf->file->main_force_https == '1' && !empty($_SERVER["SCRIPT_URI"])) // If SCRIPT_URI supported by server - { - if (preg_match('/^http:/i', $_SERVER["SCRIPT_URI"]) && !preg_match('/^https:/i', $_SERVER["SCRIPT_URI"])) // If link is http - { + if (is_numeric($conf->file->main_force_https)) { + if ($conf->file->main_force_https == '1' && !empty($_SERVER["SCRIPT_URI"])) { // If SCRIPT_URI supported by server + if (preg_match('/^http:/i', $_SERVER["SCRIPT_URI"]) && !preg_match('/^https:/i', $_SERVER["SCRIPT_URI"])) { // If link is http $newurl = preg_replace('/^http:/i', 'https:', $_SERVER["SCRIPT_URI"]); } } else { @@ -353,8 +360,7 @@ if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERV $newurl = $conf->file->main_force_https.$_SERVER["REQUEST_URI"]; } // Start redirect - if ($newurl) - { + if ($newurl) { header_remove(); // Clean header already set to be sure to remove any header like "Set-Cookie: DOLSESSID_..." from non HTTPS answers dol_syslog("main.inc: dolibarr_main_force_https is on, we make a redirect to ".$newurl); header("Location: ".$newurl); @@ -364,48 +370,45 @@ if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERV } } -if (!defined('NOLOGIN') && !defined('NOIPCHECK') && !empty($dolibarr_main_restrict_ip)) -{ +if (!defined('NOLOGIN') && !defined('NOIPCHECK') && !empty($dolibarr_main_restrict_ip)) { $listofip = explode(',', $dolibarr_main_restrict_ip); $found = false; - foreach ($listofip as $ip) - { + foreach ($listofip as $ip) { $ip = trim($ip); - if ($ip == $_SERVER['REMOTE_ADDR']) - { + if ($ip == $_SERVER['REMOTE_ADDR']) { $found = true; break; } } - if (!$found) - { + if (!$found) { print 'Access refused by IP protection. Your detected IP is '.$_SERVER['REMOTE_ADDR']; exit; } } // Loading of additional presentation includes -if (!defined('NOREQUIREHTML')) require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; // Need 660ko memory (800ko in 2.2) -require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory +if (!defined('NOREQUIREHTML')) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; // Need 660ko memory (800ko in 2.2) +} +if (!defined('NOREQUIREAJAX')) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory +} // If install or upgrade process not done or not completely finished, we call the install page. -if (!empty($conf->global->MAIN_NOT_INSTALLED) || !empty($conf->global->MAIN_NOT_UPGRADED)) -{ +if (!empty($conf->global->MAIN_NOT_INSTALLED) || !empty($conf->global->MAIN_NOT_UPGRADED)) { dol_syslog("main.inc: A previous install or upgrade was not complete. Redirect to install page.", LOG_WARNING); header("Location: ".DOL_URL_ROOT."/install/index.php"); exit; } // If an upgrade process is required, we call the install page. if ((!empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_VERSION_LAST_UPGRADE != DOL_VERSION)) -|| (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && !empty($conf->global->MAIN_VERSION_LAST_INSTALL) && ($conf->global->MAIN_VERSION_LAST_INSTALL != DOL_VERSION))) -{ +|| (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && !empty($conf->global->MAIN_VERSION_LAST_INSTALL) && ($conf->global->MAIN_VERSION_LAST_INSTALL != DOL_VERSION))) { $versiontocompare = empty($conf->global->MAIN_VERSION_LAST_UPGRADE) ? $conf->global->MAIN_VERSION_LAST_INSTALL : $conf->global->MAIN_VERSION_LAST_UPGRADE; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $dolibarrversionlastupgrade = preg_split('/[.-]/', $versiontocompare); $dolibarrversionprogram = preg_split('/[.-]/', DOL_VERSION); $rescomp = versioncompare($dolibarrversionprogram, $dolibarrversionlastupgrade); - if ($rescomp > 0) // Programs have a version higher than database. We did not add "&& $rescomp < 3" because we want upgrade process for build upgrades - { + if ($rescomp > 0) { // Programs have a version higher than database. We did not add "&& $rescomp < 3" because we want upgrade process for build upgrades dol_syslog("main.inc: database version ".$versiontocompare." is lower than programs version ".DOL_VERSION.". Redirect to install page.", LOG_WARNING); header("Location: ".DOL_URL_ROOT."/install/index.php"); exit; @@ -413,37 +416,53 @@ if ((!empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_VE } // Creation of a token against CSRF vulnerabilities -if (!defined('NOTOKENRENEWAL')) -{ +if (!defined('NOTOKENRENEWAL')) { // Rolling token at each call ($_SESSION['token'] contains token of previous page) - if (isset($_SESSION['newtoken'])) $_SESSION['token'] = $_SESSION['newtoken']; + if (isset($_SESSION['newtoken'])) { + $_SESSION['token'] = $_SESSION['newtoken']; + } - // Save in $_SESSION['newtoken'] what will be next token. Into forms, we will add param token = $_SESSION['newtoken'] + // Save in $_SESSION['newtoken'] what will be next token. Into forms, we will add param token = newToken(); $token = dol_hash(uniqid(mt_rand(), true)); // Generates a hash of a random number $_SESSION['newtoken'] = $token; dol_syslog("NEW TOKEN reclaimed by : " . $_SERVER['PHP_SELF'], LOG_DEBUG); } -//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 -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 into page -{ - // 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', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_reject_check'))) - { - if (!GETPOSTISSET('token')) { +//dol_syslog("aaaa - ".defined('NOCSRFCHECK')." - ".$dolibarr_nocsrfcheck." - ".$conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN." - ".$_SERVER['REQUEST_METHOD']." - ".GETPOST('token', 'alpha')); + +// Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set into page +if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) || defined('CSRFCHECK_WITH_TOKEN')) { + // Array of action code where CSRFCHECK with token will be forced (so token must be provided on url request) + $arrayofactiontoforcetokencheck = array( + 'activate', 'add', 'addtimespent', 'update', 'install', + 'confirm_create_user', 'confirm_create_thirdparty', 'confirm_purge', 'confirm_reject_check', + 'delete', 'deletefilter', 'deleteoperation', 'deleteprof', 'deletepayment', 'disable', + 'doprev', 'donext', 'dvprev', 'dvnext', + 'enable', 'setpricelevel' + ); + $sensitiveget = false; + if (in_array(GETPOST('action', 'aZ09'), $arrayofactiontoforcetokencheck)) { + $sensitiveget = true; + } + if (preg_match('/^(disable_|enable_|setremise)/', GETPOST('action', 'aZ09'))) { + $sensitiveget = true; + } + + // Check all cases that need a mandatory token (all POST actions + all login, actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set + all sensitive GET actions) + if ( + $_SERVER['REQUEST_METHOD'] == 'POST' || + $sensitiveget || + ((GETPOSTISSET('actionlogin') || GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) + ) { + if (!GETPOST('token', 'alpha')) { // If token is not provided or empty if (GETPOST('uploadform', 'int')) { - dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused. File size too large."); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_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."); + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.", LOG_WARNING); if (defined('CSRFCHECK_WITH_TOKEN')) { print "Access to a page that needs a token (constant CSRFCHECK_WITH_TOKEN is defined) is refused by CSRF protection in main.inc.php. Token not provided.\n"; } else { @@ -455,9 +474,10 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl } } - 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); + $sessiontokenforthisurl = (empty($_SESSION['token']) ? '' : $_SESSION['token']); + // TODO Get the sessiontokenforthisurl into the array of session token + if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $sessiontokenforthisurl) { + dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_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. 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).'."<br>\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings'); @@ -471,27 +491,28 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl unset($_GET['massaction']); $_POST['id'] = ((int) $savid); } + + // Note: There is another CSRF protection into the filefunc.inc.php } // Disable modules (this must be after session_start and after conf has been loaded) -if (GETPOSTISSET('disablemodules')) $_SESSION["disablemodules"] = GETPOST('disablemodules', 'alpha'); -if (!empty($_SESSION["disablemodules"])) -{ +if (GETPOSTISSET('disablemodules')) { + $_SESSION["disablemodules"] = GETPOST('disablemodules', 'alpha'); +} +if (!empty($_SESSION["disablemodules"])) { $modulepartkeys = array('css', 'js', 'tabs', 'triggers', 'login', 'substitutions', 'menus', 'theme', 'sms', 'tpl', 'barcode', 'models', 'societe', 'hooks', 'dir', 'syslog', 'tpllinkable', 'contactelement', 'moduleforexternal'); $disabled_modules = explode(',', $_SESSION["disablemodules"]); - foreach ($disabled_modules as $module) - { - if ($module) - { - if (empty($conf->$module)) $conf->$module = new stdClass(); // To avoid warnings + foreach ($disabled_modules as $module) { + if ($module) { + if (empty($conf->$module)) { + $conf->$module = new stdClass(); // To avoid warnings + } $conf->$module->enabled = false; - foreach ($modulepartkeys as $modulepartkey) - { + foreach ($modulepartkeys as $modulepartkey) { unset($conf->modules_parts[$modulepartkey][$module]); } - if ($module == 'fournisseur') // Special case - { + if ($module == 'fournisseur') { // Special case $conf->supplier_order->enabled = 0; $conf->supplier_invoice->enabled = 0; } @@ -501,12 +522,9 @@ if (!empty($_SESSION["disablemodules"])) // Set current modulepart $modulepart = explode("/", $_SERVER["PHP_SELF"]); -if (is_array($modulepart) && count($modulepart) > 0) -{ - foreach ($conf->modules as $module) - { - if (in_array($module, $modulepart)) - { +if (is_array($modulepart) && count($modulepart) > 0) { + foreach ($conf->modules as $module) { + if (in_array($module, $modulepart)) { $conf->modulepart = $module; break; } @@ -517,26 +535,27 @@ if (is_array($modulepart) && count($modulepart) > 0) * Phase authentication / login */ $login = ''; -if (!defined('NOLOGIN')) -{ +if (!defined('NOLOGIN')) { // $authmode lists the different method of identification to be tested in order of preference. // Example: 'http', 'dolibarr', 'ldap', 'http,forceuser', '...' - if (defined('MAIN_AUTHENTICATION_MODE')) - { + if (defined('MAIN_AUTHENTICATION_MODE')) { $dolibarr_main_authentication = constant('MAIN_AUTHENTICATION_MODE'); } else { // Authentication mode - if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'http,dolibarr'; + if (empty($dolibarr_main_authentication)) { + $dolibarr_main_authentication = 'http,dolibarr'; + } // Authentication mode: forceuser - if ($dolibarr_main_authentication == 'forceuser' && empty($dolibarr_auto_user)) $dolibarr_auto_user = 'auto'; + if ($dolibarr_main_authentication == 'forceuser' && empty($dolibarr_auto_user)) { + $dolibarr_auto_user = 'auto'; + } } // Set authmode $authmode = explode(',', $dolibarr_main_authentication); // No authentication mode - if (!count($authmode)) - { + if (!count($authmode)) { $langs->load('main'); dol_print_error('', $langs->trans("ErrorConfigParameterNotDefined", 'dolibarr_main_authentication')); exit; @@ -547,8 +566,7 @@ if (!defined('NOLOGIN')) // At the end of this phase, the variable $login is defined. $resultFetchUser = ''; $test = true; - if (!isset($_SESSION["dol_login"])) - { + if (!isset($_SESSION["dol_login"])) { // It is not already authenticated and it requests the login / password include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -565,10 +583,8 @@ if (!defined('NOLOGIN')) //dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,',')); // If in demo mode, we check we go to home page through the public/demo/index.php page - if (!empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') // We ask index page - { - if (empty($_SERVER['HTTP_REFERER']) || !preg_match('/public/', $_SERVER['HTTP_REFERER'])) - { + if (!empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') { // We ask index page + if (empty($_SERVER['HTTP_REFERER']) || !preg_match('/public/', $_SERVER['HTTP_REFERER'])) { dol_syslog("Call index page from another url than demo page (call is done from page ".$_SERVER['HTTP_REFERER'].")"); $url = ''; $url .= ($url ? '&' : '').($dol_hide_topmenu ? 'dol_hide_topmenu='.$dol_hide_topmenu : ''); @@ -588,19 +604,17 @@ if (!defined('NOLOGIN')) $parameters = array(); $reshook = $hookmanager->executeHooks('beforeLoginAuthentication', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { - $test = false; - $error++; + $test = false; + $error++; } // Verification security graphic code - if ($test && GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam'])) - { + if ($test && GETPOST("username", "alpha", 2) && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) && !isset($_SESSION['dol_bypass_antispam'])) { $sessionkey = 'dol_antispam_value'; - $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code']))); + $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) === strtolower(GETPOST('code', 'none')))); // Check code - if (!$ok) - { + if (!$ok) { dol_syslog('Bad value for code, connexion refused'); // Load translation files required by page $langs->loadLangs(array('main', 'errors')); @@ -613,7 +627,9 @@ if (!defined('NOLOGIN')) // Call trigger $result = $user->call_trigger('USER_LOGIN_FAILED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers // Hooks on failed login @@ -621,45 +637,54 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode'=>$dol_authmode, 'dol_loginmesg'=>$_SESSION["dol_loginmesg"]); $reshook = $hookmanager->executeHooks('afterLoginFailed', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } // Note: exit is done later } } $allowedmethodtopostusername = 2; - if (defined('MAIN_AUTHENTICATION_POST_METHOD')) $allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); + if (defined('MAIN_AUTHENTICATION_POST_METHOD')) { + $allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); + } $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)); // Define if we received data to test the login. $goontestloop = false; - if (isset($_SERVER["REMOTE_USER"]) && in_array('http', $authmode)) $goontestloop = true; - if ($dolibarr_main_authentication == 'forceuser' && !empty($dolibarr_auto_user)) $goontestloop = true; - if (GETPOST("username", "alpha", $allowedmethodtopostusername) || !empty($_COOKIE['login_dolibarr']) || GETPOST('openid_mode', 'alpha', 1)) $goontestloop = true; + if (isset($_SERVER["REMOTE_USER"]) && in_array('http', $authmode)) { + $goontestloop = true; + } + if ($dolibarr_main_authentication == 'forceuser' && !empty($dolibarr_auto_user)) { + $goontestloop = true; + } + if (GETPOST("username", "alpha", $allowedmethodtopostusername) || !empty($_COOKIE['login_dolibarr']) || GETPOST('openid_mode', 'alpha', 1)) { + $goontestloop = true; + } - if (!is_object($langs)) // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages. - { + if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages. include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $langs = new Translate("", $conf); $langcode = (GETPOST('lang', 'aZ09', 1) ?GETPOST('lang', 'aZ09', 1) : (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); - if (defined('MAIN_LANG_DEFAULT')) $langcode = constant('MAIN_LANG_DEFAULT'); + if (defined('MAIN_LANG_DEFAULT')) { + $langcode = constant('MAIN_LANG_DEFAULT'); + } $langs->setDefaultLang($langcode); } // Validation of login/pass/entity // If ok, the variable login will be returned // If error, we will put error message in session under the name dol_loginmesg - if ($test && $goontestloop && (GETPOST('actionlogin', 'aZ09') == 'login' || $dolibarr_main_authentication != 'dolibarr')) - { + 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) - { + if ($login) { $dol_authmode = $conf->authmode; // This properties is defined only when logged, to say what mode was successfully used $dol_tz = $_POST["tz"]; $dol_tz_string = $_POST["tz_string"]; @@ -668,33 +693,37 @@ if (!defined('NOLOGIN')) $dol_tz_string = preg_replace('/\s/', '_', $dol_tz_string); $dol_dst = 0; // Keep $_POST here. Do not use GETPOSTISSET - if (isset($_POST["dst_first"]) && isset($_POST["dst_second"])) - { + if (isset($_POST["dst_first"]) && isset($_POST["dst_second"])) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $datenow = dol_now(); $datefirst = dol_stringtotime($_POST["dst_first"]); $datesecond = dol_stringtotime($_POST["dst_second"]); - if ($datenow >= $datefirst && $datenow < $datesecond) $dol_dst = 1; + if ($datenow >= $datefirst && $datenow < $datesecond) { + $dol_dst = 1; + } } //print $datefirst.'-'.$datesecond.'-'.$datenow.'-'.$dol_tz.'-'.$dol_tzstring.'-'.$dol_dst; exit; } - if (!$login) - { + if (!$login) { dol_syslog('Bad password, connexion refused', LOG_DEBUG); // Load translation files required by page $langs->loadLangs(array('main', 'errors')); // Bad password. No authmode has found a good password. // We set a generic message if not defined inside function checkLoginPassEntity or subfunctions - if (empty($_SESSION["dol_loginmesg"])) $_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword"); + if (empty($_SESSION["dol_loginmesg"])) { + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword"); + } // Call trigger for the "security events" log $user->trigger_mesg = $langs->trans("ErrorBadLoginPassword").' - login='.GETPOST("username", "alpha", 2); // Call trigger $result = $user->call_trigger('USER_LOGIN_FAILED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers // Hooks on failed login @@ -702,19 +731,21 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode'=>$dol_authmode, 'dol_loginmesg'=>$_SESSION["dol_loginmesg"]); $reshook = $hookmanager->executeHooks('afterLoginFailed', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } // Note: exit is done in next chapter } } // End test login / passwords - if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success. - { + if (!$login || (in_array('ldap', $authmode) && empty($passwordtotest))) { // With LDAP we refused empty password because some LDAP are "opened" for anonymous access so connexion is a success. // 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_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit", LOG_INFO); + if (defined('NOREDIRECTBYMAINTOLOGIN')) { + return 'ERROR_NOT_LOGGED'; + } else { if ($_SERVER["HTTP_USER_AGENT"] == 'securitytest') { http_response_code(401); // It makes easier to understand if session was broken during security tests } @@ -724,16 +755,14 @@ if (!defined('NOLOGIN')) } $resultFetchUser = $user->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1)); // login was retrieved previously when checking password. - if ($resultFetchUser <= 0) - { + if ($resultFetchUser <= 0) { dol_syslog('User not found, connexion refused'); session_destroy(); session_set_cookie_params(0, '/', null, (empty($dolibarr_main_force_https) ? false : true), true); // Add tag secure and httponly on session cookie session_name($sessionname); session_start(); - if ($resultFetchUser == 0) - { + if ($resultFetchUser == 0) { // Load translation files required by page $langs->loadLangs(array('main', 'errors')); @@ -741,8 +770,7 @@ if (!defined('NOLOGIN')) $user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login; } - if ($resultFetchUser < 0) - { + if ($resultFetchUser < 0) { $_SESSION["dol_loginmesg"] = $user->error; $user->trigger_mesg = $user->error; @@ -750,7 +778,9 @@ if (!defined('NOLOGIN')) // Call trigger $result = $user->call_trigger('USER_LOGIN_FAILED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers @@ -759,12 +789,20 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode'=>$dol_authmode, 'dol_loginmesg'=>$_SESSION["dol_loginmesg"]); $reshook = $hookmanager->executeHooks('afterLoginFailed', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } $paramsurl = array(); - if (GETPOST('textbrowser', 'int')) $paramsurl[] = 'textbrowser='.GETPOST('textbrowser', 'int'); - if (GETPOST('nojs', 'int')) $paramsurl[] = 'nojs='.GETPOST('nojs', 'int'); - if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09'); + if (GETPOST('textbrowser', 'int')) { + $paramsurl[] = 'textbrowser='.GETPOST('textbrowser', 'int'); + } + if (GETPOST('nojs', 'int')) { + $paramsurl[] = 'nojs='.GETPOST('nojs', 'int'); + } + if (GETPOST('lang', 'aZ09')) { + $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09'); + } header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : '')); exit; } else { @@ -776,12 +814,11 @@ if (!defined('NOLOGIN')) } else { // We are already into an authenticated session $login = $_SESSION["dol_login"]; - $entity = $_SESSION["dol_entity"]; + $entity = isset($_SESSION["dol_entity"]) ? $_SESSION["dol_entity"] : 0; dol_syslog("- This is an already logged session. _SESSION['dol_login']=".$login." _SESSION['dol_entity']=".$entity, LOG_DEBUG); $resultFetchUser = $user->fetch('', $login, '', 1, ($entity > 0 ? $entity : -1)); - if ($resultFetchUser <= 0) - { + if ($resultFetchUser <= 0) { // Account has been removed after login dol_syslog("Can't load user even if session logged. _SESSION['dol_login']=".$login, LOG_WARNING); session_destroy(); @@ -789,8 +826,7 @@ if (!defined('NOLOGIN')) session_name($sessionname); session_start(); - if ($resultFetchUser == 0) - { + if ($resultFetchUser == 0) { // Load translation files required by page $langs->loadLangs(array('main', 'errors')); @@ -798,8 +834,7 @@ if (!defined('NOLOGIN')) $user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login; } - if ($resultFetchUser < 0) - { + if ($resultFetchUser < 0) { $_SESSION["dol_loginmesg"] = $user->error; $user->trigger_mesg = $user->error; @@ -807,7 +842,9 @@ if (!defined('NOLOGIN')) // Call trigger $result = $user->call_trigger('USER_LOGIN_FAILED', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers // Hooks on failed login @@ -815,12 +852,20 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode'=>$dol_authmode, 'dol_loginmesg'=>$_SESSION["dol_loginmesg"]); $reshook = $hookmanager->executeHooks('afterLoginFailed', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } $paramsurl = array(); - if (GETPOST('textbrowser', 'int')) $paramsurl[] = 'textbrowser='.GETPOST('textbrowser', 'int'); - if (GETPOST('nojs', 'int')) $paramsurl[] = 'nojs='.GETPOST('nojs', 'int'); - if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09'); + if (GETPOST('textbrowser', 'int')) { + $paramsurl[] = 'textbrowser='.GETPOST('textbrowser', 'int'); + } + if (GETPOST('nojs', 'int')) { + $paramsurl[] = 'nojs='.GETPOST('nojs', 'int'); + } + if (GETPOST('lang', 'aZ09')) { + $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09'); + } header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : '')); exit; } else { @@ -828,34 +873,31 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('main')); // Code for search criteria persistence. - if (!empty($_GET['save_lastsearch_values'])) // We must use $_GET here - { + if (!empty($_GET['save_lastsearch_values'])) { // We must use $_GET here $relativepathstring = preg_replace('/\?.*$/', '', $_SERVER["HTTP_REFERER"]); $relativepathstring = preg_replace('/^https?:\/\/[^\/]*/', '', $relativepathstring); // Get full path except host server // Clean $relativepathstring - if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring); + if (constant('DOL_URL_ROOT')) { + $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring); + } $relativepathstring = preg_replace('/^\//', '', $relativepathstring); $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); //var_dump($relativepathstring); // We click on a link that leave a page we have to save search criteria, contextpage, limit and page. We save them from tmp to no tmp - if (!empty($_SESSION['lastsearch_values_tmp_'.$relativepathstring])) - { + if (!empty($_SESSION['lastsearch_values_tmp_'.$relativepathstring])) { $_SESSION['lastsearch_values_'.$relativepathstring] = $_SESSION['lastsearch_values_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_values_tmp_'.$relativepathstring]); } - if (!empty($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring])) - { + if (!empty($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring])) { $_SESSION['lastsearch_contextpage_'.$relativepathstring] = $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]); } - if (!empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 0) - { + if (!empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 0) { $_SESSION['lastsearch_page_'.$relativepathstring] = $_SESSION['lastsearch_page_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]); } - if (!empty($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] != $conf->liste_limit) - { + if (!empty($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] != $conf->liste_limit) { $_SESSION['lastsearch_limit_'.$relativepathstring] = $_SESSION['lastsearch_limit_tmp_'.$relativepathstring]; unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]); } @@ -871,8 +913,7 @@ if (!defined('NOLOGIN')) // Is it a new session that has started ? // If we are here, this means authentication was successfull. - if (!isset($_SESSION["dol_login"])) - { + if (!isset($_SESSION["dol_login"])) { // New session for this login has started. $error = 0; @@ -890,11 +931,21 @@ if (!defined('NOLOGIN')) $_SESSION["dol_company"] = $conf->global->MAIN_INFO_SOCIETE_NOM; $_SESSION["dol_entity"] = $conf->entity; // Store value into session (values stored only if defined) - if (!empty($dol_hide_topmenu)) $_SESSION['dol_hide_topmenu'] = $dol_hide_topmenu; - if (!empty($dol_hide_leftmenu)) $_SESSION['dol_hide_leftmenu'] = $dol_hide_leftmenu; - if (!empty($dol_optimize_smallscreen)) $_SESSION['dol_optimize_smallscreen'] = $dol_optimize_smallscreen; - if (!empty($dol_no_mouse_hover)) $_SESSION['dol_no_mouse_hover'] = $dol_no_mouse_hover; - if (!empty($dol_use_jmobile)) $_SESSION['dol_use_jmobile'] = $dol_use_jmobile; + if (!empty($dol_hide_topmenu)) { + $_SESSION['dol_hide_topmenu'] = $dol_hide_topmenu; + } + if (!empty($dol_hide_leftmenu)) { + $_SESSION['dol_hide_leftmenu'] = $dol_hide_leftmenu; + } + if (!empty($dol_optimize_smallscreen)) { + $_SESSION['dol_optimize_smallscreen'] = $dol_optimize_smallscreen; + } + if (!empty($dol_no_mouse_hover)) { + $_SESSION['dol_no_mouse_hover'] = $dol_no_mouse_hover; + } + if (!empty($dol_use_jmobile)) { + $_SESSION['dol_use_jmobile'] = $dol_use_jmobile; + } dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"]." Session id=".session_id()); @@ -909,7 +960,9 @@ if (!defined('NOLOGIN')) // Call trigger $result = $user->call_trigger('USER_LOGIN', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers // Hooks on successfull login @@ -917,10 +970,11 @@ if (!defined('NOLOGIN')) $hookmanager->initHooks(array('login')); $parameters = array('dol_authmode'=>$dol_authmode, 'dol_loginfo'=>$loginfo); $reshook = $hookmanager->executeHooks('afterLogin', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; + if ($reshook < 0) { + $error++; + } - if ($error) - { + if ($error) { $db->rollback(); session_destroy(); dol_print_error($db, 'Error in some triggers USER_LOGIN or in some hooks afterLogin'); @@ -931,11 +985,9 @@ if (!defined('NOLOGIN')) // Change landing page if defined. $landingpage = (empty($user->conf->MAIN_LANDING_PAGE) ? (empty($conf->global->MAIN_LANDING_PAGE) ? '' : $conf->global->MAIN_LANDING_PAGE) : $user->conf->MAIN_LANDING_PAGE); - if (!empty($landingpage)) // Example: /index.php - { + if (!empty($landingpage)) { // Example: /index.php $newpath = dol_buildpath($landingpage, 1); - if ($_SERVER["PHP_SELF"] != $newpath) // not already on landing page (avoid infinite loop) - { + if ($_SERVER["PHP_SELF"] != $newpath) { // not already on landing page (avoid infinite loop) header('Location: '.$newpath); exit; } @@ -944,8 +996,7 @@ if (!defined('NOLOGIN')) // If user admin, we force the rights-based modules - if ($user->admin) - { + if ($user->admin) { $user->rights->user->user->lire = 1; $user->rights->user->user->creer = 1; $user->rights->user->user->password = 1; @@ -955,24 +1006,26 @@ if (!defined('NOLOGIN')) } /* - * Overwrite some configs globals (try to avoid this and have code to use instead $user->conf->xxx) - */ + * Overwrite some configs globals (try to avoid this and have code to use instead $user->conf->xxx) + */ // Set liste_limit - if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) $conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT; // Can be 0 - if (isset($user->conf->PRODUIT_LIMIT_SIZE)) $conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE; // Can be 0 + if (isset($user->conf->MAIN_SIZE_LISTE_LIMIT)) { + $conf->liste_limit = $user->conf->MAIN_SIZE_LISTE_LIMIT; // Can be 0 + } + if (isset($user->conf->PRODUIT_LIMIT_SIZE)) { + $conf->product->limit_size = $user->conf->PRODUIT_LIMIT_SIZE; // Can be 0 + } // Replace conf->css by personalized value if theme not forced - if (empty($conf->global->MAIN_FORCETHEME) && !empty($user->conf->MAIN_THEME)) - { + if (empty($conf->global->MAIN_FORCETHEME) && !empty($user->conf->MAIN_THEME)) { $conf->theme = $user->conf->MAIN_THEME; $conf->css = "/theme/".$conf->theme."/style.css.php"; } } // Case forcing style from url -if (GETPOST('theme', 'alpha')) -{ +if (GETPOST('theme', 'alpha')) { $conf->theme = GETPOST('theme', 'alpha', 1); $conf->css = "/theme/".$conf->theme."/style.css.php"; } @@ -995,54 +1048,58 @@ if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && !empty($user->conf->MAI $conf->global->MAIN_OPTIMIZEFORCOLORBLIND = empty($user->conf->MAIN_OPTIMIZEFORCOLORBLIND) ? '' : $user->conf->MAIN_OPTIMIZEFORCOLORBLIND; // Set terminal output option according to conf->browser. -if (GETPOST('dol_hide_leftmenu', 'int') || !empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu = 1; -if (GETPOST('dol_hide_topmenu', 'int') || !empty($_SESSION['dol_hide_topmenu'])) $conf->dol_hide_topmenu = 1; -if (GETPOST('dol_optimize_smallscreen', 'int') || !empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen = 1; -if (GETPOST('dol_no_mouse_hover', 'int') || !empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover = 1; -if (GETPOST('dol_use_jmobile', 'int') || !empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile = 1; -if (!empty($conf->browser->layout) && $conf->browser->layout != 'classic') $conf->dol_no_mouse_hover = 1; +if (GETPOST('dol_hide_leftmenu', 'int') || !empty($_SESSION['dol_hide_leftmenu'])) { + $conf->dol_hide_leftmenu = 1; +} +if (GETPOST('dol_hide_topmenu', 'int') || !empty($_SESSION['dol_hide_topmenu'])) { + $conf->dol_hide_topmenu = 1; +} +if (GETPOST('dol_optimize_smallscreen', 'int') || !empty($_SESSION['dol_optimize_smallscreen'])) { + $conf->dol_optimize_smallscreen = 1; +} +if (GETPOST('dol_no_mouse_hover', 'int') || !empty($_SESSION['dol_no_mouse_hover'])) { + $conf->dol_no_mouse_hover = 1; +} +if (GETPOST('dol_use_jmobile', 'int') || !empty($_SESSION['dol_use_jmobile'])) { + $conf->dol_use_jmobile = 1; +} +if (!empty($conf->browser->layout) && $conf->browser->layout != 'classic') { + $conf->dol_no_mouse_hover = 1; +} if ((!empty($conf->browser->layout) && $conf->browser->layout == 'phone') || (!empty($_SESSION['dol_screenwidth']) && $_SESSION['dol_screenwidth'] < 400) || (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400) -) -{ +) { $conf->dol_optimize_smallscreen = 1; } -// If we force to use jmobile, then we reenable javascript -if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1; // Replace themes bugged with jmobile with eldy -if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea', 'cameleo', 'amarok'))) -{ +if (!empty($conf->dol_use_jmobile) && in_array($conf->theme, array('bureau2crea', 'cameleo', 'amarok'))) { $conf->theme = 'eldy'; $conf->css = "/theme/".$conf->theme."/style.css.php"; } -if (!defined('NOREQUIRETRAN')) -{ - if (!GETPOST('lang', 'aZ09')) // If language was not forced on URL - { +if (!defined('NOREQUIRETRAN')) { + if (!GETPOST('lang', 'aZ09')) { // If language was not forced on URL // If user has chosen its own language - if (!empty($user->conf->MAIN_LANG_DEFAULT)) - { + if (!empty($user->conf->MAIN_LANG_DEFAULT)) { // If different than current language //print ">>>".$langs->getDefaultLang()."-".$user->conf->MAIN_LANG_DEFAULT; - if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT) - { + if ($langs->getDefaultLang() != $user->conf->MAIN_LANG_DEFAULT) { $langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT); } } } } -if (!defined('NOLOGIN')) -{ +if (!defined('NOLOGIN')) { // If the login is not recovered, it is identified with an account that does not exist. // Hacking attempt? - if (!$user->login) accessforbidden(); + if (!$user->login) { + accessforbidden(); + } // Check if user is active - if ($user->statut < 1) - { + if ($user->statut < 1) { // If not active, we refuse the user $langs->load("other"); dol_syslog("Authentication KO as login is disabled", LOG_NOTICE); @@ -1054,13 +1111,12 @@ if (!defined('NOLOGIN')) $user->getrights(); } -dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').' NOTOKENRENEWAL='.(defined('NOTOKENRENEWAL') ?constant('NOTOKENRENEWAL') : '')); +dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').(defined('NOTOKENRENEWAL') ? ' NOTOKENRENEWAL='.constant('NOTOKENRENEWAL') : ''), LOG_NOTICE); //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)); +//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' '.$_SERVER["HTTP_REFERER"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST)); // Load main languages files -if (!defined('NOREQUIRETRAN')) -{ +if (!defined('NOREQUIRETRAN')) { // Load translation files required by page $langs->loadLangs(array('main', 'dict')); } @@ -1077,8 +1133,7 @@ $mesg = ''; $warning = ''; $error = 0; $mesgs = array(); $warnings = array(); $errors = array(); // Constants used to defined number of lines in textarea -if (empty($conf->browser->firefox)) -{ +if (empty($conf->browser->firefox)) { define('ROWS_1', 1); define('ROWS_2', 2); define('ROWS_3', 3); @@ -1103,10 +1158,8 @@ if (empty($conf->browser->firefox)) $heightforframes = 50; // Init menu manager -if (!defined('NOREQUIREMENU')) -{ - if (empty($user->socid)) // If internal user or not defined - { +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 @@ -1115,18 +1168,19 @@ if (!defined('NOREQUIREMENU')) // Load the menu manager (only if not already done) $file_menu = $conf->standard_menu; - if (GETPOST('menu', 'alpha')) $file_menu = GETPOST('menu', 'alpha'); // example: menu=eldy_menu.php - if (!class_exists('MenuManager')) - { + if (GETPOST('menu', 'alpha')) { + $file_menu = GETPOST('menu', 'alpha'); // example: menu=eldy_menu.php + } + if (!class_exists('MenuManager')) { $menufound = 0; $dirmenus = array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']); - foreach ($dirmenus as $dirmenu) - { + foreach ($dirmenus as $dirmenu) { $menufound = dol_include_once($dirmenu."standard/".$file_menu); - if (class_exists('MenuManager')) break; + if (class_exists('MenuManager')) { + break; + } } - if (!class_exists('MenuManager')) // If failed to include, we try with standard eldy_menu.php - { + if (!class_exists('MenuManager')) { // If failed to include, we try with standard eldy_menu.php dol_syslog("You define a menu manager '".$file_menu."' that can not be loaded.", LOG_WARNING); $file_menu = 'eldy_menu.php'; include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu; @@ -1140,8 +1194,7 @@ if (!defined('NOREQUIREMENU')) // Functions -if (!function_exists("llxHeader")) -{ +if (!function_exists("llxHeader")) { /** * Show HTML header HTML + BODY + Top menu + left menu + DIV * @@ -1170,10 +1223,11 @@ if (!function_exists("llxHeader")) $tmpcsstouse = 'sidebar-collapse'.($morecssonbody ? ' '.$morecssonbody : ''); // If theme MD and classic layer, we open the menulayer by default. - if ($conf->theme == 'md' && !in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if ($conf->theme == 'md' && !in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { global $mainmenu; - if ($mainmenu != 'website') $tmpcsstouse = $morecssonbody; // We do not use sidebar-collpase by default to have menuhider open by default. + if ($mainmenu != 'website') { + $tmpcsstouse = $morecssonbody; // We do not use sidebar-collpase by default to have menuhider open by default. + } } if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) { @@ -1183,19 +1237,16 @@ if (!function_exists("llxHeader")) print '<body id="mainbody" class="'.$tmpcsstouse.'">'."\n"; // top menu and left menu area - if (empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) - { + if (empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url); } - if (empty($conf->dol_hide_leftmenu)) - { + if (empty($conf->dol_hide_leftmenu)) { left_menu('', $help_url, '', '', 1, $title, 1); // $menumanager is retrieved with a global $menumanager inside this function } // main area - if ($replacemainareaby) - { + if ($replacemainareaby) { print $replacemainareaby; return; } @@ -1205,7 +1256,7 @@ if (!function_exists("llxHeader")) /** - * Show HTTP header + * Show HTTP header. Called by top_htmlhead(). * * @param string $contenttype Content type. For example, 'text/html' * @param int $forcenocache Force disabling of cache for the page @@ -1215,16 +1266,21 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) { global $db, $conf, $hookmanager; - if ($contenttype == 'text/html') header("Content-Type: text/html; charset=".$conf->file->character_set_client); - else header("Content-Type: ".$contenttype); + if ($contenttype == 'text/html') { + header("Content-Type: text/html; charset=".$conf->file->character_set_client); + } else { + header("Content-Type: ".$contenttype); + } // Security options header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on) - if (!defined('XFRAMEOPTIONS_ALLOWALL')) header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks) - else header("X-Frame-Options: ALLOWALL"); + if (!defined('XFRAMEOPTIONS_ALLOWALL')) { + header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks) + } else { + header("X-Frame-Options: ALLOWALL"); + } //header("X-XSS-Protection: 1"); // XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated. - if (!defined('FORCECSP')) - { + if (!defined('FORCECSP')) { //if (! isset($conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY)) //{ // // A default security policy that keep usage of js external component like ckeditor, stripe, google, working @@ -1233,16 +1289,20 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) //else $contentsecuritypolicy = empty($conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY) ? '' : $conf->global->MAIN_HTTP_CONTENT_SECURITY_POLICY; - if (!is_object($hookmanager)) $hookmanager = new HookManager($db); + if (!is_object($hookmanager)) { + $hookmanager = new HookManager($db); + } $hookmanager->initHooks(array("main")); $parameters = array('contentsecuritypolicy'=>$contentsecuritypolicy); $result = $hookmanager->executeHooks('setContentSecurityPolicy', $parameters); // Note that $action and $object may have been modified by some hooks - if ($result > 0) $contentsecuritypolicy = $hookmanager->resPrint; // Replace CSP - else $contentsecuritypolicy .= $hookmanager->resPrint; // Concat CSP + if ($result > 0) { + $contentsecuritypolicy = $hookmanager->resPrint; // Replace CSP + } else { + $contentsecuritypolicy .= $hookmanager->resPrint; // Concat CSP + } - if (!empty($contentsecuritypolicy)) - { + if (!empty($contentsecuritypolicy)) { // For example, to restrict 'script', 'object', 'frames' or 'img' to some domains: // script-src https://api.google.com https://anotherhost.com; object-src https://youtube.com; frame-src https://youtube.com; img-src: https://static.example.com // For example, to restrict everything to one domain, except 'object', ...: @@ -1253,18 +1313,16 @@ 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')); } - if ($forcenocache) - { + if ($forcenocache) { header("Cache-Control: no-cache, no-store, must-revalidate, max-age=0"); } } /** - * Ouput html header of a page. + * Ouput html header of a page. It calls also top_httphead() * This code is also duplicated into security2.lib.php::dol_loginfunction * * @param string $head Optionnal head lines @@ -1283,23 +1341,31 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr top_httphead(); - if (empty($conf->css)) $conf->css = '/theme/eldy/style.css.php'; // If not defined, eldy by default + if (empty($conf->css)) { + $conf->css = '/theme/eldy/style.css.php'; // If not defined, eldy by default + } print '<!doctype html>'."\n"; - if (!empty($conf->global->MAIN_USE_CACHE_MANIFEST)) print '<html lang="'.substr($langs->defaultlang, 0, 2).'" manifest="'.DOL_URL_ROOT.'/cache.manifest">'."\n"; - else print '<html lang="'.substr($langs->defaultlang, 0, 2).'">'."\n"; + if (!empty($conf->global->MAIN_USE_CACHE_MANIFEST)) { + print '<html lang="'.substr($langs->defaultlang, 0, 2).'" manifest="'.DOL_URL_ROOT.'/cache.manifest">'."\n"; + } else { + print '<html lang="'.substr($langs->defaultlang, 0, 2).'">'."\n"; + } //print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n"; - if (empty($disablehead)) - { - if (!is_object($hookmanager)) $hookmanager = new HookManager($db); + if (empty($disablehead)) { + if (!is_object($hookmanager)) { + $hookmanager = new HookManager($db); + } $hookmanager->initHooks(array("main")); $ext = 'layout='.$conf->browser->layout.'&amp;version='.urlencode(DOL_VERSION); print "<head>\n"; - if (GETPOST('dol_basehref', 'alpha')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref', 'alpha')).'">'."\n"; + if (GETPOST('dol_basehref', 'alpha')) { + print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref', 'alpha')).'">'."\n"; + } // Displays meta print '<meta charset="utf-8">'."\n"; @@ -1309,9 +1375,15 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr // Favicon $favicon = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; - if (!empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); - if (!empty($conf->global->MAIN_FAVICON_URL)) $favicon = $conf->global->MAIN_FAVICON_URL; - if (empty($conf->dol_use_jmobile)) print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n"; // Not required into an Android webview + if (!empty($mysoc->logo_squarred_mini)) { + $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); + } + if (!empty($conf->global->MAIN_FAVICON_URL)) { + $favicon = $conf->global->MAIN_FAVICON_URL; + } + if (empty($conf->dol_use_jmobile)) { + print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n"; // Not required into an Android webview + } //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="top" title="'.$langs->trans("Home").'" href="'.(DOL_URL_ROOT?DOL_URL_ROOT:'/').'">'."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="copyright" title="GNU General Public License" href="https://www.gnu.org/copyleft/gpl.html#SEC1">'."\n"; @@ -1329,63 +1401,96 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } // Auto refresh page - if (GETPOST('autorefresh', 'int') > 0) print '<meta http-equiv="refresh" content="'.GETPOST('autorefresh', 'int').'">'; + if (GETPOST('autorefresh', 'int') > 0) { + print '<meta http-equiv="refresh" content="'.GETPOST('autorefresh', 'int').'">'; + } // Displays title $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; + } print '<title>'; $titletoshow = ''; - if ($title && !empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/', $conf->global->MAIN_HTML_TITLE)) $titletoshow = dol_htmlentities($title); - elseif ($title) $titletoshow = dol_htmlentities($appli.' - '.$title); - else $titletoshow = dol_htmlentities($appli); + if ($title && !empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/', $conf->global->MAIN_HTML_TITLE)) { + $titletoshow = dol_htmlentities($title); + } elseif ($title) { + $titletoshow = dol_htmlentities($appli.' - '.$title); + } else { + $titletoshow = dol_htmlentities($appli); + } $parameters = array('title'=>$titletoshow); $result = $hookmanager->executeHooks('setHtmlTitle', $parameters); // Note that $action and $object may have been modified by some hooks - if ($result > 0) $titletoshow = $hookmanager->resPrint; // Replace Title to show - else $titletoshow .= $hookmanager->resPrint; // Concat to Title to show + if ($result > 0) { + $titletoshow = $hookmanager->resPrint; // Replace Title to show + } else { + $titletoshow .= $hookmanager->resPrint; // Concat to Title to show + } print $titletoshow; print '</title>'; print "\n"; - if (GETPOST('version', 'int')) $ext = 'version='.GETPOST('version', 'int'); // usefull to force no cache on css/js + if (GETPOST('version', 'int')) { + $ext = 'version='.GETPOST('version', 'int'); // usefull to force no cache on css/js + } $themeparam = '?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss', 'aZ09') ? '&amp;optioncss='.GETPOST('optioncss', 'aZ09', 1) : '').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity; - $themeparam .= ($ext ? '&amp;'.$ext : '').'&amp;revision='.$conf->global->MAIN_IHM_PARAMS_REV; - if (!empty($_SESSION['dol_resetcache'])) $themeparam .= '&amp;dol_resetcache='.$_SESSION['dol_resetcache']; - if (GETPOSTISSET('dol_hide_topmenu')) { $themeparam .= '&amp;dol_hide_topmenu='.GETPOST('dol_hide_topmenu', 'int'); } - if (GETPOSTISSET('dol_hide_leftmenu')) { $themeparam .= '&amp;dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu', 'int'); } - if (GETPOSTISSET('dol_optimize_smallscreen')) { $themeparam .= '&amp;dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); } - if (GETPOSTISSET('dol_no_mouse_hover')) { $themeparam .= '&amp;dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); } - if (GETPOSTISSET('dol_use_jmobile')) { $themeparam .= '&amp;dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); } - if (GETPOSTISSET('THEME_DARKMODEENABLED')) { $themeparam .= '&amp;THEME_DARKMODEENABLED='.GETPOST('THEME_DARKMODEENABLED', 'int'); } - if (GETPOSTISSET('THEME_SATURATE_RATIO')) { $themeparam .= '&amp;THEME_SATURATE_RATIO='.GETPOST('THEME_SATURATE_RATIO', 'int'); } + $themeparam .= ($ext ? '&amp;'.$ext : '').'&amp;revision='.getDolGlobalInt("MAIN_IHM_PARAMS_REV"); + if (!empty($_SESSION['dol_resetcache'])) { + $themeparam .= '&amp;dol_resetcache='.$_SESSION['dol_resetcache']; + } + if (GETPOSTISSET('dol_hide_topmenu')) { + $themeparam .= '&amp;dol_hide_topmenu='.GETPOST('dol_hide_topmenu', 'int'); + } + if (GETPOSTISSET('dol_hide_leftmenu')) { + $themeparam .= '&amp;dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu', 'int'); + } + if (GETPOSTISSET('dol_optimize_smallscreen')) { + $themeparam .= '&amp;dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); + } + if (GETPOSTISSET('dol_no_mouse_hover')) { + $themeparam .= '&amp;dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); + } + if (GETPOSTISSET('dol_use_jmobile')) { + $themeparam .= '&amp;dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); + } + if (GETPOSTISSET('THEME_DARKMODEENABLED')) { + $themeparam .= '&amp;THEME_DARKMODEENABLED='.GETPOST('THEME_DARKMODEENABLED', 'int'); + } + if (GETPOSTISSET('THEME_SATURATE_RATIO')) { + $themeparam .= '&amp;THEME_SATURATE_RATIO='.GETPOST('THEME_SATURATE_RATIO', 'int'); + } if (!empty($conf->global->MAIN_ENABLE_FONT_ROBOTO)) { print '<link rel="preconnect" href="https://fonts.gstatic.com">'."\n"; print '<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@200;300;400;500;600&display=swap" rel="stylesheet">'."\n"; } - if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) - { + if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) { print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n"; $jquerytheme = 'base'; - if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; - if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // Forced JQuery - else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext ? '?'.$ext : '').'">'."\n"; // JQuery - if (!defined('DISABLE_JQUERY_JNOTIFY')) print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // JNotify - if (!defined('DISABLE_SELECT2') && (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2"... - { + if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) { + $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; + } + if (constant('JS_JQUERY_UI')) { + print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // Forced JQuery + } else { + print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext ? '?'.$ext : '').'">'."\n"; // JQuery + } + if (!defined('DISABLE_JQUERY_JNOTIFY')) { + print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // JNotify + } + 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 '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/css/'.$tmpplugin.'.css'.($ext ? '?'.$ext : '').'">'."\n"; } } - if (!defined('DISABLE_FONT_AWSOME')) - { + if (!defined('DISABLE_FONT_AWSOME')) { print '<!-- Includes CSS for font awesome -->'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/fontawesome-5/css/all.min.css'.($ext ? '?'.$ext : '').'">'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/common/fontawesome-5/css/v4-shims.min.css'.($ext ? '?'.$ext : '').'">'."\n"; @@ -1395,12 +1500,9 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' $themepath = dol_buildpath($conf->css, 1); $themesubdir = ''; - if (!empty($conf->modules_parts['theme'])) // This slow down - { - foreach ($conf->modules_parts['theme'] as $reldir) - { - if (file_exists(dol_buildpath($reldir.$conf->css, 0))) - { + if (!empty($conf->modules_parts['theme'])) { // This slow down + foreach ($conf->modules_parts['theme'] as $reldir) { + if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { $themepath = dol_buildpath($reldir.$conf->css, 1); $themesubdir = $reldir; break; @@ -1410,59 +1512,68 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; print '<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.'">'."\n"; - if (!empty($conf->global->MAIN_FIX_FLASH_ON_CHROME)) print '<!-- Includes CSS that does not exists as a workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n"; + if (!empty($conf->global->MAIN_FIX_FLASH_ON_CHROME)) { + print '<!-- Includes CSS that does not exists as a workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n"; + } // CSS forced by modules (relative url starting with /) - if (!empty($conf->modules_parts['css'])) - { + if (!empty($conf->modules_parts['css'])) { $arraycss = (array) $conf->modules_parts['css']; - foreach ($arraycss as $modcss => $filescss) - { + foreach ($arraycss as $modcss => $filescss) { $filescss = (array) $filescss; // To be sure filecss is an array - foreach ($filescss as $cssfile) - { - if (empty($cssfile)) dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING); + foreach ($filescss as $cssfile) { + if (empty($cssfile)) { + dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING); + } // cssfile is a relative path print '<!-- Includes CSS added by module '.$modcss.' -->'."\n".'<link rel="stylesheet" type="text/css" href="'.dol_buildpath($cssfile, 1); // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used. - if (!preg_match('/\.css$/i', $cssfile)) print $themeparam; + if (!preg_match('/\.css$/i', $cssfile)) { + print $themeparam; + } print '">'."\n"; } } } // CSS forced by page in top_htmlhead call (relative url starting with /) - if (is_array($arrayofcss)) - { - foreach ($arrayofcss as $cssfile) - { - if (preg_match('/^(http|\/\/)/i', $cssfile)) - { + if (is_array($arrayofcss)) { + foreach ($arrayofcss as $cssfile) { + if (preg_match('/^(http|\/\/)/i', $cssfile)) { $urltofile = $cssfile; } else { $urltofile = dol_buildpath($cssfile, 1); } print '<!-- Includes CSS added by page -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.$urltofile; // We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used. - if (!preg_match('/\.css$/i', $cssfile)) print $themeparam; + if (!preg_match('/\.css$/i', $cssfile)) { + print $themeparam; + } print '">'."\n"; } } // Output standard javascript links - if (!defined('DISABLE_JQUERY') && !$disablejs && !empty($conf->use_javascript_ajax)) - { + if (!defined('DISABLE_JQUERY') && !$disablejs && !empty($conf->use_javascript_ajax)) { // JQuery. Must be before other includes print '<!-- Includes JS for JQuery -->'."\n"; - if (defined('JS_JQUERY') && constant('JS_JQUERY')) print '<script src="'.JS_JQUERY.'jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; - else print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + if (defined('JS_JQUERY') && constant('JS_JQUERY')) { + print '<script src="'.JS_JQUERY.'jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + } else { + print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + } /*if (! empty($conf->global->MAIN_FEATURES_LEVEL) && ! defined('JS_JQUERY_MIGRATE_DISABLED')) { if (defined('JS_JQUERY_MIGRATE') && constant('JS_JQUERY_MIGRATE')) print '<script src="'.JS_JQUERY_MIGRATE.'jquery-migrate.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; else print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-migrate.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; }*/ - if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) print '<script src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; - else print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; - if (!defined('DISABLE_JQUERY_TABLEDND')) print '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { + print '<script src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + } else { + print '<script src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + } + if (!defined('DISABLE_JQUERY_TABLEDND')) { + print '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/tablednd/jquery.tablednd.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; + } // jQuery jnotify if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && !defined('DISABLE_JQUERY_JNOTIFY')) { print '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; @@ -1501,16 +1612,14 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr $tmpplugin = empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) ?constant('REQUIRE_JQUERY_MULTISELECT') : $conf->global->MAIN_USE_JQUERY_MULTISELECT; print '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/dist/js/'.$tmpplugin.'.full.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; // We include full because we need the support of containerCssClass } - if (!defined('DISABLE_MULTISELECT')) // jQuery plugin "mutiselect" to select with checkboxes. Can be removed once we have an enhanced search tool - { + if (!defined('DISABLE_MULTISELECT')) { // jQuery plugin "mutiselect" to select with checkboxes. Can be removed once we have an enhanced search tool print '<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/jquery.multi-select.js'.($ext ? '?'.$ext : '').'"></script>'."\n"; } } 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')) - { + if ((!empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor') && !defined('DISABLE_CKEDITOR')) || defined('FORCE_CKEDITOR')) { print '<!-- Includes JS for CKEditor -->'."\n"; $pathckeditor = DOL_URL_ROOT.'/includes/ckeditor/ckeditor/'; $jsckeditor = 'ckeditor.js'; @@ -1519,7 +1628,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr $pathckeditor = constant('JS_CKEDITOR'); } print '<script>'; - print '/* enable ckeditor by main.inc.php */'; + print '/* enable ckeditor by main.inc.php */'; print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n"; print 'var ckeditorConfig = \''.dol_buildpath($themesubdir.'/theme/'.$conf->theme.'/ckeditor/config.js'.($ext ? '?'.$ext : ''), 1).'\';'."\n"; // $themesubdir='' in standard usage print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n"; @@ -1536,13 +1645,15 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } // Browser notifications (if NOREQUIREMENU is on, it is mostly a page for popup, so we do not enable notif too. We hide also for public pages). - if (!defined('NOBROWSERNOTIF') && !defined('NOREQUIREMENU') && !defined('NOLOGIN')) - { + if (!defined('NOBROWSERNOTIF') && !defined('NOREQUIREMENU') && !defined('NOLOGIN')) { $enablebrowsernotif = false; - if (!empty($conf->agenda->enabled) && !empty($conf->global->AGENDA_REMINDER_BROWSER)) $enablebrowsernotif = true; - if ($conf->browser->layout == 'phone') $enablebrowsernotif = false; - if ($enablebrowsernotif) - { + if (!empty($conf->agenda->enabled) && !empty($conf->global->AGENDA_REMINDER_BROWSER)) { + $enablebrowsernotif = true; + } + if ($conf->browser->layout == 'phone') { + $enablebrowsernotif = false; + } + if ($enablebrowsernotif) { print '<!-- Includes JS of Dolibarr (browser layout = '.$conf->browser->layout.')-->'."\n"; print '<script src="'.DOL_URL_ROOT.'/core/js/lib_notification.js.php'.($ext ? '?'.$ext : '').'"></script>'."\n"; } @@ -1553,27 +1664,21 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print '<script src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n"; // JS forced by modules (relative url starting with /) - if (!empty($conf->modules_parts['js'])) // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) - { + if (!empty($conf->modules_parts['js'])) { // $conf->modules_parts['js'] is array('module'=>array('file1','file2')) $arrayjs = (array) $conf->modules_parts['js']; - foreach ($arrayjs as $modjs => $filesjs) - { + foreach ($arrayjs as $modjs => $filesjs) { $filesjs = (array) $filesjs; // To be sure filejs is an array - foreach ($filesjs as $jsfile) - { + foreach ($filesjs as $jsfile) { // jsfile is a relative path print '<!-- Include JS added by module '.$modjs.'-->'."\n".'<script src="'.dol_buildpath($jsfile, 1).'"></script>'."\n"; } } } // JS forced by page in top_htmlhead (relative url starting with /) - if (is_array($arrayofjs)) - { + if (is_array($arrayofjs)) { print '<!-- Includes JS added by page -->'."\n"; - foreach ($arrayofjs as $jsfile) - { - if (preg_match('/^(http|\/\/)/i', $jsfile)) - { + foreach ($arrayofjs as $jsfile) { + if (preg_match('/^(http|\/\/)/i', $jsfile)) { print '<script src="'.$jsfile.'"></script>'."\n"; } else { print '<script src="'.dol_buildpath($jsfile, 1).'"></script>'."\n"; @@ -1582,8 +1687,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } } - if (!empty($head)) print $head."\n"; - if (!empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER."\n"; + if (!empty($head)) { + print $head."\n"; + } + if (!empty($conf->global->MAIN_HTML_HEADER)) { + print $conf->global->MAIN_HTML_HEADER."\n"; + } $parameters = array(); $result = $hookmanager->executeHooks('addHtmlHeader', $parameters); // Note that $action and $object may have been modified by some hooks @@ -1627,18 +1736,16 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $toprightmenu = ''; // For backward compatibility with old modules - if (empty($conf->headerdone)) - { + if (empty($conf->headerdone)) { $disablenofollow = 0; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow); print '<body id="mainbody">'; } /* - * Top menu - */ - if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && (!defined('NOREQUIREMENU') || !constant('NOREQUIREMENU'))) - { + * Top menu + */ + if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && (!defined('NOREQUIREMENU') || !constant('NOREQUIREMENU'))) { if (!isset($form) || !is_object($form)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $form = new Form($db); @@ -1656,24 +1763,28 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; + } - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $appli .= "<br>".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; + if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { + $appli .= "<br>".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; + } $logouttext = ''; $logouthtmltext = ''; - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { //$logouthtmltext=$appli.'<br>'; - if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') - { + if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout").'<br>'; $logouttext .= '<a accesskey="l" href="'.DOL_URL_ROOT.'/user/logout.php">'; @@ -1692,11 +1803,10 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead // Execute hook printTopRightMenu (hooks should output string like '<div class="login"><a href="">mylink</a></div>') $parameters = array(); $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks - if (is_numeric($result)) - { - if ($result == 0) + if (is_numeric($result)) { + if ($result == 0) { $toprightmenu .= $hookmanager->resPrint; // add - else { + } else { $toprightmenu = $hookmanager->resPrint; // replace } } else { @@ -1704,8 +1814,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead } // Link to module builder - if (!empty($conf->modulebuilder->enabled)) - { + if (!empty($conf->modulebuilder->enabled)) { $text = '<a href="'.DOL_URL_ROOT.'/modulebuilder/index.php?mainmenu=home&leftmenu=admintools" target="modulebuilder">'; //$text.= img_picto(":".$langs->trans("ModuleBuilder"), 'printer_top.png', 'class="printer"'); $text .= '<span class="fa fa-bug atoplogin valignmiddle"></span>'; @@ -1714,14 +1823,14 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead } // Link to print main content area - if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone') - { + if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone') { $qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]); - if (is_array($_POST)) - { - foreach ($_POST as $key=>$value) { - if ($key !== 'action' && $key !== 'password' && !is_array($value)) $qs .= '&'.$key.'='.urlencode($value); + if (is_array($_POST)) { + foreach ($_POST as $key => $value) { + if ($key !== 'action' && $key !== 'password' && !is_array($value)) { + $qs .= '&'.$key.'='.urlencode($value); + } } } $qs .= (($qs && $morequerystring) ? '&' : '').$morequerystring; @@ -1733,8 +1842,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead } // Link to Dolibarr wiki pages - if (empty($conf->global->MAIN_HELP_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($conf->global->MAIN_HELP_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $langs->load("help"); $helpbaseurl = ''; @@ -1755,21 +1863,28 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $mode = $arrayres['mode']; // Link to help pages - if ($helpbaseurl && $helppage) - { + if ($helpbaseurl && $helppage) { $text = ''; $title = $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage').'...'; if ($mode == 'wiki') { $title .= '<br>'.$langs->trans("PageWiki").' '.dol_escape_htmltag('"'.strtr($helppage, '_', ' ').'"'); - if ($helppresent) $title .= ' <span class="opacitymedium">('.$langs->trans("DedicatedPageAvailable").')</span>'; - else $title .= ' <span class="opacitymedium">('.$langs->trans("HomePage").')</span>'; + if ($helppresent) { + $title .= ' <span class="opacitymedium">('.$langs->trans("DedicatedPageAvailable").')</span>'; + } else { + $title .= ' <span class="opacitymedium">('.$langs->trans("HomePage").')</span>'; + } } $text .= '<a class="help" target="_blank" rel="noopener" href="'; - if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); - else $text .= sprintf($helpbaseurl, $helppage); + if ($mode == 'wiki') { + $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); + } else { + $text .= sprintf($helpbaseurl, $helppage); + } $text .= '">'; $text .= '<span class="fa fa-question-circle atoplogin valignmiddle'.($helppresent ? ' '.$helppresent : '').'"></span>'; - if ($helppresent) $text .= '<span class="fa fa-circle helppresentcircle"></span>'; + if ($helppresent) { + $text .= '<span class="fa fa-circle helppresentcircle"></span>'; + } $text .= '</a>'; $toprightmenu .= $form->textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2); } @@ -1830,7 +1945,9 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print "<!-- End top horizontal menu -->\n\n"; } - if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '<!-- Begin div id-container --><div id="id-container" class="id-container">'; + if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) { + print '<!-- Begin div id-container --><div id="id-container" class="id-container">'; + } } @@ -1848,20 +1965,37 @@ function top_menu_user($hideloginname = 0, $urllogout = '') global $menumanager; $userImage = $userDropDownImage = ''; - if (!empty($user->photo)) - { + if (!empty($user->photo)) { $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 { $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'; + if ($user->gender == 'man') { + $nophoto = '/public/theme/common/user_man.png'; + } + if ($user->gender == 'woman') { + $nophoto = '/public/theme/common/user_woman.png'; + } $userImage = '<img class="photo photouserphoto userphoto" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">'; $userDropDownImage = '<img class="photo dropdown-user-image" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">'; } $dropdownBody = ''; + $dropdownBody .= '<span id="topmenulogincompanyinfo-btn"><i class="fa fa-caret-right"></i> '.$langs->trans("ShowCompanyInfos").'</span>'; + $dropdownBody .= '<div id="topmenulogincompanyinfo" >'; + + if (!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId1Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).'</span>'; + if (!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId2Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).'</span>'; + if (!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId3Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).'</span>'; + if (!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId4Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).'</span>'; + if (!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId5Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).'</span>'; + if (!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6Short", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).'</span>'; + if (!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).'</span>'; + + $dropdownBody .= '</div>'; + + $dropdownBody .= '<br>'; $dropdownBody .= '<span id="topmenuloginmoreinfo-btn"><i class="fa fa-caret-right"></i> '.$langs->trans("ShowMoreInfos").'</span>'; $dropdownBody .= '<div id="topmenuloginmoreinfo" >'; @@ -1869,8 +2003,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') if (!empty($user->admin)) { $dropdownBody .= '<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin); } - if (!empty($user->socid)) // Add thirdparty for external users - { + if (!empty($user->socid)) { // Add thirdparty for external users $thirdpartystatic = new Societe($db); $thirdpartystatic->fetch($user->socid); $companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company @@ -1883,7 +2016,9 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= '<br><u>'.$langs->trans("Session").'</u>'; $dropdownBody .= '<br><b>'.$langs->trans("IPAddress").'</b>: '.dol_escape_htmltag($_SERVER["REMOTE_ADDR"]); - if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $dropdownBody .= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (user entity '.$user->entity.')'; + if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY)) { + $dropdownBody .= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (user entity '.$user->entity.')'; + } $dropdownBody .= '<br><b>'.$langs->trans("AuthenticationMode").':</b> '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo) ? '' : ' (demo)'); $dropdownBody .= '<br><b>'.$langs->trans("ConnectedSince").':</b> '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser'); $dropdownBody .= '<br><b>'.$langs->trans("PreviousConnexion").':</b> '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser'); @@ -1902,15 +2037,18 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.dol_escape_htmltag($_SERVER['HTTP_USER_AGENT']).')'; $dropdownBody .= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout; $dropdownBody .= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; - if ($conf->browser->layout == 'phone') $dropdownBody .= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes"); - if (!empty($_SESSION["disablemodules"])) $dropdownBody .= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ', explode(',', $_SESSION["disablemodules"])); + if ($conf->browser->layout == 'phone') { + $dropdownBody .= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes"); + } + if (!empty($_SESSION["disablemodules"])) { + $dropdownBody .= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ', explode(',', $_SESSION["disablemodules"])); + } $dropdownBody .= '</div>'; // Execute hook $parameters = array('user'=>$user, 'langs' => $langs); $result = $hookmanager->executeHooks('printTopRightMenuLoginDropdownBody', $parameters); // Note that $action and $object may have been modified by some hooks - if (is_numeric($result)) - { + if (is_numeric($result)) { if ($result == 0) { $dropdownBody .= $hookmanager->resPrint; // add } else { @@ -1933,21 +2071,24 @@ function top_menu_user($hideloginname = 0, $urllogout = '') // Define version to show $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; + } if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $btnUser = '<!-- div for user link --> <div id="topmenu-login-dropdown" class="userimg atoplogin dropdown user user-menu inline-block"> <a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'" class="dropdown-toggle login-dropdown-a" data-toggle="dropdown"> - '.$userImage.' - <span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span> + '.$userImage.'<span class="hidden-xs maxwidth200 atoploginusername hideonsmartphone paddingleft">'.dol_trunc($user->firstname ? $user->firstname : $user->login, 10).'</span> </a> <div class="dropdown-menu"> <!-- User image --> @@ -1955,9 +2096,17 @@ function top_menu_user($hideloginname = 0, $urllogout = '') '.$userDropDownImage.' <p> '.$profilName.'<br>'; - if ($user->datepreviouslogin) { - $btnUser .= '<small class="classfortooltip" title="'.$langs->trans("PreviousConnexion").'" ><i class="fa fa-user-clock"></i> '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser').'</small><br>'; + if ($user->datelastlogin) { + $title = $langs->trans("ConnectedSince").' : '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser'); + if ($user->datepreviouslogin) { + $title .= '<br>'.$langs->trans("PreviousConnexion").' : '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser'); + } } + $btnUser .= '<small class="classfortooltip" title="'.dol_escape_htmltag($title).'" ><i class="fa fa-user-clock"></i> '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser').'</small><br>'; + if ($user->datepreviouslogin) { + $btnUser .= '<small class="classfortooltip" title="'.dol_escape_htmltag($title).'" ><i class="fa fa-user-clock opacitymedium"></i> '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser').'</small><br>'; + } + //$btnUser .= '<small class="classfortooltip"><i class="fa fa-cog"></i> '.$langs->trans("Version").' '.$appli.'</small>'; $btnUser .= ' </p> @@ -1989,8 +2138,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') </div>'; } - if (!defined('JS_JQUERY_DISABLE_DROPDOWN') && !empty($conf->use_javascript_ajax)) // This may be set by some pages that use different jquery version to avoid errors - { + if (!defined('JS_JQUERY_DISABLE_DROPDOWN') && !empty($conf->use_javascript_ajax)) { // This may be set by some pages that use different jquery version to avoid errors $btnUser .= ' <!-- Code to show/hide the user drop-down --> <script> @@ -2012,6 +2160,10 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $("#topmenu-login-dropdown").toggleClass("open"); }); + $("#topmenulogincompanyinfo-btn").on("click", function() { + $("#topmenulogincompanyinfo").slideToggle(); + }); + $("#topmenuloginmoreinfo-btn").on("click", function() { $("#topmenuloginmoreinfo").slideToggle(); });'; @@ -2134,7 +2286,7 @@ function top_menu_quickadd() '; } - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->creer) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->creer) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->creer)) { $langs->load("orders"); $dropDownQuickAddHtml .= ' <!-- Supplier order link --> @@ -2147,7 +2299,7 @@ function top_menu_quickadd() '; } - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->creer) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->creer) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->creer)) { $langs->load("bills"); $dropDownQuickAddHtml .= ' <!-- Supplier invoice link --> @@ -2257,10 +2409,11 @@ function top_menu_bookmark() $html = ''; // Define $bookmarks - if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) return $html; + if (empty($conf->bookmark->enabled) || empty($user->rights->bookmark->lire)) { + return $html; + } - if (!defined('JS_JQUERY_DISABLE_DROPDOWN') && !empty($conf->use_javascript_ajax)) // This may be set by some pages that use different jquery version to avoid errors - { + if (!defined('JS_JQUERY_DISABLE_DROPDOWN') && !empty($conf->use_javascript_ajax)) { // This may be set by some pages that use different jquery version to avoid errors include_once DOL_DOCUMENT_ROOT.'/bookmarks/bookmarks.lib.php'; $langs->load("bookmarks"); @@ -2337,8 +2490,7 @@ function top_menu_search() $defaultAction = ''; $buttonList = '<div class="dropdown-global-search-button-list" >'; // Menu with all searchable items - foreach ($arrayresult as $keyItem => $item) - { + foreach ($arrayresult as $keyItem => $item) { if (empty($defaultAction)) { $defaultAction = $item['url']; } @@ -2463,20 +2615,25 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ $searchform = ''; $bookmarks = ''; - if (!empty($menu_array_before)) dol_syslog("Deprecated parameter menu_array_before was used when calling main::left_menu function. Menu entries of module should now be defined into module descriptor and not provided when calling left_menu.", LOG_WARNING); + if (!empty($menu_array_before)) { + dol_syslog("Deprecated parameter menu_array_before was used when calling main::left_menu function. Menu entries of module should now be defined into module descriptor and not provided when calling left_menu.", LOG_WARNING); + } - if (empty($conf->dol_hide_leftmenu) && (!defined('NOREQUIREMENU') || !constant('NOREQUIREMENU'))) - { + if (empty($conf->dol_hide_leftmenu) && (!defined('NOREQUIREMENU') || !constant('NOREQUIREMENU'))) { // Instantiate hooks for external modules $hookmanager->initHooks(array('searchform', 'leftblock')); print "\n".'<!-- Begin side-nav id-left -->'."\n".'<div class="side-nav"><div id="id-left">'."\n"; - if ($conf->browser->layout == 'phone') $conf->global->MAIN_USE_OLD_SEARCH_FORM = 1; // Select into select2 is awfull on smartphone. TODO Is this still true with select2 v4 ? + if ($conf->browser->layout == 'phone') { + $conf->global->MAIN_USE_OLD_SEARCH_FORM = 1; // Select into select2 is awfull on smartphone. TODO Is this still true with select2 v4 ? + } print "\n"; - if (!is_object($form)) $form = new Form($db); + if (!is_object($form)) { + $form = new Form($db); + } $selected = -1; if (empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN)) { $usedbyinclude = 1; @@ -2498,7 +2655,9 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ $reshook = $hookmanager->executeHooks('printSearchForm', $parameters); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { $searchform .= $hookmanager->resPrint; - } else $searchform = $hookmanager->resPrint; + } else { + $searchform = $hookmanager->resPrint; + } // Force special value for $searchform if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) || empty($conf->use_javascript_ajax)) { @@ -2533,82 +2692,107 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ print '<div id="blockvmenuhelp" class="blockvmenuhelp">'."\n"; // Version - if (!empty($conf->global->MAIN_SHOW_VERSION)) // Version is already on help picto and on login page. - { + if (!empty($conf->global->MAIN_SHOW_VERSION)) { // Version is already on help picto and on login page. $doliurl = 'https://www.dolibarr.org'; //local communities - if (preg_match('/fr/i', $langs->defaultlang)) $doliurl = 'https://www.dolibarr.fr'; - if (preg_match('/es/i', $langs->defaultlang)) $doliurl = 'https://www.dolibarr.es'; - if (preg_match('/de/i', $langs->defaultlang)) $doliurl = 'https://www.dolibarr.de'; - if (preg_match('/it/i', $langs->defaultlang)) $doliurl = 'https://www.dolibarr.it'; - if (preg_match('/gr/i', $langs->defaultlang)) $doliurl = 'https://www.dolibarr.gr'; + if (preg_match('/fr/i', $langs->defaultlang)) { + $doliurl = 'https://www.dolibarr.fr'; + } + if (preg_match('/es/i', $langs->defaultlang)) { + $doliurl = 'https://www.dolibarr.es'; + } + if (preg_match('/de/i', $langs->defaultlang)) { + $doliurl = 'https://www.dolibarr.de'; + } + if (preg_match('/it/i', $langs->defaultlang)) { + $doliurl = 'https://www.dolibarr.it'; + } + if (preg_match('/gr/i', $langs->defaultlang)) { + $doliurl = 'https://www.dolibarr.gr'; + } $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $conf->global->MAIN_APPLICATION_TITLE; $doliurl = ''; - 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; + 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; + } print '<div id="blockvmenuhelpapp" class="blockvmenuhelp">'; - if ($doliurl) print '<a class="help" target="_blank" rel="noopener" href="'.$doliurl.'">'; - else print '<span class="help">'; + if ($doliurl) { + print '<a class="help" target="_blank" rel="noopener" href="'.$doliurl.'">'; + } else { + print '<span class="help">'; + } print $appli; - if ($doliurl) print '</a>'; - else print '</span>'; + if ($doliurl) { + print '</a>'; + } else { + print '</span>'; + } print '</div>'."\n"; } // Link to bugtrack - if (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) - { + if (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new?labels=Bug'; - $bugbaseurl .= '&title='; - $bugbaseurl .= urlencode("Bug: "); - $bugbaseurl .= '&body='; - $bugbaseurl .= urlencode("# Instructions\n"); - $bugbaseurl .= urlencode("*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*\n"); - $bugbaseurl .= urlencode("*Please:*\n"); - $bugbaseurl .= urlencode("- *replace the bracket enclosed texts with meaningful information*\n"); - $bugbaseurl .= urlencode("- *remove any unused sub-section*\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("# Bug\n"); - $bugbaseurl .= urlencode("[*Short description*]\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("## Environment\n"); - $bugbaseurl .= urlencode("- **Version**: ".DOL_VERSION."\n"); - $bugbaseurl .= urlencode("- **OS**: ".php_uname('s')."\n"); - $bugbaseurl .= urlencode("- **Web server**: ".$_SERVER["SERVER_SOFTWARE"]."\n"); - $bugbaseurl .= urlencode("- **PHP**: ".php_sapi_name().' '.phpversion()."\n"); - $bugbaseurl .= urlencode("- **Database**: ".$db::LABEL.' '.$db->getVersion()."\n"); - $bugbaseurl .= urlencode("- **URL(s)**: ".$_SERVER["REQUEST_URI"]."\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("## Expected and actual behavior\n"); - $bugbaseurl .= urlencode("[*Verbose description*]\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("## Steps to reproduce the behavior\n"); - $bugbaseurl .= urlencode("[*Verbose description*]\n"); - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)\n"); - $bugbaseurl .= urlencode("[*Files*]\n"); - $bugbaseurl .= urlencode("\n"); + if ($conf->global->MAIN_BUGTRACK_ENABLELINK == 'github') { + $bugbaseurl = 'https://github.com/Dolibarr/dolibarr/issues/new?labels=Bug'; + $bugbaseurl .= '&title='; + $bugbaseurl .= urlencode("Bug: "); + $bugbaseurl .= '&body='; + $bugbaseurl .= urlencode("# Instructions\n"); + $bugbaseurl .= urlencode("*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*\n"); + $bugbaseurl .= urlencode("*Please:*\n"); + $bugbaseurl .= urlencode("- *replace the bracket enclosed texts with meaningful information*\n"); + $bugbaseurl .= urlencode("- *remove any unused sub-section*\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("# Bug\n"); + $bugbaseurl .= urlencode("[*Short description*]\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("## Environment\n"); + $bugbaseurl .= urlencode("- **Version**: " . DOL_VERSION . "\n"); + $bugbaseurl .= urlencode("- **OS**: " . php_uname('s') . "\n"); + $bugbaseurl .= urlencode("- **Web server**: " . $_SERVER["SERVER_SOFTWARE"] . "\n"); + $bugbaseurl .= urlencode("- **PHP**: " . php_sapi_name() . ' ' . phpversion() . "\n"); + $bugbaseurl .= urlencode("- **Database**: " . $db::LABEL . ' ' . $db->getVersion() . "\n"); + $bugbaseurl .= urlencode("- **URL(s)**: " . $_SERVER["REQUEST_URI"] . "\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("## Expected and actual behavior\n"); + $bugbaseurl .= urlencode("[*Verbose description*]\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("## Steps to reproduce the behavior\n"); + $bugbaseurl .= urlencode("[*Verbose description*]\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)\n"); + $bugbaseurl .= urlencode("[*Files*]\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("\n"); + $bugbaseurl .= urlencode("## Report\n"); + } elseif (!empty($conf->global->MAIN_BUGTRACK_ENABLELINK)) { + $bugbaseurl = $conf->global->MAIN_BUGTRACK_ENABLELINK; + } else { + $bugbaseurl = ""; + } // Execute hook printBugtrackInfo - $parameters = array('bugbaseurl'=>$bugbaseurl); + $parameters = array('bugbaseurl' => $bugbaseurl); $reshook = $hookmanager->executeHooks('printBugtrackInfo', $parameters); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) - { + if (empty($reshook)) { $bugbaseurl .= $hookmanager->resPrint; - } else $bugbaseurl = $hookmanager->resPrint; + } else { + $bugbaseurl = $hookmanager->resPrint; + } - $bugbaseurl .= urlencode("\n"); - $bugbaseurl .= urlencode("## Report\n"); print '<div id="blockvmenuhelpbugreport" class="blockvmenuhelp">'; print '<a class="help" target="_blank" rel="noopener" href="'.$bugbaseurl.'">'.$langs->trans("FindBug").'</a>'; print '</div>'; @@ -2633,7 +2817,9 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ print "\n"; print '<!-- Begin right area -->'."\n"; - if (empty($leftmenuwithoutmainarea)) main_area($title); + if (empty($leftmenuwithoutmainarea)) { + main_area($title); + } } @@ -2647,23 +2833,25 @@ function main_area($title = '') { global $conf, $langs; - if (empty($conf->dol_hide_leftmenu)) print '<div id="id-right">'; + if (empty($conf->dol_hide_leftmenu)) { + print '<div id="id-right">'; + } print "\n"; print '<!-- Begin div class="fiche" -->'."\n".'<div class="fiche">'."\n"; - if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode", $conf->global->MAIN_ONLY_LOGIN_ALLOWED), 0, 0, 1, 'warning maintenancemode'); + if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { + print info_admin($langs->trans("WarningYouAreInMaintenanceMode", $conf->global->MAIN_ONLY_LOGIN_ALLOWED), 0, 0, 1, 'warning maintenancemode'); + } // Permit to add user company information on each printed document by setting SHOW_SOCINFO_ON_PRINT - if (!empty($conf->global->SHOW_SOCINFO_ON_PRINT) && GETPOST('optioncss', 'aZ09') == 'print' && empty(GETPOST('disable_show_socinfo_on_print', 'az09'))) - { + if (!empty($conf->global->SHOW_SOCINFO_ON_PRINT) && GETPOST('optioncss', 'aZ09') == 'print' && empty(GETPOST('disable_show_socinfo_on_print', 'az09'))) { global $hookmanager; $hookmanager->initHooks(array('main')); $parameters = array(); $reshook = $hookmanager->executeHooks('showSocinfoOnPrint', $parameters); - if (empty($reshook)) - { + if (empty($reshook)) { print '<!-- Begin show mysoc info header -->'."\n"; print '<div id="mysoc-info-header">'."\n"; print '<table class="centpercent div-table-responsive">'."\n"; @@ -2675,9 +2863,15 @@ function main_area($title = '') print '</td><td rowspan="0" class="width50p"></td></tr>'."\n"; print '<tr><td class="titre bold">'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).'</td></tr>'."\n"; print '<tr><td>'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ADDRESS).'<br>'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP).' '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN).'</td></tr>'."\n"; - if (!empty($conf->global->MAIN_INFO_SOCIETE_TEL)) print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Phone").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL).'</td></tr>'; - if (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL)) print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Email").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL).'</td></tr>'; - if (!empty($conf->global->MAIN_INFO_SOCIETE_WEB)) print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Web").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB).'</td></tr>'; + if (!empty($conf->global->MAIN_INFO_SOCIETE_TEL)) { + print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Phone").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL).'</td></tr>'; + } + if (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL)) { + print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Email").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL).'</td></tr>'; + } + if (!empty($conf->global->MAIN_INFO_SOCIETE_WEB)) { + print '<tr><td style="padding-left: 1em" class="small">'.$langs->trans("Web").' : '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB).'</td></tr>'; + } print '</tbody>'; print '</table>'."\n"; print '</div>'."\n"; @@ -2700,8 +2894,7 @@ function getHelpParamFor($helppagename, $langs) $helppage = ''; $mode = ''; - if (preg_match('/^http/i', $helppagename)) - { + if (preg_match('/^http/i', $helppagename)) { // If complete URL $helpbaseurl = '%s'; $helppage = $helppagename; @@ -2709,20 +2902,23 @@ function getHelpParamFor($helppagename, $langs) } else { // If WIKI URL $reg = array(); - if (preg_match('/^es/i', $langs->defaultlang)) - { + if (preg_match('/^es/i', $langs->defaultlang)) { $helpbaseurl = 'http://wiki.dolibarr.org/index.php/%s'; - if (preg_match('/ES:([^|]+)/i', $helppagename, $reg)) $helppage = $reg[1]; + if (preg_match('/ES:([^|]+)/i', $helppagename, $reg)) { + $helppage = $reg[1]; + } } - if (preg_match('/^fr/i', $langs->defaultlang)) - { + if (preg_match('/^fr/i', $langs->defaultlang)) { $helpbaseurl = 'http://wiki.dolibarr.org/index.php/%s'; - if (preg_match('/FR:([^|]+)/i', $helppagename, $reg)) $helppage = $reg[1]; + if (preg_match('/FR:([^|]+)/i', $helppagename, $reg)) { + $helppage = $reg[1]; + } } - if (empty($helppage)) // If help page not already found - { + if (empty($helppage)) { // If help page not already found $helpbaseurl = 'http://wiki.dolibarr.org/index.php/%s'; - if (preg_match('/EN:([^|]+)/i', $helppagename, $reg)) $helppage = $reg[1]; + if (preg_match('/EN:([^|]+)/i', $helppagename, $reg)) { + $helppage = $reg[1]; + } } $mode = 'wiki'; } @@ -2755,7 +2951,9 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu $ret .= '<input type="hidden" name="token" value="'.newToken().'">'; $ret .= '<input type="hidden" name="mode" value="search">'; $ret .= '<input type="hidden" name="savelogin" value="'.dol_escape_htmltag($user->login).'">'; - if ($showtitlebefore) $ret .= '<div class="tagtd left">'.$title.'</div> '; + if ($showtitlebefore) { + $ret .= '<div class="tagtd left">'.$title.'</div> '; + } $ret .= '<div class="tagtd">'; $ret .= img_picto('', $img, '', false, 0, 0, '', 'paddingright width20'); $ret .= '<input type="text" class="flat '.$htmlmorecss.'"'; @@ -2773,8 +2971,7 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu } -if (!function_exists("llxFooter")) -{ +if (!function_exists("llxFooter")) { /** * Show HTML footer * Close div /DIV class=fiche + /DIV id-right + /DIV id-container + /BODY + /HTML. @@ -2799,16 +2996,17 @@ if (!function_exists("llxFooter")) // Code for search criteria persistence. // $user->lastsearch_values was set by the GETPOST when form field search_xxx exists - if (is_object($user) && !empty($user->lastsearch_values_tmp) && is_array($user->lastsearch_values_tmp)) - { + if (is_object($user) && !empty($user->lastsearch_values_tmp) && is_array($user->lastsearch_values_tmp)) { // Clean and save data - foreach ($user->lastsearch_values_tmp as $key => $val) - { + foreach ($user->lastsearch_values_tmp as $key => $val) { unset($_SESSION['lastsearch_values_tmp_'.$key]); // Clean array to rebuild it just after - if (count($val) && empty($_POST['button_removefilter'])) // If there is search criteria to save and we did not click on 'Clear filter' button - { - if (empty($val['sortfield'])) unset($val['sortfield']); - if (empty($val['sortorder'])) unset($val['sortorder']); + if (count($val) && empty($_POST['button_removefilter'])) { // If there is search criteria to save and we did not click on 'Clear filter' button + if (empty($val['sortfield'])) { + unset($val['sortfield']); + } + if (empty($val['sortorder'])) { + unset($val['sortorder']); + } dol_syslog('Save lastsearch_values_tmp_'.$key.'='.json_encode($val, 0)." (systematic recording of last search criterias)"); $_SESSION['lastsearch_values_tmp_'.$key] = json_encode($val); unset($_SESSION['lastsearch_values_'.$key]); @@ -2819,18 +3017,25 @@ if (!function_exists("llxFooter")) $relativepathstring = $_SERVER["PHP_SELF"]; // Clean $relativepathstring - if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring); + if (constant('DOL_URL_ROOT')) { + $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'), '/').'/', '', $relativepathstring); + } $relativepathstring = preg_replace('/^\//', '', $relativepathstring); $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); - if (preg_match('/list\.php$/', $relativepathstring)) - { + if (preg_match('/list\.php$/', $relativepathstring)) { unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]); unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]); unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]); - if (!empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage; - if (!empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page; - if (!empty($limit) && $limit != $conf->liste_limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit; + if (!empty($contextpage)) { + $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage; + } + if (!empty($page) && $page > 0) { + $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page; + } + if (!empty($limit) && $limit != $conf->liste_limit) { + $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit; + } unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]); unset($_SESSION['lastsearch_page_'.$relativepathstring]); @@ -2838,11 +3043,9 @@ if (!function_exists("llxFooter")) } // Core error message - if (!empty($conf->global->MAIN_CORE_ERROR)) - { + if (!empty($conf->global->MAIN_CORE_ERROR)) { // Ajax version - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { $title = img_warning().' '.$langs->trans('CoreErrorTitle'); print ajax_dialog($title, $langs->trans('CoreErrorMessage')); } else { @@ -2858,55 +3061,60 @@ if (!function_exists("llxFooter")) print '</div> <!-- End div class="fiche" -->'."\n"; // End div fiche - if (empty($conf->dol_hide_leftmenu)) print '</div> <!-- End div id-right -->'."\n"; // End div id-right + if (empty($conf->dol_hide_leftmenu)) { + print '</div> <!-- End div id-right -->'."\n"; // End div id-right + } - if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) print '</div> <!-- End div id-container -->'."\n"; // End div container + if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile)) { + print '</div> <!-- End div id-container -->'."\n"; // End div container + } print "\n"; - if ($comment) print '<!-- '.$comment.' -->'."\n"; + if ($comment) { + print '<!-- '.$comment.' -->'."\n"; + } printCommonFooter($zone); - if (!empty($delayedhtmlcontent)) print $delayedhtmlcontent; + if (!empty($delayedhtmlcontent)) { + print $delayedhtmlcontent; + } - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print "\n".'<!-- Includes JS Footer of Dolibarr -->'."\n"; print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n"; } // Wrapper to add log when clicking on download or preview - if (!empty($conf->blockedlog->enabled) && is_object($object) && $object->id > 0 && $object->statut > 0) - { - if (in_array($object->element, array('facture'))) // Restrict for the moment to element 'facture' - { + if (!empty($conf->blockedlog->enabled) && is_object($object) && $object->id > 0 && $object->statut > 0) { + if (in_array($object->element, array('facture'))) { // Restrict for the moment to element 'facture' print "\n<!-- JS CODE TO ENABLE log when making a download or a preview of a document -->\n"; ?> - <script> - jQuery(document).ready(function () { - $('a.documentpreview').click(function() { - $.post('<?php echo DOL_URL_ROOT."/blockedlog/ajax/block-add.php" ?>' - , { - id:<?php echo $object->id; ?> - , element:'<?php echo $object->element ?>' - , action:'DOC_PREVIEW' - } - ); - }); - $('a.documentdownload').click(function() { - $.post('<?php echo DOL_URL_ROOT."/blockedlog/ajax/block-add.php" ?>' - , { - id:<?php echo $object->id; ?> - , element:'<?php echo $object->element ?>' - , action:'DOC_DOWNLOAD' - } - ); - }); - }); - </script> + <script> + jQuery(document).ready(function () { + $('a.documentpreview').click(function() { + $.post('<?php echo DOL_URL_ROOT."/blockedlog/ajax/block-add.php" ?>' + , { + id:<?php echo $object->id; ?> + , element:'<?php echo $object->element ?>' + , action:'DOC_PREVIEW' + } + ); + }); + $('a.documentdownload').click(function() { + $.post('<?php echo DOL_URL_ROOT."/blockedlog/ajax/block-add.php" ?>' + , { + id:<?php echo $object->id; ?> + , element:'<?php echo $object->element ?>' + , action:'DOC_DOWNLOAD' + } + ); + }); + }); + </script> <?php } - } + } // A div for the address popup print "\n<!-- A div to allow dialog popup -->\n"; @@ -2915,19 +3123,16 @@ if (!function_exists("llxFooter")) // Add code for the asynchronous anonymous first ping (for telemetry) // You can use &forceping=1 in parameters to force the ping if the ping was already sent. $forceping = GETPOST('forceping', 'alpha'); - if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) - { + if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) { //print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' -->'; $hash_unique_id = md5('dolibarr'.$conf->file->instance_unique_id); if (empty($conf->global->MAIN_FIRST_PING_OK_DATE) || (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && ($conf->global->MAIN_FIRST_PING_OK_ID != 'disabled')) - || $forceping) - { + || $forceping) { // No ping done if we are into an alpha version if (strpos('alpha', DOL_VERSION) > 0 && !$forceping) { print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It is an alpha version -->\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 if (!empty($conf->global->MAIN_LAST_PING_KO_DATE) && substr($conf->global->MAIN_LAST_PING_KO_DATE, 0, 6) == dol_print_date(dol_now(), '%Y%m') && !$forceping) { @@ -2935,64 +3140,68 @@ if (!function_exists("llxFooter")) } else { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - print "\n".'<!-- Includes JS for Ping of Dolibarr forceping='.$forceping.' MAIN_FIRST_PING_OK_DATE='.$conf->global->MAIN_FIRST_PING_OK_DATE.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' MAIN_LAST_PING_KO_DATE='.$conf->global->MAIN_LAST_PING_KO_DATE.' -->'."\n"; + print "\n".'<!-- Includes JS for Ping of Dolibarr forceping='.$forceping.' MAIN_FIRST_PING_OK_DATE='.getDolGlobalString("MAIN_FIRST_PING_OK_DATE").' MAIN_FIRST_PING_OK_ID='.getDolGlobalString("MAIN_FIRST_PING_OK_ID").' MAIN_LAST_PING_KO_DATE='.getDolGlobalString("MAIN_LAST_PING_KO_DATE").' -->'."\n"; print "\n<!-- JS CODE TO ENABLE the anonymous Ping -->\n"; $url_for_ping = (empty($conf->global->MAIN_URL_FOR_PING) ? "https://ping.dolibarr.org/" : $conf->global->MAIN_URL_FOR_PING); // Try to guess the distrib used $distrib = 'standard'; - if ($_SERVER["SERVER_ADMIN"] == 'doliwamp@localhost') $distrib = 'doliwamp'; - if (!empty($dolibarr_distrib)) $distrib = $dolibarr_distrib; + if ($_SERVER["SERVER_ADMIN"] == 'doliwamp@localhost') { + $distrib = 'doliwamp'; + } + if (!empty($dolibarr_distrib)) { + $distrib = $dolibarr_distrib; + } ?> - <script> - jQuery(document).ready(function (tmp) { - $.ajax({ - method: "POST", - url: "<?php echo $url_for_ping ?>", - timeout: 500, // timeout milliseconds - cache: false, - data: { - hash_algo: 'md5', - hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', - action: 'dolibarrping', - version: '<?php echo (float) DOL_VERSION; ?>', - entity: '<?php echo (int) $conf->entity; ?>', - dbtype: '<?php echo dol_escape_js($db->type); ?>', - country_code: '<?php echo $mysoc->country_code ? dol_escape_js($mysoc->country_code) : 'unknown'; ?>', - php_version: '<?php echo dol_escape_js(phpversion()); ?>', - os_version: '<?php echo dol_escape_js(version_os('smr')); ?>', - distrib: '<?php echo $distrib ? dol_escape_js($distrib) : 'unknown'; ?>' - }, - success: function (data, status, xhr) { // success callback function (data contains body of response) - console.log("Ping ok"); - $.ajax({ - method: 'GET', - url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>', - timeout: 500, // timeout milliseconds - cache: false, - data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingok' }, // for update - }); - }, - error: function (data,status,xhr) { // error callback function - console.log("Ping ko: " + data); - $.ajax({ - method: 'GET', - url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>', - timeout: 500, // timeout milliseconds - cache: false, - data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingko' }, - }); - } - }); - }); - </script> + <script> + jQuery(document).ready(function (tmp) { + $.ajax({ + method: "POST", + url: "<?php echo $url_for_ping ?>", + timeout: 500, // timeout milliseconds + cache: false, + data: { + hash_algo: 'md5', + hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', + action: 'dolibarrping', + version: '<?php echo (float) DOL_VERSION; ?>', + entity: '<?php echo (int) $conf->entity; ?>', + dbtype: '<?php echo dol_escape_js($db->type); ?>', + country_code: '<?php echo $mysoc->country_code ? dol_escape_js($mysoc->country_code) : 'unknown'; ?>', + php_version: '<?php echo dol_escape_js(phpversion()); ?>', + os_version: '<?php echo dol_escape_js(version_os('smr')); ?>', + distrib: '<?php echo $distrib ? dol_escape_js($distrib) : 'unknown'; ?>' + }, + success: function (data, status, xhr) { // success callback function (data contains body of response) + console.log("Ping ok"); + $.ajax({ + method: 'GET', + url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>', + timeout: 500, // timeout milliseconds + cache: false, + data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingok' }, // for update + }); + }, + error: function (data,status,xhr) { // error callback function + console.log("Ping ko: " + data); + $.ajax({ + method: 'GET', + url: '<?php echo DOL_URL_ROOT.'/core/ajax/pingresult.php'; ?>', + timeout: 500, // timeout milliseconds + cache: false, + data: { hash_algo: 'md5', hash_unique_id: '<?php echo dol_escape_js($hash_unique_id); ?>', action: 'firstpingko' }, + }); + } + }); + }); + </script> <?php } } else { $now = dol_now(); print "\n<!-- NO JS CODE TO ENABLE the anonymous Ping. It was disabled -->\n"; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; - dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_DATE', dol_print_date($now, 'dayhourlog', 'gmt')); - dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_ID', 'disabled'); + dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_DATE', dol_print_date($now, 'dayhourlog', 'gmt'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, 'MAIN_FIRST_PING_OK_ID', 'disabled', 'chaine', 0, '', $conf->entity); } } } diff --git a/htdocs/margin/admin/index.html b/htdocs/margin/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index d9c470b7acd..4df01332eb1 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"; $langs->loadLangs(array("admin", "bills", "margins", "stocks")); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -40,11 +42,10 @@ $action = GETPOST('action', 'aZ09'); * Action */ -if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) -{ +$reg = array(); +if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_set_const($db, $code, 1, 'yesno', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $code, 1, 'yesno', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -52,11 +53,9 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) } } -if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) -{ +if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; - if (dolibarr_del_const($db, $code, $conf->entity) > 0) - { + if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -64,30 +63,24 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) } } -if ($action == 'remises') -{ - if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0) - { +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 { dol_print_error($db); } } -if ($action == 'typemarges') -{ - if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0) - { +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 { dol_print_error($db); } } -if ($action == 'contact') -{ - if (dolibarr_set_const($db, 'AGENT_CONTACT_TYPE', $_POST['AGENT_CONTACT_TYPE'], 'chaine', 0, '', $conf->entity) > 0) - { +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 { dol_print_error($db); @@ -126,18 +119,23 @@ print '<tr class="oddeven">'; print '<td>'.$langs->trans("MARGIN_TYPE").'</td>'; print '<td>'; print ' <input type="radio" name="MARGIN_TYPE" value="1" '; -if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') +if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') { print 'checked '; +} print '/> '; print $langs->trans('MargeType1'); print '<br>'; print ' <input type="radio" name="MARGIN_TYPE" value="pmp" '; -if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') print 'checked '; +if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { + print 'checked '; +} print '/> '; print $langs->trans('MargeType2'); print '<br>'; print ' <input type="radio" name="MARGIN_TYPE" value="costprice" '; -if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') print 'checked '; +if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') { + print 'checked '; +} print '/> '; print $langs->trans('MargeType3'); print '</td>'; @@ -153,12 +151,10 @@ print '</form>'; print '<tr class="oddeven">'; print '<td>'.$langs->trans("DisplayMarginRates").'</td>'; print '<td colspan="2">'; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARGIN_RATES'); } else { - if (empty($conf->global->DISPLAY_MARGIN_RATES)) - { + if (empty($conf->global->DISPLAY_MARGIN_RATES)) { print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_DISPLAY_MARGIN_RATES&amp;token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; } else { print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_DISPLAY_MARGIN_RATES&amp;token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; @@ -172,12 +168,10 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td>'.$langs->trans("DisplayMarkRates").'</td>'; print '<td colspan="2">'; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARK_RATES'); } else { - if (empty($conf->global->DISPLAY_MARK_RATES)) - { + if (empty($conf->global->DISPLAY_MARK_RATES)) { print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_DISPLAY_MARK_RATES">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; } else { print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_DISPLAY_MARK_RATES">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; @@ -191,12 +185,10 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td>'.$langs->trans("ForceBuyingPriceIfNull").'</td>'; print '<td colspan="2">'; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('ForceBuyingPriceIfNull'); } else { - if (empty($conf->global->ForceBuyingPriceIfNull)) - { + if (empty($conf->global->ForceBuyingPriceIfNull)) { print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ForceBuyingPriceIfNull&amp;token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; } else { print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_ForceBuyingPriceIfNull&amp;token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>'; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index d2a19e87149..1ac670c4a7f 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -39,16 +39,21 @@ $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 +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) -{ - if ($agentid > 0) +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + if ($agentid > 0) { $sortfield = "s.nom"; - else $sortfield = "u.lastname"; + } else { + $sortfield = "u.lastname"; + } } $startdate = $enddate = ''; @@ -60,10 +65,12 @@ $enddateday = GETPOST('enddateday', 'int'); $enddatemonth = GETPOST('enddatemonth', 'int'); $enddateyear = GETPOST('enddateyear', 'int'); -if (!empty($startdatemonth)) +if (!empty($startdatemonth)) { $startdate = dol_mktime(0, 0, 0, $startdatemonth, $startdateday, $startdateyear); -if (!empty($enddatemonth)) +} +if (!empty($enddatemonth)) { $enddate = dol_mktime(23, 59, 59, $enddatemonth, $enddateday, $enddateyear); +} // Security check if ($user->rights->margins->read->all) { @@ -154,21 +161,27 @@ $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; $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)) +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"; -$sql .= " AND f.fk_statut NOT IN (".implode(', ', $invoice_status_except_list).")"; +} else { + $sql .= " AND sc.fk_user = u.rowid"; +} +$sql .= " AND f.fk_statut NOT IN (".$db->sanitize(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; + 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; + } +} +if (!empty($startdate)) { + $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; +} +if (!empty($enddate)) { + $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; } -if (!empty($startdate)) - $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; -if (!empty($enddate)) - $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; $sql .= " AND d.buy_price_ht IS NOT NULL"; // We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report. // We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable. @@ -184,31 +197,45 @@ $sql .= $db->order($sortfield, $sortorder); print '<br>'; -print img_info('').' '.$langs->trans("MarginPerSaleRepresentativeWarning").'<br>'; +print '<span class="opacitymedium">'.$langs->trans("MarginPerSaleRepresentativeWarning").'</span><br>'; $param = ''; -if (!empty($agentid)) $param .= "&amp;agentid=".urlencode($agentid); -if (!empty($startdateday)) $param .= "&amp;startdateday=".urlencode($startdateday); -if (!empty($startdatemonth)) $param .= "&amp;startdatemonth=".urlencode($startdatemonth); -if (!empty($startdateyear)) $param .= "&amp;startdateyear=".urlencode($startdateyear); -if (!empty($enddateday)) $param .= "&amp;enddateday=".urlencode($enddateday); -if (!empty($enddatemonth)) $param .= "&amp;enddatemonth=".urlencode($enddatemonth); -if (!empty($enddateyear)) $param .= "&amp;enddateyear=".urlencode($enddateyear); +if (!empty($agentid)) { + $param .= "&amp;agentid=".urlencode($agentid); +} +if (!empty($startdateday)) { + $param .= "&amp;startdateday=".urlencode($startdateday); +} +if (!empty($startdatemonth)) { + $param .= "&amp;startdatemonth=".urlencode($startdatemonth); +} +if (!empty($startdateyear)) { + $param .= "&amp;startdateyear=".urlencode($startdateyear); +} +if (!empty($enddateday)) { + $param .= "&amp;enddateday=".urlencode($enddateday); +} +if (!empty($enddatemonth)) { + $param .= "&amp;enddatemonth=".urlencode($enddatemonth); +} +if (!empty($enddateyear)) { + $param .= "&amp;enddateyear=".urlencode($enddateyear); +} dol_syslog('margin::agentMargins.php', LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); print '<br>'; print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); - if ($conf->global->MARGIN_TYPE == "1") + if ($conf->global->MARGIN_TYPE == "1") { $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + } else { // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; + } $moreforfilter = ''; @@ -217,21 +244,24 @@ if ($result) print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<tr class="liste_titre">'; - if ($agentid > 0) + 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 '); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + } print "</tr>\n"; - if ($num > 0) - { + if ($num > 0) { $group_list = array(); while ($objp = $db->fetch_object($result)) { if ($agentid > 0) { @@ -260,7 +290,7 @@ if ($result) // sql nb sellers $sql_seller = "SELECT COUNT(sc.rowid) as nb"; $sql_seller .= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql_seller .= " WHERE sc.fk_soc = ".$objp->socid; + $sql_seller .= " WHERE sc.fk_soc = ".((int) $objp->socid); $sql_seller .= " LIMIT 1"; $resql_seller = $db->query($sql_seller); @@ -296,23 +326,59 @@ if ($result) print '<tr class="oddeven">'; print "<td>".$group_array['htmlname']."</td>\n"; - print "<td class=\"right\">".price(price2num($pv, 'MT'))."</td>\n"; - print "<td class=\"right\">".price(price2num($pa, 'MT'))."</td>\n"; - print "<td class=\"right\">".price(price2num($marge, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) - print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pv, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pa, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($marge, 'MT')).'</span></td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } print "</tr>\n"; + + $i++; + $cumul_achat += $pa; + $cumul_vente += $pv; } } - print "</table>"; + + // Show total margin + $totalMargin = $cumul_vente - $cumul_achat; + + $marginRate = ($cumul_achat != 0) ? (100 * $totalMargin / $cumul_achat) : ''; + $markRate = ($cumul_vente != 0) ? (100 * $totalMargin / $cumul_vente) : ''; + + print '<tr class="liste_total">'; + print '<td>'; + print $langs->trans('TotalMargin')."</td>"; + print '<td class="nowrap right">'.price(price2num($cumul_vente, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($cumul_achat, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($totalMargin, 'MT')).'</td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } + print '</tr>'; + + print '</table>'; print '</div>'; } else { dol_print_error($db); } $db->free($result); +print "\n".'<script type="text/javascript"> +$(document).ready(function() { + console.log("Init some values"); + $("#totalMargin").html("'.price(price2num($totalMargin, 'MT')).'"); + $("#marginRate").html("'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'"); + $("#markRate").html("'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'"); +}); +</script>'."\n"; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 5d019b2693a..d12c827cc3e 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -44,12 +44,18 @@ $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 +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 = 'f.ref'; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = 'f.ref'; +} $startdate = $enddate = ''; @@ -73,15 +79,20 @@ if (GETPOST("button_search_x") || GETPOST("button_search")) { * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Selection of new fields include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; @@ -108,23 +119,22 @@ 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 - { + 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_array_options = array(); } // Mass actions /* - $objectclass='Product'; - if ((string) $type == '1') { $objectlabel='Services'; } - if ((string) $type == '0') { $objectlabel='Products'; } + $objectclass='Product'; + if ((string) $type == '1') { $objectlabel='Services'; } + if ((string) $type == '0') { $objectlabel='Products'; } - $permissiontoread = $user->rights->produit->lire; - $permissiontodelete = $user->rights->produit->supprimer; - $uploaddir = $conf->product->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - */ + $permissiontoread = $user->rights->produit->lire; + $permissiontodelete = $user->rights->produit->supprimer; + $uploaddir = $conf->product->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + */ } @@ -146,12 +156,24 @@ llxHeader('', $title); // print load_fiche_titre($text); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; -if ($search_ref != '') $param .= '&search_ref='.urlencode($search_ref); -if (!empty($startdate)) $param .= '&startdatemonth='.GETPOST('startdatemonth', 'int').'&startdateday='.GETPOST('startdateday', 'int').'&startdateyear='.GETPOST('startdateyear', 'int'); -if (!empty($enddate)) $param .= '&enddatemonth='.GETPOST('enddatemonth', 'int').'&enddateday='.GETPOST('enddateday', 'int').'&enddateyear='.GETPOST('enddateyear', 'int'); -if ($optioncss != '') $param .= '&optioncss='.$optioncss; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.$contextpage; +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; +} +if ($search_ref != '') { + $param .= '&search_ref='.urlencode($search_ref); +} +if (!empty($startdate)) { + $param .= '&startdatemonth='.GETPOST('startdatemonth', 'int').'&startdateday='.GETPOST('startdateday', 'int').'&startdateyear='.GETPOST('startdateyear', 'int'); +} +if (!empty($enddate)) { + $param .= '&enddatemonth='.GETPOST('enddatemonth', 'int').'&enddateday='.GETPOST('enddateday', 'int').'&enddateyear='.GETPOST('enddateyear', 'int'); +} +if ($optioncss != '') { + $param .= '&optioncss='.$optioncss; +} // Show tabs $head = marges_prepare_head($user); @@ -187,16 +209,22 @@ $massactionbutton = ''; $invoice_status_except_list = array(Facture::STATUS_DRAFT, Facture::STATUS_ABANDONED); $sql = "SELECT"; -$sql .= " f.ref, f.rowid as invoiceid, d.rowid as invoicedetid, d.buy_price_ht, d.total_ht, d.subprice, d.label, d.description , d.qty"; -$sql .= " ,d.fk_product"; +$sql .= " f.ref, f.rowid as invoiceid,"; +$sql .= " d.rowid as invoicedetid, d.product_type, d.buy_price_ht, d.total_ht, d.subprice, d.label, d.description, d.qty, d.fk_product"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f "; -$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as d ON d.fk_facture = f.rowid"; +$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as d ON d.fk_facture = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid"; -$sql .= " WHERE f.fk_statut NOT IN (".implode(', ', $invoice_status_except_list).")"; +$sql .= " WHERE f.fk_statut NOT IN (".$db->sanitize(implode(', ', $invoice_status_except_list)).")"; $sql .= " AND f.entity IN (".getEntity('invoice').") "; -if (!empty($startdate)) $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; -if (!empty($enddate)) $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; -if ($search_ref) $sql .= natural_search('f.ref', $search_ref); +if (!empty($startdate)) { + $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; +} +if (!empty($enddate)) { + $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; +} +if ($search_ref) { + $sql .= natural_search('f.ref', $search_ref); +} $sql .= " AND d.buy_price_ht IS NOT NULL"; $sql .= $db->order($sortfield, $sortorder); @@ -205,8 +233,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { dol_syslog(__FILE__, LOG_DEBUG); $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -221,10 +248,11 @@ if ($result) { print '<br>'; print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); - if ($conf->global->MARGIN_TYPE == "1") + if ($conf->global->MARGIN_TYPE == "1") { $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + } else { // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; + } $moreforfilter = ''; @@ -251,17 +279,16 @@ if ($result) { print '<tr class="liste_titre">'; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", $param, 'width=20%', $sortfield, $sortorder); - print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "d.subprice", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "d.buy_price_ht", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "d.total_ht", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "d.subprice", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "d.buy_price_ht", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "d.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); print "</tr>\n"; $i = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); print '<tr class="oddeven">'; @@ -282,6 +309,12 @@ if ($result) { print $productstatic->getNomUrl(1); } } else { + if ($objp->product_type == $productstatic::TYPE_PRODUCT) { + print img_picto('', 'product'); + } + if ($objp->product_type == $productstatic::TYPE_SERVICE) { + print img_picto('', 'service'); + } print $objp->label; print '&nbsp;'; print $objp->description; @@ -297,7 +330,7 @@ if ($result) { print $objp->qty; print '</td>'; print '<td class="right">'; - print price($objp->total_ht); + print '<span class="amount">'.price($objp->total_ht).'</span>'; print '</td>'; print '<td></td>'; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index feb5cd34c8e..67639acb745 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -36,7 +36,9 @@ $socid = GETPOST('socid', 'int'); $TSelectedProducts = GETPOST('products', 'array'); $TSelectedCats = GETPOST('categories', 'array'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', '', ''); $result = restrictedArea($user, 'margins'); @@ -48,19 +50,27 @@ $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 +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 = "s.nom"; // Set here default search field -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "s.nom"; // Set here default search field +} +if (!$sortorder) { + $sortorder = "ASC"; +} $startdate = $enddate = ''; -if (!empty($_POST['startdatemonth'])) - $startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']); -if (!empty($_POST['enddatemonth'])) - $enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']); +if (!empty($_POST['startdatemonth'])) { + $startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']); +} +if (!empty($_POST['enddatemonth'])) { + $enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Societe($db); @@ -98,16 +108,19 @@ if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); - if ($soc->client) - { + if ($soc->client) { print '<tr><td class="titlefield">'.$langs->trans('ThirdPartyName').'</td>'; print '<td class="maxwidthonsmartphone" colspan="4">'; print img_picto('', 'company').$form->select_company($socid, 'socid', '(client=1 OR client=3)', 1, 0, 0); print '</td></tr>'; $client = true; - if (!$sortorder) $sortorder = "DESC"; - if (!$sortfield) $sortfield = "f.datef"; + if (!$sortorder) { + $sortorder = "DESC"; + } + if (!$sortfield) { + $sortfield = "f.datef"; + } } } else { print '<tr><td class="titlefield">'.$langs->trans('ThirdPartyName').'</td>'; @@ -118,11 +131,11 @@ if ($socid > 0) { $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) -{ - if ($client) - { +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + if ($client) { $sortfield = "f.datef"; $sortorder = "DESC"; } else { @@ -202,7 +215,9 @@ $invoice_status_except_list = array(Facture::STATUS_DRAFT, Facture::STATUS_ABAND $sql = "SELECT"; $sql .= " s.rowid as socid, s.nom as name, s.code_client, s.client,"; -if ($client) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; +if ($client) { + $sql .= " f.rowid as facid, f.ref, f.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(".$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,"; @@ -214,50 +229,61 @@ if (!empty($TSelectedCats)) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=d.fk_product'; } -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE f.fk_soc = s.rowid"; -if ($socid > 0) $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; -$sql .= " AND f.fk_statut NOT IN (".implode(', ', $invoice_status_except_list).")"; +if ($socid > 0) { + $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; +} +$sql .= " AND f.fk_statut NOT IN (".$db->sanitize(implode(', ', $invoice_status_except_list)).")"; $sql .= ' AND s.entity IN ('.getEntity('societe').')'; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; $sql .= " AND d.fk_facture = f.rowid"; $sql .= " AND (d.product_type = 0 OR d.product_type = 1)"; if (!empty($TSelectedProducts)) { - $sql .= ' AND d.fk_product IN ('.implode(',', $TSelectedProducts).')'; + $sql .= ' AND d.fk_product IN ('.$db->sanitize(implode(',', $TSelectedProducts)).')'; } if (!empty($TSelectedCats)) { - $sql .= ' AND cp.fk_categorie IN ('.implode(',', $TSelectedCats).')'; + $sql .= ' AND cp.fk_categorie IN ('.$db->sanitize(implode(',', $TSelectedCats)).')'; +} +if (!empty($startdate)) { + $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; +} +if (!empty($enddate)) { + $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; } -if (!empty($startdate)) -$sql .= " AND f.datef >= '".$db->idate($startdate)."'"; -if (!empty($enddate)) -$sql .= " AND f.datef <= '".$db->idate($enddate)."'"; $sql .= " AND d.buy_price_ht IS NOT NULL"; // We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report. // We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable. if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) { $sql .= " AND d.buy_price_ht <> 0"; } -if ($client) $sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut"; -else $sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client"; +if ($client) { + $sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut"; +} else { + $sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client"; +} $sql .= $db->order($sortfield, $sortorder); // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); dol_syslog('margin::customerMargins.php', LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); - print '<br>'; + print '<br>'; print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); - if ($conf->global->MARGIN_TYPE == "1") + if ($conf->global->MARGIN_TYPE == "1") { $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + } else { // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; + } $moreforfilter = ''; @@ -267,33 +293,34 @@ if ($result) print '<tr class="liste_titre">'; if (!empty($client)) { - print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&amp;socid=".$socid, '', $sortfield, $sortorder); - print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;socid=".$socid, 'align="center"', $sortfield, $sortorder); - } else print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", "&amp;socid=".$socid, '', $sortfield, $sortorder); + print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&amp;socid=".$socid, '', $sortfield, $sortorder); + print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;socid=".$socid, 'align="center"', $sortfield, $sortorder); + } else { + print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", "&amp;socid=".$socid, '', $sortfield, $sortorder); + } print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&amp;socid=".$socid, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&amp;socid=".$socid, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;socid=".$socid, 'align="right"', $sortfield, $sortorder); - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;socid=".$socid, 'align="right"', $sortfield, $sortorder); - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;socid=".$socid, 'align="right"', $sortfield, $sortorder); + } print "</tr>\n"; $cumul_achat = 0; $cumul_vente = 0; - if ($num > 0) - { - while ($i < $num /*&& $i < $conf->liste_limit*/) - { + if ($num > 0) { + while ($i < $num /*&& $i < $conf->liste_limit*/) { $objp = $db->fetch_object($result); $pa = $objp->buying_price; $pv = $objp->selling_price; $marge = $objp->marge; - if ($marge < 0) - { + if ($marge < 0) { $marginRate = ($pa != 0) ?-1 * (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ?-1 * (100 * $marge / $pv) : ''; } else { @@ -307,23 +334,25 @@ if ($result) $invoicestatic->id = $objp->facid; $invoicestatic->ref = $objp->ref; print $invoicestatic->getNomUrl(1); - print "</td>\n"; - print "<td class=\"center\">"; - print dol_print_date($db->jdate($objp->datef), 'day')."</td>"; - } else { + print '</td>'; + print '<td class="center">'; + print dol_print_date($db->jdate($objp->datef), 'day').'</td>'; + } else { $companystatic->id = $objp->socid; $companystatic->name = $objp->name; $companystatic->client = $objp->client; - print "<td>".$companystatic->getNomUrl(1, 'margin')."</td>\n"; - } + print '<td>'.$companystatic->getNomUrl(1, 'margin').'</td>'; + } - print "<td class=\"right\">".price(price2num($pv, 'MT'))."</td>\n"; - print "<td class=\"right\">".price(price2num($pa, 'MT'))."</td>\n"; - print "<td class=\"right\">".price(price2num($marge, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) - print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pv, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pa, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($marge, 'MT')).'</span></td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } print "</tr>\n"; $i++; @@ -347,20 +376,24 @@ if ($result) //} print '<tr class="liste_total">'; - if ($client) + if ($client) { print '<td colspan=2>'; - else print '<td>'; - print $langs->trans('TotalMargin')."</td>"; - print "<td class=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n"; - print "<td class=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n"; - print "<td class=\"right\">".price($totalMargin, null, null, null, null, $rounding)."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price($marginRate, null, null, null, null, $rounding)."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) - print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price($markRate, null, null, null, null, $rounding)."%")."</td>\n"; - print "</tr>\n"; + } else { + print '<td>'; + } + print $langs->trans('TotalMargin')."</td>"; + print '<td class="nowrap right">'.price(price2num($cumul_vente, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($cumul_achat, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($totalMargin, 'MT')).'</td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } + print '</tr>'; - print "</table>"; + print '</table>'; print '</div>'; } else { dol_print_error($db); @@ -369,9 +402,10 @@ $db->free($result); print '<script type="text/javascript"> $(document).ready(function() { - $("#totalMargin").html("'.price($totalMargin, null, null, null, null, $rounding).'"); - $("#marginRate").html("'.(($marginRate === '') ? 'n/a' : price($marginRate, null, null, null, null, $rounding)."%").'"); - $("#markRate").html("'.(($markRate === '') ? 'n/a' : price($markRate, null, null, null, null, $rounding)."%").'"); + console.log("Init some values"); + $("#totalMargin").html("'.price(price2num($totalMargin, 'MT')).'"); + $("#marginRate").html("'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'"); + $("#markRate").html("'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'"); }); </script> '; diff --git a/htdocs/margin/lib/index.html b/htdocs/margin/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 6161ba2b6e4..802541b98ca 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -124,8 +124,7 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta if ($fk_pa > 0 && empty($paht)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $product = new ProductFournisseur($db); - if ($product->fetch_product_fournisseur_price($fk_pa)) - { + if ($product->fetch_product_fournisseur_price($fk_pa)) { $paht_ret = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100); } else { $paht_ret = $paht; @@ -141,16 +140,20 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta $pu_ht_remise = price2num($pu_ht_remise, 'MU'); // calcul marge - if ($pu_ht_remise < 0) + 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) + if ($paht_ret != 0) { $marge_tx_ret = (100 * $marge) / $paht_ret; + } // calcul taux marque - if ($pu_ht_remise != 0) + if ($pu_ht_remise != 0) { $marque_tx_ret = (100 * $marge) / $pu_ht_remise; + } return array($paht_ret, $marge_tx_ret, $marque_tx_ret); } diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index b7695c9b2ea..ac006c042aa 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -41,9 +41,13 @@ $TSelectedCats = GETPOST('categories', 'array'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); -if (empty($user->rights->margins->liretous)) accessforbidden(); +if (empty($user->rights->margins->liretous)) { + accessforbidden(); +} $mesg = ''; @@ -52,14 +56,14 @@ $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 +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) -{ - if ($id > 0) - { +if (!$sortfield) { + if ($id > 0) { $sortfield = "f.datef"; $sortorder = "DESC"; } else { @@ -70,10 +74,12 @@ if (!$sortfield) $startdate = $enddate = ''; -if (!empty($_POST['startdatemonth'])) - $startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']); -if (!empty($_POST['enddatemonth'])) - $enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']); +if (!empty($_POST['startdatemonth'])) { + $startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']); +} +if (!empty($_POST['enddatemonth'])) { + $enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Product($db); @@ -169,8 +175,12 @@ print '</form>'; $invoice_status_except_list = array(Facture::STATUS_DRAFT, Facture::STATUS_ABANDONED); $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref, p.entity as pentity,"; -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,"; +if ($id > 0) { + $sql .= " d.fk_product,"; +} +if ($id > 0) { + $sql .= " f.rowid as facid, f.ref, f.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,"; @@ -185,43 +195,49 @@ if (!empty($TSelectedCats)) { } $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; -$sql .= " AND f.fk_statut NOT IN (".implode(', ', $invoice_status_except_list).")"; +$sql .= " AND f.fk_statut NOT IN (".$db->sanitize(implode(', ', $invoice_status_except_list)).")"; $sql .= " AND d.fk_facture = f.rowid"; -if ($id > 0) - $sql .= " AND d.fk_product =".$id; -if (!empty($TSelectedCats)) { - $sql .= ' AND cp.fk_categorie IN ('.implode(',', $TSelectedCats).')'; +if ($id > 0) { + $sql .= " AND d.fk_product =".((int) $id); +} +if (!empty($TSelectedCats)) { + $sql .= ' AND cp.fk_categorie IN ('.$db->sanitize(implode(',', $TSelectedCats)).')'; +} +if (!empty($startdate)) { + $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; +} +if (!empty($enddate)) { + $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; } -if (!empty($startdate)) - $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; -if (!empty($enddate)) - $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; $sql .= " AND d.buy_price_ht IS NOT NULL"; // We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report. // We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable. if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) { $sql .= " AND d.buy_price_ht <> 0"; } -if ($id > 0) $sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity, d.fk_product, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut"; -else $sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity"; +if ($id > 0) { + $sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity, d.fk_product, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut"; +} else { + $sql .= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, p.entity"; +} $sql .= $db->order($sortfield, $sortorder); // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); dol_syslog('margin::productMargins.php', LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); print '<br>'; print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&amp;id=".$id, $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); //var_dump($conf->global->MARGIN_TYPE); - if ($conf->global->MARGIN_TYPE == "1") + if ($conf->global->MARGIN_TYPE == "1") { $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + } else { // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; + } $moreforfilter = ''; @@ -231,37 +247,36 @@ if ($result) print '<tr class="liste_titre">'; if ($id > 0) { - print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder); - print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'center '); - } else { - print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder); - } + print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder); + print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'center '); + } else { + print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder); + } print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right '); + } print "</tr>\n"; $cumul_achat = 0; $cumul_vente = 0; $cumul_qty = 0; - if ($num > 0) - { - while ($i < $num /*&& $i < $conf->liste_limit*/) - { + 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; - if ($marge < 0) - { + if ($marge < 0) { $marginRate = ($pa != 0) ?-1 * (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ?-1 * (100 * $marge / $pv) : ''; } else { @@ -280,8 +295,7 @@ if ($result) print dol_print_date($db->jdate($objp->datef), 'day')."</td>"; } else { print '<td>'; - if ($objp->rowid > 0) - { + if ($objp->rowid > 0) { $product_static->type = $objp->fk_product_type; $product_static->id = $objp->rowid; $product_static->ref = $objp->ref; @@ -295,14 +309,16 @@ if ($result) print "</td>\n"; //print "<td>".$product_static->getNomUrl(1)."</td>\n"; } - print "<td class=\"center\">".$qty."</td>\n"; - print "<td class=\"nowrap right\">".price(price2num($pv, 'MT'))."</td>\n"; - print "<td class=\"nowrap right\">".price(price2num($pa, 'MT'))."</td>\n"; - print "<td class=\"nowrap right\">".price(price2num($marge, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) - print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + print '<td class="center">'.$qty.'</td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pv, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($pa, 'MT')).'</span></td>'; + print '<td class="nowrap right"><span class="amount">'.price(price2num($marge, 'MT')).'</span></td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } print "</tr>\n"; $i++; @@ -320,18 +336,22 @@ if ($result) $markRate = ($cumul_vente != 0) ? (100 * $totalMargin / $cumul_vente) : ''; print '<tr class="liste_total">'; - if ($id > 0) + if ($id > 0) { print '<td colspan=2>'; - else print '<td>'; - print $langs->trans('TotalMargin')."</td>"; - print "<td class=\"center\">".$cumul_qty."</td>"; - print "<td class=\"nowrap right\">".price(price2num($cumul_vente, 'MT'))."</td>\n"; - print "<td class=\"nowrap right\">".price(price2num($cumul_achat, 'MT'))."</td>\n"; - print "<td class=\"nowrap right\">".price(price2num($totalMargin, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) - print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + } else { + print '<td>'; + } + print $langs->trans('TotalMargin').'</td>'; + print '<td class="center">'.$cumul_qty.'</td>'; + print '<td class="nowrap right">'.price(price2num($cumul_vente, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($cumul_achat, 'MT')).'</td>'; + print '<td class="nowrap right">'.price(price2num($totalMargin, 'MT')).'</td>'; + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { + print '<td class="nowrap right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%").'</td>'; + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { + print '<td class="nowrap right">'.(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%").'</td>'; + } print "</tr>\n"; print "</table>"; diff --git a/htdocs/margin/tabs/index.html b/htdocs/margin/tabs/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index eb82f121295..4c34e04c54c 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -36,9 +36,13 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); -if (empty($user->rights->margins->liretous)) accessforbidden(); +if (empty($user->rights->margins->liretous)) { + accessforbidden(); +} $object = new Product($db); @@ -46,12 +50,18 @@ $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 = "f.datef"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.datef"; +} /* @@ -62,31 +72,27 @@ $invoicestatic = new Facture($db); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $title = $langs->trans('ProductServiceCard'); - $helpurl = ''; + $help_url = ''; $shortlabel = dol_trunc($object->label, 16); - if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) - { + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); - $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } - if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) - { + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); - $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } - llxHeader('', $title, $helpurl); + llxHeader('', $title, $help_url); /* * En mode visu */ - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -131,9 +137,11 @@ if ($id > 0 || !empty($ref)) if ($user->rights->facture->lire) { $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,"; - $sql .= " f.rowid as facid, f.ref, f.total as total_ht,"; + $sql .= " f.rowid as facid, f.ref, f.total_ht,"; $sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " sc.fk_soc, sc.fk_user,"; + } $sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty) as qty,"; // not always positive in case of Credit note $sql .= " ".$db->ifsql('f.type = 2', -1, 1)." * sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // not always positive in case of Credit note @@ -141,22 +149,30 @@ if ($id > 0 || !empty($ref)) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."facturedet as d"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + 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.fk_statut > 0"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND d.fk_facture = f.rowid"; $sql .= " AND d.fk_product =".$object->id; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if (!empty($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; + } + if (!empty($socid)) { + $sql .= " AND f.fk_soc = $socid"; + } $sql .= " AND d.buy_price_ht IS NOT NULL"; // We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report. // We keep it with value ForceBuyingPriceIfNull = 2 for retroactive effect but results are unpredicable. if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) { $sql .= " AND d.buy_price_ht <> 0"; } - $sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut, f.type"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user"; + } $sql .= $db->order($sortfield, $sortorder); // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); @@ -181,10 +197,12 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "buying_price", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&amp;id=".$object->id, '', $sortfield, $sortorder, 'right '); print "</tr>\n"; @@ -213,10 +231,12 @@ if ($id > 0 || !empty($ref)) print "<td class=\"right\">".price(price2num($objp->buying_price, 'MT'))."</td>\n"; print "<td class=\"right\">".price(price2num($objp->qty, 'MT'))."</td>\n"; print "<td class=\"right\">".price(price2num($objp->marge, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + } print '<td class="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>'; print "</tr>\n"; $i++; @@ -229,8 +249,7 @@ if ($id > 0 || !empty($ref)) // affichage totaux marges $totalMargin = $cumul_vente - $cumul_achat; - if ($totalMargin < 0) - { + if ($totalMargin < 0) { $marginRate = ($cumul_achat != 0) ?-1 * (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ?-1 * (100 * $totalMargin / $cumul_vente) : ''; } else { @@ -243,10 +262,12 @@ if ($id > 0 || !empty($ref)) print '<td class="right">'.price(price2num($cumul_achat, 'MT'))."</td>\n"; print '<td class="right">'.price(price2num($cumul_qty, 'MT'))."</td>\n"; print '<td class="right">'.price(price2num($totalMargin, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print '<td class="right">'.(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + } print '<td class="right">&nbsp;</td>'; print "</tr>\n"; print "</table>"; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 0b79ec62b90..b1c569c0912 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -30,7 +30,9 @@ $langs->loadLangs(array("companies", "bills", "products", "margins")); // Security check $socid = GETPOST('socid', 'int'); -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', '', ''); @@ -38,15 +40,23 @@ $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 = "f.datef"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.datef"; +} $object = new Societe($db); -if ($socid > 0) $object->fetch($socid); +if ($socid > 0) { + $object->fetch($socid); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartymargins', 'globalcard')); @@ -58,7 +68,9 @@ $hookmanager->initHooks(array('thirdpartymargins', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} @@ -70,18 +82,19 @@ $invoicestatic = new Facture($db); $form = new Form($db); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Margins"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Files"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Files"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($socid > 0) -{ +if ($socid > 0) { $object = new Societe($db); $object->fetch($socid); /* - * Affichage onglets - */ + * Affichage onglets + */ $head = societe_prepare_head($object); @@ -96,27 +109,25 @@ if ($socid > 0) print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; - if ($object->client) - { - print '<tr><td class="titlefield">'; - print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - } - print '</td></tr>'; - } + if ($object->client) { + print '<tr><td class="titlefield">'; + print $langs->trans('CustomerCode').'</td><td colspan="3">'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); + $tmpcheck = $object->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; + } + print '</td></tr>'; + } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) - { + if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } print '</td></tr>'; } @@ -149,7 +160,7 @@ if ($socid > 0) print '<br>'; $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,"; - $sql .= " f.rowid as facid, f.ref, f.total as total_ht,"; + $sql .= " f.rowid as facid, f.ref, f.total_ht,"; $sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,"; $sql .= " sum(d.total_ht) as selling_price,"; // may be negative or positive $sql .= " sum(d.qty * d.buy_price_ht * (d.situation_percent / 100)) as buying_price,"; // always positive @@ -168,15 +179,14 @@ if ($socid > 0) if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 2) { $sql .= " AND d.buy_price_ht <> 0"; } - $sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total, f.datef, f.paye, f.fk_statut, f.type"; + $sql .= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.ref, f.total_ht, f.datef, f.paye, f.fk_statut, f.type"; $sql .= $db->order($sortfield, $sortorder); // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); dol_syslog('margin:tabs:thirdpartyMargins.php', LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&amp;socid=".$object->id, $sortfield, $sortorder, '', $num, $num, ''); @@ -191,20 +201,20 @@ if ($socid > 0) print_liste_field_titre("SoldAmount", $_SERVER["PHP_SELF"], "selling_price", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); print_liste_field_titre("PurchasedAmount", $_SERVER["PHP_SELF"], "buying_price", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", "&amp;socid=".$_REQUEST["socid"], '', $sortfield, $sortorder, 'right '); print "</tr>\n"; $cumul_achat = 0; $cumul_vente = 0; - if ($num > 0) - { - while ($i < $num /*&& $i < $conf->liste_limit*/) - { + if ($num > 0) { + while ($i < $num /*&& $i < $conf->liste_limit*/) { $objp = $db->fetch_object($result); $marginRate = ($objp->buying_price != 0) ? (100 * $objp->marge / $objp->buying_price) : ''; @@ -226,10 +236,12 @@ if ($socid > 0) print "<td class=\"right\">".price(price2num($objp->selling_price, 'MT'))."</td>\n"; print "<td class=\"right\">".price(price2num(($objp->type == 2 ? -1 : 1) * $objp->buying_price, 'MT'))."</td>\n"; print "<td class=\"right\">".$sign.price(price2num($objp->marge, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : $sign.price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + } print '<td class="right">'.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5).'</td>'; print "</tr>\n"; $i++; @@ -241,8 +253,7 @@ if ($socid > 0) // affichage totaux marges $totalMargin = $cumul_vente - $cumul_achat; - if ($totalMargin < 0) - { + if ($totalMargin < 0) { $marginRate = ($cumul_achat != 0) ?-1 * (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ?-1 * (100 * $totalMargin / $cumul_vente) : ''; } else { @@ -256,10 +267,12 @@ if ($socid > 0) print "<td class=\"right\">".price(price2num($cumul_vente, 'MT'))."</td>\n"; print "<td class=\"right\">".price(price2num($cumul_achat, 'MT'))."</td>\n"; print "<td class=\"right\">".price(price2num($totalMargin, 'MT'))."</td>\n"; - if (!empty($conf->global->DISPLAY_MARGIN_RATES)) + if (!empty($conf->global->DISPLAY_MARGIN_RATES)) { print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n"; - if (!empty($conf->global->DISPLAY_MARK_RATES)) + } + if (!empty($conf->global->DISPLAY_MARK_RATES)) { print "<td class=\"right\">".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."</td>\n"; + } print '<td class="right">&nbsp;</td>'; print "</tr>\n"; } else { diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 9efff08306f..e38ddf9b93c 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -32,9 +32,21 @@ * This script reads the conf file, init $lang, $db and and empty $user */ -require_once 'filefunc.inc.php'; // May have been already require by main.inc.php. But may not by scripts. +// Declaration of variables. May have been already require by main.inc.php. But may not by scripts. So, here the require_once must be kept. +require_once 'filefunc.inc.php'; +if (!function_exists('is_countable')) { + /** + * function is_countable (to remove when php version supported will be >= 7.3) + * @param mixed $c data to check if countable + * @return bool + */ + function is_countable($c) + { + return is_array($c) || $c instanceof Countable; + } +} /* * Create $conf object @@ -45,18 +57,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php'; $conf = new Conf(); // Set properties specific to database -$conf->db->host = $dolibarr_main_db_host; -$conf->db->port = $dolibarr_main_db_port; -$conf->db->name = $dolibarr_main_db_name; -$conf->db->user = $dolibarr_main_db_user; -$conf->db->pass = empty($dolibarr_main_db_pass) ? '' : $dolibarr_main_db_pass; -$conf->db->type = $dolibarr_main_db_type; +$conf->db->host = $dolibarr_main_db_host; +$conf->db->port = $dolibarr_main_db_port; +$conf->db->name = $dolibarr_main_db_name; +$conf->db->user = $dolibarr_main_db_user; +$conf->db->pass = empty($dolibarr_main_db_pass) ? '' : $dolibarr_main_db_pass; +$conf->db->type = $dolibarr_main_db_type; $conf->db->prefix = $dolibarr_main_db_prefix; $conf->db->character_set = $dolibarr_main_db_character_set; $conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation; $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; -if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type = constant('TEST_DB_FORCE_TYPE'); // Force db type (for test purpose, by PHP unit for example) +if (defined('TEST_DB_FORCE_TYPE')) { + $conf->db->type = constant('TEST_DB_FORCE_TYPE'); // Force db type (for test purpose, by PHP unit for example) +} // Set properties specific to conf file $conf->file->main_limit_users = $dolibarr_main_limit_users; @@ -68,18 +82,17 @@ $conf->file->strict_mode = empty($dolibarr_strict_mode) ? '' : $dolibarr_strict_ $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') -if (!empty($dolibarr_main_document_root_alt)) -{ +if (!empty($dolibarr_main_document_root_alt)) { // dolibarr_main_document_root_alt can contains several directories $values = preg_split('/[;,]/', $dolibarr_main_document_root_alt); $i = 0; - foreach ($values as $value) $conf->file->dol_document_root['alt'.($i++)] = (string) $value; + foreach ($values as $value) { + $conf->file->dol_document_root['alt'.($i++)] = (string) $value; + } $values = preg_split('/[;,]/', $dolibarr_main_url_root_alt); $i = 0; - foreach ($values as $value) - { - if (preg_match('/^http(s)?:/', $value)) - { + foreach ($values as $value) { + if (preg_match('/^http(s)?:/', $value)) { // Show error message $correct_value = str_replace($dolibarr_main_url_root, '', $value); print '<b>Error:</b><br>'."\n"; @@ -99,36 +112,39 @@ if (!empty($dolibarr_main_document_root_alt)) } // Chargement des includes principaux de librairies communes -if (!defined('NOREQUIREUSER')) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // Need 500ko memory -if (!defined('NOREQUIRETRAN')) require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; -if (!defined('NOREQUIRESOC')) require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +if (!defined('NOREQUIREUSER')) { + require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // Need 500ko memory +} +if (!defined('NOREQUIRETRAN')) { + require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; +} +if (!defined('NOREQUIRESOC')) { + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +} /* * Creation objet $langs (must be before all other code) */ -if (!defined('NOREQUIRETRAN')) -{ +if (!defined('NOREQUIRETRAN')) { $langs = new Translate('', $conf); // Must be after reading conf } /* * Object $db */ -if (!defined('NOREQUIREDB')) -{ +if (!defined('NOREQUIREDB')) { $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port); - if ($db->error) - { + if ($db->error) { // If we were into a website context - if (!defined('USEDOLIBARREDITOR') && !defined('USEDOLIBARRSERVER') && !empty($_SERVER['SCRIPT_FILENAME']) && (strpos($_SERVER['SCRIPT_FILENAME'], DOL_DATA_ROOT.'/website') === 0)) - { + if (!defined('USEDOLIBARREDITOR') && !defined('USEDOLIBARRSERVER') && !empty($_SERVER['SCRIPT_FILENAME']) && (strpos($_SERVER['SCRIPT_FILENAME'], DOL_DATA_ROOT.'/website') === 0)) { $sapi_type = php_sapi_name(); - if (substr($sapi_type, 0, 3) != 'cgi') http_response_code(503); // To tel search engine this is a temporary error + if (substr($sapi_type, 0, 3) != 'cgi') { + http_response_code(503); // To tel search engine this is a temporary error + } print '<div class="center" style="text-align: center; margin: 100px;">'; - if (is_object($langs)) - { + if (is_object($langs)) { $langs->setDefaultLang('auto'); $langs->load("website"); print $langs->trans("SorryWebsiteIsCurrentlyOffLine"); @@ -175,10 +191,11 @@ if (session_id() && !empty($_SESSION["dol_entity"])) { } // Sanitize entity -if (!is_numeric($conf->entity)) $conf->entity = 1; +if (!is_numeric($conf->entity)) { + $conf->entity = 1; +} -if (!defined('NOREQUIREDB')) -{ +if (!defined('NOREQUIREDB')) { //print "Will work with data into entity instance number '".$conf->entity."'"; // Here we read database (llx_const table) and define $conf->global->XXX var. @@ -197,23 +214,25 @@ if (!empty($conf->file->mailing_limit_sendbycli)) { } // Create object $mysoc (A thirdparty object that contains properties of companies managed by Dolibarr. -if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) -{ +if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $mysoc = new Societe($db); $mysoc->setMysoc($conf); // For some countries, we need to invert our address with customer address - if ($mysoc->country_code == 'DE' && !isset($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; + if ($mysoc->country_code == 'DE' && !isset($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; + } } // Set default language (must be after the setValues setting global $conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later) -if (!defined('NOREQUIRETRAN')) -{ +if (!defined('NOREQUIRETRAN')) { $langcode = (GETPOST('lang', 'aZ09') ? GETPOST('lang', 'aZ09', 1) : (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); - if (defined('MAIN_LANG_DEFAULT')) $langcode = constant('MAIN_LANG_DEFAULT'); + if (defined('MAIN_LANG_DEFAULT')) { + $langcode = constant('MAIN_LANG_DEFAULT'); + } $langs->setDefaultLang($langcode); } @@ -223,5 +242,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); -if (!defined('MAIN_LABEL_MENTION_NPR')) define('MAIN_LABEL_MENTION_NPR', 'NPR'); +if (!defined('MAIN_LABEL_MENTION_NPR')) { + define('MAIN_LABEL_MENTION_NPR', 'NPR'); +} //if (! defined('PCLZIP_TEMPORARY_DIR')) define('PCLZIP_TEMPORARY_DIR', $conf->user->dir_temp); diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php index c5b41ac9390..62eccc5be18 100644 --- a/htdocs/modulebuilder/admin/setup.php +++ b/htdocs/modulebuilder/admin/setup.php @@ -26,17 +26,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; global $conf, $langs, $user, $db; $langs->loadLangs(array("admin", "other", "modulebuilder")); -if (!$user->admin || empty($conf->modulebuilder->enabled)) +if (!$user->admin || empty($conf->modulebuilder->enabled)) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); + /* * Actions */ -if ($action == "update") -{ + +if ($action == "update") { $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); @@ -58,8 +60,9 @@ $reg = array(); if (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; $values = GETPOST($code); - if (is_array($values)) + if (is_array($values)) { $values = implode(',', $values); + } if (dolibarr_set_const($db, $code, $values, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); @@ -112,8 +115,7 @@ print '<td>'.$langs->trans("Value").'</td>'; print "</tr>\n"; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // What is use case of this 2 options ? print '<tr class="oddeven">'; diff --git a/htdocs/modulebuilder/index.html b/htdocs/modulebuilder/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index f3922aa6342..c4c0aceed3a 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -27,7 +27,9 @@ * into the dirins directory. */ -if (!defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti SQL+XSS injection attack test +if (!defined('NOSCANPOSTFORINJECTION')) { + define('NOSCANPOSTFORINJECTION', '1'); // Do not check anti SQL+XSS injection attack test +} require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -48,17 +50,27 @@ $module = GETPOST('module', 'alpha'); $tab = GETPOST('tab', 'aZ09'); $tabobj = GETPOST('tabobj', 'alpha'); $propertykey = GETPOST('propertykey', 'alpha'); -if (empty($module)) $module = 'initmodule'; -if (empty($tab)) $tab = 'description'; -if (empty($tabobj)) $tabobj = 'newobjectifnoobj'; +if (empty($module)) { + $module = 'initmodule'; +} +if (empty($tab)) { + $tab = 'description'; +} +if (empty($tabobj)) { + $tabobj = 'newobjectifnoobj'; +} $file = GETPOST('file', 'alpha'); $modulename = dol_sanitizeFileName(GETPOST('modulename', 'alpha')); $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); // Security check -if (empty($conf->modulebuilder->enabled)) accessforbidden(); -if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden($langs->trans('ModuleBuilderNotAllowed')); +if (empty($conf->modulebuilder->enabled)) { + accessforbidden(); +} +if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) { + accessforbidden($langs->trans('ModuleBuilderNotAllowed')); +} // Dir for custom dirs @@ -68,14 +80,12 @@ $dirread = $dirins; $forceddirread = 0; $tmpdir = explode('@', $module); -if (!empty($tmpdir[1])) -{ +if (!empty($tmpdir[1])) { $module = $tmpdir[0]; $dirread = $tmpdir[1]; $forceddirread = 1; } -if (GETPOST('dirins', 'alpha')) -{ +if (GETPOST('dirins', 'alpha')) { $dirread = $dirins = GETPOST('dirins', 'alpha'); $forceddirread = 1; } @@ -84,9 +94,10 @@ $FILEFLAG = 'modulebuilder.txt'; $now = dol_now(); $newmask = 0; -if (empty($newmask) && !empty($conf->global->MAIN_UMASK)) $newmask = $conf->global->MAIN_UMASK; -if (empty($newmask)) // This should no happen -{ +if (empty($newmask) && !empty($conf->global->MAIN_UMASK)) { + $newmask = $conf->global->MAIN_UMASK; +} +if (empty($newmask)) { // This should no happen $newmask = '0664'; } @@ -99,14 +110,15 @@ $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; } +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 = '<!-- Directory scanned -->'."\n"; $listofmodules = array(); $i = 0; -foreach ($dirsrootforscan as $dirread) -{ +foreach ($dirsrootforscan as $dirread) { $moduletype = 'external'; if ($dirread == DOL_DOCUMENT_ROOT) { $moduletype = 'internal'; @@ -116,14 +128,12 @@ foreach ($dirsrootforscan as $dirread) if (is_array($dirsincustom) && count($dirsincustom) > 0) { foreach ($dirsincustom as $dircustomcursor) { $fullname = $dircustomcursor['fullname']; - if (dol_is_file($fullname.'/'.$FILEFLAG)) - { + 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. - { + 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$'); } @@ -138,8 +148,7 @@ foreach ($dirsrootforscan as $dirread) $moduledescriptorfullpath = $descriptorcursor['fullname']; //var_dump($descriptorcursor); } - if ($modulenamewithcase) - { + if ($modulenamewithcase) { $listofmodules[$dircustomcursor['name']] = array( 'modulenamewithcase'=>$modulenamewithcase, 'moduledescriptorrelpath'=> $moduledescriptorrelpath, @@ -153,8 +162,7 @@ foreach ($dirsrootforscan as $dirread) } } - if ($forceddirread && empty($listofmodules)) // $forceddirread is 1 if we forced dir to read with dirins=... or with module=...@mydir - { + 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', @@ -165,15 +173,24 @@ foreach ($dirsrootforscan as $dirread) // Show description of content $newdircustom = $dirins; - if (empty($newdircustom)) $newdircustom = img_warning(); + 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 .= ', '; + if (empty($i)) { + $textforlistofdirs .= $langs->trans("DirScanned").' : '; + } else { + $textforlistofdirs .= ', '; + } $textforlistofdirs .= '<strong class="wordbreakimp">'.$dirread.'</strong>'; 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")); + 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++; } @@ -183,18 +200,15 @@ foreach ($dirsrootforscan as $dirread) * Actions */ -if ($dirins && $action == 'initmodule' && $modulename) -{ +if ($dirins && $action == 'initmodule' && $modulename) { $modulename = ucfirst($modulename); // Force first letter in uppercase - if (preg_match('/[^a-z0-9_]/i', $modulename)) - { + if (preg_match('/[^a-z0-9_]/i', $modulename)) { $error++; setEventMessages($langs->trans("SpaceOrSpecialCharAreNotAllowed"), null, 'errors'); } - if (!$error) - { + if (!$error) { $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $destdir = $dirins.'/'.strtolower($modulename); @@ -205,10 +219,8 @@ if ($dirins && $action == 'initmodule' && $modulename) $result = dolCopyDir($srcdir, $destdir, 0, 0, $arrayreplacement); //dol_mkdir($destfile); - if ($result <= 0) - { - if ($result < 0) - { + if ($result <= 0) { + if ($result < 0) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCopyDir", $srcdir, $destdir), null, 'errors'); @@ -218,8 +230,7 @@ if ($dirins && $action == 'initmodule' && $modulename) } } - if (!empty($conf->global->MODULEBUILDER_USE_ABOUT)) - { + if (!empty($conf->global->MODULEBUILDER_USE_ABOUT)) { dol_delete_file($destdir.'/admin/about.php'); } @@ -230,7 +241,7 @@ if ($dirins && $action == 'initmodule' && $modulename) dol_delete_dir_recursive($destdir.'/core/tpl'); dol_delete_dir_recursive($destdir.'/core/triggers'); dol_delete_dir_recursive($destdir.'/doc'); - dol_delete_dir_recursive($destdir.'/.tx'); + //dol_delete_dir_recursive($destdir.'/.tx'); dol_delete_dir_recursive($destdir.'/core/boxes'); dol_delete_file($destdir.'/admin/myobject_extrafields.php'); @@ -274,11 +285,9 @@ if ($dirins && $action == 'initmodule' && $modulename) } // Edit PHP files - if (!$error) - { + if (!$error) { $listofphpfilestoedit = dol_dir_list($destdir, 'files', 1, '\.(php|MD|js|sql|txt|xml|lang)$', '', 'fullname', SORT_ASC, 0, 1); - foreach ($listofphpfilestoedit as $phpfileval) - { + foreach ($listofphpfilestoedit as $phpfileval) { //var_dump($phpfileval['fullname']); $arrayreplacement = array( 'mymodule'=>strtolower($modulename), @@ -293,39 +302,47 @@ if ($dirins && $action == 'initmodule' && $modulename) ); if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME)) $arrayreplacement['Editor name'] = $conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME; - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_URL)) $arrayreplacement['https://www.example.com'] = $conf->global->MODULEBUILDER_SPECIFIC_EDITOR_URL; - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_AUTHOR)) $arrayreplacement['---Put here your own copyright and developer email---'] = dol_print_date($now, '%Y').' '.$conf->global->MODULEBUILDER_SPECIFIC_AUTHOR; - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_VERSION)) $arrayreplacement['1.0'] = $conf->global->MODULEBUILDER_SPECIFIC_VERSION; - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_FAMILY)) $arrayreplacement['other'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME)) { + $arrayreplacement['Editor name'] = $conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME; + } + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_URL)) { + $arrayreplacement['https://www.example.com'] = $conf->global->MODULEBUILDER_SPECIFIC_EDITOR_URL; + } + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_AUTHOR)) { + $arrayreplacement['---Put here your own copyright and developer email---'] = dol_print_date($now, '%Y').' '.$conf->global->MODULEBUILDER_SPECIFIC_AUTHOR; + } + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_VERSION)) { + $arrayreplacement['1.0'] = $conf->global->MODULEBUILDER_SPECIFIC_VERSION; + } + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_FAMILY)) { + $arrayreplacement['other'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; + } } $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); //var_dump($result); - if ($result < 0) - { + if ($result < 0) { setEventMessages($langs->trans("ErrorFailToMakeReplacementInto", $phpfileval['fullname']), null, 'errors'); } } - if (!empty($conf->global->MODULEBUILDER_SPECIFIC_README)) - { + if (!empty($conf->global->MODULEBUILDER_SPECIFIC_README)) { setEventMessages($langs->trans("ContentOfREADMECustomized"), null, 'warnings'); dol_delete_file($destdir.'/README.md'); file_put_contents($destdir.'/README.md', $conf->global->MODULEBUILDER_SPECIFIC_README); } } - if (!$error) - { + if (!$error) { setEventMessages('ModuleInitialized', null); $module = $modulename; $modulename = ''; } } -if ($dirins && $action == 'initapi' && !empty($module)) -{ + +// init API +if ($dirins && $action == 'initapi' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -336,8 +353,7 @@ if ($dirins && $action == 'initapi' && !empty($module)) //var_dump($srcfile);var_dump($destfile); $result = dol_copy($srcfile, $destfile, 0, 0); - if ($result > 0) - { + if ($result > 0) { //var_dump($phpfileval['fullname']); $arrayreplacement = array( 'mymodule'=>strtolower($modulename), @@ -360,8 +376,10 @@ if ($dirins && $action == 'initapi' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initphpunit' && !empty($module)) -{ + + +// init PHPUnit +if ($dirins && $action == 'initphpunit' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -371,8 +389,7 @@ if ($dirins && $action == 'initphpunit' && !empty($module)) $destfile = $dirins.'/'.strtolower($module).'/test/phpunit/'.strtolower($objectname).'Test.php'; $result = dol_copy($srcfile, $destfile, 0, 0); - if ($result > 0) - { + if ($result > 0) { //var_dump($phpfileval['fullname']); $arrayreplacement = array( 'mymodule'=>strtolower($modulename), @@ -395,6 +412,9 @@ if ($dirins && $action == 'initphpunit' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } + + +// init ExtraFields if ($dirins && $action == 'initsqlextrafields' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -410,8 +430,7 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) { //var_dump($srcfile);var_dump($destfile); $result2 = dol_copy($srcfile2, $destfile2, 0, 0); - if ($result1 > 0 && $result2 > 0) - { + if ($result1 > 0 && $result2 > 0) { $modulename = ucfirst($module); // Force first letter in uppercase //var_dump($phpfileval['fullname']); @@ -439,8 +458,10 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) { } // TODO Enable in class the property $isextrafieldmanaged = 1 } -if ($dirins && $action == 'inithook' && !empty($module)) -{ + + +// init Hook +if ($dirins && $action == 'inithook' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/class'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/class/actions_mymodule.class.php'; @@ -448,8 +469,7 @@ if ($dirins && $action == 'inithook' && !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']); @@ -471,8 +491,10 @@ if ($dirins && $action == 'inithook' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'inittrigger' && !empty($module)) -{ + + +// init Trigger +if ($dirins && $action == 'inittrigger' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/core/triggers'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php'; @@ -480,8 +502,7 @@ if ($dirins && $action == 'inittrigger' && !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']); @@ -503,8 +524,10 @@ if ($dirins && $action == 'inittrigger' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initwidget' && !empty($module)) -{ + + +// init Widget +if ($dirins && $action == 'initwidget' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/core/boxes'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/core/boxes/mymodulewidget1.php'; @@ -534,8 +557,10 @@ if ($dirins && $action == 'initwidget' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initcss' && !empty($module)) -{ + + +// init CSS +if ($dirins && $action == 'initcss' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/css'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/css/mymodule.css.php'; @@ -543,8 +568,7 @@ if ($dirins && $action == 'initcss' && !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']); @@ -572,8 +596,9 @@ if ($dirins && $action == 'initcss' && !empty($module)) } } -if ($dirins && $action == 'initjs' && !empty($module)) -{ + +// init JS +if ($dirins && $action == 'initjs' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/js'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/js/mymodule.js.php'; @@ -581,8 +606,7 @@ if ($dirins && $action == 'initjs' && !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']); @@ -609,8 +633,10 @@ if ($dirins && $action == 'initjs' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initcli' && !empty($module)) -{ + + +// init CLI +if ($dirins && $action == 'initcli' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/scripts'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/scripts/mymodule.php'; @@ -618,8 +644,7 @@ if ($dirins && $action == 'initcli' && !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']); @@ -646,6 +671,9 @@ if ($dirins && $action == 'initcli' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } + + +// init Doc if ($dirins && $action == 'initdoc' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/doc'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; @@ -694,19 +722,20 @@ if ($dirins && $action == 'initdoc' && !empty($module)) { } } -if ($dirins && $action == 'addlanguage' && !empty($module)) -{ + +// add Language +if ($dirins && $action == 'addlanguage' && !empty($module)) { $newlangcode = GETPOST('newlangcode', 'aZ09'); $srcfile = $dirins.'/'.strtolower($module).'/langs/en_US'; $destfile = $dirins.'/'.strtolower($module).'/langs/'.$newlangcode; $result = dolCopyDir($srcfile, $destfile, 0, 0); } -if ($dirins && $action == 'confirm_removefile' && !empty($module)) -{ + +// remove/delete File +if ($dirins && $action == 'confirm_removefile' && !empty($module)) { $relativefilename = dol_sanitizePathName(GETPOST('file', 'none')); - if ($relativefilename) - { + if ($relativefilename) { $dirnametodelete = dirname($relativefilename); $filetodelete = $dirins.'/'.$relativefilename; $dirtodelete = $dirins.'/'.$dirnametodelete; @@ -715,11 +744,12 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module)) if (!$result) { setEventMessages($langs->trans("ErrorFailToDeleteFile", basename($filetodelete)), null, 'errors'); } else { - if (dol_is_dir_empty($dirtodelete)) dol_delete_dir($dirtodelete); + if (dol_is_dir_empty($dirtodelete)) { + dol_delete_dir($dirtodelete); + } // Update descriptor file to comment file - if (in_array($tab, array('css', 'js'))) - { + if (in_array($tab, array('css', 'js'))) { $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php'; $arrayreplacement = array('/^\s*\''.preg_quote('/'.$relativefilename, '/').'\',*/m'=>' // \'/'.$relativefilename.'\','); dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1); @@ -728,13 +758,12 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module)) } } + // Build the $fields array from SQL table (initfromtablename) -if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', 'alpha')) -{ +if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', 'alpha')) { $tablename = GETPOST('initfromtablename', 'alpha'); $_results = $db->DDLDescTable($tablename); - if (empty($_results)) - { + if (empty($_results)) { setEventMessages($langs->trans("ErrorTableNotFound", $tablename), null, 'errors'); } else { /** @@ -750,7 +779,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', * 'position' is the sort order of field. * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). - * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' * 'help' is a string visible as a tooltip on field * 'comment' is not used. You can store here any text of your choice. It is not used by application. * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record @@ -780,66 +809,133 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $string = 'public $fields=array('."\n"; $string .= "<br>"; $i = 10; - while ($obj = $db->fetch_object($_results)) - { + while ($obj = $db->fetch_object($_results)) { // fieldname $fieldname = $obj->Field; // type $type = $obj->Type; - 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'; - if ($obj->Field == 'fk_warehouse') $type = 'integer:Entrepot:product/stock/class/entrepot.class.php'; - if (preg_match('/^(fk_user|fk_commercial)/', $obj->Field)) $type = 'integer:User:user/class/user.class.php'; + 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'; + } + if ($obj->Field == 'fk_warehouse') { + $type = 'integer:Entrepot:product/stock/class/entrepot.class.php'; + } + if (preg_match('/^(fk_user|fk_commercial)/', $obj->Field)) { + $type = 'integer:User:user/class/user.class.php'; + } // notnull $notnull = ($obj->Null == 'YES' ? 0 : 1); - if ($fieldname == 'fk_user_modif') $notnull = -1; + if ($fieldname == 'fk_user_modif') { + $notnull = -1; + } // label $label = preg_replace('/_/', '', ucfirst($fieldname)); - if ($fieldname == 'rowid') $label = 'TechnicalID'; - if ($fieldname == 'import_key') $label = 'ImportId'; - if ($fieldname == 'fk_soc') $label = 'ThirdParty'; - if ($fieldname == 'tms') $label = 'DateModification'; - if ($fieldname == 'datec') $label = 'DateCreation'; - if ($fieldname == 'date_valid') $label = 'DateValidation'; - if ($fieldname == 'datev') $label = 'DateValidation'; - if ($fieldname == 'note_private') $label = 'NotePublic'; - if ($fieldname == 'note_public') $label = 'NotePrivate'; - if ($fieldname == 'fk_user_creat') $label = 'UserAuthor'; - if ($fieldname == 'fk_user_modif') $label = 'UserModif'; - if ($fieldname == 'fk_user_valid') $label = 'UserValidation'; + if ($fieldname == 'rowid') { + $label = 'TechnicalID'; + } + if ($fieldname == 'import_key') { + $label = 'ImportId'; + } + if ($fieldname == 'fk_soc') { + $label = 'ThirdParty'; + } + if ($fieldname == 'tms') { + $label = 'DateModification'; + } + if ($fieldname == 'datec') { + $label = 'DateCreation'; + } + if ($fieldname == 'date_valid') { + $label = 'DateValidation'; + } + if ($fieldname == 'datev') { + $label = 'DateValidation'; + } + if ($fieldname == 'note_private') { + $label = 'NotePublic'; + } + if ($fieldname == 'note_public') { + $label = 'NotePrivate'; + } + if ($fieldname == 'fk_user_creat') { + $label = 'UserAuthor'; + } + if ($fieldname == 'fk_user_modif') { + $label = 'UserModif'; + } + if ($fieldname == 'fk_user_valid') { + $label = 'UserValidation'; + } // visible $visible = -1; - if ($fieldname == 'entity') $visible = -2; - if ($fieldname == 'import_key') $visible = -2; - if ($fieldname == 'fk_user_creat') $visible = -2; - if ($fieldname == 'fk_user_modif') $visible = -2; - if (in_array($fieldname, array('ref_ext', 'model_pdf', 'note_public', 'note_private'))) $visible = 0; + if ($fieldname == 'entity') { + $visible = -2; + } + if ($fieldname == 'import_key') { + $visible = -2; + } + if ($fieldname == 'fk_user_creat') { + $visible = -2; + } + if ($fieldname == 'fk_user_modif') { + $visible = -2; + } + if (in_array($fieldname, array('ref_ext', 'model_pdf', 'note_public', 'note_private'))) { + $visible = 0; + } // enabled $enabled = 1; // default $default = ''; - if ($fieldname == 'entity') $default = 1; + if ($fieldname == 'entity') { + $default = 1; + } // position $position = $i; - if (in_array($fieldname, array('status', 'statut', 'fk_status', 'fk_statut'))) $position = 500; - if ($fieldname == 'import_key') $position = 900; + if (in_array($fieldname, array('status', 'statut', 'fk_status', 'fk_statut'))) { + $position = 500; + } + if ($fieldname == 'import_key') { + $position = 900; + } // index $index = 0; - if ($fieldname == 'entity') $index = 1; + if ($fieldname == 'entity') { + $index = 1; + } $string .= "'".$obj->Field."' =>array('type'=>'".$type."', 'label'=>'".$label."',"; - if ($default != '') $string .= " 'default'=>".$default.","; + if ($default != '') { + $string .= " 'default'=>".$default.","; + } $string .= " 'enabled'=>".$enabled.","; $string .= " 'visible'=>".$visible; - if ($notnull) $string .= ", 'notnull'=>".$notnull; - if ($fieldname == 'ref') $string .= ", 'showoncombobox'=>1"; + if ($notnull) { + $string .= ", 'notnull'=>".$notnull; + } + if ($fieldname == 'ref') { + $string .= ", 'showoncombobox'=>1"; + } $string .= ", 'position'=>".$position; - if ($index) $string .= ", 'index'=>".$index; + if ($index) { + $string .= ", 'index'=>".$index; + } $string .= "),\n"; $string .= "<br>"; $i += 5; @@ -851,15 +947,13 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', } } -if ($dirins && $action == 'initobject' && $module && $objectname) -{ +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)) - { + if (preg_match('/[^a-z0-9_]/i', $objectname)) { $error++; setEventMessages($langs->trans("SpaceOrSpecialCharAreNotAllowed"), null, 'errors'); $tabobj = 'newobject'; @@ -882,15 +976,12 @@ if ($dirins && $action == 'initobject' && $module && $objectname) dol_mkdir($destdir.'/sql'); // Scan dir class to find if an object with same name already exists. - if (!$error) - { + if (!$error) { $dirlist = dol_dir_list($destdir.'/class', 'files', 0, '\.txt$'); $alreadyfound = false; - foreach ($dirlist as $key => $val) - { + foreach ($dirlist as $key => $val) { $filefound = preg_replace('/\.txt$/', '', $val['name']); - if (strtolower($objectname) == strtolower($filefound) && $objectname != $filefound) - { + if (strtolower($objectname) == strtolower($filefound) && $objectname != $filefound) { $alreadyfound = true; $error++; setEventMessages($langs->trans("AnObjectAlreadyExistWithThisNameAndDiffCase"), null, 'errors'); @@ -899,8 +990,7 @@ if ($dirins && $action == 'initobject' && $module && $objectname) } } - if (!$error) - { + if (!$error) { // Copy some files $filetogenerate = array( 'myobject_card.php'=>strtolower($objectname).'_card.php', @@ -922,8 +1012,7 @@ if ($dirins && $action == 'initobject' && $module && $objectname) //'class/api_mymodule.class.php'=>'class/api_'.strtolower($module).'.class.php', ); - if (GETPOST('includerefgeneration', 'aZ09')) - { + if (GETPOST('includerefgeneration', 'aZ09')) { dol_mkdir($destdir.'/core/modules/'.strtolower($module)); $filetogenerate += array( @@ -932,8 +1021,7 @@ if ($dirins && $action == 'initobject' && $module && $objectname) 'core/modules/mymodule/modules_myobject.php'=>'core/modules/'.strtolower($module).'/modules_'.strtolower($objectname).'.php', ); } - if (GETPOST('includedocgeneration', 'aZ09')) - { + if (GETPOST('includedocgeneration', 'aZ09')) { dol_mkdir($destdir.'/core/modules/'.strtolower($module)); dol_mkdir($destdir.'/core/modules/'.strtolower($module).'/doc'); @@ -943,13 +1031,10 @@ if ($dirins && $action == 'initobject' && $module && $objectname) ); } - foreach ($filetogenerate as $srcfile => $destfile) - { + foreach ($filetogenerate as $srcfile => $destfile) { $result = dol_copy($srcdir.'/'.$srcfile, $destdir.'/'.$destfile, $newmask, 0); - if ($result <= 0) - { - if ($result < 0) - { + if ($result <= 0) { + if ($result < 0) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCopyFile", $srcdir.'/'.$srcfile, $destdir.'/'.$destfile), null, 'errors'); @@ -999,17 +1084,21 @@ if ($dirins && $action == 'initobject' && $module && $objectname) $listofobject = dol_dir_list($destdir.'/class', 'files', 0, '\.class\.php$'); $firstobjectname = ''; - foreach ($listofobject as $fileobj) - { - if (preg_match('/^api_/', $fileobj['name'])) continue; - if (preg_match('/^actions_/', $fileobj['name'])) continue; + foreach ($listofobject as $fileobj) { + if (preg_match('/^api_/', $fileobj['name'])) { + continue; + } + if (preg_match('/^actions_/', $fileobj['name'])) { + continue; + } $tmpcontent = file_get_contents($fileobj['fullname']); $reg = array(); - if (preg_match('/class\s+([^\s]*)\s+extends\s+CommonObject/ims', $tmpcontent, $reg)) - { + if (preg_match('/class\s+([^\s]*)\s+extends\s+CommonObject/ims', $tmpcontent, $reg)) { $objectnameloop = $reg[1]; - if (empty($firstobjectname)) $firstobjectname = $objectnameloop; + if (empty($firstobjectname)) { + $firstobjectname = $objectnameloop; + } } // Regenerate left menu entry in descriptor for $objectname @@ -1070,11 +1159,9 @@ if ($dirins && $action == 'initobject' && $module && $objectname) } } - if (!$error) - { + if (!$error) { // Edit PHP files to make replacement - foreach ($filetogenerate as $destfile) - { + foreach ($filetogenerate as $destfile) { $phpfileval['fullname'] = $destdir.'/'.$destfile; //var_dump($phpfileval['fullname']); @@ -1094,75 +1181,71 @@ if ($dirins && $action == 'initobject' && $module && $objectname) $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); //var_dump($result); - if ($result < 0) - { + if ($result < 0) { setEventMessages($langs->trans("ErrorFailToMakeReplacementInto", $phpfileval['fullname']), null, 'errors'); } } } - if (!$error) - { + if (!$error) { // Edit the class file to write properties $object = rebuildObjectClass($destdir, $module, $objectname, $newmask); - if (is_numeric($object) && $object < 0) $error++; + if (is_numeric($object) && $object < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Edit sql with new properties $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, '', $object); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans('FilesForObjectInitialized', $objectname), null); $tabobj = $objectname; } } -if ($dirins && ($action == 'droptable' || $action == 'droptableextrafields') && !empty($module) && !empty($tabobj)) -{ +if ($dirins && ($action == 'droptable' || $action == 'droptableextrafields') && !empty($module) && !empty($tabobj)) { $objectname = $tabobj; $arrayoftables = array(); - if ($action == 'droptable') $arrayoftables[] = MAIN_DB_PREFIX.strtolower($module).'_'.strtolower($tabobj); - if ($action == 'droptableextrafields') $arrayoftables[] = MAIN_DB_PREFIX.strtolower($module).'_'.strtolower($tabobj).'_extrafields'; + if ($action == 'droptable') { + $arrayoftables[] = MAIN_DB_PREFIX.strtolower($module).'_'.strtolower($tabobj); + } + if ($action == 'droptableextrafields') { + $arrayoftables[] = MAIN_DB_PREFIX.strtolower($module).'_'.strtolower($tabobj).'_extrafields'; + } - foreach ($arrayoftables as $tabletodrop) - { + foreach ($arrayoftables as $tabletodrop) { $nb = -1; $sql = "SELECT COUNT(*) as nb FROM ".$tabletodrop; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $nb = $obj->nb; } } else { - if ($db->lasterrno() == 'DB_ERROR_NOSUCHTABLE') - { + if ($db->lasterrno() == 'DB_ERROR_NOSUCHTABLE') { setEventMessages($langs->trans("TableDoesNotExists", $tabletodrop), null, 'warnings'); } else { dol_print_error($db); } } - if ($nb == 0) - { + if ($nb == 0) { $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'); } } } -if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) -{ +if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) && !empty($tabobj)) { $error = 0; $objectname = $tabobj; @@ -1175,36 +1258,31 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) dol_mkdir($destdir); // We click on add property - if (!GETPOST('regenerateclasssql') && !GETPOST('regeneratemissing')) - { - if (!GETPOST('propname', 'aZ09')) - { + if (!GETPOST('regenerateclasssql') && !GETPOST('regeneratemissing')) { + if (!GETPOST('propname', 'aZ09')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name")), null, 'errors'); } - if (!GETPOST('proplabel', 'alpha')) - { + if (!GETPOST('proplabel', 'alpha')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } - if (!GETPOST('proptype', 'alpha')) - { + if (!GETPOST('proptype', 'alpha')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); } - if (!$error) - { + if (!$error) { $addfieldentry = array( 'name'=>GETPOST('propname', 'aZ09'), 'label'=>GETPOST('proplabel', 'alpha'), 'type'=>GETPOST('proptype', 'alpha'), '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') + 'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha'), + 'css'=>GETPOST('propcss', 'aZ09'), 'cssview'=>GETPOST('propcssview', 'aZ09'), 'csslist'=>GETPOST('propcsslist', 'aZ09') ); - if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) - { + if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) { $addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true); } } @@ -1217,31 +1295,26 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) }*/ // Edit the class file to write properties - if (!$error) - { + if (!$error) { $moduletype = 'external'; $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, $addfieldentry, $moduletype); - if (is_numeric($object) && $object <= 0) - { + if (is_numeric($object) && $object <= 0) { $error++; } } // Edit sql with new properties - if (!$error) - { + if (!$error) { $moduletype = 'external'; $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object, $moduletype); - if ($result <= 0) - { + if ($result <= 0) { $error++; } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans('FilesForObjectUpdated', $objectname), null); clearstatcache(true); @@ -1253,30 +1326,33 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) } } -if ($dirins && $action == 'confirm_deleteproperty' && $propertykey) -{ +if ($dirins && $action == 'confirm_deleteproperty' && $propertykey) { $objectname = $tabobj; + $dirins = $dirread = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; + $moduletype = $listofmodules[strtolower($module)]['moduletype']; + $srcdir = $dirread.'/'.strtolower($module); $destdir = $dirins.'/'.strtolower($module); dol_mkdir($destdir); // Edit the class file to write properties - if (!$error) - { + if (!$error) { $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, array(), $propertykey); - if (is_numeric($object) && $object <= 0) $error++; + if (is_numeric($object) && $object <= 0) { + $error++; + } } // Edit sql with new properties - if (!$error) - { + if (!$error) { $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object); - if ($result <= 0) $error++; + if ($result <= 0) { + $error++; + } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans('FilesForObjectUpdated', $objectname), null); clearstatcache(true); @@ -1288,16 +1364,13 @@ if ($dirins && $action == 'confirm_deleteproperty' && $propertykey) } } -if ($dirins && $action == 'confirm_deletemodule') -{ - if (preg_match('/[^a-z0-9_]/i', $module)) - { +if ($dirins && $action == 'confirm_deletemodule') { + if (preg_match('/[^a-z0-9_]/i', $module)) { $error++; setEventMessages($langs->trans("SpaceOrSpecialCharAreNotAllowed"), null, 'errors'); } - if (!$error) - { + if (!$error) { $modulelowercase = strtolower($module); // Dir for module @@ -1305,8 +1378,7 @@ if ($dirins && $action == 'confirm_deletemodule') $result = dol_delete_dir_recursive($dir); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("DirWasRemoved", $modulelowercase), null); } else { setEventMessages($langs->trans("PurgeNothingToDelete"), null, 'warnings'); @@ -1317,16 +1389,13 @@ if ($dirins && $action == 'confirm_deletemodule') $module = 'deletemodule'; } -if ($dirins && $action == 'confirm_deleteobject' && $objectname) -{ - if (preg_match('/[^a-z0-9_]/i', $objectname)) - { +if ($dirins && $action == 'confirm_deleteobject' && $objectname) { + if (preg_match('/[^a-z0-9_]/i', $objectname)) { $error++; setEventMessages($langs->trans("SpaceOrSpecialCharAreNotAllowed"), null, 'errors'); } - if (!$error) - { + if (!$error) { $modulelowercase = strtolower($module); $objectlowercase = strtolower($objectname); @@ -1360,15 +1429,15 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) ); $resultko = 0; - foreach ($filetodelete as $filetodelete) - { + foreach ($filetodelete as $filetodelete) { $resulttmp = dol_delete_file($dir.'/'.$filetodelete, 0, 0, 1); $resulttmp = dol_delete_file($dir.'/'.$filetodelete.'.back', 0, 0, 1); - if (!$resulttmp) $resultko++; + if (!$resulttmp) { + $resultko++; + } } - if ($resultko == 0) - { + if ($resultko == 0) { setEventMessages($langs->trans("FilesDeleted"), null); } else { setEventMessages($langs->trans("ErrorSomeFilesCouldNotBeDeleted"), null, 'warnings'); @@ -1380,8 +1449,7 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) } -if ($dirins && $action == 'generatepackage') -{ +if ($dirins && $action == 'generatepackage') { $modulelowercase = strtolower($module); // Dir for module @@ -1393,12 +1461,10 @@ if ($dirins && $action == 'generatepackage') dol_include_once($modulelowercase.'/core/modules/mod'.$module.'.class.php'); $class = 'mod'.$module; - if (class_exists($class)) - { + if (class_exists($class)) { try { $moduleobj = new $class($db); - } catch (Exception $e) - { + } catch (Exception $e) { $error++; dol_print_error($e->getMessage()); } @@ -1410,22 +1476,21 @@ if ($dirins && $action == 'generatepackage') } $arrayversion = explode('.', $moduleobj->version, 3); - if (count($arrayversion)) - { + if (count($arrayversion)) { $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2] ? ".".$arrayversion[2] : "").".zip"; $dirofmodule = dol_buildpath($modulelowercase, 0).'/bin'; $outputfilezip = $dirofmodule.'/'.$FILENAMEZIP; - if ($dirofmodule) - { - if (!dol_is_dir($dirofmodule)) dol_mkdir($dirofmodule); + if ($dirofmodule) { + if (!dol_is_dir($dirofmodule)) { + dol_mkdir($dirofmodule); + } $result = dol_compress_dir($dir, $outputfilezip, 'zip', '', $modulelowercase); } else { $result = -1; } - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("ZipFileGeneratedInto", $outputfilezip), null); } else { $error++; @@ -1439,16 +1504,14 @@ if ($dirins && $action == 'generatepackage') } } -if ($dirins && $action == 'generatedoc') -{ +if ($dirins && $action == 'generatedoc') { $FILENAMEDOC = strtolower($module).'.html'; $dirofmodule = dol_buildpath(strtolower($module), 0).'/doc'; $util = new Utils($db); $result = $util->generateDoc($module); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("DocFileGeneratedInto", $dirofmodule), null); } else { setEventMessages($util->error, $util->errors, 'errors'); @@ -1457,39 +1520,42 @@ if ($dirins && $action == 'generatedoc') // Save file -if ($action == 'savefile' && empty($cancel)) -{ +if ($action == 'savefile' && empty($cancel)) { $relofcustom = basename($dirins); - if ($relofcustom) - { + if ($relofcustom) { // Check that relative path ($file) start with name 'custom' - if (!preg_match('/^'.$relofcustom.'/', $file)) $file = $relofcustom.'/'.$file; + if (!preg_match('/^'.$relofcustom.'/', $file)) { + $file = $relofcustom.'/'.$file; + } $pathoffile = dol_buildpath($file, 0); $pathoffilebackup = dol_buildpath($file.'.back', 0); // Save old version - if (dol_is_file($pathoffile)) - { + if (dol_is_file($pathoffile)) { dol_copy($pathoffile, $pathoffilebackup, 0, 1); } $check = 'restricthtml'; $srclang = dol_mimetype($pathoffile, '', 3); - if ($srclang == 'md') $check = 'restricthtml'; - if ($srclang == 'lang') $check = 'restricthtml'; - if ($srclang == 'php') $check = 'none'; + 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) - { + if ($content) { dol_delete_file($pathoffile); $result = file_put_contents($pathoffile, $content); - if ($result) - { + if ($result) { @chmod($pathoffile, octdec($newmask)); setEventMessages($langs->trans("FileSaved"), null); @@ -1505,32 +1571,37 @@ if ($action == 'savefile' && empty($cancel)) } // Enable module -if ($action == 'set' && $user->admin) -{ +if ($action == 'set' && $user->admin) { $param = ''; - if ($module) $param .= '&module='.urlencode($module); - if ($tab) $param .= '&tab='.urlencode($tab); - if ($tabobj) $param .= '&tabobj='.urlencode($tabobj); + if ($module) { + $param .= '&module='.urlencode($module); + } + if ($tab) { + $param .= '&tab='.urlencode($tab); + } + if ($tabobj) { + $param .= '&tabobj='.urlencode($tabobj); + } $value = GETPOST('value', 'alpha'); $resarray = activateModule($value); - if (!empty($resarray['errors'])) setEventMessages('', $resarray['errors'], 'errors'); - else { + if (!empty($resarray['errors'])) { + setEventMessages('', $resarray['errors'], 'errors'); + } else { //var_dump($resarray);exit; - if ($resarray['nbperms'] > 0) - { + if ($resarray['nbperms'] > 0) { $tmpsql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."user WHERE admin <> 1"; $resqltmp = $db->query($tmpsql); - if ($resqltmp) - { + if ($resqltmp) { $obj = $db->fetch_object($resqltmp); //var_dump($obj->nb);exit; - if ($obj && $obj->nb > 1) - { + if ($obj && $obj->nb > 1) { $msg = $langs->trans('ModuleEnabledAdminMustCheckRights'); setEventMessages($msg, null, 'warnings'); } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } } header("Location: ".$_SERVER["PHP_SELF"]."?".$param); @@ -1538,16 +1609,23 @@ if ($action == 'set' && $user->admin) } // Disable module -if ($action == 'reset' && $user->admin) -{ +if ($action == 'reset' && $user->admin) { $param = ''; - if ($module) $param .= '&module='.urlencode($module); - if ($tab) $param .= '&tab='.urlencode($tab); - if ($tabobj) $param .= '&tabobj='.urlencode($tabobj); + if ($module) { + $param .= '&module='.urlencode($module); + } + if ($tab) { + $param .= '&tab='.urlencode($tab); + } + if ($tabobj) { + $param .= '&tabobj='.urlencode($tabobj); + } $value = GETPOST('value', 'alpha'); $result = unActivateModule($value); - if ($result) setEventMessages($result, null, 'errors'); + if ($result) { + setEventMessages($result, null, 'errors'); + } header("Location: ".$_SERVER["PHP_SELF"]."?".$param); exit; } @@ -1562,19 +1640,21 @@ $form = new Form($db); $formadmin = new FormAdmin($db); // Set dir where external modules are installed -if (!dol_is_dir($dirins)) -{ +if (!dol_is_dir($dirins)) { dol_mkdir($dirins); } $dirins_ok = (dol_is_dir($dirins)); -llxHeader('', $langs->trans("ModuleBuilder"), '', '', 0, 0, - array( +$help_url = ''; +$morejs = array( '/includes/ace/src/ace.js', '/includes/ace/src/ext-statusbar.js', '/includes/ace/src/ext-language_tools.js', //'/includes/ace/src/ext-chromevox.js' - ), array(), '', 'classforhorizontalscrolloftabs'); +); +$morecss = array(); + +llxHeader('', $langs->trans("ModuleBuilder"), $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); $text = $langs->trans("ModuleBuilder"); @@ -1589,15 +1669,12 @@ print '<br>'; $message = ''; -if (!$dirins) -{ +if (!$dirins) { $message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT)); $allowfromweb = -1; } else { - if ($dirins_ok) - { - if (!is_writable(dol_osencode($dirins))) - { + if ($dirins_ok) { + if (!is_writable(dol_osencode($dirins))) { $langs->load("errors"); $message = info_admin($langs->trans("ErrorFailedToWriteInDir", $dirins)); $allowfromweb = 0; @@ -1607,8 +1684,7 @@ if (!$dirins) $allowfromweb = 0; } } -if ($message) -{ +if ($message) { print $message; } @@ -1621,8 +1697,7 @@ $error = 0; $moduleobj = null; -if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') -{ +if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') { $modulelowercase = strtolower($module); $loadclasserrormessage = ''; @@ -1640,8 +1715,7 @@ if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') $loadclasserrormessage .= 'Line: '.$e->getLine()."<br>\n"; } - if (class_exists($class)) - { + if (class_exists($class)) { try { $moduleobj = new $class($db); } catch (Exception $e) { @@ -1649,7 +1723,9 @@ if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') print $e->getMessage(); } } else { - if (empty($forceddirread)) $error++; + if (empty($forceddirread)) { + $error++; + } $langs->load("errors"); print img_warning('').' '.$langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module).'<br>'; print $loadclasserrormessage; @@ -1669,78 +1745,77 @@ $head[$h][2] = 'initmodule'; $h++; $linktoenabledisable = ''; -$modulestatusinfo = ''; if (is_array($listofmodules) && count($listofmodules) > 0) { - // Define $linktoenabledisable and $modulestatusinfo + // Define $linktoenabledisable $modulelowercase = strtolower($module); $const_name = 'MAIN_MODULE_'.strtoupper($module); $param = ''; - if ($tab) $param .= '&tab='.urlencode($tab); - if ($module) $param .= '&module='.urlencode($module); - if ($tabobj) $param .= '&tabobj='.urlencode($tabobj); + if ($tab) { + $param .= '&tab='.urlencode($tab); + } + if ($module) { + $param .= '&module='.urlencode($module); + } + if ($tabobj) { + $param .= '&tabobj='.urlencode($tabobj); + } $urltomodulesetup = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?search_keyword='.urlencode($module).'">'.$langs->trans('Home').'-'.$langs->trans("Setup").'-'.$langs->trans("Modules").'</a>'; - if (!empty($conf->global->$const_name)) // If module is already activated - { + if (!empty($conf->global->$const_name)) { // If module is already activated $linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=reset&value=mod'.$module.$param.'">'; $linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1); $linktoenabledisable .= '</a>'; + $linktoenabledisable .= $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning'); + $objMod = $moduleobj; $backtourlparam = ''; $backtourlparam .= ($backtourlparam ? '&' : '?').'module='.$module; // No urlencode here, done later - if ($tab) $backtourlparam .= ($backtourlparam ? '&' : '?').'tab='.$tab; // No urlencode here, done later + if ($tab) { + $backtourlparam .= ($backtourlparam ? '&' : '?').'tab='.$tab; // No urlencode here, done later + } $backtourl = $_SERVER["PHP_SELF"].$backtourlparam; $regs = array(); - if (is_array($objMod->config_page_url)) - { + if (is_array($objMod->config_page_url)) { $i = 0; - foreach ($objMod->config_page_url as $page) - { + foreach ($objMod->config_page_url as $page) { $urlpage = $page; - if ($i++) - { + if ($i++) { $linktoenabledisable .= ' <a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>'; // print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;'; } else { - if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) - { + if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) { $urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1); - $linktoenabledisable .= ' &nbsp; <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>'; + $linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>'; } else { - $urltouse = $urlpage; - $linktoenabledisable .= ' &nbsp; <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>'; + // Case standard admin page (not a page provided by the + // module but a page provided by dolibarr) + $urltouse = DOL_URL_ROOT.'/admin/'.$urlpage; + $linktoenabledisable .= ' <a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>'; } } } } elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) { - $linktoenabledisable .= ' &nbsp; <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>'; + $linktoenabledisable .= ' &nbsp; <a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 8px"').'</a>'; } } else { $linktoenabledisable .= '<a class="reposition asetresetmodule valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&token='.newToken().'&value=mod'.$module.$param.'">'; - $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', '', false, 0, 0, '', 'classfortooltip', 1); + $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1); $linktoenabledisable .= "</a>\n"; } - if (!empty($conf->$modulelowercase->enabled)) - { - $modulestatusinfo = $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning'); - } - // Loop to show tab of each module - foreach ($listofmodules as $tmpmodule => $tmpmodulearray) - { + foreach ($listofmodules as $tmpmodule => $tmpmodulearray) { $head[$h][0] = $_SERVER["PHP_SELF"].'?module='.$tmpmodulearray['modulenamewithcase'].($forceddirread ? '@'.$dirread : ''); $head[$h][1] = $tmpmodulearray['modulenamewithcase']; $head[$h][2] = $tmpmodulearray['modulenamewithcase']; - /*if ($tmpmodule == $modulelowercase) { - $head[$h][1] .= ' '.$modulestatusinfo; - $head[$h][1] .= ' '.$linktoenabledisable; - }*/ + if ($tmpmodulearray['modulenamewithcase'] == $module) { + $head[$h][4] = '<span class="inline-block">'.$linktoenabledisable.'</span>'; + } $h++; } @@ -1751,10 +1826,10 @@ $head[$h][1] = $langs->trans("DangerZone"); $head[$h][2] = 'deletemodule'; $h++; + print dol_get_fiche_head($head, $module, '', -1, '', 0, $infomodulesfound, '', 8); // Modules -if ($module == 'initmodule') -{ +if ($module == 'initmodule') { // New module print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -1783,8 +1858,7 @@ if ($module == 'initmodule') print '</form>'; } elseif (!empty($module)) { // Tabs for module - if (!$error) - { + if (!$error) { $dirread = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; $head2 = array(); @@ -1835,6 +1909,11 @@ if ($module == 'initmodule') $head2[$h][2] = 'widgets'; $h++; + $head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=exportimport&module='.$module.($forceddirread ? '@'.$dirread : ''); + $head2[$h][1] = $langs->trans("Export").'-'.$langs->trans("Import"); + $head2[$h][2] = 'exportimport'; + $h++; + $head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=css&module='.$module.($forceddirread ? '@'.$dirread : ''); $head2[$h][1] = $langs->trans("CSS"); $head2[$h][2] = 'css'; @@ -1865,28 +1944,21 @@ if ($module == 'initmodule') $head2[$h][2] = 'buildpackage'; $h++; - // Link to enable / disable - print '<div class="center">'.$modulestatusinfo; - print ' '.$linktoenabledisable.'</div>'; - - print '<br>'; + print '<!-- Section for a given module -->'; // Note module is inside $dirread - if ($tab == 'description') - { + if ($tab == 'description') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $pathtofilereadme = $modulelowercase.'/README.md'; $pathtochangelog = $modulelowercase.'/ChangeLog.md'; - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Description - level 2 print '<span class="opacitymedium">'.$langs->trans("ModuleBuilderDesc".$tab).'</span>'; $infoonmodulepath = ''; - if (realpath($dirread.'/'.$modulelowercase) != $dirread.'/'.$modulelowercase) - { + if (realpath($dirread.'/'.$modulelowercase) != $dirread.'/'.$modulelowercase) { $infoonmodulepath = '<span class="opacitymedium">'.$langs->trans("RealPathOfModule").' :</span> <strong>'.realpath($dirread.'/'.$modulelowercase).'</strong><br>'; print ' '.$infoonmodulepath; } @@ -1912,8 +1984,7 @@ if ($module == 'initmodule') print load_fiche_titre($langs->trans("DescriptorFile"), '', ''); - if (!empty($moduleobj)) - { + if (!empty($moduleobj)) { print '<div class="underbanner clearboth"></div>'; print '<div class="fichecenter">'; @@ -1974,16 +2045,18 @@ if ($module == 'initmodule') print $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module).'<br>'; } - if (!empty($moduleobj)) - { + if (!empty($moduleobj)) { print '<br><br>'; // Readme file print load_fiche_titre($langs->trans("ReadmeFile"), '', ''); print '<!-- readme file -->'; - if (dol_is_file($dirread.'/'.$pathtofilereadme)) print '<div class="underbanner clearboth"></div><div class="fichecenter">'.$moduleobj->getDescLong().'</div>'; - else print '<span class="opacitymedium">'.$langs->trans("ErrorFileNotFound", $pathtofilereadme).'</span>'; + if (dol_is_file($dirread.'/'.$pathtofilereadme)) { + print '<div class="underbanner clearboth"></div><div class="fichecenter">'.$moduleobj->getDescLong().'</div>'; + } else { + print '<span class="opacitymedium">'.$langs->trans("ErrorFileNotFound", $pathtofilereadme).'</span>'; + } print '<br><br>'; @@ -1991,16 +2064,18 @@ if ($module == 'initmodule') print load_fiche_titre($langs->trans("ChangeLog"), '', ''); print '<!-- changelog file -->'; - if (dol_is_file($dirread.'/'.$pathtochangelog)) print '<div class="underbanner clearboth"></div><div class="fichecenter">'.$moduleobj->getChangeLog().'</div>'; - else print '<span class="opacitymedium">'.$langs->trans("ErrorFileNotFound", $pathtochangelog).'</span>'; + if (dol_is_file($dirread.'/'.$pathtochangelog)) { + print '<div class="underbanner clearboth"></div><div class="fichecenter">'.$moduleobj->getChangeLog().'</div>'; + } else { + print '<span class="opacitymedium">'.$langs->trans("ErrorFileNotFound", $pathtochangelog).'</span>'; + } } print dol_get_fiche_end(); } else { // Edit text file $fullpathoffile = dol_buildpath($file, 0, 1); // Description - level 2 - if ($fullpathoffile) - { + if ($fullpathoffile) { $content = file_get_contents($fullpathoffile); } @@ -2031,10 +2106,8 @@ if ($module == 'initmodule') print dol_get_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Level 2 } - if ($tab == 'languages') - { - if ($action != 'editfile' || empty($file)) - { + if ($tab == 'languages') { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("LanguageDefDesc").'</span><br>'; print '<br>'; @@ -2055,8 +2128,7 @@ if ($module == 'initmodule') $langfiles = dol_dir_list(dol_buildpath($modulelowercase.'/langs', 0), 'files', 1, '\.lang$'); print '<table class="none">'; - foreach ($langfiles as $langfile) - { + foreach ($langfiles as $langfile) { $pathtofile = $modulelowercase.'/langs/'.$langfile['relativename']; print '<tr><td><span class="fa fa-file-o"></span> '.$langs->trans("LanguageFile").' '.basename(dirname($pathtofile)).' : <strong>'.$pathtofile.'</strong>'; print '</td><td><a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=txt&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; @@ -2094,14 +2166,12 @@ if ($module == 'initmodule') } } - if ($tab == 'dictionaries') - { + if ($tab == 'dictionaries') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $dicts = $moduleobj->dictionaries; - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'; $htmlhelp = $langs->trans("DictionariesDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans('Setup').' - '.$langs->trans('Dictionaries').'</a>'); print $form->textwithpicto($langs->trans("DictionariesDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>'; @@ -2142,12 +2212,10 @@ if ($module == 'initmodule') print_liste_field_titre("Condition", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print "</tr>\n"; - if (is_array($dicts) && is_array($dicts['tabname'])) - { + if (is_array($dicts) && is_array($dicts['tabname'])) { $i = 0; $maxi = count($dicts['tabname']); - while ($i < $maxi) - { + while ($i < $maxi) { print '<tr class="oddeven">'; print '<td>'; @@ -2227,8 +2295,7 @@ if ($module == 'initmodule') } } - if ($tab == 'objects') - { + if ($tab == 'objects') { $head3 = array(); $h = 0; @@ -2244,17 +2311,21 @@ if ($module == 'initmodule') $listofobject = dol_dir_list($dir, 'files', 0, '\.class\.php$'); $firstobjectname = ''; - foreach ($listofobject as $fileobj) - { - if (preg_match('/^api_/', $fileobj['name'])) continue; - if (preg_match('/^actions_/', $fileobj['name'])) continue; + foreach ($listofobject as $fileobj) { + if (preg_match('/^api_/', $fileobj['name'])) { + continue; + } + if (preg_match('/^actions_/', $fileobj['name'])) { + continue; + } $tmpcontent = file_get_contents($fileobj['fullname']); - if (preg_match('/class\s+([^\s]*)\s+extends\s+CommonObject/ims', $tmpcontent, $reg)) - { + if (preg_match('/class\s+([^\s]*)\s+extends\s+CommonObject/ims', $tmpcontent, $reg)) { //$objectname = preg_replace('/\.txt$/', '', $fileobj['name']); $objectname = $reg[1]; - if (empty($firstobjectname)) $firstobjectname = $objectname; + if (empty($firstobjectname)) { + $firstobjectname = $objectname; + } $head3[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module.($forceddirread ? '@'.$dirread : '').'&tabobj='.$objectname; $head3[$h][1] = $objectname; @@ -2269,16 +2340,17 @@ if ($module == 'initmodule') $h++; // If tabobj was not defined, then we check if there is one obj. If yes, we force on it, if no, we will show tab to create new objects. - if ($tabobj == 'newobjectifnoobj') - { - if ($firstobjectname) $tabobj = $firstobjectname; - else $tabobj = 'newobject'; + if ($tabobj == 'newobjectifnoobj') { + if ($firstobjectname) { + $tabobj = $firstobjectname; + } else { + $tabobj = 'newobject'; + } } print dol_get_fiche_head($head3, $tabobj, '', -1, ''); // Level 3 - if ($tabobj == 'newobject') - { + if ($tabobj == 'newobject') { // New object tab print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -2320,19 +2392,22 @@ if ($module == 'initmodule') print '</form>'; } else { // tabobj = module - if ($action == 'deleteproperty') - { + if ($action == 'deleteproperty') { $formconfirm = $form->formconfirm( $_SERVER["PHP_SELF"].'?propertykey='.urlencode(GETPOST('propertykey', 'alpha')).'&objectname='.urlencode($objectname).'&tab='.urlencode($tab).'&module='.urlencode($module).'&tabobj='.urlencode($tabobj), - $langs->trans('Delete'), $langs->trans('ConfirmDeleteProperty', GETPOST('propertykey', 'alpha')), 'confirm_deleteproperty', '', 0, 1 - ); + $langs->trans('Delete'), + $langs->trans('ConfirmDeleteProperty', GETPOST('propertykey', 'alpha')), + 'confirm_deleteproperty', + '', + 0, + 1 + ); // Print form confirm print $formconfirm; } - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { try { //$pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; @@ -2373,8 +2448,7 @@ if ($module == 'initmodule') $realpathtopicto = $dirread.'/'.$pathtopicto; $realpathtoscript = $dirread.'/'.$pathtoscript; - if (empty($realpathtoapi)) // For compatibility with some old modules - { + if (empty($realpathtoapi)) { // For compatibility with some old modules $pathtoapi = strtolower($module).'/class/api_'.strtolower($module).'s.class.php'; $realpathtoapi = $dirread.'/'.$pathtoapi; } @@ -2388,15 +2462,14 @@ if ($module == 'initmodule') print '<span class="fa fa-file-o"></span> '.$langs->trans("ApiClassFile").' : <strong>'.($realpathtoapi ? '' : '<strike>').$pathtoapi.($realpathtoapi ? '' : '</strike>').'</strong>'; if (dol_is_file($realpathtoapi)) { print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtoapi).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; - print ' '; - print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtoapi).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; - print ' &nbsp; '; - if (empty($conf->global->$const_name)) // If module is not activated - { - print '<a href="#" class="classfortooltip" target="apiexplorer" title="'.$langs->trans("ModuleMustBeEnabled", $module).'"><strike>'.$langs->trans("GoToApiExplorer").'</strike></a>'; - } else { - print '<a href="'.DOL_URL_ROOT.'/api/index.php/explorer/" target="apiexplorer">'.$langs->trans("GoToApiExplorer").'</a>'; - } + print ' '; + print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtoapi).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; + print ' &nbsp; '; + if (empty($conf->global->$const_name)) { // If module is not activated + print '<a href="#" class="classfortooltip" target="apiexplorer" title="'.$langs->trans("ModuleMustBeEnabled", $module).'"><strike>'.$langs->trans("GoToApiExplorer").'</strike></a>'; + } else { + print '<a href="'.DOL_URL_ROOT.'/api/index.php/explorer/" target="apiexplorer">'.$langs->trans("GoToApiExplorer").'</a>'; + } } else { //print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span> '; print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initapi&format=php&file='.urlencode($pathtoapi).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; @@ -2510,26 +2583,24 @@ if ($module == 'initmodule') print '<br><br><br>'; - if (function_exists('opcache_invalidate')) opcache_invalidate($dirread.'/'.$pathtoclass, true); // remove the include cache hell ! + if (function_exists('opcache_invalidate')) { + opcache_invalidate($dirread.'/'.$pathtoclass, true); // remove the include cache hell ! + } - if (empty($forceddirread) && empty($dirread)) - { + if (empty($forceddirread) && empty($dirread)) { $result = dol_include_once($pathtoclass); } else { $result = @include_once $dirread.'/'.$pathtoclass; } - if (class_exists($tabobj)) - { + 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); } } - if (!empty($tmpobjet)) - { + if (!empty($tmpobjet)) { $reflector = new ReflectionClass($tabobj); $reflectorproperties = $reflector->getProperties(); // Can also use get_object_vars $reflectorpropdefault = $reflector->getDefaultProperties(); // Can also use get_object_vars @@ -2572,6 +2643,7 @@ if ($module == 'initmodule') print '<th class="center">'.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).'</th>'; print '<th class="center">'.$langs->trans("CSSClass").'</th>'; print '<th class="center">'.$langs->trans("CSSViewClass").'</th>'; + print '<th class="center">'.$langs->trans("CSSListClass").'</th>'; print '<th class="center">'.$langs->trans("KeyForTooltip").'</th>'; print '<th class="center">'.$langs->trans("ShowOnCombobox").'</th>'; //print '<th class="center">'.$langs->trans("Disabled").'</th>'; @@ -2584,8 +2656,7 @@ if ($module == 'initmodule') //$properties = dol_sort_array($tmpobjet->fields, 'position'); $properties = dol_sort_array($reflectorpropdefault['fields'], 'position'); - if (!empty($properties)) - { + if (!empty($properties)) { // Line to add a property print '<tr>'; print '<td><input class="text maxwidth75" name="propname" value="'.dol_escape_htmltag(GETPOST('propname', 'alpha')).'"></td>'; @@ -2604,6 +2675,7 @@ if ($module == 'initmodule') print '<td class="center"><input class="text" size="2" name="propisameasure" value="'.dol_escape_htmltag(GETPOST('propisameasure', 'alpha')).'"></td>'; print '<td class="center"><input class="text" size="2" name="propcss" value="'.dol_escape_htmltag(GETPOST('propcss', 'alpha')).'"></td>'; print '<td class="center"><input class="text" size="2" name="propcssview" value="'.dol_escape_htmltag(GETPOST('propcssview', 'alpha')).'"></td>'; + print '<td class="center"><input class="text" size="2" name="propcsslist" value="'.dol_escape_htmltag(GETPOST('propcsslist', 'alpha')).'"></td>'; print '<td class="center"><input class="text" size="2" name="prophelp" value="'.dol_escape_htmltag(GETPOST('prophelp', 'alpha')).'"></td>'; print '<td class="center"><input class="text" size="2" name="propshowoncombobox" value="'.dol_escape_htmltag(GETPOST('propshowoncombobox', 'alpha')).'"></td>'; //print '<td class="center"><input class="text" size="2" name="propdisabled" value="'.dol_escape_htmltag(GETPOST('propdisabled', 'alpha')).'"></td>'; @@ -2613,8 +2685,7 @@ if ($module == 'initmodule') print '</td></tr>'; // List of existing properties - foreach ($properties as $propkey => $propval) - { + foreach ($properties as $propkey => $propval) { /* If from Reflection if ($propval->class == $tabobj) { @@ -2645,6 +2716,7 @@ if ($module == 'initmodule') $propisameasure = $propval['isameasure']; $propcss = $propval['css']; $propcssview = $propval['cssview']; + $propcsslist = $propval['csslist']; $prophelp = $propval['help']; $propshowoncombobox = $propval['showoncombobox']; //$propdisabled=$propval['disabled']; @@ -2658,90 +2730,155 @@ if ($module == 'initmodule') print '<td>'; print dol_escape_htmltag($proplabel); print '</td>'; - print '<td class="tdoverflowmax200">'; - print '<span title="'.dol_escape_htmltag($proptype).'">'.dol_escape_htmltag($proptype).'</span>'; - print '</td>'; - print '<td class="tdoverflowmax200">'; - if ($proparrayofkeyval) { - print '<span title="'.dol_escape_htmltag(json_encode($proparrayofkeyval)).'">'; - print dol_escape_htmltag(json_encode($proparrayofkeyval)); + if ($action == 'editproperty' && $propname == $propertykey) { + print '<td class="tdoverflowmax200">'; + print '<input type="hidden" name="propname" value="'.dol_escape_htmltag($propname).'">'; + print '<input type="hidden" name="proplabel" value="'.dol_escape_htmltag($proplabel).'">'; + print '<input name="proptype" value="'.dol_escape_htmltag($proptype).'"></input>'; + print '</td>'; + print '<td class="tdoverflowmax200">'; + print '<input name="proparrayofkeyval" value="'.dol_escape_htmltag(json_encode($proparrayofkeyval)).'">'; + print '</input>'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propnotnull" size="2" value="'.dol_escape_htmltag($propnotnull).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propdefault" value="'.dol_escape_htmltag($propdefault).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propindex" size="2" value="'.dol_escape_htmltag($propindex).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propforeignkey" value="'.dol_escape_htmltag($propforeignkey).'">'; + print '</td>'; + print '<td>'; + print '<input class="right" name="propposition" value="'.dol_escape_htmltag($propposition).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propenabled" size="2" value="'.dol_escape_htmltag($propenabled).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propvisible" size="2" value="'.dol_escape_htmltag($propvisible).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propnotable" size="2" value="'.dol_escape_htmltag($propnotable).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propsearchall" size="2" value="'.dol_escape_htmltag($propsearchall).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propisameasure" size="2" value="'.dol_escape_htmltag($propisameasure).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propcss" value="'.dol_escape_htmltag($propcss).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propcssview" value="'.dol_escape_htmltag($propcssview).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propcsslist" value="'.dol_escape_htmltag($propcsslist).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="prophelp" value="'.dol_escape_htmltag($prophelp).'">'; + print '</td>'; + print '<td>'; + print '<input class="center" name="propshowoncombobox" size="2" value="'.dol_escape_htmltag($propshowoncombobox).'">'; + print '</td>'; + print '<td>'; + print '<input name="propcomment" value="'.dol_escape_htmltag($propcomment).'">'; + print '</td>'; + print '<td class="center">'; + print '<input class="button smallpaddingimp" type="submit" name="edit" value="'.$langs->trans("Save").'">'; + print '<input class="button button-cancel smallpaddingimp" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</td>'; + } else { + print '<td class="tdoverflowmax200">'; + print '<span title="'.dol_escape_htmltag($proptype).'">'.dol_escape_htmltag($proptype).'</span>'; + print '</td>'; + print '<td class="tdoverflowmax200">'; + if ($proparrayofkeyval) { + print '<span title="'.dol_escape_htmltag(json_encode($proparrayofkeyval)).'">'; + print dol_escape_htmltag(json_encode($proparrayofkeyval)); + print '</span>'; + } + print '</td>'; + print '<td class="center">'; + print dol_escape_htmltag($propnotnull); + print '</td>'; + print '<td>'; + print dol_escape_htmltag($propdefault); + print '</td>'; + print '<td class="center">'; + print $propindex ? '1' : ''; + print '</td>'; + print '<td class="center">'; + print $propforeignkey ? dol_escape_htmltag($propforeignkey) : ''; + print '</td>'; + print '<td class="right">'; + print dol_escape_htmltag($propposition); + print '</td>'; + print '<td class="center">'; + print $propenabled ? dol_escape_htmltag($propenabled) : ''; + print '</td>'; + print '<td class="center">'; + print $propvisible ? dol_escape_htmltag($propvisible) : '0'; + print '</td>'; + print '<td class="center">'; + print $propnoteditable ? dol_escape_htmltag($propnoteditable) : ''; + print '</td>'; + print '<td class="center">'; + print $propsearchall ? '1' : ''; + print '</td>'; + print '<td class="center">'; + print $propisameasure ? dol_escape_htmltag($propisameasure) : ''; + print '</td>'; + print '<td class="center">'; + print $propcss ? dol_escape_htmltag($propcss) : ''; + print '</td>'; + print '<td class="center">'; + print $propcssview ? dol_escape_htmltag($propcssview) : ''; + print '</td>'; + print '<td class="center">'; + print $propcsslist ? dol_escape_htmltag($propcsslist) : ''; + print '</td>'; + print '<td class="tdoverflowmax200">'; + print $prophelp ? dol_escape_htmltag($prophelp) : ''; + print '</td>'; + print '<td class="center">'; + print $propshowoncombobox ? dol_escape_htmltag($propshowoncombobox) : ''; + print '</td>'; + /*print '<td class="center">'; + print $propdisabled?$propdisabled:''; + print '</td>';*/ + print '<td class="tdoverflowmax200">'; + print '<span title="'.dol_escape_htmltag($propcomment).'">'; + print dol_escape_htmltag($propcomment); print '</span>'; + print '</td>'; + print '<td class="center">'; + if ($propname != 'rowid') { + print '<a class="editfielda reposition marginleftonly marginrighttonly paddingright paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=editproperty&token='.newToken().'&propertykey='.urlencode($propname).'&tab='.urlencode($tab).'&module='.urlencode($module).'&tabobj='.urlencode($tabobj).'">'.img_edit().'</a>'; + print '<a class="marginleftonly marginrighttonly paddingright paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=deleteproperty&token='.newToken().'&propertykey='.urlencode($propname).'&tab='.urlencode($tab).'&module='.urlencode($module).'&tabobj='.urlencode($tabobj).'">'.img_delete().'</a>'; + } + print '</td>'; } - print '</td>'; - print '<td class="center">'; - print dol_escape_htmltag($propnotnull); - print '</td>'; - print '<td>'; - print dol_escape_htmltag($propdefault); - print '</td>'; - print '<td class="center">'; - print $propindex ? '1' : ''; - print '</td>'; - print '<td class="center">'; - print $propforeignkey ? dol_escape_htmltag($propforeignkey) : ''; - print '</td>'; - print '<td class="right">'; - print dol_escape_htmltag($propposition); - print '</td>'; - print '<td class="center">'; - print $propenabled ? dol_escape_htmltag($propenabled) : ''; - print '</td>'; - print '<td class="center">'; - print $propvisible ? dol_escape_htmltag($propvisible) : '0'; - print '</td>'; - print '<td class="center">'; - print $propnoteditable ? dol_escape_htmltag($propnoteditable) : ''; - print '</td>'; - print '<td class="center">'; - print $propsearchall ? '1' : ''; - print '</td>'; - print '<td class="center">'; - print $propisameasure ? dol_escape_htmltag($propisameasure) : ''; - print '</td>'; - print '<td class="center">'; - print $propcss ? dol_escape_htmltag($propcss) : ''; - print '</td>'; - print '<td class="center">'; - print $propcssview ? dol_escape_htmltag($propcssview) : ''; - print '</td>'; - print '<td class="tdoverflowmax200">'; - print $prophelp ? dol_escape_htmltag($prophelp) : ''; - print '</td>'; - print '<td class="center">'; - print $propshowoncombobox ? dol_escape_htmltag($propshowoncombobox) : ''; - print '</td>'; - /*print '<td class="center">'; - print $propdisabled?$propdisabled:''; - print '</td>';*/ - print '<td class="tdoverflowmax200">'; - print '<span title="'.dol_escape_htmltag($propcomment).'">'; - print dol_escape_htmltag($propcomment); - print '</span>'; - print '</td>'; - print '<td class="center">'; - if ($propname != 'rowid') - { - print '<a href="'.$_SERVER["PHP_SELF"].'?action=deleteproperty&token='.newToken().'&propertykey='.urlencode($propname).'&tab='.urlencode($tab).'&module='.urlencode($module).'&tabobj='.urlencode($tabobj).'">'.img_delete().'</a>'; - } - print '</td>'; - print '</tr>'; } } else { - if ($tab == 'specifications') - { - if ($action != 'editfile' || empty($file)) - { + if ($tab == 'specifications') { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("SpecDefDesc").'</span><br>'; print '<br>'; $specs = dol_dir_list(dol_buildpath($modulelowercase.'/doc', 0), 'files', 1, '(\.md|\.asciidoc)$', array('\/temp\/')); - foreach ($specs as $spec) - { + foreach ($specs as $spec) { $pathtofile = $modulelowercase.'/doc/'.$spec['relativename']; $format = 'asciidoc'; - if (preg_match('/\.md$/i', $spec['name'])) $format = 'markdown'; + if (preg_match('/\.md$/i', $spec['name'])) { + $format = 'markdown'; + } print '<span class="fa fa-file-o"></span> '.$langs->trans("SpecificationFile").' : <strong>'.$pathtofile.'</strong>'; print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format='.$format.'&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; print '<br>'; @@ -2784,13 +2921,11 @@ if ($module == 'initmodule') } else { print '<tr><td><span class="warning">'.$langs->trans('Failed to init the object with the new.').'</warning></td></tr>'; } - } catch (Exception $e) - { + } catch (Exception $e) { print $e->getMessage(); } } else { - if (empty($forceddirread)) - { + if (empty($forceddirread)) { $fullpathoffile = dol_buildpath($file, 0); } else { $fullpathoffile = $dirread.'/'.$file; @@ -2823,14 +2958,12 @@ if ($module == 'initmodule') print dol_get_fiche_end(); // Level 3 } - if ($tab == 'menus') - { + if ($tab == 'menus') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $menus = $moduleobj->menu; - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'; $htmlhelp = $langs->trans("MenusDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/menus/index.php">'.$langs->trans('Setup').' - '.$langs->trans('Menus').'</a>'); print $form->textwithpicto($langs->trans("MenusDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>'; @@ -2869,10 +3002,8 @@ if ($module == 'initmodule') print_liste_field_titre("UserType", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder, 'right '); print "</tr>\n"; - if (count($menus)) - { - foreach ($menus as $menu) - { + if (count($menus)) { + foreach ($menus as $menu) { print '<tr class="oddeven">'; print '<td>'; @@ -2926,7 +3057,7 @@ if ($module == 'initmodule') print '</tr>'; } } else { - print '<tr><td class="opacitymedium" colspan="5">'.$langs->trans("None").'</td></tr>'; + print '<tr><td class="opacitymedium" colspan="5">'.$langs->trans("None").'</td></tr>'; } print '</table>'; @@ -2959,14 +3090,12 @@ if ($module == 'initmodule') } } - if ($tab == 'permissions') - { + if ($tab == 'permissions') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $perms = $moduleobj->rights; - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'; $htmlhelp = $langs->trans("PermissionsDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/perms.php">'.$langs->trans('DefaultPermissions').'</a>'); print $form->textwithpicto($langs->trans("PermissionsDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>'; @@ -2997,10 +3126,8 @@ if ($module == 'initmodule') print_liste_field_titre("", $_SERVER["PHP_SELF"], '', "", $param, '', $sortfield, $sortorder); print "</tr>\n"; - if (count($perms)) - { - foreach ($perms as $perm) - { + if (count($perms)) { + foreach ($perms as $perm) { print '<tr class="oddeven">'; print '<td>'; @@ -3055,10 +3182,8 @@ if ($module == 'initmodule') } } - if ($tab == 'hooks') - { - if ($action != 'editfile' || empty($file)) - { + if ($tab == 'hooks') { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("HooksDefDesc").'</span><br>'; print '<br>'; @@ -3074,8 +3199,7 @@ if ($module == 'initmodule') print '<tr><td>'; $pathtohook = strtolower($module).'/class/actions_'.strtolower($module).'.class.php'; print '<span class="fa fa-file-o"></span> '.$langs->trans("HooksFile").' : '; - if (dol_is_file($dirins.'/'.$pathtohook)) - { + if (dol_is_file($dirins.'/'.$pathtohook)) { print '<strong>'.$pathtohook.'</strong>'; print '</td>'; print '<td><a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtohook).'">'.img_picto($langs->trans("Edit"), 'edit').'</a> '; @@ -3112,15 +3236,13 @@ if ($module == 'initmodule') } } - if ($tab == 'triggers') - { + if ($tab == 'triggers') { require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; $interfaces = new Interfaces($db); $triggers = $interfaces->getTriggersList(array('/'.strtolower($module).'/core/triggers')); - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("TriggerDefDesc").'</span><br>'; print '<br>'; @@ -3133,10 +3255,8 @@ if ($module == 'initmodule') print '<a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; print '</td></tr>'; - if (!empty($triggers)) - { - foreach ($triggers as $trigger) - { + if (!empty($triggers)) { + foreach ($triggers as $trigger) { $pathtofile = $trigger['relpath']; print '<tr><td>'; @@ -3180,10 +3300,8 @@ if ($module == 'initmodule') } } - if ($tab == 'css') - { - if ($action != 'editfile' || empty($file)) - { + if ($tab == 'css') { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("CSSDesc").'</span><br>'; print '<br>'; @@ -3192,8 +3310,7 @@ if ($module == 'initmodule') print '<tr><td>'; $pathtohook = strtolower($module).'/css/'.strtolower($module).'.css.php'; print '<span class="fa fa-file-o"></span> '.$langs->trans("CSSFile").' : '; - if (dol_is_file($dirins.'/'.$pathtohook)) - { + if (dol_is_file($dirins.'/'.$pathtohook)) { print '<strong>'.$pathtohook.'</strong>'; print '</td><td><a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtohook).'">'.img_picto($langs->trans("Edit"), 'edit').'</a></td>'; print '</td><td><a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&format='.$format.'&file='.urlencode($pathtohook).'">'.img_picto($langs->trans("Delete"), 'delete').'</a></td>'; @@ -3228,10 +3345,8 @@ if ($module == 'initmodule') } } - if ($tab == 'js') - { - if ($action != 'editfile' || empty($file)) - { + if ($tab == 'js') { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("JSDesc").'</span><br>'; print '<br>'; @@ -3240,8 +3355,7 @@ if ($module == 'initmodule') print '<tr><td>'; $pathtohook = strtolower($module).'/js/'.strtolower($module).'.js.php'; print '<span class="fa fa-file-o"></span> '.$langs->trans("JSFile").' : '; - if (dol_is_file($dirins.'/'.$pathtohook)) - { + if (dol_is_file($dirins.'/'.$pathtohook)) { print '<strong>'.$pathtohook.'</strong>'; print '</td><td><a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtohook).'">'.img_picto($langs->trans("Edit"), 'edit').'</a></td>'; print '</td><td><a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&format='.$format.'&file='.urlencode($pathtohook).'">'.img_picto($langs->trans("Delete"), 'delete').'</a></td>'; @@ -3276,22 +3390,18 @@ if ($module == 'initmodule') } } - if ($tab == 'widgets') - { + if ($tab == 'widgets') { require_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; $widgets = ModeleBoxes::getWidgetsList(array('/'.strtolower($module).'/core/boxes')); - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("WidgetDesc").'</span><br>'; print '<br>'; print '<table>'; - if (!empty($widgets)) - { - foreach ($widgets as $widget) - { + if (!empty($widgets)) { + foreach ($widgets as $widget) { $pathtofile = $widget['relpath']; print '<tr><td><span class="fa fa-file-o"></span> '.$langs->trans("WidgetFile").' : <strong>'.$pathtofile.'</strong>'; @@ -3331,29 +3441,67 @@ if ($module == 'initmodule') } } - if ($tab == 'cli') - { + if ($tab == 'exportimport') { + $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; + + $exportlist = $moduleobj->export_label; + $importlist = $moduleobj->import_label; + + if ($action != 'editfile' || empty($file)) { + print '<span class="opacitymedium">'.$langs->transnoentities('ImportExportProfiles').'</span><br>'; + print '<br>'; + + print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>'; + print ' <a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; + print '<br>'; + } else { + $fullpathoffile = dol_buildpath($file, 0); + + $content = file_get_contents($fullpathoffile); + + // New module + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="savefile">'; + print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'">'; + print '<input type="hidden" name="tab" value="'.$tab.'">'; + print '<input type="hidden" name="module" value="'.$module.'">'; + + $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')); + print '<br>'; + print '<center>'; + print '<input type="submit" class="button buttonforacesave button-save" id="savefile" name="savefile" value="'.dol_escape_htmltag($langs->trans("Save")).'">'; + print ' &nbsp; '; + print '<input type="submit" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'">'; + print '</center>'; + + print '</form>'; + } + } + + if ($tab == 'cli') { $clifiles = array(); $i = 0; $dircli = array('/'.strtolower($module).'/scripts'); - foreach ($dircli as $reldir) - { + foreach ($dircli as $reldir) { $dir = dol_buildpath($reldir, 0); $newdir = dol_osencode($dir); // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php at each call) - if (!is_dir($newdir)) continue; + if (!is_dir($newdir)) { + continue; + } $handle = opendir($newdir); - if (is_resource($handle)) - { - while (($tmpfile = readdir($handle)) !== false) - { - if (is_readable($newdir.'/'.$file) && preg_match('/^(.+)\.php/', $tmpfile, $reg)) - { - if (preg_match('/\.back$/', $tmpfile)) continue; + if (is_resource($handle)) { + while (($tmpfile = readdir($handle)) !== false) { + if (is_readable($newdir.'/'.$file) && preg_match('/^(.+)\.php/', $tmpfile, $reg)) { + if (preg_match('/\.back$/', $tmpfile)) { + continue; + } $clifiles[$i]['relpath'] = preg_replace('/^\//', '', $reldir).'/'.$tmpfile; @@ -3364,16 +3512,13 @@ if ($module == 'initmodule') } } - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("CLIDesc").'</span><br>'; print '<br>'; print '<table>'; - if (!empty($clifiles)) - { - foreach ($clifiles as $clifile) - { + if (!empty($clifiles)) { + foreach ($clifiles as $clifile) { $pathtofile = $clifile['relpath']; print '<tr><td><span class="fa fa-file-o"></span> '.$langs->trans("CLIFile").' : <strong>'.$pathtofile.'</strong>'; @@ -3413,14 +3558,12 @@ if ($module == 'initmodule') } } - if ($tab == 'cron') - { + if ($tab == 'cron') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $cronjobs = $moduleobj->cronjobs; - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>', $langs->trans("CronJobDefDesc", '{s1}')).'</span><br>'; print '<br>'; @@ -3449,10 +3592,8 @@ if ($module == 'initmodule') print_liste_field_titre("Comment", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder); print "</tr>\n"; - if (count($cronjobs)) - { - foreach ($cronjobs as $cron) - { + if (count($cronjobs)) { + foreach ($cronjobs as $cron) { print '<tr class="oddeven">'; print '<td>'; @@ -3460,8 +3601,7 @@ if ($module == 'initmodule') print '</td>'; print '<td>'; - if ($cron['jobtype'] == 'method') - { + if ($cron['jobtype'] == 'method') { $text = $langs->trans("CronClass"); $texttoshow = $langs->trans('CronModule').': '.$module.'<br>'; $texttoshow .= $langs->trans('CronClass').': '.$cron['class'].'<br>'; @@ -3469,8 +3609,7 @@ if ($module == 'initmodule') $texttoshow .= $langs->trans('CronMethod').': '.$cron['method']; $texttoshow .= '<br>'.$langs->trans('CronArgs').': '.$cron['parameters']; $texttoshow .= '<br>'.$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']); $texttoshow .= '<br>'.$langs->trans('CronArgs').': '.$cron['parameters']; @@ -3480,10 +3619,18 @@ if ($module == 'initmodule') print '</td>'; print '<td>'; - if ($cron['unitfrequency'] == "60") print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Minutes'); - if ($cron['unitfrequency'] == "3600") print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Hours'); - if ($cron['unitfrequency'] == "86400") print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Days'); - if ($cron['unitfrequency'] == "604800") print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Weeks'); + if ($cron['unitfrequency'] == "60") { + print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Minutes'); + } + if ($cron['unitfrequency'] == "3600") { + print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Hours'); + } + if ($cron['unitfrequency'] == "86400") { + print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Days'); + } + if ($cron['unitfrequency'] == "604800") { + print $langs->trans('CronEach')." ".($cron['frequency'])." ".$langs->trans('Weeks'); + } print '</td>'; print '<td>'; @@ -3491,7 +3638,9 @@ if ($module == 'initmodule') print '</td>'; print '<td>'; - if (!empty($cron['comment'])) {print $cron['comment']; } + if (!empty($cron['comment'])) { + print $cron['comment']; + } print '</td>'; print '</tr>'; @@ -3530,23 +3679,21 @@ if ($module == 'initmodule') } } - if ($tab == 'specifications') - { + if ($tab == 'specifications') { $specs = dol_dir_list(dol_buildpath($modulelowercase.'/doc', 0), 'files', 1, '(\.md|\.asciidoc)$', array('\/temp\/')); - if ($action != 'editfile' || empty($file)) - { + if ($action != 'editfile' || empty($file)) { print '<span class="opacitymedium">'.$langs->trans("SpecDefDesc").'</span><br>'; print '<br>'; print '<table>'; - if (is_array($specs) && !empty($specs)) - { - foreach ($specs as $spec) - { + if (is_array($specs) && !empty($specs)) { + foreach ($specs as $spec) { $pathtofile = $modulelowercase.'/doc/'.$spec['relativename']; $format = 'asciidoc'; - if (preg_match('/\.md$/i', $spec['name'])) $format = 'markdown'; + if (preg_match('/\.md$/i', $spec['name'])) { + $format = 'markdown'; + } print '<tr><td>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("SpecificationFile").' : <strong>'.$pathtofile.'</strong>'; print '</td><td><a class="editfielda paddingleft paddingright" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format='.$format.'&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a></td>'; @@ -3600,8 +3747,9 @@ if ($module == 'initmodule') // HTML print '<span class="fa fa-file-o"></span> '.$langs->trans("PathToModuleDocumentation", "HTML").' : '; - if (!dol_is_file($outputfiledoc)) print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - else { + if (!dol_is_file($outputfiledoc)) { + print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; + } else { print '<strong>'; print '<a href="'.$outputfiledocurl.'" target="_blank">'; print $outputfiledoc; @@ -3613,8 +3761,9 @@ if ($module == 'initmodule') // PDF print '<span class="fa fa-file-o"></span> '.$langs->trans("PathToModuleDocumentation", "PDF").' : '; - if (!dol_is_file($outputfiledocpdf)) print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - else { + if (!dol_is_file($outputfiledocpdf)) { + print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; + } else { print '<strong>'; print '<a href="'.$outputfiledocurlpdf.'" target="_blank">'; print $outputfiledocpdf; @@ -3632,18 +3781,18 @@ if ($module == 'initmodule') print '<input type="hidden" name="tab" value="'.dol_escape_htmltag($tab).'">'; print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">'; print '<input type="submit" class="button" name="generatedoc" value="'.$langs->trans("BuildDocumentation").'"'; - if (!is_array($specs) || empty($specs)) print ' disabled="disabled"'; + if (!is_array($specs) || empty($specs)) { + print ' disabled="disabled"'; + } print '>'; print '</form>'; } - if ($tab == 'buildpackage') - { + if ($tab == 'buildpackage') { print '<span class="opacitymedium">'.$langs->trans("BuildPackageDesc").'</span>'; print '<br>'; - if (!class_exists('ZipArchive') && !defined('ODTPHP_PATHTOPCLZIP')) - { + if (!class_exists('ZipArchive') && !defined('ODTPHP_PATHTOPCLZIP')) { print img_warning().' '.$langs->trans("ErrNoZipEngine"); print '<br>'; } @@ -3658,8 +3807,7 @@ if ($module == 'initmodule') dol_include_once($pathtofile); $class = 'mod'.$module; - if (class_exists($class)) - { + if (class_exists($class)) { try { $moduleobj = new $class($db); } catch (Exception $e) { @@ -3674,8 +3822,7 @@ if ($module == 'initmodule') } $arrayversion = explode('.', $moduleobj->version, 3); - if (count($arrayversion)) - { + if (count($arrayversion)) { $FILENAMEZIP = "module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2] ? ".".$arrayversion[2] : "").".zip"; $outputfilezip = dol_buildpath($modulelowercase, 0).'/bin/'.$FILENAMEZIP; } @@ -3683,8 +3830,9 @@ if ($module == 'initmodule') print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("PathToModulePackage").' : '; - if (!dol_is_file($outputfilezip)) print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - else { + if (!dol_is_file($outputfilezip)) { + print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; + } else { $relativepath = $modulelowercase.'/bin/'.$FILENAMEZIP; print '<strong><a href="'.DOL_URL_ROOT.'/document.php?modulepart=packages&file='.urlencode($relativepath).'">'.$outputfilezip.'</a></strong>'; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfilezip), 'dayhour').')'; @@ -3702,8 +3850,7 @@ if ($module == 'initmodule') print '</form>'; } - if ($tab != 'description') - { + if ($tab != 'description') { print dol_get_fiche_end(); } } diff --git a/htdocs/modulebuilder/template/admin/about.php b/htdocs/modulebuilder/template/admin/about.php index 518920592f4..30cc93a6d51 100644 --- a/htdocs/modulebuilder/template/admin/about.php +++ b/htdocs/modulebuilder/template/admin/about.php @@ -25,16 +25,30 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} // Libraries require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -45,7 +59,9 @@ require_once '../lib/mymodule.lib.php'; $langs->loadLangs(array("errors", "admin", "mymodule@mymodule")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index 0e42b75da0b..cd2125547e8 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -29,16 +29,30 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once '../lib/mymodule.lib.php'; @@ -52,13 +66,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'mymodule_myobject'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -91,8 +109,7 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; @@ -102,8 +119,7 @@ if ($action != 'create' && $action != 'edit') /* * Creation of an optional field */ -if ($action == 'create') -{ +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -113,8 +129,7 @@ if ($action == 'create') /* * Edition of an optional field */ -if ($action == 'edit' && !empty($attrname)) -{ +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index e4545390457..d3cfb3fbef3 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -25,16 +25,30 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} global $langs, $user; @@ -47,7 +61,9 @@ require_once '../lib/mymodule.lib.php'; $langs->loadLangs(array("admin", "mymodule@mymodule")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -59,8 +75,13 @@ $scandir = GETPOST('scan_dir', 'alpha'); $type = 'myobject'; $arrayofparameters = array( - 'MYMODULE_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1), - 'MYMODULE_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) + 'MYMODULE_MYPARAM1'=>array('type'=>'string', 'css'=>'minwidth500' ,'enabled'=>1), + 'MYMODULE_MYPARAM2'=>array('type'=>'textarea','enabled'=>1), + //'MYMODULE_MYPARAM3'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1), + //'MYMODULE_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1), + //'MYMODULE_MYPARAM5'=>array('type'=>'yesno', 'enabled'=>1), + //'MYMODULE_MYPARAM5'=>array('type'=>'thirdparty_type', 'enabled'=>1), + //'MYMODULE_MYPARAM6'=>array('type'=>'securekey', 'enabled'=>1), ); $error = 0; @@ -71,8 +92,7 @@ $setupnotempty = 0; * Actions */ -if ((float) DOL_VERSION >= 6) -{ +if ((float) DOL_VERSION >= 6) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; } @@ -92,8 +112,7 @@ if ($action == 'updateMask') { } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $tmpobjectkey = GETPOST('object'); @@ -103,25 +122,21 @@ if ($action == 'updateMask') { // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($tmpobject, $langs) > 0) - { + if ($module->write_file($tmpobject, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); return; } else { @@ -132,19 +147,15 @@ if ($action == 'updateMask') { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -elseif ($action == 'setmod') { +} elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated by calling method canBeActivated $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { $constforval = 'MYMODULE_'.strtoupper($tmpobjectkey)."_ADDON"; dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); } -} - -// Activate a model -elseif ($action == 'set') { +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); @@ -152,13 +163,13 @@ elseif ($action == 'set') { $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { $constforval = 'MYMODULE_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; - if ($conf->global->$constforval == "$value") dolibarr_del_const($db, $constforval, $conf->entity); + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } } } -} - -// Set or unset default model -elseif ($action == 'setdoc') { +} elseif ($action == 'setdoc') { + // Set or unset default model $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { $constforval = 'MYMODULE_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; @@ -208,8 +219,7 @@ print dol_get_fiche_head($head, 'settings', '', -1, "mymodule@mymodule"); echo '<span class="opacitymedium">'.$langs->trans("MyModuleSetupPage").'</span><br><br>'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -217,12 +227,81 @@ if ($action == 'edit') print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { - print '<tr class="oddeven"><td>'; - $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); - print $form->textwithpicto($langs->trans($key), $tooltiphelp); - print '</td><td><input name="'.$key.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->$key.'"></td></tr>'; + foreach ($arrayofparameters as $constname => $val) { + if ($val['enabled']==1) { + $setupnotempty++; + print '<tr class="oddeven"><td>'; + $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); + print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; + print '</td><td>'; + + if ($val['type'] == 'textarea') { + print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">' . "\n"; + print $conf->global->{$constname}; + print "</textarea>\n"; + } elseif ($val['type']== 'html') { + require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; + $doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor->Create(); + } elseif ($val['type'] == 'yesno') { + print $form->selectyesno($constname, $conf->global->{$constname}, 1); + } elseif (preg_match('/emailtemplate:/', $val['type'])) { + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + $tmp = explode(':', $val['type']); + $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user, null, 1); // We set lang=null to get in priority record with no lang + //$arraydefaultmessage = $formmail->getEMailTemplate($db, $tmp[1], $user, null, 0, 1, ''); + $arrayofmessagename = array(); + if (is_array($formmail->lines_model)) { + foreach ($formmail->lines_model as $modelmail) { + //var_dump($modelmail); + $moreonlabel = ''; + if (!empty($arrayofmessagename[$modelmail->label])) { + $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>'; + } + // The 'label' is the key that is unique if we exclude the language + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; + } + } + print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname}, 'None', 0, 0, '', 0, 0, 0, '', '', 1); + } elseif (preg_match('/category:/', $val['type'])) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; + $formother = new FormOther($db); + + $tmp = explode(':', $val['type']); + print img_picto('', 'category', 'class="pictofixedwidth"'); + print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); + } elseif (preg_match('/thirdparty_type/', $val['type'])) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + $formcompany = new FormCompany($db); + print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname); + } elseif ($val['type'] == 'securekey') { + print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ?GETPOST($constname, 'alpha') : $conf->global->{$constname}).'" size="40">'; + if (!empty($conf->use_javascript_ajax)) { + print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); + } + if (!empty($conf->use_javascript_ajax)) { + print "\n".'<script type="text/javascript">'; + print '$(document).ready(function () { + $("#generate_token'.$constname.'").click(function() { + $.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", { + action: \'getrandompassword\', + generic: true + }, + function(token) { + $("#'.$constname.'").val(token); + }); + }); + });'; + print '</script>'; + } + } else { + print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->{$constname}.'">'; + } + print '</td></tr>'; + } } print '</table>'; @@ -233,19 +312,62 @@ if ($action == 'edit') print '</form>'; print '<br>'; } else { - if (!empty($arrayofparameters)) - { + if (!empty($arrayofparameters)) { print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { - $setupnotempty++; + foreach ($arrayofparameters as $constname => $val) { + if ($val['enabled']==1) { + $setupnotempty++; + print '<tr class="oddeven"><td>'; + $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); + print $form->textwithpicto($langs->trans($constname), $tooltiphelp); + print '</td><td>'; - print '<tr class="oddeven"><td>'; - $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); - print $form->textwithpicto($langs->trans($key), $tooltiphelp); - print '</td><td>'.$conf->global->$key.'</td></tr>'; + if ($val['type'] == 'textarea') { + print dol_nl2br($conf->global->{$constname}); + } elseif ($val['type']== 'html') { + print $conf->global->{$constname}; + } elseif ($val['type'] == 'yesno') { + print ajax_constantonoff($constname); + } elseif (preg_match('/emailtemplate:/', $val['type'])) { + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + $tmp = explode(':', $val['type']); + + $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, $conf->global->{$constname}); + if ($template<0) { + setEventMessages(null, $formmail->errors, 'errors'); + } + print $langs->trans($template->label); + } elseif (preg_match('/category:/', $val['type'])) { + $c = new Categorie($db); + $result = $c->fetch($conf->global->{$constname}); + if ($result < 0) { + setEventMessages(null, $c->errors, 'errors'); + } + $ways = $c->print_all_ways(' &gt;&gt; ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text + $toprint = array(); + foreach ($ways as $way) { + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>'; + } + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; + } elseif (preg_match('/thirdparty_type/', $val['type'])) { + if ($conf->global->{$constname}==2) { + print $langs->trans("Prospect"); + } elseif ($conf->global->{$constname}==3) { + print $langs->trans("ProspectCustomer"); + } elseif ($conf->global->{$constname}==1) { + print $langs->trans("Customer"); + } elseif ($conf->global->{$constname}==0) { + print $langs->trans("NorProspectNorCustomer"); + } + } else { + print $conf->global->{$constname}; + } + print '</td></tr>'; + } } print '</table>'; @@ -265,7 +387,9 @@ $myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgenerati foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') continue; + if ($myTmpObjectKey == 'MyObject') { + continue; + } if ($myTmpObjectArray['includerefgeneration']) { /* * Orders Numbering model @@ -285,19 +409,14 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/".$moduledir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.'/'.$file.'.php'; @@ -305,11 +424,14 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; @@ -322,14 +444,16 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td class="center">'; $constforvar = 'MYMODULE_'.strtoupper($myTmpObjectKey).'_ADDON'; - if ($conf->global->$constforvar == $file) - { + if ($conf->global->$constforvar == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">'; @@ -349,9 +473,10 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); - $htmltooltip .= $nextval.'<br>'; + } + $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; } @@ -388,12 +513,10 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -414,31 +537,23 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { - foreach (array('', '/doc') as $valdir) - { + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/".$moduledir.$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -446,21 +561,26 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '</td>'; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '<td class="center">'."\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;token='.newToken().'&amp;value='.$name.'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -487,8 +607,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; @@ -503,8 +622,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 13a2b8e895c..8559411a3d4 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -99,8 +99,7 @@ class ActionsMyModule $error = 0; // Error counter /* 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' // Do what you want here... // You can for example call global vars like $fieldstosearchall to overwrite them, or update database depending on $action and $_POST values. } @@ -132,10 +131,8 @@ class ActionsMyModule $error = 0; // Error counter /* 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' - { - foreach ($parameters['toselect'] as $objectid) - { + if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2' + foreach ($parameters['toselect'] as $objectid) { // Do action on each object id } } @@ -168,8 +165,7 @@ class ActionsMyModule $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' - { + if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2' $this->resprints = '<option value="0"'.($disabled ? ' disabled="disabled"' : '').'>'.$langs->trans("MyModuleMassAction").'</option>'; } @@ -204,8 +200,7 @@ 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 2e04e34dcac..47a3ac984f9 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -119,29 +119,42 @@ class MyModuleApi extends DolibarrApi // If the internal user must only see his customers, force searching by him $search_sale = 0; - if ($restrictonsocid && !DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) $search_sale = DolibarrApiAccess::$user->id; + if ($restrictonsocid && !DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { + $search_sale = DolibarrApiAccess::$user->id; + } $sql = "SELECT t.rowid"; - if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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) + if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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.$tmpobject->table_element." as t"; - if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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 ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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 1 = 1"; // Example of use $mode //if ($mode == 1) $sql.= " AND s.client IN (1, 3)"; //if ($mode == 2) $sql.= " AND s.client IN (2, 3)"; - if ($tmpobject->ismultientitymanaged) $sql .= ' AND t.entity IN ('.getEntity($tmpobject->element).')'; - if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($restrictonsocid && $socid) $sql .= " AND t.fk_soc = ".$socid; - if ($restrictonsocid && $search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + if ($tmpobject->ismultientitymanaged) { + $sql .= ' AND t.entity IN ('.getEntity($tmpobject->element).')'; + } + if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $search_sale > 0) { + $sql .= " AND t.fk_soc = sc.fk_soc"; + } + if ($restrictonsocid && $socid) { + $sql .= " AND t.fk_soc = ".$socid; + } + if ($restrictonsocid && $search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter if ($restrictonsocid && $search_sale > 0) { $sql .= " AND sc.fk_user = ".$search_sale; } - if ($sqlfilters) - { + if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } @@ -161,11 +174,9 @@ class MyModuleApi extends DolibarrApi $result = $this->db->query($sql); $i = 0; - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $tmp_object = new MyObject($this->db); if ($tmp_object->fetch($obj->rowid)) { @@ -197,12 +208,17 @@ class MyModuleApi extends DolibarrApi if (!DolibarrApiAccess::$user->rights->mymodule->write) { throw new RestException(401); } + // Check mandatory fields $result = $this->_validate($request_data); foreach ($request_data as $field => $value) { $this->myobject->$field = $value; } + + // Clean data + // $this->myobject->abc = checkVal($this->myobject->abc, 'alphanohtml'); + if ($this->myobject->create(DolibarrApiAccess::$user)<0) { throw new RestException(500, "Error creating MyObject", array_merge(array($this->myobject->error), $this->myobject->errors)); } @@ -236,12 +252,16 @@ class MyModuleApi extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->myobject->$field = $value; } - if ($this->myobject->update(DolibarrApiAccess::$user, false) > 0) - { + // Clean data + // $this->myobject->abc = checkVal($this->myobject->abc, 'alphanohtml'); + + if ($this->myobject->update(DolibarrApiAccess::$user, false) > 0) { return $this->get($id); } else { throw new RestException(500, $this->myobject->error); @@ -272,8 +292,7 @@ class MyModuleApi extends DolibarrApi throw new RestException(401, 'Access to instance id='.$this->myobject->id.' of object not allowed for login '.DolibarrApiAccess::$user->login); } - if (!$this->myobject->delete(DolibarrApiAccess::$user)) - { + if (!$this->myobject->delete(DolibarrApiAccess::$user)) { throw new RestException(500, 'Error when deleting MyObject : '.$this->myobject->error); } @@ -338,8 +357,7 @@ class MyModuleApi extends DolibarrApi // If object has lines, remove $db property if (isset($object->lines) && is_array($object->lines) && count($object->lines) > 0) { $nboflines = count($object->lines); - for ($i = 0; $i < $nboflines; $i++) - { + for ($i = 0; $i < $nboflines; $i++) { $this->_cleanObjectDatas($object->lines[$i]); unset($object->lines[$i]->lines); @@ -362,9 +380,12 @@ class MyModuleApi extends DolibarrApi { $myobject = array(); foreach ($this->myobject->fields as $field => $propfield) { - if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) continue; // Not a mandatory field - if (!isset($data[$field])) + if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) { + continue; // Not a mandatory field + } + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $myobject[$field] = $data[$field]; } return $myobject; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index e7da913f39c..2c96190e232 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -232,8 +232,12 @@ class MyObject extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } // Example to show how to set values of fields definition dynamically /*if ($user->rights->mymodule->myobject->read) { @@ -242,23 +246,17 @@ class MyObject extends CommonObject }*/ // Unset fields that are disabled - foreach ($this->fields as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) - { + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { unset($this->fields[$key]); } } // Translate some data of arrayofkeyval - if (is_object($langs)) - { - foreach ($this->fields as $key => $val) - { - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) - { - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); } } @@ -275,7 +273,11 @@ class MyObject extends CommonObject */ public function create(User $user, $notrigger = false) { - return $this->createCommon($user, $notrigger); + $resultcreate = $this->createCommon($user, $notrigger); + + //$resultvalidate = $this->validate($user, $notrigger); + + return $resultcreate; } /** @@ -298,7 +300,9 @@ class MyObject extends CommonObject // Load source object $result = $object->fetchCommon($fromid); - if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } // get lines so they will be clone //foreach($this->lines as $line) @@ -310,21 +314,28 @@ class MyObject extends CommonObject unset($object->import_key); // Clear fields - if (property_exists($object, 'ref')) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; - if (property_exists($object, 'label')) $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; - if (property_exists($object, 'status')) { $object->status = self::STATUS_DRAFT; } - if (property_exists($object, 'date_creation')) { $object->date_creation = dol_now(); } - if (property_exists($object, 'date_modification')) { $object->date_modification = null; } + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } // ... // Clear extrafields that are unique - if (is_array($object->array_options) && count($object->array_options) > 0) - { + if (is_array($object->array_options) && count($object->array_options) > 0) { $extrafields->fetch_name_optionals_label($this->table_element); - foreach ($object->array_options as $key => $option) - { + foreach ($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); - if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) - { + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($object->array_options[$key]); } @@ -340,22 +351,19 @@ class MyObject extends CommonObject $this->errors = $object->errors; } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($this->copy_linked_contact($object, 'internal') < 0) - { + if ($this->copy_linked_contact($object, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if (property_exists($this, 'socid') && $this->socid == $object->socid) - { - if ($this->copy_linked_contact($object, 'external') < 0) + if (property_exists($this, 'fk_soc') && $this->fk_soc == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { $error++; + } } } @@ -381,7 +389,9 @@ class MyObject extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } return $result; } @@ -419,10 +429,13 @@ class MyObject extends CommonObject $records = array(); $sql = 'SELECT '; - $sql .= $this->getFieldList(); + $sql .= $this->getFieldList('t'); $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; - else $sql .= ' WHERE 1 = 1'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } // Manage filter $sqlwhere = array(); if (count($filter) > 0) { @@ -455,8 +468,7 @@ class MyObject extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < ($limit ? min($limit, $num) : $num)) - { + while ($i < ($limit ? min($limit, $num) : $num)) { $obj = $this->db->fetch_object($resql); $record = new self($this->db); @@ -512,8 +524,7 @@ class MyObject extends CommonObject */ public function deleteLine(User $user, $idline, $notrigger = false) { - if ($this->status < 0) - { + if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -538,8 +549,7 @@ class MyObject extends CommonObject $error = 0; // Protection - if ($this->status == self::STATUS_VALIDATED) - { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -557,8 +567,7 @@ class MyObject extends CommonObject $this->db->begin(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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 { $num = $this->ref; @@ -570,57 +579,58 @@ class MyObject extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql .= " SET ref = '".$this->db->escape($num)."',"; $sql .= " status = ".self::STATUS_VALIDATED; - if (!empty($this->fields['date_validation'])) $sql .= ", date_validation = '".$this->db->idate($now)."'"; - if (!empty($this->fields['fk_user_valid'])) $sql .= ", fk_user_valid = ".$user->id; - $sql .= " WHERE rowid = ".$this->id; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."'"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".((int) $user->id); + } + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::validate()", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('MYOBJECT_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'myobject/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'myobject/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->mymodule->dir_output.'/myobject/'.$oldref; $dirdest = $conf->mymodule->dir_output.'/myobject/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->mymodule->dir_output.'/myobject/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -633,14 +643,12 @@ class MyObject extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->status = self::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -660,8 +668,7 @@ class MyObject extends CommonObject public function setDraft($user, $notrigger = 0) { // Protection - if ($this->status <= self::STATUS_DRAFT) - { + if ($this->status <= self::STATUS_DRAFT) { return 0; } @@ -685,8 +692,7 @@ class MyObject extends CommonObject public function cancel($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_VALIDATED) - { + if ($this->status != self::STATUS_VALIDATED) { return 0; } @@ -710,8 +716,7 @@ class MyObject extends CommonObject public function reopen($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_CANCELED) - { + if ($this->status != self::STATUS_CANCELED) { return 0; } @@ -739,7 +744,9 @@ class MyObject extends CommonObject { global $conf, $langs, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -752,34 +759,47 @@ class MyObject extends CommonObject $url = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + 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.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } - $linkstart = '<a href="'.$url.'"'; + if ($option == 'nolink') { + $linkstart = '<span'; + } else { + $linkstart = '<a href="'.$url.'"'; + } $linkstart .= $linkclose.'>'; - $linkend = '</a>'; + if ($option == 'nolink') { + $linkend = '</span>'; + } else { + $linkend = '</a>'; + } $result .= $linkstart; if (empty($this->showphoto_on_popup)) { - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } } else { if ($withpicto) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -805,7 +825,9 @@ class MyObject extends CommonObject } } - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -814,8 +836,11 @@ class MyObject extends CommonObject $hookmanager->initHooks(array('myobjectdao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -842,8 +867,7 @@ class MyObject extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule@mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); @@ -856,7 +880,9 @@ class MyObject extends CommonObject $statusType = 'status'.$status; //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_CANCELED) $statusType = 'status6'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -872,30 +898,25 @@ class MyObject extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -935,8 +956,7 @@ class MyObject extends CommonObject $objectline = new MyObjectLine($this->db); $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_myobject = '.$this->id)); - if (is_numeric($result)) - { + if (is_numeric($result)) { $this->error = $this->error; $this->errors = $this->errors; return $result; @@ -960,8 +980,7 @@ class MyObject extends CommonObject $conf->global->MYMODULE_MYOBJECT_ADDON = 'mod_myobject_standard'; } - if (!empty($conf->global->MYMODULE_MYOBJECT_ADDON)) - { + if (!empty($conf->global->MYMODULE_MYOBJECT_ADDON)) { $mybool = false; $file = $conf->global->MYMODULE_MYOBJECT_ADDON.".php"; @@ -969,16 +988,14 @@ class MyObject extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/mymodule/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -987,8 +1004,7 @@ class MyObject extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($this); - if ($numref != '' && $numref != '-1') - { + if ($numref != '' && $numref != '-1') { return $numref; } else { $this->error = $obj->error; diff --git a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php index 46fe523600d..82632773c87 100644 --- a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php +++ b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software: you can redistribute it and/or modify @@ -77,6 +77,12 @@ class mymodulewidget1 extends ModeleBoxes */ public $info_box_contents = array(); + /** + * @var string Widget type ('graph' means the widget is a graph widget) + */ + public $widgettype = 'graph'; + + /** * Constructor * @@ -200,7 +206,7 @@ class mymodulewidget1 extends ModeleBoxes * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines * @param int $nooutput No print, only return string - * @return void + * @return string */ public function showBox($head = null, $contents = null, $nooutput = 0) { 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 cb6e15695c1..dc797b99a94 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 @@ -48,8 +48,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets global $conf; $this->db = $db; - if (is_array($conf->modules)) - { + if (is_array($conf->modules)) { $this->enabled = in_array('mymodule', $conf->modules) ? 1 : 0; } } @@ -73,8 +72,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets $s .= $langs->trans("Status").': '; $s .= '<select name="filter" class="flat">'; $s .= '<option value="none">&nbsp;</option>'; - foreach ($arraystatus as $status) - { + foreach ($arraystatus as $status) { $s .= '<option value="'.$status.'">'.$status.'</option>'; } $s .= '</select>'; @@ -112,24 +110,23 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets $sql = " select rowid as id, email, firstname, lastname, plan, partner"; $sql .= " from ".MAIN_DB_PREFIX."myobject"; $sql .= " where email IS NOT NULL AND email != ''"; - if (GETPOSTISSET('filter') && GETPOST('filter', 'alphanohtml') != 'none') $sql .= " AND status = '".$this->db->escape(GETPOST('filter', 'alphanohtml'))."'"; + if (GETPOSTISSET('filter') && GETPOST('filter', 'alphanohtml') != 'none') { + $sql .= " AND status = '".$this->db->escape(GETPOST('filter', 'alphanohtml'))."'"; + } $sql .= " ORDER BY email"; // Stocke destinataires dans target $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; dol_syslog("mailinglist_mymodule_myobject.modules.php: mailing ".$num." targets found"); $old = ''; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($old <> $obj->email) - { + if ($old <> $obj->email) { $target[$j] = array( 'email' => $obj->email, 'name' => $obj->lastname, @@ -197,7 +194,9 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets { $a = parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''"); - if ($a < 0) return -1; + if ($a < 0) { + return -1; + } return $a; } } diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 0959a650d6e..d212e10998e 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -144,7 +144,7 @@ class modMyModule extends DolibarrModules $this->langfiles = array("mymodule@mymodule"); // Prerequisites - $this->phpmin = array(5, 5); // Minimum version of PHP required by module + $this->phpmin = array(5, 6); // Minimum version of PHP required by module $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module // Messages at activation @@ -264,20 +264,20 @@ class modMyModule extends DolibarrModules $r = 0; // Add here entries to declare new permissions /* BEGIN MODULEBUILDER PERMISSIONS */ - $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Read objects of MyModule'; // Permission label - $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) - $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) + $this->rights[$r][4] = 'myobject'; + $this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->read) $r++; - $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Create/Update objects of MyModule'; // Permission label - $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) - $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) + $this->rights[$r][4] = 'myobject'; + $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->write) $r++; - $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) + $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used) $this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label - $this->rights[$r][4] = 'myobject'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) - $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->level1->level2) + $this->rights[$r][4] = 'myobject'; + $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->delete) $r++; /* END MODULEBUILDER PERMISSIONS */ @@ -290,6 +290,7 @@ class modMyModule extends DolibarrModules 'fk_menu'=>'', // '' 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'=>'top', // This is a Top menu entry 'titre'=>'ModuleMyModuleName', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'mymodule', 'leftmenu'=>'', 'url'=>'/mymodule/mymoduleindex.php', @@ -306,6 +307,7 @@ class modMyModule extends DolibarrModules 'fk_menu'=>'fk_mainmenu=mymodule', // '' 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 Top menu entry 'titre'=>'MyObject', + 'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'), 'mainmenu'=>'mymodule', 'leftmenu'=>'myobject', 'url'=>'/mymodule/mymoduleindex.php', @@ -410,7 +412,9 @@ class modMyModule extends DolibarrModules global $conf, $langs; $result = $this->_load_tables('/mymodule/sql/'); - if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } // Create extrafields during init //include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -432,19 +436,19 @@ class modMyModule extends DolibarrModules $myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { - if ($myTmpObjectKey == 'MyObject') continue; + if ($myTmpObjectKey == 'MyObject') { + continue; + } if ($myTmpObjectArray['includerefgeneration']) { $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/mymodule/template_myobjects.odt'; $dirodt = DOL_DATA_ROOT.'/doctemplates/mymodule'; $dest = $dirodt.'/template_myobjects.odt'; - if (file_exists($src) && !file_exists($dest)) - { + if (file_exists($src) && !file_exists($dest)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_mkdir($dirodt); $result = dol_copy($src, $dest, 0, 0); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest); return 0; 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 d6cb191a405..3e389c1757f 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 @@ -98,7 +98,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -129,8 +131,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { @@ -140,7 +141,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -159,8 +162,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': <b>'; //$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':''; $texte .= count($listoffiles); @@ -168,11 +170,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $texte .= '</b>'; } - if ($nbofiles) - { + if ($nbofiles) { $texte .= '<div id="div_'.get_class($this).'" class="hidden">'; - foreach ($listoffiles as $file) - { + foreach ($listoffiles as $file) { $texte .= $file['name'].'<br>'; } $texte .= '</div>'; @@ -208,37 +208,34 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->commande->dir_output) - { + if ($conf->commande->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Commande($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -246,20 +243,19 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $dir = $conf->commande->multidir_output[isset($object->entity) ? $object->entity : 1]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -269,10 +265,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -289,16 +286,14 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -326,8 +321,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -343,8 +337,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); return -1; @@ -359,8 +352,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); } @@ -374,7 +366,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -383,19 +377,20 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { if (preg_match('/logo$/', $key)) { // Image - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else { // Text $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -404,32 +399,26 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -437,8 +426,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); return -1; @@ -446,12 +434,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -483,8 +469,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object 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 cb9e4f0a6dd..ca3c925dd51 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 @@ -80,9 +80,9 @@ class pdf_standard_myobject extends ModelePDFMyObject */ public $version = 'dolibarr'; - /** - * @var int page_largeur - */ + /** + * @var int page_largeur + */ public $page_largeur; /** @@ -128,7 +128,7 @@ class pdf_standard_myobject extends ModelePDFMyObject /** - * @var array of document table collumns + * @var array of document table columns */ public $cols; @@ -163,7 +163,9 @@ class pdf_standard_myobject extends ModelePDFMyObject // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff @@ -201,9 +203,13 @@ class pdf_standard_myobject extends ModelePDFMyObject dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!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")); @@ -226,67 +232,65 @@ class pdf_standard_myobject extends ModelePDFMyObject $realpatharray = array(); $this->atleastonephoto = false; /* - if (!empty($conf->global->MAIN_GENERATE_MYOBJECT_WITH_PICTURE)) - { - $objphoto = new Product($this->db); + if (!empty($conf->global->MAIN_GENERATE_MYOBJECT_WITH_PICTURE)) + { + $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) + { + if (empty($object->lines[$i]->fk_product)) continue; - $objphoto->fetch($object->lines[$i]->fk_product); - //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { - $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; - $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; - } else { - $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default - $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative - } + $objphoto->fetch($object->lines[$i]->fk_product); + //var_dump($objphoto->ref);exit; + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) + { + $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; + $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; + } else { + $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default + $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative + } - $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { - $dir = $conf->product->dir_output.'/'.$midir; + $arephoto = false; + foreach ($pdir as $midir) + { + if (!$arephoto) + { + $dir = $conf->product->dir_output.'/'.$midir; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { - $filename = $obj['photo_vignette']; - } else { - $filename = $obj['photo']; - } - } else { - $filename = $obj['photo']; - } + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) + { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + { + if ($obj['photo_vignette']) + { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } + } else { + $filename = $obj['photo']; + } - $realpath = $dir.$filename; - $arephoto = true; - $this->atleastonephoto = true; - } - } - } + $realpath = $dir.$filename; + $arephoto = true; + $this->atleastonephoto = true; + } + } + } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; - } - } + if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + } + } */ //if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva; - if ($conf->mymodule->dir_output.'/myobject') - { + if ($conf->mymodule->dir_output.'/myobject') { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->mymodule->dir_output.'/myobject'; $file = $dir."/SPECIMEN.pdf"; } else { @@ -294,20 +298,16 @@ class pdf_standard_myobject extends ModelePDFMyObject $dir = $conf->mymodule->dir_output.'/myobject/'.$objectref; $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -328,16 +328,14 @@ class pdf_standard_myobject extends ModelePDFMyObject $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')) - { + 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)) - { + 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); } @@ -351,7 +349,9 @@ class pdf_standard_myobject extends ModelePDFMyObject $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); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } // Set certificate $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; @@ -374,7 +374,9 @@ class pdf_standard_myobject extends ModelePDFMyObject // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); @@ -386,7 +388,9 @@ class pdf_standard_myobject extends ModelePDFMyObject $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; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $tab_height_newpage -= $top_shift; + } $nexY = $tab_top - 1; @@ -394,14 +398,12 @@ class pdf_standard_myobject extends ModelePDFMyObject $notetoshow = empty($object->note_public) ? '' : $object->note_public; // Extrafields in note $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { + if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; @@ -420,16 +422,19 @@ class pdf_standard_myobject extends ModelePDFMyObject $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + 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); + 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. @@ -445,8 +450,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -483,8 +487,12 @@ class pdf_standard_myobject extends ModelePDFMyObject // 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); + 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 @@ -495,15 +503,18 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -528,15 +539,16 @@ class pdf_standard_myobject extends ModelePDFMyObject // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -545,25 +557,26 @@ class pdf_standard_myobject extends ModelePDFMyObject $showpricebeforepagebreak = 1; $posYAfterImage = 0; - if ($this->getColumnStatus('photo')) - { + 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -571,15 +584,13 @@ class pdf_standard_myobject extends ModelePDFMyObject } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + 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. @@ -588,20 +599,22 @@ class pdf_standard_myobject extends ModelePDFMyObject $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 - { + 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); + 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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -624,8 +637,7 @@ class pdf_standard_myobject extends ModelePDFMyObject // Quantity // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { + if ($this->getColumnStatus('qty')) { $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $this->printStdColumnContent($pdf, $curY, 'qty', $qty); $nexY = max($pdf->GetY(), $nexY); @@ -634,8 +646,7 @@ class pdf_standard_myobject extends ModelePDFMyObject // Extrafields if (!empty($object->lines[$i]->array_options)) { foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { + if ($this->getColumnStatus($extrafieldColKey)) { $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); $nexY = max($pdf->GetY(), $nexY); @@ -659,13 +670,18 @@ class pdf_standard_myobject extends ModelePDFMyObject $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 (!empty($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; + if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) { // Compute progress from previous situation + if (!empty($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 (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $sign * $object->lines[$i]->total_tva; + if (!empty($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; @@ -675,16 +691,21 @@ class pdf_standard_myobject extends ModelePDFMyObject $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; // 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 - { + && (!empty($localtax1_rate) || !empty($localtax2_rate))) { // and there is local tax $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); $localtax1_type = isset($localtaxtmp_array[0]) ? $localtaxtmp_array[0] : ''; $localtax2_type = isset($localtaxtmp_array[2]) ? $localtaxtmp_array[2] : ''; @@ -698,8 +719,12 @@ class pdf_standard_myobject extends ModelePDFMyObject $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; + 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); @@ -725,7 +750,9 @@ class pdf_standard_myobject extends ModelePDFMyObject $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 (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) { @@ -737,15 +764,18 @@ class pdf_standard_myobject extends ModelePDFMyObject $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + 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 { @@ -761,15 +791,17 @@ class pdf_standard_myobject extends ModelePDFMyObject // 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); - } - */ + 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(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -780,14 +812,14 @@ class pdf_standard_myobject extends ModelePDFMyObject $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -837,7 +869,9 @@ class pdf_standard_myobject extends ModelePDFMyObject // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -846,8 +880,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { $titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency)); if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) { $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency)); @@ -899,8 +932,7 @@ class pdf_standard_myobject extends ModelePDFMyObject pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($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); } @@ -915,20 +947,18 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -959,8 +989,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 == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -969,19 +998,16 @@ class pdf_standard_myobject extends ModelePDFMyObject $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -989,15 +1015,14 @@ class pdf_standard_myobject extends ModelePDFMyObject } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -1011,8 +1036,7 @@ class pdf_standard_myobject extends ModelePDFMyObject } $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date, "day", false, $outputlangs), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -1020,11 +1044,9 @@ class pdf_standard_myobject extends ModelePDFMyObject } // Get contact - if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) - { + if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usertmp = new User($this->db); $usertmp->fetch($arrayidcontact[0]); $posy += 4; @@ -1040,13 +1062,11 @@ class pdf_standard_myobject extends ModelePDFMyObject // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); @@ -1054,7 +1074,9 @@ class pdf_standard_myobject extends ModelePDFMyObject $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -1084,8 +1106,7 @@ class pdf_standard_myobject extends ModelePDFMyObject // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1105,11 +1126,15 @@ class pdf_standard_myobject extends ModelePDFMyObject // Show recipient $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100; - if ($this->page_largeur < 210) $widthrecbox = 84; // To work with US executive format + if ($this->page_largeur < 210) { + $widthrecbox = 84; // To work with US executive format + } $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->page_largeur - $this->marge_droite - $widthrecbox; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->marge_gauche; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->marge_gauche; + } // Show recipient frame $pdf->SetTextColor(0, 0, 0); @@ -1179,22 +1204,22 @@ class pdf_standard_myobject extends ModelePDFMyObject ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); + */ $rank = 0; // do not use negative rank $this->cols['desc'] = array( @@ -1230,8 +1255,7 @@ class pdf_standard_myobject extends ModelePDFMyObject 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) - { + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) { $this->cols['photo']['status'] = true; } @@ -1247,8 +1271,7 @@ class pdf_standard_myobject extends ModelePDFMyObject '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)) - { + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) { $this->cols['vat']['status'] = true; } @@ -1285,8 +1308,7 @@ class pdf_standard_myobject extends ModelePDFMyObject 'border-left' => true, // add left line separator ); - if ($this->situationinvoice) - { + if ($this->situationinvoice) { $this->cols['progress']['status'] = true; } @@ -1344,11 +1366,9 @@ class pdf_standard_myobject extends ModelePDFMyObject ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index ae5f5d1e876..9c685e65d9a 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -113,8 +113,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject /*$mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type;*/ - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -135,8 +134,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject // We get cursor rule $mask = $conf->global->MYMODULE_MYOBJECT_ADVANCED_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } 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 6f1a5da7dd3..75068cf8d57 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php @@ -96,13 +96,13 @@ class mod_myobject_standard extends ModeleNumRefMyObject } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -133,11 +133,13 @@ class mod_myobject_standard extends ModeleNumRefMyObject } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_myobject_standard::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +149,11 @@ class mod_myobject_standard extends ModeleNumRefMyObject $date = $object->date_creation; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_myobject_standard::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php b/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php index 78711e33a4d..8f0d86e3823 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php @@ -141,10 +141,18 @@ abstract class ModeleNumRefMyObject global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php index 06e3498fca0..67aac8c0e98 100644 --- a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php +++ b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php @@ -16,8 +16,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; } @@ -36,12 +35,13 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("mymodule"); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> <tr class="<?php echo $trclass; ?>"> <td><?php echo $langs->trans("MyObject"); ?></td> 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 8c0f39927bd..28868add880 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 @@ -92,7 +92,9 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers */ public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) { - if (empty($conf->mymodule->enabled)) return 0; // If module is not enabled, we do nothing + if (empty($conf->mymodule) || empty($conf->mymodule->enabled)) { + return 0; // If module is not enabled, we do nothing + } // Put here code you want to execute when a Dolibarr business events occurs. // Data and type of action are stored into $object and $action diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index af1566c0869..985cbe6aa18 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -23,14 +23,26 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url. -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +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('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('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} session_cache_limiter('public'); // false or '' = keep cache instruction added by server @@ -40,22 +52,35 @@ session_cache_limiter('public'); // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/../main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/../main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/../main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/../main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS -/*if (empty($user->id) && ! empty($_SESSION['dol_login'])) -{ +/*if (empty($user->id) && ! empty($_SESSION['dol_login'])) { $user->fetch('',$_SESSION['dol_login']); $user->getrights(); }*/ @@ -65,8 +90,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; header('Content-type: text/css'); // Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access. // You can use CTRL+F5 to refresh your browser cache. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} ?> diff --git a/htdocs/modulebuilder/template/js/mymodule.js.php b/htdocs/modulebuilder/template/js/mymodule.js.php index b257e23fb48..fe04cdc2ad9 100644 --- a/htdocs/modulebuilder/template/js/mymodule.js.php +++ b/htdocs/modulebuilder/template/js/mymodule.js.php @@ -17,16 +17,36 @@ * Library javascript to enable Browser notifications */ -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', 1); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} /** @@ -38,23 +58,40 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/../main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/../main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/../main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/../main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} // Define js type header('Content-Type: application/javascript'); // Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access. // You can use CTRL+F5 to refresh your browser cache. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=3600, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} ?> /* Javascript library of module MyModule */ diff --git a/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php index ebd5b837e3d..e3117d88303 100644 --- a/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php +++ b/htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php @@ -41,14 +41,19 @@ function myobjectPrepareHead($object) $head[$h][2] = 'card'; $h++; - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) - { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : ''); + if ($nbNote > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : ''); + } $head[$h][2] = 'note'; $h++; } @@ -60,7 +65,9 @@ function myobjectPrepareHead($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php index 3da38a7e02c..2d262aeeb36 100644 --- a/htdocs/modulebuilder/template/mymoduleindex.php +++ b/htdocs/modulebuilder/template/mymoduleindex.php @@ -27,17 +27,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -48,10 +64,11 @@ $action = GETPOST('action', 'aZ09'); // Security check -//if (! $user->rights->mymodule->myobject->read) accessforbidden(); +// if (! $user->rights->mymodule->myobject->read) { +// accessforbidden(); +// } $socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) -{ +if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 541d971013f..8aef8558c8b 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -46,17 +46,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -70,29 +86,37 @@ $langs->loadLangs(array("mymodule@mymodule", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); + $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'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical objects $object = new MyObject($db); @@ -104,12 +128,14 @@ $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->mymodule->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mymodule->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); +// if ($user->socid > 0) accessforbidden(); +// if ($user->socid > 0) $socid = $user->socid; +// $result = restrictedArea($user, 'mymodule', $object->id); $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php @@ -120,20 +146,19 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the incl $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -147,14 +172,15 @@ if (empty($reshook)) $form = new Form($db); -if ($object->id > 0) -{ +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 = ''; + $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = myobjectPrepareHead($object); @@ -172,14 +198,13 @@ if ($object->id > 0) // Thirdparty $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) - { + if (! empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + } $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); @@ -228,10 +253,11 @@ if ($object->id > 0) $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) - { + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objthirdparty) == 'Societe') $out .= '&socid='.urlencode($objthirdparty->id); + if (get_class($objthirdparty) == 'Societe') { + $out .= '&socid='.urlencode($objthirdparty->id); + } $out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : '').'&percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); @@ -241,10 +267,8 @@ if ($object->id > 0) print '<div class="tabsAction">'; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; @@ -253,11 +277,14 @@ if ($object->id > 0) print '</div>'; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } //print load_fiche_titre($langs->trans("ActionsOnMyObject"), '', ''); diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 78b9f5f7cb9..fe4cd496df0 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -46,17 +46,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -69,11 +85,11 @@ $langs->loadLangs(array("mymodule@mymodule", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$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 +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); //$lineid = GETPOST('lineid', 'int'); @@ -92,12 +108,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -113,9 +132,9 @@ $upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object- // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +//if (empty($conf->mymodule->enabled)) accessforbidden(); //if (empty($permissiontoread)) accessforbidden(); @@ -125,18 +144,22 @@ $upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object- $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/mymodule/myobject_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_buildpath('/mymodule/myobject_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } @@ -157,12 +180,10 @@ if (empty($reshook)) // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'set_thirdparty' && $permissiontoadd) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -207,15 +228,18 @@ jQuery(document).ready(function() { // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("MyObject")), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(array(), ''); @@ -246,16 +270,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("MyObject"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -279,8 +306,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = myobjectPrepareHead($object); @@ -304,8 +330,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of action xxxx - if ($action == 'xxx') - { + if ($action == 'xxx') { $formquestion = array(); /* $forcecombo=0; @@ -323,8 +348,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -342,12 +370,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (! empty($conf->projet->enabled)) - { + if (! empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { + if ($permissiontoadd) { //if ($action != 'classify') $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; $morehtmlref .= ' : '; if ($action == 'classify') { @@ -404,8 +430,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea * Lines */ - if (!empty($object->table_element_line)) - { + if (!empty($object->table_element_line)) { // Show object lines $result = $object->getLinesArray(); @@ -421,21 +446,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } print '<div class="div-table-responsive-no-min">'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { print '<table id="tablelines" class="noborder noshadow" width="100%">'; } - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); } // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') - { - if ($action != 'editline') - { + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { // Add products/services form $object->formAddObjectLine(1, $mysoc, $soc); @@ -444,8 +465,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { print '</table>'; } print '</div>'; @@ -460,10 +480,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle'); @@ -478,7 +499,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Validate if ($object->status == $object::STATUS_DRAFT) { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', $permissiontoadd); } else { $langs->load("errors"); @@ -491,20 +512,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd); /* - if ($permissiontoadd) - { + if ($permissiontoadd) { if ($object->status == $object::STATUS_ENABLED) { - print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable">'.$langs->trans("Disable").'</a>'."\n"; + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n"; } else { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable">'.$langs->trans("Enable").'</a>'."\n"; + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").'</a>'."\n"; } } - if ($permissiontoadd) - { + if ($permissiontoadd) { if ($object->status == $object::STATUS_VALIDATED) { - print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close">'.$langs->trans("Cancel").'</a>'."\n"; + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken().'">'.$langs->trans("Cancel").'</a>'."\n"; } else { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Re-Open").'</a>'."\n"; + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n"; } } */ @@ -521,8 +540,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -561,7 +579,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'myobject'; diff --git a/htdocs/modulebuilder/template/myobject_contact.php b/htdocs/modulebuilder/template/myobject_contact.php index c48a997aba4..4817efe5e9b 100644 --- a/htdocs/modulebuilder/template/myobject_contact.php +++ b/htdocs/modulebuilder/template/myobject_contact.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -73,36 +89,30 @@ $permission = $user->rights->mymodule->myobject->write; * Add a new contact */ -if ($action == 'addcontact' && $permission) -{ +if ($action == 'addcontact' && $permission) { $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} // Toggle the status of a contact -elseif ($action == 'swapstatut' && $permission) -{ - $result = $object->swapContactStatus(GETPOST('ligne')); -} // Deletes a contact -elseif ($action == 'deletecontact' && $permission) -{ +} elseif ($action == 'swapstatut' && $permission) { + // Toggle the status of a contact + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); +} elseif ($action == 'deletecontact' && $permission) { + // Deletes a contact $result = $object->delete_contact($lineid); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -132,8 +142,7 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -191,10 +200,11 @@ if ($object->id) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 64a7075348d..47c88270e8b 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -46,17 +46,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -79,12 +95,18 @@ $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 = $liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} //if (! $sortfield) $sortfield="position_name"; // Initialize technical objects @@ -98,7 +120,9 @@ $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->mymodule->multidir_output[$object->entity ? $object->entity : $conf->entity]."/myobject/".get_exdir(0, 0, 0, 1, $object); +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mymodule->multidir_output[$object->entity ? $object->entity : $conf->entity]."/myobject/".get_exdir(0, 0, 0, 1, $object); +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); @@ -113,7 +137,7 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the incl * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -127,8 +151,7 @@ $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -140,8 +163,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index a27ddb524a3..597a7d088df 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -46,17 +46,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -79,7 +95,7 @@ $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') +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $id = GETPOST('id', 'int'); @@ -88,7 +104,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -106,22 +124,33 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) { reset($object->fields); $sortfield="t.".key($object->fields); } // Set here default search field. By default 1st field in definition. Reset is required to avoid key() to return null. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of array of fields for columns @@ -150,14 +179,15 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; $permissiontodelete = $user->rights->mymodule->myobject->delete; // Security check -if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled'); +if (empty($conf->mymodule->enabled)) { + accessforbidden('Module not enabled'); +} $socid = 0; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } -//$result = restrictedArea($user, 'mymodule', $id, ''); +//$result = restrictedArea($user, 'mymodule'); //if (!$permissiontoread) accessforbidden(); @@ -166,30 +196,38 @@ if ($user->socid > 0) // Protection if external user * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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 foreach ($object->fields as $key => $val) { $search[$key] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } } $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')) - { + || 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 } @@ -213,18 +251,19 @@ $now = dol_now(); //$help_url="EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject"; $help_url = ''; $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("MyObjects")); +$morejs = array(); +$morecss = array(); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ - $sql .= 't.'.$key.', '; -} +$sql .= $object->getFieldList('t'); // 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(); @@ -232,24 +271,50 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; +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) -{ - 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 ($object->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; +} else { + $sql .= " WHERE 1 = 1"; +} +foreach ($search as $key => $val) { + if (array_key_exists($key, $object->fields)) { + 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) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) { + if ($search[$key] == '-1' || $search[$key] === '0') { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + } + } + } + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -260,8 +325,7 @@ $sql .= $hookmanager->resPrint; /* If a group by is required $sql.= " GROUP BY "; -foreach($object->fields as $key => $val) -{ +foreach($object->fields as $key => $val) { $sql.='t.'.$key.', '; } // Add fields from extrafields @@ -291,7 +355,9 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); if (!$resql) { @@ -303,8 +369,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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); @@ -315,7 +380,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); // Example : Adding jquery code print '<script type="text/javascript" language="javascript"> @@ -335,14 +400,24 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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 @@ -352,17 +427,23 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -381,9 +462,10 @@ $objecttmp = new MyObject($db); $trackid = 'xxxx'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -394,11 +476,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -415,20 +499,33 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '</div>'; + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '</div>'; + } print '</td>'; } } @@ -450,15 +547,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); - 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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -475,11 +575,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -488,38 +588,51 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - 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'; + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && !in_array($key, array('rowid', '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'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -532,14 +645,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -550,10 +666,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -569,10 +688,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index f56585497ea..0868cd3918d 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -46,17 +46,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} dol_include_once('/mymodule/class/myobject.class.php'); dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); @@ -86,7 +102,9 @@ $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->mymodule->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mymodule->multidir_output[$object->entity]."/".$object->id; +} $permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php @@ -110,8 +128,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans('MyObject'), $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = myobjectPrepareHead($object); diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php index 0b8d7abfdfe..f0a7ca715a4 100644 --- a/htdocs/modulebuilder/template/scripts/mymodule.php +++ b/htdocs/modulebuilder/template/scripts/mymodule.php @@ -23,6 +23,29 @@ * \brief This file is an example for a command line script for module MyModule */ +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification +if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions + + $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); $path = __DIR__.'/'; @@ -46,13 +69,25 @@ define('EVEN_IF_ONLY_LOGIN_ALLOWED', 1); // Set this define to 0 if you want to $res = 0; // Try master.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/master.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/master.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/master.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/master.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/master.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/master.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/master.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/master.inc.php"; +} // Try master.inc.php using relative path -if (!$res && file_exists("../master.inc.php")) $res = @include "../master.inc.php"; -if (!$res && file_exists("../../master.inc.php")) $res = @include "../../master.inc.php"; -if (!$res && file_exists("../../../master.inc.php")) $res = @include "../../../master.inc.php"; +if (!$res && file_exists("../master.inc.php")) { + $res = @include "../master.inc.php"; +} +if (!$res && file_exists("../../master.inc.php")) { + $res = @include "../../master.inc.php"; +} +if (!$res && file_exists("../../../master.inc.php")) { + $res = @include "../../../master.inc.php"; +} if (!$res) { print "Include of master fails"; exit(-1); @@ -65,7 +100,9 @@ $langs->load("main"); // To load language file for default language // Load user and its permissions $result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user. -if (!$result > 0) { dol_print_error('', $user->error); exit; } +if (!$result > 0) { + dol_print_error('', $user->error); exit; +} $user->getrights(); @@ -162,8 +199,7 @@ else // -------------------- END OF YOUR CODE -------------------- -if (!$error) -{ +if (!$error) { $db->commit(); print '--- end ok'."\n"; } else { diff --git a/htdocs/mrp/ajax/ajax_bom.php b/htdocs/mrp/ajax/ajax_bom.php index adf4a8f4ee7..280a0c98cdd 100644 --- a/htdocs/mrp/ajax/ajax_bom.php +++ b/htdocs/mrp/ajax/ajax_bom.php @@ -22,13 +22,25 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; @@ -43,12 +55,11 @@ $action = GETPOST('action', 'aZ09'); $object = new BOM($db); $result = $object->fetch($idbom); -if ($result > 0) -{ +if ($result > 0) { // We remove properties we don't need in answer unset($object->fields); unset($object->db); echo json_encode($object); } else { - echo 'Failed to load category with id='.$idbom; + 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 281ec0fb731..48f93976d29 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -98,6 +98,10 @@ class Mos extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->mrp->read) { + throw new RestException(401); + } + $obj_ret = array(); $tmpobject = new Mo($this->db); diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 0f57f52f91a..d7635b9a78e 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -66,26 +66,30 @@ class Mo extends CommonObject const STATUS_CANCELED = 9; - /** - * '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' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[: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. - * '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). 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) + * 'picto' is code of a picto to show before value in forms + * '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). - * 'default' is a default value for creation (can still be replaced by the global setup of default values) + * '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_...). - * 'position' is the sort order of field. * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). - * 'css' is the CSS style to use on field. For example: 'maxwidth200' - * 'help' is a string visible as a tooltip on field - * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. * '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 @@ -96,7 +100,7 @@ class Mo extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>'1', 'noteditable'=>1), - 'fk_bom' => array('type'=>'integer:Bom:bom/class/bom.class.php:0:t.status=1', 'filter'=>'active=1', 'label'=>'BOM', 'enabled'=>1, 'visible'=>1, 'position'=>33, 'notnull'=>-1, 'index'=>1, 'comment'=>"Original BOM", 'css'=>'minwidth100 maxwidth300'), + 'fk_bom' => array('type'=>'integer:Bom:bom/class/bom.class.php:0:t.status=1', 'filter'=>'active=1', 'label'=>'BOM', 'enabled'=>1, 'visible'=>1, 'position'=>33, 'notnull'=>-1, 'index'=>1, 'comment'=>"Original BOM", 'css'=>'minwidth100 maxwidth300', 'csslist'=>'nowraponall'), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'picto'=>'product'), 'qty' => array('type'=>'real', 'label'=>'QtyToProduce', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>1, 'comment'=>"Qty to produce", 'css'=>'width75', 'default'=>1, 'isameasure'=>1), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'1',), @@ -168,7 +172,7 @@ class Mo extends CommonObject /** * @var string Name of subtable line */ - public $table_element_line = 'mo_production'; + public $table_element_line = 'mrp_production'; /** * @var string Field with ID of parent key if this field has a parent @@ -208,25 +212,24 @@ class Mo extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } // Unset fields that are disabled - foreach ($this->fields as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) - { + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { unset($this->fields[$key]); } } // Translate some data of arrayofkeyval - foreach ($this->fields as $key => $val) - { - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) - { - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); } } @@ -249,7 +252,8 @@ class Mo extends CommonObject $this->db->begin(); - if ($this->fk_product > 0) { + // Check that product is not a kit/virtual product + if (empty($conf->global->ALLOW_USE_KITS_INTO_BOM_AND_MO) and $this->fk_product > 0) { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $tmpproduct = new Product($this->db); $tmpproduct->fetch($this->fk_product); @@ -261,7 +265,6 @@ class Mo extends CommonObject } } - // Check that product is not a kit/virtual product if (!$error) { $idcreated = $this->createCommon($user, $notrigger); if ($idcreated <= 0) { @@ -305,7 +308,9 @@ class Mo extends CommonObject // Load source object $result = $object->fetchCommon($fromid); - if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } // get lines so they will be clone //foreach($this->lines as $line) @@ -322,14 +327,11 @@ class Mo extends CommonObject $object->status = self::STATUS_DRAFT; // ... // Clear extrafields that are unique - if (is_array($object->array_options) && count($object->array_options) > 0) - { + if (is_array($object->array_options) && count($object->array_options) > 0) { $extrafields->fetch_name_optionals_label($this->table_element); - foreach ($object->array_options as $key => $option) - { + foreach ($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); - if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) - { + if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) { //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($object->array_options[$key]); } @@ -345,22 +347,19 @@ class Mo extends CommonObject $this->errors = $object->errors; } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($this->copy_linked_contact($object, 'internal') < 0) - { + if ($this->copy_linked_contact($object, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if (property_exists($this, 'socid') && $this->socid == $object->socid) - { - if ($this->copy_linked_contact($object, 'external') < 0) + if (property_exists($this, 'socid') && $this->socid == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { $error++; + } } } @@ -386,7 +385,9 @@ class Mo extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } return $result; } @@ -426,8 +427,11 @@ class Mo extends CommonObject $sql = 'SELECT '; $sql .= $this->getFieldList(); $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; - else $sql .= ' WHERE 1 = 1'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } // Manage filter $sqlwhere = array(); if (count($filter) > 0) { @@ -458,8 +462,7 @@ class Mo extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($limit, $num)) - { + while ($i < min($limit, $num)) { $obj = $this->db->fetch_object($resql); $record = new self($this->db); @@ -496,8 +499,11 @@ class Mo extends CommonObject $sql .= $mostatic->getFieldList(); $sql .= ' FROM '.MAIN_DB_PREFIX.$mostatic->table_element.' as t'; $sql .= " WHERE t.role = '".$this->db->escape($role)."'"; - if ($lineid > 0) $sql .= ' AND t.fk_mrp_production = '.$lineid; - else $sql .= 'AND t.fk_mo = '.$this->id; + if ($lineid > 0) { + $sql .= ' AND t.fk_mrp_production = '.$lineid; + } else { + $sql .= 'AND t.fk_mo = '.$this->id; + } $resql = $this->db->query($sql); if ($resql) { @@ -618,8 +624,7 @@ class Mo extends CommonObject $this->db->begin(); // Insert lines in mrp_production table from BOM data - if (!$error) - { + if (!$error) { // TODO Check that production has not started. If yes, we stop here. $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'mrp_production WHERE fk_mo = '.$this->id; @@ -631,9 +636,21 @@ class Mo extends CommonObject $moline->fk_mo = $this->id; $moline->qty = $this->qty; $moline->fk_product = $this->fk_product; - $moline->role = 'toproduce'; $moline->position = 1; + if ($this->fk_bom > 0) { // If a BOM is defined, we know what to consume. + include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; + $bom = new Bom($this->db); + $bom->fetch($this->fk_bom); + if ($bom->bomtype == 1) { + $role = 'toproduce'; + $moline->role = 'toconsume'; + } else { + $role = 'toconsume'; + $moline->role = 'toproduce'; + } + } + $resultline = $moline->create($user, false); // Never use triggers here if ($resultline <= 0) { $error++; @@ -643,18 +660,15 @@ class Mo extends CommonObject } if ($this->fk_bom > 0) { // If a BOM is defined, we know what to consume. - include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; - $bom = new Bom($this->db); - $bom->fetch($this->fk_bom); - if ($bom->id > 0) - { + if ($bom->id > 0) { // Lines to consume if (!$error) { - foreach ($bom->lines as $line) - { + foreach ($bom->lines as $line) { $moline = new MoLine($this->db); $moline->fk_mo = $this->id; + $moline->origin_id = $line->id; + $moline->origin_type = 'bomline'; if ($line->qty_frozen) { $moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce } else { @@ -666,7 +680,7 @@ class Mo extends CommonObject break; } else { $moline->fk_product = $line->fk_product; - $moline->role = 'toconsume'; + $moline->role = $role; $moline->position = $line->position; $moline->qty_frozen = $line->qty_frozen; $moline->disable_stock_change = $line->disable_stock_change; @@ -719,8 +733,7 @@ class Mo extends CommonObject */ public function deleteLine(User $user, $idline, $notrigger = false) { - if ($this->status < 0) - { + if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -741,8 +754,7 @@ class Mo extends CommonObject global $langs, $conf; $langs->load("mrp"); - if (!empty($conf->global->MRP_MO_ADDON)) - { + if (!empty($conf->global->MRP_MO_ADDON)) { $mybool = false; $file = $conf->global->MRP_MO_ADDON.".php"; @@ -750,16 +762,14 @@ class Mo extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/mrp/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -767,8 +777,7 @@ class Mo extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($prod, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -797,8 +806,7 @@ class Mo extends CommonObject $error = 0; // Protection - if ($this->status == self::STATUS_VALIDATED) - { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -816,8 +824,7 @@ class Mo extends CommonObject $this->db->begin(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life $this->fetch_product(); $num = $this->getNextNumRef($this->product); } else { @@ -835,50 +842,47 @@ class Mo extends CommonObject dol_syslog(get_class($this)."::validate()", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('MRP_MO_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'mrp/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'mrp/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->mrp->dir_output.'/'.$oldref; $dirdest = $conf->mrp->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->mrp->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -891,14 +895,12 @@ class Mo extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->status = self::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -917,8 +919,7 @@ class Mo extends CommonObject public function setDraft($user, $notrigger = 0) { // Protection - if ($this->status <= self::STATUS_DRAFT) - { + if ($this->status <= self::STATUS_DRAFT) { return 0; } @@ -942,8 +943,7 @@ class Mo extends CommonObject public function cancel($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_VALIDATED && $this->status != self::STATUS_INPROGRESS) - { + if ($this->status != self::STATUS_VALIDATED && $this->status != self::STATUS_INPROGRESS) { return 0; } @@ -967,8 +967,7 @@ class Mo extends CommonObject public function reopen($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_PRODUCED && $this->status != self::STATUS_CANCELED) - { + if ($this->status != self::STATUS_PRODUCED && $this->status != self::STATUS_CANCELED) { return 0; } @@ -996,7 +995,9 @@ class Mo extends CommonObject { global $conf, $langs, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -1008,35 +1009,44 @@ class Mo extends CommonObject $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; $url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id; - if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; + if ($option == 'production') { + $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; + } - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowMo"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -1044,8 +1054,11 @@ class Mo extends CommonObject $hookmanager->initHooks(array('modao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -1072,8 +1085,7 @@ class Mo extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus)) - { + if (empty($this->labelStatus)) { global $langs; //$langs->load("mrp"); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft'); @@ -1090,10 +1102,18 @@ class Mo extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_INPROGRESS) $statusType = 'status4'; - if ($status == self::STATUS_PRODUCED) $statusType = 'status6'; - if ($status == self::STATUS_CANCELED) $statusType = 'status9'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status1'; + } + if ($status == self::STATUS_INPROGRESS) { + $statusType = 'status4'; + } + if ($status == self::STATUS_PRODUCED) { + $statusType = 'status6'; + } + if ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -1109,30 +1129,25 @@ class Mo extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -1172,8 +1187,7 @@ class Mo extends CommonObject $objectline = new MoLine($this->db); $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_mo = '.$this->id)); - if (is_numeric($result)) - { + if (is_numeric($result)) { $this->error = $this->error; $this->errors = $this->errors; return $result; @@ -1213,7 +1227,9 @@ class Mo extends CommonObject $modelpath = "core/modules/mrp/doc/"; - if (empty($modele)) return 1; // Remove this once a pdf_standard.php exists. + if (empty($modele)) { + return 1; // Remove this once a pdf_standard.php exists. + } return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } @@ -1273,10 +1289,8 @@ class Mo extends CommonObject print '</tr>'; $i = 0; - if (!empty($this->lines)) - { - foreach ($this->lines as $line) - { + if (!empty($this->lines)) { + foreach ($this->lines as $line) { /*if (is_object($hookmanager) && (($line->product_type == 9 && !empty($line->special_code)) || !empty($line->fk_parent_line))) { if (empty($line->fk_parent_line)) @@ -1317,8 +1331,7 @@ class Mo extends CommonObject $this->tpl['id'] = $line->id; $this->tpl['label'] = ''; - if (!empty($line->fk_product)) - { + if (!empty($line->fk_product)) { $productstatic = new Product($this->db); $productstatic->fetch($line->fk_product); $this->tpl['label'] .= $productstatic->getNomUrl(1); @@ -1386,6 +1399,8 @@ class MoLine extends CommonObjectLine public $fields = array( 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), 'fk_mo' =>array('type'=>'integer', 'label'=>'Mo', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15), + 'origin_id' =>array('type'=>'integer', 'label'=>'Origin', 'enabled'=>1, 'visible'=>-1, 'notnull'=>0, 'position'=>17), + 'origin_type' =>array('type'=>'varchar(10)', 'label'=>'Origin type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>0, 'position'=>18), 'position' =>array('type'=>'integer', 'label'=>'Position', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), 'fk_product' =>array('type'=>'integer', 'label'=>'Product', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25), 'fk_warehouse' =>array('type'=>'integer', 'label'=>'Warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>30), @@ -1405,6 +1420,8 @@ class MoLine extends CommonObjectLine public $rowid; public $fk_mo; + public $origin_id; + public $origin_type; public $position; public $fk_product; public $fk_warehouse; @@ -1432,27 +1449,25 @@ class MoLine extends CommonObjectLine $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } // Unset fields that are disabled - foreach ($this->fields as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) - { + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { unset($this->fields[$key]); } } // Translate some data of arrayofkeyval - if (is_object($langs)) - { - foreach ($this->fields as $key => $val) - { - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) - { - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); } } @@ -1487,7 +1502,6 @@ class MoLine extends CommonObjectLine public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); return $result; } @@ -1513,8 +1527,11 @@ class MoLine extends CommonObjectLine $sql = 'SELECT '; $sql .= $this->getFieldList(); $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; - else $sql .= ' WHERE 1 = 1'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } // Manage filter $sqlwhere = array(); if (count($filter) > 0) { @@ -1545,8 +1562,7 @@ class MoLine extends CommonObjectLine if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($limit, $num)) - { + while ($i < min($limit, $num)) { $obj = $this->db->fetch_object($resql); $record = new self($this->db); diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index b84a77c2288..cbb7b5da305 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -61,16 +61,14 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; * Statistics */ -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { $sql = "SELECT COUNT(t.rowid) as nb, status"; $sql .= " FROM ".MAIN_DB_PREFIX."mrp_mo as t"; $sql .= " GROUP BY t.status"; $sql .= " ORDER BY t.status ASC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -79,16 +77,14 @@ if ($conf->use_javascript_ajax) $colorseries = array(); $vals = array(); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $vals[$obj->status] = $obj->nb; - $totalnb += $obj->nb; + $totalnb += $obj->nb; } $i++; } @@ -98,25 +94,32 @@ if ($conf->use_javascript_ajax) print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("ManufacturingOrder").'</th></tr>'."\n"; $listofstatus = array(0, 1, 2, 3, 9); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array($staticmo->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == Mo::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == Mo::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == Mo::STATUS_INPROGRESS) $colorseries[$status] = $badgeStatus4; - if ($status == Mo::STATUS_PRODUCED) $colorseries[$status] = $badgeStatus6; - if ($status == Mo::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; + if ($status == Mo::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == Mo::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == Mo::STATUS_INPROGRESS) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == Mo::STATUS_PRODUCED) { + $colorseries[$status] = $badgeStatus6; + } + if ($status == Mo::STATUS_CANCELED) { + $colorseries[$status] = $badgeStatus9; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print '<tr class="oddeven">'; print '<td>'.$staticmo->LibStatut($status, 0).'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -159,19 +162,16 @@ $sql .= $db->order("a.tms", "DESC"); $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="4">'.$langs->trans("LatestBOMModified", $max).'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $staticbom->id = $obj->rowid; @@ -210,19 +210,16 @@ $sql .= $db->order("a.tms", "DESC"); $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="4">'.$langs->trans("LatestMOModified", $max).'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $staticmo->id = $obj->rowid; diff --git a/htdocs/mrp/js/lib_dispatch.js.php b/htdocs/mrp/js/lib_dispatch.js.php index a02bb0e8f84..8a5eef60211 100644 --- a/htdocs/mrp/js/lib_dispatch.js.php +++ b/htdocs/mrp/js/lib_dispatch.js.php @@ -21,13 +21,27 @@ * \brief File that include javascript functions used for dispatching qty/stock/lot */ -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -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('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', 1); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} session_cache_limiter('public'); @@ -36,8 +50,11 @@ require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} ?> /** @@ -77,9 +94,9 @@ function addDispatchLine(index, type, mode) if (qtyOrdered <= 1) { window.alert("Quantity can't be split"); - } - if (qtyDispatched < qtyOrdered) - { + } else if (qtyDispatched >= qtyOrdered) { + window.alert("No remain qty to dispatch"); + } else if (qtyDispatched < qtyOrdered) { //replace tr suffix nbr var re1 = new RegExp('_'+index+'_1', 'g'); var re2 = new RegExp('-'+index+'-1', 'g'); diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php index eb61c42e83d..62f74ce016e 100644 --- a/htdocs/mrp/lib/mrp_mo.lib.php +++ b/htdocs/mrp/lib/mrp_mo.lib.php @@ -59,14 +59,19 @@ function moPrepareHead($object) $head[$h][2] = 'stockmovement'; $h++; - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) - { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = dol_buildpath('/mrp/mo_note.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + if ($nbNote > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + } $head[$h][2] = 'note'; $h++; } @@ -78,7 +83,9 @@ function moPrepareHead($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = dol_buildpath("/mrp/mo_document.php", 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index 0fe9ba63e08..4619b04f7a1 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ /** @@ -38,31 +38,38 @@ dol_include_once('/mrp/lib/mrp_mo.lib.php'); $langs->loadLangs(array("mrp", "other")); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$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'; + 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'); -$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 +$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'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // Initialize technical objects $object = new Mo($db); @@ -75,7 +82,9 @@ $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->mrp->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mrp->multidir_output[$object->entity]."/".$object->id; +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); @@ -90,20 +99,19 @@ $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'row $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -120,14 +128,15 @@ $contactstatic = new Contact($db); $form = new Form($db); $formproject = new FormProjets($db); -if ($object->id > 0) -{ +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 = ''; + $help_url = 'EN:Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = moPrepareHead($object); @@ -144,14 +153,13 @@ if ($object->id > 0) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -196,10 +204,11 @@ if ($object->id > 0) $out = '&origin='.$object->element.'&originid='.$object->id; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objthirdparty) == 'Societe') $out .= '&amp;socid='.$objthirdparty->id; + if (get_class($objthirdparty) == 'Societe') { + $out .= '&amp;socid='.$objthirdparty->id; + } $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;backtopage=1&amp;percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); @@ -209,10 +218,8 @@ if ($object->id > 0) print '<div class="tabsAction">'; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; @@ -221,11 +228,14 @@ if ($object->id > 0) print '</div>'; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } //print load_fiche_titre($langs->trans("ActionsOnMo"), '', ''); diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index a95d92d67a1..093604df9a1 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ /** @@ -61,18 +61,20 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. -if (GETPOST('fk_bom', 'int')) -{ +if (GETPOST('fk_bom', 'int')) { $objectbom->fetch(GETPOST('fk_bom', 'int')); if ($action != 'add') { @@ -103,18 +105,22 @@ $upload_dir = $conf->mrp->multidir_output[isset($object->entity) ? $object->enti $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $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 (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)) { @@ -141,28 +147,27 @@ if (empty($reshook)) // 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) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } // Action close produced - if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) - { + if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) { $result = $object->setStatut($object::STATUS_PRODUCED, 0, '', 'MRP_MO_PRODUCED'); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -189,7 +194,9 @@ $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); -llxHeader('', $langs->trans('Mo'), ''); +$title = $langs->trans('Mo')." - ".$langs->trans("Card"); + +llxHeader('', $title, ''); // Example : Adding jquery code print '<script type="text/javascript" language="javascript"> @@ -208,15 +215,18 @@ jQuery(document).ready(function() { // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Mo")), '', 'mrp'); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(array(), ''); @@ -234,7 +244,7 @@ if ($action == 'create') ?> <script> - $(document).ready(function () { + $(document).ready(function () { jQuery('#fk_bom').change(function() { console.log('We change value of BOM with BOM of id '+jQuery('#fk_bom').val()); if (jQuery('#fk_bom').val() > 0) @@ -280,7 +290,7 @@ if ($action == 'create') $('#fk_warehouse').trigger('change'); // Notify any JS components that the value changed */ } - }); + }); //jQuery('#fk_bom').trigger('change'); }) @@ -312,16 +322,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("ManufacturingOrder"), '', 'mrp'); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -347,8 +360,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_thirdparty(); $res = $object->fetch_optionals(); @@ -359,19 +371,16 @@ 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('DeleteMo'), $langs->trans('ConfirmDeleteMo'), '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); } // Confirmation of validation - if ($action == 'validate') - { + if ($action == 'validate') { // We check that object has a temporary ref $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { @@ -391,13 +400,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); - if (!empty($conf->mrp->enabled)) - { + if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -418,8 +428,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -438,14 +451,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref .= $langs->trans('ThirdParty').' '; $morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -500,8 +512,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea * Lines */ - if (!empty($object->table_element_line)) - { + if (!empty($object->table_element_line)) { // Show object lines //$result = $object->getLinesArray(); $object->fetchLines(); @@ -514,11 +525,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea '; /*if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - }*/ + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + }*/ - if (!empty($object->lines)) - { + if (!empty($object->lines)) { print '<div class="div-table-responsive-no-min">'; print '<table id="tablelines" class="noborder noshadow" width="100%">'; @@ -530,12 +540,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr class="oddeven">'; print '<td>'.$langs->trans("ProductsToConsume").'</td>'; print '<td>'; - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $i = 0; foreach ($object->lines as $line) { if ($line->role == 'toconsume') { - if ($i) print ', '; + if ($i) { + print ', '; + } $tmpproduct = new Product($db); $tmpproduct->fetch($line->fk_product); print $tmpproduct->getNomUrl(1); @@ -549,12 +560,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr class="oddeven">'; print '<td>'.$langs->trans("ProductsToProduce").'</td>'; print '<td>'; - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $i = 0; foreach ($object->lines as $line) { if ($line->role == 'toproduce') { - if ($i) print ', '; + if ($i) { + print ', '; + } $tmpproduct = new Product($db); $tmpproduct->fetch($line->fk_product); print $tmpproduct->getNomUrl(1); @@ -579,20 +591,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send //if (empty($user->socid)) { // print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n"; //} // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_VALIDATED) { + if ($permissiontoadd) { // TODO Add test that production has not started print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>'; } @@ -600,8 +611,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Modify if ($object->status == $object::STATUS_DRAFT) { - if ($permissiontoadd) - { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n"; @@ -609,12 +619,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a>'; } else { $langs->load("errors"); @@ -624,16 +631,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - if ($permissiontoadd) - { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->fk_soc.'&action=clone&object=mo">'.$langs->trans("ToClone").'</a>'; } // Cancel - Reopen - if ($permissiontoadd) - { - if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) - { + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) { $arrayproduced = $object->fetchLinesLinked('produced', 0); $nbProduced = 0; foreach ($arrayproduced as $lineproduced) { @@ -648,15 +652,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").'</a>'."\n"; } - if ($object->status == $object::STATUS_PRODUCED || $object->status == $object::STATUS_CANCELED) - { + if ($object->status == $object::STATUS_PRODUCED || $object->status == $object::STATUS_CANCELED) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("ReOpen").'</a>'."\n"; } } // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) - { + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n"; @@ -671,8 +673,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -707,7 +708,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'mo'; diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index 9db6dffd014..96041171da6 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -47,12 +47,18 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} //if (! $sortfield) $sortfield="position_name"; // Initialize technical objects @@ -67,7 +73,9 @@ $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->mrp->multidir_output[$object->entity ? $object->entity : $conf->entity]."/mo/".get_exdir(0, 0, 0, 1, $object); +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mrp->multidir_output[$object->entity ? $object->entity : $conf->entity]."/mo/".get_exdir(0, 0, 0, 1, $object); +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); @@ -80,7 +88,7 @@ $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'row * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -95,8 +103,7 @@ $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -107,8 +114,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -123,14 +129,13 @@ if ($object->id) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 0008c273d31..4597f265f80 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -54,7 +54,9 @@ $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 +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; @@ -73,47 +75,41 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.ref"; // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; - -// Security check -if (empty($conf->mrp->enabled)) accessforbidden('Module not enabled'); -$socid = 0; -if ($user->socid > 0) // Protection if external user -{ - //$socid = $user->socid; - accessforbidden(); +if (!$sortfield) { + $sortfield = "t.ref"; // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; } -//$result = restrictedArea($user, 'mrp', $id, ''); - // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +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'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); + } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -131,36 +127,45 @@ $permissiontoread = $user->rights->mrp->read; $permissiontoadd = $user->rights->mrp->write; $permissiontodelete = $user->rights->mrp->delete; +// Security check +if ($user->socid > 0) { + // Protection if external user + accessforbidden(); +} +$result = restrictedArea($user, 'mrp'); + /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -189,13 +194,14 @@ $title = $langs->trans('ListOfManufacturingOrders'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -203,20 +209,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -246,26 +264,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -274,8 +290,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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('/mrp/mo_card.php', 1).'?id='.$id); @@ -306,30 +321,46 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -348,9 +379,10 @@ $objecttmp = new Mo($db); $trackid = 'mo'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -361,11 +393,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -382,20 +416,26 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -417,15 +457,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -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 ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -442,11 +485,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -455,38 +498,53 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - 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'; + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) { + $cssforfield = 'tdoverflowmax100'; + } - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -499,14 +557,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -518,10 +579,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -537,10 +601,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index b4dbed059bc..7b9c0662e53 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ /** @@ -66,10 +66,16 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -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; -if (!$sortfield) $sortfield = "m.datem"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "m.datem"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} // Initialize technical objects $object = new Mo($db); @@ -85,12 +91,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $search_all = trim(GETPOST("search_all", 'alpha')); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -105,23 +114,24 @@ $objectlist = new MouvementStock($db); // Definition of fields for list $arrayfields = array( - 'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>1), - 'm.datem'=>array('label'=>$langs->trans("Date"), 'checked'=>1, 'position'=>2), - 'p.ref'=>array('label'=>$langs->trans("ProductRef"), 'checked'=>1, 'css'=>'maxwidth100', 'position'=>10), - 'p.label'=>array('label'=>$langs->trans("ProductLabel"), 'checked'=>1, 'position'=>15), - 'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>20), - 'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>21), - 'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>22), - 'e.ref'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'position'=>30), - 'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0, 'position'=>40), - 'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1, 'position'=>42), - 'm.label'=>array('label'=>$langs->trans("MovementLabel"), 'checked'=>1, 'position'=>45), - 'm.type_mouvement'=>array('label'=>$langs->trans("TypeMovement"), 'checked'=>1, 'position'=>48), - 'origin'=>array('label'=>$langs->trans("Origin"), 'enabled'=>0, 'checked'=>0, 'position'=>50), - 'm.value'=>array('label'=>$langs->trans("Qty"), 'checked'=>1, 'position'=>60), - 'm.price'=>array('label'=>$langs->trans("UnitPurchaseValue"), 'enabled'=>0, 'checked'=>0, 'position'=>62), - //'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - //'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500) + 'm.rowid'=>array('label'=>"Ref", 'checked'=>1, 'position'=>1), + 'm.datem'=>array('label'=>"Date", 'checked'=>1, 'position'=>2), + 'p.ref'=>array('label'=>"ProductRef", 'checked'=>1, 'css'=>'maxwidth100', 'position'=>3), + 'p.label'=>array('label'=>"ProductLabel", 'checked'=>0, 'position'=>5), + 'm.batch'=>array('label'=>"BatchNumberShort", 'checked'=>1, 'position'=>8, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'pl.eatby'=>array('label'=>"EatByDate", 'checked'=>0, 'position'=>9, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'pl.sellby'=>array('label'=>"SellByDate", 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'e.ref'=>array('label'=>"Warehouse", 'checked'=>1, 'position'=>100, 'enabled'=>(!$id > 0)), // If we are on specific warehouse, we hide it + 'm.fk_user_author'=>array('label'=>"Author", 'checked'=>0, 'position'=>120), + 'm.inventorycode'=>array('label'=>"InventoryCodeShort", 'checked'=>1, 'position'=>130), + 'm.label'=>array('label'=>"MovementLabel", 'checked'=>1, 'position'=>140), + 'm.type_mouvement'=>array('label'=>"TypeMovement", 'checked'=>0, 'position'=>150), + 'origin'=>array('label'=>"Origin", 'checked'=>1, 'position'=>155), + 'm.fk_projet'=>array('label'=>'Project', 'checked'=>0, 'position'=>180), + 'm.value'=>array('label'=>"Qty", 'checked'=>1, 'position'=>200), + 'm.price'=>array('label'=>"UnitPurchaseValue", 'checked'=>0, 'position'=>210) + //'m.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + //'m.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500) ); if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) { unset($arrayfields['pl.eatby']); @@ -139,24 +149,33 @@ $permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($ $upload_dir = $conf->mrp->multidir_output[isset($object->entity) ? $object->entity : 1]; $permissiontoproduce = $permissiontoadd; +$permissiontoupdatecost = $user->rights->bom->write; // User who can define cost must have knowledge of pricing +if ($permissiontoupdatecost) { + $arrayfields['m.price']['enabled'] = 1; +} /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 -{ +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 $year = ''; $month = ''; $search_ref = ''; @@ -174,16 +193,18 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_array_options = array(); } -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); if (empty($backtopage) || ($cancel && empty($id))) { //var_dump($backurlforlist);exit; - if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = DOL_URL_ROOT.'/mrp/mo_production.php?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = DOL_URL_ROOT.'/mrp/mo_production.php?id='.($id > 0 ? $id : '__ID__'); + } } $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record @@ -205,12 +226,10 @@ if (empty($reshook)) // 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) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -233,11 +252,12 @@ $productlot = new ProductLot($db); $warehousestatic = new Entrepot($db); $userstatic = new User($db); -llxHeader('', $langs->trans('Mo'), ''); +$help_url = 'EN:Module_Manufacturing_Orders|FR:Module_Ordres_de_Fabrication'; + +llxHeader('', $langs->trans('Mo'), $help_url); // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_thirdparty(); $res = $object->fetch_optionals(); @@ -248,13 +268,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('DeleteMo'), $langs->trans('ConfirmDeleteMo'), '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 @@ -265,27 +283,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of action xxxx - if ($action == 'xxx') - { + if ($action == 'xxx') { $formquestion = array(); /* $forcecombo=0; if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) - ); - */ + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + ); + */ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -303,14 +323,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -403,7 +422,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $sql .= " u.login, u.photo, u.lastname, u.firstname"; // Add fields from extrafields if (!empty($extrafields->attributes[$objectlist->table_element]['label'])) { - foreach ($extrafields->attributes[$objectlist->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$objectlist->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + foreach ($extrafields->attributes[$objectlist->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$objectlist->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + } } // Add fields from hooks $parameters = array(); @@ -412,26 +433,52 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql .= " ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."stock_mouvement as m"; - if (is_array($extrafields->attributes[$objectlist->table_element]['label']) && count($extrafields->attributes[$objectlist->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$objectlist->table_element."_extrafields as ef on (m.rowid = ef.fk_object)"; + if (is_array($extrafields->attributes[$objectlist->table_element]['label']) && count($extrafields->attributes[$objectlist->table_element]['label'])) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$objectlist->table_element."_extrafields as ef on (m.rowid = ef.fk_object)"; + } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product"; $sql .= " WHERE m.fk_product = p.rowid"; $sql .= " AND m.origintype = 'mo' AND m.fk_origin = ".(int) $object->id; - if ($msid > 0) $sql .= " AND m.rowid = ".$msid; + if ($msid > 0) { + $sql .= " AND m.rowid = ".((int) $msid); + } $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; + } $sql .= dolSqlDateFilter('m.datem', 0, $month, $year); - if (!empty($search_ref)) $sql .= natural_search('m.rowid', $search_ref, 1); - if (!empty($search_movement)) $sql .= natural_search('m.label', $search_movement); - if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $search_inventorycode); - if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref); - if (!empty($search_product)) $sql .= natural_search('p.label', $search_product); - if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2); - if (!empty($search_user)) $sql .= natural_search('u.login', $search_user); - if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch); - if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1); - if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); + if (!empty($search_ref)) { + $sql .= natural_search('m.rowid', $search_ref, 1); + } + if (!empty($search_movement)) { + $sql .= natural_search('m.label', $search_movement); + } + if (!empty($search_inventorycode)) { + $sql .= natural_search('m.inventorycode', $search_inventorycode); + } + if (!empty($search_product_ref)) { + $sql .= natural_search('p.ref', $search_product_ref); + } + if (!empty($search_product)) { + $sql .= natural_search('p.label', $search_product); + } + if ($search_warehouse != '' && $search_warehouse != '-1') { + $sql .= natural_search('e.rowid', $search_warehouse, 2); + } + if (!empty($search_user)) { + $sql .= natural_search('u.login', $search_user); + } + if (!empty($search_batch)) { + $sql .= natural_search('m.batch', $search_batch); + } + if ($search_qty != '') { + $sql .= natural_search('m.value', $search_qty, 1); + } + if ($search_type_mouvement != '' && $search_type_mouvement != '-1') { + $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); + } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -441,12 +488,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -454,17 +499,39 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $sql .= $db->plimit($limit + 1, $offset); $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($id > 0) $param .= '&id='.urlencode($id); - if ($search_movement) $param .= '&search_movement='.urlencode($search_movement); - if ($search_inventorycode) $param .= '&search_inventorycode='.urlencode($search_inventorycode); - if ($search_type_mouvement) $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); - if ($search_product_ref) $param .= '&search_product_ref='.urlencode($search_product_ref); - if ($search_product) $param .= '&search_product='.urlencode($search_product); - if ($search_batch) $param .= '&search_batch='.urlencode($search_batch); - if ($search_warehouse > 0) $param .= '&search_warehouse='.urlencode($search_warehouse); - if ($search_user) $param .= '&search_user='.urlencode($search_user); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($id > 0) { + $param .= '&id='.urlencode($id); + } + if ($search_movement) { + $param .= '&search_movement='.urlencode($search_movement); + } + if ($search_inventorycode) { + $param .= '&search_inventorycode='.urlencode($search_inventorycode); + } + if ($search_type_mouvement) { + $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); + } + if ($search_product_ref) { + $param .= '&search_product_ref='.urlencode($search_product_ref); + } + if ($search_product) { + $param .= '&search_product='.urlencode($search_product); + } + if ($search_batch) { + $param .= '&search_batch='.urlencode($search_batch); + } + if ($search_warehouse > 0) { + $param .= '&search_warehouse='.urlencode($search_warehouse); + } + if ($search_user) { + $param .= '&search_user='.urlencode($search_user); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -475,11 +542,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // 'builddoc'=>$langs->trans("PDFMerge"), ); //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -487,20 +558,27 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; - if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">'; + if ($id > 0) { + print '<input type="hidden" name="id" value="'.$id.'">'; + } - if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); - else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + if ($id > 0) { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); + } else { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + } $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -514,84 +592,74 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Fields title search print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['m.rowid']['checked'])) - { + if (!empty($arrayfields['m.rowid']['checked'])) { // Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['m.datem']['checked'])) - { + if (!empty($arrayfields['m.datem']['checked'])) { print '<td class="liste_titre nowraponall">'; print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">'; - if (empty($conf->productbatch->enabled)) print '&nbsp;'; + if (empty($conf->productbatch->enabled)) { + print '&nbsp;'; + } //else print '<br>'; $syear = $year ? $year : -1; print '<input class="flat maxwidth50" type="text" maxlength="4" placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" name="year" value="'.($syear > 0 ? $syear : '').'">'; //print $formother->selectyear($syear,'year',1, 20, 5); print '</td>'; } - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { // Product Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct ? $product->ref : $search_product_ref).'">'; print '</td>'; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { // Product label print '<td class="liste_titre left">'; print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct ? $product->label : $search_product).'">'; print '</td>'; } // Batch - if (!empty($arrayfields['m.batch']['checked'])) - { + if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="liste_titre center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>'; } - if (!empty($arrayfields['pl.eatby']['checked'])) - { + if (!empty($arrayfields['pl.eatby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } - if (!empty($arrayfields['pl.sellby']['checked'])) - { + if (!empty($arrayfields['pl.sellby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } // Warehouse - if (!empty($arrayfields['e.ref']['checked'])) - { + if (!empty($arrayfields['e.ref']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone left">'; //print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">'; print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['m.fk_user_author']['checked'])) - { + if (!empty($arrayfields['m.fk_user_author']['checked'])) { // Author print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">'; print '</td>'; } - if (!empty($arrayfields['m.inventorycode']['checked'])) - { + if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">'; print '</td>'; } - if (!empty($arrayfields['m.label']['checked'])) - { + if (!empty($arrayfields['m.label']['checked'])) { // Label of movement print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">'; print '</td>'; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) - { + if (!empty($arrayfields['m.type_mouvement']['checked'])) { // Type of movement print '<td class="liste_titre center">'; //print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">'; @@ -607,22 +675,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['origin']['checked'])) - { + if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print '<td class="liste_titre left">'; print '&nbsp; '; print '</td>'; } - if (!empty($arrayfields['m.value']['checked'])) - { + if (!empty($arrayfields['m.fk_projet']['checked'])) { + // fk_project + print '<td class="liste_titre" align="left">'; + print '&nbsp; '; + print '</td>'; + } + if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">'; print '</td>'; } - if (!empty($arrayfields['m.price']['checked'])) - { + if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="liste_titre left">'; print '&nbsp; '; @@ -638,14 +709,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['m.datec']['checked'])) - { + if (!empty($arrayfields['m.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['m.tms']['checked'])) - { + if (!empty($arrayfields['m.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -657,38 +726,55 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print "</tr>\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['m.rowid']['checked'])) + if (!empty($arrayfields['m.rowid']['checked'])) { print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['m.datem']['checked'])) + } + if (!empty($arrayfields['m.datem']['checked'])) { print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['p.ref']['checked'])) + } + 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.label']['checked'])) + } + if (!empty($arrayfields['p.label']['checked'])) { print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['m.batch']['checked'])) + } + if (!empty($arrayfields['m.batch']['checked'])) { print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['pl.eatby']['checked'])) + } + if (!empty($arrayfields['pl.eatby']['checked'])) { print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['pl.sellby']['checked'])) + } + if (!empty($arrayfields['pl.sellby']['checked'])) { print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center '); + } if (!empty($arrayfields['e.ref']['checked'])) { // We are on a specific warehouse card, no filter on other should be possible print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); } - if (!empty($arrayfields['m.fk_user_author']['checked'])) + if (!empty($arrayfields['m.fk_user_author']['checked'])) { print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.inventorycode']['checked'])) + } + if (!empty($arrayfields['m.inventorycode']['checked'])) { print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.label']['checked'])) + } + if (!empty($arrayfields['m.label']['checked'])) { print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.type_mouvement']['checked'])) + } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['origin']['checked'])) + } + if (!empty($arrayfields['origin']['checked'])) { print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.value']['checked'])) + } + if (!empty($arrayfields['m.fk_projet']['checked'])) { + print_liste_field_titre($arrayfields['m.fk_projet']['label'], $_SERVER["PHP_SELF"], "m.fk_projet", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['m.value']['checked'])) { print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['m.price']['checked'])) + } + if (!empty($arrayfields['m.price']['checked'])) { print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right '); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -763,21 +849,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($arrayfields['p.label']['checked'])) { // Product label - print '<td>'; - /* - * $productstatic->id=$objp->rowid; - * $productstatic->ref=$objp->produit; - * $productstatic->type=$objp->type; - * print $productstatic->getNomUrl(1,'',16); - */ + print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($productstatic->label).'">'; print $productstatic->label; print "</td>\n"; } if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="center nowraponall">'; - if ($productlot->id > 0) + 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 '</td>'; } if (!empty($arrayfields['pl.eatby']['checked'])) { @@ -808,7 +890,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (!empty($arrayfields['m.label']['checked'])) { // Label of movement - print '<td class="tdoverflowmax100aaa">'.$objp->label.'</td>'; + print '<td class="tdoverflowmax300" title="'.dol_escape_htmltag($objp->label).'">'.$objp->label.'</td>'; } if (!empty($arrayfields['m.type_mouvement']['checked'])) { // Type of movement @@ -831,33 +913,44 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Origin of movement print '<td class="nowraponall">'.$origin.'</td>'; } + if (!empty($arrayfields['m.fk_projet']['checked'])) { + // fk_project + print '<td>'; + if ($objp->fk_project != 0) { + print $movement->get_origin($objp->fk_project, 'project'); + } + print '</td>'; + } if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="right">'; - if ($objp->qt > 0) + if ($objp->qt > 0) { print '+'; + } print $objp->qty; print '</td>'; } if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="right">'; - if ($objp->price != 0) + if ($objp->price != 0) { print price($objp->price); + } print '</td>'; } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) + if (in_array($obj->rowid, $arrayofselected)) { $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) + if (!$i) { $totalarray['nbfield']++; + } print "</tr>\n"; $i++; diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 564361c4b90..6bbfc503453 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -50,7 +50,9 @@ $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->mrp->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->mrp->multidir_output[$object->entity]."/".$object->id; +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); @@ -58,8 +60,7 @@ if ($id > 0 || !empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object-> $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'mrp', $object->id, 'mrp_mo', '', 'fk_soc', 'rowid', $isdraft); -$permissionnote = 1; -//$permissionnote=$user->rights->mrp->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php @@ -81,8 +82,7 @@ $formproject = new FormProjets($db); $help_url = ''; llxHeader('', $langs->trans('Mo'), $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = moPrepareHead($object); @@ -100,14 +100,13 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index c1b6fa64ec8..6f35f1f1a25 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; dol_include_once('/mrp/class/mo.class.php'); +dol_include_once('/bom/class/bom.class.php'); dol_include_once('/mrp/lib/mrp_mo.lib.php'); // Load translation files required by the page @@ -47,7 +48,7 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mocard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); -//$lineid = GETPOST('lineid', 'int'); +$lineid = GETPOST('lineid', 'int'); $collapse = GETPOST('collapse', 'aZ09comma'); @@ -65,12 +66,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -88,6 +92,7 @@ $permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($ $upload_dir = $conf->mrp->multidir_output[isset($object->entity) ? $object->entity : 1]; $permissiontoproduce = $permissiontoadd; +$permissiontoupdatecost = $user->rights->bom->read; // User who can define cost must have knowledge of pricing /* @@ -96,18 +101,22 @@ $permissiontoproduce = $permissiontoadd; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); if (empty($backtopage) || ($cancel && empty($id))) { //var_dump($backurlforlist);exit; - if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = DOL_URL_ROOT.'/mrp/mo_production.php?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = DOL_URL_ROOT.'/mrp/mo_production.php?id='.($id > 0 ? $id : '__ID__'); + } } $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record @@ -129,12 +138,10 @@ if (empty($reshook)) // 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) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -150,6 +157,7 @@ if (empty($reshook)) $moline->qty = GETPOST('qtytoadd', 'int'); ; $moline->fk_product = GETPOST('productidtoadd', 'int'); $moline->role = 'toconsume'; + $moline->origin_type = 'free'; // free consume line $moline->position = 0; $resultline = $moline->create($user, false); // Never use triggers here @@ -168,7 +176,7 @@ if (empty($reshook)) $codemovement = GETPOST('inventorycode', 'alphanohtml'); $db->begin(); - + $pos = 0; // Process line to consume foreach ($object->lines as $line) { if ($line->role == 'toconsume') { @@ -199,7 +207,11 @@ if (empty($reshook)) // Record stock movement $id_product_batch = 0; $stockmove->origin = $object; - $idstockmove = $stockmove->livraison($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); + if ($qtytoprocess >= 0) { + $idstockmove = $stockmove->livraison($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); + } else { + $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehouse-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, dol_now(), '', '', GETPOST('batch-'.$line->id.'-'.$i), $id_product_batch, $codemovement); + } if ($idstockmove < 0) { $error++; setEventMessages($stockmove->error, $stockmove->errors, 'errors'); @@ -207,7 +219,6 @@ if (empty($reshook)) } if (!$error) { - $pos = 0; // Record consumption $moline = new MoLine($db); $moline->fk_mo = $object->id; @@ -237,6 +248,7 @@ if (empty($reshook)) } // Process line to produce + $pos = 0; foreach ($object->lines as $line) { if ($line->role == 'toproduce') { $tmpproduct = new Product($db); @@ -245,6 +257,7 @@ if (empty($reshook)) $i = 1; while (GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i)) { $qtytoprocess = price2num(GETPOST('qtytoproduce-'.$line->id.'-'.$i)); + $pricetoprocess = GETPOST('pricetoproduce-'.$line->id.'-'.$i) ? price2num(GETPOST('pricetoproduce-'.$line->id.'-'.$i)) : 0; if ($qtytoprocess != 0) { // Check warehouse is set if we should have to @@ -266,7 +279,7 @@ if (empty($reshook)) // Record stock movement $id_product_batch = 0; $stockmove->origin = $object; - $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i), $qtytoprocess, 0, $labelmovement, '', '', GETPOST('batchtoproduce-'.$line->id.'-'.$i), dol_now(), $id_product_batch, $codemovement); + $idstockmove = $stockmove->reception($user, $line->fk_product, GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i), $qtytoprocess, $pricetoprocess, $labelmovement, '', '', GETPOST('batchtoproduce-'.$line->id.'-'.$i), dol_now(), $id_product_batch, $codemovement); if ($idstockmove < 0) { $error++; setEventMessages($stockmove->error, $stockmove->errors, 'errors'); @@ -274,7 +287,6 @@ if (empty($reshook)) } if (!$error) { - $pos = 0; // Record production $moline = new MoLine($db); $moline->fk_mo = $object->id; @@ -364,18 +376,19 @@ if (empty($reshook)) } // Action close produced - if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) - { + if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) { $result = $object->setStatut($object::STATUS_PRODUCED, 0, '', 'MRP_MO_PRODUCED'); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -402,13 +415,13 @@ $formproject = new FormProjets($db); $formproduct = new FormProduct($db); $tmpwarehouse = new Entrepot($db); $tmpbatch = new Productlot($db); +$tmpstockmovement = new MouvementStock($db); $help_url = 'EN:Module_Manufacturing_Orders|FR:Module_Ordres_de_Fabrication'; llxHeader('', $langs->trans('Mo'), $help_url, '', 0, 0, array('/mrp/js/lib_dispatch.js.php')); // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_thirdparty(); $res = $object->fetch_optionals(); @@ -419,13 +432,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('DeleteMo'), $langs->trans('ConfirmDeleteMo'), '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 @@ -436,8 +447,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of validation - if ($action == 'validate') - { + if ($action == 'validate') { // We check that object has a temporary ref $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { @@ -457,13 +467,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }*/ $formquestion = array(); - if (!empty($conf->mrp->enabled)) - { + if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $forcecombo = 0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + if ($conf->browser->name == 'ie') { + $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + } $formquestion = array( // 'text' => $langs->trans("ConfirmClone"), // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), @@ -477,8 +488,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -496,14 +510,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } 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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -554,8 +567,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); - if (!in_array($action, array('consumeorproduce', 'consumeandproduceall'))) - { + if (!in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { print '<div class="tabsAction">'; $parameters = array(); @@ -563,12 +575,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); if (empty($reshook)) { // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a>'; } else { $langs->load("errors"); @@ -600,10 +609,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Cancel - Reopen - if ($permissiontoadd) - { - if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) - { + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) { $arrayproduced = $object->fetchLinesLinked('produced', 0); $nbProduced = 0; foreach ($arrayproduced as $lineproduced) { @@ -618,8 +625,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").'</a>'."\n"; } - if ($object->status == $object::STATUS_CANCELED) - { + if ($object->status == $object::STATUS_CANCELED) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").'</a>'."\n"; } @@ -636,8 +642,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</div>'; } - if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) - { + if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="confirm_'.$action.'">'; @@ -651,8 +656,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $defaultstockmovementcode = GETPOST('inventorycode', 'alphanohtml') ? GETPOST('inventorycode', 'alphanohtml') : $langs->trans("ProductionForRef", $object->ref); print '<div class="center'.(in_array($action, array('consumeorproduce', 'consumeandproduceall')) ? ' formconsumeproduce' : '').'">'; - print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'<br></span>'; - print '<span class="fieldrequired">'.$langs->trans("InventoryCode").':</span> <input type="text" class="maxwidth200" name="inventorycode" value="'.$defaultstockmovementcode.'"> &nbsp; '; + print '<div class="opacitymedium hideonsmartphone paddingbottom">'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'<br></div>'; + print '<span class="fieldrequired">'.$langs->trans("InventoryCode").':</span> <input type="text" class="minwidth200 maxwidth250" name="inventorycode" value="'.$defaultstockmovementcode.'"> &nbsp; '; print '<span class="clearbothonsmartphone"></span>'; print $langs->trans("MovementLabel").': <input type="text" class="minwidth300" name="inventorylabel" value="'.$defaultstockmovementlabel.'"><br><br>'; print '<input type="checkbox" id="autoclose" name="autoclose" value="1"'.(GETPOSTISSET('inventorylabel') ? (GETPOST('autoclose') ? ' checked="checked"' : '') : ' checked="checked"').'> <label for="autoclose">'.$langs->trans("AutoCloseMO").'</label><br>'; @@ -672,17 +677,27 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ $collapse = 1; - if (!empty($object->table_element_line)) - { + if (!empty($object->table_element_line)) { // Show object lines $object->fetchLines(); + $bomcost = 0; + if ($object->fk_bom > 0) { + $bom = new Bom($db); + $res = $bom->fetch($object->fk_bom); + if ($res > 0) { + $bomcost = $bom->unit_cost; + } + } + + // Lines to consume + print '<div class="fichecenter">'; print '<div class="fichehalfleft">'; print '<div class="clearboth"></div>'; $newlinetext = ''; - if ($action != 'consumeorproduce' && $action != 'consumeandproduceall') { + if ($object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED && $action != 'consumeorproduce' && $action != 'consumeandproduceall') { $newlinetext = '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addconsumeline">'.$langs->trans("AddNewConsumeLines").'</a>'; } print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext); @@ -693,15 +708,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Product").'</td>'; print '<td class="right">'.$langs->trans("Qty").'</td>'; + if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { + print '<td class="right">'.$langs->trans("UnitCost").'</td>'; + } print '<td class="right">'.$langs->trans("QtyAlreadyConsumed").'</td>'; print '<td>'; - if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) print $langs->trans("Warehouse"); + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Warehouse"); + } print '</td>'; if ($conf->productbatch->enabled) { print '<td>'; - if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) print $langs->trans("Batch"); + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Batch"); + } print '</td>'; } + if ($permissiontodelete) { + print '<td></td>'; + } print '</tr>'; if ($action == 'addconsumeline') { @@ -711,6 +736,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $form->select_produits('', 'productidtoadd', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300'); print '</td>'; print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width50 right"></td>'; + if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { + print '<td></td>'; + } print '<td class="right"></td>'; print '<td>'; print '<input type="submit" class="button buttongen" name="addconsumelinebutton" value="'.$langs->trans("Add").'">'; @@ -723,8 +751,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Lines to consume - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $nblinetoconsume = 0; foreach ($object->lines as $line) { if ($line->role == 'toconsume') { @@ -739,6 +766,29 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $tmpproduct = new Product($db); $tmpproduct->fetch($line->fk_product); + $linecost = price2num($tmpproduct->pmp, 'MT'); + + if ($line->origin_type == 'free' && $object->qty > 0) { + // add free consume line cost to bomcost + $costprice = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp); + if (empty($costprice)) { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($db); + if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) { + $costprice = $productFournisseur->fourn_unitprice; + } else { + $costprice = 0; + } + } + $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); + $bomcost += $linecost; + } elseif ($line->origin_id > 0 && $line->origin_type == 'bom' && $object->qty > 0) { + foreach ($bom->lines as $bomline) { + if ($bomline->id == $line->origin_id) { + $linecost = price2num(($line->qty * $bomline->unit_cost) / $object->qty, 'MT'); + } + } + } $arrayoflines = $object->fetchLinesLinked('consumed', $line->id); $alreadyconsumed = 0; @@ -752,14 +802,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</td>'; print '<td class="right nowraponall">'; $help = ''; - if ($line->qty_frozen) $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; - if ($line->disable_stock_change) $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("DisableStockChange").'</strong>: '.yn(1).' ('.(($tmpproduct->type == Product::TYPE_SERVICE && empty($conf->global->STOCK_SUPPORTS_SERVICES)) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")).')'; + if ($line->qty_frozen) { + $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; + } + if ($line->disable_stock_change) { + $help .= ($help ? '<br>' : '').'<strong>'.$langs->trans("DisableStockChange").'</strong>: '.yn(1).' ('.(($tmpproduct->type == Product::TYPE_SERVICE && empty($conf->global->STOCK_SUPPORTS_SERVICES)) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")).')'; + } if ($help) { print $form->textwithpicto($line->qty, $help, -1); } else { print $line->qty; } print '</td>'; + if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { + print '<td class="right nowraponall">'; + print price($linecost); + print '</td>'; + } print '<td class="right">'; if ($alreadyconsumed) { print '<script>'; @@ -774,9 +833,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }); });'; print '</script>'; - if (empty($conf->use_javascript_ajax)) print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; + if (empty($conf->use_javascript_ajax)) { + print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; + } print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"'); - if (empty($conf->use_javascript_ajax)) print '</a>'; + if (empty($conf->use_javascript_ajax)) { + print '</a>'; + } } else { if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line print '<script>jQuery("#tablelines").removeClass("nobottom");</script>'; @@ -789,20 +852,38 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($conf->productbatch->enabled) { print '<td></td>'; // Lot } + if ($permissiontodelete) { + $href = $_SERVER["PHP_SELF"]; + $href .= '?id='.$object->id; + $href .= '&action=deleteline'; + $href .= '&lineid='.$line->id; + print '<td class="center">'; + print '<a href="'.$href.'">'; + print img_picto('', "delete"); + print '</a>'; + print '</td>'; + } print '</tr>'; // Show detailed of already consumed with js code to collapse foreach ($arrayoflines as $line2) { print '<tr class="expanddetail'.$line->id.' hideobject opacitylow">'; print '<td>'; - print dol_print_date($line2['date'], 'dayhour'); + $tmpstockmovement->id = $line2['fk_stock_movement']; + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?search_ref='.$tmpstockmovement->id.'">'.img_picto($langs->trans("StockMovement"), 'movement', 'class="paddingright"').'</a>'; + print dol_print_date($line2['date'], 'dayhour', 'tzuserrel'); print '</td>'; print '<td></td>'; print '<td class="right">'.$line2['qty'].'</td>'; + if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { + print '<td></td>'; + } print '<td class="tdoverflowmax150">'; if ($line2['fk_warehouse'] > 0) { $result = $tmpwarehouse->fetch($line2['fk_warehouse']); - if ($result > 0) print $tmpwarehouse->getNomUrl(1); + if ($result > 0) { + print $tmpwarehouse->getNomUrl(1); + } } print '</td>'; // Lot Batch @@ -821,8 +902,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr>'; print '<td><span class="opacitymedium">'.$langs->trans("ToConsume").'</span></td>'; $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; + if ($action == 'consumeorproduce' && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) { + $preselected = 0; + } print '<td class="right"><input type="text" class="width50 right" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>'; + if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) { + print '<td></td>'; + } print '<td></td>'; print '<td>'; if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { @@ -851,9 +937,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } - print '</table>'; + print '</table>'; print '</div>'; + // Lines to produce print '</div>'; @@ -868,20 +955,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Product").'</td>'; print '<td class="right">'.$langs->trans("Qty").'</td>'; + if ($permissiontoupdatecost) { + if (empty($bomcost)) { + print '<td class="right">'.$langs->trans("PMPValue").'</td>'; + } else { + print '<td class="right">'.$langs->trans("UnitCost").'</td>'; + } + } print '<td class="right">'.$langs->trans("QtyAlreadyProduced").'</td>'; print '<td>'; - if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) print $langs->trans("Warehouse"); + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Warehouse"); + } print '</td>'; if ($conf->productbatch->enabled) { print '<td>'; - if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) print $langs->trans("Batch"); + if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print $langs->trans("Batch"); + } print '</td>'; print '<td></td>'; } print '</tr>'; - if (!empty($object->lines)) - { + if (!empty($object->lines)) { $nblinetoproduce = 0; foreach ($object->lines as $line) { if ($line->role == 'toproduce') { @@ -899,6 +996,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $tmpproduct = new Product($db); $tmpproduct->fetch($line->fk_product); + if (empty($bomcost)) { + $bomcost = $tmpproduct->pmp; + } + $arrayoflines = $object->fetchLinesLinked('produced', $line->id); $alreadyproduced = 0; foreach ($arrayoflines as $line2) { @@ -916,6 +1017,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<br><span class="opacitymedium small">'.$tmpproduct->label.'</span>'; print '</td>'; print '<td class="right">'.$line->qty.'</td>'; + if ($permissiontoupdatecost) { + print '<td class="right nowraponall">'; + print price($bomcost); + print '</td>'; + } print '<td class="right nowraponall">'; if ($alreadyproduced) { print '<script>'; @@ -930,9 +1036,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea }); });'; print '</script>'; - if (empty($conf->use_javascript_ajax)) print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; + if (empty($conf->use_javascript_ajax)) { + print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; + } print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"'); - if (empty($conf->use_javascript_ajax)) print '</a>'; + if (empty($conf->use_javascript_ajax)) { + print '</a>'; + } } print ' '.$alreadyproduced; print '</td>'; @@ -948,14 +1058,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea foreach ($arrayoflines as $line2) { print '<tr class="expanddetailtoproduce'.$line->id.' hideobject opacitylow">'; print '<td>'; - print dol_print_date($line2['date'], 'dayhour'); + $tmpstockmovement->id = $line2['fk_stock_movement']; + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?search_ref='.$tmpstockmovement->id.'">'.img_picto($langs->trans("StockMovement"), 'movement', 'class="paddingright"').'</a>'; + print dol_print_date($line2['date'], 'dayhour', 'tzuserrel'); print '</td>'; + // Qty print '<td></td>'; + // Cost price + if ($permissiontoupdatecost) { + print '<td></td>'; + } + // Qty already produced print '<td class="right">'.$line2['qty'].'</td>'; print '<td class="tdoverflowmax150">'; if ($line2['fk_warehouse'] > 0) { $result = $tmpwarehouse->fetch($line2['fk_warehouse']); - if ($result > 0) print $tmpwarehouse->getNomUrl(1); + if ($result > 0) { + print $tmpwarehouse->getNomUrl(1); + } } print '</td>'; if ($conf->productbatch->enabled) { @@ -975,8 +1095,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<tr name="batch_'.$line->id.'_'.$i.'">'; print '<td><span class="opacitymedium">'.$langs->trans("ToProduce").'</span></td>'; $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; + if ($action == 'consumeorproduce' && !GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i)) { + $preselected = 0; + } print '<td class="right"><input type="text" class="width50 right" id="qtytoproduce-'.$line->id.'-'.$i.'" name="qtytoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>'; + if ($permissiontoupdatecost) { + if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $preselected = (GETPOSTISSET('pricetoproduce-'.$line->id.'-'.$i) ? GETPOST('pricetoproduce-'.$line->id.'-'.$i) : price($bomcost)); + print '<td class="right"><input type="text" class="width50 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>'; + } else { + print '<td><input type="hidden" class="width50 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.$bomcost.'"></td>'; + } + } print '<td></td>'; print '<td>'; if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { @@ -993,6 +1123,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<input type="text" class="width50" name="batchtoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'">'; } print '</td>'; + // Batch number in same column than the stock movement picto print '<td>'; if ($tmpproduct->status_batch) { $type = 'batch'; @@ -1013,8 +1144,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</div>'; } - if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) - { + if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) { print "</form>\n"; } } diff --git a/htdocs/mrp/tpl/originproductline.tpl.php b/htdocs/mrp/tpl/originproductline.tpl.php index 6f3b63f6d4e..fb1c1c0c1ee 100644 --- a/htdocs/mrp/tpl/originproductline.tpl.php +++ b/htdocs/mrp/tpl/originproductline.tpl.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com> -/* Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com> + * Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,13 +17,14 @@ */ // 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; } -if (!is_object($form)) $form = new Form($db); +if (!is_object($form)) { + $form = new Form($db); +} $qtytoconsumeforline = $this->tpl['qty'] / $this->tpl['efficiency']; /*if ((empty($this->tpl['qty_frozen']) && $this->tpl['qty_bom'] > 1)) { @@ -43,7 +44,9 @@ print '<td class="center">'.($this->tpl['disable_stock_change'] ? yn($this->tpl[ //print '<td class="right">'.$this->tpl['efficiency'].'</td>'; $selected = 1; -if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) $selected = 0; +if (!empty($selectedLines) && !in_array($this->tpl['id'], $selectedLines)) { + $selected = 0; +} print '<td class="center">'; //print '<input id="cb'.$this->tpl['id'].'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$this->tpl['id'].'"'.($selected?' checked="checked"':'').'>'; print '</td>'; diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index bb4df7060e9..5067a6e91d5 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -121,14 +121,15 @@ class MultiCurrency extends CommonObject $error = 0; - if (self::checkCodeAlreadyExists($this->code)) - { + if (self::checkCodeAlreadyExists($this->code)) { $error++; $this->errors[] = $langs->trans('multicurrency_code_already_added'); return -1; } - if (empty($this->entity) || $this->entity <= 0) $this->entity = $conf->entity; + if (empty($this->entity) || $this->entity <= 0) { + $this->entity = $conf->entity; + } $now = date('Y-m-d H:i:s'); // Insert request @@ -163,7 +164,9 @@ class MultiCurrency extends CommonObject if ($trigger) { $result = $this->call_trigger('CURRENCY_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } } @@ -194,8 +197,11 @@ class MultiCurrency extends CommonObject $sql = 'SELECT'; $sql .= ' c.rowid, c.name, c.code, c.entity, c.date_create, c.fk_user'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' AS c'; - if (!empty($code)) $sql .= ' WHERE c.code = \''.$this->db->escape($code).'\' AND c.entity = '.$conf->entity; - else $sql .= ' WHERE c.rowid = '.$id; + if (!empty($code)) { + $sql .= ' WHERE c.code = \''.$this->db->escape($code).'\' AND c.entity = '.$conf->entity; + } else { + $sql .= ' WHERE c.rowid = '.((int) $id); + } dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); @@ -295,7 +301,7 @@ class MultiCurrency extends CommonObject $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET'; $sql .= ' name=\''.$this->db->escape($this->name).'\''; $sql .= ' code=\''.$this->db->escape($this->code).'\''; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -308,7 +314,9 @@ class MultiCurrency extends CommonObject if (!$error && $trigger) { $result = $this->call_trigger('CURRENCY_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } // Commit or rollback @@ -341,7 +349,9 @@ class MultiCurrency extends CommonObject if ($trigger) { $result = $this->call_trigger('CURRENCY_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { @@ -353,7 +363,7 @@ class MultiCurrency extends CommonObject } $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); @@ -383,10 +393,8 @@ class MultiCurrency extends CommonObject */ public function deleteRates() { - foreach ($this->rates as &$rate) - { - if ($rate->delete() <= 0) - { + foreach ($this->rates as &$rate) { + if ($rate->delete() <= 0) { return false; } } @@ -402,11 +410,10 @@ class MultiCurrency extends CommonObject */ public function addRate($rate) { - $currencyRate = new CurrencyRate($this->db); + $currencyRate = new CurrencyRate($this->db); $currencyRate->rate = price2num($rate); - if ($currencyRate->create($this->id) > 0) - { + if ($currencyRate->create($this->id) > 0) { $this->rate = $currencyRate; return 1; } else { @@ -433,19 +440,20 @@ class MultiCurrency extends CommonObject $sql = 'SELECT label FROM '.MAIN_DB_PREFIX."c_currencies WHERE code_iso = '".$this->db->escape($code)."'"; - dol_syslog(__METHOD__, LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql); - if ($resql && ($line = $db->fetch_object($resql))) - { + if ($resql && ($line = $db->fetch_object($resql))) { $currency->name = $line->label; } - if ($currency->create($user) > 0) - { + if ($currency->create($user) > 0) { $currency->addRate($rate); - if (!empty($line)) return 2; - else return 1; + if (!empty($line)) { + return 2; + } else { + return 1; + } } return -1; @@ -469,7 +477,7 @@ class MultiCurrency extends CommonObject */ public function getRate() { - $sql = 'SELECT cr.rowid'; + $sql = 'SELECT cr.rowid'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as cr'; $sql .= ' WHERE cr.fk_multicurrency = '.$this->id; $sql .= ' AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM '.MAIN_DB_PREFIX.$this->table_element_line.' AS cr2 WHERE cr2.fk_multicurrency = '.$this->id.')'; @@ -492,14 +500,17 @@ class MultiCurrency extends CommonObject */ public static function getIdFromCode($db, $code) { - global $conf; + 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); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql); - if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid; - else return 0; + if ($resql && $obj = $db->fetch_object($resql)) { + return $obj->rowid; + } else { + return 0; + } } /** @@ -516,7 +527,7 @@ class MultiCurrency extends CommonObject { global $conf; - $sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m'; + $sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m'; $sql1 .= ' LEFT JOIN '.MAIN_DB_PREFIX.'multicurrency_rate mc ON (m.rowid = mc.fk_multicurrency)'; $sql1 .= " WHERE m.code = '".$db->escape($code)."'"; @@ -531,12 +542,14 @@ class MultiCurrency extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql1.$sql2.$sql3); - if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate); - else { - if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE)) - { + if ($resql && $obj = $db->fetch_object($resql)) { + return array($obj->rowid, $obj->rate); + } else { + if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE)) { $resql = $db->query($sql1.$sql3); - if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate); + if ($resql && $obj = $db->fetch_object($resql)) { + return array($obj->rowid, $obj->rate); + } } return array(0, 1); @@ -556,11 +569,15 @@ class MultiCurrency extends CommonObject { $multicurrency_tx = self::getInvoiceRate($fk_facture, $table); - if ($multicurrency_tx) - { - if ($way == 'dolibarr') return price2num($amount * $multicurrency_tx, 'MU'); - else return price2num($amount / $multicurrency_tx, 'MU'); - } 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; + } } /** @@ -574,12 +591,11 @@ class MultiCurrency extends CommonObject { global $db; - $sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture; + $sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.((int) $fk_facture); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql); - if ($resql && ($line = $db->fetch_object($resql))) - { + if ($resql && ($line = $db->fetch_object($resql))) { return $line->multicurrency_tx; } @@ -597,14 +613,11 @@ class MultiCurrency extends CommonObject { global $conf; - if ($conf->currency != $conf->global->MULTICURRENCY_APP_SOURCE) - { + if ($conf->currency != $conf->global->MULTICURRENCY_APP_SOURCE) { $alternate_source = 'USD'.$conf->currency; - if (!empty($TRate->{$alternate_source})) - { + if (!empty($TRate->{$alternate_source})) { $coef = $TRate->USDUSD / $TRate->{$alternate_source}; - foreach ($TRate as $attr => &$rate) - { + foreach ($TRate as $attr => &$rate) { $rate *= $coef; } @@ -642,22 +655,17 @@ class MultiCurrency extends CommonObject $response = $resget['content']; $response = json_decode($response); - if ($response->success) - { + if ($response->success) { $TRate = $response->quotes; $timestamp = $response->timestamp; - if (self::recalculRates($TRate) >= 0) - { - foreach ($TRate as $currency_code => $rate) - { + if (self::recalculRates($TRate) >= 0) { + foreach ($TRate as $currency_code => $rate) { $code = substr($currency_code, 3, 3); $obj = new MultiCurrency($db); - if ($obj->fetch(null, $code) > 0) - { + if ($obj->fetch(null, $code) > 0) { $obj->updateRate($rate); - } elseif ($addifnotfound) - { + } elseif ($addifnotfound) { self::addRateFromDolibarr($code, $rate); } } @@ -681,11 +689,14 @@ class MultiCurrency extends CommonObject */ public static function checkCodeAlreadyExists($code) { - global $db; + global $db; - $currency = new MultiCurrency($db); - if ($currency->fetch('', $code) > 0) return true; - else return false; + $currency = new MultiCurrency($db); + if ($currency->fetch('', $code) > 0) { + return true; + } else { + return false; + } } } @@ -758,7 +769,9 @@ class CurrencyRate extends CommonObjectLine $error = 0; $this->rate = price2num($this->rate); - if (empty($this->entity) || $this->entity <= 0) $this->entity = $conf->entity; + if (empty($this->entity) || $this->entity <= 0) { + $this->entity = $conf->entity; + } $now = empty($this->date_sync) ? dol_now() : $this->date_sync; // Insert request @@ -791,7 +804,9 @@ class CurrencyRate extends CommonObjectLine if ($trigger) { $result = $this->call_trigger('CURRENCYRATE_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } } @@ -818,7 +833,7 @@ class CurrencyRate extends CommonObjectLine $sql = 'SELECT cr.rowid, cr.rate, cr.date_sync, cr.fk_multicurrency, cr.entity'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' AS cr'; - $sql .= ' WHERE cr.rowid = '.$id; + $sql .= ' WHERE cr.rowid = '.((int) $id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); @@ -867,9 +882,13 @@ class CurrencyRate extends CommonObjectLine // Update request $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET'; $sql .= ' rate='.$this->rate; - if (!empty($this->date_sync)) $sql .= ", date_sync='".$this->db->idate($this->date_sync)."'"; - if (!empty($this->fk_multicurrency)) $sql .= ', fk_multicurrency='.$this->fk_multicurrency; - $sql .= ' WHERE rowid='.$this->id; + if (!empty($this->date_sync)) { + $sql .= ", date_sync='".$this->db->idate($this->date_sync)."'"; + } + if (!empty($this->fk_multicurrency)) { + $sql .= ', fk_multicurrency='.$this->fk_multicurrency; + } + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -883,7 +902,9 @@ class CurrencyRate extends CommonObjectLine if (!$error && $trigger) { $result = $this->call_trigger('CURRENCYRATE_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } // Commit or rollback @@ -916,12 +937,14 @@ class CurrencyRate extends CommonObjectLine if ($trigger) { $result = $this->call_trigger('CURRENCYRATE_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index eae788b0587..8f5336450b8 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -58,12 +58,18 @@ $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = (GETPOST("page", 'int') ?GETPOST("page", 'int') : 0); -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 (!$sortfield) $sortfield = "cr.date_sync"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "cr.date_sync"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks @@ -74,7 +80,9 @@ $form = new Form($db); $hookmanager->initHooks(array('EditorRatelist', 'globallist')); -if (empty($action)) $action = 'list'; +if (empty($action)) { + $action = 'list'; +} // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -94,11 +102,18 @@ $arrayfields = array( $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Access control +// TODO Open this page to a given permission so a sale representative can modify change rates. Permission should be added into module multicurrency. +// One permission to read rates (history) and one to add/edit rates. +if (!$user->admin || empty($conf->multicurrency->enabled)) { + accessforbidden(); +} /* * Actions */ + if ($action == "create") { if (!empty($rateinput)) { $currencyRate_static = new CurrencyRate($db); @@ -184,20 +199,24 @@ if ($action == "confirm_delete") { } -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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)) -{ +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 - { + 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 $sall = ""; $search_date_sync = ""; $search_rate = ""; @@ -213,6 +232,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } + /* * View */ @@ -221,8 +241,9 @@ $htmlother = new FormOther($db); $title = $langs->trans("CurrencyRate"); $page_name = "ListCurrencyRate"; +$help_url = ''; -llxHeader('', $title, $helpurl, ''); +llxHeader('', $title, $help_url, ''); // Subheader $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans($page_name), $linkback); @@ -324,10 +345,18 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= ' FROM '.MAIN_DB_PREFIX.'multicurrency_rate as cr '; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."multicurrency AS m ON cr.fk_multicurrency = m.rowid"; -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($search_date_sync) $sql .= natural_search('cr.date_sync', $search_date_sync); -if ($search_rate) $sql .= natural_search('cr.rate', $search_rate); -if ($search_code) $sql .= natural_search('m.code', $search_code); +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($search_date_sync) { + $sql .= natural_search('cr.date_sync', $search_date_sync); +} +if ($search_rate) { + $sql .= natural_search('cr.rate', $search_rate); +} +if ($search_code) { + $sql .= natural_search('m.code', $search_code); +} $sql .= " WHERE m.code <> '".$db->escape($conf->currency)."'"; // Add where from hooks @@ -345,14 +374,12 @@ $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); if ($result) { $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -364,29 +391,46 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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 ($search_date_sync) $param = "&search_date_sync=".urlencode($search_date_sync); - if ($search_rate) $param = "&search_rate=".urlencode($search_rate); - if ($search_code != '') $param .= "&search_code=".urlencode($search_code); + if ($search_date_sync) { + $param = "&search_date_sync=".urlencode($search_date_sync); + } + if ($search_rate) { + $param = "&search_rate=".urlencode($search_rate); + } + if ($search_code != '') { + $param .= "&search_code=".urlencode($search_code); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - if ($user->admin) $arrayofmassactions['predelete'] = $langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if ($user->admin) { + $arrayofmassactions['predelete'] = $langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -399,9 +443,10 @@ if ($resql) include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -411,11 +456,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if ($moreforfilter) - { + if ($moreforfilter) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -423,7 +470,9 @@ 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); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; @@ -432,22 +481,19 @@ if ($resql) print '<tr class="liste_titre_filter">'; // date - if (!empty($arrayfields['cr.date_sync']['checked'])) - { + if (!empty($arrayfields['cr.date_sync']['checked'])) { print '<td class="liste_titre" align="left">'; print '<input class="flat" type="text" name="search_date_sync" size="8" value="'.dol_escape_htmltag($search_date_sync).'">'; print '</td>'; } // code - if (!empty($arrayfields['m.code']['checked'])) - { + if (!empty($arrayfields['m.code']['checked'])) { print '<td class="liste_titre" align="left">'; print '<input class="flat" type="text" name="search_code" size="12" value="'.dol_escape_htmltag($search_code).'">'; print '</td>'; } // rate - if (!empty($arrayfields['cr.rate']['checked'])) - { + if (!empty($arrayfields['cr.rate']['checked'])) { print '<td class="liste_titre" align="left">'; print '<input class="flat" type="text" name="search_rate" size="8" value="'.dol_escape_htmltag($search_rate).'">'; print '</td>'; @@ -466,9 +512,15 @@ if ($resql) print '</tr>'; print '<tr class="liste_titre">'; - if (!empty($arrayfields['cr.date_sync']['checked'])) print_liste_field_titre($arrayfields['cr.date_sync']['label'], $_SERVER["PHP_SELF"], "cr.date_sync", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.code']['checked'])) print_liste_field_titre($arrayfields['m.code']['label'], $_SERVER["PHP_SELF"], "m.code", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['cr.rate']['checked'])) print_liste_field_titre($arrayfields['cr.rate']['label'], $_SERVER["PHP_SELF"], "cr.rate", "", $param, "", $sortfield, $sortorder); + if (!empty($arrayfields['cr.date_sync']['checked'])) { + print_liste_field_titre($arrayfields['cr.date_sync']['label'], $_SERVER["PHP_SELF"], "cr.date_sync", "", $param, "", $sortfield, $sortorder); + } + if (!empty($arrayfields['m.code']['checked'])) { + print_liste_field_titre($arrayfields['m.code']['label'], $_SERVER["PHP_SELF"], "m.code", "", $param, "", $sortfield, $sortorder); + } + if (!empty($arrayfields['cr.rate']['checked'])) { + print_liste_field_titre($arrayfields['cr.rate']['label'], $_SERVER["PHP_SELF"], "cr.rate", "", $param, "", $sortfield, $sortorder); + } // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); @@ -480,38 +532,40 @@ if ($resql) $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; // date_sync - if (!empty($arrayfields['cr.date_sync']['checked'])) - { + if (!empty($arrayfields['cr.date_sync']['checked'])) { print '<td class="tdoverflowmax200">'; print $obj->date_sync; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // code - if (!empty($arrayfields['m.code']['checked'])) - { + if (!empty($arrayfields['m.code']['checked'])) { print '<td class="tdoverflowmax200">'; print $obj->code." ".$obj->name; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // rate - if (!empty($arrayfields['cr.rate']['checked'])) - { + if (!empty($arrayfields['cr.rate']['checked'])) { print '<td class="tdoverflowmax200">'; print $obj->rate; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Fields from hook @@ -521,16 +575,19 @@ if ($resql) // Action print '<td class="nowrap" align="center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?action=updateRate&amp;id_rate='.$obj->rowid.'">'.img_picto('edit', 'edit').'</a>'; print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?action=deleteRate&amp;id_rate='.$obj->rowid.'">'.img_picto('delete', 'delete').'</a>'; print '<input id="cb'.$obj->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; $i++; @@ -542,8 +599,7 @@ if ($resql) print "</div>"; print '</form>'; -} -else { +} else { dol_print_error($db); } diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 1a61773993f..fd9fa3e0456 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -64,17 +64,21 @@ $expiredate = dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), $parameters = array('id' => $numsondage); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) $action = ''; +if (empty($reshook)) { + if ($cancel) { + $action = ''; + } // Delete - if ($action == 'delete_confirm') - { + if ($action == 'delete_confirm') { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $result = $object->delete($user, '', $numsondage); @@ -83,36 +87,33 @@ if (empty($reshook)) } // Close - if ($action == 'close') - { + if ($action == 'close') { $object->status = Opensurveysondage::STATUS_CLOSED; $object->update($user); } // Reopend - if ($action == 'reopen') - { + if ($action == 'reopen') { $object->status = Opensurveysondage::STATUS_VALIDATED; $object->update($user); } // Update - if ($action == 'update') - { + if ($action == 'update') { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $error = 0; - if (!GETPOST('nouveautitre')) - { + if (!GETPOST('nouveautitre')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); $error++; $action = 'edit'; } - if (!$error) - { + if (!$error) { $object->title = (string) GETPOST('nouveautitre', 'alphanohtml'); $object->description = (string) GETPOST('nouveauxcommentaires', 'restricthtml'); $object->mail_admin = (string) GETPOST('nouvelleadresse', 'alpha'); @@ -130,8 +131,7 @@ if (empty($reshook)) } // Add comment - if (GETPOST('ajoutcomment')) - { + if (GETPOST('ajoutcomment')) { $error = 0; if (!GETPOST('comment')) { @@ -149,8 +149,7 @@ if (empty($reshook)) $resql = $object->addComment($comment, $comment_user); - if (!$resql) - { + if (!$resql) { setEventMessages($langs->trans('ErrorInsertingComment'), null, 'errors'); } } @@ -158,17 +157,20 @@ if (empty($reshook)) // Delete comment $idcomment = GETPOST('deletecomment', 'int'); - if ($idcomment) - { + if ($idcomment) { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $resql = $object->deleteComment($idcomment); } if ($action == 'edit') { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } } } @@ -179,8 +181,7 @@ if (empty($reshook)) $form = new Form($db); -if ($object->fk_user_creat) -{ +if ($object->fk_user_creat) { $userstatic = new User($db); $userstatic->fetch($object->fk_user_creat); } @@ -195,8 +196,7 @@ llxHeader('', $title, $helpurl, 0, 0, 0, $arrayofjs, $arrayofcss); // Define format of choices $toutsujet = explode(",", $object->sujet); $listofanswers = array(); -foreach ($toutsujet as $value) -{ +foreach ($toutsujet as $value) { $tmp = explode('@', $value); $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); } @@ -234,16 +234,16 @@ print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").'</td>< print '<tr><td>'; $adresseadmin = $object->mail_admin; print $langs->trans("Title").'</td><td colspan="2">'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<input type="text" name="nouveautitre" style="width: 95%" value="'.dol_escape_htmltag(dol_htmlentities($object->title)).'">'; -} else print dol_htmlentities($object->title); +} else { + print dol_htmlentities($object->title); +} print '</td></tr>'; // Description print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="2">'; -if ($action == 'edit') -{ +if ($action == 'edit') { $doleditor = new DolEditor('nouveauxcommentaires', $object->description, '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); $doleditor->Create(0, ''); } else { @@ -255,17 +255,17 @@ print '</td></tr>'; //If linked user, then emails are going to be sent to users' email if (!$object->fk_user_creat) { print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="2">'; - if ($action == 'edit') - { + if ($action == 'edit') { print '<input type="text" name="nouvelleadresse" class="minwith200" value="'.$object->mail_admin.'">'; - } else print dol_print_email($object->mail_admin, 0, 0, 1); + } else { + print dol_print_email($object->mail_admin, 0, 0, 1); + } print '</td></tr>'; } // Receive an email with each vote print '<tr><td>'.$langs->trans('ToReceiveEMailForEachVote').'</td><td colspan="2">'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<input type="checkbox" name="mailsonde" '.($object->mailsonde ? 'checked="checked"' : '').'">'; } else { print yn($object->mailsonde); @@ -281,26 +281,31 @@ print '</td></tr>'; // Users can comment print '<tr><td>'.$langs->trans('CanComment').'</td><td colspan="2">'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<input type="checkbox" name="cancomment" '.($object->allow_comments ? 'checked="checked"' : '').'">'; -} else print yn($object->allow_comments); +} else { + print yn($object->allow_comments); +} print '</td></tr>'; // Users can see others vote print '<tr><td>'.$langs->trans('CanSeeOthersVote').'</td><td colspan="2">'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<input type="checkbox" name="canseeothersvote" '.($object->allow_spy ? 'checked="checked"' : '').'">'; -} else print yn($object->allow_spy); +} else { + print yn($object->allow_spy); +} print '</td></tr>'; // Expire date print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">'; -if ($action == 'edit') print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); -else { +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")); + if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) { + print img_warning($langs->trans("Expired")); + } } print '</td></tr>'; @@ -324,7 +329,9 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai $url = $urlwithroot.'/public/opensurvey/studs.php?sondage='.$object->id_sondage; print '<input type="text" style="width: 60%" '.($action == 'edit' ? 'disabled' : '').' id="opensurveyurl" name="opensurveyurl" value="'.$url.'">'; -if ($action != 'edit') print ajax_autoselect("opensurveyurl", $url); +if ($action != 'edit') { + print ajax_autoselect("opensurveyurl", $url); +} print '</td></tr>'; @@ -334,8 +341,7 @@ print '</div>'; print dol_get_fiche_end(); -if ($action == 'edit') -{ +if ($action == 'edit') { print '<div class="center">'; print '<input type="submit" class="button button-save" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'">'; print ' &nbsp; '; @@ -348,7 +354,7 @@ print '</form>'."\n"; /* - * Barre d'actions + * Action bar */ print '<div class="tabsAction">'; @@ -356,13 +362,11 @@ if ($action != 'edit' && $user->rights->opensurvey->write) { //Modify button print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$numsondage.'">'.$langs->trans("Modify").'</a>'; - if ($object->status == Opensurveysondage::STATUS_VALIDATED) - { + if ($object->status == Opensurveysondage::STATUS_VALIDATED) { //Close button print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=close&id='.$numsondage.'">'.$langs->trans("Close").'</a>'; } - if ($object->status == Opensurveysondage::STATUS_CLOSED) - { + if ($object->status == Opensurveysondage::STATUS_CLOSED) { //Opened button print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=reopen&id='.$numsondage.'">'.$langs->trans("ReOpen").'</a>'; } @@ -373,8 +377,7 @@ if ($action != 'edit' && $user->rights->opensurvey->write) { print '</div>'; -if ($action == 'delete') -{ +if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?&id='.$numsondage, $langs->trans("RemovePoll"), $langs->trans("ConfirmRemovalOfPoll", $id), 'delete_confirm', '', '', 1); } diff --git a/htdocs/opensurvey/class/index.html b/htdocs/opensurvey/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index c635c2430a7..e11fb65184a 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -175,7 +175,7 @@ class Opensurveysondage extends CommonObject $sql .= "allow_comments,"; $sql .= "allow_spy,"; $sql .= "sujet,"; - $sql .= "entity"; + $sql .= "entity"; $sql .= ") VALUES ("; $sql .= "'".$this->db->escape($this->id_sondage)."',"; $sql .= " ".(empty($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").","; @@ -188,21 +188,25 @@ class Opensurveysondage extends CommonObject $sql .= " ".((int) $this->allow_comments).","; $sql .= " ".((int) $this->allow_spy).","; $sql .= " '".$this->db->escape($this->sujet)."',"; - $sql .= " ".((int) $conf->entity); + $sql .= " ".((int) $conf->entity); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } if (!$error && !$notrigger) { global $langs, $conf; // Call trigger $result = $this->call_trigger('OPENSURVEY_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -250,10 +254,8 @@ class Opensurveysondage extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id_sondage = $obj->id_sondage; @@ -336,15 +338,15 @@ class Opensurveysondage extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('OPENSURVEY_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -369,8 +371,7 @@ class Opensurveysondage extends CommonObject global $conf, $langs; $error = 0; - if (empty($numsondage)) - { + if (empty($numsondage)) { $numsondage = $this->id_sondage; } @@ -379,12 +380,13 @@ class Opensurveysondage extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('OPENSURVEY_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + 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); @@ -397,14 +399,14 @@ class Opensurveysondage extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -431,7 +433,9 @@ class Opensurveysondage extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -444,14 +448,16 @@ class Opensurveysondage extends CommonObject // 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowMyObject"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -466,8 +472,12 @@ class Opensurveysondage extends CommonObject $linkend = '</a>'; $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; + 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; @@ -488,19 +498,19 @@ class Opensurveysondage extends CommonObject $sql .= " WHERE id_sondage = '".$this->db->escape($this->id_sondage)."'"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + 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); + } else { + dol_print_error($this->db); + } $this->lines = $ret; @@ -543,14 +553,11 @@ class Opensurveysondage extends CommonObject $sql .= " ORDER BY id_comment"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows > 0) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($num_rows > 0) { + while ($obj = $this->db->fetch_object($resql)) { $comments[] = $obj; } } @@ -587,7 +594,7 @@ class Opensurveysondage extends CommonObject */ 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).'"'; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.((int) $id_comment).' AND id_sondage = "'.$this->db->escape($this->id_sondage).'"'; $resql = $this->db->query($sql); if (!$resql) { @@ -642,8 +649,7 @@ class Opensurveysondage extends CommonObject // phpcs:enable global $langs, $conf; - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); @@ -656,10 +662,15 @@ class Opensurveysondage extends CommonObject $statusType = 'status'.$status; if ($status == self::STATUS_VALIDATED) { - if (0) $statusType = 'status1'; - else $statusType = 'status4'; + if (0) { + $statusType = 'status1'; + } else { + $statusType = 'status4'; + } + } + if ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; } - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/opensurvey/css/index.html b/htdocs/opensurvey/css/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 5abfd76f88e..76e4ffd9023 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -30,14 +30,15 @@ require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"; $action = GETPOST('action', 'aZ09'); $numsondage = ''; -if (GETPOST('id')) -{ +if (GETPOST('id')) { $numsondage = GETPOST("id", 'alpha'); } $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); -if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage); +if ($result <= 0) { + dol_print_error('', 'Failed to get survey id '.$numsondage); +} // Security check if (empty($user->rights->opensurvey->read)) { @@ -62,10 +63,8 @@ $toutsujet = explode(",", $object->sujet); // affichage des sujets du sondage $input .= $langs->trans("Name").";"; -for ($i = 0; $toutsujet[$i]; $i++) -{ - if ($object->format == "D") - { +for ($i = 0; $toutsujet[$i]; $i++) { + if ($object->format == "D") { $input .= ''.dol_print_date($toutsujet[$i], 'dayhour').';'; } else { $input .= ''.$toutsujet[$i].';'; @@ -74,11 +73,9 @@ for ($i = 0; $toutsujet[$i]; $i++) $input .= "\r\n"; -if (strpos($object->sujet, '@') !== false) -{ +if (strpos($object->sujet, '@') !== false) { $input .= ";"; - for ($i = 0; $toutsujet[$i]; $i++) - { + for ($i = 0; $toutsujet[$i]; $i++) { $heures = explode("@", $toutsujet[$i]); $input .= ''.$heures[1].';'; } @@ -92,12 +89,10 @@ $sql .= ' FROM '.MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " WHERE id_sondage='".$db->escape($numsondage)."'"; $sql .= " ORDER BY id_users"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); // Le name de l'utilisateur @@ -106,15 +101,12 @@ if ($resql) //affichage des resultats $ensemblereponses = $obj->reponses; - for ($k = 0; $k < $nbcolonnes; $k++) - { + for ($k = 0; $k < $nbcolonnes; $k++) { $car = substr($ensemblereponses, $k, 1); - if ($car == "1") - { + if ($car == "1") { $input .= 'OK;'; $somme[$k]++; - } elseif ($car == "2") - { + } elseif ($car == "2") { $input .= 'KO;'; $somme[$k]++; } else { @@ -125,7 +117,9 @@ 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 5832e57c46d..cda1bd81f79 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -95,26 +95,23 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ // Define urllogo $urllogo = ''; $urllogofull = ''; - if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) - { + if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - } 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo - if ($urllogo) - { + if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; print '>'; print '</div>'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref?utm_medium=website&utm_source=poweredby" href="https://www.dolibarr.org" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; + print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; } print '</div>'; } diff --git a/htdocs/opensurvey/img/index.html b/htdocs/opensurvey/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index c8cc35a0c61..ba608723816 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -50,11 +50,12 @@ $sql = 'SELECT COUNT(*) as nb'; $sql .= ' FROM '.MAIN_DB_PREFIX.'opensurvey_sondage'; $sql .= ' WHERE entity IN ('.getEntity('survey').')'; $resql = $db->query($sql); -if ($resql) -{ +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 eaee1b696e1..3dc42def482 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -50,7 +50,9 @@ $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 +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; @@ -67,24 +69,29 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "p.date_fin"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "p.date_fin"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} // Security check -if (!$user->rights->opensurvey->read) accessforbidden(); +if (!$user->rights->opensurvey->read) { + accessforbidden(); +} // Definition of fields for list $arrayfields = array(); -foreach ($arrayfields as $key => $val) -{ +foreach ($arrayfields 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'], 'position'=>$val['position']); + if (!empty($val['visible'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); + } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -107,21 +114,25 @@ $permissiontodelete = $user->rights->opensurvey->delete; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_title = ''; $search_ref = ''; @@ -129,8 +140,7 @@ if (empty($reshook)) $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')) - { + || 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 } @@ -160,11 +170,21 @@ $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"; $sql .= " WHERE p.entity IN (".getEntity('survey').")"; -if ($search_status != '-1' && $search_status != '') $sql .= natural_search("p.status", $search_status, 2); -if ($search_expired == 'expired') $sql .= " AND p.date_fin < '".$db->idate($now)."'"; -if ($search_expired == 'opened') $sql .= " AND p.date_fin >= '".$db->idate($now)."'"; -if ($search_ref) $sql .= natural_search("p.id_sondage", $search_ref); -if ($search_title) $sql .= natural_search("p.titre", $search_title); +if ($search_status != '-1' && $search_status != '') { + $sql .= natural_search("p.status", $search_status, 2); +} +if ($search_expired == 'expired') { + $sql .= " AND p.date_fin < '".$db->idate($now)."'"; +} +if ($search_expired == 'opened') { + $sql .= " AND p.date_fin >= '".$db->idate($now)."'"; +} +if ($search_ref) { + $sql .= natural_search("p.id_sondage", $search_ref); +} +if ($search_title) { + $sql .= natural_search("p.titre", $search_title); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -176,26 +196,22 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) -{ +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -204,8 +220,7 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".dol_buildpath('/opensurvey/card.php', 1).'?id='.$id); @@ -221,28 +236,40 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} $fieldtosortuser = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? 'firstname' : 'lastname'; -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // List of surveys into database print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -261,9 +288,10 @@ $objecttmp = new Opensurveysondage($db); $trackid = 'surv'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if ($sall) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -274,11 +302,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -346,18 +376,21 @@ print '</tr>'."\n"; // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +$totalarray['nbfield'] = 0; +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } $sql2 = 'select COUNT(*) as nb from '.MAIN_DB_PREFIX."opensurvey_user_studs where id_sondage='".$db->escape($obj->rowid)."'"; $resql2 = $db->query($sql2); - if ($resql2) - { + if ($resql2) { $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; @@ -372,11 +405,15 @@ while ($i < min($num, $limit)) print '<td>'; print $opensurvey_static->getNomUrl(1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } // Title print '<td>'.dol_htmlentities($obj->title).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } // Type print '<td>'; @@ -384,7 +421,9 @@ while ($i < min($num, $limit)) print img_picto('', dol_buildpath('/opensurvey/img/'.($type == 'classic' ? 'chart-32.png' : 'calendar-32.png'), 1), 'width="16"', 1); print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate"); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '<td>'; // Author @@ -400,23 +439,35 @@ while ($i < min($num, $limit)) print dol_htmlentities($obj->nom_admin); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } // Nb of voters print'<td class="right">'.$nbuser.'</td>'."\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '<td class="center">'.dol_print_date($db->jdate($obj->date_fin), 'day'); - if ($db->jdate($obj->date_fin) < $now && $obj->status == Opensurveysondage::STATUS_VALIDATED) { print img_warning($langs->trans("Expired")); } + if ($db->jdate($obj->date_fin) < $now && $obj->status == Opensurveysondage::STATUS_VALIDATED) { + print img_warning($langs->trans("Expired")); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '<td class="center">'.dol_print_date($db->jdate($obj->tms), 'dayhour'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '<td class="center">'.$opensurvey_static->getLibStatut(5).'</td>'."\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -426,14 +477,17 @@ while ($i < min($num, $limit)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; $i++; @@ -444,10 +498,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 8; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -463,10 +520,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index fe03c433738..6d12259a39f 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -40,7 +40,9 @@ $numsondage = GETPOST("id"); $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); -if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage); +if ($result <= 0) { + dol_print_error('', 'Failed to get survey id '.$numsondage); +} $nblines = $object->fetch_lines(); @@ -51,27 +53,22 @@ $nblines = $object->fetch_lines(); // Return to the results if (GETPOST('retoursondage')) { - header('Location: results.php?id='.$_GET['id']); + header('Location: results.php?id='.GETPOST('id', 'int')); exit; } $nbcolonnes = substr_count($object->sujet, ',') + 1; // Add vote -if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrome, boutonp.x for firefox -{ - if (GETPOST('nom')) - { +if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // boutonp for chrome, boutonp.x for firefox + if (GETPOST('nom')) { $erreur_prenom = false; $nouveauchoix = ''; - for ($i = 0; $i < $nbcolonnes; $i++) - { - if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '1') - { + for ($i = 0; $i < $nbcolonnes; $i++) { + if (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '1') { $nouveauchoix .= "1"; - } elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') - { + } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { $nouveauchoix .= "2"; } else { // sinon c'est 0 $nouveauchoix .= "0"; @@ -87,15 +84,16 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $sql .= ' ORDER BY id_users'; $resql = $db->query($sql); $num_rows = $db->num_rows($resql); - if ($num_rows > 0) - { + if ($num_rows > 0) { setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors'); $error++; } 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); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } } } @@ -104,55 +102,52 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i = 0; $i < $nblines; $i++) -{ - if (isset($_POST['modifierligne'.$i])) - { +for ($i = 0; $i < $nblines; $i++) { + if (isset($_POST['modifierligne'.$i])) { $ligneamodifier = $i; $testligneamodifier = true; } //test pour voir si une ligne est a modifier - if (isset($_POST['validermodifier'.$i])) - { + if (isset($_POST['validermodifier'.$i])) { $modifier = $i; $testmodifier = true; } } -if ($testmodifier) -{ +if ($testmodifier) { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $nouveauchoix = ''; - for ($i = 0; $i < $nbcolonnes; $i++) - { - //var_dump($_POST["choix$i"]); - if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '1') - { + for ($i = 0; $i < $nbcolonnes; $i++) { + if (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '1') { $nouveauchoix .= "1"; - } elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') - { + } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { $nouveauchoix .= "2"; } else { // sinon c'est 0 $nouveauchoix .= "0"; } } - $idtomodify = $_POST["idtomodify".$modifier]; + $idtomodify = GETPOST("idtomodify".$modifier); $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql .= " WHERE id_users = '".$db->escape($idtomodify)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } // Add column (not for date) -if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format == "A") -{ +if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format == "A") { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $nouveauxsujets = $object->sujet; @@ -165,41 +160,43 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format = $sql .= " SET sujet = '".$db->escape($nouveauxsujets)."'"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); - else { + if (!$resql) { + dol_print_error($db); + } else { header('Location: results.php?id='.$object->id_sondage); } } // Add column (with format date) -if (isset($_POST["ajoutercolonne"]) && $object->format == "D") -{ +if (GETPOSTISSET("ajoutercolonne") && $object->format == "D") { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $nouveauxsujets = $object->sujet; - if (isset($_POST["nouveaujour"]) && $_POST["nouveaujour"] != "vide" && - isset($_POST["nouveaumois"]) && $_POST["nouveaumois"] != "vide" && - isset($_POST["nouvelleannee"]) && $_POST["nouvelleannee"] != "vide") { - $nouvelledate = dol_mktime(0, 0, 0, $_POST["nouveaumois"], $_POST["nouveaujour"], $_POST["nouvelleannee"]); + if (GETPOSTISSET("nouveaujour") && GETPOST("nouveaujour") != "vide" && + GETPOSTISSET("nouveaumois") && GETPOST("nouveaumois") != "vide" && + GETPOSTISSET("nouvelleannee") && GETPOST("nouvelleannee") != "vide") { + $nouvelledate = dol_mktime(0, 0, 0, GETPOST("nouveaumois"), GETPOST("nouveaujour"), GETPOST("nouvelleannee")); - if (isset($_POST["nouvelleheuredebut"]) && $_POST["nouvelleheuredebut"] != "vide") { + if (GETPOSTISSET("nouvelleheuredebut") && GETPOST("nouvelleheuredebut") != "vide") { $nouvelledate .= "@"; $nouvelledate .= GETPOST("nouvelleheuredebut"); $nouvelledate .= "h"; - if ($_POST["nouvelleminutedebut"] != "vide") { + if (GETPOST("nouvelleminutedebut") != "vide") { $nouvelledate .= GETPOST("nouvelleminutedebut"); } } - if (isset($_POST["nouvelleheurefin"]) && $_POST["nouvelleheurefin"] != "vide") { + if (GETPOSTISSET("nouvelleheurefin") && GETPOST("nouvelleheurefin") != "vide") { $nouvelledate .= "-"; $nouvelledate .= GETPOST("nouvelleheurefin"); $nouvelledate .= "h"; - if ($_POST["nouvelleminutefin"] != "vide") { + if (GETPOST("nouvelleminutefin") != "vide") { $nouvelledate .= GETPOST("nouvelleminutefin"); } } @@ -223,8 +220,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") $cleinsertion = count($datesbase); } else { $nbdatesbase = count($datesbase); - for ($i = 0; $i < $nbdatesbase; $i++) - { + for ($i = 0; $i < $nbdatesbase; $i++) { $j = $i + 1; if ($nouvelledate > $datesbase[$i] && $nouvelledate < $datesbase[$j]) { $cleinsertion = $j; @@ -244,14 +240,14 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") $dateinsertion = substr("$dateinsertion", 1); // update with new topics into database - if (isset($erreur_ajout_date) && empty($erreur_ajout_date)) - { + if (isset($erreur_ajout_date) && empty($erreur_ajout_date)) { $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql .= " SET sujet = '".$db->escape($dateinsertion)."'"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); - else { + if (!$resql) { + dol_print_error($db); + } else { header('Location: results.php?id='.$object->id_sondage); } } @@ -263,12 +259,12 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") } // Delete line -for ($i = 0; $i < $nblines; $i++) -{ - if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox - { +for ($i = 0; $i < $nblines; $i++) { + if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) { // effacelignei for chrome, effacelignei_x for firefox // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $compteur = 0; @@ -278,16 +274,16 @@ for ($i = 0; $i < $nblines; $i++) $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $num = $db->num_rows($resql); - while ($compteur < $num) - { + while ($compteur < $num) { $obj = $db->fetch_object($resql); - if ($compteur == $i) - { + if ($compteur == $i) { $sql2 = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_user_studs'; - $sql2 .= ' WHERE id_users = '.$db->escape($obj->id_users); + $sql2 .= " WHERE id_users = ".((int) $obj->id_users); $resql2 = $db->query($sql2); } @@ -297,13 +293,13 @@ for ($i = 0; $i < $nblines; $i++) } // Delete column -for ($i = 0; $i < $nbcolonnes; $i++) -{ +for ($i = 0; $i < $nbcolonnes; $i++) { if ((GETPOST("effacecolonne".$i) || GETPOST("effacecolonne".$i."_x") || GETPOST("effacecolonne".$i.".x")) - && $nbcolonnes > 1) // effacecolonnei for chrome, effacecolonnei_x for firefox - { + && $nbcolonnes > 1) { // effacecolonnei for chrome, effacecolonnei_x for firefox // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } $db->begin(); @@ -312,12 +308,12 @@ for ($i = 0; $i < $nbcolonnes; $i++) $nouveauxsujets = ''; //parcours de tous les sujets actuels - while (isset($toutsujet[$j])) - { + while (isset($toutsujet[$j])) { //si le sujet n'est pas celui qui a été effacé alors on concatene - if ($i != $j) - { - if (!empty($nouveauxsujets)) $nouveauxsujets .= ','; + if ($i != $j) { + if (!empty($nouveauxsujets)) { + $nouveauxsujets .= ','; + } $nouveauxsujets .= $toutsujet[$j]; } @@ -328,7 +324,9 @@ for ($i = 0; $i < $nbcolonnes; $i++) $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql .= " SET sujet = '".$db->escape($nouveauxsujets)."' WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } // Clean current answer to remove deleted columns $compteur = 0; @@ -337,22 +335,19 @@ for ($i = 0; $i < $nbcolonnes; $i++) $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; dol_syslog('sql='.$sql); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } $num = $db->num_rows($resql); - while ($compteur < $num) - { + while ($compteur < $num) { $obj = $db->fetch_object($resql); $newcar = ''; $ensemblereponses = $obj->reponses; // parcours de toutes les réponses actuelles - for ($j = 0; $j < $nbcolonnes; $j++) - { + for ($j = 0; $j < $nbcolonnes; $j++) { $car = substr($ensemblereponses, $j, 1); //si les reponses ne concerne pas la colonne effacée, on concatene if ($i != $j) { @@ -389,8 +384,7 @@ if ($object->fk_user_creat) { } $result = $object->fetch(0, $numsondage); -if ($result <= 0) -{ +if ($result <= 0) { dol_print_error($db, $object->error); exit; } @@ -405,8 +399,7 @@ llxHeader('', $title, $helpurl, 0, 0, 0, $arrayofjs, $arrayofcss); // Define format of choices $toutsujet = explode(",", $object->sujet); $listofanswers = array(); -foreach ($toutsujet as $value) -{ +foreach ($toutsujet as $value) { $tmp = explode('@', $value); $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); } @@ -452,10 +445,13 @@ print '</td></tr>'; // Expire date print '<tr><td>'.$langs->trans('ExpireDate').'</td><td colspan="2">'; -if ($action == 'edit') print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); -else { +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")); + if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) { + print img_warning($langs->trans("Expired")); + } } print '</td></tr>'; @@ -480,8 +476,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai $url = $urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php', 1).'?sondage='.$object->id_sondage; $urllink = '<input type="text" style="width: 60%" '.($action == 'edit' ? 'disabled' : '').' id="opensurveyurl" name="opensurveyurl" value="'.$url.'">'; print $urllink; -if ($action != 'edit') -{ +if ($action != 'edit') { print '<script type="text/javascript"> jQuery(document).ready(function () { jQuery("#opensurveyurl").click(function() { jQuery(this).select(); } ); @@ -511,10 +506,11 @@ print '</div>'; // Show form to add a new field/column -if (GETPOST('ajoutsujet')) -{ +if (GETPOST('ajoutsujet')) { // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + if (!$user->rights->opensurvey->write) { + accessforbidden(); + } print '<form name="formulaire" action="" method="POST">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -524,8 +520,7 @@ if (GETPOST('ajoutsujet')) print "<br><br>\n"; // Add new column - if ($object->format == "A") - { + if ($object->format == "A") { print $langs->trans("AddNewColumn").':<br><br>'; print $langs->trans("Title").' <input type="text" name="nouvellecolonne" size="40"><br>'; $tmparray = array('checkbox'=>$langs->trans("CheckBox"), 'yesno'=>$langs->trans("YesNoList"), 'foragainst'=>$langs->trans("PourContreList")); @@ -631,8 +626,7 @@ print '</tr>'."\n"; // Show choice titles -if ($object->format == "D") -{ +if ($object->format == "D") { //affichage des sujets du sondage print '<tr>'."\n"; print '<td></td>'."\n"; @@ -641,8 +635,7 @@ if ($object->format == "D") //affichage des années $colspan = 1; $nbofsujet = count($toutsujet); - for ($i = 0; $i < $nbofsujet; $i++) - { + for ($i = 0; $i < $nbofsujet; $i++) { $current = $toutsujet[$i]; if (strpos($toutsujet[$i], '@') !== false) { @@ -656,15 +649,20 @@ if ($object->format == "D") } $currenty = 0; - if ($current) $currenty = strftime("%Y", $current); + if ($current) { + $currenty = strftime("%Y", $current); + } $next = 0; - if ($next) $nexty = strftime("%Y", $next); - if (isset($toutsujet[$i + 1]) && ($currenty == $nexty)) - { + if ($next) { + $nexty = strftime("%Y", $next); + } + if (isset($toutsujet[$i + 1]) && ($currenty == $nexty)) { $colspan++; } else { print '<td colspan='.$colspan.' class="annee">'; - if ($current) print strftime("%Y", $current); + if ($current) { + print strftime("%Y", $current); + } print '</td>'."\n"; $colspan = 1; } @@ -759,8 +757,7 @@ if ($object->format == "D") print '<td></td>'."\n"; print '<td></td>'."\n"; - for ($i = 0; isset($toutsujet[$i]); $i++) - { + for ($i = 0; isset($toutsujet[$i]); $i++) { $tmp = explode('@', $toutsujet[$i]); print '<td class="sujet">'.dol_htmlentities($tmp[0]).'</td>'."\n"; } @@ -779,14 +776,12 @@ $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; dol_syslog('sql='.$sql); $resql = $db->query($sql); -if (!$resql) -{ +if (!$resql) { dol_print_error($db); exit; } $num = $db->num_rows($resql); -while ($compteur < $num) -{ +while ($compteur < $num) { $obj = $db->fetch_object($resql); $ensemblereponses = $obj->reponses; @@ -801,121 +796,167 @@ while ($compteur < $num) print '</td><td class="nom">'.dol_htmlentities($obj->name).'</td>'."\n"; // si la ligne n'est pas a changer, on affiche les données - if (!$testligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { + if (!$testligneamodifier) { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { - if (((string) $car) == "1") print '<td class="ok">OK</td>'."\n"; - else print '<td class="non">KO</td>'."\n"; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + if (((string) $car) == "1") { + print '<td class="ok">OK</td>'."\n"; + } else { + print '<td class="non">KO</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } } } else { //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs - if ($compteur == $ligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { + if ($compteur == $ligneamodifier) { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); print '<td class="vide">'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { print '<input type="checkbox" name="choix'.$i.'" value="1" '; - if ($car == '1') print 'checked'; + if ($car == '1') { + print 'checked'; + } print '>'; } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("No"), '1'=>$langs->trans("Yes")); print $form->selectarray("choix".$i, $arraychoice, $car); } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("Against"), '1'=>$langs->trans("For")); print $form->selectarray("choix".$i, $arraychoice, $car); } print '</td>'."\n"; } } else { - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { - if (((string) $car) == "1") print '<td class="ok">OK</td>'."\n"; - else print '<td class="non">KO</td>'."\n"; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + if (((string) $car) == "1") { + print '<td class="ok">OK</td>'."\n"; + } else { + print '<td class="non">KO</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } } } } // Button edit at end of line - if ($compteur != $ligneamodifier && ($user->rights->opensurvey->write)) - { + if ($compteur != $ligneamodifier && ($user->rights->opensurvey->write)) { print '<td class="casevide"><input type="submit" class="button" name="modifierligne'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Edit")).'"></td>'."\n"; } //demande de confirmation pour modification de ligne - for ($i = 0; $i < $nblines; $i++) - { - if (GETPOSTISSET("modifierligne".$i)) - { - if ($compteur == $i) - { + for ($i = 0; $i < $nblines; $i++) { + if (GETPOSTISSET("modifierligne".$i)) { + if ($compteur == $i) { print '<td class="casevide">'; print '<input type="hidden" name="idtomodify'.$compteur.'" value="'.$obj->id_users.'">'; print '<input type="submit" class="button button-save" name="validermodifier'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Save")).'">'; @@ -929,33 +970,27 @@ while ($compteur < $num) } // Add line to add new record -if (empty($testligneamodifier)) -{ +if (empty($testligneamodifier)) { print '<tr>'."\n"; print '<td></td>'."\n"; print '<td class="nom">'."\n"; print '<input type="text" placeholder="'.dol_escape_htmltag($langs->trans("Name")).'" name="nom" maxlength="64" size="24">'."\n"; print '</td>'."\n"; - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { print '<td class="vide">'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { print '<input type="checkbox" name="choix'.$i.'" value="1"'; - if (GETPOSTISSET('choix'.$i) && GETPOST('choix'.$i) == '1') - { + if (GETPOSTISSET('choix'.$i) && GETPOST('choix'.$i) == '1') { print ' checked'; } print '>'; } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("No"), '1'=>$langs->trans("Yes")); print $form->selectarray("choix".$i, $arraychoice); } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("Against"), '1'=>$langs->trans("For")); print $form->selectarray("choix".$i, $arraychoice); } @@ -969,18 +1004,15 @@ if (empty($testligneamodifier)) // Select value of best choice (for checkbox columns only) $nbofcheckbox = 0; -for ($i = 0; $i < $nbcolonnes + 1; $i++) -{ - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - $nbofcheckbox++; - if (isset($sumfor[$i])) - { - if ($i == 0) - { +for ($i = 0; $i < $nbcolonnes + 1; $i++) { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + $nbofcheckbox++; + } + if (isset($sumfor[$i])) { + if ($i == 0) { $meilleurecolonne = $sumfor[$i]; } - if (isset($sumfor[$i]) && $sumfor[$i] > $meilleurecolonne) - { + if (isset($sumfor[$i]) && $sumfor[$i] > $meilleurecolonne) { $meilleurecolonne = $sumfor[$i]; } } @@ -991,29 +1023,36 @@ for ($i = 0; $i < $nbcolonnes + 1; $i++) print '<tr>'."\n"; print '<td></td>'."\n"; print '<td class="center">'.$langs->trans("Total").'</td>'."\n"; -for ($i = 0; $i < $nbcolonnes; $i++) -{ +for ($i = 0; $i < $nbcolonnes; $i++) { $showsumfor = isset($sumfor[$i]) ? $sumfor[$i] : ''; $showsumagainst = isset($sumagainst[$i]) ? $sumagainst[$i] : ''; - if (empty($showsumfor)) $showsumfor = 0; - if (empty($showsumagainst)) $showsumagainst = 0; + if (empty($showsumfor)) { + $showsumfor = 0; + } + if (empty($showsumagainst)) { + $showsumagainst = 0; + } print '<td>'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) print $showsumfor; - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst; - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + print $showsumfor; + } + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst; + } + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst; + } print '</td>'."\n"; } print '</tr>'; // Show picto winner -if ($nbofcheckbox >= 2) -{ +if ($nbofcheckbox >= 2) { print '<tr>'."\n"; print '<td></td>'."\n"; print '<td></td>'."\n"; for ($i = 0; $i < $nbcolonnes; $i++) { - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { print '<td class="somme"><img src="'.dol_buildpath('/opensurvey/img/medaille.png', 1).'"></td>'."\n"; } else { print '<td class="somme"></td>'."\n"; @@ -1044,10 +1083,8 @@ $toutsujet = explode(",", $object->sujet); // With old versions, this field was $compteursujet = 0; $meilleursujet = ''; -for ($i = 0; $i < $nbcolonnes; $i++) -{ - if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) - { +for ($i = 0; $i < $nbcolonnes; $i++) { + if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) { $meilleursujet .= ", "; if ($object->format == "D") { @@ -1071,8 +1108,7 @@ $meilleursujet = substr($meilleursujet, 1); $meilleursujet = str_replace("°", "'", $meilleursujet); // Show best choice -if ($nbofcheckbox >= 2) -{ +if ($nbofcheckbox >= 2) { $vote_str = $langs->trans('votes'); print '<p class="affichageresultats">'."\n"; diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 42213af2ae2..4919006a5f1 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -28,7 +28,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; // Security check -if (!$user->rights->opensurvey->write) accessforbidden(); +if (!$user->rights->opensurvey->write) { + accessforbidden(); +} @@ -53,20 +55,16 @@ if (isset($_SESSION["nbrecases"])) { $_SESSION["nbrecases"] = 5; } -if (GETPOST("ajoutcases") || GETPOST("ajoutcases_x")) -{ +if (GETPOST("ajoutcases") || GETPOST("ajoutcases_x")) { $_SESSION["nbrecases"] = $_SESSION["nbrecases"] + 5; } // Create survey into database -if (GETPOSTISSET("confirmecreation")) -{ +if (GETPOSTISSET("confirmecreation")) { //recuperation des données de champs textes $toutchoix = ''; - for ($i = 0; $i < $_SESSION["nbrecases"] + 1; $i++) - { - if (!empty($arrayofchoices[$i])) - { + for ($i = 0; $i < $_SESSION["nbrecases"] + 1; $i++) { + if (!empty($arrayofchoices[$i])) { $toutchoix .= ','; $toutchoix .= str_replace(array(",", "@"), " ", $arrayofchoices[$i]).(empty($arrayoftypecolumn[$i]) ? '' : '@'.$arrayoftypecolumn[$i]); } @@ -77,10 +75,8 @@ if (GETPOSTISSET("confirmecreation")) //test de remplissage des cases $testremplissage = ''; - for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) - { - if (isset($arrayofchoices[$i])) - { + for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { + if (isset($arrayofchoices[$i])) { $testremplissage = "ok"; } } @@ -107,8 +103,7 @@ $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); -if (empty($_SESSION['title'])) -{ +if (empty($_SESSION['title'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooter(); exit; diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index ae64c1e6491..ce5f79b1174 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -28,7 +28,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; // Security check -if (!$user->rights->opensurvey->write) accessforbidden(); +if (!$user->rights->opensurvey->write) { + accessforbidden(); +} // Survey type is DATE $_SESSION["formatsondage"] = "D"; @@ -40,19 +42,15 @@ $erreur = false; */ // Insert survey -if (GETPOST('confirmation')) -{ +if (GETPOST('confirmation')) { // We save hours entered - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('nbrecaseshoraires', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); $errheure = array(); - for ($i = 0; $i < $nbofchoice; $i++) - { + for ($i = 0; $i < $nbofchoice; $i++) { // Show hours choices - for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) - { + for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; $tmphorairesi = GETPOST('horaires'.$i, 'array'); @@ -170,8 +168,7 @@ if (GETPOST('confirmation')) } // Add survey into database - if (!$erreur) - { + if (!$erreur) { $_SESSION["toutchoix"] = substr("$choixdate", 1); ajouter_sondage(); @@ -179,11 +176,9 @@ if (GETPOST('confirmation')) } // Reset days -if (GETPOST('reset')) -{ +if (GETPOST('reset')) { $nbofchoice = count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) - { + for ($i = 0; $i < $nbofchoice; $i++) { for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { unset($_SESSION["horaires$i"][$j]); } @@ -199,8 +194,7 @@ if (GETPOST('reset')) * View */ -if (!isset($_SESSION['description']) && !isset($_SESSION['mail'])) -{ +if (!isset($_SESSION['description']) && !isset($_SESSION['mail'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; } @@ -210,11 +204,9 @@ $arrayofcss = array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); //nombre de cases par défaut -if (!isset($_SESSION["nbrecaseshoraires"])) -{ +if (!isset($_SESSION["nbrecaseshoraires"])) { $_SESSION["nbrecaseshoraires"] = 5; -} elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) -{ +} elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) { $_SESSION["nbrecaseshoraires"] = 10; } @@ -224,9 +216,15 @@ $moisAJ = date("n"); $anneeAJ = date("Y"); // Initialisation des jour, mois et année -if (!isset($_SESSION['jour'])) $_SESSION['jour'] = date('j'); -if (!isset($_SESSION['mois'])) $_SESSION['mois'] = date('n'); -if (!isset($_SESSION['annee'])) $_SESSION['annee'] = date('Y'); +if (!isset($_SESSION['jour'])) { + $_SESSION['jour'] = date('j'); +} +if (!isset($_SESSION['mois'])) { + $_SESSION['mois'] = date('n'); +} +if (!isset($_SESSION['annee'])) { + $_SESSION['annee'] = date('Y'); +} //mise a jour des valeurs de session si bouton retour a aujourd'hui if (!issetAndNoEmpty('choixjourajout') && !issetAndNoEmpty('choixjourretrait') && (issetAndNoEmpty('retourmois') || issetAndNoEmpty('retourmois_x'))) { @@ -245,8 +243,7 @@ if (issetAndNoEmpty('moisavant_x') || issetAndNoEmpty('moisavant')) { } //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { //affichage des 5 cases horaires @@ -267,11 +264,9 @@ if (issetAndNoEmpty('moisapres_x') || issetAndNoEmpty('moisapres')) { } //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) - { + for ($i = 0; $i < $nbofchoice; $i++) { //affichage des 5 cases horaires for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) { $_SESSION["horaires$i"][$j] = $_POST["horaires$i"][$j]; @@ -285,8 +280,7 @@ if (issetAndNoEmpty('anneeavant_x') || issetAndNoEmpty('anneeavant')) { $_SESSION["annee"] -= 1; //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { //affichage des 5 cases horaires @@ -302,8 +296,7 @@ if (issetAndNoEmpty('anneeapres_x') || issetAndNoEmpty('anneeapres')) { $_SESSION["annee"] += 1; //On sauvegarde les heures deja entrées - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { //affichage des 5 cases horaires @@ -319,8 +312,7 @@ $nbrejourmois = date("t", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee $premierjourmois = date("N", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["annee"])) - 1; //traduction de la valeur du mois -if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13) -{ +if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13) { $motmois = dol_print_date(mktime(0, 0, 0, $_SESSION["mois"], 10), '%B'); } else { $motmois = dol_print_date(dol_now(), '%B'); @@ -356,8 +348,7 @@ print '<table align="center">'."\n"; // The div class=center has no effect on ta print '<tr>'."\n"; //affichage des jours de la semaine en haut du tableau -for ($i = 0; $i < 7; $i++) -{ +for ($i = 0; $i < 7; $i++) { print '<td align="center" class="joursemaine">'.dol_print_date(mktime(0, 0, 0, 0, $i, 10), '%A').'</td>'; } @@ -371,8 +362,7 @@ if (issetAndNoEmpty('choixjourajout')) { // Test pour éviter les doublons dans la variable qui contient toutes les dates $journeuf = true; - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('choixjourajout') === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true && issetAndNoEmpty('choixjourajout') === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); for ($i = 0; $i < $nbofchoice; $i++) { if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $_POST["choixjourajout"][0], $_SESSION["annee"])) { @@ -421,10 +411,8 @@ if (issetAndNoEmpty('choixjourretrait')) { } } - for ($i = 0; $i < $nbofchoice; $i++) - { - if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $_POST["choixjourretrait"][0], $_SESSION["annee"])) - { + for ($i = 0; $i < $nbofchoice; $i++) { + if ($_SESSION["totalchoixjour"][$i] == mktime(0, 0, 0, $_SESSION["mois"], $_POST["choixjourretrait"][0], $_SESSION["annee"])) { for ($j = $i; $j < $nbofchoice; $j++) { $k = $j + 1; $_SESSION["horaires$j"] = $_SESSION["horaires$k"]; @@ -468,8 +456,7 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) { if ($i < $premierjourmois) { print '<td class="avant"></td>'."\n"; } else { - if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) - { + if (issetAndNoEmpty('totalchoixjour', $_SESSION) === true) { $nbofchoice = count($_SESSION["totalchoixjour"]); for ($j = 0; $j < $nbofchoice; $j++) { // show red buttons @@ -501,8 +488,7 @@ print '</div></div>'."\n"; print '<div class="bodydate"><div class="center">'."\n"; // affichage de tous les jours choisis -if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) -{ +if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) { //affichage des jours print '<br>'."\n"; print '<div align="left">'; @@ -528,8 +514,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) //affichage de la liste des jours choisis $nbofchoice = count($_SESSION["totalchoixjour"]); - for ($i = 0; $i < $nbofchoice; $i++) - { + for ($i = 0; $i < $nbofchoice; $i++) { print '<tr>'."\n"; print '<td>'.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' ('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')</td>'; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index cbeb448d2d7..30e662be7ea 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; // Security check -if (!$user->rights->opensurvey->write) accessforbidden(); +if (!$user->rights->opensurvey->write) { + accessforbidden(); +} $langs->load("opensurvey"); @@ -43,9 +45,10 @@ $creation_sondage_autre = GETPOST('creation_sondage_autre'); // We init some session variable to avoir warning $session_var = array('title', 'description', 'mailsonde'); -foreach ($session_var as $var) -{ - if (isset($_SESSION[$var])) $_SESSION[$var] = null; +foreach ($session_var as $var) { + if (isset($_SESSION[$var])) { + $_SESSION[$var] = null; + } } // On initialise également les autres variables @@ -53,8 +56,7 @@ $cocheplus = ''; $cochemail = ''; // Jump to correct page -if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) -{ +if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) { $_SESSION["title"] = $title; $_SESSION["description"] = $description; @@ -79,11 +81,9 @@ if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) $testdate = false; $champdatefin = dol_mktime(0, 0, 0, GETPOST('champdatefinmonth'), GETPOST('champdatefinday'), GETPOST('champdatefinyear')); - if ($champdatefin && ($champdatefin > 0)) // A date was provided - { + if ($champdatefin && ($champdatefin > 0)) { // A date was provided // Expire date is not before today - if ($champdatefin >= dol_now()) - { + if ($champdatefin >= dol_now()) { $testdate = true; $_SESSION['champdatefin'] = dol_print_date($champdatefin, 'dayrfc'); } else { @@ -99,16 +99,13 @@ if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("ExpireDate")), null, 'errors'); } - if ($title && $testdate) - { - if (!empty($creation_sondage_date)) - { + if ($title && $testdate) { + if (!empty($creation_sondage_date)) { header("Location: choix_date.php"); exit(); } - if (!empty($creation_sondage_autre)) - { + if (!empty($creation_sondage_autre)) { header("Location: choix_autre.php"); exit(); } @@ -140,8 +137,7 @@ print dol_get_fiche_head(); print '<table class="border centpercent">'."\n"; print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("PollTitle").'</td><td><input type="text" name="title" class="minwidth300" maxlength="80" value="'.$_SESSION["title"].'"></td>'."\n"; -if (!$_SESSION["title"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) -{ +if (!$_SESSION["title"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors'); } @@ -170,22 +166,34 @@ print '<br>'."\n"; // Check or not -if ($_SESSION["mailsonde"]) $cochemail = "checked"; +if ($_SESSION["mailsonde"]) { + $cochemail = "checked"; +} print '<input type="checkbox" name="mailsonde" '.$cochemail.'> '.$langs->trans("ToReceiveEMailForEachVote").'<br>'."\n"; -if ($_SESSION['allow_comments']) $allow_comments = 'checked'; -if (GETPOSTISSET('allow_comments')) $allow_comments = GETPOST('allow_comments') ? 'checked' : ''; +if ($_SESSION['allow_comments']) { + $allow_comments = 'checked'; +} +if (GETPOSTISSET('allow_comments')) { + $allow_comments = GETPOST('allow_comments') ? 'checked' : ''; +} print '<input type="checkbox" name="allow_comments" '.$allow_comments.'"> '.$langs->trans('CanComment').'<br>'."\n"; -if ($_SESSION['allow_spy']) $allow_spy = 'checked'; -if (GETPOSTISSET('allow_spy')) $allow_spy = GETPOST('allow_spy') ? 'checked' : ''; +if ($_SESSION['allow_spy']) { + $allow_spy = 'checked'; +} +if (GETPOSTISSET('allow_spy')) { + $allow_spy = GETPOST('allow_spy') ? 'checked' : ''; +} print '<input type="checkbox" name="allow_spy" '.$allow_spy.'> '.$langs->trans('CanSeeOthersVote').'<br>'."\n"; -if (GETPOST('choix_sondage')) -{ - if (GETPOST('choix_sondage') == 'date') print '<input type="hidden" name="creation_sondage_date" value="date">'; - else print '<input type="hidden" name="creation_sondage_autre" value="autre">'; +if (GETPOST('choix_sondage')) { + if (GETPOST('choix_sondage') == 'date') { + print '<input type="hidden" name="creation_sondage_date" value="date">'; + } else { + print '<input type="hidden" name="creation_sondage_autre" value="autre">'; + } print '<input type="hidden" name="choix_sondage" value="'.GETPOST('choix_sondage').'">'; print '<br><input type="submit" class="button" name="submit" value="'.$langs->trans("CreatePoll").' ('.(GETPOST('choix_sondage') == 'date' ? $langs->trans("TypeDate") : $langs->trans("TypeClassic")).')">'; } else { diff --git a/htdocs/opensurvey/wizard/index.php b/htdocs/opensurvey/wizard/index.php index 68d660dff3d..fa3d734a488 100644 --- a/htdocs/opensurvey/wizard/index.php +++ b/htdocs/opensurvey/wizard/index.php @@ -19,7 +19,9 @@ */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -27,7 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/opensurvey/fonctions.php'; // Security check -if (!$user->rights->opensurvey->write) accessforbidden(); +if (!$user->rights->opensurvey->write) { + accessforbidden(); +} $langs->load("opensurvey"); diff --git a/htdocs/partnership/COPYING b/htdocs/partnership/COPYING new file mode 100644 index 00000000000..94a04532226 --- /dev/null +++ b/htdocs/partnership/COPYING @@ -0,0 +1,621 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS diff --git a/htdocs/partnership/ChangeLog.md b/htdocs/partnership/ChangeLog.md new file mode 100644 index 00000000000..4adee6d504c --- /dev/null +++ b/htdocs/partnership/ChangeLog.md @@ -0,0 +1,5 @@ +# CHANGELOG PARTNERSHIP FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) + +## 1.0 + +Initial version diff --git a/htdocs/partnership/README.md b/htdocs/partnership/README.md new file mode 100644 index 00000000000..ca8d9f7b551 --- /dev/null +++ b/htdocs/partnership/README.md @@ -0,0 +1,86 @@ +# PARTNERSHIP FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) + +## Features + +Description of the module... + +<!-- +![Screenshot partnership](img/screenshot_partnership.png?raw=true "Partnership"){imgmd} +--> + +Other external modules are available on [Dolistore.com](https://www.dolistore.com). + +## Translations + +Translations can be completed manually by editing files into directories *langs*. + +<!-- +This module contains also a sample configuration for Transifex, under the hidden directory [.tx](.tx), so it is possible to manage translation using this service. + +For more informations, see the [translator's documentation](https://wiki.dolibarr.org/index.php/Translator_documentation). + +There is a [Transifex project](https://transifex.com/projects/p/dolibarr-module-template) for this module. +--> + +<!-- + +## Installation + +### From the ZIP file and GUI interface + +- If you get the module in a zip file (like when downloading it from the market place [Dolistore](https://www.dolistore.com)), go into +menu ```Home - Setup - Modules - Deploy external module``` and upload the zip file. + +Note: If this screen tell you there is no custom directory, check your setup is correct: + +- In your Dolibarr installation directory, edit the ```htdocs/conf/conf.php``` file and check that following lines are not commented: + + ```php + //$dolibarr_main_url_root_alt ... + //$dolibarr_main_document_root_alt ... + ``` + +- Uncomment them if necessary (delete the leading ```//```) and assign a sensible value according to your Dolibarr installation + + For example : + + - UNIX: + ```php + $dolibarr_main_url_root_alt = '/custom'; + $dolibarr_main_document_root_alt = '/var/www/Dolibarr/htdocs/custom'; + ``` + + - Windows: + ```php + $dolibarr_main_url_root_alt = '/custom'; + $dolibarr_main_document_root_alt = 'C:/My Web Sites/Dolibarr/htdocs/custom'; + ``` + +### From a GIT repository + +- Clone the repository in ```$dolibarr_main_document_root_alt/partnership``` + +```sh +cd ....../custom +git clone git@github.com:gitlogin/partnership.git partnership +``` + +### <a name="final_steps"></a>Final steps + +From your browser: + + - Log into Dolibarr as a super-administrator + - Go to "Setup" -> "Modules" + - You should now be able to find and enable the module + +--> + +## Licenses + +### Main code + +GPLv3 or (at your option) any later version. See file COPYING for more information. + +### Documentation + +All texts and readmes are licensed under GFDL. diff --git a/htdocs/partnership/admin/about.php b/htdocs/partnership/admin/about.php new file mode 100644 index 00000000000..2d5f17b1877 --- /dev/null +++ b/htdocs/partnership/admin/about.php @@ -0,0 +1,103 @@ +<?php +/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 Dorian Laurent <i.merraha@sofimedmaroc.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership/admin/about.php + * \ingroup partnership + * \brief About page of module Partnership. + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +// Libraries +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once '../lib/partnership.lib.php'; + +// Translations +$langs->loadLangs(array("errors", "admin", "partnership@partnership")); + +// Access control +if (!$user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$form = new Form($db); + +$page_name = "PartnershipAbout"; +llxHeader('', $langs->trans($page_name)); + +// Subheader +$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>'; + +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_partnership@partnership'); + +// Configuration header +$head = partnershipAdminPrepareHead(); +print dol_get_fiche_head($head, 'about', '', 0, 'partnership@partnership'); + +dol_include_once('/partnership/core/modules/modPartnership.class.php'); +$tmpmodule = new modPartnership($db); +print $tmpmodule->getDescLong(); + +// Page end +print dol_get_fiche_end(); +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/admin/partnership_extrafields.php b/htdocs/partnership/admin/partnership_extrafields.php new file mode 100644 index 00000000000..a69ec9d1372 --- /dev/null +++ b/htdocs/partnership/admin/partnership_extrafields.php @@ -0,0 +1,141 @@ +<?php +/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> + * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file admin/partnership_extrafields.php + * \ingroup partnership + * \brief Page to setup extra fields of partnership + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once '../lib/partnership.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('partnership@partnership', 'admin')); + +$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 = 'partnership'; //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 + */ + + +llxHeader('', $langs->trans("PartnershipSetup"), $help_url); + + +$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; +print load_fiche_titre($langs->trans("PartnershipSetup"), $linkback, 'title_setup'); + + +$head = partnershipAdminPrepareHead(); + +print dol_get_fiche_head($head, 'partnership_extrafields', $langs->trans("PartnershipExtraFields"), -1, 'account'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '<div class="tabsAction">'; + print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; + print "</div>"; +} + + +/* + * Creation of an optional field + */ +if ($action == 'create') { + print '<br><div id="newattrib"></div>'; + 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 "<br>"; + 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/partnership/admin/setup.php b/htdocs/partnership/admin/setup.php new file mode 100644 index 00000000000..d55daab2347 --- /dev/null +++ b/htdocs/partnership/admin/setup.php @@ -0,0 +1,178 @@ +<?php +/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 Dorian Laurent <i.merraha@sofimedmaroc.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership/admin/setup.php + * \ingroup partnership + * \brief Partnership setup page. + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +global $langs, $user; + +// Libraries +require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; +require_once '../lib/partnership.lib.php'; +//require_once "../class/myclass.class.php"; + +// Translations +$langs->loadLangs(array("admin", "partnership@partnership")); + +// Security check +if (!$user->admin) { + accessforbidden(); +} + +$action = GETPOST('action', 'aZ09'); +$value = GETPOST('value', 'alpha'); + + +$error = 0; + +/* + * Actions + */ + +$nomessageinsetmoduleoptions = 1; +include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; + + +if ($action == 'setting') { + require_once DOL_DOCUMENT_ROOT."/core/modules/modPartnership.class.php"; + $partnership = new modPartnership($db); + + $value = GETPOST('managed_for', 'alpha'); + + + $modulemenu = ($value == 'member') ? 'member' : 'thirdparty'; + $res = dolibarr_set_const($db, "PARTNERSHIP_IS_MANAGED_FOR", $modulemenu, 'chaine', 0, '', $conf->entity); + + $partnership->tabs = array(); + if ($modulemenu == 'member') { + $partnership->tabs[] = array('data'=>'member:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/partnership/partnership.php?socid=__ID__'); + $fk_mainmenu = "members"; + } else { + $partnership->tabs[] = array('data'=>'thirdparty:+partnership:Partnership:partnership@partnership:$user->rights->partnership->read:/partnership/partnership.php?socid=__ID__'); + $fk_mainmenu = "companies"; + } + + foreach ($partnership->menu as $key => $menu) { + $partnership->menu[$key]['mainmenu'] = $fk_mainmenu; + + if ($menu['leftmenu'] == 'partnership') + $partnership->menu[$key]['fk_menu'] = 'fk_mainmenu='.$fk_mainmenu; + else $partnership->menu[$key]['fk_menu'] = 'fk_mainmenu='.$fk_mainmenu.',fk_leftmenu=partnership'; + } + + $error += $partnership->delete_tabs(); + $error += $partnership->insert_tabs(); + + $error += $partnership->delete_menus(); + $error += $partnership->insert_menus(); +} + +if ($action) { + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("SetupNotError"), null, 'errors'); + } +} + +/* + * View + */ + +$title = $langs->trans('PartnershipSetup'); +$tab = $langs->trans("PartnershipSetup"); + +llxHeader('', $title); + +$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; +print load_fiche_titre($title, $linkback, 'title_setup'); + +$head = partnershipAdminPrepareHead(); +print dol_get_fiche_head($head, 'settings', $tab, -1, 'partnership'); + +$form = new Form($db); + +// Module to manage partnership / services code +$dirpartnership = array('/core/modules/partnership/'); +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + + +/* + * Other conf + */ + +print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="action" value="setting">'; +print '<input type="hidden" name="page_y" value="">'; + +print '<table class="noborder centpercent">'; + +// Default partnership price base type +print '<tr class="oddeven">'; +print '<td>'.$langs->trans("PartnershipManagedFor").'</td>'; +print '<td class="right">'; + print '<select class="flat minwidth100" id="select_managed_for" name="managed_for">'; + print '<option value="thirdparty" '.(($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'thirdparty') ? 'selected' : '').'>'.$langs->trans("ThirdParty").'</option>'; + print '<option value="member" '.(($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') ? 'selected' : '').'>'.$langs->trans("Members").'</option>'; + print '</select>'; +print '</td>'; +print '</tr>'; + +print '</table>'; + +print '<div class="center">'; +print '<input type="submit" class="button reposition" value="'.$langs->trans("Modify").'">'; +print '</div>'; + +print '</form>'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php new file mode 100644 index 00000000000..019d72a6012 --- /dev/null +++ b/htdocs/partnership/class/partnership.class.php @@ -0,0 +1,1221 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file class/partnership.class.php + * \ingroup partnership + * \brief This file is a CRUD class file for Partnership (Create/Read/Update/Delete) + */ + +// Put here all includes required by your class file +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; + +/** + * Class for Partnership + */ +class Partnership extends CommonObject +{ + /** + * @var string ID of module. + */ + public $module = 'partnership'; + + /** + * @var string ID to identify managed object. + */ + public $element = 'partnership'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'partnership'; + + /** + * @var int Does this object support multicompany module ? + * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table + */ + public $ismultientitymanaged = 0; + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 1; + + /** + * @var string String with name of icon for partnership. Must be the part after the 'object_' into object_partnership.png + */ + public $picto = 'partnership@partnership'; + + + const STATUS_DRAFT = 0; + const STATUS_ACCEPTED = 1; + const STATUS_REFUSED = 2; + const STATUS_CANCELED = 9; + + + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[: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. + * 'picto' is code of a picto to show before value in forms + * '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' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * '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 + /** + * @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', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), + 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1,), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), + 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,), + 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,), + 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Accept&eacute;', '2'=>'Refus&eacute;', '9'=>'Annul&eacute;'),), + 'fk_member' => array('type'=>'integer:Adherent:adherents/class/adherent.class.php:1', 'label'=>'Member', 'enabled'=>'1', 'position'=>51, 'notnull'=>-1, 'visible'=>1, 'index'=>1,), + 'date_partnership_start' => array('type'=>'datetime', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,), + 'date_partnership_end' => array('type'=>'datetime', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>1, 'visible'=>1,), + 'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>63, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',), + 'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>64, 'notnull'=>0, 'visible'=>-2,), + ); + public $rowid; + public $ref; + public $fk_soc; + public $note_public; + public $note_private; + public $date_creation; + public $tms; + public $fk_user_creat; + public $fk_user_modif; + public $last_main_doc; + public $import_key; + public $model_pdf; + public $status; + public $fk_member; + public $date_partnership_start; + public $date_partnership_end; + public $count_last_url_check_error; + public $reason_decline_or_cancel; + // END MODULEBUILDER PROPERTIES + + + // If this object has a subtable with lines + + // /** + // * @var string Name of subtable line + // */ + // public $table_element_line = 'partnershipline'; + + // /** + // * @var string Field with ID of parent key if this object has a parent + // */ + // public $fk_element = 'fk_partnership'; + + // /** + // * @var string Name of subtable class that manage subtable lines + // */ + // public $class_element_line = 'Partnershipline'; + + // /** + // * @var array List of child tables. To test if we can delete object. + // */ + // protected $childtables = array(); + + // /** + // * @var array List of child tables. To know object to delete on cascade. + // * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + // * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + // */ + // protected $childtablesoncascade = array('partnershipdet'); + + // /** + // * @var PartnershipLine[] Array of subtable lines + // */ + // public $lines = array(); + + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + 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->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } + + // Example to show how to set values of fields definition dynamically + /*if ($user->rights->partnership->read) { + $this->fields['myfield']['visible'] = 1; + $this->fields['myfield']['noteditable'] = 0; + }*/ + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * Create object into database + * + * @param User $user User that creates + * @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) + { + return $this->createCommon($user, $notrigger); + } + + /** + * Clone an object into another one + * + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return mixed New object created, <0 if KO + */ + public function createFromClone(User $user, $fromid) + { + global $langs, $extrafields; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $result = $object->fetchCommon($fromid); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } + + // get lines so they will be clone + //foreach($this->lines as $line) + // $line->fetch_optionals(); + + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } + // ... + // Clear extrafields that are unique + if (is_array($object->array_options) && count($object->array_options) > 0) { + $extrafields->fetch_name_optionals_label($this->table_element); + foreach ($object->array_options as $key => $option) { + $shortkey = preg_replace('/options_/', '', $key); + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { + //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; + unset($object->array_options[$key]); + } + } + } + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + if (!$error) { + // copy internal contacts + if ($this->copy_linked_contact($object, 'internal') < 0) { + $error++; + } + } + + if (!$error) { + // copy external contacts if same company + if (property_exists($this, 'fk_soc') && $this->fk_soc == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { + $error++; + } + } + } + + unset($object->context['createfromclone']); + + // End + if (!$error) { + $this->db->commit(); + return $object; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Load object in memory from the database + * + * @param int $id Id object + * @param string $ref Ref + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetch($id, $ref = null) + { + $result = $this->fetchCommon($id, $ref); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } + return $result; + } + + /** + * Load object lines in memory from the database + * + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetchLines() + { + $this->lines = array(); + + $result = $this->fetchLinesCommon(); + return $result; + } + + + /** + * Load list of objects in memory from the database. + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit limit + * @param int $offset Offset + * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) + * @param string $filtermode Filter mode (AND or OR) + * @return array|int int <0 if KO, array of pages if OK + */ + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { + global $conf; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $records = array(); + + $sql = 'SELECT '; + $sql .= $this->getFieldList('t'); + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sqlwhere[] = $key.'='.$value; + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + } else { + $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= ' AND ('.implode(' '.$filtermode.' ', $sqlwhere).')'; + } + + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit, $offset); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < ($limit ? min($limit, $num) : $num)) { + $obj = $this->db->fetch_object($resql); + + $record = new self($this->db); + $record->setVarsFromFetchObj($obj); + + $records[$record->id] = $record; + + $i++; + } + $this->db->free($resql); + + return $records; + } else { + $this->errors[] = 'Error '.$this->db->lasterror(); + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + + /** + * Update object into database + * + * @param User $user User that modifies + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update(User $user, $notrigger = false) + { + return $this->updateCommon($user, $notrigger); + } + + /** + * Delete object in database + * + * @param User $user User that deletes + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = false) + { + return $this->deleteCommon($user, $notrigger); + //return $this->deleteCommon($user, $notrigger, 1); + } + + /** + * Delete a line of object in database + * + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int >0 if OK, <0 if KO + */ + public function deleteLine(User $user, $idline, $notrigger = false) + { + if ($this->status < 0) { + $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; + return -2; + } + + return $this->deleteLineCommon($user, $idline, $notrigger); + } + + + /** + * Validate object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function validate($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_ACCEPTED) { + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->partnership_advance->validate)))) + { + $this->error='NotEnoughPermissions'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); + return -1; + }*/ + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + 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 { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Validate + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_ACCEPTED; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."'"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".$user->id; + } + $sql .= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('PARTNERSHIP_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 = 'partnership/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'partnership/".$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->partnership->dir_output.'/partnership/'.$oldref; + $dirdest = $conf->partnership->dir_output.'/partnership/'.$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->partnership->dir_output.'/partnership/'.$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 current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_ACCEPTED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Accept object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function accept($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_ACCEPTED) { + dol_syslog(get_class($this)."::accept action abandonned: already acceptd", LOG_WARNING); + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->partnership_advance->accept)))) + { + $this->error='NotEnoughPermissions'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); + return -1; + }*/ + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + 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 { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Accept + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_ACCEPTED; + // if (!empty($this->fields['date_validation'])) { + // $sql .= ", date_validation = '".$this->db->idate($now)."'"; + // } + // if (!empty($this->fields['fk_user_valid'])) { + // $sql .= ", fk_user_valid = ".$user->id; + // } + $sql .= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::accept()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('PARTNERSHIP_ACCEPT', $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 = 'partnership/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'partnership/".$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->partnership->dir_output.'/partnership/'.$oldref; + $dirdest = $conf->partnership->dir_output.'/partnership/'.$newref; + if (!$error && file_exists($dirsource)) { + dol_syslog(get_class($this)."::accept() 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->partnership->dir_output.'/partnership/'.$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 current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_ACCEPTED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDraft($user, $notrigger = 0) + { + // Protection + if ($this->status <= self::STATUS_DRAFT) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'PARTNERSHIP_UNVALIDATE'); + } + + /** + * Set refused status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function refused($user, $notrigger = '') + { + // Protection + // if ($this->status != self::STATUS_DRAFT) { + // return 0; + // } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_REFUSED, $notrigger, 'PARTNERSHIP_REFUSE'); + } + + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function cancel($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_ACCEPTED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'PARTNERSHIP_CANCEL'); + } + + /** + * Set back to validated status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function reopen($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_CANCELED) { + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->partnership_advance->validate)))) + { + $this->error='Permission denied'; + return -1; + }*/ + + return $this->setStatusCommon($user, self::STATUS_ACCEPTED, $notrigger, 'PARTNERSHIP_REOPEN'); + } + + /** + * 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 string $option On what the link point to ('nolink', ...) + * @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, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } + + $result = ''; + + $label = img_picto('', $this->picto).' <u>'.$langs->trans("Partnership").'</u>'; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } + $label .= '<br>'; + $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; + + $url = dol_buildpath('/partnership/partnership_card.php', 1).'?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("ShowPartnership"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } + + if ($option == 'nolink') { + $linkstart = '<span'; + } else { + $linkstart = '<a href="'.$url.'"'; + } + $linkstart .= $linkclose.'>'; + if ($option == 'nolink') { + $linkend = '</span>'; + } else { + $linkend = '</a>'; + } + + $result .= $linkstart; + + if (empty($this->showphoto_on_popup)) { + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + } else { + if ($withpicto) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + list($class, $module) = explode('@', $this->picto); + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); + $filearray = dol_dir_list($upload_dir, "files"); + $filename = $filearray[0]['name']; + if (!empty($filename)) { + $pospoint = strpos($filearray[0]['name'], '.'); + + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); + if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>'; + } else { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>'; + } + + $result .= '</div>'; + } 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); + } + } + } + + if ($withpicto != 2) { + $result .= $this->ref; + } + + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('partnershipdao')); + $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 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 + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * 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, 6=Long label + Picto + * @return string Label of status + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("partnership@partnership"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatus[self::STATUS_ACCEPTED] = $langs->trans('Accepted'); + $this->labelStatus[self::STATUS_REFUSED] = $langs->trans('Refused'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatusShort[self::STATUS_ACCEPTED] = $langs->trans('Accepted'); + $this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('Refused'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + } + + $statusType = 'status'.$status; + //if ($status == self::STATUS_ACCEPTED) $statusType = 'status1'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status6'; + } + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } + + /** + * Load the info information in the object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; + $sql .= ' fk_user_creat, fk_user_modif'; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + $sql .= ' WHERE t.rowid = '.((int) $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_cloture) { + $cluser = new User($this->db); + $cluser->fetch($obj->fk_user_cloture); + $this->user_cloture = $cluser; + } + + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); + $this->date_validation = $this->db->jdate($obj->datev); + } + + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->initAsSpecimenCommon(); + } + + /** + * Create an array of lines + * + * @return array|int array of lines if OK, <0 if KO + */ + public function getLinesArray() + { + $this->lines = array(); + + $objectline = new PartnershipLine($this->db); + $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_partnership = '.$this->id)); + + if (is_numeric($result)) { + $this->error = $this->error; + $this->errors = $this->errors; + return $result; + } else { + $this->lines = $result; + return $this->lines; + } + } + + /** + * Returns the reference to the following non used object depending on the active numbering module. + * + * @return string Object free reference + */ + public function getNextNumRef() + { + global $langs, $conf; + $langs->load("partnership@partnership"); + + if (empty($conf->global->PARTNERSHIP_ADDON)) { + $conf->global->PARTNERSHIP_ADDON = 'mod_partnership_standard'; + } + + if (!empty($conf->global->PARTNERSHIP_ADDON)) { + $mybool = false; + + $file = $conf->global->PARTNERSHIP_ADDON.".php"; + $classname = $conf->global->PARTNERSHIP_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/partnership/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + if (class_exists($classname)) { + $obj = new $classname(); + $numref = $obj->getNextValue($this); + + if ($numref != '' && $numref != '-1') { + return $numref; + } else { + $this->error = $obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + return ""; + } + } else { + print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; + return ""; + } + } else { + print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); + return ""; + } + } + + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @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 + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) + { + global $conf, $langs; + + $result = 0; + $includedocgeneration = 0; + + $langs->load("partnership@partnership"); + + if (!dol_strlen($modele)) { + $modele = 'standard_partnership'; + + if (!empty($this->model_pdf)) { + $modele = $this->model_pdf; + } elseif (!empty($conf->global->PARTNERSHIP_ADDON_PDF)) { + $modele = $conf->global->PARTNERSHIP_ADDON_PDF; + } + } + + $modelpath = "core/modules/partnership/doc/"; + + if ($includedocgeneration && !empty($modele)) { + $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + } + + return $result; + } + + /** + * Action executed by scheduler + * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters + * + * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) + */ + public function doScheduledJob() + { + global $conf, $langs; + + //$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log'; + + $error = 0; + $this->output = ''; + $this->error = ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $now = dol_now(); + + $this->db->begin(); + + // ... + + $this->db->commit(); + + return $error; + } +} + + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; + +/** + * Class PartnershipLine. You can also remove this and generate a CRUD class for lines objects. + */ +class PartnershipLine extends CommonObjectLine +{ + // To complete with content of an object PartnershipLine + // We should have a field rowid, fk_partnership and position + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 0; + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + $this->db = $db; + } +} diff --git a/htdocs/partnership/class/partnershiputils.class.php b/htdocs/partnership/class/partnershiputils.class.php new file mode 100644 index 00000000000..61659e6075c --- /dev/null +++ b/htdocs/partnership/class/partnershiputils.class.php @@ -0,0 +1,82 @@ +<?php +/* Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/** + * \file partnership/class/partnershiputils.class.php + * \ingroup partnership + * \brief Class with utilities + */ + +//require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); +//require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +dol_include_once('partnership/lib/partnership.lib.php'); + + +/** + * Class with cron tasks of Partnership module + */ +class PartnershipUtils +{ + public $db; //!< To store db handler + public $error; //!< To return error code (or message) + public $errors=array(); //!< To return several error codes (or messages) + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + return 1; + } + + + /** + * Action executed by scheduler to cancel status of partnership when subscription is expired + x days. (Max number of cancel per call = $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL) + * + * 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 doCancelStatusOfPartnership() + { + global $conf, $langs, $user; + + $langs->load("agenda"); + + $MAXPERCALL = (empty($conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL) ? 100 : $conf->global->PARTNERSHIP_MAX_CANCEL_PER_CALL); // Limit to 100 per call + + $error = 0; + $this->output = ''; + $this->error=''; + + + dol_syslog(__METHOD__." we cancel status of partnership ", LOG_DEBUG); + + $now = dol_now(); + + // En cours de traitement ... + + return ($error ? 1: 0); + } +} diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php new file mode 100644 index 00000000000..0b293d19a35 --- /dev/null +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -0,0 +1,148 @@ +<?php +/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> + * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/partnership/mod_partnership_advanced.php + * \ingroup partnership + * \brief File containing class for advanced numbering model of Partnership + */ + +dol_include_once('/partnership/core/modules/partnership/modules_partnership.php'); + + +/** + * Class to manage customer Bom numbering rules advanced + */ +class mod_partnership_advanced extends ModeleNumRefPartnership +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var string Error message + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'advanced'; + + + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ + public function info() + { + global $conf, $langs, $db; + + $langs->load("bills"); + + $form = new Form($db); + + $texte = $langs->trans('GenericNumRefModelDesc')."<br>\n"; + $texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; + $texte .= '<input type="hidden" name="token" value="'.newToken().'">'; + $texte .= '<input type="hidden" name="action" value="updateMask">'; + $texte .= '<input type="hidden" name="maskconstBom" value="PARTNERSHIP_ADVANCED_MASK">'; + $texte .= '<table class="nobordernopadding" width="100%">'; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Partnership"), $langs->transnoentities("Partnership")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Partnership"), $langs->transnoentities("Partnership")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + + // Parametrage du prefix + $texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; + $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskPartnership" value="'.$conf->global->PARTNERSHIP_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>'; + + $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>'; + + $texte .= '</tr>'; + + $texte .= '</table>'; + $texte .= '</form>'; + + return $texte; + } + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $db, $langs, $mysoc; + + $object = new Partnership($db); + $object->initAsSpecimen(); + + /*$old_code_client = $mysoc->code_client; + $old_code_type = $mysoc->typent_code; + $mysoc->code_client = 'CCCCCCCCCC'; + $mysoc->typent_code = 'TTTTTTTTTT';*/ + + $numExample = $this->getNextValue($object); + + /*$mysoc->code_client = $old_code_client; + $mysoc->typent_code = $old_code_type;*/ + + if (!$numExample) { + $numExample = $langs->trans('NotConfigured'); + } + return $numExample; + } + + /** + * Return next free value + * + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($object) + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + // We get cursor rule + $mask = $conf->global->PARTNERSHIP_ADVANCED_MASK; + + if (!$mask) { + $this->error = 'NotConfigured'; + return 0; + } + + $date = $object->date; + + $numFinal = get_next_value($db, $mask, 'partnership', 'ref', '', null, $date); + + return $numFinal; + } +} diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php new file mode 100644 index 00000000000..fefcafa2350 --- /dev/null +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -0,0 +1,161 @@ +<?php +/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/partnership/mod_partnership_standard.php + * \ingroup partnership + * \brief File of class to manage Partnership numbering rules standard + */ +dol_include_once('/partnership/core/modules/partnership/modules_partnership.php'); + + +/** + * Class to manage customer order numbering rules standard + */ +class mod_partnership_standard extends ModeleNumRefPartnership +{ + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + public $prefix = 'PARTNERSHIP'; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * @var string name + */ + public $name = 'standard'; + + + /** + * Return description of numbering module + * + * @return string Text with description + */ + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } + + + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + return $this->prefix."0501-0001"; + } + + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @param Object $object Object we need next value for + * @return boolean false if conflict, true if ok + */ + public function canBeActivated($object) + { + global $conf, $langs, $db; + + $coyymm = ''; $max = ''; + + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."partnership"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + if ($object->ismultientitymanaged == 1) { + $sql .= " AND entity = ".$conf->entity; + } elseif ($object->ismultientitymanaged == 2) { + // TODO + } + + $resql = $db->query($sql); + if ($resql) { + $row = $db->fetch_row($resql); + if ($row) { + $coyymm = substr($row[0], 0, 6); $max = $row[0]; + } + } + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorNumRefModel', $max); + return false; + } + + return true; + } + + /** + * Return next free value + * + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO + */ + public function getNextValue($object) + { + global $db, $conf; + + // first we get the max value + $posindice = strlen($this->prefix) + 6; + $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; + $sql .= " FROM ".MAIN_DB_PREFIX."partnership"; + $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; + if ($object->ismultientitymanaged == 1) { + $sql .= " AND entity = ".$conf->entity; + } elseif ($object->ismultientitymanaged == 2) { + // TODO + } + + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } + } else { + dol_syslog("mod_partnership_standard::getNextValue", LOG_DEBUG); + return -1; + } + + //$date=time(); + $date = $object->date_creation; + $yymm = strftime("%y%m", $date); + + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } + + dol_syslog("mod_partnership_standard::getNextValue return ".$this->prefix.$yymm."-".$num); + return $this->prefix.$yymm."-".$num; + } +} diff --git a/htdocs/partnership/core/modules/partnership/modules_partnership.php b/htdocs/partnership/core/modules/partnership/modules_partnership.php new file mode 100644 index 00000000000..aea00b41415 --- /dev/null +++ b/htdocs/partnership/core/modules/partnership/modules_partnership.php @@ -0,0 +1,158 @@ +<?php +/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> + * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> + * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * 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/>. + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/partnership/modules_partnership.php + * \ingroup partnership + * \brief File that contains parent class for partnerships document models and parent class for partnerships numbering models + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit + + +/** + * Parent class for documents models + */ +abstract class ModelePDFPartnership extends CommonDocGenerator +{ + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of active generation modules + * + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates + */ + public static function liste_modeles($db, $maxfilenamelength = 0) + { + // phpcs:enable + global $conf; + + $type = 'partnership'; + $list = array(); + + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $list = getListOfModels($db, $type, $maxfilenamelength); + + return $list; + } +} + + + +/** + * Parent class to manage numbering of Partnership + */ +abstract class ModeleNumRefPartnership +{ + /** + * @var string Error code (or message) + */ + public $error = ''; + + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used + */ + public function isEnabled() + { + return true; + } + + /** + * Returns the default description of the numbering template + * + * @return string Texte descripif + */ + public function info() + { + global $langs; + $langs->load("partnership@partnership"); + return $langs->trans("NoDescription"); + } + + /** + * Returns an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $langs; + $langs->load("partnership@partnership"); + return $langs->trans("NoExample"); + } + + /** + * Checks if the numbers already in the database do not + * cause conflicts that would prevent this numbering working. + * + * @param Object $object Object we need next value for + * @return boolean false if conflict, true if ok + */ + public function canBeActivated($object) + { + return true; + } + + /** + * Returns next assigned value + * + * @param Object $object Object we need next value for + * @return string Valeur + */ + public function getNextValue($object) + { + global $langs; + return $langs->trans("NotAvailable"); + } + + /** + * Returns version of numbering module + * + * @return string Valeur + */ + public function getVersion() + { + global $langs; + $langs->load("admin"); + + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } + return $langs->trans("NotAvailable"); + } +} diff --git a/htdocs/partnership/lib/partnership.lib.php b/htdocs/partnership/lib/partnership.lib.php new file mode 100644 index 00000000000..0cb4f1d0ea1 --- /dev/null +++ b/htdocs/partnership/lib/partnership.lib.php @@ -0,0 +1,136 @@ +<?php +/* Copyright (C) 2021 Dorian Laurent <i.merraha@sofimedmaroc.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership/lib/partnership.lib.php + * \ingroup partnership + * \brief Library files with common functions for Partnership + */ + +/** + * Prepare admin pages header + * + * @return array + */ +function partnershipAdminPrepareHead() +{ + global $langs, $conf; + + $langs->load("partnership@partnership"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/partnership/admin/setup.php", 1); + $head[$h][1] = $langs->trans("Settings"); + $head[$h][2] = 'settings'; + $h++; + + + $head[$h][0] = dol_buildpath("/partnership/admin/partnership_extrafields.php", 1); + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'partnership_extrafields'; + $h++; + + + $head[$h][0] = dol_buildpath("/partnership/admin/about.php", 1); + $head[$h][1] = $langs->trans("About"); + $head[$h][2] = 'about'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@partnership:/partnership/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@partnership:/partnership/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'partnership'); + + return $head; +} + +/** + * Prepare array of tabs for Partnership + * + * @param Partnership $object Partnership + * @return array Array of tabs + */ +function partnershipPrepareHead($object) +{ + global $db, $langs, $conf; + + $langs->load("partnership@partnership"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/partnership/partnership_card.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { + $nbNote = 0; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } + $head[$h][0] = dol_buildpath('/partnership/partnership_note.php', 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + if ($nbNote > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : ''); + } + $head[$h][2] = 'note'; + $h++; + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->partnership->dir_output."/partnership/".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_buildpath("/partnership/partnership_document.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } + $head[$h][2] = 'document'; + $h++; + + // $head[$h][0] = dol_buildpath("/partnership/partnership_agenda.php", 1).'?id='.$object->id; + // $head[$h][1] = $langs->trans("Events"); + // $head[$h][2] = 'agenda'; + // $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@partnership:/partnership/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@partnership:/partnership/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'partnership@partnership'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'partnership@partnership', 'remove'); + + return $head; +} diff --git a/htdocs/partnership/modulebuilder.txt b/htdocs/partnership/modulebuilder.txt new file mode 100644 index 00000000000..670a1774929 --- /dev/null +++ b/htdocs/partnership/modulebuilder.txt @@ -0,0 +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. \ No newline at end of file diff --git a/htdocs/partnership/partnership_agenda.php b/htdocs/partnership/partnership_agenda.php new file mode 100644 index 00000000000..712455840b8 --- /dev/null +++ b/htdocs/partnership/partnership_agenda.php @@ -0,0 +1,303 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_agenda.php + * \ingroup partnership + * \brief Tab of events on Partnership + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +dol_include_once('/partnership/class/partnership.class.php'); +dol_include_once('/partnership/lib/partnership.lib.php'); + + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +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'); + +$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 Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershipagenda', '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->partnership->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, 'partnership', $object->id); + +$permissiontoadd = $user->rights->partnership->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)) { + // 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 = partnershipPrepareHead($object); + + + print dol_get_fiche_head($head, 'agenda', $langs->trans("Partnership"), -1, $object->picto); + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + if ($action != 'classify') { + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + } + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '<div class="fichecenter">'; + print '<div class="underbanner clearboth"></div>'; + + $object->info($object->id); + dol_print_object_info($object, 1); + + print '</div>'; + + print dol_get_fiche_end(); + + + + // Actions buttons + + $objthirdparty = $object; + $objcon = new stdClass(); + + $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.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; + if (get_class($objthirdparty) == 'Societe') { + $out .= '&socid='.urlencode($objthirdparty->id); + } + $out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : '').'&percentage=-1'; + //$out.=$langs->trans("AddAnAction").' '; + //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); + //$out.="</a>"; + } + + + print '<div class="tabsAction">'; + + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { + print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; + } else { + print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; + } + } + + print '</div>'; + + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { + $param = '&id='.$object->id.'&socid='.$socid; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + + + //print load_fiche_titre($langs->trans("ActionsOnPartnership"), '', ''); + + // List of all actions + $filters = array(); + $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, $object->module); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php new file mode 100644 index 00000000000..dbf889137d8 --- /dev/null +++ b/htdocs/partnership/partnership_card.php @@ -0,0 +1,696 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_card.php + * \ingroup partnership + * \brief Page to create/edit/view partnership + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +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'; +dol_include_once('/partnership/class/partnership.class.php'); +dol_include_once('/partnership/lib/partnership.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'partnershipcard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +//$lineid = GETPOST('lineid', 'int'); + +// Initialize technical objects +$object = new Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershipcard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$search_all = GETPOST("search_all", 'alpha'); +$search = array(); +if ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') + unset($object->fields['fk_soc']); +else unset($object->fields['fk_member']); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } +} + +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. + + +$permissiontoread = $user->rights->partnership->read; +$permissiontoadd = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->partnership->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissionnote = $user->rights->partnership->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->partnership->write; // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1]; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +//restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft); +//if (empty($conf->partnership->enabled)) accessforbidden(); +//if (empty($permissiontoread)) accessforbidden(); + + +/* + * 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)) { + $error = 0; + + $backurlforlist = dol_buildpath('/partnership/partnership_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_buildpath('/partnership/partnership_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } + } + } + + $triggermodname = 'PARTNERSHIP_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'; + + // Action accept object + if ($action == 'confirm_accept' && $confirm == 'yes' && $permissiontoadd) { + $result = $object->accept($user); + if ($result >= 0) { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (method_exists($object, 'generateDocument')) { + $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); + } + + $ret = $object->fetch($id); // Reload to get new records + + $model = $object->model_pdf; + + $retgen = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($retgen < 0) { + setEventMessages($object->error, $object->errors, 'warnings'); + } + } + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } elseif ($action == 'confirm_refuse' && $permissiontoadd && !GETPOST('cancel', 'alpha')) { + // Close proposal + if (!(GETPOST('reason_decline_or_cancel', 'alpha'))) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Refuse")), null, 'errors'); + $action = 'refuse'; + } else { + // prevent browser refresh from closing proposal several times + if ($object->statut != $object::STATUS_REFUSED) { + $db->begin(); + + $result = $object->refused($user, GETPOST('reason_decline_or_cancel', 'alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } + + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } + } + } + } + // 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'; + + // 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, $triggermodname); + } + if ($action == 'classin' && $permissiontoadd) { + $object->setProject(GETPOST('projectid', 'int')); + } + + // Actions to send emails + $triggersendname = 'PARTNERSHIP_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_PARTNERSHIP_TO'; + $trackid = 'partnership'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; +} + + + + +/* + * View + * + * Put here all code to build page + */ + +$form = new Form($db); +$formfile = new FormFile($db); +$formproject = new FormProjets($db); + +$title = $langs->trans("Partnership"); +$help_url = ''; +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +print '<script type="text/javascript" language="javascript"> +jQuery(document).ready(function() { + function init_myfunc() + { + jQuery("#myid").removeAttr(\'disabled\'); + jQuery("#myid").attr(\'disabled\',\'disabled\'); + } + init_myfunc(); + jQuery("#mybutton").click(function() { + init_myfunc(); + }); +}); +</script>'; + + +// Part to create +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Partnership")), '', 'object_'.$object->picto); + + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="add">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } + + print dol_get_fiche_head(array(), ''); + + // Set some default values + //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue'; + + print '<table class="border centpercent tableforfieldcreate">'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + print '</table>'."\n"; + + print dol_get_fiche_end(); + + print '<div class="center">'; + print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; + print '&nbsp; '; + print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage + print '</div>'; + + print '</form>'; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("Partnership"), '', 'object_'.$object->picto); + + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="update">'; + print '<input type="hidden" name="id" value="'.$object->id.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } + + print dol_get_fiche_head(); + + print '<table class="border centpercent tableforfieldedit">'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + + print '</table>'; + + print dol_get_fiche_end(); + + print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; + print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + + print '</form>'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = partnershipPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("Partnership"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeletePartnership'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + 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 + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + // Close confirmation + if ($action == 'close') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClose'), $langs->trans('ConfirmCloseAsk', $object->ref), 'confirm_close', $formquestion, 'yes', 1); + } + // Reopon confirmation + if ($action == 'reopen') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToReopon'), $langs->trans('ConfirmReoponAsk', $object->ref), 'confirm_reopen', $formquestion, 'yes', 1); + } + + // Refuse confirmatio + if ($action == 'refuse') { + //Form to close proposal (signed or not) + $formquestion = array( + array('type' => 'text', 'name' => 'reason_decline_or_cancel', 'label' => $langs->trans("Note"), 'morecss' => 'reason_decline_or_cancel', 'value' => '') // Field to complete private note (not replace) + ); + + // if (!empty($conf->notification->enabled)) { + // require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; + // $notify = new Notify($db); + // $formquestion = array_merge($formquestion, array( + // array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), + // )); + // } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReasonDecline'), $text, 'confirm_refuse', $formquestion, '', 1, 250); + } + + // Confirmation of action xxxx + if ($action == 'xxx') { + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $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; + + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) { + //if ($action != 'classify') $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; + $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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 .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '<div class="fichecenter">'; + print '<div class="fichehalfleft">'; + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent tableforfield">'."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '</table>'; + print '</div>'; + print '</div>'; + + print '<div class="clearboth"></div>'; + + print dol_get_fiche_end(); + + + /* + * Lines + */ + + if (!empty($object->table_element_line)) { + // Show object lines + $result = $object->getLinesArray(); + + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> + <input type="hidden" name="token" value="' . newToken().'"> + <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> + <input type="hidden" name="mode" value=""> + <input type="hidden" name="id" value="' . $object->id.'"> + '; + + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print '<div class="div-table-responsive-no-min">'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) { + print '<table id="tablelines" class="noborder noshadow" width="100%">'; + } + + if (!empty($object->lines)) { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); + } + + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { + if ($action != 'editline') { + // Add products/services form + $object->formAddObjectLine(1, $mysoc, $soc); + + $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 '</table>'; + } + print '</div>'; + + print "</form>\n"; + } + + + // Buttons for actions + + if ($action != 'presend' && $action != 'editline') { + print '<div class="tabsAction">'."\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 dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle'); + } + + // Back to draft + if ($object->status == $object::STATUS_ACCEPTED) { + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes', '', $permissiontoadd); + } + + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit', '', $permissiontoadd); + + // Accept + if ($object->status == $object::STATUS_DRAFT) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { + print dolGetButtonAction($langs->trans('Accept'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_accept&confirm=yes', '', $permissiontoadd); + } else { + $langs->load("errors"); + //print dolGetButtonAction($langs->trans('Accept'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_accept&confirm=yes', '', 0); + print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Accept").'</a>'; + } + } + + // Clone + // print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd); + + + // if ($permissiontoadd) { + // if ($object->status == $object::STATUS_ENABLED) { + // print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n"; + // } else { + // print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").'</a>'."\n"; + // } + // } + + // Cancel + if ($permissiontoadd) { + if ($object->status == $object::STATUS_ACCEPTED) { + print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes&token='.newToken(), '', $permissiontoadd); + } elseif ($object->status == $object::STATUS_CANCELED) { + // print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n"; + print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes&token='.newToken(), '', $permissiontoadd); + } + } + + // Refuse + if ($permissiontoadd) { + if ($object->status != $object::STATUS_CANCELED) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=refuse&token='.newToken().'">'.$langs->trans("Refuse").'</a>'."\n"; + } + } + + // Delete (need delete permission, or if draft, just need create/modify permission) + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); + } + print '</div>'."\n"; + } + + + // Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + if ($action != 'presend') { + print '<div class="fichecenter"><div class="fichehalfleft">'; + print '<a name="builddoc"></a>'; // ancre + + $includedocgeneration = 0; + + // Documents + if ($includedocgeneration) { + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->partnership->dir_output.'/'.$object->element.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $user->rights->partnership->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->partnership->write; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('partnership:Partnership', $object->element.'/'.$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('partnership')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; + + $MAXEVENT = 10; + + $morehtmlright = '<a href="'.dol_buildpath('/partnership/partnership_agenda.php', 1).'?id='.$object->id.'">'; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= '</a>'; + + // 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.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); + + print '</div></div></div>'; + } + + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } + + // Presend form + $modelmail = 'partnership'; + $defaulttopic = 'InformationMessage'; + $diroutput = $conf->partnership->dir_output; + $trackid = 'partnership'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnership_contact.php b/htdocs/partnership/partnership_contact.php new file mode 100644 index 00000000000..02aa67f7365 --- /dev/null +++ b/htdocs/partnership/partnership_contact.php @@ -0,0 +1,213 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_contact.php + * \ingroup partnership + * \brief Tab for contacts linked to Partnership + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +dol_include_once('/partnership/class/partnership.class.php'); +dol_include_once('/partnership/lib/partnership.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "companies", "other", "mails")); + +$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility +$ref = GETPOST('ref', 'alpha'); +$lineid = GETPOST('lineid', 'int'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); + +// Initialize technical objects +$object = new Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershipcontact', '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 + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'partnership', $object->id); + +$permission = $user->rights->partnership->write; + +/* + * Add a new contact + */ + +if ($action == 'addcontact' && $permission) { + $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} elseif ($action == 'swapstatut' && $permission) { + // Toggle the status of a contact + $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'deletecontact' && $permission) { + // Deletes a contact + $result = $object->delete_contact($lineid); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { + dol_print_error($db); + } +} + + +/* + * View + */ + +$title = $langs->trans('Partnership')." - ".$langs->trans('ContactsAddresses'); +$help_url = ''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +$form = new Form($db); +$formcompany = new FormCompany($db); +$contactstatic = new Contact($db); +$userstatic = new User($db); + + +/* *************************************************************************** */ +/* */ +/* View and edit mode */ +/* */ +/* *************************************************************************** */ + +if ($object->id) { + /* + * Show tabs + */ + $head = partnershipPrepareHead($object); + + print dol_get_fiche_head($head, 'contact', $langs->trans("Partnership"), -1, $object->picto); + + $linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); + + print dol_get_fiche_end(); + + print '<br>'; + + // Contacts lines (modules that overwrite templates must declare this into descriptor) + $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); + foreach ($dirtpls as $reldir) { + $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); + if ($res) { + break; + } + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnership_document.php b/htdocs/partnership/partnership_document.php new file mode 100644 index 00000000000..d455f342516 --- /dev/null +++ b/htdocs/partnership/partnership_document.php @@ -0,0 +1,250 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_document.php + * \ingroup partnership + * \brief Tab for documents linked to Partnership + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +dol_include_once('/partnership/class/partnership.class.php'); +dol_include_once('/partnership/lib/partnership.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "companies", "other", "mails")); + + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +// Get parameters +$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 = $liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} +//if (! $sortfield) $sortfield="position_name"; + +// Initialize technical objects +$object = new Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershipdocument', '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->partnership->multidir_output[$object->entity ? $object->entity : $conf->entity]."/partnership/".get_exdir(0, 0, 0, 1, $object); +} + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'partnership', $object->id); + +$permissiontoadd = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php + + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans("Partnership").' - '.$langs->trans("Files"); +$help_url = ''; +//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $help_url); + +if ($object->id) { + /* + * Show tabs + */ + $head = partnershipPrepareHead($object); + + print dol_get_fiche_head($head, 'document', $langs->trans("Partnership"), -1, $object->picto); + + + // Build file list + $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); + $totalsize = 0; + foreach ($filearray as $key => $file) { + $totalsize += $file['size']; + } + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '<div class="fichecenter">'; + + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent tableforfield">'; + + // Number of files + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; + + // Total size + print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; + + print '</table>'; + + print '</div>'; + + print dol_get_fiche_end(); + + $modulepart = 'partnership'; + //$permission = $user->rights->partnership->write; + $permission = 1; + //$permtoedit = $user->rights->partnership->write; + $permtoedit = 1; + $param = '&id='.$object->id; + + //$relativepathwithnofile='partnership/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile = 'partnership/'.dol_sanitizeFileName($object->ref).'/'; + + include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; +} else { + accessforbidden('', 0, 1); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php new file mode 100644 index 00000000000..0e0ee3da9c3 --- /dev/null +++ b/htdocs/partnership/partnership_list.php @@ -0,0 +1,717 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_list.php + * \ingroup partnership + * \brief List page for partnership + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + +// load partnership libraries +require_once __DIR__.'/class/partnership.class.php'; + +// for other modules +//dol_include_once('/othermodule/class/otherobject.class.php'); + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "other")); + +$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') : 'partnershiplist'; // 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') + +$id = GETPOST('id', 'int'); + +// 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 < 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; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object = new Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershiplist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +if ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') + unset($object->fields['fk_soc']); +else unset($object->fields['fk_member']); + +// Default sort order (if not yet defined by previous GETPOST) +if (!$sortfield) { + reset($object->fields); // Reset is required to avoid key() to return null. + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Initialize array of search criterias +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); +$search = array(); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +} + +// 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'])) { + $visible = (int) 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 +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +$permissiontoread = $user->rights->partnership->read; +$permissiontoadd = $user->rights->partnership->write; +$permissiontodelete = $user->rights->partnership->delete; + +// Security check +if (empty($conf->partnership->enabled)) { + accessforbidden('Module not enabled'); +} +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +//$result = restrictedArea($user, 'partnership'); +//if (!$permissiontoread) accessforbidden(); + + + +/* + * 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 + foreach ($object->fields as $key => $val) { + $search[$key] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } + } + $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 + } + + // Mass actions + $objectclass = 'Partnership'; + $objectlabel = 'Partnership'; + $uploaddir = $conf->partnership->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form = new Form($db); + +$now = dol_now(); + +//$help_url="EN:Module_Partnership|FR:Module_Partnership_FR|ES:Módulo_Partnership"; +$help_url = ''; +$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Partnerships")); +$morejs = array(); +$morecss = array(); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// 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.', ' : ''); + } +} +// Add fields from hooks +$parameters = array(); +$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)"; +} +// 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) { + if (array_key_exists($key, $object->fields)) { + 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) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) { + if ($search[$key] == '-1' || $search[$key] === '0') { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + } + } + } + } +} +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, $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, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql=preg_replace('/,\s*$/','', $sql); +*/ + +$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 of record found is smaller than page * limit, goto and load page 0 + $page = 0; + $offset = 0; + } +} +// 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); +} + +// 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('/partnership/partnership_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); + +// Example : Adding jquery code +print '<script type="text/javascript" language="javascript"> +jQuery(document).ready(function() { + function init_myfunc() + { + jQuery("#myid").removeAttr(\'disabled\'); + jQuery("#myid").attr(\'disabled\',\'disabled\'); + } + init_myfunc(); + jQuery("#mybutton").click(function() { + init_myfunc(); + }); +}); +</script>'; + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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'; +// 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( + 'cancel'=>img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; +print '<input type="hidden" name="action" value="list">'; +print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; +print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; +print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/partnership/partnership_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + +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 = "SendPartnershipRef"; +$modelmail = "partnership"; +$objecttmp = new Partnership($db); +$trackid = 'xxxx'.$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 '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; +} + +$moreforfilter = ''; +/*$moreforfilter.='<div class="divsearchfield">'; +$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">'; +$moreforfilter.= '</div>';*/ + +$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 '<div class="liste_titre liste_titre_bydiv centpercent">'; + print $moreforfilter; + print '</div>'; +} + +$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 '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; + + +// Fields title search +// -------------------------------------------------------------------- +print '<tr class="liste_titre">'; +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'])) { + print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); + } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '</div>'; + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '</div>'; + } + print '</td>'; + } +} +// 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 '<td class="liste_titre maxwidthsearch">'; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '</td>'; +print '</tr>'."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print '<tr class="liste_titre">'; +foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\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 '</tr>'."\n"; + + +// 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) { + 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 '<tr class="oddeven">'; + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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') { + $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'])) { + print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + // 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 '<td class="nowrap center">'; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } + print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + + print '</tr>'."\n"; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; +} + + +$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 '</table>'."\n"; +print '</div>'."\n"; + +print '</form>'."\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('&amp;', '&', $param); + + $filedir = $diroutputmassaction; + $genallowed = $permissiontoread; + $delallowed = $permissiontoadd; + + print $formfile->showdocuments('massfilesarea_partnership', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php new file mode 100644 index 00000000000..5e752666b39 --- /dev/null +++ b/htdocs/partnership/partnership_note.php @@ -0,0 +1,200 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 NextGestion <contact@nextgestion.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +/** + * \file partnership_note.php + * \ingroup partnership + * \brief Tab for notes on Partnership + */ + +//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 +//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +dol_include_once('/partnership/class/partnership.class.php'); +dol_include_once('/partnership/lib/partnership.lib.php'); + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership", "companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object = new Partnership($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('partnershipnote', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'partnership', $id); + +// 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->partnership->multidir_output[$object->entity]."/".$object->id; +} + +$permissionnote = $user->rights->partnership->write; // Used by the include of actions_setnotes.inc.php +$permissiontoadd = $user->rights->partnership->write; // Used by the include of actions_addupdatedelete.inc.php + + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + + +/* + * View + */ + +$form = new Form($db); + +//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; +$help_url = ''; +llxHeader('', $langs->trans('Partnership'), $help_url); + +if ($id > 0 || !empty($ref)) { + $object->fetch_thirdparty(); + + $head = partnershipPrepareHead($object); + + print dol_get_fiche_head($head, 'note', $langs->trans("Partnership"), -1, $object->picto); + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/partnership/partnership_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '<div class="fichecenter">'; + print '<div class="underbanner clearboth"></div>'; + + + $cssclass = "titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '</div>'; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/partnership/partnershipindex.php b/htdocs/partnership/partnershipindex.php new file mode 100644 index 00000000000..8db6be052bb --- /dev/null +++ b/htdocs/partnership/partnershipindex.php @@ -0,0 +1,241 @@ +<?php +/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file partnership/partnershipindex.php + * \ingroup partnership + * \brief Home page of partnership top menu + */ + +// Load Dolibarr environment +$res = 0; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} +// Try main.inc.php using relative path +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("partnership@partnership")); + +$action = GETPOST('action', 'aZ09'); + + +// Security check +// if (! $user->rights->partnership->myobject->read) { +// accessforbidden(); +// } +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) { + $action = ''; + $socid = $user->socid; +} + +$max = 5; +$now = dol_now(); + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$form = new Form($db); +$formfile = new FormFile($db); + +llxHeader("", $langs->trans("PartnershipArea")); + +print load_fiche_titre($langs->trans("PartnershipArea"), '', 'partnership.png@partnership'); + +print '<div class="fichecenter"><div class="fichethirdleft">'; + + +/* BEGIN MODULEBUILDER DRAFT MYOBJECT +// Draft MyObject +if (! empty($conf->partnership->enabled) && $user->rights->partnership->read) +{ + $langs->load("orders"); + + $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE c.fk_soc = s.rowid"; + $sql.= " AND c.fk_statut = 0"; + $sql.= " AND c.entity IN (".getEntity('commande').")"; + 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; + + $resql = $db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + print '<th colspan="3">'.$langs->trans("DraftMyObjects").($num?'<span class="badge marginleftonlyshort">'.$num.'</span>':'').'</th></tr>'; + + $var = true; + if ($num > 0) + { + $i = 0; + while ($i < $num) + { + + $obj = $db->fetch_object($resql); + print '<tr class="oddeven"><td class="nowrap">'; + + $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 '</td>'; + print '<td class="nowrap">'; + print '</td>'; + print '<td class="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>'; + $i++; + $total += $obj->total_ttc; + } + if ($total>0) + { + + print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>"; + } + } + else + { + + print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoOrder").'</td></tr>'; + } + print "</table><br>"; + + $db->free($resql); + } + else + { + dol_print_error($db); + } +} +END MODULEBUILDER DRAFT MYOBJECT */ + + +print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; + + +$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; + +/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT +// Last modified myobject +if (! empty($conf->partnership->enabled) && $user->rights->partnership->read) +{ + $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; + $sql.= " FROM ".MAIN_DB_PREFIX."partnership_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); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + print '<th colspan="2">'; + print $langs->trans("BoxTitleLatestModifiedMyObjects", $max); + print '</th>'; + print '<th class="right">'.$langs->trans("DateModificationShort").'</th>'; + print '</tr>'; + if ($num) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + + $myobjectstatic->id=$objp->rowid; + $myobjectstatic->ref=$objp->ref; + $myobjectstatic->label=$objp->label; + $myobjectstatic->status = $objp->status; + + print '<tr class="oddeven">'; + print '<td class="nowrap">'.$myobjectstatic->getNomUrl(1).'</td>'; + print '<td class="right nowrap">'; + print "</td>"; + print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms), 'day')."</td>"; + print '</tr>'; + $i++; + } + + $db->free($resql); + } else { + print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; + } + print "</table><br>"; + } +} +*/ + +print '</div></div></div>'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/paybox/admin/index.html b/htdocs/paybox/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index a342e58b971..41ad839cb94 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -32,55 +32,84 @@ $servicename = 'PayBox'; // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'paybox', 'paypal')); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $db->begin(); - //$result=dolibarr_set_const($db, "PAYBOX_IBS_DEVISE",$_POST["PAYBOX_IBS_DEVISE"],'chaine',0,'',$conf->entity); + //$result=dolibarr_set_const($db, "PAYBOX_IBS_DEVISE", GETPOST("PAYBOX_IBS_DEVISE"),'chaine',0,'',$conf->entity); $result = dolibarr_set_const($db, "PAYBOX_CGI_URL_V1", GETPOST('PAYBOX_CGI_URL_V1', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_CGI_URL_V2", GETPOST('PAYBOX_CGI_URL_V2', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_IBS_SITE", GETPOST('PAYBOX_IBS_SITE', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_IBS_RANG", GETPOST('PAYBOX_IBS_RANG', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_PBX_IDENTIFIANT", GETPOST('PAYBOX_PBX_IDENTIFIANT', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CREDITOR", GETPOST('ONLINE_PAYMENT_CREDITOR', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_FORM", GETPOST('ONLINE_PAYMENT_MESSAGE_FORM', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_OK", GETPOST('ONLINE_PAYMENT_MESSAGE_OK', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_KO", GETPOST('ONLINE_PAYMENT_MESSAGE_KO', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_SENDEMAIL", GETPOST('ONLINE_PAYMENT_SENDEMAIL'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } // 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++; + 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 (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYBOX_HMAC_KEY", dol_encode(GETPOST('PAYBOX_HMAC_KEY', 'alpha')), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } - if (!$error) - { - $db->commit(); + if (!$error) { + $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - $db->rollback(); + } else { + $db->rollback(); dol_print_error($db); } } @@ -91,11 +120,17 @@ if ($action == 'setvalue' && $user->admin) */ $IBS_SITE = "1999888"; // Site test -if (empty($conf->global->PAYBOX_IBS_SITE)) $conf->global->PAYBOX_IBS_SITE = $IBS_SITE; +if (empty($conf->global->PAYBOX_IBS_SITE)) { + $conf->global->PAYBOX_IBS_SITE = $IBS_SITE; +} $IBS_RANG = "99"; // Rang test -if (empty($conf->global->PAYBOX_IBS_RANG)) $conf->global->PAYBOX_IBS_RANG = $IBS_RANG; +if (empty($conf->global->PAYBOX_IBS_RANG)) { + $conf->global->PAYBOX_IBS_RANG = $IBS_RANG; +} $IBS_DEVISE = "978"; // Euro -if (empty($conf->global->PAYBOX_IBS_DEVISE)) $conf->global->PAYBOX_IBS_DEVISE = $IBS_DEVISE; +if (empty($conf->global->PAYBOX_IBS_DEVISE)) { + $conf->global->PAYBOX_IBS_DEVISE = $IBS_DEVISE; +} llxHeader(); @@ -191,8 +226,7 @@ print '<br><span class="opacitymedium">'.$langs->trans("Example").': '.$mysoc->n print '</td></tr>'; -if (!empty($conf->banque->enabled)) -{ +if (!empty($conf->banque->enabled)) { print '<tr class="oddeven"><td>'; print $langs->trans("BankAccount").'</td><td>'; $form->select_comptes($conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); @@ -237,8 +271,9 @@ print '</td></tr>'; print '<tr class="oddeven"><td>'; print $langs->trans("SecurityToken").'</td><td>'; print '<input size="48" type="text" id="PAYMENT_SECURITY_TOKEN" name="PAYMENT_SECURITY_TOKEN" value="'.$conf->global->PAYMENT_SECURITY_TOKEN.'">'; -if (!empty($conf->use_javascript_ajax)) +if (!empty($conf->use_javascript_ajax)) { print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); +} print '</td></tr>'; print '<tr class="oddeven"><td>'; diff --git a/htdocs/paybox/img/index.html b/htdocs/paybox/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paybox/index.html b/htdocs/paybox/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paybox/lib/index.html b/htdocs/paybox/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index d1f27bc0b0f..e5f53b34978 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -44,36 +44,46 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) // Clean parameters $PBX_IDENTIFIANT = "2"; // Identifiant pour v2 test - if (!empty($conf->global->PAYBOX_PBX_IDENTIFIANT)) $PBX_IDENTIFIANT = $conf->global->PAYBOX_PBX_IDENTIFIANT; + if (!empty($conf->global->PAYBOX_PBX_IDENTIFIANT)) { + $PBX_IDENTIFIANT = $conf->global->PAYBOX_PBX_IDENTIFIANT; + } $IBS_SITE = "1999888"; // Site test - if (!empty($conf->global->PAYBOX_IBS_SITE)) $IBS_SITE = $conf->global->PAYBOX_IBS_SITE; + if (!empty($conf->global->PAYBOX_IBS_SITE)) { + $IBS_SITE = $conf->global->PAYBOX_IBS_SITE; + } $IBS_RANG = "99"; // Rang test - if (!empty($conf->global->PAYBOX_IBS_RANG)) $IBS_RANG = $conf->global->PAYBOX_IBS_RANG; + if (!empty($conf->global->PAYBOX_IBS_RANG)) { + $IBS_RANG = $conf->global->PAYBOX_IBS_RANG; + } $IBS_DEVISE = "840"; // Currency (Dollar US by default) - if ($CURRENCY == 'EUR') $IBS_DEVISE = "978"; - if ($CURRENCY == 'USD') $IBS_DEVISE = "840"; + if ($CURRENCY == 'EUR') { + $IBS_DEVISE = "978"; + } + if ($CURRENCY == 'USD') { + $IBS_DEVISE = "840"; + } $URLPAYBOX = ""; - if ($conf->global->PAYBOX_CGI_URL_V1) $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V1; - if ($conf->global->PAYBOX_CGI_URL_V2) $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V2; + if ($conf->global->PAYBOX_CGI_URL_V1) { + $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V1; + } + if ($conf->global->PAYBOX_CGI_URL_V2) { + $URLPAYBOX = $conf->global->PAYBOX_CGI_URL_V2; + } - if (empty($IBS_DEVISE)) - { + if (empty($IBS_DEVISE)) { dol_print_error('', "Paybox setup param PAYBOX_IBS_DEVISE not defined"); return -1; } - if (empty($URLPAYBOX)) - { + if (empty($URLPAYBOX)) { dol_print_error('', "Paybox setup param PAYBOX_CGI_URL_V1 and PAYBOX_CGI_URL_V2 undefined"); return -1; } - if (empty($IBS_SITE)) - { + if (empty($IBS_SITE)) { dol_print_error('', "Paybox setup param PAYBOX_IBS_SITE not defined"); return -1; } - if (empty($IBS_RANG)) - { + if (empty($IBS_RANG)) { dol_print_error('', "Paybox setup param PAYBOX_IBS_RANG not defined"); return -1; } @@ -93,12 +103,24 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) $IBS_BKGD = "#FFFFFF"; $IBS_WAIT = "2000"; $IBS_LANG = "GBR"; // By default GBR=english (FRA, GBR, ESP, ITA et DEU...) - if (preg_match('/^FR/i', $langs->defaultlang)) $IBS_LANG = "FRA"; - if (preg_match('/^ES/i', $langs->defaultlang)) $IBS_LANG = "ESP"; - if (preg_match('/^IT/i', $langs->defaultlang)) $IBS_LANG = "ITA"; - if (preg_match('/^DE/i', $langs->defaultlang)) $IBS_LANG = "DEU"; - if (preg_match('/^NL/i', $langs->defaultlang)) $IBS_LANG = "NLD"; - if (preg_match('/^SE/i', $langs->defaultlang)) $IBS_LANG = "SWE"; + if (preg_match('/^FR/i', $langs->defaultlang)) { + $IBS_LANG = "FRA"; + } + if (preg_match('/^ES/i', $langs->defaultlang)) { + $IBS_LANG = "ESP"; + } + if (preg_match('/^IT/i', $langs->defaultlang)) { + $IBS_LANG = "ITA"; + } + if (preg_match('/^DE/i', $langs->defaultlang)) { + $IBS_LANG = "DEU"; + } + if (preg_match('/^NL/i', $langs->defaultlang)) { + $IBS_LANG = "NLD"; + } + if (preg_match('/^SE/i', $langs->defaultlang)) { + $IBS_LANG = "SWE"; + } $IBS_OUTPUT = 'E'; $PBX_SOURCE = 'HTML'; $PBX_TYPEPAIEMENT = 'CARTE'; diff --git a/htdocs/paypal/admin/index.html b/htdocs/paypal/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index b16748f66b4..cfa7628297d 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -35,43 +35,72 @@ $servicename = 'PayPal'; // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'paypal', 'paybox')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $db->begin(); $result = dolibarr_set_const($db, "PAYPAL_API_USER", GETPOST('PAYPAL_API_USER', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_API_PASSWORD", GETPOST('PAYPAL_API_PASSWORD', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_API_SIGNATURE", GETPOST('PAYPAL_API_SIGNATURE', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_SSLVERSION", GETPOST('PAYPAL_SSLVERSION', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CREDITOR", GETPOST('ONLINE_PAYMENT_CREDITOR', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_API_INTEGRAL_OR_PAYPALONLY", GETPOST('PAYPAL_API_INTEGRAL_OR_PAYPALONLY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "PAYPAL_ADD_PAYMENT_URL", GETPOST('PAYPAL_ADD_PAYMENT_URL', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_FORM", GETPOST('ONLINE_PAYMENT_MESSAGE_FORM'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_OK", GETPOST('ONLINE_PAYMENT_MESSAGE_OK'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_KO", GETPOST('ONLINE_PAYMENT_MESSAGE_KO'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_SENDEMAIL", GETPOST('ONLINE_PAYMENT_SENDEMAIL'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } // 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++; + 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) { @@ -80,21 +109,21 @@ if ($action == 'setvalue' && $user->admin) } if (!$error) { - $db->commit(); - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - $db->rollback(); + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + $db->rollback(); dol_print_error($db); } } -if ($action == "setlive") -{ +if ($action == "setlive") { $liveenable = GETPOST('value', 'int') ? 0 : 1; $res = dolibarr_set_const($db, "PAYPAL_API_SANDBOX", $liveenable, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -126,8 +155,7 @@ print dol_get_fiche_head($head, 'paypalaccount', '', -1); print '<span class="opacitymedium">'.$langs->trans("PaypalDesc")."</span><br>\n"; // Test if php curl exist -if (!function_exists('curl_version')) -{ +if (!function_exists('curl_version')) { $langs->load("errors"); setEventMessages($langs->trans("ErrorPhpCurlNotInstalled"), null, 'errors'); } @@ -147,8 +175,7 @@ print "</tr>\n"; print '<tr class="oddeven">'; print '<td>'; print $langs->trans("PaypalLiveEnabled").'</td><td>'; -if (empty($conf->global->PAYPAL_API_SANDBOX)) -{ +if (empty($conf->global->PAYPAL_API_SANDBOX)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlive&token='.newToken().'&value=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -217,8 +244,7 @@ print '<input size="64" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.$con print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': '.$mysoc->name.'</span>'; print '</td></tr>'; -if (!empty($conf->banque->enabled)) -{ +if (!empty($conf->banque->enabled)) { print '<tr class="oddeven"><td>'; print $langs->trans("BankAccount").'</td><td>'; print img_picto('', 'bank_account').' '; @@ -315,8 +341,9 @@ print '<br><br>'; // Help doc print '<u>'.$langs->trans("InformationToFindParameters", "Paypal").'</u>:<br>'; -if (!empty($conf->use_javascript_ajax)) +if (!empty($conf->use_javascript_ajax)) { print '<a class="reposition" id="apidoca">'.$langs->trans("ClickHere").'...</a>'; +} $realpaypalurl = 'www.paypal.com'; $sandboxpaypalurl = 'developer.paypal.com'; @@ -334,8 +361,7 @@ print 'Your API authentication information can be found with following steps. We '; print '</div>'; -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".'<script type="text/javascript">'; print '$(document).ready(function () { $("#apidoc").hide(); diff --git a/htdocs/paypal/img/index.html b/htdocs/paypal/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paypal/index.html b/htdocs/paypal/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paypal/lib/index.html b/htdocs/paypal/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 873678adcae..dee6476f773 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -82,25 +82,24 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, //' //'------------------------------------------------- - if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; + if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) { + $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; + } $solutionType = 'Sole'; $landingPage = 'Billing'; // For payment with Paypal only - if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') - { + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') { $solutionType = 'Mark'; $landingPage = 'Login'; } // For payment with Credit card or Paypal - if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') - { + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') { $solutionType = 'Sole'; $landingPage = 'Billing'; } // For payment with Credit card - if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'cconly') - { + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'cconly') { $solutionType = 'Sole'; $landingPage = 'Billing'; } @@ -130,8 +129,7 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, dol_syslog("print_paypal_redirect resArray=".var_export($resArray, true), LOG_DEBUG); $ack = strtoupper($resArray["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") - { + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { $token = $resArray["TOKEN"]; // Redirect to paypal.com here @@ -146,8 +144,7 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, $ErrorLongMsg = urldecode($resArray["L_LONGMESSAGE0"]); $ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]); - if ($ErrorCode == 10729) - { + if ($ErrorCode == 10729) { $mesg .= "PayPal can't accept payments for this thirdparty. An address is defined but is not complete (missing State).<br>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).<br>\n"; } else { $mesg = $langs->trans('SetExpressCheckoutAPICallFailed')."<br>\n"; @@ -216,26 +213,25 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, //$nvpstr = $nvpstr . "&VERSION=".$API_version; // Already added by hash_call $nvpstr = $nvpstr."&RETURNURL=".urlencode($returnURL); $nvpstr = $nvpstr."&CANCELURL=".urlencode($cancelURL); - if (!empty($conf->global->PAYPAL_ALLOW_NOTES)) - { + if (!empty($conf->global->PAYPAL_ALLOW_NOTES)) { $nvpstr = $nvpstr."&ALLOWNOTE=0"; } - if (empty($conf->global->PAYPAL_REQUIRE_VALID_SHIPPING_ADDRESS)) - { + if (empty($conf->global->PAYPAL_REQUIRE_VALID_SHIPPING_ADDRESS)) { $nvpstr = $nvpstr."&NOSHIPPING=1"; // An empty or not complete shipping address will be accepted } else { $nvpstr = $nvpstr."&NOSHIPPING=0"; // A valid shipping address is required (full required fields mandatory) } $nvpstr = $nvpstr."&SOLUTIONTYPE=".urlencode($solutionType); $nvpstr = $nvpstr."&LANDINGPAGE=".urlencode($landingPage); - if (!empty($conf->global->PAYPAL_CUSTOMER_SERVICE_NUMBER)) - { + if (!empty($conf->global->PAYPAL_CUSTOMER_SERVICE_NUMBER)) { $nvpstr = $nvpstr."&CUSTOMERSERVICENUMBER=".urlencode($conf->global->PAYPAL_CUSTOMER_SERVICE_NUMBER); // Hotline phone number } $paypalprefix = 'PAYMENTREQUEST_0_'; //$paypalprefix = ''; - if (!empty($paypalprefix) && $paymentType == 'Sole') $paymentType = 'Sale'; + if (!empty($paypalprefix) && $paymentType == 'Sole') { + $paymentType = 'Sale'; + } $nvpstr = $nvpstr."&AMT=".urlencode($paymentAmount); // Total for all elements @@ -258,11 +254,14 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $nvpstr = $nvpstr."&".$paypalprefix."SHIPTOCOUNTRYCODE=".urlencode($shipToCountryCode); $nvpstr = $nvpstr."&".$paypalprefix."SHIPTOZIP=".urlencode($shipToZip); $nvpstr = $nvpstr."&".$paypalprefix."PHONENUM=".urlencode($phoneNum); - if (!empty($email)) $nvpstr = $nvpstr."&".$paypalprefix."EMAIL=".urlencode($email); // EMAIL deprecated by paypal -> PAYMENTREQUEST_n_EMAIL - if (!empty($desc)) $nvpstr = $nvpstr."&".$paypalprefix."DESC=".urlencode($desc); // DESC deprecated by paypal -> PAYMENTREQUEST_n_DESC + if (!empty($email)) { + $nvpstr = $nvpstr."&".$paypalprefix."EMAIL=".urlencode($email); // EMAIL deprecated by paypal -> PAYMENTREQUEST_n_EMAIL + } + if (!empty($desc)) { + $nvpstr = $nvpstr."&".$paypalprefix."DESC=".urlencode($desc); // DESC deprecated by paypal -> PAYMENTREQUEST_n_DESC + } - if (!empty($conf->global->PAYPAL_LOGOIMG) && $mysoc->logo) - { + if (!empty($conf->global->PAYPAL_LOGOIMG) && $mysoc->logo) { global $dolibarr_main_url_root; // Define $urlwithroot @@ -273,12 +272,10 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $urllogo = $urlwithroot."/viewimage.php?modulepart=mycompany&file=".urlencode('logos/'.$mysoc->logo); $nvpstr = $nvpstr."&LOGOIMG=".urlencode($urllogo); } - if (!empty($conf->global->PAYPAL_BRANDNAME)) - { + if (!empty($conf->global->PAYPAL_BRANDNAME)) { $nvpstr = $nvpstr."&BRANDNAME=".urlencode($conf->global->PAYPAL_BRANDNAME); // BRANDNAME } - if (!empty($conf->global->PAYPAL_NOTETOBUYER)) - { + if (!empty($conf->global->PAYPAL_NOTETOBUYER)) { $nvpstr = $nvpstr."&NOTETOBUYER=".urlencode($conf->global->PAYPAL_NOTETOBUYER); // PAYPAL_NOTETOBUYER } @@ -294,8 +291,7 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, //'--------------------------------------------------------------------------------------------------------------- $resArray = hash_call("SetExpressCheckout", $nvpstr); $ack = strtoupper($resArray["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") - { + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { $token = urldecode($resArray["TOKEN"]); $_SESSION['TOKEN'] = $token; } @@ -339,8 +335,7 @@ function getDetails($token) //'--------------------------------------------------------------------------- $resArray = hash_call("GetExpressCheckoutDetails", $nvpstr); $ack = strtoupper($resArray["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") - { + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { $_SESSION['payer_id'] = $resArray['PAYERID']; } return $resArray; @@ -362,9 +357,9 @@ function getDetails($token) function confirmPayment($token, $paymentType, $currencyCodeType, $payerID, $ipaddress, $FinalPaymentAmt, $tag) { /* Gather the information to make the final call to - finalize the PayPal payment. The variable nvpstr - holds the name value pairs - */ + finalize the PayPal payment. The variable nvpstr + holds the name value pairs + */ //declaring of global variables global $conf, $langs; @@ -381,14 +376,14 @@ function confirmPayment($token, $paymentType, $currencyCodeType, $payerID, $ipad $nvpstr .= '&INVNUM='.urlencode($tag); /* Make the call to PayPal to finalize payment - If an error occured, show the resulting errors - */ + If an error occured, show the resulting errors + */ $resArray = hash_call("DoExpressCheckoutPayment", $nvpstr); /* Display the API response back to the browser. - If the response from PayPal was a success, display the response parameters' - If the response was an error, display the errors received using APIError.php. - */ + If the response from PayPal was a success, display the response parameters' + If the response was an error, display the errors received using APIError.php. + */ $ack = strtoupper($resArray["ACK"]); return $resArray; @@ -416,32 +411,32 @@ function confirmPayment($token, $paymentType, $currencyCodeType, $payerID, $ipad /* function DirectPayment($paymentType, $paymentAmount, $creditCardType, $creditCardNumber, $expDate, $cvv2, $firstName, $lastName, $street, $city, $state, $zip, $countryCode, $currencyCode, $tag) { - //declaring of global variables - global $conf, $langs; - global $API_Endpoint, $API_Url, $API_version, $USE_PROXY, $PROXY_HOST, $PROXY_PORT; - global $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE; + //declaring of global variables + global $conf, $langs; + global $API_Endpoint, $API_Url, $API_version, $USE_PROXY, $PROXY_HOST, $PROXY_PORT; + global $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE; - //Construct the parameter string that describes DoDirectPayment - $nvpstr = ''; - $nvpstr = $nvpstr . "&AMT=" . urlencode($paymentAmount); // deprecated by paypal - $nvpstr = $nvpstr . "&CURRENCYCODE=" . urlencode($currencyCode); - $nvpstr = $nvpstr . "&PAYMENTACTION=" . urlencode($paymentType); // deprecated by paypal - $nvpstr = $nvpstr . "&CREDITCARDTYPE=" . urlencode($creditCardType); - $nvpstr = $nvpstr . "&ACCT=" . urlencode($creditCardNumber); - $nvpstr = $nvpstr . "&EXPDATE=" . urlencode($expDate); - $nvpstr = $nvpstr . "&CVV2=" . urlencode($cvv2); - $nvpstr = $nvpstr . "&FIRSTNAME=" . urlencode($firstName); - $nvpstr = $nvpstr . "&LASTNAME=" . urlencode($lastName); - $nvpstr = $nvpstr . "&STREET=" . urlencode($street); - $nvpstr = $nvpstr . "&CITY=" . urlencode($city); - $nvpstr = $nvpstr . "&STATE=" . urlencode($state); - $nvpstr = $nvpstr . "&COUNTRYCODE=" . urlencode($countryCode); - $nvpstr = $nvpstr . "&IPADDRESS=" . getUserRemotIP(); - $nvpstr = $nvpstr . "&INVNUM=" . urlencode($tag); + //Construct the parameter string that describes DoDirectPayment + $nvpstr = ''; + $nvpstr = $nvpstr . "&AMT=" . urlencode($paymentAmount); // deprecated by paypal + $nvpstr = $nvpstr . "&CURRENCYCODE=" . urlencode($currencyCode); + $nvpstr = $nvpstr . "&PAYMENTACTION=" . urlencode($paymentType); // deprecated by paypal + $nvpstr = $nvpstr . "&CREDITCARDTYPE=" . urlencode($creditCardType); + $nvpstr = $nvpstr . "&ACCT=" . urlencode($creditCardNumber); + $nvpstr = $nvpstr . "&EXPDATE=" . urlencode($expDate); + $nvpstr = $nvpstr . "&CVV2=" . urlencode($cvv2); + $nvpstr = $nvpstr . "&FIRSTNAME=" . urlencode($firstName); + $nvpstr = $nvpstr . "&LASTNAME=" . urlencode($lastName); + $nvpstr = $nvpstr . "&STREET=" . urlencode($street); + $nvpstr = $nvpstr . "&CITY=" . urlencode($city); + $nvpstr = $nvpstr . "&STATE=" . urlencode($state); + $nvpstr = $nvpstr . "&COUNTRYCODE=" . urlencode($countryCode); + $nvpstr = $nvpstr . "&IPADDRESS=" . getUserRemotIP(); + $nvpstr = $nvpstr . "&INVNUM=" . urlencode($tag); - $resArray=hash_call("DoDirectPayment", $nvpstr); + $resArray=hash_call("DoDirectPayment", $nvpstr); - return $resArray; + return $resArray; } */ @@ -462,8 +457,7 @@ function hash_call($methodName, $nvpStr) // TODO problem with triggers $API_version = "98.0"; - if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha')) // We can force sand box with param 'forcesandbox' - { + if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha')) { // We can force sand box with param 'forcesandbox' $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; } else { @@ -473,13 +467,21 @@ function hash_call($methodName, $nvpStr) // Clean parameters $PAYPAL_API_USER = ""; - if (!empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + if (!empty($conf->global->PAYPAL_API_USER)) { + $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + } $PAYPAL_API_PASSWORD = ""; - if (!empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + if (!empty($conf->global->PAYPAL_API_PASSWORD)) { + $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + } $PAYPAL_API_SIGNATURE = ""; - if (!empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + if (!empty($conf->global->PAYPAL_API_SIGNATURE)) { + $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + } $PAYPAL_API_SANDBOX = ""; - if (!empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + if (!empty($conf->global->PAYPAL_API_SANDBOX)) { + $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + } // TODO END problem with triggers dol_syslog("Paypal API endpoint ".$API_Endpoint); @@ -488,9 +490,9 @@ function hash_call($methodName, $nvpStr) $ch = curl_init(); /*print $API_Endpoint."-".$API_version."-".$PAYPAL_API_USER."-".$PAYPAL_API_PASSWORD."-".$PAYPAL_API_SIGNATURE."<br>"; - print $USE_PROXY."-".$gv_ApiErrorURL."<br>"; - print $nvpStr; - exit;*/ + print $USE_PROXY."-".$gv_ApiErrorURL."<br>"; + print $nvpStr; + exit;*/ curl_setopt($ch, CURLOPT_URL, $API_Endpoint); curl_setopt($ch, CURLOPT_VERBOSE, 1); // TLSv1 by default or change to TLSv1.2 in module configuration @@ -507,12 +509,13 @@ function hash_call($methodName, $nvpStr) curl_setopt($ch, CURLOPT_POST, 1); //if USE_PROXY constant set to true in Constants.php, then only proxy will be enabled. - if ($USE_PROXY) - { + if ($USE_PROXY) { dol_syslog("Paypal API hash_call set proxy to ".$PROXY_HOST.":".$PROXY_PORT." - ".$PROXY_USER.":".$PROXY_PASS); //curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); // Curl 7.10 curl_setopt($ch, CURLOPT_PROXY, $PROXY_HOST.":".$PROXY_PORT); - if ($PROXY_USER) curl_setopt($ch, CURLOPT_PROXYUSERPWD, $PROXY_USER.":".$PROXY_PASS); + if ($PROXY_USER) { + curl_setopt($ch, CURLOPT_PROXYUSERPWD, $PROXY_USER.":".$PROXY_PASS); + } } //NVPRequest for submitting to server @@ -564,8 +567,7 @@ function deformatNVP($nvpstr) $intial = 0; $nvpArray = array(); - while (strlen($nvpstr)) - { + while (strlen($nvpstr)) { //postion of Key $keypos = strpos($nvpstr, '='); //position of value @@ -592,13 +594,11 @@ function getApiError() $resArray = $_SESSION['reshash']; - if (isset($_SESSION['curl_error_no'])) - { + if (isset($_SESSION['curl_error_no'])) { $errors[] = $_SESSION['curl_error_no'].'-'.$_SESSION['curl_error_msg']; } - foreach ($resArray as $key => $value) - { + foreach ($resArray as $key => $value) { $errors[] = $key.'-'.$value; } diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 5fbe0f6e9cd..713c304323b 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -22,14 +22,13 @@ * \brief Page with Paypal init var. */ -if (session_id() == "") -{ +if (session_id() == "") { session_start(); - if (ini_get('register_globals')) // To solve bug in using $_SESSION - { - foreach ($_SESSION as $key=>$value) - { - if (isset($GLOBALS[$key])) unset($GLOBALS[$key]); + if (ini_get('register_globals')) { // To solve bug in using $_SESSION + foreach ($_SESSION as $key => $value) { + if (isset($GLOBALS[$key])) { + unset($GLOBALS[$key]); + } } } } @@ -48,8 +47,7 @@ $API_version = "56"; ' For the sandbox, the URL is https://www.sandbox.paypal.com/webscr&cmd=_express-checkout&token= ' For the live site, the URL is https://www.paypal.com/webscr&cmd=_express-checkout&token= */ -if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha')) // We can force sand box with param 'forcesandbox' -{ +if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha')) { // We can force sand box with param 'forcesandbox' $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; } else { @@ -59,13 +57,21 @@ if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha' // Clean parameters $PAYPAL_API_USER = ""; -if (!empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; +if (!empty($conf->global->PAYPAL_API_USER)) { + $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; +} $PAYPAL_API_PASSWORD = ""; -if (!empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; +if (!empty($conf->global->PAYPAL_API_PASSWORD)) { + $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; +} $PAYPAL_API_SIGNATURE = ""; -if (!empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; +if (!empty($conf->global->PAYPAL_API_SIGNATURE)) { + $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; +} $PAYPAL_API_SANDBOX = ""; -if (!empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; +if (!empty($conf->global->PAYPAL_API_SANDBOX)) { + $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; +} // Proxy $PROXY_HOST = $conf->global->MAIN_PROXY_HOST; diff --git a/htdocs/printing/admin/index.html b/htdocs/printing/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index a67ad379ca9..2b86efa507c 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -33,40 +33,46 @@ use OAuth\Common\Storage\DoliStorage; // Load translation files required by the page $langs->loadLangs(array('admin', 'printing', 'oauth')); -if (!$user->admin) accessforbidden(); - $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'); $driver = GETPOST('driver', 'alpha'); -if (!empty($driver)) $langs->load($driver); +if (!empty($driver)) { + $langs->load($driver); +} -if (!$mode) $mode = 'config'; +if (!$mode) { + $mode = 'config'; +} $OAUTH_SERVICENAME_GOOGLE = 'Google'; +if (!$user->admin) { + accessforbidden(); +} + /* * Action */ -if (($mode == 'test' || $mode == 'setup') && empty($driver)) -{ +if (($mode == 'test' || $mode == 'setup') && empty($driver)) { setEventMessages($langs->trans('PleaseSelectaDriverfromList'), null); header("Location: ".$_SERVER['PHP_SELF'].'?mode=config'); exit; } -if ($action == 'setconst' && $user->admin) -{ +if ($action == 'setconst' && $user->admin) { $error = 0; $db->begin(); foreach ($_POST['setupdriver'] as $setupconst) { //print '<pre>'.print_r($setupconst, true).'</pre>'; $result = dolibarr_set_const($db, $setupconst['varname'], $setupconst['value'], 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } } if (!$error) { @@ -79,12 +85,13 @@ if ($action == 'setconst' && $user->admin) $action = ''; } -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $db->begin(); $result = dolibarr_set_const($db, $varname, $value, 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (!$result > 0) { + $error++; + } if (!$error) { $db->commit(); @@ -110,8 +117,7 @@ print load_fiche_titre($langs->trans("PrintingSetup"), $linkback, 'title_setup') $head = printingAdminPrepareHead($mode); -if ($mode == 'setup' && $user->admin) -{ +if ($mode == 'setup' && $user->admin) { print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=setup&amp;driver='.$driver.'" autocomplete="off">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="setconst">'; @@ -143,8 +149,7 @@ if ($mode == 'setup' && $user->admin) $i = 0; $submit_enabled = 0; - foreach ($printer->conf as $key) - { + foreach ($printer->conf as $key) { switch ($key['type']) { case "text": case "password": @@ -159,8 +164,7 @@ if ($mode == 'setup' && $user->admin) case "info": // Google Api setup or Google OAuth Token print '<tr class="oddeven">'; print '<td'.($key['required'] ? ' class=required' : '').'>'; - if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') - { + if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { print $langs->trans("IsTokenGenerated"); } else { print $langs->trans($key['varname']); @@ -169,10 +173,11 @@ if ($mode == 'setup' && $user->admin) print '<td>'.$langs->trans($key['info']).'</td>'; print '<td>'; //var_dump($key); - if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') - { + if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { // Delete remote tokens - if (!empty($key['delete'])) print '<a class="button" href="'.$key['delete'].'">'.$langs->trans('DeleteAccess').'</a><br><br>'; + if (!empty($key['delete'])) { + print '<a class="button" href="'.$key['delete'].'">'.$langs->trans('DeleteAccess').'</a><br><br>'; + } // Request remote token print '<a class="button" href="'.$key['renew'].'">'.$langs->trans('RequestAccess').'</a><br><br>'; // Check remote access @@ -182,13 +187,14 @@ if ($mode == 'setup' && $user->admin) print '</tr>'."\n"; break; case "submit": - if ($key['enabled']) $submit_enabled = 1; + if ($key['enabled']) { + $submit_enabled = 1; + } break; } $i++; - if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') - { + if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { // Token print '<tr class="oddeven">'; print '<td>'.$langs->trans("Token").'</td>'; @@ -198,20 +204,18 @@ if ($mode == 'setup' && $user->admin) $storage = new DoliStorage($db, $conf); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME_GOOGLE); - } catch (Exception $e) - { + } catch (Exception $e) { // Return an error if token not found } - if (is_object($tokenobj)) - { + if (is_object($tokenobj)) { //var_dump($tokenobj); print $tokenobj->getAccessToken().'<br>'; //print 'Refresh: '.$tokenobj->getRefreshToken().'<br>'; //print 'EndOfLife: '.$tokenobj->getEndOfLife().'<br>'; //var_dump($tokenobj->getExtraParams()); /*print '<br>Extra: <br><textarea class="quatrevingtpercent">'; - print ''.join(',',$tokenobj->getExtraParams()); - print '</textarea>';*/ + print ''.join(',',$tokenobj->getExtraParams()); + print '</textarea>';*/ } print '</td>'; print '</tr>'."\n"; @@ -225,8 +229,7 @@ if ($mode == 'setup' && $user->admin) print dol_get_fiche_end(); - if (!empty($driver)) - { + if (!empty($driver)) { if ($submit_enabled) { print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Modify")).'"></div>'; } @@ -234,8 +237,7 @@ if ($mode == 'setup' && $user->admin) print '</form>'; } -if ($mode == 'config' && $user->admin) -{ +if ($mode == 'config' && $user->admin) { print dol_get_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); print $langs->trans("PrintingDesc")."<br><br>\n"; @@ -287,8 +289,7 @@ if ($mode == 'config' && $user->admin) print dol_get_fiche_end(); } -if ($mode == 'test' && $user->admin) -{ +if ($mode == 'test' && $user->admin) { print dol_get_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); print $langs->trans('PrintTestDesc'.$driver)."<br><br>\n"; @@ -325,8 +326,7 @@ if ($mode == 'test' && $user->admin) print dol_get_fiche_end(); } -if ($mode == 'userconf' && $user->admin) -{ +if ($mode == 'userconf' && $user->admin) { print dol_get_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); print $langs->trans('PrintUserConfDesc'.$driver)."<br><br>\n"; diff --git a/htdocs/printing/index.php b/htdocs/printing/index.php index e0dcaf86e44..84132c784f4 100644 --- a/htdocs/printing/index.php +++ b/htdocs/printing/index.php @@ -28,6 +28,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php'; // Load translation files required by the page $langs->load("printing"); +if (!$user->admin) { + accessforbidden(); +} + /* * Actions diff --git a/htdocs/printing/lib/index.html b/htdocs/printing/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/printing/lib/printing.lib.php b/htdocs/printing/lib/printing.lib.php index c899eb105b1..291ebd46ca8 100644 --- a/htdocs/printing/lib/printing.lib.php +++ b/htdocs/printing/lib/printing.lib.php @@ -57,10 +57,10 @@ function printingAdminPrepareHead($mode) } /** TODO This feature seem to be not ready yet. - $head[$h][0] = DOL_URL_ROOT."/printing/admin/printing.php?mode=userconf"; - $head[$h][1] = $langs->trans("UserConf"); - $head[$h][2] = 'userconf'; - $h++; + $head[$h][0] = DOL_URL_ROOT."/printing/admin/printing.php?mode=userconf"; + $head[$h][1] = $langs->trans("UserConf"); + $head[$h][2] = 'userconf'; + $h++; */ //$object=new stdClass(); diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index bae21309022..fdd42bd34d7 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -37,7 +37,9 @@ $cancel = GETPOST('cancel', 'alpha'); $selection = GETPOST('selection', 'int'); // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} //Objects $price_globals = new PriceGlobalVariable($db); @@ -157,8 +159,7 @@ print '<span class="opacitymedium">'.$langs->trans("DynamicPriceDesc").'</span>< print '<br>'; //Global variables table -if ($action != 'create_updater' && $action != 'edit_updater') -{ +if ($action != 'create_updater' && $action != 'edit_updater') { print load_fiche_titre($langs->trans("GlobalVariables"), '', ''); print '<table summary="listofattributes" class="noborder centpercent">'; @@ -170,10 +171,8 @@ if ($action != 'create_updater' && $action != 'edit_updater') print '</tr>'; $arrayglobalvars = $price_globals->listGlobalVariables(); - if (!empty($arrayglobalvars)) - { - foreach ($arrayglobalvars as $i=>$entry) { - $var = !$var; + if (!empty($arrayglobalvars)) { + foreach ($arrayglobalvars as $i => $entry) { print '<tr class="oddeven">'; print '<td>'.$entry->code.'</td>'; print '<td>'.$entry->description.'</td>'; @@ -189,9 +188,10 @@ if ($action != 'create_updater' && $action != 'edit_updater') } print '</table>'; - if (empty($action)) - { - //Action Buttons + if (empty($action)) { + /* + * Action bar + */ print '<div class="tabsAction">'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create_variable">'.$langs->trans("AddVariable").'</a>'; print '</div>'; @@ -236,8 +236,7 @@ if ($action == 'create_variable' || $action == 'edit_variable') { } // Updaters table -if ($action != 'create_variable' && $action != 'edit_variable') -{ +if ($action != 'create_variable' && $action != 'edit_variable') { print load_fiche_titre($langs->trans("GlobalVariableUpdaters"), '', ''); print '<table summary="listofattributes" class="noborder centpercent">'; @@ -252,9 +251,8 @@ if ($action != 'create_variable' && $action != 'edit_variable') print '</tr>'; $arraypriceupdaters = $price_updaters->listUpdaters(); - if (!empty($arraypriceupdaters)) - { - foreach ($arraypriceupdaters as $i=>$entry) { + if (!empty($arraypriceupdaters)) { + foreach ($arraypriceupdaters as $i => $entry) { $code = ""; if ($entry->fk_variable > 0) { $res = $price_globals->fetch($entry->fk_variable); @@ -280,9 +278,10 @@ if ($action != 'create_variable' && $action != 'edit_variable') } print '</table>'; - if (empty($action)) - { - //Action Buttons + if (empty($action)) { + /* + * Action bar + */ print '<div class="tabsAction">'; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create_updater&token='.newToken().'">'.$langs->trans("AddUpdater").'</a>'; print '</div>'; diff --git a/htdocs/product/admin/index.html b/htdocs/product/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index a38245d32c7..2166ada6138 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -29,8 +29,9 @@ $langs->loadLangs(array('admin', 'products')); $action = GETPOST('action', 'aZ09'); // Security check -if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) +if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) { accessforbidden(); +} $error = 0; @@ -85,7 +86,7 @@ if ($action == 'update') { if (!$db->query($sql)) { //If we could not create, then we try updating $sql = "UPDATE ".MAIN_DB_PREFIX."product_pricerules"; - $sql .= " SET fk_level = ".$db->escape($i_fk_level).", var_percent = ".$i_var_percent.", var_min_percent = ".$i_var_min_percent." WHERE level = ".$i; + $sql .= " SET fk_level = ".$db->escape($i_fk_level).", var_percent = ".$i_var_percent.", var_min_percent = ".$i_var_min_percent." WHERE level = ".((int) $i); if (!$db->query($sql)) { setEventMessages($langs->trans('ErrorSavingChanges'), null, 'errors'); @@ -158,7 +159,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { <td></td> <td style="text-align: center"><input type="text" style="text-align: right" name="var_min_percent[1]" size="5" value="<?php echo price(isset($rules[1]) ? $rules[1]->var_min_percent : 0, 2) ?>"> <?php echo $langs->trans('PercentDiscountOver', $langs->trans('SellingPrice').' 1') ?></td> </tr> - <?php for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++): ?> + <?php for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) : ?> <tr> <td class="fieldrequired" style="text-align: center"><?php echo $langs->trans('SellingPrice').' '.$i; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 6057b6926b7..b23cfbc5c4c 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -40,8 +40,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; $langs->loadLangs(array("admin", "products")); // Security check -if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) +if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); @@ -56,9 +57,13 @@ $select_pricing_rules = array( 'PRODUIT_CUSTOMER_PRICES'=>$langs->trans('PriceByCustomer'), // Different price for each customer ); $keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY'; -if ($conf->global->MAIN_FEATURES_LEVEL >= 1 || !empty($conf->global->$keyforparam)) $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice +if ($conf->global->MAIN_FEATURES_LEVEL >= 1 || !empty($conf->global->$keyforparam)) { + $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice +} $keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2 || !empty($conf->global->$keyforparam)) $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans('MultiPricesAbility').'+'.$langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; +if ($conf->global->MAIN_FEATURES_LEVEL >= 2 || !empty($conf->global->$keyforparam)) { + $select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans('MultiPricesAbility').'+'.$langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; +} // Clean param if (!empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_MULTIPRICES_LIMIT)) { @@ -75,10 +80,8 @@ $error = 0; $nomessageinsetmoduleoptions = 1; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'setcodeproduct') -{ - if (dolibarr_set_const($db, "PRODUCT_CODEPRODUCT_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) - { +if ($action == 'setcodeproduct') { + if (dolibarr_set_const($db, "PRODUCT_CODEPRODUCT_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -86,33 +89,30 @@ if ($action == 'setcodeproduct') } } -if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0) -{ +if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0) { $res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } } -if ($action == 'other' && GETPOST('value_PRODUIT_MULTIPRICES_LIMIT') > 0) -{ +if ($action == 'other' && GETPOST('value_PRODUIT_MULTIPRICES_LIMIT') > 0) { $res = dolibarr_set_const($db, "PRODUIT_MULTIPRICES_LIMIT", GETPOST('value_PRODUIT_MULTIPRICES_LIMIT'), 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } } -if ($action == 'other') -{ +if ($action == 'other') { $princingrules = GETPOST('princingrule', 'alpha'); - foreach ($select_pricing_rules as $rule => $label) // Loop on each possible mode - { - if ($rule == $princingrules) // We are on selected rule, we enable it - { - if ($princingrules == 'PRODUCT_PRICE_UNIQ') // For this case, we disable entries manually - { + foreach ($select_pricing_rules as $rule => $label) { // Loop on each possible mode + if ($rule == $princingrules) { // We are on selected rule, we enable it + if ($princingrules == 'PRODUCT_PRICE_UNIQ') { // For this case, we disable entries manually $res = dolibarr_set_const($db, 'PRODUIT_MULTIPRICES', 0, 'chaine', 0, '', $conf->entity); $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 { $multirule = explode('&', $princingrules); - foreach ($multirule as $rulesselected) - { + foreach ($multirule as $rulesselected) { $res = dolibarr_set_const($db, $rulesselected, 1, 'chaine', 0, '', $conf->entity); } } @@ -145,11 +145,13 @@ if ($action == 'other') $value = GETPOST('activate_useProdFournDesc', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_FOURN_TEXTS", $value, 'chaine', 0, '', $conf->entity); + $value = GETPOST('activate_FillProductDescAuto', 'alpha'); + $res = dolibarr_set_const($db, "PRODUIT_AUTOFILL_DESC", $value, 'chaine', 0, '', $conf->entity); + if ($value) { $sql_test = "SELECT count(desc_fourn) as cpt FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE 1"; $resql = $db->query($sql_test); - if (!$resql && $db->lasterrno == 'DB_ERROR_NOSUCHFIELD') // if the field does not exist, we create it - { + if (!$resql && $db->lasterrno == 'DB_ERROR_NOSUCHFIELD') { // if the field does not exist, we create it $sql_new = "ALTER TABLE ".MAIN_DB_PREFIX."product_fournisseur_price ADD COLUMN desc_fourn text"; $resql_new = $db->query($sql_new); } @@ -160,16 +162,14 @@ if ($action == 'other') if ($value) { $sql_test = "SELECT count(packaging) as cpt FROM ".MAIN_DB_PREFIX."product_fournisseur_price WHERE 1"; $resql = $db->query($sql_test); - if (!$resql && $db->lasterrno == 'DB_ERROR_NOSUCHFIELD') // if the field does not exist, we create it - { + if (!$resql && $db->lasterrno == 'DB_ERROR_NOSUCHFIELD') { // if the field does not exist, we create it $sql_new = "ALTER TABLE ".MAIN_DB_PREFIX."product_fournisseur_price ADD COLUMN packaging double(24,8) DEFAULT 1"; $resql_new = $db->query($sql_new); } } } -if ($action == 'specimen') // For products -{ +if ($action == 'specimen') { // For products $modele = GETPOST('module', 'alpha'); $product = new Product($db); @@ -178,25 +178,21 @@ if ($action == 'specimen') // For products // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/product/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($product, $langs, '') > 0) - { + if ($module->write_file($product, $langs, '') > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=product&file=SPECIMEN.pdf"); return; } else { @@ -210,25 +206,22 @@ if ($action == 'specimen') // For products } // Activate a model -if ($action == 'set') -{ +if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); } -if ($action == 'del') -{ +if ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->PRODUCT_ADDON_PDF == "$value") dolibarr_del_const($db, 'PRODUCT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->PRODUCT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'PRODUCT_ADDON_PDF', $conf->entity); + } } } // Set default model -if ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "PRODUCT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +if ($action == 'setdoc') { + if (dolibarr_set_const($db, "PRODUCT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->PRODUCT_ADDON_PDF = $value; @@ -236,20 +229,23 @@ if ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } } -if ($action == 'set') -{ +if ($action == 'set') { $const = "PRODUCT_SPECIAL_".strtoupper(GETPOST('spe', 'alpha')); $value = GETPOST('value'); - if (GETPOST('value', 'alpha')) $res = dolibarr_set_const($db, $const, $value, 'chaine', 0, '', $conf->entity); - else $res = dolibarr_del_const($db, $const, $conf->entity); - if (!($res > 0)) $error++; + if (GETPOST('value', 'alpha')) { + $res = dolibarr_set_const($db, $const, $value, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_del_const($db, $const, $conf->entity); + } + if (!($res > 0)) { + $error++; + } } //if ($action == 'other') @@ -259,10 +255,8 @@ if ($action == 'set') // if (! $res > 0) $error++; //} -if ($action) -{ - if (!$error) - { +if ($action) { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("SetupNotError"), null, 'errors'); @@ -277,12 +271,10 @@ $formbarcode = new FormBarCode($db); $title = $langs->trans('ProductServiceSetup'); $tab = $langs->trans("ProductsAndServices"); -if (empty($conf->product->enabled)) -{ +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'); } @@ -312,50 +304,53 @@ print ' <td class="center" width="80">'.$langs->trans("Status").'</td>'; print ' <td class="center" width="60">'.$langs->trans("ShortInfo").'</td>'; print "</tr>\n"; -foreach ($dirproduct as $dirroot) -{ +foreach ($dirproduct as $dirroot) { $dir = dol_buildpath($dirroot, 0); $handle = @opendir($dir); - if (is_resource($handle)) - { + if (is_resource($handle)) { // Loop on each module find in opened directory - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 16) == 'mod_codeproduct_' && substr($file, -3) == 'php') - { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 16) == 'mod_codeproduct_' && substr($file, -3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); try { dol_include_once($dirroot.$file.'.php'); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } $modCodeProduct = new $file; // Show modules according to features level - if ($modCodeProduct->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($modCodeProduct->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($modCodeProduct->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($modCodeProduct->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } print '<tr class="oddeven">'."\n"; print '<td width="140">'.$modCodeProduct->name.'</td>'."\n"; print '<td>'.$modCodeProduct->info($langs).'</td>'."\n"; print '<td class="nowrap">'.$modCodeProduct->getExample($langs).'</td>'."\n"; - if (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) && $conf->global->PRODUCT_CODEPRODUCT_ADDON == $file) - { + if (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) && $conf->global->PRODUCT_CODEPRODUCT_ADDON == $file) { print '<td class="center">'."\n"; print img_picto($langs->trans("Activated"), 'switch_on'); print "</td>\n"; } else { $disabled = false; - if (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] == $conf->entity) ? false : true); + if (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] == $conf->entity) ? false : true) { + } print '<td class="center">'; - if (!$disabled) print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeproduct&token='.newToken().'&value='.$file.'">'; + if (!$disabled) { + print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeproduct&token='.newToken().'&value='.$file.'">'; + } print img_picto($langs->trans("Disabled"), 'switch_off'); - if (!$disabled) print '</a>'; + if (!$disabled) { + print '</a>'; + } print '</td>'; } @@ -379,12 +374,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -409,29 +402,21 @@ print "</tr>\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/product".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -439,21 +424,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '</td>'; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '<td class="center">'."\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -467,8 +457,7 @@ foreach ($dirmodels as $reldir) // Defaut print '<td class="center">'; - if ($conf->global->PRODUCT_ADDON_PDF == $name) - { + if ($conf->global->PRODUCT_ADDON_PDF == $name) { print img_picto($langs->trans("Default"), 'on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; @@ -478,8 +467,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; @@ -493,8 +481,7 @@ foreach ($dirmodels as $reldir) // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -565,26 +552,32 @@ print '</tr>'; // Rule for price print '<tr class="oddeven">'; -if (empty($conf->multicompany->enabled)) -{ +if (empty($conf->multicompany->enabled)) { print '<td>'.$langs->trans("PricingRule").'</td>'; } else { print '<td>'.$form->textwithpicto($langs->trans("PricingRule"), $langs->trans("SamePriceAlsoForSharedCompanies"), 1).'</td>'; } print '<td class="right">'; $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'; -if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $current_rule = 'PRODUIT_CUSTOMER_PRICES'; -if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) $current_rule = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'; -print $form->selectarray("princingrule", $select_pricing_rules, $current_rule); +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'; +} +if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $current_rule = 'PRODUIT_CUSTOMER_PRICES'; +} +if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + $current_rule = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'; +} +print $form->selectarray("princingrule", $select_pricing_rules, $current_rule, 0, 0, 0, '', 1, 0, 0, '', 'maxwidth400', 1); print '</td>'; print '</tr>'; // multiprix nombre de prix a proposer -if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) -{ +if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { print '<tr class="oddeven">'; print '<td>'.$langs->trans("MultiPricesNumPrices").'</td>'; print '<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_MULTIPRICES_LIMIT" value="'.$conf->global->PRODUIT_MULTIPRICES_LIMIT.'"></td>'; @@ -603,8 +596,7 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td>'.$form->textwithpicto($langs->trans("UseSearchToSelectProduct"), $langs->trans('UseSearchToSelectProductTooltip'), 1).'</td>'; -if (empty($conf->use_javascript_ajax)) -{ +if (empty($conf->use_javascript_ajax)) { print '<td class="nowrap right">'; print $langs->trans("NotAvailableWhenAjaxDisabled"); print '</td>'; @@ -621,14 +613,35 @@ if (empty($conf->use_javascript_ajax)) } print '</tr>'; -if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) -{ +if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { print '<tr class="oddeven">'; print '<td>'.$langs->trans("NumberOfProductShowInSelect").'</td>'; print '<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="'.$conf->global->PRODUIT_LIMIT_SIZE.'"></td>'; print '</tr>'; } +// Do Not Add Product description on add lines +print '<tr class="oddeven">'; +print '<td>'.$langs->trans("OnProductSelectAddProductDesc").'</td>'; +print '<td class="right">'; +print $form->selectarray( + "activate_FillProductDescAuto", + array(1=>'AutoFillFormFieldBeforeSubmit', 0=>'DoNotAutofillButAutoConcat', -1=>'DoNotUseDescriptionOfProdut'), + empty($conf->global->PRODUIT_AUTOFILL_DESC) ? 0 : $conf->global->PRODUIT_AUTOFILL_DESC, + 0, + 0, + 0, + '', + 1, + 0, + 0, + '', + 'maxwidth400', + 1 +); +print '</td>'; +print '</tr>'; + // Visualiser description produit dans les formulaires activation/desactivation print '<tr class="oddeven">'; print '<td>'.$langs->trans("ViewProductDescInFormAbility").'</td>'; @@ -660,8 +673,7 @@ print '</tr>'; */ // View product description in thirdparty language -if (!empty($conf->global->MAIN_MULTILANGS)) -{ +if (!empty($conf->global->MAIN_MULTILANGS)) { print '<tr class="oddeven">'; print '<td>'.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").'</td>'; print '<td class="right">'; @@ -670,8 +682,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) print '</tr>'; } -if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) -{ +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { print '<tr class="oddeven">'; print '<td>'.$langs->trans("UseProductFournDesc").'</td>'; print '<td class="right">'; @@ -688,8 +699,7 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP } -if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) -{ +if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) { // Add canvas feature $dir = DOL_DOCUMENT_ROOT."/product/canvas/"; @@ -698,17 +708,13 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) print '<td class="right">'.$langs->trans("Value").'</td>'."\n"; print '</tr>'."\n"; - if (is_dir($dir)) - { + if (is_dir($dir)) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (file_exists($dir.$file.'/product.'.$file.'.class.php')) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (file_exists($dir.$file.'/product.'.$file.'.class.php')) { $classfile = $dir.$file.'/product.'.$file.'.class.php'; $classname = 'Product'.ucfirst($file); @@ -717,8 +723,7 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) $module = $object->module; - if ($conf->$module->enabled) - { + if ($conf->$module->enabled) { print '<tr class="oddeven"><td>'; print $object->description; @@ -727,8 +732,7 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) $const = "PRODUCT_SPECIAL_".strtoupper($file); - if ($conf->global->$const) - { + if ($conf->global->$const) { print img_picto($langs->trans("Active"), 'tick'); print '</td><td class="right">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;token='.newToken().'&amp;spe='.urlencode($file).'&amp;value=0">'.$langs->trans("Disable").'</a>'; diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index d82d175a9a7..aea75f78aa8 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -38,13 +38,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -61,12 +65,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; $title = $langs->trans('ProductServiceSetup'); $textobject = $langs->trans("ProductsAndServices"); -if (empty($conf->product->enabled)) -{ +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'); } @@ -90,35 +92,23 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php new file mode 100644 index 00000000000..8cafa97e077 --- /dev/null +++ b/htdocs/product/admin/product_lot.php @@ -0,0 +1,289 @@ +<?php +/* Copyright (C) 2021 Christophe Battarel <christophe.battarel@altairis.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/product/admin/product_lot.php + * \ingroup produit + * \brief Setup page of product lot module + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "products", "productbatch")); + +// Security check +if (!$user->admin || (empty($conf->productbatch->enabled))) + accessforbidden(); + +$action = GETPOST('action', 'alpha'); +$value = GETPOST('value', 'alpha'); + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; + +if ($action == 'updateMaskLot') { + $maskconstbatch = GETPOST('maskconstLot', 'alpha'); + $maskbatch = GETPOST('maskLot', 'alpha'); + + if ($maskconstbatch) $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); + + if (!$res > 0) $error++; + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'updateMaskSN') { + $maskconstbatch = GETPOST('maskconstSN', 'alpha'); + $maskbatch = GETPOST('maskSN', 'alpha'); + + if ($maskconstbatch) $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); + + if (!$res > 0) $error++; + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'setmodlot') { + dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); +} elseif ($action == 'setmodsn') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); +} elseif ($action == 'setmaskslot') { + dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); + if ($value == '1' && $conf->global->PRODUCTBATCH_LOT_ADDONS !== 'mod_lot_advanced') { + dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", 'mod_lot_advanced', 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'setmaskssn') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); + if ($value == '1' && $conf->global->PRODUCTBATCH_SN_ADDONS !== 'mod_sn_advanced') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", 'mod_sn_advanced', 'chaine', 0, '', $conf->entity); + } +} + +/* + * View + */ + +$form = new Form($db); + +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + +llxHeader("", $langs->trans("ProductLotSetup")); + +$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; +print load_fiche_titre($langs->trans("ProductLotSetup"), $linkback, 'title_setup'); + +$head = product_lot_admin_prepare_head(); + +print dol_get_fiche_head($head, 'settings', $langs->trans("Batch"), -1, 'lot'); + +/* + * Lot Numbering models + */ + +print load_fiche_titre($langs->trans("BatchLotNumberingModules"), '', ''); + +print '<table class="noborder centpercent">'; +print '<tr class="liste_titre">'; +print '<td>'.$langs->trans("Name").'</td>'; +print '<td>'.$langs->trans("Description").'</td>'; +print '<td class="nowrap">'.$langs->trans("Example").'</td>'; +print '<td class="center" width="60">'.$langs->trans("Status").'</td>'; +print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>'; +print '</tr>'."\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/product_batch/"); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 8) == 'mod_lot_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { + $file = substr($file, 0, dol_strlen($file) - 4); + + require_once $dir.$file.'.php'; + + $module = new $file($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + + if ($module->isEnabled()) { + print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; + print $module->info(); + print '</td>'; + + // Show example of numbering model + print '<td class="nowrap">'; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $tmp; + print '</td>'."\n"; + + print '<td class="center">'; + if ($conf->global->PRODUCTBATCH_LOT_ADDON == $file) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodlot&amp;value='.$file.'">'; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '</a>'; + } + print '</td>'; + + $batch = new Productlot($db); + $batch->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>'; + $nextval = $module->getNextValue($mysoc, $batch); + 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.'<br>'; + } else { + $htmltooltip .= $langs->trans($module->error).'<br>'; + } + } + + print '<td class="center">'; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '</td>'; + + print "</tr>\n"; + } + } + } + closedir($handle); + } + } +} + +print "</table><br>\n"; + + +/* + * Serials Numbering models + */ + +print load_fiche_titre($langs->trans("BatchSerialNumberingModules"), '', ''); + +print '<table class="noborder centpercent">'; +print '<tr class="liste_titre">'; +print '<td>'.$langs->trans("Name").'</td>'; +print '<td>'.$langs->trans("Description").'</td>'; +print '<td class="nowrap">'.$langs->trans("Example").'</td>'; +print '<td class="center" width="60">'.$langs->trans("Status").'</td>'; +print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>'; +print '</tr>'."\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/product_batch/"); + + if (is_dir($dir)) { + $handle = opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 7) == 'mod_sn_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { + $file = substr($file, 0, dol_strlen($file) - 4); + + require_once $dir.$file.'.php'; + + $module = new $file($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + + if ($module->isEnabled()) { + print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; + print $module->info(); + print '</td>'; + + // Show example of numbering model + print '<td class="nowrap">'; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $tmp; + print '</td>'."\n"; + + print '<td class="center">'; + if ($conf->global->PRODUCTBATCH_SN_ADDON == $file) { + print img_picto($langs->trans("Activated"), 'switch_on'); + } else { + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodsn&amp;value='.$file.'">'; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '</a>'; + } + print '</td>'; + + $batch = new Productlot($db); + $batch->initAsSpecimen(); + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>'; + $nextval = $module->getNextValue($mysoc, $batch); + 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.'<br>'; + } else { + $htmltooltip .= $langs->trans($module->error).'<br>'; + } + } + + print '<td class="center">'; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print '</td>'; + + print "</tr>\n"; + } + } + } + closedir($handle); + } + } +} + +print "</table><br>\n"; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php index e89e5741cce..38af3a41f8d 100644 --- a/htdocs/product/admin/product_lot_extrafields.php +++ b/htdocs/product/admin/product_lot_extrafields.php @@ -38,13 +38,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product_lot'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -73,7 +77,7 @@ print load_fiche_titre($title, $linkback, 'title_setup'); $head = product_lot_admin_prepare_head(); -print dol_get_fiche_head($head, 'attributes', $textobject, -1, 'stock'); +print dol_get_fiche_head($head, 'attributes', $textobject, -1, 'lot'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; @@ -81,35 +85,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php index 54d56ad9dd5..daafa2f668d 100644 --- a/htdocs/product/admin/product_supplier_extrafields.php +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -39,13 +39,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product_fournisseur_price'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -62,12 +66,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; $title = $langs->trans('ProductServiceSetup'); $textobject = $langs->trans("ProductsAndServices"); -if (empty($conf->product->enabled)) -{ +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'); } @@ -91,35 +93,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index 3bf85bdff4f..674e90f3614 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -35,7 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $langs->loadLangs(array('admin', 'products')); // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); $oldvatrate = GETPOST('oldvatrate', 'alpha'); @@ -48,19 +50,16 @@ $newvatrate = GETPOST('newvatrate', 'alpha'); * Actions */ -if ($action == 'convert') -{ +if ($action == 'convert') { $error = 0; - if ($oldvatrate == $newvatrate) - { + if ($oldvatrate == $newvatrate) { $langs->load("errors"); setEventMessages($langs->trans("ErrorNewValueCantMatchOldValue"), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $country_id = $mysoc->country_id; // TODO Allow to choose country into form $nbrecordsmodified = 0; @@ -69,62 +68,65 @@ if ($action == 'convert') // Clean vat code old $vat_src_code_old = ''; - if (preg_match('/\((.*)\)/', $oldvatrate, $reg)) - { + if (preg_match('/\((.*)\)/', $oldvatrate, $reg)) { $vat_src_code_old = $reg[1]; $oldvatrateclean = preg_replace('/\s*\(.*\)/', '', $oldvatrate); // Remove code into vatrate. - } else $oldvatrateclean = $oldvatrate; + } else { + $oldvatrateclean = $oldvatrate; + } // Clean vat code new $vat_src_code_new = ''; - if (preg_match('/\((.*)\)/', $newvatrate, $reg)) - { + if (preg_match('/\((.*)\)/', $newvatrate, $reg)) { $vat_src_code_new = $reg[1]; $newvatrateclean = preg_replace('/\s*\(.*\)/', '', $newvatrate); // Remove code into vatrate. - } else $newvatrateclean = $newvatrate; + } else { + $newvatrateclean = $newvatrate; + } // If country to edit is my country, so we change customer prices - if ($country_id == $mysoc->country_id) - { + if ($country_id == $mysoc->country_id) { $sql = 'SELECT rowid'; $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 = '".$db->escape($vat_src_code_old)."'"; - else " AND default_vat_code = IS NULL"; + 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); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $objectstatic = new Product($db); // Object init must be into loop to avoid to get value of previous step $ret = $objectstatic->fetch($obj->rowid); - if ($ret > 0) - { + if ($ret > 0) { $ret = 0; $retm = 0; $updatelevel1 = false; // Update multiprice $listofmulti = array_reverse($objectstatic->multiprices, true); // To finish with level 1 - foreach ($listofmulti as $level => $multiprices) - { + foreach ($listofmulti as $level => $multiprices) { $price_base_type = $objectstatic->multiprices_base_type[$level]; // Get price_base_type of product/service to keep the same for update - if (empty($price_base_type)) continue; // Discard not defined price levels + if (empty($price_base_type)) { + continue; // Discard not defined price levels + } - if ($price_base_type == 'TTC') - { + if ($price_base_type == 'TTC') { $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 { $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]; } - if ($newminprice > $newprice) $newminprice = $newprice; + if ($newminprice > $newprice) { + $newminprice = $newprice; + } $newvat = str_replace('*', '', $newvatrate); $localtaxes_type = getLocalTaxesFromRate($newvat, 0, $mysoc, $mysoc); @@ -134,45 +136,51 @@ if ($action == 'convert') //print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n"; $retm = $objectstatic->updatePrice($newprice, $price_base_type, $user, $newvatrateclean, $newminprice, $newlevel, $newnpr, 0, 0, $localtaxes_type, $newdefaultvatcode); - if ($retm < 0) - { + if ($retm < 0) { $error++; break; } - if ($newlevel == 1) $updatelevel1 = true; + if ($newlevel == 1) { + $updatelevel1 = true; + } } // Update single price $price_base_type = $objectstatic->price_base_type; // Get price_base_type of product/service to keep the same for update - if ($price_base_type == 'TTC') - { + if ($price_base_type == 'TTC') { $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 { $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; } - if ($newminprice > $newprice) $newminprice = $newprice; + if ($newminprice > $newprice) { + $newminprice = $newprice; + } $newvat = str_replace('*', '', $newvatrate); $localtaxes_type = getLocalTaxesFromRate($newvat, 0, $mysoc, $mysoc); $newnpr = $objectstatic->recuperableonly; $newdefaultvatcode = $vat_src_code_new; $newlevel = 0; - if (!empty($price_base_type) && !$updatelevel1) - { + if (!empty($price_base_type) && !$updatelevel1) { //print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n"; $ret = $objectstatic->updatePrice($newprice, $price_base_type, $user, $newvatrateclean, $newminprice, $newlevel, $newnpr, 0, 0, $localtaxes_type, $newdefaultvatcode); } - if ($ret < 0 || $retm < 0) $error++; - else $nbrecordsmodified++; + if ($ret < 0 || $retm < 0) { + $error++; + } else { + $nbrecordsmodified++; + } } unset($objectstatic); $i++; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } $fourn = new Fournisseur($db); @@ -182,24 +190,24 @@ 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 = '".$db->escape($vat_src_code_old)."'"; - else " AND default_vat_code = IS NULL"; + 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 = ".((int) $country_id); //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $objectstatic2 = new ProductFournisseur($db); // Object init must be into loop to avoid to get value of previous step $ret = $objectstatic2->fetch_product_fournisseur_price($obj->rowid); - if ($ret > 0) - { + if ($ret > 0) { $ret = 0; $retm = 0; $updatelevel1 = false; $price_base_type = 'HT'; @@ -226,34 +234,39 @@ if ($action == 'convert') $newsupplierreputation = $objectstatic2->supplier_reputation; $newlevel = 0; - if (!empty($price_base_type) && !$updatelevel1) - { + if (!empty($price_base_type) && !$updatelevel1) { //print "$objectstatic2->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n"; $fourn->id = $obj->fk_soc; $ret = $objectstatic2->update_buyprice($obj->qty, $newprice, $user, $price_base_type, $fourn, $obj->fk_availability, $obj->ref_fourn, $newvat, '', $newpercent, 0, $newnpr, $newdeliverydelay, $newsupplierreputation, $localtaxes_type, $newdefaultvatcode); } - if ($ret < 0 || $retm < 0) $error++; - else $nbrecordsmodified++; + if ($ret < 0 || $retm < 0) { + $error++; + } else { + $nbrecordsmodified++; + } } unset($objectstatic2); $i++; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } // Output result - if (!$error) - { - if ($nbrecordsmodified > 0) setEventMessages($langs->trans("RecordsModified", $nbrecordsmodified), null, 'mesgs'); - else setEventMessages($langs->trans("NoRecordFound"), null, 'warnings'); + if (!$error) { + if ($nbrecordsmodified > 0) { + setEventMessages($langs->trans("RecordsModified", $nbrecordsmodified), null, 'mesgs'); + } else { + setEventMessages($langs->trans("NoRecordFound"), null, 'warnings'); + } } else { setEventMessages($langs->trans("Error"), null, 'errors'); } @@ -274,8 +287,7 @@ print load_fiche_titre($title, '', 'title_setup'); print $langs->trans("ProductVatMassChangeDesc").'<br><br>'; -if (empty($mysoc->country_code)) -{ +if (empty($mysoc->country_code)) { $langs->load("errors"); $warnpicto = img_error($langs->trans("WarningMandatorySetupNotComplete")); print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>'; diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index 9b5a0f23f07..e72c9f1b1bf 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -37,13 +37,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'entrepot'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -76,35 +80,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a></div>'; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print "<br>"; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 8a7ddf385d9..ea32e47c8a5 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -36,10 +36,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; // Load translation files required by the page $langs->load("companies"); -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -48,23 +49,32 @@ $search_agenda_label = GETPOST('search_agenda_label'); // Security check $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -if ($user->socid) $id = $user->socid; -$result = restrictedArea($user, 'produit|service', $id, 'product&product'); +if ($user->socid) { + $id = $user->socid; +} $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agendathirdparty')); +$result = restrictedArea($user, 'produit|service', $id, 'product&product'); + /* * Actions @@ -72,20 +82,19 @@ $hookmanager->initHooks(array('agendathirdparty')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -101,8 +110,7 @@ $contactstatic = new Contact($db); $form = new Form($db); -if ($id > 0 || $ref) -{ +if ($id > 0 || $ref) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -113,12 +121,21 @@ if ($id > 0 || $ref) $result = $object->fetch($id, $ref); $title = $langs->trans("Agenda"); - if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/productnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$title; - llxHeader('', $title); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda'; + + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/productnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$title; + } + llxHeader('', $title, $help_url); + + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $type = $langs->trans('Product'); - if ($object->isService()) $type = $langs->trans('Service'); + if ($object->isService()) { + $type = $langs->trans('Service'); + } $head = product_prepare_head($object); @@ -130,7 +147,9 @@ if ($id > 0 || $ref) $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; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -154,10 +173,11 @@ if ($id > 0 || $ref) $out = ''; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objproduct->id) || !empty($objcon->id)) && $permok) - { + if ((!empty($objproduct->id) || !empty($objcon->id)) && $permok) { //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objproduct) == 'Product') $out .= '&amp;prodid='.$objproduct->id.'&origin=product&originid='.$id; + if (get_class($objproduct) == 'Product') { + $out .= '&amp;prodid='.$objproduct->id.'&origin=product&originid='.$id; + } $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;backtopage=1&amp;percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); @@ -170,19 +190,21 @@ if ($id > 0 || $ref) $morehtmlcenter = ''; - if (!empty($conf->agenda->enabled)) - { + if (!empty($conf->agenda->enabled)) { $linktocreatetimeBtnStatus = !empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create); $morehtmlcenter = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', $linktocreatetimeBtnStatus); } - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { print '<br>'; $param = '&id='.$id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print_barre_liste($langs->trans("ActionsOnProduct"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); diff --git a/htdocs/product/ajax/index.html b/htdocs/product/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 0013ec90811..901e2b387e3 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -23,13 +23,27 @@ * \brief File to return Ajax response on product list request. */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} require '../../main.inc.php'; @@ -48,18 +62,18 @@ $alsoproductwithnosupplierprice = GETPOST('alsoproductwithnosupplierprice', 'int $warehouseStatus = GETPOST('warehousestatus', 'alpha'); $hidepriceinlabel = GETPOST('hidepriceinlabel', 'int'); +// Security check +restrictedArea($user, 'produit|service', 0, 'product&product'); + /* * View */ // print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; - -dol_syslog(join(',', $_GET)); // print_r($_GET); -if (!empty($action) && $action == 'fetch' && !empty($id)) -{ +if (!empty($action) && $action == 'fetch' && !empty($id)) { // action='fetch' is used to get product information on a product. So when action='fetch', id must be the product id. require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -68,11 +82,12 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $object = new Product($db); $ret = $object->fetch($id); - if ($ret > 0) - { + if ($ret > 0) { $outref = $object->ref; $outlabel = $object->label; + $outlabel_trans =''; $outdesc = $object->description; + $outdesc_trans =''; $outtype = $object->type; $outqty = 1; $outdiscount = 0; @@ -80,15 +95,32 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $found = false; $price_level = 1; - if ($socid > 0 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { + if ($socid > 0) { $thirdpartytemp = new Societe($db); $thirdpartytemp->fetch($socid); - $price_level = $thirdpartytemp->price_level; + + //Load translation description and label + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { + $newlang = $thirdpartytemp->default_lang; + + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + $outdesc_trans = (!empty($object->multilangs[$outputlangs->defaultlang]["description"])) ? $object->multilangs[$outputlangs->defaultlang]["description"] : $object->description; + $outlabel_trans = (!empty($object->multilangs[$outputlangs->defaultlang]["label"])) ? $object->multilangs[$outputlangs->defaultlang]["label"] : $object->label; + } else { + $outdesc_trans = $object->description; + $outlabel_trans = $object->label; + } + } + + if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + $price_level = $thirdpartytemp->price_level; + } } // Price by qty - if (!empty($price_by_qty_rowid) && $price_by_qty_rowid >= 1 && (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) // If we need a particular price related to qty - { + if (!empty($price_by_qty_rowid) && $price_by_qty_rowid >= 1 && (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { // If we need a particular price related to qty $sql = "SELECT price, unitprice, quantity, remise_percent"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price_by_qty "; $sql .= " WHERE rowid=".$price_by_qty_rowid.""; @@ -109,8 +141,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) } // Multiprice - if (!$found && isset($price_level) && $price_level >= 1 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) // If we need a particular price level (from 1 to 6) - { + if (!$found && isset($price_level) && $price_level >= 1 && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { // If we need a particular price level (from 1 to 6) $sql = "SELECT price, price_ttc, price_base_type, tva_tx"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price "; $sql .= " WHERE fk_product = '".$id."'"; @@ -159,7 +190,20 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $outtva_tx = $object->tva_tx; } - $outjson = array('ref' => $outref, 'label' => $outlabel, 'desc' => $outdesc, 'type' => $outtype, 'price_ht' => $outprice_ht, 'price_ttc' => $outprice_ttc, 'pricebasetype' => $outpricebasetype, 'tva_tx' => $outtva_tx, 'qty' => $outqty, 'discount' => $outdiscount); + $outjson = array( + 'ref' => $outref, + 'label' => $outlabel, + 'label_trans' => $outlabel_trans, + 'desc' => $outdesc, + 'desc_trans' => $outdesc_trans, + 'type' => $outtype, + 'price_ht' => $outprice_ht, + 'price_ttc' => $outprice_ttc, + 'pricebasetype' => $outpricebasetype, + 'tva_tx' => $outtva_tx, + 'qty' => $outqty, + 'discount' => $outdiscount, + 'array_options'=>$object->array_options); } echo json_encode($outjson); @@ -170,19 +214,20 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) top_httphead(); - if (empty($htmlname)) - { + if (empty($htmlname)) { print json_encode(array()); return; } + // Filter on the product to search can be: + // Into an array with key $htmlname123 (we take first one found). Which page use this ? + // Into a var with name $htmlname can be 'prodid', 'productid', ... $match = preg_grep('/('.$htmlname.'[0-9]+)/', array_keys($_GET)); sort($match); - $idprod = (!empty($match[0]) ? $match[0] : ''); + $idprod = (empty($match[0]) ? '' : $match[0]); // Take first key found into GET array with matching $htmlname123 - if (GETPOST($htmlname, 'alpha') == '' && (!$idprod || !GETPOST($idprod, 'alpha'))) - { + if (GETPOST($htmlname, 'alpha') == '' && (!$idprod || !GETPOST($idprod, 'alpha'))) { print json_encode(array()); return; } @@ -190,7 +235,9 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) // When used from jQuery, the search term is added as GET param "term". $searchkey = (($idprod && GETPOST($idprod, 'alpha')) ? GETPOST($idprod, 'alpha') : (GETPOST($htmlname, 'alpha') ? GETPOST($htmlname, 'alpha') : '')); - $form = new Form($db); + if (!is_object($form)) { + $form = new Form($db); + } if (empty($mode) || $mode == 1) { // mode=1: customer $arrayresult = $form->select_produits_list("", $htmlname, $type, 0, $price_level, $searchkey, $status, $finished, $outjson, $socid, '1', 0, '', $hidepriceinlabel, $warehouseStatus); @@ -200,6 +247,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) $db->close(); - if ($outjson) + if ($outjson) { print json_encode($arrayresult); + } } diff --git a/htdocs/product/canvas/index.html b/htdocs/product/canvas/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index e7e3c7ea4b3..55a8977a4bd 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -80,8 +80,10 @@ class ActionsCardProduct global $conf, $langs, $user, $mysoc, $canvas; global $form, $formproduct; - $tmpobject = new Product($this->db); - if (!empty($id) || !empty($ref)) $tmpobject->fetch($id, $ref); + $tmpobject = new Product($this->db); + if (!empty($id) || !empty($ref)) { + $tmpobject->fetch($id, $ref); + } $this->object = $tmpobject; //parent::assign_values($action); @@ -113,8 +115,7 @@ class ActionsCardProduct // Note $this->tpl['note'] = nl2br($this->note); - if ($action == 'create') - { + if ($action == 'create') { // Price $this->tpl['price'] = $this->price; $this->tpl['price_min'] = $this->price_min; @@ -124,8 +125,7 @@ class ActionsCardProduct $this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, ''); } - if ($action == 'view') - { + if ($action == 'view') { $head = product_prepare_head($this->object); $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'ref', '', 1, 'ref'); @@ -152,19 +152,16 @@ class ActionsCardProduct $this->tpl['note'] = $this->object->note; $this->tpl['seuil_stock_alerte'] = $this->object->seuil_stock_alerte; - if ($action == 'create') - { + if ($action == 'create') { // Title $this->tpl['title'] = $langs->trans("NewProduct"); } - if ($action == 'edit') - { + if ($action == 'edit') { $this->tpl['title'] = $langs->trans('Modify').' '.$langs->trans('Product').' : '.$this->object->ref; } - if ($action == 'create' || $action == 'edit') - { + if ($action == 'create' || $action == 'edit') { // Status $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $this->tpl['status'] = $form->selectarray('statut', $statutarray, $this->object->status); @@ -196,12 +193,10 @@ class ActionsCardProduct $this->tpl['volume_units'] = $formproduct->selectMeasuringUnits("volume_units", "volume", $this->object->volume_units, 0, 2); } - if ($action == 'view') - { + if ($action == 'view') { // Photo $this->tpl['nblines'] = 4; - if ($this->object->is_photo_available($conf->product->multidir_output[$this->object->entity])) - { + if ($this->object->is_photo_available($conf->product->multidir_output[$this->object->entity])) { $this->tpl['photos'] = $this->object->show_photos('product', $conf->product->multidir_output[$this->object->entity], 1, 1, 0, 0, 0, 80); } @@ -209,34 +204,29 @@ class ActionsCardProduct $this->tpl['finished'] = $this->object->getLibFinished(); // Weight - if ($this->object->weight != '') - { + if ($this->object->weight != '') { $this->tpl['weight'] = $this->object->weight." ".measuringUnitString(0, "weight", $this->object->weight_units); } // Length - if ($this->object->length != '') - { + if ($this->object->length != '') { $this->tpl['length'] = $this->object->length." ".measuringUnitString(0, "size", $this->object->length_units); } // Surface - if ($this->object->surface != '') - { + if ($this->object->surface != '') { $this->tpl['surface'] = $this->object->surface." ".measuringUnitString(0, "surface", $this->object->surface_units); } // Volume - if ($this->object->volume != '') - { + if ($this->object->volume != '') { $this->tpl['volume'] = $this->object->volume." ".measuringUnitString(0, "volume", $this->object->volume_units); } $this->tpl['fiche_end'] = dol_get_fiche_end(); } - if ($action == 'list') - { + if ($action == 'list') { $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } @@ -260,13 +250,11 @@ class ActionsCardProduct $sql .= " ORDER BY rang ASC"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $fieldlist = array(); $obj = $this->db->fetch_object($resql); @@ -315,10 +303,8 @@ class ActionsCardProduct // Clean parameters $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); - foreach ($this->field_list as $field) - { - if ($field['enabled']) - { + foreach ($this->field_list as $field) { + if ($field['enabled']) { $fieldname = "s".$field['alias']; $$fieldname = GETPOST($fieldname); } @@ -330,10 +316,8 @@ class ActionsCardProduct $sql .= 'p.rowid, p.price_base_type, p.fk_product_type, p.seuil_stock_alerte, p.entity'; // Fields not requiered - foreach ($this->field_list as $field) - { - if ($field['enabled']) - { + foreach ($this->field_list as $field) { + if ($field['enabled']) { $sql .= ", ".$field['name']." as ".$field['alias']; } } @@ -341,37 +325,34 @@ class ActionsCardProduct $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= " WHERE p.entity IN (".getEntity('product').")"; - if ($sall) - { + if ($sall) { $clause = ''; $sql .= " AND ("; - foreach ($this->field_list as $field) - { - if ($field['enabled']) - { + foreach ($this->field_list as $field) { + if ($field['enabled']) { $sql .= $clause." ".$field['name']." LIKE '%".$this->db->escape($sall)."%'"; - if ($clause == '') $clause = ' OR'; + if ($clause == '') { + $clause = ' OR'; + } } } $sql .= ")"; } // Search fields - foreach ($this->field_list as $field) - { - if ($field['enabled']) - { + foreach ($this->field_list as $field) { + if ($field['enabled']) { $fieldname = "s".$field['alias']; - if (${$fieldname}) $sql .= " AND ".$field['name']." LIKE '%".$this->db->escape(${$fieldname})."%'"; + if (${$fieldname}) { + $sql .= " AND ".$field['name']." LIKE '%".$this->db->escape(${$fieldname})."%'"; + } } } - if (isset($_GET["tosell"]) && dol_strlen($_GET["tosell"]) > 0) - { + if (isset($_GET["tosell"]) && dol_strlen($_GET["tosell"]) > 0) { $sql .= " AND p.tosell = ".$this->db->escape($_GET["tosell"]); } - if (isset($_GET["canvas"]) && dol_strlen($_GET["canvas"]) > 0) - { + if (isset($_GET["canvas"]) && dol_strlen($_GET["canvas"]) > 0) { $sql .= " AND p.canvas = '".$this->db->escape($_GET["canvas"])."'"; } $sql .= $this->db->order($sortfield, $sortorder); @@ -379,42 +360,45 @@ class ActionsCardProduct //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $datas = array(); $obj = $this->db->fetch_object($resql); $datas["id"] = $obj->rowid; - foreach ($this->field_list as $field) - { - if ($field['enabled']) - { + foreach ($this->field_list as $field) { + if ($field['enabled']) { $alias = $field['alias']; - if ($alias == 'ref') - { + if ($alias == 'ref') { $this->id = $obj->rowid; $this->ref = $obj->$alias; $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 (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); - else $datas[$alias] = $obj->$alias; + 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 (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); + } else { + $datas[$alias] = $obj->$alias; + } } } diff --git a/htdocs/product/canvas/product/index.html b/htdocs/product/canvas/product/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index 042734f8fd3..b862eddefc5 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -16,8 +16,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; } @@ -53,7 +52,9 @@ print dol_get_fiche_head(''); <tr> <td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td> <td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>"> -<?php if ($refalreadyexists == 1) echo $langs->trans("RefAlreadyExists"); ?> +<?php if ($refalreadyexists == 1) { + echo $langs->trans("RefAlreadyExists"); +} ?> </td></tr> <tr> diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index 512ab13416b..21f2edefc2d 100644 --- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php @@ -16,8 +16,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/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php index 2158be2b24d..a5f793e246d 100644 --- a/htdocs/product/canvas/product/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php @@ -16,8 +16,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; } @@ -37,7 +36,9 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_value $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; +if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; +} dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); ?> diff --git a/htdocs/product/canvas/product/tpl/index.html b/htdocs/product/canvas/product/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 48f924bbb46..b27bbf5771c 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -79,14 +79,15 @@ class ActionsCardService global $conf, $langs, $user, $mysoc, $canvas; global $form, $formproduct; - $tmpobject = new Product($this->db); - if (!empty($id) || !empty($ref)) $tmpobject->fetch($id, $ref); + $tmpobject = new Product($this->db); + if (!empty($id) || !empty($ref)) { + $tmpobject->fetch($id, $ref); + } $this->object = $tmpobject; //parent::assign_values($action); - foreach ($this->object as $key => $value) - { + foreach ($this->object as $key => $value) { $this->tpl[$key] = $value; } @@ -113,8 +114,7 @@ class ActionsCardService // Note $this->tpl['note'] = nl2br($this->note); - if ($action == 'create') - { + if ($action == 'create') { // Price $this->tpl['price'] = $this->price; $this->tpl['price_min'] = $this->price_min; @@ -124,8 +124,7 @@ class ActionsCardService $this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, ''); } - if ($action == 'view') - { + if ($action == 'view') { $head = product_prepare_head($this->object); $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'ref', '', 1, 'ref'); @@ -155,19 +154,16 @@ class ActionsCardService // Duration $this->tpl['duration_value'] = $this->object->duration_value; - if ($action == 'create') - { + if ($action == 'create') { // Title $this->tpl['title'] = $langs->trans("NewService"); } - if ($action == 'edit') - { + if ($action == 'edit') { $this->tpl['title'] = $langs->trans('Modify').' '.$langs->trans('Service').' : '.$this->object->ref; } - if ($action == 'create' || $action == 'edit') - { + if ($action == 'create' || $action == 'edit') { // Status $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); $this->tpl['status'] = $form->selectarray('statut', $statutarray, $this->object->status); @@ -192,21 +188,17 @@ class ActionsCardService $this->tpl['duration_unit'] = $duration_unit; } - if ($action == 'view') - { + if ($action == 'view') { // Photo $this->tpl['nblines'] = 4; - if ($this->object->is_photo_available($conf->service->multidir_output[$this->object->entity])) - { + if ($this->object->is_photo_available($conf->service->multidir_output[$this->object->entity])) { $this->tpl['photos'] = $this->object->show_photos('product', $conf->service->multidir_output[$this->object->entity], 1, 1, 0, 0, 0, 80); } // Duration - if ($this->object->duration_value > 1) - { + 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")); } $this->tpl['duration_unit'] = $langs->trans($dur[$this->object->duration_unit]); @@ -214,8 +206,7 @@ class ActionsCardService $this->tpl['fiche_end'] = dol_get_fiche_end(); } - if ($action == 'list') - { + if ($action == 'list') { $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } @@ -239,13 +230,11 @@ class ActionsCardService $sql .= " ORDER BY rang ASC"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $fieldlist = array(); $obj = $this->db->fetch_object($resql); @@ -294,40 +283,43 @@ class ActionsCardService $sql .= ' p.duration, p.tosell as statut, p.seuil_stock_alerte'; $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; // We'll need this table joined to the select in order to filter by categ - if ($search_categ) $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; - if (GETPOST("fourn_id", 'int') > 0) - { + if ($search_categ) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; + } + if (GETPOST("fourn_id", 'int') > 0) { $fourn_id = GETPOST("fourn_id", 'int'); $sql .= ", ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; } $sql .= " WHERE p.entity IN (".getEntity('product').")"; - if ($search_categ) $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ - if ($sall) - { + if ($search_categ) { + $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ + } + if ($sall) { $sql .= " AND (p.ref LIKE '%".$this->db->escape($sall)."%' OR p.label LIKE '%".$this->db->escape($sall)."%' OR p.description LIKE '%".$this->db->escape($sall)."%' OR p.note LIKE '%".$this->db->escape($sall)."%')"; } - if ($sref) $sql .= " AND p.ref LIKE '%".$sref."%'"; - if ($search_barcode) $sql .= " AND p.barcode LIKE '%".$search_barcode."%'"; - if ($snom) $sql .= " AND p.label LIKE '%".$this->db->escape($snom)."%'"; - if (isset($_GET["tosell"]) && dol_strlen($_GET["tosell"]) > 0) - { + if ($sref) { + $sql .= " AND p.ref LIKE '%".$sref."%'"; + } + if ($search_barcode) { + $sql .= " AND p.barcode LIKE '%".$search_barcode."%'"; + } + if ($snom) { + $sql .= " AND p.label LIKE '%".$this->db->escape($snom)."%'"; + } + if (isset($_GET["tosell"]) && dol_strlen($_GET["tosell"]) > 0) { $sql .= " AND p.tosell = ".$this->db->escape($_GET["tosell"]); } - if (isset($_GET["canvas"]) && dol_strlen($_GET["canvas"]) > 0) - { + if (isset($_GET["canvas"]) && dol_strlen($_GET["canvas"]) > 0) { $sql .= " AND p.canvas = '".$this->db->escape($_GET["canvas"])."'"; } - if ($catid) - { + if ($catid) { $sql .= " AND cp.fk_categorie = ".$catid; } - if ($fourn_id > 0) - { + if ($fourn_id > 0) { $sql .= " AND p.rowid = pfp.fk_product AND pfp.fk_soc = ".$fourn_id; } // Insert categ filter - if ($search_categ) - { + if ($search_categ) { $sql .= " AND cp.fk_categorie = ".$this->db->escape($search_categ); } $sql .= $this->db->order($sortfield, $sortorder); @@ -336,13 +328,11 @@ class ActionsCardService $this->list_datas = array(); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $datas = array(); $obj = $this->db->fetch_object($resql); diff --git a/htdocs/product/canvas/service/index.html b/htdocs/product/canvas/service/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/canvas/service/tpl/card_create.tpl.php b/htdocs/product/canvas/service/tpl/card_create.tpl.php index 13fceff4e22..ce3c4f5cc58 100644 --- a/htdocs/product/canvas/service/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_create.tpl.php @@ -16,8 +16,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; } @@ -50,7 +49,9 @@ print dol_get_fiche_head(''); <tr> <td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td> <td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>"> -<?php if ($refalreadyexists == 1) echo $langs->trans("RefAlreadyExists"); ?> +<?php if ($refalreadyexists == 1) { + echo $langs->trans("RefAlreadyExists"); +} ?> </td></tr> <tr> diff --git a/htdocs/product/canvas/service/tpl/card_edit.tpl.php b/htdocs/product/canvas/service/tpl/card_edit.tpl.php index 8e4613f21b0..4906b0dcf2c 100644 --- a/htdocs/product/canvas/service/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_edit.tpl.php @@ -16,8 +16,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/product/canvas/service/tpl/card_view.tpl.php b/htdocs/product/canvas/service/tpl/card_view.tpl.php index d342d102af0..c816a36ae34 100644 --- a/htdocs/product/canvas/service/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_view.tpl.php @@ -16,8 +16,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; } @@ -37,7 +36,9 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_value $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; +if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; +} dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); ?> diff --git a/htdocs/product/canvas/service/tpl/index.html b/htdocs/product/canvas/service/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 4857f35b121..64e5b844cb0 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -53,18 +53,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('products', 'other')); -if (!empty($conf->stock->enabled)) $langs->load("stocks"); -if (!empty($conf->facture->enabled)) $langs->load("bills"); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->stock->enabled)) { + $langs->load("stocks"); +} +if (!empty($conf->facture->enabled)) { + $langs->load("bills"); +} +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} $mesg = ''; $error = 0; $errors = array(); @@ -91,7 +109,9 @@ $accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha'); // by default 'alphanohtml' (better security); hidden conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML allows basic html $label_security_check = empty($conf->global->MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML) ? 'alphanohtml' : 'restricthtml'; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $object = new Product($db); $object->type = $type; // so test later to fill $usercancxxx is correct @@ -100,17 +120,21 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($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"; + } } } @@ -119,8 +143,7 @@ $modulepart = 'product'; // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $canvas = !empty($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('product', 'card', $canvas); @@ -140,23 +163,27 @@ $hookmanager->initHooks(array('productcard', 'globalcard')); * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} $usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); $usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); $usercandelete = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)); $createbarcode = empty($conf->barcode->enabled) ? 0 : 1; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) $createbarcode = 0; +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->creer_advance)) { + $createbarcode = 0; +} $parameters = array('id'=>$id, 'ref'=>$ref, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Type - if ($action == 'setfk_product_type' && $usercancreate) - { + 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; @@ -170,29 +197,31 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Barcode type - if ($action == 'setfk_barcode_type' && $createbarcode) - { + 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) - { + if ($action == 'setbarcode' && $createbarcode) { $result = $object->check_barcode(GETPOST('barcode'), GETPOST('barcode_type_code')); - if ($result >= 0) - { + if ($result >= 0) { $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'); @@ -200,43 +229,42 @@ if (empty($reshook)) } // Add a product or service - if ($action == 'add' && $usercancreate) - { + if ($action == 'add' && $usercancreate) { $error = 0; - if (!GETPOST('label', $label_security_check)) - { - 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', $label_security_check)) { + 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) - { + if (!$error) { $units = GETPOST('units', 'int'); - $object->ref = $ref; - $object->label = GETPOST('label', $label_security_check); - $object->price_base_type = GETPOST('price_base_type', 'aZ09'); + $object->ref = $ref; + $object->label = GETPOST('label', $label_security_check); + $object->price_base_type = GETPOST('price_base_type', 'aZ09'); - if ($object->price_base_type == 'TTC') + if ($object->price_base_type == 'TTC') { $object->price_ttc = GETPOST('price'); - else $object->price = GETPOST('price'); - if ($object->price_base_type == 'TTC') + } 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'); + } 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)' @@ -247,8 +275,7 @@ if (empty($reshook)) $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)) - { + 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 @@ -258,8 +285,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; $sql .= " AND t.code = '".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -281,6 +307,7 @@ if (empty($reshook)) $object->status = GETPOST('statut'); $object->status_buy = GETPOST('statut_buy'); $object->status_batch = GETPOST('status_batch'); + $object->batch_mask = GETPOST('batch_mask'); $object->barcode_type = GETPOST('fk_barcode_type'); $object->barcode = GETPOST('barcode'); @@ -289,8 +316,7 @@ if (empty($reshook)) $stdobject->element = 'product'; $stdobject->barcode_type = GETPOST('fk_barcode_type'); $result = $stdobject->fetch_barcode(); - if ($result < 0) - { + if ($result < 0) { $error++; $mesg = 'Failed to get bar code type information '; setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); @@ -345,22 +371,43 @@ if (empty($reshook)) $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; } - if ($accountancy_code_sell_export <= 0) { $object->accountancy_code_sell_export = ''; } else { $object->accountancy_code_sell_export = $accountancy_code_sell_export; } - if ($accountancy_code_buy <= 0) { $object->accountancy_code_buy = ''; } else { $object->accountancy_code_buy = $accountancy_code_buy; } - 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; } + 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; + } + if ($accountancy_code_sell_export <= 0) { + $object->accountancy_code_sell_export = ''; + } else { + $object->accountancy_code_sell_export = $accountancy_code_sell_export; + } + if ($accountancy_code_buy <= 0) { + $object->accountancy_code_buy = ''; + } else { + $object->accountancy_code_buy = $accountancy_code_buy; + } + 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]; + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { + if (GETPOSTISSET("price_".$i)) { + $object->multiprices["$i"] = price2num(GETPOST("price_".$i), 'MU'); + $object->multiprices_base_type["$i"] = GETPOST("multiprices_base_type_".$i); } else { $object->multiprices["$i"] = ""; } @@ -369,23 +416,24 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $id = $object->create($user); } - if ($id > 0) - { + if ($id > 0) { // Category association $categories = GETPOST('categories', 'array'); $object->setCategories($categories); - if (!empty($backtopage)) - { + if (!empty($backtopage)) { $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation - if (preg_match('/\?/', $backtopage)) $backtopage .= '&socid='.$object->id; // Old method + if (preg_match('/\?/', $backtopage)) { + $backtopage .= '&socid='.$object->id; // Old method + } header("Location: ".$backtopage); exit; } else { @@ -393,30 +441,32 @@ if (empty($reshook)) exit; } } else { - if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans($object->error), null, 'errors'); + if (count($object->errors)) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + } $action = "create"; } } } // Update a product or service - if ($action == 'update' && $usercancreate) - { - if (GETPOST('cancel', 'alpha')) - { + if ($action == 'update' && $usercancreate) { + if (GETPOST('cancel', 'alpha')) { $action = ''; } else { - if ($object->id > 0) - { + if ($object->id > 0) { $object->oldcopy = clone $object; $object->ref = $ref; $object->label = GETPOST('label', $label_security_check); - $object->description = dol_htmlcleanlastbr(GETPOST('desc', 'restricthtml')); + + $desc = dol_htmlcleanlastbr(preg_replace('/&nbsp;$/', '', GETPOST('desc', 'restricthtml'))); + $object->description = $desc; + $object->url = GETPOST('url'); - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml')); $object->note = $object->note_private; } @@ -426,12 +476,13 @@ if (empty($reshook)) $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->batch_mask = GETPOST('batch_mask', 'alpha'); $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); + // removed from update view so GETPOST always empty /* - $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); - $object->desiredstock = GETPOST('desiredstock'); - */ + $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'); @@ -471,8 +522,7 @@ if (empty($reshook)) $stdobject->element = 'product'; $stdobject->barcode_type = GETPOST('fk_barcode_type'); $result = $stdobject->fetch_barcode(); - if ($result < 0) - { + if ($result < 0) { $error++; $mesg = 'Failed to get bar code type information '; setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); @@ -488,34 +538,64 @@ if (empty($reshook)) $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; } - if ($accountancy_code_sell_export <= 0) { $object->accountancy_code_sell_export = ''; } else { $object->accountancy_code_sell_export = $accountancy_code_sell_export; } - if ($accountancy_code_buy <= 0) { $object->accountancy_code_buy = ''; } else { $object->accountancy_code_buy = $accountancy_code_buy; } - 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; } + 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; + } + if ($accountancy_code_sell_export <= 0) { + $object->accountancy_code_sell_export = ''; + } else { + $object->accountancy_code_sell_export = $accountancy_code_sell_export; + } + if ($accountancy_code_buy <= 0) { + $object->accountancy_code_buy = ''; + } else { + $object->accountancy_code_buy = $accountancy_code_buy; + } + 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); - if ($ret < 0) $error++; + 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 { - if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans($object->error), null, 'errors'); + if (count($object->errors)) { + setEventMessages($object->error, $object->errors, 'errors'); + } 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'); + if (count($object->errors)) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans("ErrorProductBadRefOrLabel"), null, 'errors'); + } $action = 'edit'; } } @@ -523,36 +603,31 @@ if (empty($reshook)) } // Action clone object - if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } - if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) - { - if (!GETPOST('clone_content') && !GETPOST('clone_prices')) - { + 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) - { + 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()) - { + if ($object->check()) { $object->context['createfromclone'] = 'createfromclone'; $id = $object->create($user); - if ($id > 0) - { - if (GETPOST('clone_composition')) - { + if ($id > 0) { + if (GETPOST('clone_composition')) { $result = $object->clone_associations($originalId, $id); - if ($result < 1) - { + if ($result < 1) { $db->rollback(); setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); @@ -560,12 +635,10 @@ if (empty($reshook)) } } - if (GETPOST('clone_categories')) - { + if (GETPOST('clone_categories')) { $result = $object->cloneCategories($originalId, $id); - if ($result < 1) - { + if ($result < 1) { $db->rollback(); setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); @@ -594,8 +667,7 @@ if (empty($reshook)) } else { $id = $originalId; - if ($object->error == 'ErrorProductAlreadyExists') - { + if ($object->error == 'ErrorProductAlreadyExists') { $db->rollback(); $refalreadyexists++; @@ -607,8 +679,7 @@ if (empty($reshook)) $object->fetch($id); } else { $db->rollback(); - if (count($object->errors)) - { + if (count($object->errors)) { setEventMessages($object->error, $object->errors, 'errors'); dol_print_error($db, $object->errors); } else { @@ -628,13 +699,13 @@ if (empty($reshook)) } // Delete a product - if ($action == 'confirm_delete' && $confirm != 'yes') { $action = ''; } - if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) - { + if ($action == 'confirm_delete' && $confirm != 'yes') { + $action = ''; + } + if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header('Location: '.DOL_URL_ROOT.'/product/list.php?type='.$object->type.'&delprod='.urlencode($object->ref)); exit; } else { @@ -646,35 +717,28 @@ if (empty($reshook)) // Add product into object - if ($object->id > 0 && $action == 'addin') - { + if ($object->id > 0 && $action == 'addin') { $thirpdartyid = 0; - if (GETPOST('propalid') > 0) - { + if (GETPOST('propalid') > 0) { $propal = new Propal($db); $result = $propal->fetch(GETPOST('propalid')); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db, $propal->error); exit; } $thirpdartyid = $propal->socid; - } elseif (GETPOST('commandeid') > 0) - { + } elseif (GETPOST('commandeid') > 0) { $commande = new Commande($db); $result = $commande->fetch(GETPOST('commandeid')); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db, $commande->error); exit; } $thirpdartyid = $commande->socid; - } elseif (GETPOST('factureid') > 0) - { + } elseif (GETPOST('factureid') > 0) { $facture = new Facture($db); $result = $facture->fetch(GETPOST('factureid')); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db, $facture->error); exit; } @@ -693,7 +757,9 @@ if (empty($reshook)) $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; + 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); @@ -740,8 +806,7 @@ if (empty($reshook)) if (GETPOST('propalid') > 0) { // Define cost price for margin calculation $buyprice = 0; - if (($result = $propal->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { + if (($result = $propal->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), 2), $object->id)) < 0) { dol_syslog($langs->trans('FailedToGetCostPrice')); setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); } else { @@ -751,12 +816,12 @@ if (empty($reshook)) $result = $propal->addline( $desc, $pu_ht, - GETPOST('qty'), + price2num(GETPOST('qty'), 'MS'), $tva_tx, $localtax1_tx, // localtax1 $localtax2_tx, // localtax2 $object->id, - GETPOST('remise_percent'), + price2num(GETPOST('remise_percent'), 2), $price_base_type, $pu_ttc, 0, @@ -781,8 +846,7 @@ if (empty($reshook)) } elseif (GETPOST('commandeid') > 0) { // Define cost price for margin calculation $buyprice = 0; - if (($result = $commande->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { + if (($result = $commande->defineBuyPrice($pu_ht, GETPOST('remise_percent', 2), $object->id)) < 0) { dol_syslog($langs->trans('FailedToGetCostPrice')); setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); } else { @@ -792,12 +856,12 @@ if (empty($reshook)) $result = $commande->addline( $desc, $pu_ht, - GETPOST('qty'), + price2num(GETPOST('qty'), 'MS'), $tva_tx, $localtax1_tx, // localtax1 $localtax2_tx, // localtax2 $object->id, - GETPOST('remise_percent'), + price2num(GETPOST('remise_percent'), 2), '', '', $price_base_type, @@ -822,8 +886,7 @@ if (empty($reshook)) } elseif (GETPOST('factureid') > 0) { // Define cost price for margin calculation $buyprice = 0; - if (($result = $facture->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { + if (($result = $facture->defineBuyPrice($pu_ht, GETPOST('remise_percent', 2), $object->id)) < 0) { dol_syslog($langs->trans('FailedToGetCostPrice')); setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); } else { @@ -833,12 +896,12 @@ if (empty($reshook)) $result = $facture->addline( $desc, $pu_ht, - GETPOST('qty'), + price2nm(GETPOST('qty'), 'MS'), $tva_tx, $localtax1_tx, $localtax2_tx, $object->id, - GETPOST('remise_percent'), + price2num(GETPOST('remise_percent'), 2), '', '', '', @@ -879,41 +942,41 @@ if (empty($reshook)) * View */ -$title = $langs->trans('ProductServiceCard'); -$helpurl = ''; -$shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ - $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); - $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; -} -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ - $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); - $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; -} - -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); +if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); +} + + +$title = $langs->trans('ProductServiceCard'); +$help_url = ''; +$shortlabel = dol_trunc($object->label, 16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { + $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos|DE:Modul_Produkte'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { + $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Card'); + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios|DE:Modul_Leistungen'; +} + +llxHeader('', $title, $help_url); // Load object modBarCodeProduct $res = 0; -if (!empty($conf->barcode->enabled) && !empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) -{ +if (!empty($conf->barcode->enabled) && !empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM); $dirbarcode = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); - foreach ($dirbarcode as $dirroot) - { + foreach ($dirbarcode as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } - if ($res > 0) - { + if ($res > 0) { $modBarCodeProduct = new $module(); } } @@ -923,11 +986,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // When used with CANVAS // ----------------------------------------- - if (empty($object->error) && $id) - { - $object = new Product($db); + if (empty($object->error) && $id) { $result = $object->fetch($id); - if ($result <= 0) dol_print_error('', $object->error); + 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 @@ -950,13 +1013,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // 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') - { + 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) - { + if ($result > 0) { $modCodeProduct = new $module(); } @@ -966,10 +1027,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="type" value="'.$type.'">'."\n"; - if (!empty($modCodeProduct->code_auto)) + if (!empty($modCodeProduct->code_auto)) { print '<input type="hidden" name="code_auto" value="1">'; - if (!empty($modBarCodeProduct->code_auto)) + } + if (!empty($modBarCodeProduct->code_auto)) { print '<input type="hidden" name="barcode_auto" value="1">'; + } print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; if ($type == 1) { @@ -984,8 +1047,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // 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) - { + if ($object->country_id > 0) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; @@ -997,10 +1059,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr>'; $tmpcode = ''; - if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $type); + if (!empty($modCodeProduct->code_auto)) { + $tmpcode = $modCodeProduct->getNextValue($object, $type); + } print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">'; - if ($refalreadyexists) - { + if ($refalreadyexists) { print $langs->trans("RefAlreadyExists"); } print '</td></tr>'; @@ -1021,33 +1084,79 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Batch number management - if (!empty($conf->productbatch->enabled)) - { - print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">'; - $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); + if (!empty($conf->productbatch->enabled)) { + print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td>'; + $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial")); print $form->selectarray('status_batch', $statutarray, GETPOST('status_batch')); - print '</td></tr>'; + print '</td>'; + // Product specific batch number management + $status_batch = GETPOST('status_batch'); + if ($status_batch !== '0') { + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + print '<td id="mask_option">'.$langs->trans("ManageLotMask").'</td>'; + if (($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') || ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) { + $inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK; + $inherited_mask_sn = $conf->global->SN_ADVANCED_MASK; + print '<td id="field_mask">'; + print $form->textwithpicto('<input type="text" class="flat" size="24" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1); + print '</td>'; + print '<script type="text/javascript"> + $(document).ready(function() { + $("#field_mask, #mask_option").addClass("hideobject"); + $("#status_batch").on("change", function () { + var optionSelected = $("option:selected", this); + var valueSelected = this.value; + $("#field_mask, #mask_option").addClass("hideobject"); + if (this.value == 1) { + $("#field_mask, #mask_option").toggleClass("hideobject"); + $("#batch_mask_input").val("'.$inherited_mask_lot.'"); + } + if (this.value == 2) { + $("#field_mask, #mask_option").toggleClass("hideobject"); + $("#batch_mask_input").val("'.$inherited_mask_sn.'"); + } + }) + }) + </script>'; + } else { + print '<td></td>'; + } + } else { + print '<td colspan="2"></td>'; + } + print '</tr>'; } $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { + $showbarcode = 0; + } - if ($showbarcode) - { - print '<tr><td>'.$langs->trans('BarcodeType').'</td><td>'; - if (GETPOSTISSET('fk_barcode_type')) { - $fk_barcode_type = GETPOST('fk_barcode_type'); + if ($showbarcode) { + print '<tr><td>'.$langs->trans('BarcodeType').'</td><td>'; + if (GETPOSTISSET('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; + 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 '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$langs->trans("BarcodeValue").'</td><td>'; $tmpcode = GETPOSTISSET('barcode') ? GETPOST('barcode') : $object->barcode; - if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); + if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) { + $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type); + } print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">'; print '</td></tr>'; } @@ -1065,10 +1174,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<input type="text" name="url" class="quatrevingtpercent" value="'.GETPOST('url').'">'; print '</td></tr>'; - if ($type != 1 && !empty($conf->stock->enabled)) - { + if ($type != 1 && !empty($conf->stock->enabled)) { // Default warehouse print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>'; + print img_picto($langs->trans("DefaultWarehouse"), 'stock', 'pictofixedwidth'); print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse'), 'fk_default_warehouse', 'warehouseopen', 1); print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit').'">'; print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span>'; @@ -1080,7 +1189,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr><td>'.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).'</td><td>'; print '<input name="seuil_stock_alerte" class="maxwidth50" value="'.GETPOST('seuil_stock_alerte').'">'; print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } // Stock desired level print '<td>'.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).'</td><td>'; print '<input name="desiredstock" class="maxwidth50" value="'.GETPOST('desiredstock').'">'; @@ -1091,16 +1202,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Duration - if ($type == 1) - { + if ($type == 1) { print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">'; print '<input name="duration_value" size="4" value="'.GETPOST('duration_value', 'int').'">'; print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOST('duration_value', 'alpha'), 0, 1); print '</td></tr>'; } - if ($type != 1) // Nature, Weight and volume only applies to products and not to services - { + if ($type != 1) { // Nature, Weight and volume only applies to products and not to services // Nature print '<tr><td>'.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).'</td><td colspan="3">'; $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); @@ -1114,8 +1223,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Brut Length - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">'; print '<input name="size" class="width50" value="'.GETPOST('size').'"> x '; print '<input name="sizewidth" class="width50" value="'.GETPOST('sizewidth').'"> x '; @@ -1123,16 +1231,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2); print '</td></tr>'; } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { // Brut Surface print '<tr><td>'.$langs->trans("Surface").'</td><td colspan="3">'; print '<input name="surface" size="4" value="'.GETPOST('surface').'">'; print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ?GETPOST('surface_units', 'alpha') : '0', 0, 2); print '</td></tr>'; } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { // Brut Volume print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="3">'; print '<input name="volume" size="4" value="'.GETPOST('volume').'">'; @@ -1140,8 +1246,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) { // Net Measure print '<tr><td>'.$langs->trans("NetMeasure").'</td><td colspan="3">'; print '<input name="net_measure" size="4" value="'.GETPOST('net_measure').'">'; @@ -1151,8 +1256,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Units - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { print '<tr><td>'.$langs->trans('DefaultUnitToShow').'</td>'; print '<td colspan="3">'; print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, 'units'); @@ -1160,8 +1264,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Custom code - if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) - { + if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) { print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.GETPOST('customcode').'"></td></tr>'; // Origin country @@ -1169,15 +1272,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<td>'; 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); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; // State - if (empty($conf->global->PRODUCT_DISABLE_STATE)) - { - if ($conf->browser->layout == 'phone') print '</tr><tr>'; - 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)) - { + if (empty($conf->global->PRODUCT_DISABLE_STATE)) { + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } + 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 '<td>'.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).'</td><td colspan="3">'; } else { print '<td>'.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).'</td><td colspan="3">'; @@ -1194,8 +1299,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } @@ -1223,8 +1327,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<hr>'; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + 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 '<table class="border centpercent">'; @@ -1264,8 +1367,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Accountancy codes print '<table class="border centpercent">'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { // Accountancy_code_sell print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<td>'; @@ -1278,8 +1380,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<td>'; if ($type == 0) { @@ -1294,8 +1395,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Accountancy_code_sell_export print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<td>'; - if ($type == 0) - { + 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); @@ -1306,17 +1406,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Accountancy_code_buy print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>'; print '<td>'; - 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') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); + 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') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<td>'; if ($type == 0) { @@ -1331,8 +1430,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Accountancy_code_buy_export print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; print '<td>'; - if ($type == 0) - { + if ($type == 0) { $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT); } else { $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT); @@ -1341,12 +1439,24 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; } 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; } - if (!empty($accountancy_code_sell_export)) { $object->accountancy_code_sell_export = $accountancy_code_sell_export; } - if (!empty($accountancy_code_buy)) { $object->accountancy_code_buy = $accountancy_code_buy; } - if (!empty($accountancy_code_buy_intra)) { $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; } - if (!empty($accountancy_code_buy_export)) { $object->accountancy_code_buy_export = $accountancy_code_buy_export; } + 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; + } + if (!empty($accountancy_code_sell_export)) { + $object->accountancy_code_sell_export = $accountancy_code_sell_export; + } + if (!empty($accountancy_code_buy)) { + $object->accountancy_code_buy = $accountancy_code_buy; + } + if (!empty($accountancy_code_buy_intra)) { + $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; + } + if (!empty($accountancy_code_buy_export)) { + $object->accountancy_code_buy_export = $accountancy_code_buy_export; + } // Accountancy_code_sell print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; @@ -1354,8 +1464,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_sell_intra" value="'.$object->accountancy_code_sell_intra.'">'; print '</td></tr>'; @@ -1372,8 +1481,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_buy_intra" value="'.$object->accountancy_code_buy_intra.'">'; print '</td></tr>'; @@ -1397,11 +1505,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</form>'; } elseif ($object->id > 0) { /* - * Product card - */ + * Product card + */ + // Fiche en mode edition - if ($action == 'edit' && $usercancreate) - { + if ($action == 'edit' && $usercancreate) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -1416,8 +1524,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // 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) - { + if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; @@ -1425,7 +1532,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $type = $langs->trans('Product'); - if ($object->isService()) $type = $langs->trans('Service'); + if ($object->isService()) { + $type = $langs->trans('Service'); + } //print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); // Main official, simple, and not duplicated code @@ -1452,8 +1561,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Status To sell print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">'; print '<select class="flat" name="statut">'; - if ($object->status) - { + if ($object->status) { print '<option value="1" selected>'.$langs->trans("OnSell").'</option>'; print '<option value="0">'.$langs->trans("NotOnSell").'</option>'; } else { @@ -1466,8 +1574,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Status To Buy print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="3">'; print '<select class="flat" name="statut_buy">'; - if ($object->status_buy) - { + if ($object->status_buy) { print '<option value="1" selected>'.$langs->trans("ProductStatusOnBuy").'</option>'; print '<option value="0">'.$langs->trans("ProductStatusNotOnBuy").'</option>'; } else { @@ -1478,36 +1585,84 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Batch number managment - if ($conf->productbatch->enabled) - { - if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">'; - $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch")); + if ($conf->productbatch->enabled) { + if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td>'; + $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial")); print $form->selectarray('status_batch', $statutarray, $object->status_batch); - print '</td></tr>'; + print '</td>'; + if ($object->status_batch !== '0') { + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes2"); + $tooltip .= $langs->trans("GenericMaskCodes3"); + $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch")); + $tooltip .= $langs->trans("GenericMaskCodes5"); + print '<td id="mask_option">'.$langs->trans("ManageLotMask").'</td>'; + if ($object->status_batch == '1' && $conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') { + $mask = !is_empty($object->batch_mask) ? $object->batch_mask : $conf->global->LOT_ADVANCED_MASK; + } + if ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced') { + $mask = !is_empty($object->batch_mask) ? $object->batch_mask : $conf->global->SN_ADVANCED_MASK; + } + $inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK; + $inherited_mask_sn = $conf->global->SN_ADVANCED_MASK; + print '<td id="field_mask">'; + print $form->textwithpicto('<input type="text" class="flat" size="24" name="batch_mask" id="batch_mask_input" value="'.$mask.'">', $tooltip, 1, 1); + print '</td>'; + + print '<script type="text/javascript"> + $(document).ready(function() { + $("#field_mask, #mask_option").addClass("hideobject"); + var preselect = $("#status_batch option:selected"); + if (preselect !== "0") { + $("#field_mask, #mask_option").toggleClass("hideobject"); + } + $("#status_batch").on("change", function () { + var optionSelected = $("option:selected", this); + var valueSelected = this.value; + $("#field_mask, #mask_option").addClass("hideobject"); + if (this.value == 1) { + $("#field_mask, #mask_option").toggleClass("hideobject"); + $("#batch_mask_input").val("'.$inherited_mask_lot.'"); + } + if (this.value == 2) { + $("#field_mask, #mask_option").toggleClass("hideobject"); + $("#batch_mask_input").val("'.$inherited_mask_sn.'"); + } + }) + }) + </script>'; + } else { + print '<td colspan="2"></td>'; + } + print '</tr>'; } } // 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 (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { + $showbarcode = 0; + } - if ($showbarcode) - { + if ($showbarcode) { print '<tr><td>'.$langs->trans('BarcodeType').'</td><td>'; if (GETPOSTISSET('fk_barcode_type')) { - $fk_barcode_type = GETPOST('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; + 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 '</td><td>'.$langs->trans("BarcodeValue").'</td><td>'; $tmpcode = GETPOSTISSET('barcode') ? GETPOST('barcode') : $object->barcode; - if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); + if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) { + $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type); + } print '<input size="40" class="maxwidthonsmartphone" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">'; print '</td></tr>'; } @@ -1528,32 +1683,30 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Stock - if ($object->isProduct() && !empty($conf->stock->enabled)) - { + if ($object->isProduct() && !empty($conf->stock->enabled)) { // Default warehouse print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>'; print $formproduct->selectWarehouses($object->fk_default_warehouse, 'fk_default_warehouse', 'warehouseopen', 1); print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].'?action=create&type='.GETPOST('type', 'int')).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span></a>'; print '</td>'; /* - print "<tr>".'<td>'.$langs->trans("StockLimit").'</td><td>'; - print '<input name="seuil_stock_alerte" size="4" value="'.$object->seuil_stock_alerte.'">'; - print '</td>'; + print "<tr>".'<td>'.$langs->trans("StockLimit").'</td><td>'; + print '<input name="seuil_stock_alerte" size="4" value="'.$object->seuil_stock_alerte.'">'; + print '</td>'; - print '<td>'.$langs->trans("DesiredStock").'</td><td>'; - print '<input name="desiredstock" size="4" value="'.$object->desiredstock.'">'; - print '</td></tr>'; - */ + print '<td>'.$langs->trans("DesiredStock").'</td><td>'; + print '<input name="desiredstock" size="4" value="'.$object->desiredstock.'">'; + print '</td></tr>'; + */ } /* - else - { - print '<input name="seuil_stock_alerte" type="hidden" value="'.$object->seuil_stock_alerte.'">'; - print '<input name="desiredstock" type="hidden" value="'.$object->desiredstock.'">'; - }*/ - - if ($object->isService()) + else { + print '<input name="seuil_stock_alerte" type="hidden" value="'.$object->seuil_stock_alerte.'">'; + print '<input name="desiredstock" type="hidden" value="'.$object->desiredstock.'">'; + }*/ + + if ($object->isService()) { // Duration print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">'; print '<input name="duration_value" size="5" value="'.$object->duration_value.'"> '; @@ -1571,8 +1724,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); print '</td></tr>'; - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { // Brut Length print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">'; print '<input name="size" size="5" value="'.$object->length.'">x'; @@ -1581,16 +1733,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2); print '</td></tr>'; } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { // Brut Surface print '<tr><td>'.$langs->trans("Surface").'</td><td colspan="3">'; print '<input name="surface" size="5" value="'.$object->surface.'"> '; print $formproduct->selectMeasuringUnits("surface_units", "surface", $object->surface_units, 0, 2); print '</td></tr>'; } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { // Brut Volume print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="3">'; print '<input name="volume" size="5" value="'.$object->volume.'"> '; @@ -1598,8 +1748,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) { // Net Measure print '<tr><td>'.$langs->trans("NetMeasure").'</td><td colspan="3">'; print '<input name="net_measure" size="5" value="'.$object->net_measure.'"> '; @@ -1608,8 +1757,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } // Units - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { print '<tr><td>'.$langs->trans('DefaultUnitToShow').'</td>'; print '<td colspan="3">'; print $form->selectUnits($object->fk_unit, 'units'); @@ -1617,22 +1765,23 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Custom code - if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) - { + if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) { print '<tr><td>'.$langs->trans("CustomCode").'</td><td><input name="customcode" class="maxwidth100onsmartphone" value="'.$object->customcode.'"></td></tr>'; // Origin country print '<td>'.$langs->trans("CountryOrigin").'</td>'; print '<td>'; 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); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; // State - if (empty($conf->global->PRODUCT_DISABLE_STATE)) - { - if ($conf->browser->layout == 'phone') print '</tr><tr>'; - 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)) - { + if (empty($conf->global->PRODUCT_DISABLE_STATE)) { + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } + 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 '<td>'.$form->editfieldkey('RegionStateOrigin', 'state_id', '', $object, 0).'</td><td colspan="3">'; } else { print '<td>'.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).'</td><td colspan="3">'; @@ -1648,14 +1797,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } // Tags-Categories - if ($conf->categorie->enabled) - { + if ($conf->categorie->enabled) { print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); $c = new Categorie($db); @@ -1671,8 +1818,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Note private - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { print '<tr><td class="tdtop">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="3">'; $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); @@ -1687,8 +1833,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<table class="border centpercent">'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { // Accountancy_code_sell print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<td>'; @@ -1696,8 +1841,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<td>'; print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1); @@ -1717,8 +1861,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<td>'; print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1); @@ -1738,8 +1881,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; print '<td><input name="accountancy_code_sell_intra" class="maxwidth200" value="'.$object->accountancy_code_sell_intra.'">'; print '</td></tr>'; @@ -1756,8 +1898,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; print '<td><input name="accountancy_code_buy_intra" class="maxwidth200" value="'.$object->accountancy_code_buy_intra.'">'; print '</td></tr>'; @@ -1781,8 +1922,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</form>'; } 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; + 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); @@ -1794,7 +1938,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $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; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -1806,9 +1952,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<table class="border tableforfield" width="100%">'; // Type - if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) - { - // TODO change for compatibility with edit in place + if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) { $typeformat = 'select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service"); print '<tr><td class="titlefield">'; print (empty($conf->global->PRODUCT_DENY_CHANGE_PRODUCT_TYPE)) ? $form->editfieldkey("Type", 'fk_product_type', $object->type, $object, $usercancreate, $typeformat) : $langs->trans('Type'); @@ -1817,26 +1961,29 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; } - if ($showbarcode) - { + if ($showbarcode) { // Barcode type print '<tr><td class="nowrap">'; print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans("BarcodeType"); print '</td>'; - if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; + if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbarcodetype&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editbarcodetype' || $action == 'editbarcode') - { + if ($action == 'editbarcodetype' || $action == 'editbarcode') { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; $formbarcode = new FormBarCode($db); } - if ($action == 'editbarcodetype') - { + + $fk_barcode_type=''; + if ($action == 'editbarcodetype') { print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type'); + $fk_barcode_type = $object->barcode_type; } else { $object->fetch_barcode(); + $fk_barcode_type = $object->barcode_type; print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : ''); } print '</td></tr>'."\n"; @@ -1846,13 +1993,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; print $langs->trans("BarcodeValue"); print '</td>'; - if (($action != 'editbarcode') && $usercancreate && $createbarcode) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; + if (($action != 'editbarcode') && $usercancreate && $createbarcode) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbarcode&amp;id='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editbarcode') - { + if ($action == 'editbarcode') { $tmpcode = GETPOSTISSET('barcode') ? GETPOST('barcode') : $object->barcode; - if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); + if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) { + $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type); + } print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -1862,7 +2012,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '&nbsp;<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; print '</form>'; } else { - print $object->barcode; + print showValueWithClipboardCPButton($object->barcode); } print '</td></tr>'."\n"; } @@ -1871,10 +2021,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancySellCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_sell)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_sell)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->accountancy_code_sell, 1); @@ -1886,15 +2034,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy sell code intra-community - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancySellIntraCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_sell_intra)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_sell_intra)) { $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $object->accountancy_code_sell_intra, 1); @@ -1910,10 +2055,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancySellExportCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_sell_export)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_sell_export)) { $accountingaccount3 = new AccountingAccount($db); $accountingaccount3->fetch('', $object->accountancy_code_sell_export, 1); @@ -1928,10 +2071,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancyBuyCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_buy)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_buy)) { $accountingaccount4 = new AccountingAccount($db); $accountingaccount4->fetch('', $object->accountancy_code_buy, 1); @@ -1943,15 +2084,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Accountancy buy code intra-community - if ($mysoc->isInEEC()) - { + if ($mysoc->isInEEC()) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancyBuyIntraCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_buy_intra)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_buy_intra)) { $accountingaccount5 = new AccountingAccount($db); $accountingaccount5->fetch('', $object->accountancy_code_buy_intra, 1); @@ -1967,10 +2105,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<tr><td class="nowrap">'; print $langs->trans("ProductAccountancyBuyExportCode"); print '</td><td colspan="2">'; - if (!empty($conf->accounting->enabled)) - { - if (!empty($object->accountancy_code_buy_export)) - { + if (!empty($conf->accounting->enabled)) { + if (!empty($object->accountancy_code_buy_export)) { $accountingaccount6 = new AccountingAccount($db); $accountingaccount6->fetch('', $object->accountancy_code_buy_export, 1); @@ -1982,17 +2118,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Batch number management (to batch) - if (!empty($conf->productbatch->enabled)) - { - if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if (!empty($conf->productbatch->enabled)) { + if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="2">'; - 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 $object->getLibStatut(0, 2); print '</td></tr>'; + if ((($object->status_batch == '1' &&$conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') + || ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced' && $conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS))) { + print '<tr><td>'.$langs->trans("ManageLotMask").'</td><td colspan="2">'; + print $object->batch_mask; + print '</td></tr>'; + } } } @@ -2005,8 +2141,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '</td></tr>'; // Default warehouse - if ($object->isProduct() && !empty($conf->stock->enabled)) - { + if ($object->isProduct() && !empty($conf->stock->enabled)) { $warehouse = new Entrepot($db); $warehouse->fetch($object->fk_default_warehouse); @@ -2037,15 +2172,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; - if ($object->isService()) - { + if ($object->isService()) { // Duration print '<tr><td class="titlefield">'.$langs->trans("Duration").'</td><td colspan="2">'.$object->duration_value.'&nbsp;'; - if ($object->duration_value > 1) - { + 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) - { + } 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]) : '')."&nbsp;"; @@ -2059,47 +2191,44 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Brut Weight print '<tr><td class="titlefield">'.$langs->trans("Weight").'</td><td colspan="2">'; - if ($object->weight != '') - { + if ($object->weight != '') { print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); } else { print '&nbsp;'; } print "</td></tr>\n"; - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { // Brut Length print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="2">'; - if ($object->length != '' || $object->width != '' || $object->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; + if ($object->width) { + print " x ".$object->width; + } + if ($object->height) { + print " x ".$object->height; + } print ' '.measuringUnitString(0, "size", $object->length_units); } else { print '&nbsp;'; } print "</td></tr>\n"; } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) { // Brut Surface print '<tr><td>'.$langs->trans("Surface").'</td><td colspan="2">'; - if ($object->surface != '') - { + if ($object->surface != '') { print $object->surface." ".measuringUnitString(0, "surface", $object->surface_units); } else { print '&nbsp;'; } print "</td></tr>\n"; } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) { // Brut Volume print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="2">'; - if ($object->volume != '') - { + if ($object->volume != '') { print $object->volume." ".measuringUnitString(0, "volume", $object->volume_units); } else { print '&nbsp;'; @@ -2107,12 +2236,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "</td></tr>\n"; } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) { // Net Measure print '<tr><td class="titlefield">'.$langs->trans("NetMeasure").'</td><td colspan="2">'; - if ($object->net_measure != '') - { + if ($object->net_measure != '') { print $object->net_measure." ".measuringUnitString($object->net_measure_units); } else { print '&nbsp;'; @@ -2121,8 +2248,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) - { + if (!empty($conf->global->PRODUCT_USE_UNITS)) { $unit = $object->getLabelOfUnit(); print '<tr><td>'.$langs->trans('DefaultUnitToShow').'</td><td>'; @@ -2133,13 +2259,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Custom code - if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) - { + if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) { print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2">'.$object->customcode.'</td>'; // Origin country code print '<tr><td>'.$langs->trans("Origin").'</td><td colspan="2">'.getCountry($object->country_id, 0, $db); - if (!empty($object->state_id)) print ' - '.getState($object->state_id, 0, $db); + if (!empty($object->state_id)) { + print ' - '.getState($object->state_id, 0, $db); + } print '</td>'; } @@ -2155,8 +2282,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Note private - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { print '<!-- show Note --> '."\n"; print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td colspan="'.(2 + (($showphoto || $showbarcode) ? 1 : 0)).'">'.(dol_textishtml($object->note_private) ? $object->note_private : dol_nl2br($object->note_private, 1, true)).'</td></tr>'."\n"; print '<!-- End show Note --> '."\n"; @@ -2170,40 +2296,37 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dol_get_fiche_end(); } - } elseif ($action != 'create') - { + } 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') -{ +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) -{ +if ($result > 0) { $modCodeProduct = new $module(); } $tmpcode = ''; -if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $object->type); +if (!empty($modCodeProduct->code_auto)) { + $tmpcode = $modCodeProduct->getNextValue($object, $object->type); +} $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 -{ + || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) { // Always output when not jmobile nor js $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 -{ + || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) { // Always output when not jmobile nor js // Define confirmation messages $formquestionclone = array( 'text' => $langs->trans("ConfirmClone"), @@ -2214,8 +2337,7 @@ if (($action == 'clone' && (empty($conf->use_javascript_ajax) || !empty($conf->d 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)) - { + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) { $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1); } @@ -2225,33 +2347,31 @@ if (($action == 'clone' && (empty($conf->use_javascript_ajax) || !empty($conf->d // 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; +if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; +} elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; +} // Print form confirm print $formconfirm; -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ -if ($action != 'create' && $action != 'edit') -{ +/* + * Action bar + */ +if ($action != 'create' && $action != 'edit') { print "\n".'<div class="tabsAction">'."\n"; $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 '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a>'; + if (empty($reshook)) { + if ($usercancreate) { + if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a>'; + } - if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) - { - if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) - { + if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) { + if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { print '<span id="action-clone" class="butAction">'.$langs->trans('ToClone').'</span>'."\n"; } else { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=clone&amp;id='.$object->id.'">'.$langs->trans("ToClone").'</a>'; @@ -2260,12 +2380,9 @@ if ($action != 'create' && $action != 'edit') } $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)) - { + 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 '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n"; } else { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&amp;token='.newToken().'&amp;id='.$object->id.'">'.$langs->trans("Delete").'</a>'; @@ -2285,23 +2402,20 @@ if ($action != 'create' && $action != 'edit') * All the "Add to" areas */ -if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == '' || $action == 'view') && $object->status) -{ +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 = ''; //print '<div class="fichecenter"><div class="fichehalfleft">'; // Propals - if (!empty($conf->propal->enabled) && $user->rights->propale->creer) - { + if (!empty($conf->propal->enabled) && $user->rights->propale->creer) { $propal = new Propal($db); $langs->load("propal"); $otherprop = $propal->liste_array(2, 1, 0); - if (is_array($otherprop) && count($otherprop)) - { + if (is_array($otherprop) && count($otherprop)) { $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftProposals").'</td><td>'; $html .= $form->selectarray("propalid", $otherprop, 0, 1); @@ -2315,15 +2429,13 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == } // Commande - if (!empty($conf->commande->enabled) && $user->rights->commande->creer) - { + if (!empty($conf->commande->enabled) && $user->rights->commande->creer) { $commande = new Commande($db); $langs->load("orders"); $othercom = $commande->liste_array(2, 1, null); - if (is_array($othercom) && count($othercom)) - { + if (is_array($othercom) && count($othercom)) { $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftOrders").'</td><td>'; $html .= $form->selectarray("commandeid", $othercom, 0, 1); @@ -2337,15 +2449,13 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == } // Factures - if (!empty($conf->facture->enabled) && $user->rights->facture->creer) - { + if (!empty($conf->facture->enabled) && $user->rights->facture->creer) { $invoice = new Facture($db); $langs->load("bills"); $otherinvoice = $invoice->liste_array(2, 1, null); - if (is_array($otherinvoice) && count($otherinvoice)) - { + if (is_array($otherinvoice) && count($otherinvoice)) { $html .= '<tr><td style="width: 200px;">'; $html .= $langs->trans("AddToDraftInvoices").'</td><td>'; $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); @@ -2359,8 +2469,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == } //If any text is going to be printed, then we show the table - if (!empty($html)) - { + if (!empty($html)) { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="addin">'; @@ -2391,11 +2500,10 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == /* - * Documents generes + * Generated documents */ -if ($action != 'create' && $action != 'edit' && $action != 'delete') -{ +if ($action != 'create' && $action != 'edit' && $action != 'delete') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 189161712d5..9b06b30765d 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -37,7 +37,7 @@ class Products extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'ref', 'label' ); @@ -165,12 +165,17 @@ class Products extends DolibarrApi * @param int $mode Use this param to filter list (0 for all, 1 for only product, 2 for only service) * @param int $category Use this param to filter list by category * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.tobuy:=:0) and (t.tosell:=:1)" + * @param bool $ids_only Return only IDs of product instead of all properties (faster, above all if list is long) * @return array Array of product objects */ - public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $sqlfilters = '') + public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $sqlfilters = '', $ids_only = false) { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->produit->lire) { + throw new RestException(403); + } + $obj_ret = array(); $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; @@ -217,12 +222,15 @@ class Products extends DolibarrApi $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); - $product_static = new Product($this->db); - if ($product_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($product_static); + if (!$ids_only) { + $product_static = new Product($this->db); + if ($product_static->fetch($obj->rowid)) { + $obj_ret[] = $this->_cleanObjectDatas($product_static); + } + } else { + $obj_ret[] = $obj->rowid; } $i++; } @@ -290,7 +298,8 @@ class Products extends DolibarrApi $oldproduct = dol_clone($this->product, 0); foreach ($request_data as $field => $value) { - if ($field == 'id') { continue; + if ($field == 'id') { + continue; } if ($field == 'stock_reel') { throw new RestException(400, 'Stock reel cannot be updated here. Use the /stockmovements endpoint instead'); @@ -309,24 +318,32 @@ class Products extends DolibarrApi if ($result > 0 && !empty($conf->global->PRODUCT_PRICE_UNIQ)) { // We update price only if it was changed $pricemodified = false; - if ($this->product->price_base_type != $oldproduct->price_base_type) { $pricemodified = true; + if ($this->product->price_base_type != $oldproduct->price_base_type) { + $pricemodified = true; } else { - if ($this->product->tva_tx != $oldproduct->tva_tx) { $pricemodified = true; + if ($this->product->tva_tx != $oldproduct->tva_tx) { + $pricemodified = true; } - if ($this->product->tva_npr != $oldproduct->tva_npr) { $pricemodified = true; + if ($this->product->tva_npr != $oldproduct->tva_npr) { + $pricemodified = true; } - if ($this->product->default_vat_code != $oldproduct->default_vat_code) { $pricemodified = true; + if ($this->product->default_vat_code != $oldproduct->default_vat_code) { + $pricemodified = true; } if ($this->product->price_base_type == 'TTC') { - if ($this->product->price_ttc != $oldproduct->price_ttc) { $pricemodified = true; + if ($this->product->price_ttc != $oldproduct->price_ttc) { + $pricemodified = true; } - if ($this->product->price_min_ttc != $oldproduct->price_min_ttc) { $pricemodified = true; + if ($this->product->price_min_ttc != $oldproduct->price_min_ttc) { + $pricemodified = true; } } else { - if ($this->product->price != $oldproduct->price) { $pricemodified = true; + if ($this->product->price != $oldproduct->price) { + $pricemodified = true; } - if ($this->product->price_min != $oldproduct->price_min) { $pricemodified = true; + if ($this->product->price_min != $oldproduct->price_min) { + $pricemodified = true; } } } @@ -557,8 +574,8 @@ class Products extends DolibarrApi /** * Get prices per customer for a product * - * @param int $id ID of product - * @param string $thirdparty_id Thirdparty id to filter orders of (example '1') {@pattern /^[0-9,]*$/i} + * @param int $id ID of product + * @param string $thirdparty_id Thirdparty id to filter orders of (example '1') {@pattern /^[0-9,]*$/i} * * @return mixed * @@ -576,6 +593,11 @@ class Products extends DolibarrApi throw new RestException(400, 'API not available: this mode of pricing is not enabled by setup'); } + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; + if ($socid > 0 && $socid != $thirdparty_id) { + throw new RestException(401, 'Getting prices for all customers or for the customer ID '.$thirdparty_id.' is not allowed for login '.DolibarrApiAccess::$user->login); + } + $result = $this->product->fetch($id); if (!$result) { throw new RestException(404, 'Product not found'); @@ -586,7 +608,9 @@ class Products extends DolibarrApi $prodcustprice = new Productcustomerprice($this->db); $filter = array(); $filter['t.fk_product'] .= $id; - if ($thirdparty_id) $filter['t.fk_soc'] .= $thirdparty_id; + if ($thirdparty_id) { + $filter['t.fk_soc'] .= $thirdparty_id; + } $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); } @@ -681,6 +705,11 @@ class Products extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; + if ($socid > 0 && $socid != $fourn_id) { + throw new RestException(401, 'Adding purchase price for the supplier ID '.$fourn_id.' is not allowed for login '.DolibarrApiAccess::$user->login); + } + $result = $this->productsupplier->add_fournisseur(DolibarrApiAccess::$user, $fourn_id, $ref_fourn, $qty); if ($result < 0) { throw new RestException(500, "Error adding supplier to product : ".$this->db->lasterror()); @@ -692,6 +721,11 @@ class Products extends DolibarrApi throw new RestException(404, 'Supplier not found'); } + // Clean data + $ref_fourn = checkVal($ref_fourn, 'alphanohtml'); + $desc_fourn = checkVal($desc_fourn, 'restricthtml'); + $barcode = checkVal($barcode, 'alphanohtml'); + $result = $this->productsupplier->update_buyprice($qty, $buyprice, DolibarrApiAccess::$user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges, $remise_percent, $remise, $newnpr, $delivery_time_days, $supplier_reputation, $localtaxes_array, $newdefaultvatcode, $multicurrency_buyprice, $multicurrency_price_base_type, $multicurrency_tx, $multicurrency_code, $desc_fourn, $barcode, $fk_barcode_type); if ($result <= 0) { @@ -755,9 +789,19 @@ class Products extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->produit->lire) { + throw new RestException(401); + } + $obj_ret = array(); + // Force id of company for external users $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; + if ($socid > 0) { + if ($supplier != $socid || empty($supplier)) { + throw new RestException(401, 'As an external user, you can request only for your supplier id = '.$socid); + } + } $sql = "SELECT t.rowid, t.ref, t.ref_ext"; $sql .= " FROM ".MAIN_DB_PREFIX."product as t"; @@ -769,12 +813,15 @@ class Products extends DolibarrApi $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; if ($supplier > 0) { - $sql .= " AND s.fk_soc = ".$this->db->escape($supplier); + $sql .= " AND s.fk_soc = ".((int) $supplier); + } + if ($socid > 0) { // if external user + $sql .= " AND s.fk_soc = ".((int) $socid); } $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_categorie = ".((int) $category); $sql .= " AND c.fk_product = t.rowid"; } if ($mode == 1) { @@ -805,8 +852,7 @@ class Products extends DolibarrApi $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $product_fourn = new ProductFournisseur($this->db); @@ -860,6 +906,8 @@ class Products extends DolibarrApi throw new RestException(403); } + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; + $result = $this->product->fetch($id, $ref, $ref_ext, $barcode); if (!$result) { throw new RestException(404, 'Product not found'); @@ -873,7 +921,7 @@ class Products extends DolibarrApi if ($result) { $product_fourn = new ProductFournisseur($this->db); - $product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0); + $product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0, ($socid > 0 ? $socid : 0)); } foreach ($product_fourn_list as $tmpobj) { @@ -893,7 +941,9 @@ class Products extends DolibarrApi * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:color)" * @return array * - * @throws RestException + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 503 * * @url GET attributes */ @@ -958,7 +1008,6 @@ class Products extends DolibarrApi * @param int $id ID of Attribute * @return array * - * @throws RestException * @throws RestException 401 * @throws RestException 404 * @@ -1002,8 +1051,8 @@ class Products extends DolibarrApi * @param string $ref Reference of Attribute * @return array * - * @throws RestException 500 * @throws RestException 401 + * @throws RestException 404 * * @url GET attributes/ref/{ref} */ @@ -1149,7 +1198,8 @@ class Products extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'rowid') { continue; + if ($field == 'rowid') { + continue; } $prodattr->$field = $value; } @@ -1253,7 +1303,10 @@ class Products extends DolibarrApi throw new RestException(401); } - $sql = "SELECT rowid, fk_product_attribute, ref, value FROM ".MAIN_DB_PREFIX."product_attribute_value WHERE ref LIKE '".trim($ref)."' AND fk_product_attribute = ".(int) $id." AND entity IN (".getEntity('product').")"; + $ref = trim($ref); + + $sql = "SELECT rowid, fk_product_attribute, ref, value FROM ".MAIN_DB_PREFIX."product_attribute_value"; + $sql .= " WHERE ref LIKE '".$this->db->escape($ref)."' AND fk_product_attribute = ".((int) $id)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -1293,7 +1346,10 @@ class Products extends DolibarrApi throw new RestException(401); } - $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').")"; + $ref = trim($ref); + + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute_value"; + $sql .= " WHERE ref LIKE '".$this->db->escape($ref)."' AND fk_product_attribute = ".((int) $id)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); if (!$query) { @@ -1364,11 +1420,13 @@ class Products extends DolibarrApi throw new RestException(401); } + $ref = trim($ref); + $return = array(); $sql = 'SELECT '; $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))."')"; + $sql .= " WHERE v.fk_product_attribute IN (SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '".$this->db->escape($ref)."')"; $resql = $this->db->query($sql); @@ -1409,7 +1467,7 @@ class Products extends DolibarrApi } $objectval = new ProductAttributeValue($this->db); - $objectval->fk_product_attribute = $id; + $objectval->fk_product_attribute = ((int) $id); $objectval->ref = $ref; $objectval->value = $value; @@ -1447,7 +1505,8 @@ class Products extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'rowid') { continue; + if ($field == 'rowid') { + continue; } $objectval->$field = $value; } @@ -1606,8 +1665,7 @@ 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, $ref_ext); - if ($result > 0) - { + if ($result > 0) { return $result; } else { throw new RestException(500, "Error creating new product variant"); @@ -1662,11 +1720,9 @@ class Products extends DolibarrApi } $prodcomb = new ProductCombination($this->db); - if (!$prodcomb->fetchByProductCombination2ValuePairs($this->product->id, $features)) - { + if (!$prodcomb->fetchByProductCombination2ValuePairs($this->product->id, $features)) { $result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact); - if ($result > 0) - { + if ($result > 0) { return $result; } else { throw new RestException(500, "Error creating new product variant"); @@ -1698,14 +1754,14 @@ class Products extends DolibarrApi $prodcomb->fetch((int) $id); foreach ($request_data as $field => $value) { - if ($field == 'rowid') { continue; + if ($field == 'rowid') { + continue; } $prodcomb->$field = $value; } $result = $prodcomb->update(DolibarrApiAccess::$user); - if ($result > 0) - { + if ($result > 0) { return 1; } throw new RestException(500, "Error editing variant"); @@ -1731,8 +1787,7 @@ class Products extends DolibarrApi $prodcomb = new ProductCombination($this->db); $prodcomb->id = (int) $id; $result = $prodcomb->delete(DolibarrApiAccess::$user); - if ($result <= 0) - { + if ($result <= 0) { throw new RestException(500, "Error deleting variant"); } return $result; @@ -1787,24 +1842,24 @@ class Products extends DolibarrApi } /** - * Get properties of a product object - * + * Get properties of 1 product object. * Return an array with product information. * - * @param int $id ID of product - * @param string $ref Ref of element - * @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 (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 + * @param int $id ID of product + * @param string $ref Ref of element + * @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 (if product is a virtual product) + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) + * @param bool $includeifobjectisused Check if product object is used and set is_object_used with result. + * @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, $includeparentid = false) + private function _fetch($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includeifobjectisused = 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'); @@ -1859,6 +1914,10 @@ class Products extends DolibarrApi } } + if ($includeifobjectisused) { + $this->product->is_object_used = ($this->product->isObjectUsed() > 0); + } + return $this->_cleanObjectDatas($this->product); } } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index eed18bbf8bd..718acef6970 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -76,57 +76,54 @@ class FormProduct { global $conf, $langs; - if (empty($fk_product) && count($this->cache_warehouses)) return 0; // Cache already loaded and we do not want a list with information specific to a product + if (empty($fk_product) && count($this->cache_warehouses)) { + return 0; // Cache already loaded and we do not want a list with information specific to a product + } - if (is_array($exclude)) $excludeGroups = implode("','", $exclude); + if (is_array($exclude)) { + $excludeGroups = implode("','", $exclude); + } $warehouseStatus = array(); - if (preg_match('/warehouseclosed/', $status)) - { + if (preg_match('/warehouseclosed/', $status)) { $warehouseStatus[] = Entrepot::STATUS_CLOSED; } - if (preg_match('/warehouseopen/', $status)) - { + if (preg_match('/warehouseopen/', $status)) { $warehouseStatus[] = Entrepot::STATUS_OPEN_ALL; } - if (preg_match('/warehouseinternal/', $status)) - { + if (preg_match('/warehouseinternal/', $status)) { $warehouseStatus[] = Entrepot::STATUS_OPEN_INTERNAL; } $sql = "SELECT e.rowid, e.ref as label, e.description, e.fk_parent"; - if (!empty($fk_product)) - { - if (!empty($batch)) - { + if (!empty($fk_product)) { + if (!empty($batch)) { $sql .= ", pb.qty as stock"; } else { $sql .= ", ps.reel as stock"; } - } elseif ($sumStock) - { + } elseif ($sumStock) { $sql .= ", sum(ps.reel) as stock"; } $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_entrepot = e.rowid"; - if (!empty($fk_product)) - { + if (!empty($fk_product)) { $sql .= " AND ps.fk_product = ".((int) $fk_product); - if (!empty($batch)) - { + if (!empty($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->sanitize($this->db->escape(implode(',', $warehouseStatus))).")"; + if (count($warehouseStatus)) { + $sql .= " AND e.statut IN (".$this->db->sanitize(implode(',', $warehouseStatus)).")"; } else { $sql .= " AND e.statut = 1"; } - if (!empty($exclude)) $sql .= ' AND e.rowid NOT IN('.$this->db->escape(implode(',', $exclude)).')'; + if (!empty($exclude)) { + $sql .= ' AND e.rowid NOT IN('.$this->db->sanitize(implode(',', $exclude)).')'; + } // minimum stock if ($stockMin !== false) { @@ -151,14 +148,14 @@ class FormProduct dol_syslog(get_class($this).'::loadWarehouses', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($sumStock) $obj->stock = price2num($obj->stock, 5); + if ($sumStock) { + $obj->stock = price2num($obj->stock, 5); + } $this->cache_warehouses[$obj->rowid]['id'] = $obj->rowid; $this->cache_warehouses[$obj->rowid]['label'] = $obj->label; $this->cache_warehouses[$obj->rowid]['parent_id'] = $obj->fk_parent; @@ -168,7 +165,7 @@ class FormProduct } // Full label init - foreach ($this->cache_warehouses as $obj_rowid=>$tab) { + foreach ($this->cache_warehouses as $obj_rowid => $tab) { $this->cache_warehouses[$obj_rowid]['full_label'] = $this->get_parent_path($tab); } @@ -190,10 +187,13 @@ class FormProduct private function get_parent_path($tab, $final_label = '') { //phpcs:enable - if (empty($final_label)) $final_label = $tab['label']; + if (empty($final_label)) { + $final_label = $tab['label']; + } - if (empty($tab['parent_id'])) return $final_label; - else { + if (empty($tab['parent_id'])) { + return $final_label; + } else { if (!empty($this->cache_warehouses[$tab['parent_id']])) { $final_label = $this->cache_warehouses[$tab['parent_id']]['label'].' >> '.$final_label; return $this->get_parent_path($this->cache_warehouses[$tab['parent_id']], $final_label); @@ -235,14 +235,17 @@ class FormProduct dol_syslog(get_class($this)."::selectWarehouses $selected, $htmlname, $filterstatus, $empty, $disabled, $fk_product, $empty_label, $showstock, $forcecombo, $morecss", LOG_DEBUG); $out = ''; - if (empty($conf->global->ENTREPOT_EXTRA_STATUS)) $filterstatus = ''; - if (!empty($fk_product)) $this->cache_warehouses = array(); + if (empty($conf->global->ENTREPOT_EXTRA_STATUS)) { + $filterstatus = ''; + } + if (!empty($fk_product)) { + $this->cache_warehouses = array(); + } $this->loadWarehouses($fk_product, '', $filterstatus, true, $exclude, $stockMin, $orderBy); $nbofwarehouses = count($this->cache_warehouses); - if ($conf->use_javascript_ajax && !$forcecombo) - { + if ($conf->use_javascript_ajax && !$forcecombo) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $comboenhancement = ajax_combobox($htmlname, $events); $out .= $comboenhancement; @@ -250,22 +253,28 @@ class FormProduct if (strpos($htmlname, 'search_') !== 0) { if (empty($user->fk_warehouse) || $user->fk_warehouse == -1) { - if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; - } - else { - if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { + $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; + } + } else { + if (($selected == '-2' || $selected == 'ifone') && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { + $selected = $user->fk_warehouse; + } } } $out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled' : '').' id="'.$htmlname.'" name="'.($htmlname.($disabled ? '_disabled' : '')).'">'; - if ($empty) $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>'; - foreach ($this->cache_warehouses as $id => $arraytypes) - { + if ($empty) { + $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>'; + } + foreach ($this->cache_warehouses as $id => $arraytypes) { $label = ''; - if ($showfullpath) $label .= $arraytypes['full_label']; - else $label .= $arraytypes['label']; - if (($fk_product || ($showstock > 0)) && ($arraytypes['stock'] != 0 || ($showstock > 0))) - { + if ($showfullpath) { + $label .= $arraytypes['full_label']; + } else { + $label .= $arraytypes['label']; + } + if (($fk_product || ($showstock > 0)) && ($arraytypes['stock'] != 0 || ($showstock > 0))) { if ($arraytypes['stock'] <= 0) { $label .= ' <span class= \'text-warning\'>('.$langs->trans("Stock").':'.$arraytypes['stock'].')</span>'; } else { @@ -274,14 +283,18 @@ class FormProduct } $out .= '<option value="'.$id.'"'; - if ($selected == $id || ($selected == 'ifone' && $nbofwarehouses == 1)) $out .= ' selected'; + if ($selected == $id || ($selected == 'ifone' && $nbofwarehouses == 1)) { + $out .= ' selected'; + } $out .= ' data-html="'.dol_escape_htmltag($label).'"'; $out .= '>'; $out .= $label; $out .= '</option>'; } $out .= '</select>'; - if ($disabled) $out .= '<input type="hidden" name="'.$htmlname.'" value="'.(($selected > 0) ? $selected : '').'">'; + if ($disabled) { + $out .= '<input type="hidden" name="'.$htmlname.'" value="'.(($selected > 0) ? $selected : '').'">'; + } $parameters = array( 'selected' => $selected, @@ -302,8 +315,11 @@ class FormProduct ); $reshook = $hookmanager->executeHooks('selectWarehouses', $parameters, $this); - if ($reshook > 0) $out = $hookmanager->resPrint; - elseif ($reshook == 0) $out .= $hookmanager->resPrint; + if ($reshook > 0) { + $out = $hookmanager->resPrint; + } elseif ($reshook == 0) { + $out .= $hookmanager->resPrint; + } return $out; } @@ -385,7 +401,9 @@ class FormProduct $filter = array(); $filter['t.active'] = 1; - if ($measuring_style) $filter['t.unit_type'] = $measuring_style; + if ($measuring_style) { + $filter['t.unit_type'] = $measuring_style; + } $result = $measuringUnits->fetchAll( '', @@ -399,24 +417,33 @@ class FormProduct return -1; } else { $return .= '<select class="flat" name="'.$name.'">'; - if ($adddefault || $adddefault === '') - { + if ($adddefault || $adddefault === '') { $return .= '<option value="0">'.($adddefault ? $langs->trans("Default") : '').'</option>'; } - foreach ($measuringUnits->records as $lines) - { + foreach ($measuringUnits->records as $lines) { $return .= '<option value="'; - if ($mode == 1) $return .= $lines->short_label; - elseif ($mode == 2) $return .= $lines->scale; - else $return .= $lines->id; + if ($mode == 1) { + $return .= $lines->short_label; + } elseif ($mode == 2) { + $return .= $lines->scale; + } else { + $return .= $lines->id; + } $return .= '"'; - if ($mode == 1 && $lines->short_label == $default) $return .= ' selected'; - elseif ($mode == 2 && $lines->scale == $default) $return .= ' selected'; - elseif ($mode == 0 && $lines->id == $default) $return .= ' selected'; + if ($mode == 1 && $lines->short_label == $default) { + $return .= ' selected'; + } elseif ($mode == 2 && $lines->scale == $default) { + $return .= ' selected'; + } elseif ($mode == 0 && $lines->id == $default) { + $return .= ' selected'; + } $return .= '>'; - if ($measuring_style == 'time') $return .= $langs->trans(ucfirst($lines->label)); - else $return .= $langs->trans($lines->label); + if ($measuring_style == 'time') { + $return .= $langs->trans(ucfirst($lines->label)); + } else { + $return .= $langs->trans($lines->label); + } $return .= '</option>'; } $return .= '</select>'; @@ -472,8 +499,11 @@ class FormProduct if (!empty($productNature->records) && is_array($productNature->records)) { foreach ($productNature->records as $lines) { $return .= '<option value="'; - if ($mode == 1) $return .= $lines->label; - else $return .= $lines->code; + if ($mode == 1) { + $return .= $lines->label; + } else { + $return .= $lines->code; + } $return .= '"'; @@ -520,42 +550,41 @@ class FormProduct $out = ''; $productIdArray = array(); - if (!is_array($objectLines) || !count($objectLines)) - { - if (!empty($fk_product)) $productIdArray[] = $fk_product; + if (!is_array($objectLines) || !count($objectLines)) { + if (!empty($fk_product)) { + $productIdArray[] = $fk_product; + } } else { foreach ($objectLines as $line) { - if ($line->fk_product) $productIdArray[] = $line->fk_product; + if ($line->fk_product) { + $productIdArray[] = $line->fk_product; + } } } $nboflot = $this->loadLotStock($productIdArray); - if ($conf->use_javascript_ajax && !$forcecombo) - { + if ($conf->use_javascript_ajax && !$forcecombo) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $comboenhancement = ajax_combobox($htmlname, $events); $out .= $comboenhancement; } $out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled' : '').' id="'.$htmlname.'" name="'.($htmlname.($disabled ? '_disabled' : '')).'">'; - if ($empty) $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>'; - if (!empty($fk_product)) - { + if ($empty) { + $out .= '<option value="-1">'.($empty_label ? $empty_label : '&nbsp;').'</option>'; + } + if (!empty($fk_product)) { $productIdArray = array($fk_product); // only show lot stock for product } else { - foreach ($this->cache_lot as $key => $value) - { + foreach ($this->cache_lot as $key => $value) { $productIdArray[] = $key; } } - foreach ($productIdArray as $productId) - { - foreach ($this->cache_lot[$productId] as $id => $arraytypes) - { - if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) - { + foreach ($productIdArray as $productId) { + foreach ($this->cache_lot[$productId] as $id => $arraytypes) { + if (empty($fk_entrepot) || $fk_entrepot == $arraytypes['entrepot_id']) { $label = $arraytypes['entrepot_label'].' - '; $label .= $arraytypes['batch']; if ($arraytypes['qty'] <= 0) { @@ -565,7 +594,9 @@ class FormProduct } $out .= '<option value="'.$id.'"'; - if ($selected == $id || ($selected == 'ifone' && $nboflot == 1)) $out .= ' selected'; + if ($selected == $id || ($selected == 'ifone' && $nboflot == 1)) { + $out .= ' selected'; + } $out .= ' data-html="'.dol_escape_htmltag($label).'"'; $out .= '>'; $out .= $label; @@ -574,7 +605,9 @@ class FormProduct } } $out .= '</select>'; - if ($disabled) $out .= '<input type="hidden" name="'.$htmlname.'" value="'.(($selected > 0) ? $selected : '').'">'; + if ($disabled) { + $out .= '<input type="hidden" name="'.$htmlname.'" value="'.(($selected > 0) ? $selected : '').'">'; + } return $out; } @@ -591,22 +624,18 @@ class FormProduct global $conf, $langs; $cacheLoaded = false; - if (empty($productIdArray)) - { + if (empty($productIdArray)) { // only Load lot stock for given products $this->cache_lot = array(); return 0; } - if (count($productIdArray) && count($this->cache_lot)) - { + if (count($productIdArray) && count($this->cache_lot)) { // check cache already loaded for product id's - foreach ($productIdArray as $productId) - { + foreach ($productIdArray as $productId) { $cacheLoaded = !empty($this->cache_lot[$productId]) ? true : false; } } - if ($cacheLoaded) - { + if ($cacheLoaded) { return count($this->cache_lot); } else { // clear cache @@ -616,20 +645,17 @@ class FormProduct $sql .= " FROM ".MAIN_DB_PREFIX."product_batch as pb"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.rowid = pb.fk_product_stock"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e on e.rowid = ps.fk_entrepot AND e.entity IN (".getEntity('stock').")"; - if (!empty($productIdList)) - { - $sql .= " WHERE ps.fk_product IN (".$productIdList.")"; + if (!empty($productIdList)) { + $sql .= " WHERE ps.fk_product IN (".$this->db->sanitize($productIdList).")"; } $sql .= " ORDER BY e.ref, pb.batch"; dol_syslog(get_class($this).'::loadLotStock', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->cache_lot[$obj->fk_product][$obj->rowid]['id'] = $obj->rowid; $this->cache_lot[$obj->fk_product][$obj->rowid]['batch'] = $obj->batch; diff --git a/htdocs/product/class/index.html b/htdocs/product/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 188bcbfd355..a1fd7a5b1dc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr> * Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com> - * Copyright (C) 2011-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2011-2021 Open-DSI <support@open-dsi.fr> * Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro> * Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2014 Ion agorria <ion@agorria.com> @@ -92,10 +92,10 @@ class Product extends CommonObject public $regeximgext = '\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.webp|\.xpm|\.xbm'; // See also into images.lib.php - /* - * @deprecated - * @see label - */ + /** + * @deprecated + * @see $label + */ public $libelle; /** @@ -227,8 +227,8 @@ class Product extends CommonObject public $desiredstock = 0; /* - * Service expiration - */ + * Service expiration + */ public $duration_value; /** @@ -264,6 +264,13 @@ class Product extends CommonObject */ public $status_batch = 0; + /** + * If allowed, we can edit batch or serial number mask for each product + * + * @var string + */ + public $batch_mask = ''; + /** * Customs code * @@ -407,15 +414,24 @@ class Product extends CommonObject */ public $supplierprices; + /** + * Property set to save result of isObjectUsed(). Used for example by Product API. + * + * @var boolean + */ + public $is_object_used; + + /** * @var array fields of object product */ public $fields = array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), 'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'), - 'barcode' =>array('type'=>'varchar(255)', 'label'=>'Barcode', 'enabled'=>'!empty($conf->barcode->enabled)', 'visible'=>-1, 'showoncombobox'=>1), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20), - 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>5), + 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15), + 'barcode' =>array('type'=>'varchar(255)', 'label'=>'Barcode', 'enabled'=>'!empty($conf->barcode->enabled)', 'position'=>20, 'visible'=>-1, 'showoncombobox'=>1), + 'fk_barcode_type' => array('type'=>'integer', 'label'=>'BarcodeType', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>-1,), 'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61), 'note' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62), 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500), @@ -424,6 +440,10 @@ class Product extends CommonObject 'fk_user_author'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'), 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), + 'localtax1_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax1tx', 'enabled'=>'1', 'position'=>150, 'notnull'=>0, 'visible'=>-1,), + 'localtax1_type' => array('type'=>'varchar(10)', 'label'=>'Localtax1type', 'enabled'=>'1', 'position'=>155, 'notnull'=>1, 'visible'=>-1,), + 'localtax2_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax2tx', 'enabled'=>'1', 'position'=>160, 'notnull'=>0, 'visible'=>-1,), + 'localtax2_type' => array('type'=>'varchar(10)', 'label'=>'Localtax2type', 'enabled'=>'1', 'position'=>165, 'notnull'=>1, 'visible'=>-1,), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), //'tosell' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), //'tobuy' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), @@ -588,8 +608,7 @@ class Product extends CommonObject if (empty($this->ref) || $this->ref == 'auto') { // Load object modCodeProduct $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); - if ($module != 'mod_codeproduct_leopard') // Do not load module file for leopard - { + if ($module != 'mod_codeproduct_leopard') { // Do not load module file for leopard if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } @@ -648,15 +667,18 @@ class Product extends CommonObject $sql .= ", price_base_type"; $sql .= ", tobuy"; $sql .= ", tosell"; - $sql .= ", accountancy_code_buy"; - $sql .= ", accountancy_code_buy_intra"; - $sql .= ", accountancy_code_buy_export"; - $sql .= ", accountancy_code_sell"; - $sql .= ", accountancy_code_sell_intra"; - $sql .= ", accountancy_code_sell_export"; + if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= ", accountancy_code_buy"; + $sql .= ", accountancy_code_buy_intra"; + $sql .= ", accountancy_code_buy_export"; + $sql .= ", accountancy_code_sell"; + $sql .= ", accountancy_code_sell_intra"; + $sql .= ", accountancy_code_sell_export"; + } $sql .= ", canvas"; $sql .= ", finished"; $sql .= ", tobatch"; + $sql .= ", batch_mask"; $sql .= ", fk_unit"; $sql .= ") VALUES ("; $sql .= "'".$this->db->idate($now)."'"; @@ -673,15 +695,18 @@ class Product extends CommonObject $sql .= ", '".$this->db->escape($this->price_base_type)."'"; $sql .= ", ".$this->status; $sql .= ", ".$this->status_buy; - $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; - $sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'"; - $sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'"; - $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; - $sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'"; - $sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'"; + if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy_intra)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy_export)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell_intra)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell_export)."'"; + } $sql .= ", '".$this->db->escape($this->canvas)."'"; $sql .= ", ".((!isset($this->finished) || $this->finished < 0 || $this->finished == '') ? 'null' : (int) $this->finished); $sql .= ", ".((empty($this->status_batch) || $this->status_batch < 0) ? '0' : $this->status_batch); + $sql .= ", '".$this->db->escape($this->batch_mask)."'"; $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); $sql .= ")"; @@ -706,6 +731,34 @@ class Product extends CommonObject $error++; $this->error = $this->db->lasterror(); } + + // update accountancy for this entity + if (!$error && !empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity ("; + $sql .= " fk_product"; + $sql .= ", entity"; + $sql .= ", accountancy_code_buy"; + $sql .= ", accountancy_code_buy_intra"; + $sql .= ", accountancy_code_buy_export"; + $sql .= ", accountancy_code_sell"; + $sql .= ", accountancy_code_sell_intra"; + $sql .= ", accountancy_code_sell_export"; + $sql .= ") VALUES ("; + $sql .= $this->id; + $sql .= ", " . $conf->entity; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'"; + $sql .= ")"; + $result = $this->db->query($sql); + if (!$result) { + $error++; + $this->error = 'ErrorFailedToInsertAccountancyForEntity'; + } + } } else { $error++; $this->error = 'ErrorFailedToGetInsertedId'; @@ -728,7 +781,8 @@ class Product extends CommonObject if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PRODUCT_CREATE', $user); - if ($result < 0) { $error++; + if ($result < 0) { + $error++; } // End call triggers } @@ -802,10 +856,10 @@ class Product extends CommonObject $module = strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM); $dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) { break; + if ($res) { + break; } } @@ -947,16 +1001,16 @@ class Product extends CommonObject if ($this->hasbatch() && !$this->oldcopy->hasbatch()) { //$valueforundefinedlot = 'Undefined'; // In previous version, 39 and lower $valueforundefinedlot = '000000'; - if (!empty($conf->global->STOCK_DEFAULT_BATCH)) $valueforundefinedlot = $conf->global->STOCK_DEFAULT_BATCH; + if (!empty($conf->global->STOCK_DEFAULT_BATCH)) { + $valueforundefinedlot = $conf->global->STOCK_DEFAULT_BATCH; + } dol_syslog("Flag batch of product id=".$this->id." is set to ON, so we will create missing records into product_batch"); $this->load_stock(); - foreach ($this->stock_warehouse as $idW => $ObjW) // For each warehouse where we have stocks defined for this product (for each lines in product_stock) - { + foreach ($this->stock_warehouse as $idW => $ObjW) { // For each warehouse where we have stocks defined for this product (for each lines in product_stock) $qty_batch = 0; - foreach ($ObjW->detail_batch as $detail) // Each lines of detail in product_batch of the current $ObjW = product_stock - { + foreach ($ObjW->detail_batch as $detail) { // Each lines of detail in product_batch of the current $ObjW = product_stock if ($detail->batch == $valueforundefinedlot || $detail->batch == 'Undefined') { // We discard this line, we will create it later $sqlclean = "DELETE FROM ".MAIN_DB_PREFIX."product_batch WHERE batch in('Undefined', '".$this->db->escape($valueforundefinedlot)."') AND fk_product_stock = ".$ObjW->id; @@ -987,7 +1041,8 @@ class Product extends CommonObject } // For automatic creation - if ($this->barcode == -1) { $this->barcode = $this->get_barcode($this, $this->barcode_type_code); + if ($this->barcode == -1) { + $this->barcode = $this->get_barcode($this, $this->barcode_type_code); } $sql = "UPDATE ".MAIN_DB_PREFIX."product"; @@ -1013,6 +1068,8 @@ class Product extends CommonObject $sql .= ", tosell = ".(int) $this->status; $sql .= ", tobuy = ".(int) $this->status_buy; $sql .= ", tobatch = ".((empty($this->status_batch) || $this->status_batch < 0) ? '0' : (int) $this->status_batch); + $sql .= ", batch_mask = '".$this->db->escape($this->batch_mask)."'"; + $sql .= ", finished = ".((!isset($this->finished) || $this->finished < 0 || $this->finished == '') ? "null" : (int) $this->finished); $sql .= ", net_measure = ".($this->net_measure != '' ? "'".$this->db->escape($this->net_measure)."'" : 'null'); $sql .= ", net_measure_units = ".($this->net_measure_units != '' ? "'".$this->db->escape($this->net_measure_units)."'" : 'null'); @@ -1037,12 +1094,14 @@ class Product extends CommonObject $sql .= ", fk_state = ".($this->state_id > 0 ? (int) $this->state_id : 'null'); $sql .= ", note = ".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : 'null'); $sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'"; - $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; - $sql .= ", accountancy_code_buy_intra = '".$this->db->escape($this->accountancy_code_buy_intra)."'"; - $sql .= ", accountancy_code_buy_export = '".$this->db->escape($this->accountancy_code_buy_export)."'"; - $sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'"; - $sql .= ", accountancy_code_sell_intra= '".$this->db->escape($this->accountancy_code_sell_intra)."'"; - $sql .= ", accountancy_code_sell_export= '".$this->db->escape($this->accountancy_code_sell_export)."'"; + if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'"; + $sql .= ", accountancy_code_buy_intra = '" . $this->db->escape($this->accountancy_code_buy_intra) . "'"; + $sql .= ", accountancy_code_buy_export = '" . $this->db->escape($this->accountancy_code_buy_export) . "'"; + $sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra) . "'"; + $sql .= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export) . "'"; + } $sql .= ", desiredstock = ".((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? (float) $this->desiredstock : "null"); $sql .= ", cost_price = ".($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null'); $sql .= ", fk_unit= ".(!$this->fk_unit ? 'NULL' : (int) $this->fk_unit); @@ -1051,7 +1110,7 @@ class Product extends CommonObject $sql .= ", fk_user_modif = ".($user->id > 0 ? $user->id : 'NULL'); // stock field is not here because it is a denormalized value from product_stock. - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::update", LOG_DEBUG); @@ -1069,6 +1128,36 @@ class Product extends CommonObject $action = 'update'; + // update accountancy for this entity + if (!$error && !empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $this->db->query("DELETE FROM " . MAIN_DB_PREFIX . "product_perentity WHERE fk_product = " . $this->id . " AND entity = " . $conf->entity); + + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity ("; + $sql .= " fk_product"; + $sql .= ", entity"; + $sql .= ", accountancy_code_buy"; + $sql .= ", accountancy_code_buy_intra"; + $sql .= ", accountancy_code_buy_export"; + $sql .= ", accountancy_code_sell"; + $sql .= ", accountancy_code_sell_intra"; + $sql .= ", accountancy_code_sell_export"; + $sql .= ") VALUES ("; + $sql .= $this->id; + $sql .= ", " . $conf->entity; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_intra) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_buy_export) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell_intra) . "'"; + $sql .= ", '" . $this->db->escape($this->accountancy_code_sell_export) . "'"; + $sql .= ")"; + $result = $this->db->query($sql); + if (!$result) { + $error++; + $this->error = 'ErrorFailedToUpdateAccountancyForEntity'; + } + } + // Actions on extra fields if (!$error) { $result = $this->insertExtraFields(); @@ -1201,8 +1290,7 @@ class Product extends CommonObject // Delete all child tables if (!$error) { $elements = array('product_fournisseur_price', 'product_price', 'product_lang', 'categorie_product', 'product_stock', 'product_customer_price', 'product_lot'); // product_batch is done before - foreach ($elements as $table) - { + foreach ($elements as $table) { if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE fk_product = ".(int) $this->id; @@ -1287,8 +1375,7 @@ class Product extends CommonObject $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1314,8 +1401,7 @@ class Product extends CommonObject $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 0, 2); $current_lang = $langs->getDefaultLang(); - foreach ($langs_available as $key => $value) - { + foreach ($langs_available as $key => $value) { if ($key == $current_lang) { $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; @@ -1324,18 +1410,19 @@ class Product extends CommonObject $result = $this->db->query($sql); - if ($this->db->num_rows($result)) // if there is already a description line for this language - { + if ($this->db->num_rows($result)) { // if there is already a description line for this language $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_lang"; $sql2 .= " SET "; $sql2 .= " label='".$this->db->escape($this->label)."',"; $sql2 .= " description='".$this->db->escape($this->description)."'"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", note='".$this->db->escape($this->other)."'"; + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { + $sql2 .= ", note='".$this->db->escape($this->other)."'"; } $sql2 .= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", note"; + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { + $sql2 .= ", note"; } $sql2 .= ")"; $sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',"; @@ -1351,6 +1438,11 @@ class Product extends CommonObject return -1; } } elseif (isset($this->multilangs[$key])) { + if (empty($this->multilangs["$key"]["label"])) { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")); + return -1; + } + $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$this->id; @@ -1358,8 +1450,7 @@ class Product extends CommonObject $result = $this->db->query($sql); - if ($this->db->num_rows($result)) // if there is already a description line for this language - { + if ($this->db->num_rows($result)) { // if there is already a description line for this language $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_lang"; $sql2 .= " SET "; $sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; @@ -1370,7 +1461,8 @@ class Product extends CommonObject $sql2 .= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", note"; + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { + $sql2 .= ", note"; } $sql2 .= ")"; $sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',"; @@ -1478,7 +1570,9 @@ class Product extends CommonObject if ($resql) { // Call trigger $result = $this->call_trigger('PRODUCT_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers if ($error) { @@ -1514,11 +1608,9 @@ class Product extends CommonObject $result = $this->db->query($sql); if ($result) { - while ($obj = $this->db->fetch_object($result)) - { + while ($obj = $this->db->fetch_object($result)) { //print 'lang='.$obj->lang.' current='.$current_lang.'<br>'; - if ($obj->lang == $current_lang) // si on a les traduct. dans la langue courante on les charge en infos principales. - { + 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->other = $obj->other; @@ -1587,11 +1679,11 @@ class Product extends CommonObject { // phpcs:enable $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty"; - $sql .= " WHERE fk_product_price=".$rowid; + $sql .= " WHERE fk_product_price=".((int) $rowid); $resql = $this->db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price"; - $sql .= " WHERE rowid=".$rowid; + $sql .= " WHERE rowid=".((int) $rowid); $resql = $this->db->query($sql); if ($resql) { return 1; @@ -1618,7 +1710,9 @@ class Product extends CommonObject // Update if prices fields are defined $tva_tx = get_default_tva($thirdparty_seller, $thirdparty_buyer, $this->id); $tva_npr = get_default_npr($thirdparty_seller, $thirdparty_buyer, $this->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $pu_ht = $this->price; $pu_ttc = $this->price_ttc; @@ -1631,11 +1725,16 @@ class Product extends CommonObject $pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level]; $price_min = $this->multiprices_min[$thirdparty_buyer->price_level]; $price_base_type = $this->multiprices_base_type[$thirdparty_buyer->price_level]; - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility - { - if (isset($this->multiprices_tva_tx[$thirdparty_buyer->price_level])) $tva_tx = $this->multiprices_tva_tx[$thirdparty_buyer->price_level]; - if (isset($this->multiprices_recuperableonly[$thirdparty_buyer->price_level])) $tva_npr = $this->multiprices_recuperableonly[$thirdparty_buyer->price_level]; - if (empty($tva_tx)) $tva_npr = 0; + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility + if (isset($this->multiprices_tva_tx[$thirdparty_buyer->price_level])) { + $tva_tx = $this->multiprices_tva_tx[$thirdparty_buyer->price_level]; + } + if (isset($this->multiprices_recuperableonly[$thirdparty_buyer->price_level])) { + $tva_npr = $this->multiprices_recuperableonly[$thirdparty_buyer->price_level]; + } + if (empty($tva_tx)) { + $tva_npr = 0; + } } } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // If price per customer @@ -1653,9 +1752,13 @@ class Product extends CommonObject $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = $prodcustprice->lines[0]->tva_tx; - if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } $tva_npr = $prodcustprice->lines[0]->recuperableonly; - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } } } } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) { @@ -1664,10 +1767,11 @@ class Product extends CommonObject // yes, this product has some prices per quantity // Search price into product_price_by_qty from $this->id foreach ($this->prices_by_qty_list[0] as $priceforthequantityarray) { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -1680,12 +1784,12 @@ class Product extends CommonObject if ($this->prices_by_qty[$thirdparty_buyer->price_level]) { // yes, this product has some prices per quantity // Search price into product_price_by_qty from $this->id - foreach ($this->prices_by_qty_list[$thirdparty_buyer->price_level] as $priceforthequantityarray) - { - if ($priceforthequantityarray['rowid'] != $pqp) continue; + foreach ($this->prices_by_qty_list[$thirdparty_buyer->price_level] as $priceforthequantityarray) { + if ($priceforthequantityarray['rowid'] != $pqp) { + continue; + } // We found the price - if ($priceforthequantityarray['price_base_type'] == 'HT') - { + if ($priceforthequantityarray['price_base_type'] == 'HT') { $pu_ht = $priceforthequantityarray['unitprice']; } else { $pu_ttc = $priceforthequantityarray['unitprice']; @@ -1723,10 +1827,13 @@ class Product extends CommonObject $sql .= " pfp.fk_product, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_soc, pfp.tva_tx, pfp.fk_supplier_price_expression,"; $sql .= " pfp.default_vat_code,"; $sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", pfp.packaging"; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $sql .= ", pfp.packaging"; + } $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; - $sql .= " WHERE pfp.rowid = ".$prodfournprice; - if ($qty > 0) { $sql .= " AND pfp.quantity <= ".$qty; + $sql .= " WHERE pfp.rowid = ".((int) $prodfournprice); + if ($qty > 0) { + $sql .= " AND pfp.quantity <= ".((float) $qty); } $sql .= " ORDER BY pfp.quantity DESC"; @@ -1734,8 +1841,7 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj && $obj->quantity > 0) // If we found a supplier prices from the id of supplier price - { + if ($obj && $obj->quantity > 0) { // If we found a supplier prices from the id of supplier price if (!empty($conf->dynamicprices->enabled) && !empty($obj->fk_supplier_price_expression)) { include_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $prod_supplier = new ProductFournisseur($this->db); @@ -1766,7 +1872,9 @@ class Product extends CommonObject $this->fourn_multicurrency_tx = $obj->multicurrency_tx; $this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_code = $obj->multicurrency_code; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $this->packaging = $obj->packaging; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $this->packaging = $obj->packaging; + } $result = $obj->fk_product; return $result; } else { // If not found @@ -1777,12 +1885,15 @@ class Product extends CommonObject $sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code,"; $sql .= " pfp.packaging"; $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; - $sql .= " WHERE pfp.fk_product = ".$product_id; - if ($fourn_ref != 'none') { $sql .= " AND pfp.ref_fourn = '".$this->db->escape($fourn_ref)."'"; + $sql .= " WHERE pfp.fk_product = ".((int) $product_id); + if ($fourn_ref != 'none') { + $sql .= " AND pfp.ref_fourn = '".$this->db->escape($fourn_ref)."'"; } - if ($fk_soc > 0) { $sql .= " AND pfp.fk_soc = ".$fk_soc; + if ($fk_soc > 0) { + $sql .= " AND pfp.fk_soc = ".((int) $fk_soc); } - if ($qty > 0) { $sql .= " AND pfp.quantity <= ".$qty; + if ($qty > 0) { + $sql .= " AND pfp.quantity <= ".((float) $qty); } $sql .= " ORDER BY pfp.quantity DESC"; $sql .= " LIMIT 1"; @@ -1791,8 +1902,7 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj && $obj->quantity > 0) // If found - { + if ($obj && $obj->quantity > 0) { // If found if (!empty($conf->dynamicprices->enabled) && !empty($obj->fk_supplier_price_expression)) { include_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $prod_supplier = new ProductFournisseur($this->db); @@ -1824,7 +1934,9 @@ class Product extends CommonObject $this->fourn_multicurrency_tx = $obj->multicurrency_tx; $this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_code = $obj->multicurrency_code; - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $this->packaging = $obj->packaging; + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + $this->packaging = $obj->packaging; + } $result = $obj->fk_product; return $result; } else { @@ -1963,7 +2075,7 @@ class Product extends CommonObject $sql .= " default_vat_code=".($newdefaultvatcode ? "'".$this->db->escape($newdefaultvatcode)."'" : "null").","; $sql .= " tva_tx='".price2num($newvat)."',"; $sql .= " recuperableonly='".$this->db->escape($newnpr)."'"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::update_price", LOG_DEBUG); $resql = $this->db->query($sql); @@ -2059,26 +2171,32 @@ class Product extends CommonObject return -1; } - $sql = "SELECT rowid, ref, ref_ext, label, description, url, note_public, note as note_private, customcode, fk_country, fk_state, price, price_ttc,"; - $sql .= " price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell,"; - $sql .= " tobuy, fk_product_type, duration, fk_default_warehouse, seuil_stock_alerte, canvas, net_measure, net_measure_units, weight, weight_units,"; - $sql .= " length, length_units, width, width_units, height, height_units,"; - $sql .= " surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished,"; - $sql .= " accountancy_code_buy, accountancy_code_buy_intra, accountancy_code_buy_export,"; - $sql .= " accountancy_code_sell, accountancy_code_sell_intra, accountancy_code_sell_export, stock, pmp,"; - $sql .= " datec, tms, import_key, entity, desiredstock, tobatch, fk_unit,"; - $sql .= " fk_price_expression, price_autogen, model_pdf"; - $sql .= " FROM ".MAIN_DB_PREFIX."product"; - if ($id) { - $sql .= " WHERE rowid = ".(int) $id; + $sql = "SELECT p.rowid, p.ref, p.ref_ext, p.label, p.description, p.url, p.note_public, p.note as note_private, p.customcode, p.fk_country, p.fk_state, p.price, p.price_ttc,"; + $sql .= " p.price_min, p.price_min_ttc, p.price_base_type, p.cost_price, p.default_vat_code, p.tva_tx, p.recuperableonly as tva_npr, p.localtax1_tx, p.localtax2_tx, p.localtax1_type, p.localtax2_type, p.tosell,"; + $sql .= " p.tobuy, p.fk_product_type, p.duration, p.fk_default_warehouse, p.seuil_stock_alerte, p.canvas, p.net_measure, p.net_measure_units, p.weight, p.weight_units,"; + $sql .= " p.length, p.length_units, p.width, p.width_units, p.height, p.height_units,"; + $sql .= " p.surface, p.surface_units, p.volume, p.volume_units, p.barcode, p.fk_barcode_type, p.finished,"; + if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; } else { - $sql .= " WHERE entity IN (".getEntity($this->element).")"; + $sql .= " pa.accountancy_code_buy, pa.accountancy_code_buy_intra, pa.accountancy_code_buy_export, pa.accountancy_code_sell, pa.accountancy_code_sell_intra, pa.accountancy_code_sell_export,"; + } + $sql .= " p.stock,p.pmp, p.datec, p.tms, p.import_key, p.entity, p.desiredstock, p.tobatch, p.batch_mask, p.fk_unit,"; + $sql .= " p.fk_price_expression, p.price_autogen, p.model_pdf"; + $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; + if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); + } + if ($id) { + $sql .= " WHERE p.rowid = ".((int) $id); + } else { + $sql .= " WHERE p.entity IN (".getEntity($this->element).")"; if ($ref) { - $sql .= " AND ref = '".$this->db->escape($ref)."'"; + $sql .= " AND p.ref = '".$this->db->escape($ref)."'"; } elseif ($ref_ext) { - $sql .= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; + $sql .= " AND p.ref_ext = '".$this->db->escape($ref_ext)."'"; } elseif ($barcode) { - $sql .= " AND barcode = '".$this->db->escape($barcode)."'"; + $sql .= " AND p.barcode = '".$this->db->escape($barcode)."'"; } } @@ -2103,6 +2221,7 @@ class Product extends CommonObject $this->status = $obj->tosell; $this->status_buy = $obj->tobuy; $this->status_batch = $obj->tobatch; + $this->batch_mask = $obj->batch_mask; $this->customcode = $obj->customcode; $this->country_id = $obj->fk_country; @@ -2184,10 +2303,8 @@ class Product extends CommonObject } // Load multiprices array - if (!empty($conf->global->PRODUIT_MULTIPRICES) && empty($ignore_price_load)) // prices per segment - { - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES) && empty($ignore_price_load)) { // prices per segment + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid, recuperableonly"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price"; @@ -2211,53 +2328,51 @@ class Product extends CommonObject // Price by quantity /* - $this->prices_by_qty[$i]=$result["price_by_qty"]; - $this->prices_by_qty_id[$i]=$result["rowid"]; - // Récuperation de la liste des prix selon qty si flag positionné - if ($this->prices_by_qty[$i] == 1) - { - $sql = "SELECT rowid, price, unitprice, quantity, remise_percent, remise, price_base_type"; - $sql.= " FROM ".MAIN_DB_PREFIX."product_price_by_qty"; - $sql.= " WHERE fk_product_price = ".$this->prices_by_qty_id[$i]; - $sql.= " ORDER BY quantity ASC"; - $resultat=array(); - $resql = $this->db->query($sql); - if ($resql) - { - $ii=0; - while ($result= $this->db->fetch_array($resql)) { - $resultat[$ii]=array(); - $resultat[$ii]["rowid"]=$result["rowid"]; - $resultat[$ii]["price"]= $result["price"]; - $resultat[$ii]["unitprice"]= $result["unitprice"]; - $resultat[$ii]["quantity"]= $result["quantity"]; - $resultat[$ii]["remise_percent"]= $result["remise_percent"]; - $resultat[$ii]["remise"]= $result["remise"]; // deprecated - $resultat[$ii]["price_base_type"]= $result["price_base_type"]; - $ii++; - } - $this->prices_by_qty_list[$i]=$resultat; - } - else - { - dol_print_error($this->db); - return -1; - } - }*/ + $this->prices_by_qty[$i]=$result["price_by_qty"]; + $this->prices_by_qty_id[$i]=$result["rowid"]; + // Récuperation de la liste des prix selon qty si flag positionné + if ($this->prices_by_qty[$i] == 1) + { + $sql = "SELECT rowid, price, unitprice, quantity, remise_percent, remise, price_base_type"; + $sql.= " FROM ".MAIN_DB_PREFIX."product_price_by_qty"; + $sql.= " WHERE fk_product_price = ".$this->prices_by_qty_id[$i]; + $sql.= " ORDER BY quantity ASC"; + $resultat=array(); + $resql = $this->db->query($sql); + if ($resql) + { + $ii=0; + while ($result= $this->db->fetch_array($resql)) { + $resultat[$ii]=array(); + $resultat[$ii]["rowid"]=$result["rowid"]; + $resultat[$ii]["price"]= $result["price"]; + $resultat[$ii]["unitprice"]= $result["unitprice"]; + $resultat[$ii]["quantity"]= $result["quantity"]; + $resultat[$ii]["remise_percent"]= $result["remise_percent"]; + $resultat[$ii]["remise"]= $result["remise"]; // deprecated + $resultat[$ii]["price_base_type"]= $result["price_base_type"]; + $ii++; + } + $this->prices_by_qty_list[$i]=$resultat; + } + else + { + dol_print_error($this->db); + return -1; + } + }*/ } else { $this->error = $this->db->lasterror; return -1; } } - } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && empty($ignore_price_load)) // prices per customers - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && empty($ignore_price_load)) { // prices per customers // Nothing loaded by default. List may be very long. - } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) && empty($ignore_price_load)) // prices per quantity - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) && empty($ignore_price_load)) { // prices per quantity $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price"; - $sql .= " WHERE fk_product = ".$this->id; + $sql .= " WHERE fk_product = ".((int) $this->id); $sql .= " ORDER BY date_price DESC, rowid DESC"; $sql .= " LIMIT 1"; $resql = $this->db->query($sql); @@ -2271,7 +2386,7 @@ class Product extends CommonObject if ($this->prices_by_qty[0] == 1) { $sql = "SELECT rowid,price, unitprice, quantity, remise_percent, remise, remise, price_base_type"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price_by_qty"; - $sql .= " WHERE fk_product_price = ".$this->prices_by_qty_id[0]; + $sql .= " WHERE fk_product_price = ".((int) $this->prices_by_qty_id[0]); $sql .= " ORDER BY quantity ASC"; $resultat = array(); $resql = $this->db->query($sql); @@ -2298,10 +2413,8 @@ class Product extends CommonObject $this->error = $this->db->lasterror; return -1; } - } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES) && empty($ignore_price_load)) // prices per customer and quantity - { - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES) && empty($ignore_price_load)) { // prices per customer and quantity + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid, recuperableonly"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price"; @@ -2439,7 +2552,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsCustomerMO', $parameters, $this, $action); - if ($reshook > 0) $this->stats_mo = $hookmanager->resArray['stats_mo']; + if ($reshook > 0) { + $this->stats_mo = $hookmanager->resArray['stats_mo']; + } return 1; } @@ -2506,7 +2621,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsCustomerMO', $parameters, $this, $action); - if ($reshook > 0) $this->stats_bom = $hookmanager->resArray['stats_bom']; + if ($reshook > 0) { + $this->stats_bom = $hookmanager->resArray['stats_bom']; + } return 1; } @@ -2574,7 +2691,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsCustomerProposal', $parameters, $this, $action); - if ($reshook > 0) $this->stats_propale = $hookmanager->resArray['stats_propale']; + if ($reshook > 0) { + $this->stats_propale = $hookmanager->resArray['stats_propale']; + } return 1; } else { @@ -2626,7 +2745,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsSupplierProposal', $parameters, $this, $action); - if ($reshook > 0) $this->stats_proposal_supplier = $hookmanager->resArray['stats_proposal_supplier']; + if ($reshook > 0) { + $this->stats_proposal_supplier = $hookmanager->resArray['stats_proposal_supplier']; + } return 1; } else { @@ -2711,7 +2832,7 @@ class Product extends CommonObject $sql .= " JOIN ".MAIN_DB_PREFIX."facture f ON fd.fk_facture = f.rowid "; $sql .= " JOIN ".MAIN_DB_PREFIX."element_element el ON el.fk_target = f.rowid and el.targettype = 'facture' and sourcetype = 'commande'"; $sql .= " JOIN ".MAIN_DB_PREFIX."commande c ON el.fk_source = c.rowid "; - $sql .= " WHERE c.fk_statut IN (".$filtrestatut.") AND c.facture = 0 AND fd.fk_product = ".$this->id; + $sql .= " WHERE c.fk_statut IN (".$this->db->sanitize($filtrestatut).") AND c.facture = 0 AND fd.fk_product = ".((int) $this->id); dol_syslog(__METHOD__.":: sql $sql", LOG_NOTICE); $resql = $this->db->query($sql); @@ -2728,7 +2849,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid, 'filtrestatut' => $filtrestatut, 'forVirtualStock' => $forVirtualStock); $reshook = $hookmanager->executeHooks('loadStatsCustomerOrder', $parameters, $this, $action); - if ($reshook > 0) $this->stats_commande = $hookmanager->resArray['stats_commande']; + if ($reshook > 0) { + $this->stats_commande = $hookmanager->resArray['stats_commande']; + } return 1; } else { $this->error = $this->db->error(); @@ -2782,7 +2905,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid, 'filtrestatut' => $filtrestatut, 'forVirtualStock' => $forVirtualStock); $reshook = $hookmanager->executeHooks('loadStatsSupplierOrder', $parameters, $this, $action); - if ($reshook > 0) $this->stats_commande_fournisseur = $hookmanager->resArray['stats_commande_fournisseur']; + if ($reshook > 0) { + $this->stats_commande_fournisseur = $hookmanager->resArray['stats_commande_fournisseur']; + } return 1; } else { @@ -2831,7 +2956,9 @@ class Product extends CommonObject if ($filtrestatut <> '') { $sql .= " AND c.fk_statut IN (".$this->db->sanitize($filtrestatut).")"; } - if (!empty($filterShipmentStatus)) $sql .= " AND e.fk_statut IN (".$this->db->sanitize($filterShipmentStatus).")"; + if (!empty($filterShipmentStatus)) { + $sql .= " AND e.fk_statut IN (".$this->db->sanitize($filterShipmentStatus).")"; + } $result = $this->db->query($sql); if ($result) { @@ -2864,7 +2991,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid, 'filtrestatut' => $filtrestatut, 'forVirtualStock' => $forVirtualStock, 'filterShipmentStatus' => $filterShipmentStatus); $reshook = $hookmanager->executeHooks('loadStatsSending', $parameters, $this, $action); - if ($reshook > 0) $this->stats_expedition = $hookmanager->resArray['stats_expedition']; + if ($reshook > 0) { + $this->stats_expedition = $hookmanager->resArray['stats_expedition']; + } return 1; } else { @@ -2919,7 +3048,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid, 'filtrestatut' => $filtrestatut, 'forVirtualStock' => $forVirtualStock); $reshook = $hookmanager->executeHooks('loadStatsReception', $parameters, $this, $action); - if ($reshook > 0) $this->stats_reception = $hookmanager->resArray['stats_reception']; + if ($reshook > 0) { + $this->stats_reception = $hookmanager->resArray['stats_reception']; + } return 1; } else { @@ -3003,12 +3134,18 @@ class Product extends CommonObject } // Clean data - if ($this->stats_mrptoconsume['qty'] < 0) $this->stats_mrptoconsume['qty'] = 0; - if ($this->stats_mrptoproduce['qty'] < 0) $this->stats_mrptoproduce['qty'] = 0; + if ($this->stats_mrptoconsume['qty'] < 0) { + $this->stats_mrptoconsume['qty'] = 0; + } + if ($this->stats_mrptoproduce['qty'] < 0) { + $this->stats_mrptoproduce['qty'] = 0; + } $parameters = array('socid' => $socid, 'filtrestatut' => $filtrestatut, 'forVirtualStock' => $forVirtualStock); $reshook = $hookmanager->executeHooks('loadStatsInProduction', $parameters, $this, $action); - if ($reshook > 0) $this->stats_mrptoproduce = $hookmanager->resArray['stats_mrptoproduce']; + if ($reshook > 0) { + $this->stats_mrptoproduce = $hookmanager->resArray['stats_mrptoproduce']; + } return 1; } else { @@ -3080,7 +3217,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsContract', $parameters, $this, $action); - if ($reshook > 0) $this->stats_contrat = $hookmanager->resArray['stats_contrat']; + if ($reshook > 0) { + $this->stats_contrat = $hookmanager->resArray['stats_contrat']; + } return 1; } else { @@ -3152,7 +3291,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsCustomerInvoice', $parameters, $this, $action); - if ($reshook > 0) $this->stats_facture = $hookmanager->resArray['stats_facture']; + if ($reshook > 0) { + $this->stats_facture = $hookmanager->resArray['stats_facture']; + } return 1; } else { @@ -3203,7 +3344,9 @@ class Product extends CommonObject $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsSupplierInvoice', $parameters, $this, $action); - if ($reshook > 0) $this->stats_facture_fournisseur = $hookmanager->resArray['stats_facture_fournisseur']; + if ($reshook > 0) { + $this->stats_facture_fournisseur = $hookmanager->resArray['stats_facture_fournisseur']; + } return 1; } else { @@ -3230,8 +3373,7 @@ class Product extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $arr = $this->db->fetch_array($resql); $keyfortab = (string) $arr[1]; if ($year == -1) { @@ -3262,8 +3404,7 @@ class Product extends CommonObject $result = array(); - for ($j = 0; $j < 12; $j++) - { + for ($j = 0; $j < 12; $j++) { // $ids is 'D', 'N', 'O', 'S', ... (First letter of month in user language) $idx = ucfirst(dol_trunc(dol_print_date(dol_mktime(12, 0, 0, $month, 1, 1970), "%b"), 1, 'right', 'UTF-8', 1)); @@ -3484,7 +3625,7 @@ class Product extends CommonObject $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { - $sql .= " AND p.fk_soc = ".$socid; + $sql .= " AND p.fk_soc = ".((int) $socid); } $sql .= $morefilter; $sql .= " GROUP BY date_format(p.date_valid,'%Y%m')"; @@ -3733,7 +3874,7 @@ class Product extends CommonObject // Check not already father of id_pere (to avoid father -> child -> father links) $sql = 'SELECT fk_product_pere from '.MAIN_DB_PREFIX.'product_association'; - $sql .= ' WHERE fk_product_pere = '.$id_fils.' AND fk_product_fils = '.$id_pere; + $sql .= ' WHERE fk_product_pere = '.((int) $id_fils).' AND fk_product_fils = '.((int) $id_pere); if (!$this->db->query($sql)) { dol_print_error($this->db); return -1; @@ -3746,7 +3887,7 @@ class Product extends CommonObject return -1; } else { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association(fk_product_pere,fk_product_fils,qty,incdec)'; - $sql .= ' VALUES ('.$id_pere.', '.$id_fils.', '.$qty.', '.$incdec.')'; + $sql .= ' VALUES ('.((int) $id_pere).', '.((int) $id_fils).', '.((float) $qty).', '.((int) $incdec).')'; if (!$this->db->query($sql)) { dol_print_error($this->db); return -1; @@ -3817,8 +3958,8 @@ class Product extends CommonObject } $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association"; - $sql .= " WHERE fk_product_pere = ".$fk_parent; - $sql .= " AND fk_product_fils = ".$fk_child; + $sql .= " WHERE fk_product_pere = ".((int) $fk_parent); + $sql .= " AND fk_product_fils = ".((int) $fk_child); dol_syslog(get_class($this).'::del_sousproduit', LOG_DEBUG); if (!$this->db->query($sql)) { @@ -3911,12 +4052,14 @@ class Product extends CommonObject $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " WHERE fk_soc = ".$id_fourn; - if ($ref_fourn) { $sql .= " AND ref_fourn = '".$this->db->escape($ref_fourn)."'"; - } else { $sql .= " AND (ref_fourn = '' OR ref_fourn IS NULL)"; + $sql .= " WHERE fk_soc = ".((int) $id_fourn); + if ($ref_fourn) { + $sql .= " AND ref_fourn = '".$this->db->escape($ref_fourn)."'"; + } else { + $sql .= " AND (ref_fourn = '' OR ref_fourn IS NULL)"; } - $sql .= " AND quantity = ".$quantity; - $sql .= " AND fk_product = ".$this->id; + $sql .= " AND quantity = ".((float) $quantity); + $sql .= " AND fk_product = ".((int) $this->id); $sql .= " AND entity IN (".getEntity('productsupplierprice').")"; $resql = $this->db->query($sql); @@ -3986,8 +4129,7 @@ class Product extends CommonObject if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $list[$i] = $obj->fk_soc; $i++; @@ -4068,7 +4210,7 @@ class Product extends CommonObject $sql .= ", multicurrency_price"; $sql .= ", multicurrency_price_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price"; - $sql .= " WHERE fk_product = ".$fromId; + $sql .= " WHERE fk_product = ".((int) $fromId); $sql .= " ORDER BY date_price DESC"; if ($conf->global->PRODUIT_MULTIPRICES_LIMIT > 0) { $sql .= " LIMIT ".$conf->global->PRODUIT_MULTIPRICES_LIMIT; @@ -4100,7 +4242,7 @@ class Product extends CommonObject $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association (fk_product_pere, fk_product_fils, qty)'; $sql .= " SELECT ".$toId.", fk_product_fils, qty FROM ".MAIN_DB_PREFIX."product_association"; - $sql .= " WHERE fk_product_pere = ".$fromId; + $sql .= " WHERE fk_product_pere = ".((int) $fromId); dol_syslog(get_class($this).'::clone_association', LOG_DEBUG); if (!$this->db->query($sql)) { @@ -4129,23 +4271,23 @@ class Product extends CommonObject // les fournisseurs /*$sql = "INSERT ".MAIN_DB_PREFIX."product_fournisseur (" - . " datec, fk_product, fk_soc, ref_fourn, fk_user_author )" - . " SELECT '".$this->db->idate($now)."', ".$toId.", fk_soc, ref_fourn, fk_user_author" - . " FROM ".MAIN_DB_PREFIX."product_fournisseur" - . " WHERE fk_product = ".$fromId; + . " datec, fk_product, fk_soc, ref_fourn, fk_user_author )" + . " SELECT '".$this->db->idate($now)."', ".$toId.", fk_soc, ref_fourn, fk_user_author" + . " FROM ".MAIN_DB_PREFIX."product_fournisseur" + . " WHERE fk_product = ".((int) $fromId); - if ( ! $this->db->query($sql ) ) - { - $this->db->rollback(); - return -1; - }*/ + if ( ! $this->db->query($sql ) ) + { + $this->db->rollback(); + return -1; + }*/ // les prix de fournisseurs. $sql = "INSERT ".MAIN_DB_PREFIX."product_fournisseur_price ("; $sql .= " datec, fk_product, fk_soc, price, quantity, fk_user)"; - $sql .= " SELECT '".$this->db->idate($now)."', ".$toId.", fk_soc, price, quantity, fk_user"; + $sql .= " SELECT '".$this->db->idate($now)."', ".((int) $toId).", fk_soc, price, quantity, fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " WHERE fk_product = ".$fromId; + $sql .= " WHERE fk_product = ".((int) $fromId); dol_syslog(get_class($this).'::clone_fournisseurs', LOG_DEBUG); $resql = $this->db->query($sql); @@ -4163,39 +4305,43 @@ class Product extends CommonObject * Fonction recursive uniquement utilisee par get_arbo_each_prod, recompose l'arborescence des sousproduits * Define value of this->res * - * @param array $prod Products array - * @param string $compl_path Directory path of parents to add before - * @param int $multiply Because each sublevel must be multiplicated by parent nb - * @param int $level Init level - * @param int $id_parent Id parent + * @param array $prod Products array + * @param string $compl_path Directory path of parents to add before + * @param int $multiply Because each sublevel must be multiplicated by parent nb + * @param int $level Init level + * @param int $id_parent Id parent + * @param int $ignore_stock_load Ignore stock load * @return void */ - public function fetch_prod_arbo($prod, $compl_path = "", $multiply = 1, $level = 1, $id_parent = 0) + public function fetch_prod_arbo($prod, $compl_path = '', $multiply = 1, $level = 1, $id_parent = 0, $ignore_stock_load = 0) { // phpcs:enable global $conf, $langs; $tmpproduct = null; //var_dump($prod); - foreach ($prod as $id_product => $desc_pere) // $id_product is 0 (first call starting with root top) or an id of a sub_product - { - if (is_array($desc_pere)) // If desc_pere is an array, this means it's a child - { + foreach ($prod as $id_product => $desc_pere) { // $id_product is 0 (first call starting with root top) or an id of a sub_product + if (is_array($desc_pere)) { // If desc_pere is an array, this means it's a child $id = (!empty($desc_pere[0]) ? $desc_pere[0] : ''); $nb = (!empty($desc_pere[1]) ? $desc_pere[1] : ''); $type = (!empty($desc_pere[2]) ? $desc_pere[2] : ''); $label = (!empty($desc_pere[3]) ? $desc_pere[3] : ''); - $incdec = !empty($desc_pere[4]) ? $desc_pere[4] : 0; + $incdec = (!empty($desc_pere[4]) ? $desc_pere[4] : 0); - if ($multiply < 1) { $multiply = 1; + if ($multiply < 1) { + $multiply = 1; } //print "XXX We add id=".$id." - label=".$label." - nb=".$nb." - multiply=".$multiply." fullpath=".$compl_path.$label."\n"; - if (is_null($tmpproduct)) $tmpproduct = new Product($this->db); // So we initialize tmpproduct only once for all loop. + if (is_null($tmpproduct)) { + $tmpproduct = new Product($this->db); // So we initialize tmpproduct only once for all loop. + } $tmpproduct->fetch($id); // Load product to get ->ref - $tmpproduct->load_stock('nobatch,novirtual'); // Load stock to get true ->stock_reel - //$this->fetch($id); // Load product to get ->ref - //$this->load_stock('nobatch,novirtual'); // Load stock to get true ->stock_reel + + if (empty($ignore_stock_load) && ($tmpproduct->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { + $tmpproduct->load_stock('nobatch,novirtual'); // Load stock to get true ->stock_reel + } + $this->res[] = array( 'id'=>$id, // Id product 'id_parent'=>$id_parent, @@ -4216,7 +4362,7 @@ class Product extends CommonObject // Recursive call if there is childs to child if (is_array($desc_pere['childs'])) { //print 'YYY We go down for '.$desc_pere[3]." -> \n"; - $this->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1] * $multiply, $level + 1, $id); + $this->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1] * $multiply, $level + 1, $id, $ignore_stock_load); } } } @@ -4224,20 +4370,21 @@ class Product extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Build the tree of subproducts into an array - * this->sousprods is loaded by this->get_sousproduits_arbo() + * Build the tree of subproducts into an array ->res and return it. + * this->sousprods must have been loaded by this->get_sousproduits_arbo() * - * @param int $multiply Because each sublevel must be multiplicated by parent nb - * @return array $this->res + * @param int $multiply Because each sublevel must be multiplicated by parent nb + * @param int $ignore_stock_load Ignore stock load + * @return array $this->res */ - public function get_arbo_each_prod($multiply = 1) + public function get_arbo_each_prod($multiply = 1, $ignore_stock_load = 0) { // phpcs:enable $this->res = array(); if (isset($this->sousprods) && is_array($this->sousprods)) { foreach ($this->sousprods as $prod_name => $desc_product) { if (is_array($desc_product)) { - $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id); + $this->fetch_prod_arbo($desc_product, "", $multiply, 1, $this->id, $ignore_stock_load); } } } @@ -4269,7 +4416,9 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) { $nb = $obj->nb; } + if ($obj) { + $nb = $obj->nb; + } } else { return -1; } @@ -4291,7 +4440,8 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) { $nb = $obj->nb; + if ($obj) { + $nb = $obj->nb; } } @@ -4335,6 +4485,7 @@ class Product extends CommonObject public function getFather() { $sql = "SELECT p.rowid, p.label as label, p.ref as ref, pa.fk_product_pere as id, p.fk_product_type, pa.qty, pa.incdec, p.entity"; + $sql .= ", p.tosell as status, p.tobuy as status_buy"; $sql .= " FROM ".MAIN_DB_PREFIX."product_association as pa,"; $sql .= " ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE p.rowid = pa.fk_product_pere"; @@ -4343,8 +4494,7 @@ class Product extends CommonObject $res = $this->db->query($sql); if ($res) { $prods = array(); - while ($record = $this->db->fetch_array($res)) - { + while ($record = $this->db->fetch_array($res)) { // $record['id'] = $record['rowid'] = id of father $prods[$record['id']]['id'] = $record['rowid']; $prods[$record['id']]['ref'] = $record['ref']; @@ -4353,6 +4503,8 @@ class Product extends CommonObject $prods[$record['id']]['incdec'] = $record['incdec']; $prods[$record['id']]['fk_product_type'] = $record['fk_product_type']; $prods[$record['id']]['entity'] = $record['entity']; + $prods[$record['id']]['status'] = $record['status']; + $prods[$record['id']]['status_buy'] = $record['status_buy']; } return $prods; } else { @@ -4383,12 +4535,13 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."product_association as pa"; $sql .= " WHERE p.rowid = pa.fk_product_fils"; - $sql .= " AND pa.fk_product_pere = ".$id; - $sql .= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens + $sql .= " AND pa.fk_product_pere = ".((int) $id); + $sql .= " AND pa.fk_product_fils <> ".((int) $id); // This should not happens, it is to avoid infinite loop if it happens dol_syslog(get_class($this).'::getChildsArbo id='.$id.' level='.$level, LOG_DEBUG); - if ($level == 1) { $alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly + if ($level == 1) { + $alreadyfound = array($id=>1); // We init array of found object to start of tree, so if we found it later (should not happened), we stop immediatly } // Protection against infinite loop if ($level > 30) { @@ -4398,8 +4551,7 @@ class Product extends CommonObject $res = $this->db->query($sql); if ($res) { $prods = array(); - while ($rec = $this->db->fetch_array($res)) - { + while ($rec = $this->db->fetch_array($res)) { if (!empty($alreadyfound[$rec['rowid']])) { dol_syslog(get_class($this).'::getChildsArbo the product id='.$rec['rowid'].' was already found at a higher level in tree. We discard to avoid infinite loop', LOG_WARNING); continue; @@ -4417,8 +4569,7 @@ class Product extends CommonObject //$prods[$this->db->escape($rec['label'])]= array(0=>$rec['id'],1=>$rec['qty']); if (empty($firstlevelonly)) { $listofchilds = $this->getChildsArbo($rec['rowid'], 0, $level + 1); - foreach ($listofchilds as $keyChild => $valueChild) - { + foreach ($listofchilds as $keyChild => $valueChild) { $prods[$rec['rowid']]['childs'][$keyChild] = $valueChild; } } @@ -4443,12 +4594,10 @@ class Product extends CommonObject // phpcs:enable $parent = array(); - foreach ($this->getChildsArbo($this->id) as $keyChild => $valueChild) // Warning. getChildsArbo can call getChildsArbo recursively. Starting point is $value[0]=id of product - { + foreach ($this->getChildsArbo($this->id) as $keyChild => $valueChild) { // Warning. getChildsArbo can call getChildsArbo recursively. Starting point is $value[0]=id of product $parent[$this->label][$keyChild] = $valueChild; } - foreach ($parent as $key => $value) // key=label, value is array of childs - { + foreach ($parent as $key => $value) { // key=label, value is array of childs $this->sousprods[$key] = $value; } } @@ -4510,8 +4659,7 @@ class Product extends CommonObject $label .= '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode; } - if ($this->type == Product::TYPE_PRODUCT) - { + if ($this->type == Product::TYPE_PRODUCT) { if ($this->weight) { $label .= "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units); } @@ -4525,7 +4673,9 @@ class Product extends CommonObject if ($this->height) { $labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Height").'</b>: '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units); } - if ($labelsize) $label .= "<br>".$labelsize; + if ($labelsize) { + $label .= "<br>".$labelsize; + } $labelsurfacevolume = ""; if ($this->surface) { @@ -4534,7 +4684,12 @@ class Product extends CommonObject if ($this->volume) { $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units); } - if ($labelsurfacevolume) $label .= "<br>".$labelsurfacevolume; + if ($labelsurfacevolume) { + $label .= "<br>".$labelsurfacevolume; + } + } + if (!empty($this->pmp) && $this->pmp) { + $label .= "<br><b>".$langs->trans("PMPValue").'</b>: '.price($this->pmp, 0, '', 1, -1, -1, $conf->currency); } if (!empty($conf->accounting->enabled) && $this->status) { @@ -4576,9 +4731,11 @@ class Product extends CommonObject 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 ($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'; + if ($add_save_lastsearch_values) { + $url .= '&save_lastsearch_values=1'; } } @@ -4587,13 +4744,12 @@ class Product extends CommonObject $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) - { + if ($withpicto) { if ($this->type == Product::TYPE_PRODUCT) { $result .= (img_object(($notooltip ? '' : $label), 'product', ($notooltip ? 'class="paddingright"' : 'class="paddingright classfortooltip"'), 0, 0, $notooltip ? 0 : 1)); } if ($this->type == Product::TYPE_SERVICE) { - $result .= (img_object(($notooltip ? '' : $label), 'service', ($notooltip ? 'class="paddinright"' : 'class="paddingright classfortooltip"'), 0, 0, $notooltip ? 0 : 1)); + $result .= (img_object(($notooltip ? '' : $label), 'service', ($notooltip ? 'class="paddingright"' : 'class="paddingright classfortooltip"'), 0, 0, $notooltip ? 0 : 1)); } } $result .= $newref; @@ -4653,17 +4809,16 @@ class Product extends CommonObject */ public function getLibStatut($mode = 0, $type = 0) { - switch ($type) - { + switch ($type) { case 0: - return $this->LibStatut($this->status, $mode, $type); + return $this->LibStatut($this->status, $mode, $type); case 1: - return $this->LibStatut($this->status_buy, $mode, $type); + return $this->LibStatut($this->status_buy, $mode, $type); case 2: - return $this->LibStatut($this->status_batch, $mode, $type); + return $this->LibStatut($this->status_batch, $mode, $type); default: //Simulate previous behavior but should return an error string - return $this->LibStatut($this->status_buy, $mode, $type); + return $this->LibStatut($this->status_buy, $mode, $type); } } @@ -4684,17 +4839,17 @@ class Product extends CommonObject $labelStatus = $labelStatusShort = ''; $langs->load('products'); - if (!empty($conf->productbatch->enabled)) { $langs->load("productbatch"); + if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); } if ($type == 2) { - switch ($mode) - { + switch ($mode) { case 0: - $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatch') : $langs->trans('ProductStatusOnBatch')); + $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatch') : ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial'))); return dolGetStatus($label); case 1: - $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatchShort') : $langs->trans('ProductStatusOnBatchShort')); + $label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatchShort') : ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort'))); return dolGetStatus($label); case 2: return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 1, 2); @@ -4732,12 +4887,14 @@ class Product extends CommonObject $labelStatus = $langs->trans('ProductStatusOnBuyShort'); $labelStatusShort = $langs->trans('ProductStatusOnBuy'); } elseif ($type == 2) { - $labelStatus = $langs->trans('ProductStatusOnBatch'); - $labelStatusShort = $langs->trans('ProductStatusOnBatchShort'); + $labelStatus = ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial')); + $labelStatusShort = ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort')); } + } elseif ( $type == 2 && $status == 2 ) { + $labelStatus = $langs->trans('ProductStatusOnSerial'); + $labelStatusShort = $langs->trans('ProductStatusOnSerialShort'); } - if ($mode > 6) { return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0); } else { @@ -4905,7 +5062,7 @@ class Product extends CommonObject $sql .= " AND w.rowid = ps.fk_entrepot"; $sql .= " AND ps.fk_product = ".$this->id; if (!empty($conf->global->ENTREPOT_EXTRA_STATUS) && count($warehouseStatus)) { - $sql .= " AND w.statut IN (".$this->db->sanitize($this->db->escape(implode(',', $warehouseStatus))).")"; + $sql .= " AND w.statut IN (".$this->db->sanitize(implode(',', $warehouseStatus)).")"; } dol_syslog(get_class($this)."::load_stock", LOG_DEBUG); @@ -4914,8 +5071,7 @@ class Product extends CommonObject $num = $this->db->num_rows($result); $i = 0; if ($num > 0) { - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_object($result); $this->stock_warehouse[$row->fk_entrepot] = new stdClass(); $this->stock_warehouse[$row->fk_entrepot]->real = $row->reel; @@ -4963,14 +5119,14 @@ class Product extends CommonObject //dol_syslog("load_virtual_stock"); - if (!empty($conf->commande->enabled)) - { + if (!empty($conf->commande->enabled)) { $result = $this->load_stats_commande(0, '1,2', 1); - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_commande_client = $this->stats_commande['qty']; } - if (!empty($conf->expedition->enabled)) - { + if (!empty($conf->expedition->enabled)) { require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; $filterShipmentStatus = ''; if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { @@ -4979,37 +5135,49 @@ class Product extends CommonObject $filterShipmentStatus = Expedition::STATUS_CLOSED; } $result = $this->load_stats_sending(0, '1,2', 1, $filterShipmentStatus); - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_sending_client = $this->stats_expedition['qty']; } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { $filterStatus = '1,2,3,4'; - if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; + if (isset($includedraftpoforvirtual)) { + $filterStatus = '0,'.$filterStatus; + } $result = $this->load_stats_commande_fournisseur(0, $filterStatus, 1); - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) { $filterStatus = '4'; - if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; + if (isset($includedraftpoforvirtual)) { + $filterStatus = '0,'.$filterStatus; + } $result = $this->load_stats_reception(0, $filterStatus, 1); - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_reception_fournisseur = $this->stats_reception['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) { $filterStatus = '4'; - if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; + if (isset($includedraftpoforvirtual)) { + $filterStatus = '0,'.$filterStatus; + } $result = $this->load_stats_reception(0, $filterStatus, 1); // Use same tables than when module reception is not used. - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_reception_fournisseur = $this->stats_reception['qty']; } - if (!empty($conf->mrp->enabled)) - { + if (!empty($conf->mrp->enabled)) { $result = $this->load_stats_inproduction(0, '1,2', 1); - if ($result < 0) dol_print_error($this->db, $this->error); + if ($result < 0) { + dol_print_error($this->db, $this->error); + } $stock_inproduction = $this->stats_mrptoproduce['qty'] - $this->stats_mrptoconsume['qty']; } @@ -5042,7 +5210,9 @@ class Product extends CommonObject $parameters = array('id'=>$this->id, 'includedraftpoforvirtual' => $includedraftpoforvirtual); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('loadvirtualstock', $parameters, $this, $action); - if ($reshook > 0) $this->stock_theorique = $hookmanager->resArray['stock_theorique']; + if ($reshook > 0) { + $this->stock_theorique = $hookmanager->resArray['stock_theorique']; + } return 1; } @@ -5067,8 +5237,7 @@ class Product extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $result[] = array('batch'=>$batch, 'eatby'=>$this->db->jdate($obj->eatby), 'sellby'=>$this->db->jdate($obj->sellby), 'qty'=>$obj->qty); $i++; @@ -5156,8 +5325,7 @@ class Product extends CommonObject if (file_exists($dir_osencoded)) { $handle = opendir($dir_osencoded); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) - { + while (($file = readdir($handle)) !== false) { if (!utf8_check($file)) { $file = utf8_encode($file); // To be sure data is stored in UTF8 in memory } @@ -5190,9 +5358,9 @@ class Product extends CommonObject $dir_osencoded = dol_osencode($dir); $handle = @opendir($dir_osencoded); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) - { - if (!utf8_check($file)) { $file = utf8_encode($file); // readdir returns ISO + while (($file = readdir($handle)) !== false) { + if (!utf8_check($file)) { + $file = utf8_encode($file); // readdir returns ISO } if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) { $nbphoto++; @@ -5209,14 +5377,17 @@ class Product extends CommonObject // Objet $obj = array(); $obj['photo'] = $photo; - if ($photo_vignette && dol_is_file($dirthumb.$photo_vignette)) { $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; - } else { $obj['photo_vignette'] = ""; + if ($photo_vignette && dol_is_file($dirthumb.$photo_vignette)) { + $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; + } else { + $obj['photo_vignette'] = ""; } $tabobj[$nbphoto - 1] = $obj; // On continue ou on arrete de boucler ? - if ($nbmax && $nbphoto >= $nbmax) { break; + if ($nbmax && $nbphoto >= $nbmax) { + break; } } } @@ -5303,10 +5474,11 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql) { - while ($obj = $this->db->fetch_object($resql)) - { - if ($obj->fk_product_type == 1) { $this->nb["services"] = $obj->nb; - } else { $this->nb["products"] = $obj->nb; + while ($obj = $this->db->fetch_object($resql)) { + if ($obj->fk_product_type == 1) { + $this->nb["services"] = $obj->nb; + } else { + $this->nb["products"] = $obj->nb; } } $this->db->free($resql); @@ -5355,10 +5527,10 @@ class Product extends CommonObject $result = ''; if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $dirsociete = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$conf->global->BARCODE_PRODUCT_ADDON_NUM.'.php'); - if ($res) { break; + if ($res) { + break; } } $var = $conf->global->BARCODE_PRODUCT_ADDON_NUM; @@ -5459,7 +5631,7 @@ class Product extends CommonObject */ public function hasbatch() { - return ($this->status_batch == 1 ? true : false); + return ($this->status_batch > 0 ? true : false); } @@ -5482,8 +5654,7 @@ class Product extends CommonObject $product_fourn_list = $product_fourn->list_product_fournisseur_price($this->id, '', ''); if (is_array($product_fourn_list) && count($product_fourn_list) > 0) { - foreach ($product_fourn_list as $productfourn) - { + foreach ($product_fourn_list as $productfourn) { if ($productfourn->fourn_unitprice > $maxpricesupplier) { $maxpricesupplier = $productfourn->fourn_unitprice; } @@ -5509,38 +5680,9 @@ class Product extends CommonObject */ 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_PRODUCT, '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; - } - - // Process - foreach ($to_del as $del) { - if ($c->fetch($del) > 0) { - $c->del_type($this, Categorie::TYPE_PRODUCT); - } - } - foreach ($to_add as $add) { - if ($c->fetch($add) > 0) { - $c->add_type($this, Categorie::TYPE_PRODUCT); - } - } - - return; + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + return parent::setCategoriesCommon($categories, Categorie::TYPE_PRODUCT); } /** @@ -5650,7 +5792,7 @@ class Product extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as date_creation, p.tms as date_modification,"; $sql .= " p.fk_user_author, p.fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as p"; - $sql .= " WHERE p.rowid = ".$id; + $sql .= " WHERE p.rowid = ".((int) $id); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index a97437f6a45..10704f2f53e 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -107,15 +107,15 @@ class Productbatch extends CommonObject 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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.self::$_table_element); } // Commit or rollback - if ($error) - { + if ($error) { $this->db->rollback(); return -1 * $error; } else { @@ -151,14 +151,12 @@ class Productbatch extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product_batch as t INNER JOIN ".MAIN_DB_PREFIX."product_stock w on t.fk_product_stock = w.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl on pl.fk_product = w.fk_product and pl.batch = t.batch"; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -197,8 +195,7 @@ class Productbatch extends CommonObject $this->cleanParam(); // TODO Check qty is ok for stock move. Negative may not be allowed. - if ($this->qty < 0) - { + if ($this->qty < 0) { } // Update request @@ -209,19 +206,19 @@ class Productbatch extends CommonObject $sql .= " batch=".(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").","; $sql .= " qty=".(isset($this->qty) ? $this->qty : "null").","; $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -247,21 +244,20 @@ class Productbatch extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.self::$_table_element.""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -288,7 +284,7 @@ class Productbatch extends CommonObject $object = new Productbatch($this->db); - $this->db->begin(); + $this->db->begin(); // Load source object $object->fetch($fromid); @@ -303,22 +299,19 @@ class Productbatch extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $this->errors = array_merge($this->errors, $object->errors); $error++; } - if (!$error) - { + if (!$error) { } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { @@ -353,10 +346,18 @@ class Productbatch extends CommonObject */ private function cleanParam() { - if (isset($this->fk_product_stock)) $this->fk_product_stock = (int) trim($this->fk_product_stock); - if (isset($this->batch)) $this->batch = trim($this->batch); - if (isset($this->qty)) $this->qty = (float) trim($this->qty); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->fk_product_stock)) { + $this->fk_product_stock = (int) trim($this->fk_product_stock); + } + if (isset($this->batch)) { + $this->batch = trim($this->batch); + } + if (isset($this->qty)) { + $this->qty = (float) trim($this->qty); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } } /** @@ -385,19 +386,25 @@ class Productbatch extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t"; $sql .= " WHERE fk_product_stock=".$fk_product_stock; - if (!empty($eatby)) array_push($where, " eatby = '".$this->db->idate($eatby)."'"); // deprecated - if (!empty($sellby)) array_push($where, " sellby = '".$this->db->idate($sellby)."'"); // deprecated + if (!empty($eatby)) { + array_push($where, " eatby = '".$this->db->idate($eatby)."'"); // deprecated + } + if (!empty($sellby)) { + array_push($where, " sellby = '".$this->db->idate($sellby)."'"); // deprecated + } - if (!empty($batch_number)) $sql .= " AND batch = '".$this->db->escape($batch_number)."'"; + if (!empty($batch_number)) { + $sql .= " AND batch = '".$this->db->escape($batch_number)."'"; + } - if (!empty($where)) $sql .= " AND (".implode(" OR ", $where).")"; + if (!empty($where)) { + $sql .= " AND (".implode(" OR ", $where).")"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -414,7 +421,7 @@ class Productbatch extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -441,27 +448,26 @@ class Productbatch extends CommonObject $sql .= " t.batch,"; $sql .= " t.qty,"; $sql .= " t.import_key"; - if ($fk_product > 0) - { + if ($fk_product > 0) { $sql .= ", pl.rowid as lotid, pl.eatby as eatby, pl.sellby as sellby"; // TODO May add extrafields to ? } $sql .= " FROM ".MAIN_DB_PREFIX."product_batch as t"; - if ($fk_product > 0) - { + if ($fk_product > 0) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON pl.fk_product = ".$fk_product." AND pl.batch = t.batch"; // TODO May add extrafields to ? } $sql .= " WHERE fk_product_stock=".$fk_product_stock; - if ($with_qty) $sql .= " AND t.qty <> 0"; + if ($with_qty) { + $sql .= " AND t.qty <> 0"; + } dol_syslog("productbatch::findAll", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $tmp = new Productbatch($db); diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 55018f1fc8f..9b0d29b4cdd 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -56,6 +56,11 @@ class Productcustomerprice extends CommonObject */ public $fk_soc; + /** + * @var string Customer reference + */ + public $ref_customer; + public $price; public $price_ttc; public $price_min; @@ -102,34 +107,51 @@ class Productcustomerprice extends CommonObject // Clean parameters - if (isset($this->entity)) + if (isset($this->entity)) { $this->entity = trim($this->entity); - if (isset($this->fk_product)) + } + if (isset($this->fk_product)) { $this->fk_product = trim($this->fk_product); - if (isset($this->fk_soc)) + } + if (isset($this->fk_soc)) { $this->fk_soc = trim($this->fk_soc); - if (isset($this->price)) + } + if (isset($this->ref_customer)) { + $this->ref_customer = trim($this->ref_customer); + } + if (isset($this->price)) { $this->price = trim($this->price); - if (isset($this->price_ttc)) + } + if (isset($this->price_ttc)) { $this->price_ttc = trim($this->price_ttc); - if (isset($this->price_min)) + } + if (isset($this->price_min)) { $this->price_min = trim($this->price_min); - if (isset($this->price_min_ttc)) + } + if (isset($this->price_min_ttc)) { $this->price_min_ttc = trim($this->price_min_ttc); - if (isset($this->price_base_type)) + } + if (isset($this->price_base_type)) { $this->price_base_type = trim($this->price_base_type); - if (isset($this->tva_tx)) + } + if (isset($this->tva_tx)) { $this->tva_tx = trim($this->tva_tx); - if (isset($this->recuperableonly)) + } + if (isset($this->recuperableonly)) { $this->recuperableonly = trim($this->recuperableonly); - if (isset($this->localtax1_tx)) + } + if (isset($this->localtax1_tx)) { $this->localtax1_tx = trim($this->localtax1_tx); - if (isset($this->localtax2_tx)) + } + if (isset($this->localtax2_tx)) { $this->localtax2_tx = trim($this->localtax2_tx); - if (isset($this->fk_user)) + } + if (isset($this->fk_user)) { $this->fk_user = trim($this->fk_user); - if (isset($this->import_key)) + } + if (isset($this->import_key)) { $this->import_key = trim($this->import_key); + } // Check parameters // Put here code to add control on parameters values @@ -171,6 +193,7 @@ class Productcustomerprice extends CommonObject $sql .= "datec,"; $sql .= "fk_product,"; $sql .= "fk_soc,"; + $sql .= 'ref_customer,'; $sql .= "price,"; $sql .= "price_ttc,"; $sql .= "price_min,"; @@ -190,6 +213,7 @@ class Productcustomerprice extends CommonObject $sql .= " '".$this->db->idate(dol_now())."',"; $sql .= " ".(!isset($this->fk_product) ? 'NULL' : "'".$this->db->escape($this->fk_product)."'").","; $sql .= " ".(!isset($this->fk_soc) ? 'NULL' : "'".$this->db->escape($this->fk_soc)."'").","; + $sql .= " ".(!isset($this->ref_customer) ? 'NULL' : "'".$this->db->escape($this->ref_customer)."'").","; $sql .= " ".(empty($this->price) ? '0' : "'".$this->db->escape($this->price)."'").","; $sql .= " ".(empty($this->price_ttc) ? '0' : "'".$this->db->escape($this->price_ttc)."'").","; $sql .= " ".(empty($this->price_min) ? '0' : "'".$this->db->escape($this->price_min)."'").","; @@ -250,8 +274,8 @@ class Productcustomerprice extends CommonObject /** * Load object in memory from the database * - * @param int $id object - * @return int <0 if KO, >0 if OK + * @param int $id ID of customer price + * @return int <0 if KO, 0 if not found, >0 if OK */ public function fetch($id) { @@ -264,6 +288,7 @@ class Productcustomerprice extends CommonObject $sql .= " t.tms,"; $sql .= " t.fk_product,"; $sql .= " t.fk_soc,"; + $sql .= " t.ref_customer,"; $sql .= " t.price,"; $sql .= " t.price_ttc,"; $sql .= " t.price_min,"; @@ -276,9 +301,8 @@ class Productcustomerprice extends CommonObject $sql .= " t.localtax2_tx,"; $sql .= " t.fk_user,"; $sql .= " t.import_key"; - $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price as t"; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -293,6 +317,7 @@ class Productcustomerprice extends CommonObject $this->tms = $this->db->jdate($obj->tms); $this->fk_product = $obj->fk_product; $this->fk_soc = $obj->fk_soc; + $this->ref_customer = $obj->ref_customer; $this->price = $obj->price; $this->price_ttc = $obj->price_ttc; $this->price_min = $obj->price_min; @@ -305,10 +330,15 @@ class Productcustomerprice extends CommonObject $this->localtax2_tx = $obj->localtax2_tx; $this->fk_user = $obj->fk_user; $this->import_key = $obj->import_key; - } - $this->db->free($resql); - return 1; + $this->db->free($resql); + + return 1; + } else { + $this->db->free($resql); + + return 0; + } } else { $this->error = "Error ".$this->db->lasterror(); return -1; @@ -331,8 +361,12 @@ class Productcustomerprice extends CommonObject // phpcs:enable global $langs; - if (empty($sortfield)) $sortfield = "t.rowid"; - if (empty($sortorder)) $sortorder = "DESC"; + if (empty($sortfield)) { + $sortfield = "t.rowid"; + } + if (empty($sortorder)) { + $sortorder = "DESC"; + } $sql = "SELECT"; $sql .= " t.rowid,"; @@ -341,6 +375,7 @@ class Productcustomerprice extends CommonObject $sql .= " t.tms,"; $sql .= " t.fk_product,"; $sql .= " t.fk_soc,"; + $sql .= " t.ref_customer,"; $sql .= " t.price,"; $sql .= " t.price_ttc,"; $sql .= " t.price_min,"; @@ -382,7 +417,9 @@ class Productcustomerprice extends CommonObject } } $sql .= $this->db->order($sortfield, $sortorder); - if (!empty($limit)) $sql .= ' '.$this->db->plimit($limit + 1, $offset); + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit + 1, $offset); + } dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql = $this->db->query($sql); @@ -400,6 +437,7 @@ class Productcustomerprice extends CommonObject $line->tms = $this->db->jdate($obj->tms); $line->fk_product = $obj->fk_product; $line->fk_soc = $obj->fk_soc; + $line->ref_customer = $obj->ref_customer; $line->price = $obj->price; $line->price_ttc = $obj->price_ttc; $line->price_min = $obj->price_min; @@ -417,7 +455,7 @@ class Productcustomerprice extends CommonObject $line->socname = $obj->socname; $line->prodref = $obj->prodref; - $this->lines [] = $line; + $this->lines[] = $line; } $this->db->free($resql); @@ -444,16 +482,20 @@ class Productcustomerprice extends CommonObject // phpcs:enable global $langs; - if (!empty($sortfield)) $sortfield = "t.rowid"; - if (!empty($sortorder)) $sortorder = "DESC"; + if (!empty($sortfield)) { + $sortfield = "t.rowid"; + } + if (!empty($sortorder)) { + $sortorder = "DESC"; + } $sql = "SELECT"; $sql .= " t.rowid,"; - $sql .= " t.entity,"; $sql .= " t.datec,"; $sql .= " t.fk_product,"; $sql .= " t.fk_soc,"; + $sql .= " t.ref_customer,"; $sql .= " t.price,"; $sql .= " t.price_ttc,"; $sql .= " t.price_min,"; @@ -468,30 +510,29 @@ class Productcustomerprice extends CommonObject $sql .= " t.import_key,"; $sql .= " soc.nom as socname,"; $sql .= " prod.ref as prodref"; - $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_log as t "; - $sql .= " ,".MAIN_DB_PREFIX."product as prod "; - $sql .= " ,".MAIN_DB_PREFIX."societe as soc "; - $sql .= " WHERE soc.rowid=t.fk_soc "; + $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_log as t"; + $sql .= " ,".MAIN_DB_PREFIX."product as prod"; + $sql .= " ,".MAIN_DB_PREFIX."societe as soc"; + $sql .= " WHERE soc.rowid=t.fk_soc"; $sql .= " AND prod.rowid=t.fk_product "; $sql .= " AND prod.entity IN (".getEntity('product').")"; $sql .= " AND t.entity IN (".getEntity('productprice').")"; - // Manage filter if (count($filter) > 0) { foreach ($filter as $key => $value) { - if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year - { + if (strpos($key, 'date')) { // To allow $filter['YEAR(s.dated)']=>$year $sql .= ' AND '.$key.' = \''.$value.'\''; } elseif ($key == 'soc.nom') { - $sql .= ' AND '.$key.' LIKE \'%'.$value.'%\''; + $sql .= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\''; } else { - $sql .= ' AND '.$key.' = '.$value; + $sql .= ' AND '.$key.' = '.((int) $value); } } } - $sql .= $this->db->order($sortfield, $sortorder); - if (!empty($limit)) $sql .= ' '.$this->db->plimit($limit + 1, $offset); + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit + 1, $offset); + } dol_syslog(get_class($this)."::fetch_all_log", LOG_DEBUG); $resql = $this->db->query($sql); @@ -509,6 +550,7 @@ class Productcustomerprice extends CommonObject $line->tms = $this->db->jdate($obj->tms); $line->fk_product = $obj->fk_product; $line->fk_soc = $obj->fk_soc; + $line->ref_customer = $obj->ref_customer; $line->price = $obj->price; $line->price_ttc = $obj->price_ttc; $line->price_min = $obj->price_min; @@ -551,34 +593,51 @@ class Productcustomerprice extends CommonObject // Clean parameters - if (isset($this->entity)) + if (isset($this->entity)) { $this->entity = trim($this->entity); - if (isset($this->fk_product)) + } + if (isset($this->fk_product)) { $this->fk_product = trim($this->fk_product); - if (isset($this->fk_soc)) + } + if (isset($this->fk_soc)) { $this->fk_soc = trim($this->fk_soc); - if (isset($this->price)) + } + if (isset($this->ref_customer)) { + $this->ref_customer = trim($this->ref_customer); + } + if (isset($this->price)) { $this->price = trim($this->price); - if (isset($this->price_ttc)) + } + if (isset($this->price_ttc)) { $this->price_ttc = trim($this->price_ttc); - if (isset($this->price_min)) + } + if (isset($this->price_min)) { $this->price_min = trim($this->price_min); - if (isset($this->price_min_ttc)) + } + if (isset($this->price_min_ttc)) { $this->price_min_ttc = trim($this->price_min_ttc); - if (isset($this->price_base_type)) + } + if (isset($this->price_base_type)) { $this->price_base_type = trim($this->price_base_type); - if (isset($this->tva_tx)) + } + if (isset($this->tva_tx)) { $this->tva_tx = trim($this->tva_tx); - if (isset($this->recuperableonly)) + } + if (isset($this->recuperableonly)) { $this->recuperableonly = trim($this->recuperableonly); - if (isset($this->localtax1_tx)) + } + if (isset($this->localtax1_tx)) { $this->localtax1_tx = trim($this->localtax1_tx); - if (isset($this->localtax2_tx)) + } + if (isset($this->localtax2_tx)) { $this->localtax2_tx = trim($this->localtax2_tx); - if (isset($this->fk_user)) + } + if (isset($this->fk_user)) { $this->fk_user = trim($this->fk_user); - if (isset($this->import_key)) + } + if (isset($this->import_key)) { $this->import_key = trim($this->import_key); + } // Check parameters // Put here code to add a control on parameters values @@ -622,6 +681,7 @@ class Productcustomerprice extends CommonObject $sql .= "datec,"; $sql .= "fk_product,"; $sql .= "fk_soc,"; + $sql .= "ref_customer,"; $sql .= "price,"; $sql .= "price_ttc,"; $sql .= "price_min,"; @@ -644,6 +704,7 @@ class Productcustomerprice extends CommonObject $sql .= " t.datec,"; $sql .= " t.fk_product,"; $sql .= " t.fk_soc,"; + $sql .= " t.ref_customer,"; $sql .= " t.price,"; $sql .= " t.price_ttc,"; $sql .= " t.price_min,"; @@ -678,6 +739,7 @@ class Productcustomerprice extends CommonObject $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; $sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").","; $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; + $sql .= " ref_customer=".(isset($this->ref_customer) ? "'" . $this->db->escape($this->ref_customer) . "'" : "null").","; $sql .= " price=".(isset($this->price) ? $this->price : "null").","; $sql .= " price_ttc=".(isset($this->price_ttc) ? $this->price_ttc : "null").","; $sql .= " price_min=".(isset($this->price_min) ? $this->price_min : "null").","; @@ -693,7 +755,7 @@ class Productcustomerprice extends CommonObject $sql .= " fk_user=".$user->id.","; $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); @@ -702,11 +764,12 @@ class Productcustomerprice extends CommonObject $this->errors [] = "Error ".$this->db->lasterror(); } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_UPDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -751,7 +814,7 @@ class Productcustomerprice extends CommonObject // Find all susidiaries $sql = "SELECT s.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql .= " WHERE s.parent = ".$this->fk_soc; + $sql .= " WHERE s.parent = ".((int) $this->fk_soc); $sql .= " AND s.entity IN (".getEntity('societe').")"; dol_syslog(get_class($this)."::setPriceOnAffiliateThirdparty", LOG_DEBUG); @@ -797,6 +860,7 @@ class Productcustomerprice extends CommonObject // If line do not exits then create it $prodsocpricenew = new Productcustomerprice($this->db); $prodsocpricenew->fk_soc = $obj->rowid; + $prodsocpricenew->ref_customer = $obj->ref_customer; $prodsocpricenew->fk_product = $this->fk_product; $prodsocpricenew->price = $this->price; $prodsocpricenew->price_min = $this->price_min; @@ -834,7 +898,6 @@ class Productcustomerprice extends CommonObject */ public function delete($user, $notrigger = 0) { - global $conf, $langs; $error = 0; @@ -849,7 +912,7 @@ class Productcustomerprice extends CommonObject if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_customer_price"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); @@ -938,6 +1001,7 @@ class Productcustomerprice extends CommonObject $this->tms = ''; $this->fk_product = ''; $this->fk_soc = ''; + $this->ref_customer = ''; $this->price = ''; $this->price_ttc = ''; $this->price_min = ''; @@ -976,6 +1040,11 @@ class PriceByCustomerLine */ public $fk_product; + /** + * @var string Customer reference + */ + public $ref_customer; + /** * @var int Thirdparty ID */ diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php new file mode 100644 index 00000000000..709afcb6d20 --- /dev/null +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -0,0 +1,843 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2021 Alexis LAURIER <contact@alexislaurier.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file class/productfournisseurprice.class.php + * \ingroup product + * \brief This file is a CRUD class file for ProductFournisseurPrice (Create/Read/Update/Delete) + */ + +// Put here all includes required by your class file +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; + +/** + * Class for ProductFournisseurPrice + */ +class ProductFournisseurPrice extends CommonObject +{ + /** + * @var string ID to identify managed object. + */ + public $element = 'productfournisseurprice'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'product_fournisseur_price'; + + /** + * @var int Does this object support multicompany module ? + * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table + */ + public $ismultientitymanaged = 1; + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 1; + + /** + * @var string String with name of icon for productfournisseurprice. Must be the part after the 'object_' into object_productfournisseurprice.png + */ + public $picto = 'productfournisseurprice@buypricehistory'; + + + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + const STATUS_CANCELED = 9; + + + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[: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. + * 'picto' is code of a picto to show before value in forms + * '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' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * '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 + /** + * @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', 'position'=>10, 'notnull'=>1, 'visible'=>0,), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>'1', 'position'=>15, 'notnull'=>1, 'visible'=>-2, 'default'=>'1', 'index'=>1,), + 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>-1,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>25, 'notnull'=>1, 'visible'=>-1,), + 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1', 'label'=>'Fkproduct', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>-1,), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>35, 'notnull'=>0, 'visible'=>-1,), + 'ref_fourn' => array('type'=>'varchar(255)', 'label'=>'Reffourn', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>-1,), + 'desc_fourn' => array('type'=>'text', 'label'=>'Descfourn', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>-1,), + 'fk_availability' => array('type'=>'integer', 'label'=>'Fkavailability', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,), + 'price' => array('type'=>'double(24,8)', 'label'=>'Price', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1,), + 'quantity' => array('type'=>'double', 'label'=>'Quantity', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>-1,), + 'remise_percent' => array('type'=>'double', 'label'=>'Remisepercent', 'enabled'=>'1', 'position'=>65, 'notnull'=>1, 'visible'=>-1,), + 'remise' => array('type'=>'double', 'label'=>'Remise', 'enabled'=>'1', 'position'=>70, 'notnull'=>1, 'visible'=>-1,), + 'unitprice' => array('type'=>'double(24,8)', 'label'=>'Unitprice', 'enabled'=>'1', 'position'=>75, 'notnull'=>0, 'visible'=>-1,), + 'charges' => array('type'=>'double(24,8)', 'label'=>'Charges', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,), + 'default_vat_code' => array('type'=>'varchar(10)', 'label'=>'Defaultvatcode', 'enabled'=>'1', 'position'=>85, 'notnull'=>0, 'visible'=>-1,), + 'tva_tx' => array('type'=>'double(6,3)', 'label'=>'Tvatx', 'enabled'=>'1', 'position'=>90, 'notnull'=>1, 'visible'=>-1,), + 'info_bits' => array('type'=>'integer', 'label'=>'Infobits', 'enabled'=>'1', 'position'=>95, 'notnull'=>1, 'visible'=>-1,), + 'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkuser', 'enabled'=>'1', 'position'=>100, 'notnull'=>0, 'visible'=>-1,), + 'fk_supplier_price_expression' => array('type'=>'integer', 'label'=>'Fksupplierpriceexpression', 'enabled'=>'1', 'position'=>105, 'notnull'=>0, 'visible'=>-1,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>900, 'notnull'=>0, 'visible'=>-2,), + 'delivery_time_days' => array('type'=>'integer', 'label'=>'Deliverytimedays', 'enabled'=>'1', 'position'=>115, 'notnull'=>0, 'visible'=>-1,), + 'supplier_reputation' => array('type'=>'varchar(10)', 'label'=>'Supplierreputation', 'enabled'=>'1', 'position'=>120, 'notnull'=>0, 'visible'=>-1,), + 'fk_multicurrency' => array('type'=>'integer', 'label'=>'Fkmulticurrency', 'enabled'=>'1', 'position'=>125, 'notnull'=>0, 'visible'=>-1,), + 'multicurrency_code' => array('type'=>'varchar(255)', 'label'=>'Multicurrencycode', 'enabled'=>'1', 'position'=>130, 'notnull'=>0, 'visible'=>-1,), + 'multicurrency_tx' => array('type'=>'double(24,8)', 'label'=>'Multicurrencytx', 'enabled'=>'1', 'position'=>135, 'notnull'=>0, 'visible'=>-1,), + 'multicurrency_price' => array('type'=>'double(24,8)', 'label'=>'Multicurrencyprice', 'enabled'=>'1', 'position'=>140, 'notnull'=>0, 'visible'=>-1,), + 'multicurrency_unitprice' => array('type'=>'double(24,8)', 'label'=>'Multicurrencyunitprice', 'enabled'=>'1', 'position'=>145, 'notnull'=>0, 'visible'=>-1,), + 'localtax1_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax1tx', 'enabled'=>'1', 'position'=>150, 'notnull'=>0, 'visible'=>-1,), + 'localtax1_type' => array('type'=>'varchar(10)', 'label'=>'Localtax1type', 'enabled'=>'1', 'position'=>155, 'notnull'=>1, 'visible'=>-1,), + 'localtax2_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax2tx', 'enabled'=>'1', 'position'=>160, 'notnull'=>0, 'visible'=>-1,), + 'localtax2_type' => array('type'=>'varchar(10)', 'label'=>'Localtax2type', 'enabled'=>'1', 'position'=>165, 'notnull'=>1, 'visible'=>-1,), + 'barcode' => array('type'=>'varchar(180)', 'label'=>'Barcode', 'enabled'=>'1', 'position'=>170, 'notnull'=>0, 'visible'=>-1,), + 'fk_barcode_type' => array('type'=>'integer', 'label'=>'Fkbarcodetype', 'enabled'=>'1', 'position'=>175, 'notnull'=>0, 'visible'=>-1,), + 'packaging' => array('type'=>'varchar(64)', 'label'=>'Packaging', 'enabled'=>'1', 'position'=>180, 'notnull'=>0, 'visible'=>-1,), + ); + public $rowid; + public $entity; + public $datec; + public $tms; + public $fk_product; + public $fk_soc; + public $ref_fourn; + public $desc_fourn; + public $fk_availability; + public $price; + public $quantity; + public $remise_percent; + public $remise; + public $unitprice; + public $charges; + public $default_vat_code; + public $tva_tx; + public $info_bits; + public $fk_user; + public $fk_supplier_price_expression; + public $import_key; + public $delivery_time_days; + public $supplier_reputation; + public $fk_multicurrency; + public $multicurrency_code; + public $multicurrency_tx; + public $multicurrency_price; + public $multicurrency_unitprice; + public $localtax1_tx; + public $localtax1_type; + public $localtax2_tx; + public $localtax2_type; + public $barcode; + public $fk_barcode_type; + public $packaging; + // END MODULEBUILDER PROPERTIES + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + 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->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + } + + /** + * Create object into database + * + * @param User $user User that creates + * @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) + { + return $this->createCommon($user, $notrigger); + } + + /** + * Clone an object into another one + * + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return mixed New object created, <0 if KO + */ + public function createFromClone(User $user, $fromid) + { + global $langs, $extrafields; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $result = $object->fetchCommon($fromid); + if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); + + // get lines so they will be clone + //foreach($this->lines as $line) + // $line->fetch_optionals(); + + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + if (property_exists($object, 'ref')) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + if (property_exists($object, 'label')) $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + if (property_exists($object, 'status')) { $object->status = self::STATUS_DRAFT; } + if (property_exists($object, 'date_creation')) { $object->date_creation = dol_now(); } + if (property_exists($object, 'date_modification')) { $object->date_modification = null; } + // ... + // Clear extrafields that are unique + if (is_array($object->array_options) && count($object->array_options) > 0) { + $extrafields->fetch_name_optionals_label($this->table_element); + foreach ($object->array_options as $key => $option) { + $shortkey = preg_replace('/options_/', '', $key); + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { + //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; + unset($object->array_options[$key]); + } + } + } + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + if (!$error) { + // copy internal contacts + if ($this->copy_linked_contact($object, 'internal') < 0) { + $error++; + } + } + + if (!$error) { + // copy external contacts if same company + if (property_exists($this, 'socid') && $this->socid == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) + $error++; + } + } + + unset($object->context['createfromclone']); + + // End + if (!$error) { + $this->db->commit(); + return $object; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Load object in memory from the database + * + * @param int $id Id object + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetch($id) + { + return $this->fetchCommon($id); + } + + /** + * Load list of objects in memory from the database. + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit limit + * @param int $offset Offset + * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) + * @param string $filtermode Filter mode (AND or OR) + * @return array|int int <0 if KO, array of pages if OK + */ + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { + global $conf; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $records = array(); + + $sql = 'SELECT '; + $sql .= $this->getFieldList(); + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->element).')'; + else $sql .= ' WHERE 1 = 1'; + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sqlwhere[] = $key.'='.$value; + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + } else { + $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= ' AND ('.implode(' '.$filtermode.' ', $sqlwhere).')'; + } + + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit, $offset); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < ($limit ? min($limit, $num) : $num)) { + $obj = $this->db->fetch_object($resql); + + $record = new self($this->db); + $record->setVarsFromFetchObj($obj); + + $records[$record->id] = $record; + + $i++; + } + $this->db->free($resql); + + return $records; + } else { + $this->errors[] = 'Error '.$this->db->lasterror(); + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + + /** + * Update object into database + * + * @param User $user User that modifies + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update(User $user, $notrigger = false) + { + return $this->updateCommon($user, $notrigger); + } + + /** + * Delete object in database + * + * @param User $user User that deletes + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = false) + { + return $this->deleteCommon($user, $notrigger); + } + + /** + * Validate object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function validate($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_VALIDATED) { + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); + return 0; + } + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + 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 { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Validate + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_VALIDATED; + if (!empty($this->fields['date_validation'])) $sql .= ", date_validation = '".$this->db->idate($now)."'"; + if (!empty($this->fields['fk_user_valid'])) $sql .= ", fk_user_valid = ".$user->id; + $sql .= " WHERE rowid = ".((int) $this->id); + + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('PRODUCTFOURNISSEURPRICE_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 = 'productfournisseurprice/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'productfournisseurprice/".$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->buypricehistory->dir_output.'/productfournisseurprice/'.$oldref; + $dirdest = $conf->buypricehistory->dir_output.'/productfournisseurprice/'.$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->buypricehistory->dir_output.'/productfournisseurprice/'.$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 current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_VALIDATED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDraft($user, $notrigger = 0) + { + // Protection + if ($this->status <= self::STATUS_DRAFT) { + return 0; + } + + return $this->setStatusCommon($user, self::STATUS_DRAFT, $notrigger, 'PRODUCTFOURNISSEURPRICE_UNVALIDATE'); + } + + /** + * Set cancel status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function cancel($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_VALIDATED) { + return 0; + } + + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'PRODUCTFOURNISSEURPRICE_CANCEL'); + } + + /** + * Set back to validated status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, 0=Nothing done, >0 if OK + */ + public function reopen($user, $notrigger = 0) + { + // Protection + if ($this->status != self::STATUS_CANCELED) { + return 0; + } + + return $this->setStatusCommon($user, self::STATUS_VALIDATED, $notrigger, 'PRODUCTFOURNISSEURPRICE_REOPEN'); + } + + /** + * 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 string $option On what the link point to ('nolink', ...) + * @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, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + + $result = ''; + + $label = img_picto('', $this->picto).' <u>'.$langs->trans("ProductFournisseurPrice").'</u>'; + if (isset($this->status)) { + $label .= ' '.$this->getLibStatut(5); + } + $label .= '<br>'; + $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; + + $url = dol_buildpath('/buypricehistory/productfournisseurprice_card.php', 1).'?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("ShowProductFournisseurPrice"); + $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 = '<a href="'.$url.'"'; + $linkstart .= $linkclose.'>'; + $linkend = '</a>'; + + $result .= $linkstart; + + if (empty($this->showphoto_on_popup)) { + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } else { + if ($withpicto) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + list($class, $module) = explode('@', $this->picto); + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); + $filearray = dol_dir_list($upload_dir, "files"); + $filename = $filearray[0]['name']; + if (!empty($filename)) { + $pospoint = strpos($filearray[0]['name'], '.'); + + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); + if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>'; + } else { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>'; + } + + $result .= '</div>'; + } 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); + } + } + } + + if ($withpicto != 2) $result .= $this->ref; + + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('productfournisseurpricedao')); + $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 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 + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * 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, 6=Long label + Picto + * @return string Label of status + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("buypricehistory@buypricehistory"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled'); + } + + $statusType = 'status'.$status; + //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + if ($status == self::STATUS_CANCELED) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } + + /** + * Load the info information in the object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; + $sql .= ' fk_user_creat, fk_user_modif'; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + $sql .= ' WHERE t.rowid = '.((int) $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_cloture) { + $cluser = new User($this->db); + $cluser->fetch($obj->fk_user_cloture); + $this->user_cloture = $cluser; + } + + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); + $this->date_validation = $this->db->jdate($obj->datev); + } + + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->initAsSpecimenCommon(); + } + + /** + * Returns the reference to the following non used object depending on the active numbering module. + * + * @return string Object free reference + */ + public function getNextNumRef() + { + global $langs, $conf; + $langs->load("buypricehistory@buypricehistory"); + + if (empty($conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON)) { + $conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON = 'mod_productfournisseurprice_standard'; + } + + if (!empty($conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON)) { + $mybool = false; + + $file = $conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON.".php"; + $classname = $conf->global->BUYPRICEHISTORY_PRODUCTFOURNISSEURPRICE_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/buypricehistory/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + if (class_exists($classname)) { + $obj = new $classname(); + $numref = $obj->getNextValue($this); + + if ($numref != '' && $numref != '-1') { + return $numref; + } else { + $this->error = $obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + return ""; + } + } else { + print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; + return ""; + } + } else { + print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); + return ""; + } + } + + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @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 + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) + { + global $conf, $langs; + + $result = 0; + $includedocgeneration = 0; + + $langs->load("buypricehistory@buypricehistory"); + + if (!dol_strlen($modele)) { + $modele = 'standard_productfournisseurprice'; + + if (!empty($this->model_pdf)) { + $modele = $this->model_pdf; + } elseif (!empty($conf->global->PRODUCTFOURNISSEURPRICE_ADDON_PDF)) { + $modele = $conf->global->PRODUCTFOURNISSEURPRICE_ADDON_PDF; + } + } + + $modelpath = "core/modules/buypricehistory/doc/"; + + if ($includedocgeneration && !empty($modele)) { + $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + } + + return $result; + } +} diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index c917201b645..a1d92cc492a 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -79,12 +79,24 @@ class Propalmergepdfproduct extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->file_name)) $this->file_name = trim($this->file_name); - if (isset($this->fk_user_author)) $this->fk_user_author = trim($this->fk_user_author); - if (isset($this->fk_user_mod)) $this->fk_user_mod = trim($this->fk_user_mod); - if (isset($this->lang)) $this->lang = trim($this->lang); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->fk_product)) { + $this->fk_product = trim($this->fk_product); + } + if (isset($this->file_name)) { + $this->file_name = trim($this->file_name); + } + if (isset($this->fk_user_author)) { + $this->fk_user_author = trim($this->fk_user_author); + } + if (isset($this->fk_user_mod)) { + $this->fk_user_mod = trim($this->fk_user_mod); + } + if (isset($this->lang)) { + $this->lang = trim($this->lang); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } @@ -120,20 +132,19 @@ class Propalmergepdfproduct extends CommonObject $this->db->begin(); - dol_syslog(__METHOD__, LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."propal_merge_pdf_product"); } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -170,14 +181,12 @@ class Propalmergepdfproduct extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."propal_merge_pdf_product as t"; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -197,7 +206,7 @@ class Propalmergepdfproduct extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } @@ -230,17 +239,15 @@ class Propalmergepdfproduct extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."propal_merge_pdf_product as t"; - $sql .= " WHERE t.fk_product = ".$product_id; + $sql .= " WHERE t.fk_product = ".((int) $product_id); if ($conf->global->MAIN_MULTILANGS && !empty($lang)) { $sql .= " AND t.lang = '".$this->db->escape($lang)."'"; } dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { while ($obj = $this->db->fetch_object($resql)) { $line = new PropalmergepdfproductLine(); @@ -290,10 +297,18 @@ class Propalmergepdfproduct extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->file_name)) $this->file_name = trim($this->file_name); - if (isset($this->fk_user_mod)) $this->fk_user_mod = trim($this->fk_user_mod); - if (isset($this->lang)) $this->lang = trim($this->lang); + if (isset($this->fk_product)) { + $this->fk_product = trim($this->fk_product); + } + if (isset($this->file_name)) { + $this->file_name = trim($this->file_name); + } + if (isset($this->fk_user_mod)) { + $this->fk_user_mod = trim($this->fk_user_mod); + } + if (isset($this->lang)) { + $this->lang = trim($this->lang); + } // Check parameters // Put here code to add a control on parameters values @@ -309,19 +324,19 @@ class Propalmergepdfproduct extends CommonObject $sql .= " fk_user_mod=".$user->id; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -334,13 +349,13 @@ class Propalmergepdfproduct extends CommonObject } - /** - * 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; @@ -348,21 +363,20 @@ class Propalmergepdfproduct extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."propal_merge_pdf_product"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -392,8 +406,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."propal_merge_pdf_product"; $sql .= " WHERE fk_product=".$product_id; @@ -403,14 +416,14 @@ class Propalmergepdfproduct extends CommonObject dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -437,21 +450,20 @@ class Propalmergepdfproduct extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."propal_merge_pdf_product"; $sql .= " WHERE fk_product=".$this->fk_product." AND file_name='".$this->db->escape($this->file_name)."'"; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -493,22 +505,19 @@ class Propalmergepdfproduct extends CommonObject $result = $object->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $object->error; $this->errors = array_merge($this->errors, $object->errors); $error++; } - if (!$error) - { + if (!$error) { } unset($object->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $object->id; } else { diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 8459fa3e479..442232686d3 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -45,15 +45,16 @@ $key = GETPOST('key'); $parent = GETPOST('parent'); // Security check -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); $object = new Product($db); $objectid = 0; -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $objectid = $object->id; $id = $object->id; @@ -64,21 +65,19 @@ if ($id > 0 || !empty($ref)) * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} // Add subproduct to product -if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->service->creer)) { $error = 0; $maxprod = GETPOST("max_prod", 'int'); - for ($i = 0; $i < $maxprod; $i++) - { + for ($i = 0; $i < $maxprod; $i++) { $qty = price2num(GETPOST("prod_qty_".$i, 'alpha'), 'MS'); - if ($qty > 0) - { - if ($object->add_sousproduit($id, GETPOST("prod_id_".$i, 'int'), $qty, GETPOST("prod_incdec_".$i, 'int')) > 0) - { + if ($qty > 0) { + if ($object->add_sousproduit($id, GETPOST("prod_id_".$i, 'int'), $qty, GETPOST("prod_incdec_".$i, 'int')) > 0) { //var_dump($i.' '.GETPOST("prod_id_".$i, 'int'), $qty, GETPOST("prod_incdec_".$i, 'int')); $action = 'edit'; } else { @@ -91,8 +90,7 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se } } } else { - if ($object->del_sousproduit($id, GETPOST("prod_id_".$i, 'int')) > 0) - { + if ($object->del_sousproduit($id, GETPOST("prod_id_".$i, 'int')) > 0) { $action = 'edit'; } else { $error++; @@ -102,20 +100,19 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se } } - if (!$error) - { + if (!$error) { header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } -} elseif ($action === 'save_composed_product') -{ +} elseif ($action === 'save_composed_product') { $TProduct = GETPOST('TProduct', 'array'); - if (!empty($TProduct)) - { - foreach ($TProduct as $id_product => $row) - { - if ($row['qty'] > 0) $object->update_sousproduit($id, $id_product, $row['qty'], isset($row['incdec']) ? 1 : 0); - else $object->del_sousproduit($id, $id_product); + if (!empty($TProduct)) { + foreach ($TProduct as $id_product => $row) { + if ($row['qty'] > 0) { + $object->update_sousproduit($id, $id_product, $row['qty'], isset($row['incdec']) ? 1 : 0); + } else { + $object->del_sousproduit($id, $id_product); + } } setEventMessages('RecordSaved', null); } @@ -132,24 +129,26 @@ $productstatic = new Product($db); $form = new Form($db); // action recherche des produits par mot-cle et/ou par categorie -if ($action == 'search') -{ +if ($action == 'search') { $current_lang = $langs->getDefaultLang(); $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type as type, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,'; $sql .= ' p.fk_product_type, p.tms as datem, p.tobatch'; - if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= ', pl.label as labelm, pl.description as descriptionm'; + $sql .= ', p.tosell as status, p.tobuy as status_buy'; + if (!empty($conf->global->MAIN_MULTILANGS)) { + $sql .= ', pl.label as labelm, pl.description as descriptionm'; + } $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON p.rowid = cp.fk_product'; - if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND lang='".($current_lang)."'"; + if (!empty($conf->global->MAIN_MULTILANGS)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND lang='".($current_lang)."'"; + } $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; - if ($key != "") - { + if ($key != "") { // For natural search $params = array('p.ref', 'p.label', 'p.description', 'p.note'); // multilang - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $params[] = 'pl.label'; $params[] = 'pl.description'; $params[] = 'pl.note'; @@ -159,8 +158,7 @@ if ($action == 'search') } $sql .= natural_search($params, $key); } - if (!empty($conf->categorie->enabled) && !empty($parent) && $parent != -1) - { + if (!empty($conf->categorie->enabled) && !empty($parent) && $parent != -1) { $sql .= " AND cp.fk_categorie ='".$db->escape($parent)."'"; } $sql .= " ORDER BY p.ref ASC"; @@ -169,20 +167,18 @@ if ($action == 'search') } $title = $langs->trans('ProductServiceCard'); -$helpurl = ''; +$help_url = ''; $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('AssociatedProducts'); - $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; + $help_url = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos|DE:Modul_Produkte'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('AssociatedProducts'); - $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; + $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios|DE:Modul_Leistungen'; } -llxHeader('', $title, $helpurl); +llxHeader('', $title, $help_url); $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); @@ -190,41 +186,37 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); print dol_get_fiche_head($head, 'subproduct', $titre, -1, $picto); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { /* * Fiche en mode edition */ - if ($user->rights->produit->lire || $user->rights->service->lire) - { + if ($user->rights->produit->lire || $user->rights->service->lire) { $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', '', '', '', 0, '', '', 0); - if ($object->type != Product::TYPE_SERVICE || !empty($conf->global->STOCK_SUPPORTS_SERVICES) || empty($conf->global->PRODUIT_MULTIPRICES)) - { + if ($object->type != Product::TYPE_SERVICE || !empty($conf->global->STOCK_SUPPORTS_SERVICES) || empty($conf->global->PRODUIT_MULTIPRICES)) { print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent tableforfield">'; // Nature - if ($object->type != Product::TYPE_SERVICE) - { - print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td>'; + if ($object->type != Product::TYPE_SERVICE) { + print '<tr><td class="titlefieldcreate">'.$langs->trans("Nature").'</td><td>'; print $object->getLibFinished(); print '</td></tr>'; } - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { // Price - print '<tr><td class="titlefield">'.$langs->trans("SellingPrice").'</td><td>'; - if ($object->price_base_type == 'TTC') - { + print '<tr><td class="titlefieldcreate">'.$langs->trans("SellingPrice").'</td><td>'; + if ($object->price_base_type == 'TTC') { print price($object->price_ttc).' '.$langs->trans($object->price_base_type); } else { print price($object->price).' '.$langs->trans($object->price_base_type ? $object->price_base_type : 'HT'); @@ -233,8 +225,7 @@ if ($id > 0 || !empty($ref)) // Price minimum print '<tr><td>'.$langs->trans("MinPrice").'</td><td>'; - if ($object->price_base_type == 'TTC') - { + if ($object->price_base_type == 'TTC') { print price($object->price_min_ttc).' '.$langs->trans($object->price_base_type); } else { print price($object->price_min).' '.$langs->trans($object->price_base_type ? $object->price_base_type : 'HT'); @@ -269,16 +260,16 @@ if ($id > 0 || !empty($ref)) print '<td>'.$langs->trans('Label').'</td>'; print '<td>'.$langs->trans('Qty').'</td>'; print '</td>'; - if (count($prodsfather) > 0) - { - foreach ($prodsfather as $value) - { + if (count($prodsfather) > 0) { + foreach ($prodsfather as $value) { $idprod = $value["id"]; $productstatic->id = $idprod; // $value["id"]; $productstatic->type = $value["fk_product_type"]; $productstatic->ref = $value['ref']; $productstatic->label = $value['label']; $productstatic->entity = $value['entity']; + $productstatic->status = $value['status']; + $productstatic->status_buy = $value['status_buy']; print '<tr class="oddeven">'; print '<td>'.$productstatic->getNomUrl(1, 'composition').'</td>'; @@ -314,7 +305,9 @@ if ($id > 0 || !empty($ref)) print '<td>'.$langs->trans('Label').'</td>'; print '<td class="right" colspan="2">'.$langs->trans('MinSupplierPrice').'</td>'; print '<td class="right" colspan="2">'.$langs->trans('MinCustomerPrice').'</td>'; - if (!empty($conf->stock->enabled)) print '<td class="right">'.$langs->trans('Stock').'</td>'; + if (!empty($conf->stock->enabled)) { + print '<td class="right">'.$langs->trans('Stock').'</td>'; + } print '<td class="center">'.$langs->trans('Qty').'</td>'; print '<td class="center">'.$langs->trans('ComposedProductIncDecStock').'</td>'; print '</tr>'."\n"; @@ -335,11 +328,13 @@ if ($id > 0 || !empty($ref)) // Best buying price print '<td class="right">'; - if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) - { + if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) { print $langs->trans("BuyingPriceMinShort").': '; - if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0, 0); - else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; } + if ($product_fourn->product_fourn_price_id > 0) { + print $product_fourn->display_price_product_fournisseur(0, 0); + } else { + print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; + } } print '</td>'; @@ -358,8 +353,7 @@ if ($id > 0 || !empty($ref)) // Best selling price $pricesell = $productstatic->price; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { $pricesell = 'Variable'; } else { $totallinesell = price2num($value['nb'] * ($pricesell), 'MT'); @@ -367,16 +361,20 @@ if ($id > 0 || !empty($ref)) } print '<td class="right" colspan="2">'; print ($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x' : '')); - if (is_numeric($pricesell)) print price($pricesell, '', '', 0, 0, -1, $conf->currency); - else print $langs->trans($pricesell); + if (is_numeric($pricesell)) { + print price($pricesell, '', '', 0, 0, -1, $conf->currency); + } else { + print $langs->trans($pricesell); + } print '</td>'; // Stock - if (!empty($conf->stock->enabled)) print '<td class="right">'.$value['stock'].'</td>'; // Real stock + if (!empty($conf->stock->enabled)) { + print '<td class="right">'.$value['stock'].'</td>'; // Real stock + } // Qty + IncDec - if ($user->rights->produit->creer || $user->rights->service->creer) - { + if ($user->rights->produit->creer || $user->rights->service->creer) { print '<td class="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" size="4" class="right" /></td>'; print '<td class="center"><input type="checkbox" name="TProduct['.$productstatic->id.'][incdec]" value="1" '.($value['incdec'] == 1 ? 'checked' : '').' /></td>'; } else { @@ -387,14 +385,18 @@ if ($id > 0 || !empty($ref)) print '</tr>'."\n"; } 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 + 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 + } print '<tr class="oddeven'.$hide.'" id="sub-'.$value['id_parent'].'">'; //$productstatic->ref=$value['label']; $productstatic->ref = $value['ref']; print '<td>'; - for ($i = 0; $i < $value['level']; $i++) print ' &nbsp; &nbsp; '; // Add indentation + for ($i = 0; $i < $value['level']; $i++) { + print ' &nbsp; &nbsp; '; // Add indentation + } print $productstatic->getNomUrl(1, 'composition').'</td>'; print '<td>'.$productstatic->label.'</td>'; @@ -405,7 +407,9 @@ if ($id > 0 || !empty($ref)) print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>'; - if (!empty($conf->stock->enabled)) print '<td></td>'; // Real stock + if (!empty($conf->stock->enabled)) { + print '<td></td>'; // Real stock + } print '<td class="center">'.$value['nb'].'</td>'; print '<td>&nbsp;</td>'; @@ -423,7 +427,9 @@ if ($id > 0 || !empty($ref)) print '</td>'; print '<td class="liste_total right">'; - if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + if ($atleastonenotdefined) { + print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + } print ($atleastonenotdefined ? '' : price($total, '', '', 0, 0, -1, $conf->currency)); print '</td>'; @@ -433,23 +439,28 @@ if ($id > 0 || !empty($ref)) print '</td>'; print '<td class="liste_total right">'; - if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + if ($atleastonenotdefined) { + print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + } print ($atleastonenotdefined ? '' : price($totalsell, '', '', 0, 0, -1, $conf->currency)); print '</td>'; // Stock - if (!empty($conf->stock->enabled)) print '<td class="liste_total right">&nbsp;</td>'; + if (!empty($conf->stock->enabled)) { + print '<td class="liste_total right">&nbsp;</td>'; + } print '<td class="right" colspan="2">'; - if ($user->rights->produit->creer || $user->rights->service->creer) - { + if ($user->rights->produit->creer || $user->rights->service->creer) { print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">'; } print '</td>'; print '</tr>'."\n"; } else { $colspan = 8; - if (!empty($conf->stock->enabled)) $colspan++; + if (!empty($conf->stock->enabled)) { + $colspan++; + } print '<tr class="oddeven">'; print '<td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td>'; @@ -468,12 +479,13 @@ if ($id > 0 || !empty($ref)) // Form with product to add - if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer)) - { + if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer)) { print '<br>'; $rowspan = 1; - if (!empty($conf->categorie->enabled)) $rowspan++; + if (!empty($conf->categorie->enabled)) { + $rowspan++; + } print load_fiche_titre($langs->trans("ProductToAddSearch"), '', ''); print '<form action="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$id.'" method="POST">'; @@ -484,8 +496,7 @@ if ($id > 0 || !empty($ref)) print $langs->trans("KeywordFilter").': '; print '<input type="text" name="key" value="'.$key.'"> &nbsp; '; print '</div>'; - if (!empty($conf->categorie->enabled)) - { + if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '<div class="inline-block">'.$langs->trans("CategoryFilter").': '; print $form->select_all_categories(Categorie::TYPE_PRODUCT, $parent, 'parent').' &nbsp; </div>'; @@ -499,8 +510,7 @@ if ($id > 0 || !empty($ref)) // List of products - if ($action == 'search') - { + if ($action == 'search') { print '<br>'; print '<form action="'.DOL_URL_ROOT.'/product/composition/card.php?id='.$id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -514,42 +524,36 @@ if ($id > 0 || !empty($ref)) print '<th class="liste_titre right">'.$langs->trans("Qty").'</td>'; print '<th class="center">'.$langs->trans('ComposedProductIncDecStock').'</th>'; print '</tr>'; - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num == 0) print '<tr><td colspan="4">'.$langs->trans("NoMatchFound").'</td></tr>'; + if ($num == 0) { + print '<tr><td colspan="4">'.$langs->trans("NoMatchFound").'</td></tr>'; + } $MAX = 100; - while ($i < min($num, $MAX)) - { + while ($i < min($num, $MAX)) { $objp = $db->fetch_object($resql); - if ($objp->rowid != $id) - { + if ($objp->rowid != $id) { // check if a product is not already a parent product of this one $prod_arbo = new Product($db); $prod_arbo->id = $objp->rowid; // This type is not supported (not required to have virtual products working). - if ($prod_arbo->type == Product::TYPE_ASSEMBLYKIT || $prod_arbo->type == Product::TYPE_STOCKKIT) - { + if ($prod_arbo->type == Product::TYPE_ASSEMBLYKIT || $prod_arbo->type == Product::TYPE_STOCKKIT) { $is_pere = 0; $prod_arbo->get_sousproduits_arbo(); // associations sousproduits $prods_arbo = $prod_arbo->get_arbo_each_prod(); - if (count($prods_arbo) > 0) - { - foreach ($prods_arbo as $key => $value) - { - if ($value[1] == $id) - { + if (count($prods_arbo) > 0) { + foreach ($prods_arbo as $key => $value) { + if ($value[1] == $id) { $is_pere = 1; } } } - if ($is_pere == 1) - { + if ($is_pere == 1) { $i++; continue; } @@ -563,17 +567,20 @@ if ($id > 0 || !empty($ref)) $productstatic->label = $objp->label; $productstatic->type = $objp->type; $productstatic->entity = $objp->entity; + $productstatic->status = $objp->status; + $productstatic->status_buy = $objp->status_buy; $productstatic->status_batch = $objp->tobatch; print '<td>'.$productstatic->getNomUrl(1, '', 24).'</td>'; $labeltoshow = $objp->label; - if ($conf->global->MAIN_MULTILANGS && $objp->labelm) $labeltoshow = $objp->labelm; + if ($conf->global->MAIN_MULTILANGS && $objp->labelm) { + $labeltoshow = $objp->labelm; + } print '<td>'.$labeltoshow.'</td>'; - if ($object->is_sousproduit($id, $objp->rowid)) - { + if ($object->is_sousproduit($id, $objp->rowid)) { //$addchecked = ' checked'; $qty = $object->is_sousproduit_qty; $incdec = $object->is_sousproduit_incdec; @@ -590,8 +597,9 @@ if ($id > 0 || !empty($ref)) // Inc Dec print '<td class="center">'; - if ($qty) print '<input type="checkbox" name="prod_incdec_'.$i.'" value="1" '.($incdec ? 'checked' : '').'>'; - else { + if ($qty) { + print '<input type="checkbox" name="prod_incdec_'.$i.'" value="1" '.($incdec ? 'checked' : '').'>'; + } else { // TODO Hide field and show it when setting a qty print '<input type="checkbox" name="prod_incdec_'.$i.'" value="1" checked>'; //print '<input type="checkbox" disabled name="prod_incdec_'.$i.'" value="1" checked>'; @@ -616,8 +624,7 @@ if ($id > 0 || !empty($ref)) print '</table>'; print '<input type="hidden" name="max_prod" value="'.$i.'">'; - if ($num > 0) - { + if ($num > 0) { print '<br><div class="center">'; print '<input type="submit" class="button" name="save" value="'.$langs->trans("Add").'/'.$langs->trans("Update").'">'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; diff --git a/htdocs/product/composition/index.html b/htdocs/product/composition/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 76b54df8d35..af44521dc05 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) +if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('other', 'products')); @@ -48,8 +49,9 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); +if ($user->socid) { + $socid = $user->socid; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('productdocuments')); @@ -59,32 +61,44 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $object = new Product($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); - if (!empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); - elseif (!empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); + if (!empty($conf->product->enabled)) { + $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); + } elseif (!empty($conf->service->enabled)) { + $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); + } - 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 = 'produit'; $permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); +$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); + /* * Actions @@ -92,15 +106,14 @@ $permissiontoadd = (($object->type == Product::TYPE_PRODUCT && $user->rights->pr $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Delete line if product propal merge is linked to a file - if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) - { - if ($action == 'confirm_deletefile' && $confirm == 'yes') - { + if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { + if ($action == 'confirm_deletefile' && $confirm == 'yes') { //extract file name $urlfile = GETPOST('urlfile', 'alpha'); $filename = basename($urlfile); @@ -115,11 +128,10 @@ if (empty($reshook)) } // Action submit/delete file/link - include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } -if ($action == 'filemerge') -{ +if ($action == 'filemerge') { $is_refresh = GETPOST('refresh'); if (empty($is_refresh)) { $filetomerge_file_array = GETPOST('filetoadd'); @@ -171,13 +183,11 @@ $form = new Form($db); $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Documents'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Documents'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } @@ -185,8 +195,7 @@ if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) llxHeader('', $title, $helpurl); -if ($object->id) -{ +if ($object->id) { $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -196,20 +205,20 @@ if ($object->id) $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { // For backward compatiblity, we scan also old dirs $filearrayold = dol_dir_list($upload_dirold, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $filearray = array_merge($filearray, $filearrayold); } $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -218,7 +227,9 @@ if ($object->id) $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; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -241,8 +252,7 @@ if ($object->id) // Merge propal PDF document PDF files - if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) - { + if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) { $filetomerge = new Propalmergepdfproduct($db); if ($conf->global->MAIN_MULTILANGS) { @@ -257,14 +267,12 @@ if ($object->id) $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs - { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { // For backward compatiblity, we scan also old dirs $filearray = array_merge($filearray, dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1)); } // For each file build select list with PDF extention - if (count($filearray) > 0) - { + if (count($filearray) > 0) { print '<br>'; // Actual file to merge is : if (count($filetomerge->lines) > 0) { @@ -299,23 +307,18 @@ if ($object->id) print '</td></tr>'; } - foreach ($filearray as $filetoadd) - { - if ($ext = pathinfo($filetoadd['name'], PATHINFO_EXTENSION) == 'pdf') - { + foreach ($filearray as $filetoadd) { + if ($ext = pathinfo($filetoadd['name'], PATHINFO_EXTENSION) == 'pdf') { $checked = ''; $filename = $filetoadd['name']; - if ($conf->global->MAIN_MULTILANGS) - { - if (array_key_exists($filetoadd['name'].'_'.$default_lang, $filetomerge->lines)) - { + if ($conf->global->MAIN_MULTILANGS) { + if (array_key_exists($filetoadd['name'].'_'.$default_lang, $filetomerge->lines)) { $filename = $filetoadd['name'].' - '.$langs->trans('Language_'.$default_lang); $checked = ' checked '; } } else { - if (array_key_exists($filetoadd['name'], $filetomerge->lines)) - { + if (array_key_exists($filetoadd['name'], $filetomerge->lines)) { $checked = ' checked '; } } diff --git a/htdocs/product/dynamic_price/class/index.html b/htdocs/product/dynamic_price/class/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/product/dynamic_price/class/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 218780cce44..db0c427c334 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -80,8 +80,12 @@ class PriceExpression $error = 0; // Clean parameters - if (isset($this->title)) $this->title = trim($this->title); - if (isset($this->expression)) $this->expression = trim($this->expression); + if (isset($this->title)) { + $this->title = trim($this->title); + } + if (isset($this->expression)) { + $this->expression = trim($this->expression); + } // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element." ("; @@ -95,10 +99,11 @@ class PriceExpression dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); //if (! $notrigger) @@ -114,10 +119,8 @@ class PriceExpression } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -139,23 +142,20 @@ class PriceExpression public function fetch($id) { // Check parameters - if (empty($id)) - { + if (empty($id)) { $this->error = 'ErrorWrongParameters'; return -1; } $sql = "SELECT title, expression"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $this->id = $id; $this->title = $obj->title; $this->expression = $obj->expression; @@ -184,12 +184,10 @@ class PriceExpression dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { $price_expression_obj = new PriceExpression($this->db); $price_expression_obj->id = $record["rowid"]; $price_expression_obj->title = $record["title"]; @@ -222,11 +220,9 @@ class PriceExpression dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { return (int) $obj->rowid; } else { return 0; @@ -250,8 +246,12 @@ class PriceExpression $error = 0; // Clean parameters - if (isset($this->title)) $this->title = trim($this->title); - if (isset($this->expression)) $this->expression = trim($this->expression); + if (isset($this->title)) { + $this->title = trim($this->title); + } + if (isset($this->expression)) { + $this->expression = trim($this->expression); + } // Update request $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; @@ -263,7 +263,9 @@ class PriceExpression dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // if (! $error) // { @@ -280,10 +282,8 @@ class PriceExpression // } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -325,21 +325,20 @@ class PriceExpression // } //} - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } 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 fbe5956db7c..5286b932ca7 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -100,14 +100,14 @@ class PriceGlobalVariable dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - if (!$notrigger) - { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. @@ -119,10 +119,8 @@ class PriceGlobalVariable } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -145,15 +143,13 @@ class PriceGlobalVariable { $sql = "SELECT code, description, value"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $this->id = $id; $this->code = $obj->code; $this->description = $obj->description; @@ -193,7 +189,9 @@ class PriceGlobalVariable dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // if (! $error) // { @@ -210,10 +208,8 @@ class PriceGlobalVariable // } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -240,10 +236,8 @@ class PriceGlobalVariable $this->db->begin(); - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. @@ -254,21 +248,20 @@ class PriceGlobalVariable } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -302,11 +295,17 @@ class PriceGlobalVariable public function checkParameters() { // Clean parameters - if (isset($this->code)) $this->code = trim($this->code); - if (isset($this->description)) $this->description = trim($this->description); + if (isset($this->code)) { + $this->code = trim($this->code); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } // Check parameters - if (empty($this->value) || !is_numeric($this->value)) $this->value = 0; + if (empty($this->value) || !is_numeric($this->value)) { + $this->value = 0; + } } /** @@ -322,12 +321,10 @@ class PriceGlobalVariable dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { $variable_obj = new PriceGlobalVariable($this->db); $variable_obj->id = $record["rowid"]; $variable_obj->code = $record["code"]; 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 256e3525ead..172c004a2d7 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 @@ -116,14 +116,14 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - if (!$notrigger) - { + if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. @@ -135,10 +135,8 @@ class PriceGlobalVariableUpdater } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -161,15 +159,13 @@ class PriceGlobalVariableUpdater { $sql = "SELECT type, description, parameters, fk_variable, update_interval, next_update, last_status"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $this->id = $id; $this->type = $obj->type; $this->description = $obj->description; @@ -217,7 +213,9 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // if (! $error) // { @@ -234,10 +232,8 @@ class PriceGlobalVariableUpdater // } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -277,21 +273,20 @@ class PriceGlobalVariableUpdater // } //} - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -345,15 +340,28 @@ class PriceGlobalVariableUpdater public function checkParameters() { // Clean parameters - if (isset($this->description)) $this->description = trim($this->description); - if (isset($this->parameters)) $this->parameters = trim($this->parameters); - else $this->parameters = ""; - if (isset($this->last_status)) $this->last_status = trim($this->last_status); + if (isset($this->description)) { + $this->description = trim($this->description); + } + if (isset($this->parameters)) { + $this->parameters = trim($this->parameters); + } else { + $this->parameters = ""; + } + if (isset($this->last_status)) { + $this->last_status = trim($this->last_status); + } // Check parameters - if (empty($this->type) || !is_numeric($this->type) || !in_array($this->type, $this->types)) $this->type = 0; - if (empty($this->update_interval) || !is_numeric($this->update_interval) || $this->update_interval < 1) $this->update_interval = $this->update_min; - if (empty($this->next_update) || !is_numeric($this->next_update) || $this->next_update < 0) $this->next_update = 0; + if (empty($this->type) || !is_numeric($this->type) || !in_array($this->type, $this->types)) { + $this->type = 0; + } + if (empty($this->update_interval) || !is_numeric($this->update_interval) || $this->update_interval < 1) { + $this->update_interval = $this->update_min; + } + if (empty($this->next_update) || !is_numeric($this->next_update) || $this->next_update < 0) { + $this->next_update = 0; + } } /** @@ -368,12 +376,10 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { $updater_obj = new PriceGlobalVariableUpdater($this->db); $updater_obj->id = $record["rowid"]; $updater_obj->type = $record["type"]; @@ -408,12 +414,10 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $retarray = array(); - while ($record = $this->db->fetch_array($resql)) - { + while ($record = $this->db->fetch_array($resql)) { $updater_obj = new PriceGlobalVariableUpdater($this->db); $updater_obj->id = $record["rowid"]; $updater_obj->type = $record["type"]; @@ -483,7 +487,7 @@ class PriceGlobalVariableUpdater if ($this->type == 0) { // Call JSON request include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - $tmpresult = getURLContent($url); + $tmpresult = getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 0); $code = $tmpresult['http_code']; $result = $tmpresult['content']; @@ -572,13 +576,13 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -616,13 +620,13 @@ class PriceGlobalVariableUpdater dol_syslog(__METHOD__); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 47cb58c2a7f..3d28f4b6011 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -64,53 +64,49 @@ class PriceParser global $langs; $langs->load("errors"); /* - -No arg - 9, an unexpected error occured - 14, division by zero - 19, expression not found - 20, empty expression + -No arg + 9, an unexpected error occured + 14, division by zero + 19, expression not found + 20, empty expression - -1 Arg - 1, cannot assign to constant '%s' - 2, cannot redefine built-in function '%s' - 3, undefined variable '%s' in function definition - 4, illegal character '%s' - 5, unexpected '%s' - 8, unexpected operator '%s' - 10, operator '%s' lacks operand - 11, expecting '%s' - 17, undefined variable '%s' - 21, empty result '%s' - 22, negative result '%s' - 24, variable '%s' exists but has no value + -1 Arg + 1, cannot assign to constant '%s' + 2, cannot redefine built-in function '%s' + 3, undefined variable '%s' in function definition + 4, illegal character '%s' + 5, unexpected '%s' + 8, unexpected operator '%s' + 10, operator '%s' lacks operand + 11, expecting '%s' + 17, undefined variable '%s' + 21, empty result '%s' + 22, negative result '%s' + 24, variable '%s' exists but has no value - -2 Args - 6, wrong number of arguments (%s given, %s expected) - 23, unknown or non set variable '%s' after %s + -2 Args + 6, wrong number of arguments (%s given, %s expected) + 23, unknown or non set variable '%s' after %s - -internal errors - 7, internal error - 12, internal error - 13, internal error - 15, internal error - 16, internal error - 18, internal error - */ + -internal errors + 7, internal error + 12, internal error + 13, internal error + 15, internal error + 16, internal error + 18, internal error + */ if (empty($this->error_parser)) { return $langs->trans("ErrorPriceExpressionUnknown", 0); //this is not supposed to happen } list($code, $info) = $this->error_parser; - if (in_array($code, array(9, 14, 19, 20))) //Errors which have 0 arg - { + 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 { @@ -140,8 +136,7 @@ class PriceParser } //Check if empty $expression = trim($expression); - if (empty($expression)) - { + if (empty($expression)) { $this->error_parser = array(20, null); return -2; } @@ -161,10 +156,8 @@ class PriceParser $extrafields = new ExtraFields($this->db); $extrafields->fetch_name_optionals_label('product', true); $product->fetch_optionals(); - if (is_array($extrafields->attributes[$product->table_element]['label'])) - { - foreach ($extrafields->attributes[$product->table_element]['label'] as $key=>$label) - { + if (is_array($extrafields->attributes[$product->table_element]['label'])) { + foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) { $values["extrafield_".$key] = $product->array_options['options_'.$key]; } } @@ -182,8 +175,7 @@ class PriceParser //Get all global values $price_globals = new PriceGlobalVariable($this->db); - foreach ($price_globals->listGlobalVariables() as $entry) - { + foreach ($price_globals->listGlobalVariables() as $entry) { $values["global_".$entry->code] = $entry->value; } @@ -198,8 +190,7 @@ class PriceParser //Fill each variable in expression from values $expression = str_replace("\n", $this->separator_chr, $expression); - foreach ($values as $key => $value) - { + foreach ($values as $key => $value) { if ($value === null && strpos($expression, $key) !== false) { $this->error_parser = array(24, $key); return -7; @@ -208,11 +199,12 @@ class PriceParser } //Check if there is unfilled variable - if (strpos($expression, $this->special_chr) !== false) - { + if (strpos($expression, $this->special_chr) !== false) { $data = explode($this->special_chr, $expression); $variable = $this->special_chr.$data[1]; - if (isset($data[2])) $variable .= $this->special_chr; + if (isset($data[2])) { + $variable .= $this->special_chr; + } $this->error_parser = array(23, array($variable, $expression)); return -6; } @@ -222,8 +214,7 @@ class PriceParser $expressions = array_slice($expressions, 0, $this->limit); foreach ($expressions as $expr) { $expr = trim($expr); - if (!empty($expr)) - { + if (!empty($expr)) { $last_result = $em->evaluate($expr); $this->error_parser = $em->last_error_code; if ($this->error_parser !== null) { //$em->last_error_code is null if no error happened, so just check if error_parser is not null @@ -236,13 +227,11 @@ class PriceParser if (empty($vars["price"])) { $vars["price"] = $last_result; } - if (!isset($vars["price"])) - { + if (!isset($vars["price"])) { $this->error_parser = array(21, $expression); return -4; } - if ($vars["price"] < 0) - { + if ($vars["price"] < 0) { $this->error_parser = array(22, $expression); return -5; } @@ -305,8 +294,7 @@ class PriceParser //Get the expression from db $price_expression = new PriceExpression($this->db); $res = $price_expression->fetch($product_supplier->fk_supplier_price_expression); - if ($res < 1) - { + if ($res < 1) { $this->error_parser = array(19, null); return -1; } diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index 24f4856698f..418a71166a8 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -51,11 +51,9 @@ $price_expression = new PriceExpression($db); $price_globals = new PriceGlobalVariable($db); //Fetch expression data -if (empty($eid)) //This also disables fetch when eid == 0 -{ +if (empty($eid)) { //This also disables fetch when eid == 0 $eid = 0; -} elseif ($action != 'delete') -{ +} elseif ($action != 'delete') { $price_expression->fetch($eid); } @@ -64,13 +62,10 @@ if (empty($eid)) //This also disables fetch when eid == 0 * Actions */ -if ($action == 'add') -{ - if ($eid == 0) - { +if ($action == 'add') { + if ($eid == 0) { $result = $price_expression->find_title($title); - if ($result == 0) //No existing entry found with title, ok - { + if ($result == 0) { //No existing entry found with title, ok //Check the expression validity by parsing it $priceparser = new PriceParser($db); $price_result = $priceparser->testExpression($id, $expression); @@ -80,16 +75,14 @@ if ($action == 'add') $price_expression->title = $title; $price_expression->expression = $expression; $result = $price_expression->create($user); - if ($result > 0) //created successfully, set the eid to newly created entry - { + if ($result > 0) { //created successfully, set the eid to newly created entry $eid = $price_expression->id; setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } 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 { setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); @@ -97,13 +90,10 @@ if ($action == 'add') } } -if ($action == 'update') -{ - if ($eid != 0) - { +if ($action == 'update') { + if ($eid != 0) { $result = $price_expression->find_title($title); - if ($result == 0 || $result == $eid) //No existing entry found with title or existing one is the current one, ok - { + if ($result == 0 || $result == $eid) { //No existing entry found with title or existing one is the current one, ok //Check the expression validity by parsing it $priceparser = new PriceParser($db); $price_result = $priceparser->testExpression($id, $expression); @@ -114,15 +104,13 @@ if ($action == 'update') $price_expression->title = $title; $price_expression->expression = $expression; $result = $price_expression->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages("update: ".$price_expression->error, $price_expression->errors, 'errors'); } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } } - } elseif ($result < 0) - { + } elseif ($result < 0) { setEventMessages("update find: ".$price_expression->error, $price_expression->errors, 'errors'); } else { setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); @@ -130,14 +118,11 @@ if ($action == 'update') } } -if ($action == 'delete') -{ - if ($eid != 0) - { +if ($action == 'delete') { + if ($eid != 0) { $price_expression->fetch($eid); $result = $price_expression->delete($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages("delete: ".$price_expression->error, $price_expression->errors, 'errors'); } $eid = 0; @@ -202,8 +187,7 @@ print dol_get_fiche_end(); print '<div class="center">'; print '<input type="submit" class="butAction button-save" value="'.$langs->trans("Save").'">'; print '<span id="back" class="butAction">'.$langs->trans("Back").'</span>'; -if ($eid == 0) -{ +if ($eid == 0) { print '<div class="inline-block divButAction"><span id="action-delete" class="butActionRefused classfortooltip">'.$langs->trans('Delete').'</span></div>'."\n"; } else { print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;tab='.$tab.'&amp;eid='.$eid.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans("Delete").'</a></div>'; diff --git a/htdocs/product/dynamic_price/index.html b/htdocs/product/dynamic_price/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/product/dynamic_price/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 51e53cceca8..0d5ea9647f5 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -40,7 +40,9 @@ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; -if (!empty($conf->barcode->enabled)) dol_include_once('/core/class/html.formbarcode.class.php'); +if (!empty($conf->barcode->enabled)) { + dol_include_once('/core/class/html.formbarcode.class.php'); +} // Load translation files required by the page $langs->loadLangs(array('products', 'suppliers', 'bills', 'margins', 'stocks')); @@ -59,72 +61,85 @@ $error = 0; $extrafields = new ExtraFields($db); // If socid provided by ajax company selector -if (!empty($_REQUEST['search_fourn_id'])) -{ - $_GET['id_fourn'] = $_GET['search_fourn_id']; - $_POST['id_fourn'] = $_POST['search_fourn_id']; - $_REQUEST['id_fourn'] = $_REQUEST['search_fourn_id']; +if (!empty($_REQUEST['search_fourn_id'])) { + $_GET['id_fourn'] = GETPOST('search_fourn_id', 'int'); + $_POST['id_fourn'] = GETPOST('search_fourn_id', 'int'); + $_REQUEST['id_fourn'] = GETPOST('search_fourn_id', 'int'); } // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); +if ($user->socid) { + $socid = $user->socid; +} -if (empty($user->rights->fournisseur->lire)) accessforbidden(); +if (empty($user->rights->fournisseur->lire)) { + accessforbidden(); +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = (GETPOST("page", 'int') ?GETPOST("page", 'int') : 0); -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 (!$sortfield) $sortfield = "s.nom"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "s.nom"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('pricesuppliercard', 'globalcard')); $object = new ProductFournisseur($db); -if ($id > 0 || $ref) -{ +if ($id > 0 || $ref) { $object->fetch($id, $ref); } $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -if (!$sortfield) $sortfield = "s.nom"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "s.nom"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); /* * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} $usercanread = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->lire) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->lire)); $usercancreate = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); $parameters = array('socid'=>$socid, 'id_prod'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($action == 'setcost_price') - { - if ($id) - { +if (empty($reshook)) { + if ($action == 'setcost_price') { + if ($id) { $result = $object->fetch($id); $object->cost_price = price2num($cost_price); $result = $object->update($object->id, $user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action = ''; } else { @@ -134,10 +149,8 @@ if (empty($reshook)) } } - if ($action == 'confirm_remove_pf') - { - if ($rowid) // id of product supplier price to remove - { + if ($action == 'confirm_remove_pf') { + if ($rowid) { // id of product supplier price to remove $action = ''; $result = $object->remove_product_fournisseur_price($rowid); if ($result > 0) { @@ -150,18 +163,23 @@ if (empty($reshook)) } } - if ($action == 'save_price') - { + if ($action == 'save_price') { $id_fourn = GETPOST("id_fourn"); - if (empty($id_fourn)) $id_fourn = GETPOST("search_id_fourn"); + if (empty($id_fourn)) { + $id_fourn = GETPOST("search_id_fourn"); + } $ref_fourn = GETPOST("ref_fourn"); - if (empty($ref_fourn)) $ref_fourn = GETPOST("search_ref_fourn"); + if (empty($ref_fourn)) { + $ref_fourn = GETPOST("search_ref_fourn"); + } $ref_fourn_old = GETPOST("ref_fourn_old"); - if (empty($ref_fourn_old)) $ref_fourn_old = $ref_fourn; + if (empty($ref_fourn_old)) { + $ref_fourn_old = $ref_fourn; + } $quantity = price2num(GETPOST("qty", 'nohtml'), 'MS'); $remise_percent = price2num(GETPOST('remise_percent', 'alpha')); - $npr = preg_match('/\*/', $_POST['tva_tx']) ? 1 : 0; + $npr = preg_match('/\*/', GETPOST('tva_tx', 'alpha')) ? 1 : 0; $tva_tx = str_replace('*', '', GETPOST('tva_tx', 'alpha')); if (!preg_match('/\((.*)\)/', $tva_tx)) { $tva_tx = price2num($tva_tx); @@ -175,40 +193,33 @@ if (empty($reshook)) $fk_barcode_type = GETPOST('fk_barcode_type', 'int'); $packaging = price2num(GETPOST("packaging", 'alphanohtml'), 'MS'); - if ($tva_tx == '') - { + if ($tva_tx == '') { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("VATRateForSupplierProduct")), null, 'errors'); } - if (!is_numeric($tva_tx)) - { + if (!is_numeric($tva_tx)) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("VATRateForSupplierProduct")), null, 'errors'); } - if (empty($quantity)) - { + if (empty($quantity)) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), null, 'errors'); } - if (empty($ref_fourn)) - { + if (empty($ref_fourn)) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefSupplier")), null, 'errors'); } - if ($id_fourn <= 0) - { + if ($id_fourn <= 0) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Supplier")), null, 'errors'); } - if (price2num($_POST["price"]) < 0 || $_POST["price"] == '') - { - if ($price_expression === '') // Return error of missing price only if price_expression not set - { + if (price2num(GETPOST("price")) < 0 || GETPOST("price") == '') { + if ($price_expression === '') { // Return error of missing price only if price_expression not set $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), null, 'errors'); @@ -217,47 +228,42 @@ if (empty($reshook)) } } if (!empty($conf->multicurrency->enabled)) { - if (empty($_POST["multicurrency_code"])) { + if (!GETPOST("multicurrency_code")) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Currency")), null, 'errors'); } - if (price2num($_POST["multicurrency_tx"]) <= 0 || $_POST["multicurrency_tx"] == '') { + if (price2num(GETPOST("multicurrency_tx")) <= 0 || GETPOST("multicurrency_tx") == '') { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("CurrencyRate")), null, 'errors'); } - if (price2num($_POST["multicurrency_price"]) < 0 || $_POST["multicurrency_price"] == '') { + if (price2num(GETPOST("multicurrency_price")) < 0 || GETPOST("multicurrency_price") == '') { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PriceCurrency")), null, 'errors'); } } - if (!$error) - { + if (!$error) { $db->begin(); - if (!$error) - { + if (!$error) { $ret = $object->add_fournisseur($user, $id_fourn, $ref_fourn_old, $quantity); // This insert record with no value for price. Values are update later with update_buyprice - if ($ret == -3) - { + if ($ret == -3) { $error++; $object->fetch($object->product_id_already_linked); $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'); } } - if (!$error) - { + if (!$error) { $supplier = new Fournisseur($db); $result = $supplier->fetch($id_fourn); if (GETPOSTISSET('ref_fourn_price_id')) { @@ -285,7 +291,7 @@ if (empty($reshook)) foreach ($extrafield_values as $key => $value) { $sql .= str_replace('options_', '', $key).' = "'.$value.'", '; } - $sql = substr($sql, 0, strlen($sql) - 2).' WHERE fk_object = '.$object->product_fourn_price_id; + $sql = substr($sql, 0, strlen($sql) - 2).' WHERE fk_object = '.((int) $object->product_fourn_price_id); } // Execute the sql command from above @@ -294,12 +300,15 @@ if (empty($reshook)) $newprice = price2num(GETPOST("price", "alpha")); - if (empty($packaging)) $packaging = 1; - if ($packaging < $quantity) $packaging = $quantity; + if (empty($packaging)) { + $packaging = 1; + } + if ($packaging < $quantity) { + $packaging = $quantity; + } $object->packaging = $packaging; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $multicurrency_tx = price2num(GETPOST("multicurrency_tx", 'alpha')); $multicurrency_price = price2num(GETPOST("multicurrency_price", 'alpha')); $multicurrency_code = GETPOST("multicurrency_code", 'alpha'); @@ -308,13 +317,11 @@ if (empty($reshook)) } else { $ret = $object->update_buyprice($quantity, $newprice, $user, GETPOST("price_base_type"), $supplier, GETPOST("oselDispo"), $ref_fourn, $tva_tx, GETPOST("charges"), $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', 0, 'HT', 1, '', $supplier_description, $barcode, $fk_barcode_type); } - if ($ret < 0) - { + if ($ret < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } else { - if (!empty($conf->dynamicprices->enabled) && $price_expression !== '') - { + if (!empty($conf->dynamicprices->enabled) && $price_expression !== '') { //Check the expression validity by parsing it $priceparser = new PriceParser($db); $object->fk_supplier_price_expression = $price_expression; @@ -324,12 +331,10 @@ if (empty($reshook)) setEventMessages($priceparser->translatedError(), null, 'errors'); } } - if (!$error && !empty($conf->dynamicprices->enabled)) - { + if (!$error && !empty($conf->dynamicprices->enabled)) { //Set the price expression for this supplier price $ret = $object->setSupplierPriceExpression($price_expression); - if ($ret < 0) - { + if ($ret < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -337,8 +342,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); $action = ''; } else { @@ -355,36 +359,31 @@ if (empty($reshook)) * view */ +$form = new Form($db); + $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('BuyingPrices'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('BuyingPrices'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs'); -$form = new Form($db); - -if ($id > 0 || $ref) -{ - if ($result) - { +if ($id > 0 || $ref) { + if ($result) { if ($action == 'ask_remove_pf') { $form = new Form($db); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&rowid='.$rowid, $langs->trans('DeleteProductBuyPrice'), $langs->trans('ConfirmDeleteProductBuyPrice'), 'confirm_remove_pf', '', 0, 1); echo $formconfirm; } - if ($action <> 'edit' && $action <> 're-edit') - { + if ($action <> 'edit' && $action <> 're-edit') { $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -395,7 +394,9 @@ if ($id > 0 || $ref) $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; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -417,7 +418,9 @@ if ($id > 0 || $ref) // PMP print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>'; print '<td>'; - if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT"); + if ($object->pmp > 0) { + print price($object->pmp).' '.$langs->trans("HT"); + } print '</td>'; print '</tr>'; @@ -425,10 +428,12 @@ if ($id > 0 || $ref) print '<tr><td class="titlefieldcreate">'.$langs->trans("BuyingPriceMin").'</td>'; print '<td colspan="2">'; $product_fourn = new ProductFournisseur($db); - if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0) - { - if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(); - else print $langs->trans("NotDefined"); + if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0) { + if ($product_fourn->product_fourn_price_id > 0) { + print $product_fourn->display_price_product_fournisseur(); + } else { + print $langs->trans("NotDefined"); + } } print '</td></tr>'; @@ -441,12 +446,10 @@ if ($id > 0 || $ref) // Form to add or update a price - if (($action == 'add_price' || $action == 'update_price') && $usercancreate) - { + if (($action == 'add_price' || $action == 'update_price') && $usercancreate) { $langs->load("suppliers"); - if ($rowid) - { + if ($rowid) { $object->fetch_product_fournisseur_price($rowid, 1); //Ignore the math expression when getting the price print load_fiche_titre($langs->trans("ChangeSupplierPrice")); } else { @@ -463,8 +466,7 @@ if ($id > 0 || $ref) // Supplier print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Supplier").'</td><td>'; - if ($rowid) - { + if ($rowid) { $supplier = new Fournisseur($db); $supplier->fetch($socid); print $supplier->getNomUrl(1); @@ -479,10 +481,8 @@ if ($id > 0 || $ref) $parameters = array('filtre'=>"fournisseur=1", 'html_name'=>'id_fourn', 'selected'=>GETPOST("id_fourn"), 'showempty'=>1, 'prod_id'=>$object->id); $reshook = $hookmanager->executeHooks('formCreateThirdpartyOptions', $parameters, $object, $action); - if (empty($reshook)) - { - if (empty($form->result)) - { + if (empty($reshook)) { + if (empty($form->result)) { print ' - <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&type=f&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id.'&action='.$action).'">'.$langs->trans("CreateDolibarrThirdPartySupplier").'</a>'; } } @@ -491,8 +491,7 @@ if ($id > 0 || $ref) // Ref supplier print '<tr><td class="fieldrequired">'.$langs->trans("SupplierRef").'</td><td>'; - if ($rowid) - { + if ($rowid) { print '<input type="hidden" name="ref_fourn_old" value="'.$object->ref_supplier.'">'; print '<input class="flat width150" maxlength="30" name="ref_fourn" value="'.$object->ref_supplier.'">'; } else { @@ -502,8 +501,7 @@ if ($id > 0 || $ref) print '</tr>'; // Availability - if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) - { + if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) { $langs->load("propal"); print '<tr><td>'.$langs->trans("Availability").'</td><td>'; $form->selectAvailabilityDelay($object->fk_availability, "oselDispo", 1); @@ -515,8 +513,7 @@ if ($id > 0 || $ref) print '<td class="fieldrequired">'.$langs->trans("QtyMin").'</td>'; print '<td>'; $quantity = GETPOSTISSET('qty') ? price2num(GETPOST('qty', 'nohtml'), 'MS') : "1"; - if ($rowid) - { + if ($rowid) { print '<input type="hidden" name="qty" value="'.$object->fourn_qty.'">'; print $object->fourn_qty; } else { @@ -558,20 +555,20 @@ if ($id > 0 || $ref) $mysoc2->tva_assuj = 1; $default_vat = get_default_tva($mysoc2, $mysoc, $object->id, 0); $default_npr = get_default_npr($mysoc2, $mysoc, $object->id, 0); - if (empty($default_vat)) $default_npr = $default_vat; + if (empty($default_vat)) { + $default_npr = $default_vat; + } print '<tr><td class="fieldrequired">'.$langs->trans("VATRateForSupplierProduct").'</td>'; print '<td>'; //print $form->load_tva('tva_tx',$object->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country - if (!empty($rowid)) // If we have a supplier, it is an update, we must show the vat of current supplier price - { + if (!empty($rowid)) { // If we have a supplier, it is an update, we must show the vat of current supplier price $tmpproductsupplier = new ProductFournisseur($db); $tmpproductsupplier->fetch_product_fournisseur_price($rowid, 1); $default_vat = $tmpproductsupplier->fourn_tva_tx; $default_npr = $tmpproductsupplier->fourn_tva_npr; } else { - if (empty($default_vat)) - { + if (empty($default_vat)) { $default_vat = $object->tva_tx; } } @@ -580,8 +577,7 @@ if ($id > 0 || $ref) print '<input type="text" class="flat" size="5" name="tva_tx" value="'.$vattosuggest.'">'; print '</td></tr>'; - if (!empty($conf->dynamicprices->enabled)) //Only show price mode and expression selector if module is enabled - { + if (!empty($conf->dynamicprices->enabled)) { //Only show price mode and expression selector if module is enabled // Price mode selector print '<tr><td class="fieldrequired">'.$langs->trans("PriceMode").'</td><td>'; $price_expression = new PriceExpression($db); @@ -619,7 +615,9 @@ if ($id > 0 || $ref) print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>'; print '<td>'; $currencycodetouse = GETPOST('multicurrency_code') ?GETPOST('multicurrency_code') : (isset($object->fourn_multicurrency_code) ? $object->fourn_multicurrency_code : ''); - if (empty($currencycodetouse) && $object->fourn_multicurrency_tx == 1) $currencycodetouse = $conf->currency; + if (empty($currencycodetouse) && $object->fourn_multicurrency_tx == 1) { + $currencycodetouse = $conf->currency; + } print $form->selectMultiCurrency($currencycodetouse, "multicurrency_code", 1); print ' &nbsp; '.$langs->trans("CurrencyRate").' '; print '<input class="flat" name="multicurrency_tx" size="4" value="'.vatrate(GETPOST('multicurrency_tx') ? GETPOST('multicurrency_tx') : (isset($object->fourn_multicurrency_tx) ? $object->fourn_multicurrency_tx : '')).'">'; @@ -701,14 +699,14 @@ END; print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMin").'</td>'; print '<td><input class="flat" name="price" size="8" value="'.(GETPOST('price') ? price(GETPOST('price')) : (isset($object->fourn_price) ? price($object->fourn_price) : '')).'">'; print '&nbsp;'; - print $form->selectPriceBaseType((GETPOST('price_base_type') ? GETPOST('price_base_type') : 'HT'), "price_base_type"); // We keep 'HT' here, price_base_type is not yet supported for supplier prices + print $form->selectPriceBaseType((GETPOSTISSET('price_base_type') ? GETPOST('price_base_type') : 'HT'), "price_base_type"); // We keep 'HT' here, price_base_type is not yet supported for supplier prices print '</td></tr>'; } // Discount qty min print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>'; - print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOST('remise_percent') ?vatrate(GETPOST('remise_percent')) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %'; + print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), 2)) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %'; print '</td>'; print '</tr>'; @@ -724,8 +722,7 @@ END; print '</td></tr>'; // Barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { // Option to define a transport cost on supplier price print '<tr>'; print '<td>'.$langs->trans('BarcodeValue').'</td>'; @@ -743,10 +740,8 @@ END; } // Option to define a transport cost on supplier price - if ($conf->global->PRODUCT_CHARGES) - { - if (!empty($conf->margin->enabled)) - { + if ($conf->global->PRODUCT_CHARGES) { + if (!empty($conf->margin->enabled)) { print '<tr>'; print '<td>'.$langs->trans("Charges").'</td>'; print '<td><input class="flat" name="charges" size="8" value="'.(GETPOST('charges') ?price(GETPOST('charges')) : (isset($object->fourn_charges) ?price($object->fourn_charges) : '')).'">'; @@ -756,8 +751,7 @@ END; } // Product description of the supplier - if (!empty($conf->global->PRODUIT_FOURN_TEXTS)) - { + if (!empty($conf->global->PRODUIT_FOURN_TEXTS)) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -780,11 +774,16 @@ END; if (empty($rowid)) { foreach ($extralabels as $key => $value) { if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - 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"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); + } print '<tr><td'.($extrafields->attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; - if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); - else print $langs->trans($value); + if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); + } else { + print $langs->trans($value); + } print '</td><td>'.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_fournisseur_price').'</td></tr>'; } } @@ -795,17 +794,22 @@ END; $sql .= ", ".$key; } $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price_extrafields"; - $sql .= " WHERE fk_object = ".$rowid; + $sql .= " WHERE fk_object = ".((int) $rowid); $resql = $db->query($sql); if ($resql) { $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] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - 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"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); + } print '<tr><td'.($extrafields->attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; - if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); - else print $langs->trans($value); + if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); + } else { + print $langs->trans($value); + } print '</td><td>'.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}, '', '', '', '', 0, 'product_fournisseur_price'); print '</td></tr>'; @@ -816,8 +820,7 @@ END; } } - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); print $hookmanager->resPrint; @@ -840,14 +843,11 @@ END; print "\n<div class=\"tabsAction\">\n"; - if ($action != 'add_price' && $action != 'update_price') - { + if ($action != 'add_price' && $action != 'update_price') { $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 (empty($reshook)) { + if ($usercancreate) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$object->id.'&amp;action=add_price">'; print $langs->trans("AddSupplierPrice").'</a>'; } @@ -857,11 +857,14 @@ END; print "\n</div>\n"; print '<br>'; - if ($user->rights->fournisseur->lire) // Duplicate ? this check is already in the head of this file - { + if ($user->rights->fournisseur->lire) { // Duplicate ? this check is already in the head of this file $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($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } $param .= '&ref='.urlencode($object->ref); $product_fourn = new ProductFournisseur($db); @@ -869,7 +872,9 @@ END; $product_fourn_list_all = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder, 0, 0); $nbtotalofrecords = count($product_fourn_list_all); $num = count($product_fourn_list); - if (($num + ($offset * $limit)) < $nbtotalofrecords) $num++; + if (($num + ($offset * $limit)) < $nbtotalofrecords) { + $num++; + } print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); @@ -924,24 +929,52 @@ END; $param = "&id=".$object->id; print '<tr class="liste_titre">'; - if (!empty($arrayfields['pfp.datec']['checked'])) print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder, '', '', 1); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder, '', '', 1); + if (!empty($arrayfields['pfp.datec']['checked'])) { + print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder, '', '', 1); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder, '', '', 1); + } print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, '', '', 1); - 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 '); + 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 (!empty($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 (!empty($conf->multicurrency->enabled)) print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($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 (!empty($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 '); - 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 ', '', 1); + 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 ', '', 1); + } // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label("product_fournisseur_price"); @@ -951,26 +984,30 @@ END; 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); - if (!empty($arrayfields['ef.'.$key]['checked'])) print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right '); + 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); + } + if (!empty($arrayfields['ef.'.$key]['checked'])) { + print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right '); + } } } } - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; - if (is_array($product_fourn_list)) - { - foreach ($product_fourn_list as $productfourn) - { + if (is_array($product_fourn_list)) { + foreach ($product_fourn_list as $productfourn) { print '<tr class="oddeven">'; // Date from @@ -991,8 +1028,7 @@ END; } // Availability - if (!empty($arrayfields['pfp.fk_availability']['checked'])) - { + if (!empty($arrayfields['pfp.fk_availability']['checked'])) { $form->load_cache_availability(); $availability = $form->cache_availability[$productfourn->fk_availability]['label']; print '<td class="left">'.$availability.'</td>'; @@ -1041,11 +1077,12 @@ END; if (!empty($arrayfields['pfp.multicurrency_unitprice']['checked'])) { print '<td class="right">'; print price($productfourn->fourn_multicurrency_unitprice); - print '</td>'; } + print '</td>'; + } // Currency if (!empty($conf->multicurrency->enabled)) { - print '<td class="right">'; + print '<td class="right nowraponall">'; print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : ''; print '</td>'; } @@ -1094,9 +1131,9 @@ END; print '</td>'; } - // Date + // Date modification if (!empty($arrayfields['pfp.tms']['checked'])) { - print '<td align="right">'; + print '<td class="right nowraponall">'; print dol_print_date(($productfourn->fourn_date_modification ? $productfourn->fourn_date_modification : $productfourn->date_modification), "dayhour"); print '</td>'; } @@ -1109,7 +1146,7 @@ END; $sql .= ", ".$key; } $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price_extrafields"; - $sql .= " WHERE fk_object = ".$productfourn->product_fourn_price_id; + $sql .= " WHERE fk_object = ".((int) $productfourn->product_fourn_price_id); $resql = $db->query($sql); if ($resql) { if ($db->num_rows($resql) != 1) { @@ -1130,8 +1167,7 @@ END; } } - if (is_object($hookmanager)) - { + if (is_object($hookmanager)) { $parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>$id_fourn, 'prod_id'=>$object->id); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); } @@ -1139,8 +1175,7 @@ END; // Modify-Remove print '<td class="center nowraponall">'; - if ($usercancreate) - { + if ($usercancreate) { print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=update_price&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>"; print ' &nbsp; '; print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$productfourn->fourn_id.'&amp;action=ask_remove_pf&amp;rowid='.$productfourn->product_fourn_price_id.'">'.img_picto($langs->trans("Remove"), 'delete').'</a>'; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 9c9852b22ef..0e709f54f99 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -5,7 +5,7 @@ * Copyright (C) 2014-2016 Charlie BENKE <charlie@patas-monkey.com> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify @@ -34,13 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $type = GETPOST("type", 'int'); -if ($type == '' && !$user->rights->produit->lire) $type = '1'; // Force global page on service page only -if ($type == '' && !$user->rights->service->lire) $type = '0'; // Force global page on product page only - -// Security check -if ($type == '0') $result = restrictedArea($user, 'produit'); -elseif ($type == '1') $result = restrictedArea($user, 'service'); -else $result = restrictedArea($user, 'produit|service|expedition'); +if ($type == '' && !$user->rights->produit->lire) { + $type = '1'; // Force global page on service page only +} +if ($type == '' && !$user->rights->service->lire) { + $type = '0'; // Force global page on product page only +} // Load translation files required by the page $langs->loadLangs(array('products', 'stocks')); @@ -50,6 +49,15 @@ $hookmanager->initHooks(array('productindex')); $product_static = new Product($db); +// Security check +if ($type == '0') { + $result = restrictedArea($user, 'produit'); +} elseif ($type == '1') { + $result = restrictedArea($user, 'service'); +} else { + $result = restrictedArea($user, 'produit|service|expedition'); +} + /* * View @@ -58,18 +66,15 @@ $product_static = new Product($db); $transAreaType = $langs->trans("ProductsAndServicesArea"); $helpurl = ''; -if (!isset($_GET["type"])) -{ +if (!isset($_GET["type"])) { $transAreaType = $langs->trans("ProductsAndServicesArea"); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if ((isset($_GET["type"]) && $_GET["type"] == 0) || empty($conf->service->enabled)) -{ +if ((isset($_GET["type"]) && $_GET["type"] == 0) || empty($conf->service->enabled)) { $transAreaType = $langs->trans("ProductsArea"); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enabled)) -{ +if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enabled)) { $transAreaType = $langs->trans("ServicesArea"); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } @@ -83,27 +88,27 @@ print load_fiche_titre($transAreaType, $linkback, 'product'); print '<div class="fichecenter"><div class="fichethirdleft">'; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo // Search contract - if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) - { + if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { $listofsearchfields['search_product'] = array('text'=>'ProductOrService'); } - if (count($listofsearchfields)) - { + if (count($listofsearchfields)) { print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder nohover centpercent">'; $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; + foreach ($listofsearchfields as $key => $value) { + if ($i == 0) { + print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; + } print '<tr class="oddeven">'; print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; - if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; + if ($i == 0) { + print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; + } print '</tr>'; $i++; } @@ -117,11 +122,16 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles /* * Number of products and/or services */ -if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) -{ +if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { $prodser = array(); $prodser[0][0] = $prodser[0][1] = $prodser[0][2] = $prodser[0][3] = 0; + $prodser[0]['sell'] = 0; + $prodser[0]['buy'] = 0; + $prodser[0]['none'] = 0; $prodser[1][0] = $prodser[1][1] = $prodser[1][2] = $prodser[1][3] = 0; + $prodser[1]['sell'] = 0; + $prodser[1]['buy'] = 0; + $prodser[1]['none'] = 0; $sql = "SELECT COUNT(p.rowid) as total, p.fk_product_type, p.tosell, p.tobuy"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; @@ -132,20 +142,30 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $sql .= $hookmanager->resPrint; $sql .= " GROUP BY p.fk_product_type, p.tosell, p.tobuy"; $result = $db->query($sql); - while ($objp = $db->fetch_object($result)) - { + while ($objp = $db->fetch_object($result)) { $status = 3; // On sale + On purchase - if (!$objp->tosell && !$objp->tobuy) $status = 0; // Not on sale, not on purchase - if ($objp->tosell && !$objp->tobuy) $status = 1; // On sale only - if (!$objp->tosell && $objp->tobuy) $status = 2; // On purchase only + if (!$objp->tosell && !$objp->tobuy) { + $status = 0; // Not on sale, not on purchase + } + if ($objp->tosell && !$objp->tobuy) { + $status = 1; // On sale only + } + if (!$objp->tosell && $objp->tobuy) { + $status = 2; // On purchase only + } $prodser[$objp->fk_product_type][$status] = $objp->total; - if ($objp->tosell) $prodser[$objp->fk_product_type]['sell'] += $objp->total; - if ($objp->tobuy) $prodser[$objp->fk_product_type]['buy'] += $objp->total; - if (!$objp->tosell && !$objp->tobuy) $prodser[$objp->fk_product_type]['none'] += $objp->total; + if ($objp->tosell) { + $prodser[$objp->fk_product_type]['sell'] += $objp->total; + } + if ($objp->tobuy) { + $prodser[$objp->fk_product_type]['buy'] += $objp->total; + } + if (!$objp->tosell && !$objp->tobuy) { + $prodser[$objp->fk_product_type]['none'] += $objp->total; + } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><th>'.$langs->trans("Statistics").'</th></tr>'; @@ -164,14 +184,12 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $total = $SommeA + $SommeB + $SommeC + $SommeD + $SommeE + $SommeF; $dataseries = array(); - if (!empty($conf->product->enabled)) - { + if (!empty($conf->product->enabled)) { $dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnSale"), round($SommeA)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsOnPurchase"), round($SommeB)); $dataseries[] = array($langs->transnoentitiesnoconv("ProductsNotOnSell"), round($SommeC)); } - if (!empty($conf->service->enabled)) - { + if (!empty($conf->service->enabled)) { $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnSale"), round($SommeD)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesOnPurchase"), round($SommeE)); $dataseries[] = array($langs->transnoentitiesnoconv("ServicesNotOnSell"), round($SommeF)); @@ -193,14 +211,13 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us } -if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) -{ +if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '<br>'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>'; - print '<tr class="oddeven"><td class="center" colspan="2">'; + print '<tr><td class="center" colspan="2">'; $sql = "SELECT c.label, count(*) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; @@ -209,20 +226,16 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $sql .= " GROUP BY c.label"; $total = 0; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { $dataseries = array(); $rest = 0; $nbmax = 10; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); - if ($i < $nbmax) - { + if ($i < $nbmax) { $dataseries[] = array($obj->label, round($obj->nb)); } else { $rest += $obj->nb; @@ -230,8 +243,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $total += $obj->nb; $i++; } - if ($i > $nbmax) - { + if ($i > $nbmax) { $dataseries[] = array($langs->trans("Other"), round($rest)); } @@ -245,8 +257,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $dolgraph->draw('idstatscategproduct'); print $dolgraph->show($total ? 0 : 1); } else { - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); print '<tr><td>'.$obj->label.'</td><td>'.$obj->nb.'</td></tr>'; @@ -268,15 +279,16 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; /* * Latest modified products */ -if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) -{ +if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire)) { $max = 15; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,"; $sql .= " p.entity,"; $sql .= " p.tms as datem"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE p.entity IN (".getEntity($product_static->element, 1).")"; - if ($type != '') $sql .= " AND p.fk_product_type = ".$type; + if ($type != '') { + $sql .= " AND p.fk_product_type = ".$type; + } // Add where from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook @@ -286,30 +298,33 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us //print $sql; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num > 0) - { + if ($num > 0) { $transRecordedType = $langs->trans("LastModifiedProductsAndServices", $max); - if (isset($_GET["type"]) && $_GET["type"] == 0) $transRecordedType = $langs->trans("LastRecordedProducts", $max); - if (isset($_GET["type"]) && $_GET["type"] == 1) $transRecordedType = $langs->trans("LastRecordedServices", $max); + if (isset($_GET["type"]) && $_GET["type"] == 0) { + $transRecordedType = $langs->trans("LastRecordedProducts", $max); + } + if (isset($_GET["type"]) && $_GET["type"] == 1) { + $transRecordedType = $langs->trans("LastRecordedServices", $max); + } print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; $colnb = 2; - if (empty($conf->global->PRODUIT_MULTIPRICES)) $colnb++; + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + $colnb++; + } print '<tr class="liste_titre"><th colspan="'.$colnb.'">'.$transRecordedType.'</th>'; print '<th class="right" colspan="3"><a href="'.DOL_URL_ROOT.'/product/list.php?sortfield=p.tms&sortorder=DESC">'.$langs->trans("FullList").'</td>'; print '</tr>'; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $product_static->id = $objp->rowid; @@ -322,18 +337,18 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $product_static->status_batch = $objp->tobatch; //Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; $sql .= " AND lang='".$db->escape($langs->getDefaultLang())."'"; $resultd = $db->query($sql); - if ($resultd) - { + if ($resultd) { $objtp = $db->fetch_object($resultd); - if ($objtp && $objtp->label != '') $objp->label = $objtp->label; + if ($objtp && $objtp->label != '') { + $objp->label = $objtp->label; + } } } @@ -347,10 +362,8 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us print dol_print_date($db->jdate($objp->datem), 'day'); print "</td>"; // Sell price - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { - if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_price_expression)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + if (!empty($conf->dynamicprices->enabled) && !empty($objp->fk_price_expression)) { $product = new Product($db); $product->fetch($objp->rowid); $priceparser = new PriceParser($db); @@ -360,8 +373,11 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us } } print '<td class="nowrap right">'; - if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); - else print price($objp->price).' '.$langs->trans("HT"); + if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') { + print price($objp->price_ttc).' '.$langs->trans("TTC"); + } else { + print price($objp->price).' '.$langs->trans("HT"); + } print '</td>'; } print '<td class="right nowrap width25"><span class="statusrefsell">'; @@ -389,10 +405,13 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us // TODO Move this into a page that should be available into menu "accountancy - report - turnover - per quarter" // Also method used for counting must provide the 2 possible methods like done by all other reports into menu "accountancy - report - turnover": // "commitment engagment" method and "cash accounting" method -if (!empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) -{ - if (!empty($conf->product->enabled)) activitytrim(0); - if (!empty($conf->service->enabled)) activitytrim(1); +if (!empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) { + if (!empty($conf->product->enabled)) { + activitytrim(0); + } + if (!empty($conf->service->enabled)) { + activitytrim(1); + } } @@ -433,8 +452,7 @@ function activitytrim($product_type) $sql .= " ORDER BY annee, mois "; $result = $db->query($sql); - if ($result) - { + if ($result) { $tmpyear = 0; $trim1 = 0; $trim2 = 0; @@ -443,14 +461,15 @@ function activitytrim($product_type) $lgn = 0; $num = $db->num_rows($result); - if ($num > 0) - { + if ($num > 0) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder" width="75%">'; - if ($product_type == 0) + if ($product_type == 0) { print '<tr class="liste_titre"><td class=left>'.$langs->trans("ProductSellByQuarterHT").'</td>'; - else print '<tr class="liste_titre"><td class=left>'.$langs->trans("ServiceSellByQuarterHT").'</td>'; + } else { + print '<tr class="liste_titre"><td class=left>'.$langs->trans("ServiceSellByQuarterHT").'</td>'; + } print '<td class=right>'.$langs->trans("Quarter1").'</td>'; print '<td class=right>'.$langs->trans("Quarter2").'</td>'; print '<td class=right>'.$langs->trans("Quarter3").'</td>'; @@ -460,13 +479,10 @@ function activitytrim($product_type) } $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); - if ($tmpyear != $objp->annee) - { - if ($trim1 + $trim2 + $trim3 + $trim4 > 0) - { + if ($tmpyear != $objp->annee) { + if ($trim1 + $trim2 + $trim3 + $trim4 > 0) { print '<tr class="oddeven"><td class=left>'.$tmpyear.'</td>'; print '<td class="nowrap right">'.price($trim1).'</td>'; print '<td class="nowrap right">'.price($trim2).'</td>'; @@ -484,22 +500,25 @@ function activitytrim($product_type) $trim4 = 0; } - if ($objp->mois == "01" || $objp->mois == "02" || $objp->mois == "03") + if ($objp->mois == "01" || $objp->mois == "02" || $objp->mois == "03") { $trim1 += $objp->Mnttot; + } - if ($objp->mois == "04" || $objp->mois == "05" || $objp->mois == "06") + if ($objp->mois == "04" || $objp->mois == "05" || $objp->mois == "06") { $trim2 += $objp->Mnttot; + } - if ($objp->mois == "07" || $objp->mois == "08" || $objp->mois == "09") + if ($objp->mois == "07" || $objp->mois == "08" || $objp->mois == "09") { $trim3 += $objp->Mnttot; + } - if ($objp->mois == "10" || $objp->mois == "11" || $objp->mois == "12") + if ($objp->mois == "10" || $objp->mois == "11" || $objp->mois == "12") { $trim4 += $objp->Mnttot; + } $i++; } - if ($trim1 + $trim2 + $trim3 + $trim4 > 0) - { + if ($trim1 + $trim2 + $trim3 + $trim4 > 0) { print '<tr class="oddeven"><td class=left>'.$tmpyear.'</td>'; print '<td class="nowrap right">'.price($trim1).'</td>'; print '<td class="nowrap right">'.price($trim2).'</td>'; @@ -508,7 +527,8 @@ function activitytrim($product_type) print '<td class="nowrap right">'.price($trim1 + $trim2 + $trim3 + $trim4).'</td>'; print '</tr>'; } - if ($num > 0) + if ($num > 0) { print '</table></div>'; + } } } diff --git a/htdocs/product/inventory/ajax/ajax.inventory.php b/htdocs/product/inventory/ajax/ajax.inventory.php index 85dd488df6f..920607f4c1e 100644 --- a/htdocs/product/inventory/ajax/ajax.inventory.php +++ b/htdocs/product/inventory/ajax/ajax.inventory.php @@ -6,16 +6,16 @@ require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; $get = GETPOST('get', 'alpha'); $put = GETPOST('put', 'alpha'); -switch ($put) -{ +switch ($put) { case 'qty': - if (empty($user->rights->stock->creer)) { echo -1; exit; } + if (empty($user->rights->stock->creer)) { + echo -1; exit; + } $fk_det_inventory = GETPOST('fk_det_inventory'); $det = new InventoryLine($db); - if ($det->fetch($fk_det_inventory)) - { + if ($det->fetch($fk_det_inventory)) { $det->qty_view += GETPOST('qty'); $res = $det->update($user); @@ -27,13 +27,14 @@ switch ($put) break; case 'pmp': - if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { echo -1; exit; } + if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { + echo -1; exit; + } $fk_det_inventory = GETPOST('fk_det_inventory'); $det = new InventoryLine($db); - if ($det->fetch($fk_det_inventory)) - { + if ($det->fetch($fk_det_inventory)) { $det->new_pmp = price2num(GETPOST('pmp')); $det->update($user); diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 425dd3622e3..dda16746398 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -40,8 +40,7 @@ $cancel = GETPOST('cancel', 'aZ09'); $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)) -{ +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $result = restrictedArea($user, 'stock', $id); } else { $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance'); @@ -61,12 +60,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -76,8 +78,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'mymodule', $id); -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $permissiontoread = $user->rights->stock->lire; $permissiontoadd = $user->rights->stock->creer; $permissiontodelete = $user->rights->stock->supprimer; @@ -100,18 +101,22 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = DOL_URL_ROOT.'/product/inventory/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('/product/inventory/card.php', 1).'?id='.($id > 0 ? $id : '__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 @@ -135,8 +140,7 @@ if (empty($reshook)) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); }*/ - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -159,7 +163,9 @@ $formfile = new FormFile($db); $formproject = new FormProjets($db); $title = $langs->trans("Inventory"); -$help_url = ''; + +$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks|DE:Modul_Bestände'; + llxHeader('', $title, $help_url); // Example : Adding jquery code @@ -179,15 +185,18 @@ jQuery(document).ready(function() { // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewInventory"), '', 'product'); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(array(), ''); @@ -218,16 +227,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("Inventory"), '', 'product'); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -251,8 +263,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = inventoryPrepareHead($object); @@ -277,8 +288,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of action xxxx - if ($action == 'xxx') - { + if ($action == 'xxx') { $formquestion = array(); /* $forcecombo=0; @@ -296,8 +306,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -317,34 +330,34 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') - { - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - if ($action == 'classify') { - //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref .= '<input type="hidden" name="action" value="classin">'; - $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref .= '</form>'; - } 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.=''; - } - } + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + { + $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + if ($action == 'classify') { + //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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 .= '</div>'; @@ -378,29 +391,32 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n"; } // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_VALIDATED) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>'; } } + // Back to validate + if ($object->status == $object::STATUS_RECORDED) { + if ($permissiontoadd) { + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("ReOpen").'</a>'; + } + } // Modify - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n"; @@ -408,23 +424,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>'; } } // Clone /*if ($permissiontoadd) - { - print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=myobject">'.$langs->trans("ToClone").'</a>'."\n"; - }*/ + { + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=myobject">'.$langs->trans("ToClone").'</a>'."\n"; + }*/ // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) - { + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n"; @@ -439,8 +452,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -478,7 +490,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'inventory'; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 47d9425530f..e872d7e353a 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -52,12 +52,12 @@ class Inventory extends CommonObject /** * @var int Does object support extrafields ? 0=No, 1=Yes */ - public $isextrafieldmanaged = 1; + public $isextrafieldmanaged = 0; /** * @var string String with name of icon for inventory */ - public $picto = 'stock'; + public $picto = 'inventory'; const STATUS_DRAFT = 0; const STATUS_VALIDATED = 1; @@ -222,8 +222,12 @@ class Inventory extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled)) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled)) { + $this->fields['entity']['enabled'] = 0; + } } @@ -250,6 +254,7 @@ class Inventory extends CommonObject */ public function validate(User $user, $notrigger = false) { + global $conf; $this->db->begin(); $result = 0; @@ -272,20 +277,24 @@ class Inventory extends CommonObject $sql .= ' '.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'entrepot as e'; $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; $sql .= ' AND ps.fk_product = p.rowid AND ps.fk_entrepot = e.rowid'; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; - if ($this->fk_product > 0) $sql .= ' AND ps.fk_product = '.$this->fk_product; - if ($this->fk_warehouse > 0) $sql .= ' AND ps.fk_entrepot = '.$this->fk_warehouse; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; + } + if ($this->fk_product > 0) { + $sql .= ' AND ps.fk_product = '.$this->fk_product; + } + if ($this->fk_warehouse > 0) { + $sql .= ' AND ps.fk_entrepot = '.$this->fk_warehouse; + } $inventoryline = new InventoryLine($this->db); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $inventoryline->fk_inventory = $this->id; @@ -320,6 +329,7 @@ class Inventory extends CommonObject } else { $this->db->rollback(); } + return $result; } /** @@ -349,6 +359,51 @@ class Inventory extends CommonObject } else { $this->db->rollback(); } + return $result; + } + + /** + * Set to Recorded + * + * @param User $user User that creates + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, Id of created object if OK + */ + public function setRecorded(User $user, $notrigger = false) + { + $this->db->begin(); + + $result = $this->setStatut($this::STATUS_RECORDED, null, '', 'INVENTORY_RECORDED'); + + if ($result > 0) { + $this->db->commit(); + } else { + $this->db->rollback(); + return -1; + } + return $result; + } + + /** + * Set to Canceled + * + * @param User $user User that creates + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, Id of created object if OK + */ + public function setCanceled(User $user, $notrigger = false) + { + $this->db->begin(); + + $result = $this->setStatut($this::STATUS_CANCELED, null, '', 'INVENTORY_CANCELED'); + + if ($result > 0) { + $this->db->commit(); + } else { + $this->db->rollback(); + return -1; + } + return $result; } /** @@ -464,8 +519,7 @@ class Inventory extends CommonObject */ public function deleteLine(User $user, $idline, $notrigger = false) { - if ($this->status < 0) - { + if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -489,7 +543,9 @@ class Inventory extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $companylink = ''; @@ -501,24 +557,28 @@ class Inventory extends CommonObject $url = dol_buildpath('/product/inventory/card.php', 1).'?id='.$this->id; $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowInventory"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -553,9 +613,11 @@ class Inventory extends CommonObject $labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); $labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated').' ('.$langs->trans('Started').')'; $labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $labelStatus[self::STATUS_RECORDED] = $langs->trans('Closed'); $labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); $labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Started'); $labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Canceled'); + $labelStatusShort[self::STATUS_RECORDED] = $langs->trans('Closed'); return dolGetStatus($labelStatus[$status], $labelStatusShort[$status], '', 'status'.$status, $mode); } @@ -571,30 +633,25 @@ class Inventory extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -620,6 +677,7 @@ class Inventory extends CommonObject public function initAsSpecimen() { $this->initAsSpecimenCommon(); + $this->title = ''; } } diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 53a4daf19bd..bc927a06c50 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -27,6 +27,7 @@ include_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php'; +include_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; // Load translation files required by the page $langs->loadLangs(array("stocks", "other", "productbatch")); @@ -45,8 +46,7 @@ $fk_product = GETPOST('fk_product', 'int'); $lineid = GETPOST('lineid', 'int'); $batch = GETPOST('batch', 'alphanohtml'); -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $result = restrictedArea($user, 'stock', $id); } else { $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance'); @@ -66,12 +66,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -81,8 +84,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ //if ($user->socid > 0) $socid = $user->socid; //$result = restrictedArea($user, 'mymodule', $id); -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $permissiontoadd = $user->rights->stock->creer; $permissiontodelete = $user->rights->stock->supprimer; } else { @@ -97,12 +99,97 @@ $now = dol_now(); * Actions */ +if ($action == 'cancel_record' && $permissiontoadd) { + $object->setCanceled($user); +} + +if ($action == 'update' && $user->rights->stock->mouvement->creer) { + $stockmovment = new MouvementStock($db); + $stockmovment->origin = $object; + + $db->begin(); + + $sql = 'SELECT id.rowid, id.datec as date_creation, id.tms as date_modification, id.fk_inventory, id.fk_warehouse,'; + $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id'; + $sql .= ' WHERE id.fk_inventory = '.$object->id; + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + $totalarray = array(); + while ($i < $num) { + $line = $db->fetch_object($resql); + $qty_stock = $line->qty_stock; + $qty_view = $line->qty_view; // The quantity viewed by inventorier, the qty we target + + if (!is_null($qty_view)) { + $stock_movement_qty = price2num($qty_view - $qty_stock, 'MS'); + if ($stock_movement_qty != 0) { + if ($stock_movement_qty < 0) { + $movement_type = 1; + } else { + $movement_type = 0; + } + + $datemovement = ''; + + $idstockmove = $stockmovment->_create($user, $line->fk_product, $line->fk_warehouse, $stock_movement_qty, $movement_type, 0, $langs->trans('LabelOfInventoryMovemement', $object->id), 'INV'.$object->id, $datemovement, '', '', $line->batch); + if ($idstockmove < 0) { + $error++; + setEventMessages($stockmovment->error, $stockmovment->errors, 'errors'); + break; + } + } + } + $i++; + } + + if (!$error) { + $object->setRecorded($user); + } + } else { + setEventMessages($db->lasterror, null, 'errors'); + $error++; + } + + if (! $error) { + $db->commit(); + } else { + $db->rollbak(); + } +} + +if ($action =='updateinventorylines' && $permissiontoadd) { + $sql = 'SELECT id.rowid, id.datec as date_creation, id.tms as date_modification, id.fk_inventory, id.fk_warehouse,'; + $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id'; + $sql .= ' WHERE id.fk_inventory = '.$object->id; + + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + $totalarray = array(); + while ($i < $num) { + $line = $db->fetch_object($resql); + $lineid = $line->rowid; + $inventoryline = new InventoryLine($db); + $inventoryline->fetch($lineid); + $inventoryline->qty_view = GETPOST("id_".$inventoryline->id); + $inventoryline->update($user); + $i++; + } + } +} + $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php'; @@ -178,27 +265,13 @@ if (empty($reshook)) $form = new Form($db); $formproduct = new FormProduct($db); -llxHeader('', $langs->trans('Inventory'), ''); +$help_url = ''; -// Example : Adding jquery code -print '<script type="text/javascript" language="javascript"> -jQuery(document).ready(function() { - function init_myfunc() - { - jQuery("#myid").removeAttr(\'disabled\'); - jQuery("#myid").attr(\'disabled\',\'disabled\'); - } - init_myfunc(); - jQuery("#mybutton").click(function() { - init_myfunc(); - }); -}); -</script>'; +llxHeader('', $langs->trans('Inventory'), $help_url); // Part to show record -if ($object->id > 0) -{ +if ($object->id > 0) { $res = $object->fetch_optionals(); $head = inventoryPrepareHead($object); @@ -211,8 +284,7 @@ if ($object->id > 0) $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteInventory'), $langs->trans('ConfirmDeleteOrder'), '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); } @@ -223,11 +295,26 @@ if ($object->id > 0) $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } + // Confirmation to close + if ($action == 'record') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Close'), $langs->trans('ConfirmFinish'), 'update', '', 0, 1); + $action = 'view'; + } + + // Confirmation to close + if ($action == 'confirm_cancel') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Cancel'), $langs->trans('ConfirmCancel'), 'cancel_record', '', 0, 1); + $action = 'view'; + } + // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -235,7 +322,7 @@ if ($object->id > 0) // Object card // ------------------------------------------------------------ - $linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + $linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php">'.$langs->trans("BackToList").'</a>'; $morehtmlref = '<div class="refidno">'; /* @@ -247,34 +334,34 @@ if ($object->id > 0) // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($user->rights->inventory->creer) - { - if ($action != 'classify') - { - $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref.='<input type="hidden" name="action" value="classin">'; - $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref.='</form>'; - } 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.=''; - } - } + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($user->rights->inventory->creer) + { + if ($action != 'classify') + { + $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; @@ -303,98 +390,124 @@ if ($object->id > 0) print dol_get_fiche_end(); - // Buttons for actions - if ($action == 'record') { - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="update">'; - print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="updateinventorylines">'; + print '<input type="hidden" name="id" value="'.$object->id.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } - print '<div class="center">'; - print '<span class="opacitymedium">'.$langs->trans("InventoryDesc").'</span><br>'; - print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; - print ' &nbsp; '; - print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - print '</div>'; - print '<br>'; - print '</form>'; - } else { + + // Buttons for actions + if ($action != 'record') { print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { - if ($object->status == Inventory::STATUS_DRAFT) - { - if ($permissiontoadd) - { + if (empty($reshook)) { + if ($object->status == Inventory::STATUS_DRAFT) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Validate').' ('.$langs->trans("Start").')</a>'."\n"; } } - if ($object->status == Inventory::STATUS_VALIDATED) - { - if ($permissiontoadd) - { - /* - if (!empty($conf->barcode->enabled)) { - print '<a href="#" class="butAction">'.$langs->trans("UpdateByScaningProductBarcode").'</a>'; - } - if (!empty($conf->productbatch->enabled)) { - print '<a href="#" class="butAction">'.$langs->trans('UpdateByScaningLot').'</a>'; - }*/ - if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) { - print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=updatebyscaning" class="butAction">'.$langs->trans("UpdateByScaning").'</a>'; + // Save + if ($object->status == $object::STATUS_VALIDATED) { + if ($object->status == Inventory::STATUS_VALIDATED) { + if ($permissiontoadd) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=record">'.$langs->trans("MakeMovementsAndClose").'</a>'."\n"; + } else { + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('MakeMovementsAndClose').'</a>'."\n"; } - } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Save").'</a>'."\n"; + } + + if ($permissiontoadd) { + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=confirm_cancel">'.$langs->trans("Cancel").'</a>'."\n"; } } - - if ($object->status == Inventory::STATUS_VALIDATED) - { - if ($permissiontoadd) - { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=record">'.$langs->trans("Finish").'</a>'."\n"; - } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Finish').'</a>'."\n"; - } - } - - /*if ($object->status == Inventory::STATUS_VALIDATED) - { - if ($permissiontoadd) - { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("RecordVerb").'</a>'."\n"; - } - else - { - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('RecordVerb').'</a>'."\n"; - } - }*/ } print '</div>'."\n"; } - if ($action == 'updatebyscaning') { - print '<div class="div-for-modal">'; - print 'TODO'; - print '</div>'; + if ($object->status == Inventory::STATUS_VALIDATED) { + print '<center>'; + if ($permissiontoadd) { + /* + if (!empty($conf->barcode->enabled)) { + print '<a href="#" class="butAction">'.$langs->trans("UpdateByScaningProductBarcode").'</a>'; + } + if (!empty($conf->productbatch->enabled)) { + print '<a href="#" class="butAction">'.$langs->trans('UpdateByScaningLot').'</a>'; + }*/ + if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) { + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=updatebyscaning" class="">'.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").'</a>'; + } + } else { + print '<a class="classfortooltip marginrightonly paddingright marginleftonly paddingleft" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Save").'</a>'."\n"; + } + if ($permissiontoadd && $conf->use_javascript_ajax) { + print '<a id="fillwithexpected" class="marginrightonly paddingright marginleftonly paddingleft" href="#">'.img_picto('', 'autofill', 'class="paddingrightonly"').$langs->trans('AutofillWithExpected').'</a>'; + + print '<script>'; + print '$( document ).ready(function() {'; + print ' $("#fillwithexpected").on("click",function fillWithExpected(){ + $(".expectedqty").each(function(){ + var object = $(this)[0]; + var objecttofill = $("#"+object.id+"_input")[0]; + objecttofill.value = object.innerText; + }) + console.log("Values filled"); + });'; + print '});'; + print '</script>'; + } + print '<br>'; + print '<br>'; + print '</center>'; } - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="updateinventorylines">'; - print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + // Popup for mass barcode scanning + if ($action == 'updatebyscaning') { + print '<form name="barcodescanner" method="POST">'; + print '<!-- Popup for mass barcode scanning -->'."\n"; + print '<div class="div-for-modal-topright" style="padding: 15px">'; + print '<center><strong>Barcode scanner tool...</strong></center><br>'; + + print '<input type="checkbox" name="barcodeforautodetect" checked="checked"> Autodetect if we scan a product barcode or a lot/serial barcode<br>'; + print '<input type="checkbox" name="barcodeforproduct"> Scan a product barcode<br>'; + print '<input type="checkbox" name="barcodeforlotserial"> Scan a product lot or serial number<br>'; + + print $langs->trans("QtyToAddAfterBarcodeScan").' <input type="text" name="barcodeproductqty" class="width50 right" value="1"><br>'; + print '<textarea type="text" name="barcodelist" class="centpercent" autofocus rows="'.ROWS_3.'"></textarea>'; + + /*print '<br>'.$langs->trans("or").'<br>'; + + print '<br>'; + + print '<input type="text" name="barcodelotserial" class="width200"> &nbsp; &nbsp; Qty <input type="text" name="barcodelotserialqty" class="width50 right" value="1"><br>'; + */ + print '<br>'; + print '<center>'; + print '<input type="submit" class="button" value="'.$langs->trans("Add").'"><br>'; + + print '<span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span>'; + + // TODO Add javascript so each scan will add qty into the inventory page + an ajax save. + + print '</center>'; + print '</div>'; + print '</form>'; + } + print '<div class="fichecenter">'; //print '<div class="fichehalfleft">'; @@ -417,10 +530,12 @@ if ($object->id > 0) print '<td class="center">'; print $form->textwithpicto($langs->trans("RealQty"), $langs->trans("InventoryRealQtyHelp")); print '</td>'; - // Actions - print '<td class="center">'; - print '</td>'; - print '</tr>'; + if ($object->status == $object::STATUS_VALIDATED) { + // Actions + print '<td class="center">'; + print '</td>'; + print '</tr>'; + } // Line to add a new line in inventory if ($object->status == $object::STATUS_VALIDATED) { @@ -429,7 +544,7 @@ if ($object->id > 0) print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? GETPOST('fk_warehouse', 'int') : $object->fk_warehouse), 'fk_warehouse', 'warehouseopen', 1, 0, 0, '', 0, 0, array(), 'maxwidth300'); print '</td>'; print '<td>'; - print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOST('fk_product', 'int') : $object->fk_product), 'fk_product', '', 0, 0, 1, 2, '', 0, null, 0, '1', 0, 'maxwidth300'); + print $form->select_produits((GETPOSTISSET('fk_product') ? GETPOST('fk_product', 'int') : $object->fk_product), 'fk_product', '', 0, 0, -1, 2, '', 0, null, 0, '1', 0, 'maxwidth300'); print '</td>'; if ($conf->productbatch->enabled) { print '<td>'; @@ -438,7 +553,7 @@ if ($object->id > 0) } print '<td class="right"></td>'; print '<td class="center">'; - print '<input type="submit" class="button paddingrightonly" name="addline" value="'.$langs->trans("Add").'">'; + print '<input type="submit" class="button paddingright" name="addline" value="'.$langs->trans("Add").'">'; //print '<input type="submit" class="button paddingrightonly button-cancel" name="canceladdline" value="'.$langs->trans("Cancel").'">'; print '</td>'; // Actions @@ -451,21 +566,19 @@ if ($object->id > 0) $sql = 'SELECT id.rowid, id.datec as date_creation, id.tms as date_modification, id.fk_inventory, id.fk_warehouse,'; $sql .= ' id.fk_product, id.batch, id.qty_stock, id.qty_view, id.qty_regulated'; $sql .= ' FROM '.MAIN_DB_PREFIX.'inventorydet as id'; - $sql .= ' WHERE id.fk_inventory = '.$object->id; + $sql .= ' WHERE id.fk_inventory = '.((int) $object->id); $cacheOfProducts = array(); $cacheOfWarehouses = array(); //$sql = ''; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; $totalarray = array(); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); if (is_object($cacheOfWarehouses[$obj->fk_warehouse])) { @@ -504,16 +617,21 @@ if ($object->id > 0) print '</td>'; } - print '<td class="right">'; - print 'TODO'; + print '<td class="right expectedqty" id="id_'.$obj->rowid.'">'; + print $obj->qty_stock; print '</td>'; print '<td class="center">'; - print '<input type="text" class="maxwidth75" name="id_'.$obj->rowid.' value="'.GETPOST("id_".$obj->rowid).'">'; - print '</td>'; - print '<td class="right">'; - print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>'; - print '</td>'; - + if ($object->status == $object::STATUS_VALIDATED) { + $qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view; + print '<input type="text" class="maxwidth75 right" name="id_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">'; + print '</td>'; + print '<td class="right">'; + print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>'; + print '</td>'; + } else { + print $obj->qty_view; + print '</td>'; + } print '</tr>'; $i++; @@ -524,15 +642,10 @@ if ($object->id > 0) print '</table>'; - // Save - if ($object->status == $object::STATUS_VALIDATED) { - print '<div class="center">'; - print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; - print '</div>'; - } - print '</div>'; + print '<center><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'"></center>'; + print '</div>'; print '</form>'; diff --git a/htdocs/product/inventory/list.php b/htdocs/product/inventory/list.php index 747abda86b8..1c1e09e3162 100644 --- a/htdocs/product/inventory/list.php +++ b/htdocs/product/inventory/list.php @@ -48,7 +48,9 @@ $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 +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; @@ -63,18 +65,20 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Security check $socid = 0; -if ($user->socid > 0) // Protection if external user -{ +if ($user->socid > 0) { // Protection if external user //$socid = $user->socid; accessforbidden(); } -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $result = restrictedArea($user, 'stock', $objectid); } else { $result = restrictedArea($user, 'stock', $objectid, '', 'inventory_advance'); @@ -83,30 +87,31 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +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'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); + } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -129,31 +134,33 @@ $permissiontodelete = $user->rights->stock->supprimer; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -182,13 +189,14 @@ $title = $langs->trans('ListOfInventories'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -196,20 +204,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -222,7 +242,7 @@ $sql .= $hookmanager->resPrint; $sql.= " GROUP BY " foreach($object->fields as $key => $val) { - $sql.='t.'.$key.', '; + $sql.='t.'.$key.', '; } // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { @@ -239,26 +259,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -267,8 +285,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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_URL_ROOT.'/inventory/card.php?id='.$id); @@ -284,30 +301,46 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -318,7 +351,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/inventory/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'product', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail = "Information"; @@ -327,9 +360,10 @@ $objecttmp = new Inventory($db); $trackid = 'stockinv'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -340,11 +374,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -361,20 +397,26 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -396,15 +438,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -421,11 +466,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -433,37 +478,50 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) - { + 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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -476,14 +534,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -495,10 +556,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -514,10 +578,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index b2f7489cbfe..d95c2222553 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -11,7 +11,7 @@ * Copyright (C) 2013 Adolfo segura <adolfo.segura@gmail.com> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> - * Copyright (C) 2020 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2020-2021 Open-DSI <support@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,12 +41,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; 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.'/product/class/html.formproduct.class.php'; -if (!empty($conf->categorie->enabled)) +if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'suppliers', 'companies', 'margins')); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -56,6 +59,7 @@ $toselect = GETPOST('toselect', 'array'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST("search_ref", 'alpha'); +$search_ref_supplier = GETPOST("search_ref_supplier", 'alpha'); $search_barcode = GETPOST("search_barcode", 'alpha'); $search_label = GETPOST("search_label", 'alpha'); $search_type = GETPOST("search_type", 'int'); @@ -92,17 +96,31 @@ $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 < 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 or if we select empty mass action +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 or if we select empty mass action $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = "p.ref"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "p.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize context for list $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'productservicelist'; -if ((string) $type == '1') { $contextpage = 'servicelist'; if ($search_type == '') $search_type = '1'; } -if ((string) $type == '0') { $contextpage = 'productlist'; if ($search_type == '') $search_type = '0'; } +if ((string) $type == '1') { + $contextpage = 'servicelist'; if ($search_type == '') { + $search_type = '1'; + } +} +if ((string) $type == '0') { + $contextpage = 'productlist'; if ($search_type == '') { + $search_type = '0'; + } +} // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks $object = new Product($db); @@ -116,23 +134,19 @@ $formproduct = new FormProduct($db); $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); -if (empty($action)) $action = 'list'; +if (empty($action)) { + $action = 'list'; +} // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $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('product', 'list', $canvas); } -// Security check -if ($search_type == '0') $result = restrictedArea($user, 'produit', '', '', '', '', '', 0); -elseif ($search_type == '1') $result = restrictedArea($user, 'service', '', '', '', '', '', 0); -else $result = restrictedArea($user, 'produit|service', '', '', '', '', '', 0); - // Define virtualdiffersfromphysical $virtualdiffersfromphysical = 0; if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) @@ -140,8 +154,7 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) - || !empty($conf->mrp->enabled)) -{ + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } @@ -155,8 +168,7 @@ $fieldstosearchall = array( ); // multilang -if (!empty($conf->global->MAIN_MULTILANGS)) -{ +if (!empty($conf->global->MAIN_MULTILANGS)) { $fieldstosearchall['pl.label'] = 'ProductLabelTranslated'; $fieldstosearchall['pl.description'] = 'ProductDescriptionTranslated'; $fieldstosearchall['pl.note'] = 'ProductNoteTranslated'; @@ -166,77 +178,78 @@ if (!empty($conf->barcode->enabled)) { $fieldstosearchall['pfp.barcode'] = 'GencodBuyPrice'; } // Personalized search criterias. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel' -if (!empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) $fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS); +if (!empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) { + $fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS); +} -if (empty($conf->global->PRODUIT_MULTIPRICES)) -{ +if (empty($conf->global->PRODUIT_MULTIPRICES)) { $titlesellprice = $langs->trans("SellingPrice"); - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $titlesellprice = $form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer")); } } $isInEEC = isInEEC($mysoc); +$alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "pa"; + // Definition of fields for lists $arrayfields = array( - 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), + 'p.ref'=>array('label'=>"Ref", 'checked'=>1), //'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), - 'p.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1, 'position'=>10), - 'p.fk_product_type'=>array('label'=>$langs->trans("Type"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->service->enabled)), 'position'=>11), - 'p.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled)), 'position'=>12), - 'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(!empty($conf->service->enabled) && (string) $type == '1'), 'position'=>13), - 'p.finished'=>array('label'=>$langs->trans("Nature"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>19), - 'p.weight'=>array('label'=>$langs->trans('Weight'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>20), - 'p.weight_units'=>array('label'=>$langs->trans('WeightUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>21), - 'p.length'=>array('label'=>$langs->trans('Length'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>22), - 'p.length_units'=>array('label'=>$langs->trans('LengthUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>23), - 'p.width'=>array('label'=>$langs->trans('Width'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>24), - 'p.width_units'=>array('label'=>$langs->trans('WidthUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>25), - 'p.height'=>array('label'=>$langs->trans('Height'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>26), - 'p.height_units'=>array('label'=>$langs->trans('HeightUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>27), - 'p.surface'=>array('label'=>$langs->trans('Surface'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SURFACE) && $type != '1'), 'position'=>28), - 'p.surface_units'=>array('label'=>$langs->trans('SurfaceUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SURFACE) && $type != '1'), 'position'=>29), - 'p.volume'=>array('label'=>$langs->trans('Volume'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME) && $type != '1'), 'position'=>30), - 'p.volume_units'=>array('label'=>$langs->trans('VolumeUnits'), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME) && $type != '1'), 'position'=>31), - 'cu.label'=>array('label'=>$langs->trans("DefaultUnitToShow"), 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_USE_UNITS)), 'position'=>32), - 'p.sellprice'=>array('label'=>$langs->trans("SellingPrice"), 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>40), - 'p.tva_tx'=>array('label'=>$langs->trans("VATRate"), 'checked'=>0, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>41), - 'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>42), - 'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>43), - 'p.pmp'=>array('label'=>$langs->trans("PMPValueShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>44), - 'p.cost_price'=>array('label'=>$langs->trans("CostPrice"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>45), - 'p.seuil_stock_alerte'=>array('label'=>$langs->trans("StockLimit"), 'checked'=>0, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>50), - 'p.desiredstock'=>array('label'=>$langs->trans("DesiredStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>51), - 'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>52), - 'stock_virtual'=>array('label'=>$langs->trans("VirtualStock"), 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service' && $virtualdiffersfromphysical), 'position'=>53), - 'p.tobatch'=>array('label'=>$langs->trans("ManageLotSerial"), 'checked'=>0, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>60), - 'p.fk_country'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>100), - 'p.fk_state'=>array('label'=>$langs->trans("State"), 'checked'=>0, 'position'=>101), - 'p.accountancy_code_sell'=>array('label'=>$langs->trans("ProductAccountancySellCode"), 'checked'=>0, 'position'=>400), - 'p.accountancy_code_sell_intra'=>array('label'=>$langs->trans("ProductAccountancySellIntraCode"), 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>401), - 'p.accountancy_code_sell_export'=>array('label'=>$langs->trans("ProductAccountancySellExportCode"), 'checked'=>0, 'position'=>402), - 'p.accountancy_code_buy'=>array('label'=>$langs->trans("ProductAccountancyBuyCode"), 'checked'=>0, 'position'=>403), - 'p.accountancy_code_buy_intra'=>array('label'=>$langs->trans("ProductAccountancyBuyIntraCode"), 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>404), - 'p.accountancy_code_buy_export'=>array('label'=>$langs->trans("ProductAccountancyBuyExportCode"), 'checked'=>0, 'position'=>405), - 'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'p.tosell'=>array('label'=>$langs->trans("Status").' ('.$langs->trans("Sell").')', 'checked'=>1, 'position'=>1000), - 'p.tobuy'=>array('label'=>$langs->trans("Status").' ('.$langs->trans("Buy").')', 'checked'=>1, 'position'=>1000) + 'p.label'=>array('label'=>"Label", 'checked'=>1, 'position'=>10), + 'p.fk_product_type'=>array('label'=>"Type", 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->service->enabled)), 'position'=>11), + 'p.barcode'=>array('label'=>"Gencod", 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled)), 'position'=>12), + 'p.duration'=>array('label'=>"Duration", 'checked'=>($contextpage != 'productlist'), 'enabled'=>(!empty($conf->service->enabled) && (string) $type == '1'), 'position'=>13), + 'p.finished'=>array('label'=>"Nature", 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>19), + 'p.weight'=>array('label'=>'Weight', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>20), + 'p.weight_units'=>array('label'=>'WeightUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && $type != '1'), 'position'=>21), + 'p.length'=>array('label'=>'Length', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>22), + 'p.length_units'=>array('label'=>'LengthUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>23), + 'p.width'=>array('label'=>'Width', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>24), + 'p.width_units'=>array('label'=>'WidthUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>25), + 'p.height'=>array('label'=>'Height', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>26), + 'p.height_units'=>array('label'=>'HeightUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SIZE) && $type != '1'), 'position'=>27), + 'p.surface'=>array('label'=>'Surface', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SURFACE) && $type != '1'), 'position'=>28), + 'p.surface_units'=>array('label'=>'SurfaceUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_SURFACE) && $type != '1'), 'position'=>29), + 'p.volume'=>array('label'=>'Volume', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME) && $type != '1'), 'position'=>30), + 'p.volume_units'=>array('label'=>'VolumeUnits', 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && empty($conf->global->PRODUCT_DISABLE_VOLUME) && $type != '1'), 'position'=>31), + 'cu.label'=>array('label'=>"DefaultUnitToShow", 'checked'=>0, 'enabled'=>(!empty($conf->product->enabled) && !empty($conf->global->PRODUCT_USE_UNITS)), 'position'=>32), + 'p.sellprice'=>array('label'=>"SellingPrice", 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>40), + 'p.tva_tx'=>array('label'=>"VATRate", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES), 'position'=>41), + 'p.minbuyprice'=>array('label'=>"BuyingPriceMinShort", 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>42), + 'p.numbuyprice'=>array('label'=>"BuyingPriceNumShort", 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>43), + 'p.pmp'=>array('label'=>"PMPValueShort", 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>44), + 'p.cost_price'=>array('label'=>"CostPrice", 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>45), + 'p.seuil_stock_alerte'=>array('label'=>"StockLimit", 'checked'=>0, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>50), + 'p.desiredstock'=>array('label'=>"DesiredStock", 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>51), + 'p.stock'=>array('label'=>"PhysicalStock", 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service'), 'position'=>52), + 'stock_virtual'=>array('label'=>"VirtualStock", 'checked'=>1, 'enabled'=>(!empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service' && $virtualdiffersfromphysical), 'position'=>53), + 'p.tobatch'=>array('label'=>"ManageLotSerial", 'checked'=>0, 'enabled'=>(!empty($conf->productbatch->enabled)), 'position'=>60), + 'p.fk_country'=>array('label'=>"Country", 'checked'=>0, 'position'=>100), + 'p.fk_state'=>array('label'=>"State", 'checked'=>0, 'position'=>101), + $alias_product_perentity . '.accountancy_code_sell'=>array('label'=>"ProductAccountancySellCode", 'checked'=>0, 'position'=>400), + $alias_product_perentity . '.accountancy_code_sell_intra'=>array('label'=>"ProductAccountancySellIntraCode", 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>401), + $alias_product_perentity . '.accountancy_code_sell_export'=>array('label'=>"ProductAccountancySellExportCode", 'checked'=>0, 'position'=>402), + $alias_product_perentity . '.accountancy_code_buy'=>array('label'=>"ProductAccountancyBuyCode", 'checked'=>0, 'position'=>403), + $alias_product_perentity . '.accountancy_code_buy_intra'=>array('label'=>"ProductAccountancyBuyIntraCode", 'checked'=>0, 'enabled'=>$isInEEC, 'position'=>404), + $alias_product_perentity . '.accountancy_code_buy_export'=>array('label'=>"ProductAccountancyBuyExportCode", 'checked'=>0, 'position'=>405), + 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'p.tosell'=>array('label'=>$langs->transnoentitiesnoconv("Status").' ('.$langs->transnoentitiesnoconv("Sell").')', 'checked'=>1, 'position'=>1000), + 'p.tobuy'=>array('label'=>$langs->transnoentitiesnoconv("Status").' ('.$langs->transnoentitiesnoconv("Buy").')', 'checked'=>1, 'position'=>1000) ); // MultiPrices if ($conf->global->PRODUIT_MULTIPRICES) { - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; if (!empty($conf->global->$keyforlabel)) { - $labelp = $i.' - '.$langs->trans($conf->global->$keyforlabel); + $labelp = $i.' - '.$langs->transnoentitiesnoconv($conf->global->$keyforlabel); } else { - $labelp = $langs->trans("SellingPrice")." ".$i; + $labelp = $langs->transnoentitiesnoconv("SellingPrice")." ".$i; } - $arrayfields['p.sellprice'.$i] = array('label'=>$labelp, 'checked'=>1, 'enabled'=>$conf->global->PRODUIT_MULTIPRICES, 'position'=>floatval('40.'.sprintf('%03s', $i))); + $arrayfields['p.sellprice'.$i] = array('label'=>$labelp, 'checked'=>($i == 1 ? 1 : 0), 'enabled'=>$conf->global->PRODUIT_MULTIPRICES, 'position'=>floatval('40.'.sprintf('%03s', $i))); $arraypricelevel[$i] = array($i); } } @@ -248,32 +261,47 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Security check +if ($search_type == '0') { + $result = restrictedArea($user, 'produit', '', '', '', '', '', 0); +} elseif ($search_type == '1') { + $result = restrictedArea($user, 'service', '', '', '', '', '', 0); +} else { + $result = restrictedArea($user, 'produit|service', '', '', '', '', '', 0); +} /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $rightskey = 'produit'; -if ($type == Product::TYPE_SERVICE) $rightskey = 'service'; +if ($type == Product::TYPE_SERVICE) { + $rightskey = 'service'; +} -if (empty($reshook)) -{ +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 - { + 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 $sall = ""; $search_ref = ""; + $search_ref_supplier = ""; $search_label = ""; $search_barcode = ""; $searchCategoryProductOperator = 0; @@ -299,11 +327,16 @@ if (empty($reshook)) // Mass actions $objectclass = 'Product'; - if ((string) $search_type == '1') { $objectlabel = 'Services'; } - if ((string) $search_type == '0') { $objectlabel = 'Products'; } + if ((string) $search_type == '1') { + $objectlabel = 'Services'; + } + if ((string) $search_type == '0') { + $objectlabel = 'Products'; + } $permissiontoread = $user->rights->{$rightskey}->lire; $permissiontodelete = $user->rights->{$rightskey}->supprimer; + $permissiontoadd = $user->rights->{$rightskey}->creer; $uploaddir = $conf->product->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -315,10 +348,8 @@ if (empty($reshook)) $title = $langs->trans("ProductsAndServices"); -if ($search_type != '' && $search_type != '-1') -{ - if ($search_type == 1) - { +if ($search_type != '' && $search_type != '-1') { + if ($search_type == 1) { $texte = $langs->trans("Services"); } else { $texte = $langs->trans("Products"); @@ -329,59 +360,102 @@ if ($search_type != '' && $search_type != '-1') $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity,'; $sql .= ' p.fk_product_type, p.duration, p.finished, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; -$sql .= ' p.tobatch, 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.tobatch,'; +if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; +} else { + $sql .= " pa.accountancy_code_sell, pa.accountancy_code_sell_intra, pa.accountancy_code_sell_export, pa.accountancy_code_buy, pa.accountancy_code_buy_intra, pa.accountancy_code_buy_export,"; +} $sql .= ' p.datec as date_creation, p.tms as date_update, p.pmp, p.stock, p.cost_price,'; $sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units, fk_country, fk_state,'; -if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ' p.fk_unit, cu.label as cu_label,'; +if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ' p.fk_unit, cu.label as cu_label,'; +} $sql .= ' MIN(pfp.unitprice) as minsellprice'; if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) { $sql .= ', pac.rowid prod_comb_id'; } // 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 as p'; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)"; -if (!empty($searchCategoryProductList) || !empty($catid)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; // We'll need this table joined to the select in order to filter by categ +if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity); +} +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)"; +} +if (!empty($searchCategoryProductList) || !empty($catid)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; // We'll need this table joined to the select in order to filter by categ +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; // multilang -if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$db->escape($langs->getDefaultLang())."'"; +if (!empty($conf->global->MAIN_MULTILANGS)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$db->escape($langs->getDefaultLang())."'"; +} if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination pac ON pac.fk_product_child = p.rowid"; } -if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units cu ON cu.rowid = p.fk_unit"; +if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_units cu ON cu.rowid = p.fk_unit"; +} $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} // if the type is not 1, we show all products (type = 0,2,3) -if (dol_strlen($search_type) && $search_type != '-1') -{ - if ($search_type == 1) $sql .= " AND p.fk_product_type = 1"; - else $sql .= " AND p.fk_product_type <> 1"; +if (dol_strlen($search_type) && $search_type != '-1') { + if ($search_type == 1) { + $sql .= " AND p.fk_product_type = 1"; + } else { + $sql .= " AND p.fk_product_type <> 1"; + } } if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) { $sql .= " AND pac.rowid IS NULL"; } -if ($search_ref) $sql .= natural_search('p.ref', $search_ref); -if ($search_label) $sql .= natural_search('p.label', $search_label); -if ($search_barcode) $sql .= natural_search('p.barcode', $search_barcode); -if (isset($search_tosell) && dol_strlen($search_tosell) > 0 && $search_tosell != -1) $sql .= " AND p.tosell = ".((int) $search_tosell); -if (isset($search_tobuy) && dol_strlen($search_tobuy) > 0 && $search_tobuy != -1) $sql .= " AND p.tobuy = ".((int) $search_tobuy); -if (isset($search_tobatch) && dol_strlen($search_tobatch) > 0 && $search_tobatch != -1) $sql .= " AND p.tobatch = ".((int) $search_tobatch); -if ($search_vatrate) $sql .= natural_search('p.tva_tx', $search_vatrate, 1); -if (dol_strlen($canvas) > 0) $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; -if ($catid > 0) $sql .= " AND cp.fk_categorie = ".$catid; -if ($catid == -2) $sql .= " AND cp.fk_categorie IS NULL"; +if ($search_ref) { + $sql .= natural_search('p.ref', $search_ref); +} +if ($search_label) { + $sql .= natural_search('p.label', $search_label); +} +if ($search_barcode) { + $sql .= natural_search('p.barcode', $search_barcode); +} +if (isset($search_tosell) && dol_strlen($search_tosell) > 0 && $search_tosell != -1) { + $sql .= " AND p.tosell = ".((int) $search_tosell); +} +if (isset($search_tobuy) && dol_strlen($search_tobuy) > 0 && $search_tobuy != -1) { + $sql .= " AND p.tobuy = ".((int) $search_tobuy); +} +if (isset($search_tobatch) && dol_strlen($search_tobatch) > 0 && $search_tobatch != -1) { + $sql .= " AND p.tobatch = ".((int) $search_tobatch); +} +if ($search_vatrate) { + $sql .= natural_search('p.tva_tx', $search_vatrate, 1); +} +if (dol_strlen($canvas) > 0) { + $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; +} +if ($catid > 0) { + $sql .= " AND cp.fk_categorie = ".$catid; +} +if ($catid == -2) { + $sql .= " AND cp.fk_categorie IS NULL"; +} $searchCategoryProductSqlList = array(); if ($searchCategoryProductOperator == 1) { foreach ($searchCategoryProductList as $searchCategoryProduct) { @@ -399,23 +473,43 @@ if ($searchCategoryProductOperator == 1) { if (intval($searchCategoryProduct) == -2) { $searchCategoryProductSqlList[] = "cp.fk_categorie IS NULL"; } elseif (intval($searchCategoryProduct) > 0) { - $searchCategoryProductSqlList[] = "p.rowid IN (SELECT fk_product FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_categorie = ".$searchCategoryProduct.")"; + $searchCategoryProductSqlList[] = "p.rowid IN (SELECT fk_product FROM ".MAIN_DB_PREFIX."categorie_product WHERE fk_categorie = ".((int) $searchCategoryProduct).")"; } } if (!empty($searchCategoryProductSqlList)) { $sql .= " AND (".implode(' AND ', $searchCategoryProductSqlList).")"; } } -if ($fourn_id > 0) $sql .= " AND pfp.fk_soc = ".((int) $fourn_id); -if ($search_country) $sql .= " AND p.fk_country = ".$search_country; -if ($search_state) $sql .= " AND p.fk_state = ".$search_state; -if ($search_finished >= 0 && $search_finished !== '') $sql .= " AND p.finished = ".$search_finished; -if ($search_accountancy_code_sell) $sql .= natural_search('p.accountancy_code_sell', $search_accountancy_code_sell); -if ($search_accountancy_code_sell_intra) $sql .= natural_search('p.accountancy_code_sell_intra', $search_accountancy_code_sell_intra); -if ($search_accountancy_code_sell_export) $sql .= natural_search('p.accountancy_code_sell_export', $search_accountancy_code_sell_export); -if ($search_accountancy_code_buy) $sql .= natural_search('p.accountancy_code_buy', $search_accountancy_code_buy); -if ($search_accountancy_code_buy_intra) $sql .= natural_search('p.accountancy_code_buy_intra', $search_accountancy_code_buy_intra); -if ($search_accountancy_code_buy_export) $sql .= natural_search('p.accountancy_code_buy_export', $search_accountancy_code_buy_export); +if ($fourn_id > 0) { + $sql .= " AND pfp.fk_soc = ".((int) $fourn_id); +} +if ($search_country) { + $sql .= " AND p.fk_country = ".((int) $search_country); +} +if ($search_state) { + $sql .= " AND p.fk_state = ".((int) $search_state); +} +if ($search_finished >= 0 && $search_finished !== '') { + $sql .= " AND p.finished = ".((int) $search_finished); +} +if ($search_accountancy_code_sell) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell', $search_accountancy_code_sell); +} +if ($search_accountancy_code_sell_intra) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_intra', $search_accountancy_code_sell_intra); +} +if ($search_accountancy_code_sell_export) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_export', $search_accountancy_code_sell_export); +} +if ($search_accountancy_code_buy) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy', $search_accountancy_code_buy); +} +if ($search_accountancy_code_buy_intra) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_intra', $search_accountancy_code_buy_intra); +} +if ($search_accountancy_code_buy_export) { + $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_export', $search_accountancy_code_buy_export); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -425,17 +519,25 @@ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // No $sql .= $hookmanager->resPrint; $sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type,"; $sql .= " p.fk_product_type, p.duration, p.finished, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,"; -$sql .= ' p.datec, p.tms, p.entity, p.tobatch, 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, p.pmp, p.cost_price, p.stock,'; +$sql .= ' p.datec, p.tms, p.entity, p.tobatch, p.pmp, p.cost_price, p.stock,'; +if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { + $sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; +} else { + $sql .= " pa.accountancy_code_sell, pa.accountancy_code_sell_intra, pa.accountancy_code_sell_export, pa.accountancy_code_buy, pa.accountancy_code_buy_intra, pa.accountancy_code_buy_export,"; +} $sql .= ' p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units, p.fk_country, p.fk_state'; -if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ', p.fk_unit, cu.label'; +if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ', p.fk_unit, cu.label'; +} if (!empty($conf->variants->enabled) && (!empty($conf->global->PRODUIT_ATTRIBUTES_HIDECHILD) && !$show_childproducts)) { $sql .= ', pac.rowid'; } // 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 : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + } } // Add fields from hooks $parameters = array(); @@ -445,12 +547,10 @@ $sql .= $hookmanager->resPrint; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -460,14 +560,12 @@ $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/product/card.php?id='.$id); @@ -475,22 +573,20 @@ if ($resql) } $helpurl = ''; - if ($search_type != '') - { - if ($search_type == 0) - { + if ($search_type != '') { + if ($search_type == 0) { $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; - } elseif ($search_type == 1) - { + } elseif ($search_type == 1) { $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } } - foreach ($searchCategoryProductList as $searchCategoryProduct) { - $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); - } - llxHeader('', $title, $helpurl, '', 0, 0, "", "", $paramsCat); + $paramsCat = ''; + foreach ($searchCategoryProductList as $searchCategoryProduct) { + $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); + } + llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, 'classforhorizontalscrolloftabs'); // Displays product removal confirmation if (GETPOST('delprod')) { @@ -498,68 +594,138 @@ if ($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 ($sall) $param .= "&sall=".urlencode($sall); - if ($searchCategoryProductOperator == 1) $param .= "&search_category_product_operator=".urlencode($searchCategoryProductOperator); + 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 ($searchCategoryProductOperator == 1) { + $param .= "&search_category_product_operator=".urlencode($searchCategoryProductOperator); + } foreach ($searchCategoryProductList as $searchCategoryProduct) { $param .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } - if ($search_ref) $param = "&search_ref=".urlencode($search_ref); - if ($search_ref_supplier) $param = "&search_ref_supplier=".urlencode($search_ref_supplier); - if ($search_barcode) $param .= ($search_barcode ? "&search_barcode=".urlencode($search_barcode) : ""); - if ($search_label) $param .= "&search_label=".urlencode($search_label); - if ($search_tosell != '') $param .= "&search_tosell=".urlencode($search_tosell); - if ($search_tobuy != '') $param .= "&search_tobuy=".urlencode($search_tobuy); - if ($search_tobatch) $param = "&search_tobatch=".urlencode($search_tobatch); - if ($search_country != '') $param .= "&search_country=".urlencode($search_country); - if ($search_state != '') $param .= "&search_state=".urlencode($search_state); - if ($search_vatrate) $param = "&search_vatrate=".urlencode($search_vatrate); - if ($fourn_id > 0) $param .= ($fourn_id ? "&fourn_id=".$fourn_id : ""); + if ($search_ref) { + $param = "&search_ref=".urlencode($search_ref); + } + if ($search_ref_supplier) { + $param = "&search_ref_supplier=".urlencode($search_ref_supplier); + } + if ($search_barcode) { + $param .= ($search_barcode ? "&search_barcode=".urlencode($search_barcode) : ""); + } + if ($search_label) { + $param .= "&search_label=".urlencode($search_label); + } + if ($search_tosell != '') { + $param .= "&search_tosell=".urlencode($search_tosell); + } + if ($search_tobuy != '') { + $param .= "&search_tobuy=".urlencode($search_tobuy); + } + if ($search_tobatch) { + $param = "&search_tobatch=".urlencode($search_tobatch); + } + if ($search_country != '') { + $param .= "&search_country=".urlencode($search_country); + } + if ($search_state != '') { + $param .= "&search_state=".urlencode($search_state); + } + if ($search_vatrate) { + $param = "&search_vatrate=".urlencode($search_vatrate); + } + if ($fourn_id > 0) { + $param .= "&fourn_id=".urlencode($fourn_id); + } //if ($seach_categ) $param.=($search_categ?"&search_categ=".urlencode($search_categ):""); - if ($show_childproducts) $param .= ($show_childproducts ? "&search_show_childproducts=".urlencode($show_childproducts) : ""); - if ($type != '') $param .= '&type='.urlencode($type); - if ($search_type != '') $param .= '&search_type='.urlencode($search_type); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - if ($search_accountancy_code_sell) $param = "&search_accountancy_code_sell=".urlencode($search_accountancy_code_sell); - if ($search_accountancy_code_sell_intra) $param = "&search_accountancy_code_sell_intra=".urlencode($search_accountancy_code_sell_intra); - if ($search_accountancy_code_sell_export) $param = "&search_accountancy_code_sell_export=".urlencode($search_accountancy_code_sell_export); - if ($search_accountancy_code_buy) $param = "&search_accountancy_code_buy=".urlencode($search_accountancy_code_buy); - if ($search_accountancy_code_buy_intra) $param = "&search_accountancy_code_buy_intra=".urlencode($search_accountancy_code_buy_intra); - if ($search_accountancy_code_buy_export) $param = "&search_accountancy_code_buy_export=".urlencode($search_accountancy_code_buy_export); - if ($search_finished) $param = "&search_finished=".urlencode($search_finished); + if ($show_childproducts) { + $param .= ($show_childproducts ? "&search_show_childproducts=".urlencode($show_childproducts) : ""); + } + if ($type != '') { + $param .= '&type='.urlencode($type); + } + if ($search_type != '') { + $param .= '&search_type='.urlencode($search_type); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_accountancy_code_sell) { + $param = "&search_accountancy_code_sell=".urlencode($search_accountancy_code_sell); + } + if ($search_accountancy_code_sell_intra) { + $param = "&search_accountancy_code_sell_intra=".urlencode($search_accountancy_code_sell_intra); + } + if ($search_accountancy_code_sell_export) { + $param = "&search_accountancy_code_sell_export=".urlencode($search_accountancy_code_sell_export); + } + if ($search_accountancy_code_buy) { + $param = "&search_accountancy_code_buy=".urlencode($search_accountancy_code_buy); + } + if ($search_accountancy_code_buy_intra) { + $param = "&search_accountancy_code_buy_intra=".urlencode($search_accountancy_code_buy_intra); + } + if ($search_accountancy_code_buy_export) { + $param = "&search_accountancy_code_buy_export=".urlencode($search_accountancy_code_buy_export); + } + if ($search_finished) { + $param = "&search_finished=".urlencode($search_finished); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); - if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + + if ($user->rights->{$rightskey}->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if ($user->rights->{$rightskey}->creer) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); + } + if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; - if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer); - elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer; - elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer; + if ($type === "") { + $perm = ($user->rights->produit->creer || $user->rights->service->creer); + } elseif ($type == Product::TYPE_SERVICE) { + $perm = $user->rights->service->creer; + } elseif ($type == Product::TYPE_PRODUCT) { + $perm = $user->rights->produit->creer; + } $oldtype = $type; $params = array(); - if ($type === "") $params['forcenohideoftext'] = 1; + if ($type === "") { + $params['forcenohideoftext'] = 1; + } if ($type === "") { $newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', $perm, $params); $type = Product::TYPE_SERVICE; } $label = 'NewProduct'; - if ($type == Product::TYPE_SERVICE) $label = 'NewService'; + if ($type == Product::TYPE_SERVICE) { + $label = 'NewService'; + } $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', $perm, $params); $type = $oldtype; print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -567,10 +733,14 @@ if ($resql) print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; //print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="type" value="'.$type.'">'; - if (empty($arrayfields['p.fk_product_type']['checked'])) print '<input type="hidden" name="search_type" value="'.dol_escape_htmltag($search_type).'">'; + if (empty($arrayfields['p.fk_product_type']['checked'])) { + print '<input type="hidden" name="search_type" value="'.dol_escape_htmltag($search_type).'">'; + } $picto = 'product'; - if ($type == 1) $picto = 'service'; + if ($type == 1) { + $picto = 'service'; + } print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -580,8 +750,7 @@ if ($resql) $trackid = 'prod'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if (!empty($catid)) - { + if (!empty($catid)) { print "<div id='ways'>"; $c = new Categorie($db); $ways = $c->print_all_ways(' &gt; ', 'product/list.php'); @@ -589,18 +758,18 @@ if ($resql) print "</div><br>"; } - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } // Filter on categories $moreforfilter = ''; - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) - { + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('Categories').': '; + $moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"'); $categoriesProductArr = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', '', 64, 0, 1); $categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -'; $moreforfilter .= Form::multiselectarray('search_category_product_list', $categoriesProductArr, $searchCategoryProductList, 0, 0, 'minwidth300'); @@ -618,11 +787,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if ($moreforfilter) - { + if ($moreforfilter) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -630,63 +801,57 @@ 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); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; // Lines with input filters print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="liste_titre left">'; print '<input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['pfp.ref_fourn']['checked'])) - { + if (!empty($arrayfields['pfp.ref_fourn']['checked'])) { print '<td class="liste_titre left">'; print '<input class="flat" type="text" name="search_ref_supplier" size="8" value="'.dol_escape_htmltag($search_ref_supplier).'">'; print '</td>'; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { print '<td class="liste_titre left">'; print '<input class="flat" type="text" name="search_label" size="12" value="'.dol_escape_htmltag($search_label).'">'; print '</td>'; } // Type - if (!empty($arrayfields['p.fk_product_type']['checked'])) - { + if (!empty($arrayfields['p.fk_product_type']['checked'])) { print '<td class="liste_titre center">'; $array = array('-1'=>'&nbsp;', '0'=>$langs->trans('Product'), '1'=>$langs->trans('Service')); print $form->selectarray('search_type', $array, $search_type); print '</td>'; } // Barcode - if (!empty($arrayfields['p.barcode']['checked'])) - { + if (!empty($arrayfields['p.barcode']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat" type="text" name="search_barcode" size="6" value="'.dol_escape_htmltag($search_barcode).'">'; print '</td>'; } // Duration - if (!empty($arrayfields['p.duration']['checked'])) - { + if (!empty($arrayfields['p.duration']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Finished - if (!empty($arrayfields['p.finished']['checked'])) - { + if (!empty($arrayfields['p.finished']['checked'])) { print '<td class="liste_titre">'; print $formproduct->selectProductNature('search_finished', $search_finished); print '</td>'; } // Weight - if (!empty($arrayfields['p.weight']['checked'])) - { + if (!empty($arrayfields['p.weight']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -696,8 +861,7 @@ if ($resql) print '</td>'; } // Length - if (!empty($arrayfields['p.length']['checked'])) - { + if (!empty($arrayfields['p.length']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -717,8 +881,7 @@ if ($resql) print '</td>'; } // Height - if (!empty($arrayfields['p.height']['checked'])) - { + if (!empty($arrayfields['p.height']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -728,8 +891,7 @@ if ($resql) print '</td>'; } // Surface - if (!empty($arrayfields['p.surface']['checked'])) - { + if (!empty($arrayfields['p.surface']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -739,8 +901,7 @@ if ($resql) print '</td>'; } // Volume - if (!empty($arrayfields['p.volume']['checked'])) - { + if (!empty($arrayfields['p.volume']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -751,25 +912,21 @@ if ($resql) } // Unit - if (!empty($arrayfields['cu.label']['checked'])) - { + if (!empty($arrayfields['cu.label']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Sell price - if (!empty($arrayfields['p.sellprice']['checked'])) - { + if (!empty($arrayfields['p.sellprice']['checked'])) { print '<td class="liste_titre right">'; print '</td>'; } // Multiprice if ($conf->global->PRODUIT_MULTIPRICES) { - foreach ($arraypricelevel as $key => $value) - { - if (!empty($arrayfields['p.sellprice'.$key]['checked'])) - { + foreach ($arraypricelevel as $key => $value) { + if (!empty($arrayfields['p.sellprice'.$key]['checked'])) { print '<td class="liste_titre right">'; print '</td>'; } @@ -777,72 +934,95 @@ if ($resql) } // Minimum buying Price - if (!empty($arrayfields['p.minbuyprice']['checked'])) - { + if (!empty($arrayfields['p.minbuyprice']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // Number buying Price - if (!empty($arrayfields['p.numbuyprice']['checked'])) - { + if (!empty($arrayfields['p.numbuyprice']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // Sell price - if (!empty($arrayfields['p.tva_tx']['checked'])) - { + if (!empty($arrayfields['p.tva_tx']['checked'])) { print '<td class="liste_titre right">'; print '<input class="right flat maxwidth50" placeholder="%" type="text" name="search_vatrate" size="1" value="'.dol_escape_htmltag($search_vatrate).'">'; print '</td>'; } // WAP - if (!empty($arrayfields['p.pmp']['checked'])) - { + if (!empty($arrayfields['p.pmp']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // cost_price - if (!empty($arrayfields['p.cost_price']['checked'])) - { + if (!empty($arrayfields['p.cost_price']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // Limit for alert - if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) - { + if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // Desired stock - if (!empty($arrayfields['p.desiredstock']['checked'])) - { + if (!empty($arrayfields['p.desiredstock']['checked'])) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; } // Stock - if (!empty($arrayfields['p.stock']['checked'])) print '<td class="liste_titre">&nbsp;</td>'; + if (!empty($arrayfields['p.stock']['checked'])) { + print '<td class="liste_titre">&nbsp;</td>'; + } // Stock - if (!empty($arrayfields['stock_virtual']['checked'])) print '<td class="liste_titre">&nbsp;</td>'; + if (!empty($arrayfields['stock_virtual']['checked'])) { + print '<td class="liste_titre">&nbsp;</td>'; + } // To batch - if (!empty($arrayfields['p.tobatch']['checked'])) print '<td class="liste_titre center">'.$form->selectyesno('search_tobatch', $search_tobatch, 1, false, 1).'</td>'; + if (!empty($arrayfields['p.tobatch']['checked'])) { + print '<td class="liste_titre center">'; + $statutarray = array( + '-1' => '', + '0' => $langs->trans("ProductStatusNotOnBatchShort"), + '1' => $langs->trans("ProductStatusOnBatchShort"), + '2' => $langs->trans("ProductStatusOnSerialShort") + ); + print $form->selectarray('search_tobatch', $statutarray, $search_tobatch); + print '</td>'; + } // Country - if (!empty($arrayfields['p.fk_country']['checked'])) print '<td class="liste_titre center">'.$form->select_country($search_country, 'search_country', '', 0).'</td>'; + if (!empty($arrayfields['p.fk_country']['checked'])) { + print '<td class="liste_titre center">'.$form->select_country($search_country, 'search_country', '', 0).'</td>'; + } // State - if (!empty($arrayfields['p.fk_state']['checked'])) print '<td class="liste_titre center">'.$formcompany->select_state($search_state, $search_country).'</td>'; + if (!empty($arrayfields['p.fk_state']['checked'])) { + print '<td class="liste_titre center">'.$formcompany->select_state($search_state, $search_country).'</td>'; + } // Accountancy code sell - if (!empty($arrayfields['p.accountancy_code_sell']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell" value="'.dol_escape_htmltag($search_accountancy_code_sell).'"></td>'; - if (!empty($arrayfields['p.accountancy_code_sell_intra']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_intra" value="'.dol_escape_htmltag($search_accountancy_code_sell_intra).'"></td>'; - if (!empty($arrayfields['p.accountancy_code_sell_export']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_export" value="'.dol_escape_htmltag($search_accountancy_code_sell_export).'"></td>'; + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell" value="'.dol_escape_htmltag($search_accountancy_code_sell).'"></td>'; + } + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_intra" value="'.dol_escape_htmltag($search_accountancy_code_sell_intra).'"></td>'; + } + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_export" value="'.dol_escape_htmltag($search_accountancy_code_sell_export).'"></td>'; + } // Accountancy code buy - if (!empty($arrayfields['p.accountancy_code_buy']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy" value="'.dol_escape_htmltag($search_accountancy_code_buy).'"></td>'; - if (!empty($arrayfields['p.accountancy_code_buy_intra']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_intra" value="'.dol_escape_htmltag($search_accountancy_code_buy_intra).'"></td>'; - if (!empty($arrayfields['p.accountancy_code_buy_export']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_export" value="'.dol_escape_htmltag($search_accountancy_code_buy_export).'"></td>'; + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy" value="'.dol_escape_htmltag($search_accountancy_code_buy).'"></td>'; + } + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_intra" value="'.dol_escape_htmltag($search_accountancy_code_buy_intra).'"></td>'; + } + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { + print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_export" value="'.dol_escape_htmltag($search_accountancy_code_buy_export).'"></td>'; + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook @@ -850,26 +1030,22 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { + if (!empty($arrayfields['p.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { + if (!empty($arrayfields['p.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } - if (!empty($arrayfields['p.tosell']['checked'])) - { - print '<td class="liste_titre right">'; + if (!empty($arrayfields['p.tosell']['checked'])) { + print '<td class="liste_titre center">'; print $form->selectarray('search_tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'), '1'=>$langs->trans('ProductStatusOnSellShort')), $search_tosell, 1); print '</td >'; } - if (!empty($arrayfields['p.tobuy']['checked'])) - { - print '<td class="liste_titre right">'; + if (!empty($arrayfields['p.tobuy']['checked'])) { + print '<td class="liste_titre center">'; print $form->selectarray('search_tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'), '1'=>$langs->trans('ProductStatusOnBuyShort')), $search_tobuy, 1); print '</td>'; } @@ -903,29 +1079,53 @@ if ($resql) print_liste_field_titre($arrayfields['p.finished']['label'], $_SERVER["PHP_SELF"], "p.finished", "", $param, '', $sortfield, $sortorder, 'center '); } - if (!empty($arrayfields['p.weight']['checked'])) print_liste_field_titre($arrayfields['p.weight']['label'], $_SERVER['PHP_SELF'], 'p.weight', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.weight_units']['checked'])) print_liste_field_titre($arrayfields['p.weight_units']['label'], $_SERVER['PHP_SELF'], 'p.weight_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.length']['checked'])) print_liste_field_titre($arrayfields['p.length']['label'], $_SERVER['PHP_SELF'], 'p.length', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.length_units']['checked'])) print_liste_field_titre($arrayfields['p.length_units']['label'], $_SERVER['PHP_SELF'], 'p.length_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.width']['checked'])) print_liste_field_titre($arrayfields['p.width']['label'], $_SERVER['PHP_SELF'], 'p.width', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.width_units']['checked'])) print_liste_field_titre($arrayfields['p.width_units']['label'], $_SERVER['PHP_SELF'], 'p.width_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.height']['checked'])) print_liste_field_titre($arrayfields['p.height']['label'], $_SERVER['PHP_SELF'], 'p.height', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.height_units']['checked'])) print_liste_field_titre($arrayfields['p.height_units']['label'], $_SERVER['PHP_SELF'], 'p.height_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.surface']['checked'])) print_liste_field_titre($arrayfields['p.surface']['label'], $_SERVER['PHP_SELF'], "p.surface", '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.surface_units']['checked'])) print_liste_field_titre($arrayfields['p.surface_units']['label'], $_SERVER['PHP_SELF'], 'p.surface_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.volume']['checked'])) print_liste_field_titre($arrayfields['p.volume']['label'], $_SERVER['PHP_SELF'], 'p.volume', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['p.volume_units']['checked'])) print_liste_field_titre($arrayfields['p.volume_units']['label'], $_SERVER['PHP_SELF'], 'p.volume_units', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['cu.label']['checked'])) print_liste_field_titre($arrayfields['cu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['p.weight']['checked'])) { + print_liste_field_titre($arrayfields['p.weight']['label'], $_SERVER['PHP_SELF'], 'p.weight', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.weight_units']['checked'])) { + print_liste_field_titre($arrayfields['p.weight_units']['label'], $_SERVER['PHP_SELF'], 'p.weight_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.length']['checked'])) { + print_liste_field_titre($arrayfields['p.length']['label'], $_SERVER['PHP_SELF'], 'p.length', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.length_units']['checked'])) { + print_liste_field_titre($arrayfields['p.length_units']['label'], $_SERVER['PHP_SELF'], 'p.length_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.width']['checked'])) { + print_liste_field_titre($arrayfields['p.width']['label'], $_SERVER['PHP_SELF'], 'p.width', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.width_units']['checked'])) { + print_liste_field_titre($arrayfields['p.width_units']['label'], $_SERVER['PHP_SELF'], 'p.width_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.height']['checked'])) { + print_liste_field_titre($arrayfields['p.height']['label'], $_SERVER['PHP_SELF'], 'p.height', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.height_units']['checked'])) { + print_liste_field_titre($arrayfields['p.height_units']['label'], $_SERVER['PHP_SELF'], 'p.height_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.surface']['checked'])) { + print_liste_field_titre($arrayfields['p.surface']['label'], $_SERVER['PHP_SELF'], "p.surface", '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.surface_units']['checked'])) { + print_liste_field_titre($arrayfields['p.surface_units']['label'], $_SERVER['PHP_SELF'], 'p.surface_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.volume']['checked'])) { + print_liste_field_titre($arrayfields['p.volume']['label'], $_SERVER['PHP_SELF'], 'p.volume', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['p.volume_units']['checked'])) { + print_liste_field_titre($arrayfields['p.volume_units']['label'], $_SERVER['PHP_SELF'], 'p.volume_units', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['cu.label']['checked'])) { + print_liste_field_titre($arrayfields['cu.label']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center '); + } if (!empty($arrayfields['p.sellprice']['checked'])) { print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); } // Multiprices if ($conf->global->PRODUIT_MULTIPRICES) { - foreach ($arraypricelevel as $key => $value) - { - if (!empty($arrayfields['p.sellprice'.$key]['checked'])) - { + foreach ($arraypricelevel as $key => $value) { + if (!empty($arrayfields['p.sellprice'.$key]['checked'])) { print_liste_field_titre($arrayfields['p.sellprice'.$key]['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); } } @@ -967,23 +1167,23 @@ if ($resql) if (!empty($arrayfields['p.fk_state']['checked'])) { print_liste_field_titre($arrayfields['p.fk_state']['label'], $_SERVER["PHP_SELF"], "p.fk_state", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_sell']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_sell_intra']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_sell_export']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_buy']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_buy_intra']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder); } - if (!empty($arrayfields['p.accountancy_code_buy_export']['checked'])) { - print_liste_field_titre($arrayfields['p.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], "p.accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { + print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder); } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -998,10 +1198,10 @@ if ($resql) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (!empty($arrayfields['p.tosell']['checked'])) { - print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['p.tosell']['label'], $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.tobuy']['checked'])) { - print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['p.tobuy']['label'], $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center '); } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; @@ -1012,13 +1212,12 @@ if ($resql) $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + $totalarray['nbfield'] = 0; + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // If multilang is enabled - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // If multilang is enabled $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$obj->rowid; @@ -1026,10 +1225,11 @@ if ($resql) $sql .= " LIMIT 1"; $result = $db->query($sql); - if ($result) - { + if ($result) { $objtp = $db->fetch_object($result); - if (!empty($objtp->label)) $obj->label = $objtp->label; + if (!empty($objtp->label)) { + $obj->label = $objtp->label; + } } } @@ -1068,12 +1268,12 @@ if ($resql) } // STOCK_DISABLE_OPTIM_LOAD can be set to force load_stock whatever is permissions on stock. - if ((!empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || !empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock - { - if ($obj->fk_product_type != 1 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Not a service - { + if ((!empty($conf->stock->enabled) && $user->rights->stock->lire && $search_type != 1) || !empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) { // To optimize call of load_stock + if ($obj->fk_product_type != 1 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Not a service $option = 'nobatch'; - if (empty($arrayfields['stock_virtual']['checked'])) $option .= ',novirtual'; + if (empty($arrayfields['stock_virtual']['checked'])) { + $option .= ',novirtual'; + } $product_static->load_stock($option); // Load stock_reel + stock_warehouse. This can also call load_virtual_stock() } } @@ -1081,208 +1281,238 @@ if ($resql) print '<tr class="oddeven">'; // Ref - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="tdoverflowmax200">'; print $product_static->getNomUrl(1); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref supplier - if (!empty($arrayfields['pfp.ref_fourn']['checked'])) - { + if (!empty($arrayfields['pfp.ref_fourn']['checked'])) { print '<td class="tdoverflowmax200">'; print $product_static->getNomUrl(1); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->label).'">'.$obj->label.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type - if (!empty($arrayfields['p.fk_product_type']['checked'])) - { + if (!empty($arrayfields['p.fk_product_type']['checked'])) { print '<td class="center">'; $s = ''; - if ($obj->fk_product_type == 0) - { - //$s .= '<a class="product-type-back" title="'.$langs->trans("Product").'">'; + if ($obj->fk_product_type == 0) { $s .= img_picto($langs->trans("Product"), 'product', 'class="paddingleftonly paddingrightonly colorgrey"'); - //$s .= dol_substr($langs->trans("Product"), 0, 1); - //$s .= '</a>'; } else { - //$s .= '<span class="service-type-back" title="'.$langs->trans("Service").'">'; $s .= img_picto($langs->trans("Service"), 'service', 'class="paddingleftonly paddingrightonly colorgrey"'); - //$s .= dol_substr($langs->trans("Service"), 0, 1); - //$s .= '</a>'; } print $s; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Barcode - if (!empty($arrayfields['p.barcode']['checked'])) - { + if (!empty($arrayfields['p.barcode']['checked'])) { print '<td>'.$obj->barcode.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Duration - if (!empty($arrayfields['p.duration']['checked'])) - { + if (!empty($arrayfields['p.duration']['checked'])) { print '<td class="center nowraponall">'; - if (preg_match('/([^a-z]+)[a-z]$/i', $obj->duration)) - { + if (preg_match('/([^a-z]+)[a-z]$/i', $obj->duration)) { $duration_value = substr($obj->duration, 0, dol_strlen($obj->duration) - 1); $duration_unit = substr($obj->duration, -1); - if ((float) $duration_value > 1) - { + if ((float) $duration_value > 1) { $dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); - } elseif ((float) $duration_value > 0) - { + } elseif ((float) $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 $duration_value; print ((!empty($duration_unit) && isset($dur[$duration_unit]) && $duration_value != '') ? ' '.$langs->trans($dur[$duration_unit]) : ''); - } elseif (!preg_match('/^[a-z]$/i', $obj->duration)) // If duration is a simple char (like 's' of 'm'), we do not show value - { + } elseif (!preg_match('/^[a-z]$/i', $obj->duration)) { // If duration is a simple char (like 's' of 'm'), we do not show value print $obj->duration; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Finished - if (!empty($arrayfields['p.finished']['checked'])) - { + if (!empty($arrayfields['p.finished']['checked'])) { print '<td class="center">'; print $product_static->getLibFinished(); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Weight - if (!empty($arrayfields['p.weight']['checked'])) - { + if (!empty($arrayfields['p.weight']['checked'])) { print '<td class="center">'; print $obj->weight; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Weight units if (!empty($arrayfields['p.weight_units']['checked'])) { print '<td class="center">'; - if ($product_static->weight != '') print measuringUnitString(0, 'weight', $product_static->weight_units); + if ($product_static->weight != '') { + print measuringUnitString(0, 'weight', $product_static->weight_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Length - if (!empty($arrayfields['p.length']['checked'])) - { + if (!empty($arrayfields['p.length']['checked'])) { print '<td class="center">'; print $obj->length; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Length units if (!empty($arrayfields['p.length_units']['checked'])) { print '<td class="center">'; - if ($product_static->length != '') print measuringUnitString(0, 'size', $product_static->length_units); + if ($product_static->length != '') { + print measuringUnitString(0, 'size', $product_static->length_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Width - if (!empty($arrayfields['p.width']['checked'])) - { + if (!empty($arrayfields['p.width']['checked'])) { print '<td align="center">'; print $obj->width; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Width units if (!empty($arrayfields['p.width_units']['checked'])) { print '<td class="center">'; - if ($product_static->width != '') print measuringUnitString(0, 'size', $product_static->width_units); + if ($product_static->width != '') { + print measuringUnitString(0, 'size', $product_static->width_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Height - if (!empty($arrayfields['p.height']['checked'])) - { + if (!empty($arrayfields['p.height']['checked'])) { print '<td align="center">'; print $obj->height; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Height units if (!empty($arrayfields['p.height_units']['checked'])) { print '<td class="center">'; - if ($product_static->height != '') print measuringUnitString(0, 'size', $product_static->height_units); + if ($product_static->height != '') { + print measuringUnitString(0, 'size', $product_static->height_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Surface - if (!empty($arrayfields['p.surface']['checked'])) - { + if (!empty($arrayfields['p.surface']['checked'])) { print '<td class="center">'; print $obj->surface; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Surface units if (!empty($arrayfields['p.surface_units']['checked'])) { print '<td class="center">'; - if ($product_static->surface != '') print measuringUnitString(0, 'surface', $product_static->surface_units); + if ($product_static->surface != '') { + print measuringUnitString(0, 'surface', $product_static->surface_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Volume - if (!empty($arrayfields['p.volume']['checked'])) - { + if (!empty($arrayfields['p.volume']['checked'])) { print '<td class="center">'; print $obj->volume; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Volume units if (!empty($arrayfields['p.volume_units']['checked'])) { print '<td class="center">'; - if ($product_static->volume != '') print measuringUnitString(0, 'volume', $product_static->volume_units); + if ($product_static->volume != '') { + print measuringUnitString(0, 'volume', $product_static->volume_units); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Unit - if (!empty($arrayfields['cu.label']['checked'])) - { + if (!empty($arrayfields['cu.label']['checked'])) { print '<td align="center">'; if (!empty($obj->cu_label)) { print $langs->trans($obj->cu_label); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Sell price - if (!empty($arrayfields['p.sellprice']['checked'])) - { + if (!empty($arrayfields['p.sellprice']['checked'])) { print '<td class="right nowraponall">'; - if ($obj->tosell) - { - if ($obj->price_base_type == 'TTC') print price($obj->price_ttc).' '.$langs->trans("TTC"); - else print price($obj->price).' '.$langs->trans("HT"); + if ($obj->tosell) { + if ($obj->price_base_type == 'TTC') { + print '<span class="amount">'.price($obj->price_ttc).' '.$langs->trans("TTC").'</span>'; + } else { + print '<span class="amount">'.price($obj->price).' '.$langs->trans("HT").'</span>'; + } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } @@ -1295,25 +1525,21 @@ if ($resql) $productpricescache[$obj->rowid] = array(); } - if ($obj->tosell) - { + if ($obj->tosell) { // Make 1 request for all price levels (without filter on price_level) and saved result into an cache array // then reuse the cache array if we need prices for other price levels $sqlp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price, p.price_base_type"; $sqlp .= " FROM ".MAIN_DB_PREFIX."product_price as p"; - $sqlp .= " WHERE fk_product = ".$obj->rowid; + $sqlp .= " WHERE fk_product = ".((int) $obj->rowid); $sqlp .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC"; $resultp = $db->query($sqlp); - if ($resultp) - { + if ($resultp) { $nump = $db->num_rows($resultp); $j = 0; - while ($j < $nump) - { + while ($j < $nump) { $objp = $db->fetch_object($resultp); - if (empty($productpricescache[$obj->rowid][$objp->price_level])) - { + if (empty($productpricescache[$obj->rowid][$objp->price_level])) { $productpricescache[$obj->rowid][$objp->price_level]['price'] = $objp->price; $productpricescache[$obj->rowid][$objp->price_level]['price_ttc'] = $objp->price_ttc; $productpricescache[$obj->rowid][$objp->price_level]['price_base_type'] = $objp->price_base_type; @@ -1328,56 +1554,51 @@ if ($resql) } } - foreach ($arraypricelevel as $key => $value) - { - if (!empty($arrayfields['p.sellprice'.$key]['checked'])) - { + foreach ($arraypricelevel as $key => $value) { + if (!empty($arrayfields['p.sellprice'.$key]['checked'])) { print '<td class="right nowraponall">'; - if (!empty($productpricescache[$obj->rowid])) - { + if (!empty($productpricescache[$obj->rowid])) { if ($productpricescache[$obj->rowid][$key]['price_base_type'] == 'TTC') { - print price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC"); + print '<span class="amount">'.price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC").'</span>'; } else { - print price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT"); + print '<span class="amount">'.price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT").'</span>'; } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } } } // Better buy price - if (!empty($arrayfields['p.minbuyprice']['checked'])) - { + if (!empty($arrayfields['p.minbuyprice']['checked'])) { print '<td class="right nowraponall">'; - if ($obj->tobuy && $obj->minsellprice != '') - { + if ($obj->tobuy && $obj->minsellprice != '') { //print price($obj->minsellprice).' '.$langs->trans("HT"); - if ($product_fourn->find_min_price_product_fournisseur($obj->rowid) > 0) - { - if ($product_fourn->product_fourn_price_id > 0) - { - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) - { + if ($product_fourn->find_min_price_product_fournisseur($obj->rowid) > 0) { + if ($product_fourn->product_fourn_price_id > 0) { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { $htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1); - print $form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext); - } else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"); + print '<span class="amount">'.$form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext).'</span>'; + } else { + print '<span class="amount">'.price($product_fourn->fourn_unitprice).' '.$langs->trans("HT").'</span>'; + } } } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Number of buy prices - if (!empty($arrayfields['p.numbuyprice']['checked'])) - { + if (!empty($arrayfields['p.numbuyprice']['checked'])) { print '<td class="right">'; - if ($obj->tobuy) - { - if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) - { + if ($obj->tobuy) { + if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) { $htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1, $productFournList); print $form->textwithpicto(count($productFournList), $htmltext); } @@ -1386,129 +1607,143 @@ if ($resql) } // VAT or Sell Tax Rate - if (!empty($arrayfields['p.tva_tx']['checked'])) - { + if (!empty($arrayfields['p.tva_tx']['checked'])) { print '<td class="right">'; print vatrate($obj->tva_tx, true); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // WAP - if (!empty($arrayfields['p.pmp']['checked'])) - { + if (!empty($arrayfields['p.pmp']['checked'])) { print '<td class="nowrap right">'; - print price($product_static->pmp, 1, $langs); + print '<span class="amount">'.price($product_static->pmp, 1, $langs)."</span>"; print '</td>'; } // Cost price - if (!empty($arrayfields['p.cost_price']['checked'])) - { + if (!empty($arrayfields['p.cost_price']['checked'])) { print '<td class="nowrap right">'; //print $obj->cost_price; - print price($obj->cost_price).' '.$langs->trans("HT"); + print '<span class="amount">'.price($obj->cost_price).' '.$langs->trans("HT").'</span>'; print '</td>'; } // Limit alert - if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) - { + if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) { print '<td class="right">'; - if ($obj->fk_product_type != 1) - { + if ($obj->fk_product_type != 1) { print $obj->seuil_stock_alerte; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Desired stock - if (!empty($arrayfields['p.desiredstock']['checked'])) - { + if (!empty($arrayfields['p.desiredstock']['checked'])) { print '<td class="right">'; - if ($obj->fk_product_type != 1) - { + if ($obj->fk_product_type != 1) { print $obj->desiredstock; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Stock real - if (!empty($arrayfields['p.stock']['checked'])) - { + if (!empty($arrayfields['p.stock']['checked'])) { print '<td class="right">'; - if ($obj->fk_product_type != 1) - { - if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; - print price2num($product_static->stock_reel, 'MS'); + if ($obj->fk_product_type != 1) { + if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) { + print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; + } + print price(price2num($product_static->stock_reel, 'MS')); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Stock virtual - if (!empty($arrayfields['stock_virtual']['checked'])) - { + if (!empty($arrayfields['stock_virtual']['checked'])) { print '<td class="right">'; - if ($obj->fk_product_type != 1) - { - if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; - print price2num($product_static->stock_theorique, 'MS'); + if ($obj->fk_product_type != 1) { + if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) { + print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' '; + } + print price(price2num($product_static->stock_theorique, 'MS')); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Lot/Serial - if (!empty($arrayfields['p.tobatch']['checked'])) - { + if (!empty($arrayfields['p.tobatch']['checked'])) { print '<td class="center">'; - print yn($obj->tobatch); + print $product_static->getLibStatut(1, 2); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['p.fk_country']['checked'])) - { + if (!empty($arrayfields['p.fk_country']['checked'])) { print '<td>'.getCountry($obj->fk_country, 0, $db).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['p.fk_state']['checked'])) - { + if (!empty($arrayfields['p.fk_state']['checked'])) { print '<td>'; - if (!empty($obj->fk_state)) print getState($obj->fk_state, 0, $db); + if (!empty($obj->fk_state)) { + print getState($obj->fk_state, 0, $db); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Accountancy code sell - if (!empty($arrayfields['p.accountancy_code_sell']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) { print '<td>'.$obj->accountancy_code_sell.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.accountancy_code_sell_intra']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) { print '<td>'.$obj->accountancy_code_sell_intra.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.accountancy_code_sell_export']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) { print '<td>'.$obj->accountancy_code_sell_export.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Accountancy code buy - if (!empty($arrayfields['p.accountancy_code_buy']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) { print '<td>'.$obj->accountancy_code_buy.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.accountancy_code_buy_intra']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) { print '<td>'.$obj->accountancy_code_buy_intra.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['p.accountancy_code_buy_export']['checked'])) - { + if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) { print '<td>'.$obj->accountancy_code_buy_export.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -1517,57 +1752,64 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { + if (!empty($arrayfields['p.datec']['checked'])) { print '<td class="center nowraponall">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { + if (!empty($arrayfields['p.tms']['checked'])) { print '<td class="center nowraponall">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status (to sell) - if (!empty($arrayfields['p.tosell']['checked'])) - { - print '<td class="right nowrap">'; + if (!empty($arrayfields['p.tosell']['checked'])) { + print '<td class="center nowrap">'; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product_static->LibStatut($obj->tosell, 5, 0); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status (to buy) - if (!empty($arrayfields['p.tobuy']['checked'])) - { - print '<td class="right nowrap">'; + if (!empty($arrayfields['p.tobuy']['checked'])) { + print '<td class="center nowrap">'; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product_static->LibStatut($obj->tobuy, 5, 1); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; $i++; diff --git a/htdocs/product/note.php b/htdocs/product/note.php index f0a6293383d..add915181a2 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -40,14 +40,19 @@ $action = GETPOST('action', 'aZ09'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); +if ($user->socid) { + $socid = $user->socid; +} $object = new Product($db); -if ($id > 0 || !empty($ref)) $object->fetch($id, $ref); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} $permissionnote = $user->rights->produit->creer; // Used by the include of actions_setnotes.inc.php +$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); + /* * Actions @@ -63,30 +68,33 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, $form = new Form($db); $helpurl = ''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { + $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { + $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; +} $title = $langs->trans('ProductServiceCard'); $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Notes'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Notes'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } llxHeader('', $title, $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { /* - * Affichage onglets - */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); + * Affichage onglets + */ + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); @@ -98,7 +106,9 @@ if ($id > 0 || !empty($ref)) $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; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 37019616e96..f23b6eae92d 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -39,23 +39,31 @@ $type = GETPOST("type", "int"); $mode = GETPOST('mode', 'alpha') ? GETPOST('mode', 'alpha') : ''; // Security check -if (!empty($user->socid)) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service'); +if (!empty($user->socid)) { + $socid = $user->socid; +} $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 (!$sortfield) $sortfield = "c"; -if (!$sortorder) $sortorder = "DESC"; +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 +if (!$sortfield) { + $sortfield = "c"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; - $staticproduct = new Product($db); +$result = restrictedArea($user, 'produit|service', 0, 'product&product'); + /* * View @@ -88,8 +96,12 @@ if ((string) $type == '0') { $title = $langs->trans("ListProductByPopularity"); } -if ($type != '') $param .= '&type='.urlencode($type); -if ($mode != '') $param .= '&mode='.urlencode($mode); +if ($type != '') { + $param .= '&type='.urlencode($type); +} +if ($mode != '') { + $param .= '&mode='.urlencode($mode); +} $h = 0; $head = array(); @@ -128,14 +140,13 @@ $sql .= ", ".MAIN_DB_PREFIX."product as p"; $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; $sql .= " AND p.rowid = pd.fk_product"; if ($type !== '') { - $sql .= " AND fk_product_type = ".$type; + $sql .= " AND fk_product_type = ".((int) $type); } $sql .= " GROUP BY p.rowid, p.label, p.ref, p.fk_product_type"; if (!empty($mode) && $mode != '-1') { $result = $db->query($sql); - if ($result) - { + if ($result) { $totalnboflines = $db->num_rows($result); } @@ -143,13 +154,11 @@ if (!empty($mode) && $mode != '-1') { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $infoprod[$objp->rowid] = array('type'=>$objp->type, 'ref'=>$objp->ref, 'label'=>$objp->label); @@ -179,8 +188,12 @@ print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="mode" value="'.$mode.'">'; print '<input type="hidden" name="type" value="'.$type.'">'; print '<input type="hidden" name="action" value="add">'; -if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; -if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; +if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; +} +if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; +} print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $totalnboflines, '', 0, '', '', -1, 0, 0, 1); @@ -195,11 +208,9 @@ print_liste_field_titre($textforqty, $_SERVER["PHP_SELF"], 'c', '', $param, '', print "</tr>\n"; if ($mode && $mode != '-1') { - foreach ($infoprod as $prodid => $vals) - { + foreach ($infoprod as $prodid => $vals) { // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$prodid; @@ -207,22 +218,29 @@ if ($mode && $mode != '-1') { $sql .= " LIMIT 1"; $resultp = $db->query($sql); - if ($resultp) - { + if ($resultp) { $objtp = $db->fetch_object($resultp); - if (!empty($objtp->label)) $vals['label'] = $objtp->label; + if (!empty($objtp->label)) { + $vals['label'] = $objtp->label; + } } } print "<tr>"; print '<td><a href="'.DOL_URL_ROOT.'/product/stats/card.php?id='.$prodid.'">'; - if ($vals['type'] == 1) print img_object($langs->trans("ShowService"), "service"); - else print img_object($langs->trans("ShowProduct"), "product"); + if ($vals['type'] == 1) { + print img_object($langs->trans("ShowService"), "service"); + } else { + print img_object($langs->trans("ShowProduct"), "product"); + } print " "; print $vals['ref'].'</a></td>'; print '<td>'; - if ($vals['type'] == 1) print $langs->trans("Service"); - else print $langs->trans("Product"); + if ($vals['type'] == 1) { + print $langs->trans("Service"); + } else { + print $langs->trans("Product"); + } print '</td>'; print '<td>'.$vals['label'].'</td>'; print '<td class="right">'.$vals['nbline'].'</td>'; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index b783ad5c002..7dfb94be79f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -65,57 +65,60 @@ $search_soc = GETPOST('search_soc'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); +if ($user->socid) { + $socid = $user->socid; +} -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object = new Product($db); $object->fetch($id, $ref); } // Clean param -if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && empty($conf->global->PRODUIT_MULTIPRICES_LIMIT)) $conf->global->PRODUIT_MULTIPRICES_LIMIT = 5; +if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && empty($conf->global->PRODUIT_MULTIPRICES_LIMIT)) { + $conf->global->PRODUIT_MULTIPRICES_LIMIT = 5; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('productpricecard', 'globalcard')); +$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); + /* * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} $parameters = array('id'=>$id, 'ref'=>$ref); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - 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 - { +if (empty($reshook)) { + 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_soc = ''; } - if ($action == 'setlabelsellingprice' && $user->admin) - { + if ($action == 'setlabelsellingprice' && $user->admin) { require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.GETPOST('pricelevel'); dolibarr_set_const($db, $keyforlabel, GETPOST('labelsellingprice', 'alpha'), 'chaine', 0, '', $conf->entity); $action = ''; } - if (($action == 'update_vat') && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) - { + if (($action == 'update_vat') && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) { $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 $tva_tx = $tva_tx_txt; $reg = array(); $vatratecode = ''; - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { $vat_src_code = $reg[1]; $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx_txt); // Remove code into vatrate. } @@ -124,8 +127,7 @@ if (empty($reshook)) $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)) - { + 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 create product. $vatratecode = $reg[1]; // Get record from code @@ -135,8 +137,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -157,21 +158,18 @@ if (empty($reshook)) $db->begin(); $resql = $object->update($object->id, $user); - if ($resql <= 0) - { + if ($resql <= 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } - if ($error) - { + if ($error) { //$localtaxarray=array('0'=>$localtax1_type,'1'=>$localtax1,'2'=>$localtax2_type,'3'=>$localtax2); $localtaxarray = array(); // We do not store localtaxes into product, we will use instead the "vat code" to retrieve them. $object->updatePrice(0, $object->price_base_type, $user, $tva_tx, '', 0, $npr, 0, 0, $localtaxarray, $vatratecode); } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -180,8 +178,7 @@ if (empty($reshook)) $action = ''; } - if (($action == 'update_price') && !$cancel && $object->getRights()->creer) - { + if (($action == 'update_price') && !$cancel && $object->getRights()->creer) { $error = 0; $pricestoupdate = array(); @@ -218,8 +215,7 @@ if (empty($reshook)) //Shall we generate prices using price rules? $object->price_autogen = GETPOST('usePriceRules') == 'on'; - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { if (!isset($newprice[$i])) { continue; } @@ -229,8 +225,7 @@ if (empty($reshook)) $tva_tx = $tva_tx_txt; $vatratecode = ''; $reg = array(); - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { $vat_src_code = $reg[1]; $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx_txt); // Remove code into vatrate. } @@ -241,8 +236,7 @@ if (empty($reshook)) $localtax1_type = $newlocaltax1_type[$i]; $localtax2 = $newlocaltax2_tx[$i]; $localtax2_type = $newlocaltax2_type[$i]; - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { // We look into database using code $vatratecode = $reg[1]; // Get record from code @@ -252,8 +246,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -278,8 +271,7 @@ if (empty($reshook)) break; } } - } elseif (!$error) - { + } elseif (!$error) { $newprice = price2num(GETPOST('price', 'alpha'), '', 2); $newprice_min = price2num(GETPOST('price_min', 'alpha'), '', 2); $newpricebase = GETPOST('price_base_type', 'alpha'); @@ -288,8 +280,7 @@ if (empty($reshook)) $tva_tx = $tva_tx_txt; $vatratecode = ''; $reg = array(); - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { $vat_src_code = $reg[1]; $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx_txt); // Remove code into vatrate. } @@ -298,8 +289,7 @@ if (empty($reshook)) $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)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { // We look into database using code $vatratecode = $reg[1]; // Get record from code @@ -309,8 +299,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".$tva_tx." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -319,10 +308,9 @@ if (empty($reshook)) $localtax2_type = $obj->localtax2_type; // If spain, we don't use the localtax found into tax record in database with same code, but using the get_localtax rule - if (in_array($mysoc->country_code, array('ES'))) - { + if (in_array($mysoc->country_code, array('ES'))) { $localtax1 = get_localtax($tva_tx, 1); - $localtax2 = get_localtax($tva_tx, 2); + $localtax2 = get_localtax($tva_tx, 2); } } } @@ -356,9 +344,11 @@ if (empty($reshook)) break; } - if ($object->multiprices[$key] != $newprice || $object->multiprices_min[$key] != $newprice_min || $object->multiprices_base_type[$key] != $val['price_base_type']) - $res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq, 0, $val['localtaxes_array'], $val['default_vat_code']); - else $res = 0; + if ($object->multiprices[$key] != $newprice || $object->multiprices_min[$key] != $newprice_min || $object->multiprices_base_type[$key] != $val['price_base_type']) { + $res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq, 0, $val['localtaxes_array'], $val['default_vat_code']); + } else { + $res = 0; + } if ($res < 0) { @@ -385,8 +375,7 @@ if (empty($reshook)) } - if ($action == 'delete' && $user->rights->produit->supprimer) - { + if ($action == 'delete' && $user->rights->produit->supprimer) { $result = $object->log_price_delete($user, GETPOST('lineid', 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -394,35 +383,31 @@ if (empty($reshook)) } // Set Price by quantity - if ($action == 'activate_price_by_qty') - { + if ($action == 'activate_price_by_qty') { // Activating product price by quantity add a new price line with price_by_qty set to 1 $level = GETPOST('level', 'int'); $object->updatePrice(0, $object->price_base_type, $user, $object->tva_tx, 0, $level, $object->tva_npr, 1); } // Unset Price by quantity - if ($action == 'disable_price_by_qty') - { + if ($action == 'disable_price_by_qty') { // Disabling product price by quantity add a new price line with price_by_qty set to 0 $level = GETPOST('level', 'int'); $object->updatePrice(0, $object->price_base_type, $user, $object->tva_tx, 0, $level, $object->tva_npr, 0); } - if ($action == 'edit_price_by_qty') - { // Edition d'un prix par quantité + if ($action == 'edit_price_by_qty') { // Edition d'un prix par quantité $rowid = GETPOST('rowid', 'int'); } // Add or update price by quantity - if ($action == 'update_price_by_qty') - { + if ($action == 'update_price_by_qty') { // Récupération des variables $rowid = GETPOST('rowid', 'int'); $priceid = GETPOST('priceid', 'int'); - $newprice = price2num(GETPOST("price", 'alpha'), 'MU'); + $newprice = price2num(GETPOST("price"), 'MU'); // $newminprice=price2num(GETPOST("price_min"),'MU'); // TODO : Add min price management - $quantity = GETPOST('quantity', 'int'); - $remise_percent = price2num(GETPOST('remise_percent', 'alpha')); + $quantity = price2num(GETPOST('quantity'), 'MS'); + $remise_percent = price2num(GETPOST('remise_percent'), 2); $remise = 0; // TODO : allow discount by amount when available on documents if (empty($quantity)) { @@ -445,18 +430,20 @@ if (empty($reshook)) // Ajout / mise à jour if ($rowid > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."product_price_by_qty SET"; - $sql .= " price='".$db->escape($price)."',"; - $sql .= " unitprice=".$unitPrice.","; - $sql .= " quantity=".$quantity.","; - $sql .= " remise_percent=".$remise_percent.","; - $sql .= " remise=".$remise; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " price=".((float) $price)."',"; + $sql .= " unitprice=".((float) $unitPrice).","; + $sql .= " quantity=".((float) $quantity).","; + $sql .= " remise_percent=".((float) $remise_percent).","; + $sql .= " remise=".((float) $remise); + $sql .= " WHERE rowid = ".((int) $rowid); $result = $db->query($sql); - if (!$result) dol_print_error($db); + if (!$result) { + dol_print_error($db); + } } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_price_by_qty (fk_product_price,price,unitprice,quantity,remise_percent,remise) values ("; - $sql .= $priceid.','.$price.','.$unitPrice.','.$quantity.','.$remise_percent.','.$remise.')'; + $sql .= ((int) $priceid).','.((float) $price).','.((float) $unitPrice).','.((float) $quantity).','.((float) $remise_percent).','.((float) $remise).')'; $result = $db->query($sql); if (!$result) { @@ -470,12 +457,11 @@ if (empty($reshook)) } } - if ($action == 'delete_price_by_qty') - { + if ($action == 'delete_price_by_qty') { $rowid = GETPOST('rowid', 'int'); if (!empty($rowid)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty"; - $sql .= " WHERE rowid = ".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); $result = $db->query($sql); } else { @@ -487,7 +473,7 @@ if (empty($reshook)) $priceid = GETPOST('priceid', 'int'); if (!empty($rowid)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty"; - $sql .= " WHERE fk_product_price = ".$priceid; + $sql .= " WHERE fk_product_price = ".((int) $priceid); $result = $db->query($sql); } else { @@ -507,6 +493,7 @@ if (empty($reshook)) // add price by customer $prodcustprice->fk_soc = GETPOST('socid', 'int'); + $prodcustprice->ref_customer = GETPOST('ref_customer', 'alpha'); $prodcustprice->fk_product = $object->id; $prodcustprice->price = price2num(GETPOST("price"), 'MU'); $prodcustprice->price_min = price2num(GETPOST("price_min"), 'MU'); @@ -516,8 +503,7 @@ if (empty($reshook)) $tva_tx = $tva_tx_txt; $vatratecode = ''; - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { $vat_src_code = $reg[1]; $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx_txt); // Remove code into vatrate. } @@ -526,8 +512,7 @@ if (empty($reshook)) $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)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { // We look into database using code $vatratecode = $reg[1]; // Get record from code @@ -537,8 +522,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".$tva_tx." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -556,23 +540,20 @@ if (empty($reshook)) $prodcustprice->localtax1_type = $localtax1_type; $prodcustprice->localtax2_type = $localtax2_type; - if (!($prodcustprice->fk_soc > 0)) - { + if (!($prodcustprice->fk_soc > 0)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")), null, 'errors'); $error++; $action = 'add_customer_price'; } - if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $prodcustprice->price_min < $maxpricesupplier) - { + if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $prodcustprice->price_min < $maxpricesupplier) { $langs->load("errors"); setEventMessages($langs->trans("MinimumPriceLimit", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')), null, 'errors'); $error++; $action = 'add_customer_price'; } - if (!$error) - { + if (!$error) { $result = $prodcustprice->create($user, 0, $update_child_soc); if ($result < 0) { @@ -585,10 +566,9 @@ if (empty($reshook)) } } - if ($action == 'delete_customer_price' && ($user->rights->produit->supprimer || $user->rights->service->supprimer)) - { + if ($action == 'delete_customer_price' && ($user->rights->produit->supprimer || $user->rights->service->supprimer)) { // Delete price by customer - $prodcustprice->id = GETPOST('lineid'); + $prodcustprice->id = GETPOST('lineid', 'int'); $result = $prodcustprice->delete($user); if ($result < 0) { @@ -599,8 +579,7 @@ if (empty($reshook)) $action = ''; } - if ($action == 'update_customer_price_confirm' && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) - { + if ($action == 'update_customer_price_confirm' && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) { $maxpricesupplier = $object->min_recommended_price(); $update_child_soc = GETPOST('updatechildprice', 'int'); @@ -608,6 +587,7 @@ if (empty($reshook)) $prodcustprice->fetch(GETPOST('lineid', 'int')); // update price by customer + $prodcustprice->ref_customer = GETPOST('ref_customer', 'alpha'); $prodcustprice->price = price2num(GETPOST("price"), 'MU'); $prodcustprice->price_min = price2num(GETPOST("price_min"), 'MU'); $prodcustprice->price_base_type = GETPOST("price_base_type", 'alpha'); @@ -616,8 +596,7 @@ if (empty($reshook)) $tva_tx = $tva_tx_txt; $vatratecode = ''; - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { $vat_src_code = $reg[1]; $tva_tx = preg_replace('/\s*\(.*\)/', '', $tva_tx_txt); // Remove code into vatrate. } @@ -626,8 +605,7 @@ if (empty($reshook)) $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)) - { + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) { // We look into database using code $vatratecode = $reg[1]; // Get record from code @@ -637,8 +615,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".$tva_tx." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -656,15 +633,13 @@ if (empty($reshook)) $prodcustprice->localtax1_type = $localtax1_type; $prodcustprice->localtax2_type = $localtax2_type; - if ($prodcustprice->price_min < $maxpricesupplier && !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) - { + if ($prodcustprice->price_min < $maxpricesupplier && !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { setEventMessages($langs->trans("MinimumPriceLimit", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')), null, 'errors'); $error++; $action = 'update_customer_price'; } - if (!$error) - { + if (!$error) { $result = $prodcustprice->update($user, 0, $update_child_soc); if ($result < 0) { @@ -685,8 +660,7 @@ if (empty($reshook)) $form = new Form($db); -if (!empty($id) || !empty($ref)) -{ +if (!empty($id) || !empty($ref)) { // fetch updated prices $object->fetch($id, $ref); } @@ -694,13 +668,11 @@ if (!empty($id) || !empty($ref)) $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('SellingPrices'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('SellingPrices'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } @@ -717,7 +689,9 @@ $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_value $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; +if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; +} dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -728,11 +702,9 @@ print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; // Price per customer segment/level -if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) -{ +if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { // Price and min price are variable (depends on level of company). - if (!empty($socid)) - { + if (!empty($socid)) { $soc = new Societe($db); $soc->id = $socid; $soc->fetch($socid); @@ -756,24 +728,30 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ // Price min print '<tr><td>'.$langs->trans("MinPrice").'</td><td colspan="2">'; - if ($object->multiprices_base_type[$soc->price_level] == 'TTC') - { + if ($object->multiprices_base_type[$soc->price_level] == 'TTC') { print price($object->multiprices_min_ttc[$soc->price_level]).' '.$langs->trans($object->multiprices_base_type[$soc->price_level]); } else { print price($object->multiprices_min[$soc->price_level]).' '.$langs->trans(empty($object->multiprices_base_type[$soc->price_level]) ? 'HT' : $object->multiprices_base_type[$soc->price_level]); } print '</td></tr>'; - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility - { + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility // TVA print '<tr><td>'.$langs->trans("DefaultTaxRate").'</td><td colspan="2">'; $positiverates = ''; - if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_tva_tx[$soc->price_level]); - if (price2num($object->multiprices_localtax1_type[$soc->price_level])) $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_localtax1_tx[$soc->price_level]); - if (price2num($object->multiprices_localtax2_type[$soc->price_level])) $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_localtax2_tx[$soc->price_level]); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->multiprices_tva_tx[$soc->price_level])) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_tva_tx[$soc->price_level]); + } + if (price2num($object->multiprices_localtax1_type[$soc->price_level])) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_localtax1_tx[$soc->price_level]); + } + if (price2num($object->multiprices_localtax2_type[$soc->price_level])) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->multiprices_localtax2_tx[$soc->price_level]); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); //print vatrate($object->multiprices_tva_tx[$soc->price_level], true); print '</td></tr>'; @@ -782,22 +760,29 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<tr><td>'.$langs->trans("DefaultTaxRate").'</td><td>'; $positiverates = ''; - if (price2num($object->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); - if (price2num($object->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); - if (price2num($object->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); + } + if (price2num($object->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); + } + if (price2num($object->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); /* if ($object->default_vat_code) - { - print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; - } - else print vatrate($object->tva_tx . ($object->tva_npr ? '*' : ''), true);*/ + { + print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; + } + else print vatrate($object->tva_tx . ($object->tva_npr ? '*' : ''), true);*/ print '</td></tr>'; } } else { - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility - { + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { // using this option is a bug. kept for backward compatibility // We show only vat for level 1 print '<tr><td class="titlefield">'.$langs->trans("DefaultTaxRate").'</td>'; print '<td colspan="2">'.vatrate($object->multiprices_tva_tx[1], true).'</td>'; @@ -807,17 +792,25 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<tr><td class="titlefield">'.$langs->trans("DefaultTaxRate").'</td><td>'; $positiverates = ''; - if (price2num($object->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); - if (price2num($object->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); - if (price2num($object->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); + } + if (price2num($object->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); + } + if (price2num($object->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); /* - if ($object->default_vat_code) - { - print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; - } - else print vatrate($object->tva_tx . ($object->tva_npr ? '*' : ''), true);*/ + if ($object->default_vat_code) + { + print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; + } + else print vatrate($object->tva_tx . ($object->tva_npr ? '*' : ''), true);*/ print '</td></tr>'; } print '</table>'; @@ -827,21 +820,21 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<table class="noborder tableforfield" width="100%">'; print '<tr class="liste_titre"><td>'; print $langs->trans("PriceLevel"); - if ($user->admin) print ' <a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlabelsellingprice&amp;pricelevel='.$i.'&amp;id='.$object->id.'">'.img_edit($langs->trans('EditSellingPriceLabel'), 0).'</a>'; + if ($user->admin) { + print ' <a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editlabelsellingprice&amp;pricelevel='.$i.'&amp;id='.$object->id.'">'.img_edit($langs->trans('EditSellingPriceLabel'), 0).'</a>'; + } print '</td>'; print '<td style="text-align: right">'.$langs->trans("SellingPrice").'</td>'; print '<td style="text-align: right">'.$langs->trans("MinPrice").'</td>'; print '</tr>'; - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { print '<tr class="oddeven">'; // Label of price print '<td>'; $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; - if (preg_match('/editlabelsellingprice/', $action)) - { + if (preg_match('/editlabelsellingprice/', $action)) { print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="setlabelsellingprice">'; @@ -852,7 +845,9 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '</form>'; } else { print $langs->trans("SellingPrice").' '.$i; - if (!empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel); + if (!empty($conf->global->$keyforlabel)) { + print ' - '.$langs->trans($conf->global->$keyforlabel); + } } print '</td>'; @@ -870,9 +865,10 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ // Prix min print '<td style="text-align: right">'; - if (empty($object->multiprices_base_type[$i])) $object->multiprices_base_type[$i] = "HT"; - if ($object->multiprices_base_type[$i] == 'TTC') - { + if (empty($object->multiprices_base_type[$i])) { + $object->multiprices_base_type[$i] = "HT"; + } + if ($object->multiprices_base_type[$i] == 'TTC') { print price($object->multiprices_min_ttc[$i]).' '.$langs->trans($object->multiprices_base_type[$i]); } else { print price($object->multiprices_min[$i]).' '.$langs->trans($object->multiprices_base_type[$i]); @@ -880,10 +876,11 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '</td></tr>'; // Price by quantity - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // TODO Fix the form included into a tr instead of a td - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { // TODO Fix the form included into a tr instead of a td print '<tr><td>'.$langs->trans("PriceByQuantity").' '.$i; - if (!empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel); + if (!empty($conf->global->$keyforlabel)) { + print ' - '.$langs->trans($conf->global->$keyforlabel); + } print '</td><td colspan="2">'; if ($object->prices_by_qty[$i] == 1) { @@ -896,8 +893,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<td class="right">'.$langs->trans("Discount").'</td>'; print '<td>&nbsp;</td>'; print '</tr>'; - foreach ($object->prices_by_qty_list[$i] as $ii => $prices) - { + foreach ($object->prices_by_qty_list[$i] as $ii => $prices) { if ($action == 'edit_price_by_qty' && $rowid == $prices['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) { print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -947,10 +943,10 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ } print '</table>'; - print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable_price_by_qty&level='.$i.'">('.$langs->trans("DisablePriceByQty").')</a>'; + print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable_price_by_qty&level='.$i.'&token='.newToken().'">('.$langs->trans("DisablePriceByQty").')</a>'; } else { print $langs->trans("No"); - print '&nbsp; <a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=activate_price_by_qty&level='.$i.'">('.$langs->trans("Activate").')</a>'; + print '&nbsp; <a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=activate_price_by_qty&level='.$i.'&token='.newToken().'">('.$langs->trans("Activate").')</a>'; } print '</td></tr>'; } @@ -961,15 +957,23 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<tr><td class="titlefield">'.$langs->trans("DefaultTaxRate").'</td><td>'; $positiverates = ''; - if (price2num($object->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); - if (price2num($object->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); - if (price2num($object->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); + } + if (price2num($object->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); + } + if (price2num($object->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); /* if ($object->default_vat_code) { - print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; + print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; } else print vatrate($object->tva_tx, true, $object->tva_npr, true);*/ print '</td></tr>'; @@ -993,8 +997,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '</td></tr>'; // Price by quantity - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // TODO Fix the form inside tr instead of td - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { // TODO Fix the form inside tr instead of td print '<tr><td>'.$langs->trans("PriceByQuantity"); if ($object->prices_by_qty[0] == 0) { print '&nbsp; <a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=activate_price_by_qty&level=1">('.$langs->trans("Activate").')'; @@ -1003,8 +1006,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ } print '</td><td>'; - if ($object->prices_by_qty[0] == 1) - { + if ($object->prices_by_qty[0] == 1) { print '<table width="50%" class="border" summary="List of quantities">'; print '<tr class="liste_titre">'; //print '<td>' . $langs->trans("PriceByQuantityRange") . '</td>'; @@ -1015,8 +1017,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<td class="right">'.$langs->trans("Discount").'</td>'; print '<td>&nbsp;</td>'; print '</tr>'; - if ($action != 'edit_price_by_qty') - { + if ($action != 'edit_price_by_qty') { print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; // FIXME a form into a table is not allowed print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update_price_by_qty">'; @@ -1036,10 +1037,8 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '</form>'; } - foreach ($object->prices_by_qty_list[0] as $ii => $prices) - { - if ($action == 'edit_price_by_qty' && $rowid == $prices['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) - { + foreach ($object->prices_by_qty_list[0] as $ii => $prices) { + if ($action == 'edit_price_by_qty' && $rowid == $prices['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) { print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update_price_by_qty">'; @@ -1068,8 +1067,7 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print '<td class="right">'.price($prices['unitprice']).'</td>'; print '<td class="right">'.price($prices['remise_percent']).' %</td>'; print '<td class="center">'; - if (($user->rights->produit->creer || $user->rights->service->creer)) - { + if (($user->rights->produit->creer || $user->rights->service->creer)) { print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit_price_by_qty&amp;rowid='.$prices["rowid"].'">'; print img_edit().'</a>'; print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete_price_by_qty&amp;token='.newToken().'&amp;rowid='.$prices["rowid"].'">'; @@ -1099,15 +1097,11 @@ print dol_get_fiche_end(); -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - +/* + * Action bar + */ if (!$action || $action == 'delete' || $action == 'showlog_customer_price' || $action == 'showlog_default_price' || $action == 'add_customer_price' - || $action == 'activate_price_by_qty' || $action == 'disable_price_by_qty') -{ + || $action == 'activate_price_by_qty' || $action == 'disable_price_by_qty') { print "\n".'<div class="tabsAction">'."\n"; if ($object->isVariant()) { @@ -1147,8 +1141,7 @@ if (!$action || $action == 'delete' || $action == 'showlog_customer_price' || $a * Edit price area */ -if ($action == 'edit_vat' && ($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'edit_vat' && ($user->rights->produit->creer || $user->rights->service->creer)) { print load_fiche_titre($langs->trans("UpdateVAT"), ''); print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; @@ -1178,12 +1171,10 @@ if ($action == 'edit_vat' && ($user->rights->produit->creer || $user->rights->se print '<br></form><br>'; } -if ($action == 'edit_price' && $object->getRights()->creer) -{ +if ($action == 'edit_price' && $object->getRights()->creer) { print load_fiche_titre($langs->trans("NewPrice"), ''); - if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { print '<!-- Edit price -->'."\n"; print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -1209,7 +1200,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print '</td>'; print '</tr>'; - // Only show price mode and expression selector if module is enabled + // Only show price mode and expression selector if module is enabled if (!empty($conf->dynamicprices->enabled)) { // Price mode selector print '<tr><td>'.$langs->trans("PriceMode").'</td><td>'; @@ -1269,8 +1260,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) } else { print '<input name="price_min" size="10" value="'.price($object->price_min).'">'; } - if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) - { + if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { print ' &nbsp; '.$langs->trans("MinimumRecommendedPrice", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')).' '.img_warning().'</td>'; } print '</td>'; @@ -1334,8 +1324,11 @@ if ($action == 'edit_price' && $object->getRights()->creer) print '<td>'.$langs->trans("PriceLevel").'</td>'; - if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) print '<td style="text-align: center">'.$langs->trans("DefaultTaxRate").'</td>'; - else print '<td></td>'; + if (!empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) { + print '<td style="text-align: center">'.$langs->trans("DefaultTaxRate").'</td>'; + } else { + print '<td></td>'; + } print '<td class="center">'.$langs->trans("SellingPrice").'</td>'; @@ -1348,8 +1341,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print '<tbody>'; - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { print '<tr class="oddeven">'; print '<td>'; $text = $langs->trans('SellingPrice').' '.$i; @@ -1390,8 +1382,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) } else { print '<input name="price_min['.$i.']" size="10" value="'.price($object->multiprices_min [$i]).'">'; } - if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) - { + if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { print '<td class="left">'.$langs->trans("MinimumRecommendedPrice", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')).' '.img_warning().'</td>'; } print '</td>'; @@ -1417,39 +1408,38 @@ if ($action == 'edit_price' && $object->getRights()->creer) // List of price changes - log historic (ordered by descending date) -if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_default_price') && !in_array($action, array('edit_price', 'edit_vat'))) -{ +if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_default_price') && !in_array($action, array('edit_price', 'edit_vat'))) { $sql = "SELECT p.rowid, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.default_vat_code, p.recuperableonly, p.localtax1_tx, p.localtax1_type, p.localtax2_tx, p.localtax2_type,"; $sql .= " p.price_level, p.price_min, p.price_min_ttc,p.price_by_qty,"; $sql .= " p.date_price as dp, p.fk_price_expression, u.rowid as user_id, u.login"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price as p,"; $sql .= " ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE fk_product = ".$object->id; + $sql .= " WHERE fk_product = ".((int) $object->id); $sql .= " AND p.entity IN (".getEntity('productprice').")"; $sql .= " AND p.fk_user_author = u.rowid"; - if (!empty($socid) && !empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " AND p.price_level = ".$soc->price_level; + if (!empty($socid) && !empty($conf->global->PRODUIT_MULTIPRICES)) { + $sql .= " AND p.price_level = ".((int) $soc->price_level); + } $sql .= " ORDER BY p.date_price DESC, p.rowid DESC, p.price_level ASC"; // $sql .= $db->plimit(); $result = $db->query($sql); - if ($result) - { + if ($result) { print '<div class="divlogofpreviouscustomerprice">'; $num = $db->num_rows($result); - if (!$num) - { + if (!$num) { $db->free($result); - // Il doit au moins y avoir la ligne de prix initial. - // On l'ajoute donc pour remettre a niveau (pb vieilles versions) - // We emulate the change of the price from interface with the same value than the one into table llx_product - if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - $object->updatePrice(($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_ttc[1] : $object->multiprices[1]), $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1]) ? 0 : $object->multiprices_tva_tx[1]), ($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_min_ttc[1] : $object->multiprices_min[1]), 1); - } else { - $object->updatePrice(($object->price_base_type == 'TTC' ? $object->price_ttc : $object->price), $object->price_base_type, $user, $object->tva_tx, ($object->price_base_type == 'TTC' ? $object->price_min_ttc : $object->price_min)); - } + // Il doit au moins y avoir la ligne de prix initial. + // On l'ajoute donc pour remettre a niveau (pb vieilles versions) + // We emulate the change of the price from interface with the same value than the one into table llx_product + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + $object->updatePrice(($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_ttc[1] : $object->multiprices[1]), $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1]) ? 0 : $object->multiprices_tva_tx[1]), ($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_min_ttc[1] : $object->multiprices_min[1]), 1); + } else { + $object->updatePrice(($object->price_base_type == 'TTC' ? $object->price_ttc : $object->price), $object->price_base_type, $user, $object->tva_tx, ($object->price_base_type == 'TTC' ? $object->price_min_ttc : $object->price_min)); + } $result = $db->query($sql); $num = $db->num_rows($result); @@ -1460,8 +1450,11 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul // Log of previous customer prices $backbutton = '<a class="justalink" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'.$langs->trans("Back").'</a>'; - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPriceLog"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png'); - else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png'); + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + print_barre_liste($langs->trans("DefaultPriceLog"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png'); + } else { + print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png'); + } print '<div class="div-table-responsive">'; print '<table class="liste centpercent">'; @@ -1478,7 +1471,9 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul print '<td class="center">'.$langs->trans("PriceBase").'</td>'; print $conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL; - if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) print '<td class="right">'.$langs->trans("DefaultTaxRate").'</td>'; + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + print '<td class="right">'.$langs->trans("DefaultTaxRate").'</td>'; + } print '<td class="right">'.$langs->trans("HT").'</td>'; print '<td class="right">'.$langs->trans("TTC").'</td>'; if (!empty($conf->dynamicprices->enabled)) { @@ -1487,15 +1482,15 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("HT").'</td>'; print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("TTC").'</td>'; print '<td class="right">'.$langs->trans("ChangedBy").'</td>'; - if ($user->rights->produit->supprimer) + if ($user->rights->produit->supprimer) { print '<td class="right">&nbsp;</td>'; + } print '</tr>'; $notfirstlineforlevel = array(); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); print '<tr class="oddeven">'; @@ -1507,8 +1502,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul print '<td class="center">'.$objp->price_level."</td>"; } // Price by quantity - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { $type = ($objp->price_by_qty == 1) ? 'PriceByQuantity' : 'Standard'; print '<td class="center">'.$langs->trans($type)."</td>"; } @@ -1519,31 +1513,37 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul } print "</td>"; - if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { print '<td class="right">'; if (empty($objp->price_by_qty)) { $positiverates = ''; - if (price2num($objp->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($objp->tva_tx); - if (price2num($objp->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($objp->localtax1_tx); - if (price2num($objp->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($objp->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($objp->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($objp->tva_tx); + } + if (price2num($objp->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($objp->localtax1_tx); + } + if (price2num($objp->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($objp->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($objp->default_vat_code ? ' ('.$objp->default_vat_code.')' : ''), '%', $objp->tva_npr); /* - if ($objp->default_vat_code) - { - print vatrate($objp->tva_tx, true) . ' ('.$objp->default_vat_code.')'; - } - else print vatrate($objp->tva_tx, true, $objp->recuperableonly);*/ + if ($objp->default_vat_code) + { + print vatrate($objp->tva_tx, true) . ' ('.$objp->default_vat_code.')'; + } + else print vatrate($objp->tva_tx, true, $objp->recuperableonly);*/ } print "</td>"; } // Price - if (!empty($objp->fk_price_expression) && !empty($conf->dynamicprices->enabled)) - { + if (!empty($objp->fk_price_expression) && !empty($conf->dynamicprices->enabled)) { $price_expression = new PriceExpression($db); $res = $price_expression->fetch($objp->fk_price_expression); $title = $price_expression->title; @@ -1588,22 +1588,26 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul print '</td>'; // Action - if ($user->rights->produit->supprimer) - { + if ($user->rights->produit->supprimer) { $candelete = 0; - if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) - { - if (empty($notfirstlineforlevel[$objp->price_level])) $notfirstlineforlevel[$objp->price_level] = 1; - else $candelete = 1; - } elseif ($i > 0) $candelete = 1; + if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + if (empty($notfirstlineforlevel[$objp->price_level])) { + $notfirstlineforlevel[$objp->price_level] = 1; + } else { + $candelete = 1; + } + } elseif ($i > 0) { + $candelete = 1; + } print '<td class="right">'; - if ($candelete) - { + if ($candelete) { print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&amp;token='.newToken().'&amp;id='.$object->id.'&amp;lineid='.$objp->rowid.'">'; print img_delete(); print '</a>'; - } else print '&nbsp;'; // Can not delete last price (it's current price) + } else { + print '&nbsp;'; // Can not delete last price (it's current price) + } print '</td>'; } @@ -1625,22 +1629,25 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul // Add area to show/add/edit a price for a dedicated customer -if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) -{ +if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $prodcustprice = new Productcustomerprice($db); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = (GETPOST("page", 'int') ?GETPOST("page", 'int') : 0); - 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) + if (!$sortorder) { $sortorder = "ASC"; - if (!$sortfield) + } + if (!$sortfield) { $sortfield = "soc.nom"; + } // Build filter to diplay only concerned lines $filter = array('t.fk_product' => $object->id); @@ -1668,6 +1675,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</td>'; print '</tr>'; + // Ref. Customer + print '<tr><td>' . $langs->trans('RefCustomer') . '</td>'; + print '<td><input name="ref_customer" size="12"></td></tr>'; + // VAT print '<tr><td class="fieldrequired">'.$langs->trans("DefaultTaxRate").'</td><td>'; print $form->load_tva("tva_tx", $object->default_vat_code ? $object->tva_tx.' ('.$object->default_vat_code.')' : $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr, $object->type, false, 1); @@ -1703,8 +1714,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) } else { print '<td><input name="price_min" size="10" value="'.price($object->price_min).'">'; } - if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) - { + if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { print '<td class="left">'.$langs->trans("MinimumRecommendedPrice", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')).' '.img_warning().'</td>'; } print '</td></tr>'; @@ -1726,8 +1736,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</div>'; print '</form>'; - } elseif ($action == 'edit_customer_price') - { + } elseif ($action == 'edit_customer_price') { // Edit mode $maxpricesupplier = $object->min_recommended_price(); @@ -1751,6 +1760,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print "<td>".$staticsoc->getNomUrl(1)."</td>"; print '</tr>'; + // Ref. Customer + print '<tr><td>' . $langs->trans('RefCustomer') . '</td>'; + print '<td><input name="ref_customer" size="12" value="' . dol_escape_htmltag($prodcustprice->ref_customer) . '"></td></tr>'; + // VAT print '<tr><td class="fieldrequired">'.$langs->trans("DefaultTaxRate").'</td><td>'; print $form->load_tva("tva_tx", $prodcustprice->default_vat_code ? $prodcustprice->tva_tx.' ('.$prodcustprice->default_vat_code.')' : $prodcustprice->tva_tx, $mysoc, '', $object->id, $prodcustprice->recuperableonly, $object->type, false, 1); @@ -1788,8 +1801,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min).'">'; } print '</td>'; - if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) - { + if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE)) { print '<td class="left">'.$langs->trans("MinimumRecommendedPrice", price($maxpricesupplier, 0, '', 1, -1, -1, 'auto')).' '.img_warning().'</td>'; } print '</tr>'; @@ -1809,8 +1821,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</div>'; print '<br></form>'; - } elseif ($action == 'showlog_customer_price') - { + } elseif ($action == 'showlog_customer_price') { // List of all log of prices by customers print '<!-- list of all log of prices per customer -->'."\n"; @@ -1839,8 +1850,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, $backbutton, count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png'); - if (count($prodcustprice->lines) > 0) - { + if (count($prodcustprice->lines) > 0) { print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; @@ -1850,12 +1860,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="liste_titre">'; print '<td>'.$langs->trans("ThirdParty").'</td>'; + print '<td>'.$langs->trans('RefCustomer').'</td>'; print '<td>'.$langs->trans("AppliedPricesFrom").'</td>'; print '<td class="center">'.$langs->trans("PriceBase").'</td>'; print '<td class="right">'.$langs->trans("DefaultTaxRate").'</td>'; print '<td class="right">'.$langs->trans("HT").'</td>'; - if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") { //print '<td class="right">' . $langs->trans("INCVATONLY") . '</td>'; print '<td class="right">'.$langs->trans("INCT").'</td>'; } else { @@ -1867,8 +1877,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<td>&nbsp;</td>'; print '</tr>'; - foreach ($prodcustprice->lines as $line) - { + foreach ($prodcustprice->lines as $line) { // Date $staticsoc = new Societe($db); $staticsoc->fetch($line->fk_soc); @@ -1876,8 +1885,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $tva_tx = $line->default_vat_code ? $line->tva_tx.' ('.$line->default_vat_code.')' : $line->tva_tx; // Line for default price - if ($line->price_base_type == 'HT') - { + if ($line->price_base_type == 'HT') { $pu = $line->price; } else { $pu = $line->price_ttc; @@ -1897,15 +1905,24 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="oddeven">'; print "<td>".$staticsoc->getNomUrl(1)."</td>"; + print '<td>'.$line->ref_customer.'</td>'; print "<td>".dol_print_date($line->datec, "dayhour", 'tzuserrel')."</td>"; print '<td class="center">'.$langs->trans($line->price_base_type)."</td>"; print '<td class="right">'; $positiverates = ''; - if (price2num($line->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); - if (price2num($line->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); - if (price2num($line->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($line->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); + } + if (price2num($line->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); + } + if (price2num($line->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', ($line->tva_npr ? $line->tva_npr : $line->recuperableonly)); @@ -1913,8 +1930,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print "</td>"; print '<td class="right">'.price($line->price)."</td>"; - if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") { //print '<td class="right">' . price($line->price_ttc) . "</td>"; print '<td class="right">'.price($resultarray[2]).'</td>'; } else { @@ -1938,8 +1954,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) } else { print $langs->trans('None'); } - } elseif ($action != 'showlog_default_price' && $action != 'edit_price') - { + } elseif ($action != 'showlog_default_price' && $action != 'edit_price') { // List of all prices by customers print '<!-- list of all prices per customer -->'."\n"; @@ -1965,9 +1980,8 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<div class="div-table-responsive-no-min">'; print '<table class="liste centpercent">'; - if (count($prodcustprice->lines) > 0 || $search_soc) - { - $colspan = 8; + if (count($prodcustprice->lines) > 0 || $search_soc) { + $colspan = 9; //if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") $colspan++; print '<tr class="liste_titre">'; @@ -1983,12 +1997,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="liste_titre">'; print '<td>'.$langs->trans("ThirdParty").'</td>'; + print '<td>' . $langs->trans('RefCustomer') . '</td>'; print '<td>'.$langs->trans("AppliedPricesFrom").'</td>'; print '<td class="center">'.$langs->trans("PriceBase").'</td>'; print '<td class="right">'.$langs->trans("DefaultTaxRate").'</td>'; print '<td class="right">'.$langs->trans("HT").'</td>'; - if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") { //print '<td class="right">' . $langs->trans("INCVATONLY") . '</td>'; print '<td class="right">'.$langs->trans("INCT").'</td>'; } else { @@ -2002,8 +2016,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</tr>'; // Line for default price - if ($object->price_base_type == 'HT') - { + if ($object->price_base_type == 'HT') { $pu = $object->price; } else { $pu = $object->price_ttc; @@ -2021,17 +2034,24 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $total_ttc = $resultarray[2]; print '<tr class="oddeven">'; - print "<td>".$langs->trans("Default")."</td>"; - print "<td></td>"; + print '<td colspan="3">' . $langs->trans('Default') . '</td>'; print '<td class="center">'.$langs->trans($object->price_base_type)."</td>"; print '<td class="right">'; $positiverates = ''; - if (price2num($object->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); - if (price2num($object->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); - if (price2num($object->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); + } + if (price2num($object->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); + } + if (price2num($object->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); //print vatrate($object->tva_tx, true, $object->tva_npr); @@ -2040,8 +2060,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<td class="right">'.price($object->price)."</td>"; - if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") { //print '<td class="right">' . price($object->price_ttc) . "</td>"; print '<td class="right">'.price($resultarray[2]).'</td>'; } else { @@ -2053,8 +2072,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<td class="right">'.price($object->price_min_ttc).'</td>'; print '<td class="right">'; print '</td>'; - if ($user->rights->produit->supprimer || $user->rights->service->supprimer) - { + if ($user->rights->produit->supprimer || $user->rights->service->supprimer) { print '<td class="nowraponall">'; print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?action=showlog_default_price&amp;id='.$object->id.'">'; print img_info($langs->trans('PriceByCustomerLog')); @@ -2067,10 +2085,8 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) } print "</tr>\n"; - if (count($prodcustprice->lines) > 0) - { - foreach ($prodcustprice->lines as $line) - { + if (count($prodcustprice->lines) > 0) { + foreach ($prodcustprice->lines as $line) { // Date $staticsoc = new Societe($db); $staticsoc->fetch($line->fk_soc); @@ -2078,8 +2094,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $tva_tx = $line->default_vat_code ? $line->tva_tx.' ('.$line->default_vat_code.')' : $line->tva_tx; // Line for default price - if ($line->price_base_type == 'HT') - { + if ($line->price_base_type == 'HT') { $pu = $line->price; } else { $pu = $line->price_ttc; @@ -2099,15 +2114,24 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="oddeven">'; print "<td>".$staticsoc->getNomUrl(1)."</td>"; + print '<td>' . $line->ref_customer . '</td>'; print "<td>".dol_print_date($line->datec, "dayhour", 'tzuserrel')."</td>"; print '<td class="center">'.$langs->trans($line->price_base_type)."</td>"; print '<td class="right">'; $positiverates = ''; - if (price2num($line->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); - if (price2num($line->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); - if (price2num($line->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($line->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->tva_tx); + } + if (price2num($line->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax1_tx); + } + if (price2num($line->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($line->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', ($line->tva_npr ? $line->tva_npr : $line->recuperableonly)); @@ -2133,8 +2157,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Todo Edit or delete button // Action - if ($user->rights->produit->supprimer || $user->rights->service->supprimer) - { + if ($user->rights->produit->supprimer || $user->rights->service->supprimer) { print '<td class="right nowraponall">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=showlog_customer_price&amp;id='.$object->id.'&amp;socid='.$line->fk_soc.'">'; print img_info($langs->trans('PriceByCustomerLog')); diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 715ad66e977..342acb49b6e 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -35,11 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; // Load translation files required by the page $langs->loadLangs(array('products', 'stocks')); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service'); - - $action = GETPOST('action', 'aZ09'); $sref = GETPOST("sref", 'alpha'); $snom = GETPOST("snom", 'alpha'); @@ -55,11 +50,19 @@ $fourn_id = GETPOST("fourn_id", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if (empty($page) || $page < 0) $page = 0; -if (!$sortfield) $sortfield = "p.ref"; -if (!$sortorder) $sortorder = "ASC"; +if (empty($page) || $page < 0) { + $page = 0; +} +if (!$sortfield) { + $sortfield = "p.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -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; // Load sale and categ filters @@ -69,8 +72,7 @@ $search_categ = GETPOST("search_categ"); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $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('product', 'list', $canvas); @@ -83,22 +85,24 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) - || !empty($conf->mrp->enabled)) -{ + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('productreassortlist')); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'produit|service', 0, 'product&product'); /* * 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 -{ +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 $sref = ""; $snom = ""; $sall = ""; @@ -128,7 +132,9 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price $sql .= ' p.fk_product_type, p.tms as datem,'; $sql .= ' p.duration, p.tosell as statut, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; $sql .= ' SUM(s.reel) as stock_physique'; -if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ', u.short_label as unit_short'; +if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ', u.short_label as unit_short'; +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -136,49 +142,73 @@ $sql .= $hookmanager->resPrint; $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e ON s.fk_entrepot = e.rowid AND e.entity IN ('.getEntity('entrepot').')'; -if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; +if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; +} // We'll need this table joined to the select in order to filter by categ -if ($search_categ) $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; +if ($search_categ) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; +} $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($search_categ) $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ -if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +if ($search_categ) { + $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ +} +if ($sall) { + $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +} // if the type is not 1, we show all products (type = 0,2,3) -if (dol_strlen($type)) -{ - if ($type == 1) - { +if (dol_strlen($type)) { + if ($type == 1) { $sql .= " AND p.fk_product_type = '1'"; } else { $sql .= " AND p.fk_product_type <> '1'"; } } -if ($sref) $sql .= natural_search('p.ref', $sref); -if ($search_barcode) $sql .= natural_search('p.barcode', $search_barcode); -if ($snom) $sql .= natural_search('p.label', $snom); -if (!empty($tosell)) $sql .= " AND p.tosell = ".$tosell; -if (!empty($tobuy)) $sql .= " AND p.tobuy = ".$tobuy; -if (!empty($canvas)) $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; -if ($catid) $sql .= " AND cp.fk_categorie = ".$catid; -if ($fourn_id > 0) $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".$fourn_id; +if ($sref) { + $sql .= natural_search('p.ref', $sref); +} +if ($search_barcode) { + $sql .= natural_search('p.barcode', $search_barcode); +} +if ($snom) { + $sql .= natural_search('p.label', $snom); +} +if (!empty($tosell)) { + $sql .= " AND p.tosell = ".((int) $tosell); +} +if (!empty($tobuy)) { + $sql .= " AND p.tobuy = ".((int) $tobuy); +} +if (!empty($canvas)) { + $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; +} +if ($catid > 0) { + $sql .= " AND cp.fk_categorie = ".((int) $catid); +} +if ($fourn_id > 0) { + $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id); +} // Insert categ filter -if ($search_categ) $sql .= " AND cp.fk_categorie = ".$db->escape($search_categ); +if ($search_categ) { + $sql .= " AND cp.fk_categorie = ".$db->escape($search_categ); +} $sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,"; $sql .= " p.fk_product_type, p.tms, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock"; // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -if ($toolowstock) $sql .= " HAVING SUM(".$db->ifsql('s.reel IS NULL', '0', 's.reel').") < p.seuil_stock_alerte"; +if ($toolowstock) { + $sql .= " HAVING SUM(".$db->ifsql('s.reel IS NULL', '0', 's.reel').") < p.seuil_stock_alerte"; +} $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -187,41 +217,68 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall || $snom || $sref)) - { + if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall || $snom || $sref)) { $objp = $db->fetch_object($resql); header("Location: card.php?id=$objp->rowid"); exit; } - if (isset($type)) - { - if ($type == 1) { $texte = $langs->trans("Services"); } else { $texte = $langs->trans("Products"); } + if (isset($type)) { + if ($type == 1) { + $texte = $langs->trans("Services"); + } else { + $texte = $langs->trans("Products"); + } } else { $texte = $langs->trans("ProductsAndServices"); } $texte .= ' ('.$langs->trans("MenuStocks").')'; $param = ''; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($sall) $param .= "&sall=".urlencode($sall); - if ($tosell) $param .= "&tosell=".urlencode($tosell); - if ($tobuy) $param .= "&tobuy=".urlencode($tobuy); - if ($type) $param .= "&type=".urlencode($type); - if ($fourn_id) $param .= "&fourn_id=".urlencode($fourn_id); - if ($snom) $param .= "&snom=".urlencode($snom); - if ($sref) $param .= "&sref=".urlencode($sref); - if ($search_sale) $param .= "&search_sale=".urlencode($search_sale); - if ($search_categ) $param .= "&search_categ=".urlencode($search_categ); - if ($toolowstock) $param .= "&toolowstock=".urlencode($toolowstock); - if ($sbarcode) $param .= "&sbarcode=".urlencode($sbarcode); - if ($catid) $param .= "&catid=".urlencode($catid); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($sall) { + $param .= "&sall=".urlencode($sall); + } + if ($tosell) { + $param .= "&tosell=".urlencode($tosell); + } + if ($tobuy) { + $param .= "&tobuy=".urlencode($tobuy); + } + if ($type) { + $param .= "&type=".urlencode($type); + } + if ($fourn_id) { + $param .= "&fourn_id=".urlencode($fourn_id); + } + if ($snom) { + $param .= "&snom=".urlencode($snom); + } + if ($sref) { + $param .= "&sref=".urlencode($sref); + } + if ($search_sale) { + $param .= "&search_sale=".urlencode($search_sale); + } + if ($search_categ) { + $param .= "&search_categ=".urlencode($search_categ); + } + if ($toolowstock) { + $param .= "&toolowstock=".urlencode($toolowstock); + } + if ($sbarcode) { + $param .= "&sbarcode=".urlencode($sbarcode); + } + if ($catid) { + $param .= "&catid=".urlencode($catid); + } llxHeader("", $texte, $helpurl); @@ -234,8 +291,7 @@ if ($resql) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'product', 0, '', '', $limit); - if (!empty($catid)) - { + if (!empty($catid)) { print "<div id='ways'>"; $c = new Categorie($db); $c->fetch($catid); @@ -245,21 +301,19 @@ if ($resql) } // Filter on categories - $moreforfilter = ''; - if (!empty($conf->categorie->enabled)) - { - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('Categories').': '; + $moreforfilter = ''; + if (!empty($conf->categorie->enabled)) { + $moreforfilter .= '<div class="divsearchfield">'; + $moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"'); $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ'); - $moreforfilter .= '</div>'; + $moreforfilter .= '</div>'; } $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= $langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock ? ' checked' : '').'>'; $moreforfilter .= '</div>'; - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -269,21 +323,39 @@ if ($resql) } $param = ''; - if ($tosell) $param .= "&tosell=".urlencode($tosell); - if ($tobuy) $param .= "&tobuy=".urlencode($tobuy); - if ($type) $param .= "&type=".urlencode($type); - if ($fourn_id) $param .= "&fourn_id=".urlencode($fourn_id); - if ($snom) $param .= "&snom=".urlencode($snom); - if ($sref) $param .= "&sref=".urlencode($sref); - if ($toolowstock) $param .= "&toolowstock=".urlencode($toolowstock); - if ($search_categ) $param .= "&search_categ=".urlencode($search_categ); + if ($tosell) { + $param .= "&tosell=".urlencode($tosell); + } + if ($tobuy) { + $param .= "&tobuy=".urlencode($tobuy); + } + if ($type) { + $param .= "&type=".urlencode($type); + } + if ($fourn_id) { + $param .= "&fourn_id=".urlencode($fourn_id); + } + if ($snom) { + $param .= "&snom=".urlencode($snom); + } + if ($sref) { + $param .= "&sref=".urlencode($sref); + } + if ($toolowstock) { + $param .= "&toolowstock=".urlencode($toolowstock); + } + if ($search_categ) { + $param .= "&search_categ=".urlencode($search_categ); + } $formProduct = new FormProduct($db); $formProduct->loadWarehouses(); $warehouses_list = $formProduct->cache_warehouses; $nb_warehouse = count($warehouses_list); $colspan_warehouse = 1; - if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse + 1 : 1; } + if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { + $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse + 1 : 1; + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'; @@ -297,8 +369,7 @@ if ($resql) print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">'; print '</td>'; // Duration - if (!empty($conf->service->enabled) && $type == 1) - { + if (!empty($conf->service->enabled) && $type == 1) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; @@ -307,7 +378,9 @@ if ($resql) print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre right">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>'; - if ($virtualdiffersfromphysical) print '<td class="liste_titre">&nbsp;</td>'; + if ($virtualdiffersfromphysical) { + print '<td class="liste_titre">&nbsp;</td>'; + } print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre" colspan="'.$colspan_warehouse.'">&nbsp;</td>'; print '<td class="liste_titre"></td>'; @@ -315,8 +388,8 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '<td class="liste_titre maxwidthsearch">'; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; print '</td>'; print '</tr>'; @@ -324,20 +397,23 @@ if ($resql) print "<tr class=\"liste_titre\">"; 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->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center '); + if (!empty($conf->service->enabled) && $type == 1) { + print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center '); + } print_liste_field_titre("StockLimit", $_SERVER["PHP_SELF"], "p.seuil_stock_alerte", $param, "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock", $param, "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right '); // Details per warehouse - if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context) - { + if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context) if ($nb_warehouse > 1) { foreach ($warehouses_list as &$wh) { print_liste_field_titre($wh['label'], '', '', '', '', '', '', '', 'right '); } } } - if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc'); + if ($virtualdiffersfromphysical) { + print_liste_field_titre("VirtualStock", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc'); + } // Units if (!empty($conf->global->PRODUCT_USE_UNITS)) { print_liste_field_titre("Unit", $_SERVER["PHP_SELF"], "unit_short", $param, "", 'align="right"', $sortfield, $sortorder); @@ -352,8 +428,7 @@ if ($resql) print_liste_field_titre(''); print "</tr>\n"; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); $product = new Product($db); @@ -367,13 +442,17 @@ if ($resql) print '</td>'; print '<td>'.$product->label.'</td>'; - if (!empty($conf->service->enabled) && $type == 1) - { + if (!empty($conf->service->enabled) && $type == 1) { print '<td class="center">'; - if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear"); - elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth"); - elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay"); - else print $objp->duration; + if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationYear"); + } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationMonth"); + } elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationDay"); + } else { + print $objp->duration; + } print '</td>'; } //print '<td class="right">'.$objp->stock_theorique.'</td>'; @@ -381,13 +460,14 @@ if ($resql) print '<td class="right">'.$objp->desiredstock.'</td>'; // Real stock print '<td class="right">'; - if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; + if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) { + print img_warning($langs->trans("StockTooLow")).' '; + } print price2num($objp->stock_physique, 'MS'); print '</td>'; // Details per warehouse - if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context) - { + if (!empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { // TODO This should be moved into the selection of fields on page product/list (page product/stock will be removed and replaced with product/list with its own context) if ($nb_warehouse > 1) { foreach ($warehouses_list as &$wh) { print '<td class="right">'; @@ -398,10 +478,11 @@ if ($resql) } // Virtual stock - if ($virtualdiffersfromphysical) - { + if ($virtualdiffersfromphysical) { print '<td class="right">'; - if ($objp->seuil_stock_alerte != '' && ($product->stock_theorique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; + if ($objp->seuil_stock_alerte != '' && ($product->stock_theorique < $objp->seuil_stock_alerte)) { + print img_warning($langs->trans("StockTooLow")).' '; + } print price2num($product->stock_theorique, 'MS'); print '</td>'; } @@ -409,7 +490,10 @@ if ($resql) if (!empty($conf->global->PRODUCT_USE_UNITS)) { print '<td class="left">'.$objp->unit_short.'</td>'; } - print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product->id.'">'.$langs->trans("Movements").'</a></td>'; + print '<td class="center">'; + print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product->id.'">'.$langs->trans("Movements").'</a>'; + print '</td>'; print '<td class="right nowrap">'.$product->LibStatut($objp->statut, 5, 0).'</td>'; print '<td class="right nowrap">'.$product->LibStatut($objp->tobuy, 5, 1).'</td>'; // Fields from hook diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 7949c5441c1..38b16cea44a 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -37,11 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'productbatch')); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'produit|service'); - - $action = GETPOST('action', 'aZ09'); $sref = GETPOST("sref", 'alpha'); $snom = GETPOST("snom", 'alpha'); @@ -59,11 +54,19 @@ $fourn_id = GETPOST("fourn_id", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if (empty($page) || $page < 0) $page = 0; -if (!$sortfield) $sortfield = "p.ref"; -if (!$sortorder) $sortorder = "ASC"; +if (empty($page) || $page < 0) { + $page = 0; +} +if (!$sortfield) { + $sortfield = "p.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -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; // Load sale and categ filters @@ -73,21 +76,24 @@ $search_categ = GETPOST("search_categ"); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $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('product', 'list', $canvas); } +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'produit|service', 0, 'product&product'); /* * 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 -{ +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 $sref = ""; $snom = ""; $sall = ""; @@ -129,32 +135,58 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e on ps.fk_entrepot = e.rowid' $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_batch as pb on pb.fk_product_stock = ps.rowid'; // Detail for each lot on each warehouse $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl on pl.fk_product = p.rowid AND pl.batch = pb.batch'; // Link on unique key // We'll need this table joined to the select in order to filter by categ -if ($search_categ) $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; +if ($search_categ) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; +} $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($search_categ) $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ -if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +if ($search_categ) { + $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ +} +if ($sall) { + $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +} // if the type is not 1, we show all products (type = 0,2,3) -if (dol_strlen($type)) -{ - if ($type == 1) - { +if (dol_strlen($type)) { + if ($type == 1) { $sql .= " AND p.fk_product_type = '1'"; } else { $sql .= " AND p.fk_product_type <> '1'"; } } -if ($sref) $sql .= natural_search("p.ref", $sref); -if ($search_barcode) $sql .= natural_search("p.barcode", $search_barcode); -if ($snom) $sql .= natural_search("p.label", $snom); -if (!empty($tosell)) $sql .= " AND p.tosell = ".$tosell; -if (!empty($tobuy)) $sql .= " AND p.tobuy = ".$tobuy; -if (!empty($canvas)) $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; -if ($catid) $sql .= " AND cp.fk_categorie = ".$catid; -if ($fourn_id > 0) $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".$fourn_id; +if ($sref) { + $sql .= natural_search("p.ref", $sref); +} +if ($search_barcode) { + $sql .= natural_search("p.barcode", $search_barcode); +} +if ($snom) { + $sql .= natural_search("p.label", $snom); +} +if (!empty($tosell)) { + $sql .= " AND p.tosell = ".((int) $tosell); +} +if (!empty($tobuy)) { + $sql .= " AND p.tobuy = ".((int) $tobuy); +} +if (!empty($canvas)) { + $sql .= " AND p.canvas = '".$db->escape($canvas)."'"; +} +if ($catid > 0) { + $sql .= " AND cp.fk_categorie = ".((int) $catid); +} +if ($fourn_id > 0) { + $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id); +} // Insert categ filter -if ($search_categ) $sql .= " AND cp.fk_categorie = ".$db->escape($search_categ); -if ($search_warehouse) $sql .= natural_search("e.ref", $search_warehouse); -if ($search_batch) $sql .= natural_search("pb.batch", $search_batch); +if ($search_categ) { + $sql .= " AND cp.fk_categorie = ".$db->escape($search_categ); +} +if ($search_warehouse) { + $sql .= natural_search("e.ref", $search_warehouse); +} +if ($search_batch) { + $sql .= natural_search("pb.batch", $search_batch); +} $sql .= " GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,"; $sql .= " p.fk_product_type, p.tms,"; $sql .= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.stock, p.tosell, p.tobuy, p.tobatch,"; @@ -162,16 +194,16 @@ $sql .= " ps.fk_entrepot,"; $sql .= " e.ref, e.lieu, e.fk_parent,"; $sql .= " pb.batch, pb.eatby, pb.sellby,"; $sql .= " pl.rowid, pl.eatby, pl.sellby"; -if ($toolowstock) $sql .= " HAVING SUM(".$db->ifsql('ps.reel IS NULL', '0', 'ps.reel').") < p.seuil_stock_alerte"; // Not used yet +if ($toolowstock) { + $sql .= " HAVING SUM(".$db->ifsql('ps.reel IS NULL', '0', 'ps.reel').") < p.seuil_stock_alerte"; // Not used yet +} $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -180,43 +212,74 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall or $snom or $sref)) - { + if ($num == 1 && GETPOST('autojumpifoneonly') && ($sall or $snom or $sref)) { $objp = $db->fetch_object($resql); header("Location: card.php?id=$objp->rowid"); exit; } - if (isset($type)) - { - if ($type == 1) { $texte = $langs->trans("Services"); } else { $texte = $langs->trans("Products"); } + if (isset($type)) { + if ($type == 1) { + $texte = $langs->trans("Services"); + } else { + $texte = $langs->trans("Products"); + } } else { $texte = $langs->trans("ProductsAndServices"); } $texte .= ' ('.$langs->trans("StocksByLotSerial").')'; $param = ''; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($sall) $param .= "&sall=".urlencode($sall); - if ($tosell) $param .= "&tosell=".urlencode($tosell); - if ($tobuy) $param .= "&tobuy=".urlencode($tobuy); - if ($type) $param .= "&type=".urlencode($type); - if ($fourn_id) $param .= "&fourn_id=".urlencode($fourn_id); - if ($snom) $param .= "&snom=".urlencode($snom); - if ($sref) $param .= "&sref=".urlencode($sref); - if ($search_batch) $param .= "&search_batch=".urlencode($search_batch); - if ($sbarcode) $param .= "&sbarcode=".urlencode($sbarcode); - if ($search_warehouse) $param .= "&search_warehouse=".urlencode($search_warehouse); - if ($catid) $param .= "&catid=".urlencode($catid); - if ($toolowstock) $param .= "&toolowstock=".urlencode($toolowstock); - if ($search_sale) $param .= "&search_sale=".urlencode($search_sale); - if ($search_categ) $param .= "&search_categ=".urlencode($search_categ); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($sall) { + $param .= "&sall=".urlencode($sall); + } + if ($tosell) { + $param .= "&tosell=".urlencode($tosell); + } + if ($tobuy) { + $param .= "&tobuy=".urlencode($tobuy); + } + if ($type) { + $param .= "&type=".urlencode($type); + } + if ($fourn_id) { + $param .= "&fourn_id=".urlencode($fourn_id); + } + if ($snom) { + $param .= "&snom=".urlencode($snom); + } + if ($sref) { + $param .= "&sref=".urlencode($sref); + } + if ($search_batch) { + $param .= "&search_batch=".urlencode($search_batch); + } + if ($sbarcode) { + $param .= "&sbarcode=".urlencode($sbarcode); + } + if ($search_warehouse) { + $param .= "&search_warehouse=".urlencode($search_warehouse); + } + if ($catid) { + $param .= "&catid=".urlencode($catid); + } + if ($toolowstock) { + $param .= "&toolowstock=".urlencode($toolowstock); + } + if ($search_sale) { + $param .= "&search_sale=".urlencode($search_sale); + } + if ($search_categ) { + $param .= "&search_categ=".urlencode($search_categ); + } /*if ($eatby) $param.="&eatby=".$eatby; if ($sellby) $param.="&sellby=".$sellby;*/ @@ -231,8 +294,7 @@ if ($resql) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'product', 0, '', '', $limit, 0, 0, 1); - if (!empty($catid)) - { + if (!empty($catid)) { print "<div id='ways'>"; $c = new Categorie($db); $c->fetch($catid); @@ -242,18 +304,16 @@ if ($resql) } // Filter on categories - $moreforfilter = ''; - if (!empty($conf->categorie->enabled)) - { - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('Categories').': '; + $moreforfilter = ''; + if (!empty($conf->categorie->enabled)) { + $moreforfilter .= '<div class="divsearchfield">'; + $moreforfilter .= img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"'); $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ'); - $moreforfilter .= '</div>'; + $moreforfilter .= '</div>'; } //$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>'; - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -274,8 +334,7 @@ if ($resql) print '<td class="liste_titre">'; print '<input class="flat" type="text" name="snom" size="8" value="'.$snom.'">'; print '</td>'; - if (!empty($conf->service->enabled) && $type == 1) - { + if (!empty($conf->service->enabled) && $type == 1) { print '<td class="liste_titre">'; print '&nbsp;'; print '</td>'; @@ -302,7 +361,9 @@ if ($resql) print "<tr class=\"liste_titre\">"; 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->service->enabled) && $type == 1) print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center '); + if (!empty($conf->service->enabled) && $type == 1) { + print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "p.duration", $param, "", '', $sortfield, $sortorder, 'center '); + } print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", $param, "", '', $sortfield, $sortorder); //print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'',$sortfield,$sortorder, 'right ); print_liste_field_titre("Batch", $_SERVER["PHP_SELF"], "pb.batch", $param, "", '', $sortfield, $sortorder, 'center '); @@ -325,13 +386,11 @@ if ($resql) $product_lot_static = new Productlot($db); $warehousetmp = new Entrepot($db); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; @@ -339,10 +398,11 @@ if ($resql) $sql .= " LIMIT 1"; $result = $db->query($sql); - if ($result) - { + if ($result) { $objtp = $db->fetch_object($result); - if (!empty($objtp->label)) $objp->label = $objtp->label; + if (!empty($objtp->label)) { + $objp->label = $objtp->label; + } } } @@ -379,13 +439,17 @@ if ($resql) // Label print '<td>'.$objp->label.'</td>'; - if (!empty($conf->service->enabled) && $type == 1) - { + if (!empty($conf->service->enabled) && $type == 1) { print '<td class="center">'; - if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationYear"); - elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationMonth"); - elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) print $regs[1].' '.$langs->trans("DurationDay"); - else print $objp->duration; + if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationYear"); + } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationMonth"); + } elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) { + print $regs[1].' '.$langs->trans("DurationDay"); + } else { + print $objp->duration; + } print '</td>'; } //print '<td class="right">'.$objp->stock_theorique.'</td>'; @@ -394,16 +458,14 @@ if ($resql) // Warehouse print '<td class="nowrap">'; - if ($objp->fk_entrepot > 0) - { + if ($objp->fk_entrepot > 0) { print $warehousetmp->getNomUrl(1); } print '</td>'; // Lot print '<td class="center nowrap">'; - if ($product_lot_static->batch) - { + if ($product_lot_static->batch) { print $product_lot_static->getNomUrl(1); } print '</td>'; @@ -418,7 +480,10 @@ if ($resql) //if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; print $objp->stock_physique; print '</td>'; - print '<td class="right"><a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a></td>'; + print '<td class="right">'; + print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a>'; + print '</td>'; print '<td class="right nowrap">'.$product_static->LibStatut($objp->statut, 5, 0).'</td>'; print '<td class="right nowrap">'.$product_static->LibStatut($objp->tobuy, 5, 1).'</td>'; print '<td></td>'; diff --git a/htdocs/product/stats/bom.php b/htdocs/product/stats/bom.php index d1254a65b1e..053d9d6b1a8 100644 --- a/htdocs/product/stats/bom.php +++ b/htdocs/product/stats/bom.php @@ -38,7 +38,9 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -52,12 +54,18 @@ $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 = "b.date_valid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "b.date_valid"; +} /* @@ -66,8 +74,7 @@ if (!$sortfield) $sortfield = "b.date_valid"; $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -75,12 +82,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id'=>$id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -88,12 +96,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -130,8 +142,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); if ($result) { $totalofrecords = $db->num_rows($result); @@ -180,8 +191,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); if ($result) { $totalofrecords = $db->num_rows($result); @@ -223,20 +233,32 @@ if ($id > 0 || !empty($ref)) $db->free($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("BOMs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', count($bom_data_result), count($bom_data_result), '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste listwithfilterbefore" width="100%">'; @@ -250,8 +272,7 @@ if ($id > 0 || !empty($ref)) print "</tr>\n"; if (!empty($bom_data_result)) { - foreach ($bom_data_result as $data) - { + foreach ($bom_data_result as $data) { print '<tr class="oddeven">'; print '<td>'; print $data['link']; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index e899cee797f..2dae292884e 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -51,7 +51,9 @@ $mesg = ''; $graphfiles = array(); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} // Security check $fieldvalue = (!empty($id) ? $id : $ref); @@ -60,7 +62,9 @@ $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product $tmp = dol_getdate(dol_now()); $currentyear = $tmp['year']; -if (empty($search_year)) $search_year = $currentyear; +if (empty($search_year)) { + $search_year = $currentyear; +} /* @@ -83,7 +87,7 @@ if (!$id && empty($ref)) { $type = GETPOST('type', 'int'); - $helpurl = ''; + $helpurl = ''; if ($type == '0') { $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; //$title=$langs->trans("StatisticsOfProducts"); @@ -99,7 +103,9 @@ if (!$id && empty($ref)) { } $picto = 'product'; - if ($type == 1) $picto = 'service'; + if ($type == 1) { + $picto = 'service'; + } print load_fiche_titre($title, $mesg, $picto); } else { @@ -178,9 +184,8 @@ if ($result || empty($id)) { // Tag if ($conf->categorie->enabled) { print '<tr><td class="titlefield">'.$langs->trans("Categories").'</td><td>'; - //$moreforfilter.='<div class="divsearchfield">'; + $moreforfilter .= img_picto($langs->trans("Categories"), 'category', 'paddingright'); $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1); - //$moreforfilter.='</div>'; print $moreforfilter; print '</td></tr>'; } @@ -189,42 +194,65 @@ if ($result || empty($id)) { // Year print '<tr><td class="titlefield">'.$langs->trans("Year").'</td><td>'; $arrayyears = array(); - for ($year = $currentyear - 25; $year < $currentyear; $year++) - { + for ($year = $currentyear - 25; $year < $currentyear; $year++) { $arrayyears[$year] = $year; } - if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; - if (!in_array($currentyear, $arrayyears)) $arrayyears[$currentyear] = $currentyear; + if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; + } + if (!in_array($currentyear, $arrayyears)) { + $arrayyears[$currentyear] = $currentyear; + } arsort($arrayyears); - print $form->selectarray('search_year', $arrayyears, $search_year, 1); + print $form->selectarray('search_year', $arrayyears, $search_year, 1, 0, 0, '', 0, 0, 0, '', 'width75'); print '</td></tr>'; print '</table>'; print '<div class="center"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></div>'; - print '</form>'; + print '</form><br>'; print '<br>'; // Choice of stats mode (byunit or bynumber) - if (!empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n"; + if (!empty($conf->dol_use_jmobile)) { + print "\n".'<div class="fichecenter"><div class="nowrap">'."\n"; + } - if ($mode == 'bynumber') print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=byunit&search_year='.$search_year.'">'; - else print '<span class="a-mesure">'; + if ($mode == 'bynumber') { + print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=byunit&search_year='.$search_year.'">'; + } else { + print '<span class="a-mesure">'; + } print $langs->trans("StatsByNumberOfUnits"); - if ($mode == 'bynumber') print '</a>'; - else print '</span>'; + if ($mode == 'bynumber') { + print '</a>'; + } else { + print '</span>'; + } - if (!empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n"; - else print ' &nbsp; '; + if (!empty($conf->dol_use_jmobile)) { + print '</div>'."\n".'<div class="nowrap">'."\n"; + } else { + print ' &nbsp; '; + } - if ($mode == 'byunit') print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=bynumber&search_year='.$search_year.'">'; - else print '<span class="a-mesure">'; + if ($mode == 'byunit') { + print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id') ?GETPOST('id') : $object->id).($type != '' ? '&type='.$type : '').'&mode=bynumber&search_year='.$search_year.'">'; + } else { + print '<span class="a-mesure">'; + } print $langs->trans("StatsByNumberOfEntities"); - if ($mode == 'byunit') print '</a>'; - else print '</span>'; + if ($mode == 'byunit') { + print '</a>'; + } else { + print '</span>'; + } - if (!empty($conf->dol_use_jmobile)) print '</div></div>'; - else print '<br>'; + if (!empty($conf->dol_use_jmobile)) { + print '</div></div>'; + } else { + print '<br>'; + } print '<br>'; //print '<table width="100%">'; @@ -294,7 +322,9 @@ if ($result || empty($id)) { $mesg = $px->isGraphKo(); if (!$mesg) { foreach ($graphfiles as $key => $val) { - if (!$graphfiles[$key]['file']) continue; + if (!$graphfiles[$key]['file']) { + continue; + } $graph_data = array(); @@ -306,20 +336,36 @@ if ($result || empty($id)) { $categ = new Categorie($db); $categ->fetch($search_categ); $listofprodids = $categ->getObjectsInCateg('product', 1); - $morefilters = ' AND d.fk_product IN ('.((is_array($listofprodids) && count($listofprodids)) ? join(',', $listofprodids) : '0').')'; + $morefilters = ' AND d.fk_product IN ('.$db->sanitize((is_array($listofprodids) && count($listofprodids)) ? join(',', $listofprodids) : '0').')'; } if ($search_categ == -2) { $morefilters = ' AND d.fk_product NOT IN (SELECT cp.fk_product from '.MAIN_DB_PREFIX.'categorie_product as cp)'; } - if ($key == 'propal') $graph_data = $object->get_nb_propal($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'orders') $graph_data = $object->get_nb_order($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'invoices') $graph_data = $object->get_nb_vente($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'proposalssuppliers') $graph_data = $object->get_nb_propalsupplier($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'invoicessuppliers') $graph_data = $object->get_nb_achat($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'orderssuppliers') $graph_data = $object->get_nb_ordersupplier($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'contracts') $graph_data = $object->get_nb_contract($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); - if ($key == 'mrp') $graph_data = $object->get_nb_mos($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + if ($key == 'propal') { + $graph_data = $object->get_nb_propal($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'orders') { + $graph_data = $object->get_nb_order($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'invoices') { + $graph_data = $object->get_nb_vente($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'proposalssuppliers') { + $graph_data = $object->get_nb_propalsupplier($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'invoicessuppliers') { + $graph_data = $object->get_nb_achat($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'orderssuppliers') { + $graph_data = $object->get_nb_ordersupplier($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'contracts') { + $graph_data = $object->get_nb_contract($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } + if ($key == 'mrp') { + $graph_data = $object->get_nb_mos($socid, $mode, ((string) $type != '' ? $type : -1), $search_year, $morefilters); + } // TODO Save cachefile $graphfiles[$key]['file'] } @@ -354,15 +400,31 @@ if ($result || empty($id)) { $i = 0; if (count($graphfiles) > 0) { foreach ($graphfiles as $key => $val) { - if (!$graphfiles[$key]['file']) continue; + if (!$graphfiles[$key]['file']) { + continue; + } - if ($graphfiles == 'propal' && !$user->rights->propale->lire) continue; - if ($graphfiles == 'order' && !$user->rights->commande->lire) continue; - if ($graphfiles == 'invoices' && !$user->rights->facture->lire) continue; - if ($graphfiles == 'proposals_suppliers' && !$user->rights->supplier_proposal->lire) continue; - if ($graphfiles == 'invoices_suppliers' && !$user->rights->fournisseur->facture->lire) continue; - if ($graphfiles == 'orders_suppliers' && !$user->rights->fournisseur->commande->lire) continue; - if ($graphfiles == 'mrp' && empty($user->rights->mrp->mo->read)) continue; + if ($graphfiles == 'propal' && !$user->rights->propale->lire) { + continue; + } + if ($graphfiles == 'order' && !$user->rights->commande->lire) { + continue; + } + if ($graphfiles == 'invoices' && !$user->rights->facture->lire) { + continue; + } + if ($graphfiles == 'proposals_suppliers' && !$user->rights->supplier_proposal->lire) { + continue; + } + if ($graphfiles == 'invoices_suppliers' && !$user->rights->fournisseur->facture->lire) { + continue; + } + if ($graphfiles == 'orders_suppliers' && !$user->rights->fournisseur->commande->lire) { + continue; + } + if ($graphfiles == 'mrp' && empty($user->rights->mrp->mo->read)) { + continue; + } if ($i % 2 == 0) { @@ -373,8 +435,11 @@ if ($result || empty($id)) { // Date generation if ($graphfiles[$key]['output'] && !$px->isGraphKo()) { - if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file'])) $dategenerated = $langs->trans("GeneratedOn", dol_print_date(filemtime($dir."/".$graphfiles[$key]['file']), "dayhour")); - else $dategenerated = $langs->trans("GeneratedOn", dol_print_date(dol_now(), "dayhour")); + if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file'])) { + $dategenerated = $langs->trans("GeneratedOn", dol_print_date(filemtime($dir."/".$graphfiles[$key]['file']), "dayhour")); + } else { + $dategenerated = $langs->trans("GeneratedOn", dol_print_date(dol_now(), "dayhour")); + } } else { $dategenerated = ($mesg ? '<font class="error">'.$mesg.'</font>' : $langs->trans("ChartNotGenerated")); } diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index f89305b4d95..fe8016f362a 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -40,7 +40,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -53,12 +55,18 @@ $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 = "c.date_commande"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "c.date_commande"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -77,8 +85,7 @@ $societestatic = new Societe($db); $form = new Form($db); $formother = new FormOther($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -86,12 +93,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id'=>$id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -99,12 +107,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -123,26 +135,35 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_end(); - if ($user->rights->commande->lire) - { + if ($user->rights->commande->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, c.rowid, d.total_ht as total_ht, c.ref,"; $sql .= " c.ref_client,"; $sql .= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."commandedet as d"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; $sql .= " AND d.fk_commande = c.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(c.date_commande) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(c.date_commande) IN ('.$search_year.')'; - 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; + if (!empty($search_month)) { + $sql .= ' AND MONTH(c.date_commande) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(c.date_commande) IN ('.$db->sanitize($search_year).')'; + } + 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 = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); //Calcul total qty and amount for global if full scan list @@ -151,8 +172,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -160,25 +180,36 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'">'; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -205,10 +236,8 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "c.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $total_ht += $objp->total_ht; @@ -220,7 +249,7 @@ if ($id > 0 || !empty($ref)) $societestatic->fetch($objp->socid); print '<tr class="oddeven">'; - print '<td>'; + print '<td>'; print $orderstatic->getNomUrl(1); print "</td>\n"; print '<td>'.$societestatic->getNomUrl(1).'</td>'; @@ -235,8 +264,11 @@ if ($id > 0 || !empty($ref)) } } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="3"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 611047f7f13..bc8346e39b1 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -39,8 +39,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) +if (!empty($user->socid)) { $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -53,14 +54,18 @@ $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 +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) +if (!$sortorder) { $sortorder = "DESC"; -if (!$sortfield) +} +if (!$sortfield) { $sortfield = "c.date_commande"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -88,13 +93,13 @@ if ($id > 0 || !empty($ref)) { $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -102,12 +107,16 @@ if ($id > 0 || !empty($ref)) { $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -126,30 +135,35 @@ if ($id > 0 || !empty($ref)) { print dol_get_fiche_end(); - if ($user->rights->fournisseur->commande->lire) - { + if ($user->rights->fournisseur->commande->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " c.rowid, d.total_ht as total_ht, c.ref,"; $sql .= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as d"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; $sql .= " AND d.fk_commande = c.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(c.date_commande) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(c.date_commande) IN ('.$search_year.')'; - if (!$user->rights->societe->client->voir && !$socid) + if (!empty($search_month)) { + $sql .= ' AND MONTH(c.date_commande) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(c.date_commande) IN ('.$db->sanitize($search_year).')'; + } + 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; + } + if ($socid) { + $sql .= " AND c.fk_soc = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); // Calcul total qty and amount for global if full scan list @@ -158,8 +172,7 @@ if ($id > 0 || !empty($ref)) { // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -170,20 +183,32 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -210,10 +235,8 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "c.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $total_ht += $objp->total_ht; @@ -240,8 +263,11 @@ if ($id > 0 || !empty($ref)) { } } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="3"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 91ca0bd87e2..e419593208c 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -37,7 +37,9 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -50,12 +52,18 @@ $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 = "c.date_contrat"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "c.date_contrat"; +} /* @@ -67,8 +75,7 @@ $staticcontratligne = new ContratLigne($db); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -76,12 +83,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id'=>$id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -89,12 +97,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -123,15 +135,21 @@ if ($id > 0 || !empty($ref)) $sql .= " c.rowid as rowid, c.ref, c.ref_customer, c.ref_supplier, c.date_contrat, c.statut as statut,"; $sql .= " s.nom as name, s.rowid as socid, 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"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= " WHERE c.rowid = cd.fk_contrat"; $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('contract').")"; $sql .= " AND cd.fk_product =".$product->id; - 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; + 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 = ".((int) $socid); + } $sql .= " GROUP BY c.rowid, c.ref, c.ref_customer, c.ref_supplier, c.date_contrat, c.statut, s.nom, s.rowid, s.code_client"; $sql .= $db->order($sortfield, $sortorder); @@ -141,8 +159,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -150,25 +167,36 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } $i = 0; print '<div class="div-table-responsive">'; @@ -187,10 +215,8 @@ if ($id > 0 || !empty($ref)) $contracttmp = new Contrat($db); - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $contracttmp->id = $objp->rowid; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 8091de9c320..fa7d4fae24f 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -41,7 +41,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -54,12 +56,18 @@ $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 = "f.datef"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.datef"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -81,8 +89,7 @@ $societestatic = new Societe($db); $form = new Form($db); $formother = new FormOther($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -90,26 +97,25 @@ if ($id > 0 || !empty($ref)) $parameters = array('id'=>$id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); - if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) - { + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Referers'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } - if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) - { + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Referers'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } llxHeader('', $title, $helpurl); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -117,12 +123,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -140,29 +150,37 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_end(); - if ($showmessage && $nboflines > 1) - { + if ($showmessage && $nboflines > 1) { print '<span class="opacitymedium">'.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).'</span>'; - } elseif ($user->rights->facture->lire) - { + } elseif ($user->rights->facture->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; $sql .= " f.ref, f.datef, f.paye, f.type, f.fk_statut as statut, f.rowid as facid,"; $sql .= " d.rowid, d.total_ht as total_ht, d.qty"; // We must keep the d.rowid here to not loose record because of the distinct used to ignore duplicate line when link on societe_commerciaux is used - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."facturedet as d"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + 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('invoice').")"; $sql .= " AND d.fk_facture = f.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(f.datef) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(f.datef) IN ('.$search_year.')'; - 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; + if (!empty($search_month)) { + $sql .= ' AND MONTH(f.datef) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(f.datef) IN ('.$db->sanitize($search_year).')'; + } + 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 = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); // Calcul total qty and amount for global if full scan list @@ -171,8 +189,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -180,24 +197,35 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER ['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -224,13 +252,13 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); - if ($objp->type == Facture::TYPE_CREDIT_NOTE) $objp->qty = -($objp->qty); + if ($objp->type == Facture::TYPE_CREDIT_NOTE) { + $objp->qty = -($objp->qty); + } $total_ht += $objp->total_ht; $total_qty += $objp->qty; @@ -256,8 +284,11 @@ if ($id > 0 || !empty($ref)) } } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="3"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 7e0e463e1a5..018f1c28f02 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -41,7 +41,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -54,12 +56,18 @@ $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 = "f.datef"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "f.datef"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -78,8 +86,7 @@ $societestatic = new Societe($db); $form = new Form($db); $formother = new FormOther($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -87,12 +94,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -100,12 +108,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -124,26 +136,34 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_end(); - if ($user->rights->fournisseur->facture->lire) - { + if ($user->rights->fournisseur->facture->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,"; $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle as label, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn_det as d"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + 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 d.fk_facture_fourn = f.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(f.datef) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(f.datef) IN ('.$search_year.')'; - 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; + if (!empty($search_month)) { + $sql .= ' AND MONTH(f.datef) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(f.datef) IN ('.$db->sanitize($search_year).')'; + } + 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 = ".((int) $socid); + } $sql .= " ORDER BY $sortfield $sortorder "; // Calcul total qty and amount for global if full scan list @@ -152,8 +172,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -161,24 +180,35 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -205,10 +235,8 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $total_ht += $objp->line_total_ht; @@ -231,7 +259,7 @@ if ($id > 0 || !empty($ref)) print "</td>\n"; print '<td>'.$societestatic->getNomUrl(1).'</td>'; print "<td>".$objp->code_client."</td>\n"; - print '<td class="center">'; + print '<td class="center">'; print dol_print_date($db->jdate($objp->datef), 'dayhour')."</td>"; print '<td class="center">'.$objp->qty."</td>\n"; print '<td align="right">'.price($objp->line_total_ht)."</td>\n"; @@ -241,8 +269,11 @@ if ($id > 0 || !empty($ref)) } } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="3"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stats/index.html b/htdocs/product/stats/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index cb159646047..1cabfd9ef85 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -37,7 +37,9 @@ $ref = GETPOST('ref', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -50,12 +52,18 @@ $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 = "c.date_valid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "c.date_valid"; +} /* @@ -67,8 +75,7 @@ $staticmoligne = new MoLine($db); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -76,12 +83,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id'=>$id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -89,12 +97,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -127,7 +139,9 @@ if ($id > 0 || !empty($ref)) $sql .= " WHERE c.rowid = cd.fk_mo"; $sql .= " AND c.entity IN (".getEntity('mo').")"; $sql .= " AND cd.fk_product =".$product->id; - if ($socid) $sql .= " AND s.rowid = ".$socid; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } $sql .= " GROUP BY c.rowid, c.ref, c.date_valid, c.status"; //$sql .= ", s.nom, s.rowid, s.code_client"; $sql .= $db->order($sortfield, $sortorder); @@ -138,8 +152,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -147,24 +160,35 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } $i = 0; print '<div class="div-table-responsive">'; @@ -183,10 +207,8 @@ if ($id > 0 || !empty($ref)) $motmp = new Mo($db); - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $motmp->id = $objp->rowid; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 9e9a078d8f0..7dfc8b6d1db 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -40,7 +40,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -53,12 +55,18 @@ $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 +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"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.datep"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -78,8 +86,7 @@ $societestatic = new Societe($db); $form = new Form($db); $formother = new FormOther($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -87,12 +94,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -100,12 +108,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -124,30 +136,35 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_end(); - if ($user->rights->propale->lire) - { + if ($user->rights->propale->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; $sql .= " p.ref_client,"; $sql .= "p.datep, p.fk_statut as statut, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ",".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."propaldet as d"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; $sql .= " AND d.fk_propal = p.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(p.datep) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(p.datep) IN ('.$search_year.')'; - if (!$user->rights->societe->client->voir && !$socid) + if (!empty($search_month)) { + $sql .= ' AND MONTH(p.datep) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(p.datep) IN ('.$db->sanitize($search_year).')'; + } + if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($socid) - $sql .= " AND p.fk_soc = ".$socid; + } + if ($socid) { + $sql .= " AND p.fk_soc = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); // Calcul total qty and amount for global if full scan list @@ -156,8 +173,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -165,24 +181,35 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -208,10 +235,8 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $total_ht += $objp->amount; @@ -238,8 +263,11 @@ if ($id > 0 || !empty($ref)) } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="2"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index b4816028d98..86689786b2d 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -40,7 +40,9 @@ $ref = GETPOST('ref', 'alpha'); $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $socid = ''; -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -53,12 +55,18 @@ $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 +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.date_valid"; +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "p.date_valid"; +} $search_month = GETPOST('search_month', 'int'); $search_year = GETPOST('search_year', 'int'); @@ -78,8 +86,7 @@ $societestatic = new Societe($db); $form = new Form($db); $formother = new FormOther($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $product = new Product($db); $result = $product->fetch($id, $ref); @@ -87,12 +94,13 @@ if ($id > 0 || !empty($ref)) $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } llxHeader("", "", $langs->trans("CardProduct".$product->type)); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -100,12 +108,16 @@ if ($id > 0 || !empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -124,30 +136,35 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_end(); - if ($user->rights->propale->lire) - { + if ($user->rights->propale->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; //$sql .= " p.ref_supplier,"; $sql .= "p.date_valid, p.fk_statut as statut, d.rowid, d.qty"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ",".MAIN_DB_PREFIX."supplier_proposal as p"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposaldet as d"; - if (!$user->rights->societe->client->voir && !$socid) + if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND d.fk_supplier_proposal = p.rowid"; $sql .= " AND d.fk_product =".$product->id; - if (!empty($search_month)) - $sql .= ' AND MONTH(p.datep) IN ('.$search_month.')'; - if (!empty($search_year)) - $sql .= ' AND YEAR(p.datep) IN ('.$search_year.')'; - if (!$user->rights->societe->client->voir && !$socid) + if (!empty($search_month)) { + $sql .= ' AND MONTH(p.datep) IN ('.$db->sanitize($search_month).')'; + } + if (!empty($search_year)) { + $sql .= ' AND YEAR(p.datep) IN ('.$db->sanitize($search_year).')'; + } + if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($socid) - $sql .= " AND p.fk_soc = ".$socid; + } + if ($socid) { + $sql .= " AND p.fk_soc = ".((int) $socid); + } $sql .= $db->order($sortfield, $sortorder); // Calcul total qty and amount for global if full scan list @@ -156,8 +173,7 @@ if ($id > 0 || !empty($ref)) // Count total nb of records $totalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $totalofrecords = $db->num_rows($result); } @@ -165,24 +181,35 @@ if ($id > 0 || !empty($ref)) $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); - if (!empty($id)) $option .= '&id='.$product->id; - if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); + if ($limit > 0 && $limit != $conf->liste_limit) { + $option .= '&limit='.urlencode($limit); + } + if (!empty($id)) { + $option .= '&id='.$product->id; + } + if (!empty($search_month)) { + $option .= '&search_month='.urlencode($search_month); + } + if (!empty($search_year)) { + $option .= '&search_year='.urlencode($search_year); + } print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$product->id.'" name="search_form">'."\n"; - if (!empty($sortfield)) + if (!empty($sortfield)) { print '<input type="hidden" name="sortfield" value="'.$sortfield.'"/>'; - if (!empty($sortorder)) + } + if (!empty($sortorder)) { print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>'; + } print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - if (!empty($page)) $option .= '&page='.urlencode($page); + if (!empty($page)) { + $option .= '&page='.urlencode($page); + } print '<div class="liste_titre liste_titre_bydiv centpercent">'; print '<div class="divsearchfield">'; @@ -204,14 +231,12 @@ if ($id > 0 || !empty($ref)) print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder); print_liste_field_titre("DatePropal", $_SERVER["PHP_SELF"], "p.date_valid", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "p.total", "", $option, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "p.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "</tr>\n"; - if ($num > 0) - { - while ($i < min($num, $limit)) - { + if ($num > 0) { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $total_ht += $objp->amount; @@ -237,8 +262,11 @@ if ($id > 0 || !empty($ref)) } print '<tr class="liste_total">'; - if ($num < $limit) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + if ($num < $limit) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } print '<td colspan="2"></td>'; print '<td class="center">'.$total_qty.'</td>'; print '<td align="right">'.price($total_ht).'</td>'; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index a708ace0c22..0d3783dc161 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com> + * Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,20 +36,30 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +if (!empty($conf->projet->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +} + // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'companies', 'categories')); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm'); +$projectid = GETPOST('projectid', 'int'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -if (!$sortfield) $sortfield = "p.ref"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "p.ref"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $backtopage = GETPOST('backtopage', 'alpha'); @@ -87,14 +98,15 @@ $usercandelete = (($user->rights->stock->supprimer)); $parameters = array('id'=>$id, 'ref'=>$ref); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} +if (empty($reshook)) { // Ajout entrepot - if ($action == 'add' && $user->rights->stock->creer) - { + if ($action == 'add' && $user->rights->stock->creer) { $object->ref = (string) GETPOST("ref", "alpha"); $object->fk_parent = (int) GETPOST("fk_parent", "int"); + $object->fk_project = GETPOST('projectid', 'int'); $object->label = (string) GETPOST("libelle", "alpha"); $object->description = (string) GETPOST("desc", "alpha"); $object->statut = GETPOST("statut", "int"); @@ -125,7 +137,7 @@ if (empty($reshook)) header("Location: ".$backtopage); exit; } else { - header("Location: card.php?id=".$id); + header("Location: card.php?id=".urlencode($id)); exit; } } else { @@ -140,12 +152,10 @@ if (empty($reshook)) } // Delete warehouse - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->stock->supprimer) - { + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->stock->supprimer) { $object->fetch(GETPOST('id', 'int')); $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); header("Location: ".DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1'); exit; @@ -156,12 +166,11 @@ if (empty($reshook)) } // Modification entrepot - if ($action == 'update' && $cancel <> $langs->trans("Cancel")) - { - if ($object->fetch($id)) - { + if ($action == 'update' && !$cancel) { + if ($object->fetch($id)) { $object->label = GETPOST("libelle"); $object->fk_parent = GETPOST("fk_parent"); + $object->fk_project = GETPOST('projectid'); $object->description = GETPOST("desc"); $object->statut = GETPOST("statut"); $object->lieu = GETPOST("lieu"); @@ -174,11 +183,15 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $ret = $object->update($id, $user); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } if ($error) { @@ -198,7 +211,9 @@ if (empty($reshook)) // Fill array 'array_options' with data from update form $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $result = $object->insertExtraFields(); if ($result < 0) { @@ -206,11 +221,15 @@ if (empty($reshook)) $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } + } elseif ($action == 'classin' && $usercancreate) { + // Link to a project + $object->setProject(GETPOST('projectid', 'int')); } - if ($cancel == $langs->trans("Cancel")) - { + if ($cancel == $langs->trans("Cancel")) { $action = ''; } @@ -231,13 +250,15 @@ $form = new Form($db); $formproduct = new FormProduct($db); $formcompany = new FormCompany($db); $formfile = new FormFile($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks'; llxHeader("", $langs->trans("WarehouseCard"), $help_url); -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewWarehouse"), '', 'stock'); dol_set_focus('input[name="libelle"]'); @@ -261,6 +282,15 @@ if ($action == 'create') print img_picto('', 'stock').$formproduct->selectWarehouses((GETPOSTISSET('fk_parent') ? GETPOST('fk_parent', 'int') : 'ifone'), 'fk_parent', '', 1); print '</td></tr>'; + // Project + if (!empty($conf->projet->enabled)) { + $langs->load('projects'); + print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; + print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>'; + print '</td></tr>'; + } + // Description print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>'; // Editeur wysiwyg @@ -285,7 +315,9 @@ if ($action == 'create') print '<tr><td>'.$langs->trans('Country').'</td><td>'; print img_picto('', 'globe-americas', 'class="paddingright"'); print $form->select_country((!empty($object->country_id) ? $object->country_id : $mysoc->country_code), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // Phone / Fax @@ -300,10 +332,8 @@ if ($action == 'create') // Status print '<tr><td>'.$langs->trans("Status").'</td><td>'; print '<select name="statut" class="flat">'; - foreach ($object->statuts as $key => $value) - { - if ($key == 1) - { + foreach ($object->statuts as $key => $value) { + if ($key == 1) { print '<option value="'.$key.'" selected>'.$langs->trans($value).'</option>'; } else { print '<option value="'.$key.'">'.$langs->trans($value).'</option>'; @@ -335,12 +365,10 @@ if ($action == 'create') print '</form>'; } else { $id = GETPOST("id", 'int'); - if ($id > 0 || $ref) - { + if ($id > 0 || $ref) { $object = new Entrepot($db); $result = $object->fetch($id, $ref); - if ($result <= 0) - { + if ($result <= 0) { print 'No record found'; exit; } @@ -348,8 +376,7 @@ if ($action == 'create') /* * Affichage fiche */ - if ($action <> 'edit' && $action <> 're-edit') - { + if ($action <> 'edit' && $action <> 're-edit') { $head = stock_prepare_head($object); print dol_get_fiche_head($head, 'card', $langs->trans("Warehouse"), -1, 'stock'); @@ -357,16 +384,18 @@ if ($action == 'create') $formconfirm = ''; // Confirm delete warehouse - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("DeleteAWarehouse"), $langs->trans("ConfirmDeleteWarehouse", $object->label), "confirm_delete", '', 0, 2); } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -376,10 +405,44 @@ if ($action == 'create') $morehtmlref = '<div class="refidno">'; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; + + // Project + if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '<br>'.img_picto('', 'project').' '.$langs->trans('Project').' '; + if ($usercancreate) { + if ($action != 'classify') { + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; + } + if ($action == 'classify') { + $projectid = $object->fk_project; + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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 .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$object->fk_project.'" title="'.$langs->trans('ShowProject').'">'; + $morehtmlref .= $proj->ref; + $morehtmlref .= '</a>'; + } else { + $morehtmlref .= ''; + } + } + } $morehtmlref .= '</div>'; $shownav = 1; - if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -442,8 +505,10 @@ if ($action == 'create') } print '<tr><td>'.$langs->trans("LastMovement").'</td><td>'; if ($lastmovementdate) { - print dol_print_date($lastmovementdate, 'dayhour').' '; - print '(<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?id='.$object->id.'">'.$langs->trans("FullList").'</a>)'; + print dol_print_date($lastmovementdate, 'dayhour'); + print ' &nbsp; &nbsp; '; + print img_picto($langs->trans('LastMovement'), 'movement', 'class="pictofixedwidth"'); + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?id='.$object->id.'">'.$langs->trans("FullList").'</a>'; } else { print $langs->trans("None"); } @@ -471,31 +536,24 @@ if ($action == 'create') print dol_get_fiche_end(); - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - + /* + * Action bar + */ print "<div class=\"tabsAction\">\n"; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { - if (empty($action)) - { + if (empty($reshook)) { + if (empty($action) || $action == 'classin') { if ($user->rights->stock->creer) { print '<a class="butAction" href="card.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>'; - } - else { + } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("Modify").'</a>'; } if ($user->rights->stock->supprimer) { print '<a class="butActionDelete" href="card.php?action=delete&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Delete").'</a>'; - } - else { + } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("Delete").'</a>'; } } @@ -515,9 +573,11 @@ if ($action == 'create') print "<tr class=\"liste_titre\">"; print_liste_field_titre("Product", "", "p.ref", "&amp;id=".$id, "", "", $sortfield, $sortorder); print_liste_field_titre("Label", "", "p.label", "&amp;id=".$id, "", "", $sortfield, $sortorder); - print_liste_field_titre("Units", "", "ps.reel", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); - if (!empty($conf->global->PRODUCT_USE_UNITS)) print_liste_field_titre("Unit", "", "p.fk_unit", "&amp;id=".$id, "", 'align="left"', $sortfield, $sortorder); - print_liste_field_titre("AverageUnitPricePMPShort", "", "p.pmp", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("NumberOfUnit", "", "ps.reel", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + print_liste_field_titre("Unit", "", "p.fk_unit", "&amp;id=".$id, "", 'align="left"', $sortfield, $sortorder); + } + print_liste_field_titre($form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")), "", "p.pmp", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); print_liste_field_titre("EstimatedStockValueShort", "", "", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); if (empty($conf->global->PRODUIT_MULTIPRICES)) { print_liste_field_titre("SellPriceMin", "", "p.price", "&amp;id=".$id, "", '', $sortfield, $sortorder, 'right '); @@ -538,7 +598,9 @@ if ($action == 'create') $sql = "SELECT p.rowid as rowid, p.ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,"; $sql .= " ps.reel as value"; - if (!empty($conf->global->PRODUCT_USE_UNITS)) $sql .= ",fk_unit"; + if (!empty($conf->global->PRODUCT_USE_UNITS)) { + $sql .= ",fk_unit"; + } $sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE ps.fk_product = p.rowid"; $sql .= " AND ps.reel <> 0"; // We do not show if stock is 0 (no product in this warehouse) @@ -547,17 +609,14 @@ if ($action == 'create') dol_syslog('List products', LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); // Multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) // si l'option est active - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // si l'option est active $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; @@ -565,10 +624,11 @@ if ($action == 'create') $sql .= " LIMIT 1"; $result = $db->query($sql); - if ($result) - { + if ($result) { $objtp = $db->fetch_object($result); - if ($objtp->label != '') $objp->produit = $objtp->label; + if ($objtp->label != '') { + $objp->produit = $objtp->label; + } } } @@ -598,7 +658,9 @@ if ($action == 'create') if (!empty($conf->global->PRODUCT_USE_UNITS)) { // Units print '<td align="left">'; - if (is_null($productstatic->fk_unit))$productstatic->fk_unit = 1; + if (is_null($productstatic->fk_unit)) { + $productstatic->fk_unit = 1; + } print $langs->trans($productstatic->getLabelOfUnit()); print '</td>'; } @@ -610,8 +672,7 @@ if ($action == 'create') $totalvalue += price2num($objp->ppmp * $objp->value, 'MT'); // Price sell min - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { $pricemin = $objp->price; print '<td class="right">'; print price(price2num($pricemin, 'MU'), 1); @@ -623,22 +684,25 @@ if ($action == 'create') } $totalvaluesell += price2num($pricemin * $objp->value, 'MT'); - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">'; - print img_picto($langs->trans("StockMovement"), 'uparrow.png', 'class="hideonsmartphone"').' '.$langs->trans("StockMovement"); + print img_picto($langs->trans("TransferStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"'); + print $langs->trans("TransferStock"); print "</a></td>"; } - if ($user->rights->stock->creer) - { + if ($user->rights->stock->creer) { print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=correction&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">'; - print $langs->trans("StockCorrection"); + print img_picto($langs->trans("CorrectStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"'); + print $langs->trans("CorrectStock"); print "</a></td>"; } if (!empty($conf->global->PRODUCT_USE_UNITS)) { - if ($i == 0) $units = $productstatic->fk_unit; - elseif ($productstatic->fk_unit != $units) $sameunits = false; + if ($i == 0) { + $units = $productstatic->fk_unit; + } elseif ($productstatic->fk_unit != $units) { + $sameunits = false; + } } print "</tr>"; $i++; @@ -648,14 +712,17 @@ if ($action == 'create') print '<tr class="liste_total"><td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>'; print '<td class="liste_total right">'; $valtoshow = price2num($totalunit, 'MS'); - if (empty($conf->global->PRODUCT_USE_UNITS) || $sameunits) print empty($valtoshow) ? '0' : $valtoshow; + if (empty($conf->global->PRODUCT_USE_UNITS) || $sameunits) { + print empty($valtoshow) ? '0' : $valtoshow; + } print '</td>'; print '<td class="liste_total">'; - if (empty($conf->global->PRODUCT_USE_UNITS) && $sameunits) print $langs->trans($productstatic->getLabelOfUnit()); + if (empty($conf->global->PRODUCT_USE_UNITS) && $sameunits) { + print $langs->trans($productstatic->getLabelOfUnit()); + } print '</td>'; print '<td class="liste_total right">'.price(price2num($totalvalue, 'MT')).'</td>'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { print '<td class="liste_total">&nbsp;</td>'; print '<td class="liste_total right">'.price(price2num($totalvaluesell, 'MT')).'</td>'; } @@ -672,8 +739,7 @@ if ($action == 'create') /* * Edition fiche */ - if ($action == 'edit' || $action == 're-edit') - { + if ($action == 'edit' || $action == 're-edit') { $langs->trans("WarehouseEdit"); print '<form action="card.php" method="POST">'; @@ -697,6 +763,16 @@ if ($action == 'create') print $formproduct->selectWarehouses($object->fk_parent, 'fk_parent', '', 1); print '</td></tr>'; + // Project + if (!empty($conf->projet->enabled)) { + $projectid = $object->fk_project; + $langs->load('projects'); + print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; + print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>'; + print '</td></tr>'; + } + // Description print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>'; // Editeur wysiwyg @@ -721,7 +797,9 @@ if ($action == 'create') print '<tr><td>'.$langs->trans('Country').'</td><td>'; print img_picto('', 'globe-americas', 'class="paddingright"'); print $form->select_country($object->country_id ? $object->country_id : $mysoc->country_code, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // Phone / Fax @@ -735,10 +813,8 @@ if ($action == 'create') // Status print '<tr><td>'.$langs->trans("Status").'</td><td>'; print '<select name="statut" class="flat">'; - foreach ($object->statuts as $key => $value) - { - if ($key == $object->statut) - { + foreach ($object->statuts as $key => $value) { + if ($key == $object->statut) { print '<option value="'.$key.'" selected>'.$langs->trans($value).'</option>'; } else { print '<option value="'.$key.'">'.$langs->trans($value).'</option>'; @@ -751,14 +827,12 @@ if ($action == 'create') $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit', $parameters); } // Tags-Categories - if ($conf->categorie->enabled) - { + if ($conf->categorie->enabled) { print '<tr><td class="tdtop">'.$langs->trans("Categories").'</td><td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_WAREHOUSE, '', 'parent', 64, 0, 1); $c = new Categorie($db); @@ -792,8 +866,7 @@ if ($action == 'create') $modulepart = 'stock'; -if ($action != 'create' && $action != 'edit' && $action != 'delete') -{ +if ($action != 'create' && $action != 'edit' && $action != 'delete') { print '<br>'; print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre diff --git a/htdocs/product/stock/class/api_stockmovements.class.php b/htdocs/product/stock/class/api_stockmovements.class.php index dba209e5b6f..90b3895c0f2 100644 --- a/htdocs/product/stock/class/api_stockmovements.class.php +++ b/htdocs/product/stock/class/api_stockmovements.class.php @@ -31,7 +31,7 @@ class StockMovements extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'product_id', 'warehouse_id', 'qty' @@ -63,23 +63,23 @@ class StockMovements extends DolibarrApi * @throws RestException */ /* - public function get($id) - { - if(! DolibarrApiAccess::$user->rights->stock->lire) { - throw new RestException(401); - } + public function get($id) + { + if(! DolibarrApiAccess::$user->rights->stock->lire) { + throw new RestException(401); + } - $result = $this->stockmovement->fetch($id); - if( ! $result ) { - throw new RestException(404, 'warehouse not found'); - } + $result = $this->stockmovement->fetch($id); + if( ! $result ) { + throw new RestException(404, 'warehouse not found'); + } - if( ! DolibarrApi::_checkAccessToResource('warehouse',$this->stockmovement->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('warehouse',$this->stockmovement->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - return $this->_cleanObjectDatas($this->stockmovement); - }*/ + return $this->_cleanObjectDatas($this->stockmovement); + }*/ /** * Get a list of stock movement @@ -108,10 +108,8 @@ class StockMovements extends DolibarrApi //$sql.= ' WHERE t.entity IN ('.getEntity('stock').')'; $sql .= ' WHERE 1 = 1'; // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -120,8 +118,7 @@ class StockMovements extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -130,13 +127,11 @@ class StockMovements extends DolibarrApi } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $i = 0; $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $stockmovement_static = new MouvementStock($this->db); if ($stockmovement_static->fetch($obj->rowid)) { @@ -196,7 +191,9 @@ class StockMovements extends DolibarrApi if ($this->stockmovement->_create(DolibarrApiAccess::$user, $product_id, $warehouse_id, $qty, $type, $price, $movementlabel, $movementcode, '', $eatBy, $sellBy, $lot) <= 0) { $errormessage = $this->stockmovement->error; - if (empty($errormessage)) $errormessage = join(',', $this->stockmovement->errors); + if (empty($errormessage)) { + $errormessage = join(',', $this->stockmovement->errors); + } throw new RestException(503, 'Error when create stock movement : '.$errormessage); } @@ -211,31 +208,31 @@ class StockMovements extends DolibarrApi * @return int */ /* - public function put($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->stock->creer) { - throw new RestException(401); - } + public function put($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->stock->creer) { + throw new RestException(401); + } - $result = $this->stockmovement->fetch($id); - if( ! $result ) { - throw new RestException(404, 'stock movement not found'); - } + $result = $this->stockmovement->fetch($id); + if( ! $result ) { + throw new RestException(404, 'stock movement not found'); + } - if( ! DolibarrApi::_checkAccessToResource('stock',$this->stockmovement->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('stock',$this->stockmovement->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - foreach($request_data as $field => $value) { - if ($field == 'id') continue; - $this->stockmovement->$field = $value; - } + foreach($request_data as $field => $value) { + if ($field == 'id') continue; + $this->stockmovement->$field = $value; + } - if($this->stockmovement->update($id, DolibarrApiAccess::$user)) - return $this->get ($id); + if($this->stockmovement->update($id, DolibarrApiAccess::$user)) + return $this->get ($id); - return false; - }*/ + return false; + }*/ /** * Delete stock movement @@ -244,31 +241,31 @@ class StockMovements extends DolibarrApi * @return array */ /* - public function delete($id) - { - if(! DolibarrApiAccess::$user->rights->stock->supprimer) { - throw new RestException(401); - } - $result = $this->stockmovement->fetch($id); - if( ! $result ) { - throw new RestException(404, 'stock movement not found'); - } + public function delete($id) + { + if(! DolibarrApiAccess::$user->rights->stock->supprimer) { + throw new RestException(401); + } + $result = $this->stockmovement->fetch($id); + if( ! $result ) { + throw new RestException(404, 'stock movement not found'); + } - if( ! DolibarrApi::_checkAccessToResource('stock',$this->stockmovement->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('stock',$this->stockmovement->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if (! $this->stockmovement->delete(DolibarrApiAccess::$user)) { - throw new RestException(401,'error when delete stock movement'); - } + if (! $this->stockmovement->delete(DolibarrApiAccess::$user)) { + throw new RestException(401,'error when delete stock movement'); + } - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Warehouse deleted' - ) - ); - }*/ + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Warehouse deleted' + ) + ); + }*/ @@ -341,8 +338,9 @@ class StockMovements extends DolibarrApi { $stockmovement = array(); foreach (self::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $stockmovement[$field] = $data[$field]; } return $stockmovement; diff --git a/htdocs/product/stock/class/api_warehouses.class.php b/htdocs/product/stock/class/api_warehouses.class.php index d6f2333f3ef..34338232169 100644 --- a/htdocs/product/stock/class/api_warehouses.class.php +++ b/htdocs/product/stock/class/api_warehouses.class.php @@ -31,7 +31,7 @@ class Warehouses extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'label', ); @@ -115,10 +115,8 @@ class Warehouses extends DolibarrApi $sql .= " AND c.fk_warehouse = t.rowid "; } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -127,8 +125,7 @@ class Warehouses extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -137,13 +134,11 @@ class Warehouses extends DolibarrApi } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $i = 0; $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $warehouse_static = new Entrepot($this->db); if ($warehouse_static->fetch($obj->rowid)) { @@ -208,12 +203,15 @@ class Warehouses extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->warehouse->$field = $value; } - if ($this->warehouse->update($id, DolibarrApiAccess::$user)) + if ($this->warehouse->update($id, DolibarrApiAccess::$user)) { return $this->get($id); + } return false; } @@ -282,8 +280,9 @@ class Warehouses extends DolibarrApi { $warehouse = array(); foreach (Warehouses::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $warehouse[$field] = $data[$field]; } return $warehouse; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index f32b2a0e586..8bd250bc76e 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -108,6 +108,11 @@ class Entrepot extends CommonObject */ public $fk_parent; + /** + * @var int ID of project + */ + public $fk_project; + /** * @var array List of short language codes for status */ @@ -124,6 +129,7 @@ class Entrepot extends CommonObject 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-2, 'position'=>35, 'searchall'=>1), 'lieu' =>array('type'=>'varchar(64)', 'label'=>'LocationSummary', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'showoncombobox'=>1, 'searchall'=>1), 'fk_parent' =>array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php:1:statut=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ParentWarehouse', 'enabled'=>1, 'visible'=>-2, 'position'=>41), + 'fk_project' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>25), 'address' =>array('type'=>'varchar(255)', 'label'=>'Address', 'enabled'=>1, 'visible'=>-2, 'position'=>45, 'searchall'=>1), 'zip' =>array('type'=>'varchar(10)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>-2, 'position'=>50, 'searchall'=>1), 'town' =>array('type'=>'varchar(50)', 'label'=>'Town', 'enabled'=>1, 'visible'=>-2, 'position'=>55, 'searchall'=>1), @@ -198,42 +204,34 @@ class Entrepot extends CommonObject $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (ref, entity, datec, fk_user_author, fk_parent)"; - $sql .= " VALUES ('".$this->db->escape($this->label)."', ".$conf->entity.", '".$this->db->idate($now)."', ".$user->id.", ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (ref, entity, datec, fk_user_author, fk_parent, fk_project)"; + $sql .= " VALUES ('".$this->db->escape($this->label)."', ".$conf->entity.", '".$this->db->idate($now)."', ".$user->id.", ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").", ".($this->fk_project > 0 ? $this->fk_project : "NULL").")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $id = $this->db->last_insert_id(MAIN_DB_PREFIX."entrepot"); - if ($id > 0) - { + if ($id > 0) { $this->id = $id; - if (!$error) - { + if (!$error) { $result = $this->update($id, $user); - if ($result <= 0) - { + if ($result <= 0) { $error++; } } // Actions on extra fields - if (!$error) - { - if (!$error) - { + if (!$error) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } } - if (!$error) - { + if (!$error) { $this->db->commit(); return $id; } else { @@ -267,16 +265,18 @@ class Entrepot extends CommonObject $error = 0; - if (empty($id)) $id = $this->id; - if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility + if (empty($id)) { + $id = $this->id; + } + if (empty($this->label)) { + $this->label = $this->libelle; // For backward compatibility + } // Check if new parent is already a child of current warehouse - if (!empty($this->fk_parent)) - { + if (!empty($this->fk_parent)) { $TChildWarehouses = array($id); $TChildWarehouses = $this->get_children_warehouses($this->id, $TChildWarehouses); - if (in_array($this->fk_parent, $TChildWarehouses)) - { + if (in_array($this->fk_parent, $TChildWarehouses)) { $this->error = 'ErrorCannotAddThisParentWarehouse'; return -2; } @@ -296,6 +296,7 @@ class Entrepot extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; $sql .= " SET ref = '".$this->db->escape($this->label)."'"; $sql .= ", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent : "NULL"); + $sql .= ", fk_project = ".(($this->fk_project > 0) ? $this->fk_project : "NULL"); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", statut = ".$this->statut; $sql .= ", lieu = '".$this->db->escape($this->lieu)."'"; @@ -305,7 +306,7 @@ class Entrepot extends CommonObject $sql .= ", fk_pays = ".$this->country_id; $sql .= ", phone = '".$this->db->escape($this->phone)."'"; $sql .= ", fax = '".$this->db->escape($this->fax)."'"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); $this->db->begin(); @@ -319,8 +320,7 @@ class Entrepot extends CommonObject if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } @@ -353,25 +353,23 @@ class Entrepot extends CommonObject $this->db->begin(); - if (!$error && empty($notrigger)) - { + if (!$error && empty($notrigger)) { // Call trigger $result = $this->call_trigger('WAREHOUSE_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } $elements = array('stock_mouvement', 'product_stock', 'product_warehouse_properties'); - foreach ($elements as $table) - { - if (!$error) - { + foreach ($elements as $table) { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE fk_entrepot = ".$this->id; $result = $this->db->query($sql); - if (!$result) - { + if (!$result) { $error++; $this->errors[] = $this->db->lasterror(); } @@ -379,47 +377,39 @@ class Entrepot extends CommonObject } // Removed extrafields - if (!$error) - { - if (!$error) - { + if (!$error) { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete Error ".$this->error, LOG_ERR); } } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."entrepot"; $sql .= " WHERE rowid = ".$this->id; $resql1 = $this->db->query($sql); - if (!$resql1) - { + if (!$resql1) { $error++; $this->errors[] = $this->db->lasterror(); dol_syslog(get_class($this)."::delete Error ".$this->db->lasterror(), LOG_ERR); } } - if (!$error) - { + if (!$error) { // Update denormalized fields because we change content of produt_stock. Warning: Do not use "SET p.stock", does not works with pgsql $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET stock = (SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock as ps WHERE ps.fk_product = p.rowid)"; $resql2 = $this->db->query($sql); - if (!$resql2) - { + if (!$resql2) { $error++; $this->errors[] = $this->db->lasterror(); dol_syslog(get_class($this)."::delete Error ".$this->db->lasterror(), LOG_ERR); } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -443,34 +433,33 @@ class Entrepot extends CommonObject dol_syslog(get_class($this)."::fetch id=".$id." ref=".$ref); // Check parameters - if (!$id && !$ref) - { + if (!$id && !$ref) { $this->error = 'ErrorWrongParameters'; dol_syslog(get_class($this)."::fetch ".$this->error); return -1; } - $sql = "SELECT rowid, entity, fk_parent, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax,"; + $sql = "SELECT rowid, entity, fk_parent, fk_project, ref as label, description, statut, lieu, address, zip, town, fk_pays as country_id, phone, fax,"; $sql .= " model_pdf, import_key"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; - if ($id) - { - $sql .= " WHERE rowid = '".$id."'"; + if ($id) { + $sql .= " WHERE rowid = ".((int) $id); } else { $sql .= " WHERE entity = ".$conf->entity; - if ($ref) $sql .= " AND ref = '".$this->db->escape($ref)."'"; + if ($ref) { + $sql .= " AND ref = '".$this->db->escape($ref)."'"; + } } $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result) > 0) - { + if ($result) { + if ($this->db->num_rows($result) > 0) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; $this->entity = $obj->entity; $this->fk_parent = $obj->fk_parent; + $this->fk_project = $obj->fk_project; $this->ref = $obj->label; $this->label = $obj->label; $this->libelle = $obj->label; // deprecated @@ -518,14 +507,12 @@ class Entrepot extends CommonObject { $sql = "SELECT e.rowid, e.datec, e.tms as datem, e.fk_user_author"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; - $sql .= " WHERE e.rowid = ".$id; + $sql .= " WHERE e.rowid = ".((int) $id); dol_syslog(get_class($this)."::info", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -568,15 +555,13 @@ class Entrepot extends CommonObject $sql = "SELECT rowid, ref as label"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; $sql .= " WHERE entity IN (".getEntity('stock').")"; - $sql .= " AND statut = ".$status; + $sql .= " AND statut = ".((int) $status); $result = $this->db->query($sql); $i = 0; $num = $this->db->num_rows($result); - if ($result) - { - while ($i < $num) - { + if ($result) { + while ($i < $num) { $row = $this->db->fetch_row($result); $liste[$row[0]] = $row[1]; $i++; @@ -605,8 +590,7 @@ class Entrepot extends CommonObject //print $sql; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); $ret['nb'] = $obj->nb; $this->db->free($result); @@ -637,8 +621,7 @@ class Entrepot extends CommonObject //print $sql; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $obj = $this->db->fetch_object($result); $ret['nb'] = $obj->nb; $ret['value'] = $obj->value; @@ -676,7 +659,9 @@ class Entrepot extends CommonObject global $langs; $statusType = 'status5'; - if ($status > 0) $statusType = 'status4'; + if ($status > 0) { + $statusType = 'status4'; + } $langs->load('stocks'); $label = $langs->trans($this->statuts[$status]); @@ -700,9 +685,13 @@ class Entrepot extends CommonObject global $conf, $langs, $hookmanager; $langs->load("stocks"); - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) $withpicto = 0; + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) { + $withpicto = 0; + } $result = ''; @@ -718,10 +707,8 @@ class Entrepot extends CommonObject $url = DOL_URL_ROOT.'/product/stock/card.php?id='.$this->id; $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Warehouse"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -734,8 +721,12 @@ class Entrepot extends CommonObject $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= (($showfullpath || !empty($conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO)) ? $this->get_full_arbo() : (empty($this->label) ? $this->libelle : $this->label)); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= (($showfullpath || !empty($conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO)) ? $this->get_full_arbo() : (empty($this->label) ? $this->libelle : $this->label)); + } $result .= $linkend; global $action; @@ -798,20 +789,21 @@ class Entrepot extends CommonObject $parentid = $this->fk_parent; // If parent_id not defined on current object, we do not start consecutive searches of parents $i = 0; - while ($parentid > 0 && $i < $protection) - { - $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'entrepot WHERE rowid = '.$parentid; + while ($parentid > 0 && $i < $protection) { + $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'entrepot WHERE rowid = '.((int) $parentid); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $objarbo = $this->db->fetch_object($resql); - if ($objarbo) - { + if ($objarbo) { $warehousetmp->fetch($parentid); $TArbo[] = $warehousetmp->label; - $parentid = $objarbo->fk_parent; - } else break; - } else dol_print_error($this->db); + $parentid = $objarbo->fk_parent; + } else { + break; + } + } else { + dol_print_error($this->db); + } $i++; } @@ -833,7 +825,7 @@ class Entrepot extends CommonObject $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'entrepot - WHERE fk_parent = '.$id; + WHERE fk_parent = '.((int) $id); $resql = $this->db->query($sql); if ($resql) { @@ -890,39 +882,7 @@ class Entrepot extends CommonObject */ public function setCategories($categories) { - $type_categ = Categorie::TYPE_WAREHOUSE; - - // Handle single category - if (!is_array($categories)) { - $categories = array($categories); - } - - // Get current categories require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $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; - } - - // 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) { - $c->add_type($this, $type_categ); - } - } - - return; + return parent::setCategoriesCommon($categories, Categorie::TYPE_WAREHOUSE); } } diff --git a/htdocs/product/stock/class/index.html b/htdocs/product/stock/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 2429a4c09c5..d8dad67bee2 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -159,6 +159,40 @@ class MouvementStock extends CommonObject $error = 0; dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse_id=$entrepot_id, qty=$qty, type=$type, price=$price, label=$label, inventorycode=$inventorycode, datem=".$datem.", eatby=".$eatby.", sellby=".$sellby.", batch=".$batch.", skip_batch=".$skip_batch); + // start hook at beginning + global $action, $hookmanager; + $hookmanager->initHooks(array('mouvementstock')); + // Hook of thirdparty module + if (is_object($hookmanager)) { + $parameters = array( + 'currentcontext' => 'mouvementstock', + 'user' => &$user, + 'fk_product' => &$fk_product, + 'entrepot_id' => &$entrepot_id, + 'qty' => &$qty, + 'type' => &$type, + 'price' => &$price, + 'label' => &$label, + 'inventorycode' => &$inventorycode, + 'datem' => &$datem, + 'eatby' => &$eatby, + 'sellby' => &$sellby, + 'batch' => &$batch, + 'skip_batch' => &$skip_batch, + 'id_product_batch' => &$id_product_batch + ); + $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + + if ($reshook < 0) { + if (!empty($hookmanager->resPrint)) + dol_print_error('', $hookmanager->resPrint); + return $reshook; + } elseif ($reshook > 0) { + return $hookmanager->resPrint; + } + } + // end hook at beginning + // Clean parameters $price = price2num($price, 'MU'); // Clean value for the casse we receive a float zero value, to have it a real zero value. if (empty($price)) $price = 0; @@ -454,7 +488,7 @@ class MouvementStock extends CommonObject if (!$error) { $sql = "SELECT rowid, reel FROM ".MAIN_DB_PREFIX."product_stock"; - $sql .= " WHERE fk_entrepot = ".$entrepot_id." AND fk_product = ".$fk_product; // This is a unique key + $sql .= " WHERE fk_entrepot = ".((int) $entrepot_id)." AND fk_product = ".((int) $fk_product); // This is a unique key dol_syslog(get_class($this)."::_create check if a record already exists in product_stock", LOG_DEBUG); $resql = $this->db->query($sql); @@ -510,12 +544,12 @@ class MouvementStock extends CommonObject { if ($alreadyarecord > 0) { - $sql = "UPDATE ".MAIN_DB_PREFIX."product_stock SET reel = reel + ".$qty; - $sql .= " WHERE fk_entrepot = ".$entrepot_id." AND fk_product = ".$fk_product; + $sql = "UPDATE ".MAIN_DB_PREFIX."product_stock SET reel = reel + ".((float) $qty); + $sql .= " WHERE fk_entrepot = ".((int) $entrepot_id)." AND fk_product = ".((int) $fk_product); } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_stock"; $sql .= " (reel, fk_entrepot, fk_product) VALUES "; - $sql .= " (".$qty.", ".$entrepot_id.", ".$fk_product.")"; + $sql .= " (".((float) $qty).", ".((int) $entrepot_id).", ".((int) $fk_product).")"; } dol_syslog(get_class($this)."::_create update stock value", LOG_DEBUG); @@ -534,14 +568,32 @@ class MouvementStock extends CommonObject // Update detail stock for batch product if (!$error && !empty($conf->productbatch->enabled) && $product->hasbatch() && !$skip_batch) { - if ($id_product_batch > 0) + // check unicity for serial numbered equipments ( different for lots managed products) + if ( $product->status_batch == 2 && $qty > 0 ) { - $result = $this->createBatch($id_product_batch, $qty); - } else { - $param_batch = array('fk_product_stock' =>$fk_product_stock, 'batchnumber'=>$batch); - $result = $this->createBatch($param_batch, $qty); + if ( $this->getBatchCount($fk_product, $batch) > 0 ) + { + $error++; + $this->errors[] = $langs->trans("SerialNumberAlreadyInUse", $batch, $product->ref); + } + elseif ( $qty > 1 ) + { + $error++; + $this->errors[] = $langs->trans("TooManyQtyForSerialNumber", $product->ref, $batch); + } + } + + if ( ! $error ) + { + if ($id_product_batch > 0) + { + $result = $this->createBatch($id_product_batch, $qty); + } else { + $param_batch = array('fk_product_stock' =>$fk_product_stock, 'batchnumber'=>$batch); + $result = $this->createBatch($param_batch, $qty); + } + if ($result < 0) $error++; } - if ($result < 0) $error++; } // Update PMP and denormalized value of stock qty at product level @@ -550,11 +602,11 @@ class MouvementStock extends CommonObject $newpmp = price2num($newpmp, 'MU'); // $sql = "UPDATE ".MAIN_DB_PREFIX."product SET pmp = ".$newpmp.", stock = ".$this->db->ifsql("stock IS NULL", 0, "stock") . " + ".$qty; - // $sql.= " WHERE rowid = ".$fk_product; + // $sql.= " WHERE rowid = ".((int) $fk_product); // Update pmp + denormalized fields because we change content of produt_stock. Warning: Do not use "SET p.stock", does not works with pgsql - $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = ".$newpmp.","; + $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = ".((float) $newpmp).","; $sql .= " stock=(SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock as ps WHERE ps.fk_product = p.rowid)"; - $sql .= " WHERE rowid = ".$fk_product; + $sql .= " WHERE rowid = ".((int) $fk_product); dol_syslog(get_class($this)."::_create update AWP", LOG_DEBUG); $resql = $this->db->query($sql); @@ -635,7 +687,7 @@ class MouvementStock extends CommonObject //if (null !== $ref) { //$sql .= ' AND t.ref = ' . '\'' . $ref . '\''; //} else { - $sql .= ' AND t.rowid = '.$id; + $sql .= ' AND t.rowid = '.((int) $id); //} $resql = $this->db->query($sql); @@ -666,7 +718,6 @@ class MouvementStock extends CommonObject } // Retrieve all extrafield - // fetch optionals attributes and labels $this->fetch_optionals(); // $this->fetch_lines(); @@ -712,7 +763,7 @@ class MouvementStock extends CommonObject $sql = "SELECT fk_product_pere, fk_product_fils, qty"; $sql .= " FROM ".MAIN_DB_PREFIX."product_association"; - $sql .= " WHERE fk_product_pere = ".$idProduct; + $sql .= " WHERE fk_product_pere = ".((int) $idProduct); $sql .= " AND incdec = 1"; dol_syslog(get_class($this)."::_createSubProduct for parent product ".$idProduct, LOG_DEBUG); @@ -824,7 +875,7 @@ class MouvementStock extends CommonObject $nbSP=0; $resql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."product_association"; - $resql.= " WHERE fk_product_pere = ".$id; + $resql.= " WHERE fk_product_pere = ".((int) $id); if ($this->db->query($resql)) { $obj=$this->db->fetch_object($resql); @@ -845,7 +896,7 @@ class MouvementStock extends CommonObject $nb = 0; $sql = 'SELECT SUM(value) as nb from '.MAIN_DB_PREFIX.'stock_mouvement'; - $sql .= ' WHERE fk_product = '.$productidselected; + $sql .= ' WHERE fk_product = '.((int) $productidselected); $sql .= " AND datem < '".$this->db->idate($datebefore)."'"; dol_syslog(get_class($this).__METHOD__.'', LOG_DEBUG); @@ -987,15 +1038,13 @@ class MouvementStock extends CommonObject break; default: - if ($origintype) - { + if ($origintype) { // Separate originetype with "@" : left part is class name, right part is module name $origintype_array = explode('@', $origintype); $classname = ucfirst($origintype_array[0]); $modulename = empty($origintype_array[1]) ? $classname : $origintype_array[1]; $result = dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php'); - if ($result) - { + if ($result) { $classname = ucfirst($classname); $origin = new $classname($this->db); } @@ -1003,7 +1052,9 @@ class MouvementStock extends CommonObject break; } - if (empty($origin) || !is_object($origin)) return ''; + if (empty($origin) || !is_object($origin)) { + return ''; + } if ($origin->fetch($fk_origin) > 0) { return $origin->getNomUrl(1); @@ -1022,17 +1073,16 @@ class MouvementStock extends CommonObject */ public function setOrigin($origin_element, $origin_id) { - if (!empty($origin_element) && $origin_id > 0) - { + if (!empty($origin_element) && $origin_id > 0) { $origin = ''; - if ($origin_element == 'project') - { - if (!class_exists('Project')) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + if ($origin_element == 'project') { + if (!class_exists('Project')) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + } $origin = new Project($this->db); } - if (!empty($origin)) - { + if (!empty($origin)) { $this->origin = $origin; $this->origin->id = $origin_id; } @@ -1057,6 +1107,47 @@ class MouvementStock extends CommonObject // There is no specific properties. All data into insert are provided as method parameter. } + /** + * Return html string with picto for type of movement + * + * @param int $withlabel With label + * @return string String with URL + */ + public function getTypeMovement($withlabel = 0) + { + global $langs; + + $s = ''; + switch ($this->type) { + case "0": + $s = '<span class="fa fa-level-down-alt stockmovemententry stockmovementtransfer" title="'.$langs->trans('StockIncreaseAfterCorrectTransfer').'"></span>'; + if ($withlabel) { + $s .= $langs->trans('StockIncreaseAfterCorrectTransfer'); + } + break; + case "1": + $s = '<span class="fa fa-level-up-alt stockmovementexit stockmovementtransfer" title="'.$langs->trans('StockDecreaseAfterCorrectTransfer').'"></span>'; + if ($withlabel) { + $s .= $langs->trans('StockDecreaseAfterCorrectTransfer'); + } + break; + case "2": + $s = '<span class="fa fa-long-arrow-alt-up stockmovementexit stockmovement" title="'.$langs->trans('StockDecrease').'"></span>'; + if ($withlabel) { + $s .= $langs->trans('StockDecrease'); + } + break; + case "3": + $s = '<span class="fa fa-long-arrow-alt-down stockmovemententry stockmovement" title="'.$langs->trans('StockIncrease').'"></span>'; + if ($withlabel) { + $s .= $langs->trans('StockIncrease'); + } + break; + } + + return $s; + } + /** * Return a link (with optionaly the picto) * Use this->id,this->lastname, this->firstname @@ -1086,10 +1177,11 @@ class MouvementStock extends CommonObject $link .= '>'; $linkend = '</a>'; - if ($withpicto) - { + if ($withpicto) { $result .= ($link.img_object(($notooltip ? '' : $label), 'stock', ($notooltip ? '' : 'class="classfortooltip"')).$linkend); - if ($withpicto != 2) $result .= ' '; + if ($withpicto != 2) { + $result .= ' '; + } } $result .= $link.$this->id.$linkend; return $result; @@ -1175,4 +1267,39 @@ class MouvementStock extends CommonObject return $this->deleteCommon($user, $notrigger); //return $this->deleteCommon($user, $notrigger, 1); } + + /** + * Retrieve number of equipments for a product batch + * + * @param int $fk_product Product id + * @param varchar $batch batch number + * @return int <0 if KO, number of equipments if OK + */ + private function getBatchCount($fk_product, $batch) + { + global $conf; + + $cpt = 0; + + $sql = "SELECT sum(pb.qty) as cpt"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_batch as pb"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."product_stock as ps ON ps.rowid = pb.fk_product_stock"; + $sql .= " WHERE ps.fk_product = " . ((int) $fk_product); + $sql .= " AND pb.batch = '" . $this->db->escape($batch) . "'"; + + $result = $this->db->query($sql); + if ($result) { + if ($this->db->num_rows($result)) { + $obj = $this->db->fetch_object($result); + $cpt = $obj->cpt; + } + + $this->db->free($result); + } else { + dol_print_error($this->db); + return -1; + } + + return $cpt; + } } diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 3e7c23a6e92..f05d6ebc168 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -95,7 +95,8 @@ class Productlot extends CommonObject 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_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_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), ); /** @@ -214,11 +215,9 @@ class Productlot extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } @@ -229,7 +228,9 @@ class Productlot extends CommonObject // Call triggers $result = $this->call_trigger('PRODUCTLOT_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } @@ -274,9 +275,9 @@ class Productlot extends CommonObject $sql .= " t.import_key"; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; if ($product_id > 0 && $batch != '') { - $sql .= " WHERE t.batch = '".$this->db->escape($batch)."' AND t.fk_product = ".$product_id; + $sql .= " WHERE t.batch = '".$this->db->escape($batch)."' AND t.fk_product = ".((int) $product_id); } else { - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); } $resql = $this->db->query($sql); @@ -357,8 +358,7 @@ class Productlot extends CommonObject // Check parameters // Put here code to add a control on parameters values - if (empty($this->oldcopy)) - { + if (empty($this->oldcopy)) { $org = new self($this->db); $org->fetch($this->id); $this->oldcopy = $org; @@ -376,7 +376,7 @@ class Productlot extends CommonObject $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").','; $sql .= ' import_key = '.(isset($this->import_key) ? $this->import_key : "null"); - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -388,11 +388,9 @@ class Productlot extends CommonObject } // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } @@ -400,7 +398,9 @@ class Productlot extends CommonObject if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('PRODUCTLOT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } @@ -446,7 +446,7 @@ class Productlot extends CommonObject if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -568,47 +568,60 @@ class Productlot extends CommonObject $result = ''; - $label = '<u>'.$langs->trans("Batch").'</u>'; + $label = img_picto('', $this->picto).' <u>'.$langs->trans("Batch").'</u>'; $label .= '<div width="100%">'; $label .= '<b>'.$langs->trans('Batch').':</b> '.$this->batch; - if ($this->eatby) - { + if ($this->eatby && empty($conf->global->PRODUCT_DISABLE_EATBY)) { $label .= '<br><b>'.$langs->trans('EatByDate').':</b> '.dol_print_date($this->eatby, 'day'); } - if ($this->sellby) - { + if ($this->sellby && empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $label .= '<br><b>'.$langs->trans('SellByDate').':</b> '.dol_print_date($this->sellby, 'day'); } $url = DOL_URL_ROOT.'/product/stock/productlot_card.php?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + 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.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } - $linkstart = '<a href="'.$url.'"'; + if ($option == 'nolink') { + $linkstart = '<span'; + } else { + $linkstart = '<a href="'.$url.'"'; + } $linkstart .= $linkclose.'>'; - $linkend = '</a>'; + if ($option == 'nolink') { + $linkend = '</span>'; + } else { + $linkend = '</a>'; + } $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->batch; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->batch; + } $result .= $linkend; return $result; diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index ad36dc43c15..aea8c3e1f14 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -93,11 +93,21 @@ class ProductStockEntrepot extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = (int) $this->fk_product; - if (isset($this->fk_entrepot)) $this->fk_entrepot = (int) $this->fk_entrepot; - if (isset($this->seuil_stock_alerte)) $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); - if (isset($this->desiredstock)) $this->desiredstock = trim($this->desiredstock); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->fk_product)) { + $this->fk_product = (int) $this->fk_product; + } + if (isset($this->fk_entrepot)) { + $this->fk_entrepot = (int) $this->fk_entrepot; + } + if (isset($this->seuil_stock_alerte)) { + $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); + } + if (isset($this->desiredstock)) { + $this->desiredstock = trim($this->desiredstock); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } // Check parameters // Put here code to add control on parameters values @@ -168,7 +178,9 @@ class ProductStockEntrepot extends CommonObject */ public function fetch($id, $fk_product = 0, $fk_entrepot = 0) { - if (empty($id) && (empty($fk_product) || empty($fk_entrepot))) return -1; + if (empty($id) && (empty($fk_product) || empty($fk_entrepot))) { + return -1; + } dol_syslog(__METHOD__, LOG_DEBUG); @@ -181,15 +193,16 @@ class ProductStockEntrepot extends CommonObject $sql .= " t.desiredstock,"; $sql .= " t.import_key"; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (!empty($id)) $sql .= ' WHERE t.rowid = '.$id; - else $sql .= ' WHERE t.fk_product = '.$fk_product.' AND t.fk_entrepot = '.$fk_entrepot; + if (!empty($id)) { + $sql .= ' WHERE t.rowid = '.((int) $id); + } else { + $sql .= ' WHERE t.fk_product = '.((int) $fk_product).' AND t.fk_entrepot = '.((int) $fk_entrepot); + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $numrows = $this->db->num_rows($resql); - if ($numrows) - { + if ($numrows) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -263,14 +276,23 @@ class ProductStockEntrepot extends CommonObject $sqlwhere [] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } - if (count($sqlwhere) > 0) $sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere); + if (count($sqlwhere) > 0) { + $sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere); + } - if (!empty($fk_product)) $sql .= ' AND fk_product = '.$fk_product; - elseif (!empty($fk_entrepot)) $sql .= ' AND fk_entrepot = '.$fk_entrepot; + if (!empty($fk_product)) { + $sql .= ' AND fk_product = '.$fk_product; + } elseif (!empty($fk_entrepot)) { + $sql .= ' AND fk_entrepot = '.$fk_entrepot; + } // "elseif" used instead of "if" because getting list with specified fk_product and specified fk_entrepot would be the same as doing a fetch - if (!empty($sortfield)) $sql .= $this->db->order($sortfield, $sortorder); - if (!empty($limit)) $sql .= ' '.$this->db->plimit($limit, $offset); + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit, $offset); + } $lines = array(); @@ -312,11 +334,21 @@ class ProductStockEntrepot extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = (int) $this->fk_product; - if (isset($this->fk_entrepot)) $this->fk_entrepot = (int) $this->fk_entrepot; - if (isset($this->seuil_stock_alerte)) $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); - if (isset($this->desiredstock)) $this->desiredstock = trim($this->desiredstock); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->fk_product)) { + $this->fk_product = (int) $this->fk_product; + } + if (isset($this->fk_entrepot)) { + $this->fk_entrepot = (int) $this->fk_entrepot; + } + if (isset($this->seuil_stock_alerte)) { + $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); + } + if (isset($this->desiredstock)) { + $this->desiredstock = trim($this->desiredstock); + } + if (isset($this->import_key)) { + $this->import_key = trim($this->import_key); + } // Check parameters @@ -333,7 +365,7 @@ class ProductStockEntrepot extends CommonObject $sql .= ' import_key = '.(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -394,7 +426,7 @@ class ProductStockEntrepot extends CommonObject if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -495,10 +527,11 @@ class ProductStockEntrepot extends CommonObject $link .= '>'; $linkend = '</a>'; - if ($withpicto) - { + if ($withpicto) { $result .= ($link.img_object(($notooltip ? '' : $label), 'label', ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend); - if ($withpicto != 2) $result .= ' '; + if ($withpicto != 2) { + $result .= ' '; + } } $result .= $link.$this->ref.$linkend; return $result; @@ -528,30 +561,42 @@ class ProductStockEntrepot extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) - { - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } elseif ($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'); + if ($mode == 0) { + if ($status == 1) { + return $langs->trans('Enabled'); + } elseif ($status == 0) { + return $langs->trans('Disabled'); + } + } elseif ($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'); + } } } diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index 55ac057985b..a2a15a34e53 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -28,7 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php'; // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'companies')); -$mesg = ''; + +$id = GETPOST('id', 'int'); // Security check $result = restrictedArea($user, 'stock'); @@ -43,18 +44,13 @@ $form = new Form($db); $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks'; llxHeader("", $langs->trans("WarehouseCard"), $help_url); -if ($_GET["id"]) -{ - if ($mesg) print $mesg; - +if ($id > 0) { $entrepot = new Entrepot($db); - $result = $entrepot->fetch($_GET["id"]); - if ($result < 0) - { + $result = $entrepot->fetch($id); + if ($result < 0) { dol_print_error($db); } - $head = stock_prepare_head($entrepot); print dol_get_fiche_head($head, 'value', $langs->trans("Warehouse"), 0, 'stock'); @@ -120,13 +116,11 @@ if ($_GET["id"]) - if (file_exists($file)) - { + if (file_exists($file)) { $url = DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$entrepot->id.'-'.$year.'.png'; print '<img src="'.$url.'" alt="Valorisation du stock annee '.($year).'">'; - if (file_exists(DOL_DATA_ROOT.'/entrepot/temp/entrepot-'.$entrepot->id.'-'.($year - 1).'.png')) - { + if (file_exists(DOL_DATA_ROOT.'/entrepot/temp/entrepot-'.$entrepot->id.'-'.($year - 1).'.png')) { $url = DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$entrepot->id.'-'.($year - 1).'.png'; print '<br><img src="'.$url.'" alt="Valorisation du stock annee '.($year - 1).'">'; } diff --git a/htdocs/product/stock/img/index.html b/htdocs/product/stock/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 1c93d1ee943..b64068df48b 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -28,6 +28,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; $hookmanager = new HookManager($db); @@ -59,8 +60,7 @@ print load_fiche_titre($langs->trans("StocksArea"), '', 'stock'); print '<div class="fichecenter"><div class="fichethirdleft">'; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo print '<form method="post" action="'.DOL_URL_ROOT.'/product/stock/list.php">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<div class="div-table-responsive-no-min">'; @@ -83,8 +83,7 @@ $sql .= $db->plimit($max + 1, 0); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); print '<div class="div-table-responsive-no-min">'; @@ -101,10 +100,8 @@ if ($result) print '</tr>'; $i = 0; - if ($num) - { - while ($i < min($max, $num)) - { + if ($num) { + while ($i < min($max, $num)) { $objp = $db->fetch_object($result); $warehouse->id = $objp->rowid; @@ -152,14 +149,15 @@ $sql .= ", ".MAIN_DB_PREFIX."product as p"; $sql .= " WHERE m.fk_product = p.rowid"; $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; -if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = ".Product::TYPE_PRODUCT; +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = ".Product::TYPE_PRODUCT; +} $sql .= $db->order("datem", "DESC"); $sql .= $db->plimit($max, 0); dol_syslog("Index:list stock movements", LOG_DEBUG); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); print '<div class="div-table-responsive-no-min">'; @@ -167,23 +165,23 @@ if ($resql) print "<tr class=\"liste_titre\">"; print '<th>'.$langs->trans("LastMovements", min($num, $max)).'</th>'; print '<th>'.$langs->trans("Product").'</th>'; - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print '<th>'.$langs->trans("Batch").'</th>'; - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + /*if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print '<th>'.$langs->trans("SellByDate").'</th>'; } if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print '<th>'.$langs->trans("EatByDate").'</th>'; - } + }*/ } print '<th>'.$langs->trans("Warehouse").'</th>'; print '<th class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/product/stock/movement_list.php">'.$langs->trans("FullList").'</a></th>'; print "</tr>\n"; + $tmplotstatic = new Productlot($db); + $i = 0; - while ($i < min($num, $max)) - { + while ($i < min($num, $max)) { $objp = $db->fetch_object($resql); $producttmp->id = $objp->rowid; @@ -198,26 +196,33 @@ if ($resql) $warehouse->label = $objp->warehouse_label; $warehouse->lieu = $objp->lieu; + $tmplotstatic->batch = $objp->batch; + $tmplotstatic->sellby = $objp->sellby; + $tmplotstatic->eatby = $objp->eatby; + print '<tr class="oddeven">'; print '<td class="nowraponall">'.dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>'; print '<td class="tdoverflowmax200">'; print $producttmp->getNomUrl(1); print "</td>\n"; - if (!empty($conf->productbatch->enabled)) - { - print '<td>'.$objp->batch.'</td>'; - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (!empty($conf->productbatch->enabled)) { + print '<td>'; + print $tmplotstatic->getNomUrl(0, 'nolink'); + print '</td>'; + /*if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print '<td>'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>'; } if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print '<td>'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>'; - } + }*/ } print '<td class="tdoverflowmax200">'; print $warehouse->getNomUrl(1); print "</td>\n"; print '<td class="right">'; - if ($objp->qty > 0) print '+'; + if ($objp->qty > 0) { + print '+'; + } print $objp->qty.'</td>'; print "</tr>\n"; $i++; diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 884deaaefff..84c0111f290 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -60,7 +60,9 @@ $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref .= '</div>'; $shownav = 1; -if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; +if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; +} dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/product/stock/lib/index.html b/htdocs/product/stock/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/product/stock/lib/replenishment.lib.php b/htdocs/product/stock/lib/replenishment.lib.php index b6ce237a2b5..1faa67ad860 100644 --- a/htdocs/product/stock/lib/replenishment.lib.php +++ b/htdocs/product/stock/lib/replenishment.lib.php @@ -39,34 +39,37 @@ function dolDispatchToDo($order_id) // Count nb of quantity dispatched per product $sql = 'SELECT fk_product, SUM(qty) FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; - $sql .= ' WHERE fk_commande = '.$order_id; + $sql .= ' WHERE fk_commande = '.((int) $order_id); $sql .= ' GROUP BY fk_product'; $sql .= ' ORDER by fk_product'; $resql = $db->query($sql); - if ($resql && $db->num_rows($resql)) - { - while ($obj = $db->fetch_object($resql)) + if ($resql && $db->num_rows($resql)) { + while ($obj = $db->fetch_object($resql)) { $dispatched[$obj->fk_product] = $obj; + } } // Count nb of quantity to dispatch per product $sql = 'SELECT fk_product, SUM(qty) FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet'; - $sql .= ' WHERE fk_commande = '.$order_id; + $sql .= ' WHERE fk_commande = '.((int) $order_id); $sql .= ' AND fk_product > 0'; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= ' AND product_type = 0'; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= ' AND product_type = 0'; + } $sql .= ' GROUP BY fk_product'; $sql .= ' ORDER by fk_product'; $resql = $db->query($sql); - if ($resql && $db->num_rows($resql)) - { - while ($obj = $db->fetch_object($resql)) + if ($resql && $db->num_rows($resql)) { + while ($obj = $db->fetch_object($resql)) { $ordered[$obj->fk_product] = $obj; + } } $todispatch = 0; - foreach ($ordered as $key => $val) - { - if ($ordered[$key] > $dispatched[$key]) $todispatch++; + foreach ($ordered as $key => $val) { + if ($ordered[$key] > $dispatched[$key]) { + $todispatch++; + } } return ($todispatch ? true : false); @@ -85,19 +88,15 @@ function dispatchedOrders() $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'commande_fournisseur'; $resql = $db->query($sql); $resarray = array(); - if ($resql && $db->num_rows($resql) > 0) - { - while ($obj = $db->fetch_object($resql)) - { - if (!dolDispatchToDo($obj->rowid)) - { + if ($resql && $db->num_rows($resql) > 0) { + while ($obj = $db->fetch_object($resql)) { + if (!dolDispatchToDo($obj->rowid)) { $resarray[] = $obj->rowid; } } } - if (count($resarray)) - { + if (count($resarray)) { $res = '('.implode(',', $resarray).')'; } else { //hack to make sure ordered SQL request won't syntax error @@ -131,11 +130,9 @@ function ordered($product_id) $sql .= ' GROUP BY cfd.fk_product'; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $exists = $db->num_rows($resql); - if ($exists) - { + if ($exists) { $obj = $db->fetch_array($resql); return $obj['qty']; //. ' ' . img_picto('','tick'); } else { diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 6aec9bd2307..d49db2f7b02 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -28,8 +28,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } @@ -46,14 +45,15 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'stocklist'; // 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') +$toselect = GETPOST('toselect', 'array'); + $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST("sref", "alpha") ?GETPOST("sref", "alpha") : GETPOST("search_ref", "alpha"); $search_label = GETPOST("snom", "alpha") ?GETPOST("snom", "alpha") : GETPOST("search_label", "alpha"); $search_status = GETPOST("search_status", "int"); -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $search_category_list = GETPOST("search_category_".Categorie::TYPE_WAREHOUSE."_list", "array"); } @@ -62,12 +62,18 @@ $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 +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 = "t.ref"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Security check $result = restrictedArea($user, 'stock'); @@ -87,18 +93,22 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $search_all = GETPOST("search_all", 'alpha'); $search = array(); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { $search_key = $key; - if ($search_key == 'statut') $search_key = 'status'; // remove this after refactor entrepot.class property statut to status - if (GETPOST('search_'.$search_key, 'alpha') !== '') $search[$search_key] = GETPOST('search_'.$search_key, 'alpha'); + if ($search_key == 'statut') { + $search_key = 'status'; // remove this after refactor entrepot.class property statut to status + } + if (GETPOST('search_'.$search_key, 'alpha') !== '') { + $search[$search_key] = GETPOST('search_'.$search_key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of array of fields for columns @@ -131,31 +141,33 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } - $toselect = ''; + $toselect = array(); $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')) - { + || 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 } @@ -164,6 +176,7 @@ if (empty($reshook)) $objectlabel = 'Warehouse'; $permissiontoread = $user->rights->stock->lire; $permissiontodelete = $user->rights->stock->supprimer; + $permissiontoadd = $user->rights->stock->creer; $uploaddir = $conf->stock->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -186,13 +199,14 @@ $title = $langs->trans("ListOfWarehouses"); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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.', ' : ''); + } } $sql .= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue, SUM(ps.reel) as stockqty"; // Add fields from hooks @@ -201,33 +215,42 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $sql .= $hookmanager->resPrint; $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_WAREHOUSE, "t.rowid"); } -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)"; +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 .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON t.rowid = ps.fk_entrepot"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as c_dep ON c_dep.rowid = t.fk_departement"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as ccount ON ccount.rowid = t.fk_pays"; $sql .= " WHERE t.entity IN (".getEntity('stock').")"; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_WAREHOUSE, "t.rowid", $search_category_list); } -foreach ($search as $key => $val) -{ +foreach ($search as $key => $val) { $class_key = $key; - if ($class_key == 'status') $class_key = 'statut'; // remove this after refactor entrepot.class property statut to status - if (($key == 'status' && $search[$key] == -1) || $key == 'entity') continue; + if ($class_key == 'status') { + $class_key = 'statut'; // remove this after refactor entrepot.class property statut to status + } + if (($key == 'status' && $search[$key] == -1) || $key == 'entity') { + 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] = ''; + if ($search[$key] == '-1') { + $search[$key] = ''; + } $mode_search = 2; } - if ($search[$key] != '') $sql .= natural_search((($key == 'ref') ? 't.ref' : 't.'.$class_key), $search[$key], (($key == 'status') ? 2 : $mode_search)); + if ($search[$key] != '') { + $sql .= natural_search((($key == 'ref') ? 't.ref' : 't.'.$class_key), $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; // Add where from hooks @@ -235,13 +258,14 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " GROUP BY "; -foreach ($object->fields as $key => $val) -{ +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.', ' : ''); + 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(); @@ -250,47 +274,41 @@ $sql .= $hookmanager->resPrint; $sql = preg_replace('/,\s*$/', '', $sql); $totalnboflines = 0; $result = $db->query($sql); -if ($result) -{ +if ($result) { $totalnboflines = $db->num_rows($result); // fetch totals $line = $total = $totalsell = $totalStock = 0; - while ($line < $totalnboflines) - { + while ($line < $totalnboflines) { $objp = $db->fetch_object($result); - $total += price2num($objp->estimatedvalue, 'MU'); - $totalsell += price2num($objp->sellvalue, 'MU'); + $total += $objp->estimatedvalue; + $totalsell += $objp->sellvalue; $totalStock += $objp->stockqty; $line++; } - $totalarray['val']['stockqty'] = $totalStock; - $totalarray['val']['estimatedvalue'] = $total; - $totalarray['val']['estimatedstockvaluesell'] = $totalsell; + $totalarray['val']['stockqty'] = price2num($totalStock, 'MS'); + $totalarray['val']['estimatedvalue'] = price2num($total, 'MT'); + $totalarray['val']['estimatedstockvaluesell'] = price2num($totalsell, 'MT'); } $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) -{ +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -299,8 +317,7 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/product/stock/card.php?id='.$id); @@ -316,28 +333,45 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { + $arrayofmassactions = array(); +} +if ($user->rights->stock->creer) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'label', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form action="'.$_SERVER["PHP_SELF"].'" id="searchFormList" method="POST" name="formulaire">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -357,16 +391,16 @@ $trackid = 'ware'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } $moreforfilter = ''; -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $formcategory = new FormCategory($db); $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_WAREHOUSE, $search_category_list); } @@ -377,11 +411,13 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -398,21 +434,29 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // -------------------------------------------------------------------- print '<tr class="liste_titre_filter">'; -foreach ($object->fields as $key => $val) -{ - if ($key == 'statut') { continue; } +foreach ($object->fields as $key => $val) { + if ($key == 'statut') { + continue; + } $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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0 || strpos($val['type'], 'sellist:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0 || strpos($val['type'], 'sellist:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -455,16 +499,21 @@ print '</tr>'."\n"; // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ - if ($key == 'statut') { continue; } +foreach ($object->fields as $key => $val) { + if ($key == 'statut') { + continue; + } $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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -500,14 +549,14 @@ print '</tr>'."\n"; // Loop on record // -------------------------------------------------------------------- $i = 0; -if ($num) -{ +if ($num) { $warehouse = new Entrepot($db); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } $warehouse->id = $obj->rowid; $warehouse->ref = $obj->ref; @@ -523,22 +572,32 @@ if ($num) // Show here line of result print '<tr class="oddeven">'; - foreach ($warehouse->fields as $key => $val) - { - if ($key == 'statut') { continue; } + foreach ($warehouse->fields as $key => $val) { + if ($key == 'statut') { + continue; + } $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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'statut') print $warehouse->getLibStatut(5); + if ($key == 'statut') { + print $warehouse->getLibStatut(5); + } if ($key == 'phone') { print dol_print_phone($obj->phone, '', 0, $obj->rowid, 'AC_TEL'); } elseif ($key == 'fax') { @@ -547,10 +606,13 @@ if ($num) print $warehouse->showOutputField($val, $key, $warehouse->$key, ''); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $warehouse->$key; } } @@ -559,31 +621,49 @@ if ($num) // Stock qty if (!empty($arrayfields["stockqty"]['checked'])) { print '<td class="right">'.price2num($obj->stockqty, 5).'</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'stockqty'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'stockqty'; + } } // PMP value if (!empty($arrayfields["estimatedvalue"]['checked'])) { print '<td class="right">'; - if (price2num($obj->estimatedvalue, 'MT')) print price(price2num($obj->estimatedvalue, 'MT'), 1); - else print ''; + if (price2num($obj->estimatedvalue, 'MT')) { + print '<span class="amount">'.price(price2num($obj->estimatedvalue, 'MT'), 1).'</span>'; + } else { + print ''; + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'estimatedvalue'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'estimatedvalue'; + } } // Selling value if (!empty($arrayfields["estimatedstockvaluesell"]['checked'])) { print '<td class="right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($obj->sellvalue, 'MT'), 1); - else { + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + if ($obj->sellvalue) { + print '<span class="amount">'.price(price2num($obj->sellvalue, 'MT'), 1).'</span>'; + } + } else { $htmltext = $langs->trans("OptionMULTIPRICESIsOn"); print $form->textwithtooltip($langs->trans("Variable"), $htmltext); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'estimatedstockvaluesell'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'estimatedstockvaluesell'; + } } // Extra fields @@ -596,19 +676,24 @@ if ($num) // Status if (!empty($arrayfields['t.statut']['checked'])) { print '<td class="center">'.$warehouse->LibStatut($obj->statut, 5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -616,8 +701,7 @@ if ($num) $i++; } - if ($totalnboflines - $offset <= $limit) - { + if ($totalnboflines - $offset <= $limit) { // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; } @@ -634,10 +718,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 4e35d3832e5..f2432ea25af 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2013-2020 Laurent Destaileur <ely@users.sourceforge.net> +/* Copyright (C) 2013-2021 Laurent Destaileur <ely@users.sourceforge.net> * Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com> * * This program is free software: you can redistribute it and/or modify @@ -30,6 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.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 DOL_DOCUMENT_ROOT.'/core/modules/import/import_csv.modules.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/import.lib.php'; + +$confirm = GETPOST('confirm', 'alpha'); +$filetoimport = GETPOST('filetoimport'); // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'orders', 'productbatch')); @@ -56,7 +62,9 @@ $idline = GETPOST('idline'); $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 if (!$sortfield) { $sortfield = 'p.ref'; @@ -69,51 +77,44 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; $listofdata = array(); -if (!empty($_SESSION['massstockmove'])) $listofdata = json_decode($_SESSION['massstockmove'], true); +if (!empty($_SESSION['massstockmove'])) { + $listofdata = json_decode($_SESSION['massstockmove'], true); +} /* * Actions */ -if ($action == 'addline') -{ - if (!($id_product > 0)) - { +if ($action == 'addline' && !empty($user->rights->stock->mouvement->creer)) { + if (!($id_product > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); } - if (!($id_sw > 0)) - { + if (!($id_sw > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseSource")), null, 'errors'); } - if (!($id_tw > 0)) - { + if (!($id_tw > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseTarget")), null, 'errors'); } - if ($id_sw > 0 && $id_tw == $id_sw) - { + if ($id_sw > 0 && $id_tw == $id_sw) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorWarehouseMustDiffers"), null, 'errors'); } - if (!$qty) - { + if (!$qty) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")), null, 'errors'); } // Check a batch number is provided if product need it - if (!$error) - { + if (!$error) { $producttmp = new Product($db); $producttmp->fetch($id_product); - if ($producttmp->hasbatch()) - { - if (empty($batch)) - { + if ($producttmp->hasbatch()) { + if (empty($batch)) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorTryToMakeMoveOnProductRequiringBatchData", $producttmp->ref), null, 'errors'); @@ -123,19 +124,19 @@ if ($action == 'addline') // TODO Check qty is ok for stock move. Note qty may not be enough yet, but we make a check now to report a warning. // What is more important is to have qty when doing action 'createmovements' - if (!$error) - { + if (!$error) { // Warning, don't forget lines already added into the $_SESSION['massstockmove'] - if ($producttmp->hasbatch()) - { + if ($producttmp->hasbatch()) { } else { } } - if (!$error) - { - if (count(array_keys($listofdata)) > 0) $id = max(array_keys($listofdata)) + 1; - else $id = 1; + if (!$error) { + if (count(array_keys($listofdata)) > 0) { + $id = max(array_keys($listofdata)) + 1; + } else { + $id = 1; + } $listofdata[$id] = array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw, 'batch'=>$batch); $_SESSION['massstockmove'] = json_encode($listofdata); @@ -147,31 +148,31 @@ if ($action == 'addline') } } -if ($action == 'delline' && $idline != '') -{ - if (!empty($listofdata[$idline])) unset($listofdata[$idline]); - if (count($listofdata) > 0) $_SESSION['massstockmove'] = json_encode($listofdata); - else unset($_SESSION['massstockmove']); +if ($action == 'delline' && $idline != '' && !empty($user->rights->stock->mouvement->creer)) { + if (!empty($listofdata[$idline])) { + unset($listofdata[$idline]); + } + if (count($listofdata) > 0) { + $_SESSION['massstockmove'] = json_encode($listofdata); + } else { + unset($_SESSION['massstockmove']); + } } -if ($action == 'createmovements') -{ +if ($action == 'createmovements' && !empty($user->rights->stock->mouvement->creer)) { $error = 0; - if (!GETPOST("label")) - { + if (!GETPOST("label")) { $error++; setEventMessages($langs->trans("ErrorFieldRequired"), $langs->transnoentitiesnoconv("MovementLabel"), null, 'errors'); } $db->begin(); - if (!$error) - { + if (!$error) { $product = new Product($db); - foreach ($listofdata as $key => $val) // Loop on each movement to do - { + foreach ($listofdata as $key => $val) { // Loop on each movement to do $id = $val['id']; $id_product = $val['id_product']; $id_sw = $val['id_sw']; @@ -181,21 +182,21 @@ if ($action == 'createmovements') $dlc = -1; // They are loaded later from serial $dluo = -1; // They are loaded later from serial - if (!$error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) - { + if (!$error && $id_sw <> $id_tw && is_numeric($qty) && $id_product) { $result = $product->fetch($id_product); $product->load_stock('novirtual'); // Load array product->stock_warehouse // Define value of products moved $pricesrc = 0; - if (!empty($product->pmp)) $pricesrc = $product->pmp; + if (!empty($product->pmp)) { + $pricesrc = $product->pmp; + } $pricedest = $pricesrc; //print 'price src='.$pricesrc.', price dest='.$pricedest;exit; - if (empty($conf->productbatch->enabled) || !$product->hasbatch()) // If product does not need lot/serial - { + if (empty($conf->productbatch->enabled) || !$product->hasbatch()) { // If product does not need lot/serial // Remove stock $result1 = $product->correct_stock( $user, @@ -206,8 +207,7 @@ if ($action == 'createmovements') $pricesrc, GETPOST("codemove") ); - if ($result1 < 0) - { + if ($result1 < 0) { $error++; setEventMessages($product->errors, $product->errorss, 'errors'); } @@ -222,15 +222,13 @@ if ($action == 'createmovements') $pricedest, GETPOST("codemove") ); - if ($result2 < 0) - { + if ($result2 < 0) { $error++; setEventMessages($product->errors, $product->errorss, 'errors'); } } else { $arraybatchinfo = $product->loadBatchInfo($batch); - if (count($arraybatchinfo) > 0) - { + if (count($arraybatchinfo) > 0) { $firstrecord = array_shift($arraybatchinfo); $dlc = $firstrecord['eatby']; $dluo = $firstrecord['sellby']; @@ -253,8 +251,7 @@ if ($action == 'createmovements') $batch, GETPOST("codemove") ); - if ($result1 < 0) - { + if ($result1 < 0) { $error++; setEventMessages($product->errors, $product->errorss, 'errors'); } @@ -272,8 +269,7 @@ if ($action == 'createmovements') $batch, GETPOST("codemove") ); - if ($result2 < 0) - { + if ($result2 < 0) { $error++; setEventMessages($product->errors, $product->errorss, 'errors'); } @@ -285,8 +281,7 @@ if ($action == 'createmovements') } } - if (!$error) - { + if (!$error) { unset($_SESSION['massstockmove']); $db->commit(); @@ -299,6 +294,148 @@ if ($action == 'createmovements') } } +if ($action == 'importCSV' && !empty($user->rights->stock->mouvement->creer)) { + dol_mkdir($conf->stock->dir_temp); + $nowyearmonth = dol_print_date(dol_now(), '%Y%m%d%H%M%S'); + + $fullpath = $conf->stock->dir_temp."/".$user->id.'-csvfiletotimport.csv'; + if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $fullpath, 1) > 0) { + dol_syslog("File ".$fullpath." was added for import"); + } else { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); + } + + if (!$error) { + $importcsv = new ImportCsv($db, 'massstocklist'); + //print $importcsv->separator; + + $nblinesrecord = $importcsv->import_get_nb_of_lines($fullpath)-1; + $importcsv->import_open_file($fullpath); + $labelsrecord = $importcsv->import_read_record(); + + if ($nblinesrecord < 1) { + setEventMessages($langs->trans("BadNumberOfLinesMustHaveAtLeastOneLinePlusTitle"), null, 'errors'); + } else { + $i=0; + $data = array(); + $productstatic = new Product($db); + $warehousestatics = new Entrepot($db); + $warehousestatict = new Entrepot($db); + while (($i < $nblinesrecord) && !$error) { + $data[] = $importcsv->import_read_record(); + if (count($data[$i]) == 1) { + // Only 1 empty line + unset($data[$i]); + $i++; + continue; + } + //var_dump($data); + $tmp_id_sw = $data[$i][0]['val']; + $tmp_id_tw = $data[$i][1]['val']; + $tmp_id_product = $data[$i][2]['val']; + $tmp_qty = $data[$i][3]['val']; + $tmp_batch = $data[$i][4]['val']; + + if (!is_numeric($tmp_id_product)) { + $result = fetchref($productstatic, $tmp_id_product); + $tmp_id_product = $result; + $data[$i][2]['val'] = $result; + } + if (!($tmp_id_product > 0)) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); + } + + if (!is_numeric($tmp_id_sw)) { + $result = fetchref($warehousestatics, $tmp_id_sw); + $tmp_id_sw = $result; + $data[$i][0]['val'] = $result; + } + if (!($tmp_id_sw > 0)) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseSource")), null, 'errors'); + } + + if (!is_numeric($tmp_id_tw)) { + $result = fetchref($warehousestatict, $tmp_id_tw); + $tmp_id_tw = $result; + $data[$i][1]['val'] = $result; + } + if (!($tmp_id_tw > 0)) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WarehouseTarget")), null, 'errors'); + } + + if ($tmp_id_sw > 0 && $tmp_id_tw == $tmp_id_sw) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorWarehouseMustDiffers"), null, 'errors'); + } + if (!$tmp_qty) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")), null, 'errors'); + } + + // Check a batch number is provided if product need it + if (!$error) { + $producttmp = new Product($db); + $producttmp->fetch($tmp_id_product); + if ($producttmp->hasbatch()) { + if (empty($tmp_batch)) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorTryToMakeMoveOnProductRequiringBatchData", $producttmp->ref), null, 'errors'); + } + } + } + + $i++; + } + + if (!$error) { + foreach ($data as $key => $value) { + if (count(array_keys($listofdata)) > 0) { + $id = max(array_keys($listofdata)) + 1; + } else { + $id = 1; + } + $tmp_id_sw = $data[$key][0]['val']; + $tmp_id_tw = $data[$key][1]['val']; + $tmp_id_product = $data[$key][2]['val']; + $tmp_qty = $data[$key][3]['val']; + $tmp_batch = $data[$key][4]['val']; + $listofdata[$key] = array('id'=>$key, 'id_sw'=>$tmp_id_sw, 'id_tw'=>$tmp_id_tw, 'id_product'=>$tmp_id_product, 'qty'=>$tmp_qty, 'batch'=>$tmp_batch); + } + } + } + } + + $_SESSION['massstockmove'] = json_encode($listofdata); +} + +if ($action == 'confirm_deletefile' && $confirm == 'yes') { + $langs->load("other"); + + $param = '&datatoimport='.urlencode($datatoimport).'&format='.urlencode($format); + if ($excludefirstline) { + $param .= '&excludefirstline='.urlencode($excludefirstline); + } + if ($endatlinenb) { + $param .= '&endatlinenb='.urlencode($endatlinenb); + } + + $file = $conf->stock->dir_temp.'/'.GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + $ret = dol_delete_file($file); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } + Header('Location: '.$_SERVER["PHP_SELF"]); + exit; +} /* @@ -313,9 +450,11 @@ $productstatic = new Product($db); $warehousestatics = new Entrepot($db); $warehousestatict = new Entrepot($db); +$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks|DE:Modul_Bestände'; + $title = $langs->trans('MassMovement'); -llxHeader('', $title); +llxHeader('', $title, $help_url); print load_fiche_titre($langs->trans("MassStockTransferShort"), '', 'stock'); @@ -324,7 +463,79 @@ $buttonrecord = $langs->trans("RecordMovement"); $titletoaddnoent = $langs->transnoentitiesnoconv("Select"); $buttonrecordnoent = $langs->transnoentitiesnoconv("RecordMovement"); print '<span class="opacitymedium">'.$langs->trans("SelectProductInAndOutWareHouse", $titletoaddnoent, $buttonrecordnoent).'</span><br>'; -print '<br>'."\n"; + +print '<br>'; + +// Form to upload a file +print '<form name="userfile" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" METHOD="POST">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="action" value="importCSV">'; +print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">'; +print '<span class="opacitymedium">'; +print $langs->trans("or").' '; +$importcsv = new ImportCsv($db, 'massstocklist'); +print $form->textwithpicto($langs->trans('SelectAStockMovementFileToImport'), $langs->transnoentitiesnoconv("InfoTemplateImport", $importcsv->separator)); +print '</span>'; + +print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; '; +$out = (empty($conf->global->MAIN_UPLOAD_DOC) ? ' disabled' : ''); +print '<input type="submit" class="button" value="'.$langs->trans("ImportFromCSV").'"'.$out.' name="sendit">'; +$out = ''; +if (!empty($conf->global->MAIN_UPLOAD_DOC)) { + $max = $conf->global->MAIN_UPLOAD_DOC; // In Kb + $maxphp = @ini_get('upload_max_filesize'); // In unknown + if (preg_match('/k$/i', $maxphp)) { + $maxphp = $maxphp * 1; + } + if (preg_match('/m$/i', $maxphp)) { + $maxphp = $maxphp * 1024; + } + if (preg_match('/g$/i', $maxphp)) { + $maxphp = $maxphp * 1024 * 1024; + } + if (preg_match('/t$/i', $maxphp)) { + $maxphp = $maxphp * 1024 * 1024 * 1024; + } + $maxphp2 = @ini_get('post_max_size'); // In unknown + if (preg_match('/k$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1; + } + if (preg_match('/m$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024; + } + if (preg_match('/g$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024 * 1024; + } + if (preg_match('/t$/i', $maxphp2)) { + $maxphp2 = $maxphp2 * 1024 * 1024 * 1024; + } + // Now $max and $maxphp and $maxphp2 are in Kb + $maxmin = $max; + $maxphptoshow = $maxphptoshowparam = ''; + if ($maxphp > 0) { + $maxmin = min($max, $maxphp); + $maxphptoshow = $maxphp; + $maxphptoshowparam = 'upload_max_filesize'; + } + if ($maxphp2 > 0) { + $maxmin = min($max, $maxphp2); + if ($maxphp2 < $maxphp) { + $maxphptoshow = $maxphp2; + $maxphptoshowparam = 'post_max_size'; + } + } + + $langs->load('other'); + $out .= ' '; + $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphptoshow), 1); +} else { + $out .= ' ('.$langs->trans("UploadDisabled").')'; +} +print $out; + +print '</form>'; + +print '<br><br>'; // Form to add a line print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire">'; @@ -334,7 +545,6 @@ print '<input type="hidden" name="action" value="addline">'; print '<div class="div-table-responsive-no-min">'; print '<table class="liste centpercent">'; -//print '<div class="tagtable centpercent">'; $param = ''; @@ -349,32 +559,34 @@ print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $pa print getTitleFieldOfList('', 0); print '</tr>'; - print '<tr class="oddeven">'; // From warehouse print '<td>'; -print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print img_picto($langs->trans("WarehouseSource"), 'stock', 'class="paddingright"').$formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); print '</td>'; // To warehouse print '<td>'; -print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print img_picto($langs->trans("WarehouseTarget"), 'stock', 'class="paddingright"').$formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); print '</td>'; // Product -print '<td class="titlefield">'; +print '<td>'; $filtertype = 0; -if (!empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype = ''; +if (!empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $filtertype = ''; +} if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) { $limit = ''; } else { $limit = $conf->global->PRODUIT_LIMIT_SIZE; } -$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1); +print img_picto($langs->trans("Product"), 'product', 'class="paddingright"'); +print $form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1, '', null, 1); print '</td>'; // Batch number -if ($conf->productbatch->enabled) -{ +if ($conf->productbatch->enabled) { print '<td>'; + print img_picto($langs->trans("LotSerial"), 'lot', 'class="paddingright"'); print '<input type="text" name="batch" class="flat maxwidth50" value="'.$batch.'">'; print '</td>'; } @@ -385,33 +597,44 @@ print '<td class="right"><input type="submit" class="button" name="addline" valu print '</tr>'; - -foreach ($listofdata as $key => $val) -{ +foreach ($listofdata as $key => $val) { $productstatic->fetch($val['id_product']); $warehousestatics->fetch($val['id_sw']); $warehousestatict->fetch($val['id_tw']); - print '<tr class="oddeven">'; - print '<td>'; - print $warehousestatics->getNomUrl(1); - print '</td>'; - print '<td>'; - print $warehousestatict->getNomUrl(1); - print '</td>'; - print '<td>'; - print $productstatic->getNomUrl(1).' - '.$productstatic->label; - print '</td>'; - if ($conf->productbatch->enabled) - { - print '<td>'; - print $val['batch']; - print '</td>'; + if ($productstatic->id <= 0) { + $error++; + setEventMessages($langs->trans("ObjectNotFound", $langs->transnoentitiesnoconv("Product")), null, 'errors'); + } + if ($warehousestatics->id <= 0) { + $error++; + setEventMessages($langs->trans("ObjectNotFound", $langs->transnoentitiesnoconv("WarehouseSource")), null, 'errors'); + } + if ($warehousestatics->id <= 0) { + $error++; + setEventMessages($langs->trans("ObjectNotFound", $langs->transnoentitiesnoconv("WarehouseTarget")), null, 'errors'); } - print '<td class="center">'.$val['qty'].'</td>'; - print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=delline&idline='.$val['id'].'">'.img_delete($langs->trans("Remove")).'</a></td>'; - print '</tr>'; + if (!$error) { + print '<tr class="oddeven">'; + print '<td>'; + print $warehousestatics->getNomUrl(1); + print '</td>'; + print '<td>'; + print $warehousestatict->getNomUrl(1); + print '</td>'; + print '<td>'; + print $productstatic->getNomUrl(1).' - '.$productstatic->label; + print '</td>'; + if ($conf->productbatch->enabled) { + print '<td>'; + print $val['batch']; + print '</td>'; + } + print '<td class="center">'.$val['qty'].'</td>'; + print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=delline&idline='.$val['id'].'">'.img_delete($langs->trans("Remove")).'</a></td>'; + print '</tr>'; + } } print '</table>'; @@ -419,33 +642,67 @@ print '</div>'; print '</form>'; - print '<br>'; +// Form to validate all movements +if (count($listofdata)) { + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire2" class="formconsumeproduce">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="createmovements">'; -print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire2" class="formconsumeproduce">'; -print '<input type="hidden" name="token" value="'.newToken().'">'; -print '<input type="hidden" name="action" value="createmovements">'; + // Button to record mass movement + $codemove = (GETPOSTISSET("codemove") ? GETPOST("codemove", 'alpha') : dol_print_date(dol_now(), '%Y%m%d%H%M%S')); + $labelmovement = GETPOST("label") ? GETPOST('label') : $langs->trans("StockTransfer").' '.dol_print_date($now, '%Y-%m-%d %H:%M'); -// Button to record mass movement -$codemove = (GETPOSTISSET("codemove") ? GETPOST("codemove", 'alpha') : dol_print_date(dol_now(), '%Y%m%d%H%M%S')); -$labelmovement = GETPOST("label") ? GETPOST('label') : $langs->trans("StockTransfer").' '.dol_print_date($now, '%Y-%m-%d %H:%M'); + print '<div class="center">'; + print '<span class="fieldrequired">'.$langs->trans("InventoryCode").':</span> '; + print '<input type="text" name="codemove" class="maxwidth300" value="'.dol_escape_htmltag($codemove).'"> &nbsp; '; + print '<span class="clearbothonsmartphone"></span>'; + print $langs->trans("MovementLabel").': '; + print '<input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag($labelmovement).'"><br>'; + print '<br>'; -print '<div class="center">'; -print '<span class="fieldrequired">'.$langs->trans("InventoryCode").':</span> '; -print '<input type="text" name="codemove" class="maxwidth300" value="'.dol_escape_htmltag($codemove).'"> &nbsp; '; -print '<span class="clearbothonsmartphone"></span>'; -print $langs->trans("MovementLabel").': '; -print '<input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag($labelmovement).'"><br>'; -print '<br>'; + print '<div class="center"><input class="button" type="submit" name="valid" value="'.dol_escape_htmltag($buttonrecord).'"></div>'; -print '<div class="center"><input class="button" type="submit" name="valid" value="'.dol_escape_htmltag($buttonrecord).'"></div>'; + print '<br>'; + print '</div>'; -print '<br>'; -print '</div>'; + print '</form>'; +} -print '</form>'; +if ($action == 'delete') { + print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); +} // End of page llxFooter(); $db->close(); + +/** + * Verify if $haystack startswith $needle + * + * @param string $haystack string to test + * @param string $needle string to find + * @return bool false if Ko true else + */ +function startsWith($haystack, $needle) +{ + $length = strlen($needle); + return substr($haystack, 0, $length) === $needle; +} + +/** + * Fetch object with ref + * + * @param Object $static_object static object to fetch + * @param string $tmp_ref ref of the object to fetch + * @return int <0 if Ko or Id of object + */ +function fetchref($static_object, $tmp_ref) +{ + if (startsWith($tmp_ref, 'ref:')) { + $tmp_ref = str_replace('ref:', '', $tmp_ref); + } + $static_object->fetch('', $tmp_ref); + return $static_object->id; +} diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index cf3cc67bdc2..b6d5ae78407 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -44,7 +44,9 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'orders')); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} // Security check $result = restrictedArea($user, 'stock'); @@ -75,10 +77,16 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -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; -if (!$sortfield) $sortfield = "m.datem"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "m.datem"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $pdluoid = GETPOST('pdluoid', 'int'); @@ -123,18 +131,23 @@ $usercandelete = (($user->rights->stock->mouvement->supprimer)); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 -{ +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 $year = ''; $month = ''; $search_ref = ''; @@ -153,39 +166,35 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' } // Correct stock -if ($action == "correct_stock") -{ +if ($action == "correct_stock") { $product = new Product($db); - if (!empty($product_id)) $result = $product->fetch($product_id); + if (!empty($product_id)) { + $result = $product->fetch($product_id); + } $error = 0; - if (empty($product_id)) - { + if (empty($product_id)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'correction'; } - if (!is_numeric($_POST["nbpiece"])) - { + if (!is_numeric(GETPOST("nbpiece"))) { $error++; setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $action = 'correction'; } - if (!$error) - { + if (!$error) { $origin_element = ''; $origin_id = null; - if (GETPOST('projectid', 'int')) - { + if (GETPOST('projectid', 'int')) { $origin_element = 'project'; $origin_id = GETPOST('projectid', 'int'); } - if ($product->hasbatch()) - { + if ($product->hasbatch()) { $batch = GETPOST('batch_number', 'alpha'); //$eatby=GETPOST('eatby'); @@ -221,8 +230,7 @@ if ($action == "correct_stock") ); // We do not change value of stock for a correction } - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -232,57 +240,52 @@ if ($action == "correct_stock") } } - if (!$error) $action = ''; + if (!$error) { + $action = ''; + } } // Transfer stock from a warehouse to another warehouse -if ($action == "transfert_stock" && !$cancel) -{ +if ($action == "transfert_stock" && !$cancel) { $product = new Product($db); - if (!empty($product_id)) $result = $product->fetch($product_id); + if (!empty($product_id)) { + $result = $product->fetch($product_id); + } - if (!(GETPOST("id_entrepot_destination", 'int') > 0)) - { + if (!(GETPOST("id_entrepot_destination", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; $action = 'transfert'; } - if (empty($product_id)) - { + if (empty($product_id)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'transfert'; } - if (!GETPOST("nbpiece", 'int')) - { + if (!GETPOST("nbpiece", 'int')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; $action = 'transfert'; } - if ($id == GETPOST("id_entrepot_destination", 'int')) - { + if ($id == GETPOST("id_entrepot_destination", 'int')) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; $action = 'transfert'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { $product = new Product($db); $result = $product->fetch($product_id); - if ($product->hasbatch() && !GETPOST("batch_number", 'alpha')) - { + if ($product->hasbatch() && !GETPOST("batch_number", 'alpha')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; $action = 'transfert'; } } - if (!$error) - { - if ($id) - { + if (!$error) { + if ($id) { $object = new Entrepot($db); $result = $object->fetch($id); @@ -292,18 +295,17 @@ if ($action == "transfert_stock" && !$cancel) // Define value of products moved $pricesrc = 0; - if (isset($product->pmp)) $pricesrc = $product->pmp; + if (isset($product->pmp)) { + $pricesrc = $product->pmp; + } $pricedest = $pricesrc; - if ($product->hasbatch()) - { + if ($product->hasbatch()) { $pdluo = new Productbatch($db); - if ($pdluoid > 0) - { + if ($pdluoid > 0) { $result = $pdluo->fetch($pdluoid); - if ($result) - { + if ($result) { $srcwarehouseid = $pdluo->warehouseid; $batch = $pdluo->batch; $eatby = $pdluo->eatby; @@ -319,8 +321,7 @@ if ($action == "transfert_stock" && !$cancel) $sellby = $d_sellby; } - if (!$error) - { + if (!$error) { // Remove stock $result1 = $product->correct_stock_batch( $user, @@ -371,12 +372,10 @@ if ($action == "transfert_stock" && !$cancel) GETPOST('inventorycode', 'alpha') ); } - if (!$error && $result1 >= 0 && $result2 >= 0) - { + if (!$error && $result1 >= 0 && $result2 >= 0) { $db->commit(); - if ($backtopage) - { + if ($backtopage) { header("Location: ".$backtopage); exit; } else { @@ -403,8 +402,7 @@ $permissiontoadd = $user->rights->stock->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; -if (empty($reshook) && $action != 'remove_file') -{ +if (empty($reshook) && $action != 'remove_file') { $objectclass = 'MouvementStock'; $objectlabel = 'Movements'; $permissiontoread = $user->rights->stock->lire; @@ -427,7 +425,9 @@ $userstatic = new User($db); $form = new Form($db); $formother = new FormOther($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,"; $sql .= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,"; @@ -438,7 +438,9 @@ $sql .= " pl.rowid as lotid, pl.eatby, pl.sellby,"; $sql .= " u.login, u.photo, u.lastname, u.firstname"; // 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(); @@ -447,27 +449,57 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql .= " ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."stock_mouvement as m"; -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 (m.rowid = ef.fk_object)"; +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 (m.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product"; $sql .= " WHERE m.fk_product = p.rowid"; -if ($msid > 0) $sql .= " AND m.rowid = ".$msid; +if ($msid > 0) { + $sql .= " AND m.rowid = ".((int) $msid); +} $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; -if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; -if ($id > 0) $sql .= " AND e.rowid ='".$id."'"; +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; +} +if ($id > 0) { + $sql .= " AND e.rowid = ".((int) $id); +} $sql .= dolSqlDateFilter('m.datem', 0, $month, $year); -if ($idproduct > 0) $sql .= " AND p.rowid = ".((int) $idproduct); -if (!empty($search_ref)) $sql .= natural_search('m.rowid', $search_ref, 1); -if (!empty($search_movement)) $sql .= natural_search('m.label', $search_movement); -if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $search_inventorycode); -if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref); -if (!empty($search_product)) $sql .= natural_search('p.label', $search_product); -if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2); -if (!empty($search_user)) $sql .= natural_search('u.login', $search_user); -if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch); -if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1); -if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); +if ($idproduct > 0) { + $sql .= " AND p.rowid = ".((int) $idproduct); +} +if (!empty($search_ref)) { + $sql .= natural_search('m.rowid', $search_ref, 1); +} +if (!empty($search_movement)) { + $sql .= natural_search('m.label', $search_movement); +} +if (!empty($search_inventorycode)) { + $sql .= natural_search('m.inventorycode', $search_inventorycode); +} +if (!empty($search_product_ref)) { + $sql .= natural_search('p.ref', $search_product_ref); +} +if (!empty($search_product)) { + $sql .= natural_search('p.label', $search_product); +} +if ($search_warehouse != '' && $search_warehouse != '-1') { + $sql .= natural_search('e.rowid', $search_warehouse, 2); +} +if (!empty($search_user)) { + $sql .= natural_search('u.login', $search_user); +} +if (!empty($search_batch)) { + $sql .= natural_search('m.batch', $search_batch); +} +if ($search_qty != '') { + $sql .= natural_search('m.value', $search_qty, 1); +} +if ($search_type_mouvement != '' && $search_type_mouvement != '-1') { + $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -477,12 +509,10 @@ $sql .= $hookmanager->resPrint; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -492,20 +522,16 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $product = new Product($db); $object = new Entrepot($db); - if ($idproduct > 0) - { + if ($idproduct > 0) { $product->fetch($idproduct); } - if ($id > 0 || $ref) - { + if ($id > 0 || $ref) { $result = $object->fetch($id, $ref); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db); } } @@ -517,18 +543,20 @@ if ($resql) $i = 0; $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks'; - if ($msid) $texte = $langs->trans('StockMovementForId', $msid); - else { + if ($msid) { + $texte = $langs->trans('StockMovementForId', $msid); + } else { $texte = $langs->trans("ListOfStockMovements"); - if ($id) $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + if ($id) { + $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + } } llxHeader("", $texte, $help_url); /* - * Show tab only if we ask a particular warehouse - */ - if ($object->id > 0) - { + * Show tab only if we ask a particular warehouse + */ + if ($object->id > 0) { $head = stock_prepare_head($object); print dol_get_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); @@ -541,7 +569,9 @@ if ($resql) $morehtmlref .= '</div>'; $shownav = 1; - if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -590,8 +620,7 @@ if ($resql) $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " WHERE m.fk_entrepot = ".(int) $object->id; $resqlbis = $db->query($sql); - if ($resqlbis) - { + if ($resqlbis) { $obj = $db->fetch_object($resqlbis); $lastmovementdate = $db->jdate($obj->datem); } else { @@ -599,8 +628,7 @@ if ($resql) } print '<tr><td>'.$langs->trans("LastMovement").'</td><td>'; - if ($lastmovementdate) - { + if ($lastmovementdate) { print dol_print_date($lastmovementdate, 'dayhour'); } else { print $langs->trans("None"); @@ -622,8 +650,7 @@ if ($resql) /* * Correct stock */ - if ($action == "correction") - { + if ($action == "correction") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php'; print '<br>'; } @@ -631,30 +658,23 @@ if ($resql) /* * Transfer of units */ - if ($action == "transfert") - { + if ($action == "transfert") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php'; print '<br>'; } - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - - if ((empty($action) || $action == 'list') && $id > 0) - { + /* + * Action bar + */ + if ((empty($action) || $action == 'list') && $id > 0) { print "<div class=\"tabsAction\">\n"; - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=correction">'.$langs->trans("CorrectStock").'</a>'; } - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>'; } @@ -662,18 +682,42 @@ if ($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 ($id > 0) $param .= '&id='.urlencode($id); - if ($search_movement) $param .= '&search_movement='.urlencode($search_movement); - if ($search_inventorycode) $param .= '&search_inventorycode='.urlencode($search_inventorycode); - if ($search_type_mouvement) $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); - if ($search_product_ref) $param .= '&search_product_ref='.urlencode($search_product_ref); - if ($search_product) $param .= '&search_product='.urlencode($search_product); - if ($search_batch) $param .= '&search_batch='.urlencode($search_batch); - if ($search_warehouse > 0) $param .= '&search_warehouse='.urlencode($search_warehouse); - if ($search_user) $param .= '&search_user='.urlencode($search_user); - if ($idproduct > 0) $param .= '&idproduct='.urlencode($idproduct); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($id > 0) { + $param .= '&id='.urlencode($id); + } + if ($search_movement) { + $param .= '&search_movement='.urlencode($search_movement); + } + if ($search_inventorycode) { + $param .= '&search_inventorycode='.urlencode($search_inventorycode); + } + if ($search_type_mouvement) { + $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); + } + if ($search_product_ref) { + $param .= '&search_product_ref='.urlencode($search_product_ref); + } + if ($search_product) { + $param .= '&search_product='.urlencode($search_product); + } + if ($search_batch) { + $param .= '&search_batch='.urlencode($search_batch); + } + if ($search_warehouse > 0) { + $param .= '&search_warehouse='.urlencode($search_warehouse); + } + if ($search_user) { + $param .= '&search_user='.urlencode($search_user); + } + if ($idproduct > 0) { + $param .= '&idproduct='.urlencode($idproduct); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -683,11 +727,15 @@ if ($resql) // 'builddoc'=>$langs->trans("PDFMerge"), ); //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -695,14 +743,20 @@ if ($resql) print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; - if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">'; + if ($id > 0) { + print '<input type="hidden" name="id" value="'.$id.'">'; + } - if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); - else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + if ($id > 0) { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit); + } else { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + } - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -710,11 +764,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -728,84 +784,74 @@ if ($resql) // Fields title search print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['m.rowid']['checked'])) - { + if (!empty($arrayfields['m.rowid']['checked'])) { // Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['m.datem']['checked'])) - { + if (!empty($arrayfields['m.datem']['checked'])) { print '<td class="liste_titre nowraponall">'; print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">'; - if (empty($conf->productbatch->enabled)) print '&nbsp;'; + if (empty($conf->productbatch->enabled)) { + print '&nbsp;'; + } //else print '<br>'; $syear = $year ? $year : -1; print '<input class="flat maxwidth50" type="text" maxlength="4" placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" name="year" value="'.($syear > 0 ? $syear : '').'">'; //print $formother->selectyear($syear,'year',1, 20, 5); print '</td>'; } - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { // Product Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct ? $product->ref : $search_product_ref).'">'; print '</td>'; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { // Product label print '<td class="liste_titre left">'; print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct ? $product->label : $search_product).'">'; print '</td>'; } // Batch - if (!empty($arrayfields['m.batch']['checked'])) - { + if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="liste_titre center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>'; } - if (!empty($arrayfields['pl.eatby']['checked'])) - { + if (!empty($arrayfields['pl.eatby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } - if (!empty($arrayfields['pl.sellby']['checked'])) - { + if (!empty($arrayfields['pl.sellby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } // Warehouse - if (!empty($arrayfields['e.ref']['checked'])) - { + if (!empty($arrayfields['e.ref']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone left">'; //print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">'; print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['m.fk_user_author']['checked'])) - { + if (!empty($arrayfields['m.fk_user_author']['checked'])) { // Author print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">'; print '</td>'; } - if (!empty($arrayfields['m.inventorycode']['checked'])) - { + if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">'; print '</td>'; } - if (!empty($arrayfields['m.label']['checked'])) - { + if (!empty($arrayfields['m.label']['checked'])) { // Label of movement print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">'; print '</td>'; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) - { + if (!empty($arrayfields['m.type_mouvement']['checked'])) { // Type of movement print '<td class="liste_titre center">'; //print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">'; @@ -821,22 +867,19 @@ if ($resql) // print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['origin']['checked'])) - { + if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print '<td class="liste_titre left">'; print '&nbsp; '; print '</td>'; } - if (!empty($arrayfields['m.value']['checked'])) - { + if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">'; print '</td>'; } - if (!empty($arrayfields['m.price']['checked'])) - { + if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="liste_titre left">'; print '&nbsp; '; @@ -852,14 +895,12 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['m.datec']['checked'])) - { + if (!empty($arrayfields['m.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['m.tms']['checked'])) - { + if (!empty($arrayfields['m.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -871,38 +912,52 @@ if ($resql) print "</tr>\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['m.rowid']['checked'])) + if (!empty($arrayfields['m.rowid']['checked'])) { print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['m.datem']['checked'])) + } + if (!empty($arrayfields['m.datem']['checked'])) { print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['p.ref']['checked'])) + } + 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.label']['checked'])) + } + if (!empty($arrayfields['p.label']['checked'])) { print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], 'p.label', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['m.batch']['checked'])) + } + if (!empty($arrayfields['m.batch']['checked'])) { print_liste_field_titre($arrayfields['m.batch']['label'], $_SERVER["PHP_SELF"], 'm.batch', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['pl.eatby']['checked'])) + } + if (!empty($arrayfields['pl.eatby']['checked'])) { print_liste_field_titre($arrayfields['pl.eatby']['label'], $_SERVER["PHP_SELF"], 'pl.eatby', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['pl.sellby']['checked'])) + } + if (!empty($arrayfields['pl.sellby']['checked'])) { print_liste_field_titre($arrayfields['pl.sellby']['label'], $_SERVER["PHP_SELF"], 'pl.sellby', '', $param, '', $sortfield, $sortorder, 'center '); + } if (!empty($arrayfields['e.ref']['checked'])) { // We are on a specific warehouse card, no filter on other should be possible print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder); } - if (!empty($arrayfields['m.fk_user_author']['checked'])) + if (!empty($arrayfields['m.fk_user_author']['checked'])) { print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.inventorycode']['checked'])) + } + if (!empty($arrayfields['m.inventorycode']['checked'])) { print_liste_field_titre($arrayfields['m.inventorycode']['label'], $_SERVER["PHP_SELF"], "m.inventorycode", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.label']['checked'])) + } + if (!empty($arrayfields['m.label']['checked'])) { print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.type_mouvement']['checked'])) + } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['origin']['checked'])) + } + if (!empty($arrayfields['origin']['checked'])) { print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); - if (!empty($arrayfields['m.value']['checked'])) + } + if (!empty($arrayfields['m.value']['checked'])) { print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['m.price']['checked'])) + } + if (!empty($arrayfields['m.price']['checked'])) { print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right '); + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -956,65 +1011,58 @@ if ($resql) print '<tr class="oddeven">'; // Id movement - if (!empty($arrayfields['m.rowid']['checked'])) - { + if (!empty($arrayfields['m.rowid']['checked'])) { // This is primary not movement id print '<td>'.$objp->mid.'</td>'; } - if (!empty($arrayfields['m.datem']['checked'])) - { + if (!empty($arrayfields['m.datem']['checked'])) { // Date print '<td>'.dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>'; } - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { // Product ref print '<td class="nowraponall">'; print $productstatic->getNomUrl(1, 'stock', 16); print "</td>\n"; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { // Product label print '<td>'; /*$productstatic->id=$objp->rowid; - $productstatic->ref=$objp->produit; - $productstatic->type=$objp->type; - print $productstatic->getNomUrl(1,'',16);*/ + $productstatic->ref=$objp->produit; + $productstatic->type=$objp->type; + print $productstatic->getNomUrl(1,'',16);*/ print $productstatic->label; print "</td>\n"; } - if (!empty($arrayfields['m.batch']['checked'])) - { + if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="center nowraponall">'; - 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. + 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. + } print '</td>'; } - if (!empty($arrayfields['pl.eatby']['checked'])) - { + if (!empty($arrayfields['pl.eatby']['checked'])) { print '<td class="center">'.dol_print_date($objp->eatby, 'day').'</td>'; } - if (!empty($arrayfields['pl.sellby']['checked'])) - { + if (!empty($arrayfields['pl.sellby']['checked'])) { print '<td class="center">'.dol_print_date($objp->sellby, 'day').'</td>'; } // Warehouse - if (!empty($arrayfields['e.ref']['checked'])) - { + if (!empty($arrayfields['e.ref']['checked'])) { print '<td>'; print $warehousestatic->getNomUrl(1); print "</td>\n"; } // Author - if (!empty($arrayfields['m.fk_user_author']['checked'])) - { + if (!empty($arrayfields['m.fk_user_author']['checked'])) { print '<td class="tdoverflowmax100">'; print $userstatic->getNomUrl(-1); print "</td>\n"; } - if (!empty($arrayfields['m.inventorycode']['checked'])) - { + if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code print '<td><a href="' .DOL_URL_ROOT.'/product/stock/movement_card.php?id='.urlencode($objp->entrepot_id) @@ -1024,13 +1072,11 @@ if ($resql) .$objp->inventorycode .'</a></td>'; } - if (!empty($arrayfields['m.label']['checked'])) - { + if (!empty($arrayfields['m.label']['checked'])) { // Label of movement print '<td class="tdoverflowmax100aaa">'.$objp->label.'</td>'; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) - { + if (!empty($arrayfields['m.type_mouvement']['checked'])) { // Type of movement switch ($objp->type_mouvement) { case "0": @@ -1047,36 +1093,40 @@ if ($resql) break; } } - if (!empty($arrayfields['origin']['checked'])) - { + if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print '<td class="nowraponall">'.$origin.'</td>'; } - if (!empty($arrayfields['m.value']['checked'])) - { + if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="right">'; - if ($objp->qt > 0) print '+'; + if ($objp->qt > 0) { + print '+'; + } print $objp->qty; print '</td>'; } - if (!empty($arrayfields['m.price']['checked'])) - { + if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="right">'; - if ($objp->price != 0) print price($objp->price); + if ($objp->price != 0) { + print price($objp->price); + } print '</td>'; } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; $i++; @@ -1088,8 +1138,7 @@ if ($resql) print "</form>"; // Add number of product when there is a filter on period - if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) - { + if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) { print "<br>"; $productidselected = 0; @@ -1124,22 +1173,25 @@ if ($resql) /* - * Documents generes + * Generated documents */ //Area for doc and last events of warehouse are stored on the main card of warehouse $modulepart = 'movement'; -if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) -{ - print '<br/>'; +if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) { + print '<br>'; print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre // Documents $objectref = dol_sanitizeFileName($object->ref); // Add inventorycode & type_mouvement to filename of the pdf - if (!empty($search_inventorycode)) $objectref .= "_".$id."_".$search_inventorycode; - if ($search_type_mouvement) $objectref .= "_".$search_type_mouvement; + if (!empty($search_inventorycode)) { + $objectref .= "_".$id."_".$search_inventorycode; + } + if ($search_type_mouvement) { + $objectref .= "_".$search_type_mouvement; + } $relativepath = $comref.'/'.$objectref.'.pdf'; $filedir = $conf->stock->dir_output.'/movement/'.$objectref; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 6ab8a99ac76..4a9a0bb9613 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -45,7 +45,9 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('products', 'stocks', 'orders')); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} // Security check $result = restrictedArea($user, 'stock'); @@ -66,8 +68,14 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected $result = restrictedArea($user, 'stock'); $idproduct = GETPOST('idproduct', 'int'); -$year = GETPOST("year"); -$month = GETPOST("month"); +$search_date_startday = GETPOST('search_date_startday', 'int'); +$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); +$search_date_startyear = GETPOST('search_date_startyear', 'int'); +$search_date_endday = GETPOST('search_date_endday', 'int'); +$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); +$search_date_endyear = GETPOST('search_date_endyear', 'int'); +$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'), 'tzuserrel'); +$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'), 'tzuserrel'); $search_ref = GETPOST('search_ref', 'alpha'); $search_movement = GETPOST("search_movement"); $search_product_ref = trim(GETPOST("search_product_ref")); @@ -83,10 +91,16 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -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; -if (!$sortfield) $sortfield = "m.datem"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "m.datem"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $pdluoid = GETPOST('pdluoid', 'int'); @@ -102,24 +116,24 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); $arrayfields = array( - 'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'm.datem'=>array('label'=>$langs->trans("Date"), 'checked'=>1), - 'p.ref'=>array('label'=>$langs->trans("ProductRef"), 'checked'=>1, 'css'=>'maxwidth100'), - 'p.label'=>array('label'=>$langs->trans("ProductLabel"), 'checked'=>1), - 'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'e.ref'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(!$id > 0)), // If we are on specific warehouse, we hide it - 'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0), - 'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1), - 'm.label'=>array('label'=>$langs->trans("MovementLabel"), 'checked'=>1), - 'm.type_mouvement'=>array('label'=>$langs->trans("TypeMovement"), 'checked'=>1), - 'origin'=>array('label'=>$langs->trans("Origin"), 'checked'=>1), - 'm.value'=>array('label'=>$langs->trans("Qty"), 'checked'=>1), - 'm.price'=>array('label'=>$langs->trans("UnitPurchaseValue"), 'checked'=>0), - 'm.fk_projet'=>array('label'=>$langs->trans('Project'), 'checked'=>0) - //'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - //'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500) + 'm.rowid'=>array('label'=>"Ref", 'checked'=>1, 'position'=>1), + 'm.datem'=>array('label'=>"Date", 'checked'=>1, 'position'=>2), + 'p.ref'=>array('label'=>"ProductRef", 'checked'=>1, 'css'=>'maxwidth100', 'position'=>3), + 'p.label'=>array('label'=>"ProductLabel", 'checked'=>0, 'position'=>5), + 'm.batch'=>array('label'=>"BatchNumberShort", 'checked'=>1, 'position'=>8, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'pl.eatby'=>array('label'=>"EatByDate", 'checked'=>0, 'position'=>9, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'pl.sellby'=>array('label'=>"SellByDate", 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), + 'e.ref'=>array('label'=>"Warehouse", 'checked'=>1, 'position'=>100, 'enabled'=>(!$id > 0)), // If we are on specific warehouse, we hide it + 'm.fk_user_author'=>array('label'=>"Author", 'checked'=>0, 'position'=>120), + 'm.inventorycode'=>array('label'=>"InventoryCodeShort", 'checked'=>1, 'position'=>130), + 'm.label'=>array('label'=>"MovementLabel", 'checked'=>1, 'position'=>140), + 'm.type_mouvement'=>array('label'=>"TypeMovement", 'checked'=>0, 'position'=>150), + 'origin'=>array('label'=>"Origin", 'checked'=>1, 'position'=>155), + 'm.fk_projet'=>array('label'=>'Project', 'checked'=>0, 'position'=>180), + 'm.value'=>array('label'=>"Qty", 'checked'=>1, 'position'=>200), + 'm.price'=>array('label'=>"UnitPurchaseValue", 'checked'=>0, 'position'=>210) + //'m.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + //'m.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500) ); if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) { unset($arrayfields['pl.eatby']); @@ -148,22 +162,32 @@ $error = 0; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 - { - $year = ''; - $month = ''; + 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_date_startday = ''; + $search_date_startmonth = ''; + $search_date_startyear = ''; + $search_date_endday = ''; + $search_date_endmonth = ''; + $search_date_endyear = ''; + $search_date_start = ''; + $search_date_end = ''; $search_ref = ''; $search_movement = ""; $search_type_mouvement = ""; @@ -194,7 +218,9 @@ if ($action == 'update_extras') { // Fill array 'array_options' with data from update form $ret = $extrafields->setOptionalsFromPost(null, $tmpwarehouse, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $result = $tmpwarehouse->insertExtraFields(); if ($result < 0) { @@ -202,43 +228,41 @@ if ($action == 'update_extras') { $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } // Correct stock -if ($action == "correct_stock") -{ +if ($action == "correct_stock") { $product = new Product($db); - if (!empty($product_id)) $result = $product->fetch($product_id); + if (!empty($product_id)) { + $result = $product->fetch($product_id); + } $error = 0; - if (empty($product_id)) - { + if (empty($product_id)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'correction'; } - if (!is_numeric($_POST["nbpiece"])) - { + if (!is_numeric(GETPOST("nbpiece"))) { $error++; setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $action = 'correction'; } - if (!$error) - { + if (!$error) { $origin_element = ''; $origin_id = null; - if (GETPOST('projectid', 'int')) - { + if (GETPOST('projectid', 'int')) { $origin_element = 'project'; $origin_id = GETPOST('projectid', 'int'); } - if ($product->hasbatch()) - { + if ($product->hasbatch()) { $batch = GETPOST('batch_number', 'alphanohtml'); //$eatby=GETPOST('eatby'); @@ -253,7 +277,9 @@ if ($action == "correct_stock") GETPOST("mouvement"), GETPOST("label", 'san_alpha'), GETPOST('unitprice'), - $eatby, $sellby, $batch, + $eatby, + $sellby, + $batch, GETPOST('inventorycode', 'alphanohtml'), $origin_element, $origin_id @@ -272,8 +298,7 @@ if ($action == "correct_stock") ); // We do not change value of stock for a correction } - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -283,57 +308,52 @@ if ($action == "correct_stock") } } - if (!$error) $action = ''; + if (!$error) { + $action = ''; + } } // Transfer stock from a warehouse to another warehouse -if ($action == "transfert_stock" && !$cancel) -{ +if ($action == "transfert_stock" && !$cancel) { $product = new Product($db); - if (!empty($product_id)) $result = $product->fetch($product_id); + if (!empty($product_id)) { + $result = $product->fetch($product_id); + } - if (!(GETPOST("id_entrepot_destination", 'int') > 0)) - { + if (!(GETPOST("id_entrepot_destination", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; $action = 'transfert'; } - if (empty($product_id)) - { + if (empty($product_id)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'transfert'; } - if (!GETPOST("nbpiece", 'int')) - { + if (!GETPOST("nbpiece", 'int')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; $action = 'transfert'; } - if ($id == GETPOST("id_entrepot_destination", 'int')) - { + if ($id == GETPOST("id_entrepot_destination", 'int')) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; $action = 'transfert'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { $product = new Product($db); $result = $product->fetch($product_id); - if ($product->hasbatch() && !GETPOST("batch_number")) - { + if ($product->hasbatch() && !GETPOST("batch_number")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; $action = 'transfert'; } } - if (!$error) - { - if ($id) - { + if (!$error) { + if ($id) { $object = new Entrepot($db); $result = $object->fetch($id); @@ -343,18 +363,17 @@ if ($action == "transfert_stock" && !$cancel) // Define value of products moved $pricesrc = 0; - if (isset($product->pmp)) $pricesrc = $product->pmp; + if (isset($product->pmp)) { + $pricesrc = $product->pmp; + } $pricedest = $pricesrc; - if ($product->hasbatch()) - { + if ($product->hasbatch()) { $pdluo = new Productbatch($db); - if ($pdluoid > 0) - { + if ($pdluoid > 0) { $result = $pdluo->fetch($pdluoid); - if ($result) - { + if ($result) { $srcwarehouseid = $pdluo->warehouseid; $batch = $pdluo->batch; $eatby = $pdluo->eatby; @@ -370,8 +389,7 @@ if ($action == "transfert_stock" && !$cancel) $sellby = $d_sellby; } - if (!$error) - { + if (!$error) { // Remove stock $result1 = $product->correct_stock_batch( $user, @@ -380,9 +398,11 @@ if ($action == "transfert_stock" && !$cancel) 1, GETPOST("label", 'san_alpha'), $pricesrc, - $eatby, $sellby, $batch, + $eatby, + $sellby, + $batch, GETPOST('inventorycode') - ); + ); // Add stock $result2 = $product->correct_stock_batch( $user, @@ -391,9 +411,11 @@ if ($action == "transfert_stock" && !$cancel) 0, GETPOST("label", 'san_alpha'), $pricedest, - $eatby, $sellby, $batch, + $eatby, + $sellby, + $batch, GETPOST('inventorycode', 'alphanohtml') - ); + ); } } else { // Remove stock @@ -405,7 +427,7 @@ if ($action == "transfert_stock" && !$cancel) GETPOST("label", 'san_alpha'), $pricesrc, GETPOST('inventorycode', 'alphanohtml') - ); + ); // Add stock $result2 = $product->correct_stock( @@ -416,14 +438,12 @@ if ($action == "transfert_stock" && !$cancel) GETPOST("label", 'san_alpha'), $pricedest, GETPOST('inventorycode', 'alphanohtml') - ); + ); } - if (!$error && $result1 >= 0 && $result2 >= 0) - { + if (!$error && $result1 >= 0 && $result2 >= 0) { $db->commit(); - if ($backtopage) - { + if ($backtopage) { header("Location: ".$backtopage); exit; } else { @@ -450,9 +470,10 @@ $warehousestatic = new Entrepot($db); $movement = new MouvementStock($db); $userstatic = new User($db); $form = new Form($db); -$formother = new FormOther($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tosell, p.tobuy, p.tobatch, p.fk_product_type as type, p.entity,"; $sql .= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu, e.fk_parent, e.statut,"; @@ -461,10 +482,12 @@ $sql .= " m.batch, m.price,"; $sql .= " m.type_mouvement,"; $sql .= " m.fk_projet as fk_project,"; $sql .= " pl.rowid as lotid, pl.eatby, pl.sellby,"; -$sql .= " u.login, u.photo, u.lastname, u.firstname"; +$sql .= " u.login, u.photo, u.lastname, u.firstname, u.email as user_email, u.statut as user_status"; // 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(); @@ -473,28 +496,65 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql .= " ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."stock_mouvement as m"; -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 (m.rowid = ef.fk_object)"; +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 (m.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product"; $sql .= " WHERE m.fk_product = p.rowid"; -if ($msid > 0) $sql .= " AND m.rowid = ".$msid; +if ($msid > 0) { + $sql .= " AND m.rowid = ".((int) $msid); +} $sql .= " AND m.fk_entrepot = e.rowid"; $sql .= " AND e.entity IN (".getEntity('stock').")"; -if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0"; -if ($id > 0) $sql .= " AND e.rowid ='".$id."'"; -$sql .= dolSqlDateFilter('m.datem', 0, $month, $year); -if ($idproduct > 0) $sql .= " AND p.rowid = ".((int) $idproduct); -if (!empty($search_ref)) $sql .= natural_search('m.rowid', $search_ref, 1); -if (!empty($search_movement)) $sql .= natural_search('m.label', $search_movement); -if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $search_inventorycode); -if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref); -if (!empty($search_product)) $sql .= natural_search('p.label', $search_product); -if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2); -if (!empty($search_user)) $sql .= natural_search('u.login', $search_user); -if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch); -if (!empty($product_id)) $sql .= natural_search('p.rowid', $product_id); -if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1); -if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; +} +if ($id > 0) { + $sql .= " AND e.rowid = ".((int) $id); +} +if (!empty($search_date_start)) { + $sql .= " AND m.datem >= '" . $db->idate($search_date_start) . "'"; +} +if (!empty($search_date_end)) { + $sql .= " AND m.datem <= '" . $db->idate($search_date_end) . "'"; +} +if ($idproduct > 0) { + $sql .= " AND p.rowid = ".((int) $idproduct); +} +if (!empty($search_ref)) { + $sql .= natural_search('m.rowid', $search_ref, 1); +} +if (!empty($search_movement)) { + $sql .= natural_search('m.label', $search_movement); +} +if (!empty($search_inventorycode)) { + $sql .= natural_search('m.inventorycode', $search_inventorycode); +} +if (!empty($search_product_ref)) { + $sql .= natural_search('p.ref', $search_product_ref); +} +if (!empty($search_product)) { + $sql .= natural_search('p.label', $search_product); +} +if ($search_warehouse != '' && $search_warehouse != '-1') { + $sql .= natural_search('e.rowid', $search_warehouse, 2); +} +if (!empty($search_user)) { + $sql .= natural_search('u.login', $search_user); +} +if (!empty($search_batch)) { + $sql .= natural_search('m.batch', $search_batch); +} +if (!empty($product_id)) { + $sql .= natural_search('p.rowid', $product_id); +} +if ($search_qty != '') { + $sql .= natural_search('m.value', $search_qty, 1); +} +if ($search_type_mouvement != '' && $search_type_mouvement != '-1') { + $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -504,44 +564,31 @@ $sql .= $hookmanager->resPrint; $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } } -if (empty($search_inventorycode)) -{ - $sql .= $db->plimit($limit + 1, $offset); -} else { - $limit = 0; -} +$sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if (!empty($search_inventorycode)) $limit = $db->num_rows($resql); - -if ($resql) -{ +if ($resql) { $product = new Product($db); $object = new Entrepot($db); - if ($idproduct > 0) - { + if ($idproduct > 0) { $product->fetch($idproduct); } - if ($id > 0 || $ref) - { + if ($id > 0 || $ref) { $result = $object->fetch($id, $ref); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db); } } @@ -553,18 +600,20 @@ if ($resql) $i = 0; $help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks'; - if ($msid) $texte = $langs->trans('StockMovementForId', $msid); - else { + if ($msid) { + $texte = $langs->trans('StockMovementForId', $msid); + } else { $texte = $langs->trans("ListOfStockMovements"); - if ($id) $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + if ($id) { + $texte .= ' ('.$langs->trans("ForThisWarehouse").')'; + } } llxHeader("", $texte, $help_url); /* - * Show tab only if we ask a particular warehouse - */ - if ($object->id > 0) - { + * Show tab only if we ask a particular warehouse + */ + if ($object->id > 0) { $head = stock_prepare_head($object); print dol_get_fiche_head($head, 'movements', $langs->trans("Warehouse"), -1, 'stock'); @@ -577,7 +626,9 @@ if ($resql) $morehtmlref .= '</div>'; $shownav = 1; - if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref); @@ -626,8 +677,7 @@ if ($resql) $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " WHERE m.fk_entrepot = ".((int) $object->id); $resqlbis = $db->query($sql); - if ($resqlbis) - { + if ($resqlbis) { $objbis = $db->fetch_object($resqlbis); $lastmovementdate = $db->jdate($objbis->datem); } else { @@ -635,8 +685,7 @@ if ($resql) } print '<tr><td>'.$langs->trans("LastMovement").'</td><td>'; - if ($lastmovementdate) - { + if ($lastmovementdate) { print dol_print_date($lastmovementdate, 'dayhour'); } else { print $langs->trans("None"); @@ -668,8 +717,7 @@ if ($resql) /* * Correct stock */ - if ($action == "correction") - { + if ($action == "correction") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php'; print '<br>'; } @@ -677,30 +725,23 @@ if ($resql) /* * Transfer of units */ - if ($action == "transfert") - { + if ($action == "transfert") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php'; print '<br>'; } - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - - if ((empty($action) || $action == 'list') && $id > 0) - { + /* + * Action bar + */ + if ((empty($action) || $action == 'list') && $id > 0) { print "<div class=\"tabsAction\">\n"; - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=correction">'.$langs->trans("CorrectStock").'</a>'; } - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>'; } @@ -708,33 +749,81 @@ if ($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 ($id > 0) $param .= '&id='.urlencode($id); - if ($search_movement) $param .= '&search_movement='.urlencode($search_movement); - if ($search_inventorycode) $param .= '&search_inventorycode='.urlencode($search_inventorycode); - if ($search_type_mouvement) $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); - if ($search_product_ref) $param .= '&search_product_ref='.urlencode($search_product_ref); - if ($search_product) $param .= '&search_product='.urlencode($search_product); - if ($search_batch) $param .= '&search_batch='.urlencode($search_batch); - if ($search_warehouse > 0) $param .= '&search_warehouse='.urlencode($search_warehouse); - if ($search_user) $param .= '&search_user='.urlencode($search_user); - if ($idproduct > 0) $param .= '&idproduct='.urlencode($idproduct); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($id > 0) { + $param .= '&id='.urlencode($id); + } + if ($search_date_startday) { + $param .= '&search_date_startday='.urlencode($search_date_startday); + } + if ($search_date_startmonth) { + $param .= '&search_date_startmonth='.urlencode($search_date_startmonth); + } + if ($search_date_startyear) { + $param .= '&search_date_startyear='.urlencode($search_date_startyear); + } + if ($search_date_endday) { + $param .= '&search_date_endday='.urlencode($search_date_endday); + } + if ($search_date_endmonth) { + $param .= '&search_date_endmonth='.urlencode($search_date_endmonth); + } + if ($search_date_endyear) { + $param .= '&search_date_endyear='.urlencode($search_date_endyear); + } + if ($search_movement) { + $param .= '&search_movement='.urlencode($search_movement); + } + if ($search_inventorycode) { + $param .= '&search_inventorycode='.urlencode($search_inventorycode); + } + if ($search_type_mouvement) { + $param .= '&search_type_mouvement='.urlencode($search_type_mouvement); + } + if ($search_product_ref) { + $param .= '&search_product_ref='.urlencode($search_product_ref); + } + if ($search_product) { + $param .= '&search_product='.urlencode($search_product); + } + if ($search_batch) { + $param .= '&search_batch='.urlencode($search_batch); + } + if ($search_warehouse > 0) { + $param .= '&search_warehouse='.urlencode($search_warehouse); + } + if ($search_user) { + $param .= '&search_user='.urlencode($search_user); + } + if ($idproduct > 0) { + $param .= '&idproduct='.urlencode($idproduct); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - // 'presend'=>$langs->trans("SendByMail"), - // 'builddoc'=>$langs->trans("PDFMerge"), + // 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + // 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); // By default, we should never accept deletion of stock movement. - if (!empty($conf->global->STOCK_ALLOW_DELETE_OF_MOVEMENT) && $permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if (!empty($conf->global->STOCK_ALLOW_DELETE_OF_MOVEMENT) && $permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); + } + if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -742,10 +831,15 @@ if ($resql) print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="type" value="'.$type.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; - if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">'; + if ($id > 0) { + print '<input type="hidden" name="id" value="'.$id.'">'; + } - if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, '', '', $limit, 0, 0, 1); - else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, '', '', $limit, 0, 0, 1); + if ($id > 0) { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + } else { + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'movement', 0, '', '', $limit, 0, 0, 1); + } // Add code for pre mass action (confirmation or email presend form) $topicmail = "SendStockMovement"; @@ -754,9 +848,10 @@ if ($resql) $trackid = 'mov'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -764,11 +859,13 @@ if ($resql) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -782,90 +879,90 @@ if ($resql) // Fields title search print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['m.rowid']['checked'])) - { + if (!empty($arrayfields['m.rowid']['checked'])) { // Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth25" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['m.datem']['checked'])) - { + if (! empty($arrayfields['m.datem']['checked'])) { // Date - print '<td class="liste_titre nowraponall">'; - print '<input class="flat" type="text" size="2" maxlength="2" placeholder="'.dol_escape_htmltag($langs->trans("Month")).'" name="month" value="'.$month.'">'; - if (empty($conf->productbatch->enabled)) print '&nbsp;'; - //else print '<br>'; - $syear = $year ? $year : -1; - print '<input class="flat maxwidth50" type="text" maxlength="4" placeholder="'.dol_escape_htmltag($langs->trans("Year")).'" name="year" value="'.($syear > 0 ? $syear : '').'">'; - //print $formother->selectyear($syear,'year',1, 20, 5); + print '<td class="liste_titre center">'; + print '<div class="nowrap">'; + print $form->selectDate($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'), 'tzuserrel'); + print '</div>'; + print '<div class="nowrap">'; + print $form->selectDate($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'), 'tzuserrel'); + print '</div>'; print '</td>'; } - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { // Product Ref print '<td class="liste_titre left">'; print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct ? $product->ref : $search_product_ref).'">'; print '</td>'; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { // Product label print '<td class="liste_titre left">'; print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct ? $product->label : $search_product).'">'; print '</td>'; } // Batch - if (!empty($arrayfields['m.batch']['checked'])) - { + if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="liste_titre center"><input class="flat maxwidth75" type="text" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>'; } - if (!empty($arrayfields['pl.eatby']['checked'])) - { + if (!empty($arrayfields['pl.eatby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } - if (!empty($arrayfields['pl.sellby']['checked'])) - { + if (!empty($arrayfields['pl.sellby']['checked'])) { print '<td class="liste_titre left">'; print '</td>'; } // Warehouse - if (!empty($arrayfields['e.ref']['checked'])) - { + if (!empty($arrayfields['e.ref']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone left">'; //print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">'; print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['m.fk_user_author']['checked'])) - { + if (!empty($arrayfields['m.fk_user_author']['checked'])) { // Author print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.dol_escape_htmltag($search_user).'">'; print '</td>'; } - if (!empty($arrayfields['m.inventorycode']['checked'])) - { + if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="4" name="search_inventorycode" value="'.dol_escape_htmltag($search_inventorycode).'">'; print '</td>'; } - if (!empty($arrayfields['m.label']['checked'])) - { + if (!empty($arrayfields['m.label']['checked'])) { // Label of movement print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="8" name="search_movement" value="'.dol_escape_htmltag($search_movement).'">'; print '</td>'; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) - { + if (!empty($arrayfields['origin']['checked'])) { + // Origin of movement + print '<td class="liste_titre left">'; + print '&nbsp; '; + print '</td>'; + } + if (!empty($arrayfields['m.fk_projet']['checked'])) { + // fk_project + print '<td class="liste_titre" align="left">'; + print '&nbsp; '; + print '</td>'; + } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { // Type of movement print '<td class="liste_titre center">'; //print '<input class="flat" type="text" size="3" name="search_type_mouvement" value="'.dol_escape_htmltag($search_type_mouvement).'">'; print '<select id="search_type_mouvement" name="search_type_mouvement" class="maxwidth150">'; - print '<option value="" '.(($search_type_mouvement == "") ? 'selected="selected"' : '').'></option>'; + print '<option value="" '.(($search_type_mouvement == "") ? 'selected="selected"' : '').'>&nbsp;</option>'; print '<option value="0" '.(($search_type_mouvement == "0") ? 'selected="selected"' : '').'>'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</option>'; print '<option value="1" '.(($search_type_mouvement == "1") ? 'selected="selected"' : '').'>'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</option>'; print '<option value="2" '.(($search_type_mouvement == "2") ? 'selected="selected"' : '').'>'.$langs->trans('StockDecrease').'</option>'; @@ -876,35 +973,18 @@ if ($resql) // print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); print '</td>'; } - if (!empty($arrayfields['origin']['checked'])) - { - // Origin of movement - print '<td class="liste_titre left">'; - print '&nbsp; '; - print '</td>'; - } - if (!empty($arrayfields['m.value']['checked'])) - { + if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_qty" value="'.dol_escape_htmltag($search_qty).'">'; print '</td>'; } - if (!empty($arrayfields['m.price']['checked'])) - { + if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="liste_titre" align="left">'; print '&nbsp; '; print '</td>'; } - if (!empty($arrayfields['m.fk_projet']['checked'])) - { - // fk_project - print '<td class="liste_titre" align="left">'; - print '&nbsp; '; - print '</td>'; - } - // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -914,14 +994,12 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['m.datec']['checked'])) - { + if (!empty($arrayfields['m.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['m.tms']['checked'])) - { + if (!empty($arrayfields['m.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } @@ -937,7 +1015,7 @@ if ($resql) print_liste_field_titre($arrayfields['m.rowid']['label'], $_SERVER["PHP_SELF"], 'm.rowid', '', $param, '', $sortfield, $sortorder); } if (!empty($arrayfields['m.datem']['checked'])) { - print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['m.datem']['label'], $_SERVER["PHP_SELF"], 'm.datem', '', $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.ref']['checked'])) { print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); @@ -967,21 +1045,21 @@ if ($resql) if (!empty($arrayfields['m.label']['checked'])) { print_liste_field_titre($arrayfields['m.label']['label'], $_SERVER["PHP_SELF"], "m.label", "", $param, "", $sortfield, $sortorder); } - if (!empty($arrayfields['m.type_mouvement']['checked'])) { - print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); - } if (!empty($arrayfields['origin']['checked'])) { print_liste_field_titre($arrayfields['origin']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); } + if (!empty($arrayfields['m.fk_projet']['checked'])) { + print_liste_field_titre($arrayfields['m.fk_projet']['label'], $_SERVER["PHP_SELF"], "m.fk_projet", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { + print_liste_field_titre($arrayfields['m.type_mouvement']['label'], $_SERVER["PHP_SELF"], "m.type_mouvement", "", $param, '', $sortfield, $sortorder, 'center '); + } if (!empty($arrayfields['m.value']['checked'])) { print_liste_field_titre($arrayfields['m.value']['label'], $_SERVER["PHP_SELF"], "m.value", "", $param, '', $sortfield, $sortorder, 'right '); } if (!empty($arrayfields['m.price']['checked'])) { print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right '); } - if (!empty($arrayfields['m.fk_projet']['checked'])) { - print_liste_field_titre($arrayfields['m.fk_projet']['label'], $_SERVER["PHP_SELF"], "m.fk_projet", "", $param, 'align="right"', $sortfield, $sortorder); - } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -1004,8 +1082,7 @@ if ($resql) $i = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); $userstatic->id = $objp->fk_user_author; @@ -1013,6 +1090,8 @@ if ($resql) $userstatic->lastname = $objp->lastname; $userstatic->firstname = $objp->firstname; $userstatic->photo = $objp->photo; + $userstatic->email = $objp->user_email; + $userstatic->statut = $objp->user_status; $productstatic->id = $objp->rowid; $productstatic->ref = $objp->product_ref; @@ -1035,6 +1114,8 @@ if ($resql) $warehousestatic->fk_parent = $objp->fk_parent; $warehousestatic->statut = $objp->statut; + $movement->type = $objp->type_mouvement; + $arrayofuniqueproduct[$objp->rowid] = $objp->produit; if (!empty($objp->fk_origin)) { $origin = $movement->get_origin($objp->fk_origin, $objp->origintype); @@ -1044,131 +1125,117 @@ if ($resql) print '<tr class="oddeven">'; // Id movement - if (!empty($arrayfields['m.rowid']['checked'])) - { - print '<td>'.$objp->mid.'</td>'; // This is primary not movement id + if (!empty($arrayfields['m.rowid']['checked'])) { + print '<td>'; + print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); + print $objp->mid; + print '</td>'; // This is primary not movement id } - if (!empty($arrayfields['m.datem']['checked'])) - { + if (!empty($arrayfields['m.datem']['checked'])) { // Date - print '<td class="nowraponall">'.dol_print_date($db->jdate($objp->datem), 'dayhour', 'tzuserrel').'</td>'; + print '<td class="nowraponall center">'.dol_print_date($db->jdate($objp->datem), 'dayhour', 'tzuserrel').'</td>'; } - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { // Product ref print '<td class="nowraponall">'; print $productstatic->getNomUrl(1, 'stock', 16); print "</td>\n"; } - if (!empty($arrayfields['p.label']['checked'])) - { + if (!empty($arrayfields['p.label']['checked'])) { // Product label - print '<td>'; - /*$productstatic->id=$objp->rowid; - $productstatic->ref=$objp->produit; - $productstatic->type=$objp->type; - print $productstatic->getNomUrl(1,'',16);*/ + print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($productstatic->label).'">'; print $productstatic->label; print "</td>\n"; } - if (!empty($arrayfields['m.batch']['checked'])) - { + if (!empty($arrayfields['m.batch']['checked'])) { print '<td class="center nowraponall">'; - 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. + 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. + } print '</td>'; } - if (!empty($arrayfields['pl.eatby']['checked'])) - { + if (!empty($arrayfields['pl.eatby']['checked'])) { print '<td class="center">'.dol_print_date($objp->eatby, 'day').'</td>'; } - if (!empty($arrayfields['pl.sellby']['checked'])) - { + if (!empty($arrayfields['pl.sellby']['checked'])) { print '<td class="center">'.dol_print_date($objp->sellby, 'day').'</td>'; } // Warehouse - if (!empty($arrayfields['e.ref']['checked'])) - { - print '<td>'; + if (!empty($arrayfields['e.ref']['checked'])) { + print '<td class="tdoverflowmax100">'; print $warehousestatic->getNomUrl(1); print "</td>\n"; } // Author - if (!empty($arrayfields['m.fk_user_author']['checked'])) - { + if (!empty($arrayfields['m.fk_user_author']['checked'])) { print '<td class="tdoverflowmax100">'; print $userstatic->getNomUrl(-1); print "</td>\n"; } - if (!empty($arrayfields['m.inventorycode']['checked'])) - { + if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code - print '<td><a href="' - .DOL_URL_ROOT.'/product/stock/movement_card.php?id='.urlencode($objp->entrepot_id) - .'&search_inventorycode='.urlencode($objp->inventorycode) - .'&search_type_mouvement='.urlencode($objp->type_mouvement) - .'">'.$objp->inventorycode.'</a></td>'; + print '<td><a href="'.$_SERVER["PHP_SELF"].'?search_inventorycode='.urlencode('^'.$objp->inventorycode.'$').'&search_type_mouvement='.urlencode($objp->type_mouvement).'">'.$objp->inventorycode.'</a></td>'; } - if (!empty($arrayfields['m.label']['checked'])) - { + if (!empty($arrayfields['m.label']['checked'])) { // Label of movement - print '<td class="tdoverflowmax100aaa">'.$objp->label.'</td>'; + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objp->label).'">'.$objp->label.'</td>'; } - if (!empty($arrayfields['m.type_mouvement']['checked'])) - { - // Type of movement - switch ($objp->type_mouvement) { - case "0": - print '<td class="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>'; - break; - case "1": - print '<td class="center">'.$langs->trans('StockDecreaseAfterCorrectTransfer').'</td>'; - break; - case "2": - print '<td class="center">'.$langs->trans('StockDecrease').'</td>'; - break; - case "3": - print '<td class="center">'.$langs->trans('StockIncrease').'</td>'; - break; - } - } - if (!empty($arrayfields['origin']['checked'])) - { + if (!empty($arrayfields['origin']['checked'])) { // Origin of movement print '<td class="nowraponall">'.$origin.'</td>'; } - if (!empty($arrayfields['m.value']['checked'])) - { + if (!empty($arrayfields['m.fk_projet']['checked'])) { + // fk_project + print '<td>'; + if ($objp->fk_project != 0) { + print $movement->get_origin($objp->fk_project, 'project'); + } + print '</td>'; + } + if (!empty($arrayfields['m.type_mouvement']['checked'])) { + // Type of movement + print '<td class="center">'; + print $movement->getTypeMovement(); + print '</td>'; + } + if (!empty($arrayfields['m.value']['checked'])) { // Qty print '<td class="right">'; - if ($objp->qt > 0) print '+'; - print $objp->qty; + if ($objp->qty > 0) { + print '<span class="stockmovemententry">'; + print '+'; + print $objp->qty; + print '</span>'; + } else { + print '<span class="stockmovementexit">'; + print $objp->qty; + print '</span>'; + } print '</td>'; } - if (!empty($arrayfields['m.price']['checked'])) - { + if (!empty($arrayfields['m.price']['checked'])) { // Price print '<td class="right">'; - if ($objp->price != 0) print price($objp->price); - print '</td>'; - } - if (!empty($arrayfields['m.fk_projet']['checked'])) - { - // fk_project - print '<td align="right">'; - if ($objp->fk_project != 0) print $movement->get_origin($objp->fk_project, 'project'); + if ($objp->price != 0) { + print price($objp->price); + } print '</td>'; } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($objp->mid, $arrayofselected)) $selected = 1; + if (in_array($objp->mid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$objp->mid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objp->mid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; $i++; @@ -1180,13 +1247,11 @@ if ($resql) print "</form>"; // Add number of product when there is a filter on period - if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) - { + if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) { print "<br>"; $productidselected = 0; - foreach ($arrayofuniqueproduct as $key => $val) - { + foreach ($arrayofuniqueproduct as $key => $val) { $productidselected = $key; $productlabelselected = $val; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index d1c1ea99ff7..b97e9b6c2d2 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -55,7 +55,9 @@ if (!empty($conf->variants->enabled)) { // Load translation files required by the page $langs->loadlangs(array('products', 'suppliers', 'orders', 'bills', 'stocks', 'sendings', 'margins')); -if (!empty($conf->productbatch->enabled)) $langs->load("productbatch"); +if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); +} $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -76,7 +78,9 @@ if (!empty($batchnumber)) { } // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit&stock', $id, 'product&product', '', '', $fieldid); @@ -86,20 +90,20 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); } -if (empty($id) && !empty($object->id)) $id = $object->id; +if (empty($id) && !empty($object->id)) { + $id = $object->id; +} $modulepart = 'product'; // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $canvas = !empty($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('stockproduct', 'card', $canvas); @@ -115,14 +119,17 @@ $error = 0; * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} $parameters = array('id'=>$id, 'ref'=>$ref, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer)) -{ +if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer)) { $seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $desiredstock = GETPOST('desiredstock'); @@ -142,14 +149,18 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) // Update $pse->seuil_stock_alerte = $seuil_stock_alerte; $pse->desiredstock = $desiredstock; - if ($pse->update($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseUpdated'), null, 'mesgs'); + if ($pse->update($user) > 0) { + setEventMessages($langs->trans('ProductStockWarehouseUpdated'), null, 'mesgs'); + } } else { // Create $pse->fk_entrepot = GETPOST('fk_entrepot', 'int'); $pse->fk_product = $id; $pse->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $pse->desiredstock = GETPOST('desiredstock'); - if ($pse->create($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseCreated'), null, 'mesgs'); + if ($pse->create($user) > 0) { + setEventMessages($langs->trans('ProductStockWarehouseCreated'), null, 'mesgs'); + } } } @@ -157,66 +168,62 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) exit; } -if ($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->creer)) -{ +if ($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->creer)) { $pse = new ProductStockEntrepot($db); $pse->fetch(GETPOST('fk_productstockwarehouse', 'int')); - if ($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs'); + if ($pse->delete($user) > 0) { + setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs'); + } $action = ''; } // Set stock limit -if ($action == 'setseuil_stock_alerte' && !empty($user->rights->produit->creer)) -{ +if ($action == 'setseuil_stock_alerte' && !empty($user->rights->produit->creer)) { $object = new Product($db); $result = $object->fetch($id); $object->seuil_stock_alerte = $stocklimit; $result = $object->update($object->id, $user, 0, 'update'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } //else // setEventMessages($lans->trans("SavedRecordSuccessfully"), null, 'mesgs'); $action = ''; } // Set desired stock -if ($action == 'setdesiredstock' && !empty($user->rights->produit->creer)) -{ +if ($action == 'setdesiredstock' && !empty($user->rights->produit->creer)) { $object = new Product($db); $result = $object->fetch($id); $object->desiredstock = $desiredstock; $result = $object->update($object->id, $user, 0, 'update'); - if ($result < 0) + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); + } $action = ''; } // Correct stock -if ($action == "correct_stock" && !$cancel) -{ - if (!(GETPOST("id_entrepot", 'int') > 0)) - { +if ($action == "correct_stock" && !$cancel) { + if (!(GETPOST("id_entrepot", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; $action = 'correction'; } - if (!GETPOST("nbpiece")) - { + if (!GETPOST("nbpiece")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; $action = 'correction'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { $object = new Product($db); $result = $object->fetch($id); - if ($object->hasbatch() && !$batchnumber) - { + if ($object->hasbatch() && !$batchnumber) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; $action = 'correction'; @@ -293,43 +300,35 @@ if ($action == "correct_stock" && !$cancel) } // Transfer stock from a warehouse to another warehouse -if ($action == "transfert_stock" && !$cancel) -{ - if (!(GETPOST("id_entrepot", 'int') > 0) || !(GETPOST("id_entrepot_destination", 'int') > 0)) - { +if ($action == "transfert_stock" && !$cancel) { + if (!(GETPOST("id_entrepot", 'int') > 0) || !(GETPOST("id_entrepot_destination", 'int') > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; $action = 'transfert'; } - if (!GETPOST("nbpiece", 'int')) - { + if (!GETPOST("nbpiece", 'int')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; $action = 'transfert'; } - if (GETPOST("id_entrepot", 'int') == GETPOST("id_entrepot_destination", 'int')) - { + if (GETPOST("id_entrepot", 'int') == GETPOST("id_entrepot_destination", 'int')) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; $action = 'transfert'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { $object = new Product($db); $result = $object->fetch($id); - if ($object->hasbatch() && !$batchnumber) - { + if ($object->hasbatch() && !$batchnumber) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; $action = 'transfert'; } } - if (!$error) - { - if ($id) - { + if (!$error) { + if ($id) { $object = new Product($db); $result = $object->fetch($id); @@ -339,20 +338,19 @@ if ($action == "transfert_stock" && !$cancel) // Define value of products moved $pricesrc = 0; - if (isset($object->pmp)) $pricesrc = $object->pmp; + if (isset($object->pmp)) { + $pricesrc = $object->pmp; + } $pricedest = $pricesrc; $nbpiece = price2num(GETPOST("nbpiece", 'alphanohtml')); - if ($object->hasbatch()) - { + if ($object->hasbatch()) { $pdluo = new Productbatch($db); - if ($pdluoid > 0) - { + if ($pdluoid > 0) { $result = $pdluo->fetch($pdluoid); - if ($result) - { + if ($result) { $srcwarehouseid = $pdluo->warehouseid; $batch = $pdluo->batch; $eatby = $pdluo->eatby; @@ -370,8 +368,7 @@ if ($action == "transfert_stock" && !$cancel) $nbpiece = price2num(GETPOST("nbpiece", 'alphanohtml')); - if (!$error) - { + if (!$error) { // Remove stock $result1 = $object->correct_stock_batch( $user, @@ -380,13 +377,16 @@ if ($action == "transfert_stock" && !$cancel) 1, GETPOST("label", 'alphanohtml'), $pricesrc, - $eatby, $sellby, $batch, + $eatby, + $sellby, + $batch, GETPOST('inventorycode', 'alphanohtml') ); - if ($result1 < 0) $error++; + if ($result1 < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Add stock $result2 = $object->correct_stock_batch( $user, @@ -395,14 +395,17 @@ if ($action == "transfert_stock" && !$cancel) 0, GETPOST("label", 'alphanohtml'), $pricedest, - $eatby, $sellby, $batch, + $eatby, + $sellby, + $batch, GETPOST('inventorycode', 'alphanohtml') ); - if ($result2 < 0) $error++; + if ($result2 < 0) { + $error++; + } } } else { - if (!$error) - { + if (!$error) { // Remove stock $result1 = $object->correct_stock( $user, @@ -413,10 +416,11 @@ if ($action == "transfert_stock" && !$cancel) $pricesrc, GETPOST('inventorycode', 'alphanohtml') ); - if ($result1 < 0) $error++; + if ($result1 < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { // Add stock $result2 = $object->correct_stock( $user, @@ -427,17 +431,17 @@ if ($action == "transfert_stock" && !$cancel) $pricedest, GETPOST('inventorycode', 'alphanohtml') ); - if ($result2 < 0) $error++; + if ($result2 < 0) { + $error++; + } } } - if (!$error && $result1 >= 0 && $result2 >= 0) - { + if (!$error && $result1 >= 0 && $result2 >= 0) { $db->commit(); - if ($backtopage) - { + if ($backtopage) { header("Location: ".$backtopage); exit; } else { @@ -454,15 +458,12 @@ if ($action == "transfert_stock" && !$cancel) } // Update batch information -if ($action == 'updateline' && GETPOST('save') == $langs->trans("Save")) -{ +if ($action == 'updateline' && GETPOST('save') == $langs->trans("Save")) { $pdluo = new Productbatch($db); $result = $pdluo->fetch(GETPOST('pdluoid', 'int')); - if ($result > 0) - { - if ($pdluo->id) - { + if ($result > 0) { + if ($pdluo->id) { if ((!GETPOST("sellby")) && (!GETPOST("eatby")) && (!$batchnumber)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("atleast1batchfield")), null, 'errors'); } else { @@ -472,8 +473,7 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans("Save")) $pdluo->eatby = $d_eatby; $pdluo->sellby = $d_sellby; $result = $pdluo->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($pdluo->error, $pdluo->errors, 'errors'); } } @@ -495,10 +495,11 @@ if ($action == 'updateline' && GETPOST('save') == $langs->trans("Save")) $form = new Form($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} -if ($id > 0 || $ref) -{ +if ($id > 0 || $ref) { $object = new Product($db); $result = $object->fetch($id, $ref); @@ -509,21 +510,18 @@ if ($id > 0 || $ref) $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); - if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) - { + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Stock'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } - if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) - { + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Stock'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } llxHeader('', $title, $helpurl); - if ($result > 0) - { + if ($result > 0) { $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -535,7 +533,9 @@ if ($id > 0 || $ref) $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); @@ -564,9 +564,13 @@ if ($id > 0 || $ref) print '</td></tr>'; // AWP - print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>'; + print '<tr><td class="titlefield">'; + print $form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")); + print '</td>'; print '<td>'; - if ($object->pmp > 0) print price($object->pmp).' '.$langs->trans("HT"); + if ($object->pmp > 0) { + print price($object->pmp).' '.$langs->trans("HT"); + } print '</td>'; print '</tr>'; @@ -575,8 +579,11 @@ if ($id > 0 || $ref) print '<td>'; $product_fourn = new ProductFournisseur($db); if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0) { - if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(); - else print $langs->trans("NotDefined"); + if ($product_fourn->product_fourn_price_id > 0) { + print $product_fourn->display_price_product_fournisseur(); + } else { + print $langs->trans("NotDefined"); + } } print '</td></tr>'; @@ -648,7 +655,9 @@ if ($id > 0 || $ref) print $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1); print '</td>'; print '<td>'.price2num($object->stock_reel, 'MS'); - if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte)); + if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) { + print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte)); + } print ' &nbsp; &nbsp;<a href="'.DOL_URL_ROOT.'/product/stock/stockatdate.php?productid='.$object->id.'">'.$langs->trans("StockAtDate").'</a>'; print '</td>'; @@ -660,10 +669,16 @@ if ($id > 0 || $ref) $helpondiff = '<strong>'.$langs->trans("StockDiffPhysicTeoric").':</strong><br>'; // Number of customer orders running if (!empty($conf->commande->enabled)) { - if ($found) $helpondiff .= '<br>'; else $found = 1; + if ($found) { + $helpondiff .= '<br>'; + } else { + $found = 1; + } $helpondiff .= $langs->trans("ProductQtyInCustomersOrdersRunning").': '.$object->stats_commande['qty']; $result = $object->load_stats_commande(0, '0', 1); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } $helpondiff .= ' ('.$langs->trans("ProductQtyInDraft").': '.$object->stats_commande['qty'].')'; } @@ -676,31 +691,48 @@ if ($id > 0 || $ref) } elseif (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { $filterShipmentStatus = Expedition::STATUS_CLOSED; } - if ($found) $helpondiff .= '<br>'; else $found = 1; + if ($found) { + $helpondiff .= '<br>'; + } else { + $found = 1; + } $result = $object->load_stats_sending(0, '2', 1, $filterShipmentStatus); $helpondiff .= $langs->trans("ProductQtyInShipmentAlreadySent").': '.$object->stats_expedition['qty']; } // Number of supplier order running - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - { - if ($found) $helpondiff .= '<br>'; else $found = 1; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ($found) { + $helpondiff .= '<br>'; + } else { + $found = 1; + } $result = $object->load_stats_commande_fournisseur(0, '3,4', 1); $helpondiff .= $langs->trans("ProductQtyInSuppliersOrdersRunning").': '.$object->stats_commande_fournisseur['qty']; $result = $object->load_stats_commande_fournisseur(0, '0,1,2', 1); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + dol_print_error($db, $object->error); + } $helpondiff .= ' ('.$langs->trans("ProductQtyInDraftOrWaitingApproved").': '.$object->stats_commande_fournisseur['qty'].')'; } // Number of product from supplier order already received (partial receipt) - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { - if ($found) $helpondiff .= '<br>'; else $found = 1; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { + if ($found) { + $helpondiff .= '<br>'; + } else { + $found = 1; + } $helpondiff .= $langs->trans("ProductQtyInSuppliersShipmentAlreadyRecevied").': '.$object->stats_reception['qty']; } // Number of product in production if (!empty($conf->mrp->enabled)) { - if ($found) $helpondiff .= '<br>'; else $found = 1; + if ($found) { + $helpondiff .= '<br>'; + } else { + $found = 1; + } $helpondiff .= $langs->trans("ProductQtyToConsumeByMO").': '.$object->stats_mrptoconsume['qty'].'<br>'; $helpondiff .= $langs->trans("ProductQtyToProduceByMO").': '.$object->stats_mrptoproduce['qty']; } @@ -713,14 +745,15 @@ if ($id > 0 || $ref) print "<td>"; //print (empty($stocktheo)?0:$stocktheo); print $form->textwithpicto((empty($stocktheo) ? 0 : $stocktheo), $helpondiff); - if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte)); + if ($object->seuil_stock_alerte != '' && ($object->stock_theorique < $object->seuil_stock_alerte)) { + print ' '.img_warning($langs->trans("StockLowerThanLimit", $object->seuil_stock_alerte)); + } print ' &nbsp; &nbsp;<a href="'.DOL_URL_ROOT.'/product/stock/stockatdate.php?mode=future&productid='.$object->id.'">'.$langs->trans("VirtualStockAtDate").'</a>'; print '</td>'; print '</tr>'; // Last movement - if (!empty($user->rights->stock->mouvement->lire)) - { + if (!empty($user->rights->stock->mouvement->lire)) { $sql = "SELECT max(m.datem) as datem"; $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " WHERE m.fk_product = ".((int) $object->id); @@ -734,8 +767,11 @@ if ($id > 0 || $ref) print '<tr><td class="tdtop">'.$langs->trans("LastMovement").'</td><td>'; if ($lastmovementdate) { print dol_print_date($lastmovementdate, 'dayhour').' '; - print ' &nbsp; &nbsp;<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("FullList").'</a>'; + print ' &nbsp; &nbsp; '; + print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); + print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("FullList").'</a>'; } else { + print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$object->id.'">'.$langs->trans("None").'</a>'; } print "</td></tr>"; @@ -754,15 +790,13 @@ if ($id > 0 || $ref) } // Correct stock - if ($action == "correction") - { + if ($action == "correction") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stockcorrection.tpl.php'; print '<br><br>'; } // Transfer of units - if ($action == "transfert") - { + if ($action == "transfert") { include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php'; print '<br><br>'; } @@ -776,30 +810,25 @@ if ($id > 0 || $ref) $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook -if (empty($reshook)) -{ - if (empty($action) && $object->id) - { +if (empty($reshook)) { + if (empty($action) && $object->id) { print "<div class=\"tabsAction\">\n"; - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { if (!$variants || !empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=correction">'.$langs->trans("CorrectStock").'</a>'; + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=transfert">'.$langs->trans("TransferStock").'</a>'; } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ActionAvailableOnVariantProductOnly").'">'.$langs->trans("CorrectStock").'</a>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ActionAvailableOnVariantProductOnly").'">'.$langs->trans("TransferStock").'</a>'; } } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CorrectStock").'</a>'; } - //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) - if ($user->rights->stock->mouvement->creer) - { + if ($user->rights->stock->mouvement->creer) { if (!$variants || !empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=transfert">'.$langs->trans("TransferStock").'</a>'; + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=correction">'.$langs->trans("CorrectStock").'</a>'; } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ActionAvailableOnVariantProductOnly").'">'.$langs->trans("TransferStock").'</a>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("ActionAvailableOnVariantProductOnly").'">'.$langs->trans("CorrectStock").'</a>'; } } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CorrectStock").'</a>'; @@ -825,28 +854,32 @@ if (!$variants) { print '<td class="right">'.$langs->trans("EstimatedStockValueShort").'</td>'; print '<td class="right">'.$langs->trans("SellPriceMin").'</td>'; print '<td class="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>'; + print '<td></td>'; + print '<td></td>'; print '</tr>'; if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) { $colspan = 3; - print '<tr class="liste_titre"><td width="10%"></td>'; - print '<td class="right" width="10%">'.$langs->trans("batch_number").'</td>'; + print '<tr class="liste_titre"><td class="width25"></td>'; + print '<td class="right">'.$langs->trans("batch_number").'</td>'; if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { $colspan--; - print '<td class="center" width="10%">'.$langs->trans("EatByDate").'</td>'; + print '<td class="center width75">'.$langs->trans("EatByDate").'</td>'; } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $colspan--; - print '<td class="center" width="10%">'.$langs->trans("SellByDate").'</td>'; + print '<td class="center width75">'.$langs->trans("SellByDate").'</td>'; } print '<td colspan="'.$colspan.'"></td>'; print '<td></td>'; print '<td></td>'; print '<td></td>'; print '<td></td>'; + print '<td></td>'; + print '<td></td>'; print '</tr>'; } - $sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp"; + $sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut as status, ps.reel, ps.rowid as product_stock_id, p.pmp"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; $sql .= " ".MAIN_DB_PREFIX."product_stock as ps"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product"; @@ -876,7 +909,8 @@ if (!$variants) { $entrepotstatic->label = $obj->ref; $entrepotstatic->lieu = $obj->lieu; $entrepotstatic->fk_parent = $obj->fk_parent; - $entrepotstatic->statut = $obj->statut; + $entrepotstatic->statut = $obj->status; + $entrepotstatic->status = $obj->status; $stock_real = price2num($obj->reel, 'MS'); print '<tr class="oddeven">'; @@ -888,22 +922,35 @@ if (!$variants) { print '<td class="right">'.(price2num($object->pmp) ? price(price2num($object->pmp * $obj->reel, 'MT')) : '').'</td>'; // Sell price print '<td class="right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price, 'MU'), 1); - else print $langs->trans("Variable"); + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print price(price2num($object->price, 'MU'), 1); + } else { + print $langs->trans("Variable"); + } print '</td>'; // Value sell print '<td class="right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($object->price * $obj->reel, 'MT'), 1).'</td>'; - else print $langs->trans("Variable"); + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print price(price2num($object->price * $obj->reel, 'MT'), 1); + } else { + print $langs->trans("Variable"); + } + print '</td>'; + print '<td></td>'; + print '<td></td>'; print '</tr>'; $total += $obj->reel; - if (price2num($object->pmp)) $totalwithpmp += $obj->reel; + if (price2num($object->pmp)) { + $totalwithpmp += $obj->reel; + } $totalvalue = $totalvalue + ($object->pmp * $obj->reel); $totalvaluesell = $totalvaluesell + ($object->price * $obj->reel); // Batch Detail if ((!empty($conf->productbatch->enabled)) && $object->hasbatch()) { $details = Productbatch::findAll($db, $obj->product_stock_id, 0, $object->id); - if ($details < 0) dol_print_error($db); + if ($details < 0) { + dol_print_error($db); + } foreach ($details as $pdluo) { $product_lot_static->id = $pdluo->lotid; $product_lot_static->batch = $pdluo->batch; @@ -932,16 +979,14 @@ if (!$variants) { print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="Cancel" value="'.$langs->trans("Cancel").'"></td></tr>'; print '</table>'; print '</form>'; - print '</td></tr>'; + print '</td>'; + print '<td></td>'; + print '<td></td>'; + print '</tr>'; } else { - print "\n".'<tr><td class="right">'; - print img_picto($langs->trans("Tranfer"), 'uparrow', 'class="hideonsmartphone"').' '; - print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;id_entrepot='.$entrepotstatic->id.'&amp;action=transfert&amp;pdluoid='.$pdluo->id.'">'.$langs->trans("TransferStock").'</a>'; - // Disabled, because edition of stock content must use the "Correct stock menu". - // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... - //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;lineid='.$pdluo->id.'#'.$pdluo->id.'">'; - //print img_edit().'</a></td>'; - print '<td class="right">'; + print "\n".'<tr><td class="left">'; + print '</td>'; + print '<td class="right nowraponall">'; print $product_lot_static->getNomUrl(1); print '</td>'; $colspan = 3; @@ -955,13 +1000,39 @@ if (!$variants) { } print '<td class="right" colspan="'.$colspan.'">'.$pdluo->qty.($pdluo->qty < 0 ? ' '.img_warning() : '').'</td>'; print '<td colspan="4"></td>'; + print '<td>'; + if ($entrepotstatic->status != $entrepotstatic::STATUS_CLOSED) { + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;id_entrepot='.$entrepotstatic->id.'&amp;action=transfert&amp;pdluoid='.$pdluo->id.'">'; + print img_picto($langs->trans("TransferStock"), 'add', 'class="hideonsmartphone paddingright" style="color: #a69944"'); + print $langs->trans("TransferStock"); + print '</a>'; + // Disabled, because edition of stock content must use the "Correct stock menu". + // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... + //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;lineid='.$pdluo->id.'#'.$pdluo->id.'">'; + //print img_edit().'</a>'; + } + print '</td>'; + print '<td>'; + if ($entrepotstatic->status != $entrepotstatic::STATUS_CLOSED) { + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;id_entrepot='.$entrepotstatic->id.'&amp;action=correction&amp;pdluoid='.$pdluo->id.'">'; + print img_picto($langs->trans("CorrectStock"), 'add', 'class="hideonsmartphone paddingright" style="color: #a69944"'); + print $langs->trans("CorrectStock"); + print '</a>'; + // Disabled, because edition of stock content must use the "Correct stock menu". + // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... + //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;lineid='.$pdluo->id.'#'.$pdluo->id.'">'; + //print img_edit().'</a>'; + } + print '</td>'; print '</tr>'; } } } $i++; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } // Total line print '<tr class="liste_total"><td class="right liste_total" colspan="4">'.$langs->trans("Total").':</td>'; @@ -974,14 +1045,22 @@ if (!$variants) { print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : '&nbsp;'; print '</td>'; print '<td class="liste_total right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;'); - else print $langs->trans("Variable"); + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;'); + } else { + print $langs->trans("Variable"); + } print '</td>'; // Value to sell print '<td class="liste_total right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1); - else print $langs->trans("Variable"); + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print price(price2num($totalvaluesell, 'MT'), 1); + } else { + print $langs->trans("Variable"); + } print '</td>'; + print '<td></td>'; + print '<td></td>'; print "</tr>"; print "</table>"; @@ -1068,11 +1147,9 @@ if (!$variants) { </tr> <?php - if (count($productCombinations)) - { + if (count($productCombinations)) { $stock_total = 0; - foreach ($productCombinations as $currcomb) - { + foreach ($productCombinations as $currcomb) { $prodstatic->fetch($currcomb->fk_product_child); $prodstatic->load_stock(); $stock_total += $prodstatic->stock_reel; diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 26c388c6b34..646f3d322d7 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -36,8 +36,35 @@ $langs->loadLangs(array('stocks', 'other', 'productbatch')); // Get parameters $id = GETPOST('id', 'int'); -$action = GETPOST('action', '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 $backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object = new ProductLot($db); +$extrafields = new ExtraFields($db); +$hookmanager->initHooks(array('productlotcard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$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 (empty($action) && empty($id) && empty($ref)) { + $action = 'view'; +} + $batch = GETPOST('batch', 'alpha'); $productid = GETPOST('productid', 'int'); $ref = GETPOST('ref', 'alpha'); // ref is productid_batch @@ -49,30 +76,14 @@ $search_fk_user_creat = GETPOST('search_fk_user_creat', 'int'); $search_fk_user_modif = GETPOST('search_fk_user_modif', 'int'); $search_import_key = GETPOST('search_import_key', 'int'); -if (empty($action) && empty($id) && empty($ref)) $action = 'list'; - - -// Protection if external user -if ($user->socid > 0) -{ - //accessforbidden(); +if (empty($action) && empty($id) && empty($ref)) { + $action = 'list'; } -//$result = restrictedArea($user, 'mymodule', $id); - - -$object = new ProductLot($db); -$extrafields = new ExtraFields($db); -$formfile = new FormFile($db); - -// 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. Include fetch and fetch_thirdparty but not fetch_optionals -if ($id || $ref) -{ - if ($ref) - { +if ($id || $ref) { + if ($ref) { $tmp = explode('_', $ref); $productid = $tmp[0]; $batch = $tmp[1]; @@ -93,16 +104,40 @@ $usercanread = $user->rights->produit->lire; $usercancreate = $user->rights->produit->creer; $usercandelete = $user->rights->produit->supprimer; +$upload_dir = $conf->productbatch->multidir_output[$conf->entity]; + +$permissiontoread = $usercanread; +$permissiontoadd = $usercancreate; +//$permissiontodelete = $usercandelete; + +// Security check +if (empty($conf->productbatch->enabled)) { + accessforbidden('Module not enabled'); +} +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +//$result = restrictedArea($user, 'productbatch'); +if (!$permissiontoread) accessforbidden(); + + /* * 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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +if (empty($reshook)) { + $error = 0; + + $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1); -if (empty($reshook)) -{ if ($action == 'seteatby' && $user->rights->stock->creer) { $newvalue = dol_mktime(12, 0, 0, GETPOST('eatbymonth', 'int'), GETPOST('eatbyday', 'int'), GETPOST('eatbyyear', 'int')); $result = $object->setValueFrom('eatby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); @@ -125,6 +160,11 @@ if (empty($reshook)) } } + $triggermodname = 'PRODUCT_LOT_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'; + /* if ($action == 'update_extras') { $object->oldcopy = dol_clone($object); @@ -161,8 +201,6 @@ if (empty($reshook)) $error = 0; - /* object_prop_getpost_prop */ - $object->entity = GETPOST('entity', 'int'); $object->fk_product = GETPOST('fk_product', 'int'); $object->batch = GETPOST('batch', 'alpha'); @@ -250,11 +288,15 @@ if (empty($reshook)) else setEventMessages($object->error, null, 'errors'); } } - - // Actions to build doc - $upload_dir = $conf->productbatch->multidir_output[$conf->entity]; - $permissiontoadd = $usercancreate; + */ + // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + + // Actions to send emails + $triggersendname = 'PRODUCT_LOT_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_PRODUCT_LOT_TO'; + $trackid = 'productlot'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; } @@ -264,69 +306,100 @@ if (empty($reshook)) * View */ -llxHeader('', 'ProductLot', ''); - $form = new Form($db); +$formfile = new FormFile($db); + +$title = $langs->trans("ProductLot"); +$help_url = ''; +llxHeader('', $title, $help_url); + // Part to create -if ($action == 'create') -{ - print load_fiche_titre($langs->trans("Batch")); +if ($action == 'create') { + print load_fiche_titre($langs->trans("Batch"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } - print dol_get_fiche_head(); + print dol_get_fiche_head(array(), ''); - print '<table class="border centpercent">'."\n"; - // print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>'; - // - print '<tr><td class="fieldrequired">'.$langs->trans("Fieldfk_product").'</td><td><input class="flat" type="text" name="fk_product" value="'.GETPOST('fk_product').'"></td></tr>'; - print '<tr><td class="fieldrequired">'.$langs->trans("Fieldbatch").'</td><td><input class="flat" type="text" name="batch" value="'.GETPOST('batch').'"></td></tr>'; - print '<tr><td class="fieldrequired">'.$langs->trans("Fieldfk_user_creat").'</td><td><input class="flat" type="text" name="fk_user_creat" value="'.GETPOST('fk_user_creat').'"></td></tr>'; - print '<tr><td class="fieldrequired">'.$langs->trans("Fieldfk_user_modif").'</td><td><input class="flat" type="text" name="fk_user_modif" value="'.GETPOST('fk_user_modif').'"></td></tr>'; - print '<tr><td class="fieldrequired">'.$langs->trans("Fieldimport_key").'</td><td><input class="flat" type="text" name="import_key" value="'.GETPOST('import_key').'"></td></tr>'; + // Set some default values + //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue'; + + print '<table class="border centpercent tableforfieldcreate">'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; print '</table>'."\n"; print dol_get_fiche_end(); - print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'"></div>'; + print '<div class="center">'; + print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; + print '&nbsp; '; + print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage + print '</div>'; print '</form>'; + + //dol_set_focus('input[name="ref"]'); } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); - //print load_fiche_titre($langs->trans("Batch")); - $head = productlot_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("Batch"), -1, 'barcode'); + print dol_get_fiche_head($head, 'card', $langs->trans("Batch"), -1, $object->picto); + $formconfirm = ''; + // Confirmation to delete if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBatch'), $langs->trans('ConfirmDeleteBatch'), 'confirm_delete', '', 0, 1); - print $formconfirm; } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $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; + + // Object card + // ------------------------------------------------------------ $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/productlot_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } - dol_banner_tab($object, 'id', $linkback, $shownav, 'rowid', 'batch'); + $morehtmlref = ''; + + dol_banner_tab($object, 'id', $linkback, $shownav, 'rowid', 'batch', $morehtmlref); print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - - print '<table class="border centpercent">'."\n"; + print '<table class="border centpercent tableforfield">'."\n"; // Product print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>'; @@ -354,6 +427,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</td>'; print '</tr>'; } + // Other attributes include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; @@ -361,59 +435,76 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</div>'; + print '<div class="clearboth"></div>'; + print dol_get_fiche_end(); - - // Buttons - print '<div class="tabsAction">'."\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)) - { - /*TODO if ($user->rights->stock->lire) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n"; - } - - if ($user->rights->stock->supprimer) - { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a></div>'."\n"; - } - */ - } - print '</div>'."\n"; - - + // Link to other lists print '<a href="'.DOL_URL_ROOT.'/product/reassortlot.php?sref='.urlencode($producttmp->ref).'&search_batch='.urlencode($object->batch).'">'.$langs->trans("ShowCurrentStockOfLot").'</a><br>'; print '<br>'; print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?search_product_ref='.urlencode($producttmp->ref).'&search_batch='.urlencode($object->batch).'">'.$langs->trans("ShowLogOfMovementIfLot").'</a><br>'; print '<br>'; + + + // Buttons for actions + if ($action != 'presend' && $action != 'editline') { + print '<div class="tabsAction">'."\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)) { + /*TODO if ($user->rights->stock->lire) + { + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n"; + } + + if ($user->rights->stock->supprimer) + { + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a></div>'."\n"; + } + */ + } + + print '</div>'."\n"; + } } /* - * Documents generes + * Generated documents */ -if (empty($action) || $action == 'view') -{ +if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre + $includedocgeneration = 1; + // Documents - $filedir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product_batch'); - $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $usercanread; - $delallowed = $usercancreate; + if ($includedocgeneration) { + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product_batch'); + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $usercanread; // If you can read, you can build the PDF to read content + $delallowed = $usercancreate; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $langs->default_lang, '', $object); + } - print $formfile->showdocuments('product_batch', dol_sanitizeFileName($object->ref), $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); - $somethingshown = $formfile->numoffiles; + print '</div><div class="fichehalfright"><div class="ficheaddleft">'; - print '</div>'; + $MAXEVENT = 10; + + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'productlot', 0, 1, '', $MAXEVENT); + + print '</div></div></div>'; } // End of page diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index e6b9bb927b8..5b19288deff 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -48,7 +48,9 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : ''); $fieldtype = 'rowid'; -if ($user->socid) $socid = $user->socid; +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 @@ -59,19 +61,23 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $modulepart = 'product_batch'; $object = new Productlot($db); -if ($id || $ref) -{ - if ($ref) - { +if ($id || $ref) { + if ($ref) { $tmp = explode('_', $ref); $productid = $tmp[0]; $batch = $tmp[1]; @@ -79,9 +85,33 @@ if ($id || $ref) $object->fetch($id, $productid, $batch); $object->ref = $object->batch; // For document management ( it use $object->ref) - if (!empty($conf->productbatch->enabled)) $upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, $modulepart); + if (!empty($conf->productbatch->enabled)) { + $upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, $modulepart); + } } +$usercanread = $user->rights->produit->lire; +$usercancreate = $user->rights->produit->creer; +$usercandelete = $user->rights->produit->supprimer; + +$upload_dir = $conf->productbatch->multidir_output[$conf->entity]; + +$permissiontoread = $usercanread; +$permissiontoadd = $usercancreate; +//$permissiontodelete = $usercandelete; + +// Security check +if (empty($conf->productbatch->enabled)) { + accessforbidden('Module not enabled'); +} +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +//$result = restrictedArea($user, 'productbatch'); +if (!$permissiontoread) accessforbidden(); + /* * Actions @@ -89,12 +119,13 @@ if ($id || $ref) $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Action submit/delete file/link - include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } $permtoedit = $user->rights->produit->creer; @@ -109,8 +140,7 @@ $form = new Form($db); llxHeader('', $langs->trans('ProductLot'), ''); -if ($object->id) -{ +if ($object->id) { $head = productlot_prepare_head($object); print dol_get_fiche_head($head, 'documents', $langs->trans("Batch"), -1, 'barcode'); @@ -118,14 +148,15 @@ if ($object->id) $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -133,7 +164,9 @@ if ($object->id) $linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/productlot_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; - if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('batch', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'id', $linkback, $shownav, 'rowid', 'batch'); @@ -142,6 +175,13 @@ if ($object->id) print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; + // Product + print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>'; + $producttmp = new Product($db); + $producttmp->fetch($object->fk_product); + print $producttmp->getNomUrl(1, 'stock')." - ".$producttmp->label; + print '</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>'; print '</table>'; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index e03de931a58..00c8c186c66 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -54,7 +54,9 @@ $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 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -72,28 +74,33 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of array of fields for columns $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { $visible = dol_eval($val['visible'], 1); @@ -106,10 +113,8 @@ foreach ($object->fields as $key => $val) } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -124,41 +129,60 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -$permissiontoread = $user->rights->stock->read; -$permissiontoadd = $user->rights->stock->write; -$permissiontodelete = $user->rights->stock->delete; +$usercanread = $user->rights->produit->lire; +$usercancreate = $user->rights->produit->creer; +$usercandelete = $user->rights->produit->supprimer; +$upload_dir = $conf->productbatch->multidir_output[$conf->entity]; + +$permissiontoread = $usercanread; +$permissiontoadd = $usercancreate; +//$permissiontodelete = $usercandelete; + +// Security check +if (empty($conf->productbatch->enabled)) { + accessforbidden('Module not enabled'); +} +$socid = 0; +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +//$result = restrictedArea($user, 'productbatch'); +if (!$permissiontoread) accessforbidden(); /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -179,21 +203,22 @@ $form = new Form($db); $now = dol_now(); -//$help_url="EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject"; -$help_url = ''; +$help_url = 'EN:Module_Lot_/_Serial|FR:Module_Lot_/_Série'; + $title = $langs->trans('LotSerialList'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -201,20 +226,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -244,26 +281,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -272,8 +307,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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); @@ -289,30 +323,46 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -321,8 +371,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; //print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; -$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 = ''; +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/product/stock/productlot_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -333,9 +382,10 @@ $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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -346,11 +396,13 @@ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -367,20 +419,26 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -402,15 +460,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -427,11 +488,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -440,34 +501,43 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) - { + 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('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('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($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'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - elseif ($key == 'rowid') print $object->id; - else { + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'rowid') { + print $object->id; + } else { if ($key == 'batch') { print $object->getNomUrl(1); } else { @@ -475,10 +545,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) } } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -491,14 +564,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -509,10 +585,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -528,10 +607,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 64dd485671d..c9109b348d6 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr> * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es> * * 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,7 +69,9 @@ $texte = ''; $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 +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; @@ -86,8 +89,7 @@ if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) - || !empty($conf->mrp->enabled)) -{ + || !empty($conf->mrp->enabled)) { $virtualdiffersfromphysical = 1; // According to increase/decrease stock options, virtual and physical stock may differs. } @@ -96,20 +98,25 @@ if ($virtualdiffersfromphysical) { } else { $usevirtualstock = 0; } -if ($mode == 'physical') $usevirtualstock = 0; -if ($mode == 'virtual') $usevirtualstock = 1; +if ($mode == 'physical') { + $usevirtualstock = 0; +} +if ($mode == 'virtual') { + $usevirtualstock = 1; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} /* * Actions */ -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('valid')) // Both test are required to be compatible with all browsers -{ +if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('valid')) { // Both test are required to be compatible with all browsers $search_ref = ''; $search_label = ''; $sall = ''; @@ -117,26 +124,24 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $includeproductswithoutdesiredqty = ''; $draftorder = ''; } -if ($draftorder == 'on') $draftchecked = "checked"; +if ($draftorder == 'on') { + $draftchecked = "checked"; +} // Create orders -if ($action == 'order' && GETPOST('valid')) -{ +if ($action == 'order' && GETPOST('valid')) { $linecount = GETPOST('linecount', 'int'); $box = 0; $errorQty = 0; unset($_POST['linecount']); - if ($linecount > 0) - { + if ($linecount > 0) { $db->begin(); $suppliers = array(); require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productsupplier = new ProductFournisseur($db); - for ($i = 0; $i < $linecount; $i++) - { - if (GETPOST('choose'.$i, 'alpha') === 'on' && GETPOST('fourn'.$i, 'int') > 0) - { + for ($i = 0; $i < $linecount; $i++) { + if (GETPOST('choose'.$i, 'alpha') === 'on' && GETPOST('fourn'.$i, 'int') > 0) { //one line $box = $i; $supplierpriceid = GETPOST('fourn'.$i, 'int'); @@ -144,10 +149,8 @@ if ($action == 'order' && GETPOST('valid')) $qty = GETPOST('tobuy'.$i, 'int'); $idprod = $productsupplier->get_buyprice($supplierpriceid, $qty); $res = $productsupplier->fetch($idprod); - if ($res && $idprod > 0) - { - if ($qty) - { + if ($res && $idprod > 0) { + if ($qty) { //might need some value checks $line = new CommandeFournisseurLigne($db); $line->qty = $qty; @@ -155,8 +158,7 @@ if ($action == 'order' && GETPOST('valid')) //$product = new Product($db); //$product->fetch($obj->fk_product); - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $productsupplier->getMultiLangs(); } @@ -167,8 +169,7 @@ if ($action == 'order' && GETPOST('valid')) $desc = $productsupplier->description; } $line->desc = $desc; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { // TODO Get desc in language of thirdparty } @@ -184,8 +185,7 @@ if ($action == 'order' && GETPOST('valid')) $line->fk_unit = $productsupplier->fk_unit; $suppliers[$productsupplier->fourn_socid]['lines'][] = $line; } - } elseif ($idprod == -1) - { + } elseif ($idprod == -1) { $errorQty++; } else { $error = $db->lasterror(); @@ -202,12 +202,11 @@ if ($action == 'order' && GETPOST('valid')) $fail = 0; $orders = array(); $suppliersid = array_keys($suppliers); - foreach ($suppliers as $supplier) - { + foreach ($suppliers as $supplier) { $order = new CommandeFournisseur($db); // Check if an order for the supplier exists $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " WHERE fk_soc = ".$suppliersid[$i]; + $sql .= " WHERE fk_soc = ".((int) $suppliersid[$i]); $sql .= " AND source = 42 AND fk_statut = 0"; $sql .= " AND entity IN (".getEntity('commande_fournisseur').")"; $sql .= " ORDER BY date_creation DESC"; @@ -267,10 +266,11 @@ if ($action == 'order' && GETPOST('valid')) } } - if ($errorQty) setEventMessages($langs->trans('ErrorOrdersNotCreatedQtyTooLow'), null, 'warnings'); + if ($errorQty) { + setEventMessages($langs->trans('ErrorOrdersNotCreatedQtyTooLow'), null, 'warnings'); + } - if (!$fail && $id) - { + if (!$fail && $id) { $db->commit(); setEventMessages($langs->trans('OrderCreated'), null, 'mesgs'); @@ -280,8 +280,7 @@ if ($action == 'order' && GETPOST('valid')) $db->rollback(); } } - if ($box == 0) - { + if ($box == 0) { setEventMessages($langs->trans('SelectProductWithNotNullQty'), null, 'warnings'); } } @@ -340,7 +339,9 @@ $reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Not $sql .= $hookmanager->resPrint; $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; -if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +if ($sall) { + $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); +} // if the type is not 1, we show all products (type = 0,2,3) if (dol_strlen($type)) { if ($type == 1) { @@ -349,8 +350,12 @@ if (dol_strlen($type)) { $sql .= ' AND p.fk_product_type <> 1'; } } -if ($search_ref) $sql .= natural_search('p.ref', $search_ref); -if ($search_label) $sql .= natural_search('p.label', $search_label); +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($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { // Add test to exclude products that has variants $sql .= ' AND p.rowid NOT IN (SELECT pac.fk_product_parent FROM '.MAIN_DB_PREFIX.'product_attribute_combination as pac WHERE pac.entity IN ('.getEntity('product').'))'; @@ -366,8 +371,7 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre } $sql .= ', s.fk_product'; -if ($usevirtualstock) -{ +if ($usevirtualstock) { if (!empty($conf->commande->enabled)) { $sqlCommandesCli = "(SELECT ".$db->ifsql("SUM(cd1.qty) IS NULL", "0", "SUM(cd1.qty)")." as qty"; // We need the ifsql because if result is 0 for product p.rowid, we must return 0 and not NULL $sqlCommandesCli .= " FROM ".MAIN_DB_PREFIX."commandedet as cd1, ".MAIN_DB_PREFIX."commande as c1"; @@ -393,7 +397,7 @@ if ($usevirtualstock) $sqlExpeditionsCli = '0'; } - if (!empty($conf->fournisseur->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { $sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd3.qty) IS NULL", "0", "SUM(cd3.qty)")." as qty"; // We need the ifsql because if result is 0 for product p.rowid, we must return 0 and not NULL $sqlCommandesFourn .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd3,"; $sqlCommandesFourn .= " ".MAIN_DB_PREFIX."commande_fournisseur as c3"; @@ -446,8 +450,7 @@ if ($usevirtualstock) $sql .= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.') + ('.$sqlProductionToProduce.' - '.$sqlProductionToConsume.')))'; $sql .= ')'; - if ($salert == 'on') // Option to see when stock is lower than alert - { + if ($salert == 'on') { // Option to see when stock is lower than alert $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").')'; @@ -469,8 +472,7 @@ if ($usevirtualstock) } $sql .= ')'; - if ($salert == 'on') // Option to see when stock is lower than alert - { + if ($salert == 'on') { // Option to see when stock is lower than alert $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").'))'; @@ -507,8 +509,7 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if (empty($resql)) -{ +if (empty($resql)) { dol_print_error($db); exit; } @@ -541,15 +542,13 @@ if (empty($fk_warhouse) && !empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_ print '<span class="opacitymedium">'.$langs->trans("ReplenishmentStatusDescPerWarehouse").'</span>'."\n"; } print '<br><br>'; -if ($usevirtualstock == 1) -{ +if ($usevirtualstock == 1) { print $langs->trans("CurentSelectionMode").': '; print '<span class="a-mesure">'.$langs->trans("UseVirtualStock").'</span>'; print ' <a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?mode=physical'.($fk_supplier > 0 ? '&fk_supplier='.$fk_supplier : '').($fk_entrepot > 0 ? '&fk_entrepot='.$fk_entrepot : '').'">'.$langs->trans("UsePhysicalStock").'</a>'; print '<br>'; } -if ($usevirtualstock == 0) -{ +if ($usevirtualstock == 0) { print $langs->trans("CurentSelectionMode").': '; print '<a class="a-mesure-disabled" href="'.$_SERVER["PHP_SELF"].'?mode=virtual'.($fk_supplier > 0 ? '&fk_supplier='.$fk_supplier : '').($fk_entrepot > 0 ? '&fk_entrepot='.$fk_entrepot : '').'">'.$langs->trans("UseVirtualStock").'</a>'; print ' <span class="a-mesure">'.$langs->trans("UsePhysicalStock").'</span>'; @@ -569,8 +568,7 @@ print '<input type="hidden" name="mode" value="'.$mode.'">'; if ($limit > 0 && $limit != $conf->liste_limit) { print '<input type="hidden" name="limit" value="'.$limit.'">'; } -if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) -{ +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { print '<div class="inline-block valignmiddle" style="padding-right: 20px;">'; print $langs->trans('Warehouse').' '.$formproduct->selectWarehouses($fk_entrepot, 'fk_entrepot', '', 1); print '</div>'; @@ -581,7 +579,9 @@ print '</div>'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook -if (empty($reshook)) print $hookmanager->resPrint; +if (empty($reshook)) { + print $hookmanager->resPrint; +} print '<div class="inline-block valignmiddle">'; print '<input class="button" type="submit" name="valid" value="'.$langs->trans('ToFilter').'">'; @@ -607,8 +607,12 @@ if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST(' $filters .= '&salert='.urlencode($salert); $filters .= '&draftorder='.urlencode($draftorder); $filters .= '&mode='.urlencode($mode); - if ($fk_supplier > 0) $filters .= '&fk_supplier='.urlencode($fk_supplier); - if ($fk_entrepot > 0) $filters .= '&fk_entrepot='.urlencode($fk_entrepot); + if ($fk_supplier > 0) { + $filters .= '&fk_supplier='.urlencode($fk_supplier); + } + if ($fk_entrepot > 0) { + $filters .= '&fk_entrepot='.urlencode($fk_entrepot); + } } else { $filters = '&search_ref='.urlencode($search_ref).'&search_label='.urlencode($search_label); $filters .= '&fourn_id='.urlencode($fourn_id); @@ -616,8 +620,12 @@ if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST(' $filters .= '&='.urlencode($salert); $filters .= '&draftorder='.urlencode($draftorder); $filters .= '&mode='.urlencode($mode); - if ($fk_supplier > 0) $filters .= '&fk_supplier='.urlencode($fk_supplier); - if ($fk_entrepot > 0) $filters .= '&fk_entrepot='.urlencode($fk_entrepot); + if ($fk_supplier > 0) { + $filters .= '&fk_supplier='.urlencode($fk_supplier); + } + if ($fk_entrepot > 0) { + $filters .= '&fk_entrepot='.urlencode($fk_entrepot); + } } if ($limit > 0 && $limit != $conf->liste_limit) { $filters .= '&limit='.urlencode($limit); @@ -632,10 +640,13 @@ $param .= '&fk_entrepot='.urlencode($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) -{ +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").')'; } @@ -684,12 +695,13 @@ print '<tr class="liste_titre_filter">'; print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre"><input class="flat" type="text" name="search_ref" size="8" value="'.dol_escape_htmltag($search_ref).'"></td>'; print '<td class="liste_titre"><input class="flat" type="text" name="search_label" size="8" value="'.dol_escape_htmltag($search_label).'"></td>'; -if (!empty($conf->service->enabled) && $type == 1) print '<td class="liste_titre">&nbsp;</td>'; +if (!empty($conf->service->enabled) && $type == 1) { + print '<td class="liste_titre">&nbsp;</td>'; +} print '<td class="liste_titre right">'.$form->textwithpicto($langs->trans('IncludeEmptyDesiredStock'), $langs->trans('IncludeProductWithUndefinedAlerts')).'&nbsp;<input type="checkbox" id="includeproductswithoutdesiredqty" name="includeproductswithoutdesiredqty" '.(!empty($includeproductswithoutdesiredqtychecked) ? $includeproductswithoutdesiredqtychecked : '').'></td>'; print '<td class="liste_titre right"></td>'; print '<td class="liste_titre right">'.$langs->trans('AlertOnly').'&nbsp;<input type="checkbox" id="salert" name="salert" '.(!empty($alertchecked) ? $alertchecked : '').'></td>'; -if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) -{ +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { print '<td class="liste_titre">&nbsp;</td>'; } print '<td class="liste_titre right">'; @@ -714,12 +726,13 @@ print '<tr class="liste_titre">'; print_liste_field_titre('<input type="checkbox" onClick="toggle(this)" />', $_SERVER["PHP_SELF"], ''); 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->service->enabled) && $type == 1) print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center '); +if (!empty($conf->service->enabled) && $type == 1) { + print_liste_field_titre('Duration', $_SERVER["PHP_SELF"], 'p.duration', $param, '', '', $sortfield, $sortorder, 'center '); +} 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) -{ +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 '); @@ -733,36 +746,35 @@ print $hookmanager->resPrint; print "</tr>\n"; -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $objp = $db->fetch_object($resql); - if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) - { + if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) { $prod->fetch($objp->rowid); - $prod->load_stock('warehouseopen, warehouseinternal', $draftchecked); + $prod->load_stock('warehouseopen, warehouseinternal'.(!$usevirtualstock?', novirtual':''), $draftchecked); // Multilangs - if (!empty($conf->global->MAIN_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 .= ' WHERE fk_product = '.((int) $objp->rowid); $sql .= ' AND lang = "'.$langs->getDefaultLang().'"'; $sql .= ' LIMIT 1'; $resqlm = $db->query($sql); - if ($resqlm) - { + if ($resqlm) { $objtp = $db->fetch_object($resqlm); - if (!empty($objtp->description)) $objp->description = $objtp->description; - if (!empty($objtp->label)) $objp->label = $objtp->label; + if (!empty($objtp->description)) { + $objp->description = $objtp->description; + } + if (!empty($objtp->label)) { + $objp->label = $objtp->label; + } } } $stockwarehouse = 0; - if ($usevirtualstock) - { + if ($usevirtualstock) { // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. $stock = $prod->stock_theorique; //TODO $stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->; @@ -774,11 +786,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) // Force call prod->load_stats_xxx to choose status to count (otherwise it is loaded by load_stock function) if (isset($draftchecked)) { $result = $prod->load_stats_commande_fournisseur(0, '0,1,2,3,4'); - } else { + } elseif (!$usevirtualstock) { $result = $prod->load_stats_commande_fournisseur(0, '1,2,3,4'); } - $result = $prod->load_stats_reception(0, '4'); + if (!$usevirtualstock) { + $result = $prod->load_stats_reception(0, '4'); + } //print $prod->stats_commande_fournisseur['qty'].'<br>'."\n"; //print $prod->stats_reception['qty']; @@ -790,27 +804,30 @@ while ($i < ($limit ? min($num, $limit) : $num)) $alertstockwarehouse = ($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : 0); $warning = ''; - if ($alertstock && ($stock < $alertstock)) - { + if ($alertstock && ($stock < $alertstock)) { $warning = img_warning($langs->trans('StockTooLow')).' '; } $warningwarehouse = ''; - if ($alertstockwarehouse && ($stockwarehouse < $alertstockwarehouse)) - { + 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 + 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 + } $picto = ''; - if ($ordered > 0) - { + if ($ordered > 0) { $stockforcompare = ($usevirtualstock ? $stock : $stock + $ordered); /*if ($stockforcompare >= $desiredstock) { @@ -833,8 +850,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) print '<input type="hidden" name="desc'.$i.'" value="'.dol_escape_htmltag($objp->description).'">'; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST print '</td>'; - if (!empty($conf->service->enabled) && $type == 1) - { + 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'); @@ -858,8 +874,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) print '<td class="right">'.$warning.$stock.'</td>'; // Current stock (warehouse selected only) - if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) - { + if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { print '<td class="right">'.$warningwarehouse.$stockwarehouse.'</td>'; } diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index c73c7b1ca39..f5978313a1e 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -38,7 +38,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array('products', 'stocks', 'orders')); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service'); $sall = GETPOST('search_all', 'alphanohtml'); @@ -56,10 +58,16 @@ $search_date = dol_mktime(0, 0, 0, $search_datemonth, $search_dateday, $search_d $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -if (!$sortorder) $sortorder = 'DESC'; -if (!$sortfield) $sortfield = 'cf.date_creation'; +if (!$sortorder) { + $sortorder = 'DESC'; +} +if (!$sortfield) { + $sortfield = 'cf.date_creation'; +} $page = GETPOST('page', 'int') ? GETPOST('page', 'int') : 0; -if ($page < 0) $page = 0; +if ($page < 0) { + $page = 0; +} $offset = $limit * $page; @@ -67,8 +75,7 @@ $offset = $limit * $page; * 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 -{ +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 $sall = ""; $sref = ""; $snom = ""; @@ -130,13 +137,25 @@ if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { 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('cf.ref', $sref); -if ($snom) $sql .= natural_search('s.nom', $snom); -if ($suser) $sql .= natural_search('u.login', $suser); -if ($sttc) $sql .= natural_search('cf.total_ttc', $sttc, 1); +if ($sref) { + $sql .= natural_search('cf.ref', $sref); +} +if ($snom) { + $sql .= natural_search('s.nom', $snom); +} +if ($suser) { + $sql .= natural_search('u.login', $suser); +} +if ($sttc) { + $sql .= natural_search('cf.total_ttc', $sttc, 1); +} $sql .= dolSqlDateFilter('cf.date_creation', $search_dateday, $search_datemonth, $search_dateyear); -if ($sall) $sql .= natural_search(array('cf.ref', 'cf.note'), $sall); -if (!empty($socid)) $sql .= ' AND s.rowid = '.$socid; +if ($sall) { + $sql .= natural_search(array('cf.ref', 'cf.note'), $sall); +} +if (!empty($socid)) { + $sql .= ' AND s.rowid = '.$socid; +} if (GETPOST('statut', 'int')) { $sql .= ' AND fk_statut = '.GETPOST('statut', 'int'); } @@ -148,8 +167,7 @@ if (!$search_product) { } $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -160,16 +178,36 @@ if ($resql) print_barre_liste('', $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, 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 ($sref) $param .= '&search_ref='.urlencode($sref); - if ($snom) $param .= '&search_nom='.urlencode($snom); - if ($suser) $param .= '&search_user='.urlencode($suser); - if ($sttc) $param .= '&search_ttc='.urlencode($sttc); - if ($search_dateyear) $param .= '&search_dateyear='.urlencode($search_dateyear); - if ($search_datemonth) $param .= '&search_datemonth='.urlencode($search_datemonth); - if ($search_dateday) $param .= '&search_dateday='.urlencode($search_dateday); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($sref) { + $param .= '&search_ref='.urlencode($sref); + } + if ($snom) { + $param .= '&search_nom='.urlencode($snom); + } + if ($suser) { + $param .= '&search_user='.urlencode($suser); + } + if ($sttc) { + $param .= '&search_ttc='.urlencode($sttc); + } + if ($search_dateyear) { + $param .= '&search_dateyear='.urlencode($search_dateyear); + } + if ($search_datemonth) { + $param .= '&search_datemonth='.urlencode($search_datemonth); + } + if ($search_dateday) { + $param .= '&search_dateday='.urlencode($search_dateday); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } print '<table class="noborder centpercent">'; @@ -261,14 +299,12 @@ if ($resql) $userstatic = new User($db); - while ($i < min($num, $search_product ? $num : $conf->liste_limit)) - { + while ($i < min($num, $search_product ? $num : $conf->liste_limit)) { $obj = $db->fetch_object($resql); $showline = dolDispatchToDo($obj->rowid) && (!$search_product || in_array($search_product, getProducts($obj->rowid))); - if ($showline) - { + if ($showline) { $href = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$obj->rowid; print '<tr>'; diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 91159984a35..e5eb2751109 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,7 +71,9 @@ $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 +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) { @@ -83,7 +85,9 @@ if (!$sortorder) { $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $dateIsValid = true; if ($mode == 'future') { @@ -103,8 +107,7 @@ if ($mode == 'future') { * 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 -{ +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; @@ -130,7 +133,7 @@ if ($date && $dateIsValid) { // Avoid heavy sql if mandatory date is not defined $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))).")"; + $sql .= " AND w.statut IN (".$db->sanitize(implode(',', $warehouseStatus)).")"; } if ($productid > 0) { $sql .= " AND ps.fk_product = ".$productid; @@ -142,8 +145,7 @@ if ($date && $dateIsValid) { // Avoid heavy sql if mandatory date is not defined //print $sql; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -181,7 +183,7 @@ if ($date && $dateIsValid) { $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))).")"; + $sql .= " AND w.statut IN (".$db->sanitize(implode(',', $warehouseStatus)).")"; } if ($mode == 'future') { $sql .= " AND sm.datem <= '".$db->idate($dateendofday)."'"; @@ -189,16 +191,15 @@ if ($date && $dateIsValid) { $sql .= " AND sm.datem >= '".$db->idate($date)."'"; } if ($productid > 0) { - $sql .= " AND sm.fk_product = ".$productid; + $sql .= " AND sm.fk_product = ".((int) $productid); } if ($fk_warehouse > 0) { - $sql .= " AND sm.fk_entrepot = ".$fk_warehouse; + $sql .= " AND sm.fk_entrepot = ".((int) $fk_warehouse); } $sql .= " GROUP BY sm.fk_product, sm.fk_entrepot"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -243,9 +244,12 @@ $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'; +$sql .= ' p.tms as datem, p.duration, p.tobuy, p.stock, '; if ($fk_warehouse > 0) { + $sql .= " SUM(p.pmp * ps.reel) as estimatedvalue, SUM(p.price * ps.reel) as sellvalue"; $sql .= ', SUM(ps.reel) as stock_reel'; +} else { + $sql .= " SUM(p.pmp * p.stock) as estimatedvalue, SUM(p.price * p.stock) as sellvalue"; } // Add fields from hooks $parameters = array(); @@ -262,15 +266,20 @@ $reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Not $sql .= $hookmanager->resPrint; $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; if ($productid > 0) { - $sql .= " AND p.rowid = ".$productid; + $sql .= " AND p.rowid = ".((int) $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 (!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'; +} else { + $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(); @@ -287,12 +296,10 @@ $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)) - { + 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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -302,8 +309,7 @@ if ($date && $dateIsValid) { // We avoid a heavy sql if mandatory parameter date //print $sql; $resql = $db->query($sql); - if (empty($resql)) - { + if (empty($resql)) { dol_print_error($db); exit; } @@ -335,7 +341,9 @@ print load_fiche_titre($langs->trans('StockAtDate'), '', 'stock'); print dol_get_fiche_head($head, ($mode == 'future' ? 'stockatdatefuture' : 'stockatdatepast'), '', -1, ''); $desc = $langs->trans("StockAtDatePastDesc"); -if ($mode == 'future') $desc = $langs->trans("StockAtDateFutureDesc"); +if ($mode == 'future') { + $desc = $langs->trans("StockAtDateFutureDesc"); +} print '<span class="opacitymedium">'.$desc.'</span><br>'."\n"; print '<br>'."\n"; @@ -347,20 +355,22 @@ print '<input type="hidden" name="mode" value="'.$mode.'">'; print '<div class="inline-block valignmiddle" style="padding-right: 20px;">'; print '<span class="fieldrequired">'.$langs->trans('Date').'</span> '.$form->selectDate(($date ? $date : -1), 'date'); -print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddinrightonly">&nbsp;</span> '; +print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddingrightonly">&nbsp;</span> '; print img_picto('', 'product').' '; print $langs->trans('Product').'</span> '; -$form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300'); +print $form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300', 0, '', null, 1); -print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddinrightonly">&nbsp;</span> '; +print ' <span class="clearbothonsmartphone marginleftonly paddingleftonly marginrightonly paddingrightonly">&nbsp;</span> '; print img_picto('', 'stock').' '; print $langs->trans('Warehouse').'</span> '; -print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1); +print $formproduct->selectWarehouses((GETPOSTISSET('fk_warehouse') ? $fk_warehouse : 'ifone'), 'fk_warehouse', '', 1, 0, 0, '', 0, 0, null, '', '', 1, false, 'e.ref'); print '</div>'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook -if (empty($reshook)) print $hookmanager->resPrint; +if (empty($reshook)) { + print $hookmanager->resPrint; +} print '<div class="inline-block valignmiddle">'; print '<input class="button" type="submit" name="valid" value="'.$langs->trans('Refresh').'">'; @@ -369,14 +379,28 @@ print '</div>'; //print '</form>'; $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($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'); +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); @@ -385,7 +409,9 @@ print '<div class="div-table-responsive">'; // You can use div-table-responsive- print '<table class="liste centpercent">'; $stocklabel = $langs->trans('StockAtDate'); -if ($mode == 'future') $stocklabel = $langs->trans("VirtualStockAtDate"); +if ($mode == 'future') { + $stocklabel = $langs->trans("VirtualStockAtDate"); +} //print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="formulaire">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -403,6 +429,9 @@ print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; if ($mode == 'future') { print '<td class="liste_titre"></td>'; +} else { + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; } // Fields from hook $parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); @@ -424,6 +453,7 @@ if ($fk_warehouse > 0) { print '<tr class="liste_titre">'; 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"]); @@ -431,6 +461,8 @@ if ($mode == 'future') { 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("EstimatedStockValue", $_SERVER["PHP_SELF"], "estimatedvalue", '', $param, '', $sortfield, $sortorder, 'right ', $langs->trans("AtDate"), 1); + print_liste_field_titre("EstimatedStockValueSell", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', $langs->trans("AtDate"), 1); print_liste_field_titre('', $_SERVER["PHP_SELF"]); print_liste_field_titre('CurrentStock', $_SERVER["PHP_SELF"], $fieldtosortcurrentstock, $param, '', '', $sortfield, $sortorder, 'right '); } @@ -444,12 +476,10 @@ print $hookmanager->resPrint; print "</tr>\n"; $i = 0; -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $objp = $db->fetch_object($resql); - if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) - { + if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) { $prod->fetch($objp->rowid); // Multilangs @@ -457,7 +487,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { $sql = 'SELECT label,description'; $sql .= ' FROM '.MAIN_DB_PREFIX.'product_lang'; - $sql .= ' WHERE fk_product = '.$objp->rowid; + $sql .= ' WHERE fk_product = '.((int) $objp->rowid); $sql .= ' AND lang = "'.$langs->getDefaultLang().'"'; $sql .= ' LIMIT 1'; @@ -471,8 +501,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) }*/ $currentstock = ''; - if ($fk_warehouse > 0) - { + if ($fk_warehouse > 0) { //if ($productid > 0) { $currentstock = $stock_prod_warehouse[$objp->rowid][$fk_warehouse]; //} else { @@ -531,6 +560,25 @@ while ($i < ($limit ? min($num, $limit) : $num)) // Stock at date print '<td class="right">'.($stock ? $stock : '<span class="opacitymedium">'.$stock.'</span>').'</td>'; + // PMP value + print '<td class="right">'; + if (price2num($objp->estimatedvalue, 'MT')) { + print price(price2num($objp->estimatedvalue, 'MT'), 1); + } else { + print ''; + } + print '</td>'; + + // Selling value + print '<td class="right">'; + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print price(price2num($objp->sellvalue, 'MT'), 1); + } else { + $htmltext = $langs->trans("OptionMULTIPRICESIsOn"); + print $form->textwithtooltip($langs->trans("Variable"), $htmltext); + } + print'</td>'; + print '<td class="right">'; if ($nbofmovement > 0) { print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$objp->rowid.($fk_warehouse > 0 ? '&search_warehouse='.$fk_warehouse : '').'">'.$langs->trans("Movements").'</a>'; @@ -560,8 +608,10 @@ $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // N print $hookmanager->resPrint; if (empty($date) || ! $dateIsValid) { - $colspan = 6; - if ($mode == 'future') $colspan++; + $colspan = 8; + if ($mode == 'future') { + $colspan++; + } print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("EnterADateCriteria").'</span></td></tr>'; } diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 4f88b448239..6e2ab53dd0e 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -30,12 +30,16 @@ if (empty($conf) || !is_object($conf)) { <!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP --> <?php $productref = ''; -if ($object->element == 'product') $productref = $object->ref; +if ($object->element == 'product') { + $productref = $object->ref; +} $langs->load("productbatch"); -if (empty($id)) $id = $object->id; +if (empty($id)) { + $id = $object->id; +} print '<script type="text/javascript" language="javascript"> jQuery(document).ready(function() { @@ -69,7 +73,9 @@ if ($object->element == 'product') { print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>'; print '<td>'; $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; + if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { + $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; + } print img_picto('', 'stock').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); print ' &nbsp; <select class="button buttongen" name="mouvement" id="mouvement">'; print '<option value="0">'.$langs->trans("Add").'</option>'; @@ -107,8 +113,7 @@ if (!empty($conf->global->PRODUIT_SOUSPRODUITS) && $object->element == 'product' if (!empty($conf->productbatch->enabled) && (($object->element == 'product' && $object->hasbatch()) || ($object->element == 'stock')) -) -{ +) { print '<tr>'; print '<td'.($object->element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">'; print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">'; @@ -134,8 +139,7 @@ if (!empty($conf->productbatch->enabled) && print '<tr>'; print '<td>'.$langs->trans("UnitPurchaseValue").'</td>'; print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>'; -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { print '<td>'.$langs->trans('Project').'</td>'; print '<td>'; print img_picto('', 'project'); diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 20445445e8e..dcd19be4ad6 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -30,21 +30,23 @@ if (empty($conf) || !is_object($conf)) { <!-- BEGIN PHP TEMPLATE STOCKCORRECTION.TPL.PHP --> <?php $productref = ''; -if ($object->element == 'product') $productref = $object->ref; +if ($object->element == 'product') { + $productref = $object->ref; +} $langs->load("productbatch"); -if (empty($id)) $id = $object->id; +if (empty($id)) { + $id = $object->id; +} $pdluoid = GETPOST('pdluoid', 'int'); $pdluo = new Productbatch($db); -if ($pdluoid > 0) -{ +if ($pdluoid > 0) { $result = $pdluo->fetch($pdluoid); - if ($result > 0) - { + if ($result > 0) { $pdluoid = $pdluo->id; } else { dol_print_error($db, $pdluo->error, $pdluo->errors); @@ -60,8 +62,7 @@ print dol_get_fiche_head(); print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="transfert_stock">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; -if ($pdluoid) -{ +if ($pdluoid) { print '<input type="hidden" name="pdluoid" value="'.$pdluoid.'">'; } print '<table class="border centpercent">'; @@ -71,7 +72,10 @@ print '<tr>'; if ($object->element == 'product') { print '<td class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>'; print '<td>'; - print img_picto('', 'stock').$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); + print img_picto('', 'stock'); + $selected = (GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); + $warehousestatus = 'warehouseopen,warehouseinternal'; + print $formproduct->selectWarehouses($selected, 'id_entrepot', $warehousestatus, 1); print '</td>'; } if ($object->element == 'stock') { @@ -92,12 +96,10 @@ print '</tr>'; if (!empty($conf->productbatch->enabled) && (($object->element == 'product' && $object->hasbatch()) || ($object->element == 'stock')) -) -{ +) { print '<tr>'; print '<td'.($object->element == 'stock' ? '' : ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">'; - if ($pdluoid > 0) - { + if ($pdluoid > 0) { // If form was opened for a specific pdluoid, field is disabled print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 35e82abdafc..7f7f9610d1f 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -38,10 +38,16 @@ $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -if (!$sortfield) $sortfield = "e.ref"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "e.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $page = $_GET["page"]; -if ($page < 0) $page = 0; +if ($page < 0) { + $page = 0; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; @@ -58,9 +64,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON e.rowid = ps.fk_entrepot"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON ps.fk_product = p.rowid"; $sql .= " WHERE e.entity IN (".getEntity('stock').")"; -if ($sref) $sql .= natural_search("e.ref", $sref); -if ($sall) -{ +if ($sref) { + $sql .= natural_search("e.ref", $sref); +} +if ($sall) { $sql .= " AND (e.ref LIKE '%".$db->escape($sall)."%'"; $sql .= " OR e.description LIKE '%".$db->escape($sall)."%'"; $sql .= " OR e.lieu LIKE '%".$db->escape($sall)."%'"; @@ -72,8 +79,7 @@ $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($limit + 1, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -92,26 +98,30 @@ if ($result) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.statut", '', '', '', $sortfield, $sortorder, 'right '); print "</tr>\n"; - if ($num) - { + if ($num) { $entrepot = new Entrepot($db); $total = $totalsell = 0; $var = false; - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); print '<tr class="oddeven">'; print '<td><a href="card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowWarehouse"), 'stock').' '.$objp->ref.'</a></td>'; print '<td>'.$objp->lieu.'</td>'; // PMP value print '<td class="right">'; - if (price2num($objp->estimatedvalue, 'MT')) print price(price2num($objp->estimatedvalue, 'MT'), 1); - else print ''; + if (price2num($objp->estimatedvalue, 'MT')) { + print price(price2num($objp->estimatedvalue, 'MT'), 1); + } else { + print ''; + } print '</td>'; // Selling value print '<td class="right">'; - if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue, 'MT'), 1); - else print $langs->trans("Variable"); + if (empty($conf->global->PRODUIT_MULTIPRICES)) { + print price(price2num($objp->sellvalue, 'MT'), 1); + } else { + print $langs->trans("Variable"); + } print '</td>'; // Status print '<td class="right">'.$entrepot->LibStatut($objp->statut, 5).'</td>'; @@ -137,15 +147,13 @@ if ($result) print '<br>'; $file = 'entrepot-'.$year.'.png'; - if (file_exists($conf->stock->dir_temp.'/'.$file)) - { + if (file_exists($conf->stock->dir_temp.'/'.$file)) { $url = DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file='.$file; print '<img src="'.$url.'">'; } $file = 'entrepot-'.($year - 1).'.png'; - if (file_exists($conf->stock->dir_temp.'/'.$file)) - { + if (file_exists($conf->stock->dir_temp.'/'.$file)) { $url = DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file='.$file; print '<br><img src="'.$url.'">'; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 97eb37a2689..45b45136410 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -42,7 +42,9 @@ $cancel = GETPOST('cancel', 'alpha'); // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); @@ -51,41 +53,46 @@ $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product */ // retour a l'affichage des traduction si annulation -if ($cancel == $langs->trans("Cancel")) -{ +if ($cancel == $langs->trans("Cancel")) { $action = ''; } -if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) -{ +if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) { $object = new Product($db); $object->fetch($id); $object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user); + setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); + $action = ''; } // Add translation -if ($action == 'vadd' && -$cancel != $langs->trans("Cancel") && -($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) { $object = new Product($db); $object->fetch($id); $current_lang = $langs->getDefaultLang(); // update de l'objet - if ($_POST["forcelangprod"] == $current_lang) { - $object->label = $_POST["libelle"]; - $object->description = dol_htmlcleanlastbr($_POST["desc"]); - $object->other = dol_htmlcleanlastbr($_POST["other"]); + if (GETPOST("forcelangprod") == $current_lang) { + $object->label = GETPOST("libelle"); + $object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); + $object->other = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); + $object->update($object->id, $user); } 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"]); + $object->multilangs[GETPOST("forcelangprod")]["label"] = GETPOST("libelle"); + $object->multilangs[GETPOST("forcelangprod")]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml')); + $object->multilangs[GETPOST("forcelangprod")]["other"] = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml')); } - // sauvegarde en base - if ($object->setMultiLangs($user) > 0) { + // save in database + if (GETPOST("forcelangprod")) { + $result = $object->setMultiLangs($user); + } else { + $object->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Language")); + $result = -1; + } + + if ($result > 0) { $action = ''; } else { $action = 'add'; @@ -94,30 +101,25 @@ $cancel != $langs->trans("Cancel") && } // Edit translation -if ($action == 'vedit' && -$cancel != $langs->trans("Cancel") && -($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) { $object = new Product($db); $object->fetch($id); $current_lang = $langs->getDefaultLang(); - foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet - { - if ($key == $current_lang) - { - $object->label = $_POST["libelle-".$key]; - $object->description = dol_htmlcleanlastbr($_POST["desc-".$key]); - $object->other = dol_htmlcleanlastbr($_POST["other-".$key]); + foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet + if ($key == $current_lang) { + $object->label = GETPOST("libelle-".$key); + $object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); + $object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); } 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]); + $object->multilangs[$key]["label"] = GETPOST("libelle-".$key); + $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); + $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); } } - if ($object->setMultiLangs($user) > 0) - { + $result = $object->setMultiLangs($user); + if ($result > 0) { $action = ''; } else { $action = 'edit'; @@ -126,17 +128,13 @@ $cancel != $langs->trans("Cancel") && } // Delete translation -if ($action == 'vdelete' && -$cancel != $langs->trans("Cancel") && -($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) { $object = new Product($db); $object->fetch($id); $langtodelete = GETPOST('langdel', 'alpha'); - - if ($object->delMultiLangs($langtodelete, $user) > 0) - { + $result = $object->delMultiLangs($langtodelete, $user); + if ($result > 0) { $action = ''; } else { $action = 'edit'; @@ -155,13 +153,11 @@ $result = $object->fetch($id, $ref); $title = $langs->trans('ProductServiceCard'); $helpurl = ''; $shortlabel = dol_trunc($object->label, 16); -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) -{ +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Translation'); $helpurl = 'EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos'; } -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) -{ +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Translation'); $helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios'; } @@ -178,10 +174,8 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); // Calculate $cnt_trans $cnt_trans = 0; -if (!empty($object->multilangs)) -{ - foreach ($object->multilangs as $key => $value) - { +if (!empty($object->multilangs)) { + foreach ($object->multilangs as $key => $value) { $cnt_trans++; } } @@ -192,7 +186,9 @@ print dol_get_fiche_head($head, 'translation', $titre, 0, $picto); $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $shownav = 1; -if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; +if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; +} dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', '', '', '', 0, '', '', 1); @@ -200,29 +196,25 @@ print dol_get_fiche_end(); -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ +/* + * Action bar + */ +print "\n".'<div class="tabsAction">'."\n"; -print "\n<div class=\"tabsAction\">\n"; - -if ($action == '') -{ - if ($user->rights->produit->creer || $user->rights->service->creer) - { +if ($action == '') { + if ($user->rights->produit->creer || $user->rights->service->creer) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&id='.$object->id.'">'.$langs->trans("Add").'</a>'; - if ($cnt_trans > 0) print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&id='.$object->id.'">'.$langs->trans("Update").'</a>'; + if ($cnt_trans > 0) { + print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&id='.$object->id.'">'.$langs->trans("Update").'</a>'; + } } } -print "\n</div>\n"; +print "\n".'</div>'."\n"; -if ($action == 'edit') -{ +if ($action == 'edit') { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -231,12 +223,13 @@ if ($action == 'edit') print '<input type="hidden" name="action" value="vedit">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if (!empty($object->multilangs)) - { - foreach ($object->multilangs as $key => $value) - { + if (!empty($object->multilangs)) { + $i = 0; + foreach ($object->multilangs as $key => $value) { + $i++; + $s = picto_from_langcode($key); - print "<br>".($s ? $s.' ' : '')." <b>".$langs->trans('Language_'.$key).":</b> ".'<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"')."</a><br>"; + print ($i > 1 ? "<br>" : "").($s ? $s.' ' : '').' <div class="inline-block margintop marginbottomonly"><b>'.$langs->trans('Language_'.$key).'</b></div><div class="inline-block floatright"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom marginrightonly"').'</a></div>'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; @@ -245,8 +238,7 @@ if ($action == 'edit') $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); print '</td></tr>'; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) - { + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { print '<tr><td class="tdtop">'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')</td><td>'; $doleditor = new DolEditor("other-$key", $object->multilangs[$key]["other"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); @@ -265,29 +257,30 @@ if ($action == 'edit') print '</div>'; print '</form>'; -} elseif ($action != 'add') -{ - if (!empty($object->multilangs)) - { - foreach ($object->multilangs as $key => $value) - { +} elseif ($action != 'add') { + if (!empty($object->multilangs)) { + $i = 0; + foreach ($object->multilangs as $key => $value) { + $i++; + $s = picto_from_langcode($key); - print ($s ? $s.' ' : '')." <b>".$langs->trans('Language_'.$key).":</b> ".'<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"').'</a>'; + print ($i > 1 ? "<br>" : "").($s ? $s.' ' : '').' <div class="inline-block marginbottomonly"><b>'.$langs->trans('Language_'.$key).'</b></div><div class="inline-block floatright"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom marginrightonly"').'</a></div>'; print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; print '<tr><td class="titlefieldcreate">'.$langs->trans('Label').'</td><td>'.$object->multilangs[$key]["label"].'</td></tr>'; print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>'.$object->multilangs[$key]["description"].'</td></tr>'; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) - { + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { print '<tr><td>'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')</td><td>'.$object->multilangs[$key]["other"].'</td></tr>'; } print '</table>'; print '</div>'; } } - if (!$cnt_trans && $action != 'add') print '<div class="opacitymedium">'.$langs->trans('NoTranslation').'</div>'; + if (!$cnt_trans && $action != 'add') { + print '<div class="opacitymedium">'.$langs->trans('NoTranslation').'</div>'; + } } @@ -296,8 +289,7 @@ if ($action == 'edit') * Form to add a new translation */ -if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service->creer)) -{ +if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service->creer)) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -311,7 +303,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print '<table class="border centpercent">'; print '<tr><td class="tdtop titlefieldcreate fieldrequired">'.$langs->trans('Language').'</td><td>'; - print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); + print $formadmin->select_language(GETPOST('forcelangprod'), 'forcelangprod', 0, $object->multilangs, 1); print '</td></tr>'; print '<tr><td class="tdtop fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>'; print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>'; @@ -319,8 +311,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service $doleditor->Create(); print '</td></tr>'; // Other field (not used) - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) - { + if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { print '<tr><td class="tdtop">'.$langs->trans('Other').' ('.$langs->trans("NotUsed").'</td><td>'; $doleditor = new DolEditor('other', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 2ca149a18ca..0191cc74ef8 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -32,13 +32,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $search_project_user = GETPOST('search_project_user', 'int'); $mine = GETPOST('mode', 'aZ09') == 'mine' ? 1 : 0; -if ($search_project_user == $user->id) $mine = 1; +if ($search_project_user == $user->id) { + $mine = 1; +} // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} //$result = restrictedArea($user, 'projet', $projectid); -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $hookmanager = new HookManager($db); @@ -73,8 +79,11 @@ llxHeader("", $title); // Title for combo list see all projects $titleall = $langs->trans("AllAllowedProjects"); -if (!empty($user->rights->projet->all->lire) && !$socid) $titleall = $langs->trans("AllProjects"); -else $titleall = $langs->trans("AllAllowedProjects").'<br><br>'; +if (!empty($user->rights->projet->all->lire) && !$socid) { + $titleall = $langs->trans("AllProjects"); +} else { + $titleall = $langs->trans("AllAllowedProjects").'<br><br>'; +} $morehtml = ''; @@ -85,50 +94,22 @@ $morehtml .= '<option name="mine" value="'.$user->id.'"'.(($search_project_user $morehtml .= '</SELECT>'; $morehtml .= '<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">'; -if ($mine) $tooltiphelp = $langs->trans("MyTasksDesc"); -else { - if ($user->rights->projet->all->lire && !$socid) $tooltiphelp = $langs->trans("TasksDesc"); - else $tooltiphelp = $langs->trans("TasksPublicDesc"); +if ($mine) { + $tooltiphelp = $langs->trans("MyTasksDesc"); +} else { + if ($user->rights->projet->all->lire && !$socid) { + $tooltiphelp = $langs->trans("TasksDesc"); + } else { + $tooltiphelp = $langs->trans("TasksPublicDesc"); + } } print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'projecttask', 0, $morehtml); print '<div class="fichecenter"><div class="fichethirdleft">'; +/* Show list of project today */ -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - // Search project - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) - { - $listofsearchfields['search_task'] = array('text'=>'Task'); - } - - if (count($listofsearchfields)) - { - print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; - print '<tr '.$bc[false].'>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; - if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; - print '</tr>'; - $i++; - } - print '</table>'; - print '</div>'; - print '</form>'; - print '<br>'; - } -} - - -/* Affichage de la liste des projets d'aujourd'hui */ print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -149,12 +130,10 @@ $sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $total = 0; - while ($row = $db->fetch_object($resql)) - { + while ($row = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td>'; $projectstatic->id = $row->rowid; @@ -204,12 +183,10 @@ $sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $total = 0; - while ($row = $db->fetch_object($resql)) - { + while ($row = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td>'; $projectstatic->id = $row->rowid; @@ -239,66 +216,65 @@ print '</div>'; /* if ($db->type != 'pgsql') { - print '<br>'; + print '<br>'; - // Affichage de la liste des projets de la semaine - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder centpercent">'; - print '<tr class="liste_titre">'; - print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>'; - print '<td class="right">'.$langs->trans("Time").'</td>'; - print "</tr>\n"; + // Affichage de la liste des projets de la semaine + print '<div class="div-table-responsive-no-min">'; + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + print '<td>'.$langs->trans("ActivityOnProjectThisWeek").'</td>'; + print '<td class="right">'.$langs->trans("Time").'</td>'; + print "</tr>\n"; - $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; - $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; - $sql.= " , ".MAIN_DB_PREFIX."projet_task as t"; - $sql.= " , ".MAIN_DB_PREFIX."projet_task_time as tt"; - $sql.= " WHERE t.fk_projet = p.rowid"; - $sql.= " AND p.entity = ".$conf->entity; - $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 (".$db->sanitize($projectsListId).")"; - $sql.= " GROUP BY p.rowid, p.ref, p.title"; + $sql = "SELECT p.rowid, p.ref, p.title, p.public, SUM(tt.task_duration) as nb"; + $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; + $sql.= " , ".MAIN_DB_PREFIX."projet_task as t"; + $sql.= " , ".MAIN_DB_PREFIX."projet_task_time as tt"; + $sql.= " WHERE t.fk_projet = p.rowid"; + $sql.= " AND p.entity = ".$conf->entity; + $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 (".$db->sanitize($projectsListId).")"; + $sql.= " GROUP BY p.rowid, p.ref, p.title"; - $resql = $db->query($sql); - if ( $resql ) - { - $total = 0; + $resql = $db->query($sql); + if ( $resql ) + { + $total = 0; - while ($row = $db->fetch_object($resql)) - { - print '<tr class="oddeven">'; - print '<td>'; - $projectstatic->id=$row->rowid; - $projectstatic->ref=$row->ref; - $projectstatic->title=$row->title; - $projectstatic->public=$row->public; - print $projectstatic->getNomUrl(1, '', 1); - print '</td>'; - print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; - print "</tr>\n"; - $total += $row->nb; - } + while ($row = $db->fetch_object($resql)) + { + print '<tr class="oddeven">'; + print '<td>'; + $projectstatic->id=$row->rowid; + $projectstatic->ref=$row->ref; + $projectstatic->title=$row->title; + $projectstatic->public=$row->public; + print $projectstatic->getNomUrl(1, '', 1); + print '</td>'; + print '<td class="right">'.convertSecondToTime($row->nb, 'allhourmin').'</td>'; + print "</tr>\n"; + $total += $row->nb; + } - $db->free($resql); - } - else - { - dol_print_error($db); - } - print '<tr class="liste_total">'; - print '<td>'.$langs->trans('Total').'</td>'; - print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; - print "</tr>\n"; - print "</table></div><br>"; + $db->free($resql); + } + else + { + dol_print_error($db); + } + print '<tr class="liste_total">'; + print '<td>'.$langs->trans('Total').'</td>'; + print '<td class="right">'.convertSecondToTime($total, 'allhourmin').'</td>'; + print "</tr>\n"; + print "</table></div><br>"; } */ /* Affichage de la liste des projets du mois */ -if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) -{ +if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -319,10 +295,8 @@ if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); - if ($resql) - { - while ($row = $db->fetch_object($resql)) - { + if ($resql) { + while ($row = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td>'; $projectstatic->id = $row->rowid; @@ -346,8 +320,7 @@ if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) } /* Affichage de la liste des projets de l'annee */ -if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) -{ +if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) { print '<div class="div-table-responsive-no-min">'; print '<br><table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -368,10 +341,8 @@ if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); - if ($resql) - { - while ($row = $db->fetch_object($resql)) - { + if ($resql) { + while ($row = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td>'; $projectstatic->id = $row->rowid; @@ -395,36 +366,39 @@ if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) print '</div>'; } -if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA)) -{ +if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SHOW_TASK_LIST_ON_PROJECT_AREA)) { // 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 = '".$db->escape($projectstatic->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $listofprojectcontacttype[$obj->rowid] = $obj->code; } - } else dol_print_error($db); - if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; // To avoid sql syntax error if not found + } 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 = '".$db->escape($taskstatic->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $db->fetch_object($resql)) { $listoftaskcontacttype[$obj->rowid] = $obj->code; } - } else dol_print_error($db); - if (count($listoftaskcontacttype) == 0) $listoftaskcontacttype[0] = '0'; // To avoid sql syntax error if not found + } else { + dol_print_error($db); + } + if (count($listoftaskcontacttype) == 0) { + $listoftaskcontacttype[0] = '0'; // To avoid sql syntax error if not found + } // Tasks for all resources of all opened projects and time spent for each task/resource @@ -440,17 +414,19 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid"; - if ($mine) - { + if ($mine) { $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 (".$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; + 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 (".$db->sanitize(join(',', array_keys($listoftaskcontacttype))).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$user->id; + } + if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; } - if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; $sql .= " AND p.fk_statut=1"; $sql .= " GROUP BY p.ref, p.title, p.rowid, p.fk_statut, p.fk_opp_status, p.public, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee"; $sql .= " ORDER BY t.dateo desc, t.rowid desc, t.datee"; @@ -458,8 +434,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -470,7 +445,9 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH print '<tr class="liste_titre">'; //print '<th>'.$langs->trans('TaskRessourceLinks').'</th>'; print '<th>'.$langs->trans('OpenedProjects').'</th>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print '<th>'.$langs->trans('OpportunityStatus').'</th>'; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print '<th>'.$langs->trans('OpportunityStatus').'</th>'; + } print '<th>'.$langs->trans('Task').'</th>'; print '<th class="center">'.$langs->trans('DateStart').'</th>'; print '<th class="center">'.$langs->trans('DateEnd').'</th>'; @@ -480,8 +457,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH print '<th class="right">'.$langs->trans("ProgressDeclared").'</td>'; print '</tr>'; - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); $projectstatic->id = $obj->projectid; @@ -499,37 +475,44 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $taskstatic->datee = $db->jdate($obj->datee); $username = ''; - if ($obj->userid && $userstatic->id != $obj->userid) // We have a user and it is not last loaded user - { + if ($obj->userid && $userstatic->id != $obj->userid) { // We have a user and it is not last loaded user $result = $userstatic->fetch($obj->userid); - if (!$result) $userstatic->id = 0; + if (!$result) { + $userstatic->id = 0; + } + } + if ($userstatic->id) { + $username = $userstatic->getNomUrl(0, 0); } - if ($userstatic->id) $username = $userstatic->getNomUrl(0, 0); print '<tr class="oddeven">'; //print '<td>'.$username.'</td>'; print '<td>'; print $projectstatic->getNomUrl(1, '', 0, '', '<br>'); print '</td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<td>'; $code = dol_getIdFromCode($db, $obj->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); + if ($code) { + print $langs->trans("OppStatus".$code); + } print '</td>'; } print '<td>'; - if (!empty($obj->taskid)) - { + if (!empty($obj->taskid)) { $tasktmp->id = $obj->taskid; $tasktmp->ref = $obj->ref; $tasktmp->label = $obj->label; print $tasktmp->getNomUrl(1, 'withproject', 'task', 1, '<br>'); - } else print $langs->trans("NoTasks"); + } else { + print $langs->trans("NoTasks"); + } print '</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->dateo), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->datee), 'day'); - if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late")); + if ($taskstatic->hasDelay()) { + print img_warning($langs->trans("Late")); + } print '</td>'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$obj->taskid.'&withproject=1">'; print convertSecondToTime($obj->planned_workload, 'allhourmin'); @@ -538,8 +521,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH print convertSecondToTime($obj->timespent, 'allhourmin'); print '</a></td>'; print '<td class="right">'; - if (!empty($obj->taskid)) - { + if (!empty($obj->taskid)) { if (empty($obj->planned_workload) > 0) { $percentcompletion = $langs->trans("WorkloadNotDefined"); } else { @@ -556,10 +538,11 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $i++; } - if ($num > $max) - { + if ($num > $max) { $colspan = 6; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $colspan++; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + $colspan++; + } print '<tr><td colspan="'.$colspan.'">'.$langs->trans("WarningTooManyDataPleaseUseMoreFilters").'</td></tr>'; } diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index a4a37f22a31..5b238d96b92 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2010 François Legastelois <flegastelois@teclib.com> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,9 +46,11 @@ $taskid = GETPOST('taskid', 'int'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'perdaycard'; $mine = 0; -if ($mode == 'mine') $mine = 1; +if ($mode == 'mine') { + $mine = 1; +} -$projectid = isset($_GET["id"]) ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); +$projectid = GETPOSTISSET("id") ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); $hookmanager->initHooks(array('timesheetperdaycard')); @@ -59,10 +61,6 @@ $socid = 0; $result = restrictedArea($user, 'projet', $projectid); $now = dol_now(); -$nowtmp = dol_getdate($now); -$nowday = $nowtmp['mday']; -$nowmonth = $nowtmp['mon']; -$nowyear = $nowtmp['year']; $year = GETPOST('reyear', 'int') ?GETPOST('reyear', 'int') : (GETPOST("year", "int") ?GETPOST("year", "int") : (GETPOST("addtimeyear", "int") ?GETPOST("addtimeyear", "int") : date("Y"))); $month = GETPOST('remonth', 'int') ?GETPOST('remonth', 'int') : (GETPOST("month", "int") ?GETPOST("month", "int") : (GETPOST("addtimemonth", "int") ?GETPOST("addtimemonth", "int") : date("m"))); @@ -71,7 +69,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); $day = (int) $day; -$search_categ = GETPOST("search_categ", 'alpha'); +//$search_categ = GETPOST("search_categ", 'alpha'); $search_usertoprocessid = GETPOST('search_usertoprocessid', 'int'); $search_task_ref = GETPOST('search_task_ref', 'alpha'); $search_task_label = GETPOST('search_task_label', 'alpha'); @@ -84,16 +82,17 @@ $dayofday = GETPOST('addtimeday'); $yearofday = GETPOST('addtimeyear'); $daytoparse = $now; -if ($yearofday && $monthofday && $dayofday) $daytoparse = dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday); // xxxofday is value of day after submit action 'addtime' -elseif ($year && $month && $day) $daytoparse = dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' +if ($yearofday && $monthofday && $dayofday) { + $daytoparse = dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday); // xxxofday is value of day after submit action 'addtime' +} elseif ($year && $month && $day) { + $daytoparse = dol_mktime(0, 0, 0, $month, $day, $year); // this are value submited after submit of action 'submitdateselect' +} -if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) -{ +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; @@ -114,6 +113,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $arrayfields = array(); $arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>0); $arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>0); +$arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'enabled'=>1, 'position'=>15); /*$arrayfields=array( // Project 'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>103), @@ -124,12 +124,11 @@ $arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'e ); */ // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { - if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["efpt.".$key] = array('label'=>$extrafields->attributes[$object->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs((int) $extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + } } } $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -145,12 +144,13 @@ $search_array_options_task = $extrafields->getOptionalsFromPost($object->table_e $parameters = array('id' => $id, 'taskid' => $taskid, 'projectid' => $projectid); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // Purge 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 -{ +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 $action = ''; - $search_categ = ''; + //$search_categ = ''; $search_usertoprocessid = $user->id; $search_task_ref = ''; $search_task_label = ''; @@ -164,15 +164,12 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' // We redefine $usertoprocess $usertoprocess = $user; } -if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) -{ +if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) { $action = ''; } -if (GETPOST('submitdateselect')) -{ - if (GETPOST('remonth', 'int') && GETPOST('reday', 'int') && GETPOST('reyear', 'int')) - { +if (GETPOST('submitdateselect')) { + if (GETPOST('remonth', 'int') && GETPOST('reday', 'int') && GETPOST('reyear', 'int')) { $daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); } @@ -181,46 +178,40 @@ if (GETPOST('submitdateselect')) include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; -if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') && GETPOST('formfilteraction') != 'listafterchangingselectedfields') -{ +if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') && GETPOST('formfilteraction') != 'listafterchangingselectedfields') { $action = 'assigntask'; - if ($taskid > 0) - { + if ($taskid > 0) { $result = $object->fetch($taskid, $ref); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } else { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), '', 'errors'); $error++; } - if (!GETPOST('type')) - { + if (!GETPOST('type')) { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), '', 'errors'); $error++; } - if (!$error) - { + if (!$error) { $idfortaskuser = $usertoprocess->id; $result = $object->add_contact($idfortaskuser, GETPOST("type"), 'internal'); - if ($result >= 0 || $result == -2) // Contact add ok or already contact of task - { + if ($result >= 0 || $result == -2) { // Contact add ok or already contact of task // Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project) $sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact'; $sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = '.$object->fk_project.' AND tc.element = 'project' AND source = 'internal'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if (!$obj) // User is not already linked to project, so we will create link to first type - { + if (!$obj) { // User is not already linked to project, so we will create link to first type $project = new Project($db); $project->fetch($object->fk_project); // Get type $listofprojcontact = $project->liste_type_contact('internal'); - if (count($listofprojcontact)) - { + if (count($listofprojcontact)) { $typeforprojectcontact = reset(array_keys($listofprojcontact)); $result = $project->add_contact($idfortaskuser, $typeforprojectcontact, 'internal'); } @@ -231,11 +222,9 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if ($result < 0) - { + if ($result < 0) { $error++; - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorTaskAlreadyAssigned"), null, 'warnings'); } else { @@ -243,8 +232,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if (!$error) - { + if (!$error) { setEventMessages("TaskAssignedToEnterTime", null); $taskid = 0; } @@ -252,49 +240,47 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') $action = ''; } -if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilteraction') != 'listafterchangingselectedfields') -{ +if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilteraction') != 'listafterchangingselectedfields') { $timespent_duration = array(); - if (is_array($_POST)) - { - foreach ($_POST as $key => $time) - { - if (intval($time) > 0) - { + if (is_array($_POST)) { + foreach ($_POST as $key => $time) { + if (intval($time) > 0) { $matches = array(); // Hours or minutes of duration - if (preg_match("/([0-9]+)duration(hour|min)/", $key, $matches)) - { + if (preg_match("/([0-9]+)duration(hour|min)/", $key, $matches)) { $id = $matches[1]; - if ($id > 0) - { + if ($id > 0) { // We store HOURS in seconds - if ($matches[2] == 'hour') $timespent_duration[$id] += $time * 60 * 60; + if ($matches[2] == 'hour') { + $timespent_duration[$id] += $time * 60 * 60; + } // We store MINUTES in seconds - if ($matches[2] == 'min') $timespent_duration[$id] += $time * 60; + if ($matches[2] == 'min') { + $timespent_duration[$id] += $time * 60; + } } } } } } - if (count($timespent_duration) > 0) - { - foreach ($timespent_duration as $key => $val) - { + if (count($timespent_duration) > 0) { + foreach ($timespent_duration as $key => $val) { $object->fetch($key); $taskid = $object->id; - if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); - else unset($object->progress); + if (GETPOSTISSET($taskid.'progress')) { + $object->progress = GETPOST($taskid.'progress', 'int'); + } else { + unset($object->progress); + } $object->timespent_duration = $val; $object->timespent_fk_user = $usertoprocess->id; $object->timespent_note = GETPOST($key.'note'); - if (GETPOST($key."hour", 'int') != '' && GETPOST($key."hour", 'int') >= 0) // If hour was entered - { + if (GETPOST($key."hour", 'int') != '' && GETPOST($key."hour", 'int') >= 0) { // If hour was entered $object->timespent_datehour = dol_mktime(GETPOST($key."hour", 'int'), GETPOST($key."min", 'int'), 0, $monthofday, $dayofday, $yearofday); $object->timespent_withhour = 1; } else { @@ -302,8 +288,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac } $object->timespent_date = $object->timespent_datehour; - if ($object->timespent_date > 0) - { + if ($object->timespent_date > 0) { $result = $object->addTimeSpent($user); } else { setEventMessages("ErrorBadDate", null, 'errors'); @@ -311,16 +296,14 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac break; } - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); // Redirect to avoid submit twice on back @@ -328,7 +311,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac exit; } } else { - setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); + setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); } } @@ -362,8 +345,7 @@ $title = $langs->trans("TimeSpent"); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertoprocess, (empty($usertoprocess->id) ? 2 : 0), 1); // Return all project i have permission on. I want my tasks and some of my task may be on a public projet that is not my project -if ($id) -{ +if ($id) { $project->fetch($id); $project->fetch_thirdparty(); } @@ -371,11 +353,21 @@ if ($id) $onlyopenedproject = 1; // or -1 $morewherefilter = ''; -if ($search_project_ref) $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); -if ($search_task_ref) $morewherefilter .= natural_search("t.ref", $search_task_ref); -if ($search_task_label) $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); -if ($search_thirdparty) $morewherefilter .= natural_search("s.nom", $search_thirdparty); -if ($search_declared_progress) $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +if ($search_project_ref) { + $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); +} +if ($search_task_ref) { + $morewherefilter .= natural_search("t.ref", $search_task_ref); +} +if ($search_task_label) { + $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); +} +if ($search_thirdparty) { + $morewherefilter .= natural_search("s.nom", $search_thirdparty); +} +if ($search_declared_progress) { + $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +} $sql = &$morewherefilter; @@ -392,8 +384,7 @@ $extrafieldsobjectkey = 'projet_task'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $tasksarray = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid ? $search_usertoprocessid : 0), 0, $extrafields); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. -if ($morewherefilter) // Get all task without any filter, so we can show total of time spent for not visible tasks -{ +if ($morewherefilter) { // Get all task without any filter, so we can show total of time spent for not visible tasks $tasksarraywithoutfilter = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid ? $search_usertoprocessid : 0)); // We want to see all task of opened project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } $projectsrole = $taskstatic->getUserRolesForProjectsOrTasks($usertoprocess, 0, ($project->id ? $project->id : 0), 0, $onlyopenedproject); @@ -409,12 +400,13 @@ llxHeader("", $title, "", '', '', '', array('/core/js/timesheet.js')); $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); -$param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); +$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); $param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : ''); -/*$search_array_options=$search_array_options_project; +/* +$search_array_options = $search_array_options_project; $search_options_pattern='search_options_'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; */ @@ -428,9 +420,7 @@ $nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&amp;mont $nav .= dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "%A").' '; $nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "day")." </span>\n"; $nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&amp;month=".$next_month."&amp;day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n"; -//$nav .= " &nbsp; (<a href=\"?year=".$nowyear."&amp;month=".$nowmonth."&amp;day=".$nowday.$param."\">".$langs->trans("Today")."</a>)"; $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' '; -//$nav .= ' <input type="submit" name="submitdateselect" class="button valignmiddle" value="'.$langs->trans("Refresh").'">'; $nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>'; $picto = 'clock'; @@ -451,16 +441,18 @@ print dol_get_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, $ // Show description of content print '<div class="hideonsmartphone opacitymedium">'; -if ($mine || ($usertoprocess->id == $user->id)) print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; -else { - if (empty($usertoprocess->id) || $usertoprocess->id < 0) - { - if ($user->rights->projet->all->lire && !$socid) print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; - else print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +if ($mine || ($usertoprocess->id == $user->id)) { + print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +} else { + if (empty($usertoprocess->id) || $usertoprocess->id < 0) { + if ($user->rights->projet->all->lire && !$socid) { + print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } else { + print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } } } -if ($mine || ($usertoprocess->id == $user->id)) -{ +if ($mine || ($usertoprocess->id == $user->id)) { print $langs->trans("OnlyYourTaskAreVisible").'<br>'; } else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>'; @@ -474,7 +466,9 @@ print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpe print '<div class="colorbacktimesheet float valignmiddle">'; $titleassigntask = $langs->transnoentities("AssignTaskToMe"); -if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +if ($usertoprocess->id != $user->id) { + $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +} print '<div class="taskiddiv inline-block">'; print img_picto('', 'projecttask'); $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess); @@ -503,25 +497,25 @@ $moreforfilter = ''; $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierarchyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200 marginleftonly'); +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200'); $moreforfilter .= '</div>'; -if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) -{ +if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('Project'), 'project', 'class="paddingright"').'<input type="text" name="search_project_ref" class="maxwidth100" value="'.dol_escape_htmltag($search_project_ref).'">'; $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('ThirdParty'), 'company', 'class="paddingright"').'<input type="text" name="search_thirdparty" class="maxwidth100" value="'.dol_escape_htmltag($search_thirdparty).'">'; $moreforfilter .= '</div>'; } -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -535,35 +529,44 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi // This must be after the $selectedfields $addcolspan = 0; -if (!empty($arrayfields['t.planned_workload']['checked'])) $addcolspan++; -if (!empty($arrayfields['t.progress']['checked'])) $addcolspan++; -foreach ($arrayfields as $key => $val) -{ - if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++; +if (!empty($arrayfields['t.planned_workload']['checked'])) { + $addcolspan++; +} +if (!empty($arrayfields['t.progress']['checked'])) { + $addcolspan++; +} +foreach ($arrayfields as $key => $val) { + if ($val['checked'] && substr($key, 0, 5) == 'efpt.') { + $addcolspan++; + } } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n"; print '<tr class="liste_titre_filter">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +} print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>'; // TASK fields $search_options_pattern = 'search_task_options_'; $extrafieldsobjectkey = 'projet_task'; $extrafieldsobjectprefix = 'efpt.'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; -print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.planned_workload']['checked'])) -{ - print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>'; -} -if (!empty($arrayfields['t.progress']['checked'])) -{ +if (!empty($arrayfields['t.planned_workload']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.progress']['checked'])) { + print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>'; +} +if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; } -print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; @@ -575,26 +578,32 @@ print '</td>'; print "</tr>\n"; print '<tr class="liste_titre">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<th>'.$langs->trans("Project").'</th>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<th>'.$langs->trans("ThirdParty").'</th>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<th>'.$langs->trans("Project").'</th>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<th>'.$langs->trans("ThirdParty").'</th>'; +} print '<th>'.$langs->trans("Task").'</th>'; // TASK fields $extrafieldsobjectkey = 'projet_task'; $extrafieldsobjectprefix = 'efpt.'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; -if (!empty($arrayfields['t.planned_workload']['checked'])) -{ - print '<th class="right leftborder plannedworkload maxwidth100">'.$langs->trans("PlannedWorkload").'</th>'; +if (!empty($arrayfields['t.planned_workload']['checked'])) { + print '<th class="leftborder plannedworkload maxwidth100 right">'.$langs->trans("PlannedWorkload").'</th>'; } -if (!empty($arrayfields['t.progress']['checked'])) -{ +if (!empty($arrayfields['t.progress']['checked'])) { print '<th class="right maxwidth100">'.$langs->trans("ProgressDeclared").'</th>'; } -/*print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'</td>'; -if ($usertoprocess->id == $user->id) print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>'; -else print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';*/ -print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></th>'; -print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="opacitymedium">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>'; +if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>'; + print '<span class="nowraponall">'; + print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>'; + print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>'; + print '</span>'; + print '</th>'; + print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>'; +} print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>'; // By default, we can edit only tasks we are assigned to @@ -602,11 +611,9 @@ $restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSI // Get if user is available or not for each day $isavailable = array(); -if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) -{ +if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) { $tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS); - if (count($tmparray) >= 2) - { + if (count($tmparray) >= 2) { $numstartworkingday = $tmparray[0]; $numendworkingday = $tmparray[1]; } @@ -617,24 +624,29 @@ $isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoproces $isavailable[$daytoparse] = $isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day $test = num_public_holiday($daytoparse, $daytoparse + 86400, $mysoc->country_code); -if ($test) $isavailable[$daytoparse] = array('morning'=>false, 'afternoon'=>false, 'morning_reason'=>'public_holiday', 'afternoon_reason'=>'public_holiday'); +if ($test) { + $isavailable[$daytoparse] = array('morning'=>false, 'afternoon'=>false, 'morning_reason'=>'public_holiday', 'afternoon_reason'=>'public_holiday'); +} $tmparray = dol_getdate($daytoparse, true); // detail of current day // For monday, must be 0 for monday if MAIN_START_WEEK = 1, must be 1 for monday if MAIN_START_WEEK = 0 $idw = ($tmparray['wday'] - (empty($conf->global->MAIN_START_WEEK) ? 0 : 1)); // numstartworkingday and numendworkingday are default start and end date of working days (1 means sunday if MAIN_START_WEEK is 0, 1 means monday if MAIN_START_WEEK is 1) $cssweekend = ''; -if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. -{ +if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } $tmpday = dol_time_plus_duree($daytoparse, $idw, 'd'); $cssonholiday = ''; -if (!$isavailable[$daytoparse]['morning'] && !$isavailable[$daytoparse]['afternoon']) $cssonholiday .= 'onholidayallday '; -elseif (!$isavailable[$daytoparse]['morning']) $cssonholiday .= 'onholidaymorning '; -elseif (!$isavailable[$daytoparse]['afternoon']) $cssonholiday .= 'onholidayafternoon '; +if (!$isavailable[$daytoparse]['morning'] && !$isavailable[$daytoparse]['afternoon']) { + $cssonholiday .= 'onholidayallday '; +} elseif (!$isavailable[$daytoparse]['morning']) { + $cssonholiday .= 'onholidaymorning '; +} elseif (!$isavailable[$daytoparse]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; +} print '<th class="center'.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'">'.$langs->trans("Duration").'</th>'; print '<th class="center">'.$langs->trans("Note").'</th>'; @@ -643,14 +655,17 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $ print "</tr>\n"; -$colspan = 4 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2); +$colspan = 2 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2); -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print '<tr class="liste_total">'; print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">'; print $langs->trans("Total"); print '</td>'; + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } print '<td class="liste_total leftborder">'; //print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>'; print '</td>'; @@ -663,8 +678,7 @@ if ($conf->use_javascript_ajax) } -if (count($tasksarray) > 0) -{ +if (count($tasksarray) > 0) { //var_dump($tasksarray); // contains only selected tasks //var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter) //var_dump($tasksrole); @@ -678,21 +692,17 @@ if (count($tasksarray) > 0) // Calculate total for all tasks $listofdistinctprojectid = array(); // List of all distinct projects - if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) - { - foreach ($tasksarraywithoutfilter as $tmptask) - { + if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) { + foreach ($tasksarraywithoutfilter as $tmptask) { $listofdistinctprojectid[$tmptask->fk_project] = $tmptask->fk_project; } } //var_dump($listofdistinctprojectid); $totalforeachday = array(); - foreach ($listofdistinctprojectid as $tmpprojectid) - { + foreach ($listofdistinctprojectid as $tmpprojectid) { $projectstatic->id = $tmpprojectid; $projectstatic->loadTimeSpent($daytoparse, 0, $usertoprocess->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - for ($idw = 0; $idw < 7; $idw++) - { + for ($idw = 0; $idw < 7; $idw++) { $tmpday = dol_time_plus_duree($daytoparse, $idw, 'd'); $totalforeachday[$tmpday] += $projectstatic->weekWorkLoad[$tmpday]; } @@ -701,29 +711,32 @@ if (count($tasksarray) > 0) // Is there a diff between selected/filtered tasks and all tasks ? $isdiff = 0; - if (count($totalforeachday)) - { + if (count($totalforeachday)) { $timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]); - if ($timeonothertasks) - { + if ($timeonothertasks) { $isdiff = 1; } } // There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user - if ($isdiff) - { + if ($isdiff) { print '<tr class="oddeven othertaskwithtime">'; print '<td colspan="'.($colspan - 1).'" class="opacitymedium">'; print $langs->trans("OtherFilteredTasks"); print '</td>'; + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } print '<td class="leftborder"></td>'; print '<td class="center">'; $timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]); //if ($timeonothertasks) //{ print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center" size="2" disabled="" id="timespent[-1][0]" name="task[-1][0]" value="'; - if ($timeonothertasks) print convertSecondToTime($timeonothertasks, 'allhourmin'); + if ($timeonothertasks) { + print convertSecondToTime($timeonothertasks, 'allhourmin'); + } print '"></span>'; //} print '</td>'; @@ -732,12 +745,15 @@ if (count($tasksarray) > 0) print '</tr>'; } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr class="liste_total">'; print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">'; print $langs->trans("Total"); print '</td>'; + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } print '<td class="liste_total leftborder">'; //print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>'; print '</td>'; @@ -764,8 +780,7 @@ print '</form>'; $modeinput = 'hours'; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n"; print '<script type="text/javascript">'."\n"; print "jQuery(document).ready(function () {\n"; diff --git a/htdocs/projet/activity/permonth.php b/htdocs/projet/activity/permonth.php index 9a95f8abf79..43cdfa863f5 100644 --- a/htdocs/projet/activity/permonth.php +++ b/htdocs/projet/activity/permonth.php @@ -44,9 +44,11 @@ $id = GETPOST('id', 'int'); $taskid = GETPOST('taskid', 'int'); $mine = 0; -if ($mode == 'mine') $mine = 1; +if ($mode == 'mine') { + $mine = 1; +} -$projectid = isset($_GET["id"]) ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); +$projectid = GETPOSTISSET("id") ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); // Security check $socid = 0; @@ -55,10 +57,6 @@ $socid = 0; $result = restrictedArea($user, 'projet', $projectid); $now = dol_now(); -$nowtmp = dol_getdate($now); -$nowday = $nowtmp['mday']; -$nowmonth = $nowtmp['mon']; -$nowyear = $nowtmp['year']; $year = GETPOST('reyear') ?GETPOST('reyear', 'int') : (GETPOST("year") ?GETPOST("year", "int") : date("Y")); $month = GETPOST('remonth') ?GETPOST('remonth', 'int') : (GETPOST("month") ?GETPOST("month", "int") : date("m")); @@ -66,7 +64,7 @@ $day = GETPOST('reday') ?GETPOST('reday', 'int') : (GETPOST("day") ?GETPOST("day $day = (int) $day; $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); -$search_categ = GETPOST("search_categ", 'alpha'); +//$search_categ = GETPOST("search_categ", 'alpha'); $search_usertoprocessid = GETPOST('search_usertoprocessid', 'int'); $search_task_ref = GETPOST('search_task_ref', 'alpha'); $search_task_label = GETPOST('search_task_label', 'alpha'); @@ -91,12 +89,10 @@ $TFirstDays = getFirstDayOfEachWeek($TWeek, $year); $TFirstDays[reset($TWeek)] = '01'; //first day of month $TLastDays = getLastDayOfEachWeek($TWeek, $year); $TLastDays[end($TWeek)] = date("t", strtotime($year.'-'.$month.'-'.$day)); //last day of month -if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) -{ +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; @@ -112,13 +108,14 @@ $object = new Task($db); */ $parameters = array('id' => $id, 'taskid' => $taskid, 'projectid' => $projectid, 'TWeek' => $TWeek, 'TFirstDays' => $TFirstDays, 'TLastDays' => $TLastDays); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // Purge 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 -{ +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 $action = ''; - $search_categ = ''; + //$search_categ = ''; $search_usertoprocessid = $user->id; $search_task_ref = ''; $search_task_label = ''; @@ -126,58 +123,50 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_thirdparty = ''; $search_declared_progress = ''; } -if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) -{ +if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) { $action = ''; } -if (GETPOST('submitdateselect')) -{ +if (GETPOST('submitdateselect')) { $daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $action = ''; } -if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask')) -{ +if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask')) { $action = 'assigntask'; - if ($taskid > 0) - { + if ($taskid > 0) { $result = $object->fetch($taskid, $ref); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } else { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), '', 'errors'); $error++; } - if (!GETPOST('type')) - { + if (!GETPOST('type')) { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), '', 'errors'); $error++; } - if (!$error) - { + if (!$error) { $idfortaskuser = $usertoprocess->id; $result = $object->add_contact($idfortaskuser, GETPOST("type"), 'internal'); - if ($result >= 0 || $result == -2) // Contact add ok or already contact of task - { + if ($result >= 0 || $result == -2) { // Contact add ok or already contact of task // Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project) $sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact'; $sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = '.$object->fk_project.' AND tc.element = 'project' AND source = 'internal'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if (!$obj) // User is not already linked to project, so we will create link to first type - { + if (!$obj) { // User is not already linked to project, so we will create link to first type $project = new Project($db); $project->fetch($object->fk_project); // Get type $listofprojcontact = $project->liste_type_contact('internal'); - if (count($listofprojcontact)) - { + if (count($listofprojcontact)) { $typeforprojectcontact = reset(array_keys($listofprojcontact)); $result = $project->add_contact($idfortaskuser, $typeforprojectcontact, 'internal'); } @@ -188,11 +177,9 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if ($result < 0) - { + if ($result < 0) { $error++; - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorTaskAlreadyAssigned"), null, 'warnings'); } else { @@ -200,8 +187,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if (!$error) - { + if (!$error) { setEventMessages("TaskAssignedToEnterTime", null); $taskid = 0; } @@ -209,29 +195,29 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') $action = ''; } -if ($action == 'addtime' && $user->rights->projet->lire) -{ +if ($action == 'addtime' && $user->rights->projet->lire) { $timetoadd = $_POST['task']; - if (empty($timetoadd)) - { + if (empty($timetoadd)) { setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); } else { - foreach ($timetoadd as $taskid => $value) // Loop on each task - { + foreach ($timetoadd as $taskid => $value) { // Loop on each task $updateoftaskdone = 0; - foreach ($value as $key => $val) // Loop on each day - { + foreach ($value as $key => $val) { // Loop on each day $amountoadd = $timetoadd[$taskid][$key]; - if (!empty($amountoadd)) - { + if (!empty($amountoadd)) { $tmpduration = explode(':', $amountoadd); $newduration = 0; - if (!empty($tmpduration[0])) $newduration += ($tmpduration[0] * 3600); - if (!empty($tmpduration[1])) $newduration += ($tmpduration[1] * 60); - if (!empty($tmpduration[2])) $newduration += ($tmpduration[2]); + if (!empty($tmpduration[0])) { + $newduration += ($tmpduration[0] * 3600); + } + if (!empty($tmpduration[1])) { + $newduration += ($tmpduration[1] * 60); + } + if (!empty($tmpduration[2])) { + $newduration += ($tmpduration[2]); + } - if ($newduration > 0) - { + if ($newduration > 0) { $object->fetch($taskid); $object->progress = GETPOST($taskid.'progress', 'int'); $object->timespent_duration = $newduration; @@ -240,8 +226,7 @@ if ($action == 'addtime' && $user->rights->projet->lire) $object->timespent_datehour = $object->timespent_date; $result = $object->addTimeSpent($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; @@ -252,16 +237,13 @@ if ($action == 'addtime' && $user->rights->projet->lire) } } - if (!$updateoftaskdone) // Check to update progress if no update were done on task. - { + if (!$updateoftaskdone) { // Check to update progress if no update were done on task. $object->fetch($taskid); //var_dump($object->progress);var_dump(GETPOST($taskid . 'progress', 'int')); exit; - if ($object->progress != GETPOST($taskid.'progress', 'int')) - { + if ($object->progress != GETPOST($taskid.'progress', 'int')) { $object->progress = GETPOST($taskid.'progress', 'int'); $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; @@ -270,8 +252,7 @@ if ($action == 'addtime' && $user->rights->projet->lire) } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $param = ''; @@ -313,8 +294,7 @@ $title = $langs->trans("TimeSpent"); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertoprocess, (empty($usertoprocess->id) ? 2 : 0), 1); // Return all project i have permission on (assigned to me+public). I want my tasks and some of my task may be on a public projet that is not my project //var_dump($projectsListId); -if ($id) -{ +if ($id) { $project->fetch($id); $project->fetch_thirdparty(); } @@ -322,15 +302,24 @@ if ($id) $onlyopenedproject = 1; // or -1 $morewherefilter = ''; -if ($search_project_ref) $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); -if ($search_task_ref) $morewherefilter .= natural_search("t.ref", $search_task_ref); -if ($search_task_label) $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); -if ($search_thirdparty) $morewherefilter .= natural_search("s.nom", $search_thirdparty); -if ($search_declared_progress) $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +if ($search_project_ref) { + $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); +} +if ($search_task_ref) { + $morewherefilter .= natural_search("t.ref", $search_task_ref); +} +if ($search_task_label) { + $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); +} +if ($search_thirdparty) { + $morewherefilter .= natural_search("s.nom", $search_thirdparty); +} +if ($search_declared_progress) { + $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +} $tasksarray = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid ? $search_usertoprocessid : 0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. -if ($morewherefilter) // Get all task without any filter, so we can show total of time spent for not visible tasks -{ +if ($morewherefilter) { // Get all task without any filter, so we can show total of time spent for not visible tasks $tasksarraywithoutfilter = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid ? $search_usertoprocessid : 0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } $projectsrole = $taskstatic->getUserRolesForProjectsOrTasks($usertoprocess, 0, ($project->id ? $project->id : 0), 0, $onlyopenedproject); @@ -356,9 +345,7 @@ $param .= ($search_task_label ? '&search_task_label='.$search_task_label : ''); $nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n"; $nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%Y").", ".$langs->trans(date('F', mktime(0, 0, 0, $month, 10)))." </span>\n"; $nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n"; -//$nav.=" &nbsp; (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)"; $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' '; -//$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>'; $picto = 'clock'; @@ -376,16 +363,18 @@ print dol_get_fiche_head($head, 'inputpermonth', $langs->trans('TimeSpent'), -1, // Show description of content print '<div class="hideonsmartphone opacitymedium">'; -if ($mine || ($usertoprocess->id == $user->id)) print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; -else { - if (empty($usertoprocess->id) || $usertoprocess->id < 0) - { - if ($user->rights->projet->all->lire && !$socid) print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; - else print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +if ($mine || ($usertoprocess->id == $user->id)) { + print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +} else { + if (empty($usertoprocess->id) || $usertoprocess->id < 0) { + if ($user->rights->projet->all->lire && !$socid) { + print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } else { + print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } } } -if ($mine || ($usertoprocess->id == $user->id)) -{ +if ($mine || ($usertoprocess->id == $user->id)) { print $langs->trans("OnlyYourTaskAreVisible").'<br>'; } else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>'; @@ -398,7 +387,9 @@ print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpe print '<div class="colorbacktimesheet float valignmiddle">'; $titleassigntask = $langs->transnoentities("AssignTaskToMe"); -if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +if ($usertoprocess->id != $user->id) { + $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +} print '<div class="taskiddiv inline-block">'; print img_picto('', 'projecttask'); $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1); @@ -428,25 +419,25 @@ if (! empty($conf->categorie->enabled)) $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierachyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200'); +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200'); $moreforfilter .= '</div>'; -if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) -{ +if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('Project'), 'project', 'class="paddingright"').'<input type="text" name="search_project_ref" class="maxwidth100" value="'.dol_escape_htmltag($search_project_ref).'">'; $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('ThirdParty'), 'company', 'class="paddingright"').'<input type="text" name="search_thirdparty" class="maxwidth100" value="'.dol_escape_htmltag($search_thirdparty).'">'; $moreforfilter .= '</div>'; } -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -460,15 +451,18 @@ print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n"; print '<tr class="liste_titre_filter">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +} print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>'; print '<td class="liste_titre"></td>'; print '<td class="liste_titre"></td>'; -foreach ($TWeek as $week_number) -{ +foreach ($TWeek as $week_number) { print '<td class="liste_titre"></td>'; } // Action column @@ -479,19 +473,27 @@ print '</td>'; print "</tr>\n"; print '<tr class="liste_titre">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("Project").'</td>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td>'.$langs->trans("ThirdParty").'</td>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td>'.$langs->trans("Project").'</td>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td>'.$langs->trans("ThirdParty").'</td>'; +} print '<td>'.$langs->trans("Task").'</td>'; print '<td align="right" class="leftborder plannedworkload maxwidth75">'.$langs->trans("PlannedWorkload").'</td>'; print '<td align="right" class="maxwidth75">'.$langs->trans("ProgressDeclared").'</td>'; /*print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'</td>'; if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByYou").'</td>'; else print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByUser").'</td>';*/ -print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></td>'; -print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="opacitymedium">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</td>'; +print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>'; +print '<span class="nowraponall">'; +print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>'; +print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>'; +print '</span>'; +print '</td>'; +print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</td>'; -foreach ($TWeek as $week_number) -{ +foreach ($TWeek as $week_number) { print '<td width="6%" align="center" class="bold hide">'.$langs->trans("Week").' '.$week_number.'<br>('.$TFirstDays[$week_number].'...'.$TLastDays[$week_number].')</td>'; } print '<td></td>'; @@ -507,8 +509,7 @@ $isavailable = array(); // TODO See code into perweek.php to initialize isavailable array -if (count($tasksarray) > 0) -{ +if (count($tasksarray) > 0) { //var_dump($tasksarray); // contains only selected tasks //var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter) //var_dump($tasksrole); @@ -522,21 +523,17 @@ if (count($tasksarray) > 0) // Calculate total for all tasks $listofdistinctprojectid = array(); // List of all distinct projects - if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) - { - foreach ($tasksarraywithoutfilter as $tmptask) - { + if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) { + foreach ($tasksarraywithoutfilter as $tmptask) { $listofdistinctprojectid[$tmptask->fk_project] = $tmptask->fk_project; } } //var_dump($listofdistinctprojectid); $totalforeachweek = array(); - foreach ($listofdistinctprojectid as $tmpprojectid) - { + foreach ($listofdistinctprojectid as $tmpprojectid) { $projectstatic->id = $tmpprojectid; $projectstatic->loadTimeSpentMonth($firstdaytoshow, 0, $usertoprocess->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - foreach ($TWeek as $weekNb) - { + foreach ($TWeek as $weekNb) { $totalforeachweek[$weekNb] += $projectstatic->monthWorkLoad[$weekNb]; } } @@ -546,13 +543,10 @@ if (count($tasksarray) > 0) // Is there a diff between selected/filtered tasks and all tasks ? $isdiff = 0; - if (count($totalforeachweek)) - { - foreach ($TWeek as $weekNb) - { + if (count($totalforeachweek)) { + foreach ($TWeek as $weekNb) { $timeonothertasks = ($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]); - if ($timeonothertasks) - { + if ($timeonothertasks) { $isdiff = 1; break; } @@ -560,19 +554,16 @@ if (count($tasksarray) > 0) } // There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user - if ($isdiff) - { + if ($isdiff) { print '<tr class="oddeven othertaskwithtime">'; print '<td colspan="'.$colspan.'" class="opacitymedium">'; print $langs->trans("OtherFilteredTasks"); print '</td>'; - foreach ($TWeek as $weekNb) - { + foreach ($TWeek as $weekNb) { print '<td class="center hide">'; $timeonothertasks = ($totalforeachweek[$weekNb] - $totalforvisibletasks[$weekNb]); - if ($timeonothertasks) - { + if ($timeonothertasks) { print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled="" id="timespent[-1]['.$weekNb.']" name="task[-1]['.$weekNb.']" value="'; print convertSecondToTime($timeonothertasks, 'allhourmin'); print '"></span>'; @@ -583,16 +574,14 @@ if (count($tasksarray) > 0) print '</tr>'; } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr class="liste_total"> <td class="liste_total" colspan="'.$colspan.'">'; print $langs->trans("Total"); print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>'; print '</td>'; - foreach ($TWeek as $weekNb) - { + foreach ($TWeek as $weekNb) { print '<td class="liste_total hide'.$weekNb.'" align="center"><div class="totalDay'.$weekNb.'">'.convertSecondToTime($totalforvisibletasks[$weekNb], 'allhourmin').'</div></td>'; } print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td> @@ -615,8 +604,7 @@ print '</form>'."\n\n"; $modeinput = 'hours'; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n"; print '<script type="text/javascript">'."\n"; print "jQuery(document).ready(function () {\n"; @@ -629,8 +617,7 @@ if ($conf->use_javascript_ajax) } });'."\n"; - foreach ($TWeek as $week_number) - { + foreach ($TWeek as $week_number) { print ' updateTotal('.$week_number.',\''.$modeinput.'\');'; } print "\n});\n"; diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index c29486302af..62f26a881b7 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2010 François Legastelois <flegastelois@teclib.com> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,9 +46,11 @@ $taskid = GETPOST('taskid', 'int'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'perweekcard'; $mine = 0; -if ($mode == 'mine') $mine = 1; +if ($mode == 'mine') { + $mine = 1; +} -$projectid = isset($_GET["id"]) ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); +$projectid = GETPOSTISSET("id") ? GETPOST("id", "int", 1) : GETPOST("projectid", "int"); $hookmanager->initHooks(array('timesheetperweekcard')); @@ -59,10 +61,6 @@ $socid = 0; $result = restrictedArea($user, 'projet', $projectid); $now = dol_now(); -$nowtmp = dol_getdate($now); -$nowday = $nowtmp['mday']; -$nowmonth = $nowtmp['mon']; -$nowyear = $nowtmp['year']; $year = GETPOST('reyear', 'int') ?GETPOST('reyear', 'int') : (GETPOST("year", 'int') ?GETPOST("year", "int") : date("Y")); $month = GETPOST('remonth', 'int') ?GETPOST('remonth', 'int') : (GETPOST("month", 'int') ?GETPOST("month", "int") : date("m")); @@ -71,7 +69,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); $day = (int) $day; -$search_categ = GETPOST("search_categ", 'alpha'); +//$search_categ = GETPOST("search_categ", 'alpha'); $search_usertoprocessid = GETPOST('search_usertoprocessid', 'int'); $search_task_ref = GETPOST('search_task_ref', 'alpha'); $search_task_label = GETPOST('search_task_label', 'alpha'); @@ -99,12 +97,10 @@ $next_day = $next['day']; $firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year); $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); -if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) -{ +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; @@ -122,28 +118,28 @@ $extrafields->fetch_name_optionals_label($object->table_element); $arrayfields = array(); /*$arrayfields=array( - // Project - 'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>103), - 'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>104), - 'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>105), - 'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110), - 'p.usage_bill_time'=>array('label'=>$langs->trans("BillTimeShort"), 'checked'=>0, 'position'=>115), -);*/ -$arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>0); -$arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>0); + // Project + 'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>103), + 'p.fk_opp_status'=>array('label'=>$langs->trans("OpportunityStatusShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>104), + 'p.opp_percent'=>array('label'=>$langs->trans("OpportunityProbabilityShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>105), + 'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110), + 'p.usage_bill_time'=>array('label'=>$langs->trans("BillTimeShort"), 'checked'=>0, 'position'=>115), + );*/ +$arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>5); +$arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>10); +$arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'enabled'=>1, 'position'=>15); /*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'], 'position'=>$val['position']); -}*/ + { + // 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'], 'position'=>$val['position']); + }*/ // Definition of fields for list // Extra fields -if (is_array($extrafields->attributes['projet_task']['label']) && count($extrafields->attributes['projet_task']['label']) > 0) -{ - foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) - { - if (!empty($extrafields->attributes['projet_task']['list'][$key])) +if (is_array($extrafields->attributes['projet_task']['label']) && count($extrafields->attributes['projet_task']['label']) > 0) { + foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) { + if (!empty($extrafields->attributes['projet_task']['list'][$key])) { $arrayfields["efpt.".$key] = array('label'=>$extrafields->attributes['projet_task']['label'][$key], 'checked'=>(($extrafields->attributes['projet_task']['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes['projet_task']['pos'][$key], 'enabled'=>(abs((int) $extrafields->attributes['projet_task']['list'][$key]) != 3 && $extrafields->attributes['projet_task']['perms'][$key])); + } } } $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -160,12 +156,13 @@ $search_array_options_task = $extrafields->getOptionalsFromPost('projet_task', ' $parameters = array('id' => $id, 'taskid' => $taskid, 'projectid' => $projectid); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // Purge 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 -{ +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 $action = ''; - $search_categ = ''; + //$search_categ = ''; $search_usertoprocessid = $user->id; $search_task_ref = ''; $search_task_label = ''; @@ -179,61 +176,55 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' // We redefine $usertoprocess $usertoprocess = $user; } -if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) -{ +if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') || GETPOST("button_search", 'alpha')) { $action = ''; } -if (GETPOST('submitdateselect')) -{ - $daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); +if (GETPOST('submitdateselect')) { + if (GETPOST('remonth', 'int') && GETPOST('reday', 'int') && GETPOST('reyear', 'int')) { + $daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + } $action = ''; } include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; -if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') && GETPOST('formfilteraction') != 'listafterchangingselectedfields') -{ +if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') && GETPOST('formfilteraction') != 'listafterchangingselectedfields') { $action = 'assigntask'; - if ($taskid > 0) - { + if ($taskid > 0) { $result = $object->fetch($taskid, $ref); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } else { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), '', 'errors'); $error++; } - if (!GETPOST('type')) - { + if (!GETPOST('type')) { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), '', 'errors'); $error++; } - if (!$error) - { + if (!$error) { $idfortaskuser = $usertoprocess->id; $result = $object->add_contact($idfortaskuser, GETPOST("type"), 'internal'); - if ($result >= 0 || $result == -2) // Contact add ok or already contact of task - { + if ($result >= 0 || $result == -2) { // Contact add ok or already contact of task // Test if we are already contact of the project (should be rare but sometimes we can add as task contact without being contact of project, like when admin user has been removed from contact of project) $sql = 'SELECT ec.rowid FROM '.MAIN_DB_PREFIX.'element_contact as ec, '.MAIN_DB_PREFIX.'c_type_contact as tc WHERE tc.rowid = ec.fk_c_type_contact'; $sql .= ' AND ec.fk_socpeople = '.$idfortaskuser." AND ec.element_id = '.$object->fk_project.' AND tc.element = 'project' AND source = 'internal'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if (!$obj) // User is not already linked to project, so we will create link to first type - { + if (!$obj) { // User is not already linked to project, so we will create link to first type $project = new Project($db); $project->fetch($object->fk_project); // Get type $listofprojcontact = $project->liste_type_contact('internal'); - if (count($listofprojcontact)) - { + if (count($listofprojcontact)) { $typeforprojectcontact = reset(array_keys($listofprojcontact)); $result = $project->add_contact($idfortaskuser, $typeforprojectcontact, 'internal'); } @@ -244,11 +235,9 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if ($result < 0) - { + if ($result < 0) { $error++; - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorTaskAlreadyAssigned"), null, 'warnings'); } else { @@ -256,8 +245,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') } } - if (!$error) - { + if (!$error) { setEventMessages("TaskAssignedToEnterTime", null); $taskid = 0; } @@ -265,33 +253,36 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') $action = ''; } -if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilteraction') != 'listafterchangingselectedfields') -{ +if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilteraction') != 'listafterchangingselectedfields') { $timetoadd = $_POST['task']; - if (empty($timetoadd)) - { + if (empty($timetoadd)) { setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); } else { - foreach ($timetoadd as $taskid => $value) // Loop on each task - { + foreach ($timetoadd as $taskid => $value) { // Loop on each task $updateoftaskdone = 0; - foreach ($value as $key => $val) // Loop on each day - { + foreach ($value as $key => $val) { // Loop on each day $amountoadd = $timetoadd[$taskid][$key]; - if (!empty($amountoadd)) - { + if (!empty($amountoadd)) { $tmpduration = explode(':', $amountoadd); $newduration = 0; - if (!empty($tmpduration[0])) $newduration += ($tmpduration[0] * 3600); - if (!empty($tmpduration[1])) $newduration += ($tmpduration[1] * 60); - if (!empty($tmpduration[2])) $newduration += ($tmpduration[2]); + if (!empty($tmpduration[0])) { + $newduration += ($tmpduration[0] * 3600); + } + if (!empty($tmpduration[1])) { + $newduration += ($tmpduration[1] * 60); + } + if (!empty($tmpduration[2])) { + $newduration += ($tmpduration[2]); + } - if ($newduration > 0) - { - $object->fetch($taskid); + if ($newduration > 0) { + $object->fetch($taskid); - if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); - else unset($object->progress); + if (GETPOSTISSET($taskid.'progress')) { + $object->progress = GETPOST($taskid.'progress', 'int'); + } else { + unset($object->progress); + } $object->timespent_duration = $newduration; $object->timespent_fk_user = $usertoprocess->id; @@ -300,8 +291,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $object->timespent_note = $object->description; $result = $object->addTimeSpent($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; @@ -312,16 +302,13 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac } } - if (!$updateoftaskdone) // Check to update progress if no update were done on task. - { + if (!$updateoftaskdone) { // Check to update progress if no update were done on task. $object->fetch($taskid); //var_dump($object->progress);var_dump(GETPOST($taskid . 'progress', 'int')); exit; - if ($object->progress != GETPOST($taskid.'progress', 'int')) - { + if ($object->progress != GETPOST($taskid.'progress', 'int')) { $object->progress = GETPOST($taskid.'progress', 'int'); $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; break; @@ -330,8 +317,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $param = ''; @@ -347,18 +333,18 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : ''); /*$search_array_options=$search_array_options_project; - $search_options_pattern='search_options_'; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - */ + $search_options_pattern='search_options_'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + */ $search_array_options = $search_array_options_task; $search_options_pattern = 'search_task_options_'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - // Redirect to avoid submit twice on back - header('Location: '.$_SERVER["PHP_SELF"].'?'.$param); - exit; - } + // Redirect to avoid submit twice on back + header('Location: '.$_SERVER["PHP_SELF"].'?'.$param); + exit; + } } } @@ -381,8 +367,7 @@ $title = $langs->trans("TimeSpent"); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertoprocess, (empty($usertoprocess->id) ? 2 : 0), 1); // Return all project i have permission on (assigned to me+public). I want my tasks and some of my task may be on a public projet that is not my project //var_dump($projectsListId); -if ($id) -{ +if ($id) { $project->fetch($id); $project->fetch_thirdparty(); } @@ -390,20 +375,30 @@ if ($id) $onlyopenedproject = 1; // or -1 $morewherefilter = ''; -if ($search_project_ref) $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); -if ($search_task_ref) $morewherefilter .= natural_search("t.ref", $search_task_ref); -if ($search_task_label) $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); -if ($search_thirdparty) $morewherefilter .= natural_search("s.nom", $search_thirdparty); -if ($search_declared_progress) $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +if ($search_project_ref) { + $morewherefilter .= natural_search(array("p.ref", "p.title"), $search_project_ref); +} +if ($search_task_ref) { + $morewherefilter .= natural_search("t.ref", $search_task_ref); +} +if ($search_task_label) { + $morewherefilter .= natural_search(array("t.ref", "t.label"), $search_task_label); +} +if ($search_thirdparty) { + $morewherefilter .= natural_search("s.nom", $search_thirdparty); +} +if ($search_declared_progress) { + $morewherefilter .= natural_search("t.progress", $search_declared_progress, 1); +} $sql = &$morewherefilter; /*$search_array_options = $search_array_options_project; -$extrafieldsobjectprefix='efp.'; -$search_options_pattern='search_options_'; -$extrafieldsobjectkey='projet'; -include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; -*/ + $extrafieldsobjectprefix='efp.'; + $search_options_pattern='search_options_'; + $extrafieldsobjectkey='projet'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; + */ $search_array_options = $search_array_options_task; $extrafieldsobjectprefix = 'efpt.'; $search_options_pattern = 'search_task_options_'; @@ -411,8 +406,7 @@ $extrafieldsobjectkey = 'projet_task'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $tasksarray = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, $search_project_ref, $onlyopenedproject, $morewherefilter, ($search_usertoprocessid ? $search_usertoprocessid : 0), 0, $extrafields); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. -if ($morewherefilter) // Get all task without any filter, so we can show total of time spent for not visible tasks -{ +if ($morewherefilter) { // Get all task without any filter, so we can show total of time spent for not visible tasks $tasksarraywithoutfilter = $taskstatic->getTasksArray(0, 0, ($project->id ? $project->id : 0), $socid, 0, '', $onlyopenedproject, '', ($search_usertoprocessid ? $search_usertoprocessid : 0)); // We want to see all tasks of open project i am allowed to see and that match filter, not only my tasks. Later only mine will be editable later. } $projectsrole = $taskstatic->getUserRolesForProjectsOrTasks($usertoprocess, 0, ($project->id ? $project->id : 0), 0, $onlyopenedproject); @@ -446,9 +440,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n"; $nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("WeekShort")." ".$week." </span>\n"; $nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n"; -//$nav .= " &nbsp; (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)"; $nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' '; -//$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav .= ' <button type="submit" name="submitdateselect" value="x" class="bordertransp"><span class="fa fa-search"></span></button>'; $picto = 'clock'; @@ -468,16 +460,18 @@ print dol_get_fiche_head($head, 'inputperweek', $langs->trans('TimeSpent'), -1, // Show description of content print '<div class="hideonsmartphone opacitymedium">'; -if ($mine || ($usertoprocess->id == $user->id)) print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; -else { - if (empty($usertoprocess->id) || $usertoprocess->id < 0) - { - if ($user->rights->projet->all->lire && !$socid) print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; - else print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +if ($mine || ($usertoprocess->id == $user->id)) { + print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; +} else { + if (empty($usertoprocess->id) || $usertoprocess->id < 0) { + if ($user->rights->projet->all->lire && !$socid) { + print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } else { + print $langs->trans("ProjectsPublicTaskDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'<br>'; + } } } -if ($mine || ($usertoprocess->id == $user->id)) -{ +if ($mine || ($usertoprocess->id == $user->id)) { print $langs->trans("OnlyYourTaskAreVisible").'<br>'; } else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'<br>'; @@ -490,7 +484,9 @@ print '<div class="floatright right'.($conf->dol_optimize_smallscreen ? ' centpe print '<div class="colorbacktimesheet float valignmiddle">'; $titleassigntask = $langs->transnoentities("AssignTaskToMe"); -if ($usertoprocess->id != $user->id) $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +if ($usertoprocess->id != $user->id) { + $titleassigntask = $langs->transnoentities("AssignTaskToUser", $usertoprocess->getFullName($langs)); +} print '<div class="taskiddiv inline-block">'; print img_picto('', 'projecttask'); $formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, '', '', 'all', $usertoprocess); @@ -507,18 +503,15 @@ $startday = dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray[' // Get if user is available or not for each day $isavailable = array(); -if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) -{ +if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)) { $tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS); - if (count($tmparray) >= 2) - { + if (count($tmparray) >= 2) { $numstartworkingday = $tmparray[0]; $numendworkingday = $tmparray[1]; } } -for ($idw = 0; $idw < 7; $idw++) -{ +for ($idw = 0; $idw < 7; $idw++) { $dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0 $dayinloop = dol_time_plus_duree($startday, $idw, 'd'); @@ -535,7 +528,9 @@ for ($idw = 0; $idw < 7; $idw++) $isavailable[$dayinloopfromfirstdaytoshow] = $isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day $test = num_public_holiday($dayinloopfromfirstdaytoshow, $dayinloopfromfirstdaytoshow + 86400, $mysoc->country_code); - if ($test) $isavailable[$dayinloopfromfirstdaytoshow] = array('morning'=>false, 'afternoon'=>false, 'morning_reason'=>'public_holiday', 'afternoon_reason'=>'public_holiday'); + if ($test) { + $isavailable[$dayinloopfromfirstdaytoshow] = array('morning'=>false, 'afternoon'=>false, 'morning_reason'=>'public_holiday', 'afternoon_reason'=>'public_holiday'); + } } //var_dump($isavailable); @@ -545,38 +540,38 @@ $moreforfilter = ''; // Filter on categories /* -if (! empty($conf->categorie->enabled)) -{ - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.='<div class="divsearchfield">'; - $moreforfilter.=$langs->trans('ProjectCategories'). ': '; - $moreforfilter.=$formother->select_categories('project', $search_categ, 'search_categ', 1, 1, 'maxwidth300'); - $moreforfilter.='</div>'; -}*/ + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='<div class="divsearchfield">'; + $moreforfilter.=$langs->trans('ProjectCategories'). ': '; + $moreforfilter.=$formother->select_categories('project', $search_categ, 'search_categ', 1, 1, 'maxwidth300'); + $moreforfilter.='</div>'; + }*/ // If the user can view user other than himself $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierarchyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= img_picto($langs->trans('User'), 'user').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200'); +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', $user->rights->user->user->lire ? 0 : 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200'); $moreforfilter .= '</div>'; -if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) -{ +if (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('Project'), 'project').'<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('Project'), 'project', 'class="paddingright"').'<input type="text" name="search_project_ref" class="maxwidth100" value="'.dol_escape_htmltag($search_project_ref).'">'; $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="inline-block"></div>'; - $moreforfilter .= img_picto($langs->trans('ThirdParty'), 'company').'<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('ThirdParty'), 'company', 'class="paddingright"').'<input type="text" name="search_thirdparty" class="maxwidth100" value="'.dol_escape_htmltag($search_thirdparty).'">'; $moreforfilter .= '</div>'; } -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -592,37 +587,45 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi // This must be after the $selectedfields $addcolspan = 0; -if (!empty($arrayfields['t.planned_workload']['checked'])) $addcolspan++; -if (!empty($arrayfields['t.progress']['checked'])) $addcolspan++; -foreach ($arrayfields as $key => $val) -{ - if ($val['checked'] && substr($key, 0, 5) == 'efpt.') $addcolspan++; +if (!empty($arrayfields['t.planned_workload']['checked'])) { + $addcolspan++; +} +if (!empty($arrayfields['t.progress']['checked'])) { + $addcolspan++; +} +foreach ($arrayfields as $key => $val) { + if ($val['checked'] && substr($key, 0, 5) == 'efpt.') { + $addcolspan++; + } } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n"; print '<tr class="liste_titre_filter">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>'; +} print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>'; // TASK fields $search_options_pattern = 'search_task_options_'; $extrafieldsobjectkey = 'projet_task'; $extrafieldsobjectprefix = 'efpt.'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; -print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.planned_workload']['checked'])) -{ - print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>'; -} -if (!empty($arrayfields['t.progress']['checked'])) -{ +if (!empty($arrayfields['t.planned_workload']['checked'])) { print '<td class="liste_titre"></td>'; } -print '<td class="liste_titre"></td>'; -for ($idw = 0; $idw < 7; $idw++) -{ +if (!empty($arrayfields['t.progress']['checked'])) { + print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>'; +} +if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; +} +for ($idw = 0; $idw < 7; $idw++) { print '<td class="liste_titre"></td>'; } // Action column @@ -633,44 +636,51 @@ print '</td>'; print "</tr>\n"; print '<tr class="liste_titre">'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<th>'.$langs->trans("Project").'</th>'; -if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) print '<th>'.$langs->trans("ThirdParty").'</th>'; +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<th>'.$langs->trans("Project").'</th>'; +} +if (!empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT)) { + print '<th>'.$langs->trans("ThirdParty").'</th>'; +} print '<th>'.$langs->trans("Task").'</th>'; // TASK fields $extrafieldsobjectkey = 'projet_task'; $extrafieldsobjectprefix = 'efpt.'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; -if (!empty($arrayfields['t.planned_workload']['checked'])) -{ - print '<th class="leftborder plannedworkload maxwidth75 right">'.$langs->trans("PlannedWorkload").'</th>'; +if (!empty($arrayfields['t.planned_workload']['checked'])) { + print '<th class="right leftborder plannedworkload maxwidth75 right">'.$langs->trans("PlannedWorkload").'</th>'; } -if (!empty($arrayfields['t.progress']['checked'])) -{ +if (!empty($arrayfields['t.progress']['checked'])) { print '<th class="maxwidth75 right">'.$langs->trans("ProgressDeclared").'</th>'; } -/*print '<td class="maxwidth75 right">'.$langs->trans("TimeSpent").'</td>'; - if ($usertoprocess->id == $user->id) print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByYou").'</td>'; - else print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByUser").'</td>';*/ -print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").'<br><span class="opacitymedium">'.$langs->trans("Everybody").'</span></th>'; -print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br><span class="opacitymedium">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>'; - -for ($idw = 0; $idw < 7; $idw++) -{ +if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>'; + print '<span class="nowraponall">'; + print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>'; + print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>'; + print '</span>'; + print '</th>'; + print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>'; +} +for ($idw = 0; $idw < 7; $idw++) { $dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0 $dayinloop = dol_time_plus_duree($startday, $idw, 'd'); $cssweekend = ''; - if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $cssonholiday = ''; - if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$tmpday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$tmpday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } print '<th width="6%" align="center" class="bold hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'">'.dol_print_date($dayinloopfromfirstdaytoshow, '%a').'<br>'.dol_print_date($dayinloopfromfirstdaytoshow, 'dayreduceformat').'</th>'; } @@ -680,30 +690,34 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $ print "</tr>\n"; -$colspan = 3 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2); +$colspan = 1 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2); -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print '<tr class="liste_total">'; print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">'; print $langs->trans("Total"); print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>'; print '</td>'; - - for ($idw = 0; $idw < 7; $idw++) - { + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } + for ($idw = 0; $idw < 7; $idw++) { $cssweekend = ''; - if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $cssonholiday = ''; - if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$tmpday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$tmpday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } print '<td class="liste_total hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'" align="center"><div class="totalDay'.$idw.'">&nbsp;</div></td>'; } print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td>'; @@ -714,8 +728,7 @@ if ($conf->use_javascript_ajax) // By default, we can edit only tasks we are assigned to $restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)) ? 2 : $conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED); -if (count($tasksarray) > 0) -{ +if (count($tasksarray) > 0) { //var_dump($tasksarray); // contains only selected tasks //var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter) //var_dump($tasksrole); @@ -729,21 +742,17 @@ if (count($tasksarray) > 0) // Calculate total for all tasks $listofdistinctprojectid = array(); // List of all distinct projects - if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) - { - foreach ($tasksarraywithoutfilter as $tmptask) - { + if (is_array($tasksarraywithoutfilter) && count($tasksarraywithoutfilter)) { + foreach ($tasksarraywithoutfilter as $tmptask) { $listofdistinctprojectid[$tmptask->fk_project] = $tmptask->fk_project; } } //var_dump($listofdistinctprojectid); $totalforeachday = array(); - foreach ($listofdistinctprojectid as $tmpprojectid) - { + foreach ($listofdistinctprojectid as $tmpprojectid) { $projectstatic->id = $tmpprojectid; $projectstatic->loadTimeSpent($firstdaytoshow, 0, $usertoprocess->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - for ($idw = 0; $idw < 7; $idw++) - { + for ($idw = 0; $idw < 7; $idw++) { $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $totalforeachday[$tmpday] += $projectstatic->weekWorkLoad[$tmpday]; } @@ -754,14 +763,11 @@ if (count($tasksarray) > 0) // Is there a diff between selected/filtered tasks and all tasks ? $isdiff = 0; - if (count($totalforeachday)) - { - for ($idw = 0; $idw < 7; $idw++) - { + if (count($totalforeachday)) { + for ($idw = 0; $idw < 7; $idw++) { $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $timeonothertasks = ($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]); - if ($timeonothertasks) - { + if ($timeonothertasks) { $isdiff = 1; break; } @@ -769,25 +775,25 @@ if (count($tasksarray) > 0) } // There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user - if ($isdiff) - { + if ($isdiff) { print '<tr class="oddeven othertaskwithtime">'; print '<td colspan="'.($colspan + $addcolspan).'" class="opacitymedium">'; print $langs->trans("OtherFilteredTasks"); print '</td>'; - for ($idw = 0; $idw < 7; $idw++) - { + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } + for ($idw = 0; $idw < 7; $idw++) { $cssweekend = ''; - if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } print '<td class="center hide'.$idw.' '.($cssweekend ? ' '.$cssweekend : '').'">'; $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $timeonothertasks = ($totalforeachday[$tmpday] - $totalforvisibletasks[$tmpday]); - if ($timeonothertasks) - { + if ($timeonothertasks) { print '<span class="timesheetalreadyrecorded" title="texttoreplace"><input type="text" class="center smallpadd" size="2" disabled="" id="timespent[-1]['.$idw.']" name="task[-1]['.$idw.']" value="'; print convertSecondToTime($timeonothertasks, 'allhourmin'); print '"></span>'; @@ -798,32 +804,38 @@ if (count($tasksarray) > 0) print '</tr>'; } - if ($conf->use_javascript_ajax) - { - print '<tr class="liste_total"> - <td class="liste_total" colspan="'.($colspan + $addcolspan).'">'; - print $langs->trans("Total"); - print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>'; - print '</td>'; + if ($conf->use_javascript_ajax) { + print '<tr class="liste_total">'; + print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">'; + print $langs->trans("Total"); + print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>'; + print '</td>'; + if (!empty($arrayfields['timeconsumed']['checked'])) { + print '<td class="liste_total"></td>'; + print '<td class="liste_total"></td>'; + } for ($idw = 0; $idw < 7; $idw++) { $cssweekend = ''; - if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) // This is a day is not inside the setup of working days, so we use a week-end css. - { + if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css. $cssweekend = 'weekend'; } $tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $cssonholiday = ''; - if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayallday '; - elseif (!$isavailable[$tmpday]['morning']) $cssonholiday .= 'onholidaymorning '; - elseif (!$isavailable[$tmpday]['afternoon']) $cssonholiday .= 'onholidayafternoon '; + if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayallday '; + } elseif (!$isavailable[$tmpday]['morning']) { + $cssonholiday .= 'onholidaymorning '; + } elseif (!$isavailable[$tmpday]['afternoon']) { + $cssonholiday .= 'onholidayafternoon '; + } print '<td class="liste_total hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'" align="center"><div class="totalDay'.$idw.'">&nbsp;</div></td>'; } - print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td> - </tr>'; + print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td>'; + print '</tr>'; } } else { print '<tr><td colspan="15"><span class="opacitymedium">'.$langs->trans("NoAssignedTasks").'</span></td></tr>'; @@ -841,8 +853,7 @@ print '</form>'."\n\n"; $modeinput = 'hours'; -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { print "\n<!-- JS CODE TO ENABLE Tooltips on all object with class classfortooltip -->\n"; print '<script type="text/javascript">'."\n"; print "jQuery(document).ready(function () {\n"; @@ -856,8 +867,7 @@ if ($conf->use_javascript_ajax) });'."\n"; $idw = 0; - while ($idw < 7) - { + while ($idw < 7) { print ' updateTotal('.$idw.',\''.$modeinput.'\');'; $idw++; } diff --git a/htdocs/projet/admin/index.html b/htdocs/projet/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index f36aae34c4f..288e2282a40 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -36,7 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'other', 'projects')); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $value = GETPOST('value', 'alpha'); $action = GETPOST('action', 'aZ09'); @@ -51,40 +53,43 @@ $type = 'project'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstproject = GETPOST('maskconstproject', 'alpha'); $maskproject = GETPOST('maskproject', 'alpha'); - if ($maskconstproject) $res = dolibarr_set_const($db, $maskconstproject, $maskproject, 'chaine', 0, '', $conf->entity); + if ($maskconstproject) { + $res = dolibarr_set_const($db, $maskconstproject, $maskproject, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } -if ($action == 'updateMaskTask') -{ +if ($action == 'updateMaskTask') { $maskconstmasktask = GETPOST('maskconsttask', 'alpha'); $masktaskt = GETPOST('masktask', 'alpha'); - if ($maskconstmasktask) $res = dolibarr_set_const($db, $maskconstmasktask, $masktaskt, 'chaine', 0, '', $conf->entity); + if ($maskconstmasktask) { + $res = dolibarr_set_const($db, $maskconstmasktask, $masktaskt, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $project = new Project($db); @@ -93,25 +98,21 @@ if ($action == 'updateMaskTask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/project/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($project, $langs) > 0) - { + if ($module->write_file($project, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=project&file=SPECIMEN.pdf"); return; } else { @@ -122,8 +123,7 @@ if ($action == 'updateMaskTask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} elseif ($action == 'specimentask') -{ +} elseif ($action == 'specimentask') { $modele = GETPOST('module', 'alpha'); $project = new Project($db); @@ -132,25 +132,21 @@ if ($action == 'updateMaskTask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/project/task/doc/pdf_".$modele.".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($project, $langs) > 0) - { + if ($module->write_file($project, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=project_task&file=SPECIMEN.pdf"); return; } else { @@ -161,49 +157,37 @@ if ($action == 'updateMaskTask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'set') -{ +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); -} -// Activate a model for task -elseif ($action == 'settask') -{ +} elseif ($action == 'settask') { + // Activate a model for task $ret = addDocumentModel($value, 'project_task', $label, $scandir); -} elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - if ($conf->global->PROJECT_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROJECT_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->PROJECT_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'PROJECT_ADDON_PDF', $conf->entity); + } } -} -if ($action == 'deltask') -{ +} elseif ($action == 'deltask') { $ret = delDocumentModel($value, 'project_task'); - if ($ret > 0) - { - if ($conf->global->PROJECT_TASK_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROJECT_TASK_ADDON_PDF', $conf->entity); + if ($ret > 0) { + if ($conf->global->PROJECT_TASK_ADDON_PDF == "$value") { + dolibarr_del_const($db, 'PROJECT_TASK_ADDON_PDF', $conf->entity); + } } -} - -// Set default model -elseif ($action == 'setdoc') -{ +} elseif ($action == 'setdoc') { + // Set default model dolibarr_set_const($db, "PROJECT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity); // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } -} elseif ($action == 'setdoctask') -{ - if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoctask') { + if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { // La constante qui a ete lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage coherent $conf->global->PROJECT_TASK_ADDON_PDF = $value; @@ -211,40 +195,37 @@ elseif ($action == 'setdoc') // On active le modele $ret = delDocumentModel($value, 'project_task'); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, 'project_task', $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, "PROJECT_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'setmodtask') -{ +} elseif ($action == 'setmodtask') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated dolibarr_set_const($db, "PROJECT_TASK_ADDON", $value, 'chaine', 0, '', $conf->entity); -} elseif ($action == 'updateoptions') -{ - if (GETPOST('PROJECT_USE_SEARCH_TO_SELECT')) - { +} elseif ($action == 'updateoptions') { + if (GETPOST('PROJECT_USE_SEARCH_TO_SELECT')) { $companysearch = GETPOST('activate_PROJECT_USE_SEARCH_TO_SELECT', 'alpha'); - if (dolibarr_set_const($db, "PROJECT_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity)) - { + if (dolibarr_set_const($db, "PROJECT_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity)) { $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch; } } - if (GETPOST('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) - { + if (GETPOST('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) { $projectToSelect = GETPOST('projectToSelect', 'alpha'); dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value } +} elseif (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) { + // Set boolean (on/off) constants + if (!dolibarr_set_const($db, $reg[2], ($reg[1] === 'set' ? '1' : '0'), 'chaine', 0, '', $conf->entity) > 0) { + dol_print_error($db); + } } - /* * View */ @@ -317,19 +298,14 @@ print "</tr>\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/project/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { $file = $reg[1]; $classname = substr($file, 4); @@ -338,11 +314,14 @@ foreach ($dirmodels as $reldir) $module = new $file; // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; print $module->info(); print '</td>'; @@ -353,13 +332,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td class="center">'; - if ($conf->global->PROJECT_ADDON == 'mod_'.$classname) - { + if ($conf->global->PROJECT_ADDON == 'mod_'.$classname) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;token='.newToken().'&amp;value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; @@ -373,11 +354,9 @@ foreach ($dirmodels as $reldir) $htmltooltip = ''; $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>'; $nextval = $module->getNextValue($mysoc, $project); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) - { + if ($nextval) { $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; @@ -400,8 +379,7 @@ foreach ($dirmodels as $reldir) print '</table><br>'; -if (empty($conf->global->PROJECT_HIDE_TASKS)) -{ +if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Task numbering module print load_fiche_titre($langs->trans("TasksNumberingModules"), '', ''); @@ -416,19 +394,14 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) clearstatcache(); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/project/task/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { $file = $reg[1]; $classname = substr($file, 4); @@ -437,11 +410,14 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) $module = new $file; // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; print $module->info(); print '</td>'; @@ -452,13 +428,15 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td class="center">'; - if ($conf->global->PROJECT_TASK_ADDON == 'mod_'.$classname) - { + if ($conf->global->PROJECT_TASK_ADDON == 'mod_'.$classname) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodtask&amp;token='.newToken().'&amp;value=mod_'.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; @@ -472,11 +450,9 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) $htmltooltip = ''; $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>'; $nextval = $module->getNextValue($mysoc, $project); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) - { + if ($nextval) { $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; @@ -516,12 +492,10 @@ $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -542,30 +516,22 @@ print "</tr>\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ - foreach (array('', '/doc') as $valdir) - { +foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/project/".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -573,21 +539,26 @@ foreach ($dirmodels as $reldir) $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print "</td>\n"; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print "<td class=\"center\">\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -601,8 +572,7 @@ foreach ($dirmodels as $reldir) // Default print "<td class=\"center\">"; - if ($conf->global->PROJECT_ADDON_PDF == "$name") - { + if ($conf->global->PROJECT_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; @@ -612,8 +582,7 @@ foreach ($dirmodels as $reldir) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; @@ -625,8 +594,7 @@ foreach ($dirmodels as $reldir) // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -643,12 +611,11 @@ foreach ($dirmodels as $reldir) } } -print '</table><br/>'; +print '</table><br>'; -if (empty($conf->global->PROJECT_HIDE_TASKS)) -{ +if (empty($conf->global->PROJECT_HIDE_TASKS)) { /* * Modeles documents for Task */ @@ -665,12 +632,10 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -691,30 +656,22 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) clearstatcache(); - foreach ($dirmodels as $reldir) - { - foreach (array('', '/doc') as $valdir) - { + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $dir = dol_buildpath($reldir."core/modules/project/task/".$valdir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -722,21 +679,26 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print "</td>\n"; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print "<td class=\"center\">\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=deltask&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -750,8 +712,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) // Defaut print "<td class=\"center\">"; - if ($conf->global->PROJECT_TASK_ADDON_PDF == "$name") - { + if ($conf->global->PROJECT_TASK_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; @@ -761,8 +722,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; @@ -774,8 +734,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimentask&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -791,7 +750,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) } } - print '</table><br/>'; + print '</table><br>'; } @@ -812,8 +771,7 @@ print '<td width="80">&nbsp;</td></tr>'."\n"; print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("UseSearchToSelectProject").'</td>'; -if (!$conf->use_javascript_ajax) -{ +if (!$conf->use_javascript_ajax) { print '<td class="nowrap right" colspan="2">'; print $langs->trans("NotAvailableWhenAjaxDisabled"); print "</td>"; @@ -840,6 +798,16 @@ print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany')); print '<input type="submit" class="button" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans("Modify").'">'; print '</td>'; +$key = 'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE'; +echo '<tr class="oddeven">', + '<td class="left">', + $form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key . '_help')), + '</td>', + '<td class="right" colspan="2">', + ajax_constantonoff($key), + '</td>', + '</tr>'; + print '</table>'; diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index 6c92e6d66c9..c4a4caa47fb 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -38,13 +38,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'projet'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>'; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print "<br>"; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php index 9f7efbb7096..da79010076a 100644 --- a/htdocs/projet/admin/project_task_extrafields.php +++ b/htdocs/projet/admin/project_task_extrafields.php @@ -39,13 +39,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'projet_task'; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>'; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print "<br>"; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/projet/admin/website.php b/htdocs/projet/admin/website.php new file mode 100644 index 00000000000..04acbaa44aa --- /dev/null +++ b/htdocs/projet/admin/website.php @@ -0,0 +1,167 @@ +<?php +/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2006-2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> + * + * 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/>. + */ + +/** + * \file htdocs/projet/admin/website.php + * \ingroup member + * \brief File of main public page for project module to catch lead + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("admin", "members")); + +$action = GETPOST('action', 'aZ09'); + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +if ($action == 'setPROJECT_ENABLE_PUBLIC') { + if (GETPOST('value')) { + dolibarr_set_const($db, 'PROJECT_ENABLE_PUBLIC', 1, 'chaine', 0, '', $conf->entity); + } else { + dolibarr_set_const($db, 'PROJECT_ENABLE_PUBLIC', 0, 'chaine', 0, '', $conf->entity); + } +} + +if ($action == 'update') { + $public = GETPOST('PROJECT_ENABLE_PUBLIC'); + + $res = dolibarr_set_const($db, "PROJECT_ENABLE_PUBLIC", $public, 'chaine', 0, '', $conf->entity); + + if (!($res > 0)) { + $error++; + } + + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +/* + * View + */ + +$form = new Form($db); + +$help_url = ''; +llxHeader('', $langs->trans("ProjectsSetup"), $help_url); + + +$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; +print load_fiche_titre($langs->trans("ProjectsSetup"), $linkback, 'title_setup'); + +$head = project_admin_prepare_head(); + +$param = ''; + +print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; +print '<input type="hidden" name="action" value="update">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; + +print dol_get_fiche_head($head, 'website', $langs->trans("Projects"), -1, 'user'); + + +print '<span class="opacitymedium">'.$langs->trans("LeadPublicFormDesc").'</span><br><br>'; + + +$enabledisablehtml = $langs->trans("EnablePublicLeadForm").' '; +if (empty($conf->global->PROJECT_ENABLE_PUBLIC)) { + // Button off, click to enable + $enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setPROJECT_ENABLE_PUBLIC&token='.newToken().'&value=1'.$param.'">'; + $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); + $enabledisablehtml .= '</a>'; +} else { + // Button on, click to disable + $enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setPROJECT_ENABLE_PUBLIC&token='.newToken().'&value=0'.$param.'">'; + $enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on'); + $enabledisablehtml .= '</a>'; +} +print $enabledisablehtml; +print '<input type="hidden" id="PROJECT_ENABLE_PUBLIC" name="PROJECT_ENABLE_PUBLIC" value="'.(empty($conf->global->PROJECT_ENABLE_PUBLIC) ? 0 : 1).'">'; + +/* +print '<br>'; + +if (!empty($conf->global->PROJECT_ENABLE_PUBLIC)) { + print '<br>'; + + print '<table class="noborder centpercent">'; + + print '<tr class="liste_titre">'; + print '<td>'.$langs->trans("Parameter").'</td>'; + print '<td class="right">'.$langs->trans("Value").'</td>'; + print "</tr>\n"; + + // param + print '<tr class="oddeven" id="tredit"><td>'; + print $langs->trans("CanEditAmount"); + print '</td><td class="right">'; + print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1); + print "</td></tr>\n"; + + print '</table>'; + + print '<div class="center">'; + print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; + print '</div>'; +} +*/ + +print dol_get_fiche_end(); + +print '</form>'; + + +if (!empty($conf->global->PROJECT_ENABLE_PUBLIC)) { + print '<br>'; + //print $langs->trans('FollowingLinksArePublic').'<br>'; + print img_picto('', 'globe').' '.$langs->trans('BlankSubscriptionForm').':<br>'; + if ($conf->multicompany->enabled) { + $entity_qr = '?entity='.$conf->entity; + } else { + $entity_qr = ''; + } + + // 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 + + print '<a target="_blank" href="'.$urlwithroot.'/public/project/new.php'.$entity_qr.'">'.$urlwithroot.'/public/project/new.php'.$entity_qr.'</a>'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/projet/ajax/projects.php b/htdocs/projet/ajax/projects.php index 0036ae64353..5264fa02596 100644 --- a/htdocs/projet/ajax/projects.php +++ b/htdocs/projet/ajax/projects.php @@ -23,36 +23,55 @@ * \brief File to return Ajax response on product list request */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (empty($_GET['keysearch']) && !defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} require '../../main.inc.php'; $htmlname = GETPOST('htmlname', 'aZ09'); $socid = GETPOST('socid', 'int'); +$mode = GETPOST('mode', 'aZ09'); $discard_closed = GETPOST('discardclosed', 'int'); +// Security check +restrictedArea($user, 'projet', 0, 'projet&project'); + /* * View */ dol_syslog("Call ajax projet/ajax/projects.php"); -//dol_syslog(join(',', $_GET)); require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; top_httphead(); -if (empty($htmlname) && !GETPOST('mode', 'aZ09')) return; +if (empty($htmlname) && !GETPOST('mode', 'aZ09')) { + return; +} // Mode to get list of projects -if (!GETPOST('mode', 'aZ09') || GETPOST('mode', 'aZ09') != 'gettasks') { +if (empty($mode) || $mode != 'gettasks') { // When used from jQuery, the search term is added as GET param "term". $searchkey = (GETPOSTISSET($htmlname) ? GETPOST($htmlname, 'aZ09') : ''); @@ -61,7 +80,7 @@ if (!GETPOST('mode', 'aZ09') || GETPOST('mode', 'aZ09') != 'gettasks') { } // Mode to get list of tasks -if (GETPOST('mode', 'aZ09') == 'gettasks') { +if ($mode == 'gettasks') { $formproject = new FormProjets($db); $formproject->selectTasks((!empty($$socid) ? $socid : -1), 0, 'taskid', 24, 1, '1', 1, 0, 0, 'maxwidth500', GETPOST('projectid', 'int'), ''); return; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index df63c805948..3c2d5b02829 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -35,7 +35,12 @@ 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('projects', 'companies')); +$langsLoad=array('projects', 'companies'); +if (!empty($conf->eventorganization->enabled)) { + $langsLoad[]='eventorganization'; +} + +$langs->loadLangs($langsLoad); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -47,7 +52,9 @@ $status = GETPOST('status', 'int'); $opp_status = GETPOST('opp_status', 'int'); $opp_percent = price2num(GETPOST('opp_percent', 'alpha')); -if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !$_POST["cancel"])) accessforbidden(); +if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !GETPOST("cancel"))) { + accessforbidden(); +} $mine = GETPOST('mode') == 'mine' ? 1 : 0; //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects @@ -60,27 +67,28 @@ $extrafields = new ExtraFields($db); // Load object //include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Can't use generic include because when creating a project, ref is defined and we dont want error if fetch fails from ref. -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); // If we create project, ref may be defined into POST but record does not yet exists into database if ($ret > 0) { $object->fetch_thirdparty(); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $id = $object->id; } } -// Security check -$socid = GETPOST('socid', 'int'); -//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -$result = restrictedArea($user, 'projet', $object->id, 'projet&project'); - // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $date_start = dol_mktime(0, 0, 0, GETPOST('projectstartmonth', 'int'), GETPOST('projectstartday', 'int'), GETPOST('projectstartyear', 'int')); $date_end = dol_mktime(0, 0, 0, GETPOST('projectendmonth', 'int'), GETPOST('projectendday', 'int'), GETPOST('projectendyear', 'int')); +// Security check +$socid = GETPOST('socid', 'int'); +//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. +restrictedArea($user, 'projet', $object->id, 'projet&project'); + /* * Actions @@ -88,18 +96,16 @@ $date_end = dol_mktime(0, 0, 0, GETPOST('projectendmonth', 'int'), GETPOST('proj $parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if ($cancel) - { - if (GETPOST("comefromclone") == 1) - { + if ($cancel) { + if (GETPOST("comefromclone") == 1) { $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header("Location: index.php"); exit; } else { @@ -107,8 +113,7 @@ if (empty($reshook)) setEventMessages($langs->trans("CantRemoveProject", $langs->transnoentitiesnoconv("ProjectOverview")), null, 'errors'); } } - if ($backtopage) - { + if ($backtopage) { header("Location: ".$backtopage); exit; } @@ -116,34 +121,28 @@ if (empty($reshook)) $action = ''; } - if ($action == 'add' && $user->rights->projet->creer) - { + if ($action == 'add' && $user->rights->projet->creer) { $error = 0; - if (!GETPOST('ref')) - { + if (!GETPOST('ref')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $error++; } - if (!GETPOST('title')) - { + if (!GETPOST('title')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ProjectLabel")), null, 'errors'); $error++; } - if (GETPOST('opp_amount') != '' && !(GETPOST('opp_status') > 0)) - { + if (GETPOST('opp_amount') != '' && !(GETPOST('opp_status') > 0)) { $error++; setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors'); } // Create with status validated immediatly - if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT)) - { + if (!empty($conf->global->PROJECT_CREATE_NO_DRAFT)) { $status = Project::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $error = 0; $db->begin(); @@ -168,16 +167,16 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } $result = $object->create($user); - if (!$error && $result > 0) - { + if (!$error && $result > 0) { // Add myself as project leader $typeofcontact = 'PROJECTLEADER'; // TODO If use rename this code in dictionary, the add_contact will generate an error. $result = $object->add_contact($user->id, $typeofcontact, 'internal'); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -187,8 +186,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - if (!$error && !empty($object->id) > 0) - { + if (!$error && !empty($object->id) > 0) { // Category association $categories = GETPOST('categories', 'array'); $result = $object->setCategories($categories); @@ -199,12 +197,10 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); - if (!empty($backtopage)) - { + if (!empty($backtopage)) { $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation $backtopage = $backtopage.'&projectid='.$object->id; // Old method header("Location: ".$backtopage); @@ -223,27 +219,21 @@ if (empty($reshook)) } } - if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer) - { + if ($action == 'update' && empty(GETPOST('cancel')) && $user->rights->projet->creer) { $error = 0; - if (empty($ref)) - { + if (empty($ref)) { $error++; - //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); } - if (empty($_POST["title"])) - { + if (!GETPOST("title")) { $error++; - //$_GET["id"]=$_POST["id"]; // We return on the project card setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ProjectLabel")), null, 'errors'); } $db->begin(); - if (!$error) - { + if (!$error) { $object->oldcopy = clone $object; $old_start_date = $object->date_start; @@ -256,10 +246,18 @@ if (empty($reshook)) $object->public = GETPOST('public', 'alpha'); $object->date_start = (!GETPOST('projectstart')) ? '' : $date_start; $object->date_end = (!GETPOST('projectend')) ? '' : $date_end; - if (GETPOSTISSET('opp_amount')) $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); - if (GETPOSTISSET('budget_amount')) $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); - if (GETPOSTISSET('opp_status')) $object->opp_status = $opp_status; - if (GETPOSTISSET('opp_percent')) $object->opp_percent = $opp_percent; + if (GETPOSTISSET('opp_amount')) { + $object->opp_amount = price2num(GETPOST('opp_amount', 'alpha')); + } + if (GETPOSTISSET('budget_amount')) { + $object->budget_amount = price2num(GETPOST('budget_amount', 'alpha')); + } + if (GETPOSTISSET('opp_status')) { + $object->opp_status = $opp_status; + } + if (GETPOSTISSET('opp_percent')) { + $object->opp_percent = $opp_percent; + } $object->usage_opportunity = (GETPOST('usage_opportunity', 'alpha') == 'on' ? 1 : 0); $object->usage_task = (GETPOST('usage_task', 'alpha') == 'on' ? 1 : 0); $object->usage_bill_time = (GETPOST('usage_bill_time', 'alpha') == 'on' ? 1 : 0); @@ -267,42 +265,40 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } - if ($object->opp_amount && ($object->opp_status <= 0)) - { - $error++; + if ($object->opp_amount && ($object->opp_status <= 0)) { + $error++; setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors'); } - if (!$error) - { + if (!$error) { $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { $error++; - if ($result == -4) setEventMessages($langs->trans("ErrorRefAlreadyExists"), null, 'errors'); - else setEventMessages($object->error, $object->errors, 'errors'); + if ($result == -4) { + setEventMessages($langs->trans("ErrorRefAlreadyExists"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } } else { // Category association $categories = GETPOST('categories', 'array'); $result = $object->setCategories($categories); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - if (!$error) - { - if (GETPOST("reportdate") && ($object->date_start != $old_start_date)) - { + if (!$error) { + if (GETPOST("reportdate") && ($object->date_start != $old_start_date)) { $result = $object->shiftTaskDate($old_start_date); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($langs->trans("ErrorShiftTaskDate").':'.$object->error, $object->errors, 'errors'); } @@ -310,101 +306,92 @@ if (empty($reshook)) } // Check if we must change status - if (GETPOST('closeproject')) - { + if (GETPOST('closeproject')) { $resclose = $object->setClose($user); - if ($resclose < 0) - { + if ($resclose < 0) { $error++; setEventMessages($langs->trans("FailedToCloseProject").':'.$object->error, $object->errors, 'errors'); } } - if ($error) - { + if ($error) { $db->rollback(); $action = 'edit'; } else { $db->commit(); - if (GETPOST('socid', 'int') > 0) $object->fetch_thirdparty(GETPOST('socid', 'int')); - else unset($object->thirdparty); + if (GETPOST('socid', 'int') > 0) { + $object->fetch_thirdparty(GETPOST('socid', 'int')); + } else { + unset($object->thirdparty); + } } } // Build doc - if ($action == 'builddoc' && $user->rights->projet->creer) - { + if ($action == 'builddoc' && $user->rights->projet->creer) { // Save last template used to generate document - if (GETPOST('model')) $object->setDocModel($user, GETPOST('model', 'alpha')); + if (GETPOST('model')) { + $object->setDocModel($user, GETPOST('model', 'alpha')); + } $outputlangs = $langs; - if (GETPOST('lang_id', 'aZ09')) - { + if (GETPOST('lang_id', 'aZ09')) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang(GETPOST('lang_id', 'aZ09')); } $result = $object->generateDocument($object->model_pdf, $outputlangs); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } // Delete file in doc form - if ($action == 'remove_file' && $user->rights->projet->creer) - { - if ($object->id > 0) - { + if ($action == 'remove_file' && $user->rights->projet->creer) { + if ($object->id > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->load("other"); $upload_dir = $conf->projet->dir_output; $file = $upload_dir.'/'.GETPOST('file'); $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) + if ($ret) { setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + } $action = ''; } } - if ($action == 'confirm_validate' && $confirm == 'yes') - { + if ($action == 'confirm_validate' && $confirm == 'yes') { $result = $object->setValid($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'confirm_close' && $confirm == 'yes') - { + if ($action == 'confirm_close' && $confirm == 'yes') { $result = $object->setClose($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'confirm_reopen' && $confirm == 'yes') - { + if ($action == 'confirm_reopen' && $confirm == 'yes') { $result = $object->setValid($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights->projet->supprimer) - { + if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights->projet->supprimer) { $object->fetch($id); $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); header("Location: list.php?restore_lastsearch_values=1"); exit; @@ -414,8 +401,7 @@ if (empty($reshook)) } } - if ($action == 'confirm_clone' && $user->rights->projet->creer && $confirm == 'yes') - { + if ($action == 'confirm_clone' && $user->rights->projet->creer && $confirm == 'yes') { $clone_contacts = GETPOST('clone_contacts') ? 1 : 0; $clone_tasks = GETPOST('clone_tasks') ? 1 : 0; $clone_project_files = GETPOST('clone_project_files') ? 1 : 0; @@ -425,8 +411,7 @@ if (empty($reshook)) $clone_thirdparty = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : 0; $result = $object->createFromClone($user, $object->id, $clone_contacts, $clone_tasks, $clone_project_files, $clone_task_files, $clone_notes, $move_date, 0, $clone_thirdparty); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { // Load new object @@ -459,8 +444,10 @@ $formproject = new FormProjets($db); $userstatic = new User($db); $title = $langs->trans("Project").' - '.$object->ref.($object->thirdparty->name ? ' - '.$object->thirdparty->name : '').($object->title ? ' - '.$object->title : ''); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE)) $title = $object->ref.($object->thirdparty->name ? ' - '.$object->thirdparty->name : '').($object->title ? ' - '.$object->title : ''); -$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE)) { + $title = $object->ref.($object->thirdparty->name ? ' - '.$object->thirdparty->name : '').($object->title ? ' - '.$object->title : ''); +} +$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte"; llxHeader("", $title, $help_url); @@ -475,14 +462,15 @@ if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only $titlenew = $langs->trans("NewLead"); } -if ($action == 'create' && $user->rights->projet->creer) -{ +if ($action == 'create' && $user->rights->projet->creer) { /* - * Create - */ + * Create + */ $thirdparty = new Societe($db); - if ($socid > 0) $thirdparty->fetch($socid); + if ($socid > 0) { + $thirdparty->fetch($socid); + } print load_fiche_titre($titlenew, '', 'project'); @@ -501,29 +489,28 @@ if ($action == 'create' && $user->rights->projet->creer) // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/project/".$modele.'.php', 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = $modele; break; } } - if ($filefound) - { + if ($filefound) { $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); $modProject = new $classname; $defaultref = $modProject->getNextValue($thirdparty, $object); } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = ''; + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } // Ref - $suggestedref = ($_POST["ref"] ? $_POST["ref"] : $defaultref); + $suggestedref = (GETPOST("ref") ? GETPOST("ref") : $defaultref); print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Ref").'</span></td><td><input size="12" type="text" name="ref" value="'.dol_escape_htmltag($suggestedref).'">'; print ' '.$form->textwithpicto('', $langs->trans("YouCanCompleteRef", $suggestedref)); print '</td></tr>'; @@ -532,7 +519,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '<tr><td><span class="fieldrequired">'.$langs->trans("ProjectLabel").'</span></td><td><input class="minwidth500" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'" autofocus></td></tr>'; // Usage (opp, task, bill time, ...) - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; @@ -556,51 +543,53 @@ if ($action == 'create' && $user->rights->projet->creer) print '</script>'; print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print '<label for="usage_task">'.$form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext).'</label>'; print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print '<label for="usage_bill_time">'.$form->textwithpicto($langs->trans("BillTime"), $htmltext).'</label>'; print '<br>'; } - /* - print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> '; - $htmltext = $langs->trans("OrganizeEvent"); - print $form->textwithpicto($langs->trans("OrganizeEvent"), $htmltext);*/ + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" name="usage_organize_event"'.(GETPOST('usage_organize_event', 'alpha')!=''?' checked="checked"':'').'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td>'; print '</tr>'; } // Thirdparty - if ($conf->societe->enabled) - { + if ($conf->societe->enabled) { print '<tr><td>'; print (empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) ? '' : '<span class="fieldrequired">'); print $langs->trans("ThirdParty"); print (empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) ? '' : '</span>'); print '</td><td class="maxwidthonsmartphone">'; $filteronlist = ''; - if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; - $text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx'); - if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) - { + if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) { + $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; + } + $text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusxx'); + if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) { $texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty"); print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1); - } else print $text; - if (!GETPOSTISSET('backtopage')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; + } else { + print $text; + } + if (!GETPOSTISSET('backtopage')) { + print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; + } print '</td></tr>'; } // Status - if ($status != '') - { + if ($status != '') { print '<tr><td>'.$langs->trans("Status").'</td><td>'; print '<input type="hidden" name="status" value="'.$status.'">'; print $object->LibStatut($status, 4); @@ -610,8 +599,12 @@ if ($action == 'create' && $user->rights->projet->creer) // Visibility print '<tr><td>'.$langs->trans("Visibility").'</td><td class="maxwidthonsmartphone">'; $array = array(); - if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject"); - if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject"); + if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) { + $array[0] = $langs->trans("PrivateProject"); + } + if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) { + $array[1] = $langs->trans("SharedProject"); + } if (count($array) > 0) { print $form->selectarray('public', $array, GETPOSTISSET('public') ? GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); @@ -636,8 +629,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->selectDate(($date_end ? $date_end : -1), 'projectend', 0, 0, 0, '', 1, 0); print '</td></tr>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityStatus").'</td>'; print '<td class="maxwidthonsmartphone">'; @@ -682,8 +674,7 @@ if ($action == 'create' && $user->rights->projet->creer) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'create'); } @@ -693,8 +684,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '<div class="center">'; print '<input type="submit" class="button" value="'.$langs->trans("CreateDraft").'">'; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print ' &nbsp; &nbsp; '; print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; } else { @@ -735,11 +725,10 @@ if ($action == 'create' && $user->rights->projet->creer) }); }); </script>'; -} elseif ($object->id > 0) -{ +} elseif ($object->id > 0) { /* - * Show or edit - */ + * Show or edit + */ $res = $object->fetch_optionals(); @@ -751,34 +740,31 @@ if ($action == 'create' && $user->rights->projet->creer) // Confirmation validation - if ($action == 'validate') - { + if ($action == 'validate') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate', '', 0, 1); } // Confirmation close - if ($action == 'close') - { + if ($action == 'close') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CloseAProject"), $langs->trans("ConfirmCloseAProject"), "confirm_close", '', '', 1); } // Confirmation reopen - if ($action == 'reopen') - { + if ($action == 'reopen') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("ReOpenAProject"), $langs->trans("ConfirmReOpenAProject"), "confirm_reopen", '', '', 1); } // Confirmation delete - if ($action == 'delete') - { + if ($action == 'delete') { $text = $langs->trans("ConfirmDeleteAProject"); $task = new Task($db); $taskarray = $task->getTasksArray(0, 0, $object->id, 0, 0); $nboftask = count($taskarray); - if ($nboftask) $text .= '<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks", $nboftask); + if ($nboftask) { + $text .= '<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks", $nboftask); + } print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("DeleteAProject"), $text, "confirm_delete", '', '', 1); } // Clone confirmation - if ($action == 'clone') - { + if ($action == 'clone') { $formquestion = array( 'text' => $langs->trans("ConfirmClone"), array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int') > 0 ?GETPOST('socid', 'int') : $object->socid, 'socid', '', "None", 0, 0, null, 0, 'minwidth200')), @@ -802,8 +788,7 @@ if ($action == 'create' && $user->rights->projet->creer) $head = project_prepare_head($object); - if ($action == 'edit' && $userWrite > 0) - { + if ($action == 'edit' && $userWrite > 0) { print dol_get_fiche_head($head, 'project', $langs->trans("Project"), 0, ($object->public ? 'projectpub' : 'project')); print '<table class="border centpercent">'; @@ -822,81 +807,88 @@ if ($action == 'create' && $user->rights->projet->creer) // Status print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td><td>'; print '<select class="flat" name="status">'; - foreach ($object->statuts_short as $key => $val) - { + foreach ($object->statuts_short as $key => $val) { print '<option value="'.$key.'"'.((GETPOSTISSET('status') ?GETPOST('status') : $object->statut) == $key ? ' selected="selected"' : '').'>'.$langs->trans($val).'</option>'; } print '</select>'; print '</td></tr>'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')) . '"> '; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<script>'; print '$( document ).ready(function() { jQuery("#usage_opportunity").change(function() { - if (jQuery("#usage_opportunity").prop("checked")) { - console.log("Show opportunities fields"); - jQuery(".classuseopportunity").show(); - } else { - console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked")); - jQuery(".classuseopportunity").hide(); - } - }); - });'; + if (jQuery("#usage_opportunity").prop("checked")) { + console.log("Show opportunities fields"); + jQuery(".classuseopportunity").show(); + } else { + console.log("Hide opportunities fields "+jQuery("#usage_opportunity").prop("checked")); + jQuery(".classuseopportunity").hide(); + } + }); + });'; print '</script>'; print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } + print '</td></tr>'; // Thirdparty - if ($conf->societe->enabled) - { + if ($conf->societe->enabled) { print '<tr><td>'; print (empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) ? '' : '<span class="fieldrequired">'); print $langs->trans("ThirdParty"); print (empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) ? '' : '</span>'); print '</td><td>'; $filteronlist = ''; - if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; + if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) { + $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; + } $text = $form->select_company($object->thirdparty->id, 'socid', $filteronlist, 'None', 1, 0, array(), 0, 'minwidth300'); - if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) - { + if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) { $texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty"); print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1, 0, '', '', 2); - } else print $text; + } else { + print $text; + } print '</td></tr>'; } // Visibility print '<tr><td>'.$langs->trans("Visibility").'</td><td>'; $array = array(); - if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) $array[0] = $langs->trans("PrivateProject"); - if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) $array[1] = $langs->trans("SharedProject"); + if (empty($conf->global->PROJECT_DISABLE_PRIVATE_PROJECT)) { + $array[0] = $langs->trans("PrivateProject"); + } + if (empty($conf->global->PROJECT_DISABLE_PUBLIC_PROJECT)) { + $array[1] = $langs->trans("SharedProject"); + } if (count($array) > 0) { print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); @@ -941,7 +933,9 @@ if ($action == 'create' && $user->rights->projet->creer) print '<tr><td>'.$langs->trans("DateStart").'</td><td>'; print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0); print ' &nbsp; &nbsp; <input type="checkbox" class="valignmiddle" name="reportdate" value="yes" '; - if ($comefromclone) {print ' checked '; } + if ($comefromclone) { + print ' checked '; + } print '/> '.$langs->trans("ProjectReportDate"); print '</td></tr>'; @@ -963,8 +957,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '</td></tr>'; // Tags-Categories - if ($conf->categorie->enabled) - { + if ($conf->categorie->enabled) { print '<tr><td>'.$langs->trans("Categories").'</td><td>'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); $c = new Categorie($db); @@ -980,8 +973,7 @@ if ($action == 'create' && $user->rights->projet->creer) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -998,17 +990,15 @@ if ($action == 'create' && $user->rights->projet->creer) $morehtmlref .= dol_escape_htmltag($object->title); // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '; - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= $object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -1020,54 +1010,61 @@ if ($action == 'create' && $user->rights->projet->creer) print '<table class="border tableforfield" width="100%">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')) . '"> '; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')) . '"> '; + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { - print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')) . '"> '; + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { + print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($object->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($object->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) { // Opportunity status print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>'; $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); + if ($code) { + print $langs->trans("OppStatus".$code); + } print '</td></tr>'; // Opportunity percent print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>'; - if (strcmp($object->opp_percent, '')) print price($object->opp_percent, 0, $langs, 1, 0).' %'; + if (strcmp($object->opp_percent, '')) { + print price($object->opp_percent, 0, $langs, 1, 0).' %'; + } print '</td></tr>'; // Opportunity Amount @@ -1076,12 +1073,16 @@ if ($action == 'create' && $user->rights->projet->creer) { print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); }*/ - if (strcmp($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + if (strcmp($object->opp_amount, '')) { + print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + } print '</td></tr>'; // Opportunity Weighted Amount print '<tr><td>'.$langs->trans('OpportunityWeightedAmount').'</td><td>'; - if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency); + if (strcmp($object->opp_amount, '') && strcmp($object->opp_percent, '')) { + print price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency); + } print '</td></tr>'; } @@ -1092,12 +1093,16 @@ if ($action == 'create' && $user->rights->projet->creer) $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($object->budget_amount, '')) print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -1136,10 +1141,9 @@ if ($action == 'create' && $user->rights->projet->creer) print dol_get_fiche_end(); - if ($action == 'edit' && $userWrite > 0) - { + if ($action == 'edit' && $userWrite > 0) { print '<div class="center">'; - print '<input name="update" class="button" type="submit" value="'.$langs->trans("Modify").'">&nbsp; &nbsp; &nbsp;'; + print '<input name="update" class="button" type="submit" value="'.$langs->trans("Save").'">&nbsp; &nbsp; &nbsp;'; print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; print '</div>'; } @@ -1147,11 +1151,12 @@ if ($action == 'create' && $user->rights->projet->creer) print '</form>'; // Change probability from status - if (!empty($conf->use_javascript_ajax) && !empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->use_javascript_ajax) && !empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Default value to close or not when we set opp to 'WON'. $defaultcheckedwhenoppclose = 1; - if (empty($conf->global->PROJECT_HIDE_TASKS)) $defaultcheckedwhenoppclose = 0; + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + $defaultcheckedwhenoppclose = 0; + } print '<!-- Javascript to manage opportunity status change -->'; print '<script type="text/javascript" language="javascript"> @@ -1210,16 +1215,14 @@ if ($action == 'create' && $user->rights->projet->creer) } /* - * Actions Buttons - */ + * Actions Buttons + */ print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($action != "edit" && $action != 'presend') - { + if (empty($reshook)) { + if ($action != "edit" && $action != 'presend') { // 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 @@ -1230,17 +1233,14 @@ if ($action == 'create' && $user->rights->projet->creer) // Send if (empty($user->socid)) { - if ($object->statut != 2) - { + if ($object->statut != Project::STATUS_CLOSED) { print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'; } } // Modify - if ($object->statut != 2 && $user->rights->projet->creer) - { - if ($userWrite > 0) - { + if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer) { + if ($userWrite > 0) { print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Modify').'</a>'; @@ -1248,10 +1248,8 @@ if ($action == 'create' && $user->rights->projet->creer) } // Validate - if ($object->statut == 0 && $user->rights->projet->creer) - { - if ($userWrite > 0) - { + if ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer) { + if ($userWrite > 0) { print '<a class="butAction" href="card.php?id='.$object->id.'&action=validate">'.$langs->trans("Validate").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Validate').'</a>'; @@ -1259,10 +1257,8 @@ if ($action == 'create' && $user->rights->projet->creer) } // Close - if ($object->statut == 1 && $user->rights->projet->creer) - { - if ($userWrite > 0) - { + if ($object->statut == Project::STATUS_VALIDATED && $user->rights->projet->creer) { + if ($userWrite > 0) { print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=close">'.$langs->trans("Close").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Close').'</a>'; @@ -1270,10 +1266,8 @@ if ($action == 'create' && $user->rights->projet->creer) } // Reopen - if ($object->statut == 2 && $user->rights->projet->creer) - { - if ($userWrite > 0) - { + if ($object->statut == Project::STATUS_CLOSED && $user->rights->projet->creer) { + if ($userWrite > 0) { print '<a class="butAction" href="card.php?id='.$object->id.'&amp;action=reopen">'.$langs->trans("ReOpen").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('ReOpen').'</a>'; @@ -1281,65 +1275,52 @@ if ($action == 'create' && $user->rights->projet->creer) } // Add button to create objects from project - if (!empty($conf->global->PROJECT_SHOW_CREATE_OBJECT_BUTTON)) - { - if (!empty($conf->propal->enabled) && $user->rights->propal->creer) - { + if (!empty($conf->global->PROJECT_SHOW_CREATE_OBJECT_BUTTON)) { + if (!empty($conf->propal->enabled) && $user->rights->propal->creer) { $langs->load("propal"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddProp").'</a>'; } - if (!empty($conf->commande->enabled) && $user->rights->commande->creer) - { + if (!empty($conf->commande->enabled) && $user->rights->commande->creer) { $langs->load("orders"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateOrder").'</a>'; } - if (!empty($conf->facture->enabled) && $user->rights->facture->creer) - { + if (!empty($conf->facture->enabled) && $user->rights->facture->creer) { $langs->load("bills"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; } - if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer) - { + if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->creer) { $langs->load("supplier_proposal"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddSupplierProposal").'</a>'; } - if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->creer) - { + if (!empty($conf->supplier_order->enabled) && ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer)) { $langs->load("suppliers"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddSupplierOrder").'</a>'; } - if (!empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->creer) - { + if (!empty($conf->supplier_invoice->enabled) && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { $langs->load("suppliers"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddSupplierInvoice").'</a>'; } - if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) - { + if (!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer) { $langs->load("interventions"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddIntervention").'</a>'; } - if (!empty($conf->contrat->enabled) && $user->rights->contrat->creer) - { + if (!empty($conf->contrat->enabled) && $user->rights->contrat->creer) { $langs->load("contracts"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddContract").'</a>'; } - if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->creer) - { + if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->creer) { $langs->load("trips"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddTrip").'</a>'; } - if (!empty($conf->don->enabled) && $user->rights->don->creer) - { + if (!empty($conf->don->enabled) && $user->rights->don->creer) { $langs->load("donations"); print '<a class="butAction" href="'.DOL_URL_ROOT.'/don/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddDonation").'</a>'; } } // Clone - if ($user->rights->projet->creer) - { - if ($userWrite > 0) - { + if ($user->rights->projet->creer) { + if ($userWrite > 0) { print '<a class="butAction" href="card.php?id='.$object->id.'&action=clone">'.$langs->trans('ToClone').'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('ToClone').'</a>'; @@ -1347,10 +1328,8 @@ if ($action == 'create' && $user->rights->projet->creer) } // Delete - if ($user->rights->projet->supprimer || ($object->statut == 0 && $user->rights->projet->creer)) - { - if ($userDelete > 0 || ($object->statut == 0 && $user->rights->projet->creer)) - { + if ($user->rights->projet->supprimer || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer)) { + if ($userDelete > 0 || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer)) { print '<a class="butActionDelete" href="card.php?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans("Delete").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('Delete').'</a>'; @@ -1365,14 +1344,13 @@ if ($action == 'create' && $user->rights->projet->creer) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre /* - * Documents generes - */ + * Generated documents + */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->projet->dir_output."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index c8ca952f9ed..c5430b655b1 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -33,7 +33,7 @@ class Projects extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'ref', 'title' ); @@ -103,6 +103,10 @@ class Projects extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->projet->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -110,34 +114,43 @@ class Projects extends DolibarrApi // 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 (!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) + 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."projet as t"; if ($category > 0) { $sql .= ", ".MAIN_DB_PREFIX."categorie_project as c"; } - 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('project').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Select projects of given category if ($category > 0) { $sql .= " AND c.fk_categorie = ".$this->db->escape($category)." AND c.fk_project = t.rowid "; } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -157,8 +170,7 @@ class Projects extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; @@ -197,12 +209,12 @@ class Projects extends DolibarrApi $this->project->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->project->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->project->lines = $lines; + }*/ if ($this->project->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating project", array_merge(array($this->project->error), $this->project->errors)); } @@ -236,14 +248,11 @@ class Projects extends DolibarrApi } $this->project->getLinesArray(DolibarrApiAccess::$user); $result = array(); - foreach ($this->project->lines as $line) // $line is a task - { - if ($includetimespent == 1) - { + foreach ($this->project->lines as $line) { // $line is a task + if ($includetimespent == 1) { $timespent = $line->getSummaryOfTimeSpent(0); } - if ($includetimespent == 1) - { + if ($includetimespent == 1) { // TODO // Add class for timespent records and loop and fill $line->lines with records of timespent } @@ -283,8 +292,7 @@ class Projects extends DolibarrApi require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $taskstatic = new Task($this->db); $userp = DolibarrApiAccess::$user; - if ($userid > 0) - { + if ($userid > 0) { $userp = new User($this->db); $userp->fetch($userid); } @@ -308,56 +316,60 @@ class Projects extends DolibarrApi * @return int */ /* - public function postLine($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->projet->creer) { - throw new RestException(401); - } + public function postLine($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->projet->creer) { + throw new RestException(401); + } - $result = $this->project->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Project not found'); - } + $result = $this->project->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Project not found'); + } - if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->project->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $this->element, - $request_data->id - ); + if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - return $updateRes; + $request_data = (object) $request_data; - } - return false; - } - */ + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + + $updateRes = $this->project->addline( + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + 'HT', + 0, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $this->element, + $request_data->id + ); + + if ($updateRes > 0) { + return $updateRes; + + } + return false; + } + */ /** * Update a task to given project @@ -371,52 +383,56 @@ class Projects extends DolibarrApi * @return object */ /* - public function putLine($id, $lineid, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->projet->creer) { - throw new RestException(401); - } + public function putLine($id, $lineid, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->projet->creer) { + throw new RestException(401); + } - $result = $this->project->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Project not found'); - } + $result = $this->project->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Project not found'); + } - if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->project->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->date_start, - $request_data->date_end, - $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->fk_unit - ); + if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + + $updateRes = $this->project->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->date_start, + $request_data->date_end, + $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->fk_unit + ); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ @@ -443,12 +459,13 @@ class Projects extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->project->$field = $value; } - if ($this->project->update(DolibarrApiAccess::$user) >= 0) - { + if ($this->project->update(DolibarrApiAccess::$user) >= 0) { return $this->get($id); } else { throw new RestException(500, $this->project->error); @@ -600,8 +617,9 @@ class Projects extends DolibarrApi { $object = array(); foreach (self::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $object[$field] = $data[$field]; } return $object; diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index e7bf2c67ce8..2c3fd107d53 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -33,7 +33,7 @@ class Tasks extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'ref', 'label', 'fk_project' @@ -80,12 +80,10 @@ class Tasks extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includetimespent == 1) - { + if ($includetimespent == 1) { $timespent = $this->task->getSummaryOfTimeSpent(0); } - if ($includetimespent == 1) - { + if ($includetimespent == 1) { // TODO // Add class for timespent records and loop and fill $line->lines with records of timespent } @@ -111,6 +109,10 @@ class Tasks extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->projet->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -118,28 +120,37 @@ class Tasks extends DolibarrApi // 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 (!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) + 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."projet_task 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('project').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -148,8 +159,7 @@ class Tasks extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -160,13 +170,11 @@ class Tasks extends DolibarrApi dol_syslog("API Rest request"); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $task_static = new Task($this->db); if ($task_static->fetch($obj->rowid)) { @@ -201,12 +209,12 @@ class Tasks extends DolibarrApi $this->task->$field = $value; } /*if (isset($request_data["lines"])) { - $lines = array(); - foreach ($request_data["lines"] as $line) { - array_push($lines, (object) $line); - } - $this->project->lines = $lines; - }*/ + $lines = array(); + foreach ($request_data["lines"] as $line) { + array_push($lines, (object) $line); + } + $this->project->lines = $lines; + }*/ if ($this->task->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating task", array_merge(array($this->task->error), $this->task->errors)); } @@ -223,38 +231,38 @@ class Tasks extends DolibarrApi // * @url GET {id}/tasks // */ /* - public function getLines($id, $includetimespent=0) - { - if(! DolibarrApiAccess::$user->rights->projet->lire) { - throw new RestException(401); - } + public function getLines($id, $includetimespent=0) + { + if(! DolibarrApiAccess::$user->rights->projet->lire) { + throw new RestException(401); + } - $result = $this->project->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Project not found'); - } + $result = $this->project->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Project not found'); + } - if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->project->getLinesArray(DolibarrApiAccess::$user); - $result = array(); - foreach ($this->project->lines as $line) // $line is a task - { - if ($includetimespent == 1) - { - $timespent = $line->getSummaryOfTimeSpent(0); - } - if ($includetimespent == 1) - { - // TODO - // Add class for timespent records and loop and fill $line->lines with records of timespent - } - array_push($result,$this->_cleanObjectDatas($line)); - } - return $result; - } - */ + if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->project->getLinesArray(DolibarrApiAccess::$user); + $result = array(); + foreach ($this->project->lines as $line) // $line is a task + { + if ($includetimespent == 1) + { + $timespent = $line->getSummaryOfTimeSpent(0); + } + if ($includetimespent == 1) + { + // TODO + // Add class for timespent records and loop and fill $line->lines with records of timespent + } + array_push($result,$this->_cleanObjectDatas($line)); + } + return $result; + } + */ /** * Get roles a user is assigned to a task with @@ -284,8 +292,7 @@ class Tasks extends DolibarrApi } $usert = DolibarrApiAccess::$user; - if ($userid > 0) - { + if ($userid > 0) { $usert = new User($this->db); $usert->fetch($userid); } @@ -309,56 +316,60 @@ class Tasks extends DolibarrApi // * @return int // */ /* - public function postLine($id, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->projet->creer) { - throw new RestException(401); - } + public function postLine($id, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->projet->creer) { + throw new RestException(401); + } - $result = $this->project->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Project not found'); - } + $result = $this->project->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Project not found'); + } - if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->project->addline( - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->fk_product, - $request_data->remise_percent, - $request_data->info_bits, - $request_data->fk_remise_except, - 'HT', - 0, - $request_data->date_start, - $request_data->date_end, - $request_data->product_type, - $request_data->rang, - $request_data->special_code, - $fk_parent_line, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->array_options, - $request_data->fk_unit, - $this->element, - $request_data->id - ); + if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - return $updateRes; + $request_data = (object) $request_data; - } - return false; - } - */ + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + + $updateRes = $this->project->addline( + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->fk_product, + $request_data->remise_percent, + $request_data->info_bits, + $request_data->fk_remise_except, + 'HT', + 0, + $request_data->date_start, + $request_data->date_end, + $request_data->product_type, + $request_data->rang, + $request_data->special_code, + $fk_parent_line, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->array_options, + $request_data->fk_unit, + $this->element, + $request_data->id + ); + + if ($updateRes > 0) { + return $updateRes; + + } + return false; + } + */ // /** // * Update a task to given project @@ -372,52 +383,56 @@ class Tasks extends DolibarrApi // * @return object // */ /* - public function putLine($id, $lineid, $request_data = null) - { - if(! DolibarrApiAccess::$user->rights->projet->creer) { - throw new RestException(401); - } + public function putLine($id, $lineid, $request_data = null) + { + if(! DolibarrApiAccess::$user->rights->projet->creer) { + throw new RestException(401); + } - $result = $this->project->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Project not found'); - } + $result = $this->project->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Project not found'); + } - if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->project->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->date_start, - $request_data->date_end, - $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->fk_unit - ); + if( ! DolibarrApi::_checkAccessToResource('project',$this->project->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + $request_data = (object) $request_data; + + $request_data->desc = checkVal($request_data->desc, 'restricthtml'); + + $updateRes = $this->project->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->date_start, + $request_data->date_end, + $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->fk_unit + ); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ /** @@ -443,12 +458,13 @@ class Tasks extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->task->$field = $value; } - if ($this->task->update(DolibarrApiAccess::$user) > 0) - { + if ($this->task->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); } else { throw new RestException(500, $this->task->error); @@ -519,7 +535,9 @@ class Tasks extends DolibarrApi } $uid = $user_id; - if (empty($uid)) $uid = DolibarrApiAccess::$user->id; + if (empty($uid)) { + $uid = DolibarrApiAccess::$user->id; + } $newdate = dol_stringtotime($date, 1); $this->task->timespent_date = $newdate; @@ -607,8 +625,9 @@ class Tasks extends DolibarrApi { $object = array(); foreach (self::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $object[$field] = $data[$field]; } return $object; diff --git a/htdocs/projet/class/index.html b/htdocs/projet/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index c6e9799afa7..5032cc27a89 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -104,9 +104,52 @@ class Project extends CommonObject */ public $user_close_id; public $public; //!< Tell if this is a public or private project + + /** + * @var float budget Amount + */ public $budget_amount; + + /** + * @var integer Can use projects to follow opportunities + */ + public $usage_opportunity; + + /** + * @var integer Can follow tasks on project and enter time spent on it + */ + public $usage_task; + + /** + * @var integer Use to bill task spend time + */ public $usage_bill_time; // Is the time spent on project must be invoiced or not + /** + * @var integer Event organization: Use Event Organization + */ + public $usage_organize_event; + + /** + * @var integer Event organization: Allow unknown people to suggest new conferences + */ + public $accept_conference_suggestions; + + /** + * @var integer Event organization: Allow unknown people to suggest new booth + */ + public $accept_booth_suggestions; + + /** + * @var float Event organization: registration price + */ + public $price_registration; + + /** + * @var float Event organization: booth price + */ + public $price_booth; + public $statuts_short; public $statuts_long; @@ -200,7 +243,11 @@ class Project extends CommonObject 'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>130), 'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>135), 'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140), - 'usage_organize_event' =>array('type'=>'integer', 'label'=>'Usage organize event', 'enabled'=>1, 'visible'=>-1, 'position'=>145), + 'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145), + 'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>146), + 'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>147), + 'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>148), + 'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>149), 'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>200), 'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>205), 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>210), @@ -232,6 +279,8 @@ class Project extends CommonObject */ public function __construct($db) { + global $conf; + $this->db = $db; $this->statuts_short = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed'); @@ -239,7 +288,9 @@ class Project extends CommonObject global $conf; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { + $this->fields['rowid']['visible'] = 0; + } if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $this->fields['fk_opp_status']['enabled'] = 0; @@ -248,13 +299,17 @@ class Project extends CommonObject $this->fields['usage_opportunity']['enabled'] = 0; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_HIDE_TASKS)) { $this->fields['usage_bill_time']['visible'] = 0; $this->fields['usage_task']['visible'] = 0; } - if (empty($conf->global->PROJECT_ORGANIZE_EVENTS)) { + if (empty($conf->eventorganization->enabled)) { $this->fields['usage_organize_event']['visible'] = 0; + $this->fields['accept_conference_suggestions']['enabled'] = 0; + $this->fields['accept_booth_suggestions']['enabled'] = 0; + $this->fields['price_registration']['enabled'] = 0; + $this->fields['price_booth']['enabled'] = 0; } } @@ -279,14 +334,12 @@ class Project extends CommonObject $this->note_public = dol_substr($this->note_public, 0, 65535); // Check parameters - if (!trim($this->ref)) - { + if (!trim($this->ref)) { $this->error = 'ErrorFieldsRequired'; dol_syslog(get_class($this)."::create error -1 ref null", LOG_ERR); return -1; } - if (!empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) && !($this->socid > 0)) - { + if (!empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) && !($this->socid > 0)) { $this->error = 'ErrorFieldsRequired'; dol_syslog(get_class($this)."::create error -1 thirdparty not defined and option PROJECT_THIRDPARTY_REQUIRED is set", LOG_ERR); return -1; @@ -314,6 +367,10 @@ class Project extends CommonObject $sql .= ", usage_task"; $sql .= ", usage_bill_time"; $sql .= ", usage_organize_event"; + $sql .= ", accept_conference_suggestions"; + $sql .= ", accept_booth_suggestions"; + $sql .= ", price_registration"; + $sql .= ", price_booth"; $sql .= ", email_msgid"; $sql .= ", note_private"; $sql .= ", note_public"; @@ -337,6 +394,10 @@ class Project extends CommonObject $sql .= ", ".($this->usage_task ? 1 : 0); $sql .= ", ".($this->usage_bill_time ? 1 : 0); $sql .= ", ".($this->usage_organize_event ? 1 : 0); + $sql .= ", ".($this->accept_conference_suggestions ? 1 : 0); + $sql .= ", ".($this->accept_booth_suggestions ? 1 : 0); + $sql .= ", ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : 'null'); + $sql .= ", ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : 'null'); $sql .= ", ".($this->email_msgid ? "'".$this->db->escape($this->email_msgid)."'" : 'null'); $sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : 'null'); $sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : 'null'); @@ -345,16 +406,16 @@ class Project extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet"); $ret = $this->id; - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROJECT_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } else { @@ -366,20 +427,19 @@ class Project extends CommonObject // Update extrafield if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) - { + if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) { $res = $this->setValid($user); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } - if (!$error) - { + if (!$error) { $this->db->commit(); return $ret; } else { @@ -404,10 +464,13 @@ class Project extends CommonObject // Clean parameters $this->title = trim($this->title); $this->description = trim($this->description); - if ($this->opp_amount < 0) $this->opp_amount = ''; - if ($this->opp_percent < 0) $this->opp_percent = ''; - if ($this->date_end && $this->date_end < $this->date_start) - { + if ($this->opp_amount < 0) { + $this->opp_amount = ''; + } + if ($this->opp_percent < 0) { + $this->opp_percent = ''; + } + if ($this->date_end && $this->date_end < $this->date_start) { $this->error = $langs->trans("ErrorDateEndLowerThanDateStart"); $this->errors[] = $this->error; $this->db->rollback(); @@ -415,8 +478,7 @@ class Project extends CommonObject return -3; } - if (dol_strlen(trim($this->ref)) > 0) - { + if (dol_strlen(trim($this->ref)) > 0) { $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."projet SET"; @@ -440,43 +502,41 @@ class Project extends CommonObject $sql .= ", usage_task = ".($this->usage_task ? 1 : 0); $sql .= ", usage_bill_time = ".($this->usage_bill_time ? 1 : 0); $sql .= ", usage_organize_event = ".($this->usage_organize_event ? 1 : 0); - $sql .= " WHERE rowid = ".$this->id; + $sql .= ", accept_conference_suggestions = ".($this->accept_conference_suggestions ? 1 : 0); + $sql .= ", accept_booth_suggestions = ".($this->accept_booth_suggestions ? 1 : 0); + $sql .= ", price_registration = ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : "null"); + $sql .= ", price_booth = ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : "null"); + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Update extrafield - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROJECT_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) - { + if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) { // We remove directory - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { $olddir = $conf->projet->dir_output."/".dol_sanitizeFileName($this->oldcopy->ref); $newdir = $conf->projet->dir_output."/".dol_sanitizeFileName($this->ref); - if (file_exists($olddir)) - { + if (file_exists($olddir)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $res = @rename($olddir, $newdir); - if (!$res) - { + if (!$res) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToRenameDir', $olddir, $newdir); $error++; @@ -484,8 +544,7 @@ class Project extends CommonObject } } } - if (!$error) - { + if (!$error) { $this->db->commit(); $result = 1; } else { @@ -496,8 +555,7 @@ class Project extends CommonObject $this->error = $this->db->lasterror(); $this->errors[] = $this->error; $this->db->rollback(); - if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $result = -4; } else { $result = -2; @@ -525,15 +583,17 @@ class Project extends CommonObject { global $conf; - if (empty($id) && empty($ref)) return -1; + if (empty($id) && empty($ref)) { + return -1; + } $sql = "SELECT rowid, entity, ref, title, description, public, datec, opp_amount, budget_amount,"; $sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,"; - $sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, email_msgid"; + $sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, email_msgid,"; + $sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth"; $sql .= " FROM ".MAIN_DB_PREFIX."projet"; - if (!empty($id)) - { - $sql .= " WHERE rowid = ".$id; + if (!empty($id)) { + $sql .= " WHERE rowid = ".((int) $id); } else { $sql .= " WHERE entity IN (".getEntity('project').")"; if (!empty($ref)) { @@ -547,12 +607,10 @@ class Project extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows) - { + if ($num_rows) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -586,6 +644,10 @@ class Project extends CommonObject $this->usage_task = (int) $obj->usage_task; $this->usage_bill_time = (int) $obj->usage_bill_time; $this->usage_organize_event = (int) $obj->usage_organize_event; + $this->accept_conference_suggestions = (int) $obj->accept_conference_suggestions; + $this->accept_booth_suggestions = (int) $obj->accept_booth_suggestions; + $this->price_registration = $obj->price_registration; + $this->price_booth = $obj->price_booth; $this->email_msgid = $obj->email_msgid; $this->db->free($resql); @@ -602,6 +664,7 @@ class Project extends CommonObject return 0; } else { $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); return -1; } } @@ -626,47 +689,49 @@ class Project extends CommonObject $elements = array(); - if ($this->id <= 0) return $elements; + if ($this->id <= 0) { + return $elements; + } $ids = $this->id; - if ($type == 'agenda') - { - $sql = "SELECT id as rowid FROM ".MAIN_DB_PREFIX."actioncomm WHERE fk_project IN (".$ids.") AND entity IN (".getEntity('agenda').")"; - } elseif ($type == 'expensereport') - { - $sql = "SELECT ed.rowid FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."expensereport_det as ed WHERE e.rowid = ed.fk_expensereport AND e.entity IN (".getEntity('expensereport').") AND ed.fk_projet IN (".$ids.")"; - } elseif ($type == 'project_task') - { - $sql = "SELECT DISTINCT pt.rowid FROM ".MAIN_DB_PREFIX."projet_task as pt WHERE pt.fk_projet IN (".$ids.")"; - } elseif ($type == 'project_task_time') // Case we want to duplicate line foreach user - { - $sql = "SELECT DISTINCT pt.rowid, ptt.fk_user FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt WHERE pt.rowid = ptt.fk_task AND pt.fk_projet IN (".$ids.")"; - } elseif ($type == 'stock_mouvement') - { - $sql = 'SELECT ms.rowid, ms.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."stock_mouvement as ms, ".MAIN_DB_PREFIX."entrepot as e WHERE e.rowid = ms.fk_entrepot AND e.entity IN (".getEntity('stock').") AND ms.origintype = 'project' AND ms.fk_origin IN (".$ids.") AND ms.type_mouvement = 1"; - } elseif ($type == 'loan') - { - $sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet IN (".$ids.")"; + if ($type == 'agenda') { + $sql = "SELECT id as rowid FROM ".MAIN_DB_PREFIX."actioncomm WHERE fk_project IN (".$this->db->sanitize($ids).") AND entity IN (".getEntity('agenda').")"; + } elseif ($type == 'expensereport') { + $sql = "SELECT ed.rowid FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."expensereport_det as ed WHERE e.rowid = ed.fk_expensereport AND e.entity IN (".getEntity('expensereport').") AND ed.fk_projet IN (".$this->db->sanitize($ids).")"; + } elseif ($type == 'project_task') { + $sql = "SELECT DISTINCT pt.rowid FROM ".MAIN_DB_PREFIX."projet_task as pt WHERE pt.fk_projet IN (".$this->db->sanitize($ids).")"; + } elseif ($type == 'project_task_time') { // Case we want to duplicate line foreach user + $sql = "SELECT DISTINCT pt.rowid, ptt.fk_user FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt WHERE pt.rowid = ptt.fk_task AND pt.fk_projet IN (".$this->db->sanitize($ids).")"; + } elseif ($type == 'stock_mouvement') { + $sql = 'SELECT ms.rowid, ms.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."stock_mouvement as ms, ".MAIN_DB_PREFIX."entrepot as e WHERE e.rowid = ms.fk_entrepot AND e.entity IN (".getEntity('stock').") AND ms.origintype = 'project' AND ms.fk_origin IN (".$this->db->sanitize($ids).") AND ms.type_mouvement = 1"; + } elseif ($type == 'loan') { + $sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet IN (".$this->db->sanitize($ids).")"; } else { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$tablename." WHERE ".$projectkey." IN (".$ids.") AND entity IN (".getEntity($type).")"; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$tablename." WHERE ".$projectkey." IN (".$this->db->sanitize($ids).") AND entity IN (".getEntity($type).")"; } if ($dates > 0 && $type == 'loan') { $sql .= " AND (dateend > '".$this->db->idate($dates)."' OR dateend IS NULL)"; - } elseif ($dates > 0 && ($type != 'project_task')) // For table project_taks, we want the filter on date apply on project_time_spent table - { - if (empty($datefieldname) && !empty($this->table_element_date)) $datefieldname = $this->table_element_date; - if (empty($datefieldname)) return 'Error this object has no date field defined'; + } elseif ($dates > 0 && ($type != 'project_task')) { // For table project_taks, we want the filter on date apply on project_time_spent table + if (empty($datefieldname) && !empty($this->table_element_date)) { + $datefieldname = $this->table_element_date; + } + if (empty($datefieldname)) { + return 'Error this object has no date field defined'; + } $sql .= " AND (".$datefieldname." >= '".$this->db->idate($dates)."' OR ".$datefieldname." IS NULL)"; } if ($datee > 0 && $type == 'loan') { $sql .= " AND (datestart < '".$this->db->idate($datee)."' OR datestart IS NULL)"; - } elseif ($datee > 0 && ($type != 'project_task')) // For table project_taks, we want the filter on date apply on project_time_spent table - { - if (empty($datefieldname) && !empty($this->table_element_date)) $datefieldname = $this->table_element_date; - if (empty($datefieldname)) return 'Error this object has no date field defined'; + } elseif ($datee > 0 && ($type != 'project_task')) { // For table project_taks, we want the filter on date apply on project_time_spent table + if (empty($datefieldname) && !empty($this->table_element_date)) { + $datefieldname = $this->table_element_date; + } + if (empty($datefieldname)) { + return 'Error this object has no date field defined'; + } $sql .= " AND (".$datefieldname." <= '".$this->db->idate($datee)."' OR ".$datefieldname." IS NULL)"; } @@ -680,22 +745,24 @@ class Project extends CommonObject 'fk_projet' => $projectkey ); $reshook = $hookmanager->executeHooks('getElementList', $parameters, $object, $action); - if ($reshook > 0) $sql = $hookmanager->resPrint; - else $sql .= $hookmanager->resPrint; + if ($reshook > 0) { + $sql = $hookmanager->resPrint; + } else { + $sql .= $hookmanager->resPrint; + } - if (!$sql) return -1; + if (!$sql) { + return -1; + } //print $sql; dol_syslog(get_class($this)."::get_element_list", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $nump = $this->db->num_rows($result); - if ($nump) - { + if ($nump) { $i = 0; - while ($i < $nump) - { + while ($i < $nump) { $obj = $this->db->fetch_object($result); $elements[$i] = $obj->rowid.(empty($obj->fk_user) ? '' : '_'.$obj->fk_user); @@ -728,12 +795,10 @@ class Project extends CommonObject $this->db->begin(); - if (!$error) - { + if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) - { + if ($res < 0) { $this->error = 'ErrorFailToDeleteLinkedContact'; //$error++; $this->db->rollback(); @@ -748,12 +813,10 @@ class Project extends CommonObject 'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet', 'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project' ); - foreach ($listoftables as $key => $value) - { - $sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".$this->id; + foreach ($listoftables as $key => $value) { + $sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->lasterror(); $error++; break; @@ -763,7 +826,7 @@ class Project extends CommonObject // Remove linked categories. if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_project"; - $sql .= " WHERE fk_project = ".$this->id; + $sql .= " WHERE fk_project = ".((int) $this->id); $result = $this->db->query($sql); if (!$result) { @@ -777,17 +840,18 @@ class Project extends CommonObject // Delete tasks $ret = $this->deleteTasks($user); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } // Delete all child tables if (!$error) { $elements = array('categorie_project'); // elements to delete. TODO Make goodway to delete - foreach ($elements as $table) - { + foreach ($elements as $table) { if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$table; - $sql .= " WHERE fk_project = ".$this->id; + $sql .= " WHERE fk_project = ".((int) $this->id); $result = $this->db->query($sql); if (!$result) { @@ -798,28 +862,24 @@ class Project extends CommonObject } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_extrafields"; $sql .= " WHERE fk_object=".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $this->db->lasterror(); $error++; } } // Delete project - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->errors[] = $langs->trans("CantRemoveProject", $langs->transnoentitiesnoconv("ProjectOverview")); $error++; } @@ -841,8 +901,7 @@ class Project extends CommonObject } } - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROJECT_DELETE', $user); @@ -853,13 +912,11 @@ class Project extends CommonObject } } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -879,27 +936,31 @@ class Project extends CommonObject */ public function getElementCount($type, $tablename, $projectkey = 'fk_projet') { - if ($this->id <= 0) return 0; + if ($this->id <= 0) { + return 0; + } if ($type == 'agenda') { $sql = "SELECT COUNT(id) as nb FROM ".MAIN_DB_PREFIX."actioncomm WHERE fk_project = ".$this->id." AND entity IN (".getEntity('agenda').")"; } elseif ($type == 'expensereport') { - $sql = "SELECT COUNT(ed.rowid) as nb FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."expensereport_det as ed WHERE e.rowid = ed.fk_expensereport AND e.entity IN (".getEntity('expensereport').") AND ed.fk_projet = ".$this->id; + $sql = "SELECT COUNT(ed.rowid) as nb FROM ".MAIN_DB_PREFIX."expensereport as e, ".MAIN_DB_PREFIX."expensereport_det as ed WHERE e.rowid = ed.fk_expensereport AND e.entity IN (".getEntity('expensereport').") AND ed.fk_projet = ".((int) $this->id); } elseif ($type == 'project_task') { $sql = "SELECT DISTINCT COUNT(pt.rowid) as nb FROM ".MAIN_DB_PREFIX."projet_task as pt WHERE pt.fk_projet = ".$this->id; } elseif ($type == 'project_task_time') { // Case we want to duplicate line foreach user - $sql = "SELECT DISTINCT COUNT(pt.rowid) as nb FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt WHERE pt.rowid = ptt.fk_task AND pt.fk_projet = ".$this->id; + $sql = "SELECT DISTINCT COUNT(pt.rowid) as nb FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt WHERE pt.rowid = ptt.fk_task AND pt.fk_projet = ".((int) $this->id); } elseif ($type == 'stock_mouvement') { - $sql = 'SELECT COUNT(ms.rowid) as nb FROM '.MAIN_DB_PREFIX."stock_mouvement as ms, ".MAIN_DB_PREFIX."entrepot as e WHERE e.rowid = ms.fk_entrepot AND e.entity IN (".getEntity('stock').") AND ms.origintype = 'project' AND ms.fk_origin = ".$this->id." AND ms.type_mouvement = 1"; + $sql = 'SELECT COUNT(ms.rowid) as nb FROM '.MAIN_DB_PREFIX."stock_mouvement as ms, ".MAIN_DB_PREFIX."entrepot as e WHERE e.rowid = ms.fk_entrepot AND e.entity IN (".getEntity('stock').") AND ms.origintype = 'project' AND ms.fk_origin = ".((int) $this->id)." AND ms.type_mouvement = 1"; } elseif ($type == 'loan') { - $sql = 'SELECT COUNT(l.rowid) as nb FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet = ".$this->id; + $sql = 'SELECT COUNT(l.rowid) as nb FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet = ".((int) $this->id); } else { - $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX.$tablename." WHERE ".$projectkey." = ".$this->id." AND entity IN (".getEntity($type).")"; + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX.$tablename." WHERE ".$projectkey." = ".((int) $this->id)." AND entity IN (".getEntity($type).")"; } $result = $this->db->query($sql); - if (!$result) return 0; + if (!$result) { + return 0; + } $obj = $this->db->fetch_object($result); @@ -918,15 +979,12 @@ class Project extends CommonObject { $countTasks = count($this->lines); $deleted = false; - if ($countTasks) - { - foreach ($this->lines as $task) - { + if ($countTasks) { + foreach ($this->lines as $task) { if ($task->hasChildren() <= 0) { // If there is no children (or error to detect them) $deleted = true; $ret = $task->delete($user); - if ($ret <= 0) - { + if ($ret <= 0) { $this->errors[] = $this->db->lasterror(); return -1; } @@ -934,9 +992,10 @@ class Project extends CommonObject } } $this->getLinesArray($user); - if ($deleted && count($this->lines) < $countTasks) - { - if (count($this->lines)) $this->deleteTasks($this->lines); + if ($deleted && count($this->lines) < $countTasks) { + if (count($this->lines)) { + $this->deleteTasks($this->lines); + } } return 1; @@ -955,11 +1014,9 @@ class Project extends CommonObject $error = 0; - if ($this->statut != 1) - { + if ($this->statut != 1) { // Check parameters - if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->title)) - { + if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->title)) { $this->error = $langs->trans("ErrorFieldFormat", $langs->transnoentities("Label")).'. '.$langs->trans('RemoveString', $langs->transnoentitiesnoconv("CopyOf")); return -1; } @@ -973,18 +1030,17 @@ class Project extends CommonObject dol_syslog(get_class($this)."::setValid", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger - if (empty($notrigger)) - { + if (empty($notrigger)) { $result = $this->call_trigger('PROJECT_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->statut = 1; $this->db->commit(); return 1; @@ -1016,31 +1072,29 @@ class Project extends CommonObject $error = 0; - if ($this->statut != self::STATUS_CLOSED) - { + if ($this->statut != self::STATUS_CLOSED) { $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."projet"; - $sql .= " SET fk_statut = ".self::STATUS_CLOSED.", fk_user_close = ".$user->id.", date_close = '".$this->db->idate($now)."'"; + $sql .= " SET fk_statut = ".self::STATUS_CLOSED.", fk_user_close = ".((int) $user->id).", date_close = '".$this->db->idate($now)."'"; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND fk_statut = ".self::STATUS_VALIDATED; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // TODO What to do if fk_opp_status is not code 'WON' or 'LOST' } dol_syslog(get_class($this)."::setClose", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Call trigger $result = $this->call_trigger('PROJECT_CLOSE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->statut = 2; $this->db->commit(); return 1; @@ -1115,7 +1169,9 @@ class Project extends CommonObject { global $conf, $langs, $user, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; if (!empty($conf->global->PROJECT_OPEN_ALWAYS_ON_TAB)) { @@ -1123,7 +1179,9 @@ class Project extends CommonObject } $label = ''; - if ($option != 'nolink') $label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Project").'</u>'; + if ($option != 'nolink') { + $label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Project").'</u>'; + } if (isset($this->status)) { $label .= ' '.$this->getLibStatut(5); } @@ -1141,60 +1199,75 @@ class Project extends CommonObject if (!empty($this->datee)) { $label .= ($label ? '<br>' : '').'<b>'.$langs->trans('DateEnd').': </b>'.dol_print_date($this->datee, 'day'); // The space must be after the : to not being explode when showing the title in img_picto } - if ($moreinpopup) $label .= '<br>'.$moreinpopup; + if ($moreinpopup) { + $label .= '<br>'.$moreinpopup; + } $url = ''; - if ($option != 'nolink') - { + if ($option != 'nolink') { if (preg_match('/\.php$/', $option)) { $url = dol_buildpath($option, 1).'?id='.$this->id; - } elseif ($option == 'task') - { + } elseif ($option == 'task') { $url = DOL_URL_ROOT.'/projet/tasks.php?id='.$this->id; - } elseif ($option == 'preview') - { + } elseif ($option == 'preview') { $url = DOL_URL_ROOT.'/projet/element.php?id='.$this->id; + } elseif ($option == 'eventorganization') { + $url = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?projectid='.$this->id; } else { $url = DOL_URL_ROOT.'/projet/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'; + 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) && $user->rights->projet->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->projet->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowProject"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $picto = 'projectpub'; - if (!$this->public) $picto = 'project'; + if (!$this->public) { + $picto = 'project'; + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $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 .= $this->ref; + 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 .= $this->ref; + } $result .= $linkend; - if ($withpicto != 2) $result .= (($addlabel && $this->title) ? $sep.dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : ''); + if ($withpicto != 2) { + $result .= (($addlabel && $this->title) ? $sep.dol_trunc($this->title, ($addlabel > 1 ? $addlabel : 0)) : ''); + } global $action; $hookmanager->initHooks(array('projectdao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -1258,32 +1331,38 @@ class Project extends CommonObject { // To verify role of users $userAccess = 0; - if (($mode == 'read' && !empty($user->rights->projet->all->lire)) || ($mode == 'write' && !empty($user->rights->projet->all->creer)) || ($mode == 'delete' && !empty($user->rights->projet->all->supprimer))) - { + if (($mode == 'read' && !empty($user->rights->projet->all->lire)) || ($mode == 'write' && !empty($user->rights->projet->all->creer)) || ($mode == 'delete' && !empty($user->rights->projet->all->supprimer))) { $userAccess = 1; - } elseif ($this->public && (($mode == 'read' && !empty($user->rights->projet->lire)) || ($mode == 'write' && !empty($user->rights->projet->creer)) || ($mode == 'delete' && !empty($user->rights->projet->supprimer)))) - { + } elseif ($this->public && (($mode == 'read' && !empty($user->rights->projet->lire)) || ($mode == 'write' && !empty($user->rights->projet->creer)) || ($mode == 'delete' && !empty($user->rights->projet->supprimer)))) { $userAccess = 1; } else { // No access due to permission to read all projects, so we check if we are a contact of project - foreach (array('internal', 'external') as $source) - { + foreach (array('internal', 'external') as $source) { $userRole = $this->liste_contact(4, $source); $num = count($userRole); $nblinks = 0; - while ($nblinks < $num) - { - if ($source == 'internal' && $user->id == $userRole[$nblinks]['id']) // $userRole[$nblinks]['id'] is id of user (llx_user) for internal contacts - { - if ($mode == 'read' && $user->rights->projet->lire) $userAccess++; - if ($mode == 'write' && $user->rights->projet->creer) $userAccess++; - if ($mode == 'delete' && $user->rights->projet->supprimer) $userAccess++; + while ($nblinks < $num) { + if ($source == 'internal' && $user->id == $userRole[$nblinks]['id']) { // $userRole[$nblinks]['id'] is id of user (llx_user) for internal contacts + if ($mode == 'read' && $user->rights->projet->lire) { + $userAccess++; + } + if ($mode == 'write' && $user->rights->projet->creer) { + $userAccess++; + } + if ($mode == 'delete' && $user->rights->projet->supprimer) { + $userAccess++; + } } - if ($source == 'external' && $user->socid > 0 && $user->socid == $userRole[$nblinks]['socid']) // $userRole[$nblinks]['id'] is id of contact (llx_socpeople) or external contacts - { - if ($mode == 'read' && $user->rights->projet->lire) $userAccess++; - if ($mode == 'write' && $user->rights->projet->creer) $userAccess++; - if ($mode == 'delete' && $user->rights->projet->supprimer) $userAccess++; + if ($source == 'external' && $user->socid > 0 && $user->socid == $userRole[$nblinks]['socid']) { // $userRole[$nblinks]['id'] is id of contact (llx_socpeople) or external contacts + if ($mode == 'read' && $user->rights->projet->lire) { + $userAccess++; + } + if ($mode == 'write' && $user->rights->projet->creer) { + $userAccess++; + } + if ($mode == 'delete' && $user->rights->projet->supprimer) { + $userAccess++; + } } $nblinks++; } @@ -1317,20 +1396,19 @@ class Project extends CommonObject $sql = "SELECT ".(($mode == 0 || $mode == 1) ? "DISTINCT " : "")."p.rowid, p.ref"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; - if ($mode == 0) - { + if ($mode == 0) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = p.rowid"; - } elseif ($mode == 1) - { + } elseif ($mode == 1) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; - } elseif ($mode == 2) - { + } elseif ($mode == 2) { // No filter. Use this if user has permission to see all project } $sql .= " WHERE p.entity IN (".getEntity('project').")"; // Internal users must see project he is contact to even if project linked to a third party he can't see. //if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; - if ($socid > 0) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + if ($socid > 0) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + } // Get id of types of contacts for projects (This list never contains a lot of elements) $listofprojectcontacttype = array(); @@ -1338,30 +1416,29 @@ class Project extends CommonObject $sql2 .= " WHERE ctc.element = '".$this->db->escape($this->element)."'"; $sql2 .= " AND ctc.source = 'internal'"; $resql = $this->db->query($sql2); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $listofprojectcontacttype[$obj->rowid] = $obj->code; } - } else dol_print_error($this->db); - if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; // To avoid syntax error if not found + } else { + dol_print_error($this->db); + } + if (count($listofprojectcontacttype) == 0) { + $listofprojectcontacttype[0] = '0'; // To avoid syntax error if not found + } - if ($mode == 0) - { + if ($mode == 0) { $sql .= " AND ( p.public = 1"; - $sql .= " OR ( ec.fk_c_type_contact IN (".join(',', array_keys($listofprojectcontacttype)).")"; + $sql .= " OR ( ec.fk_c_type_contact IN (".$this->db->sanitize(join(',', array_keys($listofprojectcontacttype))).")"; $sql .= " AND ec.fk_socpeople = ".$user->id.")"; $sql .= " )"; - } elseif ($mode == 1) - { + } elseif ($mode == 1) { $sql .= " AND ec.element_id = p.rowid"; $sql .= " AND ("; - $sql .= " ( ec.fk_c_type_contact IN (".join(',', array_keys($listofprojectcontacttype)).")"; + $sql .= " ( ec.fk_c_type_contact IN (".$this->db->sanitize(join(',', array_keys($listofprojectcontacttype))).")"; $sql .= " AND ec.fk_socpeople = ".$user->id.")"; $sql .= " )"; - } elseif ($mode == 2) - { + } elseif ($mode == 2) { // No filter. Use this if user has permission to see all project } @@ -1369,12 +1446,10 @@ class Project extends CommonObject //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $this->db->fetch_row($resql); $projects[$row[0]] = $row[1]; $temp[] = $row[0]; @@ -1383,9 +1458,10 @@ class Project extends CommonObject $this->db->free($resql); - if ($list) - { - if (empty($temp)) return '0'; + if ($list) { + if (empty($temp)) { + return '0'; + } $result = implode(',', $temp); return $result; } @@ -1430,7 +1506,9 @@ class Project extends CommonObject // Load source object $clone_project->fetch($fromid); $clone_project->fetch_optionals(); - if ($newthirdpartyid > 0) $clone_project->socid = $newthirdpartyid; + if ($newthirdpartyid > 0) { + $clone_project->socid = $newthirdpartyid; + } $clone_project->fetch_thirdparty(); $orign_dt_start = $clone_project->date_start; @@ -1439,16 +1517,14 @@ class Project extends CommonObject $clone_project->id = 0; if ($move_date) { $clone_project->date_start = $now; - if (!(empty($clone_project->date_end))) - { + if (!(empty($clone_project->date_end))) { $clone_project->date_end = $clone_project->date_end + ($now - $orign_dt_start); } } $clone_project->datec = $now; - if (!$clone_note) - { + if (!$clone_note) { $clone_project->note_private = ''; $clone_project->note_public = ''; } @@ -1459,11 +1535,9 @@ class Project extends CommonObject // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/project/".$obj.'.php', 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; dol_include_once($reldir."core/modules/project/".$obj.'.php'); $modProject = new $obj; @@ -1471,7 +1545,9 @@ class Project extends CommonObject break; } } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = ''; + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } $clone_project->ref = $defaultref; $clone_project->title = $langs->trans("CopyOf").' '.$clone_project->title; @@ -1480,27 +1556,23 @@ class Project extends CommonObject $result = $clone_project->create($user, $notrigger); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error .= $clone_project->error; $error++; } - if (!$error) - { + if (!$error) { //Get the new project id $clone_project_id = $clone_project->id; //Note Update - if (!$clone_note) - { + if (!$clone_note) { $clone_project->note_private = ''; $clone_project->note_public = ''; } else { $this->db->begin(); $res = $clone_project->update_note(dol_html_entity_decode($clone_project->note_public, ENT_QUOTES | ENT_HTML5), '_public'); - if ($res < 0) - { + if ($res < 0) { $this->error .= $clone_project->error; $error++; $this->db->rollback(); @@ -1510,8 +1582,7 @@ class Project extends CommonObject $this->db->begin(); $res = $clone_project->update_note(dol_html_entity_decode($clone_project->note_private, ENT_QUOTES | ENT_HTML5), '_private'); - if ($res < 0) - { + if ($res < 0) { $this->error .= $clone_project->error; $error++; $this->db->rollback(); @@ -1521,26 +1592,21 @@ class Project extends CommonObject } //Duplicate contact - if ($clone_contact) - { + if ($clone_contact) { $origin_project = new Project($this->db); $origin_project->fetch($fromid); - foreach (array('internal', 'external') as $source) - { + foreach (array('internal', 'external') as $source) { $tab = $origin_project->liste_contact(-1, $source); - foreach ($tab as $contacttoadd) - { + foreach ($tab as $contacttoadd) { $clone_project->add_contact($contacttoadd['id'], $contacttoadd['code'], $contacttoadd['source'], $notrigger); - if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $this->error .= $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); $error++; } else { - if ($clone_project->error != '') - { + if ($clone_project->error != '') { $this->error .= $clone_project->error; $error++; } @@ -1550,21 +1616,17 @@ class Project extends CommonObject } //Duplicate file - if ($clone_project_file) - { + if ($clone_project_file) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $clone_project_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($defaultref); $ori_project_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($orign_project_ref); - if (dol_mkdir($clone_project_dir) >= 0) - { + if (dol_mkdir($clone_project_dir) >= 0) { $filearray = dol_dir_list($ori_project_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1); - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $rescopy = dol_copy($ori_project_dir.'/'.$file['name'], $clone_project_dir.'/'.$file['name'], 0, 1); - if (is_numeric($rescopy) && $rescopy < 0) - { + if (is_numeric($rescopy) && $rescopy < 0) { $this->error .= $langs->trans("ErrorFailToCopyFile", $ori_project_dir.'/'.$file['name'], $clone_project_dir.'/'.$file['name']); $error++; } @@ -1576,26 +1638,25 @@ class Project extends CommonObject } //Duplicate task - if ($clone_task) - { + if ($clone_task) { require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $taskstatic = new Task($this->db); // Security check $socid = 0; - if ($user->socid > 0) $socid = $user->socid; + if ($user->socid > 0) { + $socid = $user->socid; + } $tasksarray = $taskstatic->getTasksArray(0, 0, $fromid, $socid, 0); $tab_conv_child_parent = array(); // Loop on each task, to clone it - foreach ($tasksarray as $tasktoclone) - { + foreach ($tasksarray as $tasktoclone) { $result_clone = $taskstatic->createFromClone($user, $tasktoclone->id, $clone_project_id, $tasktoclone->fk_parent, $move_date, true, false, $clone_task_file, true, false); - if ($result_clone <= 0) - { + if ($result_clone <= 0) { $this->error .= $result_clone->error; $error++; } else { @@ -1604,8 +1665,7 @@ class Project extends CommonObject //manage new parent clone task id // if the current task has child we store the original task id and the equivalent clone task id - if (($taskstatic->hasChildren()) && !array_key_exists($tasktoclone->id, $tab_conv_child_parent)) - { + if (($taskstatic->hasChildren()) && !array_key_exists($tasktoclone->id, $tab_conv_child_parent)) { $tab_conv_child_parent[$tasktoclone->id] = $new_task_id; } } @@ -1613,16 +1673,13 @@ class Project extends CommonObject //Parse all clone node to be sure to update new parent $tasksarray = $taskstatic->getTasksArray(0, 0, $clone_project_id, $socid, 0); - foreach ($tasksarray as $task_cloned) - { + foreach ($tasksarray as $task_cloned) { $taskstatic->fetch($task_cloned->id); - if ($taskstatic->fk_task_parent != 0) - { + if ($taskstatic->fk_task_parent != 0) { $taskstatic->fk_task_parent = $tab_conv_child_parent[$taskstatic->fk_task_parent]; } $res = $taskstatic->update($user, $notrigger); - if ($result_clone <= 0) - { + if ($result_clone <= 0) { $this->error .= $taskstatic->error; $error++; } @@ -1632,8 +1689,7 @@ class Project extends CommonObject unset($clone_project->context['createfromclone']); - if (!$error) - { + if (!$error) { $this->db->commit(); return $clone_project_id; } else { @@ -1660,22 +1716,21 @@ class Project extends CommonObject // Security check $socid = 0; - if ($user->socid > 0) $socid = $user->socid; + if ($user->socid > 0) { + $socid = $user->socid; + } $tasksarray = $taskstatic->getTasksArray(0, 0, $this->id, $socid, 0); - foreach ($tasksarray as $tasktoshiftdate) - { + foreach ($tasksarray as $tasktoshiftdate) { $to_update = false; // Fetch only if update of date will be made - if ((!empty($tasktoshiftdate->date_start)) || (!empty($tasktoshiftdate->date_end))) - { + if ((!empty($tasktoshiftdate->date_start)) || (!empty($tasktoshiftdate->date_end))) { //dol_syslog(get_class($this)."::shiftTaskDate to_update", LOG_DEBUG); $to_update = true; $task = new Task($this->db); $result = $task->fetch($tasktoshiftdate->id); - if (!$result) - { + if (!$result) { $error++; $this->error .= $task->error; } @@ -1683,29 +1738,24 @@ class Project extends CommonObject //print "$this->date_start + $tasktoshiftdate->date_start - $old_project_dt_start";exit; //Calcultate new task start date with difference between old proj start date and origin task start date - if (!empty($tasktoshiftdate->date_start)) - { + if (!empty($tasktoshiftdate->date_start)) { $task->date_start = $this->date_start + ($tasktoshiftdate->date_start - $old_project_dt_start); } //Calcultate new task end date with difference between origin proj end date and origin task end date - if (!empty($tasktoshiftdate->date_end)) - { + if (!empty($tasktoshiftdate->date_end)) { $task->date_end = $this->date_start + ($tasktoshiftdate->date_end - $old_project_dt_start); } - if ($to_update) - { + if ($to_update) { $result = $task->update($user); - if (!$result) - { + if (!$result) { $error++; $this->error .= $task->error; } } } - if ($error != 0) - { + if ($error != 0) { return -1; } return $result; @@ -1725,10 +1775,12 @@ class Project extends CommonObject // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX.$tableName; - if ($tableName == "actioncomm") - { + if ($tableName == "actioncomm") { $sql .= " SET fk_project=".$this->id; $sql .= " WHERE id=".$elementSelectId; + } elseif ($tableName == "entrepot") { + $sql .= " SET fk_project=".$this->id; + $sql .= " WHERE rowid=".$elementSelectId; } else { $sql .= " SET fk_projet=".$this->id; $sql .= " WHERE rowid=".$elementSelectId; @@ -1759,8 +1811,7 @@ class Project extends CommonObject // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX.$tableName; - if ($tableName == "actioncomm") - { + if ($tableName == "actioncomm") { $sql .= " SET fk_project=NULL"; $sql .= " WHERE id=".$elementSelectId; } else { @@ -1826,7 +1877,9 @@ class Project extends CommonObject $this->weekWorkLoad = array(); $this->weekWorkLoadPerTask = array(); - if (empty($datestart)) dol_print_error('', 'Error datestart parameter is empty'); + if (empty($datestart)) { + dol_print_error('', 'Error datestart parameter is empty'); + } $sql = "SELECT ptt.rowid as taskid, ptt.task_duration, ptt.task_date, ptt.task_datehour, ptt.fk_task"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time AS ptt, ".MAIN_DB_PREFIX."projet_task as pt"; @@ -1834,24 +1887,25 @@ class Project extends CommonObject $sql .= " AND pt.fk_projet = ".$this->id; $sql .= " AND (ptt.task_date >= '".$this->db->idate($datestart)."' "; $sql .= " AND ptt.task_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'w') - 1)."')"; - if ($taskid) $sql .= " AND ptt.fk_task=".$taskid; - if (is_numeric($userid)) $sql .= " AND ptt.fk_user=".$userid; + if ($taskid) { + $sql .= " AND ptt.fk_task=".$taskid; + } + if (is_numeric($userid)) { + $sql .= " AND ptt.fk_user=".$userid; + } //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $daylareadyfound = array(); $num = $this->db->num_rows($resql); $i = 0; // Loop on each record found, so each couple (project id, task id) - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $day = $this->db->jdate($obj->task_date); // task_date is date without hours - if (empty($daylareadyfound[$day])) - { + if (empty($daylareadyfound[$day])) { $this->weekWorkLoad[$day] = $obj->task_duration; $this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration; } else { @@ -1886,7 +1940,9 @@ class Project extends CommonObject $this->monthWorkLoad = array(); $this->monthWorkLoadPerTask = array(); - if (empty($datestart)) dol_print_error('', 'Error datestart parameter is empty'); + if (empty($datestart)) { + dol_print_error('', 'Error datestart parameter is empty'); + } $sql = "SELECT ptt.rowid as taskid, ptt.task_duration, ptt.task_date, ptt.task_datehour, ptt.fk_task"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time AS ptt, ".MAIN_DB_PREFIX."projet_task as pt"; @@ -1894,27 +1950,28 @@ class Project extends CommonObject $sql .= " AND pt.fk_projet = ".$this->id; $sql .= " AND (ptt.task_date >= '".$this->db->idate($datestart)."' "; $sql .= " AND ptt.task_date <= '".$this->db->idate(dol_time_plus_duree($datestart, 1, 'm') - 1)."')"; - if ($task_id) $sql .= " AND ptt.fk_task=".$taskid; - if (is_numeric($userid)) $sql .= " AND ptt.fk_user=".$userid; + if ($task_id) { + $sql .= " AND ptt.fk_task=".$taskid; + } + if (is_numeric($userid)) { + $sql .= " AND ptt.fk_user=".$userid; + } //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $weekalreadyfound = array(); $num = $this->db->num_rows($resql); $i = 0; // Loop on each record found, so each couple (project id, task id) - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if (!empty($obj->task_date)) { $date = explode('-', $obj->task_date); $week_number = getWeekNumber($date[2], $date[1], $date[0]); } - if (empty($weekalreadyfound[$week_number])) - { + if (empty($weekalreadyfound[$week_number])) { $this->monthWorkLoad[$week_number] = $obj->task_duration; $this->monthWorkLoadPerTask[$week_number][$obj->fk_task] = $obj->task_duration; } else { @@ -1950,7 +2007,9 @@ class Project extends CommonObject //$socid=$user->socid; $projectsListId = null; - if (!$user->rights->projet->all->lire) $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); + if (!$user->rights->projet->all->lire) { + $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); + } $sql = "SELECT p.rowid, p.fk_statut as status, p.fk_opp_status, p.datee as datee"; $sql .= " FROM (".MAIN_DB_PREFIX."projet as p"; @@ -1960,7 +2019,9 @@ class Project extends CommonObject //if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; $sql .= " WHERE p.fk_statut = 1"; $sql .= " AND p.entity IN (".getEntity('project').')'; - if (!empty($projectsListId)) $sql .= " AND p.rowid IN (".$projectsListId.")"; + if (!empty($projectsListId)) { + $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; + } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser //if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; // For external user, no check is done on company permission because readability is managed by public status of project and assignement. @@ -1968,21 +2029,22 @@ class Project extends CommonObject //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $project_static = new Project($this->db); $response = new WorkboardResponse(); $response->warning_delay = $conf->projet->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("OpenedProjects"); $response->labelShort = $langs->trans("Opened"); - if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project'; - else $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project'; + if ($user->rights->projet->all->lire) { + $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project'; + } else { + $response->url = DOL_URL_ROOT.'/projet/list.php?search_project_user=-1&search_status=1&mainmenu=project'; + } $response->img = img_object('', "projectpub"); // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $project_static->statut = $obj->status; @@ -2037,17 +2099,14 @@ class Project extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " WHERE"; $sql .= " p.entity IN (".getEntity('project').")"; - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $projectsListId = $this->getProjectsAuthorizedForUser($user, 0, 1); - $sql .= "AND p.rowid IN (".$projectsListId.")"; + $sql .= "AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; } $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["projects"] = $obj->nb; } $this->db->free($resql); @@ -2069,8 +2128,12 @@ class Project extends CommonObject { global $conf; - if (!($this->statut == self::STATUS_VALIDATED)) return false; - if (!$this->datee && !$this->date_end) return false; + if (!($this->statut == self::STATUS_VALIDATED)) { + return false; + } + if (!$this->datee && !$this->date_end) { + return false; + } $now = dol_now(); @@ -2090,23 +2153,19 @@ class Project extends CommonObject $sql .= ' date_close as datecloture,'; $sql .= ' fk_user_creat as fk_user_author, fk_user_close as fk_use_cloture'; $sql .= ' FROM '.MAIN_DB_PREFIX.'projet as c'; - $sql .= ' WHERE c.rowid = '.$id; + $sql .= ' WHERE c.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + if ($obj->fk_user_author) { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -2135,50 +2194,8 @@ class Project extends CommonObject */ public function setCategories($categories) { - $type_categ = Categorie::TYPE_PROJECT; - - // Handle single category - if (!is_array($categories)) { - $categories = array($categories); - } - - // Get current categories require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $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; - } - - // Process - foreach ($to_del as $del) { - if ($c->fetch($del) > 0) { - $result = $c->del_type($this, $type_categ); - if ($result < 0) { - $this->errors = $c->errors; - $this->error = $c->error; - return -1; - } - } - } - foreach ($to_add as $add) { - if ($c->fetch($add) > 0) { - $result = $c->add_type($this, $type_categ); - if ($result < 0) { - $this->errors = $c->errors; - $this->error = $c->error; - return -1; - } - } - } - - return 1; + return parent::setCategoriesCommon($categories, Categorie::TYPE_PROJECT); } diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index e1a19e293f0..42c5ae2135f 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -85,21 +85,23 @@ class ProjectStats extends Stats $other = 0; while ($i < $num) { $row = $this->db->fetch_row($resql); - if ($i < $limit || $num == $limit) - { + if ($i < $limit || $num == $limit) { $label = (($langs->trans("OppStatus".$row[2]) != "OppStatus".$row[2]) ? $langs->trans("OppStatus".$row[2]) : $row[2]); $result[$i] = array( $label.' ('.price(price2num($row[0], 'MT'), 1, $langs, 1, -1, -1, $conf->currency).')', $row[0] ); - } else $other += $row[1]; + } else { + $other += $row[1]; + } $i++; } - if ($num > $limit) + if ($num > $limit) { $result[$i] = array( $langs->transnoentitiesnoconv("Other"), $other ); + } $this->db->free($resql); } else { $this->error = "Error ".$this->db->lasterror(); @@ -156,25 +158,34 @@ class ProjectStats extends Stats // Get list of project id allowed to user (in a string list separated by coma) $object = new Project($this->db); $projectsListId = ''; - if (!$user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $user->socid); + if (!$user->rights->projet->all->lire) { + $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $user->socid); + } $sqlwhere[] = ' t.entity IN ('.getEntity('project').')'; - if (!empty($this->userid)) + if (!empty($this->userid)) { $sqlwhere[] = ' t.fk_user_resp='.$this->userid; + } // Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project - if (!empty($this->socid)) + if (!empty($this->socid)) { $sqlwhere[] = ' t.fk_soc='.$this->socid; - if (!empty($this->year) && empty($this->yearmonth)) + } + if (!empty($this->year) && empty($this->yearmonth)) { $sqlwhere[] = " date_format(t.datec,'%Y')='".$this->db->escape($this->year)."'"; - if (!empty($this->yearmonth)) + } + if (!empty($this->yearmonth)) { $sqlwhere[] = " t.datec BETWEEN '".$this->db->idate(dol_get_first_day($this->yearmonth))."' AND '".$this->db->idate(dol_get_last_day($this->yearmonth))."'"; + } - if (!empty($this->status)) - $sqlwhere[] = " t.fk_opp_status IN (".$this->status.")"; + if (!empty($this->status)) { + $sqlwhere[] = " t.fk_opp_status IN (".$this->db->sanitize($this->status).")"; + } - if (!$user->rights->projet->all->lire) $sqlwhere[] = " t.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users + if (!$user->rights->projet->all->lire) { + $sqlwhere[] = " t.rowid IN (".$this->db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users + } if (count($sqlwhere) > 0) { $sqlwhere_str = ' WHERE '.implode(' AND ', $sqlwhere); @@ -254,13 +265,14 @@ class ProjectStats extends Stats { global $conf, $user, $langs; - if ($startyear > $endyear) return -1; + if ($startyear > $endyear) { + return -1; + } $datay = array(); // Search into cache - if (!empty($cachedelay)) - { + if (!empty($cachedelay)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; } @@ -271,11 +283,9 @@ class ProjectStats extends Stats $nowgmt = dol_now(); $foundintocache = 0; - if ($cachedelay > 0) - { + if ($cachedelay > 0) { $filedate = dol_filemtime($newpathofdestfile); - if ($filedate >= ($nowgmt - $cachedelay)) - { + if ($filedate >= ($nowgmt - $cachedelay)) { $foundintocache = 1; $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $filedate; @@ -285,26 +295,22 @@ class ProjectStats extends Stats } // Load file into $data - if ($foundintocache) // Cache file found and is not too old - { + if ($foundintocache) { // Cache file found and is not too old dol_syslog(get_class($this).'::'.__FUNCTION__." read data from cache file ".$newpathofdestfile." ".$filedate."."); $data = json_decode(file_get_contents($newpathofdestfile), true); } else { $year = $startyear; - while ($year <= $endyear) - { + while ($year <= $endyear) { $datay[$year] = $this->getWeightedAmountByMonth($year, $wonlostfilter); $year++; } $data = array(); // $data = array('xval'=>array(0=>xlabel,1=>yval1,2=>yval2...),...) - for ($i = 0; $i < 12; $i++) - { + for ($i = 0; $i < 12; $i++) { $data[$i][] = $datay[$endyear][$i][0]; // set label $year = $startyear; - while ($year <= $endyear) - { + while ($year <= $endyear) { $data[$i][] = $datay[$year][$i][1]; // set yval for x=i $year++; } @@ -312,18 +318,22 @@ class ProjectStats extends Stats } // Save cache file - if (empty($foundintocache) && ($cachedelay > 0 || $cachedelay == -1)) - { + if (empty($foundintocache) && ($cachedelay > 0 || $cachedelay == -1)) { dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk."); - if (!dol_is_dir($conf->user->dir_temp)) dol_mkdir($conf->user->dir_temp); + if (!dol_is_dir($conf->user->dir_temp)) { + dol_mkdir($conf->user->dir_temp); + } $fp = fopen($newpathofdestfile, 'w'); - if ($fp) - { + if ($fp) { fwrite($fp, json_encode($data)); fclose($fp); - if (!empty($conf->global->MAIN_UMASK)) $newmask = $conf->global->MAIN_UMASK; + 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; } @@ -371,13 +381,14 @@ class ProjectStats extends Stats { global $conf, $user, $langs; - if ($startyear > $endyear) return -1; + if ($startyear > $endyear) { + return -1; + } $datay = array(); // Search into cache - if (!empty($cachedelay)) - { + if (!empty($cachedelay)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; } @@ -400,8 +411,7 @@ class ProjectStats extends Stats } // Load file into $data - if ($foundintocache) // Cache file found and is not too old - { + if ($foundintocache) { // Cache file found and is not too old dol_syslog(get_class($this).'::'.__FUNCTION__." read data from cache file ".$newpathofdestfile." ".$filedate."."); $data = json_decode(file_get_contents($newpathofdestfile), true); } else { @@ -426,13 +436,15 @@ class ProjectStats extends Stats // Save cache file if (empty($foundintocache) && ($cachedelay > 0 || $cachedelay == - 1)) { dol_syslog(get_class($this).'::'.__FUNCTION__." save cache file ".$newpathofdestfile." onto disk."); - if (!dol_is_dir($conf->user->dir_temp)) + if (!dol_is_dir($conf->user->dir_temp)) { dol_mkdir($conf->user->dir_temp); + } $fp = fopen($newpathofdestfile, 'w'); fwrite($fp, json_encode($data)); fclose($fp); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { $newmask = $conf->global->MAIN_UMASK; + } @chmod($newpathofdestfile, octdec($newmask)); $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $nowgmt; @@ -483,7 +495,7 @@ class ProjectStats extends Stats $res = array(); - foreach ($res_total as $key=>$total_row) { + foreach ($res_total as $key => $total_row) { //var_dump($total_row); if (!empty($total_row[1])) { $res[$key] = array($total_row[0], (100 * $res_only_wined[$key][1]) / $total_row[1]); diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index b4733de05ae..0f84313b75a 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -190,39 +190,36 @@ class Task extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task"); - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Update extrafield - if (!$error) - { - if (!$error) - { + if (!$error) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -267,28 +264,27 @@ class Task extends CommonObject $sql .= " t.note_private,"; $sql .= " t.note_public,"; $sql .= " t.rang"; - if (!empty($loadparentdata)) - { + if (!empty($loadparentdata)) { $sql .= ", t2.ref as task_parent_ref"; $sql .= ", t2.rang as task_parent_position"; } $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t"; - if (!empty($loadparentdata)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t2 ON t.fk_task_parent = t2.rowid"; + if (!empty($loadparentdata)) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t2 ON t.fk_task_parent = t2.rowid"; + } $sql .= " WHERE "; if (!empty($ref)) { $sql .= "t.ref = '".$this->db->escape($ref)."'"; } else { - $sql .= "t.rowid = ".$id; + $sql .= "t.rowid = ".((int) $id); } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); - if ($num_rows) - { + if ($num_rows) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -311,8 +307,7 @@ class Task extends CommonObject $this->note_public = $obj->note_public; $this->rang = $obj->rang; - if (!empty($loadparentdata)) - { + if (!empty($loadparentdata)) { $this->task_parent_ref = $obj->task_parent_ref; $this->task_parent_position = $obj->task_parent_position; } @@ -323,8 +318,7 @@ class Task extends CommonObject $this->db->free($resql); - if ($num_rows) - { + if ($num_rows) { return 1; } else { return 0; @@ -349,13 +343,27 @@ class Task extends CommonObject $error = 0; // Clean parameters - if (isset($this->fk_project)) $this->fk_project = trim($this->fk_project); - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->fk_task_parent)) $this->fk_task_parent = (int) $this->fk_task_parent; - if (isset($this->label)) $this->label = trim($this->label); - if (isset($this->description)) $this->description = trim($this->description); - if (isset($this->duration_effective)) $this->duration_effective = trim($this->duration_effective); - if (isset($this->planned_workload)) $this->planned_workload = trim($this->planned_workload); + if (isset($this->fk_project)) { + $this->fk_project = trim($this->fk_project); + } + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->fk_task_parent)) { + $this->fk_task_parent = (int) $this->fk_task_parent; + } + if (isset($this->label)) { + $this->label = trim($this->label); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } + if (isset($this->duration_effective)) { + $this->duration_effective = trim($this->duration_effective); + } + if (isset($this->planned_workload)) { + $this->planned_workload = trim($this->planned_workload); + } // Check parameters // Put here code to add control on parameters values @@ -373,53 +381,74 @@ class Task extends CommonObject $sql .= " datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null').","; $sql .= " progress=".(($this->progress != '' && $this->progress >= 0) ? $this->progress : 'null').","; $sql .= " rang=".((!empty($this->rang)) ? $this->rang : "0"); - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } // Update extrafield if (!$error) { - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; } } - if (!$error) - { - if (!$notrigger) - { + if (!$error && !empty($conf->global->PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE)) { + // Close the parent project if it is open (validated) and its tasks are 100% completed + $project = new Project($this->db); + if ($project->fetch($this->fk_project) > 0) { + if ($project->statut == Project::STATUS_VALIDATED) { + $project->getLinesArray(null); // this method does not return <= 0 if fails + $projectCompleted = array_reduce( + $project->lines, + function ($allTasksCompleted, $task) { + return $allTasksCompleted && $task->progress >= 100; + }, + 1 + ); + if ($projectCompleted) { + if ($project->setClose($user) <= 0) { + $error++; + } + } + } + } else { + $error++; + } + if ($error) { + $this->errors[] = $project->error; + } + } + + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) - { + if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) { // We remove directory - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { $project = new Project($this->db); $project->fetch($this->fk_project); $olddir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($this->oldcopy->ref); $newdir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($this->ref); - if (file_exists($olddir)) - { + if (file_exists($olddir)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $res = dol_move($olddir, $newdir); - if (!$res) - { + if (!$res) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToRenameDir', $olddir, $newdir); $error++; @@ -429,10 +458,8 @@ class Task extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -462,8 +489,7 @@ class Task extends CommonObject $this->db->begin(); - if ($this->hasChildren() > 0) - { + if ($this->hasChildren() > 0) { dol_syslog(get_class($this)."::delete Can't delete record as it has some sub tasks", LOG_WARNING); $this->error = 'ErrorRecordHasSubTasks'; $this->db->rollback(); @@ -471,20 +497,17 @@ class Task extends CommonObject } $objectisused = $this->isObjectUsed($this->id); - if (!empty($objectisused)) - { + if (!empty($objectisused)) { dol_syslog(get_class($this)."::delete Can't delete record as it has some child", LOG_WARNING); $this->error = 'ErrorRecordHasChildren'; $this->db->rollback(); return 0; } - if (!$error) - { + if (!$error) { // Delete linked contacts $res = $this->delete_linked_contact(); - if ($res < 0) - { + if ($res < 0) { $this->error = 'ErrorFailToDeleteLinkedContact'; //$error++; $this->db->rollback(); @@ -492,49 +515,50 @@ class Task extends CommonObject } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time"; $sql .= " WHERE fk_task=".$this->id; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task_extrafields"; $sql .= " WHERE fk_object=".$this->id; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -542,19 +566,16 @@ class Task extends CommonObject return -1 * $error; } else { //Delete associated link file - if ($conf->projet->dir_output) - { + if ($conf->projet->dir_output) { $projectstatic = new Project($this->db); $projectstatic->fetch($this->fk_project); $dir = $conf->projet->dir_output."/".dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($this->id); dol_syslog(get_class($this)."::delete dir=".$dir, LOG_DEBUG); - if (file_exists($dir)) - { + if (file_exists($dir)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->error = 'ErrorFailToDeleteDir'; $this->db->rollback(); return 0; @@ -584,14 +605,17 @@ class Task extends CommonObject dol_syslog(get_class($this)."::hasChildren", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } else { + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } else { $obj = $this->db->fetch_object($resql); - if ($obj) $ret = $obj->nb; + if ($obj) { + $ret = $obj->nb; + } $this->db->free($resql); } - if (!$error) - { + if (!$error) { return $ret; } else { return -1; @@ -614,14 +638,17 @@ class Task extends CommonObject dol_syslog(get_class($this)."::hasTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } else { + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } else { $obj = $this->db->fetch_object($resql); - if ($obj) $ret = $obj->nb; + if ($obj) { + $ret = $obj->nb; + } $this->db->free($resql); } - if (!$error) - { + if (!$error) { return $ret; } else { return -1; @@ -645,30 +672,35 @@ class Task extends CommonObject { global $conf, $langs, $user; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $label = img_picto('', $this->picto).' <u>'.$langs->trans("Task").'</u>'; - if (!empty($this->ref)) + if (!empty($this->ref)) { $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; - if (!empty($this->label)) + } + if (!empty($this->label)) { $label .= '<br><b>'.$langs->trans('LabelTask').':</b> '.$this->label; - if ($this->date_start || $this->date_end) - { + } + if ($this->date_start || $this->date_end) { $label .= "<br>".get_date_range($this->date_start, $this->date_end, '', $langs, 0); } $url = DOL_URL_ROOT.'/projet/tasks/'.$mode.'.php?id='.$this->id.($option == 'withproject' ? '&withproject=1' : ''); // 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowTask"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -685,10 +717,16 @@ class Task extends CommonObject $picto = 'projecttask'; $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 .= $this->ref; + 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 .= $this->ref; + } $result .= $linkend; - if ($withpicto != 2) $result .= (($addlabel && $this->label) ? $sep.dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + if ($withpicto != 2) { + $result .= (($addlabel && $this->label) ? $sep.dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + } return $result; } @@ -744,23 +782,26 @@ class Task extends CommonObject // List of tasks (does not care about permissions. Filtering will be done later) $sql = "SELECT "; - if ($filteronprojuser > 0 || $filterontaskuser > 0) $sql .= " DISTINCT"; // We may get several time the same record if user has several roles on same project/task + if ($filteronprojuser > 0 || $filterontaskuser > 0) { + $sql .= " DISTINCT"; // We may get several time the same record if user has several roles on same project/task + } $sql .= " p.rowid as projectid, p.ref, p.title as plabel, p.public, p.fk_statut as projectstatus, p.usage_bill_time,"; $sql .= " t.rowid as taskid, t.ref as taskref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut as status,"; $sql .= " t.dateo as date_start, t.datee as date_end, t.planned_workload, t.rang,"; $sql .= " t.description, "; $sql .= " s.rowid as thirdparty_id, s.nom as thirdparty_name, s.email as thirdparty_email,"; $sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; - if (!empty($extrafields->attributes['projet']['label'])) - { - foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql .= ($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key.' as options_'.$key : ''); + if (!empty($extrafields->attributes['projet']['label'])) { + foreach ($extrafields->attributes['projet']['label'] as $key => $val) { + $sql .= ($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key.' as options_'.$key : ''); + } } - if (!empty($extrafields->attributes['projet_task']['label'])) - { - foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql .= ($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key.' as options_'.$key : ''); + if (!empty($extrafields->attributes['projet_task']['label'])) { + foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) { + $sql .= ($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key.' as options_'.$key : ''); + } } - if ($includebilltime) - { + if ($includebilltime) { $sql .= ", SUM(tt.task_duration * ".$this->db->ifsql("invoice_id IS NULL", "1", "0").") as tobill, SUM(tt.task_duration * ".$this->db->ifsql("invoice_id IS NULL", "0", "1").") as billed"; } @@ -768,55 +809,47 @@ class Task extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_extrafields as efp ON (p.rowid = efp.fk_object)"; - if ($mode == 0) - { - if ($filteronprojuser > 0) - { + if ($mode == 0) { + if ($filteronprojuser > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc"; } $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; - if ($includebilltime) - { + if ($includebilltime) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tt ON tt.fk_task = t.rowid"; } - if ($filterontaskuser > 0) - { + if ($filterontaskuser > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec2"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc2"; } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_extrafields as efpt ON (t.rowid = efpt.fk_object)"; $sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " AND t.fk_projet = p.rowid"; - } elseif ($mode == 1) - { - if ($filteronprojuser > 0) - { + } elseif ($mode == 1) { + if ($filteronprojuser > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc"; } - if ($filterontaskuser > 0) - { + if ($filterontaskuser > 0) { $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; - if ($includebilltime) - { + if ($includebilltime) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tt ON tt.fk_task = t.rowid"; } $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec2"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc2"; } else { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid"; - if ($includebilltime) - { + if ($includebilltime) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tt ON tt.fk_task = t.rowid"; } } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_extrafields as efpt ON (t.rowid = efpt.fk_object)"; $sql .= " WHERE p.entity IN (".getEntity('project').")"; - } else return 'BadValueForParameterMode'; + } else { + return 'BadValueForParameterMode'; + } - if ($filteronprojuser > 0) - { + if ($filteronprojuser > 0) { $sql .= " AND p.rowid = ec.element_id"; $sql .= " AND ctc.rowid = ec.fk_c_type_contact"; $sql .= " AND ctc.element = 'project'"; @@ -824,8 +857,7 @@ class Task extends CommonObject $sql .= " AND ec.statut = 4"; $sql .= " AND ctc.source = 'internal'"; } - if ($filterontaskuser > 0) - { + if ($filterontaskuser > 0) { $sql .= " AND t.fk_projet = p.rowid"; $sql .= " AND p.rowid = ec2.element_id"; $sql .= " AND ctc2.rowid = ec2.fk_c_type_contact"; @@ -834,11 +866,21 @@ class Task extends CommonObject $sql .= " AND ec2.statut = 4"; $sql .= " AND ctc2.source = 'internal'"; } - if ($socid) $sql .= " AND p.fk_soc = ".$socid; - if ($projectid) $sql .= " AND p.rowid in (".$projectid.")"; - if ($filteronproj) $sql .= natural_search(array("p.ref", "p.title"), $filteronproj); - if ($filteronprojstatus && $filteronprojstatus != '-1') $sql .= " AND p.fk_statut IN (".$filteronprojstatus.")"; - if ($morewherefilter) $sql .= $morewherefilter; + if ($socid) { + $sql .= " AND p.fk_soc = ".$socid; + } + if ($projectid) { + $sql .= " AND p.rowid IN (".$this->db->sanitize($projectid).")"; + } + if ($filteronproj) { + $sql .= natural_search(array("p.ref", "p.title"), $filteronproj); + } + if ($filteronprojstatus && $filteronprojstatus != '-1') { + $sql .= " AND p.fk_statut IN (".$this->db->sanitize($filteronprojstatus).")"; + } + if ($morewherefilter) { + $sql .= $morewherefilter; + } // Add where from extra fields $extrafieldsobjectkey = 'projet_task'; $extrafieldsobjectprefix = 'efpt.'; @@ -847,8 +889,7 @@ class Task extends CommonObject $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - if ($includebilltime) - { + if ($includebilltime) { $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public, p.fk_statut, p.usage_bill_time,"; $sql .= " t.datec, t.dateo, t.datee, t.tms,"; $sql .= " t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,"; @@ -856,13 +897,15 @@ class Task extends CommonObject $sql .= " t.description, "; $sql .= " s.rowid, s.nom, s.email,"; $sql .= " p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; - if (!empty($extrafields->attributes['projet']['label'])) - { - foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql .= ($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : ''); + if (!empty($extrafields->attributes['projet']['label'])) { + foreach ($extrafields->attributes['projet']['label'] as $key => $val) { + $sql .= ($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : ''); + } } - if (!empty($extrafields->attributes['projet_task']['label'])) - { - foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql .= ($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : ''); + if (!empty($extrafields->attributes['projet_task']['label'])) { + foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) { + $sql .= ($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : ''); + } } } @@ -872,34 +915,27 @@ class Task extends CommonObject //print $sql;exit; dol_syslog(get_class($this)."::getTasksArray", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; // Loop on each record found, so each couple (project id, task id) - while ($i < $num) - { + while ($i < $num) { $error = 0; $obj = $this->db->fetch_object($resql); - if ((!$obj->public) && (is_object($userp))) // If not public project and we ask a filter on project owned by a user - { - if (!$this->getUserRolesForProjectsOrTasks($userp, 0, $obj->projectid, 0)) - { + if ((!$obj->public) && (is_object($userp))) { // If not public project and we ask a filter on project owned by a user + if (!$this->getUserRolesForProjectsOrTasks($userp, 0, $obj->projectid, 0)) { $error++; } } - if (is_object($usert)) // If we ask a filter on a user affected to a task - { - if (!$this->getUserRolesForProjectsOrTasks(0, $usert, $obj->projectid, $obj->taskid)) - { + if (is_object($usert)) { // If we ask a filter on a user affected to a task + if (!$this->getUserRolesForProjectsOrTasks(0, $usert, $obj->projectid, $obj->taskid)) { $error++; } } - if (!$error) - { + if (!$error) { $tasks[$i] = new Task($this->db); $tasks[$i]->id = $obj->taskid; $tasks[$i]->ref = $obj->taskref; @@ -938,21 +974,19 @@ class Task extends CommonObject $tasks[$i]->thirdparty_name = $obj->thirdparty_name; $tasks[$i]->thirdparty_email = $obj->thirdparty_email; - if (!empty($extrafields->attributes['projet']['label'])) - { - foreach ($extrafields->attributes['projet']['label'] as $key => $val) - { - if ($extrafields->attributes['projet']['type'][$key] != 'separate') + if (!empty($extrafields->attributes['projet']['label'])) { + foreach ($extrafields->attributes['projet']['label'] as $key => $val) { + if ($extrafields->attributes['projet']['type'][$key] != 'separate') { $tasks[$i]->{'options_'.$key} = $obj->{'options_'.$key}; + } } } - if (!empty($extrafields->attributes['projet_task']['label'])) - { - foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) - { - if ($extrafields->attributes['projet_task']['type'][$key] != 'separate') + if (!empty($extrafields->attributes['projet_task']['label'])) { + foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) { + if ($extrafields->attributes['projet_task']['type'][$key] != 'separate') { $tasks[$i]->{'options_'.$key} = $obj->{'options_'.$key}; + } } } } @@ -984,57 +1018,80 @@ class Task extends CommonObject dol_syslog(get_class($this)."::getUserRolesForProjectsOrTasks userp=".is_object($userp)." usert=".is_object($usert)." projectid=".$projectid." taskid=".$taskid); // We want role of user for a projet or role of user for a task. Both are not possible. - if (empty($userp) && empty($usert)) - { + if (empty($userp) && empty($usert)) { $this->error = "CallWithWrongParameters"; return -1; } - if (!empty($userp) && !empty($usert)) - { + if (!empty($userp) && !empty($usert)) { $this->error = "CallWithWrongParameters"; return -1; } /* Liste des taches et role sur les projets ou taches */ $sql = "SELECT pt.rowid as pid, ec.element_id, ctc.code, ctc.source"; - if ($userp) $sql .= " FROM ".MAIN_DB_PREFIX."projet as pt"; - if ($usert && $filteronprojstatus > -1) $sql .= " FROM ".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."projet_task as pt"; - if ($usert && $filteronprojstatus <= -1) $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as pt"; + if ($userp) { + $sql .= " FROM ".MAIN_DB_PREFIX."projet as pt"; + } + if ($usert && $filteronprojstatus > -1) { + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."projet_task as pt"; + } + if ($usert && $filteronprojstatus <= -1) { + $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as pt"; + } $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc"; $sql .= " WHERE pt.rowid = ec.element_id"; - if ($userp && $filteronprojstatus > -1) $sql .= " AND pt.fk_statut = ".$filteronprojstatus; - if ($usert && $filteronprojstatus > -1) $sql .= " AND pt.fk_projet = p.rowid AND p.fk_statut = ".$filteronprojstatus; - if ($userp) $sql .= " AND ctc.element = 'project'"; - if ($usert) $sql .= " AND ctc.element = 'project_task'"; + if ($userp && $filteronprojstatus > -1) { + $sql .= " AND pt.fk_statut = ".$filteronprojstatus; + } + if ($usert && $filteronprojstatus > -1) { + $sql .= " AND pt.fk_projet = p.rowid AND p.fk_statut = ".$filteronprojstatus; + } + if ($userp) { + $sql .= " AND ctc.element = 'project'"; + } + if ($usert) { + $sql .= " AND ctc.element = 'project_task'"; + } $sql .= " AND ctc.rowid = ec.fk_c_type_contact"; - if ($userp) $sql .= " AND ec.fk_socpeople = ".$userp->id; - if ($usert) $sql .= " AND ec.fk_socpeople = ".$usert->id; + if ($userp) { + $sql .= " AND ec.fk_socpeople = ".$userp->id; + } + if ($usert) { + $sql .= " AND ec.fk_socpeople = ".$usert->id; + } $sql .= " AND ec.statut = 4"; $sql .= " AND ctc.source = 'internal'"; - if ($projectid) - { - if ($userp) $sql .= " AND pt.rowid in (".$projectid.")"; - if ($usert) $sql .= " AND pt.fk_projet in (".$projectid.")"; + if ($projectid) { + if ($userp) { + $sql .= " AND pt.rowid IN (".$this->db->sanitize($projectid).")"; + } + if ($usert) { + $sql .= " AND pt.fk_projet IN (".$this->db->sanitize($projectid).")"; + } } - if ($taskid) - { - if ($userp) $sql .= " ERROR SHOULD NOT HAPPENS"; - if ($usert) $sql .= " AND pt.rowid = ".$taskid; + if ($taskid) { + if ($userp) { + $sql .= " ERROR SHOULD NOT HAPPENS"; + } + if ($usert) { + $sql .= " AND pt.rowid = ".((int) $taskid); + } } //print $sql; dol_syslog(get_class($this)."::getUserRolesForProjectsOrTasks execute request", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); - if (empty($arrayroles[$obj->pid])) $arrayroles[$obj->pid] = $obj->code; - else $arrayroles[$obj->pid] .= ','.$obj->code; + if (empty($arrayroles[$obj->pid])) { + $arrayroles[$obj->pid] = $obj->code; + } else { + $arrayroles[$obj->pid] .= ','.$obj->code; + } $i++; } $this->db->free($resql); @@ -1059,10 +1116,12 @@ class Task extends CommonObject //var_dump($tab); $num = count($tab); $i = 0; - while ($i < $num) - { - if ($source == 'thirdparty') $contactAlreadySelected[$i] = $tab[$i]['socid']; - else $contactAlreadySelected[$i] = $tab[$i]['id']; + while ($i < $num) { + if ($source == 'thirdparty') { + $contactAlreadySelected[$i] = $tab[$i]['socid']; + } else { + $contactAlreadySelected[$i] = $tab[$i]['id']; + } $i++; } return $contactAlreadySelected; @@ -1085,15 +1144,18 @@ class Task extends CommonObject $ret = 0; // Check parameters - if (!is_object($user)) - { + if (!is_object($user)) { dol_print_error('', "Method addTimeSpent was called with wrong parameter user"); return -1; } // Clean parameters - if (isset($this->timespent_note)) $this->timespent_note = trim($this->timespent_note); - if (empty($this->timespent_datehour)) $this->timespent_datehour = $this->timespent_date; + if (isset($this->timespent_note)) { + $this->timespent_note = trim($this->timespent_note); + } + if (empty($this->timespent_datehour)) { + $this->timespent_datehour = $this->timespent_date; + } $this->db->begin(); @@ -1116,17 +1178,17 @@ class Task extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time"); $ret = $tasktime_id; $this->timespent_id = $ret; - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_TIMESPENT_CREATE', $user); - if ($result < 0) { $ret = -1; } + if ($result < 0) { + $ret = -1; + } // End call triggers } } else { @@ -1134,35 +1196,33 @@ class Task extends CommonObject $ret = -1; } - if ($ret > 0) - { + if ($ret > 0) { // Recalculate amount of time spent for task and update denormalized field $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; - $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM ".MAIN_DB_PREFIX."projet_task_time as ptt where ptt.fk_task = ".$this->id.")"; - if (isset($this->progress)) $sql .= ", progress = ".$this->progress; // Do not overwrite value if not provided - $sql .= " WHERE rowid = ".$this->id; + $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM ".MAIN_DB_PREFIX."projet_task_time as ptt where ptt.fk_task = ".((int) $this->id).")"; + if (isset($this->progress)) { + $sql .= ", progress = ".((float) $this->progress); // Do not overwrite value if not provided + } + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $ret = -2; } $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time"; - $sql .= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")"; // set average hour rate of user - $sql .= " WHERE rowid = ".$tasktime_id; + $sql .= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $this->timespent_fk_user).")"; // set average hour rate of user + $sql .= " WHERE rowid = ".((int) $tasktime_id); dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $ret = -2; } } - if ($ret > 0) - { + if ($ret > 0) { $this->db->commit(); } else { $this->db->rollback(); @@ -1181,12 +1241,14 @@ class Task extends CommonObject { global $langs; - if (is_object($userobj)) $userid = $userobj->id; - else $userid = $userobj; // old method + if (is_object($userobj)) { + $userid = $userobj->id; + } else { + $userid = $userobj; // old method + } $id = $this->id; - if (empty($id) && empty($userid)) - { + if (empty($id) && empty($userid)) { dol_syslog("getSummaryOfTimeSpent called on a not loaded task without user param defined", LOG_ERR); return -1; } @@ -1202,14 +1264,19 @@ class Task extends CommonObject $sql .= " SUM(".$this->db->ifsql("t.thm IS NULL", 1, 0).") as nblinesnull"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " WHERE 1 = 1"; - if ($morewherefilter) $sql .= $morewherefilter; - if ($id > 0) $sql .= " AND t.fk_task = ".$id; - if ($userid > 0) $sql .= " AND t.fk_user = ".$userid; + if ($morewherefilter) { + $sql .= $morewherefilter; + } + if ($id > 0) { + $sql .= " AND t.fk_task = ".((int) $id); + } + if ($userid > 0) { + $sql .= " AND t.fk_user = ".((int) $userid); + } dol_syslog(get_class($this)."::getSummaryOfTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $result['min_date'] = $obj->min_date; // deprecated. use the ->timespent_xxx instead @@ -1242,7 +1309,9 @@ class Task extends CommonObject { global $langs; - if (empty($id)) $id = $this->id; + if (empty($id)) { + $id = $this->id; + } $result = array(); @@ -1250,18 +1319,15 @@ class Task extends CommonObject $sql .= " SUM(t.task_duration) as nbseconds,"; $sql .= " SUM(t.task_duration / 3600 * ".$this->db->ifsql("t.thm IS NULL", 0, "t.thm").") as amount, SUM(".$this->db->ifsql("t.thm IS NULL", 1, 0).") as nblinesnull"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; - $sql .= " WHERE t.fk_task = ".$id; - if (is_object($fuser) && $fuser->id > 0) - { - $sql .= " AND fk_user = ".$fuser->id; + $sql .= " WHERE t.fk_task = ".((int) $id); + if (is_object($fuser) && $fuser->id > 0) { + $sql .= " AND fk_user = ".((int) $fuser->id); } - if ($dates > 0) - { + if ($dates > 0) { $datefieldname = "task_datehour"; $sql .= " AND (".$datefieldname." >= '".$this->db->idate($dates)."' OR ".$datefieldname." IS NULL)"; } - if ($datee > 0) - { + if ($datee > 0) { $datefieldname = "task_datehour"; $sql .= " AND (".$datefieldname." <= '".$this->db->idate($datee)."' OR ".$datefieldname." IS NULL)"; } @@ -1269,8 +1335,7 @@ class Task extends CommonObject dol_syslog(get_class($this)."::getSumOfAmount", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $result['amount'] = $obj->amount; @@ -1306,14 +1371,12 @@ class Task extends CommonObject $sql .= " t.thm,"; $sql .= " t.note"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; - $sql .= " WHERE t.rowid = ".$id; + $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetchTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->timespent_id = $obj->rowid; @@ -1373,17 +1436,17 @@ class Task extends CommonObject $sql .= " WHERE ptt.fk_task = pt.rowid AND pt.fk_projet = p.rowid"; $sql .= " AND ptt.fk_user = ".$userobj->id; $sql .= " AND pt.entity IN (".getEntity('project').")"; - if ($morewherefilter) $sql .= $morewherefilter; + if ($morewherefilter) { + $sql .= $morewherefilter; + } dol_syslog(get_class($this)."::fetchAllTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $newobj = new stdClass(); @@ -1438,20 +1501,22 @@ class Task extends CommonObject $ret = 0; // Check parameters - if ($this->timespent_date == '') - { + if ($this->timespent_date == '') { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")); return -1; } - if (!($this->timespent_fk_user > 0)) - { + if (!($this->timespent_fk_user > 0)) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("User")); return -1; } // Clean parameters - if (empty($this->timespent_datehour)) $this->timespent_datehour = $this->timespent_date; - if (isset($this->timespent_note)) $this->timespent_note = trim($this->timespent_note); + if (empty($this->timespent_datehour)) { + $this->timespent_datehour = $this->timespent_date; + } + if (isset($this->timespent_note)) { + $this->timespent_note = trim($this->timespent_note); + } $this->db->begin(); @@ -1465,43 +1530,44 @@ class Task extends CommonObject $sql .= " WHERE rowid = ".$this->timespent_id; dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); - if ($this->db->query($sql)) - { - if (!$notrigger) - { + if ($this->db->query($sql)) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_TIMESPENT_MODIFY', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); $ret = -1; - } else $ret = 1; + } else { + $ret = 1; + } // End call triggers - } else $ret = 1; + } else { + $ret = 1; + } } else { $this->error = $this->db->lasterror(); $this->db->rollback(); $ret = -1; } - if ($ret == 1 && ($this->timespent_old_duration != $this->timespent_duration)) - { + if ($ret == 1 && ($this->timespent_old_duration != $this->timespent_duration)) { $newDuration = $this->timespent_duration - $this->timespent_old_duration; $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; - $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM ".MAIN_DB_PREFIX."projet_task_time as ptt where ptt.fk_task = ".$this->db->escape($this->id).")"; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " SET duration_effective = (SELECT SUM(task_duration) FROM ".MAIN_DB_PREFIX."projet_task_time as ptt where ptt.fk_task = ".((int) $this->id).")"; + $sql .= " WHERE rowid = ".((int) $this->id); dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $this->db->rollback(); $ret = -2; } } - if ($ret >= 0) $this->db->commit(); + if ($ret >= 0) { + $this->db->commit(); + } return $ret; } @@ -1525,28 +1591,28 @@ class Task extends CommonObject dol_syslog(get_class($this)."::delTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + if (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('TASK_TIMESPENT_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error) - { + if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task"; $sql .= " SET duration_effective = duration_effective - ".$this->db->escape($this->timespent_duration ? $this->timespent_duration : 0); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::delTimeSpent", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $result = 0; } else { $this->error = $this->db->lasterror(); @@ -1555,10 +1621,8 @@ class Task extends CommonObject } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delTimeSpent ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1611,8 +1675,7 @@ class Task extends CommonObject $defaultref = ''; $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; - if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) - { + if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php'; $modTask = new $obj; $defaultref = $modTask->getNextValue(0, $clone_task); @@ -1629,8 +1692,7 @@ class Task extends CommonObject $clone_task->rang = $origin_task->rang; //Manage Task Date - if ($clone_change_dt) - { + if ($clone_change_dt) { $projectstatic = new Project($this->db); $projectstatic->fetch($ori_project_id); @@ -1638,20 +1700,17 @@ class Task extends CommonObject $orign_project_dt_start = $projectstatic->date_start; //Calcultate new task start date with difference between origin proj start date and origin task start date - if (!empty($clone_task->date_start)) - { + if (!empty($clone_task->date_start)) { $clone_task->date_start = $now + $clone_task->date_start - $orign_project_dt_start; } //Calcultate new task end date with difference between origin proj end date and origin task end date - if (!empty($clone_task->date_end)) - { + if (!empty($clone_task->date_end)) { $clone_task->date_end = $now + $clone_task->date_end - $orign_project_dt_start; } } - if (!$clone_prog) - { + if (!$clone_prog) { $clone_task->progress = 0; } @@ -1659,28 +1718,24 @@ class Task extends CommonObject $result = $clone_task->create($user); // Other options - if ($result < 0) - { + if ($result < 0) { $this->error = $clone_task->error; $error++; } // End - if (!$error) - { + if (!$error) { $clone_task_id = $clone_task->id; $clone_task_ref = $clone_task->ref; - //Note Update - if (!$clone_note) - { + //Note Update + if (!$clone_note) { $clone_task->note_private = ''; $clone_task->note_public = ''; } else { $this->db->begin(); $res = $clone_task->update_note(dol_html_entity_decode($clone_task->note_public, ENT_QUOTES | ENT_HTML5), '_public'); - if ($res < 0) - { + if ($res < 0) { $this->error .= $clone_task->error; $error++; $this->db->rollback(); @@ -1690,8 +1745,7 @@ class Task extends CommonObject $this->db->begin(); $res = $clone_task->update_note(dol_html_entity_decode($clone_task->note_private, ENT_QUOTES | ENT_HTML5), '_private'); - if ($res < 0) - { + if ($res < 0) { $this->error .= $clone_task->error; $error++; $this->db->rollback(); @@ -1701,8 +1755,7 @@ class Task extends CommonObject } //Duplicate file - if ($clone_file) - { + if ($clone_file) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; //retrieve project origin ref to know folder to copy @@ -1710,8 +1763,7 @@ class Task extends CommonObject $projectstatic->fetch($ori_project_id); $ori_project_ref = $projectstatic->ref; - if ($ori_project_id != $project_id) - { + if ($ori_project_id != $project_id) { $projectstatic->fetch($project_id); $clone_project_ref = $projectstatic->ref; } else { @@ -1722,20 +1774,16 @@ class Task extends CommonObject $ori_task_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($ori_project_ref)."/".dol_sanitizeFileName($fromid); $filearray = dol_dir_list($ori_task_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1); - foreach ($filearray as $key => $file) - { - if (!file_exists($clone_task_dir)) - { - if (dol_mkdir($clone_task_dir) < 0) - { + foreach ($filearray as $key => $file) { + if (!file_exists($clone_task_dir)) { + if (dol_mkdir($clone_task_dir) < 0) { $this->error .= $langs->trans('ErrorInternalErrorDetected').':dol_mkdir'; $error++; } } $rescopy = dol_copy($ori_task_dir.'/'.$file['name'], $clone_task_dir.'/'.$file['name'], 0, 1); - if (is_numeric($rescopy) && $rescopy < 0) - { + if (is_numeric($rescopy) && $rescopy < 0) { $this->error .= $langs->trans("ErrorFailToCopyFile", $ori_task_dir.'/'.$file['name'], $clone_task_dir.'/'.$file['name']); $error++; } @@ -1743,27 +1791,22 @@ class Task extends CommonObject } // clone affectation - if ($clone_affectation) - { + if ($clone_affectation) { $origin_task = new Task($this->db); $origin_task->fetch($fromid); - foreach (array('internal', 'external') as $source) - { + foreach (array('internal', 'external') as $source) { $tab = $origin_task->liste_contact(-1, $source); $num = count($tab); $i = 0; - while ($i < $num) - { + while ($i < $num) { $clone_task->add_contact($tab[$i]['id'], $tab[$i]['code'], $tab[$i]['source']); - if ($clone_task->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($clone_task->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $this->error .= $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); $error++; } else { - if ($clone_task->error != '') - { + if ($clone_task->error != '') { $this->error .= $clone_task->error; $error++; } @@ -1773,16 +1816,14 @@ class Task extends CommonObject } } - if ($clone_time) - { + if ($clone_time) { //TODO clone time of affectation } } unset($clone_task->context['createfromclone']); - if (!$error) - { + if (!$error) { $this->db->commit(); return $clone_task_id; } else { @@ -1829,38 +1870,53 @@ class Task extends CommonObject $this->statuts_short[3] = 'Completed'; $this->statuts_short[4] = 'Transfered'; - if ($mode == 0) - { + 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) - { - 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]), 'statut1').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]); - } elseif ($mode == 3) - { - if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); - elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1'); - elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3'); - elseif ($status == 3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - elseif ($status == 4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - elseif ($status == 5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); - } elseif ($mode == 4) - { - if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]); - } elseif ($mode == 5) - { + } 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]), 'statut1').' '.$langs->trans($this->statuts_short[$status]); + } elseif ($status == 2) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts_short[$status]); + } elseif ($status == 3) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + } elseif ($status == 4) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + } elseif ($status == 5) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]); + } + } elseif ($mode == 3) { + if ($status == 0) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + } elseif ($status == 1) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut1'); + } elseif ($status == 2) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3'); + } elseif ($status == 3) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + } elseif ($status == 4) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + } elseif ($status == 5) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); + } + } elseif ($mode == 4) { + if ($status == 0) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 1) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 2) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 3) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 4) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + } elseif ($status == 5) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]); + } + } elseif ($mode == 5) { /*if ($status==0) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); elseif ($status==1) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); elseif ($status==2) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); @@ -1870,8 +1926,7 @@ class Task extends CommonObject */ //else return $this->progress.' %'; return '&nbsp;'; - } elseif ($mode == 6) - { + } elseif ($mode == 6) { /*if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); elseif ($status==1) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); @@ -1948,29 +2003,34 @@ class Task extends CommonObject $sql .= " AND p.fk_statut = 1"; $sql .= " AND t.fk_projet = p.rowid"; $sql .= " AND (t.progress IS NULL OR t.progress < 100)"; // tasks to do - if (!$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".$projectsListId.")"; + if (!$user->rights->projet->all->lire) { + $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; + } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser //if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; - if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; + } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser // if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))"; //print $sql; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $task_static = new Task($this->db); $response = new WorkboardResponse(); $response->warning_delay = $conf->projet->task->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("OpenedTasks"); - if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project'; - else $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&amp;mainmenu=project'; + if ($user->rights->projet->all->lire) { + $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project'; + } else { + $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&amp;mainmenu=project'; + } $response->img = img_object('', "task"); // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; $task_static->projectstatus = $obj->projectstatus; @@ -2011,22 +2071,28 @@ class Task extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; + } $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql .= " WHERE p.entity IN (".getEntity('project', 0).')'; $sql .= " AND t.fk_projet = p.rowid"; // tasks to do - if ($mine || !$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".$projectsListId.")"; + if ($mine || !$user->rights->projet->all->lire) { + $sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")"; + } // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser //if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; - if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id.") OR (s.rowid IS NULL))"; + if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id.") OR (s.rowid IS NULL))"; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["tasks"] = $obj->nb; } $this->db->free($resql); diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php index 296a36c2dcf..8a5234b956f 100644 --- a/htdocs/projet/class/taskstats.class.php +++ b/htdocs/projet/class/taskstats.class.php @@ -59,8 +59,9 @@ class TaskStats extends Stats $sql = "SELECT"; $sql .= " COUNT(t.rowid), t.priority"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) + if (!$user->rights->societe->client->voir && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=t.fk_soc AND sc.fk_user=".$user->id; + } $sql .= $this->buildWhere(); //$sql .= " AND t.fk_statut <> 0"; // We want historic also, so all task not draft $sql .= " GROUP BY t.priority"; @@ -76,20 +77,22 @@ class TaskStats extends Stats $other = 0; while ($i < $num) { $row = $this->db->fetch_row($resql); - if ($i < $limit || $num == $limit) - { + if ($i < $limit || $num == $limit) { $result[$i] = array( $row[1], $row[0] ); - } else $other += $row[1]; + } else { + $other += $row[1]; + } $i++; } - if ($num > $limit) + if ($num > $limit) { $result[$i] = array( $langs->transnoentitiesnoconv("Other"), $other ); + } $this->db->free($resql); } else { $this->error = "Error ".$this->db->lasterror(); @@ -115,8 +118,9 @@ class TaskStats extends Stats $sql = "SELECT date_format(t.datec,'%Y') as year, COUNT(t.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) + if (!$user->rights->societe->client->voir && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=t.fk_soc AND sc.fk_user=".$user->id; + } $sql .= $this->buildWhere(); $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); @@ -137,18 +141,22 @@ class TaskStats extends Stats $sqlwhere[] = ' t.entity IN ('.getEntity('project').')'; - if (!empty($this->userid)) + if (!empty($this->userid)) { $sqlwhere[] = ' t.fk_user_resp='.$this->userid; + } // Forced filter on socid is similar to forced filter on project. TODO Use project assignement to allow to not use filter on project - if (!empty($this->socid)) + if (!empty($this->socid)) { $sqlwhere[] = ' p.fk_soc='.$this->socid; // Link on thirdparty is on project, not on task - if (!empty($this->year) && empty($this->yearmonth)) + } + if (!empty($this->year) && empty($this->yearmonth)) { $sqlwhere[] = " date_format(t.datec,'%Y')='".$this->db->escape($this->year)."'"; - if (!empty($this->yearmonth)) + } + if (!empty($this->yearmonth)) { $sqlwhere[] = " t.datec BETWEEN '".$this->db->idate(dol_get_first_day($this->yearmonth))."' AND '".$this->db->idate(dol_get_last_day($this->yearmonth))."'"; - - if (!empty($this->status)) - $sqlwhere[] = " t.priority IN (".$this->priority.")"; + } + if (!empty($this->priority)) { + $sqlwhere[] = " t.priority IN (".$this->db->sanitize($this->priority, 1).")"; + } if (count($sqlwhere) > 0) { $sqlwhere_str = ' WHERE '.implode(' AND ', $sqlwhere); @@ -172,8 +180,9 @@ class TaskStats extends Stats $sql = "SELECT date_format(t.datec,'%m') as dm, COUNT(t.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task as t INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = t.fk_projet"; - if (!$user->rights->societe->client->voir && !$user->soc_id) + if (!$user->rights->societe->client->voir && !$user->soc_id) { $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=t.fk_soc AND sc.fk_user=".$user->id; + } $sql .= $this->buildWhere(); $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php index 1200e0bc060..2aa8f473cb4 100644 --- a/htdocs/projet/comment.php +++ b/htdocs/projet/comment.php @@ -44,13 +44,13 @@ $objectref = GETPOST("taskref", 'alpha'); // task ref $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $withproject = GETPOST('withproject', 'int'); -$project_ref = GETPOST('project_ref', 'alpha'); -$planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('planned_workloadmin', 'int') != '') ? (GETPOST('planned_workloadhour', 'int') > 0 ?GETPOST('planned_workloadhour', 'int') * 3600 : 0) + (GETPOST('planned_workloadmin', 'int') > 0 ?GETPOST('planned_workloadmin', 'int') * 60 : 0) : ''); // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('projectcard', 'globalcard')); @@ -62,12 +62,13 @@ $object = new Project($db); $extrafields->fetch_name_optionals_label($object->table_element); // Load object -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); // If we create project, ref may be defined into POST but record does not yet exists into database if ($ret > 0) { $object->fetch_thirdparty(); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $id = $object->id; } } @@ -79,8 +80,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_comments.inc.php'; * View */ +$title = $langs->trans('CommentPage'); -llxHeader('', $langs->trans("CommentPage")); +llxHeader('', $title, ''); $form = new Form($db); $formother = new FormOther($db); @@ -109,7 +111,7 @@ $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -122,20 +124,27 @@ print '<table class="border centpercent">'; // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; -if ($object->public) print $langs->trans('SharedProject'); -else print $langs->trans('PrivateProject'); +if ($object->public) { + print $langs->trans('SharedProject'); +} else { + print $langs->trans('PrivateProject'); +} print '</td></tr>'; // Date start - end print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>'; print dol_print_date($object->date_start, 'day'); $end = dol_print_date($object->date_end, 'day'); -if ($end) print ' - '.$end; +if ($end) { + print ' - '.$end; +} print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; -if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); +if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); +} print '</td></tr>'; // Other attributes diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 8a08da54f6e..1af3488bf5c 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -24,13 +24,21 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -if ($conf->categorie->enabled) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } +if ($conf->categorie->enabled) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} // Load translation files required by the page -$langs->loadLangs(array('projects', 'companies')); +$langsLoad=array('projects', 'companies'); +if (!empty($conf->eventorganization->enabled)) { + $langsLoad[]='eventorganization'; +} + +$langs->loadLangs($langsLoad); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -44,7 +52,9 @@ $mine = GETPOST('mode') == 'mine' ? 1 : 0; $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} // Security check $socid = 0; @@ -53,43 +63,157 @@ $result = restrictedArea($user, 'projet', $id, 'projet&project'); $hookmanager->initHooks(array('projectcontactcard', 'globalcard')); + /* * Actions */ +// Test if we can add contact to the tasks at the same times, if not or not required, make a redirect +$formconfirmtoaddtasks = ''; +if ($action == 'addcontact') { + $form = new Form($db); + + $source=GETPOST("source", 'aZ09'); + + $taskstatic = new Task($db); + $task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0); + $nbTasks = count($task_array); + + //If no task avaiblable, redirec to to add confirm + $type_to = (GETPOST('typecontact') ? 'typecontact='.GETPOST('typecontact') : 'type='.GETPOST('type')); + $personToAffect = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $affect_to = (GETPOST('userid') ? 'userid='.$personToAffect : 'contactid='.$personToAffect); + $url_redirect='?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source; + + if ($personToAffect > 0 && (empty($conf->global->PROJECT_HIDE_TASKS) || $nbTasks > 0)) { + $text = $langs->trans('AddPersonToTask'); + $textbody = $text.' (<a href="#" class="selectall">'.$langs->trans("SelectAll").'</a>)'; + $formquestion = array('text' => $textbody); + + $task_to_affect = array(); + foreach ($task_array as $task) { + $task_already_affected=false; + $personsLinked = $task->liste_contact(-1, $source); + if (!is_array($personsLinked) && coun($personsLinked) < 0) { + setEventMessage($object->error, 'errors'); + } else { + foreach ($personsLinked as $person) { + if ($person['id']==$personToAffect) { + $task_already_affected = true; + break; + } + } + if (!$task_already_affected) { + $task_to_affect[$task->id] = $task->id; + } + } + } + + if (empty($task_to_affect)) { + $action = 'addcontact_confirm'; + } else { + $formcompany = new FormCompany($db); + foreach ($task_array as $task) { + $key = $task->id; + $val = $task->ref . ' '.dol_trunc($task->label); + $formquestion[] = array( + 'type' => 'other', + 'name' => 'person_'.$key.',person_role_'.$key, + 'label' => '<input type="checkbox" class="flat'.(in_array($key, $task_to_affect) ? ' taskcheckboxes"' : '" checked disabled').' id="person_'.$key.'" name="person_'.$key.'" value="1"> <label for="person_'.$key.'">'.$val.'<label>', + 'value' => $formcompany->selectTypeContact($taskstatic, '', 'person_role_'.$key, $source, 'position', 0, 'minwidth100imp', 0, 1) + ); + } + $formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">'); + } + + $formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590); + $formconfirmtoaddtasks .=' + <script> + $(document).ready(function() { + var saveprop = false; + $(".selectall").click(function(){ + console.log("We click on select all with "+saveprop); + if (!saveprop) { + $(".taskcheckboxes").prop("checked", true); + saveprop = true; + } else { + $(".taskcheckboxes").prop("checked", false); + saveprop = false; + } + }); + }); + </script>'; + } else { + $action = 'addcontact_confirm'; + } +} + // Add new contact -if ($action == 'addcontact' && $user->rights->projet->creer) -{ +if ($action == 'addcontact_confirm' && $user->rights->projet->creer) { + $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + + if (! ($contactid > 0)) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors'); + } + $result = 0; $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { - $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); - $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); - $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); - } + if (!$error && $result > 0 && $id > 0) { + $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); - if ($result >= 0) - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($result == 0) { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } else { - setEventMessages($object->error, $object->errors, 'errors'); + } elseif ($result < 0) { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } } + + $affecttotask=GETPOST('tasksavailable', 'intcomma'); + if (!empty($affecttotask)) { + require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + $task_to_affect = explode(',', $affecttotask); + if (!empty($task_to_affect)) { + foreach ($task_to_affect as $task_id) { + if (GETPOSTISSET('person_'.$task_id) && GETPOST('person_'.$task_id, 'san_alpha')) { + $tasksToAffect = new Task($db); + $result=$tasksToAffect->fetch($task_id); + if ($result < 0) { + setEventMessages($tasksToAffect->error, null, 'errors'); + } else { + $result = $tasksToAffect->add_contact($contactid, GETPOST('person_role_'.$task_id), GETPOST("source", 'aZ09')); + if ($result < 0) { + if ($tasksToAffect->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($tasksToAffect->error, $tasksToAffect->errors, 'errors'); + } + } + } + } + } + } + } + } + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; } } // Change contact's status -if ($action == 'swapstatut' && $user->rights->projet->creer) -{ - if ($object->fetch($id)) - { +if ($action == 'swapstatut' && $user->rights->projet->creer) { + if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); @@ -97,13 +221,11 @@ if ($action == 'swapstatut' && $user->rights->projet->creer) } // Delete a contact -if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) -{ +if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->projet->creer) { $object->fetch($id); - $result = $object->delete_contact(GETPOST("lineid")); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: contact.php?id=".$object->id); exit; } else { @@ -112,17 +234,21 @@ if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->pr } + /* * View */ -$title = $langs->trans("ProjectContact").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("ProjectContact"); -$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; +$title = $langs->trans('ProjectContact').' - '.$object->ref.' '.$object->name; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans('ProjectContact'); +} + +$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte'; + llxHeader('', $title, $help_url); $form = new Form($db); -$formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); @@ -133,9 +259,10 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if ($id > 0 || !empty($ref)) { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } // To verify role of users //$userAccess = $object->restrictedProjectArea($user,'read'); $userWrite = $object->restrictedProjectArea($user, 'write'); @@ -145,6 +272,19 @@ if ($id > 0 || !empty($ref)) $head = project_prepare_head($object); print dol_get_fiche_head($head, 'contact', $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project')); + $formconfirm = $formconfirmtoaddtasks; + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm); + $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; // Project card @@ -154,17 +294,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -177,57 +315,67 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($object->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($object->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $object->opp_status) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $object->opp_status) { // Opportunity status print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>'; $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); + if ($code) { + print $langs->trans("OppStatus".$code); + } print '</td></tr>'; // Opportunity percent print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>'; - if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %'; + if (strcmp($object->opp_percent, '')) { + print price($object->opp_percent, '', $langs, 1, 0).' %'; + } print '</td></tr>'; // Opportunity Amount print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>'; - if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency); + if (strcmp($object->opp_amount, '')) { + print price($object->opp_amount, '', $langs, 0, 0, 0, $conf->currency); + } print '</td></tr>'; } @@ -238,12 +386,16 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency); + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -285,10 +437,11 @@ if ($id > 0 || !empty($ref)) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index d2f5adcb95c..3f9ec04d437 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -37,7 +37,7 @@ $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$mine = (GETPOST('mode', 'alpha') == 'mine' ? 1 : 0); +$mine = (GETPOST('mode', 'alpha') == 'mine' ? 1 : 0); //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects // Security check @@ -48,27 +48,39 @@ $result = restrictedArea($user, 'projet', $id, 'projet&project'); $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} if ($id > 0 || !empty($ref)) { $upload_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($object->ref); } // Get parameters -$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 +$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 (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; } -if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; } +if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { + $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; +} +if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { + $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; +} -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} @@ -76,23 +88,25 @@ if (!$sortfield) $sortfield = "name"; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ -$title = $langs->trans("Project").' - '.$langs->trans("Document").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Document"); -$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; +$title = $langs->trans('Project').' - '.$langs->trans('Document').' - '.$object->ref.' '.$object->name; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans('Document'); +} + +$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte'; llxHeader('', $title, $help_url); $form = new Form($db); -if ($object->id > 0) -{ +if ($object->id > 0) { $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref); // To verify role of users @@ -107,8 +121,7 @@ if ($object->id > 0) // Files list constructor $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -121,17 +134,15 @@ if ($object->id > 0) // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index ad6a227d3c6..95c348a7e09 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -6,6 +6,8 @@ * Copyright (C) 2015-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2016 Josep Lluís Amador <joseplluis@lliuretic.cat> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,41 +36,108 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; -if (!empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; -if (!empty($conf->expedition->enabled)) require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; -if (!empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; -if (!empty($conf->expensereport->enabled)) require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; -if (!empty($conf->agenda->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -if (!empty($conf->don->enabled)) require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; -if (!empty($conf->loan->enabled)) require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; -if (!empty($conf->loan->enabled)) require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; -if (!empty($conf->stock->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; -if (!empty($conf->tax->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; -if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; -if (!empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; -if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->mrp->enabled)) require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +} +if (!empty($conf->facture->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} +if (!empty($conf->supplier_proposal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; +} +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.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.class.php'; +} +if (!empty($conf->contrat->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; +} +if (!empty($conf->ficheinter->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; +} +if (!empty($conf->expedition->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; +} +if (!empty($conf->deplacement->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; +} +if (!empty($conf->expensereport->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +} +if (!empty($conf->agenda->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +} +if (!empty($conf->don->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; +} +if (!empty($conf->loan->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; +} +if (!empty($conf->loan->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; +} +if (!empty($conf->stock->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; +} +if (!empty($conf->tax->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +} +if (!empty($conf->banque->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; +} +if (!empty($conf->salaries->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; +} +if (!empty($conf->categorie->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} +if (!empty($conf->mrp->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('projects', 'companies', 'suppliers', 'compta')); -if (!empty($conf->facture->enabled)) $langs->load("bills"); -if (!empty($conf->commande->enabled)) $langs->load("orders"); -if (!empty($conf->propal->enabled)) $langs->load("propal"); -if (!empty($conf->ficheinter->enabled)) $langs->load("interventions"); -if (!empty($conf->deplacement->enabled)) $langs->load("trips"); -if (!empty($conf->expensereport->enabled)) $langs->load("trips"); -if (!empty($conf->don->enabled)) $langs->load("donations"); -if (!empty($conf->loan->enabled)) $langs->load("loan"); -if (!empty($conf->salaries->enabled)) $langs->load("salaries"); -if (!empty($conf->mrp->enabled)) $langs->load("mrp"); +if (!empty($conf->facture->enabled)) { + $langs->load("bills"); +} +if (!empty($conf->commande->enabled)) { + $langs->load("orders"); +} +if (!empty($conf->propal->enabled)) { + $langs->load("propal"); +} +if (!empty($conf->ficheinter->enabled)) { + $langs->load("interventions"); +} +if (!empty($conf->deplacement->enabled)) { + $langs->load("trips"); +} +if (!empty($conf->expensereport->enabled)) { + $langs->load("trips"); +} +if (!empty($conf->don->enabled)) { + $langs->load("donations"); +} +if (!empty($conf->loan->enabled)) { + $langs->load("loan"); +} +if (!empty($conf->salaries->enabled)) { + $langs->load("salaries"); +} +if (!empty($conf->mrp->enabled)) { + $langs->load("mrp"); +} +if (!empty($conf->eventorganization->enabled)) { + $langs->load("eventorganization"); +} $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -77,8 +146,12 @@ $datesrfc = GETPOST('datesrfc'); $dateerfc = GETPOST('dateerfc'); $dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear')); $datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear')); -if (empty($dates) && !empty($datesrfc)) $dates = dol_stringtotime($datesrfc); -if (empty($datee) && !empty($dateerfc)) $datee = dol_stringtotime($dateerfc); +if (empty($dates) && !empty($datesrfc)) { + $dates = dol_stringtotime($datesrfc); +} +if (empty($datee) && !empty($dateerfc)) { + $datee = dol_stringtotime($dateerfc); +} if (!GETPOSTISSET('datesrfc') && !GETPOSTISSET('datesday') && !empty($conf->global->PROJECT_LINKED_ELEMENT_DEFAULT_FILTER_YEAR)) { $new = dol_now(); $tmp = dol_getdate($new); @@ -86,8 +159,7 @@ if (!GETPOSTISSET('datesrfc') && !GETPOSTISSET('datesday') && !empty($conf->glob //$dates=dol_time_plus_duree($datee, -1, 'y'); $dates = dol_get_first_day($tmp['year'], 1); } -if ($id == '' && $ref == '') -{ +if ($id == '' && $ref == '') { setEventMessage($langs->trans('ErrorBadParameters'), 'errors'); header('Location: list.php'); exit(); @@ -99,7 +171,9 @@ $mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} // Security check $socid = $object->socid; @@ -113,10 +187,14 @@ $hookmanager->initHooks(array('projectOverview')); * View */ -$title = $langs->trans("ProjectReferers").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("ProjectReferers"); -$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; -llxHeader("", $langs->trans("Referers"), $help_url); +$title = $langs->trans('ProjectReferers').' - '.$object->ref.' '.$object->name; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans('ProjectReferers'); +} + +$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte'; + +llxHeader('', $title, $help_url); $form = new Form($db); $formproject = new FormProjets($db); @@ -139,17 +217,15 @@ $morehtmlref = '<div class="refidno">'; // Title $morehtmlref .= $object->title; // Thirdparty -if ($object->thirdparty->id > 0) -{ +if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. -if (!$user->rights->projet->all->lire) -{ +if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " te.rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " te.rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -162,58 +238,67 @@ print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield centpercent">'; // Usage -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; -if ($object->public) print $langs->trans('SharedProject'); -else print $langs->trans('PrivateProject'); +if ($object->public) { + print $langs->trans('SharedProject'); +} else { + print $langs->trans('PrivateProject'); +} print '</td></tr>'; -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>'; $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); + if ($code) { + print $langs->trans("OppStatus".$code); + } print '</td></tr>'; // Opportunity percent print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>'; - if (strcmp($object->opp_percent, '')) print price($object->opp_percent, '', $langs, 1, 0).' %'; + if (strcmp($object->opp_percent, '')) { + print price($object->opp_percent, '', $langs, 1, 0).' %'; + } print '</td></tr>'; // Opportunity Amount print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>'; - if (strcmp($object->opp_amount, '')) print price($object->opp_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($object->opp_amount, '')) { + print price($object->opp_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; } @@ -224,12 +309,16 @@ print ($start ? $start : '?'); $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); -if ($object->hasDelay()) print img_warning("Late"); +if ($object->hasDelay()) { + print img_warning("Late"); +} print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; -if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); +if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); +} print '</td></tr>'; // Other attributes @@ -274,6 +363,18 @@ print '<br>'; */ $listofreferent = array( +'entrepot'=>array( + 'name'=>"Warehouse", + 'title'=>"ListWarehouseAssociatedProject", + 'class'=>'Entrepot', + 'table'=>'entrepot', + 'datefieldname'=>'date_entrepot', + 'urlnew'=>DOL_URL_ROOT.'/product/stock/card.php?action=create&projectid='.$id, + 'lang'=>'entrepot', + 'buttonnew'=>'AddWarehouse', + 'project_field'=>'fk_project', + 'testnew'=>$user->rights->stock->creer, + 'test'=>$conf->stock->enabled && $user->rights->stock->lire), 'propal'=>array( 'name'=>"Proposals", 'title'=>"ListProposalsAssociatedProject", @@ -339,8 +440,8 @@ $listofreferent = array( 'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&projectid='.$id, // No socid parameter here, the socid is often the customer and we create a supplier object 'lang'=>'suppliers', 'buttonnew'=>'AddSupplierOrder', - 'testnew'=>$user->rights->fournisseur->commande->creer, - 'test'=>$conf->supplier_order->enabled && $user->rights->fournisseur->commande->lire), + 'testnew'=>($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer), + 'test'=>$conf->supplier_order->enabled && ($user->rights->fournisseur->commande->lire || $user->rights->supplier_order->lire)), 'invoice_supplier'=>array( 'name'=>"BillsSuppliers", 'title'=>"ListSupplierInvoicesAssociatedProject", @@ -351,8 +452,8 @@ $listofreferent = array( 'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$id, // No socid parameter here, the socid is often the customer and we create a supplier object 'lang'=>'suppliers', 'buttonnew'=>'AddSupplierInvoice', - 'testnew'=>$user->rights->fournisseur->facture->creer, - 'test'=>$conf->supplier_invoice->enabled && $user->rights->fournisseur->facture->lire), + 'testnew'=>($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer), + 'test'=>$conf->supplier_invoice->enabled && ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire)), 'contract'=>array( 'name'=>"Contracts", 'title'=>"ListContractAssociatedProject", @@ -489,7 +590,7 @@ $listofreferent = array( 'salaries'=>array( 'name'=>"Salaries", 'title'=>"ListSalariesAssociatedProject", - 'class'=>'PaymentSalary', + 'class'=>'Salary', 'table'=>'payment_salary', 'datefieldname'=>'datev', 'margin'=>'minus', @@ -520,11 +621,11 @@ $listofreferent = array( 'table'=>'actioncomm', 'datefieldname'=>'datep', 'disableamount'=>1, - 'urlnew'=>DOL_URL_ROOT.'/comm/action/card.php?action=create&projectid='.$id.'&socid='.$socid, - 'lang'=>'agenda', - 'buttonnew'=>'AddEvent', - 'testnew'=>$user->rights->agenda->myactions->create, - 'test'=>$conf->agenda->enabled && $user->rights->agenda->myactions->read), + 'urlnew'=>DOL_URL_ROOT.'/comm/action/card.php?action=create&projectid='.$id.'&socid='.$socid, + 'lang'=>'agenda', + 'buttonnew'=>'AddEvent', + 'testnew'=>$user->rights->agenda->myactions->create, + 'test'=>$conf->agenda->enabled && $user->rights->agenda->myactions->read), */ ); @@ -561,24 +662,20 @@ if (!empty($hookmanager->resArray)) { $listofreferent = array_merge($listofreferent, $hookmanager->resArray); } -if ($action == "addelement") -{ +if ($action == "addelement") { $tablename = GETPOST("tablename"); $elementselectid = GETPOST("elementselect"); $result = $object->update_element($tablename, $elementselectid); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } -} elseif ($action == "unlink") -{ +} elseif ($action == "unlink") { $tablename = GETPOST("tablename", "aZ09"); $projectField = GETPOSTISSET('projectfield') ? GETPOST('projectfield', 'aZ09') : 'fk_projet'; $elementselectid = GETPOST("elementselect", "int"); $result = $object->remove_element($tablename, $elementselectid, $projectField); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -589,8 +686,7 @@ $elementuser = new User($db); $showdatefilter = 0; // Show the filter on date on top of element list -if (!$showdatefilter) -{ +if (!$showdatefilter) { print '<div class="center centpercent">'; print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -617,7 +713,9 @@ if (!$showdatefilter) $langs->loadLangs(array("suppliers", "bills", "orders", "proposals", "margins")); -if (!empty($conf->stock->enabled)) $langs->load('stocks'); +if (!empty($conf->stock->enabled)) { + $langs->load('stocks'); +} print load_fiche_titre($langs->trans("Profit"), '', 'title_accountancy'); @@ -626,13 +724,11 @@ print '<tr class="liste_titre">'; print '<td class="left" width="200">'; $tooltiponprofit = $langs->trans("ProfitIsCalculatedWith")."<br>\n"; $tooltiponprofitplus = $tooltiponprofitminus = ''; -foreach ($listofreferent as $key => $value) -{ +foreach ($listofreferent as $key => $value) { $name = $langs->trans($value['name']); $qualified = $value['test']; $margin = $value['margin']; - if ($qualified && isset($margin)) // If this element must be included into profit calculation ($margin is 'minus' or 'add') - { + if ($qualified && isset($margin)) { // If this element must be included into profit calculation ($margin is 'minus' or 'add') if ($margin == 'add') { $tooltiponprofitplus .= ' &gt; '.$name." (+)<br>\n"; } @@ -654,8 +750,7 @@ $total_revenue_ht = 0; $balance_ht = 0; $balance_ttc = 0; -foreach ($listofreferent as $key => $value) -{ +foreach ($listofreferent as $key => $value) { $parameters = array( 'total_revenue_ht' =>& $total_revenue_ht, 'balance_ht' =>& $balance_ht, @@ -697,25 +792,38 @@ foreach ($listofreferent as $key => $value) $idofelementuser = $tmp[1]; $element->fetch($idofelement); - if ($idofelementuser) $elementuser->fetch($idofelementuser); + if ($idofelementuser) { + $elementuser->fetch($idofelementuser); + } // Define if record must be used for total or not $qualifiedfortotal = true; if ($key == 'invoice') { - if (!empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal = false; // Replacement invoice, do not include into total - if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $element->type == Facture::TYPE_DEPOSIT) $qualifiedfortotal = false; // If hidden option to use deposits as payment (deprecated, not recommended to use this), deposits are not included + if (!empty($element->close_code) && $element->close_code == 'replaced') { + $qualifiedfortotal = false; // Replacement invoice, do not include into total + } + if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) && $element->type == Facture::TYPE_DEPOSIT) { + $qualifiedfortotal = false; // If hidden option to use deposits as payment (deprecated, not recommended to use this), deposits are not included + } } if ($key == 'propal') { - if ($element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedfortotal = false; // Only signed proposal must not be included in total + if ($element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) { + $qualifiedfortotal = false; // Only signed proposal must not be included in total + } } - if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); + if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) { + $element->fetch_thirdparty(); + } // Define $total_ht_by_line - if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line = $element->amount; - elseif ($tablename == 'fichinter') $total_ht_by_line = $element->getAmount(); - elseif ($tablename == 'stock_mouvement') $total_ht_by_line = $element->price * abs($element->qty); - elseif ($tablename == 'projet_task') { + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') { + $total_ht_by_line = $element->amount; + } elseif ($tablename == 'fichinter') { + $total_ht_by_line = $element->getAmount(); + } elseif ($tablename == 'stock_mouvement') { + $total_ht_by_line = $element->price * abs($element->qty); + } elseif ($tablename == 'projet_task') { if ($idofelementuser) { $tmp = $element->getSumOfAmount($elementuser, $dates, $datee); $total_ht_by_line = price2num($tmp['amount'], 'MT'); @@ -746,18 +854,25 @@ foreach ($listofreferent as $key => $value) } } } - } else $total_ht_by_line = $element->total_ht; + } else { + $total_ht_by_line = $element->total_ht; + } // Define $total_ttc_by_line - if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line = $element->amount; - elseif ($tablename == 'fichinter') $total_ttc_by_line = $element->getAmount(); - elseif ($tablename == 'stock_mouvement') $total_ttc_by_line = $element->price * abs($element->qty); - elseif ($tablename == 'projet_task') { + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') { + $total_ttc_by_line = $element->amount; + } elseif ($tablename == 'fichinter') { + $total_ttc_by_line = $element->getAmount(); + } elseif ($tablename == 'stock_mouvement') { + $total_ttc_by_line = $element->price * abs($element->qty); + } elseif ($tablename == 'projet_task') { $defaultvat = get_default_tva($mysoc, $mysoc); $total_ttc_by_line = price2num($total_ht_by_line * (1 + ($defaultvat / 100)), 'MT'); } elseif ($key == 'loan') { $total_ttc_by_line = $total_ht_by_line; // For loan there is actually no taxe managed in Dolibarr - } else $total_ttc_by_line = $element->total_ttc; + } else { + $total_ttc_by_line = $element->total_ttc; + } // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases if ($tablename == 'payment_various') { @@ -776,7 +891,9 @@ foreach ($listofreferent as $key => $value) // Each element with at least one line is output $qualifiedforfinalprofit = true; - if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false; + if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) { + $qualifiedforfinalprofit = false; + } //var_dump($key.' '.$qualifiedforfinalprofit); // Calculate margin @@ -801,18 +918,24 @@ foreach ($listofreferent as $key => $value) print '<td class="right">'.$i.'</td>'; // Amount HT print '<td class="right">'; - if ($key == 'intervention' && !$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>'; - else { + if ($key == 'intervention' && !$qualifiedforfinalprofit) { + print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>'; + } else { print price($total_ht); - if ($key == 'propal') print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>'; + if ($key == 'propal') { + print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>'; + } } print '</td>'; // Amount TTC print '<td class="right">'; - if ($key == 'intervention' && !$qualifiedforfinalprofit) print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>'; - else { + if ($key == 'intervention' && !$qualifiedforfinalprofit) { + print '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("NA"), $langs->trans("AmountOfInteventionNotIncludedByDefault")).'</span>'; + } else { print price($total_ttc); - if ($key == 'propal') print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>'; + if ($key == 'propal') { + print '<span class="opacitymedium">'.$form->textwithpicto('', $langs->trans("SignedOnly")).'</span>'; + } } print '</td>'; print '</tr>'; @@ -844,8 +967,7 @@ print '<br>'; // Detail -foreach ($listofreferent as $key => $value) -{ +foreach ($listofreferent as $key => $value) { $parameters = array( 'key' => $key, 'value' =>& $value, @@ -872,13 +994,17 @@ foreach ($listofreferent as $key => $value) $project_field = $value['project_field']; $exclude_select_element = array('payment_various'); - if (!empty($value['exclude_select_element'])) $exclude_select_element[] = $value['exclude_select_element']; + if (!empty($value['exclude_select_element'])) { + $exclude_select_element[] = $value['exclude_select_element']; + } if ($qualified) { // If we want the project task array to have details of users //if ($key == 'project_task') $key = 'project_task_time'; - if ($langtoload) $langs->load($langtoload); + if ($langtoload) { + $langs->load($langtoload); + } $element = new $classname($db); @@ -886,20 +1012,18 @@ foreach ($listofreferent as $key => $value) $idtofilterthirdparty = 0; $array_of_element_linkable_with_different_thirdparty = array('facture_fourn', 'commande_fournisseur'); - if (!in_array($tablename, $array_of_element_linkable_with_different_thirdparty)) - { + if (!in_array($tablename, $array_of_element_linkable_with_different_thirdparty)) { $idtofilterthirdparty = $object->thirdparty->id; - if (!empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty .= ','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS; + if (!empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) { + $idtofilterthirdparty .= ','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS; + } } - if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, $exclude_select_element)) - { + if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, $exclude_select_element)) { $selectList = $formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300 minwidth75imp', -2, !empty($project_field) ? $project_field : 'fk_projet'); - if ($selectList < 0) - { + if ($selectList < 0) { setEventMessages($formproject->error, $formproject->errors, 'errors'); - } elseif ($selectList) - { + } elseif ($selectList) { // Define form with the combo list of elements to link $addform .= '<div class="inline-block valignmiddle">'; $addform .= '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; @@ -916,11 +1040,11 @@ foreach ($listofreferent as $key => $value) $addform .= '</div>'; } } - if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) - { + if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) { $addform .= '<div class="inline-block valignmiddle">'; - if ($testnew) $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; - elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { + if ($testnew) { + $addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; + } elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { $addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; } $addform .= '<div>'; @@ -939,19 +1063,27 @@ foreach ($listofreferent as $key => $value) print '<td'.(($tablename != 'actioncomm' && $tablename != 'projet_task') ? ' style="width: 200px"' : '').'>'.$langs->trans("Ref").'</td>'; // Date print '<td'.(($tablename != 'actioncomm' && $tablename != 'projet_task') ? ' style="width: 200px"' : '').' class="center">'; - if (in_array($tablename, array('projet_task'))) print $langs->trans("TimeSpent"); - if (!in_array($tablename, array('projet_task'))) print $langs->trans("Date"); + if (in_array($tablename, array('projet_task'))) { + print $langs->trans("TimeSpent"); + } + if (!in_array($tablename, array('projet_task'))) { + print $langs->trans("Date"); + } print '</td>'; // Thirdparty or user print '<td>'; - if (in_array($tablename, array('projet_task')) && $key == 'project_task') print ''; // if $key == 'project_task', we don't want details per user - elseif (in_array($tablename, array('payment_various'))) print ''; // if $key == 'payment_various', we don't have any thirdparty - elseif (in_array($tablename, array('expensereport_det', 'don', 'projet_task', 'stock_mouvement', 'payment_salary'))) print $langs->trans("User"); - else print $langs->trans("ThirdParty"); + if (in_array($tablename, array('projet_task')) && $key == 'project_task') { + print ''; // if $key == 'project_task', we don't want details per user + } elseif (in_array($tablename, array('payment_various'))) { + print ''; // if $key == 'payment_various', we don't have any thirdparty + } elseif (in_array($tablename, array('expensereport_det', 'don', 'projet_task', 'stock_mouvement', 'payment_salary'))) { + print $langs->trans("User"); + } else { + print $langs->trans("ThirdParty"); + } print '</td>'; // Duration of intervention - if ($tablename == 'fichinter') - { + if ($tablename == 'fichinter') { print '<td>'; print $langs->trans("TotalDuration"); $total_duration = 0; @@ -960,22 +1092,32 @@ foreach ($listofreferent as $key => $value) // Amount HT //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("AmountHT").'</td>'; //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("Amount").'</td>'; - if ($key == 'loan') print '<td class="right" width="120">'.$langs->trans("LoanCapital").'</td>'; - elseif (empty($value['disableamount'])) print '<td class="right" width="120">'.$langs->trans("AmountHT").'</td>'; - else print '<td width="120"></td>'; + if ($key == 'loan') { + print '<td class="right" width="120">'.$langs->trans("LoanCapital").'</td>'; + } elseif (empty($value['disableamount'])) { + print '<td class="right" width="120">'.$langs->trans("AmountHT").'</td>'; + } else { + print '<td width="120"></td>'; + } // Amount TTC //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="120">'.$langs->trans("AmountTTC").'</td>'; - if ($key == 'loan') print '<td class="right" width="120">'.$langs->trans("RemainderToPay").'</td>'; - elseif (empty($value['disableamount'])) print '<td class="right" width="120">'.$langs->trans("AmountTTC").'</td>'; - else print '<td width="120"></td>'; + if ($key == 'loan') { + print '<td class="right" width="120">'.$langs->trans("RemainderToPay").'</td>'; + } elseif (empty($value['disableamount'])) { + print '<td class="right" width="120">'.$langs->trans("AmountTTC").'</td>'; + } else { + print '<td width="120"></td>'; + } // Status - if (in_array($tablename, array('projet_task'))) print '<td class="right" width="200">'.$langs->trans("ProgressDeclared").'</td>'; - else print '<td class="right" width="200">'.$langs->trans("Status").'</td>'; + if (in_array($tablename, array('projet_task'))) { + print '<td class="right" width="200">'.$langs->trans("ProgressDeclared").'</td>'; + } else { + print '<td class="right" width="200">'.$langs->trans("Status").'</td>'; + } print '</tr>'; $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field) ? $project_field : 'fk_projet'); - if (is_array($elementarray) && count($elementarray) > 0) - { + if (is_array($elementarray) && count($elementarray) > 0) { $total_ht = 0; $total_ttc = 0; @@ -985,26 +1127,27 @@ foreach ($listofreferent as $key => $value) $saved_third_id = 0; $breakline = ''; - if (canApplySubtotalOn($tablename)) - { + if (canApplySubtotalOn($tablename)) { // Sort $elementarray = sortElementsByClientName($elementarray); } $num = count($elementarray); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $tmp = explode('_', $elementarray[$i]); $idofelement = $tmp[0]; $idofelementuser = $tmp[1]; $element->fetch($idofelement); - if ($idofelementuser) $elementuser->fetch($idofelementuser); + if ($idofelementuser) { + $elementuser->fetch($idofelementuser); + } // Special cases - if ($tablename != 'expensereport_det') - { - if (method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); + if ($tablename != 'expensereport_det') { + if (method_exists($element, 'fetch_thirdparty')) { + $element->fetch_thirdparty(); + } } else { $expensereport = new ExpenseReport($db); $expensereport->fetch($element->fk_expensereport); @@ -1012,8 +1155,7 @@ foreach ($listofreferent as $key => $value) //print 'xxx'.$tablename.'yyy'.$classname; - if ($breakline && $saved_third_id != $element->thirdparty->id) - { + if ($breakline && $saved_third_id != $element->thirdparty->id) { print $breakline; $saved_third_id = $element->thirdparty->id; @@ -1025,19 +1167,18 @@ foreach ($listofreferent as $key => $value) $saved_third_id = $element->thirdparty->id; $qualifiedfortotal = true; - if ($key == 'invoice') - { - if (!empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal = false; // Replacement invoice, do not include into total + if ($key == 'invoice') { + if (!empty($element->close_code) && $element->close_code == 'replaced') { + $qualifiedfortotal = false; // Replacement invoice, do not include into total + } } print '<tr class="oddeven">'; // Remove link print '<td style="width: 24px">'; - if ($tablename != 'projet_task' && $tablename != 'stock_mouvement') - { - if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true - { + if ($tablename != 'projet_task' && $tablename != 'stock_mouvement') { + if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unlink&tablename='.$tablename.'&elementselect='.$element->id.($project_field ? '&projectfield='.$project_field : '').'" class="reposition">'; print img_picto($langs->trans('Unlink'), 'unlink'); print '</a>'; @@ -1047,19 +1188,19 @@ foreach ($listofreferent as $key => $value) // Ref print '<td class="left nowraponall">'; - if ($tablename == 'expensereport_det') - { + if ($tablename == 'expensereport_det') { print $expensereport->getNomUrl(1); } else { // Show ref with link - if ($element instanceof Task) - { + if ($element instanceof Task) { print $element->getNomUrl(1, 'withproject', 'time'); print ' - '.dol_trunc($element->label, 48); } elseif ($key == 'loan') { print $element->getNomUrl(1); print ' - '.dol_trunc($element->label, 48); - } else print $element->getNomUrl(1); + } else { + print $element->getNomUrl(1); + } $element_doc = $element->element; $filename = dol_sanitizeFileName($element->ref); @@ -1077,32 +1218,48 @@ foreach ($listofreferent as $key => $value) print '<div class="inline-block valignmiddle">'.$formfile->getDocumentsLink($element_doc, $filename, $filedir).'</div>'; // Show supplier ref - if (!empty($element->ref_supplier)) print ' - '.$element->ref_supplier; + if (!empty($element->ref_supplier)) { + print ' - '.$element->ref_supplier; + } // Show customer ref - if (!empty($element->ref_customer)) print ' - '.$element->ref_customer; + if (!empty($element->ref_customer)) { + print ' - '.$element->ref_customer; + } } print "</td>\n"; // Date or TimeSpent $date = ''; $total_time_by_line = null; - if ($tablename == 'expensereport_det') $date = $element->date; // No draft status on lines - elseif ($tablename == 'stock_mouvement') $date = $element->datem; - elseif ($tablename == 'payment_salary') $date = $element->datev; - elseif ($tablename == 'payment_various') $date = $element->datev; - elseif ($tablename == 'chargesociales') $date = $element->date_ech; - elseif (!empty($element->status) || !empty($element->statut) || !empty($element->fk_status)) - { - if ($tablename == 'don') $date = $element->datedon; - if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order') - { + if ($tablename == 'expensereport_det') { + $date = $element->date; // No draft status on lines + } elseif ($tablename == 'stock_mouvement') { + $date = $element->datem; + } elseif ($tablename == 'payment_salary') { + $date = $element->datev; + } elseif ($tablename == 'payment_various') { + $date = $element->datev; + } elseif ($tablename == 'chargesociales') { + $date = $element->date_ech; + } elseif (!empty($element->status) || !empty($element->statut) || !empty($element->fk_status)) { + if ($tablename == 'don') { + $date = $element->datedon; + } + if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order') { $date = ($element->date_commande ? $element->date_commande : $element->date_valid); - } elseif ($tablename == 'supplier_proposal') $date = $element->date_validation; // There is no other date for this - elseif ($tablename == 'fichinter') $date = $element->datev; // There is no other date for this - elseif ($tablename == 'projet_task') $date = ''; // We show no date. Showing date of beginning of task make user think it is date of time consumed - else { + } elseif ($tablename == 'supplier_proposal') { + $date = $element->date_validation; // There is no other date for this + } elseif ($tablename == 'fichinter') { + $date = $element->datev; // There is no other date for this + } elseif ($tablename == 'projet_task') { + $date = ''; // We show no date. Showing date of beginning of task make user think it is date of time consumed + } else { $date = $element->date; // invoice, ... - if (empty($date)) $date = $element->date_contrat; - if (empty($date)) $date = $element->datev; + if (empty($date)) { + $date = $element->date_contrat; + } + if (empty($date)) { + $date = $element->datev; + } if (empty($date) && !empty($datefieldname)) { $date = $element->$datefieldname; } @@ -1112,18 +1269,20 @@ foreach ($listofreferent as $key => $value) } print '<td class="center">'; - if ($tablename == 'actioncomm') - { + if ($tablename == 'actioncomm') { print dol_print_date($element->datep, 'dayhour'); - if ($element->datef && $element->datef > $element->datep) print " - ".dol_print_date($element->datef, 'dayhour'); - } elseif (in_array($tablename, array('projet_task'))) - { + if ($element->datef && $element->datef > $element->datep) { + print " - ".dol_print_date($element->datef, 'dayhour'); + } + } elseif (in_array($tablename, array('projet_task'))) { $tmpprojtime = $element->getSumOfAmount($elementuser, $dates, $datee); // $element is a task. $elementuser may be empty print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$idofelement.'&withproject=1">'; print convertSecondToTime($tmpprojtime['nbseconds'], 'allhourmin'); print '</a>'; $total_time_by_line = $tmpprojtime['nbseconds']; - } else print dol_print_date($date, 'day'); + } else { + print dol_print_date($date, 'day'); + } print '</td>'; // Third party or user @@ -1134,28 +1293,23 @@ foreach ($listofreferent as $key => $value) $tmpuser = new User($db); $tmpuser->fetch($expensereport->fk_user_author); print $tmpuser->getNomUrl(1, '', 48); - } elseif ($tablename == 'payment_salary') - { + } elseif ($tablename == 'payment_salary') { $tmpuser = new User($db); $tmpuser->fetch($element->fk_user); print $tmpuser->getNomUrl(1, '', 48); - } elseif ($tablename == 'don' || $tablename == 'stock_mouvement') - { - if ($element->fk_user_author > 0) - { + } elseif ($tablename == 'don' || $tablename == 'stock_mouvement') { + if ($element->fk_user_author > 0) { $tmpuser2 = new User($db); $tmpuser2->fetch($element->fk_user_author); print $tmpuser2->getNomUrl(1, '', 48); } - } elseif ($tablename == 'projet_task' && $key == 'project_task_time') // if $key == 'project_task', we don't want details per user - { + } elseif ($tablename == 'projet_task' && $key == 'project_task_time') { // if $key == 'project_task', we don't want details per user print $elementuser->getNomUrl(1); } print '</td>'; // Add duration and store it in counter for fichinter - if ($tablename == 'fichinter') - { + if ($tablename == 'fichinter') { print '<td>'; print convertSecondToTime($element->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); $total_duration += $element->duration; @@ -1164,113 +1318,123 @@ foreach ($listofreferent as $key => $value) // Amount without tax $warning = ''; - if (empty($value['disableamount'])) - { + if (empty($value['disableamount'])) { $total_ht_by_line = null; $othermessage = ''; - if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line = $element->amount; - elseif ($tablename == 'fichinter') $total_ht_by_line = $element->getAmount(); - elseif ($tablename == 'stock_mouvement') $total_ht_by_line = $element->price * abs($element->qty); - elseif (in_array($tablename, array('projet_task'))) - { - if (!empty($conf->salaries->enabled)) - { + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') { + $total_ht_by_line = $element->amount; + } elseif ($tablename == 'fichinter') { + $total_ht_by_line = $element->getAmount(); + } elseif ($tablename == 'stock_mouvement') { + $total_ht_by_line = $element->price * abs($element->qty); + } elseif (in_array($tablename, array('projet_task'))) { + if (!empty($conf->salaries->enabled)) { // TODO Permission to read daily rate to show value $total_ht_by_line = price2num($tmpprojtime['amount'], 'MT'); - if ($tmpprojtime['nblinesnull'] > 0) - { + if ($tmpprojtime['nblinesnull'] > 0) { $langs->load("errors"); $warning = $langs->trans("WarningSomeLinesWithNullHourlyRate", $conf->currency); } } else { $othermessage = $form->textwithpicto($langs->trans("NotAvailable"), $langs->trans("ModuleSalaryToDefineHourlyRateMustBeEnabled")); } - } elseif ($key == 'loan') $total_ht_by_line = $element->capital; - else { + } elseif ($key == 'loan') { + $total_ht_by_line = $element->capital; + } else { $total_ht_by_line = $element->total_ht; } // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases - if ($tablename == 'payment_various') - { - if ($element->sens == 0) - { + if ($tablename == 'payment_various') { + if ($element->sens == 0) { $total_ht_by_line = -$total_ht_by_line; } } print '<td class="right">'; - if ($othermessage) print $othermessage; - if (isset($total_ht_by_line)) - { - if (!$qualifiedfortotal) print '<strike>'; - print price($total_ht_by_line); - if (!$qualifiedfortotal) print '</strike>'; + if ($othermessage) { + print $othermessage; + } + if (isset($total_ht_by_line)) { + if (!$qualifiedfortotal) { + print '<strike>'; + } + print price($total_ht_by_line); + if (!$qualifiedfortotal) { + print '</strike>'; + } + } + if ($warning) { + print ' '.img_warning($warning); } - if ($warning) print ' '.img_warning($warning); print '</td>'; - } else print '<td></td>'; + } else { + print '<td></td>'; + } // Amount inc tax - if (empty($value['disableamount'])) - { + if (empty($value['disableamount'])) { $total_ttc_by_line = null; - if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line = $element->amount; - elseif ($tablename == 'fichinter') $total_ttc_by_line = $element->getAmount(); - elseif ($tablename == 'stock_mouvement') $total_ttc_by_line = $element->price * abs($element->qty); - elseif ($tablename == 'projet_task') - { - if (!empty($conf->salaries->enabled)) - { + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') { + $total_ttc_by_line = $element->amount; + } elseif ($tablename == 'fichinter') { + $total_ttc_by_line = $element->getAmount(); + } elseif ($tablename == 'stock_mouvement') { + $total_ttc_by_line = $element->price * abs($element->qty); + } elseif ($tablename == 'projet_task') { + if (!empty($conf->salaries->enabled)) { // TODO Permission to read daily rate $defaultvat = get_default_tva($mysoc, $mysoc); $total_ttc_by_line = price2num($total_ht_by_line * (1 + ($defaultvat / 100)), 'MT'); } else { $othermessage = $form->textwithpicto($langs->trans("NotAvailable"), $langs->trans("ModuleSalaryToDefineHourlyRateMustBeEnabled")); } - } elseif ($key == 'loan') $total_ttc_by_line = $element->capital - $element->getSumPayment(); - else { + } elseif ($key == 'loan') { + $total_ttc_by_line = $element->capital - $element->getSumPayment(); + } else { $total_ttc_by_line = $element->total_ttc; } // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases - if ($tablename == 'payment_various') - { - if ($element->sens == 0) - { + if ($tablename == 'payment_various') { + if ($element->sens == 0) { $total_ttc_by_line = -$total_ttc_by_line; } } print '<td class="right">'; - if ($othermessage) print $othermessage; - if (isset($total_ttc_by_line)) - { - if (!$qualifiedfortotal) print '<strike>'; - print price($total_ttc_by_line); - if (!$qualifiedfortotal) print '</strike>'; + if ($othermessage) { + print $othermessage; + } + if (isset($total_ttc_by_line)) { + if (!$qualifiedfortotal) { + print '<strike>'; + } + print price($total_ttc_by_line); + if (!$qualifiedfortotal) { + print '</strike>'; + } + } + if ($warning) { + print ' '.img_warning($warning); } - if ($warning) print ' '.img_warning($warning); print '</td>'; - } else print '<td></td>'; + } else { + print '<td></td>'; + } // Status print '<td class="right">'; - if ($tablename == 'expensereport_det') - { + if ($tablename == 'expensereport_det') { print $expensereport->getLibStatut(5); - } elseif ($element instanceof CommonInvoice) - { + } elseif ($element instanceof CommonInvoice) { //This applies for Facture and FactureFournisseur print $element->getLibStatut(5, $element->getSommePaiement()); - } elseif ($element instanceof Task) - { - if ($element->progress != '') - { + } elseif ($element instanceof Task) { + if ($element->progress != '') { print $element->progress.' %'; } - } elseif ($tablename == 'stock_mouvement') - { + } elseif ($tablename == 'stock_mouvement') { print $element->getLibStatut(3); } else { print $element->getLibStatut(5); @@ -1279,8 +1443,7 @@ foreach ($listofreferent as $key => $value) print '</tr>'; - if ($qualifiedfortotal) - { + if ($qualifiedfortotal) { $total_ht = $total_ht + $total_ht_by_line; $total_ttc = $total_ttc + $total_ttc_by_line; @@ -1290,8 +1453,7 @@ foreach ($listofreferent as $key => $value) $total_time = $total_time + $total_time_by_line; } - if (canApplySubtotalOn($tablename)) - { + if (canApplySubtotalOn($tablename)) { $breakline = '<tr class="liste_total liste_sub_total">'; $breakline .= '<td colspan="2">'; $breakline .= '</td>'; @@ -1299,7 +1461,9 @@ foreach ($listofreferent as $key => $value) $breakline .= '</td>'; $breakline .= '<td class="right">'; $breakline .= $langs->trans('SubTotal').' : '; - if (is_object($element->thirdparty)) $breakline .= $element->thirdparty->getNomUrl(0, '', 48); + if (is_object($element->thirdparty)) { + $breakline .= $element->thirdparty->getNomUrl(0, '', 48); + } $breakline .= '</td>'; $breakline .= '<td class="right">'.price($total_ht_by_third).'</td>'; $breakline .= '<td class="right">'.price($total_ttc_by_third).'</td>'; @@ -1310,14 +1474,17 @@ foreach ($listofreferent as $key => $value) //var_dump($element->thirdparty->name.' - '.$saved_third_id.' - '.$element->thirdparty->id); } - if ($breakline) print $breakline; + if ($breakline) { + print $breakline; + } // Total $colspan = 4; - if (in_array($tablename, array('projet_task'))) $colspan = 2; + if (in_array($tablename, array('projet_task'))) { + $colspan = 2; + } print '<tr class="liste_total"><td colspan="'.$colspan.'">'.$langs->trans("Number").': '.$i.'</td>'; - if (in_array($tablename, array('projet_task'))) - { + if (in_array($tablename, array('projet_task'))) { print '<td class="center">'; print convertSecondToTime($total_time, 'allhourmin'); print '</td>'; @@ -1327,28 +1494,33 @@ foreach ($listofreferent as $key => $value) //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalHT").' : '.price($total_ht).'</td>'; //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("Total").' : '.price($total_ht).'</td>'; // If fichinter add the total_duration - if ($tablename == 'fichinter') print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>'; + if ($tablename == 'fichinter') { + print '<td class="left">'.convertSecondToTime($total_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>'; + } print '<td class="right">'; - if (empty($value['disableamount'])) - { - if ($key == 'loan') print $langs->trans("Total").' '.$langs->trans("LoanCapital").' : '.price($total_ttc); - elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) print ''.$langs->trans("TotalHT").' : '.price($total_ht); + if (empty($value['disableamount'])) { + if ($key == 'loan') { + print $langs->trans("Total").' '.$langs->trans("LoanCapital").' : '.price($total_ttc); + } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) { + print ''.$langs->trans("TotalHT").' : '.price($total_ht); + } } print '</td>'; //if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td class="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>'; //elseif (empty($value['disableamount']) && in_array($tablename, array('projet_task'))) print '<td class="right" width="100"></td>'; print '<td class="right">'; - if (empty($value['disableamount'])) - { - if ($key == 'loan') print $langs->trans("Total").' '.$langs->trans("RemainderToPay").' : '.price($total_ttc); - elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc); + if (empty($value['disableamount'])) { + if ($key == 'loan') { + print $langs->trans("Total").' '.$langs->trans("RemainderToPay").' : '.price($total_ttc); + } elseif ($tablename != 'projet_task' || !empty($conf->salaries->enabled)) { + print $langs->trans("TotalTTC").' : '.price($total_ttc); + } } print '</td>'; print '<td>&nbsp;</td>'; print '</tr>'; } else { - if (!is_array($elementarray)) // error - { + if (!is_array($elementarray)) { // error print $elementarray; } } @@ -1359,8 +1531,7 @@ foreach ($listofreferent as $key => $value) } // Enhance with select2 -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $comboenhancement = ajax_combobox('.elementselect'); @@ -1383,7 +1554,9 @@ function canApplySubtotalOn($tablename) { global $conf; - if (empty($conf->global->PROJECT_ADD_SUBTOTAL_LINES)) return false; + if (empty($conf->global->PROJECT_ADD_SUBTOTAL_LINES)) { + return false; + } return in_array($tablename, array('facture_fourn', 'commande_fournisseur')); } @@ -1400,10 +1573,8 @@ function sortElementsByClientName($elementarray) $element = new $classname($db); $clientname = array(); - foreach ($elementarray as $key => $id) // id = id of object - { - if (empty($clientname[$id])) - { + foreach ($elementarray as $key => $id) { // id = id of object + if (empty($clientname[$id])) { $element->fetch($id); $element->fetch_thirdparty(); @@ -1415,8 +1586,7 @@ function sortElementsByClientName($elementarray) asort($clientname); // sort on name $elementarray = array(); - foreach ($clientname as $id => $name) - { + foreach ($clientname as $id => $name) { $elementarray[] = $id; } diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php index bacd7607f82..d83c10ec6bd 100644 --- a/htdocs/projet/ganttchart.inc.php +++ b/htdocs/projet/ganttchart.inc.php @@ -116,12 +116,10 @@ if (g.getDivId() != null) $level = 0; $tnums = count($tasks); $old_project_id = 0; - for ($tcursor = 0; $tcursor < $tnums; $tcursor++) - { + for ($tcursor = 0; $tcursor < $tnums; $tcursor++) { $t = $tasks[$tcursor]; - if (empty($old_project_id) || $old_project_id != $t['task_project_id']) - { + if (empty($old_project_id) || $old_project_id != $t['task_project_id']) { // Break on project, create a fictive task for project id $t['task_project_id'] $projecttmp = new Project($db); $projecttmp->fetch($t['task_project_id']); @@ -140,8 +138,7 @@ if (g.getDivId() != null) $old_project_id = $t['task_project_id']; } - if ($t["task_parent"] <= 0) - { + if ($t["task_parent"] <= 0) { constructGanttLine($tasks, $t, $task_dependencies, $level, $t['task_project_id']); findChildGanttLine($tasks, $t["task_id"], $task_dependencies, $level + 1); } @@ -180,7 +177,9 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje $start_date = $task["task_start_date"]; $end_date = $task["task_end_date"]; - if (!$end_date) $end_date = $start_date; + if (!$end_date) { + $end_date = $start_date; + } $start_date = dol_print_date($start_date, $dateformatinput2); $end_date = dol_print_date($end_date, $dateformatinput2); // Resources @@ -198,8 +197,7 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje } // $depend .= "\""; // Define parent - if ($project_id && $level < 0) - { + if ($project_id && $level < 0) { $parent = '-'.$project_id; } else { $parent = $task["task_parent_alternate_id"]; @@ -208,8 +206,7 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje // Define percent $percent = $task['task_percent_complete'] ? $task['task_percent_complete'] : 0; // Link (more information) - if ($task["task_id"] < 0) - { + if ($task["task_id"] < 0) { //$link=DOL_URL_ROOT.'/projet/tasks.php?withproject=1&id='.abs($task["task_id"]); $link = ''; } else { @@ -221,8 +218,8 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje $name = $task['task_name']; /*for($i=0; $i < $level; $i++) { - $name=' - '.$name; - }*/ + $name=' - '.$name; + }*/ // Add line to gantt /* g.AddTaskItem(new JSGantt.TaskItem(1, 'Define Chart API','', '', 'ggroupblack','', 0, 'Brian', 0, 1,0,1,'','','Some Notes text',g)); @@ -247,7 +244,7 @@ function constructGanttLine($tarr, $task, $task_dependencies, $level = 0, $proje <dt>pCaption</dt><dd>(optional) caption that will be added after task bar if CaptionType set to "Caption"</dd> <dt>pNotes</dt><dd>(optional) Detailed task information that will be displayed in tool tip for this task</dd> <dt>pGantt</dt><dd>(required) javascript JSGantt.GanttChart object from which to take settings. Defaults to &quot;g&quot; for backwards compatibility</dd> - */ + */ //$note=""; @@ -289,18 +286,16 @@ function findChildGanttLine($tarr, $parent, $task_dependencies, $level) $n = count($tarr); $old_parent_id = 0; - for ($x = 0; $x < $n; $x++) - { - if ($tarr[$x]["task_parent"] == $parent && $tarr[$x]["task_parent"] != $tarr[$x]["task_id"]) - { + for ($x = 0; $x < $n; $x++) { + if ($tarr[$x]["task_parent"] == $parent && $tarr[$x]["task_parent"] != $tarr[$x]["task_id"]) { // Create a grouping parent task for the new level /*if (empty($old_parent_id) || $old_parent_id != $tarr[$x]['task_project_id']) { $tmpt = array( - 'task_id'=> -98, 'task_name'=>'Level '.$level, 'task_resources'=>'', 'task_start_date'=>'', 'task_end_date'=>'', - 'task_is_group'=>1, 'task_css'=>'ggroupblack', 'task_milestone'=> 0, 'task_parent'=>$tarr[$x]["task_parent"], 'task_notes'=>''); - constructGanttLine($tasks, $tmpt, array(), 0, $tarr[$x]['task_project_id']); - $old_parent_id = $tarr[$x]['task_project_id']; + 'task_id'=> -98, 'task_name'=>'Level '.$level, 'task_resources'=>'', 'task_start_date'=>'', 'task_end_date'=>'', + 'task_is_group'=>1, 'task_css'=>'ggroupblack', 'task_milestone'=> 0, 'task_parent'=>$tarr[$x]["task_parent"], 'task_notes'=>''); + constructGanttLine($tasks, $tmpt, array(), 0, $tarr[$x]['task_project_id']); + $old_parent_id = $tarr[$x]['task_project_id']; }*/ constructGanttLine($tarr, $tarr[$x], $task_dependencies, $level, null); diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 8b2f41554d3..c5e5b20fb88 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -43,7 +43,9 @@ $mine = ($mode == 'mine' ? 1 : 0); $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} // Security check $socid = 0; @@ -74,8 +76,7 @@ $task = new Task($db); $arrayofcss = array('/includes/jsgantt/jsgantt.css'); -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { $arrayofjs = array( '/includes/jsgantt/jsgantt.js', '/projet/jsgantt_language.js.php?lang='.$langs->defaultlang @@ -84,12 +85,13 @@ if (!empty($conf->use_javascript_ajax)) //$title=$langs->trans("Gantt").($object->ref?' - '.$object->ref.' '.$object->name:''); $title = $langs->trans("Gantt"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; llxHeader("", $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss); -if (($id > 0 && is_numeric($id)) || !empty($ref)) -{ +if (($id > 0 && is_numeric($id)) || !empty($ref)) { // To verify role of users //$userAccess = $object->restrictedProjectArea($user,'read'); $userWrite = $object->restrictedProjectArea($user, 'write'); @@ -113,17 +115,15 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -140,22 +140,19 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); @@ -165,8 +162,11 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($object->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($object->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -176,12 +176,16 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -252,8 +256,7 @@ $tasksarray = $task->getTasksArray(0, 0, ($object->id ? $object->id : $id), $soc //var_dump($tasksrole); -if (count($tasksarray) > 0) -{ +if (count($tasksarray) > 0) { // Show Gant diagram from $taskarray using JSGantt $dateformat = $langs->trans("FormatDateShortJQuery"); // Used by include ganttchart.inc.php later @@ -262,8 +265,7 @@ if (count($tasksarray) > 0) $tasks = array(); $task_dependencies = array(); $taskcursor = 0; - foreach ($tasksarray as $key => $val) // Task array are sorted by "project, position, date" - { + foreach ($tasksarray as $key => $val) { // Task array are sorted by "project, position, date" $task->fetch($val->id, ''); $idparent = ($val->fk_parent ? $val->fk_parent : '-'.$val->fk_project); // If start with -, id is a project id @@ -299,34 +301,34 @@ if (count($tasksarray) > 0) $idofusers = $task->getListContactId('internal'); $idofcontacts = $task->getListContactId('external'); - $s = ''; - if (count($idofusers) > 0) - { + $s = ''; + if (count($idofusers) > 0) { $s .= $langs->trans("Internals").': '; $i = 0; - foreach ($idofusers as $valid) - { + foreach ($idofusers as $valid) { $userstatic->fetch($valid); - if ($i) $s .= ', '; + if ($i) { + $s .= ', '; + } $s .= $userstatic->login; $i++; } } //if (count($idofusers)>0 && (count($idofcontacts)>0)) $s.=' - '; - if (count($idofcontacts) > 0) - { - if ($s) $s .= ' - '; + if (count($idofcontacts) > 0) { + if ($s) { + $s .= ' - '; + } $s .= $langs->trans("Externals").': '; $i = 0; $contactidfound = array(); - foreach ($idofcontacts as $valid) - { - if (empty($contactidfound[$valid])) - { + foreach ($idofcontacts as $valid) { + if (empty($contactidfound[$valid])) { $res = $contactstatic->fetch($valid); - if ($res > 0) - { - if ($i) $s .= ', '; + if ($res > 0) { + if ($i) { + $s .= ', '; + } $s .= $contactstatic->getFullName($langs); $contactidfound[$valid] = 1; $i++; @@ -338,30 +340,30 @@ if (count($tasksarray) > 0) /* For JSGanttImproved */ //if ($s) $tasks[$taskcursor]['task_resources']=implode(',',$idofusers); $tasks[$taskcursor]['task_resources'] = $s; - if ($s) $tasks[$taskcursor]['task_resources'] = '<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("List").'</a>'; + if ($s) { + $tasks[$taskcursor]['task_resources'] = '<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("List").'</a>'; + } //print "xxx".$val->id.$tasks[$taskcursor]['task_resources']; $tasks[$taskcursor]['note'] = $task->note_public; $taskcursor++; } // Search parent to set task_parent_alternate_id (requird by ganttchart) - foreach ($tasks as $tmpkey => $tmptask) - { - foreach ($tasks as $tmptask2) - { - if ($tmptask2['task_id'] == $tmptask['task_parent']) - { + foreach ($tasks as $tmpkey => $tmptask) { + foreach ($tasks as $tmptask2) { + if ($tmptask2['task_id'] == $tmptask['task_parent']) { $tasks[$tmpkey]['task_parent_alternate_id'] = $tmptask2['task_alternate_id']; break; } } - if (empty($tasks[$tmpkey]['task_parent_alternate_id'])) $tasks[$tmpkey]['task_parent_alternate_id'] = $tasks[$tmpkey]['task_parent']; + if (empty($tasks[$tmpkey]['task_parent_alternate_id'])) { + $tasks[$tmpkey]['task_parent_alternate_id'] = $tasks[$tmpkey]['task_parent']; + } } print "\n"; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { //var_dump($_SESSION); // How the date for data are formated (format used bu jsgantt) @@ -369,7 +371,7 @@ if (count($tasksarray) > 0) // How the date for data are formated (format used by dol_print_date) $dateformatinput2 = 'standard'; //var_dump($dateformatinput); - //var_dump($dateformatinput2); + //var_dump($dateformatinput2); $moreforfilter = '<div class="liste_titre liste_titre_bydiv centpercent">'; diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index 66b04527772..b6b4470dd15 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -17,22 +17,25 @@ // variable $listofopplabel and $listofoppstatus should be defined -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls ON p.fk_opp_status = cls.rowid"; // If lead status has been removed, we must show it in stats as unknown $sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " AND p.fk_statut = 1"; // Opend projects only - if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; - if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + if ($mine || empty($user->rights->projet->all->lire)) { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; + } + if ($socid > 0) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; + } $sql .= " GROUP BY p.fk_opp_status, cls.code"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; + $total = 0; $totalnb = 0; $totaloppnb = 0; $totalamount = 0; @@ -41,15 +44,15 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $valsamount = array(); $dataseries = array(); // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $valsnb[$obj->opp_status] = $obj->nb; $valsamount[$obj->opp_status] = $obj->opp_amount; $totalnb += $obj->nb; - if ($obj->opp_status) $totaloppnb += $obj->nb; + if ($obj->opp_status) { + $totaloppnb += $obj->nb; + } if (!in_array($obj->code, array('WON', 'LOST'))) { $totalamount += $obj->opp_amount; $ponderated_opp_amount += $obj->ponderated_opp_amount; @@ -63,40 +66,43 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $ponderated_opp_amount = $ponderated_opp_amount / 100; print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("OpportunitiesStatusForOpenedProjects").'</th></tr>'."\n"; + print '<table class="noborder nohover centpercent">'; + print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("OpportunitiesStatusForOpenedProjects").'</th></tr>'."\n"; - $listofstatus = array_keys($listofoppstatus); + $listofstatus = array_keys($listofoppstatus); // Complete with values found into database and not into the dictionary - foreach ($valsamount as $key => $val) { - if (!in_array($key, $listofstatus) && $key) { - $listofstatus[] = $key; - } - } + foreach ($valsamount as $key => $val) { + if (!in_array($key, $listofstatus) && $key) { + $listofstatus[] = $key; + } + } - foreach ($listofstatus as $status) - { - $labelStatus = ''; + foreach ($listofstatus as $status) { + $labelStatus = ''; $code = dol_getIdFromCode($db, $status, 'c_lead_status', 'rowid', 'code'); - if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code); - if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; - if (empty($labelStatus)) $labelStatus = $langs->transnoentitiesnoconv('OldValue', $status); // When id is id of an entry no more in dictionary for example. + if ($code) { + $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code); + } + if (empty($labelStatus)) { + $labelStatus = $listofopplabel[$status]; + } + if (empty($labelStatus)) { + $labelStatus = $langs->transnoentitiesnoconv('OldValue', $status); // When id is id of an entry no more in dictionary for example. + } //$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')'; //$labelStatus .= ' - '.price2num($listofoppstatus[$status]).'%'; $dataseries[] = array($labelStatus, (isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); - if (!$conf->use_javascript_ajax) - { + if (!$conf->use_javascript_ajax) { print '<tr class="oddeven">'; print '<td>'.$labelStatus.'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr><td class="center nopaddingleftimp nopaddingrightimp" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index f2b1820c019..d8c875d2933 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -42,13 +42,19 @@ $langs->loadLangs(array('projects', 'companies')); $action = GETPOST('action', 'aZ09'); $search_project_user = GETPOST('search_project_user', 'int'); $mine = GETPOST('mode', 'aZ09') == 'mine' ? 1 : 0; -if ($mine == 0 && $search_project_user === '') $search_project_user = $user->conf->MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX; -if ($search_project_user == $user->id) $mine = 1; +if ($mine == 0 && $search_project_user === '') { + $search_project_user = (empty($user->conf->MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX) ? '' : $user->conf->MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX); +} +if ($search_project_user == $user->id) { + $mine = 1; +} // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); @@ -62,7 +68,9 @@ $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'refresh_search_project_user') { $search_project_user = GETPOST('search_project_user', 'int'); @@ -87,16 +95,24 @@ $projectset = ($mine ? $mine : (empty($user->rights->projet->all->lire) ? 0 : 2) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projectset, 1); //var_dump($projectsListId); -llxHeader("", $langs->trans("Projects"), "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"); -$title = $langs->trans("ProjectsArea"); +$title = $langs->trans('ProjectsArea'); + +$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte'; + +llxHeader('', $title, $help_url); + + //if ($mine) $title=$langs->trans("MyProjectsArea"); // Title for combo list see all projects $titleall = $langs->trans("AllAllowedProjects"); -if (!empty($user->rights->projet->all->lire) && !$socid) $titleall = $langs->trans("AllProjects"); -else $titleall = $langs->trans("AllAllowedProjects").'<br><br>'; +if (!empty($user->rights->projet->all->lire) && !$socid) { + $titleall = $langs->trans("AllProjects"); +} else { + $titleall = $langs->trans("AllAllowedProjects").'<br><br>'; +} $morehtml = ''; $morehtml .= '<form name="projectform" method="POST">'; @@ -109,29 +125,31 @@ $morehtml .= '</SELECT>'; $morehtml .= '<input type="submit" class="button smallpaddingimp" name="refresh" value="'.$langs->trans("Refresh").'">'; $morehtml .= '</form>'; -if ($mine) $tooltiphelp = $langs->trans("MyProjectsDesc"); -else { - if (!empty($user->rights->projet->all->lire) && !$socid) $tooltiphelp = $langs->trans("ProjectsDesc"); - else $tooltiphelp = $langs->trans("ProjectsPublicDesc"); +if ($mine) { + $tooltiphelp = $langs->trans("MyProjectsDesc"); +} else { + if (!empty($user->rights->projet->all->lire) && !$socid) { + $tooltiphelp = $langs->trans("ProjectsDesc"); + } else { + $tooltiphelp = $langs->trans("ProjectsPublicDesc"); + } } print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); // Get list of ponderated percent and colors for each status -include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; +include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; $listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array(); $colorseries = array(); $sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label"; $sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls"; $sql .= " WHERE active=1"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); $listofoppstatus[$objp->rowid] = $objp->percent; $listofopplabel[$objp->rowid] = $objp->label; @@ -161,45 +179,14 @@ if ($resql) } $i++; } -} else dol_print_error($db); +} else { + dol_print_error($db); +} //var_dump($listofoppcode); print '<div class="fichecenter"><div class="fichethirdleft">'; - -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - // Search project - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) - { - $listofsearchfields['search_project'] = array('text'=>'Project'); - } - - if (count($listofsearchfields)) - { - print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; - print '<tr>'; - print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; - if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; - print '</tr>'; - $i++; - } - print '</table>'; - print '</div>'; - print '</form>'; - print '<br>'; - } -} - - /* * Statistics */ @@ -222,14 +209,17 @@ $sql .= ", s.canvas, s.status as thirdpartystatus"; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " WHERE p.entity IN (".getEntity('project').")"; -if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2 -if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; +if ($mine || empty($user->rights->projet->all->lire)) { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // If we have this test true, it also means projectset is not 2 +} +if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; +} $sql .= " ORDER BY p.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; @@ -238,11 +228,9 @@ if ($resql) $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -290,8 +278,7 @@ if ($resql) print '</td>'; print '<td class="nowrap">'; - if ($companystatic->id > 0) - { + if ($companystatic->id > 0) { print $companystatic->getNomUrl(1, 'company', 16); } print '</td>'; @@ -304,7 +291,9 @@ if ($resql) print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; } print "</table></div>"; -} else dol_print_error($db); +} else { + dol_print_error($db); +} $companystatic = new Societe($db); // We need a clean new object for next loop because current one has some properties set. @@ -320,15 +309,18 @@ $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " WHERE p.entity IN (".getEntity('project').")"; $sql .= " AND p.fk_statut = 1"; -if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2 -if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; +if ($mine || empty($user->rights->projet->all->lire)) { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // If we have this test true, it also means projectset is not 2 +} +if ($socid > 0) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; +} $sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur, s.logo, s.email, s.entity, s.canvas, s.status"; $sql .= $db->order($sortfield, $sortorder); //$sql .= $db->plimit($max + 1, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; $othernb = 0; @@ -345,8 +337,7 @@ if ($resql) print "</tr>\n"; } - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); if ($i >= $max) { @@ -357,8 +348,7 @@ if ($resql) print '<tr class="oddeven">'; print '<td class="nowraponall tdoverflowmax100">'; - if ($obj->socid > 0) - { + if ($obj->socid > 0) { $companystatic->id = $obj->socid; $companystatic->name = $obj->name; $companystatic->name_alias = $obj->name_alias; @@ -380,8 +370,11 @@ if ($resql) } print '</td>'; print '<td class="right">'; - if ($obj->socid) print '<a href="'.DOL_URL_ROOT.'/projet/list.php?socid='.$obj->socid.'&search_status=1">'.$obj->nb.'</a>'; - else print '<a href="'.DOL_URL_ROOT.'/projet/list.php?search_societe='.urlencode('^$').'&search_status=1">'.$obj->nb.'</a>'; + if ($obj->socid) { + print '<a href="'.DOL_URL_ROOT.'/projet/list.php?socid='.$obj->socid.'&search_status=1">'.$obj->nb.'</a>'; + } else { + print '<a href="'.DOL_URL_ROOT.'/projet/list.php?search_societe='.urlencode('^$').'&search_status=1">'.$obj->nb.'</a>'; + } print '</td>'; print "</tr>\n"; @@ -408,8 +401,7 @@ if ($resql) dol_print_error($db); } -if (empty($conf->global->PROJECT_HIDE_PROJECT_LIST_ON_PROJECT_AREA)) -{ +if (empty($conf->global->PROJECT_HIDE_PROJECT_LIST_ON_PROJECT_AREA)) { // This list can be very long, so we allow to hide it to prefer to use the list page. // Add constant PROJECT_HIDE_PROJECT_LIST_ON_PROJECT_AREA to hide this list diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index e87aa25dadb..b8c6ae046cf 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -42,16 +42,21 @@ $sortorder = GETPOST("sortorder", 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $page = is_numeric($page) ? $page : 0; $page = $page == -1 ? 0 : $page; -if (!$sortfield) $sortfield = "a.datep,a.id"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "a.datep,a.id"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -63,7 +68,9 @@ $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. $result = restrictedArea($user, 'projet', $id, 'projet&project'); -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} @@ -73,11 +80,12 @@ if (!$user->rights->projet->lire) accessforbidden(); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} // 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 -{ +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 $actioncode = ''; $search_agenda_label = ''; } @@ -91,16 +99,19 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $form = new Form($db); $object = new Project($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $object->info($object->id); } $title = $langs->trans("Project").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; llxHeader("", $title, $help_url); @@ -117,17 +128,15 @@ $morehtmlref = '<div class="refidno">'; // Title $morehtmlref .= $object->title; // Thirdparty -if ($object->thirdparty->id > 0) -{ +if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. -if (!$user->rights->projet->all->lire) -{ +if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -149,29 +158,30 @@ print dol_get_fiche_end(); $out = ''; $permok = $user->rights->agenda->myactions->create; -if ($permok) -{ +if ($permok) { $out .= '&projectid='.$object->id; } //print '<div class="tabsAction">'; $morehtmlcenter = ''; -if (!empty($conf->agenda->enabled)) -{ +if (!empty($conf->agenda->enabled)) { $addActionBtnRight = !empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create); - $morehtmlcenter .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'&socid='.$object->socid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $addActionBtnRight); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'&socid='.$object->socid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $addActionBtnRight); } //print '</div>'; -if (!empty($object->id)) -{ +if (!empty($object->id)) { print '<br>'; $param = '&id='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print_barre_liste($langs->trans("ActionsOnProject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); diff --git a/htdocs/projet/jsgantt_language.js.php b/htdocs/projet/jsgantt_language.js.php index 41fcd1934ae..35ab1132ae7 100644 --- a/htdocs/projet/jsgantt_language.js.php +++ b/htdocs/projet/jsgantt_language.js.php @@ -20,13 +20,27 @@ * \brief Fichier de javascript de traduction pour JSGantt */ -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -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('NOCSRFCHECK')) { + define('NOCSRFCHECK', 1); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', 1); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', 1); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require_once __DIR__.'/../main.inc.php'; @@ -40,20 +54,22 @@ $langs->load("projects"); var vLangs={'<?php print $langs->getDefaultLang(1); ?>': { 'format':'<?php print $langs->transnoentities('Period'); ?>','hour':'"<?php print $langs->transnoentities('Hour'); ?>','day':'<?php print $langs->transnoentities('Day'); ?>', - 'week':'<?php print $langs->transnoentities('Week'); ?>','month':'<?php print $langs->transnoentities('Month'); ?>','quarter':'<?php print $langs->transnoentities('Quadri'); ?>', - 'hours':'<?php print $langs->transnoentities('Hours'); ?>','days':'<?php print $langs->transnoentities('Days'); ?>','weeks':'<?php print $langs->transnoentities('Weeks'); ?>', - 'months':'<?php print $langs->transnoentities('Months'); ?>','quarters':'<?php print $langs->transnoentities('Quadri'); ?>','hr':'Hr','dy':'<?php print $langs->transnoentities('Day'); ?>','wk':'<?php print $langs->transnoentities('Week'); ?>','mth':'<?php print $langs->transnoentities('Month'); ?>','qtr':'<?php print $langs->transnoentities('Quadri'); ?>','hrs':'<?php print $langs->transnoentities('Hours'); ?>', - 'dys':'<?php print $langs->transnoentities('Days'); ?>','wks':'<?php print $langs->transnoentities('Weeks'); ?>','mths':'<?php print $langs->transnoentities('Months'); ?>','qtrs':'<?php print $langs->transnoentities('Quadri'); ?>','resource':'<?php print dol_escape_js($langs->transnoentities('Resource')); ?>','duration':'<?php print dol_escape_js($langs->transnoentities('Duration')); ?>','comp':'%', - 'completion':'<?php print $langs->transnoentities('Total'); ?>','startdate':'<?php print $langs->transnoentities('DateStart'); ?>','enddate':'<?php print $langs->transnoentities('DateEnd'); ?>','moreinfo':'<?php print dol_escape_js($langs->transnoentities('ShowTask')); ?>', - 'notes':'<?php print $langs->transnoentities('NotePublic'); ?>', - 'january':'<?php print $langs->transnoentities('January'); ?>','february':'<?php print $langs->transnoentities('February'); ?>','march':'<?php print $langs->transnoentities('March'); ?>','april':'<?php print $langs->transnoentities('April'); ?>','maylong':'<?php print $langs->transnoentities('May'); ?>','june':'<?php print $langs->transnoentities('June'); ?>','july':'<?php print $langs->transnoentities('July'); ?>', - 'august':'<?php print $langs->transnoentities('August'); ?>','september':'<?php print $langs->transnoentities('September'); ?>','october':'<?php print $langs->transnoentities('October'); ?>','november':'<?php print $langs->transnoentities('November'); ?>','december':'<?php print $langs->transnoentities('December'); ?>', - 'jan':'<?php print $langs->transnoentities('MonthShort01'); ?>','feb':'<?php print $langs->transnoentities('MonthShort02'); ?>','mar':'<?php print $langs->transnoentities('MonthShort03'); ?>','apr':'<?php print $langs->transnoentities('MonthShort04'); ?>','may':'<?php print $langs->transnoentities('MonthShort05'); ?>','jun':'<?php print $langs->transnoentities('MonthShort06'); ?>','jul':'<?php print $langs->transnoentities('MonthShort07'); ?>', - 'aug':'<?php print $langs->transnoentities('MonthShort08'); ?>','sep':'<?php print $langs->transnoentities('MonthShort09'); ?>','oct':'<?php print $langs->transnoentities('MonthShort10'); ?>','nov':'<?php print $langs->transnoentities('MonthShort11'); ?>','dec':'<?php print $langs->transnoentities('MonthShort12'); ?>', - 'sunday':'<?php print $langs->transnoentities('Sunday'); ?>','monday':'<?php print $langs->transnoentities('Monday'); ?>','tuesday':'<?php print $langs->transnoentities('Tuesday'); ?>','wednesday':'<?php print $langs->transnoentities('Wednesday'); ?>','thursday':'<?php print $langs->transnoentities('Thursday'); ?>','friday':'<?php print $langs->transnoentities('Friday'); ?>','saturday':'<?php print $langs->transnoentities('Saturday'); ?>', - 'sun':'<?php print $langs->transnoentities('SundayMin'); ?>','mon':'<?php print $langs->transnoentities('MondayMin'); ?>','tue':'<?php print $langs->transnoentities('TuesdayMin'); ?>','wed':'<?php print $langs->transnoentities('WednesdayMin'); ?>','thu':'<?php print $langs->transnoentities('ThursdayMin'); ?>','fri':'<?php print $langs->transnoentities('FridayMin'); ?>','sat':'<?php print $langs->transnoentities('SaturdayMin'); ?>' - } + 'week':'<?php print $langs->transnoentities('Week'); ?>','month':'<?php print $langs->transnoentities('Month'); ?>','quarter':'<?php print $langs->transnoentities('Quadri'); ?>', + 'hours':'<?php print $langs->transnoentities('Hours'); ?>','days':'<?php print $langs->transnoentities('Days'); ?>','weeks':'<?php print $langs->transnoentities('Weeks'); ?>', + 'months':'<?php print $langs->transnoentities('Months'); ?>','quarters':'<?php print $langs->transnoentities('Quadri'); ?>','hr':'Hr','dy':'<?php print $langs->transnoentities('Day'); ?>','wk':'<?php print $langs->transnoentities('Week'); ?>','mth':'<?php print $langs->transnoentities('Month'); ?>','qtr':'<?php print $langs->transnoentities('Quadri'); ?>','hrs':'<?php print $langs->transnoentities('Hours'); ?>', + 'dys':'<?php print $langs->transnoentities('Days'); ?>','wks':'<?php print $langs->transnoentities('Weeks'); ?>','mths':'<?php print $langs->transnoentities('Months'); ?>','qtrs':'<?php print $langs->transnoentities('Quadri'); ?>','resource':'<?php print dol_escape_js($langs->transnoentities('Resource')); ?>','duration':'<?php print dol_escape_js($langs->transnoentities('Duration')); ?>','comp':'%', + 'completion':'<?php print $langs->transnoentities('Total'); ?>','startdate':'<?php print $langs->transnoentities('DateStart'); ?>','enddate':'<?php print $langs->transnoentities('DateEnd'); ?>','moreinfo':'<?php print dol_escape_js($langs->transnoentities('ShowTask')); ?>', + 'notes':'<?php print $langs->transnoentities('NotePublic'); ?>', + 'january':'<?php print $langs->transnoentities('January'); ?>','february':'<?php print $langs->transnoentities('February'); ?>','march':'<?php print $langs->transnoentities('March'); ?>','april':'<?php print $langs->transnoentities('April'); ?>','maylong':'<?php print $langs->transnoentities('May'); ?>','june':'<?php print $langs->transnoentities('June'); ?>','july':'<?php print $langs->transnoentities('July'); ?>', + 'august':'<?php print $langs->transnoentities('August'); ?>','september':'<?php print $langs->transnoentities('September'); ?>','october':'<?php print $langs->transnoentities('October'); ?>','november':'<?php print $langs->transnoentities('November'); ?>','december':'<?php print $langs->transnoentities('December'); ?>', + 'jan':'<?php print $langs->transnoentities('MonthShort01'); ?>','feb':'<?php print $langs->transnoentities('MonthShort02'); ?>','mar':'<?php print $langs->transnoentities('MonthShort03'); ?>','apr':'<?php print $langs->transnoentities('MonthShort04'); ?>','may':'<?php print $langs->transnoentities('MonthShort05'); ?>','jun':'<?php print $langs->transnoentities('MonthShort06'); ?>','jul':'<?php print $langs->transnoentities('MonthShort07'); ?>', + 'aug':'<?php print $langs->transnoentities('MonthShort08'); ?>','sep':'<?php print $langs->transnoentities('MonthShort09'); ?>','oct':'<?php print $langs->transnoentities('MonthShort10'); ?>','nov':'<?php print $langs->transnoentities('MonthShort11'); ?>','dec':'<?php print $langs->transnoentities('MonthShort12'); ?>', + 'sunday':'<?php print $langs->transnoentities('Sunday'); ?>','monday':'<?php print $langs->transnoentities('Monday'); ?>','tuesday':'<?php print $langs->transnoentities('Tuesday'); ?>','wednesday':'<?php print $langs->transnoentities('Wednesday'); ?>','thursday':'<?php print $langs->transnoentities('Thursday'); ?>','friday':'<?php print $langs->transnoentities('Friday'); ?>','saturday':'<?php print $langs->transnoentities('Saturday'); ?>', + 'sun':'<?php print $langs->transnoentities('SundayMin'); ?>','mon':'<?php print $langs->transnoentities('MondayMin'); ?>','tue':'<?php print $langs->transnoentities('TuesdayMin'); ?>','wed':'<?php print $langs->transnoentities('WednesdayMin'); ?>','thu':'<?php print $langs->transnoentities('ThursdayMin'); ?>','fri':'<?php print $langs->transnoentities('FridayMin'); ?>','sat':'<?php print $langs->transnoentities('SaturdayMin'); ?>' + } }; var vLang='<?php print $langs->getDefaultLang(1); ?>'; <?php -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 4438a9ce217..a9f17f5439b 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -35,14 +35,16 @@ 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.'/core/class/html.formprojet.class.php'; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcategory.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } // Load translation files required by the page $langs->loadLangs(array('projects', 'companies', 'commercial')); +if ($conf->eventorganization->enabled) { + $langs->loadLangs(array('eventorganization')); +} $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -56,13 +58,14 @@ $title = $langs->trans("Projects"); // Security check $socid = (is_numeric($_GET["socid"]) ? $_GET["socid"] : 0); //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if ($socid > 0) -{ +if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); $title .= ' (<a href="list.php">'.$soc->name.'</a>)'; } -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $diroutputmassaction = $conf->projet->dir_output.'/temp/massgeneration/'.$user->id; @@ -70,9 +73,15 @@ $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 < 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 -if (!$sortfield) $sortfield = "p.ref"; -if (!$sortorder) $sortorder = "ASC"; +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 +if (!$sortfield) { + $sortfield = "p.ref"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -92,10 +101,17 @@ $search_sale = GETPOST('search_sale', 'int'); $search_usage_opportunity = GETPOST('search_usage_opportunity', 'int'); $search_usage_task = GETPOST('search_usage_task', 'int'); $search_usage_bill_time = GETPOST('search_usage_bill_time', 'int'); +$search_usage_event_organization = GETPOST('search_usage_event_organization', 'int'); +$search_accept_conference_suggestions = GETPOST('search_accept_conference_suggestions', 'int'); +$search_accept_booth_suggestions = GETPOST('search_accept_booth_suggestions', 'int'); +$search_price_registration = GETPOST("search_price_registration", 'alpha'); +$search_price_booth = GETPOST("search_price_booth", 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; -if ($mine) { $search_project_user = $user->id; $mine = 0; } +if ($mine) { + $search_project_user = $user->id; $mine = 0; +} $search_sday = GETPOST('search_sday', 'int'); $search_smonth = GETPOST('search_smonth', 'int'); @@ -104,10 +120,11 @@ $search_eday = GETPOST('search_eday', 'int'); $search_emonth = GETPOST('search_emonth', 'int'); $search_eyear = GETPOST('search_eyear', 'int'); -if ($search_status == '') $search_status = -1; // -1 or 1 +if ($search_status == '') { + $search_status = -1; // -1 or 1 +} -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); } @@ -171,21 +188,25 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_all = ''; $search_ref = ""; $search_label = ""; @@ -207,6 +228,11 @@ if (empty($reshook)) $search_usage_opportunity = ''; $search_usage_task = ''; $search_usage_bill_time = ''; + $search_usage_event_organization = ''; + $search_accept_conference_suggestions = ''; + $search_accept_booth_suggestions = ''; + $search_price_registration = ''; + $search_price_booth = ''; $toselect = ''; $search_array_options = array(); $search_category_array = array(); @@ -218,21 +244,19 @@ if (empty($reshook)) $objectlabel = 'Project'; $permissiontoread = $user->rights->projet->lire; $permissiontodelete = $user->rights->projet->supprimer; + $permissiontoadd = $user->rights->projet->creer; $uploaddir = $conf->projet->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // Close records - if (!$error && $massaction == 'close' && $user->rights->projet->creer) - { + if (!$error && $massaction == 'close' && $user->rights->projet->creer) { $db->begin(); $objecttmp = new $objectclass($db); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $userWrite = $object->restrictedProjectArea($user, 'write'); if ($userWrite > 0 && $objecttmp->statut == 1) { $result = $objecttmp->setClose($user); @@ -240,7 +264,9 @@ if (empty($reshook)) setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } elseif ($userWrite <= 0) { setEventMessages($langs->trans("DontHavePermissionForCloseProject", $objecttmp->ref), null, 'warnings'); } else { @@ -253,10 +279,12 @@ if (empty($reshook)) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsClosed", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsClosed", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsClosed", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsClosed", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -280,7 +308,9 @@ $title = $langs->trans("Projects"); // Get list of project id allowed to user (in a string list separated by comma) $projectsListId = ''; -if (!$user->rights->projet->all->lire) $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid); +if (!$user->rights->projet->all->lire) { + $projectsListId = $object->getProjectsAuthorizedForUser($user, 0, 1, $socid); +} // Get id of types of contacts for projects (This list never contains a lot of elements) $listofprojectcontacttype = array(); @@ -288,23 +318,29 @@ $sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc" $sql .= " WHERE ctc.element = '".$db->escape($object->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); -if ($resql) -{ - while ($obj = $db->fetch_object($resql)) - { +if ($resql) { + while ($obj = $db->fetch_object($resql)) { $listofprojectcontacttype[$obj->rowid] = $obj->code; } -} else dol_print_error($db); -if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; // To avoid sql syntax error if not found +} else { + dol_print_error($db); +} +if (count($listofprojectcontacttype) == 0) { + $listofprojectcontacttype[0] = '0'; // To avoid sql syntax error if not found +} $distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once. $sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat"; -$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount, p.usage_opportunity, p.usage_task, p.usage_bill_time"; +$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount "; +$sql .= ", p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event"; +$sql .= ", accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth"; $sql .= ", s.rowid as socid, s.nom as name, s.email"; $sql .= ", cls.code as opp_status_code"; // 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(); @@ -312,62 +348,121 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p"; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterJoinQuery(Categorie::TYPE_PROJECT, "p.rowid"); } -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)"; +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."societe as s on p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; // We'll need this table joined to the select in order to filter by sale // No check is done on company permission because readability is managed by public status of project and assignement. //if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; -if ($search_sale > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; -if ($search_project_user > 0) -{ +if ($search_sale > 0) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; +} +if ($search_project_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as ecp"; } $sql .= " WHERE p.entity IN (".getEntity('project').')'; -if (!empty($conf->categorie->enabled)) -{ +if (!empty($conf->categorie->enabled)) { $sql .= Categorie::getFilterSelectQuery(Categorie::TYPE_PROJECT, "p.rowid", $search_category_array); } -if (!$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users +if (!$user->rights->projet->all->lire) { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // public and assigned to, or restricted to company for external users +} // No need to check if company is external user, as filtering of projects must be done by getProjectsAuthorizedForUser -if ($socid > 0) $sql .= " AND (p.fk_soc = ".$socid.")"; // This filter if when we use a hard coded filter on company on url (not related to filter for external users) -if ($search_ref) $sql .= natural_search('p.ref', $search_ref); -if ($search_label) $sql .= natural_search('p.title', $search_label); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); -if ($search_opp_amount) $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); -if ($search_opp_percent) $sql .= natural_search('p.opp_percent', $search_opp_percent, 1); +if ($socid > 0) { + $sql .= " AND (p.fk_soc = ".((int) $socid).")"; // This filter if when we use a hard coded filter on company on url (not related to filter for external users) +} +if ($search_ref) { + $sql .= natural_search('p.ref', $search_ref); +} +if ($search_label) { + $sql .= natural_search('p.title', $search_label); +} +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} +if ($search_opp_amount) { + $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); +} +if ($search_opp_percent) { + $sql .= natural_search('p.opp_percent', $search_opp_percent, 1); +} $sql .= dolSqlDateFilter('p.dateo', $search_sday, $search_smonth, $search_syear); $sql .= dolSqlDateFilter('p.datee', $search_eday, $search_emonth, $search_eyear); -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); -if ($search_status >= 0) -{ - if ($search_status == 99) $sql .= " AND p.fk_statut <> 2"; - else $sql .= " AND p.fk_statut = ".$db->escape($search_status); +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -if ($search_opp_status) -{ - if (is_numeric($search_opp_status) && $search_opp_status > 0) $sql .= " AND p.fk_opp_status = ".$db->escape($search_opp_status); - if ($search_opp_status == 'all') $sql .= " AND (p.fk_opp_status IS NOT NULL AND p.fk_opp_status <> -1)"; - if ($search_opp_status == 'openedopp') $sql .= " AND p.fk_opp_status IS NOT NULL AND p.fk_opp_status <> -1 AND p.fk_opp_status NOT IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON','LOST'))"; - if ($search_opp_status == 'notopenedopp') $sql .= " AND (p.fk_opp_status IS NULL OR p.fk_opp_status = -1 OR p.fk_opp_status IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON')))"; - if ($search_opp_status == 'none') $sql .= " AND (p.fk_opp_status IS NULL OR p.fk_opp_status = -1)"; +if ($search_status >= 0) { + if ($search_status == 99) { + $sql .= " AND p.fk_statut <> 2"; + } else { + $sql .= " AND p.fk_statut = ".$db->escape($search_status); + } +} +if ($search_opp_status) { + if (is_numeric($search_opp_status) && $search_opp_status > 0) { + $sql .= " AND p.fk_opp_status = ".$db->escape($search_opp_status); + } + if ($search_opp_status == 'all') { + $sql .= " AND (p.fk_opp_status IS NOT NULL AND p.fk_opp_status <> -1)"; + } + if ($search_opp_status == 'openedopp') { + $sql .= " AND p.fk_opp_status IS NOT NULL AND p.fk_opp_status <> -1 AND p.fk_opp_status NOT IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON','LOST'))"; + } + if ($search_opp_status == 'notopenedopp') { + $sql .= " AND (p.fk_opp_status IS NULL OR p.fk_opp_status = -1 OR p.fk_opp_status IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code = 'WON'))"; + } + if ($search_opp_status == 'none') { + $sql .= " AND (p.fk_opp_status IS NULL OR p.fk_opp_status = -1)"; + } +} +if ($search_public != '') { + $sql .= " AND p.public = ".$db->escape($search_public); } -if ($search_public != '') $sql .= " AND p.public = ".$db->escape($search_public); // For external user, no check is done on company permission because readability is managed by public status of project and assignement. -//if ($socid > 0) $sql.= " AND s.rowid = ".$socid; -if ($search_sale > 0) $sql .= " AND sc.fk_user = ".$search_sale; +//if ($socid > 0) $sql.= " AND s.rowid = ".((int) $socid); +if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); +} // No check is done on company permission because readability is managed by public status of project and assignement. //if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))"; -if ($search_project_user > 0) $sql .= " AND ecp.fk_c_type_contact IN (".join(',', array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user; -if ($search_opp_amount != '') $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); -if ($search_budget_amount != '') $sql .= natural_search('p.budget_amount', $search_budget_amount, 1); -if ($search_usage_opportunity != '' && $search_usage_opportunity >= 0) $sql .= natural_search('p.usage_opportunity', $search_usage_opportunity, 2); -if ($search_usage_task != '' && $search_usage_task >= 0) $sql .= natural_search('p.usage_task', $search_usage_task, 2); -if ($search_usage_bill_time != '' && $search_usage_bill_time >= 0) $sql .= natural_search('p.usage_bill_time', $search_usage_bill_time, 2); +if ($search_project_user > 0) { + $sql .= " AND ecp.fk_c_type_contact IN (".$db->sanitize(join(',', array_keys($listofprojectcontacttype))).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user; +} +if ($search_opp_amount != '') { + $sql .= natural_search('p.opp_amount', $search_opp_amount, 1); +} +if ($search_budget_amount != '') { + $sql .= natural_search('p.budget_amount', $search_budget_amount, 1); +} +if ($search_usage_opportunity != '' && $search_usage_opportunity >= 0) { + $sql .= natural_search('p.usage_opportunity', $search_usage_opportunity, 2); +} +if ($search_usage_task != '' && $search_usage_task >= 0) { + $sql .= natural_search('p.usage_task', $search_usage_task, 2); +} +if ($search_usage_bill_time != '' && $search_usage_bill_time >= 0) { + $sql .= natural_search('p.usage_bill_time', $search_usage_bill_time, 2); +} +if ($search_usage_event_organization != '' && $search_usage_event_organization >= 0) { + $sql .= natural_search('p.usage_organize_event', $search_usage_event_organization, 2); +} +if ($search_accept_conference_suggestions != '' && $search_accept_conference_suggestions >= 0) { + $sql .= natural_search('p.accept_conference_suggestions', $search_accept_conference_suggestions, 2); +} +if ($search_accept_booth_suggestions != '' && $search_accept_booth_suggestions >= 0) { + $sql .= natural_search('p.accept_booth_suggestions', $search_accept_booth_suggestions, 2); +} +if ($search_price_registration != '') { + $sql .= natural_search('p.price_registration', $search_price_registration, 1); +} +if ($search_price_booth != '') { + $sql .= natural_search('p.price_booth', $search_price_booth, 1); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -390,7 +485,9 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); if (!$resql) { @@ -402,8 +499,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($resql); header("Location: ".DOL_URL_ROOT.'/projet/card.php?id='.$obj->id); exit; @@ -420,51 +516,131 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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_all != '') $param .= '&search_all='.urlencode($search_all); -if ($search_sday) $param .= '&search_sday='.urlencode($search_sday); -if ($search_smonth) $param .= '&search_smonth='.urlencode($search_smonth); -if ($search_syear) $param .= '&search_syear='.urlencode($search_syear); -if ($search_eday) $param .= '&search_eday='.urlencode($search_eday); -if ($search_emonth) $param .= '&search_emonth='.urlencode($search_emonth); -if ($search_eyear) $param .= '&search_eyear='.urlencode($search_eyear); -if ($socid) $param .= '&socid='.urlencode($socid); -if ($search_categ) $param .= '&search_categ='.urlencode($search_categ); -if ($search_ref != '') $param .= '&search_ref='.urlencode($search_ref); -if ($search_label != '') $param .= '&search_label='.urlencode($search_label); -if ($search_societe != '') $param .= '&search_societe='.urlencode($search_societe); -if ($search_status >= 0) $param .= '&search_status='.urlencode($search_status); -if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all', 'openedopp', 'notopenedopp', 'none'))) $param .= '&search_opp_status='.urlencode($search_opp_status); -if ($search_opp_percent != '') $param .= '&search_opp_percent='.urlencode($search_opp_percent); -if ($search_public != '') $param .= '&search_public='.urlencode($search_public); -if ($search_project_user != '') $param .= '&search_project_user='.urlencode($search_project_user); -if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); -if ($search_opp_amount != '') $param .= '&search_opp_amount='.urlencode($search_opp_amount); -if ($search_budget_amount != '') $param .= '&search_budget_amount='.urlencode($search_budget_amount); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($search_all != '') { + $param .= '&search_all='.urlencode($search_all); +} +if ($search_sday) { + $param .= '&search_sday='.urlencode($search_sday); +} +if ($search_smonth) { + $param .= '&search_smonth='.urlencode($search_smonth); +} +if ($search_syear) { + $param .= '&search_syear='.urlencode($search_syear); +} +if ($search_eday) { + $param .= '&search_eday='.urlencode($search_eday); +} +if ($search_emonth) { + $param .= '&search_emonth='.urlencode($search_emonth); +} +if ($search_eyear) { + $param .= '&search_eyear='.urlencode($search_eyear); +} +if ($socid) { + $param .= '&socid='.urlencode($socid); +} +if ($search_categ) { + $param .= '&search_categ='.urlencode($search_categ); +} +if ($search_ref != '') { + $param .= '&search_ref='.urlencode($search_ref); +} +if ($search_label != '') { + $param .= '&search_label='.urlencode($search_label); +} +if ($search_societe != '') { + $param .= '&search_societe='.urlencode($search_societe); +} +if ($search_status >= 0) { + $param .= '&search_status='.urlencode($search_status); +} +if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all', 'openedopp', 'notopenedopp', 'none'))) { + $param .= '&search_opp_status='.urlencode($search_opp_status); +} +if ($search_opp_percent != '') { + $param .= '&search_opp_percent='.urlencode($search_opp_percent); +} +if ($search_public != '') { + $param .= '&search_public='.urlencode($search_public); +} +if ($search_project_user != '') { + $param .= '&search_project_user='.urlencode($search_project_user); +} +if ($search_sale > 0) { + $param .= '&search_sale='.urlencode($search_sale); +} +if ($search_opp_amount != '') { + $param .= '&search_opp_amount='.urlencode($search_opp_amount); +} +if ($search_budget_amount != '') { + $param .= '&search_budget_amount='.urlencode($search_budget_amount); +} +if ($search_usage_task != '') { + $param .= '&search_usage_task='.urlencode($search_usage_task); +} +if ($search_usage_bill_time != '') { + $param .= '&search_usage_opportunity='.urlencode($search_usage_bill_time); +} +if ($search_usage_event_organization != '') { + $param .= '&search_usage_event_organization='.urlencode($search_usage_event_organization); +} +if ($search_accept_conference_suggestions != '') { + $param .= '&search_accept_conference_suggestions='.urlencode($search_accept_conference_suggestions); +} +if ($search_accept_booth_suggestions != '') { + $param .= '&search_accept_booth_suggestions='.urlencode($search_accept_booth_suggestions); +} +if ($search_price_registration != '') { + $param .= '&search_price_registration='.urlencode($search_price_registration); +} +if ($search_price_booth != '') { + $param .= '&search_price_booth='.urlencode($search_price_booth); +} +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( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); -if ($user->rights->projet->creer) $arrayofmassactions['close'] = $langs->trans("Close"); -if ($user->rights->projet->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->projet->creer) { + $arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Close"); +} +if ($user->rights->projet->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if ($user->rights->projet->creer) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $url = DOL_URL_ROOT.'/projet/card.php?action=create'; -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', $url, '', $user->rights->projet->creer); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -474,10 +650,14 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; // Show description of content $texthelp = ''; -if ($search_project_user == $user->id) $texthelp .= $langs->trans("MyProjectsDesc"); -else { - if ($user->rights->projet->all->lire && !$socid) $texthelp .= $langs->trans("ProjectsDesc"); - else $texthelp .= $langs->trans("ProjectsPublicDesc"); +if ($search_project_user == $user->id) { + $texthelp .= $langs->trans("MyProjectsDesc"); +} else { + if ($user->rights->projet->all->lire && !$socid) { + $texthelp .= $langs->trans("ProjectsDesc"); + } else { + $texthelp .= $langs->trans("ProjectsPublicDesc"); + } } print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -489,42 +669,42 @@ $objecttmp = new Project($db); $trackid = 'proj'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } $moreforfilter = ''; +// If the user can view user other than himself +$moreforfilter .= '<div class="divsearchfield">'; +$tmptitle = $langs->trans('ProjectsWithThisUserAsContact'); +//$includeonly = 'hierarchyme'; +$includeonly = ''; +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250'); +$moreforfilter .= '</div>'; + +// If the user can view thirdparties other than his' +if ($user->rights->societe->client->voir || $socid) { + $langs->load("commercial"); + $moreforfilter .= '<div class="divsearchfield">'; + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); + $moreforfilter .= '</div>'; +} + // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $formcategory = new FormCategory($db); $moreforfilter .= $formcategory->getFilterBox(Categorie::TYPE_PROJECT, $search_category_array); } -// If the user can view user other than himself -$moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('ProjectsWithThisUserAsContact').': '; -//$includeonly = 'hierarchyme'; -$includeonly = ''; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200'); -$moreforfilter .= '</div>'; - -// If the user can view thirdparties other than his' -if ($user->rights->societe->client->voir || $socid) -{ - $langs->load("commercial"); - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200'); - $moreforfilter .= '</div>'; -} - -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -544,111 +724,124 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // -------------------------------------------------------------------- print '<tr class="liste_titre_filter">'; // Project ref -if (!empty($arrayfields['p.ref']['checked'])) -{ +if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_ref" value="'.dol_escape_htmltag($search_ref).'" size="6">'; print '</td>'; } // Project label -if (!empty($arrayfields['p.title']['checked'])) -{ +if (!empty($arrayfields['p.title']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_label" size="8" value="'.dol_escape_htmltag($search_label).'">'; print '</td>'; } // Third party -if (!empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre">'; - if ($socid > 0) - { + if ($socid > 0) { $tmpthirdparty = new Societe($db); $tmpthirdparty->fetch($socid); - $search_societe = $tmpthirdparty->nom; + $search_societe = $tmpthirdparty->name; } print '<input type="text" class="flat" name="search_societe" size="8" value="'.dol_escape_htmltag($search_societe).'">'; print '</td>'; } // Sale representative -if (!empty($arrayfields['commercial']['checked'])) -{ +if (!empty($arrayfields['commercial']['checked'])) { print '<td class="liste_titre">&nbsp;</td>'; } // Start date -if (!empty($arrayfields['p.dateo']['checked'])) -{ +if (!empty($arrayfields['p.dateo']['checked'])) { print '<td class="liste_titre center nowraponall">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_sday" value="'.dol_escape_htmltag($search_sday).'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_sday" value="'.dol_escape_htmltag($search_sday).'">'; + } print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_smonth" value="'.dol_escape_htmltag($search_smonth).'">'; $formother->select_year($search_syear ? $search_syear : -1, 'search_syear', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); print '</td>'; } // End date -if (!empty($arrayfields['p.datee']['checked'])) -{ +if (!empty($arrayfields['p.datee']['checked'])) { print '<td class="liste_titre center nowraponall">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_eday" value="'.dol_escape_htmltag($search_eday).'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_eday" value="'.dol_escape_htmltag($search_eday).'">'; + } print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_emonth" value="'.dol_escape_htmltag($search_emonth).'">'; $formother->select_year($search_eyear ? $search_eyear : -1, 'search_eyear', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle'); print '</td>'; } -if (!empty($arrayfields['p.public']['checked'])) -{ +if (!empty($arrayfields['p.public']['checked'])) { print '<td class="liste_titre">'; $array = array(''=>'', 0 => $langs->trans("PrivateProject"), 1 => $langs->trans("SharedProject")); print $form->selectarray('search_public', $array, $search_public); print '</td>'; } // Opp status -if (!empty($arrayfields['p.fk_opp_status']['checked'])) -{ +if (!empty($arrayfields['p.fk_opp_status']['checked'])) { print '<td class="liste_titre nowrap center">'; print $formproject->selectOpportunityStatus('search_opp_status', $search_opp_status, 1, 0, 1, 0, 'maxwidth100'); print '</td>'; } -if (!empty($arrayfields['p.opp_amount']['checked'])) -{ +if (!empty($arrayfields['p.opp_amount']['checked'])) { print '<td class="liste_titre nowrap right">'; print '<input type="text" class="flat" name="search_opp_amount" size="3" value="'.$search_opp_amount.'">'; print '</td>'; } -if (!empty($arrayfields['p.opp_percent']['checked'])) -{ +if (!empty($arrayfields['p.opp_percent']['checked'])) { print '<td class="liste_titre nowrap right">'; print '<input type="text" class="flat" name="search_opp_percent" size="2" value="'.$search_opp_percent.'">'; print '</td>'; } -if (!empty($arrayfields['opp_weighted_amount']['checked'])) -{ +if (!empty($arrayfields['opp_weighted_amount']['checked'])) { print '<td class="liste_titre nowrap right">'; print '</td>'; } -if (!empty($arrayfields['p.budget_amount']['checked'])) -{ +if (!empty($arrayfields['p.budget_amount']['checked'])) { print '<td class="liste_titre nowrap right">'; print '<input type="text" class="flat" name="search_budget_amount" size="4" value="'.$search_budget_amount.'">'; print '</td>'; } -if (!empty($arrayfields['p.usage_opportunity']['checked'])) -{ +if (!empty($arrayfields['p.usage_opportunity']['checked'])) { print '<td class="liste_titre nowrap right">'; print $form->selectyesno('search_usage_opportunity', $search_usage_opportunity, 1, false, 1); print ''; print '</td>'; } -if (!empty($arrayfields['p.usage_task']['checked'])) -{ +if (!empty($arrayfields['p.usage_task']['checked'])) { print '<td class="liste_titre nowrap right">'; print $form->selectyesno('search_usage_task', $search_usage_task, 1, false, 1); print '</td>'; } -if (!empty($arrayfields['p.usage_bill_time']['checked'])) -{ +if (!empty($arrayfields['p.usage_bill_time']['checked'])) { print '<td class="liste_titre nowrap right">'; print $form->selectyesno('search_usage_bill_time', $search_usage_bill_time, 1, false, 1); print '</td>'; } +if (!empty($arrayfields['p.usage_organize_event']['checked'])) { + print '<td class="liste_titre nowrap right">'; + print $form->selectyesno('search_usage_event_organization', $search_usage_event_organization, 1, false, 1); + print '</td>'; +} +if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) { + print '<td class="liste_titre nowrap right">'; + print $form->selectyesno('search_accept_conference_suggestions', $search_accept_conference_suggestions, 1, false, 1); + print '</td>'; +} +if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) { + print '<td class="liste_titre nowrap right">'; + print $form->selectyesno('search_accept_booth_suggestions', $search_accept_booth_suggestions, 1, false, 1); + print '</td>'; +} +if (!empty($arrayfields['p.price_registration']['checked'])) { + print '<td class="liste_titre nowrap right">'; + print '<input type="text" class="flat" name="search_price_registration" size="4" value="'.$search_price_registration.'">'; + print '</td>'; +} +if (!empty($arrayfields['p.price_booth']['checked'])) { + print '<td class="liste_titre nowrap right">'; + print '<input type="text" class="flat" name="search_price_booth" size="4" value="'.$search_price_booth.'">'; + print '</td>'; +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -656,23 +849,22 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; $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['p.datec']['checked'])) -{ +if (!empty($arrayfields['p.datec']['checked'])) { // Date creation print '<td class="liste_titre">'; print '</td>'; } -if (!empty($arrayfields['p.tms']['checked'])) -{ +if (!empty($arrayfields['p.tms']['checked'])) { // Date modification print '<td class="liste_titre">'; print '</td>'; } -if (!empty($arrayfields['p.fk_statut']['checked'])) -{ +if (!empty($arrayfields['p.fk_statut']['checked'])) { print '<td class="liste_titre nowrap right">'; $arrayofstatus = array(); - foreach ($object->statuts_short as $key => $val) $arrayofstatus[$key] = $langs->trans($val); + foreach ($object->statuts_short as $key => $val) { + $arrayofstatus[$key] = $langs->trans($val); + } $arrayofstatus['99'] = $langs->trans("NotClosed").' ('.$langs->trans('Draft').' + '.$langs->trans('Opened').')'; print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'minwidth75imp maxwidth150 selectarrowonleft'); print ajax_combobox('search_status'); @@ -687,30 +879,81 @@ print '</td>'; print '</tr>'."\n"; print '<tr class="liste_titre">'; -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.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['commercial']['checked'])) print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp '); -if (!empty($arrayfields['p.dateo']['checked'])) print_liste_field_titre($arrayfields['p.dateo']['label'], $_SERVER["PHP_SELF"], "p.dateo", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['p.datee']['checked'])) print_liste_field_titre($arrayfields['p.datee']['label'], $_SERVER["PHP_SELF"], "p.datee", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['p.public']['checked'])) print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['p.fk_opp_status']['checked'])) print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['p.opp_amount']['checked'])) print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['p.opp_percent']['checked'])) print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER['PHP_SELF'], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['opp_weighted_amount']['checked'])) print_liste_field_titre($arrayfields['opp_weighted_amount']['label'], $_SERVER['PHP_SELF'], 'opp_weighted_amount', '', $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['p.budget_amount']['checked'])) print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['p.usage_opportunity']['checked'])) print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['p.usage_task']['checked'])) print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['p.usage_bill_time']['checked'])) print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); +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.title']['checked'])) { + print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['commercial']['checked'])) { + print_liste_field_titre($arrayfields['commercial']['label'], $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder, 'tdoverflowmax100imp '); +} +if (!empty($arrayfields['p.dateo']['checked'])) { + print_liste_field_titre($arrayfields['p.dateo']['label'], $_SERVER["PHP_SELF"], "p.dateo", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['p.datee']['checked'])) { + print_liste_field_titre($arrayfields['p.datee']['label'], $_SERVER["PHP_SELF"], "p.datee", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['p.public']['checked'])) { + print_liste_field_titre($arrayfields['p.public']['label'], $_SERVER["PHP_SELF"], "p.public", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['p.fk_opp_status']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_opp_status']['label'], $_SERVER["PHP_SELF"], 'p.fk_opp_status', "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['p.opp_amount']['checked'])) { + print_liste_field_titre($arrayfields['p.opp_amount']['label'], $_SERVER["PHP_SELF"], 'p.opp_amount', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.opp_percent']['checked'])) { + print_liste_field_titre($arrayfields['p.opp_percent']['label'], $_SERVER['PHP_SELF'], 'p.opp_percent', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['opp_weighted_amount']['checked'])) { + print_liste_field_titre($arrayfields['opp_weighted_amount']['label'], $_SERVER['PHP_SELF'], 'opp_weighted_amount', '', $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.budget_amount']['checked'])) { + print_liste_field_titre($arrayfields['p.budget_amount']['label'], $_SERVER["PHP_SELF"], 'p.budget_amount', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.usage_opportunity']['checked'])) { + print_liste_field_titre($arrayfields['p.usage_opportunity']['label'], $_SERVER["PHP_SELF"], 'p.usage_opportunity', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.usage_task']['checked'])) { + print_liste_field_titre($arrayfields['p.usage_task']['label'], $_SERVER["PHP_SELF"], 'p.usage_task', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.usage_bill_time']['checked'])) { + print_liste_field_titre($arrayfields['p.usage_bill_time']['label'], $_SERVER["PHP_SELF"], 'p.usage_bill_time', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.usage_organize_event']['checked'])) { + print_liste_field_titre($arrayfields['p.usage_organize_event']['label'], $_SERVER["PHP_SELF"], 'p.usage_organize_event', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) { + print_liste_field_titre($arrayfields['p.accept_conference_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_conference_suggestions', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) { + print_liste_field_titre($arrayfields['p.accept_booth_suggestions']['label'], $_SERVER["PHP_SELF"], 'p.accept_booth_suggestions', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.price_registration']['checked'])) { + print_liste_field_titre($arrayfields['p.price_registration']['label'], $_SERVER["PHP_SELF"], 'p.price_registration', "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['p.price_booth']['checked'])) { + print_liste_field_titre($arrayfields['p.price_booth']['label'], $_SERVER["PHP_SELF"], 'p.price_booth', "", $param, '', $sortfield, $sortorder, 'right '); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['p.datec']['checked'])) 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 '); -if (!empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['p.datec']['checked'])) { + 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 '); +} +if (!empty($arrayfields['p.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; @@ -719,8 +962,7 @@ $totalarray = array( 'nbfield' => 0, 'val' => array(), ); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $object->id = $obj->id; @@ -735,8 +977,7 @@ while ($i < min($num, $limit)) $object->title = $obj->title; $userAccess = $object->restrictedProjectArea($user); // why this ? - if ($userAccess >= 0) - { + if ($userAccess >= 0) { $socstatic->id = $obj->socid; $socstatic->name = $obj->name; $socstatic->email = $obj->email; @@ -744,54 +985,54 @@ while ($i < min($num, $limit)) print '<tr class="oddeven">'; // Project url - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="nowraponall">'; - print $object->getNomUrl(1); - if ($object->hasDelay()) print img_warning($langs->trans('Late')); + print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int'))?'eventorganization':'')); + if ($object->hasDelay()) { + print img_warning($langs->trans('Late')); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Title - if (!empty($arrayfields['p.title']['checked'])) - { + if (!empty($arrayfields['p.title']['checked'])) { print '<td class="tdoverflowmax200">'; print dol_trunc($obj->title, 80); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Company - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="tdoverflowmax100">'; - if ($obj->socid) - { + if ($obj->socid) { print $socstatic->getNomUrl(1); } else { print '&nbsp;'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Sales Representatives - if (!empty($arrayfields['commercial']['checked'])) - { + if (!empty($arrayfields['commercial']['checked'])) { print '<td>'; - if ($obj->socid) - { + if ($obj->socid) { $socstatic->id = $obj->socid; $socstatic->name = $obj->name; $listsalesrepresentatives = $socstatic->getSalesRepresentatives($user); $nbofsalesrepresentative = count($listsalesrepresentatives); - if ($nbofsalesrepresentative > 3) // We print only number - { + if ($nbofsalesrepresentative > 6) { + // We print only number print $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['lastname']; $userstatic->firstname = $val['firstname']; @@ -799,132 +1040,223 @@ while ($i < min($num, $limit)) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; - print $userstatic->getNomUrl(1, '', 0, 0, 12); - //print $userstatic->getNomUrl(-2); + $userstatic->login = $val['login']; + $userstatic->phone = $val['phone']; + $userstatic->job = $val['job']; + $userstatic->gender = $val['gender']; + print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2); $j++; - if ($j < $nbofsalesrepresentative) print ' '; + if ($j < $nbofsalesrepresentative) { + print ' '; + } } } //else print $langs->trans("NoSalesRepresentativeAffected"); } else { - print '&nbsp'; + print '&nbsp;'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date start - if (!empty($arrayfields['p.dateo']['checked'])) - { + if (!empty($arrayfields['p.dateo']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_start), 'day'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date end - if (!empty($arrayfields['p.datee']['checked'])) - { + if (!empty($arrayfields['p.datee']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_end), 'day'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Visibility - if (!empty($arrayfields['p.public']['checked'])) - { + if (!empty($arrayfields['p.public']['checked'])) { print '<td class="left">'; - if ($obj->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($obj->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Opp Status - if (!empty($arrayfields['p.fk_opp_status']['checked'])) - { + if (!empty($arrayfields['p.fk_opp_status']['checked'])) { print '<td class="center">'; - if ($obj->opp_status_code) print $langs->trans("OppStatus".$obj->opp_status_code); + if ($obj->opp_status_code) { + print $langs->trans("OppStatus".$obj->opp_status_code); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Opp Amount - if (!empty($arrayfields['p.opp_amount']['checked'])) - { + if (!empty($arrayfields['p.opp_amount']['checked'])) { print '<td class="right">'; //if ($obj->opp_status_code) - if (strcmp($obj->opp_amount, '')) - { - print price($obj->opp_amount, 1, $langs, 1, -1, -1, ''); + if (strcmp($obj->opp_amount, '')) { + print '<span class="amount">'.price($obj->opp_amount, 1, $langs, 1, -1, -1, '').'</span>'; $totalarray['val']['p.opp_amount'] += $obj->opp_amount; } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.opp_amount'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.opp_amount'; + } } // Opp percent - if (!empty($arrayfields['p.opp_percent']['checked'])) - { + if (!empty($arrayfields['p.opp_percent']['checked'])) { print '<td class="right">'; - if ($obj->opp_percent) print price($obj->opp_percent, 1, $langs, 1, 0).'%'; + if ($obj->opp_percent) { + print price($obj->opp_percent, 1, $langs, 1, 0).'%'; + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Opp weighted amount - if (!empty($arrayfields['opp_weighted_amount']['checked'])) - { - if (!isset($totalarray['val']['opp_weighted_amount'])) $totalarray['val']['opp_weighted_amount'] = 0; + if (!empty($arrayfields['opp_weighted_amount']['checked'])) { + if (!isset($totalarray['val']['opp_weighted_amount'])) { + $totalarray['val']['opp_weighted_amount'] = 0; + } print '<td align="right">'; if ($obj->opp_weighted_amount) { - print price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, ''); + print '<span class="amount">'.price($obj->opp_weighted_amount, 1, $langs, 1, -1, -1, '').'</span>'; $totalarray['val']['opp_weighted_amount'] += $obj->opp_weighted_amount; } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'opp_weighted_amount'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'opp_weighted_amount'; + } } // Budget - if (!empty($arrayfields['p.budget_amount']['checked'])) - { + if (!empty($arrayfields['p.budget_amount']['checked'])) { print '<td class="right">'; - if ($obj->budget_amount != '') - { - print price($obj->budget_amount, 1, $langs, 1, -1, -1); + if ($obj->budget_amount != '') { + print '<span class="amount">'.price($obj->budget_amount, 1, $langs, 1, -1, -1).'</span>'; $totalarray['val']['p.budget_amount'] += $obj->budget_amount; } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.budget_amount'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.budget_amount'; + } } // Usage opportunity - if (!empty($arrayfields['p.usage_opportunity']['checked'])) - { + if (!empty($arrayfields['p.usage_opportunity']['checked'])) { print '<td class="right">'; - if ($obj->usage_opportunity) - { + if ($obj->usage_opportunity) { print yn($obj->usage_opportunity); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Usage task - if (!empty($arrayfields['p.usage_task']['checked'])) - { + if (!empty($arrayfields['p.usage_task']['checked'])) { print '<td class="right">'; - if ($obj->usage_task) - { + if ($obj->usage_task) { print yn($obj->usage_task); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Bill time - if (!empty($arrayfields['p.usage_bill_time']['checked'])) - { + if (!empty($arrayfields['p.usage_bill_time']['checked'])) { print '<td class="right">'; - if ($obj->usage_bill_time) - { + if ($obj->usage_bill_time) { print yn($obj->usage_bill_time); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Event Organization + if (!empty($arrayfields['p.usage_organize_event']['checked'])) { + print '<td class="right">'; + if ($obj->usage_organize_event) { + print yn($obj->usage_organize_event); + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Allow unknown people to suggest conferences + if (!empty($arrayfields['p.accept_conference_suggestions']['checked'])) { + print '<td class="right">'; + if ($obj->accept_conference_suggestions) { + print yn($obj->accept_conference_suggestions); + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Allow unknown people to suggest booth + if (!empty($arrayfields['p.accept_booth_suggestions']['checked'])) { + print '<td class="right">'; + if ($obj->accept_booth_suggestions) { + print yn($obj->accept_booth_suggestions); + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Price of registration + if (!empty($arrayfields['p.price_registration']['checked'])) { + print '<td class="right">'; + if ($obj->price_registration != '') { + print '<span class="amount">'.price($obj->price_registration, 1, $langs, 1, -1, -1).'</span>'; + $totalarray['val']['p.price_registration'] += $obj->price_registration; + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.price_registration'; + } + } + // Price of booth + if (!empty($arrayfields['p.price_booth']['checked'])) { + print '<td class="right">'; + if ($obj->price_booth != '') { + print '<span class="amount">'.price($obj->price_booth, 1, $langs, 1, -1, -1).'</span>'; + $totalarray['val']['p.price_booth'] += $obj->price_booth; + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'p.price_booth'; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -933,37 +1265,43 @@ while ($i < min($num, $limit)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['p.datec']['checked'])) - { - print '<td class="center">'; + if (!empty($arrayfields['p.datec']['checked'])) { + print '<td class="center nowraponall">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['p.tms']['checked'])) - { - print '<td class="center">'; + if (!empty($arrayfields['p.tms']['checked'])) { + print '<td class="center nowraponall">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['p.fk_statut']['checked'])) - { + if (!empty($arrayfields['p.fk_statut']['checked'])) { print '<td class="right">'.$object->getLibStatut(5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->id, $arrayofselected)) $selected = 1; + if (in_array($obj->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; } diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 65172311441..8b65156570a 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -39,7 +39,9 @@ $mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; $object = new Project($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} // Security check $socid = 0; @@ -61,7 +63,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, */ $title = $langs->trans("Project").' - '.$langs->trans("Note").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; llxHeader("", $title, $help_url); @@ -70,8 +74,7 @@ $userstatic = new User($db); $now = dol_now(); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { // To verify role of users //$userAccess = $object->restrictedProjectArea($user,'read'); $userWrite = $object->restrictedProjectArea($user, 'write'); @@ -90,17 +93,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index add142f1f57..6b1b0eac4c1 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -28,8 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/projectstats.class.php'; // Security check -if (!$user->rights->projet->lire) +if (!$user->rights->projet->lire) { accessforbidden(); +} $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); @@ -38,8 +39,7 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -65,7 +65,7 @@ $includeuserlist = array(); llxHeader('', $langs->trans('Projects')); $title = $langs->trans("ProjectsStatistics"); -$dir = $conf->projet->dir_output.'/temp'; +$dir = $conf->project->dir_output.'/temp'; print load_fiche_titre($title, '', 'project'); @@ -73,9 +73,15 @@ dol_mkdir($dir); $stats_project = new ProjectStats($db); -if (!empty($userid) && $userid != -1) $stats_project->userid = $userid; -if (!empty($socid) && $socid != -1) $stats_project->socid = $socid; -if (!empty($year)) $stats_project->year = $year; +if (!empty($userid) && $userid != -1) { + $stats_project->userid = $userid; +} +if (!empty($socid) && $socid != -1) { + $stats_project->socid = $socid; +} +if (!empty($year)) { + $stats_project->year = $year; +} /* if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) @@ -149,12 +155,10 @@ $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=projectstats&amp;file=proje $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -172,8 +176,7 @@ if (!$mesg) } -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Build graphic amount of object $data = $stats_project->getAmountByMonthWithPrevYear($endyear, $startyear); //var_dump($data); @@ -184,11 +187,9 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); - if (!$mesg) - { + if (!$mesg) { $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -210,8 +211,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) } } -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Build graphic with transformation rate $data = $stats_project->getWeightedAmountByMonthWithPrevYear($endyear, $startyear, 0, 0); //var_dump($data); @@ -222,12 +222,11 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); - if (!$mesg) - { + if (!$mesg) { $px3->SetData($data); - $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + $i = $startyear; + $legend = array(); + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -251,12 +250,16 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $stats_project->year = 0; $data_all_year = $stats_project->getAllByYear(); -if (!empty($year)) $stats_project->year = $year; +if (!empty($year)) { + $stats_project->year = $year; +} $arrayyears = array(); foreach ($data_all_year as $val) { $arrayyears[$val['year']] = $val['year']; } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; @@ -266,7 +269,7 @@ $head[$h][1] = $langs->trans("ByMonthYear"); $head[$h][2] = 'byyear'; $h++; -complete_head_from_modules($conf, $langs, null, $head, $h, $type); +complete_head_from_modules($conf, $langs, null, $head, $h, 'project_stats'); print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, ''); @@ -288,8 +291,12 @@ print $form->select_dolusers($userid, 'userid', 1, array(),0,$includeuserlist); print '</td></tr>';*/ // Year print '<tr><td>'.$langs->trans("Year").'</td><td>'; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; -if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -303,8 +310,7 @@ print '<table class="noborder centpercent">'; print '<tr class="liste_titre" height="24">'; print '<td class="center">'.$langs->trans("Year").'</td>'; print '<td class="right">'.$langs->trans("NbOfProjects").'</td>'; -if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) -{ +if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<td class="right">'.$langs->trans("OpportunityAmountShort").'</td>'; print '<td class="right">'.$langs->trans("OpportunityAmountAverageShort").'</td>'; print '<td class="right">'.$langs->trans("OpportunityAmountWeigthedShort").'</td>'; @@ -312,17 +318,14 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print '</tr>'; $oldyear = 0; -foreach ($data_all_year as $val) -{ +foreach ($data_all_year as $val) { $year = $val['year']; - while ($year && $oldyear > $year + 1) - { // If we have empty year + while ($year && $oldyear > $year + 1) { // If we have empty year $oldyear--; print '<tr class="oddeven" height="24">'; print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<td class="right">0</td>'; print '<td class="right">0</td>'; print '<td class="right">0</td>'; @@ -334,11 +337,10 @@ foreach ($data_all_year as $val) print '<tr class="oddeven" height="24">'; print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>'; print '<td class="right">'.$val['nb'].'</td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print '<td class="right">'.($val['total'] ?price(price2num($val['total'], 'MT'), 1) : '0').'</td>'; - print '<td class="right">'.($val['avg'] ?price(price2num($val['avg'], 'MT'), 1) : '0').'</td>'; - print '<td class="right">'.($val['weighted'] ?price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>'; + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + print '<td class="right">'.($val['total'] ? price(price2num($val['total'], 'MT'), 1) : '0').'</td>'; + print '<td class="right">'.($val['avg'] ? price(price2num($val['avg'], 'MT'), 1) : '0').'</td>'; + print '<td class="right">'.(isset($val['weighted']) ? price(price2num($val['weighted'], 'MT'), 1) : '0').'</td>'; } print '</tr>'; $oldyear = $year; @@ -349,12 +351,13 @@ print '</div>'; print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; -$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; -if ($mesg) { print $mesg; } else { +$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; +if ($mesg) { + print $mesg; +} else { $stringtoshow .= $px1->show(); $stringtoshow .= "<br>\n"; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { //$stringtoshow .= $px->show(); //$stringtoshow .= "<br>\n"; $stringtoshow .= $px2->show(); diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index d61dffeee3c..df4a94b6dfd 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -31,10 +31,17 @@ 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.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -if ($conf->categorie->enabled) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } +if ($conf->categorie->enabled) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} // Load translation files required by the page -$langs->loadLangs(array('projects', 'users', 'companies')); +$langsLoad=array('projects', 'users', 'companies'); +if (!empty($conf->eventorganization->enabled)) { + $langsLoad[]='eventorganization'; +} + +$langs->loadLangs($langsLoad); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -51,7 +58,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -83,10 +92,11 @@ $taskstatic = new Task($db); $extrafields = new ExtraFields($db); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); +} -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); } @@ -95,8 +105,12 @@ $search_array_options = $extrafields->getOptionalsFromPost($taskstatic->table_el // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) { reset($object->fields); $sortfield="t.".key($object->fields); } // Set here default search field. By default 1st field in definition. Reset is required to avoid key() to return null. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + reset($object->fields); $sortfield="t.".key($object->fields); +} // Set here default search field. By default 1st field in definition. Reset is required to avoid key() to return null. +if (!$sortorder) { + $sortorder = "ASC"; +} // Security check @@ -128,6 +142,7 @@ $arrayfields = array( 't.progress_calculated'=>array('label'=>$langs->trans("ProgressCalculated"), 'checked'=>1, 'position'=>8), 't.progress'=>array('label'=>$langs->trans("ProgressDeclared"), 'checked'=>1, 'position'=>9), 't.progress_summary'=>array('label'=>$langs->trans("TaskProgressSummary"), 'checked'=>1, 'position'=>10), + 'c.assigned'=>array('label'=>$langs->trans("TaskRessourceLinks"), 'checked'=>1, 'position'=>11), ); if ($object->usage_bill_time) { $arrayfields['t.tobill'] = array('label'=>$langs->trans("TimeToBill"), 'checked'=>0, 'position'=>11); @@ -148,16 +163,16 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_user_id = ""; $search_taskref = ''; $search_tasklabel = ''; @@ -195,10 +210,14 @@ if (!empty($search_tasklabel)) { } $moresql = dolSqlDateFilter('t.dateo', $search_dtstartday, $search_dtstartmonth, $search_dtstartyear, 1); -if ($moresql) $morewherefilterarray[] = $moresql; +if ($moresql) { + $morewherefilterarray[] = $moresql; +} $moresql = dolSqlDateFilter('t.datee', $search_dtendday, $search_dtendmonth, $search_dtendyear, 1); -if ($moresql) $morewherefilterarray[] = $moresql; +if ($moresql) { + $morewherefilterarray[] = $moresql; +} if (!empty($search_planedworkload)) { $morewherefilterarray[] = natural_search('t.planned_workload', $search_planedworkload, 1, 1); @@ -223,8 +242,7 @@ if (count($morewherefilterarray) > 0) { $morewherefilter = ' AND '.implode(' AND ', $morewherefilterarray); } -if ($action == 'createtask' && $user->rights->projet->creer) -{ +if ($action == 'createtask' && $user->rights->projet->creer) { $error = 0; // If we use user timezone, we must change also view/list to use user timezone everywhere @@ -233,33 +251,32 @@ if ($action == 'createtask' && $user->rights->projet->creer) $date_start = dol_mktime(GETPOST('dateohour', 'int'), GETPOST('dateomin', 'int'), 0, GETPOST('dateomonth', 'int'), GETPOST('dateoday', 'int'), GETPOST('dateoyear', 'int')); $date_end = dol_mktime(GETPOST('dateehour', 'int'), GETPOST('dateemin', 'int'), 0, GETPOST('dateemonth', 'int'), GETPOST('dateeday', 'int'), GETPOST('dateeyear', 'int')); - if (!$cancel) - { - if (empty($taskref)) - { + if (!$cancel) { + if (empty($taskref)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $action = 'create'; $error++; } - if (empty($label)) - { + if (empty($label)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); $action = 'create'; $error++; - } elseif (empty($_POST['task_parent'])) - { + } elseif (empty($_POST['task_parent'])) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ChildOfProjectTask")), null, 'errors'); $action = 'create'; $error++; } - if (!$error) - { + if (!$error) { $tmparray = explode('_', GETPOST('task_parent')); $projectid = $tmparray[0]; - if (empty($projectid)) $projectid = $id; // If projectid is '' + if (empty($projectid)) { + $projectid = $id; // If projectid is '' + } $task_parent = $tmparray[1]; - if (empty($task_parent)) $task_parent = 0; // If task_parent is '' + if (empty($task_parent)) { + $task_parent = 0; // If task_parent is '' + } $task = new Task($db); @@ -279,12 +296,10 @@ if ($action == 'createtask' && $user->rights->projet->creer) $taskid = $task->create($user); - if ($taskid > 0) - { - $result = $task->add_contact($_POST["userid"], 'TASKEXECUTIVE', 'internal'); + if ($taskid > 0) { + $result = $task->add_contact(GETPOST("userid", 'int'), 'TASKEXECUTIVE', 'internal'); } else { - if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("projects"); setEventMessages($langs->trans('NewTaskRefSuggested'), '', 'warnings'); $duplicate_code_error = true; @@ -296,26 +311,21 @@ if ($action == 'createtask' && $user->rights->projet->creer) } } - if (!$error) - { - if (!empty($backtopage)) - { + if (!$error) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; - } elseif (empty($projectid)) - { + } elseif (empty($projectid)) { header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode) ? '' : '?mode='.$mode)); exit; } $id = $projectid; } } else { - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; - } elseif (empty($id)) - { + } elseif (empty($id)) { // We go back on task list header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php'.(empty($mode) ? '' : '?mode='.$mode)); exit; @@ -337,17 +347,28 @@ $taskstatic = new Task($db); $userstatic = new User($db); $title = $langs->trans("Project").' - '.$langs->trans("Tasks").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Tasks"); +} $help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; llxHeader("", $title, $help_url); -if ($id > 0 || !empty($ref)) -{ - $object->fetch($id, $ref); - $object->fetch_thirdparty(); - $res = $object->fetch_optionals(); +if ($id > 0 || !empty($ref)) { + $result = $object->fetch($id, $ref); + if ($result < 0) { + setEventMessages(null, $object->errors, 'errors'); + } + $result = $object->fetch_thirdparty(); + if ($result < 0) { + setEventMessages(null, $object->errors, 'errors'); + } + $result = $object->fetch_optionals(); + if ($result < 0) { + setEventMessages(null, $object->errors, 'errors'); + } + // To verify role of users //$userAccess = $object->restrictedProjectArea($user,'read'); @@ -362,22 +383,54 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project')); $param = '&id='.$object->id; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($search_user_id) $param .= '&search_user_id='.urlencode($search_user_id); - if ($search_taskref) $param .= '&search_taskref='.urlencode($search_taskref); - if ($search_tasklabel) $param .= '&search_tasklabel='.urlencode($search_tasklabel); - if ($search_taskdescription) $param .= '&search_taskdescription='.urlencode($search_taskdescription); - if ($search_dtstartday) $param .= '&search_dtstartday='.urlencode($search_dtstartday); - if ($search_dtstartmonth) $param .= '&search_dtstartmonth='.urlencode($search_dtstartmonth); - if ($search_dtstartyear) $param .= '&search_dtstartyear='.urlencode($search_dtstartyear); - if ($search_dtendday) $param .= '&search_dtendday='.urlencode($search_dtendday); - if ($search_dtendmonth) $param .= '&search_dtendmonth='.urlencode($search_dtendmonth); - if ($search_dtendyear) $param .= '&search_dtendyear='.urlencode($search_dtendyear); - if ($search_planedworkload) $param .= '&search_planedworkload='.urlencode($search_planedworkload); - if ($search_timespend) $param .= '&search_timespend='.urlencode($search_timespend); - if ($search_progresscalc) $param .= '&search_progresscalc='.urlencode($search_progresscalc); - if ($search_progressdeclare) $param .= '&search_progressdeclare='.urlencode($search_progressdeclare); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($search_user_id) { + $param .= '&search_user_id='.urlencode($search_user_id); + } + if ($search_taskref) { + $param .= '&search_taskref='.urlencode($search_taskref); + } + if ($search_tasklabel) { + $param .= '&search_tasklabel='.urlencode($search_tasklabel); + } + if ($search_taskdescription) { + $param .= '&search_taskdescription='.urlencode($search_taskdescription); + } + if ($search_dtstartday) { + $param .= '&search_dtstartday='.urlencode($search_dtstartday); + } + if ($search_dtstartmonth) { + $param .= '&search_dtstartmonth='.urlencode($search_dtstartmonth); + } + if ($search_dtstartyear) { + $param .= '&search_dtstartyear='.urlencode($search_dtstartyear); + } + if ($search_dtendday) { + $param .= '&search_dtendday='.urlencode($search_dtendday); + } + if ($search_dtendmonth) { + $param .= '&search_dtendmonth='.urlencode($search_dtendmonth); + } + if ($search_dtendyear) { + $param .= '&search_dtendyear='.urlencode($search_dtendyear); + } + if ($search_planedworkload) { + $param .= '&search_planedworkload='.urlencode($search_planedworkload); + } + if ($search_timespend) { + $param .= '&search_timespend='.urlencode($search_timespend); + } + if ($search_progresscalc) { + $param .= '&search_progresscalc='.urlencode($search_progresscalc); + } + if ($search_progressdeclare) { + $param .= '&search_progressdeclare='.urlencode($search_progressdeclare); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -389,17 +442,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -411,40 +462,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield" width="100%">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($object->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($object->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -454,12 +509,16 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($object->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($object->budget_amount, '')) print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($object->budget_amount, '')) { + print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -500,9 +559,10 @@ if ($id > 0 || !empty($ref)) } -if ($action == 'create' && $user->rights->projet->creer && (empty($object->thirdparty->id) || $userWrite > 0)) -{ - if ($id > 0 || !empty($ref)) print '<br>'; +if ($action == 'create' && $user->rights->projet->creer && (empty($object->thirdparty->id) || $userWrite > 0)) { + if ($id > 0 || !empty($ref)) { + print '<br>'; + } print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask'); @@ -524,7 +584,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="createtask">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if (!empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">'; + if (!empty($object->id)) { + print '<input type="hidden" name="id" value="'.$object->id.'">'; + } print dol_get_fiche_head(''); @@ -532,19 +594,19 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third $defaultref = ''; $obj = empty($conf->global->PROJECT_TASK_ADDON) ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; - if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) - { + if (!empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php")) { require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.'.php'; $modTask = new $obj; $defaultref = $modTask->getNextValue($object->thirdparty, null); } - if (is_numeric($defaultref) && $defaultref <= 0) $defaultref = ''; + if (is_numeric($defaultref) && $defaultref <= 0) { + $defaultref = ''; + } // Ref print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Ref").'</span></td><td>'; - if (empty($duplicate_code_error)) - { + if (empty($duplicate_code_error)) { print (GETPOSTISSET("ref") ? GETPOST("ref", 'alpha') : $defaultref); } else { print $defaultref; @@ -564,8 +626,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>'; $contactsofproject = (!empty($object->id) ? $object->getListContactId('internal') : ''); - if (is_array($contactsofproject) && count($contactsofproject)) - { + if (is_array($contactsofproject) && count($contactsofproject)) { print $form->select_dolusers($user->id, 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, '', 'maxwidth300'); } else { print $langs->trans("NoUserAssignedToTheProject"); @@ -603,8 +664,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $taskstatic, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook) && !empty($extrafields->attributes[$taskstatic->table_element]['label'])) - { + if (empty($reshook) && !empty($extrafields->attributes[$taskstatic->table_element]['label'])) { print $taskstatic->showOptionals($extrafields, 'edit'); // Do not use $object here that is object of project but use $taskstatic } @@ -642,7 +702,9 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third $linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', $linktocreatetaskUserRight, $linktocreatetaskParam); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="list">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; @@ -665,28 +727,27 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // We load also tasks limited to a particular user $tmpuser = new User($db); - if ($search_user_id > 0) $tmpuser->fetch($search_user_id); + if ($search_user_id > 0) { + $tmpuser->fetch($search_user_id); + } $tasksrole = ($tmpuser->id > 0 ? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id, 0) : ''); //var_dump($tasksarray); //var_dump($tasksrole); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } // Filter on categories $moreforfilter = ''; - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= $langs->trans("TasksAssignedTo").': '; $moreforfilter .= $form->select_dolusers($tmpuser->id > 0 ? $tmpuser->id : '', 'search_user_id', 1); $moreforfilter .= '</div>'; } - if ($moreforfilter) - { + if ($moreforfilter) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -759,8 +820,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // progress resume not searchable print '<td class="liste_titre right"></td>'; - if ($object->usage_bill_time) - { + if ($object->usage_bill_time) { if (!empty($arrayfields['t.tobill']['checked'])) { print '<td class="liste_titre right">'; print '</td>'; @@ -771,8 +831,17 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '</td>'; } } + // Contacts of task, disabled because available by default jsut after + /* + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print '<td class="liste_titre"></td>'; + } + */ - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print '<td class="liste_titre"></td>'; + if (!empty($arrayfields['c.assigned']['checked'])) { + print '<td class="liste_titre right">'; + print '</td>'; + } $extrafieldsobjectkey = $taskstatic->table_element; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -786,22 +855,53 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print '<tr class="liste_titre nodrag nodrop">'; // print '<td>'.$langs->trans("Project").'</td>'; - if (!empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, ''); - if (!empty($arrayfields['t.label']['checked'])) print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, ''); - if (!empty($arrayfields['t.description']['checked'])) print_liste_field_titre($arrayfields['t.description']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, ''); - if (!empty($arrayfields['t.dateo']['checked'])) print_liste_field_titre($arrayfields['t.dateo']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['t.datee']['checked'])) print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['t.planned_workload']['checked'])) print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); - if (!empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); - if (!empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); - if (!empty($arrayfields['t.progress']['checked'])) print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); - if (!empty($arrayfields['t.progress_summary']['checked'])) print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '', 1); - if ($object->usage_bill_time) - { - if (!empty($arrayfields['t.tobill']['checked'])) print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['t.billed']['checked'])) print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['t.ref']['checked'])) { + print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, ''); + } + if (!empty($arrayfields['t.label']['checked'])) { + print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, ''); + } + if (!empty($arrayfields['t.description']['checked'])) { + print_liste_field_titre($arrayfields['t.description']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, ''); + } + if (!empty($arrayfields['t.dateo']['checked'])) { + print_liste_field_titre($arrayfields['t.dateo']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['t.datee']['checked'])) { + print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['t.planned_workload']['checked'])) { + print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); + } + if (!empty($arrayfields['t.duration_effective']['checked'])) { + print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); + } + if (!empty($arrayfields['t.progress_calculated']['checked'])) { + print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); + } + if (!empty($arrayfields['t.progress']['checked'])) { + print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1); + } + if (!empty($arrayfields['t.progress_summary']['checked'])) { + print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '', 1); + } + if ($object->usage_bill_time) { + if (!empty($arrayfields['t.tobill']['checked'])) { + print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['t.billed']['checked'])) { + print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); + } + } + // Contacts of task, disabled because available by default jsut after + /* + if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) { + print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder); + } + */ + if (!empty($arrayfields['c.assigned']['checked'])) { + print_liste_field_titre($arrayfields['c.assigned']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', ''); } - if (!empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', $param, $sortfield, $sortorder); // Extra fields $disablesortlink = 1; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -812,14 +912,15 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { // Show all lines in taskarray (recursive function to go down on tree) $j = 0; $level = 0; $nboftaskshown = projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $object->id, 1, $object->id, $filterprogresscalc, ($object->usage_bill_time ? 1 : 0), $arrayfields); } else { $colspan = 10; - if ($object->usage_bill_time) $colspan += 2; + if ($object->usage_bill_time) { + $colspan += 2; + } print '<tr class="oddeven nobottom"><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoTasks").'</span></td></tr>'; } @@ -831,18 +932,14 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third // Test if database is clean. If not we clean it. //print 'mode='.$_REQUEST["mode"].' $nboftaskshown='.$nboftaskshown.' count($tasksarray)='.count($tasksarray).' count($tasksrole)='.count($tasksrole).'<br>'; - if (!empty($user->rights->projet->all->lire)) // We make test to clean only if user has permission to see all (test may report false positive otherwise) - { - if ($search_user_id == $user->id) - { - if ($nboftaskshown < count($tasksrole)) - { + if (!empty($user->rights->projet->all->lire)) { // We make test to clean only if user has permission to see all (test may report false positive otherwise) + if ($search_user_id == $user->id) { + if ($nboftaskshown < count($tasksrole)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; cleanCorruptedTree($db, 'projet_task', 'fk_task_parent'); } } else { - if ($nboftaskshown < count($tasksarray) && !GETPOST('search_user_id', 'int')) - { + if ($nboftaskshown < count($tasksarray) && !GETPOST('search_user_id', 'int')) { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; cleanCorruptedTree($db, 'projet_task', 'fk_task_parent'); } diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 6e28e701999..aaa8bd0cd89 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -50,7 +50,9 @@ $planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('p // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('projecttaskcommentcard', 'globalcard')); @@ -66,13 +68,10 @@ $extrafields->fetch_name_optionals_label($object->table_element); include DOL_DOCUMENT_ROOT.'/core/actions_comments.inc.php'; // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch('', $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch('', $project_ref) > 0) { $objectsarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($objectsarray) > 0) - { + if (count($objectsarray) > 0) { $id = $objectsarray[0]->id; } else { header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ? '' : '&mode='.$mode)); @@ -91,10 +90,8 @@ $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $result = $object->fetch_optionals(); $result = $object->fetchComments(); @@ -103,15 +100,18 @@ if ($id > 0 || !empty($ref)) } $result = $projectstatic->fetch($object->fk_project); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } $object->project = clone $projectstatic; $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); - if (!empty($withproject)) - { + if (!empty($withproject)) { // Tabs for project $tab = 'tasks'; $head = project_prepare_head($projectstatic); @@ -127,17 +127,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -149,39 +147,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; - } + } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Opportunities @@ -189,21 +192,27 @@ if ($id > 0 || !empty($ref)) // Opportunity status print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>'; $code = dol_getIdFromCode($db, $projectstatic->opp_status, 'c_lead_status', 'rowid', 'code'); - if ($code) print $langs->trans("OppStatus".$code); + if ($code) { + print $langs->trans("OppStatus".$code); + } print '</td></tr>'; // Opportunity percent print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>'; - if (strcmp($object->opp_percent, '')) print price($projectstatic->opp_percent, 0, $langs, 1, 0).' %'; + if (strcmp($object->opp_percent, '')) { + print price($projectstatic->opp_percent, 0, $langs, 1, 0).' %'; + } print '</td></tr>'; // Opportunity Amount print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>'; /*if ($object->opp_status) - { - print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); - }*/ - if (strcmp($projectstatic->opp_amount, '')) print price($projectstatic->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + { + print price($obj->opp_amount, 1, $langs, 1, 0, -1, $conf->currency); + }*/ + if (strcmp($projectstatic->opp_amount, '')) { + print price($projectstatic->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + } print '</td></tr>'; } @@ -214,12 +223,16 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -270,22 +283,21 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_head($head, 'task_comment', $langs->trans("Task"), -1, 'projecttask'); - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject, $langs->trans("DeleteATask"), $langs->trans("ConfirmDeleteATask"), "confirm_delete"); + if ($action == 'delete') { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".GETPOST("id", "int").'&withproject='.$withproject, $langs->trans("DeleteATask"), $langs->trans("ConfirmDeleteATask"), "confirm_delete"); } - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id); + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; $morehtmlref .= $projectstatic->getNomUrl(1); diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 88cbbf4dbbd..3aa5c3b8830 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -44,7 +44,9 @@ $project_ref = GETPOST('project_ref', 'alpha'); $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. //$result = restrictedArea($user, 'projet', $id, 'projet_task'); -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $object = new Task($db); $projectstatic = new Project($db); @@ -55,8 +57,7 @@ $projectstatic = new Project($db); */ // Add new contact -if ($action == 'addcontact' && $user->rights->projet->creer) -{ +if ($action == 'addcontact' && $user->rights->projet->creer) { $source = 'internal'; if (GETPOST("addsourceexternal")) { $source ='external'; @@ -64,8 +65,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer) $result = $object->fetch($id, $ref); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { if ($source == 'internal') { $idfortaskuser = ((GETPOST("userid") != 0 && GETPOST('userid') != -1) ? GETPOST("userid") : 0); // GETPOST('contactid') may val -1 to mean empty or -2 to means "everybody" $typeid = GETPOST('type'); @@ -73,16 +73,13 @@ if ($action == 'addcontact' && $user->rights->projet->creer) $idfortaskuser = ((GETPOST("contactid") > 0) ? GETPOST("contactid", 'int') : 0); // GETPOST('contactid') may val -1 to mean empty or -2 to means "everybody" $typeid = GETPOST('typecontact'); } - if ($idfortaskuser == -2) - { + if ($idfortaskuser == -2) { $result = $projectstatic->fetch($object->fk_project); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db, $projectstatic->error, $projectstatic->errors); } else { $contactsofproject = $projectstatic->getListContactId('internal'); - foreach ($contactsofproject as $key => $val) - { + foreach ($contactsofproject as $key => $val) { $result = $object->add_contact($val, $typeid, $source); } } @@ -105,23 +102,20 @@ if ($action == 'addcontact' && $user->rights->projet->creer) } // bascule du statut d'un contact -if ($action == 'swapstatut' && $user->rights->projet->creer) -{ +if ($action == 'swapstatut' && $user->rights->projet->creer) { if ($object->fetch($id, $ref)) { - $result = $object->swapContactStatus(GETPOST('ligne')); + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } } // Efface un contact -if ($action == 'deleteline' && $user->rights->projet->creer) -{ +if ($action == 'deleteline' && $user->rights->projet->creer) { $object->fetch($id, $ref); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject ? '&withproject=1' : '')); exit; } else { @@ -130,13 +124,10 @@ if ($action == 'deleteline' && $user->rights->projet->creer) } // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch(0, $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch(0, $project_ref) > 0) { $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $id = $tasksarray[0]->id; } else { header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); @@ -163,23 +154,26 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $id = $object->id; // So when doing a search from ref, id is also set correctly. $result = $projectstatic->fetch($object->fk_project); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $object->project = clone $projectstatic; $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); - if ($withproject) - { + if ($withproject) { // Tabs for project $tab = 'tasks'; $head = project_prepare_head($projectstatic); @@ -195,17 +189,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -216,40 +208,45 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; - // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + // Usage + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -259,12 +256,16 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -317,17 +318,17 @@ if ($id > 0 || !empty($ref)) $param = (GETPOST('withproject') ? '&withproject=1' : ''); $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $result = $projectstatic->fetch($object->fk_project); $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; @@ -356,8 +357,8 @@ if ($id > 0 || !empty($ref)) $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl')); foreach($dirtpls as $reldir) { - $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); + if ($res) break; } */ @@ -368,12 +369,13 @@ if ($id > 0 || !empty($ref)) print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="addcontact">'; print '<input type="hidden" name="id" value="'.$id.'">'; - if ($withproject) print '<input type="hidden" name="withproject" value="'.$withproject.'">'; + if ($withproject) { + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; + } print '<table class="noborder centpercent">'; - if ($action != 'editline' && $user->rights->projet->creer) - { + if ($action != 'editline' && $user->rights->projet->creer) { print '<tr class="liste_titre">'; print '<td>'.$langs->trans("NatureOfContact").'</td>'; print '<td>'.$langs->trans("ThirdParty").'</td>'; @@ -395,8 +397,11 @@ if ($id > 0 || !empty($ref)) print '<td>'; // On recupere les id des users deja selectionnes - if ($object->project->public) $contactsofproject = ''; // Everybody - else $contactsofproject = $projectstatic->getListContactId('internal'); + if ($object->project->public) { + $contactsofproject = ''; // Everybody + } else { + $contactsofproject = $projectstatic->getListContactId('internal'); + } print $form->select_dolusers((GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 1, $langs->trans("ResourceNotAssignedToProject")); print '</td>'; print '<td>'; @@ -406,8 +411,7 @@ if ($id > 0 || !empty($ref)) print '</tr>'; // Line to add an external contact. Only if project linked to a third party. - if ($projectstatic->socid) - { + if ($projectstatic->socid) { print '<tr class="oddeven">'; print '<td class="nowrap">'; @@ -429,7 +433,9 @@ if ($id > 0 || !empty($ref)) $formcompany->selectTypeContact($object, '', 'typecontact', 'external', 'rowid'); print '</td>'; print '<td class="right" colspan="3" ><input type="submit" class="button" id="add-customer-contact" name="addsourceexternal" value="'.$langs->trans("Add").'"'; - if (!$nbofcontacts) print ' disabled'; + if (!$nbofcontacts) { + print ' disabled'; + } print '></td>'; print '</tr>'; } @@ -447,44 +453,42 @@ if ($id > 0 || !empty($ref)) $companystatic = new Societe($db); - foreach (array('internal', 'external') as $source) - { + foreach (array('internal', 'external') as $source) { $tab = $object->liste_contact(-1, $source); $num = count($tab); $i = 0; - while ($i < $num) - { + while ($i < $num) { print '<tr class="oddeven" valign="top">'; // Source print '<td class="left">'; - if ($tab[$i]['source'] == 'internal') print $langs->trans("User"); - if ($tab[$i]['source'] == 'external') print $langs->trans("ThirdPartyContact"); + if ($tab[$i]['source'] == 'internal') { + print $langs->trans("User"); + } + if ($tab[$i]['source'] == 'external') { + print $langs->trans("ThirdPartyContact"); + } print '</td>'; // Societe print '<td class="left">'; - if ($tab[$i]['socid'] > 0) - { + if ($tab[$i]['socid'] > 0) { $companystatic->fetch($tab[$i]['socid']); print $companystatic->getNomUrl(1); } - if ($tab[$i]['socid'] < 0) - { + if ($tab[$i]['socid'] < 0) { print $conf->global->MAIN_INFO_SOCIETE_NOM; } - if (!$tab[$i]['socid']) - { + if (!$tab[$i]['socid']) { print '&nbsp;'; } print '</td>'; // Contact print '<td>'; - if ($tab[$i]['source'] == 'internal') - { + if ($tab[$i]['source'] == 'internal') { $userstatic->id = $tab[$i]['id']; $userstatic->lastname = $tab[$i]['lastname']; $userstatic->firstname = $tab[$i]['firstname']; @@ -495,8 +499,7 @@ if ($id > 0 || !empty($ref)) print $userstatic->getNomUrl(-1); } - if ($tab[$i]['source'] == 'external') - { + if ($tab[$i]['source'] == 'external') { $contactstatic->id = $tab[$i]['id']; $contactstatic->lastname = $tab[$i]['lastname']; $contactstatic->firstname = $tab[$i]['firstname']; @@ -512,15 +515,18 @@ if ($id > 0 || !empty($ref)) // Statut print '<td class="center">'; // Activation desativation du contact - if ($object->statut >= 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">'; + if ($object->statut >= 0) { + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">'; + } print $contactstatic->LibStatut($tab[$i]['status'], 3); - if ($object->statut >= 0) print '</a>'; + if ($object->statut >= 0) { + print '</a>'; + } print '</td>'; // Icon update et delete print '<td class="center nowrap">'; - if ($user->rights->projet->creer) - { + if ($user->rights->projet->creer) { print '&nbsp;'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">'; print img_picto($langs->trans('Unlink'), 'unlink'); @@ -541,8 +547,7 @@ if ($id > 0 || !empty($ref)) } } -if (is_object($hookmanager)) -{ +if (is_object($hookmanager)) { $hookmanager->initHooks(array('contacttpl')); $parameters = array(); $reshook = $hookmanager->executeHooks('formContactTpl', $parameters, $object, $action); diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 787ed4695f2..575f949bb75 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -48,19 +48,27 @@ $project_ref = GETPOST('project_ref', 'alpha'); $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. //$result=restrictedArea($user,'projet',$id,''); -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} // Get parameters $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new Task($db); $projectstatic = new Project($db); @@ -70,13 +78,10 @@ $projectstatic = new Project($db); */ // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch(0, $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch(0, $project_ref) > 0) { $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $id = $tasksarray[0]->id; $object->fetch($id); } else { @@ -86,13 +91,15 @@ if (!empty($project_ref) && !empty($withproject)) } } -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $projectstatic->fetch($object->fk_project); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } if (!empty($projectstatic->socid)) { $projectstatic->fetch_thirdparty(); @@ -106,7 +113,7 @@ if ($id > 0 || !empty($ref)) } } -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -117,14 +124,12 @@ $form = new Form($db); llxHeader('', $langs->trans('Task')); -if ($object->id > 0) -{ +if ($object->id > 0) { $projectstatic->fetch_thirdparty(); $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); - if (!empty($withproject)) - { + if (!empty($withproject)) { // Tabs for project $tab = 'tasks'; $head = project_prepare_head($projectstatic); @@ -141,17 +146,15 @@ if ($object->id > 0) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -163,39 +166,44 @@ if ($object->id > 0) print '<table class="border tableforfield centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -205,12 +213,16 @@ if ($object->id > 0) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -257,25 +269,24 @@ if ($object->id > 0) // Files list constructor $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } $param = (GETPOST('withproject') ? '&withproject=1' : ''); $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; $morehtmlref .= $projectstatic->getNomUrl(1); @@ -309,7 +320,9 @@ if ($object->id > 0) print '<br>'; $param = ''; - if ($withproject) $param .= '&withproject=1'; + if ($withproject) { + $param .= '&withproject=1'; + } $modulepart = 'project_task'; $permission = $user->rights->projet->creer; $permtoedit = $user->rights->projet->creer; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index b318b44f053..e842b409eae 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -47,10 +47,12 @@ $search_categ = GETPOST("search_categ", 'alpha'); $search_project = GETPOST('search_project'); $search_projectstatus = GETPOST('search_projectstatus'); -if (!isset($search_projectstatus) || $search_projectstatus === '') -{ - if ($search_all != '') $search_projectstatus = -1; - else $search_projectstatus = 1; +if (!isset($search_projectstatus) || $search_projectstatus === '') { + if ($search_all != '') { + $search_projectstatus = -1; + } else { + $search_projectstatus = 1; + } } $search_project_ref = GETPOST('search_project_ref'); @@ -65,7 +67,9 @@ $search_task_progress = GETPOST('search_task_progress'); $search_societe = GETPOST('search_societe'); $mine = $_REQUEST['mode'] == 'mine' ? 1 : 0; -if ($mine) { $search_task_user = $user->id; $mine = 0; } +if ($mine) { + $search_task_user = $user->id; $mine = 0; +} $search_sday = GETPOST('search_sday', 'int'); $search_smonth = GETPOST('search_smonth', 'int'); @@ -89,7 +93,9 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $diroutputmassaction = $conf->projet->dir_output.'/tasks/temp/massgeneration/'.$user->id; @@ -97,12 +103,18 @@ $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 (!$sortfield) $sortfield = 'p.ref'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'p.ref'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -111,29 +123,31 @@ $fieldstosearchall = array( 't.description'=>"Description", 't.note_public'=>"NotePublic", ); -if (empty($user->socid)) $fieldstosearchall['t.note_private'] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall['t.note_private'] = "NotePrivate"; +} $arrayfields = array( - 't.fk_task_parent'=>array('label'=>$langs->trans("RefTaskParent"), 'checked'=>0, 'position'=>70), - 't.ref'=>array('label'=>$langs->trans("RefTask"), 'checked'=>1, 'position'=>80), - 't.label'=>array('label'=>$langs->trans("LabelTask"), 'checked'=>1, 'position'=>80), - 't.description'=>array('label'=>$langs->trans("Description"), 'checked'=>0, 'position'=>80), - 't.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100), - 't.datee'=>array('label'=>$langs->trans("Deadline"), 'checked'=>1, 'position'=>101), - 'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1), - 'p.title'=>array('label'=>$langs->trans("ProjectLabel"), 'checked'=>0), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>0), - 'p.fk_statut'=>array('label'=>$langs->trans("ProjectStatus"), 'checked'=>1), - 't.planned_workload'=>array('label'=>$langs->trans("PlannedWorkload"), 'checked'=>1, 'position'=>102), - 't.duration_effective'=>array('label'=>$langs->trans("TimeSpent"), 'checked'=>1, 'position'=>103), - 't.progress_calculated'=>array('label'=>$langs->trans("ProgressCalculated"), 'checked'=>1, 'position'=>104), - 't.progress'=>array('label'=>$langs->trans("ProgressDeclared"), 'checked'=>1, 'position'=>105), - 't.progress_summary'=>array('label'=>$langs->trans("TaskProgressSummary"), 'checked'=>1, 'position'=>106), - 't.tobill'=>array('label'=>$langs->trans("TimeToBill"), 'checked'=>0, 'position'=>110), - 't.billed'=>array('label'=>$langs->trans("TimeBilled"), 'checked'=>0, 'position'=>111), - 't.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - //'t.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + 't.fk_task_parent'=>array('label'=>"RefTaskParent", 'checked'=>0, 'position'=>70), + 't.ref'=>array('label'=>"RefTask", 'checked'=>1, 'position'=>80), + 't.label'=>array('label'=>"LabelTask", 'checked'=>1, 'position'=>80), + 't.description'=>array('label'=>"Description", 'checked'=>0, 'position'=>80), + 't.dateo'=>array('label'=>"DateStart", 'checked'=>1, 'position'=>100), + 't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>101), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>0), + 'p.fk_statut'=>array('label'=>"ProjectStatus", 'checked'=>1), + 't.planned_workload'=>array('label'=>"PlannedWorkload", 'checked'=>1, 'position'=>102), + 't.duration_effective'=>array('label'=>"TimeSpent", 'checked'=>1, 'position'=>103), + 't.progress_calculated'=>array('label'=>"ProgressCalculated", 'checked'=>1, 'position'=>104), + 't.progress'=>array('label'=>"ProgressDeclared", 'checked'=>1, 'position'=>105), + 't.progress_summary'=>array('label'=>"TaskProgressSummary", 'checked'=>1, 'position'=>106), + 't.tobill'=>array('label'=>"TimeToBill", 'checked'=>0, 'position'=>110), + 't.billed'=>array('label'=>"TimeBilled", 'checked'=>0, 'position'=>111), + 't.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 't.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + //'t.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -146,21 +160,25 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_all = ""; $search_categ = ""; $search_project = ""; @@ -193,7 +211,9 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -if (empty($search_projectstatus) && $search_projectstatus == '') $search_projectstatus = 1; +if (empty($search_projectstatus) && $search_projectstatus == '') { + $search_projectstatus = 1; +} @@ -209,8 +229,12 @@ $socstatic = new Societe($db); $projectstatic = new Project($db); $puser = new User($db); $tuser = new User($db); -if ($search_project_user > 0) $puser->fetch($search_project_user); -if ($search_task_user > 0) $tuser->fetch($search_task_user); +if ($search_project_user > 0) { + $puser->fetch($search_project_user); +} +if ($search_task_user > 0) { + $tuser->fetch($search_task_user); +} $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; @@ -220,14 +244,15 @@ $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfi $title = $langs->trans("Activities"); //if ($search_task_user == $user->id) $title=$langs->trans("MyActivities"); -if ($id) -{ +if ($id) { $projectstatic->fetch($id); $projectstatic->fetch_thirdparty(); } // Get list of project id allowed to user (in a string list separated by coma) -if (!$user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); +if (!$user->rights->projet->all->lire) { + $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, $socid); +} //var_dump($projectsListId); // Get id of types of contacts for projects (This list never contains a lot of elements) @@ -236,28 +261,32 @@ $sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc" $sql .= " WHERE ctc.element = '".$db->escape($projectstatic->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); -if ($resql) -{ - while ($obj = $db->fetch_object($resql)) - { +if ($resql) { + while ($obj = $db->fetch_object($resql)) { $listofprojectcontacttype[$obj->rowid] = $obj->code; } -} else dol_print_error($db); -if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; // To avoid sql syntax error if not found +} 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 = '".$db->escape($object->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); -if ($resql) -{ - while ($obj = $db->fetch_object($resql)) - { +if ($resql) { + while ($obj = $db->fetch_object($resql)) { $listoftaskcontacttype[$obj->rowid] = $obj->code; } -} else dol_print_error($db); -if (count($listoftaskcontacttype) == 0) $listoftaskcontacttype[0] = '0'; // To avoid sql syntax error if not found +} else { + dol_print_error($db); +} +if (count($listoftaskcontacttype) == 0) { + $listoftaskcontacttype[0] = '0'; // To avoid sql syntax error if not found +} $distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is assigned only once. $sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.datee as projectdatee, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate, p.usage_bill_time,"; @@ -266,15 +295,18 @@ $sql .= " t.datec as date_creation, t.dateo as date_start, t.datee as date_end, $sql .= " t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut, "; $sql .= " t.description, t.fk_task_parent"; // We'll need these fields in order to filter by categ -if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_project"; +if ($search_categ) { + $sql .= ", cs.fk_categorie, cs.fk_project"; +} // Add sum fields -if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) -{ +if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) { $sql .= " , SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "1", "0").") as tobill, SUM(tt.task_duration * ".$db->ifsql("invoice_id IS NULL", "0", "1").") as billed"; } // 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(); @@ -283,69 +315,113 @@ $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; // We'll need this table joined to the select in order to filter by categ -if (!empty($search_categ)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ +} $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; -if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) -{ +if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tt ON tt.fk_task = t.rowid"; } -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)"; -if ($search_project_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ecp"; -if ($search_task_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ect"; +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)"; +} +if ($search_project_user > 0) { + $sql .= ", ".MAIN_DB_PREFIX."element_contact as ecp"; +} +if ($search_task_user > 0) { + $sql .= ", ".MAIN_DB_PREFIX."element_contact as ect"; +} $sql .= " WHERE t.fk_projet = p.rowid"; $sql .= " AND p.entity IN (".getEntity('project').')'; -if (!$user->rights->projet->all->lire) $sql .= " AND p.rowid IN (".($projectsListId ? $projectsListId : '0').")"; // public and assigned to projects, or restricted to company for external users -if (is_object($projectstatic) && $projectstatic->id > 0) $sql .= " AND p.rowid = ".$projectstatic->id; +if (!$user->rights->projet->all->lire) { + $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId ? $projectsListId : '0').")"; // public and assigned to projects, or restricted to company for external users +} +if (is_object($projectstatic) && $projectstatic->id > 0) { + $sql .= " AND p.rowid = ".((int) $projectstatic->id); +} // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser -if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; -if ($search_categ > 0) $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ); -if ($search_categ == -2) $sql .= " AND cs.fk_categorie IS NULL"; -if ($search_project_ref) $sql .= natural_search('p.ref', $search_project_ref); -if ($search_project_title) $sql .= natural_search('p.title', $search_project_title); -if ($search_task_ref) $sql .= natural_search('t.ref', $search_task_ref); -if ($search_task_label) $sql .= natural_search('t.label', $search_task_label); -if ($search_task_description) $sql .= natural_search('t.description', $search_task_description); -if ($search_task_ref_parent) $sql .= ' AND t.fk_task_parent IN (SELECT ipt.rowid FROM '.MAIN_DB_PREFIX.'projet_task as ipt WHERE '.natural_search('ipt.ref', $search_task_ref_parent, 0, 1).')'; -if ($search_task_progress) $sql .= natural_search('t.progress', $search_task_progress, 1); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); +if ($socid) { + $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")"; +} +if ($search_categ > 0) { + $sql .= " AND cs.fk_categorie = ".((int) $search_categ); +} +if ($search_categ == -2) { + $sql .= " AND cs.fk_categorie IS NULL"; +} +if ($search_project_ref) { + $sql .= natural_search('p.ref', $search_project_ref); +} +if ($search_project_title) { + $sql .= natural_search('p.title', $search_project_title); +} +if ($search_task_ref) { + $sql .= natural_search('t.ref', $search_task_ref); +} +if ($search_task_label) { + $sql .= natural_search('t.label', $search_task_label); +} +if ($search_task_description) { + $sql .= natural_search('t.description', $search_task_description); +} +if ($search_task_ref_parent) { + $sql .= ' AND t.fk_task_parent IN (SELECT ipt.rowid FROM '.MAIN_DB_PREFIX.'projet_task as ipt WHERE '.natural_search('ipt.ref', $search_task_ref_parent, 0, 1).')'; +} +if ($search_task_progress) { + $sql .= natural_search('t.progress', $search_task_progress, 1); +} +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} $sql .= dolSqlDateFilter('t.dateo', $search_sday, $search_smonth, $search_syear); $sql .= dolSqlDateFilter('t.datee', $search_eday, $search_emonth, $search_eyear); -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); -if ($search_projectstatus >= 0) -{ - if ($search_projectstatus == 99) $sql .= " AND p.fk_statut <> 2"; - else $sql .= " AND p.fk_statut = ".$db->escape($search_projectstatus); +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +} +if ($search_projectstatus >= 0) { + if ($search_projectstatus == 99) { + $sql .= " AND p.fk_statut <> 2"; + } else { + $sql .= " AND p.fk_statut = ".$db->escape($search_projectstatus); + } +} +if ($search_public != '') { + $sql .= " AND p.public = ".$db->escape($search_public); +} +if ($search_project_user > 0) { + $sql .= " AND ecp.fk_c_type_contact IN (".$db->sanitize(join(',', array_keys($listofprojectcontacttype))).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user; +} +if ($search_task_user > 0) { + $sql .= " AND ect.fk_c_type_contact IN (".$db->sanitize(join(',', array_keys($listoftaskcontacttype))).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$search_task_user; } -if ($search_public != '') $sql .= " AND p.public = ".$db->escape($search_public); -if ($search_project_user > 0) $sql .= " AND ecp.fk_c_type_contact IN (".join(',', array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user; -if ($search_task_user > 0) $sql .= " AND ect.fk_c_type_contact IN (".join(',', array_keys($listoftaskcontacttype)).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$search_task_user; // 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 $sql .= $hookmanager->resPrint; -if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) -{ +if (!empty($arrayfields['t.tobill']['checked']) || !empty($arrayfields['t.billed']['checked'])) { $sql .= " GROUP BY p.rowid, p.ref, p.title, p.fk_statut, p.datee, p.fk_opp_status, p.public, p.fk_user_creat,"; $sql .= " s.nom, s.rowid,"; $sql .= " t.datec, t.dateo, t.datee, t.tms,"; $sql .= " t.rowid, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut"; - if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_project"; + if ($search_categ) { + $sql .= ", cs.fk_categorie, cs.fk_project"; + } // 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 : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + } } } $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -356,8 +432,7 @@ $sql .= $db->plimit($limit + 1, $offset); dol_syslog("list allowed project", LOG_DEBUG); $resql = $db->query($sql); -if (!$resql) -{ +if (!$resql) { dol_print_error($db); exit; } @@ -366,8 +441,7 @@ $num = $db->num_rows($resql); $arrayofselected = is_array($toselect) ? $toselect : array(); -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($resql); $id = $obj->id; header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withproject=1'); @@ -378,47 +452,101 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos"; llxHeader("", $title, $help_url); $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_sday) $param .= '&search_sday='.urlencode($search_sday); -if ($search_smonth) $param .= '&search_smonth='.urlencode($search_smonth); -if ($search_syear) $param .= '&search_syear='.urlencode($search_syear); -if ($search_eday) $param .= '&search_eday='.urlencode($search_eday); -if ($search_emonth) $param .= '&search_emonth='.urlencode($search_emonth); -if ($search_eyear) $param .= '&search_eyear='.urlencode($search_eyear); -if ($socid) $param .= '&socid='.urlencode($socid); -if ($search_all != '') $param .= '&search_all='.urlencode($search_all); -if ($search_project_ref != '') $param .= '&search_project_ref='.urlencode($search_project_ref); -if ($search_project_title != '') $param .= '&search_project_title='.urlencode($search_project_title); -if ($search_task_ref != '') $param .= '&search_task_ref='.urlencode($search_ref); -if ($search_task_label != '') $param .= '&search_task_label='.urlencode($search_label); -if ($search_task_description != '') $param .= '&search_task_description='.urlencode($search_description); -if ($search_task_ref_parent != '') $param .= '&search_task_ref_parent='.urlencode($search_task_ref_parent); -if ($search_task_progress != '') $param .= '&search_task_progress='.urlencode($search_task_progress); -if ($search_societe != '') $param .= '&search_societe='.urlencode($search_societe); -if ($search_projectstatus != '') $param .= '&search_projectstatus='.urlencode($search_projectstatus); -if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all', 'none'))) $param .= '&search_opp_status='.urlencode($search_opp_status); -if ($search_public != '') $param .= '&search_public='.urlencode($search_public); -if ($search_project_user != '') $param .= '&search_project_user='.urlencode($search_project_user); -if ($search_task_user > 0) $param .= '&search_task_user='.urlencode($search_task_user); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($search_sday) { + $param .= '&search_sday='.urlencode($search_sday); +} +if ($search_smonth) { + $param .= '&search_smonth='.urlencode($search_smonth); +} +if ($search_syear) { + $param .= '&search_syear='.urlencode($search_syear); +} +if ($search_eday) { + $param .= '&search_eday='.urlencode($search_eday); +} +if ($search_emonth) { + $param .= '&search_emonth='.urlencode($search_emonth); +} +if ($search_eyear) { + $param .= '&search_eyear='.urlencode($search_eyear); +} +if ($socid) { + $param .= '&socid='.urlencode($socid); +} +if ($search_all != '') { + $param .= '&search_all='.urlencode($search_all); +} +if ($search_project_ref != '') { + $param .= '&search_project_ref='.urlencode($search_project_ref); +} +if ($search_project_title != '') { + $param .= '&search_project_title='.urlencode($search_project_title); +} +if ($search_task_ref != '') { + $param .= '&search_task_ref='.urlencode($search_ref); +} +if ($search_task_label != '') { + $param .= '&search_task_label='.urlencode($search_label); +} +if ($search_task_description != '') { + $param .= '&search_task_description='.urlencode($search_description); +} +if ($search_task_ref_parent != '') { + $param .= '&search_task_ref_parent='.urlencode($search_task_ref_parent); +} +if ($search_task_progress != '') { + $param .= '&search_task_progress='.urlencode($search_task_progress); +} +if ($search_societe != '') { + $param .= '&search_societe='.urlencode($search_societe); +} +if ($search_projectstatus != '') { + $param .= '&search_projectstatus='.urlencode($search_projectstatus); +} +if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all', 'none'))) { + $param .= '&search_opp_status='.urlencode($search_opp_status); +} +if ($search_public != '') { + $param .= '&search_public='.urlencode($search_public); +} +if ($search_project_user != '') { + $param .= '&search_project_user='.urlencode($search_project_user); +} +if ($search_task_user > 0) { + $param .= '&search_task_user='.urlencode($search_task_user); +} +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( -// 'presend'=>$langs->trans("SendByMail"), -// 'builddoc'=>$langs->trans("PDFMerge"), +// 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); -if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->societe->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = dolGetButtonTitle($langs->trans('NewTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create', '', $user->rights->projet->creer); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="list">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; @@ -429,10 +557,14 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; // Show description of content $texthelp = ''; -if ($search_task_user == $user->id) $texthelp .= $langs->trans("MyTasksDesc"); -else { - if ($user->rights->projet->all->lire && !$socid) $texthelp .= $langs->trans("TasksOnProjectsDesc"); - else $texthelp .= $langs->trans("TasksOnProjectsPublicDesc"); +if ($search_task_user == $user->id) { + $texthelp .= $langs->trans("MyTasksDesc"); +} else { + if ($user->rights->projet->all->lire && !$socid) { + $texthelp .= $langs->trans("TasksOnProjectsDesc"); + } else { + $texthelp .= $langs->trans("TasksOnProjectsPublicDesc"); + } } print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'projecttask', 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -443,42 +575,45 @@ $objecttmp = new Task($db); $trackid = 'tas'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } $morehtmlfilter = ''; // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('ProjectCategories').': '; - $moreforfilter .= $formother->select_categories('project', $search_categ, 'search_categ', 1, 'maxwidth300'); + $tmptitle = $langs->trans('ProjectCategories'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('project', $search_categ, 'search_categ', 0, $tmptitle, 'maxwidth300'); $moreforfilter .= '</div>'; } // If the user can view users $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('ProjectsWithThisUserAsContact').' '; +$tmptitle = $langs->trans('ProjectsWithThisUserAsContact'); $includeonly = ''; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200'); +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_project_user ? $search_project_user : '', 'search_project_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '</div>'; // If the user can view users $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('TasksWithThisUserAsContact').': '; +$tmptitle = $langs->trans('TasksWithThisUserAsContact'); $includeonly = ''; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $form->select_dolusers($search_task_user, 'search_task_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth200'); +if (empty($user->rights->user->user->lire)) { + $includeonly = array($user->id); +} +$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_task_user, 'search_task_user', $tmptitle, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '</div>'; -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -487,109 +622,116 @@ if (!empty($moreforfilter)) print '</div>'; } -if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} print '<div class="div-table-responsive">'; print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n"; print '<tr class="liste_titre_filter">'; -if (!empty($arrayfields['t.fk_task_parent']['checked'])) -{ +if (!empty($arrayfields['t.fk_task_parent']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_task_ref_parent" value="'.dol_escape_htmltag($search_task_ref_parent).'" size="4">'; print '</td>'; } -if (!empty($arrayfields['t.ref']['checked'])) -{ +if (!empty($arrayfields['t.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'" size="4">'; print '</td>'; } -if (!empty($arrayfields['t.label']['checked'])) -{ +if (!empty($arrayfields['t.label']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'" size="8">'; print '</td>'; } // Task Description -if (!empty($arrayfields['t.description']['checked'])) -{ +if (!empty($arrayfields['t.description']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_task_description" value="'.dol_escape_htmltag($search_task_description).'" size="8">'; print '</td>'; } // Start date -if (!empty($arrayfields['t.dateo']['checked'])) -{ +if (!empty($arrayfields['t.dateo']['checked'])) { print '<td class="liste_titre center minwidth150">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_sday" value="'.$search_sday.'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat" type="text" size="1" maxlength="2" name="search_sday" value="'.$search_sday.'">'; + } print '<input class="flat" type="text" size="1" maxlength="2" name="search_smonth" value="'.$search_smonth.'">'; - $formother->select_year($search_syear ? $search_syear : -1, 'search_syear', 1, 20, 5); + print $formother->selectyear($search_syear ? $search_syear : -1, 'search_syear', 1, 20, 5, 0, 0, '', 'valignmiddle width75', 1); print '</td>'; } // End date -if (!empty($arrayfields['t.datee']['checked'])) -{ +if (!empty($arrayfields['t.datee']['checked'])) { print '<td class="liste_titre center minwidth150">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_eday" value="'.$search_eday.'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat" type="text" size="1" maxlength="2" name="search_eday" value="'.$search_eday.'">'; + } print '<input class="flat" type="text" size="1" maxlength="2" name="search_emonth" value="'.$search_emonth.'">'; - $formother->select_year($search_eyear ? $search_eyear : -1, 'search_eyear', 1, 20, 5); + print $formother->selectyear($search_eyear ? $search_eyear : -1, 'search_eyear', 1, 20, 5, 0, 0, '', 'valignmiddle width75', 1); print '</td>'; } -if (!empty($arrayfields['p.ref']['checked'])) -{ +if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_project_ref" value="'.$search_project_ref.'" size="4">'; print '</td>'; } -if (!empty($arrayfields['p.title']['checked'])) -{ +if (!empty($arrayfields['p.title']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_project_title" value="'.$search_project_title.'" size="6">'; print '</td>'; } -if (!empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_societe" value="'.dol_escape_htmltag($search_societe).'" size="4">'; print '</td>'; } -if (!empty($arrayfields['p.fk_statut']['checked'])) -{ +if (!empty($arrayfields['p.fk_statut']['checked'])) { print '<td class="liste_titre center">'; $arrayofstatus = array(); - foreach ($projectstatic->statuts_short as $key => $val) $arrayofstatus[$key] = $langs->trans($val); + foreach ($projectstatic->statuts_short as $key => $val) { + $arrayofstatus[$key] = $langs->trans($val); + } $arrayofstatus['99'] = $langs->trans("NotClosed").' ('.$langs->trans('Draft').'+'.$langs->trans('Opened').')'; print $form->selectarray('search_projectstatus', $arrayofstatus, $search_projectstatus, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); print '</td>'; } -if (!empty($arrayfields['t.planned_workload']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.duration_effective']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.progress_calculated']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.progress']['checked'])) -{ +if (!empty($arrayfields['t.planned_workload']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.duration_effective']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.progress_calculated']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.progress']['checked'])) { print '<td class="liste_titre center">'; print '<input type="text" class="flat" name="search_task_progress" value="'.$search_task_progress.'" size="4">'; print '</td>'; } -if (!empty($arrayfields['t.progress_summary']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.tobill']['checked'])) print '<td class="liste_titre"></td>'; -if (!empty($arrayfields['t.billed']['checked'])) print '<td class="liste_titre"></td>'; +if (!empty($arrayfields['t.progress_summary']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.tobill']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['t.billed']['checked'])) { + print '<td class="liste_titre"></td>'; +} // 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'])) -{ +if (!empty($arrayfields['t.datec']['checked'])) { // Date creation print '<td class="liste_titre">'; print '</td>'; } -if (!empty($arrayfields['t.tms']['checked'])) -{ +if (!empty($arrayfields['t.tms']['checked'])) { // Date modification print '<td class="liste_titre">'; print '</td>'; @@ -602,44 +744,85 @@ print '</td>'; print "</tr>\n"; print '<tr class="liste_titre">'; -if (!empty($arrayfields['t.fk_task_parent']['checked'])) print_liste_field_titre($arrayfields['t.fk_task_parent']['label'], $_SERVER["PHP_SELF"], "t.fk_task_parent", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['t.label']['checked'])) print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER["PHP_SELF"], "t.label", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['t.description']['checked'])) print_liste_field_titre($arrayfields['t.description']['label'], $_SERVER["PHP_SELF"], "t.description", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['t.dateo']['checked'])) print_liste_field_titre($arrayfields['t.dateo']['label'], $_SERVER["PHP_SELF"], "t.dateo", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.datee']['checked'])) print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "t.datee", "", $param, '', $sortfield, $sortorder, 'center '); -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.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.planned_workload']['checked'])) print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "t.planned_workload", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "t.duration_effective", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'center '); -if (!empty($arrayfields['t.progress']['checked'])) print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "t.progress", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.progress_summary']['checked'])) print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "t.progress", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.tobill']['checked'])) print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['t.billed']['checked'])) print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['t.fk_task_parent']['checked'])) { + print_liste_field_titre($arrayfields['t.fk_task_parent']['label'], $_SERVER["PHP_SELF"], "t.fk_task_parent", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['t.ref']['checked'])) { + print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['t.label']['checked'])) { + print_liste_field_titre($arrayfields['t.label']['label'], $_SERVER["PHP_SELF"], "t.label", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['t.description']['checked'])) { + print_liste_field_titre($arrayfields['t.description']['label'], $_SERVER["PHP_SELF"], "t.description", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['t.dateo']['checked'])) { + print_liste_field_titre($arrayfields['t.dateo']['label'], $_SERVER["PHP_SELF"], "t.dateo", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.datee']['checked'])) { + print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "t.datee", "", $param, '', $sortfield, $sortorder, 'center '); +} +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.title']['checked'])) { + print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['p.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.planned_workload']['checked'])) { + print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "t.planned_workload", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.duration_effective']['checked'])) { + print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "t.duration_effective", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.progress_calculated']['checked'])) { + print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', '', '', 'center '); +} +if (!empty($arrayfields['t.progress']['checked'])) { + print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "t.progress", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.progress_summary']['checked'])) { + print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "t.progress", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.tobill']['checked'])) { + print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['t.billed']['checked'])) { + print_liste_field_titre($arrayfields['t.billed']['label'], $_SERVER["PHP_SELF"], "", "", $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); $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.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 '); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; $plannedworkloadoutputformat = 'allhourmin'; $timespentoutputformat = 'allhourmin'; -if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; -if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; +if (!empty($conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT)) { + $plannedworkloadoutputformat = $conf->global->PROJECT_PLANNED_WORKLOAD_FORMAT; +} +if (!empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) { + $timespentoutputformat = $conf->global->PROJECT_TIME_SPENT_FORMAT; +} $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $object->id = $obj->id; @@ -663,8 +846,7 @@ while ($i < min($num, $limit)) $projectstatic->datee = $db->jdate($obj->projectdatee); $userAccess = $projectstatic->restrictedProjectArea($user); // why this ? - if ($userAccess >= 0) - { + if ($userAccess >= 0) { print '<tr data-rowid="'.$object->id.'" class="oddeven">'; // Ref Parent @@ -677,77 +859,89 @@ while ($i < min($num, $limit)) setEventMessage($object_parent->error, 'errors'); } else { print $object_parent->getNomUrl(1, 'withproject'); - if ($object_parent->hasDelay()) + if ($object_parent->hasDelay()) { print img_warning("Late"); + } } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Ref - if (!empty($arrayfields['t.ref']['checked'])) - { + if (!empty($arrayfields['t.ref']['checked'])) { print '<td class="nowraponall">'; print $object->getNomUrl(1, 'withproject'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Label - if (!empty($arrayfields['t.label']['checked'])) - { + if (!empty($arrayfields['t.label']['checked'])) { print '<td>'; print $object->label; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Description - if (!empty($arrayfields['t.description']['checked'])) - { + if (!empty($arrayfields['t.description']['checked'])) { print '<td>'; print $object->description; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date start - if (!empty($arrayfields['t.dateo']['checked'])) - { + if (!empty($arrayfields['t.dateo']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_start), 'day'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date end - if (!empty($arrayfields['t.datee']['checked'])) - { + if (!empty($arrayfields['t.datee']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_end), 'day'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project ref - if (!empty($arrayfields['p.ref']['checked'])) - { + if (!empty($arrayfields['p.ref']['checked'])) { print '<td class="nowraponall tdoverflowmax150">'; print $projectstatic->getNomUrl(1, 'task'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project title - if (!empty($arrayfields['p.title']['checked'])) - { + if (!empty($arrayfields['p.title']['checked'])) { print '<td>'; print dol_trunc($obj->projecttitle, 80); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td>'; - if ($obj->socid) - { + if ($obj->socid) { $socstatic->id = $obj->socid; $socstatic->name = $obj->name; print $socstatic->getNomUrl(1); @@ -755,100 +949,131 @@ while ($i < min($num, $limit)) print '&nbsp;'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Project status - if (!empty($arrayfields['p.fk_statut']['checked'])) - { + if (!empty($arrayfields['p.fk_statut']['checked'])) { print '<td class="center">'; print $projectstatic->getLibStatut(1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Planned workload - if (!empty($arrayfields['t.planned_workload']['checked'])) - { + if (!empty($arrayfields['t.planned_workload']['checked'])) { print '<td class="center">'; $fullhour = convertSecondToTime($obj->planned_workload, $plannedworkloadoutputformat); $workingdelay = convertSecondToTime($obj->planned_workload, 'all', 86400, 7); // TODO Replace 86400 and 7 to take account working hours per day and working day per weeks - if ($obj->planned_workload != '') - { + if ($obj->planned_workload != '') { print $fullhour; // TODO Add delay taking account of working hours per day and working day per week //if ($workingdelay != $fullhour) print '<br>('.$workingdelay.')'; } //else print '--:--'; print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.planned_workload'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.planned_workload'; + } $totalarray['val']['t.planned_workload'] += $obj->planned_workload; - if (!$i) $totalarray['totalplannedworkloadfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['totalplannedworkloadfield'] = $totalarray['nbfield']; + } $totalarray['totalplannedworkload'] += $obj->planned_workload; } // Time spent - if (!empty($arrayfields['t.duration_effective']['checked'])) - { + if (!empty($arrayfields['t.duration_effective']['checked'])) { $showlineingray = 0; $showproject = 1; print '<td class="center">'; - if ($showlineingray) print '<i>'; - else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.($showproject ? '' : '&withproject=1').'">'; - if ($obj->duration_effective) print convertSecondToTime($obj->duration_effective, $timespentoutputformat); - else print '--:--'; - if ($showlineingray) print '</i>'; - else print '</a>'; + if ($showlineingray) { + print '<i>'; + } else { + print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.($showproject ? '' : '&withproject=1').'">'; + } + if ($obj->duration_effective) { + print convertSecondToTime($obj->duration_effective, $timespentoutputformat); + } else { + print '--:--'; + } + if ($showlineingray) { + print '</i>'; + } else { + print '</a>'; + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.duration_effective'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.duration_effective'; + } $totalarray['val']['t.duration_effective'] += $obj->duration_effective; - if (!$i) $totalarray['totaldurationeffectivefield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['totaldurationeffectivefield'] = $totalarray['nbfield']; + } $totalarray['totaldurationeffective'] += $obj->duration_effective; } // Calculated progress - if (!empty($arrayfields['t.progress_calculated']['checked'])) - { + if (!empty($arrayfields['t.progress_calculated']['checked'])) { print '<td class="center">'; - if ($obj->planned_workload || $obj->duration_effective) - { - if ($obj->planned_workload) print round(100 * $obj->duration_effective / $obj->planned_workload, 2).' %'; - else print $form->textwithpicto('', $langs->trans('WorkloadNotDefined'), 1, 'help'); + if ($obj->planned_workload || $obj->duration_effective) { + if ($obj->planned_workload) { + print round(100 * $obj->duration_effective / $obj->planned_workload, 2).' %'; + } else { + print $form->textwithpicto('', $langs->trans('WorkloadNotDefined'), 1, 'help'); + } } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['totalprogress_calculatedfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['totalprogress_calculatedfield'] = $totalarray['nbfield']; + } } // Declared progress - if (!empty($arrayfields['t.progress']['checked'])) - { + if (!empty($arrayfields['t.progress']['checked'])) { print '<td class="center">'; - if ($obj->progress != '') - { + if ($obj->progress != '') { print getTaskProgressBadge($object); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.progress'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.progress'; + } $totalarray['val']['t.progress'] += ($obj->planned_workload * $obj->progress / 100); - if (!$i) $totalarray['totalprogress_declaredfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['totalprogress_declaredfield'] = $totalarray['nbfield']; + } $totalarray['totaldurationdeclared'] += $obj->planned_workload * $obj->progress / 100; } // Progress summary - if (!empty($arrayfields['t.progress_summary']['checked'])) - { + if (!empty($arrayfields['t.progress_summary']['checked'])) { print '<td class="center">'; if ($obj->progress != '' && $obj->duration_effective) { print getTaskProgressView($object, false, false); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['totalprogress_summary'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['totalprogress_summary'] = $totalarray['nbfield']; + } } // Time not billed - if (!empty($arrayfields['t.tobill']['checked'])) - { + if (!empty($arrayfields['t.tobill']['checked'])) { print '<td class="center">'; - if ($obj->usage_bill_time) - { + if ($obj->usage_bill_time) { print convertSecondToTime($obj->tobill, 'allhourmin'); $totalarray['val']['t.tobill'] += $obj->tobill; $totalarray['totaltobill'] += $obj->tobill; @@ -856,16 +1081,20 @@ while ($i < min($num, $limit)) print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.tobill'; - if (!$i) $totalarray['totaltobillfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.tobill'; + } + if (!$i) { + $totalarray['totaltobillfield'] = $totalarray['nbfield']; + } } // Time billed - if (!empty($arrayfields['t.billed']['checked'])) - { + if (!empty($arrayfields['t.billed']['checked'])) { print '<td class="center">'; - if ($obj->usage_bill_time) - { + if ($obj->usage_bill_time) { print convertSecondToTime($obj->billed, 'allhourmin'); $totalarray['val']['t.billed'] += $obj->billed; $totalarray['totalbilled'] += $obj->billed; @@ -873,9 +1102,15 @@ while ($i < min($num, $limit)) print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.billed'; - if (!$i) $totalarray['totalbilledfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.billed'; + } + if (!$i) { + $totalarray['totalbilledfield'] = $totalarray['nbfield']; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -884,37 +1119,42 @@ while ($i < min($num, $limit)) $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'])) - { + if (!empty($arrayfields['t.datec']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['t.tms']['checked'])) - { + if (!empty($arrayfields['t.tms']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status /*if (! empty($arrayfields['p.fk_statut']['checked'])) { - $projectstatic->statut = $obj->fk_statut; - print '<td class="right">'.$projectstatic->getLibStatut(5).'</td>'; + $projectstatic->statut = $obj->fk_statut; + print '<td class="right">'.$projectstatic->getLibStatut(5).'</td>'; }*/ // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->id, $arrayofselected)) $selected = 1; + if (in_array($obj->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; } @@ -923,24 +1163,32 @@ while ($i < min($num, $limit)) } // Show total line if (isset($totalarray['totaldurationeffectivefield']) || isset($totalarray['totalplannedworkloadfield']) || isset($totalarray['totalprogress_calculatedfield']) - || isset($totalarray['totaltobill']) || isset($totalarray['totalbilled'])) -{ + || isset($totalarray['totaltobill']) || isset($totalarray['totalbilled'])) { print '<tr class="liste_total">'; $i = 0; - while ($i < $totalarray['nbfield']) - { + while ($i < $totalarray['nbfield']) { $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; - } elseif ($totalarray['totalplannedworkloadfield'] == $i) print '<td class="center">'.convertSecondToTime($totalarray['totalplannedworkload'], $plannedworkloadoutputformat).'</td>'; - elseif ($totalarray['totaldurationeffectivefield'] == $i) print '<td class="center">'.convertSecondToTime($totalarray['totaldurationeffective'], $timespentoutputformat).'</td>'; - elseif ($totalarray['totalprogress_calculatedfield'] == $i) print '<td class="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>'; - elseif ($totalarray['totalprogress_declaredfield'] == $i) print '<td class="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationdeclared'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>'; - elseif ($totalarray['totaltobillfield'] == $i) print '<td class="center">'.convertSecondToTime($totalarray['totaltobill'], $plannedworkloadoutputformat).'</td>'; - elseif ($totalarray['totalbilledfield'] == $i) print '<td class="center">'.convertSecondToTime($totalarray['totalbilled'], $plannedworkloadoutputformat).'</td>'; - else print '<td></td>'; + if ($i == 1) { + if ($num < $limit && empty($offset)) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } + } elseif ($totalarray['totalplannedworkloadfield'] == $i) { + print '<td class="center">'.convertSecondToTime($totalarray['totalplannedworkload'], $plannedworkloadoutputformat).'</td>'; + } elseif ($totalarray['totaldurationeffectivefield'] == $i) { + print '<td class="center">'.convertSecondToTime($totalarray['totaldurationeffective'], $timespentoutputformat).'</td>'; + } elseif ($totalarray['totalprogress_calculatedfield'] == $i) { + print '<td class="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationeffective'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>'; + } elseif ($totalarray['totalprogress_declaredfield'] == $i) { + print '<td class="center">'.($totalarray['totalplannedworkload'] > 0 ? round(100 * $totalarray['totaldurationdeclared'] / $totalarray['totalplannedworkload'], 2).' %' : '').'</td>'; + } elseif ($totalarray['totaltobillfield'] == $i) { + print '<td class="center">'.convertSecondToTime($totalarray['totaltobill'], $plannedworkloadoutputformat).'</td>'; + } elseif ($totalarray['totalbilledfield'] == $i) { + print '<td class="center">'.convertSecondToTime($totalarray['totalbilled'], $plannedworkloadoutputformat).'</td>'; + } else { + print '<td></td>'; + } } print '</tr>'; } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 2d13d25fcdd..4d581afc30a 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -41,20 +41,26 @@ $project_ref = GETPOST('project_ref', 'alpha'); // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} //$result = restrictedArea($user, 'projet', $id, '', 'task'); // TODO ameliorer la verification $object = new Task($db); $projectstatic = new Project($db); -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $projectstatic->fetch($object->fk_project); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $object->project = clone $projectstatic; } else { @@ -64,13 +70,10 @@ if ($id > 0 || !empty($ref)) // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch(0, $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch(0, $project_ref) > 0) { $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $id = $tasksarray[0]->id; $object->fetch($id); } else { @@ -100,12 +103,10 @@ $userstatic = new User($db); $now = dol_now(); -if ($object->id > 0) -{ +if ($object->id > 0) { $userWrite = $projectstatic->restrictedProjectArea($user, 'write'); - if (!empty($withproject)) - { + if (!empty($withproject)) { // Tabs for project $tab = 'tasks'; $head = project_prepare_head($projectstatic); @@ -120,17 +121,15 @@ if ($object->id > 0) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -142,40 +141,44 @@ if ($object->id > 0) print '<table class="border tableforfield centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -185,12 +188,16 @@ if ($object->id > 0) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -238,17 +245,17 @@ if ($object->id > 0) $param = (GETPOST('withproject') ? '&withproject=1' : ''); $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; $morehtmlref .= $projectstatic->getNomUrl(1); diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index 571560518ab..531b9eb7b3a 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -28,8 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/taskstats.class.php'; // Security check -if (!$user->rights->projet->lire) +if (!$user->rights->projet->lire) { accessforbidden(); +} $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); @@ -38,8 +39,7 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -65,7 +65,7 @@ $includeuserlist = array(); llxHeader('', $langs->trans('Tasks')); $title = $langs->trans("TasksStatistics"); -$dir = $conf->projet->dir_output.'/temp'; +$dir = $conf->project->dir_output.'/temp'; print load_fiche_titre($title, '', 'projecttask'); @@ -73,9 +73,15 @@ dol_mkdir($dir); $stats_tasks = new TaskStats($db); -if (!empty($userid) && $userid != -1) $stats_tasks->userid = $userid; -if (!empty($socid) && $socid != -1) $stats_tasks->socid = $socid; -if (!empty($year)) $stats_tasks->year = $year; +if (!empty($userid) && $userid != -1) { + $stats_tasks->userid = $userid; +} +if (!empty($socid) && $socid != -1) { + $stats_tasks->socid = $socid; +} +if (!empty($year)) { + $stats_tasks->year = $year; +} @@ -89,12 +95,10 @@ $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=taskstats&amp;file=tasknbpr $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -116,22 +120,26 @@ if (!$mesg) $stats_tasks->year = 0; $data_all_year = $stats_tasks->getAllByYear(); -if (!empty($year)) $stats_tasks->year = $year; +if (!empty($year)) { + $stats_tasks->year = $year; +} $arrayyears = array(); foreach ($data_all_year as $val) { $arrayyears[$val['year']] = $val['year']; } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); -$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php?mode='.$mode; +$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/stats/index.php'; $head[$h][1] = $langs->trans("ByMonthYear"); $head[$h][2] = 'byyear'; $h++; -complete_head_from_modules($conf, $langs, null, $head, $h, $type); +complete_head_from_modules($conf, $langs, null, $head, $h, 'project_tasks_stats'); print dol_get_fiche_head($head, 'byyear', $langs->trans("Statistics"), -1, ''); @@ -154,8 +162,12 @@ print $form->select_dolusers($userid, 'userid', 1, array(),0,$includeuserlist); print '</td></tr>';*/ // Year print '<tr><td>'.$langs->trans("Year").'</td><td>'; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; -if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -173,21 +185,19 @@ print '<td class="right">'.$langs->trans("NbOfTasks").'</td>'; print '</tr>'; $oldyear = 0; -foreach ($data_all_year as $val) -{ +foreach ($data_all_year as $val) { $year = $val['year']; - while ($year && $oldyear > $year + 1) - { // If we have empty year + while ($year && $oldyear > $year + 1) { // If we have empty year $oldyear--; print '<tr class="oddeven" height="24">'; - print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>'; + print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>'; print '<td class="right">0</td>'; print '</tr>'; } print '<tr class="oddeven" height="24">'; - print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>'; + print '<td><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>'; print '<td class="right">'.$val['nb'].'</td>'; print '</tr>'; $oldyear = $year; @@ -198,8 +208,10 @@ print '</div>'; print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; -$stringtoshow .= '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; -if ($mesg) { print $mesg; } else { +$stringtoshow = '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; +if ($mesg) { + print $mesg; +} else { $stringtoshow .= $px1->show(); $stringtoshow .= "<br>\n"; } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 1b086ee2c69..780d387512e 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -49,7 +49,9 @@ $planned_workload = ((GETPOST('planned_workloadhour', 'int') != '' || GETPOST('p // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('projecttaskcard', 'globalcard')); @@ -63,34 +65,34 @@ $extrafields->fetch_name_optionals_label($object->table_element); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} /* * Actions */ -if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer) -{ +if ($action == 'update' && !GETPOST("cancel") && $user->rights->projet->creer) { $error = 0; - if (empty($taskref)) - { + if (empty($taskref)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); } - if (empty($_POST["label"])) - { + if (!GETPOST("label")) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } - if (!$error) - { + if (!$error) { $object->fetch($id, $ref); $object->oldcopy = clone $object; $tmparray = explode('_', $_POST['task_parent']); $task_parent = $tmparray[1]; - if (empty($task_parent)) $task_parent = 0; // If task_parent is '' + if (empty($task_parent)) { + $task_parent = 0; // If task_parent is '' + } $object->ref = $taskref ? $taskref : GETPOST("ref", 'alpha', 2); $object->label = GETPOST("label", "alphanohtml"); @@ -103,13 +105,13 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -118,15 +120,12 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer) } } -if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->supprimer) -{ - if ($object->fetch($id, $ref) >= 0) - { +if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->supprimer) { + if ($object->fetch($id, $ref) >= 0) { $result = $projectstatic->fetch($object->fk_project); $projectstatic->fetch_thirdparty(); - if ($object->delete($user) > 0) - { + if ($object->delete($user) > 0) { header('Location: '.DOL_URL_ROOT.'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ? '&withproject=1' : '')); exit; } else { @@ -137,13 +136,10 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->s } // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch('', $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch('', $project_ref) > 0) { $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $id = $tasksarray[0]->id; } else { header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ? '' : '&mode='.$mode)); @@ -152,41 +148,41 @@ if (!empty($project_ref) && !empty($withproject)) } // Build doc -if ($action == 'builddoc' && $user->rights->projet->creer) -{ +if ($action == 'builddoc' && $user->rights->projet->creer) { $object->fetch($id, $ref); // Save last template used to generate document - if (GETPOST('model')) $object->setDocModel($user, GETPOST('model', 'alpha')); + if (GETPOST('model')) { + $object->setDocModel($user, GETPOST('model', 'alpha')); + } $outputlangs = $langs; - if (GETPOST('lang_id', 'aZ09')) - { + if (GETPOST('lang_id', 'aZ09')) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang(GETPOST('lang_id', 'aZ09')); } $result = $object->generateDocument($object->model_pdf, $outputlangs); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } // Delete file in doc form -if ($action == 'remove_file' && $user->rights->projet->creer) -{ +if ($action == 'remove_file' && $user->rights->projet->creer) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if ($object->fetch($id, $ref) >= 0) - { + if ($object->fetch($id, $ref) >= 0) { $langs->load("other"); $upload_dir = $conf->projet->dir_output; $file = $upload_dir.'/'.dol_sanitizeFileName(GETPOST('file')); $ret = dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } } } @@ -201,23 +197,26 @@ $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $res = $object->fetch_optionals(); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $result = $projectstatic->fetch($object->fk_project); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $object->project = clone $projectstatic; //$userWrite = $projectstatic->restrictedProjectArea($user, 'write'); - if (!empty($withproject)) - { + if (!empty($withproject)) { // Tabs for project $tab = 'tasks'; $head = project_prepare_head($projectstatic); @@ -233,17 +232,15 @@ if ($id > 0 || !empty($ref)) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -255,39 +252,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -297,12 +299,16 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -374,8 +380,7 @@ if ($id > 0 || !empty($ref)) $head = task_prepare_head($object); - if ($action == 'edit' && $user->rights->projet->creer) - { + if ($action == 'edit' && $user->rights->projet->creer) { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -395,16 +400,18 @@ if ($id > 0 || !empty($ref)) print '<td><input class="minwidth500" name="label" value="'.$object->label.'"></td></tr>'; // Project - if (empty($withproject)) - { + if (empty($withproject)) { print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">'; print $projectstatic->getNomUrl(1); print '</td></tr>'; // Third party print '<td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'; - if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); - else print '&nbsp;'; + if ($projectstatic->societe->id) { + print $projectstatic->societe->getNomUrl(1); + } else { + print '&nbsp;'; + } print '</td></tr>'; } @@ -443,8 +450,7 @@ if ($id > 0 || !empty($ref)) $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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -467,22 +473,21 @@ if ($id > 0 || !empty($ref)) print dol_get_fiche_head($head, 'task_task', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject, $langs->trans("DeleteATask"), $langs->trans("ConfirmDeleteATask"), "confirm_delete"); + if ($action == 'delete') { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".GETPOST("id", 'int').'&withproject='.$withproject, $langs->trans("DeleteATask"), $langs->trans("ConfirmDeleteATask"), "confirm_delete"); } - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id); + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; $morehtmlref .= $projectstatic->getNomUrl(1); @@ -506,8 +511,7 @@ if ($id > 0 || !empty($ref)) // Task parent print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; - if ($object->fk_task_parent > 0) - { + if ($object->fk_task_parent > 0) { $tasktmp = new Task($db); $tasktmp->fetch($object->fk_task_parent); print $tasktmp->getNomUrl(1); @@ -521,13 +525,14 @@ if ($id > 0 || !empty($ref)) $end = dol_print_date($object->date_end, 'dayhour'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Planned workload print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td colspan="3">'; - if ($object->planned_workload != '') - { + if ($object->planned_workload != '') { print convertSecondToTime($object->planned_workload, 'allhourmin'); } print '</td></tr>'; @@ -547,20 +552,23 @@ if ($id > 0 || !empty($ref)) // Progress declared print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td colspan="3">'; - if ($object->progress != '') - { + if ($object->progress != '') { print $object->progress.' %'; } print '</td></tr>'; // Progress calculated print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td colspan="3">'; - if ($object->planned_workload != '') - { + if ($object->planned_workload != '') { $tmparray = $object->getSummaryOfTimeSpent(); - if ($tmparray['total_duration'] > 0 && !empty($object->planned_workload)) print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; - else print '0 %'; - } else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; + if ($tmparray['total_duration'] > 0 && !empty($object->planned_workload)) { + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; + } else { + print '0 %'; + } + } else { + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; + } print '</td></tr>'; // Other attributes @@ -580,32 +588,27 @@ if ($id > 0 || !empty($ref)) } - if ($action != 'edit') - { + if ($action != 'edit') { /* * Actions - */ + */ print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { // Modify - if ($user->rights->projet->creer) - { + if ($user->rights->projet->creer) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit&amp;withproject='.$withproject.'">'.$langs->trans('Modify').'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Modify').'</a>'; } // Delete - if ($user->rights->projet->supprimer) - { - if (!$object->hasChildren() && !$object->hasTimeSpent()) - { + if ($user->rights->projet->supprimer) { + if (!$object->hasChildren() && !$object->hasTimeSpent()) { print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'&amp;withproject='.$withproject.'">'.$langs->trans('Delete').'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("TaskHasChild").'">'.$langs->trans('Delete').'</a>'; @@ -621,7 +624,7 @@ if ($id > 0 || !empty($ref)) print '<a name="builddoc"></a>'; // ancre /* - * Documents generes + * Generated documents */ $filename = dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref); $filedir = $conf->projet->dir_output."/".dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 534a7ec09f5..1c3cacb4cee 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; // Load translation files required by the page -$langs->loadLangs(array('projects', 'bills', 'orders')); +$langsLoad=array('projects', 'bills', 'orders'); +if (!empty($conf->eventorganization->enabled)) { + $langsLoad[]='eventorganization'; +} + +$langs->loadLangs($langsLoad); $action = GETPOST('action', 'alpha'); $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) @@ -71,18 +76,26 @@ $search_valuebilled = GETPOST('search_valuebilled', 'int'); // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. -if (!$user->rights->projet->lire) accessforbidden(); +if (!$user->rights->projet->lire) { + accessforbidden(); +} $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 (!$sortfield) $sortfield = 't.task_date,t.task_datehour,t.rowid'; -if (!$sortorder) $sortorder = 'DESC,DESC,DESC'; +if (!$sortfield) { + $sortfield = 't.task_date,t.task_datehour,t.rowid'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC,DESC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context //$object = new TaskTime($db); @@ -99,18 +112,23 @@ $extrafields->fetch_name_optionals_label($object->table_element); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_generateinvoice') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_generateinvoice') { + $massaction = ''; +} $parameters = array('socid'=>$socid, 'projectid'=>$projectid); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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_day = ''; $search_month = ''; $search_year = ''; @@ -131,32 +149,26 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $action = ''; } -if ($action == 'addtimespent' && $user->rights->projet->lire) -{ +if ($action == 'addtimespent' && $user->rights->projet->lire) { $error = 0; $timespent_durationhour = GETPOST('timespent_durationhour', 'int'); $timespent_durationmin = GETPOST('timespent_durationmin', 'int'); - if (empty($timespent_durationhour) && empty($timespent_durationmin)) - { + if (empty($timespent_durationhour) && empty($timespent_durationmin)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Duration")), null, 'errors'); $error++; } - if (empty($_POST["userid"])) - { + if (!GETPOST("userid", 'int')) { $langs->load("errors"); setEventMessages($langs->trans('ErrorUserNotAssignedToTask'), null, 'errors'); $error++; } - if (!$error) - { - if ($id || $ref) - { + if (!$error) { + if ($id || $ref) { $object->fetch($id, $ref); } else { - if (!GETPOST('taskid', 'int') || GETPOST('taskid', 'int') < 0) - { + if (!GETPOST('taskid', 'int') || GETPOST('taskid', 'int') < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), null, 'errors'); $action = 'createtime'; $error++; @@ -165,31 +177,29 @@ if ($action == 'addtimespent' && $user->rights->projet->lire) } } - if (!$error) - { + if (!$error) { $object->fetch_projet(); - if (empty($object->project->statut)) - { + if (empty($object->project->statut)) { setEventMessages($langs->trans("ProjectMustBeValidatedFirst"), null, 'errors'); $action = 'createtime'; $error++; } else { - $object->timespent_note = GETPOST('timespent_note', 'alpha'); - if (GETPOST('progress', 'int') > 0) $object->progress = GETPOST('progress', 'int'); // If progress is -1 (not defined), we do not change value + $object->timespent_note = GETPOST("timespent_note", 'alpha'); + if (GETPOST('progress', 'int') > 0) { + $object->progress = GETPOST('progress', 'int'); // If progress is -1 (not defined), we do not change value + } $object->timespent_duration = GETPOSTINT("timespent_durationhour") * 60 * 60; // We store duration in seconds $object->timespent_duration += (GETPOSTINT('timespent_durationmin') ? GETPOSTINT('timespent_durationmin') : 0) * 60; // We store duration in seconds - if (GETPOST("timehour") != '' && GETPOST("timehour") >= 0) // If hour was entered - { + if (GETPOST("timehour") != '' && GETPOST("timehour") >= 0) { // If hour was entered $object->timespent_date = dol_mktime(GETPOST("timehour"), GETPOST("timemin"), 0, GETPOST("timemonth"), GETPOST("timeday"), GETPOST("timeyear")); $object->timespent_withhour = 1; } else { $object->timespent_date = dol_mktime(12, 0, 0, GETPOST("timemonth"), GETPOST("timeday"), GETPOST("timeyear")); } - $object->timespent_fk_user = $_POST["userid"]; + $object->timespent_fk_user = GETPOST("userid", 'int'); $result = $object->addTimeSpent($user); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans($object->error), null, 'errors'); @@ -198,25 +208,24 @@ if ($action == 'addtimespent' && $user->rights->projet->lire) } } } else { - if (empty($id)) $action = 'createtime'; - else $action = 'createtime'; + if (empty($id)) { + $action = 'createtime'; + } else { + $action = 'createtime'; + } } } -if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $user->rights->projet->lire) -{ +if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $user->rights->projet->lire) { $error = 0; - if (!GETPOST("new_durationhour") && !GETPOST("new_durationmin")) - { + if (!GETPOST("new_durationhour") && !GETPOST("new_durationmin")) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Duration")), null, 'errors'); $error++; } - if (!$error) - { - if (GETPOST('taskid', 'int') != $id) // GETPOST('taskid') is id of new task - { + if (!$error) { + if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task $id = GETPOST('taskid', 'int'); $object->fetchTimeSpent(GETPOST('lineid', 'int')); @@ -224,21 +233,19 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $result = $object->delTimeSpent($user); $object->fetch($id, $ref); - $object->timespent_note = GETPOST('timespent_note_line', 'alpha'); + $object->timespent_note = GETPOST("timespent_note_line", 'alpha'); $object->timespent_old_duration = GETPOST("old_duration"); $object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds $object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds - if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) // If hour was entered - { + if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered $object->timespent_date = dol_mktime(GETPOST("timelinehour"), GETPOST("timelinemin"), 0, GETPOST("timelinemonth"), GETPOST("timelineday"), GETPOST("timelineyear")); $object->timespent_withhour = 1; } else { $object->timespent_date = dol_mktime(12, 0, 0, GETPOST("timelinemonth"), GETPOST("timelineday"), GETPOST("timelineyear")); } - $object->timespent_fk_user = $_POST["userid_line"]; + $object->timespent_fk_user = GETPOST("userid_line", 'int'); $result = $object->addTimeSpent($user); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans($object->error), null, 'errors'); @@ -249,12 +256,11 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us // TODO Check that ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids)) $object->timespent_id = GETPOST("lineid", 'int'); - $object->timespent_note = GETPOST('timespent_note_line', 'alpha'); + $object->timespent_note = GETPOST("timespent_note_line"); $object->timespent_old_duration = GETPOST("old_duration"); $object->timespent_duration = GETPOSTINT("new_durationhour") * 60 * 60; // We store duration in seconds $object->timespent_duration += (GETPOSTINT("new_durationmin") ? GETPOSTINT('new_durationmin') : 0) * 60; // We store duration in seconds - if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) // If hour was entered - { + if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) { // If hour was entered $object->timespent_date = dol_mktime(GETPOST("timelinehour"), GETPOST("timelinemin"), 0, GETPOST("timelinemonth"), GETPOST("timelineday"), GETPOST("timelineyear")); $object->timespent_withhour = 1; } else { @@ -263,8 +269,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->timespent_fk_user = GETPOST("userid_line", 'int'); $result = $object->updateTimeSpent($user); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans($object->error), null, 'errors'); @@ -276,14 +281,12 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us } } -if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->lire) -{ +if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->lire) { $object->fetchTimeSpent(GETPOST('lineid', 'int')); // TODO Check that ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids)) $result = $object->delTimeSpent($user); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($object->error), null, 'errors'); $error++; @@ -294,13 +297,10 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->l } // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work -if (!empty($project_ref) && !empty($withproject)) -{ - if ($projectstatic->fetch(0, $project_ref) > 0) - { +if (!empty($project_ref) && !empty($withproject)) { + if ($projectstatic->fetch(0, $project_ref) > 0) { $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0); - if (count($tasksarray) > 0) - { + if (count($tasksarray) > 0) { $id = $tasksarray[0]->id; } else { header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); @@ -311,27 +311,27 @@ if (!empty($project_ref) && !empty($withproject)) // To show all time lines for project $projectidforalltimes = 0; -if (GETPOST('projectid', 'int') > 0) -{ +if (GETPOST('projectid', 'int') > 0) { $projectidforalltimes = GETPOST('projectid', 'int'); $result = $projectstatic->fetch($projectidforalltimes); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $res = $projectstatic->fetch_optionals(); -} elseif (GETPOST('project_ref', 'alpha')) -{ +} elseif (GETPOST('project_ref', 'alpha')) { $projectstatic->fetch(0, GETPOST('project_ref', 'alpha')); $projectidforalltimes = $projectstatic->id; $withproject = 1; -} elseif ($id > 0) -{ +} elseif ($id > 0) { $object->fetch($id); $result = $projectstatic->fetch($object->fk_project); } -if ($action == 'confirm_generateinvoice') -{ - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); +if ($action == 'confirm_generateinvoice') { + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } if (!($projectstatic->thirdparty->id > 0)) { setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); @@ -351,21 +351,26 @@ if ($action == 'confirm_generateinvoice') $invoiceToUse = GETPOST('invoiceid', 'int'); $prodDurationHours = 1.0; - if ($idprod > 0) - { + if ($idprod > 0) { $tmpproduct->fetch($idprod); - if ($tmpproduct->duration_unit == 'i') + if ($tmpproduct->duration_unit == 'i') { $prodDurationHours = 1. / 60; - if ($tmpproduct->duration_unit == 'h') + } + if ($tmpproduct->duration_unit == 'h') { $prodDurationHours = 1.; - if ($tmpproduct->duration_unit == 'd') + } + if ($tmpproduct->duration_unit == 'd') { $prodDurationHours = 24.; - if ($tmpproduct->duration_unit == 'w') + } + if ($tmpproduct->duration_unit == 'w') { $prodDurationHours = 24. * 7; - if ($tmpproduct->duration_unit == 'm') + } + if ($tmpproduct->duration_unit == 'm') { $prodDurationHours = 24. * 30; - if ($tmpproduct->duration_unit == 'y') + } + if ($tmpproduct->duration_unit == 'y') { $prodDurationHours = 24. * 365; + } $prodDurationHours *= $tmpproduct->duration_value; $dataforprice = $tmpproduct->getSellPrice($mysoc, $projectstatic->thirdparty, 0); @@ -389,27 +394,23 @@ if ($action == 'confirm_generateinvoice') $tmpinvoice->fetch($invoiceToUse); } else { $result = $tmpinvoice->create($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; setEventMessages($tmpinvoice->error, $tmpinvoice->errors, 'errors'); } } - if (!$error) - { + if (!$error) { if ($generateinvoicemode == 'onelineperuser') { $arrayoftasks = array(); - foreach ($toselect as $key => $value) - { + foreach ($toselect as $key => $value) { // Get userid, timepent $object->fetchTimeSpent($value); $arrayoftasks[$object->timespent_fk_user]['timespent'] += $object->timespent_duration; $arrayoftasks[$object->timespent_fk_user]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); } - foreach ($arrayoftasks as $userid => $value) - { + foreach ($arrayoftasks as $userid => $value) { $fuser->fetch($userid); //$pu_ht = $value['timespent'] * $fuser->thm; $username = $fuser->getFullName($langs); @@ -419,8 +420,7 @@ if ($action == 'confirm_generateinvoice') $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); // If no unit price known - if (empty($pu_ht)) - { + if (empty($pu_ht)) { $pu_ht = price2num($value['totalvaluetodivideby3600'] / 3600, 'MU'); } @@ -428,11 +428,10 @@ if ($action == 'confirm_generateinvoice') $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_ht, round($qtyhour / $prodDurationHours, 2), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0)); // Update lineid into line of timespent - $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.$lineid.', invoice_id = '.$tmpinvoice->id; - $sql .= ' WHERE rowid in ('.join(',', $toselect).') AND fk_user = '.$userid; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).') AND fk_user = '.((int) $userid); $result = $db->query($sql); - if (!$result) - { + if (!$result) { $error++; setEventMessages($db->lasterror(), null, 'errors'); break; @@ -440,8 +439,7 @@ if ($action == 'confirm_generateinvoice') } } elseif ($generateinvoicemode == 'onelineperperiod') { $arrayoftasks = array(); - foreach ($toselect as $key => $value) - { + foreach ($toselect as $key => $value) { // Get userid, timepent $object->fetchTimeSpent($value); $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; @@ -450,8 +448,7 @@ if ($action == 'confirm_generateinvoice') $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; } - foreach ($arrayoftasks as $timespent_id => $value) - { + foreach ($arrayoftasks as $timespent_id => $value) { $userid = $value['user']; $fuser->fetch($userid); //$pu_ht = $value['timespent'] * $fuser->thm; @@ -462,8 +459,7 @@ if ($action == 'confirm_generateinvoice') $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); // If no unit price known - if (empty($pu_ht)) - { + if (empty($pu_ht)) { $pu_ht = price2num($value['totalvaluetodivideby3600'] / 3600, 'MU'); } @@ -471,11 +467,10 @@ if ($action == 'confirm_generateinvoice') $lineid = $tmpinvoice->addline($value['note'], $pu_ht, round($qtyhour / $prodDurationHours, 2), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0)); // Update lineid into line of timespent - $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.$lineid.', invoice_id = '.$tmpinvoice->id; - $sql .= ' WHERE rowid in ('.join(',', $toselect).') AND fk_user = '.$userid; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).') AND fk_user = '.((int) $userid); $result = $db->query($sql); - if (!$result) - { + if (!$result) { $error++; setEventMessages($db->lasterror(), null, 'errors'); break; @@ -483,8 +478,7 @@ if ($action == 'confirm_generateinvoice') } } elseif ($generateinvoicemode == 'onelinepertask') { $arrayoftasks = array(); - foreach ($toselect as $key => $value) - { + foreach ($toselect as $key => $value) { // Get userid, timepent $object->fetchTimeSpent($value); // $object->id is the task id @@ -492,8 +486,7 @@ if ($action == 'confirm_generateinvoice') $arrayoftasks[$object->id]['totalvaluetodivideby3600'] += $object->timespent_duration * $object->timespent_thm; } - foreach ($arrayoftasks as $task_id => $value) - { + foreach ($arrayoftasks as $task_id => $value) { $ftask = new Task($db); $ftask->fetch($task_id); // Define qty per hour @@ -501,8 +494,7 @@ if ($action == 'confirm_generateinvoice') $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); // If no unit price known - if (empty($pu_ht)) - { + if (empty($pu_ht)) { $pu_ht = price2num($value['totalvaluetodivideby3600'] / 3600, 'MU'); } @@ -511,11 +503,10 @@ if ($action == 'confirm_generateinvoice') $lineid = $tmpinvoice->addline($lineName, $pu_ht, round($qtyhour / $prodDurationHours, 2), $txtva, $localtax1, $localtax2, ($idprod > 0 ? $idprod : 0)); // Update lineid into line of timespent - $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.$lineid.', invoice_id = '.$tmpinvoice->id; - $sql .= ' WHERE rowid in ('.join(',', $toselect).')'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); + $sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')'; $result = $db->query($sql); - if (!$result) - { + if (!$result) { $error++; setEventMessages($db->lasterror(), null, 'errors'); break; @@ -524,8 +515,7 @@ if ($action == 'confirm_generateinvoice') } } - if (!$error) - { + if (!$error) { $urltoinvoice = $tmpinvoice->getNomUrl(0); setEventMessages($langs->trans("InvoiceGeneratedFromTimeSpent", $urltoinvoice), null, 'mesgs'); //var_dump($tmpinvoice); @@ -551,22 +541,27 @@ $formother = new FormOther($db); $formproject = new FormProjets($db); $userstatic = new User($db); -if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) -{ +if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) { /* * Fiche projet en mode visu */ - if ($projectidforalltimes > 0) - { + if ($projectidforalltimes > 0) { $result = $projectstatic->fetch($projectidforalltimes); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $res = $projectstatic->fetch_optionals(); - } elseif ($object->fetch($id, $ref) >= 0) - { - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); + } elseif ($object->fetch($id, $ref) >= 0) { + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) { + $object->fetchComments(); + } $result = $projectstatic->fetch($object->fk_project); - if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments(); - if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); + if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) { + $projectstatic->fetchComments(); + } + if (!empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } $res = $projectstatic->fetch_optionals(); $object->project = clone $projectstatic; @@ -575,13 +570,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $userRead = $projectstatic->restrictedProjectArea($user, 'read'); $linktocreatetime = ''; - if ($projectstatic->id > 0) - { - if ($withproject) - { + if ($projectstatic->id > 0) { + if ($withproject) { // Tabs for project - if (empty($id) || $tab == 'timespent') $tab = 'timespent'; - else $tab = 'tasks'; + if (empty($id) || $tab == 'timespent') { + $tab = 'timespent'; + } else { + $tab = 'tasks'; + } $head = project_prepare_head($projectstatic); print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project')); @@ -596,17 +592,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Title $morehtmlref .= $projectstatic->title; // Thirdparty - if ($projectstatic->thirdparty->id > 0) - { + if ($projectstatic->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); - $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -618,40 +612,44 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '<table class="border tableforfield centpercent">'; // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) || !empty($conf->eventorganization->enabled)) { print '<tr><td class="tdtop">'; print $langs->trans("Usage"); print '</td>'; print '<td>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS)) { print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowTasks"); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '<br>'; } - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print '<br>'; } + if (!empty($conf->eventorganization->enabled)) { + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> '; + $htmltext = $langs->trans("EventOrganizationDescriptionLong"); + print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); + } print '</td></tr>'; } // Visibility print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; - if ($projectstatic->public) print $langs->trans('SharedProject'); - else print $langs->trans('PrivateProject'); + if ($projectstatic->public) { + print $langs->trans('SharedProject'); + } else { + print $langs->trans('PrivateProject'); + } print '</td></tr>'; // Date start - end @@ -661,12 +659,16 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $end = dol_print_date($projectstatic->date_end, 'day'); print ' - '; print ($end ? $end : '?'); - if ($projectstatic->hasDelay()) print img_warning("Late"); + if ($projectstatic->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Budget print '<tr><td>'.$langs->trans("Budget").'</td><td>'; - if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + if (strcmp($projectstatic->budget_amount, '')) { + print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency); + } print '</td></tr>'; // Other attributes @@ -711,14 +713,11 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $linktocreatetimeBtnStatus = 0; $linktocreatetimeUrl = ''; $linktocreatetimeHelpText = ''; - if ($user->rights->projet->all->lire || $user->rights->projet->lire) // To enter time, read permission is enough - { - if ($projectstatic->public || $userRead > 0) - { + if ($user->rights->projet->all->lire || $user->rights->projet->lire) { // To enter time, read permission is enough + if ($projectstatic->public || $userRead > 0) { $linktocreatetimeBtnStatus = 1; - if (!empty($projectidforalltimes)) // We are on tab 'Time Spent' of project - { + if (!empty($projectidforalltimes)) { // We are on tab 'Time Spent' of project $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime'.$param.'&backtopage='.urlencode($backtourl); } else // We are on tab 'Time Spent' of task @@ -736,42 +735,41 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } $massactionbutton = ''; - if ($projectstatic->usage_bill_time) - { + if ($projectstatic->usage_bill_time) { $arrayofmassactions = array( 'generateinvoice'=>$langs->trans("GenerateBill"), //'builddoc'=>$langs->trans("PDFMerge"), ); //if ($user->rights->projet->creer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete', 'generateinvoice'))) $arrayofmassactions = array(); + if (in_array($massaction, array('presend', 'predelete', 'generateinvoice'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); } // Show section with information of task. If id of task is not defined and project id defined, then $projectidforalltimes is not empty. - if (empty($projectidforalltimes)) - { + if (empty($projectidforalltimes)) { $head = task_prepare_head($object); print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); - if ($action == 'deleteline') - { + if ($action == 'deleteline') { print $form->formconfirm($_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : ''), $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_delete", '', '', 1); } $param = ($withproject ? '&withproject=1' : ''); $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; - if (!GETPOST('withproject') || empty($projectstatic->id)) - { + if (!GETPOST('withproject') || empty($projectstatic->id)) { $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); - $object->next_prev_filter = " fk_projet in (".$projectsListId.")"; - } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + $object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")"; + } else { + $object->next_prev_filter = " fk_projet = ".$projectstatic->id; + } $morehtmlref = ''; // Project - if (empty($withproject)) - { + if (empty($withproject)) { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $langs->trans("Project").': '; $morehtmlref .= $projectstatic->getNomUrl(1); @@ -800,13 +798,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $end = dol_print_date($object->date_end, 'dayhour'); print ' - '; print ($end ? $end : '?'); - if ($object->hasDelay()) print img_warning("Late"); + if ($object->hasDelay()) { + print img_warning("Late"); + } print '</td></tr>'; // Planned workload print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; - if ($object->planned_workload) - { + if ($object->planned_workload) { print convertSecondToTime($object->planned_workload, 'allhourmin'); } print '</td></tr>'; @@ -826,12 +825,16 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Progress calculated print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; - if ($object->planned_workload) - { + if ($object->planned_workload) { $tmparray = $object->getSummaryOfTimeSpent(); - if ($tmparray['total_duration'] > 0) print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; - else print '0 %'; - } else print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; + if ($tmparray['total_duration'] > 0) { + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; + } else { + print '0 %'; + } + } else { + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; + } print '</td>'; print '</tr>'; @@ -848,10 +851,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } - if ($projectstatic->id > 0) - { - if ($action == 'deleteline' && !empty($projectidforalltimes)) - { + if ($projectstatic->id > 0) { + if ($action == 'deleteline' && !empty($projectidforalltimes)) { print $form->formconfirm($_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST('lineid', 'int').($withproject ? '&withproject=1' : ''), $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_delete", '', '', 1); } @@ -861,8 +862,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Definition of fields for list $arrayfields = array(); $arrayfields['t.task_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1); - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task $arrayfields['t.task_ref'] = array('label'=>$langs->trans("RefTask"), 'checked'=>1); $arrayfields['t.task_label'] = array('label'=>$langs->trans("LabelTask"), 'checked'=>1); } @@ -877,33 +877,67 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $arrayfields = dol_sort_array($arrayfields, 'position'); $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_month > 0) $param .= '&search_month='.urlencode($search_month); - if ($search_year > 0) $param .= '&search_year='.urlencode($search_year); - if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); - if ($search_task_ref != '') $param .= '&search_task_ref='.urlencode($search_task_ref); - if ($search_task_label != '') $param .= '&search_task_label='.urlencode($search_task_label); - if ($search_note != '') $param .= '&search_note='.urlencode($search_note); - if ($search_duration != '') $param .= '&amp;search_field2='.urlencode($search_duration); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($search_month > 0) { + $param .= '&search_month='.urlencode($search_month); + } + if ($search_year > 0) { + $param .= '&search_year='.urlencode($search_year); + } + if ($search_user > 0) { + $param .= '&search_user='.urlencode($search_user); + } + if ($search_task_ref != '') { + $param .= '&search_task_ref='.urlencode($search_task_ref); + } + if ($search_task_label != '') { + $param .= '&search_task_label='.urlencode($search_task_label); + } + if ($search_note != '') { + $param .= '&search_note='.urlencode($search_note); + } + if ($search_duration != '') { + $param .= '&amp;search_field2='.urlencode($search_duration); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } /* // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; */ - if ($id) $param .= '&id='.urlencode($id); - if ($projectid) $param .= '&projectid='.urlencode($projectid); - if ($withproject) $param .= '&withproject='.urlencode($withproject); + if ($id) { + $param .= '&id='.urlencode($id); + } + if ($projectid) { + $param .= '&projectid='.urlencode($projectid); + } + if ($withproject) { + $param .= '&withproject='.urlencode($withproject); + } print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; - if ($action == 'editline') print '<input type="hidden" name="action" value="updateline">'; - elseif ($action == 'splitline') print '<input type="hidden" name="action" value="updatesplitline">'; - elseif ($action == 'createtime' && $user->rights->projet->lire) print '<input type="hidden" name="action" value="addtimespent">'; - elseif ($massaction == 'generateinvoice' && $user->rights->facture->lire) print '<input type="hidden" name="action" value="confirm_generateinvoice">'; - else print '<input type="hidden" name="action" value="list">'; + if ($action == 'editline') { + print '<input type="hidden" name="action" value="updateline">'; + } elseif ($action == 'splitline') { + print '<input type="hidden" name="action" value="updatesplitline">'; + } elseif ($action == 'createtime' && $user->rights->projet->lire) { + print '<input type="hidden" name="action" value="addtimespent">'; + } elseif ($massaction == 'generateinvoice' && $user->rights->facture->lire) { + print '<input type="hidden" name="action" value="confirm_generateinvoice">'; + } else { + print '<input type="hidden" name="action" value="list">'; + } print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; @@ -913,8 +947,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '<input type="hidden" name="tab" value="'.$tab.'">'; // Form to convert time spent into invoice - if ($massaction == 'generateinvoice') - { + if ($massaction == 'generateinvoice') { print '<input type="hidden" name="massaction" value="confirm_createbills">'; if ($projectstatic->thirdparty->id > 0) { @@ -942,8 +975,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '</td>'; print '</tr>'; - if ($conf->service->enabled) - { + if ($conf->service->enabled) { print '<tr>'; print '<td>'; print $langs->trans('ServiceToUseOnLines'); @@ -1001,39 +1033,50 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as inv ON inv.rowid = il.fk_facture,"; $sql .= " ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid"; - if (empty($projectidforalltimes)) $sql .= " AND t.fk_task =".$object->id; - else $sql .= " AND pt.fk_projet IN (".$projectidforalltimes.")"; - if ($search_note) $sql .= natural_search('t.note', $search_note); - if ($search_task_ref) $sql .= natural_search('pt.ref', $search_task_ref); - if ($search_task_label) $sql .= natural_search('pt.label', $search_task_label); - if ($search_user > 0) $sql .= natural_search('t.fk_user', $search_user); - if ($search_valuebilled == '1') $sql .= ' AND t.invoice_id > 0'; - if ($search_valuebilled == '0') $sql .= ' AND (t.invoice_id = 0 OR t.invoice_id IS NULL)'; + if (empty($projectidforalltimes)) { + $sql .= " AND t.fk_task =".$object->id; + } else { + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; + } + if ($search_note) { + $sql .= natural_search('t.note', $search_note); + } + if ($search_task_ref) { + $sql .= natural_search('pt.ref', $search_task_ref); + } + if ($search_task_label) { + $sql .= natural_search('pt.label', $search_task_label); + } + if ($search_user > 0) { + $sql .= natural_search('t.fk_user', $search_user); + } + if ($search_valuebilled == '1') { + $sql .= ' AND t.invoice_id > 0'; + } + if ($search_valuebilled == '0') { + $sql .= ' AND (t.invoice_id = 0 OR t.invoice_id IS NULL)'; + } $sql .= dolSqlDateFilter('t.task_datehour', $search_day, $search_month, $search_year); $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) - { + if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -1041,10 +1084,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $num = $db->num_rows($resql); } - if ($num >= 0) - { - if (!empty($projectidforalltimes)) - { + if ($num >= 0) { + if (!empty($projectidforalltimes)) { print '<!-- List of time spent for project -->'."\n"; $title = $langs->trans("ListTaskTimeUserProject"); @@ -1059,8 +1100,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_object($resql); $tasks[$i] = $row; $i++; @@ -1073,23 +1113,25 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) /* * Form to add a new line of time spent */ - if ($action == 'createtime' && $user->rights->projet->lire) - { + if ($action == 'createtime' && $user->rights->projet->lire) { print '<!-- table to add time spent -->'."\n"; - if (!empty($id)) print '<input type="hidden" name="taskid" value="'.$id.'">'; + if (!empty($id)) { + print '<input type="hidden" name="taskid" value="'.$id.'">'; + } print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Date").'</td>'; - if (empty($id)) print '<td>'.$langs->trans("Task").'</td>'; + if (empty($id)) { + print '<td>'.$langs->trans("Task").'</td>'; + } print '<td>'.$langs->trans("By").'</td>'; print '<td>'.$langs->trans("Note").'</td>'; print '<td>'.$langs->trans("NewTimeSpent").'</td>'; print '<td>'.$langs->trans("ProgressDeclared").'</td>'; - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<td></td>'; } print '<td></td>'; @@ -1099,15 +1141,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Date print '<td class="maxwidthonsmartphone">'; - //$newdate=dol_mktime(12,0,0,$_POST["timemonth"],$_POST["timeday"],$_POST["timeyear"]); $newdate = ''; print $form->selectDate($newdate, 'time', ($conf->browser->layout == 'phone' ? 2 : 1), 1, 2, "timespent_date", 1, 0); print '</td>'; // Task $nboftasks = 0; - if (empty($id)) - { + if (empty($id)) { print '<td class="maxwidthonsmartphone">'; $nboftasks = $formproject->selectTasks(-1, GETPOST('taskid', 'int'), 'taskid', 0, 0, 1, 1, 0, 0, 'maxwidth300', $projectstatic->id, ''); print '</td>'; @@ -1116,13 +1156,17 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Contributor print '<td class="maxwidthonsmartphone nowraponall">'; $contactsofproject = $projectstatic->getListContactId('internal'); - if (count($contactsofproject) > 0) - { + if (count($contactsofproject) > 0) { print img_object('', 'user', 'class="hideonsmartphone"'); - if (in_array($user->id, $contactsofproject)) $userid = $user->id; - else $userid = $contactsofproject[0]; + if (in_array($user->id, $contactsofproject)) { + $userid = $user->id; + } else { + $userid = $contactsofproject[0]; + } - if ($projectstatic->public) $contactsofproject = array(); + if ($projectstatic->public) { + $contactsofproject = array(); + } print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth250'); } else { if ($nboftasks) { @@ -1139,8 +1183,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Duration - Time spent print '<td>'; $durationtouse = ($_POST['timespent_duration'] ? $_POST['timespent_duration'] : ''); - if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) - { + if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) { $durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60); } print $form->select_duration('timespent_duration', $durationtouse, 0, 'text'); @@ -1152,8 +1195,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '</td>'; // Invoiced - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print '<td>'; print '</td>'; } @@ -1173,11 +1215,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -1193,29 +1237,43 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Fields title search print '<tr class="liste_titre_filter">'; // Date - if (!empty($arrayfields['t.task_date']['checked'])) - { + if (!empty($arrayfields['t.task_date']['checked'])) { print '<td class="liste_titre">'; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">'; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">'; + } print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">'; $formother->select_year($search_year, 'search_year', 1, 20, 5); print '</td>'; } - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { - if (!empty($arrayfields['t.task_ref']['checked'])) print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>'; - if (!empty($arrayfields['t.task_label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>'; + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task + if (!empty($arrayfields['t.task_ref']['checked'])) { + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>'; + } + if (!empty($arrayfields['t.task_label']['checked'])) { + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>'; + } } // Author - if (!empty($arrayfields['author']['checked'])) print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250').'</td>'; + if (!empty($arrayfields['author']['checked'])) { + print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250').'</td>'; + } // Note - if (!empty($arrayfields['t.note']['checked'])) print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; + if (!empty($arrayfields['t.note']['checked'])) { + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; + } // Duration - if (!empty($arrayfields['t.task_duration']['checked'])) print '<td class="liste_titre right"></td>'; + if (!empty($arrayfields['t.task_duration']['checked'])) { + print '<td class="liste_titre right"></td>'; + } // Value in main currency - if (!empty($arrayfields['value']['checked'])) print '<td class="liste_titre"></td>'; + if (!empty($arrayfields['value']['checked'])) { + print '<td class="liste_titre"></td>'; + } // Value billed - if (!empty($arrayfields['valuebilled']['checked'])) print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; + if (!empty($arrayfields['valuebilled']['checked'])) { + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; + } /* // Extra fields @@ -1233,17 +1291,32 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '</tr>'."\n"; print '<tr class="liste_titre">'; - if (!empty($arrayfields['t.task_date']['checked'])) print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { - if (!empty($arrayfields['t.task_ref']['checked'])) print_liste_field_titre($arrayfields['t.task_ref']['label'], $_SERVER['PHP_SELF'], 'pt.ref', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.task_label']['checked'])) print_liste_field_titre($arrayfields['t.task_label']['label'], $_SERVER['PHP_SELF'], 'pt.label', '', $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['t.task_date']['checked'])) { + print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); + } + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task + if (!empty($arrayfields['t.task_ref']['checked'])) { + print_liste_field_titre($arrayfields['t.task_ref']['label'], $_SERVER['PHP_SELF'], 'pt.ref', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['t.task_label']['checked'])) { + print_liste_field_titre($arrayfields['t.task_label']['label'], $_SERVER['PHP_SELF'], 'pt.label', '', $param, '', $sortfield, $sortorder); + } + } + if (!empty($arrayfields['author']['checked'])) { + print_liste_field_titre($arrayfields['author']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['t.note']['checked'])) { + print_liste_field_titre($arrayfields['t.note']['label'], $_SERVER['PHP_SELF'], 't.note', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['t.task_duration']['checked'])) { + print_liste_field_titre($arrayfields['t.task_duration']['label'], $_SERVER['PHP_SELF'], 't.task_duration', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['value']['checked'])) { + print_liste_field_titre($arrayfields['value']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['valuebilled']['checked'])) { + print_liste_field_titre($arrayfields['valuebilled']['label'], $_SERVER['PHP_SELF'], 'il.total_ht', '', $param, '', $sortfield, $sortorder, 'center '); } - if (!empty($arrayfields['author']['checked'])) print_liste_field_titre($arrayfields['author']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.note']['checked'])) print_liste_field_titre($arrayfields['t.note']['label'], $_SERVER['PHP_SELF'], 't.note', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.task_duration']['checked'])) print_liste_field_titre($arrayfields['t.task_duration']['label'], $_SERVER['PHP_SELF'], 't.task_duration', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['value']['checked'])) print_liste_field_titre($arrayfields['value']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['valuebilled']['checked'])) print_liste_field_titre($arrayfields['valuebilled']['label'], $_SERVER['PHP_SELF'], 'il.total_ht', '', $param, '', $sortfield, $sortorder, 'center '); /* // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -1265,9 +1338,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $total = 0; $totalvalue = 0; $totalarray = array(); - foreach ($tasks as $task_time) - { - if ($i >= $limit) break; + foreach ($tasks as $task_time) { + if ($i >= $limit) { + break; + } print '<tr class="oddeven">'; @@ -1275,30 +1349,28 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $date2 = $db->jdate($task_time->task_datehour); // Date - if (!empty($arrayfields['t.task_date']['checked'])) - { + if (!empty($arrayfields['t.task_date']['checked'])) { print '<td class="nowrap">'; - if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($task_time->task_date_withhour)) - { + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($task_time->task_date_withhour)) { print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 3, 3, 2, "timespent_date", 1, 0); - } else print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 1, 1, 2, "timespent_date", 1, 0); + } else { + print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 1, 1, 2, "timespent_date", 1, 0); + } } else { print dol_print_date(($date2 ? $date2 : $date1), ($task_time->task_date_withhour ? 'dayhour' : 'day')); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Task ref - if (!empty($arrayfields['t.task_ref']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_ref']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td class="nowrap">'; - if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { $formproject->selectTasks(-1, GETPOST('taskid', 'int') ?GETPOST('taskid', 'int') : $task_time->fk_task, 'taskid', 0, 0, 1, 1, 0, 0, 'maxwidth300', $projectstatic->id, ''); } else { $tasktmp->id = $task_time->fk_task; @@ -1307,31 +1379,33 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print $tasktmp->getNomUrl(1, 'withproject', 'time'); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } } else { print '<input type="hidden" name="taskid" value="'.$id.'">'; } // Task label - if (!empty($arrayfields['t.task_label']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_label']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td class="nowrap">'; print $task_time->label; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } } // By User - if (!empty($arrayfields['author']['checked'])) - { + if (!empty($arrayfields['author']['checked'])) { print '<td class="nowrap">'; - if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($object->id)) $object->fetch($id); + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($object->id)) { + $object->fetch($id); + } $contactsoftask = $object->getListContactId('internal'); if (!in_array($task_time->fk_user, $contactsoftask)) { $contactsoftask[] = $task_time->fk_user; @@ -1351,72 +1425,77 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print $userstatic->getNomUrl(-1); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Note - if (!empty($arrayfields['t.note']['checked'])) - { + if (!empty($arrayfields['t.note']['checked'])) { print '<td class="left">'; - if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>'; } else { print dol_nl2br($task_time->note); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - } elseif ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { + if (!$i) { + $totalarray['nbfield']++; + } + } elseif ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="timespent_note_line" value="'.$task_time->note.'">'; } // Time spent - if (!empty($arrayfields['t.task_duration']['checked'])) - { + if (!empty($arrayfields['t.task_duration']['checked'])) { print '<td class="right">'; - if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="old_duration" value="'.$task_time->task_duration.'">'; print $form->select_duration('new_duration', $task_time->task_duration, 0, 'text'); } else { print convertSecondToTime($task_time->task_duration, 'allhourmin'); } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.task_duration'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.task_duration'; + } $totalarray['val']['t.task_duration'] += $task_time->task_duration; - if (!$i) $totalarray['totaldurationfield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['totaldurationfield'] = $totalarray['nbfield']; + } $totalarray['totalduration'] += $task_time->task_duration; } // Value spent - if (!empty($arrayfields['value']['checked'])) - { + if (!empty($arrayfields['value']['checked'])) { print '<td class="nowraponall right">'; $value = price2num($task_time->thm * $task_time->task_duration / 3600, 'MT', 1); print price($value, 1, $langs, 1, -1, -1, $conf->currency); print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'value'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'value'; + } $totalarray['val']['value'] += $value; - if (!$i) $totalarray['totalvaluefield'] = $totalarray['nbfield']; + if (!$i) { + $totalarray['totalvaluefield'] = $totalarray['nbfield']; + } $totalarray['totalvalue'] += $value; } // Invoiced - if (!empty($arrayfields['valuebilled']['checked'])) - { + if (!empty($arrayfields['valuebilled']['checked'])) { print '<td class="center">'; // invoice_id and invoice_line_id - if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { - if ($projectstatic->usage_bill_time) - { - if ($task_time->invoice_id) - { + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { + if ($projectstatic->usage_bill_time) { + if ($task_time->invoice_id) { $result = $tmpinvoice->fetch($task_time->invoice_id); - if ($result > 0) - { + if ($result > 0) { print $tmpinvoice->getNomUrl(1); } } else { @@ -1427,7 +1506,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } /* @@ -1442,18 +1523,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Action column print '<td class="center nowraponall">'; - if (($action == 'editline' || $action == 'splitline') && $_GET['lineid'] == $task_time->rowid) - { + if (($action == 'editline' || $action == 'splitline') && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="lineid" value="'.$_GET['lineid'].'">'; print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; print '<br>'; print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - } elseif ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks - { - if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer) - { - if ($conf->MAIN_FEATURES_LEVEL >= 2) - { + } elseif ($user->rights->projet->lire || $user->rights->projet->all->creer) { // Read project and enter time consumed on assigned tasks + if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer) { + if ($conf->MAIN_FEATURES_LEVEL >= 2) { print '&nbsp;'; print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$task_time->fk_task.'&amp;action=splitline&amp;lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_split(); @@ -1470,37 +1547,38 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print img_delete('default', 'class="pictodelete paddingleft"'); print '</a>'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($task_time->rowid, $arrayofselected)) $selected = 1; + if (in_array($task_time->rowid, $arrayofselected)) { + $selected = 1; + } print '&nbsp;'; print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; // Add line to split - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<tr class="oddeven">'; // Date - if (!empty($arrayfields['t.task_date']['checked'])) - { + if (!empty($arrayfields['t.task_date']['checked'])) { print '<td class="nowrap">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($task_time->task_date_withhour)) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($task_time->task_date_withhour)) { print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 3, 3, 2, "timespent_date", 1, 0); - } else print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 1, 1, 2, "timespent_date", 1, 0); + } else { + print $form->selectDate(($date2 ? $date2 : $date1), 'timeline', 1, 1, 2, "timespent_date", 1, 0); + } } else { print dol_print_date(($date2 ? $date2 : $date1), ($task_time->task_date_withhour ? 'dayhour' : 'day')); } @@ -1508,10 +1586,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Task ref - if (!empty($arrayfields['t.task_ref']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_ref']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td class="nowrap">'; $tasktmp->id = $task_time->fk_task; $tasktmp->ref = $task_time->ref; @@ -1522,10 +1598,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Task label - if (!empty($arrayfields['t.task_label']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_label']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td>'; print $task_time->label; print '</td>'; @@ -1533,12 +1607,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // User - if (!empty($arrayfields['author']['checked'])) - { + if (!empty($arrayfields['author']['checked'])) { print '<td>'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($object->id)) $object->fetch($id); + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($object->id)) { + $object->fetch($id); + } $contactsoftask = $object->getListContactId('internal'); if (!in_array($task_time->fk_user, $contactsoftask)) { $contactsoftask[] = $task_time->fk_user; @@ -1561,27 +1635,22 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Note - if (!empty($arrayfields['t.note']['checked'])) - { + if (!empty($arrayfields['t.note']['checked'])) { print '<td class="left">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>'; } else { print dol_nl2br($task_time->note); } print '</td>'; - } elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + } elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="timespent_note_line" value="'.$task_time->note.'">'; } // Time spent - if (!empty($arrayfields['t.task_duration']['checked'])) - { + if (!empty($arrayfields['t.task_duration']['checked'])) { print '<td class="right">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="old_duration" value="'.$task_time->task_duration.'">'; print $form->select_duration('new_duration', $task_time->task_duration, 0, 'text'); } else { @@ -1591,8 +1660,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Value spent - if (!empty($arrayfields['value']['checked'])) - { + if (!empty($arrayfields['value']['checked'])) { print '<td class="right">'; $value = price2num($task_time->thm * $task_time->task_duration / 3600, 'MT', 1); print price($value, 1, $langs, 1, -1, -1, $conf->currency); @@ -1600,11 +1668,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Value billed - if (!empty($arrayfields['valuebilled']['checked'])) - { + if (!empty($arrayfields['valuebilled']['checked'])) { print '<td class="right">'; $valuebilled = price2num($task_time->total_ht, '', 1); - if (isset($task_time->total_ht)) print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency); + if (isset($task_time->total_ht)) { + print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency); + } print '</td>'; } @@ -1630,15 +1699,14 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '<tr class="oddeven">'; // Date - if (!empty($arrayfields['t.task_date']['checked'])) - { + if (!empty($arrayfields['t.task_date']['checked'])) { print '<td class="nowrap">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($task_time->task_date_withhour)) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($task_time->task_date_withhour)) { print $form->selectDate(($date2 ? $date2 : $date1), 'timeline_2', 3, 3, 2, "timespent_date", 1, 0); - } else print $form->selectDate(($date2 ? $date2 : $date1), 'timeline_2', 1, 1, 2, "timespent_date", 1, 0); + } else { + print $form->selectDate(($date2 ? $date2 : $date1), 'timeline_2', 1, 1, 2, "timespent_date", 1, 0); + } } else { print dol_print_date(($date2 ? $date2 : $date1), ($task_time->task_date_withhour ? 'dayhour' : 'day')); } @@ -1646,10 +1714,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Task ref - if (!empty($arrayfields['t.task_ref']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_ref']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td class="nowrap">'; $tasktmp->id = $task_time->fk_task; $tasktmp->ref = $task_time->ref; @@ -1660,10 +1726,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Task label - if (!empty($arrayfields['t.task_label']['checked'])) - { - if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) // Not a dedicated task - { + if (!empty($arrayfields['t.task_label']['checked'])) { + if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task print '<td class="nowrap">'; print $task_time->label; print '</td>'; @@ -1671,12 +1735,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // User - if (!empty($arrayfields['author']['checked'])) - { + if (!empty($arrayfields['author']['checked'])) { print '<td>'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { - if (empty($object->id)) $object->fetch($id); + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { + if (empty($object->id)) { + $object->fetch($id); + } $contactsoftask = $object->getListContactId('internal'); if (!in_array($task_time->fk_user, $contactsoftask)) { $contactsoftask[] = $task_time->fk_user; @@ -1699,27 +1763,22 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Note - if (!empty($arrayfields['t.note']['checked'])) - { + if (!empty($arrayfields['t.note']['checked'])) { print '<td class="left">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_2.'">'.$task_time->note.'</textarea>'; } else { print dol_nl2br($task_time->note); } print '</td>'; - } elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + } elseif ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="timespent_note_line_2" value="'.$task_time->note.'">'; } // Time spent - if (!empty($arrayfields['t.task_duration']['checked'])) - { + if (!empty($arrayfields['t.task_duration']['checked'])) { print '<td class="right">'; - if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) - { + if ($action == 'splitline' && $_GET['lineid'] == $task_time->rowid) { print '<input type="hidden" name="old_duration_2" value="0">'; print $form->select_duration('new_duration_2', 0, 0, 'text'); } else { @@ -1729,8 +1788,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Value spent - if (!empty($arrayfields['value']['checked'])) - { + if (!empty($arrayfields['value']['checked'])) { print '<td class="right">'; $value = 0; print price($value, 1, $langs, 1, -1, -1, $conf->currency); @@ -1738,11 +1796,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } // Value billed - if (!empty($arrayfields['valuebilled']['checked'])) - { + if (!empty($arrayfields['valuebilled']['checked'])) { print '<td class="right">'; $valuebilled = price2num($task_time->total_ht, '', 1); - if (isset($task_time->total_ht)) print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency); + if (isset($task_time->total_ht)) { + print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency); + } print '</td>'; } @@ -1768,31 +1827,35 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Show total line //include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - if (isset($totalarray['totaldurationfield']) || isset($totalarray['totalvaluefield'])) - { + if (isset($totalarray['totaldurationfield']) || isset($totalarray['totalvaluefield'])) { print '<tr class="liste_total">'; $i = 0; - while ($i < $totalarray['nbfield']) - { + while ($i < $totalarray['nbfield']) { $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>'; - else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; - } elseif ($totalarray['totaldurationfield'] == $i) print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; - elseif ($totalarray['totalvaluefield'] == $i) print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; - //elseif ($totalarray['totalvaluebilledfield'] == $i) print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; - else print '<td></td>'; + if ($i == 1) { + if ($num < $limit && empty($offset)) { + print '<td class="left">'.$langs->trans("Total").'</td>'; + } else { + print '<td class="left">'.$langs->trans("Totalforthispage").'</td>'; + } + } elseif ($totalarray['totaldurationfield'] == $i) { + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; + } elseif ($totalarray['totalvaluefield'] == $i) { + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; + //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; + } else { + print '<td></td>'; + } } print '</tr>'; } - if (!count($tasks)) - { + if (!count($tasks)) { $totalnboffields = 1; - foreach ($arrayfields as $value) - { - if ($value['checked']) $totalnboffields++; + foreach ($arrayfields as $value) { + if ($value['checked']) { + $totalnboffields++; + } } print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 395bfd8915a..d40d75c0acf 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -28,13 +28,27 @@ * &id=..., &idfrom=..., &idto=... */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} // It's a wrapper, so empty header @@ -61,39 +75,69 @@ function llxFooterVierge() // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; // Security check -if (empty($conf->agenda->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->agenda->enabled)) { + accessforbidden('', 0, 0, 1); +} // Not older than -if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; // default limit +if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) { + $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; // default limit +} // Define format, type and filter $format = 'ical'; $type = 'event'; -if (GETPOST("format", 'alpha')) $format = GETPOST("format", 'apha'); -if (GETPOST("type", 'apha')) $type = GETPOST("type", 'alpha'); +if (GETPOST("format", 'alpha')) { + $format = GETPOST("format", 'apha'); +} +if (GETPOST("type", 'apha')) { + $type = GETPOST("type", 'alpha'); +} $filters = array(); -if (GETPOST("year", 'int')) $filters['year'] = GETPOST("year", 'int'); -if (GETPOST("id", 'int')) $filters['id'] = GETPOST("id", 'int'); -if (GETPOST("idfrom", 'int')) $filters['idfrom'] = GETPOST("idfrom", 'int'); -if (GETPOST("idto", 'int')) $filters['idto'] = GETPOST("idto", 'int'); -if (GETPOST("project", 'apha')) $filters['project'] = GETPOST("project", 'apha'); -if (GETPOST("logina", 'apha')) $filters['logina'] = GETPOST("logina", 'apha'); -if (GETPOST("logint", 'apha')) $filters['logint'] = GETPOST("logint", 'apha'); -if (GETPOST("notactiontype", 'apha')) $filters['notactiontype'] = GETPOST("notactiontype", 'apha'); -if (GETPOST("actiontype", 'apha')) $filters['actiontype'] = GETPOST("actiontype", 'apha'); -if (GETPOST("notolderthan", 'int')) $filters['notolderthan'] = GETPOST("notolderthan", "int"); -else $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; +if (GETPOST("year", 'int')) { + $filters['year'] = GETPOST("year", 'int'); +} +if (GETPOST("id", 'int')) { + $filters['id'] = GETPOST("id", 'int'); +} +if (GETPOST("idfrom", 'int')) { + $filters['idfrom'] = GETPOST("idfrom", 'int'); +} +if (GETPOST("idto", 'int')) { + $filters['idto'] = GETPOST("idto", 'int'); +} +if (GETPOST("project", 'apha')) { + $filters['project'] = GETPOST("project", 'apha'); +} +if (GETPOST("logina", 'apha')) { + $filters['logina'] = GETPOST("logina", 'apha'); +} +if (GETPOST("logint", 'apha')) { + $filters['logint'] = GETPOST("logint", 'apha'); +} +if (GETPOST("notactiontype", 'apha')) { + $filters['notactiontype'] = GETPOST("notactiontype", 'apha'); +} +if (GETPOST("actiontype", 'apha')) { + $filters['actiontype'] = GETPOST("actiontype", 'apha'); +} +if (GETPOST("notolderthan", 'int')) { + $filters['notolderthan'] = GETPOST("notolderthan", "int"); +} else { + $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; +} // Check config -if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) -{ +if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) { $user->getrights(); llxHeaderVierge(); @@ -109,7 +153,7 @@ $reshook = $hookmanager->executeHooks('doActions', $filters); // Note that $acti if ($reshook < 0) { llxHeaderVierge(); if (!empty($hookmanager->errors) && is_array($hookmanager->errors)) { - print '<div class="error">'.implode('<br/>', $hookmanager->errors).'</div>'; + print '<div class="error">'.implode('<br>', $hookmanager->errors).'</div>'; } else { print '<div class="error">'.$hookmanager->error.'</div>'; } @@ -131,25 +175,45 @@ if ($reshook < 0) { $shortfilename = 'dolibarrcalendar'; $filename = $shortfilename; // Complete long filename -foreach ($filters as $key => $value) -{ +foreach ($filters as $key => $value) { //if ($key == 'notolderthan') $filename.='-notolderthan'.$value; This filter key is already added before and does not need to be in filename - if ($key == 'year') $filename .= '-year'.$value; - if ($key == 'id') $filename .= '-id'.$value; - if ($key == 'idfrom') $filename .= '-idfrom'.$value; - if ($key == 'idto') $filename .= '-idto'.$value; - if ($key == 'project') $filename .= '-project'.$value; - if ($key == 'logina') $filename .= '-logina'.$value; // Author - if ($key == 'logint') $filename .= '-logint'.$value; // Assigned to - if ($key == 'notactiontype') $filename .= '-notactiontype'.$value; + if ($key == 'year') { + $filename .= '-year'.$value; + } + if ($key == 'id') { + $filename .= '-id'.$value; + } + if ($key == 'idfrom') { + $filename .= '-idfrom'.$value; + } + if ($key == 'idto') { + $filename .= '-idto'.$value; + } + if ($key == 'project') { + $filename .= '-project'.$value; + } + if ($key == 'logina') { + $filename .= '-logina'.$value; // Author + } + if ($key == 'logint') { + $filename .= '-logint'.$value; // Assigned to + } + if ($key == 'notactiontype') { + $filename .= '-notactiontype'.$value; + } } // Add extension -if ($format == 'vcal') { $shortfilename .= '.vcs'; $filename .= '.vcs'; } -if ($format == 'ical') { $shortfilename .= '.ics'; $filename .= '.ics'; } -if ($format == 'rss') { $shortfilename .= '.rss'; $filename .= '.rss'; } +if ($format == 'vcal') { + $shortfilename .= '.vcs'; $filename .= '.vcs'; +} +if ($format == 'ical') { + $shortfilename .= '.ics'; $filename .= '.ics'; +} +if ($format == 'rss') { + $shortfilename .= '.rss'; $filename .= '.rss'; +} -if ($shortfilename == 'dolibarrcalendar') -{ +if ($shortfilename == 'dolibarrcalendar') { $langs->load("main"); $langs->load("errors"); llxHeaderVierge(); @@ -161,34 +225,47 @@ if ($shortfilename == 'dolibarrcalendar') $agenda = new ActionComm($db); $cachedelay = 0; -if (!empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)) $cachedelay = $conf->global->MAIN_AGENDA_EXPORT_CACHE; +if (!empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)) { + $cachedelay = $conf->global->MAIN_AGENDA_EXPORT_CACHE; +} $exportholidays = GETPOST('includeholidays', 'int'); // Build file -if ($format == 'ical' || $format == 'vcal') -{ +if ($format == 'ical' || $format == 'vcal') { $result = $agenda->build_exportfile($format, $type, $cachedelay, $filename, $filters, $exportholidays); - if ($result >= 0) - { + if ($result >= 0) { $attachment = true; - if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } //$attachment = false; $contenttype = 'text/calendar'; - if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } //$contenttype='text/plain'; $outputencoding = 'UTF-8'; - if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); - if ($attachment) header('Content-Disposition: attachment; filename="'.$shortfilename.'"'); + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$shortfilename.'"'); + } - if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); - else header('Cache-Control: private, must-revalidate'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } // Clean parameters $outputfile = $conf->agenda->dir_temp.'/'.$filename; $result = readfile($outputfile); - if (!$result) print 'File '.$outputfile.' was empty.'; + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } //header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); exit; @@ -199,32 +276,43 @@ if ($format == 'ical' || $format == 'vcal') } } -if ($format == 'rss') -{ +if ($format == 'rss') { $result = $agenda->build_exportfile($format, $type, $cachedelay, $filename, $filters, $exportholidays); - if ($result >= 0) - { + if ($result >= 0) { $attachment = false; - if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } //$attachment = false; $contenttype = 'application/rss+xml'; - if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } //$contenttype='text/plain'; $outputencoding = 'UTF-8'; - if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } // Ajout directives pour resoudre bug IE //header('Cache-Control: Public, must-revalidate'); //header('Pragma: public'); - if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); - else header('Cache-Control: private, must-revalidate'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } // Clean parameters $outputfile = $conf->agenda->dir_temp.'/'.$filename; $result = readfile($outputfile); - if (!$result) print 'File '.$outputfile.' was empty.'; + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); exit; diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs_by_url.php similarity index 84% rename from htdocs/public/cron/cron_run_jobs.php rename to htdocs/public/cron/cron_run_jobs_by_url.php index cd5f1e3be51..133c5d1b18a 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs_by_url.php @@ -19,25 +19,38 @@ */ /** - * \file htdocs/public/cron/cron_run_jobs.php + * \file htdocs/public/cron/cron_run_jobs_by_url.php * \ingroup cron * \brief Execute pendings jobs */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} // Error if CLI mode -if (php_sapi_name() == "cli") -{ +if (php_sapi_name() == "cli") { echo "Error: This page can't be used as a CLI script. For the CLI version of script, launch cron_run_job.php available into scripts/cron/ directory.\n"; exit(-1); } @@ -66,39 +79,36 @@ $now = dol_now(); // Check the key, avoid that a stranger starts cron $key = GETPOST('securitykey', 'alpha'); -if (empty($key)) -{ +if (empty($key)) { echo 'Securitykey is required. Check setup of cron jobs module.'; exit; } -if ($key != $conf->global->CRON_KEY) -{ +if ($key != $conf->global->CRON_KEY) { echo 'Securitykey is wrong.'; exit; } // Check the key, avoid that a stranger starts cron $userlogin = GETPOST('userlogin', 'alpha'); -if (empty($userlogin)) -{ +if (empty($userlogin)) { echo 'Userlogin is required.'; exit; } require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($db); $result = $user->fetch('', $userlogin); -if ($result < 0) -{ +if ($result < 0) { echo "User Error:".$user->error; dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR); exit; } else { - if (empty($user->id)) - { + if (empty($user->id)) { echo " User login:".$userlogin." do not exists"; dol_syslog(" User login:".$userlogin." do not exists", LOG_ERR); exit; } } +$user->getrights(); + $id = GETPOST('id', 'alpha'); // We accept non numeric id. We will filter later. @@ -107,8 +117,7 @@ $object = new Cronjob($db); $filter = array(); if (!empty($id)) { - if (!is_numeric($id)) - { + if (!is_numeric($id)) { echo "Error: Bad value for parameter job id"; dol_syslog("cron_run_jobs.php Bad value for parameter job id", LOG_WARNING); exit; @@ -117,17 +126,17 @@ if (!empty($id)) { } $result = $object->fetch_all('ASC,ASC,ASC', 't.priority,t.entity,t.rowid', 0, 0, 1, $filter, 0); -if ($result < 0) -{ +if ($result < 0) { echo "Error: ".$object->error; dol_syslog("cron_run_jobs.php fetch Error".$object->error, LOG_ERR); exit; } $qualifiedjobs = array(); -foreach ($object->lines as $val) -{ - if (!verifCond($val->test)) continue; +foreach ($object->lines as $val) { + if (!verifCond($val->test)) { + continue; + } $qualifiedjobs[] = $val; } @@ -138,19 +147,16 @@ $nbofjobs = count($qualifiedjobs); $nbofjobslaunchedok = 0; $nbofjobslaunchedko = 0; -if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) -{ +if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { $savconf = dol_clone($conf); // Loop over job - foreach ($qualifiedjobs as $line) - { + foreach ($qualifiedjobs as $line) { dol_syslog("cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label, LOG_DEBUG); echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label; // Force reload of setup for the current entity - if ($line->entity != $conf->entity) - { + if ($line->entity != $conf->entity) { dol_syslog("cron_run_jobs.php we work on another entity so we reload user and conf", LOG_DEBUG); echo " -> we change entity so we reload user and conf"; @@ -158,17 +164,14 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) $conf->setValues($db); // This make also the $mc->setValues($conf); that reload $mc->sharings // Force recheck that user is ok for the entity to process and reload permission for entity - if ($conf->entity != $user->entity && $user->entity != 0) - { + if ($conf->entity != $user->entity && $user->entity != 0) { $result = $user->fetch('', $userlogin, '', 0, $conf->entity); - if ($result < 0) - { + if ($result < 0) { echo "\nUser Error: ".$user->error."\n"; dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR); exit(-1); } else { - if ($result == 0) - { + if ($result == 0) { echo "\nUser login: ".$userlogin." does not exists for entity ".$conf->entity."\n"; dol_syslog("User login:".$userlogin." does not exists", LOG_ERR); exit(-1); @@ -179,16 +182,14 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) } //If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database - if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now)) - { + if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now)) { echo " - qualified"; dol_syslog("cron_run_jobs.php line->datenextrun:".dol_print_date($line->datenextrun, 'dayhourrfc')." line->datestart:".dol_print_date($line->datestart, 'dayhourrfc')." line->dateend:".dol_print_date($line->dateend, 'dayhourrfc')." now:".dol_print_date($now, 'dayhourrfc')); $cronjob = new Cronjob($db); $result = $cronjob->fetch($line->id); - if ($result < 0) - { + if ($result < 0) { echo "Error cronjobid: ".$line->id." cronjob->fetch: ".$cronjob->error."\n"; echo "Failed to fetch job ".$line->id."\n"; dol_syslog("cron_run_jobs.php::fetch Error".$cronjob->error, LOG_ERR); @@ -196,8 +197,7 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) } // Execute job $result = $cronjob->run_jobs($userlogin); - if ($result < 0) - { + if ($result < 0) { echo "Error cronjobid: ".$line->id." cronjob->run_job: ".$cronjob->error."\n"; echo "At least one job failed. Go on menu Home-Setup-Admin tools to see result for each job.\n"; echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n"; @@ -211,8 +211,7 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) // We re-program the next execution and stores the last execution time for this job $result = $cronjob->reprogram_jobs($userlogin, $now); - if ($result < 0) - { + if ($result < 0) { echo "Error cronjobid: ".$line->id." cronjob->reprogram_job: ".$cronjob->error."\n"; echo "Enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n"; dol_syslog("cron_run_jobs.php::reprogram_jobs Error".$cronjob->error, LOG_ERR); diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index dbfeeebbf58..e39a332d3fb 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -24,10 +24,18 @@ * \brief Entry page to access demo */ -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', 1); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', 1); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} require '../../main.inc.php'; require_once '../../core/lib/functions2.lib.php'; @@ -42,7 +50,9 @@ $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); // Security check global $dolibarr_main_demo; -if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page', 0, 0, 1); +if (empty($dolibarr_main_demo)) { + accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page', 0, 0, 1); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $res = $hookmanager->initHooks(array('demo')); @@ -66,8 +76,7 @@ $parameters = array(); $object = new stdClass(); $reshook = $hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks $error = $hookmanager->error; $errors = $hookmanager->errors; -if (empty($reshook)) -{ +if (empty($reshook)) { $demoprofiles = array( array('default'=>'1', 'key'=>'profdemoservonly', 'label'=>'DemoCompanyServiceOnly', 'disablemodules'=>'adherent,barcode,bom,cashdesk,don,expedition,externalsite,ftp,incoterm,mailmanspip,margin,mrp,prelevement,product,productbatch,stock,takepos', @@ -131,27 +140,21 @@ $dirmod = array(); $i = 0; // is a sequencer of modules found $j = 0; // j is module number. Automatically affected if module number not defined. -foreach ($modulesdir as $dir) -{ +foreach ($modulesdir as $dir) { // Charge tableaux modules, nom, numero, orders depuis repertoire dir $handle = @opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { //print "$i ".$file."\n<br>"; - if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') - { + if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') { $modName = substr($file, 0, dol_strlen($file) - 10); - if ($modName) - { + if ($modName) { try { include_once $dir.$file; $objMod = new $modName($db); - if ($objMod->numero > 0) - { + if ($objMod->numero > 0) { $j = $objMod->numero; } else { $j = 1000 + $i; @@ -161,11 +164,14 @@ foreach ($modulesdir as $dir) // We discard modules according to features level (PS: if module is activated we always show it) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod))); - if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)) $modulequalified = 0; - if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)) $modulequalified = 0; + if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && empty($conf->global->$const_name)) { + $modulequalified = 0; + } + if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && empty($conf->global->$const_name)) { + $modulequalified = 0; + } - if ($modulequalified) - { + if ($modulequalified) { $modules[$i] = $objMod; $filename[$i] = $modName; $orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module @@ -174,8 +180,7 @@ foreach ($modulesdir as $dir) $j++; $i++; } - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } } @@ -192,37 +197,34 @@ asort($orders); * Actions */ -if (GETPOST('action', 'aZ09') == 'gotodemo') // Action run when we click on "Start" after selection modules -{ +if (GETPOST('action', 'aZ09') == 'gotodemo') { // Action run when we click on "Start" after selection modules //print 'ee'.GETPOST("demochoice"); $disablestring = ''; // If we disable modules using a profile choice - if (GETPOST("demochoice")) - { - foreach ($demoprofiles as $profilearray) - { - if ($profilearray['key'] == GETPOST("demochoice")) - { + if (GETPOST("demochoice")) { + foreach ($demoprofiles as $profilearray) { + if ($profilearray['key'] == GETPOST("demochoice")) { $disablestring = $profilearray['disablemodules']; break; } } } // If we disable modules using personalized list - foreach ($modules as $val) - { + foreach ($modules as $val) { $modulekeyname = strtolower($val->name); - if (empty($_POST[$modulekeyname]) && empty($val->always_enabled) && !in_array($modulekeyname, $alwayscheckedmodules)) - { + if (empty($_POST[$modulekeyname]) && empty($val->always_enabled) && !in_array($modulekeyname, $alwayscheckedmodules)) { $disablestring .= $modulekeyname.','; - if ($modulekeyname == 'propale') $disablestring .= 'propal,'; + if ($modulekeyname == 'propale') { + $disablestring .= 'propal,'; + } } } // Do redirect to login page - if ($disablestring) - { - if (GETPOST('urlfrom')) $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'urlfrom='.urlencode(GETPOST('urlfrom', 'alpha')); + if ($disablestring) { + if (GETPOST('urlfrom')) { + $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'urlfrom='.urlencode(GETPOST('urlfrom', 'alpha')); + } $url .= (preg_match('/\?/', $url) ? '&amp;' : '?').'disablemodules='.$disablestring; //var_dump($url);exit; header("Location: ".$url); @@ -288,12 +290,12 @@ print '<div class="clearboth"></div>'; print '<div class="demobanbox">'; $i = 0; -foreach ($demoprofiles as $profilearray) -{ - if ($profilearray['default'] >= 0) - { +foreach ($demoprofiles as $profilearray) { + if ($profilearray['default'] >= 0) { //print $profilearray['lang']; - if (!empty($profilearray['lang'])) $langs->load($profilearray['lang']); + if (!empty($profilearray['lang'])) { + $langs->load($profilearray['lang']); + } $url = $_SERVER["PHP_SELF"].'?action=gotodemo'; $urlwithmod = $url.'&amp;demochoice='.$profilearray['key']; @@ -303,18 +305,15 @@ foreach ($demoprofiles as $profilearray) $urlfrom = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/i', '', $_SERVER["PHP_SELF"]); //print $urlfrom; - if (!empty($profilearray['url'])) - { + if (!empty($profilearray['url'])) { $urlwithmod = $profilearray['url']; $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'urlfrom='.urlencode($urlfrom); - if (!empty($profilearray['disablemodules'])) - { + if (!empty($profilearray['disablemodules'])) { $urlwithmod = $urlwithmod.(preg_match('/\?/', $urlwithmod) ? '&amp;' : '?').'disablemodules='.$profilearray['disablemodules']; } } - if (empty($profilearray['url'])) - { + if (empty($profilearray['url'])) { print '<div class="clearboth"></div>'; } @@ -350,8 +349,7 @@ foreach ($demoprofiles as $profilearray) // Modules (a profile you must choose modules) - if (empty($profilearray['url'])) - { + if (empty($profilearray['url'])) { print '<div id="tr1'.$profilearray['key'].'" class="moduleline hidden" style="margin-left: 8px; margin-right: 8px; text-align: justify; font-size:14px; line-height: 130%; padding-bottom: 8px">'; print $langs->trans("ThisIsListOfModules").'<br><br>'; @@ -362,20 +360,26 @@ foreach ($demoprofiles as $profilearray) $j = 0; $nbcolsmod = empty($conf->dol_optimize_smallscreen) ? 4 : 3; //var_dump($modules); - foreach ($orders as $index => $key) // Loop on qualified (enabled) modules - { + foreach ($orders as $index => $key) { // Loop on qualified (enabled) modules //print $index.' '.$key; $val = $modules[$index]; $modulekeyname = strtolower($val->name); $modulequalified = 1; - if (!empty($val->always_enabled) || in_array($modulekeyname, $alwayshiddenuncheckedmodules)) $modulequalified = 0; - if ($val->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && !$conf->global->$const_name) $modulequalified = 0; - if ($val->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && !$conf->global->$const_name) $modulequalified = 0; - if (!$modulequalified) continue; + if (!empty($val->always_enabled) || in_array($modulekeyname, $alwayshiddenuncheckedmodules)) { + $modulequalified = 0; + } + if ($val->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && !$conf->global->$const_name) { + $modulequalified = 0; + } + if ($val->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && !$conf->global->$const_name) { + $modulequalified = 0; + } + if (!$modulequalified) { + continue; + } - if (in_array($modulekeyname, $alwayshiddencheckedmodules)) - { + if (in_array($modulekeyname, $alwayshiddencheckedmodules)) { print "\n".'<!-- Module '.$modulekeyname.' hidden and always checked -->'; print '<input type="hidden" name="'.$modulekeyname.'" value="1">'; } else { @@ -384,8 +388,12 @@ foreach ($demoprofiles as $profilearray) print '<!-- id='.$val->numero.' -->'; print '<div class="nowrap">'; print '<input type="checkbox" class="checkbox" id="id'.$modulekeyname.'" name="'.$modulekeyname.'" value="1" title="'.dol_escape_htmltag($val->getName()).'"'; - if (in_array($modulekeyname, $alwaysuncheckedmodules)) print ' disabled'; - if (!in_array($modulekeyname, $alwaysuncheckedmodules) && (!in_array($modulekeyname, $listofdisabledmodules) || in_array($modulekeyname, $alwayscheckedmodules))) print ' checked'; + if (in_array($modulekeyname, $alwaysuncheckedmodules)) { + print ' disabled'; + } + if (!in_array($modulekeyname, $alwaysuncheckedmodules) && (!in_array($modulekeyname, $listofdisabledmodules) || in_array($modulekeyname, $alwayscheckedmodules))) { + print ' checked'; + } print '> <label for="id'.$modulekeyname.'" class="inline-block demomaxoveflow" title="'.dol_escape_htmltag($val->getName()).'">'.$val->getName().'</label><br>'; print '</div>'; //if ($modulo == ($nbcolsmod - 1)) print '</tr>'; @@ -414,10 +422,8 @@ print '</div>'; // TODO Replace this with a hook // Google Adsense (need Google module) -if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) -{ - if (empty($conf->dol_use_jmobile)) - { +if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty($conf->global->MAIN_GOOGLE_AD_SLOT)) { + if (empty($conf->dol_use_jmobile)) { print '<div align="center">'."\n"; print '<script><!--'."\n"; print 'google_ad_client = "'.$conf->global->MAIN_GOOGLE_AD_CLIENT.'";'."\n"; diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 70b55981816..87db3ee4133 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -22,10 +22,18 @@ * \brief Page to list donators */ -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} // C'est un wrapper, donc header vierge /** @@ -51,7 +59,9 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; // Security check -if (empty($conf->don->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->don->enabled)) { + accessforbidden('', 0, 0, 1); +} $langs->load("donations"); @@ -68,11 +78,9 @@ $sql .= " FROM ".MAIN_DB_PREFIX."don as d"; $sql .= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { print "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">"; print '<tr>'; @@ -81,13 +89,11 @@ if ($resql) print '<td class="right">'.$langs->trans("Amount").'</td>'; print "</tr>\n"; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); print '<tr class="oddeven">'; - if ($objp->public) - { + if ($objp->public) { print "<td>".dolGetFirstLastname($objp->firstname, $objp->lastname)." ".dol_escape_htmltag($objp->societe)."</td>\n"; } else { print "<td>".$langs->trans("Anonymous")."</td>\n"; diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 5e05387f664..ea9eeb377e7 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -25,14 +25,30 @@ * \brief Script use to update mail status if destinaries read it (if images during mail read are display) */ -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined("NOSESSION")) define("NOSESSION", '1'); +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined("NOSESSION")) { + define("NOSESSION", '1'); +} /** * Header empty @@ -66,14 +82,12 @@ $securitykey = GETPOST('securitykey'); dol_syslog("public/emailing/mailing-read.php : tag=".$tag." securitykey=".$securitykey, LOG_DEBUG); -if ($securitykey != $conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) -{ +if ($securitykey != $conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) { print 'Bad security key value.'; exit; } -if (!empty($tag)) -{ +if (!empty($tag)) { dol_syslog("public/emailing/mailing-read.php : Update status of email target and thirdparty for tag ".$tag, LOG_DEBUG); $sql = "SELECT mc.rowid, mc.email, mc.statut, mc.source_type, mc.source_id, m.entity"; @@ -108,19 +122,19 @@ if (!empty($tag)) //Update status of target $statut = '2'; - $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE rowid = ".((int) $obj->rowid); + $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".((int) $statut)." WHERE rowid = ".((int) $obj->rowid); $resql = $db->query($sql); if (!$resql) dol_print_error($db); //Update status communication of thirdparty prospect if ($obj->source_id > 0 && $obj->source_type == 'thirdparty' && $obj->entity) { - $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.$obj->entity.' AND rowid = '.$obj->source_id; + $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.$obj->entity.' AND rowid = '.((int) $obj->source_id); $resql = $db->query($sql); } //Update status communication of contact prospect if ($obj->source_id > 0 && $obj->source_type == 'contact' && $obj->entity) { - $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.$obj->entity.' AND rowid IN (SELECT sc.fk_soc FROM '.MAIN_DB_PREFIX.'socpeople AS sc WHERE sc.rowid = '.$obj->source_id.')'; + $sql = "UPDATE ".MAIN_DB_PREFIX.'societe SET fk_stcomm = 3 WHERE fk_stcomm <> -1 AND entity = '.$obj->entity.' AND rowid IN (SELECT sc.fk_soc FROM '.MAIN_DB_PREFIX.'socpeople AS sc WHERE sc.rowid = '.((int) $obj->source_id).')'; $resql = $db->query($sql); } } diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index 0e07359c484..9c39dafa18d 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -27,12 +27,24 @@ * https://myserver/public/emailing/mailing-unsubscribe.php?unsuscrib=1&securitykey=securitykey&tag=abcdefghijklmn */ -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined("NOSESSION")) define("NOSESSION", '1'); +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined("NOSESSION")) { + define("NOSESSION", '1'); +} /** * Header empty @@ -72,15 +84,13 @@ $securitykey = GETPOST('securitykey'); dol_syslog("public/emailing/mailing-read.php : tag=".$tag." securitykey=".$securitykey, LOG_DEBUG); -if ($securitykey != $conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) -{ +if ($securitykey != $conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY) { print 'Bad security key value.'; exit; } -if (!empty($tag) && ($unsuscrib == '1')) -{ +if (!empty($tag) && ($unsuscrib == '1')) { dol_syslog("public/emailing/mailing-unsubscribe.php : Launch unsubscribe requests", LOG_DEBUG); $sql = "SELECT mc.rowid, mc.email, mc.statut, m.entity"; @@ -88,7 +98,9 @@ if (!empty($tag) && ($unsuscrib == '1')) $sql .= " WHERE mc.fk_mailing = m.rowid AND mc.tag='".$db->escape($tag)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $obj = $db->fetch_object($resql); @@ -118,7 +130,9 @@ if (!empty($tag) && ($unsuscrib == '1')) $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$db->escape($tag)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } /* // Update status communication of thirdparty prospect (old usage) @@ -127,7 +141,7 @@ if (!empty($tag) && ($unsuscrib == '1')) $resql=$db->query($sql); if (! $resql) dol_print_error($db); - // Update status communication of contact prospect (old usage) + // Update status communication of contact prospect (old usage) $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET no_email=1 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag = '".$db->escape($tag)."' AND source_type='contact' AND source_id is not null)"; $resql=$db->query($sql); diff --git a/htdocs/public/error-401.php b/htdocs/public/error-401.php index 87da7c347e3..bae712ec095 100644 --- a/htdocs/public/error-401.php +++ b/htdocs/public/error-401.php @@ -1,32 +1,32 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> - <title>Dolibarr 401 error page</title> + <title>Dolibarr 401 error page</title> </head> <body> - <div> + <div> - <!-- <div data-role="header" data-theme="b"> - <h1>Introduction</h1> - <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a> - </div> - --> - <div> + <!-- <div data-role="header" data-theme="b"> + <h1>Introduction</h1> + <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a> + </div> + --> + <div> - <h1>Error</h1> + <h1>Error</h1> - <br> - Sorry. You are not allowed to access this resource. + <br> + Sorry. You are not allowed to access this resource. - <br> - <?php print isset($_SERVER["HTTP_REFERER"]) ? 'You come from '.htmlentities($_SERVER["HTTP_REFERER"]).'.' : ''; ?> + <br> + <?php print isset($_SERVER["HTTP_REFERER"]) ? 'You come from '.htmlentities($_SERVER["HTTP_REFERER"]).'.' : ''; ?> - <hr> + <hr> - </div> - </div> + </div> + </div> </body> </html> diff --git a/htdocs/public/error-404.php b/htdocs/public/error-404.php index baaa26cd833..680b9e4a77c 100644 --- a/htdocs/public/error-404.php +++ b/htdocs/public/error-404.php @@ -1,32 +1,32 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> - <title>Dolibarr 404 error page</title> + <title>Dolibarr 404 error page</title> </head> <body> - <div> + <div> - <!-- <div data-role="header" data-theme="b"> - <h1>Introduction</h1> - <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a> - </div> - --> - <div> + <!-- <div data-role="header" data-theme="b"> + <h1>Introduction</h1> + <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a> + </div> + --> + <div> - <h2>Error</h2> + <h2>Error</h2> - <br> - You requested a website or a page that does not exists. + <br> + You requested a website or a page that does not exists. - <br> - <?php print isset($_SERVER["HTTP_REFERER"]) ? 'You come from '.htmlentities($_SERVER["HTTP_REFERER"]).'.' : ''; ?> + <br> + <?php print isset($_SERVER["HTTP_REFERER"]) ? 'You come from '.htmlentities($_SERVER["HTTP_REFERER"]).'.' : ''; ?> - <hr> + <hr> - </div> - </div> + </div> + </div> </body> </html> diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php new file mode 100644 index 00000000000..d3f9e6f06bd --- /dev/null +++ b/htdocs/public/eventorganization/attendee_subscription.php @@ -0,0 +1,433 @@ +<?php +/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org> + * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/public/members/new.php + * \ingroup member + * \brief Example of form to add a new member + * + * Note that you can add following constant to change behaviour of page + * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form + * MEMBER_NEWFORM_EDITAMOUNT 0 or 1 = Amount can be edited + * MEMBER_NEWFORM_PAYONLINE Suggest payment with paypal, paybox or stripe + * MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation) + * MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted + * MEMBER_NEWFORM_FORCETYPE Force type of member + * MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy) + * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retrieve from object ref and not from url. +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +// Init vars +$errmsg = ''; +$num = 0; +$error = 0; +$backtopage = GETPOST('backtopage', 'alpha'); +$action = GETPOST('action', 'aZ09'); + +$email = GETPOST("email"); + +// Getting id from Post and decoding it +$encodedid = GETPOST('id'); +$id = dol_decode($encodedid, $dolibarr_main_instance_unique_id); + +$conference = new ConferenceOrBooth($db); +$resultconf = $conference->fetch($id); +if ($resultconf < 0) { + setEventMessages(null, $object->errors, "errors"); +} + +$project = new Project($db); +$resultproject = $project->fetch($conference->fk_project); +if ($resultproject < 0) { + $error++; + $errmsg .= $project->error; +} + +// Getting 'securekey'.'id' from Post and decoding it +$encodedsecurekeyandid = GETPOST('securekey', 'alpha'); +$securekeyandid = dol_decode($encodedsecurekeyandid, $dolibarr_main_instance_unique_id); + +// Securekey decomposition into pure securekey and id added at the end +$securekey = substr($securekeyandid, 0, strlen($securekeyandid)-strlen($encodedid)); +$idgotfromsecurekey = dol_decode(substr($securekeyandid, -strlen($encodedid), strlen($encodedid)), $dolibarr_main_instance_unique_id); + +// We check if the securekey collected is OK and if the id collected is the same than the id in the securekey +if ($securekey != $conf->global->EVENTORGANIZATION_SECUREKEY || $idgotfromsecurekey != $id) { + print $langs->trans('MissingOrBadSecureKey'); + exit; +} + +// Load translation files +$langs->loadLangs(array("main", "companies", "install", "other", "eventorganization")); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('publicnewmembercard', 'globalcard')); + +$extrafields = new ExtraFields($db); + +$user->loadDefaultValues(); + + +/** + * Show header for new member + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print '<body id="mainbody" class="publicnewmemberform">'; + + // Define urllogo + $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?cache=1&amp;modulepart=mycompany&amp;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?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '<div class="center">'; + // Output html code for logo + if ($urllogo) { + print '<div class="backgreypublicpayment">'; + print '<div class="logopublicpayment">'; + print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; + print '>'; + print '</div>'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; + } + print '</div>'; + } + print '</div>'; + + print '<div class="divmainbodylarge">'; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '</div>'; + + printCommonFooter('public'); + + print "</body>\n"; + print "</html>\n"; +} + + + +/* + * Actions + */ +$parameters = array(); +// Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// Action called when page is submitted +if (empty($reshook) && $action == 'add') { + $error = 0; + + $urlback = ''; + + $db->begin(); + + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."<br>\n"; + } + // If the price has been set, name is required for the invoice + if (!GETPOST("societe") && !empty(floatval($project->price_registration))) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."<br>\n"; + } + if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n"; + } + if (!GETPOST("country_id")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."<br>\n"; + } + + if (!$error) { + // Vérifier si client existe par l'email + $thirdparty = new Societe($db); + $resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $email); + + if ($resultfetchthirdparty<0) { + $error++; + $errmsg .= $thirdparty->error; + $readythirdparty = -1; + } elseif ($resultfetchthirdparty==0) { + // creation of a new thirdparty + if (!empty(GETPOST("societe"))) { + $thirdparty->name = GETPOST("societe"); + } else { + $thirdparty->name = $email; + } + + $thirdparty->address = GETPOST("address"); + $thirdparty->zip = GETPOST("zipcode"); + $thirdparty->town = GETPOST("town"); + $thirdparty->client = 2; + $thirdparty->fournisseur = 0; + $thirdparty->country_id = GETPOST("country_id", 'int'); + $thirdparty->state_id = GETPOST("state_id", 'int'); + $thirdparty->email = $email; + + // Load object modCodeTiers + $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); + foreach ($dirsociete as $dirroot) { + $res = dol_include_once($dirroot.$module.'.php'); + if ($res) { + break; + } + } + $modCodeClient = new $module($db); + + if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { + $tmpcode = $modCodeClient->getNextValue($thirdparty, 0); + } + $thirdparty->code_client = $tmpcode; + $readythirdparty = $thirdparty->create($user); + } else { + // We have an existing thirdparty ready to use + $readythirdparty = 1; + } + + if ($readythirdparty < 0) { + $error++; + $errmsg .= $thirdparty->error; + } else { + // creation of an attendee + $confattendee = new ConferenceOrBoothAttendee($db); + $confattendee->fk_soc = $thirdparty->id; + $confattendee->date_subscription = dol_now(); + $confattendee->email = GETPOST("email"); + $confattendee->fk_actioncomm = $id; + $resultconfattendee = $confattendee->create($user); + if ($resultconfattendee < 0) { + $error++; + $errmsg .= $confattendee->error; + } + } + } + + if (!$error) { + $db->commit(); + //Header("Location: ".$urlback); + //exit; + } else { + $db->rollback(); + } +} + + +/* + * View + */ + +$form = new Form($db); +$formcompany = new FormCompany($db); + +$conference = new ConferenceOrBooth($db); +$resultconf = $conference->fetch($id); +if ($resultconf < 0) { + setEventMessages(null, $object->errors, "errors"); +} + +llxHeaderVierge($langs->trans("NewSubscription")); + + +print load_fiche_titre($langs->trans("NewSubscription"), '', '', 0, 0, 'center'); + + +print '<div align="center">'; +print '<div id="divsubscribe">'; +print '<div class="center subscriptionformhelptext justify">'; + +// Welcome message +print $langs->trans("EvntOrgWelcomeMessage"); +print $id.".".'<br>'; +print $langs->trans("EvntOrgStartDuration"); +print dol_print_date($conference->datep).' '; +print $langs->trans("EvntOrgEndDuration"); +print ' '.dol_print_date($conference->datef)."."; +print '</div>'; + +dol_htmloutput_errors($errmsg); + +// Print form +print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n"; +print '<input type="hidden" name="token" value="'.newToken().'" / >'; +print '<input type="hidden" name="entity" value="'.$entity.'" />'; +print '<input type="hidden" name="action" value="add" />'; +print '<input type="hidden" name="id" value="'.$encodedid.'" />'; +print '<input type="hidden" name="securekey" value="'.$encodedsecurekeyandid.'" />'; + +print '<br>'; + +print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>'; +//print $langs->trans("FieldsWithIsForPublic",'**').'<br>'; + +print dol_get_fiche_head(''); + +print '<script type="text/javascript"> +jQuery(document).ready(function () { + jQuery(document).ready(function () { + jQuery("#selectcountry_id").change(function() { + document.newmember.action.value="create"; + document.newmember.submit(); + }); + }); +}); +</script>'; + +print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; + +// Email +print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n"; +// Company +print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company"); +if (!empty(floatval($project->price_registration))) { + print '<FONT COLOR="red">*</FONT>'; +} +print ' </td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n"; +// Address +print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n"; +print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n"; +// Zip / Town +print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print ' / '; +print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); +print '</td></tr>'; +// Country +print '<tr><td>'.$langs->trans('Country').'<FONT COLOR="red">*</FONT></td><td>'; +$country_id = GETPOST('country_id'); +if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); +} +if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } +} +$country_code = getCountry($country_id, 2, $db, $langs); +print $form->select_country($country_id, 'country_id'); +print '</td></tr>'; +// State +if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print '<tr><td>'.$langs->trans('State').'</td><td>'; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } else { + print ''; + } + print '</td></tr>'; +} + +print "</table>\n"; + +print dol_get_fiche_end(); + +// Save +print '<div class="center">'; +print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; +if (!empty($backtopage)) { + print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; +} +print '</div>'; + + +print "</form>\n"; +print "<br>"; +print '</div></div>'; + + +llxFooterVierge(); + +$db->close(); diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 1946125dbc2..f3a364339b3 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -37,17 +37,29 @@ * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -67,7 +79,9 @@ $action = GETPOST('action', 'aZ09'); $langs->loadLangs(array("main", "members", "companies", "install", "other")); // Security check -if (empty($conf->adherent->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->adherent->enabled)) { + accessforbidden('', 0, 0, 1); +} if (empty($conf->global->MEMBER_ENABLE_PUBLIC)) { print $langs->trans("Auto subscription form for public visitors has not been enabled"); @@ -187,12 +201,12 @@ if (empty($reshook) && $action == 'add') { $langs->load("errors"); $errmsg .= $langs->trans("ErrorPasswordsMustMatch")."<br>\n"; } - if (!GETPOST("email")) { + if (!GETPOST('email')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("EMail"))."<br>\n"; } } - if (GETPOST('type') <= 0) { + if (GETPOST('typeid') <= 0) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type"))."<br>\n"; } @@ -200,21 +214,21 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('Nature'))."<br>\n"; } - if (empty($_POST["lastname"])) { + if (!GETPOST('lastname')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."<br>\n"; } - if (empty($_POST["firstname"])) { + if (!GETPOST('firstname')) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."<br>\n"; } - if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + if (GETPOST('email') && !isValidEmail(GETPOST('email'))) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n"; + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST('email'))."<br>\n"; } - $birthday = dol_mktime($_POST["birthhour"], $_POST["birthmin"], $_POST["birthsec"], $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); - if ($_POST["birthmonth"] && empty($birthday)) { + $birthday = dol_mktime(GETPOST("birthhour", 'int'), GETPOST("birthmin", 'int'), GETPOST("birthsec", 'int'), GETPOST("birthmonth", 'int'), GETPOST("birthday", 'int'), GETPOST("birthyear", 'int')); + if (GETPOST("birthmonth") && empty($birthday)) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n"; @@ -226,40 +240,41 @@ if (empty($reshook) && $action == 'add') { } } - if (isset($public)) $public = 1; - else $public = 0; + $public = GETPOSTISSET('public') ? 1 : 0; if (!$error) { // email a peu pres correct et le login n'existe pas $adh = new Adherent($db); $adh->statut = -1; $adh->public = $public; - $adh->firstname = $_POST["firstname"]; - $adh->lastname = $_POST["lastname"]; - $adh->gender = $_POST["gender"]; - $adh->civility_id = $_POST["civility_id"]; - $adh->societe = $_POST["societe"]; - $adh->address = $_POST["address"]; - $adh->zip = $_POST["zipcode"]; - $adh->town = $_POST["town"]; - $adh->email = $_POST["email"]; + $adh->firstname = GETPOST('firstname'); + $adh->lastname = GETPOST('lastname'); + $adh->gender = GETPOST('gender'); + $adh->civility_id = GETPOST('civility_id'); + $adh->societe = GETPOST('societe'); + $adh->address = GETPOST('address'); + $adh->zip = GETPOST('zipcode'); + $adh->town = GETPOST('town'); + $adh->email = GETPOST('email'); if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - $adh->login = $_POST["login"]; - $adh->pass = $_POST["pass1"]; + $adh->login = GETPOST('login'); + $adh->pass = GETPOST('pass1'); } - $adh->photo = $_POST["photo"]; - $adh->country_id = $_POST["country_id"]; - $adh->state_id = $_POST["state_id"]; - $adh->typeid = $_POST["type"]; - $adh->note_private = $_POST["note_private"]; - $adh->morphy = $_POST["morphy"]; + $adh->photo = GETPOST('photo'); + $adh->country_id = $conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE ? $conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE : GETPOST('country_id', 'int'); + $adh->state_id = GETPOST('state_id', 'int'); + $adh->typeid = $conf->global->MEMBER_NEWFORM_FORCETYPE ? $conf->global->MEMBER_NEWFORM_FORCETYPE : GETPOST('typeid', 'int'); + $adh->note_private = GETPOST('note_private'); + $adh->morphy = $conf->global->MEMBER_NEWFORM_FORCEMORPHY ? $conf->global->MEMBER_NEWFORM_FORCEMORPHY : GETPOST('morphy'); $adh->birth = $birthday; // Fill array 'array_options' with data from add form $extrafields->fetch_name_optionals_label($adh->table_element); $ret = $extrafields->setOptionalsFromPost(null, $adh); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } $result = $adh->create($user); if ($result > 0) { @@ -285,7 +300,9 @@ if (empty($reshook) && $action == 'add') { $arraydefaultmessage = null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER; - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + } if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; @@ -303,9 +320,9 @@ if (empty($reshook) && $action == 'add') { $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); } /*if ($result < 0) { - $error++; - setEventMessages($object->error, $object->errors, 'errors'); - }*/ + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + }*/ } // Send email to the foundation to say a new member subscribed with autosubscribe form @@ -316,8 +333,12 @@ if (empty($reshook) && $action == 'add') { if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; } @@ -355,8 +376,12 @@ if (empty($reshook) && $action == 'add') { if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE) && $conf->global->MEMBER_NEWFORM_PAYONLINE != '-1') { if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'all') { $urlback = DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); - if (price2num(GETPOST('amount', 'alpha'))) $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - if (GETPOST('email')) $urlback .= '&email='.urlencode(GETPOST('email')); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$adh->ref, 2)); @@ -366,8 +391,12 @@ if (empty($reshook) && $action == 'add') { } } elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox') { $urlback = DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); - if (price2num(GETPOST('amount', 'alpha'))) $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - if (GETPOST('email')) $urlback .= '&email='.urlencode(GETPOST('email')); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$adh->ref, 2)); @@ -377,8 +406,12 @@ if (empty($reshook) && $action == 'add') { } } elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') { $urlback = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=membernewform&source=membersubscription&ref='.urlencode($adh->ref); - if (price2num(GETPOST('amount', 'alpha'))) $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - if (GETPOST('email')) $urlback .= '&email='.urlencode(GETPOST('email')); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$adh->ref, 2)); @@ -388,8 +421,12 @@ if (empty($reshook) && $action == 'add') { } } elseif ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'stripe') { $urlback = DOL_MAIN_URL_ROOT.'/public/stripe/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref; - if (price2num(GETPOST('amount', 'alpha'))) $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); - if (GETPOST('email')) $urlback .= '&email='.urlencode(GETPOST('email')); + if (price2num(GETPOST('amount', 'alpha'))) { + $urlback .= '&amount='.price2num(GETPOST('amount', 'alpha')); + } + if (GETPOST('email')) { + $urlback .= '&email='.urlencode(GETPOST('email')); + } if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { $urlback .= '&securekey='.urlencode(dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$adh->ref, 2)); @@ -403,7 +440,9 @@ if (empty($reshook) && $action == 'add') { } } - if (!empty($entity)) $urlback .= '&entity='.$entity; + if (!empty($entity)) { + $urlback .= '&entity='.$entity; + } dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback); } else { $error++; @@ -508,7 +547,7 @@ jQuery(document).ready(function () { print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; -// Type + // Type if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { $listoftype = $adht->liste_array(); $tmp = array_keys($listoftype); @@ -519,12 +558,13 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) { $isempty = 0; } print '<tr><td class="titlefield">'.$langs->trans("Type").' <FONT COLOR="red">*</FONT></td><td>'; - print $form->selectarray("type", $adht->liste_array(), GETPOST('type') ?GETPOST('type') : $defaulttype, $isempty); + print $form->selectarray("typeid", $adht->liste_array(), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); print '</td></tr>'."\n"; } else { $adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE); - print '<input type="hidden" id="type" name="type" value="'.$conf->global->MEMBER_NEWFORM_FORCETYPE.'">'; + print '<input type="hidden" id="typeid" name="typeid" value="'.$conf->global->MEMBER_NEWFORM_FORCETYPE.'">'; } + // Moral/Physic attribute $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Moral"); @@ -536,6 +576,7 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) { print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; print '<input type="hidden" id="morphy" name="morphy" value="'.$conf->global->MEMBER_NEWFORM_FORCEMORPHY.'">'; } + // Civility print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>'; print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n"; @@ -572,7 +613,9 @@ if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { if ($country_code) { $new_country_id = getCountry($country_code, 3, $db, $langs); //print 'xxx'.$country_code.' - '.$new_country_id; - if ($new_country_id) $country_id = $new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } } } $country_code = getCountry($country_id, 2, $db, $langs); @@ -581,8 +624,9 @@ print '</td></tr>'; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print '<tr><td>'.$langs->trans('State').'</td><td>'; - if ($country_code) print $formcompany->select_state(GETPOST("state_id"), $country_code); - else print ''; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } print '</td></tr>'; } // EMail @@ -594,7 +638,7 @@ if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass2" class="minwidth100" value="'.GETPOST("pass2").'"></td></tr>'."\n"; } // Birthday -print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateToBirth").'</td><td>'; +print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>'; print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0); print '</td></tr>'."\n"; // Photo @@ -602,7 +646,7 @@ print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="ph // Public print '<tr><td>'.$langs->trans("Public").'</td><td><input type="checkbox" name="public"></td></tr>'."\n"; // Other attributes -$tpl_context = 'public'; //BUG #11554 : define templae context to public +$tpl_context = 'public'; // define template context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print '<tr>'; @@ -610,7 +654,7 @@ print '<td class="tdtop">'.$langs->trans("Comments").'</td>'; print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>'; print '</tr>'."\n"; -// Add specific fields used by Dolibarr foundation for example + // Add specific fields used by Dolibarr foundation for example if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { $arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+'); print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>'; @@ -627,11 +671,11 @@ if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { if (jQuery("#budget").val() > 0) { jQuery(".amount").val(jQuery("#budget").val()); } else { jQuery("#budget").val(\'\'); } }); - /*jQuery("#type").change(function() { - if (jQuery("#type").val()==1) { jQuery("#morphy").val(\'mor\'); } - if (jQuery("#type").val()==2) { jQuery("#morphy").val(\'phy\'); } - if (jQuery("#type").val()==3) { jQuery("#morphy").val(\'mor\'); } - if (jQuery("#type").val()==4) { jQuery("#morphy").val(\'mor\'); } + /*jQuery("#typeid").change(function() { + if (jQuery("#typeid").val()==1) { jQuery("#morphy").val(\'mor\'); } + if (jQuery("#typeid").val()==2) { jQuery("#morphy").val(\'phy\'); } + if (jQuery("#typeid").val()==3) { jQuery("#morphy").val(\'mor\'); } + if (jQuery("#typeid").val()==4) { jQuery("#morphy").val(\'mor\'); } initturnover(); });*/ function initturnover() { @@ -655,13 +699,16 @@ if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) { } if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { // $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount - $amount = 0; + + // Set amount for the subscription + $amount = isset($amount) ? $amount : 0; + if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { $amount = $conf->global->MEMBER_NEWFORM_AMOUNT; } if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) { - $amount = GETPOST('amount') ?GETPOST('amount') : $conf->global->MEMBER_NEWFORM_AMOUNT; + $amount = $amount ? $amount : (GETPOST('amount') ? GETPOST('amount') : $conf->global->MEMBER_NEWFORM_AMOUNT); } // $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe' print '<tr><td>'.$langs->trans("Subscription").'</td><td class="nowrap">'; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 18f918c26e2..4950db468f1 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -25,16 +25,26 @@ * \brief File to show a public card of a member */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -42,7 +52,9 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Security check -if (empty($conf->adherent->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->adherent->enabled)) { + accessforbidden('', 0, 0, 1); +} $langs->loadLangs(array("main", "members", "companies", "other")); @@ -66,24 +78,27 @@ $extrafields = new ExtraFields($db); */ $morehead = ''; -if (!empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">'; -else $morehead = '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php">'; +if (!empty($conf->global->MEMBER_PUBLIC_CSS)) { + $morehead = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">'; +} else { + $morehead = '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php">'; +} llxHeaderVierge($langs->trans("MemberCard"), $morehead); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -if ($id > 0) -{ +if ($id > 0) { $res = $object->fetch($id); - if ($res < 0) { dol_print_error($db, $object->error); exit; } + if ($res < 0) { + dol_print_error($db, $object->error); exit; + } $res = $object->fetch_optionals(); print load_fiche_titre($langs->trans("MemberCard"), '', ''); - if (empty($object->public)) - { + if (empty($object->public)) { print $langs->trans("ErrorThisMemberIsNotPublic"); } else { print '<table class="public_border" cellspacing="0" width="100%" cellpadding="3">'; @@ -100,8 +115,7 @@ if ($id > 0) print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.$object->email.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth, 'day').'</td></tr>'; - if (isset($object->photo) && $object->photo != '') - { + if (isset($object->photo) && $object->photo != '') { $form = new Form($db); print '<tr><td>URL Photo</td><td class="valeur">'; print $form->showphoto('memberphoto', $object, 64); @@ -139,7 +153,9 @@ function llxHeaderVierge($title, $head = "") print "<html>\n"; print "<head>\n"; print "<title>".$title."</title>\n"; - if ($head) print $head."\n"; + if ($head) { + print $head."\n"; + } print "</head>\n"; print '<body class="public_body">'."\n"; } diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index d81529d1eaf..80e092f2951 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -24,21 +24,33 @@ * \brief File sample to list members */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; // Security check -if (empty($conf->adherent->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->adherent->enabled)) { + accessforbidden('', 0, 0, 1); +} $langs->loadLangs(array("main", "members", "companies", "other")); @@ -59,7 +71,9 @@ function llxHeaderVierge($title, $head = "") print "<html>\n"; print "<head>\n"; print "<title>".$title."</title>\n"; - if ($head) print $head."\n"; + if ($head) { + print $head."\n"; + } print "</head>\n"; print '<body class="public_body">'."\n"; } @@ -82,7 +96,9 @@ $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $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; @@ -90,8 +106,12 @@ $pagenext = $page + 1; $filter = GETPOST('filter'); $statut = GETPOST('statut'); -if (!$sortorder) { $sortorder = "ASC"; } -if (!$sortfield) { $sortfield = "lastname"; } +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "lastname"; +} /* @@ -101,14 +121,17 @@ if (!$sortfield) { $sortfield = "lastname"; } $form = new Form($db); $morehead = ''; -if (!empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">'; -else $morehead = '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php">'; +if (!empty($conf->global->MEMBER_PUBLIC_CSS)) { + $morehead = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">'; +} else { + $morehead = '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php">'; +} llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"), $morehead); $sql = "SELECT rowid, firstname, lastname, societe, zip, town, email, birth, photo"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent"; -$sql .= " WHERE entity = ".$entity; +$sql .= " WHERE entity = ".((int) $entity); $sql .= " AND statut = 1"; $sql .= " AND public = 1"; $sql .= $db->order($sortfield, $sortorder); @@ -119,8 +142,7 @@ $sql .= $db->plimit($conf->liste_limit + 1, $offset); //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; @@ -131,15 +153,14 @@ if ($result) print '<tr class="public_liste_titre">'; print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.dolGetFirstLastname($langs->trans("Firstname"), $langs->trans("Lastname")).'</a></td>'; print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n"; - //print_liste_field_titre("DateToBirth", $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? + //print_liste_field_titre("DateOfBirth", $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "email", '', $param, '', $sortfield, $sortorder, 'public_'); print_liste_field_titre("Zip", $_SERVER["PHP_SELF"], "zip", "", $param, '', $sortfield, $sortorder, 'public_'); print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "town", "", $param, '', $sortfield, $sortorder, 'public_'); print_liste_field_titre("Photo", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'public_'); print "</tr>\n"; - while ($i < $num && $i < $conf->liste_limit) - { + while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($result); print '<tr class="oddeven">'; @@ -148,8 +169,7 @@ if ($result) print '<td>'.$objp->email.'</td>'."\n"; print '<td>'.$objp->zip.'</td>'."\n"; print '<td>'.$objp->town.'</td>'."\n"; - if (isset($objp->photo) && $objp->photo != '') - { + if (isset($objp->photo) && $objp->photo != '') { print '<td>'; print $form->showphoto('memberphoto', $objp, 64); print '</td>'."\n"; diff --git a/htdocs/public/notice.php b/htdocs/public/notice.php index 59b8e3a70cb..f85c628e1eb 100644 --- a/htdocs/public/notice.php +++ b/htdocs/public/notice.php @@ -24,11 +24,21 @@ * /public/notice.php?transphrase=url_encoded_sentence_to_show */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOSESSION')) define('NOSESSION', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../main.inc.php'; @@ -37,13 +47,15 @@ require '../main.inc.php'; * View */ -if (!GETPOST('transkey', 'alphanohtml') && !GETPOST('transphrase', 'alphanohtml')) -{ +if (!GETPOST('transkey', 'alphanohtml') && !GETPOST('transphrase', 'alphanohtml')) { print 'Sorry, it seems your internet connexion is off.<br>'; print 'You need to be connected to network to use this software.<br>'; } else { $langs->loadLangs(array("error", "other")); - if (GETPOST('transphrase', 'alphanohtml')) print dol_escape_htmltag(GETPOST('transphrase', 'alphanohtml')); - elseif (GETPOST('transkey', 'alphanohtml')) print dol_escape_htmltag($langs->trans(GETPOST('transkey', 'alphanohtml'))); + if (GETPOST('transphrase', 'alphanohtml')) { + print dol_escape_htmltag(GETPOST('transphrase', 'alphanohtml')); + } elseif (GETPOST('transkey', 'alphanohtml')) { + print dol_escape_htmltag($langs->trans(GETPOST('transkey', 'alphanohtml'))); + } } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 56690f78a42..a4a2de27beb 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -23,16 +23,26 @@ * \brief File to offer a way to make an online signature for a particular Dolibarr entity */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -60,12 +70,12 @@ $suffix = GETPOST("suffix", 'aZ09'); $source = GETPOST("source", 'alpha'); $ref = $REF = GETPOST("ref", 'alpha'); -if (empty($source)) $source = 'proposal'; +if (empty($source)) { + $source = 'proposal'; +} -if (!$action) -{ - if ($source && !$ref) - { +if (!$action) { + if ($source && !$ref) { print $langs->trans('ErrorBadParameters')." - ref missing"; exit; } @@ -81,23 +91,19 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren // Complete urls for post treatment $SECUREKEY = GETPOST("securekey"); // Secure key -if (!empty($source)) -{ +if (!empty($source)) { $urlok .= 'source='.urlencode($source).'&'; $urlko .= 'source='.urlencode($source).'&'; } -if (!empty($REF)) -{ +if (!empty($REF)) { $urlok .= 'ref='.urlencode($REF).'&'; $urlko .= 'ref='.urlencode($REF).'&'; } -if (!empty($SECUREKEY)) -{ +if (!empty($SECUREKEY)) { $urlok .= 'securekey='.urlencode($SECUREKEY).'&'; $urlko .= 'securekey='.urlencode($SECUREKEY).'&'; } -if (!empty($entity)) -{ +if (!empty($entity)) { $urlok .= 'entity='.urlencode($entity).'&'; $urlko .= 'entity='.urlencode($entity).'&'; } @@ -112,8 +118,7 @@ $creditor = $mysoc->name; */ -if ($action == 'dosign') -{ +if ($action == 'dosign') { // TODO } @@ -123,7 +128,9 @@ if ($action == 'dosign') */ $head = ''; -if (!empty($conf->global->MAIN_SIGN_CSS_URL)) $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +if (!empty($conf->global->MAIN_SIGN_CSS_URL)) { + $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +} $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; @@ -132,8 +139,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>'; llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1); // Check link validity for param 'source' -if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) -{ +if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) { $langs->load("errors"); dol_print_error_email('BADREFINONLINESIGNFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref)); // End of page @@ -161,24 +167,24 @@ print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; -elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) $logosmall = $conf->global->ONLINE_SIGN_LOGO; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) { + $logosmall = $conf->global->ONLINE_SIGN_LOGO; +} //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) -{ +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo -if ($urllogo) -{ +if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; @@ -192,16 +198,17 @@ if ($urllogo) // Output introduction text $text = ''; -if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) -{ +if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) { $langs->load("members"); $reg = array(); - if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) $text .= $langs->trans($reg[1])."<br>\n"; - else $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT."<br>\n"; + if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) { + $text .= $langs->trans($reg[1])."<br>\n"; + } else { + $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT."<br>\n"; + } $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; } -if (empty($text)) -{ +if (empty($text)) { $text .= '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("WelcomeOnOnlineSignaturePage", $mysoc->name).'</strong></td></tr>'."\n"; $text .= '<tr><td class="textpublicpayment">'.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'<br><br></td></tr>'."\n"; } @@ -217,8 +224,7 @@ $error = 0; $var = false; // Payment on customer order -if ($source == 'proposal') -{ +if ($source == 'proposal') { $found = true; $langs->load("proposal"); @@ -226,8 +232,7 @@ if ($source == 'proposal') $proposal = new Propal($db); $result = $proposal->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $proposal->error; $error++; } else { @@ -258,9 +263,13 @@ if ($source == 'proposal') -if (!$found && !$mesg) $mesg = $langs->transnoentitiesnoconv("ErrorBadParameters"); +if (!$found && !$mesg) { + $mesg = $langs->transnoentitiesnoconv("ErrorBadParameters"); +} -if ($mesg) print '<tr><td align="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n"; +if ($mesg) { + print '<tr><td align="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n"; +} print '</table>'."\n"; print "\n"; diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 3f19fb68b7e..5f5446ae3f1 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -22,10 +22,18 @@ * \brief Page to list surveys */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; @@ -37,8 +45,7 @@ require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; // Init vars $action = GETPOST('action', 'aZ09'); $numsondage = ''; -if (GETPOST('sondage')) -{ +if (GETPOST('sondage')) { $numsondage = GETPOST('sondage', 'alpha'); } @@ -51,7 +58,9 @@ $nblines = $object->fetch_lines(); $canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); // Security check -if (empty($conf->opensurvey->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->opensurvey->enabled)) { + accessforbidden('', 0, 0, 1); +} /* @@ -63,51 +72,49 @@ $nbcolonnes = substr_count($object->sujet, ',') + 1; $listofvoters = explode(',', $_SESSION["savevoter"]); // Add comment -if (GETPOST('ajoutcomment', 'alpha')) -{ - if (!$canbemodified) accessforbidden('', 0, 0, 1); +if (GETPOST('ajoutcomment', 'alpha')) { + if (!$canbemodified) { + accessforbidden('', 0, 0, 1); + } $error = 0; $comment = GETPOST("comment", 'restricthtml'); $comment_user = GETPOST('commentuser', 'nohtml'); - if (!$comment) - { + if (!$comment) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors'); } - if (!$comment_user) - { + if (!$comment_user) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors'); } - if (!in_array($comment_user, $listofvoters)) - { + if (!in_array($comment_user, $listofvoters)) { setEventMessages($langs->trans("UserMustBeSameThanUserUsedToVote"), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $resql = $object->addComment($comment, $comment_user); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } } // Add vote -if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrome, boutonp_x for firefox -{ - if (!$canbemodified) accessforbidden('', 0, 0, 1); +if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // boutonp for chrome, boutonp_x for firefox + if (!$canbemodified) { + accessforbidden('', 0, 0, 1); + } //Si le nom est bien entré - if (GETPOST('nom', 'nohtml')) - { + if (GETPOST('nom', 'nohtml')) { $nouveauchoix = ''; - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { if (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '1') { $nouveauchoix .= "1"; } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { @@ -124,11 +131,12 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $sql .= ' FROM '.MAIN_DB_PREFIX.'opensurvey_user_studs'; $sql .= " WHERE id_sondage='".$db->escape($numsondage)."' AND nom = '".$db->escape($nom)."' ORDER BY id_users"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $num_rows = $db->num_rows($resql); - if ($num_rows > 0) - { + if ($num_rows > 0) { setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors'); $error++; } else { @@ -136,14 +144,12 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."','".$db->escape($nouveauchoix)."')"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { // Add voter to session $_SESSION["savevoter"] = $nom.','.(empty($_SESSION["savevoter"]) ? '' : $_SESSION["savevoter"]); // Save voter $listofvoters = explode(',', $_SESSION["savevoter"]); - if ($object->mailsonde) - { + if ($object->mailsonde) { if ($object->fk_user_creat) { $userstatic = new User($db); $userstatic->fetch($object->fk_user_creat); @@ -166,7 +172,9 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $result = $cmailfile->sendfile(); } } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors'); @@ -178,29 +186,23 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i = 0; $i < $nblines; $i++) -{ - if (GETPOSTISSET('modifierligne'.$i)) - { +for ($i = 0; $i < $nblines; $i++) { + if (GETPOSTISSET('modifierligne'.$i)) { $ligneamodifier = $i; $testligneamodifier = true; } //test to see if a line is to be modified - if (GETPOSTISSET('validermodifier'.$i)) - { + if (GETPOSTISSET('validermodifier'.$i)) { $modifier = $i; $testmodifier = true; } } -if ($testmodifier) -{ +if ($testmodifier) { //var_dump($_POST);exit; $nouveauchoix = ''; - for ($i = 0; $i < $nbcolonnes; $i++) - { - //var_dump($_POST["choix$i"]); + for ($i = 0; $i < $nbcolonnes; $i++) { if (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '1') { $nouveauchoix .= "1"; } elseif (GETPOSTISSET("choix".$i) && GETPOST("choix".$i) == '2') { @@ -210,22 +212,27 @@ if ($testmodifier) } } - if (!$canbemodified) accessforbidden('', 0, 0, 1); + if (!$canbemodified) { + accessforbidden('', 0, 0, 1); + } - $idtomodify = $_POST["idtomodify".$modifier]; + $idtomodify = GETPOST("idtomodify".$modifier); $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql .= " WHERE id_users = '".$db->escape($idtomodify)."'"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } // Delete comment $idcomment = GETPOST('deletecomment', 'int'); -if ($idcomment) -{ - if (!$canbemodified) accessforbidden('', 0, 0, 1); +if ($idcomment) { + if (!$canbemodified) { + accessforbidden('', 0, 0, 1); + } $resql = $object->deleteComment($idcomment); } @@ -243,8 +250,7 @@ $arrayofcss = array('/opensurvey/css/style.css'); llxHeaderSurvey($object->title, "", 0, 0, $arrayofjs, $arrayofcss, $numsondage); -if (empty($object->ref)) // For survey, id is a hex string -{ +if (empty($object->ref)) { // For survey, id is a hex string $langs->load("errors"); print $langs->trans("ErrorRecordNotFound"); @@ -257,8 +263,7 @@ if (empty($object->ref)) // For survey, id is a hex string // Define format of choices $toutsujet = explode(",", $object->sujet); $listofanswers = array(); -foreach ($toutsujet as $value) -{ +foreach ($toutsujet as $value) { $tmp = explode('@', $value); $listofanswers[] = array('label'=>$tmp[0], 'format'=>($tmp[1] ? $tmp[1] : 'checkbox')); } @@ -276,8 +281,7 @@ $titre = str_replace("\\", "", $object->title); print '<strong>'.dol_htmlentities($titre).'</strong><br><br>'."\n"; // show description of survey -if ($object->description) -{ +if ($object->description) { print dol_htmlentitiesbr($object->description); print '<br>'."\n"; } @@ -300,8 +304,7 @@ print '<br><br>'."\n"; print '<table class="resultats">'."\n"; // Show choice titles -if ($object->format == "D") -{ +if ($object->format == "D") { //display of survey topics print '<tr>'."\n"; print '<td></td>'."\n"; @@ -309,8 +312,7 @@ if ($object->format == "D") //display of years $colspan = 1; $nbofsujet = count($toutsujet); - for ($i = 0; $i < $nbofsujet; $i++) - { + for ($i = 0; $i < $nbofsujet; $i++) { if (isset($toutsujet[$i + 1]) && date('Y', intval($toutsujet[$i])) == date('Y', intval($toutsujet[$i + 1]))) { $colspan++; } else { @@ -386,8 +388,7 @@ if ($object->format == "D") print '<tr>'."\n"; print '<td></td>'."\n"; - for ($i = 0; isset($toutsujet[$i]); $i++) - { + for ($i = 0; isset($toutsujet[$i]); $i++) { $tmp = explode('@', $toutsujet[$i]); print '<td class="sujet">'.dol_escape_htmltag($tmp[0]).'</td>'."\n"; } @@ -404,14 +405,12 @@ $sql = "SELECT id_users, nom as name, id_sondage, reponses"; $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); -if (!$resql) -{ +if (!$resql) { dol_print_error($db); exit; } $num = $db->num_rows($resql); -while ($compteur < $num) -{ +while ($compteur < $num) { $obj = $db->fetch_object($resql); $ensemblereponses = $obj->reponses; @@ -430,121 +429,167 @@ while ($compteur < $num) print '<td class="nom">'.dol_htmlentities($obj->name).'</td>'."\n"; // si la ligne n'est pas a changer, on affiche les données - if (!$testligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { + if (!$testligneamodifier) { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); //print 'xx'.$i."-".$car.'-'.$listofanswers[$i]['format'].'zz'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { - if (((string) $car) == "1") print '<td class="ok">OK</td>'."\n"; - else print '<td class="non">KO</td>'."\n"; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + if (((string) $car) == "1") { + print '<td class="ok">OK</td>'."\n"; + } else { + print '<td class="non">KO</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("No").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("Yes").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("No").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } } } else { //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs - if ($compteur == $ligneamodifier) - { - for ($i = 0; $i < $nbcolonnes; $i++) - { + if ($compteur == $ligneamodifier) { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); print '<td class="vide">'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { print '<input type="checkbox" name="choix'.$i.'" value="1" '; - if ($car == '1') print 'checked'; + if ($car == '1') { + print 'checked'; + } print '>'; } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("No"), '1'=>$langs->trans("Yes")); print $form->selectarray("choix".$i, $arraychoice, $car); } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("Against"), '1'=>$langs->trans("For")); print $form->selectarray("choix".$i, $arraychoice, $car); } print '</td>'."\n"; } } else { - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { - if (((string) $car) == "1") print '<td class="ok">OK</td>'."\n"; - else print '<td class="non">KO</td>'."\n"; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + if (((string) $car) == "1") { + print '<td class="ok">OK</td>'."\n"; + } else { + print '<td class="non">KO</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { - if (((string) $car) == "1") print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; - elseif (((string) $car) == "0") print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; - else print '<td class="vide">&nbsp;</td>'."\n"; + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + if (((string) $car) == "1") { + print '<td class="ok">'.$langs->trans("For").'</td>'."\n"; + } elseif (((string) $car) == "0") { + print '<td class="non">'.$langs->trans("Against").'</td>'."\n"; + } else { + print '<td class="vide">&nbsp;</td>'."\n"; + } // Total - if (!isset($sumfor[$i])) $sumfor[$i] = 0; - if (!isset($sumagainst[$i])) $sumagainst[$i] = 0; - if (((string) $car) == "1") $sumfor[$i]++; - if (((string) $car) == "0") $sumagainst[$i]++; + if (!isset($sumfor[$i])) { + $sumfor[$i] = 0; + } + if (!isset($sumagainst[$i])) { + $sumagainst[$i] = 0; + } + if (((string) $car) == "1") { + $sumfor[$i]++; + } + if (((string) $car) == "0") { + $sumagainst[$i]++; + } } } } } // Button edit at end of line - if ($compteur != $ligneamodifier && $mod_ok) - { + if ($compteur != $ligneamodifier && $mod_ok) { print '<td class="casevide"><input type="submit" class="button smallpaddingimp" name="modifierligne'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Edit")).'"></td>'."\n"; } //demande de confirmation pour modification de ligne - for ($i = 0; $i < $nblines; $i++) - { - if (GETPOSTISSET("modifierligne".$i)) - { - if ($compteur == $i) - { + for ($i = 0; $i < $nblines; $i++) { + if (GETPOSTISSET("modifierligne".$i)) { + if ($compteur == $i) { print '<td class="casevide">'; print '<input type="hidden" name="idtomodify'.$compteur.'" value="'.$obj->id_users.'">'; print '<input type="submit" class="button button-save" name="validermodifier'.$compteur.'" value="'.dol_escape_htmltag($langs->trans("Save")).'">'; @@ -558,12 +603,10 @@ while ($compteur < $num) } // Add line to add new record -if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) -{ +if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) { print '<tr>'."\n"; print '<td class="nom">'."\n"; - if (isset($_SESSION['nom'])) - { + if (isset($_SESSION['nom'])) { print '<input type=hidden name="nom" value="'.$_SESSION['nom'].'">'.$_SESSION['nom']."\n"; } else { print '<input type="text" name="nom" placeholder="'.dol_escape_htmltag($langs->trans("Name")).'" maxlength="64" size="24">'."\n"; @@ -571,24 +614,20 @@ if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) print '</td>'."\n"; // affichage des cases de formulaire checkbox pour un nouveau choix - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { print '<td class="vide">'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { print '<input type="checkbox" name="choix'.$i.'" value="1"'; if (GETPOSTISSET('choix'.$i) && GETPOST('choix'.$i) == '1') { print ' checked'; } print '>'; } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("No"), '1'=>$langs->trans("Yes")); print $form->selectarray("choix".$i, $arraychoice, GETPOST('choix'.$i)); } - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') - { + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { $arraychoice = array('2'=>'&nbsp;', '0'=>$langs->trans("Against"), '1'=>$langs->trans("For")); print $form->selectarray("choix".$i, $arraychoice, GETPOST('choix'.$i)); } @@ -602,18 +641,15 @@ if ($ligneamodifier < 0 && (!isset($_SESSION['nom']))) // Select value of best choice (for checkbox columns only) $nbofcheckbox = 0; -for ($i = 0; $i < $nbcolonnes; $i++) -{ - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) - $nbofcheckbox++; - if (isset($sumfor[$i])) - { - if ($i == 0) - { +for ($i = 0; $i < $nbcolonnes; $i++) { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + $nbofcheckbox++; + } + if (isset($sumfor[$i])) { + if ($i == 0) { $meilleurecolonne = $sumfor[$i]; } - if (!isset($meilleurecolonne) || $sumfor[$i] > $meilleurecolonne) - { + if (!isset($meilleurecolonne) || $sumfor[$i] > $meilleurecolonne) { $meilleurecolonne = $sumfor[$i]; } } @@ -623,30 +659,36 @@ if ($object->allow_spy) { // Show line total print '<tr>'."\n"; print '<td class="center">'.$langs->trans("Total").'</td>'."\n"; - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { $showsumfor = isset($sumfor[$i]) ? $sumfor[$i] : ''; $showsumagainst = isset($sumagainst[$i]) ? $sumagainst[$i] : ''; - if (empty($showsumfor)) $showsumfor = 0; - if (empty($showsumagainst)) $showsumagainst = 0; + if (empty($showsumfor)) { + $showsumfor = 0; + } + if (empty($showsumagainst)) { + $showsumagainst = 0; + } print '<td>'; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) print $showsumfor; - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst; - if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst; + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst'))) { + print $showsumfor; + } + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'yesno') { + print $langs->trans("Yes").': '.$showsumfor.'<br>'.$langs->trans("No").': '.$showsumagainst; + } + if (!empty($listofanswers[$i]['format']) && $listofanswers[$i]['format'] == 'foragainst') { + print $langs->trans("For").': '.$showsumfor.'<br>'.$langs->trans("Against").': '.$showsumagainst; + } print '</td>'."\n"; } print '</tr>'; // Show picto winner - if ($nbofcheckbox >= 2) - { + if ($nbofcheckbox >= 2) { print '<tr>'."\n"; print '<td class="somme"></td>'."\n"; - for ($i = 0; $i < $nbcolonnes; $i++) - { + for ($i = 0; $i < $nbcolonnes; $i++) { //print 'xx'.(! empty($listofanswers[$i]['format'])).'-'.$sumfor[$i].'-'.$meilleurecolonne; - if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) - { + if (empty($listofanswers[$i]['format']) || !in_array($listofanswers[$i]['format'], array('yesno', 'foragainst')) && isset($sumfor[$i]) && isset($meilleurecolonne) && $sumfor[$i] == $meilleurecolonne) { print '<td class="somme"><img src="'.dol_buildpath('/opensurvey/img/medaille.png', 1).'"></td>'."\n"; } else { print '<td class="somme"></td>'."\n"; @@ -691,8 +733,7 @@ if ($object->allow_spy) { // Show best choice - if ($nbofcheckbox >= 2) - { + if ($nbofcheckbox >= 2) { $vote_str = $langs->trans('votes'); print '<p class="affichageresultats">'."\n"; @@ -712,8 +753,7 @@ print '<br>'; // Comment list $comments = $object->getComments(); -if ($comments) -{ +if ($comments) { print '<br><u><span class="bold opacitymedium">'.$langs->trans("CommentsOfVoters").':</span></u><br>'."\n"; foreach ($comments as $obj) { @@ -721,7 +761,9 @@ if ($comments) //$mod_ok = (in_array($obj->name, $listofvoters)); print '<div class="comment"><span class="usercomment">'; - if (in_array($obj->usercomment, $listofvoters)) print '<a href="'.$_SERVER["PHP_SELF"].'?deletecomment='.$obj->id_comment.'&sondage='.$numsondage.'"> '.img_picto('', 'delete.png', '', false, 0, 0, '', 'nomarginleft').'</a> '; + if (in_array($obj->usercomment, $listofvoters)) { + print '<a href="'.$_SERVER["PHP_SELF"].'?deletecomment='.$obj->id_comment.'&sondage='.$numsondage.'"> '.img_picto('', 'delete.png', '', false, 0, 0, '', 'nomarginleft').'</a> '; + } //else print img_picto('', 'ellipsis-h', '', false, 0, 0, '', 'nomarginleft').' '; print dol_htmlentities($obj->usercomment).':</span> <span class="comment">'.dol_nl2br(dol_htmlentities($obj->comment))."</span></div>"; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index bda291b8d8a..40c742d562a 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -4,6 +4,7 @@ * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> + * Copyright (C) 2021 Waël Almoman <info@almoman.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,15 +35,25 @@ * \brief File to offer a way to make a payment for a particular Dolibarr object */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)))); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -72,25 +83,24 @@ $action = GETPOST('action', 'aZ09'); $suffix = GETPOST("suffix", 'aZ09'); $amount = price2num(GETPOST("amount", 'alpha')); -if (!GETPOST("currency", 'alpha')) $currency = $conf->currency; -else $currency = GETPOST("currency", 'aZ09'); +if (!GETPOST("currency", 'alpha')) { + $currency = $conf->currency; +} else { + $currency = GETPOST("currency", 'aZ09'); +} $source = GETPOST("s", 'aZ09') ?GETPOST("s", 'aZ09') : GETPOST("source", 'aZ09'); $download = GETPOST('d', 'int') ?GETPOST('d', 'int') : GETPOST('download', 'int'); -if (!$action) -{ - if (!GETPOST("amount", 'alpha') && !$source) - { +if (!$action) { + if (!GETPOST("amount", 'alpha') && !$source) { print $langs->trans('ErrorBadParameters')." - amount or source"; exit; } - if (is_numeric($amount) && !GETPOST("tag", 'alpha') && !$source) - { + if (is_numeric($amount) && !GETPOST("tag", 'alpha') && !$source) { print $langs->trans('ErrorBadParameters')." - tag or source"; exit; } - if ($source && !GETPOST("ref", 'alpha')) - { + if ($source && !GETPOST("ref", 'alpha')) { print $langs->trans('ErrorBadParameters')." - ref"; exit; } @@ -101,10 +111,8 @@ $paymentmethod = GETPOST('paymentmethod', 'alphanohtml') ?GETPOST('paymentmethod $validpaymentmethod = array(); // Detect $paymentmethod -foreach ($_POST as $key => $val) -{ - if (preg_match('/^dopayment_(.*)$/', $key, $reg)) - { +foreach ($_POST as $key => $val) { + if (preg_match('/^dopayment_(.*)$/', $key, $reg)) { $paymentmethod = $reg[1]; break; } @@ -124,40 +132,35 @@ $ref = $REF = GETPOST('ref', 'alpha'); $TAG = GETPOST("tag", 'alpha'); $FULLTAG = GETPOST("fulltag", 'alpha'); // fulltag is tag with more informations $SECUREKEY = GETPOST("securekey"); // Secure key -if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG)) $FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod; +if ($paymentmethod && !preg_match('/'.preg_quote('PM='.$paymentmethod, '/').'/', $FULLTAG)) { + $FULLTAG .= ($FULLTAG ? '.' : '').'PM='.$paymentmethod; +} -if (!empty($suffix)) -{ +if (!empty($suffix)) { $urlok .= 'suffix='.urlencode($suffix).'&'; $urlko .= 'suffix='.urlencode($suffix).'&'; } -if ($source) -{ +if ($source) { $urlok .= 's='.urlencode($source).'&'; $urlko .= 's='.urlencode($source).'&'; } -if (!empty($REF)) -{ +if (!empty($REF)) { $urlok .= 'ref='.urlencode($REF).'&'; $urlko .= 'ref='.urlencode($REF).'&'; } -if (!empty($TAG)) -{ +if (!empty($TAG)) { $urlok .= 'tag='.urlencode($TAG).'&'; $urlko .= 'tag='.urlencode($TAG).'&'; } -if (!empty($FULLTAG)) -{ +if (!empty($FULLTAG)) { $urlok .= 'fulltag='.urlencode($FULLTAG).'&'; $urlko .= 'fulltag='.urlencode($FULLTAG).'&'; } -if (!empty($SECUREKEY)) -{ +if (!empty($SECUREKEY)) { $urlok .= 'securekey='.urlencode($SECUREKEY).'&'; $urlko .= 'securekey='.urlencode($SECUREKEY).'&'; } -if (!empty($entity)) -{ +if (!empty($entity)) { $urlok .= 'e='.urlencode($entity).'&'; $urlko .= 'e='.urlencode($entity).'&'; } @@ -168,38 +171,36 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last & // Make special controls -if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) -{ +if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; // Check parameters $PAYPAL_API_OK = ""; - if ($urlok) $PAYPAL_API_OK = $urlok; + if ($urlok) { + $PAYPAL_API_OK = $urlok; + } $PAYPAL_API_KO = ""; - if ($urlko) $PAYPAL_API_KO = $urlko; - if (empty($PAYPAL_API_USER)) - { + if ($urlko) { + $PAYPAL_API_KO = $urlko; + } + if (empty($PAYPAL_API_USER)) { dol_print_error('', "Paypal setup param PAYPAL_API_USER not defined"); return -1; } - if (empty($PAYPAL_API_PASSWORD)) - { + if (empty($PAYPAL_API_PASSWORD)) { dol_print_error('', "Paypal setup param PAYPAL_API_PASSWORD not defined"); return -1; } - if (empty($PAYPAL_API_SIGNATURE)) - { + if (empty($PAYPAL_API_SIGNATURE)) { dol_print_error('', "Paypal setup param PAYPAL_API_SIGNATURE not defined"); return -1; } } -if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) -{ +if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { // No specific test for the moment } -if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) -{ +if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/stripe-php/init.php, ... } @@ -215,36 +216,36 @@ $reshook = $hookmanager->executeHooks('doValidatePayment', $parameters, $object, // Check security token $valid = true; -if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) -{ - if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) - { - if ($source && $REF) $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical - else $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); +if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + if ($source && $REF) { + $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical + } else { + $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); + } } else { $token = $conf->global->PAYMENT_SECURITY_TOKEN; } - if ($SECUREKEY != $token) - { - if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility - else dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING); + if ($SECUREKEY != $token) { + if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) { + $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility + } else { + dol_syslog("Warning: PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is on", LOG_WARNING); + } } - if (!$valid) - { + if (!$valid) { print '<div class="error">Bad value for key.</div>'; //print 'SECUREKEY='.$SECUREKEY.' token='.$token.' valid='.$valid; exit; } } -if (!empty($paymentmethod) && empty($validpaymentmethod[$paymentmethod])) -{ +if (!empty($paymentmethod) && empty($validpaymentmethod[$paymentmethod])) { print 'Payment module for payment method '.$paymentmethod.' is not active'; exit; } -if (empty($validpaymentmethod)) -{ +if (empty($validpaymentmethod)) { print 'No active payment module (Paypal, Stripe, Paybox, ...)'; exit; } @@ -253,8 +254,11 @@ if (empty($validpaymentmethod)) $creditor = $mysoc->name; $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; -if (!empty($conf->global->$paramcreditorlong)) $creditor = $conf->global->$paramcreditorlong; -elseif (!empty($conf->global->$paramcreditor)) $creditor = $conf->global->$paramcreditor; +if (!empty($conf->global->$paramcreditorlong)) { + $creditor = $conf->global->$paramcreditorlong; +} elseif (!empty($conf->global->$paramcreditor)) { + $creditor = $conf->global->$paramcreditor; +} @@ -263,10 +267,8 @@ elseif (!empty($conf->global->$paramcreditor)) $creditor = $conf->global->$param */ // Action dopayment is called after clicking/choosing the payment mode -if ($action == 'dopayment') -{ - if ($paymentmethod == 'paypal') - { +if ($action == 'dopayment') { + if ($paymentmethod == 'paypal') { $PAYPAL_API_PRICE = price2num(GETPOST("newamount", 'alpha'), 'MT'); $PAYPAL_PAYMENT_TYPE = 'Sale'; @@ -285,33 +287,30 @@ if ($action == 'dopayment') $thirdparty_id = GETPOST('thirdparty_id', 'int'); // Special case for Paypal-Indonesia - if ($shipToCountryCode == 'ID' && !preg_match('/\-/', $shipToState)) - { + if ($shipToCountryCode == 'ID' && !preg_match('/\-/', $shipToState)) { $shipToState = 'ID-'.$shipToState; } $mesg = ''; - if (empty($PAYPAL_API_PRICE) || !is_numeric($PAYPAL_API_PRICE)) - { + if (empty($PAYPAL_API_PRICE) || !is_numeric($PAYPAL_API_PRICE)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")); $action = ''; - } - //elseif (empty($EMAIL)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail")); - //elseif (! isValidEMail($EMAIL)) $mesg=$langs->trans("ErrorBadEMail",$EMAIL); - elseif (!$origfulltag) - { + // } elseif (empty($EMAIL)) { $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail")); + // } elseif (! isValidEMail($EMAIL)) { $mesg=$langs->trans("ErrorBadEMail",$EMAIL); + } elseif (!$origfulltag) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode")); $action = ''; } //var_dump($_POST); - if (empty($mesg)) - { + if (empty($mesg)) { dol_syslog("newpayment.php call paypal api and do redirect", LOG_DEBUG); // Other $PAYPAL_API_DEVISE = "USD"; - if (!empty($currency)) $PAYPAL_API_DEVISE = $currency; + if (!empty($currency)) { + $PAYPAL_API_DEVISE = $currency; + } // Show var initialized by include fo paypal lib at begin of this file dol_syslog("Submit Paypal form", LOG_DEBUG); @@ -345,8 +344,7 @@ if ($action == 'dopayment') } } - if ($paymentmethod == 'paybox') - { + if ($paymentmethod == 'paybox') { $PRICE = price2num(GETPOST("newamount"), 'MT'); $email = $conf->global->ONLINE_PAYMENT_SENDEMAIL; $thirdparty_id = GETPOST('thirdparty_id', 'int'); @@ -358,15 +356,21 @@ if ($action == 'dopayment') $urlko = preg_replace('/securekey=[^&]+/', '', $urlko); $mesg = ''; - if (empty($PRICE) || !is_numeric($PRICE)) $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")); - elseif (empty($email)) $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("YourEMail")); - elseif (!isValidEMail($email)) $mesg = $langs->trans("ErrorBadEMail", $email); - elseif (!$origfulltag) $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode")); - elseif (dol_strlen($urlok) > 150) $mesg = 'Error urlok too long '.$urlok.'( Paybox requires 150, found '.strlen($urlok).')'; - elseif (dol_strlen($urlko) > 150) $mesg = 'Error urlko too long '.$urlko.'( Paybox requires 150, found '.strlen($urlok).')'; + if (empty($PRICE) || !is_numeric($PRICE)) { + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")); + } elseif (empty($email)) { + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("YourEMail")); + } elseif (!isValidEMail($email)) { + $mesg = $langs->trans("ErrorBadEMail", $email); + } elseif (!$origfulltag) { + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode")); + } elseif (dol_strlen($urlok) > 150) { + $mesg = 'Error urlok too long '.$urlok.'( Paybox requires 150, found '.strlen($urlok).')'; + } elseif (dol_strlen($urlko) > 150) { + $mesg = 'Error urlko too long '.$urlko.'( Paybox requires 150, found '.strlen($urlok).')'; + } - if (empty($mesg)) - { + if (empty($mesg)) { dol_syslog("newpayment.php call paybox api and do redirect", LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/paybox/lib/paybox.lib.php'; @@ -377,10 +381,10 @@ if ($action == 'dopayment') } } - if ($paymentmethod == 'stripe') - { - if (GETPOST('newamount', 'alpha')) $amount = price2num(GETPOST('newamount', 'alpha'), 'MT'); - else { + if ($paymentmethod == 'stripe') { + if (GETPOST('newamount', 'alpha')) { + $amount = price2num(GETPOST('newamount', 'alpha'), 'MT'); + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $action = ''; } @@ -391,26 +395,27 @@ if ($action == 'dopayment') // Called when choosing Stripe mode. // When using the Charge API architecture, this code is called after clicking the 'dopayment' with the Charge API architecture. // When using the PaymentIntent API architecture, the Stripe customer is already created when creating PaymentIntent when showing payment page and the payment is already ok. -if ($action == 'charge' && !empty($conf->stripe->enabled)) -{ +if ($action == 'charge' && !empty($conf->stripe->enabled)) { $amountstripe = $amount; // Correct the amount according to unit of currency // See https://support.stripe.com/questions/which-zero-decimal-currencies-does-stripe-support $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (!in_array($currency, $arrayzerounitcurrency)) $amountstripe = $amountstripe * 100; + if (!in_array($currency, $arrayzerounitcurrency)) { + $amountstripe = $amountstripe * 100; + } dol_syslog("--- newpayment.php Execute action = ".$action, LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST keys : ".join(',', array_keys($_POST)), LOG_DEBUG, 0, '_stripe'); - dol_syslog("POST values: ".join(',', $_POST), LOG_DEBUG, 0, '_stripe'); + dol_syslog("GET=".var_export($_GET, true), LOG_DEBUG, 0, '_stripe'); + dol_syslog("POST=".var_export($_POST, true), LOG_DEBUG, 0, '_stripe'); $stripeToken = GETPOST("stripeToken", 'alpha'); $email = GETPOST("email", 'alpha'); $thirdparty_id = GETPOST('thirdparty_id', 'int'); // Note that for payment following online registration for members, this is empty because thirdparty is created once payment is confirmed by paymentok.php $dol_type = (GETPOST('s', 'alpha') ? GETPOST('s', 'alpha') : GETPOST('source', 'alpha')); - $dol_id = GETPOST('dol_id', 'int'); - $vatnumber = GETPOST('vatnumber', 'alpha'); - $savesource = GETPOSTISSET('savesource') ?GETPOST('savesource', 'int') : 1; + $dol_id = GETPOST('dol_id', 'int'); + $vatnumber = GETPOST('vatnumber', 'alpha'); + $savesource = GETPOSTISSET('savesource') ? GETPOST('savesource', 'int') : 1; dol_syslog("POST stripeToken = ".$stripeToken, LOG_DEBUG, 0, '_stripe'); dol_syslog("POST email = ".$email, LOG_DEBUG, 0, '_stripe'); @@ -421,8 +426,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) $errormessage = ''; // When using the old Charge API architecture - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { try { $metadata = array( 'dol_version' => DOL_VERSION, @@ -432,16 +436,16 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) 'ipaddress'=> getUserRemoteIP() ); - if (!empty($thirdparty_id)) $metadata["dol_thirdparty_id"] = $thirdparty_id; + if (!empty($thirdparty_id)) { + $metadata["dol_thirdparty_id"] = $thirdparty_id; + } - if ($thirdparty_id > 0) - { + if ($thirdparty_id > 0) { dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_stripe'); $service = 'StripeTest'; $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'int')) - { + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'int')) { $service = 'StripeLive'; $servicestatus = 1; } @@ -454,8 +458,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) $stripe = new Stripe($db); $stripeacc = $stripe->getStripeAccount($service); $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 1); - if (empty($customer)) - { + if (empty($customer)) { $error++; dol_syslog('Failed to get/create stripe customer for thirdparty id = '.$thirdparty_id.' and servicestatus = '.$servicestatus.': '.$stripe->error, LOG_ERR, 0, '_stripe'); setEventMessages('Failed to get/create stripe customer for thirdparty id = '.$thirdparty_id.' and servicestatus = '.$servicestatus.': '.$stripe->error, null, 'errors'); @@ -463,24 +466,28 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) } // Create Stripe card from Token - if (!$error) - { + if (!$error) { if ($savesource) { $card = $customer->sources->create(array("source" => $stripeToken, "metadata" => $metadata)); } else { $card = $stripeToken; } - if (empty($card)) - { + if (empty($card)) { $error++; dol_syslog('Failed to create card record', LOG_WARNING, 0, '_stripe'); setEventMessages('Failed to create card record', null, 'errors'); $action = ''; } else { - if (!empty($FULLTAG)) $metadata["FULLTAG"] = $FULLTAG; - if (!empty($dol_id)) $metadata["dol_id"] = $dol_id; - if (!empty($dol_type)) $metadata["dol_type"] = $dol_type; + if (!empty($FULLTAG)) { + $metadata["FULLTAG"] = $FULLTAG; + } + if (!empty($dol_id)) { + $metadata["dol_id"] = $dol_id; + } + if (!empty($dol_type)) { + $metadata["dol_type"] = $dol_type; + } dol_syslog("Create charge on card ".$card->id, LOG_DEBUG, 0, '_stripe'); $charge = \Stripe\Charge::create(array( @@ -494,8 +501,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) 'statement_descriptor_suffix' => dol_trunc($FULLTAG, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) ), array("idempotency_key" => "$FULLTAG", "stripe_account" => "$stripeacc")); // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) - if (empty($charge)) - { + if (empty($charge)) { $error++; dol_syslog('Failed to charge card', LOG_WARNING, 0, '_stripe'); setEventMessages('Failed to charge card', null, 'errors'); @@ -507,13 +513,13 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) $vatcleaned = $vatnumber ? $vatnumber : null; /*$taxinfo = array('type'=>'vat'); - if ($vatcleaned) - { - $taxinfo["tax_id"] = $vatcleaned; - } - // We force data to "null" if not defined as expected by Stripe - if (empty($vatcleaned)) $taxinfo=null; - */ + if ($vatcleaned) + { + $taxinfo["tax_id"] = $vatcleaned; + } + // We force data to "null" if not defined as expected by Stripe + if (empty($vatcleaned)) $taxinfo=null; + */ dol_syslog("Create anonymous customer card profile", LOG_DEBUG, 0, '_stripe'); @@ -527,22 +533,28 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) // Create the VAT record in Stripe /* We don't know country of customer, so we can't create tax - if (! empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer - { - if (! empty($vatcleaned)) - { - $isineec=isInEEC($object); - if ($object->country_code && $isineec) - { - //$taxids = $customer->allTaxIds($customer->id); - $customer->createTaxId($customer->id, array('type'=>'eu_vat', 'value'=>$vatcleaned)); - } - } - }*/ + if (! empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer + { + if (! empty($vatcleaned)) + { + $isineec=isInEEC($object); + if ($object->country_code && $isineec) + { + //$taxids = $customer->allTaxIds($customer->id); + $customer->createTaxId($customer->id, array('type'=>'eu_vat', 'value'=>$vatcleaned)); + } + } + }*/ - if (!empty($FULLTAG)) $metadata["FULLTAG"] = $FULLTAG; - if (!empty($dol_id)) $metadata["dol_id"] = $dol_id; - if (!empty($dol_type)) $metadata["dol_type"] = $dol_type; + if (!empty($FULLTAG)) { + $metadata["FULLTAG"] = $FULLTAG; + } + if (!empty($dol_id)) { + $metadata["dol_id"] = $dol_id; + } + if (!empty($dol_type)) { + $metadata["dol_type"] = $dol_type; + } // The customer was just created with a source, so we can make a charge // with no card defined, the source just used for customer creation will be used. @@ -557,8 +569,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) 'statement_descriptor' => dol_trunc($FULLTAG, 10, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt (company + description) ), array("idempotency_key" => "$FULLTAG", "stripe_account" => "$stripeacc")); // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) - if (empty($charge)) - { + if (empty($charge)) { $error++; dol_syslog('Failed to charge card', LOG_WARNING, 0, '_stripe'); setEventMessages('Failed to charge card', null, 'errors'); @@ -630,12 +641,10 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) } // When using the PaymentIntent API architecture - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { $service = 'StripeTest'; $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'int')) - { + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'int')) { $service = 'StripeLive'; $servicestatus = 1; } @@ -657,8 +666,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) } else { $paymentintent = \Stripe\PaymentIntent::retrieve($paymentintent_id, array("stripe_account" => $stripeacc)); } - } catch (Exception $e) - { + } catch (Exception $e) { $error++; $errormessage = "CantRetrievePaymentIntent ".$e->getMessage(); dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); @@ -666,8 +674,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) $action = ''; } - if ($paymentintent->status != 'succeeded') - { + if ($paymentintent->status != 'succeeded') { $error++; $errormessage = "StatusOfRetrievedIntent is not succeeded: ".$paymentintent->status; dol_syslog($errormessage, LOG_WARNING, 0, '_stripe'); @@ -698,8 +705,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) dol_syslog("error=".$error." errormessage=".$errormessage, LOG_DEBUG, 0, '_stripe'); dol_syslog("Now call the redirect to paymentok or paymentko, URL = ".($error ? $urlko : $urlok), LOG_DEBUG, 0, '_stripe'); - if ($error) - { + if ($error) { header("Location: ".$urlko); exit; } else { @@ -714,7 +720,9 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) */ $head = ''; -if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { + $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +} $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; @@ -723,8 +731,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>'; llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); // Check link validity -if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) -{ +if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) { $langs->load("errors"); dol_print_error_email('BADREFINPAYMENTFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref)); // End of page @@ -735,12 +742,10 @@ if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_r // Show sandbox warning -if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled) && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) // We can force sand box with param 'forcesandbox' -{ +if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled) && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) { // We can force sand box with param 'forcesandbox' dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Paypal'), '', 'warning'); } -if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) -{ +if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } @@ -763,25 +768,25 @@ print "\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; -elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +} //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) -{ +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo -if ($urllogo) -{ +if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; @@ -799,17 +804,14 @@ if ($urllogo) print '<!-- Form to send a payment -->'."\n"; print '<!-- creditor = '.$creditor.' -->'."\n"; // Additionnal information for each payment system -if (!empty($conf->paypal->enabled)) -{ +if (!empty($conf->paypal->enabled)) { print '<!-- PAYPAL_API_SANDBOX = '.$conf->global->PAYPAL_API_SANDBOX.' -->'."\n"; print '<!-- PAYPAL_API_INTEGRAL_OR_PAYPALONLY = '.$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY.' -->'."\n"; } -if (!empty($conf->paybox->enabled)) -{ +if (!empty($conf->paybox->enabled)) { print '<!-- PAYBOX_CGI_URL = '.$conf->global->PAYBOX_CGI_URL_V2.' -->'."\n"; } -if (!empty($conf->stripe->enabled)) -{ +if (!empty($conf->stripe->enabled)) { print '<!-- STRIPE_LIVE = '.$conf->global->STRIPE_LIVE.' -->'."\n"; } print '<!-- urlok = '.$urlok.' -->'."\n"; @@ -820,15 +822,16 @@ print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n"; // Output introduction text $text = ''; -if (!empty($conf->global->PAYMENT_NEWFORM_TEXT)) -{ +if (!empty($conf->global->PAYMENT_NEWFORM_TEXT)) { $langs->load("members"); - if (preg_match('/^\((.*)\)$/', $conf->global->PAYMENT_NEWFORM_TEXT, $reg)) $text .= $langs->trans($reg[1])."<br>\n"; - else $text .= $conf->global->PAYMENT_NEWFORM_TEXT."<br>\n"; + if (preg_match('/^\((.*)\)$/', $conf->global->PAYMENT_NEWFORM_TEXT, $reg)) { + $text .= $langs->trans($reg[1])."<br>\n"; + } else { + $text .= $conf->global->PAYMENT_NEWFORM_TEXT."<br>\n"; + } $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; } -if (empty($text)) -{ +if (empty($text)) { $text .= '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("WelcomeOnPaymentPage").'</strong></td></tr>'."\n"; $text .= '<tr><td class="textpublicpayment">'.$langs->trans("ThisScreenAllowsYouToPay", $creditor).'<br><br></td></tr>'."\n"; } @@ -847,8 +850,7 @@ $object = null; // Free payment -if (!$source) -{ +if (!$source) { $found = true; $tag = GETPOST("tag", 'alpha'); if (GETPOST('fulltag', 'alpha')) { @@ -865,10 +867,11 @@ if (!$source) // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Amount"); - if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; + if (empty($amount)) { + print ' ('.$langs->trans("ToComplete").')'; + } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; } else { @@ -894,8 +897,7 @@ if (!$source) // Payment on customer order -if ($source == 'order') -{ +if ($source == 'order') { $found = true; $langs->load("orders"); @@ -903,8 +905,7 @@ if ($source == 'order') $order = new Commande($db); $result = $order->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $order->error; $error++; } else { @@ -912,10 +913,11 @@ if ($source == 'order') } $object = $order; - if ($action != 'dopayment') // Do not change amount if we just click on first dopayment - { + if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $order->total_ttc; - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount); } @@ -923,7 +925,9 @@ if ($source == 'order') $fulltag = GETPOST('fulltag', 'alpha'); } else { $fulltag = 'ORD='.$order->id.'.CUS='.$order->thirdparty->id; - if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; } + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } } $fulltag = dol_string_unaccent($fulltag); @@ -940,15 +944,16 @@ if ($source == 'order') // Object $text = '<b>'.$langs->trans("PaymentOrderRef", $order->ref).'</b>'; - if (GETPOST('desc', 'alpha')) $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + if (GETPOST('desc', 'alpha')) { + $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + } print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Designation"); print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.$text; print '<input type="hidden" name="s" value="'.dol_escape_htmltag($source).'">'; print '<input type="hidden" name="ref" value="'.dol_escape_htmltag($order->ref).'">'; - print '<input type="hidden" name="dol_id" value="'.dol_escape_htmltag($order->id).'">'; + print '<input type="hidden" name="dol_id" value="'.dol_escape_htmltag($order->id).'">'; $directdownloadlink = $order->getLastMainDocLink('commande'); - if ($directdownloadlink) - { + if ($directdownloadlink) { print '<br><a href="'.$directdownloadlink.'" rel="nofollow noopener">'; print img_mime($order->last_main_doc, ''); print $langs->trans("DownloadDocument").'</a>'; @@ -957,10 +962,11 @@ if ($source == 'order') // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Amount"); - if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; + if (empty($amount)) { + print ' ('.$langs->trans("ToComplete").')'; + } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; } else { @@ -989,8 +995,7 @@ if ($source == 'order') $shipToZip = $order->thirdparty->zip; $shipToStreet2 = ''; $phoneNum = $order->thirdparty->phone; - if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) - { + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { print '<input type="hidden" name="shipToName" value="'.dol_escape_htmltag($shipToName).'">'."\n"; print '<input type="hidden" name="shipToStreet" value="'.dol_escape_htmltag($shipToStreet).'">'."\n"; print '<input type="hidden" name="shipToCity" value="'.dol_escape_htmltag($shipToCity).'">'."\n"; @@ -1002,18 +1007,21 @@ if ($source == 'order') } else { print '<!-- Shipping address not complete, so we don t use it -->'."\n"; } - if (is_object($order->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$order->thirdparty->id.'">'."\n"; + if (is_object($order->thirdparty)) { + print '<input type="hidden" name="thirdparty_id" value="'.$order->thirdparty->id.'">'."\n"; + } print '<input type="hidden" name="email" value="'.$order->thirdparty->email.'">'."\n"; print '<input type="hidden" name="vatnumber" value="'.dol_escape_htmltag($order->thirdparty->tva_intra).'">'."\n"; $labeldesc = $langs->trans("Order").' '.$order->ref; - if (GETPOST('desc', 'alpha')) $labeldesc = GETPOST('desc', 'alpha'); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n"; } // Payment on customer invoice -if ($source == 'invoice') -{ +if ($source == 'invoice') { $found = true; $langs->load("bills"); @@ -1021,8 +1029,7 @@ if ($source == 'invoice') $invoice = new Facture($db); $result = $invoice->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $invoice->error; $error++; } else { @@ -1030,10 +1037,11 @@ if ($source == 'invoice') } $object = $invoice; - if ($action != 'dopayment') // Do not change amount if we just click on first dopayment - { + if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = price2num($invoice->total_ttc - ($invoice->getSommePaiement() + $invoice->getSumCreditNotesUsed() + $invoice->getSumDepositsUsed())); - if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'alpha'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount); } @@ -1041,7 +1049,9 @@ if ($source == 'invoice') $fulltag = GETPOST('fulltag', 'alpha'); } else { $fulltag = 'INV='.$invoice->id.'.CUS='.$invoice->thirdparty->id; - if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; } + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } } $fulltag = dol_string_unaccent($fulltag); @@ -1058,15 +1068,16 @@ if ($source == 'invoice') // Object $text = '<b>'.$langs->trans("PaymentInvoiceRef", $invoice->ref).'</b>'; - if (GETPOST('desc', 'alpha')) $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + if (GETPOST('desc', 'alpha')) { + $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + } print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Designation"); print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.$text; print '<input type="hidden" name="s" value="'.dol_escape_htmltag($source).'">'; print '<input type="hidden" name="ref" value="'.dol_escape_htmltag($invoice->ref).'">'; - print '<input type="hidden" name="dol_id" value="'.dol_escape_htmltag($invoice->id).'">'; + print '<input type="hidden" name="dol_id" value="'.dol_escape_htmltag($invoice->id).'">'; $directdownloadlink = $invoice->getLastMainDocLink('facture'); - if ($directdownloadlink) - { + if ($directdownloadlink) { print '<br><a href="'.$directdownloadlink.'">'; print img_mime($invoice->last_main_doc, ''); print $langs->trans("DownloadDocument").'</a>'; @@ -1075,13 +1086,14 @@ if ($source == 'invoice') // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("PaymentAmount"); - if (empty($amount) && empty($object->paye)) print ' ('.$langs->trans("ToComplete").')'; + if (empty($amount) && empty($object->paye)) { + print ' ('.$langs->trans("ToComplete").')'; + } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; if ($object->type == $object::TYPE_CREDIT_NOTE) { print '<b>'.$langs->trans("CreditNote").'</b>'; } elseif (empty($object->paye)) { - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; } else { @@ -1114,8 +1126,7 @@ if ($source == 'invoice') $shipToZip = $invoice->thirdparty->zip; $shipToStreet2 = ''; $phoneNum = $invoice->thirdparty->phone; - if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) - { + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n"; print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n"; print '<input type="hidden" name="shipToCity" value="'.$shipToCity.'">'."\n"; @@ -1127,17 +1138,20 @@ if ($source == 'invoice') } else { print '<!-- Shipping address not complete, so we don t use it -->'."\n"; } - if (is_object($invoice->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$invoice->thirdparty->id.'">'."\n"; + if (is_object($invoice->thirdparty)) { + print '<input type="hidden" name="thirdparty_id" value="'.$invoice->thirdparty->id.'">'."\n"; + } print '<input type="hidden" name="email" value="'.$invoice->thirdparty->email.'">'."\n"; print '<input type="hidden" name="vatnumber" value="'.$invoice->thirdparty->tva_intra.'">'."\n"; $labeldesc = $langs->trans("Invoice").' '.$invoice->ref; - if (GETPOST('desc', 'alpha')) $labeldesc = GETPOST('desc', 'alpha'); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n"; } // Payment on contract line -if ($source == 'contractline') -{ +if ($source == 'contractline') { $found = true; $langs->load("contracts"); @@ -1147,16 +1161,13 @@ if ($source == 'contractline') $contractline = new ContratLigne($db); $result = $contractline->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $contractline->error; $error++; } else { - if ($contractline->fk_contrat > 0) - { + if ($contractline->fk_contrat > 0) { $result = $contract->fetch($contractline->fk_contrat); - if ($result > 0) - { + if ($result > 0) { $result = $contract->fetch_thirdparty($contract->socid); } else { $mesg = $contract->error; @@ -1169,18 +1180,15 @@ if ($source == 'contractline') } $object = $contractline; - if ($action != 'dopayment') // Do not change amount if we just click on first dopayment - { + if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $contractline->total_ttc; - if ($contractline->fk_product && !empty($conf->global->PAYMENT_USE_NEW_PRICE_FOR_CONTRACTLINES)) - { + if ($contractline->fk_product && !empty($conf->global->PAYMENT_USE_NEW_PRICE_FOR_CONTRACTLINES)) { $product = new Product($db); $result = $product->fetch($contractline->fk_product); // We define price for product (TODO Put this in a method in product class) - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { $pu_ht = $product->multiprices[$contract->thirdparty->price_level]; $pu_ttc = $product->multiprices_ttc[$contract->thirdparty->price_level]; $price_base_type = $product->multiprices_base_type[$contract->thirdparty->price_level]; @@ -1191,14 +1199,15 @@ if ($source == 'contractline') } $amount = $pu_ttc; - if (empty($amount)) - { + if (empty($amount)) { dol_print_error('', 'ErrorNoPriceDefinedForThisProduct'); exit; } } - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount); } @@ -1206,12 +1215,16 @@ if ($source == 'contractline') $fulltag = GETPOST('fulltag', 'alpha'); } else { $fulltag = 'COL='.$contractline->id.'.CON='.$contract->id.'.CUS='.$contract->thirdparty->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S'); - if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; } + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } } $fulltag = dol_string_unaccent($fulltag); $qty = 1; - if (GETPOST('qty')) $qty = GETPOST('qty'); + if (GETPOST('qty')) { + $qty = GETPOST('qty'); + } // Creditor print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Creditor"); @@ -1226,29 +1239,30 @@ if ($source == 'contractline') // Object $text = '<b>'.$langs->trans("PaymentRenewContractId", $contract->ref, $contractline->ref).'</b>'; - if ($contractline->fk_product) - { + if ($contractline->fk_product) { $contractline->fetch_product(); $text .= '<br>'.$contractline->product->ref.($contractline->product->label ? ' - '.$contractline->product->label : ''); } - if ($contractline->description) $text .= '<br>'.dol_htmlentitiesbr($contractline->description); + if ($contractline->description) { + $text .= '<br>'.dol_htmlentitiesbr($contractline->description); + } //if ($contractline->date_fin_validite) { // $text.='<br>'.$langs->trans("DateEndPlanned").': '; // $text.=dol_print_date($contractline->date_fin_validite); //} - if ($contractline->date_fin_validite) - { + if ($contractline->date_fin_validite) { $text .= '<br>'.$langs->trans("ExpiredSince").': '.dol_print_date($contractline->date_fin_validite); } - if (GETPOST('desc', 'alpha')) $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + if (GETPOST('desc', 'alpha')) { + $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + } print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Designation"); print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.$text; print '<input type="hidden" name="source" value="'.dol_escape_htmltag($source).'">'; print '<input type="hidden" name="ref" value="'.dol_escape_htmltag($contractline->ref).'">'; print '<input type="hidden" name="dol_id" value="'.dol_escape_htmltag($contractline->id).'">'; $directdownloadlink = $contract->getLastMainDocLink('contract'); - if ($directdownloadlink) - { + if ($directdownloadlink) { print '<br><a href="'.$directdownloadlink.'">'; print img_mime($contract->last_main_doc, ''); print $langs->trans("DownloadDocument").'</a>'; @@ -1259,15 +1273,12 @@ if ($source == 'contractline') $label = $langs->trans("Quantity"); $qty = 1; $duration = ''; - if ($contractline->fk_product) - { - if ($contractline->product->isService() && $contractline->product->duration_value > 0) - { + if ($contractline->fk_product) { + if ($contractline->product->isService() && $contractline->product->duration_value > 0) { $label = $langs->trans("Duration"); // TODO Put this in a global method - if ($contractline->product->duration_value > 1) - { + if ($contractline->product->duration_value > 1) { $dur = array("h"=>$langs->trans("Hours"), "d"=>$langs->trans("DurationDays"), "w"=>$langs->trans("DurationWeeks"), "m"=>$langs->trans("DurationMonths"), "y"=>$langs->trans("DurationYears")); } else { $dur = array("h"=>$langs->trans("Hour"), "d"=>$langs->trans("DurationDay"), "w"=>$langs->trans("DurationWeek"), "m"=>$langs->trans("DurationMonth"), "y"=>$langs->trans("DurationYear")); @@ -1282,10 +1293,11 @@ if ($source == 'contractline') // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Amount"); - if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; + if (empty($amount)) { + print ' ('.$langs->trans("ToComplete").')'; + } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; } else { @@ -1314,8 +1326,7 @@ if ($source == 'contractline') $shipToZip = $contract->thirdparty->zip; $shipToStreet2 = ''; $phoneNum = $contract->thirdparty->phone; - if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) - { + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n"; print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n"; print '<input type="hidden" name="shipToCity" value="'.$shipToCity.'">'."\n"; @@ -1327,17 +1338,20 @@ if ($source == 'contractline') } else { print '<!-- Shipping address not complete, so we don t use it -->'."\n"; } - if (is_object($contract->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$contract->thirdparty->id.'">'."\n"; + if (is_object($contract->thirdparty)) { + print '<input type="hidden" name="thirdparty_id" value="'.$contract->thirdparty->id.'">'."\n"; + } print '<input type="hidden" name="email" value="'.$contract->thirdparty->email.'">'."\n"; print '<input type="hidden" name="vatnumber" value="'.$contract->thirdparty->tva_intra.'">'."\n"; $labeldesc = $langs->trans("Contract").' '.$contract->ref; - if (GETPOST('desc', 'alpha')) $labeldesc = GETPOST('desc', 'alpha'); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n"; } // Payment on member subscription -if ($source == 'member' || $source == 'membersubscription') -{ +if ($source == 'member' || $source == 'membersubscription') { $found = true; $langs->load("members"); @@ -1346,8 +1360,7 @@ if ($source == 'member' || $source == 'membersubscription') $member = new Adherent($db); $result = $member->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $member->error; $error++; } else { @@ -1356,10 +1369,11 @@ if ($source == 'member' || $source == 'membersubscription') } $object = $member; - if ($action != 'dopayment') // Do not change amount if we just click on first dopayment - { + if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $subscription->total_ttc; - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount, 'MT'); } @@ -1367,7 +1381,9 @@ if ($source == 'member' || $source == 'membersubscription') $fulltag = GETPOST('fulltag', 'alpha'); } else { $fulltag = 'MEM='.$member->id.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S'); - if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; } + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } } $fulltag = dol_string_unaccent($fulltag); @@ -1380,14 +1396,19 @@ if ($source == 'member' || $source == 'membersubscription') // Debitor print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Member"); print '</td><td class="CTableRow'.($var ? '1' : '2').'"><b>'; - if ($member->morphy == 'mor' && !empty($member->societe)) print $member->societe; - else print $member->getFullName($langs); + if ($member->morphy == 'mor' && !empty($member->societe)) { + print $member->societe; + } else { + print $member->getFullName($langs); + } print '</b>'; print '</td></tr>'."\n"; // Object $text = '<b>'.$langs->trans("PaymentSubscription").'</b>'; - if (GETPOST('desc', 'alpha')) $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + if (GETPOST('desc', 'alpha')) { + $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + } print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Designation"); print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.$text; print '<input type="hidden" name="source" value="'.dol_escape_htmltag($source).'">'; @@ -1400,8 +1421,7 @@ if ($source == 'member' || $source == 'membersubscription') print '</td></tr>'."\n"; } - if ($member->last_subscription_date || $member->last_subscription_amount) - { + if ($member->last_subscription_date || $member->last_subscription_amount) { // Last subscription date print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("LastSubscriptionDate"); @@ -1414,25 +1434,63 @@ if ($source == 'member' || $source == 'membersubscription') print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.price($member->last_subscription_amount); print '</td></tr>'."\n"; - if (empty($amount) && !GETPOST('newamount', 'alpha')) $_GET['newamount'] = $member->last_subscription_amount; + if (empty($amount) && !GETPOST('newamount', 'alpha')) { + $_GET['newamount'] = $member->last_subscription_amount; + } + } + + if ($member->type) { + // Last member type + print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("LastMemberType"); + print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.dol_escape_htmltag($member->type); + print "</td></tr>\n"; + } + + if (!empty($conf->global->MEMBER_SUBSCRIPTION_AMOUNT_BY_TYPE)) { + // Amount by member type + $amountbytype = array(); // TODO Read the amount of subscription into table of types + // Set the member type + $member->typeid = (int) (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $member->typeid); + // If we change the type of membership, we set also label of new type + $member->type = dol_getIdFromCode($db, $member->typeid, 'adherent_type', 'rowid', 'libelle'); + // Set amount for the subscription + $amount = (!empty($member->last_subscription_amount)) ? $member->last_subscription_amount : $amountbytype[$member->typeid]; + // list member type + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; + $adht = new AdherentType($db); + if ( !$action) { + $form = new Form($db); // so we can call method selectarray + print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("NewSubscription"); + print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; + print $form->selectarray("typeid", $adht->liste_array(1), $member->typeid, 0, 0, 0, 'onchange="window.location.replace(\''.$urlwithroot.'/public/payment/newpayment.php?source='.urlencode($source).'&ref='.urlencode($ref).'&amount='.urlencode($amount).'&typeid=\' + this.value + \'&securekey='.urlencode($SECUREKEY).'\');"', 0, 0, 0, '', '', 1); + print "</td></tr>\n"; + } elseif ($action == dopayment) { + print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("NewMemberType"); + print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.dol_escape_htmltag($member->type); + print '<input type="hidden" name="membertypeid" value="'.$member->typeid.'">'; + print "</td></tr>\n"; + } } // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Amount"); - if (empty($amount)) - { - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ' ('.$langs->trans("ToComplete"); - if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) print ' - <a href="'.$conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO.'" rel="external" target="_blank">'.$langs->trans("SeeHere").'</a>'; - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ')'; + if (empty($amount)) { + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + print ' ('.$langs->trans("ToComplete"); + } + if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { + print ' - <a href="'.$conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO.'" rel="external" target="_blank">'.$langs->trans("SeeHere").'</a>'; + } + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + print ')'; + } } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; $valtoshow = ''; - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { $valtoshow = price2num(GETPOST("newamount", 'alpha'), 'MT'); // force default subscription amount to value defined into constant... - if (empty($valtoshow)) - { + if (empty($valtoshow)) { if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { $valtoshow = $conf->global->MEMBER_NEWFORM_AMOUNT; @@ -1444,10 +1502,11 @@ if ($source == 'member' || $source == 'membersubscription') } } } - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); + if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { + $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); + } print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { print '<input class="flat maxwidth75" type="text" name="newamountbis" value="'.$valtoshow.'" disabled>'; @@ -1486,8 +1545,7 @@ if ($source == 'member' || $source == 'membersubscription') $shipToZip = $member->zip; $shipToStreet2 = ''; $phoneNum = $member->phone; - if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) - { + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { print '<!-- Shipping address information -->'; print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n"; print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n"; @@ -1500,16 +1558,19 @@ if ($source == 'member' || $source == 'membersubscription') } else { print '<!-- Shipping address not complete, so we don t use it -->'."\n"; } - if (is_object($member->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$member->thirdparty->id.'">'."\n"; + if (is_object($member->thirdparty)) { + print '<input type="hidden" name="thirdparty_id" value="'.$member->thirdparty->id.'">'."\n"; + } print '<input type="hidden" name="email" value="'.$member->email.'">'."\n"; $labeldesc = $langs->trans("PaymentSubscription"); - if (GETPOST('desc', 'alpha')) $labeldesc = GETPOST('desc', 'alpha'); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n"; } // Payment on donation -if ($source == 'donation') -{ +if ($source == 'donation') { $found = true; $langs->load("don"); @@ -1517,8 +1578,7 @@ if ($source == 'donation') $don = new Don($db); $result = $don->fetch($ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $don->error; $error++; } else { @@ -1526,10 +1586,11 @@ if ($source == 'donation') } $object = $don; - if ($action != 'dopayment') // Do not change amount if we just click on first dopayment - { + if ($action != 'dopayment') { // Do not change amount if we just click on first dopayment $amount = $subscription->total_ttc; - if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount); } @@ -1537,7 +1598,9 @@ if ($source == 'donation') $fulltag = GETPOST('fulltag', 'alpha'); } else { $fulltag = 'DON='.$don->ref.'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S'); - if (!empty($TAG)) { $tag = $TAG; $fulltag .= '.TAG='.$TAG; } + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } } $fulltag = dol_string_unaccent($fulltag); @@ -1550,14 +1613,19 @@ if ($source == 'donation') // Debitor print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("ThirdParty"); print '</td><td class="CTableRow'.($var ? '1' : '2').'"><b>'; - if ($don->morphy == 'mor' && !empty($don->societe)) print $don->societe; - else print $don->getFullName($langs); + if ($don->morphy == 'mor' && !empty($don->societe)) { + print $don->societe; + } else { + print $don->getFullName($langs); + } print '</b>'; print '</td></tr>'."\n"; // Object $text = '<b>'.$langs->trans("PaymentDonation").'</b>'; - if (GETPOST('desc', 'alpha')) $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + if (GETPOST('desc', 'alpha')) { + $text = '<b>'.$langs->trans(GETPOST('desc', 'alpha')).'</b>'; + } print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Designation"); print '</td><td class="CTableRow'.($var ? '1' : '2').'">'.$text; print '<input type="hidden" name="source" value="'.dol_escape_htmltag($source).'">'; @@ -1566,20 +1634,23 @@ if ($source == 'donation') // Amount print '<tr class="CTableRow'.($var ? '1' : '2').'"><td class="CTableRow'.($var ? '1' : '2').'">'.$langs->trans("Amount"); - if (empty($amount)) - { - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ' ('.$langs->trans("ToComplete"); - if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) print ' - <a href="'.$conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO.'" rel="external" target="_blank">'.$langs->trans("SeeHere").'</a>'; - if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) print ')'; + if (empty($amount)) { + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + print ' ('.$langs->trans("ToComplete"); + } + if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { + print ' - <a href="'.$conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO.'" rel="external" target="_blank">'.$langs->trans("SeeHere").'</a>'; + } + if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { + print ')'; + } } print '</td><td class="CTableRow'.($var ? '1' : '2').'">'; $valtoshow = ''; - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { $valtoshow = price2num(GETPOST("newamount", 'alpha'), 'MT'); // force default subscription amount to value defined into constant... - if (empty($valtoshow)) - { + if (empty($valtoshow)) { if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { $valtoshow = $conf->global->MEMBER_NEWFORM_AMOUNT; @@ -1591,10 +1662,11 @@ if ($source == 'donation') } } } - if (empty($amount) || !is_numeric($amount)) - { + if (empty($amount) || !is_numeric($amount)) { //$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT'); - if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); + if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { + $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); + } print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">'; print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">'; } else { @@ -1628,8 +1700,7 @@ if ($source == 'donation') $shipToZip = $don->zip; $shipToStreet2 = ''; $phoneNum = $don->phone; - if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) - { + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { print '<!-- Shipping address information -->'; print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n"; print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n"; @@ -1642,46 +1713,48 @@ if ($source == 'donation') } else { print '<!-- Shipping address not complete, so we don t use it -->'."\n"; } - if (is_object($don->thirdparty)) print '<input type="hidden" name="thirdparty_id" value="'.$don->thirdparty->id.'">'."\n"; + if (is_object($don->thirdparty)) { + print '<input type="hidden" name="thirdparty_id" value="'.$don->thirdparty->id.'">'."\n"; + } print '<input type="hidden" name="email" value="'.$don->email.'">'."\n"; $labeldesc = $langs->trans("PaymentSubscription"); - if (GETPOST('desc', 'alpha')) $labeldesc = GETPOST('desc', 'alpha'); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } print '<input type="hidden" name="desc" value="'.dol_escape_htmltag($labeldesc).'">'."\n"; } -if (!$found && !$mesg) $mesg = $langs->trans("ErrorBadParameters"); +if (!$found && !$mesg) { + $mesg = $langs->trans("ErrorBadParameters"); +} -if ($mesg) print '<tr><td align="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n"; +if ($mesg) { + print '<tr><td align="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n"; +} print '</table>'."\n"; print "\n"; // Show all payment mode buttons (Stripe, Paypal, ...) -if ($action != 'dopayment') -{ - if ($found && !$error) // We are in a management option and no error - { +if ($action != 'dopayment') { + if ($found && !$error) { // We are in a management option and no error // Check status of the object (Invoice) to verify if it is paid by external payment modules (ie Payzen, ...) $parameters = [ 'source' => $source, 'object' => $object ]; $reshook = $hookmanager->executeHooks('doCheckStatus', $parameters, $object, $action); - if ($source == 'order' && $object->billed) - { + if ($source == 'order' && $object->billed) { print '<br><br><span class="amountpaymentcomplete size15x">'.$langs->trans("OrderBilled").'</span>'; - } elseif ($source == 'invoice' && $object->paye) - { + } elseif ($source == 'invoice' && $object->paye) { print '<br><br><span class="amountpaymentcomplete size15x">'.$langs->trans("InvoicePaid").'</span>'; - } elseif ($source == 'donation' && $object->paid) - { + } elseif ($source == 'donation' && $object->paid) { print '<br><br><span class="amountpaymentcomplete size15x">'.$langs->trans("DonationPaid").'</span>'; } else { // Membership can be paid and we still allow to make renewal - if ($source == 'membersubscription' && $object->datefin > dol_now()) - { + if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); print '<br><span class="amountpaymentcomplete size15x">'.$langs->trans("MembershipPaid", dol_print_date($object->datefin, 'day')).'</span><br>'; print '<div class="opacitymedium margintoponly">'.$langs->trans("PaymentWillBeRecordedForNextPeriod").'</div>'; @@ -1694,8 +1767,7 @@ if ($action != 'dopayment') 'paymentmethod' => $paymentmethod ]; $reshook = $hookmanager->executeHooks('doAddButton', $parameters, $object, $action); - if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) - { + if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { print '<div class="button buttonpayment" id="div_dopayment_paybox"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_paybox" name="dopayment_paybox" value="'.$langs->trans("PayBoxDoPayment").'">'; print '<br>'; print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span>'; @@ -1714,8 +1786,7 @@ if ($action != 'dopayment') '; } - if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) - { + if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { print '<div class="button buttonpayment" id="div_dopayment_stripe"><span class="fa fa-credit-card"></span> <input class="" type="submit" id="dopayment_stripe" name="dopayment_stripe" value="'.$langs->trans("StripeDoPayment").'">'; print '<input type="hidden" name="noidempotency" value="'.GETPOST('noidempotency', 'int').'">'; print '<br>'; @@ -1736,23 +1807,22 @@ if ($action != 'dopayment') '; } - if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) - { - if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; + if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { + if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) { + $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; + } print '<div class="button buttonpayment" id="div_dopayment_paypal">'; if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY != 'integral') { print '<div style="line-height: 1em">&nbsp;</div>'; } print '<span class="fa fa-paypal"></span> <input class="" type="submit" id="dopayment_paypal" name="dopayment_paypal" value="'.$langs->trans("PaypalDoPayment").'">'; - if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') - { + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') { print '<br>'; print '<span class="buttonpaymentsmall">'.$langs->trans("CreditOrDebitCard").'</span><span class="buttonpaymentsmall"> - </span>'; print '<span class="buttonpaymentsmall">'.$langs->trans("PayPalBalance").'</span>'; } - if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') - { + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'paypalonly') { //print '<br>'; //print '<span class="buttonpaymentsmall">'.$langs->trans("PayPalBalance").'"></span>'; } @@ -1790,11 +1860,9 @@ print '<br>'; // Add more content on page for some services -if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment mode -{ +if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payment mode // Stripe - if (GETPOST('dopayment_stripe', 'alpha')) - { + if (GETPOST('dopayment_stripe', 'alpha')) { // Personalized checkout print '<style> /** @@ -1845,14 +1913,12 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment print '<input type="hidden" name="email" value="'.GETPOST('email', 'alpha').'" />'; print '<input type="hidden" name="thirdparty_id" value="'.GETPOST('thirdparty_id', 'int').'" />'; - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || !empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) // Use a SCA ready method - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) || !empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) { // Use a SCA ready method require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; $service = 'StripeLive'; $servicestatus = 1; - if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) - { + if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) { $service = 'StripeTest'; $servicestatus = 0; } @@ -1860,15 +1926,18 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment $stripe = new Stripe($db); $stripeacc = $stripe->getStripeAccount($service); $stripecu = null; - if (is_object($object) && is_object($object->thirdparty)) $stripecu = $stripe->customerStripe($object->thirdparty, $stripeacc, $servicestatus, 1); + if (is_object($object) && is_object($object->thirdparty)) { + $stripecu = $stripe->customerStripe($object->thirdparty, $stripeacc, $servicestatus, 1); + } - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { $noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref. $paymentintent = $stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object) ? ' ref='.$object->ref : ''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key); // The paymentintnent has status 'requires_payment_method' (even if paymentintent was already paid) //var_dump($paymentintent); - if ($stripe->error) setEventMessages($stripe->error, null, 'errors'); + if ($stripe->error) { + setEventMessages($stripe->error, null, 'errors'); + } } } @@ -1878,16 +1947,14 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment <table id="dolpaymenttable" summary="Payment form" class="center"> <tbody><tr><td class="textpublicpayment">'; - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { print '<div id="payment-request-button"><!-- A Stripe Element will be inserted here. --></div>'; } print '<div class="form-row left">'; print '<label for="card-element">'.$langs->trans("CreditOrDebitCard").'</label>'; - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { print '<br><input id="cardholder-name" class="marginbottomonly" name="cardholder-name" value="" type="text" placeholder="'.$langs->trans("CardOwner").'" autocomplete="off" autofocus required>'; } @@ -1907,10 +1974,8 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment print '</table>'; //} - if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { - if (empty($paymentintent)) - { + if (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { + if (empty($paymentintent)) { print '<center>'.$langs->trans("Error").'</center>'; } else { print '<input type="hidden" name="paymentintent_id" value="'.$paymentintent->id.'">'; @@ -1922,8 +1987,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment // JS Code for Stripe - if (empty($stripearrayofkeys['publishable_key'])) - { + if (empty($stripearrayofkeys['publishable_key'])) { $langs->load("errors"); print info_admin($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Stripe")), 0, 0, 'error'); } else { @@ -1934,19 +1998,19 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment // Code to ask the credit card. This use the default "API version". No way to force API version when using JS code. print '<script type="text/javascript" language="javascript">'."\n"; - if (!empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) - { + if (!empty($conf->global->STRIPE_USE_NEW_CHECKOUT)) { $amountstripe = $amount; // Correct the amount according to unit of currency // See https://support.stripe.com/questions/which-zero-decimal-currencies-does-stripe-support $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (!in_array($currency, $arrayzerounitcurrency)) $amountstripe = $amountstripe * 100; + if (!in_array($currency, $arrayzerounitcurrency)) { + $amountstripe = $amountstripe * 100; + } $ipaddress = getUserRemoteIP(); $metadata = array('dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress); - if (is_object($object)) - { + if (is_object($object)) { $metadata['dol_type'] = $object->element; $metadata['dol_id'] = $object->id; @@ -1958,7 +2022,9 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment 'description'=>'Stripe payment: '.$FULLTAG.($ref ? ' ref='.$ref : ''), "metadata" => $metadata ); - if ($TAG) $arrayforpaymentintent["statement_descriptor"] = dol_trunc($TAG, 10, 'right', 'UTF-8', 1); // 22 chars that appears on bank receipt (company + description) + if ($TAG) { + $arrayforpaymentintent["statement_descriptor"] = dol_trunc($TAG, 10, 'right', 'UTF-8', 1); // 22 chars that appears on bank receipt (company + description) + } $arrayforcheckout = array( 'payment_method_types' => array('card'), @@ -1975,8 +2041,11 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment 'cancel_url' => $urlko, 'payment_intent_data' => $arrayforpaymentintent ); - if ($stripecu) $arrayforcheckout['customer'] = $stripecu; - elseif (GETPOST('email', 'alpha') && isValidEmail(GETPOST('email', 'alpha'))) $arrayforcheckout['customer_email'] = GETPOST('email', 'alpha'); + if ($stripecu) { + $arrayforcheckout['customer'] = $stripecu; + } elseif (GETPOST('email', 'alpha') && isValidEmail(GETPOST('email', 'alpha'))) { + $arrayforcheckout['customer_email'] = GETPOST('email', 'alpha'); + } $sessionstripe = \Stripe\Checkout\Session::create($arrayforcheckout); $remoteip = getUserRemoteIP(); @@ -1988,39 +2057,38 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment $_SESSION['ipaddress'] = ($remoteip ? $remoteip : 'unknown'); // Payer ip $_SESSION['payerID'] = is_object($stripecu) ? $stripecu->id : ''; $_SESSION['TRANSACTIONID'] = $sessionstripe->id; - } catch (Exception $e) - { + } catch (Exception $e) { print $e->getMessage(); } ?> - // Code for payment with option STRIPE_USE_NEW_CHECKOUT set + // Code for payment with option STRIPE_USE_NEW_CHECKOUT set - // Create a Stripe client. - var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); + // Create a Stripe client. + var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); - // Create an instance of Elements - var elements = stripe.elements(); + // Create an instance of Elements + var elements = stripe.elements(); - // Custom styling can be passed to options when creating an Element. - // (Note that this demo uses a wider set of styles than the guide below.) - var style = { - base: { - color: '#32325d', - lineHeight: '24px', - fontFamily: '"Helvetica Neue", Helvetica, sans-serif', - fontSmoothing: 'antialiased', - fontSize: '16px', - '::placeholder': { - color: '#aab7c4' - } - }, - invalid: { - color: '#fa755a', - iconColor: '#fa755a' - } - }; + // Custom styling can be passed to options when creating an Element. + // (Note that this demo uses a wider set of styles than the guide below.) + var style = { + base: { + color: '#32325d', + lineHeight: '24px', + fontFamily: '"Helvetica Neue", Helvetica, sans-serif', + fontSmoothing: 'antialiased', + fontSize: '16px', + '::placeholder': { + color: '#aab7c4' + } + }, + invalid: { + color: '#fa755a', + iconColor: '#fa755a' + } + }; - var cardElement = elements.create('card', {style: style}); + var cardElement = elements.create('card', {style: style}); // Comment this to avoid the redirect stripe.redirectToCheckout({ @@ -2035,252 +2103,261 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment }); - <?php - } elseif (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + <?php + } elseif (!empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { ?> - // Code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION set + // Code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION set - // Create a Stripe client. - var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); + // Create a Stripe client. + var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); - // Create an instance of Elements - var elements = stripe.elements(); + // Create an instance of Elements + var elements = stripe.elements(); - // Custom styling can be passed to options when creating an Element. - // (Note that this demo uses a wider set of styles than the guide below.) - var style = { - base: { - color: '#32325d', - lineHeight: '24px', - fontFamily: '"Helvetica Neue", Helvetica, sans-serif', - fontSmoothing: 'antialiased', - fontSize: '16px', - '::placeholder': { - color: '#aab7c4' - } - }, - invalid: { - color: '#fa755a', - iconColor: '#fa755a' - } - }; + // Custom styling can be passed to options when creating an Element. + // (Note that this demo uses a wider set of styles than the guide below.) + var style = { + base: { + color: '#32325d', + lineHeight: '24px', + fontFamily: '"Helvetica Neue", Helvetica, sans-serif', + fontSmoothing: 'antialiased', + fontSize: '16px', + '::placeholder': { + color: '#aab7c4' + } + }, + invalid: { + color: '#fa755a', + iconColor: '#fa755a' + } + }; - var cardElement = elements.create('card', {style: style}); + var cardElement = elements.create('card', {style: style}); - // Add an instance of the card Element into the `card-element` <div> - cardElement.mount('#card-element'); + // Add an instance of the card Element into the `card-element` <div> + cardElement.mount('#card-element'); - // Handle real-time validation errors from the card Element. - cardElement.addEventListener('change', function(event) { - var displayError = document.getElementById('card-errors'); - if (event.error) { - console.log("Show event error (like 'Incorrect card number', ...)"); - displayError.textContent = event.error.message; - } else { - console.log("Reset error message"); - displayError.textContent = ''; - } - }); + // Handle real-time validation errors from the card Element. + cardElement.addEventListener('change', function(event) { + var displayError = document.getElementById('card-errors'); + if (event.error) { + console.log("Show event error (like 'Incorrect card number', ...)"); + displayError.textContent = event.error.message; + } else { + console.log("Reset error message"); + displayError.textContent = ''; + } + }); - // Handle form submission - var cardholderName = document.getElementById('cardholder-name'); - var cardButton = document.getElementById('buttontopay'); - var clientSecret = cardButton.dataset.secret; + // Handle form submission + var cardholderName = document.getElementById('cardholder-name'); + var cardButton = document.getElementById('buttontopay'); + var clientSecret = cardButton.dataset.secret; - cardButton.addEventListener('click', function(event) { - console.log("We click on buttontopay"); - event.preventDefault(); + cardButton.addEventListener('click', function(event) { + console.log("We click on buttontopay"); + event.preventDefault(); - if (cardholderName.value == '') - { - console.log("Field Card holder is empty"); - var displayError = document.getElementById('card-errors'); - displayError.textContent = '<?php print dol_escape_js($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardOwner"))); ?>'; - } - else - { - /* Disable button to pay and show hourglass cursor */ - jQuery('#hourglasstopay').show(); - jQuery('#buttontopay').hide(); - - stripe.handleCardPayment( - clientSecret, cardElement, { - payment_method_data: { - billing_details: { - name: cardholderName.value - <?php if (GETPOST('email', 'alpha') || (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->email))) { ?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php } ?> - <?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) { ?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php } ?> - <?php if (is_object($object) && is_object($object->thirdparty)) { ?>, address: { - city: '<?php echo dol_escape_js($object->thirdparty->town); ?>', - <?php if ($object->thirdparty->country_code) { ?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php } ?> - line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>', - postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>' - } - <?php } ?> - } - }, - save_payment_method: <?php if ($stripecu) { print 'true'; } else { print 'false'; } ?> /* true when a customer was provided when creating payment intent. true ask to save the card */ - } - ).then(function(result) { - console.log(result); - if (result.error) { - console.log("Error on result of handleCardPayment"); - jQuery('#buttontopay').show(); - jQuery('#hourglasstopay').hide(); - // Inform the user if there was an error - var errorElement = document.getElementById('card-errors'); - errorElement.textContent = result.error.message; - } else { - // The payment has succeeded. Display a success message. - console.log("No error on result of handleCardPayment, so we submit the form"); - // Submit the form - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - // Send form (action=charge that will do nothing) - jQuery('#payment-form').submit(); - } - }); - } - }); - - <?php - } else // Old method (not SCA ready) - { - ?> - // Old code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION off and STRIPE_USE_NEW_CHECKOUT off - - // Create a Stripe client. - var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); - - // Create an instance of Elements - var elements = stripe.elements(); - - // Custom styling can be passed to options when creating an Element. - // (Note that this demo uses a wider set of styles than the guide below.) - var style = { - base: { - color: '#32325d', - lineHeight: '24px', - fontFamily: '"Helvetica Neue", Helvetica, sans-serif', - fontSmoothing: 'antialiased', - fontSize: '16px', - '::placeholder': { - color: '#aab7c4' - } - }, - invalid: { - color: '#fa755a', - iconColor: '#fa755a' - } - }; - - // Create an instance of the card Element - var card = elements.create('card', {style: style}); - - // Add an instance of the card Element into the `card-element` <div> - card.mount('#card-element'); - - // Handle real-time validation errors from the card Element. - card.addEventListener('change', function(event) { - var displayError = document.getElementById('card-errors'); - if (event.error) { - displayError.textContent = event.error.message; - } else { - displayError.textContent = ''; - } - }); - - // Handle form submission - var form = document.getElementById('payment-form'); - console.log(form); - form.addEventListener('submit', function(event) { - event.preventDefault(); - <?php - if (empty($conf->global->STRIPE_USE_3DSECURE)) // Ask credit card directly, no 3DS test + if (cardholderName.value == '') { + console.log("Field Card holder is empty"); + var displayError = document.getElementById('card-errors'); + displayError.textContent = '<?php print dol_escape_js($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardOwner"))); ?>'; + } + else + { + /* Disable button to pay and show hourglass cursor */ + jQuery('#hourglasstopay').show(); + jQuery('#buttontopay').hide(); + + stripe.handleCardPayment( + clientSecret, cardElement, { + payment_method_data: { + billing_details: { + name: cardholderName.value + <?php if (GETPOST('email', 'alpha') || (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->email))) { + ?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php + } ?> + <?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) { + ?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php + } ?> + <?php if (is_object($object) && is_object($object->thirdparty)) { + ?>, address: { + city: '<?php echo dol_escape_js($object->thirdparty->town); ?>', + <?php if ($object->thirdparty->country_code) { + ?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php + } ?> + line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>', + postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>' + } + <?php } ?> + } + }, + save_payment_method:<?php if ($stripecu) { + print 'true'; + } else { + print 'false'; + } ?> /* true when a customer was provided when creating payment intent. true ask to save the card */ + } + ).then(function(result) { + console.log(result); + if (result.error) { + console.log("Error on result of handleCardPayment"); + jQuery('#buttontopay').show(); + jQuery('#hourglasstopay').hide(); + // Inform the user if there was an error + var errorElement = document.getElementById('card-errors'); + errorElement.textContent = result.error.message; + } else { + // The payment has succeeded. Display a success message. + console.log("No error on result of handleCardPayment, so we submit the form"); + // Submit the form + jQuery('#buttontopay').hide(); + jQuery('#hourglasstopay').show(); + // Send form (action=charge that will do nothing) + jQuery('#payment-form').submit(); + } + }); + } + }); + + <?php + } else { + // Old method (not SCA ready) + ?> + // Old code for payment with option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION off and STRIPE_USE_NEW_CHECKOUT off + + // Create a Stripe client. + var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>'); + + // Create an instance of Elements + var elements = stripe.elements(); + + // Custom styling can be passed to options when creating an Element. + // (Note that this demo uses a wider set of styles than the guide below.) + var style = { + base: { + color: '#32325d', + lineHeight: '24px', + fontFamily: '"Helvetica Neue", Helvetica, sans-serif', + fontSmoothing: 'antialiased', + fontSize: '16px', + '::placeholder': { + color: '#aab7c4' + } + }, + invalid: { + color: '#fa755a', + iconColor: '#fa755a' + } + }; + + // Create an instance of the card Element + var card = elements.create('card', {style: style}); + + // Add an instance of the card Element into the `card-element` <div> + card.mount('#card-element'); + + // Handle real-time validation errors from the card Element. + card.addEventListener('change', function(event) { + var displayError = document.getElementById('card-errors'); + if (event.error) { + displayError.textContent = event.error.message; + } else { + displayError.textContent = ''; + } + }); + + // Handle form submission + var form = document.getElementById('payment-form'); + console.log(form); + form.addEventListener('submit', function(event) { + event.preventDefault(); + <?php + if (empty($conf->global->STRIPE_USE_3DSECURE)) { // Ask credit card directly, no 3DS test ?> - /* Use token */ - stripe.createToken(card).then(function(result) { - if (result.error) { - // Inform the user if there was an error - var errorElement = document.getElementById('card-errors'); - errorElement.textContent = result.error.message; - } else { - // Send the token to your server - stripeTokenHandler(result.token); - } - }); - <?php + /* Use token */ + stripe.createToken(card).then(function(result) { + if (result.error) { + // Inform the user if there was an error + var errorElement = document.getElementById('card-errors'); + errorElement.textContent = result.error.message; + } else { + // Send the token to your server + stripeTokenHandler(result.token); + } + }); + <?php } else // Ask credit card with 3DS test { ?> - /* Use 3DS source */ - stripe.createSource(card).then(function(result) { - if (result.error) { - // Inform the user if there was an error - var errorElement = document.getElementById('card-errors'); - errorElement.textContent = result.error.message; - } else { - // Send the source to your server - stripeSourceHandler(result.source); - } - }); - <?php + /* Use 3DS source */ + stripe.createSource(card).then(function(result) { + if (result.error) { + // Inform the user if there was an error + var errorElement = document.getElementById('card-errors'); + errorElement.textContent = result.error.message; + } else { + // Send the source to your server + stripeSourceHandler(result.source); + } + }); + <?php } ?> - }); + }); - /* Insert the Token into the form so it gets submitted to the server */ - function stripeTokenHandler(token) { - // Insert the token ID into the form so it gets submitted to the server - var form = document.getElementById('payment-form'); + /* Insert the Token into the form so it gets submitted to the server */ + function stripeTokenHandler(token) { + // Insert the token ID into the form so it gets submitted to the server + var form = document.getElementById('payment-form'); - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'stripeToken'); - hiddenInput.setAttribute('value', token.id); - form.appendChild(hiddenInput); + var hiddenInput = document.createElement('input'); + hiddenInput.setAttribute('type', 'hidden'); + hiddenInput.setAttribute('name', 'stripeToken'); + hiddenInput.setAttribute('value', token.id); + form.appendChild(hiddenInput); var hiddenInput2 = document.createElement('input'); hiddenInput2.setAttribute('type', 'hidden'); hiddenInput2.setAttribute('name', 'token'); - hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>'); + hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>'); form.appendChild(hiddenInput2); - // Submit the form - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - console.log("submit token"); - form.submit(); - } + // Submit the form + jQuery('#buttontopay').hide(); + jQuery('#hourglasstopay').show(); + console.log("submit token"); + form.submit(); + } - /* Insert the Source into the form so it gets submitted to the server */ - function stripeSourceHandler(source) { - // Insert the source ID into the form so it gets submitted to the server - var form = document.getElementById('payment-form'); + /* Insert the Source into the form so it gets submitted to the server */ + function stripeSourceHandler(source) { + // Insert the source ID into the form so it gets submitted to the server + var form = document.getElementById('payment-form'); - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'stripeSource'); - hiddenInput.setAttribute('value', source.id); - form.appendChild(hiddenInput); + var hiddenInput = document.createElement('input'); + hiddenInput.setAttribute('type', 'hidden'); + hiddenInput.setAttribute('name', 'stripeSource'); + hiddenInput.setAttribute('value', source.id); + form.appendChild(hiddenInput); var hiddenInput2 = document.createElement('input'); hiddenInput2.setAttribute('type', 'hidden'); hiddenInput2.setAttribute('name', 'token'); - hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>'); + hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>'); form.appendChild(hiddenInput2); - // Submit the form - jQuery('#buttontopay').hide(); - jQuery('#hourglasstopay').show(); - console.log("submit source"); - form.submit(); - } + // Submit the form + jQuery('#buttontopay').hide(); + jQuery('#hourglasstopay').show(); + console.log("submit source"); + form.submit(); + } - <?php + <?php } print '</script>'; diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index b99c4a39392..6b4b28f66fe 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -25,45 +25,57 @@ * This token can be used to get more informations. */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and this test must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -if (!empty($conf->paypal->enabled)) -{ +if (!empty($conf->paypal->enabled)) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; } $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe")); -if (!empty($conf->paypal->enabled)) -{ +if (!empty($conf->paypal->enabled)) { $PAYPALTOKEN = GETPOST('TOKEN'); - if (empty($PAYPALTOKEN)) $PAYPALTOKEN = GETPOST('token'); + if (empty($PAYPALTOKEN)) { + $PAYPALTOKEN = GETPOST('token'); + } $PAYPALPAYERID = GETPOST('PAYERID'); - if (empty($PAYPALPAYERID)) $PAYPALPAYERID = GETPOST('PayerID'); + if (empty($PAYPALPAYERID)) { + $PAYPALPAYERID = GETPOST('PayerID'); + } } -if (!empty($conf->paybox->enabled)) -{ +if (!empty($conf->paybox->enabled)) { } -if (!empty($conf->stripe->enabled)) -{ +if (!empty($conf->stripe->enabled)) { } $FULLTAG = GETPOST('FULLTAG'); -if (empty($FULLTAG)) $FULLTAG = GETPOST('fulltag'); +if (empty($FULLTAG)) { + $FULLTAG = GETPOST('fulltag'); +} $suffix = GETPOST("suffix", 'aZ09'); @@ -71,12 +83,10 @@ $suffix = GETPOST("suffix", 'aZ09'); // Detect $paymentmethod $paymentmethod = ''; $reg = array(); -if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) -{ +if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) { $paymentmethod = $reg[1]; } -if (empty($paymentmethod)) -{ +if (empty($paymentmethod)) { dol_print_error(null, 'The back url does not contains a parameter fulltag that should help us to find the payment method used'); exit; } else { @@ -85,13 +95,21 @@ if (empty($paymentmethod)) $validpaymentmethod = array(); -if (!empty($conf->paypal->enabled)) $validpaymentmethod['paypal'] = 'paypal'; -if (!empty($conf->paybox->enabled)) $validpaymentmethod['paybox'] = 'paybox'; -if (!empty($conf->stripe->enabled)) $validpaymentmethod['stripe'] = 'stripe'; +if (!empty($conf->paypal->enabled)) { + $validpaymentmethod['paypal'] = 'paypal'; +} +if (!empty($conf->paybox->enabled)) { + $validpaymentmethod['paybox'] = 'paybox'; +} +if (!empty($conf->stripe->enabled)) { + $validpaymentmethod['stripe'] = 'stripe'; +} // Security check -if (empty($validpaymentmethod)) accessforbidden('', 0, 0, 1); +if (empty($validpaymentmethod)) { + accessforbidden('', 0, 0, 1); +} $object = new stdClass(); // For triggers @@ -111,12 +129,13 @@ $object = new stdClass(); // For triggers dol_syslog("Callback url when an online payment is refused or canceled. query_string=".(empty($_SERVER["QUERY_STRING"]) ? '' : $_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"]) ? '' : $_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_payment'); $tracepost = ""; -foreach ($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n"; +foreach ($_POST as $k => $v) { + $tracepost .= "{$k} - {$v}\n"; +} dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment'); -if (!empty($_SESSION['ipaddress'])) // To avoid to make action twice -{ +if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice // Get on url call $fulltag = $FULLTAG; $onlinetoken = empty($PAYPALTOKEN) ? $_SESSION['onlinetoken'] : $PAYPALTOKEN; @@ -132,20 +151,20 @@ if (!empty($_SESSION['ipaddress'])) // To avoid to make action twice if (is_object($object) && method_exists($object, 'call_trigger')) { // Call trigger $result = $object->call_trigger('PAYMENTONLINE_PAYMENT_KO', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } // Send an email $sendemail = ''; - if (!empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) - { + if (!empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) { $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL; } // Send warning of error to administrator - if ($sendemail) - { + if ($sendemail) { $companylangs = new Translate('', $conf); $companylangs->setDefaultLang($mysoc->default_lang); $companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox')); @@ -155,14 +174,18 @@ if (!empty($_SESSION['ipaddress'])) // To avoid to make action twice // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; + } $urlback = $_SERVER["REQUEST_URI"]; $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentFailed"); @@ -183,8 +206,7 @@ if (!empty($_SESSION['ipaddress'])) // To avoid to make action twice $mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml); $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); } else { dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); @@ -195,7 +217,9 @@ if (!empty($_SESSION['ipaddress'])) // To avoid to make action twice } $head = ''; -if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { + $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +} $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; @@ -213,25 +237,25 @@ print '<div id="dolpaymentdiv" align="center">'."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; -elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +} //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) -{ +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo -if ($urllogo) -{ +if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; @@ -250,14 +274,15 @@ print '<br><br>'; print $langs->trans("YourPaymentHasNotBeenRecorded")."<br><br>"; $key = 'ONLINE_PAYMENT_MESSAGE_KO'; -if (!empty($conf->global->$key)) print $conf->global->$key; +if (!empty($conf->global->$key)) { + print $conf->global->$key; +} $type = GETPOST('s', 'alpha'); $ref = GETPOST('ref', 'alphanohtml'); $tag = GETPOST('tag', 'alpha'); require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -if ($type || $tag) -{ +if ($type || $tag) { $urlsubscription = getOnlinePaymentUrl(0, ($type ? $type : 'free'), $ref, $FinalPaymentAmt, $tag); print $langs->trans("ClickHereToTryAgain", $urlsubscription); diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index f4b9f0feb5b..1942635001f 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2021 Waël Almoman <info@almoman.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,23 +26,32 @@ * This token can be used to get more informations. */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; -if (!empty($conf->paypal->enabled)) -{ +if (!empty($conf->paypal->enabled)) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php'; } @@ -49,44 +59,60 @@ if (!empty($conf->paypal->enabled)) $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal")); // Clean parameters -if (!empty($conf->paypal->enabled)) -{ +if (!empty($conf->paypal->enabled)) { $PAYPAL_API_USER = ""; - if (!empty($conf->global->PAYPAL_API_USER)) $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + if (!empty($conf->global->PAYPAL_API_USER)) { + $PAYPAL_API_USER = $conf->global->PAYPAL_API_USER; + } $PAYPAL_API_PASSWORD = ""; - if (!empty($conf->global->PAYPAL_API_PASSWORD)) $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + if (!empty($conf->global->PAYPAL_API_PASSWORD)) { + $PAYPAL_API_PASSWORD = $conf->global->PAYPAL_API_PASSWORD; + } $PAYPAL_API_SIGNATURE = ""; - if (!empty($conf->global->PAYPAL_API_SIGNATURE)) $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + if (!empty($conf->global->PAYPAL_API_SIGNATURE)) { + $PAYPAL_API_SIGNATURE = $conf->global->PAYPAL_API_SIGNATURE; + } $PAYPAL_API_SANDBOX = ""; - if (!empty($conf->global->PAYPAL_API_SANDBOX)) $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + if (!empty($conf->global->PAYPAL_API_SANDBOX)) { + $PAYPAL_API_SANDBOX = $conf->global->PAYPAL_API_SANDBOX; + } $PAYPAL_API_OK = ""; - if ($urlok) $PAYPAL_API_OK = $urlok; + if ($urlok) { + $PAYPAL_API_OK = $urlok; + } $PAYPAL_API_KO = ""; - if ($urlko) $PAYPAL_API_KO = $urlko; + if ($urlko) { + $PAYPAL_API_KO = $urlko; + } $PAYPALTOKEN = GETPOST('TOKEN'); - if (empty($PAYPALTOKEN)) $PAYPALTOKEN = GETPOST('token'); + if (empty($PAYPALTOKEN)) { + $PAYPALTOKEN = GETPOST('token'); + } $PAYPALPAYERID = GETPOST('PAYERID'); - if (empty($PAYPALPAYERID)) $PAYPALPAYERID = GETPOST('PayerID'); + if (empty($PAYPALPAYERID)) { + $PAYPALPAYERID = GETPOST('PayerID'); + } } $FULLTAG = GETPOST('FULLTAG'); -if (empty($FULLTAG)) $FULLTAG = GETPOST('fulltag'); -$source = GETPOST('s', 'alpha') ?GETPOST('s', 'alpha') : GETPOST('source', 'alpha'); +if (empty($FULLTAG)) { + $FULLTAG = GETPOST('fulltag'); +} +$source = GETPOST('s', 'alpha') ? GETPOST('s', 'alpha') : GETPOST('source', 'alpha'); $ref = GETPOST('ref'); $suffix = GETPOST("suffix", 'aZ09'); +$membertypeid = GETPOST("membertypeid", 'int'); // Detect $paymentmethod $paymentmethod = ''; $reg = array(); -if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) -{ +if (preg_match('/PM=([^\.]+)/', $FULLTAG, $reg)) { $paymentmethod = $reg[1]; } -if (empty($paymentmethod)) -{ +if (empty($paymentmethod)) { dol_print_error(null, 'The back url does not contains a parameter fulltag that should help us to find the payment method used'); exit; } @@ -95,12 +121,20 @@ dol_syslog("***** paymentok.php is called paymentmethod=".$paymentmethod." FULLT $validpaymentmethod = array(); -if (!empty($conf->paypal->enabled)) $validpaymentmethod['paypal'] = 'paypal'; -if (!empty($conf->paybox->enabled)) $validpaymentmethod['paybox'] = 'paybox'; -if (!empty($conf->stripe->enabled)) $validpaymentmethod['stripe'] = 'stripe'; +if (!empty($conf->paypal->enabled)) { + $validpaymentmethod['paypal'] = 'paypal'; +} +if (!empty($conf->paybox->enabled)) { + $validpaymentmethod['paybox'] = 'paybox'; +} +if (!empty($conf->stripe->enabled)) { + $validpaymentmethod['stripe'] = 'stripe'; +} // Security check -if (empty($validpaymentmethod)) accessforbidden('', 0, 0, 1); +if (empty($validpaymentmethod)) { + accessforbidden('', 0, 0, 1); +} $ispaymentok = false; @@ -130,11 +164,15 @@ $now = dol_now(); dol_syslog("Callback url when a payment was done. query_string=".(dol_escape_htmltag($_SERVER["QUERY_STRING"]) ?dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '')." script_uri=".(dol_escape_htmltag($_SERVER["SCRIPT_URI"]) ?dol_escape_htmltag($_SERVER["SCRIPT_URI"]) : ''), LOG_DEBUG, 0, '_payment'); $tracepost = ""; -foreach ($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n"; +foreach ($_POST as $k => $v) { + $tracepost .= "{$k} - {$v}\n"; +} dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment'); $head = ''; -if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { + $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +} $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; @@ -153,25 +191,25 @@ print '<div id="dolpaymentdiv" class="center">'."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; -elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +} //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) -{ +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo -if ($urllogo) -{ +if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; @@ -187,12 +225,9 @@ if ($urllogo) print '<br><br><br>'; -if (!empty($conf->paypal->enabled)) -{ - if ($paymentmethod == 'paypal') // We call this page only if payment is ok on payment system - { - if ($PAYPALTOKEN) - { +if (!empty($conf->paypal->enabled)) { + if ($paymentmethod == 'paypal') { // We call this page only if payment is ok on payment system + if ($PAYPALTOKEN) { // Get on url call $onlinetoken = $PAYPALTOKEN; $fulltag = $FULLTAG; @@ -207,15 +242,13 @@ if (!empty($conf->paypal->enabled)) dol_syslog("Call paymentok with token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment'); // Validate record - if (!empty($paymentType)) - { + if (!empty($paymentType)) { dol_syslog("We call GetExpressCheckoutDetails", LOG_DEBUG, 0, '_payment'); $resArray = getDetails($onlinetoken); //var_dump($resarray); $ack = strtoupper($resArray["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") - { + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { // Nothing to do dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); } else { @@ -227,8 +260,7 @@ if (!empty($conf->paypal->enabled)) //var_dump($resarray); $ack = strtoupper($resArray2["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") - { + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); $object->source = $source; @@ -263,22 +295,32 @@ if (!empty($conf->paypal->enabled)) } } -if (!empty($conf->paybox->enabled)) -{ - if ($paymentmethod == 'paybox') $ispaymentok = true; // We call this page only if payment is ok on payment system +if (!empty($conf->paybox->enabled)) { + if ($paymentmethod == 'paybox') { + $ispaymentok = true; // We call this page only if payment is ok on payment system + } } -if (!empty($conf->stripe->enabled)) -{ - if ($paymentmethod == 'stripe') $ispaymentok = true; // We call this page only if payment is ok on payment system +if (!empty($conf->stripe->enabled)) { + if ($paymentmethod == 'stripe') { + $ispaymentok = true; // We call this page only if payment is ok on payment system + } } // If data not provided from back url, search them into the session env -if (empty($ipaddress)) $ipaddress = $_SESSION['ipaddress']; -if (empty($TRANSACTIONID)) $TRANSACTIONID = $_SESSION['TRANSACTIONID']; -if (empty($FinalPaymentAmt)) $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; -if (empty($paymentType)) $paymentType = $_SESSION["paymentType"]; +if (empty($ipaddress)) { + $ipaddress = $_SESSION['ipaddress']; +} +if (empty($TRANSACTIONID)) { + $TRANSACTIONID = $_SESSION['TRANSACTIONID']; +} +if (empty($FinalPaymentAmt)) { + $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; +} +if (empty($paymentType)) { + $paymentType = $_SESSION["paymentType"]; +} $fulltag = $FULLTAG; $tmptag = dolExplodeIntoArray($fulltag, '.', '='); @@ -290,18 +332,23 @@ dol_syslog("ispaymentok=".$ispaymentok." tmptag=".var_export($tmptag, true), LOG // Make complementary actions $ispostactionok = 0; $postactionmessages = array(); -if ($ispaymentok) -{ +if ($ispaymentok) { // Set permission for the anonymous user - if (empty($user->rights->societe)) $user->rights->societe = new stdClass(); - if (empty($user->rights->facture)) $user->rights->facture = new stdClass(); - if (empty($user->rights->adherent)) { $user->rights->adherent = new stdClass(); $user->rights->adherent->cotisation = new stdClass(); } + if (empty($user->rights->societe)) { + $user->rights->societe = new stdClass(); + } + if (empty($user->rights->facture)) { + $user->rights->facture = new stdClass(); + } + if (empty($user->rights->adherent)) { + $user->rights->adherent = new stdClass(); + $user->rights->adherent->cotisation = new stdClass(); + } $user->rights->societe->creer = 1; $user->rights->facture->creer = 1; $user->rights->adherent->cotisation->creer = 1; - if (array_key_exists('MEM', $tmptag) && $tmptag['MEM'] > 0) - { + if (array_key_exists('MEM', $tmptag) && $tmptag['MEM'] > 0) { // Validate member // Create subscription // Create complementary actions (this include creation of thirdparty) @@ -322,16 +369,22 @@ if ($ispaymentok) dol_syslog("We have to process member with id=".$tmptag['MEM']." result1=".$result1." result2=".$result2, LOG_DEBUG, 0, '_payment'); - if ($result1 > 0 && $result2 > 0) - { + if ($result1 > 0 && $result2 > 0) { $paymentTypeId = 0; - if ($paymentmethod == 'paybox') $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; - if ($paymentmethod == 'paypal') $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; - if ($paymentmethod == 'stripe') $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; - if (empty($paymentTypeId)) - { + if ($paymentmethod == 'paybox') { + $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'paypal') { + $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'stripe') { + $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + } + if (empty($paymentTypeId)) { $paymentType = $_SESSION["paymentType"]; - if (empty($paymentType)) $paymentType = 'CB'; + if (empty($paymentType)) { + $paymentType = 'CB'; + } $paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1); } @@ -340,11 +393,9 @@ if ($ispaymentok) dol_syslog("FinalPaymentAmt=".$FinalPaymentAmt." paymentTypeId=".$paymentTypeId, LOG_DEBUG, 0, '_payment'); // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time) - if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) - { + if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { $result = $object->validate($user); - if ($result < 0 || empty($object->datevalid)) - { + if ($result < 0 || empty($object->datevalid)) { $error++; $errmsg = $object->error; $postactionmessages[] = $errmsg; @@ -355,13 +406,14 @@ if ($ispaymentok) // Subscription informations $datesubscription = $object->datevalid; - if ($object->datefin > 0) - { + if ($object->datefin > 0) { $datesubscription = dol_time_plus_duree($object->datefin, 1, 'd'); } $datesubend = null; - if ($datesubscription && $defaultdelay && $defaultdelayunit) $datesubend = dol_time_plus_duree(dol_time_plus_duree($datesubscription, $defaultdelay, $defaultdelayunit), -1, 'd'); + if ($datesubscription && $defaultdelay && $defaultdelayunit) { + $datesubend = dol_time_plus_duree(dol_time_plus_duree($datesubscription, $defaultdelay, $defaultdelayunit), -1, 'd'); + } $paymentdate = $now; $amount = $FinalPaymentAmt; @@ -369,11 +421,16 @@ if ($ispaymentok) // Payment informations $accountid = 0; - if ($paymentmethod == 'paybox') $accountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; - if ($paymentmethod == 'paypal') $accountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; - if ($paymentmethod == 'stripe') $accountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; - if ($accountid < 0) - { + if ($paymentmethod == 'paybox') { + $accountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + } + if ($paymentmethod == 'paypal') { + $accountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + } + if ($paymentmethod == 'stripe') { + $accountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + } + if ($accountid < 0) { $error++; $errmsg = 'Setup of bank account to use for payment is not correctly done for payment method '.$paymentmethod; $postactionmessages[] = $errmsg; @@ -387,23 +444,27 @@ if ($ispaymentok) $emetteur_banque = ''; // Define default choice for complementary actions $option = ''; - if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) $option = 'bankviainvoice'; - elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) $option = 'bankdirect'; - elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) $option = 'invoiceonly'; - if (empty($option)) $option = 'none'; + if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) { + $option = 'bankviainvoice'; + } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) { + $option = 'bankdirect'; + } elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) { + $option = 'invoiceonly'; + } + if (empty($option)) { + $option = 'none'; + } $sendalsoemail = 1; // Record the subscription then complementary actions $db->begin(); // Create subscription - if (!$error) - { + if (!$error) { dol_syslog("Call ->subscription to create subscription", LOG_DEBUG, 0, '_payment'); - $crowid = $object->subscription($datesubscription, $amount, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend); - if ($crowid <= 0) - { + $crowid = $object->subscription($datesubscription, $amount, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend, $membertypeid); + if ($crowid <= 0) { $error++; $errmsg = $object->error; $postactionmessages[] = $errmsg; @@ -414,15 +475,13 @@ if ($ispaymentok) } } - if (!$error) - { + if (!$error) { dol_syslog("Call ->subscriptionComplementaryActions option=".$option, LOG_DEBUG, 0, '_payment'); $autocreatethirdparty = 1; // will create thirdparty if member not yet linked to a thirdparty $result = $object->subscriptionComplementaryActions($crowid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom, $emetteur_banque, $autocreatethirdparty); - if ($result < 0) - { + if ($result < 0) { dol_syslog("Error ".$object->error." ".join(',', $object->errors), LOG_DEBUG, 0, '_payment'); $error++; @@ -430,18 +489,15 @@ if ($ispaymentok) $postactionmessages = array_merge($postactionmessages, $object->errors); $ispostactionok = -1; } else { - if ($option == 'bankviainvoice') - { + if ($option == 'bankviainvoice') { $postactionmessages[] = 'Invoice, payment and bank record created'; dol_syslog("Invoice, payment and bank record created", LOG_DEBUG, 0, '_payment'); } - if ($option == 'bankdirect') - { + if ($option == 'bankdirect') { $postactionmessages[] = 'Bank record created'; dol_syslog("Bank record created", LOG_DEBUG, 0, '_payment'); } - if ($option == 'invoiceonly') - { + if ($option == 'invoiceonly') { $postactionmessages[] = 'Invoice recorded'; dol_syslog("Invoice recorded", LOG_DEBUG, 0, '_payment'); } @@ -451,18 +507,15 @@ if ($ispaymentok) } } - if (!$error) - { - if ($paymentmethod == 'stripe' && $autocreatethirdparty && $option == 'bankviainvoice') - { + if (!$error) { + if ($paymentmethod == 'stripe' && $autocreatethirdparty && $option == 'bankviainvoice') { $thirdparty_id = $object->fk_soc; dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_payment'); $service = 'StripeTest'; $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) - { + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { $service = 'StripeLive'; $servicestatus = 1; } @@ -477,8 +530,7 @@ if ($ispaymentok) $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 0); - if (!$customer && $TRANSACTIONID) // Not linked to a stripe customer, we make the link - { + if (!$customer && $TRANSACTIONID) { // Not linked to a stripe customer, we make the link dol_syslog("No stripe profile found, so we add it for TRANSACTIONID = ".$TRANSACTIONID, LOG_DEBUG, 0, '_payment'); try { @@ -541,13 +593,11 @@ if ($ispaymentok) } // Send email to member - if (!$error) - { + if (!$error) { dol_syslog("Send email to customer to ".$object->email." if we have to (sendalsoemail = ".$sendalsoemail.")", LOG_DEBUG, 0, '_payment'); // Send confirmation Email - if ($object->email && $sendalsoemail) - { + if ($object->email && $sendalsoemail) { $subject = ''; $msg = ''; @@ -563,10 +613,11 @@ if ($ispaymentok) $arraydefaultmessage = null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); + 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; } @@ -581,8 +632,7 @@ if ($ispaymentok) $listofpaths = array(); $listofnames = array(); $listofmimes = array(); - if (is_object($object->invoice)) - { + if (is_object($object->invoice)) { $invoicediroutput = $conf->facture->dir_output; $fileparams = dol_most_recent_file($invoicediroutput.'/'.$object->invoice->ref, preg_quote($object->invoice->ref, '/').'[^\-]+'); $file = $fileparams['fullname']; @@ -596,14 +646,16 @@ if ($ispaymentok) $result = $object->send_an_email($texttosend, $subjecttosend, $listofpaths, $listofmimes, $listofnames, "", "", 0, -1, "", $moreinheader); - if ($result < 0) - { + if ($result < 0) { $errmsg = $object->error; $postactionmessages[] = $errmsg; $ispostactionok = -1; } else { - if ($file) $postactionmessages[] = 'Email sent to member (with invoice document attached)'; - else $postactionmessages[] = 'Email sent to member (without any attached document)'; + if ($file) { + $postactionmessages[] = 'Email sent to member (with invoice document attached)'; + } else { + $postactionmessages[] = 'Email sent to member (without any attached document)'; + } // TODO Add actioncomm event } @@ -617,40 +669,43 @@ if ($ispaymentok) $postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription paid was not found'; $ispostactionok = -1; } - } elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0) - { + } elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0) { // Record payment include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object = new Facture($db); $result = $object->fetch($tmptag['INV']); - if ($result) - { + if ($result) { $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; $paymentTypeId = 0; - if ($paymentmethod == 'paybox') $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; - if ($paymentmethod == 'paypal') $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; - if ($paymentmethod == 'stripe') $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; - if (empty($paymentTypeId)) - { + if ($paymentmethod == 'paybox') { + $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'paypal') { + $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'stripe') { + $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + } + if (empty($paymentTypeId)) { $paymentType = $_SESSION["paymentType"]; - if (empty($paymentType)) $paymentType = 'CB'; + if (empty($paymentType)) { + $paymentType = 'CB'; + } $paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1); } $currencyCodeType = $_SESSION['currencyCodeType']; // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time) - if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) - { + if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { $db->begin(); // Creation of payment line include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $paiement = new Paiement($db); $paiement->datepaye = $now; - if ($currencyCodeType == $conf->currency) - { + if ($currencyCodeType == $conf->currency) { $paiement->amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching with invoice id } else { $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching @@ -665,11 +720,9 @@ if ($ispaymentok) $paiement->ext_payment_id = $TRANSACTIONID; $paiement->ext_payment_site = $service; - if (!$error) - { + if (!$error) { $paiement_id = $paiement->create($user, 1); // This include closing invoices and regenerating documents - if ($paiement_id < 0) - { + if ($paiement_id < 0) { $postactionmessages[] = $paiement->error.' '.join("<br>\n", $paiement->errors); $ispostactionok = -1; $error++; @@ -679,20 +732,23 @@ if ($ispaymentok) } } - if (!$error && !empty($conf->banque->enabled)) - { + if (!$error && !empty($conf->banque->enabled)) { $bankaccountid = 0; - if ($paymentmethod == 'paybox') $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; - elseif ($paymentmethod == 'paypal') $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; - elseif ($paymentmethod == 'stripe') $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + if ($paymentmethod == 'paybox') { + $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + } elseif ($paymentmethod == 'paypal') { + $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + } elseif ($paymentmethod == 'stripe') { + $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + } - if ($bankaccountid > 0) - { + if ($bankaccountid > 0) { $label = '(CustomerInvoicePayment)'; - if ($object->type == Facture::TYPE_CREDIT_NOTE) $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note + if ($object->type == Facture::TYPE_CREDIT_NOTE) { + $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note + } $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, '', ''); - if ($result < 0) - { + if ($result < 0) { $postactionmessages[] = $paiement->error.' '.join("<br>\n", $paiement->errors); $ispostactionok = -1; $error++; @@ -707,8 +763,7 @@ if ($ispaymentok) } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -726,8 +781,7 @@ if ($ispaymentok) } } -if ($ispaymentok) -{ +if ($ispaymentok) { // Get on url call $onlinetoken = empty($PAYPALTOKEN) ? $_SESSION['onlinetoken'] : $PAYPALTOKEN; $payerID = empty($PAYPALPAYERID) ? $_SESSION['payerID'] : $PAYPALPAYERID; @@ -739,26 +793,33 @@ if ($ispaymentok) if (is_object($object) && method_exists($object, 'call_trigger')) { // Call trigger $result = $object->call_trigger('PAYMENTONLINE_PAYMENT_OK', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n"; - if ($TRANSACTIONID) print $langs->trans("ThisIsTransactionId", $TRANSACTIONID)."<br><br>\n"; + if ($TRANSACTIONID) { + print $langs->trans("ThisIsTransactionId", $TRANSACTIONID)."<br><br>\n"; + } $key = 'ONLINE_PAYMENT_MESSAGE_OK'; - if (!empty($conf->global->$key)) print $conf->global->$key; + if (!empty($conf->global->$key)) { + print $conf->global->$key; + } $sendemail = ''; - if (!empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL; + if (!empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) { + $sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL; + } $tmptag = dolExplodeIntoArray($fulltag, '.', '='); dol_syslog("Send email to admins if we have to (sendemail = ".$sendemail.")", LOG_DEBUG, 0, '_payment'); // Send an email to admins - if ($sendemail) - { + if ($sendemail) { $companylangs = new Translate('', $conf); $companylangs->setDefaultLang($mysoc->default_lang); $companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox')); @@ -772,26 +833,28 @@ if ($ispaymentok) // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; + } $urlback = $_SERVER["REQUEST_URI"]; $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived"); $content = ""; - if (array_key_exists('MEM', $tmptag)) - { + if (array_key_exists('MEM', $tmptag)) { $url = $urlwithroot."/adherents/subscription.php?rowid=".$tmptag['MEM']; $content .= '<strong>'.$companylangs->trans("PaymentSubscription")."</strong><br><br>\n"; $content .= $companylangs->trans("MemberId").': <strong>'.$tmptag['MEM']."</strong><br>\n"; $content .= $companylangs->trans("Link").': <a href="'.$url.'">'.$url.'</a>'."<br>\n"; - } elseif (array_key_exists('INV', $tmptag)) - { + } elseif (array_key_exists('INV', $tmptag)) { $url = $urlwithroot."/compta/facture/card.php?id=".$tmptag['INV']; $content .= '<strong>'.$companylangs->trans("Payment")."</strong><br><br>\n"; $content .= $companylangs->trans("InvoiceId").': <strong>'.$tmptag['INV']."</strong><br>\n"; @@ -801,24 +864,20 @@ if ($ispaymentok) $content .= $companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived")."<br>\n"; } $content .= $companylangs->transnoentities("PostActionAfterPayment").' : '; - if ($ispostactionok > 0) - { + if ($ispostactionok > 0) { //$topic.=' ('.$companylangs->transnoentitiesnoconv("Status").' '.$companylangs->transnoentitiesnoconv("OK").')'; $content .= '<font color="green">'.$companylangs->transnoentitiesnoconv("OK").'</font>'; - } elseif ($ispostactionok == 0) - { + } elseif ($ispostactionok == 0) { $content .= $companylangs->transnoentitiesnoconv("None"); } else { $topic .= ($ispostactionok ? '' : ' ('.$companylangs->trans("WarningPostActionErrorAfterPayment").')'); $content .= '<font color="red">'.$companylangs->transnoentitiesnoconv("Error").'</font>'; } $content .= '<br>'."\n"; - foreach ($postactionmessages as $postactionmessage) - { + foreach ($postactionmessages as $postactionmessage) { $content .= ' * '.$postactionmessage.'<br>'."\n"; } - if ($ispostactionok < 0) - { + if ($ispostactionok < 0) { $content .= $langs->transnoentities("ARollbackWasPerformedOnPostActions"); } $content .= '<br>'."\n"; @@ -831,10 +890,18 @@ if ($ispaymentok) $content .= "<br>\n"; $content .= "tag=".$fulltag."<br>\ntoken=".$onlinetoken."<br>\npaymentType=".$paymentType."<br>\ncurrencycodeType=".$currencyCodeType."<br>\npayerId=".$payerID."<br>\nipaddress=".$ipaddress."<br>\nFinalPaymentAmt=".$FinalPaymentAmt."<br>\n"; - if (!empty($ErrorCode)) $content .= "ErrorCode = ".$ErrorCode."<br>\n"; - if (!empty($ErrorShortMsg)) $content .= "ErrorShortMsg = ".$ErrorShortMsg."<br>\n"; - if (!empty($ErrorLongMsg)) $content .= "ErrorLongMsg = ".$ErrorLongMsg."<br>\n"; - if (!empty($ErrorSeverityCode)) $content .= "ErrorSeverityCode = ".$ErrorSeverityCode."<br>\n"; + if (!empty($ErrorCode)) { + $content .= "ErrorCode = ".$ErrorCode."<br>\n"; + } + if (!empty($ErrorShortMsg)) { + $content .= "ErrorShortMsg = ".$ErrorShortMsg."<br>\n"; + } + if (!empty($ErrorLongMsg)) { + $content .= "ErrorLongMsg = ".$ErrorLongMsg."<br>\n"; + } + if (!empty($ErrorSeverityCode)) { + $content .= "ErrorSeverityCode = ".$ErrorSeverityCode."<br>\n"; + } $ishtml = dol_textishtml($content); // May contain urls @@ -842,8 +909,7 @@ if ($ispaymentok) $mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml); $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); //dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0); } else { @@ -863,7 +929,9 @@ if ($ispaymentok) if (is_object($object) && method_exists($object, 'call_trigger')) { // Call trigger $result = $object->call_trigger('PAYMENTONLINE_PAYMENT_KO', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } @@ -873,18 +941,25 @@ if ($ispaymentok) print $langs->trans('ErrorCode').": ".$ErrorCode."<br>\n"; print $langs->trans('ErrorSeverityCode').": ".$ErrorSeverityCode."<br>\n"; - if ($mysoc->email) print "\nPlease, send a screenshot of this page to ".$mysoc->email."<br>\n"; + if ($mysoc->email) { + print "\nPlease, send a screenshot of this page to ".$mysoc->email."<br>\n"; + } $sendemail = ''; - if (!empty($conf->global->PAYMENTONLINE_SENDEMAIL)) $sendemail = $conf->global->PAYMENTONLINE_SENDEMAIL; + if (!empty($conf->global->PAYMENTONLINE_SENDEMAIL)) { + $sendemail = $conf->global->PAYMENTONLINE_SENDEMAIL; + } // TODO Remove local option to keep only the generic one ? - if ($paymentmethod == 'paypal' && !empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) $sendemail = $conf->global->PAYPAL_PAYONLINE_SENDEMAIL; - elseif ($paymentmethod == 'paybox' && !empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) $sendemail = $conf->global->PAYBOX_PAYONLINE_SENDEMAIL; - elseif ($paymentmethod == 'stripe' && !empty($conf->global->STRIPE_PAYONLINE_SENDEMAIL)) $sendemail = $conf->global->STRIPE_PAYONLINE_SENDEMAIL; + if ($paymentmethod == 'paypal' && !empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL)) { + $sendemail = $conf->global->PAYPAL_PAYONLINE_SENDEMAIL; + } elseif ($paymentmethod == 'paybox' && !empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) { + $sendemail = $conf->global->PAYBOX_PAYONLINE_SENDEMAIL; + } elseif ($paymentmethod == 'stripe' && !empty($conf->global->STRIPE_PAYONLINE_SENDEMAIL)) { + $sendemail = $conf->global->STRIPE_PAYONLINE_SENDEMAIL; + } // Send warning of error to administrator - if ($sendemail) - { + if ($sendemail) { $companylangs = new Translate('', $conf); $companylangs->setDefaultLang($mysoc->default_lang); $companylangs->loadLangs(array('main', 'members', 'bills', 'paypal', 'paybox')); @@ -898,14 +973,18 @@ if ($ispaymentok) // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) - { + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $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; + 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; + } $urlback = $_SERVER["REQUEST_URI"]; $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("ValidationOfPaymentFailed"); @@ -926,8 +1005,7 @@ if ($ispaymentok) $mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml); $result = $mailfile->sendfile(); - if ($result) - { + if ($result) { dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); } else { dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); diff --git a/htdocs/admin/dolistore/class/index.html b/htdocs/public/project/index.html similarity index 100% rename from htdocs/admin/dolistore/class/index.html rename to htdocs/public/project/index.html diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php new file mode 100644 index 00000000000..048df9c41b3 --- /dev/null +++ b/htdocs/public/project/new.php @@ -0,0 +1,486 @@ +<?php +/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/public/project/new.php + * \ingroup project + * \brief Example of form to add a new lead + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retrieve from object ref and not from url. +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +// Init vars +$errmsg = ''; +$num = 0; +$error = 0; +$backtopage = GETPOST('backtopage', 'alpha'); +$action = GETPOST('action', 'aZ09'); + +// Load translation files +$langs->loadLangs(array("main", "members", "companies", "install", "other")); + +// Security check +if (empty($conf->projet->enabled)) { + accessforbidden('', 0, 0, 1); +} + +if (empty($conf->global->PROJECT_ENABLE_PUBLIC)) { + print $langs->trans("Form for public lead registration has not been enabled"); + exit; +} + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('publicnewleadcard', 'globalcard')); + +$extrafields = new ExtraFields($db); + +$object = new Project($db); + +$user->loadDefaultValues(); + + +/** + * Show header for new member + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print '<body id="mainbody" class="publicnewmemberform">'; + + // Define urllogo + $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?cache=1&amp;modulepart=mycompany&amp;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?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '<div class="center">'; + // Output html code for logo + if ($urllogo) { + print '<div class="backgreypublicpayment">'; + print '<div class="logopublicpayment">'; + print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; + print '>'; + print '</div>'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; + } + print '</div>'; + } + print '</div>'; + + print '<div class="divmainbodylarge">'; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '</div>'; + + printCommonFooter('public'); + + print "</body>\n"; + print "</html>\n"; +} + + +$arrayofdata = array(); +if (GETPOST('action') == 'addlead') { + // When a json request is sent + $entityBody = file_get_contents('php://input'); + + if ($entityBody) { + $arrayofdata = json_decode($entityBody, true); + } + + print 'Date received and lead created'; + + $db->close(); + exit; +} + + + +/* + * Actions + */ + +$parameters = array(); +// Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// Action called when page is submitted +if (empty($reshook) && $action == 'add') { + $error = 0; + $urlback = ''; + + $db->begin(); + + // test if lead already exists + /* + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { + if (!GETPOST('login')) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"))."<br>\n"; + } + $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape(GETPOST('login'))."'"; + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + } + if ($num != 0) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorLoginAlreadyExists")."<br>\n"; + } + if (!GETPOSTISSET("pass1") || !GETPOSTISSET("pass2") || GETPOST("pass1", 'none') == '' || GETPOST("pass2", 'none') == '' || GETPOST("pass1", 'none') != GETPOST("pass2", 'none')) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorPasswordsMustMatch")."<br>\n"; + } + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("EMail"))."<br>\n"; + } + } + */ + if (GETPOST('type') <= 0) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type"))."<br>\n"; + } + if (!in_array(GETPOST('morphy'), array('mor', 'phy'))) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('Nature'))."<br>\n"; + } + if (!GETPOST("lastname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."<br>\n"; + } + if (!GETPOST("firstname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."<br>\n"; + } + if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n"; + } + + if (!$error) { + // email a peu pres correct et le login n'existe pas + $proj = new Project($db); + $proj->statut = -1; + $proj->email = GETPOST("email"); + $proj->note_private = GETPOST("note_private"); + + + // Fill array 'array_options' with data from add form + $extrafields->fetch_name_optionals_label($proj->table_element); + $ret = $extrafields->setOptionalsFromPost(null, $proj); + if ($ret < 0) { + $error++; + } + + $result = $proj->create($user); + if ($result > 0) { + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $object = $proj; + + if ($object->email) { + $subject = ''; + $msg = ''; + + // Send subscription email + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + $labeltouse = $conf->global->PROJECT_EMAIL_TEMPLATE_AUTOLEAD; + + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'project', $user, $outputlangs, 0, 1, $labeltouse); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions(dol_concatdesc($msg, $adht->getMailOnValid()), $substitutionarray, $outputlangs); + + if ($subjecttosend && $texttosend) { + $moreinheader = 'X-Dolibarr-Info: send_an_email by public/lead/new.php'."\r\n"; + + $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); + } + /*if ($result < 0) { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + }*/ + } + + if (!empty($backtopage)) { + $urlback = $backtopage; + } elseif (!empty($conf->global->PROJECT_URL_REDIRECT_LEAD)) { + $urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD; + // TODO Make replacement of __AMOUNT__, etc... + } else { + $urlback = $_SERVER["PHP_SELF"]."?action=added"; + } + + if (!empty($entity)) { + $urlback .= '&entity='.$entity; + } + dol_syslog("project lead ".$proj->ref." was created, we redirect to ".$urlback); + } else { + $error++; + $errmsg .= join('<br>', $proj->errors); + } + } + + if (!$error) { + $db->commit(); + + Header("Location: ".$urlback); + exit; + } else { + $db->rollback(); + } +} + +// Create lead from $arrayofdata +if (empty($reshook) && !empty($arrayofdata)) { + // TODO + dol_syslog(var_export($arrayofdata, true)); + // ... +} + +// Action called after a submitted was send and member created successfully +// If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to url we never go here because a redirect was done to this url. +// backtopage parameter with an url was set on member submit page, we never go here because a redirect was done to this url. +if (empty($reshook) && $action == 'added') { + llxHeaderVierge($langs->trans("NewMemberForm")); + + // Si on a pas ete redirige + print '<br>'; + print '<div class="center">'; + print $langs->trans("NewMemberbyWeb"); + print '</div>'; + + llxFooterVierge(); + exit; +} + + + +/* + * View + */ + +$form = new Form($db); +$formcompany = new FormCompany($db); +$extrafields->fetch_name_optionals_label('project'); // fetch optionals attributes and labels + + +llxHeaderVierge($langs->trans("NewContact")); + + +print load_fiche_titre($langs->trans("NewContact"), '', '', 0, 0, 'center'); + + +print '<div align="center">'; +print '<div id="divsubscribe">'; + +print '<div class="center subscriptionformhelptext justify">'; +if (!empty($conf->global->PROJECT_NEWFORM_TEXT)) { + print $langs->trans($conf->global->PROJECT_NEWFORM_TEXT)."<br>\n"; +} else { + print $langs->trans("NewLeadDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL)."<br>\n"; +} +print '</div>'; + +dol_htmloutput_errors($errmsg); + +// Print form +print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newlead">'."\n"; +print '<input type="hidden" name="token" value="'.newToken().'" / >'; +print '<input type="hidden" name="entity" value="'.$entity.'" />'; +print '<input type="hidden" name="action" value="add" />'; + +print '<br>'; + +print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>'; +//print $langs->trans("FieldsWithIsForPublic",'**').'<br>'; + +print dol_get_fiche_head(''); + +print '<script type="text/javascript"> +jQuery(document).ready(function () { + jQuery(document).ready(function () { + jQuery("#selectcountry_id").change(function() { + document.newlead.action.value="create"; + document.newlead.submit(); + }); + }); +}); +</script>'; + + +print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; + +// Lastname +print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="lastname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n"; +// Firstname +print '<tr><td>'.$langs->trans("Firstname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="firstname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n"; +// Company +print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n"; +// Address +print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n"; +print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n"; +// Zip / Town +print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print ' / '; +print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); +print '</td></tr>'; +// Country +print '<tr><td>'.$langs->trans('Country').'</td><td>'; +$country_id = GETPOST('country_id'); +if (!$country_id && !empty($conf->global->PROJECT_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->PROJECT_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); +} +if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } +} +$country_code = getCountry($country_id, 2, $db, $langs); +print $form->select_country($country_id, 'country_id'); +print '</td></tr>'; +// State +if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print '<tr><td>'.$langs->trans('State').'</td><td>'; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } else { + print ''; + } + print '</td></tr>'; +} +// EMail +print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n"; +// Other attributes +$tpl_context = 'public'; // define template context to public +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; +// Comments +print '<tr>'; +print '<td class="tdtop">'.$langs->trans("Comments").'</td>'; +print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>'; +print '</tr>'."\n"; + +print "</table>\n"; + +print dol_get_fiche_end(); + +// Save +print '<div class="center">'; +print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; +if (!empty($backtopage)) { + print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; +} +print '</div>'; + + +print "</form>\n"; +print "<br>"; +print '</div></div>'; + + +llxFooterVierge(); + +$db->close(); diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index 204d3bf3140..5118f7ebfc0 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -32,8 +32,12 @@ if (!defined('NOREQUIREMENU')) { if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); } -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // If this page is public (can be called outside logged session) require '../../main.inc.php'; @@ -206,7 +210,9 @@ if ($display_ticket_list) { $limit = $conf->liste_limit; $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; @@ -237,8 +243,9 @@ if ($display_ticket_list) { $sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label"; // Add fields for extrafields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + } } $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=t.fk_soc"; @@ -254,7 +261,7 @@ if ($display_ticket_list) { $sql .= ' AND '.$key.' = \''.$value.'\''; } elseif ($key == 't.fk_statut') { if (is_array($value) && count($value) > 0) { - $sql .= 'AND '.$key.' IN ('.implode(',', $value).')'; + $sql .= 'AND '.$key.' IN ('.$db->sanitize(implode(',', $value)).')'; } else { $sql .= ' AND '.$key.' = '.$db->escape($value); } @@ -360,8 +367,7 @@ if ($display_ticket_list) { print_liste_field_titre($selectedfields, $url_page_current, "", '', '', 'align="right"', $sortfield, $sortorder, 'center maxwidthsearch '); print '</tr>'; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { print '<tr class="oddeven">'; // Date ticket diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index b8858b921e9..27aaa0fd0f4 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -21,10 +21,18 @@ * \brief Public file to show on job */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php'; @@ -52,10 +60,8 @@ if (isset($_SESSION['email_customer'])) { $object = new RecruitmentJobPosition($db); -if (!$action) -{ - if (!$ref) - { +if (!$action) { + if (!$ref) { print $langs->trans('ErrorBadParameters')." - ref missing"; exit; } else { @@ -73,10 +79,8 @@ $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than curren * Actions */ -if ($cancel) -{ - if (!empty($backtopage)) - { +if ($cancel) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -125,8 +129,7 @@ if ($action == "view" || $action == "presend" || $action == "close" || $action = if ($error || $errors) { setEventMessages($object->error, $object->errors, 'errors'); - if ($action == "add_message") - { + if ($action == "add_message") { $action = 'presend'; } else { $action = ''; @@ -150,7 +153,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; */ $head = ''; -if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) { + $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n"; +} $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; @@ -188,24 +193,24 @@ print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n"; $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; $paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo; -elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_; +} //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) -{ +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} 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&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); } // Output html code for logo -if ($urllogo) -{ +if ($urllogo) { print '<div class="backgreypublicpayment">'; print '<div class="logopublicpayment">'; print '<img id="dolpaymentlogo" src="'.$urllogo.'"'; @@ -219,15 +224,16 @@ if ($urllogo) // Output introduction text $text = ''; -if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT)) -{ +if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT)) { $langs->load("recruitment"); - if (preg_match('/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) $text .= $langs->trans($reg[1])."<br>\n"; - else $text .= $conf->global->RECRUITMENT_NEWFORM_TEXT."<br>\n"; + if (preg_match('/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) { + $text .= $langs->trans($reg[1])."<br>\n"; + } else { + $text .= $conf->global->RECRUITMENT_NEWFORM_TEXT."<br>\n"; + } $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; } -if (empty($text)) -{ +if (empty($text)) { $text .= '<tr><td class="textpublicpayment"><br>'.$langs->trans("JobOfferToBeFilled", $mysoc->name); $text .= ' &nbsp; - &nbsp; <strong>'.$mysoc->name.'</strong>'; $text .= ' &nbsp; - &nbsp; <span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation); @@ -304,10 +310,8 @@ print '</div>'."\n"; print "\n"; -if ($action != 'dosubmit') -{ - if ($found && !$error) // We are in a management option and no error - { +if ($action != 'dosubmit') { + if ($found && !$error) { // We are in a management option and no error } else { dol_print_error_email('ERRORNEWONLINESIGN'); } diff --git a/htdocs/public/stripe/confirm_payment.php b/htdocs/public/stripe/confirm_payment.php deleted file mode 100644 index 5db7b49cc80..00000000000 --- a/htdocs/public/stripe/confirm_payment.php +++ /dev/null @@ -1,158 +0,0 @@ -<?php -/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net> - * - * 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/>. - */ - -// TODO Do we really need this page. We alread have a ipn.php page ! - -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); - -$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php'; -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - -require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; -require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; - -if (empty($conf->stripe->enabled)) accessforbidden('', 0, 0, 1); - - -// You can find your endpoint's secret in your webhook settings -if (isset($_GET['connect'])) -{ - if (isset($_GET['test'])) - { - $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_CONNECT_KEY; - $service = 'StripeTest'; - $servicestatus = 0; - } else { - $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_CONNECT_KEY; - $service = 'StripeLive'; - $servicestatus = 1; - } -} else { - if (isset($_GET['test'])) - { - $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_KEY; - $service = 'StripeTest'; - $servicestatus = 0; - } else { - $endpoint_secret = $conf->global->STRIPE_LIVE_WEBHOOK_KEY; - $service = 'StripeLive'; - $servicestatus = 1; - } -} - - - -/* - * Actions - */ - -$langs->load("main"); - -// TODO Do we really need a user in setup just to have an name to fill an email topic when it is a technical system notification email -$user = new User($db); -$user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS); -$user->getrights(); - -// list of action -$stripe = new Stripe($db); - -// Subject -$societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; - - -dol_syslog("Stripe confirm_payment was called"); -dol_syslog("GET=".var_export($_GET, true)); -dol_syslog("POST=".var_export($_POST, true)); - - -header('Content-Type: application/json'); - -// retrieve json from POST body -$json_str = file_get_contents('php://input'); -$json_obj = json_decode($json_str); - -$intent = null; -try { - if (isset($json_obj->payment_method_id)) { - // Create the PaymentIntent - $intent = \Stripe\PaymentIntent::create(array( - 'payment_method' => $json_obj->payment_method_id, - 'amount' => 1099, - 'currency' => 'eur', - 'confirmation_method' => 'manual', - 'confirm' => true, - )); - } - if (isset($json_obj->payment_intent_id)) { - $intent = \Stripe\PaymentIntent::retrieve( - $json_obj->payment_intent_id - ); - $intent->confirm(); - } - generatePaymentResponse($intent); -} catch (\Stripe\Error\Base $e) { - // Display error on client - echo json_encode(array( - 'error' => $e->getMessage() - )); -} - -/** - * Generate payment response - * - * @param \Stripe\PaymentIntent $intent PaymentIntent - * @return void - */ -function generatePaymentResponse($intent) -{ - if ($intent->status == 'requires_source_action' && - $intent->next_action->type == 'use_stripe_sdk') { - // Tell the client to handle the action - echo json_encode(array( - 'requires_action' => true, - 'payment_intent_client_secret' => $intent->client_secret - )); - } elseif ($intent->status == 'succeeded') { - // The payment didn’t need any additional actions and completed! - // Handle post-payment fulfillment - - // TODO - - echo json_encode(array( - "success" => true - )); - } else { - // Invalid status - http_response_code(500); - echo json_encode(array('error' => 'Invalid PaymentIntent status')); - } -} diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 0b5f14c9217..f44bc0b1c99 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -16,13 +16,23 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -39,14 +49,14 @@ require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; -if (empty($conf->stripe->enabled)) accessforbidden('', 0, 0, 1); +if (empty($conf->stripe->enabled)) { + accessforbidden('', 0, 0, 1); +} // You can find your endpoint's secret in your webhook settings -if (isset($_GET['connect'])) -{ - if (isset($_GET['test'])) - { +if (isset($_GET['connect'])) { + if (isset($_GET['test'])) { $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_CONNECT_KEY; $service = 'StripeTest'; $servicestatus = 0; @@ -56,8 +66,7 @@ if (isset($_GET['connect'])) $servicestatus = 1; } } else { - if (isset($_GET['test'])) - { + if (isset($_GET['test'])) { $endpoint_secret = $conf->global->STRIPE_TEST_WEBHOOK_KEY; $service = 'StripeTest'; $servicestatus = 0; @@ -68,8 +77,7 @@ if (isset($_GET['connect'])) } } -if (empty($endpoint_secret)) -{ +if (empty($endpoint_secret)) { print 'Error: Setup of module Stripe not complete for mode '.$service.'. The WEBHOOK_KEY is not defined.'; http_response_code(400); // PHP 5.4 or greater exit(); @@ -107,18 +115,15 @@ $user = new User($db); $user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS); $user->getrights(); -if (!empty($conf->multicompany->enabled) && !empty($conf->stripeconnect->enabled) && is_object($mc)) -{ +if (!empty($conf->multicompany->enabled) && !empty($conf->stripeconnect->enabled) && is_object($mc)) { $sql = "SELECT entity"; $sql .= " FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$db->escape($service)."' and tokenstring LIKE '%".$db->escape($event->account)."%'"; dol_syslog(get_class($db)."::fetch", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { - if ($db->num_rows($result)) - { + if ($result) { + if ($db->num_rows($result)) { $obj = $db->fetch_object($result); $key = $obj->entity; } else { @@ -135,7 +140,9 @@ $stripe = new Stripe($db); // 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; +} dol_syslog("***** Stripe IPN was called with event->type = ".$event->type); @@ -146,8 +153,7 @@ if ($event->type == 'payout.created') { $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s', $event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); - if ($result > 0) - { + if ($result > 0) { $subject = $societeName.' - [NOTIFICATION] Stripe payout scheduled'; if (!empty($user->email)) { $sendto = dolGetFirstLastname($user->firstname, $user->lastname)." <".$user->email.">"; @@ -189,8 +195,7 @@ if ($event->type == 'payout.created') { global $conf; $error = 0; $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", null, 'chaine', 0, '', $conf->entity); - if ($result) - { + if ($result) { $langs->load("errors"); $dateo = dol_now(); @@ -205,8 +210,7 @@ if ($event->type == 'payout.created') { $accountto = new Account($db); $accountto->fetch($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS); - if (($accountto->id != $accountfrom->id) && empty($error)) - { + if (($accountto->id != $accountfrom->id) && empty($error)) { $bank_line_id_from = 0; $bank_line_id_to = 0; $result = 0; @@ -215,15 +219,31 @@ if ($event->type == 'payout.created') { $typefrom = 'PRE'; $typeto = 'VIR'; - if (!$error) $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * price2num($amount), '', '', $user); - if (!($bank_line_id_from > 0)) $error++; - if (!$error) $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, price2num($amount), '', '', $user); - if (!($bank_line_id_to > 0)) $error++; + if (!$error) { + $bank_line_id_from = $accountfrom->addline($dateo, $typefrom, $label, -1 * price2num($amount), '', '', $user); + } + if (!($bank_line_id_from > 0)) { + $error++; + } + if (!$error) { + $bank_line_id_to = $accountto->addline($dateo, $typeto, $label, price2num($amount), '', '', $user); + } + if (!($bank_line_id_to > 0)) { + $error++; + } - if (!$error) $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); - if (!($result > 0)) $error++; - if (!$error) $result = $accountto->add_url_line($bank_line_id_to, $bank_line_id_from, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); - if (!($result > 0)) $error++; + if (!$error) { + $result = $accountfrom->add_url_line($bank_line_id_from, $bank_line_id_to, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); + } + if (!($result > 0)) { + $error++; + } + if (!$error) { + $result = $accountto->add_url_line($bank_line_id_to, $bank_line_id_from, DOL_URL_ROOT.'/compta/bank/line.php?rowid=', '(banktransfert)', 'banktransfert'); + } + if (!($result > 0)) { + $error++; + } } $subject = $societeName.' - [NOTIFICATION] Stripe payout done'; @@ -252,7 +272,7 @@ if ($event->type == 'payout.created') { '', 0, -1 - ); + ); $ret = $mailfile->sendfile(); @@ -279,8 +299,7 @@ if ($event->type == 'payout.created') { // TODO: Redirect to paymentok.php } elseif ($event->type == 'payment_intent.payment_failed') { // TODO: Redirect to paymentko.php -} elseif ($event->type == 'checkout.session.completed') // Called when making payment with new Checkout method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). -{ +} elseif ($event->type == 'checkout.session.completed') { // Called when making payment with new Checkout method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). // TODO: create fees // TODO: Redirect to paymentok.php } elseif ($event->type == 'payment_method.attached') { @@ -291,8 +310,7 @@ if ($event->type == 'payout.created') { $companypaymentmode = new CompanyPaymentMode($db); $idthirdparty = $societeaccount->getThirdPartyID($db->escape($event->data->object->customer), 'stripe', $servicestatus); - if ($idthirdparty > 0) // If the payment mode is on an external customer that is known in societeaccount, we can create the payment mode - { + if ($idthirdparty > 0) { // If the payment mode is on an external customer that is known in societeaccount, we can create the payment mode $companypaymentmode->stripe_card_ref = $db->escape($event->data->object->id); $companypaymentmode->fk_soc = $idthirdparty; $companypaymentmode->bank = null; @@ -311,16 +329,13 @@ if ($event->type == 'payout.created') { $companypaymentmode->status = $servicestatus; $db->begin(); - if (!$error) - { + if (!$error) { $result = $companypaymentmode->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -345,23 +360,20 @@ if ($event->type == 'payout.created') { $companypaymentmode->status = $servicestatus; $db->begin(); - if (!$error) - { + if (!$error) { $result = $companypaymentmode->update($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); } } elseif ($event->type == 'payment_method.detached') { $db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE number = '".$db->escape($event->data->object->id)."' and status = ".$servicestatus; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE number = '".$db->escape($event->data->object->id)."' and status = ".((int) $servicestatus); $db->query($sql); $db->commit(); } elseif ($event->type == 'charge.succeeded') { diff --git a/htdocs/public/test/badges.php b/htdocs/public/test/badges.php index 8d5a382af03..fd0add00af1 100644 --- a/htdocs/public/test/badges.php +++ b/htdocs/public/test/badges.php @@ -1,11 +1,25 @@ <?php - -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -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('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +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('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} session_cache_limiter('public'); @@ -20,7 +34,7 @@ if ($dolibarr_main_prod) { <!doctype html> <html lang="en"> <head> - <meta charset="utf-8"> + <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="Documentation and examples for theme."> @@ -29,10 +43,10 @@ if ($dolibarr_main_prod) { <body class="docpage" style="padding: 20px;"> <main role="main" > - <h1 class="bd-title" id="content">Badges</h1> - <p class="bd-lead">Documentation and examples for badges, our small count and labeling component.</p> + <h1 class="bd-title" id="content">Badges</h1> + <p class="bd-lead">Documentation and examples for badges, our small count and labeling component.</p> - <h2 id="example">Example</h2> + <h2 id="example">Example</h2> <p>Badges scale to match the size of the immediate parent element by using relative font sizing and em units.</p> @@ -46,7 +60,7 @@ if ($dolibarr_main_prod) { </div> <figure class="highlight"> - <pre> + <pre> &lt;h1&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h1&gt; &lt;h2&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h2&gt; @@ -55,7 +69,7 @@ if ($dolibarr_main_prod) { &lt;h5&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h5&gt; &lt;h6&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h6&gt; - </pre> + </pre> </figure> <p>Badges can be used as part of links or buttons to provide a counter.</p> @@ -88,7 +102,7 @@ if ($dolibarr_main_prod) { </div> <figure class="highlight"> - <pre> + <pre> &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot;&gt; @@ -97,7 +111,7 @@ if ($dolibarr_main_prod) { &lt;/button&gt; - </pre> + </pre> </figure> <h2 id="contextual-variations">Contextual variations</h2> @@ -117,7 +131,7 @@ if ($dolibarr_main_prod) { </div> <figure class="highlight"> - <pre> + <pre> &lt;span class=&quot;badge badge-primary&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;badge badge-secondary&quot;&gt;Secondary&lt;/span&gt; @@ -128,7 +142,7 @@ if ($dolibarr_main_prod) { &lt;span class=&quot;badge badge-light&quot;&gt;Light&lt;/span&gt; &lt;span class=&quot;badge badge-dark&quot;&gt;Dark&lt;/span&gt; - </pre> + </pre> </figure> <div class="warning"> @@ -144,13 +158,13 @@ if ($dolibarr_main_prod) { <p>Add any of the below mentioned modifier classes to change the appearance of a badge to be linked to a default status.</p> <div class="bd-example"> - <?php for ($i = 0; $i <= 9; $i++): ?> + <?php for ($i = 0; $i <= 9; $i++) : ?> <span class="badge badge-status<?php print $i; ?>" >status-<?php print $i; ?></span> <?php endfor; ?> </div> <figure class="highlight"><pre><pre> -<?php for ($i = 0; $i <= 9; $i++): ?> +<?php for ($i = 0; $i <= 9; $i++) : ?> &lt;span class="badge badge-status<?php print $i; ?>" &gt;status<?php print $i; ?>&lt;/span&gt; <?php endfor; ?> </pre></figure> @@ -171,7 +185,7 @@ if ($dolibarr_main_prod) { <span class="badge badge-pill badge-light">Light</span> <span class="badge badge-pill badge-dark">Dark</span> - <?php for ($i = 0; $i <= 9; $i++): ?> + <?php for ($i = 0; $i <= 9; $i++) : ?> <span class="badge badge-pill badge-status<?php print $i; ?>" >status<?php print $i; ?></span> <?php endfor; ?> @@ -188,7 +202,7 @@ if ($dolibarr_main_prod) { &lt;span class=&quot;badge badge-pill badge-info&quot;&gt;Info&lt;/span&gt; &lt;span class=&quot;badge badge-pill badge-light&quot;&gt;Light&lt;/span&gt; &lt;span class=&quot;badge badge-pill badge-dark&quot;&gt;Dark&lt;/span&gt; -<?php for ($i = 0; $i <= 9; $i++): ?> +<?php for ($i = 0; $i <= 9; $i++) : ?> &lt;span class="badge badge-pill badge-status<?php print $i; ?>" &gt;status<?php print $i; ?>&lt;/span&gt; <?php endfor; ?> </pre></figure> @@ -210,7 +224,7 @@ if ($dolibarr_main_prod) { <span class="badge badge-dot badge-light"></span> <span class="badge badge-dot badge-dark"></span> - <?php for ($i = 0; $i <= 9; $i++): ?> + <?php for ($i = 0; $i <= 9; $i++) : ?> <span class="badge badge-dot badge-status<?php print $i; ?>" ></span> <?php endfor; ?> @@ -227,7 +241,7 @@ if ($dolibarr_main_prod) { &lt;span class=&quot;badge badge-dot badge-info&quot;&gt;&lt;/span&gt; &lt;span class=&quot;badge badge-dot badge-light&quot;&gt;&lt;/span&gt; &lt;span class=&quot;badge badge-dot badge-dark&quot;&gt;&lt;/span&gt; -<?php for ($i = 0; $i <= 9; $i++): ?> +<?php for ($i = 0; $i <= 9; $i++) : ?> &lt;span class="badge badge-dot badge-status<?php print $i; ?>" &gt;&lt;/span&gt; <?php endfor; ?> </pre></figure> @@ -256,7 +270,7 @@ if ($dolibarr_main_prod) { <a href="#" class="badge badge-info">Info</a> <a href="#" class="badge badge-light">Light</a> <a href="#" class="badge badge-dark">Dark</a> - <?php for ($i = 0; $i <= 9; $i++): ?> + <?php for ($i = 0; $i <= 9; $i++) : ?> <a href="#" class="badge badge-status<?php print $i; ?>" >status<?php print $i; ?></a> <?php endfor; ?> @@ -271,7 +285,7 @@ if ($dolibarr_main_prod) { &lt;a href=&quot;#&quot; class=&quot;badge badge-info&quot;&gt;Info&lt;/a&gt; &lt;a href=&quot;#&quot; class=&quot;badge badge-light&quot;&gt;Light&lt;/a&gt; &lt;a href=&quot;#&quot; class=&quot;badge badge-dark&quot;&gt;Dark&lt;/a&gt; -<?php for ($i = 0; $i <= 9; $i++): ?> +<?php for ($i = 0; $i <= 9; $i++) : ?> &lt;a href=&quot;#&quot; class="badge badge-status<?php print $i; ?>" &gt;status<?php print $i; ?>&lt;/a&gt; <?php endfor; ?> </pre></figure> @@ -326,7 +340,7 @@ if ($dolibarr_main_prod) { </pre></figure> - </main> + </main> </body> </html> \ No newline at end of file diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 95265831670..b2a87a75480 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -1,6 +1,27 @@ <?php //define("NOLOGIN",1); // This means this output page does not require to be logged. -define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +//if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); +//if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +//if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); +if (!defined('NOSTYLECHECK')) { + define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test +} +//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) +} + require '../../main.inc.php'; @@ -18,8 +39,7 @@ $form = new Form($db); // HEADER //-------- -if (empty($usedolheader)) -{ +if (empty($usedolheader)) { header("Content-type: text/html; charset=UTF8"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> @@ -64,7 +84,7 @@ if (empty($usedolheader)) '/includes/pdfmake/pdfmake.min.js', '/includes/pdfmake/vfs_fonts.js' ); - */ + */ llxHeader('', '', '', '', 0, 0, $arrayjs, $arraycss); } @@ -76,14 +96,14 @@ if (empty($usedolheader)) <h2> This page is a sample of page using tables. It is designed to make test with<br> +</h2> +<div class="wordbreak"> - css (add parameter &amp;theme=newtheme to test another theme or edit css of current theme)<br> -- jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=4&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=4&amp;dol_optimize_smallscreen=1</a> and switch to small screen < 1000 to enable view with jmobile)<br> - jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=1&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=1&amp;dol_optimize_smallscreen=1</a> and switch to small screen < 570 to enable with emulated jmobile)<br> - no javascript / usage for bind people (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?nojs=1'; ?>">nojs=1</a> to force disable javascript)<br> - tablednd<br> -</h2> +</div> -<?php ?> <br><hr><br>Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form<br> @@ -114,17 +134,16 @@ This page is a sample of page using tables. It is designed to make test with<br> <br><hr><br>Example 0c: Table with table+tr+td containg a select that should be overflowed and truncated => Use this to align text or form<br> <table class="centpercent"> - <tr> - <td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work --> + <tr> + <td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work --> <select name="hidedetails" class="centpercentonsmartphone"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select> - </td> - <td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work --> + </td> + <td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work --> <select name="hidedetails" class="centpercentonsmartphone"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select> - </td> - </tr> + </td> + </tr> </table> -<?php ?> @@ -134,16 +153,16 @@ This page is a sample of page using tables. It is designed to make test with<br> <script type="text/javascript" language="javascript"> /*jQuery(document).ready(function() { $(document).ready(function() { - var table = $('#tablelines3').DataTable( { - scrollY: "300px", - scrollX: true, - scrollCollapse: true, - paging: false, - fixedColumns: { - leftColumns: 1, - rightColumns: 1 - } - } ); + var table = $('#tablelines3').DataTable( { + scrollY: "300px", + scrollX: true, + scrollCollapse: true, + paging: false, + fixedColumns: { + leftColumns: 1, + rightColumns: 1 + } + } ); } ); });*/ </script> @@ -153,58 +172,77 @@ $(document).ready(function() { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $productspecimen = new Product($db); $productspecimen->initAsSpecimen(); +$object = $productspecimen; $sortfield = 'aaa'; $sortorder = 'ASC'; $tasksarray = array(1, 2, 3); // To force having several lines $tagidfortablednd = 'tablelines3'; -if (!empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +if (!empty($conf->use_javascript_ajax)) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +} $nav = ''; $nav .= '<form name="dateselect" action="'.$_SERVER["PHP_SELF"].'?action=show_peruser'.$param.'">'; -if ($actioncode || GETPOSTISSET('actioncode')) $nav .= '<input type="hidden" name="actioncode" value="'.$actioncode.'">'; -if ($status || GETPOSTISSET('status')) $nav .= '<input type="hidden" name="status" value="'.$status.'">'; -if ($filter) $nav .= '<input type="hidden" name="filter" value="'.$filter.'">'; -if ($filtert) $nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">'; -if ($socid) $nav .= '<input type="hidden" name="socid" value="'.$socid.'">'; -if ($showbirthday) $nav .= '<input type="hidden" name="showbirthday" value="1">'; -if ($pid) $nav .= '<input type="hidden" name="projectid" value="'.$pid.'">'; -if ($type) $nav .= '<input type="hidden" name="type" value="'.$type.'">'; -if ($usergroup) $nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">'; +if ($actioncode || GETPOSTISSET('actioncode')) { + $nav .= '<input type="hidden" name="actioncode" value="'.$actioncode.'">'; +} +if ($status || GETPOSTISSET('status')) { + $nav .= '<input type="hidden" name="status" value="'.$status.'">'; +} +if ($filter) { + $nav .= '<input type="hidden" name="filter" value="'.$filter.'">'; +} +if ($filtert) { + $nav .= '<input type="hidden" name="filtert" value="'.$filtert.'">'; +} +if ($socid) { + $nav .= '<input type="hidden" name="socid" value="'.$socid.'">'; +} +if ($showbirthday) { + $nav .= '<input type="hidden" name="showbirthday" value="1">'; +} +if ($pid) { + $nav .= '<input type="hidden" name="projectid" value="'.$pid.'">'; +} +if ($type) { + $nav .= '<input type="hidden" name="type" value="'.$type.'">'; +} +if ($usergroup) { + $nav .= '<input type="hidden" name="usergroup" value="'.$usergroup.'">'; +} $nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); $nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">'; $nav .= '</form>'; $limit = 10; -print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 500, '', 0, $nav, '', $limit); - +print_barre_liste('Title of my list', 12, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 500, '', 0, $nav, '', $limit, 0, 0, 1); $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('This is a select list for a filter A').': '; +$moreforfilter .= $langs->trans('This is a select list for a filter A (no combo forced)').': '; $cate_arbo = array('field1'=>'value1a into the select list A', 'field2'=>'value2a'); -$moreforfilter .= $form->selectarray('search_aaa', $cate_arbo, '', 1); // List without js combo +$moreforfilter .= $form->selectarray('search_aaa', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 0); // List with no js combo $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('This is a select list for a filter B').': '; +$moreforfilter .= $langs->trans('This is a select list for a filter B (auto combo)').': '; $cate_arbo = array('field1'=>'value1b into the select list B', 'field2'=>'value2b'); -$moreforfilter .= $form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter .= $form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', -1); // List with js combo auto $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('This is a select list for a filter C').': '; +$moreforfilter .= $langs->trans('This is a select list for a filter C (combo forced)').': '; $cate_arbo = array('field1'=>'value1c into the select list C', 'field2'=>'value2c'); -$moreforfilter .= $form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter .= $form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced $moreforfilter .= '</div>'; $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= $langs->trans('This is a select list for a filter D').': '; +$moreforfilter .= $langs->trans('This is a select list for a filter D (combo forced)').': '; $cate_arbo = array('field1'=>'value1d into the select list D', 'field2'=>'value2d'); -$moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo +$moreforfilter .= $form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth300', 1); // List with js combo forced $moreforfilter .= '</div>'; -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array(); @@ -219,14 +257,14 @@ if (!empty($moreforfilter)) <thead> <tr class="liste_titre"> <?php print getTitleFieldOfList($langs->trans('title1'), 0, $_SERVER["PHP_SELF"], 'aaa', '', '', 'align="left"', $sortfield, $sortorder); ?> -<?php print getTitleFieldOfList($langs->trans('title2'), 0, $_SERVER["PHP_SELF"], 'bbb', '', '', 'align="right"', $sortfield, $sortorder); ?> -<?php print getTitleFieldOfList($langs->trans('title3'), 0, $_SERVER["PHP_SELF"], 'ccc', '', '', 'align="center"', $sortfield, $sortorder); ?> +<?php print getTitleFieldOfList($langs->trans('title2'), 0, $_SERVER["PHP_SELF"], 'bbb', '', '', 'align="center"', $sortfield, $sortorder); ?> +<?php print getTitleFieldOfList($langs->trans('title3'), 0, $_SERVER["PHP_SELF"], 'ccc', '', '', 'align="right"', $sortfield, $sortorder); ?> </tr> </thead> <tbody> -<tr class="pair"><td><?php echo $productspecimen->getNomUrl(1); ?></td><td class="right">b1</td><td class="tdlineupdown left">c1</td></tr> -<tr class="impair nowrap"><td>a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2</td><td align="right">b2</td><td class="tdlineupdown left">c2</td></tr> -<tr class="pair"><td>a3</td><td class="right">b3</td><td class="tdlineupdown left">c3</td></tr> +<tr class="pair"><td><?php echo $productspecimen->getNomUrl(1); ?></td><td class="center">b1</td><td class="tdlineupdown right">c1</td></tr> +<tr class="impair nowrap"><td>a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2</td><td align="center">b2</td><td class="tdlineupdown right">c2</td></tr> +<tr class="pair"><td>a3</td><td class="center">b3</td><td class="tdlineupdown right">c3</td></tr> </tbody> </table> @@ -237,22 +275,20 @@ if (!empty($moreforfilter)) <!-- <br><hr><br>Example 1b : Table using tags: table/thead/tbody/tr/th-td + dataTable => Use this for short result tables<br> - - <script type="text/javascript"> $(document).ready(function(){ - $('#idtableexample2').dataTable( { - <?php + $('#idtableexample2').dataTable( { + <?php if ($optioncss == 'print') { - print '\'dom\': \'lfrtip\','; + print '\'dom\': \'lfrtip\','; } else { print '\'dom\': \'Blfrtip\','; } ?> - "colReorder": true, + "colReorder": true, 'buttons': [ - 'colvis','copy', 'csv', 'excel', 'pdf', 'print' - ], + 'colvis','copy', 'csv', 'excel', 'pdf', 'print' + ], "sPaginationType": "full_numbers", "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "<?php echo $langs->trans('All'); ?>"]], "oLanguage": { @@ -276,13 +312,12 @@ $(document).ready(function(){ "bServerSide": true, "sAjaxSource": "../ajax.php", "aoColumnDefs": [ - { "bSortable": false, "aTargets": [ 2,3,4 ] } - ], + { "bSortable": false, "aTargets": [ 2,3,4 ] } + ], */ - }) + }) }); </script> - --> @@ -292,54 +327,55 @@ $(document).ready(function(){ <?php $tasksarray = array(1, 2, 3); // To force having several lines $tagidfortablednd = 'tablelines'; - if (!empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +if (!empty($conf->use_javascript_ajax)) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; +} ?> <div class="tagtable centpercent liste_titre_bydiv" id="tablelines"> - <div class="tagtr liste_titre"> - <div class="tagtd">Title A<input type="hidden" name="cartitem" value="3"></div> - <div class="tagtd">title B</div> - <div class="tagtd">title C</div> - <div class="tagtd">title D</div> - </div> - <div class="pair tagtr"> - <div class="tagtd">line4<input type="hidden" name="cartitem" value="3"></div> - <div class="tagtd">dfsdf</div> - <div class="tagtd"><input name="count" value="4"></div> - <div class="tagtd tdlineupdown">bbbb</div> - </div> - <div class="impair tagtr"> - <div class="tagtd">line5<input type="hidden" name="cartitemb" value="3"></div> - <div class="tagtd">dfsdf</div> - <div class="tagtd"><input name="countb" value="4"></div> - <div class="tagtd tdlineupdown">bbbb</div> - </div> - <div class="pair tagtr"> - <div class="tagtd">line6<input type="hidden" name="cartitem" value="3"></div> - <div class="tagtd">jghjgh</div> - <div class="tagtd">5</div> - <div class="tagtd tdlineupdown">lll</div> - </div> + <div class="tagtr liste_titre"> + <div class="tagtd">Title A<input type="hidden" name="cartitem" value="3"></div> + <div class="tagtd">title B</div> + <div class="tagtd">title C</div> + <div class="tagtd">title D</div> + </div> + <div class="pair tagtr"> + <div class="tagtd">line4<input type="hidden" name="cartitem" value="3"></div> + <div class="tagtd">dfsdf</div> + <div class="tagtd"><input name="count" value="4" class="maxwidth50"></div> + <div class="tagtd tdlineupdown">bbbb</div> + </div> + <div class="impair tagtr"> + <div class="tagtd">line5<input type="hidden" name="cartitemb" value="3"></div> + <div class="tagtd">dfsdf</div> + <div class="tagtd"><input name="countb" value="4" class="maxwidth50"></div> + <div class="tagtd tdlineupdown">bbbb</div> + </div> + <div class="pair tagtr"> + <div class="tagtd">line6<input type="hidden" name="cartitem" value="3"></div> + <div class="tagtd">jghjgh</div> + <div class="tagtd">5</div> + <div class="tagtd tdlineupdown">lll</div> + </div> <!-- Using form into div make Firefox crazy (page loading does not end) --> <!-- <form class="liste_titre" method="POST" action="1.php"> - <div>line1<input type="hidden" name="cartitem" value="1"></div> - <div><label><input type="checkbox" name="hidedetails" value="2"> A checkbox inside a cell</label></div> - <div><input name="count" value="4"></div> - <div><input type="submit" name="count2" class="button noshadow" value="aaa"></div> - </form> - <form class="impair" method="POST" action="2.php"> - <div>line2<input type="hidden" name="cartitem" value="2"></div> - <div><select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select></div> - <div><input name="countb" value="4"></div> - <div class="tdlineupdown"><input type="submit" value="xxx" class="button"></div> - </form>--> + <div>line1<input type="hidden" name="cartitem" value="1"></div> + <div><label><input type="checkbox" name="hidedetails" value="2"> A checkbox inside a cell</label></div> + <div><input name="count" value="4"></div> + <div><input type="submit" name="count2" class="button noshadow" value="aaa"></div> + </form> + <form class="impair" method="POST" action="2.php"> + <div>line2<input type="hidden" name="cartitem" value="2"></div> + <div><select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select></div> + <div><input name="countb" value="4"></div> + <div class="tdlineupdown"><input type="submit" value="xxx" class="button"></div> + </form>--> </div> <?php -if (!empty($usedolheader)) -{ +if (!empty($usedolheader)) { llxFooter(); } else { ?> </body> diff --git a/htdocs/public/test/test_csrf.php b/htdocs/public/test/test_csrf.php index 8c242cade64..1c23dc7070a 100644 --- a/htdocs/public/test/test_csrf.php +++ b/htdocs/public/test/test_csrf.php @@ -3,14 +3,16 @@ ?> -This is a form to test a CSRF.<br> +This is a form to test if a CSRF exists into a Dolibarr page.<br> <br> -Open this form into a Virtual server A.<br> -Change url to send request to into file to send request to virtual server B.<br> +- Change url to send request to into this file (server B, hard coded page)<br> +- Open this form into a virtual server A.<br> +- Send the request to the virtual server B by clicking submit.<br> +- Check that Anticsrf protection is triggered.<br> <br> <?php - $urltosendrequest = "http://localhostgit/dolibarr_dev/htdocs/user/group/card.php"; + $urltosendrequest = "http://127.0.0.1/dolibarr/htdocs/user/group/card.php"; print 'urltosendrequest = '.$urltosendrequest.'<br><br>'; ?> diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index bd74ecb0f13..d89e04e12a6 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -1,7 +1,9 @@ <?php //define("NOLOGIN",1); // This means this output page does not require to be logged. define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -define('REQUIRE_JQUERY_MULTISELECT', 'select2'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} require '../../main.inc.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; diff --git a/htdocs/public/test/test_sessionlock.php b/htdocs/public/test/test_sessionlock.php index b10d1e892ec..18a1ef73d08 100644 --- a/htdocs/public/test/test_sessionlock.php +++ b/htdocs/public/test/test_sessionlock.php @@ -1,37 +1,68 @@ <?php - -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test -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('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOSTYLECHECK')) { + define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test +} +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 you don't need session management (can't be logged if no session used). You must also set // NOCSRFCHECK, NOTOKENRENEWAL, NOLOGIN // Disable module with GETPOST('disablemodules') won't work. Variable 'dol_...' will not be set. // $_SESSION are then simple vars if sessions are not active. -// TODO We can close session with session_write_close() as soon as we just need read access. -if (!defined("NOSESSION")) define("NOSESSION", '1'); +// TODO We can close session with session_write_close() as soon as we just need read access everywhere in code. +if (!defined("NOSESSION")) { + define("NOSESSION", '1'); +} -define('REQUIRE_JQUERY_MULTISELECT', 'select2'); - -print PHP_SESSION_DISABLED; -print PHP_SESSION_NONE; -print PHP_SESSION_ACTIVE; +print "Legend:<br>\n"; +print 'PHP_SESSION_DISABLED='.PHP_SESSION_DISABLED."<br>\n"; +print 'PHP_SESSION_NONE='.PHP_SESSION_NONE."<br>\n"; +print 'PHP_SESSION_ACTIVE='.PHP_SESSION_ACTIVE."<br>\n"; +print '<br>'; + +print 'session_status='.session_status().' (before main.inc.php)'; print '<br>'; -print session_status(); require '../../main.inc.php'; -print session_status(); + +/* No need for this. +if ($dolibarr_main_prod) { + accessforbidden(); +} +*/ + +print 'session_status='.session_status().' (after main.inc.php)'; print '<br>'; //print 'a'.$_SESSION['disablemodules'].'b'; -print 'This page is visible. It means you are not locked.'; +print "\n<br>This page is visible. It means you are not locked by another page called in same session."; //session_write_close(); diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 678d45f70ca..85b40430d4c 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -22,14 +22,30 @@ * \brief Display public form to add new ticket */ -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../../main.inc.php'; @@ -143,6 +159,17 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('add', 'alpha')) { $action = ''; } + // Check Captcha code if is enabled + if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { + $sessionkey = 'dol_antispam_value'; + $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) === strtolower(GETPOST('code', 'none')))); + if (!$ok) { + $error++; + array_push($object->errors, $langs->trans("ErrorBadValueForCode")); + $action = ''; + } + } + if (!$error) { $object->db->begin(); @@ -365,7 +392,7 @@ if ($action != "infos_success") { print '<div>'; } else { print '<div class="info marginleftonly marginrightonly">'.$langs->trans('TicketPublicInfoCreateTicket').'</div>'; - $formticket->showForm(); + $formticket->showForm(0, 'edit', 1); } } diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index b3e8a5e237e..31ee838f6f5 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -22,17 +22,29 @@ * \brief Public page to add and manage ticket */ -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // For MultiCompany module. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php // TODO This should be useless. Because entity must be retrieve from object ref and not from url. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; @@ -57,8 +69,7 @@ $action = GETPOST('action', 'aZ09'); $form = new Form($db); $formticket = new FormTicket($db); -if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) -{ +if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { print $langs->trans('TicketPublicInterfaceForbidden'); exit; } @@ -71,9 +82,9 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '<div class="ticketpublicarea">'; print '<p style="text-align: center">'.($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")).'</p>'; print '<div class="ticketform">'; -print '<a href="create_ticket.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; -print '<a href="list.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; -print '<a href="view.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; +print '<a href="create_ticket.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15x fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("CreateTicket")).'</div></a>'; +print '<a href="list.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15x fa-list-alt valignmiddle btnTitle-icon"></span><br>'.dol_escape_htmltag($langs->trans("ViewMyTicketList")).'</div></a>'; +print '<a href="view.php" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.img_picto('', 'ticket', 'class="fa-15x"').'<br>'.dol_escape_htmltag($langs->trans("ShowTicketWithTrackId")).'</div></a>'; print '<div style="clear:both;"></div>'; print '</div>'; print '</div>'; diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 4c426869239..92962732a68 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -32,8 +32,12 @@ if (!defined('NOREQUIREMENU')) { if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); } -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // If this page is public (can be called outside logged session) require '../../main.inc.php'; @@ -174,8 +178,7 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '<div class="ticketpublicarealist">'; -if ($action == "view_ticketlist") -{ +if ($action == "view_ticketlist") { print '<br>'; if ($display_ticket_list) { // Filters @@ -295,7 +298,9 @@ if ($action == "view_ticketlist") $limit = $conf->liste_limit; $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; @@ -326,8 +331,9 @@ if ($action == "view_ticketlist") $sql .= " type.label as type_label, category.label as category_label, severity.label as severity_label"; // Add fields for extrafields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + } } $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; @@ -358,7 +364,7 @@ if ($action == "view_ticketlist") $sql .= " AND ".$key." = '".$db->escape($value)."'"; } elseif ($key == 't.fk_statut') { if (is_array($value) && count($value) > 0) { - $sql .= 'AND '.$key.' IN ('.implode(',', $value).')'; + $sql .= 'AND '.$key.' IN ('.$db->sanitize(implode(',', $value)).')'; } else { $sql .= ' AND '.$key.' = '.$db->escape($value); } @@ -426,7 +432,7 @@ if ($action == "view_ticketlist") if (!empty($arrayfields['category.code']['checked'])) { print '<td class="liste_titre">'; - $formTicket->selectGroupTickets($search_category, 'search_category', '', 2, 1, 1); + $formTicket->selectGroupTickets($search_category, 'search_category', 'public=1', 2, 1, 1); print '</td>'; } @@ -528,8 +534,7 @@ if ($action == "view_ticketlist") print_liste_field_titre($selectedfields, $url_page_current, "", '', '', 'align="right"', $sortfield, $sortorder, 'center maxwidthsearch '); print '</tr>'; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { print '<tr class="oddeven">'; // Date ticket diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index cde872c56db..2f70ded9914 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -33,8 +33,12 @@ if (!defined('NOREQUIREMENU')) { if (!defined("NOLOGIN")) { define("NOLOGIN", '1'); } -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} // If this page is public (can be called outside logged session) require '../../main.inc.php'; @@ -53,13 +57,13 @@ $langs->loadLangs(array("companies", "other", "ticket")); $track_id = GETPOST('track_id', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $action = GETPOST('action', 'aZ09'); -$email = strtolower(GETPOST('email', 'alpha')); +$email = GETPOST('email', 'email'); if (GETPOST('btn_view_ticket')) { unset($_SESSION['email_customer']); } if (isset($_SESSION['email_customer'])) { - $email = strtolower($_SESSION['email_customer']); + $email = $_SESSION['email_customer']; } $object = new ActionsTicket($db); @@ -69,10 +73,8 @@ $object = new ActionsTicket($db); * Actions */ -if ($cancel) -{ - if (!empty($backtopage)) - { +if ($cancel) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -103,17 +105,15 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a $ret = $object->fetch('', '', $track_id); if ($ret && $object->dao->id > 0) { // Check if emails provided is the one of author - $emailofticket = strtolower(CMailFile::getValidAddress($object->dao->origin_email, 2)); - if ($emailofticket == $email) - { + $emailofticket = CMailFile::getValidAddress($object->dao->origin_email, 2); + if (strtolower($emailofticket) == strtolower($email)) { $display_ticket = true; $_SESSION['email_customer'] = $email; - } - // Check if emails provided is inside list of contacts - else { + } else { + // Check if emails provided is inside list of contacts $contacts = $object->dao->liste_contact(-1, 'external'); foreach ($contacts as $contact) { - if (strtolower($contact['email']) == $email) { + if (strtolower($contact['email']) == strtolower($email)) { $display_ticket = true; $_SESSION['email_customer'] = $email; break; @@ -131,21 +131,19 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a } } // Check if email is email of creator - if ($object->dao->fk_user_create > 0) - { + if ($object->dao->fk_user_create > 0) { $tmpuser = new User($db); $tmpuser->fetch($object->dao->fk_user_create); - if ($email == strtolower($tmpuser->email)) { + if (strtolower($email) == strtolower($tmpuser->email)) { $display_ticket = true; $_SESSION['email_customer'] = $email; } } // Check if email is email of creator - if ($object->dao->fk_user_assign > 0 && $object->dao->fk_user_assign != $object->dao->fk_user_create) - { + if ($object->dao->fk_user_assign > 0 && $object->dao->fk_user_assign != $object->dao->fk_user_create) { $tmpuser = new User($db); $tmpuser->fetch($object->dao->fk_user_assign); - if ($email == strtolower($tmpuser->email)) { + if (strtolower($email) == strtolower($tmpuser->email)) { $display_ticket = true; $_SESSION['email_customer'] = $email; } @@ -157,8 +155,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a } } - if (!$error && $action == 'confirm_public_close' && $display_ticket) - { + if (!$error && $action == 'confirm_public_close' && $display_ticket) { if ($object->dao->close($user)) { setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs'); @@ -171,24 +168,21 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a } } - if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) - { + if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) { // TODO Add message... $ret = $object->dao->newMessage($user, $action, 0, 1); - if (!$error) - { + if (!$error) { $action = 'view_ticket'; } } if ($error || $errors) { setEventMessages($object->error, $object->errors, 'errors'); - if ($action == "add_message") - { + if ($action == "add_message") { $action = 'presend'; } else { $action = ''; @@ -228,8 +222,7 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '<div class="ticketpublicarea">'; if ($action == "view_ticket" || $action == "presend" || $action == "close" || $action == "confirm_public_close") { - if ($display_ticket) - { + if ($display_ticket) { // Confirmation close if ($action == 'close') { print $form->formconfirm($_SERVER["PHP_SELF"]."?track_id=".$track_id, $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_public_close", '', '', 1); diff --git a/htdocs/public/website/index.php b/htdocs/public/website/index.php index 4edd733b9e6..d72fedefa7e 100644 --- a/htdocs/public/website/index.php +++ b/htdocs/public/website/index.php @@ -30,14 +30,30 @@ * \brief Wrapper to output pages when website is powered by Dolibarr instead of a native web server */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -if (!defined('NOLOGIN')) define("NOLOGIN", 1); -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} /** * Header empty @@ -69,18 +85,15 @@ $accessallowed = 1; $type = ''; -if (empty($pageid)) -{ +if (empty($pageid)) { require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; $object = new Website($db); $object->fetch(0, $websitekey); - if (empty($object->id)) - { - if (empty($pageid)) - { + if (empty($object->id)) { + if (empty($pageid)) { // Return header 404 header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404); @@ -91,57 +104,52 @@ if (empty($pageid)) $objectpage = new WebsitePage($db); - if ($pageref) - { + if ($pageref) { $result = $objectpage->fetch(0, $object->id, $pageref); - if ($result > 0) - { + if ($result > 0) { $pageid = $objectpage->id; - } elseif ($result == 0) - { + } elseif ($result == 0) { // Page not found from ref=pageurl, we try using alternative alias $result = $objectpage->fetch(0, $object->id, null, $pageref); - if ($result > 0) - { + if ($result > 0) { $pageid = $objectpage->id; } } } else { - if ($object->fk_default_home > 0) - { + if ($object->fk_default_home > 0) { $result = $objectpage->fetch($object->fk_default_home); - if ($result > 0) - { + if ($result > 0) { $pageid = $objectpage->id; } } - if (empty($pageid)) - { + if (empty($pageid)) { $array = $objectpage->fetchAll($object->id); // TODO Can filter on container of type pages only ? - if (is_array($array) && count($array) > 0) - { + if (is_array($array) && count($array) > 0) { $firstrep = reset($array); $pageid = $firstrep->id; } } } } -if (empty($pageid)) -{ +if (empty($pageid)) { // Return header 404 header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404); $langs->load("website"); - if (!GETPOSTISSET('pageref')) print $langs->trans("PreviewOfSiteNotYetAvailable", $websitekey); + if (!GETPOSTISSET('pageref')) { + print $langs->trans("PreviewOfSiteNotYetAvailable", $websitekey); + } include DOL_DOCUMENT_ROOT.'/public/error-404.php'; exit; } $appli = constant('DOL_APPLICATION_TITLE'); -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; +} @@ -155,8 +163,7 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_ // Security: Delete string ../ into $original_file global $dolibarr_main_data_root; -if ($pageid == 'css') // No more used ? -{ +if ($pageid == 'css') { // No more used ? header('Content-type: text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. //if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); @@ -172,16 +179,14 @@ $refname = basename(dirname($original_file)."/"); // Security: // Limite acces si droits non corrects -if (!$accessallowed) -{ +if (!$accessallowed) { accessforbidden(); } // Security: // On interdit les remontees de repertoire ainsi que les pipe dans // les noms de fichiers. -if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) -{ +if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) { dol_syslog("Refused to deliver file ".$original_file); $file = basename($original_file); // Do no show plain path of original_file in shown error message dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file)); @@ -197,8 +202,7 @@ dol_syslog("index.php include $original_file $filename content-type=$type"); $original_file_osencoded = dol_osencode($original_file); // New file name encoded in OS encoding charset // This test if file exists should be useless. We keep it to find bug more easily -if (!file_exists($original_file_osencoded)) -{ +if (!file_exists($original_file_osencoded)) { // Return header 404 header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404); @@ -215,4 +219,6 @@ define('USEDOLIBARRSERVER', 1); print '<!-- Page content '.$original_file.' rendered with DOLIBARR SERVER : Html with CSS link and html header + Body that was saved into tpl dir -->'."\n"; include_once $original_file_osencoded; // Note: The pageXXX.tpl.php showed here contains a formatage with dolWebsiteOutput() at end of page. -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/public/website/styles.css.php b/htdocs/public/website/styles.css.php index 75257a8facc..a0002b5380b 100644 --- a/htdocs/public/website/styles.css.php +++ b/htdocs/public/website/styles.css.php @@ -21,14 +21,30 @@ * \brief Page to output style page. Called with <link rel="stylesheet" href="styles.css.php?websiteid=123" type="text/css" /> */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -if (!defined('NOLOGIN')) define("NOLOGIN", 1); -if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} /** * Header empty @@ -65,18 +81,18 @@ $type = ''; */ $appli = constant('DOL_APPLICATION_TITLE'); -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; +} //print 'Directory with '.$appli.' websites.<br>'; -if (empty($pageid)) -{ +if (empty($pageid)) { require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; $object = new Website($db); - if ($websiteid) - { + if ($websiteid) { $object->fetch($websiteid); $website = $object->ref; } else { @@ -85,21 +101,21 @@ if (empty($pageid)) $objectpage = new WebsitePage($db); /* Not required for CSS file - $array=$objectpage->fetchAll($object->id); + $array=$objectpage->fetchAll($object->id); - if (is_array($array) && count($array) > 0) - { - $firstrep=reset($array); - $pageid=$firstrep->id; - } - */ + if (is_array($array) && count($array) > 0) + { + $firstrep=reset($array); + $pageid=$firstrep->id; + } + */ } /* Not required for CSS file if (empty($pageid)) { - $langs->load("website"); - print $langs->trans("PreviewOfSiteNotYetAvailable"); - exit; + $langs->load("website"); + print $langs->trans("PreviewOfSiteNotYetAvailable"); + exit; } */ @@ -113,16 +129,14 @@ $refname = basename(dirname($original_file)."/"); // Security: // Limite acces si droits non corrects -if (!$accessallowed) -{ +if (!$accessallowed) { accessforbidden(); } // Security: // On interdit les remontees de repertoire ainsi que les pipe dans // les noms de fichiers. -if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) -{ +if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) { dol_syslog("Refused to deliver file ".$original_file); $file = basename($original_file); // Do no show plain path of original_file in shown error message dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $file)); @@ -138,8 +152,7 @@ dol_syslog("styles.css.php include $original_file $filename content-type=$type") $original_file_osencoded = dol_osencode($original_file); // New file name encoded in OS encoding charset // This test if file exists should be useless. We keep it to find bug more easily -if (!file_exists($original_file_osencoded)) -{ +if (!file_exists($original_file_osencoded)) { $langs->load("website"); print $langs->trans("RequestedPageHasNoContentYet", $pageid); //dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file)); @@ -153,4 +166,6 @@ print '/* Page content '.$original_file.' : CSS content that was saved into tpl require_once $original_file_osencoded; -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 66aa1b300b8..5ed59cf922b 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -44,13 +44,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->fournisseur->enabled)) { +if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +} +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.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.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; } -if (!empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +if (!empty($conf->productbatch->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; +} if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; @@ -58,30 +64,28 @@ if (!empty($conf->projet->enabled)) { $langs->loadLangs(array("receptions", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal', 'sendings')); -if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); -if (!empty($conf->productbatch->enabled)) $langs->load('productbatch'); +if (!empty($conf->incoterm->enabled)) { + $langs->load('incoterm'); +} +if (!empty($conf->productbatch->enabled)) { + $langs->load('productbatch'); +} $origin = GETPOST('origin', 'alpha') ?GETPOST('origin', 'alpha') : 'reception'; // Example: commande, propal $origin_id = GETPOST('id', 'int') ?GETPOST('id', 'int') : ''; $id = $origin_id; -if (empty($origin_id)) $origin_id = GETPOST('origin_id', 'int'); // Id of order or propal -if (empty($origin_id)) $origin_id = GETPOST('object_id', 'int'); // Id of order or propal -if (empty($origin_id)) $origin_id = GETPOST('originid', 'int'); // Id of order or propal +if (empty($origin_id)) { + $origin_id = GETPOST('origin_id', 'int'); // Id of order or propal +} +if (empty($origin_id)) { + $origin_id = GETPOST('object_id', 'int'); // Id of order or propal +} +if (empty($origin_id)) { + $origin_id = GETPOST('originid', 'int'); // Id of order or propal +} $ref = GETPOST('ref', 'alpha'); $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : ''; -// Security check -$socid = ''; -if ($user->socid) $socid = $user->socid; - -if ($origin == 'reception') $result = restrictedArea($user, $origin, $id); -else { - $result = restrictedArea($user, 'reception'); - if ($origin == 'supplierorder') { - if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) accessforbidden(); - } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) accessforbidden(); -} - $action = GETPOST('action', 'alpha'); //Select mail models is same action as presend if (GETPOST('modelselected')) { @@ -113,6 +117,25 @@ $permissiondellink = $user->rights->reception->creer; // Used by the include of $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_deliverymin', 'int'), 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int')); +// Security check +$socid = ''; +if ($user->socid) { + $socid = $user->socid; +} + +if ($origin == 'reception') { + $result = restrictedArea($user, $origin, $id); +} else { + $result = restrictedArea($user, 'reception'); + if ($origin == 'supplierorder') { + if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) { + accessforbidden(); + } + } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) { + accessforbidden(); + } +} + /* * Actions @@ -120,12 +143,12 @@ $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_d $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) - { +if (empty($reshook)) { + if ($cancel) { $action = ''; $object->fetch($id); // show reception also after canceling modification } @@ -133,25 +156,25 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once // Reopen - if ($action == 'reopen' && $user->rights->reception->creer) - { + if ($action == 'reopen' && $user->rights->reception->creer) { $object->fetch($id); $result = $object->reOpen(); } // Confirm back to draft status - if ($action == 'modif' && $user->rights->reception->creer) - { + if ($action == 'modif' && $user->rights->reception->creer) { $result = $object->setDraft($user); - if ($result >= 0) - { + if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -164,13 +187,11 @@ if (empty($reshook)) } // Set incoterm - if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) - { + if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } - if ($action == 'setref_supplier') - { + if ($action == 'setref_supplier') { $result = $object->fetch($id); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -186,32 +207,31 @@ if (empty($reshook)) } } - if ($action == 'update_extras') - { + 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Actions on extra fields $result = $object->insertExtraFields('RECEPTION_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } // Create reception - if ($action == 'add' && $user->rights->reception->creer) - { + if ($action == 'add' && $user->rights->reception->creer) { $error = 0; $predef = ''; @@ -231,9 +251,11 @@ if (empty($reshook)) // On va boucler sur chaque ligne du document d'origine pour completer objet reception // avec info diverses + qte a livrer - if ($object->origin == "supplierorder") + if ($object->origin == "supplierorder") { $classname = 'CommandeFournisseur'; - else $classname = ucfirst($object->origin); + } else { + $classname = ucfirst($object->origin); + } $objectsrc = new $classname($db); $objectsrc->fetch($object->origin_id); @@ -256,18 +278,15 @@ if (empty($reshook)) $totalqty = 0; $num = 0; - foreach ($_POST as $key => $value) - { + foreach ($_POST as $key => $value) { // without batch module enabled - if (strpos($key, 'qtyasked') !== false) - { + if (strpos($key, 'qtyasked') !== false) { $num++; } } - for ($i = 1; $i <= $num; $i++) - { + for ($i = 1; $i <= $num; $i++) { $idl = "idl".$i; $sub_qty = array(); @@ -280,23 +299,28 @@ if (empty($reshook)) //var_dump(GETPOST($qty,'int')); var_dump($_POST); var_dump($batch);exit; //reception line for product with no batch management and no multiple stock location - if (GETPOST($qty, 'int') > 0) - $totalqty += GETPOST($qty, 'int'); - + if (GETPOST($qty, 'alpha') > 0) { + $totalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); + } // Extrafields $array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i); } - if ($totalqty > 0) // There is at least one thing to ship - { + if ($totalqty > 0) { // There is at least one thing to ship //var_dump($_POST);exit; - for ($i = 1; $i <= $num; $i++) - { + for ($i = 1; $i <= $num; $i++) { $lineToTest = ''; + $lineId = GETPOST($idl, 'int'); foreach ($objectsrc->lines as $linesrc) { - if ($linesrc->id == GETPOST($idl, 'int')) $lineToTest = $linesrc; + if ($linesrc->id == $lineId) { + $lineToTest = $linesrc; + break; + } + } + if (empty($lineToTest)) { + continue; } $qty = "qtyl".$i; $comment = "comment".$i; @@ -306,8 +330,7 @@ if (empty($reshook)) $timeFormat = '%d/%m/%Y'; - if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->RECEPTION_GETS_ALL_ORDER_PRODUCTS)) - { + if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->RECEPTION_GETS_ALL_ORDER_PRODUCTS)) { $ent = "entl".$i; $idl = "idl".$i; @@ -320,10 +343,12 @@ if (empty($reshook)) $fk_product = $linesrc->fk_product; } - if ($entrepot_id < 0) + if ($entrepot_id < 0) { $entrepot_id = ''; - if (!($fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) + } + if (!($fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $entrepot_id = 0; + } $eatby = GETPOST($eatby, 'alpha'); $sellby = GETPOST($sellby, 'alpha'); $eatbydate = str_replace('/', '-', $eatby); @@ -331,8 +356,7 @@ if (empty($reshook)) $ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i], GETPOST($comment, 'alpha'), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch, 'alpha')); - if ($ret < 0) - { + if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -342,13 +366,13 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; - if (!$error) - { + if ($ret < 0) { + $error++; + } + if (!$error) { $ret = $object->create($user); // This create reception (like Odoo picking) and line of receptions. Stock movement will when validating reception. - if ($ret <= 0) - { + if ($ret <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -358,8 +382,7 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $db->commit(); header("Location: card.php?id=".$object->id); exit; @@ -370,25 +393,26 @@ if (empty($reshook)) } } elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))) - ) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))) + ) { $object->fetch_thirdparty(); $result = $object->valid($user); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($object->error), null, 'errors'); } else { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -397,71 +421,70 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } } - } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->reception->supprimer) { $result = $object->delete($user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/reception/index.php'); exit; } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - // TODO add alternative status - /*elseif ($action == 'reopen' && (! empty($user->rights->reception->creer) || ! empty($user->rights->reception->reception_advance->validate))) - { - $result = $object->setStatut(0); - if ($result < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - } - }*/ - elseif ($action == 'setdate_livraison' && $user->rights->reception->creer) - { + // TODO add alternative status + /*} elseif ($action == 'reopen' && (! empty($user->rights->reception->creer) || ! empty($user->rights->reception->reception_advance->validate))) { + $result = $object->setStatut(0); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + }*/ + } elseif ($action == 'setdate_livraison' && $user->rights->reception->creer) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int')); $object->fetch($id); $result = $object->setDeliveryDate($user, $datedelivery); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Action update - elseif ($action == 'settracking_number' || $action == 'settracking_url' + } elseif ($action == 'settracking_number' || $action == 'settracking_url' || $action == 'settrueWeight' || $action == 'settrueWidth' || $action == 'settrueHeight' || $action == 'settrueDepth' - || $action == 'setshipping_method_id') - { + || $action == 'setshipping_method_id') { + // Action update $error = 0; - if ($action == 'settracking_number') $object->tracking_number = trim(GETPOST('tracking_number', 'alpha')); - if ($action == 'settracking_url') $object->tracking_url = trim(GETPOST('tracking_url', 'int')); + if ($action == 'settracking_number') { + $object->tracking_number = trim(GETPOST('tracking_number', 'alpha')); + } + if ($action == 'settracking_url') { + $object->tracking_url = trim(GETPOST('tracking_url', 'int')); + } if ($action == 'settrueWeight') { $object->trueWeight = trim(GETPOST('trueWeight', 'int')); $object->weight_units = GETPOST('weight_units', 'int'); } - if ($action == 'settrueWidth') $object->trueWidth = trim(GETPOST('trueWidth', 'int')); + if ($action == 'settrueWidth') { + $object->trueWidth = trim(GETPOST('trueWidth', 'int')); + } if ($action == 'settrueHeight') { $object->trueHeight = trim(GETPOST('trueHeight', 'int')); $object->size_units = GETPOST('size_units', 'int'); } - if ($action == 'settrueDepth') $object->trueDepth = trim(GETPOST('trueDepth', 'int')); - if ($action == 'setshipping_method_id') $object->shipping_method_id = trim(GETPOST('shipping_method_id', 'int')); + if ($action == 'settrueDepth') { + $object->trueDepth = trim(GETPOST('trueDepth', 'int')); + } + if ($action == 'setshipping_method_id') { + $object->shipping_method_id = trim(GETPOST('shipping_method_id', 'int')); + } - if (!$error) - { - if ($object->update($user) >= 0) - { + if (!$error) { + if ($object->update($user) >= 0) { header("Location: card.php?id=".$object->id); exit; } @@ -469,78 +492,70 @@ if (empty($reshook)) } $action = ""; - } - - // Build document - elseif ($action == 'builddoc') // En get ou en post - { + } elseif ($action == 'builddoc') { + // Build document + // En get ou en post // Save last template used to generate document - if (GETPOST('model')) $object->setDocModel($user, GETPOST('model', 'alpha')); + if (GETPOST('model')) { + $object->setDocModel($user, GETPOST('model', 'alpha')); + } // Define output language $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 = $reception->thirdparty->default_lang; - if (!empty($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 = $reception->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - - // Delete file in doc form - elseif ($action == 'remove_file') - { + } elseif ($action == 'remove_file') { + // Delete file in doc form require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $upload_dir = $conf->reception->dir_output; $file = $upload_dir.'/'.GETPOST('file'); $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); - } elseif ($action == 'classifybilled') - { + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } + } elseif ($action == 'classifybilled') { $object->fetch($id); - $result = $object->set_billed(); + $result = $object->setBilled(); if ($result >= 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); } - } elseif ($action == 'classifyclosed') - { + } elseif ($action == 'classifyclosed') { $object->fetch($id); $result = $object->setClosed(); if ($result >= 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); } - } - - /* - * delete a line - */ - elseif ($action == 'deleteline' && !empty($line_id)) - { + } elseif ($action == 'deleteline' && !empty($line_id)) { + // delete a line $object->fetch($id); $lines = $object->lines; $line = new CommandeFournisseurDispatch($db); $num_prod = count($lines); - for ($i = 0; $i < $num_prod; $i++) - { - if ($lines[$i]->id == $line_id) - { + for ($i = 0; $i < $num_prod; $i++) { + if ($lines[$i]->id == $line_id) { // delete single warehouse line $line->id = $line_id; - if (!$error && $line->delete($user) < 0) - { + if (!$error && $line->delete($user) < 0) { $error++; } } @@ -553,13 +568,8 @@ if (empty($reshook)) } else { setEventMessages($line->error, $line->errors, 'errors'); } - } - - /* - * Update a line - */ - elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) - { + } elseif ($action == 'updateline' && $user->rights->reception->creer && GETPOST('save')) { + // Update a line // Clean parameters $qty = 0; $entrepot_id = 0; @@ -567,10 +577,8 @@ if (empty($reshook)) $lines = $object->lines; $num_prod = count($lines); - for ($i = 0; $i < $num_prod; $i++) - { - if ($lines[$i]->id == $line_id) // we have found line to update - { + for ($i = 0; $i < $num_prod; $i++) { + if ($lines[$i]->id == $line_id) { // we have found line to update $line = new CommandeFournisseurDispatch($db); $line->fetch($line_id); // Extrafields Lines @@ -581,8 +589,7 @@ if (empty($reshook)) $line->fk_product = $lines[$i]->fk_product; - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { // single warehouse reception line $stockLocation = "entl".$line_id; $qty = "qtyl".$line_id; @@ -607,8 +614,7 @@ if (empty($reshook)) $line->sellby = strtotime($sellbydate); } - if ($line->update($user) < 0) - { + if ($line->update($user) < 0) { setEventMessages($line->error, $line->errors, 'errors'); $error++; } @@ -618,8 +624,7 @@ if (empty($reshook)) $line->id = $line_id; $line->qty = GETPOST($qty, 'int'); $line->fk_entrepot = 0; - if ($line->update($user) < 0) - { + if ($line->update($user) < 0) { setEventMessages($line->error, $line->errors, 'errors'); $error++; } @@ -635,10 +640,12 @@ if (empty($reshook)) // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { $newlang = $object->thirdparty->default_lang; + } if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -659,7 +666,9 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails - if (empty($id)) $id = $facid; + if (empty($id)) { + $id = $facid; + } $triggersendname = 'RECEPTION_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromreception'; @@ -677,14 +686,15 @@ llxHeader('', $langs->trans('Reception'), 'Reception'); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $product_static = new Product($db); $reception_static = new Reception($db); $warehousestatic = new Entrepot($db); -if ($action == 'create2') -{ +if ($action == 'create2') { print load_fiche_titre($langs->trans("CreateReception"), '', 'dollyrevert'); print '<br>'.$langs->trans("ReceptionCreationIsDoneFromOrder"); @@ -692,31 +702,32 @@ if ($action == 'create2') } // Mode creation. -if ($action == 'create') -{ +if ($action == 'create') { $recept = new Reception($db); print load_fiche_titre($langs->trans("CreateReception")); - if (!$origin) - { + if (!$origin) { setEventMessages($langs->trans("ErrorBadParameters"), null, 'errors'); } - if ($origin) - { - if ($origin == 'supplierorder')$classname = 'CommandeFournisseur'; - else $classname = ucfirst($origin); + if ($origin) { + if ($origin == 'supplierorder') { + $classname = 'CommandeFournisseur'; + } else { + $classname = ucfirst($origin); + } $object = new $classname($db); - if ($object->fetch($origin_id)) // This include the fetch_lines - { + if ($object->fetch($origin_id)) { // This include the fetch_lines $soc = new Societe($db); $soc->fetch($object->socid); $author = new User($db); $author->fetch($object->user_author_id); - if (!empty($conf->stock->enabled)) $entrepot = new Entrepot($db); + if (!empty($conf->stock->enabled)) { + $entrepot = new Entrepot($db); + } print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -724,8 +735,7 @@ if ($action == 'create') print '<input type="hidden" name="origin" value="'.$origin.'">'; print '<input type="hidden" name="origin_id" value="'.$object->id.'">'; print '<input type="hidden" name="ref_int" value="'.$object->ref_int.'">'; - if (GETPOST('entrepot_id', 'int')) - { + if (GETPOST('entrepot_id', 'int')) { print '<input type="hidden" name="entrepot_id" value="'.GETPOST('entrepot_id', 'int').'">'; } @@ -735,12 +745,10 @@ if ($action == 'create') // Ref print '<tr><td class="titlefieldcreate fieldrequired">'; - if ($origin == 'supplierorder' && !empty($conf->fournisseur->enabled)) - { + if ($origin == 'supplierorder' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { print $langs->trans("RefOrder").'</td><td colspan="3"><a href="'.DOL_URL_ROOT.'/fourn/commande/card.php?id='.$object->id.'">'.img_object($langs->trans("ShowOrder"), 'order').' '.$object->ref; } - if ($origin == 'propal' && !empty($conf->propal->enabled)) - { + if ($origin == 'propal' && !empty($conf->propal->enabled)) { print $langs->trans("RefProposal").'</td><td colspan="3"><a href="'.DOL_URL_ROOT.'/comm/card.php?id='.$object->id.'">'.img_object($langs->trans("ShowProposal"), 'propal').' '.$object->ref; } print '</a></td>'; @@ -748,8 +756,11 @@ if ($action == 'create') // Ref client print '<tr><td>'; - if ($origin == 'supplier_order') print $langs->trans('SupplierOrder'); - else print $langs->trans('RefSupplier'); + if ($origin == 'supplier_order') { + print $langs->trans('SupplierOrder'); + } else { + print $langs->trans('RefSupplier'); + } print '</td><td colspan="3">'; print '<input type="text" name="ref_supplier" value="'.$object->ref_supplier.'" />'; print '</td>'; @@ -761,17 +772,20 @@ if ($action == 'create') print '</tr>'; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; - if (empty($projectid) && !empty($object->fk_project)) $projectid = $object->fk_project; - if ($origin == 'project') $projectid = ($originid ? $originid : 0); + if (empty($projectid) && !empty($object->fk_project)) { + $projectid = $object->fk_project; + } + if ($origin == 'project') { + $projectid = ($originid ? $originid : 0); + } $langs->load("projects"); print '<tr>'; print '<td>'.$langs->trans("Project").'</td><td colspan="2">'; $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); - print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>'; + print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>'; print '</td>'; print '</tr>'; } @@ -787,16 +801,15 @@ if ($action == 'create') // Note Public print '<tr><td>'.$langs->trans("NotePublic").'</td>'; print '<td colspan="3">'; - $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print "</td></tr>"; // Note Private - if ($object->note_private && !$user->socid) - { + if ($object->note_private && !$user->socid) { print '<tr><td>'.$langs->trans("NotePrivate").'</td>'; print '<td colspan="3">'; - $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print "</td></tr>"; } @@ -826,7 +839,9 @@ if ($action == 'create') print '<td colspan="3">'; $recept->fetch_delivery_methods(); print $form->selectarray("shipping_method_id", $recept->meths, GETPOST('shipping_method_id', 'int'), 1, 0, 0, "", 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print "</td></tr>\n"; // Tracking number @@ -851,8 +866,7 @@ if ($action == 'create') } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr>'; print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; @@ -862,13 +876,12 @@ if ($action == 'create') // Document model include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php'; - $liste = ModelePdfReception::liste_modeles($db); + $list = ModelePdfReception::liste_modeles($db); - if (count($liste) > 1) - { + if (count($list) > 1) { print "<tr><td>".$langs->trans("DefaultModel")."</td>"; print '<td colspan="3">'; - print $form->selectarray('model', $liste, $conf->global->RECEPTION_ADDON_PDF); + print $form->selectarray('model', $list, $conf->global->RECEPTION_ADDON_PDF); print "</td></tr>\n"; } @@ -880,11 +893,9 @@ if ($action == 'create') // Reception lines $numAsked = 0; $dispatchLines = array(); - foreach ($_POST as $key => $value) - { + foreach ($_POST as $key => $value) { // without batch module enabled - if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) - { + if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $numAsked++; // $numline=$reg[2] + 1; // line of product @@ -898,8 +909,7 @@ if ($action == 'create') } // with batch module enabled - if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) - { + if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $numAsked++; // eat-by date dispatch @@ -922,16 +932,14 @@ if ($action == 'create') jQuery(document).ready(function() { jQuery("#autofill").click(function() {'; $i = 1; - while ($i <= $numAsked) - { + while ($i <= $numAsked) { print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; $i++; } print '}); jQuery("#autoreset").click(function() {'; $i = 1; - while ($i <= $numAsked) - { + while ($i <= $numAsked) { print 'jQuery("#qtyl'.$i.'").val(0);'."\n"; $i++; } @@ -946,25 +954,21 @@ if ($action == 'create') // Load receptions already done for same order $object->loadReceptions(); - if ($numAsked) - { + if ($numAsked) { print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Description").'</td>'; print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; print '<td class="center">'.$langs->trans("QtyReceived").'</td>'; print '<td class="center">'.$langs->trans("QtyToReceive"); - if (empty($conf->productbatch->enabled)) - { + if (empty($conf->productbatch->enabled)) { print ' <br>(<a href="#" id="autofill">'.$langs->trans("Fill").'</a>'; print ' / <a href="#" id="autoreset">'.$langs->trans("Reset").'</a>)'; } print '</td>'; - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print '<td class="left">'.$langs->trans("batch_number").'</td>'; if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print '<td class="left">'.$langs->trans("EatByDate").'</td>'; @@ -977,8 +981,7 @@ if ($action == 'create') } $indiceAsked = 1; - while ($indiceAsked <= $numAsked) - { + while ($indiceAsked <= $numAsked) { $product = new Product($db); foreach ($object->lines as $supplierLine) { if ($dispatchLines[$indiceAsked]['fk_commandefourndet'] == $supplierLine->id) { @@ -992,16 +995,19 @@ if ($action == 'create') $type = $line->product_type ? $line->product_type : $line->fk_product_type; // Try to enhance type detection using date_start and date_end for free lines where type // was not saved. - if (!empty($line->date_start)) $type = 1; - if (!empty($line->date_end)) $type = 1; + if (!empty($line->date_start)) { + $type = 1; + } + if (!empty($line->date_end)) { + $type = 1; + } print '<!-- line '.$line->rowid.' for product -->'."\n"; print '<tr class="oddeven">'."\n"; // Product label - if ($line->fk_product > 0) // If predefined product - { + if ($line->fk_product > 0) { // If predefined product $product->fetch($line->fk_product); $product->load_stock('warehouseopen'); // Load all $product->stock_warehouse[idwarehouse]->detail_batch //var_dump($product->stock_warehouse[1]); @@ -1024,16 +1030,18 @@ if ($action == 'create') print_date_range($db->jdate($line->date_start), $db->jdate($line->date_end)); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : ''; } print '</td>'; } else { print "<td>"; - if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($line->label)) { $text .= ' <strong>'.$line->label.'</strong>'; @@ -1065,8 +1073,7 @@ if ($action == 'create') print '</td>'; - if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { + if ($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $quantityToBeDelivered = 0; } else { $quantityToBeDelivered = $dispatchLines[$indiceAsked]['qty']; @@ -1075,8 +1082,7 @@ if ($action == 'create') $warehouseObject = null; - if (!empty($conf->stock->enabled)) // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection - { + if (!empty($conf->stock->enabled)) { // If warehouse was already selected or if product is not a predefined, we go into this part with no multiwarehouse selection print '<!-- Case warehouse already known or product not a predefined product -->'; $stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number @@ -1084,26 +1090,26 @@ if ($action == 'create') // Quantity to send print '<td class="center">'; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - if (GETPOST('qtyl'.$indiceAsked, 'int')) $defaultqty = GETPOST('qtyl'.$indiceAsked, 'int'); + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if (GETPOST('qtyl'.$indiceAsked, 'int')) { + $defaultqty = GETPOST('qtyl'.$indiceAsked, 'int'); + } print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">'; - } else print $langs->trans("NA"); + } else { + print $langs->trans("NA"); + } print '</td>'; // Stock - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print '<td class="left">'; - if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Type of product need stock change ? - { + if ($line->product_type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { // Type of product need stock change ? // Show warehouse combo list $ent = "entl".$indiceAsked; $idl = "idl".$indiceAsked; $tmpentrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : $warehouse_id; - if ($line->fk_product > 0) - { + if ($line->fk_product > 0) { print '<!-- Show warehouse selection -->'; print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 0, 0, $line->fk_product, '', 1); } @@ -1113,18 +1119,16 @@ if ($action == 'create') print '</td>'; } - if (!empty($conf->productbatch->enabled)) - { - if (!empty($product->status_batch)) - { + if (!empty($conf->productbatch->enabled)) { + if (!empty($product->status_batch)) { print '<td><input name="batch'.$indiceAsked.'" value="'.$dispatchLines[$indiceAsked]['lot'].'"></td>'; if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { - print '<td>'; + print '<td class="nowraponall">'; print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc'.$indiceAsked, '', '', 1, ""); print '</td>'; } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { - print '<td>'; + print '<td class="nowraponall">'; print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo'.$indiceAsked, '', '', 1, ""); print '</td>'; } @@ -1136,10 +1140,11 @@ if ($action == 'create') } //Display lines extrafields - if (is_array($extralabelslines) && count($extralabelslines) > 0) - { + if (is_array($extralabelslines) && count($extralabelslines) > 0) { $colspan = 5; - if ($conf->productbatch->enabled) $colspan += 3; + if ($conf->productbatch->enabled) { + $colspan += 3; + } $srcLine = new CommandeFournisseurLigne($db); $line = new CommandeFournisseurDispatch($db); @@ -1176,21 +1181,18 @@ if ($action == 'create') dol_print_error($db); } } -} elseif ($id || $ref) -/* *************************************************************************** */ -/* */ -/* Edit and view mode */ -/* */ -/* *************************************************************************** */ -{ +} elseif ($id || $ref) { + /* *************************************************************************** */ + /* */ + /* Edit and view mode */ + /* */ + /* *************************************************************************** */ $lines = $object->lines; $num_prod = count($lines); - if ($object->id > 0) - { - if (!empty($object->origin) && $object->origin_id > 0) - { + if ($object->id > 0) { + if (!empty($object->origin) && $object->origin_id > 0) { $object->origin = 'CommandeFournisseur'; $typeobject = $object->origin; $origin = $object->origin; @@ -1209,17 +1211,14 @@ if ($action == 'create') $formconfirm = ''; // Confirm deleteion - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteReception'), $langs->trans("ConfirmDeleteReception", $object->ref), 'confirm_delete', '', 0, 1); } // Confirmation validation - if ($action == 'valid') - { + if ($action == 'valid') { $objectref = substr($object->ref, 1, 4); - if ($objectref == 'PROV') - { + if ($objectref == 'PROV') { $numref = $object->getNextNumRef($soc); } else { $numref = $object->ref; @@ -1227,8 +1226,7 @@ if ($action == 'create') $text = $langs->trans("ConfirmValidateReception", $numref); - if (!empty($conf->notification->enabled)) - { + if (!empty($conf->notification->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '<br>'; @@ -1239,16 +1237,18 @@ if ($action == 'create') } // Confirm cancelation - if ($action == 'annuler') - { + if ($action == 'annuler') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelReception'), $langs->trans("ConfirmCancelReception", $object->ref), 'confirm_cancel', '', 0, 1); } if (!$formconfirm) { $parameters = array('formConfirm' => $formconfirm); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } } // Print form confirm @@ -1262,18 +1262,15 @@ if ($action == 'create') $totalVolume = $tmparray['volume']; - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && !empty($conf->fournisseur->enabled)) - { + if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } @@ -1288,8 +1285,7 @@ if ($action == 'create') // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; if (0) { // Do not change on reception @@ -1335,8 +1331,7 @@ if ($action == 'create') print '<table class="border centpercent">'; // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { print '<tr><td>'; print $langs->trans("RefOrder").'</td>'; print '<td colspan="3">'; @@ -1344,8 +1339,7 @@ if ($action == 'create') print "</td>\n"; print '</tr>'; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { print '<tr><td>'; print $langs->trans("RefProposal").'</td>'; print '<td colspan="3">'; @@ -1353,8 +1347,7 @@ if ($action == 'create') print "</td>\n"; print '</tr>'; } - if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'CommandeFournisseur' && $object->$typeobject->id && !empty($conf->propal->enabled)) { print '<tr><td>'; print $langs->trans("SupplierOrder").'</td>'; print '<td colspan="3">'; @@ -1374,11 +1367,12 @@ if ($action == 'create') print $langs->trans('DateDeliveryPlanned'); print '</td>'; - if ($action != 'editdate_livraison') print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; + if ($action != 'editdate_livraison') { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editdate_livraison') - { + if ($action == 'editdate_livraison') { print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="setdate_livraison">'; @@ -1396,8 +1390,7 @@ if ($action == 'create') print $form->editfieldkey("Weight", 'trueWeight', $object->trueWeight, $object, $user->rights->reception->creer); print '</td><td colspan="3">'; - if ($action == 'edittrueWeight') - { + if ($action == 'edittrueWeight') { print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input name="action" value="settrueWeight" type="hidden">'; print '<input name="id" value="'.$object->id.'" type="hidden">'; @@ -1413,11 +1406,14 @@ if ($action == 'create') } // Calculated - if ($totalWeight > 0) - { - if (!empty($object->trueWeight)) print ' ('.$langs->trans("SumOfProductWeights").': '; + if ($totalWeight > 0) { + if (!empty($object->trueWeight)) { + print ' ('.$langs->trans("SumOfProductWeights").': '; + } print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, isset($conf->global->MAIN_WEIGHT_DEFAULT_ROUND) ? $conf->global->MAIN_WEIGHT_DEFAULT_ROUND : -1, isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); - if (!empty($object->trueWeight)) print ')'; + if (!empty($object->trueWeight)) { + print ')'; + } } print '</td></tr>'; @@ -1429,8 +1425,7 @@ if ($action == 'create') // Height print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->rights->reception->creer).'</td><td colspan="3">'; - if ($action == 'edittrueHeight') - { + if ($action == 'edittrueHeight') { print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input name="action" value="settrueHeight" type="hidden">'; print '<input name="id" value="'.$object->id.'" type="hidden">'; @@ -1460,25 +1455,27 @@ if ($action == 'create') print '<td colspan="3">'; $calculatedVolume = 0; $volumeUnit = 0; - if ($object->trueWidth && $object->trueHeight && $object->trueDepth) - { + if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { $calculatedVolume = ($object->trueWidth * $object->trueHeight * $object->trueDepth); $volumeUnit = $object->size_units * 3; } // If reception volume not defined we use sum of products - if ($calculatedVolume > 0) - { - if ($volumeUnit < 50) - { + if ($calculatedVolume > 0) { + if ($volumeUnit < 50) { print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); - } else print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); + } else { + print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); + } } - if ($totalVolume > 0) - { - if ($calculatedVolume) print ' ('.$langs->trans("SumOfProductVolumes").': '; + if ($totalVolume > 0) { + if ($calculatedVolume) { + print ' ('.$langs->trans("SumOfProductVolumes").': '; + } print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, isset($conf->global->MAIN_VOLUME_DEFAULT_ROUND) ? $conf->global->MAIN_VOLUME_DEFAULT_ROUND : -1, isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; - if ($calculatedVolume) print ')'; + if ($calculatedVolume) { + print ')'; + } } print "</td>\n"; print '</tr>'; @@ -1503,22 +1500,24 @@ if ($action == 'create') print $langs->trans('ReceptionMethod'); print '</td>'; - if ($action != 'editshipping_method_id') print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&amp;id='.$object->id.'">'.img_edit($langs->trans('SetReceptionMethod'), 1).'</a></td>'; + if ($action != 'editshipping_method_id') { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&amp;id='.$object->id.'">'.img_edit($langs->trans('SetReceptionMethod'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="2">'; - if ($action == 'editshipping_method_id') - { + if ($action == 'editshipping_method_id') { print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="setshipping_method_id">'; $object->fetch_delivery_methods(); print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">'; print '</form>'; } else { - if ($object->shipping_method_id > 0) - { + if ($object->shipping_method_id > 0) { // Get code using getLabelFromKey $code = $langs->getLabelFromKey($db, $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); print $langs->trans("SendingMethod".strtoupper($code)); @@ -1534,19 +1533,20 @@ if ($action == 'create') print '</td></tr>'; // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>'; print $langs->trans('IncotermLabel'); print '<td><td class="right">'; - if ($user->rights->reception->creer) print '<a class="editfielda" href="'.DOL_URL_ROOT.'/reception/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; - else print '&nbsp;'; + if ($user->rights->reception->creer) { + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/reception/card.php?id='.$object->id.'&action=editincoterm">'.img_edit().'</a>'; + } else { + print '&nbsp;'; + } print '</td></tr></table>'; print '</td>'; print '<td colspan="3">'; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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); @@ -1564,8 +1564,7 @@ if ($action == 'create') // Lines of products - if ($action == 'editline') - { + if ($action == 'editline') { print '<form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;lineid='.$line_id.'" method="POST"> <input type="hidden" name="token" value="' . newToken().'"> <input type="hidden" name="action" value="updateline"> @@ -1578,8 +1577,7 @@ if ($action == 'create') print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; // # - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td width="5" class="center">&nbsp;</td>'; } // Product/Service @@ -1588,53 +1586,48 @@ if ($action == 'create') print '<td>'.$langs->trans("Description").'</td>'; // Qty print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { print '<td class="center">'.$langs->trans("QtyInOtherReceptions").'</td>'; } - if ($action == 'editline') - { + if ($action == 'editline') { $editColspan = 3; - if (empty($conf->stock->enabled)) $editColspan--; - if (empty($conf->productbatch->enabled)) $editColspan--; + if (empty($conf->stock->enabled)) { + $editColspan--; + } + if (empty($conf->productbatch->enabled)) { + $editColspan--; + } print '<td class="center" colspan="'.$editColspan.'">'; - if ($object->statut <= 1) - { + if ($object->statut <= 1) { print $langs->trans("QtyToReceive").' - '; } else { print $langs->trans("QtyReceived").' - '; } - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print $langs->trans("WarehouseSource").' - '; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print $langs->trans("Batch"); } print '</td>'; } else { - if ($object->statut <= 1) - { + if ($object->statut <= 1) { print '<td class="center">'.$langs->trans("QtyToReceive").'</td>'; } else { print '<td class="center">'.$langs->trans("QtyReceived").'</td>'; } - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print '<td class="left">'.$langs->trans("WarehouseSource").'</td>'; } - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print '<td class="left">'.$langs->trans("Batch").'</td>'; } } print '<td class="center">'.$langs->trans("CalculatedWeight").'</td>'; print '<td class="center">'.$langs->trans("CalculatedVolume").'</td>'; //print '<td class="center">'.$langs->trans("Size").'</td>'; - if ($object->statut == 0) - { + if ($object->statut == 0) { print '<td class="linecoledit"></td>'; print '<td class="linecoldelete" width="10"></td>'; } @@ -1642,15 +1635,17 @@ if ($action == 'create') $var = false; - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $object->fetch_thirdparty(); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $object->thirdparty->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -1661,8 +1656,7 @@ if ($action == 'create') $origin = 'commande_fournisseur'; - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end"; $sql .= ", ed.rowid as receptionline_id, ed.qty, ed.fk_reception as reception_id, ed.fk_entrepot"; $sql .= ", e.rowid as reception_id, e.ref as reception_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_reception"; @@ -1684,16 +1678,13 @@ if ($action == 'create') dol_syslog("get list of reception lines", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { // $obj->rowid is rowid in $origin."det" table $alreadysent[$obj->rowid][$obj->receptionline_id] = array('reception_ref'=>$obj->reception_ref, 'reception_id'=>$obj->reception_id, 'warehouse'=>$obj->fk_entrepot, 'qty'=>$obj->qty, 'date_valid'=>$obj->date_valid, 'date_delivery'=>$obj->date_delivery); } @@ -1704,27 +1695,25 @@ if ($action == 'create') } // Loop on each product to send/sent - for ($i = 0; $i < $num_prod; $i++) - { + for ($i = 0; $i < $num_prod; $i++) { print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line print '<tr class="oddeven">'; // # - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) - { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print '<td class="center">'.($i + 1).'</td>'; } // Predefined product or service - if ($lines[$i]->fk_product > 0) - { + if ($lines[$i]->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($lines[$i]->fk_product); $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $lines[$i]->product->label; - } else $label = (!empty($lines[$i]->product->label) ? $lines[$i]->product->label : $lines[$i]->product->product_label); + } else { + $label = (!empty($lines[$i]->product->label) ? $lines[$i]->product->label : $lines[$i]->product->product_label); + } print '<td>'; @@ -1733,15 +1722,17 @@ if ($action == 'create') $description = (!empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($lines[$i]->product->description)); print $form->textwithtooltip($text, $description, 3, '', '', $i); print_date_range($lines[$i]->date_start, $lines[$i]->date_end); - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($lines[$i]->product->description) && $lines[$i]->description != $lines[$i]->product->description) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : ''; } print "</td>\n"; } else { print "<td>"; - if ($lines[$i]->product_type == Product::TYPE_SERVICE) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if ($lines[$i]->product_type == Product::TYPE_SERVICE) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($lines[$i]->label)) { $text .= ' <strong>'.$lines[$i]->label.'</strong>'; @@ -1754,8 +1745,7 @@ if ($action == 'create') print "</td>\n"; } - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { print '<td><textarea name="comment'.$line_id.'" id="comment'.$line_id.'" /> '.$lines[$i]->comment.'</textarea></td>'; } else { print '<td style="white-space: pre-wrap;max-width: 200px;" >'.$lines[$i]->comment.'</td>'; @@ -1766,27 +1756,26 @@ if ($action == 'create') print '<td class="center">'.$lines[$i]->qty_asked.'</td>'; // Qty in other receptions (with reception and warehouse used) - if ($origin && $origin_id > 0) - { + if ($origin && $origin_id > 0) { print '<td class="center nowrap">'; - foreach ($alreadysent as $key => $val) - { - if ($lines[$i]->fk_commandefourndet == $key) - { + foreach ($alreadysent as $key => $val) { + if ($lines[$i]->fk_commandefourndet == $key) { $j = 0; - foreach ($val as $receptionline_id=> $receptionline_var) - { - if ($receptionline_var['reception_id'] == $lines[$i]->fk_reception) continue; // We want to show only "other receptions" + foreach ($val as $receptionline_id => $receptionline_var) { + if ($receptionline_var['reception_id'] == $lines[$i]->fk_reception) { + continue; // We want to show only "other receptions" + } $j++; - if ($j > 1) print '<br>'; + if ($j > 1) { + print '<br>'; + } $reception_static->fetch($receptionline_var['reception_id']); print $reception_static->getNomUrl(1); print ' - '.$receptionline_var['qty']; $htmltext = $langs->trans("DateValidation").' : '.(empty($receptionline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($receptionline_var['date_valid'], 'dayhour')); - if (!empty($conf->stock->enabled) && $receptionline_var['warehouse'] > 0) - { + if (!empty($conf->stock->enabled) && $receptionline_var['warehouse'] > 0) { $warehousestatic->fetch($receptionline_var['warehouse']); $htmltext .= '<br>'.$langs->trans("From").' : '.$warehousestatic->getNomUrl(1); } @@ -1797,14 +1786,11 @@ if ($action == 'create') } print '</td>'; - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { // edit mode print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding">'; - if (!empty($conf->stock->enabled)) - { - if ($lines[$i]->fk_product > 0) - { + if (!empty($conf->stock->enabled)) { + if ($lines[$i]->fk_product > 0) { print '<!-- case edit 1 -->'; print '<tr>'; // Qty to receive or received @@ -1812,9 +1798,8 @@ if ($action == 'create') // Warehouse source print '<td>'.$formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).'</td>'; // Batch number managment - if ($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)) - { - print '<td> <input name="batch'.$line_id.'" id="batch'.$line_id.'" type="text" value="'.$lines[$i]->batch.'"> </br>'; + if ($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)) { + print '<td class="nowraponall"><input name="batch'.$line_id.'" id="batch'.$line_id.'" type="text" value="'.$lines[$i]->batch.'"></br>'; if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print $langs->trans('EatByDate').' : '; print $form->selectDate($lines[$i]->eatby, 'dlc'.$line_id, '', '', 1, "").'</br>'; @@ -1844,12 +1829,10 @@ if ($action == 'create') print '<td class="center">'.$lines[$i]->qty.'</td>'; // Warehouse source - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { print '<td class="left">'; - if ($lines[$i]->fk_entrepot > 0) - { + if ($lines[$i]->fk_entrepot > 0) { $entrepot = new Entrepot($db); $entrepot->fetch($lines[$i]->fk_entrepot); print $entrepot->getNomUrl(1); @@ -1859,15 +1842,12 @@ if ($action == 'create') } // Batch number managment - if (!empty($conf->productbatch->enabled)) - { - if (isset($lines[$i]->batch)) - { + if (!empty($conf->productbatch->enabled)) { + if (isset($lines[$i]->batch)) { print '<!-- Detail of lot -->'; print '<td>'; $detail = ''; - if ($lines[$i]->product->status_batch) - { + if ($lines[$i]->product->status_batch) { $detail .= $langs->trans("Batch").': '.$lines[$i]->batch; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($lines[$i]->sellby, "day"); @@ -1890,24 +1870,28 @@ if ($action == 'create') // Weight print '<td class="center">'; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->weight * $lines[$i]->qty.' '.measuringUnitString(0, "weight", $lines[$i]->product->weight_units); - else print '&nbsp;'; + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { + print $lines[$i]->product->weight * $lines[$i]->qty.' '.measuringUnitString(0, "weight", $lines[$i]->product->weight_units); + } else { + print '&nbsp;'; + } print '</td>'; // Volume print '<td class="center">'; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->product->volume * $lines[$i]->qty.' '.measuringUnitString(0, "volume", $lines[$i]->product->volume_units); - else print '&nbsp;'; + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { + print $lines[$i]->product->volume * $lines[$i]->qty.' '.measuringUnitString(0, "volume", $lines[$i]->product->volume_units); + } else { + print '&nbsp;'; + } print '</td>'; - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { print '<td class="center" colspan="2" valign="middle">'; print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>'; print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>'; - } elseif ($object->statut == Reception::STATUS_DRAFT) - { + } elseif ($object->statut == Reception::STATUS_DRAFT) { // edit-delete buttons print '<td class="linecoledit center">'; print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;token='.newToken().'&amp;lineid='.$lines[$i]->id.'">'.img_edit().'</a>'; @@ -1917,8 +1901,7 @@ if ($action == 'create') print '</td>'; // Display lines extrafields - if (!empty($rowExtrafieldsStart)) - { + if (!empty($rowExtrafieldsStart)) { print $rowExtrafieldsStart; print $rowExtrafieldsView; print $rowEnd; @@ -1927,15 +1910,13 @@ if ($action == 'create') print "</tr>"; // Display lines extrafields - if (is_array($extralabelslines) && count($extralabelslines) > 0) - { + if (is_array($extralabelslines) && count($extralabelslines) > 0) { $colspan = empty($conf->productbatch->enabled) ? 8 : 9; $line = new CommandeFournisseurDispatch($db); $line->id = $lines[$i]->id; $line->fetch_optionals(); - if ($action == 'editline' && $lines[$i]->id == $line_id) - { + if ($action == 'editline' && $lines[$i]->id == $line_id) { print $line->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked); } else { print $line->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked); @@ -1960,19 +1941,15 @@ if ($action == 'create') * Boutons actions */ - if (($user->socid == 0) && ($action != 'presend')) - { + if (($user->socid == 0) && ($action != 'presend')) { print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { - if ($object->statut == Reception::STATUS_DRAFT && $num_prod > 0) - { + if (empty($reshook)) { + if ($object->statut == Reception::STATUS_DRAFT && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>'; } else { print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans("Validate").'</a>'; @@ -1985,10 +1962,8 @@ if ($action == 'create') // TODO add alternative status // 0=draft, 1=validated, 2=billed, we miss a status "delivered" (only available on order) - if ($object->statut == Reception::STATUS_CLOSED && $user->rights->reception->creer) - { - if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - { + if ($object->statut == Reception::STATUS_CLOSED && $user->rights->reception->creer) { + if (!empty($conf->facture->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("ClassifyUnbilled").'</a>'; } else { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("ReOpen").'</a>'; @@ -1997,20 +1972,18 @@ if ($action == 'create') // Send if (empty($user->socid)) { - if ($object->statut > 0) - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->reception->reception_advance->send) - { + if ($object->statut > 0) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->reception->reception_advance->send) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendByMail').'</a>'; - } else print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>'; + } else { + print '<a class="butActionRefused" href="#">'.$langs->trans('SendByMail').'</a>'; + } } } // Create bill - if (!empty($conf->fournisseur->enabled) && ($object->statut == Reception::STATUS_VALIDATED || $object->statut == Reception::STATUS_CLOSED)) - { - if ($user->rights->fournisseur->facture->creer) - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) && ($object->statut == Reception::STATUS_VALIDATED || $object->statut == Reception::STATUS_CLOSED)) { + if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { // TODO show button only if (! empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) // If we do that, we must also make this option official. print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; @@ -2019,14 +1992,11 @@ if ($action == 'create') // Close - if ($object->statut == Reception::STATUS_VALIDATED) - { - if ($user->rights->reception->creer && $object->statut > 0 && !$object->billed) - { + if ($object->statut == Reception::STATUS_VALIDATED) { + if ($user->rights->reception->creer && $object->statut > 0 && !$object->billed) { $label = "Close"; $paramaction = 'classifyclosed'; // = Transferred/Received // Label here should be "Close" or "ClassifyBilled" if we decided to make bill on receptions instead of orders - if (!empty($conf->fournisseur->enabled) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? - { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? $label = "ClassifyBilled"; $paramaction = 'classifybilled'; } @@ -2034,8 +2004,7 @@ if ($action == 'create') } } - if ($user->rights->reception->supprimer) - { + if ($user->rights->reception->supprimer) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans("Delete").'</a>'; } } @@ -2048,8 +2017,7 @@ if ($action == 'create') * Documents generated */ - if ($action != 'presend' && $action != 'editline') - { + if ($action != 'presend' && $action != 'editline') { print '<div class="fichecenter"><div class="fichehalfleft">'; $objectref = dol_sanitizeFileName($object->ref); diff --git a/htdocs/reception/class/index.html b/htdocs/reception/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index ef12d844ddc..946990f0c7b 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -35,8 +35,12 @@ 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'; -if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +if (!empty($conf->propal->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +} +if (!empty($conf->commande->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +} /** @@ -156,8 +160,7 @@ class Reception extends CommonObject global $langs, $conf; $langs->load("receptions"); - if (!empty($conf->global->RECEPTION_ADDON_NUMBER)) - { + if (!empty($conf->global->RECEPTION_ADDON_NUMBER)) { $mybool = false; $file = $conf->global->RECEPTION_ADDON_NUMBER.".php"; @@ -173,8 +176,7 @@ class Reception extends CommonObject $mybool |= @include_once $dir.$file; } - if (!$mybool) - { + if (!$mybool) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -184,8 +186,7 @@ class Reception extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { dol_print_error($this->db, get_class($this)."::getNextNumRef ".$obj->error); @@ -216,9 +217,15 @@ class Reception extends CommonObject // Clean parameters $this->brouillon = 1; $this->tracking_number = dol_sanitizeFileName($this->tracking_number); - if (empty($this->fk_project)) $this->fk_project = 0; - if (empty($this->weight_units)) $this->weight_units = 0; - if (empty($this->size_units)) $this->size_units = 0; + if (empty($this->fk_project)) { + $this->fk_project = 0; + } + if (empty($this->weight_units)) { + $this->weight_units = 0; + } + if (empty($this->size_units)) { + $this->size_units = 0; + } $this->user = $user; @@ -276,8 +283,7 @@ class Reception extends CommonObject $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."reception"); $sql = "UPDATE ".MAIN_DB_PREFIX."reception"; @@ -285,51 +291,46 @@ class Reception extends CommonObject $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Insert of lines $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $this->lines[$i]->fk_reception = $this->id; - if (!$this->lines[$i]->create($user) > 0) - { + if (!$this->lines[$i]->create($user) > 0) { $error++; } } - if (!$error && $this->id && $this->origin_id) - { + if (!$error && $this->id && $this->origin_id) { $ret = $this->add_object_linked(); - if (!$ret) - { + if (!$ret) { $error++; } } // Create extrafields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('RECEPTION_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -366,7 +367,9 @@ class Reception extends CommonObject global $conf; // Check parameters - if (empty($id) && empty($ref) && empty($ref_ext)) return -1; + if (empty($id) && empty($ref) && empty($ref_ext)) { + return -1; + } $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_supplier, e.ref_ext, e.fk_user_author, e.fk_statut"; $sql .= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; @@ -380,17 +383,23 @@ class Reception extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = '".$this->db->escape($this->element)."'"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON e.fk_incoterms = i.rowid'; $sql .= " WHERE e.entity IN (".getEntity('reception').")"; - if ($id) $sql .= " AND e.rowid=".$id; - if ($ref) $sql .= " AND e.ref='".$this->db->escape($ref)."'"; - if ($ref_ext) $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; - if ($notused) $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; + if ($id) { + $sql .= " AND e.rowid=".((int) $id); + } + if ($ref) { + $sql .= " AND e.ref='".$this->db->escape($ref)."'"; + } + if ($ref_ext) { + $sql .= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; + } + if ($notused) { + $sql .= " AND e.ref_int='".$this->db->escape($notused)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -437,7 +446,9 @@ class Reception extends CommonObject $this->db->free($result); - if ($this->statut == 0) $this->brouillon = 1; + if ($this->statut == 0) { + $this->brouillon = 1; + } $file = $conf->reception->dir_output."/".get_exdir($this->id, 2, 0, 0, $this, 'reception')."/".$this->id.".pdf"; $this->pdf_filename = $file; @@ -462,8 +473,7 @@ class Reception extends CommonObject * Lines */ $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } @@ -495,15 +505,13 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::valid"); // Protection - if ($this->statut) - { + if ($this->statut) { dol_syslog(get_class($this)."::valid no draft status", LOG_WARNING); return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate)))) { $this->error = 'Permission denied'; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; @@ -519,8 +527,7 @@ class Reception extends CommonObject // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) { // empty should not happened, but when it occurs, the test save life $numref = $this->getNextNumRef($soc); } else { $numref = $this->ref; @@ -539,15 +546,13 @@ class Reception extends CommonObject $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::valid update reception", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $error++; } // If stock increment is done on reception (recommanded choice) - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -564,24 +569,23 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); $qty = $obj->qty; - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); //var_dump($this->lines[$i]); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->batch)) - { + if (empty($obj->batch)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. @@ -616,48 +620,45 @@ class Reception extends CommonObject // Change status of order to "reception in process" $ret = $this->setStatut(4, $this->origin_id, 'commande_fournisseur'); - if (!$ret) - { + if (!$ret) { $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('RECEPTION_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'reception/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'reception/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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($numref); $dirsource = $conf->reception->dir_output.'/'.$oldref; $dirdest = $conf->reception->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->reception->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -670,19 +671,16 @@ class Reception extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $numref; $this->statut = 1; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { - foreach ($this->errors as $errmsg) - { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::valid ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -722,12 +720,10 @@ class Reception extends CommonObject $supplierorderline = new CommandeFournisseurLigne($this->db); $supplierorderline->fetch($id); - if (!empty($conf->stock->enabled) && !empty($supplierorderline->fk_product)) - { + if (!empty($conf->stock->enabled) && !empty($supplierorderline->fk_product)) { $fk_product = $supplierorderline->fk_product; - if (!($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_RECEPTIONS)) - { + if (!($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_RECEPTIONS)) { $langs->load("errors"); $this->error = $langs->trans("ErrorWarehouseRequiredIntoReceptionLine"); return -1; @@ -736,8 +732,7 @@ class Reception extends CommonObject // extrafields $line->array_options = $supplierorderline->array_options; - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) - { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { foreach ($array_options as $key => $value) { $line->array_options[$key] = $value; } @@ -773,24 +768,60 @@ class Reception extends CommonObject // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->entity)) $this->entity = trim($this->entity); - if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); - if (isset($this->socid)) $this->socid = trim($this->socid); - if (isset($this->fk_user_author)) $this->fk_user_author = trim($this->fk_user_author); - if (isset($this->fk_user_valid)) $this->fk_user_valid = trim($this->fk_user_valid); - if (isset($this->shipping_method_id)) $this->shipping_method_id = trim($this->shipping_method_id); - if (isset($this->tracking_number)) $this->tracking_number = trim($this->tracking_number); - if (isset($this->statut)) $this->statut = (int) $this->statut; - if (isset($this->trueDepth)) $this->trueDepth = trim($this->trueDepth); - if (isset($this->trueWidth)) $this->trueWidth = trim($this->trueWidth); - if (isset($this->trueHeight)) $this->trueHeight = trim($this->trueHeight); - if (isset($this->size_units)) $this->size_units = trim($this->size_units); - if (isset($this->weight_units)) $this->weight_units = trim($this->weight_units); - if (isset($this->trueWeight)) $this->weight = trim($this->trueWeight); - 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->model_pdf)) $this->model_pdf = trim($this->model_pdf); + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->entity)) { + $this->entity = trim($this->entity); + } + if (isset($this->ref_supplier)) { + $this->ref_supplier = trim($this->ref_supplier); + } + if (isset($this->socid)) { + $this->socid = trim($this->socid); + } + if (isset($this->fk_user_author)) { + $this->fk_user_author = trim($this->fk_user_author); + } + if (isset($this->fk_user_valid)) { + $this->fk_user_valid = trim($this->fk_user_valid); + } + if (isset($this->shipping_method_id)) { + $this->shipping_method_id = trim($this->shipping_method_id); + } + if (isset($this->tracking_number)) { + $this->tracking_number = trim($this->tracking_number); + } + if (isset($this->statut)) { + $this->statut = (int) $this->statut; + } + if (isset($this->trueDepth)) { + $this->trueDepth = trim($this->trueDepth); + } + if (isset($this->trueWidth)) { + $this->trueWidth = trim($this->trueWidth); + } + if (isset($this->trueHeight)) { + $this->trueHeight = trim($this->trueHeight); + } + if (isset($this->size_units)) { + $this->size_units = trim($this->size_units); + } + if (isset($this->weight_units)) { + $this->weight_units = trim($this->weight_units); + } + if (isset($this->trueWeight)) { + $this->weight = trim($this->trueWeight); + } + 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->model_pdf)) { + $this->model_pdf = trim($this->model_pdf); + } // Check parameters @@ -822,30 +853,30 @@ class Reception extends CommonObject $sql .= " model_pdf=".(isset($this->modelpdf) ? "'".$this->db->escape($this->modelpdf)."'" : "null").","; $sql .= " entity=".$conf->entity; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('RECEPTION_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -875,8 +906,7 @@ class Reception extends CommonObject $this->db->begin(); // Stock control - if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) - { + if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) { require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; $langs->load("agenda"); @@ -890,11 +920,9 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::delete select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { dol_syslog(get_class($this)."::delete movement index ".$i); $obj = $this->db->fetch_object($resql); @@ -909,8 +937,7 @@ class Reception extends CommonObject } } - if (!$error) - { + if (!$error) { $main = MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; $ef = $main."_extrafields"; $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_reception = ".$this->id.")"; @@ -918,61 +945,53 @@ class Reception extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch"; $sql .= " WHERE fk_reception = ".$this->id; - if ($this->db->query($sqlef) && $this->db->query($sql)) - { + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."reception"; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Call trigger $result = $this->call_trigger('RECEPTION_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!empty($this->origin) && $this->origin_id > 0) - { + if (!empty($this->origin) && $this->origin_id > 0) { $this->fetch_origin(); $origin = $this->origin; - if ($this->$origin->statut == 4) // If order source of reception is "partially received" - { + if ($this->$origin->statut == 4) { // If order source of reception is "partially received" // Check if there is no more reception. If not, we can move back status of order to "validated" instead of "reception in progress" $this->$origin->loadReceptions(); //var_dump($this->$origin->receptions);exit; - if (count($this->$origin->receptions) <= 0) - { + if (count($this->$origin->receptions) <= 0) { $this->$origin->setStatut(3); // ordered } } } - if (!$error) - { + if (!$error) { $this->db->commit(); // We delete PDFs $ref = dol_sanitizeFileName($this->ref); - if (!empty($conf->reception->dir_output)) - { + if (!empty($conf->reception->dir_output)) { $dir = $conf->reception->dir_output.'/'.$ref; $file = $dir.'/'.$ref.'.pdf'; - if (file_exists($file)) - { - if (!dol_delete_file($file)) - { + if (file_exists($file)) { + if (!dol_delete_file($file)) { return 0; } } - if (file_exists($dir)) - { - if (!dol_delete_dir_recursive($dir)) - { + if (file_exists($dir)) { + if (!dol_delete_dir_recursive($dir)) { $this->error = $langs->trans("ErrorCanNotDeleteDir", $dir); return 0; } @@ -1081,13 +1100,13 @@ class Reception extends CommonObject $url = DOL_URL_ROOT.'/reception/card.php?id='.$this->id; - if ($short) return $url; + if ($short) { + return $url; + } $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("Reception"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -1099,8 +1118,12 @@ class Reception extends CommonObject $linkstart .= $linkclose.'>'; $linkend = '</a>'; - if ($withpicto) $result .= ($linkstart.img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto) { + $result .= ($linkstart.img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } $result .= $linkstart.$this->ref.$linkend; return $result; } @@ -1133,8 +1156,12 @@ class Reception extends CommonObject $labelStatusShort = $langs->trans($this->statutshorts[$status]); $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } + if ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -1165,12 +1192,10 @@ class Reception extends CommonObject $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -1206,8 +1231,7 @@ class Reception extends CommonObject $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new CommandeFournisseurDispatch($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->libelle = $langs->trans("Description")." ".$xnbp; @@ -1230,16 +1254,14 @@ class Reception extends CommonObject public function setDeliveryDate($user, $delivery_date) { // phpcs:enable - if ($user->rights->reception->creer) - { + if ($user->rights->reception->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."reception"; $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null'); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::setDeliveryDate", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->date_delivery = $delivery_date; return 1; } else { @@ -1269,10 +1291,8 @@ class Reception extends CommonObject $sql .= " ORDER BY em.libelle ASC"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $label = $langs->trans('ReceptionMethod'.$obj->code); $this->meths[$obj->rowid] = ($label != 'ReceptionMethod'.$obj->code ? $label : $obj->libelle); } @@ -1296,7 +1316,9 @@ class Reception extends CommonObject $sql = "SELECT em.rowid, em.code, em.libelle, em.description, em.tracking, em.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - if ($id != '') $sql .= " WHERE em.rowid=".$id; + if ($id != '') { + $sql .= " WHERE em.rowid = ".((int) $id); + } $resql = $this->db->query($sql); if ($resql) { @@ -1324,8 +1346,7 @@ class Reception extends CommonObject public function update_delivery_method($id = '') { // phpcs:enable - if ($id == '') - { + if ($id == '') { $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_shipment_mode (code, libelle, description, tracking)"; $sql .= " VALUES ('".$this->db->escape($this->update['code'])."','".$this->db->escape($this->update['libelle'])."','".$this->db->escape($this->update['description'])."','".$this->db->escape($this->update['tracking'])."')"; $resql = $this->db->query($sql); @@ -1335,10 +1356,12 @@ class Reception extends CommonObject $sql .= ",libelle='".$this->db->escape($this->update['libelle'])."'"; $sql .= ",description='".$this->db->escape($this->update['description'])."'"; $sql .= ",tracking='".$this->db->escape($this->update['tracking'])."'"; - $sql .= " WHERE rowid=".$id; + $sql .= " WHERE rowid=".((int) $id); $resql = $this->db->query($sql); } - if ($resql < 0) dol_print_error($this->db, ''); + if ($resql < 0) { + dol_print_error($this->db, ''); + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -1384,24 +1407,20 @@ class Reception extends CommonObject */ public function getUrlTrackingStatus($value = '') { - if (!empty($this->shipping_method_id)) - { + if (!empty($this->shipping_method_id)) { $sql = "SELECT em.code, em.tracking"; $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; - $sql .= " WHERE em.rowid = ".$this->shipping_method_id; + $sql .= " WHERE em.rowid = ".((int) $this->shipping_method_id); $resql = $this->db->query($sql); - if ($resql) - { - if ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + if ($obj = $this->db->fetch_object($resql)) { $tracking = $obj->tracking; } } } - if (!empty($tracking) && !empty($value)) - { + if (!empty($tracking) && !empty($value)) { $url = str_replace('{TRACKID}', $value, $tracking); $this->tracking_url = sprintf('<a target="_blank" href="%s">'.($value ? $value : 'url').'</a>', $url, $url); } else { @@ -1426,31 +1445,26 @@ class Reception extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // Set order billed if 100% of order is received (qty in reception lines match qty in order lines) - if ($this->origin == 'order_supplier' && $this->origin_id > 0) - { + if ($this->origin == 'order_supplier' && $this->origin_id > 0) { $order = new CommandeFournisseur($this->db); $order->fetch($this->origin_id); $order->loadReceptions(self::STATUS_CLOSED); // Fill $order->receptions = array(orderlineid => qty) $receptions_match_order = 1; - foreach ($order->lines as $line) - { + foreach ($order->lines as $line) { $lineid = $line->id; $qty = $line->qty; - if (($line->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && $order->receptions[$lineid] < $qty) - { + if (($line->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) && $order->receptions[$lineid] < $qty) { $receptions_match_order = 0; $text = 'Qty for order line id '.$lineid.' is '.$qty.'. However in the receptions with status Reception::STATUS_CLOSED='.self::STATUS_CLOSED.' we have qty = '.$order->receptions[$lineid].', so we can t close order'; dol_syslog($text); break; } } - if ($receptions_match_order) - { + if ($receptions_match_order) { dol_syslog("Qty for the ".count($order->lines)." lines of order have same value for receptions with status Reception::STATUS_CLOSED=".self::STATUS_CLOSED.', so we close order'); $order->Livraison($user, dol_now(), 'tot', 'Reception '.$this->ref); } @@ -1460,8 +1474,7 @@ class Reception extends CommonObject // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -1479,23 +1492,22 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); $qty = $obj->qty; - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->batch)) - { + if (empty($obj->batch)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record @@ -1525,8 +1537,7 @@ class Reception extends CommonObject } // Call trigger - if (!$error) - { + if (!$error) { $result = $this->call_trigger('RECEPTION_CLOSED', $user); if ($result < 0) { $error++; @@ -1537,8 +1548,7 @@ class Reception extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1551,11 +1561,24 @@ class Reception extends CommonObject /** * Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on) * + * @deprecated + * @see setBilled() * @return int <0 if ko, >0 if ok */ public function set_billed() { // phpcs:enable + dol_syslog(get_class($this)."::set_billed is deprecated, use setBilled instead", LOG_NOTICE); + return $this->setBilled(); + } + + /** + * Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on) + * + * @return int <0 if ko, >0 if ok + */ + public function setBilled() + { global $user; $error = 0; @@ -1567,8 +1590,7 @@ class Reception extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->statut = 2; $this->billed = 1; @@ -1608,14 +1630,12 @@ class Reception extends CommonObject $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->statut = 1; $this->billed = 0; // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $numref = $this->ref; $langs->load("agenda"); @@ -1632,16 +1652,16 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); $qty = $obj->qty; - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid); @@ -1649,8 +1669,7 @@ class Reception extends CommonObject $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->batch)) - { + if (empty($obj->batch)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record @@ -1678,14 +1697,13 @@ class Reception extends CommonObject } } - if (!$error) - { + if (!$error) { // Call trigger $result = $this->call_trigger('RECEPTION_REOPEN', $user); if ($result < 0) { $error++; } - } + } if ($this->origin == 'order_supplier') { $commande = new CommandeFournisseur($this->db); @@ -1697,8 +1715,7 @@ class Reception extends CommonObject $this->errors[] = $this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1721,14 +1738,12 @@ class Reception extends CommonObject $error = 0; // Protection - if ($this->statut <= self::STATUS_DRAFT) - { + if ($this->statut <= self::STATUS_DRAFT) { return 0; } if (!((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate)))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate)))) { $this->error = 'Permission denied'; return -1; } @@ -1740,11 +1755,9 @@ class Reception extends CommonObject $sql .= " WHERE rowid = ".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // If stock increment is done on closing - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) - { + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -1761,25 +1774,24 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $cpt = $this->db->num_rows($resql); - for ($i = 0; $i < $cpt; $i++) - { + for ($i = 0; $i < $cpt; $i++) { $obj = $this->db->fetch_object($resql); $qty = $obj->qty; - if ($qty <= 0) continue; + if ($qty <= 0) { + continue; + } dol_syslog(get_class($this)."::reopen reception movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); //var_dump($this->lines[$i]); $mouvS = new MouvementStock($this->db); $mouvS->origin = &$this; - if (empty($obj->batch)) - { + if (empty($obj->batch)) { // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record @@ -1811,32 +1823,27 @@ class Reception extends CommonObject if (!$error) { // Call trigger $result = $this->call_trigger('RECEPTION_UNVALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } - if ($this->origin == 'order_supplier') - { - if (!empty($this->origin) && $this->origin_id > 0) - { + if ($this->origin == 'order_supplier') { + if (!empty($this->origin) && $this->origin_id > 0) { $this->fetch_origin(); $origin = $this->origin; - if ($this->$origin->statut == 4) // If order source of reception is "partially received" - { + if ($this->$origin->statut == 4) { // If order source of reception is "partially received" // Check if there is no more reception validated. $this->$origin->fetchObjectLinked(); $setStatut = 1; - if (!empty($this->$origin->linkedObjects['reception'])) - { - foreach ($this->$origin->linkedObjects['reception'] as $rcption) - { - if ($rcption->statut > 0) - { + if (!empty($this->$origin->linkedObjects['reception'])) { + foreach ($this->$origin->linkedObjects['reception'] as $rcption) { + if ($rcption->statut > 0) { $setStatut = 0; break; } } //var_dump($this->$origin->receptions);exit; - if ($setStatut) - { + if ($setStatut) { $this->$origin->setStatut(3); // ordered } } @@ -1875,8 +1882,7 @@ class Reception extends CommonObject $langs->load("receptions"); - if (!dol_strlen($modele)) - { + if (!dol_strlen($modele)) { $modele = 'squille'; if ($this->model_pdf) { diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 297f99e53b0..3e28d96bc49 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -70,12 +70,15 @@ class ReceptionStats extends Stats //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= " AND c.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($this->socid) - { + if (!$user->rights->societe->client->voir && !$this->socid) { + $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($this->socid) { $this->where .= " AND c.fk_soc = ".$this->socid; } - if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; + if ($this->userid > 0) { + $this->where .= ' AND c.fk_user_author = '.$this->userid; + } } /** @@ -114,7 +117,9 @@ class ReceptionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -133,7 +138,9 @@ class ReceptionStats extends Stats $sql = "SELECT date_format(c.date_valid,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php index ad8811a4e1f..c99b44074eb 100644 --- a/htdocs/reception/contact.php +++ b/htdocs/reception/contact.php @@ -43,18 +43,12 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'reception', $id, ''); - $object = new Reception($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); - if (!empty($object->origin)) - { + if (!empty($object->origin)) { $origin = $object->origin; $object->fetch_origin(); @@ -62,34 +56,47 @@ if ($id > 0 || !empty($ref)) } // Linked documents - if ($origin == 'order_supplier' && $object->$typeobject->id && !empty($conf->fournisseur->enabled)) - { + if ($origin == 'order_supplier' && $object->$typeobject->id && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled))) { $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); } } +// Security check +if ($user->socid > 0) { + $socid = $user->socid; +} +if ($origin == 'reception') { + $result = restrictedArea($user, $origin, $object->id); +} else { + $result = restrictedArea($user, 'reception'); + if ($origin == 'supplierorder') { + if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) { + accessforbidden(); + } + } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) { + accessforbidden(); + } +} + + /* * Actions */ -if ($action == 'addcontact' && $user->rights->reception->creer) -{ - if ($result > 0 && $id > 0) - { +if ($action == 'addcontact' && $user->rights->reception->creer) { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $objectsrc->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($objectsrc->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); } else { @@ -98,21 +105,14 @@ if ($action == 'addcontact' && $user->rights->reception->creer) } setEventMessages($mesg, $mesgs, 'errors'); } -} +} elseif ($action == 'swapstatut' && $user->rights->reception->creer) { + // bascule du statut d'un contact + $result = $objectsrc->swapContactStatus(GETPOST('ligne', 'int')); +} elseif ($action == 'deletecontact' && $user->rights->reception->creer) { + // Efface un contact + $result = $objectsrc->delete_contact(GETPOST("lineid", 'int')); -// bascule du statut d'un contact -elseif ($action == 'swapstatut' && $user->rights->reception->creer) -{ - $result = $objectsrc->swapContactStatus(GETPOST('ligne')); -} - -// Efface un contact -elseif ($action == 'deletecontact' && $user->rights->reception->creer) -{ - $result = $objectsrc->delete_contact(GETPOST("lineid")); - - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -147,8 +147,7 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $langs->trans("OrderCard"); $head = reception_prepare_head($object); @@ -210,8 +209,7 @@ if ($id > 0 || !empty($ref)) print '<table class="border centpercent">'; // Linked documents - if ($origin == 'order_supplier' && $object->$typeobject->id && !empty($conf->fournisseur->enabled)) - { + if ($origin == 'order_supplier' && $object->$typeobject->id && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled))) { print '<tr><td class="titlefield">'; $objectsrc = new CommandeFournisseur($db); $objectsrc->fetch($object->$typeobject->id); @@ -221,8 +219,7 @@ if ($id > 0 || !empty($ref)) print "</td>\n"; print '</tr>'; } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { print '<tr><td class="titlefield">'; $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); @@ -256,10 +253,11 @@ if ($id > 0 || !empty($ref)) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } } diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index f707196b766..9eadc3be41a 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -36,13 +36,21 @@ $hookmanager->initHooks(array('receptionindex')); $langs->loadLangs(array("orders", "receptions")); +$reception = new Reception($db); + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'reception', 0, ''); + + /* * View */ $orderstatic = new CommandeFournisseur($db); $companystatic = new Societe($db); -$reception = new Reception($db); $helpurl = 'EN:Module_Receptions|FR:Module_Receptions|ES:M&oacute;dulo_Receptiones'; llxHeader('', $langs->trans("Reception"), $helpurl); @@ -53,8 +61,7 @@ print load_fiche_titre($langs->trans("ReceptionsArea"), '', 'dollyrevert'); print '<div class="fichecenter"><div class="fichethirdleft">'; -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This may be useless due to the global search combo print '<form method="post" action="list.php">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<div class="div-table-responsive-no-min">'; @@ -79,30 +86,28 @@ $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'reception'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur as c ON el.fk_source = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) -{ +if (!$user->rights->societe->client->voir && !$socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; $sql .= $clause." sc.fk_user = ".$user->id; $clause = " AND "; } $sql .= $clause." e.fk_statut = 0"; $sql .= " AND e.entity IN (".getEntity('reception').")"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND c.fk_soc = ".$socid; +} $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("ReceptionsToValidate").'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $reception->id = $obj->rowid; @@ -116,7 +121,9 @@ if ($resql) print '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.$obj->name.'</a>'; print '</td>'; print '<td>'; - if ($obj->commande_fournisseur_id) print '<a href="'.DOL_URL_ROOT.'/commande_fournisseur/card.php?id='.$obj->commande_fournisseur_id.'">'.$obj->commande_fournisseur_ref.'</a>'; + if ($obj->commande_fournisseur_id) { + print '<a href="'.DOL_URL_ROOT.'/commande_fournisseur/card.php?id='.$obj->commande_fournisseur_id.'">'.$obj->commande_fournisseur_ref.'</a>'; + } print '</td></tr>'; $i++; } @@ -144,27 +151,30 @@ $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'reception' AND el.sourcetype IN ('order_supplier')"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur as c ON el.fk_source = c.rowid AND el.sourcetype IN ('order_supplier') AND el.targettype = 'reception'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON e.fk_soc = sc.fk_soc"; +} $sql .= " WHERE e.entity IN (".getEntity('reception').")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; +} $sql .= " AND e.fk_statut = 1"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; +if ($socid) { + $sql .= " AND c.fk_soc = ".$socid; +} $sql .= " ORDER BY e.date_delivery DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("LastReceptions", $num).'</th></tr>'; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $reception->id = $obj->rowid; @@ -176,19 +186,22 @@ if ($resql) print '</td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"), "company").' '.$obj->name.'</a></td>'; print '<td>'; - if ($obj->commande_fournisseur_id > 0) - { + if ($obj->commande_fournisseur_id > 0) { $orderstatic->id = $obj->commande_fournisseur_id; $orderstatic->ref = $obj->commande_fournisseur_ref; print $orderstatic->getNomUrl(1); - } else print '&nbsp;'; + } else { + print '&nbsp;'; + } print '</td></tr>'; $i++; } print "</table></div><br>"; } $db->free($resql); -} else dol_print_error($db); +} else { + dol_print_error($db); +} @@ -199,19 +212,23 @@ if ($resql) $sql = "SELECT c.rowid, c.ref, c.ref_supplier as ref_supplier, c.fk_statut as status, c.billed as billed, s.nom as name, s.rowid as socid"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c,"; $sql .= " ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")"; -if ($socid > 0) $sql .= " AND c.fk_soc = ".$socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($socid > 0) { + $sql .= " AND c.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 c.rowid ASC"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $langs->load("orders"); $i = 0; @@ -219,8 +236,7 @@ if ($resql) print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="3">'.$langs->trans("SuppliersOrdersToProcess").' <span class="badge">'.$num.'</span></th></tr>'; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $orderstatic->id = $obj->rowid; diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 30d31291a74..44d4cf32a5c 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -40,11 +40,6 @@ $socid = GETPOST('socid', 'int'); $massaction = GETPOST('massaction', 'alpha'); $toselect = GETPOST('toselect', 'array'); -// Security check -$receptionid = GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'reception', $receptionid, ''); - $diroutputmassaction = $conf->reception->dir_output.'/temp/massgeneration/'.$user->id; $search_ref_rcp = GETPOST("search_ref_rcp"); @@ -64,9 +59,15 @@ $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 (!$sortfield) $sortfield = "e.ref"; -if (!$sortorder) $sortorder = "DESC"; -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +if (!$sortfield) { + $sortfield = "e.ref"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -92,7 +93,9 @@ $fieldstosearchall = array( 's.nom'=>"ThirdParty", 'e.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["e.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["e.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -117,23 +120,37 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +$error = 0; + +// Security check +$receptionid = GETPOST('id', 'int'); +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'reception', $receptionid, ''); + /* * Actions */ -if (GETPOST('cancel')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction') && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction') && $massaction != 'confirm_createbills') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} 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 -{ +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_supplier = ''; $search_ref_rcp = ''; $search_ref_liv = ''; @@ -148,8 +165,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_array_options = array(); } -if (empty($reshook)) -{ +if (empty($reshook)) { if ($massaction == 'confirm_createbills') { $receptions = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); @@ -162,8 +178,7 @@ if (empty($reshook)) $db->begin(); $errors = array(); - foreach ($receptions as $id_reception) - { + foreach ($receptions as $id_reception) { $rcp = new Reception($db); // On ne facture que les réceptions validées if ($rcp->fetch($id_reception) <= 0 || $rcp->statut != 1) { @@ -175,16 +190,19 @@ if (empty($reshook)) $object = new FactureFournisseur($db); if (!empty($createbills_onebythird) && !empty($TFactThird[$rcp->socid])) { $object = $TFactThird[$rcp->socid]; // If option "one bill per third" is set, we use already created reception. - if (empty($object->rowid) && $object->id != null)$object->rowid = $object->id; - if (!empty($object->rowid))$object->fetchObjectLinked(); + if (empty($object->rowid) && $object->id != null) { + $object->rowid = $object->id; + } + if (!empty($object->rowid)) { + $object->fetchObjectLinked(); + } $rcp->fetchObjectLinked(); - if (count($rcp->linkedObjectsIds['reception']) > 0) - { - foreach ($rcp->linkedObjectsIds['reception'] as $key => $value) - { - if (empty($object->linkedObjectsIds['reception']) || !in_array($value, $object->linkedObjectsIds['reception']))//Dont try to link if already linked + if (count($rcp->linkedObjectsIds['reception']) > 0) { + foreach ($rcp->linkedObjectsIds['reception'] as $key => $value) { + if (empty($object->linkedObjectsIds['reception']) || !in_array($value, $object->linkedObjectsIds['reception'])) { //Dont try to link if already linked $object->add_object_linked('reception', $value); // add supplier order linked object + } } } } else { @@ -200,8 +218,7 @@ if (empty($reshook)) $object->ref_supplier = $rcp->ref_supplier; $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); - if (empty($datefacture)) - { + if (empty($datefacture)) { $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); } @@ -210,10 +227,8 @@ if (empty($reshook)) $object->origin_id = $id_reception; $rcp->fetchObjectLinked(); - if (count($rcp->linkedObjectsIds['reception']) > 0) - { - foreach ($rcp->linkedObjectsIds['reception'] as $key => $value) - { + if (count($rcp->linkedObjectsIds['reception']) > 0) { + foreach ($rcp->linkedObjectsIds['reception'] as $key => $value) { $object->linked_objects['reception'] = $value; } } @@ -229,23 +244,19 @@ if (empty($reshook)) } } - if ($object->id > 0) - { + if ($object->id > 0) { if (!empty($createbills_onebythird) && !empty($TFactThird[$rcp->socid])) { //cause function create already add object linked for facturefournisseur $res = $object->add_object_linked($object->origin, $id_reception); - if ($res == 0) - { + if ($res == 0) { $errors[] = $object->error; $error++; } } - if (!$error) - { + if (!$error) { $lines = $rcp->lines; - if (empty($lines) && method_exists($rcp, 'fetch_lines')) - { + if (empty($lines) && method_exists($rcp, 'fetch_lines')) { $rcp->fetch_lines(); $lines = $rcp->lines; } @@ -253,11 +264,9 @@ if (empty($reshook)) $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); - if ($lines[$i]->subprice < 0) - { + if ($lines[$i]->subprice < 0) { // Negative line, we create a discount line $discount = new DiscountAbsolute($db); $discount->fk_soc = $object->socid; @@ -268,8 +277,7 @@ if (empty($reshook)) $discount->fk_user = $user->id; $discount->description = $desc; $discountid = $discount->create($user); - if ($discountid > 0) - { + if ($discountid > 0) { $result = $object->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); } else { @@ -282,17 +290,28 @@ if (empty($reshook)) $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; + 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; + 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) - { + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { $fk_parent_line = 0; } $result = $object->addline( @@ -321,8 +340,7 @@ if (empty($reshook)) $rcp->add_object_linked('facture_fourn_det', $result); - if ($result > 0) - { + if ($result > 0) { $lineid = $result; } else { $lineid = 0; @@ -330,8 +348,7 @@ if (empty($reshook)) break; } // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { + if ($result > 0 && $lines[$i]->product_type == 9) { $fk_parent_line = $result; } } @@ -341,22 +358,22 @@ if (empty($reshook)) //$rcp->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - if (!empty($createbills_onebythird) && empty($TFactThird[$rcp->socid])) $TFactThird[$rcp->socid] = $object; - else $TFact[$object->id] = $object; + if (!empty($createbills_onebythird) && empty($TFactThird[$rcp->socid])) { + $TFactThird[$rcp->socid] = $object; + } else { + $TFact[$object->id] = $object; + } } // Build doc with all invoices $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; $toselect = array(); - if (!$error && $validate_invoices) - { + if (!$error && $validate_invoices) { $massaction = $action = 'builddoc'; - foreach ($TAllFact as &$object) - { + foreach ($TAllFact as &$object) { $result = $object->validate($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); break; @@ -367,15 +384,14 @@ if (empty($reshook)) // Fac builddoc $donotredirect = 1; $upload_dir = $conf->fournisseur->facture->dir_output; - $permissiontoadd = $user->rights->fournisseur->facture->creer; + $permissiontoadd = ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer); include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } $massaction = $action = 'confirm_createbills'; } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessage($langs->trans('BillCreated', $nb_bills_created)); } else { @@ -411,60 +427,85 @@ $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= ' e.date_creation as date_creation, e.tms as date_update'; // 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."reception as e"; -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 (e.rowid = ef.fk_object)"; +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 (e.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'reception' AND ee.targettype = 'delivery'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; -if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all -{ +if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE e.entity IN (".getEntity('reception').")"; -if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all -{ +if (!$user->rights->societe->client->voir && !$socid) { // Internal user with no permission to see all $sql .= " AND e.fk_soc = sc.fk_soc"; $sql .= " AND sc.fk_user = ".$user->id; } -if ($socid) -{ +if ($socid) { $sql .= " AND e.fk_soc = ".$socid; } if ($search_status <> '' && $search_status >= 0) { $sql .= " AND e.fk_statut = ".$search_status; } -if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND e.billed = '.$search_billed; -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 (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -if ($search_ref_rcp) $sql .= natural_search('e.ref', $search_ref_rcp); -if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv); -if ($search_company) $sql .= natural_search('s.nom', $search_company); -if ($search_ref_supplier) $sql .= natural_search('e.ref_supplier', $search_ref_supplier); -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($search_billed != '' && $search_billed >= 0) { + $sql .= ' AND e.billed = '.$search_billed; +} +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->sanitize($search_country).')'; +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; +} +if ($search_ref_rcp) { + $sql .= natural_search('e.ref', $search_ref_rcp); +} +if ($search_ref_liv) { + $sql .= natural_search('l.ref', $search_ref_liv); +} +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); +} +if ($search_ref_supplier) { + $sql .= natural_search('e.ref_supplier', $search_ref_supplier); +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} // Add where from extra fields -foreach ($search_array_options as $key => $val) -{ +foreach ($search_array_options as $key => $val) { $crit = $val; $tmpkey = preg_replace('/search_options_/', '', $key); $typ = $extrafields->attributes[$object->table_element]['type'][$tmpkey]; $mode = 0; - if (in_array($typ, array('int', 'double', 'real'))) $mode = 1; // Search on a numeric - if (in_array($typ, array('sellist')) && $crit != '0' && $crit != '-1') $mode = 2; // Search on a foreign key int - if ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0')) - { + if (in_array($typ, array('int', 'double', 'real'))) { + $mode = 1; // Search on a numeric + } + if (in_array($typ, array('sellist')) && $crit != '0' && $crit != '-1') { + $mode = 2; // Search on a foreign key int + } + if ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0')) { $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); } } @@ -474,8 +515,7 @@ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // No $sql .= $hookmanager->resPrint; $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); } @@ -485,444 +525,525 @@ $sql .= $db->plimit($limit + 1, $offset); //print $sql; $resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); +if (!$resql) { + dol_print_error($db); + exit; +} - $reception = new Reception($db); +$num = $db->num_rows($resql); - $arrayofselected = is_array($toselect) ? $toselect : array(); +$reception = new Reception($db); - $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 .= "&amp;sall=".urlencode($sall); - if ($search_ref_rcp) $param .= "&amp;search_ref_rcp=".urlencode($search_ref_rcp); - if ($search_ref_liv) $param .= "&amp;search_ref_liv=".urlencode($search_ref_liv); - if ($search_company) $param .= "&amp;search_company=".urlencode($search_company); - if ($optioncss != '') $param .= '&amp;optioncss='.urlencode($optioncss); - if ($search_billed != '' && $search_billed >= 0) $param .= "&amp;search_billed=".urlencode($search_billed); - if ($search_town) $param .= "&amp;search_town=".urlencode($search_town); - if ($search_zip) $param .= "&amp;search_zip=".urlencode($search_zip); - if ($search_state) $param .= "&amp;search_state=".urlencode($search_state); - if ($search_status != '') $param .= "&amp;search_status=".urlencode($search_status); - if ($search_country) $param .= "&amp;search_country=".urlencode($search_country); - if ($search_type_thirdparty) $param .= "&amp;search_type_thirdparty=".urlencode($search_type_thirdparty); - if ($search_ref_supplier) $param .= "&amp;search_ref_supplier=".urlencode($search_ref_supplier); - // Add $param from extra fields - foreach ($search_array_options as $key => $val) - { - $crit = $val; - $tmpkey = preg_replace('/search_options_/', '', $key); - if ($val != '') $param .= '&search_options_'.$tmpkey.'='.urlencode($val); +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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 .= "&amp;sall=".urlencode($sall); +} +if ($search_ref_rcp) { + $param .= "&amp;search_ref_rcp=".urlencode($search_ref_rcp); +} +if ($search_ref_liv) { + $param .= "&amp;search_ref_liv=".urlencode($search_ref_liv); +} +if ($search_company) { + $param .= "&amp;search_company=".urlencode($search_company); +} +if ($optioncss != '') { + $param .= '&amp;optioncss='.urlencode($optioncss); +} +if ($search_billed != '' && $search_billed >= 0) { + $param .= "&amp;search_billed=".urlencode($search_billed); +} +if ($search_town) { + $param .= "&amp;search_town=".urlencode($search_town); +} +if ($search_zip) { + $param .= "&amp;search_zip=".urlencode($search_zip); +} +if ($search_state) { + $param .= "&amp;search_state=".urlencode($search_state); +} +if ($search_status != '') { + $param .= "&amp;search_status=".urlencode($search_status); +} +if ($search_country) { + $param .= "&amp;search_country=".urlencode($search_country); +} +if ($search_type_thirdparty) { + $param .= "&amp;search_type_thirdparty=".urlencode($search_type_thirdparty); +} +if ($search_ref_supplier) { + $param .= "&amp;search_ref_supplier=".urlencode($search_ref_supplier); +} +// Add $param from extra fields +foreach ($search_array_options as $key => $val) { + $crit = $val; + $tmpkey = preg_replace('/search_options_/', '', $key); + if ($val != '') { + $param .= '&search_options_'.$tmpkey.'='.urlencode($val); } +} - $arrayofmassactions = array( - // 'presend'=>$langs->trans("SendByMail"), - ); +$arrayofmassactions = array( + // 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); - if ($user->rights->fournisseur->facture->creer)$arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); - if ($massaction == 'createbills') $arrayofmassactions = array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - //$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); +if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { + $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); +} +if ($massaction == 'createbills') { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); +//$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); - $i = 0; - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; - print '<input type="hidden" name="action" value="list">'; - print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; - print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; +$i = 0; +print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n"; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; +print '<input type="hidden" name="action" value="list">'; +print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; +print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; - print_barre_liste($langs->trans('ListOfReceptions'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, '', '', $limit, 0, 0, 1); +print_barre_liste($langs->trans('ListOfReceptions'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, '', '', $limit, 0, 0, 1); +if ($massaction == 'createbills') { + //var_dump($_REQUEST); + print '<input type="hidden" name="massaction" value="confirm_createbills">'; - if ($massaction == 'createbills') - { - //var_dump($_REQUEST); - print '<input type="hidden" name="massaction" value="confirm_createbills">'; - - print '<table class="noborder" width="100%" >'; - print '<tr>'; - print '<td class="titlefieldmiddle">'; - print $langs->trans('DateInvoice'); - print '</td>'; - print '<td>'; - print $form->selectDate('', '', '', '', '', '', 1, 1); - print '</td>'; - print '</tr>'; - print '<tr>'; - print '<td>'; - print $langs->trans('CreateOneBillByThird'); - print '</td>'; - print '<td>'; - print $form->selectyesno('createbills_onebythird', '', 1); - print '</td>'; - print '</tr>'; - print '<tr>'; - print '<td>'; - print $langs->trans('ValidateInvoices'); - print '</td>'; - print '<td>'; - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) - { - print $form->selectyesno('validate_invoices', 0, 1, 1); - print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')'; - } else { - print $form->selectyesno('validate_invoices', 0, 1); - } - print '</td>'; - print '</tr>'; - print '</table>'; - - print '<br>'; - print '<div class="center">'; - print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('CreateInvoiceForThisSupplier').'"> '; - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - print '</div>'; - print '<br>'; + print '<table class="noborder" width="100%" >'; + print '<tr>'; + print '<td class="titlefieldmiddle">'; + print $langs->trans('DateInvoice'); + print '</td>'; + print '<td>'; + print $form->selectDate('', '', '', '', '', '', 1, 1); + print '</td>'; + print '</tr>'; + print '<tr>'; + print '<td>'; + print $langs->trans('CreateOneBillByThird'); + print '</td>'; + print '<td>'; + print $form->selectyesno('createbills_onebythird', '', 1); + print '</td>'; + print '</tr>'; + print '<tr>'; + print '<td>'; + print $langs->trans('ValidateInvoices'); + print '</td>'; + print '<td>'; + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_BILL)) { + print $form->selectyesno('validate_invoices', 0, 1, 1); + print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')'; + } else { + print $form->selectyesno('validate_invoices', 0, 1); } + print '</td>'; + print '</tr>'; + print '</table>'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); - print $langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall); + print '<br>'; + print '<div class="center">'; + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('CreateInvoiceForThisSupplier').'"> '; + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + print '<br>'; +} + +if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); } + print $langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall); +} - $moreforfilter = ''; - if (!empty($moreforfilter)) - { - print '<div class="liste_titre liste_titre_bydiv centpercent">'; - 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 '</div>'; - } +$moreforfilter = ''; +if (!empty($moreforfilter)) { + print '<div class="liste_titre liste_titre_bydiv centpercent">'; + 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 '</div>'; +} - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields .= $form->showCheckAddButtons('checkforselect', 1); - print '<div class="div-table-responsive">'; - print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; +print '<div class="div-table-responsive">'; +print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; + +// Fields title search +// -------------------------------------------------------------------- +print '<tr class="liste_titre_filter">'; +// Ref +if (!empty($arrayfields['e.ref']['checked'])) { + print '<td class="liste_titre">'; + print '<input class="flat" size="6" type="text" name="search_ref_rcp" value="'.$search_ref_rcp.'">'; + print '</td>'; +} +// Ref customer +if (!empty($arrayfields['e.ref_supplier']['checked'])) { + print '<td class="liste_titre">'; + print '<input class="flat" size="6" type="text" name="search_ref_supplier" value="'.$search_ref_supplier.'">'; + print '</td>'; +} +// Thirdparty +if (!empty($arrayfields['s.nom']['checked'])) { + print '<td class="liste_titre left">'; + print '<input class="flat" type="text" size="8" name="search_company" value="'.dol_escape_htmltag($search_company).'">'; + print '</td>'; +} +// Town +if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>'; +} +// Zip +if (!empty($arrayfields['s.zip']['checked'])) { + print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_zip" value="'.$search_zip.'"></td>'; +} +// State +if (!empty($arrayfields['state.nom']['checked'])) { + print '<td class="liste_titre">'; + print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; + print '</td>'; +} +// Country +if (!empty($arrayfields['country.code_iso']['checked'])) { + print '<td class="liste_titre center">'; + print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); + print '</td>'; +} +// Company type +if (!empty($arrayfields['typent.code']['checked'])) { + print '<td class="liste_titre maxwidthonsmartphone center">'; + print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); + print '</td>'; +} +// Date delivery planned +if (!empty($arrayfields['e.date_delivery']['checked'])) { + print '<td class="liste_titre">&nbsp;</td>'; +} +if (!empty($arrayfields['l.ref']['checked'])) { + // Delivery ref + print '<td class="liste_titre">'; + print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"'; + print '</td>'; +} +if (!empty($arrayfields['l.date_delivery']['checked'])) { + // Date received + print '<td class="liste_titre">&nbsp;</td>'; +} +// 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; +// Date creation +if (!empty($arrayfields['e.datec']['checked'])) { + print '<td class="liste_titre">'; + print '</td>'; +} +// Date modification +if (!empty($arrayfields['e.tms']['checked'])) { + print '<td class="liste_titre">'; + print '</td>'; +} +// Status +if (!empty($arrayfields['e.fk_statut']['checked'])) { + print '<td class="liste_titre maxwidthonsmartphone right">'; + print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1); + print '</td>'; +} +// Status billed +if (!empty($arrayfields['e.billed']['checked'])) { + print '<td class="liste_titre maxwidthonsmartphone center">'; + print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); + print '</td>'; +} +// Action column +print '<td class="liste_titre middle">'; +$searchpicto = $form->showFilterAndCheckAddButtons(0); +print $searchpicto; +print '</td>'; +print "</tr>\n"; + +print '<tr class="liste_titre">'; +if (!empty($arrayfields['e.ref']['checked'])) { + print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['e.ref_supplier']['checked'])) { + print_liste_field_titre($arrayfields['e.ref_supplier']['label'], $_SERVER["PHP_SELF"], "e.ref_supplier", "", $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, 'left '); +} +if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['country.code_iso']['checked'])) { + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['e.date_delivery']['checked'])) { + print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['l.ref']['checked'])) { + print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['l.date_delivery']['checked'])) { + print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $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); +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +if (!empty($arrayfields['e.datec']['checked'])) { + print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['e.tms']['checked'])) { + print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['e.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['e.billed']['checked'])) { + print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); +} +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); +print "</tr>\n"; + +$i = 0; +$totalarray = array(); +while ($i < min($num, $limit)) { + $obj = $db->fetch_object($resql); + + $reception->id = $obj->rowid; + $reception->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->ref = $obj->name; + $companystatic->name = $obj->name; + + + print '<tr class="oddeven">'; - // Fields title search - // -------------------------------------------------------------------- - print '<tr class="liste_titre_filter">'; // Ref - if (!empty($arrayfields['e.ref']['checked'])) - { - print '<td class="liste_titre">'; - print '<input class="flat" size="6" type="text" name="search_ref_rcp" value="'.$search_ref_rcp.'">'; - print '</td>'; + if (!empty($arrayfields['e.ref']['checked'])) { + print "<td>"; + print $reception->getNomUrl(1); + $filename = dol_sanitizeFileName($reception->ref); + $filedir = $conf->reception->dir_output.'/'.dol_sanitizeFileName($reception->ref); + $urlsource = $_SERVER['PHP_SELF'].'?id='.$reception->id; + print $formfile->getDocumentsLink($reception->element, $filename, $filedir); + print "</td>\n"; + + if (!$i) { + $totalarray['nbfield']++; + } } + // Ref customer - if (!empty($arrayfields['e.ref_supplier']['checked'])) - { - print '<td class="liste_titre">'; - print '<input class="flat" size="6" type="text" name="search_ref_supplier" value="'.$search_ref_supplier.'">'; - print '</td>'; + if (!empty($arrayfields['e.ref_supplier']['checked'])) { + print "<td>"; + print $obj->ref_supplier; + print "</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - // Thirdparty - if (!empty($arrayfields['s.nom']['checked'])) - { - print '<td class="liste_titre left">'; - print '<input class="flat" type="text" size="8" name="search_company" value="'.dol_escape_htmltag($search_company).'">'; + + // Third party + if (!empty($arrayfields['s.nom']['checked'])) { + print '<td>'; + print $companystatic->getNomUrl(1); print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>'; - // Zip - if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_zip" value="'.$search_zip.'"></td>'; - // State - if (!empty($arrayfields['state.nom']['checked'])) - { - print '<td class="liste_titre">'; - print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; + if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="nocellnopadd">'; + print $obj->town; print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Zip + if (!empty($arrayfields['s.zip']['checked'])) { + print '<td class="nocellnopadd">'; + print $obj->zip; + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + } + // State + if (!empty($arrayfields['state.nom']['checked'])) { + print "<td>".$obj->state_name."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { - print '<td class="liste_titre center">'; - print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); + if (!empty($arrayfields['country.code_iso']['checked'])) { + print '<td class="center">'; + $tmparray = getCountry($obj->fk_pays, 'all'); + print $tmparray['label']; print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { - print '<td class="liste_titre maxwidthonsmartphone center">'; - 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)); + // Type ent + if (!empty($arrayfields['typent.code']['checked'])) { + print '<td class="center">'; + if (count($typenArray) == 0) { + $typenArray = $formcompany->typent_array(1); + } + print $typenArray[$obj->typent_code]; print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - // Date delivery planned - if (!empty($arrayfields['e.date_delivery']['checked'])) - { - print '<td class="liste_titre">&nbsp;</td>'; + + // Date delivery planed + if (!empty($arrayfields['e.date_delivery']['checked'])) { + print '<td class="center">'; + print dol_print_date($db->jdate($obj->delivery_date), "day"); + /*$now = time(); + if ( ($now - $db->jdate($obj->date_reception)) > $conf->warnings->lim && $obj->statutid == 1 ) + { + }*/ + print "</td>\n"; } - if (!empty($arrayfields['l.ref']['checked'])) - { - // Delivery ref - print '<td class="liste_titre">'; - print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"'; - print '</td>'; - } - if (!empty($arrayfields['l.date_delivery']['checked'])) - { - // Date received - print '<td class="liste_titre">&nbsp;</td>'; + + if (!empty($arrayfields['l.ref']['checked']) || !empty($arrayfields['l.date_delivery']['checked'])) { + $reception->fetchObjectLinked($reception->id, $reception->element); + $receiving = ''; + if (count($reception->linkedObjects['delivery']) > 0) { + $receiving = reset($reception->linkedObjects['delivery']); + } + + if (!empty($arrayfields['l.ref']['checked'])) { + // Ref + print '<td>'; + print !empty($receiving) ? $receiving->getNomUrl($db) : ''; + print '</td>'; + } + + if (!empty($arrayfields['l.date_delivery']['checked'])) { + // Date received + print '<td class="center">'; + print dol_print_date($db->jdate($obj->date_reception), "day"); + print '</td>'."\n"; + } } + // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.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 + $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['e.datec']['checked'])) - { - print '<td class="liste_titre">'; + if (!empty($arrayfields['e.datec']['checked'])) { + print '<td class="center nowrap">'; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['e.tms']['checked'])) - { - print '<td class="liste_titre">'; + if (!empty($arrayfields['e.tms']['checked'])) { + print '<td class="center nowrap">'; + print dol_print_date($db->jdate($obj->date_update), 'dayhour'); print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['e.fk_statut']['checked'])) - { - print '<td class="liste_titre maxwidthonsmartphone right">'; - print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1); - print '</td>'; + if (!empty($arrayfields['e.fk_statut']['checked'])) { + print '<td class="right nowrap">'.$reception->LibStatut($obj->fk_statut, 5).'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - // Status billed - if (!empty($arrayfields['e.billed']['checked'])) - { - print '<td class="liste_titre maxwidthonsmartphone center">'; - print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); - print '</td>'; + // Billed + if (!empty($arrayfields['e.billed']['checked'])) { + print '<td class="center">'.yn($obj->billed).'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } + // Action column - print '<td class="liste_titre middle">'; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; + print '<td class="center">'; + 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 '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; + } print '</td>'; - print "</tr>\n"; - - print '<tr class="liste_titre">'; - if (!empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['e.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['e.ref_supplier']['label'], $_SERVER["PHP_SELF"], "e.ref_supplier", "", $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, 'left '); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['l.ref']['checked'])) print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $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); - $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (!empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); - print "</tr>\n"; - - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($resql); - - $reception->id = $obj->rowid; - $reception->ref = $obj->ref; - - $companystatic->id = $obj->socid; - $companystatic->ref = $obj->name; - $companystatic->name = $obj->name; - - - print '<tr class="oddeven">'; - - // Ref - if (!empty($arrayfields['e.ref']['checked'])) - { - print "<td>"; - print $reception->getNomUrl(1); - $filename = dol_sanitizeFileName($reception->ref); - $filedir = $conf->reception->dir_output.'/'.dol_sanitizeFileName($reception->ref); - $urlsource = $_SERVER['PHP_SELF'].'?id='.$reception->id; - print $formfile->getDocumentsLink($reception->element, $filename, $filedir); - print "</td>\n"; - - if (!$i) $totalarray['nbfield']++; - } - - // Ref customer - if (!empty($arrayfields['e.ref_supplier']['checked'])) - { - print "<td>"; - print $obj->ref_supplier; - print "</td>\n"; - if (!$i) $totalarray['nbfield']++; - } - - // Third party - if (!empty($arrayfields['s.nom']['checked'])) - { - print '<td>'; - print $companystatic->getNomUrl(1); - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Town - if (!empty($arrayfields['s.town']['checked'])) - { - print '<td class="nocellnopadd">'; - print $obj->town; - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { - print '<td class="nocellnopadd">'; - print $obj->zip; - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // State - if (!empty($arrayfields['state.nom']['checked'])) - { - print "<td>".$obj->state_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; - } - // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { - print '<td class="center">'; - $tmparray = getCountry($obj->fk_pays, 'all'); - print $tmparray['label']; - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { - print '<td class="center">'; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); - print $typenArray[$obj->typent_code]; - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - - // Date delivery planed - if (!empty($arrayfields['e.date_delivery']['checked'])) - { - print '<td class="center">'; - print dol_print_date($db->jdate($obj->delivery_date), "day"); - /*$now = time(); - if ( ($now - $db->jdate($obj->date_reception)) > $conf->warnings->lim && $obj->statutid == 1 ) - { - }*/ - print "</td>\n"; - } - - if (!empty($arrayfields['l.ref']['checked']) || !empty($arrayfields['l.date_delivery']['checked'])) - { - $reception->fetchObjectLinked($reception->id, $reception->element); - $receiving = ''; - if (count($reception->linkedObjects['delivery']) > 0) $receiving = reset($reception->linkedObjects['delivery']); - - if (!empty($arrayfields['l.ref']['checked'])) - { - // Ref - print '<td>'; - print !empty($receiving) ? $receiving->getNomUrl($db) : ''; - print '</td>'; - } - - if (!empty($arrayfields['l.date_delivery']['checked'])) - { - // Date received - print '<td class="center">'; - print dol_print_date($db->jdate($obj->date_reception), "day"); - print '</td>'."\n"; - } - } - - // 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['e.datec']['checked'])) - { - print '<td class="center nowrap">'; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Date modification - if (!empty($arrayfields['e.tms']['checked'])) - { - print '<td class="center nowrap">'; - print dol_print_date($db->jdate($obj->date_update), 'dayhour'); - print '</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Status - if (!empty($arrayfields['e.fk_statut']['checked'])) - { - print '<td class="right nowrap">'.$reception->LibStatut($obj->fk_statut, 5).'</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Billed - if (!empty($arrayfields['e.billed']['checked'])) - { - print '<td class="center">'.yn($obj->billed).'</td>'; - if (!$i) $totalarray['nbfield']++; - } - - // Action column - print '<td class="center">'; - 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 '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; - } - print '</td>'; - if (!$i) $totalarray['nbfield']++; - - print "</tr>\n"; - - $i++; + if (!$i) { + $totalarray['nbfield']++; } - print "</table>"; - print "</div>"; - print '</form>'; - $db->free($resql); -} else { - dol_print_error($db); + print "</tr>\n"; + + $i++; } +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; +} + +print "</table>"; +print "</div>"; +print '</form>'; +$db->free($resql); + llxFooter(); $db->close(); diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index b57f3ea2efb..a3a2b31589c 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -33,45 +33,29 @@ if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -$langs->load("receptions"); -$langs->load("companies"); -$langs->load("bills"); -$langs->load('deliveries'); -$langs->load('orders'); -$langs->load('stocks'); -$langs->load('other'); -$langs->load('propal'); +$langs->loadLangs(array("receptions", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal')); $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -// Security check -$socid = ''; -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, $origin, $origin_id); - $object = new Reception($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); - if (!empty($object->origin)) - { + if (!empty($object->origin)) { $typeobject = $object->origin; $origin = $object->origin; $object->fetch_origin(); } // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) - { + if ($typeobject == 'commande' && $object->$typeobject->id && !empty($conf->commande->enabled)) { $objectsrc = new Commande($db); $objectsrc->fetch($object->$typeobject->id); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { + if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) { $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); } @@ -79,6 +63,24 @@ if ($id > 0 || !empty($ref)) $permissionnote = $user->rights->reception->creer; // Used by the include of actions_setnotes.inc.php +// Security check +if ($user->socid > 0) { + $socid = $user->socid; +} +if ($origin == 'reception') { + $result = restrictedArea($user, $origin, $object->id); +} else { + $result = restrictedArea($user, 'reception'); + if ($origin == 'supplierorder') { + if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) { + accessforbidden(); + } + } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) { + accessforbidden(); + } +} + + /* * Actions @@ -95,8 +97,7 @@ llxHeader('', 'Reception'); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $head = reception_prepare_head($object); print dol_get_fiche_head($head, 'note', $langs->trans("Reception"), -1, 'dollyrevert'); diff --git a/htdocs/reception/stats/index.php b/htdocs/reception/stats/index.php index bf839b16154..1fe3397ef66 100644 --- a/htdocs/reception/stats/index.php +++ b/htdocs/reception/stats/index.php @@ -34,12 +34,6 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); -// Security check -if ($user->socid > 0) -{ - $action = ''; - $socid = $user->socid; -} $nowyear = strftime("%Y", dol_now()); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; @@ -47,10 +41,13 @@ $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; $startyear = $year - 1; $endyear = $year; -$langs->load("reception"); -$langs->load("other"); -$langs->load("companies"); +$langs->loadLangs(array("reception", "other", "companies")); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'reception', 0, ''); /* @@ -74,8 +71,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/receptionsnbinyear-'.$user->id.'-'.$year.'.png'; } else { $filenamenb = $dir.'/receptionsnbinyear-'.$year.'.png'; @@ -83,12 +79,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -114,36 +108,36 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear); if (!$user->rights->societe->client->voir || $user->socid) { - $filenameamount = $dir.'/receptionsamountinyear-'.$user->id.'-'.$year.'.png'; + $filenameamount = $dir.'/receptionsamountinyear-'.$user->id.'-'.$year.'.png'; } else { - $filenameamount = $dir.'/receptionsamountinyear-'.$year.'.png'; + $filenameamount = $dir.'/receptionsamountinyear-'.$year.'.png'; } $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); if (! $mesg) { - $px2->SetData($data); - $i=$startyear;$legend=array(); - while ($i <= $endyear) - { - $legend[]=$i; - $i++; - } - $px2->SetLegend($legend); - $px2->SetMaxValue($px2->GetCeilMaxValue()); - $px2->SetMinValue(min(0,$px2->GetFloorMinValue())); - $px2->SetWidth($WIDTH); - $px2->SetHeight($HEIGHT); - $px2->SetYLabel($langs->trans("AmountOfReceptions")); - $px2->SetShading(3); - $px2->SetHorizTickIncrement(1); - $px2->mode='depth'; - $px2->SetTitle($langs->trans("AmountOfReceptionsByMonthHT")); + $px2->SetData($data); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px2->SetLegend($legend); + $px2->SetMaxValue($px2->GetCeilMaxValue()); + $px2->SetMinValue(min(0,$px2->GetFloorMinValue())); + $px2->SetWidth($WIDTH); + $px2->SetHeight($HEIGHT); + $px2->SetYLabel($langs->trans("AmountOfReceptions")); + $px2->SetShading(3); + $px2->SetHorizTickIncrement(1); + $px2->mode='depth'; + $px2->SetTitle($langs->trans("AmountOfReceptionsByMonthHT")); - $px2->draw($filenameamount,$fileurlamount); + $px2->draw($filenameamount,$fileurlamount); } */ @@ -152,36 +146,36 @@ $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); if (!$user->rights->societe->client->voir || $user->socid) { - $filename_avg = $dir.'/receptionsaverage-'.$user->id.'-'.$year.'.png'; + $filename_avg = $dir.'/receptionsaverage-'.$user->id.'-'.$year.'.png'; } else { - $filename_avg = $dir.'/receptionsaverage-'.$year.'.png'; + $filename_avg = $dir.'/receptionsaverage-'.$year.'.png'; } $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); if (! $mesg) { - $px3->SetData($data); - $i=$startyear;$legend=array(); - while ($i <= $endyear) - { - $legend[]=$i; - $i++; - } - $px3->SetLegend($legend); - $px3->SetYLabel($langs->trans("AmountAverage")); - $px3->SetMaxValue($px3->GetCeilMaxValue()); - $px3->SetMinValue($px3->GetFloorMinValue()); - $px3->SetWidth($WIDTH); - $px3->SetHeight($HEIGHT); - $px3->SetShading(3); - $px3->SetHorizTickIncrement(1); - $px3->mode='depth'; - $px3->SetTitle($langs->trans("AmountAverage")); + $px3->SetData($data); + $i=$startyear;$legend=array(); + while ($i <= $endyear) + { + $legend[]=$i; + $i++; + } + $px3->SetLegend($legend); + $px3->SetYLabel($langs->trans("AmountAverage")); + $px3->SetMaxValue($px3->GetCeilMaxValue()); + $px3->SetMinValue($px3->GetFloorMinValue()); + $px3->SetWidth($WIDTH); + $px3->SetHeight($HEIGHT); + $px3->SetShading(3); + $px3->SetHorizTickIncrement(1); + $px3->mode='depth'; + $px3->SetTitle($langs->trans("AmountAverage")); - $px3->draw($filename_avg,$fileurl_avg); + $px3->draw($filename_avg,$fileurl_avg); } */ @@ -194,7 +188,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); @@ -231,8 +227,12 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; print '</td></tr>'; // Year print '<tr><td class="left">'.$langs->trans("Year").'</td><td class="left">'; - if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; - if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -251,11 +251,9 @@ print '<td class="center">'.$langs->trans("AmountAverage").'</td>';*/ print '</tr>'; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { // If we have empty year + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; @@ -270,8 +268,11 @@ foreach ($data as $val) print '<tr class="oddeven" height="24">'; print '<td class="center">'; - if ($year) print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a>'; - else print $langs->trans("ValidationDateNotDefinedEvenIfReceptionValidated"); + if ($year) { + print '<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a>'; + } else { + print $langs->trans("ValidationDateNotDefinedEvenIfReceptionValidated"); + } print '</td>'; print '<td class="right">'.$val['nb'].'</td>'; /*print '<td class="right">'.price(price2num($val['total'],'MT'),1).'</td>'; @@ -288,12 +289,14 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; // Show graphs print '<table class="border centpercent"><tr valign="top"><td class="center">'; -if ($mesg) { print $mesg; } else { +if ($mesg) { + print $mesg; +} else { print $px1->show(); print "<br>\n"; /*print $px2->show(); - print "<br>\n"; - print $px3->show();*/ + print "<br>\n"; + print $px3->show();*/ } print '</td></tr></table>'; @@ -320,17 +323,17 @@ $sql.= " GROUP BY dm DESC"; $resql=$db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $row = $db->fetch_row($resql); - $nbproduct = $row[0]; - $year = $row[1]; - print "<tr>"; - print '<td class="center"><a href="month.php?year='.$year.'">'.$year.'</a></td><td class="center">'.$nbproduct.'</td></tr>'; - $i++; - } + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($resql); + $nbproduct = $row[0]; + $year = $row[1]; + print "<tr>"; + print '<td class="center"><a href="month.php?year='.$year.'">'.$year.'</a></td><td class="center">'.$nbproduct.'</td></tr>'; + $i++; + } } $db->free($resql); diff --git a/htdocs/reception/stats/month.php b/htdocs/reception/stats/month.php index f974b4edcff..806006394df 100644 --- a/htdocs/reception/stats/month.php +++ b/htdocs/reception/stats/month.php @@ -29,6 +29,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $year = GETPOST("year", 'int'); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'reception', 0, ''); + /* * View @@ -53,8 +59,7 @@ $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=receptionstats&file=reception $px = new DolGraph(); $mesg = $px->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px->SetData($data); $px->SetMaxValue($px->GetCeilMaxValue()); $px->SetWidth($WIDTH); diff --git a/htdocs/reception/tpl/index.html b/htdocs/reception/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/reception/tpl/linkedobjectblock.tpl.php b/htdocs/reception/tpl/linkedobjectblock.tpl.php index 014dbff00a0..39a5a24347d 100644 --- a/htdocs/reception/tpl/linkedobjectblock.tpl.php +++ b/htdocs/reception/tpl/linkedobjectblock.tpl.php @@ -18,8 +18,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; } @@ -42,52 +41,54 @@ $langs->load("receptions"); $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>"> - <td class="linkedcol-element"><?php echo $langs->trans("Reception"); ?> - <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; ?> - </td> - <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td> - <td class="linkedcol-ref center"></td> - <td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td> - <td class="linkedcol-amount right"><?php + <tr class="<?php echo $trclass; ?>"> + <td class="linkedcol-element"><?php echo $langs->trans("Reception"); ?> + <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; + } ?> + </td> + <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td> + <td class="linkedcol-ref center"></td> + <td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td> + <td class="linkedcol-amount right"><?php if ($user->rights->reception->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?></td> - <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="linkedcol-action right"> - <?php + <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="linkedcol-action right"> + <?php // For now, receptions must stay linked to order, so link is not deletable if ($object->element != 'order_supplier') { ?> - <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> - <?php + <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> + <?php } ?> - </td> - </tr> - <?php + </td> + </tr> + <?php } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> - <td><?php echo $langs->trans("Total"); ?></td> - <td></td> - <td class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php + <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> + <td><?php echo $langs->trans("Total"); ?></td> + <td></td> + <td class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php } ?> diff --git a/htdocs/recruitment/admin/candidature_extrafields.php b/htdocs/recruitment/admin/candidature_extrafields.php index 1d9e567da9d..1f0ac538d0b 100644 --- a/htdocs/recruitment/admin/candidature_extrafields.php +++ b/htdocs/recruitment/admin/candidature_extrafields.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/recruitement/admin/candidature_extrafields.php + * \file htdocs/recruitment/admin/candidature_extrafields.php * \ingroup recruitment * \brief Page to setup extra fields of Candidature */ @@ -34,13 +34,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'recruitment_recruitmentcandidature'; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -73,8 +77,7 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; @@ -84,8 +87,7 @@ if ($action != 'create' && $action != 'edit') /* * Creation of an optional field */ -if ($action == 'create') -{ +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -95,8 +97,7 @@ if ($action == 'create') /* * Edition of an optional field */ -if ($action == 'edit' && !empty($attrname)) -{ +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php index af7a7c316a7..3b17322d5eb 100644 --- a/htdocs/recruitment/admin/jobposition_extrafields.php +++ b/htdocs/recruitment/admin/jobposition_extrafields.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/recruitement/admin/jobposition_extrafields.php + * \file htdocs/recruitment/admin/jobposition_extrafields.php * \ingroup recruitment * \brief Page to setup extra fields of Candidature */ @@ -34,13 +34,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'recruitment_recruitmentjobposition'; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -73,8 +77,7 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; @@ -84,8 +87,7 @@ if ($action != 'create' && $action != 'edit') /* * Creation of an optional field */ -if ($action == 'create') -{ +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -95,8 +97,7 @@ if ($action == 'create') /* * Edition of an optional field */ -if ($action == 'edit' && !empty($attrname)) -{ +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/recruitment/admin/public_interface.php b/htdocs/recruitment/admin/public_interface.php index 31925608811..7b2d72cb835 100644 --- a/htdocs/recruitment/admin/public_interface.php +++ b/htdocs/recruitment/admin/public_interface.php @@ -33,7 +33,9 @@ $langs->loadLangs(array("admin", "recruitment")); $action = GETPOST('action', 'aZ09'); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $error = 0; @@ -43,8 +45,11 @@ $error = 0; */ if ($action == 'setRECRUITMENT_ENABLE_PUBLIC_INTERFACE') { - if (GETPOST('value')) dolibarr_set_const($db, 'RECRUITMENT_ENABLE_PUBLIC_INTERFACE', 1, 'chaine', 0, '', $conf->entity); - else dolibarr_set_const($db, 'RECRUITMENT_ENABLE_PUBLIC_INTERFACE', 0, 'chaine', 0, '', $conf->entity); + if (GETPOST('value')) { + dolibarr_set_const($db, 'RECRUITMENT_ENABLE_PUBLIC_INTERFACE', 1, 'chaine', 0, '', $conf->entity); + } else { + dolibarr_set_const($db, 'RECRUITMENT_ENABLE_PUBLIC_INTERFACE', 0, 'chaine', 0, '', $conf->entity); + } } if ($action == 'update') { @@ -52,9 +57,11 @@ if ($action == 'update') { $res = dolibarr_set_const($db, "RECRUITMENT_ENABLE_PUBLIC_INTERFACE", $public, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php index 1c2d76ffd40..6da39445f7f 100644 --- a/htdocs/recruitment/admin/setup.php +++ b/htdocs/recruitment/admin/setup.php @@ -25,16 +25,30 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} global $langs, $user; @@ -47,7 +61,9 @@ require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class. $langs->loadLangs(array("admin", "recruitment")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -71,28 +87,28 @@ $setupnotempty = 0; * Actions */ -if ((float) DOL_VERSION >= 6) -{ +if ((float) DOL_VERSION >= 6) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; } -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstorder = GETPOST('maskconstorder', 'alpha'); $maskorder = GETPOST('maskorder', 'alpha'); - if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconstorder) { + $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $tmpobjectkey = GETPOST('object'); @@ -102,25 +118,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($tmpobject, $langs) > 0) - { + if ($module->write_file($tmpobject, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); return; } else { @@ -131,10 +143,8 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'set') { +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); @@ -142,12 +152,12 @@ elseif ($action == 'set') { $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; - if ($conf->global->$constforval == "$value") dolibarr_del_const($db, $constforval, $conf->entity); + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } } } -} - -elseif ($action == 'setmod') { +} elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated by calling method canBeActivated $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { @@ -155,10 +165,8 @@ elseif ($action == 'setmod') { dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); } -} - -// Set default model -elseif ($action == 'setdoc') { +} elseif ($action == 'setdoc') { + // Set default model $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; @@ -208,8 +216,7 @@ print dol_get_fiche_head($head, 'settings', '', -1, ''); //echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -217,8 +224,7 @@ if ($action == 'edit') print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print '<tr class="oddeven"><td>'; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); print $form->textwithpicto($langs->trans($key), $tooltiphelp); @@ -233,13 +239,11 @@ if ($action == 'edit') print '</form>'; print '<br>'; } else { - if (!empty($arrayofparameters)) - { + if (!empty($arrayofparameters)) { print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { $setupnotempty++; print '<tr class="oddeven"><td>'; @@ -282,30 +286,28 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/".$moduledir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.'/'.$file.'.php'; $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; @@ -318,14 +320,16 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td class="center">'; $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON'; - if ($conf->global->$constforvar == $file) - { + if ($conf->global->$constforvar == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">'; @@ -345,8 +349,9 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; @@ -387,8 +392,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -410,31 +414,23 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { - foreach (array('', '/doc') as $valdir) - { + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/".$moduledir.$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -442,21 +438,26 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '</td>'; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '<td class="center">'."\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;token='.newToken().'&amp;value='.$name.'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -483,8 +484,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; @@ -499,8 +499,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'generic').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); diff --git a/htdocs/recruitment/admin/setup_candidatures.php b/htdocs/recruitment/admin/setup_candidatures.php index 9bc3cd96d5a..2bcddf58964 100644 --- a/htdocs/recruitment/admin/setup_candidatures.php +++ b/htdocs/recruitment/admin/setup_candidatures.php @@ -25,16 +25,30 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} global $langs, $user; @@ -47,7 +61,9 @@ require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class. $langs->loadLangs(array("admin", "recruitment")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); @@ -71,28 +87,28 @@ $setupnotempty = 0; * Actions */ -if ((float) DOL_VERSION >= 6) -{ +if ((float) DOL_VERSION >= 6) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; } -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstorder = GETPOST('maskconstorder', 'alpha'); $maskorder = GETPOST('maskorder', 'alpha'); - if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + if ($maskconstorder) { + $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); + } - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $tmpobjectkey = GETPOST('object'); @@ -102,25 +118,21 @@ if ($action == 'updateMask') // Search template files $file = ''; $classname = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0); - if (file_exists($file)) - { + if (file_exists($file)) { $filefound = 1; $classname = "pdf_".$modele; break; } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); - if ($module->write_file($tmpobject, $langs) > 0) - { + if ($module->write_file($tmpobject, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); return; } else { @@ -131,10 +143,8 @@ if ($action == 'updateMask') setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} - -// Activate a model -elseif ($action == 'set') { +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); } elseif ($action == 'del') { $tmpobjectkey = GETPOST('object'); @@ -142,11 +152,11 @@ elseif ($action == 'set') { $ret = delDocumentModel($value, $type); if ($ret > 0) { $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; - if ($conf->global->$constforval == "$value") dolibarr_del_const($db, $constforval, $conf->entity); + if ($conf->global->$constforval == "$value") { + dolibarr_del_const($db, $constforval, $conf->entity); + } } -} - -elseif ($action == 'setmod') { +} elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated by calling method canBeActivated $tmpobjectkey = GETPOST('object'); if (!empty($tmpobjectkey)) { @@ -154,10 +164,8 @@ elseif ($action == 'setmod') { dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); } -} - -// Set default model -elseif ($action == 'setdoc') { +} elseif ($action == 'setdoc') { + // Set default model $tmpobjectkey = GETPOST('object'); $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF'; if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { @@ -205,8 +213,7 @@ print dol_get_fiche_head($head, 'settings_candidatures', '', -1, ''); //echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>'; -if ($action == 'edit') -{ +if ($action == 'edit') { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -214,8 +221,7 @@ if ($action == 'edit') print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { print '<tr class="oddeven"><td>'; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); print $form->textwithpicto($langs->trans($key), $tooltiphelp); @@ -230,13 +236,11 @@ if ($action == 'edit') print '</form>'; print '<br>'; } else { - if (!empty($arrayofparameters)) - { + if (!empty($arrayofparameters)) { print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; - foreach ($arrayofparameters as $key => $val) - { + foreach ($arrayofparameters as $key => $val) { $setupnotempty++; print '<tr class="oddeven"><td>'; @@ -279,19 +283,14 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/".$moduledir); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.'/'.$file.'.php'; @@ -299,11 +298,14 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $module = new $file($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php'); print '<tr class="oddeven"><td>'.$module->name."</td><td>\n"; @@ -316,14 +318,16 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td class="center">'; $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON'; - if ($conf->global->$constforvar == $file) - { + if ($conf->global->$constforvar == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">'; @@ -343,8 +347,9 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; @@ -382,12 +387,10 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -409,31 +412,23 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { clearstatcache(); - foreach ($dirmodels as $reldir) - { - foreach (array('', '/doc') as $valdir) - { + foreach ($dirmodels as $reldir) { + foreach (array('', '/doc') as $valdir) { $realpath = $reldir."core/modules/".$moduledir.$valdir; $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { + 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)) - { + 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); @@ -441,21 +436,26 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $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; + 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) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print (empty($module->name) ? $name : $module->name); print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '</td>'; // Active - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print '<td class="center">'."\n"; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;token='.newToken().'&amp;value='.$name.'">'; print img_picto($langs->trans("Enabled"), 'switch_on'); @@ -482,8 +482,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; } $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; @@ -498,8 +497,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { // Preview print '<td class="center">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'generic').'</a>'; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 9e99cbc29fb..db9c4eaaa4a 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -106,7 +106,7 @@ class RecruitmentCandidature extends CommonObject 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of candidature"), - 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1), + 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'maxwidth500'), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), @@ -116,7 +116,7 @@ class RecruitmentCandidature extends CommonObject 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,), 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,), 'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email'), - 'phone' => array('type'=>'varchar(64)', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1,), + 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone'), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), //'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1), @@ -164,8 +164,12 @@ class RecruitmentCandidature extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } // Example to show how to set values of fields definition dynamically /*if ($user->rights->recruitment->recruitmentcandidature->read) { @@ -174,23 +178,17 @@ class RecruitmentCandidature extends CommonObject }*/ // Unset fields that are disabled - foreach ($this->fields as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) - { + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { unset($this->fields[$key]); } } // Translate some data of arrayofkeyval - if (is_object($langs)) - { - foreach ($this->fields as $key => $val) - { - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) - { - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); } } @@ -230,7 +228,9 @@ class RecruitmentCandidature extends CommonObject // Load source object $result = $object->fetchCommon($fromid); - if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } // get lines so they will be clone //foreach($this->lines as $line) @@ -242,22 +242,29 @@ class RecruitmentCandidature extends CommonObject unset($object->import_key); // Clear fields - if (property_exists($object, 'ref')) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; - if (property_exists($object, 'label')) $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; - if (property_exists($object, 'status')) { $object->status = self::STATUS_DRAFT; } - if (property_exists($object, 'date_creation')) { $object->date_creation = dol_now(); } - if (property_exists($object, 'date_modification')) { $object->date_modification = null; } + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } // ... // Clear extrafields that are unique - if (is_array($object->array_options) && count($object->array_options) > 0) - { + if (is_array($object->array_options) && count($object->array_options) > 0) { $extrafields->fetch_name_optionals_label($this->table_element); - foreach ($object->array_options as $key => $option) - { + foreach ($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); - if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) - { + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($object->array_options[$key]); } @@ -273,22 +280,19 @@ class RecruitmentCandidature extends CommonObject $this->errors = $object->errors; } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($this->copy_linked_contact($object, 'internal') < 0) - { + if ($this->copy_linked_contact($object, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if (property_exists($this, 'socid') && $this->socid == $object->socid) - { - if ($this->copy_linked_contact($object, 'external') < 0) + if (property_exists($this, 'socid') && $this->socid == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { $error++; + } } } @@ -315,9 +319,13 @@ class RecruitmentCandidature extends CommonObject public function fetch($id, $ref = null, $email_msgid = '') { $morewhere = ''; - if ($email_msgid) $morewhere = " AND email_msgid = '".$this->db->escape($email_msgid)."'"; + if ($email_msgid) { + $morewhere = " AND email_msgid = '".$this->db->escape($email_msgid)."'"; + } $result = $this->fetchCommon($id, $ref, $morewhere); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } return $result; } @@ -357,8 +365,11 @@ class RecruitmentCandidature extends CommonObject $sql = 'SELECT '; $sql .= $this->getFieldList(); $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; - else $sql .= ' WHERE 1 = 1'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } // Manage filter $sqlwhere = array(); if (count($filter) > 0) { @@ -391,8 +402,7 @@ class RecruitmentCandidature extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < ($limit ? min($limit, $num) : $num)) - { + while ($i < ($limit ? min($limit, $num) : $num)) { $obj = $this->db->fetch_object($resql); $record = new self($this->db); @@ -448,8 +458,7 @@ class RecruitmentCandidature extends CommonObject */ public function deleteLine(User $user, $idline, $notrigger = false) { - if ($this->status < 0) - { + if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -474,8 +483,7 @@ class RecruitmentCandidature extends CommonObject $error = 0; // Protection - if ($this->status == self::STATUS_VALIDATED) - { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -493,8 +501,7 @@ class RecruitmentCandidature extends CommonObject $this->db->begin(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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 { $num = $this->ref; @@ -506,57 +513,58 @@ class RecruitmentCandidature extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql .= " SET ref = '".$this->db->escape($num)."',"; $sql .= " status = ".self::STATUS_VALIDATED; - if (!empty($this->fields['date_validation'])) $sql .= ", date_validation = '".$this->db->idate($now)."',"; - if (!empty($this->fields['fk_user_valid'])) $sql .= ", fk_user_valid = ".$user->id; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."',"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".$user->id; + } $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::validate()", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('RECRUITMENTCANDIDATURE_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'recruitmentcandidature/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'recruitmentcandidature/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->recruitment->dir_output.'/recruitmentcandidature/'.$oldref; $dirdest = $conf->recruitment->dir_output.'/recruitmentcandidature/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->recruitment->dir_output.'/recruitmentcandidature/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -569,14 +577,12 @@ class RecruitmentCandidature extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->status = self::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -596,8 +602,7 @@ class RecruitmentCandidature extends CommonObject public function setDraft($user, $notrigger = 0) { // Protection - if ($this->status <= self::STATUS_DRAFT) - { + if ($this->status <= self::STATUS_DRAFT) { return 0; } @@ -621,8 +626,7 @@ class RecruitmentCandidature extends CommonObject public function cancel($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_VALIDATED) - { + if ($this->status != self::STATUS_VALIDATED) { return 0; } @@ -646,8 +650,7 @@ class RecruitmentCandidature extends CommonObject public function reopen($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_REFUSED && $this->status != self::STATUS_CANCELED && $this->status != self::STATUS_CONTRACT_REFUSED) - { + if ($this->status != self::STATUS_REFUSED && $this->status != self::STATUS_CANCELED && $this->status != self::STATUS_CONTRACT_REFUSED) { return 0; } @@ -675,7 +678,9 @@ class RecruitmentCandidature extends CommonObject { global $conf, $langs, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -690,25 +695,28 @@ class RecruitmentCandidature extends CommonObject $url = dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowRecruitmentCandidature"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; @@ -717,7 +725,9 @@ class RecruitmentCandidature extends CommonObject $result .= $linkstart; if (empty($this->showphoto_on_popup)) { - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } } else { if ($withpicto) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -743,7 +753,9 @@ class RecruitmentCandidature extends CommonObject } } - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -752,8 +764,11 @@ class RecruitmentCandidature extends CommonObject $hookmanager->initHooks(array('recruitmentcandidaturedao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -780,8 +795,7 @@ class RecruitmentCandidature extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("recruitment@recruitment"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); @@ -802,7 +816,12 @@ class RecruitmentCandidature extends CommonObject $statusType = 'status'.$status; //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; - if ($status == self::STATUS_CANCELED) $statusType = 'status6'; + if ($status == self::STATUS_CANCELED) { + $statusType = 'status6'; + } + if ($status == self::STATUS_REFUSED) { + $statusType = 'status10'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -818,30 +837,25 @@ class RecruitmentCandidature extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -881,8 +895,7 @@ class RecruitmentCandidature extends CommonObject $objectline = new RecruitmentCandidatureLine($this->db); $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_recruitmentcandidature = '.$this->id)); - if (is_numeric($result)) - { + if (is_numeric($result)) { $this->error = $this->error; $this->errors = $this->errors; return $result; @@ -906,8 +919,7 @@ class RecruitmentCandidature extends CommonObject $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON = 'mod_recruitmentcandidature_standard'; } - if (!empty($conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON)) - { + if (!empty($conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON)) { $mybool = false; $file = $conf->global->RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON.".php"; @@ -915,16 +927,14 @@ class RecruitmentCandidature extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/recruitment/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -933,8 +943,7 @@ class RecruitmentCandidature extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($this); - if ($numref != '' && $numref != '-1') - { + if ($numref != '' && $numref != '-1') { return $numref; } else { $this->error = $obj->error; @@ -972,8 +981,7 @@ class RecruitmentCandidature extends CommonObject $langs->load("recruitment@recruitment"); if (!dol_strlen($modele)) { - if (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) - { + if (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) { $modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF; } else { $modele = ''; // No default value. For job application, we allow to disable all PDF generation diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 6861717d825..68fb7a1fea6 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -179,8 +179,12 @@ class RecruitmentJobPosition extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } // Example to show how to set values of fields definition dynamically /*if ($user->rights->recruitment->recruitmentjobposition->read) { @@ -189,23 +193,17 @@ class RecruitmentJobPosition extends CommonObject }*/ // Unset fields that are disabled - foreach ($this->fields as $key => $val) - { - if (isset($val['enabled']) && empty($val['enabled'])) - { + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { unset($this->fields[$key]); } } // Translate some data of arrayofkeyval - if (is_object($langs)) - { - foreach ($this->fields as $key => $val) - { - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) - { - foreach ($val['arrayofkeyval'] as $key2 => $val2) - { + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); } } @@ -245,7 +243,9 @@ class RecruitmentJobPosition extends CommonObject // Load source object $result = $object->fetchCommon($fromid); - if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } // get lines so they will be clone //foreach($this->lines as $line) @@ -257,21 +257,28 @@ class RecruitmentJobPosition extends CommonObject unset($object->import_key); // Clear fields - if (property_exists($object, 'ref')) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; - if (property_exists($object, 'label')) $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; - if (property_exists($object, 'status')) { $object->status = self::STATUS_DRAFT; } - if (property_exists($object, 'date_creation')) { $object->date_creation = dol_now(); } - if (property_exists($object, 'date_modification')) { $object->date_modification = null; } + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DRAFT; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } // ... // Clear extrafields that are unique - if (is_array($object->array_options) && count($object->array_options) > 0) - { + if (is_array($object->array_options) && count($object->array_options) > 0) { $extrafields->fetch_name_optionals_label($this->table_element); - foreach ($object->array_options as $key => $option) - { + foreach ($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); - if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) - { + if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) { //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($object->array_options[$key]); } @@ -287,22 +294,19 @@ class RecruitmentJobPosition extends CommonObject $this->errors = $object->errors; } - if (!$error) - { + if (!$error) { // copy internal contacts - if ($this->copy_linked_contact($object, 'internal') < 0) - { + if ($this->copy_linked_contact($object, 'internal') < 0) { $error++; } } - if (!$error) - { + if (!$error) { // copy external contacts if same company - if (property_exists($this, 'socid') && $this->socid == $object->socid) - { - if ($this->copy_linked_contact($object, 'external') < 0) + if (property_exists($this, 'socid') && $this->socid == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { $error++; + } } } @@ -328,7 +332,9 @@ class RecruitmentJobPosition extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } return $result; } @@ -368,8 +374,11 @@ class RecruitmentJobPosition extends CommonObject $sql = 'SELECT '; $sql .= $this->getFieldList(); $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; - else $sql .= ' WHERE 1 = 1'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } // Manage filter $sqlwhere = array(); if (count($filter) > 0) { @@ -402,8 +411,7 @@ class RecruitmentJobPosition extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < ($limit ? min($limit, $num) : $num)) - { + while ($i < ($limit ? min($limit, $num) : $num)) { $obj = $this->db->fetch_object($resql); $record = new self($this->db); @@ -459,8 +467,7 @@ class RecruitmentJobPosition extends CommonObject */ public function deleteLine(User $user, $idline, $notrigger = false) { - if ($this->status < 0) - { + if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -485,8 +492,7 @@ class RecruitmentJobPosition extends CommonObject $error = 0; // Protection - if ($this->status == self::STATUS_VALIDATED) - { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); return 0; } @@ -504,8 +510,7 @@ class RecruitmentJobPosition extends CommonObject $this->db->begin(); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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 { $num = $this->ref; @@ -517,57 +522,58 @@ class RecruitmentJobPosition extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql .= " SET ref = '".$this->db->escape($num)."',"; $sql .= " status = ".self::STATUS_VALIDATED; - if (!empty($this->fields['date_validation'])) $sql .= ", date_validation = '".$this->db->idate($now)."',"; - if (!empty($this->fields['fk_user_valid'])) $sql .= ", fk_user_valid = ".$user->id; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."',"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".$user->id; + } $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::validate()", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $this->error = $this->db->lasterror(); $error++; } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('RECRUITMENTJOBPOSITION_VALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'recruitmentjobposition/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'recruitmentjobposition/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->recruitment->dir_output.'/recruitmentjobposition/'.$oldref; $dirdest = $conf->recruitment->dir_output.'/recruitmentjobposition/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->recruitment->dir_output.'/recruitmentjobposition/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -580,14 +586,12 @@ class RecruitmentJobPosition extends CommonObject } // Set new ref and current status - if (!$error) - { + if (!$error) { $this->ref = $num; $this->status = self::STATUS_VALIDATED; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -607,8 +611,7 @@ class RecruitmentJobPosition extends CommonObject public function setDraft($user, $notrigger = 0) { // Protection - if ($this->status <= self::STATUS_DRAFT) - { + if ($this->status <= self::STATUS_DRAFT) { return 0; } @@ -632,8 +635,7 @@ class RecruitmentJobPosition extends CommonObject public function cancel($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_VALIDATED) - { + if ($this->status != self::STATUS_VALIDATED) { return 0; } @@ -668,35 +670,30 @@ class RecruitmentJobPosition extends CommonObject $newprivatenote = dol_concatdesc($this->note_private, $note); $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET status = ".$status.", note_private = '".$this->db->escape($newprivatenote)."'"; + $sql .= " SET status = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."'"; //$sql .= ", date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $modelpdf = $this->model_pdf; $triggerName = 'RECRUITMENTJOB_CLOSE_REFUSED'; - if ($status == self::STATUS_RECRUITED) - { + if ($status == self::STATUS_RECRUITED) { $triggerName = 'RECRUITMENTJOB_CLOSE_RECRUITED'; $modelpdf = $this->model_pdf; - if ($result < 0) - { + if ($result < 0) { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; } } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { $outputlangs = new Translate("", $conf); $newlang = (GETPOST('lang_id', 'aZ09') ? GETPOST('lang_id', 'aZ09') : $this->thirdparty->default_lang); $outputlangs->setDefaultLang($newlang); @@ -705,24 +702,23 @@ class RecruitmentJobPosition extends CommonObject $this->generateDocument($modelpdf, $outputlangs); } - if (!$error) - { + if (!$error) { $this->oldcopy = clone $this; $this->status = $status; $this->date_cloture = $now; $this->note_private = $newprivatenote; } - if (!$notrigger && empty($error)) - { + if (!$notrigger && empty($error)) { // Call trigger $result = $this->call_trigger($triggerName, $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -750,8 +746,7 @@ class RecruitmentJobPosition extends CommonObject public function reopen($user, $notrigger = 0) { // Protection - if ($this->status != self::STATUS_CANCELED) - { + if ($this->status != self::STATUS_CANCELED) { return 0; } @@ -779,7 +774,9 @@ class RecruitmentJobPosition extends CommonObject { global $conf, $langs, $hookmanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -793,25 +790,28 @@ class RecruitmentJobPosition extends CommonObject $url = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowRecruitmentJobPosition"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; @@ -820,7 +820,9 @@ class RecruitmentJobPosition extends CommonObject $result .= $linkstart; if (empty($this->showphoto_on_popup)) { - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } } else { if ($withpicto) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -846,7 +848,9 @@ class RecruitmentJobPosition extends CommonObject } } - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -855,8 +859,11 @@ class RecruitmentJobPosition extends CommonObject $hookmanager->initHooks(array('recruitmentjobpositiondao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -883,8 +890,7 @@ class RecruitmentJobPosition extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("recruitment"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); @@ -898,9 +904,15 @@ class RecruitmentJobPosition extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; - if ($status == self::STATUS_RECRUITED) $statusType = 'status6'; - if ($status == self::STATUS_CANCELED) $statusType = 'status9'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } + if ($status == self::STATUS_RECRUITED) { + $statusType = 'status6'; + } + if ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -916,30 +928,25 @@ class RecruitmentJobPosition extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -993,8 +1000,7 @@ class RecruitmentJobPosition extends CommonObject $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON = 'mod_recruitmentjobposition_standard'; } - if (!empty($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON)) - { + if (!empty($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON)) { $mybool = false; $file = $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON.".php"; @@ -1002,16 +1008,14 @@ class RecruitmentJobPosition extends CommonObject // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/recruitment/"); // Load file with numbering class (if found) $mybool |= @include_once $dir.$file; } - if ($mybool === false) - { + if ($mybool === false) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -1020,8 +1024,7 @@ class RecruitmentJobPosition extends CommonObject $obj = new $classname(); $numref = $obj->getNextValue($this); - if ($numref != '' && $numref != '-1') - { + if ($numref != '' && $numref != '-1') { return $numref; } else { $this->error = $obj->error; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php index 59ea51466b6..054443a5be5 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php @@ -48,9 +48,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document @@ -98,7 +98,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // Recupere emetteur $this->emetteur = $mysoc; - if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + if (!$this->emetteur->country_code) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined + } } @@ -129,8 +131,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $texttitle = $langs->trans("ListOfDirectories"); $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH))); $listoffiles = array(); - foreach ($listofdir as $key=>$tmpdir) - { + foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); if (!$tmpdir) { @@ -140,7 +141,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $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); + if (count($tmpfiles)) { + $listoffiles = array_merge($listoffiles, $tmpfiles); + } } } $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT"); @@ -159,8 +162,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // Scan directories $nbofiles = count($listoffiles); - if (!empty($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH)) - { + if (!empty($conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH)) { $texte .= $langs->trans("NumberOfModelFilesFound").': <b>'; //$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':''; $texte .= count($listoffiles); @@ -168,11 +170,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $texte .= '</b>'; } - if ($nbofiles) - { + if ($nbofiles) { $texte .= '<div id="div_'.get_class($this).'" class="hidden">'; - foreach ($listoffiles as $file) - { + foreach ($listoffiles as $file) { $texte .= $file['name'].'<br>'; } $texte .= '</div>'; @@ -208,37 +208,34 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; - if (empty($srctemplatepath)) - { + if (empty($srctemplatepath)) { dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING); return -1; } // Add odtgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('odtgeneration')); global $action; - if (!is_object($outputlangs)) $outputlangs = $langs; + if (!is_object($outputlangs)) { + $outputlangs = $langs; + } $sav_charset_output = $outputlangs->charset_output; $outputlangs->charset_output = 'UTF-8'; $outputlangs->loadLangs(array("main", "dict", "companies", "bills")); - if ($conf->commande->dir_output) - { + if ($conf->commande->dir_output) { // If $object is id instead of object - if (!is_object($object)) - { + if (!is_object($object)) { $id = $object; $object = new Commande($this->db); $result = $object->fetch($id); - if ($result < 0) - { + if ($result < 0) { dol_print_error($this->db, $object->error); return -1; } @@ -246,20 +243,19 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $dir = $conf->commande->multidir_output[isset($object->entity) ? $object->entity : 1]; $objectref = dol_sanitizeFileName($object->ref); - if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref; + if (!preg_match('/specimen/i', $objectref)) { + $dir .= "/".$objectref; + } $file = $dir."/".$objectref.".odt"; - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { //print "srctemplatepath=".$srctemplatepath; // Src filename $newfile = basename($srctemplatepath); $newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile); @@ -269,10 +265,11 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; // Get extension (ods or odt) $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); - if (!empty($conf->global->MAIN_DOC_USE_TIMING)) - { + if (!empty($conf->global->MAIN_DOC_USE_TIMING)) { $format = $conf->global->MAIN_DOC_USE_TIMING; - if ($format == '1') $format = '%Y%m%d%H%M%S'; + if ($format == '1') { + $format = '%Y%m%d%H%M%S'; + } $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; } else { $filename = $newfiletmp.'.'.$newfileformat; @@ -289,16 +286,14 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // If CUSTOMER contact defined on order, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'CUSTOMER'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } // Recipient name $contactobject = null; - if (!empty($usecontact)) - { + if (!empty($usecontact)) { if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) { $socobject = $object->contact; } else { @@ -326,8 +321,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // Line of free text $newfreetext = ''; $paramfreetext = 'ORDER_FREE_TEXT'; - if (!empty($conf->global->$paramfreetext)) - { + if (!empty($conf->global->$paramfreetext)) { $newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray); } @@ -343,8 +337,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi 'DELIMITER_RIGHT' => '}' ) ); - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); return -1; @@ -359,8 +352,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // 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); } @@ -374,7 +366,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $array_other = $this->get_substitutionarray_other($outputlangs); // retrieve contact information for use in object as contact_xxx tags $array_thirdparty_contact = array(); - if ($usecontact && is_object($contactobject)) $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + if ($usecontact && is_object($contactobject)) { + $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact'); + } $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); @@ -383,19 +377,20 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { if (preg_match('/logo$/', $key)) { // Image - if (file_exists($value)) $odfHandler->setImage($key, $value); - else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + if (file_exists($value)) { + $odfHandler->setImage($key, $value); + } else { + $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); + } } else { // Text $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -404,32 +399,26 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $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; dol_syslog($e->getMessage(), LOG_INFO); } - if ($foundtagforlines) - { + if ($foundtagforlines) { $linenumber = 0; - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { $linenumber++; $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - foreach ($tmparray as $key => $val) - { + foreach ($tmparray as $key => $val) { 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); } } @@ -437,8 +426,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi } $odfHandler->mergeSegment($listlines); } - } catch (OdfException $e) - { + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); return -1; @@ -446,12 +434,10 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi // Replace labels translated $tmparray = $outputlangs->get_translations_for_substitutions(); - foreach ($tmparray as $key=>$value) - { + foreach ($tmparray as $key => $value) { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } catch (OdfException $e) - { + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } @@ -483,8 +469,9 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $odfHandler = null; // Destroy object diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 5f257f594cf..fcbbdb76930 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -70,9 +70,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio /** * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) + * e.g.: PHP ≥ 5.6 = array(5, 6) */ - public $phpmin = array(5, 5); + public $phpmin = array(5, 6); /** * Dolibarr version of the loaded document @@ -128,7 +128,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio /** - * @var array of document table collumns + * @var array of document table columns */ public $cols; @@ -174,7 +174,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // 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 + if (empty($this->emetteur->country_code)) { + $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined + } // Define position of columns $this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff @@ -212,9 +214,13 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; + 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 (!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")); @@ -237,67 +243,65 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $realpatharray = array(); $this->atleastonephoto = false; /* - if (!empty($conf->global->MAIN_GENERATE_MYOBJECT_WITH_PICTURE)) - { - $objphoto = new Product($this->db); + if (!empty($conf->global->MAIN_GENERATE_MYOBJECT_WITH_PICTURE)) + { + $objphoto = new Product($this->db); - for ($i = 0; $i < $nblines; $i++) - { - if (empty($object->lines[$i]->fk_product)) continue; + for ($i = 0; $i < $nblines; $i++) + { + if (empty($object->lines[$i]->fk_product)) continue; - $objphoto->fetch($object->lines[$i]->fk_product); - //var_dump($objphoto->ref);exit; - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { - $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; - $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; - } else { - $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default - $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative - } + $objphoto->fetch($object->lines[$i]->fk_product); + //var_dump($objphoto->ref);exit; + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) + { + $pdir[0] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; + $pdir[1] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; + } else { + $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default + $pdir[1] = get_exdir($objphoto->id, 2, 0, 0, $objphoto, 'product').$objphoto->id."/photos/"; // alternative + } - $arephoto = false; - foreach ($pdir as $midir) - { - if (!$arephoto) - { - $dir = $conf->product->dir_output.'/'.$midir; + $arephoto = false; + foreach ($pdir as $midir) + { + if (!$arephoto) + { + $dir = $conf->product->dir_output.'/'.$midir; - foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) - { - if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo - { - if ($obj['photo_vignette']) - { - $filename = $obj['photo_vignette']; - } else { - $filename = $obj['photo']; - } - } else { - $filename = $obj['photo']; - } + foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) + { + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + { + if ($obj['photo_vignette']) + { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } + } else { + $filename = $obj['photo']; + } - $realpath = $dir.$filename; - $arephoto = true; - $this->atleastonephoto = true; - } - } - } + $realpath = $dir.$filename; + $arephoto = true; + $this->atleastonephoto = true; + } + } + } - if ($realpath && $arephoto) $realpatharray[$i] = $realpath; - } - } + if ($realpath && $arephoto) $realpatharray[$i] = $realpath; + } + } */ //if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva; - if ($conf->recruitment->dir_output.'/recruitmentjobposition') - { + if ($conf->recruitment->dir_output.'/recruitmentjobposition') { $object->fetch_thirdparty(); // Definition of $dir and $file - if ($object->specimen) - { + if ($object->specimen) { $dir = $conf->recruitment->dir_output.'/recruitmentjobposition'; $file = $dir."/SPECIMEN.pdf"; } else { @@ -305,20 +309,16 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $dir = $conf->recruitment->dir_output.'/recruitmentjobposition/'.$objectref; $file = $dir."/".$objectref.".pdf"; } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { + if (!file_exists($dir)) { + if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { // Add pdfgeneration hook - if (!is_object($hookmanager)) - { + if (!is_object($hookmanager)) { include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; $hookmanager = new HookManager($this->db); } @@ -339,16 +339,14 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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')) - { + 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)) - { + 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); } @@ -362,7 +360,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->SetCreator("Dolibarr ".DOL_VERSION); $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$object->label." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) { + $pdf->SetCompression(false); + } // Set certificate $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; @@ -385,7 +385,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); @@ -397,7 +399,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $tab_height_newpage -= $top_shift; + } $nexY = $tab_top - 1; @@ -405,14 +409,12 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $notetoshow = empty($object->note_public) ? '' : $object->note_public; // Extrafields in note $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { + if (!empty($extranote)) { $notetoshow = dol_concatdesc($notetoshow, $extranote); } $pagenb = $pdf->getPage(); - if ($notetoshow) - { + if ($notetoshow) { $tab_top -= 2; $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; @@ -431,16 +433,19 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pageposafternote = $pdf->getPage(); $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { + 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); + 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. @@ -456,8 +461,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) { // There is no space left for total+free text $pdf->AddPage('', '', true); $pagenb++; $pageposafternote++; @@ -494,8 +498,12 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // 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); + 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 @@ -505,15 +513,18 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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))) - { + 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 (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } $posyafter = $tab_top_newpage; } @@ -538,15 +549,16 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // Loop on each lines $pageposbeforeprintlines = $pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { + 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]); + 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. @@ -555,25 +567,26 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $showpricebeforepagebreak = 1; $posYAfterImage = 0; - if ($this->getColumnStatus('photo')) - { + 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 - { + 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); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pdf->setPage($pageposbefore + 1); $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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($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']; @@ -581,15 +594,13 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio } // Description of product line - if ($this->getColumnStatus('desc')) - { + if ($this->getColumnStatus('desc')) { $pdf->startTransaction(); $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { + 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. @@ -598,20 +609,22 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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 - { + 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); + 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)) + if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) { $showpricebeforepagebreak = 1; - else $showpricebeforepagebreak = 0; + } else { + $showpricebeforepagebreak = 0; + } } } else // No pagebreak { @@ -659,7 +672,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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 (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) { @@ -671,15 +686,18 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $this->_pagefoot($pdf, $object, $outputlangs, 1); // New page $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (!empty($tplidx)) { + $pdf->useTemplate($tplidx); + } $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) { + $this->_pagehead($pdf, $object, 0, $outputlangs); + } } } // Show square - if ($pagenb == $pageposbeforeprintlines) - { + 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 { @@ -695,15 +713,17 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // 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); - } - */ + 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(); + if (method_exists($pdf, 'AliasNbPages')) { + $pdf->AliasNbPages(); + } $pdf->Close(); @@ -714,14 +734,14 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $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) - { + if ($reshook < 0) { $this->error = $hookmanager->error; $this->errors = $hookmanager->errors; } - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($file, octdec($conf->global->MAIN_UMASK)); + } $this->result = array('fullpath'=>$file); @@ -771,7 +791,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // Force to disable hidetop and hidebottom $hidebottom = 0; - if ($hidetop) $hidetop = -1; + if ($hidetop) { + $hidetop = -1; + } $currency = !empty($currency) ? $currency : $conf->currency; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -780,8 +802,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('', '', $default_font_size - 2); - if (empty($hidetop)) - { + if (empty($hidetop)) { //$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230'; if (!empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) { $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', $conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)); @@ -825,8 +846,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($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); } @@ -841,20 +861,18 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->SetXY($this->marge_gauche, $posy); // Logo - if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) - { - if ($this->emetteur->logo) - { + if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) { + if ($this->emetteur->logo) { $logodir = $conf->mycompany->dir_output; - if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity]; - if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) - { + if (!empty($conf->mycompany->multidir_output[$object->entity])) { + $logodir = $conf->mycompany->multidir_output[$object->entity]; + } + if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) { $logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small; } else { $logo = $logodir.'/logos/'.$this->emetteur->logo; } - if (is_readable($logo)) - { + if (is_readable($logo)) { $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { @@ -885,8 +903,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) - { + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); } @@ -895,19 +912,16 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); - if ($object->ref_client) - { + if ($object->ref_client) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } - if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -915,15 +929,24 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio } } - if (!empty($conf->global->PDF_SHOW_PROJECT)) - { + if (!empty($conf->global->PDF_SHOW_PROJECT_TITLE)) { $object->fetch_projet(); - if (!empty($object->project->ref)) - { + if (!empty($object->project->ref)) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R'); + } + } + + if (!empty($conf->global->PDF_SHOW_PROJECT)) { + $object->fetch_projet(); + if (!empty($object->project->ref)) { + $outputlangs->load("projects"); + $posy += 3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R'); } } @@ -937,8 +960,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio } $pdf->MultiCell($w, 3, $title." : ".dol_print_date($object->date_creation, "day", false, $outputlangs), '', 'R'); - if ($object->thirdparty->code_client) - { + if ($object->thirdparty->code_client) { $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); @@ -951,13 +973,11 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // Show list of linked objects $current_y = $pdf->getY(); $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size); - if ($current_y < $pdf->getY()) - { + if ($current_y < $pdf->getY()) { $top_shift = $pdf->getY() - $current_y; } - if ($showaddress) - { + if ($showaddress) { // Sender properties $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object); @@ -965,7 +985,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42; $posy += $top_shift; $posx = $this->marge_gauche; - if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx = $this->page_largeur - $this->marge_droite - 80; + if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { + $posx = $this->page_largeur - $this->marge_droite - 80; + } $hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40; $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; @@ -995,8 +1017,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // If BILLING contact defined on invoice, we use it $usecontact = false; $arrayidcontact = $object->getIdContact('external', 'BILLING'); - if (count($arrayidcontact) > 0) - { + if (count($arrayidcontact) > 0) { $usecontact = true; $result = $object->fetch_contact($arrayidcontact[0]); } @@ -1091,162 +1112,162 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio ); /* - * For exemple - $this->cols['theColKey'] = array( - 'rank' => $rank, // int : use for ordering columns - 'width' => 20, // the column width in mm - 'title' => array( - 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - 'label' => ' ', // the final label : used fore final generated text - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', // text alignement : R,C,L - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); - */ + * For exemple + $this->cols['theColKey'] = array( + 'rank' => $rank, // int : use for ordering columns + 'width' => 20, // the column width in mm + 'title' => array( + 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + 'label' => ' ', // the final label : used fore final generated text + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', // text alignement : R,C,L + 'padding' => array(0.5,0.5,0.5,0.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 - ), - ); + $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 (!empty($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 (!empty($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( @@ -1258,11 +1279,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio ); $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { + } 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/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php index 61e04b9000e..192d1d4c526 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php @@ -96,13 +96,13 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -133,11 +133,13 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_recruitmentcandidature_standard::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +149,11 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida $date = $object->date_creation; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_recruitmentcandidature_standard::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index a86337b288a..311eb7e1b36 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -113,8 +113,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi /*$mysoc->code_client = $old_code_client; $mysoc->typent_code = $old_code_type;*/ - if (!$numExample) - { + if (!$numExample) { $numExample = $langs->trans('NotConfigured'); } return $numExample; @@ -135,8 +134,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi // We get cursor rule $mask = $conf->global->RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK; - if (!$mask) - { + if (!$mask) { $this->error = 'NotConfigured'; return 0; } diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php index 4b3aba946bb..b2b413ee508 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php @@ -96,13 +96,13 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $row = $db->fetch_row($resql); - if ($row) { $coyymm = substr($row[0], 0, 6); $max = $row[0]; } + if ($row) { + $coyymm = substr($row[0], 0, 6); $max = $row[0]; + } } - if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) - { + if ($coyymm && !preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) { $langs->load("errors"); $this->error = $langs->trans('ErrorNumRefModel', $max); return false; @@ -133,11 +133,13 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $max = intval($obj->max); - else $max = 0; + if ($obj) { + $max = intval($obj->max); + } else { + $max = 0; + } } else { dol_syslog("mod_recruitmentjobposition_standard::getNextValue", LOG_DEBUG); return -1; @@ -147,8 +149,11 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi $date = $object->date_creation; $yymm = strftime("%y%m", $date); - if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is - else $num = sprintf("%04s", $max + 1); + if ($max >= (pow(10, 4) - 1)) { + $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is + } else { + $num = sprintf("%04s", $max + 1); + } dol_syslog("mod_recruitmentjobposition_standard::getNextValue return ".$this->prefix.$yymm."-".$num); return $this->prefix.$yymm."-".$num; diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php index a4ec3ac75b6..84bfd30401c 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php @@ -141,10 +141,18 @@ abstract class ModeleNumRefRecruitmentCandidature global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php index 482964764ef..dd9aa49ab10 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php @@ -141,10 +141,18 @@ abstract class ModeleNumRefRecruitmentJobPosition global $langs; $langs->load("admin"); - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); - if ($this->version == 'dolibarr') return DOL_VERSION; - if ($this->version) return $this->version; + if ($this->version == 'development') { + return $langs->trans("VersionDevelopment"); + } + if ($this->version == 'experimental') { + return $langs->trans("VersionExperimental"); + } + if ($this->version == 'dolibarr') { + return DOL_VERSION; + } + if ($this->version) { + return $this->version; + } return $langs->trans("NotAvailable"); } } diff --git a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php index 661f5ccc984..759e627bf59 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php @@ -48,14 +48,19 @@ function recruitmentCandidaturePrepareHead($object) $h++; } - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) - { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = dol_buildpath('/recruitment/recruitmentcandidature_note.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + if ($nbNote > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + } $head[$h][2] = 'note'; $h++; } @@ -67,7 +72,9 @@ function recruitmentCandidaturePrepareHead($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = dol_buildpath("/recruitment/recruitmentcandidature_document.php", 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php index dbf4ef5040c..a7bfe03aac4 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php @@ -48,14 +48,19 @@ function recruitmentjobpositionPrepareHead($object) $h++; } - if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) - { + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = dol_buildpath('/recruitment/recruitmentjobposition_note.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + if ($nbNote > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + } $head[$h][2] = 'note'; $h++; } @@ -67,7 +72,9 @@ function recruitmentjobpositionPrepareHead($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = dol_buildpath("/recruitment/recruitmentjobposition_document.php", 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } $head[$h][2] = 'document'; $h++; @@ -113,17 +120,21 @@ function getPublicJobPositionUrl($mode, $ref = '', $localorexternal = 0) //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current $urltouse = DOL_MAIN_URL_ROOT; - if ($localorexternal) $urltouse = $urlwithroot; + if ($localorexternal) { + $urltouse = $urlwithroot; + } $out = $urltouse.'/public/recruitment/view.php?ref='.($mode ? '<font color="#666666">' : '').$ref.($mode ? '</font>' : ''); /*if (!empty($conf->global->RECRUITMENT_SECURITY_TOKEN)) { - if (empty($conf->global->RECRUITMENT_SECURITY_TOKEN)) $out .= '&securekey='.$conf->global->RECRUITMENT_SECURITY_TOKEN; - else $out .= '&securekey='.dol_hash($conf->global->RECRUITMENT_SECURITY_TOKEN, 2); + if (empty($conf->global->RECRUITMENT_SECURITY_TOKEN)) $out .= '&securekey='.urlencode($conf->global->RECRUITMENT_SECURITY_TOKEN); + else $out .= '&securekey='.urlencode(dol_hash($conf->global->RECRUITMENT_SECURITY_TOKEN, 2)); }*/ // For multicompany - if (!empty($out) && !empty($conf->multicompany->enabled)) $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities + if (!empty($out) && !empty($conf->multicompany->enabled)) { + $out .= "&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities + } return $out; } diff --git a/htdocs/recruitment/recruitmentcandidature_agenda.php b/htdocs/recruitment/recruitmentcandidature_agenda.php index c125a14c647..01ac72065ea 100644 --- a/htdocs/recruitment/recruitmentcandidature_agenda.php +++ b/htdocs/recruitment/recruitmentcandidature_agenda.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -56,7 +72,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -66,12 +84,18 @@ $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical objects $object = new RecruitmentCandidature($db); @@ -83,14 +107,17 @@ $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->recruitment->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; +} + +$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'recruitment', $object->id); - -$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -99,20 +126,19 @@ $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -126,14 +152,15 @@ if (empty($reshook)) $form = new Form($db); -if ($object->id > 0) -{ +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 = ''; + $help_url = 'Module_Agenda_En'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = recruitmentCandidaturePrepareHead($object); @@ -206,10 +233,11 @@ if ($object->id > 0) $out = '&origin='.$object->element.'@recruitment&originid='.$object->id; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objthirdparty) == 'Societe') $out .= '&amp;socid='.$objthirdparty->id; + if (get_class($objthirdparty) == 'Societe') { + $out .= '&amp;socid='.$objthirdparty->id; + } $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;backtopage=1&amp;percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); @@ -219,10 +247,8 @@ if ($object->id > 0) print '<div class="tabsAction">'; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; @@ -231,11 +257,14 @@ if ($object->id > 0) print '</div>'; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } //print load_fiche_titre($langs->trans("ActionsOnRecruitmentJobPosition"), '', ''); diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 0a0cf4c061d..4826dc735ef 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -44,17 +44,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -92,12 +108,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -113,10 +132,8 @@ $upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $obje // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, 'recruitment', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - -//if (!$permissiontoread) accessforbidden(); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -125,18 +142,22 @@ $upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $obje $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/recruitment/recruitmentcandidature_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_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } $triggermodname = 'RECRUITMENTCANDIDATURE_MODIFY'; // Name of trigger action code to execute when we modify record @@ -156,8 +177,7 @@ if (empty($reshook)) // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } if ($action == 'confirm_decline' && $confirm == 'yes' && $permissiontoadd) { @@ -173,8 +193,7 @@ if (empty($reshook)) $action = 'makeofferordecline'; } else { // prevent browser refresh from closing proposal several times - if ($object->status == $object::STATUS_VALIDATED) - { + if ($object->status == $object::STATUS_VALIDATED) { $db->begin(); if (GETPOST('status', 'int') == $object::STATUS_REFUSED) { @@ -189,8 +208,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -205,8 +223,7 @@ if (empty($reshook)) $action = 'makeofferordecline'; } else { // prevent browser refresh from closing proposal several times - if ($object->status == $object::STATUS_CONTRACT_PROPOSED) - { + if ($object->status == $object::STATUS_CONTRACT_PROPOSED) { $db->begin(); if (GETPOST('status', 'int') == $object::STATUS_CONTRACT_REFUSED) { @@ -221,8 +238,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -306,15 +322,18 @@ jQuery(document).ready(function() { // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("RecruitmentCandidature")), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(array(), ''); @@ -345,16 +364,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("RecruitmentCandidature"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -378,8 +400,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = recruitmentcandidaturePrepareHead($object); @@ -402,8 +423,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if ($action == 'makeofferordecline') - { + if ($action == 'makeofferordecline') { $langs->load("propal"); //Form to close proposal (signed or not) @@ -417,8 +437,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_makeofferordecline', $formquestion, '', 1, 250); } - if ($action == 'closeas') - { + if ($action == 'closeas') { $langs->load("propal"); //Form to close proposal (signed or not) @@ -440,7 +459,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $login = dol_buildlogin($object->lastname, $object->firstname); } - if (empty($login)) $login = strtolower(substr($object->firstname, 0, 4)).strtolower(substr($object->lastname, 0, 4)); + if (empty($login)) { + $login = strtolower(substr($object->firstname, 0, 4)).strtolower(substr($object->lastname, 0, 4)); + } // Create a form array $formquestion = array( @@ -453,8 +474,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -529,100 +553,40 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); - - /* - * Lines - */ - - if (!empty($object->table_element_line)) - { - // Show object lines - $result = $object->getLinesArray(); - - print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> - <input type="hidden" name="token" value="' . newToken().'"> - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> - <input type="hidden" name="mode" value=""> - <input type="hidden" name="id" value="' . $object->id.'"> - '; - - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print '<div class="div-table-responsive-no-min">'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { - print '<table id="tablelines" class="noborder noshadow" width="100%">'; - } - - if (!empty($object->lines)) - { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); - } - - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') - { - if ($action != 'editline') - { - // Add products/services form - $object->formAddObjectLine(1, $mysoc, $soc); - - $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 '</table>'; - } - print '</div>'; - - print "</form>\n"; - } - - // Buttons for actions if ($action != 'presend' && $action != 'editline') { print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&sendto='.urlencode($object->email).'#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n"; } // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_VALIDATED) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>'; } } // Modify - if ($permissiontoadd) - { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n"; } // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>'; } else { $langs->load("errors"); @@ -632,32 +596,26 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Make offer - Refuse - Decline - if ($object->status >= $object::STATUS_VALIDATED && $object->status < $object::STATUS_CONTRACT_PROPOSED) - { - if ($permissiontoadd) - { + if ($object->status >= $object::STATUS_VALIDATED && $object->status < $object::STATUS_CONTRACT_PROPOSED) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=makeofferordecline">'.$langs->trans("MakeOffer").' / '.$langs->trans("Decline").'</a>'; } } // Contract refused / accepted - if ($object->status == $object::STATUS_CONTRACT_PROPOSED) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_CONTRACT_PROPOSED) { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=closeas">'.$langs->trans("Accept").' / '.$langs->trans("Decline").'</a>'; } } // Clone - if ($permissiontoadd) - { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=recruitmentcandidature">'.$langs->trans("ToClone").'</a>'."\n"; } // Button to convert into a user - if ($object->status == $object::STATUS_CONTRACT_SIGNED) - { + if ($object->status == $object::STATUS_CONTRACT_SIGNED) { if ($user->rights->user->user->creer) { // TODO Check if a user already exists $useralreadyexists = 0; @@ -672,21 +630,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Cancel - if ($permissiontoadd) - { - if ($object->status == $object::STATUS_VALIDATED) - { + if ($permissiontoadd) { + if ($object->status == $object::STATUS_VALIDATED) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close">'.$langs->trans("Cancel").'</a>'."\n"; - } - elseif ($object->status == $object::STATUS_REFUSED || $object->status == $object::STATUS_CANCELED || $object->status == $object::STATUS_CONTRACT_REFUSED) - { + } elseif ($object->status == $object::STATUS_REFUSED || $object->status == $object::STATUS_CANCELED || $object->status == $object::STATUS_CONTRACT_REFUSED) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n"; } } // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) - { + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n"; @@ -701,8 +654,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -741,7 +693,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'recruitmentcandidature_send'; diff --git a/htdocs/recruitment/recruitmentcandidature_document.php b/htdocs/recruitment/recruitmentcandidature_document.php index ad8a48db84c..24b9f6d4e67 100644 --- a/htdocs/recruitment/recruitmentcandidature_document.php +++ b/htdocs/recruitment/recruitmentcandidature_document.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -58,12 +74,18 @@ $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 = $liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} //if (! $sortfield) $sortfield="position_name"; // Initialize technical objects @@ -77,12 +99,15 @@ $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->recruitment->multidir_output[$object->entity ? $object->entity : $conf->entity]."/recruitmentcandidature/".get_exdir(0, 0, 0, 1, $object); +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity ? $object->entity : $conf->entity]."/recruitmentcandidature/".get_exdir(0, 0, 0, 1, $object); +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'recruitment', $object->id); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft); $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php @@ -92,7 +117,7 @@ $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -106,8 +131,7 @@ $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -119,8 +143,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php index 70d3bc3be4d..8f8ac25c577 100644 --- a/htdocs/recruitment/recruitmentcandidature_list.php +++ b/htdocs/recruitment/recruitmentcandidature_list.php @@ -44,17 +44,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -86,7 +102,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -104,28 +122,33 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { $visible = dol_eval($val['visible'], 1); @@ -138,10 +161,8 @@ foreach ($object->fields as $key => $val) } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -159,16 +180,11 @@ $permissiontoread = $user->rights->recruitment->recruitmentjobposition->read; $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; $permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete; -// Security check -if (empty($conf->recruitment->enabled)) accessforbidden('Module not enabled'); -$socid = 0; -if ($user->socid > 0) // Protection if external user -{ - //$socid = $user->socid; - accessforbidden(); -} -//$result = restrictedArea($user, 'recruitment', $id, ''); -//if (!$permissiontoread) accessforbidden(); +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', 0, 'recruitment_recruitmentcandidature', 'recruitmentjobposition'); @@ -176,31 +192,33 @@ if ($user->socid > 0) // Protection if external user * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -229,13 +247,14 @@ $title = $langs->trans('ListOfCandidatures'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -243,20 +262,32 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje $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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -286,26 +317,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -314,8 +343,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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('/recruitment/recruitmentcandidature_card.php', 1).'?id='.$id); @@ -346,30 +374,46 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - 'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -389,9 +433,10 @@ $objecttmp = new RecruitmentCandidature($db); $trackid = 'xxxx'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -402,11 +447,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -423,20 +470,26 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -458,15 +511,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -483,11 +539,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -496,38 +552,51 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) - { + 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('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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -540,14 +609,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -558,10 +630,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -577,10 +652,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index c0673b35c52..d4c18155c5d 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} dol_include_once('/recruitment/class/recruitmentcandidature.class.php'); dol_include_once('/recruitment/lib/recruitment_recruitmentcandidature.lib.php'); @@ -58,18 +74,20 @@ $hookmanager->initHooks(array('recruitmentjobpositionnote', 'globalcard')); // N // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'recruitment', $id); - // 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->recruitment->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; +} $permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -89,8 +107,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans('RecruitmentCandidature'), $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = recruitmentCandidaturePrepareHead($object); diff --git a/htdocs/recruitment/recruitmentindex.php b/htdocs/recruitment/recruitmentindex.php index a8649abbd21..3b6ff756b3c 100644 --- a/htdocs/recruitment/recruitmentindex.php +++ b/htdocs/recruitment/recruitmentindex.php @@ -38,8 +38,7 @@ $action = GETPOST('action', 'aZ09'); // Security check //if (! $user->rights->recruitment->myobject->read) accessforbidden(); $socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) -{ +if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -75,16 +74,14 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; * Statistics */ -if ($conf->use_javascript_ajax) -{ +if ($conf->use_javascript_ajax) { $sql = "SELECT COUNT(t.rowid) as nb, status"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as t"; $sql .= " GROUP BY t.status"; $sql .= " ORDER BY t.status ASC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -93,13 +90,11 @@ if ($conf->use_javascript_ajax) $colorseries = array(); $vals = array(); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $vals[$obj->status] = $obj->nb; $totalnb += $obj->nb; @@ -112,24 +107,29 @@ if ($conf->use_javascript_ajax) print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("JobPositions").'</th></tr>'."\n"; $listofstatus = array(0, 1, 3, 9); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array(dol_html_entity_decode($staticrecruitmentjobposition->LibStatut($status, 1), ENT_QUOTES | ENT_HTML5), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == RecruitmentJobPosition::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == RecruitmentJobPosition::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus4; - if ($status == RecruitmentJobPosition::STATUS_RECRUITED) $colorseries[$status] = $badgeStatus6; - if ($status == RecruitmentJobPosition::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; + if ($status == RecruitmentJobPosition::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == RecruitmentJobPosition::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == RecruitmentJobPosition::STATUS_RECRUITED) { + $colorseries[$status] = $badgeStatus6; + } + if ($status == RecruitmentJobPosition::STATUS_CANCELED) { + $colorseries[$status] = $badgeStatus9; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print '<tr class="oddeven">'; print '<td>'.$staticrecruitmentjobposition->LibStatut($status, 0).'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -159,8 +159,7 @@ if ($conf->use_javascript_ajax) $sql .= " ORDER BY t.status ASC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -169,13 +168,11 @@ if ($conf->use_javascript_ajax) $colorseries = array(); $vals = array(); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $vals[$obj->status] = $obj->nb; $totalnb += $obj->nb; @@ -188,26 +185,35 @@ if ($conf->use_javascript_ajax) print '<table class="noborder nohover centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Candidatures").'</th></tr>'."\n"; $listofstatus = array(0, 1, 3, 5, 8, 9); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array(dol_html_entity_decode($staticrecruitmentcandidature->LibStatut($status, 1), ENT_QUOTES | ENT_HTML5), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == RecruitmentCandidature::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == RecruitmentCandidature::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == RecruitmentCandidature::STATUS_CONTRACT_PROPOSED) $colorseries[$status] = $badgeStatus4; - if ($status == RecruitmentCandidature::STATUS_CONTRACT_SIGNED) $colorseries[$status] = $badgeStatus5; - if ($status == RecruitmentCandidature::STATUS_REFUSED) $colorseries[$status] = $badgeStatus9; - if ($status == RecruitmentCandidature::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9; + if ($status == RecruitmentCandidature::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == RecruitmentCandidature::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == RecruitmentCandidature::STATUS_CONTRACT_PROPOSED) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == RecruitmentCandidature::STATUS_CONTRACT_SIGNED) { + $colorseries[$status] = $badgeStatus5; + } + if ($status == RecruitmentCandidature::STATUS_REFUSED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == RecruitmentCandidature::STATUS_CANCELED) { + $colorseries[$status] = $badgeStatus9; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print '<tr class="oddeven">'; print '<td>'.$staticrecruitmentcandidature->LibStatut($status, 0).'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -240,7 +246,7 @@ if (! empty($conf->recruitment->enabled) && $user->rights->recruitment->read) { $langs->load("orders"); - $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -321,22 +327,26 @@ $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) -{ +if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) { $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status, COUNT(rc.rowid) as nbapplications"; $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE s.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"; + 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 .= " GROUP BY s.rowid, s.ref, s.label, s.date_creation, s.tms, s.status"; $sql .= " ORDER BY s.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -351,10 +361,8 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme print '</th>'; print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/recruitment/recruitmentjobposition_list.php?sortfield=t.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; print '</tr>'; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $objp = $db->fetch_object($resql); $staticrecruitmentjobposition->id = $objp->rowid; $staticrecruitmentjobposition->ref = $objp->ref; @@ -390,21 +398,25 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme } // Last modified job position -if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) -{ +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"; + 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"; + 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) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -416,10 +428,8 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme print '</th>'; print '<th class="right" colspan="2"><a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; print '</tr>'; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $objp = $db->fetch_object($resql); $staticrecruitmentcandidature->id = $objp->rowid; $staticrecruitmentcandidature->ref = $objp->ref; diff --git a/htdocs/recruitment/recruitmentjobposition_agenda.php b/htdocs/recruitment/recruitmentjobposition_agenda.php index 97ea279e8ae..253bf2a7e0c 100644 --- a/htdocs/recruitment/recruitmentjobposition_agenda.php +++ b/htdocs/recruitment/recruitmentjobposition_agenda.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -56,7 +72,9 @@ $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -66,12 +84,18 @@ $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical objects $object = new RecruitmentJobPosition($db); @@ -83,14 +107,17 @@ $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->recruitment->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; +} + +$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'recruitment', $object->id); - -$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -99,20 +126,19 @@ $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -126,14 +152,15 @@ if (empty($reshook)) $form = new Form($db); -if ($object->id > 0) -{ +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"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = recruitmentjobpositionPrepareHead($object); @@ -152,15 +179,14 @@ if ($object->id > 0) $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; @@ -206,10 +232,11 @@ if ($object->id > 0) $out = '&origin='.$object->element.'@recruitment&originid='.$object->id; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objthirdparty) == 'Societe') $out .= '&amp;socid='.$objthirdparty->id; + if (get_class($objthirdparty) == 'Societe') { + $out .= '&amp;socid='.$objthirdparty->id; + } $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;backtopage=1&amp;percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); @@ -219,10 +246,8 @@ if ($object->id > 0) print '<div class="tabsAction">'; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; @@ -231,11 +256,14 @@ if ($object->id > 0) print '</div>'; - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } //print load_fiche_titre($langs->trans("ActionsOnRecruitmentJobPosition"), '', ''); diff --git a/htdocs/recruitment/recruitmentjobposition_applications.php b/htdocs/recruitment/recruitmentjobposition_applications.php index ef151beb8d5..95daeae54a6 100644 --- a/htdocs/recruitment/recruitmentjobposition_applications.php +++ b/htdocs/recruitment/recruitmentjobposition_applications.php @@ -44,17 +44,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -91,12 +107,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -112,10 +131,8 @@ $upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $obje // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, 'recruitment', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - -//if (!$permissiontoread) accessforbidden(); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -124,18 +141,22 @@ $upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $obje $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/recruitment/recruitmentjobposition_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_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } $triggermodname = 'RECRUITMENT_RECRUITMENTJOBPOSITION_MODIFY'; // Name of trigger action code to execute when we modify record @@ -155,12 +176,10 @@ if (empty($reshook)) // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'set_thirdparty' && $permissiontoadd) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'RECRUITMENTJOBPOSITION_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } @@ -189,18 +208,23 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } // Set some default values - if (!GETPOSTISSET('fk_user_recruiter')) $_POST['fk_user_recruiter'] = $user->id; + if (!GETPOSTISSET('fk_user_recruiter')) { + $_POST['fk_user_recruiter'] = $user->id; + } print dol_get_fiche_head(array(), ''); @@ -228,16 +252,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("PositionToBeFilled"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -261,8 +288,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = recruitmentjobpositionPrepareHead($object); @@ -271,13 +297,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('DeleteRecruitmentJobPosition'), $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 @@ -288,8 +312,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Confirmation of action xxxx - if ($action == 'xxx') - { + if ($action == 'xxx') { $formquestion = array(); /* $forcecombo=0; @@ -307,8 +330,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -327,13 +353,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>'; + if ($permissiontoadd) { + if ($action != 'classify') { + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>'; + } $morehtmlref .= ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); @@ -384,60 +410,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); - - /* - * Lines - */ - - if (!empty($object->table_element_line)) - { - // Show object lines - $result = $object->getLinesArray(); - - print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> - <input type="hidden" name="token" value="' . newToken().'"> - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> - <input type="hidden" name="mode" value=""> - <input type="hidden" name="id" value="' . $object->id.'"> - '; - - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print '<div class="div-table-responsive-no-min">'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { - print '<table id="tablelines" class="noborder noshadow" width="100%">'; - } - - if (!empty($object->lines)) - { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); - } - - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') - { - if ($action != 'editline') - { - // Add products/services form - $object->formAddObjectLine(1, $mysoc, $soc); - - $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 '</table>'; - } - print '</div>'; - - print "</form>\n"; - } - print '<br>'.$langs->trans("FeatureNotYetAvailable"); } diff --git a/htdocs/recruitment/recruitmentjobposition_card.php b/htdocs/recruitment/recruitmentjobposition_card.php index 78736eed3ae..58ee9260617 100644 --- a/htdocs/recruitment/recruitmentjobposition_card.php +++ b/htdocs/recruitment/recruitmentjobposition_card.php @@ -44,17 +44,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -91,12 +107,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +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. @@ -114,10 +133,8 @@ $usercanclose = $permissiontoadd; // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, 'recruitment', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - -//if (!$permissiontoread) accessforbidden(); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -126,18 +143,22 @@ $usercanclose = $permissiontoadd; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $backurlforlist = dol_buildpath('/recruitment/recruitmentjobposition_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_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } $triggermodname = 'RECRUITMENT_RECRUITMENTJOBPOSITION_MODIFY'; // Name of trigger action code to execute when we modify record @@ -157,12 +178,10 @@ if (empty($reshook)) // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - if ($action == 'set_thirdparty' && $permissiontoadd) - { + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'RECRUITMENTJOBPOSITION_MODIFY'); } - if ($action == 'classin' && $permissiontoadd) - { + if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOST('projectid', 'int')); } if ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) { @@ -171,19 +190,16 @@ if (empty($reshook)) $action = 'closeas'; } else { // prevent browser refresh from closing proposal several times - if ($object->status == $object::STATUS_VALIDATED) - { + if ($object->status == $object::STATUS_VALIDATED) { $db->begin(); $result = $object->cloture($user, GETPOST('status', 'int'), GETPOST('note_private', 'restricthtml')); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -217,18 +233,23 @@ $help_url = ''; llxHeader('', $title, $help_url); // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } // Set some default values - if (!GETPOSTISSET('fk_user_recruiter')) $_POST['fk_user_recruiter'] = $user->id; + if (!GETPOSTISSET('fk_user_recruiter')) { + $_POST['fk_user_recruiter'] = $user->id; + } print dol_get_fiche_head(array(), ''); @@ -256,16 +277,19 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("PositionToBeFilled"), '', 'object_'.$object->picto); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($backtopage) print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - if ($backtopageforcancel) print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } print dol_get_fiche_head(); @@ -289,8 +313,7 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { $res = $object->fetch_optionals(); $head = recruitmentjobpositionPrepareHead($object); @@ -299,13 +322,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('DeleteRecruitmentJobPosition'), $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 @@ -314,8 +335,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formquestion = array(); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } - if ($action == 'closeas') - { + if ($action == 'closeas') { //Form to close proposal (signed or not) $formquestion = array( array('type' => 'select', 'name' => 'status', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array(3=>$object->LibStatut($object::STATUS_RECRUITED), 9=>$object->LibStatut($object::STATUS_CANCELED))), @@ -337,8 +357,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -357,13 +380,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>'; + if ($permissiontoadd) { + if ($action != 'classify') { + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>'; + } $morehtmlref .= ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); @@ -415,70 +438,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print dol_get_fiche_end(); - /* - * Lines - */ - - if (!empty($object->table_element_line)) - { - // Show object lines - $result = $object->getLinesArray(); - - print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> - <input type="hidden" name="token" value="' . newToken().'"> - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> - <input type="hidden" name="mode" value=""> - <input type="hidden" name="id" value="' . $object->id.'"> - '; - - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print '<div class="div-table-responsive-no-min">'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { - print '<table id="tablelines" class="noborder noshadow" width="100%">'; - } - - if (!empty($object->lines)) - { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); - } - - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') - { - if ($action != 'editline') - { - // Add products/services form - $object->formAddObjectLine(1, $mysoc, $soc); - - $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 '</table>'; - } - print '</div>'; - - print "</form>\n"; - } - - // Buttons for actions if ($action != 'presend' && $action != 'editline') { print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n"; @@ -486,8 +456,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Back to draft if ($object->status == $object::STATUS_VALIDATED) { - if ($permissiontoadd) - { + if ($permissiontoadd) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>'; } } @@ -502,8 +471,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Validate if ($object->status == $object::STATUS_DRAFT) { if ($permissiontoadd) { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) - { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>'; } else { $langs->load("errors"); @@ -530,13 +498,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea /* if ($permissiontoadd) { if ($object->status == $object::STATUS_ENABLED) { - print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable">'.$langs->trans("Disable").'</a>'."\n"; + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n"; } else { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable">'.$langs->trans("Enable").'</a>'."\n"; + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").'</a>'."\n"; } }*/ - if ($permissiontoadd) - { + if ($permissiontoadd) { if ($object->status == $object::STATUS_CANCELED) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").'</a>'."\n"; } @@ -558,8 +525,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -581,17 +547,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); // Show link to public job page - if ($object->status != RecruitmentJobPosition::STATUS_DRAFT) - { + if ($object->status != RecruitmentJobPosition::STATUS_DRAFT) { print '<br><!-- Link to go on public job page -->'."\n"; // Load translation files required by the page $langs->loadLangs(array('recruitment')); - $out = img_picto('', 'globe').' '.$langs->trans("PublicUrl").'<br>'; + $out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("PublicUrl").'</span><br>'; $url = getPublicJobPositionUrl(0, $object->ref); - $out .= '<input type="text" id="recruitmentjobpositionurl" class="quatrevingtpercent" value="'.$url.'">'; - $out .= '<a href="'.$url.'" target="_blank">'.img_picto('', 'globe').'</a>'; + $out .= '<div class="urllink"><input type="text" id="recruitmentjobpositionurl" class="quatrevingtpercent" value="'.$url.'">'; + $out .= '<a href="'.$url.'" target="_blank">'.img_picto('', 'globe').'</a></div>'; $out .= ajax_autoselect("recruitmentjobpositionurl", 0); print $out; @@ -614,7 +579,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'recruitmentjobposition'; diff --git a/htdocs/recruitment/recruitmentjobposition_document.php b/htdocs/recruitment/recruitmentjobposition_document.php index b65449358e6..e8ede6f0bdd 100644 --- a/htdocs/recruitment/recruitmentjobposition_document.php +++ b/htdocs/recruitment/recruitmentjobposition_document.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -58,12 +74,18 @@ $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 = $liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} //if (! $sortfield) $sortfield="position_name"; // Initialize technical objects @@ -77,12 +99,15 @@ $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->recruitment->multidir_output[$object->entity ? $object->entity : $conf->entity]."/recruitmentjobposition/".get_exdir(0, 0, 0, 1, $object); +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity ? $object->entity : $conf->entity]."/recruitmentjobposition/".get_exdir(0, 0, 0, 1, $object); +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); //if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'recruitment', $object->id); +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft); $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php @@ -92,7 +117,7 @@ $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -106,8 +131,7 @@ $help_url = ''; //$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -119,8 +143,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -137,15 +160,14 @@ if ($object->id) $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index 1891d9ce822..99b2e5ade4e 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -44,17 +44,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -86,7 +102,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -104,28 +122,33 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { $visible = dol_eval($val['visible'], 1); @@ -138,10 +161,8 @@ foreach ($object->fields as $key => $val) } } // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) - { +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$object->table_element]['label'][$key], @@ -160,16 +181,11 @@ $permissiontoread = $user->rights->recruitment->recruitmentjobposition->read; $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; $permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete; -// Security check -if (empty($conf->recruitment->enabled)) accessforbidden('Module not enabled'); -$socid = 0; -if ($user->socid > 0) // Protection if external user -{ - //$socid = $user->socid; - accessforbidden(); -} -//$result = restrictedArea($user, 'recruitment', $id, ''); -//if (!$permissiontoread) accessforbidden(); +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', 0, 'recruitment_recruitmentjobposition', 'recruitmentjobposition'); @@ -177,31 +193,33 @@ if ($user->socid > 0) // Protection if external user * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -230,13 +248,14 @@ $title = $langs->trans('ListOfPositionsToBeFilled'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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(); @@ -246,20 +265,32 @@ $sql = preg_replace('/,\s*$/', '', $sql); $sql .= ", COUNT(rc.rowid) as nbapplications"; $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = t.rowid"; -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)"; -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; +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)"; +} +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] = ''; + 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[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -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'; @@ -270,13 +301,14 @@ $sql .= $hookmanager->resPrint; /* If a group by is required */ $sql .= " GROUP BY "; -foreach ($object->fields as $key => $val) -{ +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.', ' : ''); + 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(); @@ -288,26 +320,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -316,8 +346,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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('/recruitment/recruitmentjobposition_card.php', 1).'?id='.$id); @@ -348,30 +377,46 @@ jQuery(document).ready(function() { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -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( - //'validate'=>$langs->trans("Validate"), - //'generate_doc'=>$langs->trans("ReGeneratePDF"), - //'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -391,9 +436,10 @@ $objecttmp = new RecruitmentJobPosition($db); $trackid = 'recruitmentjobposition'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -404,11 +450,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -425,20 +473,26 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -448,8 +502,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['nbapplications']['checked'])) -{ +if (!empty($arrayfields['nbapplications']['checked'])) { print '<td class="liste_titre"></td>'; } // Action column @@ -463,15 +516,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +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'])) - { + 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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -481,8 +537,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; $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; -if (!empty($arrayfields['nbapplications']['checked'])) -{ +if (!empty($arrayfields['nbapplications']['checked'])) { print '<td class="liste_titre">'.$langs->trans("Applications").'</td>'; } // Action column @@ -492,11 +547,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -505,38 +560,51 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); // Show here line of result print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) - { + foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; - elseif ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; + 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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + 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')) && $key != 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; - if ($key == 'status') print $object->getLibStatut(5); - else print $object->showOutputField($val, $key, $object->$key, ''); + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $object->$key; } } @@ -547,20 +615,22 @@ while ($i < ($limit ? min($num, $limit) : $num)) $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; - if (!empty($arrayfields['nbapplications']['checked'])) - { + if (!empty($arrayfields['nbapplications']['checked'])) { print '<td class="right">'.$obj->nbapplications.'</td>'; } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -571,10 +641,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -590,10 +663,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index 2fe2f5a3257..9dbcd0e1180 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -25,17 +25,33 @@ // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { + $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; +} // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; -while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } -if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; -if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { + $i--; $j--; +} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { + $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; +} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { + $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; +} // Try main.inc.php using relative path -if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php"; -if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; -if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php"; -if (!$res) die("Include of main fails"); +if (!$res && file_exists("../main.inc.php")) { + $res = @include "../main.inc.php"; +} +if (!$res && file_exists("../../main.inc.php")) { + $res = @include "../../main.inc.php"; +} +if (!$res && file_exists("../../../main.inc.php")) { + $res = @include "../../../main.inc.php"; +} +if (!$res) { + die("Include of main fails"); +} dol_include_once('/recruitment/class/recruitmentjobposition.class.php'); dol_include_once('/recruitment/lib/recruitment_recruitmentjobposition.lib.php'); @@ -65,11 +81,18 @@ $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->recruitment->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id; +} $permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); +$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft); /* @@ -89,8 +112,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans('RecruitmentJobPosition'), $help_url); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $object->fetch_thirdparty(); $head = recruitmentjobpositionPrepareHead($object); @@ -110,15 +132,14 @@ if ($id > 0 || !empty($ref)) $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); */ // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') + if ($permissiontoadd) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; diff --git a/htdocs/resource/agenda.php b/htdocs/resource/agenda.php index 903a9653056..6f9cfa8ce34 100644 --- a/htdocs/resource/agenda.php +++ b/htdocs/resource/agenda.php @@ -44,10 +44,11 @@ $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'; + 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)); } @@ -57,12 +58,18 @@ $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} $object = new DolResource($db); $object->fetch($id, $ref); @@ -73,8 +80,7 @@ $extrafields = new ExtraFields($db); $hookmanager->initHooks(array('agendaresource')); // Security check -if (!$user->rights->resource->read) -{ +if (!$user->rights->resource->read) { accessforbidden(); } @@ -85,20 +91,19 @@ if (!$user->rights->resource->read) $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -113,8 +118,7 @@ if (empty($reshook)) $contactstatic = new Contact($db); $form = new Form($db); -if ($object->id > 0) -{ +if ($object->id > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -122,10 +126,14 @@ if ($object->id > 0) $picto = 'resource'; $title = $langs->trans("Agenda"); - if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/productnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref." - ".$title; + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/productnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref." - ".$title; + } llxHeader('', $title); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $type = $langs->trans('ResourceSingular'); $head = resource_prepare_head($object); @@ -139,7 +147,9 @@ if ($object->id > 0) $morehtmlref .= '</div>'; $shownav = 1; - if ($user->socid && !in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('resource', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -150,11 +160,14 @@ if ($object->id > 0) print dol_get_fiche_end(); - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { $param = '&id='.$object->id.'&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + 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($langs->trans("ActionsOnResource"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 0909dd93b8e..1b4c71b158b 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -44,13 +44,11 @@ $fk_code_type_resource = GETPOST('fk_code_type_resource', 'alpha'); $country_id = GETPOST('country_id', 'int'); // Protection if external user -if ($user->socid > 0) -{ +if ($user->socid > 0) { accessforbidden(); } -if (!$user->rights->resource->read) -{ +if (!$user->rights->resource->read) { accessforbidden(); } @@ -70,33 +68,28 @@ $extrafields->fetch_name_optionals_label($object->table_element); $hookmanager->initHooks(array('resource', 'resource_card', 'globalcard')); $parameters = array('resource_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 ($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; } - if ($action == 'add') - { + if ($action == 'add') { header("Location: ".DOL_URL_ROOT.'/resource/list.php'); exit; } $action = ''; } - if ($action == 'add' && $user->rights->resource->write) - { - if (!$cancel) - { + if ($action == 'add' && $user->rights->resource->write) { + if (!$cancel) { $error = ''; - if (empty($ref)) - { + if (empty($ref)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $action = 'create'; } else { @@ -107,11 +100,12 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { // Creation OK setEventMessages($langs->trans('ResourceCreatedWithSuccess'), null, 'mesgs'); Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -128,21 +122,17 @@ if (empty($reshook)) } } - if ($action == 'update' && !$cancel && $user->rights->resource->write) - { + if ($action == 'update' && !$cancel && $user->rights->resource->write) { $error = 0; - if (empty($ref)) - { + if (empty($ref)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $res = $object->fetch($id); - if ($res > 0) - { + if ($res > 0) { $object->ref = $ref; $object->description = $description; $object->fk_code_type_resource = $fk_code_type_resource; @@ -155,8 +145,7 @@ if (empty($reshook)) } $result = $object->update($user); - if ($result > 0) - { + if ($result > 0) { Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -169,21 +158,17 @@ if (empty($reshook)) } } - if ($error) - { + if ($error) { $action = 'edit'; } } - if ($action == 'confirm_delete_resource' && $user->rights->resource->delete && $confirm === 'yes') - { + if ($action == 'confirm_delete_resource' && $user->rights->resource->delete && $confirm === 'yes') { $res = $object->fetch($id); - if ($res > 0) - { + if ($res > 0) { $result = $object->delete($id); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans('RessourceSuccessfullyDeleted'), null, 'mesgs'); Header('Location: '.DOL_URL_ROOT.'/resource/list.php'); exit; @@ -207,10 +192,8 @@ llxHeader('', $title, ''); $form = new Form($db); $formresource = new FormResource($db); -if ($action == 'create' || $object->fetch($id, $ref) > 0) -{ - if ($action == 'create') - { +if ($action == 'create' || $object->fetch($id, $ref) > 0) { + if ($action == 'create') { print load_fiche_titre($title, '', 'object_resource'); print dol_get_fiche_head(''); } else { @@ -218,9 +201,10 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) print dol_get_fiche_head($head, 'resource', $title, -1, 'resource'); } - if ($action == 'create' || $action == 'edit') - { - if (!$user->rights->resource->write) accessforbidden('', 0, 1); + if ($action == 'create' || $action == 'edit') { + if (!$user->rights->resource->write) { + accessforbidden('', 0, 1); + } // Create/Edit object @@ -251,15 +235,16 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) // Origin country print '<tr><td>'.$langs->trans("CountryOrigin").'</td><td>'; print $form->select_country($object->country_id, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // Other attributes $parameters = array('objectsrc' => $objectsrc); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -279,8 +264,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) $formconfirm = ''; // Confirm deleting resource line - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm("card.php?&id=".$object->id, $langs->trans("DeleteResource"), $langs->trans("ConfirmDeleteResource"), "confirm_delete_resource", '', '', 1); } @@ -320,10 +304,6 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) print '<td>'; print $object->description; print '</td>'; - - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print '</tr>'; // Origin country code @@ -332,6 +312,11 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) print '<td>'; print getCountry($object->country_id, 0, $db); print '</td>'; + + + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + print '</tr>'; print '</table>'; @@ -351,23 +336,18 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($action != "create" && $action != "edit") - { + if (empty($reshook)) { + if ($action != "create" && $action != "edit") { // Edit resource - if ($user->rights->resource->write) - { + if ($user->rights->resource->write) { print '<div class="inline-block divButAction">'; print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$id.'&amp;action=edit" class="butAction">'.$langs->trans('Modify').'</a>'; print '</div>'; } } - if ($action != "delete" && $action != "create" && $action != "edit") - { + if ($action != "delete" && $action != "create" && $action != "edit") { // Delete resource - if ($user->rights->resource->delete) - { + if ($user->rights->resource->delete) { print '<div class="inline-block divButAction">'; print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$id.'&amp;action=delete&amp;token='.newToken().'" class="butActionDelete">'.$langs->trans('Delete').'</a>'; print '</div>'; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index ef4252f41df..4979a883d9c 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -61,6 +61,9 @@ class Dolresource extends CommonObject public $cache_code_type_resource = array(); + /** + * @var Dolresource Clone of object before changing it + */ public $oldcopy; /** @@ -87,12 +90,24 @@ class Dolresource extends CommonObject // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->description)) $this->description = trim($this->description); - if (!is_numeric($this->country_id)) $this->country_id = 0; - if (isset($this->fk_code_type_resource)) $this->fk_code_type_resource = trim($this->fk_code_type_resource); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->note_private)) $this->note_private = trim($this->note_private); + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } + if (!is_numeric($this->country_id)) { + $this->country_id = 0; + } + if (isset($this->fk_code_type_resource)) { + $this->fk_code_type_resource = trim($this->fk_code_type_resource); + } + if (isset($this->note_public)) { + $this->note_public = trim($this->note_public); + } + if (isset($this->note_private)) { + $this->note_private = trim($this->note_private); + } // Insert request @@ -122,39 +137,34 @@ class Dolresource extends CommonObject $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); } - if (!$error) - { + if (!$error) { $action = 'create'; // Actions on extra fields - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('RESOURCE_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -189,15 +199,16 @@ class Dolresource extends CommonObject $sql .= " ty.label as type_label"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_resource as ty ON ty.code=t.fk_code_type_resource"; - if ($id) $sql .= " WHERE t.rowid = ".$this->db->escape($id); - else $sql .= " WHERE t.ref = '".$this->db->escape($ref)."'"; + if ($id) { + $sql .= " WHERE t.rowid = ".$this->db->escape($id); + } else { + $sql .= " WHERE t.ref = '".$this->db->escape($ref)."'"; + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -238,13 +249,20 @@ class Dolresource extends CommonObject $error = 0; // Clean parameters - if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->fk_code_type_resource)) $this->fk_code_type_resource = trim($this->fk_code_type_resource); - if (isset($this->description)) $this->description = trim($this->description); - if (!is_numeric($this->country_id)) $this->country_id = 0; + if (isset($this->ref)) { + $this->ref = trim($this->ref); + } + if (isset($this->fk_code_type_resource)) { + $this->fk_code_type_resource = trim($this->fk_code_type_resource); + } + if (isset($this->description)) { + $this->description = trim($this->description); + } + if (!is_numeric($this->country_id)) { + $this->country_id = 0; + } - if (empty($this->oldcopy)) - { + if (empty($this->oldcopy)) { $org = new self($this->db); $org->fetch($this->id); $this->oldcopy = $org; @@ -257,37 +275,35 @@ class Dolresource extends CommonObject $sql .= " fk_country=".($this->country_id > 0 ? $this->country_id : "null").","; $sql .= " fk_code_type_resource=".(isset($this->fk_code_type_resource) ? "'".$this->db->escape($this->fk_code_type_resource)."'" : "null").","; $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('RESOURCE_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } - if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) - { + if (!$error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref)) { // We remove directory - if (!empty($conf->resource->dir_output)) - { + if (!empty($conf->resource->dir_output)) { $olddir = $conf->resource->dir_output."/".dol_sanitizeFileName($this->oldcopy->ref); $newdir = $conf->resource->dir_output."/".dol_sanitizeFileName($this->ref); - if (file_exists($olddir)) - { + if (file_exists($olddir)) { $res = @rename($olddir, $newdir); - if (!$res) - { + if (!$res) { $langs->load("errors"); $this->error = $langs->trans('ErrorFailToRenameDir', $olddir, $newdir); $error++; @@ -296,26 +312,21 @@ class Dolresource extends CommonObject } } - if (!$error) - { + if (!$error) { $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -340,7 +351,7 @@ class Dolresource extends CommonObject global $langs; $sql = "SELECT"; $sql .= " t.rowid,"; - $sql .= " t.resource_id,"; + $sql .= " t.resource_id,"; $sql .= " t.resource_type,"; $sql .= " t.element_id,"; $sql .= " t.element_type,"; @@ -353,10 +364,8 @@ class Dolresource extends CommonObject dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -401,17 +410,15 @@ class Dolresource extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid =".$rowid; + $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog(get_class($this), LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources"; $sql .= " WHERE element_type='resource' AND resource_id =".$this->db->escape($rowid); dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $error++; } @@ -423,33 +430,29 @@ class Dolresource extends CommonObject // Removed extrafields if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); } } - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('RESOURCE_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { // We remove directory $ref = dol_sanitizeFileName($this->ref); - if (!empty($conf->resource->dir_output)) - { + if (!empty($conf->resource->dir_output)) { $dir = $conf->resource->dir_output."/".dol_sanitizeFileName($this->ref); - if (file_exists($dir)) - { + if (file_exists($dir)) { $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->errors[] = 'ErrorFailToDeleteDir'; $error++; } @@ -457,8 +460,7 @@ class Dolresource extends CommonObject } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -491,11 +493,15 @@ class Dolresource extends CommonObject $sql .= " t.entity,"; $sql .= " t.ref,"; $sql .= " t.description,"; + $sql .= " t.fk_country,"; $sql .= " t.fk_code_type_resource,"; $sql .= " t.tms,"; // Add fields from extrafields - if (!empty($extrafields->attributes[$this->table_element]['label'])) - foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$this->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); + if (!empty($extrafields->attributes[$this->table_element]['label'])) { + foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$this->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); + } + } $sql .= " ty.label as type_label"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_resource as ty ON ty.code=t.fk_code_type_resource"; @@ -515,23 +521,21 @@ class Dolresource extends CommonObject } $sql .= $this->db->order($sortfield, $sortorder); $this->num_all = 0; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $this->db->query($sql); $this->num_all = $this->db->num_rows($result); } - if ($limit) $sql .= $this->db->plimit($limit, $offset); + if ($limit) { + $sql .= $this->db->plimit($limit, $offset); + } dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $this->lines = array(); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($num) { + while ($obj = $this->db->fetch_object($resql)) { $line = new Dolresource($this->db); $line->id = $obj->rowid; $line->ref = $obj->ref; @@ -569,10 +573,10 @@ class Dolresource extends CommonObject public function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter = '') { // phpcs:enable - global $conf; - $sql = "SELECT "; - $sql .= " t.rowid,"; - $sql .= " t.resource_id,"; + global $conf; + $sql = "SELECT "; + $sql .= " t.rowid,"; + $sql .= " t.resource_id,"; $sql .= " t.resource_type,"; $sql .= " t.element_id,"; $sql .= " t.element_type,"; @@ -580,54 +584,55 @@ class Dolresource extends CommonObject $sql .= " t.mandatory,"; $sql .= " t.fk_user_create,"; $sql .= " t.tms"; - $sql .= ' FROM '.MAIN_DB_PREFIX.'element_resources as t '; - $sql .= " WHERE t.entity IN (".getEntity('resource').")"; + $sql .= ' FROM '.MAIN_DB_PREFIX.'element_resources as t '; + $sql .= " WHERE t.entity IN (".getEntity('resource').")"; - //Manage filter - if (!empty($filter)) { - foreach ($filter as $key => $value) { - if (strpos($key, 'date')) { - $sql .= ' AND '.$key.' = \''.$this->db->idate($value).'\''; - } else { - $sql .= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\''; - } - } - } + //Manage filter + if (!empty($filter)) { + foreach ($filter as $key => $value) { + if (strpos($key, 'date')) { + $sql .= ' AND '.$key.' = \''.$this->db->idate($value).'\''; + } else { + $sql .= ' AND '.$key.' LIKE \'%'.$this->db->escape($value).'%\''; + } + } + } $sql .= $this->db->order($sortfield, $sortorder); - if ($limit) $sql .= $this->db->plimit($limit + 1, $offset); - dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); + if ($limit) { + $sql .= $this->db->plimit($limit + 1, $offset); + } + dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - if ($num) - { - while ($obj = $this->db->fetch_object($resql)) - { - $line = new Dolresource($this->db); - $line->id = $obj->rowid; - $line->resource_id = $obj->resource_id; - $line->resource_type = $obj->resource_type; - $line->element_id = $obj->element_id; - $line->element_type = $obj->element_type; - $line->busy = $obj->busy; - $line->mandatory = $obj->mandatory; - $line->fk_user_create = $obj->fk_user_create; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + if ($num) { + while ($obj = $this->db->fetch_object($resql)) { + $line = new Dolresource($this->db); + $line->id = $obj->rowid; + $line->resource_id = $obj->resource_id; + $line->resource_type = $obj->resource_type; + $line->element_id = $obj->element_id; + $line->element_type = $obj->element_type; + $line->busy = $obj->busy; + $line->mandatory = $obj->mandatory; + $line->fk_user_create = $obj->fk_user_create; - if ($obj->resource_id && $obj->resource_type) + if ($obj->resource_id && $obj->resource_type) { $line->objresource = fetchObjectByElement($obj->resource_id, $obj->resource_type); - if ($obj->element_id && $obj->element_type) + } + if ($obj->element_id && $obj->element_type) { $line->objelement = fetchObjectByElement($obj->element_id, $obj->element_type); + } $this->lines[] = $line; - } - $this->db->free($resql); - } - return $num; - } else { - $this->error = $this->db->lasterror(); - return -1; - } + } + $this->db->free($resql); + } + return $num; + } else { + $this->error = $this->db->lasterror(); + return -1; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -646,8 +651,12 @@ class Dolresource extends CommonObject // phpcs:enable global $conf; - if (!$sortorder) $sortorder = "ASC"; - if (!$sortfield) $sortfield = "t.rowid"; + if (!$sortorder) { + $sortorder = "ASC"; + } + if (!$sortfield) { + $sortfield = "t.rowid"; + } $sql = "SELECT "; $sql .= " t.rowid,"; @@ -673,18 +682,17 @@ class Dolresource extends CommonObject } } $sql .= $this->db->order($sortfield, $sortorder); - if ($limit) $sql .= $this->db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $this->db->plimit($limit + 1, $offset); + } dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $this->lines = array(); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $line = new Dolresource($this->db); $line->id = $obj->rowid; $line->resource_id = $obj->resource_id; @@ -720,8 +728,7 @@ class Dolresource extends CommonObject // phpcs:enable global $conf; - if (!empty($conf->modules_parts['resources'])) - { + if (!empty($conf->modules_parts['resources'])) { $this->available_resources = (array) $conf->modules_parts['resources']; return count($this->available_resources); @@ -744,12 +751,24 @@ class Dolresource extends CommonObject $error = 0; // Clean parameters - if (isset($this->resource_id)) $this->resource_id = trim($this->resource_id); - if (isset($this->resource_type)) $this->resource_type = trim($this->resource_type); - if (isset($this->element_id)) $this->element_id = trim($this->element_id); - if (isset($this->element_type)) $this->element_type = trim($this->element_type); - if (isset($this->busy)) $this->busy = trim($this->busy); - if (isset($this->mandatory)) $this->mandatory = trim($this->mandatory); + if (isset($this->resource_id)) { + $this->resource_id = trim($this->resource_id); + } + if (isset($this->resource_type)) { + $this->resource_type = trim($this->resource_type); + } + if (isset($this->element_id)) { + $this->element_id = trim($this->element_id); + } + if (isset($this->element_type)) { + $this->element_type = trim($this->element_type); + } + if (isset($this->busy)) { + $this->busy = trim($this->busy); + } + if (isset($this->mandatory)) { + $this->mandatory = trim($this->mandatory); + } // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."element_resources SET"; @@ -761,30 +780,30 @@ class Dolresource extends CommonObject $sql .= " mandatory=".(isset($this->mandatory) ? $this->mandatory : "null").","; $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $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 (!$resql) { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('RESOURCE_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -813,20 +832,19 @@ class Dolresource extends CommonObject $sql = 'SELECT rowid, resource_id, resource_type, busy, mandatory'; $sql .= ' FROM '.MAIN_DB_PREFIX.'element_resources'; $sql .= " WHERE element_id=".$element_id." AND element_type='".$this->db->escape($element)."'"; - if ($resource_type) + if ($resource_type) { $sql .= " AND resource_type LIKE '%".$this->db->escape($resource_type)."%'"; + } $sql .= ' ORDER BY resource_type'; dol_syslog(get_class($this)."::getElementResources", LOG_DEBUG); $resources = array(); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $resources[$i] = array( @@ -873,7 +891,9 @@ class Dolresource extends CommonObject // phpcs:enable global $langs; - if (is_array($this->cache_code_type_resource) && count($this->cache_code_type_resource)) return 0; // Cache deja charge + if (is_array($this->cache_code_type_resource) && count($this->cache_code_type_resource)) { + return 0; // Cache deja charge + } $sql = "SELECT rowid, code, label, active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_resource"; @@ -881,12 +901,10 @@ class Dolresource extends CommonObject $sql .= " ORDER BY rowid"; dol_syslog(get_class($this)."::load_cache_code_type_resource", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); // Si traduction existe, on l'utilise, sinon on prend le libelle par defaut $label = ($langs->trans("ResourceTypeShort".$obj->code) != ("ResourceTypeShort".$obj->code) ? $langs->trans("ResourceTypeShort".$obj->code) : ($obj->label != '-' ? $obj->label : '')); @@ -922,43 +940,50 @@ class Dolresource extends CommonObject $label .= '<br>'; $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; /*if (isset($this->status)) { - $label.= '<br><b>' . $langs->trans("Status").":</b> ".$this->getLibStatut(5); - }*/ + $label.= '<br><b>' . $langs->trans("Status").":</b> ".$this->getLibStatut(5); + }*/ if (isset($this->type_label)) { $label .= '<br><b>'.$langs->trans("ResourceType").":</b> ".$this->type_label; } $url = DOL_URL_ROOT.'/resource/card.php?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + 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.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.$get_params.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; /*$linkstart = '<a href="'.dol_buildpath('/resource/card.php', 1).'?id='.$this->id.$get_params.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; - $linkend = '</a>';*/ + $linkend = '</a>';*/ $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; return $result; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 0b6239b01e4..a8b17665fa1 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -75,9 +75,10 @@ class FormResource * @param int $outputmode 0=HTML select string, 1=Array, 2=without form tag * @param int $limit Limit number of answers * @param string $morecss More css + * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return string HTML string with */ - public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20, $morecss = '') + public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20, $morecss = '', $multiple = false) { // phpcs:enable global $conf, $user, $langs; @@ -89,16 +90,17 @@ class FormResource $resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, 0, $filter); - if ($outputmode != 2) - { + if (!is_array($selected)) { + $selected = array($selected); + } + + if ($outputmode != 2) { $out = '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; $out .= '<input type="hidden" name="token" value="'.newToken().'">'; } - if ($resourcestat) - { - if (!empty($conf->use_javascript_ajax) && !empty($conf->global->RESOURCE_USE_SEARCH_TO_SELECT) && !$forcecombo) - { + if ($resourcestat) { + if (!empty($conf->use_javascript_ajax) && !empty($conf->global->RESOURCE_USE_SEARCH_TO_SELECT) && !$forcecombo) { //$minLength = (is_numeric($conf->global->RESOURCE_USE_SEARCH_TO_SELECT)?$conf->global->RESOURCE_USE_SEARCH_TO_SELECT:2); $out .= ajax_combobox($htmlname, $event, $conf->global->RESOURCE_USE_SEARCH_TO_SELECT); } else { @@ -106,25 +108,28 @@ class FormResource } // Construct $out and $outarray - $out .= '<select id="'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">'."\n"; - if ($showempty) $out .= '<option value="-1">&nbsp;</option>'."\n"; + $out .= '<select id="'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').'>'."\n"; + if ($showempty) { + $out .= '<option value="-1">&nbsp;</option>'."\n"; + } $num = 0; - if (is_array($resourcestat->lines)) $num = count($resourcestat->lines); + if (is_array($resourcestat->lines)) { + $num = count($resourcestat->lines); + } //var_dump($resourcestat->lines); $i = 0; - if ($num) - { - while ($i < $num) - { + if ($num) { + while ($i < $num) { $resourceclass = ucfirst($resourcestat->lines[$i]->element); $label = $resourcestat->lines[$i]->ref ? $resourcestat->lines[$i]->ref : ''.$resourcestat->lines[$i]->label; - if ($resourceclass != 'Dolresource') $label .= ' ('.$langs->trans($resourceclass).')'; + if ($resourceclass != 'Dolresource') { + $label .= ' ('.$langs->trans($resourceclass).')'; + } - if ($selected > 0 && $selected == $resourcestat->lines[$i]->id) - { + if ((is_object($selected[0]) && $selected[0]->id == $resourcestat->lines[$i]->id) || (!is_object($selected[0]) && in_array($resourcestat->lines[$i]->id, $selected))) { $out .= '<option value="'.$resourcestat->lines[$i]->id.'" selected>'.$label.'</option>'; } else { $out .= '<option value="'.$resourcestat->lines[$i]->id.'">'.$label.'</option>'; @@ -133,13 +138,14 @@ class FormResource array_push($outarray, array('key'=>$resourcestat->lines[$i]->id, 'value'=>$resourcestat->lines[$i]->label, 'label'=>$resourcestat->lines[$i]->label)); $i++; - if (($i % 10) == 0) $out .= "\n"; + if (($i % 10) == 0) { + $out .= "\n"; + } } } $out .= '</select>'."\n"; - if ($outputmode != 2) - { + if ($outputmode != 2) { $out .= '<input type="submit" class="button" value="'.$langs->trans("Search").'"> &nbsp; &nbsp; '; $out .= '</form>'; @@ -148,7 +154,9 @@ class FormResource dol_print_error($this->db); } - if ($outputmode && $outputmode != 2) return $outarray; + if ($outputmode && $outputmode != 2) { + return $outarray; + } return $out; } @@ -176,35 +184,54 @@ class FormResource $filterarray = array(); - if ($filtertype != '' && $filtertype != '-1') $filterarray = explode(',', $filtertype); + if ($filtertype != '' && $filtertype != '-1') { + $filterarray = explode(',', $filtertype); + } $resourcestat->load_cache_code_type_resource(); print '<select id="select'.$htmlname.'" class="flat maxwidthonsmartphone select_'.$htmlname.'" name="'.$htmlname.'">'; - if ($empty) print '<option value="">&nbsp;</option>'; - if (is_array($resourcestat->cache_code_type_resource) && count($resourcestat->cache_code_type_resource)) - { - foreach ($resourcestat->cache_code_type_resource as $id => $arraytypes) - { + if ($empty) { + print '<option value="">&nbsp;</option>'; + } + if (is_array($resourcestat->cache_code_type_resource) && count($resourcestat->cache_code_type_resource)) { + foreach ($resourcestat->cache_code_type_resource as $id => $arraytypes) { // We discard empty line if showempty is on because an empty line has already been output. - if ($empty && empty($arraytypes['code'])) continue; + if ($empty && empty($arraytypes['code'])) { + continue; + } - if ($format == 0) print '<option value="'.$id.'"'; - elseif ($format == 1) print '<option value="'.$arraytypes['code'].'"'; - elseif ($format == 2) print '<option value="'.$arraytypes['code'].'"'; - elseif ($format == 3) print '<option value="'.$id.'"'; + if ($format == 0) { + print '<option value="'.$id.'"'; + } elseif ($format == 1) { + print '<option value="'.$arraytypes['code'].'"'; + } elseif ($format == 2) { + print '<option value="'.$arraytypes['code'].'"'; + } elseif ($format == 3) { + print '<option value="'.$id.'"'; + } // Si selected est text, on compare avec code, sinon avec id - if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected'; - elseif ($selected == $id) print ' selected'; + if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) { + print ' selected'; + } elseif ($selected == $id) { + print ' selected'; + } print '>'; - if ($format == 0) $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); - elseif ($format == 1) $value = $arraytypes['code']; - elseif ($format == 2) $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); - elseif ($format == 3) $value = $arraytypes['code']; + if ($format == 0) { + $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); + } elseif ($format == 1) { + $value = $arraytypes['code']; + } elseif ($format == 2) { + $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); + } elseif ($format == 3) { + $value = $arraytypes['code']; + } print $value ? $value : '&nbsp;'; print '</option>'; } } print '</select>'; - if ($user->admin && !$noadmininfo) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin && !$noadmininfo) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } } } diff --git a/htdocs/resource/class/index.html b/htdocs/resource/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php index 0330579f06c..811bb476430 100644 --- a/htdocs/resource/contact.php +++ b/htdocs/resource/contact.php @@ -39,7 +39,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'resource', $id, 'resource'); $object = new DolResource($db); @@ -50,17 +52,14 @@ $result = $object->fetch($id, $ref); * Add a new contact */ -if ($action == 'addcontact' && $user->rights->resource->write) -{ - if ($result > 0 && $id > 0) - { +if ($action == 'addcontact' && $user->rights->resource->write) { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -73,21 +72,14 @@ if ($action == 'addcontact' && $user->rights->resource->write) setEventMessages($mesg, null, 'errors'); } -} - -// Toggle the status of a contact -elseif ($action == 'swapstatut' && $user->rights->resource->write) -{ +} elseif ($action == 'swapstatut' && $user->rights->resource->write) { + // Toggle the status of a contact $result = $object->swapContactStatus(GETPOST('ligne', 'int')); -} - -// Erase a contact -elseif ($action == 'deletecontact' && $user->rights->resource->write) -{ +} elseif ($action == 'deletecontact' && $user->rights->resource->write) { + // Erase a contact $result = $object->delete_contact(GETPOST('lineid', 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -109,8 +101,7 @@ llxHeader('', $langs->trans("Resource")); // Mode vue et edition -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $soc = new Societe($db); $soc->fetch($object->socid); @@ -152,8 +143,12 @@ if ($id > 0 || !empty($ref)) print '<br>'; - if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser = 1; - if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_THIPARTY)) $hideaddcontactforthirdparty = 1; + if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) { + $hideaddcontactforuser = 1; + } + if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_THIPARTY)) { + $hideaddcontactforthirdparty = 1; + } $permission = 1; // Contacts lines diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php index 6b1a78fd4b5..6f4c714fac4 100644 --- a/htdocs/resource/document.php +++ b/htdocs/resource/document.php @@ -44,7 +44,9 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'resource', $id, 'resource'); @@ -53,12 +55,18 @@ $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 +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"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new DolResource($db); @@ -72,7 +80,7 @@ $modulepart = 'resource'; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -83,8 +91,7 @@ $form = new Form($db); llxHeader('', $langs->trans("Resource")); -if ($object->id > 0) -{ +if ($object->id > 0) { $object->fetch_thirdparty(); $head = resource_prepare_head($object); @@ -95,8 +102,7 @@ if ($object->id > 0) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 7da223dd02b..83a8d58d410 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2018 Jean-François Ferry <hello+jf@librethic.io> * Copyright (C) 2016 Gilles Poirier <glgpoirier@gmail.com> * Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,8 +46,9 @@ $sortfield = GETPOST('sortfield','alpha'); $page = GETPOST('page','int'); */ -if (!$user->rights->resource->read) +if (!$user->rights->resource->read) { accessforbidden(); +} $object = new Dolresource($db); @@ -69,8 +71,7 @@ $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int'); -if ($socid > 0) // Special for thirdparty -{ +if ($socid > 0) { // Special for thirdparty $element_id = $socid; $element = 'societe'; } @@ -83,17 +84,16 @@ if ($socid > 0) // Special for thirdparty $parameters = array('resource_id' => $resource_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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; - if ($action == 'add_element_resource' && !$cancel) - { + if ($action == 'add_element_resource' && !$cancel) { $res = 0; - if (!($resource_id > 0)) - { + if (!($resource_id > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Resource")), null, 'errors'); $action = ''; @@ -119,7 +119,7 @@ if (empty($reshook)) $sql .= " FROM ".MAIN_DB_PREFIX."element_resources as er"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($resource_type)."'"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($objstat->element)."'"; - $sql .= " WHERE er.resource_id = ".$resource_id; + $sql .= " WHERE er.resource_id = ".((int) $resource_id); $sql .= " AND er.busy = 1"; $sql .= " AND ("; @@ -162,23 +162,19 @@ if (empty($reshook)) } } - if (!$error && $res > 0) - { + if (!$error && $res > 0) { setEventMessages($langs->trans('ResourceLinkedWithSuccess'), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$objstat->id); exit; - } elseif ($objstat) - { + } elseif ($objstat) { setEventMessages($objstat->error, $objstat->errors, 'errors'); } } // Update ressource - if ($action == 'update_linked_resource' && $user->rights->resource->write && !GETPOST('cancel', 'alpha')) - { + if ($action == 'update_linked_resource' && $user->rights->resource->write && !GETPOST('cancel', 'alpha')) { $res = $object->fetch_element_resource($lineid); - if ($res) - { + if ($res) { $object->busy = $busy; $object->mandatory = $mandatory; @@ -198,8 +194,8 @@ if (empty($reshook)) $sql .= " FROM ".MAIN_DB_PREFIX."element_resources as er"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($object->resource_type)."'"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($object->element_type)."'"; - $sql .= " WHERE er.resource_id = ".$object->resource_id; - $sql .= " AND ac.id != ".$object->element_id; + $sql .= " WHERE er.resource_id = ".((int) $object->resource_id); + $sql .= " AND ac.id <> ".((int) $object->element_id); $sql .= " AND er.busy = 1"; $sql .= " AND ("; @@ -239,7 +235,9 @@ if (empty($reshook)) if (!$error) { $result = $object->update_element_resource($user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if ($error) { @@ -253,12 +251,10 @@ if (empty($reshook)) } // Delete a resource linked to an element - if ($action == 'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm === 'yes') - { + if ($action == 'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm === 'yes') { $result = $object->delete_resource($lineid, $element); - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans('RessourceLineSuccessfullyDeleted'), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id); exit; @@ -270,7 +266,9 @@ if (empty($reshook)) $parameters = array('resource_id'=>$resource_id); $reshook = $hookmanager->executeHooks('getElementResources', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} @@ -294,20 +292,17 @@ if (!$ret) { print '<div class="warning">'.$langs->trans('NoResourceInDatabase').'</div>'; } else { // Confirmation suppression resource line - if ($action == 'delete_resource') - { + if ($action == 'delete_resource') { print $form->formconfirm("element_resource.php?element=".$element."&element_id=".$element_id."&id=".$id."&lineid=".$lineid, $langs->trans("DeleteResource"), $langs->trans("ConfirmDeleteResourceElement"), "confirm_delete_linked_resource", '', '', 1); } // Specific to agenda module - if (($element_id || $element_ref) && $element == 'action') - { + if (($element_id || $element_ref) && $element == 'action') { require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; $act = fetchObjectByElement($element_id, $element, $element_ref); - if (is_object($act)) - { + if (is_object($act)) { $head = actions_prepare_head($act); print dol_get_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action'); @@ -332,8 +327,7 @@ if (!$ret) { // Thirdparty //$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); //$morehtmlref.='<br>'.$langs->trans('Project') . ' '; $morehtmlref .= $langs->trans('Project').': '; @@ -343,7 +337,9 @@ if (!$ret) { $morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$act->fk_project.'" title="'.$langs->trans('ShowProject').'">'; $morehtmlref .= $proj->ref; $morehtmlref .= '</a>'; - if ($proj->title) $morehtmlref .= ' - '.$proj->title; + if ($proj->title) { + $morehtmlref .= ' - '.$proj->title; + } } else { $morehtmlref .= ''; } @@ -359,9 +355,11 @@ if (!$ret) { print '<table class="border tableforfield" width="100%">'; // Type - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td colspan="3">'.$act->type.'</td></tr>'; + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { + print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td>'; + print $act->getTypePicto(); + print $langs->trans("Action".$act->type_code); + print '</td></tr>'; } // Full day event @@ -369,44 +367,53 @@ if (!$ret) { // Date start print '<tr><td>'.$langs->trans("DateActionStart").'</td><td colspan="3">'; - if (!$act->fulldayevent) print dol_print_date($act->datep, 'dayhour'); - else print dol_print_date($act->datep, 'day'); - if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); + if (!$act->fulldayevent) { + print dol_print_date($act->datep, 'dayhour'); + } else { + print dol_print_date($act->datep, 'day'); + } + if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) { + print img_warning($langs->trans("Late")); + } print '</td>'; print '</tr>'; // Date end print '<tr><td>'.$langs->trans("DateActionEnd").'</td><td colspan="3">'; - if (!$act->fulldayevent) print dol_print_date($act->datef, 'dayhour'); - else print dol_print_date($act->datef, 'day'); - if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) print img_warning($langs->trans("Late")); + if (!$act->fulldayevent) { + print dol_print_date($act->datef, 'dayhour'); + } else { + print dol_print_date($act->datef, 'day'); + } + if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) { + print img_warning($langs->trans("Late")); + } print '</td></tr>'; // Location - if (empty($conf->global->AGENDA_DISABLE_LOCATION)) - { + if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3">'.$act->location.'</td></tr>'; } // Assigned to print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">'; $listofuserid = array(); - if (empty($donotclearsession)) - { - if ($act->userownerid > 0) $listofuserid[$act->userownerid] = array('id'=>$act->userownerid, 'transparency'=>$act->transparency); // Owner first - if (!empty($act->userassigned)) // Now concat assigned users - { + if (empty($donotclearsession)) { + if ($act->userownerid > 0) { + $listofuserid[$act->userownerid] = array('id'=>$act->userownerid, 'transparency'=>$act->transparency); // Owner first + } + if (!empty($act->userassigned)) { // Now concat assigned users // Restore array with key with same value than param 'id' $tmplist1 = $act->userassigned; $tmplist2 = array(); - foreach ($tmplist1 as $key => $val) - { - if ($val['id'] && $val['id'] != $act->userownerid) $listofuserid[$val['id']] = $val; + foreach ($tmplist1 as $key => $val) { + if ($val['id'] && $val['id'] != $act->userownerid) { + $listofuserid[$val['id']] = $val; + } } } $_SESSION['assignedtouser'] = json_encode($listofuserid); } else { - if (!empty($_SESSION['assignedtouser'])) - { + if (!empty($_SESSION['assignedtouser'])) { $listofuserid = json_decode($_SESSION['assignedtouser'], true); } } @@ -432,8 +439,7 @@ if (!$ret) { } // Specific to thirdparty module - if (($element_id || $element_ref) && $element == 'societe') - { + if (($element_id || $element_ref) && $element == 'societe') { $socstatic = fetchObjectByElement($element_id, $element, $element_ref); if (is_object($socstatic)) { $savobject = $object; @@ -467,16 +473,14 @@ if (!$ret) { } // Specific to fichinter module - if (($element_id || $element_ref) && $element == 'fichinter') - { + if (($element_id || $element_ref) && $element == 'fichinter') { require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; $fichinter = new Fichinter($db); $fichinter->fetch($element_id, $element_ref); $fichinter->fetch_thirdparty(); - if (is_object($fichinter)) - { + if (is_object($fichinter)) { $head = fichinter_prepare_head($fichinter); print dol_get_fiche_head($head, 'resource', $langs->trans("InterventionCard"), -1, 'intervention'); @@ -491,15 +495,14 @@ if (!$ret) { // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$fichinter->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->commande->creer) - { - if ($action != 'classify') + if ($user->rights->commande->creer) { + if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $fichinter->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; + } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $fichinter->id, $fichinter->socid, $fichinter->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$fichinter->id.'">'; @@ -532,15 +535,13 @@ if (!$ret) { } // Specific to product/service module - if (($element_id || $element_ref) && ($element == 'product' || $element == 'service')) - { + if (($element_id || $element_ref) && ($element == 'product' || $element == 'service')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; $product = new Product($db); $product->fetch($element_id, $element_ref); - if (is_object($product)) - { + if (is_object($product)) { $head = product_prepare_head($product); $titre = $langs->trans("CardProduct".$product->type); $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); @@ -548,7 +549,9 @@ if (!$ret) { print dol_get_fiche_head($head, 'resources', $titre, -1, $picto); $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) { + $shownav = 0; + } dol_banner_tab($product, 'ref', '', $shownav, 'ref', 'ref', '', '&element='.$element); print dol_get_fiche_end(); @@ -559,7 +562,9 @@ if (!$ret) { // hook for other elements linked $parameters = array('element'=>$element, 'element_id'=>$element_id, 'element_ref'=>$element_ref); $reshook = $hookmanager->executeHooks('printElementTab', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } //print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'',''); @@ -567,18 +572,17 @@ if (!$ret) { // Show list of resource links - foreach ($object->available_resources as $modresources => $resources) - { + foreach ($object->available_resources as $modresources => $resources) { $resources = (array) $resources; // To be sure $resources is an array - foreach ($resources as $resource_obj) - { + foreach ($resources as $resource_obj) { $element_prop = getElementProperties($resource_obj); //print '/'.$modresources.'/class/'.$resource_obj.'.class.php<br>'; $path = ''; - if (strpos($resource_obj, '@')) + if (strpos($resource_obj, '@')) { $path .= '/'.$element_prop['module']; + } $linked_resources = $object->getElementResources($element, $element_id, $resource_obj); @@ -586,10 +590,8 @@ if (!$ret) { $defaulttpldir = '/core/tpl'; $dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir), array($path.$defaulttpldir)); - foreach ($dirtpls as $module => $reldir) - { - if (file_exists(dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_add.tpl.php'))) - { + foreach ($dirtpls as $module => $reldir) { + if (file_exists(dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_add.tpl.php'))) { $tpl = dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_add.tpl.php'); } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/resource_add.tpl.php'; @@ -599,15 +601,14 @@ if (!$ret) { } else { $res = include $tpl; // for debug } - if ($res) break; + if ($res) { + break; + } } - if ($mode != 'add' || $resource_obj != $resource_type) - { - foreach ($dirtpls as $module => $reldir) - { - if (file_exists(dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_view.tpl.php'))) - { + if ($mode != 'add' || $resource_obj != $resource_type) { + foreach ($dirtpls as $module => $reldir) { + if (file_exists(dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_view.tpl.php'))) { $tpl = dol_buildpath($reldir.'/resource_'.$element_prop['element'].'_view.tpl.php'); } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/resource_view.tpl.php'; @@ -617,7 +618,9 @@ if (!$ret) { } else { $res = include $tpl; // for debug } - if ($res) break; + if ($res) { + break; + } } } } diff --git a/htdocs/resource/index.html b/htdocs/resource/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index c1b67edaa0e..356df3a746e 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,7 +1,7 @@ <?php /* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> - * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ $resource_id = GETPOST('resource_id', 'int'); $sortorder = GETPOST('sortorder', 'alpha'); $sortfield = GETPOST('sortfield', 'aZ09comma'); +$optioncss = GETPOST('optioncss', 'alpha'); // Initialize context for list $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'resourcelist'; @@ -51,7 +52,9 @@ $extrafields = new ExtraFields($db); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); -if (!is_array($search_array_options)) $search_array_options = array(); +if (!is_array($search_array_options)) { + $search_array_options = array(); +} $search_ref = GETPOST("search_ref", 'alpha'); $search_type = GETPOST("search_type", 'alpha'); @@ -62,8 +65,12 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $filter = array(); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&amp;contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&amp;limit='.urlencode($limit); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&amp;contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&amp;limit='.urlencode($limit); +} if ($search_ref != '') { $param .= '&search_ref='.urlencode($search_ref); @@ -75,8 +82,7 @@ if ($search_type != '') { } // Add $param from extra fields -foreach ($search_array_options as $key => $val) -{ +foreach ($search_array_options as $key => $val) { $crit = $val; $tmpkey = preg_replace('/search_options_/', '', $key); $typ = $extrafields->attributes[$object->table_element]['type'][$tmpkey]; @@ -84,25 +90,38 @@ foreach ($search_array_options as $key => $val) $param .= '&search_options_'.$tmpkey.'='.urlencode($val); } $mode_search = 0; - if (in_array($typ, array('int', 'double', 'real'))) $mode_search = 1; // Search on a numeric - if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search = 2; // Search on a foreign key int - if ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0') && (!in_array($typ, array('link')) || $crit != '-1')) - { + if (in_array($typ, array('int', 'double', 'real'))) { + $mode_search = 1; // Search on a numeric + } + if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') { + $mode_search = 2; // Search on a foreign key int + } + if ($crit != '' && (!in_array($typ, array('select', 'sellist')) || $crit != '0') && (!in_array($typ, array('link')) || $crit != '-1')) { $filter['ef.'.$tmpkey] = natural_search('ef.'.$tmpkey, $crit, $mode_search); } } -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} $hookmanager->initHooks(array('resourcelist')); -if (empty($sortorder)) $sortorder = "ASC"; -if (empty($sortfield)) $sortfield = "t.ref"; -if (empty($arch)) $arch = 0; +if (empty($sortorder)) { + $sortorder = "ASC"; +} +if (empty($sortfield)) { + $sortfield = "t.ref"; +} +if (empty($arch)) { + $arch = 0; +} $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $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; @@ -130,8 +149,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 -{ +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_ref = ""; $search_type = ""; $search_array_options = array(); @@ -145,7 +163,9 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} /* @@ -158,8 +178,7 @@ $pagetitle = $langs->trans('ResourcePageIndex'); llxHeader('', $pagetitle, ''); // Confirmation suppression resource line -if ($action == 'delete_resource') -{ +if ($action == 'delete_resource') { print $form->formconfirm($_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id."&lineid=".$lineid, $langs->trans("DeleteResource"), $langs->trans("ConfirmDeleteResourceElement"), "confirm_delete_resource", '', '', 1); } @@ -167,7 +186,9 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -175,8 +196,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $ret = $object->fetch_all('', '', 0, 0, $filter); if ($ret == -1) { dol_print_error($db, $object->error); @@ -193,8 +213,7 @@ if ($ret == -1) { exit; } else { $newcardbutton = ''; - if ($user->rights->resource->write) - { + if ($user->rights->resource->write) { $newcardbutton .= dolGetButtonTitle($langs->trans('MenuResourceAdd'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/resource/card.php?action=create'); } @@ -207,14 +226,12 @@ print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<tr class="liste_titre_filter">'; -if (!empty($arrayfields['t.ref']['checked'])) -{ +if (!empty($arrayfields['t.ref']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">'; print '</td>'; } -if (!empty($arrayfields['ty.label']['checked'])) -{ +if (!empty($arrayfields['ty.label']['checked'])) { print '<td class="liste_titre">'; print '<input type="text" class="flat" name="search_type" value="'.$search_type.'" size="6">'; print '</td>'; @@ -229,34 +246,38 @@ print '</td>'; print "</tr>\n"; print '<tr class="liste_titre">'; -if (!empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['ty.label']['checked'])) print_liste_field_titre($arrayfields['ty.label']['label'], $_SERVER["PHP_SELF"], "ty.label", "", $param, "", $sortfield, $sortorder); +if (!empty($arrayfields['t.ref']['checked'])) { + print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['ty.label']['checked'])) { + print_liste_field_titre($arrayfields['ty.label']['label'], $_SERVER["PHP_SELF"], "ty.label", "", $param, "", $sortfield, $sortorder); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; -if ($ret) -{ - foreach ($object->lines as $resource) - { +if ($ret) { + foreach ($object->lines as $resource) { print '<tr class="oddeven">'; - if (!empty($arrayfields['t.ref']['checked'])) - { + if (!empty($arrayfields['t.ref']['checked'])) { print '<td>'; print $resource->getNomUrl(5); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['ty.label']['checked'])) - { + if (!empty($arrayfields['ty.label']['checked'])) { print '<td>'; print $resource->type_label; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields $obj = (Object) $resource->array_options; @@ -271,13 +292,19 @@ if ($ret) print img_delete('', 'class="marginleftonly"'); print '</a>'; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'; } } else { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 385fb9f190a..07819b1d0b4 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -37,7 +37,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'resource', $id, 'resource'); $object = new DolResource($db); @@ -61,8 +63,7 @@ llxHeader(); $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $head = resource_prepare_head($object); print dol_get_fiche_head($head, 'note', $langs->trans('ResourceSingular'), -1, 'resource'); diff --git a/htdocs/robots.txt b/htdocs/robots.txt index a6a27039016..a88521ec582 100644 --- a/htdocs/robots.txt +++ b/htdocs/robots.txt @@ -1,6 +1,7 @@ User-agent: * Allow: /public/agenda/agendaexport.php Allow: /public/demo/ +Allow: /public/members/new.php Allow: /index.php #Allow: /$ Disallow: / diff --git a/htdocs/salaries/admin/salaries.php b/htdocs/salaries/admin/salaries.php index 2b429dc79ec..dc0cc5b14a0 100644 --- a/htdocs/salaries/admin/salaries.php +++ b/htdocs/salaries/admin/salaries.php @@ -27,14 +27,17 @@ require '../../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('admin', 'salaries')); // Security check -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -47,8 +50,7 @@ $list = array( * Actions */ -if ($action == 'update') -{ +if ($action == 'update') { $error = 0; foreach ($list as $constname) { @@ -59,14 +61,21 @@ if ($action == 'update') } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } +$reg = array(); +if (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) { + // Set boolean (on/off) constants + if (!dolibarr_set_const($db, $reg[2], ($reg[1] === 'set' ? '1' : '0'), 'chaine', 0, '', $conf->entity) > 0) { + dol_print_error($db); + } +} + /* * View */ @@ -74,7 +83,9 @@ if ($action == 'update') llxHeader('', $langs->trans('SalariesSetup')); $form = new Form($db); -if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); +if (!empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); +} $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans('SalariesSetup'), $linkback, 'title_setup'); @@ -99,8 +110,7 @@ print '<td>'.$langs->trans("Parameters").'</td>'; print '<td width="60">'.$langs->trans("Value")."</td>\n"; print "</tr>\n"; -foreach ($list as $key) -{ +foreach ($list as $key) { print '<tr class="oddeven value">'; // Param @@ -109,8 +119,7 @@ foreach ($list as $key) // Value print '<td>'; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); } else { print '<input type="text" size="20" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">'; @@ -126,7 +135,21 @@ print "</table>\n"; print '<div class="center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>'; -print '</form>'; +print '</form><br>'; + +echo '<div>'; +echo '<table class="noborder centpercent">'; +echo '<thead>'; +echo '<tr class="liste_titre"><th>' . $langs->trans('Parameter') . '</th><th>' . $langs->trans('Value') . '</th></tr>'; +echo '</thead>'; +echo '<tbody>'; + +$key = 'CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT'; +echo '<tr><td>', $langs->trans($key), '</td><td>', ajax_constantonoff($key), '</td></tr>'; + +echo '</tbody>'; +echo '</table>'; +echo '</div>'; // End of page llxFooter(); diff --git a/htdocs/salaries/admin/salaries_extrafields.php b/htdocs/salaries/admin/salaries_extrafields.php index 62073f8177b..38303518ac4 100644 --- a/htdocs/salaries/admin/salaries_extrafields.php +++ b/htdocs/salaries/admin/salaries_extrafields.php @@ -36,13 +36,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'payment_salary'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute").'</a></div>'; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<div name="topofform"></div><br>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print '<div name="topofform"></div><br>'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php old mode 100644 new mode 100755 index 7fb8427a517..8e2188123db --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -3,7 +3,8 @@ * Copyright (C) 2014-2020 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,40 +25,46 @@ * \ingroup salaries * \brief Page of salaries payments */ - require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!empty($conf->projet->enabled)) -{ +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } // Load translation files required by the page -$langs->loadLangs(array("compta", "banks", "bills", "users", "salaries", "hrm")); -if (!empty($conf->projet->enabled)) $langs->load("projects"); +$langs->loadLangs(array("compta", "banks", "bills", "users", "salaries", "hrm", "trips")); +if (!empty($conf->projet->enabled)) { + $langs->load("projects"); +} -$id = GETPOST("id", 'int'); +$id = GETPOSTINT('id'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $accountid = GETPOST('accountid', 'int') > 0 ? GETPOST('accountid', 'int') : 0; $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int')); +$confirm = GETPOST('confirm'); +if (GETPOSTISSET('auto_create_paiement') || $action === 'add') { + $auto_create_paiement = GETPOST("auto_create_paiement", "int"); +} else { + $auto_create_paiement = empty($conf->global->CREATE_NEW_SALARY_WITHOUT_AUTO_PAYMENT); +} $datep = dol_mktime(12, 0, 0, GETPOST("datepmonth", 'int'), GETPOST("datepday", 'int'), GETPOST("datepyear", 'int')); $datev = dol_mktime(12, 0, 0, GETPOST("datevmonth", 'int'), GETPOST("datevday", 'int'), GETPOST("datevyear", 'int')); $datesp = dol_mktime(12, 0, 0, GETPOST("datespmonth", 'int'), GETPOST("datespday", 'int'), GETPOST("datespyear", 'int')); $dateep = dol_mktime(12, 0, 0, GETPOST("dateepmonth", 'int'), GETPOST("dateepday", 'int'), GETPOST("dateepyear", 'int')); +$label = GETPOST('label', 'alphanohtml'); +$fk_user = GETPOSTINT('userid'); -// Security check -$socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'salaries', '', '', ''); - -$object = new PaymentSalary($db); +$object = new Salary($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -66,43 +73,106 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('salarycard', 'globalcard')); +$object = new Salary($db); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} + +// Security check +$socid = GETPOSTINT('socid'); +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', $object->id, 'salary', ''); + /** * Actions */ -if ($cancel) -{ +if ($cancel) { header("Location: list.php"); exit; } // Link to a project -if ($action == 'classin' && $user->rights->banque->modifier) -{ +if ($action == 'classin' && $user->rights->banque->modifier) { $object->fetch($id); $object->setProject($projectid); } -if ($action == 'add' && empty($cancel)) -{ +// set label +if ($action == 'setlabel' && $user->rights->salaries->write) { + $object->fetch($id); + $object->label = $label; + $object->update($user); +} + +// Classify paid +if ($action == 'confirm_paid' && $user->rights->salaries->write && $confirm == 'yes') { + $object->fetch($id); + $result = $object->set_paid($user); +} + +if ($action == 'setfk_user' && $user->rights->salaries->write) { + $result = $object->fetch($id); + if ($result > 0) { + $object->fk_user = $fk_user; + $object->update($user); + } else { + dol_print_error($db); + exit; + } +} + +if ($action == 'reopen' && $user->rights->salaries->write) { + $result = $object->fetch($id); + if ($object->paye) { + $result = $object->set_unpaid($user); + if ($result > 0) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} + +// payment mode +if ($action == 'setmode' && $user->rights->salaries->write) { + $object->fetch($id); + $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); + if ($result < 0) + setEventMessages($object->error, $object->errors, 'errors'); +} + +// bank account +if ($action == 'setbankaccount' && $user->rights->salaries->write) { + $object->fetch($id); + $result = $object->setBankAccount(GETPOST('fk_account', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +if ($action == 'add' && empty($cancel)) { $error = 0; if (empty($datev)) $datev = $datep; - $type_payment = dol_getIdFromCode($db, GETPOST("paymenttype", 'alpha'), 'c_paiement', 'code', 'id', 1); + $type_payment = GETPOST("paymenttype", 'alpha'); + $amount = price2num(GETPOST("amount", 'alpha'), 'MT', 2); $object->accountid = GETPOST("accountid", 'int') > 0 ? GETPOST("accountid", "int") : 0; $object->fk_user = GETPOST("fk_user", 'int') > 0 ? GETPOST("fk_user", "int") : 0; $object->datev = $datev; $object->datep = $datep; - $object->amount = price2num(GETPOST("amount", 'alpha')); + $object->amount = $amount; $object->label = GETPOST("label", 'alphanohtml'); $object->datesp = $datesp; $object->dateep = $dateep; $object->note = GETPOST("note", 'restricthtml'); $object->type_payment = ($type_payment > 0 ? $type_payment : 0); - $object->num_payment = GETPOST("num_payment", 'alphanohtml'); $object->fk_user_author = $user->id; $object->fk_project = $projectid; @@ -113,95 +183,174 @@ if ($action == 'add' && empty($cancel)) // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep)) - { + if (!empty($auto_create_paiement) && empty($datep)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DATE_PAIEMENT")), null, 'errors'); + $error++; + } + if (empty($datesp) || empty($dateep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $error++; } - if (empty($object->fk_user) || $object->fk_user < 0) - { + if (empty($object->fk_user) || $object->fk_user < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Employee")), null, 'errors'); $error++; } - if (empty($type_payment) || $type_payment < 0) - { + if (!empty($auto_create_paiement) && (empty($type_payment) || $type_payment < 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); $error++; } - if (empty($object->amount)) - { + if (empty($object->amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } - if (!empty($conf->banque->enabled) && !$object->accountid > 0) - { + if (!empty($conf->banque->enabled) && !empty($auto_create_paiement) && !$object->accountid > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); $ret = $object->create($user); - if ($ret > 0) - { + if ($ret < 0) $error++; + if (!empty($auto_create_paiement) && !$error) { + // Create a line of payments + $paiement = new PaymentSalary($db); + $paiement->chid = $object->id; + $paiement->datepaye = $datep; + $paiement->datev = $datev; + $paiement->amounts = array($object->id=>$amount); // Tableau de montant + $paiement->paiementtype = $type_payment; + $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); + $paiement->note = GETPOST("note", 'none'); + + if (!$error) { + $paymentid = $paiement->create($user, (int) GETPOST('closepaidsalary')); + if ($paymentid < 0) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + $action = 'create'; + } + } + + if (!$error) { + $result = $paiement->addPaymentToBank($user, 'payment_salary', '(SalaryPayment)', GETPOST('accountid', 'int'), '', ''); + if (!($result > 0)) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + } + } + } + + if (empty($error)) { $db->commit(); if (GETPOST('saveandnew', 'alpha')) { setEventMessages($langs->trans("RecordSaved"), '', 'mesgs'); - header("Location: card.php?action=create&fk_project=".urlencode($projectid)."&accountid=".urlencode($accountid).'&paymenttype='.urlencode(GETPOST('paymenttype', 'az09')).'&datepday='.GETPOST("datepday", 'int').'&datepmonth='.GETPOST("datepmonth", 'int').'&datepyear='.GETPOST("datepyear", 'int')); + header("Location: card.php?action=create&fk_project=" . urlencode($projectid) . "&accountid=" . urlencode($accountid) . '&paymenttype=' . urlencode(GETPOST('paymenttype', 'az09')) . '&datepday=' . GETPOST("datepday", 'int') . '&datepmonth=' . GETPOST("datepmonth", 'int') . '&datepyear=' . GETPOST("datepyear", 'int')); exit; } else { - header("Location: list.php"); + header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $object->id); exit; } } else { $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); - $action = "create"; } } $action = 'create'; } -if ($action == 'delete') -{ +if ($action == 'confirm_delete') { $result = $object->fetch($id); + $totalpaye = $object->getSommePaiement(); - if ($object->rappro == 0) - { + if (empty($totalpaye)) { $db->begin(); $ret = $object->delete($user); - if ($ret > 0) - { - if ($object->fk_bank) - { - $accountline = new AccountLine($db); - $result = $accountline->fetch($object->fk_bank); - if ($result > 0) $result = $accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing) - } - - if ($result >= 0) - { - $db->commit(); - header("Location: ".DOL_URL_ROOT.'/salaries/list.php'); - exit; - } else { - $object->error = $accountline->error; - $db->rollback(); - setEventMessages($object->error, $object->errors, 'errors'); - } + if ($ret > 0) { + $db->commit(); + header("Location: ".DOL_URL_ROOT.'/salaries/list.php'); + exit; } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); + setEventMessages($langs->trans('DisabledBecausePayments'), null, 'errors'); + } +} + + +if ($action == 'update' && !GETPOST("cancel") && $user->rights->salaries->write) { + $amount = price2num(GETPOST('amount'), 'MT', 2); + + if (empty($amount)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); + $action = 'edit'; + } elseif (!is_numeric($amount)) { + setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); + $action = 'create'; + } else { + $result = $object->fetch($id); + + $object->amount = price2num($amount); + $object->datesp = price2num($datesp); + $object->dateep = price2num($dateep); + + $result = $object->update($user); + if ($result <= 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} + +if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } + +if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->salaries->write)) { + $db->begin(); + + $originalId = $id; + + $object->fetch($id); + + if ($object->id > 0) { + $object->paye = 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; + } + + $newdatestart = dol_mktime(0, 0, 0, GETPOST('clone_date_startmonth', 'int'), GETPOST('clone_date_startday', 'int'), GETPOST('clone_date_startyear', 'int')); + $newdateend = dol_mktime(0, 0, 0, GETPOST('clone_date_endmonth', 'int'), GETPOST('clone_date_endday', 'int'), GETPOST('clone_date_endyear', 'int')); + + if ($newdatestart) $object->datesp = $newdatestart; + if ($newdateend) $object->dateep = $newdateend; + + $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 { + $db->rollback(); + dol_print_error($db, $object->error); } } @@ -210,30 +359,26 @@ if ($action == 'delete') * View */ -llxHeader("", $langs->trans("SalaryPayment")); +llxHeader("", $langs->trans("Salary")); $form = new Form($db); if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); -if ($id) -{ - $object = new PaymentSalary($db); +if ($id) { + $object = new Salary($db); $result = $object->fetch($id); - if ($result <= 0) - { + if ($result <= 0) { dol_print_error($db); exit; } } // Create -if ($action == 'create') -{ +if ($action == 'create') { $year_current = strftime("%Y", dol_now()); $pastmonth = strftime("%m", dol_now()) - 1; $pastmonthyear = $year_current; - if ($pastmonth == 0) - { + if ($pastmonth == 0) { $pastmonth = 12; $pastmonthyear--; } @@ -247,8 +392,7 @@ if ($action == 'create') $datesp = dol_mktime(0, 0, 0, $datespmonth, $datespday, $datespyear); $dateep = dol_mktime(23, 59, 59, $dateepmonth, $dateepday, $dateepyear); - if (empty($datesp) || empty($dateep)) // We define date_start and date_end - { + if (empty($datesp) || empty($dateep)) { // We define date_start and date_end $datesp = dol_get_first_day($pastmonthyear, $pastmonth, false); $dateep = dol_get_last_day($pastmonthyear, $pastmonth, false); } @@ -256,35 +400,53 @@ if ($action == 'create') print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - print load_fiche_titre($langs->trans("NewSalaryPayment"), '', 'object_payment'); + print load_fiche_titre($langs->trans("NewSalary"), '', 'salary'); + + if (!empty($conf->use_javascript_ajax)) { + print "\n".'<script type="text/javascript" language="javascript">'; + print /** @lang JavaScript */' + $(document).ready(function () { + let onAutoCreatePaiementChange = function () { + if($("#auto_create_paiement").is(":checked")) { + $("#label_fk_account").find("span").addClass("fieldrequired"); + $("#label_type_payment").find("span").addClass("fieldrequired"); + $(".hide_if_no_auto_create_payment").show(); + } else { + $("#label_fk_account").find("span").removeClass("fieldrequired"); + $("#label_type_payment").find("span").removeClass("fieldrequired"); + $(".hide_if_no_auto_create_payment").hide(); + } + }; + $("#radiopayment").click(function() { + $("#label").val($(this).data("label")); + }); + $("#radiorefund").click(function() { + $("#label").val($(this).data("label")); + }); + $("#auto_create_paiement").click(function () { + onAutoCreatePaiementChange(); + }); + onAutoCreatePaiementChange(); + }); + '; + print '</script>'."\n"; + } print dol_get_fiche_head('', ''); print '<table class="border centpercent">'; - // Date payment - print '<tr><td>'; - print $form->editfieldkey('DatePayment', 'datep', '', $object, 0, 'string', '', 1).'</td><td>'; - print $form->selectDate((empty($datep) ? '' : $datep), "datep", 0, 0, 0, 'add', 1, 1); - print '</td></tr>'; - - // Date value for bank - print '<tr><td>'; - print $form->editfieldkey('DateValue', 'datev', '', $object, 0).'</td><td>'; - print $form->selectDate((empty($datev) ?-1 : $datev), "datev", '', '', '', 'add', 1, 1); - print '</td></tr>'; - // Employee - print '<tr><td>'; + print '<tr><td class="titlefieldcreate">'; print $form->editfieldkey('Employee', 'fk_user', '', $object, 0, 'string', '', 1).'</td><td>'; $noactive = 0; // We keep active and unactive users - print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, 'AND employee=1', 0, '', 'maxwidth300', $noactive); + print img_picto('', 'user', 'class="paddingrighonly"').$form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, 'AND employee=1', 0, '', 'maxwidth300', $noactive); print '</td></tr>'; // Label print '<tr><td>'; print $form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).'</td><td>'; - print '<input name="label" id="label" class="minwidth300" value="'.(GETPOST("label") ?GETPOST("label") : $langs->trans("SalaryPayment")).'">'; + print '<input name="label" id="label" class="minwidth300" value="'.(GETPOST("label") ?GETPOST("label") : $langs->trans("Salary")).'">'; print '</td></tr>'; // Date start period @@ -302,50 +464,78 @@ if ($action == 'create') // Amount print '<tr><td>'; print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).'</td><td>'; - print '<input name="amount" id="amount" class="minwidth100" value="'.GETPOST("amount").'">'; + print '<input name="amount" id="amount" class="minwidth75 maxwidth100" value="'.GETPOST("amount").'">'; print '</td></tr>'; + // Project + if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); + + print '<tr><td>'.$langs->trans("Project").'</td><td>'; + $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1); + print '</td></tr>'; + } + + // Comments + print '<tr>'; + print '<td class="tdtop">'.$langs->trans("Comments").'</td>'; + print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">'.GETPOST('note', 'restricthtml').'</textarea></td>'; + print '</tr>'; + + print '<tr><td colspan="2"><hr></td></tr>'; + + // Auto create payment + print '<tr><td>'.$langs->trans('AutomaticCreationPayment').'</td>'; + print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n"; // Date payment + // Bank - if (!empty($conf->banque->enabled)) - { - print '<tr><td>'; + if (!empty($conf->banque->enabled)) { + print '<tr><td id="label_fk_account">'; print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).'</td><td>'; + print img_picto('', 'bank_account', 'class="paddingrighonly"'); $form->select_comptes($accountid, "accountid", 0, '', 1); // Affiche liste des comptes courant print '</td></tr>'; } // Type payment - print '<tr><td>'; + print '<tr><td id="label_type_payment">'; print $form->editfieldkey('PaymentMode', 'selectpaymenttype', '', $object, 0, 'string', '', 1).'</td><td>'; - $form->select_types_paiements(GETPOST("paymenttype", 'aZ09'), "paymenttype", '', 2); + $form->select_types_paiements(GETPOST("paymenttype", 'aZ09'), "paymenttype", ''); + print '</td></tr>'; + + // Date payment + print '<tr class="hide_if_no_auto_create_payment"><td>'; + print $form->editfieldkey('DatePayment', 'datep', '', $object, 0, 'string', '', 1).'</td><td>'; + print $form->selectDate((empty($datep) ? '' : $datep), "datep", 0, 0, 0, 'add', 1, 1); + print '</td></tr>'; + + // Date value for bank + print '<tr class="hide_if_no_auto_create_payment"><td>'; + print $form->editfieldkey('DateValue', 'datev', '', $object, 0).'</td><td>'; + print $form->selectDate((empty($datev) ?-1 : $datev), "datev", '', '', '', 'add', 1, 1); print '</td></tr>'; // Number - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { // Number - print '<tr><td><label for="num_payment">'.$langs->trans('Numero'); + print '<tr class="hide_if_no_auto_create_payment"><td><label for="num_payment">'.$langs->trans('Numero'); print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; print '</label></td>'; print '<td><input name="num_payment" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n"; } - // Project - if (!empty($conf->projet->enabled)) - { - $formproject = new FormProjets($db); - - print '<tr><td>'.$langs->trans("Project").'</td><td>'; - $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1); - print '</td></tr>'; - } + // Bouton Save payment + /* + print '<tr class="hide_if_no_auto_create_payment"><td>'; + print $langs->trans("ClosePaidSalaryAutomatically"); + print '</td><td><input type="checkbox" checked value="1" name="closepaidsalary"></td></tr>'; + */ // 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)) - { + if (empty($reshook)) { print $object->showOptionals($extrafields, 'edit'); } @@ -354,6 +544,12 @@ if ($action == 'create') print dol_get_fiche_end(); print '<div class="center">'; + + print '<div class="hide_if_no_auto_create_payment paddingbottom">'; + print '<input type="checkbox" checked value="1" name="closepaidsalary">'.$langs->trans("ClosePaidSalaryAutomatically"); + print '<br>'; + print '</div>'; + print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; print '&nbsp;&nbsp; &nbsp;&nbsp;'; print '<input type="submit" class="button" name="saveandnew" value="'.$langs->trans("SaveAndNew").'">'; @@ -371,27 +567,92 @@ if ($action == 'create') /* */ /* ************************************************************************** */ -if ($id) -{ +if ($id) { $head = salaries_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("SalaryPayment"), -1, 'payment'); + 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', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); + $formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1); + $formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), 'value' => -1); + + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240); + } + + if ($action == 'paid') { + $text = $langs->trans('ConfirmPaySalary'); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans('PaySalary'), $text, "confirm_paid", '', '', 2); + } + + if ($action == 'delete') { + $text = $langs->trans('ConfirmDeleteSalary'); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('DeleteSalary'), $text, 'confirm_delete', '', '', 2); + } + + if ($action == 'edit') { + print "<form name=\"charge\" action=\"".$_SERVER["PHP_SELF"]."?id=$object->id&amp;action=update\" method=\"post\">"; + print '<input type="hidden" name="token" value="'.newToken().'">'; + } + + print dol_get_fiche_head($head, 'card', $langs->trans("SalaryPayment"), -1, 'salary'); $linkback = '<a href="'.DOL_URL_ROOT.'/salaries/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; $morehtmlref = '<div class="refidno">'; - // Employee - $userstatic = new User($db); - $userstatic->fetch($object->fk_user); - $morehtmlref .= $langs->trans('Employee').' : '.$userstatic->getNomUrl(1); + // Label + if ($action != 'editlabel') { + $morehtmlref .= $form->editfieldkey("Label", 'label', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); + $morehtmlref .= $object->label; + } else { + $morehtmlref .= '<br>'.$langs->trans('Label').' :&nbsp;'; + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="setlabel">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= '<input type="text" name="label" value="'.$object->label.'"/>'; + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } + + //Employee + if ($action != 'editfk_user') { + if ($object->getSommePaiement() > 0 && !empty($object->fk_user)) { + $userstatic = new User($db); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0) { + $morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(1); + } + } else { + $morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1); + + if (!empty($object->fk_user)) { + $userstatic = new User($db); + $result = $userstatic->fetch($object->fk_user); + if ($result > 0) { + $morehtmlref .= $userstatic->getNomUrl(1); + } else { + dol_print_error($db); + exit(); + } + } + } + } else { + $morehtmlref .= '<br>'.$langs->trans('Employee').' :&nbsp;'; + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="setfk_user">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $form->select_dolusers($object->fk_user, 'userid', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->salaries->write) - { + if ($user->rights->salaries->write) { if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; } @@ -400,7 +661,7 @@ if ($id) $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; $morehtmlref .= '<input type="hidden" name="action" value="classin">'; $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= $formproject->select_projects(-1, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; $morehtmlref .= '</form>'; } else { @@ -418,52 +679,92 @@ if ($id) } } } + $morehtmlref .= '</div>'; + $totalpaye = $object->getSommePaiement(); + $object->totalpaye = $totalpaye; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); print '<div class="fichecenter">'; + print '<div class="fichehalfleft">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'; + print '<table class="border centpercent tableforfield">'; - // Label - print '<tr><td class="titlefield">'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>'; + if ($action == 'edit') { + print '<tr><td class="titlefield">'.$langs->trans("DateStartPeriod")."</td><td>"; + print $form->selectDate($object->datesp, 'datesp', 0, 0, 0, 'datesp', 1); + print "</td></tr>"; + } else { + print "<tr>"; + print '<td class="titlefield">' . $langs->trans("DateStartPeriod") . '</td><td>'; + print dol_print_date($object->datesp, 'day'); + print '</td></tr>'; + } - print "<tr>"; - print '<td>'.$langs->trans("DateStartPeriod").'</td><td>'; - print dol_print_date($object->datesp, 'day'); - print '</td></tr>'; + if ($action == 'edit') { + print '<tr><td>'.$langs->trans("DateEndPeriod")."</td><td>"; + print $form->selectDate($object->dateep, 'dateep', 0, 0, 0, 'dateep', 1); + print "</td></tr>"; + } else { + print "<tr>"; + print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>'; + print dol_print_date($object->dateep, 'day'); + print '</td></tr>'; + } - print '<tr><td>'.$langs->trans("DateEndPeriod").'</td><td>'; - print dol_print_date($object->dateep, 'day'); - print '</td></tr>'; - - print "<tr>"; + /*print "<tr>"; print '<td>'.$langs->trans("DatePayment").'</td><td>'; print dol_print_date($object->datep, 'day'); print '</td></tr>'; print '<tr><td>'.$langs->trans("DateValue").'</td><td>'; print dol_print_date($object->datev, 'day'); + print '</td></tr>';*/ + + if ($action == 'edit') { + print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>'; + } else { + print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency) . '</td></tr>'; + } + + // Default mode of payment + print '<tr><td>'; + print '<table class="nobordernopadding" width="100%"><tr><td>'; + print $langs->trans('DefaultPaymentMode'); + print '</td>'; + if ($action != 'editmode') + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; + print '</tr></table>'; + print '</td><td>'; + + if ($action == 'editmode') { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->type_payment, 'mode_reglement_id'); + } else { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->type_payment, 'none'); + } print '</td></tr>'; - print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>'; - - if (!empty($conf->banque->enabled)) - { - if ($object->fk_account > 0) - { - $bankline = new AccountLine($db); - $bankline->fetch($object->fk_bank); - - print '<tr>'; - print '<td>'.$langs->trans('BankTransactionLine').'</td>'; - print '<td>'; - print $bankline->getNomUrl(1, 0, 'showall'); - print '</td>'; - print '</tr>'; + // Default Bank Account + if (!empty($conf->banque->enabled)) { + print '<tr><td class="nowrap">'; + print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">'; + print $langs->trans('DefaultBankAccount'); + print '<td>'; + if ($action != 'editbankaccount' && $user->rights->salaries->write) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; } + print '</tr></table>'; + print '</td><td>'; + 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 '</td>'; + print '</tr>'; } // Other attributes @@ -473,22 +774,168 @@ if ($id) print '</div>'; + print '<div class="fichehalfright">'; + print '<div class="ficheaddleft">'; + + $nbcols = 3; + if (!empty($conf->banque->enabled)) { + $nbcols++; + } + + /* + * Payments + */ + $sql = "SELECT p.rowid, p.num_payment as num_payment, p.datep as dp, p.amount,"; + $sql .= " c.code as type_code,c.libelle as paiement_type,"; + $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.currency_code as bacurrency_code, ba.fk_accountancy_journal'; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; + $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."c_paiement as c ON p.fk_typepayment = c.id"; + $sql .= ", ".MAIN_DB_PREFIX."salary as salaire"; + $sql .= " WHERE p.fk_salary = ".((int) $id); + $sql .= " AND p.fk_salary = salaire.rowid"; + $sql .= " AND salaire.entity IN (".getEntity('tax').")"; + $sql .= " ORDER BY dp DESC"; + + //print $sql; + $resql = $db->query($sql); + if ($resql) { + $totalpaye = 0; + + $num = $db->num_rows($resql); + $i = 0; $total = 0; + + print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '<table class="noborder paymenttable">'; + print '<tr class="liste_titre">'; + print '<td>'.$langs->trans("RefPayment").'</td>'; + print '<td>'.$langs->trans("Date").'</td>'; + print '<td>'.$langs->trans("Type").'</td>'; + if (!empty($conf->banque->enabled)) { + print '<td class="liste_titre right">'.$langs->trans('BankAccount').'</td>'; + } + print '<td class="right">'.$langs->trans("Amount").'</td>'; + print '</tr>'; + + if ($num > 0) { + $bankaccountstatic = new Account($db); + while ($i < $num) { + $objp = $db->fetch_object($resql); + + print '<tr class="oddeven"><td>'; + print '<a href="'.DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"), "payment").' '.$objp->rowid.'</a></td>'; + print '<td>'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n"; + $labeltype = $langs->trans("PaymentType".$objp->type_code) != ("PaymentType".$objp->type_code) ? $langs->trans("PaymentType".$objp->type_code) : $objp->paiement_type; + print "<td>".$labeltype.' '.$objp->num_payment."</td>\n"; + if (!empty($conf->banque->enabled)) { + $bankaccountstatic->id = $objp->baid; + $bankaccountstatic->ref = $objp->baref; + $bankaccountstatic->label = $objp->baref; + $bankaccountstatic->number = $objp->banumber; + $bankaccountstatic->currency_code = $objp->bacurrency_code; + + if (!empty($conf->accounting->enabled)) { + $bankaccountstatic->account_number = $objp->account_number; + + $accountingjournal = new AccountingJournal($db); + $accountingjournal->fetch($objp->fk_accountancy_journal); + $bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); + } + + print '<td class="right">'; + if ($bankaccountstatic->id) + print $bankaccountstatic->getNomUrl(1, 'transactions'); + print '</td>'; + } + print '<td class="right">'.price($objp->amount)."</td>\n"; + print "</tr>"; + $totalpaye += $objp->amount; + $i++; + } + } else { + print '<tr class="oddeven"><td><span class="opacitymedium">'.$langs->trans("None").'</span></td>'; + print '<td></td><td></td><td></td><td></td>'; + print '</tr>'; + } + + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaye)."</td></tr>\n"; + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n"; + + $resteapayer = $object->amount - $totalpaye; + $cssforamountpaymentcomplete = 'amountpaymentcomplete'; + + print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>"; + print '<td class="right'.($resteapayer ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayer)."</td></tr>\n"; + + print "</table>"; + print '</div>'; + + $db->free($resql); + } else { + dol_print_error($db); + } + + print '</div>'; + print '</div>'; + print '</div>'; + + print '<div class="clearboth"></div>'; + + + if ($action == 'edit') { + print '<div align="center">'; + print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; + print ' &nbsp; '; + print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + print "</form>\n"; + } + print dol_get_fiche_end(); - // Action buttons + /* + * Action bar + */ print '<div class="tabsAction">'."\n"; - if ($object->rappro == 0) - { - if (!empty($user->rights->salaries->delete)) - { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a></div>'; - } else { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans("NotAllowed"))).'">'.$langs->trans("Delete").'</a></div>'; + if ($action != 'edit') { + // Reopen + if ($object->paye && $user->rights->salaries->write) { + print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".dol_buildpath("/salaries/card.php", 1)."?id=".$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("ReOpen")."</a></div>"; + } + + // Edit + if ($object->paye == 0 && $user->rights->salaries->write) { + print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify")."</a></div>"; + } + + // Emit payment + if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->salaries->write) { + print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/paiement_salary.php?id=".$object->id.'&action=create&token='.newToken().'">'.$langs->trans("DoPayment")."</a></div>"; + } + + // Classify 'paid' + if ($object->paye == 0 + && ( + (round($resteapayer) <= 0 && $object->amount > 0) + || (round($resteapayer) >= 0 && $object->amount < 0) + ) + && $user->rights->salaries->write) { + print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=paid&token='.newToken().'">'.$langs->trans("ClassifyPaid")."</a></div>"; + } + + // Clone + if ($user->rights->salaries->write) { + print "<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT."/salaries/card.php?id=".$object->id.'&action=clone&token='.newToken().'">'.$langs->trans("ToClone")."</a></div>"; + } + + if (!empty($user->rights->salaries->delete) && empty($totalpaye)) { + print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans("DisabledBecausePayments"))).'">'.$langs->trans("Delete").'</a></div>'; } - } else { - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a></div>'; } print "</div>"; } diff --git a/htdocs/salaries/class/index.html b/htdocs/salaries/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/salaries/class/paymentsalary.class.php b/htdocs/salaries/class/paymentsalary.class.php index 807d3537775..dcb50dac49a 100644 --- a/htdocs/salaries/class/paymentsalary.class.php +++ b/htdocs/salaries/class/paymentsalary.class.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,15 +20,16 @@ /** * \file htdocs/salaries/class/paymentsalary.class.php * \ingroup salaries - * \brief Class for salaries module payment + * \brief File of class to manage payment of salaries */ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; /** - * Class to manage salary payments + * Class to manage payments of salaries */ class PaymentSalary extends CommonObject { @@ -46,32 +48,39 @@ class PaymentSalary extends CommonObject */ public $picto = 'payment'; - public $tms; + /** + * @var int ID + */ + public $fk_salary; + + public $datec = ''; + public $tms = ''; + public $datep = ''; /** - * @var int User ID + * @deprecated + * @see $amount */ - public $fk_user; + public $total; - public $datep; - public $datev; - public $amount; + public $amount; // Total amount of payment + public $amounts = array(); // Array of amounts /** * @var int ID */ - public $fk_project; - - public $type_payment; - public $num_payment; + public $fk_typepayment; /** - * @var string salary payments label + * @var string + * @deprecated */ - public $label; + public $num_paiement; - public $datesp; - public $dateep; + /** + * @var string + */ + public $num_payment; /** * @var int ID @@ -89,10 +98,11 @@ class PaymentSalary extends CommonObject public $fk_user_modif; /** - * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array */ - public $fields = array(); - + public $fields = array( + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + ); /** * Constructor @@ -102,166 +112,169 @@ class PaymentSalary extends CommonObject public function __construct($db) { $this->db = $db; - $this->element = 'payment_salary'; - $this->table_element = 'payment_salary'; } /** - * Update database + * Create payment of salary into database. + * Use this->amounts to have list of lines for the payment * - * @param User $user User that modify - * @param int $notrigger 0=no, 1=yes (no update trigger) - * @return int <0 if KO, >0 if OK + * @param User $user User making payment + * @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more + * @return int <0 if KO, id of payment if OK */ - public function update($user = null, $notrigger = 0) + public function create($user, $closepaidcontrib = 0) { global $conf, $langs; $error = 0; - // Clean parameters - $this->amount = trim($this->amount); - $this->label = trim($this->label); - $this->note = trim($this->note); + $now = dol_now(); - // Check parameters - if (empty($this->fk_user) || $this->fk_user < 0) - { - $this->error = 'ErrorBadParameter'; + dol_syslog(get_class($this)."::create", LOG_DEBUG); + + // Validate parametres + if (!$this->datepaye) { + $this->error = 'ErrorBadValueForParameterCreatePaymentSalary'; return -1; } + // Clean parameters + if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary; + if (isset($this->amount)) $this->amount = trim($this->amount); + if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; + 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->fk_bank)) $this->fk_bank = (int) $this->fk_bank; + if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; + if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; + + $totalamount = 0; + foreach ($this->amounts as $key => $value) { // How payment is dispatch + $newvalue = price2num($value, 'MT'); + $this->amounts[$key] = $newvalue; + $totalamount += $newvalue; + } + $totalamount = price2num($totalamount); + + // Check parameters + if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null + + $this->db->begin(); - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET"; + if ($totalamount != 0) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary (fk_salary, datec, datep, amount,"; + $sql .= " fk_typepayment, num_payment, note, fk_user_author, fk_bank)"; + $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',"; + $sql .= " '".$this->db->idate($this->datepaye)."',"; + $sql .= " ".$totalamount.","; + $sql .= " ".$this->paiementtype.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".$user->id.","; + $sql .= " 0)"; - $sql .= " tms='".$this->db->idate($this->tms)."',"; - $sql .= " fk_user=".$this->fk_user.","; - $sql .= " datep='".$this->db->idate($this->datep)."',"; - $sql .= " datev='".$this->db->idate($this->datev)."',"; - $sql .= " amount=".price2num($this->amount).","; - $sql .= " fk_projet=".((int) $this->fk_project).","; - $sql .= " fk_typepayment=".$this->fk_typepayment."',"; - $sql .= " num_payment='".$this->db->escape($this->num_payment)."',"; - $sql .= " label='".$this->db->escape($this->label)."',"; - $sql .= " datesp='".$this->db->idate($this->datesp)."',"; - $sql .= " dateep='".$this->db->idate($this->dateep)."',"; - $sql .= " note='".$this->db->escape($this->note)."',"; - $sql .= " fk_bank=".($this->fk_bank > 0 ? (int) $this->fk_bank : "null").","; - $sql .= " fk_user_author=".((int) $this->fk_user_author).","; - $sql .= " fk_user_modif=".($this->fk_user_modif > 0 ? (int) $this->fk_user_modif : 'null'); + $resql = $this->db->query($sql); + if ($resql) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary"); - $sql .= " WHERE rowid=".$this->id; + // Insere tableau des montants / factures + foreach ($this->amounts as $key => $amount) { + $contribid = $key; + if (is_numeric($amount) && $amount <> 0) { + $amount = price2num($amount); - dol_syslog(get_class($this)."::update", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->error = "Error ".$this->db->lasterror(); - return -1; - } - - // Update extrafield - if (!$error) - { - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; + // If we want to closed payed invoices + if ($closepaidcontrib) { + $contrib = new Salary($this->db); + $contrib->fetch($contribid); + $paiement = $contrib->getSommePaiement(); + //$creditnotes=$contrib->getSumCreditNotesUsed(); + $creditnotes = 0; + //$deposits=$contrib->getSumDepositsUsed(); + $deposits = 0; + $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); + $remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT'); + if ($remaintopay == 0) { + $result = $contrib->set_paid($user); + } else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + } + } } + } else { + $error++; } } - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('PAYMENT_SALARY_MODIFY', $user); - if ($result < 0) $error++; - // End call triggers - } + $result = $this->call_trigger('PAYMENTSALARY_CREATE', $user); + if ($result < 0) $error++; - if (!$error) - { + if ($totalamount != 0 && !$error) { + $this->amount = $totalamount; + $this->total = $totalamount; // deprecated $this->db->commit(); - return 1; + return $this->id; } else { + $this->error = $this->db->error(); $this->db->rollback(); return -1; } } - /** * Load object in memory from database * - * @param int $id id object - * @param User $user User that load + * @param int $id Id object * @return int <0 if KO, >0 if OK */ - public function fetch($id, $user = null) + public function fetch($id) { global $langs; $sql = "SELECT"; - $sql .= " s.rowid,"; - - $sql .= " s.tms,"; - $sql .= " s.fk_user,"; - $sql .= " s.datep,"; - $sql .= " s.datev,"; - $sql .= " s.amount,"; - $sql .= " s.fk_projet as fk_project,"; - $sql .= " s.fk_typepayment,"; - $sql .= " s.num_payment,"; - $sql .= " s.label,"; - $sql .= " s.datesp,"; - $sql .= " s.dateep,"; - $sql .= " s.note,"; - $sql .= " s.fk_bank,"; - $sql .= " s.fk_user_author,"; - $sql .= " s.fk_user_modif,"; - $sql .= " b.fk_account,"; - $sql .= " b.fk_type,"; - $sql .= " b.rappro"; - - $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; - $sql .= " WHERE s.rowid = ".$id; + $sql .= " t.rowid,"; + $sql .= " t.fk_salary,"; + $sql .= " t.datec,"; + $sql .= " t.tms,"; + $sql .= " t.datep,"; + $sql .= " t.amount,"; + $sql .= " t.fk_typepayment,"; + $sql .= " t.num_payment as num_payment,"; + $sql .= " t.note,"; + $sql .= " t.fk_bank,"; + $sql .= " t.fk_user_author,"; + $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."payment_salary as t 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 = ".((int) $id); + // TODO link on entity of tax; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; - $this->ref = $obj->rowid; - $this->tms = $this->db->jdate($obj->tms); - $this->fk_user = $obj->fk_user; - $this->datep = $this->db->jdate($obj->datep); - $this->datev = $this->db->jdate($obj->datev); + $this->id = $obj->rowid; + $this->ref = $obj->rowid; + + $this->fk_salary = $obj->fk_salary; + $this->datec = $this->db->jdate($obj->datec); + $this->tms = $this->db->jdate($obj->tms); + $this->datep = $this->db->jdate($obj->datep); $this->amount = $obj->amount; - $this->fk_project = $obj->fk_project; - $this->type_payement = $obj->fk_typepayment; + $this->fk_typepayment = $obj->fk_typepayment; + $this->num_paiement = $obj->num_payment; $this->num_payment = $obj->num_payment; - $this->label = $obj->label; - $this->datesp = $this->db->jdate($obj->datesp); - $this->dateep = $this->db->jdate($obj->dateep); - $this->note = $obj->note; + $this->note = $obj->note; $this->fk_bank = $obj->fk_bank; $this->fk_user_author = $obj->fk_user_author; $this->fk_user_modif = $obj->fk_user_modif; - $this->fk_account = $obj->fk_account; - $this->fk_type = $obj->fk_type; - $this->rappro = $obj->rappro; - // Retrieve all extrafield - // fetch optionals attributes and labels - $this->fetch_optionals(); + $this->type_code = $obj->type_code; + $this->type_label = $obj->type_label; + + $this->bank_account = $obj->fk_account; + $this->bank_line = $obj->fk_bank; } $this->db->free($resql); @@ -274,48 +287,162 @@ class PaymentSalary extends CommonObject /** - * Delete object in database + * Update database * - * @param User $user User that delete - * @return int <0 if KO, >0 if OK + * @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 delete($user) + public function update($user = null, $notrigger = 0) { global $conf, $langs; - $error = 0; - // Call trigger - $result = $this->call_trigger('PAYMENT_SALARY_DELETE', $user); - if ($result < 0) return -1; - // End call triggers + // Clean parameters - // Delete donation - if (!$error) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary_extrafields"; - $sql .= " WHERE fk_object=".$this->id; + if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary; + if (isset($this->amount)) $this->amount = trim($this->amount); + if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment; + 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->fk_bank)) $this->fk_bank = (int) $this->fk_bank; + if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author; + if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; - $resql = $this->db->query($sql); - if (!$resql) - { - $this->errors[] = $this->db->lasterror(); + // Check parameters + // Put here code to add control on parameters values + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET"; + $sql .= " fk_salary=".(isset($this->fk_salary) ? $this->fk_salary : "null").","; + $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; + $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; + $sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').","; + $sql .= " amount=".(isset($this->amount) ? $this->amount : "null").","; + $sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").","; + $sql .= " num_payment=".(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_author=".(isset($this->fk_user_author) ? $this->fk_user_author : "null").","; + $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null").""; + $sql .= " WHERE rowid=".((int) $this->id); + + $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(); } + + // 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 delete + * @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; + $error = 0; + + dol_syslog(get_class($this)."::delete"); + + $this->db->begin(); + + if ($this->bank_line > 0) { + $accline = new AccountLine($this->db); + $accline->fetch($this->bank_line); + $result = $accline->delete(); + if ($result < 0) { + $this->errors[] = $accline->error; $error++; } } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary"; - $sql .= " WHERE rowid=".$this->id; + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary"; + $sql .= " WHERE rowid=".((int) $this->id); - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->error = "Error ".$this->db->lasterror(); - return -1; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } - return 1; + // 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; + } + } + + + + /** + * 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 + * @return int New id of clone + */ + public function createFromClone(User $user, $fromid) + { + $error = 0; + + $object = new PaymentSalary($this->db); + + $this->db->begin(); + + // Load source object + $object->fetch($fromid); + $object->id = 0; + $object->statut = 0; + + // Clear fields + // ... + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->create($user); + + // Other options + if ($result < 0) { + $this->error = $object->error; + $error++; + } + + unset($object->context['createfromclone']); + + // End + if (!$error) { + $this->db->commit(); + return $object->id; + } else { + $this->db->rollback(); + return -1; + } } @@ -330,354 +457,128 @@ class PaymentSalary extends CommonObject { $this->id = 0; + $this->fk_salary = ''; + $this->datec = ''; $this->tms = ''; - $this->fk_user = ''; $this->datep = ''; - $this->datev = ''; $this->amount = ''; - $this->label = ''; - $this->datesp = ''; - $this->dateep = ''; - $this->note = ''; + $this->fk_typepayment = ''; + $this->num_payment = ''; + $this->note_private = ''; + $this->note_public = ''; $this->fk_bank = ''; $this->fk_user_author = ''; $this->fk_user_modif = ''; } + /** - * Create in database + * Add record into bank for payment with links between this bank record and invoices of payment. + * All payment properties must have been set first like after a call to create(). * - * @param User $user User that create - * @return int <0 if KO, >0 if OK + * @param User $user Object of user making payment + * @param string $mode 'payment_sc' + * @param string $label Label to use in bank record + * @param int $accountid Id of bank account to do link with + * @param string $emetteur_nom Name of transmitter + * @param string $emetteur_banque Name of bank + * @return int <0 if KO, >0 if OK */ - public function create($user) + public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque) { - global $conf, $langs; + global $conf; + + // Clean data + $this->num_payment = trim($this->num_payment ? $this->num_payment : $this->num_paiement); $error = 0; - $now = dol_now(); - // Clean parameters - $this->amount = price2num(trim($this->amount)); - $this->label = trim($this->label); - $this->note = trim($this->note); - $this->fk_bank = trim($this->fk_bank); - $this->fk_user_author = trim($this->fk_user_author); - $this->fk_user_modif = trim($this->fk_user_modif); + if (!empty($conf->banque->enabled)) { + include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - // Check parameters - if (!$this->label) - { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")); - return -3; - } - if ($this->fk_user < 0 || $this->fk_user == '') - { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Employee")); - return -4; - } - if ($this->amount < 0 || $this->amount == '') - { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); - return -5; - } - if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0)) - { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account")); - return -6; - } - if (!empty($conf->banque->enabled) && (empty($this->type_payment) || $this->type_payment <= 0)) - { - $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); - return -7; - } + $acc = new Account($this->db); + $acc->fetch($accountid); - $this->db->begin(); + $total = $this->amount; - // Insert into llx_payment_salary - $sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary (fk_user"; - $sql .= ", datep"; - $sql .= ", datev"; - $sql .= ", amount"; - $sql .= ", fk_projet"; - $sql .= ", salary"; - $sql .= ", fk_typepayment"; - $sql .= ", num_payment"; - if ($this->note) $sql .= ", note"; - $sql .= ", label"; - $sql .= ", datesp"; - $sql .= ", dateep"; - $sql .= ", fk_user_author"; - $sql .= ", datec"; - $sql .= ", fk_bank"; - $sql .= ", entity"; - $sql .= ") "; - $sql .= " VALUES ("; - $sql .= "'".$this->db->escape($this->fk_user)."'"; - $sql .= ", '".$this->db->idate($this->datep)."'"; - $sql .= ", '".$this->db->idate($this->datev)."'"; - $sql .= ", ".$this->amount; - $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : 0); - $sql .= ", ".($this->salary > 0 ? $this->salary : "null"); - $sql .= ", ".$this->db->escape($this->type_payment); - $sql .= ", '".$this->db->escape($this->num_payment)."'"; - if ($this->note) $sql .= ", '".$this->db->escape($this->note)."'"; - $sql .= ", '".$this->db->escape($this->label)."'"; - $sql .= ", '".$this->db->idate($this->datesp)."'"; - $sql .= ", '".$this->db->idate($this->dateep)."'"; - $sql .= ", '".$this->db->escape($user->id)."'"; - $sql .= ", '".$this->db->idate($now)."'"; - $sql .= ", NULL"; - $sql .= ", ".$conf->entity; - $sql .= ")"; + // Insert payment into llx_bank + $bank_line_id = $acc->addline( + $this->datepaye, + $this->paiementtype, // Payment mode id or code ("CHQ or VIR for example") + $label, + -$total, + $this->num_payment, + '', + $user, + $emetteur_nom, + $emetteur_banque, + '', + $this->datev + ); - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary"); + // Mise a jour fk_bank dans llx_paiement. + // On connait ainsi le paiement qui a genere l'ecriture bancaire + if ($bank_line_id > 0) { + $result = $this->update_fk_bank($bank_line_id); + if ($result <= 0) { + $error++; + dol_print_error($this->db); + } - if ($this->id > 0) - { - if (!empty($conf->banque->enabled) && !empty($this->amount)) - { - // Insert into llx_bank - require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - - $acc = new Account($this->db); - $result = $acc->fetch($this->accountid); - if ($result <= 0) dol_print_error($this->db); - - // Update extrafield - if (!$error) { - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - } - - // Insert payment into llx_bank - // Add link 'payment_salary' in bank_url between payment and bank transaction - $bank_line_id = $acc->addline( - $this->datep, - $this->type_payment, - $this->label, - -abs($this->amount), - $this->num_payment, - '', - $user, - '', - '', - '', - $this->datev - ); - - // Update fk_bank into llx_paiement. - // So we know the payment which has generate the banking ecriture - if ($bank_line_id > 0) - { - $this->update_fk_bank($bank_line_id); - } else { - $this->error = $acc->error; - $error++; - } - - if (!$error) - { - // Add link 'payment_salary' in bank_url between payment and bank transaction - $url = DOL_URL_ROOT.'/salaries/card.php?id='; - - $result = $acc->add_url_line($bank_line_id, $this->id, $url, "(SalaryPayment)", "payment_salary"); - if ($result <= 0) - { - $this->error = $acc->error; - $error++; - } - } - - $fuser = new User($this->db); - $fuser->fetch($this->fk_user); - - // Add link 'user' in bank_url between operation and bank transaction - $result = $acc->add_url_line( - $bank_line_id, - $this->fk_user, - DOL_URL_ROOT.'/user/card.php?id=', - $fuser->getFullName($langs), - // $langs->trans("SalaryPayment").' '.$fuser->getFullName($langs).' '.dol_print_date($this->datesp,'dayrfc').' '.dol_print_date($this->dateep,'dayrfc'), - 'user' - ); - - if ($result <= 0) - { - $this->error = $acc->error; + // Add link 'payment', 'payment_supplier', 'payment_sc' in bank_url between payment and bank transaction + $url = ''; + if ($mode == 'payment_salary') $url = DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='; + if ($url) { + $result = $acc->add_url_line($bank_line_id, $this->id, $url, '(paiement)', $mode); + if ($result <= 0) { $error++; + dol_print_error($this->db); } } - // Call trigger - $result = $this->call_trigger('PAYMENT_SALARY_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } else $error++; - - if (!$error) - { - $this->db->commit(); - return $this->id; + // Add link 'company' in bank_url between invoice and bank transaction (for each invoice concerned by payment) + $linkaddedforthirdparty = array(); + foreach ($this->amounts as $key => $value) { + if ($mode == 'payment_salary') { + $salary = new Salary($this->db); + $salary->fetch($key); + $result = $acc->add_url_line($bank_line_id, $salary->id, DOL_URL_ROOT.'/salaries/card.php?id=', '('.$salary->label.')', 'salary'); + if ($result <= 0) dol_print_error($this->db); + } + } } else { - $this->db->rollback(); - return -2; + $this->error = $acc->error; + $error++; } + } + + if (!$error) { + return 1; } else { - $this->error = $this->db->error(); - $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Update link between payment salary and line generate into llx_bank + * Mise a jour du lien entre le paiement de salaire et la ligne dans llx_bank generee * - * @param int $id_bank Id bank account - * @return int <0 if KO, >0 if OK + * @param int $id_bank Id if bank + * @return int >0 if OK, <=0 if KO */ public function update_fk_bank($id_bank) { - // phpcs:enable - $sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank; - $sql .= ' WHERE rowid = '.$this->id; + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id); + + dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { - dol_print_error($this->db); - return -1; - } - } - - - /** - * Send name clicable (with possibly the picto) - * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option link option - * @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 Chaine with URL - */ - public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) - { - global $db, $conf, $langs, $hookmanager; - 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).' <u>'.$langs->trans("SalaryPayment").'</u>'; - $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; - if (!empty($this->label)) { - $labeltoshow = $this->label; - $reg = array(); - if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) - { - // Label generique car entre parentheses. On l'affiche en le traduisant - if ($reg[1] == 'paiement') $reg[1] = 'Payment'; - $labeltoshow = $langs->trans($reg[1]); - } - $label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow; - } - - $url = DOL_URL_ROOT.'/salaries/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("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - - /* - $hookmanager->initHooks(array('myobjectdao')); - $parameters=array('id'=>$this->id); - $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.'"' : ''); - - $linkstart = '<a href="'.$url.'"'; - $linkstart .= $linkclose.'>'; - $linkend = '</a>'; - - $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; - $result .= $linkend; - //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); - - global $action, $hookmanager; - $hookmanager->initHooks(array('salarypayment')); - $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; - } - - /** - * Information on record - * - * @param int $id Id of record - * @return void - */ - public function info($id) - { - $sql = 'SELECT ps.rowid, ps.datec, ps.fk_user_author'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'payment_salary as ps'; - $sql .= ' WHERE ps.rowid = '.$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->rowid; - if ($obj->fk_user_author) - { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - $this->date_creation = $this->db->jdate($obj->datec); - } - $this->db->free($result); - } else { - dol_print_error($this->db); + $this->error = $this->db->error(); + return 0; } } @@ -693,7 +594,7 @@ class PaymentSalary extends CommonObject return $this->LibStatut($this->statut, $mode); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Renvoi le libelle d'un statut donne * @@ -703,45 +604,88 @@ class PaymentSalary extends CommonObject */ public function LibStatut($status, $mode = 0) { - // phpcs:enable + // phpcs:enable global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage $langs->load('compta'); /*if ($mode == 0) - { - if ($status == 0) return $langs->trans('ToValidate'); - if ($status == 1) return $langs->trans('Validated'); - } - if ($mode == 1) - { - if ($status == 0) return $langs->trans('ToValidate'); - if ($status == 1) return $langs->trans('Validated'); - } - if ($mode == 2) - { - if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); - if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); - } - if ($mode == 3) - { - if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1'); - if ($status == 1) return img_picto($langs->trans('Validated'),'statut4'); - } - if ($mode == 4) - { - if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); - if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); - } - if ($mode == 5) - { - if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); - if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); - } - if ($mode == 6) - { - if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); - if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); - }*/ + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 1) + { + if ($status == 0) return $langs->trans('ToValidate'); + if ($status == 1) return $langs->trans('Validated'); + } + if ($mode == 2) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 3) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4'); + } + if ($mode == 4) + { + if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate'); + if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated'); + } + if ($mode == 5) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + } + if ($mode == 6) + { + if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1'); + if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4'); + }*/ return ''; } + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $maxlen Longueur max libelle + * @return string Chaine avec URL + */ + public function getNomUrl($withpicto = 0, $maxlen = 0) + { + global $langs; + + $result = ''; + + if (empty($this->ref)) $this->ref = $this->lib; + + $label = img_picto('', $this->picto).' <u>'.$langs->trans("SalaryPayment").'</u>'; + $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; + if (!empty($this->label)) { + $labeltoshow = $this->label; + $reg = array(); + if (preg_match('/^\((.*)\)$/i', $this->label, $reg)) { + // Label generique car entre parentheses. On l'affiche en le traduisant + if ($reg[1] == 'paiement') $reg[1] = 'Payment'; + $labeltoshow = $langs->trans($reg[1]); + } + $label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow; + } + if ($this->datep) { + $label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->datep, 'day'); + } + + if (!empty($this->id)) { + $link = '<a href="'.DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; + $linkend = '</a>'; + + if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' '); + if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + } + + return $result; + } } diff --git a/htdocs/salaries/class/salariesstats.class.php b/htdocs/salaries/class/salariesstats.class.php index 0fcef8682a8..b3e6c20a0ca 100644 --- a/htdocs/salaries/class/salariesstats.class.php +++ b/htdocs/salaries/class/salariesstats.class.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (c) 2018 Fidesio <contact@fidesio.com> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -61,12 +62,15 @@ class SalariesStats extends Stats $this->from = MAIN_DB_PREFIX.$object->table_element; $this->field = 'amount'; - $this->where .= " entity = ".$conf->entity; - if ($this->socid) { - $this->where .= " AND fk_soc = ".$this->socid; + $this->where = " entity = ".$conf->entity; + if ($this->socid > 0) { + $this->where .= " AND fk_soc = ".((int) $this->socid); + } + if (is_array($this->userid) && count($this->userid) > 0) { + $this->where .= ' AND fk_user IN ('.$this->db->sanitize(join(',', $this->userid)).')'; + } elseif ($this->userid > 0) { + $this->where .= ' AND fk_user = '.$this->userid; } - if (is_array($this->userid) && count($this->userid) > 0) $this->where .= ' AND fk_user IN ('.join(',', $this->userid).')'; - elseif ($this->userid > 0) $this->where .= ' AND fk_user = '.$this->userid; } @@ -79,8 +83,8 @@ class SalariesStats extends Stats { $sql = "SELECT YEAR(datep) as dm, count(*)"; $sql .= " FROM ".$this->from; - $sql .= " GROUP BY dm DESC"; $sql .= " WHERE ".$this->where; + $sql .= " GROUP BY dm DESC"; return $this->_getNbByYear($sql); } @@ -97,13 +101,13 @@ class SalariesStats extends Stats { $sql = "SELECT MONTH(datep) as dm, count(*)"; $sql .= " FROM ".$this->from; - $sql .= " WHERE YEAR(datep) = ".$year; + $sql .= " WHERE YEAR(datep) = ".((int) $year); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); $res = $this->_getNbByMonth($year, $sql, $format); - //var_dump($res);print '<br>'; + return $res; } @@ -125,7 +129,6 @@ class SalariesStats extends Stats $sql .= $this->db->order('dm', 'DESC'); $res = $this->_getAmountByMonth($year, $sql, $format); - //var_dump($res);print '<br>'; return $res; } diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php new file mode 100644 index 00000000000..94ede5d7a4d --- /dev/null +++ b/htdocs/salaries/class/salary.class.php @@ -0,0 +1,703 @@ +<?php +/* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/salaries/class/salary.class.php + * \ingroup salaries + * \brief Class for salaries module payment + */ + +// Put here all includes required by your class file +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; + + +/** + * Class to manage salary payments + */ +class Salary extends CommonObject +{ + /** + * @var string ID to identify managed object + */ + public $element = 'salary'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'salary'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'salary'; + + public $tms; + + /** + * @var int User ID + */ + public $fk_user; + + public $datep; + public $datev; + public $amount; + + /** + * @var int ID + */ + public $fk_project; + + public $type_payment; + + /** + * @var string salary payments label + */ + public $label; + + public $datesp; + public $dateep; + + /** + * @var int ID + */ + public $fk_bank; + + /** + * @var int ID + */ + public $fk_user_author; + + /** + * @var int ID + */ + public $fk_user_modif; + + const STATUS_UNPAID = 0; + const STATUS_PAID = 1; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + $this->element = 'salary'; + $this->table_element = 'salary'; + } + + /** + * Update database + * + * @param User $user User that modify + * @param int $notrigger 0=no, 1=yes (no update trigger) + * @return int <0 if KO, >0 if OK + */ + public function update($user = null, $notrigger = 0) + { + global $conf, $langs; + + $error = 0; + + // Clean parameters + $this->amount = trim($this->amount); + $this->label = trim($this->label); + $this->note = trim($this->note); + + // Check parameters + if (empty($this->fk_user) || $this->fk_user < 0) { + $this->error = 'ErrorBadParameter'; + return -1; + } + + $this->db->begin(); + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."salary SET"; + + $sql .= " tms='".$this->db->idate(dol_now())."',"; + $sql .= " fk_user=".$this->fk_user.","; + /*$sql .= " datep='".$this->db->idate($this->datep)."',"; + $sql .= " datev='".$this->db->idate($this->datev)."',";*/ + $sql .= " amount=".price2num($this->amount).","; + $sql .= " fk_projet=".((int) $this->fk_project).","; + $sql .= " fk_typepayment=".$this->type_payment.","; + $sql .= " label='".$this->db->escape($this->label)."',"; + $sql .= " datesp='".$this->db->idate($this->datesp)."',"; + $sql .= " dateep='".$this->db->idate($this->dateep)."',"; + $sql .= " note='".$this->db->escape($this->note)."',"; + $sql .= " fk_bank=".($this->fk_bank > 0 ? (int) $this->fk_bank : "null").","; + $sql .= " fk_user_author=".((int) $this->fk_user_author).","; + $sql .= " fk_user_modif=".($this->fk_user_modif > 0 ? (int) $this->fk_user_modif : 'null'); + + $sql .= " WHERE rowid=".((int) $this->id); + + dol_syslog(get_class($this)."::update", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + + // Update extrafield + if (!$error) { + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + } + + if (!$notrigger) { + // Call trigger + $result = $this->call_trigger('salary_MODIFY', $user); + if ($result < 0) $error++; + // End call triggers + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Load object in memory from database + * + * @param int $id id object + * @param User $user User that load + * @return int <0 if KO, >0 if OK + */ + public function fetch($id, $user = null) + { + global $langs; + $sql = "SELECT"; + $sql .= " s.rowid,"; + + $sql .= " s.tms,"; + $sql .= " s.fk_user,"; + $sql .= " s.datep,"; + $sql .= " s.datev,"; + $sql .= " s.amount,"; + $sql .= " s.fk_projet as fk_project,"; + $sql .= " s.fk_typepayment,"; + $sql .= " s.label,"; + $sql .= " s.datesp,"; + $sql .= " s.dateep,"; + $sql .= " s.note,"; + $sql .= " s.paye,"; + $sql .= " s.fk_bank,"; + $sql .= " s.fk_user_author,"; + $sql .= " s.fk_user_modif,"; + $sql .= " s.fk_account"; + /*$sql .= " b.fk_type,"; + $sql .= " b.rappro";*/ + + $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; + $sql .= " WHERE s.rowid = ".((int) $id); + + 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->rowid; + $this->tms = $this->db->jdate($obj->tms); + $this->fk_user = $obj->fk_user; + $this->datep = $this->db->jdate($obj->datep); + $this->datev = $this->db->jdate($obj->datev); + $this->amount = $obj->amount; + $this->fk_project = $obj->fk_project; + $this->type_payment = $obj->fk_typepayment; + $this->label = $obj->label; + $this->datesp = $this->db->jdate($obj->datesp); + $this->dateep = $this->db->jdate($obj->dateep); + $this->note = $obj->note; + $this->paye = $obj->paye; + $this->fk_bank = $obj->fk_bank; + $this->fk_user_author = $obj->fk_user_author; + $this->fk_user_modif = $obj->fk_user_modif; + $this->fk_account = $this->accountid = $obj->fk_account; + $this->fk_type = $obj->fk_type; + $this->rappro = $obj->rappro; + + // Retreive all extrafield + // fetch optionals attributes and labels + $this->fetch_optionals(); + } + $this->db->free($resql); + + return 1; + } else { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + } + + + /** + * Delete object in database + * + * @param User $user User that delete + * @return int <0 if KO, >0 if OK + */ + public function delete($user) + { + global $conf, $langs; + + $error = 0; + + // Call trigger + $result = $this->call_trigger('salary_DELETE', $user); + if ($result < 0) return -1; + // End call triggers + + // Delete extrafields + /*if (!$error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."salary_extrafields"; + $sql .= " WHERE fk_object=".$this->id; + + $resql = $this->db->query($sql); + if (!$resql) + { + $this->errors[] = $this->db->lasterror(); + $error++; + } + }*/ + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."salary"; + $sql .= " WHERE rowid=".((int) $this->id); + + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + + return 1; + } + + + /** + * 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() + { + $this->id = 0; + + $this->tms = ''; + $this->fk_user = ''; + $this->datep = ''; + $this->datev = ''; + $this->amount = ''; + $this->label = ''; + $this->datesp = ''; + $this->dateep = ''; + $this->note = ''; + $this->fk_bank = ''; + $this->fk_user_author = ''; + $this->fk_user_modif = ''; + } + + /** + * Create in database + * + * @param User $user User that create + * @return int <0 if KO, >0 if OK + */ + public function create($user) + { + global $conf, $langs; + + $error = 0; + $now = dol_now(); + + // Clean parameters + $this->amount = price2num(trim($this->amount)); + $this->label = trim($this->label); + $this->note = trim($this->note); + $this->fk_bank = trim($this->fk_bank); + $this->fk_user_author = trim($this->fk_user_author); + $this->fk_user_modif = trim($this->fk_user_modif); + $this->accountid = trim($this->accountid); + $this->paye = trim($this->paye); + + // Check parameters + if (!$this->label) { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")); + return -3; + } + if ($this->fk_user < 0 || $this->fk_user == '') { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Employee")); + return -4; + } + if ($this->amount < 0 || $this->amount == '') { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")); + return -5; + } + /* if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0)) + { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account")); + return -6; + } + if (!empty($conf->banque->enabled) && (empty($this->type_payment) || $this->type_payment <= 0)) + { + $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")); + return -7; + }*/ + + $this->db->begin(); + + // Insert into llx_salary + $sql = "INSERT INTO ".MAIN_DB_PREFIX."salary (fk_user"; + //$sql .= ", datep"; + //$sql .= ", datev"; + $sql .= ", amount"; + $sql .= ", fk_projet"; + $sql .= ", salary"; + $sql .= ", fk_typepayment"; + $sql .= ", fk_account"; + if ($this->note) $sql .= ", note"; + $sql .= ", label"; + $sql .= ", datesp"; + $sql .= ", dateep"; + $sql .= ", fk_user_author"; + $sql .= ", datec"; + $sql .= ", fk_bank"; + $sql .= ", entity"; + $sql .= ") "; + $sql .= " VALUES ("; + $sql .= "'".$this->db->escape($this->fk_user)."'"; + //$sql .= ", '".$this->db->idate($this->datep)."'"; + //$sql .= ", '".$this->db->idate($this->datev)."'"; + $sql .= ", ".$this->amount; + $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : 0); + $sql .= ", ".($this->salary > 0 ? $this->salary : "null"); + $sql .= ", ".($this->type_payment > 0 ? $this->type_payment : 0); + $sql .= ", ".($this->accountid > 0 ? $this->accountid : "null"); + if ($this->note) $sql .= ", '".$this->db->escape($this->note)."'"; + $sql .= ", '".$this->db->escape($this->label)."'"; + $sql .= ", '".$this->db->idate($this->datesp)."'"; + $sql .= ", '".$this->db->idate($this->dateep)."'"; + $sql .= ", '".$this->db->escape($user->id)."'"; + $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", NULL"; + $sql .= ", ".$conf->entity; + $sql .= ")"; + + dol_syslog(get_class($this)."::create", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."salary"); + + if ($this->id > 0) { + // Update extrafield + if (!$error) { + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + } + + // Call trigger + $result = $this->call_trigger('salary_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } else $error++; + + if (!$error) { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -2; + } + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -1; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Update link between payment salary and line generate into llx_bank + * + * @param int $id_bank Id bank account + * @return int <0 if KO, >0 if OK + */ + public function update_fk_bank($id_bank) + { + // phpcs:enable + $sql = 'UPDATE '.MAIN_DB_PREFIX.'salary SET fk_bank = '.((int) $id_bank); + $sql .= ' WHERE rowid = '.$this->id; + $result = $this->db->query($sql); + if ($result) { + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + + /** + * Send name clicable (with possibly the picto) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param string $option link option + * @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 Chaine with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $db, $conf, $langs, $hookmanager; + global $dolibarr_main_authentication, $dolibarr_main_demo; + global $menumanager; + + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + + $result = ''; + + $label = '<u>'.$langs->trans("Salary").'</u>'; + $label .= '<br>'; + $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; + if ($this->label) { + $label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label; + } + if ($this->datesp && $this->dateep) { + $label .= '<br><b>'.$langs->trans('Period').':</b> '.dol_print_date($this->datesp, 'day').' - '.dol_print_date($this->dateep, 'day'); + } + + $url = DOL_URL_ROOT.'/salaries/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("ShowMyObject"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + + /* + $hookmanager->initHooks(array('myobjectdao')); + $parameters=array('id'=>$this->id); + $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.'"' : ''); + + $linkstart = '<a href="'.$url.'"'; + $linkstart .= $linkclose.'>'; + $linkend = '</a>'; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= $this->ref; + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('salarypayment')); + $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 amount of payments already done + * + * @return int Amount of payment already done, <0 if KO + */ + public function getSommePaiement() + { + $table = 'payment_salary'; + $field = 'fk_salary'; + + $sql = 'SELECT sum(amount) as amount'; + $sql .= ' FROM '.MAIN_DB_PREFIX.$table; + $sql .= ' WHERE '.$field.' = '.$this->id; + + dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); + $resql = $this->db->query($sql); + + if ($resql) { + $amount = 0; + + $obj = $this->db->fetch_object($resql); + if ($obj) $amount = $obj->amount ? $obj->amount : 0; + + $this->db->free($resql); + return $amount; + } else { + return -1; + } + } + + /** + * Information on record + * + * @param int $id Id of record + * @return void + */ + public function info($id) + { + $sql = 'SELECT ps.rowid, ps.datec, ps.fk_user_author'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'salary as ps'; + $sql .= ' WHERE ps.rowid = '.((int) $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->rowid; + if ($obj->fk_user_author) { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + } + $this->date_creation = $this->db->jdate($obj->datec); + } + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag social contribution as payed completely + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function set_paid($user) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."salary SET"; + $sql .= " paye = 1"; + $sql .= " WHERE rowid = ".$this->id; + $return = $this->db->query($sql); + if ($return) return 1; + else return -1; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Remove tag payed on social contribution + * + * @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."salary SET"; + $sql .= " paye = 0"; + $sql .= " WHERE rowid = ".$this->id; + $return = $this->db->query($sql); + if ($return) return 1; + else return -1; + } + + + /** + * Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @return string Label + */ + public function getLibStatut($mode = 0, $alreadypaid = -1) + { + return $this->LibStatut($this->paye, $mode, $alreadypaid); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Renvoi le libelle d'un statut donne + * + * @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 + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @return string Label + */ + public function LibStatut($status, $mode = 0, $alreadypaid = -1) + { + // phpcs:enable + global $langs; + + // Load translation files required by the page + $langs->loadLangs(array("customers", "bills")); + + // We reinit status array to force to redefine them because label may change according to properties values. + $this->labelStatus = array(); + $this->labelStatusShort = array(); + + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("mymodule"); + $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); + $this->labelStatus[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('BillStatusNotPaid'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('BillStatusPaid'); + if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); + } + + $statusType = 'status1'; + if ($status == 0 && $alreadypaid <> 0) $statusType = 'status3'; + if ($status == 1) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } +} diff --git a/htdocs/salaries/document.php b/htdocs/salaries/document.php index b30bb9cb3d6..4c88cefb8de 100644 --- a/htdocs/salaries/document.php +++ b/htdocs/salaries/document.php @@ -7,6 +7,7 @@ * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2015-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +34,7 @@ require '../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.'/core/lib/salaries.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "users", "salaries", "hrm")); @@ -43,37 +44,45 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -// Security check -$socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'salaries', '', '', ''); - - // Get parameters $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 +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"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} - -$object = new PaymentSalary($db); -$object->fetch($id, $ref); +$object = new Salary($db); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} $upload_dir = $conf->salaries->dir_output.'/'.dol_sanitizeFileName($object->id); $modulepart = 'salaries'; +// Security check +$socid = GETPOSTINT('socid'); +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', $object->id, 'salary', ''); + /* * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -84,19 +93,17 @@ $form = new Form($db); llxHeader("", $langs->trans("SalaryPayment")); -if ($object->id) -{ +if ($object->id) { $object->fetch_thirdparty(); $head = salaries_prepare_head($object); - print dol_get_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment'); + print dol_get_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'salary'); // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -116,8 +123,23 @@ if ($object->id) print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield centpercent">'; - print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; - print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>'; + + print "<tr>"; + print '<td class="titlefield">' . $langs->trans("DateStartPeriod") . '</td><td>'; + print dol_print_date($object->datesp, 'day'); + print '</td></tr>'; + + print "<tr>"; + print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>'; + print dol_print_date($object->dateep, 'day'); + print '</td></tr>'; + + print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>'; + + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td>'.count($filearray).'</td></tr>'; + + print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td>'.dol_print_size($totalsize, 1, 1).'</td></tr>'; + print '</table>'; print '</div>'; diff --git a/htdocs/salaries/info.php b/htdocs/salaries/info.php index 9461bae867e..1b81a80189f 100644 --- a/htdocs/salaries/info.php +++ b/htdocs/salaries/info.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com> * Copyright (C) 2017-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,7 +25,7 @@ */ require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -32,12 +33,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array("compta", "bills", "users", "salaries", "hrm")); $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); +$object = new Salary($db); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} + // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'salaries', '', '', ''); +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', $object->id, 'salary', ''); /* @@ -46,13 +55,13 @@ $result = restrictedArea($user, 'salaries', '', '', ''); llxHeader("", $langs->trans("SalaryPayment")); -$object = new PaymentSalary($db); +$object = new Salary($db); $object->fetch($id); $object->info($id); $head = salaries_prepare_head($object); -print dol_get_fiche_head($head, 'info', $langs->trans("SalaryPayment"), -1, 'payment'); +print dol_get_fiche_head($head, 'info', $langs->trans("SalaryPayment"), -1, 'salary'); $linkback = '<a href="'.DOL_URL_ROOT.'/salaries/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index b8a0ba69ef7..382e05e4f0d 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +27,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} // Load translation files required by the page $langs->loadLangs(array("compta", "salaries", "bills", "hrm")); @@ -46,12 +49,18 @@ $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 +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 = "s.datep,s.rowid"; -if (!$sortorder) $sortorder = "DESC,DESC"; +if (!$sortfield) { + $sortfield = "s.datep,s.rowid"; +} +if (!$sortorder) { + $sortorder = "DESC,DESC"; +} // Initialize technical objects $object = new PaymentSalary($db); @@ -64,27 +73,34 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); -if (!$sortfield) $sortfield = "s.datep,s.rowid"; -if (!$sortorder) $sortorder = "DESC,DESC"; +if (!$sortfield) { + $sortfield = "s.datep,s.rowid"; +} +if (!$sortorder) { + $sortorder = "DESC,DESC"; +} $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_date_start_from = dol_mktime(0, 0, 0, GETPOST('search_date_start_frommonth', 'int'), GETPOST('search_date_start_fromday', 'int'), GETPOST('search_date_start_fromyear', 'int')); +$search_date_start_to = dol_mktime(23, 59, 59, GETPOST('search_date_start_tomonth', 'int'), GETPOST('search_date_start_today', 'int'), GETPOST('search_date_start_toyear', 'int')); +$search_date_end_from = dol_mktime(0, 0, 0, GETPOST('search_date_end_frommonth', 'int'), GETPOST('search_date_end_fromday', 'int'), GETPOST('search_date_end_fromyear', 'int')); +$search_date_end_to = dol_mktime(23, 59, 59, GETPOST('search_date_end_tomonth', 'int'), GETPOST('search_date_end_today', 'int'), GETPOST('search_date_end_toyear', 'int')); $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'int'); +$search_status = GETPOST('search_status', 'int'); $filtre = GETPOST("filtre", 'restricthtml'); -if (!GETPOST('search_type_id', 'int')) -{ +if (!GETPOST('search_type_id', 'int')) { $newfiltre = str_replace('filtre=', '', $filtre); $filterarray = explode('-', $newfiltre); - foreach ($filterarray as $val) - { + foreach ($filterarray as $val) { $part = explode(':', $val); - if ($part[0] == 's.fk_typepayment') $search_type_id = $part[1]; + if ($part[0] == 's.fk_typepayment') { + $search_type_id = $part[1]; + } } } else { $search_type_id = GETPOST('search_type_id', 'int'); @@ -92,62 +108,99 @@ if (!GETPOST('search_type_id', 'int')) $childids = $user->getAllChildIds(1); -// Security check -$socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'salaries', '', '', ''); - // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } +// 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'])) { + $visible = (int) 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 +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + $permissiontoread = $user->rights->salaries->read; $permissiontoadd = $user->rights->salaries->write; $permissiontodelete = $user->rights->salaries->delete; +// Security check +$socid = GETPOST("socid", "int"); +if ($user->socid) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', '', 'salary', ''); + /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 test are required to be compatible with all browsers - { + 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_user = ""; $search_label = ""; - $search_date_start = ''; + $search_date_start_from = ''; + $search_date_start_to = ''; + $search_date_end_from = ''; + $search_date_end_to = ''; $search_date_end = ''; $search_amount = ""; $search_account = ''; + $search_status = ''; $search_type_id = ""; } 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')) - { + || 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 } @@ -158,8 +211,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // Validate records - if (!$error && $massaction == 'buildsepa' && $permissiontoadd) - { + if (!$error && $massaction == 'buildsepa' && $permissiontoadd) { $objecttmp = new $objectclass($db); // TODO @@ -171,7 +223,7 @@ if (empty($reshook)) */ $form = new Form($db); -$salstatic = new PaymentSalary($db); +$salstatic = new Salary($db); $userstatic = new User($db); $accountstatic = new Account($db); @@ -179,60 +231,79 @@ $now = dol_now(); //$help_url="EN:Module_BillOfMaterials|FR:Module_BillOfMaterials_FR|ES:Módulo_BillOfMaterials"; $help_url = ''; -$title = $langs->trans('SalariesPayments'); +$title = $langs->trans('Salaries'); $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc, u.statut as status,"; -$sql .= " s.rowid, s.fk_user, s.amount, s.salary, s.label, s.datep as datep, s.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,"; -$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel,"; -$sql .= " pst.code as payment_code"; -$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid,"; +$sql .= " s.rowid, s.fk_account, s.paye, s.fk_user, s.amount, s.salary, s.label, s.datesp, s.dateep, s.fk_typepayment as paymenttype, "; +$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,"; +$sql .= " pst.code as payment_code,"; +$sql .= " SUM(ps.amount) as alreadypayed"; +$sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON (ps.fk_salary = s.rowid) "; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON (s.fk_typepayment = pst.id) "; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account ba ON (ba.rowid = s.fk_account), "; +//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON ps.fk_salary = s.rowid, "; $sql .= " ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.rowid = s.fk_user"; $sql .= " AND s.entity IN (".getEntity('payment_salaries').")"; -if (empty($user->rights->salaries->readall)) $sql .= " AND s.fk_user IN (".join(',', $childids).")"; +if (empty($user->rights->salaries->readall)) { + $sql .= " AND s.fk_user IN (".$db->sanitize(join(',', $childids)).")"; +} // Search criteria -if ($search_ref) $sql .= " AND s.rowid=".((int) $search_ref); -if ($search_user) $sql .= natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email'), $search_user); -if ($search_label) $sql .= natural_search(array('s.label'), $search_label); -if ($search_date_start) $sql .= " AND s.datep >= '".$db->idate($search_date_start)."'"; -if ($search_date_end) $sql .= " AND s.datep <= '".$db->idate($search_date_end)."'"; -if ($search_amount) $sql .= natural_search("s.amount", $search_amount, 1); -if ($search_account > 0) $sql .= " AND b.fk_account=".((int) $search_account); -if ($filtre) { - $filtre = str_replace(":", "=", $filtre); - $sql .= " AND ".$filtre; +if ($search_ref) { + $sql .= " AND s.rowid=".((int) $search_ref); +} +if ($search_user) { + $sql .= natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email'), $search_user); +} +if ($search_label) { + $sql .= natural_search(array('s.label'), $search_label); +} +if (!empty($search_date_start_from) && !empty($search_date_start_to)) { + $sql .= " AND s.datesp BETWEEN '".$db->idate($search_date_start_from)."' AND '".$db->idate($search_date_start_to)."'"; +} +if (!empty($search_date_end_from) && !empty($search_date_end_to)) { + $sql .= " AND s.dateep BETWEEN '".$db->idate($search_date_end_from)."' AND '".$db->idate($search_date_end_to)."'"; +} +if ($search_amount) { + $sql .= natural_search("s.amount", $search_amount, 1); +} +if ($search_account > 0) { + $sql .= " AND s.fk_account=".((int) $search_account); +} +if ($search_status != '' && $search_status >= 0) { + $sql .= " AND s.paye = ".$db->escape($search_status); } if ($search_type_id) { $sql .= " AND s.fk_typepayment=".$search_type_id; } +$sql .= " GROUP BY u.rowid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary, u.fk_soc, u.statut,"; +$sql .= " s.rowid, s.fk_account, s.paye, s.fk_user, s.amount, s.salary, s.label, s.datesp, s.dateep, s.fk_typepayment, s.fk_bank,"; +$sql .= " ba.rowid, ba.ref, ba.number, ba.account_number, ba.fk_accountancy_journal, ba.label, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos,"; +$sql .= " pst.code"; $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -248,30 +319,64 @@ llxHeader('', $title, $help_url); $arrayofselected = is_array($toselect) ? $toselect : array(); $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_type_id) $param .= '&search_type_id='.urlencode($search_type_id); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); -if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); -if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); -if ($search_label) $param .= '&search_label='.urlencode($search_label); -if ($search_account) $param .= '&search_account='.urlencode($search_account); -if ($search_date_start) $param .= '&search_date_startday='.urlencode(GETPOST('search_date_startday', 'int')).'&search_date_startmonth='.urlencode(GETPOST('search_date_startmonth', 'int')).'&search_date_startyear='.urlencode(GETPOST('search_date_startyear', 'int')); -if ($search_date_end) $param .= '&search_date_endday='.urlencode(GETPOST('search_date_endday', 'int')).'&search_date_endmonth='.urlencode(GETPOST('search_date_endmonth', 'int')).'&search_date_endyear='.urlencode(GETPOST('search_date_endyear', 'int')); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($search_type_id) { + $param .= '&search_type_id='.urlencode($search_type_id); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} +if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); +} +if ($search_user > 0) { + $param .= '&search_user='.urlencode($search_user); +} +if ($search_label) { + $param .= '&search_label='.urlencode($search_label); +} +if ($search_account) { + $param .= '&search_account='.urlencode($search_account); +} +if ($search_status != '' && $search_status != '-1') { + $param .= '&search_status='.urlencode($search_status); +} +if (!empty($search_date_start_from)) { + $param .= '&search_date_start_fromday='.urlencode(GETPOST('search_date_start_fromday')).'&search_date_start_frommonth='.urlencode(GETPOST('search_date_start_frommonth')).'&search_date_start_fromyear='.urlencode(GETPOST('search_date_start_fromyear')); +} +if (!empty($search_date_start_to)) { + $param .= "&search_date_start_today=".urlencode(GETPOST('search_date_start_today'))."&search_date_start_tomonth=".urlencode(GETPOST('search_date_start_tomonth'))."&search_date_start_toyear=".urlencode(GETPOST('search_date_start_toyear')); +} +if (!empty($search_date_end_from)) { + $param .= '&search_date_end_fromday='.urlencode(GETPOST('search_date_end_fromday')).'&search_date_end_frommonth='.urlencode(GETPOST('search_date_end_frommonth')).'&search_date_end_fromyear='.urlencode(GETPOST('search_date_end_fromyear')); +} +if (!empty($search_date_end_to)) { + $param .= "&search_date_end_today=".urlencode(GETPOST('search_date_end_today'))."&search_date_end_tomonth=".urlencode(GETPOST('search_date_end_tomonth'))."&search_date_end_toyear=".urlencode(GETPOST('search_date_end_toyear')); +} + // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'buildsepa'=>$langs->trans("BuildSepa"), // TODO + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'buildsepa'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("BuildSepa"), // TODO ); -//if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -280,16 +385,20 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; $url = DOL_URL_ROOT.'/salaries/card.php?action=create'; -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->salaries->write); -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'salary', 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 $selectedfields = ''; $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); +$moreforfilter = ''; + print '<div class="div-table-responsive">'; print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; @@ -300,38 +409,54 @@ print '<tr class="liste_titre_filter">'; print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).'">'; print '</td>'; +// Label +print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).'"></td>'; + +// Date start +print '<td class="liste_titre center">'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_start_from ? $search_date_start_from : -1, 'search_date_start_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print '</div>'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_start_to ? $search_date_start_to : -1, 'search_date_start_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print '</div>'; +print '</td>'; + +// Date End +print '<td class="liste_titre center">'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_end_from ? $search_date_end_from : -1, 'search_date_end_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print '</div>'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_end_to ? $search_date_end_to : -1, 'search_date_end_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print '</div>'; +print '</td>'; + // Employee print '<td class="liste_titre">'; print '<input class="flat" type="text" size="6" name="search_user" value="'.$db->escape($search_user).'">'; print '</td>'; -// Label -print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).'"></td>'; -// Date payment -print '<td class="liste_titre center">'; -print '<div class="nowrap">'; -print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); -print '</div>'; -print '<div class="nowrap">'; -print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); -print '</div>'; -print '</td>'; -// Date value -print '<td class="liste_titre center">'; -print '</td>'; + // Type print '<td class="liste_titre left">'; $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16); print '</td>'; -// Account -if (!empty($conf->banque->enabled)) -{ + +// Bank account +if (!empty($conf->banque->enabled)) { print '<td class="liste_titre">'; $form->select_comptes($search_account, 'search_account', 0, '', 1); print '</td>'; } + // Amount print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>'; +print '<td class="liste_titre maxwidthonsmartphone right">'; +$liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); +print $form->selectarray('search_status', $liststatus, $search_status, 1); +print '</td>'; + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -351,13 +476,16 @@ print '</tr>'."\n"; // -------------------------------------------------------------------- print '<tr class="liste_titre">'; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder); -print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'class="left"', $sortfield, $sortorder); -print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, '', $sortfield, $sortorder, 'center '); -print_liste_field_titre("DateValue", $_SERVER["PHP_SELF"], "s.datev,s.rowid", "", $param, '', $sortfield, $sortorder, 'center '); -print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder); -if (!empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); -print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder); +print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "s.datesp,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "s.dateep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("DefaultPaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder); +if (!empty($conf->banque->enabled)) { + print_liste_field_titre("DefaultBankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); +} +print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder); +print_liste_field_titre('Status', $_SERVER["PHP_SELF"], "s.paye", '', $param, 'class="right"', $sortfield, $sortorder); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -371,11 +499,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -384,17 +512,15 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co $i = 0; $total = 0; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); - // Show here line of result - print '<tr class="oddeven">'; - $userstatic->id = $obj->uid; $userstatic->lastname = $obj->lastname; $userstatic->firstname = $obj->firstname; @@ -406,44 +532,68 @@ while ($i < ($limit ? min($num, $limit) : $num)) $salstatic->id = $obj->rowid; $salstatic->ref = $obj->rowid; + $salstatic->label = $obj->label; + $salstatic->paye = $obj->paye; + $salstatic->datesp = $db->jdate($obj->datesp); + $salstatic->dateep = $db->jdate($obj->dateep); + + // Show here line of result + print '<tr class="oddeven">'; // Ref print "<td>".$salstatic->getNomUrl(1)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - - // Employee - print "<td>".$userstatic->getNomUrl(1)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } // Label payment print "<td>".dol_trunc($obj->label, 40)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } - // Date payment - print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n"; - if (!$i) $totalarray['nbfield']++; + // Date Start + print '<td class="center">'.dol_print_date($db->jdate($obj->datesp), 'day')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } - // Date value - print '<td class="center">'.dol_print_date($db->jdate($obj->datev), 'day')."</td>\n"; - if (!$i) $totalarray['nbfield']++; + // Date End + print '<td class="center">'.dol_print_date($db->jdate($obj->dateep), 'day')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + + // Employee + print "<td>".$userstatic->getNomUrl(1)."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } // Type - print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.'</td>'; - if (!$i) $totalarray['nbfield']++; + print '<td>'; + if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } // Account - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print '<td>'; - if ($obj->fk_bank > 0) - { + if ($obj->fk_account > 0) { //$accountstatic->fetch($obj->fk_bank); $accountstatic->id = $obj->bid; $accountstatic->ref = $obj->bref; + $accountstatic->label = $obj->blabel; $accountstatic->number = $obj->bnumber; + $accountstatic->iban = $obj->iban; + $accountstatic->bic = $obj->bic; + $accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code); + $accountstatic->account_number = $obj->account_number; + $accountstatic->clos = $obj->clos; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountstatic->account_number = $obj->account_number; $accountingjournal = new AccountingJournal($db); @@ -451,19 +601,32 @@ while ($i < ($limit ? min($num, $limit) : $num)) $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); } - $accountstatic->label = $obj->blabel; + //$accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } else print '&nbsp;'; + } else { + print '&nbsp;'; + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } + // if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + // Amount - print '<td class="nowrap right">'.price($obj->amount).'</td>'; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + } $totalarray['val']['totalttcfield'] += $obj->amount; + print '<td class="nowrap right">'.$salstatic->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>'; + if (!$i) $totalarray['nbfield']++; + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook @@ -472,14 +635,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -491,10 +657,15 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ - $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } +if ($num == 0) { + /*$colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + }*/ + $colspan = 9; + if (!empty($conf->banque->enabled)) { $colspan++; } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -511,7 +682,6 @@ print '</div>'."\n"; print '</form>'."\n"; - // End of page llxFooter(); $db->close(); diff --git a/htdocs/salaries/paiement_salary.php b/htdocs/salaries/paiement_salary.php new file mode 100644 index 00000000000..5ab67c71c0e --- /dev/null +++ b/htdocs/salaries/paiement_salary.php @@ -0,0 +1,327 @@ +<?php +/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2016-2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/compta/paiement_salary.php + * \ingroup salary + * \brief Page to add payment of a salary + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("banks", "bills")); + +$action = GETPOST('action', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); + +$id = GETPOSTINT('id'); +$ref = GETPOST('ref', 'alpha'); +$amounts = array(); + +$object = new Salary($db); +if ($id > 0 || !empty($ref)) { + $object->fetch($id, $ref); +} + +// Security check +$socid = GETPOST("socid", "int"); +if ($user->socid > 0) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', $object->id, 'salary', ''); + + +/* + * Actions + */ + +if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) { + $error = 0; + + if ($cancel) { + $loc = DOL_URL_ROOT.'/salaries/card.php?id='.$id; + header("Location: ".$loc); + exit; + } + + $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + + if (!(GETPOST("paiementtype", 'int') > 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); + $error++; + $action = 'create'; + } + if ($datepaye == '') { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); + $error++; + $action = 'create'; + } + if (!empty($conf->banque->enabled) && !(GETPOST("accountid", 'int') > 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToDebit")), null, 'errors'); + $error++; + $action = 'create'; + } + + // Read possible payments + foreach ($_POST as $key => $value) { + if (substr($key, 0, 7) == 'amount_') { + $other_chid = substr($key, 7); + $amounts[$other_chid] = price2num($_POST[$key]); + } + } + + if ($amounts[key($amounts)] <= 0) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); + $action = 'create'; + } + + if (!$error) { + $paymentid = 0; + + if (!$error) { + $db->begin(); + + // Create a line of payments + $paiement = new PaymentSalary($db); + $paiement->chid = $id; + $paiement->datepaye = $datepaye; + $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'); + + if (!$error) { + $paymentid = $paiement->create($user, (GETPOST('closepaidsalary') == 'on' ? 1 : 0)); + if ($paymentid < 0) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + $action = 'create'; + } + } + + if (!$error) { + $result = $paiement->addPaymentToBank($user, 'payment_salary', '(SalaryPayment)', GETPOST('accountid', 'int'), '', ''); + if (!($result > 0)) { + $error++; + setEventMessages($paiement->error, null, 'errors'); + $action = 'create'; + } + } + + if (!$error) { + $db->commit(); + $loc = DOL_URL_ROOT.'/salaries/card.php?id='.$id; + header('Location: '.$loc); + exit; + } else { + $db->rollback(); + } + } + } +} + + +/* + * View + */ + +$form = new Form($db); + +$help_url = ''; + +llxHeader('', '', $help_url); + +$salary = $object; + +// Formulaire de creation d'un paiement de charge +if ($action == 'create') { + $salary->accountid = $salary->fk_account ? $salary->fk_account : $salary->accountid; + $salary->paiementtype = $salary->mode_reglement_id ? $salary->mode_reglement_id : $salary->paiementtype; + + $total = $salary->amount; + if (!empty($conf->use_javascript_ajax)) { + print "\n".'<script type="text/javascript" language="javascript">'; + + //Add js for AutoFill + print ' $(document).ready(function () {'; + print ' $(".AutoFillAmount").on(\'click touchstart\', function(){ + var amount = $(this).data("value"); + document.getElementById($(this).data(\'rowid\')).value = amount ; + });'; + print ' });'."\n"; + + print ' </script>'."\n"; + } + + print load_fiche_titre($langs->trans("DoPayment")); + print "<br>\n"; + + print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="id" value="'.$id.'">'; + print '<input type="hidden" name="chid" value="'.$id.'">'; + print '<input type="hidden" name="action" value="add_payment">'; + + print dol_get_fiche_head(); + + print '<table class="border centpercent">'; + + print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td><a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$id.'">'.$id.'</a></td></tr>'; + print '<tr><td>'.$langs->trans("DateStart")."</td><td>".dol_print_date($salary->datesp, 'day')."</td></tr>\n"; + print '<tr><td>'.$langs->trans("DateEnd")."</td><td>".dol_print_date($salary->dateep, 'day')."</td></tr>\n"; + print '<tr><td>'.$langs->trans("Label").'</td><td>'.$salary->label."</td></tr>\n"; + /*print '<tr><td>'.$langs->trans("DateDue")."</td><td>".dol_print_date($salary->date_ech,'day')."</td></tr>\n"; + print '<tr><td>'.$langs->trans("Amount")."</td><td>".price($salary->amount,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';*/ + + $sql = "SELECT sum(p.amount) as total"; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as p"; + $sql .= " WHERE p.fk_salary = ".((int) $id); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + $sumpaid = $obj->total; + $db->free($resql); + } + /*print '<tr><td>'.$langs->trans("AlreadyPaid").'</td><td>'.price($sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>'; + print '<tr><td class="tdtop">'.$langs->trans("RemainderToPay").'</td><td>'.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';*/ + + print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>'; + $datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int')); + $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOST("remonth") ? $datepaye : -1) : ''; + print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); + print "</td>"; + print '</tr>'; + + print '<tr><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>'; + $form->select_types_paiements(GETPOSTISSET("paiementtype") ? GETPOST("paiementtype") : $salary->type_payment, "paiementtype"); + print "</td>\n"; + print '</tr>'; + + print '<tr>'; + print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>'; + print '<td>'; + print img_picto('', 'bank_account', 'class="pictofixedwidth"'); + $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $salary->accountid, "accountid", 0, '', 1); // Show opend bank account list + print '</td></tr>'; + + // Number + print '<tr><td>'.$langs->trans('Numero'); + print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; + print '</td>'; + print '<td><input name="num_payment" type="text" value="'.GETPOST('num_payment', 'alphanohtml').'"></td></tr>'."\n"; + + print '<tr>'; + print '<td class="tdtop">'.$langs->trans("Comments").'</td>'; + print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>'; + print '</tr>'; + + print '</table>'; + + print dol_get_fiche_end(); + + /* + * Autres charges impayees + */ + $num = 1; + $i = 0; + + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + //print '<td>'.$langs->trans("SocialContribution").'</td>'; + print '<td class="left">'.$langs->trans("DateEnd").'</td>'; + print '<td class="right">'.$langs->trans("Amount").'</td>'; + print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>'; + print '<td class="right">'.$langs->trans("RemainderToPay").'</td>'; + print '<td class="center">'.$langs->trans("Amount").'</td>'; + print "</tr>\n"; + + $total = 0; + $totalrecu = 0; + + while ($i < $num) { + $objp = $salary; + + print '<tr class="oddeven">'; + + if ($objp->dateep > 0) { + print '<td class="left">'.dol_print_date($objp->dateep, 'day').'</td>'."\n"; + } else { + print '<td align="center"><b>!!!</b></td>'."\n"; + } + + print '<td class="right">'.price($objp->amount)."</td>"; + + print '<td class="right">'.price($sumpaid)."</td>"; + + print '<td class="right">'.price($objp->amount - $sumpaid)."</td>"; + + print '<td class="center">'; + if ($sumpaid < $objp->amount) { + $namef = "amount_".$objp->id; + $nameRemain = "remain_".$objp->id; + /* Disabled, we autofil the amount with remain to pay by default + if (!empty($conf->use_javascript_ajax)) { + print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'"); + } */ + $remaintopay = $objp->amount - $sumpaid; + print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">'; + print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'" value="'.$remaintopay.'">'; + } else { + print '-'; + } + print "</td>"; + + print "</tr>\n"; + $total += $objp->total; + $total_ttc += $objp->total_ttc; + $totalrecu += $objp->am; + $i++; + } + if ($i > 1) { + // Print total + print '<tr class="oddeven">'; + print '<td colspan="2" class="left">'.$langs->trans("Total").':</td>'; + print '<td class="right"><b>'.price($total_ttc).'</b></td>'; + print '<td class="right"><b>'.price($totalrecu).'</b></td>'; + print '<td class="right"><b>'.price($total_ttc - $totalrecu).'</b></td>'; + print '<td align="center">&nbsp;</td>'; + print "</tr>\n"; + } + + print "</table>"; + + // Bouton Save payment + print '<br><div class="center"><input type="checkbox" checked name="closepaidsalary"> '.$langs->trans("ClosePaidSalaryAutomatically"); + print '<br><input type="submit" class="button" name="save" value="'.$langs->trans('ToMakePayment').'">'; + print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; + print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + + print "</form>\n"; +} + +llxFooter(); +$db->close(); diff --git a/htdocs/salaries/payment_salary/card.php b/htdocs/salaries/payment_salary/card.php new file mode 100644 index 00000000000..ae711719585 --- /dev/null +++ b/htdocs/salaries/payment_salary/card.php @@ -0,0 +1,268 @@ +<?php +/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> + * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/compta/payment_sc/card.php + * \ingroup facture + * \brief Onglet payment of a salary + * \remarks Fichier presque identique a fournisseur/paiement/card.php + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; +if (!empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('bills', 'banks', 'companies', 'salaries')); + +// Security check +$id = GETPOST("id", 'int'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +if ($user->socid) $socid = $user->socid; + +$object = new PaymentSalary($db); +if ($id > 0) { + $result = $object->fetch($id); + if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); +} +restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary + + +/* + * Actions + */ + +// Delete payment +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->salaries->delete) { + $db->begin(); + + $result = $object->delete($user); + if ($result > 0) { + $db->commit(); + header("Location: ".DOL_URL_ROOT."/salaries/payments.php"); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $db->rollback(); + } +} + + +/* + * View + */ + +llxHeader(); + +$salary = new Salary($db); + +$form = new Form($db); + +$h = 0; + +$head = array(); + +$head[$h][0] = DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$id; +$head[$h][1] = $langs->trans("SalaryPayment"); +$hselected = $h; +$h++; + +/* +$head[$h][0] = DOL_URL_ROOT.'/compta/payment_sc/info.php?id='.$id; +$head[$h][1] = $langs->trans("Info"); +$h++; +*/ + + +print dol_get_fiche_head($head, $hselected, $langs->trans("SalaryPayment"), -1, 'payment'); + +/* + * Deletion confirmation of payment + */ +if ($action == 'delete') { + print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeleteSalary"), $langs->trans("ConfirmDeleteSalaryPayment"), 'confirm_delete', '', 0, 2); +} + +/* + * Validation confirmation of payment + */ +/* +if ($action == 'valide') +{ + $facid = $_GET['facid']; + print $form->formconfirm('card.php?id='.$object->id.'&amp;facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + +} +*/ + + +$linkback = '<a href="'.DOL_URL_ROOT.'/salaries/payments.php">'.$langs->trans("BackToList").'</a>'; + +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'id', ''); + + +print '<div class="fichecenter">'; +print '<div class="underbanner clearboth"></div>'; + +print '<table class="border centpercent">'; + +// Ref +/*print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>'; +print '<td colspan="3">'; +print $form->showrefnav($object,'id','',1,'rowid','id'); +print '</td></tr>';*/ + +// Date +print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'.dol_print_date($object->datep, 'day').'</td></tr>'; + +// Mode +print '<tr><td>'.$langs->trans('Mode').'</td><td colspan="3">'.$langs->trans("PaymentType".$object->type_code).'</td></tr>'; + +// Numero +print '<tr><td>'.$langs->trans('Numero').'</td><td colspan="3">'.$object->num_payment.'</td></tr>'; + +// Montant +print '<tr><td>'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>'; + +// Note +print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($object->note).'</td></tr>'; + +// Bank account +if (!empty($conf->banque->enabled)) { + if ($object->bank_account) { + $bankline = new AccountLine($db); + $bankline->fetch($object->bank_line); + + print '<tr>'; + print '<td>'.$langs->trans('BankTransactionLine').'</td>'; + print '<td colspan="3">'; + print $bankline->getNomUrl(1, 0, 'showall'); + print '</td>'; + print '</tr>'; + } +} + +print '</table>'; + +print '</div>'; + +print dol_get_fiche_end(); + + +/* + * List of salaries payed + */ + +$disable_delete = 0; +$sql = 'SELECT f.rowid as scid, f.label, f.paye, f.amount as sc_amount, ps.amount'; +$sql .= ' FROM '.MAIN_DB_PREFIX.'payment_salary as ps,'.MAIN_DB_PREFIX.'salary as f'; +$sql .= ' WHERE ps.fk_salary = f.rowid'; +$sql .= ' AND f.entity = '.$conf->entity; +$sql .= ' AND ps.rowid = '.$object->id; + +dol_syslog("payment_salary/card.php", LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + + $i = 0; + $total = 0; + print '<br>'; + + print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table + print '<table class="noborder centpercent">'; + print '<tr class="liste_titre">'; + print '<td>'.$langs->trans('Salary').'</td>'; + print '<td>'.$langs->trans('Type').'</td>'; + print '<td>'.$langs->trans('Label').'</td>'; + print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>'; + print '<td class="center">'.$langs->trans('Status').'</td>'; + print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>'; + print "</tr>\n"; + + if ($num > 0) { + while ($i < $num) { + $objp = $db->fetch_object($resql); + + print '<tr class="oddeven">'; + // Ref + print '<td>'; + $salary->fetch($objp->scid); + print $salary->getNomUrl(1); + print "</td>\n"; + // Type + print '<td>'; + print $salary->type_label; + /*print $salary->type;*/ + print "</td>\n"; + // Label + print '<td>'.$objp->label.'</td>'; + // Expected to pay + print '<td class="right">'.price($objp->sc_amount).'</td>'; + // Status + print '<td class="center">'.$salary->getLibStatut(4, $objp->amount).'</td>'; + // Amount payed + print '<td class="right">'.price($objp->amount).'</td>'; + print "</tr>\n"; + if ($objp->paye == 1) { + // If at least one invoice is paid, disable delete + $disable_delete = 1; + } + $total = $total + $objp->amount; + $i++; + } + } + + print "</table>\n"; + print "</div>"; + + $db->free($resql); +} else { + dol_print_error($db); +} + + + +/* + * Button actions + */ + +print '<div class="tabsAction">'; + +if ($action == '') { + if ($user->rights->salaries->delete) { + if (!$disable_delete) { + print '<a class="butActionDelete" href="card.php?id='.GETPOST('id', 'int').'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'; + } else { + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("CantRemovePaymentSalaryPaid")).'">'.$langs->trans('Delete').'</a>'; + } + } +} + +print '</div>'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/salaries/payments.php b/htdocs/salaries/payments.php new file mode 100644 index 00000000000..f0602e88a5c --- /dev/null +++ b/htdocs/salaries/payments.php @@ -0,0 +1,572 @@ +<?php +/* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file htdocs/salaries/list.php + * \ingroup salaries + * \brief List of salaries payments + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("compta", "salaries", "bills", "hrm")); + +$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') : 'bomlist'; // 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', '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 = "s.datep,s.rowid"; +if (!$sortorder) $sortorder = "DESC,DESC"; + +// Initialize technical objects +$object = new PaymentSalary($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->user->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('salarieslist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +if (!$sortfield) $sortfield = "s.datep,s.rowid"; +if (!$sortorder) $sortorder = "DESC,DESC"; + +$search_ref = GETPOST('search_ref', 'int'); +$search_ref_salary = GETPOST('search_ref_salary', '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_dateep_start = dol_mktime(0, 0, 0, GETPOST('search_dateep_startmonth', 'int'), GETPOST('search_dateep_startday', 'int'), GETPOST('search_dateep_startyear', 'int')); +$search_dateep_end = dol_mktime(23, 59, 59, GETPOST('search_dateep_endmonth', 'int'), GETPOST('search_dateep_endday', 'int'), GETPOST('search_dateep_endyear', 'int')); +$search_amount = GETPOST('search_amount', 'alpha'); +$search_account = GETPOST('search_account', 'int'); +$search_fk_bank = GETPOST('search_fk_bank', 'int'); +$search_chq_number = GETPOST('search_chq_number', 'int'); + +$filtre = GETPOST("filtre", 'restricthtml'); + +if (!GETPOST('search_type_id', 'int')) { + $newfiltre = str_replace('filtre=', '', $filtre); + $filterarray = explode('-', $newfiltre); + foreach ($filterarray as $val) { + $part = explode(':', $val); + if ($part[0] == 's.fk_typepayment') $search_type_id = $part[1]; + } +} else { + $search_type_id = GETPOST('search_type_id', 'int'); +} + +$childids = $user->getAllChildIds(1); + +// Initialize array of search criterias +$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'); +} + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +} + +$permissiontoread = $user->rights->salaries->read; +$permissiontoadd = $user->rights->salaries->write; +$permissiontodelete = $user->rights->salaries->delete; + +// Security check +$socid = GETPOST("socid", "int"); +if ($user->socid > 0) { + $socid = $user->socid; +} +restrictedArea($user, 'salaries', 0, 'salary', ''); + + +/* + * 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 test are required to be compatible with all browsers + $search_ref = ""; + $search_ref_salary = ""; + $search_user = ""; + $search_label = ""; + $search_date_start = ''; + $search_date_end = ''; + $search_dateep_start = ''; + $search_dateep_end = ''; + $search_amount = ""; + $search_account = ''; + $search_fk_bank = ''; + $search_chq_number = ''; + $search_type_id = ""; + } + 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 = 'PaymentSalary'; + $objectlabel = 'SalariesPayments'; + $uploaddir = $conf->salaries->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + + // Validate records + if (!$error && $massaction == 'buildsepa' && $permissiontoadd) { + $objecttmp = new $objectclass($db); + + // TODO + } +} + +/* + * View + */ + +$form = new Form($db); +$salstatic = new Salary($db); +$paymentsalstatic = new PaymentSalary($db); +$userstatic = new User($db); +$accountstatic = new Account($db); +$accountlinestatic = new AccountLine($db); + +$now = dol_now(); + +//$help_url="EN:Module_BillOfMaterials|FR:Module_BillOfMaterials_FR|ES:Módulo_BillOfMaterials"; +$help_url = ''; +$title = $langs->trans('SalariesPayments'); + +$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc, u.statut as status,"; +$sql .= " s.rowid, s.fk_user, s.amount, s.salary, sal.rowid as id_salary, sal.label, s.datep as datep, sal.dateep, b.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,"; +$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,"; +$sql .= " pst.code as payment_code"; +$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as s"; +$sql .= " INNER JOIN ".MAIN_DB_PREFIX."salary as sal ON (sal.rowid = s.fk_salary)"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid,"; +$sql .= " ".MAIN_DB_PREFIX."user as u"; +$sql .= " WHERE u.rowid = sal.fk_user"; +$sql .= " AND s.entity IN (".getEntity('payment_salaries').")"; +if (empty($user->rights->salaries->readall)) $sql .= " AND s.fk_user IN (".$db->sanitize(join(',', $childids)).")"; + +// Search criteria +if ($search_ref) $sql .= " AND s.rowid=".((int) $search_ref); +if ($search_ref_salary) $sql .= " AND sal.rowid=".((int) $search_ref_salary); +if ($search_user) $sql .= natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email'), $search_user); +if ($search_label) $sql .= natural_search(array('sal.label'), $search_label); +if ($search_date_start) $sql .= " AND s.datep >= '".$db->idate($search_date_start)."'"; +if ($search_date_end) $sql .= " AND s.datep <= '".$db->idate($search_date_end)."'"; +if ($search_dateep_start) $sql .= " AND sal.dateep >= '".$db->idate($search_dateep_start)."'"; +if ($search_dateep_end) $sql .= " AND sal.dateep <= '".$db->idate($search_dateep_end)."'"; +if ($search_amount) $sql .= natural_search("s.amount", $search_amount, 1); +if ($search_account > 0) $sql .= " AND b.fk_account=".((int) $search_account); +if ($search_fk_bank) $sql .= " AND s.fk_bank=".((int) $search_fk_bank); +if ($search_chq_number) $sql .= natural_search(array('s.num_payment'), $search_chq_number); + +if ($search_type_id > 0) { + $sql .= " AND s.fk_typepayment=".$search_type_id; +} +$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 of record found is smaller than page * limit, goto and load page 0 + $page = 0; + $offset = 0; + } +} +// 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); +} + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url); + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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_type_id) $param .= '&search_type_id='.urlencode($search_type_id); +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); +if ($search_ref_salary) $param .= '&search_ref_salary='.urlencode($search_ref_salary); +if ($search_user) $param .= '&search_user='.urlencode($search_user); +if ($search_label) $param .= '&search_label='.urlencode($search_label); +if ($search_fk_bank) $param .= '&search_fk_bank='.urlencode($search_fk_bank); +if ($search_chq_number) $param .= '&search_chq_number='.urlencode($search_chq_number); +if ($search_account) $param .= '&search_account='.urlencode($search_account); +if ($search_date_start) $param .= '&search_date_startday='.urlencode(GETPOST('search_date_startday', 'int')).'&search_date_startmonth='.urlencode(GETPOST('search_date_startmonth', 'int')).'&search_date_startyear='.urlencode(GETPOST('search_date_startyear', 'int')); +if ($search_dateep_start) $param .= '&search_dateep_startday='.urlencode(GETPOST('search_dateep_startday', 'int')).'&search_dateep_startmonth='.urlencode(GETPOST('search_dateep_startmonth', 'int')).'&search_dateep_startyear='.urlencode(GETPOST('search_dateep_startyear', 'int')); +if ($search_date_end) $param .= '&search_date_endday='.urlencode(GETPOST('search_date_endday', 'int')).'&search_date_endmonth='.urlencode(GETPOST('search_date_endmonth', 'int')).'&search_date_endyear='.urlencode(GETPOST('search_date_endyear', 'int')); +if ($search_dateep_end) $param .= '&search_dateep_endday='.urlencode(GETPOST('search_dateep_endday', 'int')).'&search_dateep_endmonth='.urlencode(GETPOST('search_dateep_endmonth', 'int')).'&search_dateep_endyear='.urlencode(GETPOST('search_dateep_endyear', 'int')); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +// List of mass actions available +$arrayofmassactions = array( + //'presend'=>$langs->trans("SendByMail"), + //'buildsepa'=>$langs->trans("BuildSepa"), // TODO +); +//if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; +if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; +print '<input type="hidden" name="action" value="list">'; +print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; +print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; +print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; + +$url = DOL_URL_ROOT.'/salaries/card.php?action=create'; +if (!empty($socid)) $url .= '&socid='.$socid; +$newcardbutton = dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->salaries->write); + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'object_payment', 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 +$selectedfields = ''; +$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + +print '<div class="div-table-responsive">'; +print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; + +// Fields title search +// -------------------------------------------------------------------- +print '<tr class="liste_titre_filter">'; +// Ref +print '<td class="liste_titre left">'; +print '<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).'">'; +print '</td>'; +// Salary +print '<td class="liste_titre center">'; +print '<input class="flat" type="text" size="3" name="search_ref_salary" value="'.$db->escape($search_ref_salary).'">'; +print '</td>'; +// Label +print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).'"></td>'; +// Date end period +print '<td class="liste_titre center">'; +print '<div class="nowrap">'; +print $form->selectDate($search_dateep_start ? $search_dateep_start : -1, 'search_dateep_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print '</div>'; +print '<div class="nowrap">'; +print $form->selectDate($search_dateep_end ? $search_dateep_end : -1, 'search_dateep_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print '</div>'; +print '</td>'; +// Date payment +print '<td class="liste_titre center">'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print '</div>'; +print '<div class="nowrap">'; +print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print '</div>'; +print '</td>'; +// Date value +/*print '<td class="liste_titre center">'; +print '</td>';*/ +// Employee +print '<td class="liste_titre">'; +print '<input class="flat" type="text" size="6" name="search_user" value="'.$db->escape($search_user).'">'; +print '</td>'; +// Type +print '<td class="liste_titre left">'; +$form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16); +print '</td>'; +// Chq number +print '<td class="liste_titre right"><input name="search_chq_number" class="flat" type="text" size="8" value="'.$db->escape($search_chq_number).'"></td>'; + +if (!empty($conf->banque->enabled)) { + // Bank transaction + print '<td class="liste_titre center">'; + print '<input class="flat" type="text" size="3" name="search_fk_bank" value="'.$db->escape($search_fk_bank).'">'; + print '</td>'; + + // Account + print '<td class="liste_titre">'; + $form->select_comptes($search_account, 'search_account', 0, '', 1); + print '</td>'; +} +// Amount +print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>'; + +// 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 '<td class="liste_titre maxwidthsearch">'; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '</td>'; +print '</tr>'."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print '<tr class="liste_titre">'; +print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("Salary", $_SERVER["PHP_SELF"], "sal.rowid", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'class="left"', $sortfield, $sortorder); +print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "sal.dateep", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, '', $sortfield, $sortorder, 'center '); +//print_liste_field_titre("DateValue", $_SERVER["PHP_SELF"], "b.datev,s.rowid", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder); +print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pst.code", "", $param, 'class="left"', $sortfield, $sortorder); +print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "s.num_payment", "", $param, '', $sortfield, $sortorder, '', 'ChequeOrTransferNumber'); +if (!empty($conf->banque->enabled)) { + print_liste_field_titre("BankTransactionLine", $_SERVER["PHP_SELF"], "s.fk_bank", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); +} +print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $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, $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 '</tr>'."\n"; + + +// 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) { + if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object + } +} + +// Loop on record +// -------------------------------------------------------------------- +$i = 0; +$total = 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 '<tr class="oddeven">'; + + $userstatic->id = $obj->uid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->admin = $obj->admin; + $userstatic->login = $obj->login; + $userstatic->email = $obj->email; + $userstatic->socid = $obj->fk_soc; + $userstatic->statut = $obj->status; + + $salstatic->id = $obj->id_salary; + $salstatic->ref = $obj->id_salary; + + $paymentsalstatic->id = $obj->rowid; + $paymentsalstatic->ref = $obj->rowid; + + // Ref + print "<td>".$paymentsalstatic->getNomUrl(1)."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + print "<td>".$salstatic->getNomUrl(1)."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + // Label payment + print "<td>".dol_trunc($obj->label, 40)."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + // Date end period + print '<td class="center">'.dol_print_date($db->jdate($obj->dateep), 'day')."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + // Date payment + print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + // Date value + /*print '<td class="center">'.dol_print_date($db->jdate($obj->datev), 'day')."</td>\n"; + if (!$i) $totalarray['nbfield']++;*/ + + // Employee + print "<td>".$userstatic->getNomUrl(1)."</td>\n"; + if (!$i) $totalarray['nbfield']++; + + // Type + print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).'</td>'; + if (!$i) $totalarray['nbfield']++; + + // Chq number + print '<td>'.$obj->num_payment.'</td>'; + if (!$i) $totalarray['nbfield']++; + + // Account + if (!empty($conf->banque->enabled)) { + // Bank transaction + print '<td>'; + $accountlinestatic->id = $obj->fk_bank; + print $accountlinestatic->getNomUrl(1); + print '</td>'; + if (!$i) $totalarray['nbfield']++; + + print '<td>'; + if ($obj->fk_bank > 0) { + //$accountstatic->fetch($obj->fk_bank); + $accountstatic->id = $obj->bid; + $accountstatic->ref = $obj->bref; + $accountstatic->number = $obj->bnumber; + $accountstatic->iban = $obj->iban; + $accountstatic->bic = $obj->bic; + $accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code); + $accountstatic->clos = $obj->clos; + + if (!empty($conf->accounting->enabled)) { + $accountstatic->account_number = $obj->account_number; + + $accountingjournal = new AccountingJournal($db); + $accountingjournal->fetch($obj->fk_accountancy_journal); + + $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); + } + $accountstatic->label = $obj->blabel; + if ($accountstatic->id > 0) { + print $accountstatic->getNomUrl(1); + } + } else print '&nbsp;'; + print '</td>'; + if (!$i) $totalarray['nbfield']++; + } + + // Amount + print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>'; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield'; + $totalarray['val']['totalttcfield'] += $obj->amount; + + // 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 '<td class="nowrap center">'; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($object->id, $arrayofselected)) $selected = 1; + print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; + } + print '</td>'; + if (!$i) $totalarray['nbfield']++; + + print '</tr>'."\n"; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + + +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; +} + + +$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 '</table>'."\n"; +print '</div>'."\n"; + +print '</form>'."\n"; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/salaries/stats/index.php b/htdocs/salaries/stats/index.php index 1f0598f4245..1fe914d38c2 100644 --- a/htdocs/salaries/stats/index.php +++ b/htdocs/salaries/stats/index.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2018 Fidesio <contact@fidesio.com> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,18 +28,26 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/salaries/class/salariesstats.class.php'; // Load translation files required by the page -$langs->loadLangs(array("salaries", "companies")); +$langs->loadLangs(array("salaries", "companies", "bills")); $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); -$userid = GETPOST('userid', 'int'); if ($userid < 0) $userid = 0; -$socid = GETPOST('socid', 'int'); if ($socid < 0) $socid = 0; +$userid = GETPOST('userid', 'int'); +if ($userid < 0) { + $userid = 0; +} +$socid = GETPOST('socid', 'int'); +if ($socid < 0) { + $socid = 0; +} $id = GETPOST('id', 'int'); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'salaries', '', '', ''); $nowyear = strftime("%Y", dol_now()); @@ -60,7 +69,7 @@ llxHeader(); $title = $langs->trans("SalariesStatistics"); $dir = $conf->salaries->dir_temp; -print load_fiche_titre($title, '', 'object_payment'); +print load_fiche_titre($title, '', 'salary'); dol_mkdir($dir); @@ -80,12 +89,10 @@ $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&amp;file=sala $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -112,12 +119,10 @@ $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&amp;file= $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -143,12 +148,10 @@ $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=salariesstats&file=salari $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -173,7 +176,9 @@ $arrayyears = array(); foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; @@ -198,12 +203,14 @@ print '<input type="hidden" name="token" value="'.newToken().'">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>'; // User -print '<tr><td>'.$langs->trans("User").'</td><td>'; -print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); +print '<tr><td>'.$langs->trans("Employee").'</td><td>'; +print $form->select_dolusers(($userid ? $userid : -1), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '</td></tr>'; // Year print '<tr><td>'.$langs->trans("Year").'</td><td>'; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -222,11 +229,9 @@ print '<td class="right">'.$langs->trans("AmountAverage").'</td>'; print '</tr>'; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while ($year && $oldyear > $year + 1) - { + while ($year && $oldyear > $year + 1) { // If we have empty year $oldyear--; @@ -256,7 +261,9 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; // Show graphs print '<table class="border centpercent"><tr class="pair nohover"><td align="center">'; -if ($mesg) { print $mesg; } else { +if ($mesg) { + print $mesg; +} else { print $px1->show(); print "<br>\n"; print $px2->show(); diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index a52bf52332b..6607efa554d 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -36,13 +36,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'socpeople'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index aa738f0845b..d0edd54f946 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -35,7 +35,9 @@ $langs->loadLangs(array("admin", "companies", "other")); $action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $formcompany = new FormCompany($db); @@ -47,10 +49,8 @@ $formcompany = new FormCompany($db); include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'setcodeclient') -{ - if (dolibarr_set_const($db, "SOCIETE_CODECLIENT_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) - { +if ($action == 'setcodeclient') { + if (dolibarr_set_const($db, "SOCIETE_CODECLIENT_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -58,10 +58,8 @@ if ($action == 'setcodeclient') } } -if ($action == 'setcodecompta') -{ - if (dolibarr_set_const($db, "SOCIETE_CODECOMPTA_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) - { +if ($action == 'setcodecompta') { + if (dolibarr_set_const($db, "SOCIETE_CODECOMPTA_ADDON", $value, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -69,41 +67,40 @@ if ($action == 'setcodecompta') } } -if ($action == 'updateoptions') -{ - if (GETPOST('COMPANY_USE_SEARCH_TO_SELECT')) - { +if ($action == 'updateoptions') { + if (GETPOST('COMPANY_USE_SEARCH_TO_SELECT')) { $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } - if (GETPOST('CONTACT_USE_SEARCH_TO_SELECT')) - { + if (GETPOST('CONTACT_USE_SEARCH_TO_SELECT')) { $contactsearch = GETPOST('activate_CONTACT_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "CONTACT_USE_SEARCH_TO_SELECT", $contactsearch, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } - if (GETPOST('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) - { + if (GETPOST('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { $customertypedefault = GETPOST('defaultcustomertype', 'int'); $res = dolibarr_set_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault, 'chaine', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -112,8 +109,7 @@ if ($action == 'updateoptions') } // Activate a document generator module -if ($action == 'set') -{ +if ($action == 'set') { $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -125,22 +121,24 @@ if ($action == 'set') $sql .= ")"; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } // Disable a document generator module -if ($action == 'del') -{ +if ($action == 'del') { $type = 'company'; $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE nom='".$db->escape($value)."' AND type='".$db->escape($type)."' AND entity=".$conf->entity; $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } } // Define default generator -if ($action == 'setdoc') -{ +if ($action == 'setdoc') { $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -164,8 +162,7 @@ if ($action == 'setdoc') $sql .= ")"; dol_syslog("societe.php", LOG_DEBUG); $result2 = $db->query($sql); - if ($result1 && $result2) - { + if ($result1 && $result2) { $db->commit(); } else { $db->rollback(); @@ -176,9 +173,10 @@ if ($action == 'setdoc') if ($action == "setaddrefinlist") { $setaddrefinlist = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ADD_REF_IN_LIST", $setaddrefinlist, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -189,9 +187,10 @@ if ($action == "setaddrefinlist") { if ($action == "setaddadressinlist") { $val = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "COMPANY_SHOW_ADDRESS_SELECTLIST", $val, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -202,7 +201,9 @@ if ($action == "setaddadressinlist") { if ($action == "setaddemailphonetownincontactlist") { $val = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST", $val, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -214,9 +215,10 @@ if ($action == "setaddemailphonetownincontactlist") { if ($action == "setaskforshippingmet") { $setaskforshippingmet = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ASK_FOR_SHIPPING_METHOD", $setaskforshippingmet, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -227,9 +229,10 @@ if ($action == "setaskforshippingmet") { if ($action == "setdisableprospectcustomer") { $setdisableprospectcustomer = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_DISABLE_PROSPECTSCUSTOMERS", $setdisableprospectcustomer, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -237,13 +240,11 @@ if ($action == "setdisableprospectcustomer") { } //Activate ProfId unique -if ($action == 'setprofid') -{ +if ($action == 'setprofid') { $status = GETPOST('status', 'alpha'); $idprof = "SOCIETE_".$value."_UNIQUE"; - if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) { //header("Location: ".$_SERVER["PHP_SELF"]); //exit; } else { @@ -252,13 +253,11 @@ if ($action == 'setprofid') } //Activate ProfId mandatory -if ($action == 'setprofidmandatory') -{ +if ($action == 'setprofidmandatory') { $status = GETPOST('status', 'alpha'); $idprof = "SOCIETE_".$value."_MANDATORY"; - if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) { //header("Location: ".$_SERVER["PHP_SELF"]); //exit; } else { @@ -267,13 +266,11 @@ if ($action == 'setprofidmandatory') } //Activate ProfId invoice mandatory -if ($action == 'setprofidinvoicemandatory') -{ +if ($action == 'setprofidinvoicemandatory') { $status = GETPOST('status', 'alpha'); $idprof = "SOCIETE_".$value."_INVOICE_MANDATORY"; - if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, $idprof, $status, 'chaine', 0, '', $conf->entity) > 0) { //header("Location: ".$_SERVER["PHP_SELF"]); //exit; } else { @@ -282,12 +279,10 @@ if ($action == 'setprofidinvoicemandatory') } //Set hide closed customer into combox or select -if ($action == 'sethideinactivethirdparty') -{ +if ($action == 'sethideinactivethirdparty') { $status = GETPOST('status', 'alpha'); - if (dolibarr_set_const($db, "COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) - { + if (dolibarr_set_const($db, "COMPANY_HIDE_INACTIVE_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { @@ -297,9 +292,10 @@ if ($action == 'sethideinactivethirdparty') if ($action == 'setonsearchandlistgooncustomerorsuppliercard') { $setonsearchandlistgooncustomerorsuppliercard = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD", $setonsearchandlistgooncustomerorsuppliercard, 'yesno', 0, '', $conf->entity); - if (!($res > 0)) $error++; - if (!$error) - { + if (!($res > 0)) { + $error++; + } + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -326,7 +322,9 @@ $head = societe_admin_prepare_head(); print dol_get_fiche_head($head, 'general', $langs->trans("ThirdParties"), -1, 'company'); $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); -foreach ($conf->modules_parts['models'] as $mo) $dirsociete[] = $mo.'core/modules/societe/'; //Add more models +foreach ($conf->modules_parts['models'] as $mo) { + $dirsociete[] = $mo.'core/modules/societe/'; //Add more models +} // Module to manage customer/supplier code @@ -344,32 +342,31 @@ print "</tr>\n"; $arrayofmodules = array(); -foreach ($dirsociete as $dirroot) -{ +foreach ($dirsociete as $dirroot) { $dir = dol_buildpath($dirroot, 0); $handle = @opendir($dir); - if (is_resource($handle)) - { + if (is_resource($handle)) { // Loop on each module find in opened directory - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 15) == 'mod_codeclient_' && substr($file, -3) == 'php') - { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 15) == 'mod_codeclient_' && substr($file, -3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); try { dol_include_once($dirroot.$file.'.php'); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } $modCodeTiers = new $file; // Show modules according to features level - if ($modCodeTiers->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($modCodeTiers->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($modCodeTiers->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($modCodeTiers->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } $arrayofmodules[$file] = $modCodeTiers; } @@ -380,24 +377,26 @@ foreach ($dirsociete as $dirroot) $arrayofmodules = dol_sort_array($arrayofmodules, 'position'); -foreach ($arrayofmodules as $file => $modCodeTiers) -{ +foreach ($arrayofmodules as $file => $modCodeTiers) { print '<tr class="oddeven">'."\n"; print '<td width="140">'.$modCodeTiers->name.'</td>'."\n"; print '<td>'.$modCodeTiers->info($langs).'</td>'."\n"; print '<td class="nowrap">'.$modCodeTiers->getExample($langs).'</td>'."\n"; - if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file") - { + if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file") { print '<td class="center">'."\n"; print img_picto($langs->trans("Activated"), 'switch_on'); print "</td>\n"; } else { $disabled = (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false); print '<td class="center">'; - if (!$disabled) print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeclient&amp;token='.newToken().'&amp;value='.urlencode($file).'">'; + if (!$disabled) { + print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodeclient&amp;token='.newToken().'&amp;value='.urlencode($file).'">'; + } print img_picto($langs->trans("Disabled"), 'switch_off'); - if (!$disabled) print '</a>'; + if (!$disabled) { + print '</a>'; + } print '</td>'; } @@ -430,23 +429,18 @@ print "</tr>\n"; $arrayofmodules = array(); -foreach ($dirsociete as $dirroot) -{ +foreach ($dirsociete as $dirroot) { $dir = dol_buildpath($dirroot, 0); $handle = @opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 15) == 'mod_codecompta_' && substr($file, -3) == 'php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 15) == 'mod_codecompta_' && substr($file, -3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); try { dol_include_once($dirroot.$file.'.php'); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -462,16 +456,14 @@ foreach ($dirsociete as $dirroot) $arrayofmodules = dol_sort_array($arrayofmodules, 'position'); -foreach ($arrayofmodules as $file => $modCodeCompta) -{ +foreach ($arrayofmodules as $file => $modCodeCompta) { print '<tr class="oddeven">'; print '<td>'.$modCodeCompta->name."</td><td>\n"; print $modCodeCompta->info($langs); print '</td>'; print '<td class="nowrap">'.$modCodeCompta->getExample($langs)."</td>\n"; - if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") - { + if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") { print '<td class="center">'; print img_picto($langs->trans("Activated"), 'switch_on'); print '</td>'; @@ -503,12 +495,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE type = 'company'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); - while ($i < $num_rows) - { + while ($i < $num_rows) { $array = $db->fetch_array($resql); array_push($def, $array[0]); $i++; @@ -527,24 +517,19 @@ print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>'; print '<td class="center" width="60">'.$langs->trans("Preview").'</td>'; print "</tr>\n"; -foreach ($dirsociete as $dirroot) -{ +foreach ($dirsociete as $dirroot) { $dir = dol_buildpath($dirroot.'doc/', 0); $handle = @opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.modules\.php$/i', $file)) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/\.modules\.php$/i', $file)) { $name = substr($file, 4, dol_strlen($file) - 16); $classname = substr($file, 0, dol_strlen($file) - 12); try { dol_include_once($dirroot.'doc/'.$file); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -552,22 +537,26 @@ foreach ($dirsociete as $dirroot) $modulequalified = 1; if (!empty($module->version)) { - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; - elseif ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + $modulequalified = 0; + } elseif ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + $modulequalified = 0; + } } - if ($modulequalified) - { + if ($modulequalified) { print '<tr class="oddeven"><td width="100">'; print $module->name; print "</td><td>\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } print '</td>'; // Activate / Disable - if (in_array($name, $def)) - { + if (in_array($name, $def)) { print "<td class=\"center\">\n"; //if ($conf->global->COMPANY_ADDON_PDF != "$name") //{ @@ -581,8 +570,7 @@ foreach ($dirsociete as $dirroot) //} print "</td>"; } else { - if (versioncompare($module->phpmin, versionphparray()) > 0) - { + if (versioncompare($module->phpmin, versionphparray()) > 0) { print '<td class="center">'."\n"; print img_picto(dol_escape_htmltag($langs->trans("ErrorModuleRequirePHPVersion", join('.', $module->phpmin))), 'switch_off'); print "</td>"; @@ -596,8 +584,7 @@ foreach ($dirsociete as $dirroot) // Info $htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $htmltooltip .= '<br>'.$langs->trans("Height").'/'.$langs->trans("Width").': '.$module->page_hauteur.'/'.$module->page_largeur; } $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; @@ -609,8 +596,7 @@ foreach ($dirsociete as $dirroot) // Preview print '<td class="center nowrap">'; - if ($module->type == 'pdf') - { + if ($module->type == 'pdf') { $linkspec = '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&token='.newToken().'&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; } else { $linkspec = img_object($langs->trans("PreviewNotAvailable"), 'generic'); @@ -659,10 +645,8 @@ $profid['EMAIL'][0] = $langs->trans("EMail"); $profid['EMAIL'][1] = $langs->trans('Email'); $nbofloop = count($profid); -foreach ($profid as $key => $val) -{ - if ($profid[$key][1] != '-') - { +foreach ($profid as $key => $val) { + if ($profid[$key][1] != '-') { print '<tr class="oddeven">'; print '<td>'.$profid[$key][0]."</td><td>\n"; print $profid[$key][1]; @@ -676,8 +660,7 @@ foreach ($profid as $key => $val) $mandatory = (empty($conf->global->$idprof_mandatory) ?false:true); $invoice_mandatory = (empty($conf->global->$idprof_invoice_mandatory) ?false:true); - if ($verif) - { + if ($verif) { print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofid&token='.newToken().'&value='.$key.'&status=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); print '</a></td>'; @@ -687,8 +670,7 @@ foreach ($profid as $key => $val) print '</a></td>'; } - if ($mandatory) - { + if ($mandatory) { print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidmandatory&token='.newToken().'&value='.$key.'&status=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); print '</a></td>'; @@ -698,8 +680,7 @@ foreach ($profid as $key => $val) print '</a></td>'; } - if ($invoice_mandatory) - { + if ($invoice_mandatory) { print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setprofidinvoicemandatory&token='.newToken().'&value='.$key.'&status=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); print '</a></td>'; @@ -726,6 +707,7 @@ $form = new Form($db); print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="page_y" value="">'; print '<input type="hidden" name="action" value="updateoptions">'; print '<div class="div-table-responsive-no-min">'; @@ -739,8 +721,7 @@ print '<td width="80">&nbsp;</td></tr>'."\n"; print '<tr class="oddeven">'; print '<td width="80%">'.$form->textwithpicto($langs->trans("DelaiedFullListToSelectCompany"), $langs->trans('UseSearchToSelectCompanyTooltip'), 1).' </td>'; -if (!$conf->use_javascript_ajax) -{ +if (!$conf->use_javascript_ajax) { print '<td class="nowrap right" colspan="2">'; print $langs->trans("NotAvailableWhenAjaxDisabled"); print "</td>"; @@ -753,7 +734,7 @@ if (!$conf->use_javascript_ajax) ); print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); print '</td><td class="right">'; - print '<input type="submit" class="button" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; + print '<input type="submit" class="button reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; print "</td>"; } print '</tr>'; @@ -761,8 +742,7 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td width="80%">'.$form->textwithpicto($langs->trans("DelaiedFullListToSelectContact"), $langs->trans('UseSearchToSelectContactTooltip'), 1).'</td>'; -if (!$conf->use_javascript_ajax) -{ +if (!$conf->use_javascript_ajax) { print '<td class="nowrap right" colspan="2">'; print $langs->trans("NotAvailableWhenAjaxDisabled"); print "</td>"; @@ -775,7 +755,7 @@ if (!$conf->use_javascript_ajax) ); print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->CONTACT_USE_SEARCH_TO_SELECT, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); print '</td><td class="right">'; - print '<input type="submit" class="button" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; + print '<input type="submit" class="button reposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; print "</td>"; } print '</tr>'; @@ -784,10 +764,9 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("AddRefInList").'</td>'; -print '<td>&nbsp</td>'; +print '<td>&nbsp;</td>'; print '<td class="center">'; -if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) -{ +if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&token='.newToken().'&value=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -799,10 +778,9 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("AddAdressInList").'</td>'; -print '<td>&nbsp</td>'; +print '<td>&nbsp;</td>'; print '<td class="center">'; -if (!empty($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST)) -{ +if (!empty($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setaddadressinlist&token='.newToken().'&value=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -814,7 +792,7 @@ print '</tr>'; print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("AddEmailPhoneTownInContactList").'</td>'; -print '<td>&nbsp</td>'; +print '<td>&nbsp;</td>'; print '<td class="center">'; if (!empty($conf->global->CONTACT_SHOW_EMAIL_PHONE_TOWN_SELECTLIST)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setaddemailphonetownincontactlist&token='.newToken().'&value=0">'; @@ -830,10 +808,9 @@ if (!empty($conf->expedition->enabled)) { if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { // Visible on experimental only because seems to not be implemented everywhere (only on proposal) print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("AskForPreferredShippingMethod").'</td>'; - print '<td>&nbsp</td>'; + print '<td>&nbsp;</td>'; print '<td class="center">'; - if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) - { + if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setaskforshippingmet&token='.newToken().'&value=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -848,10 +825,9 @@ if (!empty($conf->expedition->enabled)) { // Disable Prospect/Customer thirdparty type print '<tr class="oddeven">'; print '<td width="80%">'.$langs->trans("DisableProspectCustomerType").'</td>'; -print '<td>&nbsp</td>'; +print '<td>&nbsp;</td>'; print '<td class="center">'; -if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) -{ +if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisableprospectcustomer&token='.newToken().'&value=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -861,16 +837,18 @@ if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) print '</a></td>'; print '</tr>'; -// Default Prospect/Customer thirdparty type on customer création -print '<tr class="oddeven">'; -print '<td width="80%">'.$langs->trans("DefaultCustomerType").'</td>'; -print '<td>'; -print $formcompany->selectProspectCustomerType($conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT, 'defaultcustomertype', 'defaultcustomertype', 'admin'); -print '</td>'; -print '<td class="center">'; -print '<input type="submit" class="button" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans("Modify").'">'; -print '</td>'; -print '</tr>'; +if (empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) { + // Default Prospect/Customer thirdparty type on customer création + print '<tr class="oddeven">'; + print '<td>'.$langs->trans("DefaultCustomerType").'</td>'; + print '<td>'; + print $formcompany->selectProspectCustomerType($conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT, 'defaultcustomertype', 'defaultcustomertype', 'admin'); + print '</td>'; + print '<td class="center">'; + print '<input type="submit" class="button reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans("Modify").'">'; + print '</td>'; + print '</tr>'; +} print '</table>'; print '</div>'; diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php index 16d88142588..a785b95c892 100644 --- a/htdocs/societe/admin/societe_extrafields.php +++ b/htdocs/societe/admin/societe_extrafields.php @@ -36,13 +36,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'societe'; //Must be the $element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +81,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print '<br><div id="editattrib"></div>'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index f98f7ac7ccf..8789427c64b 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -34,10 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array("companies", "bills", "propal", "orders")); -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -45,19 +46,27 @@ $search_agenda_label = GETPOST('search_agenda_label'); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, '&societe'); $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 (!$sortfield) $sortfield = 'a.datep,a.id'; -if (!$sortorder) $sortorder = 'DESC,DESC'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('agendathirdparty')); @@ -69,20 +78,19 @@ $hookmanager->initHooks(array('agendathirdparty')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + 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 - { + 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 = ''; } @@ -96,8 +104,7 @@ if (empty($reshook)) $form = new Form($db); -if ($socid > 0) -{ +if ($socid > 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -105,10 +112,14 @@ if ($socid > 0) $result = $object->fetch($socid); $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; + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$title; + } llxHeader('', $title); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = societe_prepare_head($object); print dol_get_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), -1, 'company'); @@ -137,29 +148,31 @@ if ($socid > 0) $out = ''; $permok = $user->rights->agenda->myactions->create; - if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) - { - if (is_object($objthirdparty) && get_class($objthirdparty) == 'Societe') $out .= '&amp;originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&amp;socid='.$objthirdparty->id : '').'&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].($objthirdparty->id > 0 ? '?socid='.$objthirdparty->id : '')); + if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { + if (is_object($objthirdparty) && get_class($objthirdparty) == 'Societe') { + $out .= '&amp;originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&amp;socid='.$objthirdparty->id : '').'&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].($objthirdparty->id > 0 ? '?socid='.$objthirdparty->id : '')); + } $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;percentage=-1'; $out .= '&amp;datep='.dol_print_date(dol_now(), 'dayhourlog'); } $newcardbutton = ''; - if (!empty($conf->agenda->enabled)) - { - if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) - { + if (!empty($conf->agenda->enabled)) { + if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out); } } - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { print '<br>'; $param = '&socid='.$socid; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, ''); //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 1); diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajax/ajaxcompanies.php similarity index 66% rename from htdocs/societe/ajaxcompanies.php rename to htdocs/societe/ajax/ajaxcompanies.php index da7591a419b..9295c363206 100644 --- a/htdocs/societe/ajaxcompanies.php +++ b/htdocs/societe/ajax/ajaxcompanies.php @@ -19,18 +19,45 @@ */ /** - * \file htdocs/societe/ajaxcompanies.php + * \file htdocs/societe/ajax/ajaxcompanies.php * \brief File to return Ajax response on third parties request */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} -require '../main.inc.php'; +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + +$id = GETPOST('socid', 'int') || GETPOST('id_fourn', 'int'); + +$object = new Societe($db); +if ($id > 0) { + $object->fetch($id); +} + +// Security check +if ($user->socid > 0) { + $socid = $user->socid; + $object->id = $socid; +} +restrictedArea($user, 'societe', $object->id, '&societe'); /* @@ -46,28 +73,27 @@ top_httphead(); //print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; -dol_syslog(join(',', $_GET)); - -// Generation liste des societes -if (GETPOST('newcompany') || GETPOST('socid', 'int') || GETPOST('id_fourn')) -{ +// Generate list of companies +if (GETPOST('newcompany') || GETPOST('socid', 'int') || GETPOST('id_fourn', 'int')) { $return_arr = array(); // Define filter on text typed - $socid = $_GET['newcompany'] ? $_GET['newcompany'] : ''; - if (!$socid) $socid = $_GET['socid'] ? $_GET['socid'] : ''; - if (!$socid) $socid = $_GET['id_fourn'] ? $_GET['id_fourn'] : ''; + $socid = GETPOST('newcompany'); + if (!$socid) { + $socid = GETPOST('socid', 'int'); + } + if (!$socid) { + $socid = GETPOST('id_fourn', 'int'); + } $sql = "SELECT rowid, nom"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; - if ($socid) - { + if ($socid) { $sql .= " AND ("; // Add criteria on name/code - if (!empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE)) // Can use index - { + if (!empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE)) { // Can use index $sql .= "nom LIKE '".$db->escape($socid)."%'"; $sql .= " OR code_client LIKE '".$db->escape($socid)."%'"; $sql .= " OR code_fournisseur LIKE '".$db->escape($socid)."%'"; @@ -76,7 +102,9 @@ if (GETPOST('newcompany') || GETPOST('socid', 'int') || GETPOST('id_fourn')) $sql .= " OR code_client LIKE '%".$db->escape($socid)."%'"; $sql .= " OR code_fournisseur LIKE '%".$db->escape($socid)."%'"; } - if (!empty($conf->global->SOCIETE_ALLOW_SEARCH_ON_ROWID)) $sql .= " OR rowid = '".$db->escape($socid)."'"; + if (!empty($conf->global->SOCIETE_ALLOW_SEARCH_ON_ROWID)) { + $sql .= " OR rowid = ".((int) $socid); + } $sql .= ")"; } //if (GETPOST("filter")) $sql.= " AND (".GETPOST("filter", "alpha").")"; // Add other filters @@ -84,12 +112,12 @@ if (GETPOST('newcompany') || GETPOST('socid', 'int') || GETPOST('id_fourn')) //dol_syslog("ajaxcompanies", LOG_DEBUG); $resql = $db->query($sql); - if ($resql) - { - while ($row = $db->fetch_array($resql)) - { + if ($resql) { + while ($row = $db->fetch_array($resql)) { $label = $row['nom']; - if ($socid) $label = preg_replace('/('.preg_quote($socid, '/').')/i', '<strong>$1</strong>', $label, 1); + if ($socid) { + $label = preg_replace('/('.preg_quote($socid, '/').')/i', '<strong>$1</strong>', $label, 1); + } $row_array['label'] = $label; $row_array['value'] = $row['nom']; $row_array['key'] = $row['rowid']; diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php index a56fa0d9f81..76151bccb97 100644 --- a/htdocs/societe/ajax/company.php +++ b/htdocs/societe/ajax/company.php @@ -22,42 +22,63 @@ * \brief File to return Ajax response on thirdparty list request */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); // Disables token renewal +} +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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $htmlname = GETPOST('htmlname', 'alpha'); $filter = GETPOST('filter', 'alpha'); $outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0); $action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); +$excludeids = GETPOST('excludeids', 'intcomma'); $showtype = GETPOST('showtype', 'int'); +$object = new Societe($db); +if ($id > 0) { + $object->fetch($id); +} + +// Security check +if ($user->socid > 0) { + unset($action); + $socid = $user->socid; + $object->id = $socid; +} +restrictedArea($user, 'societe', $object->id, '&societe'); + /* * View */ //print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; - -dol_syslog(join(',', $_GET)); //print_r($_GET); -if (!empty($action) && $action == 'fetch' && !empty($id)) -{ +if (!empty($action) && $action == 'fetch' && !empty($id)) { require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $outjson = array(); - $object = new Societe($db); - $ret = $object->fetch($id); - if ($ret > 0) - { + if ($object->id > 0) { $outref = $object->ref; $outname = $object->name; $outdesc = ''; @@ -74,21 +95,38 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) top_httphead(); - if (empty($htmlname)) return; + if (empty($htmlname)) { + return; + } + // Filter on the company to search can be: + // Into an array with key $htmlname123 (we take first one found). Which page use this ? + // Into a var with name $htmlname can be 'prodid', 'productid', ... $match = preg_grep('/('.$htmlname.'[0-9]+)/', array_keys($_GET)); sort($match); - $id = (!empty($match[0]) ? $match[0] : ''); + + $id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123 // When used from jQuery, the search term is added as GET param "term". - $searchkey = (($id && GETPOST($id, 'alpha')) ?GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : '')); + $searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : '')); - if (!$searchkey) return; + if (!$searchkey) { + return; + } + + if (!is_object($form)) { + $form = new Form($db); + } + + if (!empty($excludeids)) { + $filter .= 'rowid NOT IN ('.$db->sanitize($excludeids).')'; + } - if (!is_object($form)) $form = new Form($db); $arrayresult = $form->select_thirdparty_list(0, $htmlname, $filter, 1, $showtype, 0, null, $searchkey, $outjson); $db->close(); - if ($outjson) print json_encode($arrayresult); + if ($outjson) { + print json_encode($arrayresult); + } } diff --git a/htdocs/societe/ajax/index.html b/htdocs/societe/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/ajaxcountries.php b/htdocs/societe/ajaxcountries.php deleted file mode 100644 index dfc4ffd9015..00000000000 --- a/htdocs/societe/ajaxcountries.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> - * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net> - * - * 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/>. - */ - -/** - * \file htdocs/societe/ajaxcountries.php - * \brief File to return Ajax response on country request - */ - -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal -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('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); - -require '../main.inc.php'; - -$country = GETPOST('country', 'alpha'); - - -/* - * View - */ - -// Ajout directives pour resoudre bug IE -//header('Cache-Control: Public, must-revalidate'); -//header('Pragma: public'); - -//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header. -top_httphead(); - -print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; - -dol_syslog(join(',', $_POST)); - -// Generate list of countries -if (!empty($country)) -{ - global $langs; - $langs->load("dict"); - - $sql = "SELECT rowid, code, label, active"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_country"; - $sql .= " WHERE active = 1 AND label LIKE '%".$db->escape(utf8_decode($country))."%'"; - $sql .= " ORDER BY label ASC"; - - $resql = $db->query($sql); - if ($resql) - { - print '<ul>'; - while ($country = $db->fetch_object($resql)) - { - print '<li>'; - // Si traduction existe, on l'utilise, sinon on prend le libellé par défaut - print ($country->code && $langs->trans("Country".$country->code) != "Country".$country->code ? $langs->trans("Country".$country->code) : ($country->label != '-' ? $country->label : '&nbsp;')); - print '<span class="informal" style="display:none">'.$country->rowid.'-idcache</span>'; - print '</li>'; - } - print '</ul>'; - } -} diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 83309e0faf1..ea6aaa8d14e 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -66,7 +66,9 @@ abstract class ActionsCardCommon //$ret = $this->getInstanceDao(); $object = new Societe($this->db); - if (!empty($id) || !empty($ref)) $object->fetch($id, $ref); + if (!empty($id) || !empty($ref)) { + $object->fetch($id, $ref); + } $this->object = $object; } @@ -85,26 +87,37 @@ abstract class ActionsCardCommon global $conf, $langs, $db, $user, $mysoc, $canvas; global $form, $formadmin, $formcompany; - if ($action == 'add' || $action == 'update') $this->assign_post($action); + if ($action == 'add' || $action == 'update') { + $this->assign_post($action); + } - if ($_GET["type"] == 'f') { $this->object->fournisseur = 1; } - if ($_GET["type"] == 'c') { $this->object->client = 1; } - if ($_GET["type"] == 'p') { $this->object->client = 2; } - if ($_GET["type"] == 'cp') { $this->object->client = 3; } - if ($_REQUEST["private"] == 1) { $this->object->particulier = 1; } + if ($_GET["type"] == 'f') { + $this->object->fournisseur = 1; + } + if ($_GET["type"] == 'c') { + $this->object->client = 1; + } + if ($_GET["type"] == 'p') { + $this->object->client = 2; + } + if ($_GET["type"] == 'cp') { + $this->object->client = 3; + } + if ($_REQUEST["private"] == 1) { + $this->object->particulier = 1; + } - foreach ($this->object as $key => $value) - { + foreach ($this->object as $key => $value) { $this->tpl[$key] = $value; } $this->tpl['error'] = get_htmloutput_errors($this->object->error, $this->object->errors); - if (is_array($GLOBALS['errors'])) $this->tpl['error'] = get_htmloutput_mesg('', $GLOBALS['errors'], 'error'); + if (is_array($GLOBALS['errors'])) { + $this->tpl['error'] = get_htmloutput_mesg('', $GLOBALS['errors'], 'error'); + } - if ($action == 'create') - { - if ($conf->use_javascript_ajax) - { + if ($action == 'create') { + if ($conf->use_javascript_ajax) { $this->tpl['ajax_selecttype'] = "\n".'<script type="text/javascript" language="javascript"> $(document).ready(function () { $("#radiocompany").click(function() { @@ -124,10 +137,8 @@ abstract class ActionsCardCommon } } - if ($action == 'create' || $action == 'edit') - { - if ($conf->use_javascript_ajax) - { + if ($action == 'create' || $action == 'edit') { + if ($conf->use_javascript_ajax) { $this->tpl['ajax_selectcountry'] = "\n".'<script type="text/javascript" language="javascript"> $(document).ready(function () { $("#selectcountry_id").change(function() { @@ -141,20 +152,22 @@ abstract class ActionsCardCommon // Load object modCodeClient $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeClient = new $module($db); $this->tpl['auto_customercode'] = $modCodeClient->code_auto; // We verified if the tag prefix is used - if ($modCodeClient->code_auto) $this->tpl['prefix_customercode'] = $modCodeClient->verif_prefixIsUsed(); + if ($modCodeClient->code_auto) { + $this->tpl['prefix_customercode'] = $modCodeClient->verif_prefixIsUsed(); + } // TODO create a function $this->tpl['select_customertype'] = Form::selectarray('client', array( @@ -166,36 +179,41 @@ abstract class ActionsCardCommon // Customer $this->tpl['customercode'] = $this->object->code_client; - if ((!$this->object->code_client || $this->object->code_client == -1) && $modCodeClient->code_auto) $this->tpl['customercode'] = $modCodeClient->getNextValue($this->object, 0); + if ((!$this->object->code_client || $this->object->code_client == -1) && $modCodeClient->code_auto) { + $this->tpl['customercode'] = $modCodeClient->getNextValue($this->object, 0); + } $this->tpl['ismodifiable_customercode'] = $this->object->codeclient_modifiable(); $s = $modCodeClient->getToolTip($langs, $this->object, 0); $this->tpl['help_customercode'] = $form->textwithpicto('', $s, 1); - if (!empty($conf->fournisseur->enabled)) - { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $this->tpl['supplier_enabled'] = 1; // Load object modCodeFournisseur $module = $conf->global->SOCIETE_CODECLIENT_ADDON; - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeFournisseur = new $module; $this->tpl['auto_suppliercode'] = $modCodeFournisseur->code_auto; // We verified if the tag prefix is used - if ($modCodeFournisseur->code_auto) $this->tpl['prefix_suppliercode'] = $modCodeFournisseur->verif_prefixIsUsed(); + if ($modCodeFournisseur->code_auto) { + $this->tpl['prefix_suppliercode'] = $modCodeFournisseur->verif_prefixIsUsed(); + } // Supplier $this->tpl['yn_supplier'] = $form->selectyesno("fournisseur", $this->object->fournisseur, 1); $this->tpl['suppliercode'] = $this->object->code_fournisseur; - if ((!$this->object->code_fournisseur || $this->object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) $this->tpl['suppliercode'] = $modCodeFournisseur->getNextValue($this->object, 1); + if ((!$this->object->code_fournisseur || $this->object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { + $this->tpl['suppliercode'] = $modCodeFournisseur->getNextValue($this->object, 1); + } $this->tpl['ismodifiable_suppliercode'] = $this->object->codefournisseur_modifiable(); $s = $modCodeFournisseur->getToolTip($langs, $this->object, 1); $this->tpl['help_suppliercode'] = $form->textwithpicto('', $s, 1); @@ -216,14 +234,21 @@ abstract class ActionsCardCommon $this->tpl['select_country'] = $form->select_country($this->object->country_id, 'country_id'); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; - if ($user->admin) $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + $this->tpl['info_admin'] = info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } // State - if ($this->object->country_id) $this->tpl['select_state'] = $formcompany->select_state($this->object->state_id, $this->object->country_code); - else $this->tpl['select_state'] = $countrynotdefined; + if ($this->object->country_id) { + $this->tpl['select_state'] = $formcompany->select_state($this->object->state_id, $this->object->country_code); + } else { + $this->tpl['select_state'] = $countrynotdefined; + } // Language - if (!empty($conf->global->MAIN_MULTILANGS)) $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1); + if (!empty($conf->global->MAIN_MULTILANGS)) { + $this->tpl['select_lang'] = $formadmin->select_language(($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1); + } // VAT $this->tpl['yn_assujtva'] = $form->selectyesno('assujtva_value', $this->tpl['tva_assuj'], 1); // Assujeti par defaut en creation @@ -233,24 +258,20 @@ abstract class ActionsCardCommon // Local Tax // TODO mettre dans une classe propre au pays - if ($mysoc->country_code == 'ES') - { + if ($mysoc->country_code == 'ES') { $this->tpl['localtax'] = ''; - if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td>'; $this->tpl['localtax'] .= $form->selectyesno('localtax1assuj_value', $this->object->localtax1_assuj, 1); $this->tpl['localtax'] .= '</td><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td>'; $this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1); $this->tpl['localtax'] .= '</td></tr>'; - } elseif ($mysoc->localtax1_assuj == "1") - { + } elseif ($mysoc->localtax1_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">'; $this->tpl['localtax'] .= $form->selectyesno('localtax1assuj_value', $this->object->localtax1_assuj, 1); $this->tpl['localtax'] .= '</td><tr>'; - } elseif ($mysoc->localtax2_assuj == "1") - { + } elseif ($mysoc->localtax2_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">'; $this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1); $this->tpl['localtax'] .= '</td><tr>'; @@ -269,7 +290,9 @@ abstract class ActionsCardCommon $this->tpl['address'] = dol_nl2br($this->object->address); $img = picto_from_langcode($this->object->country_code); - if ($this->object->isInEEC()) $this->tpl['country'] = $form->textwithpicto(($img ? $img.' ' : '').$this->object->country, $langs->trans("CountryIsInEEC"), 1, 0); + if ($this->object->isInEEC()) { + $this->tpl['country'] = $form->textwithpicto(($img ? $img.' ' : '').$this->object->country, $langs->trans("CountryIsInEEC"), 1, 0); + } $this->tpl['country'] = ($img ? $img.' ' : '').$this->object->country; $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL'); @@ -283,8 +306,7 @@ abstract class ActionsCardCommon $arr = $formcompany->typent_array(1); $this->tpl['typent'] = $arr[$this->object->typent_code]; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; //$s=picto_from_langcode($this->default_lang); //print ($s?$s.' ':''); @@ -300,32 +322,31 @@ abstract class ActionsCardCommon $this->tpl['sales_representatives'] = ''; $listsalesrepresentatives = $this->object->getSalesRepresentatives($user); $nbofsalesrepresentative = count($listsalesrepresentatives); - if ($nbofsalesrepresentative > 3) // We print only number - { + if ($nbofsalesrepresentative > 3) { // We print only number $this->tpl['sales_representatives'] .= $nbofsalesrepresentative; - } elseif ($nbofsalesrepresentative > 0) - { + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($this->db); $i = 0; - foreach ($listsalesrepresentatives as $val) - { + foreach ($listsalesrepresentatives as $val) { $userstatic->id = $val['id']; $userstatic->lastname = $val['name']; $userstatic->firstname = $val['firstname']; $this->tpl['sales_representatives'] .= $userstatic->getNomUrl(1); $i++; - if ($i < $nbofsalesrepresentative) $this->tpl['sales_representatives'] .= ', '; + if ($i < $nbofsalesrepresentative) { + $this->tpl['sales_representatives'] .= ', '; + } } - } else $this->tpl['sales_representatives'] .= $langs->trans("NoSalesRepresentativeAffected"); + } else { + $this->tpl['sales_representatives'] .= $langs->trans("NoSalesRepresentativeAffected"); + } // Linked member - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $langs->load("members"); $adh = new Adherent($this->db); $result = $adh->fetch('', '', $this->object->id); - if ($result > 0) - { + if ($result > 0) { $adh->ref = $adh->getFullName($langs); $this->tpl['linked_member'] = $adh->getNomUrl(1); } else { @@ -335,22 +356,18 @@ abstract class ActionsCardCommon // Local Tax // TODO mettre dans une classe propre au pays - if ($mysoc->country_code == 'ES') - { + if ($mysoc->country_code == 'ES') { $this->tpl['localtax'] = ''; - if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td>'; $this->tpl['localtax'] .= '<td>'.yn($this->object->localtax1_assuj).'</td>'; $this->tpl['localtax'] .= '<td>'.$langs->trans("LocalTax2IsUsedES").'</td>'; $this->tpl['localtax'] .= '<td>'.yn($this->object->localtax2_assuj).'</td></tr>'; - } elseif ($mysoc->localtax1_assuj == "1") - { + } elseif ($mysoc->localtax1_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td>'; $this->tpl['localtax'] .= '<td colspan="3">'.yn($this->object->localtax1_assuj).'</td></tr>'; - } elseif ($mysoc->localtax2_assuj == "1") - { + } elseif ($mysoc->localtax2_assuj == "1") { $this->tpl['localtax'] .= '<tr><td>'.$langs->trans("LocalTax2IsUsedES").'</td>'; $this->tpl['localtax'] .= '<td colspan="3">'.yn($this->object->localtax2_assuj).'</td></tr>'; } @@ -370,44 +387,43 @@ abstract class ActionsCardCommon // phpcs:enable global $langs, $mysoc; - $this->object->id = $_POST["socid"]; - $this->object->name = $_POST["nom"]; - $this->object->prefix_comm = $_POST["prefix_comm"]; - $this->object->client = $_POST["client"]; - $this->object->code_client = $_POST["code_client"]; - $this->object->fournisseur = $_POST["fournisseur"]; - $this->object->code_fournisseur = $_POST["code_fournisseur"]; - $this->object->address = $_POST["adresse"]; - $this->object->zip = $_POST["zipcode"]; - $this->object->town = $_POST["town"]; - $this->object->country_id = $_POST["country_id"] ? $_POST["country_id"] : $mysoc->country_id; - $this->object->state_id = $_POST["state_id"]; - $this->object->phone = $_POST["tel"]; - $this->object->fax = $_POST["fax"]; - $this->object->email = $_POST["email"]; - $this->object->url = $_POST["url"]; - $this->object->capital = $_POST["capital"]; - $this->object->idprof1 = $_POST["idprof1"]; - $this->object->idprof2 = $_POST["idprof2"]; - $this->object->idprof3 = $_POST["idprof3"]; - $this->object->idprof4 = $_POST["idprof4"]; - $this->object->typent_id = $_POST["typent_id"]; - $this->object->effectif_id = $_POST["effectif_id"]; - $this->object->barcode = $_POST["barcode"]; - $this->object->forme_juridique_code = $_POST["forme_juridique_code"]; - $this->object->default_lang = $_POST["default_lang"]; - $this->object->commercial_id = $_POST["commercial_id"]; + $this->object->id = GETPOST("socid"); + $this->object->name = GETPOST("nom"); + $this->object->prefix_comm = GETPOST("prefix_comm"); + $this->object->client = GETPOST("client"); + $this->object->code_client = GETPOST("code_client"); + $this->object->fournisseur = GETPOST("fournisseur"); + $this->object->code_fournisseur = GETPOST("code_fournisseur"); + $this->object->address = GETPOST("adresse"); + $this->object->zip = GETPOST("zipcode"); + $this->object->town = GETPOST("town"); + $this->object->country_id = GETPOST("country_id") ? GETPOST("country_id") : $mysoc->country_id; + $this->object->state_id = GETPOST("state_id"); + $this->object->phone = GETPOST("tel"); + $this->object->fax = GETPOST("fax"); + $this->object->email = GETPOST("email", 'alphawithlgt'); + $this->object->url = GETPOST("url"); + $this->object->capital = GETPOST("capital"); + $this->object->idprof1 = GETPOST("idprof1"); + $this->object->idprof2 = GETPOST("idprof2"); + $this->object->idprof3 = GETPOST("idprof3"); + $this->object->idprof4 = GETPOST("idprof4"); + $this->object->typent_id = GETPOST("typent_id"); + $this->object->effectif_id = GETPOST("effectif_id"); + $this->object->barcode = GETPOST("barcode"); + $this->object->forme_juridique_code = GETPOST("forme_juridique_code"); + $this->object->default_lang = GETPOST("default_lang"); + $this->object->commercial_id = GETPOST("commercial_id"); - $this->object->tva_assuj = $_POST["assujtva_value"] ? $_POST["assujtva_value"] : 1; - $this->object->tva_intra = $_POST["tva_intra"]; + $this->object->tva_assuj = GETPOST("assujtva_value") ? GETPOST("assujtva_value") : 1; + $this->object->tva_intra = GETPOST("tva_intra"); //Local Taxes - $this->object->localtax1_assuj = $_POST["localtax1assuj_value"]; - $this->object->localtax2_assuj = $_POST["localtax2assuj_value"]; + $this->object->localtax1_assuj = GETPOST("localtax1assuj_value"); + $this->object->localtax2_assuj = GETPOST("localtax2assuj_value"); // We set country_id, and country_code label of the chosen country - if ($this->object->country_id) - { + if ($this->object->country_id) { $tmparray = getCountry($this->object->country_id, 'all', $this->db, $langs, 0); $this->object->country_code = $tmparray['code']; $this->object->country_label = $tmparray['label']; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 901a2c55a56..c9ebc56533e 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -61,9 +61,15 @@ class ActionsCardCompany extends ActionsCardCommon $out = ''; - if ($action == 'view') $out .= $langs->trans("ThirdParty"); - if ($action == 'edit') $out .= $langs->trans("EditCompany"); - if ($action == 'create') $out .= $langs->trans("NewCompany"); + if ($action == 'view') { + $out .= $langs->trans("ThirdParty"); + } + if ($action == 'edit') { + $out .= $langs->trans("EditCompany"); + } + if ($action == 'create') { + $out .= $langs->trans("NewCompany"); + } return $out; } @@ -95,8 +101,7 @@ class ActionsCardCompany extends ActionsCardCommon $this->tpl['profid3'] = $this->object->idprof3; $this->tpl['profid4'] = $this->object->idprof4; - if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) - { + if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) { $js = "\n"; $js .= '<script language="JavaScript" type="text/javascript">'; $js .= "function CheckVAT(a) {\n"; @@ -107,10 +112,8 @@ class ActionsCardCompany extends ActionsCardCommon $this->tpl['js_checkVatPopup'] = $js; } - if ($action == 'create' || $action == 'edit') - { - for ($i = 1; $i <= 4; $i++) - { + if ($action == 'create' || $action == 'edit') { + for ($i = 1; $i <= 4; $i++) { $this->tpl['langprofid'.$i] = $langs->transcountry('ProfId'.$i, $this->object->country_code); $this->tpl['showprofid'.$i] = $formcompany->get_input_id_prof($i, 'idprof'.$i, $this->tpl['profid'.$i], $this->object->country_code); } @@ -126,12 +129,10 @@ class ActionsCardCompany extends ActionsCardCommon // VAT intra $s = '<input type="text" class="flat" name="tva_intra" size="12" maxlength="20" value="'.$this->object->tva_intra.'">'; - if (empty($conf->global->MAIN_DISABLEVATCHECK)) - { + if (empty($conf->global->MAIN_DISABLEVATCHECK)) { $s .= ' '; - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { $s .= '<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>'; $this->tpl['tva_intra'] = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1); } else { @@ -142,29 +143,24 @@ class ActionsCardCompany extends ActionsCardCommon } } else { // Confirm delete third party - if ($action == 'delete') - { + if ($action == 'delete') { $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "1,action-delete"); } - for ($i = 1; $i <= 4; $i++) - { + for ($i = 1; $i <= 4; $i++) { $this->tpl['langprofid'.$i] = $langs->transcountry('ProfId'.$i, $this->object->country_code); $this->tpl['checkprofid'.$i] = $this->object->id_prof_check($i, $this->object); $this->tpl['urlprofid'.$i] = $this->object->id_prof_url($i, $this->object); } // TVA intra - if ($this->object->tva_intra) - { + if ($this->object->tva_intra) { $s = $this->object->tva_intra; $s .= '<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$this->object->tva_intra.'">'; - if (empty($conf->global->MAIN_DISABLEVATCHECK)) - { + if (empty($conf->global->MAIN_DISABLEVATCHECK)) { $s .= ' &nbsp; '; - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { $s .= '<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>'; $this->tpl['tva_intra'] = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1); } else { @@ -178,8 +174,7 @@ class ActionsCardCompany extends ActionsCardCommon } // Parent company - if ($this->object->parent) - { + if ($this->object->parent) { $socm = new Societe($this->db); $socm->fetch($this->object->parent); $this->tpl['parent_company'] = $socm->getNomUrl(1).' '.($socm->code_client ? "(".$socm->code_client.")" : ""); diff --git a/htdocs/societe/canvas/company/index.html b/htdocs/societe/canvas/company/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/canvas/company/tpl/card_create.tpl.php b/htdocs/societe/canvas/company/tpl/card_create.tpl.php index 039f4c4b9e7..2deb1dba8b1 100644 --- a/htdocs/societe/canvas/company/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_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; } @@ -43,7 +42,9 @@ if (empty($conf) || !is_object($conf)) <?php echo $this->control->tpl['ajax_selectcountry']; ?> <?php } ?> -<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?> +<?php if ($this->control->tpl['js_checkVatPopup']) { + echo $this->control->tpl['js_checkVatPopup']; +} ?> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc"> @@ -61,17 +62,17 @@ if (empty($conf) || !is_object($conf)) <td><span class="fieldrequired"><?php echo $langs->trans('ThirdPartyName'); ?></span></td> <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td> <?php if (!empty($conf->global->SOCIETE_USEPREFIX)) { ?> - <td><?php echo $langs->trans('Prefix'); ?></td> - <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td> - <?php } ?> + <td><?php echo $langs->trans('Prefix'); ?></td> + <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td> + <?php } ?> </tr> <tr> <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td> <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td> - <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td> - <td width="25%"> + <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td> + <td width="25%"> <table class="nobordernopadding"> <tr> <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td> @@ -85,14 +86,14 @@ if (empty($conf) || !is_object($conf)) <tr> <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td> <td><?php echo $this->control->tpl['yn_supplier']; ?></td> - <td><?php echo $langs->trans('SupplierCode'); ?></td> - <td> - <table class="nobordernopadding"> - <tr> - <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td> - <td><?php echo $this->control->tpl['help_suppliercode']; ?></td> - </tr> - </table> + <td><?php echo $langs->trans('SupplierCode'); ?></td> + <td> + <table class="nobordernopadding"> + <tr> + <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td> + <td><?php echo $this->control->tpl['help_suppliercode']; ?></td> + </tr> + </table> </td> </tr> @@ -155,15 +156,23 @@ if (!empty($conf->barcode->enabled)) { ?> <?php for ($i = 1; $i <= 4; $i++) { if ($this->control->tpl['langprofid'.$i] != '-') { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>'; echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } else { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>&nbsp;</td>'; echo '<td>&nbsp;</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } } ?> @@ -194,7 +203,9 @@ for ($i = 1; $i <= 4; $i++) { <td class="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td> </tr> -<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +<?php if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> <?php if ($user->rights->societe->client->voir) { ?> <tr> diff --git a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php b/htdocs/societe/canvas/company/tpl/card_edit.tpl.php index e03d0fa7b6e..35e38a10f0e 100644 --- a/htdocs/societe/canvas/company/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_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; } @@ -34,7 +33,9 @@ $contact = $GLOBALS['objcanvas']->control->object; <?php echo $this->control->tpl['error']; ?> <?php echo $this->control->tpl['ajax_selectcountry']; ?> -<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?> +<?php if ($this->control->tpl['js_checkVatPopup']) { + echo $this->control->tpl['js_checkVatPopup']; +} ?> <form action="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id']; ?>" method="POST" name="formsoc"> <input type="hidden" name="canvas" value="<?php echo $canvas ?>"> @@ -165,15 +166,23 @@ if (!empty($conf->barcode->enabled)) { ?> <?php for ($i = 1; $i <= 4; $i++) { if ($this->control->tpl['langprofid'.$i] != '-') { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>'; echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } else { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>&nbsp;</td>'; echo '<td>&nbsp;</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } } ?> @@ -209,7 +218,9 @@ for ($i = 1; $i <= 4; $i++) { </tr> <?php } -if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> </table> <br> diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index c56e7f9223c..8169a6ca22f 100644 --- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php @@ -16,8 +16,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; } @@ -34,9 +33,15 @@ print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company ?> -<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?> -<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?> -<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?> +<?php if ($this->control->tpl['error']) { + echo $this->control->tpl['error']; +} ?> +<?php if ($this->control->tpl['action_delete']) { + echo $this->control->tpl['action_delete']; +} ?> +<?php if ($this->control->tpl['js_checkVatPopup']) { + echo $this->control->tpl['js_checkVatPopup']; +} ?> <table class="border allwidth"> @@ -120,20 +125,31 @@ print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company <?php for ($i = 1; $i <= 4; $i++) { if ($this->control->tpl['langprofid'.$i] != '-') { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>'; echo '<td>'.$this->control->tpl['profid'.$i]; if ($this->control->tpl['profid'.$i]) { - if ($this->control->tpl['checkprofid'.$i] > 0) echo ' &nbsp; '.$this->control->tpl['urlprofid'.$i]; - else echo ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>'; + if ($this->control->tpl['checkprofid'.$i] > 0) { + echo ' &nbsp; '.$this->control->tpl['urlprofid'.$i]; + } else { + echo ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>'; + } } echo '</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } else { - if ($i == 1 || $i == 3) echo '<tr>'; + if ($i == 1 || $i == 3) { + echo '<tr>'; + } echo '<td>&nbsp;</td>'; echo '<td>&nbsp;</td>'; - if ($i == 2 || $i == 4) echo '</tr>'; + if ($i == 2 || $i == 4) { + echo '</tr>'; + } } } ?> @@ -145,14 +161,19 @@ for ($i = 1; $i <= 4; $i++) { <td><?php echo $this->control->tpl['tva_intra']; ?></td> </tr> -<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +<?php if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> <tr> <td><?php echo $langs->trans('Capital'); ?></td> <td colspan="3"> <?php - if ($this->control->tpl['capital']) echo $this->control->tpl['capital'].' '.$langs->trans("Currency".$conf->currency); - else echo '&nbsp;'; + if ($this->control->tpl['capital']) { + echo $this->control->tpl['capital'].' '.$langs->trans("Currency".$conf->currency); + } else { + echo '&nbsp;'; + } ?> </td> </tr> @@ -258,7 +279,7 @@ for ($i = 1; $i <= 4; $i++) { <?php /* - * Documents generes + * Generated documents */ $filedir = $conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$socid; diff --git a/htdocs/societe/canvas/company/tpl/index.html b/htdocs/societe/canvas/company/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/canvas/index.html b/htdocs/societe/canvas/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index cab8a965ee0..244a50fb719 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -61,9 +61,15 @@ class ActionsCardIndividual extends ActionsCardCommon $out = ''; - if ($action == 'view') $out .= $langs->trans("Individual"); - if ($action == 'edit') $out .= $langs->trans("EditCompany"); - if ($action == 'create') $out .= $langs->trans("NewCompany"); + if ($action == 'view') { + $out .= $langs->trans("Individual"); + } + if ($action == 'edit') { + $out .= $langs->trans("EditCompany"); + } + if ($action == 'create') { + $out .= $langs->trans("NewCompany"); + } return $out; } @@ -107,13 +113,11 @@ class ActionsCardIndividual extends ActionsCardCommon $this->tpl['title'] = load_fiche_titre($this->getTitle($action)); - if ($action == 'create' || $action == 'edit') - { + if ($action == 'create' || $action == 'edit') { $this->tpl['select_civility'] = $formcompany->select_civility(GETPOST('civility_id')); } else { // Confirm delete third party - if ($action == 'delete' || $conf->use_javascript_ajax) - { + if ($action == 'delete' || $conf->use_javascript_ajax) { $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id, $langs->trans("DeleteAnIndividual"), $langs->trans("ConfirmDeleteIndividual"), "confirm_delete", '', 0, "1,action-delete"); } } diff --git a/htdocs/societe/canvas/individual/index.html b/htdocs/societe/canvas/individual/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index 389b36e50f5..0010b87ff90 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_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; } @@ -32,15 +31,15 @@ if (empty($conf) || !is_object($conf)) <?php echo $this->control->tpl['error']; ?> <?php if ($conf->use_javascript_ajax) { ?> - <?php echo $this->control->tpl['ajax_selecttype']; ?> + <?php echo $this->control->tpl['ajax_selecttype']; ?> <br> - <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp; + <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp; <input type="radio" id="radiocompany" class="flat" name="private" value="0"> - <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp; + <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp; <input type="radio" id="radioprivate" class="flat" name="private" value="1" checked> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>) <br> <br> - <?php echo $this->control->tpl['ajax_selectcountry']; ?> + <?php echo $this->control->tpl['ajax_selectcountry']; ?> <?php } ?> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc"> @@ -80,8 +79,8 @@ if (empty($conf) || !is_object($conf)) <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td> <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td> - <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td> - <td width="25%"> + <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td> + <td width="25%"> <table class="nobordernopadding"> <tr> <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td> @@ -95,23 +94,23 @@ if (empty($conf) || !is_object($conf)) <tr> <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td> <td><?php echo $this->control->tpl['yn_supplier']; ?></td> - <td><?php echo $langs->trans('SupplierCode'); ?></td> - <td> - <table class="nobordernopadding"> - <tr> - <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td> - <td><?php echo $this->control->tpl['help_suppliercode']; ?></td> - </tr> - </table> + <td><?php echo $langs->trans('SupplierCode'); ?></td> + <td> + <table class="nobordernopadding"> + <tr> + <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td> + <td><?php echo $this->control->tpl['help_suppliercode']; ?></td> + </tr> + </table> </td> </tr> - <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?> + <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?> <tr> <td><?php echo $langs->trans('SupplierCategory'); ?></td> <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td> </tr> - <?php } + <?php } } if (!empty($conf->barcode->enabled)) { ?> @@ -169,7 +168,9 @@ if (!empty($conf->barcode->enabled)) { ?> <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td> </tr> -<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +<?php if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> <?php if ($user->rights->societe->client->voir) { ?> <tr> diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index ffdbe2c3016..7a43f256b45 100644 --- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_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; } @@ -173,7 +172,9 @@ if ($this->control->tpl['fournisseur']) { <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td> </tr> -<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +<?php if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> </table> <br> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 0ee2f271312..f058d38cd7c 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -16,8 +16,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; } @@ -32,8 +31,12 @@ $head = societe_prepare_head($object); print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company'); -if ($this->control->tpl['error']) echo $this->control->tpl['error']; -if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?> +if ($this->control->tpl['error']) { + echo $this->control->tpl['error']; +} +if ($this->control->tpl['action_delete']) { + echo $this->control->tpl['action_delete']; +} ?> <table class="border allwidth"> @@ -119,7 +122,9 @@ if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delet <td colspan="3"><?php echo $this->control->tpl['tva_assuj']; ?></td> </tr> -<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?> +<?php if (!empty($this->control->tpl['localtax'])) { + echo $this->control->tpl['localtax']; +} ?> <tr> <td><?php echo $langs->trans("Type"); ?></td> @@ -200,7 +205,7 @@ if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delet <div id="builddoc"></div> <?php /* - * Documents generes + * Generated documents */ $filedir = $conf->societe->multidir_output[$this->control->tpl['entity']].'/'.$socid; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$socid; diff --git a/htdocs/societe/canvas/individual/tpl/index.html b/htdocs/societe/canvas/individual/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 66b5f68564e..c5f93e9f96a 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es.com> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,13 +45,32 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +if (!empty($conf->adherent->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +} +if (! empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +} +if (! empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +} +if (! empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); -if (!empty($conf->adherent->enabled)) $langs->load("members"); -if (!empty($conf->categorie->enabled)) $langs->load("categories"); -if (!empty($conf->incoterm->enabled)) $langs->load("incoterm"); -if (!empty($conf->notification->enabled)) $langs->load("mails"); +if (!empty($conf->adherent->enabled)) { + $langs->load("members"); +} +if (!empty($conf->categorie->enabled)) { + $langs->load("categories"); +} +if (!empty($conf->incoterm->enabled)) { + $langs->load("incoterm"); +} +if (!empty($conf->notification->enabled)) { + $langs->load("mails"); +} $mesg = ''; $error = 0; $errors = array(); @@ -61,8 +80,12 @@ $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; -if (empty($socid) && $action == 'view') $action = 'create'; +if ($user->socid) { + $socid = $user->socid; +} +if (empty($socid) && $action == 'view') { + $action = 'create'; +} $object = new Societe($db); $extrafields = new ExtraFields($db); @@ -75,10 +98,11 @@ $socialnetworks = getArrayOfSocialNetworks(); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartycard', 'globalcard')); -if ($socid > 0) $object->fetch($socid); +if ($socid > 0) { + $object->fetch($socid); +} -if (!($object->id > 0) && $action == 'view') -{ +if (!($object->id > 0) && $action == 'view') { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound')); exit; @@ -87,13 +111,19 @@ if (!($object->id > 0) && $action == 'view') // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $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('thirdparty', 'card', $canvas); } +$permissiontoread = $user->rights->societe->lire; +$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->societe->supprimer || ($permissiontoadd && isset($object->status) && $object->status == 0); +$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->societe->creer; // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; + // Security check $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); @@ -107,12 +137,6 @@ if ($object->id > 0) { } */ -$permissiontoread = $user->rights->societe->lire; -$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->societe->supprimer || ($permissiontoadd && isset($object->status) && $object->status == 0); -$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->societe->creer; // Used by the include of actions_dellink.inc.php -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; /* @@ -121,39 +145,34 @@ $upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object-> $parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) - { +if (empty($reshook)) { + if ($cancel) { $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } } - if ($action == 'confirm_merge' && $confirm == 'yes' && $user->rights->societe->creer) - { + if ($action == 'confirm_merge' && $confirm == 'yes' && $user->rights->societe->creer) { $error = 0; $soc_origin_id = GETPOST('soc_origin', 'int'); $soc_origin = new Societe($db); - if ($soc_origin_id <= 0) - { + if ($soc_origin_id <= 0) { $langs->load('errors'); setEventMessages($langs->trans('ErrorThirdPartyIdIsMandatory', $langs->transnoentitiesnoconv('MergeOriginThirdparty')), null, 'errors'); } else { - if (!$error && $soc_origin->fetch($soc_origin_id) < 1) - { + if (!$error && $soc_origin->fetch($soc_origin_id) < 1) { setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { // TODO Move the merge function into class of object. $db->begin(); @@ -169,26 +188,26 @@ if (empty($reshook)) 'code_client', 'code_fournisseur', 'code_compta', 'code_compta_fournisseur', 'model_pdf', 'fk_projet' ); - foreach ($listofproperties as $property) - { - if (empty($object->$property)) $object->$property = $soc_origin->$property; + foreach ($listofproperties as $property) { + if (empty($object->$property)) { + $object->$property = $soc_origin->$property; + } } // Concat some data $listofproperties = array( 'note_public', 'note_private' ); - foreach ($listofproperties as $property) - { + foreach ($listofproperties as $property) { $object->$property = dol_concatdesc($object->$property, $soc_origin->$property); } // Merge extrafields - if (is_array($soc_origin->array_options)) - { - foreach ($soc_origin->array_options as $key => $val) - { - if (empty($object->array_options[$key])) $object->array_options[$key] = $val; + if (is_array($soc_origin->array_options)) { + foreach ($soc_origin->array_options as $key => $val) { + if (empty($object->array_options[$key])) { + $object->array_options[$key] = $val; + } } } @@ -208,8 +227,7 @@ if (empty($reshook)) // If thirdparty has a new code that is same than origin, we clean origin code to avoid duplicate key from database unique keys. if ($soc_origin->code_client == $object->code_client || $soc_origin->code_fournisseur == $object->code_fournisseur - || $soc_origin->barcode == $object->barcode) - { + || $soc_origin->barcode == $object->barcode) { dol_syslog("We clean customer and supplier code so we will be able to make the update of target"); $soc_origin->code_client = ''; $soc_origin->code_fournisseur = ''; @@ -219,15 +237,13 @@ if (empty($reshook)) // Update $result = $object->update($object->id, $user, 0, 1, 1, 'merge'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } // Move links - if (!$error) - { + if (!$error) { // This list is also into the api_thirdparties.class.php // TODO Mutualise the list into object societe.class.php $objects = array( @@ -258,12 +274,10 @@ if (empty($reshook)) ); //First, all core objects must update their tables - foreach ($objects as $object_name => $object_file) - { + foreach ($objects as $object_name => $object_file) { require_once DOL_DOCUMENT_ROOT.$object_file; - if (!$error && !$object_name::replaceThirdparty($db, $soc_origin->id, $object->id)) - { + if (!$error && !$object_name::replaceThirdparty($db, $soc_origin->id, $object->id)) { $error++; setEventMessages($db->lasterror(), null, 'errors'); break; @@ -272,46 +286,39 @@ if (empty($reshook)) } // External modules should update their ones too - if (!$error) - { + if (!$error) { $reshook = $hookmanager->executeHooks('replaceThirdparty', array( 'soc_origin' => $soc_origin->id, 'soc_dest' => $object->id ), $object, $action); - if ($reshook < 0) - { + if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); $error++; } } - if (!$error) - { + if (!$error) { $object->context = array('merge'=>1, 'mergefromid'=>$soc_origin->id); // Call trigger $result = $object->call_trigger('COMPANY_MODIFY', $user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } // End call triggers } - if (!$error) - { + if (!$error) { //We finally remove the old thirdparty - if ($soc_origin->delete($soc_origin->id, $user) < 1) - { + if ($soc_origin->delete($soc_origin->id, $user) < 1) { $error++; } } - if (!$error) - { + if (!$error) { setEventMessages($langs->trans('ThirdpartiesMergeSuccess'), null, 'mesgs'); $db->commit(); } else { @@ -323,27 +330,23 @@ if (empty($reshook)) } } - if (GETPOST('getcustomercode')) - { + if (GETPOST('getcustomercode')) { // We defined value code_client $_POST["customer_code"] = "Acompleter"; } - if (GETPOST('getsuppliercode')) - { + if (GETPOST('getsuppliercode')) { // We defined value code_fournisseur $_POST["supplier_code"] = "Acompleter"; } - if ($action == 'set_localtax1') - { + if ($action == 'set_localtax1') { //obtidre selected del combobox $value = GETPOST('lt1'); $object->fetch($socid); $res = $object->setValueFrom('localtax1_value', $value, '', null, 'text', '', $user, 'COMPANY_MODIFY'); } - if ($action == 'set_localtax2') - { + if ($action == 'set_localtax2') { //obtidre selected del combobox $value = GETPOST('lt2'); $object->fetch($socid); @@ -359,53 +362,60 @@ if (empty($reshook)) $extrafields->fetch_name_optionals_label($object->table_element); $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $result = $object->insertExtraFields('COMPANY_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } // Add new or update third party if ((!GETPOST('getcustomercode') && !GETPOST('getsuppliercode')) - && ($action == 'add' || $action == 'update') && $user->rights->societe->creer) - { + && ($action == 'add' || $action == 'update') && $user->rights->societe->creer) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - if (!GETPOST('name')) - { + if (!GETPOST('name')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdPartyName")), null, 'errors'); $error++; } - if (GETPOST('client') < 0) - { + if (GETPOST('client') < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProspectCustomer")), null, 'errors'); $error++; } - if (GETPOST('fournisseur') < 0) - { + if (GETPOST('fournisseur') < 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Supplier")), null, 'errors'); $error++; } - if (!$error) - { - if ($action == 'update') - { + if (!empty($conf->mailing->enabled) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); + } + + if (!empty($conf->mailing->enabled) && GETPOST("private", 'int') == 1 && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); + } + + if (!$error) { + if ($action == 'update') { $ret = $object->fetch($socid); $object->oldcopy = clone $object; - } else $object->canvas = $canvas; + } else { + $object->canvas = $canvas; + } - if (GETPOST("private", 'int') == 1) // Ask to create a contact - { + if (GETPOST("private", 'int') == 1) { // Ask to create a contact $object->particulier = GETPOST("private", 'int'); $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); @@ -478,55 +488,57 @@ if (empty($reshook)) $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); + if (GETPOSTISSET('accountancy_code_sell')) { + $object->accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + } + if (GETPOSTISSET('accountancy_code_buy')) { + $object->accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + } + // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) - { + if ($ret < 0) { $error++; } // Fill array 'array_languages' with data from add form $ret = $object->setValuesForExtraLanguages(); - if ($ret < 0) - { + if ($ret < 0) { $error++; } //var_dump($object->array_languages);exit; - if (GETPOST('deletephoto')) $object->logo = ''; - elseif (!empty($_FILES['photo']['name'])) $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); + if (GETPOST('deletephoto')) { + $object->logo = ''; + } elseif (!empty($_FILES['photo']['name'])) { + $object->logo = dol_sanitizeFileName($_FILES['photo']['name']); + } // Check parameters - if (!GETPOST('cancel', 'alpha')) - { - if (!empty($object->email) && !isValidEMail($object->email)) - { + if (!GETPOST('cancel', 'alpha')) { + if (!empty($object->email) && !isValidEMail($object->email)) { $langs->load("errors"); $error++; setEventMessages('', $langs->trans("ErrorBadEMail", $object->email), 'errors'); } - if (!empty($object->url) && !isValidUrl($object->url)) - { + if (!empty($object->url) && !isValidUrl($object->url)) { $langs->load("errors"); setEventMessages('', $langs->trans("ErrorBadUrl", $object->url), 'errors'); } if (!empty($object->webservices_url)) { //Check if has transport, without any the soap client will give error - if (strpos($object->webservices_url, "http") === false) - { + if (strpos($object->webservices_url, "http") === false) { $object->webservices_url = "http://".$object->webservices_url; } if (!isValidUrl($object->webservices_url)) { @@ -537,8 +549,7 @@ if (empty($reshook)) // We set country_id, country_code and country for the selected country $object->country_id = GETPOST('country_id') != '' ?GETPOST('country_id') : $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']; @@ -546,27 +557,28 @@ if (empty($reshook)) } } - if (!$error) - { - if ($action == 'add') - { + if (!$error) { + if ($action == 'add') { $error = 0; $db->begin(); - if (empty($object->client)) $object->code_client = ''; - if (empty($object->fournisseur)) $object->code_fournisseur = ''; + if (empty($object->client)) { + $object->code_client = ''; + } + if (empty($object->fournisseur)) { + $object->code_fournisseur = ''; + } $result = $object->create($user); - if ($result >= 0) - { - if ($object->particulier) - { + if ($result >= 0) { + if ($object->particulier) { dol_syslog("We ask to create a contact/address too", LOG_DEBUG); - $result = $object->create_individual($user); - if ($result < 0) - { + $contcats = GETPOST('contcats', 'array'); + $no_email = GETPOST('contact_no_email', 'int'); + $result = $object->create_individual($user, $no_email, $contcats); + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -575,8 +587,7 @@ if (empty($reshook)) // Links with users $salesreps = GETPOST('commercial', 'array'); $result = $object->setSalesRep($salesreps, true); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -584,8 +595,7 @@ if (empty($reshook)) // Customer categories association $custcats = GETPOST('custcats', 'array'); $result = $object->setCategories($custcats, 'customer'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -593,8 +603,7 @@ if (empty($reshook)) // Supplier categories association $suppcats = GETPOST('suppcats', 'array'); $result = $object->setCategories($suppcats, 'supplier'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -602,19 +611,15 @@ if (empty($reshook)) // Logo/Photo save $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/"; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if ($file_OK) - { - if (image_format_supported($_FILES['photo']['name'])) - { + if ($file_OK) { + if (image_format_supported($_FILES['photo']['name'])) { dol_mkdir($dir); - if (@is_dir($dir)) - { + 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) - { + if (!$result > 0) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs @@ -623,26 +628,23 @@ if (empty($reshook)) } } } else { - switch ($_FILES['photo']['error']) - { + 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 + case 3: //uploaded file was only partially uploaded $errors[] = "ErrorFilePartiallyUploaded"; break; } - } + } } else { - if ($result == -3 && in_array('ErrorCustomerCodeAlreadyUsed', $object->errors)) - { + if ($result == -3 && in_array('ErrorCustomerCodeAlreadyUsed', $object->errors)) { $duplicate_code_error = true; $object->code_client = null; } - if ($result == -3 && in_array('ErrorSupplierCodeAlreadyUsed', $object->errors)) - { + if ($result == -3 && in_array('ErrorSupplierCodeAlreadyUsed', $object->errors)) { $duplicate_code_error = true; $object->code_fournisseur = null; } @@ -652,7 +654,7 @@ if (empty($reshook)) } setEventMessages($object->error, $object->errors, 'errors'); - $error++; + $error++; } if ($result >= 0 && !$error) { @@ -660,13 +662,18 @@ if (empty($reshook)) if (!empty($backtopage)) { $backtopage = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $backtopage); // New method to autoselect project after a New on another form object creation - if (preg_match('/\?/', $backtopage)) $backtopage .= '&socid='.$object->id; // Old method - header("Location: ".$backtopage); + if (preg_match('/\?/', $backtopage)) { + $backtopage .= '&socid='.$object->id; // Old method + } + header("Location: ".$backtopage); exit; } else { $url = $_SERVER["PHP_SELF"]."?socid=".$object->id; // Old method - if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url = DOL_URL_ROOT."/comm/card.php?socid=".$object->id; - elseif ($object->fournisseur == 1) $url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; + if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { + $url = DOL_URL_ROOT."/comm/card.php?socid=".$object->id; + } elseif ($object->fournisseur == 1) { + $url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; + } header("Location: ".$url); exit; @@ -677,31 +684,31 @@ if (empty($reshook)) } } - if ($action == 'update') - { + if ($action == 'update') { $error = 0; - if (GETPOST('cancel', 'alpha')) - { - if (!empty($backtopage)) - { - header("Location: ".$backtopage); + if (GETPOST('cancel', 'alpha')) { + if (!empty($backtopage)) { + header("Location: ".$backtopage); exit; } else { - header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); exit; } } // To not set code if third party is not concerned. But if it had values, we keep them. - if (empty($object->client) && empty($object->oldcopy->code_client)) $object->code_client = ''; - if (empty($object->fournisseur) && empty($object->oldcopy->code_fournisseur)) $object->code_fournisseur = ''; + if (empty($object->client) && empty($object->oldcopy->code_client)) { + $object->code_client = ''; + } + if (empty($object->fournisseur) && empty($object->oldcopy->code_fournisseur)) { + $object->code_fournisseur = ''; + } //var_dump($object);exit; $result = $object->update($socid, $user, 1, $object->oldcopy->codeclient_modifiable(), $object->oldcopy->codefournisseur_modifiable(), 'update', 0); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } @@ -709,20 +716,17 @@ if (empty($reshook)) // Links with users $salesreps = GETPOST('commercial', 'array'); $result = $object->setSalesRep($salesreps); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } // Prevent thirdparty's emptying if a user hasn't rights $user->rights->categorie->lire (in such a case, post of 'custcats' is not defined) - if (!$error && !empty($user->rights->categorie->lire)) - { + if (!$error && !empty($user->rights->categorie->lire)) { // Customer categories association $categories = GETPOST('custcats', 'array'); $result = $object->setCategories($categories, 'customer'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -730,8 +734,7 @@ if (empty($reshook)) // Supplier categories association $categories = GETPOST('suppcats', 'array'); $result = $object->setCategories($categories, 'supplier'); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -740,34 +743,28 @@ if (empty($reshook)) // Logo/Photo save $dir = $conf->societe->multidir_output[$object->entity]."/".$object->id."/logos"; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if (GETPOST('deletephoto') && $object->logo) - { + if (GETPOST('deletephoto') && $object->logo) { $fileimg = $dir.'/'.$object->logo; $dirthumbs = $dir.'/thumbs'; dol_delete_file($fileimg); dol_delete_dir_recursive($dirthumbs); } - if ($file_OK) - { - if (image_format_supported($_FILES['photo']['name']) > 0) - { + if ($file_OK) { + 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']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) - { + if (!$result > 0) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs $object->addThumbs($newfile); // Index file in database - if (!empty($conf->global->THIRDPARTY_LOGO_ALLOW_EXTERNAL_DOWNLOAD)) - { + if (!empty($conf->global->THIRDPARTY_LOGO_ALLOW_EXTERNAL_DOWNLOAD)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // the dir dirname($newfile) is directory of logo, so we should have only one file at once into index, so we delete indexes for the dir deleteFilesIntoDatabaseIndex(dirname($newfile), '', ''); @@ -780,13 +777,12 @@ if (empty($reshook)) $errors[] = "ErrorBadImageFormat"; } } else { - switch ($_FILES['photo']['error']) - { + 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 + case 3: //uploaded file was only partially uploaded $errors[] = "ErrorFilePartiallyUploaded"; break; } @@ -795,26 +791,22 @@ if (empty($reshook)) // Update linked member - if (!$error && $object->fk_soc > 0) - { + if (!$error && $object->fk_soc > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; - $sql .= " SET fk_soc = NULL WHERE fk_soc = ".$id; - if (!$object->db->query($sql)) - { + $sql .= " SET fk_soc = NULL WHERE fk_soc = ".((int) $socid); + if (!$object->db->query($sql)) { $error++; $object->error .= $object->db->lasterror(); setEventMessages($object->error, $object->errors, 'errors'); } } - if (!$error && !count($errors)) - { - if (!empty($backtopage)) - { - header("Location: ".$backtopage); + if (!$error && !count($errors)) { + if (!empty($backtopage)) { + header("Location: ".$backtopage); exit; } else { - header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); exit; } } else { @@ -828,48 +820,42 @@ if (empty($reshook)) } // Delete third party - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) - { + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) { $object->fetch($socid); $object->oldcopy = clone $object; $result = $object->delete($socid, $user); - if ($result > 0) - { + if ($result > 0) { header("Location: ".DOL_URL_ROOT."/societe/list.php?restore_lastsearch_values=1&delsoc=".urlencode($object->name)); exit; } else { $langs->load("errors"); - setEventMessages($object->error, $object->errors, 'errors'); - $error++; + setEventMessages($object->error, $object->errors, 'errors'); + $error++; $action = ''; } } // Set third-party type - if ($action == 'set_thirdpartytype' && $user->rights->societe->creer) - { + if ($action == 'set_thirdpartytype' && $user->rights->societe->creer) { $object->fetch($socid); $result = $object->setThirdpartyType(GETPOST('typent_id', 'int')); } // Set incoterm - if ($action == 'set_incoterms' && $user->rights->societe->creer && !empty($conf->incoterm->enabled)) - { + if ($action == 'set_incoterms' && $user->rights->societe->creer && !empty($conf->incoterm->enabled)) { $object->fetch($socid); $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } // Set parent company - if ($action == 'set_thirdparty' && $user->rights->societe->creer) - { + if ($action == 'set_thirdparty' && $user->rights->societe->creer) { $object->fetch($socid); $result = $object->set_parent(GETPOST('parent_id', 'int')); } // Set sales representatives - if ($action == 'set_salesrepresentatives' && $user->rights->societe->creer) - { + if ($action == 'set_salesrepresentatives' && $user->rights->societe->creer) { $object->fetch($socid); $result = $object->setSalesRep(GETPOST('commercial', 'array')); } @@ -905,72 +891,83 @@ $form = new Form($db); $formfile = new FormFile($db); $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); +if (! empty($conf->accounting->enabled)) { + $formaccounting = new FormAccounting($db); +} -if ($socid > 0 && empty($object->id)) -{ +if ($socid > 0 && empty($object->id)) { $result = $object->fetch($socid); - if ($result <= 0) dol_print_error('', $object->error); + if ($result <= 0) { + dol_print_error('', $object->error); + } } $title = $langs->trans("ThirdParty"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$langs->trans('Card'); -$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$langs->trans('Card'); +} + +$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas|DE:Modul_Geschäftspartner'; + 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 // ----------------------------------------- - $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates + $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template } else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- - if ($action == 'create') - { + if ($action == 'create') { /* - * Creation - */ + * Creation + */ $private = GETPOST("private", "int"); - if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT) && !GETPOSTISSET('private')) $private = 1; - if (empty($private)) $private = 0; + if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT) && !GETPOSTISSET('private')) { + $private = 1; + } + if (empty($private)) { + $private = 0; + } // Load object modCodeTiers $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeClient = new $module; // Load object modCodeFournisseur $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeFournisseur = new $module; // Define if customer/prospect or supplier status is set or not - if (GETPOST("type") != 'f') - { + if (GETPOST("type") != 'f') { $object->client = -1; - if (!empty($conf->global->THIRDPARTY_CUSTOMERPROSPECT_BY_DEFAULT)) { $object->client = 3; } + if (!empty($conf->global->THIRDPARTY_CUSTOMERPROSPECT_BY_DEFAULT)) { + $object->client = 3; + } } // Prospect / Customer if (GETPOST("type") == 'c') { @@ -980,8 +977,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->client = 3; } } - if (GETPOST("type") == 'p') { $object->client = 2; } - if (!empty($conf->fournisseur->enabled) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { $object->fournisseur = 1; } + if (GETPOST("type") == 'p') { + $object->client = 2; + } + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && (GETPOST("type") == 'f' || (GETPOST("type") == '' && !empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)))) { + $object->fournisseur = 1; + } $object->name = GETPOST('name', 'alphanohtml'); $object->name_alias = GETPOST('name_alias', 'alphanohtml'); @@ -1045,24 +1046,27 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->commercial_id = GETPOST('commercial_id', 'int'); $object->default_lang = GETPOST('default_lang'); + if (GETPOSTISSET('accountancy_code_sell')) { + $object->accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + } + if (GETPOSTISSET('accountancy_code_buy')) { + $object->accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + } + $object->logo = (isset($_FILES['photo']) ?dol_sanitizeFileName($_FILES['photo']['name']) : ''); // Gestion du logo de la société $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos"; $file_OK = (isset($_FILES['photo']) ?is_uploaded_file($_FILES['photo']['tmp_name']) : false); - if ($file_OK) - { - if (image_format_supported($_FILES['photo']['name'])) - { + if ($file_OK) { + if (image_format_supported($_FILES['photo']['name'])) { dol_mkdir($dir); - if (@is_dir($dir)) - { + 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) - { + if (!$result > 0) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs @@ -1074,8 +1078,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // We set country_id, country_code and country for the selected country $object->country_id = GETPOST('country_id') ?GETPOST('country_id') : $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']; @@ -1152,8 +1155,22 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $("#selectcountry_id").change(function() { document.formsoc.action.value="create"; document.formsoc.submit(); - }); - });'; + });'; + if ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS==-1) { + print ' + function init_check_no_email(input) { + if (input.val()!="") { + $(".noemail").addClass("fieldrequired"); + } else { + $(".noemail").removeClass("fieldrequired"); + } + } + $("#email").keyup(function() { + init_check_no_email($(this)); + }); + init_check_no_email($("#email"));'; + } + print '});'; print '</script>'."\n"; print '<div id="selectthirdpartytype">'; @@ -1198,7 +1215,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<input type="hidden" name="type" value='.GETPOST("type", 'alpha').'>'; print '<input type="hidden" name="LastName" value="'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName').'">'; print '<input type="hidden" name="ThirdPartyName" value="'.$langs->trans('ThirdPartyName').'">'; - if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print '<input type="hidden" name="code_auto" value="1">'; + if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) { + print '<input type="hidden" name="code_auto" value="1">'; + } print dol_get_fiche_head(null, 'card', '', 0, ''); @@ -1215,17 +1234,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); print '</td>'; - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.dol_escape_htmltag($object->prefix_comm).'"></td>'; } print '</tr>'; // If javascript on, we show option individual - if ($conf->use_javascript_ajax) - { - if (!empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) - { + if ($conf->use_javascript_ajax) { + if (!empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { // Firstname print '<tr class="individualline"><td>'.$form->editfieldkey('FirstName', 'firstname', '', $object, 0).'</td>'; print '<td colspan="3"><input type="text" class="minwidth300" maxlength="128" name="firstname" id="firstname" value="'.dol_escape_htmltag($object->firstname).'"></td>'; @@ -1249,12 +1265,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print $formcompany->selectProspectCustomerType($selected); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>'; print '<table class="nobordernopadding"><tr><td>'; $tmpcode = $object->code_client; - if (empty($tmpcode) && !empty($modCodeClient->code_auto)) $tmpcode = $modCodeClient->getNextValue($object, 0); + if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { + $tmpcode = $modCodeClient->getNextValue($object, 0); + } print '<input type="text" name="customer_code" id="customer_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="24">'; print '</td><td>'; $s = $modCodeClient->getToolTip($langs, $object, 0); @@ -1262,31 +1282,34 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr></table>'; print '</td></tr>'; - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) - || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) - { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire)) + || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { // Supplier print '<tr>'; print '<td>'.$form->editfieldkey('Vendor', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td>'; $default = -1; - if (!empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) $default = 1; + if (!empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) { + $default = 1; + } print $form->selectyesno("fournisseur", (GETPOST('fournisseur', 'int') != '' ? GETPOST('fournisseur', 'int') : (GETPOST("type", 'alpha') == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type", 'alpha') == '' ? 1 : 0), 1); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'; - if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) - { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } print '</td><td>'; - if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) - { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { print '<table class="nobordernopadding"><tr><td>'; $tmpcode = $object->code_fournisseur; - if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) $tmpcode = $modCodeFournisseur->getNextValue($object, 1); + if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { + $tmpcode = $modCodeFournisseur->getNextValue($object, 1); + } print '<input type="text" name="supplier_code" id="supplier_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="24">'; print '</td><td>'; $s = $modCodeFournisseur->getToolTip($langs, $object, 1); @@ -1302,10 +1325,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; // Barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { print '<tr><td>'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>'; - print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">'; + print '<td colspan="3">'; + print img_picto('', 'barcode'); + print '<input type="text" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">'; print '</td></tr>'; } @@ -1324,7 +1348,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>'; print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td class="tdtop">'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>'; print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100 quatrevingtpercent'); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); @@ -1332,36 +1358,49 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Country print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; - print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print img_picto('', 'country', 'class="paddingrightonly"'); print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // 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)) - { + 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 '<tr><td>'.$form->editfieldkey('Region-State', 'state_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; } else { print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; } - if ($object->country_id) print $formcompany->select_state($object->state_id, $object->country_code); - else print $countrynotdefined; + if ($object->country_id) { + print $formcompany->select_state($object->state_id, $object->country_code); + } else { + print $countrynotdefined; + } print '</td></tr>'; } // Phone / Fax print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>'; print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>'; print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>'; // Email / Web print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', empty($conf->global->SOCIETE_EMAIL_MANDATORY) ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>'; - print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td></tr>'; + print '<td'.(($conf->browser->layout == 'phone') || empty($conf->mailing->enabled) ? ' colspan="3"' : '').'>'.img_picto('', 'object_email').' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="'.$object->email.'"></td>'; + if (!empty($conf->mailing->enabled) && !empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; + print '<td class="individualline" '.(($conf->browser->layout == 'phone') || empty($conf->mailing->enabled) ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ?GETPOST("contact_no_email", 'alpha') : $object->no_email), 1, false, 1).'</td>'; + } + print '</tr>'; print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>'; print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="'.$object->url.'"></td></tr>'; @@ -1371,6 +1410,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr>'; print '<td><label for="'.$value['label'].'">'.$form->editfieldkey($value['label'], $key, '', $object, 0).'</label></td>'; print '<td colspan="3">'; + if (!empty($value['icon'])) { + print '<span class="fa '.$value['icon'].'"></span>'; + } print '<input type="text" name="'.$key.'" id="'.$key.'" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET($key) ? GETPOST($key, 'alphanohtml') : (empty($object->socialnetworks[$key]) ? '' : $object->socialnetworks[$key])).'">'; print '</td>'; print '</tr>'; @@ -1387,26 +1429,34 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if ($idprof != '-') { $key = 'idprof'.$i; - if (($j % $NBCOLS) == 0) print '<tr>'; + if (($j % $NBCOLS) == 0) { + print '<tr>'; + } $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', (empty($conf->global->$idprof_mandatory) ? 0 : 1)).'</td><td>'; print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print '</td>'; - if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>'; + if (($j % $NBCOLS) == ($NBCOLS - 1)) { + print '</tr>'; + } $j++; } $i++; } - if ($NBCOLS > 1 && ($j % 2 == 1)) print '<td colspan="2"></td></tr>'; + if ($NBCOLS > 1 && ($j % 2 == 1)) { + print '<td colspan="2"></td></tr>'; + } // Vat is used print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>'; print '<td>'; print $form->selectyesno('assujtva_value', GETPOSTISSET('assujtva_value') ?GETPOST('assujtva_value', 'int') : 1, 1); // Assujeti par defaut en creation print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td class="nowrap">'.$form->editfieldkey('VATIntra', 'intra_vat', '', $object, 0).'</td>'; print '<td class="nowrap">'; $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">'; @@ -1416,7 +1466,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (!empty($conf->use_javascript_ajax)) { $widthpopup = 600; - if (!empty($conf->dol_use_jmobile)) $widthpopup = 350; + if (!empty($conf->dol_use_jmobile)) { + $widthpopup = 350; + } $heightpopup = 400; print "\n"; print '<script language="JavaScript" type="text/javascript">'; @@ -1437,22 +1489,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print '</td></tr>'; - } elseif ($mysoc->localtax1_assuj == "1") - { + } elseif ($mysoc->localtax1_assuj == "1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); print '</td></tr>'; - } elseif ($mysoc->localtax2_assuj == "1") - { + } elseif ($mysoc->localtax2_assuj == "1") { print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print '</td></tr>'; @@ -1461,20 +1512,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Type - Workforce/Staff print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n"; $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. - print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1); - if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1); + if ($user->admin) { + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1); - if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // Legal Form print '<tr><td>'.$form->editfieldkey('JuridicalStatus', 'forme_juridique_code', '', $object, 0).'</td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; - if ($object->country_id) - { + if ($object->country_id) { print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); } else { print $countrynotdefined; @@ -1486,17 +1542,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<td colspan="3"><input type="text" name="capital" id="capital" class="maxwidth100" value="'.$object->capital.'"> '; print '<span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>'; - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'."\n"; - print $formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); + print img_picto('', 'language').$formadmin->select_language(GETPOST('default_lang', 'alpha') ? GETPOST('default_lang', 'alpha') : ($object->default_lang ? $object->default_lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); print '</td>'; print '</tr>'; } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).'</td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; @@ -1505,8 +1559,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { $langs->load('categories'); // Customer @@ -1517,8 +1570,22 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print "</td></tr>"; //} + if (!empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { + print '<tr class="individualline"><td class="toptd">'.$form->editfieldkey('ContactCategoriesShort', 'contcats', '', $object, 0).'</td><td colspan="3">'; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1); + print img_picto('', 'category').$form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print "</td></tr>"; + } + + if (!empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { + print '<tr class="individualline"><td class="toptd">'.$form->editfieldkey('ContactCategoriesShort', 'contcats', '', $object, 0).'</td><td colspan="3">'; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1); + print img_picto('', 'category').$form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print "</td></tr>"; + } + // Supplier - if (!empty($conf->fournisseur->enabled)) { + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1); print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0); @@ -1527,8 +1594,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; @@ -1550,7 +1616,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $selected, null, null, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print '</td></tr>'; - // Ajout du logo + // Add logo print '<tr class="hideonsmartphone">'; print '<td>'.$form->editfieldkey('Logo', 'photoinput', '', $object, 0).'</td>'; print '<td colspan="3">'; @@ -1560,12 +1626,45 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</table>'."\n"; + // Accountancy codes + if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { + print '<table class="border" width="100%">'; + + if (! empty($conf->accounting->enabled)) { + // Accountancy_code_sell + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<td>'; + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); + print '</td></tr>'; + + // Accountancy_code_buy + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyCode").'</td>'; + print '<td>'; + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, ''); + print '</td></tr>'; + } else // For external software + { + // Accountancy_code_sell + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_sell" value="'.$object->accountancy_code_sell.'">'; + print '</td></tr>'; + + // Accountancy_code_buy + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyCode").'</td>'; + print '<td class="maxwidthonsmartphone"><input class="minwidth100" name="accountancy_code_buy" value="'.$object->accountancy_code_buy.'">'; + print '</td></tr>'; + } + + print '</table>'; + } + print dol_get_fiche_end(); print '<div class="center">'; print '<input type="submit" class="button" name="create" value="'.$langs->trans('AddThirdParty').'">'; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print ' &nbsp; &nbsp; '; print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; } else { @@ -1578,8 +1677,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } elseif ($action == 'edit') { //print load_fiche_titre($langs->trans("EditCompany")); - if ($socid) - { + if ($socid) { $res = $object->fetch_optionals(); //if ($res < 0) { dol_print_error($db); exit; } @@ -1587,44 +1685,41 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Load object modCodeTiers $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeClient = new $module($db); // We verified if the tag prefix is used - if ($modCodeClient->code_auto) - { + if ($modCodeClient->code_auto) { $prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed(); } $module = $conf->global->SOCIETE_CODECLIENT_ADDON; - if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') - { + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$module.'.php'); - if ($res) break; + if ($res) { + break; + } } $modCodeFournisseur = new $module($db); // On verifie si la balise prefix est utilisee - if ($modCodeFournisseur->code_auto) - { + if ($modCodeFournisseur->code_auto) { $prefixSupplierIsUsed = $modCodeFournisseur->verif_prefixIsUsed(); } $object->oldcopy = clone $object; - if (GETPOSTISSET('name')) - { + if (GETPOSTISSET('name')) { // We overwrite with values if posted $object->name = GETPOST('name', 'alphanohtml'); $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); @@ -1674,9 +1769,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); + if (GETPOSTISSET('accountancy_code_sell')) { + $object->accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + } + if (GETPOSTISSET('accountancy_code_buy')) { + $object->accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + } + //Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('lcoation_incoterms', 'alpha'); } @@ -1689,8 +1790,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $object->localtax2_value = GETPOST('lt2'); // We set country_id, and country_code label of the chosen country - if ($object->country_id > 0) - { + if ($object->country_id > 0) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; @@ -1699,13 +1799,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if ($object->localtax1_assuj == 0) { $sub = 0; - } else {$sub = 1; } + } else { + $sub = 1; + } if ($object->localtax2_assuj == 0) { $sub2 = 0; - } else {$sub2 = 1; } + } else { + $sub2 = 1; + } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print "\n".'<script type="text/javascript">'; print '$(document).ready(function () { var val='.$sub.'; @@ -1787,7 +1890,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="socid" value="'.$object->id.'">'; print '<input type="hidden" name="entity" value="'.$object->entity.'">'; - if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) print '<input type="hidden" name="code_auto" value="1">'; + if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) { + print '<input type="hidden" name="code_auto" value="1">'; + } print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company'); @@ -1796,8 +1901,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<table class="border centpercent">'; // Ref/ID - if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) - { + if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { print '<tr><td class="titlefieldcreate">'.$langs->trans("ID").'</td><td colspan="3">'; print $object->ref; print '</td></tr>'; @@ -1814,12 +1918,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="'.dol_escape_htmltag($object->name_alias).'"></td></tr>'; // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td>'.$form->editfieldkey('Prefix', 'prefix', '', $object, 0).'</td><td colspan="3">'; // It does not change the prefix mode using the auto numbering prefix - if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) - { + if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { print '<input type="hidden" name="prefix_comm" value="'.dol_escape_htmltag($object->prefix_comm).'">'; print $object->prefix_comm; } else { @@ -1833,18 +1935,22 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<td class="maxwidthonsmartphone">'; print $formcompany->selectProspectCustomerType($object->client); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>'; print '<table class="nobordernopadding"><tr><td>'; - if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) - { + if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode = $object->code_client; - if (empty($tmpcode) && !empty($object->oldcopy->code_client)) $tmpcode = $object->oldcopy->code_client; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. - if (empty($tmpcode) && !empty($modCodeClient->code_auto)) $tmpcode = $modCodeClient->getNextValue($object, 0); + if (empty($tmpcode) && !empty($object->oldcopy->code_client)) { + $tmpcode = $object->oldcopy->code_client; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. + } + if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { + $tmpcode = $modCodeClient->getNextValue($object, 0); + } print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="24">'; - } elseif ($object->codeclient_modifiable()) - { + } elseif ($object->codeclient_modifiable()) { print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($object->code_client).'" maxlength="24">'; } else { print $object->code_client; @@ -1858,31 +1964,33 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; // Supplier - if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) - || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) - { + if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) + || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { print '<tr>'; print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td>'; print '<td class="maxwidthonsmartphone">'; print $form->selectyesno("fournisseur", $object->fournisseur, 1, false, 0, 1); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'; - if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) - { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } print '</td>'; print '<td>'; print '<table class="nobordernopadding"><tr><td>'; - if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) - { + if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode = $object->code_fournisseur; - if (empty($tmpcode) && !empty($object->oldcopy->code_fournisseur)) $tmpcode = $object->oldcopy->code_fournisseur; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. - if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) $tmpcode = $modCodeFournisseur->getNextValue($object, 1); + if (empty($tmpcode) && !empty($object->oldcopy->code_fournisseur)) { + $tmpcode = $object->oldcopy->code_fournisseur; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. + } + if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { + $tmpcode = $modCodeFournisseur->getNextValue($object, 1); + } print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="24">'; - } elseif ($object->codefournisseur_modifiable()) - { + } elseif ($object->codefournisseur_modifiable()) { print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($object->code_fournisseur).'" maxlength="24">'; } else { print $object->code_fournisseur; @@ -1896,10 +2004,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { print '<tr><td class="tdtop">'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>'; - print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">'; + print '<td colspan="3">'; + print img_picto('', 'barcode'); + print '<input type="text" name="barcode" id="barcode" value="'.dol_escape_htmltag($object->barcode).'">'; print '</td></tr>'; } @@ -1920,7 +2029,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>'; print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>'; print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); @@ -1930,14 +2041,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">'; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // 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)) - { + 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 '<tr><td>'.$form->editfieldkey('Region-State', 'state_id', '', $object, 0).'</td><td colspan="3">'; } else { print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td colspan="3">'; @@ -1950,15 +2061,17 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Phone / Fax print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>'; print '<td>'.img_picto('', 'object_phoning').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ?GETPOST('phone', 'alpha') : $object->phone).'"></td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>'; print '<td>'.img_picto('', 'object_phoning_fax').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ?GETPOST('fax', 'alpha') : $object->fax).'"></td></tr>'; // EMail / Web - print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>'; - print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth200onsmartphone widthcentpercentminusx" value="'.(GETPOSTISSET('email') ?GETPOST('email', 'alpha') : $object->email).'"></td></tr>'; + print '<tr><td>'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>'; + print '<td colspan="3">'.img_picto('', 'object_email').' <input type="text" name="email" id="email" class="maxwidth200onsmartphone maxwidth500 widthcentpercentminusx" value="'.(GETPOSTISSET('email') ? GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL) : $object->email).'"></td></tr>'; print '<tr><td>'.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).'</td>'; - print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth200onsmartphone widthcentpercentminusx " value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>'; + print '<td colspan="3">'.img_picto('', 'globe').' <input type="text" name="url" id="url" class="maxwidth200onsmartphone maxwidth500 widthcentpercentminusx " value="'.(GETPOSTISSET('url') ?GETPOST('url', 'alpha') : $object->url).'"></td></tr>'; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1966,7 +2079,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr>'; print '<td><label for="'.$value['label'].'">'.$form->editfieldkey($value['label'], $key, '', $object, 0).'</label></td>'; print '<td colspan="3">'; - print '<input type="text" name="'.$key.'" id="'.$key.'" class="minwidth100" maxlength="80" value="'.$object->socialnetworks[$key].'">'; + if (!empty($value['icon'])) { + print '<span class="fa '.$value['icon'].'"></span>'; + } + print '<input type="text" name="'.$key.'" id="'.$key.'" class="minwidth100" maxlength="80" value="'.(empty($object->socialnetworks[$key]) ? '' : $object->socialnetworks[$key]).'">'; print '</td>'; print '</tr>'; } elseif (!empty($object->socialnetworks[$key])) { @@ -1976,26 +2092,32 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Prof ids - $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); - while ($i <= 6) - { + $i = 1; + $j = 0; + $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); + while ($i <= 6) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); - if ($idprof != '-') - { + if ($idprof != '-') { $key = 'idprof'.$i; - if (($j % $NBCOLS) == 0) print '<tr>'; + if (($j % $NBCOLS) == 0) { + print '<tr>'; + } $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).'</td><td>'; print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print '</td>'; - if (($j % $NBCOLS) == ($NBCOLS - 1)) print '</tr>'; + if (($j % $NBCOLS) == ($NBCOLS - 1)) { + print '</tr>'; + } $j++; } $i++; } - if ($NBCOLS > 0 && $j % 2 == 1) print '<td colspan="2"></td></tr>'; + if ($NBCOLS > 0 && $j % 2 == 1) { + print '<td colspan="2"></td></tr>'; + } // VAT is used print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; @@ -2004,12 +2126,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") - { + if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; print $form->selectyesno('localtax1assuj_value', $object->localtax1_assuj, 1); - if (!isOnlyOneLocalTax(1)) - { + if (!isOnlyOneLocalTax(1)) { print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); print '</span>'; @@ -2018,30 +2138,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</tr><tr>'; print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); - if (!isOnlyOneLocalTax(2)) - { + if (!isOnlyOneLocalTax(2)) { print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); print '</span>'; } print '</td></tr>'; - } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") - { + } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; print $form->selectyesno('localtax1assuj_value', $object->localtax1_assuj, 1); - if (!isOnlyOneLocalTax(1)) - { + if (!isOnlyOneLocalTax(1)) { print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); print '</span>'; } print '</td></tr>'; - } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") - { + } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); - if (!isOnlyOneLocalTax(2)) - { + if (!isOnlyOneLocalTax(2)) { print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); print '</span>'; @@ -2054,14 +2169,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<td colspan="3">'; $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">'; - if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) - { + if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { $s .= ' &nbsp; '; - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { $widthpopup = 600; - if (!empty($conf->dol_use_jmobile)) $widthpopup = 350; + if (!empty($conf->dol_use_jmobile)) { + $widthpopup = 350; + } $heightpopup = 400; print "\n"; print '<script language="JavaScript" type="text/javascript">'; @@ -2082,13 +2197,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Type - Workforce/Staff print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; - print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td>'; - if ($conf->browser->layout == 'phone') print '</tr><tr>'; + if ($conf->browser->layout == 'phone') { + print '</tr><tr>'; + } print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // Juridical type @@ -2103,27 +2224,24 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>'; // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3">'."\n"; - print $formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1); + print img_picto('', 'language').$formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1); print '</td>'; print '</tr>'; } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr>'; - print '<td>'.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).'</td>'; + print '<td>'.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).'</td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); print '</td></tr>'; } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { // Customer print '<tr class="visibleifcustomer"><td>'.$form->editfieldkey('CustomersCategoriesShort', 'custcats', '', $object, 0).'</td>'; print '<td colspan="3">'; @@ -2138,7 +2256,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print "</td></tr>"; // Supplier - if (!empty($conf->fournisseur->enabled)) { + if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) { print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>'; print '<td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1); @@ -2154,8 +2272,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; print '<td colspan="3" class="maxwidthonsmartphone">'; @@ -2179,13 +2296,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<tr class="hideonsmartphone">'; print '<td>'.$form->editfieldkey('Logo', 'photoinput', '', $object, 0).'</td>'; print '<td colspan="3">'; - if ($object->logo) print $form->showphoto('societe', $object); + if ($object->logo) { + print $form->showphoto('societe', $object); + } $caneditfield = 1; - if ($caneditfield) - { - if ($object->logo) print "<br>\n"; + if ($caneditfield) { + if ($object->logo) { + print "<br>\n"; + } print '<table class="nobordernopadding">'; - if ($object->logo) print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>'; + if ($object->logo) { + print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>'; + } //print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>'; print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>'; print '</table>'; @@ -2199,14 +2321,48 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<td colspan="3" class="maxwidthonsmartphone">'; $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1); $arrayselected = GETPOST('commercial', 'array'); - if (empty($arrayselected)) $arrayselected = $object->getSalesRepresentatives($user, 1); + if (empty($arrayselected)) { + $arrayselected = $object->getSalesRepresentatives($user, 1); + } print img_picto('', 'user').$form->multiselectarray('commercial', $userlist, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1); print '</td></tr>'; print '</table>'; + + if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { + print '<br>'; + print '<table class="border centpercent">'; + + if (! empty($conf->accounting->enabled)) { + // Accountancy_code_sell + print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<td>'; + print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1); + print '</td></tr>'; + + // Accountancy_code_buy + print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>'; + print '<td>'; + print $formaccounting->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1); + print '</td></tr>'; + } else // For external software + { + // Accountancy_code_sell + print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">'; + print '</td></tr>'; + + // Accountancy_code_buy + print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>'; + print '<td><input name="accountancy_code_buy" class="maxwidth200" value="'.$object->accountancy_code_buy.'">'; + print '</td></tr>'; + } + print '</table>'; + } + print '</div>'; - print dol_get_fiche_end(); + print dol_get_fiche_end(); print '<div class="center">'; print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; @@ -2218,10 +2374,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } } else { /* - * View - */ + * View + */ - if (!empty($object->id)) $res = $object->fetch_optionals(); + if (!empty($object->id)) { + $res = $object->fetch_optionals(); + } //if ($res < 0) { dol_print_error($db); exit; } @@ -2229,26 +2387,38 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print dol_get_fiche_head($head, 'card', $langs->trans("ThirdParty"), -1, 'company'); + $formconfirm = ''; + // Confirm delete third party - if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); + if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); } - if ($action == 'merge') - { + if ($action == 'merge') { $formquestion = array( array( 'name' => 'soc_origin', 'label' => $langs->trans('MergeOriginThirdparty'), 'type' => 'other', - 'value' => $form->select_company('', 'soc_origin', 's.rowid <> '.$object->id, 'SelectThirdParty', 0, 0, array(), 0, 'minwidth200') + 'value' => $form->select_company('', 'soc_origin', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth200', '', '', 1, null, false, array($object->id)) ) ); - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250); + $formconfirm .= $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250); } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm); + $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; + dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error'); $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -2262,32 +2432,25 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; - // Prospect/Customer - print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>'; - print $object->getLibCustProspStatut(); + // Type Prospect/Customer/Supplier + print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>'; + print $object->getTypeUrl(1); print '</td></tr>'; - // Supplier - if (!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) - { - print '<tr><td>'.$langs->trans('Supplier').'</td><td>'; - print yn($object->fournisseur); - print '</td></tr>'; - } - // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print '<tr><td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td>'; + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field + print '<tr><td>'.$langs->trans('Prefix').'</td><td>'.dol_escape_htmltag($object->prefix_comm).'</td>'; print '</tr>'; } // Customer code - if ($object->client) - { + if ($object->client) { print '<tr><td>'; - print $langs->trans('CustomerCode').'</td><td>'; - print $object->code_client; + print $langs->trans('CustomerCode'); + print '</td>'; + print '<td>'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); + print '</td>'; $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -2297,11 +2460,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Supplier code - if (!empty($conf->fournisseur->enabled) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) - { + if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print '<tr><td>'; print $langs->trans('SupplierCode').'</td><td>'; - print $object->code_fournisseur; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); $tmpcheck = $object->check_codefournisseur(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; @@ -2311,30 +2473,29 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Barcode - if (!empty($conf->barcode->enabled)) - { + if (!empty($conf->barcode->enabled)) { print '<tr><td>'; - print $langs->trans('Gencod').'</td><td>'.dol_escape_htmltag($object->barcode); + print $langs->trans('Gencod').'</td><td>'.showValueWithClipboardCPButton(dol_escape_htmltag($object->barcode)); print '</td>'; print '</tr>'; } // Prof ids $i = 1; $j = 0; - while ($i <= 6) - { + while ($i <= 6) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); - if ($idprof != '-') - { + if ($idprof != '-') { //if (($j % 2) == 0) print '<tr>'; print '<tr>'; print '<td>'.$idprof.'</td><td>'; $key = 'idprof'.$i; - print $object->$key; - if ($object->$key) - { - if ($object->id_prof_check($i, $object) > 0) print ' &nbsp; '.$object->id_prof_url($i, $object); - else print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->$key)); + if ($object->$key) { + if ($object->id_prof_check($i, $object) > 0) { + print ' &nbsp; '.$object->id_prof_url($i, $object); + } else { + print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>'; + } } print '</td>'; //if (($j % 2) == 1) print '</tr>'; @@ -2350,8 +2511,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // We don't need them into customer profile. // Except for spain and localtax where localtax depends on buyer and not seller - if ($object->fournisseur) - { + if ($object->fournisseur) { // VAT is used print '<tr><td>'; print $form->textwithpicto($langs->trans('VATIsUsed'), $langs->trans('VATIsUsedWhenSelling')); @@ -2362,24 +2522,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Local Taxes - if ($object->fournisseur || $mysoc->country_code == 'ES') - { - if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") - { + if ($object->fournisseur || $mysoc->country_code == 'ES') { + if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax1_assuj); print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax2_assuj); print '</td></tr>'; - if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) - { + if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) { print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; print '<input type="hidden" name="action" value="set_localtax1">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<tr><td>'.$langs->transcountry("Localtax1", $mysoc->country_code).' <a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editRE&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</td>'; - if ($action == 'editRE') - { + if ($action == 'editRE') { print '<td class="left">'; $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; @@ -2388,8 +2544,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } print '</tr></form>'; } - if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) - { + if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) { print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; print '<input type="hidden" name="action" value="set_localtax2">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -2403,13 +2558,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } print '</tr></form>'; } - } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") - { + } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax1_assuj); print '</td></tr>'; - if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) - { + if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) { print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; print '<input type="hidden" name="action" value="set_localtax1">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -2423,13 +2576,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } print '</tr></form>'; } - } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") - { + } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; print yn($object->localtax2_assuj); print '</td></tr>'; - if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) - { + if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) { print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; print '<input type="hidden" name="action" value="set_localtax2">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -2449,20 +2600,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Sale tax code (VAT code) print '<tr>'; print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>'; - if ($object->tva_intra) - { + if ($object->tva_intra) { $s = ''; - $s .= dol_escape_htmltag($object->tva_intra); + $s .= showValueWithClipboardCPButton(dol_escape_htmltag($object->tva_intra)); $s .= '<input type="hidden" id="tva_intra" name="tva_intra" maxlength="20" value="'.$object->tva_intra.'">'; - if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) - { + if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { $s .= ' &nbsp; '; - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { $widthpopup = 600; - if (!empty($conf->dol_use_jmobile)) $widthpopup = 350; + if (!empty($conf->dol_use_jmobile)) { + $widthpopup = 350; + } $heightpopup = 400; print "\n"; print '<script language="JavaScript" type="text/javascript">'; @@ -2486,7 +2636,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Third-Party Type print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('ThirdPartyType').'</td>'; - if ($action != 'editthirdpartytype' && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdpartytype&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>'; + if ($action != 'editthirdpartytype' && $user->rights->societe->creer) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editthirdpartytype&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; $html_name = ($action == 'editthirdpartytype') ? 'typent_id' : 'none'; @@ -2505,8 +2657,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<table class="border tableforfield" width="100%">'; // Tags / categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { // Customer if ($object->prospect || $object->client || (!$object->fournisseur && !empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) { print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>'; @@ -2516,7 +2667,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Supplier - if (!empty($conf->fournisseur->enabled) && $object->fournisseur) { + if (((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && !empty($user->rights->supplier_order->lire)) || (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->supplier_invoice->lire))) && $object->fournisseur) { print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>'; print '<td>'; print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1); @@ -2529,33 +2680,36 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Capital print '<tr><td>'.$langs->trans('Capital').'</td><td>'; - if ($object->capital) print price($object->capital, '', $langs, 0, -1, -1, $conf->currency); - else print '&nbsp;'; + if ($object->capital) { + print price($object->capital, '', $langs, 0, -1, -1, $conf->currency); + } else { + print '&nbsp;'; + } print '</td></tr>'; // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>'; //$s=picto_from_langcode($object->default_lang); //print ($s?$s.' ':''); $langs->load("languages"); $labellang = ($object->default_lang ? $langs->trans('Language_'.$object->default_lang) : ''); + print picto_from_langcode($object->default_lang, 'class="paddingrightonly saturatemedium opacitylow"'); print $labellang; print '</td></tr>'; } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print '<tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans('IncotermLabel').'</td>'; - if ($action != 'editincoterm' && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=editincoterm">'.img_edit('', 1).'</a></td>'; + if ($action != 'editincoterm' && $user->rights->societe->creer) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=editincoterm">'.img_edit('', 1).'</a></td>'; + } print '</tr></table>'; print '</td><td colspan="3">'; - if ($action != 'editincoterm') - { + if ($action != 'editincoterm') { print $form->textwithpicto($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'].'?socid='.$object->id); @@ -2564,8 +2718,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr>'; print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; print '<td>'; @@ -2573,20 +2726,55 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; } + if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { + // Accountancy sell code + print '<tr><td class="nowrap">'; + print $langs->trans("ProductAccountancySellCode"); + print '</td><td colspan="2">'; + if (! empty($conf->accounting->enabled)) { + if (! empty($object->accountancy_code_sell)) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch('', $object->accountancy_code_sell, 1); + + print $accountingaccount->getNomUrl(0, 1, 1, '', 1); + } + } else { + print $object->accountancy_code_sell; + } + print '</td></tr>'; + + // Accountancy buy code + print '<tr><td class="nowrap">'; + print $langs->trans("ProductAccountancyBuyCode"); + print '</td><td colspan="2">'; + if (! empty($conf->accounting->enabled)) { + if (! empty($object->accountancy_code_buy)) { + $accountingaccount2 = new AccountingAccount($db); + $accountingaccount2->fetch('', $object->accountancy_code_buy, 1); + + print $accountingaccount2->getNomUrl(0, 1, 1, '', 1); + } + } else { + print $object->accountancy_code_buy; + } + print '</td></tr>'; + } + // Other attributes $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Parent company - if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) - { + if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('ParentCompany').'</td>'; - if ($action != 'editparentcompany' && $user->rights->societe->creer) print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editparentcompany&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>'; + if ($action != 'editparentcompany' && $user->rights->societe->creer) { + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editparentcompany&amp;socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>'; + } print '</tr></table>'; print '</td><td>'; $html_name = ($action == 'editparentcompany') ? 'parent_id' : 'none'; - $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->parent, $html_name, 's.rowid <> '.$object->id, 1); + $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->parent, $html_name, '', 1, 0, 0, null, 0, array($object->id)); print '</td></tr>'; } @@ -2594,17 +2782,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php'; // Module Adherent - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $langs->load("members"); print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<td>'; $adh = new Adherent($db); $result = $adh->fetch('', '', $object->id); - if ($result > 0) - { + if ($result > 0) { $adh->ref = $adh->getFullName($langs); - print $adh->getNomUrl(1); + print $adh->getNomUrl(-1); } else { print '<span class="opacitymedium">'.$langs->trans("ThirdpartyNotLinkedToMember").'</span>'; } @@ -2627,62 +2813,51 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) /* - * Actions - */ - if ($action != 'presend') - { + * Actions + */ + if ($action != 'presend') { print '<div class="tabsAction">'."\n"; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { $at_least_one_email_contact = false; $TContact = $object->contact_array_objects(); - foreach ($TContact as &$contact) - { - if (!empty($contact->email)) - { + foreach ($TContact as &$contact) { + if (!empty($contact->email)) { $at_least_one_email_contact = true; break; } } if (empty($user->socid)) { - if (!empty($object->email) || $at_least_one_email_contact) - { + if (!empty($object->email) || $at_least_one_email_contact) { $langs->load("mails"); print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'; } else { $langs->load("mails"); - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans('SendMail').'</a>'; + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans('SendMail').'</a>'; } } - if ($user->rights->societe->creer) - { + if ($user->rights->societe->creer) { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; } - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $adh = new Adherent($db); $result = $adh->fetch('', '', $object->id); - if ($result == 0 && ($object->client == 1 || $object->client == 3) && !empty($conf->global->MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS)) - { + if ($result == 0 && ($object->client == 1 || $object->client == 3) && !empty($conf->global->MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS)) { print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/card.php?&action=create&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("NewMember")).'">'.$langs->trans("NewMember").'</a>'; } } - if ($user->rights->societe->supprimer) - { + if ($user->rights->societe->supprimer) { print '<a class="butActionDelete" href="card.php?action=merge&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MergeThirdparties")).'">'.$langs->trans('Merge').'</a>'; } - if ($user->rights->societe->supprimer) - { - if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) // We can't use preloaded confirm form with jmobile - { + if ($user->rights->societe->supprimer) { + if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) { // We can't use preloaded confirm form with jmobile print '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n"; } else { print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; @@ -2698,17 +2873,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; - if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) - { + if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) { print '<a name="builddoc"></a>'; // ancre /* - * Documents generes - */ + * Generated documents + */ $filedir = $conf->societe->multidir_output[$object->entity].'/'.$object->id; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$object->id; $genallowed = $user->rights->societe->lire; @@ -2718,8 +2891,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Subsidiaries list - if (empty($conf->global->SOCIETE_DISABLE_SUBSIDIARIES)) - { + if (empty($conf->global->SOCIETE_DISABLE_SUBSIDIARIES)) { $result = show_subsidiaries($conf, $langs, $db, $object); } @@ -2736,17 +2908,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</div></div></div>'; - if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) - { + if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) { // Contacts list - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $result = show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); } // Addresses list - if (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) - { + if (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) { $result = show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); } } @@ -2761,7 +2930,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; } } - // End of page llxFooter(); $db->close(); diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 4b3cb68e3bb..577256f06aa 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -21,6 +21,8 @@ * \brief Popup screen to validate VAT */ +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) + require "../../main.inc.php"; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once NUSOAP_PATH.'/nusoap.php'; @@ -45,8 +47,7 @@ print load_fiche_titre($langs->trans("VATIntraCheckableOnEUSite"), '', 'title_se $vatNumber = GETPOST("vatNumber", 'alpha'); -if (!$vatNumber) -{ +if (!$vatNumber) { print '<br>'; print '<font class="error">'.$langs->transnoentities("ErrorFieldRequired", $langs->trans("VATIntraShort")).'</font><br>'; } else { @@ -76,8 +77,7 @@ if (!$vatNumber) // Check for an error $err = $soapclient->getError(); - if ($err) - { + if ($err) { dol_syslog("Constructor error ".$WS_DOL_URL, LOG_ERR); } @@ -96,42 +96,38 @@ if (!$vatNumber) print '<b>'.$langs->trans("Response").'</b>:<br>'; // Service indisponible - if (!is_array($result) || preg_match('/SERVICE_UNAVAILABLE/i', $result['faultstring'])) - { + if (!is_array($result) || preg_match('/SERVICE_UNAVAILABLE/i', $result['faultstring'])) { print '<font class="error">'.$langs->trans("ErrorServiceUnavailableTryLater").'</font><br>'; $messagetoshow = $soapclient->response; - } elseif (preg_match('/TIMEOUT/i', $result['faultstring'])) - { + } elseif (preg_match('/TIMEOUT/i', $result['faultstring'])) { print '<font class="error">'.$langs->trans("ErrorServiceUnavailableTryLater").'</font><br>'; $messagetoshow = $soapclient->response; - } elseif (preg_match('/SERVER_BUSY/i', $result['faultstring'])) - { + } elseif (preg_match('/SERVER_BUSY/i', $result['faultstring'])) { print '<font class="error">'.$langs->trans("ErrorServiceUnavailableTryLater").'</font><br>'; $messagetoshow = $soapclient->response; - } elseif ($result['faultstring']) - { + } elseif ($result['faultstring']) { print '<font class="error">'.$langs->trans("Error").'</font><br>'; $messagetoshow = $result['faultstring']; - } - // Syntaxe ko - elseif (preg_match('/INVALID_INPUT/i', $result['faultstring']) - || ($result['requestDate'] && !$result['valid'])) - { - if ($result['requestDate']) print $langs->trans("Date").': '.$result['requestDate'].'<br>'; + } elseif (preg_match('/INVALID_INPUT/i', $result['faultstring']) + || ($result['requestDate'] && !$result['valid'])) { + // Syntaxe ko + if ($result['requestDate']) { + print $langs->trans("Date").': '.$result['requestDate'].'<br>'; + } print $langs->trans("VATIntraSyntaxIsValid").': <font class="error">'.$langs->trans("No").'</font> (Might be a non europeen VAT)<br>'; print $langs->trans("ValueIsValid").': <font class="error">'.$langs->trans("No").'</font> (Might be a non europeen VAT)<br>'; //$messagetoshow=$soapclient->response; } else { // Syntaxe ok - if ($result['requestDate']) print $langs->trans("Date").': '.$result['requestDate'].'<br>'; + if ($result['requestDate']) { + print $langs->trans("Date").': '.$result['requestDate'].'<br>'; + } print $langs->trans("VATIntraSyntaxIsValid").': <font class="ok">'.$langs->trans("Yes").'</font><br>'; print $langs->trans("ValueIsValid").': '; - if (preg_match('/MS_UNAVAILABLE/i', $result['faultstring'])) - { + if (preg_match('/MS_UNAVAILABLE/i', $result['faultstring'])) { print '<font class="error">'.$langs->trans("ErrorVATCheckMS_UNAVAILABLE", $countryCode).'</font><br>'; } else { - if (!empty($result['valid']) && ($result['valid'] == 1 || $result['valid'] == 'true')) - { + if (!empty($result['valid']) && ($result['valid'] == 1 || $result['valid'] == 'true')) { print '<font class="ok">'.$langs->trans("Yes").'</font>'; print '<br>'; print $langs->trans("Name").': '.$result['name'].'<br>'; @@ -144,10 +140,10 @@ if (!$vatNumber) } // Show log data into page - print "\n"; - print '<!-- '; - var_dump($result); - print '-->'; + // print "\n"; + // print '<!-- '; + // var_dump($result); + // print '-->'; } print '<br>'; @@ -155,8 +151,7 @@ print $langs->trans("VATIntraManualCheck", $langs->trans("VATIntraCheckURL"), $l print '<br>'; print '<div class="center"><input type="button" class="button" value="'.$langs->trans("CloseWindow").'" onclick="javascript: window.close()"></div>'; -if ($messagetoshow) -{ +if ($messagetoshow) { print '<br><br>'; print "\n".'Error returned:<br>'; print nl2br($messagetoshow); diff --git a/htdocs/societe/checkvat/index.html b/htdocs/societe/checkvat/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index 82984409325..5a6513ef6e5 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -34,7 +34,7 @@ class Contacts extends DolibarrApi * * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'lastname', ); @@ -71,33 +71,29 @@ class Contacts extends DolibarrApi */ public function get($id, $includecount = 0, $includeroles = 0) { - if (!DolibarrApiAccess::$user->rights->societe->contact->lire) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->lire) { throw new RestException(401, 'No permission to read contacts'); } + if ($id == 0) { $result = $this->contact->initAsSpecimen(); } else { $result = $this->contact->fetch($id); } - if (!$result) - { + if (!$result) { throw new RestException(404, 'Contact not found'); } - if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) - { + if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includecount) - { + if ($includecount) { $this->contact->load_ref_elements(); } - if ($includeroles) - { + if ($includeroles) { $this->contact->fetchRoles(); } @@ -119,33 +115,29 @@ class Contacts extends DolibarrApi */ public function getByEmail($email, $includecount = 0, $includeroles = 0) { - if (!DolibarrApiAccess::$user->rights->societe->contact->lire) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->lire) { throw new RestException(401, 'No permission to read contacts'); } + if (empty($email)) { $result = $this->contact->initAsSpecimen(); } else { $result = $this->contact->fetch('', '', '', $email); } - if (!$result) - { + if (!$result) { throw new RestException(404, 'Contact not found'); } - if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) - { + if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($includecount) - { + if ($includecount) { $this->contact->load_ref_elements(); } - if ($includeroles) - { + if ($includeroles) { $this->contact->fetchRoles(); } @@ -176,8 +168,7 @@ class Contacts extends DolibarrApi $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->societe->contact->lire) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->lire) { throw new RestException(401, 'No permission to read contacts'); } @@ -186,8 +177,9 @@ class Contacts extends DolibarrApi // If the internal user must only see his customers, force searching by him $search_sale = 0; - if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) { $search_sale = DolibarrApiAccess::$user->id; + } $sql = "SELECT t.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; @@ -201,16 +193,19 @@ class Contacts extends DolibarrApi } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON t.fk_soc = s.rowid"; $sql .= ' WHERE t.entity IN ('.getEntity('socpeople').')'; - if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + if ($socids) { + $sql .= " AND t.fk_soc IN (".$this->db->sanitize($socids).")"; + } - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) { $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($search_sale > 0) + } + if ($search_sale > 0) { $sql .= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Select contacts of given category @@ -220,10 +215,8 @@ class Contacts extends DolibarrApi } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -232,10 +225,8 @@ class Contacts extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); - if ($limit) - { - if ($page < 0) - { + if ($limit) { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -243,24 +234,19 @@ class Contacts extends DolibarrApi $sql .= $this->db->plimit($limit + 1, $offset); } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $contact_static = new Contact($this->db); - if ($contact_static->fetch($obj->rowid)) - { + if ($contact_static->fetch($obj->rowid)) { $contact_static->fetchRoles(); - if ($includecount) - { + if ($includecount) { $contact_static->load_ref_elements(); } - if ($includeroles) - { + if ($includeroles) { $contact_static->fetchRoles(); } @@ -272,8 +258,7 @@ class Contacts extends DolibarrApi } else { throw new RestException(503, 'Error when retrieve contacts : '.$sql); } - if (!count($obj_ret)) - { + if (!count($obj_ret)) { throw new RestException(404, 'Contacts not found'); } return $obj_ret; @@ -287,15 +272,13 @@ class Contacts extends DolibarrApi */ public function post($request_data = null) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { throw new RestException(401, 'No permission to create/update contacts'); } // Check mandatory fields $result = $this->_validate($request_data); - foreach ($request_data as $field => $value) - { + foreach ($request_data as $field => $value) { $this->contact->$field = $value; } if ($this->contact->create(DolibarrApiAccess::$user) < 0) { @@ -313,30 +296,29 @@ class Contacts extends DolibarrApi */ public function put($id, $request_data = null) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { throw new RestException(401, 'No permission to create/update contacts'); } $result = $this->contact->fetch($id); - if (!$result) - { + if (!$result) { throw new RestException(404, 'Contact not found'); } - if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) - { + if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - foreach ($request_data as $field => $value) - { - if ($field == 'id') continue; + foreach ($request_data as $field => $value) { + if ($field == 'id') { + continue; + } $this->contact->$field = $value; } - if ($this->contact->update($id, DolibarrApiAccess::$user, 1, '', '', 'update')) + if ($this->contact->update($id, DolibarrApiAccess::$user, 1, '', '', 'update')) { return $this->get($id); + } return false; } @@ -349,18 +331,15 @@ class Contacts extends DolibarrApi */ public function delete($id) { - if (!DolibarrApiAccess::$user->rights->societe->contact->supprimer) - { + if (!DolibarrApiAccess::$user->rights->societe->contact->supprimer) { throw new RestException(401, 'No permission to delete contacts'); } $result = $this->contact->fetch($id); - if (!$result) - { + if (!$result) { throw new RestException(404, 'Contact not found'); } - if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) - { + if (!DolibarrApi::_checkAccessToResource('contact', $this->contact->id, 'socpeople&societe')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->contact->oldcopy = clone $this->contact; @@ -382,10 +361,12 @@ class Contacts extends DolibarrApi //throw new RestException(401); //} - if (!isset($request_data["login"])) + if (!isset($request_data["login"])) { throw new RestException(400, "login field missing"); - if (!isset($request_data["password"])) + } + if (!isset($request_data["password"])) { throw new RestException(400, "password field missing"); + } if (!DolibarrApiAccess::$user->rights->societe->contact->lire) { throw new RestException(401, 'No permission to read contacts'); diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 492916935f8..b0b486459b1 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2018 Pierre Chéné <pierre.chene44@gmail.com> * Copyright (C) 2019 Cedric Ancelin <icedo.anc@gmail.com> - * Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2020-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ class Thirdparties extends DolibarrApi * * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'name' ); @@ -132,51 +132,77 @@ class Thirdparties extends DolibarrApi { $obj_ret = array(); + if (!DolibarrApiAccess::$user->rights->societe->lire) { + throw new RestException(401); + } + // case of external user, we force socids $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; // 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 (!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) + 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."societe as t"; if ($category > 0) { - if ($mode != 4) $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c"; - if (!in_array($mode, array(1, 2, 3))) $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cc"; + if ($mode != 4) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c"; + } + if (!in_array($mode, array(1, 2, 3))) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cc"; + } + } + 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 .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; $sql .= " WHERE t.entity IN (".getEntity('societe').")"; $sql .= " AND t.fk_stcomm = st.id"; - if ($mode == 1) $sql .= " AND t.client IN (1, 3)"; - elseif ($mode == 2) $sql .= " AND t.client IN (2, 3)"; - elseif ($mode == 3) $sql .= " AND t.client IN (0)"; - elseif ($mode == 4) $sql .= " AND t.fournisseur IN (1)"; + if ($mode == 1) { + $sql .= " AND t.client IN (1, 3)"; + } elseif ($mode == 2) { + $sql .= " AND t.client IN (2, 3)"; + } elseif ($mode == 3) { + $sql .= " AND t.client IN (0)"; + } elseif ($mode == 4) { + $sql .= " AND t.fournisseur IN (1)"; + } // Select thirdparties of given category if ($category > 0) { - if (!empty($mode) && $mode != 4) { $sql .= " AND c.fk_categorie = ".$this->db->escape($category)." AND c.fk_soc = t.rowid"; } - elseif (!empty($mode) && $mode == 4) { $sql .= " AND cc.fk_categorie = ".$this->db->escape($category)." AND cc.fk_soc = t.rowid"; } - else { $sql .= " AND ((c.fk_categorie = ".$this->db->escape($category)." AND c.fk_soc = t.rowid) OR (cc.fk_categorie = ".$this->db->escape($category)." AND cc.fk_soc = t.rowid))"; } + if (!empty($mode) && $mode != 4) { + $sql .= " AND c.fk_categorie = ".$this->db->escape($category)." AND c.fk_soc = t.rowid"; + } elseif (!empty($mode) && $mode == 4) { + $sql .= " AND cc.fk_categorie = ".$this->db->escape($category)." AND cc.fk_soc = t.rowid"; + } else { + $sql .= " AND ((c.fk_categorie = ".$this->db->escape($category)." AND c.fk_soc = t.rowid) OR (cc.fk_categorie = ".$this->db->escape($category)." AND cc.fk_soc = t.rowid))"; + } } - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; + } //if ($email != NULL) $sql.= " AND s.email = \"".$email."\""; - if ($socids) $sql .= " AND t.rowid IN (".$socids.")"; - if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + if ($socids) { + $sql .= " AND t.rowid IN (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -195,13 +221,11 @@ class Thirdparties extends DolibarrApi } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $soc_static = new Societe($this->db); if ($soc_static->fetch($obj->rowid)) { @@ -235,8 +259,9 @@ class Thirdparties extends DolibarrApi foreach ($request_data as $field => $value) { $this->company->$field = $value; } - if ($this->company->create(DolibarrApiAccess::$user) < 0) + if ($this->company->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors)); + } return $this->company->id; } @@ -264,7 +289,9 @@ class Thirdparties extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'id') continue; + if ($field == 'id') { + continue; + } $this->company->$field = $value; } @@ -295,8 +322,7 @@ class Thirdparties extends DolibarrApi $error = 0; - if ($id == $idtodelete) - { + if ($id == $idtodelete) { throw new RestException(400, 'Try to merge a thirdparty into itself'); } @@ -345,26 +371,26 @@ class Thirdparties extends DolibarrApi 'code_client', 'code_fournisseur', 'code_compta', 'code_compta_fournisseur', 'model_pdf', 'fk_projet' ); - foreach ($listofproperties as $property) - { - if (empty($object->$property)) $object->$property = $soc_origin->$property; + foreach ($listofproperties as $property) { + if (empty($object->$property)) { + $object->$property = $soc_origin->$property; + } } // Concat some data $listofproperties = array( 'note_public', 'note_private' ); - foreach ($listofproperties as $property) - { + foreach ($listofproperties as $property) { $object->$property = dol_concatdesc($object->$property, $soc_origin->$property); } // Merge extrafields - if (is_array($soc_origin->array_options)) - { - foreach ($soc_origin->array_options as $key => $val) - { - if (empty($object->array_options[$key])) $object->array_options[$key] = $val; + if (is_array($soc_origin->array_options)) { + foreach ($soc_origin->array_options as $key => $val) { + if (empty($object->array_options[$key])) { + $object->array_options[$key] = $val; + } } } @@ -378,8 +404,7 @@ class Thirdparties extends DolibarrApi // If thirdparty has a new code that is same than origin, we clean origin code to avoid duplicate key from database unique keys. if ($soc_origin->code_client == $object->code_client || $soc_origin->code_fournisseur == $object->code_fournisseur - || $soc_origin->barcode == $object->barcode) - { + || $soc_origin->barcode == $object->barcode) { dol_syslog("We clean customer and supplier code so we will be able to make the update of target"); $soc_origin->code_client = ''; $soc_origin->code_fournisseur = ''; @@ -389,8 +414,7 @@ class Thirdparties extends DolibarrApi // Update $result = $object->update($object->id, $user, 0, 1, 1, 'merge'); - if ($result < 0) - { + if ($result < 0) { $error++; } @@ -425,8 +449,7 @@ class Thirdparties extends DolibarrApi ); //First, all core objects must update their tables - foreach ($objects as $object_name => $object_file) - { + foreach ($objects as $object_name => $object_file) { require_once DOL_DOCUMENT_ROOT.$object_file; if (!$error && !$object_name::replaceThirdparty($this->db, $soc_origin->id, $object->id)) { @@ -556,7 +579,7 @@ class Thirdparties extends DolibarrApi throw new RestException(401, 'Access to thirdparty '.$id.' not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->company->set_price_level($priceLevel, DolibarrApiAccess::$user); + $result = $this->company->setPriceLevel($priceLevel, DolibarrApiAccess::$user); if ($result <= 0) { throw new RestException(500, 'Error setting new price level for thirdparty '.$id, array($this->company->db->lasterror())); } @@ -584,8 +607,7 @@ class Thirdparties extends DolibarrApi } $result = $this->company->fetch($id); - if (!$result) - { + if (!$result) { throw new RestException(404, 'Thirdparty not found'); } @@ -593,13 +615,11 @@ class Thirdparties extends DolibarrApi $result = $categories->getListForItem($id, 'customer', $sortfield, $sortorder, $limit, $page); - if (is_numeric($result) && $result < 0) - { + if (is_numeric($result) && $result < 0) { throw new RestException(503, 'Error when retrieve category list : '.$categories->error); } - if (is_numeric($result) && $result == 0) // To fix a return of 0 instead of empty array of method getListForItem - { + if (is_numeric($result) && $result == 0) { // To fix a return of 0 instead of empty array of method getListForItem return array(); } @@ -702,8 +722,7 @@ class Thirdparties extends DolibarrApi } $result = $this->company->fetch($id); - if (!$result) - { + if (!$result) { throw new RestException(404, 'Thirdparty not found'); } @@ -711,13 +730,11 @@ class Thirdparties extends DolibarrApi $result = $categories->getListForItem($id, 'supplier', $sortfield, $sortorder, $limit, $page); - if (is_numeric($result) && $result < 0) - { + if (is_numeric($result) && $result < 0) { throw new RestException(503, 'Error when retrieve category list : '.$categories->error); } - if (is_numeric($result) && $result == 0) // To fix a return of 0 instead of empty array of method getListForItem - { + if (is_numeric($result) && $result == 0) { // To fix a return of 0 instead of empty array of method getListForItem return array(); } @@ -1004,9 +1021,13 @@ class Thirdparties extends DolibarrApi $sql = "SELECT f.ref, f.type as factype, re.fk_facture_source, re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc, re.description, re.fk_facture, re.fk_facture_line"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except as re, ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.rowid = re.fk_facture_source AND re.fk_soc = ".$id; - if ($filter == "available") $sql .= " AND re.fk_facture IS NULL AND re.fk_facture_line IS NULL"; - if ($filter == "used") $sql .= " AND (re.fk_facture IS NOT NULL OR re.fk_facture_line IS NOT NULL)"; + $sql .= " WHERE f.rowid = re.fk_facture_source AND re.fk_soc = ".((int) $id); + if ($filter == "available") { + $sql .= " AND re.fk_facture IS NULL AND re.fk_facture_line IS NULL"; + } + if ($filter == "used") { + $sql .= " AND (re.fk_facture IS NOT NULL OR re.fk_facture_line IS NOT NULL)"; + } $sql .= $this->db->order($sortfield, $sortorder); @@ -1137,7 +1158,9 @@ class Thirdparties extends DolibarrApi $sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; $sql .= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib"; - if ($id) $sql .= " WHERE fk_soc = ".$id." "; + if ($id) { + $sql .= " WHERE fk_soc = ".((int) $id); + } $result = $this->db->query($sql); @@ -1150,11 +1173,9 @@ class Thirdparties extends DolibarrApi $accounts = array(); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $account = new CompanyBankAccount($this->db); if ($account->fetch($obj->rowid)) { @@ -1209,8 +1230,9 @@ class Thirdparties extends DolibarrApi $account->$field = $value; } - if ($account->create(DolibarrApiAccess::$user) < 0) + if ($account->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating Company Bank account'); + } if (empty($account->rum)) { require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; @@ -1219,8 +1241,9 @@ class Thirdparties extends DolibarrApi $account->date_rum = dol_now(); } - if ($account->update(DolibarrApiAccess::$user) < 0) + if ($account->update(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error updating values'); + } return $this->_cleanObjectDatas($account); } @@ -1264,8 +1287,9 @@ class Thirdparties extends DolibarrApi $account->date_rum = dol_now(); } - if ($account->update(DolibarrApiAccess::$user) < 0) + if ($account->update(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error updating values'); + } return $this->_cleanObjectDatas($account); } @@ -1290,8 +1314,9 @@ class Thirdparties extends DolibarrApi $account->fetch($bankaccount_id); - if (!$account->socid == $id) + if (!$account->socid == $id) { throw new RestException(401); + } return $account->delete(DolibarrApiAccess::$user); } @@ -1342,8 +1367,12 @@ class Thirdparties extends DolibarrApi $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib"; - if ($id) $sql .= " WHERE fk_soc = ".$id." "; - if ($companybankid) $sql .= " AND rowid = ".$companybankid.""; + if ($id) { + $sql .= " WHERE fk_soc = ".((int) $id); + } + if ($companybankid) { + $sql .= " AND rowid = ".((int) $companybankid); + } $i = 0; $accounts = array(); @@ -1408,8 +1437,10 @@ class Thirdparties extends DolibarrApi * We select all the records that match the socid */ $sql = "SELECT rowid, fk_soc, key_account, site, date_creation, tms FROM ".MAIN_DB_PREFIX."societe_account"; - $sql .= " WHERE fk_soc = $id"; - if ($site) $sql .= " AND site ='$site'"; + $sql .= " WHERE fk_soc = ".((int) $id); + if ($site) { + $sql .= " AND site ='".$this->db->escape($site)."'"; + } $result = $this->db->query($sql); @@ -1422,8 +1453,7 @@ class Thirdparties extends DolibarrApi $accounts = array(); $num = $this->db->num_rows($result); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $account = new SocieteAccount($this->db); @@ -1479,7 +1509,7 @@ class Thirdparties extends DolibarrApi throw new RestException(422, 'Unprocessable Entity: You must pass the site attribute in your request data !'); } - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '".$this->db->escape($request_data['site'])."'"; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".((int) $id)." AND site = '".$this->db->escape($request_data['site'])."'"; $result = $this->db->query($sql); if ($result && $this->db->num_rows($result) == 0) { @@ -1493,8 +1523,9 @@ class Thirdparties extends DolibarrApi $account->$field = $value; } - if ($account->create(DolibarrApiAccess::$user) < 0) + if ($account->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error creating SocieteAccount entity. Ensure that the ID of thirdparty provided does exist!'); + } $this->_cleanObjectDatas($account); @@ -1558,7 +1589,7 @@ class Thirdparties extends DolibarrApi // We found an existing SocieteAccount entity, we are replacing it } else { if (isset($request_data['site']) && $request_data['site'] !== $site) { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '".$this->db->escape($request_data['site'])."' "; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".((int) $id)." AND site = '".$this->db->escape($request_data['site'])."' "; $result = $this->db->query($sql); if ($result && $this->db->num_rows($result) !== 0) { @@ -1582,8 +1613,9 @@ class Thirdparties extends DolibarrApi $account->$field = $value; } - if ($account->update(DolibarrApiAccess::$user) < 0) + if ($account->update(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error updating SocieteAccount entity.'); + } } $this->_cleanObjectDatas($account); @@ -1621,11 +1653,12 @@ class Thirdparties extends DolibarrApi } else { // If the user tries to edit the site member, we check first if if (isset($request_data['site']) && $request_data['site'] !== $site) { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '".$this->db->escape($request_data['site'])."' "; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".((int) $id)." AND site = '".$this->db->escape($request_data['site'])."' "; $result = $this->db->query($sql); - if ($result && $this->db->num_rows($result) !== 0) + if ($result && $this->db->num_rows($result) !== 0) { throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) site member from $site to ".$request_data['site']." but another SocieteAccount entity already exists for this thirdparty with this site key."); + } } $obj = $this->db->fetch_object($result); @@ -1636,8 +1669,9 @@ class Thirdparties extends DolibarrApi $account->$field = $value; } - if ($account->update(DolibarrApiAccess::$user) < 0) + if ($account->update(DolibarrApiAccess::$user) < 0) { throw new RestException(500, 'Error updating SocieteAccount account'); + } $this->_cleanObjectDatas($account); @@ -1703,7 +1737,7 @@ class Thirdparties extends DolibarrApi */ $sql = "SELECT rowid, fk_soc, key_account, site, date_creation, tms"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".((int) $id); $result = $this->db->query($sql); @@ -1713,8 +1747,7 @@ class Thirdparties extends DolibarrApi $i = 0; $num = $this->db->num_rows($result); - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $account = new SocieteAccount($this->db); $account->fetch($obj->rowid); @@ -1781,8 +1814,9 @@ class Thirdparties extends DolibarrApi { $thirdparty = array(); foreach (Thirdparties::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $thirdparty[$field] = $data[$field]; } return $thirdparty; @@ -1812,9 +1846,11 @@ class Thirdparties extends DolibarrApi private function _fetch($rowid, $ref = '', $ref_ext = '', $barcode = '', $idprof1 = '', $idprof2 = '', $idprof3 = '', $idprof4 = '', $idprof5 = '', $idprof6 = '', $email = '', $ref_alias = '') { global $conf; + if (!DolibarrApiAccess::$user->rights->societe->lire) { throw new RestException(401); } + if ($rowid === 0) { $result = $this->company->initAsSpecimen(); } else { diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index f88027b1491..eefb71b6772 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -64,8 +64,7 @@ class Client extends Societe $sql = "SELECT count(s.rowid) as nb, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -75,12 +74,14 @@ class Client extends Societe $sql .= " GROUP BY s.client"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - if ($obj->client == 1 || $obj->client == 3) $this->nb["customers"] += $obj->nb; - if ($obj->client == 2 || $obj->client == 3) $this->nb["prospects"] += $obj->nb; + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + if ($obj->client == 1 || $obj->client == 3) { + $this->nb["customers"] += $obj->nb; + } + if ($obj->client == 2 || $obj->client == 3) { + $this->nb["prospects"] += $obj->nb; + } } $this->db->free($resql); return 1; @@ -101,8 +102,10 @@ class Client extends Societe { global $langs; - $sql = "SELECT id, code, libelle as label, picto FROM ".MAIN_DB_PREFIX."c_stcomm"; - if ($active >= 0) $sql .= " WHERE active = ".$active; + $sql = "SELECT id, code, libelle as label, picto FROM ".MAIN_DB_PREFIX."c_stcomm"; + if ($active >= 0) { + $sql .= " WHERE active = ".((int) $active); + } $resql = $this->db->query($sql); $num = $this->db->num_rows($resql); $i = 0; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index a123fa749c9..3e410019b22 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -84,32 +84,33 @@ class CompanyBankAccount extends Account $error = 0; // Correct default_rib to be sure to have always one default $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib where fk_soc = ".$this->socid." AND default_rib = 1 AND type = 'ban'"; - $result = $this->db->query($sql); - if ($result) - { + $result = $this->db->query($sql); + if ($result) { $numrows = $this->db->num_rows($result); - if ($this->default_rib && $numrows > 0) $this->default_rib = 0; - if (empty($this->default_rib) && $numrows == 0) $this->default_rib = 1; + if ($this->default_rib && $numrows > 0) { + $this->default_rib = 0; + } + if (empty($this->default_rib) && $numrows == 0) { + $this->default_rib = 1; + } } $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, type, datec)"; $sql .= " VALUES (".$this->socid.", 'ban', '".$this->db->idate($now)."')"; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->affected_rows($resql)) - { + if ($resql) { + if ($this->db->affected_rows($resql)) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib"); - if (!$notrigger) - { - // Call trigger + if (!$notrigger) { + // Call trigger $result = $this->call_trigger('COMPANY_RIB_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { return 1; } else { return 0; @@ -136,10 +137,16 @@ class CompanyBankAccount extends Account global $conf; $error = 0; - if (!$this->id) return -1; + if (!$this->id) { + return -1; + } - if (dol_strlen($this->domiciliation) > 255) $this->domiciliation = dol_trunc($this->domiciliation, 254, 'right', 'UTF-8', 1); - if (dol_strlen($this->owner_address) > 255) $this->owner_address = dol_trunc($this->owner_address, 254, 'right', 'UTF-8', 1); + if (dol_strlen($this->domiciliation) > 255) { + $this->domiciliation = dol_trunc($this->domiciliation, 254, 'right', 'UTF-8', 1); + } + if (dol_strlen($this->owner_address) > 255) { + $this->owner_address = dol_trunc($this->owner_address, 254, 'right', 'UTF-8', 1); + } $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET"; $sql .= " bank = '".$this->db->escape($this->bank)."'"; @@ -153,28 +160,28 @@ class CompanyBankAccount extends Account $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= ",default_rib = ".$this->default_rib; - if ($conf->prelevement->enabled) - { + if ($conf->prelevement->enabled) { $sql .= ",frstrecur = '".$this->db->escape($this->frstrecur)."'"; $sql .= ",rum = '".$this->db->escape($this->rum)."'"; $sql .= ",date_rum = ".($this->date_rum ? "'".$this->db->idate($this->date_rum)."'" : "null"); } - if (trim($this->label) != '') + if (trim($this->label) != '') { $sql .= ",label = '".$this->db->escape($this->label)."'"; - else $sql .= ",label = NULL"; + } else { + $sql .= ",label = NULL"; + } $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - if ($result) - { - if (!$notrigger) - { + if ($result) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('COMPANY_RIB_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { return 1; } else { return -1; @@ -199,24 +206,29 @@ class CompanyBankAccount extends Account */ public function fetch($id, $socid = 0, $default = 1, $type = 'ban') { - if (empty($id) && empty($socid)) return -1; + if (empty($id) && empty($socid)) { + return -1; + } $sql = "SELECT rowid, type, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; $sql .= " owner_address, default_rib, label, datec, tms as datem, rum, frstrecur, date_rum"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib"; - if ($id) $sql .= " WHERE rowid = ".$id; - if ($socid) - { - $sql .= " WHERE fk_soc = ".$socid; - if ($default > -1) $sql .= " AND default_rib = ".$this->db->escape($default); - if ($type) $sql .= " AND type ='".$this->db->escape($type)."'"; + if ($id) { + $sql .= " WHERE rowid = ".((int) $id); + } + if ($socid) { + $sql .= " WHERE fk_soc = ".((int) $socid); + if ($default > -1) { + $sql .= " AND default_rib = ".((int) $default); + } + if ($type) { + $sql .= " AND type = '".$this->db->escape($type)."'"; + } } $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->ref = $obj->fk_soc.'-'.$obj->label; // Generate an artificial ref @@ -268,28 +280,26 @@ class CompanyBankAccount extends Account $this->db->begin(); - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('COMPANY_RIB_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; $sql .= " WHERE rowid = ".$this->id; - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -332,10 +342,8 @@ class CompanyBankAccount extends Account dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result1 = $this->db->query($sql1); - if ($result1) - { - if ($this->db->num_rows($result1) == 0) - { + if ($result1) { + if ($this->db->num_rows($result1) == 0) { return 0; } else { $obj = $this->db->fetch_object($result1); @@ -343,17 +351,16 @@ class CompanyBankAccount extends Account $this->db->begin(); $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0"; - $sql2 .= " WHERE type = 'ban' AND fk_soc = ".$obj->fk_soc; + $sql2 .= " WHERE type = 'ban' AND fk_soc = ".((int) $obj->fk_soc); dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result2 = $this->db->query($sql2); $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1"; - $sql3 .= " WHERE rowid = ".$obj->id; + $sql3 .= " WHERE rowid = ".((int) $obj->id); dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result3 = $this->db->query($sql3); - if (!$result2 || !$result3) - { + if (!$result2 || !$result3) { dol_print_error($this->db); $this->db->rollback(); return -1; diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index e88ea0e4f7c..1f11e6a29c3 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -232,8 +232,12 @@ class CompanyPaymentMode extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } } /** @@ -313,8 +317,12 @@ class CompanyPaymentMode extends CommonObject */ public function fetch($id, $ref = null, $socid = 0, $type = '', $morewhere = '') { - if ($socid) $morewhere .= " AND fk_soc = ".$this->db->escape($socid)." AND default_rib = 1"; - if ($type) $morewhere .= " AND type = '".$this->db->escape($type)."'"; + if ($socid) { + $morewhere .= " AND fk_soc = ".((int) $socid)." AND default_rib = 1"; + } + if ($type) { + $morewhere .= " AND type = '".$this->db->escape($type)."'"; + } $result = $this->fetchCommon($id, $ref, $morewhere); //if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines(); @@ -375,7 +383,9 @@ class CompanyPaymentMode extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; $companylink = ''; @@ -386,33 +396,40 @@ class CompanyPaymentMode extends CommonObject $url = dol_buildpath('/monmodule/companypaymentmode_card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowCompanyPaymentMode"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -433,33 +450,36 @@ class CompanyPaymentMode extends CommonObject dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result1 = $this->db->query($sql1); - if ($result1) - { - if ($this->db->num_rows($result1) == 0) - { + if ($result1) { + if ($this->db->num_rows($result1) == 0) { return 0; } else { $obj = $this->db->fetch_object($result1); $type = ''; - if (empty($alltypes)) $type = $obj->type; + if (empty($alltypes)) { + $type = $obj->type; + } $this->db->begin(); $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0, tms = tms"; - $sql2 .= " WHERE default_rib <> 0 AND fk_soc = ".$obj->fk_soc; - if ($type) $sql2 .= " AND type = '".$this->db->escape($type)."'"; + $sql2 .= " WHERE default_rib <> 0 AND fk_soc = ".((int) $obj->fk_soc); + if ($type) { + $sql2 .= " AND type = '".$this->db->escape($type)."'"; + } dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result2 = $this->db->query($sql2); $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1"; - $sql3 .= " WHERE rowid = ".$obj->id; - if ($type) $sql3 .= " AND type = '".$this->db->escape($type)."'"; + $sql3 .= " WHERE rowid = ".((int) $obj->id); + if ($type) { + $sql3 .= " AND type = '".$this->db->escape($type)."'"; + } dol_syslog(get_class($this).'::setAsDefault', LOG_DEBUG); $result3 = $this->db->query($sql3); - if (!$result2 || !$result3) - { + if (!$result2 || !$result3) { dol_print_error($this->db); $this->db->rollback(); return -1; @@ -496,8 +516,7 @@ class CompanyPaymentMode extends CommonObject public function LibStatut($status, $mode = 0) { // phpcs:enable - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled'); @@ -507,7 +526,9 @@ class CompanyPaymentMode extends CommonObject } $statusType = 'status5'; - if ($status == self::STATUS_ENABLED) $statusType = 'status4'; + if ($status == self::STATUS_ENABLED) { + $statusType = 'status4'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -523,30 +544,25 @@ class CompanyPaymentMode extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; diff --git a/htdocs/societe/class/index.html b/htdocs/societe/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9b224200060..9e234559aad 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com> * Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2019-2020 Josep Lluís Amador <joseplluis@lliuretic.cat> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2020 Open-Dsi <support@open-dsi.fr> * * This program is free software; you can redistribute it and/or modify @@ -126,6 +126,33 @@ class Societe extends CommonObject */ public $restrictiononfksoc = 1; + + /** + * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[: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. + * 'picto' is code of a picto to show before value in forms + * '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' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * '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. + */ + /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ @@ -152,17 +179,8 @@ class Societe extends CommonObject 'url' =>array('type'=>'varchar(255)', 'label'=>'Url', 'enabled'=>1, 'visible'=>-1, 'position'=>110), 'email' =>array('type'=>'varchar(128)', 'label'=>'Email', 'enabled'=>1, 'visible'=>-1, 'position'=>115), 'socialnetworks' =>array('type'=>'text', 'label'=>'Socialnetworks', 'enabled'=>1, 'visible'=>-1, 'position'=>120), - /*'skype' =>array('type'=>'varchar(255)', 'label'=>'Skype', 'enabled'=>1, 'visible'=>-1, 'position'=>125), - 'whatsapp' =>array('type'=>'varchar(255)', 'label'=>'Whatsapp', 'enabled'=>1, 'visible'=>-1, 'position'=>130), - 'linkedin' =>array('type'=>'varchar(255)', 'label'=>'Linkedin', 'enabled'=>1, 'visible'=>-1, 'position'=>135), - 'youtube' =>array('type'=>'varchar(255)', 'label'=>'Youtube', 'enabled'=>1, 'visible'=>-1, 'position'=>140), - 'googleplus' =>array('type'=>'varchar(255)', 'label'=>'Googleplus', 'enabled'=>1, 'visible'=>-1, 'position'=>145), - 'snapchat' =>array('type'=>'varchar(255)', 'label'=>'Snapchat', 'enabled'=>1, 'visible'=>-1, 'position'=>150), - 'instagram' =>array('type'=>'varchar(255)', 'label'=>'Instagram', 'enabled'=>1, 'visible'=>-1, 'position'=>155), - 'facebook' =>array('type'=>'varchar(255)', 'label'=>'Facebook', 'enabled'=>1, 'visible'=>-1, 'position'=>160), - 'twitter' =>array('type'=>'varchar(255)', 'label'=>'Twitter', 'enabled'=>1, 'visible'=>-1, 'position'=>165),*/ 'fk_effectif' =>array('type'=>'integer', 'label'=>'Workforce', 'enabled'=>1, 'visible'=>-1, 'position'=>170), - 'fk_typent' =>array('type'=>'integer', 'label'=>'TypeOfCompany', 'enabled'=>1, 'visible'=>-1, 'position'=>175), + 'fk_typent' =>array('type'=>'integer', 'label'=>'TypeOfCompany', 'enabled'=>1, 'visible'=>-1, 'position'=>175, 'csslist'=>'minwidth200'), 'fk_forme_juridique' =>array('type'=>'integer', 'label'=>'JuridicalStatus', 'enabled'=>1, 'visible'=>-1, 'position'=>180), 'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Currency', 'enabled'=>1, 'visible'=>-1, 'position'=>185), 'siren' =>array('type'=>'varchar(128)', 'label'=>'Idprof1', 'enabled'=>1, 'visible'=>-1, 'position'=>190), @@ -213,8 +231,8 @@ class Societe extends CommonObject 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>435), 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>440), 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'Multicurrency code', 'enabled'=>1, 'visible'=>-1, 'position'=>445), - 'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>450), - 'fk_entrepot' =>array('type'=>'integer', 'label'=>'Fk entrepot', 'enabled'=>1, 'visible'=>-1, 'position'=>455), + 'fk_account' =>array('type'=>'integer', 'label'=>'AccountingAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>450), + 'fk_warehouse' =>array('type'=>'integer', 'label'=>'Warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>455), 'logo' =>array('type'=>'varchar(255)', 'label'=>'Logo', 'enabled'=>1, 'visible'=>-1, 'position'=>400), 'logo_squarred' =>array('type'=>'varchar(255)', 'label'=>'Logo squarred', 'enabled'=>1, 'visible'=>-1, 'position'=>401), 'status' =>array('type'=>'tinyint(4)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500), @@ -693,6 +711,15 @@ class Societe extends CommonObject */ public $logo_squarred_mini; + /** + * @var string Accountancy account for sales + */ + public $accountancy_code_sell; + + /** + * @var string Accountancy account for bought + */ + public $accountancy_code_buy; // Multicurrency /** @@ -700,6 +727,12 @@ class Societe extends CommonObject */ public $fk_multicurrency; + // Warehouse + /** + * @var int ID + */ + public $fk_warehouse; + /** * @var string Multicurrency code */ @@ -798,6 +831,9 @@ class Societe extends CommonObject } $this->import_key = trim($this->import_key); + $this->accountancy_code_buy = trim($this->accountancy_code_buy); + $this->accountancy_code_sell= trim($this->accountancy_code_sell); + if (!empty($this->multicurrency_code)) { $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); } @@ -827,9 +863,27 @@ class Societe extends CommonObject if ($result >= 0) { $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, name_alias, entity, datec, fk_user_creat, canvas, status, ref_ext, fk_stcomm, fk_incoterms, location_incoterms ,import_key, fk_multicurrency, multicurrency_code)"; - $sql .= " VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".$this->db->escape($this->entity).", '".$this->db->idate($now)."'"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe ("; + $sql .= "nom"; + $sql .= ", name_alias"; + $sql .= ", entity"; + $sql .= ", datec"; + $sql .= ", fk_typent"; + $sql .= ", fk_user_creat"; + $sql .= ", canvas"; + $sql .= ", status"; + $sql .= ", ref_ext"; + $sql .= ", fk_stcomm"; + $sql .= ", fk_incoterms"; + $sql .= ", location_incoterms"; + $sql .= ", import_key"; + $sql .= ", fk_multicurrency"; + $sql .= ", multicurrency_code"; + $sql .= ", accountancy_code_buy"; + $sql .= ", accountancy_code_sell"; + $sql .= ") VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".$this->db->escape($this->entity).", '".$this->db->idate($now)."'"; $sql .= ", ".(!empty($user->id) ? ((int) $user->id) : "null"); + $sql .= ", ".(!empty($this->typent_id) ? ((int) $this->typent_id) : "null"); $sql .= ", ".(!empty($this->canvas) ? "'".$this->db->escape($this->canvas)."'" : "null"); $sql .= ", ".$this->status; $sql .= ", ".(!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null"); @@ -838,7 +892,10 @@ class Societe extends CommonObject $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null"); $sql .= ", ".(int) $this->fk_multicurrency; - $sql .= ", '".$this->db->escape($this->multicurrency_code)."')"; + $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; + $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); @@ -850,9 +907,8 @@ class Societe extends CommonObject // Ajout du commercial affecte if ($this->commercial_id != '' && $this->commercial_id != -1) { $this->add_commercial($user, $this->commercial_id); - } - // si un commercial cree un client il lui est affecte automatiquement - elseif (empty($user->rights->societe->client->voir)) { + } elseif (empty($user->rights->societe->client->voir)) { + // si un commercial cree un client il lui est affecte automatiquement $this->add_commercial($user, $user->id); } @@ -900,10 +956,18 @@ class Societe extends CommonObject * Create a contact/address from thirdparty * * @param User $user Object user + * @param int $no_email 1=Do not send mailing, 0=Ok to recieve mailling + * @param array $tags Array of tag to affect to contact * @return int <0 if KO, >0 if OK */ - public function create_individual(User $user) + public function create_individual(User $user, $no_email = 0, $tags = array()) { + global $conf; + + $error = 0; + + $this->db->begin(); + // phpcs:enable require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $contact = new Contact($this->db); @@ -921,16 +985,46 @@ class Societe extends CommonObject $contact->email = $this->email; $contact->zip = $this->zip; $contact->town = $this->town; + $this->setUpperOrLowerCase(); $contact->phone_pro = $this->phone; - $result = $contact->create($user); - if ($result < 0) { + $contactId = $contact->create($user); + if ($contactId < 0) { + $error++; $this->error = $contact->error; $this->errors = $contact->errors; dol_syslog(get_class($this)."::create_individual ERROR:".$this->error, LOG_ERR); } - return $result; + if (empty($error) && is_array($tags) && !empty($tags)) { + $result = $contact->setCategories($tags); + if ($result < 0) { + $error++; + $this->error = $contact->error; + $this->errors = array_merge($this->errors, $contact->errors); + dol_syslog(get_class($this) . "::create_individual Affect Tag ERROR:" . $this->error, LOG_ERR); + $contactId = $result; + } + } + + if (empty($error) && !empty($conf->mailing->enabled) && !empty($contact->email) && isset($no_email)) { + $result = $contact->setNoEmail($no_email); + if ($result < 0) { + $this->error = $contact->error; + $this->errors = array_merge($this->errors, $contact->errors); + dol_syslog(get_class($this) . "::create_individual set mailing status ERROR:" . $this->error, LOG_ERR); + $contactId = $result; + } + } + + if (!empty($error)) { + dol_syslog(get_class($this)."::create_individual success"); + $this->db->commit(); + } else { + $this->db->rollback(); + } + + return $contactId; } /** @@ -1193,6 +1287,9 @@ class Societe extends CommonObject $this->webservices_url = $this->webservices_url ?clean_url($this->webservices_url, 0) : ''; $this->webservices_key = trim($this->webservices_key); + $this->accountancy_code_buy = trim($this->accountancy_code_buy); + $this->accountancy_code_sell= trim($this->accountancy_code_sell); + //Incoterms $this->fk_incoterms = (int) $this->fk_incoterms; $this->location_incoterms = trim($this->location_incoterms); @@ -1318,6 +1415,9 @@ class Societe extends CommonObject $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null'); $sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'"; + $sql.= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy)."'"; + $sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'"; + $sql .= ",webservices_url = ".(!empty($this->webservices_url) ? "'".$this->db->escape($this->webservices_url)."'" : "null"); $sql .= ",webservices_key = ".(!empty($this->webservices_key) ? "'".$this->db->escape($this->webservices_key)."'" : "null"); @@ -1477,7 +1577,7 @@ class Societe extends CommonObject } $sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.address, s.datec as date_creation, s.prefix_comm'; - $sql .= ', s.status'; + $sql .= ', s.status, s.fk_warehouse'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_modification, s.fk_user_creat, s.fk_user_modif'; $sql .= ', s.phone, s.fax, s.email'; @@ -1489,6 +1589,7 @@ class Societe extends CommonObject $sql .= ', s.fk_effectif as effectif_id'; $sql .= ', s.fk_forme_juridique as forme_juridique_code'; $sql .= ', s.webservices_url, s.webservices_key'; + $sql .= ', s.accountancy_code_buy, s.accountancy_code_sell'; $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; $sql .= ', s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.transport_mode'; $sql .= ', s.fk_account, s.tva_assuj'; @@ -1502,6 +1603,7 @@ class Societe extends CommonObject $sql .= ', e.libelle as effectif'; $sql .= ', c.code as country_code, c.label as country'; $sql .= ', d.code_departement as state_code, d.nom as state'; + $sql .= ', r.rowid as region_id, r.code_region as region_code'; $sql .= ', st.libelle as stcomm, st.picto as stcomm_picto'; $sql .= ', te.code as typent_code'; $sql .= ', i.libelle as label_incoterms'; @@ -1512,13 +1614,14 @@ class Societe extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcomm as st ON s.fk_stcomm = st.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as fj ON s.fk_forme_juridique = fj.code'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_regions as r ON d.fk_region = r.code_region '; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as te ON s.fk_typent = te.id'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON s.fk_incoterms = i.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM '.MAIN_DB_PREFIX.'societe_remise WHERE fk_soc = s.rowid AND entity IN ('.getEntity('discount').'))'; $sql .= ' WHERE s.entity IN ('.getEntity($this->element).')'; if ($rowid) { - $sql .= ' AND s.rowid = '.$rowid; + $sql .= ' AND s.rowid = '.((int) $rowid); } if ($ref) { $sql .= " AND s.nom = '".$this->db->escape($ref)."'"; @@ -1589,6 +1692,8 @@ class Societe extends CommonObject $this->state_id = $obj->state_id; $this->state_code = $obj->state_code; + $this->region_id = $obj->region_id; + $this->region_code = $obj->region_code; $this->state = ($obj->state != '-' ? $obj->state : ''); $transcode = $langs->trans('StatusProspect'.$obj->fk_stcomm); @@ -1673,6 +1778,9 @@ class Societe extends CommonObject $this->webservices_url = $obj->webservices_url; $this->webservices_key = $obj->webservices_key; + $this->accountancy_code_buy = $obj->accountancy_code_buy; + $this->accountancy_code_sell = $obj->accountancy_code_sell; + $this->outstanding_limit = $obj->outstanding_limit; $this->order_min_amount = $obj->order_min_amount; $this->supplier_order_min_amount = $obj->supplier_order_min_amount; @@ -1680,6 +1788,9 @@ class Societe extends CommonObject // multiprix $this->price_level = $obj->price_level; + // warehouse + $this->fk_warehouse = $obj->fk_warehouse; + $this->import_key = $obj->import_key; //Incoterms @@ -1703,6 +1814,7 @@ class Societe extends CommonObject $this->db->free($resql); } else { $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); $result = -3; } @@ -1795,7 +1907,7 @@ class Societe extends CommonObject } } else { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$tabletodelete; - $sql .= " WHERE fk_soc = ".$id; + $sql .= " WHERE fk_soc = ".((int) $id); if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); @@ -1818,7 +1930,7 @@ class Societe extends CommonObject if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql .= " SET parent = NULL"; - $sql .= " WHERE parent = ".$id; + $sql .= " WHERE parent = ".((int) $id); if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); @@ -1828,7 +1940,7 @@ class Societe extends CommonObject // Remove third party if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe"; - $sql .= " WHERE rowid = ".$id; + $sql .= " WHERE rowid = ".((int) $id); if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); @@ -1873,7 +1985,7 @@ class Societe extends CommonObject $newclient = 3; //If prospect, we keep prospect tag } $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; - $sql .= " SET client = ".$newclient; + $sql .= " SET client = ".((int) $newclient); $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); @@ -2110,7 +2222,7 @@ class Societe extends CommonObject $reparray = array(); - $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut as status, u.entity, u.photo"; + $sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut as status, u.entity, u.photo, u.gender"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u"; if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; @@ -2147,6 +2259,7 @@ class Societe extends CommonObject $reparray[$i]['entity'] = $obj->entity; $reparray[$i]['login'] = $obj->login; $reparray[$i]['photo'] = $obj->photo; + $reparray[$i]['gender'] = $obj->gender; } else { $reparray[] = $obj->rowid; } @@ -2159,7 +2272,6 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set the price level * @@ -2167,15 +2279,14 @@ class Societe extends CommonObject * @param User $user Use making change * @return int <0 if KO, >0 if OK */ - public function set_price_level($price_level, User $user) + public function setPriceLevel($price_level, User $user) { - // phpcs:enable if ($this->id) { $now = dol_now(); $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; - $sql .= " SET price_level = '".$this->db->escape($price_level)."'"; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " SET price_level = ".((int) $price_level); + $sql .= " WHERE rowid = ".((int) $this->id); if (!$this->db->query($sql)) { dol_print_error($this->db); @@ -2184,7 +2295,7 @@ class Societe extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_prices"; $sql .= " (datec, fk_soc, price_level, fk_user_author)"; - $sql .= " VALUES ('".$this->db->idate($now)."', ".$this->id.", '".$this->db->escape($price_level)."', ".$user->id.")"; + $sql .= " VALUES ('".$this->db->idate($now)."', ".$this->id.", ".((int) $price_level).", ".$user->id.")"; if (!$this->db->query($sql)) { dol_print_error($this->db); @@ -2213,7 +2324,7 @@ class Societe extends CommonObject if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux"; - $sql .= " WHERE fk_soc = ".$this->id." AND fk_user =".$commid; + $sql .= " WHERE fk_soc = ".$this->id." AND fk_user = ".((int) $commid); $resql = $this->db->query($sql); if (!$resql) { @@ -2276,7 +2387,7 @@ class Societe extends CommonObject if ($this->id > 0 && $commid > 0) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux "; - $sql .= " WHERE fk_soc = ".$this->id." AND fk_user =".$commid; + $sql .= " WHERE fk_soc = ".$this->id." AND fk_user = ".((int) $commid); if (!$this->db->query($sql)) { dol_syslog(get_class($this)."::del_commercial Erreur"); @@ -2501,6 +2612,38 @@ class Societe extends CommonObject return $result; } + /** + * Return link(s) on type of thirdparty (with picto) + * + * @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only) + * @param string $option ''=All + * @param int $notooltip 1=Disable tooltip + * @return string String with URL + */ + public function getTypeUrl($withpicto = 0, $option = '', $notooltip = 0) + { + global $conf, $langs; + + $s = ''; + if (empty($option) || preg_match('/prospect/', $option)) { + if (($this->client == 2 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { + $s .= '<a class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</a>'; + } + } + if (empty($option) || preg_match('/customer/', $option)) { + if (($this->client == 1 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { + $s .= '<a class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</a>'; + } + } + if (empty($option) || preg_match('/supplier/', $option)) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $this->fournisseur) { + $s .= '<a class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</a>'; + } + } + return $s; + } + + /** * Return label of status (activity, closed) * @@ -3490,7 +3633,7 @@ class Societe extends CommonObject $sql = "SELECT s.rowid, s.nom as name, s.datec as date_creation, tms as date_modification,"; $sql .= " fk_user_creat, fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql .= " WHERE s.rowid = ".$id; + $sql .= " WHERE s.rowid = ".((int) $id); $result = $this->db->query($sql); if ($result) { @@ -3650,11 +3793,14 @@ class Societe extends CommonObject $this->client = 1; // A member is a customer by default $this->code_client = ($customercode ? $customercode : -1); $this->code_fournisseur = -1; + $this->typent_code = ($member->morphy == 'phy' ? 'TE_PRIVATE' : 0); + $this->typent_id = $this->typent_code ? dol_getIdFromCode($this->db, $this->typent_code, 'c_typent', 'id', 'code') : 0; $this->db->begin(); // Cree et positionne $this->id $result = $this->create($user); + if ($result >= 0) { // Auto-create contact on thirdparty creation if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT)) { @@ -3665,8 +3811,8 @@ class Societe extends CommonObject dol_syslog("We ask to create a contact/address too", LOG_DEBUG); $result = $this->create_individual($user); - if ($result < 0) - { + + if ($result < 0) { setEventMessages($this->error, $this->errors, 'errors'); $this->db->rollback(); return -1; @@ -4105,7 +4251,7 @@ class Societe extends CommonObject $table = 'supplier_proposal'; } - $sql = "SELECT rowid, total_ht, total as total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f"; + $sql = "SELECT rowid, total_ht, total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f"; $sql .= " WHERE fk_soc = ".$this->id; if ($mode == 'supplier') { $sql .= " AND entity IN (".getEntity('supplier_proposal').")"; @@ -4260,6 +4406,7 @@ class Societe extends CommonObject * Return label of status customer is prospect/customer * * @return string Label + * @see getTypeUrl() */ public function getLibCustProspStatut() { @@ -4368,45 +4515,7 @@ class Societe extends CommonObject return -1; } - // 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; + return parent::setCategoriesCommon($categories, $type_categ); } /** @@ -4509,7 +4618,7 @@ class Societe extends CommonObject $resql = $db->query($sql); while ($obj = $db->fetch_object($resql)) { - $db->query('DELETE FROM '.MAIN_DB_PREFIX.'societe_commerciaux WHERE rowid = '.$obj->rowid); + $db->query('DELETE FROM '.MAIN_DB_PREFIX.'societe_commerciaux WHERE rowid = '.((int) $obj->rowid)); } /** @@ -4527,4 +4636,56 @@ class Societe extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } + + /** + * Sets an accountancy code for a thirdparty. + * Also calls COMPANY_MODIFY trigger when modified + * + * @param string $type It can be only 'buy' or 'sell' + * @param string $value Accountancy code + * @return int <0 KO >0 OK + */ + public function setAccountancyCode($type, $value) + { + global $user, $langs, $conf; + + $this->db->begin(); + + if ($type == 'buy') { + $field = 'accountancy_code_buy'; + } elseif ($type == 'sell') { + $field = 'accountancy_code_sell'; + } else { + return -1; + } + + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET "; + $sql.= "$field = '".$this->db->escape($value)."'"; + $sql.= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::".__FUNCTION__." sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + + if ($resql) { + // Call triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('COMPANY_MODIFY', $this, $user, $langs, $conf); + if ($result < 0) { + $this->errors=$interface->errors; + $this->db->rollback(); + return -1; + } + // End call triggers + + $this->$field = $value; + + $this->db->commit(); + return 1; + } else { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } } diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index a315044683b..8fbbbbcee6e 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -172,7 +172,9 @@ class SocieteAccount extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0; + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { + $this->fields['rowid']['visible'] = 0; + } } /** @@ -248,7 +250,9 @@ class SocieteAccount extends CommonObject public function fetch($id, $ref = null) { $result = $this->fetchCommon($id, $ref); - if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines(); + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } return $result; } @@ -280,7 +284,7 @@ class SocieteAccount extends CommonObject { $sql = "SELECT sa.key_account as key_account, sa.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_account as sa"; - $sql .= " WHERE sa.fk_soc = ".$id; + $sql .= " WHERE sa.fk_soc = ".((int) $id); $sql .= " AND sa.entity IN (".getEntity('societe').")"; $sql .= " AND sa.site = '".$this->db->escape($site)."' AND sa.status = ".((int) $status); $sql .= " AND sa.key_account IS NOT NULL AND sa.key_account <> ''"; @@ -375,7 +379,9 @@ class SocieteAccount extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -388,33 +394,40 @@ class SocieteAccount extends CommonObject $url = dol_buildpath('/website/websiteaccount_card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("WebsiteAccount"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; return $result; @@ -444,35 +457,49 @@ class SocieteAccount extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) - { + if ($mode == 0) { $prefix = ''; - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } elseif ($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) { + return $langs->trans('Enabled'); + } elseif ($status == 0) { + return $langs->trans('Disabled'); + } + } elseif ($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'); + } } } @@ -487,30 +514,25 @@ class SocieteAccount extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) - { + 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) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 33e483ee757..e348ec33370 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -4,6 +4,7 @@ * Copyright (C) 2013-2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015-2017 Ferran Marcet <fmarcet@2byte.es> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,22 +36,32 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thi // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, '&societe'); $object = new Societe($db); -if ($socid > 0) $object->fetch($socid); +if ($socid > 0) { + $object->fetch($socid); +} // Sort & Order fields $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 = 'dateprint'; +if (!$sortorder) { + $sortorder = 'DESC'; +} +if (!$sortfield) { + $sortfield = 'dateprint'; +} // Search fields $sref = GETPOST("sref"); @@ -59,8 +70,7 @@ $month = GETPOST('month', 'int'); $year = GETPOST('year', 'int'); // Clean up on 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 -{ +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 $sref = ''; $sprod_fulldescr = ''; $year = ''; @@ -83,7 +93,9 @@ $hookmanager->initHooks(array('consumptionthirdparty')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} @@ -96,12 +108,13 @@ $formother = new FormOther($db); $productstatic = new Product($db); $title = $langs->trans("Referers", $object->name); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$title; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$title; +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if (empty($socid)) -{ +if (empty($socid)) { dol_print_error($db); exit; } @@ -118,59 +131,76 @@ print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent tableforfield">'; -if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field -{ +if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } //if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events'); -if ($object->client) -{ +if ($object->client) { print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; } print '</td></tr>'; - $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".$socid; + $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".((int) $socid); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $obj = $db->fetch_object($resql); $nbFactsClient = $obj->nb; $thirdTypeArray['customer'] = $langs->trans("customer"); - if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); - if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); - if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); - if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + if ($conf->propal->enabled && $user->rights->propal->lire) { + $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); + } + if ($conf->commande->enabled && $user->rights->commande->lire) { + $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); + } + if ($conf->facture->enabled && $user->rights->facture->lire) { + $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); + } + if ($conf->contrat->enabled && $user->rights->contrat->lire) { + $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + } } -if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); +if (!empty($conf->ficheinter->enabled) && !empty($user->rights->ficheinter->lire)) { + $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions'); +} -if ($object->fournisseur) -{ +if ($object->fournisseur) { $langs->load("supplier_proposal"); print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); $tmpcheck = $object->check_codefournisseur(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; } print '</td></tr>'; - $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."commande_fournisseur where fk_soc = ".$socid; + $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."commande_fournisseur where fk_soc = ".((int) $socid); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $obj = $db->fetch_object($resql); $nbCmdsFourn = $obj->nb; $thirdTypeArray['supplier'] = $langs->trans("supplier"); - if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); - if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); - if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal'] = $langs->transnoentitiesnoconv('SupplierProposals'); + if (($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) { + $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); + } + if (($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire)) { + $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); + } + if ($conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire) { + $elementTypeArray['supplier_proposal'] = $langs->transnoentitiesnoconv('SupplierProposals'); + } } print '</table>'; @@ -194,103 +224,95 @@ $sql_select = ''; $dateprint = 'f.datep'; $doc_number='f.id'; }*/ -if ($type_element == 'fichinter') -{ // Customer : show products from invoices +if ($type_element == 'fichinter') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $documentstatic = new Fichinter($db); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datec as dateprint, f.fk_statut as status, '; $tables_from = MAIN_DB_PREFIX."fichinter as f LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as d ON d.fk_fichinter = f.rowid"; // Must use left join to work also with option that disable usage of lines. - $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND f.entity = ".$conf->entity; $dateprint = 'f.datec'; $doc_number = 'f.ref'; } -if ($type_element == 'invoice') -{ // Customer : show products from invoices +if ($type_element == 'invoice') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $documentstatic = new Facture($db); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, '; $tables_from = MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."facturedet as d"; - $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_facture = f.rowid"; $where .= " AND f.entity IN (".getEntity('invoice').")"; $dateprint = 'f.datef'; $doc_number = 'f.ref'; $thirdTypeSelect = 'customer'; } -if ($type_element == 'propal') -{ +if ($type_element == 'propal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $documentstatic = new Propal($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.datep as dateprint, c.fk_statut as status, '; $tables_from = MAIN_DB_PREFIX."propal as c,".MAIN_DB_PREFIX."propaldet as d"; - $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_propal = c.rowid"; $where .= " AND c.entity = ".$conf->entity; $datePrint = 'c.datep'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; } -if ($type_element == 'order') -{ +if ($type_element == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $documentstatic = new Commande($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, '; $tables_from = MAIN_DB_PREFIX."commande as c,".MAIN_DB_PREFIX."commandedet as d"; - $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_commande = c.rowid"; $where .= " AND c.entity = ".$conf->entity; $dateprint = 'c.date_commande'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; } -if ($type_element == 'supplier_invoice') -{ // Supplier : Show products from invoices. +if ($type_element == 'supplier_invoice') { // Supplier : Show products from invoices. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $documentstatic = new FactureFournisseur($db); $sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, '; $tables_from = MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."facture_fourn_det as d"; - $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_facture_fourn = f.rowid"; $where .= " AND f.entity = ".$conf->entity; $dateprint = 'f.datef'; $doc_number = 'f.ref'; $thirdTypeSelect = 'supplier'; } -if ($type_element == 'supplier_proposal') -{ +if ($type_element == 'supplier_proposal') { require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; $documentstatic = new SupplierProposal($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, '; $tables_from = MAIN_DB_PREFIX."supplier_proposal as c,".MAIN_DB_PREFIX."supplier_proposaldet as d"; - $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_supplier_proposal = c.rowid"; $where .= " AND c.entity = ".$conf->entity; $dateprint = 'c.date_valid'; $doc_number = 'c.ref'; $thirdTypeSelect = 'supplier'; } -if ($type_element == 'supplier_order') -{ // Supplier : Show products from orders. +if ($type_element == 'supplier_order') { // Supplier : Show products from orders. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $documentstatic = new CommandeFournisseur($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, '; $tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d"; - $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_commande = c.rowid"; $where .= " AND c.entity = ".$conf->entity; $dateprint = 'c.date_valid'; $doc_number = 'c.ref'; $thirdTypeSelect = 'supplier'; } -if ($type_element == 'contract') -{ // Order +if ($type_element == 'contract') { // Order require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic = new Contrat($db); $documentstaticline = new ContratLigne($db); $sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_contrat as dateprint, d.statut as status, '; $tables_from = MAIN_DB_PREFIX."contrat as c,".MAIN_DB_PREFIX."contratdet as d"; - $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid; + $where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid); $where .= " AND d.fk_contrat = c.rowid"; $where .= " AND c.entity = ".$conf->entity; $dateprint = 'c.date_valid'; @@ -301,26 +323,42 @@ if ($type_element == 'contract') $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -if (!empty($sql_select)) -{ +if (!empty($sql_select)) { $sql = $sql_select; $sql .= ' d.description as description,'; - if ($type_element != 'fichinter' && $type_element != 'contract' && $type_element != 'supplier_proposal') $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element == 'supplier_proposal') $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element == 'contract') $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; - if ($type_element != 'fichinter') $sql .= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,'; + if ($type_element != 'fichinter' && $type_element != 'contract' && $type_element != 'supplier_proposal') { + $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element == 'supplier_proposal') { + $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element == 'contract') { + $sql .= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, '; + } + if ($type_element != 'fichinter') { + $sql .= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,'; + } $sql .= " s.rowid as socid "; - if ($type_element != 'fichinter') $sql .= ", p.ref as prod_ref, p.label as product_label"; + if ($type_element != 'fichinter') { + $sql .= ", p.ref as prod_ref, p.label as product_label"; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".$tables_from; - if ($type_element != 'fichinter') $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; + if ($type_element != 'fichinter') { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; + } $sql .= $where; $sql .= dolSqlDateFilter($dateprint, 0, $month, $year); - if ($sref) $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; - if ($sprod_fulldescr) - { + if ($sref) { + $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; + } + if ($sprod_fulldescr) { $sql .= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'"; - if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; - if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'"; + if (GETPOST('type_element') != 'fichinter') { + $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'"; + } + if (GETPOST('type_element') != 'fichinter') { + $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'"; + } $sql .= ")"; } $sql .= $db->order($sortfield, $sortorder); @@ -334,15 +372,14 @@ if (!empty($sql_select)) $disabled = 0; $showempty = 2; -if (empty($elementTypeArray) && !$object->client && !$object->fournisseur) -{ +if (empty($elementTypeArray) && !$object->client && !$object->fournisseur) { $showempty = $langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef"); $disabled = 1; } // Define type of elements $typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled, '', 'maxwidth150onsmartphone'); -$button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; +$button = '<input type="submit" class="button buttonform" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; $param = ''; $param .= "&sref=".urlencode($sref); @@ -354,21 +391,36 @@ $param .= "&type_element=".urlencode($type_element); $total_qty = 0; -if ($sql_select) -{ +if ($sql_select) { $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $num = $db->num_rows($resql); $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($sprod_fulldescr) $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); - if ($sref) $param .= "&sref=".urlencode($sref); - if ($month) $param .= "&month=".urlencode($month); - if ($year) $param .= "&year=".urlencode($year); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($sprod_fulldescr) { + $param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr); + } + if ($sref) { + $param .= "&sref=".urlencode($sref); + } + if ($month) { + $param .= "&month=".urlencode($month); + } + if ($year) { + $param .= "&year=".urlencode($year); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, '', 0, '', '', $limit); @@ -412,8 +464,7 @@ if ($sql_select) $i = 0; - while (($objp = $db->fetch_object($resql)) && $i < min($num, $limit)) - { + while (($objp = $db->fetch_object($resql)) && $i < min($num, $limit)) { $documentstatic->id = $objp->doc_id; $documentstatic->ref = $objp->doc_number; $documentstatic->type = $objp->doc_type; @@ -424,7 +475,9 @@ if ($sql_select) $documentstatic->paye = $objp->paid; $documentstatic->alreadypaid = $objp->paid; - if (is_object($documentstaticline)) $documentstaticline->statut = $objp->status; + if (is_object($documentstaticline)) { + $documentstaticline->statut = $objp->status; + } print '<tr class="oddeven">'; print '<td class="nobordernopadding nowrap" width="100">'; @@ -447,11 +500,12 @@ if ($sql_select) print '<td class="tdoverflowmax300">'; // Define text, description and type - $text = ''; $description = ''; $type = 0; + $text = ''; + $description = ''; + $type = 0; // Code to show product duplicated from commonobject->printObjectLine - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { $product_static = new Product($db); $product_static->type = $objp->fk_product_type; @@ -462,20 +516,21 @@ if ($sql_select) } // Product - if ($objp->fk_product > 0) - { + if ($objp->fk_product > 0) { // Define output language - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { $prod = new Product($db); $prod->fetch($objp->fk_product); $outputlangs = $langs; $newlang = ''; - if (empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if (empty($newlang)) $newlang = $object->default_lang; - if (!empty($newlang)) - { + if (empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if (empty($newlang)) { + $newlang = $object->default_lang; + } + if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } @@ -494,39 +549,40 @@ if ($sql_select) <?php $txt = ''; print img_object($langs->trans("ShowReduc"), 'reduc').' '; - if ($objp->description == '(DEPOSIT)') $txt = $langs->trans("Deposit"); - elseif ($objp->description == '(EXCESS RECEIVED)') $txt = $langs->trans("ExcessReceived"); - elseif ($objp->description == '(EXCESS PAID)') $txt = $langs->trans("ExcessPaid"); + if ($objp->description == '(DEPOSIT)') { + $txt = $langs->trans("Deposit"); + } elseif ($objp->description == '(EXCESS RECEIVED)') { + $txt = $langs->trans("ExcessReceived"); + } elseif ($objp->description == '(EXCESS PAID)') { + $txt = $langs->trans("ExcessPaid"); + } //else $txt=$langs->trans("Discount"); print $txt; ?> </a> <?php - if ($objp->description) - { - if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) - { + if ($objp->description) { + if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); } - if ($objp->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) - { + if ($objp->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) { $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).')'; + if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) { + echo ' ('.dol_print_date($discount->datec).')'; + } } else { echo ($txt ? ' - ' : '').dol_htmlentitiesbr($objp->description); } @@ -539,15 +595,16 @@ if ($sql_select) echo get_date_range($objp->date_start, $objp->date_end); // Add description in form - if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($objp->description) && $objp->description != $objp->product_label) ? '<br>'.dol_htmlentitiesbr($objp->description) : ''; } } else { - if (!empty($objp->label) || !empty($objp->description)) - { - if ($type == 1) $text = img_object($langs->trans('Service'), 'service'); - else $text = img_object($langs->trans('Product'), 'product'); + if (!empty($objp->label) || !empty($objp->description)) { + if ($type == 1) { + $text = img_object($langs->trans('Service'), 'service'); + } else { + $text = img_object($langs->trans('Product'), 'product'); + } if (!empty($objp->label)) { $text .= ' <strong>'.$objp->label.'</strong>'; @@ -583,11 +640,13 @@ if ($sql_select) print '</td>'; //print '<td class="left">'.$prodreftxt.'</td>'; - if ($type_element == 'invoice' && $objp->doc_type == Facture::TYPE_CREDIT_NOTE) $objp->prod_qty = -($objp->prod_qty); - print '<td class="right">'.$objp->prod_qty.'</td>'; + if ($type_element == 'invoice' && $objp->doc_type == Facture::TYPE_CREDIT_NOTE) { + $objp->prod_qty = -($objp->prod_qty); + } + print '<td class="right"><span class="amount">'.$objp->prod_qty.'</span></td>'; $total_qty += $objp->prod_qty; - print '<td class="right">'.price($objp->total_ht).'</td>'; + print '<td class="right"><span class="amount">'.price($objp->total_ht).'</span></td>'; $total_ht += $objp->total_ht; print '<td class="right">'.price($objp->total_ht / (empty($objp->prod_qty) ? 1 : $objp->prod_qty)).'</td>'; @@ -609,9 +668,8 @@ if ($sql_select) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num); } $db->free($resql); -} elseif (empty($type_element) || $type_element == -1) -{ - print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', ''); +} elseif (empty($type_element) || $type_element == -1) { + print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', (!empty($num) ? $num : 0), '', ''); print '<table class="liste centpercent">'."\n"; // Titles with sort buttons diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php index e57c059a633..570d8531efc 100644 --- a/htdocs/societe/contact.php +++ b/htdocs/societe/contact.php @@ -42,12 +42,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +if (!empty($conf->adherent->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +} $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); -if (!empty($conf->categorie->enabled)) $langs->load("categories"); -if (!empty($conf->incoterm->enabled)) $langs->load("incoterm"); -if (!empty($conf->notification->enabled)) $langs->load("mails"); +if (!empty($conf->categorie->enabled)) { + $langs->load("categories"); +} +if (!empty($conf->incoterm->enabled)) { + $langs->load("incoterm"); +} +if (!empty($conf->notification->enabled)) { + $langs->load("mails"); +} $mesg = ''; $error = 0; $errors = array(); @@ -56,8 +64,12 @@ $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm'); $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); -if ($user->socid) $socid = $user->socid; -if (empty($socid) && $action == 'view') $action = 'create'; +if ($user->socid) { + $socid = $user->socid; +} +if (empty($socid) && $action == 'view') { + $action = 'create'; +} $object = new Societe($db); $extrafields = new ExtraFields($db); @@ -68,8 +80,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartycontact', 'globalcard')); -if ($object->fetch($socid) <= 0 && $action == 'view') -{ +if ($object->fetch($socid) <= 0 && $action == 'view') { $langs->load("errors"); print($langs->trans('ErrorRecordNotFound')); exit; @@ -78,8 +89,7 @@ if ($object->fetch($socid) <= 0 && $action == 'view') // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $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('thirdparty', 'card', $canvas); @@ -87,7 +97,9 @@ if (!empty($canvas)) // Security check $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); -if (empty($user->rights->societe->contact->lire)) accessforbidden(); +if (empty($user->rights->societe->contact->lire)) { + accessforbidden(); +} /* @@ -96,15 +108,14 @@ if (empty($user->rights->societe->contact->lire)) accessforbidden(); $parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) - { +if (empty($reshook)) { + if ($cancel) { $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -124,21 +135,26 @@ $formfile = new FormFile($db); $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); -if ($socid > 0 && empty($object->id)) -{ +if ($socid > 0 && empty($object->id)) { $result = $object->fetch($socid); - if ($result <= 0) dol_print_error('', $object->error); + if ($result <= 0) { + dol_print_error('', $object->error); + } } $title = $langs->trans("ThirdParty"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$langs->trans('Card'); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$langs->trans('Card'); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -if (!empty($object->id)) $res = $object->fetch_optionals(); +if (!empty($object->id)) { + $res = $object->fetch_optionals(); +} //if ($res < 0) { dol_print_error($db); exit; } @@ -154,11 +170,9 @@ print dol_get_fiche_end(); print '<br>'; -if ($action != 'presend') -{ +if ($action != 'presend') { // Contacts list - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { $result = show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); } } diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 5c2436b8691..4ed26f67018 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -39,33 +39,34 @@ $confirm = GETPOST('confirm'); $id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); $ref = GETPOST('ref', 'alpha'); -// Security check -if ($user->socid > 0) -{ - unset($action); - $socid = $user->socid; -} -$result = restrictedArea($user, 'societe', $id, '&societe'); - // Get parameters $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 (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; } -if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; } +if (!empty($conf->global->MAIN_DOC_SORT_FIELD)) { + $sortfield = $conf->global->MAIN_DOC_SORT_FIELD; +} +if (!empty($conf->global->MAIN_DOC_SORT_ORDER)) { + $sortorder = $conf->global->MAIN_DOC_SORT_ORDER; +} -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $object = new Societe($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); $upload_dir = $conf->societe->multidir_output[$object->entity]."/".$object->id; @@ -76,12 +77,19 @@ if ($id > 0 || !empty($ref)) $hookmanager->initHooks(array('thirdpartydocument', 'globalcard')); +// Security check +if ($user->socid > 0) { + unset($action); + $socid = $user->socid; +} +$result = restrictedArea($user, 'societe', $object->id, '&societe'); + /* * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -91,16 +99,19 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $form = new Form($db); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Files"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Files"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Files"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = societe_prepare_head($object); $form = new Form($db); @@ -111,8 +122,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -126,16 +136,14 @@ if ($object->id) print '<table class="border tableforfield centpercent">'; // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->client) - { + if ($object->client) { print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -143,11 +151,10 @@ if ($object->id) print '</td></tr>'; } - if ($object->fournisseur) - { + if ($object->fournisseur) { print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); $tmpcheck = $object->check_codefournisseur(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index ddd865521d7..f56beedb64e 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -29,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $hookmanager = new HookManager($db); @@ -38,13 +39,34 @@ $hookmanager->initHooks(array('thirdpartiesindex')); $langs->load("companies"); $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} // Security check $result = restrictedArea($user, 'societe', 0, '', '', '', ''); $thirdparty_static = new Societe($db); +if (!isset($form) || !is_object($form)) { + $form = new Form($db); +} +// Load $resultboxes +$resultboxes = FormOther::getBoxesArea($user, "3"); + +if (GETPOST('addbox')) { + // Add box (when submit is done from a form when ajax disabled) + require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; + $zone = GETPOST('areacode', 'aZ09'); + $userid = GETPOST('userid', 'int'); + $boxorder = GETPOST('boxorder', 'aZ09'); + $boxorder .= GETPOST('boxcombo', 'aZ09'); + $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); + if ($result > 0) { + setEventMessages($langs->trans("BoxAdded"), null); + } +} + /* * View @@ -54,11 +76,8 @@ $transAreaType = $langs->trans("ThirdPartiesArea"); $helpurl = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Terceros'; llxHeader("", $langs->trans("ThirdParties"), $helpurl); -$linkback = ''; -print load_fiche_titre($transAreaType, $linkback, 'companies'); - -print '<div class="fichecenter"><div class="fichethirdleft">'; +print load_fiche_titre($transAreaType, $resultboxes['selectboxlist'], 'companies'); /* @@ -75,37 +94,62 @@ $total = 0; $sql = "SELECT s.rowid, s.client, s.fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; -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; -if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} +if ($socid > 0) { + $sql .= " AND s.rowid = ".((int) $socid); +} +if (!$user->rights->fournisseur->lire) { + $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible +} //print $sql; $result = $db->query($sql); -if ($result) -{ - while ($objp = $db->fetch_object($result)) - { +if ($result) { + while ($objp = $db->fetch_object($result)) { $found = 0; - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { $found = 1; $third['prospect']++; } - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { $found = 1; $third['customer']++; } - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { $found = 1; $third['supplier']++; } - if (!empty($conf->societe->enabled) && $objp->client == 0 && $objp->fournisseur == 0) { $found = 1; $third['other']++; } - if ($found) $total++; + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS) && ($objp->client == 2 || $objp->client == 3)) { + $found = 1; $third['prospect']++; + } + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS) && ($objp->client == 1 || $objp->client == 3)) { + $found = 1; $third['customer']++; + } + if ((($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $objp->fournisseur) { + $found = 1; $third['supplier']++; + } + if (!empty($conf->societe->enabled) && $objp->client == 0 && $objp->fournisseur == 0) { + $found = 1; $third['other']++; + } + if ($found) { + $total++; + } } -} else dol_print_error($db); +} else { + dol_print_error($db); +} -print '<div class="div-table-responsive-no-min">'; -print '<table class="noborder nohover centpercent">'."\n"; -print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>'; -if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + (round($third['customer']) ? 1 : 0) + (round($third['supplier']) ? 1 : 0) + (round($third['other']) ? 1 : 0) >= 2)) -{ - print '<tr><td class="center" colspan="2">'; +$thirdpartygraph = '<div class="div-table-responsive-no-min">'; +$thirdpartygraph .= '<table class="noborder nohover centpercent">'."\n"; +$thirdpartygraph .= '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>'; +if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + (round($third['customer']) ? 1 : 0) + (round($third['supplier']) ? 1 : 0) + (round($third['other']) ? 1 : 0) >= 2)) { + $thirdpartygraph .= '<tr><td class="center" colspan="2">'; $dataseries = array(); - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) $dataseries[] = array($langs->trans("Prospects"), round($third['prospect'])); - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) $dataseries[] = array($langs->trans("Customers"), round($third['customer'])); - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) $dataseries[] = array($langs->trans("Suppliers"), round($third['supplier'])); - if (!empty($conf->societe->enabled)) $dataseries[] = array($langs->trans("Others"), round($third['other'])); + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { + $dataseries[] = array($langs->trans("Prospects"), round($third['prospect'])); + } + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { + $dataseries[] = array($langs->trans("Customers"), round($third['customer'])); + } + if ((($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { + $dataseries[] = array($langs->trans("Suppliers"), round($third['supplier'])); + } + if (!empty($conf->societe->enabled)) { + $dataseries[] = array($langs->trans("Others"), round($third['other'])); + } include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); $dolgraph->SetData($dataseries); @@ -114,71 +158,63 @@ if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) + $dolgraph->SetType(array('pie')); $dolgraph->setHeight('200'); $dolgraph->draw('idgraphthirdparties'); - print $dolgraph->show(); - print '</td></tr>'."\n"; + $thirdpartygraph .= $dolgraph->show(); + $thirdpartygraph .= '</td></tr>'."\n"; } else { - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) - { + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { $statstring = "<tr>"; $statstring .= '<td><a href="'.DOL_URL_ROOT.'/societe/list.php?type=p">'.$langs->trans("Prospects").'</a></td><td class="right">'.round($third['prospect']).'</td>'; $statstring .= "</tr>"; } - if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) - { + if (!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { $statstring .= "<tr>"; $statstring .= '<td><a href="'.DOL_URL_ROOT.'/societe/list.php?type=c">'.$langs->trans("Customers").'</a></td><td class="right">'.round($third['customer']).'</td>'; $statstring .= "</tr>"; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $user->rights->fournisseur->lire) - { + if ((($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) { $statstring2 = "<tr>"; $statstring2 .= '<td><a href="'.DOL_URL_ROOT.'/societe/list.php?type=f">'.$langs->trans("Suppliers").'</a></td><td class="right">'.round($third['supplier']).'</td>'; $statstring2 .= "</tr>"; } - print $statstring; - print $statstring2; + $thirdpartygraph .= $statstring; + $thirdpartygraph .= $statstring2; } -print '<tr class="liste_total"><td>'.$langs->trans("UniqueThirdParties").'</td><td class="right">'; -print $total; -print '</td></tr>'; -print '</table>'; -print '</div>'; +$thirdpartygraph .= '<tr class="liste_total"><td>'.$langs->trans("UniqueThirdParties").'</td><td class="right">'; +$thirdpartygraph .= $total; +$thirdpartygraph .= '</td></tr>'; +$thirdpartygraph .= '</table>'; +$thirdpartygraph .= '</div>'; -if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) -{ +if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe'; - print '<br>'; - - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>'; - print '<tr><td class="center" colspan="2">'; + $thirdpartycateggraph = '<div class="div-table-responsive-no-min">'; + $thirdpartycateggraph .= '<table class="noborder nohover centpercent">'; + $thirdpartycateggraph .= '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Categories").'</th></tr>'; + $thirdpartycateggraph .= '<tr><td class="center" colspan="2">'; $sql = "SELECT c.label, count(*) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; $sql .= " WHERE c.type = 2"; - if (!is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) $sql .= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'"; + if (!is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { + $sql .= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'"; + } $sql .= " AND c.entity IN (".getEntity('category').")"; $sql .= " GROUP BY c.label"; $total = 0; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { $dataseries = array(); $rest = 0; $nbmax = 10; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); - if ($i < $nbmax) - { + if ($i < $nbmax) { $dataseries[] = array($obj->label, round($obj->nb)); } else { $rest += $obj->nb; @@ -186,8 +222,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $total += $obj->nb; $i++; } - if ($i > $nbmax) - { + if ($i > $nbmax) { $dataseries[] = array($langs->trans("Other"), round($rest)); } include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -198,28 +233,25 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $dolgraph->SetType(array('pie')); $dolgraph->setHeight('200'); $dolgraph->draw('idgraphcateg'); - print $dolgraph->show(); + $thirdpartycateggraph .= $dolgraph->show(); } else { - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); - print '<tr class="oddeven"><td>'.$obj->label.'</td><td>'.$obj->nb.'</td></tr>'; + $thirdpartycateggraph .= '<tr class="oddeven"><td>'.$obj->label.'</td><td>'.$obj->nb.'</td></tr>'; $total += $obj->nb; $i++; } } } - print '</td></tr>'; - print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'; - print $total; - print '</td></tr>'; - print '</table>'; - print '</div>'; + $thirdpartycateggraph .= '</td></tr>'; + $thirdpartycateggraph .= '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'; + $thirdpartycateggraph .= $total; + $thirdpartycateggraph .= '</td></tr>'; + $thirdpartycateggraph .= '</table>'; + $thirdpartycateggraph .= '</div>'; } -print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; - /* * Latest modified third parties @@ -234,37 +266,42 @@ $sql .= ", s.logo"; $sql .= ", s.entity"; $sql .= ", s.canvas, s.tms as date_modification, s.status as status"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= ' WHERE s.entity IN ('.getEntity('societe').')'; -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; -if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur != 1 OR s.client != 0)"; +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 = ".((int) $socid); +} +if (!$user->rights->fournisseur->lire) { + $sql .= " AND (s.fournisseur != 1 OR s.client != 0)"; +} $sql .= $db->order("s.tms", "DESC"); $sql .= $db->plimit($max, 0); //print $sql; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - if ($num > 0) - { + if ($num > 0) { $transRecordedType = $langs->trans("LastModifiedThirdParties", $max); - print "\n<!-- last thirdparties modified -->\n"; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder centpercent">'; + $lastmodified = "\n<!-- last thirdparties modified -->\n"; + $lastmodified .= '<div class="div-table-responsive-no-min">'; + $lastmodified .= '<table class="noborder centpercent">'; - print '<tr class="liste_titre"><th colspan="2">'.$transRecordedType.'</th>'; - print '<th>&nbsp;</th>'; - print '<th class="right"><a href="'.DOL_URL_ROOT.'/societe/list.php?sortfield=s.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; - print '</tr>'."\n"; + $lastmodified .= '<tr class="liste_titre"><th colspan="2">'.$transRecordedType.'</th>'; + $lastmodified .= '<th>&nbsp;</th>'; + $lastmodified .= '<th class="right"><a href="'.DOL_URL_ROOT.'/societe/list.php?sortfield=s.tms&sortorder=DESC">'.$langs->trans("FullList").'</th>'; + $lastmodified .= '</tr>'."\n"; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $thirdparty_static->id = $objp->rowid; @@ -282,51 +319,63 @@ if ($result) $thirdparty_static->code_compta_fournisseur = $objp->code_compta_fournisseur; $thirdparty_static->code_compta = $objp->code_compta; - print '<tr class="oddeven">'; + $lastmodified .= '<tr class="oddeven">'; // Name - print '<td class="nowrap tdoverflowmax200">'; - print $thirdparty_static->getNomUrl(1); - print "</td>\n"; + $lastmodified .= '<td class="nowrap tdoverflowmax200">'; + $lastmodified .= $thirdparty_static->getNomUrl(1); + $lastmodified .= "</td>\n"; // Type - print '<td class="center">'; - $obj = $thirdparty_static; - $s = ''; - if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) - { - $s .= '<a class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$thirdparty_static->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</a>'; - } - if (($obj->client == 1 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) - { - $s .= '<a class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$thirdparty_static->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</a>'; - } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) - { - $s .= '<a class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$thirdparty_static->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</a>'; - } - print $s; - print '</td>'; + $lastmodified .= '<td class="center">'; + $lastmodified .= $thirdparty_static->getTypeUrl(); + $lastmodified .= '</td>'; // Last modified date - print '<td class="right tddate">'; - print dol_print_date($thirdparty_static->date_modification, 'day'); - print "</td>"; - print '<td class="right nowrap">'; - print $thirdparty_static->getLibStatut(3); - print "</td>"; - print "</tr>\n"; + $lastmodified .= '<td class="right tddate">'; + $lastmodified .= dol_print_date($thirdparty_static->date_modification, 'day'); + $lastmodified .= "</td>"; + $lastmodified .= '<td class="right nowrap">'; + $lastmodified .= $thirdparty_static->getLibStatut(3); + $lastmodified .= "</td>"; + $lastmodified .= "</tr>\n"; $i++; } $db->free($result); - print "</table>\n"; - print '</div>'; - print "<!-- End last thirdparties modified -->\n"; + $lastmodified .= "</table>\n"; + $lastmodified .= '</div>'; + $lastmodified .= "<!-- End last thirdparties modified -->\n"; } } else { dol_print_error($db); } -print '</div></div></div>'; +//print '</div></div></div>'; + +// boxes +print '<div class="clearboth"></div>'; +print '<div class="fichecenter fichecenterbis">'; + +$boxlist = '<div class="twocolumns">'; + +$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">'; +$boxlist .= $thirdpartygraph; +$boxlist .= '<br>'; +$boxlist .= $thirdpartycateggraph; +$boxlist .= '<br>'; +$boxlist .= $resultboxes['boxlista']; +$boxlist .= '</div>'."\n"; + +$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">'; +$boxlist .= $lastmodified; +$boxlist .= '<br>'; +$boxlist .= $resultboxes['boxlistb']; +$boxlist .= '</div>'."\n"; + +$boxlist .= '</div>'; + +print $boxlist; + +print '</div>'; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardThirdparties', $parameters, $object); // Note that $action and $object may have been modified by hook diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 3a337e3e7f3..f79857d744f 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -50,14 +50,15 @@ $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist'; -if ($contextpage == 'poslist') -{ +if ($contextpage == 'poslist') { $_GET['optioncss'] = 'print'; } // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, ''); $search_all = trim(GETPOST('search_all', 'alphanohtml') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); @@ -93,6 +94,7 @@ $search_categ_cus = trim(GETPOST("search_categ_cus", 'int')); $search_categ_sup = trim(GETPOST("search_categ_sup", 'int')); $search_country = GETPOST("search_country", 'intcomma'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); +$search_price_level = GETPOST('search_prive_level', 'int'); $search_staff = GETPOST("search_staff", 'int'); $search_status = GETPOST("search_status", 'int'); $search_type = GETPOST('search_type', 'alpha'); @@ -112,17 +114,47 @@ $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 (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "s.nom"; -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 or if we select empty mass action +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "s.nom"; +} +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 or if we select empty mass action $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if ($type == 'c') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'customerlist'; if ($search_type == '') $search_type = '1,3'; } -if ($type == 'p') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'prospectlist'; if ($search_type == '') $search_type = '2,3'; } -if ($type == 't') { if (empty($contextpage) || $contextpage == 'poslist') $contextpage = 'poslist'; if ($search_type == '') $search_type = '1,2,3'; } -if ($type == 'f') { if (empty($contextpage) || $contextpage == 'thirdpartylist') $contextpage = 'supplierlist'; if ($search_type == '') $search_type = '4'; } +if ($type == 'c') { + if (empty($contextpage) || $contextpage == 'thirdpartylist') { + $contextpage = 'customerlist'; + } if ($search_type == '') { + $search_type = '1,3'; + } +} +if ($type == 'p') { + if (empty($contextpage) || $contextpage == 'thirdpartylist') { + $contextpage = 'prospectlist'; + } if ($search_type == '') { + $search_type = '2,3'; + } +} +if ($type == 't') { + if (empty($contextpage) || $contextpage == 'poslist') { + $contextpage = 'poslist'; + } if ($search_type == '') { + $search_type = '1,2,3'; + } +} +if ($type == 'f') { + if (empty($contextpage) || $contextpage == 'thirdpartylist') { + $contextpage = 'supplierlist'; + } if ($search_type == '') { + $search_type = '4'; + } +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Societe($db); @@ -153,12 +185,22 @@ $fieldstosearchall = array( 's.phone'=>"Phone", 's.fax'=>"Fax", ); -if (($tmp = $langs->transnoentities("ProfId4".$mysoc->country_code)) && $tmp != "ProfId4".$mysoc->country_code && $tmp != '-') $fieldstosearchall['s.idprof4'] = 'ProfId4'; -if (($tmp = $langs->transnoentities("ProfId5".$mysoc->country_code)) && $tmp != "ProfId5".$mysoc->country_code && $tmp != '-') $fieldstosearchall['s.idprof5'] = 'ProfId5'; -if (($tmp = $langs->transnoentities("ProfId6".$mysoc->country_code)) && $tmp != "ProfId6".$mysoc->country_code && $tmp != '-') $fieldstosearchall['s.idprof6'] = 'ProfId6'; -if (!empty($conf->barcode->enabled)) $fieldstosearchall['s.barcode'] = 'Gencod'; +if (($tmp = $langs->transnoentities("ProfId4".$mysoc->country_code)) && $tmp != "ProfId4".$mysoc->country_code && $tmp != '-') { + $fieldstosearchall['s.idprof4'] = 'ProfId4'; +} +if (($tmp = $langs->transnoentities("ProfId5".$mysoc->country_code)) && $tmp != "ProfId5".$mysoc->country_code && $tmp != '-') { + $fieldstosearchall['s.idprof5'] = 'ProfId5'; +} +if (($tmp = $langs->transnoentities("ProfId6".$mysoc->country_code)) && $tmp != "ProfId6".$mysoc->country_code && $tmp != '-') { + $fieldstosearchall['s.idprof6'] = 'ProfId6'; +} +if (!empty($conf->barcode->enabled)) { + $fieldstosearchall['s.barcode'] = 'Gencod'; +} // Personalized search criterias. Example: $conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS = 's.nom=ThirdPartyName;s.name_alias=AliasNameShort;s.code_client=CustomerCode' -if (!empty($conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS)) $fieldstosearchall = dolExplodeIntoArray($conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS); +if (!empty($conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS)) { + $fieldstosearchall = dolExplodeIntoArray($conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS); +} // Define list of fields to show into list @@ -184,12 +226,12 @@ $arrayfields = array( 's.name_alias'=>array('label'=>"AliasNameShort", 'position'=>3, 'checked'=>1), 's.barcode'=>array('label'=>"Gencod", 'position'=>5, 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled))), 's.code_client'=>array('label'=>"CustomerCodeShort", 'position'=>10, 'checked'=>$checkedcustomercode), - 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), 's.code_compta'=>array('label'=>"CustomerAccountancyCodeShort", 'position'=>13, 'checked'=>$checkedcustomeraccountcode), - 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), 's.address'=>array('label'=>"Address", 'position'=>19, 'checked'=>0), - 's.town'=>array('label'=>"Town", 'position'=>20, 'checked'=>0), - 's.zip'=>array('label'=>"Zip", 'position'=>21, 'checked'=>1), + 's.zip'=>array('label'=>"Zip", 'position'=>20, 'checked'=>1), + 's.town'=>array('label'=>"Town", 'position'=>21, 'checked'=>0), 'state.nom'=>array('label'=>"State", 'position'=>22, 'checked'=>0), 'region.nom'=>array('label'=>"Region", 'position'=>23, 'checked'=>0), 'country.code_iso'=>array('label'=>"Country", 'position'=>24, 'checked'=>0), @@ -198,7 +240,7 @@ $arrayfields = array( 's.phone'=>array('label'=>"Phone", 'position'=>27, 'checked'=>1), 's.fax'=>array('label'=>"Fax", 'position'=>28, 'checked'=>0), 'typent.code'=>array('label'=>"ThirdPartyType", 'position'=>29, 'checked'=>$checkedtypetiers), - 'staff.code'=>array('label'=>"Staff", 'position'=>30, 'checked'=>0), + 'staff.code'=>array('label'=>"Staff", 'position'=>31, 'checked'=>0), 's.siren'=>array('label'=>"ProfId1Short", 'position'=>40, 'checked'=>$checkedprofid1), 's.siret'=>array('label'=>"ProfId2Short", 'position'=>41, 'checked'=>$checkedprofid2), 's.ape'=>array('label'=>"ProfId3Short", 'position'=>42, 'checked'=>$checkedprofid3), @@ -215,6 +257,10 @@ $arrayfields = array( 's.status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 's.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), ); +if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + $arrayfields['s.price_level'] =array('label'=>"PriceLevel", 'position'=>30, 'checked'=>0); +} + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -226,16 +272,14 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if ($action == "change") // Change customer for TakePOS -{ +if ($action == "change") { // Change customer for TakePOS $idcustomer = GETPOST('idcustomer', 'int'); // Check if draft invoice already exists, if not create it $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' AND entity IN (".getEntity('invoice').")"; $result = $db->query($sql); $num_lines = $db->num_rows($result); - if ($num_lines == 0) - { + if ($num_lines == 0) { require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $invoice = new Facture($db); $constforthirdpartyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]; @@ -248,38 +292,42 @@ if ($action == "change") // Change customer for TakePOS $db->query($sql); } - $sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".((int) $idcustomer)." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); ?> - <script> - console.log("Reload page invoice.php with place=<?php print $place; ?>"); - parent.$("#poslines").load("invoice.php?place=<?php print $place; ?>", function() { - //parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight); + <script> + console.log("Reload page invoice.php with place=<?php print $place; ?>"); + parent.$("#poslines").load("invoice.php?place=<?php print $place; ?>", function() { + //parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight); <?php if (!$resql) { ?> alert('Error failed to update customer on draft invoice.'); <?php } ?> - parent.$.colorbox.close(); /* Close the popup */ - }); - </script> - <?php + parent.$.colorbox.close(); /* Close the popup */ + }); + </script> + <?php exit; } -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Selection of new fields include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Did we click on 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 - { + 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_nom = ''; $search_alias = ''; @@ -308,14 +356,15 @@ if (empty($reshook)) $search_idprof6 = ''; $search_vat = ''; $search_type = ''; + $search_prive_level = ''; $search_type_thirdparty = ''; $search_staff = ''; $search_status = -1; $search_stcomm = ''; - $search_level = ''; - $search_parent_name = ''; - $search_import_key = ''; - $toselect = ''; + $search_level = ''; + $search_parent_name = ''; + $search_import_key = ''; + $toselect = ''; $search_array_options = array(); } @@ -324,22 +373,26 @@ if (empty($reshook)) $objectlabel = 'ThirdParty'; $permissiontoread = $user->rights->societe->lire; $permissiontodelete = $user->rights->societe->supprimer; + $permissiontoadd = $user->rights->societe->creer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if ($action == 'setstcomm') - { + if ($action == 'setstcomm') { $object = new Client($db); $result = $object->fetch(GETPOST('stcommsocid')); $object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcomm'); $result = $object->update($object->id, $user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } $action = ''; } } -if ($search_status == '') $search_status = 1; // always display active thirdparty first +if ($search_status == '') { + $search_status = 1; // always display active thirdparty first +} @@ -367,9 +420,15 @@ $prospectstatic->loadCacheOfProspStatus(); $title = $langs->trans("ListOfThirdParties"); -if ($type == 'c' && (empty($search_type) || ($search_type == '1,3'))) $title = $langs->trans("ListOfCustomers"); -if ($type == 'p' && (empty($search_type) || ($search_type == '2,3'))) $title = $langs->trans("ListOfProspects"); -if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) $title = $langs->trans("ListOfSuppliers"); +if ($type == 'c' && (empty($search_type) || ($search_type == '1,3'))) { + $title = $langs->trans("ListOfCustomers"); +} +if ($type == 'p' && (empty($search_type) || ($search_type == '2,3'))) { + $title = $langs->trans("ListOfProspects"); +} +if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) { + $title = $langs->trans("ListOfSuppliers"); +} // Select every potentiels, and note each potentiels which fit in search parameters $tab_level = array(); @@ -378,23 +437,25 @@ $sql .= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $sql .= " WHERE active > 0"; $sql .= " ORDER BY sortorder"; $resql = $db->query($sql); -if ($resql) -{ - while ($obj = $db->fetch_object($resql)) - { +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); + if ($level == $obj->code) { + $level = $langs->trans($obj->label); + } $tab_level[$obj->code] = $level; } -} else dol_print_error($db); +} else { + dol_print_error($db); +} $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.barcode, s.address, s.town, s.zip, s.datec, s.code_client, s.code_fournisseur, s.logo,"; $sql .= " s.entity,"; $sql .= " st.libelle as stcomm, st.picto as stcomm_picto, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql .= " s.email, s.phone, s.fax, s.url, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4 as idprof4, s.idprof5 as idprof5, s.idprof6 as idprof6, s.tva_intra, s.fk_pays,"; $sql .= " s.tms as date_update, s.datec as date_creation,"; -$sql .= " s.code_compta, s.code_compta_fournisseur, s.parent as fk_parent,"; +$sql .= " s.code_compta, s.code_compta_fournisseur, s.parent as fk_parent,s.price_level,"; $sql .= " s2.nom as name2,"; $sql .= " typent.code as typent_code,"; $sql .= " staff.code as staff_code,"; @@ -402,13 +463,21 @@ $sql .= " country.code as country_code, country.label as country_label,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; $sql .= " region.code_region as region_code, region.nom as region_name"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) -if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; +if ($search_sale && $search_sale != '-1') { + $sql .= ", sc.fk_soc, sc.fk_user"; +} // We'll need these fields in order to filter by categ -if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; -if ($search_categ_sup) $sql .= ", cs.fk_categorie, cs.fk_soc"; +if ($search_categ_cus) { + $sql .= ", cc.fk_categorie, cc.fk_soc"; +} +if ($search_categ_sup) { + $sql .= ", cs.fk_categorie, cs.fk_soc"; +} // 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(); @@ -416,77 +485,186 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s2 ON s.parent = s2.rowid"; -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 (s.rowid = ef.fk_object)"; +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 (s.rowid = ef.fk_object)"; +} $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_effectif as staff on (staff.id = s.fk_effectif)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region. code_region = state.fk_region)"; // We'll need this table joined to the select in order to filter by categ -if (!empty($search_categ_cus)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ -if (!empty($search_categ_sup)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ_cus)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ +} +if (!empty($search_categ_sup)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs ON s.rowid = cs.fk_soc"; // We'll need this table joined to the select in order to filter by categ +} $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."c_stcomm as st ON s.fk_stcomm = st.id"; // We'll need this table joined to the select in order to filter by sale -if ($search_sale == -2) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; -elseif ($search_sale || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if ($search_sale == -2) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; + //elseif ($search_sale || (empty($user->rights->societe->client->voir) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->societe->client->readallthirdparties_advance)) && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} elseif (!empty($search_sale) && $search_sale != '-1' || (empty($user->rights->societe->client->voir) && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE s.entity IN (".getEntity('societe').")"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; -if ($search_sale && $search_sale != -2) $sql .= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale -if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible -if ($search_sale == -2) $sql .= " AND sc.fk_user IS NULL"; -elseif ($search_sale) $sql .= " AND sc.fk_user = ".$db->escape($search_sale); -if ($search_categ_cus > 0) $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); -if ($search_categ_sup > 0) $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_sup); -if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL"; -if ($search_categ_sup == -2) $sql .= " AND cs.fk_categorie IS NULL"; +//if (empty($user->rights->societe->client->voir) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->societe->client->readallthirdparties_advance)) && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if (empty($user->rights->societe->client->voir) && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} +if ($search_sale && $search_sale != '-1' && $search_sale != '-2') { + $sql .= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale +} +if (!$user->rights->fournisseur->lire) { + $sql .= " AND (s.fournisseur <> 1 OR s.client <> 0)"; // client=0, fournisseur=0 must be visible +} +if ($search_sale == -2) { + $sql .= " AND sc.fk_user IS NULL"; +} elseif ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".$db->escape($search_sale); +} +if ($search_categ_cus > 0) { + $sql .= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); +} +if ($search_categ_sup > 0) { + $sql .= " AND cs.fk_categorie = ".$db->escape($search_categ_sup); +} +if ($search_categ_cus == -2) { + $sql .= " AND cc.fk_categorie IS NULL"; +} +if ($search_categ_sup == -2) { + $sql .= " AND cs.fk_categorie IS NULL"; +} -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); -if (strlen($search_cti)) $sql .= natural_search('s.phone', $search_cti); +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +} +if (strlen($search_cti)) { + $sql .= natural_search('s.phone', $search_cti); +} -if ($search_id > 0) $sql .= natural_search("s.rowid", $search_id, 1); -if ($search_nom) $sql .= natural_search("s.nom", $search_nom); -if ($search_alias) $sql .= natural_search("s.name_alias", $search_alias); -if ($search_nom_only) $sql .= natural_search("s.nom", $search_nom_only); -if ($search_customer_code) $sql .= natural_search("s.code_client", $search_customer_code); -if ($search_supplier_code) $sql .= natural_search("s.code_fournisseur", $search_supplier_code); -if ($search_account_customer_code) $sql .= natural_search("s.code_compta", $search_account_customer_code); -if ($search_account_supplier_code) $sql .= natural_search("s.code_compta_fournisseur", $search_account_supplier_code); -if ($search_address) $sql.= natural_search('s.address', $search_address); -if ($search_town) $sql .= natural_search("s.town", $search_town); -if (strlen($search_zip)) $sql .= natural_search("s.zip", $search_zip); -if ($search_state) $sql .= natural_search("state.nom", $search_state); -if ($search_region) $sql .= natural_search("region.nom", $search_region); -if ($search_country && $search_country != '-1') $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; -if ($search_email) $sql .= natural_search("s.email", $search_email); -if (strlen($search_phone)) $sql .= natural_search("s.phone", $search_phone); -if (strlen($search_fax)) $sql .= natural_search("s.fax", $search_fax); -if ($search_url) $sql .= natural_search("s.url", $search_url); -if (strlen($search_idprof1)) $sql .= natural_search("s.siren", $search_idprof1); -if (strlen($search_idprof2)) $sql .= natural_search("s.siret", $search_idprof2); -if (strlen($search_idprof3)) $sql .= natural_search("s.ape", $search_idprof3); -if (strlen($search_idprof4)) $sql .= natural_search("s.idprof4", $search_idprof4); -if (strlen($search_idprof5)) $sql .= natural_search("s.idprof5", $search_idprof5); -if (strlen($search_idprof6)) $sql .= natural_search("s.idprof6", $search_idprof6); -if (strlen($search_vat)) $sql .= natural_search("s.tva_intra", $search_vat); +if ($search_id > 0) { + $sql .= natural_search("s.rowid", $search_id, 1); +} +if ($search_nom) { + $sql .= natural_search("s.nom", $search_nom); +} +if ($search_alias) { + $sql .= natural_search("s.name_alias", $search_alias); +} +if ($search_nom_only) { + $sql .= natural_search("s.nom", $search_nom_only); +} +if ($search_customer_code) { + $sql .= natural_search("s.code_client", $search_customer_code); +} +if ($search_supplier_code) { + $sql .= natural_search("s.code_fournisseur", $search_supplier_code); +} +if ($search_account_customer_code) { + $sql .= natural_search("s.code_compta", $search_account_customer_code); +} +if ($search_account_supplier_code) { + $sql .= natural_search("s.code_compta_fournisseur", $search_account_supplier_code); +} +if ($search_address) { + $sql.= natural_search('s.address', $search_address); +} +if ($search_town) { + $sql .= natural_search("s.town", $search_town); +} +if (strlen($search_zip)) { + $sql .= natural_search("s.zip", $search_zip); +} +if ($search_state) { + $sql .= natural_search("state.nom", $search_state); +} +if ($search_region) { + $sql .= natural_search("region.nom", $search_region); +} +if ($search_country && $search_country != '-1') { + $sql .= " AND s.fk_pays IN (".$db->sanitize($search_country).')'; +} +if ($search_email) { + $sql .= natural_search("s.email", $search_email); +} +if (strlen($search_phone)) { + $sql .= natural_search("s.phone", $search_phone); +} +if (strlen($search_fax)) { + $sql .= natural_search("s.fax", $search_fax); +} +if ($search_url) { + $sql .= natural_search("s.url", $search_url); +} +if (strlen($search_idprof1)) { + $sql .= natural_search("s.siren", $search_idprof1); +} +if (strlen($search_idprof2)) { + $sql .= natural_search("s.siret", $search_idprof2); +} +if (strlen($search_idprof3)) { + $sql .= natural_search("s.ape", $search_idprof3); +} +if (strlen($search_idprof4)) { + $sql .= natural_search("s.idprof4", $search_idprof4); +} +if (strlen($search_idprof5)) { + $sql .= natural_search("s.idprof5", $search_idprof5); +} +if (strlen($search_idprof6)) { + $sql .= natural_search("s.idprof6", $search_idprof6); +} +if (strlen($search_vat)) { + $sql .= natural_search("s.tva_intra", $search_vat); +} // Filter on type of thirdparty -if ($search_type > 0 && in_array($search_type, array('1,3', '1,2,3', '2,3'))) $sql .= " AND s.client IN (".$db->sanitize($db->escape($search_type)).")"; -if ($search_type > 0 && in_array($search_type, array('4'))) $sql .= " AND s.fournisseur = 1"; -if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0"; -if ($search_status != '' && $search_status >= 0) $sql .= natural_search("s.status", $search_status, 2); -if (!empty($conf->barcode->enabled) && $search_barcode) $sql .= natural_search("s.barcode", $search_barcode); -if ($search_type_thirdparty && $search_type_thirdparty != '-1') $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2); -if (!empty($search_staff) && $search_staff != '-1') $sql .= natural_search("s.fk_effectif", $search_staff, 2); -if ($search_level) $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3); -if ($search_parent_name) $sql .= natural_search("s2.nom", $search_parent_name); -if ($search_stcomm != '' && $search_stcomm != -2) $sql .= natural_search("s.fk_stcomm", $search_stcomm, 2); -if ($search_import_key) $sql .= natural_search("s.import_key", $search_import_key); +if ($search_type > 0 && in_array($search_type, array('1,3', '1,2,3', '2,3'))) { + $sql .= " AND s.client IN (".$db->sanitize($search_type).")"; +} +if ($search_type > 0 && in_array($search_type, array('4'))) { + $sql .= " AND s.fournisseur = 1"; +} +if ($search_type == '0') { + $sql .= " AND s.client = 0 AND s.fournisseur = 0"; +} +if ($search_status != '' && $search_status >= 0) { + $sql .= natural_search("s.status", $search_status, 2); +} +if (!empty($conf->barcode->enabled) && $search_barcode) { + $sql .= natural_search("s.barcode", $search_barcode); +} +if ($search_prive_level && $search_prive_level != '-1') { + $sql .= natural_search("s.price_level", $search_prive_level, 2); +} +if ($search_type_thirdparty && $search_type_thirdparty > 0) { + $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2); +} +if (!empty($search_staff) && $search_staff != '-1') { + $sql .= natural_search("s.fk_effectif", $search_staff, 2); +} +if ($search_level) { + $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3); +} +if ($search_parent_name) { + $sql .= natural_search("s2.nom", $search_parent_name); +} +if ($search_stcomm != '' && $search_stcomm != -2) { + $sql .= natural_search("s.fk_stcomm", $search_stcomm, 2); +} +if ($search_import_key) { + $sql .= natural_search("s.import_key", $search_import_key); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook if (empty($reshook)) { - if ($socid) $sql .= " AND s.rowid = ".$socid; + if ($socid) { + $sql .= " AND s.rowid = ".$socid; + } } $sql .= $hookmanager->resPrint; @@ -494,12 +672,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -508,8 +684,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; } @@ -540,73 +715,167 @@ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $langs->trans("ThirdParty"), $help_url); $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_all != '') $param = "&sall=".urlencode($search_all); -if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); -if ($search_categ_sup > 0) $param .= '&search_categ_sup='.urlencode($search_categ_sup); -if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); -if ($search_id > 0) $param .= "&search_id=".urlencode($search_id); -if ($search_nom != '') $param .= "&search_nom=".urlencode($search_nom); -if ($search_alias != '') $param .= "&search_alias=".urlencode($search_alias); -if ($search_address != '') $param .= '&search_address=' . urlencode($search_address); -if ($search_town != '') $param .= "&search_town=".urlencode($search_town); -if ($search_zip != '') $param .= "&search_zip=".urlencode($search_zip); -if ($search_phone != '') $param .= "&search_phone=".urlencode($search_phone); -if ($search_fax != '') $param .= "&search_fax=".urlencode($search_fax); -if ($search_email != '') $param .= "&search_email=".urlencode($search_email); -if ($search_url != '') $param .= "&search_url=".urlencode($search_url); -if ($search_state != '') $param .= "&search_state=".urlencode($search_state); -if ($search_country != '') $param .= "&search_country=".urlencode($search_country); -if ($search_customer_code != '') $param .= "&search_customer_code=".urlencode($search_customer_code); -if ($search_supplier_code != '') $param .= "&search_supplier_code=".urlencode($search_supplier_code); -if ($search_account_customer_code != '') $param .= "&search_account_customer_code=".urlencode($search_account_customer_code); -if ($search_account_supplier_code != '') $param .= "&search_account_supplier_code=".urlencode($search_account_supplier_code); -if ($search_barcode != '') $param .= "&search_barcode=".urlencode($search_barcode); -if ($search_idprof1 != '') $param .= '&search_idprof1='.urlencode($search_idprof1); -if ($search_idprof2 != '') $param .= '&search_idprof2='.urlencode($search_idprof2); -if ($search_idprof3 != '') $param .= '&search_idprof3='.urlencode($search_idprof3); -if ($search_idprof4 != '') $param .= '&search_idprof4='.urlencode($search_idprof4); -if ($search_idprof5 != '') $param .= '&search_idprof5='.urlencode($search_idprof5); -if ($search_idprof6 != '') $param .= '&search_idprof6='.urlencode($search_idprof6); -if ($search_vat != '') $param .= '&search_vat='.urlencode($search_vat); -if ($search_type_thirdparty != '') $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); -if ($search_type != '') $param .= '&search_type='.urlencode($search_type); -if (is_array($search_level) && count($search_level)) foreach ($search_level as $slevel) $param .= '&search_level[]='.urlencode($slevel); -if ($search_status != '') $param .= '&search_status='.urlencode($search_status); -if ($search_stcomm != '') $param .= '&search_stcomm='.urlencode($search_stcomm); -if ($search_parent_name != '') $param .= '&search_parent_name='.urlencode($search_parent_name); -if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key); -if ($type != '') $param .= '&type='.urlencode($type); -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +if ($search_all != '') { + $param = "&sall=".urlencode($search_all); +} +if ($search_categ_cus > 0) { + $param .= '&search_categ_cus='.urlencode($search_categ_cus); +} +if ($search_categ_sup > 0) { + $param .= '&search_categ_sup='.urlencode($search_categ_sup); +} +if ($search_sale > 0) { + $param .= '&search_sale='.urlencode($search_sale); +} +if ($search_id > 0) { + $param .= "&search_id=".urlencode($search_id); +} +if ($search_nom != '') { + $param .= "&search_nom=".urlencode($search_nom); +} +if ($search_alias != '') { + $param .= "&search_alias=".urlencode($search_alias); +} +if ($search_address != '') { + $param .= '&search_address=' . urlencode($search_address); +} +if ($search_town != '') { + $param .= "&search_town=".urlencode($search_town); +} +if ($search_zip != '') { + $param .= "&search_zip=".urlencode($search_zip); +} +if ($search_phone != '') { + $param .= "&search_phone=".urlencode($search_phone); +} +if ($search_fax != '') { + $param .= "&search_fax=".urlencode($search_fax); +} +if ($search_email != '') { + $param .= "&search_email=".urlencode($search_email); +} +if ($search_url != '') { + $param .= "&search_url=".urlencode($search_url); +} +if ($search_state != '') { + $param .= "&search_state=".urlencode($search_state); +} +if ($search_country != '') { + $param .= "&search_country=".urlencode($search_country); +} +if ($search_customer_code != '') { + $param .= "&search_customer_code=".urlencode($search_customer_code); +} +if ($search_supplier_code != '') { + $param .= "&search_supplier_code=".urlencode($search_supplier_code); +} +if ($search_account_customer_code != '') { + $param .= "&search_account_customer_code=".urlencode($search_account_customer_code); +} +if ($search_account_supplier_code != '') { + $param .= "&search_account_supplier_code=".urlencode($search_account_supplier_code); +} +if ($search_barcode != '') { + $param .= "&search_barcode=".urlencode($search_barcode); +} +if ($search_idprof1 != '') { + $param .= '&search_idprof1='.urlencode($search_idprof1); +} +if ($search_idprof2 != '') { + $param .= '&search_idprof2='.urlencode($search_idprof2); +} +if ($search_idprof3 != '') { + $param .= '&search_idprof3='.urlencode($search_idprof3); +} +if ($search_idprof4 != '') { + $param .= '&search_idprof4='.urlencode($search_idprof4); +} +if ($search_idprof5 != '') { + $param .= '&search_idprof5='.urlencode($search_idprof5); +} +if ($search_idprof6 != '') { + $param .= '&search_idprof6='.urlencode($search_idprof6); +} +if ($search_vat != '') { + $param .= '&search_vat='.urlencode($search_vat); +} +if ($search_prive_level != '') { + $param .= '&search_prive_level='.urlencode($search_prive_level); +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); +} +if ($search_type != '') { + $param .= '&search_type='.urlencode($search_type); +} +if (is_array($search_level) && count($search_level)) { + foreach ($search_level as $slevel) { + $param .= '&search_level[]='.urlencode($slevel); + } +} +if ($search_status != '') { + $param .= '&search_status='.urlencode($search_status); +} +if ($search_stcomm != '') { + $param .= '&search_stcomm='.urlencode($search_stcomm); +} +if ($search_parent_name != '') { + $param .= '&search_parent_name='.urlencode($search_parent_name); +} +if ($search_import_key != '') { + $param .= '&search_import_key='.urlencode($search_import_key); +} +if ($type != '') { + $param .= '&type='.urlencode($type); +} +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // Show delete result message -if (GETPOST('delsoc')) -{ +if (GETPOST('delsoc')) { setEventMessages($langs->trans("CompanyDeleted", GETPOST('delsoc')), null, 'mesgs'); } // List of mass actions available $arrayofmassactions = array( - 'presend'=>$langs->trans("SendByMail"), -// 'builddoc'=>$langs->trans("PDFMerge"), +'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +// 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); //if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); -if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->societe->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if ($user->rights->societe->creer) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $typefilter = ''; $label = 'MenuNewThirdParty'; -if (!empty($type)) -{ +if (!empty($type)) { $typefilter = '&amp;type='.$type; - if ($type == 'p') $label = 'MenuNewProspect'; - if ($type == 'c') $label = 'MenuNewCustomer'; - if ($type == 'f') $label = 'NewSupplier'; + if ($type == 'p') { + $label = 'MenuNewProspect'; + } + if ($type == 'c') { + $label = 'MenuNewCustomer'; + } + if ($type == 'f') { + $label = 'NewSupplier'; + } } if ($contextpage == 'poslist' && $type == 't' && (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))) { @@ -617,7 +886,9 @@ if ($contextpage == 'poslist' && $type == 't' && (!empty($conf->global->PRODUIT_ // but allow it too, when a user has the rights to create a new customer if ($contextpage != 'poslist') { $url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer); } elseif ($user->rights->societe->creer) { $url = DOL_URL_ROOT.'/societe/card.php?action=create&type=t&contextpage=poslist&optioncss=print&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type=t&contextpage=poslist&nomassaction=1&optioncss=print&place='.$place); @@ -626,7 +897,9 @@ if ($contextpage != 'poslist') { } print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formfilter" autocomplete="off">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; @@ -638,13 +911,13 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sort $langs->load("other"); $textprofid = array(); -foreach (array(1, 2, 3, 4, 5, 6) as $key) -{ +foreach (array(1, 2, 3, 4, 5, 6) as $key) { $label = $langs->transnoentities("ProfId".$key.$mysoc->country_code); $textprofid[$key] = ''; - if ($label != "ProfId".$key.$mysoc->country_code) - { // Get only text between () - if (preg_match('/\((.*)\)/i', $label, $reg)) $label = $reg[1]; + if ($label != "ProfId".$key.$mysoc->country_code) { // Get only text between () + if (preg_match('/\((.*)\)/i', $label, $reg)) { + $label = $reg[1]; + } $textprofid[$key] = $langs->trans("ProfIdShortDesc", $key, $mysoc->country_code, $label); } } @@ -655,47 +928,46 @@ $objecttmp = new Societe($db); $trackid = 'thi'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } // Filter on categories $moreforfilter = ''; -if (empty($type) || $type == 'c' || $type == 'p') -{ - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) - { +if (empty($type) || $type == 'c' || $type == 'p') { + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': '; + $tmptitle = $langs->trans('Categories'); + $moreforfilter .= img_picto($tmptile, 'category', 'class="pictofixedwidth"'); $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $langs->trans('CustomersProspectsCategoriesShort')); - $moreforfilter .= '</div>'; + $moreforfilter .= '</div>'; } } -if (empty($type) || $type == 'f') -{ - if (!empty($conf->fournisseur->enabled) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) - { + +if (empty($type) || $type == 'f') { + if (!empty($conf->fournisseur->enabled) && !empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('SuppliersCategoriesShort').': '; - $moreforfilter .= $formother->select_categories('supplier', $search_categ_sup, 'search_categ_sup', 1); + $tmptitle = $langs->trans('Categories'); + $moreforfilter .= img_picto($tmptilte, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= $formother->select_categories('supplier', $search_categ_sup, 'search_categ_sup', 1, $langs->trans('SuppliersCategoriesShort')); $moreforfilter .= '</div>'; } } // If the user can view prospects other than his' -if ($user->rights->societe->client->voir || $socid) -{ - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('SalesRepresentatives').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300', 1); +if ($user->rights->societe->client->voir || $socid) { + $moreforfilter .= '<div class="divsearchfield">'; + $tmptile = $langs->trans('SalesRepresentatives'); + $moreforfilter .= img_picto($tmptile, 'user', 'class="pictofixedwidth"'); + $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $langs->trans('SalesRepresentatives'), ($conf->dol_optimize_smallscreen ? 'maxwidth200' : 'maxwidth300'), 1); $moreforfilter .= '</div>'; } -if ($moreforfilter) -{ +if ($moreforfilter) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; $parameters = array('type'=>$type); @@ -707,232 +979,215 @@ if ($moreforfilter) $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); +if ($massactionbutton && $contextpage != 'poslist') { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +} -if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hidden" name="type" value="'.$type.'">'; +if (empty($arrayfields['customerorsupplier']['checked'])) { + print '<input type="hidden" name="type" value="'.$type.'">'; +} print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; // Fields title search print '<tr class="liste_titre_filter">'; -if (!empty($arrayfields['s.rowid']['checked'])) -{ +if (!empty($arrayfields['s.rowid']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">'; print '</td>'; } -if (!empty($arrayfields['s.nom']['checked'])) -{ +if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre">'; - if (!empty($search_nom_only) && empty($search_nom)) $search_nom = $search_nom_only; + if (!empty($search_nom_only) && empty($search_nom)) { + $search_nom = $search_nom_only; + } print '<input class="flat searchstring maxwidth75imp" type="text" name="search_nom" value="'.dol_escape_htmltag($search_nom).'">'; print '</td>'; } -if (!empty($arrayfields['s.name_alias']['checked'])) -{ +if (!empty($arrayfields['s.name_alias']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_alias" value="'.dol_escape_htmltag($search_alias).'">'; print '</td>'; } // Barcode -if (!empty($arrayfields['s.barcode']['checked'])) -{ +if (!empty($arrayfields['s.barcode']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_barcode" value="'.dol_escape_htmltag($search_barcode).'">'; print '</td>'; } // Customer code -if (!empty($arrayfields['s.code_client']['checked'])) -{ +if (!empty($arrayfields['s.code_client']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'">'; print '</td>'; } // Supplier code -if (!empty($arrayfields['s.code_fournisseur']['checked'])) -{ +if (!empty($arrayfields['s.code_fournisseur']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_supplier_code" value="'.dol_escape_htmltag($search_supplier_code).'">'; print '</td>'; } // Account Customer code -if (!empty($arrayfields['s.code_compta']['checked'])) -{ +if (!empty($arrayfields['s.code_compta']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_account_customer_code" value="'.dol_escape_htmltag($search_account_customer_code).'">'; print '</td>'; } // Account Supplier code -if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) -{ +if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat maxwidth75imp" type="text" name="search_account_supplier_code" value="'.dol_escape_htmltag($search_account_supplier_code).'">'; print '</td>'; } // Address -if (!empty($arrayfields['s.address']['checked'])) -{ +if (!empty($arrayfields['s.address']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).'">'; print '</td>'; } -// Town -if (!empty($arrayfields['s.town']['checked'])) -{ - print '<td class="liste_titre">'; - print '<input class="flat searchstring maxwidth50imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">'; - print '</td>'; -} // Zip -if (!empty($arrayfields['s.zip']['checked'])) -{ +if (!empty($arrayfields['s.zip']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'">'; print '</td>'; } +// Town +if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="liste_titre">'; + print '<input class="flat searchstring maxwidth50imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'">'; + print '</td>'; +} // State -if (!empty($arrayfields['state.nom']['checked'])) -{ +if (!empty($arrayfields['state.nom']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '</td>'; } // Region -if (!empty($arrayfields['region.nom']['checked'])) -{ +if (!empty($arrayfields['region.nom']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_region" value="'.dol_escape_htmltag($search_region).'">'; print '</td>'; } // Country -if (!empty($arrayfields['country.code_iso']['checked'])) -{ +if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="liste_titre center">'; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print '</td>'; } // Company type -if (!empty($arrayfields['typent.code']['checked'])) -{ +if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'maxwidth75', 1); + // We use showempty=0 here because there is already an unknown value into dictionary. + print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'minwidth50 maxwidth100', 1); + print '</td>'; +} +// Multiprice level +if (!empty($arrayfields['s.price_level']['checked'])) { + print '<td class="liste_titre">'; + print '<input class="flat searchstring maxwidth50imp" type="text" name="search_prive_level" value="'.dol_escape_htmltag($search_prive_level).'">'; print '</td>'; } // Staff -if (!empty($arrayfields['staff.code']['checked'])) -{ +if (!empty($arrayfields['staff.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; print $form->selectarray("search_staff", $formcompany->effectif_array(0), $search_staff, 0, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100', 1); print '</td>'; } -if (!empty($arrayfields['s.email']['checked'])) -{ +if (!empty($arrayfields['s.email']['checked'])) { // Email print '<td class="liste_titre">'; print '<input class="flat searchemail maxwidth50imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).'">'; print '</td>'; } -if (!empty($arrayfields['s.phone']['checked'])) -{ +if (!empty($arrayfields['s.phone']['checked'])) { // Phone print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).'">'; print '</td>'; } -if (!empty($arrayfields['s.fax']['checked'])) -{ +if (!empty($arrayfields['s.fax']['checked'])) { // Fax print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_fax" value="'.dol_escape_htmltag($search_fax).'">'; print '</td>'; } -if (!empty($arrayfields['s.url']['checked'])) -{ +if (!empty($arrayfields['s.url']['checked'])) { // Url print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_url" value="'.dol_escape_htmltag($search_url).'">'; print '</td>'; } -if (!empty($arrayfields['s.siren']['checked'])) -{ +if (!empty($arrayfields['s.siren']['checked'])) { // IdProf1 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">'; print '</td>'; } -if (!empty($arrayfields['s.siret']['checked'])) -{ +if (!empty($arrayfields['s.siret']['checked'])) { // IdProf2 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">'; print '</td>'; } -if (!empty($arrayfields['s.ape']['checked'])) -{ +if (!empty($arrayfields['s.ape']['checked'])) { // IdProf3 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">'; print '</td>'; } -if (!empty($arrayfields['s.idprof4']['checked'])) -{ +if (!empty($arrayfields['s.idprof4']['checked'])) { // IdProf4 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">'; print '</td>'; } -if (!empty($arrayfields['s.idprof5']['checked'])) -{ +if (!empty($arrayfields['s.idprof5']['checked'])) { // IdProf5 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof5" value="'.dol_escape_htmltag($search_idprof5).'">'; print '</td>'; } -if (!empty($arrayfields['s.idprof6']['checked'])) -{ +if (!empty($arrayfields['s.idprof6']['checked'])) { // IdProf6 print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_idprof6" value="'.dol_escape_htmltag($search_idprof6).'">'; print '</td>'; } -if (!empty($arrayfields['s.tva_intra']['checked'])) -{ +if (!empty($arrayfields['s.tva_intra']['checked'])) { // Vat number print '<td class="liste_titre">'; print '<input class="flat searchstring maxwidth50imp" type="text" name="search_vat" value="'.dol_escape_htmltag($search_vat).'">'; print '</td>'; } -// Type (customer/prospect/supplier) -if (!empty($arrayfields['customerorsupplier']['checked'])) -{ +// Nature (customer/prospect/supplier) +if (!empty($arrayfields['customerorsupplier']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; - if ($type != '') print '<input type="hidden" name="type" value="'.$type.'">'; + if ($type != '') { + print '<input type="hidden" name="type" value="'.$type.'">'; + } print $formcompany->selectProspectCustomerType($search_type, 'search_type', 'search_type', 'list'); print '</select></td>'; } // Prospect level -if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) -{ - print '<td class="liste_titre center">'; - print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2); +if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) { + print '<td class="liste_titre center">'; + print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2); print '</td>'; } // Prospect status -if (!empty($arrayfields['s.fk_stcomm']['checked'])) -{ +if (!empty($arrayfields['s.fk_stcomm']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; $arraystcomm = array(); - foreach ($prospectstatic->cacheprospectstatus as $key => $val) - { + foreach ($prospectstatic->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, '', '', 1); print '</td>'; } -if (!empty($arrayfields['s2.nom']['checked'])) -{ +if (!empty($arrayfields['s2.nom']['checked'])) { print '<td class="liste_titre center">'; print '<input class="flat searchstring maxwidth75imp" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">'; print '</td>'; @@ -945,26 +1200,22 @@ $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation -if (!empty($arrayfields['s.datec']['checked'])) -{ +if (!empty($arrayfields['s.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification -if (!empty($arrayfields['s.tms']['checked'])) -{ +if (!empty($arrayfields['s.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Status -if (!empty($arrayfields['s.status']['checked'])) -{ +if (!empty($arrayfields['s.status']['checked'])) { print '<td class="liste_titre center minwidth75imp">'; print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $search_status, 1, 0, 0, '', 0, 0, 0, '', '', 1); print '</td>'; } -if (!empty($arrayfields['s.import_key']['checked'])) -{ +if (!empty($arrayfields['s.import_key']['checked'])) { print '<td class="liste_titre center">'; print '<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).'">'; print '</td>'; @@ -976,57 +1227,129 @@ print $searchpicto; print '</td>'; print "</tr>\n"; - print '<tr class="liste_titre">'; -if (!empty($arrayfields['s.rowid']['checked'])) print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['s.name_alias']['checked'])) print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); -if (!empty($arrayfields['s.barcode']['checked'])) print_liste_field_titre($arrayfields['s.barcode']['label'], $_SERVER["PHP_SELF"], "s.barcode", $param, '', '', $sortfield, $sortorder); -if (!empty($arrayfields['s.code_client']['checked'])) print_liste_field_titre($arrayfields['s.code_client']['label'], $_SERVER["PHP_SELF"], "s.code_client", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.code_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_fournisseur']['label'], $_SERVER["PHP_SELF"], "s.code_fournisseur", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.code_compta']['checked'])) print_liste_field_titre($arrayfields['s.code_compta']['label'], $_SERVER["PHP_SELF"], "s.code_compta", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) print_liste_field_titre($arrayfields['s.code_compta_fournisseur']['label'], $_SERVER["PHP_SELF"], "s.code_compta_fournisseur", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.address']['checked'])) print_liste_field_titre($arrayfields['s.address']['label'], $_SERVER['PHP_SELF'], 's.address', '', $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], "s.town", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], "s.zip", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['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"], "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['staff.code']['checked'])) print_liste_field_titre($arrayfields['staff.code']['label'], $_SERVER["PHP_SELF"], "staff.code", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.phone']['checked'])) print_liste_field_titre($arrayfields['s.phone']['label'], $_SERVER["PHP_SELF"], "s.phone", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.fax']['checked'])) print_liste_field_titre($arrayfields['s.fax']['label'], $_SERVER["PHP_SELF"], "s.fax", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.url']['checked'])) print_liste_field_titre($arrayfields['s.url']['label'], $_SERVER["PHP_SELF"], "s.url", "", $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['s.siren']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"), $textprofid[1], 1, 0), $_SERVER["PHP_SELF"], "s.siren", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.siret']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"), $textprofid[2], 1, 0), $_SERVER["PHP_SELF"], "s.siret", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.ape']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"), $textprofid[3], 1, 0), $_SERVER["PHP_SELF"], "s.ape", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof4", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['s.tva_intra']['checked'])) print_liste_field_titre($arrayfields['s.tva_intra']['label'], $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'nowrap '); -if (!empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer -if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'], $_SERVER["PHP_SELF"], "s.fk_prospectlevel", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'], $_SERVER["PHP_SELF"], "s.fk_stcomm", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['s2.nom']['checked'])) print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER["PHP_SELF"], "s2.nom", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['s.rowid']['checked'])) { + print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['s.name_alias']['checked'])) { + print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); +} +if (!empty($arrayfields['s.barcode']['checked'])) { + print_liste_field_titre($arrayfields['s.barcode']['label'], $_SERVER["PHP_SELF"], "s.barcode", $param, '', '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.code_client']['checked'])) { + print_liste_field_titre($arrayfields['s.code_client']['label'], $_SERVER["PHP_SELF"], "s.code_client", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.code_fournisseur']['checked'])) { + print_liste_field_titre($arrayfields['s.code_fournisseur']['label'], $_SERVER["PHP_SELF"], "s.code_fournisseur", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.code_compta']['checked'])) { + print_liste_field_titre($arrayfields['s.code_compta']['label'], $_SERVER["PHP_SELF"], "s.code_compta", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) { + print_liste_field_titre($arrayfields['s.code_compta_fournisseur']['label'], $_SERVER["PHP_SELF"], "s.code_compta_fournisseur", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.address']['checked'])) { + print_liste_field_titre($arrayfields['s.address']['label'], $_SERVER['PHP_SELF'], 's.address', '', $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], "s.zip", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], "s.town", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['region.nom']['checked'])) { + print_liste_field_titre($arrayfields['region.nom']['label'], $_SERVER["PHP_SELF"], "region.nom", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['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['staff.code']['checked'])) { + print_liste_field_titre($arrayfields['staff.code']['label'], $_SERVER["PHP_SELF"], "staff.code", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['s.price_level']['checked'])) { + print_liste_field_titre($arrayfields['s.price_level']['label'], $_SERVER["PHP_SELF"], "s.price_level", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.email']['checked'])) { + print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.phone']['checked'])) { + print_liste_field_titre($arrayfields['s.phone']['label'], $_SERVER["PHP_SELF"], "s.phone", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.fax']['checked'])) { + print_liste_field_titre($arrayfields['s.fax']['label'], $_SERVER["PHP_SELF"], "s.fax", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.url']['checked'])) { + print_liste_field_titre($arrayfields['s.url']['label'], $_SERVER["PHP_SELF"], "s.url", "", $param, '', $sortfield, $sortorder); +} +if (!empty($arrayfields['s.siren']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"), $textprofid[1], 1, 0), $_SERVER["PHP_SELF"], "s.siren", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.siret']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"), $textprofid[2], 1, 0), $_SERVER["PHP_SELF"], "s.siret", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.ape']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"), $textprofid[3], 1, 0), $_SERVER["PHP_SELF"], "s.ape", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.idprof4']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof4", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.idprof5']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.idprof6']['checked'])) { + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['s.tva_intra']['checked'])) { + print_liste_field_titre($arrayfields['s.tva_intra']['label'], $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'nowrap '); +} +if (!empty($arrayfields['customerorsupplier']['checked'])) { + print_liste_field_titre(''); // type of customer +} +if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) { + print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'], $_SERVER["PHP_SELF"], "s.fk_prospectlevel", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['s.fk_stcomm']['checked'])) { + print_liste_field_titre($arrayfields['s.fk_stcomm']['label'], $_SERVER["PHP_SELF"], "s.fk_stcomm", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['s2.nom']['checked'])) { + print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER["PHP_SELF"], "s2.nom", "", $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); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['s.datec']['checked'])) print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['s.tms']['checked'])) print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['s.status']['checked'])) print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['s.import_key']['checked'])) print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['s.datec']['checked'])) { + print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['s.tms']['checked'])) { + print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['s.status']['checked'])) { + print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['s.import_key']['checked'])) { + print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center '); +} print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "</tr>\n"; $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $companystatic->id = $obj->rowid; @@ -1046,251 +1369,281 @@ while ($i < min($num, $limit)) $companystatic->code_compta_client = $obj->code_compta; $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - $companystatic->fk_prospectlevel = $obj->fk_prospectlevel; - $companystatic->fk_parent = $obj->fk_parent; + $companystatic->fk_prospectlevel = $obj->fk_prospectlevel; + $companystatic->fk_parent = $obj->fk_parent; $companystatic->entity = $obj->entity; print '<tr class="oddeven"'; - if ($contextpage == 'poslist') - { + if ($contextpage == 'poslist') { print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.urlencode($place).'\'"'; } print '>'; - if (!empty($arrayfields['s.rowid']['checked'])) - { + if (!empty($arrayfields['s.rowid']['checked'])) { print '<td class="tdoverflowmax50">'; print $obj->rowid; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { $savalias = $obj->name_alias; - if (!empty($arrayfields['s.name_alias']['checked'])) $companystatic->name_alias = ''; + if (!empty($arrayfields['s.name_alias']['checked'])) { + $companystatic->name_alias = ''; + } print '<td'.(empty($conf->global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').'>'; - if ($contextpage == 'poslist') - { + if ($contextpage == 'poslist') { print $obj->name; } else { print $companystatic->getNomUrl(1, '', 100, 0, 1); } print "</td>\n"; $companystatic->name_alias = $savalias; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.name_alias']['checked'])) - { + if (!empty($arrayfields['s.name_alias']['checked'])) { print '<td class="tdoverflowmax200">'; print $companystatic->name_alias; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Barcode - if (!empty($arrayfields['s.barcode']['checked'])) - { + if (!empty($arrayfields['s.barcode']['checked'])) { print '<td>'.$obj->barcode.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Customer code - if (!empty($arrayfields['s.code_client']['checked'])) - { + if (!empty($arrayfields['s.code_client']['checked'])) { print '<td class="nowraponall">'.$obj->code_client.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Supplier code - if (!empty($arrayfields['s.code_fournisseur']['checked'])) - { + if (!empty($arrayfields['s.code_fournisseur']['checked'])) { print '<td class="nowraponall">'.$obj->code_fournisseur.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Account customer code - if (!empty($arrayfields['s.code_compta']['checked'])) - { + if (!empty($arrayfields['s.code_compta']['checked'])) { print '<td>'.$obj->code_compta.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Account supplier code - if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) - { + if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) { print '<td>'.$obj->code_compta_fournisseur.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Address - if (!empty($arrayfields['s.address']['checked'])) - { + if (!empty($arrayfields['s.address']['checked'])) { print '<td>'.$obj->address.'</td>'; - if (!$i) $totalarray['nbfield']++; - } - // Town - if (!empty($arrayfields['s.town']['checked'])) - { - print "<td>".$obj->town."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print "<td>".$obj->zip."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Town + if (!empty($arrayfields['s.town']['checked'])) { + print "<td>".$obj->town."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "<td>".$obj->state_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Region - if (!empty($arrayfields['region.nom']['checked'])) - { + if (!empty($arrayfields['region.nom']['checked'])) { print "<td>".$obj->region_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="center tdoverflowmax100">'; $labelcountry = ($obj->country_code && ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)) ? $langs->trans("Country".$obj->country_code) : $obj->country_label; print $labelcountry; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="center">'; - if (!is_array($typenArray) || count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (!is_array($typenArray) || count($typenArray) == 0) { + $typenArray = $formcompany->typent_array(1); + } print $typenArray[$obj->typent_code]; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Multiprice level + if (!empty($arrayfields['s.price_level']['checked'])) { + print '<td class="center">'.$obj->price_level."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Staff - if (!empty($arrayfields['staff.code']['checked'])) - { + if (!empty($arrayfields['staff.code']['checked'])) { print '<td class="center">'; - if (!is_array($staffArray) || count($staffArray) == 0) $staffArray = $formcompany->effectif_array(1); + if (!is_array($staffArray) || count($staffArray) == 0) { + $staffArray = $formcompany->effectif_array(1); + } print $staffArray[$obj->staff_code]; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.email']['checked'])) - { + if (!empty($arrayfields['s.email']['checked'])) { print '<td class="tdoverflowmax150">'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 0, 0, 1)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.phone']['checked'])) - { - print "<td>".dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL')."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['s.phone']['checked'])) { + print '<td class="nowraponall">'.dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.fax']['checked'])) - { - print "<td>".dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL')."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['s.fax']['checked'])) { + print '<td class="nowraponall">'.dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'fax')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.url']['checked'])) - { - print "<td>".$obj->url."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['s.url']['checked'])) { + print "<td>".dol_print_url($obj->url, '', '', 1)."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.siren']['checked'])) - { + if (!empty($arrayfields['s.siren']['checked'])) { print "<td>".$obj->idprof1."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.siret']['checked'])) - { + if (!empty($arrayfields['s.siret']['checked'])) { print "<td>".$obj->idprof2."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.ape']['checked'])) - { + if (!empty($arrayfields['s.ape']['checked'])) { print "<td>".$obj->idprof3."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.idprof4']['checked'])) - { + if (!empty($arrayfields['s.idprof4']['checked'])) { print "<td>".$obj->idprof4."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.idprof5']['checked'])) - { + if (!empty($arrayfields['s.idprof5']['checked'])) { print "<td>".$obj->idprof5."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.idprof6']['checked'])) - { + if (!empty($arrayfields['s.idprof6']['checked'])) { print "<td>".$obj->idprof6."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // VAT - if (!empty($arrayfields['s.tva_intra']['checked'])) - { + if (!empty($arrayfields['s.tva_intra']['checked'])) { print "<td>"; print $obj->tva_intra; - if ($obj->tva_intra && !isValidVATID($companystatic)) - { + if ($obj->tva_intra && !isValidVATID($companystatic)) { print img_warning("BadVATNumber", '', ''); } print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type - if (!empty($arrayfields['customerorsupplier']['checked'])) - { + if (!empty($arrayfields['customerorsupplier']['checked'])) { print '<td class="center">'; - $s = ''; - if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) - { - $s .= '<a class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</a>'; - } - if (($obj->client == 1 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) - { - $s .= '<a class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</a>'; - } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) - { - $s .= '<a class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$companystatic->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</a>'; - } - print $s; + print $companystatic->getTypeUrl(1); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) - { + if (!empty($arrayfields['s.fk_prospectlevel']['checked'])) { // Prospect level print '<td class="center">'; print $companystatic->getLibProspLevel(); print "</td>"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.fk_stcomm']['checked'])) - { + if (!empty($arrayfields['s.fk_stcomm']['checked'])) { // Prospect status print '<td class="center nowrap"><div class="nowrap">'; print '<div class="inline-block">'.$companystatic->LibProspCommStatut($obj->stcomm_id, 2, $prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto); print '</div> - <div class="inline-block">'; - foreach ($prospectstatic->cacheprospectstatus as $key => $val) - { + foreach ($prospectstatic->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 '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?stcommsocid='.$obj->rowid.'&stcomm='.$val['code'].'&action=setstcomm&token='.newToken().$param.($page ? '&page='.urlencode($page) : '').'">'.img_action($titlealt, $val['code'], $val['picto']).'</a>'; + 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 '<a class="pictosubstatus" href="'.$_SERVER["PHP_SELF"].'?stcommsocid='.$obj->rowid.'&stcomm='.$val['code'].'&action=setstcomm&token='.newToken().$param.($page ? '&page='.urlencode($page) : '').'">'.img_action($titlealt, $val['code'], $val['picto']).'</a>'; + } } print '</div></div></td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Parent company - if (!empty($arrayfields['s2.nom']['checked'])) - { + if (!empty($arrayfields['s2.nom']['checked'])) { print '<td class="center tdoverflowmax100">'; - if ($companystatic->fk_parent > 0) - { + if ($companystatic->fk_parent > 0) { $companyparent->fetch($companystatic->fk_parent); print $companyparent->getNomUrl(1); } print "</td>"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; @@ -1299,55 +1652,65 @@ while ($i < min($num, $limit)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['s.datec']['checked'])) - { + if (!empty($arrayfields['s.datec']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['s.tms']['checked'])) - { + if (!empty($arrayfields['s.tms']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['s.status']['checked'])) - { + if (!empty($arrayfields['s.status']['checked'])) { print '<td class="center nowrap">'.$companystatic->getLibStatut(5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['s.import_key']['checked'])) - { + if (!empty($arrayfields['s.import_key']['checked'])) { print '<td class="tdoverflowmax100">'; print $obj->import_key; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column (Show the massaction button only when this page is not opend from the Extended POS) print '<td class="nowrap center">'; - 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 - { + 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 $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; $i++; } // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 516fb95e464..2ebe97848f2 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -33,19 +33,25 @@ $action = GETPOST('action', 'aZ09'); $langs->load("companies"); -// Security check $id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); -if ($user->socid) $id = $user->socid; -$result = restrictedArea($user, 'societe', $id, '&societe'); $object = new Societe($db); -if ($id > 0) $object->fetch($id); +if ($id > 0) { + $object->fetch($id); +} $permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartynote', 'globalcard')); +// Security check +if ($user->socid > 0) { + unset($action); + $socid = $user->socid; +} +$result = restrictedArea($user, 'societe', $object->id, '&societe'); + /* * Actions @@ -61,16 +67,19 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, $form = new Form($db); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Notes"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Notes"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Notes"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($object->id > 0) -{ +if ($object->id > 0) { /* - * Affichage onglets - */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); + * Affichage onglets + */ + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = societe_prepare_head($object); @@ -89,32 +98,31 @@ if ($object->id > 0) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent tableforfield">'; - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="'.$cssclass.'">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->client) { - print '<tr><td class="'.$cssclass.'">'; - print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - } - print '</td></tr>'; - } + if ($object->client) { + print '<tr><td class="'.$cssclass.'">'; + print $langs->trans('CustomerCode').'</td><td colspan="3">'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); + $tmpcheck = $object->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; + } + print '</td></tr>'; + } - if ($object->fournisseur) { - print '<tr><td class="'.$cssclass.'">'; - print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } - print '</td></tr>'; - } + if ($object->fournisseur) { + print '<tr><td class="'.$cssclass.'">'; + print $langs->trans('SupplierCode').'</td><td colspan="3">'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } + print '</td></tr>'; + } print "</table>"; diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 665039c6bc0..55ae070363a 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php'; -$langs->loadLangs(array("companies", "mails", "admin", "other")); +$langs->loadLangs(array("companies", "mails", "admin", "other", "errors")); $socid = GETPOST("socid", 'int'); $action = GETPOST('action', 'aZ09'); @@ -39,16 +39,24 @@ $actionid = GETPOST('actionid'); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', '', ''); $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 (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "n.daten"; -if (empty($page) || $page == -1) { $page = 0; } +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "n.daten"; +} +if (empty($page) || $page == -1) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -68,39 +76,34 @@ $hookmanager->initHooks(array('thirdpartynotification', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; // Add a notification - if ($action == 'add') - { - if (empty($contactid)) - { + if ($action == 'add') { + if (empty($contactid)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors'); $error++; } - if ($actionid <= 0) - { + if ($actionid <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors'); $error++; } - if (!$error) - { + if (!$error) { $db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; $sql .= " WHERE fk_soc=".$socid." AND fk_contact=".$contactid." AND fk_action=".$actionid; - if ($db->query($sql)) - { + if ($db->query($sql)) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_soc, fk_contact, fk_action)"; $sql .= " VALUES ('".$db->idate($now)."',".$socid.",".$contactid.",".$actionid.")"; - if (!$db->query($sql)) - { + if (!$db->query($sql)) { $error++; dol_print_error($db); } @@ -108,8 +111,7 @@ if (empty($reshook)) dol_print_error($db); } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -118,8 +120,7 @@ if (empty($reshook)) } // Remove a notification - if ($action == 'delete') - { + if ($action == 'delete') { $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".GETPOST('actid', 'int'); $db->query($sql); } @@ -137,13 +138,15 @@ $object = new Societe($db); $result = $object->fetch($socid); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Notification"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Notification"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; + llxHeader('', $title, $help_url); -if ($result > 0) -{ +if ($result > 0) { $langs->load("other"); $head = societe_prepare_head($object); @@ -160,44 +163,43 @@ if ($result > 0) print '<table class="border centpercent tableforfield">'; // Prefix - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->client) { - print '<tr><td class="titlefield">'; - print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - } - print '</td></tr>'; - } + if ($object->client) { + print '<tr><td class="titlefield">'; + print $langs->trans('CustomerCode').'</td><td colspan="3">'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); + $tmpcheck = $object->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; + } + print '</td></tr>'; + } - if (!empty($conf->fournisseur->enabled) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { - print '<tr><td class="titlefield">'; - print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } - print '</td></tr>'; - } + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { + print '<tr><td class="titlefield">'; + print $langs->trans('SupplierCode').'</td><td colspan="3">'; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } + print '</td></tr>'; + } /*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty - print '<td colspan="3">'; - $nbofrecipientemails=0; - $notify=new Notify($db); - $tmparray = $notify->getNotificationsArray('', $object->id, null, 0, array('thirdparty')); - foreach($tmparray as $tmpkey => $tmpval) - { - if (! empty($tmpkey)) $nbofrecipientemails++; - } - print $nbofrecipientemails; - print '</td></tr>';*/ + print '<td colspan="3">'; + $nbofrecipientemails=0; + $notify=new Notify($db); + $tmparray = $notify->getNotificationsArray('', $object->id, null, 0, array('thirdparty')); + foreach($tmparray as $tmpkey => $tmpval) + { + if (! empty($tmpkey)) $nbofrecipientemails++; + } + print $nbofrecipientemails; + print '</td></tr>';*/ print '</table>'; @@ -208,72 +210,15 @@ if ($result > 0) print "\n"; // Help - print '<div class="opacitymedium">'; + print '<div class="opacitymedium hideonsmartphone">'; print $langs->trans("NotificationsDesc"); print '<br>'.$langs->trans("NotificationsDescUser"); print '<br>'.$langs->trans("NotificationsDescContact"); print '<br>'.$langs->trans("NotificationsDescGlobal"); + print '<br>'; print '</div>'; - print '<br><br>'."\n"; - - - // Add notification form - print load_fiche_titre($langs->trans("AddNewNotification"), '', ''); - - print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$socid.'" method="post">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="add">'; - - $param = "&socid=".$socid; - - // Line with titles - print '<table width="100%" class="noborder">'; - print '<tr class="liste_titre">'; - print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder); - print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder); - print_liste_field_titre(''); - print "</tr>\n"; - - $var = false; - $listofemails = $object->thirdparty_and_contact_email_array(); - if (count($listofemails) > 0) - { - $actions = array(); - - // Load array of available notifications - $notificationtrigger = new InterfaceNotification($db); - $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents(); - - foreach ($listofmanagedeventfornotification as $managedeventfornotification) - { - $label = ($langs->trans("Notify_".$managedeventfornotification['code']) != "Notify_".$managedeventfornotification['code'] ? $langs->trans("Notify_".$managedeventfornotification['code']) : $managedeventfornotification['label']); - $actions[$managedeventfornotification['rowid']] = $label; - } - print '<tr class="oddeven nohover"><td class="maxwidthonsmartphone">'; - print img_picto('', 'contact', '', false, 0, 0, '', 'paddingright').$form->selectarray("contactid", $listofemails, '', 0, 0, 0, '', 0, 0, 0, '', 'maxwidthonsmartphone'); - print '</td>'; - print '<td class="maxwidthonsmartphone">'; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidthonsmartphone'); - print '</td>'; - print '<td>'; - $type = array('email'=>$langs->trans("EMail")); - print $form->selectarray("typeid", $type); - print '</td>'; - print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; - print '</tr>'; - } else { - print '<tr class="oddeven"><td colspan="4" class="opacitymedium">'; - print $langs->trans("YouMustCreateContactFirst"); - print '</td></tr>'; - } - - print '</table>'; - - - print '</form>'; - print '<br>'; + print '<br>'."\n"; // List of notifications enabled for contacts @@ -288,60 +233,99 @@ if ($result > 0) $sql .= " AND c.fk_soc = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); } else { dol_print_error($db); } - // List of active notifications + + // Add notification form print load_fiche_titre($langs->trans("ListOfActiveNotifications").' <span class="opacitymedium colorblack paddingleft">('.$num.')</span>', '', ''); + print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$socid.'" method="post">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="add">'; + + $param = "&socid=".$socid; + // Line with titles - print '<table width="100%" class="noborder">'; + print '<div class="div-table-responsive-no-min">'; + print '<table class="centpercent noborder">'; print '<tr class="liste_titre">'; print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder); print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder); - print_liste_field_titre('', '', ''); - print '</tr>'; + print_liste_field_titre(''); + print "</tr>\n"; - $langs->load("errors"); - $langs->load("other"); + // Line to add a new subscription + $listofemails = $object->thirdparty_and_contact_email_array(); + if (count($listofemails) > 0) { + $actions = array(); - if ($num) - { + // Load array of available notifications + $notificationtrigger = new InterfaceNotification($db); + $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents(); + + foreach ($listofmanagedeventfornotification as $managedeventfornotification) { + $label = ($langs->trans("Notify_".$managedeventfornotification['code']) != "Notify_".$managedeventfornotification['code'] ? $langs->trans("Notify_".$managedeventfornotification['code']) : $managedeventfornotification['label']); + $actions[$managedeventfornotification['rowid']] = $label; + } + print '<tr class="oddeven nohover">'; + print '<td class="nowraponall">'; + print img_picto('', 'contact', '', false, 0, 0, '', 'paddingright').$form->selectarray("contactid", $listofemails, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone'); + print '</td>'; + print '<td class="nowraponall">'; + print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone'); + print '</td>'; + print '<td>'; + $type = array('email'=>$langs->trans("EMail")); + print $form->selectarray("typeid", $type, '', 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); + print '</td>'; + print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; + print '</tr>'; + } else { + print '<tr class="oddeven"><td colspan="4" class="opacitymedium">'; + print $langs->trans("YouMustCreateContactFirst"); + print '</td></tr>'; + } + + + if ($num) { $i = 0; $contactstatic = new Contact($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $contactstatic->id = $obj->contact_id; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; - print '<tr class="oddeven"><td>'.$contactstatic->getNomUrl(1); - if ($obj->type == 'email') - { - if (isValidEmail($obj->email)) - { + + print '<tr class="oddeven">'; + print '<td>'.$contactstatic->getNomUrl(1); + if ($obj->type == 'email') { + if (isValidEmail($obj->email)) { print ' &lt;'.$obj->email.'&gt;'; } else { $langs->load("errors"); - print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email); + print ' '.img_warning().' <span class="warning">'.$langs->trans("ErrorBadEMail", $obj->email).'</span>'; } } print '</td>'; - print '<td>'; + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($label).'">'; $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; print '</td>'; print '<td>'; - if ($obj->type == 'email') print $langs->trans("Email"); - if ($obj->type == 'sms') print $langs->trans("SMS"); + if ($obj->type == 'email') { + print $langs->trans("Email"); + } + if ($obj->type == 'sms') { + print $langs->trans("SMS"); + } print '</td>'; print '<td class="right"><a href="card.php?socid='.$socid.'&action=delete&token='.newToken().'&actid='.$obj->rowid.'">'.img_delete().'</a></td>'; print '</tr>'; @@ -352,10 +336,9 @@ if ($result > 0) // List of notifications enabled for fixed email /* - foreach($conf->global as $key => $val) - { - if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; - $var = ! $var; + foreach($conf->global as $key => $val) + { + if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; print '<tr class="oddeven"><td>'; $listtmp=explode(',',$val); $first=1; @@ -364,7 +347,7 @@ if ($result > 0) if (! $first) print ', '; $first=0; $valemail=trim($valemail); - //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>'; + //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>'; if (isValidEmail($valemail, 1)) { if ($valemail == '__SUPERVISOREMAIL__') print $valemail; @@ -372,7 +355,8 @@ if ($result > 0) } else { - print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); + $langs->load("errors"); + print ' '.img_warning().' <span class="warning">'.$langs->trans("ErrorBadEMail",$valemail).'</span>; } } print '</td>'; @@ -391,18 +375,18 @@ if ($result > 0) print '</td>'; print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>'; print '</tr>'; - }*/ + }*/ /*if ($user->admin) - { - $var = ! $var; + { print '<tr class="oddeven"><td colspan="4">'; print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>'; print '</td></tr>'; - }*/ + }*/ print '</table>'; - + print '</div>'; + print '</form>'; print '<br><br>'."\n"; @@ -420,12 +404,10 @@ if ($result > 0) // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -434,19 +416,24 @@ if ($result > 0) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); } else { dol_print_error($db); } $param = '&socid='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; @@ -458,7 +445,8 @@ if ($result > 0) print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); // Line with titles - print '<table width="100%" class="noborder">'; + print '<div class="div-table-responsive-no-min">'; + print '<table class="centpercent noborder">'; print '<tr class="liste_titre">'; print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '', $sortfield, $sortorder); print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder); @@ -467,19 +455,16 @@ if ($result > 0) print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right '); print '</tr>'; - if ($num > 0) - { + if ($num > 0) { $i = 0; $contactstatic = new Contact($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven"><td>'; - if ($obj->id > 0) - { + if ($obj->id > 0) { $contactstatic->id = $obj->id; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; @@ -494,18 +479,22 @@ if ($result > 0) print $label; print '</td>'; print '<td>'; - if ($obj->type == 'email') print $langs->trans("Email"); - if ($obj->type == 'sms') print $langs->trans("Sms"); + if ($obj->type == 'email') { + print $langs->trans("Email"); + } + if ($obj->type == 'sms') { + print $langs->trans("Sms"); + } print '</td>'; // TODO Add link to object here for other types /*print '<td>'; - if ($obj->object_type == 'order') - { + if ($obj->object_type == 'order') + { $orderstatic->id=$obj->object_id; $orderstatic->ref=... print $orderstatic->getNomUrl(1); - } - print '</td>';*/ + } + print '</td>';*/ // print print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>'; print '</tr>'; @@ -517,9 +506,12 @@ if ($result > 0) } print '</table>'; + print '</div>'; print '</form>'; -} else dol_print_error('', 'RecordNotFound'); +} else { + dol_print_error('', 'RecordNotFound'); +} // End of page llxFooter(); diff --git a/htdocs/societe/notify/index.html b/htdocs/societe/notify/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index ee4ca01e7ee..dc8d95ef42f 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> * Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es> - * Copyright (C) 2018 ptibogxiv <support@ptibogxiv.net> + * Copyright (C) 2018 -2021Thibault FOUCART <support@ptibogxiv.net> * * 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,7 +44,9 @@ $langs->loadLangs(array("companies", "commercial", "banks", "bills", 'paypal', ' // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', '', ''); $id = GETPOST("id", "int"); @@ -69,12 +71,10 @@ $extrafields->fetch_name_optionals_label($object->table_element); $hookmanager->initHooks(array('thirdpartybancard', 'globalcard')); -if (!empty($conf->stripe->enabled)) -{ +if (!empty($conf->stripe->enabled)) { $service = 'StripeTest'; $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) - { + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { $service = 'StripeLive'; $servicestatus = 1; } @@ -94,47 +94,44 @@ if (!empty($conf->stripe->enabled)) * Actions */ -if ($cancel) -{ +if ($cancel) { $action = ''; } -$parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas); +$parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($cancel) - { +if (empty($reshook)) { + if ($cancel) { $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } } - if ($action == 'update') - { + if ($action == 'update') { // Modification - if (!GETPOST('label', 'alpha') || !GETPOST('bank', 'alpha')) - { - if (!GETPOST('label', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); - if (!GETPOST('bank', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankName")), null, 'errors'); + if (!GETPOST('label', 'alpha') || !GETPOST('bank', 'alpha')) { + if (!GETPOST('label', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + } + if (!GETPOST('bank', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankName")), null, 'errors'); + } $action = 'edit'; $error++; } - if ($companybankaccount->needIBAN() == 1) - { - if (!GETPOST('iban')) - { + if ($companybankaccount->needIBAN() == 1) { + if (!GETPOST('iban')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("IBAN")), null, 'errors'); $action = 'edit'; $error++; } - if (!GETPOST('bic')) - { + if (!GETPOST('bic')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BIC")), null, 'errors'); $action = 'edit'; $error++; @@ -142,8 +139,7 @@ if (empty($reshook)) } $companybankaccount->fetch($id); - if (!$error) - { + if (!$error) { $companybankaccount->socid = $object->id; $companybankaccount->bank = GETPOST('bank', 'alpha'); @@ -162,23 +158,19 @@ if (empty($reshook)) $companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha'); $companybankaccount->rum = GETPOST('rum', 'alpha'); $companybankaccount->date_rum = dol_mktime(0, 0, 0, GETPOST('date_rummonth'), GETPOST('date_rumday'), GETPOST('date_rumyear')); - if (empty($companybankaccount->rum)) - { + if (empty($companybankaccount->rum)) { $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); } - if (empty($companybankaccount->date_rum)) - { + if (empty($companybankaccount->date_rum)) { $companybankaccount->date_rum = dol_now(); } $result = $companybankaccount->update($user); - if (!$result) - { + if (!$result) { setEventMessages($companybankaccount->error, $companybankaccount->errors, 'errors'); } else { // If this account is the default bank account, we disable others - if ($companybankaccount->default_rib) - { + if ($companybankaccount->default_rib) { $companybankaccount->setAsDefault($id); // This will make sure there is only one default rib } @@ -189,23 +181,26 @@ if (empty($reshook)) } } - if ($action == 'updatecard') - { + if ($action == 'updatecard') { // Modification - if (!GETPOST('label', 'alpha') || !GETPOST('proprio', 'alpha') || !GETPOST('exp_date_month', 'alpha') || !GETPOST('exp_date_year', 'alpha')) - { - if (!GETPOST('label', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); - if (!GETPOST('proprio', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NameOnCard")), null, 'errors'); + if (!GETPOST('label', 'alpha') || !GETPOST('proprio', 'alpha') || !GETPOST('exp_date_month', 'alpha') || !GETPOST('exp_date_year', 'alpha')) { + if (!GETPOST('label', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + } + if (!GETPOST('proprio', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NameOnCard")), null, 'errors'); + } //if (!GETPOST('cardnumber', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardNumber")), null, 'errors'); - if (!(GETPOST('exp_date_month', 'alpha') > 0) || !(GETPOST('exp_date_year', 'alpha') > 0)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpiryDate")), null, 'errors'); + if (!(GETPOST('exp_date_month', 'alpha') > 0) || !(GETPOST('exp_date_year', 'alpha') > 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpiryDate")), null, 'errors'); + } //if (!GETPOST('cvn', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CVN")), null, 'errors'); $action = 'createcard'; $error++; } $companypaymentmode->fetch($id); - if (!$error) - { + if (!$error) { $companypaymentmode->fk_soc = $object->id; $companypaymentmode->bank = GETPOST('bank', 'alpha'); @@ -225,13 +220,11 @@ if (empty($reshook)) $companypaymentmode->stripe_card_ref = GETPOST('stripe_card_ref', 'alpha'); $result = $companypaymentmode->update($user); - if (!$result) - { + if (!$result) { setEventMessages($companypaymentmode->error, $companypaymentmode->errors, 'errors'); } else { // If this account is the default bank account, we disable others - if ($companypaymentmode->default_rib) - { + if ($companypaymentmode->default_rib) { $companypaymentmode->setAsDefault($id); // This will make sure there is only one default rib } @@ -242,20 +235,21 @@ if (empty($reshook)) } } - if ($action == 'add') - { + if ($action == 'add') { $error = 0; - if (!GETPOST('label', 'alpha') || !GETPOST('bank', 'alpha')) - { - if (!GETPOST('label', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); - if (!GETPOST('bank', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankName")), null, 'errors'); + if (!GETPOST('label', 'alpha') || !GETPOST('bank', 'alpha')) { + if (!GETPOST('label', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + } + if (!GETPOST('bank', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankName")), null, 'errors'); + } $action = 'create'; $error++; } - if (!$error) - { + if (!$error) { // Ajout $companybankaccount = new CompanyBankAccount($db); @@ -283,52 +277,43 @@ if (empty($reshook)) $db->begin(); // This test can be done only once properties were set - if ($companybankaccount->needIBAN() == 1) - { - if (!GETPOST('iban')) - { + if ($companybankaccount->needIBAN() == 1) { + if (!GETPOST('iban')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("IBAN")), null, 'errors'); $action = 'create'; $error++; } - if (!GETPOST('bic')) - { + if (!GETPOST('bic')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BIC")), null, 'errors'); $action = 'create'; $error++; } } - if (!$error) - { + if (!$error) { $result = $companybankaccount->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($companybankaccount->error, $companybankaccount->errors, 'errors'); $action = 'create'; // Force chargement page création } - if (empty($companybankaccount->rum)) - { + if (empty($companybankaccount->rum)) { $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); $companybankaccount->date_rum = dol_now(); } } - if (!$error) - { + if (!$error) { $result = $companybankaccount->update($user); // This will set the UMR number. - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($companybankaccount->error, $companybankaccount->errors, 'errors'); $action = 'create'; } } - if (!$error) - { + if (!$error) { $db->commit(); $url = $_SERVER["PHP_SELF"].'?socid='.$object->id; @@ -340,23 +325,26 @@ if (empty($reshook)) } } - if ($action == 'addcard') - { + if ($action == 'addcard') { $error = 0; - if (!GETPOST('label', 'alpha') || !GETPOST('proprio', 'alpha') || !GETPOST('exp_date_month', 'alpha') || !GETPOST('exp_date_year', 'alpha')) - { - if (!GETPOST('label', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); - if (!GETPOST('proprio', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NameOnCard")), null, 'errors'); + if (!GETPOST('label', 'alpha') || !GETPOST('proprio', 'alpha') || !GETPOST('exp_date_month', 'alpha') || !GETPOST('exp_date_year', 'alpha')) { + if (!GETPOST('label', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + } + if (!GETPOST('proprio', 'alpha')) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NameOnCard")), null, 'errors'); + } //if (!GETPOST('cardnumber', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CardNumber")), null, 'errors'); - if (!(GETPOST('exp_date_month', 'alpha') > 0) || !(GETPOST('exp_date_year', 'alpha') > 0)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpiryDate")), null, 'errors'); + if (!(GETPOST('exp_date_month', 'alpha') > 0) || !(GETPOST('exp_date_year', 'alpha') > 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ExpiryDate")), null, 'errors'); + } //if (!GETPOST('cvn', 'alpha')) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CVN")), null, 'errors'); $action = 'createcard'; $error++; } - if (!$error) - { + if (!$error) { // Ajout $companypaymentmode = new CompanyPaymentMode($db); @@ -383,19 +371,16 @@ if (empty($reshook)) $db->begin(); - if (!$error) - { + if (!$error) { $result = $companypaymentmode->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($companypaymentmode->error, $companypaymentmode->errors, 'errors'); $action = 'createcard'; // Force chargement page création } } - if (!$error) - { + if (!$error) { $db->commit(); $url = $_SERVER["PHP_SELF"].'?socid='.$object->id; @@ -407,12 +392,10 @@ if (empty($reshook)) } } - if ($action == 'setasbankdefault' && GETPOST('ribid', 'int') > 0) - { + if ($action == 'setasbankdefault' && GETPOST('ribid', 'int') > 0) { $companybankaccount = new CompanyBankAccount($db); $res = $companybankaccount->setAsDefault(GETPOST('ribid', 'int')); - if ($res) - { + if ($res) { $url = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; header('Location: '.$url); exit; @@ -421,11 +404,9 @@ if (empty($reshook)) } } - if ($action == 'confirm_deletecard' && GETPOST('confirm', 'alpha') == 'yes') - { + if ($action == 'confirm_deletecard' && GETPOST('confirm', 'alpha') == 'yes') { $companypaymentmode = new CompanyPaymentMode($db); - if ($companypaymentmode->fetch($ribid ? $ribid : $id)) - { + if ($companypaymentmode->fetch($ribid ? $ribid : $id)) { /*if ($companypaymentmode->stripe_card_ref && preg_match('/pm_/', $companypaymentmode->stripe_card_ref)) { $payment_method = \Stripe\PaymentMethod::retrieve($companypaymentmode->stripe_card_ref); @@ -436,8 +417,7 @@ if (empty($reshook)) }*/ $result = $companypaymentmode->delete($user); - if ($result > 0) - { + if ($result > 0) { $url = $_SERVER['PHP_SELF']."?socid=".$object->id; header('Location: '.$url); exit; @@ -448,14 +428,11 @@ if (empty($reshook)) setEventMessages($companypaymentmode->error, $companypaymentmode->errors, 'errors'); } } - if ($action == 'confirm_delete' && GETPOST('confirm', 'alpha') == 'yes') - { + if ($action == 'confirm_delete' && GETPOST('confirm', 'alpha') == 'yes') { $companybankaccount = new CompanyBankAccount($db); - if ($companybankaccount->fetch($ribid ? $ribid : $id)) - { + if ($companybankaccount->fetch($ribid ? $ribid : $id)) { $result = $companybankaccount->delete($user); - if ($result > 0) - { + if ($result > 0) { $url = $_SERVER['PHP_SELF']."?socid=".$object->id; header('Location: '.$url); exit; @@ -470,8 +447,7 @@ if (empty($reshook)) $savid = $id; // Actions to build doc - if ($action == 'builddocrib') - { + if ($action == 'builddocrib') { $action = 'builddoc'; $moreparams = array( 'use_companybankid'=>GETPOST('companybankid'), @@ -489,19 +465,15 @@ if (empty($reshook)) $id = $savid; // Action for stripe - if (!empty($conf->stripe->enabled) && class_exists('Stripe')) - { - if ($action == 'synccustomertostripe') - { - if ($object->client == 0) - { + if (!empty($conf->stripe->enabled) && class_exists('Stripe')) { + if ($action == 'synccustomertostripe') { + if ($object->client == 0) { $error++; setEventMessages('ThisThirdpartyIsNotACustomer', null, 'errors'); } else { // Creation of Stripe customer + update of societe_account $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus, 1); - if (!$cu) - { + if (!$cu) { $error++; setEventMessages($stripe->error, $stripe->errors, 'errors'); } else { @@ -509,32 +481,27 @@ if (empty($reshook)) } } } - if ($action == 'synccardtostripe') - { + if ($action == 'synccardtostripe') { $companypaymentmode = new CompanyPaymentMode($db); $companypaymentmode->fetch($id); - if ($companypaymentmode->type != 'card') - { + if ($companypaymentmode->type != 'card') { $error++; setEventMessages('ThisPaymentModeIsNotACard', null, 'errors'); } else { // Get the Stripe customer $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if (!$cu) - { + if (!$cu) { $error++; setEventMessages($stripe->error, $stripe->errors, 'errors'); } - if (!$error) - { + if (!$error) { // Creation of Stripe card + update of societe_account // Note that with the new Stripe API, option to create a card is no more available, instead an error message will be returned to // ask to create the crdit card from Stripe backoffice. $card = $stripe->cardStripe($cu, $companypaymentmode, $stripeacc, $servicestatus, 1); - if (!$card) - { + if (!$card) { $error++; setEventMessages($stripe->error, $stripe->errors, 'errors'); } @@ -542,8 +509,7 @@ if (empty($reshook)) } } - if ($action == 'setkey_account') - { + if ($action == 'setkey_account') { $error = 0; $newcu = GETPOST('key_account', 'alpha'); @@ -551,17 +517,16 @@ if (empty($reshook)) $db->begin(); if (empty($newcu)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".((int) $servicestatus)." AND entity = ".$conf->entity; } else { $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX."societe_account"; - $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! + $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".((int) $servicestatus)." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! } $resql = $db->query($sql); $num = $db->num_rows($resql); // Note: $num is always 0 on an update and delete, it is defined for select only. if (!empty($newcu)) { - if (empty($num)) - { + if (empty($num)) { $societeaccount = new SocieteAccount($db); $societeaccount->fk_soc = $object->id; $societeaccount->login = ''; @@ -571,21 +536,19 @@ if (empty($reshook)) $societeaccount->key_account = $newcu; $societeaccount->site_account = $site_account; $result = $societeaccount->create($user); - if ($result < 0) - { + if ($result < 0) { $error++; } } else { $sql = 'UPDATE '.MAIN_DB_PREFIX."societe_account"; $sql .= " SET key_account = '".$db->escape(GETPOST('key_account', 'alpha'))."', site_account = '".$db->escape($site_account)."'"; - $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".$servicestatus." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! + $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '".$db->escape($site_account)."') AND fk_soc = ".$object->id." AND status = ".((int) $servicestatus)." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified ! $resql = $db->query($sql); } } //var_dump($sql); var_dump($newcu); var_dump($num); exit; - if (!$error) - { + if (!$error) { $stripecu = $newcu; $db->commit(); } else { @@ -593,8 +556,7 @@ if (empty($reshook)) } } - if ($action == 'setkey_account_supplier') - { + if ($action == 'setkey_account_supplier') { $error = 0; $newsup = GETPOST('key_account_supplier', 'alpha'); @@ -623,8 +585,7 @@ if (empty($reshook)) $resql = $db->query($sql); $num = $db->num_rows($resql); - if (empty($num) && !empty($newsup)) - { + if (empty($num) && !empty($newsup)) { try { $stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha'))); $tokenstring['stripe_user_id'] = $stripesup->id; @@ -639,8 +600,7 @@ if (empty($reshook)) $resql = $db->query($sql); } - if (!$error) - { + if (!$error) { $stripesupplieracc = $newsup; $db->commit(); } else { @@ -648,25 +608,21 @@ if (empty($reshook)) } } - if ($action == 'setlocalassourcedefault') // Set as default when payment mode defined locally (and may be also remotely) - { + if ($action == 'setlocalassourcedefault') { // Set as default when payment mode defined locally (and may be also remotely) try { $companypaymentmode->setAsDefault($id); $url = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; header('Location: '.$url); exit; - } catch (Exception $e) - { + } catch (Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); } - } elseif ($action == 'setassourcedefault') // Set as default when payment mode defined remotely only - { + } elseif ($action == 'setassourcedefault') { // Set as default when payment mode defined remotely only try { $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if (preg_match('/pm_/', $source)) - { + if (preg_match('/pm_/', $source)) { $cu->invoice_settings->default_payment_method = (string) $source; // New } else { $cu->default_source = (string) $source; // Old @@ -676,19 +632,15 @@ if (empty($reshook)) $url = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; header('Location: '.$url); exit; - } catch (Exception $e) - { + } catch (Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); } - } elseif ($action == 'deletecard' && $source) - { + } elseif ($action == 'deletecard' && $source) { try { - if (preg_match('/pm_/', $source)) - { + if (preg_match('/pm_/', $source)) { $payment_method = \Stripe\PaymentMethod::retrieve($source, array("stripe_account" => $stripeacc)); - if ($payment_method) - { + if ($payment_method) { $payment_method->detach(); } } else { @@ -707,8 +659,7 @@ if (empty($reshook)) $url = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; header('Location: '.$url); exit; - } catch (Exception $e) - { + } catch (Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); } @@ -735,54 +686,53 @@ $head = societe_prepare_head($object); { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Paypal'),'','warning'); }*/ -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) -{ +if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } // Load Bank account -if (!$id) -{ +if (!$id) { $companybankaccount->fetch(0, $object->id); $companypaymentmode->fetch(0, null, $object->id, 'card'); } else { $companybankaccount->fetch($id); $companypaymentmode->fetch($id); } -if (empty($companybankaccount->socid)) $companybankaccount->socid = $object->id; +if (empty($companybankaccount->socid)) { + $companybankaccount->socid = $object->id; +} -if ($socid && ($action == 'edit' || $action == 'editcard') && $user->rights->societe->creer) -{ +if ($socid && ($action == 'edit' || $action == 'editcard') && $user->rights->societe->creer) { print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; $actionforadd = 'update'; - if ($action == 'editcard') $actionforadd = 'updatecard'; + if ($action == 'editcard') { + $actionforadd = 'updatecard'; + } print '<input type="hidden" name="action" value="'.$actionforadd.'">'; print '<input type="hidden" name="id" value="'.GETPOST("id", "int").'">'; } -if ($socid && ($action == 'create' || $action == 'createcard') && $user->rights->societe->creer) -{ +if ($socid && ($action == 'create' || $action == 'createcard') && $user->rights->societe->creer) { print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; $actionforadd = 'add'; - if ($action == 'createcard') $actionforadd = 'addcard'; + if ($action == 'createcard') { + $actionforadd = 'addcard'; + } print '<input type="hidden" name="action" value="'.$actionforadd.'">'; } // View -if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' && $action != 'createcard') -{ +if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' && $action != 'createcard') { print dol_get_fiche_head($head, 'rib', $langs->trans("ThirdParty"), -1, 'company'); // Confirm delete ban - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid ? $ribid : $id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $companybankaccount->getRibLabel()), "confirm_delete", '', 0, 1); } // Confirm delete card - if ($action == 'deletecard') - { + if ($action == 'deletecard') { print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid ? $ribid : $id), $langs->trans("DeleteACard"), $langs->trans("ConfirmDeleteCard", $companybankaccount->getRibLabel()), "confirm_deletecard", '', 0, 1); } @@ -791,8 +741,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'nom'); - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } @@ -803,50 +752,57 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield centpercent">'; - if ($object->client) - { + if ($object->client) { print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="2">'; - print $object->code_client; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; } print '</td></tr>'; - $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".$socid; + $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".((int) $socid); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $obj = $db->fetch_object($resql); $nbFactsClient = $obj->nb; $thirdTypeArray['customer'] = $langs->trans("customer"); - if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); - if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); - if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); - if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + if ($conf->propal->enabled && $user->rights->propal->lire) { + $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); + } + if ($conf->commande->enabled && $user->rights->commande->lire) { + $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); + } + if ($conf->facture->enabled && $user->rights->facture->lire) { + $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); + } + if ($conf->contrat->enabled && $user->rights->contrat->lire) { + $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + } - if (!empty($conf->stripe->enabled)) - { + if (!empty($conf->stripe->enabled)) { $permissiontowrite = $user->rights->societe->creer; // Stripe customer key 'cu_....' stored into llx_societe_account print '<tr><td class="titlefield">'; print $form->editfieldkey("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); print '</td><td>'; print $form->editfieldval("StripeCustomerId", 'key_account', $stripecu, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); - if (!empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') - { + if (!empty($conf->stripe->enabled) && $stripecu && $action != 'editkey_account') { $connect = ''; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$stripecu; - if ($servicestatus) - { + if ($servicestatus) { $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$stripecu; } print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Publishable key = '.$site_account, 'globe').'</a>'; } print '</td><td class="right">'; - if (empty($stripecu)) - { + if (empty($stripecu)) { print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input type="hidden" name="action" value="synccustomertostripe">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -858,30 +814,38 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if ($object->fournisseur) - { + if ($object->fournisseur) { print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="2">'; - print $object->code_fournisseur; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); $tmpcheck = $object->check_codefournisseur(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; } print '</td></tr>'; - $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".$socid; + $sql = "SELECT count(*) as nb from ".MAIN_DB_PREFIX."facture where fk_soc = ".((int) $socid); $resql = $db->query($sql); - if (!$resql) dol_print_error($db); + if (!$resql) { + dol_print_error($db); + } $obj = $db->fetch_object($resql); $nbFactsClient = $obj->nb; $thirdTypeArray['customer'] = $langs->trans("customer"); - if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); - if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); - if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); - if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + if ($conf->propal->enabled && $user->rights->propal->lire) { + $elementTypeArray['propal'] = $langs->transnoentitiesnoconv('Proposals'); + } + if ($conf->commande->enabled && $user->rights->commande->lire) { + $elementTypeArray['order'] = $langs->transnoentitiesnoconv('Orders'); + } + if ($conf->facture->enabled && $user->rights->facture->lire) { + $elementTypeArray['invoice'] = $langs->transnoentitiesnoconv('Invoices'); + } + if ($conf->contrat->enabled && $user->rights->contrat->lire) { + $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts'); + } } - if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2) - { + if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 2) { $permissiontowrite = $user->rights->societe->creer; $stripesupplieracc = $stripe->getStripeAccount($service, $object->id); // Get Stripe OAuth connect account (no network access here) @@ -890,20 +854,17 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $form->editfieldkey("StripeConnectAccount", 'key_account_supplier', $stripesupplieracc, $object, $permissiontowrite, 'string', '', 0, 2, 'socid'); print '</td><td>'; print $form->editfieldval("StripeConnectAccount", 'key_account_supplier', $stripesupplieracc, $object, $permissiontowrite, 'string', '', null, null, '', 2, '', 'socid'); - if (!empty($conf->stripe->enabled) && $stripesupplieracc && $action != 'editkey_account_supplier') - { + if (!empty($conf->stripe->enabled) && $stripesupplieracc && $action != 'editkey_account_supplier') { $connect = ''; $url = 'https://dashboard.stripe.com/test/connect/accounts/'.$stripesupplieracc; - if ($servicestatus) - { + if ($servicestatus) { $url = 'https://dashboard.stripe.com/connect/accounts/'.$stripesupplieracc; } print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Publishable key '.$site_account, 'globe').'</a>'; } print '</td><td class="right">'; - if (empty($stripesupplieracc)) - { + if (empty($stripesupplieracc)) { print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<input type="hidden" name="action" value="syncsuppliertostripe">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -923,30 +884,25 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<br>'; // List of Stripe payment modes - if (!(empty($conf->stripe->enabled)) && $object->client) - { + if (!(empty($conf->stripe->enabled)) && $object->client) { $morehtmlright = ''; - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) - { + if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { $morehtmlright .= dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&amp;action=createcard'); } print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc ? ' (Stripe connection with StripeConnect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'stripe-s'); $listofsources = array(); - if (is_object($stripe)) - { + if (is_object($stripe)) { try { $customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if ($customerstripe->id) { + if (!empty($customerstripe->id)) { // When using the Charge API architecture - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { $listofsources = $customerstripe->sources->data; } else { $service = 'StripeTest'; $servicestatus = 0; - if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) - { + if (!empty($conf->global->STRIPE_LIVE) && !GETPOST('forcesandbox', 'alpha')) { $service = 'StripeLive'; $servicestatus = 1; } @@ -957,21 +913,27 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' try { if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - $paymentmethodobjs = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card")); + $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card")); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit")); } else { - $paymentmethodobjs = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card"), array("stripe_account" => $stripeacc)); + $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card"), array("stripe_account" => $stripeacc)); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit"), array("stripe_account" => $stripeacc)); } - $listofsources = $paymentmethodobjs->data; - } catch (Exception $e) - { + if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) { + $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data); + } elseif ($paymentmethodobjsB->data != null) { + $listofsources = $paymentmethodobjsB->data; + } else { + $listofsources = $paymentmethodobjsA->data; + } + } catch (Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); } } } - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog("Error when searching/loading Stripe customer for thirdparty id =".$object->id); } } @@ -980,8 +942,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '<table class="liste centpercent">'."\n"; print '<tr class="liste_titre">'; - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) - { + if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { print '<td>'.$langs->trans('LocalID').'</td>'; } print '<td>'.$langs->trans('Label').'</td>'; @@ -1005,8 +966,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $arrayofstripecard = array(); // Show local sources - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) - { + if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { //$societeaccount = new SocieteAccount($db); $companypaymentmodetemp = new CompanyPaymentMode($db); @@ -1016,19 +976,15 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $sql .= " AND status = ".$servicestatus; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $db->num_rows($resql); - if ($num_rows) - { + if ($num_rows) { $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $nblocal++; $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $companypaymentmodetemp->fetch($obj->rowid); $arrayofstripecard[$companypaymentmodetemp->stripe_card_ref] = $companypaymentmodetemp->stripe_card_ref; @@ -1042,13 +998,13 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '</td>'; print '<td>'; print $companypaymentmodetemp->stripe_card_ref; - if ($companypaymentmodetemp->stripe_card_ref) - { + if ($companypaymentmodetemp->stripe_card_ref) { $connect = ''; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/search?query='.$companypaymentmodetemp->stripe_card_ref; - if ($servicestatus) - { + if ($servicestatus) { $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$companypaymentmodetemp->stripe_card_ref; } print ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe').' - Customer and Publishable key = '.$companypaymentmodetemp->stripe_account, 'globe').'</a>'; @@ -1058,21 +1014,27 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print img_credit_card($companypaymentmodetemp->type); print '</td>'; print '<td>'; - if ($companypaymentmodetemp->proprio) print '<span class="opacitymedium">'.$companypaymentmodetemp->proprio.'</span><br>'; - if ($companypaymentmodetemp->last_four) print '....'.$companypaymentmodetemp->last_four; - if ($companypaymentmodetemp->exp_date_month || $companypaymentmodetemp->exp_date_year) print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year.''; + if ($companypaymentmodetemp->proprio) { + print '<span class="opacitymedium">'.$companypaymentmodetemp->proprio.'</span><br>'; + } + if ($companypaymentmodetemp->last_four) { + print '....'.$companypaymentmodetemp->last_four; + } + if ($companypaymentmodetemp->exp_date_month || $companypaymentmodetemp->exp_date_year) { + print ' - '.sprintf("%02d", $companypaymentmodetemp->exp_date_month).'/'.$companypaymentmodetemp->exp_date_year.''; + } print '</td><td>'; - if ($companypaymentmodetemp->country_code) - { + if ($companypaymentmodetemp->country_code) { $img = picto_from_langcode($companypaymentmodetemp->country_code); print $img ? $img.' ' : ''; print getCountry($companypaymentmodetemp->country_code, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } print '</td>'; // Default print '<td class="center">'; - if (empty($companypaymentmodetemp->default_rib)) - { + if (empty($companypaymentmodetemp->default_rib)) { print '<a href="'.DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id.'&id='.$companypaymentmodetemp->id.'&action=setlocalassourcedefault&token='.newToken().'">'; print img_picto($langs->trans("Default"), 'off'); print '</a>'; @@ -1081,8 +1043,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } print '</td>'; print '<td>'; - if (empty($companypaymentmodetemp->stripe_card_ref)) print $langs->trans("Local"); - else print $langs->trans("LocalAndRemote"); + if (empty($companypaymentmodetemp->stripe_card_ref)) { + print $langs->trans("Local"); + } else { + print $langs->trans("LocalAndRemote"); + } print '</td>'; print '<td>'; print dol_print_date($companypaymentmodetemp->tms, 'dayhour'); @@ -1093,10 +1058,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $hookmanager->resPrint; // Action column print '<td class="right nowraponall">'; - if ($user->rights->societe->creer) - { - if ($stripecu && empty($companypaymentmodetemp->stripe_card_ref)) - { + if ($user->rights->societe->creer) { + if ($stripecu && empty($companypaymentmodetemp->stripe_card_ref)) { print '<a href="'.$_SERVER['PHP_SELF'].'?action=synccardtostripe&socid='.$object->id.'&id='.$companypaymentmodetemp->id.'" class="paddingrightonly marginrightonly">'.$langs->trans("CreateCardOnStripe").'</a>'; } @@ -1114,22 +1077,23 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $i++; } } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } // Show remote sources (not already shown as local source) - if (is_array($listofsources) && count($listofsources)) - { - foreach ($listofsources as $src) - { - if (!empty($arrayofstripecard[$src->id])) continue; // Already in previous list + if (is_array($listofsources) && count($listofsources)) { + foreach ($listofsources as $src) { + if (!empty($arrayofstripecard[$src->id])) { + continue; // Already in previous list + } $nbremote++; print '<tr class="oddeven">'; // Local ID - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) - { + if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { print '<td>'; print '</td>'; } @@ -1139,11 +1103,12 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<td>'; $connect = ''; print $src->id; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } //$url='https://dashboard.stripe.com/'.$connect.'test/sources/'.$src->id; $url = 'https://dashboard.stripe.com/'.$connect.'test/search?query='.$src->id; - if ($servicestatus) - { + if ($servicestatus) { //$url='https://dashboard.stripe.com/'.$connect.'sources/'.$src->id; $url = 'https://dashboard.stripe.com/'.$connect.'search?query='.$src->id; } @@ -1151,77 +1116,72 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '</td>'; // Img of credit card print '<td>'; - if ($src->object == 'card') - { + if ($src->object == 'card') { print img_credit_card($src->brand); - } elseif ($src->object == 'source' && $src->type == 'card') - { + } elseif ($src->object == 'source' && $src->type == 'card') { print img_credit_card($src->card->brand); - } elseif ($src->object == 'source' && $src->type == 'sepa_debit') - { + } elseif ($src->object == 'source' && $src->type == 'sepa_debit') { print '<span class="fa fa-university fa-2x fa-fw"></span>'; - } elseif ($src->object == 'payment_method' && $src->type == 'card') - { + } elseif ($src->object == 'payment_method' && $src->type == 'card') { print img_credit_card($src->card->brand); - } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') - { + } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { print '<span class="fa fa-university fa-2x fa-fw"></span>'; } print'</td>'; // Information print '<td valign="middle">'; - if ($src->object == 'card') - { + if ($src->object == 'card') { print '....'.$src->last4.' - '.$src->exp_month.'/'.$src->exp_year.''; print '</td><td>'; - if ($src->country) - { + if ($src->country) { $img = picto_from_langcode($src->country); print $img ? $img.' ' : ''; print getCountry($src->country, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; - } elseif ($src->object == 'source' && $src->type == 'card') - { + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } + } elseif ($src->object == 'source' && $src->type == 'card') { print '<span class="opacitymedium">'.$src->owner->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.''; print '</td><td>'; - if ($src->card->country) - { + if ($src->card->country) { $img = picto_from_langcode($src->card->country); print $img ? $img.' ' : ''; print getCountry($src->card->country, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; - } elseif ($src->object == 'source' && $src->type == 'sepa_debit') - { - print 'SEPA debit'; + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } + } elseif ($src->object == 'source' && $src->type == 'sepa_debit') { + print '<span class="opacitymedium">'.$src->billing_details->name.'</span><br>....'.$src->sepa_debit->last4; print '</td><td>'; - if ($src->sepa_debit->country) - { + if ($src->sepa_debit->country) { $img = picto_from_langcode($src->sepa_debit->country); print $img ? $img.' ' : ''; print getCountry($src->sepa_debit->country, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; - } elseif ($src->object == 'payment_method' && $src->type == 'card') - { + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } + } elseif ($src->object == 'payment_method' && $src->type == 'card') { print '<span class="opacitymedium">'.$src->billing_details->name.'</span><br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.''; print '</td><td>'; - if ($src->card->country) - { + if ($src->card->country) { $img = picto_from_langcode($src->card->country); print $img ? $img.' ' : ''; print getCountry($src->card->country, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; - } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') - { - print 'SEPA debit'; + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } + } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { + print '<span class="opacitymedium">'.$src->billing_details->name.'</span><br>....'.$src->sepa_debit->last4; print '</td><td>'; - if ($src->sepa_debit->country) - { + if ($src->sepa_debit->country) { $img = picto_from_langcode($src->sepa_debit->country); print $img ? $img.' ' : ''; print getCountry($src->sepa_debit->country, 1); - } else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } else { + print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).'</font>'; + } } else { print '</td><td>'; } @@ -1229,8 +1189,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // Default print '<td class="center" width="50">'; if ((empty($customerstripe->invoice_settings) && $customerstripe->default_source != $src->id) || - (!empty($customerstripe->invoice_settings) && $customerstripe->invoice_settings->default_payment_method != $src->id)) - { + (!empty($customerstripe->invoice_settings) && $customerstripe->invoice_settings->default_payment_method != $src->id)) { print '<a href="'.DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id.'&source='.$src->id.'&action=setassourcedefault&token='.newToken().'">'; print img_picto($langs->trans("Default"), 'off'); print '</a>'; @@ -1252,8 +1211,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $hookmanager->resPrint; // Action column print '<td class="right nowraponall">'; - if ($user->rights->societe->creer) - { + if ($user->rights->societe->creer) { print '<a href="'.DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id.'&source='.$src->id.'&action=deletecard&token='.newToken().'">'; print img_picto($langs->trans("Delete"), 'delete'); print '</a>'; @@ -1264,10 +1222,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if ($nbremote == 0 && $nblocal == 0) - { - $colspan = 8; - if (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) $colspan++; + if ($nbremote == 0 && $nblocal == 0) { + $colspan = (!empty($conf->global->STRIPE_ALLOW_LOCAL_CARD) ? 10 : 9); print '<tr><td class="opacitymedium" colspan="'.$colspan.'">'.$langs->trans("None").'</td></tr>'; } print "</table>"; @@ -1275,9 +1231,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<br>'; } - // List of Stripe payment modes - if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && !empty($stripesupplieracc)) - { + // List of Stripe payment modes + if (!empty($conf->stripe->enabled) && !empty($conf->stripeconnect->enabled) && !empty($stripesupplieracc)) { print load_fiche_titre($langs->trans('StripeBalance').($stripesupplieracc ? ' (Stripe connection with StripeConnect account '.$stripesupplieracc.')' : ' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, 'stripe-s'); $balance = \Stripe\Balance::retrieve(array("stripe_account" => $stripesupplieracc)); print '<table class="liste centpercent">'."\n"; @@ -1289,10 +1244,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '</tr>'; $currencybalance = array(); - if (is_array($balance->available) && count($balance->available)) - { - foreach ($balance->available as $cpt) - { + if (is_array($balance->available) && count($balance->available)) { + foreach ($balance->available as $cpt) { $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); if (!in_array($cpt->currency, $arrayzerounitcurrency)) { $currencybalance[$cpt->currency]['available'] = $cpt->amount / 100; @@ -1303,10 +1256,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if (is_array($balance->pending) && count($balance->pending)) - { - foreach ($balance->pending as $cpt) - { + if (is_array($balance->pending) && count($balance->pending)) { + foreach ($balance->pending as $cpt) { $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); if (!in_array($cpt->currency, $arrayzerounitcurrency)) { $currencybalance[$cpt->currency]['pending'] = $currencybalance[$cpt->currency]['available'] + $cpt->amount / 100; @@ -1316,10 +1267,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } } - if (is_array($currencybalance)) - { - foreach ($currencybalance as $cpt) - { + if (is_array($currencybalance)) { + foreach ($currencybalance as $cpt) { print '<tr><td>'.$langs->trans("Currency".strtoupper($cpt['currency'])).'</td><td>'.price($cpt['available'], 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td><td>'.price($cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td><td>'.price($cpt['available'] + $cpt->pending, 0, '', 1, - 1, - 1, strtoupper($cpt['currency'])).'</td></tr>'; } } @@ -1335,8 +1284,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print load_fiche_titre($langs->trans("BankAccounts"), $morehtmlright, 'bank'); $rib_list = $object->get_all_rib(); - if (is_array($rib_list)) - { + if (is_array($rib_list)) { print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '<table class="liste centpercent">'; @@ -1346,8 +1294,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print_liste_field_titre("RIB"); print_liste_field_titre("IBAN"); print_liste_field_titre("BIC"); - if (!empty($conf->prelevement->enabled)) - { + if (!empty($conf->prelevement->enabled)) { print_liste_field_titre("RUM"); print_liste_field_titre("DateRUM"); print_liste_field_titre("WithdrawMode"); @@ -1357,8 +1304,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); print "</tr>\n"; - foreach ($rib_list as $rib) - { + foreach ($rib_list as $rib) { print '<tr class="oddeven">'; // Label print '<td>'.$rib->label.'</td>'; @@ -1396,7 +1342,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '</td>'; // IBAN print '<td>'.$rib->iban; - if (!empty($rib->iban)) { + if (!empty($rib->iban)) { if (!checkIbanForAccount($rib)) { print ' '.img_picto($langs->trans("IbanNotValid"), 'warning'); } @@ -1411,8 +1357,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } print '</td>'; - if (!empty($conf->prelevement->enabled)) - { + if (!empty($conf->prelevement->enabled)) { // RUM //print '<td>'.$prelevement->buildRumNumber($object->code_client, $rib->datec, $rib->id).'</td>'; print '<td>'.$rib->rum.'</td>'; @@ -1444,46 +1389,52 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $modellist = ModeleBankAccountDoc::liste_modeles($db); $out = ''; - if (is_array($modellist) && count($modellist)) - { + if (is_array($modellist) && count($modellist)) { $out .= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">'; $out .= '<input type="hidden" name="action" value="builddocrib">'; $out .= '<input type="hidden" name="token" value="'.newToken().'">'; $out .= '<input type="hidden" name="socid" value="'.$object->id.'">'; $out .= '<input type="hidden" name="companybankid" value="'.$rib->id.'">'; - if (is_array($modellist) && count($modellist) == 1) // If there is only one element - { + if (is_array($modellist) && count($modellist) == 1) { // If there is only one element $arraykeys = array_keys($modellist); $modelselected = $arraykeys[0]; } - if (!empty($conf->global->BANKADDON_PDF)) $modelselected = $conf->global->BANKADDON_PDF; + if (!empty($conf->global->BANKADDON_PDF)) { + $modelselected = $conf->global->BANKADDON_PDF; + } $out .= $form->selectarray('modelrib'.$rib->id, $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth100'); $out .= ajax_combobox('modelrib'.$rib->id); // Language code (if multilang) - if ($conf->global->MAIN_MULTILANGS) - { + if ($conf->global->MAIN_MULTILANGS) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; $formadmin = new FormAdmin($db); $defaultlang = $codelang ? $codelang : $langs->getDefaultLang(); $morecss = 'maxwidth150'; - if ($conf->browser->layout == 'phone') $morecss = 'maxwidth100'; + if ($conf->browser->layout == 'phone') { + $morecss = 'maxwidth100'; + } $out .= $formadmin->select_language($defaultlang, 'lang_idrib'.$rib->id, 0, 0, 0, 0, 0, $morecss); } // Button $genbutton = '<input class="button buttongen" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"'; $genbutton .= ' type="submit" value="'.$buttonlabel.'"'; - if (!$allowgenifempty && !is_array($modellist) && empty($modellist)) $genbutton .= ' disabled'; + if (!$allowgenifempty && !is_array($modellist) && empty($modellist)) { + $genbutton .= ' disabled'; + } $genbutton .= '>'; - if ($allowgenifempty && !is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') - { + if ($allowgenifempty && !is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') { $langs->load("errors"); $genbutton .= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated")); } - if (!$allowgenifempty && !is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton = ''; - if (empty($modellist) && !$showempty && $modulepart != 'unpaid') $genbutton = ''; + if (!$allowgenifempty && !is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') { + $genbutton = ''; + } + if (empty($modellist) && !$showempty && $modulepart != 'unpaid') { + $genbutton = ''; + } $out .= $genbutton; $out .= '</form>'; } @@ -1492,25 +1443,25 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // Edit/Delete print '<td class="right nowraponall">'; - if ($user->rights->societe->creer) - { + if ($user->rights->societe->creer) { print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&id='.$rib->id.'&action=edit">'; print img_picto($langs->trans("Modify"), 'edit'); print '</a>'; - print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&id='.$rib->id.'&action=delete&token='.newToken().'">'; - print img_picto($langs->trans("Delete"), 'delete'); - print '</a>'; + print '<a class="marginleftonly" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&id='.$rib->id.'&action=delete&token='.newToken().'">'; + print img_picto($langs->trans("Delete"), 'delete'); + print '</a>'; } print '</td>'; print '</tr>'; } - if (count($rib_list) == 0) - { + if (count($rib_list) == 0) { $colspan = 9; - if (!empty($conf->prelevement->enabled)) $colspan += 2; + if (!empty($conf->prelevement->enabled)) { + $colspan += 2; + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoBANRecord").'</td></tr>'; } @@ -1521,16 +1472,15 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' } - if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) - { + if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) { print '<br>'; print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre /* - * Documents generes - */ + * Generated documents + */ $filedir = $conf->societe->multidir_output[$object->entity].'/'.$object->id; $urlsource = $_SERVER["PHP_SELF"]."?socid=".$object->id; $genallowed = $user->rights->societe->lire; @@ -1539,8 +1489,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang); // Show direct download link - if (!empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) - { + if (!empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { $companybankaccounttemp = new CompanyBankAccount($db); $companypaymentmodetemp = new CompanyPaymentMode($db); $result = $companypaymentmodetemp->fetch(0, null, $object->id, 'ban'); @@ -1548,8 +1497,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', '', '', '', $companybankaccounttemp->table_element, $companypaymentmodetemp->id); - if ($result > 0) - { + if ($result > 0) { $companybankaccounttemp->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; print '<br><!-- Link to download main doc -->'."\n"; print showDirectDownloadLink($companybankaccounttemp).'<br>'; @@ -1564,29 +1512,28 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '<br>'; } /* - include_once DOL_DOCUMENT_ROOT.'/core/modules/bank/modules_bank.php'; - $modellist=ModeleBankAccountDoc::liste_modeles($db); - //print '<td>'; - if (is_array($modellist) && count($modellist) == 1) // If there is only one element - { - $arraykeys=array_keys($modellist); - $modelselected=$arraykeys[0]; - } - $out.= $form->selectarray('model', $modellist, $modelselected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100'); - $out.= ajax_combobox('model'); - //print $out; - $buttonlabel=$langs->trans("Generate"); - $genbutton = '<input class="button buttongen" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"'; - $genbutton.= ' type="submit" value="'.$buttonlabel.'"'; - $genbutton.= '>'; - print $genbutton; - //print '</td>'; // TODO Add link to generate doc - */ + include_once DOL_DOCUMENT_ROOT.'/core/modules/bank/modules_bank.php'; + $modellist=ModeleBankAccountDoc::liste_modeles($db); + //print '<td>'; + if (is_array($modellist) && count($modellist) == 1) // If there is only one element + { + $arraykeys=array_keys($modellist); + $modelselected=$arraykeys[0]; + } + $out.= $form->selectarray('model', $modellist, $modelselected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100'); + $out.= ajax_combobox('model'); + //print $out; + $buttonlabel=$langs->trans("Generate"); + $genbutton = '<input class="button buttongen" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"'; + $genbutton.= ' type="submit" value="'.$buttonlabel.'"'; + $genbutton.= '>'; + print $genbutton; + //print '</td>'; // TODO Add link to generate doc + */ } // Edit BAN -if ($socid && $action == 'edit' && $user->rights->societe->creer) -{ +if ($socid && $action == 'edit' && $user->rights->societe->creer) { print dol_get_fiche_head($head, 'rib', $langs->trans("ThirdParty"), 0, 'company'); $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -1628,13 +1575,17 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) $name = 'iban'; $size = 30; $content = $companybankaccount->iban; - if ($companybankaccount->needIBAN()) $require = true; + if ($companybankaccount->needIBAN()) { + $require = true; + } $tooltip = $langs->trans("Example").':<br>LT12 1000 0111 0100 1000<br>FR14 2004 1010 0505 0001 3M02 606<br>LU28 0019 4006 4475 0000<br>DE89 3704 0044 0532 0130 00'; } elseif ($val == 'BIC') { $name = 'bic'; $size = 12; $content = $companybankaccount->bic; - if ($companybankaccount->needIBAN()) $require = true; + if ($companybankaccount->needIBAN()) { + $require = true; + } $tooltip = $langs->trans("Example").': LIABLT2XXXX'; } @@ -1666,14 +1617,15 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) print '</table>'; print '</div>'; - if ($conf->prelevement->enabled) - { + if ($conf->prelevement->enabled) { print '<br>'; print '<div class="div-table-responsive-no-min">'; print '<table class="border centpercent">'; - if (empty($companybankaccount->rum)) $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); + if (empty($companybankaccount->rum)) { + $companybankaccount->rum = $prelevement->buildRumNumber($object->code_client, $companybankaccount->datec, $companybankaccount->id); + } // RUM print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>'; @@ -1702,8 +1654,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) } // Edit Card -if ($socid && $action == 'editcard' && $user->rights->societe->creer) -{ +if ($socid && $action == 'editcard' && $user->rights->societe->creer) { print dol_get_fiche_head($head, 'rib', $langs->trans("ThirdParty"), 0, 'company'); $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -1750,8 +1701,7 @@ if ($socid && $action == 'editcard' && $user->rights->societe->creer) // Create BAN -if ($socid && $action == 'create' && $user->rights->societe->creer) -{ +if ($socid && $action == 'create' && $user->rights->societe->creer) { print dol_get_fiche_head($head, 'rib', $langs->trans("ThirdParty"), 0, 'company'); $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -1793,13 +1743,17 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) $name = 'iban'; $size = 30; $content = $companybankaccount->iban; - if ($companybankaccount->needIBAN()) $require = true; + if ($companybankaccount->needIBAN()) { + $require = true; + } $tooltip = $langs->trans("Example").':<br>LT12 1000 0111 0100 1000<br>FR14 2004 1010 0505 0001 3M02 606<br>LU28 0019 4006 4475 0000<br>DE89 3704 0044 0532 0130 00'; } elseif ($val == 'BIC') { $name = 'bic'; $size = 12; $content = $companybankaccount->bic; - if ($companybankaccount->needIBAN()) $require = true; + if ($companybankaccount->needIBAN()) { + $require = true; + } $tooltip = $langs->trans("Example").': LIABLT2XXXX'; } @@ -1830,8 +1784,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) print '</table>'; - if ($conf->prelevement->enabled) - { + if ($conf->prelevement->enabled) { print '<br>'; print '<table class="border centpercent">'; @@ -1865,8 +1818,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) } // Create Card -if ($socid && $action == 'createcard' && $user->rights->societe->creer) -{ +if ($socid && $action == 'createcard' && $user->rights->societe->creer) { print dol_get_fiche_head($head, 'rib', $langs->trans("ThirdParty"), 0, 'company'); $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -1914,12 +1866,10 @@ if ($socid && $action == 'createcard' && $user->rights->societe->creer) print '</div>'; } -if ($socid && ($action == 'edit' || $action == 'editcard') && $user->rights->societe->creer) -{ +if ($socid && ($action == 'edit' || $action == 'editcard') && $user->rights->societe->creer) { print '</form>'; } -if ($socid && ($action == 'create' || $action == 'createcard') && $user->rights->societe->creer) -{ +if ($socid && ($action == 'create' || $action == 'createcard') && $user->rights->societe->creer) { print '</form>'; } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 0afe58ece05..cc056896414 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -49,8 +49,9 @@ $search_price_ttc = GETPOST('search_price_ttc'); // Security check $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); -if ($user->socid) +if ($user->socid) { $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, '&societe'); $object = new Societe($db); @@ -67,12 +68,12 @@ $error = 0; $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - 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 - { +if (empty($reshook)) { + 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_prod = $search_label = $search_price = $search_price_ttc = ''; } @@ -88,6 +89,7 @@ if (empty($reshook)) // add price by customer $prodcustprice->fk_soc = $socid; + $prodcustprice->ref_customer = GETPOST('ref_customer', 'alpha'); $prodcustprice->fk_product = GETPOST('prodid', 'int'); $prodcustprice->price = price2num(GETPOST("price"), 'MU'); $prodcustprice->price_min = price2num(GETPOST("price_min"), 'MU'); @@ -101,8 +103,7 @@ if (empty($reshook)) $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 recommended method), we use it to find npr and local taxes - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { + 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 @@ -112,8 +113,7 @@ if (empty($reshook)) $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; $sql .= " AND t.code ='".$db->escape($vatratecode)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; $localtax1 = $obj->localtax1; @@ -145,7 +145,7 @@ if (empty($reshook)) if ($action == 'delete_customer_price' && ($user->rights->produit->creer || $user->rights->service->creer)) { // Delete price by customer - $prodcustprice->id = GETPOST('lineid'); + $prodcustprice->id = GETPOST('lineid', 'int'); $result = $prodcustprice->delete($user); if ($result < 0) { @@ -162,6 +162,7 @@ if (empty($reshook)) $update_child_soc = GETPOST('updatechildprice'); // update price by customer + $prodcustprice->ref_customer = GETPOST('ref_customer', 'alpha'); $prodcustprice->price = price2num(GETPOST("price"), 'MU'); $prodcustprice->price_min = price2num(GETPOST("price_min"), 'MU'); $prodcustprice->price_base_type = GETPOST("price_base_type", 'alpha'); @@ -191,8 +192,9 @@ $object = new Societe($db); $result = $object->fetch($socid); llxHeader("", $langs->trans("ThirdParty").'-'.$langs->trans('PriceByCustomer')); -if (!empty($conf->notification->enabled)) +if (!empty($conf->notification->enabled)) { $langs->load("mails"); +} $head = societe_prepare_head($object); print dol_get_fiche_head($head, 'price', $langs->trans("ThirdParty"), -1, 'company'); @@ -206,8 +208,7 @@ print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; -if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field -{ +if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } @@ -248,14 +249,18 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $sortorder = GETPOST("sortorder", 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $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) + if (!$sortorder) { $sortorder = "ASC"; - if (!$sortfield) + } + if (!$sortfield) { $sortfield = "soc.nom"; + } // Build filter to display only concerned lines $filter = array( @@ -298,6 +303,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '</td>'; print '</tr>'; + // Ref. Customer + print '<tr><td>'.$langs->trans('RefCustomer').'</td>'; + print '<td><input name="ref_customer" size="12"></td></tr>'; + // VAT print '<tr><td>'.$langs->trans("VATRate").'</td><td>'; print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr, '', false, 1); @@ -359,97 +368,101 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print load_fiche_titre($langs->trans('PriceByCustomer')); $result = $prodcustprice->fetch(GETPOST('lineid', 'int')); - if ($result < 0) - { + + if ($result <= 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); - } - - print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'" method="POST">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="update_customer_price_confirm">'; - print '<input type="hidden" name="lineid" value="'.$prodcustprice->id.'">'; - print '<table class="border centpercent">'; - print '<tr>'; - print '<td>'.$langs->trans('Product').'</td>'; - $staticprod = new Product($db); - $staticprod->fetch($prodcustprice->fk_product); - print "<td>".$staticprod->getNomUrl(1)."</td>"; - print '</tr>'; - - // VAT - print '<tr><td>'.$langs->trans("VATRate").'</td><td>'; - print $form->load_tva("tva_tx", $prodcustprice->tva_tx, $mysoc, '', $staticprod->id, $prodcustprice->recuperableonly); - print '</td></tr>'; - - // Price base - print '<tr><td width="15%">'; - print $langs->trans('PriceBase'); - print '</td>'; - print '<td>'; - print $form->selectPriceBaseType($prodcustprice->price_base_type, "price_base_type"); - print '</td>'; - print '</tr>'; - - // Price - print '<tr><td width="20%">'; - $text = $langs->trans('SellingPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); - print '</td><td>'; - if ($prodcustprice->price_base_type == 'TTC') { - print '<input name="price" size="10" value="'.price($prodcustprice->price_ttc).'">'; } else { - print '<input name="price" size="10" value="'.price($prodcustprice->price).'">'; + print '<form action="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'" method="POST">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="update_customer_price_confirm">'; + print '<input type="hidden" name="lineid" value="'.$prodcustprice->id.'">'; + print '<table class="border centpercent">'; + print '<tr>'; + print '<td>'.$langs->trans('Product').'</td>'; + $staticprod = new Product($db); + $staticprod->fetch($prodcustprice->fk_product); + print "<td>".$staticprod->getNomUrl(1)."</td>"; + print '</tr>'; + + // Ref. Customer + print '<tr><td>'.$langs->trans('RefCustomer').'</td>'; + print '<td><input name="ref_customer" size="12" value="' . dol_escape_htmltag($prodcustprice->ref_customer) . '"></td></tr>'; + + // VAT + print '<tr><td>'.$langs->trans("VATRate").'</td><td>'; + print $form->load_tva("tva_tx", $prodcustprice->tva_tx, $mysoc, '', $staticprod->id, $prodcustprice->recuperableonly); + print '</td></tr>'; + + // Price base + print '<tr><td width="15%">'; + print $langs->trans('PriceBase'); + print '</td>'; + print '<td>'; + print $form->selectPriceBaseType($prodcustprice->price_base_type, "price_base_type"); + print '</td>'; + print '</tr>'; + + // Price + print '<tr><td>'; + $text = $langs->trans('SellingPrice'); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print '</td><td>'; + if ($prodcustprice->price_base_type == 'TTC') { + print '<input name="price" size="10" value="'.price($prodcustprice->price_ttc).'">'; + } else { + print '<input name="price" size="10" value="'.price($prodcustprice->price).'">'; + } + print '</td></tr>'; + + // Price minimum + print '<tr><td>'; + $text = $langs->trans('MinPrice'); + print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); + print '</td><td>'; + if ($prodcustprice->price_base_type == 'TTC') { + print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).'">'; + } else { + print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min).'">'; + } + print '</td></tr>'; + + // Update all child soc + print '<tr><td>'; + print $langs->trans('ForceUpdateChildPriceSoc'); + print '</td>'; + print '<td>'; + print '<input type="checkbox" name="updatechildprice" value="1">'; + print '</td>'; + print '</tr>'; + + print '</table>'; + + print '<br><div class="center">'; + print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">'; + print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; + print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + + print '<br></form>'; } - print '</td></tr>'; - - // Price minimum - print '<tr><td>'; - $text = $langs->trans('MinPrice'); - print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); - print '</td><td>'; - if ($prodcustprice->price_base_type == 'TTC') { - print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).'">'; - } else { - print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min).'">'; - } - print '</td></tr>'; - - // Update all child soc - print '<tr><td width="15%">'; - print $langs->trans('ForceUpdateChildPriceSoc'); - print '</td>'; - print '<td>'; - print '<input type="checkbox" name="updatechildprice" value="1">'; - print '</td>'; - print '</tr>'; - - print '</table>'; - - print '<br><div class="center">'; - print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">'; - print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; - print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - print '</div>'; - - print '<br></form>'; } elseif ($action == 'showlog_customer_price') { print '<br>'; print '<!-- showlog_customer_price -->'."\n"; $filter = array( - 't.fk_product' => GETPOST('prodid', 'int'), 't.fk_soc' => $socid + 't.fk_product' => GETPOST('prodid', 'int'), + 't.fk_soc' => $socid ); // Count total nb of records $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $nbtotalofrecords = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); - } - $result = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); - if ($result < 0) - { + if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); + } else { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + $nbtotalofrecords = $result; + } } $option = '&socid='.GETPOST('socid', 'int').'&prodid='.GETPOST('prodid', 'int'); @@ -465,6 +478,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Product").'</td>'; + print '<td>'.$langs->trans('RefCustomer').'</td>'; print '<td>'.$langs->trans("AppliedPricesFrom").'</td>'; print '<td class="center">'.$langs->trans("PriceBase").'</td>'; print '<td class="right">'.$langs->trans("VAT").'</td>'; @@ -473,15 +487,20 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("HT").'</td>'; print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("TTC").'</td>'; print '<td class="right">'.$langs->trans("ChangedBy").'</td>'; - print '<td>&nbsp;</td>'; + print '<td></td>'; print '</tr>'; foreach ($prodcustprice->lines as $line) { - print '<tr class="oddeven">'; $staticprod = new Product($db); $staticprod->fetch($line->fk_product); + $userstatic = new User($db); + $userstatic->fetch($line->fk_user); + + print '<tr class="oddeven">'; + print "<td>".$staticprod->getNomUrl(1)."</td>"; + print '<td>'.$line->ref_customer.'</td>'; print "<td>".dol_print_date($line->datec, "dayhour")."</td>"; print '<td class="center">'.$langs->trans($line->price_base_type)."</td>"; @@ -492,11 +511,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<td class="right">'.price($line->price_min_ttc).'</td>'; // User - $userstatic = new User($db); - $userstatic->fetch($line->fk_user); print '<td class="right">'; - print $userstatic->getLoginUrl(1); + print $userstatic->getNomUrl(-1); print '</td>'; + print '<td></td>'; } print "</table>"; } else { @@ -509,12 +527,9 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { } else { // View mode - /* ************************************************************************** */ - /* */ - /* Barre d'action */ - /* */ - /* ************************************************************************** */ - + /* + * Action bar + */ print "\n".'<div class="tabsAction">'."\n"; if ($user->rights->produit->creer || $user->rights->service->creer) { @@ -525,14 +540,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Count total nb of records $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $nbtotalofrecords = $prodcustprice->fetch_all('', '', 0, 0, $filter); } $result = $prodcustprice->fetch_all($sortorder, $sortfield, $conf->liste_limit, $offset, $filter); - if ($result < 0) - { + if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } @@ -551,6 +564,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Ref").'</td>'; print '<td>'.$langs->trans("Product").'</td>'; + print '<td>'.$langs->trans('RefCustomer').'</td>'; print '<td>'.$langs->trans("AppliedPricesFrom").'</td>'; print '<td class="center">'.$langs->trans("PriceBase").'</td>'; print '<td class="right">'.$langs->trans("VAT").'</td>'; @@ -559,18 +573,22 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("HT").'</td>'; print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("TTC").'</td>'; print '<td class="right">'.$langs->trans("ChangedBy").'</td>'; - print '<td>&nbsp;</td>'; + print '<td></td>'; print '</tr>'; - if (count($prodcustprice->lines) > 0 || $search_prod) - { + if (count($prodcustprice->lines) > 0 || $search_prod) { print '<tr class="liste_titre">'; print '<td class="liste_titre"><input type="text" class="flat" name="search_prod" value="'.$search_prod.'" size="20"></td>'; print '<td class="liste_titre" ><input type="text" class="flat" name="search_label" value="'.$search_label.'" size="20"></td>'; - print '<td class="liste_titre" colspan="3">&nbsp;</td>'; - print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_price" value="'.$search_price.'" size="10"></td>'; - print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_price_ttc" value="'.$search_price_ttc.'" size="10"></td>'; - print '<td class="liste_titre" colspan="3">&nbsp;</td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre" class="right"><input type="text" class="flat" name="search_price" value="'.$search_price.'" size="10"></td>'; + print '<td class="liste_titre" class="right"><input type="text" class="flat" name="search_price_ttc" value="'.$search_price_ttc.'" size="10"></td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; + print '<td class="liste_titre"></td>'; // Print the search button print '<td class="liste_titre maxwidthsearch">'; $searchpicto = $form->showFilterAndCheckAddButtons(0); @@ -579,36 +597,32 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print '</tr>'; } - if (count($prodcustprice->lines) > 0) - { - foreach ($prodcustprice->lines as $line) - { - print '<tr class="oddeven">'; - + if (count($prodcustprice->lines) > 0) { + foreach ($prodcustprice->lines as $line) { $staticprod = new Product($db); $staticprod->fetch($line->fk_product); + $userstatic = new User($db); + $userstatic->fetch($line->fk_user); + + print '<tr class="oddeven">'; + print "<td>".$staticprod->getNomUrl(1)."</td>"; print "<td>".$staticprod->label."</td>"; + print '<td>'.$line->ref_customer.'</td>'; print "<td>".dol_print_date($line->datec, "dayhour")."</td>"; - print '<td class="center">'.$langs->trans($line->price_base_type)."</td>"; print '<td class="right">'.vatrate($line->tva_tx.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), true, $line->recuperableonly)."</td>"; print '<td class="right">'.price($line->price)."</td>"; print '<td class="right">'.price($line->price_ttc)."</td>"; print '<td class="right">'.price($line->price_min).'</td>'; print '<td class="right">'.price($line->price_min_ttc).'</td>'; - // User - $userstatic = new User($db); - $userstatic->fetch($line->fk_user); print '<td class="right">'; - print $userstatic->getLoginUrl(1); + print $userstatic->getNomUrl(-1); print '</td>'; - // Action - if ($user->rights->produit->creer || $user->rights->service->creer) - { + if ($user->rights->produit->creer || $user->rights->service->creer) { print '<td class="right nowraponall">'; print '<a class="paddingleftonly paddingrightonly" href="'.$_SERVER["PHP_SELF"].'?action=showlog_customer_price&amp;socid='.$object->id.'&amp;prodid='.$line->fk_product.'">'; print img_info(); @@ -627,8 +641,10 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print "</tr>\n"; } } else { - $colspan = 9; - if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan += 1; + $colspan = 10; + if ($user->rights->produit->supprimer || $user->rights->service->supprimer) { + $colspan += 1; + } print '<tr class="oddeven"><td colspan="'.$colspan.'">'.$langs->trans('None').'</td></tr>'; } diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 54be485d6cd..d2ad361034f 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -35,7 +35,9 @@ $langs->loadLangs(array("companies", "projects")); // Security check $socid = GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, '&societe'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -48,7 +50,9 @@ $hookmanager->initHooks(array('projectthirdparty')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} @@ -60,8 +64,7 @@ $contactstatic = new Contact($db); $form = new Form($db); -if ($socid) -{ +if ($socid) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -72,10 +75,14 @@ if ($socid) $result = $object->fetch($socid); $title = $langs->trans("Projects"); - if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name." - ".$title; + if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name." - ".$title; + } llxHeader('', $title); - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = societe_prepare_head($object); print dol_get_fiche_head($head, 'project', $langs->trans("ThirdParty"), -1, 'company'); @@ -89,16 +96,14 @@ if ($socid) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent tableforfield">'; - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->client) - { + if ($object->client) { print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_client)); $tmpcheck = $object->check_codeclient(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -106,11 +111,10 @@ if ($socid) print '</td></tr>'; } - if ($object->fournisseur) - { + if ($object->fournisseur) { print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; + print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur)); $tmpcheck = $object->check_codefournisseur(); if ($tmpcheck != 0 && $tmpcheck != -5) { print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 3547c5a1e9b..2a6dd2176df 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -43,15 +43,23 @@ $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 (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "s.nom"; -if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "s.nom"; +} +if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $id, ''); $object = new Societe($db); @@ -64,51 +72,39 @@ $hookmanager->initHooks(array('contactthirdparty', 'globalcard')); * Actions */ -if ($action == 'addcontact' && $user->rights->societe->creer) -{ +if ($action == 'addcontact' && $user->rights->societe->creer) { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = '<div class="error">'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'</div>'; } else { $mesg = '<div class="error">'.$object->error.'</div>'; } } -} - -// bascule du statut d'un contact -elseif ($action == 'swapstatut' && $user->rights->societe->creer) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && $user->rights->societe->creer) { + // bascule du statut d'un contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { dol_print_error($db); } -} - -// Efface un contact -elseif ($action == 'deletecontact' && $user->rights->societe->creer) -{ +} elseif ($action == 'deletecontact' && $user->rights->societe->creer) { + // Efface un contact $object->fetch($id); - $result = $object->delete_contact($_GET["lineid"]); + $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -145,10 +141,8 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ - if ($object->fetch($id, $ref) > 0) - { +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref) > 0) { $soc = new Societe($db); $soc->fetch($object->socid); @@ -169,41 +163,38 @@ if ($id > 0 || !empty($ref)) // Prospect/Customer /*print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>'; - print $object->getLibCustProspStatut(); - print '</td></tr>'; + print $object->getLibCustProspStatut(); + print '</td></tr>'; - // Supplier - print '<tr><td>'.$langs->trans('Supplier').'</td><td>'; - print yn($object->fournisseur); - print '</td></tr>';*/ + // Supplier + print '<tr><td>'.$langs->trans('Supplier').'</td><td>'; + print yn($object->fournisseur); + print '</td></tr>';*/ - if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { + if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } - if ($object->client) - { - print '<tr><td class="titlefield">'; - print $langs->trans('CustomerCode').'</td><td colspan="3">'; - print $object->code_client; - $tmpcheck = $object->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - } - print '</td></tr>'; + if ($object->client) { + print '<tr><td class="titlefield">'; + print $langs->trans('CustomerCode').'</td><td colspan="3">'; + print $object->code_client; + $tmpcheck = $object->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; + } + print '</td></tr>'; } - if ($object->fournisseur) - { - print '<tr><td class="titlefield">'; - print $langs->trans('SupplierCode').'</td><td colspan="3">'; - print $object->code_fournisseur; - $tmpcheck = $object->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } - print '</td></tr>'; + if ($object->fournisseur) { + print '<tr><td class="titlefield">'; + print $langs->trans('SupplierCode').'</td><td colspan="3">'; + print $object->code_fournisseur; + $tmpcheck = $object->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } + print '</td></tr>'; } print '</table>'; @@ -214,15 +205,15 @@ if ($id > 0 || !empty($ref)) // Contacts lines (modules that overwrite templates must declare this into descriptor) $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl')); - foreach ($dirtpls as $reldir) - { + foreach ($dirtpls as $reldir) { $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); - if ($res) break; + if ($res) { + break; + } } // additionnal list with adherents of company - if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire) - { + if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; @@ -236,17 +227,15 @@ if ($id > 0 || !empty($ref)) $sql .= " t.libelle as type, t.subscription"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql .= ", ".MAIN_DB_PREFIX."adherent_type as t"; - $sql .= " WHERE d.fk_soc = ".$id; + $sql .= " WHERE d.fk_soc = ".((int) $id); $sql .= " AND d.fk_adherent_type = t.rowid"; dol_syslog("get list sql=".$sql); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num > 0) - { + if ($num > 0) { $param = ''; $titre = $langs->trans("MembersListOfTiers"); @@ -267,8 +256,7 @@ if ($id > 0 || !empty($ref)) print "</tr>\n"; $i = 0; - while ($i < $num && $i < $conf->liste_limit) - { + while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($resql); $datefin = $db->jdate($objp->datefin); @@ -319,8 +307,7 @@ if ($id > 0 || !empty($ref)) print "</td>"; // End of subscription date - if ($datefin) - { + if ($datefin) { print '<td class="center nowrap">'; print dol_print_date($datefin, 'day'); if ($memberstatic->hasDelay()) { @@ -329,10 +316,11 @@ if ($id > 0 || !empty($ref)) print '</td>'; } else { print '<td class="left nowrap">'; - if ($objp->subscription == 'yes') - { + if ($objp->subscription == 'yes') { print $langs->trans("SubscriptionNotReceived"); - if ($objp->statut > 0) print " ".img_warning(); + if ($objp->statut > 0) { + print " ".img_warning(); + } } else { print '&nbsp;'; } diff --git a/htdocs/societe/tpl/index.html b/htdocs/societe/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 4f09bebfe71..f67acf2f2d3 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -16,8 +16,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; } @@ -42,7 +41,9 @@ if ($action == 'editsalesrepresentatives') { print '<input type="hidden" name="socid" value="'.$object->id.'" />'; $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); $arrayselected = GETPOST('commercial', 'array'); - if (empty($arrayselected)) $arrayselected = $object->getSalesRepresentatives($user, 1); + if (empty($arrayselected)) { + $arrayselected = $object->getSalesRepresentatives($user, 1); + } print $form->multiselectarray('commercial', $userlist, $arrayselected, null, null, null, null, "90%"); print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'" />'; print '</form>'; @@ -62,9 +63,12 @@ if ($action == 'editsalesrepresentatives') { $userstatic->phone = $val['phone']; $userstatic->job = $val['job']; $userstatic->entity = $val['entity']; + $userstatic->gender = $val['gender']; print $userstatic->getNomUrl(-1); print ' '; } - } else print '<span class="opacitymedium">'.$langs->trans("NoSalesRepresentativeAffected").'</span>'; + } else { + print '<span class="opacitymedium">'.$langs->trans("NoSalesRepresentativeAffected").'</span>'; + } print '</td></tr>'; } diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index ff3108d2427..e34672bfd1d 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -47,19 +47,27 @@ $search_status = GETPOST('search_status'); // Security check $id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int'); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'societe', $socid, '&societe'); $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 (!$sortfield) $sortfield = 't.login'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 't.login'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} // Initialize technical objects $object = new Societe($db); @@ -78,24 +86,27 @@ unset($objectwebsiteaccount->fields['fk_soc']); // Remove this field, we are alr // Initialize array of search criterias $search_all = GETPOST("search_all", 'alpha'); $search = array(); -foreach ($objectwebsiteaccount->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($objectwebsiteaccount->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($objectwebsiteaccount->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($objectwebsiteaccount->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } // Definition of fields for list $arrayfields = array(); -foreach ($objectwebsiteaccount->fields as $key => $val) -{ +foreach ($objectwebsiteaccount->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']); + if (!empty($val['visible'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>$val['enabled']); + } } // Extra fields @@ -105,8 +116,7 @@ $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); -if ($id > 0) -{ +if ($id > 0) { $result = $object->fetch($id); } @@ -117,13 +127,13 @@ if ($id > 0) $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -132,18 +142,15 @@ if (empty($reshook)) 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 - { - foreach ($objectwebsiteaccount->fields as $key => $val) - { + 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 + foreach ($objectwebsiteaccount->fields as $key => $val) { $search[$key] = ''; } $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')) - { + || 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 } @@ -172,14 +179,21 @@ $title = $langs->trans("WebsiteAccounts"); llxHeader('', $title); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($id > 0) $param .= '&id='.urlencode($id); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -foreach ($search as $key => $val) -{ +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); +} +if ($id > 0) { + $param .= '&id='.urlencode($id); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); +} +foreach ($search as $key => $val) { $param .= '&search_'.$key.'='.urlencode($search[$key]); } -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -198,8 +212,7 @@ print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; // Prefix -if (!empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field -{ +if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } @@ -247,29 +260,39 @@ print '<br>'; // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($objectwebsiteaccount->fields as $key => $val) -{ +foreach ($objectwebsiteaccount->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.', ' : ''); +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.', ' : ''); + } +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $objectwebsiteaccount); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql = preg_replace('/, $/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX."societe_account 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)"; -if ($objectwebsiteaccount->ismultientitymanaged == 1) $sql .= " WHERE t.entity IN (".getEntity('societeaccount').")"; -else $sql .= " WHERE 1 = 1"; -$sql .= " AND fk_soc = ".$object->id; -foreach ($search as $key => $val) -{ - $mode_search = (($objectwebsiteaccount->isInt($objectwebsiteaccount->fields[$key]) || $objectwebsiteaccount->isFloat($objectwebsiteaccount->fields[$key])) ? 1 : 0); - if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); +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)"; +} +if ($objectwebsiteaccount->ismultientitymanaged == 1) { + $sql .= " WHERE t.entity IN (".getEntity('societeaccount').")"; +} else { + $sql .= " WHERE 1 = 1"; +} +$sql .= " AND fk_soc = ".((int) $object->id); +foreach ($search as $key => $val) { + $mode_search = (($objectwebsiteaccount->isInt($objectwebsiteaccount->fields[$key]) || $objectwebsiteaccount->isFloat($objectwebsiteaccount->fields[$key])) ? 1 : 0); + 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); } -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'; // Add where from hooks @@ -296,12 +319,10 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -310,8 +331,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; } @@ -325,12 +345,18 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->mymodule->delete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->mymodule->delete) { + $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); +} +if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -361,11 +387,13 @@ $moreforfilter.= '</div>';*/ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $objectwebsiteaccount); // Note that $action and $objectwebsiteaccount may have been modified by hook -if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; -else $moreforfilter = $hookmanager->resPrint; +if (empty($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -382,13 +410,20 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($objectwebsiteaccount->fields as $key => $val) -{ +foreach ($objectwebsiteaccount->fields as $key => $val) { $align = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align = 'center'; - if (in_array($val['type'], array('timestamp'))) $align .= ' nowrap'; - if ($key == 'status') $align .= ($align ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked'])) print '<td class="liste_titre'.($align ? ' '.$align : '').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>'; + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $align = 'center'; + } + if (in_array($val['type'], array('timestamp'))) { + $align .= ' nowrap'; + } + if ($key == 'status') { + $align .= ($align ? ' ' : '').'center'; + } + if (!empty($arrayfields['t.'.$key]['checked'])) { + print '<td class="liste_titre'.($align ? ' '.$align : '').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>'; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -407,13 +442,20 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($objectwebsiteaccount->fields as $key => $val) -{ +foreach ($objectwebsiteaccount->fields as $key => $val) { $align = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align = 'center'; - if (in_array($val['type'], array('timestamp'))) $align .= 'nowrap'; - if ($key == 'status') $align .= ($align ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $align = 'center'; + } + if (in_array($val['type'], array('timestamp'))) { + $align .= 'nowrap'; + } + if ($key == 'status') { + $align .= ($align ? ' ' : '').'center'; + } + if (!empty($arrayfields['t.'.$key]['checked'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; + } } // Extra fields // Extra fields @@ -428,11 +470,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -440,40 +482,54 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $objectwebsiteaccount->id = $obj->rowid; $objectwebsiteaccount->login = $obj->login; $objectwebsiteaccount->ref = $obj->login; - foreach ($objectwebsiteaccount->fields as $key => $val) - { - if (property_exists($obj, $key)) $object->$key = $obj->$key; + foreach ($objectwebsiteaccount->fields as $key => $val) { + if (property_exists($obj, $key)) { + $object->$key = $obj->$key; + } } // Show here line of result print '<tr class="oddeven">'; - foreach ($objectwebsiteaccount->fields as $key => $val) - { + foreach ($objectwebsiteaccount->fields as $key => $val) { $align = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align = 'center'; - if (in_array($val['type'], array('timestamp'))) $align .= 'nowrap'; - if ($key == 'status') $align .= ($align ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $align = 'center'; + } + if (in_array($val['type'], array('timestamp'))) { + $align .= 'nowrap'; + } + if ($key == 'status') { + $align .= ($align ? ' ' : '').'center'; + } + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'; - if ($align) print ' class="'.$align.'"'; + if ($align) { + print ' class="'.$align.'"'; + } print '>'; - if ($key == 'login') print $objectwebsiteaccount->getNomUrl(1, '', 0, '', 1); - else print $objectwebsiteaccount->showOutputField($val, $key, $obj->$key, ''); + if ($key == 'login') { + print $objectwebsiteaccount->getNomUrl(1, '', 0, '', 1); + } else { + print $objectwebsiteaccount->showOutputField($val, $key, $obj->$key, ''); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $obj->$key; } } @@ -486,14 +542,17 @@ while ($i < min($num, $limit)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'; @@ -505,10 +564,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -524,10 +586,11 @@ print '</div>'."\n"; print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/stripe/admin/index.html b/htdocs/stripe/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index c304a00ce3f..e6cfb8a1533 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -2,7 +2,7 @@ /* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com> * Copyright (C) 2017 Saasprov <saasprov@gmail.com> - * Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> + * Copyright (C) 2018-2021 Thibault FOUCART <support@ptibogxiv.net> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify @@ -37,7 +37,12 @@ $servicename = 'Stripe'; // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'paypal', 'paybox', 'stripe')); -if (!$user->admin) accessforbidden(); +if (empty($user->admin)) { + accessforbidden(); +} +if (empty($conf->stripe->enabled)) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); @@ -46,64 +51,79 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) -{ +if ($action == 'setvalue' && $user->admin) { $db->begin(); if (empty($conf->stripeconnect->enabled)) { $result = dolibarr_set_const($db, "STRIPE_TEST_PUBLISHABLE_KEY", GETPOST('STRIPE_TEST_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_TEST_SECRET_KEY", GETPOST('STRIPE_TEST_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_ID", GETPOST('STRIPE_TEST_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_KEY", GETPOST('STRIPE_TEST_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_LIVE_PUBLISHABLE_KEY", GETPOST('STRIPE_LIVE_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_LIVE_SECRET_KEY", GETPOST('STRIPE_LIVE_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_ID", GETPOST('STRIPE_LIVE_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_KEY", GETPOST('STRIPE_LIVE_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CREDITOR", GETPOST('ONLINE_PAYMENT_CREDITOR', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "STRIPE_USER_ACCOUNT_FOR_ACTIONS", GETPOST('STRIPE_USER_ACCOUNT_FOR_ACTIONS', 'int'), 'chaine', 0, '', $conf->entity); if (!$result > 0) { $error++; } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_FORM", GETPOST('ONLINE_PAYMENT_MESSAGE_FORM', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_OK", GETPOST('ONLINE_PAYMENT_MESSAGE_OK', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_KO", GETPOST('ONLINE_PAYMENT_MESSAGE_KO', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_SENDEMAIL", GETPOST('ONLINE_PAYMENT_SENDEMAIL'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) + if (!$result > 0) { $error++; + } // Stock decrement //$result = dolibarr_set_const($db, "ONLINE_PAYMENT_WAREHOUSE", (GETPOST('ONLINE_PAYMENT_WAREHOUSE', 'alpha') > 0 ? GETPOST('ONLINE_PAYMENT_WAREHOUSE', 'alpha') : ''), 'chaine', 0, '', $conf->entity); //if (! $result > 0) @@ -130,8 +150,7 @@ if ($action == 'setvalue' && $user->admin) } } -if ($action == "setlive") -{ +if ($action == "setlive") { $liveenable = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable, 'yesno', 0, '', $conf->entity); if ($res > 0) { @@ -188,38 +207,32 @@ if ($conf->use_javascript_ajax) { } print '</td><td></td></tr>'; -if (empty($conf->stripeconnect->enabled)) -{ +if (empty($conf->stripeconnect->enabled)) { print '<tr class="oddeven"><td>'; print '<span class="fieldrequired">'.$langs->trans("STRIPE_TEST_PUBLISHABLE_KEY").'</span></td><td>'; - print '<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_TEST_PUBLISHABLE_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_TEST_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_TEST_PUBLISHABLE_KEY.'" placeholder="'.$langs->trans("Example").': pk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; print '</td><td></td></tr>'; print '<tr class="oddeven"><td>'; print '<span class="titlefield fieldrequired">'.$langs->trans("STRIPE_TEST_SECRET_KEY").'</span></td><td>'; - print '<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="'.$conf->global->STRIPE_TEST_SECRET_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx<</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_TEST_SECRET_KEY" value="'.$conf->global->STRIPE_TEST_SECRET_KEY.'" placeholder="'.$langs->trans("Example").': sk_test_xxxxxxxxxxxxxxxxxxxxxxxx">'; print '</td><td></td></tr>'; print '<tr class="oddeven"><td>'; print '<span class="titlefield">'.$langs->trans("STRIPE_TEST_WEBHOOK_KEY").'</span></td><td>'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_ID" value="'.$conf->global->STRIPE_TEST_WEBHOOK_ID.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx</span><br>'; + print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_ID" value="'.$conf->global->STRIPE_TEST_WEBHOOK_ID.'" placeholder="'.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx">'; + print '<br>'; } - print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.$conf->global->STRIPE_TEST_WEBHOOK_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_TEST_WEBHOOK_KEY" value="'.$conf->global->STRIPE_TEST_WEBHOOK_KEY.'" placeholder="'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">'; $out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForTestWebhook").'</span> '; $url = dol_buildpath('/public/stripe/ipn.php?test', 3); $out .= '<input type="text" id="onlinetestwebhookurl" class="minwidth500" value="'.$url.'" disabled>'; $out .= ajax_autoselect("onlinetestwebhookurl", 0); print '<br>'.$out; print '</td><td>'; - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { - if (!empty($conf->global->STRIPE_TEST_WEBHOOK_KEY) && !empty($conf->global->STRIPE_TEST_SECRET_KEY) && !empty($conf->global->STRIPE_TEST_WEBHOOK_ID)) - { + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { + if (!empty($conf->global->STRIPE_TEST_WEBHOOK_KEY) && !empty($conf->global->STRIPE_TEST_SECRET_KEY) && !empty($conf->global->STRIPE_TEST_WEBHOOK_ID)) { \Stripe\Stripe::setApiKey($conf->global->STRIPE_TEST_SECRET_KEY); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_TEST_WEBHOOK_ID); $endpoint->enabled_events = $stripearrayofwebhookevents; @@ -232,8 +245,7 @@ if (empty($conf->stripeconnect->enabled)) } $endpoint->url = dol_buildpath('/public/stripe/ipn.php?test', 3); $endpoint->save(); - if ($endpoint->status == 'enabled') - { + if ($endpoint->status == 'enabled') { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=ipn&webhook='.$endpoint->id.'&status=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -242,13 +254,13 @@ if (empty($conf->stripeconnect->enabled)) } //print $endpoint; } else { - print img_picto($langs->trans("inactive"), 'statut5'); + print img_picto($langs->trans("Inactive"), 'statut5'); } } print'</td></tr>'; } else { print '<tr class="oddeven"><td>'.$langs->trans("StripeConnect").'</td>'; - print '<td><b>'.$langs->trans("StripeConnect_Mode").'</b><br/>'; + print '<td><b>'.$langs->trans("StripeConnect_Mode").'</b><br>'; print $langs->trans("STRIPE_APPLICATION_FEE_PLATFORM").' '; print price($conf->global->STRIPE_APPLICATION_FEE_PERCENT); print '% + '; @@ -257,38 +269,32 @@ if (empty($conf->stripeconnect->enabled)) print '</td><td></td></tr>'; } -if (empty($conf->stripeconnect->enabled)) -{ +if (empty($conf->stripeconnect->enabled)) { print '<tr class="oddeven"><td>'; print '<span class="fieldrequired">'.$langs->trans("STRIPE_LIVE_PUBLISHABLE_KEY").'</span></td><td>'; - print '<input class="minwidth300" type="text" name="STRIPE_LIVE_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_LIVE_PUBLISHABLE_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': pk_live_xxxxxxxxxxxxxxxxxxxxxxxx</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_LIVE_PUBLISHABLE_KEY" value="'.$conf->global->STRIPE_LIVE_PUBLISHABLE_KEY.'" placeholder="'.$langs->trans("Example").': pk_live_xxxxxxxxxxxxxxxxxxxxxxxx">'; print '</td><td></td></tr>'; print '<tr class="oddeven"><td>'; print '<span class="fieldrequired">'.$langs->trans("STRIPE_LIVE_SECRET_KEY").'</span></td><td>'; - print '<input class="minwidth300" type="text" name="STRIPE_LIVE_SECRET_KEY" value="'.$conf->global->STRIPE_LIVE_SECRET_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': sk_live_xxxxxxxxxxxxxxxxxxxxxxxx</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_LIVE_SECRET_KEY" value="'.$conf->global->STRIPE_LIVE_SECRET_KEY.'" placeholder="'.$langs->trans("Example").': sk_live_xxxxxxxxxxxxxxxxxxxxxxxx">'; print '</td><td></td></tr>'; print '<tr class="oddeven"><td>'; print '<span class="titlefield">'.$langs->trans("STRIPE_LIVE_WEBHOOK_KEY").'</span></td><td>'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_ID" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_ID.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx</span><br>'; + print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_ID" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_ID.'" placeholder="'.$langs->trans("Example").': we_xxxxxxxxxxxxxxxxxxxxxxxx">'; + print '<br>'; } - print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_KEY.'">'; - print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx</span>'; + print '<input class="minwidth300" type="text" name="STRIPE_LIVE_WEBHOOK_KEY" value="'.$conf->global->STRIPE_LIVE_WEBHOOK_KEY.'" placeholder="'.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx">'; $out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForLiveWebhook").'</span> '; $url = dol_buildpath('/public/stripe/ipn.php', 3); $out .= '<input type="text" id="onlinelivewebhookurl" class="minwidth500" value="'.$url.'" disabled>'; $out .= ajax_autoselect("onlinelivewebhookurl", 0); print '<br>'.$out; print '</td><td>'; - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { - if (!empty($conf->global->STRIPE_LIVE_WEBHOOK_KEY) && !empty($conf->global->STRIPE_LIVE_SECRET_KEY) && !empty($conf->global->STRIPE_LIVE_WEBHOOK_ID)) - { + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { + if (!empty($conf->global->STRIPE_LIVE_WEBHOOK_KEY) && !empty($conf->global->STRIPE_LIVE_SECRET_KEY) && !empty($conf->global->STRIPE_LIVE_WEBHOOK_ID)) { \Stripe\Stripe::setApiKey($conf->global->STRIPE_LIVE_SECRET_KEY); $endpoint = \Stripe\WebhookEndpoint::retrieve($conf->global->STRIPE_LIVE_WEBHOOK_ID); $endpoint->enabled_events = $stripearrayofwebhookevents; @@ -301,8 +307,7 @@ if (empty($conf->stripeconnect->enabled)) } $endpoint->url = dol_buildpath('/public/stripe/ipn.php', 3); $endpoint->save(); - if ($endpoint->status == 'enabled') - { + if ($endpoint->status == 'enabled') { print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=ipn&webhook='.$endpoint->id.'&status=0">'; print img_picto($langs->trans("Activated"), 'switch_on'); } else { @@ -311,7 +316,7 @@ if (empty($conf->stripeconnect->enabled)) } //print $endpoint; } else { - print img_picto($langs->trans("inactive"), 'statut5'); + print img_picto($langs->trans("Inactive"), 'statut5'); } } print '</td></tr>'; @@ -351,8 +356,7 @@ print img_picto('', 'bank_account').' '; $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print '</td></tr>'; -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ? -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // What is this for ? print '<tr class="oddeven"><td>'; print $langs->trans("BankAccountForBankTransfer").'</td><td>'; $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS, 'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0, '', 1); @@ -360,8 +364,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ? } // Activate Payment Request API -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code print '<tr class="oddeven"><td>'; print $langs->trans("STRIPE_PAYMENT_REQUEST_API").'</td><td>'; if ($conf->use_javascript_ajax) { @@ -374,8 +377,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code } // Activate SEPA DIRECT_DEBIT -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code print '<tr class="oddeven"><td>'; print $langs->trans("STRIPE_SEPA_DIRECT_DEBIT").'</td><td>'; if ($conf->use_javascript_ajax) { @@ -387,9 +389,22 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code print '</td></tr>'; } +// Activate Bancontact +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code + print '<tr class="oddeven"><td>'; + print $langs->trans("STRIPE_BANCONTACT").'</td><td>'; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_BANCONTACT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_BANCONTACT", $arrval, $conf->global->STRIPE_BANCONTACT); + } + print ' &nbsp; <span class="opacitymedium">'.$langs->trans("ExampleOnlyForBECustomers").'</span>'; + print '</td></tr>'; +} + // Activate iDEAL -if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code -{ +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code print '<tr class="oddeven"><td>'; print $langs->trans("STRIPE_IDEAL").'</td><td>'; if ($conf->use_javascript_ajax) { @@ -402,6 +417,34 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code print '</td></tr>'; } +// Activate Giropay +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code + print '<tr class="oddeven"><td>'; + print $langs->trans("STRIPE_GIROPAY").'</td><td>'; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_GIROPAY'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_GIROPAY", $arrval, $conf->global->STRIPE_GIROPAY); + } + print ' &nbsp; <span class="opacitymedium">'.$langs->trans("ExampleOnlyForDECustomers").'</span>'; + print '</td></tr>'; +} + +// Activate Sofort +if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code + print '<tr class="oddeven"><td>'; + print $langs->trans("STRIPE_SOFORT").'</td><td>'; + if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STRIPE_SOFORT'); + } else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STRIPE_SOFORT", $arrval, $conf->global->STRIPE_SOFORT); + } + print ' &nbsp; <span class="opacitymedium">'.$langs->trans("ExampleOnlyForATBEDEITNLESCustomers").'</span>'; + print '</td></tr>'; +} + // Warehouse for automatic decrement //if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment //{ @@ -493,10 +536,9 @@ $token = ''; include DOL_DOCUMENT_ROOT.'/core/tpl/onlinepaymentlinks.tpl.php'; -print info_admin($langs->trans("ExampleOfTestCreditCard", '4242424242424242 (no 3DSecure) or 4000000000003063 (3DSecure required) or 4000002760003184 (3DSecure2 required on all transaction) or 4000003800000446 (3DSecure2 required the off-seesion allowed)', '4000000000000101', '4000000000000069', '4000000000000341')); +print info_admin($langs->trans("ExampleOfTestCreditCard", '4242424242424242 (no 3DSecure) or 4000000000003063 (3DSecure required) or 4000002760003184 (3DSecure2 required on all transaction) or 4000003800000446 (3DSecure2 required, the off-session allowed)', '4000000000000101', '4000000000000069', '4000000000000341')); -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".'<script type="text/javascript">'; print '$(document).ready(function () { $("#apidoc").hide(); diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index beadfee1a89..c6a07593a04 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -26,14 +26,18 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -41,11 +45,14 @@ $rowid = GETPOST("rowid", 'alpha'); $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; +$result = restrictedArea($user, 'banque'); /* @@ -60,8 +67,7 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripeChargeList")); -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) -{ +if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); @@ -80,11 +86,12 @@ if (!$rowid) { $option = array('limit' => $limit + 1); $num = 0; - if (GETPOSTISSET('starting_after_'.$page)) $option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml'); + if (GETPOSTISSET('starting_after_'.$page)) { + $option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml'); + } try { - if ($stripeacc) - { + if ($stripeacc) { $list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc)); } else { $list = \Stripe\Charge::all($option); @@ -96,7 +103,9 @@ if (!$rowid) { $param = ''; //if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } $param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id; //$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id; @@ -106,7 +115,9 @@ if (!$rowid) { } print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -135,8 +146,7 @@ if (!$rowid) { //print $list; $i = 0; - foreach ($list->data as $charge) - { + foreach ($list->data as $charge) { if ($i >= $limit) { break; } @@ -179,17 +189,14 @@ if (!$rowid) { // Save into $tmparray all metadata $tmparray = dolExplodeIntoArray($FULLTAG, '.', '='); // Load origin object according to metadata - if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) - { + if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0) { $societestatic->fetch($tmparray['CUS']); - } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) - { + } elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0) { $societestatic->fetch($charge->metadata->dol_thirdparty_id); } else { $societestatic->id = 0; } - if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) - { + if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0) { $memberstatic->fetch($tmparray['MEM']); } else { $memberstatic->id = 0; @@ -197,40 +204,41 @@ if (!$rowid) { print '<tr class="oddeven">'; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } // Ref $url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id; - if ($servicestatus) - { + if ($servicestatus) { $url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id; } print "<td>"; print "<a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id."</a>"; - if ($charge->payment_intent) print '<br><span class="opacitymedium">'.$charge->payment_intent.'</span>'; + if ($charge->payment_intent) { + print '<br><span class="opacitymedium">'.$charge->payment_intent.'</span>'; + } print "</td>\n"; // Stripe customer print "<td>"; - if (!empty($conf->stripe->enabled) && !empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($conf->stripe->enabled) && !empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer; - if ($servicestatus) - { + if ($servicestatus) { $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer; } - if (!empty($charge->customer)) - { + if (!empty($charge->customer)) { print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.'</a>'; } print "</td>\n"; // Link print "<td>"; - if ($societestatic->id > 0) - { + if ($societestatic->id > 0) { print $societestatic->getNomUrl(1); - } elseif ($memberstatic->id > 0) - { + } elseif ($memberstatic->id > 0) { print $memberstatic->getNomUrl(1); } print "</td>\n"; diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php index 159444bb029..e44f3480042 100644 --- a/htdocs/stripe/class/actions_stripe.class.php +++ b/htdocs/stripe/class/actions_stripe.class.php @@ -71,25 +71,21 @@ class ActionsStripeconnect { global $db, $conf, $user, $langs, $form; - if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) - { + if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { $service = 'StripeLive'; } - if (is_array($parameters) && !empty($parameters)) - { - foreach ($parameters as $key=>$value) - { + if (is_array($parameters) && !empty($parameters)) { + foreach ($parameters as $key => $value) { $key = $value; } } - if (is_object($object) && $object->element == 'societe') - { + if (is_object($object) && $object->element == 'societe') { $this->resprints .= '<tr><td>'; $this->resprints .= '<table width="100%" class="nobordernopadding"><tr><td>'; $this->resprints .= $langs->trans('StripeCustomer'); @@ -195,20 +191,16 @@ class ActionsStripeconnect $resteapayer = $object->total_ttc - $totalpaye; // Request a direct debit order - if ($object->statut > Facture::STATUS_DRAFT && $object->statut < Facture::STATUS_ABANDONED && $object->paye == 0) - { + if ($object->statut > Facture::STATUS_DRAFT && $object->statut < Facture::STATUS_ABANDONED && $object->paye == 0) { $stripe = new Stripe($this->db); - if ($resteapayer > 0) - { - if ($stripe->getStripeAccount($conf->entity)) // a modifier avec droit stripe - { + if ($resteapayer > 0) { + if ($stripe->getStripeAccount($conf->entity)) { // a modifier avec droit stripe $langs->load("withdrawals"); print '<a class="butActionDelete" href="'.dol_buildpath('/stripeconnect/payment.php?facid='.$object->id.'&action=create', 1).'" title="'.dol_escape_htmltag($langs->trans("StripeConnectPay")).'">'.$langs->trans("StripeConnectPay").'</a>'; } else { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("StripeConnectPay").'</a>'; } - } elseif ($resteapayer == 0) - { + } elseif ($resteapayer == 0) { print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("StripeConnectPay").'</a>'; } } else { diff --git a/htdocs/stripe/class/index.html b/htdocs/stripe/class/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/stripe/class/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index c2029c7133d..7f325090b5e 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> +/* Copyright (C) 2018-2021 Thibault FOUCART <support@ptibogxiv.net> * * 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 @@ -91,14 +91,16 @@ class Stripe extends CommonObject global $conf; $key = ''; - if ($entity < 0) $entity = $conf->entity; + if ($entity < 0) { + $entity = $conf->entity; + } $sql = "SELECT tokenstring"; $sql .= " FROM ".MAIN_DB_PREFIX."oauth_token"; $sql .= " WHERE service = '".$this->db->escape($mode)."'"; $sql .= " AND entity = ".((int) $entity); if ($fk_soc > 0) { - $sql .= " AND fk_soc = ".$fk_soc; + $sql .= " AND fk_soc = ".((int) $fk_soc); } else { $sql .= " AND fk_soc IS NULL"; } @@ -155,8 +157,7 @@ class Stripe extends CommonObject { global $conf, $user; - if (empty($object->id)) - { + if (empty($object->id)) { dol_syslog("customerStripe is called with the parameter object that is not loaded"); return null; } @@ -193,8 +194,7 @@ class Stripe extends CommonObject //$customer = \Stripe\Customer::retrieve("$tiers", array("stripe_account" => $key)); $customer = \Stripe\Customer::retrieve(array('id'=>"$tiers", 'expand[]'=>'sources'), array("stripe_account" => $key)); } - } catch (Exception $e) - { + } catch (Exception $e) { // For exemple, we may have error: 'No such customer: cus_XXXXX; a similar object exists in live mode, but a test mode key was used to make this request.' $this->error = $e->getMessage(); } @@ -234,13 +234,10 @@ class Stripe extends CommonObject } // Create the VAT record in Stripe - if (!empty($conf->global->STRIPE_SAVE_TAX_IDS)) // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer - { - if (!empty($vatcleaned)) - { + if (!empty($conf->global->STRIPE_SAVE_TAX_IDS)) { // We setup to save Tax info on Stripe side. Warning: This may result in error when saving customer + if (!empty($vatcleaned)) { $isineec = isInEEC($object); - if ($object->country_code && $isineec) - { + if ($object->country_code && $isineec) { //$taxids = $customer->allTaxIds($customer->id); $customer->createTaxId($customer->id, array('type'=>'eu_vat', 'value'=>$vatcleaned)); } @@ -251,12 +248,10 @@ class Stripe extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_account (fk_soc, login, key_account, site, site_account, status, entity, date_creation, fk_user_creat)"; $sql .= " VALUES (".$object->id.", '', '".$this->db->escape($customer->id)."', 'stripe', '".$this->db->escape($stripearrayofkeysbyenv[$status]['publishable_key'])."', ".$status.", ".$conf->entity.", '".$this->db->idate(dol_now())."', ".$user->id.")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); } - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); } } @@ -288,8 +283,7 @@ class Stripe extends CommonObject } else { $stripepaymentmethod = \Stripe\PaymentMethod::retrieve(''.$paymentmethod->id.'', array("stripe_account" => $key)); } - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); } @@ -325,16 +319,22 @@ class Stripe extends CommonObject { global $conf, $user; - dol_syslog("getPaymentIntent", LOG_INFO, 1); + dol_syslog(get_class($this)."::getPaymentIntent", LOG_INFO, 1); $error = 0; - if (empty($status)) $service = 'StripeTest'; - else $service = 'StripeLive'; + if (empty($status)) { + $service = 'StripeTest'; + } else { + $service = 'StripeLive'; + } $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (!in_array($currency_code, $arrayzerounitcurrency)) $stripeamount = $amount * 100; - else $stripeamount = $amount; + if (!in_array($currency_code, $arrayzerounitcurrency)) { + $stripeamount = $amount * 100; + } else { + $stripeamount = $amount; + } $fee = $amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE; if ($fee >= $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL && $conf->global->STRIPE_APPLICATION_FEE_MAXIMAL > $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) { @@ -350,8 +350,7 @@ class Stripe extends CommonObject $paymentintent = null; - if (is_object($object) && !empty($conf->global->STRIPE_REUSE_EXISTING_INTENT_IF_FOUND)) - { + if (is_object($object) && !empty($conf->global->STRIPE_REUSE_EXISTING_INTENT_IF_FOUND)) { // Warning. If a payment was tried and failed, a payment intent was created. // But if we change something on object to pay (amount or other that does not change the idempotency key), reusing same payment intent is not allowed by Stripe. // Recommended solution is to recreate a new payment intent each time we need one (old one will be automatically closed by Stripe after a delay), Stripe will @@ -369,8 +368,7 @@ class Stripe extends CommonObject $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $this->db->fetch_object($resql); $intent = $obj->ext_payment_id; @@ -386,8 +384,7 @@ class Stripe extends CommonObject } else { $paymentintent = \Stripe\PaymentIntent::retrieve($intent, array("stripe_account" => $key)); } - } - catch (Exception $e) { + } catch (Exception $e) { $error++; $this->error = $e->getMessage(); } @@ -395,21 +392,35 @@ class Stripe extends CommonObject } } - if (empty($paymentintent)) - { + if (empty($paymentintent)) { + // Try to create intent. See https://stripe.com/docs/api/payment_intents/create $ipaddress = getUserRemoteIP(); $metadata = array('dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress); - if (is_object($object)) - { + if (is_object($object)) { $metadata['dol_type'] = $object->element; $metadata['dol_id'] = $object->id; - if (is_object($object->thirdparty) && $object->thirdparty->id > 0) $metadata['dol_thirdparty_id'] = $object->thirdparty->id; + if (is_object($object->thirdparty) && $object->thirdparty->id > 0) { + $metadata['dol_thirdparty_id'] = $object->thirdparty->id; + } } // list of payment method types $paymentmethodtypes = array("card"); - if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC()) - if (!empty($conf->global->STRIPE_IDEAL)) $paymentmethodtypes[] = "ideal"; //&& ($object->thirdparty->isInEEC()) + if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) { + $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC()) + } + if (!empty($conf->global->STRIPE_BANCONTACT)) { + $paymentmethodtypes[] = "bancontact"; + } + if (!empty($conf->global->STRIPE_IDEAL)) { + $paymentmethodtypes[] = "ideal"; + } + if (!empty($conf->global->STRIPE_GIROPAY)) { + $paymentmethodtypes[] = "giropay"; + } + if (!empty($conf->global->STRIPE_SOFORT)) { + $paymentmethodtypes[] = "sofort"; + } $dataforintent = array( "confirm" => $confirmnow, // Do not confirm immediatly during creation of intent @@ -423,28 +434,32 @@ class Stripe extends CommonObject "setup_future_usage" => "on_session", "metadata" => $metadata ); - if (!is_null($customer)) $dataforintent["customer"] = $customer; + if (!is_null($customer)) { + $dataforintent["customer"] = $customer; + } // payment_method = // payment_method_types = array('card') //var_dump($dataforintent); - if ($off_session) - { + if ($off_session) { unset($dataforintent['setup_future_usage']); + // We can't use both "setup_future_usage" = "off_session" and "off_session" = true. + // Because $off_session parameter is dedicated to create paymentintent off_line (and not future payment), we need to use "off_session" = true. //$dataforintent["setup_future_usage"] = "off_session"; $dataforintent["off_session"] = true; } - if (!is_null($payment_method)) - { + if (!empty($conf->global->STRIPE_GIROPAY)) { + unset($dataforintent['setup_future_usage']); + } + + if (!is_null($payment_method)) { $dataforintent["payment_method"] = $payment_method; $description .= ' - '.$payment_method; } - if ($conf->entity != $conf->global->STRIPECONNECT_PRINCIPAL && $stripefee > 0) - { + if ($conf->entity != $conf->global->STRIPECONNECT_PRINCIPAL && $stripefee > 0) { $dataforintent["application_fee_amount"] = $stripefee; } - if ($usethirdpartyemailforreceiptemail && is_object($object) && $object->thirdparty->email) - { + if ($usethirdpartyemailforreceiptemail && is_object($object) && $object->thirdparty->email) { $dataforintent["receipt_email"] = $object->thirdparty->email; } @@ -461,11 +476,13 @@ class Stripe extends CommonObject if (!empty($key)) { // If the Stripe connect account not set, we use common API usage $arrayofoptions["stripe_account"] = $key; } + + dol_syslog("dataforintent to create paymentintent = ".var_export($dataforintent, true)); + $paymentintent = \Stripe\PaymentIntent::create($dataforintent, $arrayofoptions); // Store the payment intent - if (is_object($object)) - { + if (is_object($object)) { $paymentintentalreadyexists = 0; // Check that payment intent $paymentintent->id is not already recorded. $sql = "SELECT pi.rowid"; @@ -478,22 +495,23 @@ class Stripe extends CommonObject $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $this->db->fetch_object($resql); - if ($obj) $paymentintentalreadyexists++; + if ($obj) { + $paymentintentalreadyexists++; + } } - } else dol_print_error($this->db); + } else { + dol_print_error($this->db); + } // If not, we create it. - if (!$paymentintentalreadyexists) - { + if (!$paymentintentalreadyexists) { $now = dol_now(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture_demande (date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site, amount)"; $sql .= " VALUES ('".$this->db->idate($now)."', ".$user->id.", '".$this->db->escape($paymentintent->id)."', ".$object->id.", '".$this->db->escape($object->element)."', ".$conf->entity.", '".$this->db->escape($service)."', ".$amount.")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $error++; $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::PaymentIntent failed to insert paymentintent with id=".$paymentintent->id." into database."); @@ -502,20 +520,18 @@ class Stripe extends CommonObject } else { $_SESSION["stripe_payment_intent"] = $paymentintent; } - } catch (Stripe\Error\Card $e) - { + } catch (Stripe\Error\Card $e) { $error++; $this->error = $e->getMessage(); $this->code = $e->getStripeCode(); $this->declinecode = $e->getDeclineCode(); - } catch (Exception $e) - { + } catch (Exception $e) { /*var_dump($dataforintent); - var_dump($description); - var_dump($key); - var_dump($paymentintent); - var_dump($e->getMessage()); - var_dump($e);*/ + var_dump($description); + var_dump($key); + var_dump($paymentintent); + var_dump($e->getMessage()); + var_dump($e);*/ $error++; $this->error = $e->getMessage(); $this->code = ''; @@ -523,10 +539,9 @@ class Stripe extends CommonObject } } - dol_syslog("getPaymentIntent return error=".$error." this->error=".$this->error, LOG_INFO, -1); + dol_syslog(get_class($this)."::getPaymentIntent return error=".$error." this->error=".$this->error, LOG_INFO, -1); - if (!$error) - { + if (!$error) { return $paymentintent; } else { return null; @@ -560,26 +575,40 @@ class Stripe extends CommonObject $error = 0; - if (empty($status)) $service = 'StripeTest'; - else $service = 'StripeLive'; + if (empty($status)) { + $service = 'StripeTest'; + } else { + $service = 'StripeLive'; + } $setupintent = null; - if (empty($setupintent)) - { + if (empty($setupintent)) { $ipaddress = getUserRemoteIP(); $metadata = array('dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress); - if (is_object($object)) - { + if (is_object($object)) { $metadata['dol_type'] = $object->element; $metadata['dol_id'] = $object->id; - if (is_object($object->thirdparty) && $object->thirdparty->id > 0) $metadata['dol_thirdparty_id'] = $object->thirdparty->id; + if (is_object($object->thirdparty) && $object->thirdparty->id > 0) { + $metadata['dol_thirdparty_id'] = $object->thirdparty->id; + } } // list of payment method types $paymentmethodtypes = array("card"); - if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC()) - // iDEAL not supported with setupIntent + if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) { + $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC()) + } + if (!empty($conf->global->STRIPE_BANCONTACT)) { + $paymentmethodtypes[] = "bancontact"; + } + if (!empty($conf->global->STRIPE_IDEAL)) { + $paymentmethodtypes[] = "ideal"; + } + // Giropay not possible for setup intent + if (!empty($conf->global->STRIPE_SOFORT)) { + $paymentmethodtypes[] = "sofort"; + } $dataforintent = array( "confirm" => $confirmnow, // Do not confirm immediatly during creation of intent @@ -587,14 +616,17 @@ class Stripe extends CommonObject "usage" => "off_session", "metadata" => $metadata ); - if (!is_null($customer)) $dataforintent["customer"] = $customer; - if (!is_null($description)) $dataforintent["description"] = $description; + if (!is_null($customer)) { + $dataforintent["customer"] = $customer; + } + if (!is_null($description)) { + $dataforintent["description"] = $description; + } // payment_method = // payment_method_types = array('card') //var_dump($dataforintent); - if ($usethirdpartyemailforreceiptemail && is_object($object) && $object->thirdparty->email) - { + if ($usethirdpartyemailforreceiptemail && is_object($object) && $object->thirdparty->email) { $dataforintent["receipt_email"] = $object->thirdparty->email; } @@ -657,8 +689,7 @@ class Stripe extends CommonObject { $_SESSION["stripe_setup_intent"] = $setupintent; }*/ - } catch (Exception $e) - { + } catch (Exception $e) { /*var_dump($dataforintent); var_dump($description); var_dump($key); @@ -669,8 +700,7 @@ class Stripe extends CommonObject } } - if (!$error) - { + if (!$error) { dol_syslog("getSetupIntent ".(is_object($setupintent) ? $setupintent->id : ''), LOG_INFO, -1); return $setupintent; } else { @@ -705,24 +735,20 @@ class Stripe extends CommonObject $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $this->db->fetch_object($resql); $cardref = $obj->stripe_card_ref; dol_syslog(get_class($this)."::cardStripe cardref=".$cardref); - if ($cardref) - { + if ($cardref) { try { if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) - { + if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) { $card = $cu->sources->retrieve($cardref); } else { $card = \Stripe\PaymentMethod::retrieve($cardref); } } else { - if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) - { + if (!preg_match('/^pm_/', $cardref) && !empty($cu->sources)) { //$card = $cu->sources->retrieve($cardref, array("stripe_account" => $stripeacc)); // this API fails when array stripe_account is provided $card = $cu->sources->retrieve($cardref); } else { @@ -730,13 +756,11 @@ class Stripe extends CommonObject $card = \Stripe\PaymentMethod::retrieve($cardref); } } - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); } - } elseif ($createifnotlinkedtostripe) - { + } elseif ($createifnotlinkedtostripe) { $exp_date_month = $obj->exp_date_month; $exp_date_year = $obj->exp_date_year; $number = $obj->number; @@ -754,20 +778,19 @@ class Stripe extends CommonObject //var_dump($a);var_dump($stripeacc);exit; try { if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { dol_syslog("Try to create card with dataforcard = ".json_encode($dataforcard)); $card = $cu->sources->create($dataforcard); - if (!$card) - { + if (!$card) { $this->error = 'Creation of card on Stripe has failed'; } } else { $connect = ''; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$cu->id; - if ($status) - { + if ($status) { $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$cu->id; } $urtoswitchonstripe = ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').'</a>'; @@ -776,20 +799,19 @@ class Stripe extends CommonObject $this->error = $langs->trans('CreationOfPaymentModeMustBeDoneFromStripeInterface', $urtoswitchonstripe); } } else { - if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) - { + if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION)) { dol_syslog("Try to create card with dataforcard = ".json_encode($dataforcard)); $card = $cu->sources->create($dataforcard, array("stripe_account" => $stripeacc)); - if (!$card) - { + if (!$card) { $this->error = 'Creation of card on Stripe has failed'; } } else { $connect = ''; - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$cu->id; - if ($status) - { + if ($status) { $url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$cu->id; } $urtoswitchonstripe = ' <a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').'</a>'; @@ -799,8 +821,7 @@ class Stripe extends CommonObject } } - if ($card) - { + if ($card) { $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib"; $sql .= " SET stripe_card_ref = '".$this->db->escape($card->id)."', card_type = '".$this->db->escape($card->brand)."',"; $sql .= " country_code = '".$this->db->escape($card->country)."',"; @@ -808,13 +829,11 @@ class Stripe extends CommonObject $sql .= " WHERE rowid = ".$object->id; $sql .= " AND type = 'card'"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); } } - } catch (Exception $e) - { + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); } @@ -849,8 +868,11 @@ class Stripe extends CommonObject $error = 0; - if (empty($status)) $service = 'StripeTest'; - else $service = 'StripeLive'; + if (empty($status)) { + $service = 'StripeTest'; + } else { + $service = 'StripeLive'; + } $sql = "SELECT sa.key_account as key_account, sa.fk_soc, sa.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_account as sa"; @@ -872,11 +894,16 @@ class Stripe extends CommonObject } $arrayzerounitcurrency = array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'); - if (!in_array($currency, $arrayzerounitcurrency)) $stripeamount = $amount * 100; - else $stripeamount = $amount; + if (!in_array($currency, $arrayzerounitcurrency)) { + $stripeamount = $amount * 100; + } else { + $stripeamount = $amount; + } $societe = new Societe($this->db); - if ($key > 0) $societe->fetch($key); + if ($key > 0) { + $societe->fetch($key); + } $description = ""; $ref = ""; @@ -909,10 +936,8 @@ class Stripe extends CommonObject global $stripearrayofkeysbyenv; \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']); - if (empty($conf->stripeconnect->enabled)) // With a common Stripe account - { - if (preg_match('/pm_/i', $source)) - { + if (empty($conf->stripeconnect->enabled)) { // With a common Stripe account + if (preg_match('/pm_/i', $source)) { $stripecard = $source; $amountstripe = $stripeamount; $FULLTAG = 'PFBO'; // Payment From Back Office @@ -929,8 +954,7 @@ class Stripe extends CommonObject $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $invoice, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1); $charge = new stdClass(); - if ($paymentintent->status == 'succeeded') - { + if ($paymentintent->status == 'succeeded') { $charge->status = 'ok'; } else { $charge->status = 'failed'; @@ -941,8 +965,7 @@ class Stripe extends CommonObject $stripefailuremessage = $stripe->error; $stripefailuredeclinecode = $stripe->declinecode; } - } elseif (preg_match('/acct_/i', $source)) - { + } elseif (preg_match('/acct_/i', $source)) { $charge = \Stripe\Charge::create(array( "amount" => "$stripeamount", "currency" => "$currency", @@ -964,8 +987,7 @@ class Stripe extends CommonObject "customer" => "$customer" ); - if ($societe->email && $usethirdpartyemailforreceiptemail) - { + if ($societe->email && $usethirdpartyemailforreceiptemail) { $paymentarray["receipt_email"] = $societe->email; } @@ -980,8 +1002,11 @@ class Stripe extends CommonObject $fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL; } - if (!in_array($currency, $arrayzerounitcurrency)) $stripefee = round($fee * 100); - else $stripefee = round($fee); + if (!in_array($currency, $arrayzerounitcurrency)) { + $stripefee = round($fee * 100); + } else { + $stripefee = round($fee); + } $paymentarray = array( "amount" => "$stripeamount", @@ -993,17 +1018,14 @@ class Stripe extends CommonObject "source" => "$source", "customer" => "$customer" ); - if ($conf->entity != $conf->global->STRIPECONNECT_PRINCIPAL && $stripefee > 0) - { + if ($conf->entity != $conf->global->STRIPECONNECT_PRINCIPAL && $stripefee > 0) { $paymentarray["application_fee_amount"] = $stripefee; } - if ($societe->email && $usethirdpartyemailforreceiptemail) - { + if ($societe->email && $usethirdpartyemailforreceiptemail) { $paymentarray["receipt_email"] = $societe->email; } - if (preg_match('/pm_/i', $source)) - { + if (preg_match('/pm_/i', $source)) { $stripecard = $source; $amountstripe = $stripeamount; $FULLTAG = 'PFBO'; // Payment From Back Office @@ -1020,8 +1042,7 @@ class Stripe extends CommonObject $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $invoice, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1); $charge = new stdClass(); - if ($paymentintent->status == 'succeeded') - { + if ($paymentintent->status == 'succeeded') { $charge->status = 'ok'; $charge->id = $paymentintent->id; } else { @@ -1034,13 +1055,13 @@ class Stripe extends CommonObject $charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$description", "stripe_account" => "$account")); } } - if (isset($charge->id)) {} + if (isset($charge->id)) { + } $return->statut = 'success'; $return->id = $charge->id; - if (preg_match('/pm_/i', $source)) - { + if (preg_match('/pm_/i', $source)) { $return->message = 'Payment retrieved by card status = '.$charge->status; } else { if ($charge->source->type == 'card') { diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index c7fa11df498..453eeb2ae64 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -44,8 +44,7 @@ $stripearrayofkeysbyenv = array( ); $stripearrayofkeys = array(); -if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) -{ +if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha')) { $stripearrayofkeys = $stripearrayofkeysbyenv[0]; // Test } else { $stripearrayofkeys = $stripearrayofkeysbyenv[1]; // Live diff --git a/htdocs/stripe/index.html b/htdocs/stripe/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/stripe/lib/index.html b/htdocs/stripe/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index f1d03ae39be..8749847b958 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -67,52 +67,53 @@ function html_print_stripe_footer($fromcompany, $langs) // Juridical status $line1 = ""; - if ($fromcompany->forme_juridique_code) - { + if ($fromcompany->forme_juridique_code) { $line1 .= ($line1 ? " - " : "").getFormeJuridiqueLabel($fromcompany->forme_juridique_code); } // Capital - if ($fromcompany->capital) - { + if ($fromcompany->capital) { $line1 .= ($line1 ? " - " : "").$langs->transnoentities("CapitalOf", $fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->currency); } $reg = array(); // Prof Id 1 - if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) - { + if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) { $field = $langs->transcountrynoentities("ProfId1", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof1; } // Prof Id 2 - if ($fromcompany->idprof2) - { + if ($fromcompany->idprof2) { $field = $langs->transcountrynoentities("ProfId2", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof2; } // Second line of company infos $line2 = ""; // Prof Id 3 - if ($fromcompany->idprof3) - { + if ($fromcompany->idprof3) { $field = $langs->transcountrynoentities("ProfId3", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof3; } // Prof Id 4 - if ($fromcompany->idprof4) - { + if ($fromcompany->idprof4) { $field = $langs->transcountrynoentities("ProfId4", $fromcompany->country_code); - if (preg_match('/\((.*)\)/i', $field, $reg)) $field = $reg[1]; + if (preg_match('/\((.*)\)/i', $field, $reg)) { + $field = $reg[1]; + } $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof4; } // IntraCommunautary VAT - if ($fromcompany->tva_intra != '') - { + if ($fromcompany->tva_intra != '') { $line2 .= ($line2 ? " - " : "").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra; } diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index baa4497f4f2..75c24ef0561 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -26,14 +26,18 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -41,11 +45,14 @@ $rowid = GETPOST("rowid", 'alpha'); $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; +$result = restrictedArea($user, 'banque'); /* @@ -110,15 +117,13 @@ if (!$rowid) { print "</tr>\n"; try { - if ($stripeacc) - { + if ($stripeacc) { $payout = \Stripe\Payout::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); } else { $payout = \Stripe\Payout::all(array("limit" => $limit)); } - foreach ($payout->data as $payout) - { + foreach ($payout->data as $payout) { //$charge = $payout; //var_dump($payout); @@ -157,7 +162,9 @@ if (!$rowid) { print '<tr class="oddeven">'; // Ref - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } $url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; if ($servicestatus) { diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 60e09c5d743..0d43c830e8e 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net> - * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,14 +26,18 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +if (!empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} //$result = restrictedArea($user, 'salaries', '', '', ''); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; @@ -41,11 +45,15 @@ $rowid = GETPOST("rowid", 'alpha'); $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; +$optioncss = GETPOST('optioncss', 'alpha'); +$result = restrictedArea($user, 'banque'); /* @@ -60,8 +68,7 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripeTransactionList")); -if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) -{ +if (!empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) { $service = 'StripeTest'; $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); @@ -77,7 +84,9 @@ $stripeacc = $stripe->getStripeAccount($service); if (!$rowid) { print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -106,15 +115,13 @@ if (!$rowid) { print "</tr>\n"; try { - if ($stripeacc) - { + if ($stripeacc) { $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); } else { $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit)); } - foreach ($txn->data as $txn) - { + foreach ($txn->data as $txn) { //$charge = $txn; //var_dump($txn); @@ -153,7 +160,9 @@ if (!$rowid) { print '<tr class="oddeven">'; // Ref - if (!empty($stripeacc)) $connect = $stripeacc.'/'; + if (!empty($stripeacc)) { + $connect = $stripeacc.'/'; + } // Ref if (preg_match('/po_/i', $txn->source)) { @@ -178,12 +187,10 @@ if (!$rowid) { //print "<td>".$charge->customer."</td>\n"; // Link /*print "<td>"; - if ($societestatic->id > 0) - { + if ($societestatic->id > 0) { print $societestatic->getNomUrl(1); } - if ($memberstatic->id > 0) - { + if ($memberstatic->id > 0) { print $memberstatic->getNomUrl(1); } print "</td>\n";*/ diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index 1663ded21ad..66bcf2c61e4 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -31,13 +31,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'supplier_proposal'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -72,35 +76,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=create">'.$langs->trans("NewAttribute").'</a></div>'; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print "<br>"; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index 8e906f2aa57..5a061101fab 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -26,8 +26,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Load translation files required by the page $langs->loadLangs(array('admin', 'other', 'supplier_proposal')); @@ -38,14 +39,18 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'supplier_proposaldet'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -77,35 +82,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 6f848fcd775..d5b4974eb83 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -50,8 +50,9 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('companies', 'supplier_proposal', 'compta', 'bills', 'propal', 'orders', 'products', 'deliveries', 'sendings')); -if (!empty($conf->margin->enabled)) +if (!empty($conf->margin->enabled)) { $langs->load('margins'); +} $error = 0; @@ -75,7 +76,9 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($con $NBLINES = 4; // Security check -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'supplier_proposal', $id); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -90,10 +93,12 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || !empty($ref)) { $ret = $object->fetch($id, $ref); - if ($ret > 0) + if ($ret > 0) { $ret = $object->fetch_thirdparty(); - if ($ret < 0) + } + if ($ret < 0) { dol_print_error('', $object->error); + } } // Common permissions @@ -107,12 +112,13 @@ $usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights-> // Additional area permissions $usercanclose = $user->rights->supplier_proposal->cloturer; -$usercancreateorder = $user->rights->fournisseur->commande->creer; +$usercancreateorder = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // 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; /* @@ -121,14 +127,13 @@ $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown $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 ($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; } @@ -142,10 +147,8 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes') - { - if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) - { + if ($action == 'confirm_clone' && $confirm == 'yes') { + if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { if ($object->id > 0) { @@ -159,11 +162,8 @@ if (empty($reshook)) } } } - } - - // Delete askprice - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { + // Delete askprice $result = $object->delete($user); if ($result > 0) { header('Location: '.DOL_URL_ROOT.'/supplier_proposal/list.php'); @@ -172,15 +172,13 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($langs->trans($object->error), null, 'errors'); } - } - - // Remove line - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { + // Remove line $result = $object->deleteline($lineid); // reorder lines - if ($result) + if ($result) { $object->line_order(true); + } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -196,23 +194,21 @@ if (empty($reshook)) header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit(); - } - - // Validation - elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) - { + } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { + // Validation $result = $object->valid($user); - if ($result >= 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if ($result >= 0) { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -225,18 +221,19 @@ if (empty($reshook)) } } else { $langs->load("errors"); - if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans($object->error), null, 'errors'); + if (count($object->errors) > 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + } } } elseif ($action == 'setdate_livraison' && $usercancreate) { $result = $object->setDeliveryDate($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); - if ($result < 0) + if ($result < 0) { dol_print_error($db, $object->error); - } - - // Create supplier proposal - elseif ($action == 'add' && $usercancreate) - { + } + } elseif ($action == 'add' && $usercancreate) { + // Create supplier proposal $object->socid = $socid; $object->fetch_thirdparty(); @@ -248,13 +245,11 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $db->begin(); // Si on a selectionne une demande a copier, on realise la copie - if (GETPOST('createmode') == 'copy' && GETPOST('copie_supplier_proposal')) - { + if (GETPOST('createmode') == 'copy' && GETPOST('copie_supplier_proposal')) { if ($object->fetch(GETPOST('copie_supplier_proposal')) > 0) { $object->ref = GETPOST('ref'); $object->date_livraison = $date_delivery; // deprecated @@ -263,8 +258,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->remise_percent = GETPOST('remise_percent'); - $object->remise_absolue = GETPOST('remise_absolue'); + $object->remise_percent = price2num(GETPOST('remise_percent'), 2); + $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); $object->socid = GETPOST('socid'); $object->fk_project = GETPOST('projectid', 'int'); $object->model_pdf = GETPOST('model'); @@ -294,8 +289,7 @@ if (empty($reshook)) $object->origin_id = GETPOST('originid'); // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); } @@ -307,10 +301,8 @@ if (empty($reshook)) } } - if (!$error) - { - if ($origin && $originid) - { + if (!$error) { + if ($origin && $originid) { $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; @@ -324,8 +316,7 @@ if (empty($reshook)) } $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -334,19 +325,16 @@ if (empty($reshook)) dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); - if ($result > 0) - { + if ($result > 0) { $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { + if (empty($lines) && method_exists($srcobject, 'fetch_lines')) { $srcobject->fetch_lines(); $lines = $srcobject->lines; } $fk_parent_line = 0; $num = count($lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $desc = (!empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle); @@ -381,7 +369,8 @@ if (empty($reshook)) $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, $label, + $lines[$i]->pa_ht, + $label, $array_options, $lines[$i]->ref_supplier, $lines[$i]->fk_unit @@ -416,24 +405,25 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } // Standard creation - else { + } else { + // Standard creation $id = $object->create($user); } - if ($id > 0) - { - if (!$error) - { + if ($id > 0) { + if (!$error) { $db->commit(); // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -442,7 +432,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); @@ -458,26 +450,20 @@ if (empty($reshook)) } } } - } - - // Reopen proposal - elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'confirm_reopen' && $usercanclose && !GETPOST('cancel', 'alpha')) { + // Reopen proposal // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED || $object->statut == SupplierProposal::STATUS_NOTSIGNED || $object->statut == SupplierProposal::STATUS_CLOSE) { $object->reopen($user, SupplierProposal::STATUS_VALIDATED); } - } - - // Close proposal - elseif ($action == 'close' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'close' && $usercanclose && !GETPOST('cancel', 'alpha')) { + // Close proposal // prevent browser refresh from reopening proposal several times if ($object->statut == SupplierProposal::STATUS_SIGNED) { $object->setStatut(SupplierProposal::STATUS_CLOSE); } - } - - // Set accepted/refused - elseif ($action == 'setstatut' && $usercanclose && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'setstatut' && $usercanclose && !GETPOST('cancel', 'alpha')) { + // Set accepted/refused if (!GETPOST('statut')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), null, 'errors'); $action = 'statut'; @@ -500,17 +486,14 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->supplier_proposal->dir_output; - $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Go back to draft - if ($action == 'modif' && $usercancreate) - { + if ($action == 'modif' && $usercancreate) { $object->setDraft($user); - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; if (!empty($conf->global->MAIN_MULTILANGS)) { @@ -521,10 +504,10 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } elseif ($action == "setabsolutediscount" && $usercancreate) { - if ($_POST["remise_id"]) { + } elseif ($action == "setabsolutediscount" && $usercancreate) { + if (GETPOST("remise_id", 'int')) { if ($object->id > 0) { - $result = $object->insert_discount($_POST["remise_id"]); + $result = $object->insert_discount(GETPOST("remise_id", 'int')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -533,8 +516,7 @@ if (empty($reshook)) } // Add a product line - if ($action == 'addline' && $usercancreate) - { + if ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; @@ -556,7 +538,7 @@ if (empty($reshook)) } $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); - $remise_percent = GETPOST('remise_percent'.$predef); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields @@ -575,8 +557,7 @@ if (empty($reshook)) $error++; } - if ($prod_entry_mode == 'free' && empty($idprod) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') // Unit price can be 0 but not ''. Also price can be negative for proposal. - { + if ($prod_entry_mode == 'free' && empty($idprod) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal. setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPrice")), null, 'errors'); $error++; } @@ -585,8 +566,8 @@ if (empty($reshook)) $error++; } if (!$error && ($qty >= 0)) { - $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); + $pu_ht = price2num($price_ht, 'MU'); + $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $price_min = 0; $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); @@ -595,50 +576,50 @@ if (empty($reshook)) // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit - if (($prod_entry_mode != 'free') && empty($error)) // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' - { + if (($prod_entry_mode != 'free') && empty($error)) { // With combolist mode idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' $productsupplier = new ProductFournisseur($db); $idprod = 0; - if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') { + $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + } $reg = array(); - if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) - { + if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) { $idprod = $reg[1]; $res = $productsupplier->fetch($idprod); // Load product from its ID // Call to init some price properties of $productsupplier // So if a supplier price already exists for another thirdparty (first one found), we use it as reference price - if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) - { + if (!empty($conf->global->SUPPLIER_TAKE_FIRST_PRICE_IF_NO_PRICE_FOR_CURRENT_SUPPLIER)) { $fksoctosearch = 0; $productsupplier->get_buyprice(0, -1, $idprod, 'none', $fksoctosearch); // We force qty to -1 to be sure to find if a supplier price exist - if ($productsupplier->fourn_socid != $socid) // The price we found is for another supplier, so we clear supplier price - { + if ($productsupplier->fourn_socid != $socid) { // The price we found is for another supplier, so we clear supplier price $productsupplier->ref_supplier = ''; } } 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 the supplier price that exists $idprod = $productsupplier->get_buyprice(GETPOST('idprodfournprice', 'alpha'), $qtytosearch); $res = $productsupplier->fetch($idprod); } - if ($idprod > 0) - { + if ($idprod > 0) { $label = $productsupplier->label; // if we use supplier description of the products if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) { $desc = $productsupplier->desc_supplier; - } else $desc = $productsupplier->description; + } else { + $desc = $productsupplier->description; + } - if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + if (trim($product_desc) != trim($desc)) { + $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + } $type = $productsupplier->type; $price_base_type = ($productsupplier->fourn_price_base_type ? $productsupplier->fourn_price_base_type : 'HT'); @@ -647,11 +628,15 @@ if (empty($reshook)) $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); $tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha')); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr); - if (empty($pu_ht)) $pu_ht = 0; // If pu is '' or null, we force to have a numeric value + if (empty($pu_ht)) { + $pu_ht = 0; // If pu is '' or null, we force to have a numeric value + } // If GETPOST('idprodfournprice') is a numeric, we can use it. If it is empty or if it is 'idprod_123', we should use -1 (not used) $fournprice = (is_numeric(GETPOST('idprodfournprice', 'alpha')) ? GETPOST('idprodfournprice', 'alpha') : -1); @@ -688,28 +673,24 @@ if (empty($reshook)) ); //var_dump($tva_tx);var_dump($productsupplier->fourn_pu);var_dump($price_base_type);exit; - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } - if ($idprod == -99 || $idprod == 0) - { + if ($idprod == -99 || $idprod == 0) { // Product not selected $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ProductOrService")).' '.$langs->trans("or").' '.$langs->trans("NoPriceDefinedForThisSupplier"), null, 'errors'); } - if ($idprod == -1) - { + if ($idprod == -1) { // Quantity too low $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } - } elseif ((GETPOST('price_ht') !== '' || GETPOST('price_ttc') !== '' || GETPOST('multicurrency_price_ht') != '') && empty($error)) // Free product. // $price_ht is already set - { + } elseif ((GETPOST('price_ht') !== '' || GETPOST('price_ttc') !== '' || GETPOST('multicurrency_price_ht') != '') && empty($error)) { // Free product. // $price_ht is already set $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); @@ -728,8 +709,7 @@ if (empty($reshook)) $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - if ($price_ht !== '') - { + if ($price_ht !== '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); @@ -762,23 +742,26 @@ if (empty($reshook)) $fk_unit, '', // origin 0, // origin_id - $pu_ht_devise); + $pu_ht_devise + ); } - if (!$error && $result > 0) - { + if (!$error && $result > 0) { $db->commit(); $ret = $object->fetch($object->id); // Reload to get new records // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + 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 ($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); @@ -787,7 +770,9 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + if ($result < 0) { + dol_print_error($db, $result); + } } unset($_POST['prod_entry_mode']); @@ -832,16 +817,15 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Mise a jour d'une ligne dans la demande de prix - elseif ($action == 'updateline' && $usercancreate && GETPOST('save') == $langs->trans("Save")) { + } elseif ($action == 'updateline' && $usercancreate && GETPOST('save') == $langs->trans("Save")) { + // Mise a jour d'une ligne dans la demande de prix $vat_rate = (GETPOST('tva_tx') ?GETPOST('tva_tx') : 0); // Define info_bits $info_bits = 0; - if (preg_match('/\*/', $vat_rate)) + if (preg_match('/\*/', $vat_rate)) { $info_bits |= 0x01; + } // Clean parameters $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml')); @@ -851,17 +835,14 @@ if (empty($reshook)) $localtax1_rate = get_localtax($vat_rate, 1, $mysoc, $object->thirdparty); $localtax2_rate = get_localtax($vat_rate, 2, $mysoc, $object->thirdparty); - if (GETPOST('price_ht') != '') - { + if (GETPOST('price_ht') != '') { $ht = price2num(GETPOST('price_ht'), '', 2); } - if (GETPOST('price_ttc') != '') - { + if (GETPOST('price_ttc') != '') { $reg = array(); $vatratecleaned = $vat_rate; - if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" - { + if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) { // If vat is "xx (yy)" $vatratecleaned = trim($reg[1]); $vatratecode = $reg[2]; } @@ -889,16 +870,16 @@ if (empty($reshook)) // Define special_code for special lines $special_code = GETPOST('special_code'); - if (!GETPOST('qty')) $special_code = 3; + if (!GETPOST('qty')) { + $special_code = 3; + } // Check minimum price $productid = GETPOST('productid', 'int'); if (!empty($productid)) { $productsupplier = new ProductFournisseur($db); - if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) - { - if ($productid > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), $productid, 'none', GETPOST('socid', 'int')) < 0) - { + if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) { + if ($productid > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), $productid, 'none', GETPOST('socid', 'int')) < 0) { setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings'); } } @@ -909,8 +890,9 @@ if (empty($reshook)) $type = $product->type; $price_min = $product->price_min; - if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) + if (!empty($conf->global->PRODUIT_MULTIPRICES) && !empty($object->thirdparty->price_level)) { $price_min = $product->multiprices_min [$object->thirdparty->price_level]; + } $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); } else { @@ -931,10 +913,10 @@ if (empty($reshook)) $fk_unit = GETPOST('units'); $result = $object->updateline( - GETPOST('lineid'), + GETPOST('lineid', 'int'), $ht, - GETPOST('qty'), - GETPOST('remise_percent'), + price2num(GETPOST('qty'), 'MS'), + price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, @@ -942,7 +924,7 @@ if (empty($reshook)) $price_base_type, $info_bits, $special_code, - GETPOST('fk_parent_line'), + GETPOST('fk_parent_line', 'int'), 0, $fournprice, $buyingprice, @@ -1001,61 +983,51 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { + } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit(); - } - - // Set project - elseif ($action == 'classin' && $usercancreate) { + } elseif ($action == 'classin' && $usercancreate) { + // Set project $object->setProject(GETPOST('projectid'), 'int'); - } - - // Delivery delay - elseif ($action == 'setavailability' && $usercancreate) { + } elseif ($action == 'setavailability' && $usercancreate) { + // Delivery delay $result = $object->availability($_POST['availability_id']); - } - - // Terms of payments - elseif ($action == 'setconditions' && $usercancreate) { + } elseif ($action == 'setconditions' && $usercancreate) { + // Terms of payments $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } elseif ($action == 'setremisepercent' && $usercancreate) { - $result = $object->set_remise_percent($user, GETPOST('remise_percent', 'alpha')); + $result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'), 2)); } elseif ($action == 'setremiseabsolue' && $usercancreate) { - $result = $object->set_remise_absolue($user, GETPOST('remise_absolue', 'alpha')); - } - - // Payment mode - elseif ($action == 'setmode' && $usercancreate) { + $result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU')); + } elseif ($action == 'setmode' && $usercancreate) { + // Payment mode $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - - // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $usercancreate) { + } elseif ($action == 'setmulticurrencycode' && $usercancreate) { + // Multicurrency Code $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } 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', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $result = $object->insertExtraFields('PROPOSAL_SUPPLIER_MODIFY'); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error++; } } - if ($error) $action = 'edit_extras'; + if ($error) { + $action = 'edit_extras'; + } } } @@ -1064,31 +1036,34 @@ if (empty($reshook)) * View */ -llxHeader('', $langs->trans('CommRequests'), 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); +$help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; + +llxHeader('', $langs->trans('CommRequests'), $help_url); $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formmargin = new FormMargin($db); $companystatic = new Societe($db); -if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} $now = dol_now(); // Add new askprice -if ($action == 'create') -{ +if ($action == 'create') { $currency_code = $conf->currency; print load_fiche_titre($langs->trans("NewAskPrice"), '', 'supplier_proposal'); $soc = new Societe($db); - if ($socid > 0) + if ($socid > 0) { $res = $soc->fetch($socid); + } // Load objectsrc - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; @@ -1097,8 +1072,7 @@ if ($action == 'create') $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) - { + if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); } $objectsrc->fetch_thirdparty(); @@ -1115,15 +1089,20 @@ if ($action == 'create') $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; - if (!empty($conf->multicurrency->enabled)) - { - if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; - if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + if (!empty($conf->multicurrency->enabled)) { + if (!empty($objectsrc->multicurrency_code)) { + $currency_code = $objectsrc->multicurrency_code; + } + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) { + $currency_tx = $objectsrc->multicurrency_tx; + } } } else { $cond_reglement_id = $soc->cond_reglement_supplier_id; $mode_reglement_id = $soc->mode_reglement_supplier_id; - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) { + $currency_code = $soc->multicurrency_code; + } } $object = new SupplierProposal($db); @@ -1159,8 +1138,7 @@ if ($action == 'create') } print '</tr>'."\n"; - if ($soc->id > 0) - { + if ($soc->id > 0) { // Discounts for third party print '<tr><td>'.$langs->trans('Discounts').'</td><td>'; @@ -1218,19 +1196,20 @@ if ($action == 'create') print '<tr>'; print '<td>'.$langs->trans("DefaultModel").'</td>'; print '<td colspan="2">'; - $liste = ModelePDFSupplierProposal::liste_modeles($db); + $list = ModelePDFSupplierProposal::liste_modeles($db); $preselected = ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF); - print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray('model', $list, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); print "</td></tr>"; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $formproject = new FormProjets($db); - if ($origin == 'project') $projectid = ($originid ? $originid : 0); + if ($origin == 'project') { + $projectid = ($originid ? $originid : 0); + } print '<tr>'; print '<td>'.$langs->trans("Project").'</td><td colspan="2">'; @@ -1260,8 +1239,7 @@ if ($action == 'create') // Lines from source - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { // TODO for compatibility if ($origin == 'contrat') { // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva @@ -1272,28 +1250,25 @@ if ($action == 'create') print "\n<!-- ".$classname." info -->"; print "\n"; - print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; - print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n"; - print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n"; - print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; - print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; + print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; + print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n"; + print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n"; + print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; + print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; print '<tr><td>'.$langs->trans('CommRequest').'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>"; } - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>"; } print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="2">'.price($objectsrc->total_ttc)."</td></tr>"; - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_tva)."</td></tr>"; print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td colspan="2">'.price($objectsrc->multicurrency_total_ttc)."</td></tr>"; @@ -1305,12 +1280,13 @@ if ($action == 'create') /* * Combobox pour la fonction de copie - */ + */ - if (empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) print '<input type="hidden" name="createmode" value="empty">'; + if (empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) { + print '<input type="hidden" name="createmode" value="empty">'; + } - if (!empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) - { + if (!empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) { print '<br><table>'; // For backward compatibility @@ -1349,7 +1325,9 @@ if ($action == 'create') print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyAsk").'</td></tr>'; } - if (!empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) print '</table>'; + if (!empty($conf->global->SUPPLIER_PROPOSAL_CLONE_ON_CREATE_PAGE)) { + print '</table>'; + } print dol_get_fiche_end(); @@ -1392,32 +1370,29 @@ if ($action == 'create') if ($action == 'clone') { // Create an array for form $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => - // 1), - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1'))); + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => + // 1), + array( + 'type' => 'other', + 'name' => 'socid', + 'label' => $langs->trans("SelectThirdParty"), + 'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1')) + ); // Paiement incomplet. On demande si motif = escompte ou autre $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); - } - - // Confirm delete - elseif ($action == 'delete') { + } elseif ($action == 'delete') { + // Confirm delete $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); - } - - // Confirm reopen - elseif ($action == 'reopen') { + } elseif ($action == 'reopen') { + // Confirm reopen $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); - } - - // Confirmation delete product/service line - elseif ($action == 'ask_deleteline') { + } elseif ($action == 'ask_deleteline') { + // Confirmation delete product/service line $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); - } - - // Confirm validate askprice - elseif ($action == 'validate') { + } elseif ($action == 'validate') { + // Confirm validate askprice $error = 0; // on verifie si l'objet est en numerotation provisoire @@ -1440,15 +1415,19 @@ if ($action == 'create') $text .= $notify->confirmMessage('PROPOSAL_SUPPLIER_VALIDATE', $object->socid, $object); } - if (!$error) + if (!$error) { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1); + } } // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -1464,14 +1443,14 @@ if ($action == 'create') //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreateorder, '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 .= ' (<a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherProposals").'</a>)'; + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) { + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherProposals").'</a>)'; + } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($usercancreate) - { + if ($usercancreate) { if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; } @@ -1538,10 +1517,11 @@ if ($action == 'create') print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('PaymentConditionsShort'); print '</td>'; - if ($action != 'editconditions' && $object->statut != SupplierProposal::STATUS_NOTSIGNED) + if ($action != 'editconditions' && $object->statut != SupplierProposal::STATUS_NOTSIGNED) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); } else { @@ -1556,10 +1536,11 @@ if ($action == 'create') print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('DeliveryDate'); print '</td>'; - if ($action != 'editdate_livraison' && $object->statut == SupplierProposal::STATUS_VALIDATED) + if ($action != 'editdate_livraison' && $object->statut == SupplierProposal::STATUS_VALIDATED) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryDate'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editdate_livraison') { print '<form name="editdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post" class="formconsumeproduce">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -1579,10 +1560,11 @@ if ($action == 'create') print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('PaymentMode'); print '</td>'; - if ($action != 'editmode' && $object->statut != SupplierProposal::STATUS_NOTSIGNED) + if ($action != 'editmode' && $object->statut != SupplierProposal::STATUS_NOTSIGNED) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'DBIT', 1, 1); } else { @@ -1591,18 +1573,18 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { // Multicurrency code print '<tr>'; print '<td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_VALIDATED) + if ($action != 'editmulticurrencycode' && $object->statut == $object::STATUS_VALIDATED) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencycode&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editmulticurrencycode') { $form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, 'multicurrency_code'); } else { @@ -1611,20 +1593,20 @@ if ($action == 'create') print '</td></tr>'; // Multicurrency rate - if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) - { + if ($object->multicurrency_code != $conf->currency || $object->multicurrency_tx != 1) { print '<tr>'; print '<td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print '</td>'; - if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_VALIDATED && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) + if ($action != 'editmulticurrencyrate' && $object->statut == $object::STATUS_VALIDATED && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { if ($action == 'actualizemulticurrencyrate') { - list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); + list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); } $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code); } else { @@ -1645,7 +1627,7 @@ if ($action == 'create') // Outstanding Bill print '<tr><td>'; print $langs->trans('OutstandingBill'); - print '</td><td class=right colspan="3">'; + print '</td><td class="valuefield">'; $arrayoutstandingbills = $soc->getOutstandingBills('supplier'); $outstandingBills = $arrayoutstandingbills['opened']; print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency); @@ -1653,17 +1635,17 @@ if ($action == 'create') print '</tr>'; }*/ - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && !empty($conf->banque->enabled)) { // Bank Account print '<tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>'; print $langs->trans('BankAccount'); print '</td>'; - if ($action != 'editbankaccount' && $usercancreate) + if ($action != 'editbankaccount' && $usercancreate) { print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; + } print '</tr></table>'; - print '</td><td colspan="3">'; + print '</td><td class="valuefield">'; if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { @@ -1674,7 +1656,6 @@ if ($action == 'create') } // Other attributes - $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '</table>'; @@ -1686,51 +1667,48 @@ if ($action == 'create') print '<table class="border tableforfield centpercent">'; - if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) - { + if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).'</td>'; - print '<td>'.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; + print '<td class="valuefield">'.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; print '</tr>'; // Multicurrency Amount VAT print '<tr><td>'.$form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0).'</td>'; - print '<td>'.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; + print '<td class="valuefield">'.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; print '</tr>'; // Multicurrency Amount TTC print '<tr><td>'.$form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0).'</td>'; - print '<td>'.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; + print '<td class="valuefield">'.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'</td>'; print '</tr>'; } // Amount HT print '<tr><td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; - print '<td>'.price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; + print '<td class="valuefield">'.price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; print '</tr>'; // Amount VAT print '<tr><td>'.$langs->trans('AmountVAT').'</td>'; - print '<td>'.price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; + print '<td class="valuefield">'.price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; print '</tr>'; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 - { + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { // Localtax1 print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; - print '<td class="nowrap">'.price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; + print '<td class="valuefield nowrap">'.price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; print '</tr>'; } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 - { + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { // Localtax2 print '<tr><td height="10">'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; - print '<td class="nowrap">'.price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; + print '<td class="valuefield nowrap">'.price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; print '</tr>'; } // Amount TTC print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>'; - print '<td class="nowrap">'.price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; + print '<td class="valuefield nowrap">'.price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency).'</td>'; print '</tr>'; print '</table>'; @@ -1765,7 +1743,7 @@ if ($action == 'create') // Show object lines $result = $object->getLinesArray(); - print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid')).'" method="POST"> + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> <input type="hidden" name="token" value="' . newToken().'"> <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> <input type="hidden" name="mode" value=""> @@ -1783,16 +1761,17 @@ if ($action == 'create') global $forceall, $senderissupplier, $dateSelector, $inputalsopricewithtax; $forceall = 1; $dateSelector = 0; $inputalsopricewithtax = 1; $senderissupplier = 2; // $senderissupplier=2 is same than 1 but disable test on minimum qty. - if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) $senderissupplier = 1; + if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) { + $senderissupplier = 1; + } - if (!empty($object->lines)) + if (!empty($object->lines)) { $ret = $object->printObjectLines($action, $soc, $mysoc, $lineid, $dateSelector); + } // Form to add new line - if ($object->statut == SupplierProposal::STATUS_DRAFT && $usercancreate) - { - if ($action != 'editline') - { + if ($object->statut == SupplierProposal::STATUS_DRAFT && $usercancreate) { + if ($action != 'editline') { // Add products/services form $object->formAddObjectLine($dateSelector, $soc, $mysoc); @@ -1807,31 +1786,33 @@ if ($action == 'create') print dol_get_fiche_end(); - if ($action == 'statut') - { + if ($action == 'statut') { // Form to set proposal accepted/refused - $form_close = '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST" id="formacceptrefuse" class="formconsumeproduce">'; + $form_close = '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST" id="formacceptrefuse" class="formconsumeproduce paddingbottom paddingleft paddingright">'; $form_close .= '<input type="hidden" name="token" value="'.newToken().'">'; $form_close .= '<input type="hidden" name="action" value="setstatut">'; - if (!empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) $form_close .= '<p class="notice">'.$langs->trans('SupplierProposalRefFournNotice').'</p>'; // TODO Suggest a permanent checkbox instead of option - $form_close .= '<table class="border centpercent">'; - $form_close .= '<tr><td width="150" class="left">'.$langs->trans("CloseAs").'</td><td class="left">'; + if (!empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) { + $form_close .= '<p class="notice">'.$langs->trans('SupplierProposalRefFournNotice').'</p>'; // TODO Suggest a permanent checkbox instead of option + } + $form_close .= '<table class="border centpercent marginleftonly marginrightonly">'; + $form_close .= '<tr><td>'.$langs->trans("CloseAs").'</td><td class="left">'; $form_close .= '<select id="statut" name="statut" class="flat">'; $form_close .= '<option value="0">&nbsp;</option>'; $form_close .= '<option value="2">'.$langs->trans('SupplierProposalStatusSigned').'</option>'; $form_close .= '<option value="3">'.$langs->trans('SupplierProposalStatusNotSigned').'</option>'; $form_close .= '</select>'; $form_close .= '</td></tr>'; - $form_close .= '<tr><td width="150" class="left">'.$langs->trans('Note').'</td><td class="left"><textarea cols="70" rows="'.ROWS_3.'" wrap="soft" name="note">'; - $form_close .= $object->note; + $form_close .= '<tr><td class="left">'.$langs->trans('Note').'</td><td class="left"><textarea cols="70" rows="'.ROWS_3.'" wrap="soft" name="note">'; + $form_close .= $object->note_private; $form_close .= '</textarea></td></tr>'; - $form_close .= '<tr><td class="center" colspan="2">'; + $form_close .= '</table>'; + $form_close .= '<center>'; $form_close .= '<input type="submit" class="button button-save" name="validate" value="'.$langs->trans("Save").'">'; $form_close .= ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; $form_close .= '<a name="acceptedrefused">&nbsp;</a>'; - $form_close .= '</td>'; - $form_close .= '</tr></table></form>'; + $form_close .= '</center>'; + $form_close .= '</form>'; print $form_close; } @@ -1845,15 +1826,13 @@ if ($action == 'create') $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook - if (empty($reshook)) - { - if ($action != 'statut' && $action != 'editline') - { + if (empty($reshook)) { + if ($action != 'statut' && $action != 'editline') { // Validate - if ($object->statut == SupplierProposal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0 && $usercanvalidate) - { - if (count($object->lines) > 0) + if ($object->statut == SupplierProposal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0 && $usercanvalidate) { + if (count($object->lines) > 0) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=validate">'.$langs->trans('Validate').'</a></div>'; + } // else print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Validate').'</a>'; } @@ -1873,12 +1852,14 @@ if ($action == 'create') if ($object->statut == SupplierProposal::STATUS_VALIDATED || $object->statut == SupplierProposal::STATUS_SIGNED) { if ($usercansend) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; - } else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a></div>'; + } } } // Create an order - if (!empty($conf->fournisseur->enabled) && $object->statut == SupplierProposal::STATUS_SIGNED) { + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) && $object->statut == SupplierProposal::STATUS_SIGNED) { if ($usercancreateorder) { print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddOrder").'</a></div>'; } @@ -1912,12 +1893,11 @@ if ($action == 'create') print '</div>'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; /* - * Documents generes + * Generated documents */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->supplier_proposal->dir_output."/".dol_sanitizeFileName($object->ref); diff --git a/htdocs/supplier_proposal/class/api_supplier_proposals.class.php b/htdocs/supplier_proposal/class/api_supplier_proposals.class.php index bf91be32d8d..3e38ac10b41 100644 --- a/htdocs/supplier_proposal/class/api_supplier_proposals.class.php +++ b/htdocs/supplier_proposal/class/api_supplier_proposals.class.php @@ -33,7 +33,7 @@ class Supplierproposals extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'socid' ); @@ -98,6 +98,10 @@ class Supplierproposals extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->supplier_proposal->lire) { + throw new RestException(401); + } + $obj_ret = array(); // case of external user, $thirdparty_ids param is ignored and replaced by user's socid @@ -105,28 +109,37 @@ class Supplierproposals extends DolibarrApi // 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 (!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) + 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."supplier_proposal 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('propal').')'; - 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 ((!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 (".$this->db->sanitize($socids).")"; + } + if ($search_sale > 0) { + $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + } // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".((int) $search_sale); } // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); } $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; @@ -135,8 +148,7 @@ class Supplierproposals extends DolibarrApi $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { - if ($page < 0) - { + if ($page < 0) { $page = 0; } $offset = $limit * $page; @@ -146,13 +158,11 @@ class Supplierproposals extends DolibarrApi $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; - while ($i < $min) - { + while ($i < $min) { $obj = $this->db->fetch_object($result); $propal_static = new SupplierProposal($this->db); if ($propal_static->fetch($obj->rowid)) { @@ -181,8 +191,9 @@ class Supplierproposals extends DolibarrApi { $propal = array(); foreach (SupplierProposals::$FIELDS as $field) { - if (!isset($data[$field])) + if (!isset($data[$field])) { throw new RestException(400, "$field field missing"); + } $propal[$field] = $data[$field]; } return $propal; diff --git a/htdocs/supplier_proposal/class/index.html b/htdocs/supplier_proposal/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b8a10a59bec..728bf8f0fd9 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -254,11 +254,12 @@ class SupplierProposal extends CommonObject // phpcs:enable global $conf, $mysoc; - if (!$qty) $qty = 1; + if (!$qty) { + $qty = 1; + } dol_syslog(get_class($this)."::add_product $idproduct, $qty, $remise_percent"); - if ($idproduct > 0) - { + if ($idproduct > 0) { $prod = new Product($this->db); $prod->fetch($idproduct); @@ -266,13 +267,14 @@ class SupplierProposal extends CommonObject $tva_tx = get_default_tva($mysoc, $this->thirdparty, $prod->id); $tva_npr = get_default_npr($mysoc, $this->thirdparty, $prod->id); - if (empty($tva_tx)) $tva_npr = 0; + if (empty($tva_tx)) { + $tva_npr = 0; + } $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $this->thirdparty, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $this->thirdparty, $tva_npr); // multiprix - if ($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) - { + if ($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) { $price = $prod->multiprices[$this->thirdparty->price_level]; } else { $price = $prod->price; @@ -311,10 +313,8 @@ class SupplierProposal extends CommonObject $remise = new DiscountAbsolute($this->db); $result = $remise->fetch($idremise); - if ($result > 0) - { - if ($remise->fk_facture) // Protection against multiple submission - { + if ($result > 0) { + if ($remise->fk_facture) { // Protection against multiple submission $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); $this->db->rollback(); return -5; @@ -338,11 +338,9 @@ class SupplierProposal extends CommonObject $supplier_proposalligne->total_ttc = -$remise->amount_ttc; $result = $supplier_proposalligne->insert(); - if ($result > 0) - { + if ($result > 0) { $result = $this->update_price(1); - if ($result > 0) - { + if ($result > 0) { $this->db->commit(); return 1; } else { @@ -405,12 +403,24 @@ class SupplierProposal extends CommonObject include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters - if (empty($remise_percent)) $remise_percent = 0; - if (empty($qty)) $qty = 0; - if (empty($info_bits)) $info_bits = 0; - if (empty($rang)) $rang = 0; - if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; - if (empty($pu_ht)) $pu_ht = 0; + if (empty($remise_percent)) { + $remise_percent = 0; + } + if (empty($qty)) { + $qty = 0; + } + if (empty($info_bits)) { + $info_bits = 0; + } + if (empty($rang)) { + $rang = 0; + } + if (empty($fk_parent_line) || $fk_parent_line < 0) { + $fk_parent_line = 0; + } + if (empty($pu_ht)) { + $pu_ht = 0; + } $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -422,29 +432,26 @@ class SupplierProposal extends CommonObject $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); $pa_ht = price2num($pa_ht); - if ($price_base_type == 'HT') - { + if ($price_base_type == 'HT') { $pu = $pu_ht; } else { $pu = $pu_ttc; } // Check parameters - if ($type < 0) return -1; + if ($type < 0) { + return -1; + } - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { $this->db->begin(); - if ($fk_product > 0) - { - if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) - { + if ($fk_product > 0) { + if (!empty($conf->global->SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY)) { // Check quantity is enough dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_fournprice=".$fk_fournprice." qty=".$qty." ref_supplier=".$ref_supplier); $prod = new Product($this->db); - if ($prod->fetch($fk_product) > 0) - { + if ($prod->fetch($fk_product) > 0) { $product_type = $prod->type; $label = $prod->label; $fk_prod_fourn_price = $fk_fournprice; @@ -452,16 +459,15 @@ class SupplierProposal extends CommonObject // 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 ($result > 0) - { + if ($result > 0) { $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) + 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 - { + 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(); @@ -470,25 +476,23 @@ class SupplierProposal extends CommonObject //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price return -1; } - if ($result == -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) - { + if ($result < -1) { $this->error = $prod->error; - $this->errors = $prod->errors; + $this->errors = $prod->errors; $this->db->rollback(); dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); return -1; } } else { $this->error = $prod->error; - $this->errors = $prod->errors; + $this->errors = $prod->errors; $this->db->rollback(); return -1; } @@ -507,8 +511,7 @@ class SupplierProposal extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -533,8 +536,7 @@ class SupplierProposal extends CommonObject // Rang to use $ranktouse = $rang; - if ($ranktouse == -1) - { + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); $ranktouse = $rangmax + 1; } @@ -543,8 +545,7 @@ class SupplierProposal extends CommonObject // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; $remise = 0; - if ($remise_percent > 0) - { + if ($remise_percent > 0) { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; } @@ -605,22 +606,24 @@ class SupplierProposal extends CommonObject $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; // Mise en option de la ligne - if (empty($qty) && empty($special_code)) $this->line->special_code = 3; + if (empty($qty) && empty($special_code)) { + $this->line->special_code = 3; + } if (is_array($array_options) && count($array_options) > 0) { $this->line->array_options = $array_options; } $result = $this->line->insert(); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } // Mise a jour informations denormalisees au niveau de la propale 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) - { + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -631,7 +634,7 @@ class SupplierProposal extends CommonObject } } else { $this->error = $this->line->error; - $this->errors = $this->line->errors; + $this->errors = $this->line->errors; $this->db->rollback(); return -2; } @@ -685,11 +688,14 @@ class SupplierProposal extends CommonObject $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); $pa_ht = price2num($pa_ht); - if (empty($qty) && empty($special_code)) $special_code = 3; // Set option tag - if (!empty($qty) && $special_code == 3) $special_code = 0; // Remove option tag + if (empty($qty) && empty($special_code)) { + $special_code = 3; // Set option tag + } + if (!empty($qty) && $special_code == 3) { + $special_code = 0; // Remove option tag + } - if ($this->statut == 0) - { + if ($this->statut == 0) { $this->db->begin(); // Calcul du total TTC et de la TVA pour la ligne a partir de @@ -702,8 +708,7 @@ class SupplierProposal extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -738,8 +743,7 @@ class SupplierProposal extends CommonObject $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) - { + if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) { $rangmax = $this->line_max($fk_parent_line); $this->line->rang = $rangmax + 1; } @@ -796,10 +800,11 @@ class SupplierProposal extends CommonObject $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; $result = $this->line->update(); - if ($result > 0) - { + if ($result > 0) { // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + if (!empty($fk_parent_line)) { + $this->line_order(true, 'DESC'); + } $this->update_price(1); @@ -827,15 +832,13 @@ class SupplierProposal extends CommonObject */ public function deleteline($lineid) { - if ($this->statut == 0) - { + if ($this->statut == 0) { $line = new SupplierProposalLine($this->db); // For triggers $line->fetch($lineid); - if ($line->delete() > 0) - { + if ($line->delete() > 0) { $this->update_price(1); return 1; @@ -867,17 +870,14 @@ class SupplierProposal extends CommonObject // Check parameters $result = $this->fetch_thirdparty(); - if ($result < 0) - { + if ($result < 0) { $this->error = "Failed to fetch company"; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -3; } - if (!empty($this->ref)) // We check that ref is not already used - { + if (!empty($this->ref)) { // We check that ref is not already used $result = self::isExistingObject($this->element, 0, $this->ref); // Check ref is not yet used - if ($result > 0) - { + if ($result > 0) { $this->error = 'ErrorRefAlreadyExists'; dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); $this->db->rollback(); @@ -889,9 +889,10 @@ class SupplierProposal extends CommonObject $delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date; // Multicurrency - if (!empty($this->multicurrency_code)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $now); - if (empty($this->fk_multicurrency)) - { + if (!empty($this->multicurrency_code)) { + list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $now); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; $this->fk_multicurrency = 0; $this->multicurrency_tx = 1; @@ -906,8 +907,8 @@ class SupplierProposal extends CommonObject $sql .= ", remise"; $sql .= ", remise_percent"; $sql .= ", remise_absolue"; - $sql .= ", tva"; - $sql .= ", total"; + $sql .= ", total_tva"; + $sql .= ", total_ttc"; $sql .= ", datec"; $sql .= ", ref"; $sql .= ", fk_user_author"; @@ -953,36 +954,30 @@ class SupplierProposal extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."supplier_proposal"); - if ($this->id) - { + if ($this->id) { $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."supplier_proposal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX."supplier_proposal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) $error++; + 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 } // Add object linked - if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) - { - 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) - { + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { + 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) - { + if (!$ret) { dol_print_error($this->db); $error++; } @@ -992,15 +987,13 @@ class SupplierProposal extends CommonObject } /* - * Insertion du detail des produits dans la base - */ - if (!$error) - { + * Insertion du detail des produits dans la base + */ + if (!$error) { $fk_parent_line = 0; $num = count($this->lines); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { // Reset fk_parent_line for no child products and special product if (($this->lines[$i]->product_type != 9 && empty($this->lines[$i]->fk_parent_line)) || $this->lines[$i]->product_type == 9) { $fk_parent_line = 0; @@ -1032,8 +1025,7 @@ class SupplierProposal extends CommonObject $this->lines[$i]->rowid ); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = $this->db->error; dol_print_error($this->db); @@ -1046,29 +1038,26 @@ class SupplierProposal extends CommonObject } } - if (!$error) - { + if (!$error) { // Mise a jour infos denormalisees $resql = $this->update_price(1); - if ($resql) - { + if ($resql) { $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROPOSAL_SUPPLIER_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } else { @@ -1081,8 +1070,7 @@ class SupplierProposal extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); dol_syslog(get_class($this)."::create done id=".$this->id); return $this->id; @@ -1114,8 +1102,9 @@ class SupplierProposal extends CommonObject $this->db->begin(); // get extrafields so they will be clone - foreach ($this->lines as $line) + foreach ($this->lines as $line) { $line->fetch_optionals(); + } // Load source object $objFrom = clone $this; @@ -1123,10 +1112,8 @@ class SupplierProposal extends CommonObject $objsoc = new Societe($this->db); // Change socid if needed - if (!empty($fromid) && $fromid != $this->socid) - { - if ($objsoc->fetch($fromid) > 0) - { + if (!empty($fromid) && $fromid != $this->socid) { + if ($objsoc->fetch($fromid) > 0) { $this->socid = $objsoc->id; $this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); $this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); @@ -1141,8 +1128,7 @@ class SupplierProposal extends CommonObject $this->id = 0; $this->statut = 0; - if (empty($conf->global->SUPPLIER_PROPOSAL_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".$conf->global->SUPPLIER_PROPOSAL_ADDON.".php")) - { + if (empty($conf->global->SUPPLIER_PROPOSAL_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".$conf->global->SUPPLIER_PROPOSAL_ADDON.".php")) { $this->error = 'ErrorSetupNotComplete'; return -1; } @@ -1161,25 +1147,26 @@ class SupplierProposal extends CommonObject // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { // Hook of thirdparty module - if (is_object($hookmanager)) - { + 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 ($reshook < 0) { + $error++; + } } } unset($this->context['createfromclone']); // End - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -1200,7 +1187,7 @@ class SupplierProposal extends CommonObject global $conf; $sql = "SELECT p.rowid, p.entity, p.ref, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; - $sql .= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht"; + $sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht"; $sql .= ", p.datec"; $sql .= ", p.date_valid as datev"; $sql .= ", p.date_livraison as delivery_date"; @@ -1221,15 +1208,16 @@ class SupplierProposal extends CommonObject $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON p.fk_cond_reglement = cr.rowid'; $sql .= " WHERE p.fk_statut = c.id"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; - if ($ref) $sql .= " AND p.ref='".$ref."'"; - else $sql .= " AND p.rowid=".$rowid; + if ($ref) { + $sql .= " AND p.ref = '".$this->db->escape($ref)."'"; + } else { + $sql .= " AND p.rowid = ".((int) $rowid); + } dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -1239,12 +1227,11 @@ class SupplierProposal extends CommonObject $this->remise = $obj->remise; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; - $this->total = $obj->total; // TODO deprecated $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->tva; + $this->total_tva = $obj->total_tva; $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; - $this->total_ttc = $obj->total; + $this->total_ttc = $obj->total_ttc; $this->socid = $obj->fk_soc; $this->fk_project = $obj->fk_project; $this->model_pdf = $obj->model_pdf; @@ -1285,8 +1272,7 @@ class SupplierProposal extends CommonObject $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - if ($obj->fk_statut == 0) - { + if ($obj->fk_statut == 0) { $this->brouillon = 1; } @@ -1310,13 +1296,11 @@ class SupplierProposal extends CommonObject $sql .= " ORDER by d.rang"; $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $this->db->fetch_object($result); $line = new SupplierProposalLine($this->db); @@ -1412,8 +1396,7 @@ class SupplierProposal extends CommonObject $now = dol_now(); if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->supplier_proposal->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->supplier_proposal->validate_advance))) - { + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->supplier_proposal->validate_advance))) { $this->db->begin(); // Numbering module definition @@ -1421,8 +1404,7 @@ class SupplierProposal extends CommonObject $soc->fetch($this->socid); // Define new ref - if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { + 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($soc); } else { $num = $this->ref; @@ -1436,49 +1418,46 @@ class SupplierProposal extends CommonObject dol_syslog(get_class($this)."::valid", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($this->db); $error++; } // Trigger calls - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('PROPOSAL_SUPPLIER_VALIDATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $this->oldref = $this->ref; // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->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 = 'supplier_proposal/".$this->db->escape($this->newref)."'"; $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'supplier_proposal/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + 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->supplier_proposal->dir_output.'/'.$oldref; $dirdest = $conf->supplier_proposal->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { + if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { + if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); // Rename docs starting with $oldref with $newref $listoffiles = dol_dir_list($conf->supplier_proposal->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { + foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; @@ -1531,14 +1510,12 @@ class SupplierProposal extends CommonObject */ public function setDeliveryDate($user, $delivery_date) { - if (!empty($user->rights->supplier_proposal->creer)) - { + if (!empty($user->rights->supplier_proposal->creer)) { $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal "; $sql .= " SET date_livraison = ".($delivery_date != '' ? "'".$this->db->idate($delivery_date)."'" : 'null'); $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->date_livraison = $delivery_date; $this->delivery_date = $delivery_date; return 1; @@ -1563,16 +1540,14 @@ class SupplierProposal extends CommonObject // phpcs:enable $remise = trim($remise) ?trim($remise) : 0; - if (!empty($user->rights->supplier_proposal->creer)) - { - $remise = price2num($remise); + if (!empty($user->rights->supplier_proposal->creer)) { + $remise = price2num($remise, 2); - $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal SET remise_percent = ".$remise; + $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal SET remise_percent = ".((float) $remise); $sql .= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - if ($this->db->query($sql)) - { - $this->remise_percent = $remise; + if ($this->db->query($sql)) { + $this->remise_percent = ((float) $remise); $this->update_price(1); return 1; } else { @@ -1594,18 +1569,18 @@ class SupplierProposal extends CommonObject public function set_remise_absolue($user, $remise) { // phpcs:enable - $remise = trim($remise) ?trim($remise) : 0; + if (empty($remise)) { + $remise = 0; + } - if (!empty($user->rights->supplier_proposal->creer)) - { - $remise = price2num($remise); + $remise = price2num($remise); + if (!empty($user->rights->supplier_proposal->creer)) { $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal "; - $sql .= " SET remise_absolue = ".$remise; + $sql .= " SET remise_absolue = ".((float) $remise); $sql .= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->remise_absolue = $remise; $this->update_price(1); return 1; @@ -1635,8 +1610,10 @@ class SupplierProposal extends CommonObject $error = 0; $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal"; - $sql .= " SET fk_statut = ".$this->statut.","; - if (!empty($note)) $sql .= " note_private = '".$this->db->escape($note)."',"; + $sql .= " SET fk_statut = ".((int) $this->statut).","; + if (!empty($note)) { + $sql .= " note_private = '".$this->db->escape($note)."',"; + } $sql .= " date_cloture=NULL, fk_user_cloture=NULL"; $sql .= " WHERE rowid = ".$this->id; @@ -1647,24 +1624,21 @@ class SupplierProposal extends CommonObject if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - if (!$error) - { - if (!$notrigger) - { + if (!$error) { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROPOSAL_SUPPLIER_REOPEN', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } // Commit or rollback - if ($error) - { - if (!empty($this->errors)) - { - foreach ($this->errors as $errmsg) - { + if ($error) { + if (!empty($this->errors)) { + foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } @@ -1697,32 +1671,27 @@ class SupplierProposal extends CommonObject $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal"; - $sql .= " SET fk_statut = ".$status.", note_private = '".$this->db->escape($note)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; + $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($note)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if ($resql) - { - $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED : (empty($this->modelpdf) ? '' : $this->modelpdf); + if ($resql) { + $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED : (empty($this->model_pdf) ? '' : $this->model_pdf); $triggerName = 'PROPOSAL_SUPPLIER_CLOSE_REFUSED'; - if ($status == 2) - { + if ($status == 2) { $triggerName = 'PROPOSAL_SUPPLIER_CLOSE_SIGNED'; - $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL : (empty($this->modelpdf) ? '' : $this->modelpdf); + $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL : (empty($this->model_pdf) ? '' : $this->model_pdf); - if (!empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) // TODO This option was not tested correctly. Error if product ref does not exists - { + if (!empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) { // TODO This option was not tested correctly. Error if product ref does not exists $result = $this->updateOrCreatePriceFournisseur($user); } } - if ($status == 4) - { + if ($status == 4) { $triggerName = 'PROPOSAL_SUPPLIER_CLASSIFY_BILLED'; } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; if (!empty($conf->global->MAIN_MULTILANGS)) { @@ -1736,11 +1705,12 @@ class SupplierProposal extends CommonObject // Call trigger $result = $this->call_trigger($triggerName, $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -1766,19 +1736,26 @@ class SupplierProposal extends CommonObject global $conf; dol_syslog(get_class($this)."::updateOrCreatePriceFournisseur", LOG_DEBUG); - foreach ($this->lines as $product) - { - if ($product->subprice <= 0) continue; + foreach ($this->lines as $product) { + if ($product->subprice <= 0) { + continue; + } $productsupplier = new ProductFournisseur($this->db); $multicurrency_tx = 1; $fk_multicurrency = 0; - if (empty($this->thirdparty)) $this->fetch_thirdparty(); + if (empty($this->thirdparty)) { + $this->fetch_thirdparty(); + } $ref_fourn = $product->ref_fourn; - if (empty($ref_fourn)) $ref_fourn = $product->ref_supplier; - if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) list($fk_multicurrency, $multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $product->multicurrency_code); + if (empty($ref_fourn)) { + $ref_fourn = $product->ref_supplier; + } + if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) { + list($fk_multicurrency, $multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $product->multicurrency_code); + } $productsupplier->id = $product->fk_product; $productsupplier->update_buyprice($product->qty, $product->total_ht, $user, 'HT', $this->thirdparty, '', $ref_fourn, $product->tva_tx, 0, 0, 0, $product->info_bits, '', '', array(), '', $product->multicurrency_total_ht, 'HT', $multicurrency_tx, $product->multicurrency_code, '', '', ''); @@ -1800,7 +1777,7 @@ class SupplierProposal extends CommonObject $price = price2num($product->subprice * $product->qty, 'MU'); $unitPrice = price2num($product->subprice, 'MU'); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'product_fournisseur_price SET '.(!empty($product->ref_fourn) ? 'ref_fourn = "'.$product->ref_fourn.'", ' : '').' price ='.$price.', unitprice ='.$unitPrice.' WHERE rowid = '.$idProductFournPrice; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'product_fournisseur_price SET '.(!empty($product->ref_fourn) ? 'ref_fourn = "'.$this->db->escape($product->ref_fourn).'", ' : '').' price ='.((float) $price).', unitprice ='.((float) $unitPrice).' WHERE rowid = '.((int) $idProductFournPrice); $resql = $this->db->query($sql); if (!$resql) { @@ -1850,14 +1827,18 @@ class SupplierProposal extends CommonObject $values[] = $product->multicurrency_total_ht; $values[] = $multicurrency->rate->rate; } else { - for ($i = 0; $i < 5; $i++) $values[] = 'NULL'; + for ($i = 0; $i < 5; $i++) { + $values[] = 'NULL'; + } } } } $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_fournisseur_price '; $sql .= '(datec, fk_product, fk_soc, ref_fourn, price, quantity, unitprice, tva_tx, fk_user'; - if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) $sql .= ',fk_multicurrency, multicurrency_code, multicurrency_unitprice, multicurrency_price, multicurrency_tx'; + if (!empty($conf->multicurrency->enabled) && !empty($product->multicurrency_code)) { + $sql .= ',fk_multicurrency, multicurrency_code, multicurrency_unitprice, multicurrency_price, multicurrency_tx'; + } $sql .= ') VALUES ('.implode(',', $values).')'; $resql = $this->db->query($sql); @@ -1882,8 +1863,7 @@ class SupplierProposal extends CommonObject $error = 0; - if ($this->statut == self::STATUS_DRAFT) - { + if ($this->statut == self::STATUS_DRAFT) { dol_syslog(get_class($this)."::setDraft already draft status", LOG_WARNING); return 0; } @@ -1892,8 +1872,7 @@ class SupplierProposal extends CommonObject $sql .= " SET fk_statut = ".self::STATUS_DRAFT; $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { if (!$error) { $this->oldcopy = clone $this; } @@ -1901,7 +1880,9 @@ class SupplierProposal extends CommonObject if (!$error) { // Call trigger $result = $this->call_trigger('PROPOSAL_SUPPLIER_UNVALIDATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { @@ -1943,38 +1924,42 @@ class SupplierProposal extends CommonObject $sql = "SELECT s.rowid, s.nom as name, s.client,"; $sql .= " p.rowid as supplier_proposalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql .= " p.datep as dp, p.fin_validite as datelimite"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", sc.fk_soc, sc.fk_user"; + } $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as p, ".MAIN_DB_PREFIX."c_propalst as c"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.fk_statut = c.id"; - if (!$user->rights->societe->client->voir && !$socid) //restriction - { + if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } - if ($socid) $sql .= " AND s.rowid = ".$socid; - if ($draft) $sql .= " AND p.fk_statut = 0"; - if ($notcurrentuser > 0) $sql .= " AND p.fk_user_author <> ".$user->id; + if ($socid) { + $sql .= " AND s.rowid = ".((int) $socid); + } + if ($draft) { + $sql .= " AND p.fk_statut = 0"; + } + if ($notcurrentuser > 0) { + $sql .= " AND p.fk_user_author <> ".$user->id; + } $sql .= $this->db->order($sortfield, $sortorder); $sql .= $this->db->plimit($limit, $offset); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($shortlist == 1) - { + if ($shortlist == 1) { $ga[$obj->supplier_proposalid] = $obj->ref; - } elseif ($shortlist == 2) - { + } elseif ($shortlist == 2) { $ga[$obj->supplier_proposalid] = $obj->ref.' ('.$obj->name.')'; } else { $ga[$i]['id'] = $obj->supplier_proposalid; @@ -2008,57 +1993,51 @@ class SupplierProposal extends CommonObject $this->db->begin(); - if (!$notrigger) - { + if (!$notrigger) { // Call trigger $result = $this->call_trigger('PROPOSAL_SUPPLIER_DELETE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { $main = MAIN_DB_PREFIX.'supplier_proposaldet'; $ef = $main."_extrafields"; $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_supplier_proposal = ".$this->id.")"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal = ".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal WHERE rowid = ".$this->id; - if ($this->db->query($sqlef) && $this->db->query($sql)) - { + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $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->supplier_proposal->dir_output && !empty($this->ref)) - { + if ($conf->supplier_proposal->dir_output && !empty($this->ref)) { $dir = $conf->supplier_proposal->dir_output."/".$ref; $file = $dir."/".$ref.".pdf"; - if (file_exists($file)) - { + if (file_exists($file)) { dol_delete_preview($this); - if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers - { + if (!dol_delete_file($file, 0, 0, 0, $this)) { // For triggers $this->error = 'ErrorFailToDeleteFile'; $this->errors = array('ErrorFailToDeleteFile'); $this->db->rollback(); return 0; } } - if (file_exists($dir)) - { + if (file_exists($dir)) { $res = @dol_delete_dir_recursive($dir); - if (!$res) - { + if (!$res) { $this->error = 'ErrorFailToDeleteDir'; $this->errors = array('ErrorFailToDeleteDir'); $this->db->rollback(); @@ -2069,19 +2048,16 @@ class SupplierProposal extends CommonObject } // Removed extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; $errorflag = -4; dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR); } } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::delete ".$this->id." by ".$user->id, LOG_DEBUG); $this->db->commit(); return 1; @@ -2122,10 +2098,8 @@ class SupplierProposal extends CommonObject $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -2138,15 +2112,13 @@ class SupplierProposal extends CommonObject $cuser->fetch($obj->fk_user_author); $this->user_creation = $cuser; - if ($obj->fk_user_valid) - { + if ($obj->fk_user_valid) { $vuser = new User($this->db); $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } - if ($obj->fk_user_cloture) - { + if ($obj->fk_user_cloture) { $cluser = new User($this->db); $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; @@ -2183,8 +2155,7 @@ class SupplierProposal extends CommonObject // phpcs:enable // Init/load array of translation of status - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; $langs->load("supplier_proposal"); $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv("SupplierProposalStatusDraft"); @@ -2200,11 +2171,17 @@ class SupplierProposal extends CommonObject } $statusnew = ''; - if ($status == self::STATUS_DRAFT) $statusnew = 'status0'; - elseif ($status == self::STATUS_VALIDATED) $statusnew = 'status1'; - elseif ($status == self::STATUS_SIGNED) $statusnew = 'status4'; - elseif ($status == self::STATUS_NOTSIGNED) $statusnew = 'status9'; - elseif ($status == self::STATUS_CLOSE) $statusnew = 'status6'; + if ($status == self::STATUS_DRAFT) { + $statusnew = 'status0'; + } elseif ($status == self::STATUS_VALIDATED) { + $statusnew = 'status1'; + } elseif ($status == self::STATUS_SIGNED) { + $statusnew = 'status4'; + } elseif ($status == self::STATUS_NOTSIGNED) { + $statusnew = 'status9'; + } elseif ($status == self::STATUS_CLOSE) { + $statusnew = 'status6'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusnew, $mode); } @@ -2230,20 +2207,24 @@ class SupplierProposal extends CommonObject $sql = "SELECT p.rowid, p.ref, p.datec as datec"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + if (!$user->rights->societe->client->voir && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".$user->id; $clause = " AND"; } $sql .= $clause." p.entity IN (".getEntity('supplier_proposal').")"; - if ($mode == 'opened') $sql .= " AND p.fk_statut = 1"; - if ($mode == 'signed') $sql .= " AND p.fk_statut = 2"; - if ($user->socid) $sql .= " AND p.fk_soc = ".$user->socid; + if ($mode == 'opened') { + $sql .= " AND p.fk_statut = 1"; + } + if ($mode == 'signed') { + $sql .= " AND p.fk_statut = 2"; + } + if ($user->socid) { + $sql .= " AND p.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $label = $labelShort = ''; $status = ''; if ($mode == 'opened') { @@ -2267,14 +2248,11 @@ class SupplierProposal extends CommonObject $response->img = img_object('', "propal"); // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; - if ($mode == 'opened') - { + if ($mode == 'opened') { $datelimit = $this->db->jdate($obj->datefin); - if ($datelimit < ($now - $delay_warning)) - { + if ($datelimit < ($now - $delay_warning)) { $response->nbtodolate++; } } @@ -2309,12 +2287,10 @@ class SupplierProposal extends CommonObject $sql .= $this->db->plimit(100); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_prods = $this->db->num_rows($resql); $i = 0; - while ($i < $num_prods) - { + while ($i < $num_prods) { $i++; $row = $this->db->fetch_row($resql); $prodids[$i] = $row[0]; @@ -2336,8 +2312,7 @@ class SupplierProposal extends CommonObject // Lines $nbp = 5; $xnbp = 0; - while ($xnbp < $nbp) - { + while ($xnbp < $nbp) { $line = new SupplierProposalLine($this->db); $line->desc = $langs->trans("Description")." ".$xnbp; $line->qty = 1; @@ -2345,8 +2320,7 @@ class SupplierProposal extends CommonObject $line->tva_tx = 19.6; $line->localtax1_tx = 0; $line->localtax2_tx = 0; - if ($xnbp == 2) - { + if ($xnbp == 2) { $line->total_ht = 50; $line->total_ttc = 59.8; $line->total_tva = 9.8; @@ -2358,8 +2332,7 @@ class SupplierProposal extends CommonObject $line->remise_percent = 00; } - if ($num_prods > 0) - { + if ($num_prods > 0) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; } @@ -2391,8 +2364,7 @@ class SupplierProposal extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -2400,11 +2372,9 @@ class SupplierProposal extends CommonObject $sql .= " ".$clause." p.entity IN (".getEntity('supplier_proposal').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["supplier_proposals"] = $obj->nb; } $this->db->free($resql); @@ -2429,8 +2399,7 @@ class SupplierProposal extends CommonObject global $conf, $db, $langs; $langs->load("supplier_proposal"); - if (!empty($conf->global->SUPPLIER_PROPOSAL_ADDON)) - { + if (!empty($conf->global->SUPPLIER_PROPOSAL_ADDON)) { $mybool = false; $file = $conf->global->SUPPLIER_PROPOSAL_ADDON.".php"; @@ -2445,8 +2414,7 @@ class SupplierProposal extends CommonObject $mybool |= @include_once $dir.$file; } - if (!$mybool) - { + if (!$mybool) { dol_print_error('', "Failed to include file ".$file); return ''; } @@ -2455,8 +2423,7 @@ class SupplierProposal extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -2484,7 +2451,9 @@ class SupplierProposal extends CommonObject { global $langs, $conf, $user; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $url = ''; $result = ''; @@ -2493,11 +2462,21 @@ class SupplierProposal extends CommonObject if (isset($this->status)) { $label .= ' '.$this->getLibStatut(5); } - if (!empty($this->ref)) $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; - if (!empty($this->ref_fourn)) $label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_fourn; - if (!empty($this->total_ht)) $label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) $label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) $label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->ref)) { + $label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; + } + if (!empty($this->ref_fourn)) { + $label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_fourn; + } + if (!empty($this->total_ht)) { + $label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + } + if (!empty($this->total_tva)) { + $label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + } + if (!empty($this->total_ttc)) { + $label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + } if ($option == '') { $url = DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$this->id.$get_params; @@ -2506,19 +2485,20 @@ class SupplierProposal extends CommonObject $url = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$this->id.$get_params; } - if ($option !== 'nolink') - { + 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'; + 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) && $user->rights->propal->lire) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip) && $user->rights->propal->lire) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowSupplierProposal"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } @@ -2531,15 +2511,17 @@ class SupplierProposal extends CommonObject $linkend = '</a>'; $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; + 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) - { + if ($addlinktonotes) { $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { + if ($txttoshow) { $notetoshow = $langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow, 1); $result .= ' <span class="note inline-block">'; $result .= '<a href="'.DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">'; @@ -2577,13 +2559,11 @@ class SupplierProposal extends CommonObject dol_syslog(get_class($this).'::getLinesArray', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); $this->lines[$i] = new SupplierProposalLine($this->db); @@ -2784,7 +2764,7 @@ class SupplierProposalLine extends CommonObjectLine // Bit 0: 0 si TVA normal - 1 si TVA NPR // Bit 1: 0 ligne normale - 1 si ligne de remise fixe - public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne + public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne public $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne @@ -2874,11 +2854,10 @@ class SupplierProposalLine extends CommonObjectLine $sql .= ' pd.fk_multicurrency, pd.multicurrency_code, pd.multicurrency_subprice, pd.multicurrency_total_ht, pd.multicurrency_total_tva, pd.multicurrency_total_ttc, pd.fk_unit'; $sql .= ' FROM '.MAIN_DB_PREFIX.'supplier_proposaldet as pd'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid'; - $sql .= ' WHERE pd.rowid = '.$rowid; + $sql .= ' WHERE pd.rowid = '.((int) $rowid); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $objp = $this->db->fetch_object($result); $this->id = $objp->rowid; @@ -2949,30 +2928,62 @@ class SupplierProposalLine extends CommonObjectLine 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->fk_fournprice)) $this->fk_fournprice = 0; - if (empty($this->fk_unit)) $this->fk_unit = 0; - if (empty($this->subprice)) $this->subprice = 0; + 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->fk_fournprice)) { + $this->fk_fournprice = 0; + } + if (empty($this->fk_unit)) { + $this->fk_unit = 0; + } + if (empty($this->subprice)) { + $this->subprice = 0; + } - if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -2980,7 +2991,9 @@ class SupplierProposalLine extends CommonObjectLine } // Check parameters - if ($this->product_type < 0) return -1; + if ($this->product_type < 0) { + return -1; + } $this->db->begin(); @@ -3033,25 +3046,20 @@ class SupplierProposalLine extends CommonObjectLine dol_syslog(get_class($this).'::insert', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'supplier_proposaldet'); - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINESUPPLIER_PROPOSAL_INSERT', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -3081,14 +3089,11 @@ class SupplierProposalLine extends CommonObjectLine $sql = "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE rowid = ".$this->id; dol_syslog("SupplierProposalLine::delete", LOG_DEBUG); - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { // Remove extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } @@ -3096,8 +3101,7 @@ class SupplierProposalLine extends CommonObjectLine // Call trigger $result = $this->call_trigger('LINESUPPLIER_PROPOSAL_DELETE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -3126,30 +3130,62 @@ class SupplierProposalLine extends CommonObjectLine $error = 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->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; - if (empty($this->localtax1_type)) $this->localtax1_type = 0; - if (empty($this->localtax2_type)) $this->localtax2_type = 0; - if (empty($this->marque_tx)) $this->marque_tx = 0; - if (empty($this->marge_tx)) $this->marge_tx = 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->fk_fournprice)) $this->fk_fournprice = 0; - if (empty($this->fk_unit)) $this->fk_unit = 0; - if (empty($this->subprice)) $this->subprice = 0; + 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->total_localtax1)) { + $this->total_localtax1 = 0; + } + if (empty($this->total_localtax2)) { + $this->total_localtax2 = 0; + } + if (empty($this->localtax1_type)) { + $this->localtax1_type = 0; + } + if (empty($this->localtax2_type)) { + $this->localtax2_type = 0; + } + if (empty($this->marque_tx)) { + $this->marque_tx = 0; + } + if (empty($this->marge_tx)) { + $this->marge_tx = 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->fk_fournprice)) { + $this->fk_fournprice = 0; + } + if (empty($this->fk_unit)) { + $this->fk_unit = 0; + } + if (empty($this->subprice)) { + $this->subprice = 0; + } - if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) - { - if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) - { + if ($this->pa_ht == 0) { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; } else { $this->pa_ht = $result; @@ -3174,8 +3210,7 @@ class SupplierProposalLine extends CommonObjectLine $sql .= " , subprice=".price2num($this->subprice).""; $sql .= " , remise_percent=".price2num($this->remise_percent).""; $sql .= " , info_bits='".$this->db->escape($this->info_bits)."'"; - if (empty($this->skip_update_total)) - { + 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).""; @@ -3184,9 +3219,13 @@ class SupplierProposalLine extends CommonObjectLine } $sql .= " , fk_product_fournisseur_price=".(!empty($this->fk_fournprice) ? "'".$this->db->escape($this->fk_fournprice)."'" : "null"); $sql .= " , buy_price_ht=".price2num($this->pa_ht); - if (strlen($this->special_code)) $sql .= " , special_code=".$this->special_code; + if (strlen($this->special_code)) { + $sql .= " , special_code=".$this->special_code; + } $sql .= " , fk_parent_line=".($this->fk_parent_line > 0 ? $this->fk_parent_line : "null"); - if (!empty($this->rang)) $sql .= ", rang=".$this->rang; + if (!empty($this->rang)) { + $sql .= ", rang=".$this->rang; + } $sql .= " , ref_fourn=".(!empty($this->ref_fourn) ? "'".$this->db->escape($this->ref_fourn)."'" : "null"); $sql .= " , fk_unit=".($this->fk_unit ? $this->fk_unit : 'null'); @@ -3200,23 +3239,18 @@ class SupplierProposalLine extends CommonObjectLine dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - if (!$error) - { + if ($resql) { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('LINESUPPLIER_PROPOSAL_UPDATE', $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -3254,8 +3288,7 @@ class SupplierProposalLine extends CommonObjectLine dol_syslog("SupplierProposalLine::update_total", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return 1; } else { diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index ce76b9d8bf7..0ba4485361d 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -39,7 +39,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal', ''); $object = new SupplierProposal($db); @@ -51,54 +53,43 @@ $permissiontoedit = $user->rights->supplier_proposal->creer; * Add a new contact */ -if ($action == 'addcontact' && $permissiontoedit) -{ +if ($action == 'addcontact' && $permissiontoedit) { $result = $object->fetch($id); - if ($result > 0 && $id > 0) - { + if ($result > 0 && $id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); - $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); + $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); + $result = $object->add_contact($contactid, $typeid, GETPOST("source")); } - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Toggle the status of a contact -elseif ($action == 'swapstatut' && $permissiontoedit) -{ - if ($object->fetch($id)) - { - $result = $object->swapContactStatus(GETPOST('ligne')); +} elseif ($action == 'swapstatut' && $permissiontoedit) { + // Toggle the status of a contact + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne', 'int')); } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } -} - -// Deleting a contact -elseif ($action == 'deletecontact' && $permissiontoedit) -{ +} elseif ($action == 'deletecontact' && $permissiontoedit) { + // Deleting a contact $object->fetch($id); $result = $object->delete_contact(GETPOST("lineid", 'int')); - if ($result >= 0) - { + if ($result >= 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - dol_print_error($db); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -123,12 +114,10 @@ $userstatic = new User($db); /* */ /* *************************************************************************** */ -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $langs->trans("SupplierProposal"); - if ($object->fetch($id, $ref) > 0) - { + if ($object->fetch($id, $ref) > 0) { $object->fetch_thirdparty(); $head = supplier_proposal_prepare_head($object); @@ -145,12 +134,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($permissiontoedit) - { + if ($permissiontoedit) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index 21026eb923b..1a61ba5620e 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -45,8 +45,7 @@ $ref = GETPOST('ref', 'alpha'); // Security check $socid = ''; -if (!empty($user->socid)) -{ +if (!empty($user->socid)) { $socid = $user->socid; } $result = restrictedArea($user, 'supplier_proposal', $id); @@ -56,20 +55,25 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new SupplierProposal($db); $object->fetch($id, $ref); -if ($object->id > 0) -{ +if ($object->id > 0) { $object->fetch_thirdparty(); $upload_dir = $conf->supplier_proposal->dir_output.'/'.dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } @@ -81,8 +85,7 @@ llxHeader('', $langs->trans('CommRequest'), 'EN:Ask_Price_Supplier|FR:Demande_de $form = new Form($db); -if ($object->id > 0) -{ +if ($object->id > 0) { $upload_dir = $conf->supplier_proposal->dir_output.'/'.dol_sanitizeFileName($object->ref); $head = supplier_proposal_prepare_head($object); @@ -91,8 +94,7 @@ if ($object->id > 0) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } @@ -108,12 +110,10 @@ if ($object->id > 0) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) - { + if ($user->rights->supplier_proposal->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 476c2a14db2..75eba410d0f 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -38,8 +38,7 @@ $langs->loadLangs(array('supplier_proposal', 'companies')); // Security check $socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) -{ +if (isset($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -62,38 +61,26 @@ print load_fiche_titre($langs->trans("SupplierProposalArea"), '', 'supplier_prop print '<div class="fichecenter"><div class="fichethirdleft">'; - -// Search form - -if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo -{ - print '<form method="post" action="'.DOL_URL_ROOT.'/supplier_proposal/list.php">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder nohover centpercent">'; - print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; - print '<tr class="oddeven"><td>'; - print $langs->trans("SupplierProposal").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; - print '</tr>'; - print "</table></div></form><br>\n"; -} - - // Statistics $sql = "SELECT count(p.rowid), p.fk_statut"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposal as p"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; -if ($user->socid) $sql .= ' AND p.fk_soc = '.$user->socid; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +if ($user->socid) { + $sql .= ' AND p.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 .= " AND p.fk_statut IN (0,1,2,3,4)"; $sql .= " GROUP BY p.fk_statut"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $i = 0; @@ -103,11 +90,9 @@ if ($resql) $colorseries = array(); $vals = array(); // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_row($resql); - if ($row) - { + if ($row) { //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) { $vals[$row[1]] = $row[0]; @@ -119,31 +104,38 @@ if ($resql) } $db->free($resql); - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("CommRequests").'</th></tr>'."\n"; $listofstatus = array(0, 1, 2, 3, 4); - foreach ($listofstatus as $status) - { + foreach ($listofstatus as $status) { $dataseries[] = array($supplier_proposalstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); - if ($status == SupplierProposal::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0; - if ($status == SupplierProposal::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1; - if ($status == SupplierProposal::STATUS_SIGNED) $colorseries[$status] = $badgeStatus4; - if ($status == SupplierProposal::STATUS_NOTSIGNED) $colorseries[$status] = $badgeStatus9; - if ($status == SupplierProposal::STATUS_CLOSE) $colorseries[$status] = $badgeStatus6; + if ($status == SupplierProposal::STATUS_DRAFT) { + $colorseries[$status] = '-'.$badgeStatus0; + } + if ($status == SupplierProposal::STATUS_VALIDATED) { + $colorseries[$status] = $badgeStatus1; + } + if ($status == SupplierProposal::STATUS_SIGNED) { + $colorseries[$status] = $badgeStatus4; + } + if ($status == SupplierProposal::STATUS_NOTSIGNED) { + $colorseries[$status] = $badgeStatus9; + } + if ($status == SupplierProposal::STATUS_CLOSE) { + $colorseries[$status] = $badgeStatus6; + } - if (empty($conf->use_javascript_ajax)) - { + if (empty($conf->use_javascript_ajax)) { print '<tr class="oddeven">'; print '<td>'.$supplier_proposalstatic->LibStatut($status, 0).'</td>'; print '<td class="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).'</a></td>'; print "</tr>\n"; } } - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print '<tr><td class="center" colspan="2">'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; @@ -170,32 +162,34 @@ if ($resql) /* * Draft askprice */ -if (!empty($conf->supplier_proposal->enabled)) -{ +if (!empty($conf->supplier_proposal->enabled)) { $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; $sql .= " AND c.fk_statut = 0"; - if ($socid) $sql .= " AND c.fk_soc = ".$socid; - 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; + } + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="2">'.$langs->trans("DraftRequests").'</th></tr>'; $langs->load("supplier_proposal"); $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -230,29 +224,32 @@ $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, $sql .= " date_cloture as datec"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} $sql .= " WHERE c.fk_soc = s.rowid"; $sql .= " AND c.entity = ".$conf->entity; //$sql.= " AND c.fk_statut > 2"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; -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; +} +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; +} $sql .= " ORDER BY c.tms DESC"; $sql .= $db->plimit($max, 0); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<th colspan="4">'.$langs->trans("LastModifiedRequests", $max).'</th></tr>'; $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven">'; @@ -292,44 +289,48 @@ if ($resql) } } print "</table></div><br>"; -} else dol_print_error($db); +} else { + dol_print_error($db); +} /* * Opened askprice */ -if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) -{ +if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { $langs->load("supplier_proposal"); $now = dol_now(); - $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as supplier_proposalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datec as dp"; + $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as supplier_proposalid, p.total_ttc, p.total_tva, p.total_ht, p.ref, p.fk_statut, p.datec as dp"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposal as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } $sql .= " WHERE p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND p.fk_statut = 1"; - 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; + 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 = ".((int) $socid); + } $sql .= " ORDER BY p.rowid DESC"; $result = $db->query($sql); - if ($result) - { + if ($result) { $total = 0; $num = $db->num_rows($result); $i = 0; - if ($num > 0) - { + if ($num > 0) { print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened").' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>'; $nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD)); - while ($i < $nbofloop) - { + while ($i < $nbofloop) { $obj = $db->fetch_object($result); print '<tr class="oddeven">'; @@ -345,7 +346,9 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa print $supplier_proposalstatic->getNomUrl(1); print '</td>'; print '<td width="18" class="nobordernopadding nowrap">'; - if ($db->jdate($obj->dfv) < ($now - $conf->supplier_proposal->cloture->warning_delay)) print img_warning($langs->trans("Late")); + if ($db->jdate($obj->dfv) < ($now - $conf->supplier_proposal->cloture->warning_delay)) { + print img_warning($langs->trans("Late")); + } print '</td>'; print '<td width="16" class="center nobordernopadding">'; $filename = dol_sanitizeFileName($obj->ref); @@ -370,11 +373,9 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa $i++; $total += $obj->total_ttc; } - if ($num > $nbofloop) - { + if ($num > $nbofloop) { print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>"; - } elseif ($total > 0) - { + } elseif ($total > 0) { print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td><td>&nbsp;</td></tr>"; } print "</table></div><br>"; diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index dbff367b7c8..77268671275 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -39,7 +39,9 @@ $id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if (!empty($user->socid)) $socid = $user->socid; +if (!empty($user->socid)) { + $socid = $user->socid; +} $result = restrictedArea($user, 'supplier_proposal', $id); @@ -72,12 +74,10 @@ $morehtmlref = '<div class="refidno">'; // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) - { + if ($user->rights->supplier_proposal->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 421ac40b447..2c7ba7694dd 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -40,8 +40,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; -if (!empty($conf->projet->enabled)) +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('companies', 'propal', 'supplier_proposal', 'compta', 'bills', 'orders', 'products')); @@ -89,18 +90,27 @@ $yearvalid = GETPOST("yearvalid"); $monthvalid = GETPOST("monthvalid"); $dayvalid = GETPOST("dayvalid"); +$optioncss = GETPOST('optioncss', '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 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 +if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction === '0')) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = 'sp.date_livraison'; -if (!$sortorder) $sortorder = 'DESC'; +if (!$sortfield) { + $sortfield = 'sp.date_livraison'; +} +if (!$sortorder) { + $sortorder = 'DESC'; +} -if ($object_statut != '') $search_status = $object_statut; +if ($object_statut != '') { + $search_status = $object_statut; +} // Nombre de ligne pour choix de produit/service predefinis $NBLINES = 4; @@ -109,9 +119,10 @@ $NBLINES = 4; $module = 'supplier_proposal'; $dbtable = ''; $objectid = ''; -if (!empty($user->socid)) $socid = $user->socid; -if (!empty($socid)) -{ +if (!empty($user->socid)) { + $socid = $user->socid; +} +if (!empty($socid)) { $objectid = $socid; $module = 'societe'; $dbtable = '&societe'; @@ -138,7 +149,9 @@ $fieldstosearchall = array( 'pd.description'=>'Description', 'sp.note_public'=>'NotePublic', ); -if (empty($user->socid)) $fieldstosearchall["p.note_private"] = "NotePrivate"; +if (empty($user->socid)) { + $fieldstosearchall["p.note_private"] = "NotePrivate"; +} $checkedtypetiers = 0; $arrayfields = array( @@ -152,7 +165,7 @@ $arrayfields = array( 'sp.date_valid'=>array('label'=>$langs->trans("Date"), 'checked'=>1), 'sp.date_livraison'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1), 'sp.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'sp.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), + 'sp.total_tva'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), 'sp.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), 'sp.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), 'sp.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)), @@ -176,18 +189,23 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on 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 -{ +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_categ = ''; $search_user = ''; $search_sale = ''; @@ -219,8 +237,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $object_statut = ''; } -if (empty($reshook)) -{ +if (empty($reshook)) { $objectclass = 'SupplierProposal'; $objectlabel = 'SupplierProposals'; $permissiontoread = $user->rights->supplier_proposal->lire; @@ -249,19 +266,25 @@ $help_url = 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'; //llxHeader('',$langs->trans('CommRequest'),$help_url); $sql = 'SELECT'; -if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DISTINCT'; +if ($sall || $search_product_category > 0 || $search_user > 0) { + $sql = 'SELECT DISTINCT'; +} $sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; -$sql .= ' sp.rowid, sp.note_private, sp.total_ht, sp.tva as total_vat, sp.total as total_ttc, sp.localtax1, sp.localtax2, sp.ref, sp.fk_statut as status, sp.fk_user_author, sp.date_valid, sp.date_livraison as dp,'; +$sql .= ' sp.rowid, sp.note_public, sp.note_private, sp.total_ht, sp.total_tva, sp.total_ttc, sp.localtax1, sp.localtax2, sp.ref, sp.fk_statut as status, sp.fk_user_author, sp.date_valid, sp.date_livraison as dp,'; $sql .= ' sp.fk_multicurrency, sp.multicurrency_code, sp.multicurrency_tx, sp.multicurrency_total_ht, sp.multicurrency_total_tva as multicurrency_total_vat, sp.multicurrency_total_ttc,'; $sql .= ' sp.datec as date_creation, sp.tms as date_update,'; $sql .= " p.rowid as project_id, p.ref as project_ref,"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,"; +if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " sc.fk_soc, sc.fk_user,"; +} $sql .= " u.firstname, u.lastname, u.photo, u.login"; // 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(); @@ -272,48 +295,93 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql .= ', '.MAIN_DB_PREFIX.'supplier_proposal as sp'; -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 (sp.rowid = ef.fk_object)"; -if ($sall || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'supplier_proposaldet as pd ON sp.rowid=pd.fk_supplier_proposal'; -if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +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 (sp.rowid = ef.fk_object)"; +} +if ($sall || $search_product_category > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'supplier_proposaldet as pd ON sp.rowid=pd.fk_supplier_proposal'; +} +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 sp.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = sp.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"; -if ($search_user > 0) -{ +if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +} +if ($search_user > 0) { $sql .= ", ".MAIN_DB_PREFIX."element_contact as c"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } $sql .= ' WHERE sp.fk_soc = s.rowid'; $sql .= ' AND sp.entity IN ('.getEntity('supplier_proposal').')'; -if (!$user->rights->societe->client->voir && !$socid) //restriction -{ +if (!$user->rights->societe->client->voir && !$socid) { //restriction $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } -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 (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -if ($search_ref) $sql .= natural_search('sp.ref', $search_ref); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); -if ($search_login) $sql .= natural_search('u.login', $search_login); -if ($search_montant_ht) $sql .= natural_search('sp.total_ht=', $search_montant_ht, 1); -if ($search_montant_vat != '') $sql .= natural_search("sp.tva", $search_montant_vat, 1); -if ($search_montant_ttc != '') $sql .= natural_search("sp.total", $search_montant_ttc, 1); -if ($search_multicurrency_code != '') $sql .= ' AND sp.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; -if ($search_multicurrency_tx != '') $sql .= natural_search('sp.multicurrency_tx', $search_multicurrency_tx, 1); -if ($search_multicurrency_montant_ht != '') $sql .= natural_search('sp.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); -if ($search_multicurrency_montant_vat != '') $sql .= natural_search('sp.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); -if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('sp.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($socid) $sql .= ' AND s.rowid = '.$socid; -if ($search_status >= 0 && $search_status != '') $sql .= ' AND sp.fk_statut IN ('.$db->sanitize($db->escape($search_status)).')'; +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->sanitize($search_country).')'; +} +if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $sql .= " AND s.fk_typent IN (".$db->sanitize($search_type_thirdparty).')'; +} +if ($search_ref) { + $sql .= natural_search('sp.ref', $search_ref); +} +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} +if ($search_login) { + $sql .= natural_search('u.login', $search_login); +} +if ($search_montant_ht) { + $sql .= natural_search('sp.total_ht=', $search_montant_ht, 1); +} +if ($search_montant_vat != '') { + $sql .= natural_search("sp.total_tva", $search_montant_vat, 1); +} +if ($search_montant_ttc != '') { + $sql .= natural_search("sp.total_ttc", $search_montant_ttc, 1); +} +if ($search_multicurrency_code != '') { + $sql .= ' AND sp.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"'; +} +if ($search_multicurrency_tx != '') { + $sql .= natural_search('sp.multicurrency_tx', $search_multicurrency_tx, 1); +} +if ($search_multicurrency_montant_ht != '') { + $sql .= natural_search('sp.multicurrency_total_ht', $search_multicurrency_montant_ht, 1); +} +if ($search_multicurrency_montant_vat != '') { + $sql .= natural_search('sp.multicurrency_total_tva', $search_multicurrency_montant_vat, 1); +} +if ($search_multicurrency_montant_ttc != '') { + $sql .= natural_search('sp.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($socid) { + $sql .= ' AND s.rowid = '.$socid; +} +if ($search_status >= 0 && $search_status != '') { + $sql .= ' AND sp.fk_statut IN ('.$db->sanitize($db->escape($search_status)).')'; +} $sql .= dolSqlDateFilter("sp.date_livraison", $day, $month, $year); $sql .= dolSqlDateFilter("sp.date_valid", $dayvalid, $monthvalid, $yearvalid); -if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; -if ($search_user > 0) -{ +if ($search_sale > 0) { + $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; +} +if ($search_user > 0) { $sql .= " AND c.fk_c_type_contact = tc.rowid AND tc.element='supplier_proposal' AND tc.source='internal' AND c.element_id = sp.rowid AND c.fk_socpeople = ".$search_user; } // Add where from extra fields @@ -328,12 +396,10 @@ $sql .= ', sp.ref DESC'; // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -342,13 +408,11 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $objectstatic = new SupplierProposal($db); $userstatic = new User($db); - if ($socid > 0) - { + if ($socid > 0) { $soc = new Societe($db); $soc->fetch($socid); $title = $langs->trans('ListOfSupplierProposals').' - '.$soc->name; @@ -360,8 +424,7 @@ if ($resql) $arrayofselected = is_array($toselect) ? $toselect : array(); - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) { $obj = $db->fetch_object($resql); $id = $obj->rowid; @@ -374,47 +437,100 @@ if ($resql) llxHeader('', $langs->trans('CommRequest'), $help_url); $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 ($month) $param .= '&month='.urlencode($month); - if ($year) $param .= '&year='.urlencode($year); - if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); - if ($search_societe) $param .= '&search_societe='.urlencode($search_societe); - if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); - if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); - if ($search_montant_ht) $param .= '&search_montant_ht='.urlencode($search_montant_ht); - 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); - if ($search_multicurrency_montant_vat != '') $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); - if ($search_multicurrency_montant_ttc != '') $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); - if ($search_login) $param .= '&search_login='.urlencode($search_login); - if ($search_town) $param .= '&search_town='.urlencode($search_town); - if ($search_zip) $param .= '&search_zip='.urlencode($search_zip); - if ($socid > 0) $param .= '&socid='.urlencode($socid); - if ($search_status != '') $param .= '&search_status='.urlencode($search_status); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + 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 ($month) { + $param .= '&month='.urlencode($month); + } + if ($year) { + $param .= '&year='.urlencode($year); + } + if ($search_ref) { + $param .= '&search_ref='.urlencode($search_ref); + } + if ($search_societe) { + $param .= '&search_societe='.urlencode($search_societe); + } + if ($search_user > 0) { + $param .= '&search_user='.urlencode($search_user); + } + if ($search_sale > 0) { + $param .= '&search_sale='.urlencode($search_sale); + } + if ($search_montant_ht) { + $param .= '&search_montant_ht='.urlencode($search_montant_ht); + } + 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); + } + if ($search_multicurrency_montant_vat != '') { + $param .= '&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat); + } + if ($search_multicurrency_montant_ttc != '') { + $param .= '&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc); + } + if ($search_login) { + $param .= '&search_login='.urlencode($search_login); + } + if ($search_town) { + $param .= '&search_town='.urlencode($search_town); + } + if ($search_zip) { + $param .= '&search_zip='.urlencode($search_zip); + } + if ($socid > 0) { + $param .= '&socid='.urlencode($socid); + } + if ($search_status != '') { + $param .= '&search_status='.urlencode($search_status); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } + if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { + $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); + } // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>$langs->trans("ReGeneratePDF"), - 'builddoc'=>$langs->trans("PDFMerge"), - //'presend'=>$langs->trans("SendByMail"), + 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email',, 'class="pictofixedwidth"').'&ensp;'.$langs->trans("SendByMail"), ); - if ($user->rights->supplier_proposal->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if ($user->rights->supplier_proposal->supprimer) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').'&ensp;'.$langs->trans("Delete"); + } + if (in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $url = DOL_URL_ROOT.'/supplier_proposal/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $url, '', $user->rights->supplier_proposal->creer); // Fields title search print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -429,9 +545,10 @@ if ($resql) $trackid = 'spro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -439,40 +556,39 @@ if ($resql) $moreforfilter = ''; - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': '; - $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300'); - $moreforfilter .= '</div>'; - } // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { + if ($user->rights->societe->client->voir || $socid) { + $langs->load("commercial"); $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('LinkedToSpecificUsers').': '; - $moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); + $moreforfilter .= '</div>'; + } + // If the user can view prospects other than his' + if ($user->rights->societe->client->voir || $socid) { + $moreforfilter .= '<div class="divsearchfield">'; + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '</div>'; } // If the user can view products - if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($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 .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('IncludingProductWithTag').': '; + $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '</div>'; } $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; + } else { + $moreforfilter = $hookmanager->resPrint; + } - if (!empty($moreforfilter)) - { + if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -480,50 +596,50 @@ 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); + if ($massactionbutton) { + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + } print '<div class="div-table-responsive">'; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<tr class="liste_titre_filter">'; - if (!empty($arrayfields['sp.ref']['checked'])) - { + if (!empty($arrayfields['sp.ref']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '</td>'; } - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="liste_titre left">'; print '<input class="flat" type="text" size="12" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">'; print '</td>'; } - if (!empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>'; - if (!empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.'"></td>'; + if (!empty($arrayfields['s.town']['checked'])) { + print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>'; + } + if (!empty($arrayfields['s.zip']['checked'])) { + print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.'"></td>'; + } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print '<td class="liste_titre">'; print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">'; print '</td>'; } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="liste_titre center">'; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print '</td>'; } // Company type - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone center">'; - 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 $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print '</td>'; } // Date - if (!empty($arrayfields['sp.date_valid']['checked'])) - { + if (!empty($arrayfields['sp.date_valid']['checked'])) { print '<td class="liste_titre center">'; //print $langs->trans('Month').': '; print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="monthvalid" value="'.dol_escape_htmltag($monthvalid).'">'; @@ -533,8 +649,7 @@ if ($resql) print '</td>'; } // Date - if (!empty($arrayfields['sp.date_livraison']['checked'])) - { + if (!empty($arrayfields['sp.date_livraison']['checked'])) { print '<td class="liste_titre center">'; //print $langs->trans('Month').': '; print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">'; @@ -544,64 +659,55 @@ if ($resql) print '</td>'; } - if (!empty($arrayfields['sp.total_ht']['checked'])) - { + if (!empty($arrayfields['sp.total_ht']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">'; print '</td>'; } - if (!empty($arrayfields['sp.total_vat']['checked'])) - { + if (!empty($arrayfields['sp.total_tva']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">'; print '</td>'; } - if (!empty($arrayfields['sp.total_ttc']['checked'])) - { + if (!empty($arrayfields['sp.total_ttc']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">'; print '</td>'; } - if (!empty($arrayfields['sp.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_code']['checked'])) { // Currency print '<td class="liste_titre">'; print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1); print '</td>'; } - if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) { // Currency rate print '<td class="liste_titre">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).'">'; print '</td>'; } - if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">'; print '</td>'; } - if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">'; print '</td>'; } - if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) { // Amount print '<td class="liste_titre right">'; print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">'; print '</td>'; } - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { // Author print '<td class="liste_titre center">'; print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">'; @@ -614,20 +720,17 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['sp.datec']['checked'])) - { + if (!empty($arrayfields['sp.datec']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Date modification - if (!empty($arrayfields['sp.tms']['checked'])) - { + if (!empty($arrayfields['sp.tms']['checked'])) { print '<td class="liste_titre">'; print '</td>'; } // Status - if (!empty($arrayfields['sp.fk_statut']['checked'])) - { + if (!empty($arrayfields['sp.fk_statut']['checked'])) { print '<td class="liste_titre maxwidthonsmartphone right">'; $formpropal->selectProposalStatus($search_status, 1, 0, 1, 'supplier', 'search_status'); print '</td>'; @@ -642,33 +745,75 @@ if ($resql) // Fields title print '<tr class="liste_titre">'; - if (!empty($arrayfields['sp.ref']['checked'])) print_liste_field_titre($arrayfields['sp.ref']['label'], $_SERVER["PHP_SELF"], 'sp.ref', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['sp.date_valid']['checked'])) print_liste_field_titre($arrayfields['sp.date_valid']['label'], $_SERVER["PHP_SELF"], 'sp.date_valid', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['sp.date_livraison']['checked'])) print_liste_field_titre($arrayfields['sp.date_livraison']['label'], $_SERVER["PHP_SELF"], 'sp.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); - if (!empty($arrayfields['sp.total_ht']['checked'])) print_liste_field_titre($arrayfields['sp.total_ht']['label'], $_SERVER["PHP_SELF"], 'sp.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['sp.total_vat']['checked'])) print_liste_field_titre($arrayfields['sp.total_vat']['label'], $_SERVER["PHP_SELF"], 'sp.total_vat', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['sp.total_ttc']['checked'])) print_liste_field_titre($arrayfields['sp.total_ttc']['label'], $_SERVER["PHP_SELF"], 'sp.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['sp.multicurrency_code']['checked'])) print_liste_field_titre($arrayfields['sp.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_code', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) print_liste_field_titre($arrayfields['sp.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_tx', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) print_liste_field_titre($arrayfields['sp.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) print_liste_field_titre($arrayfields['sp.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) print_liste_field_titre($arrayfields['sp.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); - if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['sp.ref']['checked'])) { + print_liste_field_titre($arrayfields['sp.ref']['label'], $_SERVER["PHP_SELF"], 'sp.ref', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.nom']['checked'])) { + print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.town']['checked'])) { + print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['s.zip']['checked'])) { + print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['state.nom']['checked'])) { + print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['country.code_iso']['checked'])) { + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $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['sp.date_valid']['checked'])) { + print_liste_field_titre($arrayfields['sp.date_valid']['label'], $_SERVER["PHP_SELF"], 'sp.date_valid', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['sp.date_livraison']['checked'])) { + print_liste_field_titre($arrayfields['sp.date_livraison']['label'], $_SERVER["PHP_SELF"], 'sp.date_livraison', '', $param, '', $sortfield, $sortorder, 'center '); + } + if (!empty($arrayfields['sp.total_ht']['checked'])) { + print_liste_field_titre($arrayfields['sp.total_ht']['label'], $_SERVER["PHP_SELF"], 'sp.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['sp.total_tva']['checked'])) { + print_liste_field_titre($arrayfields['sp.total_tva']['label'], $_SERVER["PHP_SELF"], 'sp.total_tva', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['sp.total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['sp.total_ttc']['label'], $_SERVER["PHP_SELF"], 'sp.total_ttc', '', $param, '', $sortfield, $sortorder, 'right '); + } + if (!empty($arrayfields['sp.multicurrency_code']['checked'])) { + print_liste_field_titre($arrayfields['sp.multicurrency_code']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_code', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) { + print_liste_field_titre($arrayfields['sp.multicurrency_tx']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_tx', '', $param, '', $sortfield, $sortorder); + } + if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) { + print_liste_field_titre($arrayfields['sp.multicurrency_total_ht']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_ht', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) { + print_liste_field_titre($arrayfields['sp.multicurrency_total_vat']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_tva', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) { + print_liste_field_titre($arrayfields['sp.multicurrency_total_ttc']['label'], $_SERVER['PHP_SELF'], 'sp.multicurrency_total_ttc', '', $param, 'class="right"', $sortfield, $sortorder); + } + if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $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); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (!empty($arrayfields['sp.datec']['checked'])) print_liste_field_titre($arrayfields['sp.datec']['label'], $_SERVER["PHP_SELF"], "sp.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (!empty($arrayfields['sp.tms']['checked'])) print_liste_field_titre($arrayfields['sp.tms']['label'], $_SERVER["PHP_SELF"], "sp.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap'); - if (!empty($arrayfields['sp.fk_statut']['checked'])) print_liste_field_titre($arrayfields['sp.fk_statut']['label'], $_SERVER["PHP_SELF"], "sp.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['sp.datec']['checked'])) { + print_liste_field_titre($arrayfields['sp.datec']['label'], $_SERVER["PHP_SELF"], "sp.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + } + if (!empty($arrayfields['sp.tms']['checked'])) { + print_liste_field_titre($arrayfields['sp.tms']['label'], $_SERVER["PHP_SELF"], "sp.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap'); + } + if (!empty($arrayfields['sp.fk_statut']['checked'])) { + print_liste_field_titre($arrayfields['sp.fk_statut']['label'], $_SERVER["PHP_SELF"], "sp.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print '</tr>'."\n"; @@ -677,8 +822,12 @@ if ($resql) $total = 0; $subtotal = 0; $totalarray = array(); - while ($i < min($num, $limit)) - { + $totalarray['nbfield'] = 0; + $totalarray['val'] = array(); + $totalarray['val']['sp.total_ht'] = 0; + $totalarray['val']['sp.total_tva'] = 0; + $totalarray['val']['sp.total_ttc'] = 0; + while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $objectstatic->id = $obj->rowid; @@ -695,8 +844,7 @@ if ($resql) print '<tr class="oddeven">'; - if (!empty($arrayfields['sp.ref']['checked'])) - { + if (!empty($arrayfields['sp.ref']['checked'])) { print '<td class="nowrap">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">'; @@ -707,8 +855,7 @@ if ($resql) // Warning $warnornote = ''; //if ($obj->fk_statut == 1 && $db->jdate($obj->date_valid) < ($now - $conf->supplier_proposal->warning_delay)) $warnornote .= img_warning($langs->trans("Late")); - if ($warnornote) - { + if ($warnornote) { print '<td style="min-width: 20px" class="nobordernopadding nowrap">'; print $warnornote; print '</td>'; @@ -722,147 +869,177 @@ if ($resql) print '</td></tr></table>'; print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Thirdparty - if (!empty($arrayfields['s.nom']['checked'])) - { + if (!empty($arrayfields['s.nom']['checked'])) { print '<td class="tdoverflowmax200">'; print $companystatic->getNomUrl(1, 'customer'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Town - if (!empty($arrayfields['s.town']['checked'])) - { + if (!empty($arrayfields['s.town']['checked'])) { print '<td class="nocellnopadd">'; print $obj->town; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Zip - if (!empty($arrayfields['s.zip']['checked'])) - { + if (!empty($arrayfields['s.zip']['checked'])) { print '<td class="nocellnopadd">'; print $obj->zip; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // State - if (!empty($arrayfields['state.nom']['checked'])) - { + if (!empty($arrayfields['state.nom']['checked'])) { print "<td>".$obj->state_name."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Country - if (!empty($arrayfields['country.code_iso']['checked'])) - { + if (!empty($arrayfields['country.code_iso']['checked'])) { print '<td class="center">'; $tmparray = getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type ent - if (!empty($arrayfields['typent.code']['checked'])) - { + if (!empty($arrayfields['typent.code']['checked'])) { print '<td class="center">'; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (count($typenArray) == 0) { + $typenArray = $formcompany->typent_array(1); + } print $typenArray[$obj->typent_code]; print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date proposal - if (!empty($arrayfields['sp.date_valid']['checked'])) - { + if (!empty($arrayfields['sp.date_valid']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_valid), 'day'); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date delivery - if (!empty($arrayfields['sp.date_livraison']['checked'])) - { + if (!empty($arrayfields['sp.date_livraison']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->dp), 'day'); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['sp.total_ht']['checked'])) - { - print '<td class="right">'.price($obj->total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_ht'; - $totalarray['val']['sp.total_ht'] += $obj->total_ht; + if (!empty($arrayfields['sp.total_ht']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_ht'; + } + $totalarray['val']['sp.total_ht'] += $obj->total_ht; } // Amount VAT - if (!empty($arrayfields['sp.total_vat']['checked'])) - { - print '<td class="right">'.price($obj->total_vat)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_vat'; - $totalarray['val']['sp.total_vat'] += $obj->total_vat; + if (!empty($arrayfields['sp.total_tva']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_tva)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_tva'; + } + $totalarray['val']['sp.total_tva'] += $obj->total_tva; } // Amount TTC - if (!empty($arrayfields['sp.total_ttc']['checked'])) - { - print '<td class="right">'.price($obj->total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_ttc'; + if (!empty($arrayfields['sp.total_ttc']['checked'])) { + print '<td class="right"><span class="amount">'.price($obj->total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'sp.total_ttc'; + } $totalarray['val']['sp.total_ttc'] += $obj->total_ttc; } // Currency - if (!empty($arrayfields['sp.multicurrency_code']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_code']['checked'])) { print '<td class="nowrap">'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Currency rate - if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) - { + if (!empty($arrayfields['sp.multicurrency_tx']['checked'])) { print '<td class="nowrap">'; $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount HT - if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ht)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['sp.multicurrency_total_ht']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount VAT - if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_vat)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['sp.multicurrency_total_vat']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_vat)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } // Amount TTC - if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) - { - print '<td class="right nowrap">'.price($obj->multicurrency_total_ttc)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['sp.multicurrency_total_ttc']['checked'])) { + print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; // Author - if (!empty($arrayfields['u.login']['checked'])) - { + if (!empty($arrayfields['u.login']['checked'])) { print '<td class="center">'; - if ($userstatic->id) print $userstatic->getLoginUrl(1); - else print '&nbsp;'; + if ($userstatic->id) { + print $userstatic->getLoginUrl(1); + } else { + print '&nbsp;'; + } print "</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -872,38 +1049,44 @@ if ($resql) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['sp.datec']['checked'])) - { + if (!empty($arrayfields['sp.datec']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['sp.tms']['checked'])) - { + if (!empty($arrayfields['sp.tms']['checked'])) { print '<td class="center nowrap">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['sp.fk_statut']['checked'])) - { + if (!empty($arrayfields['sp.fk_statut']['checked'])) { print '<td class="right">'.$objectstatic->getLibStatut(5)."</td>\n"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "</tr>\n"; @@ -928,7 +1111,9 @@ if ($resql) print '</form>'."\n"; $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) { + $hidegeneratedfilelistifempty = 0; + } // Show list of available documents $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 464f31aaaae..372b6b6d20b 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -40,7 +40,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); // Security check -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal'); $object = new SupplierProposal($db); @@ -64,19 +66,18 @@ llxHeader('', $langs->trans('CommRequest'), 'EN:Ask_Price_Supplier|FR:Demande_de $form = new Form($db); -if ($id > 0 || !empty($ref)) -{ - if ($mesg) print $mesg; +if ($id > 0 || !empty($ref)) { + if ($mesg) { + print $mesg; + } $now = dol_now(); - if ($object->fetch($id, $ref)) - { + if ($object->fetch($id, $ref)) { $object->fetch_thirdparty(); $societe = new Societe($db); - if ($societe->fetch($object->socid)) - { + if ($societe->fetch($object->socid)) { $head = supplier_proposal_prepare_head($object); print dol_get_fiche_head($head, 'note', $langs->trans('CommRequest'), -1, 'supplier_proposal'); @@ -92,12 +93,10 @@ if ($id > 0 || !empty($ref)) // Thirdparty $morehtmlref .= $langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->supplier_proposal->creer) - { + if ($user->rights->supplier_proposal->creer) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref .= ' : '; diff --git a/htdocs/supplier_proposal/tpl/index.html b/htdocs/supplier_proposal/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php index ea6f45e18be..c33c3b2ebac 100644 --- a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php @@ -18,8 +18,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; } @@ -35,41 +34,41 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>"> - <td><?php echo $langs->trans("SupplierProposal"); ?></td> - <td><a href="<?php echo DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowSupplierProposal"), "supplier_proposal").' '.$objectlink->ref; ?></a></td> - <td></td> - <td class="center"><?php echo dol_print_date($objectlink->datec, 'day'); ?></td> - <td class="right"><?php + <tr class="<?php echo $trclass; ?>"> + <td><?php echo $langs->trans("SupplierProposal"); ?></td> + <td><a href="<?php echo DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowSupplierProposal"), "supplier_proposal").' '.$objectlink->ref; ?></a></td> + <td></td> + <td class="center"><?php echo dol_print_date($objectlink->datec, 'day'); ?></td> + <td class="right"><?php if ($user->rights->supplier_proposal->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?></td> - <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> - </tr> - <?php + <td class="right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> + </tr> + <?php } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> - <td><?php echo $langs->trans("Total"); ?></td> - <td></td> - <td class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php + <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> + <td><?php echo $langs->trans("Total"); ?></td> + <td></td> + <td class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php } print "<!-- END PHP TEMPLATE -->\n"; diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index f50d0099263..31236ab5fa9 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -25,7 +25,9 @@ */ // Define DOL_DOCUMENT_ROOT -if (!defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..'); +if (!defined('DOL_DOCUMENT_ROOT')) { + define('DOL_DOCUMENT_ROOT', '..'); +} require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; @@ -44,8 +46,7 @@ $_REQUEST["logtohtml"] = 1; // Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative // et non path absolu. -if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"]) -{ +if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"]) { $_SERVER["PHP_SELF"] = $_SERVER["DOCUMENT_URI"]; } @@ -58,27 +59,28 @@ $conffiletoshowshort = "conf.php"; $conffile = "../conf/conf.php"; $conffiletoshow = "htdocs/conf/conf.php"; // For debian/redhat like systems -if (!file_exists($conffile)) -{ +if (!file_exists($conffile)) { $conffile = "/etc/dolibarr/conf.php"; $conffiletoshow = "/etc/dolibarr/conf.php"; } // Load conf file if it is already defined -if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) // Test on filesize is to ensure that conf file is more that an empty template with just <?php in first line -{ +if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) { // Test on filesize is to ensure that conf file is more that an empty template with just <?php in first line $result = include_once $conffile; // Load conf file - if ($result) - { - if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type = 'mysql'; // For backward compatibility + if ($result) { + if (empty($dolibarr_main_db_type)) { + $dolibarr_main_db_type = 'mysql'; // For backward compatibility + } //Mysql driver support has been removed in favor of mysqli if ($dolibarr_main_db_type == 'mysql') { $dolibarr_main_db_type = 'mysqli'; } - if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type == 'mysqli')) $dolibarr_main_db_port = '3306'; // For backward compatibility + if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type == 'mysqli')) { + $dolibarr_main_db_port = '3306'; // For backward compatibility + } // Clean parameters $dolibarr_main_data_root = isset($dolibarr_main_data_root) ?trim($dolibarr_main_data_root) : ''; @@ -88,25 +90,31 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > $dolibarr_main_document_root_alt = isset($dolibarr_main_document_root_alt) ?trim($dolibarr_main_document_root_alt) : ''; // Remove last / or \ on directories or url value - if (!empty($dolibarr_main_document_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root)) $dolibarr_main_document_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root); - if (!empty($dolibarr_main_url_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root)) $dolibarr_main_url_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root); - if (!empty($dolibarr_main_data_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_data_root)) $dolibarr_main_data_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_data_root); - if (!empty($dolibarr_main_document_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root_alt)) $dolibarr_main_document_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root_alt); - if (!empty($dolibarr_main_url_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root_alt)) $dolibarr_main_url_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root_alt); + if (!empty($dolibarr_main_document_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root)) { + $dolibarr_main_document_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root); + } + if (!empty($dolibarr_main_url_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root)) { + $dolibarr_main_url_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root); + } + if (!empty($dolibarr_main_data_root) && !preg_match('/^[\\/]+$/', $dolibarr_main_data_root)) { + $dolibarr_main_data_root = preg_replace('/[\\/]+$/', '', $dolibarr_main_data_root); + } + if (!empty($dolibarr_main_document_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_document_root_alt)) { + $dolibarr_main_document_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_document_root_alt); + } + if (!empty($dolibarr_main_url_root_alt) && !preg_match('/^[\\/]+$/', $dolibarr_main_url_root_alt)) { + $dolibarr_main_url_root_alt = preg_replace('/[\\/]+$/', '', $dolibarr_main_url_root_alt); + } // Create conf object - if (!empty($dolibarr_main_document_root)) - { + if (!empty($dolibarr_main_document_root)) { $result = conf($dolibarr_main_document_root); } // Load database driver - if ($result) - { - if (!empty($dolibarr_main_document_root) && !empty($dolibarr_main_db_type)) - { + if ($result) { + if (!empty($dolibarr_main_document_root) && !empty($dolibarr_main_db_type)) { $result = include_once $dolibarr_main_document_root."/core/db/".$dolibarr_main_db_type.'.class.php'; - if (!$result) - { + if (!$result) { $includeconferror = 'ErrorBadValueForDolibarrMainDBType'; } } @@ -120,7 +128,9 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > $conf->global->MAIN_LOGTOHTML = 1; // Define prefix -if (!isset($dolibarr_main_db_prefix) || !$dolibarr_main_db_prefix) $dolibarr_main_db_prefix = 'llx_'; +if (!isset($dolibarr_main_db_prefix) || !$dolibarr_main_db_prefix) { + $dolibarr_main_db_prefix = 'llx_'; +} define('MAIN_DB_PREFIX', (isset($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : '')); define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir @@ -128,27 +138,44 @@ define('DOL_DATA_ROOT', (isset($dolibarr_main_data_root) ? $dolibarr_main_data_r define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root) ? $dolibarr_main_url_root : '')); // URL relative root $uri = preg_replace('/^http(s?):\/\//i', '', constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* $suburi = strstr($uri, '/'); // $suburi contains url without domain -if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' +if ($suburi == '/') { + $suburi = ''; // If $suburi is /, it is now '' +} define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) -if (empty($character_set_client)) $character_set_client = "UTF-8"; +if (empty($character_set_client)) { + $character_set_client = "UTF-8"; +} $conf->file->character_set_client = strtoupper($character_set_client); -if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set = ($conf->db->type == 'mysqli' ? 'utf8' : ''); // Old installation +if (empty($dolibarr_main_db_character_set)) { + $dolibarr_main_db_character_set = ($conf->db->type == 'mysqli' ? 'utf8' : ''); // Old installation +} $conf->db->character_set = $dolibarr_main_db_character_set; -if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation = ($conf->db->type == 'mysqli' ? 'utf8_unicode_ci' : ''); // Old installation +if (empty($dolibarr_main_db_collation)) { + $dolibarr_main_db_collation = ($conf->db->type == 'mysqli' ? 'utf8_unicode_ci' : ''); // Old installation +} $conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation; -if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; +if (empty($dolibarr_main_db_encryption)) { + $dolibarr_main_db_encryption = 0; +} $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; -if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; +if (empty($dolibarr_main_db_cryptkey)) { + $dolibarr_main_db_cryptkey = ''; +} $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; -if (empty($conf->db->user)) $conf->db->user = ''; +if (empty($conf->db->user)) { + $conf->db->user = ''; +} // Defini objet langs $langs = new Translate('..', $conf); -if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); -else $langs->setDefaultLang('auto'); +if (GETPOST('lang', 'aZ09')) { + $langs->setDefaultLang(GETPOST('lang', 'aZ09')); +} else { + $langs->setDefaultLang('auto'); +} $bc[false] = ' class="bg1"'; $bc[true] = ' class="bg2"'; @@ -172,7 +199,9 @@ function conf($dolibarr_main_document_root) global $character_set_client; $return = include_once $dolibarr_main_document_root.'/core/class/conf.class.php'; - if (!$return) return -1; + if (!$return) { + return -1; + } $conf = new Conf(); $conf->db->type = trim($dolibarr_main_db_type); @@ -182,7 +211,9 @@ function conf($dolibarr_main_document_root) $conf->db->user = trim($dolibarr_main_db_user); $conf->db->pass = trim($dolibarr_main_db_pass); - if (empty($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation = 'utf8_unicode_ci'; + if (empty($conf->db->dolibarr_main_db_collation)) { + $conf->db->dolibarr_main_db_collation = 'utf8_unicode_ci'; + } return 1; } diff --git a/htdocs/support/index.php b/htdocs/support/index.php index cecada7ed65..220da1290ac 100644 --- a/htdocs/support/index.php +++ b/htdocs/support/index.php @@ -31,9 +31,12 @@ include_once 'inc.php'; $uri = preg_replace('/^http(s?):\/\//i', '', $dolibarr_main_url_root); $pos = strstr($uri, '/'); // $pos contient alors url sans nom domaine -if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a '' -if (!defined('DOL_URL_ROOT')) +if ($pos == '/') { + $pos = ''; // si $pos vaut /, on le met a '' +} +if (!defined('DOL_URL_ROOT')) { define('DOL_URL_ROOT', $pos); // URL racine relative +} $langs->loadLangs(array("other", $langs->load("help"))); @@ -49,10 +52,18 @@ print $langs->trans("HelpCenterDesc2")."<br>\n"; print '<br>'; $homeurl = DOL_URL_ROOT.'/'; -if (GETPOST('dol_hide_toptmenu')) $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_hide_toptmenu=1'; -if (GETPOST('dol_hide_leftmenu')) $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_hide_leftmenu=1'; -if (GETPOST('dol_no_mouse_hover')) $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_no_mouse_hover=1'; -if (GETPOST('dol_use_jmobile')) $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_use_jmobile=1'; +if (GETPOST('dol_hide_toptmenu')) { + $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_hide_toptmenu=1'; +} +if (GETPOST('dol_hide_leftmenu')) { + $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_hide_leftmenu=1'; +} +if (GETPOST('dol_no_mouse_hover')) { + $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_no_mouse_hover=1'; +} +if (GETPOST('dol_use_jmobile')) { + $homeurl .= (strpos($homeurl, '?') === false ? '?' : '&').'dol_use_jmobile=1'; +} print $langs->trans("ToGoBackToDolibarr", $homeurl); print '<br><br>'; @@ -86,20 +97,38 @@ print '<td align="center" valign="middle">'; print '<table class="nocellnopadd">'; print '<tr><td align="center">'; $urlwiki = 'https://wiki.dolibarr.org'; -if (preg_match('/fr/i', $langs->defaultlang)) $urlwiki = 'https://wiki.dolibarr.org/index.php/Accueil'; -if (preg_match('/es/i', $langs->defaultlang)) $urlwiki = 'https://wiki.dolibarr.org/index.php/Portada'; -if (preg_match('/de/i', $langs->defaultlang)) $urlwiki = 'https://wiki.dolibarr.org/index.php/Hauptseite'; +if (preg_match('/fr/i', $langs->defaultlang)) { + $urlwiki = 'https://wiki.dolibarr.org/index.php/Accueil'; +} +if (preg_match('/es/i', $langs->defaultlang)) { + $urlwiki = 'https://wiki.dolibarr.org/index.php/Portada'; +} +if (preg_match('/de/i', $langs->defaultlang)) { + $urlwiki = 'https://wiki.dolibarr.org/index.php/Hauptseite'; +} print '<br>'.$langs->trans("ForDocumentationSeeWiki", $urlwiki, $urlwiki); print '<br>'; $urlforum = 'https://www.dolibarr.org/forum/'; $urlforumlocal = 'https://www.dolibarr.org/forum/'; -if (preg_match('/fr/i', $langs->defaultlang)) $urlforumlocal = 'https://www.dolibarr.fr/forum/'; -if (preg_match('/es/i', $langs->defaultlang)) $urlforumlocal = 'https://www.dolibarr.es/foro/'; -if (preg_match('/it/i', $langs->defaultlang)) $urlforumlocal = 'http://www.dolibarr.it/forum/'; -if (preg_match('/gr/i', $langs->defaultlang)) $urlforumlocal = 'https://www.dolibarr.gr/forum/'; -if (preg_match('/de/i', $langs->defaultlang)) $urlforumlocal = 'https://www.dolibarr.de/forum/'; +if (preg_match('/fr/i', $langs->defaultlang)) { + $urlforumlocal = 'https://www.dolibarr.fr/forum/'; +} +if (preg_match('/es/i', $langs->defaultlang)) { + $urlforumlocal = 'https://www.dolibarr.es/foro/'; +} +if (preg_match('/it/i', $langs->defaultlang)) { + $urlforumlocal = 'http://www.dolibarr.it/forum/'; +} +if (preg_match('/gr/i', $langs->defaultlang)) { + $urlforumlocal = 'https://www.dolibarr.gr/forum/'; +} +if (preg_match('/de/i', $langs->defaultlang)) { + $urlforumlocal = 'https://www.dolibarr.de/forum/'; +} print '<br>'.$langs->trans("ForAnswersSeeForum", $urlforumlocal, $urlforumlocal).'<br>'; -if ($urlforumlocal != $urlforum) print '<b><a href="'.$urlforum.'">'.$urlforum.'</a></b>'; +if ($urlforumlocal != $urlforum) { + print '<b><a href="'.$urlforum.'">'.$urlforum.'</a></b>'; +} print '</td></tr></table>'; print '</td>'; print '</tr>'; diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index eb956ea9f32..ef448607b10 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -30,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk", "commercial")); @@ -38,8 +40,7 @@ $langs->loadLangs(array("admin", "cashdesk", "commercial")); * Actions */ -if (GETPOST('action', 'alpha') == 'set') -{ +if (GETPOST('action', 'alpha') == 'set') { $db->begin(); $res = dolibarr_set_const($db, "TAKEPOS_COLOR_THEME", GETPOST('TAKEPOS_COLOR_THEME', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -47,18 +48,18 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif (GETPOST('action', 'alpha') == 'setmethod') -{ +} elseif (GETPOST('action', 'alpha') == 'setmethod') { dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity); } diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index f5f678ec900..09f3b13d4d1 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -30,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk", "printing")); @@ -41,22 +43,22 @@ $res = 0; * Actions */ -if (GETPOST('action', 'alpha') == 'set') -{ +if (GETPOST('action', 'alpha') == 'set') { $db->begin(); dol_syslog("admin/bar"); $suplement_category = GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'); - if ($suplement_category < 0) $suplement_category = 0; + if ($suplement_category < 0) { + $suplement_category = 0; + } $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", $suplement_category, 'chaine', 0, '', $conf->entity); if ($res <= 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -153,8 +155,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); print '</td></tr>'; - if ($conf->global->TAKEPOS_SUPPLEMENTS) - { + if ($conf->global->TAKEPOS_SUPPLEMENTS) { print '<tr class="oddeven"><td>'; print $langs->trans("SupplementCategory"); print '</td>'; @@ -187,8 +188,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { } if ($conf->global->TAKEPOS_BAR_RESTAURANT) { - if ($conf->global->TAKEPOS_QR_MENU) - { + if ($conf->global->TAKEPOS_QR_MENU) { $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 print '<br>'; @@ -205,8 +205,7 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) { print '</table>'; } - if ($conf->global->TAKEPOS_AUTO_ORDER) - { + if ($conf->global->TAKEPOS_AUTO_ORDER) { print '<br>'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; diff --git a/htdocs/takepos/admin/index.html b/htdocs/takepos/admin/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/takepos/admin/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/takepos/admin/orderprinters.php b/htdocs/takepos/admin/orderprinters.php index 9ec59fb388b..eb23f26806c 100644 --- a/htdocs/takepos/admin/orderprinters.php +++ b/htdocs/takepos/admin/orderprinters.php @@ -34,7 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->loadLangs(array("main"), "categories", "takepos", "printing"); -if (!$user->rights->categorie->lire) accessforbidden(); +if (!$user->rights->categorie->lire) { + accessforbidden(); +} $id = GETPOST('id', 'int'); $type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT); @@ -44,31 +46,39 @@ $printer1 = GETPOST('printer1', 'alpha'); $printer2 = GETPOST('printer2', 'alpha'); $printer3 = GETPOST('printer3', 'alpha'); -if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +if (is_numeric($type)) { + $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility +} /* * Actions */ if ($action == "SavePrinter1") { $printedcategories = ";"; - if (is_array($printer1)) foreach ($printer1 as $cat) { - $printedcategories = $printedcategories.$cat.";"; + if (is_array($printer1)) { + foreach ($printer1 as $cat) { + $printedcategories = $printedcategories.$cat.";"; + } } dolibarr_set_const($db, "TAKEPOS_PRINTED_CATEGORIES_1", $printedcategories, 'chaine', 0, '', $conf->entity); } if ($action == "SavePrinter2") { $printedcategories = ";"; - if (is_array($printer2)) foreach ($printer2 as $cat) { - $printedcategories = $printedcategories.$cat.";"; + if (is_array($printer2)) { + foreach ($printer2 as $cat) { + $printedcategories = $printedcategories.$cat.";"; + } } dolibarr_set_const($db, "TAKEPOS_PRINTED_CATEGORIES_2", $printedcategories, 'chaine', 0, '', $conf->entity); } if ($action == "SavePrinter3") { $printedcategories = ";"; - if (is_array($printer3)) foreach ($printer3 as $cat) { - $printedcategories = $printedcategories.$cat.";"; + if (is_array($printer3)) { + foreach ($printer3 as $cat) { + $printedcategories = $printedcategories.$cat.";"; + } } dolibarr_set_const($db, "TAKEPOS_PRINTED_CATEGORIES_3", $printedcategories, 'chaine', 0, '', $conf->entity); } @@ -145,8 +155,7 @@ $fulltree = $cate_arbo; // Define data (format for treeview) $data = array(); $data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>''); -foreach ($fulltree as $key => $val) -{ +foreach ($fulltree as $key => $val) { $categstatic->id = $val['id']; $categstatic->ref = $val['label']; $categstatic->color = $val['color']; @@ -168,13 +177,18 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Printer").' 1</td><td></td>< print '</td></tr>'; $nbofentries = (count($data) - 1); print '<form action="orderprinters.php">'; -if ($nbofentries > 0) -{ +if ($nbofentries > 0) { print '<tr class="pair"><td colspan="3">'; print '<input type="hidden" name="action" value="SavePrinter1">'; foreach ($data as $row) { - if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_1, ';'.$row["rowid"].';') !== false) $checked = 'checked'; else $checked = ''; - if ($row["fk_menu"] == 0) print '<input type="checkbox" name="printer1[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_1, ';'.$row["rowid"].';') !== false) { + $checked = 'checked'; + } else { + $checked = ''; + } + if ($row["fk_menu"] == 0) { + print '<input type="checkbox" name="printer1[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + } } print '</td></tr>'; } else { @@ -196,13 +210,18 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Printer").' 2</td><td></td>< print '</td></tr>'; $nbofentries = (count($data) - 1); print '<form action="orderprinters.php">'; -if ($nbofentries > 0) -{ +if ($nbofentries > 0) { print '<tr class="pair"><td colspan="3">'; print '<input type="hidden" name="action" value="SavePrinter2">'; foreach ($data as $row) { - if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_2, ';'.$row["rowid"].';') !== false) $checked = 'checked'; else $checked = ''; - if ($row["fk_menu"] == 0) print '<input type="checkbox" name="printer2[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_2, ';'.$row["rowid"].';') !== false) { + $checked = 'checked'; + } else { + $checked = ''; + } + if ($row["fk_menu"] == 0) { + print '<input type="checkbox" name="printer2[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + } } print '</td></tr>'; } else { @@ -224,13 +243,18 @@ print '<tr class="liste_titre"><td>'.$langs->trans("Printer").' 3</td><td></td>< print '</td></tr>'; $nbofentries = (count($data) - 1); print '<form action="orderprinters.php">'; -if ($nbofentries > 0) -{ +if ($nbofentries > 0) { print '<tr class="pair"><td colspan="3">'; print '<input type="hidden" name="action" value="SavePrinter3">'; foreach ($data as $row) { - if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_3, ';'.$row["rowid"].';') !== false) $checked = 'checked'; else $checked = ''; - if ($row["fk_menu"] == 0) print '<input type="checkbox" name="printer3[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + if (strpos($conf->global->TAKEPOS_PRINTED_CATEGORIES_3, ';'.$row["rowid"].';') !== false) { + $checked = 'checked'; + } else { + $checked = ''; + } + if ($row["fk_menu"] == 0) { + print '<input type="checkbox" name="printer3[]" value="'.$row["rowid"].'" '.$checked.'>'.$row["label"].'<br>'; + } } print '</td></tr>'; } else { diff --git a/htdocs/takepos/admin/other.php b/htdocs/takepos/admin/other.php index e0beeedf502..f933472a443 100644 --- a/htdocs/takepos/admin/other.php +++ b/htdocs/takepos/admin/other.php @@ -36,7 +36,9 @@ if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) { } // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk")); @@ -61,7 +63,6 @@ if ($resql) { if (GETPOST('action', 'alpha') == 'set') { $db->begin(); - if (GETPOST('socid', 'int') < 0) $_POST["socid"] = ''; $res = dolibarr_set_const($db, "CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -86,7 +87,9 @@ if (GETPOST('action', 'alpha') == 'set') { dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } if (!$error) { $db->commit(); diff --git a/htdocs/takepos/admin/printqr.php b/htdocs/takepos/admin/printqr.php index d459fedf58f..87f742fe544 100644 --- a/htdocs/takepos/admin/printqr.php +++ b/htdocs/takepos/admin/printqr.php @@ -24,7 +24,9 @@ require '../../main.inc.php'; // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->load("cashdesk"); @@ -37,8 +39,7 @@ print '<center>'; if (GETPOSTISSET("id")) { print '<h1><b>'.$langs->trans("ScanToOrder").'</b></h1>'; print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode($id)."' width='30%'>"; -} -else { +} else { print '<h1><b>'.$langs->trans("ScanToMenu").'</b></h1>'; print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' width='30%'>"; } diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php index 01873d317c4..8c201949034 100644 --- a/htdocs/takepos/admin/receipt.php +++ b/htdocs/takepos/admin/receipt.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2019 Andreu Bisquerra Gaya <jove@bisquerra.com> + * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk", "commercial")); @@ -38,8 +41,7 @@ $langs->loadLangs(array("admin", "cashdesk", "commercial")); * Actions */ -if (GETPOST('action', 'alpha') == 'set') -{ +if (GETPOST('action', 'alpha') == 'set') { $db->begin(); $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -52,21 +54,23 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } -} elseif (GETPOST('action', 'alpha') == 'setmethod') -{ +} elseif (GETPOST('action', 'alpha') == 'setmethod') { dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity); // TakePOS connector require ReceiptPrinter module - if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && !$conf->receiptprinter->enabled) activateModule("modReceiptPrinter"); + if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && !$conf->receiptprinter->enabled) { + activateModule("modReceiptPrinter"); + } } @@ -102,8 +106,7 @@ print $langs->trans('Browser'); print '<td>'; print $langs->trans('BrowserMethodDescription'); print '</td><td class="right">'; -if ($conf->global->TAKEPOS_PRINT_METHOD == "browser") -{ +if ($conf->global->TAKEPOS_PRINT_METHOD == "browser") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&token='.newToken().'&value=browser">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; @@ -137,8 +140,7 @@ print "TakePOS Connector"; print '<td>'; print $langs->trans('TakeposConnectorMethodDescription'); print '</td><td class="right">'; -if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") -{ +if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmethod&token='.newToken().'&value=takeposconnector">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; @@ -176,15 +178,16 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>'; - foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>'; + foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'<br>'; + } $htmltext .= '</i>'; print '<tr class="oddeven"><td>'; print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>'; print '</td><td>'; $variablename = 'TAKEPOS_HEADER'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) - { + if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>'; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -197,8 +200,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>'; print '</td><td>'; $variablename = 'TAKEPOS_FOOTER'; - if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) - { + if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>'; } else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -233,6 +235,14 @@ print '<td colspan="2">'; print $form->selectyesno("TAKEPOS_AUTO_PRINT_TICKETS", $conf->global->TAKEPOS_AUTO_PRINT_TICKETS, 1); print "</td></tr>\n"; + +// Show price without vat +print '<tr class="oddeven"><td>'; +print $langs->trans('ShowPriceHTOnReceipt'); +print '<td colspan="2">'; +print ajax_constantonoff("TAKEPOS_SHOW_HT_RECEIPT", array(), $conf->entity, 0, 0, 1, 0); +print "</td></tr>\n"; + if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { print '<tr class="oddeven"><td>'; print $langs->trans('WeighingScale'); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index f3c17f6ee23..0364ff4e64f 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,15 +32,16 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // If socid provided by ajax company selector -if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) -{ +if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) { $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); } // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk")); @@ -66,10 +68,8 @@ $action = GETPOST('action', 'aZ09'); $error = 0; -if ($action == 'set') -{ +if ($action == 'set') { $db->begin(); - if (GETPOST('socid', 'int') < 0) $_POST["socid"] = ''; $res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_SUPPLEMENTS_CATEGORY", GETPOST('TAKEPOS_SUPPLEMENTS_CATEGORY', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -85,10 +85,11 @@ if ($action == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); @@ -96,7 +97,9 @@ if ($action == 'set') } elseif ($action == 'updateMask') { $maskconst = GETPOST('maskconst', 'alpha'); $maskvalue = GETPOST('maskvalue', 'alpha'); - if ($maskconst) $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } if (!($res > 0)) { $error++; } @@ -121,7 +124,9 @@ if ($action != '') { $form = new Form($db); $formproduct = new FormProduct($db); -llxHeader('', $langs->trans("CashDeskSetup")); +$help_url = 'EN:Module_Point_of_sale_(TakePOS)'; + +llxHeader('', $langs->trans("CashDeskSetup"), $help_url); $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>'; print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); @@ -145,21 +150,16 @@ print '</tr>'."\n"; clearstatcache(); -foreach ($dirmodels as $reldir) -{ +foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/takepos/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { + if (is_resource($handle)) { $var = true; - while (($file = readdir($handle)) !== false) - { - if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php') - { + while (($file = readdir($handle)) !== false) { + if (substr($file, 0, 16) == 'mod_takepos_ref_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.$file.'.php'; @@ -167,11 +167,14 @@ foreach ($dirmodels as $reldir) $module = new $file; // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n"; print $module->info(); print '</td>'; @@ -182,13 +185,15 @@ foreach ($dirmodels as $reldir) if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '<div class="error">'.$langs->trans($tmp).'</div>'; - } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; + } elseif ($tmp == 'NotConfigured') { + print $langs->trans($tmp); + } else { + print $tmp; + } print '</td>'."\n"; print '<td align="center">'; - if ($conf->global->TAKEPOS_REF_ADDON == "$file") - { + if ($conf->global->TAKEPOS_REF_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print '<a href="'.$_SERVER["PHP_SELF"].'?action=setrefmod&amp;token='.newToken().'&amp;value='.urlencode($file).'">'; @@ -210,8 +215,9 @@ foreach ($dirmodels as $reldir) if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval $htmltooltip .= ''.$langs->trans("NextValue").': '; if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') { $nextval = $langs->trans($nextval); + } $htmltooltip .= $nextval.'<br>'; } else { $htmltooltip .= $langs->trans($module->error).'<br>'; @@ -255,8 +261,7 @@ print $form->selectarray('TAKEPOS_NUM_TERMINALS', $array, (empty($conf->global-> print "</td></tr>\n"; // Services -if (!empty($conf->service->enabled)) -{ +if (!empty($conf->service->enabled)) { print '<tr class="oddeven"><td>'; print $langs->trans("CashdeskShowServices"); print '<td colspan="2">'; @@ -291,7 +296,9 @@ print "</td></tr>\n"; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation"); $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'<br>'; +} $htmltext .= '</i>'; // Payment numpad @@ -371,6 +378,13 @@ print '<td colspan="2">'; print ajax_constantonoff("TAKEPOS_DELAYED_PAYMENT", array(), $conf->entity, 0, 0, 1, 0); print "</td></tr>\n"; +// Show price without vat +print '<tr class="oddeven"><td>'; +print $langs->trans('ShowPriceHT'); +print '<td colspan="2">'; +print ajax_constantonoff("TAKEPOS_SHOW_HT", array(), $conf->entity, 0, 0, 1, 0); +print "</td></tr>\n"; + // Numbering module //print '<tr class="oddeven"><td>'; //print $langs->trans("BillsNumberingModule"); diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index ed4ef31af36..52f451ae163 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -31,15 +31,16 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; $terminal = GETPOST('terminal', 'int'); // If socid provided by ajax company selector -if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal.'_id'])) -{ +if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal.'_id'])) { $_GET['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha'); $_POST['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha'); $_REQUEST['CASHDESK_ID_THIRDPARTY'.$terminal] = GETPOST('CASHDESK_ID_THIRDPARTY'.$terminal.'_id', 'alpha'); } // Security check -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $langs->loadLangs(array("admin", "cashdesk", "printing", "receiptprinter")); @@ -64,10 +65,8 @@ $terminaltouse = $terminal; * Actions */ -if (GETPOST('action', 'alpha') == 'set') -{ +if (GETPOST('action', 'alpha') == 'set') { $db->begin(); - if (GETPOST('socid', 'int') < 0) $_POST["socid"] = ''; $res = dolibarr_set_const($db, "CASHDESK_ID_THIRDPARTY".$terminaltouse, (GETPOST('socid', 'int') > 0 ? GETPOST('socid', 'int') : ''), 'chaine', 0, '', $conf->entity); @@ -78,7 +77,9 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "CASHDESK_ID_BANKACCOUNT_SUMUP".$terminaltouse, (GETPOST('CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse, 'alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse, 'alpha') : ''), 'chaine', 0, '', $conf->entity); } foreach ($paiements as $modep) { - if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; + if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) { + continue; + } $name = "CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; $res = dolibarr_set_const($db, $name, (GETPOST($name, 'alpha') > 0 ? GETPOST($name, 'alpha') : ''), 'chaine', 0, '', $conf->entity); } @@ -101,10 +102,11 @@ if (GETPOST('action', 'alpha') == 'set') dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); - if (!($res > 0)) $error++; + if (!($res > 0)) { + $error++; + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { @@ -147,45 +149,55 @@ print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminalto print '</td></tr>'; $atleastonefound = 0; -if (!empty($conf->banque->enabled)) -{ +if (!empty($conf->banque->enabled)) { print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForSell").'</td>'; print '<td>'; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 0, "courant=2", 1); - if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse})) $atleastonefound++; + if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse})) { + $atleastonefound++; + } print '</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForCheque").'</td>'; print '<td>'; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 0, "courant=1", 1); - if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse})) $atleastonefound++; + if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse})) { + $atleastonefound++; + } print '</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForCB").'</td>'; print '<td>'; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 0, "courant=1", 1); - if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse})) $atleastonefound++; + if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse})) { + $atleastonefound++; + } print '</td></tr>'; if ($conf->global->TAKEPOS_ENABLE_SUMUP) { print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForSumup").'</td>'; print '<td>'; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse, 0, "courant=1", 1); - if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse})) $atleastonefound++; + if (!empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_SUMUP'.$terminaltouse})) { + $atleastonefound++; + } print '</td></tr>'; } foreach ($paiements as $modep) { - if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; // Already managed before + if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) { + continue; // Already managed before + } $name = "CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->label).'</td>'; print '<td>'; - if (!empty($conf->global->$name)) $atleastonefound++; + if (!empty($conf->global->$name)) { + $atleastonefound++; + } $cour = preg_match('/^LIQ.*/', $modep->code) ? 2 : 1; $form->select_comptes($conf->global->$name, $name, 0, "courant=".$cour, 1); print '</td></tr>'; } } -if (!empty($conf->stock->enabled)) -{ +if (!empty($conf->stock->enabled)) { print '<tr class="oddeven"><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value) print '<td>'; if (empty($conf->productbatch->enabled) || !empty($conf->global->CASHDESK_FORCE_DECREASE_STOCK)) { @@ -204,8 +216,7 @@ if (!empty($conf->stock->enabled)) print '<tr class="oddeven"><td>'.$langs->trans("CashDeskIdWareHouse").'</td>'; // Force warehouse (this is not a default value) print '<td class="minwidth300">'; - if (!$disabled) - { + if (!$disabled) { print $formproduct->selectWarehouses($conf->global->{'CASHDESK_ID_WAREHOUSE'.$terminal}, 'CASHDESK_ID_WAREHOUSE'.$terminal, '', 1, $disabled, 0, '', 0, 0, array(), 'maxwidth250'); print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?&terminal='.$terminal).'"><span class="fa fa-plus-circle valignmiddle"></span></a>'; } else { @@ -279,44 +290,42 @@ if ($conf->global->TAKEPOS_ADDON == "terminal") { print '<td colspan="2">'; $array = array(0=>$langs->trans("Default")); $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { + foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/facture/"); - if (is_dir($dir)) - { + if (is_dir($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (!is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) { $filebis = $file; $classname = preg_replace('/\.php$/', '', $file); // For compatibility - if (!is_file($dir.$filebis)) - { + if (!is_file($dir.$filebis)) { $filebis = $file."/".$file.".modules.php"; $classname = "mod_facture_".$file; } // Check if there is a filter on country preg_match('/\-(.*)_(.*)$/', $classname, $reg); - if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue; + if (!empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) { + continue; + } $classname = preg_replace('/\-.*$/', '', $classname); - if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php') - { + if (!class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/', $filebis) || preg_match('/mod_/', $classname)) && substr($filebis, dol_strlen($filebis) - 3, 3) == 'php') { // Charging the numbering class require_once $dir.$filebis; $module = new $classname($db); // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { + continue; + } + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { + continue; + } - if ($module->isEnabled()) - { + if ($module->isEnabled()) { $array[preg_replace('/\-.*$/', '', preg_replace('/\.php$/', '', $file))] = preg_replace('/\-.*$/', '', preg_replace('/mod_facture_/', '', preg_replace('/\.php$/', '', $file))); } } @@ -339,7 +348,9 @@ print '</div>'; $substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2); $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans('Translation'); $htmltext = '<i>'.$langs->trans('AvailableVariables').':<br>'; -foreach ($substitutionarray as $key => $val) $htmltext .= $key.'<br>'; +foreach ($substitutionarray as $key => $val) { + $htmltext .= $key.'<br>'; +} $htmltext .= '</i>'; print '<br>'; @@ -386,8 +397,7 @@ print '</td></tr>'; print '</table>'; print '</div>'; -if ($atleastonefound == 0 && !empty($conf->banque->enabled)) -{ +if ($atleastonefound == 0 && !empty($conf->banque->enabled)) { print info_admin($langs->trans("AtLeastOneDefaultBankAccountMandatory"), 0, 0, 'error'); } diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 6da8c74361c..0ccdeb86b9b 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2001-2004 Andreu Bisquerra <jove@bisquerra.com> -/* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> + * Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> * * 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 +21,29 @@ * \brief Ajax search component for TakePos. It search products of a category. */ -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -$category = GETPOST('category', 'alpha'); +$category = GETPOST('category', 'alphanohtml'); // Can be id of category or 'supplements' $action = GETPOST('action', 'aZ09'); $term = GETPOST('term', 'alpha'); $id = GETPOST('id', 'int'); @@ -51,16 +59,15 @@ if (empty($user->rights->takepos->run)) { if ($action == 'getProducts') { $object = new Categorie($db); - if ($category == "supplements") $category = $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY; + if ($category == "supplements") { + $category = $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY; + } $result = $object->fetch($category); - if ($result > 0) - { + if ($result > 0) { $prods = $object->getObjectsInCateg("product", 0, 0, 0, $conf->global->TAKEPOS_SORTPRODUCTFIELD, 'ASC'); // Removed properties we don't need - if (is_array($prods) && count($prods) > 0) - { - foreach ($prods as $prod) - { + if (is_array($prods) && count($prods) > 0) { + foreach ($prods as $prod) { unset($prod->fields); unset($prod->db); } @@ -95,8 +102,7 @@ if ($action == 'getProducts') { //$result = $object->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID); $arrayofcateg = $object->get_full_arbo('product', $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 1); if (is_array($arrayofcateg) && count($arrayofcateg) > 0) { - foreach ($arrayofcateg as $val) - { + foreach ($arrayofcateg as $val) { $filteroncategids .= ($filteroncategids ? ', ' : '').$val['id']; } } @@ -105,13 +111,12 @@ if ($action == 'getProducts') { $sql = 'SELECT rowid, ref, label, tosell, tobuy, barcode, price FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= ' WHERE entity IN ('.getEntity('product').')'; if ($filteroncategids) { - $sql .= ' AND EXISTS (SELECT cp.fk_product FROM '.MAIN_DB_PREFIX.'categorie_product as cp WHERE cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$filteroncategids.'))'; + $sql .= ' AND EXISTS (SELECT cp.fk_product FROM '.MAIN_DB_PREFIX.'categorie_product as cp WHERE cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$db->sanitize($filteroncategids).'))'; } $sql .= ' AND tosell = 1'; $sql .= natural_search(array('ref', 'label', 'barcode'), $term); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $rows = array(); while ($obj = $db->fetch_object($resql)) { $rows[] = array( diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index 6cd6073eb48..e180dc33b3e 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -27,14 +27,26 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +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('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('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} define('ISLOADEDBYSTEELSHEET', '1'); @@ -48,25 +60,30 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} -require DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; -if (defined('THEME_ONLY_CONSTANT')) return; +include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; +if (defined('THEME_ONLY_CONSTANT')) { + return; +} ?> html,body { - box-sizing: border-box; + box-sizing: border-box; padding:0px; - margin:0; - height:100%; + margin:0; + height:100%; width:100%; } .bodytakepos { - background-color: #EEE; + background-color: #EEE; } .center { @@ -74,14 +91,14 @@ html,body { } button.calcbutton.poscolorblue { - background-color: #0066AA; + background-color: #0066AA; } button.calcbutton2.poscolordelete { background: rgb(255, 188, 185); - color: #633; - /*background-color: #884444; - color: #fff;*/ + color: #633; + /*background-color: #884444; + color: #fff;*/ } button.calcbutton { @@ -96,19 +113,19 @@ button.calcbutton { width: calc(25% - 2px); height: calc(25% - 2px); font-weight: bold; - background-color: #8c907e; - color: #fff; - /* border-color: unset; */ - border-width: 0; - margin: 1px; + background-color: #8c907e; + color: #fff; + /* border-color: unset; */ + border-width: 0; + margin: 1px; font-size: 14pt; - border-radius: 3px; + border-radius: 3px; } button.calcbutton2 { - color: #fff; - background-color: #5555AA; - border-width: 0px; + color: #fff; + background-color: #5555AA; + border-width: 0px; display: inline-block; position: relative; padding: 0; @@ -122,7 +139,7 @@ button.calcbutton2 { font-weight: bold; font-size: 10pt; margin: 1px; - border-radius: 3px; + border-radius: 3px; } button.calcbutton2 .iconwithlabel { @@ -142,7 +159,7 @@ button.calcbutton3 { height: calc(25% - 2px); font-size: 14pt; margin: 1px; - border-radius: 3px; + border-radius: 3px; } button.productbutton { @@ -157,20 +174,20 @@ button.productbutton { width: calc(100% - 2px); height: calc(100% - 2px); font-weight: bold; - background-color: #a3a6a3; - color: #fff; - /* border-color: unset; */ - border-width: 0; - margin: 1px; + background-color: #a3a6a3; + color: #fff; + /* border-color: unset; */ + border-width: 0; + margin: 1px; font-size: 14pt; - border-radius: 3px; + border-radius: 3px; } button.actionbutton { - background: #EABCA6; - border: 2px solid #EEE; - min-height: 40px; - border-radius: 3px; + background: #EABCA6; + border: 2px solid #EEE; + min-height: 40px; + border-radius: 3px; } button.actionbutton { @@ -185,7 +202,7 @@ button.actionbutton { width: calc(33.33% - 2px); height: calc(25% - 2px); margin: 1px; - border-width: 0; + border-width: 0; } button.item_value { @@ -202,10 +219,10 @@ button.item_value.selected { } div[aria-describedby="dialog-info"] button:before { - content: "\f788"; - font-family: "Font Awesome 5 Free"; - font-weight: 900; - padding-right: 5px; + content: "\f788"; + font-family: "Font Awesome 5 Free"; + font-weight: 900; + padding-right: 5px; } div[aria-describedby="dialog-info"].ui-dialog .ui-dialog-buttonpane { border-width: 0; @@ -216,7 +233,7 @@ div[aria-describedby="dialog-info"].ui-dialog .ui-dialog-buttonpane { } .fa.fa-trash:before { - font-size: 1.5em; + font-size: 1.5em; } @@ -249,11 +266,11 @@ div.wrapper2{ } img.imgwrapper { - max-width: 100%; + max-width: 100%; } button:active{ - background:black; + background:black; color: white; } @@ -270,7 +287,7 @@ div.description{ text-align:center; padding-top: 30px; - background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1)); + background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1)); } div.catwatermark{ @@ -288,17 +305,17 @@ div.catwatermark{ table.postablelines tr td { line-height: unset; - padding-top: 3px; - padding-bottom: 3px; + padding-top: 3px; + padding-bottom: 3px; } .posinvoiceline td { - height: 40px !important; - background-color: var(--colorbacklineimpair1); + height: 40px !important; + background-color: var(--colorbacklineimpair1); } .postablelines td.linecolht { - line-height: 1.3em !important; + line-height: 1.3em !important; } div.paymentbordline @@ -414,11 +431,11 @@ div.paymentbordline } tr.selected, tr.selected td { - /* font-weight: bold; */ + /* font-weight: bold; */ background-color: rgb(240,230,210) !important; } .order { - color: limegreen; + color: limegreen; } .colorwhite { @@ -442,13 +459,13 @@ tr.selected, tr.selected td { .centerinmiddle { transform: translate(0,-50%); - position: relative; - top: 50%; + position: relative; + top: 50%; } .trunc { - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; } p.description_content{ @@ -457,11 +474,11 @@ p.description_content{ } div.description_content { display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: <?php echo $conf->global->TAKEPOS_LINES_TO_SHOW; ?>; - overflow: hidden; - padding-left: 2px; - padding-right: 2px; + -webkit-box-orient: vertical; + -webkit-line-clamp: <?php echo $conf->global->TAKEPOS_LINES_TO_SHOW; ?>; + overflow: hidden; + padding-left: 2px; + padding-right: 2px; } .header{ @@ -488,7 +505,7 @@ div.description_content { height: 100%; } .topnav .tmenu { - display: block; + display: block; } .topnav a{ @@ -498,8 +515,8 @@ div.description_content { } .topnav .login_block_other a { padding: 5px 10px; - margin-left: 4px; - font-size: 1.3em; + margin-left: 4px; + font-size: 1.3em; } @media screen and (max-width: 767px) { @@ -515,8 +532,8 @@ div.description_content { .topnav-left a { padding: 7px 4px 7px 4px; - margin: 8px; - margin-left: 4px; + margin: 8px; + margin-left: 4px; } .topnav-left a:hover, .topnav .login_block_other a:hover { background-color: #ddd; @@ -534,27 +551,27 @@ div.description_content { border-bottom: none !important; margin-left: 6px; font-size: 1.3em; - max-width: 250px; - border-radius: 5px; + max-width: 250px; + border-radius: 5px; } div#moreinfo, div#infowarehouse { - color: #aaa; - padding: 0 8px 0 8px; + color: #aaa; + padding: 0 8px 0 8px; } .productprice { - position: absolute; - top: 5px; - right: 5px; - background: var(--colorbackhmenu1); - color: var(--colortextbackhmenu); - font-size: 2em; - padding: 5px; - border-radius: 2px; - opacity: 0.9; - padding-left: 8px; - padding-right: 8px; + position: absolute; + top: 5px; + right: 5px; + background: var(--colorbackhmenu1); + color: var(--colortextbackhmenu); + font-size: 2em; + padding: 5px; + border-radius: 2px; + opacity: 0.9; + padding-left: 8px; + padding-right: 8px; } @@ -604,9 +621,9 @@ div#moreinfo, div#infowarehouse { @media screen and (max-width: 767px) { .header { - position: sticky; - top: 0; - z-index: 10; + position: sticky; + top: 0; + z-index: 10; } .topnav input[type="text"] { @@ -634,7 +651,7 @@ div#moreinfo, div#infowarehouse { } div#moreinfo, div#infowarehouse { - padding: 0 5px 0 5px; + padding: 0 5px 0 5px; } div.div1 { @@ -659,7 +676,7 @@ div#moreinfo, div#infowarehouse { } button.calcbutton, button.calcbutton2 { - min-height: 30px; + min-height: 30px; } .takepospay { @@ -734,7 +751,7 @@ div#moreinfo, div#infowarehouse { border: none; color: white; background-color: #8c907e; - padding: 14px 28px; + padding: 14px 0px; font-size: 16px; cursor: pointer; text-align: center; diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 72f25a86ce4..92d7e8288e1 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -25,11 +25,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -37,7 +47,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk")); $floor = GETPOST('floor', 'int'); -if ($floor == "") $floor = 1; +if ($floor == "") { + $floor = 1; +} $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $left = GETPOST('left', 'alpha'); @@ -57,38 +69,45 @@ if (empty($user->rights->takepos->run)) { * Actions */ -if ($action == "getTables") -{ +if ($action == "getTables") { $sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables where floor=".$floor; $resql = $db->query($sql); $rows = array(); while ($row = $db->fetch_array($resql)) { $invoice = new Facture($db); $result = $invoice->fetch('', '(PROV-POS'.$_SESSION['takeposterminal'].'-'.$row['rowid'].')'); - if ($result > 0) $row['occupied'] = "red"; + if ($result > 0) { + $row['occupied'] = "red"; + } $rows[] = $row; } echo json_encode($rows); exit; } -if ($action == "update") -{ - if ($left > 95) $left = 95; - if ($top > 95) $top = 95; - if ($left > 3 or $top > 4) $db->query("UPDATE ".MAIN_DB_PREFIX."takepos_floor_tables set leftpos=".$left.", toppos=".$top." WHERE rowid='".$place."'"); - else $db->query("DELETE from ".MAIN_DB_PREFIX."takepos_floor_tables where rowid='".$place."'"); +if ($action == "update") { + if ($left > 95) { + $left = 95; + } + if ($top > 95) { + $top = 95; + } + if ($left > 3 or $top > 4) { + $db->query("UPDATE ".MAIN_DB_PREFIX."takepos_floor_tables set leftpos=".$left.", toppos=".$top." WHERE rowid='".$place."'"); + } else { + $db->query("DELETE from ".MAIN_DB_PREFIX."takepos_floor_tables where rowid='".$place."'"); + } } -if ($action == "updatename") -{ +if ($action == "updatename") { $newname = preg_replace("/[^a-zA-Z0-9\s]/", "", $newname); // Only English chars - if (strlen($newname) > 3) $newname = substr($newname, 0, 3); // Only 3 chars + if (strlen($newname) > 3) { + $newname = substr($newname, 0, 3); // Only 3 chars + } $db->query("UPDATE ".MAIN_DB_PREFIX."takepos_floor_tables set label='".$db->escape($newname)."' WHERE rowid='".$place."'"); } -if ($action == "add") -{ +if ($action == "add") { $sql = "INSERT INTO ".MAIN_DB_PREFIX."takepos_floor_tables(entity, label, leftpos, toppos, floor) VALUES (".$conf->entity.", '', '45', '45', ".$floor.")"; $asdf = $db->query($sql); $db->query("update ".MAIN_DB_PREFIX."takepos_floor_tables set label=rowid where label=''"); // No empty table names @@ -101,7 +120,9 @@ if ($action == "add") // Title $title = 'TakePOS - Dolibarr '.DOL_VERSION; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; +} top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> <link rel="stylesheet" href="css/pos.css.php?a=xxx"> @@ -159,14 +180,14 @@ function LoadPlace(place){ $( document ).ready(function() { $.getJSON('./floors.php?action=getTables&floor=<?php echo $floor; ?>', function(data) { - $.each(data, function(key, val) { + $.each(data, function(key, val) { <?php if ($mode == "edit") {?> $('body').append('<div class="tablediv" contenteditable onblur="updatename('+val.rowid+');" style="position: absolute; left: '+val.leftpos+'%; top: '+val.toppos+'%;" id="tablename'+val.rowid+'">'+val.label+'</div>'); $( "#tablename"+val.rowid ).draggable( { start: function() { $("#add").html("<?php echo $langs->trans("Delete"); ?>"); - }, + }, stop: function() { var left=$(this).offset().left*100/$(window).width(); var top=$(this).offset().top*100/$(window).height(); @@ -190,25 +211,29 @@ $( document ).ready(function() { <body style="overflow: hidden"> <?php if ($user->admin) {?> <div style="position: absolute; left: 0.1%; top: 0.8%; width:8%; height:11%;"> - <?php if ($mode == "edit") {?> + <?php if ($mode == "edit") {?> <a id="add" onclick="window.location.href='floors.php?mode=edit&action=add&floor=<?php echo $floor; ?>';"><?php echo $langs->trans("AddTable"); ?></a> - <?php } else { ?> + <?php } else { ?> <a onclick="window.location.href='floors.php?mode=edit&floor=<?php echo $floor; ?>';"><?php echo $langs->trans("Edit"); ?></a> - <?php } ?> + <?php } ?> </div> <?php } ?> <div style="position: absolute; left: 25%; bottom: 8%; width:50%; height:3%;"> - <center> - <h1> - <?php if ($floor > 1) { ?> - <img class="valignmiddle" src="./img/arrow-prev.png" width="5%" onclick="location.href='floors.php?floor=<?php if ($floor > 1) { $floor--; echo $floor; $floor++; } else echo "1"; ?>';"> - <?php } ?> - <span class="valignmiddle"><?php echo $langs->trans("Floor")." ".$floor; ?></span> - <img src="./img/arrow-next.png" class="valignmiddle" width="5%" onclick="location.href='floors.php?floor=<?php $floor++; echo $floor; ?>';"> - </h1> - </center> + <center> + <h1> + <?php if ($floor > 1) { ?> + <img class="valignmiddle" src="./img/arrow-prev.png" width="5%" onclick="location.href='floors.php?floor=<?php if ($floor > 1) { + $floor--; echo $floor; $floor++; + } else { + echo "1"; + } ?>';"> + <?php } ?> + <span class="valignmiddle"><?php echo $langs->trans("Floor")." ".$floor; ?></span> + <img src="./img/arrow-next.png" class="valignmiddle" width="5%" onclick="location.href='floors.php?floor=<?php $floor++; echo $floor; ?>';"> + </h1> + </center> </div> </body> </html> diff --git a/htdocs/takepos/freezone.php b/htdocs/takepos/freezone.php index 4cca5816fab..7c1db7a84a3 100644 --- a/htdocs/takepos/freezone.php +++ b/htdocs/takepos/freezone.php @@ -26,11 +26,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; @@ -61,8 +71,11 @@ if ($place > 0) { // get default vat rate $constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION['takeposterminal']; $soc = new Societe($db); -if ($invoice->socid > 0) $soc->fetch($invoice->socid); -else $soc->fetch($conf->global->$constforcompanyid); +if ($invoice->socid > 0) { + $soc->fetch($invoice->socid); +} else { + $soc->fetch($conf->global->$constforcompanyid); +} $vatRateDefault = get_default_tva($mysoc, $soc); /* @@ -95,7 +108,7 @@ top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss); */ function Save() { console.log("We click so we call page invoice.php with place=<?php echo $place; ?> tva_tx="+vatRate); - $.get( "invoice.php", { action: "<?php echo $action; ?>", place: "<?php echo $place; ?>", desc:$('#desc').val(), number:$('#number').val(), tva_tx: vatRate} ); + parent.$("#poslines").load("invoice.php?action=freezone&place=<?php echo $place; ?>&number="+$('#number').val()+"&tva_tx="+vatRate, {desc:$('#desc').val()}); parent.$.colorbox.close(); } @@ -109,8 +122,12 @@ top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss); <center> <input type="text" id="desc" name="desc" class="takepospay" style="width:40%;" placeholder="<?php echo $langs->trans('Description'); ?>"> <?php -if ($action == "freezone") echo '<input type="text" id="number" name="number" class="takepospay" style="width:15%;" placeholder="'.$langs->trans('Price').'">'; -if ($action == "addnote") echo '<input type="hidden" id="number" name="number" value="'.$idline.'">'; +if ($action == "freezone") { + echo '<input type="text" id="number" name="number" class="takepospay" style="width:15%;" placeholder="'.$langs->trans('Price').'">'; +} +if ($action == "addnote") { + echo '<input type="hidden" id="number" name="number" value="'.$idline.'">'; +} ?> <input type="hidden" name="place" class="takepospay" value="<?php echo $place; ?>"> <input type="button" class="button takepospay clearboth" value="OK" onclick="Save();"> diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index bdd237d1a15..2725b0c8e87 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -17,15 +17,29 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} -if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + require '../../main.inc.php'; // Load $user and permissions +} $id = GETPOST('id', 'int'); $w = GETPOST('w', 'int'); @@ -38,8 +52,7 @@ $query = GETPOST('query', 'alpha'); * View */ -if ($query == "cat") -{ +if ($query == "cat") { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; @@ -50,10 +63,8 @@ if ($query == "cat") $pdir = get_exdir($object->id, 2, 0, 0, $object, 'category').$object->id."/photos/"; $dir = $upload_dir.'/'.$pdir; - foreach ($object->liste_photos($dir) as $key => $obj) - { - if ($obj['photo_vignette']) - { + foreach ($object->liste_photos($dir) as $key => $obj) { + if ($obj['photo_vignette']) { $filename = $obj['photo_vignette']; } else { $filename = $obj['photo']; @@ -63,8 +74,7 @@ if ($query == "cat") exit; } header('Location: ../../public/theme/common/nophoto.png'); -} elseif ($query == "pro") -{ +} elseif ($query == "pro") { require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php"; $objProd = new Product($db); diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index 452eb7023e2..0fae2c3e25f 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -15,14 +15,30 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../../main.inc.php'; // Load $user and permissions require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; @@ -34,8 +50,7 @@ if (GETPOSTISSET("key")) { $key = GETPOST('key'); $module = new modTcpdfbarcode(); $result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".$key, 'QRCODE', 'Y'); -} -else { +} else { $module = new modTcpdfbarcode(); $result = $module->buildBarCode($urlwithroot."/takepos/public/menu.php", 'QRCODE', 'Y'); } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 172f95c5c3d..4c3ef11294f 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -27,11 +27,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -47,20 +57,20 @@ $action = GETPOST('action', 'aZ09'); $setterminal = GETPOST('setterminal', 'int'); $setcurrency = GETPOST('setcurrency', 'aZ09'); -if ($_SESSION["takeposterminal"] == "") -{ - if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") $_SESSION["takeposterminal"] = 1; // Use terminal 1 if there is only 1 terminal - elseif (!empty($_COOKIE["takeposterminal"])) $_SESSION["takeposterminal"] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE["takeposterminal"]); // Restore takeposterminal from previous session +if ($_SESSION["takeposterminal"] == "") { + if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") { + $_SESSION["takeposterminal"] = 1; // Use terminal 1 if there is only 1 terminal + } elseif (!empty($_COOKIE["takeposterminal"])) { + $_SESSION["takeposterminal"] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE["takeposterminal"]); // Restore takeposterminal from previous session + } } -if ($setterminal > 0) -{ +if ($setterminal > 0) { $_SESSION["takeposterminal"] = $setterminal; setcookie("takeposterminal", $setterminal, (time() + (86400 * 354)), '/', null, false, true); // Permanent takeposterminal var in a cookie } -if ($setcurrency != "") -{ +if ($setcurrency != "") { $_SESSION["takeposcustomercurrency"] = $setcurrency; } @@ -72,13 +82,11 @@ $categorie = new Categorie($db); $maxcategbydefaultforthisdevice = 12; $maxproductbydefaultforthisdevice = 24; -if ($conf->browser->layout == 'phone') -{ +if ($conf->browser->layout == 'phone') { $maxcategbydefaultforthisdevice = 8; $maxproductbydefaultforthisdevice = 16; //REDIRECT TO BASIC LAYOUT IF TERMINAL SELECTED AND BASIC MOBILE LAYOUT ENABLED - if ($_SESSION["takeposterminal"] != "" && $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1) - { + if ($_SESSION["takeposterminal"] != "" && $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1) { $_SESSION["basiclayout"] = 1; header("Location: phone.php?mobilepage=invoice"); exit; @@ -107,7 +115,9 @@ $form = new Form($db); // Title $title = 'TakePOS - Dolibarr '.DOL_VERSION; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; +} $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> @@ -118,7 +128,9 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); <link rel="stylesheet" href="css/pos.css.php"> <link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" /> <?php -if ($conf->global->TAKEPOS_COLOR_THEME == 1) print '<link rel="stylesheet" href="css/colorful.css">'; +if ($conf->global->TAKEPOS_COLOR_THEME == 1) { + print '<link rel="stylesheet" href="css/colorful.css">'; +} ?> <script type="text/javascript" src="js/jquery.colorbox-min.js"></script> <!-- TODO It seems we don't need this --> <script language="javascript"> @@ -129,12 +141,9 @@ $categories = $categorie->get_full_arbo('product', (($conf->global->TAKEPOS_ROOT // Search root category to know its level //$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0; $levelofrootcategory = 0; -if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) -{ - foreach ($categories as $key => $categorycursor) - { - if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) - { +if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { + foreach ($categories as $key => $categorycursor) { + if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) { $levelofrootcategory = $categorycursor['level']; break; } @@ -145,10 +154,8 @@ $levelofmaincategories = $levelofrootcategory + 1; $maincategories = array(); $subcategories = array(); -foreach ($categories as $key => $categorycursor) -{ - if ($categorycursor['level'] == $levelofmaincategories) - { +foreach ($categories as $key => $categorycursor) { + if ($categorycursor['level'] == $levelofmaincategories) { $maincategories[$key] = $categorycursor; } else { $subcategories[$key] = $categorycursor; @@ -175,16 +182,16 @@ var invoiceid=0; var app = this; app.hasKeyboard = false; this.keyboardPress = function() { - app.hasKeyboard = true; - $(window).unbind("keyup", app.keyboardPress); - localStorage.hasKeyboard = true; - console.log("has keyboard!") + app.hasKeyboard = true; + $(window).unbind("keyup", app.keyboardPress); + localStorage.hasKeyboard = true; + console.log("has keyboard!") } $(window).on("keyup", app.keyboardPress) if(localStorage.hasKeyboard) { - app.hasKeyboard = true; - $(window).unbind("keyup", app.keyboardPress); - console.log("has keyboard from localStorage") + app.hasKeyboard = true; + $(window).unbind("keyup", app.keyboardPress); + console.log("has keyboard from localStorage") } */ @@ -219,8 +226,8 @@ function PrintCategories(first) { } $("#catdivdesc"+i).show(); $("#catdesc"+i).text(categories[parseInt(i)+parseInt(first)]['label']); - $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']); - $("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']); + $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[parseInt(i)+parseInt(first)]['rowid']); + $("#catdiv"+i).data("rowid",categories[parseInt(i)+parseInt(first)]['rowid']); $("#catdiv"+i).attr('class', 'wrapper'); $("#catwatermark"+i).show(); } @@ -253,8 +260,8 @@ function MoreCategories(moreorless) { } $("#catdivdesc"+i).show(); $("#catdesc"+i).text(categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['label']); - $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']); - $("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']); + $("#catimg"+i).attr("src","genimg/index.php?query=cat&id="+categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']); + $("#catdiv"+i).data("rowid",categories[i+(<?php echo ($MAXCATEG - 2); ?> * pagecategories)]['rowid']); $("#catwatermark"+i).show(); } @@ -274,7 +281,7 @@ function LoadProducts(position, issubcat) { if (issubcat==true) currentcat=$('#prodiv'+position).data('rowid'); else currentcat=$('#catdiv'+position).data('rowid'); } - if (currentcat == undefined) return; + if (currentcat == undefined) return; pageproducts=0; ishow=0; //product to show counter @@ -300,8 +307,7 @@ function LoadProducts(position, issubcat) { //console.log("ishow"+ishow+" idata="+idata); console.log(data[idata]); if (typeof (data[idata]) == "undefined") { - <?php if (!$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) - { + <?php if (!$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) { echo '$("#prodivdesc"+ishow).hide();'; echo '$("#prodesc"+ishow).text("");'; echo '$("#proimg"+ishow).attr("title","");'; @@ -323,14 +329,12 @@ function LoadProducts(position, issubcat) { $titlestring .= " + ' - ".dol_escape_js($langs->trans("Barcode").': ')."' + data[idata]['barcode']"; ?> var titlestring = <?php echo $titlestring; ?>; - <?php if (!$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) - { + <?php if (!$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) { echo '$("#prodivdesc"+ishow).show();'; echo '$("#prodesc"+ishow).text(data[parseInt(idata)][\'label\']);'; echo '$("#proimg"+ishow).attr("title", titlestring);'; echo '$("#proimg"+ishow).attr("src", "genimg/index.php?query=pro&id="+data[idata][\'id\']);'; - } - else { + } else { echo '$("#probutton"+ishow).show();'; echo '$("#probutton"+ishow).text(data[parseInt(idata)][\'label\']);'; } @@ -411,7 +415,7 @@ function MoreProducts(moreorless) { function ClickProduct(position) { console.log("ClickProduct"); - $('#proimg'+position).animate({opacity: '0.5'}, 1); + $('#proimg'+position).animate({opacity: '0.5'}, 1); $('#proimg'+position).animate({opacity: '1'}, 100); if ($('#prodiv'+position).data('iscat')==1){ console.log("Click on a category at position "+position); @@ -454,8 +458,8 @@ function Customer() { function History() { - console.log("Open box to select the history"); - $.colorbox({href:"../compta/facture/list.php?contextpage=poslist", width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("History"); ?>"}); + console.log("Open box to select the history"); + $.colorbox({href:"../compta/facture/list.php?contextpage=poslist", width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("History"); ?>"}); } function Reduction() { @@ -477,12 +481,13 @@ function Floors() { function FreeZone() { console.log("Open box to enter a free product"); - $.colorbox({href:"freezone.php?action=freezone&place="+place, onClosed: function () { Refresh(); },width:"80%", height:"200px", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone"); ?>"}); + $.colorbox({href:"freezone.php?action=freezone&place="+place, width:"80%", height:"200px", transition:"none", iframe:"true", title:"<?php echo $langs->trans("FreeZone"); ?>"}); } function TakeposOrderNotes() { console.log("Open box to order notes"); - $.colorbox({href:"freezone.php?action=addnote&place="+place+"&idline="+selectedline, onClosed: function () { Refresh(); },width:"80%", height:"250px", transition:"none", iframe:"true", title:"<?php echo $langs->trans("OrderNotes"); ?>"}); + ModalBox('ModalNote'); + $("#textinput").focus(); } function Refresh() { @@ -593,83 +598,83 @@ function Edit(number) { if (typeof(selectedtext) == "undefined") return; // We click on an action on the number pad but there is no line selected - var text=selectedtext+"<br> "; + var text=selectedtext+"<br> "; - if (number=='c'){ - editnumber=""; - Refresh(); - return; - } - else if (number=='qty'){ - console.log("Edit "+number); - if (editaction=='qty' && editnumber!=""){ - $("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { - editnumber=""; - //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); - $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); - }); + if (number=='c'){ + editnumber=""; + Refresh(); + return; + } + else if (number=='qty'){ + console.log("Edit "+number); + if (editaction=='qty' && editnumber!=""){ + $("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { + editnumber=""; + //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); + $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); + }); - setFocusOnSearchField(); - return; - } - else { - editaction="qty"; - } - } - else if (number=='p'){ - console.log("Edit "+number); - if (editaction=='p' && editnumber!=""){ - $("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { - editnumber=""; - //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); - $("#price").html("<?php echo $langs->trans("Price"); ?>"); - }); + setFocusOnSearchField(); + return; + } + else { + editaction="qty"; + } + } + else if (number=='p'){ + console.log("Edit "+number); + if (editaction=='p' && editnumber!=""){ + $("#poslines").load("invoice.php?action=updateprice&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { + editnumber=""; + //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); + $("#price").html("<?php echo $langs->trans("Price"); ?>"); + }); - ClearSearch(); - return; - } - else { - editaction="p"; - } - } - else if (number=='r'){ - console.log("Edit "+number); - if (editaction=='r' && editnumber!=""){ - $("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { - editnumber=""; - //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); - $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); - }); + ClearSearch(); + return; + } + else { + editaction="p"; + } + } + else if (number=='r'){ + console.log("Edit "+number); + if (editaction=='r' && editnumber!=""){ + $("#poslines").load("invoice.php?action=updatereduction&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { + editnumber=""; + //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); + $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); + }); - ClearSearch(); - return; - } - else { - editaction="r"; - } - } - else { - editnumber=editnumber+number; - } - if (editaction=='qty'){ - text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Qty").": "; ?>"; - $("#qty").html("OK"); - $("#price").html("<?php echo $langs->trans("Price"); ?>"); - $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); - } - if (editaction=='p'){ - text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Price").": "; ?>"; - $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); - $("#price").html("OK"); - $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); - } - if (editaction=='r'){ - text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("ReductionShort").": "; ?>"; - $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); - $("#price").html("<?php echo $langs->trans("Price"); ?>"); - $("#reduction").html("OK"); - } - $('#'+selectedline).find("td:first").html(text+editnumber); + ClearSearch(); + return; + } + else { + editaction="r"; + } + } + else { + editnumber=editnumber+number; + } + if (editaction=='qty'){ + text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Qty").": "; ?>"; + $("#qty").html("OK"); + $("#price").html("<?php echo $langs->trans("Price"); ?>"); + $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); + } + if (editaction=='p'){ + text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("Price").": "; ?>"; + $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); + $("#price").html("OK"); + $("#reduction").html("<?php echo $langs->trans("ReductionShort"); ?>"); + } + if (editaction=='r'){ + text=text+"<?php echo $langs->trans("Modify")." -> ".$langs->trans("ReductionShort").": "; ?>"; + $("#qty").html("<?php echo $langs->trans("Qty"); ?>"); + $("#price").html("<?php echo $langs->trans("Price"); ?>"); + $("#reduction").html("OK"); + } + $('#'+selectedline).find("td:first").html(text+editnumber); } function TakeposPrintingOrder(){ @@ -691,8 +696,11 @@ function OpenDrawer(){ $.ajax({ type: "POST", <?php - if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) echo "url: '".$conf->global->TAKEPOS_PRINT_SERVER."/printer/drawer.php',"; - else echo "url: 'http://".$conf->global->TAKEPOS_PRINT_SERVER.":8111/print',"; + if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { + echo "url: '".$conf->global->TAKEPOS_PRINT_SERVER."/printer/drawer.php',"; + } else { + echo "url: 'http://".$conf->global->TAKEPOS_PRINT_SERVER.":8111/print',"; + } ?> data: "opendrawer" }); @@ -725,23 +733,23 @@ function MoreActions(totalactions){ function ControlCashOpening() { - $.colorbox({href:"../compta/cashcontrol/cashcontrol_card.php?action=create&contextpage=takepos", width:"90%", height:"60%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("NewCashFence"); ?>"}); + $.colorbox({href:"../compta/cashcontrol/cashcontrol_card.php?action=create&contextpage=takepos", width:"90%", height:"60%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("NewCashFence"); ?>"}); } function CloseCashFence(rowid) { - $.colorbox({href:"../compta/cashcontrol/cashcontrol_card.php?id="+rowid+"&contextpage=takepos", width:"90%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("NewCashFence"); ?>"}); + $.colorbox({href:"../compta/cashcontrol/cashcontrol_card.php?id="+rowid+"&contextpage=takepos", width:"90%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("NewCashFence"); ?>"}); } function CashReport(rowid) { - $.colorbox({href:"../compta/cashcontrol/report.php?id="+rowid+"&contextpage=takepos", width:"60%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("CashReport"); ?>"}); + $.colorbox({href:"../compta/cashcontrol/report.php?id="+rowid+"&contextpage=takepos", width:"60%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("CashReport"); ?>"}); } // TakePOS Popup function ModalBox(ModalID) { - var modal = document.getElementById(ModalID); + var modal = document.getElementById(ModalID); modal.style.display = "block"; } @@ -757,36 +765,37 @@ function FullScreen() { function WeighingScale(){ console.log("Weighing Scale"); - $.ajax({ - type: "POST", - url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/scale/index.php', - }) + $.ajax({ + type: "POST", + url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/scale/index.php', + }) .done(function( editnumber ) { $("#poslines").load("invoice.php?action=updateqty&place="+place+"&idline="+selectedline+"&number="+editnumber, function() { - editnumber=""; - }); + editnumber=""; + }); }); } $( document ).ready(function() { - PrintCategories(0); + PrintCategories(0); LoadProducts(0); Refresh(); <?php //IF NO TERMINAL SELECTED - if ($_SESSION["takeposterminal"] == "") - { + if ($_SESSION["takeposterminal"] == "") { print "ModalBox('ModalTerminal');"; } if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING) { - $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; - $sql .= " entity = ".$conf->entity." AND "; - $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; + $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; + $sql .= " entity = ".$conf->entity." AND "; + $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); // If there is no cash control from today open it - if ($obj->rowid == null) print "ControlCashOpening();"; + if ($obj->rowid == null) { + print "ControlCashOpening();"; + } } } ?> @@ -812,8 +821,11 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { <?php echo $langs->trans("Terminal"); ?> </span> <?php echo " "; - if ($_SESSION["takeposterminal"] == "") echo "1"; - else echo $_SESSION["takeposterminal"]; + if ($_SESSION["takeposterminal"] == "") { + echo "1"; + } else { + echo $_SESSION["takeposterminal"]; + } echo '<span class="hideonsmartphone"> - '.dol_print_date(dol_now(), "day").'</span>'; ?> </a> @@ -863,8 +875,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { <div class="modal-body"> <button type="button" class="block" onclick="location.href='index.php?setterminal=1'"><?php print $langs->trans("Terminal"); ?> 1</button> <?php - for ($i = 2; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++) - { + for ($i = 2; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++) { print '<button type="button" class="block" onclick="location.href=\'index.php?setterminal='.$i.'\'">'.$langs->trans("Terminal").' '.$i.'</button>'; } ?> @@ -885,10 +896,10 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'multicurrency'; $sql .= " WHERE entity IN ('".getEntity('multicurrency')."')"; $resql = $db->query($sql); - if ($resql) - { - while ($obj = $db->fetch_object($resql)) - print '<button type="button" class="block" onclick="location.href=\'index.php?setcurrency='.$obj->code.'\'">'.$obj->code.'</button>'; + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + print '<button type="button" class="block" onclick="location.href=\'index.php?setcurrency='.$obj->code.'\'">'.$obj->code.'</button>'; + } } ?> </div> @@ -910,7 +921,23 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { </div> </div> - <div class="row1<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) print 'withhead'; ?>"> +<!-- Modal Note --> +<div id="ModalNote" class="modal"> + <div class="modal-content"> + <div class="modal-header"> + <span class="close" href="#" onclick="document.getElementById('ModalNote').style.display = 'none';">&times;</span> + <h3><?php print $langs->trans("Note"); ?></h3> + </div> + <div class="modal-body"> + <input type="text" class="block" id="textinput"> + <button type="button" class="block" onclick="SetNote(); document.getElementById('ModalNote').style.display = 'none';">OK</button> + </div> +</div> +</div> + + <div class="row1<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { + print 'withhead'; + } ?>"> <div id="poslines" class="div1"> </div> @@ -947,12 +974,18 @@ $paiementsModes = array(); if ($resql) { while ($obj = $db->fetch_object($resql)) { $paycode = $obj->code; - if ($paycode == 'LIQ') $paycode = 'CASH'; - if ($paycode == 'CHQ') $paycode = 'CHEQUE'; + if ($paycode == 'LIQ') { + $paycode = 'CASH'; + } + if ($paycode == 'CHQ') { + $paycode = 'CHEQUE'; + } $constantforkey = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"]; //var_dump($constantforkey.' '.$conf->global->$constantforkey); - if (!empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) array_push($paiementsModes, $obj); + if (!empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) { + array_push($paiementsModes, $obj); + } } } @@ -974,8 +1007,7 @@ if (count($maincategories) == 0) { $menus = array(); $r = 0; -if (empty($conf->global->TAKEPOS_BAR_RESTAURANT)) -{ +if (empty($conf->global->TAKEPOS_BAR_RESTAURANT)) { $menus[$r++] = array('title'=>'<span class="fa fa-layer-group paddingrightonly"></span><div class="trunc">'.$langs->trans("New").'</div>', 'action'=>'New();'); } else { // BAR RESTAURANT specific menu @@ -995,30 +1027,28 @@ if ($conf->global->TAKEPOS_DIRECT_PAYMENT) { } // BAR RESTAURANT specific menu -if ($conf->global->TAKEPOS_BAR_RESTAURANT) -{ - if ($conf->global->TAKEPOS_ORDER_PRINTERS) - { +if ($conf->global->TAKEPOS_BAR_RESTAURANT) { + if ($conf->global->TAKEPOS_ORDER_PRINTERS) { $menus[$r++] = array('title'=>$langs->trans("Order"), 'action'=>'TakeposPrintingOrder();'); } //Button to print receipt before payment - if ($conf->global->TAKEPOS_BAR_RESTAURANT) - { + if ($conf->global->TAKEPOS_BAR_RESTAURANT) { if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { - if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposConnector(placeid);'); - else $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);'); + if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { + $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposConnector(placeid);'); + } else { + $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);'); + } } elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'DolibarrTakeposPrinting(placeid);'); } else { $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'Print(placeid);'); } } - if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && $conf->global->TAKEPOS_ORDER_NOTES == 1) - { - $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("OrderNotes").'</div>', 'action'=>'TakeposOrderNotes();'); + if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && $conf->global->TAKEPOS_ORDER_NOTES == 1) { + $menus[$r++] = array('title'=>'<span class="fa fa-sticky-note paddingrightonly"></span><div class="trunc">'.$langs->trans("OrderNotes").'</div>', 'action'=>'TakeposOrderNotes();'); } - if ($conf->global->TAKEPOS_SUPPLEMENTS) - { + if ($conf->global->TAKEPOS_SUPPLEMENTS) { $menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("ProductSupplements").'</div>', 'action'=>'LoadProducts(\'supplements\');'); } } @@ -1037,14 +1067,14 @@ $sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE $sql .= " entity = ".$conf->entity." AND "; $sql .= " date_creation > '".$db->idate(dol_get_first_hour(dol_now()))."'"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $db->fetch_object($resql); $menus[$r++] = array('title'=>'<span class="fas fa-file-invoice-dollar paddingrightonly"></span><div class="trunc">'.$langs->trans("CashReport").'</div>', 'action'=>'CashReport('.$obj->rowid.');'); - if ($obj->status == 0) $menus[$r++] = array('title'=>'<span class="fas fa-cash-register paddingrightonly"></span><div class="trunc">'.$langs->trans("CloseCashFence").'</div>', 'action'=>'CloseCashFence('.$obj->rowid.');'); + if ($obj->status == 0) { + $menus[$r++] = array('title'=>'<span class="fas fa-cash-register paddingrightonly"></span><div class="trunc">'.$langs->trans("CloseCashFence").'</div>', 'action'=>'CloseCashFence('.$obj->rowid.');'); + } } } @@ -1060,14 +1090,15 @@ if (!empty($reshook)) { } } -if ($r % 3 == 2) $menus[$r++] = array('title'=>'', 'style'=>'visibility: hidden;'); +if ($r % 3 == 2) { + $menus[$r++] = array('title'=>'', 'style'=>'visibility: hidden;'); +} if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { $menus[$r++] = array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span><div class="trunc">'.$langs->trans("Logout").'</div>', 'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';'); } -if ($conf->global->TAKEPOS_WEIGHING_SCALE) -{ +if ($conf->global->TAKEPOS_WEIGHING_SCALE) { $menus[$r++] = array('title'=>'<span class="fa fa-balance-scale paddingrightonly"></span><div class="trunc">'.$langs->trans("WeighingScale").'</div>', 'action'=>'WeighingScale();'); } @@ -1076,15 +1107,16 @@ if ($conf->global->TAKEPOS_WEIGHING_SCALE) <div class="div3"> <?php $i = 0; - foreach ($menus as $menu) - { + foreach ($menus as $menu) { $i++; - if (count($menus) > 12 and $i == 12) - { + if (count($menus) > 12 and $i == 12) { echo '<button style="'.$menu['style'].'" type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>'; echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; - } elseif ($i > 12) echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; - else echo '<button style="'.$menu['style'].'" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; + } elseif ($i > 12) { + echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; + } else { + echo '<button style="'.$menu['style'].'" type="button" id="action'.$i.'" class="actionbutton" onclick="'.$menu['action'].'">'.$menu['title'].'</button>'; + } } if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { @@ -1098,16 +1130,23 @@ if ($conf->global->TAKEPOS_WEIGHING_SCALE) </div> </div> - <div class="row2<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) print 'withhead'; ?>"> + <div class="row2<?php if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { + print 'withhead'; + } ?>"> <!-- Show categories --> <div class="div4"> <?php $count = 0; - while ($count < $MAXCATEG) - { + while ($count < $MAXCATEG) { ?> - <div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) echo 'onclick="MoreCategories(\'less\');"'; elseif ($count == ($MAXCATEG - 1)) echo 'onclick="MoreCategories(\'more\');"'; else echo 'onclick="LoadProducts('.$count.');"'; ?> id="catdiv<?php echo $count; ?>"> + <div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) { + echo 'onclick="MoreCategories(\'less\');"'; + } elseif ($count == ($MAXCATEG - 1)) { + echo 'onclick="MoreCategories(\'more\');"'; + } else { + echo 'onclick="LoadProducts('.$count.');"'; + } ?> id="catdiv<?php echo $count; ?>"> <?php if ($count == ($MAXCATEG - 2)) { //echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="catimg'.$count.'" />'; @@ -1116,7 +1155,9 @@ if ($conf->global->TAKEPOS_WEIGHING_SCALE) //echo '<img class="imgwrapper" src="img/arrow-next-top.png" height="100%" id="catimg'.$count.'" />'; echo '<span class="fa fa-chevron-right centerinmiddle" style="font-size: 5em;"></span>'; } else { - if (!$conf->global->TAKEPOS_HIDE_CATEGORY_IMAGES) echo '<img class="imgwrapper" height="100%" id="catimg'.$count.'" />'; + if (!$conf->global->TAKEPOS_HIDE_CATEGORY_IMAGES) { + echo '<img class="imgwrapper" height="100%" id="catimg'.$count.'" />'; + } } ?> <?php if ($count != ($MAXCATEG - 2) && $count != ($MAXCATEG - 1)) { ?> @@ -1126,21 +1167,26 @@ if ($conf->global->TAKEPOS_WEIGHING_SCALE) <?php } ?> <div class="catwatermark" id='catwatermark<?php echo $count; ?>'>...</div> </div> - <?php + <?php $count++; } ?> </div> - <!-- Show product --> + <!-- Show product --> <div class="div5"> - <?php + <?php $count = 0; - while ($count < $MAXPRODUCT) - { + while ($count < $MAXPRODUCT) { ?> - <div class="wrapper2" id='prodiv<?php echo $count; ?>' <?php if ($count == ($MAXPRODUCT - 2)) {?> onclick="MoreProducts('less');" <?php } if ($count == ($MAXPRODUCT - 1)) {?> onclick="MoreProducts('more');" <?php } else echo 'onclick="ClickProduct('.$count.');"'; ?>> - <?php + <div class="wrapper2" id='prodiv<?php echo $count; ?>' <?php if ($count == ($MAXPRODUCT - 2)) { + ?> onclick="MoreProducts('less');" <?php + } if ($count == ($MAXPRODUCT - 1)) { + ?> onclick="MoreProducts('more');" <?php + } else { + echo 'onclick="ClickProduct('.$count.');"'; + } ?>> + <?php if ($count == ($MAXPRODUCT - 2)) { //echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="proimg'.$count.'" />'; print '<span class="fa fa-chevron-left centerinmiddle" style="font-size: 5em;"></span>'; @@ -1148,21 +1194,22 @@ if ($conf->global->TAKEPOS_WEIGHING_SCALE) //echo '<img class="imgwrapper" src="img/arrow-next-top.png" height="100%" id="proimg'.$count.'" />'; print '<span class="fa fa-chevron-right centerinmiddle" style="font-size: 5em;"></span>'; } else { - if ($conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) echo '<button type="button" id="probutton'.$count.'" class="productbutton" style="display: none;"></button>'; - else { + if ($conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) { + echo '<button type="button" id="probutton'.$count.'" class="productbutton" style="display: none;"></button>'; + } else { print '<div class="" id="proprice'.$count.'"></div>'; print '<img class="imgwrapper" height="100%" title="" id="proimg'.$count.'">'; } } ?> <?php if ($count != ($MAXPRODUCT - 2) && $count != ($MAXPRODUCT - 1) && !$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) { ?> - <div class="description" id="prodivdesc<?php echo $count; ?>"> - <div class="description_content" id="prodesc<?php echo $count; ?>"></div> - </div> - <?php } ?> - <div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div> - </div> - <?php + <div class="description" id="prodivdesc<?php echo $count; ?>"> + <div class="description_content" id="prodesc<?php echo $count; ?>"></div> + </div> + <?php } ?> + <div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div> + </div> + <?php $count++; } ?> diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 4d463b0927c..c7a01e5d8bc 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1,6 +1,7 @@ <?php /** * Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com> + * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,13 +27,25 @@ // if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language // if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) { define('NOCSRFCHECK', '1'); } -if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', '1'); } -if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); } -if (!defined('NOREQUIREHTML')) { define('NOREQUIREHTML', '1'); } -if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); } +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} -if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + require '../main.inc.php'; +} require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -57,20 +70,21 @@ if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLI * View */ -if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) -{ +if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { // DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED - if ($_SESSION["takeposterminal"] == "") - { - if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") $_SESSION["takeposterminal"] = 1; - else { + if ($_SESSION["takeposterminal"] == "") { + if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") { + $_SESSION["takeposterminal"] = 1; + } else { header("Location: ".DOL_URL_ROOT."/takepos/index.php"); exit; } } $mobilepage = GETPOST('mobilepage', 'alpha'); $title = 'TakePOS - Dolibarr '.DOL_VERSION; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; + } $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> @@ -107,9 +121,15 @@ $amountofpayment = price2num(GETPOST('amount', 'alpha')); $invoiceid = GETPOST('invoiceid', 'int'); $paycode = $pay; -if ($pay == 'cash') $paycode = 'LIQ'; // For backward compatibility -if ($pay == 'card') $paycode = 'CB'; // For backward compatibility -if ($pay == 'cheque') $paycode = 'CHQ'; // For backward compatibility +if ($pay == 'cash') { + $paycode = 'LIQ'; // For backward compatibility +} +if ($pay == 'card') { + $paycode = 'CB'; // For backward compatibility +} +if ($pay == 'cheque') { + $paycode = 'CHQ'; // For backward compatibility +} // Retrieve paiementid $sql = "SELECT id FROM ".MAIN_DB_PREFIX."c_paiement"; @@ -120,22 +140,23 @@ $obj = $db->fetch_object($resql); $paiementid = $obj->id; $invoice = new Facture($db); -if ($invoiceid > 0) -{ +if ($invoiceid > 0) { $ret = $invoice->fetch($invoiceid); } else { $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); } -if ($ret > 0) -{ +if ($ret > 0) { $placeid = $invoice->id; } $constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]; $soc = new Societe($db); -if ($invoice->socid > 0) $soc->fetch($invoice->socid); -else $soc->fetch($conf->global->$constforcompanyid); +if ($invoice->socid > 0) { + $soc->fetch($invoice->socid); +} else { + $soc->fetch($conf->global->$constforcompanyid); +} /* @@ -143,18 +164,20 @@ else $soc->fetch($conf->global->$constforcompanyid); */ // Action to record a payment on a TakePOS invoice -if ($action == 'valid' && $user->rights->facture->creer) -{ +if ($action == 'valid' && $user->rights->facture->creer) { $bankaccount = 0; $error = 0; if (!empty($conf->global->TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT)) { $bankaccount = GETPOST('accountid', 'int'); } else { - if ($pay == "cash") $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]}; // For backward compatibility - elseif ($pay == "card") $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$_SESSION["takeposterminal"]}; // For backward compatibility - elseif ($pay == "cheque") $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]}; // For backward compatibility - else { + if ($pay == "cash") { + $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]}; // For backward compatibility + } elseif ($pay == "card") { + $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$_SESSION["takeposterminal"]}; // For backward compatibility + } elseif ($pay == "cheque") { + $bankaccount = $conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]}; // For backward compatibility + } else { $accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"]; $bankaccount = $conf->global->$accountname; } @@ -252,11 +275,15 @@ if ($action == 'valid' && $user->rights->facture->creer) $payment->datepaye = $now; $payment->fk_account = $bankaccount; $payment->amounts[$invoice->id] = $amountofpayment; - if ($pay == 'cash') $payment->pos_change = price2num(GETPOST('excess', 'alpha')); + if ($pay == 'cash') { + $payment->pos_change = price2num(GETPOST('excess', 'alpha')); + } // If user has not used change control, add total invoice payment // Or if user has used change control and the amount of payment is higher than remain to pay, add the remain to pay - if ($amountofpayment == 0 || $amountofpayment > $remaintopay) $payment->amounts[$invoice->id] = $remaintopay; + if ($amountofpayment == 0 || $amountofpayment > $remaintopay) { + $payment->amounts[$invoice->id] = $remaintopay; + } $payment->paiementid = $paiementid; $payment->num_payment = $invoice->ref; @@ -270,8 +297,10 @@ if ($action == 'valid' && $user->rights->facture->creer) if ($remaintopay == 0) { dol_syslog("Invoice is paid, so we set it to status Paid"); - $result = $invoice->set_paid($user); - if ($result > 0) $invoice->paye = 1; + $result = $invoice->setPaid($user); + if ($result > 0) { + $invoice->paye = 1; + } // set payment method $invoice->setPaymentMethods($paiementid); } else { @@ -282,8 +311,7 @@ if ($action == 'valid' && $user->rights->facture->creer) } } -if ($action == 'creditnote') -{ +if ($action == 'creditnote') { $creditnote = new Facture($db); $creditnote->socid = $invoice->socid; $creditnote->date = dol_now(); @@ -293,8 +321,7 @@ if ($action == 'creditnote') $creditnote->remise_percent = $invoice->remise_percent; $creditnote->create($user); - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { // Extrafields if (method_exists($line, 'fetch_optionals')) { // load extrafields @@ -304,21 +331,17 @@ if ($action == 'creditnote') if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) { $fk_parent_line = 0; } - if ($invoice->type == Facture::TYPE_SITUATION) - { + if ($invoice->type == Facture::TYPE_SITUATION) { $source_fk_prev_id = $line->fk_prev_id; // temporary storing situation invoice fk_prev_id $line->fk_prev_id = $line->id; // The new line of the new credit note we are creating must be linked to the situation invoice line it is created from - if (!empty($invoice->tab_previous_situation_invoice)) - { + if (!empty($invoice->tab_previous_situation_invoice)) { // search the last standard invoice in cycle and the possible credit note between this last and invoice // TODO Move this out of loop of $invoice->lines $tab_jumped_credit_notes = array(); $lineIndex = count($invoice->tab_previous_situation_invoice) - 1; $searchPreviousInvoice = true; - while ($searchPreviousInvoice) - { - if ($invoice->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_SITUATION || $lineIndex < 1) - { + while ($searchPreviousInvoice) { + if ($invoice->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_SITUATION || $lineIndex < 1) { $searchPreviousInvoice = false; // find, exit; break; } else { @@ -330,10 +353,8 @@ if ($action == 'creditnote') } $maxPrevSituationPercent = 0; - foreach ($invoice->tab_previous_situation_invoice[$lineIndex]->lines as $prevLine) - { - if ($prevLine->id == $source_fk_prev_id) - { + foreach ($invoice->tab_previous_situation_invoice[$lineIndex]->lines as $prevLine) { + if ($prevLine->id == $source_fk_prev_id) { $maxPrevSituationPercent = max($maxPrevSituationPercent, $prevLine->situation_percent); //$line->subprice = $line->subprice - $prevLine->subprice; @@ -358,10 +379,8 @@ if ($action == 'creditnote') // If there is some credit note between last situation invoice and invoice used for credit note generation (note: credit notes are stored as delta) $maxPrevSituationPercent = 0; foreach ($tab_jumped_credit_notes as $index => $creditnoteid) { - foreach ($invoice->tab_previous_situation_invoice[$index]->lines as $prevLine) - { - if ($prevLine->fk_prev_id == $source_fk_prev_id) - { + foreach ($invoice->tab_previous_situation_invoice[$index]->lines as $prevLine) { + if ($prevLine->fk_prev_id == $source_fk_prev_id) { $maxPrevSituationPercent = $prevLine->situation_percent; $line->total_ht -= $prevLine->total_ht; @@ -430,10 +449,12 @@ if ($action == 'creditnote') } } -if ($action == 'history' || $action == 'creditnote') -{ - if ($action == 'creditnote') $placeid = $creditnote->id; - else $placeid = (int) GETPOST('placeid', 'int'); +if ($action == 'history' || $action == 'creditnote') { + if ($action == 'creditnote') { + $placeid = $creditnote->id; + } else { + $placeid = (int) GETPOST('placeid', 'int'); + } $invoice = new Facture($db); $invoice->fetch($placeid); } @@ -442,22 +463,19 @@ if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency" $invoice->setMulticurrencyCode($_SESSION["takeposcustomercurrency"]); } -if (($action == "addline" || $action == "freezone") && $placeid == 0) -{ +if (($action == "addline" || $action == "freezone") && $placeid == 0) { $invoice->socid = $conf->global->$constforcompanyid; $invoice->date = dol_now(); $invoice->module_source = 'takepos'; $invoice->pos_source = $_SESSION["takeposterminal"]; $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; - if ($invoice->socid <= 0) - { + if ($invoice->socid <= 0) { $langs->load('errors'); dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), null, 1); } else { $placeid = $invoice->create($user); - if ($placeid < 0) - { + if ($placeid < 0) { dol_htmloutput_errors($invoice->error, $invoice->errors, 1); } $sql = "UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid; @@ -465,8 +483,7 @@ if (($action == "addline" || $action == "freezone") && $placeid == 0) } } -if ($action == "addline") -{ +if ($action == "addline") { $prod = new Product($db); $prod->fetch($idproduct); @@ -486,19 +503,20 @@ if ($action == "addline") $localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr); - if (!empty($conf->global->TAKEPOS_SUPPLEMENTS)) - { + if (!empty($conf->global->TAKEPOS_SUPPLEMENTS)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $cat = new Categorie($db); $categories = $cat->containing($idproduct, 'product'); $found = (array_search($conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, array_column($categories, 'id'))); - if ($found !== false) // If this product is a supplement - { + if ($found !== false) { // If this product is a supplement $sql = "SELECT fk_parent_line FROM ".MAIN_DB_PREFIX."facturedet where rowid=$selectedline"; $resql = $db->query($sql); $row = $db->fetch_array($resql); - if ($row[0] == null) $parent_line = $selectedline; - else $parent_line = $row[0]; //If the parent line is already a supplement, add the supplement to the main product + if ($row[0] == null) { + $parent_line = $selectedline; + } else { + $parent_line = $row[0]; //If the parent line is already a supplement, add the supplement to the main product + } } } @@ -546,12 +564,10 @@ if ($action == "freezone") { } if ($action == "addnote") { - foreach ($invoice->lines as $line) - { - if ($line->id == $number) - { - $line->array_options['order_notes'] = $desc; - $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, '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); + foreach ($invoice->lines as $line) { + if ($line->id == $idline) { + $desc = GETPOST('addnote', 'alpha'); + $result = $invoice->updateline($line->id, $desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, '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); } } $invoice->fetch($placeid); @@ -582,8 +598,7 @@ if ($action == "delete") { if ($placeid > 0) { $result = $invoice->fetch($placeid); - if ($result > 0 && $invoice->statut == Facture::STATUS_DRAFT) - { + if ($result > 0 && $invoice->statut == Facture::STATUS_DRAFT) { $db->begin(); // We delete the lines @@ -603,22 +618,19 @@ if ($action == "delete") { $resql1 = $db->query($sql); if ($resdeletelines && $resql1) { - $db->commit(); - } else { - $db->rollback(); - } + $db->commit(); + } else { + $db->rollback(); + } $invoice->fetch($placeid); } } } -if ($action == "updateqty") -{ - foreach ($invoice->lines as $line) - { - if ($line->id == $idline) - { +if ($action == "updateqty") { + foreach ($invoice->lines as $line) { + if ($line->id == $idline) { $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $number, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, '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); } } @@ -626,12 +638,9 @@ if ($action == "updateqty") $invoice->fetch($placeid); } -if ($action == "updateprice") -{ - foreach ($invoice->lines as $line) - { - if ($line->id == $idline) - { +if ($action == "updateprice") { + foreach ($invoice->lines as $line) { + if ($line->id == $idline) { $prod = new Product($db); $prod->fetch($line->fk_product); $customer = new Societe($db); @@ -641,21 +650,19 @@ if ($action == "updateprice") $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $pu_ht = price2num($number / (1 + ($line->tva_tx / 100)), 'MU'); //Check min price - if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($line->remise_percent) / 100) < price2num($price_min)))) - { + if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($line->remise_percent) / 100) < price2num($price_min)))) { echo $langs->trans("CantBeLessThanMinPrice"); - } else $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $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); + } else { + $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $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); + } } } $invoice->fetch($placeid); } -if ($action == "updatereduction") -{ - foreach ($invoice->lines as $line) - { - if ($line->id == $idline) - { +if ($action == "updatereduction") { + foreach ($invoice->lines as $line) { + if ($line->id == $idline) { $prod = new Product($db); $prod->fetch($line->fk_product); $customer = new Societe($db); @@ -665,10 +672,11 @@ if ($action == "updatereduction") $usercanproductignorepricemin = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)); $pu_ht = price2num($line->multicurrency_subprice / (1 + ($line->tva_tx / 100)), 'MU'); //Check min price - if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($line->multicurrency_subprice) * (1 - price2num($number) / 100) < price2num($price_min)))) - { + if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($line->multicurrency_subprice) * (1 - price2num($number) / 100) < price2num($price_min)))) { echo $langs->trans("CantBeLessThanMinPrice"); - } else $result = $invoice->updateline($line->id, $line->desc, $line->multicurrency_subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, '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); + } else { + $result = $invoice->updateline($line->id, $line->desc, $line->multicurrency_subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, '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); + } } } $invoice->fetch($placeid); @@ -680,8 +688,7 @@ if ($action == "updatereduction") $invoice->fetch($placeid); } -if ($action == "order" and $placeid != 0) -{ +if ($action == "order" and $placeid != 0) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; @@ -699,8 +706,7 @@ if ($action == "order" and $placeid != 0) $catsprinter1 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_1); $catsprinter2 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_2); $catsprinter3 = explode(';', $conf->global->TAKEPOS_PRINTED_CATEGORIES_3); - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { if ($line->special_code == "4") { continue; } @@ -708,16 +714,23 @@ if ($action == "order" and $placeid != 0) $existing = $c->containing($line->fk_product, Categorie::TYPE_PRODUCT, 'id'); $result = array_intersect($catsprinter1, $existing); $count = count($result); - if (!$line->fk_product) $count++; // Print Free-text item (Unassigned printer) to Printer 1 + if (!$line->fk_product) { + $count++; // Print Free-text item (Unassigned printer) to Printer 1 + } if ($count > 0) { $linestoprint++; $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='1' where rowid=".$line->id; //Set to print on printer 1 $db->query($sql); $order_receipt_printer1 .= '<tr><td class="left">'; - if ($line->fk_product) $order_receipt_printer1 .= $line->product_label; - else $order_receipt_printer1 .= $line->description; + if ($line->fk_product) { + $order_receipt_printer1 .= $line->product_label; + } else { + $order_receipt_printer1 .= $line->description; + } $order_receipt_printer1 .= '</td><td class="right">'.$line->qty; - if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer1 .= "<br>(".$line->array_options['options_order_notes'].")"; + if (!empty($line->array_options['options_order_notes'])) { + $order_receipt_printer1 .= "<br>(".$line->array_options['options_order_notes'].")"; + } $order_receipt_printer1 .= '</td></tr>'; } } @@ -734,8 +747,7 @@ if ($action == "order" and $placeid != 0) $invoice->fetch($placeid); //Reload object after set lines as printed $linestoprint = 0; - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { if ($line->special_code == "4") { continue; } @@ -748,7 +760,9 @@ if ($action == "order" and $placeid != 0) $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='2' where rowid=".$line->id; //Set to print on printer 2 $db->query($sql); $order_receipt_printer2 .= '<tr>'.$line->product_label.'<td class="right">'.$line->qty; - if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer2 .= "<br>(".$line->array_options['options_order_notes'].")"; + if (!empty($line->array_options['options_order_notes'])) { + $order_receipt_printer2 .= "<br>(".$line->array_options['options_order_notes'].")"; + } $order_receipt_printer2 .= '</td></tr>'; } } @@ -765,8 +779,7 @@ if ($action == "order" and $placeid != 0) $invoice->fetch($placeid); //Reload object after set lines as printed $linestoprint = 0; - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { if ($line->special_code == "4") { continue; } @@ -779,7 +792,9 @@ if ($action == "order" and $placeid != 0) $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set special_code='3' where rowid=".$line->id; //Set to print on printer 3 $db->query($sql); $order_receipt_printer3 .= '<tr>'.$line->product_label.'<td class="right">'.$line->qty; - if (!empty($line->array_options['options_order_notes'])) $order_receipt_printer3 .= "<br>(".$line->array_options['options_order_notes'].")"; + if (!empty($line->array_options['options_order_notes'])) { + $order_receipt_printer3 .= "<br>(".$line->array_options['options_order_notes'].")"; + } $order_receipt_printer3 .= '</td></tr>'; } } @@ -797,23 +812,27 @@ if ($action == "order" and $placeid != 0) } $sectionwithinvoicelink = ''; -if ($action == "valid" || $action == "history" || $action == 'creditnote') -{ +if ($action == "valid" || $action == "history" || $action == 'creditnote') { $sectionwithinvoicelink .= '<!-- Section with invoice link -->'."\n"; $sectionwithinvoicelink .= '<span style="font-size:120%;" class="center">'; $sectionwithinvoicelink .= $invoice->getNomUrl(1, '', 0, 0, '', 0, 0, -1, '_backoffice')." - "; $remaintopay = $invoice->getRemainToPay(); - if ($remaintopay > 0) - { + if ($remaintopay > 0) { $sectionwithinvoicelink .= $langs->trans('RemainToPay').': <span class="amountremaintopay" style="font-size: unset">'.price($remaintopay, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; } else { - if ($invoice->paye) $sectionwithinvoicelink .= '<span class="amountpaymentcomplete" style="font-size: unset">'.$langs->trans("Paid").'</span>'; - else $sectionwithinvoicelink .= $langs->trans('BillShortStatusValidated'); + if ($invoice->paye) { + $sectionwithinvoicelink .= '<span class="amountpaymentcomplete" style="font-size: unset">'.$langs->trans("Paid").'</span>'; + } else { + $sectionwithinvoicelink .= $langs->trans('BillShortStatusValidated'); + } } $sectionwithinvoicelink .= '</span><br>'; if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") { - if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; - else $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; + if (filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { + $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; + } else { + $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; + } } elseif ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>'; } else { @@ -822,14 +841,16 @@ if ($action == "valid" || $action == "history" || $action == 'creditnote') $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.', 1);">'.$langs->trans('GiftReceipt').'</button>'; } } - if ($conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE > 0) - { + if ($conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE > 0) { $sectionwithinvoicelink .= ' <button id="buttonsend" type="button" onclick="SendTicket('.$placeid.');">'.$langs->trans('SendTicket').'</button>'; } - if ($remaintopay <= 0 && $conf->global->TAKEPOS_AUTO_PRINT_TICKETS) $sectionwithinvoicelink .= '<script language="javascript">$("#buttonprint").click();</script>'; + if ($remaintopay <= 0 && $conf->global->TAKEPOS_AUTO_PRINT_TICKETS) { + $sectionwithinvoicelink .= '<script language="javascript">$("#buttonprint").click();</script>'; + } } + /* * View */ @@ -844,27 +865,27 @@ var placeid=<?php echo ($placeid > 0 ? $placeid : 0); ?>; $(document).ready(function() { var idoflineadded = <?php echo ($idoflineadded ? $idoflineadded : 0); ?>; - $('.posinvoiceline').click(function(){ - console.log("Click done on "+this.id); - $('.posinvoiceline').removeClass("selected"); - $(this).addClass("selected"); - if (selectedline==this.id) return; // If is already selected - else selectedline=this.id; - selectedtext=$('#'+selectedline).find("td:first").html(); + $('.posinvoiceline').click(function(){ + console.log("Click done on "+this.id); + $('.posinvoiceline').removeClass("selected"); + $(this).addClass("selected"); + if (selectedline==this.id) return; // If is already selected + else selectedline=this.id; + selectedtext=$('#'+selectedline).find("td:first").html(); <?php if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { print '$("#phonediv1").load("auto_order.php?action=editline&placeid="+placeid+"&selectedline="+selectedline, function() { });'; } ?> - }); + }); - /* Autoselect the line */ - if (idoflineadded > 0) - { - console.log("Auto select "+idoflineadded); - $('.posinvoiceline#'+idoflineadded).click(); - } + /* Autoselect the line */ + if (idoflineadded > 0) + { + console.log("Auto select "+idoflineadded); + $('.posinvoiceline#'+idoflineadded).click(); + } <?php if ($action == "order" and $order_receipt_printer1 != "") { @@ -876,8 +897,7 @@ if ($action == "order" and $order_receipt_printer1 != "") { data: 'invoice='+orderprinter1esc }); <?php - } - else { + } else { ?> $.ajax({ type: "POST", @@ -898,8 +918,7 @@ if ($action == "order" and $order_receipt_printer2 != "") { data: 'invoice='+orderprinter2esc }); <?php - } - else { + } else { ?> $.ajax({ type: "POST", @@ -907,7 +926,7 @@ if ($action == "order" and $order_receipt_printer2 != "") { data: '<?php print $headerorder.$order_receipt_printer2.$footerorder; ?>' }); - <?php + <?php } } @@ -927,25 +946,25 @@ if ($action == "order" and $order_receipt_printer3 != "") { if ($action == "search" || $action == "valid") { ?> parent.setFocusOnSearchField(); - <?php + <?php } if ($action == "temp" and $ticket_printer1 != "") { ?> - $.ajax({ - type: "POST", - url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print', - data: '<?php + $.ajax({ + type: "POST", + url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print', + data: '<?php print $header_soc.$header_ticket.$body_ticket.$ticket_printer1.$ticket_total.$footer_ticket; ?>' - }); - <?php + }); + <?php } if ($action == "search") { ?> - $('#search').focus(); - <?php + $('#search').focus(); + <?php } ?> @@ -954,45 +973,45 @@ if ($action == "search") { function SendTicket(id) { - console.log("Open box to select the Print/Send form"); - $.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("SendTicket"); ?>"}); + console.log("Open box to select the Print/Send form"); + $.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("SendTicket"); ?>"}); } function Print(id, gift){ - $.colorbox({href:"receipt.php?facid="+id+"&gift="+gift, width:"40%", height:"90%", transition:"none", iframe:"true", title:"<?php + $.colorbox({href:"receipt.php?facid="+id+"&gift="+gift, width:"40%", height:"90%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("PrintTicket"); ?>"}); } function TakeposPrinting(id){ - var receipt; + var receipt; console.log("TakeposPrinting" + id); - $.get("receipt.php?facid="+id, function(data, status){ - receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, ''); - $.ajax({ - type: "POST", - url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print', - data: receipt - }); - }); + $.get("receipt.php?facid="+id, function(data, status){ + receipt=data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, ''); + $.ajax({ + type: "POST", + url: 'http://<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>:8111/print', + data: receipt + }); + }); } function TakeposConnector(id){ console.log("TakeposConnector" + id); $.get("ajax/ajax.php?action=printinvoiceticket&term=<?php echo $_SESSION["takeposterminal"]; ?>&id="+id, function(data, status){ - $.ajax({ + $.ajax({ type: "POST", url: '<?php print $conf->global->TAKEPOS_PRINT_SERVER; ?>/printer/index.php', data: 'invoice='+data }); - }); + }); } function DolibarrTakeposPrinting(id) { - console.log("DolibarrTakeposPrinting Printing invoice ticket " + id) - $.ajax({ - type: "GET", - url: "<?php print dol_buildpath('/takepos/ajax/ajax.php', 1).'?action=printinvoiceticket&term='.$_SESSION["takeposterminal"].'&id='; ?>" + id, - }); + console.log("DolibarrTakeposPrinting Printing invoice ticket " + id) + $.ajax({ + type: "GET", + url: "<?php print DOL_URL_ROOT.'/takepos/ajax/ajax.php?action=printinvoiceticket&term='.$_SESSION["takeposterminal"].'&id='; ?>" + id, + }); } function CreditNote() { @@ -1000,18 +1019,23 @@ function CreditNote() { }); } +function SetNote() { + $("#poslines").load("invoice.php?action=addnote&invoiceid="+placeid+"&idline="+selectedline+"&addnote="+$("#textinput").val(), function() { + }); +} + $( document ).ready(function() { console.log("Set customer info and sales in header placeid=<?php echo $placeid; ?> status=<?php echo $invoice->statut; ?>"); - <?php + <?php $s = $langs->trans("Customer"); if ($invoice->id > 0 && ($invoice->socid != $conf->global->$constforcompanyid)) { $s = $soc->name; } ?> - $("#customerandsales").html(''); + $("#customerandsales").html(''); $("#customerandsales").append('<a class="valignmiddle tdoverflowmax100 minwidth100" id="customer" onclick="Customer();" title="<?php print dol_escape_js($s); ?>"><span class="fas fa-building paddingrightonly"></span><?php print dol_escape_js($s); ?></a>'); @@ -1035,18 +1059,24 @@ $( document ).ready(function() { echo '<a class="valignmiddle" title="'.dol_escape_js($langs->trans("SaleStartedAt", dol_print_date($db->jdate($obj->datec), '%H:%M', 'tzuser'))).'" onclick="place=\\\''; $num_sale = str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $obj->ref)); echo $num_sale; - if (str_replace("-", "", $num_sale) > $max_sale) $max_sale = str_replace("-", "", $num_sale); + if (str_replace("-", "", $num_sale) > $max_sale) { + $max_sale = str_replace("-", "", $num_sale); + } echo '\\\'; invoiceid=\\\''; echo $obj->rowid; echo '\\\'; Refresh();">'; - if ($placeid == $obj->rowid) echo "<b>"; - echo dol_print_date($db->jdate($obj->datec), '%H:%M', 'tzuser'); - if ($placeid == $obj->rowid) echo "</b>"; + if ($placeid == $obj->rowid) { + echo "<b>"; + } + echo '<span class="fa fa-shopping-cart paddingright"></span>'.dol_print_date($db->jdate($obj->datec), '%H:%M', 'tzuser'); + if ($placeid == $obj->rowid) { + echo "</b>"; + } echo '</a>\');'; } echo '$("#customerandsales").append(\'<a onclick="place=\\\'0-'; echo $max_sale + 1; - echo '\\\'; invoiceid=0; Refresh();"><span class="fa fa-plus-square" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"></a>\');'; + echo '\\\'; invoiceid=0; Refresh();"><div><span class="fa fa-plus" title="'.dol_escape_htmltag($langs->trans("StartAParallelSale")).'"><span class="fa fa-shopping-cart"></span></div></a>\');'; } else { dol_print_error($db); } @@ -1054,8 +1084,7 @@ $( document ).ready(function() { $s = ''; $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]; - if (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") - { + if (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") { $s = '<span class="small">'; $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; $warehouse = new Entrepot($db); @@ -1065,36 +1094,39 @@ $( document ).ready(function() { } ?> - $("#infowarehouse").html('<?php print dol_escape_js($s); ?>'); + $("#infowarehouse").html('<?php print dol_escape_js($s); ?>'); <?php // Module Adherent $s = ''; - if (!empty($conf->adherent->enabled) && $invoice->socid > 0 && $invoice->socid != $conf->global->$constforcompanyid) - { + if (!empty($conf->adherent->enabled) && $invoice->socid > 0 && $invoice->socid != $conf->global->$constforcompanyid) { $s = '<span class="small">'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $langs->load("members"); $s .= $langs->trans("Member").': '; $adh = new Adherent($db); $result = $adh->fetch('', '', $invoice->socid); - if ($result > 0) - { + if ($result > 0) { $adh->ref = $adh->getFullName($langs); - if (empty($adh->statut)) { $s .= "<s>"; } + if (empty($adh->statut)) { + $s .= "<s>"; + } $s .= $adh->getFullName($langs); $s .= ' - '.$adh->type; - if ($adh->datefin) - { + if ($adh->datefin) { $s .= '<br>'.$langs->trans("SubscriptionEndDate").': '.dol_print_date($adh->datefin, 'day'); if ($adh->hasDelay()) { $s .= " ".img_warning($langs->trans("Late")); } } else { $s .= '<br>'.$langs->trans("SubscriptionNotReceived"); - if ($adh->statut > 0) $s .= " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + if ($adh->statut > 0) { + $s .= " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + } + } + if (empty($adh->statut)) { + $s .= "</s>"; } - if (empty($adh->statut)) { $s .= "</s>"; } } else { $s .= '<br>'.$langs->trans("ThirdpartyNotLinkedToMember"); } @@ -1110,8 +1142,7 @@ $( document ).ready(function() { <?php // Add again js for footer because this content is injected into index.php page so all init // for tooltip and other js beautifiers must be reexecuted too. -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".'<!-- Includes JS Footer of Dolibarr -->'."\n"; print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n"; } @@ -1120,7 +1151,11 @@ print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilep print '<div class="div-table-responsive-no-min invoice">'; print '<table id="tablelines" class="noborder noshadow postablelines" width="100%">'; if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) { - print '<tr><td colspan="4">'.$sectionwithinvoicelink.'</td></tr>'; + if (!empty($conf->global->TAKEPOS_SHOW_HT)) { + print '<tr><td colspan="5">'.$sectionwithinvoicelink.'</td></tr>'; + } else { + print '<tr><td colspan="4">'.$sectionwithinvoicelink.'</td></tr>'; + } } print '<tr class="liste_titre nodrag nodrop">'; print '<td class="linecoldescription">'; @@ -1128,13 +1163,11 @@ print '<td class="linecoldescription">'; if ($mobilepage == "invoice" || $mobilepage == "") { print '<input type="hidden" name="invoiceid" id="invoiceid" value="'.$invoice->id.'">'; } -if ($conf->global->TAKEPOS_BAR_RESTAURANT) -{ +if ($conf->global->TAKEPOS_BAR_RESTAURANT) { $sql = "SELECT floor, label FROM ".MAIN_DB_PREFIX."takepos_floor_tables where rowid=".((int) $place); $resql = $db->query($sql); $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $label = $obj->label; $floor = $obj->floor; } @@ -1142,18 +1175,37 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) if ($mobilepage == "invoice" || $mobilepage == "") { print '<span class="opacitymedium">'.$langs->trans('Place')."</span> <b>".$label."</b><br>"; print '<span class="opacitymedium">'.$langs->trans('Floor')."</span> <b>".$floor."</b>"; + } elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + print $mysoc->name; + } elseif ($mobilepage == "cats") { + print $langs->trans('Category'); + } elseif ($mobilepage == "products") { + print $langs->trans('Label'); } - elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) print $mysoc->name; - elseif ($mobilepage == "cats") print $langs->trans('Category'); - elseif ($mobilepage == "products") print $langs->trans('Label'); } else { print $langs->trans("Products"); } print '</td>'; -if ($_SESSION["basiclayout"] != 1) -{ +if ($_SESSION["basiclayout"] != 1) { print '<td class="linecolqty right">'.$langs->trans('ReductionShort').'</td>'; print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; + if ($conf->global->TAKEPOS_SHOW_HT) { + print '<td class="linecolht right nowraponall">'; + print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>'; + // In phone version only show when it is invoice page + if ($mobilepage == "invoice" || $mobilepage == "") { + print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>'; + if (!empty($conf->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"]); + print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; + } + print '</td>'; + } + print '</td>'; + } print '<td class="linecolht right nowraponall">'; print '<span class="opacitymedium small">'.$langs->trans('TotalTTCShort').'</span><br>'; // In phone version only show when it is invoice page @@ -1169,36 +1221,43 @@ if ($_SESSION["basiclayout"] != 1) print '</td>'; } print '</td>'; +} elseif ($mobilepage == "invoice") { + print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; } -elseif ($mobilepage == "invoice") print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; print "</tr>\n"; -if ($_SESSION["basiclayout"] == 1) -{ - if ($mobilepage == "cats") - { +if ($_SESSION["basiclayout"] == 1) { + if ($mobilepage == "cats") { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product'); $htmlforlines = ''; foreach ($categories as $row) { - if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '<div class="leftcat'; - else $htmlforlines .= '<tr class="drag drop oddeven posinvoiceline'; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '<div class="leftcat'; + } else { + $htmlforlines .= '<tr class="drag drop oddeven posinvoiceline'; + } $htmlforlines .= '" onclick="LoadProducts('.$row['id'].');">'; - if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '<img class="imgwrapper" width="33%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=cat&query=cat&id='.$row['id'].'"><br>'; - else $htmlforlines .= '<td class="left">'; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '<img class="imgwrapper" width="33%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=cat&query=cat&id='.$row['id'].'"><br>'; + } else { + $htmlforlines .= '<td class="left">'; + } $htmlforlines .= $row['label']; - if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '</div>'."\n"; - else $htmlforlines .= '</td></tr>'."\n"; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '</div>'."\n"; + } else { + $htmlforlines .= '</td></tr>'."\n"; + } } $htmlforlines .= '</table>'; $htmlforlines .= '</table>'; print $htmlforlines; } - if ($mobilepage == "products") - { + if ($mobilepage == "products") { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $object = new Categorie($db); $catid = GETPOST('catid', 'int'); @@ -1206,15 +1265,17 @@ if ($_SESSION["basiclayout"] == 1) $prods = $object->getObjectsInCateg("product"); $htmlforlines = ''; foreach ($prods as $row) { - if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '<div class="leftcat'; - else $htmlforlines .= '<tr class="drag drop oddeven posinvoiceline'; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '<div class="leftcat'; + } else { + $htmlforlines .= '<tr class="drag drop oddeven posinvoiceline'; + } $htmlforlines .= '" onclick="AddProduct(\''.$place.'\', '.$row->id.')">'; if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { $htmlforlines .= '<img class="imgwrapper" width="33%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=pro&query=pro&id='.$row->id.'"><br>'; $htmlforlines .= $row->label.''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency); $htmlforlines .= '</div>'."\n"; - } - else { + } else { $htmlforlines .= '<td class="left">'; $htmlforlines .= $row->label; $htmlforlines .= '<div class="right">'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'</div>'; @@ -1225,8 +1286,7 @@ if ($_SESSION["basiclayout"] == 1) print $htmlforlines; } - if ($mobilepage == "places") - { + if ($mobilepage == "places") { $sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables"; $resql = $db->query($sql); $rows = array(); @@ -1245,39 +1305,40 @@ if ($_SESSION["basiclayout"] == 1) } } -if ($placeid > 0) -{ +if ($placeid > 0) { //In Phone basic layout hide some content depends situation - if ($_SESSION["basiclayout"] == 1 && $mobilepage != "invoice" && $action != "order") return; + if ($_SESSION["basiclayout"] == 1 && $mobilepage != "invoice" && $action != "order") { + return; + } - if (is_array($invoice->lines) && count($invoice->lines)) - { + if (is_array($invoice->lines) && count($invoice->lines)) { print '<!-- invoice.php show lines of invoices -->'."\n"; $tmplines = array_reverse($invoice->lines); - foreach ($tmplines as $line) - { - if ($line->fk_parent_line != false) - { + foreach ($tmplines as $line) { + if ($line->fk_parent_line != false) { $htmlsupplements[$line->fk_parent_line] .= '<tr class="drag drop oddeven posinvoiceline'; - if ($line->special_code == "4") $htmlsupplements[$line->fk_parent_line] .= ' order'; + if ($line->special_code == "4") { + $htmlsupplements[$line->fk_parent_line] .= ' order'; + } $htmlsupplements[$line->fk_parent_line] .= '" id="'.$line->id.'">'; $htmlsupplements[$line->fk_parent_line] .= '<td class="left">'; $htmlsupplements[$line->fk_parent_line] .= img_picto('', 'rightarrow'); - if ($line->product_label) $htmlsupplements[$line->fk_parent_line] .= $line->product_label; - if ($line->product_label && $line->desc) $htmlsupplements[$line->fk_parent_line] .= '<br>'; - if ($line->product_label != $line->desc) - { + if ($line->product_label) { + $htmlsupplements[$line->fk_parent_line] .= $line->product_label; + } + if ($line->product_label && $line->desc) { + $htmlsupplements[$line->fk_parent_line] .= '<br>'; + } + if ($line->product_label != $line->desc) { $firstline = dolGetFirstLineOfText($line->desc); - if ($firstline != $line->desc) - { + if ($firstline != $line->desc) { $htmlsupplements[$line->fk_parent_line] .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc); } else { $htmlsupplements[$line->fk_parent_line] .= $line->desc; } } $htmlsupplements[$line->fk_parent_line] .= '</td>'; - if ($_SESSION["basiclayout"] != 1) - { + if ($_SESSION["basiclayout"] != 1) { $htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>'; $htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.$line->qty.'</td>'; $htmlsupplements[$line->fk_parent_line] .= '<td class="right">'.price($line->total_ttc).'</td>'; @@ -1293,11 +1354,15 @@ if ($placeid > 0) } $htmlforlines .= '" id="'.$line->id.'">'; $htmlforlines .= '<td class="left">'; - if ($_SESSION["basiclayout"] == 1) $htmlforlines .= '<span class="phoneqty">'.$line->qty."</span> x "; - if (isset($line->product_type)) - { - if (empty($line->product_type)) $htmlforlines .= img_object('', 'product').' '; - else $htmlforlines .= img_object('', 'service').' '; + if ($_SESSION["basiclayout"] == 1) { + $htmlforlines .= '<span class="phoneqty">'.$line->qty."</span> x "; + } + if (isset($line->product_type)) { + if (empty($line->product_type)) { + $htmlforlines .= img_object('', 'product').' '; + } else { + $htmlforlines .= img_object('', 'service').' '; + } } if (empty($conf->global->TAKEPOS_SHOW_N_FIRST_LINES)) { $tooltiptext = ''; @@ -1305,45 +1370,53 @@ if ($placeid > 0) $tooltiptext .= '<b>'.$langs->trans("Ref").'</b> : '.$line->product_ref.'<br>'; $tooltiptext .= '<b>'.$langs->trans("Label").'</b> : '.$line->product_label.'<br>'; if ($line->product_label != $line->desc) { - if ($line->desc) $tooltiptext .= '<br>'; + if ($line->desc) { + $tooltiptext .= '<br>'; + } $tooltiptext .= $line->desc; } } $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); } else { - if ($line->product_label) $htmlforlines .= $line->product_label; - if ($line->product_label != $line->desc) - { - if ($line->product_label && $line->desc) $htmlforlines .= '<br>'; + if ($line->product_label) { + $htmlforlines .= $line->product_label; + } + if ($line->product_label != $line->desc) { + if ($line->product_label && $line->desc) { + $htmlforlines .= '<br>'; + } $firstline = dolGetFirstLineOfText($line->desc, $conf->global->TAKEPOS_SHOW_N_FIRST_LINES); - if ($firstline != $line->desc) - { + if ($firstline != $line->desc) { $htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc); } else { $htmlforlines .= $line->desc; } } } - if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= "<br>(".$line->array_options['options_order_notes'].")"; + if (!empty($line->array_options['options_order_notes'])) { + $htmlforlines .= "<br>(".$line->array_options['options_order_notes'].")"; + } if ($_SESSION["basiclayout"] == 1) { $htmlforlines .= '</td><td class="right phonetable"><button type="button" onclick="SetQty(place, '.$line->rowid.', '.($line->qty - 1).');" class="publicphonebutton2 phonered">-</button>&nbsp;&nbsp;<button type="button" onclick="SetQty(place, '.$line->rowid.', '.($line->qty + 1).');" class="publicphonebutton2 phonegreen">+</button>'; } - if ($_SESSION["basiclayout"] != 1) - { + if ($_SESSION["basiclayout"] != 1) { $moreinfo = ''; $moreinfo .= $langs->transcountry("TotalHT", $mysoc->country_code).': '.price($line->total_ht); - if ($line->vat_src_code) $moreinfo .= '<br>'.$langs->trans("VATCode").': '.$line->vat_src_code; + if ($line->vat_src_code) { + $moreinfo .= '<br>'.$langs->trans("VATCode").': '.$line->vat_src_code; + } $moreinfo .= '<br>'.$langs->transcountry("TotalVAT", $mysoc->country_code).': '.price($line->total_tva); $moreinfo .= '<br>'.$langs->transcountry("TotalLT1", $mysoc->country_code).': '.price($line->total_localtax1); $moreinfo .= '<br>'.$langs->transcountry("TotalLT2", $mysoc->country_code).': '.price($line->total_localtax2); $moreinfo .= '<br>'.$langs->transcountry("TotalTTC", $mysoc->country_code).': '.price($line->total_ttc); //$moreinfo .= $langs->trans("TotalHT").': '.$line->total_ht; - if ($line->date_start || $line->date_end) $htmlforlines .= '<br><div class="clearboth nowraponall">'.get_date_range($line->date_start, $line->date_end).'</div>'; + if ($line->date_start || $line->date_end) { + $htmlforlines .= '<br><div class="clearboth nowraponall">'.get_date_range($line->date_start, $line->date_end).'</div>'; + } $htmlforlines .= '</td>'; $htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>'; $htmlforlines .= '<td class="right">'; - if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire)) - { + if (!empty($conf->stock->enabled) && !empty($user->rights->stock->mouvement->lire)) { $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; if (!empty($conf->global->$constantforkey) && $line->fk_product > 0) { $sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp"; @@ -1351,7 +1424,7 @@ if ($placeid > 0) $sql .= " ".MAIN_DB_PREFIX."product_stock as ps"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product"; $sql .= " WHERE ps.reel != 0"; - $sql .= " AND ps.fk_entrepot = ".$conf->global->$constantforkey; + $sql .= " AND ps.fk_entrepot = ".((int) $conf->global->$constantforkey); $sql .= " AND e.entity IN (".getEntity('stock').")"; $sql .= " AND ps.fk_product = ".$line->fk_product; $resql = $db->query($sql); @@ -1359,9 +1432,13 @@ if ($placeid > 0) $obj = $db->fetch_object($resql); $stock_real = price2num($obj->reel, 'MS'); $htmlforlines .= $line->qty; - if ($line->qty && $line->qty > $stock_real) $htmlforlines .= '<span style="color: var(--amountremaintopaycolor)">'; + if ($line->qty && $line->qty > $stock_real) { + $htmlforlines .= '<span style="color: var(--amountremaintopaycolor)">'; + } $htmlforlines .= ' <span class="posstocktoolow">('.$langs->trans("Stock").' '.$stock_real.')</span>'; - if ($line->qty && $line->qty > $stock_real) $htmlforlines .= "</span>"; + if ($line->qty && $line->qty > $stock_real) { + $htmlforlines .= "</span>"; + } } else { dol_print_error($db); } @@ -1373,6 +1450,18 @@ if ($placeid > 0) } $htmlforlines .= '</td>'; + if ($conf->global->TAKEPOS_SHOW_HT) { + $htmlforlines .= '<td class="right classfortooltip" title="'.$moreinfo.'">'; + $htmlforlines .= price($line->total_ht, 1, '', 1, -1, -1, $conf->currency); + if (!empty($conf->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"]); + $htmlforlines .= '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($line->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; + } + $htmlforlines .= '</td>'; + } $htmlforlines .= '<td class="right classfortooltip" title="'.$moreinfo.'">'; $htmlforlines .= price($line->total_ttc, 1, '', 1, -1, -1, $conf->currency); if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { @@ -1390,10 +1479,19 @@ if ($placeid > 0) print $htmlforlines; } } else { - print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>'; + print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>'; + if (!empty($conf->global->TAKEPOS_SHOW_HT)) { + print '<td></td>'; + } + print '</tr>'; } } else { // No invoice generated yet - print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>'; + print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td>'; + + if (!empty($conf->global->TAKEPOS_SHOW_HT)) { + print '<td></td>'; + } + print '</tr>'; } print '</table>'; @@ -1403,8 +1501,7 @@ if (($action == "valid" || $action == "history") && $invoice->type != Facture::T } -if ($action == "search") -{ +if ($action == "search") { print '<center> <input type="text" id="search" name="search" onkeyup="Search2();" name="search" style="width:80%;font-size: 150%;" placeholder=' . $langs->trans('Search').' </center>'; diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index c1683073371..d4b6c023186 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -25,11 +25,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -50,19 +60,16 @@ if (empty($user->rights->takepos->run)) { */ $invoice = new Facture($db); -if ($invoiceid > 0) -{ +if ($invoiceid > 0) { $invoice->fetch($invoiceid); } 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); - if ($obj) - { + if ($obj) { $invoiceid = $obj->rowid; } - if (!$invoiceid) - { + if (!$invoiceid) { $invoiceid = 0; // Invoice does not exist yet } else { $invoice->fetch($invoiceid); @@ -92,9 +99,15 @@ $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { $paycode = $obj->code; - if ($paycode == 'LIQ') $paycode = 'CASH'; - if ($paycode == 'CB') $paycode = 'CB'; - if ($paycode == 'CHQ') $paycode = 'CHEQUE'; + if ($paycode == 'LIQ') { + $paycode = 'CASH'; + } + if ($paycode == 'CB') { + $paycode = 'CB'; + } + if ($paycode == 'CHQ') { + $paycode = 'CHEQUE'; + } $accountname = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"]; if (!empty($conf->global->$accountname) && $conf->global->$accountname > 0) { @@ -106,7 +119,9 @@ if ($resql) { ?> <link rel="stylesheet" href="css/pos.css.php"> <?php -if ($conf->global->TAKEPOS_COLOR_THEME == 1) print '<link rel="stylesheet" href="css/colorful.css">'; +if ($conf->global->TAKEPOS_COLOR_THEME == 1) { + print '<link rel="stylesheet" href="css/colorful.css">'; +} ?> </head> <body> @@ -114,58 +129,63 @@ if ($conf->global->TAKEPOS_COLOR_THEME == 1) print '<link rel="stylesheet" href= <script> <?php $remaintopay = 0; -if ($invoice->id > 0) -{ +if ($invoice->id > 0) { $remaintopay = $invoice->getRemainToPay(); } $alreadypayed = (is_object($invoice) ? ($invoice->total_ttc - $remaintopay) : 0); -if ($conf->global->TAKEPOS_NUMPAD == 0) print "var received='';"; -else print "var received=0;"; +if ($conf->global->TAKEPOS_NUMPAD == 0) { + print "var received='';"; +} else { + print "var received=0;"; +} ?> var alreadypayed = <?php echo $alreadypayed ?>; function addreceived(price) { - <?php - if (empty($conf->global->TAKEPOS_NUMPAD)) print 'received+=String(price);'."\n"; - else print 'received+=parseFloat(price);'."\n"; + <?php + if (empty($conf->global->TAKEPOS_NUMPAD)) { + print 'received+=String(price);'."\n"; + } else { + print 'received+=parseFloat(price);'."\n"; + } ?> - $('.change1').html(pricejs(parseFloat(received), 'MT')); - $('.change1').val(parseFloat(received)); + $('.change1').html(pricejs(parseFloat(received), 'MT')); + $('.change1').val(parseFloat(received)); alreadypaydplusreceived=price2numjs(alreadypayed + parseFloat(received)); - //console.log("already+received = "+alreadypaydplusreceived); - //console.log("total_ttc = "+<?php echo $invoice->total_ttc; ?>); - if (alreadypaydplusreceived > <?php echo $invoice->total_ttc; ?>) - { + //console.log("already+received = "+alreadypaydplusreceived); + //console.log("total_ttc = "+<?php echo $invoice->total_ttc; ?>); + if (alreadypaydplusreceived > <?php echo $invoice->total_ttc; ?>) + { var change=parseFloat(alreadypayed + parseFloat(received) - <?php echo $invoice->total_ttc; ?>); $('.change2').html(pricejs(change, 'MT')); - $('.change2').val(change); - $('.change1').removeClass('colorred'); - $('.change1').addClass('colorgreen'); - $('.change2').removeClass('colorwhite'); - $('.change2').addClass('colorred'); + $('.change2').val(change); + $('.change1').removeClass('colorred'); + $('.change1').addClass('colorgreen'); + $('.change2').removeClass('colorwhite'); + $('.change2').addClass('colorred'); } - else - { + else + { $('.change2').html(pricejs(0, 'MT')); - $('.change2').val(0); - if (alreadypaydplusreceived == <?php echo $invoice->total_ttc; ?>) - { - $('.change1').removeClass('colorred'); - $('.change1').addClass('colorgreen'); - $('.change2').removeClass('colorred'); - $('.change2').addClass('colorwhite'); - } - else - { - $('.change1').removeClass('colorgreen'); - $('.change1').addClass('colorred'); - $('.change2').removeClass('colorred'); - $('.change2').addClass('colorwhite'); - } - } + $('.change2').val(0); + if (alreadypaydplusreceived == <?php echo $invoice->total_ttc; ?>) + { + $('.change1').removeClass('colorred'); + $('.change1').addClass('colorgreen'); + $('.change2').removeClass('colorred'); + $('.change2').addClass('colorwhite'); + } + else + { + $('.change1').removeClass('colorgreen'); + $('.change1').addClass('colorred'); + $('.change2').removeClass('colorred'); + $('.change2').addClass('colorwhite'); + } + } } function reset() @@ -175,10 +195,10 @@ else print "var received=0;"; $('.change1').val(price2numjs(received)); $('.change2').html(pricejs(received, 'MT')); $('.change2').val(price2numjs(received)); - $('.change1').removeClass('colorgreen'); - $('.change1').addClass('colorred'); - $('.change2').removeClass('colorred'); - $('.change2').addClass('colorwhite'); + $('.change1').removeClass('colorgreen'); + $('.change1').addClass('colorred'); + $('.change2').removeClass('colorred'); + $('.change2').addClass('colorwhite'); } function Validate(payment) @@ -192,10 +212,10 @@ else print "var received=0;"; } console.log("We click on the payment mode to pay amount = "+amountpayed); parent.$("#poslines").load("invoice.php?place=<?php echo $place; ?>&action=valid&pay="+payment+"&amount="+amountpayed+"&excess="+excess+"&invoiceid="+invoiceid+"&accountid="+accountid, function() { - if (amountpayed > <?php echo $remaintopay; ?> || amountpayed == <?php echo $remaintopay; ?> || amountpayed==0 ) { - console.log("Close popup"); - parent.$.colorbox.close(); - } + if (amountpayed > <?php echo $remaintopay; ?> || amountpayed == <?php echo $remaintopay; ?> || amountpayed==0 ) { + console.log("Close popup"); + parent.$.colorbox.close(); + } else { console.log("Amount is not comple, so we do NOT close popup and reload it."); location.reload(); @@ -206,32 +226,32 @@ else print "var received=0;"; function ValidateSumup() { console.log("Launch ValidateSumup"); <?php $_SESSION['SMP_CURRENT_PAYMENT'] = "NEW" ?> - var invoiceid = <?php echo($invoiceid > 0 ? $invoiceid : 0); ?>; - var amountpayed = $("#change1").val(); - if (amountpayed > <?php echo $invoice->total_ttc; ?>) { - amountpayed = <?php echo $invoice->total_ttc; ?>; - } + var invoiceid = <?php echo($invoiceid > 0 ? $invoiceid : 0); ?>; + var amountpayed = $("#change1").val(); + if (amountpayed > <?php echo $invoice->total_ttc; ?>) { + amountpayed = <?php echo $invoice->total_ttc; ?>; + } - // Starting sumup app - window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo $conf->global->TAKEPOS_SUMUP_AFFILIATE ?>&app-id=<?php echo $conf->global->TAKEPOS_SUMUP_APPID ?>&total=' + amountpayed + '&currency=EUR&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php'); + // Starting sumup app + window.open('sumupmerchant://pay/1.0?affiliate-key=<?php echo $conf->global->TAKEPOS_SUMUP_AFFILIATE ?>&app-id=<?php echo $conf->global->TAKEPOS_SUMUP_APPID ?>&total=' + amountpayed + '&currency=EUR&title=' + invoiceid + '&callback=<?php echo DOL_MAIN_URL_ROOT ?>/takepos/smpcb.php'); - var loop = window.setInterval(function () { - $.ajax('<?php echo DOL_URL_ROOT ?>/takepos/smpcb.php?status').done(function (data) { - console.log(data); - if (data === "SUCCESS") { - parent.$("#poslines").load("invoice.php?place=<?php echo $place; ?>&action=valid&pay=CB&amount=" + amountpayed + "&invoiceid=" + invoiceid, function () { - //parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight); - parent.$.colorbox.close(); - //parent.setFocusOnSearchField(); // This does not have effect - }); - clearInterval(loop); - } else if (data === "FAILED") { - parent.$.colorbox.close(); - clearInterval(loop); - } - }); - }, 2500); - } + var loop = window.setInterval(function () { + $.ajax('<?php echo DOL_URL_ROOT ?>/takepos/smpcb.php?status').done(function (data) { + console.log(data); + if (data === "SUCCESS") { + parent.$("#poslines").load("invoice.php?place=<?php echo $place; ?>&action=valid&pay=CB&amount=" + amountpayed + "&invoiceid=" + invoiceid, function () { + //parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight); + parent.$.colorbox.close(); + //parent.setFocusOnSearchField(); // This does not have effect + }); + clearInterval(loop); + } else if (data === "FAILED") { + parent.$.colorbox.close(); + clearInterval(loop); + } + }); + }, 2500); + } </script> <div style="position:relative; padding-top: 20px; left:5%; height:150px; width:90%;"> @@ -245,7 +265,7 @@ else print "var received=0;"; </div> <?php } ?> <div class="paymentbordline paymentbordlinereceived"> - <center><span class="takepospay"><font color="white"><?php echo $langs->trans("Received"); ?>: </font><span class="change1 colorred"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change1" class="change1" value="0"></span></center> + <center><span class="takepospay"><font color="white"><?php echo $langs->trans("Received"); ?>: </font><span class="change1 colorred"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change1" class="change1" value="0"></span></center> </div> <div class="paymentbordline paymentbordlinechange"> <center><span class="takepospay"><font color="white"><?php echo $langs->trans("Change"); ?>: </font><span class="change2 colorwhite"><?php echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); ?></span><input type="hidden" id="change2" class="change2" value="0"></span></center> @@ -294,13 +314,19 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'coins'; + } } elseif ($paycode == 'CB') { $paycode = 'card'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'credit-card'; + } } elseif ($paycode == 'CHQ') { $paycode = 'cheque'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'money-check'; + } } print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><span class="hideonsmartphone"><br>'. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</span></button>'; @@ -317,13 +343,19 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'coins'; + } } elseif ($paycode == 'CB') { $paycode = 'card'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'credit-card'; + } } elseif ($paycode == 'CHQ') { $paycode = 'cheque'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'money-check'; + } } print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>'; @@ -341,13 +373,19 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'coins'; + } } elseif ($paycode == 'CB') { $paycode = 'card'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'credit-card'; + } } elseif ($paycode == 'CHQ') { $paycode = 'cheque'; - if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check'; + if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) { + $payIcon = 'money-check'; + } } print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span>'.(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS) ? '<br> '. $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : '') : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>'; diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 9084fc448f1..7eaa4d9ec68 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -25,13 +25,25 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} -if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + require '../main.inc.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/facture.class.php'; @@ -47,8 +59,7 @@ $action = GETPOST('action', 'aZ09'); $setterminal = GETPOST('setterminal', 'int'); $idproduct = GETPOST('idproduct', 'int'); -if ($setterminal > 0) -{ +if ($setterminal > 0) { $_SESSION["takeposterminal"] = $setterminal; } @@ -83,8 +94,7 @@ if ($action == "productinfo") { print '<h1>'.$langs->trans('StatusOrderDelivered').'</h1>'; print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="CheckPlease();">'.$langs->trans('Payment').'</button>'; print '<br>'; -} -elseif ($action == "checkplease") { +} elseif ($action == "checkplease") { if (GETPOSTISSET("payment")) { print '<h1>'.$langs->trans('StatusOrderDelivered').'</h1>'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; @@ -114,10 +124,8 @@ elseif ($action == "checkplease") { $selectedline = GETPOST('selectedline', 'int'); $invoice = new Facture($db); $invoice->fetch($placeid); - foreach ($invoice->lines as $line) - { - if ($line->id == $selectedline) - { + foreach ($invoice->lines as $line) { + if ($line->id == $selectedline) { $prod = new Product($db); $prod->fetch($line->fk_product); print "<b>".$prod->label."</b><br>"; @@ -133,7 +141,9 @@ elseif ($action == "checkplease") { } else { // Title $title = 'TakePOS - Dolibarr '.DOL_VERSION; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; + } $head = '<meta name="apple-mobile-web-app-title" content="TakePOS"/> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> @@ -149,12 +159,9 @@ elseif ($action == "checkplease") { // Search root category to know its level //$conf->global->TAKEPOS_ROOT_CATEGORY_ID=0; $levelofrootcategory = 0; - if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) - { - foreach ($categories as $key => $categorycursor) - { - if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) - { + if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { + foreach ($categories as $key => $categorycursor) { + if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) { $levelofrootcategory = $categorycursor['level']; break; } @@ -164,10 +171,8 @@ elseif ($action == "checkplease") { $maincategories = array(); $subcategories = array(); - foreach ($categories as $key => $categorycursor) - { - if ($categorycursor['level'] == $levelofmaincategories) - { + foreach ($categories as $key => $categorycursor) { + if ($categorycursor['level'] == $levelofmaincategories) { $maincategories[$key] = $categorycursor; } else { $subcategories[$key] = $categorycursor; @@ -193,23 +198,22 @@ var editnumber=""; $( document ).ready(function() { - console.log("Refresh"); + console.log("Refresh"); LoadPlace(place); }); function LoadPlace(placeid){ - place=placeid; + place=placeid; <?php if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&place="+place, function() { });'; - } - else { + } else { echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&place="+place, function() { });'; } ?> - LoadCats(); + LoadCats(); } function AddProduct(placeid, productid){ @@ -219,8 +223,7 @@ function AddProduct(placeid, productid){ print 'place=placeid; $("#phonediv1").load("auto_order.php?action=productinfo&place="+place+"&idproduct="+productid, function() { });'; - } - else { + } else { print 'AddProductConfirm(placeid, productid);'; } ?> @@ -237,8 +240,7 @@ function AddProductConfirm(placeid, productid){ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { echo '$("#phonediv2").load("auto_order.php?mobilepage=invoice&action=addline&place="+place+"&idproduct="+productid, function() { });'; - } - else { + } else { echo '$("#phonediv2").load("invoice.php?mobilepage=invoice&action=addline&place="+place+"&idproduct="+productid, function() { });'; } @@ -258,8 +260,7 @@ function SetQty(place, selectedline, qty){ }); } <?php - } - else { + } else { ?> if (qty==0){ $("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&token=<?php echo newToken(); ?>&place="+place+"&idline="+selectedline, function() { @@ -278,7 +279,7 @@ function SetQty(place, selectedline, qty){ function SetNote(place, selectedline){ var note = prompt("<?php $langs->trans('Note'); ?>", ""); $("#phonediv2").load("auto_order.php?mobilepage=invoice&action=updateqty&place="+place+"&idline="+selectedline+"&number="+qty, function() { - }); + }); LoadCats(); } @@ -287,8 +288,7 @@ function LoadCats(){ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { echo '$("#phonediv1").load("auto_order.php?mobilepage=cats&place="+place, function() { });'; - } - else { + } else { echo '$("#phonediv1").load("invoice.php?mobilepage=cats&place="+place, function() { });'; } @@ -301,8 +301,7 @@ function LoadProducts(idcat){ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { echo '$("#phonediv1").load("auto_order.php?mobilepage=products&catid="+idcat+"&place="+place, function() { });'; - } - else { + } else { echo '$("#phonediv1").load("invoice.php?mobilepage=products&catid="+idcat+"&place="+place, function() { });'; } @@ -310,20 +309,19 @@ function LoadProducts(idcat){ } function LoadPlacesList(){ - $("#phonediv1").load("invoice.php?mobilepage=places", function() { - }); + $("#phonediv1").load("invoice.php?mobilepage=places", function() { + }); } function TakeposPrintingOrder(){ - console.log("TakeposPrintingOrder"); + console.log("TakeposPrintingOrder"); <?php if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { echo '$("#phonediv2").load("auto_order.php?action=order&mobilepage=order&place="+place, function() { });'; echo '$("#phonediv1").load("auto_order.php?action=publicpayment&place="+place, function() { });'; - } - else { + } else { echo '$("#phonediv2").load("invoice.php?action=order&place="+place, function() { });'; } @@ -331,7 +329,7 @@ function TakeposPrintingOrder(){ } function Exit(){ - window.location.href='../user/logout.php'; + window.location.href='../user/logout.php'; } function CheckPlease(payment){ @@ -350,7 +348,9 @@ function CheckPlease(payment){ <body style="background-color:#D1D1D1;"> <?php - if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '<div class="dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>'; + if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") { + print '<div class="dialog-info-takepos-terminal" id="dialog-info" title="TakePOS">'.$langs->trans('TerminalSelect').'</div>'; + } ?> <div class="container"> <div class="phonebuttonsrow"> @@ -360,8 +360,7 @@ function CheckPlease(payment){ print '<button type="button" class="phonebutton" onclick="LoadCats();">'.strtoupper(substr($langs->trans('Categories'), 0, 3)).'</button>'; print '<button type="button" class="phonebutton" onclick="TakeposPrintingOrder();">'.strtoupper(substr($langs->trans('Order'), 0, 3)).'</button>'; print '<button type="button" class="phonebutton" onclick="Exit();">'.strtoupper(substr($langs->trans('Logout'), 0, 3)).'</button>'; - } - else { + } else { print '<button type="button" class="publicphonebutton phoneblue" onclick="LoadCats();">'.strtoupper(substr($langs->trans('Categories'), 0, 5)).'</button>'; print '<button type="button" class="publicphonebutton phoneorange" onclick="PublicPreOrder();">'.strtoupper(substr($langs->trans('Order'), 0, 5)).'</button>'; print '<button type="button" class="publicphonebutton phonegreen" onclick="CheckPlease();">'.strtoupper(substr($langs->trans('Payment'), 0, 5)).'</button>'; diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index e7853f7141b..308cd75b12e 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -21,18 +21,30 @@ * \brief Public orders for customers */ -if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../../main.inc.php'; -if (!$conf->global->TAKEPOS_AUTO_ORDER) accessforbidden(); // If Auto Order is disabled never allow NO LOGIN access +if (!$conf->global->TAKEPOS_AUTO_ORDER) { + accessforbidden(); // If Auto Order is disabled never allow NO LOGIN access +} $_SESSION["basiclayout"] = 1; $_SESSION["takeposterminal"] = 1; define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); -if (GETPOSTISSET("mobilepage")) require '../invoice.php'; -elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php'; -else require '../phone.php'; +if (GETPOSTISSET("mobilepage")) { + require '../invoice.php'; +} elseif (GETPOSTISSET("genimg")) { + require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php'; +} else { + require '../phone.php'; +} diff --git a/htdocs/takepos/public/menu.php b/htdocs/takepos/public/menu.php index 5814888f2cf..ad4dfd9035e 100644 --- a/htdocs/takepos/public/menu.php +++ b/htdocs/takepos/public/menu.php @@ -21,15 +21,23 @@ * \brief Public menu for customers */ -if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -if (!defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); +if (!defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!$conf->global->TAKEPOS_QR_MENU) accessforbidden(); // If Restaurant Menu is disabled never allow NO LOGIN access +if (!$conf->global->TAKEPOS_QR_MENU) { + accessforbidden(); // If Restaurant Menu is disabled never allow NO LOGIN access +} ?> <!DOCTYPE html> <html> @@ -43,21 +51,18 @@ if (!$conf->global->TAKEPOS_QR_MENU) accessforbidden(); // If Restaurant Menu is <body> <!-- partial:index.partial.html --> <body> - <div class="grid-container"> - <div class="grid-x grid-padding-x menu2"> - <div class="cell small-12"> - <h1><?php print $mysoc->name; ?> - <small><?php print $langs->trans('RestaurantMenu'); ?></small></h1> + <div class="grid-container"> + <div class="grid-x grid-padding-x menu2"> + <div class="cell small-12"> + <h1><?php print $mysoc->name; ?> - <small><?php print $langs->trans('RestaurantMenu'); ?></small></h1> <?php $categorie = new Categorie($db); $categories = $categorie->get_full_arbo('product', (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) ? $conf->global->TAKEPOS_ROOT_CATEGORY_ID : 0), 1); $levelofrootcategory = 0; -if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) -{ - foreach ($categories as $key => $categorycursor) - { - if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) - { +if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { + foreach ($categories as $key => $categorycursor) { + if ($categorycursor['id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) { $levelofrootcategory = $categorycursor['level']; break; } @@ -67,10 +72,8 @@ $levelofmaincategories = $levelofrootcategory + 1; $maincategories = array(); $subcategories = array(); -foreach ($categories as $key => $categorycursor) -{ - if ($categorycursor['level'] == $levelofmaincategories) - { +foreach ($categories as $key => $categorycursor) { + if ($categorycursor['level'] == $levelofmaincategories) { $maincategories[$key] = $categorycursor; } else { $subcategories[$key] = $categorycursor; @@ -103,12 +106,12 @@ foreach ($maincategories as $cat) { ?> </div> </div> - </div> - <footer class="footer"> - <div class="container"> - <p class="text-muted"><?php print $mysoc->name; ?></p> - </div> - </footer> + </div> + <footer class="footer"> + <div class="container"> + <p class="text-muted"><?php print $mysoc->name; ?></p> + </div> + </footer> </body> <!-- partial --> <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script> diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 6a305362839..e9d721a44e3 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -4,6 +4,7 @@ * Copyright (C) 2012 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com> * Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat> + * Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,10 +31,18 @@ if (!isset($action)) { //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); - if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); - if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); - if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); - if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); + } + if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); + } + if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); + } + if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); + } require '../main.inc.php'; // If this file is called from send.php avoid load again } @@ -58,13 +67,11 @@ if (empty($user->rights->takepos->run)) { top_httphead('text/html'); -if ($place > 0) -{ +if ($place > 0) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $facid = $obj->rowid; } } @@ -85,13 +92,13 @@ if (!empty($hookmanager->resPrint)) { <body> <style> .right { - text-align: right; + text-align: right; } .center { - text-align: center; + text-align: center; } .left { - text-align: left; + text-align: left; } </style> <center> @@ -103,12 +110,15 @@ if (!empty($hookmanager->resPrint)) { <p class="left"> <?php $constFreeText = 'TAKEPOS_HEADER'.$_SESSION['takeposterminal']; -if (!empty($conf->global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeText})) -{ +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); - if (!empty($conf->global->{$constFreeText})) $newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray); + 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; } ?> @@ -116,16 +126,22 @@ if (!empty($conf->global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeTe <p class="right"> <?php print $langs->trans('Date')." ".dol_print_date($object->date, 'day').'<br>'; -if (!empty($conf->global->TAKEPOS_RECEIPT_NAME)) print $conf->global->TAKEPOS_RECEIPT_NAME." "; -if ($object->statut == Facture::STATUS_DRAFT) print str_replace(")", "", str_replace("-", " ".$langs->trans('Place')." ", str_replace("(PROV-POS", $langs->trans("Terminal")." ", $object->ref))); -else print $object->ref; -if ($conf->global->TAKEPOS_SHOW_CUSTOMER) -{ - if ($object->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) - { +if (!empty($conf->global->TAKEPOS_RECEIPT_NAME)) { + print $conf->global->TAKEPOS_RECEIPT_NAME." "; +} +if ($object->statut == Facture::STATUS_DRAFT) { + print str_replace(")", "", str_replace("-", " ".$langs->trans('Place')." ", str_replace("(PROV-POS", $langs->trans("Terminal")." ", $object->ref))); +} else { + print $object->ref; +} +if ($conf->global->TAKEPOS_SHOW_CUSTOMER) { + if ($object->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) { $soc = new Societe($db); - if ($object->socid > 0) $soc->fetch($object->socid); - else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); + if ($object->socid > 0) { + $soc->fetch($object->socid); + } else { + $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); + } print "<br>".$langs->trans("Customer").': '.$soc->name; } } @@ -134,43 +150,69 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) <br> <table width="100%" style="border-top-style: double;"> - <thead> + <thead> <tr> - <th class="center"><?php print $langs->trans("Label"); ?></th> - <th class="right"><?php print $langs->trans("Qty"); ?></th> - <th class="right"><?php if ($gift != 1) print $langs->trans("Price"); ?></th> - <th class="right"><?php if ($gift != 1) print $langs->trans("TotalTTC"); ?></th> + <th class="center"><?php print $langs->trans("Label"); ?></th> + <th class="right"><?php print $langs->trans("Qty"); ?></th> + <th class="right"><?php if ($gift != 1) { + print $langs->trans("Price"); + } ?></th> + <?php if (!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)) { ?> + <th class="right"><?php if ($gift != 1) { + print $langs->trans("TotalHT"); + } ?></th> + <?php } ?> + <th class="right"><?php if ($gift != 1) { + print $langs->trans("TotalTTC"); + } ?></th> </tr> - </thead> - <tbody> - <?php - foreach ($object->lines as $line) - { + </thead> + <tbody> + <?php + foreach ($object->lines as $line) { ?> - <tr> - <td> - <?php if (!empty($line->product_label)) echo $line->product_label; - else echo $line->description; ?> - </td> - <td class="right"><?php echo $line->qty; ?></td> - <td class="right"><?php if ($gift != 1) echo price(price2num($line->total_ttc / $line->qty, 'MT'), 1); ?></td> - <td class="right"><?php if ($gift != 1) echo price($line->total_ttc, 1); ?></td> - </tr> - <?php + <tr> + <td> + <?php if (!empty($line->product_label)) { + echo $line->product_label; + } else { + echo $line->description; + } ?> + </td> + <td class="right"><?php echo $line->qty; ?></td> + <td class="right"><?php if ($gift != 1) { + echo price(price2num($line->total_ttc / $line->qty, 'MT'), 1); + } ?></td> + <?php + if (!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)) { ?> + <td class="right"><?php if ($gift != 1) { + echo price($line->total_ht, 1); + } ?></td> + <?php + } + ?> + <td class="right"><?php if ($gift != 1) { + echo price($line->total_ttc, 1); + } ?></td> + </tr> + <?php } ?> - </tbody> + </tbody> </table> <br> <table class="right"> <tr> - <th class="right"><?php if ($gift != 1) echo $langs->trans("TotalHT"); ?></th> - <td class="right"><?php if ($gift != 1) echo price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?></td> + <th class="right"><?php if ($gift != 1) { + echo $langs->trans("TotalHT"); + } ?></th> + <td class="right"><?php if ($gift != 1) { + echo price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?></td> </tr> <?php if ($conf->global->TAKEPOS_TICKET_VAT_GROUPPED) { $vat_groups = array(); - foreach ($object->lines as $line) - { + foreach ($object->lines as $line) { if (!array_key_exists($line->tva_tx, $vat_groups)) { $vat_groups[$line->tva_tx] = 0; } @@ -179,18 +221,26 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) foreach ($vat_groups as $key => $val) { ?> <tr> - <th align="right"><?php if ($gift != 1) echo $langs->trans("VAT").' '.vatrate($key, 1); ?></th> - <td align="right"><?php if ($gift != 1) echo price($val, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?></td> + <th align="right"><?php if ($gift != 1) { + echo $langs->trans("VAT").' '.vatrate($key, 1); + } ?></th> + <td align="right"><?php if ($gift != 1) { + echo price($val, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?></td> </tr> - <?php + <?php } } else { ?> <tr> - <th class="right"><?php if ($gift != 1) echo $langs->trans("TotalVAT").'</th><td class="right">'.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?></td> + <th class="right"><?php if ($gift != 1) { + echo $langs->trans("TotalVAT").'</th><td class="right">'.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?></td> </tr> <?php } ?> <tr> - <th class="right"><?php if ($gift != 1) echo ''.$langs->trans("TotalTTC").'</th><td class="right">'.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?></td> + <th class="right"><?php if ($gift != 1) { + echo ''.$langs->trans("TotalTTC").'</th><td class="right">'.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n"; + } ?></td> </tr> <?php if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { @@ -199,7 +249,9 @@ if (!empty($conf->multicurrency->enabled) && $_SESSION["takeposcustomercurrency" $multicurrency = new MultiCurrency($db); $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); echo '<tr><th class="right">'; - if ($gift != 1) echo ''.$langs->trans("TotalTTC").' '.$_SESSION["takeposcustomercurrency"].'</th><td class="right">'.price($object->total_ttc * $multicurrency->rate->rate, 1, '', 1, - 1, - 1, $_SESSION["takeposcustomercurrency"])."\n"; + if ($gift != 1) { + echo ''.$langs->trans("TotalTTC").' '.$_SESSION["takeposcustomercurrency"].'</th><td class="right">'.price($object->total_ttc * $multicurrency->rate->rate, 1, '', 1, - 1, - 1, $_SESSION["takeposcustomercurrency"])."\n"; + } echo '</td></tr>'; } @@ -208,11 +260,10 @@ if ($conf->global->TAKEPOS_PRINT_PAYMENT_METHOD) { $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 .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = ".((int) $facid); $sql .= " ORDER BY p.datep"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; while ($i < $num) { @@ -223,12 +274,13 @@ if ($conf->global->TAKEPOS_PRINT_PAYMENT_METHOD) { echo '</td>'; echo '<td class="right">'; $amount_payment = (!empty($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 + 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 '</td>'; echo '</tr>'; - if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments - { + if ($row->code == "LIQ" && $row->pos_change > 0) { // Print change only in cash payments echo '<tr>'; echo '<td class="right">'; echo $langs->trans("Change"); @@ -250,18 +302,21 @@ if ($conf->global->TAKEPOS_PRINT_PAYMENT_METHOD) { <br> <?php $constFreeText = 'TAKEPOS_FOOTER'.$_SESSION['takeposterminal']; -if (!empty($conf->global->TAKEPOS_FOOTER) || !empty($conf->global->{$constFreeText})) -{ +if (!empty($conf->global->TAKEPOS_FOOTER) || !empty($conf->global->{$constFreeText})) { $newfreetext = ''; $substitutionarray = getCommonSubstitutionArray($langs); - 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); + 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; } ?> <script type="text/javascript"> - window.print(); + window.print(); </script> </body> </html> diff --git a/htdocs/takepos/reduction.php b/htdocs/takepos/reduction.php index dd808d9a19d..38b284a8ed0 100644 --- a/htdocs/takepos/reduction.php +++ b/htdocs/takepos/reduction.php @@ -25,11 +25,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -48,19 +58,16 @@ if (empty($user->rights->takepos->run)) { */ $invoice = new Facture($db); -if ($invoiceid > 0) -{ +if ($invoiceid > 0) { $invoice->fetch($invoiceid); } 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); - if ($obj) - { + if ($obj) { $invoiceid = $obj->rowid; } - if (!$invoiceid) - { + if (!$invoiceid) { $invoiceid = 0; // Invoice does not exist yet } else { $invoice->fetch($invoiceid); @@ -87,111 +94,111 @@ if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || !empty($conf->glob <body> <script> - var reductionType =''; + var reductionType =''; var reductionTotal = ''; - var editAction = ''; - var editNumber = ''; + var editAction = ''; + var editNumber = ''; var htmlBtnOK = '<span style="font-size: 14pt;">OK</span>'; var htmlReductionPercent = '<?php echo dol_escape_js($htmlReductionPercent); ?>'; var htmlReductionAmount = '<?php echo dol_escape_js($htmlReductionAmount); ?>'; - /** - * Reset values - */ - function Reset() - { - reductionType = ''; - reductionTotal = ''; - editAction = ''; - editNumber = ''; - jQuery('#reduction_total').val(reductionTotal); + /** + * Reset values + */ + function Reset() + { + reductionType = ''; + reductionTotal = ''; + editAction = ''; + editNumber = ''; + jQuery('#reduction_total').val(reductionTotal); jQuery("#reduction_type_percent").html(htmlReductionPercent); jQuery('#reduction_type_amount').html(htmlReductionAmount); - } + } - /** - * Edit action - * - * @param {string} number Number pressed - */ - function Edit(number) - { - console.log('Edit ' + number); + /** + * Edit action + * + * @param {string} number Number pressed + */ + function Edit(number) + { + console.log('Edit ' + number); - if (number === 'p') { - if (editAction === 'p' && reductionType === 'percent'){ - ValidateReduction(); - } else { - editAction = 'p'; - } - reductionType = 'percent'; - } else if (number === 'a') { - if (editAction === 'a' && reductionType === 'amount'){ - ValidateReduction(); - } else { - editAction = 'a'; - } - reductionType = 'amount'; - } + if (number === 'p') { + if (editAction === 'p' && reductionType === 'percent'){ + ValidateReduction(); + } else { + editAction = 'p'; + } + reductionType = 'percent'; + } else if (number === 'a') { + if (editAction === 'a' && reductionType === 'amount'){ + ValidateReduction(); + } else { + editAction = 'a'; + } + reductionType = 'amount'; + } - if (editAction === 'p'){ + if (editAction === 'p'){ jQuery('#reduction_type_percent').html(htmlBtnOK); jQuery('#reduction_type_amount').html(htmlReductionAmount); - } else if (editAction === 'a'){ + } else if (editAction === 'a'){ jQuery('#reduction_type_amount').html(htmlBtnOK); jQuery("#reduction_type_percent").html(htmlReductionPercent); - } else { + } else { jQuery('#reduction_type_percent').html(htmlReductionPercent); jQuery('#reduction_type_amount').html(htmlReductionAmount); - } - } + } + } - /** - * Add a number in reduction input - * - * @param {string} reductionNumber Number pressed - */ - function AddReduction(reductionNumber) - { - console.log('AddReduction ' + reductionNumber); + /** + * Add a number in reduction input + * + * @param {string} reductionNumber Number pressed + */ + function AddReduction(reductionNumber) + { + console.log('AddReduction ' + reductionNumber); - reductionTotal += String(reductionNumber); - jQuery('#reduction_total').val(reductionTotal); - } + reductionTotal += String(reductionNumber); + jQuery('#reduction_total').val(reductionTotal); + } - /** - * Validate a reduction - */ + /** + * Validate a reduction + */ function ValidateReduction() { - console.log('ValidateReduction'); + console.log('ValidateReduction'); - if (reductionTotal.length <= 0) { - console.error('Error no reduction'); - return; - } + if (reductionTotal.length <= 0) { + console.error('Error no reduction'); + return; + } - var reductionNumber = parseFloat(reductionTotal); - if (isNaN(reductionNumber)) { - console.error('Error not a valid number :', reductionNumber); - return; - } + var reductionNumber = parseFloat(reductionTotal); + if (isNaN(reductionNumber)) { + console.error('Error not a valid number :', reductionNumber); + return; + } - if (reductionType === 'percent') { - var invoiceid = <?php echo ($invoiceid > 0 ? $invoiceid : 0); ?>; - parent.$("#poslines").load("invoice.php?action=update_reduction_global&place=<?php echo $place; ?>&number="+reductionNumber+"&invoiceid="+invoiceid, function() { - Reset(); - parent.$.colorbox.close(); - }); - } else if (reductionType === 'amount') { - var desc = "<?php echo dol_escape_js($langs->transnoentities('Reduction')); ?>"; - parent.$("#poslines").load("invoice.php?action=freezone&place=<?php echo $place; ?>&number=-"+reductionNumber+"&desc="+desc, function() { - Reset(); - parent.$.colorbox.close(); - }); - } else { - console.error('Error bad reduction type :', reductionType); - } + if (reductionType === 'percent') { + var invoiceid = <?php echo ($invoiceid > 0 ? $invoiceid : 0); ?>; + parent.$("#poslines").load("invoice.php?action=update_reduction_global&place=<?php echo $place; ?>&number="+reductionNumber+"&invoiceid="+invoiceid, function() { + Reset(); + parent.$.colorbox.close(); + }); + } else if (reductionType === 'amount') { + var desc = "<?php echo dol_escape_js($langs->transnoentities('Reduction')); ?>"; + parent.$("#poslines").load("invoice.php?action=freezone&place=<?php echo $place; ?>&number=-"+reductionNumber+"&desc="+desc, function() { + Reset(); + parent.$.colorbox.close(); + }); + } else { + console.error('Error bad reduction type :', reductionType); + } } </script> diff --git a/htdocs/takepos/send.php b/htdocs/takepos/send.php index f33457992a7..9f98d5fbd7d 100644 --- a/htdocs/takepos/send.php +++ b/htdocs/takepos/send.php @@ -26,11 +26,21 @@ //if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -51,8 +61,7 @@ $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); @@ -87,9 +96,9 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); <script> function SendMail() { $.ajax({ - type: "GET", - url: "<?php print dol_buildpath('/takepos/send.php', 1).'?action=send&facid='.$facid.'&email='; ?>" + $("#email"). val(), - }); + type: "GET", + url: "<?php print dol_buildpath('/takepos/send.php', 1).'?action=send&facid='.$facid.'&email='; ?>" + $("#email"). val(), + }); parent.$.colorbox.close(); } diff --git a/htdocs/takepos/smpcb.php b/htdocs/takepos/smpcb.php index 1e02e9bc591..7cc504abdf0 100644 --- a/htdocs/takepos/smpcb.php +++ b/htdocs/takepos/smpcb.php @@ -21,11 +21,21 @@ * \brief Page with the content for smpcb payment */ -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} require '../main.inc.php'; diff --git a/htdocs/theme/common/devices/index.html b/htdocs/theme/common/devices/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/emotes/index.html b/htdocs/theme/common/emotes/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/everybody.png b/htdocs/theme/common/everybody.png new file mode 100644 index 00000000000..efe0d3e2807 Binary files /dev/null and b/htdocs/theme/common/everybody.png differ diff --git a/htdocs/theme/common/flags/index.html b/htdocs/theme/common/flags/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/index.html b/htdocs/theme/common/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/mime/index.html b/htdocs/theme/common/mime/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/paypal.png b/htdocs/theme/common/paypal.png deleted file mode 100644 index 32cae0ca9eb..00000000000 Binary files a/htdocs/theme/common/paypal.png and /dev/null differ diff --git a/htdocs/theme/common/treemenu/index.html b/htdocs/theme/common/treemenu/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/common/treemenu/trash.gif b/htdocs/theme/common/treemenu/trash.gif deleted file mode 100644 index cfa0f000e1e..00000000000 Binary files a/htdocs/theme/common/treemenu/trash.gif and /dev/null differ diff --git a/htdocs/theme/eldy/img/weather/weather-clear-night.png b/htdocs/theme/common/weather/weather-clear-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-clear-night.png rename to htdocs/theme/common/weather/weather-clear-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-clear.png b/htdocs/theme/common/weather/weather-clear.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-clear.png rename to htdocs/theme/common/weather/weather-clear.png diff --git a/htdocs/theme/eldy/img/weather/weather-clouds-night.png b/htdocs/theme/common/weather/weather-clouds-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-clouds-night.png rename to htdocs/theme/common/weather/weather-clouds-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-clouds.png b/htdocs/theme/common/weather/weather-clouds.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-clouds.png rename to htdocs/theme/common/weather/weather-clouds.png diff --git a/htdocs/theme/eldy/img/weather/weather-few-clouds-night.png b/htdocs/theme/common/weather/weather-few-clouds-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-few-clouds-night.png rename to htdocs/theme/common/weather/weather-few-clouds-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-few-clouds.png b/htdocs/theme/common/weather/weather-few-clouds.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-few-clouds.png rename to htdocs/theme/common/weather/weather-few-clouds.png diff --git a/htdocs/theme/eldy/img/weather/weather-freezing-rain.png b/htdocs/theme/common/weather/weather-freezing-rain.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-freezing-rain.png rename to htdocs/theme/common/weather/weather-freezing-rain.png diff --git a/htdocs/theme/eldy/img/weather/weather-hail.png b/htdocs/theme/common/weather/weather-hail.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-hail.png rename to htdocs/theme/common/weather/weather-hail.png diff --git a/htdocs/theme/eldy/img/weather/weather-many-clouds.png b/htdocs/theme/common/weather/weather-many-clouds.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-many-clouds.png rename to htdocs/theme/common/weather/weather-many-clouds.png diff --git a/htdocs/theme/eldy/img/weather/weather-mist.png b/htdocs/theme/common/weather/weather-mist.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-mist.png rename to htdocs/theme/common/weather/weather-mist.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers-day.png b/htdocs/theme/common/weather/weather-showers-day.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers-day.png rename to htdocs/theme/common/weather/weather-showers-day.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers-night.png b/htdocs/theme/common/weather/weather-showers-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers-night.png rename to htdocs/theme/common/weather/weather-showers-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers-scattered-day.png b/htdocs/theme/common/weather/weather-showers-scattered-day.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers-scattered-day.png rename to htdocs/theme/common/weather/weather-showers-scattered-day.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers-scattered-night.png b/htdocs/theme/common/weather/weather-showers-scattered-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers-scattered-night.png rename to htdocs/theme/common/weather/weather-showers-scattered-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers-scattered.png b/htdocs/theme/common/weather/weather-showers-scattered.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers-scattered.png rename to htdocs/theme/common/weather/weather-showers-scattered.png diff --git a/htdocs/theme/eldy/img/weather/weather-showers.png b/htdocs/theme/common/weather/weather-showers.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-showers.png rename to htdocs/theme/common/weather/weather-showers.png diff --git a/htdocs/theme/eldy/img/weather/weather-snow-rain.png b/htdocs/theme/common/weather/weather-snow-rain.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-snow-rain.png rename to htdocs/theme/common/weather/weather-snow-rain.png diff --git a/htdocs/theme/eldy/img/weather/weather-snow-scattered-day.png b/htdocs/theme/common/weather/weather-snow-scattered-day.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-snow-scattered-day.png rename to htdocs/theme/common/weather/weather-snow-scattered-day.png diff --git a/htdocs/theme/eldy/img/weather/weather-snow-scattered-night.png b/htdocs/theme/common/weather/weather-snow-scattered-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-snow-scattered-night.png rename to htdocs/theme/common/weather/weather-snow-scattered-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-snow-scattered.png b/htdocs/theme/common/weather/weather-snow-scattered.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-snow-scattered.png rename to htdocs/theme/common/weather/weather-snow-scattered.png diff --git a/htdocs/theme/eldy/img/weather/weather-snow.png b/htdocs/theme/common/weather/weather-snow.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-snow.png rename to htdocs/theme/common/weather/weather-snow.png diff --git a/htdocs/theme/eldy/img/weather/weather-storm-day.png b/htdocs/theme/common/weather/weather-storm-day.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-storm-day.png rename to htdocs/theme/common/weather/weather-storm-day.png diff --git a/htdocs/theme/eldy/img/weather/weather-storm-night.png b/htdocs/theme/common/weather/weather-storm-night.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-storm-night.png rename to htdocs/theme/common/weather/weather-storm-night.png diff --git a/htdocs/theme/eldy/img/weather/weather-storm.png b/htdocs/theme/common/weather/weather-storm.png similarity index 100% rename from htdocs/theme/eldy/img/weather/weather-storm.png rename to htdocs/theme/common/weather/weather-storm.png diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index 00c2a91a29c..dcb61499b63 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -1,140 +1,142 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* Badge style is based on boostrap framework */ .badge { - display: inline-block; - padding: .1em .35em; - font-size: 80%; - font-weight: 700 !important; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25rem; - transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; - border-width: 2px; - border-style: solid; - border-color: rgba(255,255,255,0); - box-sizing: border-box; + display: inline-block; + padding: .1em .35em; + font-size: 80%; + font-weight: 700 !important; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25rem; + transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; + border-width: 2px; + border-style: solid; + border-color: rgba(255,255,255,0); + box-sizing: border-box; } .badge-status { - font-size: 0.95em; - padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ + 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; + 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; + font-size: 0.95em; + padding: .3em .2em; } } .badge-pill, .tabs .badge { - padding-right: .5em; - padding-left: .5em; - border-radius: 0.25rem; + padding-right: .5em; + padding-left: .5em; + border-radius: 0.25rem; } .badge-dot { - padding: 0; - border-radius: 50%; - padding: 0.45em; - vertical-align: text-top; + padding: 0; + border-radius: 50%; + padding: 0.45em; + vertical-align: text-top; } a.badge:focus, a.badge:hover { - text-decoration: none; + text-decoration: none; } .liste_titre .badge:not(.nochangebackground) { - background-color: <?php print $badgeSecondary; ?>; - color: #fff; + background-color: <?php print $badgeSecondary; ?>; + color: #fff; } span.badgeneutral { - padding: 2px 7px 2px 7px; - background-color: #e4e4e4; - color: #666; - border-radius: 10px; + padding: 2px 7px 2px 7px; + background-color: #e4e4e4; + color: #666; + border-radius: 10px; } /* PRIMARY */ .badge-primary{ - color: #fff !important; - background-color: <?php print $badgePrimary; ?>; + color: #fff !important; + background-color: <?php print $badgePrimary; ?>; } a.badge-primary.focus, a.badge-primary:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>; } a.badge-primary:focus, a.badge-primary:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgePrimary, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgePrimary, 10); ?>; } /* SECONDARY */ .badge-secondary, .tabs .badge { - color: #fff !important; - background-color: <?php print $badgeSecondary; ?>; + color: #fff !important; + background-color: <?php print $badgeSecondary; ?>; } a.badge-secondary.focus, a.badge-secondary:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>; } a.badge-secondary:focus, a.badge-secondary:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeSecondary, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeSecondary, 10); ?>; } /* SUCCESS */ .badge-success { - color: #fff !important; - background-color: <?php print $badgeSuccess; ?>; + color: #fff !important; + background-color: <?php print $badgeSuccess; ?>; } a.badge-success.focus, a.badge-success:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>; } a.badge-success:focus, a.badge-success:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeSuccess, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeSuccess, 10); ?>; } /* DANGER */ .badge-danger { - color: #fff !important; - background-color: <?php print $badgeDanger; ?>; + color: #fff !important; + background-color: <?php print $badgeDanger; ?>; } a.badge-danger.focus, a.badge-danger:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>; } a.badge-danger:focus, a.badge-danger:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeDanger, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeDanger, 10); ?>; } /* WARNING */ .badge-warning { - color: #fff !important; - background-color: <?php print $badgeWarning; ?>; + color: #fff !important; + background-color: <?php print $badgeWarning; ?>; } a.badge-warning.focus, a.badge-warning:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>; } a.badge-warning:focus, a.badge-warning:hover { - color: #212529 !important; - background-color: <?php print colorDarker($badgeWarning, 10); ?>; + color: #212529 !important; + background-color: <?php print colorDarker($badgeWarning, 10); ?>; } /* WARNING colorblind */ @@ -150,60 +152,60 @@ body[class*="colorblind-"] a.badge-warning:focus, a.badge-warning:hover { /* INFO */ .badge-info { - color: #fff !important; - background-color: <?php print $badgeInfo; ?>; + color: #fff !important; + background-color: <?php print $badgeInfo; ?>; } a.badge-info.focus, a.badge-info:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>; } a.badge-info:focus, a.badge-info:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeInfo, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeInfo, 10); ?>; } /* LIGHT */ .badge-light { - color: #212529 !important; - background-color: <?php print $badgeLight; ?>; + color: #212529 !important; + background-color: <?php print $badgeLight; ?>; } a.badge-light.focus, a.badge-light:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>; } a.badge-light:focus, a.badge-light:hover { - color: #212529 !important; - background-color: <?php print colorDarker($badgeLight, 10); ?>; + color: #212529 !important; + background-color: <?php print colorDarker($badgeLight, 10); ?>; } /* DARK */ .badge-dark { - color: #fff !important; - background-color: <?php print $badgeDark; ?>; + color: #fff !important; + background-color: <?php print $badgeDark; ?>; } a.badge-dark.focus, a.badge-dark:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>; } a.badge-dark:focus, a.badge-dark:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeDark, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeDark, 10); ?>; } @media only screen and (max-width: 570px) { span.badge.badge-status { - overflow: hidden; - max-width: 130px; - text-overflow: ellipsis; + overflow: hidden; + max-width: 130px; + text-overflow: ellipsis; } } /* STATUS BADGES */ <?php -for ($i = 0; $i <= 9; $i++) { +for ($i = 0; $i <= 10; $i++) { /* Default Status */ _createStatusBadgeCss($i, '', "STATUS".$i); @@ -234,7 +236,7 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.'badgeStatus'.$statusName}; - $TBadgeBorderOnly = array('0', '1b', '3', '4b', '5', '7'); + $TBadgeBorderOnly = array('0', '1b', '3', '4b', '5', '7', '10'); $thisBadgeTextColor = colorIsLight(${$statusVarNamePrefix.'badgeStatus'.$statusName}) ? '#212529' : '#ffffff'; if (!empty(${$statusVarNamePrefix.'badgeStatus_textColor'.$statusName})) { @@ -246,8 +248,12 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL $thisBadgeBackgroundColor = "#fff"; } - if (in_array((string) $statusName, array('0', '5', '9'))) $thisBadgeTextColor = '#999999'; - if (in_array((string) $statusName, array('6'))) $thisBadgeTextColor = '#777777'; + if (in_array((string) $statusName, array('0', '5', '9'))) { + $thisBadgeTextColor = '#999999'; + } + if (in_array((string) $statusName, array('6'))) { + $thisBadgeTextColor = '#777777'; + } print $cssPrefix.".badge-status".$statusName." {\n"; print " color: ".$thisBadgeTextColor." !important;\n"; diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index 364723e2152..92715b774ce 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -1,19 +1,21 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ :root { - --btncolortext:rgb(<?php print $colortextlink; ?>); - --btncolorbg: #fbfbfb; - --btncolorborderhover: none; - --btncolorborder: #FFF; - /* --butactionbg:rgba(150, 110, 162, 0.95); */ - --butactionbg:rgb(118, 145, 225); - --butactionbg:rgba(150, 110, 162, 0.95); - --butactiondeletebg: rgb(234,228,225); - /* tertiary color */ - /* --butactionbg:rgb(218, 235, 225); */ - /* --butactionbg:rgb(228, 218, 235); */ + --btncolortext:rgb(<?php print $colortextlink; ?>); + --btncolorbg: #fbfbfb; + --btncolorborderhover: none; + --btncolorborder: #FFF; + /* --butactionbg:rgba(150, 110, 162, 0.95); */ + --butactionbg:rgb(118, 145, 225); + --butactionbg:rgba(150, 110, 162, 0.95); + --butactiondeletebg: rgb(234,228,225); + /* tertiary color */ + /* --butactionbg:rgb(218, 235, 225); */ + /* --butactionbg:rgb(228, 218, 235); */ } <?php @@ -45,58 +47,65 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { /* ============================================================================== */ div.divButAction { - margin-bottom: 1.4em; + margin-bottom: 1.4em; } div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete, div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete { - margin-bottom: 1.4em !important; + margin-bottom: 1.4em !important; } div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused { - margin-bottom: 0 !important; + margin-bottom: 0 !important; } span.butAction, span.butActionDelete { - cursor: pointer; + cursor: pointer; +} +.paginationafterarrows .butAction { + font-size: 0.9em; } - .butAction { - background: var(--butactionbg); - color: #FFF !important; - border-radius: 3px; - /* background: rgb(230, 232, 239); */ + background: var(--butactionbg); + color: #FFF !important; + /* background: rgb(230, 232, 239); */ +} +.butActionRefused, .butAction, .butActionDelete { + border-radius: 3px; +} +.butActionRefused:last-child, .butAction:last-child, .butActionDelete:last-child { + margin-<?php echo $right; ?>: 0px !important; } .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { - text-decoration: none; - text-transform: uppercase; - font-weight: bold; + text-decoration: none; + text-transform: uppercase; + font-weight: bold; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; - padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; - display: inline-block; - text-align: center; - cursor: pointer; - /* color: #fff; */ - /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ - color: #444; - /* border: 1px solid #aaa; */ - /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */ + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '1'); ?>em; + padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; + display: inline-block; + text-align: center; + cursor: pointer; + /* color: #fff; */ + /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ + color: #444; + /* 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-bottom-right-radius: 0 !important; - border-top-left-radius: 0 !important; - border-bottom-left-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;*/ } .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active { - text-decoration: none; - text-transform: uppercase; - font-weight: normal; + text-decoration: none; + text-transform: uppercase; + font-weight: normal; - margin: 0em 0.3em 0 0.3em !important; - padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em; - font-family: <?php print $fontlist ?>; - display: inline-block; - /* text-align: center; New button are on right of screen */ - cursor: pointer; + margin: 0em 0.3em 0 0.3em !important; + padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em; + font-family: <?php print $fontlist ?>; + display: inline-block; + /* text-align: center; New button are on right of screen */ + cursor: pointer; } .tableforfieldcreate a.butActionNew>span.fa-plus-circle, .tableforfieldcreate a.butActionNew>span.fa-plus-circle:hover, @@ -125,66 +134,66 @@ span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover } .butAction:hover { - -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); } .butActionNew:hover { - text-decoration: underline; - box-shadow: unset !important; + text-decoration: underline; + box-shadow: unset !important; } .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete { - background: var(--butactiondeletebg); - /* border: 1px solid #633; */ - color: #633; + background: var(--butactiondeletebg); + /* border: 1px solid #633; */ + color: #633; } .butActionDelete:hover { - -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); } .butActionRefused { - text-decoration: none !important; - text-transform: uppercase; - font-weight: bold !important; + text-decoration: none !important; + text-transform: uppercase; + font-weight: bold !important; - white-space: nowrap !important; - cursor: not-allowed !important; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; - padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; - font-family: <?php print $fontlist ?> !important; - display: inline-block; - text-align: center; - cursor: pointer; - color: #999 !important; - border: 1px solid #ccc; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + white-space: nowrap !important; + cursor: not-allowed !important; + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; + padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; + font-family: <?php print $fontlist ?> !important; + display: inline-block; + text-align: center; + cursor: pointer; + color: #999 !important; + border: 1px solid #ccc; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; } .butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active { - text-decoration: none !important; - text-transform: uppercase; - font-weight: normal !important; + text-decoration: none !important; + text-transform: uppercase; + font-weight: normal !important; - white-space: nowrap !important; - cursor: not-allowed !important; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em; - padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em; - font-family: <?php print $fontlist ?> !important; - display: inline-block; - /* text-align: center; New button are on right of screen */ - cursor: pointer; - color: #999 !important; - padding-top: 0.2em; - box-shadow: none !important; - -webkit-box-shadow: none !important; + white-space: nowrap !important; + cursor: not-allowed !important; + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em; + padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em; + font-family: <?php print $fontlist ?> !important; + display: inline-block; + /* text-align: center; New button are on right of screen */ + cursor: pointer; + color: #999 !important; + padding-top: 0.2em; + box-shadow: none !important; + -webkit-box-shadow: none !important; } .butActionTransparent { - color: #222 ! important; - background-color: transparent ! important; + color: #222 ! important; + background-color: transparent ! important; } @@ -193,37 +202,37 @@ TITLE BUTTON */ .btnTitle, a.btnTitle { - display: inline-block; - padding: 4px 4px 4px 4px; - font-weight: 400; - /* line-height: 1; */ - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - box-shadow: var(--btncolorbg); - text-decoration: none; - position: relative; - /* margin: 0 0 0 8px; */ - min-width: 72px; - text-align: center; - color: var(--btncolortext); - border: none; - font-size: 12px; - font-weight: 300; - background-color: var(--btncolorbg); + display: inline-block; + padding: 4px 4px 4px 4px; + font-weight: 400; + /* line-height: 1; */ + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + box-shadow: var(--btncolorbg); + text-decoration: none; + position: relative; + /* margin: 0 0 0 8px; */ + min-width: 72px; + text-align: center; + color: var(--btncolortext); + border: none; + font-size: 12px; + font-weight: 300; + background-color: var(--btncolorbg); border: 1px solid var(--btncolorborder); } a.btnTitle.btnTitleSelected { - border: 1px solid #ccc; - border-radius: 3px; + border: 1px solid #ccc; + border-radius: 3px; } .btnTitle > .btnTitle-icon{ @@ -231,45 +240,50 @@ a.btnTitle.btnTitleSelected { } .btnTitle > .btnTitle-label{ - color: #666666; + color: #666666; } .btnTitle:hover, a.btnTitle:hover { border: 1px solid #bbb; - border-radius: 3px; - position: relative; - text-align: center; - /* color: #ffffff; - background-color: rgb(<?php print $colortextlink; ?>); */ - font-size: 12px; - text-decoration: none; - box-shadow: none; + border-radius: 3px; + position: relative; + text-align: center; + /* color: #ffffff; + background-color: rgb(<?php print $colortextlink; ?>); */ + font-size: 12px; + text-decoration: none; + box-shadow: none; } .btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover { - color: #8a8a8a; - cursor: not-allowed; - background-color: #fbfbfb; - background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px ); + color: #8a8a8a; + cursor: not-allowed; + background-color: #fbfbfb; + background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px ); } .btnTitle:hover .btnTitle-label{ - color: var(--btncolorborderhover); + color: var(--btncolorborderhover); } .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{ - color: #8a8a8a; + color: #8a8a8a; } .btnTitle>.fa { - font-size: 20px; - display: block; + font-size: 20px; + display: block; } div.pagination li:first-child a.btnTitle{ - margin-left: 10px; + margin-left: 10px; } +.button-title-separator{ + display: inline-block; + clear: both; + width: 20px; +} .imgforviewmode { color: #aaa; @@ -282,15 +296,15 @@ div.pagination li:first-child a.btnTitle{ font-size: 0.95em; } .btnTitle, a.btnTitle { - display: inline-block; - padding: 4px 4px 4px 4px; + display: inline-block; + padding: 4px 4px 4px 4px; min-width: unset; } } <?php if (!empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?> .butActionRefused, .butActionNewRefused, .btnTitle.refused { - display: none !important; + display: none !important; } <?php } ?> diff --git a/htdocs/theme/eldy/ckeditor/index.html b/htdocs/theme/eldy/ckeditor/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 1140589a2e2..e0976e0e1db 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -1,63 +1,65 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > dont remove this line it's an ide hack */ /* * Dropdown of user popup */ button.dropdown-item.global-search-item { - outline: none; + outline: none; } .open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-quickadd, .open>.dropdown-menu, .dropdown dd ul.open { - display: block; + display: block; } .dropdown-search { - border-color: #eee; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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-bookmark { - border-color: #eee; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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-quickadd { border-color: #eee; @@ -83,107 +85,107 @@ button.dropdown-item.global-search-item { box-shadow: 0 6px 12px rgba(0,0,0,.175); } .dropdown-menu { - border-color: #eee; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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-toggle{ - text-decoration: none !important; + text-decoration: none !important; } .dropdown-toggle::after { - /* font part */ - font-family: "Font Awesome 5 Free"; - font-size: 0.7em; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - text-align:center; - text-decoration:none; - margin: auto 3px; - display: inline-block; - content: "\f078"; + /* font part */ + font-family: "Font Awesome 5 Free"; + font-size: 0.7em; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + text-align:center; + text-decoration:none; + margin: auto 3px; + display: inline-block; + content: "\f078"; - -webkit-transition: -webkit-transform .2s ease-in-out; - -ms-transition: -ms-transform .2s ease-in-out; - transition: transform .2s ease-in-out; + -webkit-transition: -webkit-transform .2s ease-in-out; + -ms-transition: -ms-transform .2s ease-in-out; + transition: transform .2s ease-in-out; } .open>.dropdown-toggle::after { - transform: rotate(180deg); + transform: rotate(180deg); } /* * MENU Dropdown */ .login_block.usedropdown .logout-btn{ - display: none; + display: none; } .tmenu .open.dropdown, .tmenu .open.dropdown { - background: rgba(0, 0, 0, 0.1); + background: rgba(0, 0, 0, 0.1); } .tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu { - position: absolute; - right: 2px; - <?php echo $left; ?>: auto; - line-height:1.3em; + position: absolute; + right: 2px; + <?php echo $left; ?>: auto; + line-height:1.3em; } .tmenu .dropdown-menu, .login_block .dropdown-menu .user-body { - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; } .user-body { - color: #333; + color: #333; } .side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu { - border-top-right-radius: 0; - border-top-left-radius: 0; - padding: 1px 0 0 0; - border-top-width: 0; - width: 300px; + border-top-right-radius: 0; + border-top-left-radius: 0; + padding: 1px 0 0 0; + border-top-width: 0; + width: 300px; } .topnav .user-menu .dropdown-menu { top: 50px; } .side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; } .side-nav-vert .user-menu .dropdown-menu > .user-header, .topnav .user-menu .dropdown-menu > .user-header { - min-height: 100px; - padding: 10px; - text-align: center; - white-space: normal; + min-height: 100px; + padding: 10px; + text-align: center; + white-space: normal; } #topmenu-global-search-dropdown .dropdown-menu{ - width: 300px; - max-width: 100%; + width: 300px; + max-width: 100%; } div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-quickadd-dropdown { @@ -192,184 +194,184 @@ div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-q <?php } ?> } a.top-menu-dropdown-link { - padding: 8px; + padding: 8px; } .dropdown-user-image { - border-radius: 50%; - vertical-align: middle; - z-index: 5; - height: 90px; - width: 90px; - border: 3px solid; - border-color: transparent; - border-color: rgba(255, 255, 255, 0.2); - max-width: 100%; - max-height :100%; + border-radius: 50%; + vertical-align: middle; + z-index: 5; + height: 90px; + width: 90px; + border: 3px solid; + border-color: transparent; + border-color: rgba(255, 255, 255, 0.2); + max-width: 100%; + max-height :100%; } .dropdown-menu > .user-header{ - background: var(--colorbackhmenu1); + background: var(--colorbackhmenu1); } .dropdown-menu .dropdown-header{ - padding: 8px 8px 8px 8px; + padding: 8px 8px 8px 8px; } .dropdown-menu > .user-footer { - border-top: 1px solid #f0f0f0; - background-color: #f9f9f9; - padding: 10px; + border-top: 1px solid #f0f0f0; + background-color: #f9f9f9; + padding: 10px; } .user-footer:after { - clear: both; + clear: both; } .dropdown-menu > .bookmark-footer{ - border-top: 1px solid #f0f0f0; - background-color: #f9f9f9; - padding: 10px; + border-top: 1px solid #f0f0f0; + background-color: #f9f9f9; + padding: 10px; } .dropdown-menu > .user-body, .dropdown-body{ - padding: 15px; - border-bottom: 1px solid #f4f4f4; - border-top: 1px solid #dddddd; - white-space: normal; + padding: 15px; + border-bottom: 1px solid #f4f4f4; + border-top: 1px solid #dddddd; + white-space: normal; } .dropdown-menu > .bookmark-body, .dropdown-body{ - overflow-y: auto; - max-height: 60vh ; /* fallback for browsers without support for calc() */ - max-height: calc(90vh - 110px) ; + overflow-y: auto; + max-height: 60vh ; /* fallback for browsers without support for calc() */ + max-height: calc(90vh - 110px) ; white-space: normal; } #topmenu-bookmark-dropdown .dropdown-menu > .bookmark-body, #topmenu-bookmark-dropdown .dropdown-body{ - max-height: 60vh ; /* fallback for browsers without support for calc() */ - max-height: calc(90vh - 200px) ; + max-height: 60vh ; /* fallback for browsers without support for calc() */ + max-height: calc(90vh - 200px) ; } .dropdown-body::-webkit-scrollbar { - width: 8px; - } + width: 8px; + } .dropdown-body::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - border-radius: 0; - /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ - background: #aaa; + -webkit-border-radius: 0; + border-radius: 0; + /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ + background: #aaa; } .dropdown-body::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); - -webkit-border-radius: 0; - border-radius: 0; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + -webkit-border-radius: 0; + border-radius: 0; } #topmenu-login-dropdown, #topmenu-bookmark-dropdown, #topmenu-global-search-dropdown { - padding: 0 5px 0 5px; + padding: 0 5px 0 5px; } #topmenu-login-dropdown a:hover{ - text-decoration: none; + text-decoration: none; } -#topmenuloginmoreinfo-btn{ - display: block; - text-aling: right; - color:#666; - cursor: pointer; +#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn { + display: block; + text-aling: right; + color:#666; + cursor: pointer; } -#topmenuloginmoreinfo{ - display: none; - clear: both; - font-size: 0.95em; +#topmenuloginmoreinfo, #topmenulogincompanyinfo { + display: none; + clear: both; + font-size: 0.95em; } .button-top-menu-dropdown { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: 400; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; } .user-footer .button-top-menu-dropdown { - color: #666666; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - border-width: 1px; - background-color: #f4f4f4; - border-color: #ddd; + color: #666666; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + border-width: 1px; + background-color: #f4f4f4; + border-color: #ddd; } .dropdown-menu a.top-menu-dropdown-link { - color: rgb(<?php print $colortextlink; ?>) !important; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - display: block; - margin: 5px 0px; + color: rgb(<?php print $colortextlink; ?>) !important; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + display: block; + margin: 5px 0px; } .dropdown-item { - display: block !important; - box-sizing: border-box; - width: 100%; - padding: .3em 1.5em .4em 1em; - clear: both; - font-weight: 400; - color: #212529 !important; - text-align: inherit; - background-color: transparent; - border: 0; + display: block !important; + box-sizing: border-box; + width: 100%; + padding: .3em 1.5em .4em 1em; + clear: both; + font-weight: 400; + color: #212529 !important; + text-align: inherit; + background-color: transparent; + border: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; } .dropdown-item::before { - /* font part */ - font-family: "Font Awesome 5 Free"; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - text-align:center; - text-decoration:none; - margin-right: 5px; - display: inline-block; - content: "\f0da"; - /* color: rgba(0,0,0,0.3); */ + /* font part */ + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + text-align:center; + text-decoration:none; + margin-right: 5px; + display: inline-block; + content: "\f0da"; + /* color: rgba(0,0,0,0.3); */ } .dropdown-item.bookmark-item-external::before { content: "\f35d"; } .dropdown-item.active, .dropdown-item:hover, .dropdown-item:focus { - color: #<?php echo $colortextbackhmenu; ?> !important; - text-decoration: none; - background: rgb(<?php echo $colorbackhmenu1 ?>); + color: #<?php echo $colortextbackhmenu; ?> !important; + text-decoration: none; + background: rgb(<?php echo $colorbackhmenu1 ?>); } /* @@ -377,34 +379,34 @@ a.top-menu-dropdown-link { */ .dropdown-search-input { - width: 100%; - padding: 10px 35px 10px 20px; + width: 100%; + padding: 10px 35px 10px 20px; - background-color: transparent; - /*font-size: 14px; - line-height: 16px;*/ - box-sizing: border-box; + background-color: transparent; + /*font-size: 14px; + line-height: 16px;*/ + box-sizing: border-box; - color: #575756; - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-size: 16px 16px; - background-position: 95% center; - border-radius: 10px; - border: 1px solid #c4c4c2 !important; - transition: all 250ms ease-in-out; - backface-visibility: hidden; - transform-style: preserve-3d; + color: #575756; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-size: 16px 16px; + background-position: 95% center; + border-radius: 10px; + border: 1px solid #c4c4c2 !important; + transition: all 250ms ease-in-out; + backface-visibility: hidden; + transform-style: preserve-3d; } .dropdown-search-input::placeholder { - color: color(#575756 a(0.8)); - letter-spacing: 1.5px; + color: color(#575756 a(0.8)); + letter-spacing: 1.5px; } .hidden-search-result{ - display: none !important; + display: none !important; } /* @@ -468,11 +470,11 @@ div.quickaddblock:focus { @media only screen and (max-width: 767px) { .dropdown-search-input { - width: 100%; + width: 100%; } .tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu { - margin-left: 5px; - right: 0; - } + margin-left: 5px; + right: 0; + } } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d6bf65947dd..3622d77de2f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1,4 +1,6 @@ -<?php if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +<?php if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ /* ============================================================================== */ @@ -19,6 +21,7 @@ --colorbacklinepairchecked: rgb(<?php print $colorbacklinepairchecked; ?>); --colorbacklinebreak: rgb(<?php print $colorbacklinebreak; ?>); --colorbackbody: rgb(<?php print $colorbackbody; ?>); + --colorbackmobilemenu: #f8f8f8; --colortexttitlenotab: rgb(<?php print $colortexttitlenotab; ?>); --colortexttitlenotab2: rgb(<?php print $colortexttitlenotab2; ?>); --colortexttitle: rgba(<?php print $colortexttitle; ?>, 0.9); @@ -43,6 +46,8 @@ --amountremaintopaycolor:#880000; --amountpaymentcomplete:#008800; --amountremaintopaybackcolor:none; + --productlinestockod: #002200; + --productlinestocktoolow: #884400; } <?php @@ -55,7 +60,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { --colorbackhmenu1: #1d1e20; --colorbackvmenu1: #2b2c2e; --colorbacktitle1: #2b2d2f; - --colorbacktabcard1: #38393d; + --colorbacktabcard1: #1d1e20; /* Must be same than colorbackbody */ --colorbacktabactive: rgb(220,220,220); --colorbacklineimpair1: #38393d; --colorbacklineimpair2: #2b2d2f; @@ -64,6 +69,7 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { --colorbacklinepairhover: #2b2d2f; --colorbacklinepairchecked: #0e5ccd; --colorbackbody: #1d1e20; + --colorbackmobilemenu: #080808; --tooltipbgcolor: #2b2d2f; --colortexttitlenotab: rgb(220,220,220); --colortexttitlenotab2: rgb(220,220,220); @@ -87,7 +93,11 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) { --amountremaintopaycolor:rgb(252,84,91); --amountpaymentcomplete:rgb(101,184,77); --amountremaintopaybackcolor:rbg(245,130,46); - }\n"; + } + + body, button { + color: #bbb; + }\n"; if ($conf->global->THEME_DARKMODEENABLED != 2) { print "}\n"; } @@ -101,12 +111,13 @@ body { font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize; ?>; line-height: 1.4; font-family: <?php print $fontlist ?>; - margin-top: 0; - margin-bottom: 0; - margin-right: 0; - margin-left: 0; - font-weight: 400; - <?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?> + margin-top: 0; + margin-bottom: 0; + margin-right: 0; + margin-left: 0; + font-weight: 400; + background-color: var(--colorbackbody); + <?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?> } /* Style used to protect html content in output to avoid attack by replacing full page with js content */ @@ -125,6 +136,10 @@ th.liste_titre a div div:hover, th.liste_titre_sel a div div:hover { text-decora tr.liste_titre th.liste_titre_sel:not(.maxwidthsearch), tr.liste_titre td.liste_titre_sel:not(.maxwidthsearch), tr.liste_titre th.liste_titre:not(.maxwidthsearch), tr.liste_titre td.liste_titre:not(.maxwidthsearch) { opacity: 0.8; } /* th.liste_titre_sel a, th.liste_titre a, td.liste_titre_sel a, td.liste_titre a { color: #766; } */ + +input { + font-size: unset; +} input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { background-color: var(--inputbackgroundcolor); color: var(--colortext); @@ -134,10 +149,10 @@ select.vmenusearchselectcombo { } table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) { - overflow: hidden; - white-space: nowrap; - max-width: 100px; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + max-width: 100px; + text-overflow: ellipsis; } .liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth], .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], @@ -160,23 +175,26 @@ input[type=submit], input[type=submit]:hover { margin-left: 5px; } input[type=checkbox], input[type=radio] { - margin: 0 3px 0 3px; + margin: 0 3px 0 3px; } input, input.flat, form.flat select, select, select.flat, .dataTables_length label select { border: none; } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { - font-family: <?php print $fontlist ?>; - outline: none; - margin: 0px 0px 0px 0px; - border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); + font-family: <?php print $fontlist ?>; + outline: none; + margin: 0px 0px 0px 0px; + border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); } input { - line-height: 1.3em; - padding: 5px; + line-height: 1.3em; + padding: 4px; padding-left: 5px; } +.liste_titre input { + padding: 5px; +} select { padding-top: 5px; padding-right: 4px; @@ -192,26 +210,29 @@ input, select { background: var(--butactionbg); color: #FFF !important; border-radius: 3px; - border-collapse: collapse; - border: none; + border-collapse: collapse; + border: none; } #mainbody span.websitetools input.button:not(.buttongen):not(.bordertransp) { - color: #000 !important; + color: #000 !important; } #mainbody input.buttongen, #mainbody button.buttongen { padding: 3px 4px; } - +input.button:hover { + -webkit-box-shadow: 0px 0px 6px 1px rgb(50 50 50 / 40%), 0px 0px 0px rgb(60 60 60 / 10%); + box-shadow: 0px 0px 6px 1px rgb(50 50 50 / 40%), 0px 0px 0px rgb(60 60 60 / 10%); +} input.button:focus { border-bottom: 0; } input.button.massactionconfirmed { - margin: 4px; + margin: 4px; } input:invalid, select:invalid { - border-color: #ea1212; + border-color: #ea1212; } /* Focus definitions must be after standard definition */ @@ -226,7 +247,7 @@ textarea.cke_source:focus box-shadow: none; } div#cke_dp_desc { - margin-top: 5px; + margin-top: 5px; } textarea { border-radius: 0; @@ -272,7 +293,7 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment { max-width: 350px; } div.buttonpayment input:focus { - color: #008; + color: #008; } .buttonpaymentsmall { font-size: 0.65em; @@ -280,12 +301,12 @@ div.buttonpayment input:focus { padding-right: 5px; } div.buttonpayment input { - background-color: unset; - color: #fff; - border-bottom: unset; - font-weight: bold; - text-transform: uppercase; - cursor: pointer; + background-color: unset; + color: #fff; + border-bottom: unset; + font-weight: bold; + text-transform: uppercase; + cursor: pointer; } input.buttonpaymentcb { background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png', 1) ?>); @@ -322,17 +343,17 @@ input.buttonpaymentstripe { a.butStatus { padding-left: 5px; padding-right: 5px; - background-color: transparent; - color: var(--colortext) !important; - border: 2px solid var( --butactionbg); - margin: 0 0.45em !important; + background-color: transparent; + color: var(--colortext) !important; + border: 2px solid var( --butactionbg); + margin: 0 0.45em !important; } /* Used by timesheets */ span.timesheetalreadyrecorded input { - border: none; - border-bottom: solid 1px rgba(0,0,0,0.4); - margin-right: 1px !important; + border: none; + border-bottom: solid 1px rgba(0,0,0,0.4); + margin-right: 1px !important; } td.onholidaymorning, td.onholidayafternoon { background-color: #fdf6f2; @@ -355,16 +376,19 @@ td.rightborder { border-right: 1px solid #ccc; } +td.amount, span.amount, div.amount { + color: #006666; +} td.actionbuttons a { - padding-left: 6px; + padding-left: 6px; } select.flat, form.flat select, .pageplusone { font-weight: normal; font-size: unset; } input.pageplusone { - padding-bottom: 4px; - padding-top: 4px; + padding-bottom: 4px; + padding-top: 4px; } .saturatemedium { @@ -384,7 +408,7 @@ input.pageplusone { opacity: 0.6; } .opacityhigh { - opacity: 0.2; + opacity: 0.24; } .opacitytransp { opacity: 0; @@ -393,17 +417,17 @@ input.pageplusone { color: #fff; } .colorgrey { - color: #888 !important; + color: #888 !important; } .colorblack { color: #000; } .vmirror { - transform: scale(1, -1); + transform: scale(1, -1); } .hmirror { - transform: scale(-1, 1); + transform: scale(-1, 1); } select:invalid { @@ -430,7 +454,7 @@ input[type=file ] { border-left: none; border-right: none; <?php } ?> - border<?php echo empty($conf->global->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); + border<?php echo empty($conf->global->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; } @@ -440,8 +464,12 @@ input:-webkit-autofill { background-image:none !important; -webkit-box-shadow: 0 0 0 50px #FDFFF0 inset; } -::-webkit-input-placeholder { color:#ccc; } -input:-moz-placeholder { color:#ccc; } + +/* CSS for placeholder */ +.placeholder { color: #ccc; } +::-webkit-input-placeholder { color: #ccc; } +input:-moz-placeholder { color: #ccc; } + input[name=price], input[name=weight], input[name=volume], input[name=surface], input[name=sizeheight], input[name=net_measure], select[name=incoterm_id] { margin-right: 6px; } fieldset { border: 1px solid #AAAAAA !important; } .legendforfieldsetstep { padding-bottom: 10px; } @@ -451,11 +479,12 @@ input#onlinepaymenturl, input#directdownloadlink { .formconsumeproduce { background: #f3f3f3; - padding: 20px 0px 0px 0px; + padding: 20px 0px 0px 0px; + border-radius: 8px; } div#moretabsList, div#moretabsListaction { - z-index: 5; + z-index: 5; } hr { border: 0; border-top: 1px solid #ccc; } @@ -489,6 +518,12 @@ hr { border: 0; border-top: 1px solid #ccc; } text-transform: uppercase; color: #444; } +.valuefield .button, .valuefieldcreate .button, .refidno .button { + margin-top: 0 !important; + margin-bottom: 0 !important; + font-size: 0.85em !important; + padding: 5px !important; +} .button:focus, .buttonDelete:focus { -webkit-box-shadow: 0px 0px 5px 1px rgba(0, 0, 60, 0.2), 0px 0px 0px rgba(60,60,60,0.1); box-shadow: 0px 0px 5px 1px rgba(0, 0, 60, 0.2), 0px 0px 0px rgba(60,60,60,0.1); @@ -500,38 +535,38 @@ hr { border: 0; border-top: 1px solid #ccc; } } .button:disabled, .buttonDelete:disabled, .button.disabled { opacity: 0.4; - box-shadow: none; - -webkit-box-shadow: none; - cursor: auto; + box-shadow: none; + -webkit-box-shadow: none; + cursor: auto; } .buttonRefused { pointer-events: none; - cursor: default; + cursor: default; opacity: 0.4; - box-shadow: none; - -webkit-box-shadow: none; + box-shadow: none; + -webkit-box-shadow: none; } .button_search, .button_removefilter { - border: unset; - background-color: unset; + border: unset; + background-color: unset; } .button_search:hover, .button_removefilter:hover { - cursor: pointer; + cursor: pointer; } form { - padding:0px; - margin:0px; + padding:0px; + margin:0px; } form#addproduct { - padding-top: 10px; + padding-top: 10px; } div.float, span.floatleft { - float:<?php print $left; ?>; + float:<?php print $left; ?>; } div.floatright { - float:<?php print $right; ?>; + float:<?php print $right; ?>; } .block { @@ -542,23 +577,25 @@ div.floatright display:inline-block; } .largenumber { - font-size: 1.4em; + font-size: 1.4em; } button[name='button_search_x'] span.fa.fa-search { - font-size: 1.3em; + font-size: 1.3em; } button[name='button_removefilter_x'] span.fa.fa-remove { - opacity: 0.5; - font-size: 1.3em; + opacity: 0.5; + font-size: 1.3em; } button:focus { outline: none; } - +.fa-info-circle { + padding-<?php echo $left; ?>: 3px; +} th .button { - -webkit-box-shadow: none !important; - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; -webkit-border-radius:0px !important; border-radius:0px !important; } @@ -597,27 +634,27 @@ textarea.centpercent { width: 96%; } .small, small { - font-size: 85%; + font-size: 85%; } .h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small { - font-size: 65%; + font-size: 65%; } .h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, .h4 .small, .h4 small, .h5 .small, .h5 small, .h6 .small, .h6 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small, h4 .small, h4 small, h5 .small, h5 small, h6 .small, h6 small { - font-weight: 400; - line-height: 1; - color: #777; + font-weight: 400; + line-height: 1; + color: #777; } .flip { - transform: scaleX(-1); + transform: scaleX(-1) translate(2px, 0); } .center { - text-align: center; - margin: 0px auto; + text-align: center; + margin: 0px auto; } .alignstart { - text-align: start; + text-align: start; } .left { text-align: <?php print $left; ?>; @@ -629,10 +666,10 @@ textarea.centpercent { text-align: justify; } .pull-left { - float: left!important; + float: left!important; } .pull-right { - float: right!important; + float: right!important; } .nowrap { white-space: <?php print ($dol_optimize_smallscreen ? 'normal' : 'nowrap'); ?>; @@ -668,7 +705,7 @@ textarea.centpercent { text-transform: uppercase; } .nounderline { - text-decoration: none; + text-decoration: none; } .nopadding { padding: 0; @@ -691,6 +728,9 @@ textarea.centpercent { .paddingright2 { padding-<?php print $right; ?>: 2px; } +.paddingright2imp { + padding-<?php print $right; ?>: 2px !important; +} .paddingtop { padding-top: 4px; } @@ -722,48 +762,80 @@ textarea.centpercent { cursor: not-allowed; } .backgroundblank { - background-color: #fff; + background-color: #fff; } .nobackground, .nobackground tr { background: unset !important; } .checkboxattachfilelabel { - font-size: 0.85em; - opacity: 0.7; + font-size: 0.85em; + opacity: 0.7; } .borderimp { border: 1px solid #888 !important; } .text-warning{ - color : <?php print $textWarning; ?> + color : <?php print $textWarning; ?> } .longmessagecut { - max-height: 250px; - max-width: 100%; - overflow-y: auto; + max-height: 250px; + max-width: 100%; + overflow-y: auto; +} +div.urllink { + padding: 5px; + margin-top: 5px; + margin-bottom: 5px; + /* border: 1px solid #ccc; */ + border-radius: 5px; + /* width: fit-content; */ + background-color: #f0f0f8; + opacity: 0.8; +} +div.urllink, div.urllink a { + color: #339 !important; +} + +i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { + color: #888 !important; + opacity: 0.4; + padding-<?php echo $left; ?>: 3px; +} +.stockmovemententry { + color: #080; + transform: rotate(0.25turn); + font-size: 1.2em; +} +.stockmovementexit { + color: #968822; + transform: rotate(0.3turn); + font-size: 1.2em; +} +.stockmovement { + font-size: 1.4em; } body[class*="colorblind-"] .text-warning{ - color : <?php print $colorblind_deuteranopes_textWarning; ?> + color : <?php print $colorblind_deuteranopes_textWarning; ?> } .text-success{ - color : <?php print $textSuccess; ?> + color : <?php print $textSuccess; ?> } body[class*="colorblind-"] .text-success{ - color : <?php print $colorblind_deuteranopes_textSuccess; ?> + color : <?php print $colorblind_deuteranopes_textSuccess; ?> } .text-danger{ - color : <?php print $textDanger; ?> + color : <?php print $textDanger; ?> } .editfielda span.fa-pencil-alt, .editfielda span.fa-pencil-ruler, .editfielda span.fa-trash, .editfielda span.fa-crop, .editfieldlang { - color: #ccc !important; + color: #ccc !important; } .editfielda span.fa-pencil-alt:hover, .editfielda span.fa-pencil-ruler:hover, .editfielda span.fa-trash:hover, .editfielda span.fa-crop:hover, .editfieldlang:hover { - color: var(--colortexttitle) !important; + color: var(--colortexttitle) !important; } .fawidth30 { width: 20px; @@ -773,9 +845,9 @@ body[class*="colorblind-"] .text-success{ } span.fa.fa-plus-circle.paddingleft { - padding-right: 4px; - padding-top: 3px; - padding-bottom: 2px; + padding-right: 4px; + padding-top: 3px; + padding-bottom: 2px; } .size15x { font-size: 1.5em !important; } @@ -790,18 +862,22 @@ span.fa.fa-plus-circle.paddingleft { /* Themes for badges */ - <?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?> +<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?> .borderrightlight { border-right: 1px solid #DDD; } +.borderleftlight +{ + border-left: 1px solid #DDD; +} #formuserfile { margin-top: 4px; } #formuserfile input[type='file'] { - font-size: 1em; - /* opacity: 0.5em; */ + font-size: 1em; + /* opacity: 0.5em; */ } /*#formuserfile input[type='file']:valid { color: #a00; @@ -814,56 +890,56 @@ span.fa.fa-plus-circle.paddingleft { margin-left: 1px; } #formuserfile_link input[type='text'] { - font-size: 1em; + font-size: 1em; } .listofinvoicetype { height: 28px; vertical-align: middle; } .divsocialnetwork:not(:first-child) { - padding-left: 20px; + padding-left: 20px; } div.divsearchfield { float: <?php print $left; ?>; margin-<?php print $right; ?>: 12px; - margin-<?php print $left; ?>: 2px; + margin-<?php print $left; ?>: 2px; margin-top: 4px; - margin-bottom: 4px; - padding-left: 2px; + margin-bottom: 4px; + padding-left: 2px; } .divsearchfieldfilter { - text-overflow: clip; - overflow: auto; - padding-bottom: 5px; - opacity: 0.6; + text-overflow: clip; + overflow: auto; + padding-bottom: 5px; + opacity: 0.6; } .divadvancedsearchfield:first-child { - margin-top: 3px; + margin-top: 3px; } .divadvancedsearchfield { - float: left; - padding-left: 15px; - padding-right: 15px; - padding-bottom: 2px; - padding-top: 2px; + float: left; + padding-left: 15px; + padding-right: 15px; + padding-bottom: 2px; + padding-top: 2px; } .divadvancedsearchfield span.select2.select2-container.select2-container--default { padding-bottom: 4px; } .search_component_params { /*display: flex; */ - -webkit-flex-flow: row wrap; - flex-flow: row wrap; - background: #fff; - padding-top: 3px; - padding-bottom: 3px; - padding-left: 10px; - padding-right: 10px; - border-bottom: solid 1px rgba(0,0,0,.2); - height: 24px; + -webkit-flex-flow: row wrap; + flex-flow: row wrap; + background: #fff; + padding-top: 3px; + padding-bottom: 3px; + padding-left: 10px; + padding-right: 10px; + border-bottom: solid 1px rgba(0,0,0,.2); + height: 24px; } .search_component_searchtext { - padding-top: 2px; + padding-top: 2px; } .search_component_params_text, .search_component_params_text:focus { border-bottom: none; @@ -873,16 +949,16 @@ div.divsearchfield { } .a-filter, .a-mesure { - border-radius: 50px; - background: var(--colortexttitlenotab); - color: #fff; - padding: 8px 10px 8px 6px; + border-radius: 50px; + background: var(--colortexttitlenotab); + color: #fff; + padding: 8px 10px 8px 6px; } .a-filter:before { - content: "\f0b0"; + content: "\f0b0"; } .a-mesure:before { - content: "\f080"; + content: "\f080"; } .a-filter:before, .a-mesure:before { font-family: "Font Awesome 5 Free"; @@ -891,10 +967,10 @@ div.divsearchfield { padding-left: 5px; } .a-filter-disabled, .a-mesure-disabled { - border-radius: 50px; - background: var(--colorbacktitle1); - padding: 8px; - opacity: 0.6; + border-radius: 50px; + background: var(--colorbacktitle1); + padding: 8px; + opacity: 0.6; } div.div-for-modal { @@ -905,9 +981,22 @@ div.div-for-modal { 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; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 100; +} + +div.div-for-modal-topright { + /* display: none; */ + position: fixed; + top: 0; + right: 0; + width:50%; /* adjust as per your needs */ + height:250px; /* adjust as per your needs */ + background: #fff; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 1100; } <?php @@ -915,7 +1004,7 @@ div.div-for-modal { if ($conf->browser->layout == 'phone') { ?> .divsearchfieldfilter { - white-space: nowrap; + white-space: nowrap; } <?php } ?> div.confirmmessage { @@ -942,12 +1031,12 @@ ul.attendees li { padding-bottom: 10px; } .checkallactions { - margin-left: 2px; /* left must be same than right to keep checkbox centered */ - margin-right: 2px; /* left must be same than right to keep checkbox centered */ - vertical-align: middle; + margin-left: 2px; /* left must be same than right to keep checkbox centered */ + margin-right: 2px; /* left must be same than right to keep checkbox centered */ + vertical-align: middle; } select.flat.selectlimit { - max-width: 62px; + max-width: 62px; } .selectlimit, .marginrightonly { margin-right: 10px !important; @@ -974,16 +1063,16 @@ select.flat.selectlimit { margin-bottom: 3px !important; } .nomargintop { - margin-top: 0 !important; + margin-top: 0 !important; } .nomarginbottom { - margin-bottom: 0 !important; + margin-bottom: 0 !important; } .selectlimit, .selectlimit:focus { - border-left: none !important; - border-top: none !important; - border-right: none !important; - outline: none; + border-left: none !important; + border-top: none !important; + border-right: none !important; + outline: none; } .strikefordisabled { text-decoration: line-through; @@ -996,69 +1085,81 @@ select.flat.selectlimit { text-overflow: none; } .tdoverflow { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 50px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 50px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax100 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax100imp { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px !important; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 100px !important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax125 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 125px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 125px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 150px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 150px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax200 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax300 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 300px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.tdoverflowmax400 { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 400px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.tdoverflowmax500 { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 500px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowauto { - max-width: 0; - overflow: auto; + max-width: 0; + overflow: auto; } .divintowithtwolinesmax { - width: 75px; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; + width: 75px; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; } .twolinesmax { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; } .tablelistofcalendars { @@ -1067,8 +1168,8 @@ select.flat.selectlimit { /* Styles for amount on card */ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaintopay { - padding-top: 0px; - padding-bottom: 0px; + padding-top: 0px; + padding-bottom: 0px; } .amountalreadypaid { } @@ -1093,10 +1194,10 @@ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaint } .onlinepaymentbody .amountpaymentcomplete { - background-color: var(--amountpaymentcomplete); - color: #fff; - padding: 5px; - border-radius: 5px; + background-color: var(--amountpaymentcomplete); + color: #fff; + padding: 5px; + border-radius: 5px; } .savingdocmask { @@ -1104,19 +1205,19 @@ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaint margin-bottom: 12px; } #builddoc_form ~ .showlinkedobjectblock { - margin-top: 20px; + margin-top: 20px; } /* For the long description of module */ .moduledesclong p img, .moduledesclong p a img { - max-width: 90% !important; - height: auto !important; + max-width: 90% !important; + height: auto !important; } .imgdoc { - margin: 18px; - border: 1px solid #ccc; - box-shadow: 1px 1px 25px #aaa; - max-width: calc(100% - 56px); + margin: 18px; + border: 1px solid #ccc; + box-shadow: 1px 1px 25px #aaa; + max-width: calc(100% - 56px); } .fa-file-text-o, .fa-file-code-o, .fa-file-powerpoint-o, .fa-file-excel-o, .fa-file-word-o, .fa-file-o, .fa-file-image-o, .fa-file-video-o, .fa-file-audio-o, .fa-file-archive-o, .fa-file-pdf-o { color: #055; @@ -1128,51 +1229,53 @@ table.paymenttable td.amountpaymentcomplete, table.paymenttable td.amountremaint /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */ /*.table-responsive { - width: calc(100% - 330px); - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; + width: calc(100% - 330px); + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; }*/ /* Style used for most tables */ .div-table-responsive, .div-table-responsive-no-min { - overflow-x: auto; - min-height: 0.01%; + overflow-x: auto; + min-height: 0.01%; } .div-table-responsive { - line-height: 120%; + line-height: 120%; } /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; + overflow-x: auto; } div.fiche>form>div.div-table-responsive { - min-height: 392px; + min-height: 392px; } div.fiche>div.tabBar>form>div.div-table-responsive { - min-height: 392px; + min-height: 392px; } div.fiche { /* text-align: justify; */ } .flexcontainer { - <?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) echo 'display: inline-flex;'."\n"; ?> - flex-flow: row wrap; - justify-content: flex-start; + <?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) { + echo 'display: inline-flex;'."\n"; + } ?> + flex-flow: row wrap; + justify-content: flex-start; } .thumbstat { - min-width: 148px; + min-width: 148px; } .thumbstat150 { - min-width: 168px; - max-width: 169px; - /* width: 168px; If I use with, there is trouble on size of flex boxes solved with min+max that is a little bit higer than min */ + min-width: 168px; + max-width: 169px; + /* width: 168px; If I use with, there is trouble on size of flex boxes solved with min+max that is a little bit higer than min */ } .thumbstat, .thumbstat150 { <?php if ($conf->browser->name == 'ie') { ?> - min-width: 150px; - width: 100%; - display: inline; + min-width: 150px; + width: 100%; + display: inline; <?php } else { ?> flex-grow: 1; flex-shrink: 0; @@ -1187,7 +1290,7 @@ select.selectarrowonleft option { } table[summary="list_of_modules"] .fa-cog { - font-size: 1.5em; + font-size: 1.5em; } .linkedcol-element { @@ -1223,24 +1326,24 @@ table[summary="list_of_modules"] .fa-cog { { .width20 { width: 20px; } .width25 { width: 25px; } - .width50 { width: 50px; } - .width75 { width: 75px; } - .width100 { width: 100px; } - .width200 { width: 200px; } - .minwidth100 { min-width: 100px; } - .minwidth150 { min-width: 150px; } - .minwidth200 { min-width: 200px; } - .minwidth300 { min-width: 300px; } - .minwidth400 { min-width: 400px; } - .minwidth500 { min-width: 500px; } - .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth200imp { min-width: 200px !important; } - .minwidth250imp { min-width: 250px !important; } - .minwidth300imp { min-width: 300px !important; } - .minwidth400imp { min-width: 400px !important; } - .minwidth500imp { min-width: 500px !important; } + .width50 { width: 50px; } + .width75 { width: 75px; } + .width100 { width: 100px; } + .width200 { width: 200px; } + .minwidth100 { min-width: 100px; } + .minwidth150 { min-width: 150px; } + .minwidth200 { min-width: 200px; } + .minwidth300 { min-width: 300px; } + .minwidth400 { min-width: 400px; } + .minwidth500 { min-width: 500px; } + .minwidth50imp { min-width: 50px !important; } + .minwidth75imp { min-width: 75px !important; } + .minwidth100imp { min-width: 100px !important; } + .minwidth200imp { min-width: 200px !important; } + .minwidth250imp { min-width: 250px !important; } + .minwidth300imp { min-width: 300px !important; } + .minwidth400imp { min-width: 400px !important; } + .minwidth500imp { min-width: 500px !important; } } .widthauto { width: auto; } .width20 { width: 20px; } @@ -1251,6 +1354,9 @@ table[summary="list_of_modules"] .fa-cog { .width125 { width: 125px; } .width150 { width: 150px; } .width200 { width: 200px; } +.width300 { width: 300px; } +.width400 { width: 400px; } +.width500 { width: 500px; } .maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } @@ -1292,16 +1398,16 @@ table[summary="list_of_modules"] .fa-cog { .titlefield { /* width: 30% !important; */ } .titlefieldcreate { width: 30% !important; } .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 150px !important; } - .minwidth200imp { min-width: 200px !important; } - .minwidth250imp { min-width: 250px !important; } - .minwidth300imp { min-width: 300px !important; } - .minwidth400imp { min-width: 300px !important; } - .minwidth500imp { min-width: 300px !important; } + .minwidth75imp { min-width: 75px !important; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 150px !important; } + .minwidth200imp { min-width: 200px !important; } + .minwidth250imp { min-width: 250px !important; } + .minwidth300imp { min-width: 300px !important; } + .minwidth400imp { min-width: 300px !important; } + .minwidth500imp { min-width: 300px !important; } - .linkedcol-element { + .linkedcol-element { min-width: unset; } } @@ -1309,16 +1415,16 @@ table[summary="list_of_modules"] .fa-cog { /* Force values for small screen 1000 */ @media only screen and (max-width: 1000px) { - .maxwidthonsmartphone { max-width: 100px; } + .maxwidthonsmartphone { max-width: 100px; } .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 110px !important; } - .minwidth200imp { min-width: 110px !important; } - .minwidth250imp { min-width: 115px !important; } - .minwidth300imp { min-width: 120px !important; } - .minwidth400imp { min-width: 150px !important; } - .minwidth500imp { min-width: 250px !important; } + .minwidth75imp { min-width: 75px !important; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 110px !important; } + .minwidth200imp { min-width: 110px !important; } + .minwidth250imp { min-width: 115px !important; } + .minwidth300imp { min-width: 120px !important; } + .minwidth400imp { min-width: 150px !important; } + .minwidth500imp { min-width: 250px !important; } } select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx { @@ -1337,16 +1443,16 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select font-size: <?php print is_numeric($fontsize) ? ($fontsize + 3).'px' : $fontsize; ?> !important; } .divadvancedsearchfield { - padding-left: 5px; - padding-right: 5px; - } - - div.divphotoref { - padding-right: 10px !important; + padding-left: 5px; + padding-right: 5px; } - .hideonsmartphone { display: none; } - .hideonsmartphoneimp { display: none !important; } + div.divphotoref { + padding-right: 10px !important; + } + + .hideonsmartphone { display: none; } + .hideonsmartphoneimp { display: none !important; } span.pictotitle { margin-<?php echo $left; ?>: 0 !important; @@ -1368,17 +1474,17 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select width: auto !important; } .poweredbypublicpayment { - float: unset !important; + float: unset !important; top: unset !important; - bottom: 8px; - position: relative !important; - } - .poweredbyimg { - width: 48px; - } - input.buttonpayment, button.buttonpayment, div.buttonpayment { - min-width: 270px; - } + bottom: 8px; + position: relative !important; + } + .poweredbyimg { + width: 48px; + } + input.buttonpayment, button.buttonpayment, div.buttonpayment { + min-width: 270px; + } } /* Force values for small screen 570 */ @@ -1404,31 +1510,31 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select .divmainbodylarge { margin-left: 20px !important; margin-right: 20px !important; } - .tdoverflowonsmartphone { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .tdoverflowonsmartphone { + max-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } - .tdoverflowmax150onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .tdoverflowmax150onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { + height: 40px !important; } - .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { - height: 40px !important; - } - .quatrevingtpercent, .inputsearch { - width: 95%; - } + .quatrevingtpercent, .inputsearch { + width: 95%; + } select { padding-top: 4px; @@ -1440,36 +1546,36 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select } input, input[type=text], input[type=password], select, textarea { min-width: 20px; - } - .trinputlogin input[type=text], input[type=password] { + } + .trinputlogin input[type=text], input[type=password] { max-width: 140px; } - .vmenu .searchform input { + .vmenu .searchform input { max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */ } - .noenlargeonsmartphone { width : 50px !important; display: inline !important; } - .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } - .maxwidth50onsmartphone { max-width: 40px; } - .maxwidth75onsmartphone { max-width: 50px; } - .maxwidth100onsmartphone { max-width: 70px; } - .maxwidth150onsmartphone { max-width: 120px; } - .maxwidth150onsmartphoneimp { max-width: 120px !important; } - .maxwidth200onsmartphone { max-width: 200px; } - .maxwidth250onsmartphone { max-width: 250px; } - .maxwidth300onsmartphone { max-width: 300px; } - .maxwidth400onsmartphone { max-width: 400px; } + .noenlargeonsmartphone { width : 50px !important; display: inline !important; } + .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } + .maxwidth50onsmartphone { max-width: 40px; } + .maxwidth75onsmartphone { max-width: 50px; } + .maxwidth100onsmartphone { max-width: 70px; } + .maxwidth150onsmartphone { max-width: 120px; } + .maxwidth150onsmartphoneimp { max-width: 120px !important; } + .maxwidth200onsmartphone { max-width: 200px; } + .maxwidth250onsmartphone { max-width: 250px; } + .maxwidth300onsmartphone { max-width: 300px; } + .maxwidth400onsmartphone { max-width: 400px; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 110px !important; } - .minwidth200imp { min-width: 110px !important; } - .minwidth250imp { min-width: 115px !important; } - .minwidth300imp { min-width: 120px !important; } - .minwidth400imp { min-width: 150px !important; } - .minwidth500imp { min-width: 250px !important; } - .titlefield { width: auto; } - .titlefieldcreate { width: auto; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 110px !important; } + .minwidth200imp { min-width: 110px !important; } + .minwidth250imp { min-width: 115px !important; } + .minwidth300imp { min-width: 120px !important; } + .minwidth400imp { min-width: 150px !important; } + .minwidth500imp { min-width: 250px !important; } + .titlefield { width: auto; } + .titlefieldcreate { width: auto; } #tooltip { position: absolute; @@ -1484,38 +1590,38 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select div.divphotoref { padding-<?php echo $right; ?>: 5px; - padding-bottom: 5px; + padding-bottom: 5px; + } + img.photoref, div.photoref { + border: 1px solid rgba(0, 0, 0, 0.2); + box-shadow: none; + -webkit-box-shadow: none; + padding: 4px; + height: 20px; + width: 20px; + object-fit: contain; } - img.photoref, div.photoref { - border: 1px solid rgba(0, 0, 0, 0.2); - box-shadow: none; - -webkit-box-shadow: none; - padding: 4px; - height: 20px; - width: 20px; - object-fit: contain; - } div.statusref { - padding-right: 10px; - } + padding-right: 10px; + } div.statusref img { - padding-right: 3px !important; - } + padding-right: 3px !important; + } div.statusrefbis { - padding-right: 3px !important; - } + padding-right: 3px !important; + } /* TODO div.statusref { - padding-top: 0px !important; - padding-left: 0px !important; - border: none !important; - } + padding-top: 0px !important; + padding-left: 0px !important; + border: none !important; + } */ - input.buttonpayment { + input.buttonpayment { min-width: 300px; - } + } } .linkobject { cursor: pointer; } @@ -1594,6 +1700,11 @@ td.showDragHandle { z-index: 1001; } <?php } ?> +<?php if (!empty($conf->global->THEME_DARKMODEENABLED)) { ?> +.side-nav-vert { + border-bottom: 1px solid #888; +} +<?php } ?> .side-nav { /*display: block; @@ -1614,23 +1725,23 @@ div.blockvmenulogo border-bottom: 0 !important; } .menulogocontainer { - margin: <?php echo $disableimages ? '0' : '6'; ?>px; - margin-left: 11px; - margin-right: 9px; - padding: 0; - height: <?php echo $disableimages ? '20' : '32'; ?>px; - /* width: 100px; */ - max-width: 100px; - vertical-align: middle; + margin: <?php echo $disableimages ? '0' : '6'; ?>px; + margin-left: 11px; + margin-right: 9px; + padding: 0; + height: <?php echo $disableimages ? '20' : '35'; ?>px; + /* width: 100px; */ + max-width: 100px; + vertical-align: middle; } .backgroundforcompanylogo { - background-color: rgba(255,255,255,0.7); - border-radius: 4px; + background-color: rgba(255,255,255,0.2); + border-radius: 4px; } .menulogocontainer img.mycompany { - object-fit: contain; - width: inherit; - height: inherit; + object-fit: contain; + width: inherit; + height: inherit; } #mainmenutd_companylogo::after, #mainmenutd_menu::after { content: unset !important; @@ -1665,8 +1776,8 @@ div.vmenu, td.vmenu { padding-right: 10px !important; } .blockvmenu .menu_titre { - margin-top: 4px; - margin-bottom: 1px; + margin-top: 4px; + margin-bottom: 1px; } /* Try responsive even not on smartphone @@ -1713,7 +1824,7 @@ div.vmenu, td.vmenu { padding-left: 20px; padding-right: 20px; position: absolute; - z-index: 90; + z-index: 90; } div.blockvmenulogo { @@ -1749,10 +1860,14 @@ div.vmenu, td.vmenu { div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '30' : '6')); ?>px; - margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '28' : '6')); ?>px; - <?php if (!empty($dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?> - <?php if (!empty($dol_hide_leftmenu)) print 'margin-top: 12px;'."\n"; ?> + margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '34' : '6')); ?>px; + margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '30' : '6')); ?>px; + <?php if (!empty($dol_hide_leftmenu)) { + print 'margin-bottom: 12px;'."\n"; + } ?> + <?php if (!empty($dol_hide_leftmenu)) { + print 'margin-top: 12px;'."\n"; + } ?> } body.onlinepaymentbody div.fiche { /* For online payment page */ margin: 20px !important; @@ -1771,74 +1886,99 @@ div.fichecenterbis { margin-top: 8px; } div.fichethirdleft { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?> - <?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px;\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$left.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: 50%;\n"; + } ?> + <?php if ($conf->browser->layout == 'phone') { + print "padding-bottom: 6px;\n"; + } ?> } div.fichetwothirdright { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?> - <?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$right.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: 50%;\n"; + } ?> + <?php if ($conf->browser->layout == 'phone') { + print "padding-bottom: 6px\n"; + } ?> } div.fichetwothirdright div.ficheaddleft { - padding-<?php echo $left; ?>: 20px; + padding-<?php echo $left; ?>: 28px; } div.fichehalfleft { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$left.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: calc(50% - 14px);\n"; + } ?> } div.fichehalfright { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$right.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: calc(50% - 14px);\n"; + } ?> } div.fichehalfright { - <?php if ($conf->browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?> + <?php if ($conf->browser->layout == 'phone') { + print "margin-top: 10px;\n"; + } ?> } -div.firstcolumn div.box { + +/*div.firstcolumn div.box { padding-right: 10px; } div.secondcolumn div.box { padding-left: 10px; -} +}*/ + + /* Force values on one colum for small screen */ @media only screen and (max-width: 1000px) { - div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : ($dol_hide_leftmenu ? '6' : '20')); ?>px; - margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 8 : 6); ?>px; - } - div.fichecenter { - width: 100%; - clear: both; /* This is to have div fichecenter that are true rectangles */ - } - div.fichecenterbis { - margin-top: 8px; - } - div.fichethirdleft { - float: none; - width: auto; - padding-bottom: 6px; - } - div.fichetwothirdright { - float: none; - width: auto; - padding-bottom: 6px; - } - div.fichetwothirdright div.ficheaddleft { - padding-left: 0; + div.fiche { + margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : ($dol_hide_leftmenu ? '6' : '20')); ?>px; + margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 8 : 6); ?>px; } - div.fichehalfleft { - float: none; - width: auto; - } - div.fichehalfright { - float: none; - width: auto; - } - div.fichehalfright { - margin-top: 10px; - } - div.firstcolumn div.box { + div.fichecenter { + width: 100%; + clear: both; /* This is to have div fichecenter that are true rectangles */ + } + div.fichecenterbis { + margin-top: 8px; + } + div.fichethirdleft { + float: none; + width: auto; + padding-bottom: 6px; + } + div.fichetwothirdright { + float: none; + width: auto; + padding-bottom: 6px; + } + div.fichetwothirdright div.ficheaddleft { + padding-left: 0; + } + div.fichehalfleft { + float: none; + width: auto; + } + div.fichehalfright { + float: none; + width: auto; + } + div.fichehalfright { + margin-top: 10px; + } + div.firstcolumn div.box { padding-right: 0px; } div.secondcolumn div.box { @@ -1849,23 +1989,23 @@ div.secondcolumn div.box { /* Force values on one colum for small screen */ @media only screen and (max-width: 1599px) { - div.fichehalfleft-lg { - float: none; - width: auto; - } - div.fichehalfright-lg { - float: none; - width: auto; - } + div.fichehalfleft-lg { + float: none; + width: auto; + } + div.fichehalfright-lg { + float: none; + width: auto; + } - .fichehalfright-lg .fichehalfright { - padding-left:0; - } + .fichehalfright-lg .fichehalfright { + padding-left:0; + } } /* For table into table into card */ div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td { - padding: 0 0 0 0; + padding: 0 0 0 0; } div.nopadding { padding: 0 !important; @@ -1877,28 +2017,28 @@ div.nopadding { } td.nobordernopadding.widthpictotitle.col-picto { - color: #bbb; - opacity: 0.85; + color: #bbb; + opacity: 0.85; } .table-list-of-attached-files .col-picto, .table-list-of-links .col-picto { - opacity: 0.7 !important; - font-size: 0.7em; - width: 20px; + opacity: 0.7 !important; + font-size: 0.7em; + width: 20px; } .table-list-of-attached-files .col-picto .widthpictotitle, .table-list-of-links .col-picto .widthpictotitle { width: unset; - color: #999; + color: #999; } /* span.widthpictotitle.pictotitle { - background: var(--colortexttitlenotab); - opacity: 0.8; - color: #fff !important; - padding: 7px; - border-radius: 2px; - min-width: 30px; - text-align: center; + background: var(--colortexttitlenotab); + opacity: 0.8; + color: #fff !important; + padding: 7px; + border-radius: 2px; + min-width: 30px; + text-align: center; } */ .pictotitle { @@ -1910,8 +2050,8 @@ span.widthpictotitle.pictotitle { width: 14px; } .pictosubstatus { - padding-left: 2px; - padding-right: 2px; + padding-left: 2px; + padding-right: 2px; } .pictostatus { width: 15px; @@ -1919,14 +2059,14 @@ span.widthpictotitle.pictotitle { margin-top: -3px } .pictowarning, .pictoerror, .pictopreview { - padding-<?php echo $left; ?>: 3px; + padding-<?php echo $left; ?>: 3px; } .pictowarning { - /* vertical-align: text-bottom; */ - color: <?php echo $badgeWarning ?>; + /* vertical-align: text-bottom; */ + color: <?php echo $badgeWarning ?>; } .pictoerror { - color: <?php echo $badgeDanger ?>; + color: <?php echo $badgeDanger ?>; } .pictomodule { width: 14px; @@ -1937,14 +2077,20 @@ span.widthpictotitle.pictotitle { .fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit, .fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit, .tagtdnote span.pictoedit { - opacity: 0.4; + opacity: 0.4; } +.pictofixedwidth { + text-align: <?php echo $left; ?>; + width: 20px; + padding-right: 0; +} + .colorthumb { padding-left: 1px !important; padding-right: 1px; padding-top: 1px; padding-bottom: 1px; - width: 44px; + width: 50px; text-align:center; } div.attacharea { @@ -1976,9 +2122,9 @@ div.paginationref { } /* TODO div.statusref { - padding: 10px; - border: 1px solid #bbb; - border-radius: 6px; + padding: 10px; + border: 1px solid #bbb; + border-radius: 6px; } */ div.statusref { float: right; @@ -1986,33 +2132,33 @@ div.statusref { margin-top: 8px; margin-bottom: 10px; clear: both; - text-align: right; + text-align: right; } div.statusref img { - padding-left: 8px; - padding-right: 9px; - vertical-align: text-bottom; - width: 18px; + padding-left: 8px; + padding-right: 9px; + vertical-align: text-bottom; + width: 18px; } div.statusrefbis { - padding-left: 8px; - padding-right: 9px; - vertical-align: text-bottom; + padding-left: 8px; + padding-right: 9px; + vertical-align: text-bottom; } img.photoref, div.photoref { /* border: 1px solid #DDD; */ - -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2); - box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2); - padding: 4px; + -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2); + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2); + padding: 4px; height: 80px; width: 80px; - object-fit: contain; + object-fit: contain; } div.photoref .fa, div.photoref .fas, div.photoref .far { font-size: 2.5em; } img.fitcontain { - object-fit: contain; + object-fit: contain; } div.photoref { display:table-cell; @@ -2020,12 +2166,12 @@ div.photoref { text-align:center; } img.photorefnoborder { - padding: 2px; + padding: 2px; height: 48px; width: 48px; - object-fit: contain; - border: 1px solid #AAA; - border-radius: 100px; + object-fit: contain; + border: 1px solid #AAA; + border-radius: 100px; } .underrefbanner { } @@ -2034,8 +2180,8 @@ img.photorefnoborder { /* border-bottom: 2px solid var(--colorbackhmenu1); */ } .trextrafieldseparator td, .trextrafields_collapse_last td { - /* border-bottom: 2px solid var(--colorbackhmenu1) !important; */ - border-bottom: 2px solid rgb(<?php echo $colortopbordertitle1 ?>) !important; + /* border-bottom: 2px solid var(--colorbackhmenu1) !important; */ + border-bottom: 2px solid rgb(<?php echo $colortopbordertitle1 ?>) !important; } .tdhrthin { @@ -2065,12 +2211,12 @@ div#tmenu_tooltip { <?php } ?> -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome and Opera */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ } @@ -2085,25 +2231,25 @@ div.tmenudiv { <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?> display:none; <?php } else { ?> - position: relative; - display: block; - white-space: nowrap; - border-top: 0px; - border-<?php print $left; ?>: 0px; - border-<?php print $right; ?>: 0px; - padding: 0px 0px 0px 0px; /* t r b l */ - margin: 0px 0px 0px 0px; /* t r b l */ + position: relative; + display: block; + white-space: nowrap; + border-top: 0px; + border-<?php print $left; ?>: 0px; + border-<?php print $right; ?>: 0px; + padding: 0px 0px 0px 0px; /* t r b l */ + margin: 0px 0px 0px 0px; /* t r b l */ font-size: 13px; - font-weight: normal; + font-weight: normal; color: #000000; - text-decoration: none; + text-decoration: none; <?php } ?> } div.tmenudisabled, a.tmenudisabled { opacity: 0.6; } a.tmenu, a.tmenusel, a.tmenudisabled { - /* font-weight: 300; */ + /* font-weight: 300; */ } a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudisabled:active { padding: 0px 5px 0px 5px; @@ -2117,7 +2263,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { padding: 0px 2px 0px 2px; white-space: nowrap; color: var(--colortextbackhmenu); - text-decoration: none; + text-decoration: none; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { padding: 0px 4px 0px 4px; @@ -2129,8 +2275,8 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { ul.tmenu { /* t r b l */ - padding: 0px 0px 0px 0px; - margin: 0px 0px 0px 0px; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; list-style: none; display: table; } @@ -2142,7 +2288,7 @@ li.tmenu, li.tmenusel { vertical-align: bottom; <?php if (empty($conf->global->MAIN_MENU_INVERT)) { ?> float: <?php print $left; ?>; - <?php } ?> + <?php } ?> position:relative; display: block; padding: 0 0 0 0; @@ -2190,9 +2336,9 @@ div.tmenucenter height: 26px; <?php } else { ?> padding-top: 2px; - height: <?php print $heightmenu; ?>px; + height: <?php print $heightmenu; ?>px; <?php } ?> - /* width: 100%; */ + /* width: 100%; */ } #menu_titre_logo { padding-top: 0; @@ -2202,8 +2348,8 @@ div.menu_titre { padding-top: 4px; padding-bottom: 4px; overflow: hidden; - text-overflow: ellipsis; - width: 188px; /* required to have overflow working. must be same than menu_contenu */ + text-overflow: ellipsis; + width: 188px; /* required to have overflow working. must be same than menu_contenu */ } .mainmenuaspan { @@ -2223,10 +2369,10 @@ div.mainmenu { } a.tmenuimage:focus, .mainmenu.topmenuimage:focus { - outline: none; + outline: none; } button.ui-button.ui-corner-all.ui-widget:focus { - outline: none; + outline: none; } /* For mainmenu, we always load the img */ @@ -2236,10 +2382,10 @@ div.mainmenu.menu { <?php print $disableimages ? '' : 'top: 7px'; ?> } #mainmenutd_menu a.tmenuimage { - display: unset; + display: unset; } a.tmenuimage { - display: block; + display: block; } a.tmenuimage:hover{ @@ -2252,9 +2398,9 @@ a.tmenuimage:hover{ /* Do not load menu img for other if hidden to save bandwidth */ <?php if (empty($dol_hide_topmenu)) { ?> - <?php include dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.inc.php', 0); ?> + <?php include dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.inc.php', 0); ?> - <?php + <?php // Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div') $moduletomainmenu = array( @@ -2266,8 +2412,7 @@ a.tmenuimage:hover{ 'barcode'=>'', 'fckeditor'=>'', 'categorie'=>'', ); $mainmenuused = 'home'; - foreach ($conf->modules as $val) - { + foreach ($conf->modules as $val) { $mainmenuused .= ','.(isset($moduletomainmenu[$val]) ? $moduletomainmenu[$val] : $val); } $mainmenuusedarray = array_unique(explode(',', $mainmenuused)); @@ -2277,29 +2422,29 @@ a.tmenuimage:hover{ $divalreadydefined = array('home', 'companies', 'products', 'mrp', 'commercial', 'externalsite', 'accountancy', 'project', 'tools', 'members', 'agenda', 'ftp', 'holiday', 'hrm', 'bookmark', 'cashdesk', 'takepos', 'ecm', 'geoipmaxmind', 'gravatar', 'clicktodial', 'paypal', 'stripe', 'webservices', 'website'); // Put here list of menu entries we are sure we don't want $divnotrequired = array('multicurrency', 'salaries', 'ticket', 'margin', 'opensurvey', 'paybox', 'expensereport', 'incoterm', 'prelevement', 'propal', 'workflow', 'notification', 'supplier_proposal', 'cron', 'product', 'productbatch', 'expedition'); - foreach ($mainmenuusedarray as $val) - { - if (empty($val) || in_array($val, $divalreadydefined)) continue; - if (in_array($val, $divnotrequired)) continue; + foreach ($mainmenuusedarray as $val) { + if (empty($val) || in_array($val, $divalreadydefined)) { + continue; + } + if (in_array($val, $divnotrequired)) { + continue; + } //print "XXX".$val; // Search img file in module dir $found = 0; $url = ''; - foreach ($conf->file->dol_document_root as $dirroot) - { - if (file_exists($dirroot."/".$val."/img/".$val.".png")) - { + foreach ($conf->file->dol_document_root as $dirroot) { + if (file_exists($dirroot."/".$val."/img/".$val.".png")) { $url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1); $found = 1; break; } } // Img file not found - if (!$found) - { + if (!$found) { if (!defined('DISABLE_FONT_AWSOME')) { 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"; - print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n"; + print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n"; print 'div.mainmenu.'.$val.'::before { content: "\f249"; }'."\n"; @@ -2322,11 +2467,11 @@ a.tmenuimage:hover{ <?php } // End test if $dol_hide_topmenu ?> .tmenuimage { - padding:0 0 0 0 !important; - margin:0 0px 0 0 !important; - <?php if ($disableimages) { ?> - display: none; - <?php } ?> + padding:0 0 0 0 !important; + margin:0 0px 0 0 !important; + <?php if ($disableimages) { ?> + display: none; + <?php } ?> } @@ -2337,14 +2482,14 @@ a.tmenuimage:hover{ { background: #f0f0f0; display: table; - position: absolute; - height: 100%; - width: 100%; - font-size: 1em; + position: absolute; + height: 100%; + width: 100%; + font-size: 1em; } .login_center { display: table-cell; - vertical-align: middle; + vertical-align: middle; } .login_vertical_align { padding: 10px; @@ -2404,10 +2549,10 @@ if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { margin: 8px; } .login_table .tdinputlogin { - background-color: transparent; - /* border: 2px solid #ccc; */ - min-width: 220px; - border-radius: 2px; + background-color: transparent; + /* border: 2px solid #ccc; */ + min-width: 220px; + border-radius: 2px; } .login_table .tdinputlogin .fa { padding-left: 10px; @@ -2420,7 +2565,7 @@ if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { font-size: 1em; } .login_main_home { - word-break: break-word; + word-break: break-word; } .login_main_message { text-align: center; @@ -2441,7 +2586,7 @@ div#login_left, div#login_right { vertical-align: middle; } div#login_right select#entity { - margin-top: 10px; + margin-top: 10px; } table.login_table tr td table.none tr td { padding: 2px; @@ -2465,7 +2610,7 @@ table.login_table_securitycode tr td { } div.backgroundsemitransparent { - background:rgba(255,255,255,0.6); + background:rgba(255,255,255,0.68); padding-left: 10px; padding-right: 10px; } @@ -2504,17 +2649,17 @@ div.login a:hover { text-decoration:underline; } .login_block_elem a span.atoplogin, .login_block_elem span.atoplogin { - vertical-align: middle; + vertical-align: middle; } div.login_block_user { display: inline-block; - vertical-align: middle; + vertical-align: middle; line-height: <?php echo $disableimages ? '25' : '50'; ?>px; height: <?php echo $disableimages ? '25' : '50'; ?>px; } div.login_block_other { display: inline-block; - vertical-align: middle; + vertical-align: middle; clear: <?php echo $disableimages ? 'none' : 'both'; ?>; padding-top: 0; text-align: right; @@ -2552,11 +2697,11 @@ div.login_block_other { text-decoration:underline !important; } span.fa.atoplogin, span.fa.atoplogin:hover { - font-size: 16px; - text-decoration: none !important; + font-size: 16px; + text-decoration: none !important; } .atoplogin #dropdown-icon-down, .atoplogin #dropdown-icon-up { - font-size: 0.7em; + font-size: 0.7em; } img.login, img.printer, img.entity { /* padding: 0px 0px 0px 4px; */ @@ -2567,30 +2712,33 @@ img.login, img.printer, img.entity { } .userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */ width: <?php echo $disableimages ? '26' : '30'; ?>px; - height: <?php echo $disableimages ? '26' : '30'; ?>px; - border-radius: 50%; - background-size: contain; - background-size: contain; - border: 1px solid; - border-color: rgba(255, 255, 255, 0.2); + height: <?php echo $disableimages ? '26' : '30'; ?>px; + border-radius: 50%; + background-size: contain; + background-size: contain; + border: 1px solid; + border-color: rgba(255, 255, 255, 0.2); } img.userphoto { /* size for user photo in lists */ border-radius: 0.72em; width: 1.4em; - height: 1.4em; - background-size: contain; - vertical-align: middle; + height: 1.4em; + background-size: contain; + vertical-align: middle; } img.userphotosmall { /* size for user photo in lists */ border-radius: 0.6em; width: 1.2em; - height: 1.2em; - background-size: contain; - vertical-align: middle; - background-color: #FFF; + height: 1.2em; + background-size: contain; + vertical-align: middle; + background-color: #FFF; } img.userphoto[alt="Gravatar avatar"], img.photouserphoto.dropdown-user-image[alt="Gravatar avatar"] { - background: #fff; + background: #fff; +} +form[name="addtime"] img.userphoto { + border: 1px solid #444; } .span-icon-user { background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png', 1); ?>); @@ -2606,20 +2754,20 @@ img.userphoto[alt="Gravatar avatar"], img.photouserphoto.dropdown-user-image[alt /* ============================================================================== */ div.vmenu, td.vmenu { - margin-<?php print $right; ?>: 2px; - position: relative; - float: left; - padding: 0px; - padding-bottom: 0px; - padding-top: 1px; - width: 190px; + margin-<?php print $right; ?>: 2px; + position: relative; + float: left; + padding: 0px; + padding-bottom: 0px; + padding-top: 1px; + width: 190px; } .vmenu { - width: 190px; + width: 190px; margin-left: 6px; <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?> - display: none; + display: none; <?php } ?> } @@ -2635,8 +2783,8 @@ input.vmenusearchselectcombo[type=text] { padding-top: 3px; padding-bottom: 3px; overflow: hidden; - text-overflow: ellipsis; - width: 188px; /* required to have overflow working. must be same than .menu_titre */ + text-overflow: ellipsis; + width: 188px; /* required to have overflow working. must be same than .menu_titre */ } #menu_contenu_logo { /* padding-top: 0; */ } .companylogo { } @@ -2669,22 +2817,22 @@ a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align /* color: #f3e4ac !important; */ } .helppresentcircle { - color: var(--colorbackhmenu1); - filter: invert(0.8); - margin-left: -7px; - display: inline-block; - margin-top: -10px; - font-size: x-small; - vertical-align: super; - opacity: 0.95; + color: var(--colorbackhmenu1); + filter: invert(0.8); + margin-<?php echo $left ?>: -7px; + display: inline-block; + margin-top: -10px; + font-size: x-small; + vertical-align: super; + opacity: 0.95; } .vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks { - border-top: 1px solid #BBB; + border-top: 1px solid #BBB; } a.vsmenu.addbookmarkpicto { - padding-right: 10px; + padding-right: 10px; } div.blockvmenusearchphone { @@ -2718,16 +2866,16 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmen color: #000000; text-align: <?php print $left; ?>; text-decoration: none; - padding-left: 5px; - padding-right: 1px; - padding-top: 4px; - padding-bottom: 7px; - margin: 0 0 0 2px; + padding-left: 5px; + padding-right: 1px; + padding-top: 4px; + padding-bottom: 7px; + margin: 0 0 0 2px; background: var(--colorbackvmenu1); - border-left: 1px solid #AAA; - border-right: 1px solid #BBB; + border-left: 1px solid #AAA; + border-right: 1px solid #BBB; } div.blockvmenusearch @@ -2736,7 +2884,7 @@ div.blockvmenusearch color: #000000; text-align: <?php print $left; ?>; text-decoration: none; - margin: 1px 0px 0px 2px; + margin: 1px 0px 0px 2px; background: var(--colorbackvmenu1); } @@ -2754,13 +2902,13 @@ div.blockvmenuhelp color: #000000; text-align: center; text-decoration: none; - padding-left: 0px; - padding-right: 6px; - padding-top: 3px; - padding-bottom: 3px; - margin: 4px 0px 0px 0px; + padding-left: 0px; + padding-right: 6px; + padding-top: 3px; + padding-bottom: 3px; + margin: 4px 0px 0px 0px; <?php } else { ?> - display: none; + display: none; <?php } ?> } @@ -2783,7 +2931,7 @@ td.barre_select { td.photo { background: #F4F4F4; color: #000000; - border: 1px solid #bbb; + border: 1px solid #bbb; } /* ============================================================================== */ @@ -2795,14 +2943,14 @@ td.photo { */ #mainContent, #leftContent .ui-layout-pane { - padding: 0px; - overflow: auto; + padding: 0px; + overflow: auto; } #mainContent, #leftContent .ui-layout-center { padding: 0px; position: relative; /* contain floated or positioned elements */ - overflow: auto; /* add scrolling to content-div */ + overflow: auto; /* add scrolling to content-div */ } @@ -2811,29 +2959,29 @@ td.photo { /* ============================================================================== */ td.ecmroot { - padding-bottom: 0 !important; + padding-bottom: 0 !important; } .largebutton { /* border-top: 1px solid #CCC !important; */ - padding: 0px 4px 14px 4px !important; - min-height: 32px; + padding: 0px 4px 14px 4px !important; + min-height: 32px; } a.toolbarbutton { - margin-top: 0px; - margin-left: 4px; - margin-right: 4px; - height: 30px; + margin-top: 0px; + margin-left: 4px; + margin-right: 4px; + height: 30px; } img.toolbarbutton { margin-top: 1px; - height: 30px; + height: 30px; } li.expanded > a.fmdirlia.jqft.ecmjqft { - font-weight: bold !important; + font-weight: bold !important; } @@ -2843,10 +2991,10 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { /* Onglets */ /* ============================================================================== */ div.tabs { - text-align: <?php print $left; ?>; - margin-top: 10px; - padding-left: 6px; - padding-right: 6px; + text-align: <?php print $left; ?>; + margin-top: 10px; + padding-left: 6px; + padding-right: 6px; clear:both; height:100%; } @@ -2855,20 +3003,20 @@ div.tabsElem { } /* To avoid overlap of tabs when not browser */ /* div.tabsElem a.tabactive::before, div.tabsElem a.tabunactive::before { - content: "\f0da"; - font-family: "Font Awesome 5 Free"; - padding-right: 2px; - font-weight: 900; + content: "\f0da"; + font-family: "Font Awesome 5 Free"; + padding-right: 2px; + font-weight: 900; } */ div.tabBar { - color: var(--colortextbacktab); - padding-top: 16px; - padding-left: 0px; padding-right: 0px; - padding-bottom: 2px; - margin: 0px 0px 16px 0px; - border-top: 1px solid #BBB; - /* border-bottom: 1px solid #AAA; */ + color: var(--colortextbacktab); + padding-top: 16px; + padding-left: 0px; padding-right: 0px; + padding-bottom: 2px; + margin: 0px 0px 16px 0px; + border-top: 1px solid #BBB; + /* border-bottom: 1px solid #AAA; */ width: auto; background: var(--colorbacktabcard1); } @@ -2880,8 +3028,8 @@ div.fiche table:not(.table-fiche-title) tr.titre td { } div.tabBar.tabBarNoTop { - padding-top: 0; - border-top: 0; + padding-top: 0; + border-top: 0; } /* tabBar used for creation/update/send forms */ @@ -2897,11 +3045,11 @@ div.tabBarWithBottom table.border>tbody>tr:last-of-type>td { } div.tabBar table.tableforservicepart2:last-child { - border-bottom: 1px solid #aaa; + border-bottom: 1px solid #aaa; } .tableforservicepart1 .tdhrthin { height: unset; - padding-top: 0 !important; + padding-top: 0 !important; } /* Payment Screen : Pointer cursor in the autofill image */ .AutoFillAmount { @@ -2925,26 +3073,26 @@ div.popuptab { /* ============================================================================== */ div.tabsAction { - margin: 20px 0em 30px 0em; - padding: 0em 0em; - text-align: right; + margin: 20px 0em 30px 0em; + padding: 0em 0em; + text-align: right; } div.tabsActionNoBottom { - margin-bottom: 0px; + margin-bottom: 0px; } div.tabsAction > a { margin-bottom: 16px !important; } a.tabTitle { - color: rgba(0,0,0,0.4) !important; - text-shadow:1px 1px 1px #ffffff; + color: rgba(0,0,0,0.4) !important; + text-shadow:1px 1px 1px #ffffff; font-family: <?php print $fontlist ?>; font-weight: normal !important; - padding: 4px 6px 2px 0px; - margin-<?php print $right; ?>: 10px; - text-decoration: none; - white-space: nowrap; + padding: 4px 6px 2px 0px; + margin-<?php print $right; ?>: 10px; + text-decoration: none; + white-space: nowrap; } .tabTitleText { display: none; @@ -2953,29 +3101,22 @@ a.tabTitle { max-height: 14px; } div.tabs div.tabsElem:first-of-type a.tab { - margin-left: 0px !important; + margin-left: 0px !important; } a.tabunactive { - color: var(--colortextlink) !important; + color: var(--colortextlink) !important; } a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: <?php print $fontlist ?>; padding: 12px 14px 13px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; - - /*border-right: 1px solid #ddd; - border-left: 1px solid #ddd; - border-top: 1px solid #ddd; */ - border-right: 1px solid transparent; - border-left: 1px solid transparent; - border-top: 1px solid transparent; - border-bottom: 0px !important; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; background-image: none !important; } + .tabactive, a.tab#active { color: var(--colortextbacktab); !important; background: var(--colorbacktabcard1) !important; @@ -2985,6 +3126,12 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-left: 1px solid #CCC !important; border-top: 3px solid var(--colorbackhmenu1) !important; } +.tabunactive, a.tab#unactive { + border-right: 1px solid transparent; + border-left: 1px solid transparent; + border-top: 1px solid transparent; + border-bottom: 0px !important;*/ +} a.tab:hover { /* @@ -2994,30 +3141,30 @@ a.tab:hover text-decoration: underline; } a.tabimage { - color: #434956; + color: #434956; font-family: <?php print $fontlist ?>; - text-decoration: none; - white-space: nowrap; + text-decoration: none; + white-space: nowrap; } td.tab { - background: #dee7ec; + background: #dee7ec; } span.tabspan { - background: #dee7ec; - color: #434956; + background: #dee7ec; + color: #434956; font-family: <?php print $fontlist ?>; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; -webkit-border-radius:4px 4px 0px 0px; border-radius:4px 4px 0px 0px; - border-<?php print $right; ?>: 1px solid #555555; - border-<?php print $left; ?>: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; + border-<?php print $right; ?>: 1px solid #555555; + border-<?php print $left; ?>: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; } /* ============================================================================== */ @@ -3065,7 +3212,10 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd } .smallpaddingimp { - padding: 4px !important; + padding: 4px !important; +} +input.button.smallpaddingimp { + font-size: 0.8em; } .nopaddingleft { padding-<?php print $left; ?>: 0px; @@ -3102,8 +3252,8 @@ div.tabs.nopaddingleft { } table.tableforemailform tr td { - padding-top: 3px; - padding-bottom: 3px; + padding-top: 3px; + padding-bottom: 3px; } table.border, table.bordernooddeven, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { @@ -3117,14 +3267,14 @@ table.borderplus { height: 22px; } tr.liste_titre.box_titre td table td, .bordernooddeven tr td { - height: 22px; + height: 22px; } div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar .table-val-border-col { vertical-align: middle; } div .tdtop { - vertical-align: top !important; + vertical-align: top !important; /*padding-top: 10px !important; padding-bottom: 2px !important; */ } @@ -3156,10 +3306,10 @@ td.border, div.tagtable div div.border { /* Main boxes */ .nobordertop, .nobordertop tr:first-of-type td { - border-top: none !important; + border-top: none !important; } .noborderbottom, .noborderbottom tr:last-of-type td { - border-bottom: none !important; + border-bottom: none !important; } .bordertop { border-top: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); @@ -3182,14 +3332,14 @@ table.liste, table.noborder, table.formdoc, div.noborder { 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; - */ + 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; @@ -3202,7 +3352,7 @@ table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type border-bottom-style: solid; } div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):not(.lastrecordtable):last-of-type { - border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); + border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); } div.tabBar table.border>tbody>tr:last-of-type>td { border-bottom-width: 1px; @@ -3210,7 +3360,7 @@ div.tabBar table.border>tbody>tr:last-of-type>td { border-bottom-style: solid; } div.tabBar div.fichehalfright table.noborder { - border-bottom: none; + border-bottom: none; } table.paddingtopbottomonly tr td { @@ -3221,11 +3371,11 @@ table.paddingtopbottomonly tr td { background: var(--colorbacktitle1) !important; } .liste_titre2 { - background: var(--colorbackhmenu1) !important; - color: #fff; + background: var(--colorbackhmenu1) !important; + color: #fff; } table:not(.listwithfilterbefore) tr.liste_titre_filter:first-of-type td.liste_titre { - padding-top: 5px; + padding-top: 5px; } tr.liste_titre_filter td.liste_titre { @@ -3238,19 +3388,19 @@ tr.liste_titre_filter td.liste_titre:first-of-type { } .liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd { - border-bottom-width: 0 !important; - border-top-width: 1px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-bottom-width: 0 !important; + border-top-width: 1px; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } tr#trlinefordates td { - border-bottom: 0px !important; + border-bottom: 0px !important; } .liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd { - border-top-width: 1px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-width: 1px; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } table.liste tr, table.noborder tr, div.noborder form { border-top-color: #FEFEFE; @@ -3288,11 +3438,17 @@ table.border tr td table.nobordernopadding tr td { padding-bottom: 0; } td.borderright { - border: none; /* to erase value for table.nobordernopadding td */ + border: none; /* to erase value for table.nobordernopadding td */ border-right-width: 1px !important; border-right-color: #BBB !important; border-right-style: solid !important; } +td.borderleft { + border: none; /* to erase value for table.nobordernopadding td */ + border-left-width: 1px !important; + border-left-color: #BBB !important; + border-left-style: solid !important; +} /* For table with no filter before */ @@ -3313,19 +3469,19 @@ div.refidpadding { } div.refid { font-weight: bold; - color: var(--colortexttitlenotab); - font-size: 1.2em; - word-break: break-word; + color: var(--colortexttitlenotab); + font-size: 1.2em; + word-break: break-word; } div.refidno { padding-top: 3px; font-weight: normal; - color: var(--refidnocolor); - font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>; - line-height: 21px; + color: var(--refidnocolor); + font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize ?>; + line-height: 21px; } div.refidno form { - display: inline-block; + display: inline-block; } div.pagination { @@ -3335,10 +3491,10 @@ div.pagination a { font-weight: normal; } /*div.pagination a.butAction, div.fichehalfright a.butAction { - margin-right: 0px !important; + margin-right: 0px !important; } div.tabsAction a.butActionDelete:last-child, div.tabsAction a.butAction:last-child { - margin-right: 0px !important; + margin-right: 0px !important; }*/ div.pagination ul { @@ -3365,9 +3521,11 @@ div.pagination li.pagination a, div.pagination li.pagination span { padding: 6px 12px; line-height: 1.42857143; - color: #000; text-decoration: none; background-repeat: repeat-x; + <?php if (empty($conf->global->THEME_DARKMODEENABLED)) { ?> + color: #000; + <?php } ?> } div.pagination li.pagination span.inactive { cursor: default; @@ -3376,8 +3534,8 @@ div.pagination li.pagination span.inactive { li.noborder.litext, li.noborder.litext a, div.pagination li a.inactive:hover, div.pagination li span.inactive:hover { - -webkit-box-shadow: none !important; - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; } /*div.pagination li.litext { padding-top: 8px; @@ -3465,18 +3623,19 @@ table.hidepaginationnext .paginationnext { display: none; } .tabBar .arearef .pagination.paginationref { - max-width: calc(30%); + max-width: calc(30%); } .paginationafterarrows a.btnTitlePlus, .titre_right a.btnTitlePlus { - border: 1px solid var(--btncolorborder); + 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; + /* text-shadow: 0px 0px 5px #ccc; */ + /* filter: invert(0.3); */ + font-size: 1.07em; } + /* Set the color for hover lines */ .oddeven:hover, .evenodd:hover, .impair:hover, .pair:hover { @@ -3488,7 +3647,7 @@ table.hidepaginationnext .paginationnext { } .treditedlinefordate { background: var(--colorbacklinepairchecked) !important; /* Must be background to be stronger than background of odd or even */ - border-bottom: 0px; + border-bottom: 0px; } <?php if ($colorbacklinepairchecked) { ?> .highlight { @@ -3539,34 +3698,34 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td { } .trforbreak td { font-weight: 500; - border-bottom: 1pt solid black !important; + border-bottom: 1pt solid black !important; background-color: var(--colorbacklinebreak) !important; } .trforbreak.nobold td a, .trforbreak.nobold span.secondary { - font-weight: normal !important; + font-weight: normal !important; } table.dataTable td { - padding: 5px 8px 5px 8px !important; + padding: 5px 8px 5px 8px !important; } tr.pair td, tr.impair td, form.impair div.tagtd, form.pair div.tagtd, div.impair div.tagtd, div.pair div.tagtd, div.liste_titre div.tagtd { - padding: 7px 8px 7px 8px; - border-bottom: 1px solid #ddd; + padding: 7px 8px 7px 8px; + border-bottom: 1px solid #ddd; } form.pair, form.impair { font-weight: normal; } form.tagtr:last-of-type div.tagtd, tr.pair:last-of-type td, tr.impair:last-of-type td { - border-bottom: 0px !important; + border-bottom: 0px !important; } tr.nobottom td { - border-bottom: 0px !important; + border-bottom: 0px !important; } div.tableforcontact form.tagtr:last-of-type div.tagtd { - border-bottom: 1px solid #ddd !important; + border-bottom: 1px solid #ddd !important; } tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td { - border-bottom: 0px !important; + border-bottom: 0px !important; } table.nobottomiftotal tr.liste_total td { background-color: #fff; @@ -3586,8 +3745,8 @@ div.liste_titre { } div.liste_titre_bydiv { border-top-width: <?php echo $borderwidth ?>px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; border-collapse: collapse; display: table; @@ -3612,9 +3771,9 @@ div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_se background: var(--colorbacktitle1); font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - color: var(--colortexttitle); - font-family: <?php print $fontlist ?>; - text-align: <?php echo $left; ?>; + color: var(--colortexttitle); + font-family: <?php print $fontlist ?>; + text-align: <?php echo $left; ?>; } tr.liste_titre th, tr.liste_titre td, th.liste_titre { @@ -3626,10 +3785,10 @@ tr.liste_titre:first-child th, tr:first-child th.liste_titre { } tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div { - font-family: <?php print $fontlist ?>; - font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - vertical-align: middle; - height: 24px; + font-family: <?php print $fontlist ?>; + font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; + vertical-align: middle; + height: 24px; } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; @@ -3637,8 +3796,8 @@ tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, fo } tr.liste_titre_topborder td { border-top-width: <?php echo $borderwidth; ?>px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } .liste_titre td a { text-shadow: none !important; @@ -3651,8 +3810,8 @@ tr.liste_titre_topborder td { background: transparent; } tr.liste_titre:last-child th.liste_titre, tr.liste_titre:last-child th.liste_titre_sel, tr.liste_titre td.liste_titre, tr.liste_titre td.liste_titre_sel, form.liste_titre div.tagtd { /* For last line of table headers only */ - /* border-bottom: 1px solid #ddd; */ - border-bottom: unset; + /* border-bottom: 1px solid #ddd; */ + border-bottom: unset; } div.liste_titre { @@ -3660,30 +3819,30 @@ div.liste_titre { } tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel, form.liste_titre_sel div { - font-family: <?php print $fontlist ?>; - font-weight: normal; - border-bottom: 1px solid #FDFFFF; - text-decoration: underline; + font-family: <?php print $fontlist ?>; + font-weight: normal; + border-bottom: 1px solid #FDFFFF; + /* text-decoration: underline; */ } input.liste_titre { - background: transparent; - border: 0px; + background: transparent; + border: 0px; } .listactionlargetitle .liste_titre { line-height: 24px; } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { - color: var(--listetotal); - font-weight: normal; + color: var(--listetotal); + font-weight: normal; } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div { - white-space: nowrap; + white-space: nowrap; } .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { white-space: normal; } form.liste_total div { - border-top: 1px solid #DDDDDD; + border-top: 1px solid #DDDDDD; } tr.liste_sub_total, tr.liste_sub_total td { border-bottom: 1px solid #aaa; @@ -3696,10 +3855,10 @@ tr.liste_sub_total, tr.liste_sub_total td { border-bottom: none; } table.tableforservicepart1:first-of-type tr:first-of-type td { - border-top: 1px solid #888; + border-top: 1px solid #888; } table.tableforservicepart1 tr td { - border-top: 0px; + border-top: 0px; } .paymenttable, .margintable { @@ -3707,7 +3866,7 @@ table.tableforservicepart1 tr td { margin: 0px 0px 0px 0px !important; } table.noborder.paymenttable { - border-bottom: none !important; + border-bottom: none !important; } .paymenttable tr td:first-child, .margintable tr td:first-child { @@ -3736,7 +3895,7 @@ div.tabBar .noborder { border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>) !important; } #tablelines tr td { - height: unset; + height: unset; } /* Prepare to remove class pair - impair */ @@ -3783,48 +3942,48 @@ ul.noborder li:nth-child(even):not(.liste_titre) { */ .box { - overflow-x: auto; - min-height: 40px; - padding-right: 0px; - padding-left: 0px; - padding-bottom: 10px; + overflow-x: auto; + min-height: 40px; + padding-right: 0px; + padding-left: 0px; + padding-bottom: 10px; } .ficheaddleft div.boxstats, .ficheaddright div.boxstats { - border: none; + border: none; } .boxstatsborder { - /* border: 1px solid #CCC !important; */ + /* border: 1px solid #CCC !important; */ } .boxstats, .boxstats130 { - display: inline-block; - margin-left: 8px; - margin-right: 8px; - margin-top: 5px; - margin-bottom: 5px; - text-align: center; + display: inline-block; + margin-left: 8px; + margin-right: 8px; + margin-top: 5px; + margin-bottom: 5px; + text-align: center; - background: var(--colorbackbody); - border: 1px solid var(--colorboxstatsborder); - border-left: 6px solid var(--colorboxstatsborder); - /* box-shadow: 1px 1px 8px var(--colorboxstatsborder); */ - border-radius: 0px; + background: var(--colorbackbody); + border: 1px solid var(--colorboxstatsborder); + border-left: 6px solid var(--colorboxstatsborder); + /* box-shadow: 1px 1px 8px var(--colorboxstatsborder); */ + border-radius: 0px; } .boxstats, .boxstats130, .boxstatscontent { white-space: nowrap; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } .boxstats130 { - width: 100%; - height: 59px; - /* padding: 3px; */ + width: 100%; + height: 59px; + /* padding: 3px; */ } .boxstats { - padding-left: 6px; - padding-right: 6px; - padding-top: 2px; - padding-bottom: 2px; - width: 118px; + padding-left: 6px; + padding-right: 6px; + padding-top: 2px; + padding-bottom: 2px; + width: 118px; } .boxtable:not(.widgetstats) td.tdboxstats .boxstats { @@ -3832,37 +3991,37 @@ ul.noborder li:nth-child(even):not(.liste_titre) { } .tabBar .fichehalfright .boxstats { - padding-top: 8px; - padding-bottom: 4px; + padding-top: 8px; + padding-bottom: 4px; } .boxstatscontent { padding: 3px; } .boxstatsempty { - width: 121px; - padding-left: 3px; - padding-right: 3px; - margin-left: 8px; - margin-right: 8px; + width: 121px; + padding-left: 3px; + padding-right: 3px; + margin-left: 8px; + margin-right: 8px; } .boxstats150empty { - width: 158px; - padding-left: 3px; - padding-right: 3px; - margin-left: 8px; - margin-right: 8px; + width: 158px; + padding-left: 3px; + padding-right: 3px; + margin-left: 8px; + margin-right: 8px; } @media only screen and (max-width: 767px) { .tabBar .arearef .pagination.paginationref { - max-width: calc(50%); + max-width: calc(50%); } .clearbothonsmartphone { - clear: both; - display: block !important; + clear: both; + display: block !important; } div.tabs { @@ -3883,31 +4042,31 @@ ul.noborder li:nth-child(even):not(.liste_titre) { } .boxstats, .boxstats130 { margin: 3px; - } - .boxstats130 { - text-align: <?php echo $left; ?> - } + } + .boxstats130 { + text-align: <?php echo $left; ?> + } .thumbstat { flex: 1 1 110px; margin-bottom: 8px; - min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 150; ?>px; /* on screen < 320, we guaranty to have 2 columns */ + min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 150; ?>px; /* on screen < 320, we guaranty to have 2 columns */ } .thumbstat150 { flex: 1 1 110px; margin-bottom: 8px; - min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 160; ?>px; /* on screen < 320, we guaranty to have 2 columns */ - max-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(161, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 161; ?>px; /* on screen < 320, we guaranty to have 2 columns */ - /* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */ + min-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(160, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 160; ?>px; /* on screen < 320, we guaranty to have 2 columns */ + max-width: <?php echo isset($_SESSION['dol_screenwidth']) ?min(161, round($_SESSION['dol_screenwidth'] / 2 - 20)) : 161; ?>px; /* on screen < 320, we guaranty to have 2 columns */ + /* width: ...px; If I use with, there is trouble on size of flex boxes solved with min + (max that is a little bit higer than min) */ } - .dashboardlineindicator { - float: left; - padding-left: 5px; - } - .boxstats { - width: 111px; - } - .boxstatsempty { - width: 111px; + .dashboardlineindicator { + float: left; + padding-left: 5px; + } + .boxstats { + width: 111px; + } + .boxstatsempty { + width: 111px; } } @@ -3919,8 +4078,8 @@ span.boxstatstext span:not(.fas) { opacity: 0.5; } span.boxstatstext { - line-height: 18px; - color: var(--colortext); + line-height: 18px; + color: var(--colortext); } span.boxstatstext img, a.dashboardlineindicatorlate img { border: 0; @@ -3958,42 +4117,42 @@ span.dashboardlineko { .dashboardlinelatecoin { float: right; position: relative; - text-align: right; - top: -27px; - right: 2px; - padding: 0px 5px 0px 5px; - border-radius: .25em; + text-align: right; + top: -27px; + right: 2px; + padding: 0px 5px 0px 5px; + border-radius: .25em; - background-color: #9f4705; + background-color: #9f4705; } .imglatecoin { - padding: 1px 3px 1px 1px; - margin-left: 4px; - margin-right: 2px; - background-color: #8c4446; - color: #FFFFFF ! important; - border-radius: .25em; + padding: 1px 3px 1px 1px; + margin-left: 4px; + margin-right: 2px; + background-color: #8c4446; + color: #FFFFFF ! important; + border-radius: .25em; display: inline-block; vertical-align: middle; } .boxtable { - margin-bottom: 25px !important; - border-bottom-width: 1px; + margin-bottom: 25px !important; + border-bottom-width: 1px; background: var(--colorbackbody); - border-top: <?php echo $borderwidth ?>px solid rgb(<?php echo $colortopbordertitle1 ?>); + border-top: <?php echo $borderwidth ?>px solid rgb(<?php echo $colortopbordertitle1 ?>); /* border-top: 2px solid var(--colorbackhmenu1) !important; */ } table.noborder.boxtable tr td { - height: unset; + height: unset; } .boxtablenotop { - border-top-width: 0 !important; + border-top-width: 0 !important; } .boxtablenobottom { - border-bottom-width: 0 !important; + border-bottom-width: 0 !important; } .boxtable .fichehalfright, .boxtable .fichehalfleft { - min-width: 275px; /* increasing this, make chart on box not side by side on laptops */ + min-width: 275px; /* increasing this, make chart on box not side by side on laptops */ } .tdboxstats { text-align: center; @@ -4003,23 +4162,23 @@ table.noborder.boxtable tr td { padding-right: 0px !important; } a.valignmiddle.dashboardlineindicator { - line-height: 30px; + line-height: 30px; } tr.box_titre { - height: 26px; + height: 26px; - /* TO MATCH BOOTSTRAP */ + /* TO MATCH BOOTSTRAP */ /*background: #ddd; color: #000 !important;*/ /* TO MATCH ELDY */ background: var(--colorbacktitle1); color: var(--colortexttitle); - font-family: <?php print $fontlist ?>, sans-serif; - font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - border-bottom: 1px solid #FDFFFF; - white-space: nowrap; + font-family: <?php print $fontlist ?>, sans-serif; + font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; } tr.box_titre td.boxclose { @@ -4043,8 +4202,8 @@ img.boxhandle, img.boxclose { margin-right: 1px; } .prod_entry_mode_free, .prod_entry_mode_predef { - height: 26px !important; - vertical-align: middle; + height: 26px !important; + vertical-align: middle; } .modulebuilderbox { @@ -4069,24 +4228,24 @@ div.ok { /* Info admin */ div.info { border-<?php print $left; ?>: solid 5px #87cfd2; - padding-top: 8px; - padding-left: 10px; - padding-right: 4px; - padding-bottom: 8px; - margin: 1em 0em 1em 0em; - background: #eff8fc; - color: #558; -} - -/* Warning message */ -div.warning { - border-<?php print $left; ?>: solid 5px #f2cf87; padding-top: 8px; padding-left: 10px; padding-right: 4px; padding-bottom: 8px; margin: 1em 0em 1em 0em; - background: #fcf8e3; + background: #eff8fc; + color: #558; +} + +/* Warning message */ +div.warning { + border-<?php print $left; ?>: solid 5px #f2cf87; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 1em 0em 1em 0em; + background: #fcf8e3; } div.warning a, div.info a, div.error a { color: var(--colortextlink); @@ -4094,7 +4253,7 @@ div.warning a, div.info a, div.error a { /* Error message */ div.error { - border-<?php print $left; ?>: solid 5px #f28787; + border-<?php print $left; ?>: solid 5px #f28787; padding-top: 8px; padding-left: 10px; padding-right: 4px; @@ -4124,13 +4283,13 @@ a.impayee:hover { font-weight: bold; color: #550000; } */ .framecontent { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } .framecontent iframe { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } @@ -4139,19 +4298,19 @@ a.impayee:hover { font-weight: bold; color: #550000; } */ .opened-dash-board-wrap { - margin-bottom: 25px; + margin-bottom: 25px; } div.boximport { - min-height: unset; + min-height: unset; } -.product_line_stock_ok { color: #002200; } -.product_line_stock_too_low { color: #884400; } +.product_line_stock_ok { color: var(--productlinestockok); } +.product_line_stock_too_low { color: var(--productlinestocktoolow); } .fieldrequired { font-weight: bold; color: var(--fieldrequiredcolor) !important; } -td.widthpictotitle { width: 26px; text-align: <?php echo $left; ?>; } +td.widthpictotitle { width: 38px; text-align: <?php echo $left; ?>; } span.widthpictotitle { font-size: 1.7em; } table.titlemodulehelp tr td img.widthpictotitle { width: 80px; } @@ -4164,11 +4323,11 @@ div.dolgraph div.legend table tbody tr { height: auto; } td.legendColorBox { padding: 2px 2px 2px 0 !important; } td.legendLabel { padding: 2px 2px 2px 0 !important; } td.legendLabel { - text-align: <?php echo $left; ?>; + text-align: <?php echo $left; ?>; } label.radioprivate { - white-space: nowrap; + white-space: nowrap; } .photo { @@ -4179,7 +4338,7 @@ label.radioprivate { margin-top: 10px; } div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ - margin-right: 15px; + margin-right: 15px; } .photowithborder { border: 1px solid #f0f0f0; @@ -4202,33 +4361,33 @@ div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a { content:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nographyet.svg', 1) ?>); display: inline-block; - opacity: 0.1; - background-repeat: no-repeat; + opacity: 0.1; + background-repeat: no-repeat; } .nographyettext { - opacity: 0.5; + opacity: 0.5; } div.titre { font-size: 1.1em; text-decoration: none; padding-top: 5px; - padding-bottom: 5px; - font-weight: 400; + padding-bottom: 5px; + font-weight: 400; } div.fiche > table.table-fiche-title:first-of-type div { - color: var(--colortexttitlenotab); - font-size: 1.05em; - /* text-transform: uppercase; */ - /* font-weight: 600; */ + color: var(--colortexttitlenotab); + font-size: 1.05em; + /* text-transform: uppercase; */ + /* font-weight: 600; */ } div.titre { - color: var(--colortexttitlenotab); + color: var(--colortexttitlenotab); } .secondary { - color: var(--colortexttitlenotab); + color: var(--colortexttitlenotab); } .tertiary { color: var(--colortexttitlenotab2); @@ -4247,11 +4406,11 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot .poweredbypublicpayment { float: right; top: 8px; - right: 8px; - position: absolute; - font-size: 0.8em; - color: #222; - opacity: 0.3; + right: 8px; + position: absolute; + font-size: 0.8em; + color: #222; + opacity: 0.3; } #dolpaymenttable { min-width: 290px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } @@ -4259,7 +4418,7 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot #tablepublicpayment tr.liste_total { border-bottom: 1px solid #CCCCCC !important; } #tablepublicpayment tr.liste_total td { border-top: none; } input#cardholder-name { - font-size: 1em; + font-size: 1em; } .divmainbodylarge { margin-left: 40px; margin-right: 40px; } @@ -4267,13 +4426,13 @@ input#cardholder-name { #tablesubscribe { width: 100%; } div#card-element { - border: 1px solid #ccc; + border: 1px solid #ccc; } div#card-errors { color: #fa755a; - text-align: center; - padding-top: 3px; - max-width: 320px; + text-align: center; + padding-top: 3px; + max-width: 320px; } @@ -4332,8 +4491,8 @@ div#card-errors { /* .ui-dialog-content.ui-widget-content > object { - max-height: none; - width: auto; margin-left: auto; margin-right: auto; display: block; + max-height: none; + width: auto; margin-left: auto; margin-right: auto; display: block; } */ @@ -4343,16 +4502,16 @@ div#card-errors { /* ============================================================================== */ table.valid { - /* border-top: solid 1px #E6E6E6; */ - border-<?php print $left; ?>: solid 5px #f2cf87; - /* border-<?php print $right; ?>: solid 1px #444444; - border-bottom: solid 1px #555555; */ + /* border-top: solid 1px #E6E6E6; */ + border-<?php print $left; ?>: solid 5px #f2cf87; + /* border-<?php print $right; ?>: solid 1px #444444; + border-bottom: solid 1px #555555; */ padding-top: 8px; padding-left: 10px; padding-right: 4px; padding-bottom: 4px; margin: 0px 0px; - background: #fcf8e3; + background: #fcf8e3; } .validtitre { @@ -4366,7 +4525,7 @@ table.valid { /* For tooltip using dialog */ .ui-dialog.highlight.ui-widget.ui-widget-content.ui-front { - z-index: 3000; + z-index: 3000; } div.ui-tooltip { @@ -4396,11 +4555,21 @@ div.ui-tooltip.mytooltip { /* Calendar */ /* ============================================================================== */ +/*div.divfordateinput img.ui-datepicker-trigger { + float: left; + display: inline-block; + vertical-align: middle; + padding-top: 10px; +} +.hasDatepicker { + padding-bottom: 6px; +}*/ + .ui-datepicker-calendar .ui-state-default, .ui-datepicker-calendar .ui-widget-content .ui-state-default, .ui-datepicker-calendar .ui-widget-header .ui-state-default, .ui-datepicker-calendar .ui-button, html .ui-datepicker-calendar .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { - border: unset; + border: unset; } img.datecallink { padding-left: 2px !important; padding-right: 2px !important; } @@ -4420,13 +4589,13 @@ img.datecallink { padding-left: 2px !important; padding-right: 2px !important; } margin-bottom: 5px; } table.dp { - width: 180px; - background-color: var(--inputbackgroundcolor); - border-top: solid 2px #DDDDDD; - border-<?php print $left; ?>: solid 2px #DDDDDD; - border-<?php print $right; ?>: solid 1px #222222; - border-bottom: solid 1px #222222; - padding: 0px; + width: 180px; + background-color: var(--inputbackgroundcolor); + border-top: solid 2px #DDDDDD; + border-<?php print $left; ?>: solid 2px #DDDDDD; + border-<?php print $right; ?>: solid 1px #222222; + border-bottom: solid 1px #222222; + padding: 0px; border-spacing: 0px; border-collapse: collapse; } @@ -4472,14 +4641,14 @@ table.dp { /* Bouton X fermer */ .dpInvisibleButtons { - border-style:none; - background-color:transparent; - padding:0px; - font-size: 0.85em; - border-width:0px; - color:#0B63A2; - vertical-align:middle; - cursor: pointer; + border-style:none; + background-color:transparent; + padding:0px; + font-size: 0.85em; + border-width:0px; + color:#0B63A2; + vertical-align:middle; + cursor: pointer; } .datenowlink { @@ -4492,15 +4661,15 @@ table.dp { /* ============================================================================== */ div.visible { - display: block; + display: block; } -div.hidden, td.hidden, img.hidden, span.hidden { - display: none; +div.hidden, td.hidden, img.hidden, span.hidden, div.showifmore { + display: none; } tr.visible { - display: block; + display: block; } @@ -4509,10 +4678,10 @@ tr.visible { /* ============================================================================== */ .exampleapachesetup { - overflow-y: auto; - height: 100px; - font-size: 0.8em; - border: 1px solid #aaa; + overflow-y: auto; + height: 100px; + font-size: 0.8em; + border: 1px solid #aaa; } span[phptag] { @@ -4520,16 +4689,21 @@ span[phptag] { } .nobordertransp { - border: 0px; - background-color: transparent; - background-image: none; + border: 0px; + background-color: transparent; + background-image: none; } .bordertransp { - background-color: transparent; - background-image: none; - border: none; + background-color: transparent; + background-image: none; + border: none; font-weight: normal; } +.websitebar .button.bordertransp { + color: unset; + text-decoration: unset !important; +} + .websitebar { border-bottom: 1px solid #ccc; background: #e6e6e6; @@ -4544,9 +4718,9 @@ span[phptag] { { padding: 4px 5px 4px 5px !important; margin: 2px 4px 2px 4px !important; - line-height: normal; - background: #f5f5f5 !important; - border: 1px solid #ccc !important; + line-height: normal; + background: #f5f5f5 !important; + border: 1px solid #ccc !important; } .websiteselection { /* display: inline-block; */ @@ -4563,9 +4737,9 @@ span[phptag] { padding-bottom: 3px; */ } .websiteinputurl { - display: inline-block; - vertical-align: top; - line-height: 28px; + display: inline-block; + vertical-align: top; + line-height: 28px; } .websiteiframenoborder { border: 0px; @@ -4581,9 +4755,9 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im opacity: 0.2; } .websitehelp { - vertical-align: middle; - float: right; - padding-top: 8px; + vertical-align: middle; + float: right; + padding-top: 8px; } .websiteselectionsection { border-left: 1px solid #bbb; @@ -4593,7 +4767,11 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im margin-right: 5px; } .websitebar input#previewpageurl { - line-height: 1em; + line-height: 1em; +} + +#divbodywebsite section p { + margin: unset; } @@ -4603,7 +4781,7 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im /* ============================================================================== */ .dayevent .tagtr:first-of-type { - height: 24px; + height: 24px; } .agendacell { height: 60px; } @@ -4629,10 +4807,10 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important .cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-<?php print $left; ?>: 1px !important; padding-<?php print $right; ?>: 1px !important; } .cal_impair { background: linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); - background: -o-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); - background: -moz-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); - background: -webkit-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); - /* background: -ms-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); */ + background: -o-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); + background: -moz-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); + background: -webkit-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); + /* background: -ms-linear-gradient(bottom, var(--colorbacklinepair1) 85%, var(--colorbacklinepair2) 100%); */ } .cal_today_peruser_impair { background: #F8F8F0; } .peruser_busy { } @@ -4640,7 +4818,7 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important 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-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; } -table.cal_event td.cal_event { padding: 4px 4px !important; } +table.cal_event td.cal_event { padding: 4px 4px !important; padding-bottom: 2px !important; padding-top: 2px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; } .cal_event { font-size: 1em; } .cal_event a:link { color: #111111; font-weight: normal !important; } @@ -4653,7 +4831,7 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; } 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; + padding-left: 8px; } .calendarviewcontainertr { height: 100px; } @@ -4672,28 +4850,28 @@ td.cal_other_month { .ui-autocomplete-loading { background: white url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/working.gif', 1) ?>) right center no-repeat; } .ui-autocomplete { - position:absolute; - width:auto; - font-size: 1.0em; - background-color: var(--inputbackgroundcolor); - border:1px solid #888; - margin:0px; + position:absolute; + width:auto; + font-size: 1.0em; + background-color: var(--inputbackgroundcolor); + border:1px solid #888; + margin:0px; /* padding:0px; This make combo crazy */ - } + } .ui-autocomplete ul { - list-style-type:none; - margin:0px; - padding:0px; - } + list-style-type:none; + margin:0px; + padding:0px; + } .ui-autocomplete ul li.selected { background-color: var(--inputbackgroundcolor);} .ui-autocomplete ul li { - list-style-type:none; - display:block; - margin:0; - padding:2px; - height:18px; - cursor:pointer; - } + list-style-type:none; + display:block; + margin:0; + padding:2px; + height:18px; + cursor:pointer; + } /* ============================================================================== */ @@ -4869,22 +5047,22 @@ A.none, A.none:active, A.none:visited, A.none:hover { /* Style to overwrites JQuery styles */ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { - border: 1px solid #888; - background: var(--colorbacktitle1); - color: unset; + border: 1px solid #888; + background: var(--colorbacktitle1); + color: unset; } .ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - font-weight: normal; - font-family:<?php echo $fontlist; ?>; - font-size:1em; + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + font-weight: normal; + font-family:<?php echo $fontlist; ?>; + font-size:1em; } .ui-widget { - font-family:<?php echo $fontlist; ?>; + font-family:<?php echo $fontlist; ?>; } /* .ui-button { margin-left: -2px; <?php print (preg_match('/chrome/', $conf->browser->name) ? 'padding-top: 1px;' : ''); ?> } */ .ui-button { margin-left: -2px; } @@ -4892,7 +5070,7 @@ A.none, A.none:active, A.none:visited, A.none:hover { .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: 2px 0px 6px 0px; } .ui-button-text { - line-height: 1em !important; + line-height: 1em !important; } .ui-autocomplete-input { margin: 0; padding: 4px; } @@ -4902,28 +5080,28 @@ A.none, A.none:active, A.none:visited, A.none:hover { /* ============================================================================== */ body.cke_show_borders { - margin: 5px !important; + margin: 5px !important; } .cke_dialog { - border: 1px #bbb solid ! important; + border: 1px #bbb solid ! important; } /*.cke_editor table, .cke_editor tr, .cke_editor td { - border: 0px solid #FF0000 !important; + border: 0px solid #FF0000 !important; } span.cke_skin_kama { padding: 0 !important; }*/ .cke_wrapper { padding: 4px !important; } a.cke_dialog_ui_button { - font-family: <?php print $fontlist ?> !important; + font-family: <?php print $fontlist ?> !important; background-image: url(<?php echo $img_button ?>) !important; background-position: bottom !important; - border: 1px solid #C0C0C0 !important; + border: 1px solid #C0C0C0 !important; -webkit-border-radius:0px 5px 0px 5px !important; border-radius:0px 5px 0px 5px !important; - -webkit-box-shadow: 3px 3px 4px #DDD !important; - box-shadow: 3px 3px 4px #DDD !important; + -webkit-box-shadow: 3px 3px 4px #DDD !important; + box-shadow: 3px 3px 4px #DDD !important; } .cke_dialog_ui_hbox_last { @@ -4937,8 +5115,8 @@ a.cke_dialog_ui_button } */ a.cke_dialog_ui_button_ok span { - text-shadow: none !important; - color: #333 !important; + text-shadow: none !important; + color: #333 !important; } @@ -4946,28 +5124,28 @@ a.cke_dialog_ui_button_ok span { /* ACE editor */ /* ============================================================================== */ .ace_editor { - border: 1px solid #ddd; + border: 1px solid #ddd; margin: 0; } .aceeditorstatusbar { - margin: 0; - padding: 0; - padding-<?php echo $left; ?>: 10px; - left: 0; - right: 0; - bottom: 0; - background-color: #ebebeb; - height: 28px; - line-height: 2.2em; + margin: 0; + padding: 0; + padding-<?php echo $left; ?>: 10px; + left: 0; + right: 0; + bottom: 0; + background-color: #ebebeb; + height: 28px; + line-height: 2.2em; } .ace_status-indicator { - color: gray; - position: relative; - right: 0; - border-left: 1px solid; + color: gray; + position: relative; + right: 0; + border-left: 1px solid; } pre#editfilecontentaceeditorid { - margin-top: 5px; + margin-top: 5px; } @@ -4976,7 +5154,7 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ .template-upload { - height: 72px !important; + height: 72px !important; } @@ -4997,32 +5175,32 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ #types .btn { - cursor: pointer; + cursor: pointer; } #types .btn-primary { - font-weight: bold; + font-weight: bold; } #types form { - padding: 20px; + padding: 20px; } #types label { - display:inline-block; - width:100px; - margin-right: 20px; - padding: 4px; - text-align: right; - vertical-align: top; + display:inline-block; + width:100px; + margin-right: 20px; + padding: 4px; + text-align: right; + vertical-align: top; } #types input.text, #types textarea { - width: 400px; + width: 400px; } #types textarea { - height: 100px; + height: 100px; } @@ -5034,55 +5212,55 @@ pre#editfilecontentaceeditorid { box-sizing:border-box; } #comment .comment { - border-radius:7px; - margin-bottom:10px; - overflow:hidden; + border-radius:7px; + margin-bottom:10px; + overflow:hidden; } #comment .comment-table { - display:table; - height:100%; + display:table; + height:100%; } #comment .comment-cell { - display:table-cell; + display:table-cell; } #comment .comment-info { - font-size:0.8em; - border-right:1px solid #dedede; - margin-right:10px; - width:160px; - text-align:center; - background:rgba(255,255,255,0.5); - vertical-align:middle; - padding:10px 2px; + font-size:0.8em; + border-right:1px solid #dedede; + margin-right:10px; + width:160px; + text-align:center; + background:rgba(255,255,255,0.5); + vertical-align:middle; + padding:10px 2px; } #comment .comment-info a { - color:inherit; + color:inherit; } #comment .comment-right { - vertical-align:top; + vertical-align:top; } #comment .comment-description { - padding:10px; - vertical-align:top; + padding:10px; + vertical-align:top; } #comment .comment-delete { - width: 100px; - text-align:center; - vertical-align:middle; + width: 100px; + text-align:center; + vertical-align:middle; } #comment .comment-delete:hover { - background:rgba(250,20,20,0.8); + background:rgba(250,20,20,0.8); } #comment .comment-edit { - width: 100px; - text-align:center; - vertical-align:middle; + width: 100px; + text-align:center; + vertical-align:middle; } #comment .comment-edit:hover { - background:rgba(0,184,148,0.8); + background:rgba(0,184,148,0.8); } #comment textarea { - width: 100%; + width: 100%; } @@ -5096,7 +5274,7 @@ div.scroll2 { } div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead { - line-height: 2; + line-height: 2; } .gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate { @@ -5109,50 +5287,50 @@ div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend { color: #000 !important; } div.gTaskInfo { - background: #f0f0f0 !important; + background: #f0f0f0 !important; } .gtaskblue { background: rgb(108,152,185) !important; } .gtaskgreen { - background: rgb(160,173,58) !important; + background: rgb(160,173,58) !important; } td.gtaskname { - overflow: hidden; - text-overflow: ellipsis; + overflow: hidden; + text-overflow: ellipsis; } td.gminorheadingwkend { - color: #888 !important; + color: #888 !important; } td.gminorheading { - color: #666 !important; + color: #666 !important; } .glistlbl, .glistgrid { width: 582px !important; } /*.gtaskname div, .gtaskname { - min-width: 250px !important; - max-width: 250px !important; - width: 250px !important; + min-width: 250px !important; + max-width: 250px !important; + width: 250px !important; }*/ .gtaskname div, .gtaskname { - min-width: 250px !important; - max-width: unset !important; - width: unset !important; + min-width: 250px !important; + max-width: unset !important; + width: unset !important; } .gpccomplete div, .gpccomplete { - min-width: 40px !important; - max-width: 40px !important; - width: 40px !important; + min-width: 40px !important; + max-width: 40px !important; + width: 40px !important; } td.gtaskheading.gstartdate, td.gtaskheading.genddate { - white-space: break-spaces; + white-space: break-spaces; } .gtasktableh tr:nth-child(2) td:nth-child(2), .gtasktableh tr:nth-child(2) td:nth-child(3), .gtasktableh tr:nth-child(2) td:nth-child(4), .gtasktableh tr:nth-child(2) td:nth-child(5), .gtasktableh tr:nth-child(2) td:nth-child(6), .gtasktableh tr:nth-child(2) td:nth-child(7) { - color: transparent !important; - border-left: none; - border-right: none; - border-top: none; + color: transparent !important; + border-left: none; + border-right: none; + border-top: none; } /* ============================================================================== */ @@ -5176,25 +5354,25 @@ td.gtaskheading.gstartdate, td.gtaskheading.genddate { } div.filedirelem { - position: relative; - display: block; - text-decoration: none; + position: relative; + display: block; + text-decoration: none; } ul.filedirelem { - padding: 2px; - margin: 0 5px 5px 5px; + padding: 2px; + margin: 0 5px 5px 5px; } ul.filedirelem li { - list-style: none; - padding: 2px; - margin: 0 10px 20px 10px; - width: 160px; - height: 120px; - text-align: center; - display: block; - float: <?php print $left; ?>; - border: solid 1px #DDDDDD; + list-style: none; + padding: 2px; + margin: 0 10px 20px 10px; + width: 160px; + height: 120px; + text-align: center; + display: block; + float: <?php print $left; ?>; + border: solid 1px #DDDDDD; } ul.ecmjqft { @@ -5225,7 +5403,7 @@ ul.ecmjqft a:active { font-weight: bold !important; } ul.ecmjqft a:hover { - text-decoration: underline; + text-decoration: underline; } div.ecmjqft { vertical-align: middle; @@ -5239,16 +5417,16 @@ div.ecmjqft { min-height: 40px; } #ecm-layout-north div.attachareaformuserfileecm { - padding-bottom: 0px; + padding-bottom: 0px; } div#ecm-layout-west { - width: 380px; - vertical-align: top; + width: 380px; + vertical-align: top; } div#ecm-layout-center { - width: calc(100% - 390px); - vertical-align: top; - float: right; + width: calc(100% - 390px); + vertical-align: top; + float: right; } .ecmjqft LI.directory { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2.png', 1); ?>) left top no-repeat; } @@ -5278,14 +5456,14 @@ div#ecm-layout-center { font-weight: normal; } .jnotify-container .jnotify-notification-warning .jnotify-close, .jnotify-container .jnotify-notification-warning .jnotify-message { - color: #a28918 !important; + color: #a28918 !important; } /* use or not ? */ div.jnotify-background { opacity : 0.95 !important; - -webkit-box-shadow: 2px 2px 4px #888 !important; - box-shadow: 2px 2px 4px #888 !important; + -webkit-box-shadow: 2px 2px 4px #888 !important; + box-shadow: 2px 2px 4px #888 !important; } /* ============================================================================== */ @@ -5348,7 +5526,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { .paginate_button { font-weight: normal !important; - text-decoration: none !important; + text-decoration: none !important; } .paging_full_numbers { height: inherit !important; @@ -5361,7 +5539,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { border-radius: inherit !important; } .paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover { - background-color: var(--colorbackbody) !important; + background-color: var(--colorbackbody) !important; } .paginate_button, .paginate_active { border: 1px solid #ddd !important; @@ -5400,23 +5578,23 @@ span.select2-selection--single.flat[aria-disabled="true"] span.select2-selection } span#select2-taskid-container[title^='--'] { - opacity: 0.3; + opacity: 0.3; } .select2-container--default .select2-results__option--highlighted[aria-selected] { - background-color: rgb(<?php echo $colorbackhmenu1 ?>); - color: var(--colortextbackhmenu); + background-color: rgb(<?php echo $colorbackhmenu1 ?>); + color: var(--colortextbackhmenu); } .select2-container--default .select2-results__option--highlighted[aria-selected] span { - color: #fff !important; + color: #fff !important; } span.select2.select2-container.select2-container--default { <?php if (empty($conf->global->THEME_SHOW_BORDER_ON_INPUT)) { ?> - border-left: none; - border-top: none; - border-right: none; - <?php } ?> + border-left: none; + border-top: none; + border-right: none; + <?php } ?> } input.select2-input { border-bottom: none ! important; @@ -5436,36 +5614,36 @@ input.select2-input { border: none; } .select2-container--focus span.select2-selection.select2-selection--single { - border-bottom: 1px solid #666 !important; + border-bottom: 1px solid #666 !important; } .blockvmenusearch .select2-container--default .select2-selection--single, .blockvmenubookmarks .select2-container--default .select2-selection--single { - background-color: var(--colorbackvmenu1); + background-color: var(--colorbackvmenu1); } .select2-container--default .select2-selection--single { - background-color: var(--colorbackbody); + background-color: var(--colorbackbody); } #blockvmenusearch .select2-container--default .select2-selection--single .select2-selection__placeholder { - color: var(--colortextbackvmenu); + color: var(--colortextbackvmenu); } .select2-container--default .select2-selection--single .select2-selection__rendered { - color: var(--colortext); - /* background-color: var(--colorbackvmenu1); */ + color: var(--colortext); + /* background-color: var(--colorbackvmenu1); */ } .select2-default { - color: #999 !important; + color: #999 !important; } .select2-choice, .select2-container .select2-choice { border-bottom: solid 1px rgba(0,0,0,.4); } .select2-container .select2-choice > .select2-chosen { - margin-right: 23px; + margin-right: 23px; } .select2-container .select2-choice .select2-arrow { border-radius: 0; - background: transparent; + background: transparent; } .select2-container-multi .select2-choices { background-image: none; @@ -5492,7 +5670,7 @@ input.select2-input { box-shadow: none !important; } .select2-container--open .select2-dropdown--above { - border-bottom: solid 1px var(--inputbordercolor); + border-bottom: solid 1px var(--inputbordercolor); } .select2-drop.select2-drop-above.select2-drop-active { border-top: 1px solid #ccc; @@ -5540,7 +5718,7 @@ input.select2-input { -webkit-box-shadow: none !important; box-shadow: none !important; border-radius: 0 !important; - color: black; + /* color: black; */ } .select2-container-active .select2-choice, .select2-container-active .select2-choices { @@ -5639,34 +5817,36 @@ a span.select2-chosen } .select2-container--default .select2-results>.select2-results__options{ - max-height: 400px; + max-height: 400px; } /* Special case for the select2 add widget */ #addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen { - text-align: <?php echo $left; ?>; - opacity: 0.4; + text-align: <?php echo $left; ?>; + opacity: 0.4; } .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--colortext); opacity: 0.4; } span#select2-boxbookmark-container, span#select2-boxcombo-container { - text-align: <?php echo $left; ?>; - opacity: 0.4; + text-align: <?php echo $left; ?>; +} +span#select2-boxbookmark-container { + opacity: 0.4; } .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 6px; } /* Style used before the select2 js is executed on boxcombo */ #boxbookmark.boxcombo, #boxcombo.boxcombo { - text-align: left; - opacity: 0.4; - border-bottom: solid 1px rgba(0,0,0,.4) !important; - height: 26px; - line-height: 24px; - padding: 0 0 2px 0; - vertical-align: top; + text-align: left; + opacity: 0.4; + border-bottom: solid 1px rgba(0,0,0,.4) !important; + height: 26px; + line-height: 24px; + padding: 0 0 2px 0; + vertical-align: top; } /* To emulate select 2 style */ @@ -5720,7 +5900,7 @@ span#select2-boxbookmark-container, span#select2-boxcombo-container { border-radius: 5px !important; box-shadow: none; -webkit-box-shadow: none !important; - box-shadow: none !important; + box-shadow: none !important; } span.noborderoncategories a, li.noborderoncategories a { line-height: normal; @@ -5810,9 +5990,9 @@ span.noborderoncategories { } .multi-select-menuitem { - clear: both; - float: left; - padding-left: 5px + clear: both; + float: left; + padding-left: 5px } @@ -5821,52 +6001,52 @@ span.noborderoncategories { /* ============================================================================== */ ul.ulselectedfields { - z-index: 95; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ + z-index: 95; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ } dl.dropdown { - margin:0px; + margin:0px; margin-left: 2px; - margin-right: 2px; - padding:0px; - vertical-align: middle; - display: inline-block; + margin-right: 2px; + padding:0px; + vertical-align: middle; + display: inline-block; } .dropdown dd, .dropdown dt { - margin:0px; - padding:0px; + margin:0px; + padding:0px; } .dropdown ul { - margin: -1px 0 0 0; - text-align: <?php echo $left; ?>; + margin: -1px 0 0 0; + text-align: <?php echo $left; ?>; } .dropdown dd { - position:relative; + position:relative; } .dropdown dt a { - display:block; - overflow: hidden; - border:0; + display:block; + overflow: hidden; + border:0; } .dropdown dt a span, .multiSel span { - cursor:pointer; - display:inline-block; - padding: 0 3px 2px 0; + cursor:pointer; + display:inline-block; + padding: 0 3px 2px 0; } .dropdown span.value { - display:none; + display:none; } .dropdown dd ul { - background-color: var(--inputbackgroundcolor); - box-shadow: 1px 1px 10px #aaa; - display:none; - <?php echo $right; ?>:0px; /* pop is align on right */ - padding: 0 0 0 0; - position:absolute; - top:2px; - list-style:none; - max-height: 264px; - overflow: auto; - border-radius: 2px; + background-color: var(--inputbackgroundcolor); + box-shadow: 1px 1px 10px #aaa; + display:none; + <?php echo $right; ?>:0px; /* pop is align on right */ + padding: 0 0 0 0; + position:absolute; + top:2px; + list-style:none; + max-height: 264px; + overflow: auto; + border-radius: 2px; } .dropdown dd ul li { white-space: nowrap; @@ -5879,22 +6059,22 @@ dl.dropdown { background: #eee; } .dropdown dd ul li input[type="checkbox"] { - margin-<?php echo $right; ?>: 3px; + margin-<?php echo $right; ?>: 3px; } .dropdown dd ul li a, .dropdown dd ul li span { - padding: 3px; - display: block; + padding: 3px; + display: block; } .dropdown dd ul li span { color: #888; } /*.dropdown dd ul li a:hover { - background-color: var(--inputbackgroundcolor); + background-color: var(--inputbackgroundcolor); }*/ dd.dropdowndd ul li { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } @@ -5916,18 +6096,18 @@ dd.dropdowndd ul li { /* ============================================================================== */ .searchpage .tagtr .tagtd { - padding-bottom: 3px; + padding-bottom: 3px; } .searchpage .tagtr .tagtd .button { background: unset; - border: unset; + border: unset; } li.ui-li-divider .ui-link { color: #FFF !important; } .ui-btn { - margin: 0.1em 2px + margin: 0 2px; } a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-inner:hover { text-decoration: none !important; @@ -5956,16 +6136,16 @@ a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-i padding-left: 30px; } .ui-select .ui-btn-icon-right .ui-icon { - right: 8px; + right: 8px; } .ui-btn-icon-left > .ui-btn-inner > .ui-icon, .ui-btn-icon-right > .ui-btn-inner > .ui-icon { - margin-top: -10px; + margin-top: -10px; } select { - /* display: inline-block; */ /* We can't set this. This disable ability to make */ - overflow:hidden; - white-space: nowrap; /* Enabling this make behaviour strange when selecting the empty value if this empty value is '' instead of '&nbsp;' */ - text-overflow: ellipsis; + /* display: inline-block; */ /* We can't set this. This disable ability to make */ + overflow:hidden; + white-space: nowrap; /* Enabling this make behaviour strange when selecting the empty value if this empty value is '' instead of '&nbsp;' */ + text-overflow: ellipsis; } .fiche .ui-controlgroup { margin: 0px; @@ -6048,40 +6228,40 @@ ul.ulmenu { /* Style for first level menu with jmobile */ .ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { - padding: 1em 15px; - display: block; + padding: 1em 15px; + display: block; } .ui-btn-up-c { font-weight: normal; } .ui-focus, .ui-btn:focus { - -webkit-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } .ui-bar-b { - /*border: 1px solid #888;*/ - border: none; - background: none; - text-shadow: none; - color: var(--colortexttitlenotab) !important; + /*border: 1px solid #888;*/ + border: none; + background: none; + text-shadow: none; + color: var(--colortexttitlenotab) !important; } .ui-bar-b, .lilevel0 { - background-repeat: repeat-x; - border: none; - background: none; - text-shadow: none; - color: var(--colortexttitlenotab) !important; + background-repeat: repeat-x; + border: none; + background: none; + text-shadow: none; + color: var(--colortexttitlenotab) !important; } .alilevel0 { font-weight: normal !important; } .ui-li.ui-last-child, .ui-li.ui-field-contain.ui-last-child { - border-bottom-width: 0px !important; + border-bottom-width: 0px !important; } .alilevel0 { - color: var(--colortexttitle) !important; - background: #f8f8f8 + color: var(--colortexttitle) !important; + background: var(--colorbackmobilemenu); } .ulmenu { box-shadow: none !important; @@ -6109,11 +6289,11 @@ div.tabsElem a.tab { background: transparent; } .alilevel1 { - color: var(--colortexttitlenotab) !important; + color: var(--colortexttitlenotab) !important; } .lilevel1 { - border-top: 2px solid #444; - background: #fff ! important; + border-top: 2px solid #444; + background: #fff ! important; } .lilevel1 div div a { font-weight: bold !important; @@ -6121,7 +6301,7 @@ div.tabsElem a.tab { .lilevel2 { padding-left: 22px; - background: #fff ! important; + background: #fff ! important; } .lilevel3 { @@ -6131,12 +6311,12 @@ div.tabsElem a.tab { .lilevel4 { padding-left: 66px; - background: #fff ! important; + background: #fff ! important; } .lilevel5 { padding-left: 88px; - background: #fff ! important; + background: #fff ! important; } @@ -6145,12 +6325,6 @@ div.tabsElem a.tab { /* POS */ /* ============================================================================== */ -.menu_choix1 a { - background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/money.png', 1) ?>') top left no-repeat; -} -.menu_choix2 a { - background: url('<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus_black/home.png', 1) ?>') top left no-repeat; -} .menu_choix1,.menu_choix2 { font-size: 1.4em; text-align: left; @@ -6162,7 +6336,7 @@ div.tabsElem a.tab { color: #fff; text-decoration: none; padding-top: 18px; - padding-left: 54px; + padding-left: 10px; font-size: 14px; height: 38px; } @@ -6170,14 +6344,14 @@ div.tabsElem a.tab { color: #6d3f6d; } .menu li.menu_choix1 { - padding-top: 6px; - padding-right: 10px; - padding-bottom: 2px; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 2px; } .menu li.menu_choix2 { - padding-top: 6px; - padding-right: 10px; - padding-bottom: 2px; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 2px; } @media only screen and (max-width: 767px) { @@ -6186,13 +6360,13 @@ div.tabsElem a.tab { height: 30px; padding-left: 40px; } - .menu li.menu_choix1, .menu li.menu_choix2 { - padding-left: 4px; - padding-right: 0; - } - .liste_articles { - margin-right: 0 !important; - } + .menu li.menu_choix1, .menu li.menu_choix2 { + padding-left: 4px; + padding-right: 0; + } + .liste_articles { + margin-right: 0 !important; + } } @@ -6220,7 +6394,7 @@ div.tabsElem a.tab { .ticketpublicarea { margin-left: 15%; - margin-right: 15%; + margin-right: 15%; } .publicnewticketform { /* margin-top: 25px !important; */ @@ -6228,12 +6402,13 @@ div.tabsElem a.tab { .ticketlargemargin { padding-left: 50px; padding-right: 50px; - padding-top: 10px; + padding-top: 30px; } @media only screen and (max-width: 767px) { .ticketlargemargin { padding-left: 5px; padding-right: 5px; + padding-top: 10px; } .ticketpublicarea { margin-left: 10px; @@ -6258,11 +6433,11 @@ div.tabsElem a.tab { } @media only screen and (min-width: 1170px) { #cd-timeline { - margin-bottom: 3em; + margin-bottom: 3em; } #cd-timeline::before { - left: 50%; - margin-left: -2px; + left: 50%; + margin-left: -2px; } } @@ -6283,13 +6458,13 @@ div.tabsElem a.tab { } @media only screen and (min-width: 1170px) { .cd-timeline-block { - margin: 4em 0; + margin: 4em 0; } .cd-timeline-block:first-child { - margin-top: 0; + margin-top: 0; } .cd-timeline-block:last-child { - margin-bottom: 0; + margin-bottom: 0; } } @@ -6324,80 +6499,80 @@ div.tabsElem a.tab { } @media only screen and (min-width: 1170px) { .cd-timeline-img { - width: 60px; - height: 60px; - left: 50%; - margin-left: -30px; - /* Force Hardware Acceleration in WebKit */ - -webkit-transform: translateZ(0); - -webkit-backface-visibility: hidden; + width: 60px; + height: 60px; + left: 50%; + margin-left: -30px; + /* Force Hardware Acceleration in WebKit */ + -webkit-transform: translateZ(0); + -webkit-backface-visibility: hidden; } .cssanimations .cd-timeline-img.is-hidden { - visibility: hidden; + visibility: hidden; } .cssanimations .cd-timeline-img.bounce-in { - visibility: visible; - -webkit-animation: cd-bounce-1 0.6s; - -moz-animation: cd-bounce-1 0.6s; - animation: cd-bounce-1 0.6s; + visibility: visible; + -webkit-animation: cd-bounce-1 0.6s; + -moz-animation: cd-bounce-1 0.6s; + animation: cd-bounce-1 0.6s; } } @-webkit-keyframes cd-bounce-1 { 0% { - opacity: 0; - -webkit-transform: scale(0.5); + opacity: 0; + -webkit-transform: scale(0.5); } 60% { - opacity: 1; - -webkit-transform: scale(1.2); + opacity: 1; + -webkit-transform: scale(1.2); } 100% { - -webkit-transform: scale(1); + -webkit-transform: scale(1); } } @-moz-keyframes cd-bounce-1 { 0% { - opacity: 0; - -moz-transform: scale(0.5); + opacity: 0; + -moz-transform: scale(0.5); } 60% { - opacity: 1; - -moz-transform: scale(1.2); + opacity: 1; + -moz-transform: scale(1.2); } 100% { - -moz-transform: scale(1); + -moz-transform: scale(1); } } @keyframes cd-bounce-1 { 0% { - opacity: 0; - -webkit-transform: scale(0.5); - -moz-transform: scale(0.5); - -ms-transform: scale(0.5); - -o-transform: scale(0.5); - transform: scale(0.5); + opacity: 0; + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -ms-transform: scale(0.5); + -o-transform: scale(0.5); + transform: scale(0.5); } 60% { - opacity: 1; - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -ms-transform: scale(1.2); - -o-transform: scale(1.2); - transform: scale(1.2); + opacity: 1; + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -ms-transform: scale(1.2); + -o-transform: scale(1.2); + transform: scale(1.2); } 100% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } .cd-timeline-content { @@ -6449,58 +6624,58 @@ div.tabsElem a.tab { } @media only screen and (min-width: 768px) { .cd-timeline-content h2 { - font-size: 20px; - font-size: 1.25rem; + font-size: 20px; + font-size: 1.25rem; } .cd-timeline-content { - font-size: 16px; - font-size: 1rem; + font-size: 16px; + font-size: 1rem; } .cd-timeline-content .cd-read-more, .cd-timeline-content .cd-date { - font-size: 14px; - font-size: 0.875rem; + font-size: 14px; + font-size: 0.875rem; } } @media only screen and (min-width: 1170px) { .cd-timeline-content { - margin-left: 0; - padding: 1.6em; - width: 43%; + margin-left: 0; + padding: 1.6em; + width: 43%; } .cd-timeline-content::before { - top: 24px; - left: 100%; - border-color: transparent; - border-left-color: white; + top: 24px; + left: 100%; + border-color: transparent; + border-left-color: white; } .cd-timeline-content .cd-read-more { - float: left; + float: left; } .cd-timeline-content .cd-date { - position: absolute; - width: 55%; - left: 115%; - top: 6px; - font-size: 16px; - font-size: 1rem; + position: absolute; + width: 55%; + left: 115%; + top: 6px; + font-size: 16px; + font-size: 1rem; } .cd-timeline-block:nth-child(even) .cd-timeline-content { - float: right; + float: right; } .cd-timeline-block:nth-child(even) .cd-timeline-content::before { - top: 24px; - left: auto; - right: 100%; - border-color: transparent; - border-right-color: white; + top: 24px; + left: auto; + right: 100%; + border-color: transparent; + border-right-color: white; } .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more { - float: right; + float: right; } .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-date { - left: auto; - right: 115%; - text-align: right; + left: auto; + right: 115%; + text-align: right; } } @@ -6514,21 +6689,21 @@ div.phpdebugbar * { font-weight: unset; } span.phpdebugbar-tooltip.phpdebugbar-tooltip-extra-wide, span.phpdebugbar-tooltip.phpdebugbar-tooltip-wide { - width: 250px !important; + width: 250px !important; } .phpdebugbar-indicator span.phpdebugbar-tooltip { - opacity: .95 !important; + opacity: .95 !important; } a.phpdebugbar-tab.phpdebugbar-active { background-image: unset !important; } .phpdebugbar-fa-tags:before { - content: "\f121"; - font-weight: 600 !important; + content: "\f121"; + font-weight: 600 !important; } .phpdebugbar-fa-tasks:before { - content: "\f550"; - font-weight: 600 !important; + content: "\f550"; + font-weight: 600 !important; } .phpdebugbar-fa-tags, .phpdebugbar-fa-tasks, .phpdebugbar-indicator .fa { font-family: "Font Awesome 5 Free"; @@ -6557,10 +6732,19 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before /* ============================================================================== */ .dol-xaxis-vertical .flot-x-axis .flot-tick-label.tickLabel { - text-orientation: sideways; - font-weight: 400; - writing-mode: vertical-rl; - white-space: nowrap; + text-orientation: sideways; + font-weight: 400; + writing-mode: vertical-rl; + white-space: nowrap; +} + + +/* ============================================================================== */ +/* For copypaste feature */ +/* ============================================================================== */ + +.clipboardCPShowOnHover .clipboardCPButton { + display: none; } @@ -6585,14 +6769,14 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before width: <?php print dol_size(350, 'width'); ?>px; } - div.tabBar { - padding-left: 0px; - padding-right: 0px; - -webkit-border-radius: 0; - border-radius: 0px; - border-right: none; - border-left: none; - } + div.tabBar { + padding-left: 0px; + padding-right: 0px; + -webkit-border-radius: 0; + border-radius: 0px; + border-right: none; + border-left: none; + } } @media only screen and (max-width: 1024px) @@ -6611,27 +6795,27 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before @media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC1) ? round($nbtopmenuentries * 90, 0) + 340 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC1; ?>px) /* reduction 1 */ { div.tmenucenter { - width: <?php echo round(52); ?>px; /* size of viewport */ - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: var(--colortextbackhmenu); + width: <?php echo round(52); ?>px; /* size of viewport */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: var(--colortextbackhmenu); } .mainmenuaspan { - font-size: 0.9em; - padding-right: 0; - } - .topmenuimage { - background-size: 22px auto; - margin-top: 0px; + font-size: 0.9em; + padding-right: 0; + } + .topmenuimage { + background-size: 22px auto; + margin-top: 0px; } - li.tmenu, li.tmenusel { - min-width: 36px; - } - div.mainmenu { - min-width: auto; - } + li.tmenu, li.tmenusel { + min-width: 36px; + } + div.mainmenu { + min-width: auto; + } div.tmenuleft { display: none; } @@ -6650,21 +6834,21 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before height: 23px; } div.tmenucenter { - max-width: <?php echo round(26); ?>px; /* size of viewport */ - text-overflow: clip; + max-width: <?php echo round(26); ?>px; /* size of viewport */ + text-overflow: clip; } span.mainmenuaspan { - margin-left: 1px; + margin-left: 1px; } .mainmenuaspan { - font-size: 0.9em; - padding-left: 0; - padding-right: 0; - } - .topmenuimage { - background-size: 20px auto; - margin-top: 2px; - left: 4px; + font-size: 0.9em; + padding-left: 0; + padding-right: 0; + } + .topmenuimage { + background-size: 20px auto; + margin-top: 2px; + left: 4px; } .dropdown dd ul { @@ -6678,16 +6862,16 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before z-index: 200; background: var(--colorbackvmenu1); padding-top: 70px; - } + } #id-left { - z-index: 201; + z-index: 201; background: var(--colorbackvmenu1); } - .login_vertical_align { - padding-left: 20px; - padding-right: 20px; - } + .login_vertical_align { + padding-left: 20px; + padding-right: 20px; + } /* Reduce login top right info */ .help { @@ -6707,34 +6891,34 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before width: 100%; } div.login_block a { - color: unset; - } + color: unset; + } div.login_block { /* Style when phone layout or when using the menuhider */ padding-top: 10px; padding-left: 20px; - padding-right: 20px; - padding-bottom: 16px; + padding-right: 20px; + padding-bottom: 16px; top: inherit !important; left: 0 !important; text-align: center; - vertical-align: middle; + vertical-align: middle; background: var(--colorbackvmenu1); - height: 50px; + height: 50px; - z-index: 202; - min-width: 200px; /* must be width of menu + padding + padding of sidenav */ - max-width: 200px; /* must be width of menu + padding + padding of sidenav */ - width: 200px; /* must be width of menu + padding + padding of sidenav */ - } - .side-nav-vert .user-menu .dropdown-menu { - width: 234px !important; - } - div.login_block_other { - margin-right: unset; - } + z-index: 202; + min-width: 200px; /* must be width of menu + padding + padding of sidenav */ + max-width: 200px; /* must be width of menu + padding + padding of sidenav */ + width: 200px; /* must be width of menu + padding + padding of sidenav */ + } + .side-nav-vert .user-menu .dropdown-menu { + width: 234px !important; + } + div.login_block_other { + margin-right: unset; + } div.login_block_user, div.login_block_other { clear: both; } .atoplogin, .atoplogin:hover { @@ -6746,32 +6930,32 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before padding: 0 !important; height: 38px; } - li.tmenu, li.tmenusel { - min-width: 32px; - } + li.tmenu, li.tmenusel { + min-width: 32px; + } div.mainmenu { height: 23px; } div.tmenucenter { - text-overflow: clip; + text-overflow: clip; } - .topmenuimage { - background-size: 20px auto; - margin-top: 2px !important; - left: 2px; + .topmenuimage { + background-size: 20px auto; + margin-top: 2px !important; + left: 2px; } div.mainmenu { - min-width: 20px; - } + min-width: 20px; + } .titlefield { - width: auto !important; /* We want to ignore the 30%, try to use more if you can */ + width: auto !important; /* We want to ignore the 30%, try to use more if you can */ } .tableforfield>tr>td:first-child, .tableforfield>tbody>tr>td:first-child, div.tableforfield div.tagtr>div.tagtd:first-of-type { - /* max-width: 100px; */ /* but no more than 100px */ + /* max-width: 100px; */ /* but no more than 100px */ } .tableforfield>tr>td:nth-child(2), .tableforfield>tbody>tr>td:nth-child(2), div.tableforfield div.tagtr>div.tagtd:nth-child(2) { - word-break: break-word; + word-break: break-word; } .badge { min-width: auto; @@ -6813,7 +6997,9 @@ include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0); include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0); include dol_buildpath($path.'/theme/'.$theme.'/timeline.inc.php', 0); -if (!empty($conf->global->THEME_CUSTOM_CSS)) print $conf->global->THEME_CUSTOM_CSS; +if (!empty($conf->global->THEME_CUSTOM_CSS)) { + print $conf->global->THEME_CUSTOM_CSS; +} ?> diff --git a/htdocs/theme/eldy/img/index.html b/htdocs/theme/eldy/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/eldy/img/menus/README.md b/htdocs/theme/eldy/img/menus/README.md deleted file mode 100644 index 72f376c3f2b..00000000000 --- a/htdocs/theme/eldy/img/menus/README.md +++ /dev/null @@ -1,14 +0,0 @@ - -Tutorial to create a new image for menu: - -1) First find an image. -2) With Gimp, open image and check there is a alpha channel. If not add one (Menu Color - Convert to alpha). -3) Convert image into black and white (Menu Image - Mode - Grey levels). -4) Use the degrade tool with option (Menu Tools - Paint - Degrade - CTRL+L): -* Mode: Erase color (you can also try "Clear only") -* Opacity: 50 +/- -* Offset: 0 -* PP toward transparent -* Shape: Linear -* Select on image top of file and drag to bottom. -Il est possible aussi d'augmenter la transparence globale depuis le calque. diff --git a/htdocs/theme/eldy/img/menus/agenda.png b/htdocs/theme/eldy/img/menus/agenda.png deleted file mode 100644 index 0caf60eb271..00000000000 Binary files a/htdocs/theme/eldy/img/menus/agenda.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/agenda_over.png b/htdocs/theme/eldy/img/menus/agenda_over.png deleted file mode 100644 index 3c695cc3c80..00000000000 Binary files a/htdocs/theme/eldy/img/menus/agenda_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/bank.png b/htdocs/theme/eldy/img/menus/bank.png deleted file mode 100644 index 9e15a9a2dc8..00000000000 Binary files a/htdocs/theme/eldy/img/menus/bank.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/bank_over.png b/htdocs/theme/eldy/img/menus/bank_over.png deleted file mode 100644 index bca5ce3c449..00000000000 Binary files a/htdocs/theme/eldy/img/menus/bank_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/commercial.png b/htdocs/theme/eldy/img/menus/commercial.png deleted file mode 100644 index 2c36155fb96..00000000000 Binary files a/htdocs/theme/eldy/img/menus/commercial.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/commercial_over.png b/htdocs/theme/eldy/img/menus/commercial_over.png deleted file mode 100644 index 51146c72359..00000000000 Binary files a/htdocs/theme/eldy/img/menus/commercial_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/company.png b/htdocs/theme/eldy/img/menus/company.png deleted file mode 100644 index 39a3b75db68..00000000000 Binary files a/htdocs/theme/eldy/img/menus/company.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/company_over.png b/htdocs/theme/eldy/img/menus/company_over.png deleted file mode 100644 index c86e6fcf97e..00000000000 Binary files a/htdocs/theme/eldy/img/menus/company_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ecm.png b/htdocs/theme/eldy/img/menus/ecm.png deleted file mode 100644 index 3ba3f280a54..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ecm.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ecm_over.png b/htdocs/theme/eldy/img/menus/ecm_over.png deleted file mode 100644 index d72bc896f38..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ecm_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/externalsite.png b/htdocs/theme/eldy/img/menus/externalsite.png deleted file mode 100644 index cda6eddc774..00000000000 Binary files a/htdocs/theme/eldy/img/menus/externalsite.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/externalsite_over.png b/htdocs/theme/eldy/img/menus/externalsite_over.png deleted file mode 100644 index 4620d6f3461..00000000000 Binary files a/htdocs/theme/eldy/img/menus/externalsite_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ftp.png b/htdocs/theme/eldy/img/menus/ftp.png deleted file mode 100644 index 1f544834fbe..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ftp.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ftp_over.png b/htdocs/theme/eldy/img/menus/ftp_over.png deleted file mode 100644 index ca707d5d645..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ftp_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic1.png b/htdocs/theme/eldy/img/menus/generic1.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic1.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic1_over.png b/htdocs/theme/eldy/img/menus/generic1_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic1_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic2.png b/htdocs/theme/eldy/img/menus/generic2.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic2.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic2_over.png b/htdocs/theme/eldy/img/menus/generic2_over.png deleted file mode 100644 index 62eed5564b6..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic2_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic3.png b/htdocs/theme/eldy/img/menus/generic3.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic3.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic3_over.png b/htdocs/theme/eldy/img/menus/generic3_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic3_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic4.png b/htdocs/theme/eldy/img/menus/generic4.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic4.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/generic4_over.png b/htdocs/theme/eldy/img/menus/generic4_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/eldy/img/menus/generic4_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/globe.png b/htdocs/theme/eldy/img/menus/globe.png deleted file mode 100644 index 87d8e86d4e8..00000000000 Binary files a/htdocs/theme/eldy/img/menus/globe.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/globe_over.png b/htdocs/theme/eldy/img/menus/globe_over.png deleted file mode 100644 index 9bfc263168f..00000000000 Binary files a/htdocs/theme/eldy/img/menus/globe_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/holiday.png b/htdocs/theme/eldy/img/menus/holiday.png deleted file mode 100644 index 146dcdaf120..00000000000 Binary files a/htdocs/theme/eldy/img/menus/holiday.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/holiday_over.png b/htdocs/theme/eldy/img/menus/holiday_over.png deleted file mode 100644 index 146dcdaf120..00000000000 Binary files a/htdocs/theme/eldy/img/menus/holiday_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/home.png b/htdocs/theme/eldy/img/menus/home.png deleted file mode 100644 index 175c9e9df71..00000000000 Binary files a/htdocs/theme/eldy/img/menus/home.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/home_over.png b/htdocs/theme/eldy/img/menus/home_over.png deleted file mode 100644 index e2cd61164ca..00000000000 Binary files a/htdocs/theme/eldy/img/menus/home_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/index.html b/htdocs/theme/eldy/img/menus/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/eldy/img/menus/mail.png b/htdocs/theme/eldy/img/menus/mail.png deleted file mode 100644 index ef09835e61f..00000000000 Binary files a/htdocs/theme/eldy/img/menus/mail.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/mail_over.png b/htdocs/theme/eldy/img/menus/mail_over.png deleted file mode 100644 index cebc59aac9d..00000000000 Binary files a/htdocs/theme/eldy/img/menus/mail_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/members.png b/htdocs/theme/eldy/img/menus/members.png deleted file mode 100644 index bf195586d1a..00000000000 Binary files a/htdocs/theme/eldy/img/menus/members.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/members_over.png b/htdocs/theme/eldy/img/menus/members_over.png deleted file mode 100644 index 9ff7409af9a..00000000000 Binary files a/htdocs/theme/eldy/img/menus/members_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/menu.png b/htdocs/theme/eldy/img/menus/menu.png deleted file mode 100644 index 526e1975ab0..00000000000 Binary files a/htdocs/theme/eldy/img/menus/menu.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/money.png b/htdocs/theme/eldy/img/menus/money.png deleted file mode 100644 index 2190aa22c70..00000000000 Binary files a/htdocs/theme/eldy/img/menus/money.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/money_over.png b/htdocs/theme/eldy/img/menus/money_over.png deleted file mode 100644 index 47b61f2013d..00000000000 Binary files a/htdocs/theme/eldy/img/menus/money_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/pointofsale.png b/htdocs/theme/eldy/img/menus/pointofsale.png deleted file mode 100644 index 3f1d00e3add..00000000000 Binary files a/htdocs/theme/eldy/img/menus/pointofsale.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/pointofsale_over.png b/htdocs/theme/eldy/img/menus/pointofsale_over.png deleted file mode 100644 index 9ef02b49295..00000000000 Binary files a/htdocs/theme/eldy/img/menus/pointofsale_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/products.png b/htdocs/theme/eldy/img/menus/products.png deleted file mode 100644 index 2e3f6f70c4d..00000000000 Binary files a/htdocs/theme/eldy/img/menus/products.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/products_over.png b/htdocs/theme/eldy/img/menus/products_over.png deleted file mode 100644 index a36e3d0afd7..00000000000 Binary files a/htdocs/theme/eldy/img/menus/products_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/project.png b/htdocs/theme/eldy/img/menus/project.png deleted file mode 100644 index dfb2fa7c0a0..00000000000 Binary files a/htdocs/theme/eldy/img/menus/project.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/project_over.png b/htdocs/theme/eldy/img/menus/project_over.png deleted file mode 100644 index 0f86a34b5fa..00000000000 Binary files a/htdocs/theme/eldy/img/menus/project_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/shop.png b/htdocs/theme/eldy/img/menus/shop.png deleted file mode 100644 index 83cabd58266..00000000000 Binary files a/htdocs/theme/eldy/img/menus/shop.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/shop_over.png b/htdocs/theme/eldy/img/menus/shop_over.png deleted file mode 100644 index 4458d1804a0..00000000000 Binary files a/htdocs/theme/eldy/img/menus/shop_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ticket.png b/htdocs/theme/eldy/img/menus/ticket.png deleted file mode 100644 index 57fc2aedb5b..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ticket.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/ticket_over.png b/htdocs/theme/eldy/img/menus/ticket_over.png deleted file mode 100644 index 57fc2aedb5b..00000000000 Binary files a/htdocs/theme/eldy/img/menus/ticket_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/tools.png b/htdocs/theme/eldy/img/menus/tools.png deleted file mode 100644 index de26cd9b4cf..00000000000 Binary files a/htdocs/theme/eldy/img/menus/tools.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus/tools_over.png b/htdocs/theme/eldy/img/menus/tools_over.png deleted file mode 100644 index b04305187df..00000000000 Binary files a/htdocs/theme/eldy/img/menus/tools_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/agenda.png b/htdocs/theme/eldy/img/menus_black/agenda.png deleted file mode 100644 index ca69e7a53ab..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/agenda.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/agenda_over.png b/htdocs/theme/eldy/img/menus_black/agenda_over.png deleted file mode 100644 index 4e4f1d58543..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/agenda_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/bank.png b/htdocs/theme/eldy/img/menus_black/bank.png deleted file mode 100644 index f2ab8dcf64c..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/bank.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/bank_over.png b/htdocs/theme/eldy/img/menus_black/bank_over.png deleted file mode 100644 index b71c896a486..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/bank_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/commercial.png b/htdocs/theme/eldy/img/menus_black/commercial.png deleted file mode 100644 index 9f74d3ff193..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/commercial.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/commercial_over.png b/htdocs/theme/eldy/img/menus_black/commercial_over.png deleted file mode 100644 index 73345ebd2d2..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/commercial_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/company.png b/htdocs/theme/eldy/img/menus_black/company.png deleted file mode 100644 index 3db34e9a4d7..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/company.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/company_over.png b/htdocs/theme/eldy/img/menus_black/company_over.png deleted file mode 100644 index 54f61141f69..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/company_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ecm.png b/htdocs/theme/eldy/img/menus_black/ecm.png deleted file mode 100644 index 4d8295ca0dd..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ecm.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ecm_over.png b/htdocs/theme/eldy/img/menus_black/ecm_over.png deleted file mode 100644 index a71608da773..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ecm_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/externalsite.png b/htdocs/theme/eldy/img/menus_black/externalsite.png deleted file mode 100644 index b04fe8d6f62..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/externalsite.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/externalsite_over.png b/htdocs/theme/eldy/img/menus_black/externalsite_over.png deleted file mode 100644 index 968cff8042a..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/externalsite_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ftp.png b/htdocs/theme/eldy/img/menus_black/ftp.png deleted file mode 100644 index 3132f4977d1..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ftp.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ftp_over.png b/htdocs/theme/eldy/img/menus_black/ftp_over.png deleted file mode 100644 index f8cca29d214..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ftp_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic1.png b/htdocs/theme/eldy/img/menus_black/generic1.png deleted file mode 100644 index 3aa0f69fd23..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic1.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic1_over.png b/htdocs/theme/eldy/img/menus_black/generic1_over.png deleted file mode 100644 index e78c61ecb6e..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic1_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic2.png b/htdocs/theme/eldy/img/menus_black/generic2.png deleted file mode 100644 index 3aa0f69fd23..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic2.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic2_over.png b/htdocs/theme/eldy/img/menus_black/generic2_over.png deleted file mode 100644 index e78c61ecb6e..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic2_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic3.png b/htdocs/theme/eldy/img/menus_black/generic3.png deleted file mode 100644 index 3aa0f69fd23..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic3.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic3_over.png b/htdocs/theme/eldy/img/menus_black/generic3_over.png deleted file mode 100644 index e78c61ecb6e..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic3_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic4.png b/htdocs/theme/eldy/img/menus_black/generic4.png deleted file mode 100644 index 3aa0f69fd23..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic4.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/generic4_over.png b/htdocs/theme/eldy/img/menus_black/generic4_over.png deleted file mode 100644 index e78c61ecb6e..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/generic4_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/globe.png b/htdocs/theme/eldy/img/menus_black/globe.png deleted file mode 100644 index 8ea33cbadc6..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/globe.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/globe_over.png b/htdocs/theme/eldy/img/menus_black/globe_over.png deleted file mode 100644 index 409cf638196..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/globe_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/holiday.png b/htdocs/theme/eldy/img/menus_black/holiday.png deleted file mode 100644 index 24d9e498948..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/holiday.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/holiday_over.png b/htdocs/theme/eldy/img/menus_black/holiday_over.png deleted file mode 100644 index 24d9e498948..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/holiday_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/home.png b/htdocs/theme/eldy/img/menus_black/home.png deleted file mode 100644 index 15dafc01b06..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/home.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/home_over.png b/htdocs/theme/eldy/img/menus_black/home_over.png deleted file mode 100644 index f19ae6ec4b6..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/home_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/mail.png b/htdocs/theme/eldy/img/menus_black/mail.png deleted file mode 100644 index bab0121d1f2..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/mail.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/mail_over.png b/htdocs/theme/eldy/img/menus_black/mail_over.png deleted file mode 100644 index e0c2e0a98b8..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/mail_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/members.png b/htdocs/theme/eldy/img/menus_black/members.png deleted file mode 100644 index 4010af188cd..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/members.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/members_over.png b/htdocs/theme/eldy/img/menus_black/members_over.png deleted file mode 100644 index 3548942d14c..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/members_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/menu.png b/htdocs/theme/eldy/img/menus_black/menu.png deleted file mode 100644 index 0b080a18715..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/menu.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/money.png b/htdocs/theme/eldy/img/menus_black/money.png deleted file mode 100644 index c9668b65fb9..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/money.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/money_over.png b/htdocs/theme/eldy/img/menus_black/money_over.png deleted file mode 100644 index 6ed4fe78532..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/money_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/pointofsale.png b/htdocs/theme/eldy/img/menus_black/pointofsale.png deleted file mode 100644 index 21740c2d335..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/pointofsale.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/pointofsale_over.png b/htdocs/theme/eldy/img/menus_black/pointofsale_over.png deleted file mode 100644 index ce906378a8b..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/pointofsale_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/products.png b/htdocs/theme/eldy/img/menus_black/products.png deleted file mode 100644 index 08ec9b25477..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/products.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/products_over.png b/htdocs/theme/eldy/img/menus_black/products_over.png deleted file mode 100644 index e9e586bfda7..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/products_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/project.png b/htdocs/theme/eldy/img/menus_black/project.png deleted file mode 100644 index 3313e646419..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/project.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/project_over.png b/htdocs/theme/eldy/img/menus_black/project_over.png deleted file mode 100644 index ecd01444b4b..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/project_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/shop.png b/htdocs/theme/eldy/img/menus_black/shop.png deleted file mode 100644 index 5db29cb0e3a..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/shop.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/shop_over.png b/htdocs/theme/eldy/img/menus_black/shop_over.png deleted file mode 100644 index e1429d1b97e..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/shop_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ticket.png b/htdocs/theme/eldy/img/menus_black/ticket.png deleted file mode 100644 index 998efdbaf82..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ticket.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/ticket_over.png b/htdocs/theme/eldy/img/menus_black/ticket_over.png deleted file mode 100644 index 998efdbaf82..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/ticket_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/tools.png b/htdocs/theme/eldy/img/menus_black/tools.png deleted file mode 100644 index 5008c2fb98c..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/tools.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/menus_black/tools_over.png b/htdocs/theme/eldy/img/menus_black/tools_over.png deleted file mode 100644 index 7d200d2e7ae..00000000000 Binary files a/htdocs/theme/eldy/img/menus_black/tools_over.png and /dev/null differ diff --git a/htdocs/theme/eldy/img/object_zapier.png b/htdocs/theme/eldy/img/object_zapier.png index b1337750b67..b244cb1d5d6 100644 Binary files a/htdocs/theme/eldy/img/object_zapier.png and b/htdocs/theme/eldy/img/object_zapier.png differ diff --git a/htdocs/theme/eldy/img/weather/index.html b/htdocs/theme/eldy/img/weather/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/eldy/index.html b/htdocs/theme/eldy/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index d582260ca63..dc2dbb3f4d3 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -1,5 +1,7 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ /* @@ -7,34 +9,38 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> * ------------------- */ -.info-box-module-external span.info-box-icon-version { - background: #bbb; +.info-box-module.--external span.info-box-icon-version { + background: #bbb; +} + +.info-box-module.--external.--need-update span.info-box-icon-version{ + background: #bc9525; } .info-box { display: block; - position: relative; + position: relative; min-height: 90px; /* background: #fff; */ width: 100%; box-shadow: 1px 1px 15px rgba(192, 192, 192, 0.2); - border-radius: 2px; - border: 1px solid #e9e9e9; + border-radius: 2px; + border: 1px solid #e9e9e9; margin-bottom: 15px; } .info-box.info-box-sm { - min-height: 80px; - margin-bottom: 10px; + min-height: 80px; + margin-bottom: 10px; /* background: #fff; */ } .opened-dash-board-wrap .info-box.info-box-sm { - border-radius: 0 0 0 20px; + border-radius: 0 0 0 20px; } .info-box-more { - float: right; - top: 5px; - position: absolute; - right: 8px; + float: right; + top: 5px; + position: absolute; + right: 8px; } .info-box small { @@ -71,7 +77,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> border-bottom-right-radius: 0; border-bottom-left-radius: 2px; display: block; - overflow: hidden; + overflow: hidden; float: left; height: 90px; width: 90px; @@ -82,20 +88,20 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> } .info-box-module .info-box-icon { - padding-top: 5px; - padding-bottom: 5px; + padding-top: 5px; + padding-bottom: 5px; } .info-box-sm .info-box-icon { - height: 80px; - width: 78px; - font-size: 25px; - line-height: 92px; + height: 80px; + width: 78px; + font-size: 25px; + line-height: 92px; } .opened-dash-board-wrap .info-box-sm .info-box-icon { - border-radius: 0 0 0 20px; + border-radius: 0 0 0 20px; } .opened-dash-board-wrap .info-box-sm .info-box-icon { - line-height: 80px; + line-height: 80px; } .info-box-module .info-box-icon { height: 98px; @@ -104,75 +110,75 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> max-width: 100%; } .info-box-module .info-box-icon > img { - max-width: 60%; + max-width: 60%; } a.info-box-text.info-box-text-a { - display: table-cell; + display: table-cell; } a.info-box-text-a i.fa.fa-exclamation-triangle { - font-size: 0.9em; + font-size: 0.9em; } .info-box-icon-text{ - box-sizing: border-box; - display: block; - position: absolute; - width: 90px; - bottom: 0px; - color: #ffffff; - background-color: rgba(0,0,0,0.1); - cursor: default; + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; - font-size: 10px; - line-height: 15px; - padding: 0px 3px; - text-align: center; - opacity: 0; - -webkit-transition: opacity 0.5s, visibility 0s 0.5s; - transition: opacity 0.5s, visibility 0s 0.5s; + font-size: 10px; + line-height: 15px; + padding: 0px 3px; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; } .info-box-icon-version { - box-sizing: border-box; - display: block; - position: absolute; - width: 90px; - bottom: 0px; - color: #ffffff; - background-color: rgba(0,0,0,0.1); - cursor: default; + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; - font-size: 10px; - line-height: 22px; - padding: 0px 3px; - text-align: center; - opacity: 1; - -webkit-transition: opacity 0.5s, visibility 0s 0.5s; - transition: opacity 0.5s, visibility 0s 0.5s; + font-size: 10px; + line-height: 22px; + padding: 0px 3px; + text-align: center; + opacity: 1; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; } -.box-flex-item.info-box-module.info-box-module-disabled { - /* opacity: 0.6; */ +.box-flex-item.info-box-module.--disabled { + /* opacity: 0.6; */ } .info-box-actions { position: absolute; - right: 0; - bottom: 0; + right: 0; + bottom: 0; } <?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?> .info-box-icon-text{ - opacity: 1; + opacity: 1; } <?php } ?> .info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{ - overflow: hidden; - width: 80px; + overflow: hidden; + width: 80px; } .info-box:hover .info-box-icon-text{ - opacity: 1; + opacity: 1; } .info-box-content { @@ -180,11 +186,11 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { margin-left: 84px; } .info-box-sm .info-box-content{ - margin-left: 80px; + margin-left: 80px; } .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); + /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */ + background: linear-gradient(0.4turn, #fff, #fff, #fff, #e4efe8); } .info-box-content-warning span.font-status4 { color: #bc9526 !important; @@ -193,7 +199,7 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { background: #ffd7a3; }*/ /*.info-box-icon.info-box-icon-module-enabled { - background: #e4f0e4 !important; + background: #e4f0e4 !important; }*/ .info-box-number { @@ -240,20 +246,26 @@ a.info-box-text{ text-decoration: none;} include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix = ''; -if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; +if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) { + $prefix = 'background-'; +} -if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7; -if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +if (!isset($conf->global->THEME_SATURATE_RATIO)) { + $conf->global->THEME_SATURATE_RATIO = 0.7; +} +if (GETPOSTISSET('THEME_SATURATE_RATIO')) { + $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +} ?> .info-box-icon { <?php if ($prefix) { ?> color: #fff !important; <?php } ?> - opacity: 0.95; - <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?> - filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>); - <?php } ?> + opacity: 0.95; + <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?> + filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>); + <?php } ?> } .customer-back { @@ -287,7 +299,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = <?php echo $prefix; ?>color: #b06080 !important; } .bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande { - <?php echo $prefix; ?>color: #55955d !important; + <?php echo $prefix; ?>color: #65953d !important; } .bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier { <?php echo $prefix; ?>color: #599caf !important; @@ -317,11 +329,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = .infobox-action{ color: #b06080 !important; } +/* Color for customer object */ .infobox-propal:not(.pictotitle), .infobox-facture:not(.pictotitle), .infobox-commande:not(.pictotitle) { - color: #65955d !important; + color: #65953d !important; } +/* Color for vendor object */ .infobox-supplier_proposal:not(.pictotitle), .infobox-invoice_supplier:not(.pictotitle), .infobox-order_supplier:not(.pictotitle){ @@ -356,14 +370,14 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = content: "\f571"; } .fa-dol-project:before { - content: "\f0e8"; + content: "\f542"; } .fa-dol-commande:before, .fa-dol-order_supplier:before { content: "\f570"; } .fa-dol-contrat:before { - content: "\f1e6"; + content: "\f0f2"; } .fa-dol-ticket:before { content: "\f3ff"; @@ -372,7 +386,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = content: "\f19c"; } .fa-dol-member:before { - content: "\f0c0"; + content: "\f007"; } .fa-dol-expensereport:before { content: "\f555"; @@ -435,13 +449,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = } .info-box-module { min-width: 350px; - max-width: 350px; + max-width: 350px; } @media only screen and (max-width: 1740px) { .info-box-module { - min-width: 315px; - max-width: 315px; + min-width: 315px; + max-width: 315px; } } @@ -463,8 +477,8 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = @media only screen and (max-width: 767px) { .box-flex-container { - margin: 0 0 0 0px !important; - width: 100% !important; + margin: 0 0 0 0px !important; + width: 100% !important; } .info-box-module { width: 100%; diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index fbccc810fe7..9b119fa593c 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -1,23 +1,25 @@ -<?php if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +<?php if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ .mainmenu::before{ - /* font part */ - font-family: "Font Awesome 5 Free"; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - line-height: 23px; + /* font part */ + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 23px; font-size: <?php echo $topMenuFontSize; ?>; - -webkit-font-smoothing: antialiased; - text-align:center; + -webkit-font-smoothing: antialiased; + text-align:center; text-decoration:none; color: #<?php echo $colortextbackhmenu; ?>; } .fa-15x { - font-size: 1.5em; + font-size: 1.5em; } div.mainmenu.menu { @@ -34,116 +36,118 @@ div.mainmenu.home::before{ } div.mainmenu.billing::before { - content: "\f51e"; + content: "\f51e"; } div.mainmenu.accountancy::before { - content: "\f53d"; + /* content: "\f53d"; */ + content: "\f688"; + font-size: 1.2em; } div.mainmenu.agenda::before { - content: "\f073"; + content: "\f073"; } div.mainmenu.bank::before { - content: "\f19c"; + content: "\f19c"; } <?php if ($conf->global->MAIN_FEATURES_LEVEL == 2) { ?> /* TESTING USAGE OF SVG WITHOUT FONT */ div.mainmenu.cashdesk { - line-height: 26px; + line-height: 26px; } div.mainmenu.cashdesk .tmenuimage { - line-height: 26px; - display: inline-block; - vertical-align: middle; - height: <?php echo $topMenuFontSize; ?>; + line-height: 26px; + display: inline-block; + vertical-align: middle; + height: <?php echo $topMenuFontSize; ?>; background-color: #<?php echo $colortextbackhmenu; ?>; - width: 100%; - -webkit-mask: url(<?php echo DOL_URL_ROOT.'/theme/common/fontawesome-5/svgs/solid/cash-register.svg' ?>) no-repeat 50% 50%; /* for old webkit browser */ - mask: url(<?php echo DOL_URL_ROOT.'/theme/common/fontawesome-5/svgs/solid/cash-register.svg' ?>) no-repeat 50% 50%; + width: 100%; + -webkit-mask: url(<?php echo DOL_URL_ROOT.'/theme/common/fontawesome-5/svgs/solid/cash-register.svg' ?>) no-repeat 50% 50%; /* for old webkit browser */ + mask: url(<?php echo DOL_URL_ROOT.'/theme/common/fontawesome-5/svgs/solid/cash-register.svg' ?>) no-repeat 50% 50%; } <?php } else { ?> div.mainmenu.cashdesk::before { - content: "\f788"; + content: "\f788"; } <?php } ?> div.mainmenu.takepos::before { - content: "\f788"; + content: "\f788"; } div.mainmenu.companies::before { - content: "\f1ad"; + content: "\f1ad"; } div.mainmenu.commercial::before { - content: "\f0f2"; + content: "\f0f2"; } div.mainmenu.ecm::before { - content: "\f07c"; + content: "\f07c"; } div.mainmenu.externalsite::before { - content: "\f360"; + content: "\f360"; } div.mainmenu.ftp::before { - content: "\f362"; + content: "\f362"; } div.mainmenu.hrm::before { - content: "\f508"; + content: "\f508"; } div.mainmenu.members::before { - content: "\f0c0"; + content: "\f007"; } div.mainmenu.products::before { - content: "\f1b2"; + content: "\f1b2"; } div.mainmenu.mrp::before { - content: "\f1b3"; + content: "\f1b3"; } div.mainmenu.project::before { - content: "\f0e8"; + content: "\f542"; } div.mainmenu.ticket::before { - content: "\f3ff"; + content: "\f3ff"; } div.mainmenu.tools::before { - content: "\f0ad"; + content: "\f0ad"; } div.mainmenu.website::before { - content: "\f57d"; + content: "\f57d"; } div.mainmenu.generic1::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic2::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic3::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic4::before { - content: "\f249"; + content: "\f249"; } /* Define color of some picto */ @@ -165,7 +169,7 @@ div.mainmenu.generic4::before { .fa-play { color: #444; } -.fa-unlink { +.fa-link, .fa-unlink { color: #555; } @@ -199,3 +203,14 @@ div.mainmenu.generic4::before { margin-left: 30px; } +.menu_titre .em092 { + font-size: 0.92em; +} + +.menu_titre .em088 { + font-size: 0.88em; +} + +.menu_titre .em080 { + font-size: 0.80em; +} diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php index 7aa04694b33..7d0f75614c7 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -25,22 +25,39 @@ * \brief File for The Web App */ -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} 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'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. @@ -48,22 +65,91 @@ if (empty($dolibarr_nocache)) { header('Cache-Control: max-age=10800, public, must-revalidate'); // For a text/json, we must set an Expires to avoid to have it forced to an expired value by the web server header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + 10800) . ' GMT'); -} -else { +} else { header('Cache-Control: no-cache'); } -?> -{ - "name": "<?php echo $appli; ?>", - "icons": [ - { - "src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; ?>", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} \ No newline at end of file + +$manifest = new stdClass(); + + +$manifest->name = constant('DOL_APPLICATION_TITLE'); +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $manifest->name = $conf->global->MAIN_APPLICATION_TITLE; +} + + +$manifest->theme_color = !empty($conf->global->MAIN_MANIFEST_APPLI_THEME_COLOR)?$conf->global->MAIN_MANIFEST_APPLI_THEME_COLOR:'#F05F40'; +$manifest->background_color = !empty($conf->global->MAIN_MANIFEST_APPLI_BG_COLOR)?$conf->global->MAIN_MANIFEST_APPLI_BG_COLOR:"#ffffff"; +$manifest->display = "standalone"; +$manifest->splash_pages = null; +$manifest->icons = array(); + +if (!empty($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL)) { + $icon = new stdClass(); + $icon->src = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL; + if ($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE) { + $icon->sizes = $conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE."x".$conf->global->MAIN_MANIFEST_APPLI_LOGO_URL_SIZE; + } else { + $icon->sizes = "512x512"; + } + $icon->type = "image/png"; + $manifest->icons[] = $icon; +} elseif (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED)) { + if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI)) { + $iconRelativePath = 'logos/thumbs/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI; + $iconPath = $conf->mycompany->dir_output.'/'.$iconRelativePath; + if (is_readable($iconPath)) { + $imgSize = getimagesize($iconPath); + if ($imgSize) { + $icon = new stdClass(); + $icon->src = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath); + $icon->sizes = $imgSize[0]."x".$imgSize[1]; + $icon->type = "image/png"; + $manifest->icons[] = $icon; + } + } + } + + if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL)) { + $iconRelativePath = 'logos/thumbs/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_SMALL; + $iconPath = $conf->mycompany->dir_output.'/'.$iconRelativePath; + if (is_readable($iconPath)) { + $imgSize = getimagesize($iconPath); + if ($imgSize) { + $icon = new stdClass(); + $icon->src = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath); + $icon->sizes = $imgSize[0]."x".$imgSize[1]; + $icon->type = "image/png"; + $manifest->icons[] = $icon; + } + } + } + + if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED)) { + $iconRelativePath = 'logos/'.$conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED; + $iconPath = $conf->mycompany->dir_output.'/'.$iconRelativePath; + if (is_readable($iconPath)) { + $imgSize = getimagesize($iconPath); + if ($imgSize) { + $icon = new stdClass(); + $icon->src = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath); + $icon->sizes = $imgSize[0]."x".$imgSize[1]; + $icon->type = "image/png"; + $manifest->icons[] = $icon; + } + } + } +} + +// Add Dolibarr std icon +if (empty($manifest->icons)) { + $icon = new stdClass(); + $icon->src = DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; + $icon->sizes = "256x256"; + $icon->type = "image/png"; + $manifest->icons[] = $icon; +} + + +print json_encode($manifest); diff --git a/htdocs/theme/eldy/progress.inc.php b/htdocs/theme/eldy/progress.inc.php index 71f25ff35ba..e74c84cf89e 100644 --- a/htdocs/theme/eldy/progress.inc.php +++ b/htdocs/theme/eldy/progress.inc.php @@ -1,5 +1,7 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ /* progress style is based on boostrap and admin lte framework @@ -12,183 +14,183 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .progress * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } .progress { - height: 20px; - overflow: hidden; - background-color: #f5f5f5; - background-color: rgba(128, 128, 128, 0.1); - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + height: 20px; + overflow: hidden; + background-color: #f5f5f5; + background-color: rgba(128, 128, 128, 0.1); + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress.spaced{ - margin-bottom: 20px; + margin-bottom: 20px; } .progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); - box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; } .progress-group > .progress{ - clear: both; + clear: both; } .progress, .progress > .progress-bar { - -webkit-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } .progress, .progress > .progress-bar, .progress .progress-bar, .progress > .progress-bar .progress-bar { - border-radius: 1px; + border-radius: 1px; } /* size variation */ .progress.sm, .progress-sm { - height: 10px; + height: 10px; } .progress.sm, .progress-sm, .progress.sm .progress-bar, .progress-sm .progress-bar { - border-radius: 1px; + border-radius: 1px; } .progress.xs, .progress-xs { - height: 7px; + height: 7px; } .progress.xs, .progress-xs, .progress.xs .progress-bar, .progress-xs .progress-bar { - border-radius: 1px; + border-radius: 1px; } .progress.xxs, .progress-xxs { - height: 3px; + height: 3px; } .progress.xxs, .progress-xxs, .progress.xxs .progress-bar, .progress-xxs .progress-bar { - border-radius: 1px; + border-radius: 1px; } /* Vertical bars */ .progress.vertical { - position: relative; - width: 30px; - height: 200px; - display: inline-block; - margin-right: 10px; + position: relative; + width: 30px; + height: 200px; + display: inline-block; + margin-right: 10px; } .progress.vertical > .progress-bar { - width: 100%; - position: absolute; - bottom: 0; + width: 100%; + position: absolute; + bottom: 0; } .progress.vertical.sm, .progress.vertical.progress-sm { - width: 20px; + width: 20px; } .progress.vertical.xs, .progress.vertical.progress-xs { - width: 10px; + width: 10px; } .progress.vertical.xxs, .progress.vertical.progress-xxs { - width: 3px; + width: 3px; } .progress-group .progress-text { - /* font-weight: 600; */ + /* font-weight: 600; */ } .progress-group .progress-number { - float: right; + float: right; } /* Remove margins from progress bars when put in a table */ .table tr > td .progress { - margin: 0; + margin: 0; } .progress-bar-light-blue, .progress-bar-primary { - background-color: #3c8dbc; + background-color: #3c8dbc; } .progress-striped .progress-bar-light-blue, .progress-striped .progress-bar-primary { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-green, .progress-bar-success { - background-color: <?php echo $badgeSuccess ?>; + background-color: <?php echo $badgeSuccess ?>; } .progress-striped .progress-bar-green, .progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } body[class*="colorblind-"] .progress-bar-green, body[class*="colorblind-"] .progress-bar-success { - background-color: <?php echo $colorblind_deuteranopes_badgeSuccess ?>; + background-color: <?php echo $colorblind_deuteranopes_badgeSuccess ?>; } body[class*="colorblind-"] .progress-bar-red, body[class*="colorblind-"] .progress-bar-danger { - background-color: <?php echo $colorblind_deuteranopes_badgeDanger ?>; + background-color: <?php echo $colorblind_deuteranopes_badgeDanger ?>; } .progress-bar-aqua, .progress-bar-info { - background-color: #00c0ef; + background-color: #00c0ef; } .progress-striped .progress-bar-aqua, .progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-yellow, .progress-bar-warning { - background-color: <?php echo $badgeWarning ?>; + background-color: <?php echo $badgeWarning ?>; } .progress-striped .progress-bar-yellow, .progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-red, .progress-bar-danger { - background-color: <?php echo $badgeDanger ?>; + background-color: <?php echo $badgeDanger ?>; } .progress-striped .progress-bar-red, .progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-consumed { background-color: rgb(0, 0, 0, 0.15); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 319789b6fde..44a0a7d7b20 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -27,21 +27,35 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +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('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 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'); +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} define('ISLOADEDBYSTEELSHEET', '1'); require __DIR__.'/theme_vars.inc.php'; -if (defined('THEME_ONLY_CONSTANT')) return; +if (defined('THEME_ONLY_CONSTANT')) { + return; +} session_cache_limiter('public'); @@ -51,8 +65,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) // and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. -if (empty($user->id) && !empty($_SESSION['dol_login'])) -{ +if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('', $_SESSION['dol_login'], '', 1); $user->getrights(); @@ -65,12 +78,21 @@ if (empty($user->id) && !empty($_SESSION['dol_login'])) // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} 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 +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'); @@ -78,7 +100,9 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); $path = ''; // This value may be used in future for external module to overwrite theme $theme = 'eldy'; // Value of theme -if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path = '/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; } +if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { + $path = '/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; +} // Define image path files and other constants $fontlist = 'arial,tahoma,verdana,helvetica'; //$fontlist='helvetica, verdana, arial, sans-serif'; @@ -98,19 +122,36 @@ $useboldtitle = (isset($conf->global->THEME_ELDY_USEBOLDTITLE) ? $conf->global-> $borderwidth = 1; // Case of option always editable -if (!isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY = $colorbackbody; -if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; -if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1; -if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1; -if (!isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover; -if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked; -if (!isset($conf->global->THEME_ELDY_LINEBREAK)) $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak; -if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab; -if (!isset($conf->global->THEME_ELDY_TEXTLINK)) $conf->global->THEME_ELDY_TEXTLINK = $colortextlink; +if (!isset($conf->global->THEME_ELDY_BACKBODY)) { + $conf->global->THEME_ELDY_BACKBODY = $colorbackbody; +} +if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; +} +if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) { + $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1; +} +if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) { + $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1; +} +if (!isset($conf->global->THEME_ELDY_USE_HOVER)) { + $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover; +} +if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) { + $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked; +} +if (!isset($conf->global->THEME_ELDY_LINEBREAK)) { + $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak; +} +if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) { + $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab; +} +if (!isset($conf->global->THEME_ELDY_TEXTLINK)) { + $conf->global->THEME_ELDY_TEXTLINK = $colortextlink; +} // Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on -if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) -{ +if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) { $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card $conf->global->THEME_ELDY_BACKTABACTIVE = '234,234,234'; $conf->global->THEME_ELDY_TEXT = '0,0,0'; @@ -142,8 +183,7 @@ $fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp // Hover color $colorbacklinepairhover = ((!isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_HOVER === '1' ? 'e6edf0' : $conf->global->THEME_ELDY_USE_HOVER)); $colorbacklinepairchecked = ((!isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_CHECKED === '1' ? 'e6edf0' : $conf->global->THEME_ELDY_USE_CHECKED)); -if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) -{ +if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) { $colorbacklinepairhover = ((!isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '0') ? '' : ($user->conf->THEME_ELDY_USE_HOVER === '1' ? 'e6edf0' : $user->conf->THEME_ELDY_USE_HOVER)); $colorbacklinepairchecked = ((!isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '0') ? '' : ($user->conf->THEME_ELDY_USE_CHECKED === '1' ? 'e6edf0' : $user->conf->THEME_ELDY_USE_CHECKED)); } @@ -153,26 +193,42 @@ if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' $tmppart = explode(',', $colorbackhmenu1); $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0); -if ($tmpval <= 460) $colortextbackhmenu = 'FFFFFF'; -else $colortextbackhmenu = '000000'; +if ($tmpval <= 460) { + $colortextbackhmenu = 'FFFFFF'; +} 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 == '') -{ +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') @@ -185,8 +241,12 @@ $colorbacklineimpair1 = join(',', colorStringToArray($colorbacklineimpair1)); $colorbacklineimpair2 = join(',', colorStringToArray($colorbacklineimpair2)); $colorbacklinepair1 = join(',', colorStringToArray($colorbacklinepair1)); $colorbacklinepair2 = join(',', colorStringToArray($colorbacklinepair2)); -if ($colorbacklinepairhover != '') $colorbacklinepairhover = join(',', colorStringToArray($colorbacklinepairhover)); -if ($colorbacklinepairchecked != '') $colorbacklinepairchecked = join(',', colorStringToArray($colorbacklinepairchecked)); +if ($colorbacklinepairhover != '') { + $colorbacklinepairhover = join(',', colorStringToArray($colorbacklinepairhover)); +} +if ($colorbacklinepairchecked != '') { + $colorbacklinepairchecked = join(',', colorStringToArray($colorbacklinepairchecked)); +} $colorbackbody = join(',', colorStringToArray($colorbackbody)); $colortexttitlenotab = join(',', colorStringToArray($colortexttitlenotab)); $colortexttitle = join(',', colorStringToArray($colortexttitle)); @@ -195,7 +255,9 @@ $colortextlink = join(',', colorStringToArray($colortextlink)); $nbtopmenuentries = $menumanager->showmenu('topnb'); -if ($conf->browser->layout == 'phone') $nbtopmenuentries = max($nbtopmenuentries, 10); +if ($conf->browser->layout == 'phone') { + $nbtopmenuentries = max($nbtopmenuentries, 10); +} $minwidthtmenu = 66; /* minimum width for one top menu entry */ @@ -203,11 +265,19 @@ $heightmenu = 50; /* height of top menu, part with image */ $heightmenu2 = 49; /* height of top menu, part with login */ $disableimages = 0; $maxwidthloginblock = 180; -if (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = $maxwidthloginblock + 50; $minwidthtmenu = 0; } +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; } +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; +} print '/*'."\n"; @@ -247,4 +317,6 @@ print '*/'."\n"; require __DIR__.'/global.inc.php'; -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index cc73803f452..82cbf9cf2a9 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -33,12 +33,9 @@ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $theme_bordercolor = array(235, 235, 224); $theme_datacolor = array(array(137, 86, 161), array(60, 147, 183), array(250, 190, 80), array(80, 166, 90), array(190, 190, 100), array(91, 115, 247), array(140, 140, 220), array(190, 120, 120), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150)); -if (!defined('ISLOADEDBYSTEELSHEET')) // File is run after an include of a php page, not by the style sheet, if the constant is not defined. -{ - if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) // user is loaded by dolgraph.class.php - { - if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy') - { +if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined. + if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) { // user is loaded by dolgraph.class.php + 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 { // for now we use the same configuration for all types of color blind @@ -117,6 +114,7 @@ $badgeStatus6 = '#cad2d2'; $badgeStatus7 = '#25a580'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; +$badgeStatus10 = '#993013'; // status color ajustement for color blind $colorblind_deuteranopes_badgeStatus4 = $colorblind_deuteranopes_badgeStatus7 = $colorblind_deuteranopes_badgeSuccess; //! text color black diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index d5fba863b3d..161505f77ea 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -1,6 +1,6 @@ <?php /*! - Source : + Source : * AdminLTE v2.4.8 * Author: Almsaeed Studio * Website: Almsaeed Studio <https://adminlte.io> @@ -8,7 +8,9 @@ * Please visit http://opensource.org/licenses/MIT for more information */ -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ @@ -17,68 +19,68 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> * ------------------- */ .timeline { - position: relative; - margin: 0 0 30px 0; - padding: 0; - list-style: none; + position: relative; + margin: 0 0 30px 0; + padding: 0; + list-style: none; } .timeline:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - width: 4px; - background: #ddd; - left: 31px; - margin: 0; - border-radius: 2px; + content: ''; + position: absolute; + top: 0; + bottom: 0; + width: 4px; + background: #ddd; + left: 31px; + margin: 0; + border-radius: 2px; } .timeline > li { - position: relative; - margin-right: 0; - margin-bottom: 15px; + position: relative; + margin-right: 0; + margin-bottom: 15px; } .timeline > li:before, .timeline > li:after { - content: " "; - display: table; + content: " "; + display: table; } .timeline > li:after { - clear: both; + clear: both; } .timeline > li > .timeline-item { - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - border:1px solid #d2d2d2; - border-radius: 3px; - margin-top: 0; - background: #fff; - color: #444; - margin-left: 60px; - margin-right: 0px; - padding: 0; - position: relative; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + border:1px solid #d2d2d2; + border-radius: 3px; + margin-top: 0; + background: #fff; + color: #444; + margin-left: 60px; + margin-right: 0px; + padding: 0; + position: relative; } .timeline > li.timeline-code-ticket_msg_private > .timeline-item { background: #fffbe5; - border-color: #d0cfc0; + border-color: #d0cfc0; } .timeline > li > .timeline-item > .time{ - color: #6f6f6f; - float: right; - padding: 10px; - font-size: 12px; + color: #6f6f6f; + float: right; + padding: 10px; + font-size: 12px; } .timeline > li > .timeline-item > .timeline-header-action{ - color: #6f6f6f; - float: right; - padding: 7px; - font-size: 12px; + color: #6f6f6f; + float: right; + padding: 7px; + font-size: 12px; } @@ -87,43 +89,43 @@ a.timeline-btn:visited, a.timeline-btn:hover, a.timeline-btn:active { - display: inline-block; - margin-bottom: 0; - font-weight: 400; - border-radius: 0; - box-shadow: none; - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - text-align: center; - white-space: nowrap; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - user-select: none; - background-image: none; - text-decoration: none; - background-color: #f4f4f4; - color: #444; - border: 1px solid #ddd; + display: inline-block; + margin-bottom: 0; + font-weight: 400; + border-radius: 0; + box-shadow: none; + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + text-align: center; + white-space: nowrap; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + user-select: none; + background-image: none; + text-decoration: none; + background-color: #f4f4f4; + color: #444; + border: 1px solid #ddd; } a.timeline-btn:hover { - background-color: #e7e7e7; - color: #333; - border-color: #adadad; + background-color: #e7e7e7; + color: #333; + border-color: #adadad; } .timeline > li > .timeline-item > .timeline-header { - margin: 0; - color: #333; - border-bottom: 1px solid #f4f4f4; - padding: 10px; - font-size: 14px; - font-weight: normal; - line-height: 1.1; + margin: 0; + color: #333; + border-bottom: 1px solid #f4f4f4; + padding: 10px; + font-size: 14px; + font-weight: normal; + line-height: 1.1; } .timeline > li > .timeline-item > .timeline-footer { @@ -131,74 +133,74 @@ a.timeline-btn:hover } .timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-header, .timeline > li.timeline-code-ticket_msg_private > .timeline-item > .timeline-footer { - border-color: #ecebda; + border-color: #ecebda; } .timeline > li > .timeline-item > .timeline-header > a { - font-weight: 600; + font-weight: 600; } .timeline > li > .timeline-item > .timeline-body, .timeline > li > .timeline-item > .timeline-footer { - padding: 10px; + padding: 10px; } .timeline > li > .fa, .timeline > li > .glyphicon, .timeline > li > .ion { - width: 30px; - height: 30px; - font-size: 15px; - line-height: 30px; - position: absolute; - color: #666; - background: #d2d6de; - border-radius: 50%; - text-align: center; - left: 18px; - top: 5px; + width: 30px; + height: 30px; + font-size: 15px; + line-height: 30px; + position: absolute; + color: #666; + background: #d2d6de; + border-radius: 50%; + text-align: center; + left: 18px; + top: 5px; } .timeline > .time-label > span { - font-weight: 600; - padding: 5px; - display: inline-block; - background-color: #fff; - border-radius: 4px; + font-weight: 600; + padding: 5px; + display: inline-block; + background-color: #fff; + border-radius: 4px; } .timeline-inverse > li > .timeline-item { - background: #f0f0f0; - border: 1px solid #ddd; - -webkit-box-shadow: none; - box-shadow: none; + background: #f0f0f0; + border: 1px solid #ddd; + -webkit-box-shadow: none; + box-shadow: none; } .timeline-inverse > li > .timeline-item > .timeline-header { - border-bottom-color: #ddd; + border-bottom-color: #ddd; } .timeline-icon-todo, .timeline-icon-in-progress, .timeline-icon-done{ - color: #fff !important; + color: #fff !important; } .timeline-icon-not-applicble{ - color: #000; - background-color: #f7f7f7; + color: #000; + background-color: #f7f7f7; } .timeline-icon-todo{ - background-color: #dd4b39 !important; + background-color: #dd4b39 !important; } .timeline-icon-in-progress{ - background-color: #00c0ef !important; + background-color: #00c0ef !important; } .timeline-icon-done{ - background-color: #00a65a !important; + background-color: #00a65a !important; } .timeline-badge-date{ - background-color: #0073b7 !important; - color: #fff !important; + background-color: #0073b7 !important; + color: #fff !important; } .timeline-documents-container{ diff --git a/htdocs/theme/eldy/tpl/index.html b/htdocs/theme/eldy/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/index.html b/htdocs/theme/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/badges.inc.php b/htdocs/theme/md/badges.inc.php index 1ce2d912669..fd1b1122a17 100644 --- a/htdocs/theme/md/badges.inc.php +++ b/htdocs/theme/md/badges.inc.php @@ -1,135 +1,145 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} +?> /* <style type="text/css" > */ /* Badge style is based on boostrap framework */ .badge { - display: inline-block; - padding: .1em .35em; - font-size: 80%; - font-weight: 700 !important; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25rem; - transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; - border-width: 2px; - border-style: solid; - border-color: rgba(255,255,255,0); - box-sizing: border-box; + display: inline-block; + padding: .1em .35em; + font-size: 80%; + font-weight: 700 !important; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25rem; + transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; + border-width: 2px; + border-style: solid; + border-color: rgba(255,255,255,0); + box-sizing: border-box; } .badge-status { - font-size: 1em; - padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ + 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; + 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; + font-size: 0.95em; + padding: .3em .2em; } } .badge-pill, .tabs .badge { - padding-right: .5em; - padding-left: .5em; - border-radius: 0.25rem; + padding-right: .5em; + padding-left: .5em; + border-radius: 0.25rem; } .badge-dot { - padding: 0; - border-radius: 50%; - padding: 0.45em; - vertical-align: unset; + padding: 0; + border-radius: 50%; + padding: 0.45em; + vertical-align: unset; } a.badge:focus, a.badge:hover { - text-decoration: none; + text-decoration: none; } .liste_titre .badge:not(.nochangebackground) { - background-color: <?php print $badgeSecondary; ?>; - color: #fff; + background-color: <?php print $badgeSecondary; ?>; + color: #fff; +} + +span.badgeneutral { + padding: 2px 7px 2px 7px; + background-color: #e4e4e4; + color: #666; + border-radius: 10px; } /* PRIMARY */ .badge-primary{ - color: #fff !important; - background-color: <?php print $badgePrimary; ?>; + color: #fff !important; + background-color: <?php print $badgePrimary; ?>; } a.badge-primary.focus, a.badge-primary:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>; } a.badge-primary:focus, a.badge-primary:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgePrimary, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgePrimary, 10); ?>; } /* SECONDARY */ .badge-secondary, .tabs .badge { - color: #fff !important; - background-color: <?php print $badgeSecondary; ?>; + color: #fff !important; + background-color: <?php print $badgeSecondary; ?>; } a.badge-secondary.focus, a.badge-secondary:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>; } a.badge-secondary:focus, a.badge-secondary:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeSecondary, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeSecondary, 10); ?>; } /* SUCCESS */ .badge-success { - color: #fff !important; - background-color: <?php print $badgeSuccess; ?>; + color: #fff !important; + background-color: <?php print $badgeSuccess; ?>; } a.badge-success.focus, a.badge-success:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>; } a.badge-success:focus, a.badge-success:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeSuccess, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeSuccess, 10); ?>; } /* DANGER */ .badge-danger { - color: #fff !important; - background-color: <?php print $badgeDanger; ?>; + color: #fff !important; + background-color: <?php print $badgeDanger; ?>; } a.badge-danger.focus, a.badge-danger:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>; } a.badge-danger:focus, a.badge-danger:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeDanger, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeDanger, 10); ?>; } /* WARNING */ .badge-warning { - color: #fff !important; - background-color: <?php print $badgeWarning; ?>; + color: #fff !important; + background-color: <?php print $badgeWarning; ?>; } a.badge-warning.focus, a.badge-warning:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>; } a.badge-warning:focus, a.badge-warning:hover { - color: #212529 !important; - background-color: <?php print colorDarker($badgeWarning, 10); ?>; + color: #212529 !important; + background-color: <?php print colorDarker($badgeWarning, 10); ?>; } /* WARNING colorblind */ @@ -145,50 +155,60 @@ body[class*="colorblind-"] a.badge-warning:focus, a.badge-warning:hover { /* INFO */ .badge-info { - color: #fff !important; - background-color: <?php print $badgeInfo; ?>; + color: #fff !important; + background-color: <?php print $badgeInfo; ?>; } a.badge-info.focus, a.badge-info:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>; } a.badge-info:focus, a.badge-info:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeInfo, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeInfo, 10); ?>; } /* LIGHT */ .badge-light { - color: #212529 !important; - background-color: <?php print $badgeLight; ?>; + color: #212529 !important; + background-color: <?php print $badgeLight; ?>; } a.badge-light.focus, a.badge-light:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>; } a.badge-light:focus, a.badge-light:hover { - color: #212529 !important; - background-color: <?php print colorDarker($badgeLight, 10); ?>; + color: #212529 !important; + background-color: <?php print colorDarker($badgeLight, 10); ?>; } /* DARK */ .badge-dark { - color: #fff !important; - background-color: <?php print $badgeDark; ?>; + color: #fff !important; + background-color: <?php print $badgeDark; ?>; } a.badge-dark.focus, a.badge-dark:focus { - outline: 0; - box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>; + outline: 0; + box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>; } a.badge-dark:focus, a.badge-dark:hover { - color: #fff !important; - background-color: <?php print colorDarker($badgeDark, 10); ?>; + color: #fff !important; + background-color: <?php print colorDarker($badgeDark, 10); ?>; +} + + +@media only screen and (max-width: 570px) +{ + span.badge.badge-status { + overflow: hidden; + max-width: 130px; + text-overflow: ellipsis; + } } /* STATUS BADGES */ <?php -for ($i = 0; $i <= 9; $i++) { +for ($i = 0; $i <= 10; $i++) { /* Default Status */ _createStatusBadgeCss($i, '', "STATUS".$i); @@ -219,7 +239,7 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.'badgeStatus'.$statusName}; - $TBadgeBorderOnly = array('0', '1b', '3', '4b', '5', '7'); + $TBadgeBorderOnly = array('0', '1b', '3', '4b', '5', '7', '10'); $thisBadgeTextColor = colorIsLight(${$statusVarNamePrefix.'badgeStatus'.$statusName}) ? '#212529' : '#ffffff'; if (!empty(${$statusVarNamePrefix.'badgeStatus_textColor'.$statusName})) { @@ -231,8 +251,12 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL $thisBadgeBackgroundColor = "#fff"; } - if (in_array((string) $statusName, array('0', '5', '9'))) $thisBadgeTextColor = '#999999'; - if (in_array((string) $statusName, array('6'))) $thisBadgeTextColor = '#777777'; + if (in_array((string) $statusName, array('0', '5', '9'))) { + $thisBadgeTextColor = '#999999'; + } + if (in_array((string) $statusName, array('6'))) { + $thisBadgeTextColor = '#777777'; + } print $cssPrefix.".badge-status".$statusName." {\n"; print " color: ".$thisBadgeTextColor." !important;\n"; diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php index 1b27e7eeafb..c0d6e2c9cd7 100644 --- a/htdocs/theme/md/btn.inc.php +++ b/htdocs/theme/md/btn.inc.php @@ -1,17 +1,19 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ :root { - --btncolortext:rgb(<?php print $colortextlink; ?>); - --btncolorbg: #fbfbfb; - --btncolorborderhover: none; - --btncolorborder: #FFF; - --butactiondeletebg: rgb(234,228,225); - /* tertiary color */ - /* --butactionbg:rgb(218, 235, 225); */ - /* --butactionbg:rgb(228, 218, 235); */ - --butactionbg:rgb(118, 145, 225); + --btncolortext:rgb(<?php print $colortextlink; ?>); + --btncolorbg: #fbfbfb; + --btncolorborderhover: none; + --btncolorborder: #FFF; + --butactiondeletebg: rgb(234,228,225); + /* tertiary color */ + /* --butactionbg:rgb(218, 235, 225); */ + /* --butactionbg:rgb(228, 218, 235); */ + --butactionbg:rgb(118, 145, 225); } <?php @@ -50,7 +52,7 @@ div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tab margin-bottom: 1.4em !important; } div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused { - margin-bottom: 0 !important; + margin-bottom: 0 !important; } span.butAction, span.butActionDelete { @@ -58,44 +60,49 @@ span.butAction, span.butActionDelete { } .butAction { - background: var(--butactionbg); - color: #FFF !important; - border-radius: 3px; - /* background: rgb(230, 232, 239); */ + background: var(--butactionbg); + color: #FFF !important; + /* background: rgb(230, 232, 239); */ +} +.butActionRefused, .butAction, .butActionDelete { + border-radius: 3px; +} +.butActionRefused:last-child, .butAction:last-child, .butActionDelete:last-child { + margin-right: 0px !important; } .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { - text-decoration: none; - text-transform: uppercase; - font-weight: bold; + text-decoration: none; + text-transform: uppercase; + font-weight: bold; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; - padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; - font-family: <?php print $fontlist ?>; - display: inline-block; - text-align: center; - cursor: pointer; - /* color: #fff; */ - /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ - color: #444; - /* border: 1px solid #aaa; */ - /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */ + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; + padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; + font-family: <?php print $fontlist ?>; + display: inline-block; + text-align: center; + cursor: pointer; + /* color: #fff; */ + /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ + color: #444; + /* 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-bottom-right-radius: 0 !important; - border-top-left-radius: 0 !important; - border-bottom-left-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;*/ } .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active { - text-decoration: none; - text-transform: uppercase; - font-weight: normal; + text-decoration: none; + text-transform: uppercase; + font-weight: normal; - margin: 0em 0.3em 0 0.3em !important; - padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em; - font-family: <?php print $fontlist ?>; - display: inline-block; - /* text-align: center; New button are on right of screen */ - cursor: pointer; + margin: 0em 0.3em 0 0.3em !important; + padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em 0.3em; + font-family: <?php print $fontlist ?>; + display: inline-block; + /* text-align: center; New button are on right of screen */ + cursor: pointer; } .button { @@ -211,61 +218,61 @@ span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover } .butAction:hover { - -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); } .butActionNew:hover { - text-decoration: underline; - box-shadow: unset !important; + text-decoration: underline; + box-shadow: unset !important; } .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete { - background: var(--butactiondeletebg); - /* border: 1px solid #633; */ - color: #633; + background: var(--butactiondeletebg); + /* border: 1px solid #633; */ + color: #633; } .butActionDelete:hover { - -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); - box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + -webkit-box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); + box-shadow: 0px 0px 6px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1); } .butActionRefused { - text-decoration: none !important; - text-transform: uppercase; - font-weight: bold !important; + text-decoration: none !important; + text-transform: uppercase; + font-weight: bold !important; - white-space: nowrap !important; - cursor: not-allowed !important; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; - padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; - font-family: <?php print $fontlist ?> !important; - display: inline-block; - text-align: center; - cursor: pointer; - color: #999 !important; - border: 1px solid #ccc; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + white-space: nowrap !important; + cursor: not-allowed !important; + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.9'); ?>em; + padding: 0.6em <?php echo ($dol_optimize_smallscreen ? '0.6' : '0.7'); ?>em; + font-family: <?php print $fontlist ?> !important; + display: inline-block; + text-align: center; + cursor: pointer; + color: #999 !important; + border: 1px solid #ccc; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; } .butActionNewRefused, .butActionNewRefused:link, .butActionNewRefused:visited, .butActionNewRefused:hover, .butActionNewRefused:active { - text-decoration: none !important; - text-transform: uppercase; - font-weight: normal !important; + text-decoration: none !important; + text-transform: uppercase; + font-weight: normal !important; - white-space: nowrap !important; - cursor: not-allowed !important; - margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em; - padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em; - font-family: <?php print $fontlist ?> !important; - display: inline-block; - /* text-align: center; New button are on right of screen */ - cursor: pointer; - color: #999 !important; - padding-top: 0.2em; - box-shadow: none !important; - -webkit-box-shadow: none !important; + white-space: nowrap !important; + cursor: not-allowed !important; + margin: 0em <?php echo ($dol_optimize_smallscreen ? '0.7' : '0.9'); ?>em; + padding: 0.2em <?php echo ($dol_optimize_smallscreen ? '0.4' : '0.7'); ?>em; + font-family: <?php print $fontlist ?> !important; + display: inline-block; + /* text-align: center; New button are on right of screen */ + cursor: pointer; + color: #999 !important; + padding-top: 0.2em; + box-shadow: none !important; + -webkit-box-shadow: none !important; } .butActionTransparent { @@ -279,41 +286,41 @@ TITLE BUTTON */ div.pagination li:first-child a.btnTitle { - margin-left: 10px; + margin-left: 10px; } .btnTitle, a.btnTitle { - display: inline-block; - padding: 6px 12px; - font-size: 14px - font-weight: 400; - line-height: 1.4; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - box-shadow: none; - text-decoration: none; - position: relative; - margin: 0 0 0 10px; - min-width: 80px; - text-align: center; - color: rgb(<?php print $colortextlink; ?>); - border: none; - font-size: 12px; - font-weight: 300; - background-color: #fbfbfb; + display: inline-block; + padding: 6px 12px; + font-size: 14px + font-weight: 400; + line-height: 1.4; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + box-shadow: none; + text-decoration: none; + position: relative; + margin: 0 0 0 10px; + min-width: 80px; + text-align: center; + color: rgb(<?php print $colortextlink; ?>); + border: none; + font-size: 12px; + font-weight: 300; + background-color: #fbfbfb; } a.btnTitle.btnTitleSelected { - border: 1px solid #ccc; - border-radius: 3px; + border: 1px solid #ccc; + border-radius: 3px; } .btnTitle > .btnTitle-icon{ @@ -321,42 +328,42 @@ a.btnTitle.btnTitleSelected { } .btnTitle > .btnTitle-label{ - color: #666666; + color: #666666; } .btnTitle:hover, a.btnTitle:hover { - border-radius: 3px; - position: relative; - margin: 0 0 0 10px; - text-align: center; - color: #ffffff; - background-color: rgb(<?php print $colortextlink; ?>); - font-size: 12px; - text-decoration: none; - box-shadow: none; + border-radius: 3px; + position: relative; + margin: 0 0 0 10px; + text-align: center; + color: #ffffff; + background-color: rgb(<?php print $colortextlink; ?>); + font-size: 12px; + text-decoration: none; + box-shadow: none; } .btnTitle.refused, a.btnTitle.refused, .btnTitle.refused:hover, a.btnTitle.refused:hover { - color: #8a8a8a; - cursor: not-allowed; - background-color: #fbfbfb; - background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px ); + color: #8a8a8a; + cursor: not-allowed; + background-color: #fbfbfb; + background: repeating-linear-gradient( 45deg, #ffffff, #f1f1f1 4px, #f1f1f1 4px, #f1f1f1 4px ); } .btnTitle:hover .btnTitle-label{ - color: #ffffff; + color: #ffffff; } div.pagination .btnTitle:hover .btnTitle-label{ color: rgb(<?php print $colortextlink; ?>); } .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{ - color: #8a8a8a; + color: #8a8a8a; } .btnTitle>.fa { - font-size: 20px; - display: block; + font-size: 20px; + display: block; } /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */ @@ -366,15 +373,15 @@ div.pagination .btnTitle:hover .btnTitle-label{ font-size: 0.95em; } .btnTitle, a.btnTitle { - display: inline-block; - padding: 4px 4px 4px 4px; + display: inline-block; + padding: 4px 4px 4px 4px; min-width: unset; } } <?php if (!empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (!$user->admin)) { ?> .butActionRefused, .butActionNewRefused, .btnTitle.refused { - display: none !important; + display: none !important; } <?php } ?> diff --git a/htdocs/theme/md/ckeditor/index.html b/htdocs/theme/md/ckeditor/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index 6f7d55a285c..2627a727a23 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -1,5 +1,7 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > dont remove this line it's an ide hack */ /* @@ -7,15 +9,15 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .bookmark-footer a.top-menu-dropdown-link { - white-space: normal; + white-space: normal; } button.dropdown-item.global-search-item { - outline: none; + outline: none; } .open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-menu, .dropdown dd ul.open { - display: block; + display: block; } @@ -23,9 +25,9 @@ button.dropdown-item.global-search-item { color: #fff; } div#topmenu-bookmark-dropdown { - position: fixed; - right: 20px; - top: 0px; + position: fixed; + right: 20px; + top: 0px; } #topmenu-login-dropdown .dropdown-toggle:after { @@ -33,347 +35,347 @@ div#topmenu-bookmark-dropdown { } #topmenu-bookmark-dropdown .dropdown-menu { - width: 300px; + width: 300px; } button.dropdown-item.global-search-item { - outline: none; + outline: none; } .open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-menu{ - display: block; + display: block; } .dropdown-search { - border-color: #eee; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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-bookmark { - border-color: #eee; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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; + border-color: #eee; - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - 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); + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + 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-toggle{ - text-decoration: none !important; + text-decoration: none !important; } .dropdown-toggle::after { - /* font part */ - font-family: "Font Awesome 5 Free"; - font-size: 0.7em; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - text-align:center; - text-decoration:none; - margin: auto 3px; - display: inline-block; - content: "\f078"; + /* font part */ + font-family: "Font Awesome 5 Free"; + font-size: 0.7em; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + text-align:center; + text-decoration:none; + margin: auto 3px; + display: inline-block; + content: "\f078"; - -webkit-transition: -webkit-transform .2s ease-in-out; - -ms-transition: -ms-transform .2s ease-in-out; - transition: transform .2s ease-in-out; + -webkit-transition: -webkit-transform .2s ease-in-out; + -ms-transition: -ms-transform .2s ease-in-out; + transition: transform .2s ease-in-out; } .open>.dropdown-toggle::after { - transform: rotate(180deg); + transform: rotate(180deg); } /* * MENU Dropdown */ .login_block.usedropdown .logout-btn{ - /* display: none; */ + /* display: none; */ } .tmenu .open.dropdown, .tmenu .open.dropdown { - background: rgba(0, 0, 0, 0.1); + background: rgba(0, 0, 0, 0.1); } .tmenu .dropdown-menu, .login_block .dropdown-menu { - position: absolute; - right: 0; - <?php echo $left; ?>: auto; - line-height:1.3em; + position: absolute; + right: 0; + <?php echo $left; ?>: auto; + line-height:1.3em; } .tmenu .dropdown-menu, .login_block .dropdown-menu .user-body { - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; } .user-body { - color: #333; + color: #333; } .side-nav-vert .user-menu .dropdown-menu { - border-top-right-radius: 0; - border-top-left-radius: 0; - padding: 1px 0 0 0; - border-top-width: 0; - width: 300px; + border-top-right-radius: 0; + border-top-left-radius: 0; + padding: 1px 0 0 0; + border-top-width: 0; + width: 300px; } .side-nav-vert .user-menu .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; } .side-nav-vert .user-menu .dropdown-menu > .user-header { - min-height: 100px; - padding: 10px; - text-align: center; - white-space: normal; + min-height: 100px; + padding: 10px; + text-align: center; + white-space: normal; } #topmenu-global-search-dropdown .dropdown-menu{ - width: 300px; - max-width: 100%; + width: 300px; + max-width: 100%; } div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown { - line-height: 46px; + line-height: 46px; } a.top-menu-dropdown-link { - padding: 8px; + padding: 8px; } .dropdown-user-image { - border-radius: 50%; - vertical-align: middle; - z-index: 5; - height: 90px; - width: 90px; - border: 3px solid; - border-color: transparent; - border-color: rgba(255, 255, 255, 0.2); - max-width: 100%; - max-height :100%; + border-radius: 50%; + vertical-align: middle; + z-index: 5; + height: 90px; + width: 90px; + border: 3px solid; + border-color: transparent; + border-color: rgba(255, 255, 255, 0.2); + max-width: 100%; + max-height :100%; } .dropdown-menu > .user-header{ - background: rgb(<?php echo $colorbackhmenu1 ?>); + background: rgb(<?php echo $colorbackhmenu1 ?>); } .dropdown-menu .dropdown-header{ - padding: 8px 10px 10px 10px; + padding: 8px 10px 10px 10px; } .dropdown-menu > .user-footer { - background-color: #f9f9f9; - padding: 10px; + background-color: #f9f9f9; + padding: 10px; } .user-footer:after { - clear: both; + clear: both; } .dropdown-menu > .bookmark-footer{ - border-top: 1px solid #f0f0f0; - background-color: #f9f9f9; - padding: 10px; + border-top: 1px solid #f0f0f0; + background-color: #f9f9f9; + padding: 10px; } .dropdown-menu > .user-body, .dropdown-body{ - padding: 15px; - border-bottom: 1px solid #f4f4f4; - border-top: 1px solid #dddddd; - white-space: normal; + padding: 15px; + border-bottom: 1px solid #f4f4f4; + border-top: 1px solid #dddddd; + white-space: normal; } .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) ; + padding: 10px 0; + overflow-y: auto; + max-height: 60vh ; /* fallback for browsers without support for calc() */ + max-height: calc(90vh - 110px) ; white-space: normal; } #topmenu-bookmark-dropdown .dropdown-menu > .bookmark-body, #topmenu-bookmark-dropdown .dropdown-body{ - max-height: 60vh ; /* fallback for browsers without support for calc() */ - max-height: calc(90vh - 200px) ; + max-height: 60vh ; /* fallback for browsers without support for calc() */ + max-height: calc(90vh - 200px) ; } .dropdown-body::-webkit-scrollbar { - width: 8px; - } + width: 8px; + } .dropdown-body::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - border-radius: 0; - /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ - background: #aaa; + -webkit-border-radius: 0; + border-radius: 0; + /* background: rgb(<?php echo $colorbackhmenu1 ?>); */ + background: #aaa; } .dropdown-body::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); - -webkit-border-radius: 0; - border-radius: 0; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + -webkit-border-radius: 0; + border-radius: 0; } #topmenu-login-dropdown, #topmenu-bookmark-dropdown, #topmenu-global-search-dropdown { - padding: 0 5px 0 5px; + padding: 0 5px 0 5px; } #topmenu-login-dropdown a:hover{ - text-decoration: none; + text-decoration: none; } -#topmenuloginmoreinfo-btn{ - display: block; - text-aling: right; - color:#666; - cursor: pointer; +#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn { + display: block; + text-aling: right; + color:#666; + cursor: pointer; } -#topmenuloginmoreinfo{ - display: none; - clear: both; - font-size: 0.95em; +#topmenuloginmoreinfo, #topmenulogincompanyinfo { + display: none; + clear: both; + font-size: 0.95em; } .button-top-menu-dropdown { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: 400; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; } .user-footer .button-top-menu-dropdown { - color: #666666; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - border-width: 1px; - background-color: #f4f4f4; - border-color: #ddd; + color: #666666; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + border-width: 1px; + background-color: #f4f4f4; + border-color: #ddd; } .dropdown-menu a.top-menu-dropdown-link { - color: rgb(<?php print $colortextlink; ?>) !important; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - display: block; - margin: 5px 0px; + color: rgb(<?php print $colortextlink; ?>) !important; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + display: block; + margin: 5px 0px; } .dropdown-item { - display: block !important; - box-sizing: border-box; - width: 100%; - padding: .25rem 1.5rem .25rem 1rem; - clear: both; - font-weight: 400; - color: #212529 !important; - text-align: inherit; - background-color: transparent; - border: 0; + display: block !important; + box-sizing: border-box; + width: 100%; + padding: .25rem 1.5rem .25rem 1rem; + clear: both; + font-weight: 400; + color: #212529 !important; + text-align: inherit; + background-color: transparent; + border: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; } .dropdown-item::before { - /* font part */ - font-family: "Font Awesome 5 Free"; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - text-align:center; - text-decoration:none; - margin-right: 5px; - display: inline-block; - content: "\f0da"; - color: rgba(0,0,0,0.3); + /* font part */ + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + text-align:center; + text-decoration:none; + margin-right: 5px; + display: inline-block; + content: "\f0da"; + color: rgba(0,0,0,0.3); } .dropdown-item.active, .dropdown-item:hover, .dropdown-item:focus { - color: #<?php echo $colortextbackhmenu; ?> !important; - text-decoration: none; - background: rgb(<?php echo $colorbackhmenu1 ?>); + color: #<?php echo $colortextbackhmenu; ?> !important; + text-decoration: none; + background: rgb(<?php echo $colorbackhmenu1 ?>); } /* @@ -381,26 +383,26 @@ a.top-menu-dropdown-link { */ .dropdown-search-input { - width: 100%; - padding: 10px 35px 10px 20px; + width: 100%; + padding: 10px 35px 10px 20px; - background-color: transparent; - font-size: 14px; - line-height: 16px; - box-sizing: border-box; + background-color: transparent; + font-size: 14px; + line-height: 16px; + box-sizing: border-box; - color: #575756; - background-color: transparent; - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-size: 16px 16px; - background-position: 95% center; - border-radius: 50px; - border: 1px solid #c4c4c2 !important; - transition: all 250ms ease-in-out; - backface-visibility: hidden; - transform-style: preserve-3d; + color: #575756; + background-color: transparent; + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-size: 16px 16px; + background-position: 95% center; + border-radius: 50px; + border: 1px solid #c4c4c2 !important; + transition: all 250ms ease-in-out; + backface-visibility: hidden; + transform-style: preserve-3d; } @@ -421,11 +423,11 @@ a.top-menu-dropdown-link { } div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown { - line-height: unset; + line-height: unset; } ul.tmenu { - margin-right: 2px; + margin-right: 2px; } } @@ -450,10 +452,10 @@ a.top-menu-dropdown-link { .dropdown-search-input::placeholder { - color: color(#575756 a(0.8)); - letter-spacing: 1.5px; + color: color(#575756 a(0.8)); + letter-spacing: 1.5px; } .hidden-search-result{ - display: none !important; + display: none !important; } diff --git a/htdocs/theme/md/img/index.html b/htdocs/theme/md/img/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/img/menus/agenda.png b/htdocs/theme/md/img/menus/agenda.png deleted file mode 100644 index 35d8b1b3169..00000000000 Binary files a/htdocs/theme/md/img/menus/agenda.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/bank.png b/htdocs/theme/md/img/menus/bank.png deleted file mode 100644 index b83e7cd310a..00000000000 Binary files a/htdocs/theme/md/img/menus/bank.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/cart.png b/htdocs/theme/md/img/menus/cart.png deleted file mode 100644 index 8d8da880f0e..00000000000 Binary files a/htdocs/theme/md/img/menus/cart.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/chart.png b/htdocs/theme/md/img/menus/chart.png deleted file mode 100644 index 18559b692d1..00000000000 Binary files a/htdocs/theme/md/img/menus/chart.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/commercial.png b/htdocs/theme/md/img/menus/commercial.png deleted file mode 100644 index ba06d79a766..00000000000 Binary files a/htdocs/theme/md/img/menus/commercial.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/company.png b/htdocs/theme/md/img/menus/company.png deleted file mode 100644 index 7b9227c0674..00000000000 Binary files a/htdocs/theme/md/img/menus/company.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/ecm.png b/htdocs/theme/md/img/menus/ecm.png deleted file mode 100644 index 1bb8e0dafd6..00000000000 Binary files a/htdocs/theme/md/img/menus/ecm.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/externalsite.png b/htdocs/theme/md/img/menus/externalsite.png deleted file mode 100644 index 8abd6437ea6..00000000000 Binary files a/htdocs/theme/md/img/menus/externalsite.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/ftp.png b/htdocs/theme/md/img/menus/ftp.png deleted file mode 100644 index a70a9d29b77..00000000000 Binary files a/htdocs/theme/md/img/menus/ftp.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic1.png b/htdocs/theme/md/img/menus/generic1.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/md/img/menus/generic1.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic1_over.png b/htdocs/theme/md/img/menus/generic1_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/md/img/menus/generic1_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic2.png b/htdocs/theme/md/img/menus/generic2.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/md/img/menus/generic2.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic2_over.png b/htdocs/theme/md/img/menus/generic2_over.png deleted file mode 100644 index 62eed5564b6..00000000000 Binary files a/htdocs/theme/md/img/menus/generic2_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic3.png b/htdocs/theme/md/img/menus/generic3.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/md/img/menus/generic3.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic3_over.png b/htdocs/theme/md/img/menus/generic3_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/md/img/menus/generic3_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic4.png b/htdocs/theme/md/img/menus/generic4.png deleted file mode 100644 index ef13122ace5..00000000000 Binary files a/htdocs/theme/md/img/menus/generic4.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic4_over.png b/htdocs/theme/md/img/menus/generic4_over.png deleted file mode 100644 index 29023816e67..00000000000 Binary files a/htdocs/theme/md/img/menus/generic4_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/globe.png b/htdocs/theme/md/img/menus/globe.png deleted file mode 100644 index 0bc7dfd4802..00000000000 Binary files a/htdocs/theme/md/img/menus/globe.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/graph.png b/htdocs/theme/md/img/menus/graph.png deleted file mode 100644 index fb04031d47a..00000000000 Binary files a/htdocs/theme/md/img/menus/graph.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/holiday.png b/htdocs/theme/md/img/menus/holiday.png deleted file mode 100644 index 014c9918c2e..00000000000 Binary files a/htdocs/theme/md/img/menus/holiday.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/home.png b/htdocs/theme/md/img/menus/home.png deleted file mode 100644 index c5441fa2962..00000000000 Binary files a/htdocs/theme/md/img/menus/home.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/index.html b/htdocs/theme/md/img/menus/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/img/menus/mail.png b/htdocs/theme/md/img/menus/mail.png deleted file mode 100644 index 7b65a3d522e..00000000000 Binary files a/htdocs/theme/md/img/menus/mail.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/members.png b/htdocs/theme/md/img/menus/members.png deleted file mode 100644 index 270e4de2e05..00000000000 Binary files a/htdocs/theme/md/img/menus/members.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/menu.png b/htdocs/theme/md/img/menus/menu.png deleted file mode 100644 index 526e1975ab0..00000000000 Binary files a/htdocs/theme/md/img/menus/menu.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/money.png b/htdocs/theme/md/img/menus/money.png deleted file mode 100644 index 707d1676167..00000000000 Binary files a/htdocs/theme/md/img/menus/money.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/pointofsale.png b/htdocs/theme/md/img/menus/pointofsale.png deleted file mode 100644 index 8826337cd31..00000000000 Binary files a/htdocs/theme/md/img/menus/pointofsale.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/products.png b/htdocs/theme/md/img/menus/products.png deleted file mode 100644 index f614d17171a..00000000000 Binary files a/htdocs/theme/md/img/menus/products.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/project.png b/htdocs/theme/md/img/menus/project.png deleted file mode 100644 index 54f4aa382fe..00000000000 Binary files a/htdocs/theme/md/img/menus/project.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/shop.png b/htdocs/theme/md/img/menus/shop.png deleted file mode 100644 index 16b6cd01fbc..00000000000 Binary files a/htdocs/theme/md/img/menus/shop.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/ticket.png b/htdocs/theme/md/img/menus/ticket.png deleted file mode 100644 index 57fc2aedb5b..00000000000 Binary files a/htdocs/theme/md/img/menus/ticket.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/tools.png b/htdocs/theme/md/img/menus/tools.png deleted file mode 100644 index 244478041a4..00000000000 Binary files a/htdocs/theme/md/img/menus/tools.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/index.html b/htdocs/theme/md/img/weather/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/img/weather/weather-clear-night.png b/htdocs/theme/md/img/weather/weather-clear-night.png deleted file mode 100644 index f89b2ad8cad..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-clear-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-clear.png b/htdocs/theme/md/img/weather/weather-clear.png deleted file mode 100644 index ed1d48065f3..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-clear.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-clouds-night.png b/htdocs/theme/md/img/weather/weather-clouds-night.png deleted file mode 100644 index 0c74a6a37b4..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-clouds-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-clouds.png b/htdocs/theme/md/img/weather/weather-clouds.png deleted file mode 100644 index 75a8d230e50..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-clouds.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-few-clouds-night.png b/htdocs/theme/md/img/weather/weather-few-clouds-night.png deleted file mode 100644 index e2bbfee2b0e..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-few-clouds-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-few-clouds.png b/htdocs/theme/md/img/weather/weather-few-clouds.png deleted file mode 100644 index 3f188e6220d..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-few-clouds.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-freezing-rain.png b/htdocs/theme/md/img/weather/weather-freezing-rain.png deleted file mode 100644 index d270b5ae1bb..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-freezing-rain.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-hail.png b/htdocs/theme/md/img/weather/weather-hail.png deleted file mode 100644 index 9df0bdc24d7..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-hail.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-many-clouds.png b/htdocs/theme/md/img/weather/weather-many-clouds.png deleted file mode 100644 index de4cae7e8e1..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-many-clouds.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-mist.png b/htdocs/theme/md/img/weather/weather-mist.png deleted file mode 100644 index a2b57a5e408..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-mist.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers-day.png b/htdocs/theme/md/img/weather/weather-showers-day.png deleted file mode 100644 index 0b8e3149311..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers-day.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers-night.png b/htdocs/theme/md/img/weather/weather-showers-night.png deleted file mode 100644 index 1fff3febf5c..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers-scattered-day.png b/htdocs/theme/md/img/weather/weather-showers-scattered-day.png deleted file mode 100644 index ae098117351..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers-scattered-day.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers-scattered-night.png b/htdocs/theme/md/img/weather/weather-showers-scattered-night.png deleted file mode 100644 index ad0283a08db..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers-scattered-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers-scattered.png b/htdocs/theme/md/img/weather/weather-showers-scattered.png deleted file mode 100644 index 9d4abf53203..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers-scattered.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-showers.png b/htdocs/theme/md/img/weather/weather-showers.png deleted file mode 100644 index 38cd41f03b5..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-showers.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-snow-rain.png b/htdocs/theme/md/img/weather/weather-snow-rain.png deleted file mode 100644 index dc742aa1c4c..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-snow-rain.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-snow-scattered-day.png b/htdocs/theme/md/img/weather/weather-snow-scattered-day.png deleted file mode 100644 index 0048fec3df0..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-snow-scattered-day.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-snow-scattered-night.png b/htdocs/theme/md/img/weather/weather-snow-scattered-night.png deleted file mode 100644 index d8b0ccaa7ff..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-snow-scattered-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-snow-scattered.png b/htdocs/theme/md/img/weather/weather-snow-scattered.png deleted file mode 100644 index dff11fb3342..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-snow-scattered.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-snow.png b/htdocs/theme/md/img/weather/weather-snow.png deleted file mode 100644 index 16e4b472e7e..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-snow.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-storm-day.png b/htdocs/theme/md/img/weather/weather-storm-day.png deleted file mode 100644 index 3d434f5a768..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-storm-day.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-storm-night.png b/htdocs/theme/md/img/weather/weather-storm-night.png deleted file mode 100644 index 4075950838a..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-storm-night.png and /dev/null differ diff --git a/htdocs/theme/md/img/weather/weather-storm.png b/htdocs/theme/md/img/weather/weather-storm.png deleted file mode 100644 index 6e5360313b7..00000000000 Binary files a/htdocs/theme/md/img/weather/weather-storm.png and /dev/null differ diff --git a/htdocs/theme/md/index.html b/htdocs/theme/md/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index a784a1ec7d9..a363475c409 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -1,5 +1,7 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ @@ -12,10 +14,16 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix = ''; -if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; +if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) { + $prefix = 'background-'; +} -if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7; -if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +if (!isset($conf->global->THEME_SATURATE_RATIO)) { + $conf->global->THEME_SATURATE_RATIO = 0.7; +} +if (GETPOSTISSET('THEME_SATURATE_RATIO')) { + $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +} ?> @@ -111,15 +119,15 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = } -.info-box-module-external span.info-box-icon-version { - background: #bbb; +.info-box-module.--external span.info-box-icon-version { + background: #bbb; } a.info-box-text.info-box-text-a { - display: table-cell; + display: table-cell; } a.info-box-text-a i.fa.fa-exclamation-triangle { - font-size: 0.9em; + font-size: 0.9em; } .info-box { @@ -134,14 +142,14 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { border: 1px solid #e9e9e9; } .info-box.info-box-sm{ - min-height: 80px; - margin-bottom: 10px; + min-height: 80px; + margin-bottom: 10px; } .info-box-more { - float: right; - top: 4px; - position: absolute; - right: 10px; + float: right; + top: 4px; + position: absolute; + right: 10px; } .info-box small { @@ -182,17 +190,17 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { font-size: 45px; line-height: 90px; background: #eee; - <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?> - filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>); - <?php } ?> + <?php if (isset($conf->global->THEME_SATURATE_RATIO)) { ?> + filter: saturate(<?php echo $conf->global->THEME_SATURATE_RATIO; ?>); + <?php } ?> } .info-box-sm .info-box-icon { - width: 80px; - font-size: 25px; - line-height: 92px; + width: 80px; + font-size: 25px; + line-height: 92px; } .opened-dash-board-wrap .info-box-sm .info-box-icon { - line-height: 80px; + line-height: 80px; } .info-box-module .info-box-icon { height: 98px; @@ -201,69 +209,69 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { max-width: 100%; } .info-box-module .info-box-icon > img { - max-width: 55%; + max-width: 55%; } .info-box-icon-text{ - box-sizing: border-box; - display: block; - position: absolute; - width: 90px; - bottom: 0px; - color: #ffffff; - background-color: rgba(0,0,0,0.1); - cursor: default; + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; - font-size: 10px; - line-height: 15px; - padding: 0px 3px; - text-align: center; - opacity: 0; - -webkit-transition: opacity 0.5s, visibility 0s 0.5s; - transition: opacity 0.5s, visibility 0s 0.5s; + font-size: 10px; + line-height: 15px; + padding: 0px 3px; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; } .info-box-icon-version { - box-sizing: border-box; - display: block; - position: absolute; - width: 90px; - bottom: 0px; - color: #ffffff; - background-color: rgba(0,0,0,0.1); - cursor: default; + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; - font-size: 10px; - line-height: 22px; - padding: 0px 3px; - text-align: center; - opacity: 1; - -webkit-transition: opacity 0.5s, visibility 0s 0.5s; - transition: opacity 0.5s, visibility 0s 0.5s; + font-size: 10px; + line-height: 22px; + padding: 0px 3px; + text-align: center; + opacity: 1; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; } -.box-flex-item.info-box-module.info-box-module-disabled { - /* opacity: 0.6; */ +.box-flex-item.info-box-module.--disabled { + /* opacity: 0.6; */ } .info-box-actions { position: absolute; - right: 0; - bottom: 0; + right: 0; + bottom: 0; } <?php if (empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?> .info-box-icon-text{ - opacity: 1; + opacity: 1; } <?php } ?> .info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{ - overflow: hidden; - width: 80px; + overflow: hidden; + width: 80px; } .info-box:hover .info-box-icon-text{ - opacity: 1; + opacity: 1; } .info-box-content { @@ -291,7 +299,7 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { margin-bottom: 6px; } .info-box-title { - width: calc(100% - 20px); + width: calc(100% - 20px); } .info-box-text{ font-size: 0.92em; @@ -315,8 +323,12 @@ a.info-box-text{ text-decoration: none;} } <?php include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!isset($conf->global->THEME_SATURATE_RATIO)) $conf->global->THEME_SATURATE_RATIO = 0.7; -if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +if (!isset($conf->global->THEME_SATURATE_RATIO)) { + $conf->global->THEME_SATURATE_RATIO = 0.7; +} +if (GETPOSTISSET('THEME_SATURATE_RATIO')) { + $conf->global->THEME_SATURATE_RATIO = GETPOST('THEME_SATURATE_RATIO', 'int'); +} ?> .bg-infobox-project i.fa{ color: #605ca8 !important; @@ -363,7 +375,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = content: "\f571"; } .fa-dol-project:before { - content: "\f0e8"; + content: "\f542"; } .fa-dol-commande:before, .fa-dol-order_supplier:before { @@ -471,7 +483,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = .info-box-module { min-width: 350px; - max-width: 350px; + max-width: 350px; } .info-box-module .info-box-content { @@ -481,8 +493,8 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = @media only screen and (max-width: 1740px) { .info-box-module { - min-width: 315px; - max-width: 315px; + min-width: 315px; + max-width: 315px; } } @media only screen and (max-width: 767px) { diff --git a/htdocs/theme/md/main_menu_fa_icons.inc.php b/htdocs/theme/md/main_menu_fa_icons.inc.php index 3aa45726975..d234ff15d4a 100644 --- a/htdocs/theme/md/main_menu_fa_icons.inc.php +++ b/htdocs/theme/md/main_menu_fa_icons.inc.php @@ -1,48 +1,134 @@ -<?php if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> +<?php if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} ?> /* <style type="text/css" > */ .mainmenu::before{ - /* font part */ - font-family: "Font Awesome 5 Free"; - font-weight: 900; - font-style: normal; - font-variant: normal; - text-rendering: auto; - line-height: 26px; + /* font part */ + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 26px; font-size: 1.5em; - -webkit-font-smoothing: antialiased; - text-align:center; + -webkit-font-smoothing: antialiased; + text-align:center; text-decoration:none; color: #<?php echo $colortextbackhmenu; ?>; } .fa-15x { - font-size: 1.5em; + font-size: 1.5em; +} + +div.mainmenu { + background-image: none !important; +} + +div.mainmenu.menu::before { + content: "\f0c9"; +} + + +div.mainmenu.home::before{ + content: "\f015"; +} + +div.mainmenu.billing::before { + content: "\f51e"; +} + +div.mainmenu.accountancy::before { + /* content: "\f53d"; */ + content: "\f688"; + font-size: 1.2em; +} + +div.mainmenu.agenda::before { + content: "\f073"; +} + +div.mainmenu.bank::before { + content: "\f19c"; +} + +div.mainmenu.cashdesk::before { + content: "\f788"; +} + + +div.mainmenu.takepos::before { + content: "\f788"; +} + +div.mainmenu.companies::before { + content: "\f1ad"; +} + +div.mainmenu.commercial::before { + content: "\f0f2"; +} + +div.mainmenu.ecm::before { + content: "\f07c"; +} + +div.mainmenu.externalsite::before { + content: "\f360"; +} + +div.mainmenu.ftp::before { + content: "\f362"; +} + +div.mainmenu.hrm::before { + content: "\f508"; +} + +div.mainmenu.members::before { + content: "\f007"; +} + +div.mainmenu.products::before { + content: "\f1b2"; +} + +div.mainmenu.mrp::before { + content: "\f1b3"; +} + +div.mainmenu.project::before { + content: "\f542"; } div.mainmenu.ticket::before { - content: "\f3ff"; -} -div.mainmenu.ticket { - background-image: none !important; + content: "\f3ff"; } +div.mainmenu.tools::before { + content: "\f0ad"; +} + +div.mainmenu.website::before { + content: "\f57d"; +} div.mainmenu.generic1::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic2::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic3::before { - content: "\f249"; + content: "\f249"; } div.mainmenu.generic4::before { - content: "\f249"; + content: "\f249"; } /* Define color of some picto */ @@ -64,7 +150,7 @@ div.mainmenu.generic4::before { .fa-play { color: #444; } -.fa-unlink { +.fa-link, .fa-unlink { color: #555; } @@ -97,3 +183,15 @@ div.mainmenu.generic4::before { border-bottom: solid 60px currentColor; margin-left: 30px; } + +.menu_titre .em092 { + font-size: 0.92em; +} + +.menu_titre .em088 { + font-size: 0.88em; +} + +.menu_titre .em080 { + font-size: 0.80em; +} diff --git a/htdocs/theme/md/manifest.json.php b/htdocs/theme/md/manifest.json.php index 6051ff260ef..b249e81e7df 100644 --- a/htdocs/theme/md/manifest.json.php +++ b/htdocs/theme/md/manifest.json.php @@ -25,22 +25,46 @@ * \brief File for The Web App */ -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (!defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (!defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (!defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} require_once __DIR__.'/../../main.inc.php'; $appli = constant('DOL_APPLICATION_TITLE'); -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $appli = $conf->global->MAIN_APPLICATION_TITLE; +} top_httphead('text/json'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. @@ -48,22 +72,21 @@ if (empty($dolibarr_nocache)) { header('Cache-Control: max-age=10800, public, must-revalidate'); // For a text/json, we must set an Expires to avoid to have it forced to an expired value by the web server header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + 10800) . ' GMT'); -} -else { +} else { header('Cache-Control: no-cache'); } ?> { - "name": "<?php echo $appli; ?>", - "icons": [ - { - "src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; ?>", - "sizes": "256x256", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" + "name": "<?php echo $appli; ?>", + "icons": [ + { + "src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_256x256_color.png'; ?>", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" } \ No newline at end of file diff --git a/htdocs/theme/md/progress.inc.php b/htdocs/theme/md/progress.inc.php index 9a78141ace0..979f8b8034e 100644 --- a/htdocs/theme/md/progress.inc.php +++ b/htdocs/theme/md/progress.inc.php @@ -1,5 +1,7 @@ <?php -if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); +if (!defined('ISLOADEDBYSTEELSHEET')) { + die('Must be call by steelsheet'); +} include dol_buildpath($path.'/theme/eldy/progress.inc.php', 0); // actually md use same style as eldy theme diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f0e4d593f00..7b49acc63b5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -28,21 +28,35 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +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('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('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} define('ISLOADEDBYSTEELSHEET', '1'); require __DIR__.'/theme_vars.inc.php'; -if (defined('THEME_ONLY_CONSTANT')) return; +if (defined('THEME_ONLY_CONSTANT')) { + return; +} session_cache_limiter('public'); @@ -52,8 +66,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) // and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. -if (empty($user->id) && !empty($_SESSION['dol_login'])) -{ +if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('', $_SESSION['dol_login'], '', 1); $user->getrights(); @@ -66,11 +79,18 @@ if (empty($user->id) && !empty($_SESSION['dol_login'])) // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=10800, public, must-revalidate'); +} 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', '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 +} $langs->load("main", 0, 1); $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); @@ -78,7 +98,9 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); $path = ''; // This value may be used in future for external module to overwrite theme $theme = 'md'; // Value of theme -if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path = '/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; } +if (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { + $path = '/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme = $conf->global->MAIN_OVERWRITE_THEME_RES; +} // Define image path files and other constants $fontlist = 'roboto,arial,tahoma,verdana,helvetica'; //$fontlist='verdana,helvetica,arial,sans-serif'; @@ -98,19 +120,36 @@ $useboldtitle = (isset($conf->global->THEME_ELDY_USEBOLDTITLE) ? $conf->global-> $borderwidth = 2; // Case of option always editable -if (!isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY = $colorbackbody; -if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; -if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1; -if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1; -if (!isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover; -if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked; -if (!isset($conf->global->THEME_ELDY_LINEBREAK)) $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak; -if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab; -if (!isset($conf->global->THEME_ELDY_TEXTLINK)) $conf->global->THEME_ELDY_TEXTLINK = $colortextlink; +if (!isset($conf->global->THEME_ELDY_BACKBODY)) { + $conf->global->THEME_ELDY_BACKBODY = $colorbackbody; +} +if (!isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + $conf->global->THEME_ELDY_TOPMENU_BACK1 = $colorbackhmenu1; +} +if (!isset($conf->global->THEME_ELDY_VERMENU_BACK1)) { + $conf->global->THEME_ELDY_VERMENU_BACK1 = $colorbackvmenu1; +} +if (!isset($conf->global->THEME_ELDY_BACKTITLE1)) { + $conf->global->THEME_ELDY_BACKTITLE1 = $colorbacktitle1; +} +if (!isset($conf->global->THEME_ELDY_USE_HOVER)) { + $conf->global->THEME_ELDY_USE_HOVER = $colorbacklinepairhover; +} +if (!isset($conf->global->THEME_ELDY_USE_CHECKED)) { + $conf->global->THEME_ELDY_USE_CHECKED = $colorbacklinepairchecked; +} +if (!isset($conf->global->THEME_ELDY_LINEBREAK)) { + $conf->global->THEME_ELDY_LINEBREAK = $colorbacklinebreak; +} +if (!isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) { + $conf->global->THEME_ELDY_TEXTTITLENOTAB = $colortexttitlenotab; +} +if (!isset($conf->global->THEME_ELDY_TEXTLINK)) { + $conf->global->THEME_ELDY_TEXTLINK = $colortextlink; +} // Case of option editable only if option THEME_ELDY_ENABLE_PERSONALIZED is on -if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) -{ +if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) { // 90A4AE, 607D8B, 455A64, 37474F $conf->global->THEME_ELDY_BACKTABCARD1 = '255,255,255'; // card $conf->global->THEME_ELDY_BACKTABACTIVE = '234,234,234'; @@ -143,38 +182,55 @@ $fontsizesmaller = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp // Hover color $colorbacklinepairhover = ((!isset($conf->global->THEME_ELDY_USE_HOVER) || (string) $conf->global->THEME_ELDY_USE_HOVER === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_HOVER === '1' ? 'edf4fb' : $conf->global->THEME_ELDY_USE_HOVER)); $colorbacklinepairchecked = ((!isset($conf->global->THEME_ELDY_USE_CHECKED) || (string) $conf->global->THEME_ELDY_USE_CHECKED === '255,255,255') ? '' : ($conf->global->THEME_ELDY_USE_CHECKED === '1' ? 'edf4fb' : $conf->global->THEME_ELDY_USE_CHECKED)); -if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) -{ +if (!empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)) { $colorbacklinepairhover = ((!isset($user->conf->THEME_ELDY_USE_HOVER) || $user->conf->THEME_ELDY_USE_HOVER === '255,255,255') ? '' : ($user->conf->THEME_ELDY_USE_HOVER === '1' ? 'edf4fb' : $user->conf->THEME_ELDY_USE_HOVER)); $colorbacklinepairchecked = ((!isset($user->conf->THEME_ELDY_USE_CHECKED) || $user->conf->THEME_ELDY_USE_CHECKED === '255,255,255') ? '' : ($user->conf->THEME_ELDY_USE_CHECKED === '1' ? 'edf4fb' : $user->conf->THEME_ELDY_USE_CHECKED)); } -if (empty($colortopbordertitle1)) $colortopbordertitle1 = $colorbackhmenu1; +if (empty($colortopbordertitle1)) { + $colortopbordertitle1 = $colorbackhmenu1; +} // Set text color to black or white $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z' $tmppart = explode(',', $colorbackhmenu1); $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0); -if ($tmpval <= 460) $colortextbackhmenu = 'FFFFFF'; -else $colortextbackhmenu = '000000'; +if ($tmpval <= 460) { + $colortextbackhmenu = 'FFFFFF'; +} 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 == '') -{ +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 = '101010'; $colorshadowtitle = 'FFFFFF'; } -} else $colorshadowtitle = '888888'; + if ($tmpval <= 460) { + $colortexttitle = 'FFFFFF'; $colorshadowtitle = '888888'; + } else { + $colortexttitle = '101010'; $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 = '111111'; } +if ($tmpval <= 460) { + $colortextbacktab = 'FFFFFF'; +} else { + $colortextbacktab = '111111'; +} // Format color value to match expected format (may be 'FFFFFF' or '255,255,255') $colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); @@ -186,8 +242,12 @@ $colorbacklineimpair1 = join(',', colorStringToArray($colorbacklineimpair1)); $colorbacklineimpair2 = join(',', colorStringToArray($colorbacklineimpair2)); $colorbacklinepair1 = join(',', colorStringToArray($colorbacklinepair1)); $colorbacklinepair2 = join(',', colorStringToArray($colorbacklinepair2)); -if ($colorbacklinepairhover != '') $colorbacklinepairhover = join(',', colorStringToArray($colorbacklinepairhover)); -if ($colorbacklinepairchecked != '') $colorbacklinepairchecked = join(',', colorStringToArray($colorbacklinepairchecked)); +if ($colorbacklinepairhover != '') { + $colorbacklinepairhover = join(',', colorStringToArray($colorbacklinepairhover)); +} +if ($colorbacklinepairchecked != '') { + $colorbacklinepairchecked = join(',', colorStringToArray($colorbacklinepairchecked)); +} $colorbackbody = join(',', colorStringToArray($colorbackbody)); $colortexttitlenotab = join(',', colorStringToArray($colortexttitlenotab)); $colortexttitle = join(',', colorStringToArray($colortexttitle)); @@ -195,7 +255,9 @@ $colortext = join(',', colorStringToArray($colortext)); $colortextlink = join(',', colorStringToArray($colortextlink)); $nbtopmenuentries = $menumanager->showmenu('topnb'); -if ($conf->browser->layout == 'phone') $nbtopmenuentries = max($nbtopmenuentries, 10); +if ($conf->browser->layout == 'phone') { + $nbtopmenuentries = max($nbtopmenuentries, 10); +} print '/*'."\n"; print 'colorbackbody='.$colorbackbody."\n"; @@ -278,11 +340,11 @@ body { font-size: <?php print is_numeric($fontsize) ? $fontsize.'px' : $fontsize; ?>; line-height: 1.3; font-family: <?php print $fontlist ?>; - margin-top: 0; - margin-bottom: 0; - margin-right: 0; - margin-left: 0; - <?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?> + margin-top: 0; + margin-bottom: 0; + margin-right: 0; + margin-left: 0; + <?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?> } .sensiblehtmlcontent * { @@ -297,15 +359,18 @@ a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; fo a:hover { text-decoration: underline; color: rgb(<?php print $colortextlink; ?>); } a.commonlink { color: rgb(<?php print $colortextlink; ?>) !important; text-decoration: none; } +input { + font-size: unset; +} input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { - background-color: #FDFDFD; + background-color: #FDFDFD; } select.vmenusearchselectcombo { background-color: unset; } textarea:focus, button:focus { - /* v6 box-shadow: 0 0 4px #8091BF; */ + /* v6 box-shadow: 0 0 4px #8091BF; */ border: 1px solid #aaa !important; } input:focus, textarea:focus, button:focus, select:focus { @@ -318,10 +383,10 @@ textarea.cke_source:focus } th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) { - overflow: hidden; - white-space: nowrap; - max-width: 120px; - text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + max-width: 120px; + text-overflow: ellipsis; } .liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth], .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], @@ -341,14 +406,14 @@ select#date_startday, select#date_startmonth, select#date_endday, select#date_en } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { font-family: <?php print $fontlist ?>; - border: none; - border<?php echo empty($conf->global->THEME_HIDE_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px rgba(0,0,0,.2); - outline: none; - margin: 0px 0px 0px 0px; + border: none; + border<?php echo empty($conf->global->THEME_HIDE_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px rgba(0,0,0,.2); + outline: none; + margin: 0px 0px 0px 0px; } input { - line-height: 17px; + line-height: 17px; padding: 4px; padding-left: 5px; } @@ -364,7 +429,7 @@ input, select { margin-top:1px; } input.button.massactionconfirmed { - margin: 4px; + margin: 4px; } textarea { @@ -396,8 +461,8 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 290px; margin-bottom: 15px; margin-top: 15px; - margin-left: 5px; - margin-right: 5px; + margin-left: 5px; + margin-right: 5px; background-image: none; line-height: 24px; padding: 8px; @@ -409,15 +474,15 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment { color: #888 !important; } div.buttonpayment input { - background-color: unset; - border-bottom: unset; - font-weight: bold; - text-transform: uppercase; + background-color: unset; + border-bottom: unset; + font-weight: bold; + text-transform: uppercase; color: #333; cursor: pointer; } div.buttonpayment input:focus { - color: #008; + color: #008; } input.buttonpaymentcb { background-image: url(<?php echo dol_buildpath($path.'/theme/common/credit_card.png', 1) ?>); @@ -463,16 +528,16 @@ a.butStatus { padding-left: 5px; padding-right: 5px; background-color: transparent; - color: var(--colortext) !important; - border: 2px solid var( --butactionbg); - margin: 0 0.45em !important; + color: var(--colortext) !important; + border: 2px solid var( --butactionbg); + margin: 0 0.45em !important; } /* Used by timesheets */ span.timesheetalreadyrecorded input { - border: none; - border-bottom: solid 1px rgba(0,0,0,0.1); - margin-right: 1px !important; + border: none; + border-bottom: solid 1px rgba(0,0,0,0.1); + margin-right: 1px !important; } td.onholidaymorning, td.onholidayafternoon { background-color: #fdf6f2; @@ -490,8 +555,11 @@ td.rightborder { border-right: 1px solid #ccc; } +td.amount, span.amount, div.amount { + color: #006666; +} td.actionbuttons a { - padding-left: 6px; + padding-left: 6px; } select.flat, form.flat select, .pageplusone { font-weight: normal; @@ -499,8 +567,8 @@ select.flat, form.flat select, .pageplusone { height: 2em; } input.pageplusone { - padding-bottom: 4px; - padding-top: 4px; + padding-bottom: 4px; + padding-top: 4px; } .saturatemedium { @@ -520,7 +588,7 @@ input.pageplusone { opacity: 0.6; } .opacityhigh { - opacity: 0.2; + opacity: 0.24; } .opacitytransp { opacity: 0; @@ -533,10 +601,10 @@ input.pageplusone { } .vmirror { - transform: scale(1, -1); + transform: scale(1, -1); } .hmirror { - transform: scale(-1, 1); + transform: scale(-1, 1); } select:invalid { @@ -568,11 +636,15 @@ input:-webkit-autofill { background-image:none !important; -webkit-box-shadow: 0 0 0 50px #FBFFEA inset; } + +/* CSS for placeholder */ +.placeholder { color: #ccc; } ::-webkit-input-placeholder { color:#ccc; } :-moz-placeholder { color:#bbb; } /* firefox 18- */ ::-moz-placeholder { color:#bbb; } /* firefox 19+ */ :-ms-input-placeholder { color:#ccc; } /* ie */ input:-moz-placeholder { color:#ccc; } + input[name=price], input[name=weight], input[name=volume], input[name=surface], input[name=sizeheight], input[name=net_measure], select[name=incoterm_id] { margin-right: 6px; } fieldset { border: 1px solid #AAAAAA !important; } .legendforfieldsetstep { padding-bottom: 10px; } @@ -581,7 +653,7 @@ input#onlinepaymenturl, input#directdownloadlink { } div#moretabsList, div#moretabsListaction { - z-index: 5; + z-index: 5; } hr { border: 0; border-top: 1px solid #ccc; } @@ -593,7 +665,7 @@ hr { border: 0; border-top: 1px solid #ccc; } padding: 4px 14px; margin-bottom: 0; margin-top: 0; - font-family: <?php print $fontlist ?>; + font-family: <?php print $fontlist ?>; text-align: center; cursor: pointer; color: #333333 !important; @@ -625,35 +697,35 @@ hr { border: 0; border-top: 1px solid #ccc; } } .button:disabled, .buttonDelete:disabled, .button.disabled, .buttonDelete.disabled { opacity: 0.4; - box-shadow: none; - -webkit-box-shadow: none; - cursor: auto; + box-shadow: none; + -webkit-box-shadow: none; + cursor: auto; } .buttonRefused { pointer-events: none; - cursor: default; + cursor: default; opacity: 0.4; - box-shadow: none; - -webkit-box-shadow: none; + box-shadow: none; + -webkit-box-shadow: none; } .button_search, .button_removefilter { - border: unset; - background: unset; + border: unset; + background: unset; } .button_search:hover, .button_removefilter:hover { - cursor: pointer; + cursor: pointer; } form { - padding:0px; - margin:0px; + padding:0px; + margin:0px; } div.float, span.floatleft { - float:<?php print $left; ?>; + float:<?php print $left; ?>; } div.floatright { - float:<?php print $right; ?>; + float:<?php print $right; ?>; } .block { @@ -664,12 +736,12 @@ div.floatright display:inline-block; } .largenumber { - font-size: 1.4em; + font-size: 1.4em; } th .button { - -webkit-box-shadow: none !important; - box-shadow: none !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; -webkit-border-radius:0px !important; border-radius:0px !important; } @@ -706,21 +778,21 @@ textarea.centpercent { width: 96%; } .small, small { - font-size: 85%; + font-size: 85%; } .h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small { - font-size: 65%; + font-size: 65%; } .h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, .h4 .small, .h4 small, .h5 .small, .h5 small, .h6 .small, .h6 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small, h4 .small, h4 small, h5 .small, h5 small, h6 .small, h6 small { - font-weight: 400; - line-height: 1; - color: #777; + font-weight: 400; + line-height: 1; + color: #777; } .center { - text-align: center; - margin: 0px auto; + text-align: center; + margin: 0px auto; } .left { text-align: <?php print $left; ?>; @@ -732,10 +804,10 @@ textarea.centpercent { text-align: justify; } .pull-left { - float: left!important; + float: left!important; } .pull-right { - float: right!important; + float: right!important; } .nowrap { white-space: <?php print ($dol_optimize_smallscreen ? 'normal' : 'nowrap'); ?>; @@ -768,7 +840,7 @@ textarea.centpercent { font-weight: normal !important; } .nounderline { - text-decoration: none; + text-decoration: none; } .nopadding { padding: 0; @@ -810,43 +882,78 @@ textarea.centpercent { cursor: not-allowed; } .backgroundblank { - background-color: #fff; + background-color: #fff; } .nobackground, .nobackground tr { background: unset !important; } .checkboxattachfilelabel { - font-size: 0.85em; - opacity: 0.7; + font-size: 0.85em; + opacity: 0.7; } .longmessagecut { - max-height: 250px; - max-width: 100%; - overflow-y: auto; + max-height: 250px; + max-width: 100%; + overflow-y: auto; +} +div.urllink { + padding: 5px; + margin-top: 5px; + margin-bottom: 5px; + /* border: 1px solid #ccc; */ + border-radius: 5px; + /* width: fit-content; */ + background-color: #e0e0e8; + opacity: 0.8; +} +div.urllink, div.urllink a { + color: #339 !important; +} + +.fa-info-circle { + padding-<?php echo $left; ?>: 3px; +} +i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { + color: #888 !important; + opacity: 0.4; + padding-<?php echo $left; ?>: 3px; +} +.stockmovemententry { + color: #080; + transform: rotate(0.25turn); + font-size: 1.2em; +} +.stockmovementexit { + color: #968822; + transform: rotate(0.3turn); + font-size: 1.2em; +} +.stockmovement { + font-size: 1.4em; } .text-warning{ - color : <?php print $textWarning; ?> + color : <?php print $textWarning; ?> } body[class*="colorblind-"] .text-warning{ - color : <?php print $colorblind_deuteranopes_textWarning; ?> + color : <?php print $colorblind_deuteranopes_textWarning; ?> } .text-success{ - color : <?php print $textSuccess; ?> + color : <?php print $textSuccess; ?> } body[class*="colorblind-"] .text-success{ - color : <?php print $colorblind_deuteranopes_textSuccess; ?> + color : <?php print $colorblind_deuteranopes_textSuccess; ?> } .text-danger{ - color : <?php print $textDanger; ?> + color : <?php print $textDanger; ?> } .editfielda span.fa-pencil-alt, .editfielda span.fa-trash { - color: #ccc !important; + color: #ccc !important; } .editfielda span.fa-pencil-alt:hover, .editfielda span.fa-trash:hover { - color: rgb(<?php echo $colortexttitle; ?>) !important; + color: rgb(<?php echo $colortexttitle; ?>) !important; } .size15x { font-size: 1.5em !important; } @@ -868,6 +975,11 @@ body[class*="colorblind-"] .text-success{ { border-right: 1px solid #f4f4f4; } +.borderleftlight +{ + border-left: 1px solid #f4f4f4; +} + #formuserfile { margin-top: 4px; } @@ -879,32 +991,32 @@ body[class*="colorblind-"] .text-success{ vertical-align: middle; } .divsocialnetwork:not(:first-child) { - padding-left: 20px; + padding-left: 20px; } div.divsearchfield { float: <?php print $left; ?>; margin-<?php print $right; ?>: 12px; margin-<?php print $left; ?>: 2px; margin-top: 4px; - margin-bottom: 4px; - padding-left: 2px; + margin-bottom: 4px; + padding-left: 2px; } .divsearchfieldfilter { - text-overflow: clip; - overflow: auto; - white-space: nowrap; - padding-bottom: 5px; - opacity: 0.6; + text-overflow: clip; + overflow: auto; + white-space: nowrap; + padding-bottom: 5px; + opacity: 0.6; } .divadvancedsearchfield:first-child { - margin-top: 3px; + margin-top: 3px; } .divadvancedsearchfield { - float: left; - padding-left: 15px; - padding-right: 15px; - padding-bottom: 2px; - padding-top: 2px; + float: left; + padding-left: 15px; + padding-right: 15px; + padding-bottom: 2px; + padding-top: 2px; } .divadvancedsearchfield span.select2.select2-container.select2-container--default { padding-bottom: 4px; @@ -914,22 +1026,22 @@ div.divsearchfield { if ($conf->browser->layout == 'phone') { ?> .divsearchfieldfilter { - white-space: nowrap; + white-space: nowrap; } <?php } ?> .a-filter, .a-mesure { - border-radius: 50px; - background: var(--colortexttitlenotab); - color: #fff; - padding: 8px 10px 8px 6px; + border-radius: 50px; + background: var(--colortexttitlenotab); + color: #fff; + padding: 8px 10px 8px 6px; } .a-filter:before { - content: "\f0b0"; + content: "\f0b0"; } .a-mesure:before { - content: "\f080"; + content: "\f080"; } .a-filter:before, .a-mesure:before { font-family: "Font Awesome 5 Free"; @@ -938,10 +1050,37 @@ if ($conf->browser->layout == 'phone') { padding-left: 5px; } .a-filter-disabled, .a-mesure-disabled { - border-radius: 50px; - background: var(--colorbacktitle1); - padding: 8px; - opacity: 0.6; + 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; +} + +div.div-for-modal-topright { + /* display: none; */ + position: fixed; + top: 0; + right: 0; + width:50%; /* adjust as per your needs */ + height:250px; /* adjust as per your needs */ + background: #fff; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 1100; } @@ -970,12 +1109,12 @@ input > ul.attendees { padding-bottom: 10px; } .checkallactions { - margin-left: 2px; /* left must be same than right to keep checkbox centered */ - margin-right: 2px; /* left must be same than right to keep checkbox centered */ - vertical-align: middle; + margin-left: 2px; /* left must be same than right to keep checkbox centered */ + margin-right: 2px; /* left must be same than right to keep checkbox centered */ + vertical-align: middle; } select.flat.selectlimit { - max-width: 62px; + max-width: 62px; } .selectlimit, .marginrightonly { margin-right: 10px !important; @@ -996,17 +1135,17 @@ select.flat.selectlimit { margin-bottom: 10px !important; } .nomargintop { - margin-top: 0 !important; + margin-top: 0 !important; } .nomarginbottom { - margin-bottom: 0 !important; + margin-bottom: 0 !important; } .selectlimit, .selectlimit:focus { - border-left: none !important; - border-top: none !important; - border-right: none !important; - outline: none; + border-left: none !important; + border-top: none !important; + border-right: none !important; + outline: none; } .strikefordisabled { text-decoration: line-through; @@ -1016,69 +1155,81 @@ select.flat.selectlimit { } /* using a tdoverflowxxx make the min-width not working */ .tdoverflow { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 50px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 50px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax100 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax100imp { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px !important; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 100px !important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax125 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 125px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 125px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax150 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 150px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 150px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax200 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 200px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowmax300 { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 300px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.tdoverflowmax400 { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 400px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.tdoverflowmax500 { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 500px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .tdoverflowauto { - max-width: 0; - overflow: auto; + max-width: 0; + overflow: auto; } .divintodwithtwolinesmax { - width: 75px; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; + width: 75px; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; } .twolinesmax { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; } .tablelistofcalendars { @@ -1106,19 +1257,19 @@ select.flat.selectlimit { margin-bottom: 12px; } #builddoc_form ~ .showlinkedobjectblock { - margin-top: 20px; + margin-top: 20px; } /* For the long description of module */ .moduledesclong p img,.moduledesclong p a img { - max-width: 90% !important; - height: auto !important; + max-width: 90% !important; + height: auto !important; } .imgdoc { - margin: 18px; - border: 1px solid #ccc; - box-shadow: 1px 1px 25px #aaa; - max-width: calc(100% - 56px); + margin: 18px; + border: 1px solid #ccc; + box-shadow: 1px 1px 25px #aaa; + max-width: calc(100% - 56px); } .fa-file-text-o, .fa-file-code-o, .fa-file-powerpoint-o, .fa-file-excel-o, .fa-file-word-o, .fa-file-o, .fa-file-image-o, .fa-file-video-o, .fa-file-audio-o, .fa-file-archive-o, .fa-file-pdf-o { color: #505; @@ -1130,34 +1281,36 @@ select.flat.selectlimit { /* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */ /*.table-responsive { - width: calc(100% - 330px); - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; + width: calc(100% - 330px); + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; }*/ /* Style used for most tables */ div.fiche>div.tabBar>form>div.div-table-responsive { - min-height: 392px; + min-height: 392px; } .div-table-responsive, .div-table-responsive-no-min { - overflow-x: auto; - min-height: 0.01%; + overflow-x: auto; + min-height: 0.01%; } .div-table-responsive { - line-height: 120%; + line-height: 120%; } /* Style used for full page tables with field selector and no content after table (priority before previous for such tables) */ div.fiche>form>div.div-table-responsive, div.fiche>form>div.div-table-responsive-no-min { - overflow-x: auto; + overflow-x: auto; } div.fiche>form>div.div-table-responsive { - min-height: 392px; + min-height: 392px; } .flexcontainer { - <?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) echo 'display: inline-flex;' ?> - flex-flow: row wrap; - justify-content: flex-start; + <?php if (in_array($conf->browser->name, array('chrome', 'firefox'))) { + echo 'display: inline-flex;'; + } ?> + flex-flow: row wrap; + justify-content: flex-start; } .thumbstat { flex: 1 1 116px; @@ -1166,13 +1319,13 @@ div.fiche>form>div.div-table-responsive { flex: 1 1 150px; } .thumbstat, .thumbstat150 { - flex-grow: 1; - flex-shrink: 1; - /* flex-basis: 140px; */ - /* min-width: 150px; */ - width: 158px; - justify-content: flex-start; - align-self: flex-start; + flex-grow: 1; + flex-shrink: 1; + /* flex-basis: 140px; */ + /* min-width: 150px; */ + width: 158px; + justify-content: flex-start; + align-self: flex-start; } select.selectarrowonleft { @@ -1183,7 +1336,7 @@ select.selectarrowonleft option { } table[summary="list_of_modules"] .fa-cog { - font-size: 1.5em; + font-size: 1.5em; } .linkedcol-element { @@ -1209,10 +1362,10 @@ table[summary="list_of_modules"] .fa-cog { { .width20 { width: 20px; } .width25 { width: 25px; } - .width50 { width: 50px; } - .width75 { width: 75px; } - .width100 { width: 100px; } - .width200 { width: 200px; } + .width50 { width: 50px; } + .width75 { width: 75px; } + .width100 { width: 100px; } + .width200 { width: 200px; } .minwidth100 { min-width: 100px; } .minwidth150 { min-width: 150px; } .minwidth200 { min-width: 200px; } @@ -1220,10 +1373,10 @@ table[summary="list_of_modules"] .fa-cog { .minwidth400 { min-width: 400px; } .minwidth500 { min-width: 500px; } .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 75px !important; } + .minwidth75imp { min-width: 75px !important; } .minwidth100imp { min-width: 100px !important; } .minwidth200imp { min-width: 200px !important; } - .minwidth250imp { min-width: 250px !important; } + .minwidth250imp { min-width: 250px !important; } .minwidth300imp { min-width: 300px !important; } .minwidth400imp { min-width: 400px !important; } .minwidth500imp { min-width: 500px !important; } @@ -1237,6 +1390,9 @@ table[summary="list_of_modules"] .fa-cog { .width125 { width: 125px; } .width150 { width: 150px; } .width200 { width: 200px; } +.width300 { width: 300px; } +.width400 { width: 400px; } +.width500 { width: 500px; } .maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } @@ -1275,16 +1431,16 @@ table[summary="list_of_modules"] .fa-cog { .titlefield { /* width: 30% !important; */ } .titlefieldcreate { width: 30% !important; } .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 150px !important; } - .minwidth200imp { min-width: 200px !important; } - .minwidth250imp { min-width: 250px !important; } - .minwidth300imp { min-width: 300px !important; } - .minwidth400imp { min-width: 300px !important; } - .minwidth500imp { min-width: 300px !important; } + .minwidth75imp { min-width: 75px !important; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 150px !important; } + .minwidth200imp { min-width: 200px !important; } + .minwidth250imp { min-width: 250px !important; } + .minwidth300imp { min-width: 300px !important; } + .minwidth400imp { min-width: 300px !important; } + .minwidth500imp { min-width: 300px !important; } - .linkedcol-element { + .linkedcol-element { min-width: unset; } } @@ -1292,16 +1448,16 @@ table[summary="list_of_modules"] .fa-cog { /* Force values for small screen 1000 */ @media only screen and (max-width: 1000px) { - .maxwidthonsmartphone { max-width: 100px; } + .maxwidthonsmartphone { max-width: 100px; } .minwidth50imp { min-width: 50px !important; } - .minwidth75imp { min-width: 70px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 110px !important; } - .minwidth200imp { min-width: 110px !important; } - .minwidth250imp { min-width: 115px !important; } - .minwidth300imp { min-width: 120px !important; } - .minwidth400imp { min-width: 150px !important; } - .minwidth500imp { min-width: 250px !important; } + .minwidth75imp { min-width: 70px !important; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 110px !important; } + .minwidth200imp { min-width: 110px !important; } + .minwidth250imp { min-width: 115px !important; } + .minwidth300imp { min-width: 120px !important; } + .minwidth400imp { min-width: 150px !important; } + .minwidth500imp { min-width: 250px !important; } } /* Set a width. Note: add also a max-width, for example maxwidth500, that will be used in priority */ @@ -1325,7 +1481,7 @@ table[summary="list_of_modules"] .fa-cog { } div.divphotoref { - padding-right: 10px !important; + padding-right: 10px !important; } } @@ -1341,51 +1497,51 @@ table[summary="list_of_modules"] .fa-cog { } .login_vertical_align { - padding-left: 0; - } - .login_table input#username, .login_table input#password, .login_table input#securitycode { + padding-left: 0; + } + .login_table input#username, .login_table input#password, .login_table input#securitycode { margin-left: 5px !important; - } + } div#login_left, div#login_right { - min-width: 150px !important; - padding-left: 5px !important; - padding-right: 5px !important; - } - .login_table div#login_right .tdinputlogin, .login_table div#login_right .tdinputlogin input { - min-width: 150px !important; - } + min-width: 150px !important; + padding-left: 5px !important; + padding-right: 5px !important; + } + .login_table div#login_right .tdinputlogin, .login_table div#login_right .tdinputlogin input { + min-width: 150px !important; + } .divmainbodylarge { margin-left: 20px; margin-right: 20px; } - .tdoverflowonsmartphone { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .tdoverflowonsmartphone { + max-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } - .tdoverflowmax150onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .tdoverflowmax150onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } div.fiche { - margin-top: <?php print ($dol_hide_topmenu ? '12' : '6'); ?>px !important; + margin-top: <?php print ($dol_hide_topmenu ? '12' : '6'); ?>px !important; + } + .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { + height: 40px !important; } - .border tbody tr, .border tbody tr td, div.tabBar table.border tr, div.tabBar table.border tr td, div.tabBar div.border .table-border-row, div.tabBar div.border .table-key-border-col, div.tabBar div.border .table-val-border-col { - height: 40px !important; - } - .quatrevingtpercent, .inputsearch { - width: 95%; - } + .quatrevingtpercent, .inputsearch { + width: 95%; + } select { padding-top: 4px; @@ -1397,34 +1553,34 @@ table[summary="list_of_modules"] .fa-cog { } input, input[type=text], input[type=password], select, textarea { min-width: 20px; - min-height: 1.4em; - line-height: 1.4em; - } + min-height: 1.4em; + line-height: 1.4em; + } - .hideonsmartphone { display: none; } - .hideonsmartphoneimp { display: none !important; } - .noenlargeonsmartphone { width : 50px !important; display: inline !important; } - .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } - .maxwidth50onsmartphone { max-width: 40px; } - .maxwidth75onsmartphone { max-width: 50px; } - .maxwidth100onsmartphone { max-width: 70px; } - .maxwidth150onsmartphone { max-width: 120px; } - .maxwidth150onsmartphoneimp { max-width: 120px !important; } - .maxwidth200onsmartphone { max-width: 200px; } - .maxwidth250onsmartphone { max-width: 250px; } - .maxwidth300onsmartphone { max-width: 300px; } - .maxwidth400onsmartphone { max-width: 400px; } + .hideonsmartphone { display: none; } + .hideonsmartphoneimp { display: none !important; } + .noenlargeonsmartphone { width : 50px !important; display: inline !important; } + .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } + .maxwidth50onsmartphone { max-width: 40px; } + .maxwidth75onsmartphone { max-width: 50px; } + .maxwidth100onsmartphone { max-width: 70px; } + .maxwidth150onsmartphone { max-width: 120px; } + .maxwidth150onsmartphoneimp { max-width: 120px !important; } + .maxwidth200onsmartphone { max-width: 200px; } + .maxwidth250onsmartphone { max-width: 250px; } + .maxwidth300onsmartphone { max-width: 300px; } + .maxwidth400onsmartphone { max-width: 400px; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 75px !important; } - .minwidth100imp { min-width: 100px !important; } - .minwidth150imp { min-width: 110px !important; } - .minwidth200imp { min-width: 110px !important; } - .minwidth250imp { min-width: 115px !important; } - .minwidth300imp { min-width: 120px !important; } - .minwidth400imp { min-width: 150px !important; } - .minwidth500imp { min-width: 250px !important; } - .titlefield { width: auto; } - .titlefieldcreate { width: auto; } + .minwidth100imp { min-width: 100px !important; } + .minwidth150imp { min-width: 110px !important; } + .minwidth200imp { min-width: 110px !important; } + .minwidth250imp { min-width: 115px !important; } + .minwidth300imp { min-width: 120px !important; } + .minwidth400imp { min-width: 150px !important; } + .minwidth500imp { min-width: 250px !important; } + .titlefield { width: auto; } + .titlefieldcreate { width: auto; } #tooltip { position: absolute; @@ -1439,31 +1595,31 @@ table[summary="list_of_modules"] .fa-cog { div.divphotoref { padding-<?php echo $right; ?>: 5px; - padding-bottom: 5px; + padding-bottom: 5px; + } + img.photoref, div.photoref { + border: none; + -webkit-box-shadow: none; + box-shadow: none; + padding: 4px; + height: 20px; + width: 20px; + object-fit: contain; } - img.photoref, div.photoref { - border: none; - -webkit-box-shadow: none; - box-shadow: none; - padding: 4px; - height: 20px; - width: 20px; - object-fit: contain; - } div.statusref { - padding-right: 10px; - } + padding-right: 10px; + } div.statusref img { - padding-right: 3px !important; - } + padding-right: 3px !important; + } div.statusrefbis { - padding-right: 3px !important; - } + padding-right: 3px !important; + } - input.buttonpayment { + input.buttonpayment { min-width: 300px; - } + } } .linkobject { cursor: pointer; } @@ -1515,13 +1671,14 @@ td.showDragHandle { min-height: 100%; position: relative; width: 213px; + padding-top: 20px; } #id-right { /* This must stay id-right and not be replaced with echo $right */ width: 100%; padding-bottom: 10px; <?php if (GETPOST('optioncss', 'aZ09') != 'print') { ?> padding-left: 229px; - padding-top: 12px; + padding-top: 16px; <?php } ?> } @@ -1627,6 +1784,7 @@ body.sidebar-collapse .side-nav, body.sidebar-collapse .login_block } <?php } ?> + /* For smartphone (testmenuhider is on) */ <?php if (in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> #id-container { @@ -1678,7 +1836,7 @@ div.login_block { color: #333 !important; } .login_block_elem a span.atoplogin, .login_block_elem span.atoplogin { - vertical-align: middle; + vertical-align: middle; } @@ -1690,6 +1848,7 @@ div.login_block { z-index: 91; background: rgb(<?php echo $colorbackvmenu1; ?>); border-right: 1px solid rgba(0,0,0,0.3); + padding-top: 20px; <?php if (in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> top: 50px ! important; @@ -1704,9 +1863,11 @@ div.fiche { <?php } ?> div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '24' : '6')); ?>px; - margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '22' : '6')); ?>px; - <?php if (!empty($dol_hide_leftmenu) && !empty($dol_hide_topmenu)) print 'margin-top: 12px;'; ?> + margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '30' : '6')); ?>px; + margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : (empty($conf->dol_optimize_smallscreen) ? '28' : '6')); ?>px; + <?php if (!empty($dol_hide_leftmenu) && !empty($dol_hide_topmenu)) { + print 'margin-top: 12px;'; + } ?> margin-bottom: 15px; } body.onlinepaymentbody div.fiche { /* For online payment page */ @@ -1723,76 +1884,102 @@ div.fichecenterbis { margin-top: 8px; } div.fichethirdleft { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?> - <?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px;\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$left.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: 50%;\n"; + } ?> + <?php if ($conf->browser->layout == 'phone') { + print "padding-bottom: 6px;\n"; + } ?> } div.fichetwothirdright { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?> - <?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$right.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: 50%;\n"; + } ?> + <?php if ($conf->browser->layout == 'phone') { + print "padding-bottom: 6px\n"; + } ?> } div.fichetwothirdright div.ficheaddleft { - padding-left: 20px; + padding-left: 20px; } div.fichehalfleft { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$left.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: calc(50% - 10px);\n"; + } ?> } div.fichehalfright { - <?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?> - <?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?> + <?php if ($conf->browser->layout != 'phone') { + print "float: ".$right.";\n"; + } ?> + <?php if ($conf->browser->layout != 'phone') { + print "width: calc(50% - 10px);\n"; + } ?> } div.fichehalfright { - <?php if ($conf->browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?> + <?php if ($conf->browser->layout == 'phone') { + print "margin-top: 10px;\n"; + } ?> } -div.firstcolumn div.box { + +/*div.firstcolumn div.box { padding-right: 10px; } div.secondcolumn div.box { padding-left: 10px; -} +}*/ + /* Force values on one colum for small screen */ @media only screen and (max-width: 900px) { - div.fiche { - margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : ($dol_hide_leftmenu ? '4' : '20')); ?>px; - margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 8 : 16); ?>px; - <?php if (!empty($conf->dol_hide_leftmenu) && !empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> - margin-bottom: 15px; - } - div.fichecenter { - width: 100%; - clear: both; /* This is to have div fichecenter that are true rectangles */ - } - div.fichecenterbis { - margin-top: 8px; - } - div.fichethirdleft { - float: none; - width: auto; - padding-bottom: 6px; - } - div.fichetwothirdright { - float: none; - width: auto; - padding-bottom: 6px; - } - div.fichetwothirdright div.ficheaddleft { - padding-left: 0; + div.fiche { + margin-<?php print $left; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 6 : ($dol_hide_leftmenu ? '4' : '20')); ?>px; + margin-<?php print $right; ?>: <?php print (GETPOST('optioncss', 'aZ09') == 'print' ? 8 : 16); ?>px; + <?php if (!empty($conf->dol_hide_leftmenu) && !empty($conf->dol_hide_topmenu)) { + print 'margin-top: 4px;'; + } ?> + margin-bottom: 15px; } - div.fichehalfleft { - float: none; - width: auto; - } - div.fichehalfright { - float: none; - width: auto; - } - div.fichehalfright { - margin-top: 10px; - } - div.firstcolumn div.box { + div.fichecenter { + width: 100%; + clear: both; /* This is to have div fichecenter that are true rectangles */ + } + div.fichecenterbis { + margin-top: 8px; + } + div.fichethirdleft { + float: none; + width: auto; + padding-bottom: 6px; + } + div.fichetwothirdright { + float: none; + width: auto; + padding-bottom: 6px; + } + div.fichetwothirdright div.ficheaddleft { + padding-left: 0; + } + div.fichehalfleft { + float: none; + width: auto; + } + div.fichehalfright { + float: none; + width: auto; + } + div.fichehalfright { + margin-top: 10px; + } + div.firstcolumn div.box { padding-right: 0px; } div.secondcolumn div.box { @@ -1802,7 +1989,7 @@ div.secondcolumn div.box { /* For table into table into card */ div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td { - padding: 0 0 0 0; + padding: 0 0 0 0; } div.nopadding { padding: 0 !important; @@ -1821,17 +2008,17 @@ div.nopadding { width: 14px; } .table-list-of-attached-files .col-picto, .table-list-of-links .col-picto { - opacity: 0.7 !important; - font-size: 1em; - width: 20px; + opacity: 0.7 !important; + font-size: 1em; + width: 20px; } .table-list-of-attached-files .col-picto .widthpictotitle, .table-list-of-links .col-picto .widthpictotitle { width: unset; - color: #999; + color: #999; } .pictosubstatus { - padding-left: 2px; - padding-right: 2px; + padding-left: 2px; + padding-right: 2px; } .pictostatus { width: 15px; @@ -1839,14 +2026,14 @@ div.nopadding { margin-top: -3px } .pictowarning, .pictoerror, .pictopreview { - padding-<?php echo $left; ?>: 3px; + padding-<?php echo $left; ?>: 3px; } .pictowarning { - /* vertical-align: text-bottom; */ - color: <?php echo $badgeWarning; ?>; + /* vertical-align: text-bottom; */ + color: <?php echo $badgeWarning; ?>; } .pictoerror { - color: <?php echo $badgeDanger ?>; + color: <?php echo $badgeDanger ?>; } .pictomodule { width: 14px; @@ -1854,17 +2041,24 @@ div.nopadding { .fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit, .fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit, .tagtdnote span.pictoedit { - opacity: 0.6; + opacity: 0.6; } img.hideonsmartphone.pictoactionview { - vertical-align: bottom; + vertical-align: bottom; } + +.pictofixedwidth { + text-align: left; + width: 20px; + padding-right: 0; +} + .colorthumb { padding-left: 1px !important; padding-right: 1px; padding-top: 1px; padding-bottom: 1px; - width: 44px; + width: 50px; text-align:center; } div.attacharea { @@ -1901,32 +2095,32 @@ div.statusref { clear: both; } div.statusref img { - padding-left: 8px; - padding-right: 9px; - vertical-align: text-bottom; - width: 18px; + padding-left: 8px; + padding-right: 9px; + vertical-align: text-bottom; + width: 18px; } div.statusrefbis { - padding-left: 8px; - padding-right: 9px; - vertical-align: text-bottom; + padding-left: 8px; + padding-right: 9px; + vertical-align: text-bottom; } img.photoref, div.photoref { border: 1px solid #CCC; - -webkit-box-shadow: 3px 3px 4px #DDD; - box-shadow: 3px 3px 4px #DDD; - padding: 4px; + -webkit-box-shadow: 3px 3px 4px #DDD; + box-shadow: 3px 3px 4px #DDD; + padding: 4px; height: 80px; width: 80px; - object-fit: contain; + object-fit: contain; } div.photoref .fa, div.photoref .fas, div.photoref .far { - font-size: 2.5em; + font-size: 2.5em; } img.fitcontain { - object-fit: contain; + object-fit: contain; } div.photoref { display:table-cell; @@ -1934,12 +2128,12 @@ div.photoref { text-align:center; } img.photorefnoborder { - padding: 2px; + padding: 2px; height: 48px; width: 48px; - object-fit: contain; - border: 1px solid #AAA; - border-radius: 100px; + object-fit: contain; + border: 1px solid #AAA; + border-radius: 100px; } .underrefbanner { } @@ -1948,7 +2142,7 @@ img.photorefnoborder { } .trextrafieldseparator td, .trextrafields_collapse_last td { - border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>) !important; + border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>) !important; } .tdhrthin { margin: 0; @@ -1970,7 +2164,9 @@ $heightmenu = 48; /* height of top menu, part with image */ $heightmenu2 = 48; /* height of top menu, ârt with login */ $disableimages = 0; $maxwidthloginblock = 110; -if (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $heightmenu = 30; $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu = 0; } +if (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { + $heightmenu = 30; $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu = 0; +} ?> div#tmenu_tooltip { @@ -2007,25 +2203,25 @@ div.tmenudiv { <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?> display:none; <?php } else { ?> - position: relative; - display: block; - white-space: nowrap; - border-top: 0px; - border-<?php print $left; ?>: 0px; - border-<?php print $right; ?>: 0px; - padding: 0px 0px 0px 0px; /* t r b l */ - margin: 0px 0px 0px 0px; /* t r b l */ + position: relative; + display: block; + white-space: nowrap; + border-top: 0px; + border-<?php print $left; ?>: 0px; + border-<?php print $right; ?>: 0px; + padding: 0px 0px 0px 0px; /* t r b l */ + margin: 0px 0px 0px 0px; /* t r b l */ font-size: 13px; - font-weight: normal; + font-weight: normal; color: #000000; - text-decoration: none; + text-decoration: none; <?php } ?> } div.tmenudisabled, a.tmenudisabled { opacity: 0.6; } a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudisabled:active { - font-weight: normal; + font-weight: normal; padding: 0px 5px 0px 5px; white-space: nowrap; color: #<?php echo $colortextbackhmenu; ?>; @@ -2034,12 +2230,12 @@ a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudis } a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { - font-weight: normal; + font-weight: normal; padding: 0px 5px 0px 5px; white-space: nowrap; /* text-shadow: 1px 1px 1px #000000; */ color: #<?php echo $colortextbackhmenu; ?>; - text-decoration: none; + text-decoration: none; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { font-weight: normal; @@ -2052,12 +2248,12 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { ul.tmenu { /* t r b l */ - padding: 0px 0px 0px 0px; - margin: 0px 0px 0px 0px; + padding: 0px 0px 0px 0px; + margin: 0px 0px 0px 0px; list-style: none; display: table; - margin-right: 65px; /* to keep space for bookmark */ - padding-left: 5px; + margin-right: 65px; /* to keep space for bookmark */ + padding-left: 5px; } ul.tmenu li { background: rgb(<?php echo $colorbackhmenu1 ?>); @@ -2076,12 +2272,13 @@ li.tmenu, li.tmenusel { vertical-align: bottom; <?php if (empty($conf->global->MAIN_MENU_INVERT)) { ?> float: <?php print $left; ?>; - <?php if (!$disableimages) { ?> - height: <?php print $heightmenu; ?>px; + <?php if (!$disableimages) { ?> + height: <?php print $heightmenu; ?>px; padding: 0px 0px 2px 0px; - <?php } else { ?> - padding: 0px 0px 0px 0px; - <?php } } ?> + <?php } else { ?> + padding: 0px 0px 0px 0px; + <?php } + } ?> position:relative; display: block; margin: 0px 0px 0px 0px; @@ -2090,8 +2287,8 @@ li.tmenu, li.tmenusel { li.tmenu:hover { opacity: .50; /* show only a slight shadow */ } -li.tmenusel { - text-decoration: underline; +li.tmenusel a.tmenusel { + text-decoration: underline !important; } .tmenuend .tmenuleft { width: 0px; } .tmenuend { display: none; } @@ -2116,14 +2313,14 @@ div.tmenucenter height: 26px; <?php } else { ?> padding-top: 2px; - height: <?php print $heightmenu; ?>px; + height: <?php print $heightmenu; ?>px; <?php } ?> - width: 100%; + width: 100%; } div.menu_titre { padding-bottom: 2px; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } .mainmenuaspan { @@ -2140,14 +2337,14 @@ div.mainmenu { min-width: 40px; } a.tmenuimage:focus, .mainmenu.topmenuimage:focus { - outline: none; + outline: none; } /* Do not load menu img if hidden to save bandwidth */ <?php if (empty($dol_hide_topmenu)) { ?> - <?php if (!defined('DISABLE_FONT_AWSOME')) { ?> - <?php include dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.inc.php', 0); ?> - <?php } ?> + <?php if (!defined('DISABLE_FONT_AWSOME')) { ?> + <?php include dol_buildpath($path.'/theme/'.$theme.'/main_menu_fa_icons.inc.php', 0); ?> + <?php } ?> div.mainmenu.home{ background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png', 1) ?>); @@ -2167,7 +2364,7 @@ div.mainmenu.agenda { } div.mainmenu.bank { - background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/bank.png', 1) ?>); + background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/bank.png', 1) ?>); } div.mainmenu.cashdesk { @@ -2195,7 +2392,7 @@ div.mainmenu.externalsite { } div.mainmenu.ftp { - background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools.png', 1) ?>); + background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/tools.png', 1) ?>); } div.mainmenu.hrm { @@ -2248,8 +2445,7 @@ div.mainmenu.website { 'barcode'=>'', 'fckeditor'=>'', 'categorie'=>'', ); $mainmenuused = 'home'; - foreach ($conf->modules as $val) - { + foreach ($conf->modules as $val) { $mainmenuused .= ','.(isset($moduletomainmenu[$val]) ? $moduletomainmenu[$val] : $val); } $mainmenuusedarray = array_unique(explode(',', $mainmenuused)); @@ -2259,26 +2455,26 @@ div.mainmenu.website { $divalreadydefined = array('home', 'companies', 'products', 'mrp', 'commercial', 'externalsite', 'accountancy', 'project', 'tools', 'members', 'agenda', 'ftp', 'holiday', 'hrm', 'bookmark', 'cashdesk', 'takepos', 'ecm', 'geoipmaxmind', 'gravatar', 'clicktodial', 'paypal', 'stripe', 'webservices', 'website'); // Put here list of menu entries we are sure we don't want $divnotrequired = array('multicurrency', 'salaries', 'ticket', 'margin', 'opensurvey', 'paybox', 'expensereport', 'incoterm', 'prelevement', 'propal', 'workflow', 'notification', 'supplier_proposal', 'cron', 'product', 'productbatch', 'expedition'); - foreach ($mainmenuusedarray as $val) - { - if (empty($val) || in_array($val, $divalreadydefined)) continue; - if (in_array($val, $divnotrequired)) continue; + foreach ($mainmenuusedarray as $val) { + if (empty($val) || in_array($val, $divalreadydefined)) { + continue; + } + if (in_array($val, $divnotrequired)) { + continue; + } //print "XXX".$val; // Search img file in module dir $found = 0; $url = ''; - foreach ($conf->file->dol_document_root as $dirroot) - { - if (file_exists($dirroot."/".$val."/img/".$val.".png")) - { + foreach ($conf->file->dol_document_root as $dirroot) { + if (file_exists($dirroot."/".$val."/img/".$val.".png")) { $url = dol_buildpath('/'.$val.'/img/'.$val.'.png', 1); $found = 1; break; } } // Img file not found - if (!$found) - { + if (!$found) { if (!defined('DISABLE_FONT_AWSOME')) { 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"; print 'div.mainmenu.'.$val.'::before { @@ -2302,23 +2498,27 @@ div.mainmenu.website { // End of part to add more div class css } // End test if $dol_hide_topmenu ?> + .tmenuimage { - padding:0 0 0 0 !important; - margin:0 0px 0 0 !important; - <?php if ($disableimages) { ?> - display: none; - <?php } ?> + padding:0 0 0 0 !important; + margin:0 0px 0 0 !important; + <?php if ($disableimages) { ?> + display: none; + <?php } ?> } .topmenuimage { <?php if ($disableimages) { ?> - display: none; - <?php } ?> + display: none; + <?php } ?> +} +a.tmenuimage:hover { + text-decoration: none; } a.tmenuimage { - display: block; + display: block; } a.tmenuimage:focus { - outline: none; + outline: none; } @@ -2328,13 +2528,13 @@ a.tmenuimage:focus { { background: #f0f0f0; display: table; - position: absolute; - height: 100%; - width: 100%; + position: absolute; + height: 100%; + width: 100%; } .login_center { display: table-cell; - vertical-align: middle; + vertical-align: middle; } .login_vertical_align { padding: 10px; @@ -2387,9 +2587,9 @@ form#login { margin: 8px; } .login_table .tdinputlogin { - background-color: #fff; - min-width: 220px; - border-radius: 2px; + background-color: #fff; + min-width: 220px; + border-radius: 2px; } .login_table .tdinputlogin { border-bottom: 1px solid #ccc; @@ -2400,7 +2600,7 @@ form#login { } .login_main_home { - word-break: break-word; + word-break: break-word; } .login_main_message { text-align: center; @@ -2421,7 +2621,7 @@ div#login_left, div#login_right { vertical-align: middle; } div#login_right select#entity { - margin-top: 10px; + margin-top: 10px; } table.login_table tr td table.none tr td { padding: 2px; @@ -2450,9 +2650,9 @@ table.login_table_securitycode tr td { } div.login_block { - border-right: 1px solid rgba(0,0,0,0.3); - padding-top: 3px; - padding-bottom: 3px; + /* border-right: 1px solid rgba(0,0,0,0.3); */ + padding-top: 3px; + padding-bottom: 3px; <?php print $left; ?>: 0; top: 0px; <?php if (in_array($conf->browser->layout, array('phone', 'tablet')) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> @@ -2465,7 +2665,7 @@ div.login_block { vertical-align: middle; background: rgb(<?php echo $colorbackvmenu1; ?>); width: 228px; - height: 45px; + height: 70px; <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?> display: none; <?php } ?> @@ -2486,17 +2686,17 @@ div.login a:hover { text-decoration:underline; } div.login_block_user, div.login_block_other { clear: both; } -div.login_block_other { padding-top: 3px; } +div.login_block_other { padding-top: 15px; } .topnav div.login_block_user { display: inline-block; - vertical-align: middle; - line-height: <?php echo $disableimages ? '25' : '50'; ?>px; - height: <?php echo $disableimages ? '25' : '50'; ?>px; + vertical-align: middle; + line-height: <?php echo $disableimages ? '25' : '70'; ?>px; + height: <?php echo $disableimages ? '25' : '70'; ?>px; } .topnav div.login_block_other { display: inline-block; - vertical-align: middle; + vertical-align: middle; clear: <?php echo $disableimages ? 'none' : 'both'; ?>; padding-top: 0; text-align: right; @@ -2514,11 +2714,11 @@ div.login_block_other { padding-top: 3px; } margin-top: 1px; } a.aversion { - white-space: nowrap; - width: 48px; - overflow: hidden; - text-overflow: ellipsis; - display: block; + white-space: nowrap; + width: 48px; + overflow: hidden; + text-overflow: ellipsis; + display: block; } .atoplogin, .atoplogin:hover { @@ -2533,8 +2733,8 @@ a.aversion { text-decoration:underline !important; } span.fa.atoplogin, span.fa.atoplogin:hover { - font-size: 16px; - text-decoration: none !important; + font-size: 16px; + text-decoration: none !important; } img.login, img.printer, img.entity { /* padding: 0px 0px 0px 4px; */ @@ -2547,26 +2747,29 @@ img.login, img.printer, img.entity { border-radius: 8px; width: 16px; height: 16px; - background-size: contain; + background-size: contain; vertical-align: text-bottom; background-color: #FFF; } img.userphoto { /* size for user photo in lists */ - border-radius: 0.75em; - width: 1.5em; - height: 1.5em; - background-size: contain; - vertical-align: middle; + border-radius: 0.75em; + width: 1.5em; + height: 1.5em; + background-size: contain; + vertical-align: middle; } img.userphotosmall { /* size for user photo in lists */ border-radius: 0.6em; width: 1.2em; - height: 1.2em; - background-size: contain; - vertical-align: middle; + height: 1.2em; + background-size: contain; + vertical-align: middle; } img.userphoto[alt="Gravatar avatar"] { - background: #fff; + background: #fff; +} +form[name="addtime"] img.userphoto { + border: 1px solid #444; } .span-icon-user { background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/object_user.png', 1); ?>); @@ -2582,19 +2785,19 @@ img.userphoto[alt="Gravatar avatar"] { /* ============================================================================== */ div.vmenu, td.vmenu { - margin-<?php print $right; ?>: 2px; - position: relative; - float: left; - padding: 0px; - padding-bottom: 0px; - padding-top: 0px; - width: 222px; + margin-<?php print $right; ?>: 2px; + position: relative; + float: left; + padding: 0px; + padding-bottom: 0px; + padding-top: 0px; + width: 222px; } .vmenu { margin-left: 4px; <?php if (GETPOST('optioncss', 'aZ09') == 'print') { ?> - display: none; + display: none; <?php } ?> } @@ -2606,11 +2809,12 @@ div.vmenu, td.vmenu { padding-top: 4px; padding-bottom: 3px; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } #menu_contenu_logo { padding-right: 4px; } .companylogo { padding-top: 4px; } .searchform { padding-top: 10px; } +.searchform .bordertransp { border: 0; } a.vmenu:link, a.vmenu:visited, a.vmenu:hover, a.vmenu:active, span.vmenu, span.vsmenu { white-space: nowrap; font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; } font.vmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: bold; color: #aaa; margin-left: 4px; white-space: nowrap; } @@ -2624,14 +2828,14 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: <?php print $left; ?>; font-weight: normal; color: #999; text-decoration: none; } .helppresentcircle { - color: var(--colorbackhmenu1); - filter: invert(0.5); - margin-left: -7px; - display: inline-block; - margin-top: -10px; - font-size: x-small; - vertical-align: super; - opacity: 0.95; + color: var(--colorbackhmenu1); + filter: invert(0.5); + margin-left: -7px; + display: inline-block; + margin-top: -10px; + font-size: x-small; + vertical-align: super; + opacity: 0.95; } div.blockvmenulogo @@ -2639,23 +2843,23 @@ div.blockvmenulogo border-bottom: 0 !important; } .menulogocontainer { - margin: <?php echo $disableimages ? '0' : '6'; ?>px; - margin-left: 12px; - margin-right: 6px; - padding: 0; - height: <?php echo $disableimages ? '20' : '32'; ?>px; - /* width: 100px; */ - max-width: 100px; - vertical-align: middle; + margin: <?php echo $disableimages ? '0' : '6'; ?>px; + margin-left: 12px; + margin-right: 6px; + padding: 0; + height: <?php echo $disableimages ? '20' : '32'; ?>px; + /* width: 100px; */ + max-width: 100px; + vertical-align: middle; } .backgroundforcompanylogo { background-color: rgba(255,255,255,0.7); border-radius: 5px; } .menulogocontainer img.mycompany { - object-fit: contain; - width: inherit; - height: inherit; + object-fit: contain; + width: inherit; + height: inherit; } #mainmenutd_companylogo::after { content: unset; @@ -2681,14 +2885,14 @@ div.blockvmenupair, div.blockvmenuimpair color: #000000; text-align: <?php print $left; ?>; text-decoration: none; - padding-left: 5px; - padding-right: 1px; - padding-top: 3px; - padding-bottom: 3px; - margin: 1px 0px 8px 0px; + padding-left: 5px; + padding-right: 1px; + padding-top: 3px; + padding-bottom: 3px; + margin: 1px 0px 8px 0px; - padding-bottom: 10px; - border-bottom: 1px solid #e0e0e0; + padding-bottom: 10px; + border-bottom: 1px solid #e0e0e0; } div.blockvmenubookmarks { @@ -2699,7 +2903,7 @@ div.blockvmenuend { padding-left: 0 !important; } a.vsmenu.addbookmarkpicto { - padding-right: 10px; + padding-right: 10px; } div.blockvmenufirst { padding-top: 10px; @@ -2711,14 +2915,14 @@ div.blockvmenusearch, div.blockvmenubookmarks color: #000000; text-align: <?php print $left; ?>; text-decoration: none; - padding-left: 5px; - padding-right: 1px; - padding-top: 3px; - padding-bottom: 3px; - margin: 1px 0px 2px 0px; + padding-left: 5px; + padding-right: 1px; + padding-top: 3px; + padding-bottom: 3px; + margin: 1px 0px 2px 0px; - padding-bottom: 10px; - /* border-bottom: 1px solid #f4f4f4; */ + padding-bottom: 10px; + /* border-bottom: 1px solid #f4f4f4; */ } div.blockvmenusearchphone { @@ -2733,13 +2937,13 @@ div.blockvmenuhelp color: #000000; text-align: center; text-decoration: none; - padding-left: 0px; - padding-right: 8px; - padding-top: 3px; - padding-bottom: 3px; - margin: 4px 0px 0px 0px; + padding-left: 0px; + padding-right: 8px; + padding-top: 3px; + padding-bottom: 3px; + margin: 4px 0px 0px 0px; <?php } else { ?> - display: none; + display: none; <?php } ?> } @@ -2762,7 +2966,7 @@ td.barre_select { td.photo { background: #F4F4F4; color: #000000; - border: 1px solid #bbb; + border: 1px solid #bbb; } /* ============================================================================== */ @@ -2774,14 +2978,14 @@ td.photo { */ #mainContent, #leftContent .ui-layout-pane { - padding: 0px; - overflow: auto; + padding: 0px; + overflow: auto; } #mainContent, #leftContent .ui-layout-center { padding: 0px; position: relative; /* contain floated or positioned elements */ - overflow: auto; /* add scrolling to content-div */ + overflow: auto; /* add scrolling to content-div */ } @@ -2790,29 +2994,29 @@ td.photo { /* ============================================================================== */ td.ecmroot { - padding-bottom: 0 !important; + padding-bottom: 0 !important; } .largebutton { /* border-top: 1px solid #CCC !important; */ - padding: 0px 4px 14px 4px !important; - min-height: 32px; + padding: 0px 4px 14px 4px !important; + min-height: 32px; } a.toolbarbutton { - margin-top: 0px; - margin-left: 4px; - margin-right: 4px; - height: 30px; + margin-top: 0px; + margin-left: 4px; + margin-right: 4px; + height: 30px; } img.toolbarbutton { margin-top: 1px; - height: 30px; + height: 30px; } li.expanded > a.fmdirlia.jqft.ecmjqft { - font-weight: bold !important; + font-weight: bold !important; } @@ -2820,30 +3024,30 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { /* Onglets */ /* ============================================================================== */ div.tabs { - text-align: <?php print $left; ?>; - margin-left: 6px !important; - margin-right: 6px !important; - clear:both; + text-align: <?php print $left; ?>; + margin-left: 6px !important; + margin-right: 6px !important; + clear:both; height:100%; } div.tabsElem { margin-top: 6px; } /* To avoid overlap of tabs when not browser */ div.tabsElem a { - font-weight: normal !important; + font-weight: normal !important; } div.tabBar { - color: #<?php echo $colortextbacktab; ?>; - padding-top: 16px; - padding-left: 16px; - padding-right: 16px; + color: #<?php echo $colortextbacktab; ?>; + padding-top: 16px; + padding-left: 16px; + padding-right: 16px; padding-bottom: 16px; - margin: 0px 0px 16px 0px; - -webkit-border-radius: 3px; + margin: 0px 0px 16px 0px; + -webkit-border-radius: 3px; border-radius: 3px; - border-right: 1px solid #BBB; - border-left: 1px solid #BBB; - border-top: 1px solid #CCC; + border-right: 1px solid #BBB; + border-left: 1px solid #BBB; + border-top: 1px solid #CCC; width: auto; background: rgb(<?php echo $colorbacktabcard1; ?>); border-bottom: 1px solid #aaa; @@ -2855,8 +3059,8 @@ div.tabBar tr.titre td { /* div.tabBar.tabBarNoTop { - padding-top: 0; - border-top: 0; + padding-top: 0; + border-top: 0; } */ @@ -2866,7 +3070,7 @@ div.tabBarWithBottom { border-bottom: 1px solid #aaa; } div.tabBar table.tableforservicepart2:last-child { - border-bottom: 1px solid #aaa; + border-bottom: 1px solid #aaa; } .tableforservicepart1 .tdhrthin { height: unset; @@ -2884,12 +3088,12 @@ div.divButAction { margin-bottom: 1.4em; } div.tabsAction { - margin: 20px 0em 20px 0em; - padding: 0em 0em; - text-align: right; + margin: 20px 0em 20px 0em; + padding: 0em 0em; + text-align: right; } div.tabsActionNoBottom { - margin-bottom: 0px; + margin-bottom: 0px; } div.tabsAction > a { margin-bottom: 16px !important; @@ -2908,15 +3112,15 @@ div.popuptab { } a.tabTitle { - color:rgba(0,0,0,.5); - margin-<?php print $right; ?>: 10px; - text-shadow:1px 1px 1px #ffffff; + color:rgba(0,0,0,.5); + margin-<?php print $right; ?>: 10px; + text-shadow:1px 1px 1px #ffffff; font-family: <?php print $fontlist ?>; font-weight: normal; - padding: 4px 6px 2px 6px; - margin: 0px 6px; - text-decoration: none; - white-space: nowrap; + padding: 4px 6px 2px 6px; + margin: 0px 6px; + text-decoration: none; + white-space: nowrap; } .tabTitleText { display: none; @@ -2925,24 +3129,18 @@ a.tabTitle { max-height: 14px; } div.tabs div.tabsElem:first-of-type a.tab { - margin-left: 0px !important; + margin-left: 0px !important; } a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: <?php print $fontlist ?>; padding: 12px 13px 12px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; background-image: none !important; } - -.tabunactive { /* We add some border on tabunactive to avoid change of position of title when switching tabs (border of tabunactive = border of tabactive) */ - border-right: 1px solid rgb(<?php echo $colorbackbody; ?>); - border-left: 1px solid rgb(<?php echo $colorbackbody; ?>); -} - .tabactive, a.tab#active { color: #<?php echo $colortextbacktab; ?> !important; background: rgb(<?php echo $colorbacktabcard1; ?>) !important; @@ -2951,6 +3149,13 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-left: 1px solid #AAA !important; border-top: 2px solid #111 !important; } +.tabunactive, a.tab#unactive { + border-right: 1px solid transparent; + border-left: 1px solid transparent; + border-top: 1px solid transparent; + border-bottom: 0px !important;*/ +} + a.tab:hover { /* @@ -2960,30 +3165,30 @@ a.tab:hover text-decoration: underline; } a.tabimage { - color: #434956; + color: #434956; font-family: <?php print $fontlist ?>; - text-decoration: none; - white-space: nowrap; + text-decoration: none; + white-space: nowrap; } td.tab { - background: #dee7ec; + background: #dee7ec; } span.tabspan { - background: #dee7ec; - color: #434956; + background: #dee7ec; + color: #434956; font-family: <?php print $fontlist ?>; - padding: 0px 6px; - margin: 0em 0.2em; - text-decoration: none; - white-space: nowrap; + padding: 0px 6px; + margin: 0em 0.2em; + text-decoration: none; + white-space: nowrap; -webkit-border-radius:3px 3px 0px 0px; border-radius:3px 3px 0px 0px; - border-<?php print $right; ?>: 1px solid #555555; - border-<?php print $left; ?>: 1px solid #D8D8D8; - border-top: 1px solid #D8D8D8; + border-<?php print $right; ?>: 1px solid #555555; + border-<?php print $left; ?>: 1px solid #D8D8D8; + border-top: 1px solid #D8D8D8; } /* ============================================================================== */ @@ -3031,7 +3236,7 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd } .smallpaddingimp { - padding: 4px !important; + padding: 4px !important; } .nopaddingleft { padding-<?php print $left; ?>: 0px; @@ -3065,8 +3270,8 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd } table.tableforemailform tr td { - padding-top: 3px; - padding-bottom: 3px; + padding-top: 3px; + padding-bottom: 3px; } table.border, table.bordernooddeven, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { @@ -3082,7 +3287,7 @@ table.borderplus { height: 26px; } tr.liste_titre.box_titre td table td, .bordernooddeven tr td { - height: 26px; + height: 26px; } table.border td, table.bordernooddeven td, div.border div div.tagtd { @@ -3109,10 +3314,10 @@ td.border, div.tagtable div div.border { /* Main boxes */ .nobordertop, .nobordertop tr:first-of-type td { - border-top: none !important; + border-top: none !important; } .noborderbottom, .noborderbottom tr:last-of-type td { - border-bottom: none !important; + border-bottom: none !important; } .bordertop { border-top: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); @@ -3131,8 +3336,8 @@ div.colorback margin-top: 5px; } .liste_titre_bydiv { - border-right: 1px solid #ccc; - border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-left: 1px solid #ccc; } table.liste, table.noborder, table.formdoc, div.noborder { width: calc(100% - 1px); /* -1 to fix a bug. Without, a scroll appears due to overflow-x: auto; of div-table-responsive */ @@ -3148,8 +3353,8 @@ table.liste, table.noborder, table.formdoc, div.noborder { border-bottom-color: #BBB; border-bottom-style: solid; - border-right: 1px solid #ccc; - border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-left: 1px solid #ccc; margin: 0px 0px 8px 0px; @@ -3182,21 +3387,21 @@ tr.liste_titre_filter td.liste_titre { } .liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd { - /*border-top-width: 1px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid;*/ + /*border-top-width: 1px; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid;*/ } .liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd { - border-top-width: 2px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-width: 2px; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } .liste_titre_add td, .liste_titre_add .tagtd { - border-top-width: 1px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-width: 1px; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } table.liste th, table.noborder th, table.noborder tr.liste_titre td { @@ -3207,7 +3412,7 @@ table.noborder td, div.noborder form, div.noborder form div, table.tableforservi } form.tagtable { padding: unset !important; - border: unset !important; + border: unset !important; } table.liste td, table.noborder td, div.noborder form div { @@ -3234,11 +3439,17 @@ table.border tr td table.nobordernopadding tr td { padding-bottom: 0; } td.borderright { - border: none; /* to erase value for table.nobordernopadding td */ + border: none; /* to erase value for table.nobordernopadding td */ border-right-width: 1px !important; border-right-color: #BBB !important; border-right-style: solid !important; } +td.borderleft { + border: none; /* to erase value for table.nobordernopadding td */ + border-left-width: 1px !important; + border-left-color: #BBB !important; + border-left-style: solid !important; +} /* For table with no filter before */ table.listwithfilterbefore { @@ -3258,17 +3469,17 @@ div.refidpadding { div.refid { font-weight: bold; color: rgb(<?php print $colortexttitlenotab; ?>); - font-size: 160%; + font-size: 160%; } div.refidno { padding-top: 8px; font-weight: normal; - color: #444; - font-size: <?php print $fontsize ?>px; - line-height: 21px; + color: #444; + font-size: <?php print $fontsize ?>px; + line-height: 21px; } div.refidno form { - display: inline-block; + display: inline-block; } div.pagination { @@ -3336,10 +3547,10 @@ div.pagination li a:hover, div.pagination li span:hover, div.pagination li a:focus, div.pagination li span:focus { - color: #000; - background-color: #eee; - border-color: #ddd; - /* padding-top: 8px; */ + color: #000; + background-color: #eee; + border-color: #ddd; + /* padding-top: 8px; */ } div.pagination li .active a, div.pagination li .active span, @@ -3384,12 +3595,12 @@ table.hidepaginationnext .paginationnext { display: none; } .paginationafterarrows a.btnTitlePlus { - border: 1px solid var(--btncolorborder); + border: 1px solid var(--btncolorborder); } .paginationafterarrows a.btnTitlePlus:hover span:before { - /* text-shadow: 0px 0px 5px #ccc; */ - /* filter: invert(0.3); */ - font-size: 1.03em; + /* text-shadow: 0px 0px 5px #ccc; */ + /* filter: invert(0.3); */ + font-size: 1.03em; } @@ -3501,25 +3712,25 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td { } .trforbreak td { font-weight: bold; - border-bottom: 1pt solid black !important; + border-bottom: 1pt solid black !important; background-color: var(--colorbacklinebreak) !important; } table.dataTable td { - padding: 5px 2px 5px 3px !important; + padding: 5px 2px 5px 3px !important; } tr.pair td, tr.impair td, form.impair div.tagtd, form.pair div.tagtd, div.impair div.tagtd, div.pair div.tagtd, div.liste_titre div.tagtd { - padding: 5px 2px 5px 3px; - border-bottom: 1px solid #eee; + padding: 5px 2px 5px 3px; + border-bottom: 1px solid #eee; } form.pair, form.impair { font-weight: normal; } tr.pair:last-of-type td, tr.impair:last-of-type td { - border-bottom: 0px !important; + border-bottom: 0px !important; } tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td { - border-bottom: 0px !important; + border-bottom: 0px !important; } /* table.nobottomiftotal tr.liste_total td { @@ -3550,8 +3761,8 @@ div.liste_titre { } div.liste_titre_bydiv { border-top-width: <?php echo $borderwidth ?>px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; box-shadow: none; border-collapse: collapse; @@ -3567,11 +3778,11 @@ div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_se { background: rgb(<?php echo $colorbacktitle1; ?>); font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - border-bottom: 1px solid #FDFFFF; + border-bottom: 1px solid #FDFFFF; - color: rgb(<?php echo $colortexttitle; ?>); - font-family: <?php print $fontlist ?>; - text-align: <?php echo $left; ?>; + color: rgb(<?php echo $colortexttitle; ?>); + font-family: <?php print $fontlist ?>; + text-align: <?php echo $left; ?>; } tr.liste_titre th, tr.liste_titre td, th.liste_titre { @@ -3579,14 +3790,14 @@ tr.liste_titre th, tr.liste_titre td, th.liste_titre } /* TODO Once title line is moved under title search, make border bottom of all th black and force to whit when it's first tr */ tr:first-child th.liste_titre, tr:first-child th.liste_titre_sel { - border-bottom: 1px solid #FFF ! important; + border-bottom: 1px solid #FFF ! important; } tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre { - font-family: <?php print $fontlist ?>; - font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - vertical-align: middle; - height: 24px; + font-family: <?php print $fontlist ?>; + font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; + vertical-align: middle; + height: 24px; } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; @@ -3594,8 +3805,8 @@ tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, fo } tr.liste_titre_topborder td { border-top-width: <?php echo $borderwidth; ?>px; - border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); - border-top-style: solid; + border-top-color: rgb(<?php echo $colortopbordertitle1 ?>); + border-top-style: solid; } .liste_titre td a { text-shadow: none !important; @@ -3608,7 +3819,7 @@ tr.liste_titre_topborder td { background: transparent; } tr.liste_titre:last-child th.liste_titre, tr.liste_titre:last-child th.liste_titre_sel, tr.liste_titre td.liste_titre, tr.liste_titre td.liste_titre_sel, form.liste_titre div.tagtd { /* For last line of table headers only */ - border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); + border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>); } div.liste_titre { @@ -3616,23 +3827,23 @@ div.liste_titre { } tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel, form.liste_titre_sel div { - font-family: <?php print $fontlist ?>; - font-weight: normal; - border-bottom: 1px solid #FDFFFF; - text-decoration: underline; + font-family: <?php print $fontlist ?>; + font-weight: normal; + border-bottom: 1px solid #FDFFFF; + text-decoration: underline; } input.liste_titre { - background: transparent; - border: 0px; + background: transparent; + border: 0px; } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { - color: #332266; - /* padding: 4px; */ + color: #332266; + /* padding: 4px; */ } .noborder tr.liste_total td, tr.liste_total td, form.liste_total div { - white-space: nowrap; - line-height: 1.5em; + white-space: nowrap; + line-height: 1.5em; } } .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { @@ -3680,7 +3891,7 @@ div.tabBar .noborder { box-shadow: 0px 0px 0px #f4f4f4 !important; } div .tdtop { - vertical-align: top !important; + vertical-align: top !important; padding-top: 5px !important; padding-bottom: 0px !important; } @@ -3689,7 +3900,7 @@ div .tdtop { border-bottom: 1px solid #AAA !important; } #tablelines tr td { - height: unset; + height: unset; } @@ -3737,50 +3948,50 @@ ul.noborder li:nth-child(even):not(.liste_titre) { */ .box { - overflow-x: auto; - min-height: 40px; - padding-right: 0px; - padding-left: 0px; - padding-bottom: 12px; + overflow-x: auto; + min-height: 40px; + padding-right: 0px; + padding-left: 0px; + padding-bottom: 12px; } .ficheaddleft div.boxstats, .ficheaddright div.boxstats { - border: none; + border: none; } .boxstatsborder { - /* border: 1px solid #CCC !important; */ + /* border: 1px solid #CCC !important; */ } .boxstats, .boxstats130 { - display: inline-block; - margin: 8px; - /* border: 1px solid #CCC; */ - text-align: center; - border-radius: 2px; - background: #eee; + display: inline-block; + margin: 8px; + /* border: 1px solid #CCC; */ + text-align: center; + border-radius: 2px; + background: #eee; } .boxstats, .boxstats130, .boxstatscontent { white-space: nowrap; overflow: hidden; - text-overflow: ellipsis; + text-overflow: ellipsis; } .boxstats { - padding: 3px; - width: 100px; - min-height: 40px; + padding: 3px; + width: 100px; + min-height: 40px; } .boxstats130 { - width: 135px; - height: 54px; - padding: 3px; + width: 135px; + height: 54px; + padding: 3px; } @media only screen and (max-width: 767px) { .tabBar .arearef .pagination.paginationref { - max-width: calc(50%); + max-width: calc(50%); } .clearbothonsmartphone { - clear: both; - display: block !important; + clear: both; + display: block !important; } div.tabs { @@ -3791,34 +4002,34 @@ ul.noborder li:nth-child(even):not(.liste_titre) { .boxstats, .boxstats130 { margin: 3px; - border: 1px solid #ddd; - box-shadow: none; - background: #eee; - } + border: 1px solid #ddd; + box-shadow: none; + background: #eee; + } .thumbstat { flex: 1 1 110px; } .thumbstat150 { flex: 1 1 110px; } - .dashboardlineindicator { - float: left; - padding-left: 5px; - } - .boxstats130 { - width: 148px; - } - .boxstats { - width: 100px; - } + .dashboardlineindicator { + float: left; + padding-left: 5px; + } + .boxstats130 { + width: 148px; + } + .boxstats { + width: 100px; + } } .boxstats:hover { box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20); } span.boxstatstext { - /* opacity: 0.7; */ /* a bug if browser make z-index infintie when opacity is set so we disable it */ - line-height: 18px; - color: #000; + /* opacity: 0.7; */ /* a bug if browser make z-index infintie when opacity is set so we disable it */ + line-height: 18px; + color: #000; } .boxstatsindicator.thumbstat150 { /* If we remove this, box position is ko on ipad */ display: inline-flex; @@ -3848,29 +4059,29 @@ span.dashboardlineko { .dashboardlinelatecoin { float: right; position: relative; - text-align: right; - top: -24px; - padding: 1px 6px 1px 6px; - background-color: #8c4446; - color: #FFFFFF ! important; - border-radius: .25em; + text-align: right; + top: -24px; + padding: 1px 6px 1px 6px; + background-color: #8c4446; + color: #FFFFFF ! important; + border-radius: .25em; } .boxtable { - margin-bottom: 8px !important; - border-bottom-width: 1px; + margin-bottom: 8px !important; + border-bottom-width: 1px; } .boxtable { - margin-bottom: 8px !important; - border-bottom-width: 1px; + margin-bottom: 8px !important; + border-bottom-width: 1px; } .boxtablenotop { - /* border-top-width: 0 !important; */ + /* border-top-width: 0 !important; */ } .boxtablenobottom { - /* border-bottom-width: 0 !important; */ + /* border-bottom-width: 0 !important; */ } .boxtable .fichehalfright, .boxtable .fichehalfleft { - min-width: 275px; + min-width: 275px; } .tdboxstats { text-align: center; @@ -3880,25 +4091,25 @@ span.dashboardlineko { padding-right: 1px !important; } a.valignmiddle.dashboardlineindicator { - line-height: 30px; + line-height: 30px; } tr.box_titre { - height: 26px !important; + height: 26px !important; - /* TO MATCH BOOTSTRAP */ + /* TO MATCH BOOTSTRAP */ /*background: #ddd; color: #000 !important; */ /* TO MATCH ELDY */ background: rgb(<?php echo $colorbacktitle1; ?>); - background-repeat: repeat-x; - color: rgb(<?php echo $colortexttitle; ?>); - font-family: <?php print $fontlist ?>, sans-serif; - font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; - border-bottom: 1px solid #FDFFFF; - white-space: nowrap; + background-repeat: repeat-x; + color: rgb(<?php echo $colortexttitle; ?>); + font-family: <?php print $fontlist ?>, sans-serif; + font-weight: <?php echo $useboldtitle ? 'bold' : 'normal'; ?>; + border-bottom: 1px solid #FDFFFF; + white-space: nowrap; } tr.box_titre td.boxclose { @@ -3923,8 +4134,8 @@ img.boxhandle, img.boxclose { } .prod_entry_mode_free, .prod_entry_mode_predef { - height: 26px !important; - vertical-align: middle; + height: 26px !important; + vertical-align: middle; } .modulebuilderbox { @@ -3949,23 +4160,23 @@ div.ok { /* Info admin */ div.info { border-<?php print $left; ?>: solid 5px #87cfd2; - padding-top: 8px; - padding-left: 10px; - padding-right: 4px; - padding-bottom: 8px; - margin: 0.5em 0em 0.5em 0em; - background: #eff8fc; -} - -/* Warning message */ -div.warning { - border-<?php print $left; ?>: solid 5px #f2cf87; padding-top: 8px; padding-left: 10px; padding-right: 4px; padding-bottom: 8px; margin: 0.5em 0em 0.5em 0em; - background: #fcf8e3; + background: #eff8fc; +} + +/* Warning message */ +div.warning { + border-<?php print $left; ?>: solid 5px #f2cf87; + padding-top: 8px; + padding-left: 10px; + padding-right: 4px; + padding-bottom: 8px; + margin: 0.5em 0em 0.5em 0em; + background: #fcf8e3; } div.warning a, div.info a, div.error a { color: rgb(<?php echo $colortextlink; ?>); @@ -3973,7 +4184,7 @@ div.warning a, div.info a, div.error a { /* Error message */ div.error { - border-<?php print $left; ?>: solid 5px #f28787; + border-<?php print $left; ?>: solid 5px #f28787; padding-top: 8px; padding-left: 10px; padding-right: 4px; @@ -4004,13 +4215,13 @@ a.impayee:hover { font-weight: bold; color: #550000; } */ .framecontent { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } .framecontent iframe { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } @@ -4020,11 +4231,11 @@ a.impayee:hover { font-weight: bold; color: #550000; } */ .opened-dash-board-wrap { - margin-bottom: 25px; + margin-bottom: 25px; } div.boximport { - min-height: unset; + min-height: unset; } .product_line_stock_ok { color: #002200; } @@ -4044,11 +4255,11 @@ div.dolgraph div.legend table tbody tr { height: auto; } td.legendColorBox { padding: 2px 2px 2px 0 !important; } td.legendLabel { padding: 2px 2px 2px 0 !important; } td.legendLabel { - text-align: <?php echo $left; ?>; + text-align: <?php echo $left; ?>; } label.radioprivate { - white-space: nowrap; + white-space: nowrap; } .photo { @@ -4059,7 +4270,7 @@ label.radioprivate { margin-top: 2px; } div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ - margin-right: 15px; + margin-right: 15px; } .photowithborder { border: 1px solid #f0f0f0; @@ -4082,20 +4293,20 @@ div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a { content:url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/nographyet.svg', 1) ?>); display: inline-block; - opacity: 0.1; - background-repeat: no-repeat; + opacity: 0.1; + background-repeat: no-repeat; } .nographyettext { - opacity: 0.5; + opacity: 0.5; } div.titre { font-size: 14px; text-decoration: none; padding-top: 5px; - padding-bottom: 5px; - text-transform: uppercase; + padding-bottom: 5px; + text-transform: uppercase; /* text-shadow: 1px 1px 2px #FFFFFF; */ } div.titre { @@ -4120,14 +4331,14 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot .poweredbypublicpayment { float: right; top: 8px; - right: 8px; - position: absolute; - font-size: 0.8em; - color: #222; - opacity: 0.3; + right: 8px; + position: absolute; + font-size: 0.8em; + color: #222; + opacity: 0.3; } span.buttonpaymentsmall { - text-shadow: none; + text-shadow: none; } #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } @@ -4140,13 +4351,13 @@ span.buttonpaymentsmall { #tablesubscribe { width: 100%; } div#card-element { - border: 1px solid #ccc; + border: 1px solid #ccc; } div#card-errors { color: #fa755a; - text-align: center; - padding-top: 3px; - max-width: 320px; + text-align: center; + padding-top: 3px; + max-width: 320px; } @@ -4198,7 +4409,7 @@ div#card-errors { .ui-dialog-titlebar { } .ui-dialog-content { - font-size: <?php print $fontsize; ?>px !important; + font-size: <?php print $fontsize; ?>px !important; } @@ -4208,8 +4419,8 @@ div#card-errors { /* .ui-dialog-content.ui-widget-content > object { - max-height: none; - width: auto; margin-left: auto; margin-right: auto; display: block; + max-height: none; + width: auto; margin-left: auto; margin-right: auto; display: block; } */ @@ -4219,16 +4430,16 @@ div#card-errors { /* ============================================================================== */ table.valid { - /* border-top: solid 1px #E6E6E6; */ - border-<?php print $left; ?>: solid 5px #f2cf87; - /* border-<?php print $right; ?>: solid 1px #444444; - border-bottom: solid 1px #555555; */ + /* border-top: solid 1px #E6E6E6; */ + border-<?php print $left; ?>: solid 5px #f2cf87; + /* border-<?php print $right; ?>: solid 1px #444444; + border-bottom: solid 1px #555555; */ padding-top: 8px; padding-left: 10px; padding-right: 4px; padding-bottom: 4px; margin: 0px 0px; - background: #fcf8e3; + background: #fcf8e3; } .validtitre { @@ -4242,7 +4453,7 @@ table.valid { /* For tooltip using dialog */ .ui-dialog.highlight.ui-widget.ui-widget-content.ui-front { - z-index: 3000; + z-index: 3000; } div.ui-tooltip { @@ -4274,7 +4485,7 @@ div.ui-tooltip.mytooltip { .ui-datepicker-calendar .ui-widget-header .ui-state-default, .ui-datepicker-calendar .ui-button, html .ui-datepicker-calendar .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active { - border: unset; + border: unset; } img.datecallink { padding-left: 2px !important; padding-right: 2px !important; } @@ -4294,13 +4505,13 @@ img.datecallink { padding-left: 2px !important; padding-right: 2px !important; } margin-bottom: 5px; } table.dp { - width: 180px; - background-color: #FFFFFF; - /*border-top: solid 2px #f4f4f4; - border-<?php print $left; ?>: solid 2px #f4f4f4; - border-<?php print $right; ?>: solid 1px #222222; - border-bottom: solid 1px #222222; */ - padding: 0px; + width: 180px; + background-color: #FFFFFF; + /*border-top: solid 2px #f4f4f4; + border-<?php print $left; ?>: solid 2px #f4f4f4; + border-<?php print $right; ?>: solid 1px #222222; + border-bottom: solid 1px #222222; */ + padding: 0px; border-spacing: 0px; border-collapse: collapse; } @@ -4346,14 +4557,14 @@ table.dp { /* Bouton X fermer */ .dpInvisibleButtons { - border-style:none; - background-color:transparent; - padding:0px; - font-size: 0.85em; - border-width:0px; - color: #eee; - vertical-align:middle; - cursor: pointer; + border-style:none; + background-color:transparent; + padding:0px; + font-size: 0.85em; + border-width:0px; + color: #eee; + vertical-align:middle; + cursor: pointer; } .datenowlink { @@ -4373,15 +4584,15 @@ table.dp { /* ============================================================================== */ div.visible { - display: block; + display: block; } -div.hidden, td.hidden, img.hidden, span.hidden { - display: none; +div.hidden, td.hidden, img.hidden, span.hidden, div.showifmore { + display: none; } tr.visible { - display: block; + display: block; } @@ -4390,10 +4601,10 @@ tr.visible { /* ============================================================================== */ .exampleapachesetup { - overflow-y: auto; - max-height: 100px; - font-size: 0.8em; - border: 1px solid #aaa; + overflow-y: auto; + max-height: 100px; + font-size: 0.8em; + border: 1px solid #aaa; } span[phptag] { @@ -4401,16 +4612,16 @@ span[phptag] { } .nobordertransp { - border: 0px; - background-color: transparent; - background-image: none; - color: #000 !important; - text-shadow: none; + border: 0px; + background-color: transparent; + background-image: none; + color: #000 !important; + text-shadow: none; } .bordertransp { - background-color: transparent; - background-image: none; - border: 1px solid #aaa; + background-color: transparent; + background-image: none; + border: 1px solid #aaa; font-weight: normal; color: #444 !important; } @@ -4418,7 +4629,7 @@ span[phptag] { border-bottom: 1px solid #ccc; background: #eee; display: inline-block; - padding: 4px 0 4px 0; + padding: 4px 0 4px 0; } .websitebar .buttonDelete, .websitebar .button { text-shadow: none; @@ -4427,11 +4638,11 @@ span[phptag] { { padding: 2px 4px 2px 4px !important; margin: 2px 4px 2px 4px !important; - line-height: normal; + line-height: normal; } .websitebar input.button.bordertransp, .websitebar input.buttonDelete.bordertransp { - color: #444 !important; - text-shadow: none; + color: #444 !important; + text-shadow: none; } .websiteselection { /* display: inline-block; */ @@ -4447,9 +4658,9 @@ span[phptag] { padding-bottom: 3px; */ } .websiteinputurl { - display: inline-block; - vertical-align: top; - line-height: 28px; + display: inline-block; + vertical-align: top; + line-height: 28px; } .websiteiframenoborder { border: 0px; @@ -4468,9 +4679,9 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im border: 0px; } .websitehelp { - vertical-align: middle; - float: right; - padding-top: 8px; + vertical-align: middle; + float: right; + padding-top: 8px; } .websiteselectionsection { border-left: 1px solid #bbb; @@ -4480,7 +4691,11 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im margin-right: 5px; } .websitebar input#previewpageurl { - line-height: 1em; + line-height: 1em; +} + +#divbodywebsite section p { + margin: unset; } @@ -4489,7 +4704,7 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im /* ============================================================================== */ .dayevent .tagtr:first-of-type { - height: 24px; + height: 24px; } .agendacell { height: 60px; } table.cal_month { border-spacing: 0px; } @@ -4518,7 +4733,7 @@ table.cal_month td:last-child { border-right: 0px; } div.event { margin: 8px; 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; -webkit-border-radius: 3px; border-radius: 3px; min-height: 20px; } table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; } -table.cal_event td.cal_event { padding: 4px 4px !important; } +table.cal_event td.cal_event { padding: 4px 4px !important; padding-bottom: 2px !important; padding-top: 2px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; } .cal_event { font-size: 1em; } .cal_event a:link { color: #111111; font-weight: normal !important; } @@ -4547,28 +4762,28 @@ td.cal_other_month { .ui-autocomplete-loading { background: white url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/working.gif', 1) ?>) right center no-repeat; } .ui-autocomplete { - position:absolute; - width:auto; - font-size: 1.0em; - background-color:white; - border:1px solid #888; - margin:0px; + position:absolute; + width:auto; + font-size: 1.0em; + background-color:white; + border:1px solid #888; + margin:0px; /* padding:0px; This make combo crazy */ - } + } .ui-autocomplete ul { - list-style-type:none; - margin:0px; - padding:0px; - } + list-style-type:none; + margin:0px; + padding:0px; + } .ui-autocomplete ul li.selected { background-color: #D3E5EC;} .ui-autocomplete ul li { - list-style-type:none; - display:block; - margin:0; - padding:2px; - height:18px; - cursor:pointer; - } + list-style-type:none; + display:block; + margin:0; + padding:2px; + height:18px; + cursor:pointer; + } /* ============================================================================== */ @@ -4576,8 +4791,8 @@ td.cal_other_month { /* ============================================================================== */ td.gtaskname { - overflow: hidden; - text-overflow: ellipsis; + overflow: hidden; + text-overflow: ellipsis; } @@ -4753,29 +4968,29 @@ A.none, A.none:active, A.none:visited, A.none:hover { /* Style to overwrites JQuery styles */ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { - border: 1px solid #888; - background: rgb(<?php echo $colorbacktitle1; ?>); - color: unset; + border: 1px solid #888; + background: rgb(<?php echo $colorbacktitle1; ?>); + color: unset; } .ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - font-weight: normal; - font-family:<?php echo $fontlist; ?>; - font-size:1em; + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + font-weight: normal; + font-family:<?php echo $fontlist; ?>; + font-size:1em; } .ui-widget { - font-family:<?php echo $fontlist; ?>; + font-family:<?php echo $fontlist; ?>; } .ui-button { margin-left: -2px; <?php print (preg_match('/chrome/', $conf->browser->name) ? 'padding-top: 1px;' : ''); ?> } .ui-button-icon-only .ui-button-text { height: 8px; } .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: 2px 0px 6px 0px; } .ui-button-text { - line-height: 1em !important; + line-height: 1em !important; } .ui-autocomplete-input { margin: 0; padding: 4px; } @@ -4785,28 +5000,28 @@ A.none, A.none:active, A.none:visited, A.none:hover { /* ============================================================================== */ body.cke_show_borders { - margin: 5px !important; + margin: 5px !important; } .cke_dialog { - border: 1px #bbb solid ! important; + border: 1px #bbb solid ! important; } /*.cke_editor table, .cke_editor tr, .cke_editor td { - border: 0px solid #FF0000 !important; + border: 0px solid #FF0000 !important; } span.cke_skin_kama { padding: 0 !important; }*/ .cke_wrapper { padding: 4px !important; } a.cke_dialog_ui_button { - font-family: <?php print $fontlist ?> !important; + font-family: <?php print $fontlist ?> !important; background-image: url(<?php echo $img_button ?>) !important; background-position: bottom !important; - border: 1px solid #C0C0C0 !important; + border: 1px solid #C0C0C0 !important; -webkit-border-radius:0px 2px 0px 2px !important; border-radius:0px 2px 0px 2px !important; - -webkit-box-shadow: 3px 3px 4px #f4f4f4 !important; - box-shadow: 3px 3px 4px #f4f4f4 !important; + -webkit-box-shadow: 3px 3px 4px #f4f4f4 !important; + box-shadow: 3px 3px 4px #f4f4f4 !important; } .cke_dialog_ui_hbox_last { @@ -4820,8 +5035,8 @@ a.cke_dialog_ui_button } */ a.cke_dialog_ui_button_ok span { - text-shadow: none !important; - color: #333 !important; + text-shadow: none !important; + color: #333 !important; } @@ -4829,28 +5044,28 @@ a.cke_dialog_ui_button_ok span { /* ACE editor */ /* ============================================================================== */ .ace_editor { - border: 1px solid #ddd; + border: 1px solid #ddd; margin: 0; } .aceeditorstatusbar { - margin: 0; - padding: 0; - padding-<?php echo $left; ?>: 10px; - left: 0; - right: 0; - bottom: 0; - color: #666; - height: 28px; - line-height: 2.2em; + margin: 0; + padding: 0; + padding-<?php echo $left; ?>: 10px; + left: 0; + right: 0; + bottom: 0; + color: #666; + height: 28px; + line-height: 2.2em; } .ace_status-indicator { - color: gray; - position: relative; - right: 0; - border-left: 1px solid; + color: gray; + position: relative; + right: 0; + border-left: 1px solid; } pre#editfilecontentaceeditorid { - margin-top: 5px; + margin-top: 5px; } @@ -4859,7 +5074,7 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ .template-upload { - height: 72px !important; + height: 72px !important; } @@ -4880,32 +5095,32 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ #types .btn { - cursor: pointer; + cursor: pointer; } #types .btn-primary { - font-weight: bold; + font-weight: bold; } #types form { - padding: 20px; + padding: 20px; } #types label { - display:inline-block; - width:100px; - margin-right: 20px; - padding: 4px; - text-align: right; - vertical-align: top; + display:inline-block; + width:100px; + margin-right: 20px; + padding: 4px; + text-align: right; + vertical-align: top; } #types input.text, #types textarea { - width: 400px; + width: 400px; } #types textarea { - height: 100px; + height: 100px; } @@ -4917,55 +5132,55 @@ pre#editfilecontentaceeditorid { box-sizing:border-box; } #comment .comment { - border-radius:7px; - margin-bottom:10px; - overflow:hidden; + border-radius:7px; + margin-bottom:10px; + overflow:hidden; } #comment .comment-table { - display:table; - height:100%; + display:table; + height:100%; } #comment .comment-cell { - display:table-cell; + display:table-cell; } #comment .comment-info { - font-size:0.8em; - border-right:1px solid #dedede; - margin-right:10px; - width:160px; - text-align:center; - background:rgba(255,255,255,0.5); - vertical-align:middle; - padding:10px 2px; + font-size:0.8em; + border-right:1px solid #dedede; + margin-right:10px; + width:160px; + text-align:center; + background:rgba(255,255,255,0.5); + vertical-align:middle; + padding:10px 2px; } #comment .comment-info a { - color:inherit; + color:inherit; } #comment .comment-right { - vertical-align:top; + vertical-align:top; } #comment .comment-description { - padding:10px; - vertical-align:top; + padding:10px; + vertical-align:top; } #comment .comment-delete { - width: 100px; - text-align:center; - vertical-align:middle; + width: 100px; + text-align:center; + vertical-align:middle; } #comment .comment-delete:hover { - background:rgba(250,20,20,0.8); + background:rgba(250,20,20,0.8); } #comment .comment-edit { - width: 100px; - text-align:center; - vertical-align:middle; + width: 100px; + text-align:center; + vertical-align:middle; } #comment .comment-edit:hover { - background:rgba(0,184,148,0.8); + background:rgba(0,184,148,0.8); } #comment textarea { - width: 100%; + width: 100%; } @@ -4978,7 +5193,7 @@ div.scroll2 { } div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead { - line-height: 2; + line-height: 2; } .gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate { @@ -4991,45 +5206,45 @@ div.gantt, .gtaskheading, .gmajorheading, .gminorheading, .gminorheadingwkend { color: #000 !important; } div.gTaskInfo { - background: #f0f0f0 !important; + background: #f0f0f0 !important; } .gtaskblue { background: rgb(108,152,185) !important; } .gtaskgreen { - background: rgb(160,173,58) !important; + background: rgb(160,173,58) !important; } td.gtaskname { - overflow: hidden; - text-overflow: ellipsis; + overflow: hidden; + text-overflow: ellipsis; } td.gminorheadingwkend { - color: #888 !important; + color: #888 !important; } td.gminorheading { - color: #666 !important; + color: #666 !important; } .glistlbl, .glistgrid { width: 582px !important; } .gtaskname div, .gtaskname { - min-width: 250px !important; - max-width: 250px !important; - width: 250px !important; + min-width: 250px !important; + max-width: 250px !important; + width: 250px !important; } .gpccomplete div, .gpccomplete { - min-width: 40px !important; - max-width: 40px !important; - width: 40px !important; + min-width: 40px !important; + max-width: 40px !important; + width: 40px !important; } td.gtaskheading.gstartdate, td.gtaskheading.genddate { - white-space: break-spaces; + white-space: break-spaces; } .gtasktableh tr:nth-child(2) td:nth-child(2), .gtasktableh tr:nth-child(2) td:nth-child(3), .gtasktableh tr:nth-child(2) td:nth-child(4), .gtasktableh tr:nth-child(2) td:nth-child(5), .gtasktableh tr:nth-child(2) td:nth-child(6), .gtasktableh tr:nth-child(2) td:nth-child(7) { - color: transparent !important; - border-left: none; - border-right: none; - border-top: none; + color: transparent !important; + border-left: none; + border-right: none; + border-top: none; } @@ -5054,25 +5269,25 @@ td.gtaskheading.gstartdate, td.gtaskheading.genddate { } div.filedirelem { - position: relative; - display: block; - text-decoration: none; + position: relative; + display: block; + text-decoration: none; } ul.filedirelem { - padding: 2px; - margin: 0 5px 5px 5px; + padding: 2px; + margin: 0 5px 5px 5px; } ul.filedirelem li { - list-style: none; - padding: 2px; - margin: 0 10px 20px 10px; - width: 160px; - height: 120px; - text-align: center; - display: block; - float: <?php print $left; ?>; - border: solid 1px #f4f4f4; + list-style: none; + padding: 2px; + margin: 0 10px 20px 10px; + width: 160px; + height: 120px; + text-align: center; + display: block; + float: <?php print $left; ?>; + border: solid 1px #f4f4f4; } ul.ecmjqft { @@ -5102,7 +5317,7 @@ ul.ecmjqft a:active { font-weight: bold !important; } ul.ecmjqft a:hover { - text-decoration: underline; + text-decoration: underline; } div.ecmjqft { @@ -5114,13 +5329,13 @@ div.ecmjqft { clear: both; } div#ecm-layout-west { - width: 380px; - vertical-align: top; + width: 380px; + vertical-align: top; } div#ecm-layout-center { - width: calc(100% - 390px); - vertical-align: top; - float: right; + width: calc(100% - 390px); + vertical-align: top; + float: right; } .ecmjqft LI.directory { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2.png', 1); ?>) left top no-repeat; } @@ -5150,14 +5365,14 @@ div#ecm-layout-center { font-weight: normal; } .jnotify-container .jnotify-notification-warning .jnotify-close, .jnotify-container .jnotify-notification-warning .jnotify-message { - color: #a28918 !important; + color: #a28918 !important; } /* use or not ? */ div.jnotify-background { opacity : 0.95 !important; - -webkit-box-shadow: 2px 2px 4px #888 !important; - box-shadow: 2px 2px 4px #888 !important; + -webkit-box-shadow: 2px 2px 4px #888 !important; + box-shadow: 2px 2px 4px #888 !important; } /* ============================================================================== */ @@ -5220,7 +5435,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { .paginate_button { font-weight: normal !important; - text-decoration: none !important; + text-decoration: none !important; } .paging_full_numbers { height: inherit !important; @@ -5233,7 +5448,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { border-radius: inherit !important; } .paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover { - background-color: #FFF !important; + background-color: #FFF !important; } .paginate_button, .paginate_active { border: 1px solid #ddd !important; @@ -5269,7 +5484,7 @@ div.dataTables_length select { /* ============================================================================== */ span#select2-taskid-container[title^='--'] { - opacity: 0.3; + opacity: 0.3; } input.select2-input { @@ -5286,16 +5501,16 @@ input.select2-input { .blockvmenusearch .select2-container--default .select2-selection--single, .blockvmenubookmarks .select2-container--default .select2-selection--single { - background-color: unset; + background-color: unset; } .select2-container--default .select2-selection--single .select2-selection__rendered { - color: unset; + color: unset; } .select2-container .select2-choice { border-bottom: 1px solid #ccc; } .select2-container .select2-choice > .select2-chosen { - margin-right: 23px; + margin-right: 23px; } .select2-container .select2-choice .select2-arrow { border-radius: 0; @@ -5327,7 +5542,7 @@ 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 rgba(0,0,0,.2); } .select2-drop.select2-drop-above.select2-drop-active { border-top: 1px solid #ccc; @@ -5456,34 +5671,34 @@ a span.select2-chosen border-left: 1px solid #ddd; } .select2-container--default .select2-results>.select2-results__options{ - max-height: 400px; + max-height: 400px; } /* Special case for the select2 add widget */ #addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen { - text-align: <?php echo $left; ?>; - opacity: 0.3; + text-align: <?php echo $left; ?>; + opacity: 0.3; } .select2-container--default .select2-selection--single .select2-selection__placeholder { color: unset; opacity: 0.5; } span#select2-boxbookmark-container, span#select2-boxcombo-container { - text-align: <?php echo $left; ?>; - opacity: 0.5; + text-align: <?php echo $left; ?>; + opacity: 0.5; } .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 6px; } /* Style used before the select2 js is executed on boxcombo */ #boxbookmark.boxcombo, #boxcombo.boxcombo { - text-align: left; - opacity: 0.3; - border-bottom: solid 1px rgba(0,0,0,.4) !important; - height: 26px; - line-height: 24px; - padding: 0 0 5px 5px; - vertical-align: top; + text-align: left; + opacity: 0.3; + border-bottom: solid 1px rgba(0,0,0,.4) !important; + height: 26px; + line-height: 24px; + padding: 0 0 5px 5px; + vertical-align: top; } /* To emulate select 2 style */ @@ -5537,7 +5752,7 @@ span#select2-boxbookmark-container, span#select2-boxcombo-container { border-radius: 5px !important; box-shadow: none; -webkit-box-shadow: none !important; - box-shadow: none !important; + box-shadow: none !important; } span.noborderoncategories a, li.noborderoncategories a { line-height: normal; @@ -5625,9 +5840,9 @@ span.noborderoncategories { } .multi-select-menuitem { - clear: both; - float: left; - padding-left: 5px + clear: both; + float: left; + padding-left: 5px } @@ -5636,51 +5851,51 @@ span.noborderoncategories { /* ============================================================================== */ ul.ulselectedfields { - z-index: 90; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ + z-index: 90; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ } dl.dropdown { - margin:0px; - padding:0px; + margin:0px; + padding:0px; margin-left: 2px; - margin-right: 2px; - vertical-align: middle; - display: inline-block; + margin-right: 2px; + vertical-align: middle; + display: inline-block; } .dropdown dd, .dropdown dt { - margin:0px; - padding:0px; + margin:0px; + padding:0px; } .dropdown ul { - margin: -1px 0 0 0; - text-align: <?php echo $left; ?>; + margin: -1px 0 0 0; + text-align: <?php echo $left; ?>; } .dropdown dd { - position:relative; + position:relative; } .dropdown dt a { - display:block; - overflow: hidden; - border:0; + display:block; + overflow: hidden; + border:0; } .dropdown dt a span, .multiSel span { - cursor:pointer; - display:inline-block; - padding: 0 3px 2px 0; + cursor:pointer; + display:inline-block; + padding: 0 3px 2px 0; } .dropdown span.value { - display:none; + display:none; } .dropdown dd ul { - background-color: #FFF; - box-shadow: 1px 1px 10px #aaa; - display:none; - <?php echo $right; ?>:0px; /* pop is align on right */ - padding: 0 0 0 0; - position:absolute; - top:2px; - list-style:none; - max-height: 264px; - overflow: auto; + background-color: #FFF; + box-shadow: 1px 1px 10px #aaa; + display:none; + <?php echo $right; ?>:0px; /* pop is align on right */ + padding: 0 0 0 0; + position:absolute; + top:2px; + list-style:none; + max-height: 264px; + overflow: auto; } .dropdown dd ul li { white-space: nowrap; @@ -5693,23 +5908,23 @@ dl.dropdown { background: #eee; } .dropdown dd ul li input[type="checkbox"] { - margin-<?php echo $right; ?>: 3px; + margin-<?php echo $right; ?>: 3px; } .dropdown dd ul li a, .dropdown dd ul li span { - padding: 3px; - display: block; + padding: 3px; + display: block; } .dropdown dd ul li span { color: #888; } .dropdown dd ul li a:hover { - background-color: #eee; + background-color: #eee; } dd.dropdowndd ul li { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } @@ -5731,11 +5946,11 @@ dd.dropdowndd ul li { /* ============================================================================== */ .searchpage .tagtr .tagtd { - padding-bottom: 3px; + padding-bottom: 3px; } .searchpage .tagtr .tagtd .button { background: unset; - border: unset; + border: unset; } li.ui-li-divider .ui-link { @@ -5771,16 +5986,16 @@ a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-i padding-left: 30px; } .ui-select .ui-btn-icon-right .ui-icon { - right: 8px; + right: 8px; } .ui-btn-icon-left > .ui-btn-inner > .ui-icon, .ui-btn-icon-right > .ui-btn-inner > .ui-icon { - margin-top: -10px; + margin-top: -10px; } select { - /* display: inline-block; */ /* We can't set this. This disable ability to make */ - overflow:hidden; - white-space: nowrap; /* Enabling this make behaviour strange when selecting the empty value if this empty value is '' instead of '&nbsp;' */ - text-overflow: ellipsis; + /* display: inline-block; */ /* We can't set this. This disable ability to make */ + overflow:hidden; + white-space: nowrap; /* Enabling this make behaviour strange when selecting the empty value if this empty value is '' instead of '&nbsp;' */ + text-overflow: ellipsis; } .fiche .ui-controlgroup { margin: 0px; @@ -5863,39 +6078,39 @@ ul.ulmenu { /* Style for first level menu with jmobile */ .ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { - padding: 1em 15px; - display: block; + padding: 1em 15px; + display: block; } .ui-btn-up-c { font-weight: normal; } .ui-focus, .ui-btn:focus { - -webkit-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; } .ui-bar-b { - /*border: 1px solid #888;*/ - border: none; - background: none; - text-shadow: none; - color: rgb(<?php print $colortexttitlenotab; ?>) !important; + /*border: 1px solid #888;*/ + border: none; + background: none; + text-shadow: none; + color: rgb(<?php print $colortexttitlenotab; ?>) !important; } .ui-bar-b, .lilevel0 { - background-repeat: repeat-x; - border: none; - background: none; - text-shadow: none; - color: rgb(<?php print $colortexttitlenotab; ?>) !important; + background-repeat: repeat-x; + border: none; + background: none; + text-shadow: none; + color: rgb(<?php print $colortexttitlenotab; ?>) !important; } .alilevel0 { font-weight: normal !important; } .ui-li.ui-last-child, .ui-li.ui-field-contain.ui-last-child { - border-bottom-width: 0px !important; + border-bottom-width: 0px !important; } .alilevel0 { - color: rgb(<?php echo $colortexttitle; ?>) !important; + color: rgb(<?php echo $colortexttitle; ?>) !important; } .ulmenu { box-shadow: none !important; @@ -5938,11 +6153,11 @@ border-top-right-radius: 6px; }*/ .alilevel1 { - color: rgb(<?php print $colortexttitlenotab; ?>) !important; + color: rgb(<?php print $colortexttitlenotab; ?>) !important; } .lilevel1 { - border-top: 2px solid #444; - background: #fff ! important; + border-top: 2px solid #444; + background: #fff ! important; } .lilevel1 div div a { font-weight: bold !important; @@ -5950,22 +6165,22 @@ border-top-right-radius: 6px; .lilevel2 { padding-left: 22px; - background: #fff ! important; + background: #fff ! important; } .lilevel3 { padding-left: 44px; - background: #fff ! important; + background: #fff ! important; } .lilevel4 { padding-left: 66px; - background: #fff ! important; + background: #fff ! important; } .lilevel5 { padding-left: 88px; - background: #fff ! important; + background: #fff ! important; } @@ -6002,14 +6217,14 @@ border-top-right-radius: 6px; color: #6d3f6d; } .menu li.menu_choix1 { - padding-top: 6px; - padding-right: 10px; - padding-bottom: 2px; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 2px; } .menu li.menu_choix2 { - padding-top: 6px; - padding-right: 10px; - padding-bottom: 2px; + padding-top: 6px; + padding-right: 10px; + padding-bottom: 2px; } @media only screen and (max-width: 767px) { @@ -6018,13 +6233,13 @@ border-top-right-radius: 6px; background-position-y: 6px; padding-left: 40px; } - .menu li.menu_choix1, .menu li.menu_choix2 { - padding-left: 4px; - padding-right: 0; - } - .liste_articles { - margin-right: 0 !important; - } + .menu li.menu_choix1, .menu li.menu_choix2 { + padding-left: 4px; + padding-right: 0; + } + .liste_articles { + margin-right: 0 !important; + } } @@ -6047,7 +6262,7 @@ border-top-right-radius: 6px; .ticketpublicarea { margin-left: 15%; - margin-right: 15%; + margin-right: 15%; } .publicnewticketform { /* margin-top: 25px !important; */ @@ -6085,11 +6300,11 @@ border-top-right-radius: 6px; } @media only screen and (min-width: 1170px) { #cd-timeline { - margin-bottom: 3em; + margin-bottom: 3em; } #cd-timeline::before { - left: 50%; - margin-left: -2px; + left: 50%; + margin-left: -2px; } } @@ -6110,13 +6325,13 @@ border-top-right-radius: 6px; } @media only screen and (min-width: 1170px) { .cd-timeline-block { - margin: 4em 0; + margin: 4em 0; } .cd-timeline-block:first-child { - margin-top: 0; + margin-top: 0; } .cd-timeline-block:last-child { - margin-bottom: 0; + margin-bottom: 0; } } @@ -6151,80 +6366,80 @@ border-top-right-radius: 6px; } @media only screen and (min-width: 1170px) { .cd-timeline-img { - width: 60px; - height: 60px; - left: 50%; - margin-left: -30px; - /* Force Hardware Acceleration in WebKit */ - -webkit-transform: translateZ(0); - -webkit-backface-visibility: hidden; + width: 60px; + height: 60px; + left: 50%; + margin-left: -30px; + /* Force Hardware Acceleration in WebKit */ + -webkit-transform: translateZ(0); + -webkit-backface-visibility: hidden; } .cssanimations .cd-timeline-img.is-hidden { - visibility: hidden; + visibility: hidden; } .cssanimations .cd-timeline-img.bounce-in { - visibility: visible; - -webkit-animation: cd-bounce-1 0.6s; - -moz-animation: cd-bounce-1 0.6s; - animation: cd-bounce-1 0.6s; + visibility: visible; + -webkit-animation: cd-bounce-1 0.6s; + -moz-animation: cd-bounce-1 0.6s; + animation: cd-bounce-1 0.6s; } } @-webkit-keyframes cd-bounce-1 { 0% { - opacity: 0; - -webkit-transform: scale(0.5); + opacity: 0; + -webkit-transform: scale(0.5); } 60% { - opacity: 1; - -webkit-transform: scale(1.2); + opacity: 1; + -webkit-transform: scale(1.2); } 100% { - -webkit-transform: scale(1); + -webkit-transform: scale(1); } } @-moz-keyframes cd-bounce-1 { 0% { - opacity: 0; - -moz-transform: scale(0.5); + opacity: 0; + -moz-transform: scale(0.5); } 60% { - opacity: 1; - -moz-transform: scale(1.2); + opacity: 1; + -moz-transform: scale(1.2); } 100% { - -moz-transform: scale(1); + -moz-transform: scale(1); } } @keyframes cd-bounce-1 { 0% { - opacity: 0; - -webkit-transform: scale(0.5); - -moz-transform: scale(0.5); - -ms-transform: scale(0.5); - -o-transform: scale(0.5); - transform: scale(0.5); + opacity: 0; + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -ms-transform: scale(0.5); + -o-transform: scale(0.5); + transform: scale(0.5); } 60% { - opacity: 1; - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -ms-transform: scale(1.2); - -o-transform: scale(1.2); - transform: scale(1.2); + opacity: 1; + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -ms-transform: scale(1.2); + -o-transform: scale(1.2); + transform: scale(1.2); } 100% { - -webkit-transform: scale(1); - -moz-transform: scale(1); - -ms-transform: scale(1); - -o-transform: scale(1); - transform: scale(1); + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } .cd-timeline-content { @@ -6276,58 +6491,58 @@ border-top-right-radius: 6px; } @media only screen and (min-width: 768px) { .cd-timeline-content h2 { - font-size: 20px; - font-size: 1.25rem; + font-size: 20px; + font-size: 1.25rem; } .cd-timeline-content { - font-size: 16px; - font-size: 1rem; + font-size: 16px; + font-size: 1rem; } .cd-timeline-content .cd-read-more, .cd-timeline-content .cd-date { - font-size: 14px; - font-size: 0.875rem; + font-size: 14px; + font-size: 0.875rem; } } @media only screen and (min-width: 1170px) { .cd-timeline-content { - margin-left: 0; - padding: 1.6em; - width: 43%; + margin-left: 0; + padding: 1.6em; + width: 43%; } .cd-timeline-content::before { - top: 24px; - left: 100%; - border-color: transparent; - border-left-color: white; + top: 24px; + left: 100%; + border-color: transparent; + border-left-color: white; } .cd-timeline-content .cd-read-more { - float: left; + float: left; } .cd-timeline-content .cd-date { - position: absolute; - width: 55%; - left: 115%; - top: 6px; - font-size: 16px; - font-size: 1rem; + position: absolute; + width: 55%; + left: 115%; + top: 6px; + font-size: 16px; + font-size: 1rem; } .cd-timeline-block:nth-child(even) .cd-timeline-content { - float: right; + float: right; } .cd-timeline-block:nth-child(even) .cd-timeline-content::before { - top: 24px; - left: auto; - right: 100%; - border-color: transparent; - border-right-color: white; + top: 24px; + left: auto; + right: 100%; + border-color: transparent; + border-right-color: white; } .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-read-more { - float: right; + float: right; } .cd-timeline-block:nth-child(even) .cd-timeline-content .cd-date { - left: auto; - right: 115%; - text-align: right; + left: auto; + right: 115%; + text-align: right; } } @@ -6338,10 +6553,10 @@ border-top-right-radius: 6px; /* ============================================================================== */ span.phpdebugbar-tooltip.phpdebugbar-tooltip-extra-wide, span.phpdebugbar-tooltip.phpdebugbar-tooltip-wide { - width: 250px !important; + width: 250px !important; } .phpdebugbar-indicator span.phpdebugbar-tooltip { - opacity: .95 !important; + opacity: .95 !important; } a.phpdebugbar-tab.phpdebugbar-active { background-image: unset !important; @@ -6373,10 +6588,10 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before /* ============================================================================== */ .dol-xaxis-vertical .flot-x-axis .flot-tick-label.tickLabel { - text-orientation: sideways; - font-weight: 400; - writing-mode: vertical-rl; - white-space: nowrap; + text-orientation: sideways; + font-weight: 400; + writing-mode: vertical-rl; + white-space: nowrap; } @@ -6397,17 +6612,17 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before width: <?php print dol_size(350, 'width'); ?>px; } - div.tabBar { - padding-left: 8px; - padding-right: 8px; - -webkit-border-radius: 0; - border-radius: 0px; - border-right: none; - border-left: none; - } + div.tabBar { + padding-left: 8px; + padding-right: 8px; + -webkit-border-radius: 0; + border-radius: 0px; + border-right: none; + border-left: none; + } .box-flex-container { - margin: 0 0 0 -8px !important; + margin: 0 0 0 -8px !important; } } @@ -6433,26 +6648,26 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before @media only screen and (max-width: <?php echo round($nbtopmenuentries * $fontsize * 7, 0) + 300; ?>px) { div.tmenucenter { - max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */ - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: #<?php echo $colortextbackhmenu; ?>; + max-width: <?php echo round($fontsize * 4); ?>px; /* size of viewport */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #<?php echo $colortextbackhmenu; ?>; } .mainmenuaspan { - font-size: 0.9em; - /* font-weight: 300; */ - } - .topmenuimage { - background-size: 24px auto; - margin-top: 0px; + font-size: 0.9em; + /* font-weight: 300; */ + } + .topmenuimage { + background-size: 24px auto; + margin-top: 0px; + } + li.tmenu, li.tmenusel { + min-width: 34px; + } + div.mainmenu { + min-width: auto; } - li.tmenu, li.tmenusel { - min-width: 34px; - } - div.mainmenu { - min-width: auto; - } div.tmenuleft { display: none; } @@ -6465,17 +6680,17 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before } div.tmenucenter { - max-width: <?php echo round($fontsize * 2); ?>px; /* size of viewport */ - text-overflow: clip; + max-width: <?php echo round($fontsize * 2); ?>px; /* size of viewport */ + text-overflow: clip; } .mainmenuaspan { - font-size: 10px; - padding-left: 0; - padding-right: 0; - } - .topmenuimage { - background-size: 20px auto; - margin-top: 2px; + font-size: 10px; + padding-left: 0; + padding-right: 0; + } + .topmenuimage { + background-size: 20px auto; + margin-top: 2px; } } /* rule to reduce top menu - 3rd reduction */ @@ -6488,20 +6703,20 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before /* padding-<?php echo $right; ?>: 78px; */ <?php } ?> } - li.tmenu, li.tmenusel { - min-width: 30px; - } + li.tmenu, li.tmenusel { + min-width: 30px; + } div.tmenucenter { - text-overflow: clip; + text-overflow: clip; } - .topmenuimage { - background-size: 20px auto; - margin-top: 2px !important; + .topmenuimage { + background-size: 20px auto; + margin-top: 2px !important; } div.mainmenu { - min-width: 20px; - } + min-width: 20px; + } #tooltip { position: absolute; @@ -6514,22 +6729,22 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before div.divphotoref { padding-right: 5px; } - img.photoref, div.photoref { - border: 1px solid rgba(0, 0, 0, 0.2); - -webkit-box-shadow: none; - box-shadow: none; - padding: 4px; - object-fit: contain; - } + img.photoref, div.photoref { + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: none; + box-shadow: none; + padding: 4px; + object-fit: contain; + } .titlefield { width: auto !important; /* We want to ignore the 30%, try to use more if you can */ } .tableforfield>tr>td:first-child, .tableforfield>tbody>tr>td:first-child, div.tableforfield div.tagtr>div.tagtd:first-of-type { - /* max-width: 100px; */ /* but no more than 100px */ + /* max-width: 100px; */ /* but no more than 100px */ } .tableforfield>tr>td:nth-child(2), .tableforfield>tbody>tr>td:nth-child(2), div.tableforfield div.tagtr>div.tagtd:nth-child(2) { - word-break: break-word; + word-break: break-word; } table.table-fiche-title .col-title div.titre{ @@ -6548,9 +6763,13 @@ include dol_buildpath($path.'/theme/'.$theme.'/info-box.inc.php', 0); include dol_buildpath($path.'/theme/'.$theme.'/progress.inc.php', 0); include dol_buildpath($path.'/theme/eldy/timeline.inc.php', 0); // actually md use same style as eldy theme -if (!empty($conf->global->THEME_CUSTOM_CSS)) print $conf->global->THEME_CUSTOM_CSS; +if (!empty($conf->global->THEME_CUSTOM_CSS)) { + print $conf->global->THEME_CUSTOM_CSS; +} -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} ?> /* This must be at end */ diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index e74c206ad20..617f9d1301e 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -29,12 +29,9 @@ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $theme_bordercolor = array(235, 235, 224); $theme_datacolor = array(array(137, 86, 161), array(60, 147, 183), array(250, 190, 80), array(191, 75, 57), array(80, 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)); -if (!defined('ISLOADEDBYSTEELSHEET')) // File is run after an include of a php page, not by the style sheet, if the constant is not defined. -{ - if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) // user is loaded by dolgraph.class.php - { - if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy') - { +if (!defined('ISLOADEDBYSTEELSHEET')) { // File is run after an include of a php page, not by the style sheet, if the constant is not defined. + if (!empty($conf->global->MAIN_OPTIMIZEFORCOLORBLIND)) { // user is loaded by dolgraph.class.php + 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 { // for now we use the same configuration for all types of color blind @@ -100,3 +97,4 @@ $badgeStatus6 = '#cad2d2'; $badgeStatus7 = '#277d1e'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; +$badgeStatus10 = '#993013'; diff --git a/htdocs/theme/md/tpl/index.html b/htdocs/theme/md/tpl/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php index be68e1f68ee..9bf6cbc13c4 100644 --- a/htdocs/ticket/agenda.php +++ b/htdocs/ticket/agenda.php @@ -40,22 +40,27 @@ $track_id = GETPOST('track_id', 'alpha', 3); $socid = GETPOST('socid', 'int'); $action = GETPOST('action', 'aZ09'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST("sortfield", "aZ09comma"); -$sortorder = GETPOST("sortorder", 'aZ09comma'); +$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'); $page = is_numeric($page) ? $page : 0; $page = $page == -1 ? 0 : $page; -if (!$sortfield) $sortfield = "a.datep,a.id"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "a.datep,a.id"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -83,8 +88,7 @@ if (!$user->rights->ticket->read) { accessforbidden(); } // restrict access for externals users -if ($user->socid > 0 && ($object->fk_soc != $user->socid)) -{ +if ($user->socid > 0 && ($object->fk_soc != $user->socid)) { accessforbidden(); } // or for unauthorized internals users @@ -100,17 +104,17 @@ if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object- $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Set view style $_SESSION['ticket-view-type'] = "list"; } // 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 -{ +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 $actioncode = ''; $search_agenda_label = ''; } @@ -126,8 +130,11 @@ $userstat = new User($db); $formticket = new FormTicket($db); $title = $langs->trans("Ticket").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/ticketnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); -$help_url = 'FR:DocumentationModuleTicket'; +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/ticketnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +} +$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda'; + llxHeader('', $title, $help_url); if ($socid > 0) { @@ -167,8 +174,7 @@ if (!empty($object->origin_email)) { } // Thirdparty -if (!empty($conf->societe->enabled)) -{ +if (!empty($conf->societe->enabled)) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty'); /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) { $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; @@ -182,12 +188,10 @@ if (!empty($conf->societe->enabled)) } // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project'); - if ($user->rights->ticket->write) - { + if ($user->rights->ticket->write) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>'; $morehtmlref .= ' : '; @@ -225,11 +229,14 @@ print dol_get_fiche_end(); print '<br>'; -if (!empty($object->id)) -{ +if (!empty($object->id)) { $param = '&id='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } $morehtmlright = ''; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 6d14d29202f..e6f3f21050c 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -60,7 +60,9 @@ $sortorder = GETPOST('sortorder', 'aZ09comma'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -80,12 +82,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +if (empty($action) && empty($id) && empty($ref)) { + $action = 'view'; +} //Select mail models is same action as add_message if (GETPOST('modelselected', 'alpha')) { @@ -96,8 +101,7 @@ if (GETPOST('modelselected', 'alpha')) { //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 || $track_id || $ref) { $res = $object->fetch($id, $ref, $track_id); - if ($res >= 0) - { + if ($res >= 0) { $id = $object->id; $track_id = $object->track_id; } @@ -125,13 +129,14 @@ $now = dol_now(); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} $error = 0; 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{ - { + 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{ $actioncode = ''; $search_agenda_label = ''; } @@ -159,7 +164,9 @@ if (empty($reshook)) { $action = 'create'; } $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $db->begin(); @@ -179,7 +186,7 @@ if (empty($reshook)) { $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; - $object->fk_project = GETPOST('projectid', 'int'); + $object->fk_project = $projectid; $id = $object->create($user); if ($id <= 0) { @@ -198,9 +205,9 @@ if (empty($reshook)) { $result = $object->add_contact($contactid, $typeid, 'external'); } - // altairis: link ticket to project - if (GETPOST('projectid') > 0) { - $object->setProject(GETPOST('projectid')); + // Link ticket to project + if ($projectid > 0) { + $object->setProject($projectid); } // Auto assign user @@ -229,7 +236,7 @@ if (empty($reshook)) { if ($conf->global->TICKET_AUTO_CREATE_FICHINTER_CREATE) { $fichinter = new Fichinter($db); $fichinter->socid = $object->fk_soc; - $fichinter->fk_project = GETPOST('projectid', 'int'); + $fichinter->fk_project = $projectid; $fichinter->fk_contrat = $contractid; $fichinter->author = $user->id; $fichinter->model_pdf = 'soleil'; @@ -289,7 +296,9 @@ if (empty($reshook)) { array_push($object->errors, $langs->trans('ErrorFieldRequired', $langs->transnoentities('Subject'))); } $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } if (!$error) { @@ -301,7 +310,9 @@ if (empty($reshook)) { $object->severity_code = GETPOST('severity_code', 'alpha'); $ret = $object->update($user); - if ($ret <= 0) $error++; + if ($ret <= 0) { + $error++; + } if ($error) { $db->rollback(); @@ -354,11 +365,12 @@ if (empty($reshook)) { if (!$error) { $ret = $object->assignUser($user, $usertoassign); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } } - if (!$error) // Update list of contacts - { + if (!$error) { // Update list of contacts // Si déjà un user assigné on le supprime des contacts if ($useroriginassign > 0) { $internal_contacts = $object->listeContact(-1, 'internal'); @@ -373,7 +385,9 @@ if (empty($reshook)) { } } - if ($usertoassign > 0) $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0); + if ($usertoassign > 0) { + $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0); + } } if (!$error) { @@ -517,16 +531,16 @@ if (empty($reshook)) { } } } - } // Categorisation dans projet - elseif ($action == 'classin' && $user->rights->ticket->write) { + } elseif ($action == 'classin' && $user->rights->ticket->write) { + // Categorisation dans projet if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - $object->setProject(GETPOST('projectid', 'int')); + $object->setProject($projectid); $url = 'card.php?action=view&track_id='.$object->track_id; header("Location: ".$url); exit(); } - } // Categorisation dans contrat - elseif ($action == 'setcontract' && $user->rights->ticket->write) { + } elseif ($action == 'setcontract' && $user->rights->ticket->write) { + // Categorisation dans contrat if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { $object->setContract(GETPOST('contractid', 'int')); $url = 'card.php?action=view&track_id='.$object->track_id; @@ -557,8 +571,8 @@ if (empty($reshook)) { } $action = 'view'; - } // Reopen ticket - elseif ($action == 'confirm_set_status' && $user->rights->ticket->write && !GETPOST('cancel')) { + } elseif ($action == 'confirm_set_status' && $user->rights->ticket->write && !GETPOST('cancel')) { + // Reopen ticket if ($object->fetch(GETPOST('id', 'int'), GETPOST('track_id', 'alpha')) >= 0) { $new_status = GETPOST('new_status', 'int'); $old_status = $object->fk_statut; @@ -582,11 +596,15 @@ if (empty($reshook)) { $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } if (!$error) { $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } } if ($error) { @@ -634,7 +652,9 @@ if (empty($reshook)) { include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; // Set $action to correct value for the case we used presend action to add a message - if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; + if (GETPOSTISSET('actionbis') && $action == 'presend') { + $action = 'presend_addmessage'; + } } @@ -645,15 +665,17 @@ if (empty($reshook)) { $userstat = new User($db); $form = new Form($db); $formticket = new FormTicket($db); -if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db); +if (!empty($conf->projet->enabled)) { + $formproject = new FormProjets($db); +} + +$help_url = 'EN:Module_Ticket|FR:DocumentationModuleTicket'; -$help_url = 'FR:DocumentationModuleTicket'; $page_title = $actionobject->getTitle($action); llxHeader('', $page_title, $help_url); -if ($action == 'create' || $action == 'presend') -{ +if ($action == 'create' || $action == 'presend') { $formticket = new FormTicket($db); print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket'); @@ -669,8 +691,8 @@ if ($action == 'create' || $action == 'presend') $formticket->withextrafields = 1; $formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid')); - $formticket->showForm(1, 'create'); -} elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { + $formticket->showForm(1, 'create', 0); + /*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { $formticket = new FormTicket($db); $head = ticket_prepare_head($object); @@ -687,22 +709,22 @@ if ($action == 'create' || $action == 'presend') // Type print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>'; - $formticket->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2'); + $formticket->selectTypesTickets((GETPOSTISSET('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2'); print '</td></tr>'; // Severity print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>'; - $formticket->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2'); + $formticket->selectSeveritiesTickets((GETPOSTISSET('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2'); print '</td></tr>'; // Group print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">'.$langs->trans("TicketCategory").'</span></label></td><td>'; - $formticket->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2'); + $formticket->selectGroupTickets((GETPOSTISSET('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2'); print '</td></tr>'; // Subject print '<tr><td><label for="subject"><span class="fieldrequired">'.$langs->trans("Subject").'</span></label></td><td>'; - print '<input class="text" size="50" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $object->subject).'" />'; + print '<input class="text" size="50" id="subject" name="subject" value="'.dol_escape_htmltag(GETPOSTISSET('subject') ? GETPOST('subject', 'alpha') : $object->subject).'" />'; print '</td></tr>'; // Other attributes @@ -724,13 +746,10 @@ if ($action == 'create' || $action == 'presend') print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; print '</div>'; - print '</form>'; -} -elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen' - || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') -{ - if ($res > 0) - { + print '</form>'; */ +} elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen' + || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') { + if ($res > 0) { // or for unauthorized internals users if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object->fk_user_assign != $user->id) && !$user->rights->ticket->manage) { accessforbidden('', 0, 1); @@ -759,7 +778,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = } // project info - if ($projectid) { + if ($projectid > 0) { $projectstat = new Project($db); if ($projectstat->fetch($projectid) > 0) { $projectstat->fetch_thirdparty(); @@ -774,8 +793,8 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print dol_get_fiche_head($head, 'ticket', $langs->trans("Project"), 0, ($projectstat->public ? 'projectpub' : 'project')); /* - * Projet synthese pour rappel - */ + * Projet synthese pour rappel + */ print '<table class="border centpercent">'; $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -785,7 +804,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Define a complementary filter for search of next/prev ref. if (!$user->rights->projet->all->lire) { $objectsListId = $projectstat->getProjectsAuthorizedForUser($user, $mine, 0); - $projectstat->next_prev_filter = " rowid in (".(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; + $projectstat->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } print $form->showrefnav($projectstat, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; @@ -878,19 +897,20 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; if ($user->rights->ticket->write) { - if ($action != 'classify') + if ($action != 'classify') { $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&amp;id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>'; - $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref .= '<input type="hidden" name="action" value="classin">'; - $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); - $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref .= '</form>'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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)) { @@ -1010,8 +1030,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print '</tr>'; // Timing (Duration sum of linked fichinter) - if ($conf->fichinter->enabled) - { + if ($conf->fichinter->enabled) { $object->fetchObjectLinked(); $num = count($object->linkedObjects); $timing = 0; @@ -1120,8 +1139,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { print load_fiche_titre($langs->trans('Contacts'), '', 'title_companies.png'); print '<div class="div-table-responsive-no-min">'; @@ -1245,10 +1263,11 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Show link to add a message (if read and not closed) if ($object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") { print '<div class="inline-block divButAction"><a class="butAction reposition" href="card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init">'.$langs->trans('TicketAddMessage').'</a></div>'; @@ -1263,9 +1282,11 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print '<div class="inline-block divButAction"><a class="butAction" href="'.dol_buildpath('/fichinter/card.php', 1).'?action=create&socid='.$object->fk_soc.'&origin=ticket_ticket&originid='.$object->id.'">'.$langs->trans('TicketAddIntervention').'</a></div>'; } + /* This is useless. We can already modify each field individually if ($user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?track_id='.$object->track_id.'&action=edit">'.$langs->trans('Modify').'</a></div>'; } + */ // Close ticket if statut is read if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) { @@ -1292,11 +1313,12 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = $action = 'presend'; } // Set $action to correct value for the case we used presend action to add a message - if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; + if (GETPOSTISSET('actionbis') && $action == 'presend') { + $action = 'presend_addmessage'; + } // add a message - if ($action == 'presend' || $action == 'presend_addmessage') - { + if ($action == 'presend' || $action == 'presend_addmessage') { $action = 'add_message'; // action to use to post the message $modelmail = 'ticket_send'; @@ -1375,10 +1397,18 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Show messages on card (Note: this is a duplicate of the view Events/Agenda but on the main tab) if (!empty($conf->global->TICKET_SHOW_MESSAGES_ON_CARD)) { $param = '&id='.$object->id; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; - if ($actioncode) $param .= '&actioncode='.urlencode($actioncode); - if ($search_agenda_label) $param .= '&search_agenda_label='.urlencode($search_agenda_label); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } + if ($actioncode) { + $param .= '&actioncode='.urlencode($actioncode); + } + if ($search_agenda_label) { + $param .= '&search_agenda_label='.urlencode($search_agenda_label); + } $morehtmlright = ''; diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 40fc22e1347..eb6193d58f1 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -262,14 +262,15 @@ class ActionsTicket // Load logs in cache $ret = $this->dao->loadCacheMsgsTicket(); - if ($ret < 0) dol_print_error($this->dao->db); + if ($ret < 0) { + dol_print_error($this->dao->db); + } $action = GETPOST('action', 'aZ09'); $this->viewTicketOriginalMessage($user, $action, $object); - if (is_array($this->dao->cache_msgs_ticket) && count($this->dao->cache_msgs_ticket) > 0) - { + if (is_array($this->dao->cache_msgs_ticket) && count($this->dao->cache_msgs_ticket) > 0) { print '<table class="border" style="width:100%;">'; print '<tr class="liste_titre">'; diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 4a0bcbe7b92..f814beb3398 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -114,8 +114,7 @@ class Tickets extends DolibarrApi { try { return $this->getCommon(0, '', $ref); - } catch (Exception $e) - { + } catch (Exception $e) { throw $e; } } @@ -233,6 +232,10 @@ class Tickets extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->ticket->read) { + throw new RestException(403); + } + $obj_ret = array(); if (!$socid && DolibarrApiAccess::$user->socid) { diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5f95c7f0dc5..c16817ad7a5 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -410,7 +410,9 @@ class Ticket extends CommonObject // Clean parameters $this->datec = dol_now(); - if (empty($this->track_id)) $this->track_id = generate_random_id(16); + if (empty($this->track_id)) { + $this->track_id = generate_random_id(16); + } // Check more parameters // If error, this->errors[] is filled @@ -566,7 +568,7 @@ class Ticket extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_severity as severity ON severity.code=t.severity_code"; if ($id) { - $sql .= " WHERE t.rowid = ".$this->db->escape($id); + $sql .= " WHERE t.rowid = ".((int) $id); } else { $sql .= " WHERE t.entity IN (".getEntity($this->element, 1).")"; if (!empty($ref)) { @@ -581,8 +583,7 @@ class Ticket extends CommonObject dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - if ($this->db->num_rows($resql)) - { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -716,7 +717,7 @@ class Ticket extends CommonObject $sql .= " AND ".$key." = '".$this->db->escape($value)."'"; } elseif ($key == 't.fk_statut') { if (is_array($value) && count($value) > 0) { - $sql .= 'AND '.$key.' IN ('.implode(',', $value).')'; + $sql .= 'AND '.$key.' IN ('.$this->db->sanitize(implode(',', $value)).')'; } else { $sql .= ' AND '.$key.' = '.$this->db->escape($value); } @@ -913,7 +914,7 @@ class Ticket extends CommonObject $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; $sql .= " date_read=".(dol_strlen($this->date_read) != 0 ? "'".$this->db->idate($this->date_read)."'" : 'null').","; $sql .= " date_close=".(dol_strlen($this->date_close) != 0 ? "'".$this->db->idate($this->date_close)."'" : 'null').""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $this->db->begin(); @@ -991,7 +992,9 @@ class Ticket extends CommonObject if (!$error) { // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $error++; + } } // Removed extrafields @@ -1005,7 +1008,7 @@ class Ticket extends CommonObject if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."ticket"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); @@ -1174,7 +1177,7 @@ class Ticket extends CommonObject } // Cache deja charge - $sql = "SELECT rowid, code, label, use_default, pos, description"; + $sql = "SELECT rowid, code, label, use_default, pos, description, public, active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category"; $sql .= " WHERE active > 0"; $sql .= " ORDER BY pos"; @@ -1191,6 +1194,8 @@ class Ticket extends CommonObject $this->cache_category_tickets[$obj->rowid]['label'] = $label; $this->cache_category_tickets[$obj->rowid]['use_default'] = $obj->use_default; $this->cache_category_tickets[$obj->rowid]['pos'] = $obj->pos; + $this->cache_category_tickets[$obj->rowid]['public'] = $obj->public; + $this->cache_category_tickets[$obj->rowid]['active'] = $obj->active; $i++; } return $num; @@ -1319,7 +1324,9 @@ class Ticket extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } $result = ''; @@ -1332,33 +1339,40 @@ class Ticket extends CommonObject $url = dol_buildpath('/ticket/card.php', 1).'?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowTicket"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else { + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; $linkend = '</a>'; $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->ref; + } $result .= $linkend; //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); @@ -1437,9 +1451,8 @@ class Ticket extends CommonObject $this->oldcopy = dol_clone($this); $sql = "UPDATE ".MAIN_DB_PREFIX."ticket"; - if ($id_assign_user > 0) - { - $sql .= " SET fk_user_assign=".$id_assign_user.", fk_statut = ".Ticket::STATUS_ASSIGNED; + if ($id_assign_user > 0) { + $sql .= " SET fk_user_assign=".((int) $id_assign_user).", fk_statut = ".Ticket::STATUS_ASSIGNED; } else { $sql .= " SET fk_user_assign=null, fk_statut = ".Ticket::STATUS_READ; } @@ -1447,8 +1460,7 @@ class Ticket extends CommonObject dol_syslog(get_class($this)."::assignUser sql=".$sql); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->fk_user_assign = $id_assign_user; // May be used by trigger if (!$notrigger) { @@ -1588,29 +1600,29 @@ class Ticket extends CommonObject // TODO Read the table llx_actioncomm /* - $sql = "SELECT rowid, fk_user_create, datec, message"; - $sql .= " FROM " . MAIN_DB_PREFIX . "ticket_logs"; - $sql .= " WHERE fk_track_id ='" . $this->db->escape($this->track_id) . "'"; - $sql .= " ORDER BY datec DESC"; + $sql = "SELECT rowid, fk_user_create, datec, message"; + $sql .= " FROM " . MAIN_DB_PREFIX . "ticket_logs"; + $sql .= " WHERE fk_track_id ='" . $this->db->escape($this->track_id) . "'"; + $sql .= " ORDER BY datec DESC"; - $resql = $this->db->query($sql); - if ($resql) { - $num = $this->db->num_rows($resql); - $i = 0; - while ($i < $num) { - $obj = $this->db->fetch_object($resql); - $this->cache_logs_ticket[$i]['id'] = $obj->rowid; - $this->cache_logs_ticket[$i]['fk_user_create'] = $obj->fk_user_create; - $this->cache_logs_ticket[$i]['datec'] = $this->db->jdate($obj->datec); - $this->cache_logs_ticket[$i]['message'] = $obj->message; - $i++; - } - return $num; - } else { - $this->error = "Error " . $this->db->lasterror(); - dol_syslog(get_class($this) . "::loadCacheLogsTicket " . $this->error, LOG_ERR); - return -1; - }*/ + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $obj = $this->db->fetch_object($resql); + $this->cache_logs_ticket[$i]['id'] = $obj->rowid; + $this->cache_logs_ticket[$i]['fk_user_create'] = $obj->fk_user_create; + $this->cache_logs_ticket[$i]['datec'] = $this->db->jdate($obj->datec); + $this->cache_logs_ticket[$i]['message'] = $obj->message; + $i++; + } + return $num; + } else { + $this->error = "Error " . $this->db->lasterror(); + dol_syslog(get_class($this) . "::loadCacheLogsTicket " . $this->error, LOG_ERR); + return -1; + }*/ return 0; } @@ -1669,14 +1681,12 @@ class Ticket extends CommonObject $actioncomm->attachedfiles = $attachedfiles; } - if (!empty($mimefilename_list) && is_array($mimefilename_list)) - { + if (!empty($mimefilename_list) && is_array($mimefilename_list)) { $actioncomm->note_private = dol_concatdesc($actioncomm->note_private, "\n".$langs->transnoentities("AttachedFiles").': '.join(';', $mimefilename_list)); } $actionid = $actioncomm->create($user); - if ($actionid <= 0) - { + if ($actionid <= 0) { $error++; $this->error = $actioncomm->error; $this->errors = $actioncomm->errors; @@ -1760,8 +1770,7 @@ class Ticket extends CommonObject if (!empty($conf->ficheinter->enabled) && !empty($conf->global->WORKFLOW_TICKET_CLOSE_INTERVENTION)) { dol_syslog("We have closed the ticket, so we close all linked interventions"); $this->fetchObjectLinked($this->id, $this->element, null, 'fichinter'); - if ($this->linkedObjectsIds) - { + if ($this->linkedObjectsIds) { foreach ($this->linkedObjectsIds['fichinter'] as $fichinter_id) { $fichinter = new Fichinter($this->db); $fichinter->fetch($fichinter_id); @@ -1973,8 +1982,8 @@ class Ticket extends CommonObject * Link element with a project * Override core function because of key name 'fk_project' used for this module * - * @param int $projectid Project id to link element to - * @return int <0 if KO, >0 if OK + * @param int $projectid Project id to link element to + * @return int <0 if KO, >0 if OK */ public function setProject($projectid) { @@ -1985,16 +1994,15 @@ class Ticket extends CommonObject $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; if ($projectid) { - $sql .= ' SET fk_project = '.$projectid; + $sql .= ' SET fk_project = '.((int) $projectid); } else { $sql .= ' SET fk_project = NULL'; } - - $sql .= ' WHERE rowid = '.$this->id; + $sql .= ' WHERE rowid = '.((int) $this->id); dol_syslog(get_class($this)."::setProject sql=".$sql); if ($this->db->query($sql)) { - $this->fk_project = $projectid; + $this->fk_project = ((int) $projectid); return 1; } else { dol_print_error($this->db); @@ -2148,8 +2156,7 @@ class Ticket extends CommonObject $sendto = $obj->firstname." ".$obj->lastname." <".$obj->email.">"; $actiondefid = $obj->adid; - if (dol_strlen($sendto)) - { + if (dol_strlen($sendto)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM'); @@ -2465,8 +2472,7 @@ class Ticket extends CommonObject foreach ($filename as $i => $val) { $destfile = $destdir.'/'.$filename[$i]; // If destination file already exists, we add a suffix to avoid to overwrite - if (is_file($destfile)) - { + if (is_file($destfile)) { $pathinfo = pathinfo($filename[$i]); $now = dol_now(); $destfile = $destdir.'/'.$pathinfo['filename'].' - '.dol_print_date($now, 'dayhourlog').'.'.$pathinfo['extension']; @@ -2626,11 +2632,10 @@ class Ticket extends CommonObject $this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames); } } - } - /* - * Private area - */ - else { + } else { + /* + * Private area + */ /* * Send emails to internal users (linked contacts) */ @@ -2670,7 +2675,9 @@ class Ticket extends CommonObject } if ($info_sendto['email'] != '') { - if (!empty($info_sendto['email'])) $sendto[] = trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">"; + if (!empty($info_sendto['email'])) { + $sendto[] = trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">"; + } //Contact type $recipient = dolGetFirstLastname($info_sendto['firstname'], $info_sendto['lastname'], '-1').' ('.strtolower($info_sendto['libelle']).')'; @@ -2686,7 +2693,9 @@ class Ticket extends CommonObject // Add global email address recipient if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS && !in_array($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto)) { - if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO)) $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO)) { + $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + } } // altairis: dont try to send email if no recipient @@ -2744,7 +2753,9 @@ class Ticket extends CommonObject } if ($info_sendto['email'] != '' && $info_sendto['email'] != $object->origin_email) { - if (!empty($info_sendto['email'])) $sendto[] = trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">"; + if (!empty($info_sendto['email'])) { + $sendto[] = trim($info_sendto['firstname']." ".$info_sendto['lastname'])." <".$info_sendto['email'].">"; + } $recipient = dolGetFirstLastname($info_sendto['firstname'], $info_sendto['lastname'], '-1').' ('.strtolower($info_sendto['libelle']).')'; $message .= (!empty($recipient) ? $langs->trans('TicketNotificationRecipient').' : '.$recipient.'<br>' : ''); @@ -2769,12 +2780,16 @@ class Ticket extends CommonObject if ($object->fk_soc > 0 && !in_array($object->origin_email, $sendto)) { $object->socid = $object->fk_soc; $object->fetch_thirdparty(); - if (!empty($object->thirdparty->email)) $sendto[] = $object->thirdparty->email; + if (!empty($object->thirdparty->email)) { + $sendto[] = $object->thirdparty->email; + } } // altairis: Add global email address reciepient if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS && !in_array($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto)) { - if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO)) $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO)) { + $sendto[] = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + } } // altairis: dont try to send email when no recipient @@ -2787,8 +2802,7 @@ class Ticket extends CommonObject } // Set status to "answered" if not set yet, but only if internal user - if ($object->fk_statut < 3 && !$user->socid) - { + if ($object->fk_statut < 3 && !$user->socid) { $object->setStatut(3); } @@ -2842,8 +2856,7 @@ class Ticket extends CommonObject $from = $conf->global->TICKET_NOTIFICATION_EMAIL_FROM; if (is_array($array_receiver) && count($array_receiver) > 0) { - foreach ($array_receiver as $key => $receiver) - { + foreach ($array_receiver as $key => $receiver) { $deliveryreceipt = 0; $filepath = $filename_list; $filename = $mimefilename_list; @@ -2897,25 +2910,28 @@ class Ticket extends CommonObject global $conf, $user, $langs; $now = dol_now(); + $delay_warning = 0; $this->nbtodo = $this->nbtodolate = 0; $clause = " WHERE"; $sql = "SELECT p.rowid, p.ref, p.datec as datec"; $sql .= " FROM ".MAIN_DB_PREFIX."ticket as p"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + if (!$user->rights->societe->client->voir && !$user->socid) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; $sql .= " WHERE sc.fk_user = ".$user->id; $clause = " AND"; } $sql .= $clause." p.entity IN (".getEntity('ticket').")"; - if ($mode == 'opened') $sql .= " AND p.fk_statut NOT IN (".Ticket::STATUS_CLOSED.", ".Ticket::STATUS_CANCELED.")"; - if ($user->socid) $sql .= " AND p.fk_soc = ".$user->socid; + if ($mode == 'opened') { + $sql .= " AND p.fk_statut NOT IN (".Ticket::STATUS_CLOSED.", ".Ticket::STATUS_CANCELED.")"; + } + if ($user->socid) { + $sql .= " AND p.fk_soc = ".$user->socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $label = $labelShort = ''; $status = ''; if ($mode == 'opened') { @@ -2934,14 +2950,11 @@ class Ticket extends CommonObject $response->img = img_object('', "ticket"); // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $response->nbtodo++; - if ($mode == 'opened') - { - $datelimit = $this->db->jdate($obj->datefin); - if ($datelimit < ($now - $delay_warning)) - { + if ($mode == 'opened') { + $datelimit = $this->db->jdate($obj->datec) + $delay_warning; + if ($datelimit < $now) { //$response->nbtodolate++; } } @@ -2970,8 +2983,7 @@ class Ticket extends CommonObject $sql = "SELECT count(p.rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."ticket as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { + 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"; @@ -2979,11 +2991,9 @@ class Ticket extends CommonObject $sql .= " ".$clause." p.entity IN (".getEntity('ticket').")"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $this->nb["ticket"] = $obj->nb; } $this->db->free($resql); diff --git a/htdocs/ticket/class/ticketstats.class.php b/htdocs/ticket/class/ticketstats.class.php index 588037a6d2f..2bcd0fe89fc 100644 --- a/htdocs/ticket/class/ticketstats.class.php +++ b/htdocs/ticket/class/ticketstats.class.php @@ -67,7 +67,7 @@ class TicketStats extends Stats $this->where .= " AND fk_soc = ".$this->socid; } if (is_array($this->userid) && count($this->userid) > 0) { - $this->where .= ' AND fk_user_create IN ('.join(',', $this->userid).')'; + $this->where .= ' AND fk_user_create IN ('.$this->db->sanitize(join(',', $this->userid)).')'; } elseif ($this->userid > 0) { $this->where .= ' AND fk_user_create = '.$this->userid; } @@ -98,7 +98,7 @@ class TicketStats extends Stats { $sql = "SELECT MONTH(datec) as dm, count(*)"; $sql .= " FROM ".$this->from; - $sql .= " WHERE YEAR(datec) = ".$year; + $sql .= " WHERE YEAR(datec) = ".((int) $year); $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); diff --git a/htdocs/ticket/class/utils_diff.class.php b/htdocs/ticket/class/utils_diff.class.php index 6edccdfa0ff..e18418d78a6 100644 --- a/htdocs/ticket/class/utils_diff.class.php +++ b/htdocs/ticket/class/utils_diff.class.php @@ -78,8 +78,7 @@ class Diff } $end2 = ($compareCharacters ? strlen($sequence1) : count($sequence1)); - for ($index = $end1 + 1; $index < $end2; $index++) - { + for ($index = $end1 + 1; $index < $end2; $index++) { $diff[] = array($sequence1[$index], self::UNMODIFIED); } @@ -313,12 +312,12 @@ class Diff self::DELETED ); $rightCell = self::getCellContent( - $diff, - $indentation, - $separator, - $index, - self::INSERTED - ); + $diff, + $indentation, + $separator, + $index, + self::INSERTED + ); break; // display the inserted content on the right diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 13419cf795e..7e04dd12104 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -124,8 +124,7 @@ $contactstatic = new Contact($db); $userstatic = new User($db); if ($id > 0 || !empty($track_id) || !empty($ref)) { - if ($object->fetch($id, $ref, $track_id) > 0) - { + if ($object->fetch($id, $ref, $track_id) > 0) { if ($socid > 0) { $object->fetch_thirdparty(); $head = societe_prepare_head($object->thirdparty); @@ -161,12 +160,11 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) { } // Thirdparty - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty'); /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) { - $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; - }*/ + $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; + }*/ $morehtmlref .= ' : '; if ($action == 'editcustomer') { $morehtmlref .= $form->form_thirdparty($url_page_current.'?track_id='.$object->track_id, $object->socid, 'editcustomer', '', 1, 0, 0, array(), 1); @@ -176,12 +174,10 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) { } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->ticket->write) - { + if ($user->rights->ticket->write) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>'; $morehtmlref .= ' : '; diff --git a/htdocs/ticket/css/styles.css.php b/htdocs/ticket/css/styles.css.php index 7391dd19012..fb2a58f6fe0 100644 --- a/htdocs/ticket/css/styles.css.php +++ b/htdocs/ticket/css/styles.css.php @@ -22,14 +22,26 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +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('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('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', 1); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} session_cache_limiter('public'); @@ -39,13 +51,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); -else header('Cache-Control: no-cache'); +if (empty($dolibarr_nocache)) { + header('Cache-Control: max-age=3600, public, must-revalidate'); +} else { + header('Cache-Control: no-cache'); +} ?> html { - min-height: 100%; height: 100%; + min-height: 100%; height: 100%; } html { @@ -58,49 +73,50 @@ if (!empty($conf->global->TICKET_SHOW_MODULE_LOGO)) { div.ticketform { - font-family: arial; - position: static; - padding: 2em 1em; - overflow-x: auto; - border: 2px solid rgb(153, 153, 153); - background-color: rgb(255, 255, 255); - box-shadow: 2px 2px 2px rgb(245, 245, 245); - border-radius: 10px 10px 10px 10px; - margin: 1.5em; - background : #ffffff; + font-family: arial; + position: static; +/* padding: 2em 1em; + overflow-x: auto; + border: 2px solid rgb(153, 153, 153); + background-color: rgb(255, 255, 255); + box-shadow: 2px 2px 2px rgb(245, 245, 245); + border-radius: 10px 10px 10px 10px; + margin: 1.5em; +*/ + background : #ffffff; text-align: center; } -div.ticketform .index_create, .index_display { +div.ticketform .index_create, div.ticketform .index_display { display: inline-block; - width: 200px; - height: 45px; - text-align: center; - vertical-align: middle; - margin: 20px; - text-transform: uppercase; + width: 200px; + height: 45px; + text-align: center; + vertical-align: middle; + margin: 20px; + text-transform: uppercase; } #form_create_ticket, #form_view_ticket { - margin-left: 10px; - margin-right: 10px; - padding-left:1em; - padding-right:1em; - padding-top:1.5em; - padding-bottom:12px; + margin-left: 10px; + margin-right: 10px; + padding-left:1em; + padding-right:1em; + padding-top:1.5em; + padding-bottom:12px; - border: 1px solid #C0C0C0; - background-color: #E0E0E0; + border: 1px solid #C0C0C0; + background-color: #E0E0E0; - -moz-box-shadow: 4px 4px 4px #DDD; - -webkit-box-shadow: 4px 4px 4px #DDD; - box-shadow: 4px 4px 4px #DDD; + -moz-box-shadow: 4px 4px 4px #DDD; + -webkit-box-shadow: 4px 4px 4px #DDD; + box-shadow: 4px 4px 4px #DDD; - border-radius: 8px; - border:solid 1px rgba(168,168,168,.4); - border-top:solid 1px f8f8f8; - background-color: #f8f8f8; + border-radius: 8px; + border:solid 1px rgba(168,168,168,.4); + border-top:solid 1px f8f8f8; + background-color: #f8f8f8; } #form_create_ticket input.text, #form_create_ticket textarea { width:450px;} diff --git a/htdocs/ticket/document.php b/htdocs/ticket/document.php index 70a57b26424..740061f99ba 100644 --- a/htdocs/ticket/document.php +++ b/htdocs/ticket/document.php @@ -52,12 +52,18 @@ $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 = "ASC"; -if (!$sortfield) $sortfield = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $object = new Ticket($db); $result = $object->fetch($id, $ref, $track_id); @@ -73,7 +79,7 @@ if ($result < 0) { * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; @@ -86,8 +92,7 @@ $form = new Form($db); $help_url = ''; llxHeader('', $langs->trans("TicketDocumentsLinked").' - '.$langs->trans("Files"), $help_url); -if ($object->id) -{ +if ($object->id) { /* * Show tabs */ @@ -126,12 +131,11 @@ if ($object->id) } // Thirdparty - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty'); /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) { - $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; - }*/ + $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; + }*/ $morehtmlref .= ' : '; if ($action == 'editcustomer') { $morehtmlref .= $form->form_thirdparty($url_page_current.'?track_id='.$object->track_id, $object->socid, 'editcustomer', '', 1, 0, 0, array(), 1); @@ -141,12 +145,10 @@ if ($object->id) } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project').' '; - if ($user->rights->ticket->write) - { + if ($user->rights->ticket->write) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>'; $morehtmlref .= ' : '; @@ -190,11 +192,11 @@ if ($object->id) //$object->ref = $object->track_id; // For compatibility we use track ID for directory $modulepart = 'ticket'; - $permission = $user->rights->ticket->write; - $permtoedit = $user->rights->ticket->write; - $param = '&id='.$object->id; + $permission = $user->rights->ticket->write; + $permtoedit = $user->rights->ticket->write; + $param = '&id='.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { accessforbidden('', 0, 1); } diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index f871fafa893..6bebe358af3 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io> * Copyright (C) - 2019 Nicolas ZABOURI <info@inovea-conseil.com> + * Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticketstats.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $hookmanager = new HookManager($db); @@ -44,6 +46,7 @@ $msg_id = GETPOST('msg_id', 'int'); $action = GETPOST('action', 'aZ09'); +$socid = 0; if ($user->socid) { $socid = $user->socid; } @@ -70,6 +73,7 @@ $object = new Ticket($db); /* * View */ +$resultboxes = FormOther::getBoxesArea($user, "11"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) $form = new Form($db); $tickesupstatic = new Ticket($db); @@ -77,7 +81,7 @@ $tickesupstatic = new Ticket($db); llxHeader('', $langs->trans('TicketsIndex'), ''); $linkback = ''; -print load_fiche_titre($langs->trans('TicketsIndex'), $linkback, 'ticket'); +print load_fiche_titre($langs->trans('TicketsIndex'), $resultboxes['selectboxlist'], 'ticket'); $dir = ''; @@ -112,7 +116,12 @@ $startyear = $endyear - 1; $WIDTH = (($shownb && $showtot) || !empty($conf->dol_optimize_smallscreen)) ? '100%' : '80%'; $HEIGHT = '200'; -print '<div class="fichecenter"><div class="fichethirdleft">'; +print '<div class="clearboth"></div>'; +print '<div class="fichecenter fichecenterbis">'; + +print '<div class="twocolumns">'; + +print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">'; /* * Statistics area @@ -120,11 +129,13 @@ print '<div class="fichecenter"><div class="fichethirdleft">'; $tick = array( 'unread' => 0, 'read' => 0, + 'needmoreinfo' => 0, 'answered' => 0, 'assigned' => 0, 'inprogress' => 0, 'waiting' => 0, 'closed' => 0, + 'canceled' => 0, 'deleted' => 0, ); @@ -137,7 +148,7 @@ $sql .= ' WHERE t.entity IN ('.getEntity('ticket').')'; $sql .= dolSqlDateFilter('datec', 0, 0, $endyear); if (!$user->rights->societe->client->voir && !$socid) { - $sql .= " AND t.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " AND t.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); } // External users restriction @@ -146,7 +157,7 @@ if ($user->socid > 0) { } else { // For internals users, if (!empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) && !$user->rights->ticket->manage) { - $sql .= " AND t.fk_user_assign = ".$user->id; + $sql .= " AND t.fk_user_assign = ".((int) $user->id); } } $sql .= " GROUP BY t.fk_statut"; @@ -181,7 +192,7 @@ if ($result) { } } - include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; $dataseries = array(); $colorseries = array(); @@ -279,8 +290,13 @@ print '</div>'; // Build graphic number of object $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); -print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; +print '<br>'."\n"; +print $resultboxes['boxlista']; + +print '</div>'."\n"; + +print '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">'; /* * Latest tickets @@ -310,7 +326,7 @@ if ($user->socid > 0) { $sql .= " AND t.fk_soc= ".((int) $user->socid); } else { // Restricted to assigned user only - if ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && !$user->rights->ticket->manage) { + if (!empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY) && !$user->rights->ticket->manage) { $sql .= " AND t.fk_user_assign=".$user->id; } } @@ -389,21 +405,32 @@ if ($result) { $db->free($result); } else { - print '<tr><td colspan="6" class="opacitymedium">'.$langs->trans('NoUnreadTicketsFound').'</td></tr>'; + print '<tr><td colspan="6"><span class="opacitymedium">'.$langs->trans('NoUnreadTicketsFound').'</span></td></tr>'; } print "</table>"; print '</div>'; + + print '<br>'; } else { dol_print_error($db); } -print '</div></div></div>'; + +print $resultboxes['boxlistb']; + +print '</div>'; +print '</div>'; +print '</div>'; + + print '<div style="clear:both"></div>'; $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardTickets', $parameters, $object); // Note that $action and $object may have been modified by hook + + // End of page llxFooter(''); $db->close(); diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 91cefc88d42..19b352ee936 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -72,7 +72,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -81,32 +83,44 @@ $pagenext = $page + 1; $object = new Ticket($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->ticket->dir_output.'/temp/massgeneration/'.$user->id; -if ($socid > 0) $hookmanager->initHooks(array('thirdpartyticket')); -elseif ($projectid > 0) $hookmanager->initHooks(array('projectticket')); -else $hookmanager->initHooks(array('ticketlist')); +if ($socid > 0) { + $hookmanager->initHooks(array('thirdpartyticket')); +} elseif ($projectid > 0) { + $hookmanager->initHooks(array('projectticket')); +} else { + $hookmanager->initHooks(array('ticketlist')); +} // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) $sortfield = "t.datec"; -if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) { + $sortfield = "t.datec"; +} +if (!$sortorder) { + $sortorder = "DESC"; +} -if (GETPOST('search_fk_status', 'alpha') == 'non_closed') $_GET['search_fk_statut'][] = 'openall'; // For backward compatibility +if (GETPOST('search_fk_status', 'alpha') == 'non_closed') { + $_GET['search_fk_statut'][] = 'openall'; // For backward compatibility +} // Initialize array of search criterias $search_all = trim(GETPOSTISSET("search_all") ?GETPOSTISSET("search_all", 'alpha') : GETPOST('sall')); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } // List of fields to search into when doing a "search in all" $fieldstosearchall = array(); -foreach ($object->fields as $key => $val) -{ - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } } $fieldstosearchall['s.name_alias'] = "AliasNameShort"; $fieldstosearchall['s.zip'] = "Zip"; @@ -114,10 +128,11 @@ $fieldstosearchall['s.town'] = "Town"; // Definition of fields for list $arrayfields = array(); -foreach ($object->fields as $key => $val) -{ +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'], 'position'=>$val['position']); + if (!empty($val['visible'])) { + $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>$val['enabled'], 'position'=>$val['position']); + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -136,8 +151,7 @@ if (!$user->rights->ticket->read) { // Store current page url $url_page_current = dol_buildpath('/ticket/list.php', 1); -if ($project_ref) -{ +if ($project_ref) { $tmpproject = new Project($db); $tmpproject->fetch(0, $project_ref); $projectid = $tmpproject->id; @@ -155,25 +169,32 @@ $error = 0; * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { + $massaction = ''; +} $parameters = array(); -if ($socid > 0) $parameters['socid'] = $socid; -if ($projectid > 0) $parameters['projectid'] = $projectid; +if ($socid > 0) { + $parameters['socid'] = $socid; +} +if ($projectid > 0) { + $parameters['projectid'] = $projectid; +} $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { - foreach ($object->fields as $key => $val) - { + 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 + foreach ($object->fields as $key => $val) { $search[$key] = ''; } $toselect = ''; @@ -186,8 +207,7 @@ if (empty($reshook)) $search_dateclose_end = ''; } 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')) - { + || 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 } @@ -198,26 +218,23 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // Close records - if (!$error && $massaction == 'close' && $permissiontoadd) - { + if (!$error && $massaction == 'close' && $permissiontoadd) { $objecttmp = new $objectclass($db); - if (!$error) - { + if (!$error) { $db->begin(); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $result = $objecttmp->close($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -225,10 +242,12 @@ if (empty($reshook)) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -238,27 +257,24 @@ if (empty($reshook)) } // Reopen records - if (!$error && $massaction == 'reopen' && $permissiontoadd) - { + if (!$error && $massaction == 'reopen' && $permissiontoadd) { $objecttmp = new $objectclass($db); - if (!$error) - { + if (!$error) { $db->begin(); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { if ($objecttmp->status == Ticket::STATUS_CLOSED || $objecttmp->status == Ticket::STATUS_CANCELED) { $result = $objecttmp->setStatut(Ticket::STATUS_ASSIGNED); - if ($result < 0) - { + if ($result < 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { $langs->load("errors"); setEventMessages($langs->trans("ErrorObjectMustHaveStatusClosedToBeReOpened", $objecttmp->ref), null, 'errors'); @@ -272,10 +288,12 @@ if (empty($reshook)) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -307,34 +325,37 @@ $title = $langs->trans('TicketList'); // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT '; -foreach ($object->fields as $key => $val) -{ +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.', ' : ''); +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.', ' : ''); + } +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql = preg_replace('/, $/', '', $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)"; +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 .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (t.fk_soc = s.rowid)"; $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; -if ($socid > 0) -{ - $sql .= " AND t.fk_soc = ".$socid; +if ($socid > 0) { + $sql .= " AND t.fk_soc = ".((int) $socid); } -foreach ($search as $key => $val) -{ - if ($key == 'fk_statut' && !empty($search['fk_statut'])) - { +foreach ($search as $key => $val) { + if ($key == 'fk_statut' && !empty($search['fk_statut'])) { $newarrayofstatus = array(); foreach ($search['fk_statut'] as $key2 => $val2) { - if (in_array($val2, array('openall', 'closeall'))) continue; + if (in_array($val2, array('openall', 'closeall'))) { + continue; + } $newarrayofstatus[] = $val2; } if ($search['fk_statut'] == 'openall' || in_array('openall', $search['fk_statut'])) { @@ -349,31 +370,56 @@ foreach ($search as $key => $val) $newarrayofstatus[] = Ticket::STATUS_CLOSED; $newarrayofstatus[] = Ticket::STATUS_CANCELED; } - if (count($newarrayofstatus)) $sql .= natural_search($key, join(',', $newarrayofstatus), 2); + if (count($newarrayofstatus)) { + $sql .= natural_search($key, join(',', $newarrayofstatus), 2); + } continue; } - if ($key == 'fk_user_assign' || $key == 'fk_user_create' || $key == 'fk_project') - { - if ($search[$key] > 0) $sql .= natural_search($key, $search[$key], 2); + if ($key == 'fk_user_assign' || $key == 'fk_user_create' || $key == 'fk_project') { + if ($search[$key] > 0) { + $sql .= natural_search($key, $search[$key], 2); + } continue; } $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); - if ($search[$key] != '') $sql .= natural_search($key, $search[$key], $mode_search); + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], $mode_search); + } +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +} +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} +if ($search_fk_project > 0) { + $sql .= natural_search('fk_project', $search_fk_project, 2); +} +if ($search_date_start) { + $sql .= " AND t.datec >= '".$db->idate($search_date_start)."'"; +} +if ($search_date_end) { + $sql .= " AND t.datec <= '".$db->idate($search_date_end)."'"; +} +if ($search_dateread_start) { + $sql .= " AND t.date_read >= '".$db->idate($search_dateread_start)."'"; +} +if ($search_dateread_end) { + $sql .= " AND t.date_read <= '".$db->idate($search_dateread_end)."'"; +} +if ($search_dateclose_start) { + $sql .= " AND t.date_close >= '".$db->idate($search_dateclose_start)."'"; +} +if ($search_dateclose_end) { + $sql .= " AND t.date_close <= '".$db->idate($search_dateclose_end)."'"; } -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); -if ($search_fk_project > 0) $sql .= natural_search('fk_project', $search_fk_project, 2); -if ($search_date_start) $sql .= " AND t.datec >= '".$db->idate($search_date_start)."'"; -if ($search_date_end) $sql .= " AND t.datec <= '".$db->idate($search_date_end)."'"; -if ($search_dateread_start) $sql .= " AND t.date_read >= '".$db->idate($search_dateread_start)."'"; -if ($search_dateread_end) $sql .= " AND t.date_read <= '".$db->idate($search_dateread_end)."'"; -if ($search_dateclose_start) $sql .= " AND t.date_close >= '".$db->idate($search_dateclose_start)."'"; -if ($search_dateclose_end) $sql .= " AND t.date_close <= '".$db->idate($search_dateclose_end)."'"; if (!$user->socid && ($mode == "mine" || (!$user->admin && $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY))) { $sql .= " AND (t.fk_user_assign = ".$user->id; - if (empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) $sql .= " OR t.fk_user_create = ".$user->id; + if (empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) { + $sql .= " OR t.fk_user_create = ".$user->id; + } $sql .= ")"; } @@ -388,26 +434,22 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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) -{ +if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; } else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -416,8 +458,7 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) -{ +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/ticket/card.php?id='.$id); @@ -449,30 +490,30 @@ if ($socid && !$projectid && !$project_ref && $user->rights->societe->lire) { print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent tableforfield">'; - // Customer code - if ($socstat->client && !empty($socstat->code_client)) { - print '<tr><td class="titlefield">'; - print $langs->trans('CustomerCode').'</td><td>'; - print $socstat->code_client; - $tmpcheck = $socstat->check_codeclient(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; - } - print '</td>'; - print '</tr>'; - } - // Supplier code - if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) { - print '<tr><td class="titlefield">'; - print $langs->trans('SupplierCode').'</td><td>'; - print $socstat->code_fournisseur; - $tmpcheck = $socstat->check_codefournisseur(); - if ($tmpcheck != 0 && $tmpcheck != -5) { - print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; - } - print '</td>'; - print '</tr>'; - } + // Customer code + if ($socstat->client && !empty($socstat->code_client)) { + print '<tr><td class="titlefield">'; + print $langs->trans('CustomerCode').'</td><td>'; + print showValueWithClipboardCPButton(dol_escape_htmltag($socstat->code_client)); + $tmpcheck = $socstat->check_codeclient(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; + } + print '</td>'; + print '</tr>'; + } + // Supplier code + if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) { + print '<tr><td class="titlefield">'; + print $langs->trans('SupplierCode').'</td><td>'; + print showValueWithClipboardCPButton(dol_escape_htmltag($socstat->code_fournisseur)); + $tmpcheck = $socstat->check_codefournisseur(); + if ($tmpcheck != 0 && $tmpcheck != -5) { + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; + } + print '</td>'; + print '</tr>'; + } print '</table>'; print '</div>'; @@ -506,17 +547,15 @@ if ($projectid > 0 || $project_ref) { // Title $morehtmlref .= $object->title; // Thirdparty - if ($object->thirdparty->id > 0) - { + if ($object->thirdparty->id > 0) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); } $morehtmlref .= '</div>'; // Define a complementary filter for search of next/prev ref. - if (!$user->rights->projet->all->lire) - { + if (!$user->rights->projet->all->lire) { $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0); - $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")"; + $object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")"; } dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref); @@ -549,39 +588,95 @@ if ($projectid > 0 || $project_ref) { $arrayofselected = is_array($toselect) ? $toselect : array(); $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 (!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); } -if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; -if ($socid) $param .= '&socid='.urlencode($socid); -if ($projectid) $param .= '&projectid='.urlencode($projectid); - -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 ($search_dateread_start) $param .= '&search_dateread_start='.urlencode($search_dateread_start); -if ($search_dateread_end) $param .= '&search_dateread_end='.urlencode($search_dateread_end); -if ($search_dateclose_start) $param .= '&search_dateclose_start='.urlencode($search_dateclose_start); -if ($search_dateclose_end) $param .= '&search_dateclose_end='.urlencode($search_dateclose_end); +if ($socid > 0) { + $param .= '&socid='.urlencode($socid); +} +if ($search_societe) { + $param .= '&search_societe='.urlencode($search_societe); +} +if ($projectid > 0) { + $param .= '&projectid='.urlencode($projectid); +} +if ($search_date_start) { + $tmparray = dol_getdate($search_date_start); + $param .= '&search_date_startday='.urlencode($tmparray['mday']); + $param .= '&search_date_startmonth='.urlencode($tmparray['mon']); + $param .= '&search_date_startyear='.urlencode($tmparray['year']); +} +if ($search_date_end) { + $tmparray = dol_getdate($search_date_end); + $param .= '&search_date_endday='.urlencode($tmparray['mday']); + $param .= '&search_date_endmonth='.urlencode($tmparray['mon']); + $param .= '&search_date_endyear='.urlencode($tmparray['year']); +} +if ($search_dateread_start) { + $tmparray = dol_getdate($search_dateread_start); + $param .= '&search_dateread_startday='.urlencode($tmparray['mday']); + $param .= '&search_dateread_startmonth='.urlencode($tmparray['mon']); + $param .= '&search_dateread_startyear='.urlencode($tmparray['year']); +} +if ($search_dateread_end) { + $tmparray = dol_getdate($search_dateread_end); + $param .= '&search_dateread_endday='.urlencode($tmparray['mday']); + $param .= '&search_dateread_endmonth='.urlencode($tmparray['mon']); + $param .= '&search_dateread_endyear='.urlencode($tmparray['year']); +} +if ($search_dateclose_start) { + $tmparray = dol_getdate($search_dateclose_start); + $param .= '&search_dateclose_startday='.urlencode($tmparray['mday']); + $param .= '&search_dateclose_startmonth='.urlencode($tmparray['mon']); + $param .= '&search_dateclose_startyear='.urlencode($tmparray['year']); +} +if ($search_dateclose_end) { + $tmparray = dol_getdate($search_dateclose_end); + $param .= '&search_date_endday='.urlencode($tmparray['mday']); + $param .= '&search_date_endmonth='.urlencode($tmparray['mon']); + $param .= '&search_date_endyear='.urlencode($tmparray['year']); +} // List of mass actions available $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); -if ($user->rights->ticket->write) $arrayofmassactions['close'] = $langs->trans("Close"); -if ($user->rights->ticket->write) $arrayofmassactions['reopen'] = $langs->trans("ReOpen"); -if ($user->rights->ticket->delete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if ($user->rights->ticket->write) { + $arrayofmassactions['close'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Close"); +} +if ($user->rights->ticket->write) { + $arrayofmassactions['reopen'] = img_picto('', 'folder-open', 'class="pictofixedwidth"').$langs->trans("ReOpen"); +} +if ($user->rights->ticket->delete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="action" value="list">'; @@ -589,15 +684,23 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="mode" value="'.$mode.'" >'; -if ($socid) print '<input type="hidden" name="socid" value="'.$socid.'" >'; -if ($projectid) print '<input type="hidden" name="projectid" value="'.$projectid.'" >'; +if ($socid) { + print '<input type="hidden" name="socid" value="'.$socid.'" >'; +} +if ($projectid) { + print '<input type="hidden" name="projectid" value="'.$projectid.'" >'; +} $url = DOL_URL_ROOT.'/ticket/card.php?action=create'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : ''); -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewTicket'), '', 'fa fa-plus-circle', $url, '', $user->rights->ticket->write); $picto = 'ticket'; -if ($socid > 0) $picto = ''; +if ($socid > 0) { + $picto = ''; +} print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -611,9 +714,10 @@ $objecttmp = new Ticket($db); $trackid = 'tic'.$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); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -624,11 +728,13 @@ $moreforfilter.= '</div>';*/ $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -645,13 +751,17 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['css']) ? '' : $val['css']); - if ($key == 'fk_statut') $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 ($key == 'fk_statut') { + $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'])) { if ($key == 'type_code') { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; @@ -672,23 +782,26 @@ foreach ($object->fields as $key => $val) } elseif ($key == 'fk_statut') { $arrayofstatus = array(); $arrayofstatus['openall'] = '-- '.$langs->trans('OpenAll').' --'; - foreach ($object->statuts_short as $key2 => $val2) - { - if ($key2 == Ticket::STATUS_CLOSED) $arrayofstatus['closeall'] = '-- '.$langs->trans('ClosedAll').' --'; + foreach ($object->statuts_short as $key2 => $val2) { + if ($key2 == Ticket::STATUS_CLOSED) { + $arrayofstatus['closeall'] = '-- '.$langs->trans('ClosedAll').' --'; + } $arrayofstatus[$key2] = $val2; } print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; //var_dump($arrayofstatus);var_dump($search['fk_statut']);var_dump(array_values($search[$key])); $selectedarray = null; - if ($search[$key]) $selectedarray = array_values($search[$key]); + if ($search[$key]) { + $selectedarray = array_values($search[$key]); + } print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth100 maxwidth150', 1, 0, '', '', ''); print '</td>'; } elseif ($key == "fk_soc") { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'"><input type="text" class="flat maxwidth75" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>'; - } elseif ($key == "datec" || $key == 'date_read' || $key == 'date_close'){ + } elseif ($key == "datec" || $key == 'date_read' || $key == 'date_close') { print '<td class="liste_titre center">'; print '<div class="nowrap">'; - switch ($key){ + switch ($key) { case 'datec': print $form->selectDate($search_date_start ?: -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); break; @@ -700,7 +813,7 @@ foreach ($object->fields as $key => $val) } print '</div>'; print '<div class="nowrap">'; - switch ($key){ + switch ($key) { case 'datec': print $form->selectDate($search_date_end ?: -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); break; @@ -712,13 +825,15 @@ foreach ($object->fields as $key => $val) } print '</div>'; print '</td>'; - } - else { + } else { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); - elseif (strpos($val['type'], 'integer:') === 0) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } print '</td>'; } } @@ -741,15 +856,18 @@ print '</tr>'."\n"; // Fields title label // -------------------------------------------------------------------- print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) -{ +foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['css']) ? '' : $val['css']); - if ($key == 'fk_statut' || $key == 'severity_code') $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'])) - { + if ($key == 'fk_statut' || $key == 'severity_code') { + $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'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, '', $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } } @@ -765,11 +883,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -779,70 +897,83 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co $i = 0; $totalarray = array(); $cacheofoutputfield = array(); -while ($i < min($num, $limit)) -{ +while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->id = $obj->rowid; - foreach ($object->fields as $key => $val) - { - if (property_exists($obj, $key)) $object->$key = $obj->$key; + foreach ($object->fields as $key => $val) { + if (property_exists($obj, $key)) { + $object->$key = $obj->$key; + } } $langs->load("ticket"); // Show here line of result print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) - { + foreach ($object->fields as $key => $val) { $cssforfield = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - if (in_array($key, array('ref', 'fk_project'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowraponall'; - if ($key == 'fk_statut' || $key == 'severity_code') $cssforfield .= ($cssforfield ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked'])) - { + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } + if (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } + if (in_array($key, array('ref', 'fk_project'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowraponall'; + } + if ($key == 'fk_statut' || $key == 'severity_code') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } + if (!empty($arrayfields['t.'.$key]['checked'])) { print '<td'; - if ($cssforfield || $val['css']) print ' class="'; + if ($cssforfield || $val['css']) { + print ' class="'; + } print $cssforfield; - if ($cssforfield && $val['css']) print ' '; + if ($cssforfield && $val['css']) { + print ' '; + } print $val['css']; - if ($cssforfield || $val['css']) print '"'; + if ($cssforfield || $val['css']) { + print '"'; + } print '>'; - if ($key == 'fk_statut') print $object->getLibStatut(5); - elseif ($key == 'subject') { + if ($key == 'fk_statut') { + print $object->getLibStatut(5); + } elseif ($key == 'subject') { $s = $obj->subject; print '<span title="'.$s.'">'; print $s; print '</span>'; - } - elseif ($key == 'type_code') { + } elseif ($key == 'type_code') { $s = $langs->getLabelFromKey($db, 'TicketTypeShort'.$object->type_code, 'c_ticket_type', 'code', 'label', $object->type_code); print '<span title="'.$s.'">'; print $s; print '</span>'; - } - elseif ($key == 'category_code') { + } elseif ($key == 'category_code') { $s = $langs->getLabelFromKey($db, 'TicketCategoryShort'.$object->category_code, 'c_ticket_category', 'code', 'label', $object->category_code); print '<span title="'.$s.'">'; print $s; print '</span>'; - } - elseif ($key == 'severity_code') { + } elseif ($key == 'severity_code') { $s = $langs->getLabelFromKey($db, 'TicketSeverityShort'.$object->severity_code, 'c_ticket_severity', 'code', 'label', $object->severity_code); print '<span title="'.$s.'">'; print $s; print '</span>'; - } - elseif ($key == 'tms') print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser'); - elseif ($key == 'fk_user_create') { + } elseif ($key == 'tms') { + print dol_print_date($db->jdate($obj->$key), 'dayhour', 'tzuser'); + } elseif ($key == 'fk_user_create') { if ($object->fk_user_create > 0) { $user_create->fetch($object->fk_user_create); print $user_create->getNomUrl(-1); } - } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); - else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ... + } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); + } else { // Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ... $tmp = explode(':', $val['type']); if ($tmp[0] == 'integer' && !empty($tmp[1]) && class_exists($tmp[1])) { // It is a type of an foreign field. We will try to reduce the number of fetch that the showOutputField is making. @@ -860,10 +991,13 @@ while ($i < min($num, $limit)) } print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) - { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } $totalarray['val']['t.'.$key] += $obj->$key; } } @@ -876,14 +1010,17 @@ while ($i < min($num, $limit)) print $hookmanager->resPrint; // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'; @@ -895,10 +1032,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } @@ -916,10 +1056,11 @@ print '</form>'."\n"; -if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) -{ +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + 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); diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 49f15412965..527b28c8fac 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -46,16 +46,21 @@ $sortorder = GETPOST("sortorder", 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $page = is_numeric($page) ? $page : 0; $page = $page == -1 ? 0 : $page; -if (!$sortfield) $sortfield = "a.datep,a.id"; -if (!$sortorder) $sortorder = "desc"; +if (!$sortfield) { + $sortfield = "a.datep,a.id"; +} +if (!$sortorder) { + $sortorder = "desc"; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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)); } @@ -82,8 +87,7 @@ if (!$user->rights->ticket->read) { accessforbidden(); } // restrict access for externals users -if ($user->socid > 0 && ($object->fk_soc != $user->socid)) -{ +if ($user->socid > 0 && ($object->fk_soc != $user->socid)) { accessforbidden(); } // or for unauthorized internals users @@ -99,17 +103,17 @@ if (!$user->socid && ($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY && $object- $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { // Set view style $_SESSION['ticket-view-type'] = "messaging"; } // 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 -{ +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 $actioncode = ''; $search_agenda_label = ''; } @@ -125,7 +129,9 @@ $userstat = new User($db); $formticket = new FormTicket($db); $title = $langs->trans("Ticket").' - '.$object->ref.' '.$object->name; -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/ticketnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/ticketnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); +} $help_url = 'FR:DocumentationModuleTicket'; llxHeader('', $title, $help_url); @@ -166,8 +172,7 @@ if (!empty($object->origin_email)) { } // Thirdparty -if (!empty($conf->societe->enabled)) -{ +if (!empty($conf->societe->enabled)) { $morehtmlref .= '<br>'.$langs->trans('ThirdParty'); /*if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) { $morehtmlref.='<a class="editfielda" href="' . $url_page_current . '?action=editcustomer&amp;track_id=' . $object->track_id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a>'; @@ -181,12 +186,10 @@ if (!empty($conf->societe->enabled)) } // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '<br>'.$langs->trans('Project'); - if ($user->rights->ticket->write) - { + if ($user->rights->ticket->write) { if ($action != 'classify') { //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>'; $morehtmlref .= ' : '; @@ -224,11 +227,14 @@ print dol_get_fiche_end(); print '<br>'; -if (!empty($object->id)) -{ +if (!empty($object->id)) { $param = '&id='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } $morehtmlright = ''; diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php index 045943bbfda..9f6e1cc5471 100644 --- a/htdocs/ticket/stats/index.php +++ b/htdocs/ticket/stats/index.php @@ -30,15 +30,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); -if (!$user->rights->ticket->read) accessforbidden(); +if (!$user->rights->ticket->read) { + accessforbidden(); +} $object_status = GETPOST('object_status', 'intcomma'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); // Security check -if ($user->socid > 0) -{ +if ($user->socid > 0) { $action = ''; $socid = $user->socid; } @@ -70,7 +71,9 @@ print load_fiche_titre($title, '', 'ticket'); dol_mkdir($dir); $stats = new TicketStats($db, $socid, ($userid > 0 ? $userid : 0)); -if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; +if ($object_status != '' && $object_status >= -1) { + $stats->where .= ' AND fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; +} // Build graphic number of object @@ -80,8 +83,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/ticketsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=ticketstats&file=ticketsnbinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -91,12 +93,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px1 = new DolGraph(); $mesg = $px1->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px1->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -119,8 +119,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear); //var_dump($data); // $data = array(array('Lib',val1,val2,val3),...) -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/ticketsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=ticketstats&file=ticketsamountinyear-'.$user->id.'-'.$year.'.png'; } else { @@ -130,12 +129,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px2->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -156,8 +153,7 @@ if (!$mesg) $data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear); -if (!$user->rights->societe->client->voir || $user->socid) -{ +if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/ticketsaverage-'.$user->id.'-'.$year.'.png'; $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=ticketstats&file=ticketsaverage-'.$user->id.'-'.$year.'.png'; } else { @@ -167,12 +163,10 @@ if (!$user->rights->societe->client->voir || $user->socid) $px3 = new DolGraph(); $mesg = $px3->isGraphKo(); -if (!$mesg) -{ +if (!$mesg) { $px3->SetData($data); $i = $startyear; $legend = array(); - while ($i <= $endyear) - { + while ($i <= $endyear) { $legend[] = $i; $i++; } @@ -200,7 +194,9 @@ foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } } -if (!count($arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!count($arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} $h = 0; $head = array(); @@ -239,8 +235,12 @@ print $form->selectarray('object_status', $liststatus, GETPOST('object_status', print '</td></tr>'; // Year print '<tr><td class="left">'.$langs->trans("Year").'</td><td class="left">'; -if (!in_array($year, $arrayyears)) $arrayyears[$year] = $year; -if (!in_array($nowyear, $arrayyears)) $arrayyears[$nowyear] = $nowyear; +if (!in_array($year, $arrayyears)) { + $arrayyears[$year] = $year; +} +if (!in_array($nowyear, $arrayyears)) { + $arrayyears[$nowyear] = $nowyear; +} arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print '</td></tr>'; @@ -263,11 +263,9 @@ print '<td class="right">%</td>'; print '</tr>'; $oldyear = 0; -foreach ($data as $val) -{ +foreach ($data as $val) { $year = $val['year']; - while (!empty($year) && $oldyear > $year + 1) - { // If we have empty year + while (!empty($year) && $oldyear > $year + 1) { // If we have empty year $oldyear--; print '<tr class="oddeven" height="24">'; @@ -303,7 +301,9 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; // Show graphs print '<table class="border centpercent"><tr class="pair nohover"><td class="center">'; -if ($mesg) { print $mesg; } else { +if ($mesg) { + print $mesg; +} else { print $px1->show(); print "<br>\n"; //print $px2->show(); diff --git a/htdocs/ticket/tpl/index.html b/htdocs/ticket/tpl/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/ticket/tpl/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/ticket/tpl/linkedobjectblock.tpl.php b/htdocs/ticket/tpl/linkedobjectblock.tpl.php index 572ffc0672f..17da4cd2db5 100644 --- a/htdocs/ticket/tpl/linkedobjectblock.tpl.php +++ b/htdocs/ticket/tpl/linkedobjectblock.tpl.php @@ -16,8 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ // 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; } @@ -38,52 +37,54 @@ $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'datec', 'desc', 0, 0, 1 $total = 0; $ilink = 0; -foreach ($linkedObjectBlock as $key => $objectlink) -{ +foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass = 'oddeven'; - if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) { + $trclass .= ' liste_sub_total'; + } ?> - <tr class="<?php echo $trclass; ?>" > - <td class="linkedcol-element" ><?php echo $langs->trans("Ticket"); ?> - <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; ?> - </td> - <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td> - <td class="linkedcol-ref center"><?php echo $objectlink->ref_client; ?></td> - <td class="linkedcol-date center"><?php echo dol_print_date($objectlink->datec, 'day'); ?></td> - <?php + <tr class="<?php echo $trclass; ?>" > + <td class="linkedcol-element" ><?php echo $langs->trans("Ticket"); ?> + <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { + print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; + } ?> + </td> + <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td> + <td class="linkedcol-ref center"><?php echo $objectlink->ref_client; ?></td> + <td class="linkedcol-date center"><?php echo dol_print_date($objectlink->datec, 'day'); ?></td> + <?php //$objectlink->socid = $objectlink->fk_soc; //$objectlink->fetch_thirdparty(); ?> - <td class="linkedcol-amount right"><?php //echo $objectlink->thirdparty->getNomUrl(1); ?></td> - <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td class="linkedcol-action right"> - <?php + <td class="linkedcol-amount right"><?php //echo $objectlink->thirdparty->getNomUrl(1); ?></td> + <td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td> + <td class="linkedcol-action right"> + <?php // For now, shipments must stay linked to order, so link is not deletable if ($object->element != 'shipping') { ?> - <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> - <?php + <a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a> + <?php } ?> - </td> + </td> </tr> <?php } -if (count($linkedObjectBlock) > 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> - <td><?php echo $langs->trans("Total"); ?></td> - <td></td> - <td class="center"></td> - <td class="center"></td> - <td class="right"><?php echo price($total); ?></td> - <td class="right"></td> - <td class="right"></td> - </tr> - <?php + <tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter) ? 'liste_sub_total' : ''); ?>"> + <td><?php echo $langs->trans("Total"); ?></td> + <td></td> + <td class="center"></td> + <td class="center"></td> + <td class="right"><?php echo price($total); ?></td> + <td class="right"></td> + <td class="right"></td> + </tr> + <?php } print "<!-- END PHP TEMPLATE -->\n"; diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php index fd71d43d4f0..b258f991a47 100644 --- a/htdocs/user/admin/group_extrafields.php +++ b/htdocs/user/admin/group_extrafields.php @@ -38,13 +38,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'usergroup'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -79,35 +83,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; 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)) -{ +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/user/admin/index.html b/htdocs/user/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php index 45d645ce3dd..7e22a1c7122 100644 --- a/htdocs/user/admin/user_extrafields.php +++ b/htdocs/user/admin/user_extrafields.php @@ -37,13 +37,17 @@ $form = new Form($db); // List of supported format $tmptype2label = ExtraFields::$type2label; $type2label = array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} $action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'user'; //Must be the $table_element of the class that manage extrafield -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} /* @@ -78,35 +82,22 @@ print dol_get_fiche_end(); // Buttons -if ($action != 'create' && $action != 'edit') -{ +if ($action != 'create' && $action != 'edit') { print '<div class="tabsAction">'; print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>"; print "</div>"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ +// Creation of an optional field +if ($action == 'create') { print '<br><div id="newattrib"></div>'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Editing an optional field */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && !empty($attrname)) -{ +// Editing an optional field +if ($action == 'edit' && !empty($attrname)) { print "<br>"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 8d320a839ef..3faf6dc770c 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -41,7 +41,9 @@ $actiontest = GETPOST('test', 'alpha'); $actionsave = GETPOST('save', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'useragenda'; // To manage different context of search -if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5; +if (empty($conf->global->AGENDA_EXT_NB)) { + $conf->global->AGENDA_EXT_NB = 5; +} $MAXAGENDA = $conf->global->AGENDA_EXT_NB; // List of available colors @@ -55,14 +57,17 @@ $object->getrights(); // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop -if (($object->id != $user->id) && (!$user->rights->user->user->lire)) - accessforbidden(); +if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { + accessforbidden(); +} // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('usercard', 'useragenda', 'globalcard')); @@ -73,7 +78,9 @@ $hookmanager->initHooks(array('usercard', 'useragenda', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($actionsave) { @@ -167,8 +174,12 @@ print '<br>'; print '<span class="opacitymedium">'.$langs->trans("AgendaExtSitesDesc")."</span><br>\n"; print "<br>\n"; -$selectedvalue = $conf->global->AGENDA_DISABLE_EXT; -if ($selectedvalue == 1) $selectedvalue = 0; else $selectedvalue = 1; +$selectedvalue = empty($conf->global->AGENDA_DISABLE_EXT) ? 0 : $conf->global->AGENDA_DISABLE_EXT; +if ($selectedvalue == 1) { + $selectedvalue = 0; +} else { + $selectedvalue = 1; +} print '<div class="div-table-responsive">'; @@ -183,28 +194,30 @@ print '<td class="right">'.$langs->trans("Color").'</td>'; print "</tr>"; $i = 1; -while ($i <= $MAXAGENDA) -{ +while ($i <= $MAXAGENDA) { $key = $i; $name = 'AGENDA_EXT_NAME_'.$id.'_'.$key; $src = 'AGENDA_EXT_SRC_'.$id.'_'.$key; $offsettz = 'AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key; $color = 'AGENDA_EXT_COLOR_'.$id.'_'.$key; - print '<tr class="oddeven">'; // Nb print '<td class="maxwidth50onsmartphone">'.$langs->trans("AgendaExtNb", $key)."</td>"; // Name - print '<td class="maxwidth50onsmartphone"><input type="text" class="flat hideifnotset minwidth100" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'.(GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) : $object->conf->$name).'"></td>'; + $name_value = (GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) : (empty($object->conf->$name) ? '' : $object->conf->$name)); + print '<td class="maxwidth50onsmartphone"><input type="text" class="flat hideifnotset minwidth100" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'.$name_value.'"></td>'; // URL - print '<td class="maxwidth50onsmartphone"><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'.(GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) : $object->conf->$src).'"></td>'; + $src_value = (GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) : (empty($object->conf->$src) ? '' : $object->conf->$src)); + print '<td class="maxwidth50onsmartphone"><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'.$src_value.'"></td>'; // Offset TZ - print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key.'" value="'.(GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) : $object->conf->$offsettz).'" size="1"></td>'; + $offsettz_value = (GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) : (empty($object->conf->$offsettz) ? 0 : $object->conf->$offsettz)); + print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key.'" value="'.$offsettz_value.'" size="1"></td>'; // Color (Possible colors are limited by Google) print '<td class="nowrap right">'; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : $object->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); + $color_value = (GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : (empty($object->conf->$color) ? 'ffffff' : $object->conf->$color)); + print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); print '</td>'; print "</tr>"; $i++; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 20369e37d69..356e23a5de0 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -6,6 +6,7 @@ * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> * Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> + * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,9 +33,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/userbankaccount.class.php'; -if (!empty($conf->holiday->enabled)) require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; -if (!empty($conf->expensereport->enabled)) require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; -if (!empty($conf->salaries->enabled)) require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +if (!empty($conf->holiday->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; +} +if (!empty($conf->expensereport->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +} +if (!empty($conf->salaries->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php'; + require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php'; +} // Load translation files required by page $langs->loadLangs(array('companies', 'commercial', 'banks', 'bills', 'trips', 'holiday', 'salaries')); @@ -47,35 +55,44 @@ $cancel = GETPOST('cancel', 'alpha'); // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); // Ok if user->rights->salaries->read or user->rights->hrm->read //$result = restrictedArea($user, 'salaries|hrm', $id, 'user&user', $feature2); $ok = false; -if ($user->id == $id) $ok = true; // A user can always read its own card -if (!empty($user->rights->salaries->read)) $ok = true; -if (!empty($user->rights->hrm->read)) $ok = true; -if (!empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) $ok = true; -if (!$ok) -{ +if ($user->id == $id) { + $ok = true; // A user can always read its own card +} +if (!empty($user->rights->salaries->read)) { + $ok = true; +} +if (!empty($user->rights->hrm->read)) { + $ok = true; +} +if (!empty($user->rights->expensereport->lire) && ($user->id == $object->id || $user->rights->expensereport->readall)) { + $ok = true; +} +if (!$ok) { accessforbidden(); } $object = new User($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); $object->getrights(); } $account = new UserBankAccount($db); -if (!$bankid) -{ +if (!$bankid) { $account->fetch(0, '', $id); } else { $account->fetch($bankid); } -if (empty($account->userid)) $account->userid = $object->id; +if (empty($account->userid)) { + $account->userid = $object->id; +} $permissiontoaddbankaccount = (!empty($user->rights->salaries->write) || !empty($user->rights->hrm->employee->write) || !empty($user->rights->user->creer)); @@ -84,8 +101,7 @@ $permissiontoaddbankaccount = (!empty($user->rights->salaries->write) || !empty( * Actions */ -if ($action == 'add' && !$cancel) -{ +if ($action == 'add' && !$cancel) { $account->userid = $object->id; $account->bank = GETPOST('bank', 'alpha'); @@ -103,8 +119,7 @@ if ($action == 'add' && !$cancel) $result = $account->create($user); - if (!$result) - { + if (!$result) { setEventMessages($account->error, $account->errors, 'errors'); $action = 'edit'; // Force chargement page edition } else { @@ -113,52 +128,51 @@ if ($action == 'add' && !$cancel) } } -if ($action == 'update' && !$cancel) -{ +if ($action == 'update' && !$cancel) { $account->userid = $object->id; /* - if ($action == 'update' && !$cancel) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if ($action == 'update' && !$cancel) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if ($canedituser) // Case we can edit all field - { - $error = 0; + if ($canedituser) // Case we can edit all field + { + $error = 0; - if (!$error) - { - $objectuser->fetch($id); + if (!$error) + { + $objectuser->fetch($id); - $objectuser->oldcopy = clone $objectuser; + $objectuser->oldcopy = clone $objectuser; - $db->begin(); + $db->begin(); - $objectuser->default_range = GETPOST('default_range'); - $objectuser->default_c_exp_tax_cat = GETPOST('default_c_exp_tax_cat'); + $objectuser->default_range = GETPOST('default_range'); + $objectuser->default_c_exp_tax_cat = GETPOST('default_c_exp_tax_cat'); - if (!$error) { - $ret = $objectuser->update($user); - if ($ret < 0) { - $error++; - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - $langs->load("errors"); - setEventMessages($langs->trans("ErrorLoginAlreadyExists", $objectuser->login), null, 'errors'); - } else { - setEventMessages($objectuser->error, $objectuser->errors, 'errors'); - } - } - } + if (!$error) { + $ret = $objectuser->update($user); + if ($ret < 0) { + $error++; + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorLoginAlreadyExists", $objectuser->login), null, 'errors'); + } else { + setEventMessages($objectuser->error, $objectuser->errors, 'errors'); + } + } + } - if (!$error && !count($objectuser->errors)) { - setEventMessages($langs->trans("UserModified"), null, 'mesgs'); - $db->commit(); - } else { - $db->rollback(); - } - } - } - }*/ + if (!$error && !count($objectuser->errors)) { + setEventMessages($langs->trans("UserModified"), null, 'mesgs'); + $db->commit(); + } else { + $db->rollback(); + } + } + } + }*/ $account->bank = GETPOST('bank', 'alpha'); $account->label = GETPOST('label', 'alpha'); @@ -188,28 +202,36 @@ if ($action == 'update' && !$cancel) if ($action == 'setpersonal_email') { $object->personal_email = (string) GETPOST('personal_email', 'alphanohtml'); $result = $object->update($user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // update personal mobile if ($action == 'setpersonal_mobile') { $object->personal_mobile = (string) GETPOST('personal_mobile', 'alphanohtml'); $result = $object->update($user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // update default_c_exp_tax_cat if ($action == 'setdefault_c_exp_tax_cat') { $object->default_c_exp_tax_cat = GETPOST('default_c_exp_tax_cat', 'int'); $result = $object->update($user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // update default range if ($action == 'setdefault_range') { $object->default_range = GETPOST('default_range', 'int'); $result = $object->update($user); - if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } @@ -226,16 +248,14 @@ llxHeader(null, $langs->trans("BankAccounts")); $head = user_prepare_head($object); -if ($id && $bankid && $action == 'edit' && $user->rights->user->user->creer) -{ +if ($id && $bankid && $action == 'edit' && $user->rights->user->user->creer) { print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="'.GETPOST("id", 'int').'">'; print '<input type="hidden" name="bankid" value="'.$bankid.'">'; } -if ($id && $action == 'create' && $user->rights->user->user->creer) -{ +if ($id && $action == 'create' && $user->rights->user->user->creer) { print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; @@ -244,8 +264,7 @@ if ($id && $action == 'create' && $user->rights->user->user->creer) // View -if ($action != 'edit' && $action != 'create') // If not bank account yet, $account may be empty -{ +if ($action != 'edit' && $action != 'create') { // If not bank account yet, $account may be empty $title = $langs->trans("User"); print dol_get_fiche_head($head, 'bank', $title, -1, 'user'); @@ -283,8 +302,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco print '</td>'; print '</tr>'; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) - { + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) { print '<tr class="nowrap">'; print '<td>'; print $form->editfieldkey("DefaultCategoryCar", 'default_c_exp_tax_cat', $object->default_c_exp_tax_cat, $object, $user->rights->user->user->creer); @@ -337,51 +355,63 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco // Latest payments of salaries if (!empty($conf->salaries->enabled) && - $user->rights->salaries->read && (in_array($object->id, $childids) || $object->id == $user->id) - ) - { - $salary = new PaymentSalary($db); + (($user->rights->salaries->read && (in_array($object->id, $childids) || $object->id == $user->id)) || (!empty($user->rights->salaries->readall))) + ) { + $payment_salary = new PaymentSalary($db); + $salary = new Salary($db); - $sql = "SELECT ps.rowid, ps.datesp, ps.dateep, ps.amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as ps"; - $sql .= " WHERE ps.fk_user = ".$object->id; - $sql .= " AND ps.entity = ".$conf->entity; - $sql .= " ORDER BY ps.datesp DESC"; + $sql = "SELECT s.rowid as sid, s.ref as sref, s.label, s.datesp, s.dateep, s.paye, SUM(ps.amount) as alreadypaid"; + $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON (s.rowid = ps.fk_salary)"; + $sql .= " WHERE s.fk_user = ".$object->id; + $sql .= " AND s.entity IN (".getEntity('salary').")"; + $sql .= " GROUP BY s.rowid, s.ref, s.label, s.datesp, s.dateep, s.paye"; + $sql .= " ORDER BY s.dateep DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; - print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/salaries/list.php?search_user='.$object->login.'">'.$langs->trans("AllSalaries").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; - print '</tr></table></td>'; - print '</tr>'; + print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/salaries/list.php?search_user='.$object->login.'">'.$langs->trans("AllSalaries").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; + print '</tr></table></td>'; + print '</tr>'; $i = 0; - while ($i < $num && $i < $MAXLIST) - { + while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); + $payment_salary->id = $objp->rowid; + $payment_salary->ref = $objp->ref; + $payment_salary->datep = $db->jdate($objp->datep); + + $salary->id = $objp->sid; + $salary->ref = $objp->sref ? $objp->sref : $objp->sid; + $salary->label = $objp->label; + $salary->datesp = $db->jdate($objp->datesp); + $salary->dateep = $db->jdate($objp->dateep); + $salary->paye = $objp->paye; + print '<tr class="oddeven">'; print '<td class="nowraponall">'; - $salary->id = $objp->rowid; - $salary->ref = $objp->rowid; print $salary->getNomUrl(1); print '</td>'; print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->datesp), 'day')."</td>\n"; print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dateep), 'day')."</td>\n"; - print '<td class="right" style="min-width: 60px">'.price($objp->amount).'</td>'; + //print '<td class="right" class="nowraponall"><span class="ampount">'.price($objp->amount).'</span></td>'; + print '<td class="right" class="nowraponall">'.$salary->getLibStatut(5, $objp->alreadypaid).'</td>'; print '</tr>'; $i++; } $db->free($resql); - if ($num <= 0) print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + if ($num <= 0) { + print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + } print "</table>"; } else { dol_print_error($db); @@ -393,8 +423,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco */ if (!empty($conf->holiday->enabled) && ($user->rights->holiday->readall || ($user->rights->holiday->read && $object->id == $user->id)) - ) - { + ) { $holiday = new Holiday($db); $sql = "SELECT h.rowid, h.statut as status, h.fk_type, h.date_debut, h.date_fin, h.halfday"; @@ -404,20 +433,18 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco $sql .= " ORDER BY h.date_debut DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; - print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastHolidays", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$object->id.'">'.$langs->trans("AllHolidays").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; - print '</tr></table></td>'; - print '</tr>'; + print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastHolidays", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$object->id.'">'.$langs->trans("AllHolidays").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; + print '</tr></table></td>'; + print '</tr>'; $i = 0; - while ($i < $num && $i < $MAXLIST) - { + while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); $holiday->id = $objp->rowid; @@ -436,7 +463,9 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco } $db->free($resql); - if ($num <= 0) print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + if ($num <= 0) { + print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + } print "</table>"; } else { dol_print_error($db); @@ -448,8 +477,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco */ if (!empty($conf->expensereport->enabled) && ($user->rights->expensereport->readall || ($user->rights->expensereport->lire && $object->id == $user->id)) - ) - { + ) { $exp = new ExpenseReport($db); $sql = "SELECT e.rowid, e.ref, e.fk_statut as status, e.date_debut, e.total_ttc"; @@ -459,20 +487,18 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco $sql .= " ORDER BY e.date_debut DESC"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; - print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastExpenseReports", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expensereport/list.php?id='.$object->id.'">'.$langs->trans("AllExpenseReports").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; - print '</tr></table></td>'; - print '</tr>'; + print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastExpenseReports", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expensereport/list.php?id='.$object->id.'">'.$langs->trans("AllExpenseReports").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>'; + print '</tr></table></td>'; + print '</tr>'; $i = 0; - while ($i < $num && $i < $MAXLIST) - { + while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); $exp->id = $objp->rowid; @@ -490,7 +516,9 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco } $db->free($resql); - if ($num <= 0) print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + if ($num <= 0) { + print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>'; + } print "</table>"; } else { dol_print_error($db); @@ -589,8 +617,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco } - if ($account->id == 0) - { + if ($account->id == 0) { $colspan = 6; print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoBANRecord").'</td></tr>'; } @@ -600,8 +627,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco } // Edit -if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->user->creer) -{ +if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->user->creer) { $title = $langs->trans("User"); print dol_get_fiche_head($head, 'bank', $title, 0, 'user'); @@ -679,9 +705,13 @@ if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->us print '</div>'; } -if ($id && $action == 'edit' && $user->rights->user->user->creer) print '</form>'; +if ($id && $action == 'edit' && $user->rights->user->user->creer) { + print '</form>'; +} -if ($id && $action == 'create' && $user->rights->user->user->creer) print '</form>'; +if ($id && $action == 'create' && $user->rights->user->user->creer) { + print '</form>'; +} // End of page llxFooter(); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index c5820db60b7..b1a9a229827 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -13,7 +13,7 @@ * Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com> * Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> - * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 David Beniamine <David.Beniamine@Tetras-Libre.fr> * * This program is free software; you can redistribute it and/or modify @@ -48,10 +48,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; 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.'/core/lib/security2.lib.php'; -if (!empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; -if (!empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; -if (!empty($conf->stock->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +if (!empty($conf->ldap->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; +} +if (!empty($conf->adherent->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +} +if (!empty($conf->categorie->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +} +if (!empty($conf->stock->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +} $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); @@ -74,16 +82,14 @@ $canedituser = (!empty($user->admin) || $user->rights->user->user->creer); $candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); } // Define value to know what current user can do on properties of edited user -if ($id) -{ - // $user est le user qui edite, $id est l'id de l'utilisateur edite +if ($id) { + // $user is the current logged user, $id is the user we want to edit $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) || (($user->id != $id) && $user->rights->user->user->creer)); $caneditpassword = ((($user->id == $id) && $user->rights->user->self->password) @@ -92,11 +98,15 @@ if ($id) // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = 'user'; $result = restrictedArea($user, 'user', $id, 'user', $feature2); -if ($user->id <> $id && !$canreaduser) accessforbidden(); +if ($user->id <> $id && !$canreaduser) { + accessforbidden(); +} // Load translation files required by page $langs->loadLangs(array('users', 'companies', 'ldap', 'admin', 'hrm', 'stocks')); @@ -112,6 +122,7 @@ $socialnetworks = getArrayOfSocialNetworks(); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('usercard', 'globalcard')); +$error = 0; /** @@ -120,15 +131,23 @@ $hookmanager->initHooks(array('usercard', 'globalcard')); $parameters = array('id' => $id, 'socid' => $socid, 'group' => $group, 'caneditgroup' => $caneditgroup); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'confirm_disable' && $confirm == "yes" && $candisableuser) { - if ($id <> $user->id) { + if ($id <> $user->id) { // A user can't disable itself $object->fetch($id); - $object->setstatus(0); - header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); - exit; + if ($object->admin && empty($user->admin)) { + // If user to delete is an admin user and if logged user is not admin, we deny the operation. + $error++; + setEventMessages($langs->trans("OnlyAdminUsersCanDisableAdminUsers"), null, 'errors'); + } else { + $object->setstatus(0); + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); + exit; + } } } if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) { @@ -153,12 +172,9 @@ if (empty($reshook)) { } } - if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) - { - if ($id <> $user->id) - { - if (!GETPOSTISSET('token')) - { + if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) { + if ($id <> $user->id) { + if (!GETPOSTISSET('token')) { print 'Error, token required for this critical operation'; exit; } @@ -183,12 +199,12 @@ if (empty($reshook)) { if ($action == 'add' && $canadduser) { $error = 0; - if (!$_POST["lastname"]) { + if (!GETPOST("lastname")) { $error++; setEventMessages($langs->trans("NameNotDefined"), null, 'errors'); $action = "create"; // Go back to create page } - if (!$_POST["login"]) { + if (!GETPOST("login")) { $error++; setEventMessages($langs->trans("LoginNotDefined"), null, 'errors'); $action = "create"; // Go back to create page @@ -315,10 +331,8 @@ if (empty($reshook)) { } // Action add usergroup - if (($action == 'addgroup' || $action == 'removegroup') && $caneditgroup) - { - if ($group) - { + if (($action == 'addgroup' || $action == 'removegroup') && $caneditgroup) { + if ($group) { $editgroup = new UserGroup($db); $editgroup->fetch($group); $editgroup->oldcopy = clone $editgroup; @@ -340,12 +354,10 @@ if (empty($reshook)) { } } - if ($action == 'update' && !$cancel) - { + if ($action == 'update' && !$cancel) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if ($caneditfield) // Case we can edit all field - { + if ($caneditfield) { // Case we can edit all field $error = 0; if (!GETPOST("lastname", 'alpha')) { @@ -359,8 +371,7 @@ if (empty($reshook)) { $error++; } - if (!$error) - { + if (!$error) { $object->fetch($id); $object->oldcopy = clone $object; @@ -374,7 +385,9 @@ if (empty($reshook)) { $object->gender = GETPOST("gender", 'aZ09'); $object->pass = GETPOST("password", 'none'); $object->api_key = (GETPOST("api_key", 'alphanohtml')) ? GETPOST("api_key", 'alphanohtml') : $object->api_key; - if (!empty($user->admin)) $object->admin = GETPOST("admin", "int"); // admin flag can only be set/unset by an admin user. A test is also done later when forging sql request + if (!empty($user->admin)) { + $object->admin = GETPOST("admin", "int"); // admin flag can only be set/unset by an admin user. A test is also done later when forging sql request + } $object->address = GETPOST('address', 'alphanohtml'); $object->zip = GETPOST('zipcode', 'alphanohtml'); $object->town = GETPOST('town', 'alphanohtml'); @@ -421,20 +434,16 @@ if (empty($reshook)) { $object->dateendvalidity = $dateendvalidity; $object->birth = $dateofbirth; - if (!empty($conf->stock->enabled)) - { + if (!empty($conf->stock->enabled)) { $object->fk_warehouse = GETPOST('fk_warehouse', 'int'); } $object->lang = GETPOST('default_lang', 'aZ09'); - if (!empty($conf->multicompany->enabled)) - { - if (!empty($_POST["superadmin"])) - { + if (!empty($conf->multicompany->enabled)) { + if (GETPOST("superadmin")) { $object->entity = 0; - } elseif (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { + } elseif (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->entity = 1; // all users in master entity } else { $object->entity = (!GETPOST('entity', 'int') ? 0 : GETPOST('entity', 'int')); @@ -452,11 +461,9 @@ if (empty($reshook)) { if (GETPOST('deletephoto')) { $object->photo = ''; } - if (!empty($_FILES['photo']['name'])) - { + if (!empty($_FILES['photo']['name'])) { $isimage = image_format_supported($_FILES['photo']['name']); - if ($isimage > 0) - { + if ($isimage > 0) { $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); } else { $error++; @@ -541,8 +548,7 @@ if (empty($reshook)) { } } - if (!$error && !count($object->errors)) - { + if (!$error && !count($object->errors)) { // Then we add the associated categories $categories = GETPOST('usercats', 'array'); $object->setCategories($categories); @@ -553,8 +559,7 @@ if (empty($reshook)) { $db->commit(); $login = $_SESSION["dol_login"]; - if ($login && $login == $object->oldcopy->login && $object->oldcopy->login != $object->login) // Current user has changed its login - { + if ($login && $login == $object->oldcopy->login && $object->oldcopy->login != $object->login) { // Current user has changed its login $error++; $langs->load("errors"); setEventMessages($langs->transnoentitiesnoconv("WarningYourLoginWasModifiedPleaseLogin"), null, 'warnings'); @@ -564,8 +569,7 @@ if (empty($reshook)) { } } } else { - if ($caneditpassword) // Case we can edit only password - { + if ($caneditpassword) { // Case we can edit only password dol_syslog("Not allowed to change fields, only password"); $object->fetch($id); @@ -574,8 +578,7 @@ if (empty($reshook)) { $object->oldcopy = clone $object; $ret = $object->setPassword($user, GETPOST("password", "none")); - if ($ret < 0) - { + if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -596,8 +599,7 @@ if (empty($reshook)) { } else { // Succes if ($action == 'confirm_passwordsend' && $confirm == 'yes') { - if ($object->send_password($user, $newpassword) > 0) - { + if ($object->send_password($user, $newpassword) > 0) { setEventMessages($langs->trans("PasswordChangedAndSentTo", $object->email), null, 'mesgs'); } else { setEventMessages($object->error, $object->errors, 'errors'); @@ -686,25 +688,24 @@ $formother = new FormOther($db); $formcompany = new FormCompany($db); $formadmin = new FormAdmin($db); $formfile = new FormFile($db); -if (!empty($conf->stock->enabled)) $formproduct = new FormProduct($db); +if (!empty($conf->stock->enabled)) { + $formproduct = new FormProduct($db); +} llxHeader('', $langs->trans("UserCard")); -if ($action == 'create' || $action == 'adduserldap') -{ +if ($action == 'create' || $action == 'adduserldap') { print load_fiche_titre($langs->trans("NewUser"), '', 'user'); print '<span class="opacitymedium">'.$langs->trans("CreateInternalUserDesc")."</span><br>\n"; print "<br>"; - if (!empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr')) - { + if (!empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr')) { // Show form to add an account from LDAP if sync LDAP -> Dolibarr is set $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result >= 0) - { + if ($result >= 0) { $required_fields = array( $conf->global->LDAP_KEY_USERS, $conf->global->LDAP_FIELD_FULLNAME, @@ -730,21 +731,17 @@ if ($action == 'create' || $action == 'adduserldap') // Get from LDAP database an array of results $ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 1); - if (is_array($ldapusers)) - { + if (is_array($ldapusers)) { $liste = array(); - foreach ($ldapusers as $key => $ldapuser) - { + foreach ($ldapusers as $key => $ldapuser) { // Define the label string for this user $label = ''; - foreach ($required_fields as $value) - { - if ($value === $conf->global->LDAP_FIELD_PASSWORD || $value === $conf->global->LDAP_FIELD_PASSWORD_CRYPTED) - { - $label .= $value."=******* "; - } elseif ($value) { - $label .= $value."=".$ldapuser[$value]." "; - } + foreach ($required_fields as $value) { + if ($value === $conf->global->LDAP_FIELD_PASSWORD || $value === $conf->global->LDAP_FIELD_PASSWORD_CRYPTED) { + $label .= $value."=******* "; + } elseif ($value) { + $label .= $value."=".$ldapuser[$value]." "; + } } $liste[$key] = $label; } @@ -756,35 +753,36 @@ if ($action == 'create' || $action == 'adduserldap') } // If user list is full, we show drop-down list - print "\n\n<!-- Form liste LDAP debut -->\n"; + print "\n\n<!-- Form liste LDAP debut -->\n"; - print '<form name="add_user_ldap" action="'.$_SERVER["PHP_SELF"].'" method="post">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<table class="border centpercent"><tr>'; - print '<td width="160">'; - print $langs->trans("LDAPUsers"); - print '</td>'; - print '<td>'; - print '<input type="hidden" name="action" value="adduserldap">'; - if (is_array($liste) && count($liste)) - { + print '<form name="add_user_ldap" action="'.$_SERVER["PHP_SELF"].'" method="post">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<table class="border centpercent"><tr>'; + print '<td width="160">'; + print $langs->trans("LDAPUsers"); + print '</td>'; + print '<td>'; + print '<input type="hidden" name="action" value="adduserldap">'; + if (is_array($liste) && count($liste)) { print $form->selectarray('users', $liste, '', 1, 0, 0, '', 0, 0, 0, '', 'maxwidth500'); print ajax_combobox('users'); } - print '</td><td class="center">'; - print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Get')).'"'.(count($liste) ? '' : ' disabled').'>'; - print '</td></tr></table>'; - print '</form>'; + print '</td><td class="center">'; + print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Get')).'"'.(count($liste) ? '' : ' disabled').'>'; + print '</td></tr></table>'; + print '</form>'; - print "\n<!-- Form liste LDAP fin -->\n\n"; - print '<br>'; + print "\n<!-- Form liste LDAP fin -->\n\n"; + print '<br>'; } print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="createuser">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - if (!empty($ldap_sid)) print '<input type="hidden" name="ldap_sid" value="'.dol_escape_htmltag($ldap_sid).'">'; + if (!empty($ldap_sid)) { + print '<input type="hidden" name="ldap_sid" value="'.dol_escape_htmltag($ldap_sid).'">'; + } print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; print dol_get_fiche_head('', '', '', 0, ''); @@ -802,8 +800,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr>'; print '<td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>'; print '<td>'; - if (!empty($ldap_lastname)) - { + if (!empty($ldap_lastname)) { print '<input type="hidden" id="lastname" name="lastname" value="'.dol_escape_htmltag($ldap_lastname).'">'; print $ldap_lastname; } else { @@ -814,8 +811,7 @@ if ($action == 'create' || $action == 'adduserldap') // Firstname print '<tr><td>'.$langs->trans("Firstname").'</td>'; print '<td>'; - if (!empty($ldap_firstname)) - { + if (!empty($ldap_firstname)) { print '<input type="hidden" name="firstname" value="'.dol_escape_htmltag($ldap_firstname).'">'; print $ldap_firstname; } else { @@ -826,12 +822,10 @@ if ($action == 'create' || $action == 'adduserldap') // Login print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td>'; print '<td>'; - if (!empty($ldap_login)) - { + if (!empty($ldap_login)) { print '<input type="hidden" name="login" value="'.dol_escape_htmltag($ldap_login).'">'; print $ldap_login; - } elseif (!empty($ldap_loginsmb)) - { + } elseif (!empty($ldap_loginsmb)) { print '<input type="hidden" name="login" value="'.dol_escape_htmltag($ldap_loginsmb).'">'; print $ldap_loginsmb; } else { @@ -840,72 +834,19 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; $generated_password = ''; - if (empty($ldap_sid)) // ldap_sid is for activedirectory - { + if (empty($ldap_sid)) { // ldap_sid is for activedirectory $generated_password = getRandomPassword(false); } $password = (GETPOSTISSET('password') ?GETPOST('password') : $generated_password); - // Password - print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td>'; - print '<td>'; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { - $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP"); - } - if (preg_match('/http/', $dolibarr_main_authentication)) - { - $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("HTTPBasicPassword"); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) - { - if (!empty($ldap_pass)) // For very old system comaptibilty. Now clear password can't be viewed from LDAP read - { - $valuetoshow .= ($valuetoshow ? ', ' : '').'<input type="hidden" name="password" value="'.$ldap_pass.'">'; // Dolibarr password is preffiled with LDAP known password - $valuetoshow .= preg_replace('/./i', '*', $ldap_pass); - } else { - // We do not use a field password but a field text to show new password to use. - $valuetoshow .= ($valuetoshow ? ', ' : '').'<input size="30" maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="new-password">'; - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) $valuetoshow = $hookmanager->resPrint; // to replace - else $valuetoshow .= $hookmanager->resPrint; // to add - - print $valuetoshow; - print '</td></tr>'; - - if (!empty($conf->api->enabled)) - { - // API key - //$generated_password = getRandomPassword(false); - print '<tr><td>'.$langs->trans("ApiKey").'</td>'; - print '<td>'; - print '<input size="30" maxsize="32" type="text" id="api_key" name="api_key" value="'.GETPOST('api_key', 'alphanohtml').'" autocomplete="off">'; - if (!empty($conf->use_javascript_ajax)) - print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); - print '</td></tr>'; - } else { - // PARTIAL WORKAROUND - $generated_fake_api_key = getRandomPassword(false); - print '<input type="hidden" name="api_key" value="'.$generated_fake_api_key.'">'; - } - // Administrator - if (!empty($user->admin)) - { + if (!empty($user->admin)) { print '<tr><td>'.$langs->trans("Administrator").'</td>'; print '<td>'; print $form->selectyesno('admin', GETPOST('admin'), 1); - if (!empty($conf->multicompany->enabled) && !$user->entity) - { - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->multicompany->enabled) && !$user->entity) { + if (!empty($conf->use_javascript_ajax)) { print '<script type="text/javascript"> $(function() { $("select[name=admin]").change(function() { @@ -934,7 +875,7 @@ if ($action == 'create' || $action == 'adduserldap') } $checked = (GETPOST('superadmin', 'int') ? ' checked' : ''); $disabled = (GETPOST('superadmin', 'int') ? '' : ' disabled'); - print '<input type="checkbox" name="superadmin" value="1"'.$checked.$disabled.' /> '.$langs->trans("SuperAdministrator"); + print '<input type="checkbox" name="superadmin" id="superadmin" value="1"'.$checked.$disabled.' /> <label for="superadmin">'.$langs->trans("SuperAdministrator").'</span>'; } print "</td></tr>\n"; } @@ -947,10 +888,11 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; // Employee - $defaultemployee = 1; + $defaultemployee = '1'; print '<tr>'; print '<td>'.$langs->trans('Employee').'</td><td>'; - print $form->selectyesno("employee", (GETPOST('employee') != '' ?GETPOST('employee') : $defaultemployee), 1); + print '<input type="checkbox" name="employee" value="1"'.(GETPOST('employee') == '1' ? ' checked="checked"' : ($defaultemployee ? ' checked="checked"' : '')).'>'; + //print $form->selectyesno("employee", (GETPOST('employee') != '' ?GETPOST('employee') : $defaultemployee), 1); print '</td></tr>'; // Hierarchy @@ -961,8 +903,7 @@ if ($action == 'create' || $action == 'adduserldap') print "</tr>\n"; // Expense report validator - if (!empty($conf->expensereport->enabled)) - { + if (!empty($conf->expensereport->enabled)) { print '<tr><td class="titlefieldcreate">'; $text = $langs->trans("ForceUserExpenseValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); @@ -974,8 +915,7 @@ if ($action == 'create' || $action == 'adduserldap') } // Holiday request validator - if (!empty($conf->holiday->enabled)) - { + if (!empty($conf->holiday->enabled)) { print '<tr><td class="titlefieldcreate">'; $text = $langs->trans("ForceUserHolidayValidator"); print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); @@ -992,6 +932,70 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); print '</td></tr>'; + + print '</table><hr><table class="border centpercent">'; + + + // Date validity + print '<tr><td class="titlefieldcreate">'.$langs->trans("RangeOfLoginValidity").'</td>'; + print '<td>'; + print $form->selectDate($datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); + + print ' &nbsp; '; + + print $form->selectDate($dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); + print '</td>'; + print "</tr>\n"; + + // Password + print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td>'; + print '<td>'; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP"); + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("HTTPBasicPassword"); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if (!empty($ldap_pass)) { // For very old system comaptibilty. Now clear password can't be viewed from LDAP read + $valuetoshow .= ($valuetoshow ? ', ' : '').'<input type="hidden" name="password" value="'.$ldap_pass.'">'; // Dolibarr password is preffiled with LDAP known password + $valuetoshow .= preg_replace('/./i', '*', $ldap_pass); + } else { + // We do not use a field password but a field text to show new password to use. + $valuetoshow .= ($valuetoshow ? ', ' : '').'<input size="30" maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="new-password">'; + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print '</td></tr>'; + + if (!empty($conf->api->enabled)) { + // API key + //$generated_password = getRandomPassword(false); + print '<tr><td>'.$langs->trans("ApiKey").'</td>'; + print '<td>'; + print '<input class="minwidth300" maxsize="32" type="text" id="api_key" name="api_key" value="'.GETPOST('api_key', 'alphanohtml').'" autocomplete="off">'; + if (!empty($conf->use_javascript_ajax)) { + print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); + } + print '</td></tr>'; + } else { + // PARTIAL WORKAROUND + $generated_fake_api_key = getRandomPassword(false); + print '<input type="hidden" name="api_key" value="'.$generated_fake_api_key.'">'; + } + + print '</table><hr><table class="border centpercent">'; @@ -1013,13 +1017,15 @@ if ($action == 'create' || $action == 'adduserldap') // Country print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; + print img_picto('', 'country', 'class="paddingrightonly"'); print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id)); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } print '</td></tr>'; // State - if (empty($conf->global->USER_DISABLE_STATE)) - { + if (empty($conf->global->USER_DISABLE_STATE)) { print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; print $formcompany->select_state($object->state_id, $object->country_code, 'state_id'); print '</td></tr>'; @@ -1029,8 +1035,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td>'.$langs->trans("PhonePro").'</td>'; print '<td>'; print img_picto('', 'object_phoning'); - if (!empty($ldap_phone)) - { + if (!empty($ldap_phone)) { print '<input type="hidden" name="office_phone" value="'.dol_escape_htmltag($ldap_phone).'">'; print $ldap_phone; } else { @@ -1042,8 +1047,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td>'.$langs->trans("PhoneMobile").'</td>'; print '<td>'; print img_picto('', 'object_phoning_mobile'); - if (!empty($ldap_mobile)) - { + if (!empty($ldap_mobile)) { print '<input type="hidden" name="user_mobile" value="'.dol_escape_htmltag($ldap_mobile).'">'; print $ldap_mobile; } else { @@ -1055,8 +1059,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td>'.$langs->trans("Fax").'</td>'; print '<td>'; print img_picto('', 'object_phoning_fax'); - if (!empty($ldap_fax)) - { + if (!empty($ldap_fax)) { print '<input type="hidden" name="office_fax" value="'.dol_escape_htmltag($ldap_fax).'">'; print $ldap_fax; } else { @@ -1068,8 +1071,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td'.(!empty($conf->global->USER_MAIL_REQUIRED) ? ' class="fieldrequired"' : '').'>'.$langs->trans("EMail").'</td>'; print '<td>'; print img_picto('', 'object_email'); - if (!empty($ldap_mail)) - { + if (!empty($ldap_mail)) { print '<input type="hidden" name="email" value="'.dol_escape_htmltag($ldap_mail).'">'; print $ldap_mail; } else { @@ -1082,6 +1084,9 @@ if ($action == 'create' || $action == 'adduserldap') if ($value['active']) { print '<tr><td>'.$langs->trans($value['label']).'</td>'; print '<td>'; + if (!empty($value['icon'])) { + print '<span class="fa '.$value['icon'].'"></span>'; + } if (!empty($ldap_social[$key])) { print '<input type="hidden" name="'.$key.'" value="'.$ldap_social[$key].'">'; print $ldap_social[$key]; @@ -1101,8 +1106,7 @@ if ($action == 'create' || $action == 'adduserldap') } // Accountancy code - if ($conf->accounting->enabled) - { + if ($conf->accounting->enabled) { print '<tr><td>'.$langs->trans("AccountancyCode").'</td>'; print '<td>'; print '<input type="text" name="accountancy_code" value="'.dol_escape_htmltag(GETPOST('accountancy_code', 'alphanohtml')).'">'; @@ -1110,8 +1114,7 @@ if ($action == 'create' || $action == 'adduserldap') } // User color - if (!empty($conf->agenda->enabled)) - { + if (!empty($conf->agenda->enabled)) { print '<tr><td>'.$langs->trans("ColorUser").'</td>'; print '<td>'; print $formother->selectColor(GETPOSTISSET('color') ?GETPOST('color', 'alphanohtml') : $object->color, 'color', null, 1, '', 'hideifnotset'); @@ -1119,31 +1122,26 @@ if ($action == 'create' || $action == 'adduserldap') } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td><td colspan="3">'; $cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1); - print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%'); + print img_picto('', 'category').$form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%'); print "</td></tr>"; } - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'."\n"; - print $formadmin->select_language(GETPOST('default_lang', 'alpha') ?GETPOST('default_lang', 'alpha') : ($object->lang ? $object->lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); + print img_picto('', 'language').$formadmin->select_language(GETPOST('default_lang', 'alpha') ?GETPOST('default_lang', 'alpha') : ($object->lang ? $object->lang : ''), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); print '</td>'; print '</tr>'; } // Multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { // This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module - if (!method_exists($mc, 'formObjectOptions')) - { - if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) // condition must be same for create and edit mode - { - print "<tr>".'<td>'.$langs->trans("Entity").'</td>'; + if (!method_exists($mc, 'formObjectOptions')) { + if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { // condition must be same for create and edit mode + print "<tr>".'<td>'.$langs->trans("Entity").'</td>'; print "<td>".$mc->select_entities($conf->entity); print "</td></tr>\n"; } else { @@ -1167,7 +1165,7 @@ if ($action == 'create' || $action == 'adduserldap') // Signature print '<tr><td class="tdtop">'.$langs->trans("Signature").'</td>'; - print '<td>'; + print '<td class="wordbreak">'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('signature', GETPOST('signature', 'restricthtml'), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%'); print $doleditor->Create(1); @@ -1180,8 +1178,7 @@ if ($action == 'create' || $action == 'adduserldap') // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) // Default warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>'; print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1); print '</td></tr>'; @@ -1194,8 +1191,7 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) - { + || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { $langs->load("salaries"); // THM @@ -1204,7 +1200,7 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print '</td>'; print '<td>'; - print '<input size="8" type="text" name="thm" value="'.dol_escape_htmltag(GETPOST('thm')).'">'; + print '<input size="8" type="text" name="thm" value="'.dol_escape_htmltag(GETPOST('thm')).'"> '.$langs->getCurrencySymbol($conf->currency); print '</td>'; print "</tr>\n"; @@ -1214,14 +1210,14 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print '</td>'; print '<td>'; - print '<input size="8" type="text" name="tjm" value="'.dol_escape_htmltag(GETPOST('tjm')).'">'; + print '<input size="8" type="text" name="tjm" value="'.dol_escape_htmltag(GETPOST('tjm')).'"> '.$langs->getCurrencySymbol($conf->currency); print '</td>'; print "</tr>\n"; // Salary print '<tr><td>'.$langs->trans("Salary").'</td>'; print '<td>'; - print '<input size="8" type="text" name="salary" value="'.dol_escape_htmltag(GETPOST('salary')).'">'; + print img_picto('', 'salary', 'class="pictofixedwidth paddingright"').'<input size="8" type="text" name="salary" value="'.dol_escape_htmltag(GETPOST('salary')).'"> '.$langs->getCurrencySymbol($conf->currency); print '</td>'; print "</tr>\n"; } @@ -1244,17 +1240,6 @@ if ($action == 'create' || $action == 'adduserldap') print '</td>'; print "</tr>\n"; - // Date validity - print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; - print '<td>'; - print $form->selectDate($datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); - - print ' - '; - - print $form->selectDate($dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); - print '</td>'; - print "</tr>\n"; - // Date birth print '<tr><td>'.$langs->trans("DateOfBirth").'</td>'; print '<td>'; @@ -1264,7 +1249,7 @@ if ($action == 'create' || $action == 'adduserldap') print "</table>\n"; - print dol_get_fiche_end(); + print dol_get_fiche_end(); print '<div class="center">'; print '<input class="button" value="'.$langs->trans("CreateUser").'" name="create" type="submit">'; @@ -1275,31 +1260,31 @@ if ($action == 'create' || $action == 'adduserldap') print "</form>"; } else { // View and edit mode - if ($id > 0) - { - $object->fetch($id, '', '', 1); - if ($res < 0) { dol_print_error($db, $object->error); exit; } + if ($id > 0) { + $res = $object->fetch($id, '', '', 1); + if ($res < 0) { + dol_print_error($db, $object->error); + exit; + } $res = $object->fetch_optionals(); // Check if user has rights - if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { + if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->getrights(); - if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings'); + if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) { + setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings'); + } } // Connexion ldap // pour recuperer passDoNotExpire et userChangePassNextLogon - if (!empty($conf->ldap->enabled) && !empty($object->ldap_sid)) - { + if (!empty($conf->ldap->enabled) && !empty($object->ldap_sid)) { $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $userSearchFilter = '('.$conf->global->LDAP_FILTER_CONNECTION.'('.$ldap->getUserIdentifier().'='.$object->login.'))'; $entries = $ldap->fetch($object->login, $userSearchFilter); - if (!$entries) - { + if (!$entries) { setEventMessages($ldap->error, $ldap->errors, 'errors'); } @@ -1309,12 +1294,9 @@ if ($action == 'create' || $action == 'adduserldap') $statutUACF = ''; // Check options of user account - if (count($ldap->uacf) > 0) - { - foreach ($ldap->uacf as $key => $statut) - { - if ($key == 65536) - { + if (count($ldap->uacf) > 0) { + foreach ($ldap->uacf as $key => $statut) { + if ($key == 65536) { $passDoNotExpire = 1; $statutUACF = $statut; } @@ -1324,16 +1306,14 @@ if ($action == 'create' || $action == 'adduserldap') $statutUACF = "ACCOUNTDISABLE"; } - if ($ldap->pwdlastset == 0) - { + if ($ldap->pwdlastset == 0) { $userChangePassNextLogon = 1; } } } // Show tabs - if ($mode == 'employee') // For HRM module development - { + if ($mode == 'employee') { // For HRM module development $title = $langs->trans("Employee"); $linkback = '<a href="'.DOL_URL_ROOT.'/hrm/employee/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; } else { @@ -1348,50 +1328,44 @@ if ($action == 'create' || $action == 'adduserldap') $head = user_prepare_head($object); /* - * Confirmation reinitialisation mot de passe - */ - if ($action == 'password') - { + * Confirmation reinitialisation mot de passe + */ + if ($action == 'password') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("ReinitPassword"), $langs->trans("ConfirmReinitPassword", $object->login), "confirm_password", '', 0, 1); } /* - * Confirmation envoi mot de passe - */ - if ($action == 'passwordsend') - { + * Confirmation envoi mot de passe + */ + if ($action == 'passwordsend') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("SendNewPassword"), $langs->trans("ConfirmSendNewPassword", $object->login), "confirm_passwordsend", '', 0, 1); } /* - * Confirm deactivation - */ - if ($action == 'disable') - { + * Confirm deactivation + */ + if ($action == 'disable') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DisableAUser"), $langs->trans("ConfirmDisableUser", $object->login), "confirm_disable", '', 0, 1); } /* - * Confirm activation - */ - if ($action == 'enable') - { + * Confirm activation + */ + if ($action == 'enable') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("EnableAUser"), $langs->trans("ConfirmEnableUser", $object->login), "confirm_enable", '', 0, 1); } /* - * Confirmation suppression - */ - if ($action == 'delete') - { + * Confirmation suppression + */ + if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DeleteAUser"), $langs->trans("ConfirmDeleteUser", $object->login), "confirm_delete", '', 0, 1); } /* - * Fiche en mode visu - */ - if ($action != 'edit') - { + * Fiche en mode visu + */ + if ($action != 'edit') { print dol_get_fiche_head($head, 'user', $title, -1, 'user'); dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); @@ -1403,89 +1377,19 @@ if ($action == 'create' || $action == 'adduserldap') print '<table class="border tableforfield" width="100%">'; // Login - print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>'; - if (!empty($object->ldap_sid) && $object->statut == 0) - { + print '<tr><td class="titlefieldmiddle">'.$langs->trans("Login").'</td>'; + if (!empty($object->ldap_sid) && $object->statut == 0) { print '<td class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>'; } else { print '<td>'.$object->login.'</td>'; } print '</tr>'."\n"; - // Password - print '<tr><td>'.$langs->trans("Password").'</td>'; - - print '<td class="wordbreak">'; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { - if (!empty($object->ldap_sid)) - { - if ($passDoNotExpire) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("LdapUacf_".$statutUACF); - } elseif ($userChangePassNextLogon) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="warning">'.$langs->trans("UserMustChangePassNextLogon", $ldap->domainFQDN).'</span>'; - } elseif ($userDisabled) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="warning">'.$langs->trans("LdapUacf_".$statutUACF, $ldap->domainFQDN).'</span>'; - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - } - if (preg_match('/http/', $dolibarr_main_authentication)) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("HTTPBasicPassword"); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) - { - if ($object->pass) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); - $valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; - } else { - if ($user->admin && $user->id == $object->id) { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); - //$valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Crypted").' - </span>'; - $valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; - // TODO Add a feature to reveal the hash - $valuetoshow .= '<!-- Crypted into '.$object->pass_indatabase_crypted.' -->'; - } - else $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) $valuetoshow = $hookmanager->resPrint; // to replace - else $valuetoshow .= $hookmanager->resPrint; // to add - - print $valuetoshow; - print "</td>"; - print '</tr>'."\n"; - - // API key - if (!empty($conf->api->enabled) && $user->admin) { - print '<tr><td>'.$langs->trans("ApiKey").'</td>'; - print '<td>'; - if (!empty($object->api_key)) print '<span class="opacitymedium">'.preg_replace('/./', '*', $object->api_key).'</span>'; - if ($user->admin || $user->id == $object->id) { - // TODO Add a feature to reveal the hash - } - print '</td></tr>'; - } - // Administrator print '<tr><td>'.$langs->trans("Administrator").'</td><td>'; - if (!empty($conf->multicompany->enabled) && $object->admin && !$object->entity) - { + if (!empty($conf->multicompany->enabled) && $object->admin && !$object->entity) { print $form->textwithpicto(yn($object->admin), $langs->trans("SuperAdministratorDesc"), 1, "superadmin"); - } elseif ($object->admin) - { + } elseif ($object->admin) { print $form->textwithpicto(yn($object->admin), $langs->trans("AdministratorDesc"), 1, "admin"); } else { print yn($object->admin); @@ -1498,28 +1402,26 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("InternalExternalDesc")); print '</td><td>'; $type = $langs->trans("Internal"); - if ($object->socid > 0) $type = $langs->trans("External"); + if ($object->socid > 0) { + $type = $langs->trans("External"); + } print $type; - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + if ($object->ldap_sid) { + print ' ('.$langs->trans("DomainUser").')'; + } print '</td></tr>'."\n"; // Ldap sid - if ($object->ldap_sid) - { + if ($object->ldap_sid) { print '<tr><td>'.$langs->trans("Type").'</td><td>'; print $langs->trans("DomainUser", $ldap->domainFQDN); print '</td></tr>'."\n"; } - // Gender - print '<tr><td>'.$langs->trans("Gender").'</td>'; - print '<td>'; - if ($object->gender) print $langs->trans("Gender".$object->gender); - print '</td></tr>'; - // Employee print '<tr><td>'.$langs->trans("Employee").'</td><td colspan="2">'; - print yn($object->employee); + print '<input type="checkbox" disabled name="employee" value="1"'.($object->employee ? ' checked="checked"' : '').'>'; + //print yn($object->employee); print '</td></tr>'."\n"; // TODO Move this into tab RH, visible when salarie or RH is visible (HierarchicalResponsible must be on both tab) @@ -1570,8 +1472,7 @@ if ($action == 'create' || $action == 'adduserldap') } // Default warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>'; if ($object->fk_warehouse > 0) { @@ -1590,8 +1491,7 @@ if ($action == 'create' || $action == 'adduserldap') //$childids = $user->getAllChildIds(1); if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) - { + || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { // Even a superior can't see this info of its subordinates wihtout $user->rights->salaries->read and $user->rights->hrm->employee->read (setting/viewing is reserverd to HR people). // However, he can see the valuation of timesheet of its subordinates even without these permissions. $langs->load("salaries"); @@ -1619,7 +1519,7 @@ if ($action == 'create' || $action == 'adduserldap') // Salary print '<tr><td>'.$langs->trans("Salary").'</td>'; print '<td>'; - print ($object->salary != '' ?price($object->salary, '', $langs, 1, -1, -1, $conf->currency) : ''); + print ($object->salary != '' ? img_picto('', 'salary', 'class="pictofixedwidth paddingright"').price($object->salary, '', $langs, 1, -1, -1, $conf->currency) : ''); print '</td>'; print "</tr>\n"; } @@ -1645,20 +1545,6 @@ if ($action == 'create' || $action == 'adduserldap') print '</td>'; print "</tr>\n"; - // Date login validity - print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; - print '<td>'; - if ($object->datestartvalidity) { - print '<span class="opacitymedium">'.$langs->trans("FromDate").'</span> '; - print dol_print_date($object->datestartvalidity, 'day'); - } - if ($object->dateendvalidity) { - print '<span class="opacitymedium"> - '.$langs->trans("To").'</span> '; - print dol_print_date($object->dateendvalidity, 'day'); - } - print '</td>'; - print "</tr>\n"; - // Date of birth print '<tr><td>'.$langs->trans("DateOfBirth").'</td>'; print '<td>'; @@ -1667,8 +1553,7 @@ if ($action == 'create' || $action == 'adduserldap') print "</tr>\n"; // Accountancy code - if ($conf->accounting->enabled) - { + if ($conf->accounting->enabled) { print '<tr><td>'.$langs->trans("AccountancyCode").'</td>'; print '<td>'.$object->accountancy_code.'</td></tr>'; } @@ -1679,11 +1564,11 @@ if ($action == 'create' || $action == 'adduserldap') print '<div class="fichehalfright"><div class="ficheaddleft">'; print '<div class="underbanner clearboth"></div>'; + print '<table class="border tableforfield centpercent">'; // Color user - if (!empty($conf->agenda->enabled)) - { + if (!empty($conf->agenda->enabled)) { print '<tr><td>'.$langs->trans("ColorUser").'</td>'; print '<td>'; print $formother->showColor($object->color, ''); @@ -1692,8 +1577,7 @@ if ($action == 'create' || $action == 'adduserldap') } // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '<tr><td>'.$langs->trans("Categories").'</td>'; print '<td colspan="3">'; print $form->showCategories($object->id, Categorie::TYPE_USER, 1); @@ -1701,8 +1585,7 @@ if ($action == 'create' || $action == 'adduserldap') } // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>'; //$s=picto_from_langcode($object->default_lang); @@ -1713,8 +1596,7 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; } - if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication) && !empty($conf->global->MAIN_OPENIDURL_PERUSER)) - { + if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication) && !empty($conf->global->MAIN_OPENIDURL_PERUSER)) { print '<tr><td>'.$langs->trans("OpenIDURL").'</td>'; print '<td>'.$object->openid.'</td>'; print "</tr>\n"; @@ -1729,21 +1611,18 @@ if ($action == 'create' || $action == 'adduserldap') print "</tr>\n"; // Multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { // This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module - if (!method_exists($mc, 'formObjectOptions')) - { - if (!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) - { - print '<tr><td>'.$langs->trans("Entity").'</td><td>'; - if (empty($object->entity)) { - print $langs->trans("AllEntities"); - } else { - $mc->getInfo($object->entity); - print $mc->label; - } - print "</td></tr>\n"; + if (!method_exists($mc, 'formObjectOptions')) { + if (!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { + print '<tr><td>'.$langs->trans("Entity").'</td><td>'; + if (empty($object->entity)) { + print $langs->trans("AllEntities"); + } else { + $mc->getInfo($object->entity); + print $mc->label; + } + print "</td></tr>\n"; } } } @@ -1752,13 +1631,11 @@ if ($action == 'create' || $action == 'adduserldap') include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Company / Contact - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>'; print '<td>'; $s = ''; - if (isset($object->socid) && $object->socid > 0) - { + if (isset($object->socid) && $object->socid > 0) { $societe = new Societe($db); $societe->fetch($object->socid); if ($societe->id > 0) { @@ -1767,13 +1644,15 @@ if ($action == 'create' || $action == 'adduserldap') } else { $s .= '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ThisUserIsNot").'</span>'; } - if (!empty($object->contact_id)) - { + if (!empty($object->contact_id)) { $contact = new Contact($db); $contact->fetch($object->contact_id); if ($contact->id > 0) { - if ($object->socid > 0 && $s) $s .= ' / '; - else $s .= '<br>'; + if ($object->socid > 0 && $s) { + $s .= ' / '; + } else { + $s .= '<br>'; + } $s .= $contact->getNomUrl(1, ''); } } @@ -1783,13 +1662,11 @@ if ($action == 'create' || $action == 'adduserldap') } // Module Adherent - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $langs->load("members"); print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<td>'; - if ($object->fk_member) - { + if ($object->fk_member) { $adh = new Adherent($db); $adh->fetch($object->fk_member); $adh->ref = $adh->getFullname($langs); // Force to show login instead of id @@ -1802,11 +1679,11 @@ if ($action == 'create' || $action == 'adduserldap') } // Signature - print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td>'; + print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td class="wordbreak">'; print dol_htmlentitiesbr($object->signature); print "</td></tr>\n"; - //VCard + // VCard print '<tr><td class="tdtop">'.$langs->trans("VCard").'</td>'; print '<td>'; print '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'">'; @@ -1816,6 +1693,97 @@ if ($action == 'create' || $action == 'adduserldap') print "</td></tr>\n"; print "</table>\n"; + + + print '<div class="div-table-responsive-no-min">'; + print '<table class="border tableforfield centpercent">'; + print '<tr class="liste_titre"><td class="liste_titre">'; + print $langs->trans("Credentials"); + print '</td>'; + print '<td></td>'; + print '</tr>'; + + // Date login validity + print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; + print '<td>'; + if ($object->datestartvalidity) { + print '<span class="opacitymedium">'.$langs->trans("FromDate").'</span> '; + print dol_print_date($object->datestartvalidity, 'day'); + } + if ($object->dateendvalidity) { + print '<span class="opacitymedium"> - '.$langs->trans("To").'</span> '; + print dol_print_date($object->dateendvalidity, 'day'); + } + print '</td>'; + print "</tr>\n"; + + // Password + print '<tr><td class="titlefield">'.$langs->trans("Password").'</td>'; + + print '<td class="wordbreak">'; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + if (!empty($object->ldap_sid)) { + if ($passDoNotExpire) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("LdapUacf_".$statutUACF); + } elseif ($userChangePassNextLogon) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="warning">'.$langs->trans("UserMustChangePassNextLogon", $ldap->domainFQDN).'</span>'; + } elseif ($userDisabled) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="warning">'.$langs->trans("LdapUacf_".$statutUACF, $ldap->domainFQDN).'</span>'; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("HTTPBasicPassword"); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if ($object->pass) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); + $valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; + } else { + if ($user->admin && $user->id == $object->id) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); + //$valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Crypted").' - </span>'; + $valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; + // TODO Add a feature to reveal the hash + $valuetoshow .= '<!-- Crypted into '.$object->pass_indatabase_crypted.' -->'; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; + } + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print "</td>"; + print '</tr>'."\n"; + + // API key + if (!empty($conf->api->enabled) && $user->admin) { + print '<tr><td>'.$langs->trans("ApiKey").'</td>'; + print '<td>'; + if (!empty($object->api_key)) { + print '<span class="opacitymedium">'.preg_replace('/./', '*', $object->api_key).'</span>'; + } + if ($user->admin || $user->id == $object->id) { + // TODO Add a feature to reveal the hash + } + print '</td></tr>'; + } + print '</table></div>'; + print '</div>'; print '</div></div>'; @@ -1826,18 +1794,16 @@ if ($action == 'create' || $action == 'adduserldap') /* - * Buttons actions - */ + * Buttons actions + */ print '<div class="tabsAction">'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) - { + if (empty($reshook)) { if (empty($user->socid)) { - if (!empty($object->email)) - { + if (!empty($object->email)) { $langs->load("mails"); print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; } else { @@ -1846,66 +1812,57 @@ if ($action == 'create' || $action == 'adduserldap') } } - if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { + if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DisabledInMonoUserMode")).'">'.$langs->trans("Modify").'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'; } } elseif ($caneditpassword && !$object->ldap_sid && - (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { + (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("EditPassword").'</a></div>'; } // Si on a un gestionnaire de generation de mot de passe actif - if ($conf->global->USER_PASSWORD_GENERATED != 'none') - { - if ($object->statut == 0) - { + if ($conf->global->USER_PASSWORD_GENERATED != 'none') { + if ($object->statut == 0) { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a></div>'; } elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=password">'.$langs->trans("ReinitPassword").'</a></div>'; } - if ($object->statut == 0) - { + if ($object->statut == 0) { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>'; } elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>'; - else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a></div>'; + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { + if ($object->email) { + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>'; + } else { + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a></div>'; + } } } // Enable user if ($user->id <> $id && $candisableuser && $object->statut == 0 && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=enable">'.$langs->trans("Reactivate").'</a></div>'; + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Reactivate").'</a></div>'; } // Disable user if ($user->id <> $id && $candisableuser && $object->statut == 1 && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&amp;id='.$object->id.'">'.$langs->trans("DisableUser").'</a></div>'; + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'&token='.newToken().'">'.$langs->trans("DisableUser").'</a></div>'; } else { - if ($user->id == $id) - { + if ($user->id == $id) { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("CantDisableYourself").'">'.$langs->trans("DisableUser").'</a></div>'; } } // Delete if ($user->id <> $id && $candisableuser && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - if ($user->admin || !$object->admin) // If user edited is admin, delete is possible on for an admin - { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&amp;token='.newToken().'&amp;id='.$object->id.'">'.$langs->trans("DeleteUser").'</a></div>'; + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { + if ($user->admin || !$object->admin) { // If user edited is admin, delete is possible on for an admin + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&id='.$object->id.'">'.$langs->trans("DeleteUser").'</a></div>'; } else { print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MustBeAdminToDeleteOtherAdmin")).'">'.$langs->trans("DeleteUser").'</a></div>'; } @@ -1917,7 +1874,9 @@ if ($action == 'create' || $action == 'adduserldap') //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) { + $action = 'presend'; + } // Presend form $modelmail = 'user'; @@ -1927,14 +1886,12 @@ if ($action == 'create' || $action == 'adduserldap') include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - if ($action != 'presend' && $action != 'send') - { + if ($action != 'presend' && $action != 'send') { /* - * List of groups of user - */ + * List of groups of user + */ - if ($canreadgroup) - { + if ($canreadgroup) { print '<!-- Group section -->'."\n"; print load_fiche_titre($langs->trans("ListOfGroupsForUser"), '', ''); @@ -1945,10 +1902,8 @@ if ($action == 'create' || $action == 'adduserldap') $usergroup = new UserGroup($db); $groupslist = $usergroup->listGroupsForUser($object->id); - if (!empty($groupslist)) - { - foreach ($groupslist as $groupforuser) - { + if (!empty($groupslist)) { + foreach ($groupslist as $groupforuser) { $exclude[] = $groupforuser->id; } } @@ -1958,10 +1913,8 @@ if ($action == 'create' || $action == 'adduserldap') $reshook = $hookmanager->executeHooks('formAddUserToGroup', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { - if ($caneditgroup) - { + if (empty($reshook)) { + if ($caneditgroup) { print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'" />'; print '<input type="hidden" name="action" value="addgroup" />'; @@ -1970,8 +1923,7 @@ if ($action == 'create' || $action == 'adduserldap') print '<table class="noborder centpercent">'."\n"; print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Groups").'</th>'."\n"; print '<th class="liste_titre right">'; - if ($caneditgroup) - { + if ($caneditgroup) { print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity); print ' &nbsp; '; print '<input type="hidden" name="entity" value="'.$conf->entity.'" />'; @@ -1980,22 +1932,18 @@ if ($action == 'create' || $action == 'adduserldap') print '</th></tr>'."\n"; // List of groups of user - if (!empty($groupslist)) - { - foreach ($groupslist as $group) - { + if (!empty($groupslist)) { + foreach ($groupslist as $group) { print '<tr class="oddeven">'; print '<td>'; - if ($caneditgroup) - { + if ($caneditgroup) { print $group->getNomUrl(1); } else { print img_object($langs->trans("ShowGroup"), "group").' '.$group->name; } print '</td>'; print '<td class="right">'; - if ($caneditgroup) - { + if ($caneditgroup) { print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=removegroup&amp;group='.$group->id.'">'; print img_picto($langs->trans("RemoveFromGroup"), 'unlink'); print '</a>'; @@ -2010,8 +1958,7 @@ if ($action == 'create' || $action == 'adduserldap') print "</table>"; - if ($caneditgroup) - { + if ($caneditgroup) { print '</form>'; } print "<br>"; @@ -2021,10 +1968,9 @@ if ($action == 'create' || $action == 'adduserldap') } /* - * Card in edit mode - */ - if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id))) - { + * Card in edit mode + */ + if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id))) { print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST" name="updateuser" enctype="multipart/form-data">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -2035,9 +1981,8 @@ if ($action == 'create' || $action == 'adduserldap') print '<table class="border centpercent">'; // Ref/ID - if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) - { - print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td>'; + if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { + print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td>'; print '<td>'; print $object->id; print '</td>'; @@ -2045,16 +1990,15 @@ if ($action == 'create' || $action == 'adduserldap') } // Civility - print '<tr><td><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">'; + print '<tr><td class="titlefieldcreate"><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">'; print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'aZ09') : $object->civility_code, 'civility_code'); print '</td></tr>'; // Lastname print "<tr>"; - print '<td class="titlefield fieldrequired">'.$langs->trans("Lastname").'</td>'; + print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Lastname").'</td>'; print '<td>'; - if ($caneditfield && !$object->ldap_sid) - { + if ($caneditfield && !$object->ldap_sid) { print '<input class="minwidth100" type="text" class="flat" name="lastname" value="'.$object->lastname.'">'; } else { print '<input type="hidden" name="lastname" value="'.$object->lastname.'">'; @@ -2066,8 +2010,7 @@ if ($action == 'create' || $action == 'adduserldap') // Firstname print "<tr>".'<td>'.$langs->trans("Firstname").'</td>'; print '<td>'; - if ($caneditfield && !$object->ldap_sid) - { + if ($caneditfield && !$object->ldap_sid) { print '<input class="minwidth100" type="text" class="flat" name="firstname" value="'.$object->firstname.'">'; } else { print '<input type="hidden" name="firstname" value="'.$object->firstname.'">'; @@ -2078,8 +2021,7 @@ if ($action == 'create' || $action == 'adduserldap') // Login print "<tr>".'<td><span class="fieldrequired">'.$langs->trans("Login").'</span></td>'; print '<td>'; - if ($user->admin && !$object->ldap_sid) - { + if ($user->admin && !$object->ldap_sid) { print '<input maxlength="50" type="text" class="flat" name="login" value="'.$object->login.'">'; } else { print '<input type="hidden" name="login" value="'.$object->login.'">'; @@ -2088,52 +2030,9 @@ if ($action == 'create' || $action == 'adduserldap') print '</td>'; print '</tr>'; - // Pass - print '<tr><td>'.$langs->trans("Password").'</td>'; - print '<td>'; - $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); - } - if (preg_match('/http/', $dolibarr_main_authentication)) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$form->textwithpicto($text, $langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless", $dolibarr_main_authentication), 1, 'warning'); - } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) - { - if ($caneditpassword) - { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<input maxlength="32" type="password" class="flat" name="password" value="'.$object->pass.'" autocomplete="new-password">'; - } else { - $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); - } - } - - // Other form for user password - $parameters = array('valuetoshow' => $valuetoshow, 'caneditpassword' => $caneditpassword); - $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook > 0) $valuetoshow = $hookmanager->resPrint; // to replace - else $valuetoshow .= $hookmanager->resPrint; // to add - - print $valuetoshow; - print "</td></tr>\n"; - - // API key - if (!empty($conf->api->enabled) && $user->admin) - { - print '<tr><td>'.$langs->trans("ApiKey").'</td>'; - print '<td>'; - print '<input class="minwidth300" maxsize="32" type="text" id="api_key" name="api_key" value="'.$object->api_key.'" autocomplete="off">'; - if (!empty($conf->use_javascript_ajax)) - print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); - print '</td></tr>'; - } - // Administrator print '<tr><td>'.$langs->trans("Administrator").'</td>'; - if ($object->socid > 0) - { + if ($object->socid > 0) { $langs->load("admin"); print '<td>'; print '<input type="hidden" name="admin" value="'.$object->admin.'">'.yn($object->admin); @@ -2151,14 +2050,11 @@ if ($action == 'create' || $action == 'adduserldap') (empty($conf->multicompany->enabled) && $nbAdmin >= 1) || (!empty($conf->multicompany->enabled) && (($object->entity > 0 || ($user->entity == 0 && $object->entity == 0)) || $nbSuperAdmin > 1)) // Don't downgrade a superadmin if alone ) - ) - { + ) { print $form->selectyesno('admin', $object->admin, 1); - if (!empty($conf->multicompany->enabled) && !$user->entity) - { - if ($conf->use_javascript_ajax) - { + if (!empty($conf->multicompany->enabled) && !$user->entity) { + if ($conf->use_javascript_ajax) { print '<script type="text/javascript"> $(function() { var admin = $("select[name=admin]").val(); @@ -2197,57 +2093,61 @@ if ($action == 'create' || $action == 'adduserldap') } $checked = (($object->admin && !$object->entity) ? ' checked' : ''); - print '<input type="checkbox" name="superadmin" value="1"'.$checked.' /> '.$langs->trans("SuperAdministrator"); + print '<input type="checkbox" name="superadmin" id="superadmin" value="1"'.$checked.' /> <label for="superadmin">'.$langs->trans("SuperAdministrator").'</span>'; } } else { $yn = yn($object->admin); print '<input type="hidden" name="admin" value="'.$object->admin.'">'; print '<input type="hidden" name="superadmin" value="'.(empty($object->entity) ? 1 : 0).'">'; - if (!empty($conf->multicompany->enabled) && empty($object->entity)) print $form->textwithpicto($yn, $langs->trans("DontDowngradeSuperAdmin"), 1, 'warning'); - else print $yn; + if (!empty($conf->multicompany->enabled) && empty($object->entity)) { + print $form->textwithpicto($yn, $langs->trans("DontDowngradeSuperAdmin"), 1, 'warning'); + } else { + print $yn; + } } print '</td></tr>'; } - // Gender - print '<tr><td>'.$langs->trans("Gender").'</td>'; - print '<td>'; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); - if ($caneditfield) { - print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ?GETPOST('gender') : $object->gender, 1); - } else { - print $arraygender[$object->gender]; - } - print '</td></tr>'; + // Gender + print '<tr><td>'.$langs->trans("Gender").'</td>'; + print '<td>'; + $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); + if ($caneditfield) { + print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ?GETPOST('gender') : $object->gender, 1); + } else { + print $arraygender[$object->gender]; + } + print '</td></tr>'; // Employee print '<tr>'; print '<td>'.$form->editfieldkey('Employee', 'employee', '', $object, 0).'</td><td>'; if ($caneditfield) { - print $form->selectyesno("employee", $object->employee, 1); + print '<input type="checkbox" name="employee" value="1"'.($object->employee ? ' checked="checked"' : '').'>'; + //print $form->selectyesno("employee", $object->employee, 1); } else { - if ($object->employee) { + print '<input type="checkbox" name="employee" disabled value="1"'.($object->employee ? ' checked="checked"' : '').'>'; + /*if ($object->employee) { print $langs->trans("Yes"); } else { print $langs->trans("No"); - } + }*/ } print '</td></tr>'; // Hierarchy - print '<tr><td class="titlefield">'.$langs->trans("HierarchicalResponsible").'</td>'; - print '<td>'; - if ($caneditfield) - { - print $form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); - } else { - print '<input type="hidden" name="fk_user" value="'.$object->fk_user.'">'; - $huser = new User($db); - $huser->fetch($object->fk_user); - print $huser->getNomUrl(1); - } - print '</td>'; - print "</tr>\n"; + print '<tr><td class="titlefield">'.$langs->trans("HierarchicalResponsible").'</td>'; + print '<td>'; + if ($caneditfield) { + print img_picto('', 'user').$form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); + } else { + print '<input type="hidden" name="fk_user" value="'.$object->fk_user.'">'; + $huser = new User($db); + $huser->fetch($object->fk_user); + print $huser->getNomUrl(1); + } + print '</td>'; + print "</tr>\n"; // Expense report validator if (!empty($conf->expensereport->enabled)) { @@ -2256,9 +2156,8 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print '</td>'; print '<td>'; - if ($caneditfield) - { - print $form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); + if ($caneditfield) { + print img_picto('', 'user').$form->select_dolusers($object->fk_user_expense_validator, 'fk_user_expense_validator', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); } else { print '<input type="hidden" name="fk_user_expense_validator" value="'.$object->fk_user_expense_validator.'">'; $evuser = new User($db); @@ -2276,9 +2175,8 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("ValidatorIsSupervisorByDefault"), 1, 'help'); print '</td>'; print '<td>'; - if ($caneditfield) - { - print $form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); + if ($caneditfield) { + print img_picto('', 'user').$form->select_dolusers($object->fk_user_holiday_validator, 'fk_user_holiday_validator', 1, array($object->id), 0, '', 0, $object->entity, 0, 0, '', 0, '', 'maxwidth300'); } else { print '<input type="hidden" name="fk_user_holiday_validator" value="'.$object->fk_user_holiday_validator.'">'; $hvuser = new User($db); @@ -2292,26 +2190,35 @@ if ($action == 'create' || $action == 'adduserldap') // External user ? print '<tr><td>'.$langs->trans("ExternalUser").' ?</td>'; print '<td>'; - if ($user->id == $object->id || !$user->admin) - { + if ($user->id == $object->id || !$user->admin) { // Read mode $type = $langs->trans("Internal"); - if ($object->socid) $type = $langs->trans("External"); + if ($object->socid) { + $type = $langs->trans("External"); + } print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + if ($object->ldap_sid) { + print ' ('.$langs->trans("DomainUser").')'; + } } else { // Select mode $type = 0; - if ($object->contact_id) $type = $object->contact_id; + if ($object->contact_id) { + $type = $object->contact_id; + } if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;'); print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + if ($object->ldap_sid) { + print ' ('.$langs->trans("DomainUser").')'; + } } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + if ($object->ldap_sid) { + print ' ('.$langs->trans("DomainUser").')'; + } } else { // $object->socid is not > 0 here print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); @@ -2319,15 +2226,87 @@ if ($action == 'create' || $action == 'adduserldap') } print '</td></tr>'; - print '</table><hr><table class="border centpercent">'; + + print '</table><hr><table class="border centpercent">'; + + + // Date access validity + print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; + print '<td>'; + if ($caneditfield) { + print $form->selectDate($datestartvalidity ? $datestartvalidity : $object->datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1, 0, '', '', '', '', 1, '', ''); + } else { + print dol_print_date($object->datestartvalidity, 'day'); + } + + /*if ($datestartvalidity && $dateendvalidity) { + print ' - '; + }*/ + print ' &nbsp; '; + + if ($caneditfield) { + print $form->selectDate($dateendvalidity ? $datendevalidity : $object->dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0, 0, '', '', '', '', 1, '', ''); + } else { + print dol_print_date($object->dateendvalidity, 'day'); + } + print '</td>'; + print "</tr>\n"; + + // Pass + print '<tr><td class="titlefieldcreate">'.$langs->trans("Password").'</td>'; + print '<td>'; + $valuetoshow = ''; + if (preg_match('/ldap/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); + } + if (preg_match('/http/', $dolibarr_main_authentication)) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$form->textwithpicto($text, $langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless", $dolibarr_main_authentication), 1, 'warning'); + } + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { + if ($caneditpassword) { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<input maxlength="32" type="password" class="flat" name="password" value="'.$object->pass.'" autocomplete="new-password">'; + } else { + $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); + } + } + + // Other form for user password + $parameters = array('valuetoshow' => $valuetoshow, 'caneditpassword' => $caneditpassword); + $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } + + print $valuetoshow; + print "</td></tr>\n"; + + // API key + if (!empty($conf->api->enabled) && $user->admin) { + print '<tr><td>'.$langs->trans("ApiKey").'</td>'; + print '<td>'; + print '<input class="minwidth300" maxsize="32" type="text" id="api_key" name="api_key" value="'.$object->api_key.'" autocomplete="off">'; + if (!empty($conf->use_javascript_ajax)) { + print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"'); + } + print '</td></tr>'; + } + + + print '</table><hr><table class="border centpercent">'; // Address - print '<tr><td class="tdtop titlefield">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>'; + print '<tr><td class="tdtop titlefieldcreate">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>'; print '<td>'; - if ($caneditfield) print '<textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">'; + if ($caneditfield) { + print '<textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">'; + } print $object->address; - if ($caneditfield) print '</textarea>'; + if ($caneditfield) { + print '</textarea>'; + } print '</td></tr>'; // Zip @@ -2352,7 +2331,9 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td>'; if ($caneditfield) { print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + if ($user->admin) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } } else { $countrylabel = getCountry($object->country_id, '0'); print $countrylabel; @@ -2360,8 +2341,7 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; // State - if (empty($conf->global->USER_DISABLE_STATE)) - { + if (empty($conf->global->USER_DISABLE_STATE)) { print '<tr><td class="tdoverflow">'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td>'; if ($caneditfield) { print $formcompany->select_state($object->state_id, $object->country_code, 'state_id'); @@ -2375,8 +2355,7 @@ if ($action == 'create' || $action == 'adduserldap') print "<tr>".'<td>'.$langs->trans("PhonePro").'</td>'; print '<td>'; print img_picto('', 'object_phoning'); - if ($caneditfield && empty($object->ldap_sid)) - { + if ($caneditfield && empty($object->ldap_sid)) { print '<input type="text" name="office_phone" class="flat maxwidth200" value="'.$object->office_phone.'">'; } else { print '<input type="hidden" name="office_phone" value="'.$object->office_phone.'">'; @@ -2388,8 +2367,7 @@ if ($action == 'create' || $action == 'adduserldap') print "<tr>".'<td>'.$langs->trans("PhoneMobile").'</td>'; print '<td>'; print img_picto('', 'object_phoning_mobile'); - if ($caneditfield && empty($object->ldap_sid)) - { + if ($caneditfield && empty($object->ldap_sid)) { print '<input type="text" name="user_mobile" class="flat maxwidth200" value="'.$object->user_mobile.'">'; } else { print '<input type="hidden" name="user_mobile" value="'.$object->user_mobile.'">'; @@ -2401,8 +2379,7 @@ if ($action == 'create' || $action == 'adduserldap') print "<tr>".'<td>'.$langs->trans("Fax").'</td>'; print '<td>'; print img_picto('', 'object_phoning_fax'); - if ($caneditfield && empty($object->ldap_sid)) - { + if ($caneditfield && empty($object->ldap_sid)) { print '<input type="text" name="office_fax" class="flat maxwidth200" value="'.$object->office_fax.'">'; } else { print '<input type="hidden" name="office_fax" value="'.$object->office_fax.'">'; @@ -2414,8 +2391,7 @@ if ($action == 'create' || $action == 'adduserldap') print "<tr>".'<td'.(!empty($conf->global->USER_MAIL_REQUIRED) ? ' class="fieldrequired"' : '').'>'.$langs->trans("EMail").'</td>'; print '<td>'; print img_picto('', 'object_email'); - if ($caneditfield && empty($object->ldap_sid)) - { + if ($caneditfield && empty($object->ldap_sid)) { print '<input class="minwidth100 maxwidth500 widthcentpercentminusx" type="text" name="email" class="flat" value="'.$object->email.'">'; } else { print '<input type="hidden" name="email" value="'.$object->email.'">'; @@ -2428,6 +2404,9 @@ if ($action == 'create' || $action == 'adduserldap') if ($value['active']) { print '<tr><td>'.$langs->trans($value['label']).'</td>'; print '<td>'; + if (!empty($value['icon'])) { + print '<span class="fa '.$value['icon'].'"></span>'; + } if ($caneditfield && empty($object->ldap_sid)) { print '<input size="40" type="text" name="'.$key.'" class="flat" value="'.$object->socialnetworks[$key].'">'; } else { @@ -2443,12 +2422,10 @@ if ($action == 'create' || $action == 'adduserldap') } // OpenID url - if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication) && !empty($conf->global->MAIN_OPENIDURL_PERUSER)) - { + if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication) && !empty($conf->global->MAIN_OPENIDURL_PERUSER)) { print "<tr>".'<td>'.$langs->trans("OpenIDURL").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print '<input class="minwidth100" type="url" name="openid" class="flat" value="'.$object->openid.'">'; } else { print '<input type="hidden" name="openid" value="'.$object->openid.'">'; @@ -2460,13 +2437,11 @@ if ($action == 'create' || $action == 'adduserldap') print '</table><hr><table class="border centpercent">'; // Accountancy code - if ($conf->accounting->enabled) - { + if ($conf->accounting->enabled) { print "<tr>"; - print '<td class="titlefield">'.$langs->trans("AccountancyCode").'</td>'; + print '<td class="titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">'; } else { print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">'; @@ -2477,12 +2452,10 @@ if ($action == 'create' || $action == 'adduserldap') } // User color - if (!empty($conf->agenda->enabled)) - { - print '<tr><td>'.$langs->trans("ColorUser").'</td>'; + if (!empty($conf->agenda->enabled)) { + print '<tr><td class="titlefieldcreate">'.$langs->trans("ColorUser").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print $formother->selectColor(GETPOSTISSET('color') ?GETPOST('color', 'alphanohtml') : $object->color, 'color', null, 1, '', 'hideifnotset'); } else { print $formother->showColor($object->color, ''); @@ -2492,25 +2465,24 @@ if ($action == 'create' || $action == 'adduserldap') // Photo print '<tr>'; - print '<td>'.$langs->trans("Photo").'</td>'; + print '<td class="titlefieldcreate">'.$langs->trans("Photo").'</td>'; print '<td>'; print $form->showphoto('userphoto', $object, 60, 0, $caneditfield, 'photowithmargin', 'small', 1, 0, 'user', 1); print '</td>'; print '</tr>'; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td>'; print '<td>'; + print img_picto('', 'category'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_USER, null, null, null, null, 1); $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_USER); foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - if ($caneditfield) - { + if ($caneditfield) { print $form->multiselectarray('usercats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%'); } else { print $form->showCategories($object->id, Categorie::TYPE_USER, 1); @@ -2519,10 +2491,9 @@ if ($action == 'create' || $action == 'adduserldap') } // Default language - if (!empty($conf->global->MAIN_MULTILANGS)) - { + if (!empty($conf->global->MAIN_MULTILANGS)) { print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3">'."\n"; - print $formadmin->select_language($object->lang, 'default_lang', 0, 0, 1); + print img_picto('', 'language').$formadmin->select_language($object->lang, 'default_lang', 0, 0, 1); print '</td>'; print '</tr>'; } @@ -2534,17 +2505,14 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; // Company / Contact - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>'; print '<td>'; - if ($object->socid > 0) - { + if ($object->socid > 0) { $societe = new Societe($db); $societe->fetch($object->socid); print $societe->getNomUrl(1, ''); - if ($object->contact_id) - { + if ($object->contact_id) { $contact = new Contact($db); $contact->fetch($object->contact_id); print ' / <a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$object->contact_id.'">'.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).'</a>'; @@ -2558,13 +2526,11 @@ if ($action == 'create' || $action == 'adduserldap') } // Module Adherent - if (!empty($conf->adherent->enabled)) - { + if (!empty($conf->adherent->enabled)) { $langs->load("members"); print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<td>'; - if ($object->fk_member) - { + if ($object->fk_member) { $adh = new Adherent($db); $adh->fetch($object->fk_member); $adh->ref = $adh->login; // Force to show login instead of id @@ -2578,13 +2544,10 @@ if ($action == 'create' || $action == 'adduserldap') // Multicompany // TODO check if user not linked with the current entity before change entity (thirdparty, invoice, etc.) !! - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { // This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module - if (!method_exists($mc, 'formObjectOptions')) - { - if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!method_exists($mc, 'formObjectOptions')) { + if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && !$user->entity) { print "<tr>".'<td>'.$langs->trans("Entity").'</td>'; print "<td>".$mc->select_entities($object->entity, 'entity', '', 0, 1, false, false, 1); // last parameter 1 means, show also a choice 0=>'all entities' print "</td></tr>\n"; @@ -2599,8 +2562,7 @@ if ($action == 'create' || $action == 'adduserldap') //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; // We do not use common tpl here because we need a special test on $caneditfield $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { + if (empty($reshook)) { if ($caneditfield) { print $object->showOptionals($extrafields, 'edit'); } else { @@ -2611,8 +2573,7 @@ if ($action == 'create' || $action == 'adduserldap') // Signature print '<tr><td class="tdtop">'.$langs->trans("Signature").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('signature', $object->signature, '', 138, 'dolibarr_notes', 'In', false, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%'); print $doleditor->Create(1); @@ -2622,25 +2583,28 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; - print '</table><hr><table class="border centpercent">'; + print '</table>'; + + print '<hr>'; + + + print '<table class="border centpercent">'; // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) // Default warehouse - if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) - { - print '<tr><td>'.$langs->trans("DefaultWarehouse").'</td><td>'; + if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) { + print '<tr><td class="titlefield">'.$langs->trans("DefaultWarehouse").'</td><td>'; print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1); print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&amp;backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddWarehouse").'"></span></a>'; print '</td></tr>'; } // Position/Job - print '<tr><td class="titlefield">'.$langs->trans("PostOrFunction").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("PostOrFunction").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print '<input size="30" type="text" name="job" value="'.dol_escape_htmltag($object->job).'">'; } else { print '<input type="hidden" name="job" value="'.dol_escape_htmltag($object->job).'">'; @@ -2649,8 +2613,7 @@ if ($action == 'create' || $action == 'adduserldap') print '</td></tr>'; if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) - || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) - { + || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) { $langs->load("salaries"); // THM @@ -2673,8 +2636,7 @@ if ($action == 'create' || $action == 'adduserldap') print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classthm'); print '</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print '<input size="8" type="text" name="tjm" value="'.price2num(GETPOST('tjm') ?GETPOST('tjm') : $object->tjm).'">'; } else { print ($object->tjm != '' ?price($object->tjm, '', $langs, 1, -1, -1, $conf->currency) : ''); @@ -2685,7 +2647,7 @@ if ($action == 'create' || $action == 'adduserldap') // Salary print '<tr><td>'.$langs->trans("Salary").'</td>'; print '<td>'; - print '<input size="8" type="text" name="salary" value="'.price2num(GETPOST('salary') ?GETPOST('salary') : $object->salary).'">'; + print img_picto('', 'salary', 'class="pictofixedwidth paddingright"').'<input size="8" type="text" name="salary" value="'.price2num(GETPOST('salary') ?GETPOST('salary') : $object->salary).'">'; print '</td>'; print "</tr>\n"; } @@ -2693,8 +2655,7 @@ if ($action == 'create' || $action == 'adduserldap') // Weeklyhours print '<tr><td>'.$langs->trans("WeeklyHours").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print '<input size="8" type="text" name="weeklyhours" value="'.price2num(GETPOST('weeklyhours') ?GETPOST('weeklyhours') : $object->weeklyhours).'">'; } else { print price2num($object->weeklyhours); @@ -2705,17 +2666,17 @@ if ($action == 'create' || $action == 'adduserldap') // Date employment print '<tr><td>'.$langs->trans("DateEmployment").'</td>'; print '<td>'; - if ($caneditfield) - { + if ($caneditfield) { print $form->selectDate($dateemployment ? $dateemployment : $object->dateemployment, 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 1); } else { print dol_print_date($object->dateemployment, 'day'); } - if ($dateemployment && $dateemploymentend) print ' - '; + if ($dateemployment && $dateemploymentend) { + print ' - '; + } - if ($caneditfield) - { + if ($caneditfield) { print $form->selectDate($dateemploymentend ? $dateemploymentend : $object->dateemploymentend, 'dateemploymentend', 0, 0, 1, 'formdateemploymentend', 1, 0); } else { print dol_print_date($object->dateemploymentend, 'day'); @@ -2723,29 +2684,6 @@ if ($action == 'create' || $action == 'adduserldap') print '</td>'; print "</tr>\n"; - - // Date login validity - print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; - print '<td>'; - if ($caneditfield) - { - print $form->selectDate($datestartvalidity ? $datestartvalidity : $object->datestartvalidity, 'datestartvalidity', 0, 0, 1, 'formdatestartvalidity', 1, 1); - } else { - print dol_print_date($object->datestartvalidity, 'day'); - } - - if ($datestartvalidity && $dateendvalidity) print ' - '; - - if ($caneditfield) - { - print $form->selectDate($dateendvalidity ? $datendevalidity : $object->dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); - } else { - print dol_print_date($object->dateendvalidity, 'day'); - } - print '</td>'; - print "</tr>\n"; - - // Date birth print '<tr><td>'.$langs->trans("DateOfBirth").'</td>'; print '<td>'; @@ -2770,12 +2708,11 @@ if ($action == 'create' || $action == 'adduserldap') print '</form>'; } - if ($action != 'edit' && $action != 'presend') - { + if ($action != 'edit' && $action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; /* - * Documents generes - */ + * Generated documents + */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->user->dir_output."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; @@ -2800,12 +2737,13 @@ if ($action == 'create' || $action == 'adduserldap') print '</div></div></div>'; } - if (!empty($conf->ldap->enabled) && !empty($object->ldap_sid)) $ldap->close(); + if (!empty($conf->ldap->enabled) && !empty($object->ldap_sid)) { + $ldap->close(); + } } } -if (!empty($conf->api->enabled) && !empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->api->enabled) && !empty($conf->use_javascript_ajax)) { print "\n".'<script type="text/javascript">'; print '$(document).ready(function () { $("#generate_api_key").click(function() { diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 571bca3eb39..f06cf2c09ba 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> -/* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> + * Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> * * 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,7 +30,6 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; class Users extends DolibarrApi { /** - * * @var array $FIELDS Mandatory fields, checked when create and update object */ static $FIELDS = array( @@ -71,12 +70,12 @@ class Users extends DolibarrApi { global $db, $conf; - $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->user->user->lire) { throw new RestException(401, "You are not allowed to read list of users"); } + $obj_ret = array(); + // case of external user, $societe param is ignored and replaced by user's socid //$socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $societe; @@ -87,13 +86,13 @@ class Users extends DolibarrApi } $sql .= ' WHERE t.entity IN ('.getEntity('user').')'; if ($user_ids) { - $sql .= " AND t.rowid IN (".$user_ids.")"; + $sql .= " AND t.rowid IN (".$this->db->sanitize($user_ids).")"; } // Select products of given category if ($category > 0) { $sql .= " AND c.fk_categorie = ".$this->db->escape($category); - $sql .= " AND c.fk_user = t.rowid "; + $sql .= " AND c.fk_user = t.rowid"; } // Add sql filters @@ -150,9 +149,10 @@ class Users extends DolibarrApi */ public function get($id, $includepermissions = 0) { - //if (!DolibarrApiAccess::$user->rights->user->user->lire) { - //throw new RestException(401); - //} + if (empty(DolibarrApiAccess::$user->rights->user->user->lire)) { + throw new RestException(401, 'Not allowed'); + } + if ($id == 0) { $result = $this->useraccount->initAsSpecimen(); } else { @@ -187,9 +187,9 @@ class Users extends DolibarrApi */ public function getByLogin($login, $includepermissions = 0) { - //if (!DolibarrApiAccess::$user->rights->user->user->lire) { - //throw new RestException(401); - //} + if (empty(DolibarrApiAccess::$user->rights->user->user->lire)) { + throw new RestException(401, 'Not allowed'); + } $result = $this->useraccount->fetch('', $login); if (!$result) { @@ -221,9 +221,9 @@ class Users extends DolibarrApi */ public function getByEmail($email, $includepermissions = 0) { - //if (!DolibarrApiAccess::$user->rights->user->user->lire) { - //throw new RestException(401); - //} + if (empty(DolibarrApiAccess::$user->rights->user->user->lire)) { + throw new RestException(401, 'Not allowed'); + } $result = $this->useraccount->fetch('', '', '', 0, -1, $email); if (!$result) { @@ -242,18 +242,22 @@ class Users extends DolibarrApi } /** - * Get properties of user connected + * Get more properties of a user * * @url GET /info * - * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) - * @return array|mixed Data without useless information + * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) + * @return array|mixed Data without useless information * * @throws RestException 401 Insufficient rights * @throws RestException 404 User or group not found */ public function getInfo($includepermissions = 0) { + if (empty(DolibarrApiAccess::$user->rights->user->user->lire)) { + throw new RestException(401, 'Not allowed'); + } + $apiUser = DolibarrApiAccess::$user; $result = $this->useraccount->fetch($apiUser->id); @@ -285,13 +289,16 @@ class Users extends DolibarrApi * * @param array $request_data New user data * @return int + * + * @throws RestException 401 Not allowed */ public function post($request_data = null) { - // check user authorization - //if(! DolibarrApiAccess::$user->rights->user->creer) { - // throw new RestException(401, "User creation not allowed"); - //} + // Check user authorization + if (empty(DolibarrApiAccess::$user->rights->user->user->creer)) { + throw new RestException(401, "User creation not allowed for login ".DolibarrApiAccess::$user->login); + } + // check mandatory fields /*if (!isset($request_data["login"])) throw new RestException(400, "login field missing"); @@ -299,9 +306,23 @@ class Users extends DolibarrApi throw new RestException(400, "password field missing"); if (!isset($request_data["lastname"])) throw new RestException(400, "lastname field missing");*/ + //assign field values foreach ($request_data as $field => $value) { - $this->useraccount->$field = $value; + if (in_array($field, array('pass_crypted', 'pass_indatabase', 'pass_indatabase_crypted', 'pass_temp', 'api_key'))) { + // This properties can't be set/modified with API + throw new RestException(401, 'The property '.$field." can't be set/modified using the APIs"); + continue; + } + /*if ($field == 'pass') { + if (empty(DolibarrApiAccess::$user->rights->user->user->password)) { + throw new RestException(401, 'You are not allowed to modify/set password of other users'); + continue; + } + } + */ + + $this->useraccount->$field = $value; } if ($this->useraccount->create(DolibarrApiAccess::$user) < 0) { @@ -312,7 +333,7 @@ class Users extends DolibarrApi /** - * Update account + * Update user account * * @param int $id Id of account to update * @param array $request_data Datas @@ -324,9 +345,10 @@ class Users extends DolibarrApi */ public function put($id, $request_data = null) { - //if (!DolibarrApiAccess::$user->rights->user->user->creer) { - //throw new RestException(401); - //} + // Check user authorization + if (empty(DolibarrApiAccess::$user->rights->user->creer)) { + throw new RestException(401, "User update not allowed"); + } $result = $this->useraccount->fetch($id); if (!$result) { @@ -341,6 +363,33 @@ class Users extends DolibarrApi if ($field == 'id') { continue; } + if (in_array($field, array('pass_crypted', 'pass_indatabase', 'pass_indatabase_crypted', 'pass_temp', 'api_key'))) { + // This properties can't be set/modified with API + throw new RestException(401, 'The property '.$field." can't be set/modified using the APIs"); + continue; + } + if ($field == 'pass') { + if ($this->useraccount->id != DolibarrApiAccess::$user->id && empty(DolibarrApiAccess::$user->rights->user->user->password)) { + throw new RestException(401, 'You are not allowed to modify password of other users'); + continue; + } + if ($this->useraccount->id == DolibarrApiAccess::$user->id && empty(DolibarrApiAccess::$user->rights->user->self->password)) { + throw new RestException(401, 'You are not allowed to modify your own password'); + continue; + } + } + if (DolibarrApiAccess::$user->admin) { // If user for API is admin + if ($field == 'admin' && $value != $this->useraccount->admin && empty($value)) { + throw new RestException(401, 'Reseting the admin status of a user is not possible using the API'); + } + } else { + if ($field == 'admin' && $value != $this->useraccount->admin) { + throw new RestException(401, 'Only an admin user can modify the admin status of another user'); + } + } + if ($field == 'entity' && $value != $this->useraccount->entity) { + throw new RestException(401, 'Changing entity of a user using the APIs is not possible'); + } // The status must be updated using setstatus() because it // is not handled by the update() method. if ($field == 'statut') { @@ -376,12 +425,12 @@ class Users extends DolibarrApi */ public function getGroups($id) { - $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->user->user->lire) { throw new RestException(403); } + $obj_ret = array(); + $user = new User($this->db); $result = $user->fetch($id); if (!$result) { @@ -406,16 +455,20 @@ class Users extends DolibarrApi * @param int $entity Entity ID (valid only for superadmin in multicompany transverse mode) * @return int 1 if success * + * @throws RestException 401 Not allowed + * @throws RestException 404 User not found + * @throws RestException 500 Error + * * @url GET {id}/setGroup/{group} */ public function setGroup($id, $group, $entity = 1) { - global $conf; - //if (!DolibarrApiAccess::$user->rights->user->user->supprimer) { - //throw new RestException(401); - //} + if (empty(DolibarrApiAccess::$user->rights->user->user->creer)) { + throw new RestException(401); + } + $result = $this->useraccount->fetch($id); if (!$result) { throw new RestException(404, 'User not found'); @@ -455,6 +508,9 @@ class Users extends DolibarrApi * @param string $group_ids Groups ids filter field. Example: '1' or '1,2,3' {@pattern /^[0-9,]*$/i} * @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 User objects + * + * @throws RestException 404 User not found + * @throws RestException 503 Error */ public function listGroups($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $group_ids = 0, $sqlfilters = '') { @@ -462,8 +518,9 @@ class Users extends DolibarrApi $obj_ret = array(); - if (!DolibarrApiAccess::$user->rights->user->group_advance->read) { - throw new RestException(401, "You are not allowed to read list of groups"); + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->user->lire)) || + !empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->group_advance->read)) { + throw new RestException(401, "You are not allowed to read groups"); } // case of external user, $societe param is ignored and replaced by user's socid @@ -473,7 +530,7 @@ class Users extends DolibarrApi $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as t"; $sql .= ' WHERE t.entity IN ('.getEntity('user').')'; if ($group_ids) { - $sql .= " AND t.rowid IN (".$group_ids.")"; + $sql .= " AND t.rowid IN (".$this->db->sanitize($group_ids).")"; } // Add sql filters if ($sqlfilters) { @@ -527,12 +584,16 @@ class Users extends DolibarrApi * @param int $group ID of group * @param int $load_members Load members list or not {@min 0} {@max 1} * @return array Array of User objects + * + * @throws RestException 401 Not allowed + * @throws RestException 404 User not found */ public function infoGroups($group, $load_members = 0) { global $db, $conf; - if (!DolibarrApiAccess::$user->rights->user->group_advance->read) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->user->lire)) || + !empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty(DolibarrApiAccess::$user->rights->user->group_advance->read)) { throw new RestException(401, "You are not allowed to read groups"); } @@ -547,16 +608,19 @@ class Users extends DolibarrApi } /** - * Delete account + * Delete account/user * * @param int $id Account ID * @return array + * + * @throws RestException 401 Not allowed + * @throws RestException 404 User not found */ public function delete($id) { - //if (!DolibarrApiAccess::$user->rights->user->user->supprimer) { - //throw new RestException(401); - //} + if (empty(DolibarrApiAccess::$user->rights->user->user->supprimer)) { + throw new RestException(401, 'Not allowed'); + } $result = $this->useraccount->fetch($id); if (!$result) { throw new RestException(404, 'User not found'); diff --git a/htdocs/user/class/index.html b/htdocs/user/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 241057047e5..7de7eb5f0bb 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -457,7 +457,7 @@ class User extends CommonObject } elseif ($email) { $sql .= " AND u.email = '".$this->db->escape($email)."'"; } else { - $sql .= " AND u.rowid = ".$id; + $sql .= " AND u.rowid = ".((int) $id); } $sql .= " ORDER BY u.entity ASC"; // Avoid random result when there is 2 login in 2 different entities @@ -604,38 +604,38 @@ class User extends CommonObject } /** - * Load default value in property ->default_values + * Load default values from database table into property ->default_values * * @return int > 0 if OK, < 0 if KO */ public function loadDefaultValues() { global $conf; + if (!empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) { + // Load user->default_values for user. TODO Save this in memcached ? + require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php'; - // Load user->default_values for user. TODO Save this in memcached ? - $sql = "SELECT rowid, entity, type, page, param, value"; - $sql .= " FROM ".MAIN_DB_PREFIX."default_values"; - $sql .= " WHERE entity IN (".($this->entity > 0 ? $this->entity.", " : "").$conf->entity.")"; // Entity of user (if defined) + current entity - $sql .= " AND user_id IN (0".($this->id > 0 ? ", ".$this->id : "").")"; // User 0 (all) + me (if defined) - $resql = $this->db->query($sql); - if ($resql) { - while ($obj = $this->db->fetch_object($resql)) { - if (!empty($obj->page) && !empty($obj->type) && !empty($obj->param)) { - // $obj->page is relative URL with or without params - // $obj->type can be 'filters', 'sortorder', 'createform', ... - // $obj->param is key or param - $pagewithoutquerystring = $obj->page; - $pagequeries = ''; - $reg = array(); - if (preg_match('/^([^\?]+)\?(.*)$/', $pagewithoutquerystring, $reg)) { // There is query param - $pagewithoutquerystring = $reg[1]; - $pagequeries = $reg[2]; + $defaultValues = new DefaultValues($this->db); + $result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity))); // User 0 (all) + me (if defined) + + if (!is_array($result) && $result < 0) { + setEventMessages($defaultValues->error, $defaultValues->errors, 'errors'); + dol_print_error($this->db); + return -1; + } elseif (count($result) > 0) { + foreach ($result as $defval) { + if (!empty($defval->page) && !empty($defval->type) && !empty($defval->param)) { + $pagewithoutquerystring = $defval->page; + $pagequeries = ''; + $reg = array(); + if (preg_match('/^([^\?]+)\?(.*)$/', $pagewithoutquerystring, $reg)) { // There is query param + $pagewithoutquerystring = $reg[1]; + $pagequeries = $reg[2]; + } + $this->default_values[$pagewithoutquerystring][$defval->type][$pagequeries ? $pagequeries : '_noquery_'][$defval->param] = $defval->value; } - $this->default_values[$pagewithoutquerystring][$obj->type][$pagequeries ? $pagequeries : '_noquery_'][$obj->param] = $obj->value; - //if ($pagequeries) $this->default_values[$pagewithoutquerystring][$obj->type.'_queries']=$pagequeries; } } - // Sort by key, so _noquery_ is last if (!empty($this->default_values)) { foreach ($this->default_values as $a => $b) { foreach ($b as $c => $d) { @@ -643,13 +643,8 @@ class User extends CommonObject } } } - $this->db->free($resql); - - return 1; - } else { - dol_print_error($this->db); - return -1; } + return 1; } /** @@ -678,8 +673,7 @@ class User extends CommonObject if (!empty($rid)) { $module = $perms = $subperms = ''; - // Si on a demande ajout d'un droit en particulier, on recupere - // les caracteristiques (module, perms et subperms) de ce droit. + // Si on a demande ajout d'un droit en particulier, on recupere les caracteristiques (module, perms et subperms) de ce droit. $sql = "SELECT module, perms, subperms"; $sql .= " FROM ".MAIN_DB_PREFIX."rights_def"; $sql .= " WHERE id = ".((int) $rid); @@ -723,7 +717,7 @@ class User extends CommonObject } } - // Ajout des droits trouves grace au critere whereforadd + // Add automatically other permission using the criteria whereforadd if (!empty($whereforadd)) { //print "$module-$perms-$subperms"; $sql = "SELECT id"; @@ -876,7 +870,7 @@ class User extends CommonObject $nid = $obj->id; $sql = "DELETE FROM ".MAIN_DB_PREFIX."user_rights"; - $sql .= " WHERE fk_user = ".$this->id." AND fk_id=".$nid; + $sql .= " WHERE fk_user = ".$this->id." AND fk_id = ".((int) $nid); $sql .= " AND entity = ".$entity; if (!$this->db->query($sql)) { $error++; @@ -1115,16 +1109,14 @@ class User extends CommonObject // Check parameters if ($this->statut == $status) { return 0; - } else { - $this->statut = $status; } $this->db->begin(); // Save in database $sql = "UPDATE ".MAIN_DB_PREFIX."user"; - $sql .= " SET statut = ".$this->statut; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " SET statut = ".((int) $status); + $sql .= " WHERE rowid = ".((int) $this->id); $result = $this->db->query($sql); dol_syslog(get_class($this)."::setstatus", LOG_DEBUG); @@ -1141,6 +1133,8 @@ class User extends CommonObject $this->db->rollback(); return -$error; } else { + $this->status = $status; + $this->statut = $status; $this->db->commit(); return 1; } @@ -1159,40 +1153,7 @@ class User extends CommonObject public function setCategories($categories) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - - $type_categ = Categorie::TYPE_USER; - - // 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; - } - - // 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) { - $c->add_type($this, $type_categ); - } - } - - return; + return parent::setCategoriesCommon($categories, Categorie::TYPE_USER); } /** @@ -1237,7 +1198,7 @@ class User extends CommonObject // If contact, remove link if ($this->contact_id > 0) { - $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".$this->contact_id; + $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".((int) $this->contact_id); if (!$error && !$this->db->query($sql)) { $error++; $this->error = $this->db->lasterror(); @@ -1435,6 +1396,7 @@ class User extends CommonObject $this->address = $contact->address; $this->zip = $contact->zip; $this->town = $contact->town; + $this->setUpperOrLowerCase(); $this->state_id = $contact->state_id; $this->country_id = $contact->country_id; $this->employee = 0; @@ -1457,6 +1419,7 @@ class User extends CommonObject $sql .= ", fk_soc=".$contact->socid; } $sql .= " WHERE rowid=".((int) $this->id); + $resql = $this->db->query($sql); dol_syslog(get_class($this)."::create_from_contact", LOG_DEBUG); @@ -1506,12 +1469,13 @@ class User extends CommonObject $this->civility_code = $member->civility_id; $this->lastname = $member->lastname; $this->firstname = $member->firstname; - $this->gender = $member->gender; + $this->gender = $member->gender; $this->email = $member->email; $this->fk_member = $member->id; $this->address = $member->address; $this->zip = $member->zip; $this->town = $member->town; + $this->setUpperOrLowerCase(); $this->state_id = $member->state_id; $this->country_id = $member->country_id; $this->socialnetworks = $member->socialnetworks; @@ -1538,7 +1502,7 @@ class User extends CommonObject } elseif (!empty($this->pass_crypted)) { // If a crypted password is already known, we save it directly into database because the previous create did not save it. $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET pass_crypted = '".$this->db->escape($this->pass_crypted)."'"; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -1549,7 +1513,7 @@ class User extends CommonObject if ($result > 0 && $member->fk_soc) { // If member is linked to a thirdparty $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET fk_soc=".$member->fk_soc; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1669,6 +1633,7 @@ class User extends CommonObject $this->address = empty($this->address) ? '' : $this->address; $this->zip = empty($this->zip) ? '' : $this->zip; $this->town = empty($this->town) ? '' : $this->town; + $this->setUpperOrLowerCase(); $this->accountancy_code = trim($this->accountancy_code); $this->color = empty($this->color) ? '' : $this->color; $this->dateemployment = empty($this->dateemployment) ? '' : $this->dateemployment; @@ -1771,7 +1736,7 @@ class User extends CommonObject // If user is linked to a member, remove old link to this member if ($this->fk_member > 0) { dol_syslog(get_class($this)."::update remove link with member. We will recreate it later", LOG_DEBUG); - $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL where fk_member = ".$this->fk_member; + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL where fk_member = ".((int) $this->fk_member); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); $this->db->rollback(); return -5; @@ -1779,7 +1744,7 @@ class User extends CommonObject } // Set link to user dol_syslog(get_class($this)."::update set link with member", LOG_DEBUG); - $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member =".($this->fk_member > 0 ? $this->fk_member : 'null')." where rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member =".($this->fk_member > 0 ? ((int) $this->fk_member) : 'null')." where rowid = ".((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->error(); $this->db->rollback(); return -5; @@ -1960,13 +1925,14 @@ class User extends CommonObject * Change password of a user * * @param User $user Object user of user requesting the change (not the user for who we change the password). May be unknown. - * @param string $password New password in clear text (to generate if not provided) - * @param int $changelater 1=Change password only after clicking on confirm email + * @param string $password New password, in clear text or already encrypted (to generate if not provided) + * @param int $changelater 0=Default, 1=Save password into pass_temp to change password only after clicking on confirm email * @param int $notrigger 1=Does not launch triggers * @param int $nosyncmember Do not synchronize linked member + * @param int $passwordalreadycrypted 0=Value is cleartext password, 1=Value is crypted value. * @return string If OK return clear password, 0 if no change, < 0 if error */ - public function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0) + public function setPassword($user, $password = '', $changelater = 0, $notrigger = 0, $nosyncmember = 0, $passwordalreadycrypted = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -1981,9 +1947,11 @@ class User extends CommonObject } // Crypt password - $password_crypted = dol_hash($password); + if (empty($passwordalreadycrypted)) { + $password_crypted = dol_hash($password); + } - // Mise a jour + // Update password if (!$changelater) { if (!is_object($this->oldcopy)) { $this->oldcopy = clone $this; @@ -2053,8 +2021,8 @@ class User extends CommonObject return -1; } } else { - // We store clear password in password temporary field. - // After receiving confirmation link, we will crypt it and store it in pass_crypted + // We store password in password temporary field. + // After receiving confirmation link, we will erase and store it in pass_crypted $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET pass_temp = '".$this->db->escape($password)."'"; $sql .= " WHERE rowid = ".$this->id; @@ -2070,7 +2038,6 @@ class User extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Send new password by email @@ -2083,7 +2050,7 @@ class User extends CommonObject public function send_password($user, $password = '', $changelater = 0) { // phpcs:enable - global $conf, $langs; + global $conf, $langs, $mysoc; global $dolibarr_main_url_root; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -2114,7 +2081,7 @@ class User extends CommonObject $appli = $conf->global->MAIN_APPLICATION_TITLE; } - $subject = $outputlangs->transnoentitiesnoconv("SubjectNewPassword", $appli); + $subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("SubjectNewPassword", $appli); // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -2134,16 +2101,22 @@ class User extends CommonObject dol_syslog(get_class($this)."::send_password changelater is off, url=".$url); } else { - $url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword&username='.urlencode($this->login)."&passwordhash=".dol_hash($password); + global $dolibarr_main_instance_unique_id; - $mesg .= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived")."\n"; - $mesg .= $outputlangs->transnoentitiesnoconv("NewKeyWillBe")." :\n\n"; - $mesg .= $outputlangs->transnoentitiesnoconv("Login")." = ".$this->login."\n"; - $mesg .= $outputlangs->transnoentitiesnoconv("Password")." = ".$password."\n\n"; - $mesg .= "\n"; - $mesg .= $outputlangs->transnoentitiesnoconv("YouMustClickToChange")." :\n"; - $mesg .= $url."\n\n"; - $mesg .= $outputlangs->transnoentitiesnoconv("ForgetIfNothing")."\n\n"; + //print $password.'-'.$this->id.'-'.$dolibarr_main_instance_unique_id; + $url = $urlwithroot.'/user/passwordforgotten.php?action=validatenewpassword'; + $url .= '&username='.urlencode($this->login)."&passworduidhash=".urlencode(dol_hash($password.'-'.$this->id.'-'.$dolibarr_main_instance_unique_id)); + + $msgishtml = 1; + + $mesg .= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived")."<br>\n"; + $mesg .= $outputlangs->transnoentitiesnoconv("NewKeyWillBe")." :<br>\n<br>\n"; + $mesg .= '<strong>'.$outputlangs->transnoentitiesnoconv("Login")."</strong> = ".$this->login."<br>\n"; + $mesg .= '<strong>'.$outputlangs->transnoentitiesnoconv("Password")."</strong> = ".$password."<br>\n<br>\n"; + $mesg .= "<br>\n"; + $mesg .= $outputlangs->transnoentitiesnoconv("YouMustClickToChange")." :<br>\n"; + $mesg .= '<a href="'.$url.'" rel="noopener">'.$outputlangs->transnoentitiesnoconv("ConfirmPasswordChange").'</a>'."<br>\n<br>\n"; + $mesg .= $outputlangs->transnoentitiesnoconv("ForgetIfNothing")."<br>\n<br>\n"; dol_syslog(get_class($this)."::send_password changelater is on, url=".$url); } @@ -2263,7 +2236,7 @@ class User extends CommonObject /** * Add user into a group * - * @param int $group Id of group + * @param int $group Id of group * @param int $entity Entity * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK @@ -2279,7 +2252,7 @@ class User extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_user"; $sql .= " WHERE fk_user = ".$this->id; - $sql .= " AND fk_usergroup = ".$group; + $sql .= " AND fk_usergroup = ".((int) $group); $sql .= " AND entity = ".$entity; $result = $this->db->query($sql); @@ -2320,7 +2293,7 @@ class User extends CommonObject /** * Remove a user from a group * - * @param int $group Id of group + * @param int $group Id of group * @param int $entity Entity * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK @@ -2336,7 +2309,7 @@ class User extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_user"; $sql .= " WHERE fk_user = ".$this->id; - $sql .= " AND fk_usergroup = ".$group; + $sql .= " AND fk_usergroup = ".((int) $group); $sql .= " AND entity = ".$entity; $result = $this->db->query($sql); @@ -2532,9 +2505,8 @@ class User extends CommonObject // Only picto if ($withpictoimg > 0) { $picto = '<!-- picto user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : 'class="paddingright classfortooltip"'), 0, 0, $notooltip ? 0 : 1).'</span>'; - } - // Picto must be a photo - else { + } else { + // Picto must be a photo $picto = '<!-- picto photo user --><span class="nopadding userimg'.($morecss ? ' '.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg == -3 ? 'small' : ''), 'mini', 0, 1).'</span>'; } $result .= $picto; @@ -2769,9 +2741,9 @@ class User extends CommonObject if (!empty($conf->global->LDAP_FIELD_PASSWORD_CRYPTED)) { $info[$conf->global->LDAP_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // Create OpenLDAP MD5 password (TODO add type of encryption) } - } - // Set LDAP password if possible - elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') { // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password + } elseif ($conf->global->LDAP_SERVER_PROTOCOLVERSION !== '3') { + // Set LDAP password if possible + // If ldap key is modified and LDAPv3 we use ldap_rename function for avoid lose encrypt password if (!empty($conf->global->DATABASE_PWD_ENCRYPTED)) { // Just for the default MD5 ! if (empty($conf->global->MAIN_SECURITY_HASH_ALGO)) { @@ -2779,9 +2751,8 @@ class User extends CommonObject $info[$conf->global->LDAP_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass_indatabase_crypted, 5); // Create OpenLDAP MD5 password from Dolibarr MD5 password } } - } - // Use $this->pass_indatabase value if exists - elseif (!empty($this->pass_indatabase)) { + } elseif (!empty($this->pass_indatabase)) { + // Use $this->pass_indatabase value if exists if (!empty($conf->global->LDAP_FIELD_PASSWORD)) { $info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass_indatabase; // $this->pass_indatabase = mot de passe non crypte } @@ -2902,7 +2873,7 @@ class User extends CommonObject $sql = "SELECT u.rowid, u.login as ref, u.datec,"; $sql .= " u.tms as date_modification, u.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE u.rowid = ".$id; + $sql .= " WHERE u.rowid = ".((int) $id); $result = $this->db->query($sql); if ($result) { @@ -3101,7 +3072,7 @@ class User extends CommonObject * fullpath = chemin complet compose des id: "_grandparentid_parentid_id" * * @param int $deleteafterid Removed all users including the leaf $deleteafterid (and all its child) in user tree. - * @param string $filter SQL filter on users + * @param string $filter SQL filter on users. This parameter must not come from user intput. * @return array Array of users $this->users. Note: $this->parentof is also set. */ public function get_full_tree($deleteafterid = 0, $filter = '') diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index 2fc43e929ec..7323fb93ab2 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -96,10 +96,8 @@ class UserBankAccount extends Account $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_rib (fk_user, datec)"; $sql .= " VALUES (".$this->userid.", '".$this->db->idate($now)."')"; $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->affected_rows($resql)) - { + if ($resql) { + if ($this->db->affected_rows($resql)) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."user_rib"); return $this->update($user); @@ -121,8 +119,7 @@ class UserBankAccount extends Account { global $conf; - if (!$this->id) - { + if (!$this->id) { $this->create(); } @@ -138,14 +135,15 @@ class UserBankAccount extends Account $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; - if (trim($this->label) != '') + if (trim($this->label) != '') { $sql .= ",label = '".$this->db->escape($this->label)."'"; - else $sql .= ",label = NULL"; + } else { + $sql .= ",label = NULL"; + } $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - if ($result) - { + if ($result) { return 1; } else { dol_print_error($this->db); @@ -163,20 +161,26 @@ class UserBankAccount extends Account */ public function fetch($id, $ref = '', $userid = 0) { - if (empty($id) && empty($ref) && empty($userid)) return -1; + if (empty($id) && empty($ref) && empty($userid)) { + return -1; + } $sql = "SELECT rowid, fk_user, entity, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; $sql .= " owner_address, label, datec, tms as datem"; $sql .= " FROM ".MAIN_DB_PREFIX."user_rib"; - if ($id) $sql .= " WHERE rowid = ".$id; - if ($ref) $sql .= " WHERE label = '".$this->db->escape($ref)."'"; - if ($userid) $sql .= " WHERE fk_user = ".((int) $userid); + if ($id) { + $sql .= " WHERE rowid = ".((int) $id); + } + if ($ref) { + $sql .= " WHERE label = '".$this->db->escape($ref)."'"; + } + if ($userid) { + $sql .= " WHERE fk_user = ".((int) $userid); + } $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { + if ($resql) { + if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 5ba6b5553af..3738c63b435 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -28,7 +28,9 @@ */ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -if (!empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"; +if (!empty($conf->ldap->enabled)) { + require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"; +} /** @@ -154,8 +156,7 @@ class UserGroup extends CommonObject global $conf; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - if (!empty($groupname)) - { + if (!empty($groupname)) { $result = $this->fetchCommon(0, '', ' AND nom = \''.$this->db->escape($groupname).'\''); } else { $result = $this->fetchCommon($id); @@ -163,10 +164,8 @@ class UserGroup extends CommonObject $this->name = $this->nom; // For compatibility with field name - if ($result) - { - if ($load_members) - { + if ($result) { + if ($load_members) { $this->members = $this->listUsersForGroup(); } @@ -196,8 +195,7 @@ class UserGroup extends CommonObject $sql .= " ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ug.fk_usergroup = g.rowid"; $sql .= " AND ug.fk_user = ".$userid; - if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && !$user->entity) { $sql .= " AND g.entity IS NOT NULL"; } else { $sql .= " AND g.entity IN (0,".$conf->entity.")"; @@ -206,12 +204,9 @@ class UserGroup extends CommonObject dol_syslog(get_class($this)."::listGroupsForUser", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { - while ($obj = $this->db->fetch_object($result)) - { - if (!array_key_exists($obj->rowid, $ret)) - { + if ($result) { + while ($obj = $this->db->fetch_object($result)) { + if (!array_key_exists($obj->rowid, $ret)) { $newgroup = new UserGroup($this->db); $newgroup->fetch($obj->rowid, '', $load_members); $ret[$obj->rowid] = $newgroup; @@ -243,37 +238,43 @@ class UserGroup extends CommonObject $ret = array(); $sql = "SELECT u.rowid"; - if (!empty($this->id)) $sql .= ", ug.entity as usergroup_entity"; + if (!empty($this->id)) { + $sql .= ", ug.entity as usergroup_entity"; + } $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($this->id)) $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; + if (!empty($this->id)) { + $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; + } $sql .= " WHERE 1 = 1"; - if (!empty($this->id)) $sql .= " AND ug.fk_user = u.rowid"; - if (!empty($this->id)) $sql .= " AND ug.fk_usergroup = ".$this->id; - if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!empty($this->id)) { + $sql .= " AND ug.fk_user = u.rowid"; + } + if (!empty($this->id)) { + $sql .= " AND ug.fk_usergroup = ".$this->id; + } + if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && !$user->entity) { $sql .= " AND u.entity IS NOT NULL"; } else { $sql .= " AND u.entity IN (0,".$conf->entity.")"; } - if (!empty($excludefilter)) $sql .= ' AND ('.$excludefilter.')'; + if (!empty($excludefilter)) { + $sql .= ' AND ('.$excludefilter.')'; + } dol_syslog(get_class($this)."::listUsersForGroup", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - if (!array_key_exists($obj->rowid, $ret)) - { - if ($mode != 1) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + if (!array_key_exists($obj->rowid, $ret)) { + if ($mode != 1) { $newuser = new User($this->db); $newuser->fetch($obj->rowid); $ret[$obj->rowid] = $newuser; - } else $ret[$obj->rowid] = $obj->rowid; + } else { + $ret[$obj->rowid] = $obj->rowid; + } } - if ($mode != 1 && !empty($obj->usergroup_entity)) - { + if ($mode != 1 && !empty($obj->usergroup_entity)) { $ret[$obj->rowid]->usergroup_entity[] = $obj->usergroup_entity; } } @@ -308,8 +309,7 @@ class UserGroup extends CommonObject $this->db->begin(); - if (!empty($rid)) - { + if (!empty($rid)) { $module = $perms = $subperms = ''; // Si on a demande ajout d'un droit en particulier, on recupere @@ -335,25 +335,27 @@ class UserGroup extends CommonObject // Where pour la liste des droits a ajouter $whereforadd = "id=".((int) $rid); // Find also rights that are herited to add them too - if ($subperms) $whereforadd .= " OR (module='".$this->db->escape($module)."' AND perms='".$this->db->escape($perms)."' AND (subperms='lire' OR subperms='read'))"; - elseif ($perms) $whereforadd .= " OR (module='".$this->db->escape($module)."' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + if ($subperms) { + $whereforadd .= " OR (module='".$this->db->escape($module)."' AND perms='".$this->db->escape($perms)."' AND (subperms='lire' OR subperms='read'))"; + } elseif ($perms) { + $whereforadd .= " OR (module='".$this->db->escape($module)."' AND (perms='lire' OR perms='read') AND subperms IS NULL)"; + } } else { // Where pour la liste des droits a ajouter - if (!empty($allmodule)) - { - if ($allmodule == 'allmodules') - { + if (!empty($allmodule)) { + if ($allmodule == 'allmodules') { $whereforadd = 'allmodules'; } else { $whereforadd = "module='".$this->db->escape($allmodule)."'"; - if (!empty($allperms)) $whereforadd .= " AND perms='".$this->db->escape($allperms)."'"; + if (!empty($allperms)) { + $whereforadd .= " AND perms='".$this->db->escape($allperms)."'"; + } } } } // Add permission of the list $whereforadd - if (!empty($whereforadd)) - { + if (!empty($whereforadd)) { //print "$module-$perms-$subperms"; $sql = "SELECT id"; $sql .= " FROM ".MAIN_DB_PREFIX."rights_def"; @@ -363,19 +365,21 @@ class UserGroup extends CommonObject } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($result); $nid = $obj->id; $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_rights WHERE fk_usergroup = $this->id AND fk_id=".$nid." AND entity = ".$entity; - if (!$this->db->query($sql)) $error++; + if (!$this->db->query($sql)) { + $error++; + } $sql = "INSERT INTO ".MAIN_DB_PREFIX."usergroup_rights (entity, fk_usergroup, fk_id) VALUES (".$entity.", ".$this->id.", ".$nid.")"; - if (!$this->db->query($sql)) $error++; + if (!$this->db->query($sql)) { + $error++; + } $i++; } @@ -384,14 +388,15 @@ class UserGroup extends CommonObject dol_print_error($this->db); } - if (!$error) - { + if (!$error) { $langs->load("other"); $this->context = array('audit'=>$langs->trans("PermissionsAdd").($rid ? ' (id='.$rid.')' : '')); // Call trigger $result = $this->call_trigger('USERGROUP_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } @@ -426,8 +431,7 @@ class UserGroup extends CommonObject $this->db->begin(); - if (!empty($rid)) - { + if (!empty($rid)) { $module = $perms = $subperms = ''; // Si on a demande supression d'un droit en particulier, on recupere @@ -453,29 +457,32 @@ class UserGroup extends CommonObject // Where pour la liste des droits a supprimer $wherefordel = "id=".$this->db->escape($rid); // Suppression des droits induits - if ($subperms == 'lire' || $subperms == 'read') $wherefordel .= " OR (module='".$this->db->escape($module)."' AND perms='".$this->db->escape($perms)."' AND subperms IS NOT NULL)"; - if ($perms == 'lire' || $perms == 'read') $wherefordel .= " OR (module='".$this->db->escape($module)."')"; + if ($subperms == 'lire' || $subperms == 'read') { + $wherefordel .= " OR (module='".$this->db->escape($module)."' AND perms='".$this->db->escape($perms)."' AND subperms IS NOT NULL)"; + } + if ($perms == 'lire' || $perms == 'read') { + $wherefordel .= " OR (module='".$this->db->escape($module)."')"; + } // Pour compatibilite, si lowid = 0, on est en mode suppression de tout // TODO A virer quand sera gere par l'appelant //if (substr($rid,-1,1) == 0) $wherefordel="module='$module'"; } else { // Add permission of the list $wherefordel - if (!empty($allmodule)) - { - if ($allmodule == 'allmodules') - { + if (!empty($allmodule)) { + if ($allmodule == 'allmodules') { $wherefordel = 'allmodules'; } else { $wherefordel = "module='".$this->db->escape($allmodule)."'"; - if (!empty($allperms)) $wherefordel .= " AND perms='".$this->db->escape($allperms)."'"; + if (!empty($allperms)) { + $wherefordel .= " AND perms='".$this->db->escape($allperms)."'"; + } } } } // Suppression des droits de la liste wherefordel - if (!empty($wherefordel)) - { + if (!empty($wherefordel)) { //print "$module-$perms-$subperms"; $sql = "SELECT id"; $sql .= " FROM ".MAIN_DB_PREFIX."rights_def"; @@ -485,12 +492,10 @@ class UserGroup extends CommonObject } $result = $this->db->query($sql); - if ($result) - { + if ($result) { $num = $this->db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $nid = 0; $obj = $this->db->fetch_object($result); @@ -499,9 +504,11 @@ class UserGroup extends CommonObject } $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_rights"; - $sql .= " WHERE fk_usergroup = $this->id AND fk_id=".$nid; + $sql .= " WHERE fk_usergroup = $this->id AND fk_id=".((int) $nid); $sql .= " AND entity = ".$entity; - if (!$this->db->query($sql)) $error++; + if (!$this->db->query($sql)) { + $error++; + } $i++; } @@ -510,14 +517,15 @@ class UserGroup extends CommonObject dol_print_error($this->db); } - if (!$error) - { + if (!$error) { $langs->load("other"); $this->context = array('audit'=>$langs->trans("PermissionsDelete").($rid ? ' (id='.$rid.')' : '')); // Call trigger $result = $this->call_trigger('USERGROUP_MODIFY', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } } @@ -542,14 +550,12 @@ class UserGroup extends CommonObject { global $conf; - if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag]) - { + if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag]) { // Rights for this module are already loaded, so we leave return; } - if (!empty($this->all_permissions_are_loaded)) - { + if (!empty($this->all_permissions_are_loaded)) { // We already loaded all rights for this group, so we leave return; } @@ -564,16 +570,16 @@ class UserGroup extends CommonObject $sql .= " AND u.entity = ".$conf->entity; $sql .= " AND u.fk_usergroup = ".$this->id; $sql .= " AND r.perms IS NOT NULL"; - if ($moduletag) $sql .= " AND r.module = '".$this->db->escape($moduletag)."'"; + if ($moduletag) { + $sql .= " AND r.module = '".$this->db->escape($moduletag)."'"; + } dol_syslog(get_class($this).'::getrights', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($obj) { @@ -581,17 +587,25 @@ class UserGroup extends CommonObject $perms = $obj->perms; $subperms = $obj->subperms; - if ($perms) - { - if (!isset($this->rights)) $this->rights = new stdClass(); // For avoid error - if (!isset($this->rights->$module) || !is_object($this->rights->$module)) $this->rights->$module = new stdClass(); - if ($subperms) - { - if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = new stdClass(); - if (empty($this->rights->$module->$perms->$subperms)) $this->nb_rights++; + if ($perms) { + if (!isset($this->rights)) { + $this->rights = new stdClass(); // For avoid error + } + if (!isset($this->rights->$module) || !is_object($this->rights->$module)) { + $this->rights->$module = new stdClass(); + } + if ($subperms) { + if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) { + $this->rights->$module->$perms = new stdClass(); + } + if (empty($this->rights->$module->$perms->$subperms)) { + $this->nb_rights++; + } $this->rights->$module->$perms->$subperms = 1; } else { - if (empty($this->rights->$module->$perms)) $this->nb_rights++; + if (empty($this->rights->$module->$perms)) { + $this->nb_rights++; + } $this->rights->$module->$perms = 1; } } @@ -602,8 +616,7 @@ class UserGroup extends CommonObject $this->db->free($resql); } - if ($moduletag == '') - { + if ($moduletag == '') { // Si module etait non defini, alors on a tout charge, on peut donc considerer // que les droits sont en cache (car tous charges) pour cet instance de group $this->all_permissions_are_loaded = 1; @@ -641,7 +654,9 @@ class UserGroup extends CommonObject $this->nom = $this->name; // Field for 'name' is called 'nom' in database } - if (!isset($this->entity)) $this->entity = $conf->entity; // If not defined, we use default value + if (!isset($this->entity)) { + $this->entity = $conf->entity; // If not defined, we use default value + } return $this->createCommon($user, $notrigger); } @@ -708,7 +723,9 @@ class UserGroup extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) $withpicto = 0; + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) { + $withpicto = 0; + } $result = ''; $label = ''; @@ -720,19 +737,20 @@ class UserGroup extends CommonObject $url = DOL_URL_ROOT.'/user/group/card.php?id='.$this->id; - if ($option != 'nolink') - { + 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'; + 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)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $langs->load("users"); $label = $langs->trans("ShowGroup"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1, 1).'"'; @@ -753,16 +771,23 @@ class UserGroup extends CommonObject $linkend = '</a>'; $result = $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->name; + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + if ($withpicto != 2) { + $result .= $this->name; + } $result .= $linkend; global $action; $hookmanager->initHooks(array('groupdao')); $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; + if ($reshook > 0) { + $result = $hookmanager->resPrint; + } else { + $result .= $hookmanager->resPrint; + } return $result; } @@ -783,9 +808,15 @@ class UserGroup extends CommonObject // phpcs:enable global $conf; $dn = ''; - if ($mode == 0) $dn = $conf->global->LDAP_KEY_GROUPS."=".$info[$conf->global->LDAP_KEY_GROUPS].",".$conf->global->LDAP_GROUP_DN; - if ($mode == 1) $dn = $conf->global->LDAP_GROUP_DN; - if ($mode == 2) $dn = $conf->global->LDAP_KEY_GROUPS."=".$info[$conf->global->LDAP_KEY_GROUPS]; + if ($mode == 0) { + $dn = $conf->global->LDAP_KEY_GROUPS."=".$info[$conf->global->LDAP_KEY_GROUPS].",".$conf->global->LDAP_GROUP_DN; + } + if ($mode == 1) { + $dn = $conf->global->LDAP_GROUP_DN; + } + if ($mode == 2) { + $dn = $conf->global->LDAP_KEY_GROUPS."=".$info[$conf->global->LDAP_KEY_GROUPS]; + } return $dn; } @@ -808,14 +839,16 @@ class UserGroup extends CommonObject $info["objectclass"] = explode(',', $conf->global->LDAP_GROUP_OBJECT_CLASS); // Champs - if ($this->name && !empty($conf->global->LDAP_GROUP_FIELD_FULLNAME)) $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->name; + if ($this->name && !empty($conf->global->LDAP_GROUP_FIELD_FULLNAME)) { + $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->name; + } //if ($this->name && ! empty($conf->global->LDAP_GROUP_FIELD_NAME)) $info[$conf->global->LDAP_GROUP_FIELD_NAME] = $this->name; - if ($this->note && !empty($conf->global->LDAP_GROUP_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_GROUP_FIELD_DESCRIPTION] = dol_string_nohtmltag($this->note, 2); - if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)) - { + if ($this->note && !empty($conf->global->LDAP_GROUP_FIELD_DESCRIPTION)) { + $info[$conf->global->LDAP_GROUP_FIELD_DESCRIPTION] = dol_string_nohtmltag($this->note, 2); + } + if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)) { $valueofldapfield = array(); - foreach ($this->members as $key=>$val) // This is array of users for group into dolibarr database. - { + foreach ($this->members as $key => $val) { // This is array of users for group into dolibarr database. $muser = new User($this->db); $muser->fetch($val->id); $info2 = $muser->_load_ldap_info(); @@ -875,10 +908,8 @@ class UserGroup extends CommonObject $langs->load("user"); // Positionne le modele sur le nom du modele a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->USERGROUP_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->USERGROUP_ADDON_PDF)) { $modele = $conf->global->USERGROUP_ADDON_PDF; } else { $modele = 'grass'; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index fff39a3d45f..0a9a65a2852 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -33,7 +33,9 @@ $id = (int) GETPOST('id', 'int'); // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); @@ -47,7 +49,9 @@ $hookmanager->initHooks(array('usercard', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'update' && !GETPOST('cancel', 'alpha')) { @@ -76,8 +80,7 @@ $form = new Form($db); llxHeader("", "ClickToDial"); -if ($id > 0) -{ +if ($id > 0) { $object = new User($db); $object->fetch($id, '', '', 1); $object->getrights(); @@ -107,17 +110,14 @@ if ($id > 0) print '<div class="underbanner clearboth"></div>'; // Edit mode - if ($action == 'edit') - { + if ($action == 'edit') { print '<table class="border centpercent">'; - if ($user->admin) - { + if ($user->admin) { print '<tr><td class="titlefield fieldrequired">ClickToDial URL</td>'; print '<td class="valeur">'; print '<input name="url" value="'.(!empty($object->clicktodial_url) ? $object->clicktodial_url : '').'" size="92">'; - if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url)) - { + if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url)) { $langs->load("errors"); print '<font class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("ClickToDial")).'</font>'; } else { @@ -147,14 +147,14 @@ if ($id > 0) { print '<table class="border centpercent tableforfield">'; - if (!empty($user->admin)) - { + if (!empty($user->admin)) { print '<tr><td class="titlefield">ClickToDial URL</td>'; print '<td class="valeur">'; $url = $conf->global->CLICKTODIAL_URL; - if (!empty($object->clicktodial_url)) $url = $object->clicktodial_url; - if (empty($url)) - { + if (!empty($object->clicktodial_url)) { + $url = $object->clicktodial_url; + } + if (empty($url)) { $langs->load("errors"); print '<font class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("ClickToDial")).'</font>'; } else { @@ -181,11 +181,10 @@ if ($id > 0) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '<br>'; print '<div class="center"><input class="button button-save" type="submit" value="'.$langs->trans("Save").'">'; - print '&nbsp;&nbsp;&nbsp;&nbsp&nbsp;'; + print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; print '</div>'; } @@ -194,12 +193,11 @@ if ($id > 0) print '</form>'; /* - * Barre d'actions - */ + * Action bar + */ print '<div class="tabsAction">'; - if (!empty($user->admin) && $action <> 'edit') - { + if (!empty($user->admin) && $action <> 'edit') { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'; } diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 54aaf951ded..297243f36ef 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -47,14 +47,12 @@ $canedituser = (!empty($user->admin) || $user->rights->user->user->creer); $candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); } // Define value to know what current user can do on properties of edited user -if ($id) -{ +if ($id) { // $user est le user qui edite, $id est l'id de l'utilisateur edite $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) || (($user->id != $id) && $user->rights->user->user->creer)); @@ -64,28 +62,37 @@ if ($id) // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = 'user'; $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); -if ($user->id <> $id && !$canreaduser) accessforbidden(); +if ($user->id <> $id && !$canreaduser) { + accessforbidden(); +} // Get parameters $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 (empty($page) || $page == -1) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "position_name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "position_name"; +} $object = new User($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); $object->getrights(); //$upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ; @@ -103,10 +110,12 @@ $hookmanager->initHooks(array('usercard', 'userdoc', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { - include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } @@ -118,12 +127,13 @@ $form = new Form($db); llxHeader('', $langs->trans("UserCard").' - '.$langs->trans("Files")); -if ($object->id) -{ +if ($object->id) { /* * Affichage onglets */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } $head = user_prepare_head($object); $form = new Form($db); @@ -143,8 +153,7 @@ if ($object->id) // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); $totalsize = 0; - foreach ($filearray as $key => $file) - { + foreach ($filearray as $key => $file) { $totalsize += $file['size']; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 68d9639990c..33921544b45 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -38,8 +38,7 @@ $candisableperms = ($user->admin || $user->rights->user->user->supprimer); $feature2 = 'user'; // Advanced permissions -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadperms = ($user->admin || $user->rights->user->group_advance->read); $caneditperms = ($user->admin || $user->rights->user->group_advance->write); $candisableperms = ($user->admin || $user->rights->user->group_advance->delete); @@ -58,15 +57,6 @@ $backtopage = GETPOST('backtopage', 'alpha'); $userid = GETPOST('user', 'int'); -// Security check -$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', $feature2); - -// Users/Groups management only in master entity if transverse mode -if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) -{ - accessforbidden(); -} - $object = new Usergroup($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -79,6 +69,13 @@ $object->getrights(); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('groupcard', 'globalcard')); +// Security check +$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', $feature2); + +// Users/Groups management only in master entity if transverse mode +if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) { + accessforbidden(); +} /** @@ -87,29 +84,31 @@ $hookmanager->initHooks(array('groupcard', 'globalcard')); $parameters = array('id' => $id, 'userid' => $userid, 'caneditperms' => $caneditperms); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { $backurlforlist = DOL_URL_ROOT.'/user/group/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('/user/group/card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = dol_buildpath('/user/group/card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } } } - if ($cancel) - { + if ($cancel) { header("Location: ".$backtopage); exit; } // Action remove group - if ($action == 'confirm_delete' && $confirm == "yes") - { - if ($caneditperms) - { + if ($action == 'confirm_delete' && $confirm == "yes") { + if ($caneditperms) { $object->fetch($id); $object->delete($user); header("Location: ".DOL_URL_ROOT."/user/group/list.php?restore_lastsearch_values=1"); @@ -121,10 +120,8 @@ if (empty($reshook)) { } // Action add group - if ($action == 'add') - { - if ($caneditperms) - { + if ($action == 'add') { + if ($caneditperms) { if (!GETPOST("nom", "nohtml")) { setEventMessages($langs->trans("NameNotDefined"), null, 'errors'); $action = "create"; // Go back to create page @@ -134,17 +131,21 @@ if (empty($reshook)) { // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) $object->entity = 0; - else $object->entity = $_POST["entity"]; + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + $object->entity = 0; + } else { + $object->entity = GETPOST("entity"); + } $db->begin(); $id = $object->create(); - if ($id > 0) - { + if ($id > 0) { $db->commit(); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); @@ -164,22 +165,22 @@ if (empty($reshook)) { } // Add/Remove user into group - if ($action == 'adduser' || $action == 'removeuser') - { - if ($caneditperms) - { - if ($userid > 0) - { + if ($action == 'adduser' || $action == 'removeuser') { + if ($caneditperms) { + if ($userid > 0) { $object->fetch($id); $object->oldcopy = clone $object; $edituser = new User($db); $edituser->fetch($userid); - if ($action == 'adduser') $result = $edituser->SetInGroup($object->id, $object->entity); - if ($action == 'removeuser') $result = $edituser->RemoveFromGroup($object->id, $object->entity); + if ($action == 'adduser') { + $result = $edituser->SetInGroup($object->id, $object->entity); + } + if ($action == 'removeuser') { + $result = $edituser->RemoveFromGroup($object->id, $object->entity); + } - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -193,10 +194,8 @@ if (empty($reshook)) { } - if ($action == 'update') - { - if ($caneditperms) - { + if ($action == 'update') { + if ($caneditperms) { $db->begin(); $object->fetch($id); @@ -208,15 +207,19 @@ if (empty($reshook)) { // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; + if ($ret < 0) { + $error++; + } - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) $object->entity = 0; - else $object->entity = $_POST["entity"]; + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + $object->entity = 0; + } else { + $object->entity = GETPOST("entity"); + } $ret = $object->update(); - if ($ret >= 0 && !count($object->errors)) - { + if ($ret >= 0 && !count($object->errors)) { setEventMessages($langs->trans("GroupModified"), null, 'mesgs'); $db->commit(); } else { @@ -247,8 +250,7 @@ $fuserstatic = new User($db); $form = new Form($db); $formfile = new FormFile($db); -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewGroup"), '', 'object_group'); print dol_set_focus('#nom'); @@ -263,10 +265,8 @@ if ($action == 'create') print '<table class="border centpercent tableforfieldcreate">'; // Multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { - if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { print "<tr>".'<td class="tdtop">'.$langs->trans("Entity").'</td>'; print "<td>".$mc->select_entities($conf->entity); print "</td></tr>\n"; @@ -292,17 +292,13 @@ if ($action == 'create') print '</div>'; print "</form>"; -} - - -/* ************************************************************************** */ -/* */ -/* Visu et edition */ -/* */ -/* ************************************************************************** */ -else { - if ($id) - { +} else { + /* ************************************************************************** */ + /* */ + /* Visu et edition */ + /* */ + /* ************************************************************************** */ + if ($id) { $res = $object->fetch_optionals(); $head = group_prepare_head($object); @@ -311,8 +307,7 @@ else { /* * Confirmation suppression */ - if ($action == 'delete') - { + if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("DeleteAGroup"), $langs->trans("ConfirmDeleteGroup", $object->name), "confirm_delete", '', 0, 1); } @@ -320,8 +315,7 @@ else { * Fiche en mode visu */ - if ($action != 'edit') - { + if ($action != 'edit') { print dol_get_fiche_head($head, 'group', $title, -1, 'group'); $linkback = '<a href="'.DOL_URL_ROOT.'/user/group/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; @@ -335,20 +329,17 @@ else { print '<table class="border centpercent tableforfield">'; // Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner) - if (!empty($conf->mutlicompany->enabled)) - { + if (!empty($conf->mutlicompany->enabled)) { print '<tr><td class="titlefield">'.$langs->trans("Name").'</td>'; print '<td class="valeur">'.dol_escape_htmltag($object->name); - if (empty($object->entity)) - { + if (empty($object->entity)) { print img_picto($langs->trans("GlobalGroup"), 'redstar'); } print "</td></tr>\n"; } // Multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { $mc->getInfo($object->entity); print "<tr>".'<td class="titlefield">'.$langs->trans("Entity").'</td>'; print '<td class="valeur">'.dol_escape_htmltag($mc->label); @@ -374,22 +365,21 @@ else { /* - * Barre d'actions + * Action bar */ - print '<div class="tabsAction">'; $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if ($caneditperms) - { + if ($caneditperms) { print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit&amp;token='.newToken().'">'.$langs->trans("Modify").'</a>'; } - if ($candisableperms) - { + if ($candisableperms) { print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete&amp;id='.$object->id.'&amp;token='.newToken().'">'.$langs->trans("DeleteGroup").'</a>'; } @@ -402,10 +392,8 @@ else { // On selectionne les users qui ne sont pas deja dans le groupe $exclude = array(); - if (!empty($object->members)) - { - foreach ($object->members as $useringroup) - { + if (!empty($object->members)) { + foreach ($object->members as $useringroup) { $exclude[] = $useringroup->id; } } @@ -415,10 +403,8 @@ else { $reshook = $hookmanager->executeHooks('formAddUserToGroup', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (empty($reshook)) - { - if ($caneditperms) - { + if (empty($reshook)) { + if ($caneditperms) { print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST">'."\n"; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="adduser">'; @@ -447,10 +433,8 @@ else { print '<td class="liste_titre right" width="5">&nbsp;</td>'; print "</tr>\n"; - if (!empty($object->members)) - { - foreach ($object->members as $useringroup) - { + if (!empty($object->members)) { + foreach ($object->members as $useringroup) { print '<tr class="oddeven">'; print '<td>'; print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); @@ -484,8 +468,8 @@ else { print '<div class="fichecenter"><div class="fichehalfleft">'; /* - * Documents generes - */ + * Generated documents + */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->usergroup->dir_output."/".dol_sanitizeFileName($object->ref); @@ -510,11 +494,10 @@ else { } /* - * Fiche en mode edition - */ + * Fiche en mode edition + */ - if ($action == 'edit' && $caneditperms) - { + if ($action == 'edit' && $caneditperms) { print '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="updategroup" enctype="multipart/form-data">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -526,10 +509,8 @@ else { print '<table class="border centpercent tableforfieldedit">'."\n"; // Multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { - if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { print "<tr>".'<td class="tdtop">'.$langs->trans("Entity").'</td>'; print "<td>".$mc->select_entities($object->entity); print "</td></tr>\n"; diff --git a/htdocs/user/group/index.html b/htdocs/user/group/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/user/group/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index c17512b6169..aee79688aee 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -33,40 +33,38 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; // Load translation files required by page $langs->loadLangs(array('companies', 'ldap', 'users', 'admin')); -// Users/Groups management only in master entity if transverse mode -if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) -{ - accessforbidden(); -} - -$canreadperms = true; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ - $canreadperms = ($user->admin || $user->rights->user->group_advance->read); -} - $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $object = new Usergroup($db); $object->fetch($id); $object->getrights(); +// Users/Groups management only in master entity if transverse mode +if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) { + accessforbidden(); +} + +$canreadperms = true; +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + $canreadperms = ($user->admin || $user->rights->user->group_advance->read); +} + /* * Actions */ -if ($action == 'dolibarr2ldap') -{ +if ($action == 'dolibarr2ldap') { $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); // Get a gid number for objectclass PosixGroup @@ -80,8 +78,7 @@ if ($action == 'dolibarr2ldap') $result = $ldap->update($dn, $info, $user, $olddn); } - if ($result >= 0) - { + if ($result >= 0) { setEventMessages($langs->trans("GroupSynchronized"), null, 'mesgs'); } else { setEventMessages($ldap->error, $ldap->errors, 'errors'); @@ -111,12 +108,10 @@ print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; // Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner) -if (!empty($conf->mutlicompany->enabled)) -{ +if (!empty($conf->mutlicompany->enabled)) { print '<tr><td class="titlefield">'.$langs->trans("Name").'</td>'; print '<td class="valeur">'.$object->name; - if (!$object->entity) - { + if (!$object->entity) { print img_picto($langs->trans("GlobalGroup"), 'redstar'); } print "</td></tr>\n"; @@ -148,19 +143,19 @@ print dol_get_fiche_end(); /* - * Barre d'actions + * Action bar */ - print '<div class="tabsAction">'; -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') -{ +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a>'; } print "</div>\n"; -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') print "<br>\n"; +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { + print "<br>\n"; +} @@ -177,8 +172,7 @@ print '</tr>'; // Lecture LDAP $ldap = new Ldap(); $result = $ldap->connect_bind(); -if ($result > 0) -{ +if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info, 1); $search = "(".$object->_load_ldap_dn($info, 2).")"; @@ -188,10 +182,8 @@ if ($result > 0) //var_dump($records); // Show tree - if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) - { - if (!is_array($records)) - { + if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) { + if (!is_array($records)) { print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>'; } else { $result = show_ldap_content($records, 0, $records['count'], true); diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 3fce8718287..edd34dfe9b8 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -28,18 +28,6 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ - if (!$user->rights->user->group_advance->read && !$user->admin) - accessforbidden(); -} - -// Users/Groups management only in master entity if transverse mode -if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) -{ - accessforbidden(); -} - // Load translation files required by page $langs->load("users"); @@ -50,8 +38,7 @@ $optioncss = GETPOST('optioncss', 'alpha'); // Defini si peux lire/modifier utilisateurs et permisssions $caneditperms = ($user->admin || $user->rights->user->user->creer); // Advanced permissions -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $caneditperms = ($user->admin || $user->rights->user->group_advance->write); } @@ -60,13 +47,19 @@ $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 (empty($page) || $page == -1) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = "g.nom"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "g.nom"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} // List of fields to search into when doing a "search in all" $fieldstosearchall = array( @@ -74,26 +67,45 @@ $fieldstosearchall = array( 'g.note'=>"Note" ); +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + if (!$user->rights->user->group_advance->read && !$user->admin) { + accessforbidden(); + } +} + +// Users/Groups management only in master entity if transverse mode +if (!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) { + accessforbidden(); +} + +if (!$user->rights->user->user->lire && !$user->admin) { + accessforbidden(); +} + /* * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $massaction = ''; +} $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 test are required to be compatible with all browsers - { + 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_label = ""; $search_date_creation = ""; $search_date_update = ""; @@ -113,20 +125,22 @@ $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, COUNT(DISTINCT $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_rights as ugr ON ugr.fk_usergroup = g.rowid"; -if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) -{ +if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { $sql .= " WHERE g.entity IS NOT NULL"; } else { $sql .= " WHERE g.entity IN (0,".$conf->entity.")"; } -if (!empty($search_group)) natural_search(array("g.nom", "g.note"), $search_group); -if ($sall) $sql .= natural_search(array("g.nom", "g.note"), $sall); +if (!empty($search_group)) { + natural_search(array("g.nom", "g.note"), $search_group); +} +if ($sall) { + $sql .= natural_search(array("g.nom", "g.note"), $sall); +} $sql .= " GROUP BY g.rowid, g.nom, g.note, g.entity, g.datec"; $sql .= $db->order($sortfield, $sortorder); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $nbtotalofrecords = $num; @@ -134,18 +148,21 @@ if ($resql) $i = 0; $param = "&amp;search_group=".urlencode($search_group)."&amp;sall=".urlencode($sall); - if ($optioncss != '') $param .= '&amp;optioncss='.$optioncss; + if ($optioncss != '') { + $param .= '&amp;optioncss='.$optioncss; + } $text = $langs->trans("ListOfGroups"); $newcardbutton = ''; - if ($caneditperms) - { + if ($caneditperms) { $newcardbutton .= dolGetButtonTitle($langs->trans('NewGroup'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/user/group/card.php?action=create&leftmenu='); } print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; @@ -155,9 +172,10 @@ if ($resql) print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'object_group', 0, $newcardbutton, '', $limit, 0, 0, 1); - if ($sall) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($sall) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; } @@ -172,8 +190,7 @@ if ($resql) print '<tr class="liste_titre">'; print_liste_field_titre("Group", $_SERVER["PHP_SELF"], "g.nom", $param, "", "", $sortfield, $sortorder); //multicompany - if (!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) - { + if (!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) { print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], "g.entity", $param, "", '', $sortfield, $sortorder, 'center '); } print_liste_field_titre("NbOfUsers", $_SERVER["PHP_SELF"], "nb", $param, "", '', $sortfield, $sortorder, 'center '); @@ -184,8 +201,7 @@ if ($resql) $grouptemp = new UserGroup($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $grouptemp->id = $obj->rowid; @@ -195,14 +211,12 @@ if ($resql) print '<tr class="oddeven">'; print '<td>'; print $grouptemp->getNomUrl(1); - if (!$obj->entity) - { + if (!$obj->entity) { print img_picto($langs->trans("GlobalGroup"), 'redstar'); } print "</td>"; //multicompany - if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) - { + if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) { $mc->getInfo($obj->entity); print '<td class="center">'.$mc->label.'</td>'; } diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index badf3840582..618d705bfcf 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -47,14 +47,15 @@ $canreadperms = ($user->admin || $user->rights->user->user->lire); $caneditperms = ($user->admin || $user->rights->user->user->creer); // Advanced permissions $advancedpermsactive = false; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $advancedpermsactive = true; $canreadperms = ($user->admin || ($user->rights->user->group_advance->read && $user->rights->user->group_advance->readperms)); $caneditperms = ($user->admin || $user->rights->user->group_advance->write); } -if (!$canreadperms) accessforbidden(); +if (!$canreadperms) { + accessforbidden(); +} $object = new Usergroup($db); $object->fetch($id); @@ -71,7 +72,9 @@ $hookmanager->initHooks(array('groupperms', 'globalcard')); $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'addrights' && $caneditperms) { @@ -110,8 +113,7 @@ $form = new Form($db); llxHeader('', $langs->trans("Permissions")); -if ($object->id > 0) -{ +if ($object->id > 0) { /* * Affichage onglets */ @@ -127,32 +129,24 @@ if ($object->id > 0) $db->begin(); - foreach ($modulesdir as $dir) - { + foreach ($modulesdir as $dir) { $handle = @opendir(dol_osencode($dir)); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') { $modName = substr($file, 0, dol_strlen($file) - 10); - if ($modName) - { + if ($modName) { include_once $dir.$file; $objMod = new $modName($db); // Load all lang files of module - if (isset($objMod->langfiles) && is_array($objMod->langfiles)) - { - foreach ($objMod->langfiles as $domain) - { + if (isset($objMod->langfiles) && is_array($objMod->langfiles)) { + foreach ($objMod->langfiles as $domain) { $langs->load($domain); } } // Load all permissions - if ($objMod->rights_class) - { + if ($objMod->rights_class) { $ret = $objMod->insert_permissions(0, $entity); $modules[$objMod->rights_class] = $objMod; } @@ -176,15 +170,14 @@ if ($object->id > 0) dol_syslog("get user perms", LOG_DEBUG); $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($permsgroupbyentity[$obj->entity])) + if (!isset($permsgroupbyentity[$obj->entity])) { $permsgroupbyentity[$obj->entity] = array(); + } array_push($permsgroupbyentity[$obj->entity], $obj->id); $i++; } @@ -207,12 +200,10 @@ if ($object->id > 0) print '<table class="border centpercent tableforfield">'; // Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner) - if (!empty($conf->mutlicompany->enabled)) - { + if (!empty($conf->mutlicompany->enabled)) { print '<tr><td class="titlefield">'.$langs->trans("Name").'</td>'; print '<td colspan="2">'.$object->name.''; - if (!$object->entity) - { + if (!$object->entity) { print img_picto($langs->trans("GlobalGroup"), 'redstar'); } print "</td></tr>\n"; @@ -227,19 +218,22 @@ if ($object->id > 0) print '</table><br>'; - if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); + if ($user->admin) { + print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); + } $parameters = array(); $reshook = $hookmanager->executeHooks('insertExtraHeader', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print "\n"; print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Module").'</td>'; - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center nowrap">'; print '<a class="reposition commonlink" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module=allmodules">'.$langs->trans("All")."</a>"; print '/'; @@ -248,36 +242,36 @@ if ($object->id > 0) } print '<td class="center" width="24">&nbsp;</td>'; print '<td>'.$langs->trans("Permissions").'</td>'; - if ($user->admin) print '<td class="right">'.$langs->trans("ID").'</td>'; + if ($user->admin) { + print '<td class="right">'.$langs->trans("ID").'</td>'; + } print '</tr>'."\n"; $sql = "SELECT r.id, r.libelle as label, r.module"; $sql .= " FROM ".MAIN_DB_PREFIX."rights_def as r"; $sql .= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" $sql .= " AND r.entity = ".$entity; - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is disable + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is disable + } $sql .= " ORDER BY r.module, r.id"; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; $oldmod = ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); // If line is for a module that doe snot existe anymore (absent of includes/module), we ignore it - if (empty($modules[$obj->module])) - { + if (empty($modules[$obj->module])) { $i++; continue; } - if ($oldmod <> $obj->module) - { + if ($oldmod <> $obj->module) { $oldmod = $obj->module; // Break detected, we get objMod @@ -290,8 +284,7 @@ if ($object->id > 0) print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName(); print '<a name="'.$objMod->getName().'"></a>'; print '</td>'; - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center nowrap">'; print '<a class="reposition" title='.$langs->trans("All").' alt='.$langs->trans("All").' href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'">'.$langs->trans("All")."</a>"; print '/'; @@ -303,7 +296,9 @@ if ($object->id > 0) print '<td colspan="2">&nbsp;</td>'; // Permission id - if ($user->admin) print '<td class="right"></td>'; + if ($user->admin) { + print '<td class="right"></td>'; + } print '</tr>'; } @@ -316,13 +311,10 @@ if ($object->id > 0) //print img_object('', $picto, 'class="inline-block pictoobjectwidth"').' '.$objMod->getName(); print '</td>'; - if (is_array($permsgroupbyentity[$entity])) - { - if (in_array($obj->id, $permsgroupbyentity[$entity])) - { + if (is_array($permsgroupbyentity[$entity])) { + if (in_array($obj->id, $permsgroupbyentity[$entity])) { // Own permission by group - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'; //print img_edit_remove($langs->trans("Remove")); print img_picto($langs->trans("Remove"), 'switch_on'); @@ -333,32 +325,32 @@ if ($object->id > 0) print '</td>'; } else { // Do not own permission - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print '</a></td>'; } - print '<td>&nbsp</td>'; + print '<td>&nbsp;</td>'; } } else { // Do not own permission - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print '</a></td>'; } - print '<td>&nbsp</td>'; + print '<td>&nbsp;</td>'; } $permlabel = ($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label))); print '<td class="maxwidthonsmartphone">'.$permlabel.'</td>'; // Permission id - if ($user->admin) print '<td class="right"><span class="opacitymedium">'.$obj->id.'</span></td>'; + if ($user->admin) { + print '<td class="right"><span class="opacitymedium">'.$obj->id.'</span></td>'; + } print '</tr>'."\n"; @@ -372,7 +364,9 @@ if ($object->id > 0) $parameters = array(); $reshook = $hookmanager->executeHooks('insertExtraFooter', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } print dol_get_fiche_end(); } diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 1a6a630d27c..6073ca4c88f 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -4,7 +4,7 @@ * Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> + * Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,19 +29,22 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; -if (!$user->rights->user->user->lire && !$user->admin) +if (!$user->rights->user->user->lire && !$user->admin) { accessforbidden(); +} // Load translation files required by page $langs->loadLangs(array('users', 'companies')); // Security check (for external users) $socid = 0; -if ($user->socid > 0) +if ($user->socid > 0) { $socid = $user->socid; +} $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_user = GETPOST('search_user', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); // Load mode employee $mode = GETPOST("mode", 'alpha'); @@ -49,10 +52,11 @@ $mode = GETPOST("mode", 'alpha'); $userstatic = new User($db); $search_statut = GETPOST('search_statut', 'int'); -if ($search_statut == '') $search_statut = '1'; +if ($search_statut == '') { + $search_statut = '1'; +} -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers -{ +if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers $search_statut = ""; } @@ -79,8 +83,7 @@ llxHeader('', $langs->trans("ListOfUsers").' - '.$langs->trans("HierarchicView") // Load hierarchy of users $user_arbo = $userstatic->get_full_tree(0, ($search_statut != '' && $search_statut >= 0) ? "statut = ".$search_statut : ''); -if (!is_array($user_arbo) && $user_arbo < 0) -{ +if (!is_array($user_arbo) && $user_arbo < 0) { setEventMessages($userstatic->error, $userstatic->errors, 'warnings'); } else { // Define fulltree array @@ -89,8 +92,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) // Define data (format for treeview) $data = array(); $data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>''); - foreach ($fulltree as $key => $val) - { + foreach ($fulltree as $key => $val) { $userstatic->id = $val['id']; $userstatic->ref = $val['label']; $userstatic->login = $val['login']; @@ -108,10 +110,8 @@ if (!is_array($user_arbo) && $user_arbo < 0) $entitystring = ''; // TODO Set of entitystring should be done with a hook - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { - if (empty($entity)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (empty($entity)) { $entitystring = $langs->trans("AllEntities"); } else { $mc->getInfo($entity); @@ -120,11 +120,9 @@ if (!is_array($user_arbo) && $user_arbo < 0) } $li = $userstatic->getNomUrl(-1, '', 0, 1); - if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) - { + if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) { $li .= img_picto($langs->trans("SuperAdministrator"), 'redstar'); - } elseif ($userstatic->admin) - { + } elseif ($userstatic->admin) { $li .= img_picto($langs->trans("Administrator"), 'star'); } $li .= ' ('.$val['login'].($entitystring ? ' - '.$entitystring : '').')'; @@ -155,7 +153,9 @@ if (!is_array($user_arbo) && $user_arbo < 0) print load_fiche_titre($title, $morehtmlright.' '.$newcardbutton, 'user'); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; @@ -188,8 +188,7 @@ if (!is_array($user_arbo) && $user_arbo < 0) $nbofentries = (count($data) - 1); - if ($nbofentries > 0) - { + if ($nbofentries > 0) { print '<tr><td colspan="3">'; tree_recur($data, $data[0], 0); print '</td>'; diff --git a/htdocs/user/home.php b/htdocs/user/home.php index e294be6a219..4a41b3fd899 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -24,11 +24,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'userhome'; // To manage different context of search -if (!$user->rights->user->user->lire && !$user->admin) -{ +if (!$user->rights->user->user->lire && !$user->admin) { // Redirection vers la page de l'utilisateur header("Location: card.php?id=".$user->id); exit; @@ -38,21 +38,39 @@ if (!$user->rights->user->user->lire && !$user->admin) $langs->load("users"); $canreadperms = true; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadperms = ($user->admin || $user->rights->user->group_advance->read); } // Security check (for external users) $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $companystatic = new Societe($db); $fuserstatic = new User($db); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('userhome')); +if (!isset($form) || !is_object($form)) { + $form = new Form($db); +} +// Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) +$resultboxes = FormOther::getBoxesArea($user, "1"); +if (GETPOST('addbox')) { + // Add box (when submit is done from a form when ajax disabled) + require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; + $zone = GETPOST('areacode', 'aZ09'); + $userid = GETPOST('userid', 'int'); + $boxorder = GETPOST('boxorder', 'aZ09'); + $boxorder .= GETPOST('boxcombo', 'aZ09'); + $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid); + if ($result > 0) { + setEventMessages($langs->trans("BoxAdded"), null); + } +} /* * View @@ -61,41 +79,35 @@ $hookmanager->initHooks(array('userhome')); llxHeader(); -print load_fiche_titre($langs->trans("MenuUsersAndGroups"), '', 'user'); - - -print '<div class="fichecenter"><div class="fichethirdleft">'; +print load_fiche_titre($langs->trans("MenuUsersAndGroups"), $resultboxes['selectboxlist'], 'user'); // Search User -print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; -print '<input type="hidden" name="token" value="'.newToken().'">'; +$searchbox = '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; +$searchbox .= '<input type="hidden" name="token" value="'.newToken().'">'; -print '<table class="noborder nohover centpercent">'; -print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Search").'</td></tr>'; -print '<tr><td>'; -print $langs->trans("User").':</td><td><input class="flat inputsearch" type="text" name="search_user" size="18"></td></tr>'; +$searchbox .= '<table class="noborder nohover centpercent">'; +$searchbox .= '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Search").'</td></tr>'; +$searchbox .= '<tr><td>'; +$searchbox .= $langs->trans("User").':</td><td><input class="flat inputsearch" type="text" name="search_user" size="18"></td></tr>'; // Search Group -if ($canreadperms) -{ - print '<tr><td>'; - print $langs->trans("Group").':</td><td><input class="flat inputsearch" type="text" name="search_group" size="18"></td></tr>'; +if ($canreadperms) { + $searchbox .= '<tr><td>'; + $searchbox .= $langs->trans("Group").':</td><td><input class="flat inputsearch" type="text" name="search_group" size="18"></td></tr>'; } -print '<tr><td class="center" colspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; -print "</table><br>\n"; +$searchbox .= '<tr><td class="center" colspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; +$searchbox .= "</table><br>\n"; -print '</form>'; - -print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; +$searchbox .= '</form>'; /* * Latest created users */ $max = 10; - +$lastcreatedbox = ''; $sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.login, u.fk_soc, u.datec, u.statut"; $sql .= ", u.entity"; $sql .= ", u.ldap_sid"; @@ -115,24 +127,24 @@ if ($reshook > 0) { } else { $sql .= " WHERE u.entity IN (".getEntity('user').")"; } -if (!empty($socid)) $sql .= " AND u.fk_soc = ".$socid; +if (!empty($socid)) { + $sql .= " AND u.fk_soc = ".((int) $socid); +} $sql .= $db->order("u.datec", "DESC"); $sql .= $db->plimit($max); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder centpercent">'; - print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastUsersCreated", min($num, $max)).'</td>'; - print '<td class="right" colspan="2"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>'; - print '</tr>'."\n"; + $lastcreatedbox .='<div class="div-table-responsive-no-min">'; + $lastcreatedbox .='<table class="noborder centpercent">'; + $lastcreatedbox .='<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastUsersCreated", min($num, $max)).'</td>'; + $lastcreatedbox .='<td class="right" colspan="2"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>'; + $lastcreatedbox .='</tr>'."\n"; $i = 0; - while ($i < $num && $i < $max) - { + while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); $fuserstatic->id = $obj->rowid; @@ -150,56 +162,50 @@ if ($resql) $companystatic->code_client = $obj->code_client; $companystatic->canvas = $obj->canvas; - print '<tr class="oddeven">'; - print '<td class="nowraponall">'; - print $fuserstatic->getNomUrl(-1); - if (!empty($conf->multicompany->enabled) && $obj->admin && !$obj->entity) - { - print img_picto($langs->trans("SuperAdministrator"), 'redstar'); - } elseif ($obj->admin) - { - print img_picto($langs->trans("Administrator"), 'star'); + $lastcreatedbox .='<tr class="oddeven">'; + $lastcreatedbox .='<td class="nowraponall">'; + $lastcreatedbox .=$fuserstatic->getNomUrl(-1); + if (!empty($conf->multicompany->enabled) && $obj->admin && !$obj->entity) { + $lastcreatedbox .=img_picto($langs->trans("SuperAdministrator"), 'redstar'); + } elseif ($obj->admin) { + $lastcreatedbox .=img_picto($langs->trans("Administrator"), 'star'); } - print "</td>"; - print '<td>'.$obj->login.'</td>'; - print "<td>"; - if ($obj->fk_soc) - { - print $companystatic->getNomUrl(1); + $lastcreatedbox .="</td>"; + $lastcreatedbox .='<td>'.$obj->login.'</td>'; + $lastcreatedbox .="<td>"; + if ($obj->fk_soc) { + $lastcreatedbox .=$companystatic->getNomUrl(1); } else { - print $langs->trans("InternalUser"); + $lastcreatedbox .=$langs->trans("InternalUser"); } - if ($obj->ldap_sid) - { - print ' ('.$langs->trans("DomainUser").')'; + if ($obj->ldap_sid) { + $lastcreatedbox .=' ('.$langs->trans("DomainUser").')'; } $entity = $obj->entity; $entitystring = ''; // TODO Set of entitystring should be done with a hook - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { - if (empty($entity)) - { + if (!empty($conf->multicompany->enabled) && is_object($mc)) { + if (empty($entity)) { $entitystring = $langs->trans("AllEntities"); } else { $mc->getInfo($entity); $entitystring = $mc->label; } } - print ($entitystring ? ' ('.$entitystring.')' : ''); + $lastcreatedbox .=($entitystring ? ' ('.$entitystring.')' : ''); - print '</td>'; - print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>'; - print '<td class="right">'; - print $fuserstatic->getLibStatut(3); - print '</td>'; + $lastcreatedbox .='</td>'; + $lastcreatedbox .='<td class="center nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>'; + $lastcreatedbox .='<td class="right">'; + $lastcreatedbox .=$fuserstatic->getLibStatut(3); + $lastcreatedbox .='</td>'; - print '</tr>'; + $lastcreatedbox .='</tr>'; $i++; } - print "</table>"; - print "</div><br>"; + $lastcreatedbox .="</table>"; + $lastcreatedbox .="</div><br>"; $db->free($resql); } else { @@ -210,14 +216,13 @@ if ($resql) /* * Last groups created */ -if ($canreadperms) -{ +$lastgroupbox = ''; +if ($canreadperms) { $max = 5; $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; - if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) - { + if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { $sql .= " WHERE g.entity IS NOT NULL"; } else { $sql .= " WHERE g.entity IN (0,".$conf->entity.")"; @@ -226,50 +231,48 @@ if ($canreadperms) $sql .= $db->plimit($max); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $colspan = 1; - if (!empty($conf->multicompany->enabled)) $colspan++; + if (!empty($conf->multicompany->enabled)) { + $colspan++; + } $num = $db->num_rows($resql); - print '<div class="div-table-responsive-no-min">'; - print '<table class="noborder centpercent">'; - print '<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated", ($num ? $num : $max)).'</td>'; - print '<td class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>'; - print '</tr>'; + $lastgroupbox .='<div class="div-table-responsive-no-min">'; + $lastgroupbox .='<table class="noborder centpercent">'; + $lastgroupbox .='<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated", ($num ? $num : $max)).'</td>'; + $lastgroupbox .='<td class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>'; + $lastgroupbox .='</tr>'; $i = 0; $grouptemp = new UserGroup($db); - while ($i < $num && (!$max || $i < $max)) - { + while ($i < $num && (!$max || $i < $max)) { $obj = $db->fetch_object($resql); $grouptemp->id = $obj->rowid; $grouptemp->name = $obj->name; $grouptemp->note = $obj->note; - print '<tr class="oddeven">'; - print '<td>'; - print $grouptemp->getNomUrl(1); - if (!$obj->entity) - { - print img_picto($langs->trans("GlobalGroup"), 'redstar'); + $lastgroupbox .='<tr class="oddeven">'; + $lastgroupbox .='<td>'; + $lastgroupbox .=$grouptemp->getNomUrl(1); + if (!$obj->entity) { + $lastgroupbox .=img_picto($langs->trans("GlobalGroup"), 'redstar'); } - print "</td>"; - if (!empty($conf->multicompany->enabled) && is_object($mc)) - { + $lastgroupbox .="</td>"; + if (!empty($conf->multicompany->enabled) && is_object($mc)) { $mc->getInfo($obj->entity); - print '<td>'; - print $mc->label; - print '</td>'; + $lastgroupbox .='<td>'; + $lastgroupbox .=$mc->label; + $lastgroupbox .='</td>'; } - print '<td class="nowrap right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>'; - print "</tr>"; + $lastgroupbox .='<td class="nowrap right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>'; + $lastgroupbox .="</tr>"; $i++; } - print "</table>"; - print "</div><br>"; + $lastgroupbox .= "</table>"; + $lastgroupbox .= "</div><br>"; $db->free($resql); } else { @@ -277,8 +280,28 @@ if ($canreadperms) } } -//print '</td></tr></table>'; -print '</div></div></div>'; +// boxes +print '<div class="clearboth"></div>'; +print '<div class="fichecenter fichecenterbis">'; + +$boxlist = '<div class="twocolumns">'; + +$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">'; +$boxlist .= $searchbox; +$boxlist .= $resultboxes['boxlista']; +$boxlist .= '</div>'."\n"; + +$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">'; +$boxlist .= $lastcreatedbox; +$boxlist .= $lastgroupbox; +$boxlist .= $resultboxes['boxlistb']; +$boxlist .= '</div>'."\n"; + +$boxlist .= '</div>'; + +print $boxlist; + +print '</div>'; // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $parameters = array('user' => $user); diff --git a/htdocs/user/index.html b/htdocs/user/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/user/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/user/info.php b/htdocs/user/info.php index f38d9ef2162..f6a0c731e14 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -32,23 +32,27 @@ $langs->load("users"); // Security check $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + $object = new User($db); -if ($id > 0 || !empty($ref)) -{ +if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref, '', 1); $object->getrights(); } // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop -if (($object->id != $user->id) && (!$user->rights->user->user->lire)) - accessforbidden(); +if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { + accessforbidden(); +} diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 44c7f553d11..e6cee6f6f73 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -35,7 +35,9 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'use // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); @@ -55,17 +57,16 @@ $hookmanager->initHooks(array('usercard', 'userldap', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if ($_GET["action"] == 'dolibarr2ldap') - { +if (empty($reshook)) { + if ($_GET["action"] == 'dolibarr2ldap') { $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info); $olddn = $dn; // We can say that old dn = dn as we force synchro @@ -109,20 +110,17 @@ print '<table class="border centpercent">'; // Login print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>'; -if ($object->ldap_sid) -{ +if ($object->ldap_sid) { print '<td class="warning">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>'; } else { print '<td>'.$object->login.'</td>'; } print '</tr>'; -if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") -{ +if ($conf->global->LDAP_SERVER_TYPE == "activedirectory") { $ldap = new Ldap(); $result = $ldap->connect_bind(); - if ($result > 0) - { + if ($result > 0) { $userSID = $ldap->getObjectSid($object->login); } print '<tr><td class="valigntop">'.$langs->trans("SID").'</td>'; @@ -150,19 +148,19 @@ print '</div>'; print dol_get_fiche_end(); /* - * Barre d'actions + * Action bar */ - print '<div class="tabsAction">'; -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') -{ +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=dolibarr2ldap">'.$langs->trans("ForceSynchronize").'</a>'; } print "</div>\n"; -if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') print "<br>\n"; +if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') { + print "<br>\n"; +} @@ -179,8 +177,7 @@ print '</tr>'; // Lecture LDAP $ldap = new Ldap(); $result = $ldap->connect_bind(); -if ($result > 0) -{ +if ($result > 0) { $info = $object->_load_ldap_info(); $dn = $object->_load_ldap_dn($info, 1); $search = "(".$object->_load_ldap_dn($info, 2).")"; @@ -190,10 +187,8 @@ if ($result > 0) //print_r($records); // Affichage arbre - if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) - { - if (!is_array($records)) - { + if (((!is_numeric($records)) || $records != 0) && (!isset($records['count']) || $records['count'] > 0)) { + if (!is_array($records)) { print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>'; } else { $result = show_ldap_content($records, 0, $records['count'], true); diff --git a/htdocs/user/list.php b/htdocs/user/list.php index bd12c0fbb99..fe05c551945 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -31,10 +31,6 @@ if (!empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; } -if (!$user->rights->user->user->lire && !$user->admin) { - accessforbidden(); -} - // Load translation files required by page $langs->loadLangs(array('users', 'companies', 'hrm', 'salaries')); @@ -62,7 +58,9 @@ $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 < 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 +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; $pageprev = $page - 1; $pagenext = $page + 1; @@ -78,15 +76,20 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); -if (!$sortfield) $sortfield = "u.login"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "u.login"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} // Initialize array of search criterias $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); -foreach ($object->fields as $key => $val) -{ - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } $userstatic = new User($db); @@ -99,29 +102,32 @@ $fieldstosearchall = array( 'u.lastname'=>"Lastname", 'u.firstname'=>"Firstname", 'u.accountancy_code'=>"AccountancyCode", + 'u.office_phone'=>"PhonePro", + 'u.user_mobile'=>"PhoneMobile", 'u.email'=>"EMail", 'u.note'=>"Note", ); -if (!empty($conf->api->enabled)) -{ +if (!empty($conf->api->enabled)) { $fieldstosearchall['u.api_key'] = "ApiKey"; } // Definition of fields for list $arrayfields = array( 'u.login'=>array('label'=>"Login", 'checked'=>1, 'position'=>10), - 'u.lastname'=>array('label'=>"Lastname", 'checked'=>1, 'position'=>15), - 'u.firstname'=>array('label'=>"Firstname", 'checked'=>1, 'position'=>20), - 'u.entity'=>array('label'=>"Entity", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))), - 'u.gender'=>array('label'=>"Gender", 'checked'=>0, 'position'=>22), - 'u.employee'=>array('label'=>"Employee", 'checked'=>($mode == 'employee' ? 1 : 0), 'position'=>25), - 'u.fk_user'=>array('label'=>"HierarchicalResponsible", 'checked'=>1, 'position'=>27), - 'u.accountancy_code'=>array('label'=>"AccountancyCode", 'checked'=>0, 'position'=>30), - 'u.email'=>array('label'=>"EMail", 'checked'=>1, 'position'=>35), - 'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>($conf->api->enabled && $user->admin)), - 'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45), - 'u.salary'=>array('label'=>"Salary", 'checked'=>1, 'position'=>80, 'enabled'=>($conf->salaries->enabled && !empty($user->rights->salaries->readall))), - 'u.datelastlogin'=>array('label'=>"LastConnexion", 'checked'=>1, 'position'=>100), + 'u.lastname'=>array('label'=>"Lastname", 'checked'=>1, 'position'=>15), + 'u.firstname'=>array('label'=>"Firstname", 'checked'=>1, 'position'=>20), + 'u.entity'=>array('label'=>"Entity", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))), + 'u.gender'=>array('label'=>"Gender", 'checked'=>0, 'position'=>22), + 'u.employee'=>array('label'=>"Employee", 'checked'=>($mode == 'employee' ? 1 : 0), 'position'=>25), + 'u.fk_user'=>array('label'=>"HierarchicalResponsible", 'checked'=>1, 'position'=>27), + 'u.accountancy_code'=>array('label'=>"AccountancyCode", 'checked'=>0, 'position'=>30), + 'u.office_phone'=>array('label'=>"PhonePro", 'checked'=>1, 'position'=>31), + 'u.user_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1, 'position'=>32), + 'u.email'=>array('label'=>"EMail", 'checked'=>1, 'position'=>35), + 'u.api_key'=>array('label'=>"ApiKey", 'checked'=>0, 'position'=>40, "enabled"=>($conf->api->enabled && $user->admin)), + 'u.fk_soc'=>array('label'=>"Company", 'checked'=>($contextpage == 'employeelist' ? 0 : 1), 'position'=>45), + 'u.salary'=>array('label'=>"Salary", 'checked'=>1, 'position'=>80, 'enabled'=>($conf->salaries->enabled && !empty($user->rights->salaries->readall))), + 'u.datelastlogin'=>array('label'=>"LastConnexion", 'checked'=>1, 'position'=>100), 'u.datepreviouslogin'=>array('label'=>"PreviousConnexion", 'checked'=>0, 'position'=>110), 'u.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'u.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), @@ -142,6 +148,8 @@ $search_firstname = GETPOST('search_firstname', 'alpha'); $search_gender = GETPOST('search_gender', 'alpha'); $search_employee = GETPOST('search_employee', 'alpha'); $search_accountancy_code = GETPOST('search_accountancy_code', 'alpha'); +$search_phonepro = GETPOST('search_phonepro', 'alpha'); +$search_phonemobile = GETPOST('search_phonemobile', 'alpha'); $search_email = GETPOST('search_email', 'alpha'); $search_api_key = GETPOST('search_api_key', 'alphanohtml'); $search_statut = GETPOST('search_statut', 'intcomma'); @@ -152,8 +160,12 @@ $search_categ = GETPOST("search_categ", 'int'); $catid = GETPOST('catid', 'int'); // Default search -if ($search_statut == '') $search_statut = '1'; -if ($mode == 'employee' && !GETPOSTISSET('search_employee')) $search_employee = 1; +if ($search_statut == '') { + $search_statut = '1'; +} +if ($mode == 'employee' && !GETPOSTISSET('search_employee')) { + $search_employee = 1; +} // Define value to know what current user can do on users $permissiontoadd = (!empty($user->admin) || $user->rights->user->user->creer); @@ -162,14 +174,17 @@ $canedituser = (!empty($user->admin) || $user->rights->user->user->creer); $candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer); $canreadgroup = $canreaduser; $caneditgroup = $canedituser; -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read); $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write); } $error = 0; +if (!$user->rights->user->user->lire && !$user->admin) { + accessforbidden(); +} + $childids = $user->getAllChildIds(1); @@ -177,21 +192,25 @@ $childids = $user->getAllChildIds(1); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') { + $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +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 - { + 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_user = ""; $search_login = ""; $search_lastname = ""; @@ -199,6 +218,8 @@ if (empty($reshook)) $search_gender = ""; $search_employee = ""; $search_accountancy_code = ""; + $search_phonepro = ""; + $search_phonemobile = ""; $search_email = ""; $search_statut = ""; $search_thirdparty = ""; @@ -219,17 +240,14 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // Disable or Enable records - if (!$error && ($massaction == 'disable' || $massaction == 'reactivate') && $permissiontoadd) - { + if (!$error && ($massaction == 'disable' || $massaction == 'reactivate') && $permissiontoadd) { $objecttmp = new User($db); - if (!$error) - { + if (!$error) { $db->begin(); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { if ($toselectid == $user->id) { setEventMessages($langs->trans($massaction == 0 ? 'CantDisableYourself' : 'CanEnableYourself'), null, 'errors'); $error++; @@ -251,7 +269,9 @@ if (empty($reshook)) setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -267,10 +287,12 @@ if (empty($reshook)) } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -286,8 +308,8 @@ if (empty($reshook)) $formother = new FormOther($db); -//$help_url="EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject"; -$help_url = ''; +$help_url = 'EN:Module_Users|FR:Module_Utilisateurs|ES:M&oacute;dulo_Usuarios|DE:Modul_Benutzer'; + if ($contextpage == 'employeelist' && $search_employee == 1) { $text = $langs->trans("ListOfEmployees"); } else { @@ -296,12 +318,12 @@ if ($contextpage == 'employeelist' && $search_employee == 1) { $user2 = new User($db); -$sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login, u.email, u.api_key, u.accountancy_code, u.gender, u.employee, u.photo,"; +$sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login, u.office_phone, u.user_mobile, u.email, u.api_key, u.accountancy_code, u.gender, u.employee, u.photo,"; $sql .= " u.salary, u.datelastlogin, u.datepreviouslogin,"; $sql .= " u.ldap_sid, u.statut, u.entity,"; $sql .= " u.tms as date_update, u.datec as date_creation,"; -$sql .= " u2.rowid as id2, u2.login as login2, u2.firstname as firstname2, u2.lastname as lastname2, u2.admin as admin2, u2.fk_soc as fk_soc2, u2.email as email2, u2.gender as gender2, u2.photo as photo2, u2.entity as entity2, u2.statut as statut2,"; -$sql .= " s.nom as name, s.canvas, "; +$sql .= " u2.rowid as id2, u2.login as login2, u2.firstname as firstname2, u2.lastname as lastname2, u2.admin as admin2, u2.fk_soc as fk_soc2, u2.office_phone as ofice_phone2, u2.user_mobile as user_mobile2, u2.email as email2, u2.gender as gender2, u2.photo as photo2, u2.entity as entity2, u2.statut as statut2,"; +$sql .= " s.nom as name, s.canvas,"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -319,7 +341,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u2 ON u.fk_user = u2.rowid"; -if (!empty($search_categ) || !empty($catid)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_user as cu ON u.rowid = cu.fk_user"; // We'll need this table joined to the select in order to filter by categ +if (!empty($search_categ) || !empty($catid)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_user as cu ON u.rowid = cu.fk_user"; // We'll need this table joined to the select in order to filter by categ +} // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printUserListWhere', $parameters); // Note that $action and $object may have been modified by hook @@ -328,27 +352,67 @@ if ($reshook > 0) { } else { $sql .= " WHERE u.entity IN (".getEntity('user').")"; } -if ($socid > 0) $sql .= " AND u.fk_soc = ".$socid; +if ($socid > 0) { + $sql .= " AND u.fk_soc = ".((int) $socid); +} //if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user); -if ($search_supervisor > 0) $sql .= " AND u.fk_user IN (".$db->sanitize($db->escape($search_supervisor)).")"; -if ($search_thirdparty != '') $sql .= natural_search(array('s.nom'), $search_thirdparty); -if ($search_login != '') $sql .= natural_search("u.login", $search_login); -if ($search_lastname != '') $sql .= natural_search("u.lastname", $search_lastname); -if ($search_firstname != '') $sql .= natural_search("u.firstname", $search_firstname); -if ($search_gender != '' && $search_gender != '-1') $sql .= " AND u.gender = '".$db->escape($search_gender)."'"; // Cannot use natural_search as looking for %man% also includes woman +if ($search_supervisor > 0) { + $sql .= " AND u.fk_user IN (".$db->sanitize($search_supervisor).")"; +} +if ($search_thirdparty != '') { + $sql .= natural_search(array('s.nom'), $search_thirdparty); +} +if ($search_login != '') { + $sql .= natural_search("u.login", $search_login); +} +if ($search_lastname != '') { + $sql .= natural_search("u.lastname", $search_lastname); +} +if ($search_firstname != '') { + $sql .= natural_search("u.firstname", $search_firstname); +} +if ($search_gender != '' && $search_gender != '-1') { + $sql .= " AND u.gender = '".$db->escape($search_gender)."'"; // Cannot use natural_search as looking for %man% also includes woman +} if (is_numeric($search_employee) && $search_employee >= 0) { $sql .= ' AND u.employee = '.(int) $search_employee; } -if ($search_accountancy_code != '') $sql .= natural_search("u.accountancy_code", $search_accountancy_code); -if ($search_email != '') $sql .= natural_search("u.email", $search_email); -if ($search_api_key != '') $sql .= natural_search("u.api_key", $search_api_key); -if ($search_statut != '' && $search_statut >= 0) $sql .= " AND u.statut IN (".$db->sanitize($db->escape($search_statut)).")"; -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); -if ($catid > 0) $sql .= " AND cu.fk_categorie = ".((int) $catid); -if ($catid == -2) $sql .= " AND cu.fk_categorie IS NULL"; -if ($search_categ > 0) $sql .= " AND cu.fk_categorie = ".$db->escape($search_categ); -if ($search_categ == -2) $sql .= " AND cu.fk_categorie IS NULL"; -if ($mode == 'employee' && empty($user->rights->salaries->readall)) $sql .= " AND u.fk_user IN (".join(',', $childids).")"; +if ($search_accountancy_code != '') { + $sql .= natural_search("u.accountancy_code", $search_accountancy_code); +} +if ($search_phonepro != '') { + $sql .= natural_search("u.office_phone", $search_phonepro); +} +if ($search_phonemobile != '') { + $sql .= natural_search("u.user_mobile", $search_phonemobile); +} +if ($search_email != '') { + $sql .= natural_search("u.email", $search_email); +} +if ($search_api_key != '') { + $sql .= natural_search("u.api_key", $search_api_key); +} +if ($search_statut != '' && $search_statut >= 0) { + $sql .= " AND u.statut IN (".$db->sanitize($search_statut).")"; +} +if ($sall) { + $sql .= natural_search(array_keys($fieldstosearchall), $sall); +} +if ($catid > 0) { + $sql .= " AND cu.fk_categorie = ".((int) $catid); +} +if ($catid == -2) { + $sql .= " AND cu.fk_categorie IS NULL"; +} +if ($search_categ > 0) { + $sql .= " AND cu.fk_categorie = ".$db->escape($search_categ); +} +if ($search_categ == -2) { + $sql .= " AND cu.fk_categorie IS NULL"; +} +if ($mode == 'employee' && empty($user->rights->salaries->readall)) { + $sql .= " AND u.fk_user IN (".$db->sanitize(join(',', $childids)).")"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -359,26 +423,24 @@ $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $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 - { + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } } // 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))) -{ +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; } else { - if ($limit) $sql .= $db->plimit($limit + 1, $offset); + if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); + } $resql = $db->query($sql); - if (!$resql) - { + if (!$resql) { dol_print_error($db); exit; } @@ -387,8 +449,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit } // Direct jump if only one record found -if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) -{ +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_URL_ROOT.'/user/card.php?id='.$id); @@ -401,37 +462,88 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ llxHeader('', $langs->trans("ListOfUsers"), $help_url); $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&amp;contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&amp;limit='.urlencode($limit); -if ($sall != '') $param .= '&amp;sall='.urlencode($sall); -if ($search_user != '') $param .= "&amp;search_user=".urlencode($search_user); -if ($search_login != '') $param .= "&amp;search_login=".urlencode($search_login); -if ($search_lastname != '') $param .= "&amp;search_lastname=".urlencode($search_lastname); -if ($search_firstname != '') $param .= "&amp;search_firstname=".urlencode($search_firstname); -if ($search_gender != '') $param .= "&amp;search_gender=".urlencode($search_gender); -if ($search_employee != '') $param .= "&amp;search_employee=".urlencode($search_employee); -if ($search_accountancy_code != '') $param .= "&amp;search_accountancy_code=".urlencode($search_accountancy_code); -if ($search_email != '') $param .= "&amp;search_email=".urlencode($search_email); -if ($search_api_key != '') $param .= "&amp;search_api_key=".urlencode($search_api_key); -if ($search_supervisor > 0) $param .= "&amp;search_supervisor=".urlencode($search_supervisor); -if ($search_statut != '') $param .= "&amp;search_statut=".urlencode($search_statut); -if ($optioncss != '') $param .= '&amp;optioncss='.urlencode($optioncss); -if ($mode != '') $param .= '&amp;mode='.urlencode($mode); -if ($search_categ > 0) $param .= "&amp;search_categ=".urlencode($search_categ); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&amp;contextpage='.urlencode($contextpage); +} +if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&amp;limit='.urlencode($limit); +} +if ($sall != '') { + $param .= '&amp;sall='.urlencode($sall); +} +if ($search_user != '') { + $param .= "&amp;search_user=".urlencode($search_user); +} +if ($search_login != '') { + $param .= "&amp;search_login=".urlencode($search_login); +} +if ($search_lastname != '') { + $param .= "&amp;search_lastname=".urlencode($search_lastname); +} +if ($search_firstname != '') { + $param .= "&amp;search_firstname=".urlencode($search_firstname); +} +if ($search_gender != '') { + $param .= "&amp;search_gender=".urlencode($search_gender); +} +if ($search_employee != '') { + $param .= "&amp;search_employee=".urlencode($search_employee); +} +if ($search_accountancy_code != '') { + $param .= "&amp;search_accountancy_code=".urlencode($search_accountancy_code); +} +if ($search_phonepro != '') { + $param .= "&amp;search_phonepro=".urlencode($search_phonepro); +} +if ($search_phonemobile != '') { + $param .= "&amp;search_phonemobile=".urlencode($search_phonemobile); +} +if ($search_email != '') { + $param .= "&amp;search_email=".urlencode($search_email); +} +if ($search_api_key != '') { + $param .= "&amp;search_api_key=".urlencode($search_api_key); +} +if ($search_supervisor > 0) { + $param .= "&amp;search_supervisor=".urlencode($search_supervisor); +} +if ($search_statut != '') { + $param .= "&amp;search_statut=".urlencode($search_statut); +} +if ($optioncss != '') { + $param .= '&amp;optioncss='.urlencode($optioncss); +} +if ($mode != '') { + $param .= '&amp;mode='.urlencode($mode); +} +if ($search_categ > 0) { + $param .= "&amp;search_categ=".urlencode($search_categ); +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array(); -if ($permissiontoadd) $arrayofmassactions['disable'] = $langs->trans("DisableUser"); -if ($permissiontoadd) $arrayofmassactions['reactivate'] = $langs->trans("Reactivate"); -//if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); +if ($permissiontoadd) { + $arrayofmassactions['disable'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("DisableUser"); +} +if ($permissiontoadd) { + $arrayofmassactions['reactivate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Reactivate"); +} +if ($permissiontoadd) { + $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); +} +//if ($permissiontodelete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').'&ensp;'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { + $arrayofmassactions = array(); +} $massactionbutton = $form->selectMassAction('', $arrayofmassactions); print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; @@ -440,7 +552,9 @@ print '<input type="hidden" name="mode" value="'.$mode.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; $url = DOL_URL_ROOT.'/user/card.php?action=create'.($mode == 'employee' ? '&employee=1' : '').'&leftmenu='; -if (!empty($socid)) $url .= '&socid='.$socid; +if (!empty($socid)) { + $url .= '&socid='.$socid; +} $newcardbutton = dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -458,8 +572,7 @@ $objecttmp = new User($db); $trackid = 'use'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; -if (!empty($catid)) -{ +if (!empty($catid)) { print "<div id='ways'>"; $c = new Categorie($db); $ways = $c->print_all_ways(' &gt; ', 'user/list.php'); @@ -467,9 +580,10 @@ if (!empty($catid)) print "</div><br>"; } -if ($search_all) -{ - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); +if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; } @@ -479,21 +593,22 @@ $moreforfilter = ''; $moreforfilter.= '</div>';*/ // Filter on categories -if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) -{ +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $moreforfilter .= '<div class="divsearchfield">'; - $moreforfilter .= $langs->trans('Categories').': '; + $moreforfilter .= img_picto($langs->trans("Category"), 'category', 'class="paddingright"'); $moreforfilter .= $formother->select_categories(Categorie::TYPE_USER, $search_categ, 'search_categ', 1); $moreforfilter .= '</div>'; } $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($reshook)) { + $moreforfilter .= $hookmanager->resPrint; +} else { + $moreforfilter = $hookmanager->resPrint; +} -if (!empty($moreforfilter)) -{ +if (!empty($moreforfilter)) { print '<div class="liste_titre liste_titre_bydiv centpercent">'; print $moreforfilter; print '</div>'; @@ -509,68 +624,60 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit // Fields title search // -------------------------------------------------------------------- print '<tr class="liste_titre_filter">'; -if (!empty($arrayfields['u.login']['checked'])) -{ +if (!empty($arrayfields['u.login']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_login" class="maxwidth50" value="'.$search_login.'"></td>'; } -if (!empty($arrayfields['u.lastname']['checked'])) -{ +if (!empty($arrayfields['u.lastname']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_lastname" class="maxwidth50" value="'.$search_lastname.'"></td>'; } -if (!empty($arrayfields['u.firstname']['checked'])) -{ +if (!empty($arrayfields['u.firstname']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_firstname" class="maxwidth50" value="'.$search_firstname.'"></td>'; } -if (!empty($arrayfields['u.gender']['checked'])) -{ +if (!empty($arrayfields['u.gender']['checked'])) { print '<td class="liste_titre">'; $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('search_gender', $arraygender, $search_gender, 1); print '</td>'; } -if (!empty($arrayfields['u.employee']['checked'])) -{ +if (!empty($arrayfields['u.employee']['checked'])) { print '<td class="liste_titre">'; print $form->selectyesno('search_employee', $search_employee, 1, false, 1); print '</td>'; } // Supervisor -if (!empty($arrayfields['u.fk_user']['checked'])) -{ - print '<td class="liste_titre">'; - print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, array(), 0, '', 0, 0, 0, 0, '', 0, '', 'maxwidth200'); - print '</td>'; +if (!empty($arrayfields['u.fk_user']['checked'])) { + print '<td class="liste_titre">'; + print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, array(), 0, '', 0, 0, 0, 0, '', 0, '', 'maxwidth200'); + print '</td>'; } -if (!empty($arrayfields['u.accountancy_code']['checked'])) -{ +if (!empty($arrayfields['u.accountancy_code']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_accountancy_code" class="maxwidth50" value="'.$search_accountancy_code.'"></td>'; } -if (!empty($arrayfields['u.email']['checked'])) -{ +if (!empty($arrayfields['u.office_phone']['checked'])) { + print '<td class="liste_titre"><input type="text" name="search_phonepro" class="maxwidth75" value="'.$search_phonepro.'"></td>'; +} +if (!empty($arrayfields['u.user_mobile']['checked'])) { + print '<td class="liste_titre"><input type="text" name="search_phonemobile" class="maxwidth75" value="'.$search_phonemobile.'"></td>'; +} +if (!empty($arrayfields['u.email']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_email" class="maxwidth75" value="'.$search_email.'"></td>'; } -if (!empty($arrayfields['u.api_key']['checked'])) -{ +if (!empty($arrayfields['u.api_key']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_api_key" class="maxwidth50" value="'.$search_api_key.'"></td>'; } -if (!empty($arrayfields['u.fk_soc']['checked'])) -{ +if (!empty($arrayfields['u.fk_soc']['checked'])) { print '<td class="liste_titre"><input type="text" name="search_thirdparty" class="maxwidth75" value="'.$search_thirdparty.'"></td>'; } -if (!empty($arrayfields['u.entity']['checked'])) -{ +if (!empty($arrayfields['u.entity']['checked'])) { print '<td class="liste_titre"></td>'; } -if (!empty($arrayfields['u.salary']['checked'])) -{ - print '<td class="liste_titre"></td>'; -} -if (!empty($arrayfields['u.datelastlogin']['checked'])) -{ +if (!empty($arrayfields['u.salary']['checked'])) { print '<td class="liste_titre"></td>'; } -if (!empty($arrayfields['u.datepreviouslogin']['checked'])) -{ +if (!empty($arrayfields['u.datelastlogin']['checked'])) { + print '<td class="liste_titre"></td>'; +} +if (!empty($arrayfields['u.datepreviouslogin']['checked'])) { print '<td class="liste_titre"></td>'; } // Extra fields @@ -579,20 +686,17 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['u.datec']['checked'])) -{ +if (!empty($arrayfields['u.datec']['checked'])) { // Date creation print '<td class="liste_titre">'; print '</td>'; } -if (!empty($arrayfields['u.tms']['checked'])) -{ +if (!empty($arrayfields['u.tms']['checked'])) { // Date modification print '<td class="liste_titre">'; print '</td>'; } -if (!empty($arrayfields['u.statut']['checked'])) -{ +if (!empty($arrayfields['u.statut']['checked'])) { // Status print '<td class="liste_titre center">'; print $form->selectarray('search_statut', array('-1'=>'', '0'=>$langs->trans('Disabled'), '1'=>$langs->trans('Enabled')), $search_statut); @@ -607,29 +711,69 @@ print '</tr>'."\n"; print '<tr class="liste_titre">'; -if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre("Login", $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.lastname']['checked'])) print_liste_field_titre("Lastname", $_SERVER['PHP_SELF'], "u.lastname", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.firstname']['checked'])) print_liste_field_titre("FirstName", $_SERVER['PHP_SELF'], "u.firstname", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.gender']['checked'])) print_liste_field_titre("Gender", $_SERVER['PHP_SELF'], "u.gender", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.employee']['checked'])) print_liste_field_titre("Employee", $_SERVER['PHP_SELF'], "u.employee", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.fk_user']['checked'])) print_liste_field_titre("HierarchicalResponsible", $_SERVER['PHP_SELF'], "u.fk_user", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.accountancy_code']['checked'])) print_liste_field_titre("AccountancyCode", $_SERVER['PHP_SELF'], "u.accountancy_code", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.email']['checked'])) print_liste_field_titre("EMail", $_SERVER['PHP_SELF'], "u.email", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.api_key']['checked'])) print_liste_field_titre("ApiKey", $_SERVER['PHP_SELF'], "u.api_key", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.fk_soc']['checked'])) print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "u.fk_soc", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.entity']['checked'])) print_liste_field_titre("Entity", $_SERVER['PHP_SELF'], "u.entity", $param, "", "", $sortfield, $sortorder); -if (!empty($arrayfields['u.salary']['checked'])) print_liste_field_titre("Salary", $_SERVER['PHP_SELF'], "u.salary", $param, "", "", $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['u.datelastlogin']['checked'])) print_liste_field_titre("LastConnexion", $_SERVER['PHP_SELF'], "u.datelastlogin", $param, "", '', $sortfield, $sortorder, 'center '); -if (!empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_titre("PreviousConnexion", $_SERVER['PHP_SELF'], "u.datepreviouslogin", $param, "", '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre("Login", $_SERVER['PHP_SELF'], "u.login", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.lastname']['checked'])) { + print_liste_field_titre("Lastname", $_SERVER['PHP_SELF'], "u.lastname", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.firstname']['checked'])) { + print_liste_field_titre("FirstName", $_SERVER['PHP_SELF'], "u.firstname", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.gender']['checked'])) { + print_liste_field_titre("Gender", $_SERVER['PHP_SELF'], "u.gender", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.employee']['checked'])) { + print_liste_field_titre("Employee", $_SERVER['PHP_SELF'], "u.employee", $param, "", "", $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['u.fk_user']['checked'])) { + print_liste_field_titre("HierarchicalResponsible", $_SERVER['PHP_SELF'], "u.fk_user", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.accountancy_code']['checked'])) { + print_liste_field_titre("AccountancyCode", $_SERVER['PHP_SELF'], "u.accountancy_code", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.office_phone']['checked'])) { + print_liste_field_titre("PhonePro", $_SERVER['PHP_SELF'], "u.office_phone", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.user_mobile']['checked'])) { + print_liste_field_titre("PhoneMobile", $_SERVER['PHP_SELF'], "u.user_mobile", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.email']['checked'])) { + print_liste_field_titre("EMail", $_SERVER['PHP_SELF'], "u.email", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.api_key']['checked'])) { + print_liste_field_titre("ApiKey", $_SERVER['PHP_SELF'], "u.api_key", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.fk_soc']['checked'])) { + print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "u.fk_soc", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.entity']['checked'])) { + print_liste_field_titre("Entity", $_SERVER['PHP_SELF'], "u.entity", $param, "", "", $sortfield, $sortorder); +} +if (!empty($arrayfields['u.salary']['checked'])) { + print_liste_field_titre("Salary", $_SERVER['PHP_SELF'], "u.salary", $param, "", "", $sortfield, $sortorder, 'right '); +} +if (!empty($arrayfields['u.datelastlogin']['checked'])) { + print_liste_field_titre("LastConnexion", $_SERVER['PHP_SELF'], "u.datelastlogin", $param, "", '', $sortfield, $sortorder, 'center '); +} +if (!empty($arrayfields['u.datepreviouslogin']['checked'])) { + print_liste_field_titre("PreviousConnexion", $_SERVER['PHP_SELF'], "u.datepreviouslogin", $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); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -if (!empty($arrayfields['u.datec']['checked'])) print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "u.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['u.tms']['checked'])) print_liste_field_titre("DateModificationShort", $_SERVER["PHP_SELF"], "u.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); -if (!empty($arrayfields['u.statut']['checked'])) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "u.statut", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['u.datec']['checked'])) { + print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "u.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['u.tms']['checked'])) { + print_liste_field_titre("DateModificationShort", $_SERVER["PHP_SELF"], "u.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); +} +if (!empty($arrayfields['u.statut']['checked'])) { + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "u.statut", "", $param, '', $sortfield, $sortorder, 'center '); +} // Action column print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print '</tr>'."\n"; @@ -637,11 +781,11 @@ print '</tr>'."\n"; // 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) - { - if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object +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) { + if (preg_match('/\$object/', $val)) { + $needToFetchEachLine++; // There is at least one compute field that use $object + } } } @@ -650,11 +794,12 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co // -------------------------------------------------------------------- $i = 0; $totalarray = array(); -$arrayofselected = array(); -while ($i < ($limit ? min($num, $limit) : $num)) -{ +$arrayofselected = is_array($toselect) ? $toselect : array(); +while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); - if (empty($obj)) break; // Should not happen + if (empty($obj)) { + break; // Should not happen + } // Store properties in $object $object->setVarsFromFetchObj($obj); @@ -664,6 +809,8 @@ while ($i < ($limit ? min($num, $limit) : $num)) $userstatic->ref = $obj->label; $userstatic->login = $obj->login; $userstatic->statut = $obj->statut; + $userstatic->office_phone = $obj->office_phone; + $userstatic->user_mobile = $obj->user_mobile; $userstatic->email = $obj->email; $userstatic->gender = $obj->gender; $userstatic->socid = $obj->fk_soc; @@ -675,142 +822,164 @@ while ($i < ($limit ? min($num, $limit) : $num)) $li = $userstatic->getNomUrl(-1, '', 0, 0, 24, 1, 'login', '', 1); print '<tr class="oddeven">'; - if (!empty($arrayfields['u.login']['checked'])) - { + + if (!empty($arrayfields['u.login']['checked'])) { print '<td class="nowraponall">'; print $li; - if (!empty($conf->multicompany->enabled) && $obj->admin && !$obj->entity) - { - print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); - } elseif ($obj->admin) - { + if (!empty($conf->multicompany->enabled) && $obj->admin && !$obj->entity) { + print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); + } elseif ($obj->admin) { print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.lastname']['checked'])) - { - print '<td class="tdoverflowmax150">'.$obj->lastname.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.lastname']['checked'])) { + print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).'">'.dol_escape_htmltag($obj->lastname).'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.firstname']['checked'])) - { - print '<td class="tdoverflowmax150">'.$obj->firstname.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.firstname']['checked'])) { + print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).'">'.dol_escape_htmltag($obj->firstname).'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.gender']['checked'])) - { + if (!empty($arrayfields['u.gender']['checked'])) { print '<td>'; - if ($obj->gender) print $langs->trans("Gender".$obj->gender); + if ($obj->gender) { + print $langs->trans("Gender".$obj->gender); + } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.employee']['checked'])) - { - print '<td>'.yn($obj->employee).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.employee']['checked'])) { + print '<td class="center">'.yn($obj->employee).'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } // Supervisor - if (!empty($arrayfields['u.fk_user']['checked'])) - { - // Resp - print '<td class="nowrap">'; - if ($obj->login2) - { - $user2->id = $obj->id2; - $user2->login = $obj->login2; - $user2->lastname = $obj->lastname2; - $user2->firstname = $obj->firstname2; - $user2->gender = $obj->gender2; - $user2->photo = $obj->photo2; - $user2->admin = $obj->admin2; - $user2->email = $obj->email2; - $user2->socid = $obj->fk_soc2; - $user2->statut = $obj->statut2; - print $user2->getNomUrl(-1, '', 0, 0, 24, 0, '', '', 1); - if (!empty($conf->multicompany->enabled) && $obj->admin2 && !$obj->entity2) - { - print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); - } elseif ($obj->admin2) - { - print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); - } - } - print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.fk_user']['checked'])) { + // Resp + print '<td class="nowrap">'; + if ($obj->login2) { + $user2->id = $obj->id2; + $user2->login = $obj->login2; + $user2->lastname = $obj->lastname2; + $user2->firstname = $obj->firstname2; + $user2->gender = $obj->gender2; + $user2->photo = $obj->photo2; + $user2->admin = $obj->admin2; + $user2->office_phone = $obj->office_phone; + $user2->user_mobile = $obj->user_mobile; + $user2->email = $obj->email2; + $user2->socid = $obj->fk_soc2; + $user2->statut = $obj->statut2; + print $user2->getNomUrl(-1, '', 0, 0, 24, 0, '', '', 1); + if (!empty($conf->multicompany->enabled) && $obj->admin2 && !$obj->entity2) { + print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); + } elseif ($obj->admin2) { + print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); + } + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.accountancy_code']['checked'])) - { + if (!empty($arrayfields['u.accountancy_code']['checked'])) { print '<td>'.$obj->accountancy_code.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.email']['checked'])) - { - print '<td>'.$obj->email.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.office_phone']['checked'])) { + print "<td>".dol_print_phone($obj->office_phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.api_key']['checked'])) - { + if (!empty($arrayfields['u.user_mobile']['checked'])) { + print "<td>".dol_print_phone($obj->user_mobile, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'mobile')."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['u.email']['checked'])) { + print '<td class="tdoverflowmax150">'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 0, 0, 1)."</td>\n"; + if (!$i) { + $totalarray['nbfield']++; + } + } + if (!empty($arrayfields['u.api_key']['checked'])) { print '<td>'.$obj->api_key.'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } - if (!empty($arrayfields['u.fk_soc']['checked'])) - { - print "<td>"; - if ($obj->fk_soc) - { + if (!empty($arrayfields['u.fk_soc']['checked'])) { + print '<td class="tdoverflowmax200">'; + if ($obj->fk_soc) { $companystatic->id = $obj->fk_soc; $companystatic->name = $obj->name; $companystatic->canvas = $obj->canvas; print $companystatic->getNomUrl(1); - } elseif ($obj->ldap_sid) - { - print $langs->trans("DomainUser"); + } elseif ($obj->ldap_sid) { + print '<span class="opacitymedium">'.$langs->trans("DomainUser").'</span>'; } else { - print $langs->trans("InternalUser"); + print '<span class="opacitymedium">'.$langs->trans("InternalUser").'</span>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Multicompany enabled - if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { - if (!empty($arrayfields['u.entity']['checked'])) - { + if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (!empty($arrayfields['u.entity']['checked'])) { print '<td>'; - if (!$obj->entity) - { + if (!$obj->entity) { print $langs->trans("AllEntities"); } else { $mc->getInfo($obj->entity); print $mc->label; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } } // Salary - if (!empty($arrayfields['u.salary']['checked'])) - { - print '<td class="nowraponall right">'.($obj->salary ? price($obj->salary) : '').'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!empty($arrayfields['u.salary']['checked'])) { + print '<td class="nowraponall right">'.($obj->salary ? price($obj->salary) : '').'</td>'; + if (!$i) { + $totalarray['nbfield']++; + } } // Date last login - if (!empty($arrayfields['u.datelastlogin']['checked'])) - { + if (!empty($arrayfields['u.datelastlogin']['checked'])) { print '<td class="nowrap center">'.dol_print_date($db->jdate($obj->datelastlogin), "dayhour").'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date previous login - if (!empty($arrayfields['u.datepreviouslogin']['checked'])) - { + if (!empty($arrayfields['u.datepreviouslogin']['checked'])) { print '<td class="nowrap center">'.dol_print_date($db->jdate($obj->datepreviouslogin), "dayhour").'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Extra fields @@ -820,38 +989,44 @@ while ($i < ($limit ? min($num, $limit) : $num)) $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation - if (!empty($arrayfields['u.datec']['checked'])) - { + if (!empty($arrayfields['u.datec']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date modification - if (!empty($arrayfields['u.tms']['checked'])) - { + if (!empty($arrayfields['u.tms']['checked'])) { print '<td class="center">'; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Status - if (!empty($arrayfields['u.statut']['checked'])) - { + if (!empty($arrayfields['u.statut']['checked'])) { $userstatic->statut = $obj->statut; print '<td class="center">'.$userstatic->getLibStatut(5).'</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Action column print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined $selected = 0; - if (in_array($object->id, $arrayofselected)) $selected = 1; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print '</tr>'."\n"; @@ -862,10 +1037,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found -if ($num == 0) -{ +if ($num == 0) { $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; } diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 5cb03af224f..57a653a01d1 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -24,17 +24,24 @@ */ //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Uncomment creates pb to relogon after a disconnect -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} //if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // We need company to get correct logo onto home page -if (!defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) define('EVEN_IF_ONLY_LOGIN_ALLOWED', '1'); +if (!defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) { + define('EVEN_IF_ONLY_LOGIN_ALLOWED', '1'); +} require_once '../main.inc.php'; // This can happen only with a bookmark or forged url call. -if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser' || $_SESSION["dol_authmode"] == 'http')) -{ +if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser' || $_SESSION["dol_authmode"] == 'http')) { unset($_SESSION["dol_login"]); die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]); } @@ -43,7 +50,9 @@ global $conf, $langs, $user; // Call trigger $result = $user->call_trigger('USER_LOGOUT', $user); -if ($result < 0) $error++; +if ($result < 0) { + $error++; +} // End call triggers // Hooks on logout @@ -51,26 +60,41 @@ $action = ''; $hookmanager->initHooks(array('logout')); $parameters = array(); $reshook = $hookmanager->executeHooks('afterLogout', $parameters, $user, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) { $error++; } +if ($reshook < 0) { + $error++; +} // Define url to go after disconnect $urlfrom = empty($_SESSION["urlfrom"]) ? '' : $_SESSION["urlfrom"]; // Define url to go $url = DOL_URL_ROOT."/index.php"; // By default go to login page -if ($urlfrom) $url = DOL_URL_ROOT.$urlfrom; -if (!empty($conf->global->MAIN_LOGOUT_GOTO_URL)) $url = $conf->global->MAIN_LOGOUT_GOTO_URL; +if ($urlfrom) { + $url = DOL_URL_ROOT.$urlfrom; +} +if (!empty($conf->global->MAIN_LOGOUT_GOTO_URL)) { + $url = $conf->global->MAIN_LOGOUT_GOTO_URL; +} -if (GETPOST('dol_hide_topmenu')) $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_hide_topmenu=1'; -if (GETPOST('dol_hide_leftmenu')) $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_hide_leftmenu=1'; -if (GETPOST('dol_optimize_smallscreen')) $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_optimize_smallscreen=1'; -if (GETPOST('dol_no_mouse_hover')) $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_no_mouse_hover=1'; -if (GETPOST('dol_use_jmobile')) $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_use_jmobile=1'; +if (GETPOST('dol_hide_topmenu')) { + $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_hide_topmenu=1'; +} +if (GETPOST('dol_hide_leftmenu')) { + $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_hide_leftmenu=1'; +} +if (GETPOST('dol_optimize_smallscreen')) { + $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_optimize_smallscreen=1'; +} +if (GETPOST('dol_no_mouse_hover')) { + $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_no_mouse_hover=1'; +} +if (GETPOST('dol_use_jmobile')) { + $url .= (preg_match('/\?/', $url) ? '&' : '?').'dol_use_jmobile=1'; +} // Destroy session dol_syslog("End of session ".session_id()); -if (session_status() === PHP_SESSION_ACTIVE) -{ +if (session_status() === PHP_SESSION_ACTIVE) { session_destroy(); } @@ -80,5 +104,7 @@ unset($_SESSION['dol_login']); unset($_SESSION['dol_entity']); unset($_SESSION['urlfrom']); -if (GETPOST('noredirect')) return; +if (GETPOST('noredirect')) { + return; +} header("Location: ".$url); // Default behaviour is redirect to index.php page diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 95527747d2e..1ce397626e6 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -39,11 +39,15 @@ $object->fetch($id, '', '', 1); $object->getrights(); // If user is not user read and no permission to read other users, we stop -if (($object->id != $user->id) && (!$user->rights->user->user->lire)) accessforbidden(); +if (($object->id != $user->id) && (!$user->rights->user->user->lire)) { + accessforbidden(); +} // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); @@ -58,10 +62,12 @@ $hookmanager->initHooks(array('usercard', 'usernote', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { - if ($action == 'update' && $user->rights->user->user->creer && !$_POST["cancel"]) { + if ($action == 'update' && $user->rights->user->user->creer && !GETPOST("cancel")) { $db->begin(); $res = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES | ENT_HTML5)); @@ -83,8 +89,7 @@ llxHeader(); $form = new Form($db); -if ($id) -{ +if ($id) { $head = user_prepare_head($object); $title = $langs->trans("User"); @@ -100,7 +105,7 @@ if ($id) print '<div class="underbanner clearboth"></div>'; - print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">"; + print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<div class="fichecenter">'; @@ -114,8 +119,7 @@ if ($id) // Note print '<tr><td class="tdtop">'.$langs->trans("Note").'</td>'; print '<td class="'.($editenabled ? '' : 'sensiblehtmlcontent').'">'; - if ($editenabled) - { + if ($editenabled) { print "<input type=\"hidden\" name=\"action\" value=\"update\">"; print "<input type=\"hidden\" name=\"id\" value=\"".$object->id."\">"; // Editeur wysiwyg @@ -132,8 +136,7 @@ if ($id) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '<div class="center">'; print '<input type="submit" class="button button-save" name="update" value="'.$langs->trans("Save").'">'; print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; @@ -143,13 +146,12 @@ if ($id) /* - * Actions - */ + * Actions + */ print '<div class="tabsAction">'; - if ($user->rights->user->user->creer && $action != 'edit') - { + if ($user->rights->user->user->creer && $action != 'edit') { print "<a class=\"butAction\" href=\"note.php?id=".$object->id."&amp;action=edit\">".$langs->trans('Modify')."</a>"; } diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 3c7395fe1e8..469823f0358 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -32,58 +32,77 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php'; // Load translation files required by page -$langs->loadLangs(array('companies', 'mails', 'admin', 'other')); +$langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors')); $id = GETPOST("id", 'int'); +$ref = GETPOST('ref', 'alpha'); + $action = GETPOST('action', 'aZ09'); $actionid = GETPOST('actionid'); -// Security check -if ($user->socid) $id = $user->socid; -$result = restrictedArea($user, 'societe', '', ''); - $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 (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "n.daten"; -if (empty($page) || $page == -1) { $page = 0; } +if (!$sortorder) { + $sortorder = "DESC"; +} +if (!$sortfield) { + $sortfield = "n.daten"; +} +if (empty($page) || $page == -1) { + $page = 0; +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; $now = dol_now(); +// Security check +$object = new User($db); +if ($id > 0 || !empty($ref)) { + $result = $object->fetch($id, $ref, '', 1); + $object->getrights(); +} + +$permissiontoadd = (($object->id == $user->id) || (!empty($user->rights->user->user->lire))); + +// Security check +if ($user->socid) { + $id = $user->socid; +} +$result = restrictedArea($user, 'user', '', ''); + /* * Actions */ +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; +} + // Add a notification -if ($action == 'add') -{ +if ($action == 'add') { $error = 0; - if ($actionid <= 0) - { + if ($actionid <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors'); $error++; + $action = 'create'; } - if (!$error) - { + if (!$error) { $db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; - $sql .= " WHERE fk_user=".$id." AND fk_action=".$actionid; - if ($db->query($sql)) - { + $sql .= " WHERE fk_user=".((int) $id)." AND fk_action=".((int) $actionid); + if ($db->query($sql)) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_user, fk_action)"; $sql .= " VALUES ('".$db->idate($now)."',".$id.",".$actionid.")"; - if (!$db->query($sql)) - { + if (!$db->query($sql)) { $error++; dol_print_error($db); } @@ -91,18 +110,17 @@ if ($action == 'add') dol_print_error($db); } - if (!$error) - { + if (!$error) { $db->commit(); } else { $db->rollback(); + $action = 'create'; } } } // Remove a notification -if ($action == 'delete') -{ +if ($action == 'delete') { $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".GETPOST("actid", "int"); $db->query($sql); } @@ -120,13 +138,14 @@ $result = $object->fetch($id, '', '', 1); $object->getrights(); $title = $langs->trans("ThirdParty").' - '.$langs->trans("Notification"); -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name.' - '.$langs->trans("Notification"); +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { + $title = $object->name.' - '.$langs->trans("Notification"); +} $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); -if ($result > 0) -{ +if ($result > 0) { $langs->load("other"); $head = user_prepare_head($object); @@ -144,8 +163,7 @@ if ($result > 0) // Login print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>'; - if (!empty($object->ldap_sid) && $object->statut == 0) - { + if (!empty($object->ldap_sid) && $object->statut == 0) { print '<td class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>'; } else { print '<td>'.$object->login.'</td>'; @@ -153,16 +171,16 @@ if ($result > 0) print '</tr>'."\n"; /*print '<tr><td class="titlefield">'.$langs->trans("NbOfActiveNotifications").'</td>'; // Notification for this thirdparty - print '<td colspan="3">'; - $nbofrecipientemails=0; - $notify=new Notify($db); - $tmparray = $notify->getNotificationsArray('', 0, null, $object->id, array('user')); - foreach($tmparray as $tmpkey => $tmpval) - { - $nbofrecipientemails++; - } - print $nbofrecipientemails; - print '</td></tr>';*/ + print '<td colspan="3">'; + $nbofrecipientemails=0; + $notify=new Notify($db); + $tmparray = $notify->getNotificationsArray('', 0, null, $object->id, array('user')); + foreach($tmparray as $tmpkey => $tmpval) + { + $nbofrecipientemails++; + } + print $nbofrecipientemails; + print '</td></tr>';*/ print '</table>'; @@ -184,68 +202,27 @@ if ($result > 0) // Add notification form - print load_fiche_titre($langs->trans("AddNewNotification"), '', ''); + // print load_fiche_titre($langs->trans("AddNewNotification"), '', ''); - print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">'; + print '<form action="'.$_SERVER["PHP_SELF"].'?id='.urlencode($id).'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="add">'; - $param = "&id=".$id; + $param = "&id=".urlencode($id); // Line with titles - print '<table width="100%" class="noborder">'; + /* print '<table width="100%" class="noborder">'; print '<tr class="liste_titre">'; - print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '"width="45%"', $sortfield, $sortorder); - print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '"width="35%"', $sortfield, $sortorder); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '"width="10%"', $sortfield, $sortorder); + print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder); + print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); + print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder); print_liste_field_titre(''); print "</tr>\n"; - - // $listofemails=$object->thirdparty_and_contact_email_array(); - if ($object->email) - { - $actions = array(); - - // Load array of available notifications - $notificationtrigger = new InterfaceNotification($db); - $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents(); - - foreach ($listofnotifiedevents as $notifiedevent) - { - $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']); - $actions[$notifiedevent['rowid']] = $label; - } - print '<tr class="oddeven nohover"><td>'; - print $object->getNomUrl(1); - if (isValidEmail($object->email)) - { - print ' &lt;'.$object->email.'&gt;'; - } else { - $langs->load("errors"); - print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email); - } - print '</td>'; - print '<td>'; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); - print '</td>'; - print '<td>'; - $type = array('email'=>$langs->trans("EMail")); - print $form->selectarray("typeid", $type); - print '</td>'; - print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; - print '</tr>'; - } else { - print '<tr class="oddeven"><td colspan="4">'; - print $langs->trans("YouMustAssignUserMailFirst"); - print '</td></tr>'; - } - print '</table>'; - print '</form>'; print '<br>'; - + */ // List of notifications enabled for contacts $sql = "SELECT n.rowid, n.type,"; $sql .= " a.code, a.label,"; @@ -258,120 +235,164 @@ if ($result > 0) $sql .= " AND c.rowid = ".$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); } else { dol_print_error($db); } + $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + + $title = $langs->trans("ListOfActiveNotifications"); + // List of active notifications - print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); + //print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1); // Line with titles print '<table width="100%" class="noborder">'; print '<tr class="liste_titre">'; - print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, '"width="45%"', $sortfield, $sortorder); - print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '"width="35%"', $sortfield, $sortorder); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '"width="10%"', $sortfield, $sortorder); + print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "c.lastname,c.firstname", '', $param, 'width="45%"', $sortfield, $sortorder); + print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); + print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder); print_liste_field_titre('', '', ''); print '</tr>'; - $langs->load("errors"); - $langs->load("other"); - if ($num) - { - $i = 0; + if ($action == 'create') { + // $listofemails=$object->thirdparty_and_contact_email_array(); + if ($object->email) { + $actions = array(); - $userstatic = new user($db); + // Load array of available notifications + $notificationtrigger = new InterfaceNotification($db); + $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents(); - while ($i < $num) - { - $obj = $db->fetch_object($resql); + foreach ($listofnotifiedevents as $notifiedevent) { + $label = ($langs->trans("Notify_".$notifiedevent['code']) != "Notify_".$notifiedevent['code'] ? $langs->trans("Notify_".$notifiedevent['code']) : $notifiedevent['label']); + $actions[$notifiedevent['rowid']] = $label; + } + print '<tr class="oddeven nohover"><td>'; + print $object->getNomUrl(1); + if (isValidEmail($object->email)) { + print ' &lt;'.$object->email.'&gt;'; + } else { + $langs->load("errors"); + print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $object->email); + } + print '</td>'; + print '<td>'; + print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); + print '</td>'; + print '<td>'; + $type = array('email'=>$langs->trans("EMail")); + print $form->selectarray("typeid", $type); + print '</td>'; + print '<td class="nowraponall">'; + print '<input type="submit" class="button" value="'.$langs->trans("Add").'">'; + print '&nbsp;'; + print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</td>'; + print '</tr>'; + } else { + print '<tr class="oddeven"><td colspan="4">'; + print $langs->trans("YouMustAssignUserMailFirst"); + print '</td></tr>'; + } + } else { + if ($num) { + $i = 0; - $userstatic->id = $obj->userid; - $userstatic->lastname = $obj->lastname; - $userstatic->firstname = $obj->firstname; - print '<tr class="oddeven"><td>'.$userstatic->getNomUrl(1); - if ($obj->type == 'email') + $userstatic = new user($db); + + while ($i < $num) { + $obj = $db->fetch_object($resql); + + $userstatic->id = $obj->userid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + print '<tr class="oddeven"><td>'.$userstatic->getNomUrl(1); + if ($obj->type == 'email') { + if (isValidEmail($obj->email)) { + print ' &lt;'.$obj->email.'&gt;'; + } else { + $langs->load("errors"); + print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email); + } + } + print '</td>'; + print '<td>'; + $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); + print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + print '</td>'; + print '<td>'; + if ($obj->type == 'email') { + print $langs->trans("Email"); + } + if ($obj->type == 'sms') { + print $langs->trans("SMS"); + } + print '</td>'; + print '<td class="right"><a href="card.php?id='.$id.'&amp;action=delete&amp;token='.newToken().'&amp;actid='.$obj->rowid.'">'.img_delete().'</a></td>'; + print '</tr>'; + $i++; + } + $db->free($resql); + } + + // List of notifications enabled for fixed email + /* + foreach($conf->global as $key => $val) { + if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; + print '<tr class="oddeven"><td>'; + $listtmp=explode(',',$val); + $first=1; + foreach($listtmp as $keyemail => $valemail) { - if (isValidEmail($obj->email)) + if (! $first) print ', '; + $first=0; + $valemail=trim($valemail); + //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>'; + if (isValidEmail($valemail, 1)) { - print ' &lt;'.$obj->email.'&gt;'; - } else { - $langs->load("errors"); - print ' &nbsp; '.img_warning().' '.$langs->trans("ErrorBadEMail", $obj->email); + if ($valemail == '__SUPERVISOREMAIL__') print $valemail; + else print ' &lt;'.$valemail.'&gt;'; + } + else + { + print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); } } print '</td>'; print '<td>'; - $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]); + $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); + $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); + print $label; + if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) + { + print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); + } print '</td>'; print '<td>'; - if ($obj->type == 'email') print $langs->trans("Email"); - if ($obj->type == 'sms') print $langs->trans("SMS"); + print $langs->trans("Email"); print '</td>'; - print '<td class="right"><a href="card.php?id='.$id.'&amp;action=delete&amp;token='.newToken().'&amp;actid='.$obj->rowid.'">'.img_delete().'</a></td>'; + print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>'; print '</tr>'; - $i++; - } - $db->free($resql); + }*/ + /*if ($user->admin) + { + $var = ! $var; + print '<tr class="oddeven"><td colspan="4">'; + print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>'; + print '</td></tr>'; + }*/ } - // List of notifications enabled for fixed email - /* - foreach($conf->global as $key => $val) - { - if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; - $var = ! $var; - print '<tr class="oddeven"><td>'; - $listtmp=explode(',',$val); - $first=1; - foreach($listtmp as $keyemail => $valemail) - { - if (! $first) print ', '; - $first=0; - $valemail=trim($valemail); - //print $keyemail.' - '.$valemail.' - '.$reg[1].'<br>'; - if (isValidEmail($valemail, 1)) - { - if ($valemail == '__SUPERVISOREMAIL__') print $valemail; - else print ' &lt;'.$valemail.'&gt;'; - } - else - { - print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail); - } - } - print '</td>'; - print '<td>'; - $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]); - $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); - $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); - print $label; - if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) - { - print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); - } - print '</td>'; - print '<td>'; - print $langs->trans("Email"); - print '</td>'; - print '<td class="right">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</td>'; - print '</tr>'; - }*/ - /*if ($user->admin) - { - $var = ! $var; - print '<tr class="oddeven"><td colspan="4">'; - print '+ <a href="'.DOL_URL_ROOT.'/admin/notification.php">'.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).'</a>'; - print '</td></tr>'; - }*/ - print '</table>'; + print '</form>'; + print '<br><br>'."\n"; @@ -389,12 +410,10 @@ if ($result > 0) // Count total nb of records $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 (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -403,19 +422,24 @@ if ($result > 0) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); } else { dol_print_error($db); } $param = '&id='.$object->id; - 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='.$contextpage; + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.$limit; + } print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">'; - if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; + } print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; @@ -424,7 +448,7 @@ if ($result > 0) print '<input type="hidden" name="id" value="'.$object->id.'">'; // List of notifications done - print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit); // Line with titles print '<table width="100%" class="noborder">'; @@ -436,19 +460,16 @@ if ($result > 0) print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right '); print '</tr>'; - if ($num) - { + if ($num) { $i = 0; $userstatic = new User($db); - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); print '<tr class="oddeven"><td>'; - if ($obj->id > 0) - { + if ($obj->id > 0) { $userstatic->id = $obj->id; $userstatic->lastname = $obj->lastname; $userstatic->firstname = $obj->firstname; @@ -463,18 +484,22 @@ if ($result > 0) print $label; print '</td>'; print '<td>'; - if ($obj->type == 'email') print $langs->trans("Email"); - if ($obj->type == 'sms') print $langs->trans("Sms"); + if ($obj->type == 'email') { + print $langs->trans("Email"); + } + if ($obj->type == 'sms') { + print $langs->trans("Sms"); + } print '</td>'; // TODO Add link to object here for other types /*print '<td>'; - if ($obj->object_type == 'order') - { + if ($obj->object_type == 'order') + { $orderstatic->id=$obj->object_id; $orderstatic->ref=... print $orderstatic->getNomUrl(1); - } - print '</td>';*/ + } + print '</td>';*/ // print print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>'; print '</tr>'; @@ -488,7 +513,9 @@ if ($result > 0) print '</table>'; print '</form>'; -} else dol_print_error('', 'RecordNotFound'); +} else { + dol_print_error('', 'RecordNotFound'); +} // End of page llxFooter(); diff --git a/htdocs/user/notify/index.html b/htdocs/user/notify/index.html deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/user/notify/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 52f7a28be44..2856f787b52 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -38,8 +38,7 @@ $id = GETPOST('id', 'int'); $action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'userihm'; // To manage different context of search -if ($id) -{ +if ($id) { // $user est le user qui edite, $id est l'id de l'utilisateur edite $caneditfield = ((($user->id == $id) && $user->rights->user->self->creer) || (($user->id != $id) && $user->rights->user->user->creer)); @@ -47,11 +46,15 @@ if ($id) // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); -if ($user->id <> $id && !$canreaduser) accessforbidden(); +if ($user->id <> $id && !$canreaduser) { + accessforbidden(); +} $dirtop = "../core/menus/standard"; $dirleft = "../core/menus/standard"; @@ -81,11 +84,13 @@ $hookmanager->initHooks(array('usercard', 'userihm', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'update' && ($caneditfield || !empty($user->admin))) { - if (!$_POST["cancel"]) { + if (!GETPOST("cancel")) { $tabparam = array(); if (GETPOST("check_MAIN_LANDING_PAGE") == "on") { @@ -122,16 +127,20 @@ if (empty($reshook)) { if ($val == '') { $tabparam['THEME_ELDY_TOPMENU_BACK1'] = ''; } else { - $tabparam['THEME_ELDY_TOPMENU_BACK1'] = join(',', - colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1', 'alphanohtml'), array())); + $tabparam['THEME_ELDY_TOPMENU_BACK1'] = join( + ',', + colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1', 'alphanohtml'), array()) + ); } $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1', 'alphanohtml'), array())))); if ($val == '') { $tabparam['THEME_ELDY_BACKTITLE1'] = ''; } else { - $tabparam['THEME_ELDY_BACKTITLE1'] = join(',', - colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1', 'alphanohtml'), array())); + $tabparam['THEME_ELDY_BACKTITLE1'] = join( + ',', + colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1', 'alphanohtml'), array()) + ); } if (GETPOST('check_THEME_ELDY_USE_HOVER') == 'on') { @@ -174,21 +183,36 @@ llxHeader(); // List of possible landing pages $tmparray = array('index.php'=>'Dashboard'); -if (!empty($conf->societe->enabled)) $tmparray['societe/index.php?mainmenu=companies&leftmenu='] = 'ThirdPartiesArea'; -if (!empty($conf->projet->enabled)) $tmparray['projet/index.php?mainmenu=project&leftmenu='] = 'ProjectsArea'; -if (!empty($conf->holiday->enabled) || !empty($conf->expensereport->enabled)) $tmparray['hrm/index.php?mainmenu=hrm&leftmenu='] = 'HRMArea'; // TODO Complete list with first level of menus -if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) $tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea'; -if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->contrat->enabled)) $tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea'; -if (!empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled)) $tmparray['compta/index.php?mainmenu=compta&leftmenu='] = 'AccountancyTreasuryArea'; -if (!empty($conf->adherent->enabled)) $tmparray['adherents/index.php?mainmenu=members&leftmenu='] = 'MembersArea'; -if (!empty($conf->agenda->enabled)) $tmparray['comm/action/index.php?mainmenu=agenda&leftmenu='] = 'Agenda'; +if (!empty($conf->societe->enabled)) { + $tmparray['societe/index.php?mainmenu=companies&leftmenu='] = 'ThirdPartiesArea'; +} +if (!empty($conf->projet->enabled)) { + $tmparray['projet/index.php?mainmenu=project&leftmenu='] = 'ProjectsArea'; +} +if (!empty($conf->holiday->enabled) || !empty($conf->expensereport->enabled)) { + $tmparray['hrm/index.php?mainmenu=hrm&leftmenu='] = 'HRMArea'; // TODO Complete list with first level of menus +} +if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { + $tmparray['product/index.php?mainmenu=products&leftmenu='] = 'ProductsAndServicesArea'; +} +if (!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->contrat->enabled)) { + $tmparray['comm/index.php?mainmenu=commercial&leftmenu='] = 'CommercialArea'; +} +if (!empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled)) { + $tmparray['compta/index.php?mainmenu=compta&leftmenu='] = 'AccountancyTreasuryArea'; +} +if (!empty($conf->adherent->enabled)) { + $tmparray['adherents/index.php?mainmenu=members&leftmenu='] = 'MembersArea'; +} +if (!empty($conf->agenda->enabled)) { + $tmparray['comm/action/index.php?mainmenu=agenda&leftmenu='] = 'Agenda'; +} $head = user_prepare_head($object); $title = $langs->trans("User"); -if ($action == 'edit') -{ +if ($action == 'edit') { print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="update">'; @@ -196,8 +220,7 @@ if ($action == 'edit') } -if ($action == 'edit') -{ +if ($action == 'edit') { print dol_get_fiche_head($head, 'guisetup', $title, -1, 'user'); $linkback = ''; @@ -208,22 +231,20 @@ if ($action == 'edit') dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); - if (!empty($conf->use_javascript_ajax)) - {/* - print '<script type="text/javascript" language="javascript"> - jQuery(document).ready(function() { - $("#main_lang_default").change(function() { - $("#check_MAIN_LANG_DEFAULT").prop("checked", true); - }); - $("#main_size_liste_limit").keyup(function() { - if ($(this).val().length) $("#check_SIZE_LISTE_LIMIT").prop("checked", true); - else $("#check_SIZE_LISTE_LIMIT").prop("checked", false); - }); - }); - </script>';*/ + if (!empty($conf->use_javascript_ajax)) {/* + print '<script type="text/javascript" language="javascript"> + jQuery(document).ready(function() { + $("#main_lang_default").change(function() { + $("#check_MAIN_LANG_DEFAULT").prop("checked", true); + }); + $("#main_size_liste_limit").keyup(function() { + if ($(this).val().length) $("#check_SIZE_LISTE_LIMIT").prop("checked", true); + else $("#check_SIZE_LISTE_LIMIT").prop("checked", false); + }); + }); + </script>';*/ } - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print '<script type="text/javascript" language="javascript"> jQuery(document).ready(function() { function init_myfunc() @@ -357,10 +378,11 @@ if ($action == 'edit') print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").'</td>'; print '<td>'; - if (!empty($tmparray[$object->conf->MAIN_LANDING_PAGE])) - { + if (!empty($tmparray[$object->conf->MAIN_LANDING_PAGE])) { print $langs->trans($tmparray[$object->conf->MAIN_LANDING_PAGE]); - } else print $object->conf->MAIN_LANDING_PAGE; + } else { + print $object->conf->MAIN_LANDING_PAGE; + } //print $form->selectarray('MAIN_LANDING_PAGE', $tmparray, (! empty($object->conf->MAIN_LANDING_PAGE)?$object->conf->MAIN_LANDING_PAGE:''), 0, 0, 0, '', 1); print '</td></tr>'; @@ -371,7 +393,9 @@ if ($action == 'edit') print '<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(!empty($object->conf->AGENDA_DEFAULT_VIEW) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>'; print '<td>'."\n"; $tmplist = array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser")); - if (!empty($object->conf->AGENDA_DEFAULT_VIEW)) print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0, '', 0, 0, 1); + if (!empty($object->conf->AGENDA_DEFAULT_VIEW)) { + print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0, '', 0, 0, 1); + } print '</td></tr>'."\n"; // Max size for lists @@ -390,12 +414,10 @@ if ($action == 'edit') print '<div class="tabsAction">'; - if (empty($user->admin) && !empty($dolibarr_main_demo)) - { + if (empty($user->admin) && !empty($dolibarr_main_demo)) { print "<a class=\"butActionRefused classfortooltip\" title=\"".$langs->trans("FeatureDisabledInDemo")."\" href=\"#\">".$langs->trans("Modify")."</a>"; } else { - if ($caneditfield || !empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin - { + if ($caneditfield || !empty($user->admin)) { // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a>'; } else { print "<a class=\"butActionRefused classfortooltip\" title=\"".$langs->trans("NotEnoughPermissions")."\" href=\"#\">".$langs->trans("Modify")."</a>"; @@ -405,8 +427,7 @@ if ($action == 'edit') print '</div>'; } -if ($action == 'edit') -{ +if ($action == 'edit') { print '</form>'; } diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 15df6371891..cb149f1e481 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -29,35 +29,48 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -if (!empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; +if (!empty($conf->ldap->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; +} // Load translation files required by page $langs->loadLangs(array('errors', 'users', 'companies', 'ldap', 'other')); // Security check -if (!empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)) -{ +if (!empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)) { header("Location: ".DOL_URL_ROOT.'/'); exit; } $action = GETPOST('action', 'aZ09'); $mode = $dolibarr_main_authentication; -if (!$mode) $mode = 'http'; +if (!$mode) { + $mode = 'http'; +} $username = GETPOST('username', 'alphanohtml'); -$passwordhash = GETPOST('passwordhash', 'alpha'); +$passworduidhash = GETPOST('passworduidhash', 'alpha'); $conf->entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : 1); // Instantiate hooks of thirdparty module only if not already define $hookmanager->initHooks(array('passwordforgottenpage')); -if (GETPOST('dol_hide_leftmenu', 'alpha') || !empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu = 1; -if (GETPOST('dol_hide_topmenu', 'alpha') || !empty($_SESSION['dol_hide_topmenu'])) $conf->dol_hide_topmenu = 1; -if (GETPOST('dol_optimize_smallscreen', 'alpha') || !empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen = 1; -if (GETPOST('dol_no_mouse_hover', 'alpha') || !empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover = 1; -if (GETPOST('dol_use_jmobile', 'alpha') || !empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile = 1; +if (GETPOST('dol_hide_leftmenu', 'alpha') || !empty($_SESSION['dol_hide_leftmenu'])) { + $conf->dol_hide_leftmenu = 1; +} +if (GETPOST('dol_hide_topmenu', 'alpha') || !empty($_SESSION['dol_hide_topmenu'])) { + $conf->dol_hide_topmenu = 1; +} +if (GETPOST('dol_optimize_smallscreen', 'alpha') || !empty($_SESSION['dol_optimize_smallscreen'])) { + $conf->dol_optimize_smallscreen = 1; +} +if (GETPOST('dol_no_mouse_hover', 'alpha') || !empty($_SESSION['dol_no_mouse_hover'])) { + $conf->dol_no_mouse_hover = 1; +} +if (GETPOST('dol_use_jmobile', 'alpha') || !empty($_SESSION['dol_use_jmobile'])) { + $conf->dol_use_jmobile = 1; +} /** @@ -67,96 +80,90 @@ if (GETPOST('dol_use_jmobile', 'alpha') || !empty($_SESSION['dol_use_jmobile'])) $parameters = array('username' => $username); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { - $message = $hookmanager->error; + $message = $hookmanager->error; } if (empty($reshook)) { - // Validate new password - if ($action == 'validatenewpassword' && $username && $passwordhash) - { - $edituser = new User($db); - $result = $edituser->fetch('', $_GET["username"]); - if ($result < 0) - { - $message = '<div class="error">'.dol_escape_htmltag($langs->trans("ErrorLoginDoesNotExists", $username)).'</div>'; - } else { - if (dol_verifyHash($edituser->pass_temp, $passwordhash)) - { - // Clear session - unset($_SESSION['dol_login']); - $_SESSION['dol_loginmesg'] = $langs->trans('NewPasswordValidated'); // Save message for the session page + // Validate new password + if ($action == 'validatenewpassword' && $username && $passworduidhash) { + $edituser = new User($db); + $result = $edituser->fetch('', $_GET["username"]); + if ($result < 0) { + $message = '<div class="error">'.dol_escape_htmltag($langs->trans("ErrorLoginDoesNotExists", $username)).'</div>'; + } else { + global $dolibarr_main_instance_unique_id; - $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); - dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); - header("Location: ".DOL_URL_ROOT.'/'); - exit; - } else { - $langs->load("errors"); - $message = '<div class="error">'.$langs->trans("ErrorFailedToValidatePasswordReset").'</div>'; - } - } - } - // Action modif mot de passe - if ($action == 'buildnewpassword' && $username) - { - $sessionkey = 'dol_antispam_value'; - $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code']))); + //print $edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id.' '.$passworduidhash; + if (dol_verifyHash($edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id, $passworduidhash)) { + // Clear session + unset($_SESSION['dol_login']); + $_SESSION['dol_loginmesg'] = $langs->trans('NewPasswordValidated'); // Save message for the session page - // Verify code - if (!$ok) - { - $message = '<div class="error">'.$langs->trans("ErrorBadValueForCode").'</div>'; - } else { - $isanemail = preg_match('/@/', $username); + $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); + dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); - $edituser = new User($db); - $result = $edituser->fetch('', $username, '', 1); - if ($result == 0 && $isanemail) - { - $result = $edituser->fetch('', '', '', 1, -1, $username); - } + header("Location: ".DOL_URL_ROOT.'/'); + exit; + } else { + $langs->load("errors"); + $message = '<div class="error">'.$langs->trans("ErrorFailedToValidatePasswordReset").'</div>'; + } + } + } + // Action modif mot de passe + if ($action == 'buildnewpassword' && $username) { + $sessionkey = 'dol_antispam_value'; + $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower($_POST['code']))); - if ($result <= 0 && $edituser->error == 'USERNOTFOUND') - { - $message = '<div class="warning paddingtopbottom'.(empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent').'">'; - if (!$isanemail) { - $message .= $langs->trans("IfLoginExistPasswordRequestSent"); - } else { - $message .= $langs->trans("IfEmailExistPasswordRequestSent"); - } - $message .= '</div>'; - $username = ''; - } else { - if (!$edituser->email) - { - $message = '<div class="error">'.$langs->trans("ErrorLoginHasNoEmail").'</div>'; - } else { - $newpassword = $edituser->setPassword($user, '', 1); - if ($newpassword < 0) - { - // Failed - $message = '<div class="error">'.$langs->trans("ErrorFailedToChangePassword").'</div>'; - } else { - // Success - if ($edituser->send_password($user, $newpassword, 1) > 0) - { - $message = '<div class="warning paddingtopbottom'.(empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent').'">'; - if (!$isanemail) { - $message .= $langs->trans("IfLoginExistPasswordRequestSent"); - } else { - $message .= $langs->trans("IfEmailExistPasswordRequestSent"); - } - //$message .= $langs->trans("PasswordChangeRequestSent", $edituser->login, dolObfuscateEmail($edituser->email)); - $message .= '</div>'; - $username = ''; - } else { - $message .= '<div class="error">'.$edituser->error.'</div>'; - } - } - } - } - } - } + // Verify code + if (!$ok) { + $message = '<div class="error">'.$langs->trans("ErrorBadValueForCode").'</div>'; + } else { + $isanemail = preg_match('/@/', $username); + + $edituser = new User($db); + $result = $edituser->fetch('', $username, '', 1); + if ($result == 0 && $isanemail) { + $result = $edituser->fetch('', '', '', 1, -1, $username); + } + + if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { + $message = '<div class="warning paddingtopbottom'.(empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent').'">'; + if (!$isanemail) { + $message .= $langs->trans("IfLoginExistPasswordRequestSent"); + } else { + $message .= $langs->trans("IfEmailExistPasswordRequestSent"); + } + $message .= '</div>'; + $username = ''; + } else { + if (!$edituser->email) { + $message = '<div class="error">'.$langs->trans("ErrorLoginHasNoEmail").'</div>'; + } else { + $newpassword = $edituser->setPassword($user, '', 1); + if ($newpassword < 0) { + // Failed + $message = '<div class="error">'.$langs->trans("ErrorFailedToChangePassword").'</div>'; + } else { + // Success + if ($edituser->send_password($user, $newpassword, 1) > 0) { + $message = '<div class="warning paddingtopbottom'.(empty($conf->global->MAIN_LOGIN_BACKGROUND) ? '' : ' backgroundsemitransparent').'">'; + if (!$isanemail) { + $message .= $langs->trans("IfLoginExistPasswordRequestSent"); + } else { + $message .= $langs->trans("IfEmailExistPasswordRequestSent"); + } + //$message .= $langs->trans("PasswordChangeRequestSent", $edituser->login, dolObfuscateEmail($edituser->email)); + $message .= '</div>'; + $username = ''; + } else { + $message .= '<div class="error">'.$edituser->error.'</div>'; + } + } + } + } + } + } } @@ -168,46 +175,49 @@ $dol_url_root = DOL_URL_ROOT; // Title $title = 'Dolibarr '.DOL_VERSION; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = $conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { + $title = $conf->global->MAIN_APPLICATION_TITLE; +} // Select templates -if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/passwordforgotten.tpl.php")) -{ +if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/passwordforgotten.tpl.php")) { $template_dir = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/"; } else { $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; } -if (!$username) $focus_element = 'username'; -else $focus_element = 'password'; +if (!$username) { + $focus_element = 'username'; +} else { + $focus_element = 'password'; +} // Send password button enabled ? $disabled = 'disabled'; -if (preg_match('/dolibarr/i', $mode)) $disabled = ''; -if (!empty($conf->global->MAIN_SECURITY_ENABLE_SENDPASSWORD)) $disabled = ''; // To force button enabled +if (preg_match('/dolibarr/i', $mode)) { + $disabled = ''; +} +if (!empty($conf->global->MAIN_SECURITY_ENABLE_SENDPASSWORD)) { + $disabled = ''; // To force button enabled +} // Show logo (search in order: small company logo, large company logo, theme logo, common logo) $width = 0; $rowspan = 2; $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)) -{ +if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_small); -} elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) -{ +} elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/'.$mysoc->logo); $width = 128; -} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg')) -{ +} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg')) { $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'; -} 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'; } // Security graphical code -if (function_exists("imagecreatefrompng") && !$disabled) -{ +if (function_exists("imagecreatefrompng") && !$disabled) { $captcha = 1; $captcha_refresh = img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"'); } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 68238b63c29..e80cb6c8462 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -26,7 +26,9 @@ * \brief Page to set permission of a user record */ -if (!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET +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/lib/usergroups.lib.php'; @@ -43,15 +45,16 @@ $module = GETPOST('module', 'alpha'); $rights = GETPOST('rights', 'int'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'userperms'; // To manage different context of search -if (!isset($id) || empty($id)) accessforbidden(); +if (!isset($id) || empty($id)) { + accessforbidden(); +} // Define if user can read permissions $canreaduser = ($user->admin || $user->rights->user->user->lire); // Define if user can modify other users and permissions $caneditperms = ($user->admin || $user->rights->user->user->creer); // Advanced permissions -if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) -{ +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $canreaduser = ($user->admin || ($user->rights->user->user->lire && $user->rights->user->user_advance->readperms)); $caneditselfperms = ($user->id == $id && $user->rights->user->self_advance->writeperms); $caneditperms = (($caneditperms || $caneditselfperms) ? 1 : 0); @@ -59,16 +62,19 @@ if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) // Security check $socid = 0; -if (isset($user->socid) && $user->socid > 0) $socid = $user->socid; +if (isset($user->socid) && $user->socid > 0) { + $socid = $user->socid; +} $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user'); // A user can always read its own card if not advanced perms enabled, or if he has advanced perms, except for admin -if ($user->id == $id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->user->self_advance->readperms) && empty($user->admin))) -{ +if ($user->id == $id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->user->self_advance->readperms) && empty($user->admin))) { accessforbidden(); } $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); -if ($user->id <> $id && !$canreaduser) accessforbidden(); +if ($user->id <> $id && !$canreaduser) { + accessforbidden(); +} $object = new User($db); $object->fetch($id, '', '', 1); @@ -86,19 +92,20 @@ $hookmanager->initHooks(array('usercard', 'userperms', 'globalcard')); $parameters = array('id'=>$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if ($action == 'addrights' && $caneditperms && $confirm == 'yes') { $edituser = new User($db); $edituser->fetch($object->id); $result = $edituser->addrights($rights, $module, '', $entity); - if ($result < 0) - { + if ($result < 0) { setEventMessages($edituser->error, $edituser->errors, 'errors'); } - // If we are changing our own permissions, we reload + // If we are changing our own permissions, we reload permissions and menu if ($object->id == $user->id) { $user->clearrights(); $user->getrights(); @@ -113,12 +120,11 @@ if (empty($reshook)) { $edituser = new User($db); $edituser->fetch($object->id); $result = $edituser->delrights($rights, $module, '', $entity); - if ($result < 0) - { + if ($result < 0) { setEventMessages($edituser->error, $edituser->errors, 'errors'); } - // If we are changing our own permissions, we reload + // If we are changing our own permissions, we reload permissions and menu if ($object->id == $user->id) { $user->clearrights(); $user->getrights(); @@ -151,33 +157,25 @@ $db->begin(); $modules = array(); $modulesdir = dolGetModulesDirs(); -foreach ($modulesdir as $dir) -{ +foreach ($modulesdir as $dir) { $handle = @opendir(dol_osencode($dir)); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') - { + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') { $modName = substr($file, 0, dol_strlen($file) - 10); - if ($modName) - { + if ($modName) { include_once $dir.$file; $objMod = new $modName($db); // Load all lang files of module - if (isset($objMod->langfiles) && is_array($objMod->langfiles)) - { - foreach ($objMod->langfiles as $domain) - { + if (isset($objMod->langfiles) && is_array($objMod->langfiles)) { + foreach ($objMod->langfiles as $domain) { $langs->load($domain); } } // Load all permissions - if ($objMod->rights_class) - { + if ($objMod->rights_class) { $ret = $objMod->insert_permissions(0, $entity); $modules[$objMod->rights_class] = $objMod; //print "modules[".$objMod->rights_class."]=$objMod;"; @@ -196,16 +194,14 @@ $permsuser = array(); $sql = "SELECT DISTINCT ur.fk_id"; $sql .= " FROM ".MAIN_DB_PREFIX."user_rights as ur"; $sql .= " WHERE ur.entity = ".$entity; -$sql .= " AND ur.fk_user = ".$object->id; +$sql .= " AND ur.fk_user = ".((int) $object->id); dol_syslog("get user perms", LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); array_push($permsuser, $obj->fk_id); $i++; @@ -227,15 +223,14 @@ $sql .= " AND gu.fk_user = ".$object->id; dol_syslog("get user perms", LOG_DEBUG); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); - if (!isset($permsgroupbyentity[$obj->entity])) + if (!isset($permsgroupbyentity[$obj->entity])) { $permsgroupbyentity[$obj->entity] = array(); + } array_push($permsgroupbyentity[$obj->entity], $obj->fk_id); $i++; } @@ -260,13 +255,19 @@ dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $use print '<div class="underbanner clearboth"></div>'; -if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); +if ($user->admin) { + print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); +} // Show warning about external users -if (empty($user->socid)) print info_admin(showModulesExludedForExternal($modules))."\n"; +if (empty($user->socid)) { + print info_admin(showModulesExludedForExternal($modules))."\n"; +} $parameters = array('permsgroupbyentity'=>$permsgroupbyentity); $reshook = $hookmanager->executeHooks('insertExtraHeader', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} print "\n"; @@ -275,10 +276,8 @@ print '<table class="noborder centpercent">'; print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Module").'</td>'; -if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) -{ - if ($caneditperms) - { +if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { + if ($caneditperms) { print '<td class="center nowrap">'; print '<a class="reposition commonlink" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module=allmodules&amp;confirm=yes&amp;token='.newToken().'">'.$langs->trans("All")."</a>"; print ' / '; @@ -288,7 +287,9 @@ if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->ad print '<td class="center" width="24">&nbsp;</td>'; } print '<td>'.$langs->trans("Permissions").'</td>'; -if ($user->admin) print '<td class="right">'.$langs->trans("ID").'</td>'; +if ($user->admin) { + print '<td class="right"></td>'; +} print '</tr>'."\n"; //print "xx".$conf->global->MAIN_USE_ADVANCED_PERMS; @@ -296,32 +297,29 @@ $sql = "SELECT r.id, r.libelle as label, r.module, r.perms, r.subperms, r.module $sql .= " FROM ".MAIN_DB_PREFIX."rights_def as r"; $sql .= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" $sql .= " AND r.entity = ".$entity; -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled +} $sql .= " ORDER BY r.family_position, r.module_position, r.module, r.id"; $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); $i = 0; $oldmod = ''; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($result); // If line is for a module that doe snot existe anymore (absent of includes/module), we ignore it - if (empty($modules[$obj->module])) - { + if (empty($modules[$obj->module])) { $i++; continue; } // Save field module_position in database if value is still zero - if (empty($obj->module_position)) - { - if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0)) - { + if (empty($obj->module_position)) { + if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0)) { // TODO Define familyposition $family = $modules[$obj->module]->family_position; $familyposition = 0; @@ -332,8 +330,7 @@ if ($result) } } - if (isset($obj->module) && ($oldmod <> $obj->module)) - { + if (isset($obj->module) && ($oldmod <> $obj->module)) { $oldmod = $obj->module; // Break detected, we get objMod @@ -346,10 +343,8 @@ if ($result) print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName(); print '<a name="'.$objMod->getName().'"></a>'; print '</td>'; - if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) - { - if ($caneditperms) - { + if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->admin)) { + if ($caneditperms) { print '<td class="center nowrap">'; print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'&amp;confirm=yes&amp;token='.newToken().'">'.$langs->trans("All")."</a>"; print ' / '; @@ -358,8 +353,7 @@ if ($result) } print '<td>&nbsp;</td>'; } else { - if ($caneditperms) - { + if ($caneditperms) { print '<td>&nbsp;</td>'; } print '<td>&nbsp;</td>'; @@ -367,7 +361,9 @@ if ($result) print '<td>&nbsp;</td>'; // Permission id - if ($user->admin) print '<td class="right"></td>'; + if ($user->admin) { + print '<td class="right"></td>'; + } print '</tr>'."\n"; } @@ -381,19 +377,15 @@ if ($result) print '</td>'; // Permission and tick - if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) // Permission granted because admin - { - if ($caneditperms) - { + if (!empty($object->admin) && !empty($objMod->rights_admin_allowed)) { // Permission granted because admin + if ($caneditperms) { print '<td class="center">'.img_picto($langs->trans("Administrator"), 'star').'</td>'; } print '<td class="center nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; - } elseif (in_array($obj->id, $permsuser)) // Permission granted by user - { - if ($caneditperms) - { + } elseif (in_array($obj->id, $permsuser)) { // Permission granted by user + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'&amp;confirm=yes&amp;token='.newToken().'">'; //print img_edit_remove($langs->trans("Remove")); print img_picto($langs->trans("Remove"), 'switch_on'); @@ -402,12 +394,9 @@ if ($result) print '<td class="center nowrap">'; print img_picto($langs->trans("Active"), 'tick'); print '</td>'; - } elseif (is_array($permsgroupbyentity[$entity])) - { - if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission granted by group - { - if ($caneditperms) - { + } elseif (is_array($permsgroupbyentity[$entity])) { + if (in_array($obj->id, $permsgroupbyentity[$entity])) { // Permission granted by group + if ($caneditperms) { print '<td class="center">'; print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup")); print '</td>'; @@ -417,25 +406,23 @@ if ($result) print '</td>'; } else { // Do not own permission - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'&amp;confirm=yes&amp;token='.newToken().'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print '</a></td>'; } - print '<td>&nbsp</td>'; + print '<td>&nbsp;</td>'; } } else { // Do not own permission - if ($caneditperms) - { + if ($caneditperms) { print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'&amp;confirm=yes&amp;token='.newToken().'">'; //print img_edit_add($langs->trans("Add")); print img_picto($langs->trans("Add"), 'switch_off'); print '</a></td>'; } - print '<td>&nbsp</td>'; + print '<td>&nbsp;</td>'; } // Label of permission @@ -450,19 +437,30 @@ if ($result) print '</td>'; // Permission id - if ($user->admin) print '<td class="right"><span class="opacitymedium">'.$obj->id.'</span></td>'; + if ($user->admin) { + print '<td class="right">'; + $htmltext = $langs->trans("ID").': '.$obj->id; + $htmltext .= '<br>'.$langs->trans("Permission").': user->rights->'.$obj->module.'->'.$obj->perms.($obj->subperms ? '->'.$obj->subperms : ''); + print $form->textwithpicto('', $htmltext); + //print '<span class="opacitymedium">'.$obj->id.'</span>'; + print '</td>'; + } print '</tr>'."\n"; $i++; } -} else dol_print_error($db); +} else { + dol_print_error($db); +} print '</table>'; print '</div>'; $parameters = array(); $reshook = $hookmanager->executeHooks('insertExtraFooter', $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} print dol_get_fiche_end(); diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index 6cdcd04417f..57778c44259 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -36,14 +36,15 @@ $id = GETPOST('id', 'int'); // Security check $socid = 0; -if ($user->socid > 0) $socid = $user->socid; +if ($user->socid > 0) { + $socid = $user->socid; +} $feature2 = 'user'; $result = restrictedArea($user, 'user', $id, 'user', $feature2); $result = $user2->fetch($id); -if ($result <= 0) -{ +if ($result <= 0) { dol_print_error($user2->error); exit; } @@ -51,8 +52,7 @@ if ($result <= 0) $physicalperson = 1; $company = new Societe($db); -if ($user2->socid) -{ +if ($user2->socid) { $result = $company->fetch($user2->socid); } @@ -79,33 +79,32 @@ $v->setNote($user2->note); $v->setTitle($user2->poste); // Data from linked company -if ($company->id) -{ +if ($company->id) { $v->setURL($company->url, "TYPE=WORK"); - if (!$user2->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); - if (!$user2->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); - if (!$user2->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); + if (!$user2->phone_pro) { + $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); + } + if (!$user2->fax) { + $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); + } + if (!$user2->zip) { + $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); + } // when company e-mail is empty, use only user e-mail - if (empty(trim($company->email))) - { + if (empty(trim($company->email))) { // was set before, don't set twice - } - // when user e-mail is empty, use only company e-mail - elseif (empty(trim($user2->email))) - { + } elseif (empty(trim($user2->email))) { + // when user e-mail is empty, use only company e-mail $v->setEmail($company->email); - } - // when e-mail domain of user and company are the same, use user e-mail at first (and company e-mail at second) - elseif (strtolower(end(explode("@", $user2->email))) == strtolower(end(explode("@", $company->email)))) - { + } elseif (strtolower(end(explode("@", $user2->email))) == strtolower(end(explode("@", $company->email)))) { + // when e-mail domain of user and company are the same, use user e-mail at first (and company e-mail at second) $v->setEmail($user2->email); // support by Microsoft Outlook (2019 and possible earlier) $v->setEmail($company->email, 'INTERNET'); - } - // when e-mail of user and company complete different use company e-mail at first (and user e-mail at second) - else { + } else { + // when e-mail of user and company complete different use company e-mail at first (and user e-mail at second) $v->setEmail($company->email); // support by Microsoft Outlook (2019 and possible earlier) @@ -113,12 +112,16 @@ if ($company->id) } // Si user lie a un tiers non de type "particulier" - if ($user2->typent_code != 'TE_PRIVATE') $v->setOrg($company->name); + if ($user2->typent_code != 'TE_PRIVATE') { + $v->setOrg($company->name); + } } // Personal informations $v->setPhoneNumber($user2->phone_perso, "TYPE=HOME;VOICE"); -if ($user2->birth) $v->setBirthday($user2->birth); +if ($user2->birth) { + $v->setBirthday($user2->birth); +} $db->close(); diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php index 64209076916..ade64ea6a7b 100644 --- a/htdocs/variants/admin/admin.php +++ b/htdocs/variants/admin/admin.php @@ -25,8 +25,9 @@ $langs->loadLangs(array("admin", "products")); $action = GETPOST('action', 'alphanohtml'); // Security check -if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) +if (!$user->admin || empty($conf->variants->enabled)) { accessforbidden(); +} $error = 0; diff --git a/htdocs/variants/admin/index.html b/htdocs/variants/admin/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/variants/ajax/getCombinations.php b/htdocs/variants/ajax/getCombinations.php index 67c1dd4284c..9c670fa07cc 100644 --- a/htdocs/variants/ajax/getCombinations.php +++ b/htdocs/variants/ajax/getCombinations.php @@ -16,17 +16,44 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -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('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; -header('Content-Type: application/json'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + + +/* + * View + */ + +top_httphead('application/json'); $id = GETPOST('id', 'int'); diff --git a/htdocs/variants/ajax/get_attribute_values.php b/htdocs/variants/ajax/get_attribute_values.php index e80cb9aae2b..1d4eab49773 100644 --- a/htdocs/variants/ajax/get_attribute_values.php +++ b/htdocs/variants/ajax/get_attribute_values.php @@ -15,18 +15,45 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -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('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php'; -header('Content-Type: application/json'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + + +/* + * View + */ + +top_httphead('application/json'); $id = GETPOST('id', 'int'); diff --git a/htdocs/variants/ajax/index.html b/htdocs/variants/ajax/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/variants/ajax/orderAttribute.php b/htdocs/variants/ajax/orderAttribute.php index 8b851c9be6b..81632dc0164 100644 --- a/htdocs/variants/ajax/orderAttribute.php +++ b/htdocs/variants/ajax/orderAttribute.php @@ -16,15 +16,39 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disable token renewal -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('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disable token renewal +} +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'); +} require '../../main.inc.php'; +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * View @@ -34,7 +58,7 @@ top_httphead(); // Registering the location of boxes if (GETPOSTISSET('roworder')) { - $roworder = GETPOST('roworder', 'alpha', 2); + $roworder = GETPOST('roworder', 'intcomma', 2); dol_syslog("AjaxOrderAttribute roworder=".$roworder, LOG_DEBUG); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 986db1b14bc..ed70c6325e3 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -36,12 +36,26 @@ if ($object->fetch($id) < 1) { exit(); } +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions */ -if ($cancel) $action = ''; +if ($cancel) { + $action = ''; +} if ($action) { if ($action == 'update') { @@ -60,19 +74,16 @@ if ($action) { $objectval->ref = $ref; $objectval->value = GETPOST('value', 'alpha'); - if (empty($objectval->ref)) - { + if (empty($objectval->ref)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Ref")), null, 'errors'); } - if (empty($objectval->value)) - { + if (empty($objectval->value)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); } - if (!$error) - { + if (!$error) { if ($objectval->update($user) > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } else { @@ -102,8 +113,7 @@ if ($confirm == 'yes') { header('Location: '.dol_buildpath('/variants/list.php', 2)); } exit(); - } elseif ($action == 'confirm_deletevalue') - { + } elseif ($action == 'confirm_deletevalue') { if ($objectval->fetch($valueid) > 0) { if ($objectval->delete($user) < 1) { setEventMessages($langs->trans('CoreErrorMessage'), $objectval->errors, 'errors'); @@ -124,9 +134,11 @@ if ($confirm == 'yes') { $langs->load('products'); +$help_url = 'EN:Module_Products#Variants'; + $title = $langs->trans('ProductAttributeName', dol_htmlentities($object->label)); -llxHeader('', $title); +llxHeader('', $title, $help_url); //print load_fiche_titre($title); diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php index bbc3a188137..1e7f44bb936 100644 --- a/htdocs/variants/class/ProductAttribute.class.php +++ b/htdocs/variants/class/ProductAttribute.class.php @@ -85,7 +85,7 @@ class ProductAttribute extends CommonObject return -1; } - $sql = "SELECT rowid, ref, ref_ext, label, rang FROM ".MAIN_DB_PREFIX."product_attribute WHERE rowid = ".(int) $id." AND entity IN (".getEntity('product').")"; + $sql = "SELECT rowid, ref, ref_ext, label, rang FROM ".MAIN_DB_PREFIX."product_attribute WHERE rowid = ".((int) $id)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -116,8 +116,7 @@ class ProductAttribute extends CommonObject $sql = 'SELECT rowid, ref, ref_ext, label, rang FROM '.MAIN_DB_PREFIX."product_attribute WHERE entity IN (".getEntity('product').')'; $sql .= $this->db->order('rang', 'asc'); $query = $this->db->query($sql); - if ($query) - { + if ($query) { while ($result = $this->db->fetch_object($query)) { $tmp = new ProductAttribute($this->db); $tmp->id = $result->rowid; @@ -128,8 +127,9 @@ class ProductAttribute extends CommonObject $return[] = $tmp; } + } else { + dol_print_error($this->db); } - else dol_print_error($this->db); return $return; } @@ -159,8 +159,7 @@ class ProductAttribute extends CommonObject VALUES ('".$this->db->escape($this->ref)."', '".$this->db->escape($this->ref_ext)."', '".$this->db->escape($this->label)."', ".(int) $this->entity.", ".(int) $this->rang.")"; $query = $this->db->query($sql); - if ($query) - { + if ($query) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'product_attribute'); return $this->id; @@ -250,7 +249,7 @@ class ProductAttribute extends CommonObject public function countChildProducts() { $sql = "SELECT COUNT(*) count FROM ".MAIN_DB_PREFIX."product_attribute_combination2val pac2v - LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination pac ON pac2v.fk_prod_combination = pac.rowid WHERE pac2v.fk_prod_attr = ".(int) $this->id." AND pac.entity IN (".getEntity('product').")"; + LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination pac ON pac2v.fk_prod_combination = pac.rowid WHERE pac2v.fk_prod_attr = ".((int) $this->id)." AND pac.entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -320,7 +319,7 @@ class ProductAttribute extends CommonObject $newrang = $this->rang + 1; } - $sql = 'UPDATE '.MAIN_DB_PREFIX.'product_attribute SET rang = '.$this->rang.' WHERE rang = '.$newrang; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'product_attribute SET rang = '.((int) $this->rang).' WHERE rang = '.((int) $newrang); if (!$this->db->query($sql)) { $this->db->rollback(); diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index 9152336bbe4..d16ae4e2134 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -106,7 +106,7 @@ class ProductCombination { global $conf; - $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight, variation_ref_ext FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE rowid = ".(int) $rowid." AND entity IN (".getEntity('product').")"; + $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight, variation_ref_ext FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE rowid = ".((int) $rowid)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -174,8 +174,7 @@ class ProductCombination */ if ($fk_price_level > 0) { $combination_price_levels[$fk_price_level] = ProductCombinationLevel::createFromParent($this->db, $this, $fk_price_level); - } - else { + } else { for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $combination_price_levels[$i] = ProductCombinationLevel::createFromParent($this->db, $this, $i); } @@ -227,8 +226,7 @@ class ProductCombination if ($error) { return $error * -1; - } - else { + } else { return 1; } } @@ -283,7 +281,7 @@ class ProductCombination { global $conf; - $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".(int) $fk_product_parent." AND entity IN (".getEntity('product').")"; + $sql = "SELECT rowid, fk_product_parent, fk_product_child, variation_price, variation_price_percentage, variation_weight FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".((int) $fk_product_parent)." AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -322,12 +320,14 @@ class ProductCombination public function countNbOfCombinationForFkProductParent($fk_product_parent) { $nb = 0; - $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".(int) $fk_product_parent." AND entity IN (".getEntity('product').")"; + $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination WHERE fk_product_parent = ".((int) $fk_product_parent)." AND entity IN (".getEntity('product').")"; $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj) $nb = $obj->nb; + if ($obj) { + $nb = $obj->nb; + } } return $nb; @@ -470,11 +470,12 @@ class ProductCombination } /** - * Updates the weight of the child product. The price must be updated using Product::updatePrices + * Updates the weight of the child product. The price must be updated using Product::updatePrices. + * This method is called by the update() of a product. * - * @param Product $parent Parent product + * @param Product $parent Parent product * @param User $user Object user - * @return int >0 OK <0 KO + * @return int >0 if OK, <0 if KO */ public function updateProperties(Product $parent, User $user) { @@ -487,6 +488,8 @@ class ProductCombination $child->price_autogen = $parent->price_autogen; $child->weight = $parent->weight; + $child->status = $parent->status; + if ($this->variation_weight) { // If we must add a delta on weight $child->weight = ($child->weight ? $child->weight : 0) + $this->variation_weight; } @@ -506,8 +509,7 @@ class ProductCombination // MultiPrix if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { if ($parent->multiprices[$i] != '' || isset($this->combination_price_levels[$i]->variation_price)) { $new_type = $parent->multiprices_base_type[$i]; $new_min_price = $parent->multiprices_min[$i]; @@ -709,8 +711,7 @@ class ProductCombination //Final price impact if (!is_array($forced_pricevar)) { $price_impact[1] = (float) $forced_pricevar; // If false, return 0 - } - else { + } else { $price_impact = $forced_pricevar; } @@ -765,8 +766,7 @@ class ProductCombination // Manage Price levels if ($conf->global->PRODUIT_MULTIPRICES) { - for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $price_impact[$i] += (float) price2num($variations[$currcombattr][$currcombval]['price']); } } @@ -826,8 +826,7 @@ class ProductCombination $newproduct->barcode = -1; $result = $newproduct->create($user); - if ($result < 0) - { + if ($result < 0) { //In case the error is not related with an already existing product if ($newproduct->error != 'ErrorProductAlreadyExists') { $this->error[] = $newproduct->error; @@ -867,8 +866,7 @@ class ProductCombination } } else { $result = $newproduct->update($newproduct->id, $user); - if ($result < 0) - { + if ($result < 0) { $this->db->rollback(); return -1; } @@ -876,8 +874,7 @@ class ProductCombination $newcomb->fk_product_child = $newproduct->id; - if ($newcomb->update($user) < 0) - { + if ($newcomb->update($user) < 0) { $this->error = $newcomb->error; $this->errors = $newcomb->errors; $this->db->rollback(); @@ -925,8 +922,7 @@ class ProductCombination $combination->variation_price_percentage, $combination->variation_price, $combination->variation_weight - ) < 0) - { + ) < 0) { return -1; } } @@ -954,12 +950,10 @@ class ProductCombination $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($obj->label) - { + if ($obj->label) { $label .= ' '.$obj->label; } $i++; diff --git a/htdocs/variants/class/index.html b/htdocs/variants/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 933d379e48a..ded3a1bb8b9 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -58,13 +58,24 @@ $prodattr = new ProductAttribute($db); $prodattr_val = new ProductAttributeValue($db); $object = new Product($db); -if ($id > 0 || $ref) -{ +if ($id > 0 || $ref) { $object->fetch($id, $ref); } $selectedvariant = $_SESSION['addvariant_'.$object->id]; +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions @@ -80,16 +91,13 @@ if (!$object->isProduct() && !$object->isService()) { header('Location: '.dol_buildpath('/product/card.php?id='.$object->id, 2)); exit(); } -if ($action == 'add') -{ +if ($action == 'add') { unset($selectedvariant); unset($_SESSION['addvariant_'.$object->id]); } -if ($action == 'create' && GETPOST('selectvariant', 'alpha')) // We click on select combination -{ +if ($action == 'create' && GETPOST('selectvariant', 'alpha')) { // We click on select combination $action = 'add'; - if (GETPOST('attribute') != '-1' && GETPOST('value') != '-1') - { + if (GETPOST('attribute') != '-1' && GETPOST('value') != '-1') { $selectedvariant[GETPOST('attribute').':'.GETPOST('value')] = GETPOST('attribute').':'.GETPOST('value'); $_SESSION['addvariant_'.$object->id] = $selectedvariant; } @@ -101,8 +109,7 @@ $prodcomb2val = new ProductCombination2ValuePair($db); $productCombination2ValuePairs1 = array(); -if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST('selectvariant', 'alpha')) // We click on Create all defined combinations -{ +if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST('selectvariant', 'alpha')) { // We click on Create all defined combinations //$features = GETPOST('features', 'array'); $features = $_SESSION['addvariant_'.$object->id]; @@ -121,8 +128,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( // for conf PRODUIT_MULTIPRICES if ($conf->global->PRODUIT_MULTIPRICES) { $level_price_impact = array_map('price2num', $level_price_impact); - } - else { + } else { $level_price_impact = array(1 => $price_impact); $level_price_impact_percent = array(1 => $price_impact_percent); } @@ -156,11 +162,9 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( // sanit_feature is an array with 1 (and only 1) value per attribute. // For example: Color->blue, Size->Small, Option->2 //var_dump($sanit_features); - if (!$prodcomb->fetchByProductCombination2ValuePairs($id, $sanit_features)) - { + if (!$prodcomb->fetchByProductCombination2ValuePairs($id, $sanit_features)) { $result = $prodcomb->createProductCombination($user, $object, $sanit_features, array(), $level_price_impact_percent, $level_price_impact, $weight_impact, $reference); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); unset($_SESSION['addvariant_'.$object->id]); @@ -243,8 +247,7 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $prodcomb->variation_price = $level_price_impact[1]; $prodcomb->variation_price_percentage = (bool) $level_price_impact_percent[1]; - } - else { + } else { $level_price_impact = array(1 => $price_impact); $level_price_impact_percent = array(1 => $price_impact_percent); @@ -330,12 +333,13 @@ if ($action === 'confirm_deletecombination') { $form = new Form($db); -if (!empty($id) || !empty($ref)) -{ +if (!empty($id) || !empty($ref)) { llxHeader("", "", $langs->trans("CardProduct".$object->type)); $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; + 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); @@ -357,17 +361,25 @@ if (!empty($id) || !empty($ref)) print '<tr><td class="titlefield">'.$langs->trans("DefaultTaxRate").'</td><td>'; $positiverates = ''; - if (price2num($object->tva_tx)) $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); - if (price2num($object->localtax1_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); - if (price2num($object->localtax2_type)) $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); - if (empty($positiverates)) $positiverates = '0'; + if (price2num($object->tva_tx)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->tva_tx); + } + if (price2num($object->localtax1_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax1_tx); + } + if (price2num($object->localtax2_type)) { + $positiverates .= ($positiverates ? '/' : '').price2num($object->localtax2_tx); + } + if (empty($positiverates)) { + $positiverates = '0'; + } echo vatrate($positiverates.($object->default_vat_code ? ' ('.$object->default_vat_code.')' : ''), '%', $object->tva_npr); /* - if ($object->default_vat_code) - { - print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; - } - else print vatrate($object->tva_tx, true, $object->tva_npr, true);*/ + if ($object->default_vat_code) + { + print vatrate($object->tva_tx, true) . ' ('.$object->default_vat_code.')'; + } + else print vatrate($object->tva_tx, true, $object->tva_npr, true);*/ print '</td></tr>'; // Price @@ -390,8 +402,7 @@ if (!empty($id) || !empty($ref)) // Weight print '<tr><td>'.$langs->trans("Weight").'</td><td>'; - if ($object->weight != '') - { + if ($object->weight != '') { print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); } else { print '&nbsp;'; @@ -466,14 +477,14 @@ if (!empty($id) || !empty($ref)) foreach ($productCombination2ValuePairs1 as $pc2v) { $prodattr_val->fetch($pc2v->fk_prod_attr_val); ?> - variants_selected.index.push(<?php echo $pc2v->fk_prod_attr ?>); - variants_selected.info[<?php echo $pc2v->fk_prod_attr ?>] = { - attribute: variants_available[<?php echo $pc2v->fk_prod_attr ?>], - value: { - id: <?php echo $pc2v->fk_prod_attr_val ?>, - label: '<?php echo $prodattr_val->value ?>' - } - }; + variants_selected.index.push(<?php echo $pc2v->fk_prod_attr ?>); + variants_selected.info[<?php echo $pc2v->fk_prod_attr ?>] = { + attribute: variants_available[<?php echo $pc2v->fk_prod_attr ?>], + value: { + id: <?php echo $pc2v->fk_prod_attr_val ?>, + label: '<?php echo $prodattr_val->value ?>' + } + }; <?php } ?> @@ -604,8 +615,7 @@ if (!empty($id) || !empty($ref)) print '<table class="border" style="width: 100%">'; // When in edit mode - if (is_array($productCombination2ValuePairs1) && count($productCombination2ValuePairs1)) - { + if (is_array($productCombination2ValuePairs1) && count($productCombination2ValuePairs1)) { ?> <tr> <td class="titlefieldcreate tdtop"><label for="features"><?php echo $langs->trans('Combination') ?></label></td> @@ -616,8 +626,7 @@ if (!empty($id) || !empty($ref)) $result1 = $prodattr->fetch($val->fk_prod_attr); $result2 = $prodattr_val->fetch($val->fk_prod_attr_val); //print 'rr'.$result1.' '.$result2; - if ($result1 > 0 && $result2 > 0) - { + if ($result1 > 0 && $result2 > 0) { print $prodattr->label.' - '.$prodattr_val->value.'<br>'; // TODO Add delete link } @@ -651,8 +660,7 @@ if (!empty($id) || !empty($ref)) } else { $prodcomb->fetchCombinationPriceLevels(); - for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { print '<tr>'; print '<td><label for="level_price_impact_'.$i.'">'.$langs->trans('ImpactOnPriceLevel', $i).'</label>'; if ($i === 1) { @@ -703,7 +711,9 @@ if (!empty($id) || !empty($ref)) ?> <div style="text-align: center"> - <input type="submit" name="create" <?php if (!is_array($productCombination2ValuePairs1)) print ' disabled="disabled"'; ?> value="<?php echo $action == 'add' ? $langs->trans('Create') : $langs->trans("Save") ?>" class="button button-save"> + <input type="submit" name="create" <?php if (!is_array($productCombination2ValuePairs1)) { + print ' disabled="disabled"'; + } ?> value="<?php echo $action == 'add' ? $langs->trans('Create') : $langs->trans("Save") ?>" class="button button-save"> &nbsp; <input type="submit" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>" class="button button-cancel"> </div> @@ -717,7 +727,7 @@ if (!empty($id) || !empty($ref)) $prodstatic->fetch($prodcomb->fk_product_child); print $form->formconfirm( - "combinations.php?id=".$id."&valueid=".$valueid, + "combinations.php?id=".urlencode($id)."&valueid=".urlencode($valueid), $langs->trans('Delete'), $langs->trans('ProductCombinationDeleteDialog', $prodstatic->ref), "confirm_deletecombination", @@ -732,8 +742,7 @@ if (!empty($id) || !empty($ref)) $comb2val = new ProductCombination2ValuePair($db); - if ($productCombinations) - { + if ($productCombinations) { ?> <script type="text/javascript"> @@ -767,8 +776,7 @@ if (!empty($id) || !empty($ref)) print '<a href="combinations.php?id='.$object->id.'&action=add&token='.newToken().'" class="butAction">'.$langs->trans('NewProductCombination').'</a>'; // NewVariant - if ($productCombinations) - { + if ($productCombinations) { print '<a href="combinations.php?id='.$object->id.'&action=copy&token='.newToken().'" class="butAction">'.$langs->trans('PropagateVariant').'</a>'; } @@ -791,8 +799,8 @@ if (!empty($id) || !empty($ref)) // List of mass actions available /* $arrayofmassactions = array( - 'presend'=>$langs->trans("SendByMail"), - 'builddoc'=>$langs->trans("PDFMerge"), + 'presend'=>$langs->trans("SendByMail"), + 'builddoc'=>$langs->trans("PDFMerge"), ); if ($user->rights->product->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); @@ -800,8 +808,7 @@ if (!empty($id) || !empty($ref)) */ $aaa = ''; - if (count($productCombinations)) - { + if (count($productCombinations)) { $aaa = '<label for="massaction">'.$langs->trans('BulkActions').'</label>'; $aaa .= '<select id="bulk_action" name="massaction" class="flat">'; $aaa .= ' <option value="nothing">&nbsp;</option>'; @@ -826,11 +833,13 @@ if (!empty($id) || !empty($ref)) <td class="liste_titre"><?php echo $langs->trans('Product') ?></td> <td class="liste_titre"><?php echo $langs->trans('Combination') ?></td> <td class="liste_titre right"><?php echo $langs->trans('PriceImpact') ?></td> - <?php if ($object->isProduct()) print'<td class="liste_titre right">'.$langs->trans('WeightImpact').'</td>'; ?> + <?php if ($object->isProduct()) { + print'<td class="liste_titre right">'.$langs->trans('WeightImpact').'</td>'; + } ?> <td class="liste_titre center"><?php echo $langs->trans('OnSell') ?></td> <td class="liste_titre center"><?php echo $langs->trans('OnBuy') ?></td> <td class="liste_titre"></td> - <?php + <?php print '<td class="liste_titre center">'; $searchpicto = $form->showCheckAddButtons('checkforselect', 1); print $searchpicto; @@ -839,10 +848,8 @@ if (!empty($id) || !empty($ref)) </tr> <?php - if (count($productCombinations)) - { - foreach ($productCombinations as $currcomb) - { + if (count($productCombinations)) { + foreach ($productCombinations as $currcomb) { $prodstatic->fetch($currcomb->fk_product_child); print '<tr class="oddeven">'; print '<td>'.$prodstatic->getNomUrl(1).'</td>'; @@ -869,10 +876,11 @@ if (!empty($id) || !empty($ref)) print '<a class="paddingleft paddingright" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=delete&token='.newToken().'&valueid='.$currcomb->id.'">'.img_delete().'</a>'; print '</td>'; print '<td class="nowrap center">'; - if ($productCombinations || $massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { + if ($productCombinations || $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($prodstatic->id, $arrayofselected)) $selected = 1; + if (in_array($prodstatic->id, $arrayofselected)) { + $selected = 1; + } print '<input id="cb'.$prodstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$prodstatic->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; diff --git a/htdocs/variants/create.php b/htdocs/variants/create.php index e37548f39f3..f87ad3ef504 100644 --- a/htdocs/variants/create.php +++ b/htdocs/variants/create.php @@ -24,6 +24,18 @@ $label = GETPOST('label', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'alpha'); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions @@ -40,8 +52,7 @@ if ($action == 'add') { $resid = $prodattr->create($user); if ($resid > 0) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); - if ($backtopage) - { + if ($backtopage) { header('Location: '.$backtopage); } else { header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$resid.'&backtopage='.urlencode($backtopage)); @@ -60,9 +71,12 @@ $langs->load('products'); * View */ +$help_url = 'EN:Module_Products#Variants'; + $title = $langs->trans('NewProductAttribute'); -llxHeader('', $title); +llxHeader('', $title, $help_url); + print load_fiche_titre($title); diff --git a/htdocs/variants/create_val.php b/htdocs/variants/create_val.php index b422df90120..1ca647960e2 100644 --- a/htdocs/variants/create_val.php +++ b/htdocs/variants/create_val.php @@ -36,13 +36,24 @@ if ($object->fetch($id) < 1) { exit(); } +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* * Actions */ -if ($cancel) -{ +if ($cancel) { $action = ''; header('Location: '.DOL_URL_ROOT.'/variants/card.php?id='.$object->id); exit(); @@ -56,8 +67,7 @@ if ($cancel) * View */ -if ($action == 'add') -{ +if ($action == 'add') { if (empty($ref) || empty($value)) { setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors'); } else { @@ -77,9 +87,11 @@ if ($action == 'add') $langs->load('products'); +$help_url = 'EN:Module_Products#Variants'; + $title = $langs->trans('ProductAttributeName', dol_htmlentities($object->label)); -llxHeader('', $title); +llxHeader('', $title, $help_url); $h = 0; $head[$h][0] = DOL_URL_ROOT.'/variants/card.php?id='.$object->id; diff --git a/htdocs/variants/index.html b/htdocs/variants/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/variants/lib/index.html b/htdocs/variants/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 683b28719a9..dd55b028ff9 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -21,6 +21,18 @@ require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; $action = GETPOST('action', 'aZ09'); $object = new ProductAttribute($db); +$permissiontoread = $user->rights->produit->lire || $user->rights->service->lire; + +// Security check +if (empty($conf->variants->enabled)) { + accessforbidden('Module not enabled'); +} +if ($user->socid > 0) { // Protection if external user + accessforbidden(); +} +//$result = restrictedArea($user, 'variant'); +if (!$permissiontoread) accessforbidden(); + /* @@ -56,8 +68,7 @@ $variants = $object->fetchAll(); llxHeader('', $title); $newcardbutton = ''; -if ($user->rights->produit->creer) -{ +if ($user->rights->produit->creer) { $newcardbutton .= dolGetButtonTitle($langs->trans('Create'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/variants/create.php'); } @@ -88,7 +99,8 @@ $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1; var roworder = cleanSerialize(decodeURI($("#tablelines").tableDnDSerialize())); $.post("<?php echo DOL_URL_ROOT; ?>/variants/ajax/orderAttribute.php", { - roworder: roworder + roworder: roworder, + token: "<?php echo currentToken(); ?>" }, function() { if (reloadpage == 1) { diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 983c7996898..e01bad39d77 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -28,48 +28,84 @@ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -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('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} // Some value of modulepart can be used to get resources that are public so no login are required. // Note that only directory logo is free to access without login. -if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'mycompany' && preg_match('/^\/?logos\//', $_GET['file'])) -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'mycompany' && preg_match('/^\/?logos\//', $_GET['file'])) { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } // For direct external download link, we don't need to load/check we are into a login session -if (isset($_GET["hashp"]) && !defined("NOLOGIN")) -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (isset($_GET["hashp"]) && !defined("NOLOGIN")) { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } // Some value of modulepart can be used to get resources that are public so no login are required. -if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } // Used by TakePOS Auto Order -if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"])) -{ - if (!defined("NOLOGIN")) define("NOLOGIN", 1); - if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. - if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"])) { + if (!defined("NOLOGIN")) { + define("NOLOGIN", 1); + } + if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + } + if (!defined("NOIPCHECK")) { + define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip + } } // For multicompany $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); -if (is_numeric($entity)) define("DOLENTITY", $entity); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} /** * Header empty @@ -101,9 +137,15 @@ $urlsource = GETPOST('urlsource', 'alpha'); $entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity; // Security check -if (empty($modulepart) && empty($hashp)) accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); -if (empty($original_file) && empty($hashp) && $modulepart != 'barcode') accessforbidden('Bad link. Missing identification to find file (param file or hashp)', 0, 0, 1); -if ($modulepart == 'fckeditor') $modulepart = 'medias'; // For backward compatibility +if (empty($modulepart) && empty($hashp)) { + accessforbidden('Bad link. Bad value for parameter modulepart', 0, 0, 1); +} +if (empty($original_file) && empty($hashp) && $modulepart != 'barcode') { + accessforbidden('Bad link. Missing identification to find file (param file or hashp)', 0, 0, 1); +} +if ($modulepart == 'fckeditor') { + $modulepart = 'medias'; // For backward compatibility +} @@ -119,38 +161,33 @@ if ($modulepart == 'fckeditor') $modulepart = 'medias'; // For backward compatib * View */ -if (GETPOST("cache", 'alpha')) -{ +if (GETPOST("cache", 'alpha')) { // Important: Following code is to avoid page request by browser and PHP CPU at // each Dolibarr page access. - if (empty($dolibarr_nocache)) - { + if (empty($dolibarr_nocache)) { header('Cache-Control: max-age=3600, public, must-revalidate'); header('Pragma: cache'); // This is to avoid having Pragma: no-cache - } else header('Cache-Control: no-cache'); + } else { + header('Cache-Control: no-cache'); + } //print $dolibarr_nocache; exit; } // If we have a hash public (hashp), we guess the original_file. -if (!empty($hashp)) -{ +if (!empty($hashp)) { include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', '', '', $hashp); - if ($result > 0) - { + if ($result > 0) { $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory // filepath can be 'users/X' or 'X/propale/PR11111' - if (is_numeric($tmp[0])) // If first tmp is numeric, it is subdir of company for multicompany, we take next part. - { + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. $tmp = explode('/', $tmp[1], 2); } $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path - if ($modulepart) // Not required, so often not defined, for link using public hashp parameter. - { - if ($moduleparttocheck == $modulepart) - { + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { // We remove first level of directory $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir //var_dump($original_file); exit; @@ -169,13 +206,20 @@ if (!empty($hashp)) // Define mime type $type = 'application/octet-stream'; -if (GETPOST('type', 'alpha')) $type = GETPOST('type', 'alpha'); -else $type = dol_mimetype($original_file); +if (GETPOST('type', 'alpha')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} // Security: This wrapper is for images. We do not allow type/html -if (preg_match('/html/i', $type)) accessforbidden('Error: Using the image wrapper to output a file with a mime type HTML is not possible.', 0, 0, 1); +if (preg_match('/html/i', $type)) { + accessforbidden('Error: Using the image wrapper to output a file with a mime type HTML is not possible.', 0, 0, 1); +} // Security: This wrapper is for images. We do not allow files ending with .noexe -if (preg_match('/\.noexe$/i', $original_file)) accessforbidden('Error: Using the image wrapper to output a file ending with .noexe is not allowed.', 0, 0, 1); +if (preg_match('/\.noexe$/i', $original_file)) { + accessforbidden('Error: Using the image wrapper to output a file ending with .noexe is not allowed.', 0, 0, 1); +} // Security: Delete string ../ into $original_file $original_file = str_replace("../", "/", $original_file); @@ -184,7 +228,9 @@ $original_file = str_replace("../", "/", $original_file); $refname = basename(dirname($original_file)."/"); // Security check -if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart', 0, 0, 1); +if (empty($modulepart)) { + accessforbidden('Bad value for parameter modulepart', 0, 0, 1); +} $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); $accessallowed = $check_access['accessallowed']; @@ -200,20 +246,15 @@ if (!empty($hashp)) { } } else { // Basic protection (against external users only) - if ($user->socid > 0) - { - if ($sqlprotectagainstexternals) - { + if ($user->socid > 0) { + if ($sqlprotectagainstexternals) { $resql = $db->query($sqlprotectagainstexternals); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($user->socid != $obj->fk_soc) - { + if ($user->socid != $obj->fk_soc) { $accessallowed = 0; break; } @@ -226,15 +267,13 @@ if (!empty($hashp)) { // Security: // Limit access if permissions are wrong -if (!$accessallowed) -{ +if (!$accessallowed) { accessforbidden(); } // Security: // On interdit les remontees de repertoire ainsi que les pipe dans les noms de fichiers. -if (preg_match('/\.\./', $fullpath_original_file) || preg_match('/[<>|]/', $fullpath_original_file)) -{ +if (preg_match('/\.\./', $fullpath_original_file) || preg_match('/[<>|]/', $fullpath_original_file)) { dol_syslog("Refused to deliver file ".$fullpath_original_file); print "ErrorFileNameInvalid: ".dol_escape_htmltag($original_file); exit; @@ -242,15 +281,13 @@ if (preg_match('/\.\./', $fullpath_original_file) || preg_match('/[<>|]/', $full -if ($modulepart == 'barcode') -{ +if ($modulepart == 'barcode') { $generator = GETPOST("generator", "alpha"); $code = GETPOST("code", 'none'); // This can be rich content (qrcode, datamatrix, ...) $encoding = GETPOST("encoding", "alpha"); $readable = GETPOST("readable", 'alpha') ?GETPOST("readable", "alpha") : "Y"; - if (empty($generator) || empty($encoding)) - { + if (empty($generator) || empty($encoding)) { print 'Error: Parameter "generator" or "encoding" not defined'; exit; } @@ -259,23 +296,25 @@ if ($modulepart == 'barcode') $result = 0; - foreach ($dirbarcode as $reldir) - { + foreach ($dirbarcode as $reldir) { $dir = dol_buildpath($reldir, 0); $newdir = dol_osencode($dir); // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php) - if (!is_dir($newdir)) continue; + if (!is_dir($newdir)) { + continue; + } $result = @include_once $newdir.$generator.'.modules.php'; - if ($result) break; + if ($result) { + break; + } } // Load barcode class $classname = "mod".ucfirst($generator); $module = new $classname($db); - if ($module->encodingIsSupported($encoding)) - { + if ($module->encodingIsSupported($encoding)) { $result = $module->buildBarCode($code, $encoding, $readable); } } else { @@ -288,17 +327,15 @@ if ($modulepart == 'barcode') dol_syslog("viewimage.php return file $fullpath_original_file filename=$filename content-type=$type"); // This test is to avoid error images when image is not available (for example thumbs). - if (!dol_is_file($fullpath_original_file) && empty($_GET["noalt"])) - { + if (!dol_is_file($fullpath_original_file) && empty($_GET["noalt"])) { $fullpath_original_file = DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.png'; /*$error='Error: File '.$_GET["file"].' does not exists or filesystems permissions are not allowed'; - print $error; - exit;*/ + print $error; + exit;*/ } // Permissions are ok and file found, so we return it - if ($type) - { + if ($type) { top_httphead($type); header('Content-Disposition: inline; filename="'.basename($fullpath_original_file).'"'); } else { @@ -312,4 +349,6 @@ if ($modulepart == 'barcode') } -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} diff --git a/htdocs/webservices/admin/index.php b/htdocs/webservices/admin/index.php index 2c14d2d07f5..1c78acae84d 100644 --- a/htdocs/webservices/admin/index.php +++ b/htdocs/webservices/admin/index.php @@ -29,26 +29,24 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->load("admin"); -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} $actionsave = GETPOST("save"); // Sauvegardes parametres -if ($actionsave) -{ +if ($actionsave) { $i = 0; $db->begin(); $i += dolibarr_set_const($db, 'WEBSERVICES_KEY', GETPOST("WEBSERVICES_KEY"), 'chaine', 0, '', $conf->entity); - if ($i >= 1) - { + if ($i >= 1) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } @@ -84,8 +82,9 @@ print "</tr>"; print '<tr class="oddeven">'; print '<td class="fieldrequired">'.$langs->trans("KeyForWebServicesAccess").'</td>'; print '<td><input type="text" class="flat" id="WEBSERVICES_KEY" name="WEBSERVICES_KEY" value="'.(GETPOST('WEBSERVICES_KEY') ?GETPOST('WEBSERVICES_KEY') : (!empty($conf->global->WEBSERVICES_KEY) ? $conf->global->WEBSERVICES_KEY : '')).'" size="40">'; -if (!empty($conf->use_javascript_ajax)) +if (!empty($conf->use_javascript_ajax)) { print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); +} print '</td>'; print '<td>&nbsp;</td>'; print '</tr>'; @@ -118,9 +117,10 @@ $webservices = array( // WSDL print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>'; -foreach ($webservices as $name => $right) -{ - if (!empty($right) && !verifCond($right)) continue; +foreach ($webservices as $name => $right) { + if (!empty($right) && !verifCond($right)) { + continue; + } $url = DOL_MAIN_URL_ROOT.'/webservices/server_'.$name.'.php?wsdl'; print img_picto('', 'globe').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n"; } @@ -129,9 +129,10 @@ print '<br>'; // Endpoint print '<u>'.$langs->trans("EndPointIs").':</u><br>'; -foreach ($webservices as $name => $right) -{ - if (!empty($right) && !verifCond($right)) continue; +foreach ($webservices as $name => $right) { + if (!empty($right) && !verifCond($right)) { + continue; + } $url = DOL_MAIN_URL_ROOT.'/webservices/server_'.$name.'.php'; print img_picto('', 'globe').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n"; } @@ -141,8 +142,7 @@ print '<br>'; print '<br>'; print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php'); -if (!empty($conf->use_javascript_ajax)) -{ +if (!empty($conf->use_javascript_ajax)) { print "\n".'<script type="text/javascript">'; print '$(document).ready(function () { $("#generate_token").click(function() { diff --git a/htdocs/webservices/index.php b/htdocs/webservices/index.php index e6e76692b05..72b0548ec52 100644 --- a/htdocs/webservices/index.php +++ b/htdocs/webservices/index.php @@ -38,8 +38,7 @@ $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index 140351e7d21..4be0847bc51 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -23,7 +23,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require "../master.inc.php"; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -37,8 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; dol_syslog("Call ActionComm webservices interfaces"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -122,18 +123,21 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $actioncomm_fields = array_merge($actioncomm_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $actioncomm_fields = array_merge($actioncomm_fields, $extrafield_array); +} // Define other specific objects $server->wsdl->addComplexType( @@ -255,7 +259,9 @@ function getActionComm($authentication, $id) dol_syslog("Function: getActionComm login=".$authentication['login']." id=".$id); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -263,22 +269,18 @@ function getActionComm($authentication, $id) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if ($error || (!$id)) - { + if ($error || (!$id)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->agenda->allactions->read) - { + if ($fuser->rights->agenda->allactions->read) { $actioncomm = new ActionComm($db); $result = $actioncomm->fetch($id); - if ($result > 0) - { + if ($result > 0) { $actioncomm_result_fields = array( 'id' => $actioncomm->id, 'ref'=> $actioncomm->ref, @@ -315,10 +317,8 @@ function getActionComm($authentication, $id) //Get extrafield values $actioncomm->fetch_optionals(); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $actioncomm_result_fields = array_merge($actioncomm_result_fields, array('options_'.$key => $actioncomm->array_options['options_'.$key])); } } @@ -327,20 +327,17 @@ function getActionComm($authentication, $id) $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'actioncomm'=>$actioncomm_result_fields); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -360,7 +357,9 @@ function getListActionCommType($authentication) dol_syslog("Function: getListActionCommType login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -368,18 +367,15 @@ function getListActionCommType($authentication) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->agenda->myactions->read) - { + if ($fuser->rights->agenda->myactions->read) { $cactioncomm = new CActionComm($db); $result = $cactioncomm->liste_array('', 'code'); - if ($result > 0) - { + if ($result > 0) { $resultarray = array(); - foreach ($cactioncomm->liste_array as $code=>$libeller) { + foreach ($cactioncomm->liste_array as $code => $libeller) { $resultarray[] = array('code'=>$code, 'libelle'=>$libeller); } @@ -396,8 +392,7 @@ function getListActionCommType($authentication) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -420,7 +415,9 @@ function createActionComm($authentication, $actioncomm) dol_syslog("Function: createActionComm login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -428,8 +425,7 @@ function createActionComm($authentication, $actioncomm) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if (!$error) - { + if (!$error) { $newobject = new ActionComm($db); $newobject->datep = $actioncomm['datep']; @@ -454,10 +450,8 @@ function createActionComm($authentication, $actioncomm) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $actioncomm[$key]; } @@ -466,17 +460,14 @@ function createActionComm($authentication, $actioncomm) $db->begin(); $result = $newobject->create($fuser); - if ($result <= 0) - { + if ($result <= 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -484,8 +475,7 @@ function createActionComm($authentication, $actioncomm) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -507,7 +497,9 @@ function updateActionComm($authentication, $actioncomm) dol_syslog("Function: updateActionComm login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -519,8 +511,7 @@ function updateActionComm($authentication, $actioncomm) $error++; $errorcode = 'KO'; $errorlabel = "Actioncomm id is mandatory."; } - if (!$error) - { + if (!$error) { $objectfound = false; $object = new ActionComm($db); @@ -551,10 +542,8 @@ function updateActionComm($authentication, $actioncomm) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $object->array_options[$key] = $actioncomm[$key]; } @@ -568,16 +557,13 @@ function updateActionComm($authentication, $actioncomm) } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$object->id ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -589,8 +575,7 @@ function updateActionComm($authentication, $actioncomm) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index 949c95dc530..f016a65f61f 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -21,7 +21,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require "../master.inc.php"; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -32,8 +34,7 @@ require_once DOL_DOCUMENT_ROOT."/categories/class/categorie.class.php"; dol_syslog("Call Dolibarr webservices interfaces"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -109,12 +110,12 @@ $server->wsdl->addComplexType( * Image of product */ $server->wsdl->addComplexType( - 'PhotosArray', - 'complexType', - 'array', - 'sequence', - '', - array( + 'PhotosArray', + 'complexType', + 'array', + 'sequence', + '', + array( 'image' => array( 'name' => 'image', 'type' => 'tns:image', @@ -128,12 +129,12 @@ $server->wsdl->addComplexType( * An image */ $server->wsdl->addComplexType( - 'image', - 'complexType', - 'struct', - 'all', - '', - array( + 'image', + 'complexType', + 'struct', + 'all', + '', + array( 'photo' => array('name'=>'photo', 'type'=>'xsd:string'), 'photo_vignette' => array('name'=>'photo_vignette', 'type'=>'xsd:string'), 'imgWidth' => array('name'=>'imgWidth', 'type'=>'xsd:string'), @@ -194,30 +195,28 @@ function getCategory($authentication, $id) dol_syslog("Function: getCategory login=".$authentication['login']." id=".$id); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $objectresp = array(); $errorcode = ''; $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if (!$error && !$id) - { + if (!$error && !$id) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id must be provided."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); $nbmax = 10; - if ($fuser->rights->categorie->lire) - { + if ($fuser->rights->categorie->lire) { $categorie = new Categorie($db); $result = $categorie->fetch($id); - if ($result > 0) - { + if ($result > 0) { $dir = (!empty($conf->categorie->dir_output) ? $conf->categorie->dir_output : $conf->service->dir_output); $pdir = get_exdir($categorie->id, 2, 0, 0, $categorie, 'category').$categorie->id."/photos/"; $dir = $dir.'/'.$pdir; @@ -235,10 +234,8 @@ function getCategory($authentication, $id) ); $cats = $categorie->get_filles(); - if (count($cats) > 0) - { - foreach ($cats as $fille) - { + if (count($cats) > 0) { + foreach ($cats as $fille) { $dir = (!empty($conf->categorie->dir_output) ? $conf->categorie->dir_output : $conf->service->dir_output); $pdir = get_exdir($fille->id, 2, 0, 0, $categorie, 'category').$fille->id."/photos/"; $dir = $dir.'/'.$pdir; @@ -261,20 +258,17 @@ function getCategory($authentication, $id) 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'categorie'=> $cat ); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index 97b219c7aba..a28371443d5 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -21,7 +21,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require "../master.inc.php"; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -33,8 +35,7 @@ require_once DOL_DOCUMENT_ROOT."/core/class/extrafields.class.php"; dol_syslog("Call Contact webservices interfaces"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -127,18 +128,21 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $contact_fields = array_merge($contact_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $contact_fields = array_merge($contact_fields, $extrafield_array); +} // Define other specific objects $server->wsdl->addComplexType( @@ -247,7 +251,9 @@ function getContact($authentication, $id, $ref_ext) dol_syslog("Function: getContact login=".$authentication['login']." id=".$id." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -255,24 +261,20 @@ function getContact($authentication, $id, $ref_ext) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && ($id && $ref_ext)) - { + if (!$error && ($id && $ref_ext)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); $contact = new Contact($db); $result = $contact->fetch($id, 0, $ref_ext); - if ($result > 0) - { + if ($result > 0) { // Only internal user who have contact read permission // Or for external user who have contact read permission, with restrict on socid - if ( - $fuser->rights->societe->contact->lire && !$fuser->socid + if ($fuser->rights->societe->contact->lire && !$fuser->socid || ($fuser->rights->societe->contact->lire && ($fuser->socid == $contact->socid)) ) { $contact_result_fields = array( @@ -319,10 +321,8 @@ function getContact($authentication, $id, $ref_ext) //Get extrafield values $contact->fetch_optionals(); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $contact_result_fields = array_merge($contact_result_fields, array('options_'.$key => $contact->array_options['options_'.$key])); } } @@ -332,20 +332,17 @@ function getContact($authentication, $id, $ref_ext) 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'contact'=>$contact_result_fields ); - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref_ext='.$ref_ext; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -368,7 +365,9 @@ function createContact($authentication, $contact) dol_syslog("Function: createContact login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -376,13 +375,11 @@ function createContact($authentication, $contact) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (empty($contact['lastname'])) - { + if (empty($contact['lastname'])) { $error++; $errorcode = 'KO'; $errorlabel = "Name is mandatory."; } - if (!$error) - { + if (!$error) { $newobject = new Contact($db); $newobject->id = $contact['id']; @@ -424,10 +421,8 @@ function createContact($authentication, $contact) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $contact[$key]; } @@ -439,17 +434,14 @@ function createContact($authentication, $contact) $db->begin(); $result = $newobject->create($fuser); - if ($result <= 0) - { + if ($result <= 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -457,8 +449,7 @@ function createContact($authentication, $contact) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -478,7 +469,9 @@ function getContactsForThirdParty($authentication, $idthirdparty) dol_syslog("Function: getContactsForThirdParty login=".$authentication['login']." idthirdparty=".$idthirdparty); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -486,14 +479,12 @@ function getContactsForThirdParty($authentication, $idthirdparty) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && empty($idthirdparty)) - { + if (!$error && empty($idthirdparty)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = 'Parameter id is not provided'; } - if (!$error) - { + if (!$error) { $linesinvoice = array(); $sql = "SELECT c.rowid, c.fk_soc, c.civility as civility_id, c.lastname, c.firstname, c.statut as status,"; @@ -512,15 +503,13 @@ function getContactsForThirdParty($authentication, $idthirdparty) $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 .= " WHERE c.fk_soc = ".$idthirdparty; + $sql .= " WHERE c.fk_soc = ".((int) $idthirdparty); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { // En attendant remplissage par boucle $obj = $db->fetch_object($resql); @@ -580,15 +569,13 @@ function getContactsForThirdParty($authentication, $idthirdparty) 'contacts'=>$linescontact ); - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -611,7 +598,9 @@ function updateContact($authentication, $contact) dol_syslog("Function: updateContact login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -623,14 +612,12 @@ function updateContact($authentication, $contact) $error++; $errorcode = 'KO'; $errorlabel = "Contact id or ref_ext is mandatory."; } // Check parameters - if (!$error && ($id && $ref_ext)) - { + if (!$error && ($id && $ref_ext)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id and ref_ext can't be all provided. You must choose one of them."; } - if (!$error) - { + if (!$error) { $objectfound = false; include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -650,7 +637,9 @@ function updateContact($authentication, $contact) $object->town = $contact['town']; $object->country_id = $contact['country_id']; - if ($contact['country_code']) $object->country_id = getCountry($contact['country_code'], 3); + if ($contact['country_code']) { + $object->country_id = getCountry($contact['country_code'], 3); + } $object->province_id = $contact['province_id']; @@ -671,10 +660,8 @@ function updateContact($authentication, $contact) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $object->array_options[$key] = $contact[$key]; } @@ -688,16 +675,13 @@ function updateContact($authentication, $contact) } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$object->id ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -709,8 +693,7 @@ function updateContact($authentication, $contact) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index 7397b8ca2a6..d1382ac7c62 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -21,7 +21,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -38,8 +40,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -112,16 +113,16 @@ $server->wsdl->addComplexType( ); /*$server->wsdl->addComplexType( - 'LinesArray', - 'complexType', - 'array', - '', - 'SOAP-ENC:Array', - array(), - array( - array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:line[]') - ), - 'tns:line' + 'LinesArray', + 'complexType', + 'array', + '', + 'SOAP-ENC:Array', + array(), + array( + array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:line[]') + ), + 'tns:line' );*/ $server->wsdl->addComplexType( 'LinesArray2', @@ -176,16 +177,16 @@ $server->wsdl->addComplexType( ); /* $server->wsdl->addComplexType( - 'InvoicesArray', - 'complexType', - 'array', - '', - 'SOAP-ENC:Array', - array(), - array( - array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:invoice[]') - ), - 'tns:invoice' + 'InvoicesArray', + 'complexType', + 'array', + '', + 'SOAP-ENC:Array', + array(), + array( + array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'tns:invoice[]') + ), + 'tns:invoice' );*/ $server->wsdl->addComplexType( 'InvoicesArray2', @@ -252,16 +253,16 @@ $server->register( 'WS to create an invoice' ); $server->register( - 'createInvoiceFromOrder', - // Entry values + 'createInvoiceFromOrder', + // Entry values array('authentication'=>'tns:authentication', 'id_order'=>'xsd:string', 'ref_order'=>'xsd:string', 'ref_ext_order'=>'xsd:string'), - // Exit values + // Exit values array('result'=>'tns:result', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), - $ns, - $ns.'#createInvoiceFromOrder', - $styledoc, - $styleuse, - 'WS to create an invoice from an order' + $ns, + $ns.'#createInvoiceFromOrder', + $styledoc, + $styleuse, + 'WS to create an invoice from an order' ); $server->register( 'updateInvoice', @@ -292,7 +293,9 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: getInvoice login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -300,26 +303,21 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->facture->lire) - { + if ($fuser->rights->facture->lire) { $invoice = new Facture($db); $result = $invoice->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { $linesresp = array(); $i = 0; - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { //var_dump($line); exit; $linesresp[] = array( 'id'=>$line->id, @@ -346,7 +344,7 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'invoice'=>array( 'id' => $invoice->id, - 'ref' => $invoice->ref, + 'ref' => $invoice->ref, 'ref_ext' => $invoice->ref_ext ? $invoice->ref_ext : '', // If not defined, field is not added into soap 'thirdparty_id' => $invoice->socid, 'fk_user_author' => $invoice->user_author ? $invoice->user_author : '', @@ -369,20 +367,17 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') 'payment_mode_id' => $invoice->mode_reglement_id ? $invoice->mode_reglement_id : '', 'lines' => $linesresp )); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -403,7 +398,9 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) dol_syslog("Function: getInvoicesForThirdParty login=".$authentication['login']." idthirdparty=".$idthirdparty); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -411,31 +408,31 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } // Check parameters - if (!$error && empty($idthirdparty)) - { + if (!$error && empty($idthirdparty)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = 'Parameter idthirdparty is not provided'; } - if (!$error) - { + if (!$error) { $linesinvoice = array(); $sql = 'SELECT f.rowid as facid, ref as ref, ref_ext, type, fk_statut as status, total_ttc, total, tva'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql .= " WHERE f.entity IN (".getEntity('invoice').")"; - if ($idthirdparty != 'all') $sql .= " AND f.fk_soc = ".$db->escape($idthirdparty); + if ($idthirdparty != 'all') { + $sql .= " AND f.fk_soc = ".$db->escape($idthirdparty); + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { // En attendant remplissage par boucle $obj = $db->fetch_object($resql); @@ -443,18 +440,15 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) $invoice->fetch($obj->facid); // Sécurité pour utilisateur externe - if ($socid && ($socid != $invoice->socid)) - { + if ($socid && ($socid != $invoice->socid)) { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = $invoice->socid.' User does not have permission for this request'; } - if (!$error) - { + if (!$error) { // Define lines of invoice $linesresp = array(); - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { $linesresp[] = array( 'id'=>$line->id, 'type'=>$line->product_type, @@ -508,15 +502,13 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) 'invoices'=>$linesinvoice ); - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -539,7 +531,9 @@ function createInvoice($authentication, $invoice) dol_syslog("Function: createInvoice login=".$authentication['login']." id=".$invoice['id'].", ref=".$invoice['ref'].", ref_ext=".$invoice['ref_ext']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -552,8 +546,7 @@ function createInvoice($authentication, $invoice) $error++; $errorcode = 'KO'; $errorlabel = "Invoice id or ref or ref_ext is mandatory."; } - if (!$error) - { + if (!$error) { $new_invoice = new Facture($db); $new_invoice->socid = $invoice['thirdparty_id']; $new_invoice->type = $invoice['type']; @@ -571,16 +564,19 @@ function createInvoice($authentication, $invoice) if ($res > 0) { $new_invoice->mode_reglement_id = !empty($invoice['payment_mode_id']) ? $invoice['payment_mode_id'] : $soc->mode_reglement_id; $new_invoice->cond_reglement_id = $soc->cond_reglement_id; + } else { + $new_invoice->mode_reglement_id = $invoice['payment_mode_id']; } - else $new_invoice->mode_reglement_id = $invoice['payment_mode_id']; // Trick because nusoap does not store data with same structure if there is one or several lines $arrayoflines = array(); - if (isset($invoice['lines']['line'][0])) $arrayoflines = $invoice['lines']['line']; - else $arrayoflines = $invoice['lines']; + if (isset($invoice['lines']['line'][0])) { + $arrayoflines = $invoice['lines']['line']; + } else { + $arrayoflines = $invoice['lines']; + } - foreach ($arrayoflines as $line) - { + foreach ($arrayoflines as $line) { // $key can be 'line' or '0','1',... $newline = new FactureLigne($db); $newline->product_type = $line['type']; @@ -603,27 +599,22 @@ function createInvoice($authentication, $invoice) $db->begin(); $result = $new_invoice->create($fuser, 0, dol_stringtotime($invoice['date_due'], 'dayrfc')); - if ($result < 0) - { + if ($result < 0) { $error++; } - if (!$error && $invoice['status'] == Facture::STATUS_VALIDATED) // We want invoice to have status validated - { + if (!$error && $invoice['status'] == Facture::STATUS_VALIDATED) { // We want invoice to have status validated $result = $new_invoice->validate($fuser); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$new_invoice->id, 'ref'=>$new_invoice->ref, 'ref_ext'=>$new_invoice->ref_ext); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -632,8 +623,7 @@ function createInvoice($authentication, $invoice) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -655,14 +645,18 @@ function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '' dol_syslog("Function: createInvoiceFromOrder login=".$authentication['login']." id=".$id_order.", ref=".$ref_order.", ref_ext=".$ref_ext_order); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); $errorcode = ''; $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } // Check parameters if (empty($id_order) && empty($ref_order) && empty($ref_ext_order)) { @@ -670,51 +664,41 @@ function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '' } ////////////////////// - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->commande->lire) - { + if ($fuser->rights->commande->lire) { $order = new Commande($db); $result = $order->fetch($id_order, $ref_order, $ref_ext_order); - if ($result > 0) - { + if ($result > 0) { // Security for external user - if ($socid && ($socid != $order->socid)) - { + if ($socid && ($socid != $order->socid)) { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = $order->socid.'User does not have permission for this request'; } - if (!$error) - { + if (!$error) { $newobject = new Facture($db); $result = $newobject->createFromOrder($order, $fuser); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog("Webservice server_invoice:: invoice creation from order failed", LOG_ERR); } } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id_order.' nor ref='.$ref_order.' nor ref_ext='.$ref_ext_order; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); - } - else { + } else { $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref, 'ref_ext'=>$newobject->ref_ext); } @@ -735,7 +719,9 @@ function updateInvoice($authentication, $invoice) dol_syslog("Function: updateInvoice login=".$authentication['login']." id=".$invoice['id']. ", ref=".$invoice['ref'].", ref_ext=".$invoice['ref_ext']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -748,8 +734,7 @@ function updateInvoice($authentication, $invoice) $error++; $errorcode = 'KO'; $errorlabel = "Invoice id or ref or ref_ext is mandatory."; } - if (!$error) - { + if (!$error) { $objectfound = false; $object = new Facture($db); @@ -760,33 +745,29 @@ function updateInvoice($authentication, $invoice) $db->begin(); - if (isset($invoice['status'])) - { - if ($invoice['status'] == Facture::STATUS_DRAFT) - { + if (isset($invoice['status'])) { + if ($invoice['status'] == Facture::STATUS_DRAFT) { $result = $object->setDraft($fuser); } - if ($invoice['status'] == Facture::STATUS_VALIDATED) - { + if ($invoice['status'] == Facture::STATUS_VALIDATED) { $result = $object->validate($fuser); - if ($result >= 0) - { + if ($result >= 0) { // Define output language $outputlangs = $langs; $object->generateDocument($object->model_pdf, $outputlangs); } } if ($invoice['status'] == Facture::STATUS_CLOSED) { - $result = $object->set_paid($fuser, $invoice['close_code'], $invoice['close_note']); + $result = $object->setPaid($fuser, $invoice['close_code'], $invoice['close_note']); + } + if ($invoice['status'] == Facture::STATUS_ABANDONED) { + $result = $object->setCanceled($fuser, $invoice['close_code'], $invoice['close_note']); } - if ($invoice['status'] == Facture::STATUS_ABANDONED) - $result = $object->set_canceled($fuser, $invoice['close_code'], $invoice['close_note']); } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), @@ -794,9 +775,7 @@ function updateInvoice($authentication, $invoice) 'ref'=>$object->ref, 'ref_ext'=>$object->ref_ext ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -808,8 +787,7 @@ function updateInvoice($authentication, $invoice) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index 8c278768990..8f3d5af17e6 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -22,7 +22,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -36,8 +38,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -56,12 +57,12 @@ $server->wsdl->schemaTargetNamespace = $ns; // Define WSDL Authentication object $server->wsdl->addComplexType( - 'authentication', - 'complexType', - 'struct', - 'all', - '', - array( + 'authentication', + 'complexType', + 'struct', + 'all', + '', + array( 'dolibarrkey' => array('name'=>'dolibarrkey', 'type'=>'xsd:string'), 'sourceapplication' => array('name'=>'sourceapplication', 'type'=>'xsd:string'), 'login' => array('name'=>'login', 'type'=>'xsd:string'), @@ -71,12 +72,12 @@ $server->wsdl->addComplexType( ); // Define WSDL Return object $server->wsdl->addComplexType( - 'result', - 'complexType', - 'struct', - 'all', - '', - array( + 'result', + 'complexType', + 'struct', + 'all', + '', + array( 'result_code' => array('name'=>'result_code', 'type'=>'xsd:string'), 'result_label' => array('name'=>'result_label', 'type'=>'xsd:string'), ) @@ -120,27 +121,30 @@ $extrafield_line_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_line_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { //$value=$object->array_options["options_".$key]; $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_line_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_line_array)) $line_fields = array_merge($line_fields, $extrafield_line_array); +if (is_array($extrafield_line_array)) { + $line_fields = array_merge($line_fields, $extrafield_line_array); +} // Define other specific objects $server->wsdl->addComplexType( - 'line', - 'complexType', - 'struct', - 'all', - '', - $line_fields + 'line', + 'complexType', + 'struct', + 'all', + '', + $line_fields ); /*$server->wsdl->addComplexType( @@ -159,12 +163,12 @@ $server->wsdl->addComplexType( 'tns:line' );*/ $server->wsdl->addComplexType( - 'LinesArray2', - 'complexType', - 'array', - 'sequence', - '', - array( + 'LinesArray2', + 'complexType', + 'array', + 'sequence', + '', + array( 'line' => array( 'name' => 'line', 'type' => 'tns:line', @@ -224,26 +228,29 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { //$value=$object->array_options["options_".$key]; $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $order_fields = array_merge($order_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $order_fields = array_merge($order_fields, $extrafield_array); +} $server->wsdl->addComplexType( - 'order', - 'complexType', - 'struct', - 'all', - '', - $order_fields + 'order', + 'complexType', + 'struct', + 'all', + '', + $order_fields ); /* @@ -263,12 +270,12 @@ $server->wsdl->addComplexType( 'tns:order' );*/ $server->wsdl->addComplexType( - 'OrdersArray2', - 'complexType', - 'array', - 'sequence', - '', - array( + 'OrdersArray2', + 'complexType', + 'array', + 'sequence', + '', + array( 'order' => array( 'name' => 'order', 'type' => 'tns:order', @@ -289,58 +296,58 @@ $styleuse = 'encoded'; // encoded/literal/literal wrapped // Register WSDL $server->register( - 'getOrder', - array('authentication'=>'tns:authentication', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), // Entry values - array('result'=>'tns:result', 'order'=>'tns:order'), // Exit values - $ns, - $ns.'#getOrder', - $styledoc, - $styleuse, - 'WS to get a particular invoice' + 'getOrder', + array('authentication'=>'tns:authentication', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), // Entry values + array('result'=>'tns:result', 'order'=>'tns:order'), // Exit values + $ns, + $ns.'#getOrder', + $styledoc, + $styleuse, + 'WS to get a particular invoice' ); $server->register( - 'getOrdersForThirdParty', - array('authentication'=>'tns:authentication', 'idthirdparty'=>'xsd:string'), // Entry values - array('result'=>'tns:result', 'orders'=>'tns:OrdersArray2'), // Exit values - $ns, - $ns.'#getOrdersForThirdParty', - $styledoc, - $styleuse, - 'WS to get all orders of a third party' + 'getOrdersForThirdParty', + array('authentication'=>'tns:authentication', 'idthirdparty'=>'xsd:string'), // Entry values + array('result'=>'tns:result', 'orders'=>'tns:OrdersArray2'), // Exit values + $ns, + $ns.'#getOrdersForThirdParty', + $styledoc, + $styleuse, + 'WS to get all orders of a third party' ); $server->register( - 'createOrder', - array('authentication'=>'tns:authentication', 'order'=>'tns:order'), // Entry values - array('result'=>'tns:result', 'id'=>'xsd:string', 'ref'=>'xsd:string'), // Exit values - $ns, - $ns.'#createOrder', - $styledoc, - $styleuse, - 'WS to create an order' + 'createOrder', + array('authentication'=>'tns:authentication', 'order'=>'tns:order'), // Entry values + array('result'=>'tns:result', 'id'=>'xsd:string', 'ref'=>'xsd:string'), // Exit values + $ns, + $ns.'#createOrder', + $styledoc, + $styleuse, + 'WS to create an order' ); $server->register( - 'updateOrder', - array('authentication'=>'tns:authentication', 'order'=>'tns:order'), // Entry values - array('result'=>'tns:result', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), // Exit values - $ns, - $ns.'#updateOrder', - $styledoc, - $styleuse, - 'WS to update an order' + 'updateOrder', + array('authentication'=>'tns:authentication', 'order'=>'tns:order'), // Entry values + array('result'=>'tns:result', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), // Exit values + $ns, + $ns.'#updateOrder', + $styledoc, + $styleuse, + 'WS to update an order' ); $server->register( - 'validOrder', - array('authentication'=>'tns:authentication', 'id'=>'xsd:string', 'id_warehouse'=>'xsd:string'), // Entry values - array('result'=>'tns:result'), // Exit values - $ns, - $ns.'#validOrder', - $styledoc, - $styleuse, - 'WS to valid an order' + 'validOrder', + array('authentication'=>'tns:authentication', 'id'=>'xsd:string', 'id_warehouse'=>'xsd:string'), // Entry values + array('result'=>'tns:result'), // Exit values + $ns, + $ns.'#validOrder', + $styledoc, + $styleuse, + 'WS to valid an order' ); /** @@ -358,7 +365,9 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: getOrder login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -368,38 +377,33 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->commande->lire) - { + if ($fuser->rights->commande->lire) { $order = new Commande($db); $result = $order->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { // Security for external user - if ($socid && $socid != $order->socid) - { + if ($socid && $socid != $order->socid) { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } - if (!$error) - { + if (!$error) { $linesresp = array(); $i = 0; - foreach ($order->lines as $line) - { + foreach ($order->lines as $line) { //var_dump($line); exit; $linesresp[] = array( 'id'=>$line->rowid, @@ -473,22 +477,19 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') 'lines' => $linesresp )); } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -509,7 +510,9 @@ function getOrdersForThirdParty($authentication, $idthirdparty) dol_syslog("Function: getOrdersForThirdParty login=".$authentication['login']." idthirdparty=".$idthirdparty); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -517,32 +520,32 @@ function getOrdersForThirdParty($authentication, $idthirdparty) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } // Check parameters - if (!$error && empty($idthirdparty)) - { + if (!$error && empty($idthirdparty)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = 'Parameter id is not provided'; } - if (!$error) - { + if (!$error) { $linesorders = array(); $sql = 'SELECT c.rowid as orderid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c'; $sql .= " WHERE c.entity = ".$conf->entity; - if ($idthirdparty != 'all') $sql .= " AND c.fk_soc = ".$db->escape($idthirdparty); + if ($idthirdparty != 'all') { + $sql .= " AND c.fk_soc = ".$db->escape($idthirdparty); + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { // En attendant remplissage par boucle $obj = $db->fetch_object($resql); @@ -550,19 +553,16 @@ function getOrdersForThirdParty($authentication, $idthirdparty) $order->fetch($obj->orderid); // Sécurité pour utilisateur externe - if ($socid && ($socid != $order->socid)) - { + if ($socid && ($socid != $order->socid)) { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = $order->socid.' User does not have permission for this request'; } - if (!$error) - { + if (!$error) { // Define lines of invoice $linesresp = array(); - foreach ($order->lines as $line) - { + foreach ($order->lines as $line) { $linesresp[] = array( 'id'=>$line->rowid, 'type'=>$line->product_type, @@ -638,15 +638,13 @@ function getOrdersForThirdParty($authentication, $idthirdparty) 'orders'=>$linesorders ); - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -671,7 +669,9 @@ function createOrder($authentication, $order) dol_syslog("Function: createOrder login=".$authentication['login']." socid :".$order['socid']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -683,8 +683,7 @@ function createOrder($authentication, $order) // Check parameters - if (!$error) - { + if (!$error) { $newobject = new Commande($db); $newobject->socid = $order['thirdparty_id']; $newobject->type = $order['type']; @@ -706,10 +705,8 @@ function createOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $order[$key]; } @@ -717,11 +714,13 @@ function createOrder($authentication, $order) // Trick because nusoap does not store data with same structure if there is one or several lines $arrayoflines = array(); - if (isset($order['lines']['line'][0])) $arrayoflines = $order['lines']['line']; - else $arrayoflines = $order['lines']; + if (isset($order['lines']['line'][0])) { + $arrayoflines = $order['lines']['line']; + } else { + $arrayoflines = $order['lines']; + } - foreach ($arrayoflines as $key => $line) - { + foreach ($arrayoflines as $key => $line) { // $key can be 'line' or '0','1',... $newline = new OrderLine($db); @@ -744,10 +743,8 @@ function createOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newline->array_options[$key] = $line[$key]; } @@ -761,30 +758,25 @@ function createOrder($authentication, $order) dol_syslog("Webservice server_order:: order creation start", LOG_DEBUG); $result = $newobject->create($fuser); dol_syslog('Webservice server_order:: order creation done with $result='.$result, LOG_DEBUG); - if ($result < 0) - { + if ($result < 0) { dol_syslog("Webservice server_order:: order creation failed", LOG_ERR); $error++; } - if ($order['status'] == 1) // We want order to have status validated - { + if ($order['status'] == 1) { // We want order to have status validated dol_syslog("Webservice server_order:: order validation start", LOG_DEBUG); $result = $newobject->valid($fuser); - if ($result < 0) - { + if ($result < 0) { dol_syslog("Webservice server_order:: order validation failed", LOG_ERR); $error++; } } - if ($result >= 0) - { + if ($result >= 0) { dol_syslog("Webservice server_order:: order creation & validation succeeded, commit", LOG_DEBUG); $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { dol_syslog("Webservice server_order:: order creation or validation failed, rollback", LOG_ERR); $db->rollback(); $error++; @@ -793,8 +785,7 @@ function createOrder($authentication, $order) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -821,45 +812,40 @@ function validOrder($authentication, $id = '', $id_warehouse = 0) $errorcode = ''; $errorlabel = ''; $error = 0; - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->commande->lire) - { + if ($fuser->rights->commande->lire) { $order = new Commande($db); $result = $order->fetch($id); $order->fetch_thirdparty(); $db->begin(); - if ($result > 0) - { + if ($result > 0) { $result = $order->valid($fuser, $id_warehouse); - if ($result >= 0) - { + if ($result >= 0) { // Define output language $outputlangs = $langs; $order->generateDocument($order->model_pdf, $outputlangs); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; $errorlabel = $order->error; } - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; $errorlabel = $order->error; } - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -867,11 +853,9 @@ function validOrder($authentication, $id = '', $id_warehouse = 0) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); - } - else { + } else { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>'')); } @@ -892,7 +876,9 @@ function updateOrder($authentication, $order) dol_syslog("Function: updateOrder login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -904,8 +890,7 @@ function updateOrder($authentication, $order) $error++; $errorcode = 'KO'; $errorlabel = "Order id or ref or ref_ext is mandatory."; } - if (!$error) - { + if (!$error) { $objectfound = false; include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -918,27 +903,33 @@ function updateOrder($authentication, $order) $db->begin(); - if (isset($order['status'])) - { - if ($order['status'] == -1) $result = $object->cancel($fuser); - if ($order['status'] == 1) - { + if (isset($order['status'])) { + if ($order['status'] == -1) { + $result = $object->cancel($fuser); + } + if ($order['status'] == 1) { $result = $object->valid($fuser); - if ($result >= 0) - { + if ($result >= 0) { // Define output language $outputlangs = $langs; $object->generateDocument($order->model_pdf, $outputlangs); } } - if ($order['status'] == 0) $result = $object->set_reopen($fuser); - if ($order['status'] == 3) $result = $object->cloture($fuser); + if ($order['status'] == 0) { + $result = $object->set_reopen($fuser); + } + if ($order['status'] == 3) { + $result = $object->cloture($fuser); + } } - if (isset($order['billed'])) - { - if ($order['billed']) $result = $object->classifyBilled($fuser); - if (!$order['billed']) $result = $object->classifyUnBilled($fuser); + if (isset($order['billed'])) { + if ($order['billed']) { + $result = $object->classifyBilled($fuser); + } + if (!$order['billed']) { + $result = $object->classifyUnBilled($fuser); + } } $elementtype = 'commande'; @@ -947,13 +938,10 @@ function updateOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; - if (isset($order[$key])) - { + if (isset($order[$key])) { $result = $object->setValueFrom($key, $order[$key], 'commande_extrafields'); } } @@ -964,8 +952,7 @@ function updateOrder($authentication, $order) } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), @@ -973,9 +960,7 @@ function updateOrder($authentication, $order) 'ref'=>$object->ref, 'ref_ext'=>$object->ref_ext ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -987,8 +972,7 @@ function updateOrder($authentication, $order) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 3494f928cde..ae1a480710f 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -20,7 +20,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -35,8 +37,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -149,7 +150,9 @@ function getVersions($authentication) dol_syslog("Function: getVersions login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -159,8 +162,7 @@ function getVersions($authentication) // Check parameters - if (!$error) - { + if (!$error) { $objectresp['result'] = array('result_code'=>'OK', 'result_label'=>''); $objectresp['dolibarr'] = version_dolibarr(); $objectresp['os'] = version_os(); @@ -168,8 +170,7 @@ function getVersions($authentication) $objectresp['webserver'] = version_webserver(); } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -192,7 +193,9 @@ function getDocument($authentication, $modulepart, $file, $refname = '') dol_syslog("Function: getDocument login=".$authentication['login'].' - modulepart='.$modulepart.' - file='.$file); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $objectresp = array(); $errorcode = ''; $errorlabel = ''; @@ -208,24 +211,26 @@ function getDocument($authentication, $modulepart, $file, $refname = '') $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } // Check parameters - if (!$error && (!$file || !$modulepart)) - { + if (!$error && (!$file || !$modulepart)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter file and modulepart must be both provided."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); // Suppression de la chaine de caractere ../ dans $original_file $original_file = str_replace("../", "/", $original_file); // find the subdirectory name as the reference - if (empty($refname)) $refname = basename(dirname($original_file)."/"); + if (empty($refname)) { + $refname = basename(dirname($original_file)."/"); + } // Security check $check_access = dol_check_secure_access_document($modulepart, $original_file, $conf->entity, $fuser, $refname); @@ -234,20 +239,15 @@ function getDocument($authentication, $modulepart, $file, $refname = '') $original_file = $check_access['original_file']; // Basic protection (against external users only) - if ($fuser->socid > 0) - { - if ($sqlprotectagainstexternals) - { + if ($fuser->socid > 0) { + if ($sqlprotectagainstexternals) { $resql = $db->query($sqlprotectagainstexternals); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); - if ($fuser->socid != $obj->fk_soc) - { + if ($fuser->socid != $obj->fk_soc) { $accessallowed = 0; break; } @@ -259,8 +259,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '') // Security: // Limite acces si droits non corrects - if (!$accessallowed) - { + if (!$accessallowed) { $errorcode = 'NOT_PERMITTED'; $errorlabel = 'Access not allowed'; $error++; @@ -269,8 +268,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '') // Security: // On interdit les remontees de repertoire ainsi que les pipe dans // les noms de fichiers. - if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) - { + if (preg_match('/\.\./', $original_file) || preg_match('/[<>|]/', $original_file)) { dol_syslog("Refused to deliver file ".$original_file); $errorcode = 'REFUSED'; $errorlabel = ''; @@ -279,10 +277,8 @@ function getDocument($authentication, $modulepart, $file, $refname = '') clearstatcache(); - if (!$error) - { - if (file_exists($original_file)) - { + if (!$error) { + if (file_exists($original_file)) { dol_syslog("Function: getDocument $original_file content-type=$type"); $f = fopen($original_file, 'r'); @@ -300,8 +296,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'document'=>$objectret ); - } - else { + } else { dol_syslog("File doesn't exist ".$original_file); $errorcode = 'NOT_FOUND'; $errorlabel = ''; @@ -310,8 +305,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '') } } - if ($error) - { + if ($error) { $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel) ); diff --git a/htdocs/webservices/server_payment.php b/htdocs/webservices/server_payment.php index 3fd3868a36a..6bf43bf78f6 100644 --- a/htdocs/webservices/server_payment.php +++ b/htdocs/webservices/server_payment.php @@ -42,8 +42,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); @@ -147,7 +146,9 @@ function createPayment($authentication, $payment) dol_syslog("Function: createPayment login=".$authentication['login']." id=".$payment->id. ", ref=".$payment->ref.", ref_ext=".$payment->ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -163,8 +164,7 @@ function createPayment($authentication, $payment) $errorlabel = "You must specify the amount and the third party's ID."; } - if (!$error) - { + if (!$error) { $soc = new Societe($db); $soc->fetch($payment['thirdparty_id']); @@ -188,17 +188,14 @@ function createPayment($authentication, $payment) $new_payment->addPaymentToBank($fuser, 'payment', $payment['int_label'], $payment['bank_account'], $payment['emitter'], $payment['bank_source']); } - if ($result < 0) - { + if ($result < 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$new_payment->id); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -207,8 +204,7 @@ function createPayment($authentication, $payment) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index f04ade49f05..95b7246d021 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 JF FERRY <jfefe@aternatik.fr> + * Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +24,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -42,8 +45,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -142,19 +144,22 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (!empty($extrafield_array) && is_array($extrafield_array)) $productorservice_fields = array_merge($productorservice_fields, $extrafield_array); +if (!empty($extrafield_array) && is_array($extrafield_array)) { + $productorservice_fields = array_merge($productorservice_fields, $extrafield_array); +} // Define other specific objects $server->wsdl->addComplexType( @@ -236,7 +241,6 @@ $server->wsdl->addComplexType( ); - // 5 styles: RPC/encoded, RPC/literal, Document/encoded (not WS-I compliant), Document/literal, Document/literal wrapped // Style merely dictates how to translate a WSDL binding to a SOAP message. Nothing more. You can use either style with any programming model. // http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/ @@ -349,44 +353,49 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '' $langcode = ($lang ? $lang : (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); - $errorcode = ''; $errorlabel = ''; + $errorcode = ''; + $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $langcode = ($lang ? $lang : (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); $fuser->getrights(); $nbmax = 10; - if ($fuser->rights->produit->lire || $fuser->rights->service->lire) - { + if ($fuser->rights->produit->lire || $fuser->rights->service->lire) { $product = new Product($db); $result = $product->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { $product->load_stock(); $dir = (!empty($conf->product->dir_output) ? $conf->product->dir_output : $conf->service->dir_output); $pdir = get_exdir($product->id, 2, 0, 0, $product, 'product').$product->ref."/"; $dir = $dir.'/'.$pdir; - if (!empty($product->multilangs[$langs->defaultlang]["label"])) $product->label = $product->multilangs[$langs->defaultlang]["label"]; - if (!empty($product->multilangs[$langs->defaultlang]["description"])) $product->description = $product->multilangs[$langs->defaultlang]["description"]; - if (!empty($product->multilangs[$langs->defaultlang]["note"])) $product->note = $product->multilangs[$langs->defaultlang]["note"]; + if (!empty($product->multilangs[$langs->defaultlang]["label"])) { + $product->label = $product->multilangs[$langs->defaultlang]["label"]; + } + if (!empty($product->multilangs[$langs->defaultlang]["description"])) { + $product->description = $product->multilangs[$langs->defaultlang]["description"]; + } + if (!empty($product->multilangs[$langs->defaultlang]["note"])) { + $product->note = $product->multilangs[$langs->defaultlang]["note"]; + } $productorservice_result_fields = array( 'id' => $product->id, @@ -436,10 +445,8 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '' //Get extrafield values $product->fetch_optionals(); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $productorservice_result_fields = array_merge($productorservice_result_fields, array('options_'.$key => $product->array_options['options_'.$key])); } } @@ -449,20 +456,17 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '' 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'product'=>$productorservice_result_fields ); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } //var_dump($objectresp);exit; @@ -485,31 +489,35 @@ function createProductOrService($authentication, $product) dol_syslog("Function: createProductOrService login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); - $errorcode = ''; $errorlabel = ''; + $errorcode = ''; + $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters if (empty($product['price_base_type'])) { - if (isset($product['price_net']) && $product['price_net'] > 0) $product['price_base_type'] = 'HT'; - if (isset($product['price']) && $product['price'] > 0) $product['price_base_type'] = 'TTC'; + if (isset($product['price_net']) && $product['price_net'] > 0) { + $product['price_base_type'] = 'HT'; + } + if (isset($product['price']) && $product['price'] > 0) { + $product['price_base_type'] = 'TTC'; + } } - if (isset($product['price_net']) && $product['price_net'] > 0 && isset($product['price']) && $product['price'] > 0) - { + if (isset($product['price_net']) && $product['price_net'] > 0 && isset($product['price']) && $product['price'] > 0) { $error++; $errorcode = 'KO'; $errorlabel = "You must choose between price or price_net to provide price."; } - if (!empty($product['barcode']) && empty($product['barcode_type'])) - { + if (!empty($product['barcode']) && empty($product['barcode_type'])) { $error++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; } - if (!$error) - { + if (!$error) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $newobject = new Product($db); @@ -528,8 +536,7 @@ function createProductOrService($authentication, $product) $newobject->price_base_type = $product['price_base_type']; $newobject->date_creation = $now; - if (!empty($product['barcode'])) - { + if (!empty($product['barcode'])) { $newobject->barcode = $product['barcode']; $newobject->barcode_type = $product['barcode_type']; } @@ -539,23 +546,25 @@ function createProductOrService($authentication, $product) $newobject->seuil_stock_alerte = isset($product['stock_alert']) ? $product['stock_alert'] : null; $newobject->country_id = isset($product['country_id']) ? $product['country_id'] : 0; - if (!empty($product['country_code'])) $newobject->country_id = getCountry($product['country_code'], 3); + if (!empty($product['country_code'])) { + $newobject->country_id = getCountry($product['country_code'], 3); + } $newobject->customcode = isset($product['customcode']) ? $product['customcode'] : ''; $newobject->canvas = isset($product['canvas']) ? $product['canvas'] : ''; /*foreach($product['lines'] as $line) - { - $newline=new FactureLigne($db); - $newline->type=$line['type']; - $newline->desc=$line['desc']; - $newline->fk_product=$line['fk_product']; - $newline->total_ht=$line['total_net']; - $newline->total_vat=$line['total_vat']; - $newline->total_ttc=$line['total']; - $newline->vat=$line['vat_rate']; - $newline->qty=$line['qty']; - $newline->fk_product=$line['product_id']; - }*/ + { + $newline=new FactureLigne($db); + $newline->type=$line['type']; + $newline->desc=$line['desc']; + $newline->fk_product=$line['fk_product']; + $newline->total_ht=$line['total_net']; + $newline->total_vat=$line['total_vat']; + $newline->total_ttc=$line['total']; + $newline->vat=$line['vat_rate']; + $newline->qty=$line['qty']; + $newline->fk_product=$line['product_id']; + }*/ //var_dump($product['ref_ext']); //var_dump($product['lines'][0]['type']); @@ -563,10 +572,8 @@ function createProductOrService($authentication, $product) $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $product[$key]; } @@ -575,43 +582,34 @@ function createProductOrService($authentication, $product) $db->begin(); $result = $newobject->create($fuser, 0); - if ($result <= 0) - { + if ($result <= 0) { $error++; } - if (!$error) - { + if (!$error) { // Update stock if stock count is provided and differs from database after creation or update - if (isset($product['stock_real']) && $product['stock_real'] != '' && !empty($conf->global->stock->enabled)) - { + if (isset($product['stock_real']) && $product['stock_real'] != '' && !empty($conf->global->stock->enabled)) { include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $savstockreal = $newobject->stock_reel; $newobject->load_stock('novirtual,nobatch'); // This overwrite ->stock_reel, surely 0 because we have just created product $getstockreal = $newobject->stock_reel; - if ($savstockreal != $getstockreal) - { + if ($savstockreal != $getstockreal) { $warehouse = new Entrepot($db); $warehouse->fetch(0, $product['warehouse_ref']); - if ($warehouse->id > 0) - { - if (($savstockreal - $getstockreal) > 0) - { + if ($warehouse->id > 0) { + if (($savstockreal - $getstockreal) > 0) { $result = $newobject->correct_stock($fuser, $warehouse->id, ($savstockreal - $getstockreal), 0, 'Correction from external call (Web Service)', 0, 'WS'.dol_print_date($now, 'dayhourlog')); } - if (($savstockreal - $getstockreal) > 0) - { + if (($savstockreal - $getstockreal) > 0) { $result = $newobject->correct_stock($fuser, $warehouse->id, ($savstockreal - $getstockreal), 1, 'Correction from external call (Web Service)', 0, 'WS'.dol_print_date($now, 'dayhourlog')); } - if ($result <= 0) - { + if ($result <= 0) { $error++; $newobject->error = 'You set a different value for stock, but correction of stock count (before='.$getstockreal.', after='.$savstockreal.') fails with error '.$newobject->error; } - } - else { + } else { $error++; $newobject->error = 'You set a different value for stock but we failed to find warehouse '.$product['warehouse_ref'].' to make correction.'; } @@ -619,12 +617,10 @@ function createProductOrService($authentication, $product) } } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -632,8 +628,7 @@ function createProductOrService($authentication, $product) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -656,37 +651,45 @@ function updateProductOrService($authentication, $product) dol_syslog("Function: updateProductOrService login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); - $errorcode = ''; $errorlabel = ''; + $errorcode = ''; + $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if ($product['price_net'] > 0) $product['price_base_type'] = 'HT'; - if ($product['price'] > 0) $product['price_base_type'] = 'TTC'; + if ($product['price_net'] > 0) { + $product['price_base_type'] = 'HT'; + } + if ($product['price'] > 0) { + $product['price_base_type'] = 'TTC'; + } - if ($product['price_net'] > 0 && $product['price'] > 0) - { + if ($product['price_net'] > 0 && $product['price'] > 0) { $error++; $errorcode = 'KO'; $errorlabel = "You must choose between price or price_net to provide price."; } - if ($product['barcode'] && !$product['barcode_type']) - { + if ($product['barcode'] && !$product['barcode_type']) { $error++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; } - if (!$error) - { + if (!$error) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $newobject = new Product($db); $newobject->fetch($product['id']); - if (isset($product['ref'])) $newobject->ref = $product['ref']; - if (isset($product['ref_ext'])) $newobject->ref_ext = $product['ref_ext']; + if (isset($product['ref'])) { + $newobject->ref = $product['ref']; + } + if (isset($product['ref_ext'])) { + $newobject->ref_ext = $product['ref_ext']; + } $newobject->type = $product['type']; $newobject->label = $product['label']; $newobject->description = $product['description']; @@ -699,8 +702,7 @@ function updateProductOrService($authentication, $product) $newobject->price_base_type = $product['price_base_type']; $newobject->date_creation = $now; - if ($product['barcode']) - { + if ($product['barcode']) { $newobject->barcode = $product['barcode']; $newobject->barcode_type = $product['barcode_type']; } @@ -710,7 +712,9 @@ function updateProductOrService($authentication, $product) $newobject->seuil_stock_alerte = isset($product['stock_alert']) ? $product['stock_alert'] : null; $newobject->country_id = isset($product['country_id']) ? $product['country_id'] : 0; - if (!empty($product['country_code'])) $newobject->country_id = getCountry($product['country_code'], 3); + if (!empty($product['country_code'])) { + $newobject->country_id = getCountry($product['country_code'], 3); + } $newobject->customcode = isset($product['customcode']) ? $product['customcode'] : ''; $newobject->canvas = isset($product['canvas']) ? $product['canvas'] : ''; @@ -719,10 +723,8 @@ function updateProductOrService($authentication, $product) $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $product[$key]; } @@ -731,41 +733,32 @@ function updateProductOrService($authentication, $product) $db->begin(); $result = $newobject->update($newobject->id, $fuser); - if ($result <= 0) - { + if ($result <= 0) { $error++; - } - else { + } else { // Update stock if stock count is provided and differs from database after creation or update - if (isset($product['stock_real']) && $product['stock_real'] != '' && !empty($conf->global->stock->enabled)) - { + if (isset($product['stock_real']) && $product['stock_real'] != '' && !empty($conf->global->stock->enabled)) { include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; $savstockreal = $newobject->stock_reel; $newobject->load_stock('novirtual,nobatch'); // This overwrite ->stock_reel $getstockreal = $newobject->stock_reel; - if ($savstockreal != $getstockreal) - { + if ($savstockreal != $getstockreal) { $warehouse = new Entrepot($db); $warehouse->fetch(0, $product['warehouse_ref']); - if ($warehouse->id > 0) - { - if (($savstockreal - $getstockreal) > 0) - { + if ($warehouse->id > 0) { + if (($savstockreal - $getstockreal) > 0) { $result = $newobject->correct_stock($fuser, $warehouse->id, ($savstockreal - $getstockreal), 0, 'Correction from external call (Web Service)', 0, 'WS'.dol_print_date($now, 'dayhourlog')); } - if (($savstockreal - $getstockreal) > 0) - { + if (($savstockreal - $getstockreal) > 0) { $result = $newobject->correct_stock($fuser, $warehouse->id, ($savstockreal - $getstockreal), 1, 'Correction from external call (Web Service)', 0, 'WS'.dol_print_date($now, 'dayhourlog')); } - if ($result <= 0) - { + if ($result <= 0) { $error++; $newobject->error = 'You set a different value for stock, but correction of stock count (before='.$getstockreal.', after='.$savstockreal.') fails with error '.$newobject->error; } - } - else { + } else { $error++; $newobject->error = 'You set a different value for stock but we failed to find warehouse '.$product['warehouse_ref'].' to make correction.'; } @@ -773,32 +766,24 @@ function updateProductOrService($authentication, $product) } } - if (!$error) - { - if ($newobject->price_base_type == 'HT') - { + if (!$error) { + if ($newobject->price_base_type == 'HT') { $result = $newobject->updatePrice($newobject->price, $newobject->price_base_type, $fuser); - if ($result <= 0) - { + if ($result <= 0) { $error++; } - } - elseif ($newobject->price_base_type == 'TTC') - { - $result = $newobject->updatePrice($newobject->price_ttc, $newobject->price_base_type); - if ($result <= 0) - { + } elseif ($newobject->price_base_type == 'TTC') { + $result = $newobject->updatePrice($newobject->price_ttc, $newobject->price_base_type, $fuser); + if ($result <= 0) { $error++; } } } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -806,8 +791,7 @@ function updateProductOrService($authentication, $product) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -828,11 +812,14 @@ function deleteProductOrService($authentication, $listofidstring) dol_syslog("Function: deleteProductOrService login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); - $errorcode = ''; $errorlabel = ''; + $errorcode = ''; + $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); @@ -844,32 +831,26 @@ function deleteProductOrService($authentication, $listofidstring) $listofiddeleted = array(); // Check parameters - if (count($listofid) == 0 || empty($listofid[0])) - { + if (count($listofid) == 0 || empty($listofid[0])) { $error++; $errorcode = 'KO'; $errorlabel = "List of Id of products or services to delete are required."; } - if (!$error) - { + if (!$error) { $firsterror = ''; $db->begin(); - foreach ($listofid as $id) - { + foreach ($listofid as $id) { $newobject = new Product($db); $result = $newobject->fetch($id); - if ($result == 0) - { + if ($result == 0) { $error++; $firsterror = 'Product or service with id '.$id.' not found'; break; - } - else { + } else { $result = $newobject->delete($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; $firsterror = $newobject->error; break; @@ -879,13 +860,11 @@ function deleteProductOrService($authentication, $listofidstring) } } - if (!$error) - { + if (!$error) { $db->commit(); //$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'listofid'=>$listofiddeleted); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'nbdeleted'=>count($listofiddeleted)); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -893,15 +872,12 @@ function deleteProductOrService($authentication, $listofidstring) } } - if ($error) - { + if ($error) { //$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'listofid'=>$listofiddeleted); $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'nbdeleted'=>0); - } - elseif (count($listofiddeleted) == 0) - { - //$objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'listofid'=>$listofiddeleted); - $objectresp = array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',', $listofid).' found'), 'nbdeleted'=>0); + } elseif (count($listofiddeleted) == 0) { + //$objectresp=array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',',$listofid).' found'), 'listofid'=>$listofiddeleted); + $objectresp = array('result'=>array('result_code'=>'NOT_FOUND', 'result_label'=>'No product or service with id '.join(',', $listofid).' found'), 'nbdeleted'=>0); } return $objectresp; @@ -921,49 +897,52 @@ function getListOfProductsOrServices($authentication, $filterproduct) dol_syslog("Function: getListOfProductsOrServices login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); $arrayproducts = array(); - $errorcode = ''; $errorlabel = ''; + $errorcode = ''; + $errorlabel = ''; $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error) - { + if (!$error) { $sql = "SELECT rowid, ref, ref_ext"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity=".$conf->entity; - foreach ($filterproduct as $key => $val) - { - if ($key == 'type' && $val >= 0) $sql .= " AND fk_product_type = ".$db->escape($val); - if ($key == 'status_tosell') $sql .= " AND tosell = ".$db->escape($val); - if ($key == 'status_tobuy') $sql .= " AND tobuy = ".$db->escape($val); + foreach ($filterproduct as $key => $val) { + if ($key == 'type' && $val >= 0) { + $sql .= " AND fk_product_type = ".$db->escape($val); + } + if ($key == 'status_tosell') { + $sql .= " AND tosell = ".$db->escape($val); + } + if ($key == 'status_tobuy') { + $sql .= " AND tobuy = ".$db->escape($val); + } } $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + if ($resql) { + $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $arrayproducts[] = array('id'=>$obj->rowid, 'ref'=>$obj->ref, 'ref_ext'=>$obj->ref_ext); - $i++; - } - } - else { + $i = 0; + while ($i < $num) { + $obj = $db->fetch_object($resql); + $arrayproducts[] = array('id'=>$obj->rowid, 'ref'=>$obj->ref, 'ref_ext'=>$obj->ref_ext); + $i++; + } + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'products'=>$arrayproducts @@ -996,7 +975,9 @@ function getProductsForCategory($authentication, $id, $lang = '') dol_syslog("Function: getProductsForCategory login=".$authentication['login']." id=".$id); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $objectresp = array(); $errorcode = ''; $errorlabel = ''; @@ -1005,54 +986,47 @@ function getProductsForCategory($authentication, $id, $lang = '') $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if (!$error && !$id) - { + if (!$error && !$id) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id must be provided."; } - if (!$error) - { + if (!$error) { $langcode = ($lang ? $lang : (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT)); $langs->setDefaultLang($langcode); $fuser->getrights(); $nbmax = 10; - if ($fuser->rights->produit->lire) - { + if ($fuser->rights->produit->lire) { $categorie = new Categorie($db); $result = $categorie->fetch($id); - if ($result > 0) - { + if ($result > 0) { $table = "product"; $field = "product"; $sql = "SELECT fk_".$field." FROM ".MAIN_DB_PREFIX."categorie_".$table; - $sql .= " WHERE fk_categorie = ".$id; + $sql .= " WHERE fk_categorie = ".((int) $id); $sql .= " ORDER BY fk_".$field." ASC"; dol_syslog("getProductsForCategory get id of product into category", LOG_DEBUG); $res = $db->query($sql); - if ($res) - { + if ($res) { $iProduct = 0; $tmpproduct = new Product($db); $products = array(); - while ($rec = $db->fetch_array($res)) - { + while ($rec = $db->fetch_array($res)) { $tmpproduct->fetch($rec['fk_'.$field]); - if ($tmpproduct->status > 0) - { + if ($tmpproduct->status > 0) { $dir = (!empty($conf->product->dir_output) ? $conf->product->dir_output : $conf->service->dir_output); $pdir = get_exdir($tmpproduct->id, 2, 0, 0, $tmpproduct, 'product').$tmpproduct->id."/photos/"; $dir = $dir.'/'.$pdir; $products[] = array( 'id' => $tmpproduct->id, - 'ref' => $tmpproduct->ref, - 'ref_ext' => $tmpproduct->ref_ext, + 'ref' => $tmpproduct->ref, + 'ref_ext' => $tmpproduct->ref_ext, 'label' => !empty($tmpproduct->multilangs[$langs->defaultlang]["label"]) ? $tmpproduct->multilangs[$langs->defaultlang]["label"] : $tmpproduct->label, 'description' => !empty($tmpproduct->multilangs[$langs->defaultlang]["description"]) ? $tmpproduct->multilangs[$langs->defaultlang]["description"] : $tmpproduct->description, 'date_creation' => dol_print_date($tmpproduct->date_creation, 'dayhourrfc'), @@ -1090,10 +1064,8 @@ function getProductsForCategory($authentication, $id, $lang = '') //Get extrafield values $tmpproduct->fetch_optionals(); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $products[$iProduct] = array_merge($products[$iProduct], array('options_'.$key => $tmpproduct->array_options['options_'.$key])); } } @@ -1107,26 +1079,22 @@ function getProductsForCategory($authentication, $id, $lang = '') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'products'=> $products ); - } - else { + } else { $errorcode = 'NORECORDS_FOR_ASSOCIATION'; $errorlabel = 'No products associated'.$sql; $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); dol_syslog("getProductsForCategory:: ".$errorcode, LOG_DEBUG); } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_project.php b/htdocs/webservices/server_project.php index 8d76786df71..b64ccc94d59 100644 --- a/htdocs/webservices/server_project.php +++ b/htdocs/webservices/server_project.php @@ -21,7 +21,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -37,8 +39,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -131,8 +132,7 @@ $server->wsdl->addComplexType( ); $project_elements = array(); -foreach ($listofreferent as $key => $label) -{ +foreach ($listofreferent as $key => $label) { $project_elements[$key] = array('name'=>$key, 'type'=>'tns:elementsArray'); } $server->wsdl->addComplexType( @@ -169,18 +169,21 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { //$value=$object->array_options["options_".$key]; $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $project_fields = array_merge($project_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $project_fields = array_merge($project_fields, $extrafield_array); +} $server->wsdl->addComplexType( 'project', @@ -240,7 +243,9 @@ function createProject($authentication, $project) dol_syslog("Function: createProject login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -248,18 +253,15 @@ function createProject($authentication, $project) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (empty($project['ref'])) - { + if (empty($project['ref'])) { $error++; $errorcode = 'KO'; $errorlabel = "Name is mandatory."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->projet->creer) - { + if ($fuser->rights->projet->creer) { $newobject = new Project($db); $newobject->ref = $project['ref']; $newobject->title = $project['label']; @@ -277,10 +279,8 @@ function createProject($authentication, $project) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; $newobject->array_options[$key] = $project[$key]; } @@ -289,39 +289,32 @@ function createProject($authentication, $project) $db->begin(); $result = $newobject->create($fuser); - if (!$error && $result > 0) - { + if (!$error && $result > 0) { // Add myself as project leader $result = $newobject->add_contact($fuser->id, 'PROJECTLEADER', 'internal'); - if ($result < 0) - { + if ($result < 0) { $error++; } - } - else { + } else { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; $errorlabel = $newobject->error; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -342,7 +335,9 @@ function getProject($authentication, $id = '', $ref = '') dol_syslog("Function: getProject login=".$authentication['login']." id=".$id." ref=".$ref); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -350,22 +345,18 @@ function getProject($authentication, $id = '', $ref = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref))) - { + if (!$error && (($id && $ref))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id and ref can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->projet->lire) - { + if ($fuser->rights->projet->lire) { $project = new Project($db); $result = $project->fetch($id, $ref); - if ($result > 0) - { + if ($result > 0) { $project_result_fields = array( 'id' => $project->id, 'ref' => $project->ref, @@ -386,11 +377,9 @@ function getProject($authentication, $id = '', $ref = '') $extrafields->fetch_name_optionals_label($elementtype, true); //Get extrafield values - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { $project->fetch_optionals(); - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $project_result_fields = array_merge($project_result_fields, array('options_'.$key => $project->array_options['options_'.$key])); } } @@ -398,14 +387,11 @@ function getProject($authentication, $id = '', $ref = '') //Get linked elements global $listofreferent; $elements = array(); - foreach ($listofreferent as $key => $tablename) - { + foreach ($listofreferent as $key => $tablename) { $elements[$key] = array(); $element_array = $project->get_element_list($key, $tablename); - if (count($element_array) > 0 && is_array($element_array)) - { - foreach ($element_array as $element) - { + if (count($element_array) > 0 && is_array($element_array)) { + foreach ($element_array as $element) { $tmp = explode('_', $element); $idofelement = count($tmp) > 0 ? $tmp[0] : ""; $idofelementuser = count($tmp) > 1 ? $tmp[1] : ""; @@ -420,20 +406,17 @@ function getProject($authentication, $id = '', $ref = '') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'project'=>$project_result_fields ); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index 8ba70409806..2a17ea15265 100644 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -20,7 +20,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -34,8 +36,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -229,7 +230,9 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: getSupplierInvoice login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -237,26 +240,21 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->fournisseur->facture->lire) - { + if ($fuser->rights->fournisseur->facture->lire) { $invoice = new FactureFournisseur($db); $result = $invoice->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { $linesresp = array(); $i = 0; - foreach ($invoice->lines as $line) - { + foreach ($invoice->lines as $line) { //var_dump($line); exit; $linesresp[] = array( 'id'=>$line->rowid, @@ -275,7 +273,7 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'invoice'=>array( 'id' => $invoice->id, - 'ref' => $invoice->ref, + 'ref' => $invoice->ref, 'ref_supplier'=>$invoice->ref_supplier, 'ref_ext' => $invoice->ref_ext, 'fk_user_author' => $invoice->fk_user_author, @@ -302,20 +300,17 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') // '1'=>array('id'=>333,'type'=>1)), )); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -336,7 +331,9 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) dol_syslog("Function: getSupplierInvoicesForThirdParty login=".$authentication['login']." idthirdparty=".$idthirdparty); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -345,14 +342,12 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && empty($idthirdparty)) - { + if (!$error && empty($idthirdparty)) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = 'Parameter id is not provided'; } - if (!$error) - { + if (!$error) { $linesinvoice = array(); $sql .= 'SELECT f.rowid as facid'; @@ -362,22 +357,21 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) //$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'"; //$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'"; $sql .= " WHERE f.entity = ".$conf->entity; - if ($idthirdparty != 'all') $sql .= " AND f.fk_soc = ".$db->escape($idthirdparty); + if ($idthirdparty != 'all') { + $sql .= " AND f.fk_soc = ".$db->escape($idthirdparty); + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { // En attendant remplissage par boucle $obj = $db->fetch_object($resql); $invoice = new FactureFournisseur($db); $result = $invoice->fetch($obj->facid); - if ($result < 0) - { + if ($result < 0) { $error++; $errorcode = $result; $errorlabel = $invoice->error; break; @@ -385,9 +379,8 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) // Define lines of invoice $linesresp = array(); - foreach ($invoice->lines as $line) - { - $linesresp[] = array( + foreach ($invoice->lines as $line) { + $linesresp[] = array( 'id'=>$line->rowid, 'type'=>$line->product_type, 'desc'=>dol_htmlcleanlastbr($line->description), @@ -396,10 +389,10 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) 'total'=>$line->total_ttc, 'vat_rate'=>$line->tva_tx, 'qty'=>$line->qty, - 'product_ref'=>$line->product_ref, + 'product_ref'=>$line->product_ref, 'product_label'=>$line->product_label, 'product_desc'=>$line->product_desc, - ); + ); } // Now define invoice @@ -438,15 +431,13 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) 'invoices'=>$linesinvoice ); - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index c81b6bc6f63..19ff0100d6d 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -20,7 +20,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require_once '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -36,8 +38,7 @@ dol_syslog("Call Dolibarr webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -130,20 +131,23 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { //$value=$object->array_options["options_".$key]; $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['options_'.$key] = array('name'=>'options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $thirdparty_fields = array_merge($thirdparty_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $thirdparty_fields = array_merge($thirdparty_fields, $extrafield_array); +} // Define other specific objects $server->wsdl->addComplexType( @@ -265,16 +269,16 @@ $server->register( // Register WSDL $server->register( - 'deleteThirdParty', - // Entry values + 'deleteThirdParty', + // Entry values array('authentication'=>'tns:authentication', 'id'=>'xsd:string', 'ref'=>'xsd:string', 'ref_ext'=>'xsd:string'), - // Exit values + // Exit values array('result'=>'tns:result', 'id'=>'xsd:string'), - $ns, - $ns.'#deleteThirdParty', - $styledoc, - $styleuse, - 'WS to delete a thirdparty from its id, ref or ref_ext' + $ns, + $ns.'#deleteThirdParty', + $styledoc, + $styleuse, + 'WS to delete a thirdparty from its id, ref or ref_ext' ); @@ -294,7 +298,9 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: getThirdParty login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -303,27 +309,24 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->societe->lire) - { + if ($fuser->rights->societe->lire) { $thirdparty = new Societe($db); $result = $thirdparty->fetch($id, $ref, $ref_ext); if ($result > 0) { $thirdparty_result_fields = array( 'id' => $thirdparty->id, - 'ref' => $thirdparty->name, - 'ref_ext' => $thirdparty->ref_ext, - 'status' => $thirdparty->status, + 'ref' => $thirdparty->name, + 'ref_ext' => $thirdparty->ref_ext, + 'status' => $thirdparty->status, 'client' => $thirdparty->client, 'supplier' => $thirdparty->fournisseur, 'customer_code' => $thirdparty->code_client, @@ -352,7 +355,7 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') 'profid5' => $thirdparty->idprof5, 'profid6' => $thirdparty->idprof6, 'capital' => $thirdparty->capital, - 'barcode' => $thirdparty->barcode, + 'barcode' => $thirdparty->barcode, 'vat_used' => $thirdparty->tva_assuj, 'vat_number' => $thirdparty->tva_intra, 'note_private' => $thirdparty->note_private, @@ -367,10 +370,8 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') //Get extrafield values $thirdparty->fetch_optionals(); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { if (isset($thirdparty->array_options['options_'.$key])) { $thirdparty_result_fields = array_merge($thirdparty_result_fields, array('options_'.$key => $thirdparty->array_options['options_'.$key])); } @@ -388,15 +389,13 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -420,7 +419,9 @@ function createThirdParty($authentication, $thirdparty) dol_syslog("Function: createThirdParty login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -428,14 +429,12 @@ function createThirdParty($authentication, $thirdparty) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (empty($thirdparty['ref'])) - { + if (empty($thirdparty['ref'])) { $error++; $errorcode = 'KO'; $errorlabel = "Name is mandatory."; } - if (!$error) - { + if (!$error) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $newobject = new Societe($db); @@ -457,7 +456,9 @@ function createThirdParty($authentication, $thirdparty) $newobject->town = $thirdparty['town']; $newobject->country_id = $thirdparty['country_id']; - if ($thirdparty['country_code']) $newobject->country_id = getCountry($thirdparty['country_code'], 3); + if ($thirdparty['country_code']) { + $newobject->country_id = getCountry($thirdparty['country_code'], 3); + } $newobject->province_id = $thirdparty['province_id']; //if ($thirdparty['province_code']) $newobject->province_code=getCountry($thirdparty['province_code'],3); @@ -487,10 +488,8 @@ function createThirdParty($authentication, $thirdparty) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; if (isset($thirdparty[$key])) { $newobject->array_options[$key] = $thirdparty[$key]; @@ -506,22 +505,20 @@ function createThirdParty($authentication, $thirdparty) $newobject->name_bis = $thirdparty['lastname']; $result = $newobject->create_individual($fuser); } - if ($result <= 0) - { + if ($result <= 0) { $error++; } - if (!$error) - { + if (!$error) { $db->commit(); // Patch to add capability to associate (one) sale representative - if (!empty($thirdparty['commid']) && $thirdparty['commid'] > 0) + if (!empty($thirdparty['commid']) && $thirdparty['commid'] > 0) { $newobject->add_commercial($fuser, $thirdparty["commid"]); + } $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$newobject->id, 'ref'=>$newobject->ref); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; @@ -529,8 +526,7 @@ function createThirdParty($authentication, $thirdparty) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -552,7 +548,9 @@ function updateThirdParty($authentication, $thirdparty) dol_syslog("Function: updateThirdParty login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -564,8 +562,7 @@ function updateThirdParty($authentication, $thirdparty) $error++; $errorcode = 'KO'; $errorlabel = "Thirdparty id is mandatory."; } - if (!$error) - { + if (!$error) { $objectfound = false; include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -594,7 +591,9 @@ function updateThirdParty($authentication, $thirdparty) $object->town = $thirdparty['town']; $object->country_id = $thirdparty['country_id']; - if ($thirdparty['country_code']) $object->country_id = getCountry($thirdparty['country_code'], 3); + if ($thirdparty['country_code']) { + $object->country_id = getCountry($thirdparty['country_code'], 3); + } $object->province_id = $thirdparty['province_id']; //if ($thirdparty['province_code']) $newobject->province_code=getCountry($thirdparty['province_code'],3); @@ -623,10 +622,8 @@ function updateThirdParty($authentication, $thirdparty) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'options_'.$key; if (isset($thirdparty[$key])) { $object->array_options[$key] = $thirdparty[$key]; @@ -642,16 +639,13 @@ function updateThirdParty($authentication, $thirdparty) } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'id'=>$object->id ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -663,8 +657,7 @@ function updateThirdParty($authentication, $thirdparty) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -686,7 +679,9 @@ function getListOfThirdParties($authentication, $filterthirdparty) dol_syslog("Function: getListOfThirdParties login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -697,20 +692,26 @@ function getListOfThirdParties($authentication, $filterthirdparty) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error) - { + if (!$error) { $sql = "SELECT s.rowid as socRowid, s.nom as ref, s.ref_ext, s.address, s.zip, s.town, c.label as country, s.phone, s.fax, s.url, extra.*"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON s.fk_pays = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields as extra ON s.rowid=fk_object"; $sql .= " WHERE entity=".$conf->entity; - foreach ($filterthirdparty as $key => $val) - { - if ($key == 'name' && $val != '') $sql .= " AND s.name LIKE '%".$db->escape($val)."%'"; - if ($key == 'client' && (int) $val > 0) $sql .= " AND s.client = ".$db->escape($val); - if ($key == 'supplier' && (int) $val > 0) $sql .= " AND s.fournisseur = ".$db->escape($val); - if ($key == 'category' && (int) $val > 0) $sql .= " AND s.rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") "; + foreach ($filterthirdparty as $key => $val) { + if ($key == 'name' && $val != '') { + $sql .= " AND s.name LIKE '%".$db->escape($val)."%'"; + } + if ($key == 'client' && (int) $val > 0) { + $sql .= " AND s.client = ".$db->escape($val); + } + if ($key == 'supplier' && (int) $val > 0) { + $sql .= " AND s.fournisseur = ".$db->escape($val); + } + if ($key == 'category' && (int) $val > 0) { + $sql .= " AND s.rowid IN (SELECT fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") "; + } } dol_syslog("Function: getListOfThirdParties", LOG_DEBUG); @@ -721,20 +722,16 @@ function getListOfThirdParties($authentication, $filterthirdparty) $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $extrafieldsOptions = array(); $obj = $db->fetch_object($resql); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { if (isset($obj->{$key})) { $extrafieldsOptions['options_'.$key] = $obj->{$key}; } @@ -756,22 +753,19 @@ function getListOfThirdParties($authentication, $filterthirdparty) $i++; } - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'thirdparties'=>$arraythirdparties ); - } - else { + } else { $objectresp = array( 'result'=>array('result_code' => 'OK', 'result_label' => ''), 'thirdparties'=>$arraythirdparties @@ -796,7 +790,9 @@ function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') dol_syslog("Function: deleteThirdParty login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -804,56 +800,47 @@ function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { dol_syslog("Function: deleteThirdParty checkparam"); $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } dol_syslog("Function: deleteThirdParty 1"); - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->societe->lire && $fuser->rights->societe->supprimer) - { + if ($fuser->rights->societe->lire && $fuser->rights->societe->supprimer) { $thirdparty = new Societe($db); $result = $thirdparty->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { $db->begin(); $result = $thirdparty->delete($thirdparty->id, $fuser); - if ($result > 0) - { + if ($result > 0) { $db->commit(); $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>'')); - } - else { + } else { $db->rollback(); $error++; $errorcode = 'KO'; $errorlabel = $thirdparty->error; dol_syslog("Function: deleteThirdParty cant delete"); } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 6c4e472d1c7..cdd39ae24d7 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -20,7 +20,9 @@ * \brief File that is entry point to call Dolibarr WebServices */ -if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", '1'); +if (!defined("NOCSRFCHECK")) { + define("NOCSRFCHECK", '1'); +} require_once '../master.inc.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP @@ -36,8 +38,7 @@ dol_syslog("Call User webservices interfaces"); $langs->load("main"); // Enable and test if module web services is enabled -if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) -{ +if (empty($conf->global->MAIN_MODULE_WEBSERVICES)) { $langs->load("admin"); dol_syslog("Call Dolibarr webservices interfaces with module webservices disabled"); print $langs->trans("WarningModuleNotActive", 'WebServices').'.<br><br>'; @@ -193,19 +194,22 @@ $extrafield_array = null; if (is_array($extrafields) && count($extrafields) > 0) { $extrafield_array = array(); } -if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) -{ - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { +if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $type = $extrafields->attributes[$elementtype]['type'][$key]; - if ($type == 'date' || $type == 'datetime') {$type = 'xsd:dateTime'; } - else {$type = 'xsd:string'; } + if ($type == 'date' || $type == 'datetime') { + $type = 'xsd:dateTime'; + } else { + $type = 'xsd:string'; + } $extrafield_array['contact_options_'.$key] = array('name'=>'contact_options_'.$key, 'type'=>$type); } } -if (is_array($extrafield_array)) $thirdpartywithuser_fields = array_merge($thirdpartywithuser_fields, $extrafield_array); +if (is_array($extrafield_array)) { + $thirdpartywithuser_fields = array_merge($thirdpartywithuser_fields, $extrafield_array); +} $server->wsdl->addComplexType( @@ -312,7 +316,9 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') dol_syslog("Function: getUser login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -320,25 +326,21 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) - { + if (!$error && (($id && $ref) || ($id && $ref_ext) || ($ref && $ref_ext))) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); if ($fuser->rights->user->user->lire || ($fuser->rights->user->self->creer && $id && $id == $fuser->id) || ($fuser->rights->user->self->creer && $ref && $ref == $fuser->login) - || ($fuser->rights->user->self->creer && $ref_ext && $ref_ext == $fuser->ref_ext)) - { + || ($fuser->rights->user->self->creer && $ref_ext && $ref_ext == $fuser->ref_ext)) { $user = new User($db); $result = $user->fetch($id, $ref, $ref_ext); - if ($result > 0) - { + if ($result > 0) { // Create $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), @@ -371,20 +373,17 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') 'canvas' => $user->canvas ) ); - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -403,7 +402,9 @@ function getListOfGroups($authentication) dol_syslog("Function: getListOfGroups login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } // Init and check authentication $objectresp = array(); @@ -413,47 +414,39 @@ function getListOfGroups($authentication) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); // Check parameters - if (!$error) - { + if (!$error) { $sql = "SELECT g.rowid, g.nom as name, g.entity, g.datec, COUNT(DISTINCT ugu.fk_user) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; - if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) - { + if (!empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { $sql .= " WHERE g.entity IS NOT NULL"; - } - else { + } else { $sql .= " WHERE g.entity IN (0,".$conf->entity.")"; } $sql .= " GROUP BY g.rowid, g.nom, g.entity, g.datec"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); $arraygroups[] = array('id'=>$obj->rowid, 'name'=>$obj->name, 'datec'=>$obj->datec, 'nb'=>$obj->nb); $i++; } - } - else { + } else { $error++; $errorcode = $db->lasterrno(); $errorlabel = $db->lasterror(); } } - if ($error) - { + if ($error) { $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel), 'groups'=>$arraygroups ); - } - else { + } else { $objectresp = array( 'result'=>array('result_code' => 'OK', 'result_label' => ''), 'groups'=>$arraygroups @@ -477,7 +470,9 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) dol_syslog("Function: createUserFromThirdparty login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $objectresp = array(); $errorcode = ''; $errorlabel = ''; @@ -485,20 +480,19 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } - if (!$error && !$thirdpartywithuser) - { + if (!$error && !$thirdpartywithuser) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter thirdparty must be provided."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->societe->creer) - { + if ($fuser->rights->societe->creer) { $thirdparty = new Societe($db); // If a contact / company already exists with the email, return the corresponding socid @@ -510,16 +504,13 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $sql .= $db->plimit(1); $resql = $db->query($sql); - if ($resql) - { + if ($resql) { // If a company or contact is found with the same email we return an error $row = $db->fetch_object($resql); - if ($row) - { + if ($row) { $error++; $errorcode = 'ALREADY_EXIST'; $errorlabel = 'Object not create : company or contact exists '.$thirdpartywithuser['email']; - } - else { + } else { $db->begin(); /* * Company creation @@ -541,11 +532,9 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $sql .= " AND code='".$db->escape($thirdparty->country_code)."'"; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num = $db->num_rows($resql); - if ($num) - { + if ($num) { $obj = $db->fetch_object($resql); $thirdparty->country_id = $obj->rowid; } @@ -567,8 +556,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $socid_return = $thirdparty->create($fuser); - if ($socid_return > 0) - { + if ($socid_return > 0) { $thirdparty->fetch($socid_return); /* @@ -597,10 +585,8 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) - { + if (isset($extrafields->attributes[$elementtype]['label']) && is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) { + foreach ($extrafields->attributes[$elementtype]['label'] as $key => $label) { $key = 'contact_options_'.$key; $key = substr($key, 8); // Remove 'contact_' prefix $contact->array_options[$key] = $thirdpartywithuser[$key]; @@ -609,8 +595,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $contact_id = $contact->create($fuser); - if ($contact_id > 0) - { + if ($contact_id > 0) { /* * User creation * @@ -618,19 +603,17 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $edituser = new User($db); $id = $edituser->create_from_contact($contact, $thirdpartywithuser["login"]); - if ($id > 0) - { + if ($id > 0) { $edituser->setPassword($fuser, trim($thirdpartywithuser['password'])); - if ($thirdpartywithuser['group_id'] > 0) + if ($thirdpartywithuser['group_id'] > 0) { $edituser->SetInGroup($thirdpartywithuser['group_id'], $conf->entity); - } - else { + } + } else { $error++; $errorcode = 'NOT_CREATE'; $errorlabel = 'Object not create : '.$edituser->error; } - } - else { + } else { $error++; $errorcode = 'NOT_CREATE'; $errorlabel = 'Object not create : '.$contact->error; } @@ -656,8 +639,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) } } - if ($error) - { + if ($error) { $db->rollback(); $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel) @@ -682,7 +664,9 @@ function setUserPassword($authentication, $shortuser) dol_syslog("Function: setUserPassword login=".$authentication['login']); - if ($authentication['entity']) $conf->entity = $authentication['entity']; + if ($authentication['entity']) { + $conf->entity = $authentication['entity']; + } $objectresp = array(); $errorcode = ''; $errorlabel = ''; @@ -690,50 +674,43 @@ function setUserPassword($authentication, $shortuser) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->socid) $socid = $fuser->socid; + if ($fuser->socid) { + $socid = $fuser->socid; + } - if (!$error && !$shortuser) - { + if (!$error && !$shortuser) { $error++; $errorcode = 'BAD_PARAMETERS'; $errorlabel = "Parameter shortuser must be provided."; } - if (!$error) - { + if (!$error) { $fuser->getrights(); - if ($fuser->rights->user->user->password || $fuser->rights->user->self->password) - { + if ($fuser->rights->user->user->password || $fuser->rights->user->self->password) { $userstat = new User($db); $res = $userstat->fetch('', $shortuser['login']); - if ($res) - { + if ($res) { $res = $userstat->setPassword($userstat, $shortuser['password']); - if ($res) - { + if ($res) { $objectresp = array( 'result'=>array('result_code' => 'OK', 'result_label' => ''), ); - } - else { + } else { $error++; $errorcode = 'NOT_MODIFIED'; $errorlabel = 'Error when changing password'; } - } - else { + } else { $error++; $errorcode = 'NOT_FOUND'; $errorlabel = 'User not found'; } - } - else { + } else { $error++; $errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request'; } } - if ($error) - { + if ($error) { $objectresp = array( 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel) ); diff --git a/htdocs/website/class/index.html b/htdocs/website/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 966e0e8e4d8..ef50a1701d7 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -249,7 +249,9 @@ class Website extends CommonObject if (is_array($tmplangarray)) { dol_mkdir($conf->website->dir_output.'/'.$this->ref); foreach ($tmplangarray as $val) { - if (trim($val) == $this->lang) continue; + if (trim($val) == $this->lang) { + continue; + } dol_mkdir($conf->website->dir_output.'/'.$this->ref.'/'.trim($val)); } } @@ -530,7 +532,7 @@ class Website extends CommonObject $sql .= ' fk_user_modif = '.(!isset($this->fk_user_modif) ? $user->id : $this->fk_user_modif).','; $sql .= ' date_creation = '.(!isset($this->date_creation) || dol_strlen($this->date_creation) != 0 ? "'".$this->db->idate($this->date_creation)."'" : 'null').','; $sql .= ' tms = '.(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : "'".$this->db->idate(dol_now())."'"); - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -550,7 +552,9 @@ class Website extends CommonObject if (is_array($tmplangarray)) { dol_mkdir($conf->website->dir_output.'/'.$this->ref); foreach ($tmplangarray as $val) { - if (trim($val) == $this->lang) continue; + if (trim($val) == $this->lang) { + continue; + } dol_mkdir($conf->website->dir_output.'/'.$this->ref.'/'.trim($val)); } } @@ -603,7 +607,7 @@ class Website extends CommonObject if (!$error) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -613,8 +617,7 @@ class Website extends CommonObject } } - if (!$error && !empty($this->ref)) - { + if (!$error && !empty($this->ref)) { $pathofwebsite = DOL_DATA_ROOT.'/website/'.$this->ref; dol_delete_dir_recursive($pathofwebsite); @@ -655,8 +658,7 @@ class Website extends CommonObject $object = new self($this->db); // Check no site with ref exists - if ($object->fetch(0, $newref) > 0) - { + if ($object->fetch(0, $newref) > 0) { $this->error = 'ErrorNewRefIsAlreadyUsed'; return -1; } @@ -688,7 +690,9 @@ class Website extends CommonObject $object->fk_user_creat = $user->id; $object->position = ((int) $object->position) + 1; $object->status = self::STATUS_DRAFT; - if (empty($object->lang)) $object->lang = substr($langs->defaultlang, 0, 2); // Should not happen. Protection for corrupted site with no languages + if (empty($object->lang)) { + $object->lang = substr($langs->defaultlang, 0, 2); // Should not happen. Protection for corrupted site with no languages + } // Create clone $object->context['createfromclone'] = 'createfromclone'; @@ -700,15 +704,13 @@ class Website extends CommonObject dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); } - if (!$error) - { + if (!$error) { dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0, null, 2); // Check symlink to medias and restore it if ko $pathtomedias = DOL_DATA_ROOT.'/medias'; // Target $pathtomediasinwebsite = $pathofwebsitenew.'/medias'; // Source / Link name - if (!is_link(dol_osencode($pathtomediasinwebsite))) - { + if (!is_link(dol_osencode($pathtomediasinwebsite))) { dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); @@ -728,8 +730,7 @@ class Website extends CommonObject // Duplicate pages $objectpages = new WebsitePage($this->db); $listofpages = $objectpages->fetchAll($fromid); - foreach ($listofpages as $pageid => $objectpageold) - { + foreach ($listofpages as $pageid => $objectpageold) { // Delete old file $filetplold = $pathofwebsitenew.'/page'.$pageid.'.tpl.php'; dol_delete_file($filetplold); @@ -738,43 +739,41 @@ class Website extends CommonObject $objectpagenew = $objectpageold->createFromClone($user, $pageid, $objectpageold->pageurl, '', 0, $object->id, 1); //print $pageid.' = '.$objectpageold->pageurl.' -> '.$objectpagenew->id.' = '.$objectpagenew->pageurl.'<br>'; - if (is_object($objectpagenew) && $objectpagenew->pageurl) - { + if (is_object($objectpagenew) && $objectpagenew->pageurl) { $filealias = $pathofwebsitenew.'/'.$objectpagenew->pageurl.'.php'; $filetplnew = $pathofwebsitenew.'/page'.$objectpagenew->id.'.tpl.php'; // Save page alias $result = dolSavePageAlias($filealias, $object, $objectpagenew); - if (!$result) setEventMessages('Failed to write file '.$filealias, null, 'errors'); + if (!$result) { + setEventMessages('Failed to write file '.$filealias, null, 'errors'); + } $result = dolSavePageContent($filetplnew, $object, $objectpagenew); - if (!$result) setEventMessages('Failed to write file '.$filetplnew, null, 'errors'); + if (!$result) { + setEventMessages('Failed to write file '.$filetplnew, null, 'errors'); + } - if ($pageid == $oldidforhome) - { + if ($pageid == $oldidforhome) { $newidforhome = $objectpagenew->id; } - } - else { + } else { setEventMessages($objectpageold->error, $objectpageold->errors, 'errors'); $error++; } } } - if (!$error) - { + if (!$error) { // Restore id of home page $object->fk_default_home = $newidforhome; $res = $object->update($user); - if (!($res > 0)) - { + if (!($res > 0)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } - if (!$error) - { + if (!$error) { $filetpl = $pathofwebsitenew.'/page'.$newidforhome.'.tpl.php'; $filewrapper = $pathofwebsitenew.'/wrapper.php'; @@ -831,10 +830,11 @@ class Website extends CommonObject $linkstart = $linkend = ''; - if ($withpicto) - { + if ($withpicto) { $result .= ($linkstart.img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? '' : 'class="classfortooltip"')).$linkend); - if ($withpicto != 2) $result .= ' '; + if ($withpicto != 2) { + $result .= ' '; + } } $result .= $linkstart.$this->ref.$linkend; return $result; @@ -864,8 +864,7 @@ class Website extends CommonObject // phpcs:enable global $langs; - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled'); @@ -875,7 +874,9 @@ class Website extends CommonObject } $statusType = 'status5'; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -919,16 +920,14 @@ class Website extends CommonObject $website = $this; - if (empty($website->id) || empty($website->ref)) - { + if (empty($website->id) || empty($website->ref)) { setEventMessages("Website id or ref is not defined", null, 'errors'); return ''; } dol_syslog("Create temp dir ".$conf->website->dir_temp); dol_mkdir($conf->website->dir_temp); - if (!is_writable($conf->website->dir_temp)) - { + if (!is_writable($conf->website->dir_temp)) { setEventMessages("Temporary dir ".$conf->website->dir_temp." is not writable", null, 'errors'); return ''; } @@ -938,8 +937,7 @@ class Website extends CommonObject dol_syslog("Clear temp dir ".$destdir); $count = 0; $countreallydeleted = 0; $counttodelete = dol_delete_dir_recursive($destdir, $count, 1, 0, $countreallydeleted); - if ($counttodelete != $countreallydeleted) - { + if ($counttodelete != $countreallydeleted) { setEventMessages("Failed to clean temp directory ".$destdir, null, 'errors'); return ''; } @@ -997,8 +995,7 @@ class Website extends CommonObject // Build sql file $filesql = $conf->website->dir_temp.'/'.$website->ref.'/website_pages.sql'; $fp = fopen($filesql, "w"); - if (empty($fp)) - { + if (empty($fp)) { setEventMessages("Failed to create file ".$filesql, null, 'errors'); return ''; } @@ -1008,20 +1005,16 @@ class Website extends CommonObject // Assign ->newid and ->newfk_page $i = 1; - foreach ($listofpages as $pageid => $objectpageold) - { + foreach ($listofpages as $pageid => $objectpageold) { $objectpageold->newid = $i; $i++; } $i = 1; - foreach ($listofpages as $pageid => $objectpageold) - { + foreach ($listofpages as $pageid => $objectpageold) { // Search newid $newfk_page = 0; - foreach ($listofpages as $pageid2 => $objectpageold2) - { - if ($pageid2 == $objectpageold->fk_page) - { + foreach ($listofpages as $pageid2 => $objectpageold2) { + if ($pageid2 == $objectpageold->fk_page) { $newfk_page = $objectpageold2->newid; break; } @@ -1029,8 +1022,7 @@ class Website extends CommonObject $objectpageold->newfk_page = $newfk_page; $i++; } - foreach ($listofpages as $pageid => $objectpageold) - { + foreach ($listofpages as $pageid => $objectpageold) { $allaliases = $objectpageold->pageurl; $allaliases .= ($objectpageold->aliasalt ? ','.$objectpageold->aliasalt : ''); @@ -1091,8 +1083,7 @@ class Website extends CommonObject // Add line to update home page id during import //var_dump($this->fk_default_home.' - '.$objectpageold->id.' - '.$objectpageold->newid);exit; - if ($this->fk_default_home > 0 && ($objectpageold->id == $this->fk_default_home) && ($objectpageold->newid > 0)) // This is the record with home page - { + if ($this->fk_default_home > 0 && ($objectpageold->id == $this->fk_default_home) && ($objectpageold->newid > 0)) { // This is the record with home page // Warning: We must keep llx_ here. It is a generic SQL. $line = "UPDATE llx_website SET fk_default_home = ".($objectpageold->newid > 0 ? $this->db->escape($objectpageold->newid)."__+MAX_llx_website_page__" : "null")." WHERE rowid = __WEBSITE_ID__;"; $line .= "\n"; @@ -1100,9 +1091,16 @@ class Website extends CommonObject } } + $line .= "\n-- For Dolibarr v14+ --\n"; + $line .= "UPDATE llx_website SET fk_default_lang = '".$this->db->escape($this->fk_default_lang)."' WHERE rowid = __WEBSITE_ID__;\n"; + $line .= "UPDATE llx_website SET otherlang = '".$this->db->escape($this->otherlang)."' WHERE rowid = __WEBSITE_ID__;\n"; + $line .= "\n"; + fputs($fp, $line); + fclose($fp); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filesql, octdec($conf->global->MAIN_UMASK)); + } // Build zip file $filedir = $conf->website->dir_temp.'/'.$website->ref.'/.'; @@ -1112,11 +1110,9 @@ class Website extends CommonObject dol_delete_file($fileglob, 0); $result = dol_compress_file($filedir, $filename, 'zip'); - if ($result > 0) - { + if ($result > 0) { return $filename; - } - else { + } else { global $errormsg; $this->error = $errormsg; return ''; @@ -1137,8 +1133,7 @@ class Website extends CommonObject $error = 0; $object = $this; - if (empty($object->ref)) - { + if (empty($object->ref)) { $this->error = 'Function importWebSite called on object not loaded (object->ref is empty)'; return -1; } @@ -1147,16 +1142,14 @@ class Website extends CommonObject dol_mkdir($conf->website->dir_temp.'/'.$object->ref); $filename = basename($pathtofile); - if (!preg_match('/^website_(.*)-(.*)$/', $filename, $reg)) - { + if (!preg_match('/^website_(.*)-(.*)$/', $filename, $reg)) { $this->errors[] = 'Bad format for filename '.$filename.'. Must be website_XXX-VERSION.'; return -1; } $result = dol_uncompress($pathtofile, $conf->website->dir_temp.'/'.$object->ref); - if (!empty($result['error'])) - { + if (!empty($result['error'])) { $this->errors[] = 'Failed to unzip file '.$pathtofile.'.'; return -1; } @@ -1182,8 +1175,7 @@ class Website extends CommonObject // Now generate the master.inc.php page $filemaster = $conf->website->dir_output.'/'.$object->ref.'/master.inc.php'; $result = dolSaveMasterFile($filemaster); - if (!$result) - { + if (!$result) { $this->errors[] = 'Failed to write file '.$filemaster; $error++; } @@ -1200,16 +1192,14 @@ class Website extends CommonObject // Search the $maxrowid because we need it later $sqlgetrowid = 'SELECT MAX(rowid) as max from '.MAIN_DB_PREFIX.'website_page'; $resql = $this->db->query($sqlgetrowid); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $maxrowid = $obj->max; } // Load sql record $runsql = run_sql($sqlfile, 1, '', 0, '', 'none', 0, 1); // The maxrowid of table is searched into this function two - if ($runsql <= 0) - { + if ($runsql <= 0) { $this->errors[] = 'Failed to load sql file '.$sqlfile; $error++; } @@ -1218,16 +1208,13 @@ class Website extends CommonObject // Make replacement of IDs $fp = fopen($sqlfile, "r"); - if ($fp) - { - while (!feof($fp)) - { + if ($fp) { + while (!feof($fp)) { $reg = array(); // Warning fgets with second parameter that is null or 0 hang. $buf = fgets($fp, 65000); - if (preg_match('/^-- Page ID (\d+)\s[^\s]+\s(\d+).*Aliases\s(.*)\s--;/i', $buf, $reg)) - { + if (preg_match('/^-- Page ID (\d+)\s[^\s]+\s(\d+).*Aliases\s(.*)\s--;/i', $buf, $reg)) { $oldid = $reg[1]; $newid = ($reg[2] + $maxrowid); $aliasesarray = explode(',', $reg[3]); @@ -1247,12 +1234,9 @@ class Website extends CommonObject } // Regenerate alternative aliases pages - if (is_array($aliasesarray)) - { - foreach ($aliasesarray as $aliasshortcuttocreate) - { - if (trim($aliasshortcuttocreate)) - { + if (is_array($aliasesarray)) { + foreach ($aliasesarray as $aliasshortcuttocreate) { + if (trim($aliasshortcuttocreate)) { $filealias = $conf->website->dir_output.'/'.$object->ref.'/'.trim($aliasshortcuttocreate).'.php'; $result = dolSavePageAlias($filealias, $object, $objectpagestatic); if (!$result) { @@ -1284,12 +1268,10 @@ class Website extends CommonObject $pathofwebsite = $conf->website->dir_output.'/'.$object->ref; dolSaveIndexPage($pathofwebsite, $pathofwebsite.'/index.php', $pathofwebsite.'/page'.$object->fk_default_home.'.tpl.php', $pathofwebsite.'/wrapper.php'); - if ($error) - { + if ($error) { $this->db->rollback(); return -1; - } - else { + } else { $this->db->commit(); return $object->id; } @@ -1308,15 +1290,14 @@ class Website extends CommonObject $error = 0; $object = $this; - if (empty($object->ref)) - { + if (empty($object->ref)) { $this->error = 'Function rebuildWebSiteFiles called on object not loaded (object->ref is empty)'; return -1; } $objectpagestatic = new WebsitePage($this->db); - $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page WHERE fk_website = '.$this->id; + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page WHERE fk_website = '.((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { @@ -1396,7 +1377,9 @@ class Website extends CommonObject { global $websitepagefile, $website; - if (!is_object($weblangs)) return 'ERROR componentSelectLang called with parameter $weblangs not defined'; + if (!is_object($weblangs)) { + return 'ERROR componentSelectLang called with parameter $weblangs not defined'; + } $arrayofspecialmainlanguages = array( 'en'=>'en_US', @@ -1429,51 +1412,55 @@ class Website extends CommonObject $tmppage = new WebsitePage($this->db); $pageid = 0; - if (!empty($websitepagefile)) - { + if (!empty($websitepagefile)) { $websitepagefileshort = basename($websitepagefile); - if ($websitepagefileshort == 'index.php') $pageid = $website->fk_default_home; - else $pageid = str_replace(array('.tpl.php', 'page'), array('', ''), $websitepagefileshort); - if ($pageid > 0) - { + if ($websitepagefileshort == 'index.php') { + $pageid = $website->fk_default_home; + } else { + $pageid = str_replace(array('.tpl.php', 'page'), array('', ''), $websitepagefileshort); + } + if ($pageid > 0) { $tmppage->fetch($pageid); } } // Fill $languagecodes array with existing translation, nothing if none - if (!is_array($languagecodes) && $pageid > 0) - { + if (!is_array($languagecodes) && $pageid > 0) { $languagecodes = array(); $sql = "SELECT wp.rowid, wp.lang, wp.pageurl, wp.fk_page"; $sql .= " FROM ".MAIN_DB_PREFIX."website_page as wp"; - $sql .= " WHERE wp.fk_website = ".$website->id; - $sql .= " AND (wp.fk_page = ".$pageid." OR wp.rowid = ".$pageid; - if ($tmppage->fk_page > 0) $sql .= " OR wp.fk_page = ".$tmppage->fk_page." OR wp.rowid = ".$tmppage->fk_page; + $sql .= " WHERE wp.fk_website = ".((int) $website->id); + $sql .= " AND (wp.fk_page = ".((int) $pageid)." OR wp.rowid = ".((int) $pageid); + if ($tmppage->fk_page > 0) { + $sql .= " OR wp.fk_page = ".((int) $tmppage->fk_page)." OR wp.rowid = ".((int) $tmppage->fk_page); + } $sql .= ")"; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $newlang = $obj->lang; - if ($obj->rowid == $pageid) $newlang = $obj->lang; - if (!in_array($newlang, $languagecodes)) $languagecodes[] = $newlang; + if ($obj->rowid == $pageid) { + $newlang = $obj->lang; + } + if (!in_array($newlang, $languagecodes)) { + $languagecodes[] = $newlang; + } } } } // Now $languagecodes is always an array. Example array('en', 'fr', 'es'); $languagecodeselected = substr($weblangs->defaultlang, 0, 2); // Because we must init with a value, but real value is the lang of main parent container - if (!empty($websitepagefile)) - { + if (!empty($websitepagefile)) { $pageid = str_replace(array('.tpl.php', 'page'), array('', ''), basename($websitepagefile)); - if ($pageid > 0) - { + if ($pageid > 0) { $pagelang = substr($tmppage->lang, 0, 2); $languagecodeselected = substr($pagelang, 0, 2); - if (!in_array($pagelang, $languagecodes)) $languagecodes[] = $pagelang; // We add language code of page into combo list + if (!in_array($pagelang, $languagecodes)) { + $languagecodes[] = $pagelang; // We add language code of page into combo list + } } } @@ -1484,7 +1471,9 @@ class Website extends CommonObject $url = preg_replace('/(\?|&)l=([a-zA-Z_]*)/', '', $url); // We remove param l from url //$url = preg_replace('/(\?|&)lang=([a-zA-Z_]*)/', '', $url); // We remove param lang from url $url .= (preg_match('/\?/', $url) ? '&' : '?').'l='; - if (!preg_match('/^\//', $url)) $url = '/'.$url; + if (!preg_match('/^\//', $url)) { + $url = '/'.$url; + } $HEIGHTOPTION = 40; $MAXHEIGHT = 4 * $HEIGHTOPTION; @@ -1514,8 +1503,7 @@ class Website extends CommonObject $out .= '</style>'; $out .= '<ul class="componentSelectLang'.$htmlname.($morecss ? ' '.$morecss : '').'">'; - if ($languagecodeselected) - { + if ($languagecodeselected) { // Convert $languagecodeselected into a long language code if (strlen($languagecodeselected) == 2) { $languagecodeselected = (empty($arrayofspecialmainlanguages[$languagecodeselected]) ? $languagecodeselected.'_'.strtoupper($languagecodeselected) : $arrayofspecialmainlanguages[$languagecodeselected]); @@ -1523,28 +1511,34 @@ class Website extends CommonObject $countrycode = strtolower(substr($languagecodeselected, -2)); $label = $weblangs->trans("Language_".$languagecodeselected); - if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label); + if ($countrycode == 'us') { + $label = preg_replace('/\s*\(.*\)/', '', $label); + } $out .= '<a href="'.$url.substr($languagecodeselected, 0, 2).'"><li><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>'; $out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />'; $out .= '</li></a>'; } $i = 0; - if (is_array($languagecodes)) - { - foreach ($languagecodes as $languagecode) - { + if (is_array($languagecodes)) { + foreach ($languagecodes as $languagecode) { // Convert $languagecode into a long language code if (strlen($languagecode) == 2) { $languagecode = (empty($arrayofspecialmainlanguages[$languagecode]) ? $languagecode.'_'.strtoupper($languagecode) : $arrayofspecialmainlanguages[$languagecode]); } - if ($languagecode == $languagecodeselected) continue; // Already output + if ($languagecode == $languagecodeselected) { + continue; // Already output + } $countrycode = strtolower(substr($languagecode, -2)); $label = $weblangs->trans("Language_".$languagecode); - if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label); + if ($countrycode == 'us') { + $label = preg_replace('/\s*\(.*\)/', '', $label); + } $out .= '<a href="'.$url.substr($languagecode, 0, 2).'"><li><img height="12px" src="/medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/><span class="websitecomponentlilang">'.$label.'</span>'; - if (empty($i) && empty($languagecodeselected)) $out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />'; + if (empty($i) && empty($languagecodeselected)) { + $out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />'; + } $out .= '</li></a>'; $i++; } diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index bacc4664791..f22a5200148 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -106,9 +106,9 @@ class WebsitePage extends CommonObject */ public $author_alias; - /** - * @var string path of external object - */ + /** + * @var string path of external object + */ public $object_type; /** @@ -229,7 +229,9 @@ class WebsitePage extends CommonObject { $this->description = dol_trunc($this->description, 255, 'right', 'utf-8', 1); $this->keywords = dol_trunc($this->keywords, 255, 'right', 'utf-8', 1); - if ($this->aliasalt) $this->aliasalt = ','.preg_replace('/,+$/', '', preg_replace('/^,+/', '', $this->aliasalt)).','; // content in database must be ',xxx,...,yyy,' + if ($this->aliasalt) { + $this->aliasalt = ','.preg_replace('/,+$/', '', preg_replace('/^,+/', '', $this->aliasalt)).','; // content in database must be ',xxx,...,yyy,' + } // Remove spaces and be sure we have main language only $this->lang = preg_replace('/[_-].*$/', '', trim($this->lang)); // en_US or en-US -> en @@ -281,12 +283,12 @@ class WebsitePage extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; //$sql .= ' WHERE entity IN ('.getEntity('website').')'; // entity is on website level $sql .= ' WHERE 1 = 1'; - if ($id > 0) - { - $sql .= ' AND t.rowid = '.$id; - } - else { - if ($id < 0) $sql .= ' AND t.rowid <> '.abs($id); + if ($id > 0) { + $sql .= ' AND t.rowid = '.((int) $id); + } else { + if ($id < 0) { + $sql .= ' AND t.rowid <> '.abs($id); + } if (null !== $website_id) { $sql .= " AND t.fk_website = '".$this->db->escape($website_id)."'"; if ($page) { @@ -295,12 +297,18 @@ class WebsitePage extends CommonObject $tmppage = explode('/', $page); if (!empty($tmppage[1])) { $pagetouse = $tmppage[1]; - if (strlen($tmppage[0])) $langtouse = $tmppage[0]; + if (strlen($tmppage[0])) { + $langtouse = $tmppage[0]; + } } $sql .= " AND t.pageurl = '".$this->db->escape($pagetouse)."'"; - if ($langtouse) $sql .= " AND t.lang = '".$this->db->escape($langtouse)."'"; + if ($langtouse) { + $sql .= " AND t.lang = '".$this->db->escape($langtouse)."'"; + } + } + if ($aliasalt) { + $sql .= " AND (t.aliasalt LIKE '%,".$this->db->escape($aliasalt).",%' OR t.aliasalt LIKE '%, ".$this->db->escape($aliasalt).",%')"; } - if ($aliasalt) $sql .= " AND (t.aliasalt LIKE '%,".$this->db->escape($aliasalt).",%' OR t.aliasalt LIKE '%, ".$this->db->escape($aliasalt).",%')"; } } $sql .= $this->db->plimit(1); @@ -399,7 +407,7 @@ class WebsitePage extends CommonObject $sql .= " t.object_type,"; $sql .= " t.fk_object"; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.fk_website = '.$websiteid; + $sql .= ' WHERE t.fk_website = '.((int) $websiteid); // Manage filter (same than into countAll) $sqlwhere = array(); if (count($filter) > 0) { @@ -418,8 +426,10 @@ class WebsitePage extends CommonObject } $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; } - $stringtouse = $key." IN (".join(',', $listoflang).")"; - if ($foundnull) $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + $stringtouse = $key." IN (".$this->db->sanitize(join(',', $listoflang), 1).")"; + if ($foundnull) { + $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + } $sqlwhere[] = $stringtouse; } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; @@ -441,8 +451,7 @@ class WebsitePage extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $record = new self($this->db); $record->id = $obj->rowid; @@ -500,7 +509,7 @@ class WebsitePage extends CommonObject $sql = 'SELECT COUNT(t.rowid) as nb'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.fk_website = '.$websiteid; + $sql .= ' WHERE t.fk_website = '.((int) $websiteid); // Manage filter (same than into fetchAll) $sqlwhere = array(); if (count($filter) > 0) { @@ -519,8 +528,10 @@ class WebsitePage extends CommonObject } $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; } - $stringtouse = $key." IN (".join(',', $listoflang).")"; - if ($foundnull) $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + $stringtouse = $key." IN (".$this->db->sanitize(join(',', $listoflang)).")"; + if ($foundnull) { + $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + } $sqlwhere[] = $stringtouse; } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; @@ -561,7 +572,9 @@ class WebsitePage extends CommonObject { $this->description = dol_trunc($this->description, 255, 'right', 'utf-8', 1); $this->keywords = dol_trunc($this->keywords, 255, 'right', 'utf-8', 1); - if ($this->aliasalt) $this->aliasalt = ','.preg_replace('/,+$/', '', preg_replace('/^,+/', '', $this->aliasalt)).','; // content in database must be ',xxx,...,yyy,' + if ($this->aliasalt) { + $this->aliasalt = ','.preg_replace('/,+$/', '', preg_replace('/^,+/', '', $this->aliasalt)).','; // content in database must be ',xxx,...,yyy,' + } // Remove spaces and be sure we have main language only $this->lang = preg_replace('/[_-].*$/', '', trim($this->lang)); // en_US or en-US -> en @@ -595,8 +608,7 @@ class WebsitePage extends CommonObject // Delete all child tables if (!$error) { - foreach ($this->childtablesoncascade as $table) - { + foreach ($this->childtablesoncascade as $table) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$table; $sql .= " WHERE fk_website_page = ".(int) $this->id; @@ -611,19 +623,16 @@ class WebsitePage extends CommonObject if (!$error) { $result = $this->deleteCommon($user, $trigger); - if ($result <= 0) - { + if ($result <= 0) { $error++; } } - if (!$error) - { + if (!$error) { $websiteobj = new Website($this->db); $result = $websiteobj->fetch($this->fk_website); - if ($result > 0) - { + if ($result > 0) { global $dolibarr_main_data_root; $pathofwebsite = $dolibarr_main_data_root.'/website/'.$websiteobj->ref; @@ -696,10 +705,17 @@ class WebsitePage extends CommonObject $object->date_creation = $now; $object->title = ($newtitle == '1' ? $object->title : ($newtitle ? $newtitle : $object->title)); $object->description = $object->title; - if (!empty($newlang)) $object->lang = $newlang; - if ($istranslation) $object->fk_page = $fromid; - else $object->fk_page = 0; - if (!empty($newwebsite)) $object->fk_website = $newwebsite; + if (!empty($newlang)) { + $object->lang = $newlang; + } + if ($istranslation) { + $object->fk_page = $fromid; + } else { + $object->fk_page = 0; + } + if (!empty($newwebsite)) { + $object->fk_website = $newwebsite; + } $object->import_key = ''; // Create clone @@ -755,17 +771,16 @@ class WebsitePage extends CommonObject $url = DOL_URL_ROOT.'/website/index.php?websiteid='.$this->fk_website.'&pageid='.$this->id; $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + 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.'"' : ''); } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = '<a href="'.$url.'"'; $linkstart .= $linkclose.'>'; @@ -774,8 +789,12 @@ class WebsitePage extends CommonObject //$linkstart = $linkend = ''; $result .= $linkstart; - if ($withpicto) $result .= img_picto(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; + if ($withpicto) { + $result .= img_picto(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($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; @@ -805,8 +824,7 @@ class WebsitePage extends CommonObject // phpcs:enable global $langs; - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; //$langs->load("mymodule"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled'); @@ -816,7 +834,9 @@ class WebsitePage extends CommonObject } $statusType = 'status5'; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 03ce856c2a1..547f6ac217a 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -34,17 +34,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/website2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formwebsite.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $langs->loadLangs(array("admin", "other", "website", "errors")); -if (!$user->rights->website->read) accessforbidden(); +if (!$user->rights->website->read) { + accessforbidden(); +} $conf->dol_hide_leftmenu = 1; // Force hide of left menu. @@ -70,38 +74,78 @@ $section_dir = GETPOST('section_dir', 'alpha'); $file_manager = GETPOST('file_manager', 'alpha'); $replacesite = GETPOST('replacesite', 'alpha'); -if (GETPOST('deletesite', 'alpha')) { $action = 'deletesite'; } -if (GETPOST('delete', 'alpha')) { $action = 'delete'; } -if (GETPOST('preview', 'alpha')) $action = 'preview'; -if (GETPOST('createsite', 'alpha')) { $action = 'createsite'; } -if (GETPOST('createcontainer', 'alpha')) { $action = 'createcontainer'; } -if (GETPOST('editcss', 'alpha')) { $action = 'editcss'; } -if (GETPOST('editmenu', 'alpha')) { $action = 'editmenu'; } -if (GETPOST('setashome', 'alpha')) { $action = 'setashome'; } -if (GETPOST('editmeta', 'alpha')) { $action = 'editmeta'; } -if (GETPOST('editsource', 'alpha')) { $action = 'editsource'; } -if (GETPOST('editcontent', 'alpha')) { $action = 'editcontent'; } -if (GETPOST('exportsite', 'alpha')) { $action = 'exportsite'; } -if (GETPOST('importsite', 'alpha')) { $action = 'importsite'; } -if (GETPOST('createfromclone', 'alpha')) { $action = 'createfromclone'; } -if (GETPOST('createpagefromclone', 'alpha')) { $action = 'createpagefromclone'; } -if (empty($action) && $file_manager) $action = 'file_manager'; -if (empty($action) && $replacesite) $action = 'replacesite'; -if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x')) $pageid = 0; +if (GETPOST('deletesite', 'alpha')) { + $action = 'deletesite'; +} +if (GETPOST('delete', 'alpha')) { + $action = 'delete'; +} +if (GETPOST('preview', 'alpha')) { + $action = 'preview'; +} +if (GETPOST('createsite', 'alpha')) { + $action = 'createsite'; +} +if (GETPOST('createcontainer', 'alpha')) { + $action = 'createcontainer'; +} +if (GETPOST('editcss', 'alpha')) { + $action = 'editcss'; +} +if (GETPOST('editmenu', 'alpha')) { + $action = 'editmenu'; +} +if (GETPOST('setashome', 'alpha')) { + $action = 'setashome'; +} +if (GETPOST('editmeta', 'alpha')) { + $action = 'editmeta'; +} +if (GETPOST('editsource', 'alpha')) { + $action = 'editsource'; +} +if (GETPOST('editcontent', 'alpha')) { + $action = 'editcontent'; +} +if (GETPOST('exportsite', 'alpha')) { + $action = 'exportsite'; +} +if (GETPOST('importsite', 'alpha')) { + $action = 'importsite'; +} +if (GETPOST('createfromclone', 'alpha')) { + $action = 'createfromclone'; +} +if (GETPOST('createpagefromclone', 'alpha')) { + $action = 'createpagefromclone'; +} +if (empty($action) && $file_manager) { + $action = 'file_manager'; +} +if (empty($action) && $replacesite) { + $action = 'replacesite'; +} +if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x')) { + $pageid = 0; +} // Load variable for pagination $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 (! $sortfield) $sortfield='name'; //if (! $sortorder) $sortorder='ASC'; -if (empty($action)) $action = 'preview'; +if (empty($action)) { + $action = 'preview'; +} $object = new Website($db); $objectpage = new WebsitePage($db); @@ -109,16 +153,13 @@ $objectpage = new WebsitePage($db); $object->fetchAll('ASC', 'position'); // Init $object->records with list of websites // If website not defined, we take first found -if (!($websiteid > 0) && empty($websitekey) && $action != 'createsite') -{ - foreach ($object->records as $key => $valwebsite) - { +if (!($websiteid > 0) && empty($websitekey) && $action != 'createsite') { + foreach ($object->records as $key => $valwebsite) { $websitekey = $valwebsite->ref; break; } } -if ($websiteid > 0 || $websitekey) -{ +if ($websiteid > 0 || $websitekey) { $res = $object->fetch($websiteid, $websitekey); $websitekey = $object->ref; } @@ -126,38 +167,33 @@ if ($websiteid > 0 || $websitekey) $website = $object; // Check pageid received as parameter -if ($pageid < 0) $pageid = 0; -if (($pageid > 0 || $pageref) && $action != 'addcontainer') -{ +if ($pageid < 0) { + $pageid = 0; +} +if (($pageid > 0 || $pageref) && $action != 'addcontainer') { $res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), $pageref); - if ($res == 0) - { + if ($res == 0) { $res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), null, $pageref); } // Check if pageid is inside the new website, if not we reset param pageid - if ($res >= 0 && $object->id > 0) - { - if ($objectpage->fk_website != $object->id) // We have a bad page that does not belong to web site - { - if ($object->fk_default_home > 0) - { + if ($res >= 0 && $object->id > 0) { + if ($objectpage->fk_website != $object->id) { // We have a bad page that does not belong to web site + if ($object->fk_default_home > 0) { $res = $objectpage->fetch($object->fk_default_home, $object->id, ''); // We search first page of web site - if ($res > 0) $pageid = $object->fk_default_home; - } - else { - $res = $objectpage->fetch(0, $object->id, ''); // We search first page of web site - if ($res == 0) // Page was not found, we reset it - { - $objectpage = new WebsitePage($db); + if ($res > 0) { + $pageid = $object->fk_default_home; } - else // We found a page, we set pageid to it. + } else { + $res = $objectpage->fetch(0, $object->id, ''); // We search first page of web site + if ($res == 0) { // Page was not found, we reset it + $objectpage = new WebsitePage($db); + } else // We found a page, we set pageid to it. { $pageid = $objectpage->id; } } - } - else // We have a valid page. We force pageid for the case we got the page with a fetch on ref. + } else // We have a valid page. We force pageid for the case we got the page with a fetch on ref. { $pageid = $objectpage->id; } @@ -165,20 +201,23 @@ if (($pageid > 0 || $pageref) && $action != 'addcontainer') } // Define pageid if pageid and pageref not received as parameter or was wrong -if (empty($pageid) && empty($pageref) && $object->id > 0 && $action != 'createcontainer') -{ +if (empty($pageid) && empty($pageref) && $object->id > 0 && $action != 'createcontainer') { $pageid = $object->fk_default_home; - if (empty($pageid)) - { + if (empty($pageid)) { $array = $objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl'); - if (!is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors); + if (!is_array($array) && $array < 0) { + dol_print_error('', $objectpage->error, $objectpage->errors); + } $atleastonepage = (is_array($array) && count($array) > 0); $firstpageid = 0; $homepageid = 0; - foreach ($array as $key => $valpage) - { - if (empty($firstpageid)) $firstpageid = $valpage->id; - if ($object->fk_default_home && $key == $object->fk_default_home) $homepageid = $valpage->id; + foreach ($array as $key => $valpage) { + if (empty($firstpageid)) { + $firstpageid = $valpage->id; + } + if ($object->fk_default_home && $key == $object->fk_default_home) { + $homepageid = $valpage->id; + } } $pageid = ($homepageid ? $homepageid : $firstpageid); // We choose home page and if not defined yet, we take first page } @@ -267,9 +306,15 @@ $manifestjsoncontentdefault .= '{ $listofpages = array(); $algo = ''; -if (GETPOST('optionmeta')) $algo .= 'meta'; -if (GETPOST('optioncontent')) $algo .= 'content'; -if (GETPOST('optionsitefiles')) $algo .= 'sitefiles'; +if (GETPOST('optionmeta')) { + $algo .= 'meta'; +} +if (GETPOST('optioncontent')) { + $algo .= 'content'; +} +if (GETPOST('optionsitefiles')) { + $algo .= 'sitefiles'; +} if (empty($sortfield)) { if ($action == 'file_manager') { @@ -301,52 +346,62 @@ $permissiontodelete = $user->rights->website->delete; */ // Protections -if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x') || GETPOST('refreshpage') || GETPOST('refreshpage_x') || GETPOST('refreshpage.x')) -{ +if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x') || GETPOST('refreshpage') || GETPOST('refreshpage_x') || GETPOST('refreshpage.x')) { $action = 'preview'; // To avoid to make an action on another page or another site when we click on button to select another site or page. } -if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETPOST('refreshsite_x', 'alpha')) // If we change the site, we reset the pageid and cancel addsite action. -{ - if ($action == 'addsite') $action = 'preview'; - if ($action == 'updatesource') $action = 'preview'; +if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETPOST('refreshsite_x', 'alpha')) { // If we change the site, we reset the pageid and cancel addsite action. + if ($action == 'addsite') { + $action = 'preview'; + } + if ($action == 'updatesource') { + $action = 'preview'; + } $pageid = $object->fk_default_home; - if (empty($pageid)) - { + if (empty($pageid)) { $array = $objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl'); - if (!is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors); + if (!is_array($array) && $array < 0) { + dol_print_error('', $objectpage->error, $objectpage->errors); + } $atleastonepage = (is_array($array) && count($array) > 0); $firstpageid = 0; $homepageid = 0; - foreach ($array as $key => $valpage) - { - if (empty($firstpageid)) $firstpageid = $valpage->id; - if ($object->fk_default_home && $key == $object->fk_default_home) $homepageid = $valpage->id; + foreach ($array as $key => $valpage) { + if (empty($firstpageid)) { + $firstpageid = $valpage->id; + } + if ($object->fk_default_home && $key == $object->fk_default_home) { + $homepageid = $valpage->id; + } } $pageid = ($homepageid ? $homepageid : $firstpageid); // We choose home page and if not defined yet, we take first page } } -if (GETPOST('refreshpage', 'alpha') && !in_array($action, array('updatecss'))) $action = 'preview'; +if (GETPOST('refreshpage', 'alpha') && !in_array($action, array('updatecss'))) { + $action = 'preview'; +} if ($cancel && $action == 'renamefile') { $cancel = ''; } // Cancel -if ($cancel) -{ +if ($cancel) { $action = 'preview'; - if ($backtopage) - { + if ($backtopage) { header("Location: ".$backtopage); exit; } } $savbacktopage = $backtopage; -$backtopage = $_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid.(GETPOST('section_dir', 'alpha') ? '&section_dir='.urlencode(GETPOST('section_dir', 'alpha')) : ''); // used after a confirm_deletefile into actions_linkedfiles.inc.php -if ($sortfield) $backtopage .= '&sortfield='.$sortfield; -if ($sortorder) $backtopage .= '&sortorder='.$sortorder; +$backtopage = $_SERVER["PHP_SELF"].'?file_manager=1&website='.urlencode($websitekey).'&pageid='.urlencode($pageid).(GETPOST('section_dir', 'alpha') ? '&section_dir='.urlencode(GETPOST('section_dir', 'alpha')) : ''); // used after a confirm_deletefile into actions_linkedfiles.inc.php +if ($sortfield) { + $backtopage .= '&sortfield='.urlencode($sortfield); +} +if ($sortorder) { + $backtopage .= '&sortorder='.urlencode($sortorder); +} include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $backtopage = $savbacktopage; @@ -354,43 +409,37 @@ if ($action == 'renamefile') { // Must be after include DOL_DOCUMENT_ROOT.'/core $action = 'file_manager'; } -if ($action == 'seteditinline') -{ +if ($action == 'seteditinline') { dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1); setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'warnings'); - dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 0); // Force disable of 'Include dynamic content' + //dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 0); // Force disable of 'Include dynamic content' header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); exit; } -if ($action == 'unseteditinline') -{ +if ($action == 'unseteditinline') { dolibarr_del_const($db, 'WEBSITE_EDITINLINE'); header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); exit; } -if ($action == 'setshowsubcontainers') -{ +if ($action == 'setshowsubcontainers') { dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1); - dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 0); // Force disable of edit inline + //dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 0); // Force disable of edit inline header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); exit; } -if ($action == 'unsetshowsubcontainers') -{ +if ($action == 'unsetshowsubcontainers') { dolibarr_del_const($db, 'WEBSITE_SUBCONTAINERSINLINE'); header("Location: ".$_SERVER["PHP_SELF"].'?website='.GETPOST('website', 'alphanohtml').'&pageid='.GETPOST('pageid', 'int')); exit; } -if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && !$searchkey) -{ +if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && !$searchkey) { $action = 'replacesite'; $massaction = ''; } // Set category -if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) -{ +if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { $error = 0; $nbupdate = 0; @@ -429,17 +478,14 @@ if ($massaction == 'setcategory' && GETPOST('confirmmassaction', 'alpha') && $us } // Replacement of string into pages -if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha')) -{ +if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { $replacestring = GETPOST('replacestring', 'none'); if (empty($user->rights->website->writephp)) { setEventMessages("NotAllowedToAddDynamicContent", null, 'errors'); - } - elseif (!$replacestring) { + } elseif (!$replacestring) { setEventMessages("ErrorReplaceStringEmpty", null, 'errors'); - } - else { + } else { $nbreplacement = 0; foreach ($toselect as $keyselected) { @@ -461,15 +507,13 @@ if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha')) // Save page alias $result = dolSavePageAlias($filealias, $object, $objectpage); - if (!$result) - { + if (!$result) { setEventMessages('Failed to write file '.basename($filealias), null, 'errors'); } // Save page of content $result = dolSavePageContent($filetpl, $object, $objectpage); - if ($result) - { + if ($result) { $nbreplacement++; //var_dump($objectpage->content);exit; $objectpage->update($user); @@ -524,31 +568,26 @@ if ($action == 'adddir' && $permtouploadfile) */ // Add site -if ($action == 'addsite') -{ +if ($action == 'addsite' && $usercanedit) { $db->begin(); - if (GETPOST('virtualhost', 'alpha') && !preg_match('/^http/', GETPOST('virtualhost', 'alpha'))) - { + if (GETPOST('virtualhost', 'alpha') && !preg_match('/^http/', GETPOST('virtualhost', 'alpha'))) { $error++; setEventMessages($langs->trans('ErrorURLMustStartWithHttp', $langs->transnoentitiesnoconv("VirtualHost")), null, 'errors'); } - if (!$error && !GETPOST('WEBSITE_REF', 'alpha')) - { + if (!$error && !GETPOST('WEBSITE_REF', 'alpha')) { $error++; $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); } - if (!$error && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST('WEBSITE_REF', 'alpha'))) - { + if (!$error && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST('WEBSITE_REF', 'alpha'))) { $error++; $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("Ref")), null, 'errors'); } - if (!$error) - { + if (!$error) { $arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml')); foreach ($arrayotherlang as $key => $val) { // It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,' @@ -564,75 +603,64 @@ if ($action == 'addsite') $tmpobject->virtualhost = GETPOST('virtualhost', 'alpha'); $result = $tmpobject->create($user); - if ($result <= 0) - { + if ($result <= 0) { $error++; setEventMessages($tmpobject->error, $tmpobject->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SiteAdded", $object->ref), null, 'mesgs'); $action = ''; header("Location: ".$_SERVER["PHP_SELF"].'?website='.$tmpobject->ref); exit; - } - else { + } else { $db->rollback(); $action = 'createsite'; } - if (!$error) - { + if (!$error) { $action = 'preview'; $id = $object->id; } } // Add page/container -if ($action == 'addcontainer') -{ +if ($action == 'addcontainer' && $usercanedit) { dol_mkdir($pathofwebsite); $db->begin(); $objectpage->fk_website = $object->id; - if (GETPOSTISSET('fetchexternalurl')) // Fetch from external url - { + if (GETPOSTISSET('fetchexternalurl')) { // Fetch from external url $urltograb = GETPOST('externalurl', 'alpha'); $grabimages = GETPOST('grabimages', 'alpha'); $grabimagesinto = GETPOST('grabimagesinto', 'alpha'); include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - if (empty($urltograb)) - { + if (empty($urltograb)) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); $action = 'createcontainer'; - } - elseif (!preg_match('/^http/', $urltograb)) - { + } elseif (!preg_match('/^http/', $urltograb)) { $error++; $langs->load("errors"); setEventMessages('Error URL must start with http:// or https://', null, 'errors'); $action = 'createcontainer'; } - if (!$error) - { + if (!$error) { // Clean url to grab, so url can be // http://www.example.com/ or http://www.example.com/dir1/ or http://www.example.com/dir1/aaa $urltograbwithoutdomainandparam = preg_replace('/^https?:\/\/[^\/]+\/?/i', '', $urltograb); //$urltograbwithoutdomainandparam = preg_replace('/^file:\/\/[^\/]+\/?/i', '', $urltograb); $urltograbwithoutdomainandparam = preg_replace('/\?.*$/', '', $urltograbwithoutdomainandparam); - if (empty($urltograbwithoutdomainandparam) && !preg_match('/\/$/', $urltograb)) - { + if (empty($urltograbwithoutdomainandparam) && !preg_match('/\/$/', $urltograb)) { $urltograb .= '/'; } $pageurl = dol_sanitizeFileName(preg_replace('/[\/\.]/', '-', preg_replace('/\/+$/', '', $urltograbwithoutdomainandparam))); @@ -644,34 +672,27 @@ if ($action == 'addcontainer') } // Check pageurl is not already used - if ($pageurl) - { + if ($pageurl) { $tmpwebsitepage = new WebsitePage($db); $result = $tmpwebsitepage->fetch(0, $object->id, $pageurl); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("AliasPageAlreadyExists", $pageurl), null, 'errors'); $error++; $action = 'createcontainer'; } } - if (!$error) - { - $tmp = getURLContent($urltograb); - if ($tmp['curl_error_no']) - { + if (!$error) { + $tmp = getURLContent($urltograb, 'GET', '', 1, array(), array('http', 'https'), 0); + if ($tmp['curl_error_no']) { $error++; setEventMessages('Error getting '.$urltograb.': '.$tmp['curl_error_msg'], null, 'errors'); $action = 'createcontainer'; - } - elseif ($tmp['http_code'] != '200') - { + } elseif ($tmp['http_code'] != '200') { $error++; setEventMessages('Error getting '.$urltograb.': '.$tmp['http_code'], null, 'errors'); $action = 'createcontainer'; - } - else { + } else { // Remove comments $tmp['content'] = removeHtmlComment($tmp['content']); @@ -681,36 +702,34 @@ if ($action == 'addcontainer') $head = $regs[1]; $objectpage->type_container = 'page'; - $objectpage->pageurl = $pageurl; - if (empty($objectpage->pageurl)) - { - $tmpdomain = getDomainFromURL($urltograb); - $objectpage->pageurl = $tmpdomain.'-home'; - } + $objectpage->pageurl = $pageurl; + if (empty($objectpage->pageurl)) { + $tmpdomain = getDomainFromURL($urltograb); + $objectpage->pageurl = $tmpdomain.'-home'; + } - $objectpage->aliasalt = ''; + $objectpage->aliasalt = ''; - if (preg_match('/^(\d+)\-/', basename($urltograb), $regs)) $objectpage->aliasalt = $regs[1]; + if (preg_match('/^(\d+)\-/', basename($urltograb), $regs)) { + $objectpage->aliasalt = $regs[1]; + } - $regtmp = array(); - if (preg_match('/<title>(.*)<\/title>/ims', $head, $regtmp)) - { + $regtmp = array(); + if (preg_match('/<title>(.*)<\/title>/ims', $head, $regtmp)) { $objectpage->title = $regtmp[1]; } - if (preg_match('/<meta name="title"[^"]+content="([^"]+)"/ims', $head, $regtmp)) - { - if (empty($objectpage->title)) $objectpage->title = $regtmp[1]; // If title not found into <title>, we get it from <meta title> + if (preg_match('/<meta name="title"[^"]+content="([^"]+)"/ims', $head, $regtmp)) { + if (empty($objectpage->title)) { + $objectpage->title = $regtmp[1]; // If title not found into <title>, we get it from <meta title> + } } - if (preg_match('/<meta name="description"[^"]+content="([^"]+)"/ims', $head, $regtmp)) - { + if (preg_match('/<meta name="description"[^"]+content="([^"]+)"/ims', $head, $regtmp)) { $objectpage->description = $regtmp[1]; } - if (preg_match('/<meta name="keywords"[^"]+content="([^"]+)"/ims', $head, $regtmp)) - { + if (preg_match('/<meta name="keywords"[^"]+content="([^"]+)"/ims', $head, $regtmp)) { $objectpage->keywords = $regtmp[1]; } - if (preg_match('/<html\s+lang="([^"]+)"/ims', $tmp['content'], $regtmp)) - { + if (preg_match('/<html\s+lang="([^"]+)"/ims', $tmp['content'], $regtmp)) { $tmplang = explode('-', $regtmp[1]); $objectpage->lang = $tmplang[0].($tmplang[1] ? '_'.strtoupper($tmplang[1]) : ''); } @@ -751,22 +770,18 @@ if ($action == 'addcontainer') // We grab files found into <script> tags preg_match_all('/<script([^\.>]+)src=["\']([^"\'>]+)["\']([^>]*)><\/script>/i', $objectpage->htmlheader, $regs); $errorforsubresource = 0; - foreach ($regs[0] as $key => $val) - { + foreach ($regs[0] as $key => $val) { dol_syslog("We will grab the script resource found into script tag ".$regs[2][$key]); $linkwithoutdomain = $regs[2][$key]; - if (preg_match('/^\//', $regs[2][$key])) - { + if (preg_match('/^\//', $regs[2][$key])) { $urltograbbis = $urltograbdirrootwithoutslash.$regs[2][$key]; // We use dirroot - } - else { + } else { $urltograbbis = $urltograbdirwithoutslash.'/'.$regs[2][$key]; // We use dir of grabbed file } //$filetosave = $conf->medias->multidir_output[$conf->entity].'/css/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $regs[2][$key])?'':'/').$regs[2][$key]; - if (preg_match('/^http/', $regs[2][$key])) - { + if (preg_match('/^http/', $regs[2][$key])) { $urltograbbis = $regs[2][$key]; $linkwithoutdomain = preg_replace('/^https?:\/\/[^\/]+\//i', '', $regs[2][$key]); //$filetosave = $conf->medias->multidir_output[$conf->entity].'/css/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $linkwithoutdomain)?'':'/').$linkwithoutdomain; @@ -778,17 +793,19 @@ if ($action == 'addcontainer') // Test if this is an external URL of grabbed web site. If yes, we do not load resource $domaintograb = getDomainFromURL($urltograbdirwithoutslash); $domaintograbbis = getDomainFromURL($urltograbbis); - if ($domaintograb != $domaintograbbis) continue; + if ($domaintograb != $domaintograbbis) { + continue; + } /* - $tmpgeturl = getURLContent($urltograbbis); - if ($tmpgeturl['curl_error_no']) - { - $error++; - setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); - $errorforsubresource++; - $action='createcontainer'; - } + $tmpgeturl = getURLContent($urltograbbis, 'GET', '', 1, array(), array('http', 'https'), 0); + if ($tmpgeturl['curl_error_no']) + { + $error++; + setEventMessages('Error getting script url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); + $errorforsubresource++; + $action='createcontainer'; + } elseif ($tmpgeturl['http_code'] != '200') { $error++; @@ -797,15 +814,15 @@ if ($action == 'addcontainer') $action='createcontainer'; } else - { - dol_mkdir(dirname($filetosave)); + { + dol_mkdir(dirname($filetosave)); - $fp = fopen($filetosave, "w"); - fputs($fp, $tmpgeturl['content']); - fclose($fp); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - } + $fp = fopen($filetosave, "w"); + fputs($fp, $tmpgeturl['content']); + fclose($fp); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + } */ //$filename = 'image/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $linkwithoutdomain)?'':'/').$linkwithoutdomain; @@ -819,22 +836,18 @@ if ($action == 'addcontainer') preg_match_all('/<link([^\.>]+)href=["\']([^"\'>]+\.css[^"\'>]*)["\']([^>]*)>/i', $objectpage->htmlheader, $regs); $errorforsubresource = 0; - foreach ($regs[0] as $key => $val) - { + foreach ($regs[0] as $key => $val) { dol_syslog("We will grab the css resources found into link tag ".$regs[2][$key]); $linkwithoutdomain = $regs[2][$key]; - if (preg_match('/^\//', $regs[2][$key])) - { + if (preg_match('/^\//', $regs[2][$key])) { $urltograbbis = $urltograbdirrootwithoutslash.$regs[2][$key]; // We use dirroot - } - else { + } else { $urltograbbis = $urltograbdirwithoutslash.'/'.$regs[2][$key]; // We use dir of grabbed file } //$filetosave = $conf->medias->multidir_output[$conf->entity].'/css/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $regs[2][$key])?'':'/').$regs[2][$key]; - if (preg_match('/^http/', $regs[2][$key])) - { + if (preg_match('/^http/', $regs[2][$key])) { $urltograbbis = $regs[2][$key]; $linkwithoutdomain = preg_replace('/^https?:\/\/[^\/]+\//i', '', $regs[2][$key]); //$filetosave = $conf->medias->multidir_output[$conf->entity].'/css/'.$object->ref.'/'.$objectpage->pageurl.(preg_match('/^\//', $linkwithoutdomain)?'':'/').$linkwithoutdomain; @@ -846,24 +859,22 @@ if ($action == 'addcontainer') // Test if this is an external URL of grabbed web site. If yes, we do not load resource $domaintograb = getDomainFromURL($urltograbdirwithoutslash); $domaintograbbis = getDomainFromURL($urltograbbis); - if ($domaintograb != $domaintograbbis) continue; + if ($domaintograb != $domaintograbbis) { + continue; + } - $tmpgeturl = getURLContent($urltograbbis); - if ($tmpgeturl['curl_error_no']) - { + $tmpgeturl = getURLContent($urltograbbis, 'GET', '', 1, array(), array('http', 'https'), 0); + if ($tmpgeturl['curl_error_no']) { $errorforsubresource++; setEventMessages('Error getting link tag url '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); dol_syslog('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg']); $action = 'createcontainer'; - } - elseif ($tmpgeturl['http_code'] != '200') - { + } elseif ($tmpgeturl['http_code'] != '200') { $errorforsubresource++; setEventMessages('Error getting link tag url '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors'); dol_syslog('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg']); $action = 'createcontainer'; - } - else { + } else { // Clean some comment //$tmpgeturl['content'] = dol_string_is_good_iso($tmpgeturl['content'], 1); //$tmpgeturl['content'] = utf8_encode(utf8_decode($tmpgeturl['content'])); @@ -887,6 +898,7 @@ if ($action == 'addcontainer') getAllImages($object, $objectpage, $urltograbbis, $tmpgeturl['content'], $action, 1, $grabimages, $grabimagesinto); + // We try to convert the CSS we got by adding a prefix .bodywebsite with lessc to avoid conflicit with CSS of Dolibarr. include_once DOL_DOCUMENT_ROOT.'/core/class/lessc.class.php'; $lesscobj = new Lessc(); try { @@ -931,10 +943,45 @@ if ($action == 'addcontainer') } } } else { + $newaliasnames = ''; + if (!$error && GETPOST('WEBSITE_ALIASALT', 'alpha')) { + $arrayofaliastotest = explode(',', str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alpha'))); + $websitepagetemp = new WebsitePage($db); + foreach ($arrayofaliastotest as $aliastotest) { + $aliastotest = trim(preg_replace('/\.php$/i', '', $aliastotest)); + + // Disallow alias name pageX (already used to save the page with id) + if (preg_match('/^page\d+/i', $aliastotest)) { + $error++; + $langs->load("errors"); + setEventMessages("Alias name 'pageX' is not allowed", null, 'errors'); + $action = 'createcontainer'; + break; + } else { + $result = $websitepagetemp->fetch(0, $object->id, $aliastotest); + if ($result < 0) { + $error++; + $langs->load("errors"); + setEventMessages($websitepagetemp->error, $websitepagetemp->errors, 'errors'); + $action = 'createcontainer'; + break; + } + if ($result > 0) { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists", $websitepagetemp->pageurl), null, 'errors'); + $action = 'createcontainer'; + break; + } + $newaliasnames .= ($newaliasnames ? ', ' : '').$aliastotest; + } + } + } + $objectpage->title = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml')); $objectpage->type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'aZ09'); $objectpage->pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); - $objectpage->aliasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml')); + $objectpage->aliasalt = $newaliasnames; $objectpage->description = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml')); $objectpage->lang = GETPOST('WEBSITE_LANG', 'aZ09'); $objectpage->otherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); @@ -961,7 +1008,9 @@ if ($action == 'addcontainer') $objectpage->fk_page = $pageidfortranslation; $sample = GETPOST('sample', 'alpha'); - if (empty($sample)) $sample = 'empty'; + if (empty($sample)) { + $sample = 'empty'; + } $pathtosample = DOL_DOCUMENT_ROOT.'/website/samples/page-sample-'.dol_sanitizeFileName($sample).'.html'; @@ -969,38 +1018,31 @@ if ($action == 'addcontainer') $objectpage->content = make_substitutions(@file_get_contents($pathtosample), $substitutionarray); } - if (!$error) - { - if (empty($objectpage->pageurl)) - { + if (!$error) { + if (empty($objectpage->pageurl)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WEBSITE_PAGENAME")), null, 'errors'); $error++; $action = 'createcontainer'; - } - elseif (!preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) - { + } elseif (!preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) { $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities('WEBSITE_PAGENAME')), null, 'errors'); $error++; $action = 'createcontainer'; } - if (empty($objectpage->title)) - { + if (empty($objectpage->title)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WEBSITE_TITLE")), null, 'errors'); $error++; $action = 'createcontainer'; } - if ($objectpage->fk_page > 0 && empty($objectpage->lang)) - { + if ($objectpage->fk_page > 0 && empty($objectpage->lang)) { $langs->load("errors"); setEventMessages($langs->trans("ErrorLanguageRequiredIfPageIsTranslationOfAnother"), null, 'errors'); $error++; $action = 'createcontainer'; } - if ($objectpage->fk_page > 0 && !empty($objectpage->lang)) - { + if ($objectpage->fk_page > 0 && !empty($objectpage->lang)) { if ($objectpage->lang == $website->lang) { $langs->load("errors"); setEventMessages($langs->trans("ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother"), null, 'errors'); @@ -1010,8 +1052,7 @@ if ($action == 'addcontainer') } } - if (!$error) - { + if (!$error) { $pageid = $objectpage->create($user); if ($pageid <= 0) { $error++; @@ -1024,8 +1065,7 @@ if ($action == 'addcontainer') // Website categories association $categoriesarray = GETPOST('categories', 'array'); $result = $objectpage->setCategories($categoriesarray); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -1036,8 +1076,7 @@ if ($action == 'addcontainer') if (empty($object->fk_default_home)) { $object->fk_default_home = $pageid; $res = $object->update($user); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -1046,50 +1085,44 @@ if ($action == 'addcontainer') // Generate the index.php page (to be the home page) and wrapper.php file $result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper); - if ($result <= 0) setEventMessages('Failed to write file '.$fileindex, null, 'errors'); + if ($result <= 0) { + setEventMessages('Failed to write file '.$fileindex, null, 'errors'); + } } } } - if (!$error) - { - if (!empty($objectpage->content)) - { + if (!$error) { + if (!empty($objectpage->content)) { $filealias = $pathofwebsite.'/'.$objectpage->pageurl.'.php'; $filetpl = $pathofwebsite.'/page'.$objectpage->id.'.tpl.php'; // Save page alias $result = dolSavePageAlias($filealias, $object, $objectpage); - if (!$result) - { + if (!$result) { setEventMessages('Failed to write file '.basename($filealias), null, 'errors'); } // Save page of content $result = dolSavePageContent($filetpl, $object, $objectpage); - if ($result) - { + if ($result) { setEventMessages($langs->trans("Saved"), null, 'mesgs'); - } - else { + } else { setEventMessages('Failed to write file '.$filetpl, null, 'errors'); $action = 'createcontainer'; } } } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("PageAdded", $objectpage->pageurl), null, 'mesgs'); $action = ''; - } - else { + } else { $db->rollback(); } - if (!$error) - { + if (!$error) { $pageid = $objectpage->id; // To generate the CSS, robot and htmlheader file. @@ -1097,64 +1130,54 @@ if ($action == 'addcontainer') // Check symlink to medias and restore it if ko $pathtomedias = DOL_DATA_ROOT.'/medias'; $pathtomediasinwebsite = $pathofwebsite.'/medias'; - if (!is_link(dol_osencode($pathtomediasinwebsite))) - { + if (!is_link(dol_osencode($pathtomediasinwebsite))) { dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); } // Now generate the master.inc.php page if it does not exists yet - if (!dol_is_file($filemaster)) - { + if (!dol_is_file($filemaster)) { $result = dolSaveMasterFile($filemaster); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filemaster, null, 'errors'); } } - if (!dol_is_file($filehtmlheader)) - { + if (!dol_is_file($filehtmlheader)) { $htmlheadercontent = "<html>\n"; $htmlheadercontent .= $htmlheadercontentdefault; $htmlheadercontent .= "</html>"; $result = dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent); } - if (!dol_is_file($filecss)) - { + if (!dol_is_file($filecss)) { $csscontent = "/* CSS content (all pages) */\nbody.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; $result = dolSaveCssFile($filecss, $csscontent); } - if (!dol_is_file($filejs)) - { + if (!dol_is_file($filejs)) { $jscontent = "/* JS content (all pages) */\n"; $result = dolSaveJsFile($filejs, $jscontent); } - if (!dol_is_file($filerobot)) - { + if (!dol_is_file($filerobot)) { $robotcontent = "# Robot file. Generated with Dolibarr\nUser-agent: *\nAllow: /public/\nDisallow: /administrator/"; $result = dolSaveRobotFile($filerobot, $robotcontent); } - if (!dol_is_file($filehtaccess)) - { + if (!dol_is_file($filehtaccess)) { $htaccesscontent = "# Order allow,deny\n# Deny from all"; $result = dolSaveHtaccessFile($filehtaccess, $htaccesscontent); } - if (!dol_is_file($filemanifestjson)) - { + if (!dol_is_file($filemanifestjson)) { $manifestjsoncontent = ""; $result = dolSaveManifestJson($filemanifestjson, $manifestjsoncontent); } - if (!dol_is_file($filereadme)) - { + if (!dol_is_file($filereadme)) { $readmecontent = "Website generated by Dolibarr ERP CRM"; $result = dolSaveReadme($filereadme, $readmecontent); } @@ -1164,8 +1187,7 @@ if ($action == 'addcontainer') } // Delete site -if ($action == 'confirm_deletesite' && $confirm == 'yes') -{ +if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete) { $error = 0; $db->begin(); @@ -1173,40 +1195,33 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes') $res = $object->fetch(GETPOST('id', 'int')); $website = $object; - if ($res > 0) - { + if ($res > 0) { $res = $object->delete($user); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } - if (!$error) - { - if (GETPOST('delete_also_js', 'alpha') == 'on') - { + if (!$error) { + if (GETPOST('delete_also_js', 'alpha') == 'on') { $pathofwebsitejs = DOL_DATA_ROOT.'/medias/js/'.$object->ref; dol_delete_dir_recursive($pathofwebsitejs); } - if (GETPOST('delete_also_medias', 'alpha') == 'on') - { + if (GETPOST('delete_also_medias', 'alpha') == 'on') { $pathofwebsitemedias = DOL_DATA_ROOT.'/medias/image/'.$object->ref; dol_delete_dir_recursive($pathofwebsitemedias); } } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SiteDeleted", $object->ref), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else { + } else { $db->rollback(); dol_print_error($db); } @@ -1223,25 +1238,21 @@ if (GETPOSTISSET('pageid') && $action == 'delete' && $permissiontodelete) { $res = $objectpage->fetch($pageid, $object->id); - if ($res > 0) - { + if ($res > 0) { $res = $objectpage->delete($user); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("PageDeleted", $objectpage->pageurl, $websitekey), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey); exit; - } - else { + } else { $db->rollback(); dol_print_error($db); } @@ -1252,25 +1263,23 @@ if (!GETPOSTISSET('pageid')) { // Add part of code from actions_massactions.inc.php // 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) - { + if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) { $db->begin(); $objecttmp = new $objectclass($db); $nbok = 0; - foreach ($toselect as $toselectid) - { + foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); - if ($result > 0) - { + if ($result > 0) { $result = $objecttmp->delete($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -1278,10 +1287,12 @@ if (!GETPOSTISSET('pageid')) { } } - if (!$error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + } $db->commit(); } else { $db->rollback(); @@ -1304,29 +1315,23 @@ if (!GETPOSTISSET('pageid')) { } // Update css Update site properties -if ($action == 'updatecss') -{ +if ($action == 'updatecss' && $usercanedit) { // If we tried to reload another site/page, we stay on editcss mode. - if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x') || GETPOST('refreshpage') || GETPOST('refreshpage_x') || GETPOST('refreshpage.x')) - { + if (GETPOST('refreshsite') || GETPOST('refreshsite_x') || GETPOST('refreshsite.x') || GETPOST('refreshpage') || GETPOST('refreshpage_x') || GETPOST('refreshpage.x')) { $action = 'editcss'; - } - else { + } else { $res = $object->fetch(0, $websitekey); $website = $object; - if (GETPOSTISSET('virtualhost')) - { + if (GETPOSTISSET('virtualhost')) { $tmpvirtualhost = preg_replace('/\/$/', '', GETPOST('virtualhost', 'alpha')); - if ($tmpvirtualhost && !preg_match('/^http/', $tmpvirtualhost)) - { + if ($tmpvirtualhost && !preg_match('/^http/', $tmpvirtualhost)) { $error++; setEventMessages($langs->trans('ErrorURLMustStartWithHttp', $langs->transnoentitiesnoconv("VirtualHost")), null, 'errors'); $action = 'editcss'; } - if (!$error) - { + if (!$error) { $arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml')); foreach ($arrayotherlang as $key => $val) { // It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,' @@ -1340,8 +1345,7 @@ if ($action == 'updatecss') $object->use_manifest = GETPOST('use_manifest', 'alpha'); $result = $object->update($user); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = 'editcss'; @@ -1349,8 +1353,42 @@ if ($action == 'updatecss') } } - if (!$error) - { + if (!$error) { + if (($_FILES['addedfile']["name"] != '')) { + $uploadfolder = $conf->website->dir_output.'/'.$websitekey; + if ($_FILES['addedfile']['type'] != 'image/png') { + $error++; + setEventMessages($langs->trans('ErrorFaviconType'), array(), 'errors'); + } + $filetoread = realpath(dol_osencode($_FILES['addedfile']['tmp_name'])); + $filesize = getimagesize($filetoread); + if ($filesize[0] != $filesize[1]) { + $error++; + setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); + } + if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { + $error++; + setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); + } + if (!$error) { + dol_add_file_process($uploadfolder, 1, 0, 'addedfile', 'favicon.png'); + } + } + if ($error) { + if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect + $action = 'preview'; + if ($backtopage) { + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url + header("Location: ".$backtopage); + exit; + } + } else { + $action = 'editcss'; + } + } + } + + if (!$error) { // Save master.inc.php file dol_syslog("Save master file ".$filemaster); @@ -1358,8 +1396,7 @@ if ($action == 'updatecss') // Now generate the master.inc.php page $result = dolSaveMasterFile($filemaster); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filemaster, null, 'errors'); } @@ -1369,26 +1406,25 @@ if ($action == 'updatecss') $htmlheadercontent = ''; /* We disable php code since htmlheader is never executed as an include but only read by fgets_content. - $htmlheadercontent.= "<?php // BEGIN PHP\n"; - $htmlheadercontent.= '$websitekey=basename(__DIR__);'."\n"; - $htmlheadercontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load env if not already loaded"."\n"; - $htmlheadercontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; - $htmlheadercontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; - $htmlheadercontent.= "ob_start();\n"; - // $htmlheadercontent.= "header('Content-type: text/html');\n"; // Not required. htmlheader.html is never call as a standalone page - $htmlheadercontent.= "// END PHP ?>\n";*/ + $htmlheadercontent.= "<?php // BEGIN PHP\n"; + $htmlheadercontent.= '$websitekey=basename(__DIR__);'."\n"; + $htmlheadercontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load env if not already loaded"."\n"; + $htmlheadercontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; + $htmlheadercontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; + $htmlheadercontent.= "ob_start();\n"; + // $htmlheadercontent.= "header('Content-type: text/html');\n"; // Not required. htmlheader.html is never call as a standalone page + $htmlheadercontent.= "// END PHP ?>\n";*/ $htmlheadercontent .= preg_replace(array('/<html>\n*/ims', '/<\/html>\n*/ims'), array('', ''), GETPOST('WEBSITE_HTML_HEADER', 'none')); /*$htmlheadercontent.= "\n".'<?php // BEGIN PHP'."\n"; - $htmlheadercontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp);'."\n"; - $htmlheadercontent.= "// END PHP ?>"."\n";*/ + $htmlheadercontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp);'."\n"; + $htmlheadercontent.= "// END PHP ?>"."\n";*/ $htmlheadercontent = trim($htmlheadercontent)."\n"; $result = dolSaveHtmlHeader($filehtmlheader, $htmlheadercontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filehtmlheader, null, 'errors'); } @@ -1418,8 +1454,7 @@ if ($action == 'updatecss') dol_syslog("Save css content into ".$filecss); $result = dolSaveCssFile($filecss, $csscontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filecss, null, 'errors'); } @@ -1445,8 +1480,7 @@ if ($action == 'updatecss') $jscontent .= "// END PHP ?>\n"; $result = dolSaveJsFile($filejs, $jscontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filejs, null, 'errors'); } @@ -1456,24 +1490,23 @@ if ($action == 'updatecss') $robotcontent = ''; /*$robotcontent.= "<?php // BEGIN PHP\n"; - $robotcontent.= '$websitekey=basename(__DIR__);'."\n"; - $robotcontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load env if not already loaded"."\n"; - $robotcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; - $robotcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; - $robotcontent.= "ob_start();\n"; - $robotcontent.= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; - $robotcontent.= "header('Content-type: text/css');\n"; - $robotcontent.= "// END PHP ?>\n";*/ + $robotcontent.= '$websitekey=basename(__DIR__);'."\n"; + $robotcontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load env if not already loaded"."\n"; + $robotcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; + $robotcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; + $robotcontent.= "ob_start();\n"; + $robotcontent.= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; + $robotcontent.= "header('Content-type: text/css');\n"; + $robotcontent.= "// END PHP ?>\n";*/ $robotcontent .= trim(GETPOST('WEBSITE_ROBOT', 'restricthtml'))."\n"; /*$robotcontent.= "\n".'<?php // BEGIN PHP'."\n"; - $robotcontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "robot");'."\n"; - $robotcontent.= "// END PHP ?>"."\n";*/ + $robotcontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "robot");'."\n"; + $robotcontent.= "// END PHP ?>"."\n";*/ $result = dolSaveRobotFile($filerobot, $robotcontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filerobot, null, 'errors'); } @@ -1484,87 +1517,81 @@ if ($action == 'updatecss') $htaccesscontent .= trim(GETPOST('WEBSITE_HTACCESS', 'restricthtml'))."\n"; $result = dolSaveHtaccessFile($filehtaccess, $htaccesscontent); - if (!$result) - { + if (!$result) { $error++; setEventMessages('Failed to write file '.$filehtaccess, null, 'errors'); } - // manifest.json file - $manifestjsoncontent = ''; + // manifest.json file + $manifestjsoncontent = ''; - $manifestjsoncontent .= "<?php // BEGIN PHP\n"; - $manifestjsoncontent .= '$websitekey=basename(__DIR__);'."\n"; - $manifestjsoncontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded\n"; // For the css, we need to set path of master using the dirname of css file. - $manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; - $manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; - $manifestjsoncontent .= "ob_start();\n"; - $manifestjsoncontent .= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; - $manifestjsoncontent .= "header('Content-type: application/manifest+json');\n"; - $manifestjsoncontent .= "// END PHP ?>\n"; + $manifestjsoncontent .= "<?php // BEGIN PHP\n"; + $manifestjsoncontent .= '$websitekey=basename(__DIR__);'."\n"; + $manifestjsoncontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded\n"; // For the css, we need to set path of master using the dirname of css file. + $manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; + $manifestjsoncontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; + $manifestjsoncontent .= "ob_start();\n"; + $manifestjsoncontent .= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; + $manifestjsoncontent .= "header('Content-type: application/manifest+json');\n"; + $manifestjsoncontent .= "// END PHP ?>\n"; - $manifestjsoncontent .= trim(GETPOST('WEBSITE_MANIFEST_JSON', 'none'))."\n"; + $manifestjsoncontent .= trim(GETPOST('WEBSITE_MANIFEST_JSON', 'none'))."\n"; - $manifestjsoncontent .= '<?php // BEGIN PHP'."\n"; - $manifestjsoncontent .= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "manifest");'."\n"; - $manifestjsoncontent .= "// END PHP ?>\n"; + $manifestjsoncontent .= '<?php // BEGIN PHP'."\n"; + $manifestjsoncontent .= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "manifest");'."\n"; + $manifestjsoncontent .= "// END PHP ?>\n"; - $result = dolSaveManifestJson($filemanifestjson, $manifestjsoncontent); - if (!$result) - { - $error++; - setEventMessages('Failed to write file '.$filemanifestjson, null, 'errors'); - } + $result = dolSaveManifestJson($filemanifestjson, $manifestjsoncontent); + if (!$result) { + $error++; + setEventMessages('Failed to write file '.$filemanifestjson, null, 'errors'); + } - // README.md file - $readmecontent = ''; + // README.md file + $readmecontent = ''; - /*$readmecontent.= "<?php // BEGIN PHP\n"; - $readmecontent.= '$websitekey=basename(__DIR__);'."\n"; - $readmecontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded"."\n"; // For the css, we need to set path of master using the dirname of css file. - $readmecontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; - $readmecontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; - $readmecontent.= "ob_start();\n"; - $readmecontent.= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; - $readmecontent.= "header('Content-type: application/manifest+json');\n"; - $readmecontent.= "// END PHP ?>\n";*/ + /*$readmecontent.= "<?php // BEGIN PHP\n"; + $readmecontent.= '$websitekey=basename(__DIR__);'."\n"; + $readmecontent.= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded"."\n"; // For the css, we need to set path of master using the dirname of css file. + $readmecontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; + $readmecontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; + $readmecontent.= "ob_start();\n"; + $readmecontent.= "header('Cache-Control: max-age=3600, public, must-revalidate');\n"; + $readmecontent.= "header('Content-type: application/manifest+json');\n"; + $readmecontent.= "// END PHP ?>\n";*/ - $readmecontent .= trim(GETPOST('WEBSITE_README', 'restricthtml'))."\n"; + $readmecontent .= trim(GETPOST('WEBSITE_README', 'restricthtml'))."\n"; - /*$readmecontent.= '<?php // BEGIN PHP'."\n"; - $readmecontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "manifest");'."\n"; - $readmecontent.= "// END PHP ?>"."\n";*/ + /*$readmecontent.= '<?php // BEGIN PHP'."\n"; + $readmecontent.= '$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "manifest");'."\n"; + $readmecontent.= "// END PHP ?>"."\n";*/ - $result = dolSaveReadme($filereadme, $readmecontent); - if (!$result) - { - $error++; - setEventMessages('Failed to write file '.$filereadme, null, 'errors'); - } + $result = dolSaveReadme($filereadme, $readmecontent); + if (!$result) { + $error++; + setEventMessages('Failed to write file '.$filereadme, null, 'errors'); + } - // Save wrapper.php + // Save wrapper.php $result = dolSaveIndexPage($pathofwebsite, '', '', $filewrapper); // Message if no error - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("Saved"), null, 'mesgs'); } - if (!GETPOSTISSET('updateandstay')) // If we click on "Save And Stay", we don not make the redirect - { + if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect $action = 'preview'; - if ($backtopage) - { + if ($backtopage) { + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url header("Location: ".$backtopage); exit; } - } - else { + } else { $action = 'editcss'; } } @@ -1572,22 +1599,19 @@ if ($action == 'updatecss') } // Update page -if ($action == 'setashome') -{ +if ($action == 'setashome' && $usercanedit) { $db->begin(); $object->fetch(0, $websitekey); $website = $object; $object->fk_default_home = $pageid; $res = $object->update($user); - if (! ($res > 0)) - { + if (! ($res > 0)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } - if (!$error) - { + if (!$error) { $db->commit(); $filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php'; @@ -1595,19 +1619,20 @@ if ($action == 'setashome') // Generate the index.php page to be the home page $result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper); - if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs'); - else setEventMessages('Failed to write file '.$fileindex, null, 'errors'); + if ($result) { + setEventMessages($langs->trans("Saved"), null, 'mesgs'); + } else { + setEventMessages('Failed to write file '.$fileindex, null, 'errors'); + } $action = 'preview'; - } - else { + } else { $db->rollback(); } } // Update page properties (meta) -if ($action == 'updatemeta') -{ +if ($action == 'updatemeta' && $usercanedit) { $db->begin(); $result = $object->fetch(0, $websitekey); @@ -1616,8 +1641,7 @@ if ($action == 'updatemeta') $objectpage->fk_website = $object->id; // Check parameters - if (!preg_match('/^[a-z0-9\-\_]+$/i', GETPOST('WEBSITE_PAGENAME', 'alpha'))) - { + if (!preg_match('/^[a-z0-9\-\_]+$/i', GETPOST('WEBSITE_PAGENAME', 'alpha'))) { $error++; $langs->load("errors"); setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities('WEBSITE_PAGENAME')), null, 'errors'); @@ -1625,75 +1649,72 @@ if ($action == 'updatemeta') } $res = $objectpage->fetch($pageid, $object->id); - if ($res <= 0) - { + if ($res <= 0) { $error++; setEventMessages('Page not found '.$objectpage->error, $objectpage->errors, 'errors'); } // Check alias not exists - if (!$error && GETPOST('WEBSITE_PAGENAME', 'alpha')) - { + if (!$error && GETPOST('WEBSITE_PAGENAME', 'alpha')) { $websitepagetemp = new WebsitePage($db); $result = $websitepagetemp->fetch(-1 * $objectpage->id, $object->id, GETPOST('WEBSITE_PAGENAME', 'alpha')); - if ($result < 0) - { + if ($result < 0) { $error++; $langs->load("errors"); setEventMessages($websitepagetemp->error, $websitepagetemp->errors, 'errors'); $action = 'editmeta'; } - if ($result > 0) - { + if ($result > 0) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists", $websitepagetemp->pageurl), null, 'errors'); $action = 'editmeta'; } } - if (!$error && GETPOST('WEBSITE_ALIASALT', 'alpha')) - { - $arrayofaliastotest = explode(',', GETPOST('WEBSITE_ALIASALT', 'alpha')); + + $newaliasnames = ''; + if (!$error && GETPOST('WEBSITE_ALIASALT', 'alpha')) { + $arrayofaliastotest = explode(',', str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alpha'))); + $websitepagetemp = new WebsitePage($db); - foreach ($arrayofaliastotest as $aliastotest) - { + foreach ($arrayofaliastotest as $aliastotest) { + $aliastotest = trim(preg_replace('/\.php$/i', '', $aliastotest)); + // Disallow alias name pageX (already used to save the page with id) if (preg_match('/^page\d+/i', $aliastotest)) { $error++; $langs->load("errors"); - setEventMessages("Alias 'pageX' is not allowed", null, 'errors'); + setEventMessages("Alias name 'pageX' is not allowed", null, 'errors'); $action = 'editmeta'; break; } else { $result = $websitepagetemp->fetch(-1 * $objectpage->id, $object->id, $aliastotest); - if ($result < 0) - { + if ($result < 0) { $error++; $langs->load("errors"); setEventMessages($websitepagetemp->error, $websitepagetemp->errors, 'errors'); $action = 'editmeta'; break; } - if ($result > 0) - { + if ($result > 0) { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists", $websitepagetemp->pageurl), null, 'errors'); $action = 'editmeta'; break; } + $newaliasnames .= ($newaliasnames ? ', ' : '').$aliastotest; } } } - if (!$error) - { + if (!$error) { $objectpage->old_object = clone $objectpage; $objectpage->title = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml')); $objectpage->type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'aZ09'); $objectpage->pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); - $objectpage->aliasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml')); + $objectpage->aliasalt = $newaliasnames; $objectpage->lang = GETPOST('WEBSITE_LANG', 'aZ09'); $objectpage->otherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); $objectpage->description = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml')); @@ -1707,20 +1728,19 @@ if ($action == 'updatemeta') $objectpage->fk_object = GETPOST('WEBSITE_OBJECTID', 'aZ09'); $newdatecreation = dol_mktime(GETPOST('datecreationhour', 'int'), GETPOST('datecreationmin', 'int'), GETPOST('datecreationsec', 'int'), GETPOST('datecreationmonth', 'int'), GETPOST('datecreationday', 'int'), GETPOST('datecreationyear', 'int')); - if ($newdatecreation) $objectpage->date_creation = $newdatecreation; + if ($newdatecreation) { + $objectpage->date_creation = $newdatecreation; + } $res = $objectpage->update($user); - if (!($res > 0)) - { + if (!($res > 0)) { $langs->load("errors"); - if ($db->lasterrno == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($db->lasterrno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists"), null, 'errors'); $action = 'editmeta'; - } - else { + } else { $error++; $langs->load("errors"); setEventMessages($objectpage->error, $objectpage->errors, 'errors'); @@ -1733,23 +1753,19 @@ if ($action == 'updatemeta') // Website categories association $categoriesarray = GETPOST('categories', 'array'); $result = $objectpage->setCategories($categoriesarray); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } - if (!$error) - { + if (!$error) { $db->commit(); - } - else { + } else { $db->rollback(); } - if (!$error) - { + if (!$error) { $filemaster = $pathofwebsite.'/master.inc.php'; $fileoldalias = $pathofwebsite.'/'.$objectpage->old_object->pageurl.'.php'; $filealias = $pathofwebsite.'/'.$objectpage->pageurl.'.php'; @@ -1758,11 +1774,12 @@ if ($action == 'updatemeta') // Now generate the master.inc.php page $result = dolSaveMasterFile($filemaster); - if (!$result) setEventMessages('Failed to write file '.$filemaster, null, 'errors'); + if (!$result) { + setEventMessages('Failed to write file '.$filemaster, null, 'errors'); + } // Now delete the alias.php page - if (!empty($fileoldalias)) - { + if (!empty($fileoldalias)) { dol_syslog("We delete old alias page name=".$fileoldalias." to build a new alias page=".$filealias); dol_delete_file($fileoldalias); @@ -1782,13 +1799,10 @@ if ($action == 'updatemeta') } } // Now delete the alternative alias.php pages - if (!empty($objectpage->old_object->aliasalt)) - { + if (!empty($objectpage->old_object->aliasalt)) { $tmpaltaliases = explode(',', $objectpage->old_object->aliasalt); - if (is_array($tmpaltaliases)) - { - foreach ($tmpaltaliases as $tmpaliasalt) - { + if (is_array($tmpaltaliases)) { + foreach ($tmpaltaliases as $tmpaliasalt) { dol_syslog("We delete old alt alias pages name=".trim($tmpaliasalt)); dol_delete_file($pathofwebsite.'/'.trim($tmpaliasalt).'.php'); @@ -1812,20 +1826,20 @@ if ($action == 'updatemeta') // Save page main alias $result = dolSavePageAlias($filealias, $object, $objectpage); - if (!$result) setEventMessages('Failed to write file '.$filealias, null, 'errors'); + if (!$result) { + setEventMessages('Failed to write file '.$filealias, null, 'errors'); + } // Save alt aliases - if (!empty($objectpage->aliasalt)) - { + if (!empty($objectpage->aliasalt)) { $tmpaltaliases = explode(',', $objectpage->aliasalt); - if (is_array($tmpaltaliases)) - { - foreach ($tmpaltaliases as $tmpaliasalt) - { - if (trim($tmpaliasalt)) - { + if (is_array($tmpaltaliases)) { + foreach ($tmpaltaliases as $tmpaliasalt) { + if (trim($tmpaliasalt)) { $filealias = $pathofwebsite.'/'.trim($tmpaliasalt).'.php'; $result = dolSavePageAlias($filealias, $object, $objectpage); - if (!$result) setEventMessages('Failed to write file '.basename($filealias), null, 'errors'); + if (!$result) { + setEventMessages('Failed to write file '.basename($filealias), null, 'errors'); + } } } } @@ -1834,52 +1848,44 @@ if ($action == 'updatemeta') // Save page of content $result = dolSavePageContent($filetpl, $object, $objectpage); - if ($result) - { + if ($result) { setEventMessages($langs->trans("Saved"), null, 'mesgs'); - if (!GETPOSTISSET('updateandstay')) // If we click on "Save And Stay", we do not make the redirect - { + if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we do not make the redirect //header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); //exit; $action = 'preview'; - } - else { + } else { $action = 'editmeta'; } - } - else { + } else { setEventMessages('Failed to write file '.$filetpl, null, 'errors'); //header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); - //exit; + //exit; $action = 'preview'; } } } // Update page -if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'confirm_createfromclone' || $action == 'confirm_createpagefromclone') - || ($action == 'preview' && (GETPOST('refreshsite') || GETPOST('refreshpage') || GETPOST('preview')))) -{ +if ($usercanedit && (($action == 'updatesource' || $action == 'updatecontent' || $action == 'confirm_createfromclone' || $action == 'confirm_createpagefromclone') + || ($action == 'preview' && (GETPOST('refreshsite') || GETPOST('refreshpage') || GETPOST('preview'))))) { $object->fetch(0, $websitekey); $website = $object; - if ($action == 'confirm_createfromclone') - { + if ($action == 'confirm_createfromclone') { $db->begin(); $objectnew = new Website($db); $result = $objectnew->createFromClone($user, GETPOST('id', 'int'), GETPOST('siteref', 'aZ09'), (GETPOST('newlang', 'aZ09') ?GETPOST('newlang', 'aZ09') : '')); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($objectnew->error, $objectnew->errors, 'errors'); $action = 'preview'; $db->rollback(); - } - else { + } else { $object = $objectnew; $id = $object->id; $pageid = $object->fk_default_home; @@ -1889,12 +1895,10 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf } } - if ($action == 'confirm_createpagefromclone') - { + if ($action == 'confirm_createpagefromclone') { $istranslation = (GETPOST('is_a_translation', 'aZ09') == 'on' ? 1 : 0); // Protection if it is a translation page - if ($istranslation) - { + if ($istranslation) { if (GETPOST('newlang', 'aZ09') == $objectpage->lang || !GETPOST('newlang', 'aZ09')) { $error++; setEventMessages($langs->trans("LanguageMustNotBeSameThanClonedPage"), null, 'errors'); @@ -1907,27 +1911,23 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf } } - if (!$error) - { + if (!$error) { $db->begin(); $newwebsiteid = GETPOST('newwebsite', 'int'); $pathofwebsitenew = $pathofwebsite; $tmpwebsite = new Website($db); - if ($newwebsiteid > 0 && $newwebsiteid != $object->id) - { + if ($newwebsiteid > 0 && $newwebsiteid != $object->id) { $tmpwebsite->fetch($newwebsiteid); $pathofwebsitenew = $dolibarr_main_data_root.'/website/'.$tmpwebsite->ref; - } - else { + } else { $tmpwebsite = $object; } $objectpage = new WebsitePage($db); $resultpage = $objectpage->createFromClone($user, $pageid, GETPOST('newpageurl', 'aZ09'), (GETPOST('newlang', 'aZ09') ? GETPOST('newlang', 'aZ09') : ''), $istranslation, $newwebsiteid, GETPOST('newtitle', 'alphanohtml')); - if ($resultpage < 0) - { + if ($resultpage < 0) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); $action = 'createpagefromclone'; @@ -1945,8 +1945,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf dolSavePageContent($filetpl, $tmpwebsite, $resultpage); // Switch on the new page if web site of new page/container is same - if (empty($newwebsiteid) || $newwebsiteid == $object->id) - { + if (empty($newwebsiteid) || $newwebsiteid == $object->id) { $pageid = $resultpage->id; } @@ -1957,47 +1956,39 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf $res = 0; - if (!$error) - { + if (!$error) { // Check symlink to medias and restore it if ko $pathtomedias = DOL_DATA_ROOT.'/medias'; $pathtomediasinwebsite = $pathofwebsite.'/medias'; - if (!is_link(dol_osencode($pathtomediasinwebsite))) - { + if (!is_link(dol_osencode($pathtomediasinwebsite))) { dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); } /*if (GETPOST('savevirtualhost') && $object->virtualhost != GETPOST('previewsite')) - { - $object->virtualhost = GETPOST('previewsite', 'alpha'); - $object->update($user); - }*/ + { + $object->virtualhost = GETPOST('previewsite', 'alpha'); + $object->update($user); + }*/ $objectpage->fk_website = $object->id; - if ($pageid > 0) - { + if ($pageid > 0) { $res = $objectpage->fetch($pageid); - } - else { + } else { $res = 0; - if ($object->fk_default_home > 0) - { + if ($object->fk_default_home > 0) { $res = $objectpage->fetch($object->fk_default_home); } - if (!($res > 0)) - { + if (!($res > 0)) { $res = $objectpage->fetch(0, $object->id); } } } - if (!$error && $res > 0) - { - if ($action == 'updatesource' || $action == 'updatecontent') - { + if (!$error && $res > 0) { + if ($action == 'updatesource' || $action == 'updatecontent') { $db->begin(); $phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content); @@ -2007,30 +1998,33 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf // Security analysis $phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content); //print dol_escape_htmltag($phpfullcodestring);exit; - $forbiddenphpcommands = array("exec", "passthru", "system", "shell_exec", "proc_open"); - if (empty($conf->global->WEBSITE_PHP_ALLOW_WRITE)) // If option is not on, we disallow functions to write files - { + $forbiddenphpcommands = array("exec", "passthru", "system", "shell_exec", "proc_open", "eval", "dol_eval"); + if (empty($conf->global->WEBSITE_PHP_ALLOW_WRITE)) { // If option is not on, we disallow functions to write files $forbiddenphpcommands = array_merge($forbiddenphpcommands, array("fopen", "file_put_contents", "fputs", "fputscsv", "fwrite", "fpassthru", "unlink", "mkdir", "rmdir", "symlink", "touch", "umask")); } - foreach ($forbiddenphpcommands as $forbiddenphpcommand) - { - if (preg_match('/'.$forbiddenphpcommand.'\s*\(/ms', $phpfullcodestring)) - { + foreach ($forbiddenphpcommands as $forbiddenphpcommand) { + if (preg_match('/'.$forbiddenphpcommand.'\s*\(/ms', $phpfullcodestring)) { $error++; setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", $forbiddenphpcommand), null, 'errors'); - if ($action == 'updatesource') $action = 'editsource'; - if ($action == 'updatecontent') $action = 'editcontent'; + if ($action == 'updatesource') { + $action = 'editsource'; + } + if ($action == 'updatecontent') { + $action = 'editcontent'; + } } } - if (empty($user->rights->website->writephp)) - { - if ($phpfullcodestringold != $phpfullcodestring) - { + if (empty($user->rights->website->writephp)) { + if ($phpfullcodestringold != $phpfullcodestring) { $error++; setEventMessages($langs->trans("NotAllowedToAddDynamicContent"), null, 'errors'); - if ($action == 'updatesource') $action = 'editsource'; - if ($action == 'updatecontent') $action = 'editcontent'; + if ($action == 'updatesource') { + $action = 'editsource'; + } + if ($action == 'updatecontent') { + $action = 'editcontent'; + } } } @@ -2040,16 +2034,18 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf $res = $objectpage->update($user); - if ($res < 0) - { + if ($res < 0) { $error++; setEventMessages($objectpage->error, $objectpage->errors, 'errors'); - if ($action == 'updatesource') $action = 'editsource'; - if ($action == 'updatecontent') $action = 'editcontent'; + if ($action == 'updatesource') { + $action = 'editsource'; + } + if ($action == 'updatecontent') { + $action = 'editcontent'; + } } - if (!$error) - { + if (!$error) { $db->commit(); $filemaster = $pathofwebsite.'/master.inc.php'; @@ -2061,7 +2057,9 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf // Now generate the master.inc.php page $result = dolSaveMasterFile($filemaster); - if (!$result) setEventMessages('Failed to write the master file file '.$filemaster, null, 'errors'); + if (!$result) { + setEventMessages('Failed to write the master file file '.$filemaster, null, 'errors'); + } // Now delete the old alias.php page if we removed one /*if (!empty($fileoldalias)) @@ -2083,16 +2081,16 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf // Save page alias $result = dolSavePageAlias($filealias, $object, $objectpage); - if (!$result) setEventMessages('Failed to write the alias file '.basename($filealias), null, 'errors'); + if (!$result) { + setEventMessages('Failed to write the alias file '.basename($filealias), null, 'errors'); + } // Save page content - $result = dolSavePageContent($filetpl, $object, $objectpage); - if ($result) - { + $result = dolSavePageContent($filetpl, $object, $objectpage, 1); + if ($result) { setEventMessages($langs->trans("Saved"), null, 'mesgs'); - if (!GETPOSTISSET('updateandstay')) // If we click on "Save And Stay", we do not make the redirect - { + if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we do not make the redirect if ($backtopage) { header("Location: ".$backtopage); exit; @@ -2101,13 +2099,17 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf exit; } } else { - if ($action == 'updatesource') $action = 'editsource'; - if ($action == 'updatecontent') $action = 'editcontent'; + if ($action == 'updatesource') { + $action = 'editsource'; + } + if ($action == 'updatecontent') { + $action = 'editcontent'; + } } } else { setEventMessages('Failed to write file '.$filetpl, null, 'errors'); header("Location: ".$_SERVER["PHP_SELF"].'?website='.$websitekey.'&pageid='.$pageid); - exit; + exit; } } else { $db->rollback(); @@ -2117,10 +2119,8 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf exit; } } else { - if (!$error) - { - if (empty($websitekey) || $websitekey == '-1') - { + if (!$error) { + if (empty($websitekey) || $websitekey == '-1') { setEventMessages($langs->trans("NoWebSiteCreateOneFirst"), null, 'warnings'); } else { setEventMessages($langs->trans("NoPageYet"), null, 'warnings'); @@ -2131,12 +2131,10 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf } // Export site -if ($action == 'exportsite') -{ +if ($action == 'exportsite' && !empty($user->rights->website->export)) { $fileofzip = $object->exportWebSite(); - if ($fileofzip) - { + if ($fileofzip) { $file_name = basename($fileofzip); header("Content-Type: application/zip"); @@ -2145,19 +2143,29 @@ if ($action == 'exportsite') readfile($fileofzip); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = 'preview'; } } // Regenerate site -if ($action == 'regeneratesite') -{ +if ($action == 'regeneratesite' && $usercanedit) { + // Check symlink to medias and restore it if ko. Recreate also dir of website if not found. + $pathtomedias = DOL_DATA_ROOT.'/medias'; + $pathtomediasinwebsite = $pathofwebsite.'/medias'; + if (!is_link(dol_osencode($pathtomediasinwebsite))) { + dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); + dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists + $result = symlink($pathtomedias, $pathtomediasinwebsite); + if (!$result) { + setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); + $action = 'preview'; + } + } + $result = $object->rebuildWebSiteFiles(); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("PagesRegenerated", $result), null, 'mesgs'); $action = 'preview'; } else { @@ -2167,83 +2175,68 @@ if ($action == 'regeneratesite') } // Import site -if ($action == 'importsiteconfirm') -{ - if (empty($_FILES) && !GETPOSTISSET('templateuserfile')) - { +if ($action == 'importsiteconfirm' && $usercanedit) { + if (empty($_FILES) && !GETPOSTISSET('templateuserfile')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); $action = 'importsite'; - } - else { - if (!empty($_FILES) || GETPOSTISSET('templateuserfile')) - { - // Check symlink to medias and restore it if ko + } else { + if (!empty($_FILES) || GETPOSTISSET('templateuserfile')) { + // Check symlink to medias and restore it if ko. Recreate also dir of website if not found. $pathtomedias = DOL_DATA_ROOT.'/medias'; $pathtomediasinwebsite = $pathofwebsite.'/medias'; - if (!is_link(dol_osencode($pathtomediasinwebsite))) - { + if (!is_link(dol_osencode($pathtomediasinwebsite))) { dol_syslog("Create symlink for ".$pathtomedias." into name ".$pathtomediasinwebsite); dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); - if (!$result) - { + if (!$result) { setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); $action = 'importsite'; } } $fileofzip = ''; - if (GETPOSTISSET('templateuserfile')) - { + if (GETPOSTISSET('templateuserfile')) { $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); - } - elseif (!empty($_FILES)) - { - if (is_array($_FILES['userfile']['tmp_name'])) $userfiles = $_FILES['userfile']['tmp_name']; - else $userfiles = array($_FILES['userfile']['tmp_name']); + } elseif (!empty($_FILES)) { + if (is_array($_FILES['userfile']['tmp_name'])) { + $userfiles = $_FILES['userfile']['tmp_name']; + } else { + $userfiles = array($_FILES['userfile']['tmp_name']); + } - foreach ($userfiles as $key => $userfile) - { - if (empty($_FILES['userfile']['tmp_name'][$key])) - { + foreach ($userfiles as $key => $userfile) { + if (empty($_FILES['userfile']['tmp_name'][$key])) { $error++; if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); $action = 'importsite'; - } - else { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); $action = 'importsite'; } } } - if (!$error) - { + if (!$error) { $upload_dir = $conf->website->dir_temp; $result = dol_add_file_process($upload_dir, 1, -1, 'userfile', ''); } // Get name of file (take last one if several name provided) $fileofzip = $upload_dir.'/unknown'; - foreach ($_FILES as $key => $ifile) - { - foreach ($ifile['name'] as $key2 => $ifile2) - { + foreach ($_FILES as $key => $ifile) { + foreach ($ifile['name'] as $key2 => $ifile2) { $fileofzip = $upload_dir.'/'.$ifile2; } } } - if (!$error) - { + if (!$error) { $result = $object->importWebSite($fileofzip); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'importsite'; - } - else { + } else { // Force mode dynamic on dolibarr_set_const($db, 'WEBSITE_SUBCONTAINERSINLINE', 1, 'chaine', 0, '', $conf->entity); @@ -2255,7 +2248,184 @@ if ($action == 'importsiteconfirm') } } +$domainname = '0.0.0.0:8080'; +$tempdir = $conf->website->dir_output.'/'.$websitekey.'/'; +// Generate web site sitemaps +if ($action == 'generatesitemaps' && $usercanedit) { + $domtree = new DOMDocument('1.0', 'UTF-8'); + + $root = $domtree->createElementNS('http://www.sitemaps.org/schemas/sitemap/0.9', 'urlset'); + $root->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + + $domtree->formatOutput = true; + + $xmlname = 'sitemap.'.$websitekey.'.xml'; + + $sql = "SELECT wp.rowid, wp.type_container , wp.pageurl, wp.lang, wp.fk_page, wp.tms as tms,"; + $sql .= " w.virtualhost, w.fk_default_home"; + $sql .= " FROM ".MAIN_DB_PREFIX."website_page as wp, ".MAIN_DB_PREFIX."website as w"; + $sql .= " WHERE wp.type_container IN ('page', 'blogpost')"; + $sql .= " AND wp.fk_website = w.rowid"; + $sql .= " AND wp.status = ".WebsitePage::STATUS_VALIDATED; + $sql .= " AND wp.pageurl NOT IN ('404', '500', '501', '503')"; + $sql .= " AND w.ref = '".dol_escape_json($websitekey)."'"; + $sql .= " ORDER BY wp.tms DESC, wp.rowid DESC"; + $resql = $db->query($sql); + if ($resql) { + $num_rows = $db->num_rows($resql); + if ($num_rows > 0) { + $i = 0; + while ($i < $num_rows) { + $objp = $db->fetch_object($resql); + $url = $domtree->createElement('url'); + + $shortlangcode = ''; + if ($objp->lang) { + $shortlangcode = substr($objp->lang, 0, 2); // en_US or en-US -> en + } + if (empty($shortlangcode)) { + $shortlangcode = substr($object->lang, 0, 2); // en_US or en-US -> en + } + + // Forge $pageurl, adding language prefix if it is an alternative language + $pageurl = $objp->pageurl.'.php'; + if ($objp->fk_default_home == $objp->rowid) { + $pageurl = ''; + } else { + if ($shortlangcode != substr($object->lang, 0, 2)) { + $pageurl = $shortlangcode.'/'.$pageurl; + } + } + + if ($objp->virtualhost) { + $domainname = $objp->virtualhost; + } + if (! preg_match('/^http/i', $domainname)) { + $domainname .= 'https://'.$domainname; + } + //$pathofpage = $dolibarr_main_url_root.'/'.$pageurl.'.php'; + + // URL of sitemaps must end with trailing slash if page is '' + $loc = $domtree->createElement('loc', $domainname.'/'.$pageurl); + $lastmod = $domtree->createElement('lastmod', dol_print_date($db->jdate($objp->tms), 'dayrfc', 'gmt')); + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values + $priority = $domtree->createElement('priority', '1'); + + $url->appendChild($loc); + $url->appendChild($lastmod); + // Add suggested frequency for refresh + if (!empty($conf->global->WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ)) { + $url->appendChild($changefreq); + } + // Add higher priority for home page + if ($objp->fk_default_home == $objp->rowid) { + $url->appendChild($priority); + } + + // Now add alternate language entries + if ($object->isMultiLang()) { + $alternatefound = 0; + + // Add page "translation of" + $translationof = $objp->fk_page; + if ($translationof) { + $tmppage = new WebsitePage($db); + $tmppage->fetch($translationof); + if ($tmppage->id > 0) { + $tmpshortlangcode = ''; + if ($tmppage->lang) { + $tmpshortlangcode = preg_replace('/[_-].*$/', '', $tmppage->lang); // en_US or en-US -> en + } + if (empty($tmpshortlangcode)) { + $tmpshortlangcode = preg_replace('/[_-].*$/', '', $object->lang); // en_US or en-US -> en + } + if ($tmpshortlangcode != $shortlangcode) { + $xhtmllink = $domtree->createElement('xhtml:link', ''); + $xhtmllink->setAttribute("rel", "alternante"); + $xhtmllink->setAttribute("hreflang", $tmpshortlangcode); + $xhtmllink->setAttribute("href", $domainname.($objp->fk_default_home == $tmppage->id ? '/' : (($tmpshortlangcode != substr($objp->lang, 0, 2)) ? '/'.$tmpshortlangcode : '').'/'.$tmppage->pageurl.'.php')); + $url->appendChild($xhtmllink); + + $alternatefound++; + } + } + } + + // Add "has translation pages" + $sql = 'SELECT rowid as id, lang, pageurl from '.MAIN_DB_PREFIX.'website_page where fk_page IN ('.$db->sanitize($objp->rowid.($translationof ? ', '.$translationof : '')).")"; + $resqlhastrans = $db->query($sql); + if ($resqlhastrans) { + $num_rows_hastrans = $db->num_rows($resqlhastrans); + if ($num_rows_hastrans > 0) { + while ($objhastrans = $db->fetch_object($resqlhastrans)) { + $tmpshortlangcode = ''; + if ($objhastrans->lang) { + $tmpshortlangcode = preg_replace('/[_-].*$/', '', $objhastrans->lang); // en_US or en-US -> en + } + if ($tmpshortlangcode != $shortlangcode) { + $xhtmllink = $domtree->createElement('xhtml:link', ''); + $xhtmllink->setAttribute("rel", "alternate"); + $xhtmllink->setAttribute("hreflang", $tmpshortlangcode); + $xhtmllink->setAttribute("href", $domainname.($objp->fk_default_home == $objhastrans->id ? '/' : (($tmpshortlangcode != substr($objp->lang, 0, 2) ? '/'.$tmpshortlangcode : '')).'/'.$objhastrans->pageurl.'.php')); + $url->appendChild($xhtmllink); + + $alternatefound++; + } + } + } + } else { + dol_print_error($db); + } + + if ($alternatefound) { + // Add myself + $xhtmllink = $domtree->createElement('xhtml:link', ''); + $xhtmllink->setAttribute("rel", "alternate"); + $xhtmllink->setAttribute("hreflang", $shortlangcode); + $xhtmllink->setAttribute("href", $domainname.'/'.$pageurl); + $url->appendChild($xhtmllink); + } + } + + $root->appendChild($url); + $i++; + } + $domtree->appendChild($root); + if ($domtree->save($tempdir.$xmlname)) { + if (!empty($conf->global->MAIN_UMASK)) { + @chmod($tempdir.$xmlname, octdec($conf->global->MAIN_UMASK)); + } + setEventMessages($langs->trans("SitemapGenerated"), null, 'mesgs'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } else { + dol_print_error($db); + } + + // Add the entry Sitemap: into the robot file. + $robotcontent = @file_get_contents($filerobot); + $result = preg_replace('/<?php // BEGIN PHP[^?]END PHP ?>\n/ims', '', $robotcontent); + if ($result) { + $robotcontent = $result; + } + $robotsitemap = "Sitemap: ".$domainname."/".$xmlname; + $result = strpos($robotcontent, 'Sitemap: '); + if ($result) { + $result = preg_replace("/Sitemap.*\n/", $robotsitemap, $robotcontent); + $robotcontent = $result ? $result : $robotcontent; + } else { + $robotcontent .= $robotsitemap."\n"; + } + $result = dolSaveRobotFile($filerobot, $robotcontent); + if (!$result) { + $error++; + setEventMessages('Failed to write file '.$filerobot, null, 'errors'); + } + $action = 'preview'; +} /* @@ -2267,6 +2437,11 @@ $formadmin = new FormAdmin($db); $formwebsite = new FormWebsite($db); $formother = new FormOther($db); +// Confirm generation of website sitemaps +if ($action == 'confirmgeneratesitemaps') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$website->ref, $langs->trans('ConfirmSitemapsCreation'), $langs->trans('ConfirmGenerateSitemaps', $object->ref), 'generatesitemaps', '', "yes", 1); + $action = 'preview'; +} $helpurl = 'EN:Module_Website|FR:Module_Website_FR|ES:M&oacute;dulo_Website'; $arrayofjs = array( @@ -2283,7 +2458,9 @@ $moreheadjs = ''; $arrayofjs[] = 'includes/jquery/plugins/blockUI/jquery.blockUI.js'; $arrayofjs[] = 'core/js/blockUI.js'; // Used by ecm/tpl/enabledfiletreeajax.tpl.php -if (empty($conf->global->MAIN_ECM_DISABLE_JS)) $arrayofjs[] = "includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js"; +if (empty($conf->global->MAIN_ECM_DISABLE_JS)) { + $arrayofjs[] = "includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js"; +} $moreheadjs .= '<script type="text/javascript">'."\n"; $moreheadjs .= 'var indicatorBlockUI = \''.DOL_URL_ROOT."/theme/".$conf->theme."/img/working.gif".'\';'."\n"; @@ -2296,56 +2473,43 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/ print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; -if ($action == 'createsite') -{ +if ($action == 'createsite') { print '<input type="hidden" name="action" value="addsite">'; } -if ($action == 'createcontainer') -{ +if ($action == 'createcontainer') { print '<input type="hidden" name="action" value="addcontainer">'; } -if ($action == 'editcss') -{ +if ($action == 'editcss') { print '<input type="hidden" name="action" value="updatecss">'; } -if ($action == 'editmenu') -{ +if ($action == 'editmenu') { print '<input type="hidden" name="action" value="updatemenu">'; } -if ($action == 'setashome') -{ +if ($action == 'setashome') { print '<input type="hidden" name="action" value="updateashome">'; } -if ($action == 'editmeta') -{ +if ($action == 'editmeta') { print '<input type="hidden" name="action" value="updatemeta">'; } -if ($action == 'editsource') -{ +if ($action == 'editsource') { print '<input type="hidden" name="action" value="updatesource">'; } -if ($action == 'editcontent') -{ +if ($action == 'editcontent') { print '<input type="hidden" name="action" value="updatecontent">'; } -if ($action == 'edit') -{ +if ($action == 'edit') { print '<input type="hidden" name="action" value="update">'; } -if ($action == 'importsite') -{ +if ($action == 'importsite') { print '<input type="hidden" name="action" value="importsiteconfirm">'; } -if ($action == 'file_manager') -{ +if ($action == 'file_manager') { print '<input type="hidden" name="action" value="file_manager">'; } -if ($action == 'replacesite') -{ +if ($action == 'replacesite') { print '<input type="hidden" name="action" value="replacesiteconfirm">'; } -if ($action == 'replacesiteconfirm') -{ +if ($action == 'replacesiteconfirm') { print '<input type="hidden" name="action" value="replacesiteconfirm">'; } @@ -2353,28 +2517,37 @@ print '<div>'; // Add a margin under toolbar ? $style = ''; -if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource' && !GETPOST('createpagefromclone', 'alphanohtml')) $style = ' margin-bottom: 5px;'; +if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource' && !GETPOST('createpagefromclone', 'alphanohtml')) { + $style = ' margin-bottom: 5px;'; +} -if (!GETPOST('hide_websitemenu')) -{ +if (!GETPOST('hide_websitemenu')) { $disabled = ''; - if (empty($user->rights->website->write)) $disabled = ' disabled="disabled"'; + if (empty($user->rights->website->write)) { + $disabled = ' disabled="disabled"'; + } + $disabledexport = ''; + if (empty($user->rights->website->export)) { + $disabledexport = ' disabled="disabled"'; + } - if ($websitekey) - { + if ($websitekey) { $virtualurl = ''; $dataroot = DOL_DATA_ROOT.'/website/'.$websitekey; - if (!empty($object->virtualhost)) $virtualurl = $object->virtualhost; + if (!empty($object->virtualhost)) { + $virtualurl = $object->virtualhost; + } } $array = array(); - if ($object->id > 0) - { + if ($object->id > 0) { $array = $objectpage->fetchAll($object->id, 'ASC,ASC', 'type_container,pageurl'); $object->lines = $array; } - if (!is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors); + if (!is_array($array) && $array < 0) { + dol_print_error('', $objectpage->error, $objectpage->errors); + } $atleastonepage = (is_array($array) && count($array) > 0); @@ -2402,21 +2575,26 @@ if (!GETPOST('hide_websitemenu')) print '<span class="websiteselection">'; $out = ''; $out .= '<select name="website" class="minwidth100 width200 maxwidth150onsmartphone" id="website">'; - if (empty($object->records)) $out .= '<option value="-1">&nbsp;</option>'; + if (empty($object->records)) { + $out .= '<option value="-1">&nbsp;</option>'; + } if (!empty($conf->use_javascript_ajax)) { $valueoption = '<span class="classlink">'.img_picto('', 'add', 'class="paddingrightonly"').$langs->trans("AddWebsite").'</span>'; $out .= '<option value="-2" data-html="'.dol_escape_htmltag($valueoption).'">'.$valueoption.'</option>'; } // Loop on each sites $i = 0; - foreach ($object->records as $key => $valwebsite) - { + foreach ($object->records as $key => $valwebsite) { if (empty($websitekey)) { - if ($action != 'createsite') $websitekey = $valwebsite->ref; + if ($action != 'createsite') { + $websitekey = $valwebsite->ref; + } } $out .= '<option value="'.$valwebsite->ref.'"'; - if ($websitekey == $valwebsite->ref) $out .= ' selected'; // To preselect a value + if ($websitekey == $valwebsite->ref) { + $out .= ' selected'; // To preselect a value + } //$outoption = $valwebsite->getLibStatut(3).' '.$valwebsite->ref.' '; $outoption = (($valwebsite->status == $valwebsite::STATUS_DRAFT) ? '<span class="opacitymedium">' : '').$valwebsite->ref.(($valwebsite->status == $valwebsite::STATUS_DRAFT) ? '</span>' : ''); $out .= ' data-html="'.dol_escape_htmltag($outoption).'"'; @@ -2448,11 +2626,11 @@ if (!GETPOST('hide_websitemenu')) print '<input type="image" class="valignmiddle" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshsite" value="'.$langs->trans("Load").'">'; } - if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) - { + if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { print ' &nbsp; '; - print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">'; + //print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">'; + print '<a href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid.'&action=editcss" class="button bordertransp"'.$disabled.'>'.dol_escape_htmltag($langs->trans("EditCss")).'</a>'; $importlabel = $langs->trans("ImportSite"); $exportlabel = $langs->trans("ExportSite"); @@ -2461,16 +2639,14 @@ if (!GETPOST('hide_websitemenu')) $exportlabel = $langs->trans("Export"); } - if ($atleastonepage) - { + if ($atleastonepage) { print '<input type="submit" class="button bordertransp" disabled="disabled" value="'.dol_escape_htmltag($importlabel).'" name="importsite">'; - } - else { + } else { print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($importlabel).'" name="importsite">'; } //print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">'; - print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">'; + print '<input type="submit" class="button bordertransp"'.$disabledexport.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">'; print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">'; @@ -2481,13 +2657,17 @@ if (!GETPOST('hide_websitemenu')) print ' &nbsp; '; + // Generate site map + print '<a href="'.$_SERVER["PHP_SEFL"].'?action=confirmgeneratesitemaps&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'"><span class="fa fa-sitemap"><span></a>'; + + print ' &nbsp; '; + print '<a href="'.$_SERVER["PHP_SEFL"].'?action=replacesite&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'"><span class="fa fa-search"><span></a>'; } print '</span>'; - if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) - { + if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { print '<span class="websiteselection">'; //print '<a href="'.$_SERVER["PHP_SELF"].'?action=file_manager&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'"><span class="fa fa-image"><span></a>'; print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '<span class="fa fa-image"><span>', '/website/index.php?action=file_manager&website='.$website->ref, $disabled); @@ -2506,8 +2686,7 @@ if (!GETPOST('hide_websitemenu')) print '<span class="websitetools websiteselection">'; - if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite') - { + if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite') { $urlext = $virtualurl; $urlint = $urlwithroot.'/public/website/index.php?website='.$websitekey; @@ -2516,22 +2695,16 @@ if (!GETPOST('hide_websitemenu')) $linktotestonwebserver .= '<span class="hideonsmartphone paddingrightonly">'.$langs->trans("TestDeployOnWeb", $virtualurl).'</span>'.img_picto('', 'globe'); $linktotestonwebserver .= '</a>'; $htmltext = ''; - if (empty($object->fk_default_home)) - { + if (empty($object->fk_default_home)) { $htmltext .= '<br><span class="error">'.$langs->trans("YouMustDefineTheHomePage").'</span><br><br>'; - } - elseif (empty($virtualurl)) - { + } elseif (empty($virtualurl)) { //$htmltext .= '<br><span class="error">'.$langs->trans("VirtualHostUrlNotDefined").'</span><br><br>'; - } - else { + } else { $htmltext .= '<br><center>'.$langs->trans("GoTo").' <a href="'.$virtualurl.'" target="_website">'.$virtualurl.'</a></center><br>'; } - if (!empty($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER)) - { + if (!empty($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER)) { $htmltext .= '<br>'.$langs->trans($conf->global->WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER); - } - else { + } else { $htmltext .= $langs->trans("SetHereVirtualHost", $dataroot); $htmltext .= '<br>'; $htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); @@ -2568,12 +2741,19 @@ if (!GETPOST('hide_websitemenu')) print '</span>'; } - if (in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm'))) - { - if ($action == 'editcss') print '<input type="submit" id="savefilean stay" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">'; - if (preg_match('/^create/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; - if (preg_match('/^edit/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; - if ($action != 'preview') print '<input type="submit" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">'; + if (in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm'))) { + if ($action == 'editcss') { + print '<input type="submit" id="savefilean stay" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">'; + } + if (preg_match('/^create/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') { + print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; + } + if (preg_match('/^edit/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') { + print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; + } + if ($action != 'preview') { + print '<input type="submit" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">'; + } } print '</span>'; @@ -2582,8 +2762,7 @@ if (!GETPOST('hide_websitemenu')) // Toolbar for pages // - if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm')) && !$file_manager) - { + if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm')) && !$file_manager) { print '</div>'; // Close current websitebar to open a new one print '<!-- Bar for websitepage -->'; @@ -2599,8 +2778,7 @@ if (!GETPOST('hide_websitemenu')) //print '<span class="websiteselection">'; - if ($action != 'addcontainer') - { + if ($action != 'addcontainer') { $out = ''; $s = $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); @@ -2629,8 +2807,7 @@ if (!GETPOST('hide_websitemenu')) } print $out; - } - else { + } else { print $langs->trans("New"); } @@ -2641,47 +2818,50 @@ if (!GETPOST('hide_websitemenu')) // Print nav arrows $pagepreviousid = 0; $pagenextid = 0; - if ($pageid) - { + if ($pageid) { $sql = 'SELECT MAX(rowid) as pagepreviousid FROM '.MAIN_DB_PREFIX.'website_page WHERE rowid < '.$pageid.' AND fk_website = '.$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $pagepreviousid = $obj->pagepreviousid; } + } else { + dol_print_error($db); } - else dol_print_error($db); $sql = 'SELECT MIN(rowid) as pagenextid FROM '.MAIN_DB_PREFIX.'website_page WHERE rowid > '.$pageid.' AND fk_website = '.$object->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $pagenextid = $obj->pagenextid; } + } else { + dol_print_error($db); } - else dol_print_error($db); } - if ($pagepreviousid) print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagepreviousid.'&action='.$action.'">'.img_previous($langs->trans("PreviousContainer")).'</a>'; - else print '<span class="valignmiddle opacitymedium">'.img_previous($langs->trans("Previous")).'</span>'; - if ($pagenextid) print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagenextid.'&action='.$action.'">'.img_next($langs->trans("NextContainer")).'</a>'; - else print '<span class="valignmiddle opacitymedium">'.img_next($langs->trans("Next")).'</span>'; + if ($pagepreviousid) { + print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagepreviousid.'&action='.$action.'">'.img_previous($langs->trans("PreviousContainer")).'</a>'; + } else { + print '<span class="valignmiddle opacitymedium">'.img_previous($langs->trans("Previous")).'</span>'; + } + if ($pagenextid) { + print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagenextid.'&action='.$action.'">'.img_next($langs->trans("NextContainer")).'</a>'; + } else { + print '<span class="valignmiddle opacitymedium">'.img_next($langs->trans("Next")).'</span>'; + } $websitepage = new WebSitePage($db); - if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')) - { + if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')) { $websitepage->fetch($pageid); } - if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite') - { + if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite') { $disabled = ''; - if (empty($user->rights->website->write)) $disabled = ' disabled="disabled"'; + if (empty($user->rights->website->write)) { + $disabled = ' disabled="disabled"'; + } // Confirmation delete site if ($action == 'deletesite') { @@ -2710,8 +2890,7 @@ if (!GETPOST('hide_websitemenu')) print $formconfirm; } - if ($pageid > 0 && $atleastonepage) // pageid can be set without pages, if homepage of site is set and all pages were removed - { + if ($pageid > 0 && $atleastonepage) { // pageid can be set without pages, if homepage of site is set and all pages were removed // Confirmation to clone if ($action == 'createpagefromclone') { // Create an array for form @@ -2743,20 +2922,32 @@ if (!GETPOST('hide_websitemenu')) $value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1); $formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550); print $formconfirm; } print ' &nbsp; '; - print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditPageMeta")).'" name="editmeta">'; + //print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditPageMeta")).'" name="editmeta">'; + print '<a href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid.'&action=editmeta" class="button bordertransp"'.$disabled.'>'.dol_escape_htmltag($langs->trans("EditPageMeta")).'</a>'; - print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditHTMLSource")).'" name="editsource">'; + //print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditHTMLSource")).'" name="editsource">'; + print '<a href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid.'&action=editsource" class="button bordertransp"'.$disabled.'>'.dol_escape_htmltag($langs->trans("EditHTMLSource")).'</a>'; print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; print '<div class="websiteselectionsection inline-block">'; - print '<div class="inline-block marginrightonly">'; + + print '<div class="inline-block marginrightonly">'; // Button include dynamic contant + print $langs->trans("ShowSubcontainers"); + if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) { + print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; + } else { + print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=unsetshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', false, 0, 0, '', 'nomarginleft').'</a>'; + } + print '</div>'; + + print '<div class="inline-block marginrightonly">'; // Button edit inline print '<span id="switchckeditorinline">'."\n"; print '<!-- Code to enabled edit inline ckeditor -->'."\n"; @@ -2808,45 +2999,29 @@ if (!GETPOST('hide_websitemenu')) //$disableeditinline = $websitepage->grabbed_from; $disableeditinline = 0; - if ($disableeditinline) - { + if ($disableeditinline) { //print '<input type="submit" class="button bordertransp" disabled="disabled" title="'.dol_escape_htmltag($langs->trans("OnlyEditionOfSourceForGrabbedContent")).'" value="'.dol_escape_htmltag($langs->trans("EditWithEditor")).'" name="editcontent">'; print '<a class="nobordertransp opacitymedium nohoverborder marginleftonlyshort"'.$disabled.' href="#" disabled="disabled" title="'.dol_escape_htmltag($langs->trans("OnlyEditionOfSourceForGrabbedContent")).'">'.img_picto($langs->trans("OnlyEditionOfSourceForGrabbedContent"), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; - } - else { + } else { //print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditWithEditor")).'" name="editcontent">'; - if (empty($conf->global->WEBSITE_EDITINLINE)) - { + if (empty($conf->global->WEBSITE_EDITINLINE)) { print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=seteditinline&token='.newToken().'">'.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; - } - else { + } else { print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=unseteditinline&token='.newToken().'">'.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', false, 0, 0, '', 'nomarginleft').'</a>'; } } print '</div>'; - print '<div class="inline-block marginrightonly">'; - print $langs->trans("ShowSubcontainers"); - if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) - { - print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; - } - else { - print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=unsetshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', false, 0, 0, '', 'nomarginleft').'</a>'; - } - /*}*/ - print '</div>'; + print '</div>'; // Set page as homepage - if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) - { + if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) { //$disabled=' disabled="disabled"'; //print '<span class="button bordertransp disabled"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'"><span class="fa fa-home"></span></span>'; //print '<input type="submit" class="button bordertransp" disabled="disabled" value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">'; print '<a href="#" class="button bordertransp disabled" disabled="disabled" title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'"><span class="fa fa-home valignmiddle btnTitle-icon"><span></a>'; - } - else { + } else { //$disabled=''; //print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">'; print '<a href="'.$_SERVER["PHP_SEFL"].'?action=setashome&token='.newToken().'&website='.$website->ref.'&pageid='.$pageid.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'"><span class="fa fa-home valignmiddle btnTitle-icon"><span></a>'; @@ -2860,15 +3035,15 @@ if (!GETPOST('hide_websitemenu')) print '<span class="websitetools">'; - if (($pageid > 0 && $atleastonepage) && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) - { + if (($pageid > 0 && $atleastonepage) && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { $realpage = $urlwithroot.'/public/website/index.php?website='.$websitekey.'&pageref='.$websitepage->pageurl; $pagealias = $websitepage->pageurl; $htmltext = $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot); - $htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); - $htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website<br>'.DOL_DATA_ROOT.'/medias', $htmltext); + $htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), '{s1}'); + $htmltext = str_replace('{s1}', $dataroot.'<br>'.DOL_DATA_ROOT.'/medias<br>'.DOL_DOCUMENT_ROOT, $htmltext); + //$htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); + //$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/medias', $htmltext); print '<div class="websiteinputurl inline-block paddingright">'; print '<a class="websitebuttonsitepreview inline-block" id="previewpage" href="'.$realpage.'&nocache='.dol_now().'" class="button" target="tab'.$websitekey.'" alt="'.dol_escape_htmltag($htmltext).'">'; @@ -2896,30 +3071,34 @@ if (!GETPOST('hide_websitemenu')) // TODO Add js to save alias like we save virtual host name and use dynamic virtual host for url of id=previewpageext } - if (!in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm', 'createsite', 'createcontainer', 'createfromclone', 'createpagefromclone', 'deletesite'))) - { - if ($action == 'editsource' || $action == 'editmeta') print '<input type="submit" id="savefilean stay" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">'; - if (preg_match('/^create/', $action)) print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; - if (preg_match('/^edit/', $action)) print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; - if ($action != 'preview') print '<input type="submit" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">'; + if (!in_array($action, array('editcss', 'editmenu', 'file_manager', 'replacesite', 'replacesiteconfirm', 'createsite', 'createcontainer', 'createfromclone', 'createpagefromclone', 'deletesite'))) { + if ($action == 'editsource' || $action == 'editmeta') { + print '<input type="submit" id="savefilean stay" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">'; + } + if (preg_match('/^create/', $action)) { + print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; + } + if (preg_match('/^edit/', $action)) { + print '<input type="submit" id="savefile" class="button buttonforacesave button-save" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">'; + } + if ($action != 'preview') { + print '<input type="submit" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">'; + } } print '</span>'; // end websitetools print '<span class="websitehelp">'; - if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha')) - { + if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha')) { $url = 'https://wiki.dolibarr.org/index.php/Module_Website'; $htmltext = $langs->transnoentitiesnoconv("YouCanEditHtmlSource", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource2", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSourceMore", $url); $htmltext .= '<br>'; - if ($conf->browser->layout == 'phone') - { + if ($conf->browser->layout == 'phone') { print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution'); - } - else { + } else { //img_help(($tooltiptrigger != '' ? 2 : 1), $alt) print $form->textwithpicto($langs->trans("SyntaxHelp").' '.img_help(2, $langs->trans("SyntaxHelp")), $htmltext, 1, 'none', 'inline-block', 1, 2, 'tooltipsubstitution'); } @@ -2927,11 +3106,9 @@ if (!GETPOST('hide_websitemenu')) print '</span>'; // end websitehelp - if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') - { + if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') { // Adding jquery code to change on the fly url of preview ext - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print '<script type="text/javascript" language="javascript"> jQuery(document).ready(function() { jQuery("#websiteinputurl").keyup(function() { @@ -2989,115 +3166,96 @@ $head = array(); * Edit Site HTML header and CSS */ -if ($action == 'editcss') -{ +if ($action == 'editcss') { print '<div class="fiche">'; print '<br>'; - if (!GETPOSTISSET('WEBSITE_CSS_INLINE')) - { + if (!GETPOSTISSET('WEBSITE_CSS_INLINE')) { $csscontent = @file_get_contents($filecss); // Clean the php css file to remove php code and get only css part $csscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $csscontent); - } - else { + } else { $csscontent = GETPOST('WEBSITE_CSS_INLINE', 'none'); } if (!trim($csscontent)) { $csscontent = '/* CSS content (all pages) */'."\nbody.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; } - if (!GETPOSTISSET('WEBSITE_JS_INLINE')) - { + if (!GETPOSTISSET('WEBSITE_JS_INLINE')) { $jscontent = @file_get_contents($filejs); // Clean the php js file to remove php code and get only js part $jscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $jscontent); - } - else { + } else { $jscontent = GETPOST('WEBSITE_JS_INLINE', 'none'); } - if (!trim($jscontent)) $jscontent = '/* JS content (all pages) */'."\n"; + if (!trim($jscontent)) { + $jscontent = '/* JS content (all pages) */'."\n"; + } - if (!GETPOSTISSET('WEBSITE_HTML_HEADER')) - { + if (!GETPOSTISSET('WEBSITE_HTML_HEADER')) { $htmlheadercontent = @file_get_contents($filehtmlheader); // Clean the php htmlheader file to remove php code and get only html part $htmlheadercontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htmlheadercontent); - } - else { + } else { $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); } - if (!trim($htmlheadercontent)) - { + if (!trim($htmlheadercontent)) { $htmlheadercontent = "<html>\n"; $htmlheadercontent .= $htmlheadercontentdefault; $htmlheadercontent .= "</html>"; - } - else { + } else { $htmlheadercontent = preg_replace('/^\s*<html>/ims', '', $htmlheadercontent); $htmlheadercontent = preg_replace('/<\/html>\s*$/ims', '', $htmlheadercontent); $htmlheadercontent = '<html>'."\n".trim($htmlheadercontent)."\n".'</html>'; } - if (!GETPOSTISSET('WEBSITE_ROBOT')) - { + if (!GETPOSTISSET('WEBSITE_ROBOT')) { $robotcontent = @file_get_contents($filerobot); // Clean the php htmlheader file to remove php code and get only html part $robotcontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $robotcontent); - } - else { + } else { $robotcontent = GETPOST('WEBSITE_ROBOT', 'nothtml'); } - if (!trim($robotcontent)) - { + if (!trim($robotcontent)) { $robotcontent .= "# Robot file. Generated with ".DOL_APPLICATION_TITLE."\n"; $robotcontent .= "User-agent: *\n"; $robotcontent .= "Allow: /public/\n"; $robotcontent .= "Disallow: /administrator/\n"; } - if (!GETPOSTISSET('WEBSITE_HTACCESS')) - { + if (!GETPOSTISSET('WEBSITE_HTACCESS')) { $htaccesscontent = @file_get_contents($filehtaccess); // Clean the php htaccesscontent file to remove php code and get only html part $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent); - } - else { + } else { $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); } - if (!trim($htaccesscontent)) - { + if (!trim($htaccesscontent)) { $htaccesscontent .= "# Order allow,deny\n"; $htaccesscontent .= "# Deny from all\n"; } - if (!GETPOSTISSET('WEBSITE_MANIFEST_JSON')) - { + if (!GETPOSTISSET('WEBSITE_MANIFEST_JSON')) { $manifestjsoncontent = @file_get_contents($filemanifestjson); // Clean the manifestjson file to remove php code and get only html part $manifestjsoncontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $manifestjsoncontent); - } - else { + } else { $manifestjsoncontent = GETPOST('WEBSITE_MANIFEST_JSON', 'restricthtml'); } - if (!trim($manifestjsoncontent)) - { + if (!trim($manifestjsoncontent)) { //$manifestjsoncontent.=""; } - if (!GETPOSTISSET('WEBSITE_README')) - { + if (!GETPOSTISSET('WEBSITE_README')) { $readmecontent = @file_get_contents($filereadme); // Clean the readme file to remove php code and get only html part $readmecontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $readmecontent); - } - else { + } else { $readmecontent = GETPOST('WEBSITE_README', 'none'); } - if (!trim($readmecontent)) - { + if (!trim($readmecontent)) { //$readmecontent.=""; } @@ -3152,10 +3310,17 @@ if ($action == 'editcss') print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip'); print '</td><td>'; - print '<input type="text" class="flat" value="'.(GETPOSTISSET('virtualhost') ? GETPOST('virtualhost', 'alpha') : $virtualurl).'" name="virtualhost">'; + print '<input type="text" class="flat minwidth300" value="'.(GETPOSTISSET('virtualhost') ? GETPOST('virtualhost', 'alpha') : $virtualurl).'" name="virtualhost">'; print '</td>'; print '</tr>'; + // Favicon + print '<tr><td>'; + print $form->textwithpicto($langs->trans('ImportFavicon'), $langs->trans('FaviconTooltip')); + print '</td><td>'; + print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; + print '</tr></td>'; + // CSS file print '<tr><td class="tdtop">'; $htmlhelp = $langs->trans("CSSContentTooltipHelp"); @@ -3255,8 +3420,7 @@ if ($action == 'editcss') } -if ($action == 'createsite') -{ +if ($action == 'createsite') { print '<div class="fiche">'; print '<br>'; @@ -3266,12 +3430,14 @@ if ($action == 'createsite') $head[$h][0] = dol_buildpath('/website/index.php',1).'?id='.$object->id; $head[$h][1] = $langs->trans("AddSite"); - $head[$h][2] = 'card'; + $head[$h][2] = 'card'; $h++; - print dol_get_fiche_head($head, 'card', $langs->trans("AddSite"), -1, 'globe'); - */ - if ($action == 'createcontainer') print load_fiche_titre($langs->trans("AddSite")); + print dol_get_fiche_head($head, 'card', $langs->trans("AddSite"), -1, 'globe'); + */ + if ($action == 'createcontainer') { + print load_fiche_titre($langs->trans("AddSite")); + } print '<!-- Add site -->'."\n"; //print '<div class="fichecenter">'; @@ -3279,10 +3445,18 @@ if ($action == 'createsite') print '<table class="border centpercent">'; $siteref = $sitedesc = $sitelang = $siteotherlang = ''; - if (GETPOST('WEBSITE_REF')) $siteref = GETPOST('WEBSITE_REF', 'alpha'); - if (GETPOST('WEBSITE_DESCRIPTION')) $sitedesc = GETPOST('WEBSITE_DESCRIPTION', 'alpha'); - if (GETPOST('WEBSITE_LANG')) $sitelang = GETPOST('WEBSITE_LANG', 'aZ09'); - if (GETPOST('WEBSITE_OTHERLANG')) $siteotherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); + if (GETPOST('WEBSITE_REF')) { + $siteref = GETPOST('WEBSITE_REF', 'alpha'); + } + if (GETPOST('WEBSITE_DESCRIPTION')) { + $sitedesc = GETPOST('WEBSITE_DESCRIPTION', 'alpha'); + } + if (GETPOST('WEBSITE_LANG')) { + $sitelang = GETPOST('WEBSITE_LANG', 'aZ09'); + } + if (GETPOST('WEBSITE_OTHERLANG')) { + $siteotherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); + } print '<tr><td class="titlefieldcreate fieldrequired">'; print $form->textwithpicto($langs->trans('WebSite'), $langs->trans("Example").': www.mywebsite.com, myportal, ...'); @@ -3327,8 +3501,7 @@ if ($action == 'createsite') print '</table>'; - if ($action == 'createsite') - { + if ($action == 'createsite') { print '<div class="center">'; print '<input class="button" type="submit" name="addcontainer" value="'.$langs->trans("Create").'">'; @@ -3347,8 +3520,7 @@ if ($action == 'createsite') print '<br>'; } -if ($action == 'importsite') -{ +if ($action == 'importsite') { print '<div class="fiche">'; print '<br>'; @@ -3378,8 +3550,7 @@ if ($action == 'importsite') print '<br>'; } -if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of a web site OR properties of a web page -{ +if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties of a web site OR properties of a web page print '<div class="fiche">'; print '<br>'; @@ -3389,31 +3560,38 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of $head[$h][0] = dol_buildpath('/website/index.php',1).'?id='.$object->id; $head[$h][1] = $langs->trans("AddPage"); - $head[$h][2] = 'card'; + $head[$h][2] = 'card'; $h++; - print dol_get_fiche_head($head, 'card', $langs->trans("AddPage"), -1, 'globe'); - */ - if ($action == 'createcontainer') print load_fiche_titre($langs->trans("AddPage")); + print dol_get_fiche_head($head, 'card', $langs->trans("AddPage"), -1, 'globe'); + */ + if ($action == 'createcontainer') { + print load_fiche_titre($langs->trans("AddPage")); + } print '<!-- Edit or create page/container -->'."\n"; //print '<div class="fichecenter">'; $hiddenfromfetchingafterload = ' hideobject'; $hiddenmanuallyafterload = ' hideobject'; - if (GETPOST('radiocreatefrom') == 'checkboxcreatefromfetching') $hiddenfromfetchingafterload = ''; - if (GETPOST('radiocreatefrom') == 'checkboxcreatemanually') $hiddenmanuallyafterload = ''; + if (GETPOST('radiocreatefrom') == 'checkboxcreatefromfetching') { + $hiddenfromfetchingafterload = ''; + } + if (GETPOST('radiocreatefrom') == 'checkboxcreatemanually') { + $hiddenmanuallyafterload = ''; + } if ($action == 'editmeta' || empty($conf->use_javascript_ajax)) { // No autohide/show in such case $hiddenfromfetchingafterload = ''; $hiddenmanuallyafterload = ''; } - if ($action == 'createcontainer') - { + if ($action == 'createcontainer') { print '<br>'; - if (!empty($conf->use_javascript_ajax)) print '<input type="radio" name="radiocreatefrom" id="checkboxcreatefromfetching" value="checkboxcreatefromfetching"'.(GETPOST('radiocreatefrom') == 'checkboxcreatefromfetching' ? ' checked' : '').'> '; + if (!empty($conf->use_javascript_ajax)) { + print '<input type="radio" name="radiocreatefrom" id="checkboxcreatefromfetching" value="checkboxcreatefromfetching"'.(GETPOST('radiocreatefrom') == 'checkboxcreatefromfetching' ? ' checked' : '').'> '; + } print '<label for="checkboxcreatefromfetching"><span class="opacitymediumxx">'.$langs->trans("CreateByFetchingExternalPage").'</span></label><br>'; print '<hr class="tablecheckboxcreatefromfetching'.$hiddenfromfetchingafterload.'">'; print '<table class="tableforfield centpercent tablecheckboxcreatefromfetching'.$hiddenfromfetchingafterload.'">'; @@ -3434,15 +3612,16 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '<br>'; - if (!empty($conf->use_javascript_ajax)) print '<input type="radio" name="radiocreatefrom" id="checkboxcreatemanually" value="checkboxcreatemanually"'.(GETPOST('radiocreatefrom') == 'checkboxcreatemanually' ? ' checked' : '').'> '; + if (!empty($conf->use_javascript_ajax)) { + print '<input type="radio" name="radiocreatefrom" id="checkboxcreatemanually" value="checkboxcreatemanually"'.(GETPOST('radiocreatefrom') == 'checkboxcreatemanually' ? ' checked' : '').'> '; + } print '<label for="checkboxcreatemanually"><span class="opacitymediumxx">'.$langs->trans("OrEnterPageInfoManually").'</span></label><br>'; print '<hr class="tablecheckboxcreatemanually'.$hiddenmanuallyafterload.'">'; } print '<table class="border tableforfield nobackground centpercent tablecheckboxcreatemanually'.$hiddenmanuallyafterload.'">'; - if ($action != 'createcontainer') - { + if ($action != 'createcontainer') { print '<tr><td class="titlefield fieldrequired">'; print $langs->trans('IDOfPage').' - '.$langs->trans('InternalURLOfPage'); print '</td><td>'; @@ -3472,9 +3651,8 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of $pageauthorid = $objectpage->fk_user_creat; $pageusermodifid = $objectpage->fk_user_modif; $pageauthoralias = $objectpage->author_alias; - $pagestatus = $objectpage->status; - } - else { + $pagestatus = $objectpage->status; + } else { $type_container = 'page'; $pagedatecreation = dol_now(); $pageauthorid = $user->id; @@ -3482,18 +3660,35 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of $pageauthoralias = ''; $pagestatus = 1; } - if (GETPOST('WEBSITE_TITLE', 'alpha')) $pagetitle = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml')); - if (GETPOST('WEBSITE_PAGENAME', 'alpha')) $pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); - if (GETPOST('WEBSITE_ALIASALT', 'alpha')) $pagealiasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml')); - if (GETPOST('WEBSITE_DESCRIPTION', 'alpha')) $pagedescription = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml')); - if (GETPOST('WEBSITE_IMAGE', 'alpha')) $pageimage = GETPOST('WEBSITE_IMAGE', 'alpha'); - if (GETPOST('WEBSITE_KEYWORDS', 'alpha')) $pagekeywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); - if (GETPOST('WEBSITE_LANG', 'aZ09')) $pagelang = GETPOST('WEBSITE_LANG', 'aZ09'); - if (GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09')) $pageallowedinframes = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); - if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none'); + if (GETPOST('WEBSITE_TITLE', 'alpha')) { + $pagetitle = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml')); + } + if (GETPOST('WEBSITE_PAGENAME', 'alpha')) { + $pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); + } + if (GETPOST('WEBSITE_ALIASALT', 'alpha')) { + $pagealiasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml')); + } + if (GETPOST('WEBSITE_DESCRIPTION', 'alpha')) { + $pagedescription = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml')); + } + if (GETPOST('WEBSITE_IMAGE', 'alpha')) { + $pageimage = GETPOST('WEBSITE_IMAGE', 'alpha'); + } + if (GETPOST('WEBSITE_KEYWORDS', 'alpha')) { + $pagekeywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); + } + if (GETPOST('WEBSITE_LANG', 'aZ09')) { + $pagelang = GETPOST('WEBSITE_LANG', 'aZ09'); + } + if (GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09')) { + $pageallowedinframes = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); + } + if (GETPOST('htmlheader', 'none')) { + $pagehtmlheader = GETPOST('htmlheader', 'none'); + } - if ($action != 'createcontainer') - { + if ($action != 'createcontainer') { print '<!-- Status of page -->'."\n"; print '<tr><td class="fieldrequired">'; print $langs->trans('Status'); @@ -3511,8 +3706,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of $formwebsite->selectTypeOfContainer('WEBSITE_TYPE_CONTAINER', (GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha') ? GETPOST('WEBSITE_TYPE_CONTAINER', 'alpha') : $type_container), 0, '', 1); print '</td></tr>'; - if ($action == 'createcontainer') - { + if ($action == 'createcontainer') { print '<tr><td class="titlefield fieldrequired">'; print $langs->trans('WEBSITE_PAGE_EXAMPLE'); print '</td><td>'; @@ -3566,8 +3760,11 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print $langs->trans('Language'); print '</td><td>'; $onlykeys = array(); - if ($object->lang) $onlykeys[$object->lang] = $object->lang; - else $onlykeys[$langs->defaultlang] = $langs->defaultlang; + if ($object->lang) { + $onlykeys[$object->lang] = $object->lang; + } else { + $onlykeys[$langs->defaultlang] = $langs->defaultlang; + } if ($object->otherlang) { $tmparray = explode(',', $object->otherlang); foreach ($tmparray as $key) { @@ -3592,47 +3789,45 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '<!-- Translation of --><tr><td>'; print $langs->trans('TranslationLinks'); print '</td><td>'; - if ($action != 'createcontainer') - { + if ($action != 'createcontainer') { // Has translation pages $sql = 'SELECT rowid, lang from '.MAIN_DB_PREFIX.'website_page where fk_page = '.$objectpage->id; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $db->num_rows($resql); - if ($num_rows > 0) - { + if ($num_rows > 0) { print '<span class="opacitymedium">'.$langs->trans('ThisPageHasTranslationPages').':</span>'; $i = 0; $tmppage = new WebsitePage($db); $tmpstring = ''; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { $result = $tmppage->fetch($obj->rowid); if ($result > 0) { - if ($i > 0) $tmpstring .= '<br>'; + if ($i > 0) { + $tmpstring .= '<br>'; + } $tmpstring .= $tmppage->getNomUrl(1).' ('.$tmppage->lang.')'; $translatedby++; $i++; } } - if ($i > 1) print '<br>'; - else print ' '; + if ($i > 1) { + print '<br>'; + } else { + print ' '; + } print $tmpstring; } + } else { + dol_print_error($db); } - else dol_print_error($db); } - if (empty($translatedby) && ($action == 'editmeta' || $action == 'createcontainer' || $objectpage->fk_page > 0)) - { + if (empty($translatedby) && ($action == 'editmeta' || $action == 'createcontainer' || $objectpage->fk_page > 0)) { $sourcepage = new WebsitePage($db); $result = $sourcepage->fetch($objectpage->fk_page); - if ($result == 0) - { + if ($result == 0) { // not found, we can reset value to clean database - } - elseif ($result > 0) - { + } elseif ($result > 0) { $translationof = $objectpage->fk_page; print '<span class="opacitymedium">'.$langs->trans('ThisPageIsTranslationOf').'</span> '; print $formwebsite->selectContainer($website, 'pageidfortranslation', ($translationof ? $translationof : -1), 1, $action, 'minwidth300', array($objectpage->id)); @@ -3653,8 +3848,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '</td></tr>'; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { $langs->load('categories'); if (!GETPOSTISSET('categories')) { @@ -3696,8 +3890,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '<tr><td>'; print $langs->trans('Author'); print '</td><td>'; - if ($pageauthorid > 0) - { + if ($pageauthorid > 0) { $fuser->fetch($pageauthorid); print $fuser->getNomUrl(1); } else { @@ -3718,13 +3911,11 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of //print dol_print_date($pagedatecreation, 'dayhour'); print '</td></tr>'; - if ($action != 'createcontainer') - { + if ($action != 'createcontainer') { print '<tr><td>'; print $langs->trans('UserModif'); print '</td><td>'; - if ($pageusermodifid > 0) - { + if ($pageusermodifid > 0) { $fuser->fetch($pageusermodifid); print $fuser->getNomUrl(1); } @@ -3748,8 +3939,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '</td></tr>'; print '</table>'; - if ($action == 'createcontainer') - { + if ($action == 'createcontainer') { print '<div class="center tablecheckboxcreatemanually'.$hiddenmanuallyafterload.'">'; print '<input class="button" type="submit" name="addcontainer" value="'.$langs->trans("Create").'">'; @@ -3758,8 +3948,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '</div>'; } - if ($action == 'createcontainer') - { + if ($action == 'createcontainer') { print '<script type="text/javascript" language="javascript"> jQuery(document).ready(function() { var disableautofillofalias = 0; @@ -3804,27 +3993,32 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '<br>'; } -if ($action == 'editfile' || $action == 'file_manager') -{ + +// Print formconfirm +if ($action == 'preview') { + print $formconfirm; +} + +if ($action == 'editfile' || $action == 'file_manager' || $action == 'convertimgwebp' || $action == 'confirmconvertimgwebp') { print '<!-- Edit Media -->'."\n"; print '<div class="fiche"><br>'; //print '<div class="center">'.$langs->trans("FeatureNotYetAvailable").'</center>'; $module = 'medias'; - if (empty($url)) $url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param + if (empty($url)) { + $url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param + } include DOL_DOCUMENT_ROOT.'/core/tpl/filemanager.tpl.php'; print '</div>'; } -if ($action == 'editmenu') -{ +if ($action == 'editmenu') { print '<!-- Edit Menu -->'."\n"; print '<div class="center">'.$langs->trans("FeatureNotYetAvailable").'</center>'; } -if ($action == 'editsource') -{ +if ($action == 'editsource') { // Editing with source editor $contentforedit = ''; @@ -3834,10 +4028,13 @@ if ($action == 'editsource') $contentforedit .= $objectpage->content; //var_dump($_SESSION["dol_screenheight"]); $maxheightwin = 480; - if (isset($_SESSION["dol_screenheight"])) - { - if ($_SESSION["dol_screenheight"] > 680) $maxheightwin = $_SESSION["dol_screenheight"] - 400; - if ($_SESSION["dol_screenheight"] > 800) $maxheightwin = $_SESSION["dol_screenheight"] - 490; + if (isset($_SESSION["dol_screenheight"])) { + if ($_SESSION["dol_screenheight"] > 680) { + $maxheightwin = $_SESSION["dol_screenheight"] - 400; + } + if ($_SESSION["dol_screenheight"] > 800) { + $maxheightwin = $_SESSION["dol_screenheight"] - 490; + } } //var_dump($_SESSION["dol_screenheight"]); require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -3851,8 +4048,8 @@ if ($action == 'editsource') $contentforedit = ''; //$contentforedit.='<style scoped>'."\n"; // "scoped" means "apply to parent element only". Not yet supported by browsers - //$contentforedit.=$csscontent; - //$contentforedit.='</style>'."\n"; + //$contentforedit.=$csscontent; + //$contentforedit.='</style>'."\n"; $contentforedit .= $objectpage->content; $contentforedit = preg_replace('/(<img.*src=")(?!http)/', '\1'.DOL_URL_ROOT.'/viewimage.php?modulepart=medias&file=', $contentforedit, -1, $nbrep); @@ -3866,8 +4063,7 @@ print "</div>\n"; print "</form>\n"; -if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction == 'replace') -{ +if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction == 'replace') { print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="replacesiteconfirm">'; @@ -3929,8 +4125,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '</div>'; // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '<div class="tagtr">'; print '<div class="tagtd paddingrightonly marginrightonly opacitymedium" style="padding-right: 10px !important">'; print $langs->trans("Category"); @@ -3949,16 +4144,14 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '</div></div>'; - if ($action == 'replacesiteconfirm') - { + if ($action == 'replacesiteconfirm') { print '<!-- List of search result -->'."\n"; print '<div class="rowsearchresult clearboth">'; print '<br>'; print '<br>'; - if ($listofpages['code'] == 'OK') - { + if ($listofpages['code'] == 'OK') { $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; $nbtotalofrecords = count($listofpages['list']); @@ -3967,10 +4160,18 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = // List of mass actions available $arrayofmassactions = array(); - if ($user->rights->website->writephp && $searchkey) $arrayofmassactions['replace'] = $langs->trans("Replace"); - if ($user->rights->website->write) $arrayofmassactions['setcategory'] = $langs->trans("ClassifyInCategory"); - if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); - if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + if ($user->rights->website->writephp && $searchkey) { + $arrayofmassactions['replace'] = $langs->trans("Replace"); + } + if ($user->rights->website->write) { + $arrayofmassactions['setcategory'] = $langs->trans("ClassifyInCategory"); + } + if ($permissiontodelete) { + $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); + } + if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); + } $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $massactionbutton .= '<div class="massactionother massactionreplace hidden">'; @@ -3998,12 +4199,24 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $param = 'action=replacesiteconfirm&website='.urlencode($website->ref); $param .= '&searchstring='.urlencode($searchkey); - if (GETPOST('optioncontent')) $param .= '&optioncontent=content'; - if (GETPOST('optionmeta')) $param .= '&optionmeta=meta'; - if (GETPOST('optionsitefiles')) $param .= '&optionsitefiles=optionsitefiles'; - if (GETPOST('optioncontainertype')) $param .= '&optioncontainertype='.GETPOST('optioncontainertype', 'aZ09'); - if (GETPOST('optionlanguage')) $param .= '&optionlanguage='.GETPOST('optionlanguage', 'aZ09'); - if (GETPOST('optioncategory')) $param .= '&optioncategory='.GETPOST('optioncategory', 'aZ09'); + if (GETPOST('optioncontent')) { + $param .= '&optioncontent=content'; + } + if (GETPOST('optionmeta')) { + $param .= '&optionmeta=meta'; + } + if (GETPOST('optionsitefiles')) { + $param .= '&optionsitefiles=optionsitefiles'; + } + if (GETPOST('optioncontainertype')) { + $param .= '&optioncontainertype='.GETPOST('optioncontainertype', 'aZ09'); + } + if (GETPOST('optionlanguage')) { + $param .= '&optionlanguage='.GETPOST('optionlanguage', 'aZ09'); + } + if (GETPOST('optioncategory')) { + $param .= '&optioncategory='.GETPOST('optioncategory', 'aZ09'); + } print '<div class="div-table-responsive-no-min">'; print '<table class="noborder centpercent">'; @@ -4011,8 +4224,9 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print getTitleFieldOfList("Type", 0, $_SERVER['PHP_SELF'], 'type_container', '', $param, '', $sortfield, $sortorder, '')."\n"; print getTitleFieldOfList("Page", 0, $_SERVER['PHP_SELF'], 'pageurl', '', $param, '', $sortfield, $sortorder, '')."\n"; print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']); + print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); - print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print '</tr>'; @@ -4022,10 +4236,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $totalnbwords = 0; - foreach ($listofpages['list'] as $answerrecord) - { - if (get_class($answerrecord) == 'WebsitePage') - { + foreach ($listofpages['list'] as $answerrecord) { + if (get_class($answerrecord) == 'WebsitePage') { print '<tr>'; // Type of container @@ -4045,8 +4257,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = // Categories - Tags print '<td>'; - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) - { + if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { // Get current categories $existing = $c->containing($answerrecord->id, Categorie::TYPE_WEBSITE_PAGE, 'object'); if (is_array($existing)) { @@ -4071,8 +4282,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $param .= '&searchstring='.urlencode($searchkey); // Language - print '<td>'; - print $answerrecord->lang; + print '<td class="center">'; + print picto_from_langcode($answerrecord->lang, $answerrecord->lang); print '</td>'; // Number of words @@ -4086,6 +4297,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = } print '</td>'; + // Date last modification + print '<td class="center nowraponall">'; + print dol_print_date($answerrecord->date_modification, 'dayhour'); + print '</td>'; // Edit properties, HTML sources, status print '<td class="tdwebsitesearchresult right nowraponall">'; @@ -4113,10 +4328,11 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '<td class="nowrap center">'; print '<!-- Status of page -->'."\n"; - if ($massactionbutton || $massaction) - { + if ($massactionbutton || $massaction) { $selected = 0; - if (in_array($answerrecord->id, $arrayofselected)) $selected = 1; + if (in_array($answerrecord->id, $arrayofselected)) { + $selected = 1; + } print '<input id="'.$answerrecord->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$answerrecord->id.'"'.($selected ? ' checked="checked"' : '').'>'; } print '</td>'; @@ -4171,6 +4387,11 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '<td>'; print '</td>'; + // Date last modification + print '<td class="center nowraponall">'; + //print dol_print_date(filemtime()); + print '</td>'; + // Edit properties, HTML sources, status print '<td>'; print '</td>'; @@ -4209,6 +4430,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print $totalnbwords.' '.$langs->trans("words"); print '</td>'; + // Date last modification + print '<td>'; + print '</td>'; + // Edit properties, HTML sources, status print '<td>'; print '</td>'; @@ -4223,8 +4448,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '</table>'; print '</div>'; print '<br>'; - } - else { + } else { print '<div class="warning">'.$listofpages['message'].'</div>'; } @@ -4234,10 +4458,8 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '</form>'; } -if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') -{ - if ($pageid > 0 && $atleastonepage) - { +if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') { + if ($pageid > 0 && $atleastonepage) { // $filejs // $filecss // $filephp @@ -4287,7 +4509,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa // REPLACEMENT OF LINKS When page called by website editor $out .= '<!-- style of website from file -->'."\n"; - $out .= '<style scoped>'."\n"; // "scoped" means "apply to parent element only". No more supported by browsers, snif ! + $out .= '<style scoped>'."\n"; // "scoped" means "apply to parent element only and not grand parent". No more supported by browsers, snif ! $tmpout = ''; $tmpout .= '/* Include website CSS file */'."\n"; //$csscontent = @file_get_contents($filecss); @@ -4301,10 +4523,11 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa $tmp = preg_split('(<style[^>]*>|</style>)', $objectpage->htmlheader); $tmpstyleinheader = ''; $i = 0; - foreach ($tmp as $valtmp) - { + foreach ($tmp as $valtmp) { $i++; - if ($i % 2 == 0) $tmpstyleinheader .= $valtmp."\n"; + if ($i % 2 == 0) { + $tmpstyleinheader .= $valtmp."\n"; + } } $tmpout .= $tmpstyleinheader."\n"; // Clean style that may affect global style of Dolibarr @@ -4322,8 +4545,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa $newcontent = $objectpage->content; // If mode WEBSITE_SUBCONTAINERSINLINE is on - if (!empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) - { + if (!empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) { // TODO Check file $filephp exists, if not create it. //var_dump($filetpl); @@ -4334,8 +4556,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa if (empty($res)) { print "ERROR: Failed to include file '".$filephp."'. Try to edit and save page."; } - } catch (Exception $e) - { + } catch (Exception $e) { print $e->getMessage(); } $newcontent = ob_get_contents(); @@ -4343,12 +4564,10 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa } // Change the contenteditable to "true" or "false" when mode Edit Inline is on or off - if (empty($conf->global->WEBSITE_EDITINLINE)) - { + if (empty($conf->global->WEBSITE_EDITINLINE)) { // Remove the contenteditable="true" $newcontent = preg_replace('/(div|section)(\s[^\>]*)contenteditable="true"/', '\1\2', $newcontent); - } - else { + } else { // Keep the contenteditable="true" when mode Edit Inline is on } $out .= dolWebsiteReplacementOfLinks($object, $newcontent, 0, 'html', $objectpage->id)."\n"; @@ -4369,33 +4588,30 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa print $out; /*file_put_contents($filetpl, $out); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($filetpl, octdec($conf->global->MAIN_UMASK)); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($filetpl, octdec($conf->global->MAIN_UMASK)); - // Output file on browser - dol_syslog("index.php include $filetpl $filename content-type=$type"); - $original_file_osencoded=dol_osencode($filetpl); // New file name encoded in OS encoding charset + // Output file on browser + dol_syslog("index.php include $filetpl $filename content-type=$type"); + $original_file_osencoded=dol_osencode($filetpl); // New file name encoded in OS encoding charset - // This test if file exists should be useless. We keep it to find bug more easily - if (! file_exists($original_file_osencoded)) - { - dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file)); - exit; - } + // This test if file exists should be useless. We keep it to find bug more easily + if (! file_exists($original_file_osencoded)) + { + dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file)); + exit; + } - //include_once $original_file_osencoded; - */ + //include_once $original_file_osencoded; + */ /*print '<iframe class="websiteiframenoborder centpercent" src="'.DOL_URL_ROOT.'/public/website/index.php?website='.$websitekey.'&pageid='.$pageid.'"/>'; - print '</iframe>';*/ - } - else { - if (empty($websitekey) || $websitekey == '-1') - { + print '</iframe>';*/ + } else { + if (empty($websitekey) || $websitekey == '-1') { print '<br><br><div class="center previewnotyetavailable"><span class="">'.$langs->trans("NoWebSiteCreateOneFirst").'</span></div><br><br><br>'; print '<div class="center"><div class="logo_setup"></div></div>'; - } - else { + } else { print '<br><br><div class="center previewnotyetavailable"><span class="">'.$langs->trans("PreviewOfSiteNotYetAvailable", $object->ref).'</span></div><br><br><br>'; print '<div class="center"><div class="logo_setup"></div></div>'; } diff --git a/htdocs/website/lib/index.html b/htdocs/website/lib/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/website/samples/wrapper.php b/htdocs/website/samples/wrapper.php index 24b804058ea..b847f607bf3 100644 --- a/htdocs/website/samples/wrapper.php +++ b/htdocs/website/samples/wrapper.php @@ -1,8 +1,12 @@ <?php // BEGIN PHP File wrapper.php - DO NOT MODIFY - It is just a copy of file website/samples/wrapper.php $websitekey = basename(__DIR__); -if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) die("Sample file for website module. Can be called directly."); -if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load master if not already loaded +if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) { + die("Sample file for website module. Can be called directly."); +} +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { + require_once './master.inc.php'; +} // Load master if not already loaded include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $encoding = ''; @@ -17,42 +21,36 @@ $limit = GETPOST('limit', 'int'); // Parameters for RSS $rss = GETPOST('rss', 'aZ09'); -if ($rss) $original_file = 'blog.rss'; +if ($rss) { + $original_file = 'blog.rss'; +} // If we have a hash public (hashp), we guess the original_file. -if (!empty($hashp)) -{ +if (!empty($hashp)) { include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; $ecmfile = new EcmFiles($db); $result = $ecmfile->fetch(0, '', '', '', $hashp); - if ($result > 0) - { + if ($result > 0) { $tmp = explode('/', $ecmfile->filepath, 2); // $ecmfile->filepath is relative to document directory // filepath can be 'users/X' or 'X/propale/PR11111' - if (is_numeric($tmp[0])) // If first tmp is numeric, it is subdir of company for multicompany, we take next part. - { + if (is_numeric($tmp[0])) { // If first tmp is numeric, it is subdir of company for multicompany, we take next part. $tmp = explode('/', $tmp[1], 2); } $moduleparttocheck = $tmp[0]; // moduleparttocheck is first part of path - if ($modulepart) // Not required, so often not defined, for link using public hashp parameter. - { - if ($moduleparttocheck == $modulepart) - { + if ($modulepart) { // Not required, so often not defined, for link using public hashp parameter. + if ($moduleparttocheck == $modulepart) { // We remove first level of directory $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir //var_dump($original_file); exit; - } - else { + } else { print 'Bad link. File is from another module part.'; } - } - else { + } else { $modulepart = $moduleparttocheck; $original_file = (($tmp[1] ? $tmp[1].'/' : '').$ecmfile->filename); // this is relative to module dir } - } - else { + } else { print "ErrorFileNotFoundWithSharedLink"; exit; } @@ -60,21 +58,29 @@ if (!empty($hashp)) // Define attachment (attachment=true to force choice popup 'open'/'save as') $attachment = true; -if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false; -if (isset($_GET["attachment"])) $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); -if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment = false; +if (preg_match('/\.(html|htm)$/i', $original_file)) { + $attachment = false; +} +if (isset($_GET["attachment"])) { + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); +} +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { + $attachment = false; +} // Define mime type $type = 'application/octet-stream'; -if (GETPOSTISSET('type')) $type = GETPOST('type', 'alpha'); -else $type = dol_mimetype($original_file); +if (GETPOSTISSET('type')) { + $type = GETPOST('type', 'alpha'); +} else { + $type = dol_mimetype($original_file); +} // Security: Delete string ../ into $original_file $original_file = str_replace("../", "/", $original_file); // Cache or not -if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) -{ +if (GETPOST("cache", 'aZ09') || image_format_supported($original_file) >= 0) { // Important: Following code is to avoid page request by browser and PHP CPU at // each Dolibarr page access. header('Cache-Control: max-age=3600, public, must-revalidate'); @@ -99,7 +105,9 @@ if ($rss) { $website->fetch('', $websitekey); $filters = array('type_container'=>'blogpost'); - if ($l) $filters['lang'] = $l; + if ($l) { + $filters['lang'] = $l; + } $MAXNEWS = ($limit ? $limit : 20); $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); @@ -118,8 +126,7 @@ if ($rss) { dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); // Clean parameters - if (!$filename) - { + if (!$filename) { $extension = 'rss'; $filename = $format.'.'.$extension; } @@ -132,19 +139,16 @@ if ($rss) { $buildfile = true; - if ($cachedelay) - { + if ($cachedelay) { $nowgmt = dol_now(); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) - { + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) { dol_syslog("build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); $buildfile = false; } } - if ($buildfile) - { + if ($buildfile) { $langs->load("other"); $title = $desc = $langs->transnoentities('LatestBlogPosts'); @@ -155,18 +159,17 @@ if ($rss) { // Write file $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); - if ($result >= 0) - { - if (dol_move($outputfiletmp, $outputfile, 0, 1)) $result = 1; - else { + if ($result >= 0) { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) { + $result = 1; + } else { $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; dol_syslog("build_exportfile ".$error, LOG_ERR); dol_delete_file($outputfiletmp, 0, 1); print $error; exit(-1); } - } - else { + } else { dol_syslog("build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); dol_delete_file($outputfiletmp, 0, 1); $langs->load("errors"); @@ -175,56 +178,63 @@ if ($rss) { } } - if ($result >= 0) - { + if ($result >= 0) { $attachment = false; - if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; + if (isset($_GET["attachment"])) { + $attachment = $_GET["attachment"]; + } //$attachment = false; $contenttype = 'application/rss+xml'; - if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; + if (isset($_GET["contenttype"])) { + $contenttype = $_GET["contenttype"]; + } //$contenttype='text/plain'; $outputencoding = 'UTF-8'; - if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); + if ($contenttype) { + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); + } + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } // Ajout directives pour resoudre bug IE //header('Cache-Control: Public, must-revalidate'); //header('Pragma: public'); - if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); - else header('Cache-Control: private, must-revalidate'); + if ($cachedelay) { + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); + } else { + header('Cache-Control: private, must-revalidate'); + } // Clean parameters $outputfile = $dir_temp.'/'.$filename; $result = readfile($outputfile); - if (!$result) print 'File '.$outputfile.' was empty.'; + if (!$result) { + print 'File '.$outputfile.' was empty.'; + } // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); exit; } -} -// Get logos -elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) -{ +} elseif ($modulepart == "mycompany" && preg_match('/^\/?logos\//', $original_file)) { + // Get logos readfile(dol_osencode($conf->mycompany->dir_output."/".$original_file)); -} -else { +} else { // Find the subdirectory name as the reference include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname); $accessallowed = $check_access['accessallowed']; $sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals']; $fullpath_original_file = $check_access['original_file']; // $fullpath_original_file is now a full path name - if ($hashp) - { + if ($hashp) { $accessallowed = 1; // When using hashp, link is public so we force $accessallowed $sqlprotectagainstexternals = ''; } // Security: // Limit access if permissions are wrong - if (!$accessallowed) - { + if (!$accessallowed) { print 'Access forbidden'; exit; } @@ -238,8 +248,7 @@ else { $fullpath_original_file_osencoded = dol_osencode($fullpath_original_file); // New file name encoded in OS encoding charset // This test if file exists should be useless. We keep it to find bug more easily - if (!file_exists($fullpath_original_file_osencoded)) - { + if (!file_exists($fullpath_original_file_osencoded)) { print "ErrorFileDoesNotExists: ".$original_file; exit; } @@ -248,13 +257,20 @@ else { //top_httphead($type); header('Content-Type: '.$type); header('Content-Description: File Transfer'); - if ($encoding) header('Content-Encoding: '.$encoding); + if ($encoding) { + header('Content-Encoding: '.$encoding); + } // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); - else header('Content-Disposition: inline; filename="'.$filename.'"'); + if ($attachment) { + header('Content-Disposition: attachment; filename="'.$filename.'"'); + } else { + header('Content-Disposition: inline; filename="'.$filename.'"'); + } header('Content-Length: '.dol_filesize($fullpath_original_file)); readfile($fullpath_original_file_osencoded); } -if (is_object($db)) $db->close(); +if (is_object($db)) { + $db->close(); +} // END PHP diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php index 17f50e709b7..957173335c0 100644 --- a/htdocs/website/websiteaccount_card.php +++ b/htdocs/website/websiteaccount_card.php @@ -53,12 +53,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Initialize array of search criterias $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'); +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha')) { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } } -if (empty($action) && empty($id) && empty($ref)) $action = 'view'; +if (empty($action) && empty($id) && empty($ref)) { + $action = 'view'; +} // Security check - Protection if external user //if ($user->socid > 0) accessforbidden(); @@ -80,10 +83,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ +if (empty($reshook)) { $error = 0; $permissiontoadd = $user->rights->website->write; @@ -130,8 +134,7 @@ jQuery(document).ready(function() { // Part to create -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("WebsiteAccount"))); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; @@ -163,8 +166,7 @@ if ($action == 'create') } // Part to edit record -if (($id || $ref) && $action == 'edit') -{ +if (($id || $ref) && $action == 'edit') { print load_fiche_titre($langs->trans("WebsiteAccount")); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; @@ -194,9 +196,10 @@ if (($id || $ref) && $action == 'edit') } // Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) -{ - if ($object->fk_soc > 0 && empty($socid)) $socid = $object->fk_soc; +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + if ($object->fk_soc > 0 && empty($socid)) { + $socid = $object->fk_soc; + } $res = $object->fetch_optionals(); @@ -213,8 +216,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Call Hook formConfirm $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $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; + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } // Print form confirm print $formconfirm; @@ -223,8 +229,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Object card // ------------------------------------------------------------ $linkback = ''; - if ($socid) $linkback = '<a href="'.DOL_URL_ROOT.'/societe/website.php?socid='.$socid.'&restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToListForThirdParty").'</a>'; - if ($fk_website) $linkback = '<a href="'.DOL_URL_ROOT.'/website/website_card.php?fk_website='.$fk_website.'&restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + if ($socid) { + $linkback = '<a href="'.DOL_URL_ROOT.'/societe/website.php?socid='.$socid.'&restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToListForThirdParty").'</a>'; + } + if ($fk_website) { + $linkback = '<a href="'.DOL_URL_ROOT.'/website/website_card.php?fk_website='.$fk_website.'&restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + } $morehtmlref = '<div class="refidno">'; /* @@ -236,41 +246,43 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Project if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($user->rights->website->creer) - { - if ($action != 'classify') - { - $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref.='<input type="hidden" name="action" value="classin">'; - $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref.='</form>'; - } 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.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; - $morehtmlref.=$proj->ref; - $morehtmlref.='</a>'; - } else { - $morehtmlref.=''; - } - } + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($user->rights->website->creer) + { + if ($action != 'classify') + { + $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; + $morehtmlref.=$proj->ref; + $morehtmlref.='</a>'; + } else { + $morehtmlref.=''; + } + } } */ $morehtmlref .= '</div>'; - if ($socid > 0) $object->next_prev_filter = 'te.fk_soc = '.$socid; + if ($socid > 0) { + $object->next_prev_filter = 'te.fk_soc = '.$socid; + } dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref); @@ -301,37 +313,36 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '<div class="tabsAction">'."\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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } - if (empty($reshook)) - { + if (empty($reshook)) { // Send if (empty($user->socid)) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'."\n"; } - if ($user->rights->website->write) - { + if ($user->rights->website->write) { print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n"; } /* - if ($user->rights->sellyoursaas->create) - { - if ($object->status == 1) - { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=disable">'.$langs->trans("Disable").'</a></div>'."\n"; - } - else - { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=enable">'.$langs->trans("Enable").'</a></div>'."\n"; - } - } - */ - - if ($user->rights->website->delete) + if ($user->rights->sellyoursaas->create) { - print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a></div>'."\n"; + if ($object->status == 1) + { + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a></div>'."\n"; + } + else + { + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").'</a></div>'."\n"; + } + } + */ + + if ($user->rights->website->delete) { + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a></div>'."\n"; } } print '</div>'."\n"; @@ -343,21 +354,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre print '</div><div class="fichehalfright"><div class="ficheaddleft">'; /* - $MAXEVENT = 10; + $MAXEVENT = 10; - // List of actions on element - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'websiteaccount', $socid, 1, '', $MAXEVENT); - */ + // List of actions on element + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'websiteaccount', $socid, 1, '', $MAXEVENT); + */ print '</div></div></div>'; } diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php new file mode 100755 index 00000000000..b4364a2cc82 --- /dev/null +++ b/htdocs/workstation/class/workstation.class.php @@ -0,0 +1,1066 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file class/workstation.class.php + * \ingroup workstation + * \brief This file is a CRUD class file for Workstation (Create/Read/Update/Delete) + */ + +// Put here all includes required by your class file +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; +//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; + +/** + * Class for Workstation + */ +class Workstation extends CommonObject +{ + /** + * @var string ID of module. + */ + public $module = 'workstation'; + + /** + * @var string ID to identify managed object. + */ + public $element = 'workstation'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'workstation_workstation'; + + /** + * @var int Does this object support multicompany module ? + * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table + */ + public $ismultientitymanaged = 0; + + /** + * @var int Does object support extrafields ? 0=No, 1=Yes + */ + public $isextrafieldmanaged = 0; + + /** + * @var string String with name of icon for workstation. Must be the part after the 'object_' into object_workstation.png + */ + public $picto = 'workstation'; + + + const STATUS_DISABLED = 0; + const STATUS_ENABLED = 1; + + + /** + * '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. + * 'picto' is code of a picto to show before value in forms + * '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' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'maxwidth200', 'wordbreak', 'tdoverflowmax200' + * '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 + /** + * @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', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), + 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'default'=>'', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'showoncombobox'=>'1',), + 'type' => array('type'=>'select', 'label'=>'Type', 'enabled'=>'1', 'position'=>32, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('HUMAN'=>'Human', 'MACHINE'=>'Machine', 'BOTH'=>'HumanMachine'),), + 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,), + 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,), + 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,), + 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',), + 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), + 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>512, 'notnull'=>-1, 'visible'=>-2,), + 'nb_operators_required' => array('type'=>'integer', 'label'=>'NbOperatorsRequired', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,), + 'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMEstimatedHelp','label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,), + 'thm_machine_estimated' => array('type'=>'double', 'help'=>'THMEstimatedHelp', 'label'=>'THMMachineEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,), + 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'),), + ); + public $rowid; + public $ref; + public $label; + public $note_public; + public $note_private; + public $date_creation; + public $tms; + public $fk_user_creat; + public $fk_user_modif; + public $import_key; + public $status; + public $nb_operators_required; + public $thm_operator_estimated; + public $thm_machine_estimated; + // END MODULEBUILDER PROPERTIES + + + // If this object has a subtable with lines + + /** + * @var int Name of subtable line + */ + //public $table_element_line = 'workstation_workstationline'; + + /** + * @var int Field with ID of parent key if this object has a parent + */ + //public $fk_element = 'fk_workstation'; + + /** + * @var int Name of subtable class that manage subtable lines + */ + //public $class_element_line = 'Workstationline'; + + /** + * @var array List of child tables. To test if we can delete object. + */ + //protected $childtables = array(); + + /** + * @var array List of child tables. To know object to delete on cascade. + * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will + * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object + */ + //protected $childtablesoncascade = array('workstation_workstationdet'); + + /** + * @var WorkstationLine[] Array of subtable lines + */ + //public $lines = array(); + + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB $db) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationusergroup.class.php'; + require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationresource.class.php'; + + $this->db = $db; + + $this->fields['ref']['default'] = $this->getNextNumRef(); + + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + $this->fields['rowid']['visible'] = 0; + } + if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { + $this->fields['entity']['enabled'] = 0; + } + + // Example to show how to set values of fields definition dynamically + /*if ($user->rights->workstation->workstation->read) { + $this->fields['myfield']['visible'] = 1; + $this->fields['myfield']['noteditable'] = 0; + }*/ + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * Create object into database + * + * @param User $user User that creates + * @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) + { + global $db; + + $id = $this->createCommon($user, $notrigger); + + // Usergroups + $groups = GETPOST('groups'); + if (empty($groups)) { + $groups = $this->usergroups; // createFromClone + } + if (!empty($groups)) { + foreach ($groups as $id_group) { + $ws_usergroup = new WorkstationUserGroup($db); + $ws_usergroup->fk_workstation = $id; + $ws_usergroup->fk_usergroup = $id_group; + $ws_usergroup->createCommon($user); + $this->usergroups[] = $id_group; + } + } + + // Resources + $resources = GETPOST('resources'); + if (empty($resources)) { + $resources = $this->resources; // createFromClone + } + if (!empty($resources)) { + foreach ($resources as $id_resource) { + $ws_resource = new WorkstationResource($db); + $ws_resource->fk_workstation = $id; + $ws_resource->fk_resource = $id_resource; + $ws_resource->createCommon($user); + $this->resources[] = $id_resource; + } + } + + return $id; + } + + /** + * Clone an object into another one + * + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return mixed New object created, <0 if KO + */ + public function createFromClone(User $user, $fromid) + { + global $langs, $extrafields; + $error = 0; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $object = new self($this->db); + + $this->db->begin(); + + // Load source object + $result = $object->fetch($fromid); + if ($result > 0 && !empty($object->table_element_line)) { + $object->fetchLines(); + } + + // get lines so they will be clone + //foreach($this->lines as $line) + // $line->fetch_optionals(); + + // Reset some properties + unset($object->id); + unset($object->fk_user_creat); + unset($object->import_key); + + // Clear fields + if (property_exists($object, 'ref')) { + $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; + } + if (property_exists($object, 'label')) { + $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; + } + if (property_exists($object, 'status')) { + $object->status = self::STATUS_DISABLED; + } + if (property_exists($object, 'date_creation')) { + $object->date_creation = dol_now(); + } + if (property_exists($object, 'date_modification')) { + $object->date_modification = null; + } + // ... + // Clear extrafields that are unique + if (is_array($object->array_options) && count($object->array_options) > 0) { + $extrafields->fetch_name_optionals_label($this->table_element); + foreach ($object->array_options as $key => $option) { + $shortkey = preg_replace('/options_/', '', $key); + if (!empty($extrafields->attributes[$this->table_element]['unique'][$shortkey])) { + //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; + unset($object->array_options[$key]); + } + } + } + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->create($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + if (!$error) { + // copy internal contacts + if ($this->copy_linked_contact($object, 'internal') < 0) { + $error++; + } + } + + if (!$error) { + // copy external contacts if same company + if (property_exists($this, 'socid') && $this->socid == $object->socid) { + if ($this->copy_linked_contact($object, 'external') < 0) { + $error++; + } + } + } + + unset($object->context['createfromclone']); + + // End + if (!$error) { + $this->db->commit(); + return $object; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Load object in memory from the database + * + * @param int $id Id object + * @param string $ref Ref + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetch($id, $ref = null) + { + $result = $this->fetchCommon($id, $ref); + + $this->usergroups = WorkstationUserGroup::getAllGroupsOfWorkstation($this->id); + $this->resources = WorkstationResource::getAllResourcesOfWorkstation($this->id); + + if ($result > 0 && !empty($this->table_element_line)) { + $this->fetchLines(); + } + return $result; + } + + /** + * Load object lines in memory from the database + * + * @return int <0 if KO, 0 if not found, >0 if OK + */ + public function fetchLines() + { + $this->lines = array(); + + $result = $this->fetchLinesCommon(); + return $result; + } + + + /** + * Load list of objects in memory from the database. + * + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit limit + * @param int $offset Offset + * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...) + * @param string $filtermode Filter mode (AND or OR) + * @return array|int int <0 if KO, array of pages if OK + */ + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { + global $conf; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $records = array(); + + $sql = 'SELECT '; + $sql .= $this->getFieldList(); + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' WHERE t.entity IN ('.getEntity($this->table_element).')'; + } else { + $sql .= ' WHERE 1 = 1'; + } + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid') { + $sqlwhere[] = $key.'='.$value; + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + } else { + $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; + } + } + } + if (count($sqlwhere) > 0) { + $sql .= ' AND ('.implode(' '.$filtermode.' ', $sqlwhere).')'; + } + + if (!empty($sortfield)) { + $sql .= $this->db->order($sortfield, $sortorder); + } + if (!empty($limit)) { + $sql .= ' '.$this->db->plimit($limit, $offset); + } + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < ($limit ? min($limit, $num) : $num)) { + $obj = $this->db->fetch_object($resql); + + $record = new self($this->db); + $record->setVarsFromFetchObj($obj); + + $records[$record->id] = $record; + + $i++; + } + $this->db->free($resql); + + return $records; + } else { + $this->errors[] = 'Error '.$this->db->lasterror(); + dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); + + return -1; + } + } + + /** + * Update object into database + * + * @param User $user User that modifies + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update(User $user, $notrigger = false) + { + + // Usergroups + $groups = GETPOST('groups'); + WorkstationUserGroup::deleteAllGroupsOfWorkstation($this->id); + $this->usergroups=array(); + + foreach ($groups as $id_group) { + $ws_usergroup = new WorkstationUserGroup($this->db); + $ws_usergroup->fk_workstation = $this->id; + $ws_usergroup->fk_usergroup = $id_group; + $ws_usergroup->createCommon($user); + $this->usergroups[] = $id_group; + } + + // Resources + $resources = GETPOST('resources'); + WorkstationResource::deleteAllResourcesOfWorkstation($this->id); + $this->resources=array(); + if (!empty($resources)) { + foreach ($resources as $id_resource) { + $ws_resource = new WorkstationResource($this->db); + $ws_resource->fk_workstation = $this->id; + $ws_resource->fk_resource = $id_resource; + $ws_resource->createCommon($user); + $this->resources[] = $id_resource; + } + } + + return $this->updateCommon($user, $notrigger); + } + + /** + * Delete object in database + * + * @param User $user User that deletes + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = false) + { + return $this->deleteCommon($user, $notrigger); + //return $this->deleteCommon($user, $notrigger, 1); + } + + /** + * Delete a line of object in database + * + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int >0 if OK, <0 if KO + */ + public function deleteLine(User $user, $idline, $notrigger = false) + { + if ($this->status < 0) { + $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; + return -2; + } + + return $this->deleteLineCommon($user, $idline, $notrigger); + } + + + /** + * Validate object + * + * @param User $user User making status change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <=0 if OK, 0=Nothing done, >0 if KO + */ + public function validate($user, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $error = 0; + + // Protection + if ($this->status == self::STATUS_VALIDATED) { + dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING); + return 0; + } + + /*if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->workstation->workstation->write)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->workstation->workstation->workstation_advance->validate)))) + { + $this->error='NotEnoughPermissions'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); + return -1; + }*/ + + $now = dol_now(); + + $this->db->begin(); + + // Define new ref + 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 { + $num = $this->ref; + } + $this->newref = $num; + + if (!empty($num)) { + // Validate + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET ref = '".$this->db->escape($num)."',"; + $sql .= " status = ".self::STATUS_VALIDATED; + if (!empty($this->fields['date_validation'])) { + $sql .= ", date_validation = '".$this->db->idate($now)."'"; + } + if (!empty($this->fields['fk_user_valid'])) { + $sql .= ", fk_user_valid = ".$user->id; + } + $sql .= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::validate()", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + dol_print_error($this->db); + $this->error = $this->db->lasterror(); + $error++; + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('WORKSTATION_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 = 'workstation/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'workstation/".$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->workstation->dir_output.'/workstation/'.$oldref; + $dirdest = $conf->workstation->dir_output.'/workstation/'.$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->workstation->dir_output.'/workstation/'.$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 current status + if (!$error) { + $this->ref = $num; + $this->status = self::STATUS_VALIDATED; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Set draft status + * + * @param int $status New status to set + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setStatus($status, $notrigger = 0) + { + global $user; + + $this->status = $status; + + if (empty($status)) { + return $this->setDisabled($user, $notrigger); + } else { + return $this->setEnabled($user, $notrigger); + } + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setEnabled($user, $notrigger = 0) + { + return $this->setStatusCommon($user, self::STATUS_ENABLED, $notrigger, 'WORKSTATION_ENABLED'); + } + + + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int <0 if KO, >0 if OK + */ + public function setDisabled($user, $notrigger = 0) + { + return $this->setStatusCommon($user, self::STATUS_DISABLED, $notrigger, 'WORKSTATION_DISABLED'); + } + + /** + * 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 string $option On what the link point to ('nolink', ...) + * @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, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $conf, $langs, $hookmanager; + + if (!empty($conf->dol_no_mouse_hover)) { + $notooltip = 1; // Force disable tooltips + } + + $result = ''; + + $label = img_picto('', $this->picto).' <u>'.$langs->trans("Workstation").'</u>'; + $label .= '<br>'; + $label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref; + if (isset($this->status)) { + $label .= '<br><b>'.$langs->trans("Status").":</b> ".$this->getLibStatut(5); + } + + $url = dol_buildpath('/workstation/workstation_card.php', 1).'?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("ShowWorkstation"); + $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 = '<a href="'.$url.'"'; + $linkstart .= $linkclose.'>'; + $linkend = '</a>'; + + $result .= $linkstart; + + if (empty($this->showphoto_on_popup)) { + if ($withpicto) { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'mrp'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + } else { + if ($withpicto) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + list($class, $module) = explode('@', $this->picto); + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); + $filearray = dol_dir_list($upload_dir, "files"); + $filename = $filearray[0]['name']; + if (!empty($filename)) { + $pospoint = strpos($filearray[0]['name'], '.'); + + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); + if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>'; + } else { + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>'; + } + + $result .= '</div>'; + } else { + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'mrp'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + } + } + } + + if ($withpicto != 2) { + $result .= $this->ref; + } + + $result .= $linkend; + //if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); + + global $action, $hookmanager; + $hookmanager->initHooks(array('workstationdao')); + $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 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 + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * 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, 6=Long label + Picto + * @return string Label of status + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { + global $langs; + //$langs->load("workstation@workstation"); + $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled'); + $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled'); + } + + $statusType = 'status'.$status; + //if ($status == self::STATUS_VALIDATED) $statusType = 'status1'; + //if ($status == self::STATUS_CANCELED) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } + + /** + * Load the info information in the object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; + $sql .= ' fk_user_creat, fk_user_modif'; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; + $sql .= ' WHERE t.rowid = '.((int) $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_cloture) { + $cluser = new User($this->db); + $cluser->fetch($obj->fk_user_cloture); + $this->user_cloture = $cluser; + } + + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); + $this->date_validation = $this->db->jdate($obj->datev); + } + + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->initAsSpecimenCommon(); + } + + /** + * Create an array of lines + * + * @return array|int array of lines if OK, <0 if KO + */ + public function getLinesArray() + { + $this->lines = array(); + + $objectline = new WorkstationLine($this->db); + $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_workstation = '.$this->id)); + + if (is_numeric($result)) { + $this->error = $this->error; + $this->errors = $this->errors; + return $result; + } else { + $this->lines = $result; + return $this->lines; + } + } + + /** + * Returns the reference to the following non used object depending on the active numbering module. + * + * @return string Object free reference + */ + public function getNextNumRef() + { + global $langs, $conf; + $langs->load("workstation@workstation"); + + if (empty($conf->global->WORKSTATION_WORKSTATION_ADDON)) { + $conf->global->WORKSTATION_WORKSTATION_ADDON = 'mod_workstation_standard'; + } + + if (!empty($conf->global->WORKSTATION_WORKSTATION_ADDON)) { + $mybool = false; + + $file = $conf->global->WORKSTATION_WORKSTATION_ADDON.".php"; + $classname = $conf->global->WORKSTATION_WORKSTATION_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/workstation/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + if (class_exists($classname)) { + $obj = new $classname(); + $numref = $obj->getNextValue($this); + + if ($numref != '' && $numref != '-1') { + return $numref; + } else { + $this->error = $obj->error; + //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); + return ""; + } + } else { + print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; + return ""; + } + } else { + print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); + return ""; + } + } + + /** + * Create a document onto disk according to template module. + * + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @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 + * @return int 0 if KO, 1 if OK + */ + public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) + { + global $conf, $langs; + + $result = 0; + $includedocgeneration = 0; + + $langs->load("workstation@workstation"); + + if (!dol_strlen($modele)) { + $modele = 'standard_workstation'; + + if ($this->model_pdf) { + $modele = $this->model_pdf; + } elseif (!empty($conf->global->WORKSTATION_ADDON_PDF)) { + $modele = $conf->global->WORKSTATION_ADDON_PDF; + } + } + + $modelpath = "core/modules/workstation/doc/"; + + if ($includedocgeneration) { + $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + } + + return $result; + } + + /** + * Action executed by scheduler + * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters + * + * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) + */ + public function doScheduledJob() + { + global $conf, $langs; + + //$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log'; + + $error = 0; + $this->output = ''; + $this->error = ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + + $now = dol_now(); + + $this->db->begin(); + + // ... + + $this->db->commit(); + + return $error; + } +} diff --git a/htdocs/workstation/class/workstationresource.class.php b/htdocs/workstation/class/workstationresource.class.php new file mode 100644 index 00000000000..72fb91cfe85 --- /dev/null +++ b/htdocs/workstation/class/workstationresource.class.php @@ -0,0 +1,111 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file class/workstationresource.class.php + * \ingroup workstation + * \brief This file is a CRUD class file for WorkstationResource (Create/Read/Update/Delete) + */ + + +/** + * Class to link resource with Workstations + */ +class WorkstationResource extends CommonObject +{ + /** @var string $table_element Table name in SQL */ + public $table_element = 'workstation_workstation_resource'; + + /** @var string $element Name of the element (tip for better integration in Dolibarr: this value should be the reflection of the class name with ucfirst() function) */ + public $element = 'workstationresource'; + + /** + * @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( + 'fk_workstation' => array ('type' => 'integer'), + 'fk_resource' => array ('type' => 'integer') + ); + + /** + * @var int ID of workstation + */ + public $fk_workstation; + + /** + * @var int ID of dolresource + */ + public $fk_resource; + + + /** + * WorkstationResource constructor. + * + * @param DoliDB $db Database connector + */ + public function __construct($db) + { + global $langs; + + $this->db = $db; + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * Function used to get an array with all resources linked to a workstation + * + * @param int $fk_workstation Id of workstation we need to get linked resources + * @return array Array of record + */ + public static function getAllResourcesOfWorkstation($fk_workstation) + { + global $db; + $obj = new self($db); + return parent::getAllItemsLinkedByObjectID($fk_workstation, 'fk_resource', 'fk_workstation', $obj->table_element); + } + + /** + * Function used to remove all resources linked to a workstation + * + * @param int $fk_workstation Id of workstation we need to remove linked resources + * @return int <0 if KO, 0 if nothing done, >0 if OK and something done + */ + public static function deleteAllResourcesOfWorkstation($fk_workstation) + { + global $db; + $obj = new self($db); + return parent::deleteAllItemsLinkedByObjectID($fk_workstation, 'fk_workstation', $obj->table_element); + } +} diff --git a/htdocs/workstation/class/workstationusergroup.class.php b/htdocs/workstation/class/workstationusergroup.class.php new file mode 100644 index 00000000000..86fdda7ce66 --- /dev/null +++ b/htdocs/workstation/class/workstationusergroup.class.php @@ -0,0 +1,112 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file class/workstationusergroup.class.php + * \ingroup workstation + * \brief This file is a CRUD class file for WorkstationUserGroup (Create/Read/Update/Delete) + */ + +/** + * Class to link User groups and Workstations + */ +class WorkstationUserGroup extends CommonObject +{ + /** @var string $table_element Table name in SQL */ + public $table_element = 'workstation_workstation_usergroup'; + + /** @var string $element Name of the element (tip for better integration in Dolibarr: this value should be the reflection of the class name with ucfirst() function) */ + public $element = 'workstationusergroup'; + + /** + * @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( + 'fk_workstation' => array ('type' => 'integer'), + 'fk_usergroup' => array ('type' => 'integer') + ); + + /** + * @var int ID of workstation + */ + public $fk_workstation; + + /** + * @var int ID of user group + */ + public $fk_usergroup; + + + /** + * WorkstationUserGroup constructor. + * + * @param DoliDB $db Database connector + */ + public function __construct($db) + { + global $langs; + + $this->db = $db; + + // Unset fields that are disabled + foreach ($this->fields as $key => $val) { + if (isset($val['enabled']) && empty($val['enabled'])) { + unset($this->fields[$key]); + } + } + + // Translate some data of arrayofkeyval + if (is_object($langs)) { + foreach ($this->fields as $key => $val) { + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + foreach ($val['arrayofkeyval'] as $key2 => $val2) { + $this->fields[$key]['arrayofkeyval'][$key2] = $langs->trans($val2); + } + } + } + } + } + + /** + * Function used to get an array with all usergroups linked to a workstation + * + * @param int $fk_workstation id of workstation we need to get linked usergroups + * @return array Array of record + */ + public static function getAllGroupsOfWorkstation($fk_workstation) + { + global $db; + + $obj = new self($db); + return parent::getAllItemsLinkedByObjectID($fk_workstation, 'fk_usergroup', 'fk_workstation', $obj->table_element); + } + + /** + * Function used to remove all usergroups linked to a workstation + * + * @param int $fk_workstation Id of workstation we need to remove linked usergroups + * @return int <0 if KO, 0 if nothing done, >0 if OK and something done + */ + public static function deleteAllGroupsOfWorkstation($fk_workstation) + { + global $db; + + $obj = new self($db); + return parent::deleteAllItemsLinkedByObjectID($fk_workstation, 'fk_workstation', $obj->table_element); + } +} diff --git a/htdocs/workstation/lib/workstation.lib.php b/htdocs/workstation/lib/workstation.lib.php new file mode 100755 index 00000000000..18307d0cd3a --- /dev/null +++ b/htdocs/workstation/lib/workstation.lib.php @@ -0,0 +1,65 @@ +<?php +/* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file workstation/lib/workstation.lib.php + * \ingroup workstation + * \brief Library files with common functions for Workstation + */ + +/** + * Prepare admin pages header + * + * @return array + */ +function workstationAdminPrepareHead() +{ + global $langs, $conf; + + $langs->load("workstation@workstation"); + + $h = 0; + $head = array(); + $head[$h][0] = DOL_URL_ROOT . "/admin/workstation.php"; + $head[$h][1] = $langs->trans("Settings"); + $head[$h][2] = 'settings'; + $h++; + + /* + $head[$h][0] = dol_buildpath("/workstation/admin/myobject_extrafields.php", 1); + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'myobject_extrafields'; + $h++; + */ + + /*$head[$h][0] = require_once "/admin/about.php"; + $head[$h][1] = $langs->trans("About"); + $head[$h][2] = 'about'; + $h++;*/ + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@workstation:/workstation/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@workstation:/workstation/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'workstation'); + + return $head; +} diff --git a/htdocs/workstation/lib/workstation_workstation.lib.php b/htdocs/workstation/lib/workstation_workstation.lib.php new file mode 100755 index 00000000000..a0cd7736d88 --- /dev/null +++ b/htdocs/workstation/lib/workstation_workstation.lib.php @@ -0,0 +1,92 @@ +<?php +/* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file lib/workstation_workstation.lib.php + * \ingroup workstation + * \brief Library files with common functions for Workstation + */ + +/** + * Prepare array of tabs for Workstation + * + * @param Workstation $object Workstation + * @return array Array of tabs + */ +function workstationPrepareHead($object) +{ + global $db, $langs, $conf; + + $langs->load("workstation@workstation"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/workstation/workstation_card.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { + $nbNote = 0; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } + $head[$h][0] = dol_buildpath('/workstation/workstation_note.php', 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + if ($nbNote > 0) { + $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : ''); + } + $head[$h][2] = 'note'; + $h++; + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->workstation->dir_output."/workstation/".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_buildpath("/workstation/workstation_document.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } + $head[$h][2] = 'document'; + $h++; + + $head[$h][0] = dol_buildpath("/workstation/workstation_agenda.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Events"); + $head[$h][2] = 'agenda'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@workstation:/workstation/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@workstation:/workstation/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'workstation@workstation'); + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'workstation@workstation', 'remove'); + + return $head; +} diff --git a/htdocs/zapier/hook_agenda.php b/htdocs/workstation/workstation_agenda.php old mode 100644 new mode 100755 similarity index 51% rename from htdocs/zapier/hook_agenda.php rename to htdocs/workstation/workstation_agenda.php index 6ae9d7d57aa..f33961d5768 --- a/htdocs/zapier/hook_agenda.php +++ b/htdocs/workstation/workstation_agenda.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) ---Put here your own copyright and developer email--- + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,13 +13,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ /** - * \file htdocs/zapier/hook_agenda.php - * \ingroup mymodule - * \brief Page of MyObject events + * \file workstation_agenda.php + * \ingroup workstation + * \brief Tab of events on Workstation */ // Load Dolibarr environment @@ -27,12 +27,12 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("mymodule@mymodule", "other")); +$langs->loadLangs(array("workstation@workstation", "other")); // Get parameters $id = GETPOST('id', 'int'); @@ -43,50 +43,60 @@ $backtopage = GETPOST('backtopage', 'alpha'); if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; + 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'); -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'mymodule', $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 +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'; +if (!$sortfield) { + $sortfield = 'a.datep,a.id'; +} +if (!$sortorder) { + $sortorder = 'DESC,DESC'; +} // Initialize technical objects -$object = new MyObject($db); +$object = new Workstation($db); $extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('myobjectagenda', 'globalcard')); // Note that conf->hooks_modules contains array - +$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('workstationagenda', '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->mymodule->multidir_output[$object->entity]."/".$object->id; +if ($id > 0 || !empty($ref)) { + $upload_dir = $conf->workstation->multidir_output[$object->entity]."/".$object->id; +} +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php + +// Security check +restrictedArea($user, $object->element, $object->id, '', 'workstation'); /* - * Actions + * Actions */ -$parameters = array('id'=>$socid); +$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 ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { // Cancel @@ -108,66 +118,64 @@ if (empty($reshook)) { * View */ -$contactstatic = new Contact($db); - $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 = ''; + $help_url = 'EN:Module_Workstation'; llxHeader('', $title, $help_url); - if (!empty($conf->notification->enabled)) $langs->load("mails"); - $head = myobjectPrepareHead($object); + if (!empty($conf->notification->enabled)) { + $langs->load("mails"); + } + $head = workstationPrepareHead($object); - print dol_get_fiche_head($head, 'agenda', $langs->trans("MyObject"), -1, 'myobject@mymodule'); + print dol_get_fiche_head($head, 'agenda', $langs->trans("Workstation"), -1, 'workstation'); // Object card // ------------------------------------------------------------ - $linkback = '<a href="'.dol_buildpath('/mymodule/myobject_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + $linkback = '<a href="'.dol_buildpath('/workstation/workstation_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; $morehtmlref = '<div class="refidno">'; /* - // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($user->rights->mymodule->creer) - { - if ($action != 'classify') - //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref.='<input type="hidden" name="action" value="classin">'; - $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref.='</form>'; - } 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.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; - $morehtmlref.=$proj->ref; - $morehtmlref.='</a>'; - } else { - $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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; @@ -190,12 +198,16 @@ if ($object->id > 0) { $objthirdparty = $object; $objcon = new stdClass(); - $out = ''; + $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.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; - if (get_class($objthirdparty) == 'Societe') $out .= '&amp;socid='.$objthirdparty->id; - $out .= (!empty($objcon->id) ? '&amp;contactid='.$objcon->id : '').'&amp;backtopage=1&amp;percentage=-1'; + if (get_class($objthirdparty) == 'Societe') { + $out .= '&socid='.urlencode($objthirdparty->id); + } + $out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : '').'&percentage=-1'; //$out.=$langs->trans("AddAnAction").' '; //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); //$out.="</a>"; @@ -215,19 +227,23 @@ if ($object->id > 0) { print '</div>'; if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { - $param = '&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; + $param = '&id='.$object->id.'&socid='.$socid; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } - print load_fiche_titre($langs->trans("ActionsOnMyObject"), '', ''); + //print load_fiche_titre($langs->trans("ActionsOnWorkstation"), '', ''); // List of all actions $filters = array(); $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); + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); } } diff --git a/htdocs/workstation/workstation_card.php b/htdocs/workstation/workstation_card.php new file mode 100755 index 00000000000..8f351523ecb --- /dev/null +++ b/htdocs/workstation/workstation_card.php @@ -0,0 +1,482 @@ +<?php +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> + * 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/>. + */ + +/** + * \file workstation_card.php + * \ingroup workstation + * \brief Page to create/edit/view workstation + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationusergroup.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("workstation@workstation", "other")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'workstationcard'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); +$groups = GETPOST('groups'); +$resources = GETPOST('resources'); +//$lineid = GETPOST('lineid', 'int'); + +// Initialize technical objects +$object = new Workstation($db); +//$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('workstationcard', 'globalcard')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +//$extrafields->fetch_name_optionals_label($object->table_element); + +//$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Initialize array of search criterias +$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 (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. + +$permissiontoread = $user->rights->workstation->workstation->read; +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->workstation->workstation->delete; +$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $user->rights->workstation->workstation->write; // Used by the include of actions_dellink.inc.php +$upload_dir = $conf->workstation->multidir_output[isset($object->entity) ? $object->entity : 1]; + +// Security check +restrictedArea($user, $object->element, $object->id, '', 'workstation'); + + +/* + * 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)) { + $error = 0; + + $backurlforlist = dol_buildpath('/workstation/workstation_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_buildpath('/workstation/workstation_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } + } + } + + $triggermodname = 'WORKSTATION_WORKSTATION_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 + 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'; + + // 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 == 'confirm_enable' && $confirm == "yes" && $permissiontoadd) { + if (!empty($object->id)) { + $object->setStatus(1); + } + } elseif ($action == 'confirm_disable' && $confirm == "yes" && $permissiontoadd) { + if (!empty($object->id)) { + $object->setStatus(0); + } + } +} + + + + +/* + * View + * + * Put here all code to build page + */ + +$form = new Form($db); +$formfile = new FormFile($db); +$formresource = new FormResource($db); + +$title = $langs->trans("Workstation"); + +$help_url = 'EN:Module_Workstation'; + +llxHeader('', $title, $help_url); + +// Example : Adding jquery code +?> + <script type="text/javascript" language="javascript"> + + jQuery(document).ready(function() { + jQuery("#type").change(function() { + if($(this).val() === 'MACHINE') { + $('#usergroups').hide(); + $('#nb_operators_required').parent('td').parent('tr').hide(); + $('#wsresources').show(); + } else if($(this).val() === 'HUMAN') { + $('#wsresources').hide(); + $('#nb_operators_required').parent('td').parent('tr').show(); + $('#usergroups').show(); + } + else { + $('#usergroups').show(); + $('#wsresources').show(); + $('#nb_operators_required').parent('td').parent('tr').show(); + } + }); + jQuery("#type").trigger('change'); + }); + + </script> +<?php + +// Part to create +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Workstation")), '', 'object_'.$object->picto); + + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="add">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } + + print dol_get_fiche_head(array(), ''); + + print '<table class="border centpercent tableforfieldcreate">'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; + + print '<tr id="usergroups"'; + print ' ><td>'; + print $langs->trans('Groups'); + print '</td>'; + print '<td>'; + print img_picto('', 'group'); + print $form->select_dolgroups($groups, 'groups', 1, '', 0, '', '', $object->entity, true, 'minwidth200'); + print '</td></tr>'; + + print '<tr id="wsresources"><td>'; + print $langs->trans('Machines'); + print '</td>'; + print '<td>'; + print img_picto('', 'resource'); + print $formresource->select_resource_list($resources, 'resources', '', '', 0, '', '', $object->entity, true, 0, 'minwidth200', true); + print '</td></tr>'; + + // Other attributes + //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + + print '</table>'."\n"; + + print dol_get_fiche_end(); + + print '<div class="center">'; + print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; + print '&nbsp; '; + print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage + print '</div>'; + + print '</form>'; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("Workstation"), '', 'object_'.$object->picto); + + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; + print '<input type="hidden" name="token" value="'.newToken().'">'; + print '<input type="hidden" name="action" value="update">'; + print '<input type="hidden" name="id" value="'.$object->id.'">'; + if ($backtopage) { + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; + } + if ($backtopageforcancel) { + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; + } + + print dol_get_fiche_head(); + + print '<table class="border centpercent tableforfieldedit">'."\n"; + + // Common attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; + + print '<tr id="usergroups"'; + print '><td>'; + print $langs->trans('Groups'); + print '</td>'; + print '<td>'; + print img_picto('', 'group'); + print $form->select_dolgroups(empty($groups) ? $object->usergroups : $groups, 'groups', 1, '', 0, '', '', $object->entity, true); + print '</td></tr>'; + + print '<tr id="wsresources"><td>'; + print $langs->trans('Machines'); + print '</td>'; + print '<td>'; + print img_picto('', 'resource'); + print $formresource->select_resource_list(empty($resources) ? $object->resources : $resources, 'resources', '', '', 0, '', '', $object->entity, true, 0, '', true); + print '</td></tr>'; + + // Other attributes + //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; + + print '</table>'; + + print dol_get_fiche_end(); + + print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; + print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; + print '</div>'; + + print '</form>'; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = workstationPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("Workstation"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWorkstation'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Confirmation of action xxxx + if ($action == 'enable') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('EnableAWorkstation'), $langs->trans("ConfirmEnableWorkstation", $object->ref), 'confirm_enable', $formquestion, 0, 1, 220); + } elseif ($action == 'disable') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DisableAWorkstation'), $langs->trans("ConfirmDisableWorkstation", $object->ref), 'confirm_disable', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $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; + + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/workstation/workstation_list.php', 1).'?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref .= '<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + //if ($action != 'classify') $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; + $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 .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref .= '<input type="hidden" name="action" value="classin">'; + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref .= '</form>'; + } 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 .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '<div class="fichecenter">'; + print '<div class="fichehalfleft">'; + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent tableforfield">'."\n"; + + // Common attributes + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner + if ($object->type === 'MACHINE') { + $object->fields['nb_operators_required']['visible'] = 0; + } + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; + + // Groups + if ($object->type !== 'MACHINE') { + $toprint = array(); + foreach ($object->usergroups as $id_group) { + $g = new UserGroup($db); + $g->fetch($id_group); + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $g->getNomUrl(1) . '</li>'; + } + print '<tr><td>' . $langs->trans('Groups') . '</td><td>'; + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; + print '</td></tr>'; + } + + // Resources + if ($object->type !== 'HUMAN') { + $toprint = array(); + foreach ($object->resources as $id_resource) { + $r = new Dolresource($db); + $r->fetch($id_resource); + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $r->getNomUrl(1) . '</li>'; + } + print '<tr><td>' . $langs->trans('Machines') . '</td><td>'; + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; + print '</td></tr>'; + } + + // Other attributes. Fields from hook formObjectOptions and Extrafields. + //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + + print '</table>'; + print '</div>'; + print '</div>'; + + print '<div class="clearboth"></div>'; + + print dol_get_fiche_end(); + + + // Buttons for actions + + if ($action != 'presend' && $action != 'editline') { + print '<div class="tabsAction">'."\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)) { + // Modify + if ($permissiontoadd) { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n"; + } else { + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n"; + } + + // Clone + if ($permissiontoadd) { + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=workstation">'.$langs->trans("ToClone").'</a>'."\n"; + } + + + if ($permissiontoadd) { + if ($object->status == $object::STATUS_ENABLED) { + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n"; + } else { + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable&token='.newToken().'">'.$langs->trans("Enable").'</a>'."\n"; + } + } + + + // Delete (need delete permission, or if draft, just need create/modify permission) + if ($permissiontodelete) { + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; + } else { + print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n"; + } + } + print '</div>'."\n"; + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/workstation/workstation_document.php b/htdocs/workstation/workstation_document.php new file mode 100755 index 00000000000..2deb06579b8 --- /dev/null +++ b/htdocs/workstation/workstation_document.php @@ -0,0 +1,198 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file workstation_document.php + * \ingroup workstation + * \brief Tab for documents linked to Workstation + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("workstation@workstation", "companies", "other", "mails")); + + +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm'); +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$ref = GETPOST('ref', 'alpha'); + +// Get parameters +$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 = $liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} +//if (! $sortfield) $sortfield="position_name"; + +// Initialize technical objects +$object = new Workstation($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('workstationdocument', '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->workstation->multidir_output[$object->entity ? $object->entity : $conf->entity]."/workstation/".get_exdir(0, 0, 0, 1, $object); +} + +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php + +// Security check +restrictedArea($user, $object->element, $object->id, '', 'workstation'); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans("Workstation").' - '.$langs->trans("Files"); + +$help_url = 'EN:Module_Workstation'; + +llxHeader('', $title, $help_url); + +if ($object->id) { + /* + * Show tabs + */ + $head = workstationPrepareHead($object); + + print dol_get_fiche_head($head, 'document', $langs->trans("Workstation"), -1, $object->picto); + + + // Build file list + $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); + $totalsize = 0; + foreach ($filearray as $key => $file) { + $totalsize += $file['size']; + } + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/workstation/workstation_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '<div class="fichecenter">'; + + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent tableforfield">'; + + // Number of files + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; + + // Total size + print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; + + print '</table>'; + + print '</div>'; + + print dol_get_fiche_end(); + + $modulepart = 'workstation'; + //$permission = $user->rights->workstation->workstation->write; + $permission = 1; + //$permtoedit = $user->rights->workstation->workstation->write; + $permtoedit = 1; + $param = '&id='.$object->id; + + //$relativepathwithnofile='workstation/' . dol_sanitizeFileName($object->id).'/'; + $relativepathwithnofile = 'workstation/'.dol_sanitizeFileName($object->ref).'/'; + + include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; +} else { + accessforbidden('', 0, 1); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php new file mode 100755 index 00000000000..c4141a7ac61 --- /dev/null +++ b/htdocs/workstation/workstation_list.php @@ -0,0 +1,738 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file workstation_list.php + * \ingroup workstation + * \brief List page for workstation + */ + +// Load Dolibarr environment +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +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.'/resource/class/html.formresource.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array("workstation", "other")); + +$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') : 'workstationlist'; // 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') + +$id = GETPOST('id', 'int'); + +// 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 < 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; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical objects +$object = new Workstation($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array + +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); +//$extrafields->fetch_name_optionals_label($object->table_element_line); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); + +// Default sort order (if not yet defined by previous GETPOST) +if (!$sortfield) { + $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. +} +if (!$sortorder) { + $sortorder = "ASC"; +} + +// Initialize array of search criterias +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); +$search = array(); + +foreach ($object->fields as $key => $val) { + if (GETPOST('search_'.$key, 'alpha') !== '') { + $search[$key] = GETPOST('search_'.$key, 'alpha'); + } + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); + } +} + +$groups = GETPOST('groups'); +$resources = GETPOST('resources'); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) { + if ($val['searchall']) { + $fieldstosearchall['t.'.$key] = $val['label']; + } +} + +// 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'])) { + $visible = (int) 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'] + ); + } +} + +$arrayfields['wug.fk_usergroup'] = array( + 'label'=>$langs->trans('Groups'), + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), + 'position'=>1000, + 'help'=>$val['help'] +); + +$arrayfields['wr.fk_resource'] = array( + 'label'=>$langs->trans('Resources'), + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), + 'position'=>1001, + 'help'=>$val['help'] +); + +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + +$object->fields = dol_sort_array($object->fields, 'position'); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +$permissiontoread = $user->rights->workstation->workstation->read; +$permissiontoadd = $user->rights->workstation->workstation->write; +$permissiontodelete = $user->rights->workstation->workstation->delete; + +// Security check +restrictedArea($user, $object->element, 0, '', 'workstation'); + + +/* + * 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 + foreach ($object->fields as $key => $val) { + $search[$key] = ''; + if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + $search[$key.'_dtstart'] = ''; + $search[$key.'_dtend'] = ''; + } + } + $groups=$resources=array(); + $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 + } + + // Mass actions + $objectclass = 'Workstation'; + $objectlabel = 'Workstation'; + $uploaddir = $conf->workstation->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} + + + +/* + * View + */ + +$form = new Form($db); +$formresource = new FormResource($db); + +$now = dol_now(); + +$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Workstations")); +$help_url = 'EN:Module_Workstation'; +$morejs = array(); +$morecss = array(); + + +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +$sql .= $object->getFieldList('t'); +// 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.', ' : ''); + } +} +// Add fields from hooks +$parameters = array(); +$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)"; +} +if (!empty($groups)) { + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'workstation_workstation_usergroup wug ON (wug.fk_workstation = t.rowid)'; +} +if (!empty($resources)) { + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'workstation_workstation_resource wr ON (wr.fk_workstation = t.rowid)'; +} +// 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) { + if (array_key_exists($key, $object->fields)) { + 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) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) { + if ($search[$key] == '-1' || $search[$key] === '0') { + $search[$key] = ''; + } + $mode_search = 2; + } + if ($search[$key] != '') { + $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + } + } else { + if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { + $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); + if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { + if (preg_match('/_dtstart$/', $key)) { + $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; + } + if (preg_match('/_dtend$/', $key)) { + $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; + } + } + } + } +} +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 + +// usergroups +if (!empty($groups)) { + $sql.= ' AND wug.fk_usergroup IN('.implode(',', $groups).')'; +} + +// resources +if (!empty($resources)) { + $sql.= ' AND wr.fk_resource IN('.implode(',', $resources).')'; +} + +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; +// Add where from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + +$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, $object); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql=preg_replace('/,\s*$/', '', $sql); +$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 of record found is smaller than page * limit, goto and load page 0 + $page = 0; + $offset = 0; + } +} +// 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); +} + +// 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('/workstation/workstation_card.php', 1).'?id='.$id); + exit; +} + + +// Output page +// -------------------------------------------------------------------- + +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs'); + +// Example : Adding jquery code +print '<script type="text/javascript" language="javascript"> +jQuery(document).ready(function() { + function init_myfunc() + { + jQuery("#myid").removeAttr(\'disabled\'); + jQuery("#myid").attr(\'disabled\',\'disabled\'); + } + init_myfunc(); + jQuery("#mybutton").click(function() { + init_myfunc(); + }); +}); +</script>'; + +$arrayofselected = is_array($toselect) ? $toselect : array(); + +$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'; +// 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( + //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), +); +if ($permissiontodelete) { + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { + $arrayofmassactions = array(); +} +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; +if ($optioncss != '') { + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; +} +print '<input type="hidden" name="token" value="'.newToken().'">'; +print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; +print '<input type="hidden" name="action" value="list">'; +print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; +print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; +print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/workstation/workstation_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + +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 = "SendWorkstationRef"; +$modelmail = "workstation"; +$objecttmp = new Workstation($db); +$trackid = 'xxxx'.$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 '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; +} + +$moreforfilter = ''; +/*$moreforfilter.='<div class="divsearchfield">'; +$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">'; +$moreforfilter.= '</div>';*/ + +$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 '<div class="liste_titre liste_titre_bydiv centpercent">'; + print $moreforfilter; + print '</div>'; +} + +$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 '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; + + +// Fields title search +// -------------------------------------------------------------------- + +print '<tr class="liste_titre">'; +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'])) { + print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; + if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); + } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">'; + } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '</div>'; + print '<div class="nowrap">'; + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '</div>'; + } + print '</td>'; + } +} + +// usergroups +if (!empty($arrayfields['wug.fk_usergroup']['checked'])) { + print '<td class="liste_titre">'; + print $form->select_dolgroups($groups, 'groups', 1, '', 0, '', '', $conf->entity, true); + print '</td>'; +} + +// resources +if (!empty($arrayfields['wr.fk_resource']['checked'])) { + print '<td class="liste_titre">'; + print $formresource->select_resource_list($resources, 'resources', '', '', 0, '', '', $conf->entity, true, 0, '', true); + print '</td>'; +} + +// 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 '<td class="liste_titre maxwidthsearch">'; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '</td>'; +print '</tr>'."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print '<tr class="liste_titre">'; +foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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'])) { + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; + } +} + +// usergroups +if (!empty($arrayfields['wug.fk_usergroup']['checked'])) { + print getTitleFieldOfList($arrayfields['wug.fk_usergroup']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '') . "\n"; +} + +// resources +if (!empty($arrayfields['wr.fk_resource']['checked'])) { + print getTitleFieldOfList($arrayfields['wr.fk_resource']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '') . "\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 '</tr>'."\n"; + + +// 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) { + 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); + $object->usergroups = WorkstationUserGroup::getAllGroupsOfWorkstation($obj->rowid); + $object->resources = WorkstationResource::getAllResourcesOfWorkstation($obj->rowid); + + // Show here line of result + print '<tr class="oddeven">'; + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + 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') { + $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'])) { + print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; + if ($key == 'status') { + print $object->getLibStatut(5); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!empty($val['isameasure'])) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + $totalarray['val']['t.'.$key] += $object->$key; + } + } + } + + if (!empty($arrayfields['wug.fk_usergroup']['checked'])) { + $toprint = array(); + foreach ($object->usergroups as $id_group) { + $g = new UserGroup($db); + $g->fetch($id_group); + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $g->getNomUrl(1) . '</li>'; + } + print '<td>'; + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; + print '</td>'; + } + + if (!empty($arrayfields['wr.fk_resource']['checked'])) { + $toprint = array(); + foreach ($object->resources as $id_resource) { + $r = new Dolresource($db); + $r->fetch($id_resource); + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $r->getNomUrl(1) . '</li>'; + } + print '<td>'; + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; + print '</td>'; + } + + // 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 '<td class="nowrap center">'; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } + print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; + } + print '</td>'; + if (!$i) { + $totalarray['nbfield']++; + } + + print '</tr>'."\n"; + + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// If no record found +if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; +} + + +$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 '</table>'."\n"; +print '</div>'."\n"; + +print '</form>'."\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('&amp;', '&', $param); + + $filedir = $diroutputmassaction; + $genallowed = $permissiontoread; + $delallowed = $permissiontoadd; + + print $formfile->showdocuments('massfilesarea_workstation', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php new file mode 100755 index 00000000000..b49be96dafa --- /dev/null +++ b/htdocs/workstation/workstation_note.php @@ -0,0 +1,153 @@ +<?php +/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + */ + +/** + * \file workstation_note.php + * \ingroup workstation + * \brief Tab for notes on Workstation + */ + +// Load Dolibarr environment +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("workstation", "companies")); + +// Get parameters +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); + +// Initialize technical objects +$object = new Workstation($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'workstation', $id); + +// 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->workstation->multidir_output[$object->entity]."/".$object->id; +} + +$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php + +// Security check +restrictedArea($user, $object->element, $object->id, '', 'workstation'); + + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once + + +/* + * View + */ + +$form = new Form($db); + +$help_url = 'EN:Module_Workstation'; + +llxHeader('', $langs->trans('Workstation'), $help_url); + +if ($id > 0 || !empty($ref)) { + $object->fetch_thirdparty(); + + $head = workstationPrepareHead($object); + + print dol_get_fiche_head($head, 'note', $langs->trans("Workstation"), -1, $object->picto); + + // Object card + // ------------------------------------------------------------ + $linkback = '<a href="'.dol_buildpath('/workstation/workstation_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + /* + // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } 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 .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '<div class="fichecenter">'; + print '<div class="underbanner clearboth"></div>'; + + + $cssclass = "titlefield"; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '</div>'; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/zapier/README.md b/htdocs/zapier/README.md new file mode 100644 index 00000000000..66c4385ebc7 --- /dev/null +++ b/htdocs/zapier/README.md @@ -0,0 +1,10 @@ +Module Zapier +============== + +This is a module to add interface between Zapier and Dolibarr ERP CRM. + + +Documentation +------------- + +[Module documentation](https://wiki.dolibarr.org/index.php/Module_Zapier) diff --git a/htdocs/zapier/admin/about.php b/htdocs/zapier/admin/about.php index e67ba8861a2..b7e2936fc41 100644 --- a/htdocs/zapier/admin/about.php +++ b/htdocs/zapier/admin/about.php @@ -2,6 +2,9 @@ /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2019 Frédéric FRANCE <frederic.france@free.fr> * + * + * LICENSE ================================================================= + * * 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 @@ -13,7 +16,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * */ /** @@ -31,15 +35,20 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once '../lib/zapier.lib.php'; // Translations -$langs->loadLangs(array("errors", "admin", "zapier@zapier")); +$langs->loadLangs(array("errors", "admin", "zapier")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); +if (empty($conf->zapier->enabled)) accessforbidden(); +if (empty($user->admin)) accessforbidden(); + /* * Actions @@ -55,18 +64,19 @@ $backtopage = GETPOST('backtopage', 'alpha'); $form = new Form($db); $page_name = "ZapierAbout"; -llxHeader('', $langs->trans($page_name)); +$help_url = 'EN:Module_Zapier'; +llxHeader('', $langs->trans($page_name), $help_url); // Subheader $linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>'; -print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier@zapier'); +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier'); // Configuration header $head = zapierAdminPrepareHead(); -print dol_get_fiche_head($head, 'about', '', 0, 'zapier@zapier'); +print dol_get_fiche_head($head, 'about', '', 0, 'zapier'); -dol_include_once('/zapier/core/modules/modZapier.class.php'); +dol_include_once('/core/modules/modZapier.class.php'); $tmpmodule = new modZapier($db); print $tmpmodule->getDescLong(); diff --git a/htdocs/zapier/admin/setup.php b/htdocs/zapier/admin/setup.php index 0d10ac95231..7249e8c3849 100644 --- a/htdocs/zapier/admin/setup.php +++ b/htdocs/zapier/admin/setup.php @@ -27,27 +27,33 @@ require '../../main.inc.php'; // Libraries require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"; -require_once '../lib/zapier.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/zapier/lib/zapier.lib.php'; // Translations -$langs->loadLangs(array("admin", "zapier@zapier")); +$langs->loadLangs(array("admin", "zapier")); // Access control -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} // Parameters $action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $arrayofparameters = array( - 'ZAPIERFORDOLIBARR_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1), - 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) +// 'ZAPIERFORDOLIBARR_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1), +// 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) ); +if (empty($conf->zapier->enabled)) accessforbidden(); +if (empty($user->admin)) accessforbidden(); + /* * Actions */ + if ((float) DOL_VERSION >= 6) { include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; } @@ -57,20 +63,18 @@ if ((float) DOL_VERSION >= 6) { * View */ -$page_name = "ZapierSetup"; -llxHeader('', $langs->trans($page_name)); +$page_name = "ZapierForDolibarrSetup"; +$help_url = 'EN:Module_Zapier'; +llxHeader('', $langs->trans($page_name), $help_url); // Subheader $linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>'; -print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier@zapier'); +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_zapier'); // Configuration header $head = zapierAdminPrepareHead(); -print dol_get_fiche_head($head, 'settings', '', -1, "zapier@zapier"); - -// Setup page goes here -echo $langs->trans("ZapierSetupPage").'<br><br>'; +print dol_get_fiche_head($head, 'settings', '', -1, "zapier"); if ($action == 'edit') { @@ -111,7 +115,9 @@ if ($action == 'edit') { print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>'; print '</div>'; } else { - print '<br>'.$langs->trans("NothingToSetup"); + // Setup page goes here + echo '<br><br><span class="opacitymediumdisabled">'.$langs->trans("ZapierSetupPage").'</span><br><br>'; + //print '<br>'.$langs->trans("NothingToSetup"); } } diff --git a/htdocs/zapier/class/api_zapier.class.php b/htdocs/zapier/class/api_zapier.class.php index 945a6a69a8f..c141588a7f9 100644 --- a/htdocs/zapier/class/api_zapier.class.php +++ b/htdocs/zapier/class/api_zapier.class.php @@ -37,7 +37,7 @@ class ZapierApi extends DolibarrApi /** * @var array $FIELDS Mandatory fields, checked when create and update object */ - static $FIELDS = array( + public static $FIELDS = array( 'url', ); @@ -104,6 +104,7 @@ class ZapierApi extends DolibarrApi if (!DolibarrApiAccess::$user->rights->zapier->read) { throw new RestException(401); } + $arraychoices = array( 'invoices' => 'Invoices', 'orders' => 'Orders', @@ -143,6 +144,10 @@ class ZapierApi extends DolibarrApi { global $db, $conf; + if (!DolibarrApiAccess::$user->rights->zapier->read) { + throw new RestException(401); + } + $obj_ret = array(); $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; @@ -163,7 +168,9 @@ class ZapierApi extends DolibarrApi } $sql .= " FROM ".MAIN_DB_PREFIX."hook_mytable as t"; - if ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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 ($restrictonsocid && (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) || $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 1 = 1"; // Example of use $mode @@ -178,7 +185,7 @@ class ZapierApi extends DolibarrApi $sql .= " AND t.fk_soc = sc.fk_soc"; } if ($restrictonsocid && $socid) { - $sql .= " AND t.fk_soc = ".$socid; + $sql .= " AND t.fk_soc = ".((int) $socid); } if ($restrictonsocid && $search_sale > 0) { // Join for the needed table to filter by sale @@ -186,7 +193,7 @@ class ZapierApi extends DolibarrApi } // Insert sale filter if ($restrictonsocid && $search_sale > 0) { - $sql .= " AND sc.fk_user = ".$search_sale; + $sql .= " AND sc.fk_user = ".((int) $search_sale); } if ($sqlfilters) { if (!DolibarrApi::_checkFilters($sqlfilters)) { @@ -240,6 +247,7 @@ class ZapierApi extends DolibarrApi if (!DolibarrApiAccess::$user->rights->zapier->write) { throw new RestException(401); } + // Check mandatory fields $fields = array( 'url', @@ -270,33 +278,33 @@ class ZapierApi extends DolibarrApi // * @url PUT /hooks/{id} // */ /*public function put($id, $request_data = null) - { - if (! DolibarrApiAccess::$user->rights->zapier->write) { - throw new RestException(401); - } + { + if (! DolibarrApiAccess::$user->rights->zapier->write) { + throw new RestException(401); + } - $result = $this->hook->fetch($id); - if( ! $result ) { - throw new RestException(404, 'Hook not found'); - } + $result = $this->hook->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Hook not found'); + } - if( ! DolibarrApi::_checkAccessToResource('hook', $this->hook->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if( ! DolibarrApi::_checkAccessToResource('hook', $this->hook->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - foreach($request_data as $field => $value) { - if ($field == 'id') { - continue; - } - $this->hook->$field = $value; - } + foreach($request_data as $field => $value) { + if ($field == 'id') { + continue; + } + $this->hook->$field = $value; + } - if ($this->hook->update($id, DolibarrApiAccess::$user) > 0) { - return $this->get($id); - } else { - throw new RestException(500, $this->hook->error); - } - }*/ + if ($this->hook->update($id, DolibarrApiAccess::$user) > 0) { + return $this->get($id); + } else { + throw new RestException(500, $this->hook->error); + } + }*/ /** * Delete hook @@ -311,6 +319,7 @@ class ZapierApi extends DolibarrApi if (!DolibarrApiAccess::$user->rights->zapier->delete) { throw new RestException(401); } + $result = $this->hook->fetch($id); if (!$result) { throw new RestException(404, 'Hook not found'); diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index b71c5aec1d7..5197296f659 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -385,13 +385,13 @@ class Hook extends CommonObject * @return int <0 if KO, 0 if not found, >0 if OK */ /*public function fetchLines() - { - $this->lines=array(); + { + $this->lines=array(); - // Load lines with object MyObjectLine + // Load lines with object MyObjectLine - return count($this->lines)?1:0; - }*/ + return count($this->lines)?1:0; + }*/ /** * Load list of objects in memory from the database. @@ -416,13 +416,13 @@ class Hook extends CommonObject $sql .= ' t.rowid'; // TODO Get all fields $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.entity = '.$conf->entity; + $sql .= ' WHERE t.entity = '.((int) $conf->entity); // Manage filter $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { if ($key == 't.rowid') { - $sqlwhere[] = $key.'='.$value; + $sqlwhere[] = $key.' = '.((int) $value); } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; } elseif ($key == 'customsql') { @@ -542,11 +542,11 @@ class Hook extends CommonObject $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; /* - $hookmanager->initHooks(array('hookdao')); - $parameters=array('id'=>$this->id); - $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; - */ + $hookmanager->initHooks(array('hookdao')); + $parameters=array('id'=>$this->id); + $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.'"' : ''); } @@ -621,7 +621,9 @@ class Hook extends CommonObject } $statusType = 'status5'; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + if ($status == self::STATUS_VALIDATED) { + $statusType = 'status4'; + } return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -637,7 +639,7 @@ class Hook extends CommonObject $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE t.rowid = '.$id; + $sql .= ' WHERE t.rowid = '.((int) $id); $result = $this->db->query($sql); if ($result) { if ($this->db->num_rows($result)) { @@ -720,11 +722,11 @@ class Hook extends CommonObject /* class MyObjectLine { - // @var int ID - public $id; - // @var mixed Sample line property 1 - public $prop1; - // @var mixed Sample line property 2 - public $prop2; + // @var int ID + public $id; + // @var mixed Sample line property 1 + public $prop1; + // @var mixed Sample line property 2 + public $prop2; } */ diff --git a/htdocs/zapier/hook_card.php b/htdocs/zapier/hook_card.php deleted file mode 100644 index 43706c0c533..00000000000 --- a/htdocs/zapier/hook_card.php +++ /dev/null @@ -1,392 +0,0 @@ -<?php -/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> - * 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 <http://www.gnu.org/licenses/>. - */ - -/** - * \file htdocs/zapier/myobject_card.php - * \ingroup mymodule - * \brief Page to create/edit/view myobject - */ - -// Load Dolibarr environment -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); - -// Load translation files required by the page -$langs->loadLangs(array("mymodule@mymodule", "other")); - -// Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'zapiercard'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); - -// Initialize technical objects -$object = new MyObject($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('myobjectcard', 'globalcard')); // Note that conf->hooks_modules contains array - -// Fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); - -// Initialize array of search criterias -$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 (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 // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals - -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0); -//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - - -/* - * Actions - * - * Put here all code to do according to value of "action" parameter - */ - -$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)) { - $error = 0; - - $permissiontoadd = $user->rights->mymodule->write; - $permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0); - $backurlforlist = dol_buildpath('/mymodule/myobject_list.php', 1); - if (empty($backtopage)) { - if (empty($id)) $backtopage = $backurlforlist; - else $backtopage = dol_buildpath('/mymodule/myobject_card.php', 1).($id > 0 ? $id : '__ID__'); - } - $triggermodname = 'MYMODULE_MYOBJECT_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'; - - // 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'; -} - - - - -/* - * View - * - * Put here all code to build page - */ - -$form = new Form($db); -$formfile = new FormFile($db); - -llxHeader('', 'MyObject', ''); - -// Example : Adding jquery code -print '<script type="text/javascript" language="javascript"> -jQuery(document).ready(function() { - function init_myfunc() - { - jQuery("#myid").removeAttr(\'disabled\'); - jQuery("#myid").attr(\'disabled\',\'disabled\'); - } - init_myfunc(); - jQuery("#mybutton").click(function() { - init_myfunc(); - }); -}); -</script>'; - - -// Part to create -if ($action == 'create') { - print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("MyObject"))); - - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="add">'; - print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - - print dol_get_fiche_head(array(), ''); - - print '<table class="border centpercent">'."\n"; - - // Common attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; - - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - - print '</table>'."\n"; - - print dol_get_fiche_end(); - - print '<div class="center">'; - print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; - print '&nbsp; '; - print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage - print '</div>'; - - print '</form>'; -} - -// Part to edit record -if (($id || $ref) && $action == 'edit') { - print load_fiche_titre($langs->trans("MyObject")); - - print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="update">'; - print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; - print '<input type="hidden" name="id" value="'.$object->id.'">'; - - print dol_get_fiche_head(); - - print '<table class="border centpercent">'."\n"; - - // Common attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; - - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; - - print '</table>'; - - print dol_get_fiche_end(); - - print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; - print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; - print '</div>'; - - print '</form>'; -} - -// Part to show record -if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - $res = $object->fetch_optionals(); - - $head = myobjectPrepareHead($object); - print dol_get_fiche_head($head, 'card', $langs->trans("MyObject"), -1, 'myobject@mymodule'); - - $formconfirm = ''; - - // Confirmation to delete - if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMyObject'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); - } - - // Clone confirmation - if ($action == 'clone') { - // Create an array for form - $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMyObject', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); - } - - // Confirmation of action xxxx - if ($action == 'xxx') { - $formquestion = array(); - /* - $forcecombo=0; - if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy - $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) - ); - */ - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); - } - - // Call Hook formConfirm - $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); - $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; - - - // Object card - // ------------------------------------------------------------ - $linkback = '<a href="'.dol_buildpath('/mymodule/myobject_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; - - $morehtmlref = '<div class="refidno">'; - /* - // Ref bis - $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->creer, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($user->rights->mymodule->write) - { - if ($action != 'classify') - $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref.='<input type="hidden" name="action" value="classin">'; - $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref.='</form>'; - } 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 .= '</div>'; - - - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - - - print '<div class="fichecenter">'; - print '<div class="fichehalfleft">'; - print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'."\n"; - - // Common attributes - //$keyforbreak='fieldkeytoswithonsecondcolumn'; - include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; - - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - - print '</table>'; - print '</div>'; - print '</div>'; - - print '<div class="clearboth"></div><br>'; - - print dol_get_fiche_end(); - - - // Buttons for actions - if ($action != 'presend' && $action != 'editline') { - print '<div class="tabsAction">'."\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)) { - // Modify - if ($user->rights->mymodule->write) { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; - } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n"; - } - - // Clone - if ($user->rights->mymodule->write) { - print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;socid='.$object->socid.'&amp;action=clone&amp;object=order">'.$langs->trans("ToClone").'</a></div>'; - } - - /* - if ($user->rights->mymodule->write) - { - if ($object->status == 1) - { - print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=disable">'.$langs->trans("Disable").'</a>'."\n"; - } - else - { - print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=enable">'.$langs->trans("Enable").'</a>'."\n"; - } - } - */ - - if ($user->rights->mymodule->delete) { - print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete&amp;token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n"; - } else { - print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n"; - } - } - print '</div>'."\n"; - } - - - // Select mail models is same action as presend - if (GETPOST('modelselected')) { - $action = 'presend'; - } - - if ($action != 'presend') { - print '<div class="fichecenter"><div class="fichehalfleft">'; - print '<a name="builddoc"></a>'; // ancre - - // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('myobject')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - - - print '</div><div class="fichehalfright"><div class="ficheaddleft">'; - - $MAXEVENT = 10; - - $morehtmlright = '<a href="'.dol_buildpath('/mymodule/myobject_info.php', 1).'?id='.$object->id.'">'; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= '</a>'; - - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'myobject', $socid, 1, '', $MAXEVENT, '', $morehtmlright); - - print '</div></div></div>'; - } -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/zapier/hook_document.php b/htdocs/zapier/hook_document.php deleted file mode 100644 index 15ec591bea6..00000000000 --- a/htdocs/zapier/hook_document.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php -/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * 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 <http://www.gnu.org/licenses/>. - */ - -/** - * \file htdocs/zapier/myobject_document.php - * \ingroup mymodule - * \brief Tab for documents linked to MyObject - */ - -// Load Dolibarr environment -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); - -// Load translation files required by the page -$langs->loadLangs(array("mymodule@mymodule", "companies", "other", "mails")); - - -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); -$ref = GETPOST('ref', 'alpha'); - -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'mymodule', $id); - -// Get parameters -$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"; -//if (! $sortfield) $sortfield="position_name"; - -// Initialize technical objects -$object = new MyObject($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('myobjectdocument', '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->sellyoursaas->multidir_output[$object->entity] . "/myobject/" . dol_sanitizeFileName($object->id); -if ($id > 0 || !empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity]."/myobject/".dol_sanitizeFileName($object->ref); - - -/* - * Actions - */ - -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; - - -/* - * View - */ - -$form = new Form($db); - -$title = $langs->trans("MyObject").' - '.$langs->trans("Files"); -$help_url = ''; -//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $title, $help_url); - -if ($object->id) { - /* - * Show tabs - */ - $head = myobjectPrepareHead($object); - - print dol_get_fiche_head($head, 'document', $langs->trans("MyObject"), -1, 'myobject@mymodule'); - - - // Build file list - $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); - $totalsize = 0; - foreach ($filearray as $key => $file) { - $totalsize += $file['size']; - } - - // Object card - // ------------------------------------------------------------ - $linkback = '<a href="'.dol_buildpath('/mymodule/myobject_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; - - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - - print '<div class="fichecenter">'; - - print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'; - - // Number of files - print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; - - // Total size - print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; - - print '</table>'; - - print '</div>'; - - print dol_get_fiche_end(); -} else { - accessforbidden('', 0, 0); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/zapier/hook_list.php b/htdocs/zapier/hook_list.php deleted file mode 100644 index 93461517107..00000000000 --- a/htdocs/zapier/hook_list.php +++ /dev/null @@ -1,588 +0,0 @@ -<?php -/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * \file htdocs/zapier/hook_list.php - * \ingroup zapier - * \brief List page for hook - */ - - -// Load Dolibarr environment -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -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.'/zapier/class/hook.class.php'; - -// Load translation files required by the page -$langs->loadLangs(array("zapier", "other")); - -// The action 'add', 'create', 'edit', 'update', 'view', ... -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; -// The bulk action (combo box choice into lists) -$massaction = GETPOST('massaction', 'alpha'); -$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') : 'zapierlist'; // 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') - -$id = GETPOST('id', 'int'); - -// 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) : (int) GETPOST("page", 'int'); -if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { - // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action - $page = 0; -} -$offset = $limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -//if (! $sortfield) $sortfield="p.date_fin"; -//if (! $sortorder) $sortorder="DESC"; - -// Initialize technical objects -$object = new Hook($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->zapier->dir_output.'/temp/massgeneration/'.$user->id; -// Note that conf->hooks_modules contains array -$hookmanager->initHooks(array('zapierhooklist')); - -// Fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); - -// Default sort order (if not yet defined by previous GETPOST) -if (!$sortfield) { - // Set here default search field. By default 1st field in definition. - $sortfield = "t.".key($object->fields); -} -if (!$sortorder) { - $sortorder = "ASC"; -} - -// Security check -$socid = 0; -if ($user->socid > 0) { - // Protection if external user - //$socid = $user->socid; - accessforbidden(); -} -//$result = restrictedArea($user, 'zapier', $id, ''); - -// Initialize array of search criterias -$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'); -} - -// List of fields to search into when doing a "search in all" -$fieldstosearchall = array(); -foreach ($object->fields as $key => $val) { - if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; -} - -// Definition of fields for list -$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'], 'position'=>$val['position']); -} -// Extra fields -include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; - -$object->fields = dol_sort_array($object->fields, 'position'); -$arrayfields = dol_sort_array($arrayfields, 'position'); - - - -/* - * 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 - foreach ($object->fields as $key => $val) { - $search[$key] = ''; - } - $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 - } - - // Mass actions - $objectclass = 'Hook'; - $objectlabel = 'Hook'; - $permissiontoread = $user->rights->zapier->read; - $permissiontodelete = $user->rights->zapier->delete; - $uploaddir = $conf->zapier->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; -} - - - -/* - * View - */ - -$form = new Form($db); - -$now = dol_now(); - -//$help_url="EN:Module_Hook|FR:Module_Hook_FR|ES:Módulo_Hook"; -$help_url = ''; -$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Hooks")); - - -// 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.', ' : ''); - } -} -// Add fields from hooks -$parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook -$sql .= $hookmanager->resPrint; -$sql = preg_replace('/, $/', '', $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)"; -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 ($search[$key] != '') { - $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); - } -} -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'; -// Add where from hooks -$parameters = array(); -$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('/, $/','', $sql); -*/ - -$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 of record found is smaller than page * limit, goto and load page 0 - $page = 0; - $offset = 0; - } -} -// 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) { - $num = $nbtotalofrecords; -} else { - $sql .= $db->plimit($limit + 1, $offset); - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); -} - -// 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($resql); - $id = $obj->rowid; - header("Location: ".dol_buildpath('/zapierfordolibarr/hook_card.php', 1).'?id='.$id); - exit; -} - - -// Output page -// -------------------------------------------------------------------- - -llxHeader('', $title, $help_url); - -// Example : Adding jquery code -// print '<script type="text/javascript" language="javascript"> -// jQuery(document).ready(function() { -// function init_myfunc() -// { -// jQuery("#myid").removeAttr(\'disabled\'); -// jQuery("#myid").attr(\'disabled\',\'disabled\'); -// } -// init_myfunc(); -// jQuery("#mybutton").click(function() { -// init_myfunc(); -// }); -// }); -// </script>'; - -$arrayofselected = is_array($toselect) ? $toselect : array(); - -$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'; - -// List of mass actions available -$arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), -); -if ($user->rights->zapier->delete) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); -if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); -$massactionbutton = $form->selectMassAction('', $arrayofmassactions); - -print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'; -if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; -print '<input type="hidden" name="token" value="'.newToken().'">'; -print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; -print '<input type="hidden" name="action" value="list">'; -print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; -print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; -print '<input type="hidden" name="page" value="'.$page.'">'; -print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; - -$newcardbutton = ''; -//if ($user->rights->zapier->creer) -//{ - $newcardbutton = '<a class="butActionNew" href="hook_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>'; - $newcardbutton .= '<span class="fa fa-plus-circle valignmiddle"></span>'; - $newcardbutton .= '</a>'; -//} -//else -//{ -// $newcardbutton='<a class="butActionNewRefused" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>; -// $newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>'; -// $newcardbutton.= '</a>'; -//} - -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); - -// Add code for pre mass action (confirmation or email presend form) -$topicmail = "SendHookRef"; -$modelmail = "hook"; -$objecttmp = new Hook($db); -$trackid = 'zapier'.$object->id; -include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; - -if ($sall) { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); - print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'; -} - -$moreforfilter = ''; -/*$moreforfilter.='<div class="divsearchfield">'; -$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">'; -$moreforfilter.= '</div>';*/ - -$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 '<div class="liste_titre liste_titre_bydiv centpercent">'; - print $moreforfilter; - print '</div>'; -} - -$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 '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; - - -// Fields title search -// -------------------------------------------------------------------- -print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) { - $cssforfield = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; - } - if (in_array($val['type'], array('timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'right'; - } - if ($key == 'status') { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; - } - if (!empty($arrayfields['t.'.$key]['checked'])) { - print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>'; - } -} -// 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 '<td class="liste_titre right">'; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print '</td>'; -print '</tr>'."\n"; - - -// Fields title label -// -------------------------------------------------------------------- -print '<tr class="liste_titre">'; -foreach ($object->fields as $key => $val) { - $cssforfield = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; - if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield .= ($cssforfield ? ' ' : '').'right'; - if ($key == 'status') { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; - } - if (!empty($arrayfields['t.'.$key]['checked'])) { - print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\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 '</tr>'."\n"; - - -// 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) { - if (preg_match('/\$object/', $val)) { - // There is at least one compute field that use $object - $needToFetchEachLine++; - } - } -} - - -// Loop on record -// -------------------------------------------------------------------- -$i = 0; -$totalarray = array(); -while ($i < min($num, $limit)) { - $obj = $db->fetch_object($resql); - if (empty($obj)) { - break; // Should not happen - } - - // Store properties in $object - $object->id = $obj->rowid; - foreach ($object->fields as $key => $val) { - if (isset($obj->$key)) $object->$key = $obj->$key; - } - - // Show here line of result - print '<tr class="oddeven">'; - foreach ($object->fields as $key => $val) { - $cssforfield = ''; - 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') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real'))) $cssforfield .= ($cssforfield ? ' ' : '').'right'; - - if (!empty($arrayfields['t.'.$key]['checked'])) { - print '<td'; - if ($cssforfield || $val['css']) print ' class="'; - print $cssforfield; - if ($cssforfield && $val['css']) print ' '; - print $val['css']; - if ($cssforfield || $val['css']) print '"'; - print '>'; - if ($key == 'status') print $object->getLibStatut(5); - elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), ''); - else print $object->showOutputField($val, $key, $obj->$key, ''); - print '</td>'; - if (!$i) $totalarray['nbfield']++; - if (!empty($val['isameasure'])) { - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; - $totalarray['val']['t.'.$key] += $obj->$key; - } - } - } - // 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, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - // Action column - print '<td class="nowrap center">'; - if ($massactionbutton || $massaction) { - // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; - print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; - } - print '</td>'; - if (!$i) $totalarray['nbfield']++; - - print '</tr>'; - - $i++; -} - -// Show total line -include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - - -// If no record found -if ($num == 0) { - $colspan = 1; - foreach ($arrayfields as $key => $val) { - if (!empty($val['checked'])) { - $colspan++; - } - } - print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>'; -} - - -$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 '</table>'."\n"; -print '</div>'."\n"; - -print '</form>'."\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('&amp;', '&', $param); - - $filedir = $diroutputmassaction; - $genallowed = $user->rights->zapier->read; - $delallowed = $user->rights->zapier->create; - - print $formfile->showdocuments('massfilesarea_zapier', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/zapier/hook_note.php b/htdocs/zapier/hook_note.php deleted file mode 100644 index da0484160a3..00000000000 --- a/htdocs/zapier/hook_note.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * 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 <http://www.gnu.org/licenses/>. - */ - -/** - * \file htdocs/modulebuilder/template/myobject_note.php - * \ingroup mymodule - * \brief Car with notes on MyObject - */ - -// Load Dolibarr environment -require '../main.inc.php'; -dol_include_once('/mymodule/class/myobject.class.php'); -dol_include_once('/mymodule/lib/mymodule_myobject.lib.php'); - -// Load translation files required by the page -$langs->loadLangs(array("mymodule@mymodule", "companies")); - -// Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'aZ09'); -$backtopage = GETPOST('backtopage', 'alpha'); - -// Initialize technical objects -$object = new MyObject($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('myobjectnote', 'globalcard')); // Note that conf->hooks_modules contains array - -// Fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'mymodule', $id); - -// 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->mymodule->multidir_output[$object->entity]."/".$object->id; - -$permissionnote = 1; -//$permissionnote=$user->rights->mymodule->creer; // Used by the include of actions_setnotes.inc.php - - - -/* - * Actions - */ - -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once - - -/* - * View - */ - -$form = new Form($db); - -//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'; -$help_url = ''; -llxHeader('', $langs->trans('MyObject'), $help_url); - -if ($id > 0 || !empty($ref)) { - $object->fetch_thirdparty(); - - $head = myobjectPrepareHead($object); - - print dol_get_fiche_head($head, 'note', $langs->trans("MyObject"), -1, 'myobject@mymodule'); - - // Object card - // ------------------------------------------------------------ - $linkback = '<a href="'.dol_buildpath('/mymodule/myobject_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; - - $morehtmlref = '<div class="refidno">'; - /* - // 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.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='<br>'.$langs->trans('Project') . ' '; - if ($user->rights->mymodule->creer) - { - if ($action != 'classify') - //$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; - $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.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; - $morehtmlref.='<input type="hidden" name="action" value="classin">'; - $morehtmlref.='<input type="hidden" name="token" value="'.newToken().'">'; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; - $morehtmlref.='</form>'; - } 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.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; - $morehtmlref.=$proj->ref; - $morehtmlref.='</a>'; - } else { - $morehtmlref.=''; - } - } - }*/ - $morehtmlref .= '</div>'; - - - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - - - print '<div class="fichecenter">'; - print '<div class="underbanner clearboth"></div>'; - - - $cssclass = "titlefield"; - include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - - print '</div>'; - - print dol_get_fiche_end(); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/zapier/img/object_zapier.png b/htdocs/zapier/img/object_zapier.png deleted file mode 100644 index de31be865a1..00000000000 Binary files a/htdocs/zapier/img/object_zapier.png and /dev/null differ diff --git a/htdocs/zapier/lib/zapier.lib.php b/htdocs/zapier/lib/zapier.lib.php index 1e2d4f5ec64..a92f2879b4d 100644 --- a/htdocs/zapier/lib/zapier.lib.php +++ b/htdocs/zapier/lib/zapier.lib.php @@ -30,7 +30,7 @@ function zapierAdminPrepareHead() { global $langs, $conf; - $langs->load("zapier@zapier"); + $langs->load("zapier"); $h = 0; $head = array(); diff --git a/htdocs/zapier/lib/zapier_hook.lib.php b/htdocs/zapier/lib/zapier_hook.lib.php index 114e7753512..3d4228325e2 100644 --- a/htdocs/zapier/lib/zapier_hook.lib.php +++ b/htdocs/zapier/lib/zapier_hook.lib.php @@ -43,11 +43,17 @@ function myobjectPrepareHead($object) if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + if (!empty($object->note_private)) { + $nbNote++; + } + if (!empty($object->note_public)) { + $nbNote++; + } $head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + if ($nbNote > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; + } $head[$h][2] = 'note'; $h++; } @@ -59,7 +65,9 @@ function myobjectPrepareHead($object) $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + if (($nbFiles + $nbLinks) > 0) { + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>'; + } $head[$h][2] = 'document'; $h++; diff --git a/htdocs/zapier/zapierindex.php b/htdocs/zapier/zapierindex.php deleted file mode 100644 index 5ecdf24e6cd..00000000000 --- a/htdocs/zapier/zapierindex.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/** - * \file htdocs/zapier/zapierindex.php - * \ingroup zapier - * \brief Home page of zapier top menu - */ - -// Load Dolibarr environment -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; - -// Load translation files required by the page -$langs->loadLangs(array("zapier@zapier")); - -$action = GETPOST('action', 'aZ09'); - - -// Securite acces client -if (!$user->rights->zapier->read) accessforbidden(); -$socid = GETPOST('socid', 'int'); -if (isset($user->socid) && $user->socid > 0) { - $action = ''; - $socid = $user->socid; -} - -$max = 5; -$now = dol_now(); - - -/* - * Actions - */ - -// None - - -/* - * View - */ - -$form = new Form($db); -$formfile = new FormFile($db); - -llxHeader("", $langs->trans("ZapierForDolibarrArea")); - -print load_fiche_titre($langs->trans("ZapierForDolibarrArea"), '', 'zapier.png@zapier'); - -print '<div class="fichecenter"><div class="fichethirdleft">'; - - -print '</div><div class="fichetwothirdright"><div class="ficheaddleft">'; - - -print '</div></div></div>'; - -// End of page -llxFooter(); -$db->close(); diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 4dc22193262..519ab534cc6 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -25,7 +25,9 @@ * \brief Page to detect empty accounting account */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $path = __DIR__.'/'; @@ -36,8 +38,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $langs->loadLangs(array("companies", "compta", "main", "accountancy")); // Security check -if (!$user->admin) +if (!$user->admin) { accessforbidden(); +} // Date range $year = GETPOST("year"); @@ -54,8 +57,7 @@ $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_starty $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); // Quarter -if (empty($date_start) || empty($date_end)) // We define date_start and date_end -{ +if (empty($date_start) || empty($date_end)) { // We define date_start and date_end $q = GETPOST("q") ? GETPOST("q") : 0; if ($q == 0) { // We define date_start and date_end @@ -67,10 +69,14 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $year_end--; } $month_end = $month_start - 1; - if ($month_end < 1) + if ($month_end < 1) { $month_end = 12; - else $year_end++; - } else $month_end = $month_start; + } else { + $year_end++; + } + } 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); } @@ -128,11 +134,13 @@ $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."c_country as cp"; $sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " AND s.fk_pays = cp.rowid"; -if (!empty($date_start) && !empty($date_end)) +if (!empty($date_start) && !empty($date_end)) { $sql .= " AND f.datec >= '".$db->idate($date_start)."' AND f.datec <= '".$db->idate($date_end)."'"; +} $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; -if ($socid) +if ($socid) { $sql .= " AND f.fk_soc = ".$socid; +} $sql .= " GROUP BY name"; $sql .= ")"; $sql .= "UNION (SELECT s.rowid, s.nom as name , s.address, s.zip , s.town, s.code_compta_fournisseur as compta , "; @@ -142,11 +150,13 @@ $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql .= ", ".MAIN_DB_PREFIX."c_country as cp"; $sql .= " WHERE ff.fk_soc = s.rowid"; $sql .= " AND s.fk_pays = cp.rowid"; -if (!empty($date_start) && !empty($date_end)) +if (!empty($date_start) && !empty($date_end)) { $sql .= " AND ff.datec >= '".$db->idate($date_start)."' AND ff.datec <= '".$db->idate($date_end)."'"; +} $sql .= " AND ff.entity = ".$conf->entity; -if ($socid) +if ($socid) { $sql .= " AND f.fk_soc = ".$socid; +} $sql .= " GROUP BY name"; $sql .= ")"; @@ -200,8 +210,7 @@ if ($resql) { print '<td class="left">'.$langs->trans("Phone").'</td>'; print '<td class="left">'.$langs->trans("Fax").'</td></tr>'; - while ($obj = $db->fetch_object($resql)) - { + while ($obj = $db->fetch_object($resql)) { print '<tr class="oddeven">'; print '<td>'; $thirdpartystatic->id = $obj->rowid; diff --git a/scripts/bank/export-bank-receipts.php b/scripts/bank/export-bank-receipts.php index d8c4b91550d..a3876cb146f 100755 --- a/scripts/bank/export-bank-receipts.php +++ b/scripts/bank/export-bank-receipts.php @@ -23,7 +23,9 @@ * \brief Script file to export bank receipts into Excel files */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -154,8 +156,9 @@ if (!empty($num) && $num != "all") { $listofnum .= "'"; $arraynum = explode(',', $num); foreach ($arraynum as $val) { - if ($listofnum != "'") + if ($listofnum != "'") { $listofnum .= "','"; + } $listofnum .= $val; } $listofnum .= "'"; @@ -166,10 +169,12 @@ $sql .= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel"; $sql .= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= ", ".MAIN_DB_PREFIX."bank as b"; $sql .= " WHERE b.fk_account = ".$acct->id; -if ($listofnum) +if ($listofnum) { $sql .= " AND b.num_releve IN (".$listofnum.")"; -if (!isset($num)) +} +if (!isset($num)) { $sql .= " OR b.num_releve is null"; +} $sql .= " AND b.fk_account = ba.rowid"; $sql .= $db->order("b.num_releve, b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day // print $sql; @@ -242,9 +247,11 @@ if ($resql) { // Libelle $reg = array(); preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthese on tente recherche de traduction - if ($reg[1] && $langs->transnoentitiesnoconv($reg[1]) != $reg[1]) + if ($reg[1] && $langs->transnoentitiesnoconv($reg[1]) != $reg[1]) { $description = $langs->transnoentitiesnoconv($reg[1]); - else $description = $objp->label; + } else { + $description = $objp->label; + } /* * Ajout les liens (societe, company...) diff --git a/scripts/clicktodial/ekiga.sh b/scripts/clicktodial/ekiga.sh index 09331c24350..4fce22f63cb 100755 --- a/scripts/clicktodial/ekiga.sh +++ b/scripts/clicktodial/ekiga.sh @@ -2,8 +2,8 @@ #--------------------------------------------------------- # Script to launch Ekiga softphone. # This script can be used to setup a ClickToDial system -# when using Ekiga soft phone. -# More information on http://wiki.dolibarr.org/index.php/Module_ClickToDial_En +# when using Ekiga soft phone with Dolibarr. +# More information on https://wiki.dolibarr.org/index.php/Module_ClickToDial_En #--------------------------------------------------------- ekiga -c $1 & diff --git a/scripts/clicktodial/linphone.sh b/scripts/clicktodial/linphone.sh index 97c3bcb18d7..ee013526c69 100755 --- a/scripts/clicktodial/linphone.sh +++ b/scripts/clicktodial/linphone.sh @@ -1,9 +1,11 @@ #!/bin/bash #--------------------------------------------------------- # Script to launch LinPhone softphone. +# # This script can be used to setup a ClickToDial system -# when using LinPhone soft phone. -# More information on http://wiki.dolibarr.org/index.php/Module_ClickToDial_En +# when using LinPhone soft phone with Dolibarr. +# +# More information on https://wiki.dolibarr.org/index.php/Module_ClickToDial_En #--------------------------------------------------------- # Note: Adding handler into gconf-tools seems to do nothing diff --git a/scripts/company/sync_contacts_dolibarr2ldap.php b/scripts/company/sync_contacts_dolibarr2ldap.php index 8e5274fb69a..53ec46ddcd8 100755 --- a/scripts/company/sync_contacts_dolibarr2ldap.php +++ b/scripts/company/sync_contacts_dolibarr2ldap.php @@ -24,7 +24,9 @@ * \brief Script to update all contacts from Dolibarr into a LDAP database */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -60,8 +62,9 @@ if (!isset($argv[1]) || !$argv[1]) { } foreach ($argv as $key => $val) { - if (preg_match('/-y$/', $val, $reg)) + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } $now = $argv[1]; diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 802f0b14434..0979046ff28 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -25,7 +25,9 @@ * \brief Script to send a mail to customers with services to expire */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -80,24 +82,30 @@ if ($mode != 'confirm') { $sql = "SELECT c.ref, cd.date_fin_validite, cd.total_ttc, cd.description as description, p.label as plabel,"; $sql .= " s.rowid as sid, s.nom as name, s.email, s.default_lang"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= ", sp.rowid as cid, sp.firstname as cfirstname, sp.lastname as clastname, sp.email as cemail"; +} $sql .= " FROM ".MAIN_DB_PREFIX."societe AS s"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= ", ".MAIN_DB_PREFIX."socpeople as sp"; +} $sql .= ", ".MAIN_DB_PREFIX."contrat AS c"; $sql .= ", ".MAIN_DB_PREFIX."contratdet AS cd"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product AS p ON p.rowid = cd.fk_product"; $sql .= " WHERE s.rowid = c.fk_soc AND c.rowid = cd.fk_contrat AND c.statut > 0 AND cd.statut < 5"; -if (is_numeric($duration_value2)) +if (is_numeric($duration_value2)) { $sql .= " AND cd.date_fin_validite >= '".$db->idate(dol_time_plus_duree($now, $duration_value2, "d"))."'"; -if (is_numeric($duration_value)) +} +if (is_numeric($duration_value)) { $sql .= " AND cd.date_fin_validite < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'"; -if ($targettype == 'contacts') +} +if ($targettype == 'contacts') { $sql .= " AND s.rowid = sp.fk_soc"; +} $sql .= " ORDER BY"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= " sp.email, sp.rowid,"; +} $sql .= " s.email ASC, s.rowid ASC, cd.date_fin_validite ASC"; // Order by email to allow one message per email // print $sql; @@ -145,9 +153,11 @@ if ($resql) { $trackthirdpartiessent[$oldsid.'|'.$oldemail] = 'contact id '.$oldcid; } else { if ($oldemail != 'none') { - if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) + if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { print "- No email sent for '".$oldtarget."', total: ".$total."\n"; - else print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } else { + print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } } } $oldemail = $newemail; @@ -176,9 +186,11 @@ if ($resql) { $foundtoprocess++; } print "Service to expire ".$obj->ref.", label ".dol_concatdesc($obj->plabel, $obj->description).", due date ".dol_print_date($db->jdate($obj->date_fin_validite), 'day').", customer id ".$obj->sid." ".$obj->name.", ".(isset($obj->cid) ? "contact id ".$obj->cid." ".$obj->clastname." ".$obj->cfirstname.", " : "")."email ".$newemail.", lang ".$outputlangs->defaultlang.": "; - if (dol_strlen($newemail)) + if (dol_strlen($newemail)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -190,15 +202,16 @@ if ($resql) { // Si il reste des envois en buffer if ($foundtoprocess) { - if (dol_strlen($oldemail) && $oldemail != 'none' && empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) // Break onto email (new email) - { + if (dol_strlen($oldemail) && $oldemail != 'none' && empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { // Break onto email (new email) envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldtarget, $duration_value); $trackthirdpartiessent[$oldsid.'|'.$oldemail] = 'contact id '.$oldcid; } else { if ($oldemail != 'none') { - if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) + if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { print "- No email sent for '".$oldtarget."', total: ".$total."\n"; - else print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } else { + print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } } } } @@ -230,8 +243,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $ { global $conf, $langs; - if (getenv('DOL_FORCE_EMAIL_TO')) + if (getenv('DOL_FORCE_EMAIL_TO')) { $oldemail = getenv('DOL_FORCE_EMAIL_TO'); + } $newlangs = new Translate('', $conf); $newlangs->setDefaultLang(empty($userlang) ? (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); @@ -239,10 +253,14 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $ $newlangs->load("contracts"); if ($duration_value) { - if ($duration_value > 0) + if ($duration_value > 0) { $title = $newlangs->transnoentities("ListOfServicesToExpireWithDuration", $duration_value); - else $title = $newlangs->transnoentities("ListOfServicesToExpireWithDurationNeg", $duration_value); - } else $title = $newlangs->transnoentities("ListOfServicesToExpire"); + } else { + $title = $newlangs->transnoentities("ListOfServicesToExpireWithDurationNeg", $duration_value); + } + } else { + $title = $newlangs->transnoentities("ListOfServicesToExpire"); + } $subject = (empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_SUBJECT) ? $title : $conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_SUBJECT); $sendto = $oldemail; @@ -254,10 +272,12 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $ dol_syslog("email_expire_services_to_customers.php: send mail to ".$oldemail); $usehtml = 0; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER)) + if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER)) { $usehtml += 1; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_HEADER)) + } + if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_HEADER)) { $usehtml += 1; + } $allmessage = ''; if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_HEADER)) { @@ -270,8 +290,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $ // $allmessage.= $langs->trans("Total")." = ".price($total,0,$userlang,0,0,-1,$conf->currency).($usehtml?"<br>\n":"\n"); if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER)) { $allmessage .= $conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER)) + if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_FOOTER)) { $usehtml += 1; + } } $mail = new CMailFile($subject, $sendto, $from, $allmessage, array(), array(), array(), '', '', 0, $msgishtml); diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index 2c8429b6256..316994752e5 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -25,7 +25,9 @@ * \brief Script to send a mail to dolibarr users linked to companies with services to expire */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -79,8 +81,9 @@ $sql .= " u.rowid as uid, u.lastname, u.firstname, u.email, u.lang"; $sql .= " FROM ".MAIN_DB_PREFIX."societe AS s, ".MAIN_DB_PREFIX."contrat AS c, ".MAIN_DB_PREFIX."contratdet AS cd"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product AS p ON p.rowid = cd.fk_product, ".MAIN_DB_PREFIX."societe_commerciaux AS sc, ".MAIN_DB_PREFIX."user AS u"; $sql .= " WHERE s.rowid = c.fk_soc AND c.rowid = cd.fk_contrat AND c.statut > 0 AND cd.statut<5"; -if (is_numeric($duration_value)) +if (is_numeric($duration_value)) { $sql .= " AND cd.date_fin_validite < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'"; +} $sql .= " AND sc.fk_soc = s.rowid AND sc.fk_user = u.rowid"; $sql .= " ORDER BY u.email ASC, s.rowid ASC, c.ref ASC"; // Order by email to allow one message per email @@ -107,8 +110,9 @@ if ($resql) { if (dol_strlen($oldemail) && $oldemail != 'none') { envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldsalerepresentative, $duration_value); } else { - if ($oldemail != 'none') + if ($oldemail != 'none') { print "- No email sent for ".$oldsalerepresentative.", total: ".$total."\n"; + } } $oldemail = $obj->email; $olduid = $obj->uid; @@ -118,8 +122,9 @@ if ($resql) { $total = 0; $foundtoprocess = 0; $salerepresentative = dolGetFirstLastname($obj->firstname, $obj->lastname); - if (empty($obj->email)) + if (empty($obj->email)) { print "Warning: Sale representative ".$salerepresentative." has no email. Notice disabled.\n"; + } } // Define line content @@ -135,9 +140,11 @@ if ($resql) { $foundtoprocess++; } print "Service to expire ".$obj->ref.", label ".dol_concatdesc($obj->plabel, $obj->description).", due date ".dol_print_date($db->jdate($obj->date_fin_validite), 'day')." (linked to company ".$obj->name.", sale representative ".dolGetFirstLastname($obj->firstname, $obj->lastname).", email ".$obj->email."): "; - if (dol_strlen($obj->email)) + if (dol_strlen($obj->email)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -148,12 +155,12 @@ if ($resql) { // Si il reste des envois en buffer if ($foundtoprocess) { - if (dol_strlen($oldemail) && $oldemail != 'none') // Break onto email (new email) - { + if (dol_strlen($oldemail) && $oldemail != 'none') { // Break onto email (new email) envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldsalerepresentative, $duration_value); } else { - if ($oldemail != 'none') + if ($oldemail != 'none') { print "- No email sent for ".$oldsalerepresentative.", total: ".$total."\n"; + } } } } else { @@ -184,8 +191,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre { global $conf, $langs; - if (getenv('DOL_FORCE_EMAIL_TO')) + if (getenv('DOL_FORCE_EMAIL_TO')) { $oldemail = getenv('DOL_FORCE_EMAIL_TO'); + } $newlangs = new Translate('', $conf); $newlangs->setDefaultLang(empty($userlang) ? (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); @@ -230,8 +238,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre $allmessage .= $langs->trans("Total")." = ".price($total, 0, $userlang, 0, 0, - 1, $conf->currency).($usehtml ? "<br>\n" : "\n"); if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER)) { $allmessage .= $conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER)) + if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER)) { $usehtml += 1; + } } $mail = new CMailFile($subject, $sendto, $from, $allmessage, array(), array(), array(), '', '', 0, $msgishtml); diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index ecec277995d..80f586a6788 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -25,12 +25,24 @@ * \brief Execute pendings jobs */ -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('NOLOGIN')) define('NOLOGIN', '1'); -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); // Disables token renewal +} +if (!defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); +} +if (!defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); +} +if (!defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (!defined('NOLOGIN')) { + define('NOLOGIN', '1'); +} +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -106,7 +118,9 @@ if ($userlogin == 'firstadmin') { $userlogin = $obj->login; echo "First admin user found is login '".$userlogin."', entity ".$obj->entity."\n"; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } // Check user login @@ -125,7 +139,7 @@ if ($result < 0) { } $user->getrights(); -if (isset($argv[3]) || $argv[3]) { +if (isset($argv[3]) && $argv[3]) { $id = $argv[3]; } @@ -151,8 +165,7 @@ if ($result < 0) { $qualifiedjobs = array(); foreach ($object->lines as $val) { - if (!verifCond($val->test)) - { + if (!verifCond($val->test)) { continue; } $qualifiedjobs[] = $val; @@ -173,8 +186,7 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label; // Force reload of setup for the current entity - if ((empty($line->entity) ? 1 : $line->entity) != $conf->entity) - { + if ((empty($line->entity) ? 1 : $line->entity) != $conf->entity) { dol_syslog("cron_run_jobs.php we work on another entity conf than ".$conf->entity." so we reload mysoc, langs, user and conf", LOG_DEBUG); echo " -> we change entity so we reload mysoc, langs, user and conf"; @@ -183,17 +195,14 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { $mysoc->setMysoc($conf); // Force recheck that user is ok for the entity to process and reload permission for entity - if ($conf->entity != $user->entity && $user->entity != 0) - { + if ($conf->entity != $user->entity && $user->entity != 0) { $result = $user->fetch('', $userlogin, '', 0, $conf->entity); - if ($result < 0) - { + if ($result < 0) { echo "\nUser Error: ".$user->error."\n"; dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR); exit(-1); } else { - if ($result == 0) - { + if ($result == 0) { echo "\nUser login: ".$userlogin." does not exists for entity ".$conf->entity."\n"; dol_syslog("User login:".$userlogin." does not exists", LOG_ERR); exit(-1); @@ -204,8 +213,12 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { // Reload langs $langcode = (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT); - if (!empty($user->conf->MAIN_LANG_DEFAULT)) $langcode = $user->conf->MAIN_LANG_DEFAULT; - if ($langs->getDefaultLang() != $langcode) $langs->setDefaultLang($langcode); + if (!empty($user->conf->MAIN_LANG_DEFAULT)) { + $langcode = $user->conf->MAIN_LANG_DEFAULT; + } + if ($langs->getDefaultLang() != $langcode) { + $langs->setDefaultLang($langcode); + } } //If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database @@ -262,8 +275,9 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { $db->close(); -if ($nbofjobslaunchedko) +if ($nbofjobslaunchedko) { exit(1); +} exit(0); /** diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index fcaa40e1fde..00ae2d64479 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -26,7 +26,9 @@ * \brief Script to send a prepared and validated emaling from command line */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -45,12 +47,17 @@ if (!isset($argv[1]) || !$argv[1]) { $id = $argv[1]; -if (isset($argv[2]) || !empty($argv[2])) $login = $argv[2]; -else $login = ''; +if (isset($argv[2]) || !empty($argv[2])) { + $login = $argv[2]; +} else { + $login = ''; +} $max = 0; -if (isset($argv[3]) || !empty($argv[3])) $max = $argv[3]; +if (isset($argv[3]) || !empty($argv[3])) { + $max = $argv[3]; +} require_once $path."../../htdocs/master.inc.php"; @@ -61,8 +68,7 @@ require_once DOL_DOCUMENT_ROOT."/comm/mailing/class/mailing.class.php"; $version = DOL_VERSION; $error = 0; -if (empty($conf->global->MAILING_LIMIT_SENDBYCLI)) -{ +if (empty($conf->global->MAILING_LIMIT_SENDBYCLI)) { $conf->global->MAILING_LIMIT_SENDBYCLI = 0; } @@ -78,12 +84,14 @@ if (!empty($conf->global->MAILING_DELAY)) { print 'A delay of '.((float) $conf->global->MAILING_DELAY * 1000000).' millisecond has been set between each email'."\n"; } -if ($conf->global->MAILING_LIMIT_SENDBYCLI == '-1') {} +if ($conf->global->MAILING_LIMIT_SENDBYCLI == '-1') { +} $user = new User($db); // for signature, we use user send as parameter -if (!empty($login)) +if (!empty($login)) { $user->fetch('', $login); +} // We get list of emailing id to process $sql = "SELECT m.rowid"; @@ -119,8 +127,9 @@ if ($resql) { $errorsto = $emailing->email_errorsto; // Le message est-il en html $msgishtml = - 1; // Unknown by default - if (preg_match('/[\s\t]*<html>/i', $message)) + if (preg_match('/[\s\t]*<html>/i', $message)) { $msgishtml = 1; + } $nbok = 0; $nbko = 0; @@ -202,12 +211,15 @@ if ($resql) { $substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'; $onlinepaymentenabled = 0; - if (!empty($conf->paypal->enabled)) + if (!empty($conf->paypal->enabled)) { $onlinepaymentenabled++; - if (!empty($conf->paybox->enabled)) + } + if (!empty($conf->paybox->enabled)) { $onlinepaymentenabled++; - if (!empty($conf->stripe->enabled)) + } + if (!empty($conf->stripe->enabled)) { $onlinepaymentenabled++; + } if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) { $substitutionarray['__SECUREKEYPAYMENT__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { @@ -226,21 +238,29 @@ if ($resql) { if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { $substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) { $substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - else $substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'membersubscription'.$obj->source_id, 2); + } else { + $substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'membersubscription'.$obj->source_id, 2); + } - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) { $substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - else $substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'order'.$obj->source_id, 2); + } else { + $substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'order'.$obj->source_id, 2); + } - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) { $substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - else $substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'invoice'.$obj->source_id, 2); + } else { + $substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'invoice'.$obj->source_id, 2); + } - if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) + if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) { $substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); - else $substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'contractline'.$obj->source_id, 2); + } else { + $substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.'contractline'.$obj->source_id, 2); + } } complete_substitutions_array($substitutionarray, $langs); @@ -256,10 +276,8 @@ if ($resql) { $listofpaths = dol_dir_list($upload_dir, 'all', 0, '', '', 'name', SORT_ASC, 0); - if (count($listofpaths)) - { - foreach ($listofpaths as $key => $val) - { + if (count($listofpaths)) { + foreach ($listofpaths as $key => $val) { $arr_file[] = $listofpaths[$key]['fullname']; $arr_mime[] = dol_mimetype($listofpaths[$key]['name']); $arr_name[] = $listofpaths[$key]['name']; @@ -364,8 +382,9 @@ if ($resql) { // Loop finished, set global statut of mail $statut = 2; - if (!$nbko) + if (!$nbko) { $statut = 3; + } $sqlenddate = "UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$id; diff --git a/scripts/emailings/reset-invalid-emails.php b/scripts/emailings/reset-invalid-emails.php index 8730d66b96d..a15cad86072 100755 --- a/scripts/emailings/reset-invalid-emails.php +++ b/scripts/emailings/reset-invalid-emails.php @@ -22,8 +22,12 @@ * \brief Script to reset (set email to empty) from a list of email */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); -if (!defined('MAXEMAILS')) define('MAXEMAILS', 100); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} +if (!defined('MAXEMAILS')) { + define('MAXEMAILS', 100); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -71,8 +75,7 @@ $db->begin(); $myfile = fopen($fileofinvalidemail, "r"); -if (!$myfile) -{ +if (!$myfile) { echo "Failed to open file"; exit(-1); } @@ -81,14 +84,11 @@ $tmp = 1; $counter = 1; $numerasedtotal = 0; -while ($tmp != null) -{ +while ($tmp != null) { $groupofemails = array(); - for ($i = 0; $i < MAXEMAILS; $i++) - { + for ($i = 0; $i < MAXEMAILS; $i++) { $tmp = fgets($myfile); - if ($tmp == null) - { + if ($tmp == null) { break; } $groupofemails[$i] = trim($tmp, "\n"); @@ -109,8 +109,7 @@ while ($tmp != null) $sql_base = "UPDATE ".MAIN_DB_PREFIX; - if ($type == 'all' || $type == 'users') - { + if ($type == 'all' || $type == 'users') { // Loop on each record and update the email to null if email into $groupofemails $sql = $sql_base."user as u SET u.email = NULL WHERE u.email IN (".$emailsin.");"; print "Try to update users, "; @@ -121,8 +120,7 @@ while ($tmp != null) $numerased += $db->affected_rows($resql); } - if ($type == 'all' || $type == 'thirdparties') - { + if ($type == 'all' || $type == 'thirdparties') { // Loop on each record and update the email to null if email into $groupofemails $sql = $sql_base."societe as s SET s.email = NULL WHERE s.email IN (".$emailsin.");"; print "Try to update thirdparties, "; @@ -133,8 +131,7 @@ while ($tmp != null) $numerased += $db->affected_rows($resql); } - if ($type == 'all' || $type == 'contacts') - { + if ($type == 'all' || $type == 'contacts') { // Loop on each record and update the email to null if email into $groupofemails $sql = $sql_base."socpeople as s SET s.email = NULL WHERE s.email IN (".$emailsin.");"; @@ -146,8 +143,7 @@ while ($tmp != null) $numerased += $db->affected_rows($resql); } - if ($type == 'all' || $type == 'members') - { + if ($type == 'all' || $type == 'members') { // Loop on each record and update the email to null if email into $groupofemails $sql = $sql_base."adherent as a SET a.email = NULL WHERE a.email IN (".$emailsin.");"; diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 5d4d3ff3e64..41c84ee4d41 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -25,7 +25,9 @@ * \brief Script to send a mail to customers with unpaid invoices */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -80,22 +82,28 @@ if ($mode != 'confirm') { $sql = "SELECT f.ref, f.total_ttc, f.date_lim_reglement as due_date,"; $sql .= " s.rowid as sid, s.nom as name, s.email, s.default_lang"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= ", sp.rowid as cid, sp.firstname as cfirstname, sp.lastname as clastname, sp.email as cemail"; +} $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= ", ".MAIN_DB_PREFIX."socpeople as sp"; +} $sql .= " WHERE f.fk_statut = 1 AND f.paye = 0"; $sql .= " AND f.fk_soc = s.rowid"; -if (is_numeric($duration_value2)) +if (is_numeric($duration_value2)) { $sql .= " AND f.date_lim_reglement >= '".$db->idate(dol_time_plus_duree($now, $duration_value2, "d"))."'"; -if (is_numeric($duration_value)) +} +if (is_numeric($duration_value)) { $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'"; -if ($targettype == 'contacts') +} +if ($targettype == 'contacts') { $sql .= " AND s.rowid = sp.fk_soc"; +} $sql .= " ORDER BY"; -if ($targettype == 'contacts') +if ($targettype == 'contacts') { $sql .= " sp.email, sp.rowid,"; +} $sql .= " s.email ASC, s.rowid ASC, f.ref ASC"; // Order by email to allow one message per email // print $sql; @@ -143,9 +151,11 @@ if ($resql) { $trackthirdpartiessent[$oldsid.'|'.$oldemail] = 'contact id '.$oldcid; } else { if ($oldemail != 'none') { - if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) + if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { print "- No email sent for '".$oldtarget."', total: ".$total."\n"; - else print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } else { + print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } } } $oldemail = $newemail; @@ -174,9 +184,11 @@ if ($resql) { $foundtoprocess++; } print "Unpaid invoice ".$obj->ref.", price ".price2num($obj->total_ttc).", due date ".dol_print_date($db->jdate($obj->due_date), 'day').", customer id ".$obj->sid." ".$obj->name.", ".(isset($obj->cid) ? "contact id ".$obj->cid." ".$obj->clastname." ".$obj->cfirstname.", " : "")."email ".$newemail.", lang ".$outputlangs->defaultlang.": "; - if (dol_strlen($newemail)) + if (dol_strlen($newemail)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -188,15 +200,16 @@ if ($resql) { // Si il reste des envois en buffer if ($foundtoprocess) { - if (dol_strlen($oldemail) && $oldemail != 'none' && empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) // Break onto email (new email) - { + if (dol_strlen($oldemail) && $oldemail != 'none' && empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { // Break onto email (new email) envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldtarget); $trackthirdpartiessent[$oldsid.'|'.$oldemail] = 'contact id '.$oldcid; } else { if ($oldemail != 'none') { - if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) + if (empty($trackthirdpartiessent[$oldsid.'|'.$oldemail])) { print "- No email sent for '".$oldtarget."', total: ".$total."\n"; - else print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } else { + print "- No email sent for '".$oldtarget."', total: ".$total." (already sent to ".$trackthirdpartiessent[$oldsid.'|'.$oldemail].")\n"; + } } } } @@ -227,8 +240,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) { global $conf, $langs; - if (getenv('DOL_FORCE_EMAIL_TO')) + if (getenv('DOL_FORCE_EMAIL_TO')) { $oldemail = getenv('DOL_FORCE_EMAIL_TO'); + } $newlangs = new Translate('', $conf); $newlangs->setDefaultLang(empty($userlang) ? (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); @@ -245,10 +259,12 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) dol_syslog("email_unpaid_invoices_to_customers.php: send mail to ".$oldemail); $usehtml = 0; - if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) + if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) { $usehtml += 1; - if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_HEADER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_HEADER)) + } + if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_HEADER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_HEADER)) { $usehtml += 1; + } $allmessage = ''; if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_HEADER)) { @@ -262,8 +278,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) $allmessage .= $langs->trans("Total")." = ".price($total, 0, $userlang, 0, 0, - 1, $conf->currency).($usehtml ? "<br>\n" : "\n"); if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) { $allmessage .= $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) + if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) { $usehtml += 1; + } } $mail = new CMailFile($subject, $sendto, $from, $allmessage, array(), array(), array(), '', '', 0, $msgishtml); diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index d5c71c70565..3cc9ad1a0eb 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -25,7 +25,9 @@ * \brief Script to send a mail to dolibarr users linked to companies with unpaid invoices */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -82,8 +84,9 @@ $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " , ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE f.fk_statut = 1 AND f.paye = 0"; $sql .= " AND f.fk_soc = s.rowid"; -if (is_numeric($duration_value)) +if (is_numeric($duration_value)) { $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_time_plus_duree($now, $duration_value, "d"))."'"; +} $sql .= " AND sc.fk_soc = s.rowid"; $sql .= " AND sc.fk_user = u.rowid"; $sql .= " ORDER BY u.email ASC, s.rowid ASC, f.ref ASC"; // Order by email to allow one message per email @@ -111,8 +114,9 @@ if ($resql) { if (dol_strlen($oldemail) && $oldemail != 'none') { envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldsalerepresentative); } else { - if ($oldemail != 'none') + if ($oldemail != 'none') { print "- No email sent for ".$oldsalerepresentative.", total: ".$total."\n"; + } } $oldemail = $obj->email; $olduid = $obj->uid; @@ -122,8 +126,9 @@ if ($resql) { $total = 0; $foundtoprocess = 0; $salerepresentative = dolGetFirstLastname($obj->firstname, $obj->lastname); - if (empty($obj->email)) + if (empty($obj->email)) { print "Warning: Sale representative ".$salerepresentative." has no email. Notice disabled.\n"; + } } // Define line content @@ -139,9 +144,11 @@ if ($resql) { $foundtoprocess++; } print "Unpaid invoice ".$obj->ref.", price ".price2num($obj->total_ttc).", due date ".dol_print_date($db->jdate($obj->due_date), 'day')." (linked to company ".$obj->name.", sale representative ".dolGetFirstLastname($obj->firstname, $obj->lastname).", email ".$obj->email.", lang ".$outputlangs->defaultlang."): "; - if (dol_strlen($obj->email)) + if (dol_strlen($obj->email)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -152,12 +159,12 @@ if ($resql) { // Si il reste des envois en buffer if ($foundtoprocess) { - if (dol_strlen($oldemail) && $oldemail != 'none') // Break onto email (new email) - { + if (dol_strlen($oldemail) && $oldemail != 'none') { // Break onto email (new email) envoi_mail($mode, $oldemail, $message, $total, $oldlang, $oldsalerepresentative); } else { - if ($oldemail != 'none') + if ($oldemail != 'none') { print "- No email sent for ".$oldsalerepresentative.", total: ".$total."\n"; + } } } } else { @@ -187,8 +194,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre { global $conf, $langs; - if (getenv('DOL_FORCE_EMAIL_TO')) + if (getenv('DOL_FORCE_EMAIL_TO')) { $oldemail = getenv('DOL_FORCE_EMAIL_TO'); + } $newlangs = new Translate('', $conf); $newlangs->setDefaultLang(empty($userlang) ? (empty($conf->global->MAIN_LANG_DEFAULT) ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); @@ -205,10 +213,12 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre dol_syslog("email_unpaid_invoices_to_representatives.php: send mail to ".$oldemail); $usehtml = 0; - if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) + if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) { $usehtml += 1; - if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_HEADER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_HEADER)) + } + if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_HEADER) && dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_HEADER)) { $usehtml += 1; + } $allmessage = ''; if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_HEADER)) { @@ -221,8 +231,9 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre $allmessage .= $langs->trans("Total")." = ".price($total, 0, $newlangs, 0, 0, - 1, $conf->currency).($usehtml ? "<br>\n" : "\n"); if (!empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) { $allmessage .= $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) + if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) { $usehtml += 1; + } } $mail = new CMailFile($subject, $sendto, $from, $allmessage, array(), array(), array(), '', '', 0, $msgishtml); diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php index 22c55eeeb99..309de5fe4bd 100755 --- a/scripts/invoices/rebuild_merge_pdf.php +++ b/scripts/invoices/rebuild_merge_pdf.php @@ -23,7 +23,9 @@ * \brief Script to rebuild PDF and merge PDF files into one */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/members/sync_members_dolibarr2ldap.php b/scripts/members/sync_members_dolibarr2ldap.php index f0edb2fb8f3..4ecbe2e9b08 100755 --- a/scripts/members/sync_members_dolibarr2ldap.php +++ b/scripts/members/sync_members_dolibarr2ldap.php @@ -24,7 +24,9 @@ * \brief Script de mise a jour des adherents dans LDAP depuis base Dolibarr */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -61,8 +63,9 @@ if (!isset($argv[1]) || !$argv[1]) { } foreach ($argv as $key => $val) { - if (preg_match('/-y$/', $val, $reg)) + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } $now = $argv[1]; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 21a5075326c..be312ec1932 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -24,7 +24,9 @@ * \brief Script de mise a jour des adherents dans Dolibarr depuis LDAP */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -98,12 +100,15 @@ if (!isset($argv[2]) || !is_numeric($argv[2])) { $typeid = $argv[2]; foreach ($argv as $key => $val) { - if ($val == 'commitiferror') + if ($val == 'commitiferror') { $forcecommit = 1; - if (preg_match('/--server=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--server=([^\s]+)$/', $val, $reg)) { $conf->global->LDAP_SERVER_HOST = $reg[1]; - if (preg_match('/-y$/', $val, $reg)) + } + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } print "Mails sending disabled (useless in batch mode)\n"; @@ -115,9 +120,11 @@ print "port=".$conf->global->LDAP_SERVER_PORT."\n"; print "login=".$conf->global->LDAP_ADMIN_DN."\n"; print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; print "DN to extract=".$conf->global->LDAP_MEMBER_DN."\n"; -if (!empty($conf->global->LDAP_MEMBER_FILTER)) +if (!empty($conf->global->LDAP_MEMBER_FILTER)) { print 'Filter=('.$conf->global->LDAP_MEMBER_FILTER.')'."\n"; // Note: filter is defined into function getRecords -else print 'Filter=('.$conf->global->LDAP_KEY_MEMBERS.'=*)'."\n"; +} else { + print 'Filter=('.$conf->global->LDAP_KEY_MEMBERS.'=*)'."\n"; +} print "----- To Dolibarr database:\n"; print "type=".$conf->db->type."\n"; print "host=".$conf->db->host."\n"; @@ -257,8 +264,9 @@ if ($result >= 0) { if ($datefirst && $datelast && $datelast <= $datefirst) { // On ne va inserer que la premiere $datelast = 0; - if (!$pricefirst && $pricelast) + if (!$pricefirst && $pricelast) { $pricefirst = $pricelast; + } } } @@ -278,9 +286,11 @@ if ($result >= 0) { } if (!$error || $forcecommit) { - if (!$error) + if (!$error) { print $langs->transnoentities("NoErrorCommitIsDone")."\n"; - else print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } else { + print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } $db->commit(); } else { print $langs->transnoentities("ErrorSomeErrorWereFoundRollbackIsDone", $error)."\n"; diff --git a/scripts/members/sync_members_types_dolibarr2ldap.php b/scripts/members/sync_members_types_dolibarr2ldap.php index d0cf6ae7f04..cec998abda5 100755 --- a/scripts/members/sync_members_types_dolibarr2ldap.php +++ b/scripts/members/sync_members_types_dolibarr2ldap.php @@ -25,7 +25,9 @@ * \brief Script de mise a jour des types de membres dans LDAP depuis base Dolibarr */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/members/sync_members_types_ldap2dolibarr.php b/scripts/members/sync_members_types_ldap2dolibarr.php index f24faf9b76a..9aea20fb209 100755 --- a/scripts/members/sync_members_types_ldap2dolibarr.php +++ b/scripts/members/sync_members_types_ldap2dolibarr.php @@ -26,7 +26,9 @@ * \brief Script to update members types into Dolibarr from LDAP */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -72,14 +74,18 @@ if (!isset($argv[1])) { } foreach ($argv as $key => $val) { - if ($val == 'commitiferror') + if ($val == 'commitiferror') { $forcecommit = 1; - if (preg_match('/--server=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--server=([^\s]+)$/', $val, $reg)) { $conf->global->LDAP_SERVER_HOST = $reg[1]; - if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) { $excludeuser = explode(',', $reg[1]); - if (preg_match('/-y$/', $val, $reg)) + } + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } print "Mails sending disabled (useless in batch mode)\n"; @@ -163,9 +169,11 @@ if ($result >= 0) { } if (!$error || $forcecommit) { - if (!$error) + if (!$error) { print $langs->transnoentities("NoErrorCommitIsDone")."\n"; - else print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } else { + print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } $db->commit(); } else { print $langs->transnoentities("ErrorSomeErrorWereFoundRollbackIsDone", $error)."\n"; diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php index 849eca44514..2f5a772fe8e 100755 --- a/scripts/product/migrate_picture_path.php +++ b/scripts/product/migrate_picture_path.php @@ -24,7 +24,9 @@ * \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+ */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/product/regenerate_thumbs.php b/scripts/product/regenerate_thumbs.php index 0d8c6380eb3..5230484a156 100755 --- a/scripts/product/regenerate_thumbs.php +++ b/scripts/product/regenerate_thumbs.php @@ -24,7 +24,9 @@ * \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+ */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -90,14 +92,16 @@ foreach ($filearray as $keyf => $valf) { // Create small thumbs for image // Used on logon for example $imgThumbSmall = vignette($vali['fullname'], $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs"); - if (preg_match('/Error/', $imgThumbSmall)) + if (preg_match('/Error/', $imgThumbSmall)) { print $imgThumbSmall."\n"; + } // Create mini thumbs for image (Ratio is near 16/9) // Used on menu or for setup page for example $imgThumbMini = vignette($vali['fullname'], $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs"); - if (preg_match('/Error/', $imgThumbMini)) + if (preg_match('/Error/', $imgThumbMini)) { print $imgThumbMini."\n"; + } } } diff --git a/scripts/user/migrate_picture_path.php b/scripts/user/migrate_picture_path.php index 795d03b710d..dd395dc0629 100755 --- a/scripts/user/migrate_picture_path.php +++ b/scripts/user/migrate_picture_path.php @@ -19,12 +19,14 @@ */ /** - * \file scripts/product/migrate_picture_path.php + * \file scripts/user/migrate_picture_path.php * \ingroup scripts * \brief Migrate pictures from old system prior to 3.7 to new path for 3.7+ */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/user/sync_groups_dolibarr2ldap.php b/scripts/user/sync_groups_dolibarr2ldap.php index eb229c3d4ed..dd0476bbfca 100755 --- a/scripts/user/sync_groups_dolibarr2ldap.php +++ b/scripts/user/sync_groups_dolibarr2ldap.php @@ -24,7 +24,9 @@ * \brief Script de mise a jour des groupes dans LDAP depuis base Dolibarr */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 26e12c2c5e4..67c14a4ee5d 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -25,7 +25,9 @@ * \brief Script to update groups into Dolibarr from LDAP */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -72,14 +74,18 @@ if (!isset($argv[1])) { } foreach ($argv as $key => $val) { - if ($val == 'commitiferror') + if ($val == 'commitiferror') { $forcecommit = 1; - if (preg_match('/--server=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--server=([^\s]+)$/', $val, $reg)) { $conf->global->LDAP_SERVER_HOST = $reg[1]; - if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) { $excludeuser = explode(',', $reg[1]); - if (preg_match('/-y$/', $val, $reg)) + } + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } print "Mails sending disabled (useless in batch mode)\n"; @@ -91,7 +97,11 @@ print "port=".$conf->global->LDAP_SERVER_PORT."\n"; print "login=".$conf->global->LDAP_ADMIN_DN."\n"; print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; print "DN to extract=".$conf->global->LDAP_GROUP_DN."\n"; -print 'Filter=('.$conf->global->LDAP_KEY_GROUPS.'=*)'."\n"; +if (!empty($conf->global->LDAP_GROUP_FILTER)) { + print 'Filter=('.$conf->global->LDAP_GROUP_FILTER.')'."\n"; // Note: filter is defined into function getRecords +} else { + print 'Filter=('.$conf->global->LDAP_KEY_GROUPS.'=*)'."\n"; +} print "----- To Dolibarr database:\n"; print "type=".$conf->db->type."\n"; print "host=".$conf->db->host."\n"; @@ -121,7 +131,7 @@ if ($result >= 0) { // We disable synchro Dolibarr-LDAP $conf->global->LDAP_SYNCHRO_ACTIVE = 0; - $ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_GROUP_DN, $conf->global->LDAP_KEY_GROUPS, $required_fields, 0, array($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)); + $ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_GROUP_DN, $conf->global->LDAP_KEY_GROUPS, $required_fields, 'group', array($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)); if (is_array($ldaprecords)) { $db->begin(); @@ -167,8 +177,9 @@ if ($result >= 0) { $userList = array(); $userIdList = array(); foreach ($ldapgroup[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] as $key => $userdn) { - if ($key === 'count') + if ($key === 'count') { continue; + } if (empty($userList[$userdn])) { // Récupération de l'utilisateur // Schéma rfc2307: les membres sont listés dans l'attribut memberUid sous form de login uniquement if ($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS === 'memberUid') { @@ -177,8 +188,9 @@ if ($result >= 0) { $userFilter = explode(',', $userdn); $userKey = $ldap->getAttributeValues('('.$userFilter[0].')', $conf->global->LDAP_KEY_USERS); } - if (!is_array($userKey)) + if (!is_array($userKey)) { continue; + } $fuser = new User($db); @@ -212,9 +224,11 @@ if ($result >= 0) { } if (!$error || $forcecommit) { - if (!$error) + if (!$error) { print $langs->transnoentities("NoErrorCommitIsDone")."\n"; - else print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } else { + print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } $db->commit(); } else { print $langs->transnoentities("ErrorSomeErrorWereFoundRollbackIsDone", $error)."\n"; diff --git a/scripts/user/sync_users_dolibarr2ldap.php b/scripts/user/sync_users_dolibarr2ldap.php index 4f6fd00d1c7..26b1363d5a1 100755 --- a/scripts/user/sync_users_dolibarr2ldap.php +++ b/scripts/user/sync_users_dolibarr2ldap.php @@ -24,7 +24,9 @@ * \brief Script de mise a jour des users dans LDAP depuis base Dolibarr */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 375cb2f43ba..a040599bfc2 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -24,7 +24,9 @@ * \brief Script to update users into Dolibarr from LDAP */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -59,12 +61,27 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; dol_syslog($script_file." launched with arg ".join(',', $argv)); // List of fields to get from LDAP -$required_fields = array($conf->global->LDAP_KEY_USERS, $conf->global->LDAP_FIELD_FULLNAME, $conf->global->LDAP_FIELD_NAME, $conf->global->LDAP_FIELD_FIRSTNAME, $conf->global->LDAP_FIELD_LOGIN, $conf->global->LDAP_FIELD_LOGIN_SAMBA, $conf->global->LDAP_FIELD_PASSWORD, $conf->global->LDAP_FIELD_PASSWORD_CRYPTED, $conf->global->LDAP_FIELD_PHONE, $conf->global->LDAP_FIELD_FAX, $conf->global->LDAP_FIELD_MOBILE, +$required_fields = array( + $conf->global->LDAP_KEY_USERS, + $conf->global->LDAP_FIELD_FULLNAME, + $conf->global->LDAP_FIELD_NAME, + $conf->global->LDAP_FIELD_FIRSTNAME, + $conf->global->LDAP_FIELD_LOGIN, + $conf->global->LDAP_FIELD_LOGIN_SAMBA, + $conf->global->LDAP_FIELD_PASSWORD, + $conf->global->LDAP_FIELD_PASSWORD_CRYPTED, + $conf->global->LDAP_FIELD_PHONE, + $conf->global->LDAP_FIELD_FAX, + $conf->global->LDAP_FIELD_MOBILE, // $conf->global->LDAP_FIELD_ADDRESS, // $conf->global->LDAP_FIELD_ZIP, // $conf->global->LDAP_FIELD_TOWN, // $conf->global->LDAP_FIELD_COUNTRY, - $conf->global->LDAP_FIELD_MAIL, $conf->global->LDAP_FIELD_TITLE, $conf->global->LDAP_FIELD_DESCRIPTION, $conf->global->LDAP_FIELD_SID); + $conf->global->LDAP_FIELD_MAIL, + $conf->global->LDAP_FIELD_TITLE, + $conf->global->LDAP_FIELD_DESCRIPTION, + $conf->global->LDAP_FIELD_SID +); // Remove from required_fields all entries not configured in LDAP (empty) and duplicated $required_fields = array_unique(array_values(array_filter($required_fields, "dolValidElement"))); @@ -75,14 +92,18 @@ if (!isset($argv[1])) { } foreach ($argv as $key => $val) { - if ($val == 'commitiferror') + if ($val == 'commitiferror') { $forcecommit = 1; - if (preg_match('/--server=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--server=([^\s]+)$/', $val, $reg)) { $conf->global->LDAP_SERVER_HOST = $reg[1]; - if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) + } + if (preg_match('/--excludeuser=([^\s]+)$/', $val, $reg)) { $excludeuser = explode(',', $reg[1]); - if (preg_match('/-y$/', $val, $reg)) + } + if (preg_match('/-y$/', $val, $reg)) { $confirmed = 1; + } } print "Mails sending disabled (useless in batch mode)\n"; @@ -94,9 +115,11 @@ print "port=".$conf->global->LDAP_SERVER_PORT."\n"; print "login=".$conf->global->LDAP_ADMIN_DN."\n"; print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; print "DN to extract=".$conf->global->LDAP_USER_DN."\n"; -if (!empty($conf->global->LDAP_FILTER_CONNECTION)) +if (!empty($conf->global->LDAP_FILTER_CONNECTION)) { print 'Filter=('.$conf->global->LDAP_FILTER_CONNECTION.')'."\n"; // Note: filter is defined into function getRecords -else print 'Filter=('.$conf->global->LDAP_KEY_USERS.'=*)'."\n"; +} else { + print 'Filter=('.$conf->global->LDAP_KEY_USERS.'=*)'."\n"; +} print "----- To Dolibarr database:\n"; print "type=".$conf->db->type."\n"; print "host=".$conf->db->host."\n"; @@ -200,7 +223,7 @@ if ($result >= 0) { $fuser->job = $ldapuser[$conf->global->LDAP_FIELD_TITLE]; $fuser->note = $ldapuser[$conf->global->LDAP_FIELD_DESCRIPTION]; $fuser->admin = 0; - $fuser->societe_id = 0; + $fuser->socid = 0; $fuser->contact_id = 0; $fuser->fk_member = 0; @@ -254,9 +277,11 @@ if ($result >= 0) { } if (!$error || $forcecommit) { - if (!$error) + if (!$error) { print $langs->transnoentities("NoErrorCommitIsDone")."\n"; - else print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } else { + print $langs->transnoentities("ErrorButCommitIsDone")."\n"; + } $db->commit(); } else { print $langs->transnoentities("ErrorSomeErrorWereFoundRollbackIsDone", $error)."\n"; diff --git a/scripts/website/migrate-news-joomla2dolibarr.php b/scripts/website/migrate-news-joomla2dolibarr.php index dfd92a19acf..605f982bd16 100755 --- a/scripts/website/migrate-news-joomla2dolibarr.php +++ b/scripts/website/migrate-news-joomla2dolibarr.php @@ -22,7 +22,9 @@ * \brief Migrate news from a Joomla databse into a Dolibarr website */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); @@ -82,8 +84,7 @@ $websiteid = $website->id; $importid = dol_print_date(dol_now(), 'dayhourlog'); $dbjoomla = getDoliDBInstance('mysqli', $joomlahost, $joomlalogin, $joomlapass, $joomladatabase, $joomlaport); -if ($dbjoomla->error) -{ +if ($dbjoomla->error) { dol_print_error($dbjoomla, "host=".$joomlahost.", port=".$joomlaport.", user=".$joomlalogin.", databasename=".$joomladatabase.", ".$dbjoomla->error); exit(-1); } @@ -124,10 +125,14 @@ while ($obj = $dbjoomla->fetch_object($resql)) { $title = $obj->title; //$description = dol_string_nohtmltag($obj->introtext); $description = trim(dol_trunc(dol_string_nohtmltag($obj->metadesc), 250)); - if (empty($description)) $description = trim(dol_trunc(dol_string_nohtmltag($obj->introtext), 250)); + if (empty($description)) { + $description = trim(dol_trunc(dol_string_nohtmltag($obj->introtext), 250)); + } $htmltext = ""; - if ($blogpostheader) $htmltext .= $blogpostheader."\n"; + if ($blogpostheader) { + $htmltext .= $blogpostheader."\n"; + } $htmltext .= '<section id="mysectionnewsintro" contenteditable="true">'."\n"; $htmltext .= $obj->introtext; $htmltext .= '</section>'."\n"; @@ -137,7 +142,9 @@ while ($obj = $dbjoomla->fetch_object($resql)) { $htmltext .= $obj->fulltext; $htmltext .= "</section>"; } - if ($blogpostfooter) $htmltext .= "\n".$blogpostfooter; + if ($blogpostfooter) { + $htmltext .= "\n".$blogpostfooter; + } $language = ($forcelang ? $forcelang : ($obj->language && $obj->language != '*' ? $obj->language : 'en')); $keywords = $obj->metakey; diff --git a/scripts/website/regenerate-pages.php b/scripts/website/regenerate-pages.php index a50db09708d..46b9283a4cf 100755 --- a/scripts/website/regenerate-pages.php +++ b/scripts/website/regenerate-pages.php @@ -22,7 +22,9 @@ * \brief Regenerate all pages of a web site */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/scripts/withdrawals/build_withdrawal_file.php b/scripts/withdrawals/build_withdrawal_file.php index 5ae7ba70bf4..42bf5f6bb3f 100755 --- a/scripts/withdrawals/build_withdrawal_file.php +++ b/scripts/withdrawals/build_withdrawal_file.php @@ -24,7 +24,9 @@ * \brief Script de prelevement */ -if (!defined('NOSESSION')) define('NOSESSION', '1'); +if (!defined('NOSESSION')) { + define('NOSESSION', '1'); +} $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); diff --git a/test/other/test_serialize.php b/test/other/test_serialize.php index 873698e95c2..2fdfffaef3e 100644 --- a/test/other/test_serialize.php +++ b/test/other/test_serialize.php @@ -16,11 +16,12 @@ $object->bbb = 'bbb'; $object->thirdparty = new stdClass(); $tmp = new Societe($db); $tmp->name = 'MyBigCompany'; -foreach ($tmp as $key=>$value) -{ +foreach ($tmp as $key => $value) { if (!in_array($key, array( 'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code' - ))) continue; // Discard if not into a dedicated list + ))) { + continue; // Discard if not into a dedicated list + } if (!is_object($value)) $object->thirdparty->{$key} = $value; } diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index 622bd346872..52efe3a0147 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/accountancy/class/accountingaccount.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,194 +46,196 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class AccountingAccountTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return AccountingAccountTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return AccountingAccountTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (empty($conf->accounting->enabled)) { print __METHOD__." module accouting must be enabled.\n"; exit(-1); } + if (empty($conf->accounting->enabled)) { + print __METHOD__." module accouting must be enabled.\n"; exit(-1); + } - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - //print $db->getVersion()."\n"; - } + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testAccountingAccountCreate - * - * @return int Id of created object - */ - public function testAccountingAccountCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAccountingAccountCreate + * + * @return int Id of created object + */ + public function testAccountingAccountCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new AccountingAccount($this->savdb); - $localobject->fk_pcg_version = 'PCG99-ABREGE'; - $localobject->account_category = 0; - $localobject->pcg_type = 'XXXXX'; - $localobject->pcg_subtype = 'XXXXX'; - $localobject->account_number = '411123456'; - $localobject->account_parent = 0; - $localobject->label = 'Account specimen'; - $localobject->active = 0; - $result=$localobject->create($user); + $localobject=new AccountingAccount($this->savdb); + $localobject->fk_pcg_version = 'PCG99-ABREGE'; + $localobject->account_category = 0; + $localobject->pcg_type = 'XXXXX'; + $localobject->pcg_subtype = 'XXXXX'; + $localobject->account_number = '411123456'; + $localobject->account_parent = 0; + $localobject->label = 'Account specimen'; + $localobject->active = 0; + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testAccountingAccountFetch - * - * @param int $id Id accounting account - * @return AccountingAccount - * - * @depends testAccountingAccountCreate - * The depends says test is run only if previous is ok - */ - public function testAccountingAccountFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAccountingAccountFetch + * + * @param int $id Id accounting account + * @return AccountingAccount + * + * @depends testAccountingAccountCreate + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new AccountingAccount($this->savdb); - $result=$localobject->fetch($id); + $localobject=new AccountingAccount($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testAccountingAccountUpdate - * - * @param Object $localobject AccountingAccount - * @return int ID accounting account - * - * @depends testAccountingAccountFetch - * The depends says test is run only if previous is ok - */ - public function testAccountingAccountUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAccountingAccountUpdate + * + * @param AccountingAccount $localobject AccountingAccount + * @return int ID accounting account + * + * @depends testAccountingAccountFetch + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->label='New label'; - $result=$localobject->update($user); + $localobject->label='New label'; + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject->id; - } + return $localobject->id; + } - /** - * testAccountingAccountDelete - * - * @param int $id Id of accounting account - * @return int Result of delete - * - * @depends testAccountingAccountUpdate - * The depends says test is run only if previous is ok - */ - public function testAccountingAccountDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAccountingAccountDelete + * + * @param int $id Id of accounting account + * @return int Result of delete + * + * @depends testAccountingAccountUpdate + * The depends says test is run only if previous is ok + */ + public function testAccountingAccountDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new AccountingAccount($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new AccountingAccount($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } } diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index abebfd728bf..cb908416535 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/comm/action/class/actioncomm.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,210 +46,212 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class ActionCommTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return ActionCommTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return ActionCommTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (empty($conf->agenda->enabled)) { print __METHOD__." module agenda must be enabled.\n"; die(); } + if (empty($conf->agenda->enabled)) { + print __METHOD__." module agenda must be enabled.\n"; die(); + } - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - //print $db->getVersion()."\n"; - } + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testActionCommCreate - * - * @return int Id of created object - */ - public function testActionCommCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testActionCommCreate + * + * @return int Id of created object + */ + public function testActionCommCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $now = dol_now(); + $now = dol_now(); - $localobject=new ActionComm($this->savdb); + $localobject=new ActionComm($this->savdb); - $localobject->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) - $localobject->code = 'AC_PHPUNITTEST'; - $localobject->label = 'This is a description'; - $localobject->note_private = 'This is note'; - $localobject->fk_project = 0; - $localobject->datep = $now; - $localobject->datef = $now; - $localobject->percentage = -1; // Not applicable - $localobject->socid = 0; - $localobject->contactid = 0; - $localobject->authorid = $user->id; // User saving action - $localobject->userownerid = $user->id; // Owner of action - // Fields when action is en email (content should be added into note) - /*$localobject->email_msgid = $object->email_msgid; - $localobject->email_from = $object->email_from; - $localobject->email_sender= $object->email_sender; - $localobject->email_to = $object->email_to; - $localobject->email_tocc = $object->email_tocc; - $localobject->email_tobcc = $object->email_tobcc; - $localobject->email_subject = $object->email_subject; - $localobject->errors_to = $object->errors_to;*/ - //$localobject->fk_element = $invoice->id; - //$localobject->elementtype = $invoice->element; - $localobject->extraparams = 'Extra params'; + $localobject->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) + $localobject->code = 'AC_PHPUNITTEST'; + $localobject->label = 'This is a description'; + $localobject->note_private = 'This is note'; + $localobject->fk_project = 0; + $localobject->datep = $now; + $localobject->datef = $now; + $localobject->percentage = -1; // Not applicable + $localobject->socid = 0; + $localobject->contactid = 0; + $localobject->authorid = $user->id; // User saving action + $localobject->userownerid = $user->id; // Owner of action + // Fields when action is en email (content should be added into note) + /*$localobject->email_msgid = $object->email_msgid; + $localobject->email_from = $object->email_from; + $localobject->email_sender= $object->email_sender; + $localobject->email_to = $object->email_to; + $localobject->email_tocc = $object->email_tocc; + $localobject->email_tobcc = $object->email_tobcc; + $localobject->email_subject = $object->email_subject; + $localobject->errors_to = $object->errors_to;*/ + //$localobject->fk_element = $invoice->id; + //$localobject->elementtype = $invoice->element; + $localobject->extraparams = 'Extra params'; - $result = $localobject->create($user); + $result = $localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testActionCommFetch - * - * @param int $id Id action comm - * @return ActionComm - * - * @depends testActionCommCreate - * The depends says test is run only if previous is ok - */ - public function testActionCommFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testActionCommFetch + * + * @param int $id Id action comm + * @return ActionComm + * + * @depends testActionCommCreate + * The depends says test is run only if previous is ok + */ + public function testActionCommFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ActionComm($this->savdb); - $result=$localobject->fetch($id); + $localobject=new ActionComm($this->savdb); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testActionCommUpdate - * - * @param Object $localobject ActionComm - * @return int Id action comm updated - * - * @depends testActionCommFetch - * The depends says test is run only if previous is ok - */ - public function testActionCommUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testActionCommUpdate + * + * @param ActionComm $localobject ActionComm + * @return int Id action comm updated + * + * @depends testActionCommFetch + * The depends says test is run only if previous is ok + */ + public function testActionCommUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->label='New label'; - $result=$localobject->update($user); + $localobject->label='New label'; + $result=$localobject->update($user); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - return $localobject->id; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject->id; + } - /** - * testActionCommDelete - * - * @param int $id Id of action comm - * @return int Result of delete - * - * @depends testActionCommUpdate - * The depends says test is run only if previous is ok - */ - public function testActionCommDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testActionCommDelete + * + * @param int $id Id of action comm + * @return int Result of delete + * + * @depends testActionCommUpdate + * The depends says test is run only if previous is ok + */ + public function testActionCommDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ActionComm($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new ActionComm($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 5b242a362c5..d9ba2e267e9 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -32,9 +32,9 @@ require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent.class.php require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent_type.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -48,535 +48,542 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class AdherentTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return AdherentTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return AdherentTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { - print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n"; - die(); - } - if (! empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); } - if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(); } + if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { + print "\n".__METHOD__." Company must be setup to have name-firstname in order 'Firstname Lastname'\n"; + die(); + } + if (! empty($conf->global->MAIN_MODULE_LDAP)) { + print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); + } + if (! empty($conf->global->MAIN_MODULE_MAILMANSPIP)) { + print "\n".__METHOD__." module MailmanSpip must be disabled.\n"; die(); + } - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testAdherentTypeCreate - * - * @return void - */ - public function testAdherentTypeCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentTypeCreate + * + * @return void + */ + public function testAdherentTypeCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new AdherentType($this->savdb); - $localobject->statut=1; - $localobject->label='Adherent type test'; - $localobject->subscription=1; - $localobject->vote=1; - $localobject->company='Old company label'; - $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject=new AdherentType($this->savdb); + $localobject->statut=1; + $localobject->label='Adherent type test'; + $localobject->subscription=1; + $localobject->vote=1; + $localobject->company='Old company label'; + $result=$localobject->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject->id; - } + return $localobject->id; + } - /** - * testAdherentCreate - * - * @param int $fk_adherent_type Id type of member - * @return int - * - * @depends testAdherentTypeCreate - * The depends says test is run only if previous is ok - */ - public function testAdherentCreate($fk_adherent_type) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentCreate + * + * @param int $fk_adherent_type Id type of member + * @return int + * + * @depends testAdherentTypeCreate + * The depends says test is run only if previous is ok + */ + public function testAdherentCreate($fk_adherent_type) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Adherent($this->savdb); - $localobject->initAsSpecimen(); - $localobject->typeid=$fk_adherent_type; - $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject=new Adherent($this->savdb); + $localobject->initAsSpecimen(); + $localobject->typeid=$fk_adherent_type; + $result=$localobject->create($user); + print __METHOD__." result=".$result."\n"; + if ($result < 0) { + print $localobject->error; + } + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testAdherentFetch - * - * @param int $id Id of object to fetch - * @return object Fetched object - * - * @depends testAdherentCreate - * The depends says test is run only if previous is ok - */ - public function testAdherentFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentFetch + * + * @param int $id Id of object to fetch + * @return object Fetched object + * + * @depends testAdherentCreate + * The depends says test is run only if previous is ok + */ + public function testAdherentFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Adherent($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $localobject=new Adherent($this->savdb); + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testAdherentFetchLogin - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentFetch - * The depends says test is run only if previous is ok - */ - public function testAdherentFetchLogin(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentFetchLogin + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentFetch + * The depends says test is run only if previous is ok + */ + public function testAdherentFetchLogin(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $newobject = new Adherent($this->savdb); - $result = $newobject->fetch_login($localobject->login); + $newobject = new Adherent($this->savdb); + $result = $newobject->fetch_login($localobject->login); - $this->assertEquals($newobject, $localobject); + $this->assertEquals($newobject, $localobject); - return $localobject; - } + return $localobject; + } - /** - * testAdherentUpdate - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentFetchLogin - * The depends says test is run only if previous is ok - */ - public function testAdherentUpdate(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentUpdate + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentFetchLogin + * The depends says test is run only if previous is ok + */ + public function testAdherentUpdate(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $timestamp = dol_now(); + $timestamp = dol_now(); - $localobject->civility_id = 0; - $localobject->login='newlogin'; - $localobject->company='New company label'; - $localobject->note_public='New note public after update'; - $localobject->note_private='New note private after update'; - $localobject->lastname='New name'; - $localobject->firstname='New firstname'; - $localobject->gender='man'; - $localobject->address='New address'; - $localobject->zip='New zip'; - $localobject->town='New town'; - $localobject->country_id=2; - $localobject->statut=0; - $localobject->morphy=0; - $localobject->phone='New tel pro'; - $localobject->phone_perso='New tel perso'; - $localobject->phone_mobile='New tel mobile'; - $localobject->email='newemail@newemail.com'; - $localobject->birth=$timestamp; - $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - $result=$localobject->update_note($localobject->note_private, '_private'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject->civility_id = 0; + $localobject->login='newlogin'; + $localobject->company='New company label'; + $localobject->note_public='New note public after update'; + $localobject->note_private='New note private after update'; + $localobject->lastname='New name'; + $localobject->firstname='New firstname'; + $localobject->gender='man'; + $localobject->address='New address'; + $localobject->zip='New zip'; + $localobject->town='New town'; + $localobject->country_id=2; + $localobject->statut=0; + $localobject->morphy=0; + $localobject->phone='New tel pro'; + $localobject->phone_perso='New tel perso'; + $localobject->phone_mobile='New tel mobile'; + $localobject->email='newemail@newemail.com'; + $localobject->birth=$timestamp; + $result=$localobject->update($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + $result=$localobject->update_note($localobject->note_private, '_private'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); $result=$localobject->update_note($localobject->note_public, '_public'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $newobject=new Adherent($this->savdb); - $result=$newobject->fetch($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $newobject=new Adherent($this->savdb); + $result=$newobject->fetch($localobject->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $this->assertEquals($localobject->civility_id, $newobject->civility_id); - $this->assertEquals($localobject->login, $newobject->login); - $this->assertEquals($localobject->company, $newobject->company); - $this->assertEquals($localobject->note_public, $newobject->note_public); - $this->assertEquals($localobject->note_private, $newobject->note_private); - $this->assertEquals($localobject->lastname, $newobject->lastname); - $this->assertEquals($localobject->firstname, $newobject->firstname); - $this->assertEquals($localobject->gender, $newobject->gender); - $this->assertEquals($localobject->address, $newobject->address); - $this->assertEquals($localobject->zip, $newobject->zip); - $this->assertEquals($localobject->town, $newobject->town); - $this->assertEquals($localobject->country_id, $newobject->country_id); - $this->assertEquals('BE', $newobject->country_code); - $this->assertEquals('Belgium', $newobject->country); - $this->assertEquals($localobject->statut, $newobject->statut); - $this->assertEquals($localobject->phone, $newobject->phone); - $this->assertEquals($localobject->phone_perso, $newobject->phone_perso); - $this->assertEquals($localobject->phone_mobile, $newobject->phone_mobile); - $this->assertEquals($localobject->email, $newobject->email); - $this->assertEquals($localobject->birth, $timestamp); - $this->assertEquals($localobject->morphy, $newobject->morphy); + $this->assertEquals($localobject->civility_id, $newobject->civility_id); + $this->assertEquals($localobject->login, $newobject->login); + $this->assertEquals($localobject->company, $newobject->company); + $this->assertEquals($localobject->note_public, $newobject->note_public); + $this->assertEquals($localobject->note_private, $newobject->note_private); + $this->assertEquals($localobject->lastname, $newobject->lastname); + $this->assertEquals($localobject->firstname, $newobject->firstname); + $this->assertEquals($localobject->gender, $newobject->gender); + $this->assertEquals($localobject->address, $newobject->address); + $this->assertEquals($localobject->zip, $newobject->zip); + $this->assertEquals($localobject->town, $newobject->town); + $this->assertEquals($localobject->country_id, $newobject->country_id); + $this->assertEquals('BE', $newobject->country_code); + $this->assertEquals('Belgium', $newobject->country); + $this->assertEquals($localobject->statut, $newobject->statut); + $this->assertEquals($localobject->phone, $newobject->phone); + $this->assertEquals($localobject->phone_perso, $newobject->phone_perso); + $this->assertEquals($localobject->phone_mobile, $newobject->phone_mobile); + $this->assertEquals($localobject->email, $newobject->email); + $this->assertEquals($localobject->birth, $timestamp); + $this->assertEquals($localobject->morphy, $newobject->morphy); - //We return newobject because of new values - return $newobject; - } + //We return newobject because of new values + return $newobject; + } - /** - * testAdherentMakeSubstitution - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentUpdate - * The depends says test is run only if previous is ok - */ - public function testAdherentMakeSubstitution(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentMakeSubstitution + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentUpdate + * The depends says test is run only if previous is ok + */ + public function testAdherentMakeSubstitution(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->global->MAIN_FIRSTNAME_NAME_POSITION = 0; // Force setup for firstname+lastname + $conf->global->MAIN_FIRSTNAME_NAME_POSITION = 0; // Force setup for firstname+lastname - $template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'; - $template .= '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__'; + $template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'; + $template .= '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__'; - // If option to store clear password has been set, we get 'dolibspec' into PASSWORD field. - $expected = ',New firstname,New name,New firstname New name,'; - $expected .= 'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,'; - $expected .= 'newlogin'; + // If option to store clear password has been set, we get 'dolibspec' into PASSWORD field. + $expected = ',New firstname,New name,New firstname New name,'; + $expected .= 'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,'; + $expected .= 'newlogin'; - $result = $localobject->makeSubstitution($template); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($expected, $result); + $result = $localobject->makeSubstitution($template); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($expected, $result); - return $localobject; - } + return $localobject; + } - /** - * testAdherentSetUserId - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentMakeSubstitution - * The depends says test is run only if previous is ok - */ - public function testAdherentSetUserId(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentSetUserId + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentMakeSubstitution + * The depends says test is run only if previous is ok + */ + public function testAdherentSetUserId(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - //We associate member with user - $result = $localobject->setUserId($user->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertEquals($result, 1); + //We associate member with user + $result = $localobject->setUserId($user->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertEquals($result, 1); - //We update user object - $user->fetch($user->id); - print __METHOD__." user id=".$user->id." fk_member=".$user->fk_member."\n"; + //We update user object + $user->fetch($user->id); + print __METHOD__." user id=".$user->id." fk_member=".$user->fk_member."\n"; - $this->assertEquals($user->fk_member, $localobject->id); + $this->assertEquals($user->fk_member, $localobject->id); - //We remove association with user - $result = $localobject->setUserId(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertEquals($result, 1); + //We remove association with user + $result = $localobject->setUserId(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertEquals($result, 1); - //We update user object - $user->fetch($user->id); - print __METHOD__." user id=".$user->id." fk_member=".$user->fk_member."\n"; + //We update user object + $user->fetch($user->id); + print __METHOD__." user id=".$user->id." fk_member=".$user->fk_member."\n"; - $this->assertNull($user->fk_member); + $this->assertNull($user->fk_member); - return $localobject; - } + return $localobject; + } - /** - * testAdherentSetThirdPartyId - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentSetUserId - * The depends says test is run only if previous is ok - */ - public function testAdherentSetThirdPartyId(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentSetThirdPartyId + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentSetUserId + * The depends says test is run only if previous is ok + */ + public function testAdherentSetThirdPartyId(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - //Create a Third Party - $thirdparty = new Societe($db); - $thirdparty->initAsSpecimen(); - $result = $thirdparty->create($user); - print __METHOD__." third party id=".$thirdparty->id." result=".$result."\n"; - $this->assertTrue($result > 0, 'Test to create a thirdparty specimen to use it to set as thirdparty of a member'); + //Create a Third Party + $thirdparty = new Societe($db); + $thirdparty->initAsSpecimen(); + $result = $thirdparty->create($user); + print __METHOD__." third party id=".$thirdparty->id." result=".$result."\n"; + $this->assertTrue($result > 0, 'Test to create a thirdparty specimen to use it to set as thirdparty of a member'); - //Set Third Party ID - $result = $localobject->setThirdPartyId($thirdparty->id); - $this->assertEquals($result, 1, 'Set thirdparty'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + //Set Third Party ID + $result = $localobject->setThirdPartyId($thirdparty->id); + $this->assertEquals($result, 1, 'Set thirdparty'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - //Adherent is updated with new data - $localobject->fetch($localobject->id); - $this->assertEquals($localobject->fk_soc, $thirdparty->id, 'Fetch member'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + //Adherent is updated with new data + $localobject->fetch($localobject->id); + $this->assertEquals($localobject->fk_soc, $thirdparty->id, 'Fetch member'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - //We remove the third party association - $result = $localobject->setThirdPartyId(0); - $this->assertEquals($result, 1, 'Removed the link with thirdparty'); + //We remove the third party association + $result = $localobject->setThirdPartyId(0); + $this->assertEquals($result, 1, 'Removed the link with thirdparty'); - //And check if it has been updated - $localobject->fetch($localobject->id); - $this->assertNull($localobject->fk_soc, 'Check field is null'); + //And check if it has been updated + $localobject->fetch($localobject->id); + $this->assertNull($localobject->fk_soc, 'Check field is null'); - //Now we remove the third party - $result = $thirdparty->delete($thirdparty->id, $user); - $this->assertEquals($result, 1, 'Delete thirdparty'); + //Now we remove the third party + $result = $thirdparty->delete($thirdparty->id, $user); + $this->assertEquals($result, 1, 'Delete thirdparty'); - return $localobject; - } + return $localobject; + } - /** - * testAdherentValid - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentSetThirdPartyId - * The depends says test is run only if previous is ok - */ - public function testAdherentValidate(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentValid + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentSetThirdPartyId + * The depends says test is run only if previous is ok + */ + public function testAdherentValidate(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->validate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->validate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testAdherentOther - * - * @param Adherent $localobject Member instance - * @return int Id of object - * - * @depends testAdherentValidate - * The depends says test is run only if previous is ok - */ - public function testAdherentOther(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentOther + * + * @param Adherent $localobject Member instance + * @return int Id of object + * + * @depends testAdherentValidate + * The depends says test is run only if previous is ok + */ + public function testAdherentOther(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject; - } + return $localobject; + } - /** - * testAdherentResiliate - * - * @param Adherent $localobject Member instance - * @return Adherent - * - * @depends testAdherentOther - * The depends says test is run only if previous is ok - */ - public function testAdherentResiliate(Adherent $localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentResiliate + * + * @param Adherent $localobject Member instance + * @return Adherent + * + * @depends testAdherentOther + * The depends says test is run only if previous is ok + */ + public function testAdherentResiliate(Adherent $localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - //Let's resilie un adherent - $result = $localobject->resiliate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertEquals($result, 1); + //Let's resilie un adherent + $result = $localobject->resiliate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertEquals($result, 1); - //Is statut updated? - $this->assertEquals($localobject->statut, 0); + //Is statut updated? + $this->assertEquals($localobject->statut, 0); - //We update the object and let's check if it was updated on DB - $localobject->fetch($localobject->id); - $this->assertEquals($localobject->statut, 0); + //We update the object and let's check if it was updated on DB + $localobject->fetch($localobject->id); + $this->assertEquals($localobject->statut, 0); - //Now that status=0, resiliate should return 0 - $result = $localobject->resiliate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertEquals($result, 0); + //Now that status=0, resiliate should return 0 + $result = $localobject->resiliate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertEquals($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testAdherentDelete - * - * @param Adherent $localobject Member instance - * @return void - * - * @depends testAdherentResiliate - * The depends says test is run only if previous is ok - */ - public function testAdherentDelete($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentDelete + * + * @param Adherent $localobject Member instance + * @return void + * + * @depends testAdherentResiliate + * The depends says test is run only if previous is ok + */ + public function testAdherentDelete($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->delete($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->delete($localobject->id, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testAdherentTypeDelete - * - * @param Adherent $localobject Member instance - * @return void - * - * @depends testAdherentDelete - * The depends says test is run only if previous is ok - */ - public function testAdherentTypeDelete($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testAdherentTypeDelete + * + * @param Adherent $localobject Member instance + * @return void + * + * @depends testAdherentDelete + * The depends says test is run only if previous is ok + */ + public function testAdherentTypeDelete($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobjectat=new AdherentType($this->savdb); - $result=$localobjectat->fetch($localobject->typeid); - $result=$localobjectat->delete(); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobjectat=new AdherentType($this->savdb); + $result=$localobjectat->fetch($localobject->typeid); + $result=$localobjectat->delete(); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject->id; - } + return $localobject->id; + } } diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index c7b5aee9e37..9ce135da263 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/admin.lib.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,121 +46,121 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class AdminLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return AdminLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return AdminLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testVersionCompare - * - * @return void - */ - public function testVersionCompare() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testVersionCompare + * + * @return void + */ + public function testVersionCompare() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=versioncompare(array(3,1,-4), array(3,1,1)); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-3, $result); - $result=versioncompare(array(3,1,0), array(3,1,1)); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-3, $result); - $result=versioncompare(array(3,1,0), array(3,2,0)); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-2, $result); - $result=versioncompare(array(3,1,0), array(3,1,0)); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result); + $result=versioncompare(array(3,1,-4), array(3,1,1)); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-3, $result); + $result=versioncompare(array(3,1,0), array(3,1,1)); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-3, $result); + $result=versioncompare(array(3,1,0), array(3,2,0)); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-2, $result); + $result=versioncompare(array(3,1,0), array(3,1,0)); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0, $result); - return $result; - } + return $result; + } - /** - * testEnableModule - * - * @return void - */ - public function testEnableModule() - { - global $conf, $db, $langs, $user; + /** + * testEnableModule + * + * @return void + */ + public function testEnableModule() + { + global $conf, $db, $langs, $user; require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.class.php'; print "Enable module modExpenseReport"; @@ -177,5 +177,5 @@ class AdminLibTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals(1, $result); $conf->setValues($db); - } + } } diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index ce7f1074721..2444e8fe9dc 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -33,30 +33,25 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; print 'DOL_MAIN_URL_ROOT='.DOL_MAIN_URL_ROOT."\n"; // constant will be used by other tests -if ($langs->defaultlang != 'en_US') -{ - print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n"; - exit(1); +if ($langs->defaultlang != 'en_US') { + print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n"; + exit(1); } -if (empty($conf->adherent->enabled)) -{ +if (empty($conf->adherent->enabled)) { print "Error: Module member must be enabled to have significant results.\n"; exit(1); } -if (! empty($conf->ldap->enabled)) -{ - print "Error: LDAP module should not be enabled.\n"; - exit(1); +if (! empty($conf->ldap->enabled)) { + print "Error: LDAP module should not be enabled.\n"; + exit(1); } -if (! empty($conf->google->enabled)) -{ - print "Warning: Google module should not be enabled.\n"; +if (! empty($conf->google->enabled)) { + print "Warning: Google module should not be enabled.\n"; } -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -67,200 +62,200 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class AllTests { - /** - * Function suite to make all PHPUnit tests - * - * @return void - */ - public static function suite() - { + /** + * Function suite to make all PHPUnit tests + * + * @return void + */ + public static function suite() + { - $suite = new PHPUnit\Framework\TestSuite('PHPUnit Framework'); + $suite = new PHPUnit\Framework\TestSuite('PHPUnit Framework'); - //require_once dirname(__FILE__).'/CoreTest.php'; - //$suite->addTestSuite('CoreTest'); - require_once dirname(__FILE__).'/AdminLibTest.php'; - $suite->addTestSuite('AdminLibTest'); - require_once dirname(__FILE__).'/CompanyLibTest.php'; - $suite->addTestSuite('CompanyLibTest'); - require_once dirname(__FILE__).'/DateLibTest.php'; - $suite->addTestSuite('DateLibTest'); - require_once dirname(__FILE__).'/UtilsTest.php'; - $suite->addTestSuite('UtilsTest'); - require_once dirname(__FILE__).'/LesscTest.php'; - $suite->addTestSuite('LesscTest'); - //require_once dirname(__FILE__).'/DateLibTzFranceTest.php'; - //$suite->addTestSuite('DateLibTzFranceTest'); - require_once dirname(__FILE__).'/MarginsLibTest.php'; - $suite->addTestSuite('MarginsLibTest'); - require_once dirname(__FILE__).'/FilesLibTest.php'; - $suite->addTestSuite('FilesLibTest'); - require_once dirname(__FILE__).'/GetUrlLibTest.php'; - $suite->addTestSuite('GetUrlLibTest'); - require_once dirname(__FILE__).'/JsonLibTest.php'; - $suite->addTestSuite('JsonLibTest'); - require_once dirname(__FILE__).'/ImagesLibTest.php'; - $suite->addTestSuite('ImagesLibTest'); - require_once dirname(__FILE__).'/FunctionsLibTest.php'; - $suite->addTestSuite('FunctionsLibTest'); - require_once dirname(__FILE__).'/Functions2LibTest.php'; - $suite->addTestSuite('Functions2LibTest'); - require_once dirname(__FILE__).'/XCalLibTest.php'; - $suite->addTestSuite('XCalLibTest'); + //require_once dirname(__FILE__).'/CoreTest.php'; + //$suite->addTestSuite('CoreTest'); + require_once dirname(__FILE__).'/AdminLibTest.php'; + $suite->addTestSuite('AdminLibTest'); + require_once dirname(__FILE__).'/CompanyLibTest.php'; + $suite->addTestSuite('CompanyLibTest'); + require_once dirname(__FILE__).'/DateLibTest.php'; + $suite->addTestSuite('DateLibTest'); + require_once dirname(__FILE__).'/UtilsTest.php'; + $suite->addTestSuite('UtilsTest'); + require_once dirname(__FILE__).'/LesscTest.php'; + $suite->addTestSuite('LesscTest'); + //require_once dirname(__FILE__).'/DateLibTzFranceTest.php'; + //$suite->addTestSuite('DateLibTzFranceTest'); + require_once dirname(__FILE__).'/MarginsLibTest.php'; + $suite->addTestSuite('MarginsLibTest'); + require_once dirname(__FILE__).'/FilesLibTest.php'; + $suite->addTestSuite('FilesLibTest'); + require_once dirname(__FILE__).'/GetUrlLibTest.php'; + $suite->addTestSuite('GetUrlLibTest'); + require_once dirname(__FILE__).'/JsonLibTest.php'; + $suite->addTestSuite('JsonLibTest'); + require_once dirname(__FILE__).'/ImagesLibTest.php'; + $suite->addTestSuite('ImagesLibTest'); + require_once dirname(__FILE__).'/FunctionsLibTest.php'; + $suite->addTestSuite('FunctionsLibTest'); + require_once dirname(__FILE__).'/Functions2LibTest.php'; + $suite->addTestSuite('Functions2LibTest'); + require_once dirname(__FILE__).'/XCalLibTest.php'; + $suite->addTestSuite('XCalLibTest'); - // Rules into source files content - require_once dirname(__FILE__).'/LangTest.php'; - $suite->addTestSuite('LangTest'); - require_once dirname(__FILE__).'/CodingSqlTest.php'; - $suite->addTestSuite('CodingSqlTest'); - require_once dirname(__FILE__).'/CodingPhpTest.php'; - $suite->addTestSuite('CodingPhpTest'); + // Rules into source files content + require_once dirname(__FILE__).'/LangTest.php'; + $suite->addTestSuite('LangTest'); + require_once dirname(__FILE__).'/CodingSqlTest.php'; + $suite->addTestSuite('CodingSqlTest'); + require_once dirname(__FILE__).'/CodingPhpTest.php'; + $suite->addTestSuite('CodingPhpTest'); - require_once dirname(__FILE__).'/SecurityTest.php'; - $suite->addTestSuite('SecurityTest'); + require_once dirname(__FILE__).'/SecurityTest.php'; + $suite->addTestSuite('SecurityTest'); - require_once dirname(__FILE__).'/UserTest.php'; - $suite->addTestSuite('UserTest'); - require_once dirname(__FILE__).'/UserGroupTest.php'; - $suite->addTestSuite('UserGroupTest'); + require_once dirname(__FILE__).'/UserTest.php'; + $suite->addTestSuite('UserTest'); + require_once dirname(__FILE__).'/UserGroupTest.php'; + $suite->addTestSuite('UserGroupTest'); - require_once dirname(__FILE__).'/NumberingModulesTest.php'; - $suite->addTestSuite('NumberingModulesTest'); - require_once dirname(__FILE__).'/PgsqlTest.php'; - $suite->addTestSuite('PgsqlTest'); - require_once dirname(__FILE__).'/PdfDocTest.php'; - $suite->addTestSuite('PdfDocTest'); - require_once dirname(__FILE__).'/BuildDocTest.php'; - $suite->addTestSuite('BuildDocTest'); - require_once dirname(__FILE__).'/CMailFileTest.php'; - $suite->addTestSuite('CMailFileTest'); + require_once dirname(__FILE__).'/NumberingModulesTest.php'; + $suite->addTestSuite('NumberingModulesTest'); + require_once dirname(__FILE__).'/PgsqlTest.php'; + $suite->addTestSuite('PgsqlTest'); + require_once dirname(__FILE__).'/PdfDocTest.php'; + $suite->addTestSuite('PdfDocTest'); + require_once dirname(__FILE__).'/BuildDocTest.php'; + $suite->addTestSuite('BuildDocTest'); + require_once dirname(__FILE__).'/CMailFileTest.php'; + $suite->addTestSuite('CMailFileTest'); - require_once dirname(__FILE__).'/CommonObjectTest.php'; - $suite->addTestSuite('CommonObjectTest'); + require_once dirname(__FILE__).'/CommonObjectTest.php'; + $suite->addTestSuite('CommonObjectTest'); - require_once dirname(__FILE__).'/ActionCommTest.php'; - $suite->addTestSuite('ActionCommTest'); - require_once dirname(__FILE__).'/SocieteTest.php'; - $suite->addTestSuite('SocieteTest'); - require_once dirname(__FILE__).'/ContactTest.php'; - $suite->addTestSuite('ContactTest'); - require_once dirname(__FILE__).'/AdherentTest.php'; - $suite->addTestSuite('AdherentTest'); + require_once dirname(__FILE__).'/ActionCommTest.php'; + $suite->addTestSuite('ActionCommTest'); + require_once dirname(__FILE__).'/SocieteTest.php'; + $suite->addTestSuite('SocieteTest'); + require_once dirname(__FILE__).'/ContactTest.php'; + $suite->addTestSuite('ContactTest'); + require_once dirname(__FILE__).'/AdherentTest.php'; + $suite->addTestSuite('AdherentTest'); - require_once dirname(__FILE__).'/ProductTest.php'; - $suite->addTestSuite('ProductTest'); + require_once dirname(__FILE__).'/ProductTest.php'; + $suite->addTestSuite('ProductTest'); - require_once dirname(__FILE__).'/PricesTest.php'; - $suite->addTestSuite('PricesTest'); - require_once dirname(__FILE__).'/DiscountTest.php'; - $suite->addTestSuite('DiscountTest'); + require_once dirname(__FILE__).'/PricesTest.php'; + $suite->addTestSuite('PricesTest'); + require_once dirname(__FILE__).'/DiscountTest.php'; + $suite->addTestSuite('DiscountTest'); - require_once dirname(__FILE__).'/BOMTest.php'; - $suite->addTestSuite('BOMTest'); + require_once dirname(__FILE__).'/BOMTest.php'; + $suite->addTestSuite('BOMTest'); - require_once dirname(__FILE__).'/ContratTest.php'; - $suite->addTestSuite('ContratTest'); + require_once dirname(__FILE__).'/ContratTest.php'; + $suite->addTestSuite('ContratTest'); - require_once dirname(__FILE__).'/FichinterTest.php'; - $suite->addTestSuite('FichinterTest'); - require_once dirname(__FILE__).'/TicketTest.php'; - $suite->addTestSuite('TicketTest'); + require_once dirname(__FILE__).'/FichinterTest.php'; + $suite->addTestSuite('FichinterTest'); + require_once dirname(__FILE__).'/TicketTest.php'; + $suite->addTestSuite('TicketTest'); - require_once dirname(__FILE__).'/PropalTest.php'; - $suite->addTestSuite('PropalTest'); + require_once dirname(__FILE__).'/PropalTest.php'; + $suite->addTestSuite('PropalTest'); - require_once dirname(__FILE__).'/SupplierProposalTest.php'; - $suite->addTestSuite('SupplierProposalTest'); + require_once dirname(__FILE__).'/SupplierProposalTest.php'; + $suite->addTestSuite('SupplierProposalTest'); - require_once dirname(__FILE__).'/CommandeTest.php'; - $suite->addTestSuite('CommandeTest'); + require_once dirname(__FILE__).'/CommandeTest.php'; + $suite->addTestSuite('CommandeTest'); - require_once dirname(__FILE__).'/CommandeFournisseurTest.php'; - $suite->addTestSuite('CommandeFournisseurTest'); + require_once dirname(__FILE__).'/CommandeFournisseurTest.php'; + $suite->addTestSuite('CommandeFournisseurTest'); - require_once dirname(__FILE__).'/FactureTest.php'; - $suite->addTestSuite('FactureTest'); - require_once dirname(__FILE__).'/FactureRecTest.php'; - $suite->addTestSuite('FactureRecTest'); - require_once dirname(__FILE__).'/FactureTestRounding.php'; - $suite->addTestSuite('FactureTestRounding'); - require_once dirname(__FILE__).'/FactureFournisseurTest.php'; - $suite->addTestSuite('FactureFournisseurTest'); + require_once dirname(__FILE__).'/FactureTest.php'; + $suite->addTestSuite('FactureTest'); + require_once dirname(__FILE__).'/FactureRecTest.php'; + $suite->addTestSuite('FactureRecTest'); + require_once dirname(__FILE__).'/FactureTestRounding.php'; + $suite->addTestSuite('FactureTestRounding'); + require_once dirname(__FILE__).'/FactureFournisseurTest.php'; + $suite->addTestSuite('FactureFournisseurTest'); - require_once dirname(__FILE__).'/BankAccountTest.php'; - $suite->addTestSuite('BankAccountTest'); - require_once dirname(__FILE__).'/CompanyBankAccountTest.php'; - $suite->addTestSuite('CompanyBankAccountTest'); - require_once dirname(__FILE__).'/BonPrelevementTest.php'; - $suite->addTestSuite('BonPrelevementTest'); + require_once dirname(__FILE__).'/BankAccountTest.php'; + $suite->addTestSuite('BankAccountTest'); + require_once dirname(__FILE__).'/CompanyBankAccountTest.php'; + $suite->addTestSuite('CompanyBankAccountTest'); + require_once dirname(__FILE__).'/BonPrelevementTest.php'; + $suite->addTestSuite('BonPrelevementTest'); - require_once dirname(__FILE__).'/ChargeSocialesTest.php'; - $suite->addTestSuite('ChargeSocialesTest'); - require_once dirname(__FILE__).'/HolidayTest.php'; - $suite->addTestSuite('HolidayTest'); - require_once dirname(__FILE__).'/ExpenseReportTest.php'; - $suite->addTestSuite('ExpenseReportTest'); - require_once dirname(__FILE__).'/LoanTest.php'; - $suite->addTestSuite('LoanTest'); + require_once dirname(__FILE__).'/ChargeSocialesTest.php'; + $suite->addTestSuite('ChargeSocialesTest'); + require_once dirname(__FILE__).'/HolidayTest.php'; + $suite->addTestSuite('HolidayTest'); + require_once dirname(__FILE__).'/ExpenseReportTest.php'; + $suite->addTestSuite('ExpenseReportTest'); + require_once dirname(__FILE__).'/LoanTest.php'; + $suite->addTestSuite('LoanTest'); - require_once dirname(__FILE__).'/EntrepotTest.php'; - $suite->addTestSuite('EntrepotTest'); - require_once dirname(__FILE__).'/MouvementStockTest.php'; - $suite->addTestSuite('MouvementStockTest'); + require_once dirname(__FILE__).'/EntrepotTest.php'; + $suite->addTestSuite('EntrepotTest'); + require_once dirname(__FILE__).'/MouvementStockTest.php'; + $suite->addTestSuite('MouvementStockTest'); - require_once dirname(__FILE__).'/CategorieTest.php'; - $suite->addTestSuite('CategorieTest'); + require_once dirname(__FILE__).'/CategorieTest.php'; + $suite->addTestSuite('CategorieTest'); - require_once dirname(__FILE__).'/AccountingAccountTest.php'; - $suite->addTestSuite('AccountingAccountTest'); + require_once dirname(__FILE__).'/AccountingAccountTest.php'; + $suite->addTestSuite('AccountingAccountTest'); - require_once dirname(__FILE__).'/RestAPIUserTest.php'; - $suite->addTestSuite('RestAPIUserTest'); - require_once dirname(__FILE__).'/RestAPIDocumentTest.php'; - $suite->addTestSuite('RestAPIDocumentTest'); + require_once dirname(__FILE__).'/RestAPIUserTest.php'; + $suite->addTestSuite('RestAPIUserTest'); + require_once dirname(__FILE__).'/RestAPIDocumentTest.php'; + $suite->addTestSuite('RestAPIDocumentTest'); - // Test only with php7.2 or less - //if ((float) phpversion() < 7.3) - //{ - require_once dirname(__FILE__).'/WebservicesProductsTest.php'; - $suite->addTestSuite('WebservicesProductsTest'); - require_once dirname(__FILE__).'/WebservicesInvoicesTest.php'; - $suite->addTestSuite('WebservicesInvoicesTest'); - require_once dirname(__FILE__).'/WebservicesOrdersTest.php'; - $suite->addTestSuite('WebservicesOrdersTest'); - require_once dirname(__FILE__).'/WebservicesOtherTest.php'; - $suite->addTestSuite('WebservicesOtherTest'); - require_once dirname(__FILE__).'/WebservicesThirdpartyTest.php'; - $suite->addTestSuite('WebservicesThirdpartyTest'); - require_once dirname(__FILE__).'/WebservicesUserTest.php'; - $suite->addTestSuite('WebservicesUserTest'); - //} + // Test only with php7.2 or less + //if ((float) phpversion() < 7.3) + //{ + require_once dirname(__FILE__).'/WebservicesProductsTest.php'; + $suite->addTestSuite('WebservicesProductsTest'); + require_once dirname(__FILE__).'/WebservicesInvoicesTest.php'; + $suite->addTestSuite('WebservicesInvoicesTest'); + require_once dirname(__FILE__).'/WebservicesOrdersTest.php'; + $suite->addTestSuite('WebservicesOrdersTest'); + require_once dirname(__FILE__).'/WebservicesOtherTest.php'; + $suite->addTestSuite('WebservicesOtherTest'); + require_once dirname(__FILE__).'/WebservicesThirdpartyTest.php'; + $suite->addTestSuite('WebservicesThirdpartyTest'); + require_once dirname(__FILE__).'/WebservicesUserTest.php'; + $suite->addTestSuite('WebservicesUserTest'); + //} - require_once dirname(__FILE__).'/ExportTest.php'; - $suite->addTestSuite('ExportTest'); - require_once dirname(__FILE__).'/ImportTest.php'; - $suite->addTestSuite('ImportTest'); + require_once dirname(__FILE__).'/ExportTest.php'; + $suite->addTestSuite('ExportTest'); + require_once dirname(__FILE__).'/ImportTest.php'; + $suite->addTestSuite('ImportTest'); - require_once dirname(__FILE__).'/ScriptsTest.php'; - $suite->addTestSuite('ScriptsTest'); + require_once dirname(__FILE__).'/ScriptsTest.php'; + $suite->addTestSuite('ScriptsTest'); - require_once dirname(__FILE__).'/ModulesTest.php'; // At end because it's the longer - $suite->addTestSuite('ModulesTest'); + require_once dirname(__FILE__).'/ModulesTest.php'; // At end because it's the longer + $suite->addTestSuite('ModulesTest'); - // GUI - require_once dirname(__FILE__).'/FormAdminTest.php'; - $suite->addTestSuite('FormAdminTest'); - require_once dirname(__FILE__).'/FormTest.php'; - $suite->addTestSuite('FormTest'); + // GUI + require_once dirname(__FILE__).'/FormAdminTest.php'; + $suite->addTestSuite('FormAdminTest'); + require_once dirname(__FILE__).'/FormTest.php'; + $suite->addTestSuite('FormTest'); - // Payment services - require_once dirname(__FILE__).'/PaypalTest.php'; - $suite->addTestSuite('PaypalTest'); - require_once dirname(__FILE__).'/StripeTest.php'; - $suite->addTestSuite('StripeTest'); + // Payment services + require_once dirname(__FILE__).'/PaypalTest.php'; + $suite->addTestSuite('PaypalTest'); + require_once dirname(__FILE__).'/StripeTest.php'; + $suite->addTestSuite('StripeTest'); - return $suite; - } + return $suite; + } } diff --git a/test/phpunit/BOMTest.php b/test/phpunit/BOMTest.php index 872d0b09d18..1d8a6cfbfd2 100644 --- a/test/phpunit/BOMTest.php +++ b/test/phpunit/BOMTest.php @@ -75,10 +75,10 @@ class BOMTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,11 +87,11 @@ class BOMTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - /** - * tearDownAfterClass - * - * @return void - */ + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; @@ -129,7 +129,7 @@ class BOMTest extends PHPUnit\Framework\TestCase /** * testBOMCreate * - * @return int + * @return int */ public function testBOMCreate() { diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index fd92d242b31..3e229d3b41c 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/bank/class/account.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -48,189 +48,189 @@ $langs->load("main"); */ class BankAccountTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return BankAccountTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return BankAccountTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testBankAccountCreate - * - * @return int - */ - public function testBankAccountCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testBankAccountCreate + * + * @return int + */ + public function testBankAccountCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Account($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date_solde=dol_now(); - $result=$localobject->create($user); + $localobject=new Account($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date_solde=dol_now(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testBankAccountFetch - * - * @param int $id Id of contract - * @return int - * - * @depends testBankAccountCreate - * The depends says test is run only if previous is ok - */ - public function testBankAccountFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testBankAccountFetch + * + * @param int $id Id of contract + * @return int + * + * @depends testBankAccountCreate + * The depends says test is run only if previous is ok + */ + public function testBankAccountFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Account($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Account($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testBankAccountOther - * - * @param Object $localobject Object contract - * @return int - * - * @depends testBankAccountFetch - * The depends says test is run only if previous is ok - */ - public function testBankAccountOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testBankAccountOther + * + * @param Account $localobject Account + * @return int + * + * @depends testBankAccountFetch + * The depends says test is run only if previous is ok + */ + public function testBankAccountOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); + $localobject->info($localobject->id); - $result = $localobject->needIBAN(); - //print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertEquals(1, $result); + $result = $localobject->needIBAN(); + //print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertEquals(1, $result); - return $localobject->id; - } + return $localobject->id; + } - /** - * testBankAccountDelete - * - * @param int $id Id of contract - * @return int - * - * @depends testBankAccountOther - * The depends says test is run only if previous is ok - */ - public function testBankAccountDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testBankAccountDelete + * + * @param int $id Id of contract + * @return int + * + * @depends testBankAccountOther + * The depends says test is run only if previous is ok + */ + public function testBankAccountDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Account($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new Account($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/BonPrelevementTest.php b/test/phpunit/BonPrelevementTest.php index 135c77dfa2d..314640aefda 100644 --- a/test/phpunit/BonPrelevementTest.php +++ b/test/phpunit/BonPrelevementTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/prelevement/class/bonprelevement.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -76,65 +75,65 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testBonPrevelementCreate - * - * @return int - */ - public function testBonPrelevementCreate() - { - global $conf,$user,$langs,$db; + /** + * testBonPrevelementCreate + * + * @return int + */ + public function testBonPrelevementCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -152,42 +151,42 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase // Create withdraw record and generate SEPA file $localobject=new BonPrelevement($this->savdb); - //$localobject->date_solde=dol_now(); - $result=$localobject->Create(0, 0, 'simu'); + //$localobject->date_solde=dol_now(); + $result=$localobject->Create(0, 0, 'simu'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 0); - // Test SEPA file + // Test SEPA file - return $result; - } + return $result; + } - /** - * testBonPrelevementDelete - * - * @param int $id Id of contract - * @return int - * - * @depends testBonPrelevementOther - * The depends says test is run only if previous is ok - */ - /* public function testBonPrelevementDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testBonPrelevementDelete + * + * @param int $id Id of contract + * @return int + * + * @depends testBonPrelevementOther + * The depends says test is run only if previous is ok + */ + /* public function testBonPrelevementDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new BonPrelevement($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($id); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } - */ + $this->assertLessThan($result, 0); + return $result; + } + */ } diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index de4da3790b5..455f2ce513a 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -60,9 +60,9 @@ require_once dirname(__FILE__).'/../../htdocs/core/modules/modExpenseReport.clas if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -76,365 +76,379 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class BuildDocTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return BuildDocTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return BuildDocTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (! $conf->facture->enabled) { print __METHOD__." invoice module not enabled\n"; die(); } - if (! $conf->commande->enabled) { print __METHOD__." order module not enabled\n"; die(); } - if (! $conf->propal->enabled) { print __METHOD__." propal module not enabled\n"; die(); } - if (! $conf->projet->enabled) { print __METHOD__." project module not enabled\n"; die(); } - if (! $conf->expedition->enabled) { print __METHOD__." shipment module not enabled\n"; die(); } - if (! $conf->ficheinter->enabled) { print __METHOD__." intervention module not enabled\n"; die(); } - if (! $conf->expensereport->enabled) { print __METHOD__." expensereport module not enabled\n"; die(); } + if (! $conf->facture->enabled) { + print __METHOD__." invoice module not enabled\n"; die(); + } + if (! $conf->commande->enabled) { + print __METHOD__." order module not enabled\n"; die(); + } + if (! $conf->propal->enabled) { + print __METHOD__." propal module not enabled\n"; die(); + } + if (! $conf->projet->enabled) { + print __METHOD__." project module not enabled\n"; die(); + } + if (! $conf->expedition->enabled) { + print __METHOD__." shipment module not enabled\n"; die(); + } + if (! $conf->ficheinter->enabled) { + print __METHOD__." intervention module not enabled\n"; die(); + } + if (! $conf->expensereport->enabled) { + print __METHOD__." expensereport module not enabled\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFactureBuild - * - * @return int - */ - public function testFactureBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureBuild + * + * @return int + */ + public function testFactureBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->facture->dir_output.='/temp'; + $conf->facture->dir_output.='/temp'; - $localobjectcom=new Commande($this->savdb); - $localobjectcom->initAsSpecimen(); + $localobjectcom=new Commande($this->savdb); + $localobjectcom->initAsSpecimen(); - $localobject=new Facture($this->savdb); - $localobject->createFromOrder($localobjectcom, $user); - $localobject->date_lim_reglement = dol_now() + 3600 * 24 *30; + $localobject=new Facture($this->savdb); + $localobject->createFromOrder($localobjectcom, $user); + $localobject->date_lim_reglement = dol_now() + 3600 * 24 *30; - // Crabe (english) - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (english) + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $langs); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (japanese) - $newlangs1=new Translate("", $conf); - $newlangs1->setDefaultLang('ja_JP'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs1); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (japanese) + $newlangs1=new Translate("", $conf); + $newlangs1->setDefaultLang('ja_JP'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs1); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (saudiarabia) - $newlangs2a=new Translate("", $conf); - $newlangs2a->setDefaultLang('sa_SA'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs2a); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (saudiarabia) + $newlangs2a=new Translate("", $conf); + $newlangs2a->setDefaultLang('sa_SA'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs2a); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (english_saudiarabia) - $newlangs2b=new Translate("", $conf); - $newlangs2b->setDefaultLang('en_SA'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs2b); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (english_saudiarabia) + $newlangs2b=new Translate("", $conf); + $newlangs2b->setDefaultLang('en_SA'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs2b); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (greek) - $newlangs3=new Translate("", $conf); - $newlangs3->setDefaultLang('el_GR'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs3); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (greek) + $newlangs3=new Translate("", $conf); + $newlangs3->setDefaultLang('el_GR'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs3); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (chinese) - $newlangs4=new Translate("", $conf); - $newlangs4->setDefaultLang('zh_CN'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs4); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (chinese) + $newlangs4=new Translate("", $conf); + $newlangs4->setDefaultLang('zh_CN'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs4); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Crabe (russian) - $newlangs5=new Translate("", $conf); - $newlangs5->setDefaultLang('ru_RU'); - $localobject->modelpdf='crabe'; - $result = $localobject->generateDocument($localobject->modelpdf, $newlangs5); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + // Crabe (russian) + $newlangs5=new Translate("", $conf); + $newlangs5->setDefaultLang('ru_RU'); + $localobject->model_pdf='crabe'; + $result = $localobject->generateDocument($localobject->model_pdf, $newlangs5); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testFactureFournisseurBuild - * - * @return int - */ - public function testFactureFournisseurBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureFournisseurBuild + * + * @return int + */ + public function testFactureFournisseurBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->fournisseur->facture->dir_output.='/temp'; - $localobject=new FactureFournisseur($this->savdb); - $localobject->initAsSpecimen(); + $conf->fournisseur->facture->dir_output.='/temp'; + $localobject=new FactureFournisseur($this->savdb); + $localobject->initAsSpecimen(); - // Canelle - $localobject->modelpdf='canelle'; - $result = $localobject->generateDocument($localobject->modelpdf, $langs); + // Canelle + $localobject->model_pdf='canelle'; + $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testCommandeBuild - * - * @return int - */ - public function testCommandeBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeBuild + * + * @return int + */ + public function testCommandeBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->commande->dir_output.='/temp'; - $localobject=new Commande($this->savdb); - $localobject->initAsSpecimen(); + $conf->commande->dir_output.='/temp'; + $localobject=new Commande($this->savdb); + $localobject->initAsSpecimen(); - // Einstein - $localobject->modelpdf='einstein'; - $result = $localobject->generateDocument($localobject->modelpdf, $langs); + // Einstein + $localobject->model_pdf='einstein'; + $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testCommandeFournisseurBuild - * - * @return int - */ - public function testCommandeFournisseurBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurBuild + * + * @return int + */ + public function testCommandeFournisseurBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->fournisseur->commande->dir_output.='/temp'; - $localobject=new CommandeFournisseur($this->savdb); - $localobject->initAsSpecimen(); + $conf->fournisseur->commande->dir_output.='/temp'; + $localobject=new CommandeFournisseur($this->savdb); + $localobject->initAsSpecimen(); - // Muscadet - $localobject->modelpdf='muscadet'; - $result= $localobject->generateDocument($localobject->modelpdf, $langs); + // Muscadet + $localobject->model_pdf='muscadet'; + $result= $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testPropalBuild - * - * @return int - */ - public function testPropalBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testPropalBuild + * + * @return int + */ + public function testPropalBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->propal->dir_output.='/temp'; - $localobject=new Propal($this->savdb); - $localobject->initAsSpecimen(); + $conf->propal->dir_output.='/temp'; + $localobject=new Propal($this->savdb); + $localobject->initAsSpecimen(); - // Azur - $localobject->modelpdf='azur'; - $result = $localobject->generateDocument($localobject->modelpdf, $langs); + // Azur + $localobject->model_pdf='azur'; + $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testProjectBuild - * - * @return int - */ - public function testProjectBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - $conf->projet->dir_output.='/temp'; - $localobject=new Project($this->savdb); - $localobject->initAsSpecimen(); + /** + * testProjectBuild + * + * @return int + */ + public function testProjectBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + $conf->projet->dir_output.='/temp'; + $localobject=new Project($this->savdb); + $localobject->initAsSpecimen(); - // Baleine - $localobject->modelpdf='baleine'; - $result = $localobject->generateDocument($localobject->modelpdf, $langs); + // Baleine + $localobject->model_pdf='baleine'; + $result = $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testFichinterBuild - * - * @return int - */ - public function testFichinterBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFichinterBuild + * + * @return int + */ + public function testFichinterBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->ficheinter->dir_output.='/temp'; - $localobject=new Fichinter($this->savdb); - $localobject->initAsSpecimen(); + $conf->ficheinter->dir_output.='/temp'; + $localobject=new Fichinter($this->savdb); + $localobject->initAsSpecimen(); - // Soleil - $localobject->modelpdf='soleil'; - $result=fichinter_create($db, $localobject, $localobject->modelpdf, $langs); + // Soleil + $localobject->model_pdf='soleil'; + $result=fichinter_create($db, $localobject, $localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } - /** - * testExpeditionBuild - * - * @return int - */ - public function testExpeditionBuild() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpeditionBuild + * + * @return int + */ + public function testExpeditionBuild() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->expedition->dir_output.='/temp'; - $localobject=new Expedition($this->savdb); - $localobject->initAsSpecimen(); + $conf->expedition->dir_output.='/temp'; + $localobject=new Expedition($this->savdb); + $localobject->initAsSpecimen(); - // Merou - $localobject->modelpdf='merou'; - $result= $localobject->generateDocument($localobject->modelpdf, $langs); + // Merou + $localobject->model_pdf='merou'; + $result= $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - // Rouget - $localobject->modelpdf='rouget'; - $result= $localobject->generateDocument($localobject->modelpdf, $langs); + // Rouget + $localobject->model_pdf='rouget'; + $result= $localobject->generateDocument($localobject->model_pdf, $langs); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; - return 0; - } + return 0; + } } diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php index d407b67d991..7e4b5dbacb7 100755 --- a/test/phpunit/CMailFileTest.php +++ b/test/phpunit/CMailFileTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/class/CMailFile.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,163 +46,163 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CMailFileTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CMailFile - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CMailFile + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->global->MAIN_DISABLE_ALL_MAILS=1; // If I comment/remove this lien, unit test still works alone but failed when ran from AllTest. Don't know why. + $conf->global->MAIN_DISABLE_ALL_MAILS=1; // If I comment/remove this lien, unit test still works alone but failed when ran from AllTest. Don't know why. - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testCMailFileText - * - * @return void - */ - public function testCMailFileText() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCMailFileText + * + * @return void + */ + public function testCMailFileText() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new CMailFile('Test', 'test@test.com', 'from@from.com', 'Message txt', array(), array(), array(), '', '', 1, 0); + $localobject=new CMailFile('Test', 'test@test.com', 'from@from.com', 'Message txt', array(), array(), array(), '', '', 1, 0); - $result=$localobject->sendfile(); - print __METHOD__." result=".$result."\n"; - $this->assertFalse($result); // False because mail send disabled + $result=$localobject->sendfile(); + print __METHOD__." result=".$result."\n"; + $this->assertFalse($result); // False because mail send disabled - return $result; - } + return $result; + } - /** - * testCMailFileStatic - * - * @return string - */ - public function testCMailFileStatic() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCMailFileStatic + * + * @return string + */ + public function testCMailFileStatic() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new CMailFile('', '', '', ''); + $localobject=new CMailFile('', '', '', ''); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 0); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'John Doe <john@doe.com>'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'John Doe <john@doe.com>'); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '<john@doe.com>'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '<john@doe.com>'); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'john@doe.com'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'john@doe.com'); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 3, 0); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"John Doe" <john@doe.com>'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 3, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"John Doe" <john@doe.com>'); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 3, 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"=?UTF-8?B?Sm9obiBEb2U=?=" <john@doe.com>'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 3, 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"=?UTF-8?B?Sm9obiBEb2U=?=" <john@doe.com>'); - $src='John Doe <john@doe.com>'; - $result=$localobject->getValidAddress($src, 4); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'John Doe'); + $src='John Doe <john@doe.com>'; + $result=$localobject->getValidAddress($src, 4); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'John Doe'); - $src='John Doe <john@doe.com>, John Doe2 <john@doe3.com>, John Doe3 <john@doe2.com>'; - $result=$localobject->getValidAddress($src, 4); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'John Doe,John Doe2,John Doe3'); + $src='John Doe <john@doe.com>, John Doe2 <john@doe3.com>, John Doe3 <john@doe2.com>'; + $result=$localobject->getValidAddress($src, 4); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'John Doe,John Doe2,John Doe3'); - $src='John Doe <john@doe.com>, John Doe2 <john@doe3.com>, John Doe3 <john@doe2.com>'; - $result=$localobject->getValidAddress($src, 4, 0, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'John Doe,John Doe2...'); + $src='John Doe <john@doe.com>, John Doe2 <john@doe3.com>, John Doe3 <john@doe2.com>'; + $result=$localobject->getValidAddress($src, 4, 0, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'John Doe,John Doe2...'); - return $result; - } + return $result; + } } diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index 11aff6b1a79..67e7f937267 100644 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/categories/class/categorie.class.p require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -47,303 +47,303 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CategorieTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CategorieTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CategorieTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testCategorieCreate - * - * @return int - */ - public function testCategorieCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieCreate + * + * @return int + */ + public function testCategorieCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // We create a category - $localobject=new Categorie($this->savdb); - $localobject->initAsSpecimen(); + // We create a category + $localobject=new Categorie($this->savdb); + $localobject->initAsSpecimen(); - // Check it does not exist (return 0) - $resultCheck=$localobject->already_exists(); - print __METHOD__." resultCheck=".$resultCheck."\n"; - $this->assertEquals(0, $resultCheck); + // Check it does not exist (return 0) + $resultCheck=$localobject->already_exists(); + print __METHOD__." resultCheck=".$resultCheck."\n"; + $this->assertEquals(0, $resultCheck); - // Create - $resultFirstCreate=$localobject->create($user); - print __METHOD__." resultFirstCreate=".$resultFirstCreate."\n"; - $this->assertGreaterThan(0, $resultFirstCreate); + // Create + $resultFirstCreate=$localobject->create($user); + print __METHOD__." resultFirstCreate=".$resultFirstCreate."\n"; + $this->assertGreaterThan(0, $resultFirstCreate); - // We try to create another one with same ref - $localobject2=new Categorie($this->savdb); - $localobject2->initAsSpecimen(); + // We try to create another one with same ref + $localobject2=new Categorie($this->savdb); + $localobject2->initAsSpecimen(); - // Check it does exist (return 1) - $resultCheck=$localobject2->already_exists(); - print __METHOD__." resultCheck=".$resultCheck."\n"; - $this->assertGreaterThan(0, $resultCheck); + // Check it does exist (return 1) + $resultCheck=$localobject2->already_exists(); + print __METHOD__." resultCheck=".$resultCheck."\n"; + $this->assertGreaterThan(0, $resultCheck); - $resultSecondCreate=$localobject2->create($user); - print __METHOD__." result=".$resultSecondCreate."\n"; - $this->assertEquals(-4, $resultSecondCreate); + $resultSecondCreate=$localobject2->create($user); + print __METHOD__." result=".$resultSecondCreate."\n"; + $this->assertEquals(-4, $resultSecondCreate); - return $resultFirstCreate; - } + return $resultFirstCreate; + } - /** - * testCategorieProduct - * - * @param int $id Id of category - * @return int - * - * @depends testCategorieCreate - * The depends says test is run only if previous is ok - */ - public function testCategorieProduct($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieProduct + * + * @param int $id Id of category + * @return int + * + * @depends testCategorieCreate + * The depends says test is run only if previous is ok + */ + public function testCategorieProduct($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobjecttmp=new Categorie($this->savdb); - $localobjecttmp->initAsSpecimen(); - $localobjecttmp->label='Specimen Category for product'; - $localobjecttmp->type=0; // product category - $catid=$localobjecttmp->create($user); + $localobjecttmp=new Categorie($this->savdb); + $localobjecttmp->initAsSpecimen(); + $localobjecttmp->label='Specimen Category for product'; + $localobjecttmp->type=0; // product category + $catid=$localobjecttmp->create($user); - print __METHOD__." catid=".$catid."\n"; - $this->assertGreaterThan(0, $catid); + print __METHOD__." catid=".$catid."\n"; + $this->assertGreaterThan(0, $catid); - // Try to create product linked to category - $localobject2=new Product($this->savdb); - $localobject2->initAsSpecimen(); - $localobject2->ref.='-CATEG'; - $localobject2->tva_npr=1; - $result=$localobject2->create($user); - $cat = new Categorie($this->savdb); - $cat->id = $catid; - $cat->type = 0; - $result=$cat->add_type($localobject2, "product"); + // Try to create product linked to category + $localobject2=new Product($this->savdb); + $localobject2->initAsSpecimen(); + $localobject2->ref.='-CATEG'; + $localobject2->tva_npr=1; + $result=$localobject2->create($user); + $cat = new Categorie($this->savdb); + $cat->id = $catid; + $cat->type = 0; + $result=$cat->add_type($localobject2, "product"); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Get list of categories for product - $localcateg=new Categorie($this->savdb); - $listofcateg=$localcateg->containing($localobject2->id, Categorie::TYPE_PRODUCT, 'label'); - $this->assertTrue(in_array('Specimen Category for product', $listofcateg), 'Categ not found linked to product when it should'); + // Get list of categories for product + $localcateg=new Categorie($this->savdb); + $listofcateg=$localcateg->containing($localobject2->id, Categorie::TYPE_PRODUCT, 'label'); + $this->assertTrue(in_array('Specimen Category for product', $listofcateg), 'Categ not found linked to product when it should'); - return $id; - } + return $id; + } - /** - * testCategorieFetch - * - * @param int $id Id of category - * @return int - * - * @depends testCategorieProduct - * The depends says test is run only if previous is ok - */ - public function testCategorieFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieFetch + * + * @param int $id Id of category + * @return int + * + * @depends testCategorieProduct + * The depends says test is run only if previous is ok + */ + public function testCategorieFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Categorie($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Categorie($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertGreaterThan(0, $result); - return $localobject; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $localobject; + } - /** - * testCategorieUpdate - * - * @param Categorie $localobject Category - * @return int + /** + * testCategorieUpdate + * + * @param Categorie $localobject Category + * @return int - * @depends testCategorieFetch - * The depends says test is run only if previous is ok - */ - public function testCategorieUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + * @depends testCategorieFetch + * The depends says test is run only if previous is ok + */ + public function testCategorieUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->note='New note after update'; - $result=$localobject->update($user); + $localobject->note='New note after update'; + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertGreaterThan(0, $result); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $localobject; + } - /** - * testCategorieOther - * - * @param Categorie $localobject Category - * @return int - * - * @depends testCategorieUpdate - * The depends says test is run only if previous is ok - */ - public function testCategorieOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieOther + * + * @param Categorie $localobject Category + * @return int + * + * @depends testCategorieUpdate + * The depends says test is run only if previous is ok + */ + public function testCategorieOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ - $localobject2=new Categorie($db); - $localobject2->initAsSpecimen(); + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ + $localobject2=new Categorie($db); + $localobject2->initAsSpecimen(); - $retarray=$localobject->liste_photos('/'); - print __METHOD__." retarray size=".count($retarray)."\n"; - $this->assertTrue(is_array($retarray)); + $retarray=$localobject->liste_photos('/'); + print __METHOD__." retarray size=".count($retarray)."\n"; + $this->assertTrue(is_array($retarray)); - return $localobject->id; - } + return $localobject->id; + } - /** - * testCategorieDelete - * - * @param int $id Id of category - * @return int - * - * @depends testCategorieOther - * The depends says test is run only if previous is ok - */ - public function testCategorieDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieDelete + * + * @param int $id Id of category + * @return int + * + * @depends testCategorieOther + * The depends says test is run only if previous is ok + */ + public function testCategorieDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Categorie($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new Categorie($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertGreaterThan(0, $result); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $result; + } - /** - * testCategorieStatic - * - * @return void - * - * @depends testCategorieDelete - */ - public function testCategorieStatic() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCategorieStatic + * + * @return void + * + * @depends testCategorieDelete + */ + public function testCategorieStatic() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Categorie($this->savdb); - $retarray=$localobject->get_full_arbo(3); + $localobject=new Categorie($this->savdb); + $retarray=$localobject->get_full_arbo(3); - print __METHOD__." retarray size=".count($retarray)."\n"; - $this->assertTrue(is_array($retarray)); - return $retarray; - } + print __METHOD__." retarray size=".count($retarray)."\n"; + $this->assertTrue(is_array($retarray)); + return $retarray; + } } diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 33349449795..705d21ed95d 100644 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -29,11 +29,10 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/sociales/class/chargesociales.class.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -47,206 +46,206 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class ChargeSocialesTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return ChargeSocialesTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return ChargeSocialesTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testChargeSocialesCreate - * - * @return void - */ - public function testChargeSocialesCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testChargeSocialesCreate + * + * @return void + */ + public function testChargeSocialesCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ChargeSociales($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user, $langs, $conf); - print __METHOD__." result=".$result."\n"; + $localobject=new ChargeSociales($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user, $langs, $conf); + print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } - /** - * testChargeSocialesFetch - * - * @param int $id Id of social contribution - * @return void - * - * @depends testChargeSocialesCreate - * The depends says test is run only if previous is ok - */ - public function testChargeSocialesFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testChargeSocialesFetch + * + * @param int $id Id of social contribution + * @return void + * + * @depends testChargeSocialesCreate + * The depends says test is run only if previous is ok + */ + public function testChargeSocialesFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ChargeSociales($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; + $localobject=new ChargeSociales($this->savdb); + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testChargeSocialesValid - * - * @param Object $localobject Social contribution - * @return void - * - * @depends testChargeSocialesFetch - * The depends says test is run only if previous is ok - */ - public function testChargeSocialesValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testChargeSocialesValid + * + * @param ChargeSociales $localobject Social contribution + * @return void + * + * @depends testChargeSocialesFetch + * The depends says test is run only if previous is ok + */ + public function testChargeSocialesValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->set_paid($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->setPaid($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testChargeSocialesOther - * - * @param Object $localobject Social contribution - * @return void - * - * @depends testChargeSocialesValid - * The depends says test is run only if previous is ok - */ - public function testChargeSocialesOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testChargeSocialesOther + * + * @param ChargeSociales $localobject Social contribution + * @return void + * + * @depends testChargeSocialesValid + * The depends says test is run only if previous is ok + */ + public function testChargeSocialesOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->getNomUrl(1); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertNotEquals($result, ''); + $result=$localobject->getNomUrl(1); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertNotEquals($result, ''); - $result=$localobject->getSommePaiement(); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0); + $result=$localobject->getSommePaiement(); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0); - return $localobject->id; - } + return $localobject->id; + } - /** - * testChargeSocialesDelete - * - * @param int $id Social contribution - * @return void - * - * @depends testChargeSocialesOther - * The depends says test is run only if previous is ok - */ - public function testChargeSocialesDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testChargeSocialesDelete + * + * @param int $id Social contribution + * @return void + * + * @depends testChargeSocialesOther + * The depends says test is run only if previous is ok + */ + public function testChargeSocialesDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ChargeSociales($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($id); + $localobject=new ChargeSociales($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index c18987b8931..b3250b9e265 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -30,22 +30,41 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -59,325 +78,342 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CodingPhpTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return SecurityTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return SecurityTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testSql - * - * @return string - */ - public function testPHP() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSql + * + * @return string + */ + public function testPHP() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $filesarray = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, '\.php', null, 'fullname'); - //$filesarray = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, '\.php', null, 'fullname'); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $filesarray = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, '\.php', null, 'fullname', SORT_ASC, 0, 0, '', 1); + //$filesarray = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, '\.php', null, 'fullname'); - foreach ($filesarray as $key => $file) - { - if (preg_match('/\/htdocs\/includes\//', $file['fullname'])) continue; - if (preg_match('/\/htdocs\/custom\//', $file['fullname'])) continue; - if (preg_match('/\/htdocs\/dolimed/', $file['fullname'])) continue; - if (preg_match('/\/htdocs\/nltechno/', $file['fullname'])) continue; - if (preg_match('/\/htdocs\/teclib/', $file['fullname'])) continue; + foreach ($filesarray as $key => $file) { + if (preg_match('/\/htdocs\/includes\//', $file['fullname'])) { + continue; + } + if (preg_match('/\/htdocs\/custom\//', $file['fullname'])) { + continue; + } + if (preg_match('/\/htdocs\/dolimed/', $file['fullname'])) { + continue; + } + if (preg_match('/\/htdocs\/nltechno/', $file['fullname'])) { + continue; + } + if (preg_match('/\/htdocs\/teclib/', $file['fullname'])) { + continue; + } - print 'Check php file '.$file['fullname']."\n"; - $filecontent=file_get_contents($file['fullname']); + print 'Check php file '.$file['fullname']."\n"; + $filecontent=file_get_contents($file['fullname']); - if (preg_match('/\.class\.php/', $file['relativename']) - || preg_match('/boxes\/box_/', $file['relativename']) - || preg_match('/modules\/.*\/doc\/(doc|pdf)_/', $file['relativename']) - || preg_match('/modules\/(import|mailings|printing)\//', $file['relativename']) - || in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) { - if (! in_array($file['name'], array( - 'api.class.php', - 'actioncomm.class.php', - 'commonobject.class.php', - 'conf.class.php', - 'html.form.class.php', - 'html.formmail.class.php', - 'infobox.class.php', - 'link.class.php', - 'translate.class.php', - 'utils.class.php', - 'modules_product.class.php', - 'modules_societe.class.php', - 'TraceableDB.php', - 'expeditionbatch.class.php', - 'expensereport_ik.class.php', - 'expensereport_rule.class.php', - 'multicurrency.class.php', - 'productbatch.class.php', - 'reception.class.php', - 'societe.class.php' - ))) { - // Must must not found $db-> - $ok=true; - $matches=array(); - // Check string get_class... - preg_match_all('/'.preg_quote('$db->', '/').'/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found string $db-> into a .class.php file in '.$file['relativename']); - //exit; - } - } else { - if (! in_array($file['name'], array( - 'extrafieldsinexport.inc.php', - 'DolQueryCollector.php' - ))) { - // Must must not found $this->db-> - $ok=true; - $matches=array(); - // Check string get_class... - preg_match_all('/'.preg_quote('$this->db->', '/').'/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found string $this->db-> in '.$file['relativename']); - //exit; - } - } + if (preg_match('/\.class\.php/', $file['relativename']) + || preg_match('/boxes\/box_/', $file['relativename']) + || preg_match('/modules\/.*\/doc\/(doc|pdf)_/', $file['relativename']) + || preg_match('/modules\/(import|mailings|printing)\//', $file['relativename']) + || in_array($file['name'], array('modules_boxes.php', 'rapport.pdf.php', 'TraceableDB.php'))) { + if (! in_array($file['name'], array( + 'api.class.php', + 'actioncomm.class.php', + 'commonobject.class.php', + 'conf.class.php', + 'html.form.class.php', + 'html.formmail.class.php', + 'infobox.class.php', + 'link.class.php', + 'translate.class.php', + 'utils.class.php', + 'modules_product.class.php', + 'modules_societe.class.php', + 'TraceableDB.php', + 'expeditionbatch.class.php', + 'expensereport_ik.class.php', + 'expensereport_rule.class.php', + 'multicurrency.class.php', + 'productbatch.class.php', + 'reception.class.php', + 'societe.class.php' + ))) { + // Must must not found $db-> + $ok=true; + $matches=array(); + // Check string get_class... + preg_match_all('/'.preg_quote('$db->', '/').'/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found string $db-> into a .class.php file in '.$file['relativename']); + //exit; + } + } else { + if (! in_array($file['name'], array( + 'extrafieldsinexport.inc.php', + 'DolQueryCollector.php' + ))) { + // Must must not found $this->db-> + $ok=true; + $matches=array(); + // Check string get_class... + preg_match_all('/'.preg_quote('$this->db->', '/').'/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found string $this->db-> in '.$file['relativename']); + //exit; + } + } - $ok=true; - $matches=array(); - // Check string get_class... - preg_match_all('/'.preg_quote('get_class($this)."::".__METHOD__', '/').'/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found string get_class($this)."::".__METHOD__ that must be replaced with __METHOD__ only in '.$file['relativename']); - //exit; + $ok=true; + $matches=array(); + // Check string get_class... + preg_match_all('/'.preg_quote('get_class($this)."::".__METHOD__', '/').'/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found string get_class($this)."::".__METHOD__ that must be replaced with __METHOD__ only in '.$file['relativename']); + //exit; - $ok=true; - $matches=array(); - // Check string $this->db->idate without quotes - preg_match_all('/(..)\s*\.\s*\$this->db->idate\(/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if ($val[1] != '\'"' && $val[1] != '\'\'') - { - $ok=false; - break; - } - //if ($reg[0] != 'db') $ok=false; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found a $this->db->idate to forge a sql request without quotes around this date field '.$file['relativename']); - //exit; + $ok=true; + $matches=array(); + // Check string $this->db->idate without quotes + preg_match_all('/(..)\s*\.\s*\$this->db->idate\(/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if ($val[1] != '\'"' && $val[1] != '\'\'') { + $ok=false; + break; + } + //if ($reg[0] != 'db') $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found a $this->db->idate to forge a sql request without quotes around this date field '.$file['relativename']); + //exit; - $ok=true; - $matches=array(); + $ok=true; + $matches=array(); - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/=\s*\'"\s*\.\s*\$this->(....)/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if ($val[1] != 'db->' && $val[1] != 'esca') - { - $ok=false; - break; - } - //if ($reg[0] != 'db') $ok=false; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found non escaped string in building of a sql request '.$file['relativename'].' - Bad.'); - //exit; + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/=\s*\'"\s*\.\s*\$this->(....)/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if ($val[1] != 'db->' && $val[1] != 'esca') { + $ok=false; + break; + } + //if ($reg[0] != 'db') $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found non escaped string in building of a sql request '.$file['relativename'].' - Bad.'); + //exit; - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/sql.+\s*\'"\s*\.\s*\$(.........)/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if (! in_array($val[1], array('this->db-', 'this->esc', 'db->escap', 'dbsession', 'db->idate', 'excludeGr', 'includeGr'))) { - $ok=false; - break; - } - //if ($reg[0] != 'db') $ok=false; - } - //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; - $this->assertTrue($ok, 'Found non escaped string in building of a sql request '.$file['relativename'].': '.$val[0].' - Bad.'); - //exit; + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/sql.+\s*\'"\s*\.\s*\$(.........)/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if (! in_array($val[1], array('this->db-', 'this->esc', 'db->escap', 'dbsession', 'db->idate', 'excludeGr', 'includeGr'))) { + $ok=false; + break; + } + //if ($reg[0] != 'db') $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found non escaped string in building of a sql request '.$file['relativename'].': '.$val[0].' - Bad.'); + //exit; + + // Check string 'IN (".xxx' or 'IN (\'.xxx' with xxx that is not '$this->db->sanitize' and not '$db->sanitize'. It means we forget a db->sanitize when forging sql request. + preg_match_all('/ IN \([\'"]\s*\.\s*(.........)/i', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if (!in_array($val[1], array('$db->sani', '$this->db', 'getEntity', 'WON\',\'L', 'self::STA', 'Commande:', 'CommandeF', 'Entrepot:', 'Facture::', 'FactureFo', 'ExpenseRe', 'Societe::', 'Ticket::S'))) { + $ok=false; + break; + } + //if ($reg[0] != 'db') $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found non sanitized string in building of a IN or NOT IN sql request '.$file['relativename'].' - Bad.'); + //exit; + + // Check string 'IN (\'".xxx' with xxx that is not '$this->db->sanitize' and not '$db->sanitize'. It means we forget a db->sanitize when forging sql request. + preg_match_all('/ IN \(\'"\s*\.\s*(.........)/i', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if (!in_array($val[1], array('$db->sani', '$this->db', 'getEntity', 'WON\',\'L', 'self::STA', 'Commande:', 'CommandeF', 'Entrepot:', 'Facture::', 'FactureFo', 'ExpenseRe', 'Societe::', 'Ticket::S'))) { + $ok=false; + break; + } + //if ($reg[0] != 'db') $ok=false; + } + //print __METHOD__." Result for checking we don't have non escaped string in sql requests for file ".$file."\n"; + $this->assertTrue($ok, 'Found non sanitized string in building of a IN or NOT IN sql request '.$file['relativename'].' - Bad.'); + //exit; + + // Test that output of $_SERVER\[\'QUERY_STRING\'\] is escaped. + $ok=true; + $matches=array(); + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/(..............)\$_SERVER\[\'QUERY_STRING\'\]/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if ($val[1] != 'scape_htmltag(' && $val[1] != 'ing_nohtmltag(' && $val[1] != 'dol_escape_js(') { + $ok=false; + break; + } + } + $this->assertTrue($ok, 'Found a $_SERVER[\'QUERY_STRING\'] without dol_escape_htmltag neither dol_string_nohtmltag around it, in file '.$file['relativename'].' ('.$val[1].'$_SERVER[\'QUERY_STRING\']). Bad.'); - // Test that output of $_SERVER\[\'QUERY_STRING\'\] is escaped. - $ok=true; - $matches=array(); - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/(..............)\$_SERVER\[\'QUERY_STRING\'\]/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if ($val[1] != 'scape_htmltag(' && $val[1] != 'ing_nohtmltag(' && $val[1] != 'dol_escape_js(') - { - $ok=false; - break; - } - } - $this->assertTrue($ok, 'Found a $_SERVER[\'QUERY_STRING\'] without dol_escape_htmltag neither dol_string_nohtmltag around it, in file '.$file['relativename'].' ('.$val[1].'$_SERVER[\'QUERY_STRING\']). Bad.'); + // Test that first param of print_liste_field_titre is a translation key and not the translated value + $ok=true; + $matches=array(); + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/print_liste_field_titre\(\$langs/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + $this->assertTrue($ok, 'Found a use of print_liste_field_titre with first parameter that is a translated value instead of just the translation key in file '.$file['relativename'].'. Bad.'); - // Test that first param of print_liste_field_titre is a translation key and not the translated value - $ok=true; - $matches=array(); - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/print_liste_field_titre\(\$langs/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - $this->assertTrue($ok, 'Found a use of print_liste_field_titre with first parameter that is a translated value instead of just the translation key in file '.$file['relativename'].'. Bad.'); + // Test we don't have <br /> + $ok=true; + $matches=array(); + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/<br \/>/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if ($file['name'] != 'functions.lib.php') { + $ok=false; + break; + } + } + $this->assertTrue($ok, 'Found a tag <br /> that is for xml in file '.$file['relativename'].'. You must use html syntax <br> instead.'); - // Test we don't have <br /> - $ok=true; - $matches=array(); - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/<br \/>/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if ($file['name'] != 'functions.lib.php') - { - $ok=false; - break; - } - } - $this->assertTrue($ok, 'Found a tag <br /> that is for xml in file '.$file['relativename'].'. You must use html syntax <br> instead.'); + // Test we don't have name="token" value="'.$_SESSION['newtoken'], we must use name="token" value="'.newToken() instead. + $ok=true; + $matches=array(); + // Check string name="token" value="'.$_SESSINON + preg_match_all('/name="token" value="\'\s*\.\s*\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + if ($file['name'] != 'excludefile.php') { + $ok=false; + break; + } + } + $this->assertTrue($ok, 'Found a forbidden string sequence into '.$file['relativename'].' : name="token" value="\'.$_SESSION[..., you must use a newToken() instead of $_SESSION[\'newtoken\'].'); - // Test we don't have name="token" value="'.$_SESSION['newtoken'], we must use name="token" value="'.newToken() instead. - $ok=true; - $matches=array(); - // Check string name="token" value="'.$_SESSINON - preg_match_all('/name="token" value="\'\s*\.\s*\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - if ($file['name'] != 'excludefile.php') - { - $ok=false; - break; - } - } - $this->assertTrue($ok, 'Found a forbidden string sequence into '.$file['relativename'].' : name="token" value="\'.$_SESSION[..., you must use a newToken() instead of $_SESSION[\'newtoken\'].'); + // Test we don't have @var array( + $ok=true; + $matches=array(); + // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. + preg_match_all('/@var\s+array\(/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + $this->assertTrue($ok, 'Found a declaration @var array() instead of @var array in file '.$file['relativename'].'.'); - // Test we don't have @var array( - $ok=true; - $matches=array(); - // Check string ='".$this->xxx with xxx that is not 'escape'. It means we forget a db->escape when forging sql request. - preg_match_all('/@var\s+array\(/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - $this->assertTrue($ok, 'Found a declaration @var array() instead of @var array in file '.$file['relativename'].'.'); + // Test we don't have CURDATE() + $ok=true; + $matches=array(); + preg_match_all('/CURDATE\(\)/', $filecontent, $matches, PREG_SET_ORDER); + foreach ($matches as $key => $val) { + $ok=false; + break; + } + $this->assertTrue($ok, 'Found a CURDATE\(\) into code. Do not use this SQL method in file '.$file['relativename'].'. You must use the PHP function dol_now() instead.'); + } - - // Test we don't have CURDATE() - $ok=true; - $matches=array(); - preg_match_all('/CURDATE\(\)/', $filecontent, $matches, PREG_SET_ORDER); - foreach ($matches as $key => $val) - { - $ok=false; - break; - } - $this->assertTrue($ok, 'Found a CURDATE\(\) into code. Do not use this SQL method in file '.$file['relativename'].'. You must use the PHP function dol_now() instead.'); - } - - return; - } + return; + } } diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index 3e065bb141c..9217ebbe7f6 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -30,22 +30,41 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -59,205 +78,201 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CodingSqlTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return SecurityTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return SecurityTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testSql - * - * @return string - */ - public function testSql() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSql + * + * @return string + */ + public function testSql() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $listofsqldir = array(DOL_DOCUMENT_ROOT.'/install/mysql/data', DOL_DOCUMENT_ROOT.'/install/mysql/tables', DOL_DOCUMENT_ROOT.'/install/mysql/migration'); + $listofsqldir = array(DOL_DOCUMENT_ROOT.'/install/mysql/data', DOL_DOCUMENT_ROOT.'/install/mysql/tables', DOL_DOCUMENT_ROOT.'/install/mysql/migration'); - foreach ($listofsqldir as $dir) - { - print 'Process dir '.$dir."\n"; - $filesarray = scandir($dir); + foreach ($listofsqldir as $dir) { + print 'Process dir '.$dir."\n"; + $filesarray = scandir($dir); - foreach ($filesarray as $key => $file) - { - if (! preg_match('/\.sql$/', $file)) - continue; + foreach ($filesarray as $key => $file) { + if (! preg_match('/\.sql$/', $file)) { + continue; + } - print 'Check sql file '.$file."\n"; - $filecontent = file_get_contents($dir.'/'.$file); + print 'Check sql file '.$file."\n"; + $filecontent = file_get_contents($dir.'/'.$file); - // Allow ` for 'rank' column name - $filecontent = str_replace('`rank`', '_rank_', $filecontent); + // Allow ` for 'rank' column name + $filecontent = str_replace('`rank`', '_rank_', $filecontent); - $result=strpos($filecontent, '`'); - //print __METHOD__." Result for checking we don't have back quote = ".$result."\n"; - $this->assertTrue($result===false, 'Found back quote into '.$file.'. Bad.'); + $result=strpos($filecontent, '`'); + //print __METHOD__." Result for checking we don't have back quote = ".$result."\n"; + $this->assertTrue($result===false, 'Found back quote into '.$file.'. Bad.'); - $result=strpos($filecontent, '"'); - if ($result) - { - $result=(! strpos($filecontent, '["') && ! strpos($filecontent, '{"')); - } - //print __METHOD__." Result for checking we don't have double quote = ".$result."\n"; - $this->assertTrue($result===false, 'Found double quote that is not [" neither {" (used for json content) into '.$file.'. Bad.'); + $result=strpos($filecontent, '"'); + if ($result) { + $result=(! strpos($filecontent, '["') && ! strpos($filecontent, '{"')); + } + //print __METHOD__." Result for checking we don't have double quote = ".$result."\n"; + $this->assertTrue($result===false, 'Found double quote that is not [" neither {" (used for json content) into '.$file.'. Bad.'); - $result=strpos($filecontent, 'int('); - //print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; - $this->assertTrue($result===false, 'Found int(x) or tinyint(x) instead of integer or tinyint into '.$file.'. Bad.'); + $result=strpos($filecontent, 'int('); + //print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; + $this->assertTrue($result===false, 'Found int(x) or tinyint(x) instead of integer or tinyint into '.$file.'. Bad.'); - $result=strpos($filecontent, 'ON DELETE CASCADE'); - //print __METHOD__." Result for checking we don't have 'ON DELETE CASCADE' = ".$result."\n"; - $this->assertTrue($result===false, 'Found ON DELETE CASCADE into '.$file.'. Bad.'); + $result=strpos($filecontent, 'ON DELETE CASCADE'); + //print __METHOD__." Result for checking we don't have 'ON DELETE CASCADE' = ".$result."\n"; + $this->assertTrue($result===false, 'Found ON DELETE CASCADE into '.$file.'. Bad.'); - $result=strpos($filecontent, 'NUMERIC('); - //print __METHOD__." Result for checking we don't have 'NUMERIC(' = ".$result."\n"; - $this->assertTrue($result===false, 'Found NUMERIC( into '.$file.'. Bad.'); + $result=strpos($filecontent, 'NUMERIC('); + //print __METHOD__." Result for checking we don't have 'NUMERIC(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found NUMERIC( into '.$file.'. Bad.'); - $result=strpos($filecontent, 'NUMERIC('); - //print __METHOD__." Result for checking we don't have 'curdate(' = ".$result."\n"; - $this->assertTrue($result===false, 'Found curdate( into '.$file.'. Bad. Current date must be generated with PHP.'); + $result=strpos($filecontent, 'NUMERIC('); + //print __METHOD__." Result for checking we don't have 'curdate(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found curdate( into '.$file.'. Bad. Current date must be generated with PHP.'); - $result=strpos($filecontent, 'integer('); - //print __METHOD__." Result for checking we don't have 'integer(' = ".$result."\n"; - $this->assertTrue($result===false, 'Found value in parenthesis after the integer. It must be integer not integer(x) into '.$file.'. Bad.'); + $result=strpos($filecontent, 'integer('); + //print __METHOD__." Result for checking we don't have 'integer(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found value in parenthesis after the integer. It must be integer not integer(x) into '.$file.'. Bad.'); - if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') - { - // Test for migration files only - } elseif ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/data') - { - // Test for data files only - } else { - if (preg_match('/\.key\.sql$/', $file)) - { - // Test for key files only - } else { - // Test for non key files only - $result=(strpos($filecontent, 'KEY ') && strpos($filecontent, 'PRIMARY KEY') == 0); - //print __METHOD__." Result for checking we don't have ' KEY ' instead of a sql file to create index = ".$result."\n"; - $this->assertTrue($result===false, 'Found KEY into '.$file.'. Bad.'); + if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') { + // Test for migration files only + } elseif ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/data') { + // Test for data files only + } else { + if (preg_match('/\.key\.sql$/', $file)) { + // Test for key files only + } else { + // Test for non key files only + $result=(strpos($filecontent, 'KEY ') && strpos($filecontent, 'PRIMARY KEY') == 0); + //print __METHOD__." Result for checking we don't have ' KEY ' instead of a sql file to create index = ".$result."\n"; + $this->assertTrue($result===false, 'Found KEY into '.$file.'. Bad.'); - $result=stripos($filecontent, 'ENGINE=innodb'); - //print __METHOD__." Result for checking we have the ENGINE=innodb string = ".$result."\n"; - $this->assertGreaterThan(0, $result, 'The ENGINE=innodb was not found into '.$file.'. Add it or just fix syntax to match case.'); - } - } - } - } + $result=stripos($filecontent, 'ENGINE=innodb'); + //print __METHOD__." Result for checking we have the ENGINE=innodb string = ".$result."\n"; + $this->assertGreaterThan(0, $result, 'The ENGINE=innodb was not found into '.$file.'. Add it or just fix syntax to match case.'); + } + } + } + } - return; - } + return; + } - /** - * testInitData - * - * @return string - */ - public function testInitData() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testInitData + * + * @return string + */ + public function testInitData() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdemo'); - foreach ($filesarray as $key => $file) { - if (! preg_match('/\.sql$/', $file)) - continue; + $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdemo'); + foreach ($filesarray as $key => $file) { + if (! preg_match('/\.sql$/', $file)) { + continue; + } - print 'Check sql file '.$file."\n"; - $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdemo/'.$file); + print 'Check sql file '.$file."\n"; + $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdemo/'.$file); - $result=strpos($filecontent, '@gmail.com'); - print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key @gmail into file '.$file); + $result=strpos($filecontent, '@gmail.com'); + print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; + $this->assertTrue($result===false, 'Found a bad key @gmail into file '.$file); - $result=strpos($filecontent, 'eldy@'); - print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key eldy@ into file '.$file); - } + $result=strpos($filecontent, 'eldy@'); + print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; + $this->assertTrue($result===false, 'Found a bad key eldy@ into file '.$file); + } - return; - } + return; + } } diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 0ee65e3383e..b050005bcf1 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.commande.c require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.product.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -48,351 +48,353 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CommandeFournisseurTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CommandeFournisseurTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - //print $db->getVersion()."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testCommandeFournisseurCreate - * - * @return int ID of purchase order - */ - public function testCommandeFournisseurCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurCreate + * + * @return int ID of purchase order + */ + public function testCommandeFournisseurCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Set supplier and product to use - $socid=1; - $societe=new Societe($db); - $societe->fetch($socid); - $product=new ProductFournisseur($db); - $product->fetch(0, 'PIDRESS'); - if ($product->id <= 0) { print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); } + // Set supplier and product to use + $socid=1; + $societe=new Societe($db); + $societe->fetch($socid); + $product=new ProductFournisseur($db); + $product->fetch(0, 'PIDRESS'); + if ($product->id <= 0) { + print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); + } - $quantity=10; - $ref_fourn='SUPPLIER_REF_PHPUNIT'; - $tva_tx=19.6; + $quantity=10; + $ref_fourn='SUPPLIER_REF_PHPUNIT'; + $tva_tx=19.6; - // Delete existing supplier prices - // TODO + // Delete existing supplier prices + // TODO - // Create 1 supplier price with min qty = 10; - $result=$product->add_fournisseur($user, $societe->id, $ref_fourn, $quantity); // This insert record with no value for price. Values are update later with update_buyprice - print __METHOD__." add_fournisseur result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result, 'Create 1 supplier price with min qty = 10 if not exists'); - $result=$product->update_buyprice($quantity, 20, $user, 'HT', $societe, '', $ref_fourn, $tva_tx, 0, 0); - print __METHOD__." update_buyprice result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result, 'Update buyprice'); + // Create 1 supplier price with min qty = 10; + $result=$product->add_fournisseur($user, $societe->id, $ref_fourn, $quantity); // This insert record with no value for price. Values are update later with update_buyprice + print __METHOD__." add_fournisseur result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result, 'Create 1 supplier price with min qty = 10 if not exists'); + $result=$product->update_buyprice($quantity, 20, $user, 'HT', $societe, '', $ref_fourn, $tva_tx, 0, 0); + print __METHOD__." update_buyprice result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result, 'Update buyprice'); - // Create purchase order with a too low quantity and option SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY is on - $conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY = 1; + // Create purchase order with a too low quantity and option SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY is on + $conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY = 1; - $localobject=new CommandeFournisseur($db); - $localobject->initAsSpecimen(); - $localobject->lines=array(); // Overwrite lines of order - $line=new CommandeFournisseurLigne($db); - $line->desc=$langs->trans("Description")." specimen line with qty too low"; - $line->qty=1; // So lower than $quantity - $line->subprice=100; - $line->fk_product=$product->id; - $line->ref_fourn=$ref_fourn; - $localobject->lines[]=$line; + $localobject=new CommandeFournisseur($db); + $localobject->initAsSpecimen(); + $localobject->lines=array(); // Overwrite lines of order + $line=new CommandeFournisseurLigne($db); + $line->desc=$langs->trans("Description")." specimen line with qty too low"; + $line->qty=1; // So lower than $quantity + $line->subprice=100; + $line->fk_product=$product->id; + $line->ref_fourn=$ref_fourn; + $localobject->lines[]=$line; - $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-1, $result, 'Creation of too low quantity'); // must be -1 because quantity is lower than minimum of supplier price + $result=$localobject->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-1, $result, 'Creation of too low quantity'); // must be -1 because quantity is lower than minimum of supplier price - $sql="DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where ref=''"; - $db->query($sql); + $sql="DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where ref IN ('', '(PROV)')"; + $db->query($sql); - // Create purchase order - $localobject2=new CommandeFournisseur($db); - $localobject2->initAsSpecimen(); // This create 5 lines of first product found for socid 1 - $localobject2->lines=array(); // Overwrite lines of order - $line=new CommandeFournisseurLigne($db); - $line->desc=$langs->trans("Description")." specimen line ok"; - $line->qty=10; // So enough quantity - $line->subprice=100; - $line->fk_product=$product->id; - $line->ref_fourn=$ref_fourn; - $localobject2->lines[]=$line; + // Create purchase order + $localobject2=new CommandeFournisseur($db); + $localobject2->initAsSpecimen(); // This create 5 lines of first product found for socid 1 + $localobject2->lines=array(); // Overwrite lines of order + $line=new CommandeFournisseurLigne($db); + $line->desc=$langs->trans("Description")." specimen line ok"; + $line->qty=10; // So enough quantity + $line->subprice=100; + $line->fk_product=$product->id; + $line->ref_fourn=$ref_fourn; + $localobject2->lines[]=$line; - $result=$localobject2->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + $result=$localobject2->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create purchase order with a too low quantity but option SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY is off - $conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY = 0; + // Create purchase order with a too low quantity but option SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY is off + $conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY = 0; - $localobject3=new CommandeFournisseur($db); - $localobject3->initAsSpecimen(); - $localobject3->lines=array(); // Overwrite lines of order - $line=new CommandeFournisseurLigne($db); - $line->desc=$langs->trans("Description")." specimen line with qty too low"; - $line->qty=1; // So lower than $quantity - $line->subprice=100; - $line->fk_product=$product->id; - $line->ref_fourn=$ref_fourn; - $localobject3->lines[]=$line; + $localobject3=new CommandeFournisseur($db); + $localobject3->initAsSpecimen(); + $localobject3->lines=array(); // Overwrite lines of order + $line=new CommandeFournisseurLigne($db); + $line->desc=$langs->trans("Description")." specimen line with qty too low"; + $line->qty=1; // So lower than $quantity + $line->subprice=100; + $line->fk_product=$product->id; + $line->ref_fourn=$ref_fourn; + $localobject3->lines[]=$line; - $result=$localobject3->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result, 'Creation of too low quantity should be ok'); // must be id of line because there is no test on minimum quantity + $result=$localobject3->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Creation of too low quantity should be ok'); // must be id of line because there is no test on minimum quantity - $sql="DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where ref=''"; - $db->query($sql); + $sql="DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur where ref=''"; + $db->query($sql); - // Create purchase order - $localobject4=new CommandeFournisseur($db); - $localobject4->initAsSpecimen(); // This create 5 lines of first product found for socid 1 - $localobject4->lines=array(); // Overwrite lines of order - $line=new CommandeFournisseurLigne($db); - $line->desc=$langs->trans("Description")." specimen line ok"; - $line->qty=10; // So enough quantity - $line->subprice=100; - $line->fk_product=$product->id; - $line->ref_fourn=$ref_fourn; - $localobject4->lines[]=$line; + // Create purchase order + $localobject4=new CommandeFournisseur($db); + $localobject4->initAsSpecimen(); // This create 5 lines of first product found for socid 1 + $localobject4->lines=array(); // Overwrite lines of order + $line=new CommandeFournisseurLigne($db); + $line->desc=$langs->trans("Description")." specimen line ok"; + $line->qty=10; // So enough quantity + $line->subprice=100; + $line->fk_product=$product->id; + $line->ref_fourn=$ref_fourn; + $localobject4->lines[]=$line; - $result=$localobject4->create($user); - print __METHOD__." id for purchase order created by testCommandeFournisseurCreate = ".$result."\n"; - $this->assertGreaterThan(0, $result, 'Test to create a purchase order by testCommandeFournisseurCreate'); + $result=$localobject4->create($user); + print __METHOD__." id for purchase order created by testCommandeFournisseurCreate = ".$result."\n"; + $this->assertGreaterThan(0, $result, 'Test to create a purchase order by testCommandeFournisseurCreate'); - return $result; - } + return $result; + } - /** - * testCommandeFournisseurFetch - * - * @param int $id Id of purchase order - * @return CommandeFournisseur Purchase order - * - * @depends testCommandeFournisseurCreate - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurFetch + * + * @param int $id Id of purchase order + * @return CommandeFournisseur Purchase order + * + * @depends testCommandeFournisseurCreate + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new CommandeFournisseur($this->savdb); - $result=$localobject->fetch($id); + $localobject=new CommandeFournisseur($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Failed to fetch supplier order with id '.$id); - return $localobject; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Failed to fetch supplier order with id '.$id); + return $localobject; + } - /** - * testCommandeFournisseurValid - * - * @param Object $localobject Supplier order - * @return CommandeFournisseur Supplier order - * - * @depends testCommandeFournisseurFetch - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurValid + * + * @param CommandeFournisseur $localobject Supplier order + * @return CommandeFournisseur Supplier order + * + * @depends testCommandeFournisseurFetch + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->valid($user); + $result=$localobject->valid($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCommandeFournisseurApprove - * - * @param Object $localobject Supplier order - * @return CommandeFournisseur Supplier order - * - * @depends testCommandeFournisseurValid - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurApprove($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurApprove + * + * @param CommandeFournisseur $localobject Supplier order + * @return CommandeFournisseur Supplier order + * + * @depends testCommandeFournisseurValid + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurApprove($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->approve($user); + $result=$localobject->approve($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCommandeFournisseurCancel - * - * @param Object $localobject Supplier order - * @return CommandeFournisseur Supplier order - * - * @depends testCommandeFournisseurApprove - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurCancel($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurCancel + * + * @param CommandeFournisseur $localobject Supplier order + * @return CommandeFournisseur Supplier order + * + * @depends testCommandeFournisseurApprove + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurCancel($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->cancel($user); + $result=$localobject->cancel($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCommandeFournisseurOther - * - * @param Object $localobject Supplier order - * @return int Id of purchase order - * - * @depends testCommandeFournisseurCancel - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurOther + * + * @param CommandeFournisseur $localobject Supplier order + * @return int Id of purchase order + * + * @depends testCommandeFournisseurCancel + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - /*$localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); - */ - $this->assertEquals(1, 1); + /*$localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); + */ + $this->assertEquals(1, 1); - return $localobject->id; - } + return $localobject->id; + } - /** - * testCommandeFournisseurDelete - * - * @param int $id Id of order - * @return int Result of delete - * - * @depends testCommandeFournisseurOther - * The depends says test is run only if previous is ok - */ - public function testCommandeFournisseurDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFournisseurDelete + * + * @param int $id Id of order + * @return int Result of delete + * + * @depends testCommandeFournisseurOther + * The depends says test is run only if previous is ok + */ + public function testCommandeFournisseurDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new CommandeFournisseur($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new CommandeFournisseur($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index 1decbe4e201..4ab81d63524 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,260 +46,262 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CommandeTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CommandeTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CommandeTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (empty($conf->commande->enabled)) { print __METHOD__." module customer order must be enabled.\n"; die(); } + if (empty($conf->commande->enabled)) { + print __METHOD__." module customer order must be enabled.\n"; die(); + } - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - //print $db->getVersion()."\n"; - } + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testCommandeCreate - * - * @return void - */ - public function testCommandeCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeCreate + * + * @return void + */ + public function testCommandeCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new Commande($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testCommandeFetch - * - * @param int $id Id order - * @return Commande - * - * @depends testCommandeCreate - * The depends says test is run only if previous is ok - */ - public function testCommandeFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeFetch + * + * @param int $id Id order + * @return Commande + * + * @depends testCommandeCreate + * The depends says test is run only if previous is ok + */ + public function testCommandeFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Commande($this->savdb); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testCommandeUpdate - * - * @param Object $localobject Commande - * @return Commande - * - * @depends testCommandeFetch - * The depends says test is run only if previous is ok - */ - public function testCommandeUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeUpdate + * + * @param Commande $localobject Commande + * @return Commande + * + * @depends testCommandeFetch + * The depends says test is run only if previous is ok + */ + public function testCommandeUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->note_private='New note private after update'; - $result=$localobject->update($user); + $localobject->note_private='New note private after update'; + $result=$localobject->update($user); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject; + } - /** - * testCommandeValid - * - * @param Object $localobject Order - * @return Commande - * - * @depends testCommandeUpdate - * The depends says test is run only if previous is ok - */ - public function testCommandeValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeValid + * + * @param Commande $localobject Order + * @return Commande + * + * @depends testCommandeUpdate + * The depends says test is run only if previous is ok + */ + public function testCommandeValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->valid($user); + $result=$localobject->valid($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCommandeCancel - * - * @param Object $localobject Order - * @return Commande - * - * @depends testCommandeValid - * The depends says test is run only if previous is ok - */ - public function testCommandeCancel($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeCancel + * + * @param Commande $localobject Order + * @return Commande + * + * @depends testCommandeValid + * The depends says test is run only if previous is ok + */ + public function testCommandeCancel($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->cancel(); + $result=$localobject->cancel(); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCommandeOther - * - * @param Object $localobject Order - * @return int Order id - * - * @depends testCommandeCancel - * The depends says test is run only if previous is ok - */ - public function testCommandeOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeOther + * + * @param Commande $localobject Order + * @return int Order id + * + * @depends testCommandeCancel + * The depends says test is run only if previous is ok + */ + public function testCommandeOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testCommandeDelete - * - * @param int $id Id of order - * @return void - * - * @depends testCommandeOther - * The depends says test is run only if previous is ok - */ - public function testCommandeDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCommandeDelete + * + * @param int $id Id of order + * @return void + * + * @depends testCommandeOther + * The depends says test is run only if previous is ok + */ + public function testCommandeDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new Commande($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index 5e9c45825ec..f4cfaefb809 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -17,7 +17,7 @@ */ /** - * \file test/phpunit/CommonObjectTest.php + * \file test/phpunit/CommonInvoiceTest.php * \ingroup test * \brief PHPUnit test * \remarks To run this script as CLI: phpunit filename.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,110 +46,110 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CommonInvoiceTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CommonObjectTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CommonObjectTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFetchUser - * - * @return void - */ - public function testCalculateDateLimReglement() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFetchUser + * + * @return void + */ + public function testCalculateDateLimReglement() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Facture($this->savdb); - $localobject->fetch(1); - $localobject->date = dol_mktime(12, 0, 0, 1, 1, 2010); + $localobject=new Facture($this->savdb); + $localobject->fetch(1); + $localobject->date = dol_mktime(12, 0, 0, 1, 1, 2010); - $result = 0; + $result = 0; - // TODO Insert payment terms + // TODO Insert payment terms - //$result=$localobject->calculate_date_lim_reglement(1); - //print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 0); - return $result; - } + //$result=$localobject->calculate_date_lim_reglement(1); + //print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 0); + return $result; + } } diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index 6c68423e8a9..7a01f750eef 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php' require_once dirname(__FILE__).'/../../htdocs/projet/class/project.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -47,150 +47,150 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CommonObjectTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CommonObjectTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CommonObjectTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFetchUser - * - * @return void - */ - public function testFetchUser() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFetchUser + * + * @return void + */ + public function testFetchUser() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $localobject->fetch(1); + $localobject=new Commande($this->savdb); + $localobject->fetch(1); - $result=$localobject->fetch_user(1); + $result=$localobject->fetch_user(1); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($localobject->user->id, 0); - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($localobject->user->id, 0); + return $result; + } - /** - * testFetchProjet - * - * @return void - */ - public function testFetchProjet() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFetchProjet + * + * @return void + */ + public function testFetchProjet() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $localobject->fetch(1); - $result=$localobject->fetch_projet(); + $localobject=new Commande($this->savdb); + $localobject->fetch(1); + $result=$localobject->fetch_projet(); - print __METHOD__." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0); - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0); + return $result; + } - /** - * testFetchThirdParty - * - * @return void - */ - public function testFetchThirdParty() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFetchThirdParty + * + * @return void + */ + public function testFetchThirdParty() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Commande($this->savdb); - $localobject->fetch(1); + $localobject=new Commande($this->savdb); + $localobject->fetch(1); - $result=$localobject->fetch_thirdparty(); + $result=$localobject->fetch_thirdparty(); - print __METHOD__." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0); - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0); + return $result; + } } diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 1979f89fabb..8b78712209f 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/societe/class/companybankaccount.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,40 +73,40 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -115,132 +114,132 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; //print $db->getVersion()."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testCompanyBankAccountCreate - * - * @return int - */ - public function testCompanyBankAccountCreate() - { - global $conf,$user,$langs,$db; + /** + * testCompanyBankAccountCreate + * + * @return int + */ + public function testCompanyBankAccountCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new CompanyBankAccount($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result." id=".$localobject->id."\n"; - $this->assertLessThan($result, 0); - return $localobject->id; - } + print __METHOD__." result=".$result." id=".$localobject->id."\n"; + $this->assertLessThan($result, 0); + return $localobject->id; + } - /** - * testCompanyBankAccountFetch - * - * @param int $id Id of bank account - * @return Object Bank account object - * - * @depends testCompanyBankAccountCreate - * The depends says test is run only if previous is ok - */ - public function testCompanyBankAccountFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testCompanyBankAccountFetch + * + * @param int $id Id of bank account + * @return CompanyBankAccount Bank account object + * + * @depends testCompanyBankAccountCreate + * The depends says test is run only if previous is ok + */ + public function testCompanyBankAccountFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new CompanyBankAccount($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCompanyBankAccountSetAsDefault - * - * @param Object $localobject Bank account - * @return int - * - * @depends testCompanyBankAccountFetch - */ - public function testCompanyBankAccountSetAsDefault($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCompanyBankAccountSetAsDefault + * + * @param CompanyBankAccount $localobject Bank account + * @return int + * + * @depends testCompanyBankAccountFetch + */ + public function testCompanyBankAccountSetAsDefault($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->setAsDefault($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $result=$localobject->setAsDefault($localobject->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCompanyBankAccountUpdate - * - * @param Object $localobject Bank account object - * @return int - * - * @depends testCompanyBankAccountFetch - * The depends says test is run only if previous is ok - */ - public function testCompanyBankAccountUpdate($localobject) - { - global $conf,$user,$langs,$db; + /** + * testCompanyBankAccountUpdate + * + * @param CompanyBankAccount $localobject Bank account object + * @return int + * + * @depends testCompanyBankAccountFetch + * The depends says test is run only if previous is ok + */ + public function testCompanyBankAccountUpdate($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject->owner='New owner'; - $result=$localobject->update($user); + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testCompanyBankAccountOther - * - * @param Object $localobject Bank account - * @return int - * - * @depends testCompanyBankAccountFetch - * The depends says test is run only if previous is ok - */ - public function testCompanyBankAccountOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testCompanyBankAccountOther + * + * @param CompanyBankAccount $localobject Bank account + * @return int + * + * @depends testCompanyBankAccountFetch + * The depends says test is run only if previous is ok + */ + public function testCompanyBankAccountOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->owner='New owner'; - $result=$localobject->update($user); + $localobject->owner='New owner'; + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject->id; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject->id; + } } diff --git a/test/phpunit/CompanyLibTest.php b/test/phpunit/CompanyLibTest.php index ab9eb414634..a2a83ee70a7 100644 --- a/test/phpunit/CompanyLibTest.php +++ b/test/phpunit/CompanyLibTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/company.lib.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,108 +46,108 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class CompanyLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return AdminLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return AdminLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testNameCurrency - * - * @return void - */ - public function testNameCurrency() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testNameCurrency + * + * @return void + */ + public function testNameCurrency() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=currency_name('USD'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('US Dollars', $result, 'Test to get currency name USD in default language '.$langs->defaultlang); + $result=currency_name('USD'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('US Dollars', $result, 'Test to get currency name USD in default language '.$langs->defaultlang); - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('fr_FR'); + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('fr_FR'); - $result=currency_name('USD', 1, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('USD - Dollars US', $result, 'Test to get currency name USD in default language '.$outputlangs->getDefaultLang()); + $result=currency_name('USD', 1, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('USD - Dollars US', $result, 'Test to get currency name USD in default language '.$outputlangs->getDefaultLang()); - return $result; - } + return $result; + } } diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 7d7e2740bc1..1f8977f6919 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -30,14 +30,12 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/contact/class/contact.class.php'; $langs->load("dict"); -if ($langs->defaultlang != 'en_US') -{ +if ($langs->defaultlang != 'en_US') { print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n"; exit(1); } -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -82,118 +80,118 @@ class ContactTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testContactCreate - * - * @return int - */ - public function testContactCreate() - { - global $conf,$user,$langs,$db; + /** + * testContactCreate + * + * @return int + */ + public function testContactCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Contact($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testContactFetch - * - * @param int $id Id of contact - * @return int - * @depends testContactCreate - * The depends says test is run only if previous is ok - */ - public function testContactFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testContactFetch + * + * @param int $id Id of contact + * @return int + * @depends testContactCreate + * The depends says test is run only if previous is ok + */ + public function testContactFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Contact($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testContactUpdate - * - * @param Contact $localobject Contact - * @return int - * - * @depends testContactFetch - * The depends says test is run only if previous is ok - */ - public function testContactUpdate($localobject) - { - global $conf,$user,$langs,$db; + /** + * testContactUpdate + * + * @param Contact $localobject Contact + * @return int + * + * @depends testContactFetch + * The depends says test is run only if previous is ok + */ + public function testContactUpdate($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -208,8 +206,8 @@ class ContactTest extends PHPUnit\Framework\TestCase $localobject->address='New address'; $localobject->zip='New zip'; $localobject->town='New town'; - $localobject->country_id=2; - //$localobject->status=0; + $localobject->country_id=2; + //$localobject->status=0; $localobject->phone_pro='New tel pro'; $localobject->phone_perso='New tel perso'; $localobject->phone_mobile='New tel mobile'; @@ -219,8 +217,8 @@ class ContactTest extends PHPUnit\Framework\TestCase $localobject->default_lang='es_ES'; $result=$localobject->update($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Contact::update error'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Contact::update error'); $result=$localobject->update_note($localobject->note_private, '_private'); print __METHOD__." id=".$localobject->id." result=".$result."\n"; @@ -231,60 +229,60 @@ class ContactTest extends PHPUnit\Framework\TestCase $this->assertLessThan($result, 0, 'Contact::update_note (public) error'); $newobject=new Contact($this->savdb); - $result=$newobject->fetch($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Contact::fetch error'); + $result=$newobject->fetch($localobject->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Contact::fetch error'); - print __METHOD__." old=".$localobject->note_private." new=".$newobject->note_private."\n"; - $this->assertEquals($localobject->note_private, $newobject->note_private); - //print __METHOD__." old=".$localobject->note_public." new=".$newobject->note_public."\n"; - //$this->assertEquals($localobject->note_public, $newobject->note_public); - print __METHOD__." old=".$localobject->lastname." new=".$newobject->lastname."\n"; - $this->assertEquals($localobject->lastname, $newobject->lastname); - print __METHOD__." old=".$localobject->firstname." new=".$newobject->firstname."\n"; - $this->assertEquals($localobject->firstname, $newobject->firstname); - print __METHOD__." old=".$localobject->address." new=".$newobject->address."\n"; - $this->assertEquals($localobject->address, $newobject->address); - print __METHOD__." old=".$localobject->zip." new=".$newobject->zip."\n"; - $this->assertEquals($localobject->zip, $newobject->zip); - print __METHOD__." old=".$localobject->town." new=".$newobject->town."\n"; - $this->assertEquals($localobject->town, $newobject->town); - print __METHOD__." old=".$localobject->country_id." new=".$newobject->country_id."\n"; - $this->assertEquals($localobject->country_id, $newobject->country_id); - print __METHOD__." old=BE new=".$newobject->country_code."\n"; - $this->assertEquals('BE', $newobject->country_code); - //print __METHOD__." old=".$localobject->status." new=".$newobject->status."\n"; - //$this->assertEquals($localobject->status, $newobject->status); - print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n"; - $this->assertEquals($localobject->phone_pro, $newobject->phone_pro); - print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n"; - $this->assertEquals($localobject->phone_perso, $newobject->phone_perso); - print __METHOD__." old=".$localobject->phone_mobile." new=".$newobject->phone_mobile."\n"; - $this->assertEquals($localobject->phone_mobile, $newobject->phone_mobile); - print __METHOD__." old=".$localobject->fax." new=".$newobject->fax."\n"; - $this->assertEquals($localobject->fax, $newobject->fax); - print __METHOD__." old=".$localobject->email." new=".$newobject->email."\n"; - $this->assertEquals($localobject->email, $newobject->email); - print __METHOD__." old=".$localobject->socialnetworks['jabber']." new=".$newobject->socialnetworks['jabber']."\n"; - $this->assertEquals($localobject->socialnetworks['jabber'], $newobject->socialnetworks['jabber']); - print __METHOD__." old=".$localobject->default_lang." new=".$newobject->default_lang."\n"; - $this->assertEquals($localobject->default_lang, $newobject->default_lang); + print __METHOD__." old=".$localobject->note_private." new=".$newobject->note_private."\n"; + $this->assertEquals($localobject->note_private, $newobject->note_private); + //print __METHOD__." old=".$localobject->note_public." new=".$newobject->note_public."\n"; + //$this->assertEquals($localobject->note_public, $newobject->note_public); + print __METHOD__." old=".$localobject->lastname." new=".$newobject->lastname."\n"; + $this->assertEquals($localobject->lastname, $newobject->lastname); + print __METHOD__." old=".$localobject->firstname." new=".$newobject->firstname."\n"; + $this->assertEquals($localobject->firstname, $newobject->firstname); + print __METHOD__." old=".$localobject->address." new=".$newobject->address."\n"; + $this->assertEquals($localobject->address, $newobject->address); + print __METHOD__." old=".$localobject->zip." new=".$newobject->zip."\n"; + $this->assertEquals($localobject->zip, $newobject->zip); + print __METHOD__." old=".$localobject->town." new=".$newobject->town."\n"; + $this->assertEquals($localobject->town, $newobject->town); + print __METHOD__." old=".$localobject->country_id." new=".$newobject->country_id."\n"; + $this->assertEquals($localobject->country_id, $newobject->country_id); + print __METHOD__." old=BE new=".$newobject->country_code."\n"; + $this->assertEquals('BE', $newobject->country_code); + //print __METHOD__." old=".$localobject->status." new=".$newobject->status."\n"; + //$this->assertEquals($localobject->status, $newobject->status); + print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n"; + $this->assertEquals($localobject->phone_pro, $newobject->phone_pro); + print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n"; + $this->assertEquals($localobject->phone_perso, $newobject->phone_perso); + print __METHOD__." old=".$localobject->phone_mobile." new=".$newobject->phone_mobile."\n"; + $this->assertEquals($localobject->phone_mobile, $newobject->phone_mobile); + print __METHOD__." old=".$localobject->fax." new=".$newobject->fax."\n"; + $this->assertEquals($localobject->fax, $newobject->fax); + print __METHOD__." old=".$localobject->email." new=".$newobject->email."\n"; + $this->assertEquals($localobject->email, $newobject->email); + print __METHOD__." old=".$localobject->socialnetworks['jabber']." new=".$newobject->socialnetworks['jabber']."\n"; + $this->assertEquals($localobject->socialnetworks['jabber'], $newobject->socialnetworks['jabber']); + print __METHOD__." old=".$localobject->default_lang." new=".$newobject->default_lang."\n"; + $this->assertEquals($localobject->default_lang, $newobject->default_lang); - return $localobject; - } + return $localobject; + } - /** - * testContactOther - * - * @param Contact $localobject Contact - * @return void - * - * @depends testContactUpdate - * The depends says test is run only if previous is ok - */ - public function testContactOther($localobject) - { - global $conf,$user,$langs,$db; + /** + * testContactOther + * + * @param Contact $localobject Contact + * @return void + * + * @depends testContactUpdate + * The depends says test is run only if previous is ok + */ + public function testContactOther($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -292,108 +290,108 @@ class ContactTest extends PHPUnit\Framework\TestCase //$localobject->fetch($localobject->id); - $result=$localobject->getNomUrl(1); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertNotEquals($result, ''); + $result=$localobject->getNomUrl(1); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertNotEquals($result, ''); - $result=$localobject->getFullAddress(1); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nBelgium", $result); + $result=$localobject->getFullAddress(1); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nBelgium", $result); - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testContactDelete - * - * @param int $id Id of contact - * @return void - * - * @depends testContactOther - * The depends says test is run only if previous is ok - */ - public function testContactDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testContactDelete + * + * @param int $id Id of contact + * @return void + * + * @depends testContactOther + * The depends says test is run only if previous is ok + */ + public function testContactDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Contact($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $result=$localobject->delete(0); + $result=$localobject->delete(0); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testContactGetFullAddress - * - * @return int $id Id of company - */ - public function testContactGetFullAddress() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContactGetFullAddress + * + * @return int $id Id of company + */ + public function testContactGetFullAddress() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobjectadd=new Contact($db); - $localobjectadd->initAsSpecimen(); + $localobjectadd=new Contact($db); + $localobjectadd->initAsSpecimen(); - // France - unset($localobjectadd->country_code); - $localobjectadd->country_id=1; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nFrance", $result); + // France + unset($localobjectadd->country_code); + $localobjectadd->country_id=1; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nFrance", $result); - // Belgium - unset($localobjectadd->country_code); - $localobjectadd->country_id=2; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nBelgium", $result); + // Belgium + unset($localobjectadd->country_code); + $localobjectadd->country_id=2; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nBelgium", $result); - // Switzerland - unset($localobjectadd->country_code); - $localobjectadd->country_id=6; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nSwitzerland", $result); + // Switzerland + unset($localobjectadd->country_code); + $localobjectadd->country_id=6; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nSwitzerland", $result); - // USA - unset($localobjectadd->country_code); - $localobjectadd->country_id=11; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew town, New zip\nUnited States", $result); + // USA + unset($localobjectadd->country_code); + $localobjectadd->country_id=11; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew town, New zip\nUnited States", $result); - return $localobjectadd->id; - } + return $localobjectadd->id; + } } diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index d364d6c9dff..cd21427eba7 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -29,11 +29,10 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/contrat/class/contrat.class.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -47,185 +46,185 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class ContratTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return ContratTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return ContratTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testContratCreate - * - * @return int - */ - public function testContratCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContratCreate + * + * @return int + */ + public function testContratCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Contrat($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new Contrat($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testContratFetch - * - * @param int $id Id of contract - * @return int - * - * @depends testContratCreate - * The depends says test is run only if previous is ok - */ - public function testContratFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContratFetch + * + * @param int $id Id of contract + * @return int + * + * @depends testContratCreate + * The depends says test is run only if previous is ok + */ + public function testContratFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Contrat($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Contrat($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testContratOther - * - * @param Object $localobject Object contract - * @return int - * - * @depends testContratFetch - * The depends says test is run only if previous is ok - */ - public function testContratOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContratOther + * + * @param Contract $localobject Object contract + * @return int + * + * @depends testContratFetch + * The depends says test is run only if previous is ok + */ + public function testContratOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testContratDelete - * - * @param int $id Id of contract - * @return int - * - * @depends testContratOther - * The depends says test is run only if previous is ok - */ - public function testContratDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContratDelete + * + * @param int $id Id of contract + * @return int + * + * @depends testContratOther + * The depends says test is run only if previous is ok + */ + public function testContratDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Contrat($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new Contrat($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 22649a80724..87f3a3940f4 100644 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -28,16 +28,36 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; //require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** @@ -49,191 +69,190 @@ if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page i */ class CoreTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CoreTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CoreTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + //print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - //$db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + //$db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testDetectURLROOT - * - * @return void - */ - public function testDetectURLROOT() - { - global $dolibarr_main_prod; + /** + * testDetectURLROOT + * + * @return void + */ + public function testDetectURLROOT() + { + global $dolibarr_main_prod; - global $dolibarr_main_url_root; - global $dolibarr_main_data_root; - global $dolibarr_main_document_root; - global $dolibarr_main_data_root_alt; - global $dolibarr_main_document_root_alt; - global $dolibarr_main_db_host; - global $dolibarr_main_db_port; - global $dolibarr_main_db_type; - global $dolibarr_main_db_prefix; + global $dolibarr_main_url_root; + global $dolibarr_main_data_root; + global $dolibarr_main_document_root; + global $dolibarr_main_data_root_alt; + global $dolibarr_main_document_root_alt; + global $dolibarr_main_db_host; + global $dolibarr_main_db_port; + global $dolibarr_main_db_type; + global $dolibarr_main_db_prefix; - $testtodo=0; + $testtodo=0; - // Case 1: - // Test for subdir dolibarrnew (that point to htdocs) in root directory /var/www - // URL: http://localhost/dolibarrnew/admin/system/phpinfo.php - // To prepare this test: - // - Create link from htdocs to /var/www/dolibarrnew - // - Put into conf.php $dolibarr_main_document_root='/var/www/dolibarrnew'; - if ($testtodo == 1) { - $_SERVER["HTTPS"]=''; - $_SERVER["SERVER_NAME"]='localhost'; - $_SERVER["SERVER_PORT"]='80'; - $_SERVER["DOCUMENT_ROOT"]='/var/www'; - $_SERVER["SCRIPT_NAME"]='/dolibarrnew/admin/system/phpinfo.php'; - $expectedresult='/dolibarrnew'; - } + // Case 1: + // Test for subdir dolibarrnew (that point to htdocs) in root directory /var/www + // URL: http://localhost/dolibarrnew/admin/system/phpinfo.php + // To prepare this test: + // - Create link from htdocs to /var/www/dolibarrnew + // - Put into conf.php $dolibarr_main_document_root='/var/www/dolibarrnew'; + if ($testtodo == 1) { + $_SERVER["HTTPS"]=''; + $_SERVER["SERVER_NAME"]='localhost'; + $_SERVER["SERVER_PORT"]='80'; + $_SERVER["DOCUMENT_ROOT"]='/var/www'; + $_SERVER["SCRIPT_NAME"]='/dolibarrnew/admin/system/phpinfo.php'; + $expectedresult='/dolibarrnew'; + } - // Case 2: - // Test for subdir aaa (that point to dolibarr) in root directory /var/www - // URL: http://localhost/aaa/htdocs/admin/system/phpinfo.php - // To prepare this test: - // - Create link from dolibarr to /var/www/aaa - // - Put into conf.php $dolibarr_main_document_root='/var/www/aaa/htdocs'; - if ($testtodo == 2) { - $_SERVER["HTTPS"]=''; - $_SERVER["SERVER_NAME"]='localhost'; - $_SERVER["SERVER_PORT"]='80'; - $_SERVER["DOCUMENT_ROOT"]='/var/www'; - $_SERVER["SCRIPT_NAME"]='/aaa/htdocs/admin/system/phpinfo.php'; - $expectedresult='/aaa/htdocs'; - } + // Case 2: + // Test for subdir aaa (that point to dolibarr) in root directory /var/www + // URL: http://localhost/aaa/htdocs/admin/system/phpinfo.php + // To prepare this test: + // - Create link from dolibarr to /var/www/aaa + // - Put into conf.php $dolibarr_main_document_root='/var/www/aaa/htdocs'; + if ($testtodo == 2) { + $_SERVER["HTTPS"]=''; + $_SERVER["SERVER_NAME"]='localhost'; + $_SERVER["SERVER_PORT"]='80'; + $_SERVER["DOCUMENT_ROOT"]='/var/www'; + $_SERVER["SCRIPT_NAME"]='/aaa/htdocs/admin/system/phpinfo.php'; + $expectedresult='/aaa/htdocs'; + } - // Case 3: - // Test for virtual host localhostdolibarrnew that point to htdocs directory with - // a direct document root - // URL: http://localhostdolibarrnew/admin/system/phpinfo.php - // To prepare this test: - // - Create virtual host localhostdolibarrnew that point to /home/ldestailleur/git/dolibarr/htdocs - // - Put into conf.php $dolibarr_main_document_root='/home/ldestailleur/git/dolibarr/htdocs'; - if ($testtodo == 3) { - $_SERVER["HTTPS"]=''; - $_SERVER["SERVER_NAME"]='localhostdolibarrnew'; - $_SERVER["SERVER_PORT"]='80'; - $_SERVER["DOCUMENT_ROOT"]='/home/ldestailleur/git/dolibarr/htdocs'; - $_SERVER["SCRIPT_NAME"]='/admin/system/phpinfo.php'; - $expectedresult=''; - } + // Case 3: + // Test for virtual host localhostdolibarrnew that point to htdocs directory with + // a direct document root + // URL: http://localhostdolibarrnew/admin/system/phpinfo.php + // To prepare this test: + // - Create virtual host localhostdolibarrnew that point to /home/ldestailleur/git/dolibarr/htdocs + // - Put into conf.php $dolibarr_main_document_root='/home/ldestailleur/git/dolibarr/htdocs'; + if ($testtodo == 3) { + $_SERVER["HTTPS"]=''; + $_SERVER["SERVER_NAME"]='localhostdolibarrnew'; + $_SERVER["SERVER_PORT"]='80'; + $_SERVER["DOCUMENT_ROOT"]='/home/ldestailleur/git/dolibarr/htdocs'; + $_SERVER["SCRIPT_NAME"]='/admin/system/phpinfo.php'; + $expectedresult=''; + } - // Case 4: - // Test for virtual host localhostdolibarrnew that point to htdocs directory with - // a symbolic link - // URL: http://localhostdolibarrnew/admin/system/phpinfo.php - if ($testtodo == 4) { - $_SERVER["HTTPS"]=''; - $_SERVER["SERVER_NAME"]='localhostdolibarrnew'; - $_SERVER["SERVER_PORT"]='80'; - $_SERVER["DOCUMENT_ROOT"]='/var/www/dolibarr'; // This is a link that point to /home/ldestail/workspace/dolibarr/htdocs - $_SERVER["SCRIPT_NAME"]='/admin/system/phpinfo.php'; - $expectedresult=''; - } + // Case 4: + // Test for virtual host localhostdolibarrnew that point to htdocs directory with + // a symbolic link + // URL: http://localhostdolibarrnew/admin/system/phpinfo.php + if ($testtodo == 4) { + $_SERVER["HTTPS"]=''; + $_SERVER["SERVER_NAME"]='localhostdolibarrnew'; + $_SERVER["SERVER_PORT"]='80'; + $_SERVER["DOCUMENT_ROOT"]='/var/www/dolibarr'; // This is a link that point to /home/ldestail/workspace/dolibarr/htdocs + $_SERVER["SCRIPT_NAME"]='/admin/system/phpinfo.php'; + $expectedresult=''; + } - // Case 5: - // Test for alias /dolibarralias, Test when using nginx, Test when using lighttpd - // URL: http://localhost/dolibarralias/admin/system/phpinfo.php - // To prepare this test: - // - Copy content of dolibarr project into /var/www/dolibarr - // - Put into conf.php $dolibarr_main_document_root='/var/www/dolibarr/htdocs'; - // - Put into conf.php $dolibarr_main_url_root='http://localhost/dolibarralias'; (because autodetect will fails in this case) - if ($testtodo == 5) { - $_SERVER["HTTPS"]=''; - $_SERVER["SERVER_NAME"]='localhost'; - $_SERVER["SERVER_PORT"]='80'; - $_SERVER["DOCUMENT_ROOT"]='/var/www'; - $_SERVER["SCRIPT_NAME"]='/dolibarralias/admin/system/phpinfo.php'; - $expectedresult='/dolibarralias'; - } + // Case 5: + // Test for alias /dolibarralias, Test when using nginx, Test when using lighttpd + // URL: http://localhost/dolibarralias/admin/system/phpinfo.php + // To prepare this test: + // - Copy content of dolibarr project into /var/www/dolibarr + // - Put into conf.php $dolibarr_main_document_root='/var/www/dolibarr/htdocs'; + // - Put into conf.php $dolibarr_main_url_root='http://localhost/dolibarralias'; (because autodetect will fails in this case) + if ($testtodo == 5) { + $_SERVER["HTTPS"]=''; + $_SERVER["SERVER_NAME"]='localhost'; + $_SERVER["SERVER_PORT"]='80'; + $_SERVER["DOCUMENT_ROOT"]='/var/www'; + $_SERVER["SCRIPT_NAME"]='/dolibarralias/admin/system/phpinfo.php'; + $expectedresult='/dolibarralias'; + } - // Force to rerun filefunc.inc.php - include dirname(__FILE__).'/../../htdocs/filefunc.inc.php'; + // Force to rerun filefunc.inc.php + include dirname(__FILE__).'/../../htdocs/filefunc.inc.php'; - if ($testtodo != 0) - { - print __METHOD__." DOL_MAIN_URL_ROOT=".DOL_MAIN_URL_ROOT."\n"; - print __METHOD__." DOL_URL_ROOT=".DOL_URL_ROOT."\n"; - $this->assertEquals($expectedresult, DOL_URL_ROOT); - } + if ($testtodo != 0) { + print __METHOD__." DOL_MAIN_URL_ROOT=".DOL_MAIN_URL_ROOT."\n"; + print __METHOD__." DOL_URL_ROOT=".DOL_URL_ROOT."\n"; + $this->assertEquals($expectedresult, DOL_URL_ROOT); + } - return true; - } + return true; + } } diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index c9ed3be64aa..78f5b36da49 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -29,14 +29,17 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; -if (empty($user->id)) -{ +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; +print "\n".$langs->trans("CurrentTimeZone").' : '.getServerTimeZoneString(); +print "\n".$langs->trans("CurrentHour").' : '.dol_print_date(dol_now('gmt'), 'dayhour', 'tzserver'); +print "\n"; + /** * Class for PHPUnit tests @@ -73,72 +76,69 @@ class DateLibTest extends PHPUnit\Framework\TestCase print __METHOD__." db->type=".$db->type." user->id=".$user->id; - print "\n".$langs->trans("CurrentTimeZone").' : '.getServerTimeZoneString(); - print "\n".$langs->trans("CurrentHour").' : '.dol_print_date(dol_now('gmt'), 'dayhour', 'tzserver'); - //print " - db ".$db->db; print "\n"; } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testNumBetweenDay - * - * @return void - */ - public function testNumBetweenDay() - { - global $conf,$user,$langs,$db; + /** + * testNumBetweenDay + * + * @return void + */ + public function testNumBetweenDay() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -149,11 +149,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase $date2=dol_mktime(0, 0, 0, 1, 2, 2012, 'gmt'); $result=num_between_day($date1, $date2, 1); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(2, $result); $result=num_between_day($date1, $date2, 0); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(1, $result); // With different hours @@ -161,11 +161,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase $date2=dol_mktime(12, 0, 0, 1, 2, 2012, 'gmt'); $result=num_between_day($date1, $date2, 1); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(2, $result); $result=num_between_day($date1, $date2, 0); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(1, $result); // With different date before and after sunlight hour (day to change sunlight hour is 2014-03-30) @@ -173,28 +173,28 @@ class DateLibTest extends PHPUnit\Framework\TestCase $date2=dol_mktime(0, 0, 0, 3, 31, 2014, true); $result=num_between_day($date1, $date2, 1); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(4, $result); $result=num_between_day($date1, $date2, 0); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(3, $result); return $result; - } + } - /** - * testNumPublicHoliday - * - * @return void - */ - public function testNumPublicHoliday() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testNumPublicHoliday + * + * @return void + */ + public function testNumPublicHoliday() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; // With same hours - Tuesday/Wednesday jan 2013 $date1=dol_mktime(0, 0, 0, 1, 1, 2013, 'gmt'); @@ -218,232 +218,232 @@ class DateLibTest extends PHPUnit\Framework\TestCase $date1=dol_mktime(0, 0, 0, 4, 21, 2019, 'gmt'); $date2=dol_mktime(0, 0, 0, 4, 23, 2019, 'gmt'); - $result=num_public_holiday($date1, $date2, 'XX', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumPublicHoliday including eastermonday for XX'); // 2 opened day, 1 closed days (sunday) + $result=num_public_holiday($date1, $date2, 'XX', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumPublicHoliday including eastermonday for XX'); // 2 opened day, 1 closed days (sunday) - $result=num_public_holiday($date1, $date2, 'FR', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(2, $result, 'NumPublicHoliday including eastermonday for FR'); // 1 opened day, 2 closed days (sunday + easter monday) + $result=num_public_holiday($date1, $date2, 'FR', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(2, $result, 'NumPublicHoliday including eastermonday for FR'); // 1 opened day, 2 closed days (sunday + easter monday) // Check for sunday/saturday - Friday 4 - Sunday 6 jan 2013 $date1=dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt'); $date2=dol_mktime(0, 0, 0, 1, 6, 2013, 'gmt'); - $result=num_public_holiday($date1, $date2, 'FR', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days + $result=num_public_holiday($date1, $date2, 'FR', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days - $result=num_public_holiday($date1, $date2, 'FR', 1, 1, 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days + $result=num_public_holiday($date1, $date2, 'FR', 1, 1, 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(2, $result, 'NumPublicHoliday for FR'); // 1 opened day, 2 closed days - $result=num_public_holiday($date1, $date2, 'FR', 1, 1, 0); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumPublicHoliday for FR'); // 2 opened day, 1 closed days + $result=num_public_holiday($date1, $date2, 'FR', 1, 1, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumPublicHoliday for FR'); // 2 opened day, 1 closed days - $result=num_public_holiday($date1, $date2, 'FR', 1, 0, 0); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result, 'NumPublicHoliday for FR'); // 3 opened day, 0 closed days + $result=num_public_holiday($date1, $date2, 'FR', 1, 0, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0, $result, 'NumPublicHoliday for FR'); // 3 opened day, 0 closed days - $result=num_public_holiday($date1, $date2, 'XX', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(2, $result, 'NumPublicHoliday for XX'); // 1 opened day, 2 closed days (even if country unknown) - } + $result=num_public_holiday($date1, $date2, 'XX', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(2, $result, 'NumPublicHoliday for XX'); // 1 opened day, 2 closed days (even if country unknown) + } - /** - * testNumOpenDay - * - * @return void - */ - public function testNumOpenDay() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testNumOpenDay + * + * @return void + */ + public function testNumOpenDay() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; // With same hours - Tuesday/Wednesday jan 2013 $date1=dol_mktime(0, 0, 0, 1, 1, 2013, 'gmt'); $date2=dol_mktime(0, 0, 0, 1, 2, 2013, 'gmt'); $date3=dol_mktime(0, 0, 0, 1, 3, 2013, 'gmt'); - $result=num_open_day($date1, $date2, 0, 1, 0, 'FR'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 opened days (country france) + $result=num_open_day($date1, $date2, 0, 1, 0, 'FR'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 opened days (country france) - $result=num_open_day($date1, $date2, 0, 1, 0, 'XX'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 opened days (country unknown) + $result=num_open_day($date1, $date2, 0, 1, 0, 'XX'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumOpenDay Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 opened days (country unknown) - $result=num_open_day($date2, $date3, 0, 1, 0, 'FR'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(2, $result, 'NumOpenDay Wednesday 2 - Thursday 3 jan 2013 for FR'); // 2 opened days + $result=num_open_day($date2, $date3, 0, 1, 0, 'FR'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(2, $result, 'NumOpenDay Wednesday 2 - Thursday 3 jan 2013 for FR'); // 2 opened days // With same hours - Friday/Sunday jan 2013 $date1=dol_mktime(0, 0, 0, 1, 4, 2013, 'gmt'); $date2=dol_mktime(0, 0, 0, 1, 6, 2013, 'gmt'); - $result=num_open_day($date1, $date2, 0, 1, 0, 'FR'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumOpenDay for FR'); // 1 opened day, 2 closed + $result=num_open_day($date1, $date2, 0, 1, 0, 'FR'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumOpenDay for FR'); // 1 opened day, 2 closed - $result=num_open_day($date1, $date2, 'XX', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumOpenDay for XX'); // 1 opened day, 2 closes (even if country unknown) - } + $result=num_open_day($date1, $date2, 'XX', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result, 'NumOpenDay for XX'); // 1 opened day, 2 closes (even if country unknown) + } - /** - * testConvertTime2Seconds - * - * @return void - */ - public function testConvertTime2Seconds() - { - global $conf,$user,$langs,$db; + /** + * testConvertTime2Seconds + * + * @return void + */ + public function testConvertTime2Seconds() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $result=convertTime2Seconds(1, 1, 2); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(3662, $result); return $result; - } + } - /** - * testConvertSecondToTime - * - * @return void - */ - public function testConvertSecondToTime() - { - global $conf,$user,$langs,$db; + /** + * testConvertSecondToTime + * + * @return void + */ + public function testConvertSecondToTime() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $result=convertSecondToTime(0, 'all', 86400); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals('0', $result); $result=convertSecondToTime(86400, 'all', 86400); - print __METHOD__." result=".$result."\n"; - $this->assertSame('1 '.$langs->trans("Day"), $result); + print __METHOD__." result=".$result."\n"; + $this->assertSame('1 '.strtolower(dol_substr($langs->trans("Day"), 0, 1).'.'), $result); return $result; - } + } - /** - * testDolPrintDate - * - * @return void - */ - public function testDolPrintDate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolPrintDate + * + * @return void + */ + public function testDolPrintDate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(0, '%Y-%m-%d %H:%M:%S', true); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1970-01-01 00:00:00', $result); + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(0, '%Y-%m-%d %H:%M:%S', true); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1970-01-01 00:00:00', $result); - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('2500-01-01 00:00:00', $result); + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('2500-01-01 00:00:00', $result); - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1912-01-01 00:00:00', $result); // dol_print_date use TZ (good) but epoch converter does not use it. + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1912-01-01 00:00:00', $result); // dol_print_date use TZ (good) but epoch converter does not use it. - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(-11676096000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1600-01-01 00:00:00', $result); + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(-11676096000, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1600-01-01 00:00:00', $result); - // test with negative timezone - $result=dol_print_date(-1, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1969-12-31 23:59:59', $result); + // test with negative timezone + $result=dol_print_date(-1, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1969-12-31 23:59:59', $result); - // Check dayhour format for fr_FR - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('fr_FR'); - $outputlangs->load("main"); + // Check dayhour format for fr_FR + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('fr_FR'); + $outputlangs->load("main"); - $result=dol_print_date(0+24*3600, 'dayhour', true, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('02/01/1970 00:00', $result); + $result=dol_print_date(0+24*3600, 'dayhour', true, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('02/01/1970 00:00', $result); - // Check %a and %b format for fr_FR - $result=dol_print_date(0, '%a %b %B', true, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('Jeu Jan. Janvier', $result); + // Check %a and %b format for fr_FR + $result=dol_print_date(0, '%a %b %B', true, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('Jeu Jan. Janvier', $result); - // Check day format for en_US - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('en_US'); - $outputlangs->load("main"); + // Check day format for en_US + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('en_US'); + $outputlangs->load("main"); - $result=dol_print_date(0+24*3600, 'day', true, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('01/02/1970', $result); + $result=dol_print_date(0+24*3600, 'day', true, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('01/02/1970', $result); - // Check %a and %b format for en_US - $result=dol_print_date(0, '%a %b %B', true, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu Jan January', $result); + // Check %a and %b format for en_US + $result=dol_print_date(0, '%a %b %B', true, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('Thu Jan January', $result); - return $result; - } + return $result; + } - /** - * testDolTimePlusDuree - * - * @return int - */ - public function testDolTimePlusDuree() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolTimePlusDuree + * + * @return int + */ + public function testDolTimePlusDuree() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Check dayhour format for fr_FR - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('fr_FR'); - $outputlangs->load("main"); + // Check dayhour format for fr_FR + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('fr_FR'); + $outputlangs->load("main"); - $result=dol_print_date(dol_time_plus_duree(dol_time_plus_duree(dol_time_plus_duree(0, 1, 'm'), 1, 'y'), 1, 'd'), 'dayhour', true, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('02/02/1971 00:00', $result); + $result=dol_print_date(dol_time_plus_duree(dol_time_plus_duree(dol_time_plus_duree(0, 1, 'm'), 1, 'y'), 1, 'd'), 'dayhour', true, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('02/02/1971 00:00', $result); - return $result; - } + return $result; + } - /** - * testDolStringToTime - * - * @return int - */ - public function testDolStringToTime() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolStringToTime + * + * @return int + */ + public function testDolStringToTime() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; $stime='19700102'; $result=dol_stringtotime($stime); @@ -451,18 +451,18 @@ class DateLibTest extends PHPUnit\Framework\TestCase $this->assertEquals(86400, $result); $stime='1970-01-01T02:00:00Z'; - $result=dol_stringtotime($stime); - print __METHOD__." result=".$result."\n"; + $result=dol_stringtotime($stime); + print __METHOD__." result=".$result."\n"; $this->assertEquals(7200, $result); - $stime='1970-01-01 02:00:00'; - $result=dol_stringtotime($stime); - print __METHOD__." result=".$result."\n"; + $stime='1970-01-01 02:00:00'; + $result=dol_stringtotime($stime); + print __METHOD__." result=".$result."\n"; $this->assertEquals(7200, $result); - $stime='19700101T020000Z'; - $result=dol_stringtotime($stime); - print __METHOD__." result=".$result."\n"; + $stime='19700101T020000Z'; + $result=dol_stringtotime($stime); + print __METHOD__." result=".$result."\n"; $this->assertEquals(7200, $result); $stime='19700101020000'; @@ -470,26 +470,51 @@ class DateLibTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals(7200, $result); - return $result; - } + return $result; + } - /** - * testDolGetFirstDayWeek - * - * @return int - */ - public function testDolGetFirstDayWeek() - { - global $conf; + /** + * testDolGetFirstDayWeek + * + * @return int + */ + public function testDolGetFirstDayWeek() + { + global $conf; - $day=3; $month=2; $year=2015; - $conf->global->MAIN_START_WEEK = 1; // start on monday - $prev = dol_get_first_day_week($day, $month, $year); + $day=3; $month=2; $year=2015; + $conf->global->MAIN_START_WEEK = 1; // start on monday + $prev = dol_get_first_day_week($day, $month, $year); $this->assertEquals(2, (int) $prev['first_day']); // monday for month 2, year 2014 is the 2 - $day=3; $month=2; $year=2015; - $conf->global->MAIN_START_WEEK = 0; // start on sunday - $prev = dol_get_first_day_week($day, $month, $year); + $day=3; $month=2; $year=2015; + $conf->global->MAIN_START_WEEK = 0; // start on sunday + $prev = dol_get_first_day_week($day, $month, $year); $this->assertEquals(1, (int) $prev['first_day']); // sunday for month 2, year 2015 is the 1st - } + + return 1; + } + + + /** + * testDolGetFirstHour + * + * @return int + */ + public function testDolGetFirstHour() + { + global $conf; + + $now = 1800 + (24 * 3600 * 10); // The 11th of january 1970 at 0:30 in UTC + $result = dol_get_first_hour($now, 'gmt'); + print __METHOD__." now = ".$now.", dol_print_date(now, 'dayhourrfc', 'gmt') = ".dol_print_date($now, 'dayhourrfc', 'gmt').", result = ".$result.", dol_print_date(result, 'dayhourrfc', 'gmt') = ".dol_print_date($result, 'dayhourrfc', 'gmt')."\n"; + $this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt')); // monday for month 2, year 2014 is the 2 + + $now = 23.5 * 3600 + (24 * 3600 * 10); // The 11th of january 1970 at 23:30 in UTC + $result = dol_get_first_hour($now, 'gmt'); + print __METHOD__." now = ".$now.", dol_print_date(now, 'dayhourrfc', 'gmt') = ".dol_print_date($now, 'dayhourrfc', 'gmt').", result = ".$result.", dol_print_date(result, 'dayhourrfc', 'gmt') = ".dol_print_date($result, 'dayhourrfc', 'gmt')."\n"; + $this->assertEquals('1970-01-11T00:00:00Z', dol_print_date($result, 'dayhourrfc', 'gmt')); // monday for month 2, year 2014 is the 2 + + return 1; + } } diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index b77d13fd0c0..63eadc1a98f 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,139 +73,139 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (getServerTimeZoneString() != 'Europe/Paris' && getServerTimeZoneString() != 'Europe/Berlin') { - print "\n".__METHOD__." This PHPUnit test can be launched manually only onto a server with PHP timezone set to TZ=Europe/Paris, not a TZ=".getServerTimeZoneString().".\n"; die(); - } + if (getServerTimeZoneString() != 'Europe/Paris' && getServerTimeZoneString() != 'Europe/Berlin') { + print "\n".__METHOD__." This PHPUnit test can be launched manually only onto a server with PHP timezone set to TZ=Europe/Paris, not a TZ=".getServerTimeZoneString().".\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testDolPrintDateTzFrance - * Same than official testDolPrintDate but with parameter tzoutput that is false='tzserver'. - * This test works only onto a server using TZ+1 Europe/Paris. - * - * You can use http://www.epochconverter.com/ to generate more tests. - * - * @return void - */ - public function testDolPrintDateTzFrance() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolPrintDateTzFrance + * Same than official testDolPrintDate but with parameter tzoutput that is false='tzserver'. + * This test works only onto a server using TZ+1 Europe/Paris. + * + * You can use http://www.epochconverter.com/ to generate more tests. + * + * @return void + */ + public function testDolPrintDateTzFrance() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(0, '%Y-%m-%d %H:%M:%S', false); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1970-01-01 01:00:00', $result); + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(0, '%Y-%m-%d %H:%M:%S', false); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1970-01-01 01:00:00', $result); - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', false); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('2500-01-01 01:00:00', $result); + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', false); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('2500-01-01 01:00:00', $result); - // Check %Y-%m-%d %H:%M:%S format - $result=dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1912-01-01 01:00:00', $result); // dol_print_date use a timezone, not epoch converter as it did not exists this year + // Check %Y-%m-%d %H:%M:%S format + $result=dol_print_date(-1830384000, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1912-01-01 01:00:00', $result); // dol_print_date use a timezone, not epoch converter as it did not exists this year - // Specific cas during war + // Specific cas during war - // 1940, no timezone - $result=dol_print_date(-946771200, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1940-01-01 01:00:00', $result); // dol_print_date use a modern timezone, not epoch converter as it did not exists this year + // 1940, no timezone + $result=dol_print_date(-946771200, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1940-01-01 01:00:00', $result); // dol_print_date use a modern timezone, not epoch converter as it did not exists this year - // 1941, timezone is added by germany to +2 (same for 1942) - $result=dol_print_date(-915148800, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1941-01-01 01:00:00', $result); // dol_print_date use a modern timezone, epoch converter use historic timezone + // 1941, timezone is added by germany to +2 (same for 1942) + $result=dol_print_date(-915148800, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1941-01-01 01:00:00', $result); // dol_print_date use a modern timezone, epoch converter use historic timezone - // 1943, timezone is +1 - $result=dol_print_date(-852076800, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1943-01-01 01:00:00', $result); + // 1943, timezone is +1 + $result=dol_print_date(-852076800, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1943-01-01 01:00:00', $result); - // test with negative timezone - $result=dol_print_date(-1, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ - print __METHOD__." result=".$result."\n"; - $this->assertEquals('1970-01-01 00:59:59', $result); + // test with negative timezone + $result=dol_print_date(-1, '%Y-%m-%d %H:%M:%S', false); // http://www.epochconverter.com/ + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1970-01-01 00:59:59', $result); - // Check dayhour format for fr_FR - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('fr_FR'); - $outputlangs->load("main"); + // Check dayhour format for fr_FR + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('fr_FR'); + $outputlangs->load("main"); - $result=dol_print_date(0+24*3600, 'dayhour', false, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('02/01/1970 01:00', $result); + $result=dol_print_date(0+24*3600, 'dayhour', false, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('02/01/1970 01:00', $result); - // Check day format for en_US - $outputlangs=new Translate('', $conf); - $outputlangs->setDefaultLang('en_US'); - $outputlangs->load("main"); + // Check day format for en_US + $outputlangs=new Translate('', $conf); + $outputlangs->setDefaultLang('en_US'); + $outputlangs->load("main"); - $result=dol_print_date(0+24*3600, 'day', false, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('01/02/1970', $result); + $result=dol_print_date(0+24*3600, 'day', false, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('01/02/1970', $result); - // Check %a and %b format for en_US - $result=dol_print_date(0, '%a %b', false, $outputlangs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu Jan', $result); + // Check %a and %b format for en_US + $result=dol_print_date(0, '%a %b', false, $outputlangs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('Thu Jan', $result); - return $result; - } + return $result; + } } diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 9eba2460655..5841ba59c37 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/class/discount.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,39 +74,39 @@ class DiscountTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -115,87 +114,87 @@ class DiscountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; //print $db->getVersion()."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testDiscountCreate - * - * @return int - */ - public function testDiscountCreate() - { - global $conf,$user,$langs,$db; + /** + * testDiscountCreate + * + * @return int + */ + public function testDiscountCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new DiscountAbsolute($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testDiscountFetch - * - * @param int $id Id of discount - * @return int - * - * @depends testDiscountCreate - * The depends says test is run only if previous is ok - */ - public function testDiscountFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testDiscountFetch + * + * @param int $id Id of discount + * @return int + * + * @depends testDiscountCreate + * The depends says test is run only if previous is ok + */ + public function testDiscountFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new DiscountAbsolute($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $id; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $id; + } - /** - * testDiscountDelete - * - * @param int $id Id of discount - * @return int - * - * @depends testDiscountFetch - * The depends says test is run only if previous is ok - */ - public function testDiscountDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testDiscountDelete + * + * @param int $id Id of discount + * @return int + * + * @depends testDiscountFetch + * The depends says test is run only if previous is ok + */ + public function testDiscountDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new DiscountAbsolute($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php index 8cad99243cc..6be9b5ba349 100644 --- a/test/phpunit/EntrepotTest.php +++ b/test/phpunit/EntrepotTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/product/stock/class/entrepot.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,146 +73,148 @@ class EntrepotTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (empty($conf->stock->enabled)) { print __METHOD__." Module Stock must be enabled.\n"; die(); } + if (empty($conf->stock->enabled)) { + print __METHOD__." Module Stock must be enabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testEntrepotCreate - * - * @return void - */ - public function testEntrepotCreate() - { - global $conf,$user,$langs,$db; + /** + * testEntrepotCreate + * + * @return void + */ + public function testEntrepotCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Entrepot($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - return $result; - } + return $result; + } - /** - * testEntrepotFetch - * - * @param int $id Id entrepot - * @return Entrepot - * - * @depends testEntrepotCreate - * The depends says test is run only if previous is ok - */ - public function testEntrepotFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testEntrepotFetch + * + * @param int $id Id entrepot + * @return Entrepot + * + * @depends testEntrepotCreate + * The depends says test is run only if previous is ok + */ + public function testEntrepotFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Entrepot($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testEntrepotUpdate - * - * @param Entrepot $localobject Entrepot - * @return void - * - * @depends testEntrepotFetch - * The depends says test is run only if previous is ok - */ - public function testEntrepotUpdate($localobject) - { - global $conf,$user,$langs,$db; + /** + * testEntrepotUpdate + * + * @param Entrepot $localobject Entrepot + * @return void + * + * @depends testEntrepotFetch + * The depends says test is run only if previous is ok + */ + public function testEntrepotUpdate($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject->note='New note after update'; - $result=$localobject->update($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->update($localobject->id, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testEntrepotOther - * - * @param Entrepot $localobject Entrepot - * @return void - * - * @depends testEntrepotUpdate - * The depends says test is run only if previous is ok - */ - public function testEntrepotOther($localobject) - { - global $conf,$user,$langs,$db; + /** + * testEntrepotOther + * + * @param Entrepot $localobject Entrepot + * @return void + * + * @depends testEntrepotUpdate + * The depends says test is run only if previous is ok + */ + public function testEntrepotOther($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -222,33 +223,33 @@ class EntrepotTest extends PHPUnit\Framework\TestCase $result = $localobject->get_full_arbo(); $this->assertEquals('WAREHOUSE SPECIMEN', $result); - return $localobject->id; - } + return $localobject->id; + } - /** - * testEntrepotDelete - * - * @param int $id Id of entrepot - * @return void - * - * @depends testEntrepotOther - * The depends says test is run only if previous is ok - */ - public function testEntrepotDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testEntrepotDelete + * + * @param int $id Id of entrepot + * @return void + * + * @depends testEntrepotOther + * The depends says test is run only if previous is ok + */ + public function testEntrepotDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Entrepot($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0, $localobject->errorsToString()); + $this->assertLessThan($result, 0, $localobject->errorsToString()); - return $result; - } + return $result; + } } diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index 2d6fdca3b27..247a9dd1012 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/expensereport/class/expensereport.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -47,270 +47,270 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class ExpenseReportTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return ExpenseReportTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return ExpenseReportTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - //print $db->getVersion()."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + //print $db->getVersion()."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testExpenseReportCreate - * - * @return void - */ - public function testExpenseReportCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportCreate + * + * @return void + */ + public function testExpenseReportCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Create supplier order with a too low quantity - $localobject=new ExpenseReport($db); - $localobject->initAsSpecimen(); // Init a specimen with lines - $localobject->status = 0; - $localobject->fk_statut = 0; - $localobject->date_fin = null; // Force bad value + // Create supplier order with a too low quantity + $localobject=new ExpenseReport($db); + $localobject->initAsSpecimen(); // Init a specimen with lines + $localobject->status = 0; + $localobject->fk_statut = 0; + $localobject->date_fin = null; // Force bad value - $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-1, $result, "Error on test ExpenseReport create 1 : ".$localobject->error); // must be -1 because of missing mandatory fields + $result=$localobject->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-1, $result, "Error on test ExpenseReport create 1 : ".$localobject->error); // must be -1 because of missing mandatory fields - $sql="DELETE FROM ".MAIN_DB_PREFIX."expensereport where ref=''"; - $db->query($sql); + $sql="DELETE FROM ".MAIN_DB_PREFIX."expensereport where ref=''"; + $db->query($sql); - // Create supplier order - $localobject2=new ExpenseReport($db); - $localobject2->initAsSpecimen(); // Init a specimen with lines - $localobject2->status = 0; - $localobject2->fk_statut = 0; + // Create supplier order + $localobject2=new ExpenseReport($db); + $localobject2->initAsSpecimen(); // Init a specimen with lines + $localobject2->status = 0; + $localobject2->fk_statut = 0; - $result=$localobject2->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result, "Error on test ExpenseReport create 2 : ".$localobject2->error); + $result=$localobject2->create($user); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result, "Error on test ExpenseReport create 2 : ".$localobject2->error); - return $result; - } + return $result; + } - /** - * testExpenseReportFetch - * - * @param int $id Id of supplier order - * @return void - * - * @depends testExpenseReportCreate - * The depends says test is run only if previous is ok - */ - public function testExpenseReportFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportFetch + * + * @param int $id Id of supplier order + * @return void + * + * @depends testExpenseReportCreate + * The depends says test is run only if previous is ok + */ + public function testExpenseReportFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ExpenseReport($this->savdb); - $result=$localobject->fetch($id); + $localobject=new ExpenseReport($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testExpenseReportValid - * - * @param Object $localobject Supplier order - * @return void - * - * @depends testExpenseReportFetch - * The depends says test is run only if previous is ok - */ - public function testExpenseReportValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportValid + * + * @param ExpenseReport $localobject ExpenseReport + * @return void + * + * @depends testExpenseReportFetch + * The depends says test is run only if previous is ok + */ + public function testExpenseReportValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->setValidate($user); + $result=$localobject->setValidate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testExpenseReportApprove - * - * @param Object $localobject Supplier order - * @return void - * - * @depends testExpenseReportValid - * The depends says test is run only if previous is ok - */ - public function testExpenseReportApprove($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportApprove + * + * @param ExpenseReport $localobject ExpenseReport + * @return void + * + * @depends testExpenseReportValid + * The depends says test is run only if previous is ok + */ + public function testExpenseReportApprove($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->setApproved($user); + $result=$localobject->setApproved($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testExpenseReportCancel - * - * @param Object $localobject Supplier order - * @return void - * - * @depends testExpenseReportApprove - * The depends says test is run only if previous is ok - */ - public function testExpenseReportCancel($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportCancel + * + * @param ExpenseReport $localobject ExpenseReport + * @return void + * + * @depends testExpenseReportApprove + * The depends says test is run only if previous is ok + */ + public function testExpenseReportCancel($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->set_cancel($user, 'Because...'); + $result=$localobject->set_cancel($user, 'Because...'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testExpenseReportOther - * - * @param Object $localobject Supplier order - * @return void - * - * @depends testExpenseReportCancel - * The depends says test is run only if previous is ok - */ - public function testExpenseReportOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportOther + * + * @param ExpenseReport $localobject ExpenseReport + * @return void + * + * @depends testExpenseReportCancel + * The depends says test is run only if previous is ok + */ + public function testExpenseReportOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->getSumPayments(); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result); + $result=$localobject->getSumPayments(); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result); - return $localobject->id; - } + return $localobject->id; + } - /** - * testExpenseReportDelete - * - * @param int $id Id of order - * @return void - * - * @depends testExpenseReportOther - * The depends says test is run only if previous is ok - */ - public function testExpenseReportDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExpenseReportDelete + * + * @param int $id Id of order + * @return void + * + * @depends testExpenseReportOther + * The depends says test is run only if previous is ok + */ + public function testExpenseReportDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new ExpenseReport($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new ExpenseReport($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertGreaterThan(0, $result); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $result; + } } diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 92d08e81101..6f4928362ea 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -30,16 +30,36 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/exports/class/export.class.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/files.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** @@ -79,296 +99,293 @@ class ExportTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; //$db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * Other tests - * - * @return void - */ - public function testExportOther() - { - global $conf,$user,$langs,$db; - - $model='csv'; - - $conf->global->EXPORT_CSV_SEPARATOR_TO_USE = ','; - print 'EXPORT_CSV_SEPARATOR_TO_USE = '.$conf->global->EXPORT_CSV_SEPARATOR_TO_USE; - - // Creation of class to export using model ExportXXX - $dir = DOL_DOCUMENT_ROOT . "/core/modules/export/"; - $file = "export_".$model.".modules.php"; - $classname = "Export".$model; - require_once $dir.$file; - $objmodel = new $classname($db); - - // First test without option USE_STRICT_CSV_RULES - unset($conf->global->USE_STRICT_CSV_RULES); - - $valtotest='A simple string'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'A simple string'); - - $valtotest='A string with , and ; inside'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with , and ; inside"', 'Error in csvClean for '.$file); - - $valtotest='A string with " inside'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with "" inside"'); - - $valtotest='A string with " inside and '."\r\n".' carriage returns'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with "" inside and \n carriage returns"'); - - $valtotest='A string with <a href="aaa"><strong>html<br>content</strong></a> inside<br>'."\n"; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with <a href=""aaa""><strong>html<br>content</strong></a> inside"'); - - // Same tests with strict mode - $conf->global->USE_STRICT_CSV_RULES = 1; - - $valtotest='A simple string'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'A simple string'); - - $valtotest='A string with , and ; inside'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with , and ; inside"'); - - $valtotest='A string with " inside'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with "" inside"'); - - $valtotest='A string with " inside and '."\r\n".' carriage returns'; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "\"A string with \"\" inside and \r\n carriage returns\""); - - $valtotest='A string with <a href="aaa"><strong>html<br>content</strong></a> inside<br>'."\n"; - print __METHOD__." valtotest=".$valtotest."\n"; - $result = $objmodel->csvClean($valtotest, $langs->charset_output); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, '"A string with <a href=""aaa""><strong>html<br>content</strong></a> inside"'); - } - - /** - * Test export function for a personalized dataset - * - * @depends testExportOther + /** + * Other tests + * * @return void - */ - public function testExportPersonalizedExport() - { - global $conf,$user,$langs,$db; + */ + public function testExportOther() + { + global $conf,$user,$langs,$db; - $sql = "SELECT f.ref as f_ref, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; + $model='csv'; - $objexport=new Export($db); - //$objexport->load_arrays($user,$datatoexport); + $conf->global->EXPORT_CSV_SEPARATOR_TO_USE = ','; + print 'EXPORT_CSV_SEPARATOR_TO_USE = '.$conf->global->EXPORT_CSV_SEPARATOR_TO_USE; - // Define properties - $datatoexport='test'; - $array_selected = array("f.ref"=>1, "f.total"=>2, "f.tva"=>3); - $array_export_fields = array("f.ref"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat"); - $array_alias = array("f_ref"=>"ref", "f_total"=>"total", "f_tva"=>"tva"); - $objexport->array_export_fields[0]=$array_export_fields; - $objexport->array_export_alias[0]=$array_alias; + // Creation of class to export using model ExportXXX + $dir = DOL_DOCUMENT_ROOT . "/core/modules/export/"; + $file = "export_".$model.".modules.php"; + $classname = "Export".$model; + require_once $dir.$file; + $objmodel = new $classname($db); - dol_mkdir($conf->export->dir_temp); + // First test without option USE_STRICT_CSV_RULES + unset($conf->global->USE_STRICT_CSV_RULES); - $model='csv'; + $valtotest='A simple string'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'A simple string'); - // Build export file - print "Process build_file for model = ".$model."\n"; - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); + $valtotest='A string with , and ; inside'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with , and ; inside"', 'Error in csvClean for '.$file); + + $valtotest='A string with " inside'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with "" inside"'); + + $valtotest='A string with " inside and '."\r\n".' carriage returns'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with "" inside and \n carriage returns"'); + + $valtotest='A string with <a href="aaa"><strong>html<br>content</strong></a> inside<br>'."\n"; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with <a href=""aaa""><strong>html<br>content</strong></a> inside"'); + + // Same tests with strict mode + $conf->global->USE_STRICT_CSV_RULES = 1; + + $valtotest='A simple string'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'A simple string'); + + $valtotest='A string with , and ; inside'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with , and ; inside"'); + + $valtotest='A string with " inside'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with "" inside"'); + + $valtotest='A string with " inside and '."\r\n".' carriage returns'; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "\"A string with \"\" inside and \r\n carriage returns\""); + + $valtotest='A string with <a href="aaa"><strong>html<br>content</strong></a> inside<br>'."\n"; + print __METHOD__." valtotest=".$valtotest."\n"; + $result = $objmodel->csvClean($valtotest, $langs->charset_output); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, '"A string with <a href=""aaa""><strong>html<br>content</strong></a> inside"'); + } + + /** + * Test export function for a personalized dataset + * + * @depends testExportOther + * @return void + */ + public function testExportPersonalizedExport() + { + global $conf,$user,$langs,$db; + + $sql = "SELECT f.ref as f_ref, f.total_ht as f_total, f.total_tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; + + $objexport=new Export($db); + //$objexport->load_arrays($user,$datatoexport); + + // Define properties + $datatoexport='test'; + $array_selected = array("f.ref"=>1, "f.total"=>2, "f.tva"=>3); + $array_export_fields = array("f.ref"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat"); + $array_alias = array("f_ref"=>"ref", "f_total"=>"total", "f_tva"=>"tva"); + $objexport->array_export_fields[0]=$array_export_fields; + $objexport->array_export_alias[0]=$array_alias; + + dol_mkdir($conf->export->dir_temp); + + $model='csv'; + + // Build export file + print "Process build_file for model = ".$model."\n"; + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult = 1; - $this->assertEquals($expectedresult, $result, 'Error in CSV export'); + $this->assertEquals($expectedresult, $result, 'Error in CSV export'); - $model='tsv'; + $model='tsv'; - // Build export file - print "Process build_file for model = ".$model."\n"; - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); + // Build export file + print "Process build_file for model = ".$model."\n"; + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult=1; - $this->assertEquals($expectedresult, $result, 'Error in TSV export'); + $this->assertEquals($expectedresult, $result, 'Error in TSV export'); - $model='excel2007'; + $model='excel2007'; - // Build export file - /* ko on php 7.4 on travis (zip not available) */ - print "Process build_file for model = ".$model."\n"; - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); + // Build export file + /* ko on php 7.4 on travis (zip not available) */ + print "Process build_file for model = ".$model."\n"; + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult=1; - $this->assertEquals($expectedresult, $result, 'Error in Excel2007 export'); + $this->assertEquals($expectedresult, $result, 'Error in Excel2007 export'); + return true; + } - return true; - } - - /** - * Test export function for a personalized dataset with filters - * - * @depends testExportPersonalizedExport - * @return void - */ - public function testExportPersonalizedWithFilter() - { - global $conf,$user,$langs,$db; - /* - $sql = "SELECT f.ref as f_ref, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; - - $objexport=new Export($db); - //$objexport->load_arrays($user,$datatoexport); - - // Define properties - $datatoexport='test_filtered'; - $array_selected = array("f.ref"=>1, "f.total"=>2, "f.tva"=>3); - $array_export_fields = array("f.ref"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat"); - $array_filtervalue = array("f.total" => ">100"); - $array_filtered = array("f.total" => 1); - $array_alias = array("f_ref"=>"ref", "f_total"=>"total", "f_tva"=>"tva"); - $objexport->array_export_fields[0]=$array_export_fields; - $objexport->array_export_alias[0]=$array_alias; - - dol_mkdir($conf->export->dir_temp); - - $model='csv'; - - // Build export file - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); - $expectedresult=1; - $this->assertEquals($expectedresult,$result); - - $model='tsv'; - - // Build export file - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); - $expectedresult=1; - $this->assertEquals($expectedresult,$result); - - $model='excel'; - - // Build export file - $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); - $expectedresult=1; - $this->assertEquals($expectedresult,$result); - */ - $this->assertEquals(true, true); - return true; - } - - /** - * Test export function for all dataset predefined into modules - * - * @depends testExportPersonalizedWithFilter + /** + * Test export function for a personalized dataset with filters + * + * @depends testExportPersonalizedExport * @return void - */ - public function testExportModulesDatasets() - { - global $conf,$user,$langs,$db; + */ + public function testExportPersonalizedWithFilter() + { + global $conf,$user,$langs,$db; + /* + $sql = "SELECT f.ref as f_ref, f.total_ht as f_total_ht, f.total_tva as f_total_tva FROM ".MAIN_DB_PREFIX."facture f"; - $model='csv'; + $objexport=new Export($db); + //$objexport->load_arrays($user,$datatoexport); - $filterdatatoexport=''; - //$filterdatatoexport=''; - //$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset + // Define properties + $datatoexport='test_filtered'; + $array_selected = array("f.ref"=>1, "f.total_ht"=>2, "f.total_tva"=>3); + $array_export_fields = array("f.ref"=>"FacNumber", "f.total_ht"=>"FacTotal", "f.total_tva"=>"FacVat"); + $array_filtervalue = array("f.total_ht" => ">100"); + $array_filtered = array("f.total_ht" => 1); + $array_alias = array("f_ref"=>"ref", "f_total_ht"=>"total_ht", "f_total_tva"=>"total_tva"); + $objexport->array_export_fields[0]=$array_export_fields; + $objexport->array_export_alias[0]=$array_alias; - // Load properties of arrays to make export - $objexport=new Export($db); - $result=$objexport->load_arrays($user, $filterdatatoexport); // This load ->array_export_xxx properties for datatoexport + dol_mkdir($conf->export->dir_temp); - // Loop on each dataset - foreach ($objexport->array_export_code as $key => $datatoexport) - { - $exportfile=$conf->export->dir_temp.'/'.$user->id.'/export_'.$datatoexport.'.csv'; - print "Process export for dataset ".$datatoexport." into ".$exportfile."\n"; - dol_delete_file($exportfile); + $model='csv'; - // Generate $array_selected - $i=0; - $array_selected=array(); - foreach ($objexport->array_export_fields[$key] as $key => $val) - { + // Build export file + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); + $expectedresult=1; + $this->assertEquals($expectedresult,$result); + + $model='tsv'; + + // Build export file + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); + $expectedresult=1; + $this->assertEquals($expectedresult,$result); + + $model='excel'; + + // Build export file + $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); + $expectedresult=1; + $this->assertEquals($expectedresult,$result); + */ + $this->assertEquals(true, true); + return true; + } + + /** + * Test export function for all dataset predefined into modules + * + * @depends testExportPersonalizedWithFilter + * @return void + */ + public function testExportModulesDatasets() + { + global $conf,$user,$langs,$db; + + $model='csv'; + + $filterdatatoexport=''; + //$filterdatatoexport=''; + //$array_selected = array("s.rowid"=>1, "s.nom"=>2); // Mut be fields found into declaration of dataset + + // Load properties of arrays to make export + $objexport=new Export($db); + $result=$objexport->load_arrays($user, $filterdatatoexport); // This load ->array_export_xxx properties for datatoexport + + // Loop on each dataset + foreach ($objexport->array_export_code as $key => $datatoexport) { + $exportfile=$conf->export->dir_temp.'/'.$user->id.'/export_'.$datatoexport.'.csv'; + print "Process export for dataset ".$datatoexport." into ".$exportfile."\n"; + dol_delete_file($exportfile); + + // Generate $array_selected + $i=0; + $array_selected=array(); + foreach ($objexport->array_export_fields[$key] as $key => $val) { $array_selected[$key]=$i++; } //var_dump($array_selected); - // Build export file - $sql = ""; + // Build export file + $sql = ""; $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult = 1; - $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed: '.$objexport->error); - $result=dol_is_file($exportfile); - $this->assertTrue($result, 'File '.$exportfile.' not found'); - } + $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed: '.$objexport->error); + $result=dol_is_file($exportfile); + $this->assertTrue($result, 'File '.$exportfile.' not found'); + } - return true; - } + return true; + } } diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index d9cd44a40d2..06d28a03067 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -30,8 +30,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.facture.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -76,204 +75,204 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFactureFournisseurCreate - * - * @return int - */ - public function testFactureFournisseurCreate() - { - global $conf,$user,$langs,$db; + /** + * testFactureFournisseurCreate + * + * @return int + */ + public function testFactureFournisseurCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new FactureFournisseur($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0, $localobject->errorsToString()); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0, $localobject->errorsToString()); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testFactureFournisseurFetch - * - * @param int $id If supplier invoice - * @return void - * - * @depends testFactureFournisseurCreate - * The depends says test is run only if previous is ok - */ - public function testFactureFournisseurFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testFactureFournisseurFetch + * + * @param int $id If supplier invoice + * @return void + * + * @depends testFactureFournisseurCreate + * The depends says test is run only if previous is ok + */ + public function testFactureFournisseurFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new FactureFournisseur($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0, $localobject->errorsToString()); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0, $localobject->errorsToString()); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testFactureFournisseurUpdate - * - * @param Object $localobject Supplier invoice - * @return int - * - * @depends testFactureFournisseurFetch - * The depends says test is run only if previous is ok - */ - public function testFactureFournisseurUpdate($localobject) - { - global $conf,$user,$langs,$db; + /** + * testFactureFournisseurUpdate + * + * @param FactureFournisseur $localobject Supplier invoice + * @return int + * + * @depends testFactureFournisseurFetch + * The depends says test is run only if previous is ok + */ + public function testFactureFournisseurUpdate($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject->note='New note after update'; - $result=$localobject->update($user); + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, $localobject->errorsToString()); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, $localobject->errorsToString()); + return $localobject; + } - /** - * testFactureFournisseurValid - * - * @param Object $localobject Supplier invoice - * @return void - * - * @depends testFactureFournisseurUpdate - * The depends says test is run only if previous is ok - */ - public function testFactureFournisseurValid($localobject) - { - global $conf,$user,$langs,$db; + /** + * testFactureFournisseurValid + * + * @param FactureFournisseur $localobject Supplier invoice + * @return void + * + * @depends testFactureFournisseurUpdate + * The depends says test is run only if previous is ok + */ + public function testFactureFournisseurValid($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - $result=$localobject->validate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->validate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, $localobject->errorsToString()); - return $localobject; - } + $this->assertLessThan($result, 0, $localobject->errorsToString()); + return $localobject; + } - /** - * testFactureFournisseurOther - * - * @param Object $localobject Supplier invoice - * @return void - * - * @depends testFactureFournisseurValid - * The depends says test is run only if previous is ok - */ - public function testFactureFournisseurOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureFournisseurOther + * + * @param FactureFournisseur $localobject Supplier invoice + * @return void + * + * @depends testFactureFournisseurValid + * The depends says test is run only if previous is ok + */ + public function testFactureFournisseurOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testFactureFournisseurDelete - * - * @param int $id Id of supplier invoice - * @return void - * - * @depends testFactureFournisseurOther - * The depends says test is run only if previous is ok - */ - public function testFactureFournisseurDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testFactureFournisseurDelete + * + * @param int $id Id of supplier invoice + * @return void + * + * @depends testFactureFournisseurOther + * The depends says test is run only if previous is ok + */ + public function testFactureFournisseurDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new FactureFournisseur($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; $this->assertLessThan($result, 0, $localobject->errorsToString()); - return $result; - } + return $result; + } } diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index e878aa2a0f3..1fb62ecfd0e 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -30,8 +30,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture-rec.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,66 +74,67 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testFactureRecCreate + * + * @return int + */ + public function testFactureRecCreate() + { + global $conf,$user,$langs,$db; - /** - * testFactureRecCreate - * - * @return int - */ - public function testFactureRecCreate() - { - global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -147,83 +147,85 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $localobject=new FactureRec($this->savdb); - $localobject->initAsSpecimen(); - $result = $localobject->create($user, $localobjectinv->id); + $localobject->initAsSpecimen(); + $result = $localobject->create($user, $localobjectinv->id); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result, 'Create recurring invoice from common invoice'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Create recurring invoice from common invoice'); - return $result; - } + return $result; + } - /** - * testFactureRecFetch - * - * @param int $id Id of created recuriing invoice - * @return int - * + /** + * testFactureRecFetch + * + * @param int $id Id of created recuriing invoice + * @return int + * * @depends testFactureRecCreate - * The depends says test is run only if previous is ok - */ - public function testFactureRecFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + * The depends says test is run only if previous is ok + */ + public function testFactureRecFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new FactureRec($this->savdb); - $result = $localobject->fetch($id); + $localobject=new FactureRec($this->savdb); + $result = $localobject->fetch($id); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $result; + } - /** - * Edit an object to test updates - * - * @param mixed $localobject Object Facture - * @return void - */ - public function changeProperties(&$localobject) - { - $localobject->note_private='New note'; - //$localobject->note='New note after update'; - } + /** + * Edit an object to test updates + * + * @param FactureRec $localobject Object Facture rec + * @return void + */ + public function changeProperties(&$localobject) + { + $localobject->note_private='New note'; + //$localobject->note='New note after update'; + } - /** - * Compare all public properties values of 2 objects - * - * @param Object $oA Object operand 1 - * @param Object $oB Object operand 2 - * @param boolean $ignoretype False will not report diff if type of value differs - * @param array $fieldstoignorearray Array of fields to ignore in diff + /** + * Compare all public properties values of 2 objects + * + * @param Object $oA Object operand 1 + * @param Object $oB Object operand 2 + * @param boolean $ignoretype False will not report diff if type of value differs + * @param array $fieldstoignorearray Array of fields to ignore in diff * @return array Array with differences - */ - public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) - { - $retAr=array(); + */ + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) + { + $retAr=array(); - if (get_class($oA) !== get_class($oB)) { - $retAr[]="Supplied objects are not of same class."; - } else { - $oVarsA=get_object_vars($oA); - $oVarsB=get_object_vars($oB); - $aKeys=array_keys($oVarsA); - foreach ($aKeys as $sKey) { - if (in_array($sKey, $fieldstoignorearray)) continue; - if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - } - } - return $retAr; - } + if (get_class($oA) !== get_class($oB)) { + $retAr[]="Supplied objects are not of same class."; + } else { + $oVarsA=get_object_vars($oA); + $oVarsB=get_object_vars($oB); + $aKeys=array_keys($oVarsA); + foreach ($aKeys as $sKey) { + if (in_array($sKey, $fieldstoignorearray)) { + continue; + } + if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + } + } + return $retAr; + } } diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 2d872afd915..ddb895d1b96 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -47,192 +47,196 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class FactureTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return FactureTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return FactureTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (empty($conf->facture->enabled)) { print __METHOD__." module customer invoice must be enabled.\n"; die(); } - if (! empty($conf->ecotaxdeee->enabled)) { print __METHOD__." ecotaxdeee module must not be enabled.\n"; die(); } + if (empty($conf->facture->enabled)) { + print __METHOD__." module customer invoice must be enabled.\n"; die(); + } + if (! empty($conf->ecotaxdeee->enabled)) { + print __METHOD__." ecotaxdeee module must not be enabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFactureCreate - * - * @return int - */ - public function testFactureCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureCreate + * + * @return int + */ + public function testFactureCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testFactureFetch - * - * @param int $id Id invoice - * @return int - * - * @depends testFactureCreate - * The depends says test is run only if previous is ok - */ - public function testFactureFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureFetch + * + * @param int $id Id invoice + * @return int + * + * @depends testFactureCreate + * The depends says test is run only if previous is ok + */ + public function testFactureFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Facture($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Facture($this->savdb); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testFactureFetch - * - * @param Object $localobject Invoice - * @return int - * - * @depends testFactureFetch - * The depends says test is run only if previous is ok - */ - public function testFactureUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureFetch + * + * @param Facture $localobject Invoice + * @return int + * + * @depends testFactureFetch + * The depends says test is run only if previous is ok + */ + public function testFactureUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $this->changeProperties($localobject); - $result=$localobject->update($user); + $this->changeProperties($localobject); + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testFactureValid - * - * @param Object $localobject Invoice - * @return void - * - * @depends testFactureUpdate - * The depends says test is run only if previous is ok - */ - public function testFactureValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureValid + * + * @param Facture $localobject Invoice + * @return void + * + * @depends testFactureUpdate + * The depends says test is run only if previous is ok + */ + public function testFactureValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->validate($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->validate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0); - // Test everything are still same than specimen - $newlocalobject=new Facture($this->savdb); - $newlocalobject->initAsSpecimen(); - $this->changeProperties($newlocalobject); + // Test everything are still same than specimen + $newlocalobject=new Facture($this->savdb); + $newlocalobject->initAsSpecimen(); + $this->changeProperties($newlocalobject); - // Hack to avoid test to be wrong when module sellyoursaas is on - unset($localobject->array_options['options_commission']); - unset($localobject->array_options['options_reseller']); + // Hack to avoid test to be wrong when module sellyoursaas is on + unset($localobject->array_options['options_commission']); + unset($localobject->array_options['options_reseller']); - $arraywithdiff = $this->objCompare( + $arraywithdiff = $this->objCompare( $localobject, $newlocalobject, true, @@ -245,140 +249,142 @@ class FactureTest extends PHPUnit\Framework\TestCase 'trackid','user_creat','user_valid' ) ); - $this->assertEquals($arraywithdiff, array()); // Actual, Expected + $this->assertEquals($arraywithdiff, array()); // Actual, Expected - return $localobject; - } + return $localobject; + } - /** - * testFactureOther - * - * @param Object $localobject Invoice - * @return int - * - * @depends testFactureValid - * The depends says test is run only if previous is ok - */ - public function testFactureOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureOther + * + * @param Facture $localobject Invoice + * @return int + * + * @depends testFactureValid + * The depends says test is run only if previous is ok + */ + public function testFactureOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - $result=$localobject->demande_prelevement($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->demande_prelevement($user); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject->id; - } + return $localobject->id; + } - /** - * testFactureDelete - * - * @param int $id Id of invoice - * @return int - * - * @depends testFactureOther - * The depends says test is run only if previous is ok - */ - public function testFactureDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureDelete + * + * @param int $id Id of invoice + * @return int + * + * @depends testFactureOther + * The depends says test is run only if previous is ok + */ + public function testFactureDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Force default setup - unset($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED); - unset($conf->global->INVOICE_CAN_NEVER_BE_REMOVED); + // Force default setup + unset($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED); + unset($conf->global->INVOICE_CAN_NEVER_BE_REMOVED); - $localobject=new Facture($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Facture($this->savdb); + $result=$localobject->fetch($id); - // Create another invoice and validate it after $localobject - $localobject2=new Facture($this->savdb); - $result=$localobject2->initAsSpecimen(); - $result=$localobject2->create($user); - $result=$localobject2->validate($user); + // Create another invoice and validate it after $localobject + $localobject2=new Facture($this->savdb); + $result=$localobject2->initAsSpecimen(); + $result=$localobject2->create($user); + $result=$localobject2->validate($user); print 'Invoice $localobject ref = '.$localobject->ref."\n"; - print 'Invoice $localobject2 created with ref = '.$localobject2->ref."\n"; + print 'Invoice $localobject2 created with ref = '.$localobject2->ref."\n"; - $conf->global->INVOICE_CAN_NEVER_BE_REMOVED = 1; + $conf->global->INVOICE_CAN_NEVER_BE_REMOVED = 1; - $result=$localobject2->delete($user); // Deletion is KO, option INVOICE_CAN_NEVER_BE_REMOVED is on - print __METHOD__." id=".$localobject2->id." ref=".$localobject2->ref." result=".$result."\n"; - $this->assertEquals(0, $result, 'Deletion should fail, option INVOICE_CAN_NEVER_BE_REMOVED is on'); + $result=$localobject2->delete($user); // Deletion is KO, option INVOICE_CAN_NEVER_BE_REMOVED is on + print __METHOD__." id=".$localobject2->id." ref=".$localobject2->ref." result=".$result."\n"; + $this->assertEquals(0, $result, 'Deletion should fail, option INVOICE_CAN_NEVER_BE_REMOVED is on'); - unset($conf->global->INVOICE_CAN_NEVER_BE_REMOVED); + unset($conf->global->INVOICE_CAN_NEVER_BE_REMOVED); - $result=$localobject->delete($user); // Deletion is KO, it is not last invoice - print __METHOD__." id=".$localobject->id." ref=".$localobject->ref." result=".$result."\n"; - $this->assertEquals(0, $result, 'Deletion should fail, it is not last invoice'); + $result=$localobject->delete($user); // Deletion is KO, it is not last invoice + print __METHOD__." id=".$localobject->id." ref=".$localobject->ref." result=".$result."\n"; + $this->assertEquals(0, $result, 'Deletion should fail, it is not last invoice'); - $result=$localobject2->delete($user); // Deletion is OK, it is last invoice - print __METHOD__." id=".$localobject2->id." ref=".$localobject2->ref." result=".$result."\n"; - $this->assertGreaterThan(0, $result, 'Deletion should work, it is last invoice'); + $result=$localobject2->delete($user); // Deletion is OK, it is last invoice + print __METHOD__." id=".$localobject2->id." ref=".$localobject2->ref." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Deletion should work, it is last invoice'); - $result=$localobject->delete($user); // Deletion is KO, it is not last invoice - print __METHOD__." id=".$localobject->id." ref=".$localobject->ref." result=".$result."\n"; - $this->assertGreaterThan(0, $result, 'Deletion should work, it is again last invoice'); + $result=$localobject->delete($user); // Deletion is KO, it is not last invoice + print __METHOD__." id=".$localobject->id." ref=".$localobject->ref." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Deletion should work, it is again last invoice'); - return $result; - } + return $result; + } - /** - * Edit an object to test updates - * - * @param mixed $localobject Object Facture - * @return void - */ - public function changeProperties(&$localobject) - { - $localobject->note_private='New note'; - //$localobject->note='New note after update'; - } + /** + * Edit an object to test updates + * + * @param Facture $localobject Object Facture + * @return void + */ + public function changeProperties(&$localobject) + { + $localobject->note_private='New note'; + //$localobject->note='New note after update'; + } - /** - * Compare all public properties values of 2 objects - * - * @param Object $oA Object operand 1 - * @param Object $oB Object operand 2 - * @param boolean $ignoretype False will not report diff if type of value differs - * @param array $fieldstoignorearray Array of fields to ignore in diff - * @return array Array with differences - */ - public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) - { - $retAr=array(); + /** + * Compare all public properties values of 2 objects + * + * @param Object $oA Object operand 1 + * @param Object $oB Object operand 2 + * @param boolean $ignoretype False will not report diff if type of value differs + * @param array $fieldstoignorearray Array of fields to ignore in diff + * @return array Array with differences + */ + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) + { + $retAr=array(); - if (get_class($oA) !== get_class($oB)) { - $retAr[]="Supplied objects are not of same class."; - } else { - $oVarsA=get_object_vars($oA); - $oVarsB=get_object_vars($oB); - $aKeys=array_keys($oVarsA); - foreach ($aKeys as $sKey) { - if (in_array($sKey, $fieldstoignorearray)) continue; - if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - } - } - return $retAr; - } + if (get_class($oA) !== get_class($oB)) { + $retAr[]="Supplied objects are not of same class."; + } else { + $oVarsA=get_object_vars($oA); + $oVarsB=get_object_vars($oB); + $aKeys=array_keys($oVarsA); + foreach ($aKeys as $sKey) { + if (in_array($sKey, $fieldstoignorearray)) { + continue; + } + if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + } + } + return $retAr; + } } diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index f0165a88d0b..7c225167e35 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,272 +74,270 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFactureRoundingCreate1 - * Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage - * - * @return int - */ - public function testFactureRoundingCreate1() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureRoundingCreate1 + * Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage + * + * @return int + */ + public function testFactureRoundingCreate1() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->lines=array(); - unset($localobject->total_ht); - unset($localobject->total_ttc); - unset($localobject->total_tva); - $result=$localobject->create($user); + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->lines=array(); + unset($localobject->total_ht); + unset($localobject->total_ttc); + unset($localobject->total_tva); + $result=$localobject->create($user); - // Add two lines - for ($i=0; $i<2; $i++) - { - $localobject->addline('Description '.$i, 1.24, 1, 10); - } + // Add two lines + for ($i=0; $i<2; $i++) { + $localobject->addline('Description '.$i, 1.24, 1, 10); + } - $newlocalobject=new Facture($this->savdb); - $newlocalobject->fetch($result); - //var_dump($newlocalobject); + $newlocalobject=new Facture($this->savdb); + $newlocalobject->fetch($result); + //var_dump($newlocalobject); - $this->assertEquals($newlocalobject->total_ht, 2.48); - $this->assertEquals($newlocalobject->total_tva, 0.24); - $this->assertEquals($newlocalobject->total_ttc, 2.72); - return $result; - } + $this->assertEquals($newlocalobject->total_ht, 2.48); + $this->assertEquals($newlocalobject->total_tva, 0.24); + $this->assertEquals($newlocalobject->total_ttc, 2.72); + return $result; + } - /** - * testFactureRoundingCreate2 - * - * @return int - * - * @depends testFactureRoundingCreate1 - * Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage - */ - public function testFactureRoundingCreate2() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureRoundingCreate2 + * + * @return int + * + * @depends testFactureRoundingCreate1 + * Test according to page http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage + */ + public function testFactureRoundingCreate2() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->lines=array(); - unset($localobject->total_ht); - unset($localobject->total_ttc); - unset($localobject->total_vat); - $result=$localobject->create($user); + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->lines=array(); + unset($localobject->total_ht); + unset($localobject->total_ttc); + unset($localobject->total_vat); + $result=$localobject->create($user); - // Add two lines - for ($i=0; $i<2; $i++) - { - $localobject->addline('Description '.$i, 1.24, 1, 10); - } + // Add two lines + for ($i=0; $i<2; $i++) { + $localobject->addline('Description '.$i, 1.24, 1, 10); + } - $newlocalobject=new Facture($this->savdb); - $newlocalobject->fetch($result); - //var_dump($newlocalobject); + $newlocalobject=new Facture($this->savdb); + $newlocalobject->fetch($result); + //var_dump($newlocalobject); - $this->assertEquals($newlocalobject->total_ht, 2.48); - //$this->assertEquals($newlocalobject->total_tva, 0.25); - //$this->assertEquals($newlocalobject->total_ttc, 2.73); - return $result; - } + $this->assertEquals($newlocalobject->total_ht, 2.48); + //$this->assertEquals($newlocalobject->total_tva, 0.25); + //$this->assertEquals($newlocalobject->total_ttc, 2.73); + return $result; + } - /** - * testFactureAddLine1 - * - * @return void - */ - public function testFactureAddLine1() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureAddLine1 + * + * @return void + */ + public function testFactureAddLine1() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - $localobject1a=new Facture($this->savdb); - $localobject1a->initAsSpecimen('nolines'); - $facid=$localobject1a->create($user); - $localobject1a->addline('Line 1', 6.36, 15, 21); // This include update_price - print __METHOD__." id=".$facid." total_ttc=".$localobject1a->total_ttc."\n"; - $this->assertEquals(95.40, $localobject1a->total_ht); - $this->assertEquals(20.03, $localobject1a->total_tva); - $this->assertEquals(115.43, $localobject1a->total_ttc); + $localobject1a=new Facture($this->savdb); + $localobject1a->initAsSpecimen('nolines'); + $facid=$localobject1a->create($user); + $localobject1a->addline('Line 1', 6.36, 15, 21); // This include update_price + print __METHOD__." id=".$facid." total_ttc=".$localobject1a->total_ttc."\n"; + $this->assertEquals(95.40, $localobject1a->total_ht); + $this->assertEquals(20.03, $localobject1a->total_tva); + $this->assertEquals(115.43, $localobject1a->total_ttc); - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; - $localobject1b=new Facture($this->savdb); - $localobject1b->initAsSpecimen('nolines'); - $facid=$localobject1b->create($user); - $localobject1b->addline('Line 1', 6.36, 15, 21); // This include update_price - print __METHOD__." id=".$facid." total_ttc=".$localobject1b->total_ttc."\n"; - $this->assertEquals(95.40, $localobject1b->total_ht, 'testFactureAddLine1 total_ht'); - $this->assertEquals(20.03, $localobject1b->total_tva, 'testFactureAddLine1 total_tva'); - $this->assertEquals(115.43, $localobject1b->total_ttc, 'testFactureAddLine1 total_ttc'); - } + $localobject1b=new Facture($this->savdb); + $localobject1b->initAsSpecimen('nolines'); + $facid=$localobject1b->create($user); + $localobject1b->addline('Line 1', 6.36, 15, 21); // This include update_price + print __METHOD__." id=".$facid." total_ttc=".$localobject1b->total_ttc."\n"; + $this->assertEquals(95.40, $localobject1b->total_ht, 'testFactureAddLine1 total_ht'); + $this->assertEquals(20.03, $localobject1b->total_tva, 'testFactureAddLine1 total_tva'); + $this->assertEquals(115.43, $localobject1b->total_ttc, 'testFactureAddLine1 total_ttc'); + } - /** - * testFactureAddLine2 - * - * @return void - * - * @depends testFactureAddLine1 - * The depends says test is run only if previous is ok - */ - public function testFactureAddLine2() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureAddLine2 + * + * @return void + * + * @depends testFactureAddLine1 + * The depends says test is run only if previous is ok + */ + public function testFactureAddLine2() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - $localobject2=new Facture($this->savdb); - $localobject2->initAsSpecimen('nolines'); - $facid=$localobject2->create($user); - $localobject2->addline('Line 1', 6.36, 5, 21); - $localobject2->addline('Line 2', 6.36, 5, 21); - $localobject2->addline('Line 3', 6.36, 5, 21); - print __METHOD__." id=".$facid." total_ttc=".$localobject2->total_ttc."\n"; - $this->assertEquals(95.40, $localobject2->total_ht); - $this->assertEquals(20.04, $localobject2->total_tva); - $this->assertEquals(115.44, $localobject2->total_ttc); + $localobject2=new Facture($this->savdb); + $localobject2->initAsSpecimen('nolines'); + $facid=$localobject2->create($user); + $localobject2->addline('Line 1', 6.36, 5, 21); + $localobject2->addline('Line 2', 6.36, 5, 21); + $localobject2->addline('Line 3', 6.36, 5, 21); + print __METHOD__." id=".$facid." total_ttc=".$localobject2->total_ttc."\n"; + $this->assertEquals(95.40, $localobject2->total_ht); + $this->assertEquals(20.04, $localobject2->total_tva); + $this->assertEquals(115.44, $localobject2->total_ttc); - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; - $localobject2=new Facture($this->savdb); - $localobject2->initAsSpecimen('nolines'); - $facid=$localobject2->create($user); - $localobject2->addline('Line 1', 6.36, 5, 21); - $localobject2->addline('Line 2', 6.36, 5, 21); - $localobject2->addline('Line 3', 6.36, 5, 21); - print __METHOD__." id=".$facid." total_ttc=".$localobject2->total_ttc."\n"; - $this->assertEquals(95.40, $localobject2->total_ht); - $this->assertEquals(20.03, $localobject2->total_tva); - $this->assertEquals(115.43, $localobject2->total_ttc); - } + $localobject2=new Facture($this->savdb); + $localobject2->initAsSpecimen('nolines'); + $facid=$localobject2->create($user); + $localobject2->addline('Line 1', 6.36, 5, 21); + $localobject2->addline('Line 2', 6.36, 5, 21); + $localobject2->addline('Line 3', 6.36, 5, 21); + print __METHOD__." id=".$facid." total_ttc=".$localobject2->total_ttc."\n"; + $this->assertEquals(95.40, $localobject2->total_ht); + $this->assertEquals(20.03, $localobject2->total_tva); + $this->assertEquals(115.43, $localobject2->total_ttc); + } - /** - * testFactureAddLine3 - * - * @return void - * - * @depends testFactureAddLine2 - * The depends says test is run only if previous is ok - */ - public function testFactureAddLine3() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFactureAddLine3 + * + * @return void + * + * @depends testFactureAddLine2 + * The depends says test is run only if previous is ok + */ + public function testFactureAddLine3() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 0 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - $localobject3=new Facture($this->savdb); - $localobject3->initAsSpecimen('nolines'); - $facid=$localobject3->create($user); - $localobject3->addline('Line 1', 6.36, 3, 21); - $localobject3->addline('Line 2', 6.36, 3, 21); - $localobject3->addline('Line 3', 6.36, 3, 21); - $localobject3->addline('Line 4', 6.36, 3, 21); - $localobject3->addline('Line 5', 6.36, 3, 21); - print __METHOD__." id=".$facid." total_ttc=".$localobject3->total_ttc."\n"; - $this->assertEquals(95.40, $localobject3->total_ht); - $this->assertEquals(20.05, $localobject3->total_tva); - $this->assertEquals(115.45, $localobject3->total_ttc); + $localobject3=new Facture($this->savdb); + $localobject3->initAsSpecimen('nolines'); + $facid=$localobject3->create($user); + $localobject3->addline('Line 1', 6.36, 3, 21); + $localobject3->addline('Line 2', 6.36, 3, 21); + $localobject3->addline('Line 3', 6.36, 3, 21); + $localobject3->addline('Line 4', 6.36, 3, 21); + $localobject3->addline('Line 5', 6.36, 3, 21); + print __METHOD__." id=".$facid." total_ttc=".$localobject3->total_ttc."\n"; + $this->assertEquals(95.40, $localobject3->total_ht); + $this->assertEquals(20.05, $localobject3->total_tva); + $this->assertEquals(115.45, $localobject3->total_ttc); - // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; + // With option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND = 1 + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=1; - $localobject3=new Facture($this->savdb); - $localobject3->initAsSpecimen('nolines'); - $facid=$localobject3->create($user); - $localobject3->addline('Line 1', 6.36, 3, 21); - $localobject3->addline('Line 2', 6.36, 3, 21); - $localobject3->addline('Line 3', 6.36, 3, 21); - $localobject3->addline('Line 4', 6.36, 3, 21); - $localobject3->addline('Line 5', 6.36, 3, 21); - print __METHOD__." id=".$facid." total_ttc=".$localobject3->total_ttc."\n"; - $this->assertEquals(95.40, $localobject3->total_ht); - $this->assertEquals(20.03, $localobject3->total_tva); - $this->assertEquals(115.43, $localobject3->total_ttc); - } + $localobject3=new Facture($this->savdb); + $localobject3->initAsSpecimen('nolines'); + $facid=$localobject3->create($user); + $localobject3->addline('Line 1', 6.36, 3, 21); + $localobject3->addline('Line 2', 6.36, 3, 21); + $localobject3->addline('Line 3', 6.36, 3, 21); + $localobject3->addline('Line 4', 6.36, 3, 21); + $localobject3->addline('Line 5', 6.36, 3, 21); + print __METHOD__." id=".$facid." total_ttc=".$localobject3->total_ttc."\n"; + $this->assertEquals(95.40, $localobject3->total_ht); + $this->assertEquals(20.03, $localobject3->total_tva); + $this->assertEquals(115.43, $localobject3->total_ttc); + } } diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index f78e9250471..fb8cdd0b12e 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/fichinter/class/fichinter.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,181 +74,181 @@ class FichinterTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFichinterCreate - * - * @return int - */ - public function testFichinterCreate() - { - global $conf,$user,$langs,$db; + /** + * testFichinterCreate + * + * @return int + */ + public function testFichinterCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Fichinter($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testFichinterFetch - * - * @param int $id Id of intervention - * @return int - * - * @depends testFichinterCreate - * The depends says test is run only if previous is ok - */ - public function testFichinterFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testFichinterFetch + * + * @param int $id Id of intervention + * @return int + * + * @depends testFichinterCreate + * The depends says test is run only if previous is ok + */ + public function testFichinterFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Fichinter($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testFichinterValid - * - * @param Fichinter $localobject Intervention - * @return int - * - * @depends testFichinterFetch - * The depends says test is run only if previous is ok - */ - public function testFichinterValid($localobject) - { - global $conf,$user,$langs,$db; + /** + * testFichinterValid + * + * @param Fichinter $localobject Intervention + * @return int + * + * @depends testFichinterFetch + * The depends says test is run only if previous is ok + */ + public function testFichinterValid($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - $result=$localobject->setValid($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->setValid($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testFichinterValid - * - * @param Object $localobject Object intervention - * @return int - * - * @depends testFichinterValid - * The depends says test is run only if previous is ok - */ - public function testFichinterOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testFichinterValid + * + * @param Fichinter $localobject Object intervention + * @return int + * + * @depends testFichinterValid + * The depends says test is run only if previous is ok + */ + public function testFichinterOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testFichinterDelete - * - * @param int $id Id of intervention - * @return int - * - * @depends testFichinterOther - * The depends says test is run only if previous is ok - */ - public function testFichinterDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testFichinterDelete + * + * @param int $id Id of intervention + * @return int + * + * @depends testFichinterOther + * The depends says test is run only if previous is ok + */ + public function testFichinterDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Fichinter($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index ef84b8db752..b98237d1b29 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -30,8 +30,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/files.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,97 +74,97 @@ class FilesLibTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } /** - * testDolBasename - * - * @return void - */ - public function testDolBasename() - { - global $conf,$user,$langs,$db; + * testDolBasename + * + * @return void + */ + public function testDolBasename() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - $result=dol_basename('adir/afile'); - print __METHOD__." result=".$result."\n"; + $result=dol_basename('adir/afile'); + print __METHOD__." result=".$result."\n"; $this->assertEquals('afile', $result); $result=dol_basename('adir/afile/'); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals('afile', $result); $result=dol_basename('adir/νεο'); // With cyrillic data. Here basename fails to return correct value - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals('νεο', $result); $result=dol_basename('adir/νεο/'); // With cyrillic data. Here basename fails to return correct value - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals('νεο', $result); - } + } - /** - * testDolCountNbOfLine - * - * @return int - */ - public function testDolCountNbOfLine() - { - global $conf,$user,$langs,$db; + /** + * testDolCountNbOfLine + * + * @return int + */ + public function testDolCountNbOfLine() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -173,20 +172,20 @@ class FilesLibTest extends PHPUnit\Framework\TestCase $file=dirname(__FILE__).'/Example_import_company_1.csv'; $result=dol_count_nb_of_line($file); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertEquals(3, $result); return $result; - } + } - /** - * testDolIsFileDir - * - * @return int - */ - public function testDolIsFileDir() - { - global $conf,$user,$langs,$db; + /** + * testDolIsFileDir + * + * @return int + */ + public function testDolIsFileDir() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -195,329 +194,329 @@ class FilesLibTest extends PHPUnit\Framework\TestCase $file=dirname(__FILE__).'/Example_import_company_1.csv'; $result=dol_is_file($file); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertTrue($result); $result=dol_is_dir($file); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result."\n"; $this->assertFalse($result); return $result; - } + } - /** - * testDolOther - * - * @return boolean - */ - public function testDolOther() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolOther + * + * @return boolean + */ + public function testDolOther() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $url='http://www.dolibarr.org'; - $result=dol_is_url($url); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result); + $url='http://www.dolibarr.org'; + $result=dol_is_url($url); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result); - $url='https://www.dolibarr.org'; - $result=dol_is_url($url); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result); + $url='https://www.dolibarr.org'; + $result=dol_is_url($url); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result); - $url='file://www.dolibarr.org/download/file.zip'; - $result=dol_is_url($url); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result); + $url='file://www.dolibarr.org/download/file.zip'; + $result=dol_is_url($url); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result); - return $result; - } + return $result; + } - /** - * testDolMimeType - * - * @return void - */ - public function testDolMimeType() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolMimeType + * + * @return void + */ + public function testDolMimeType() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // file.png - $result=dol_mimetype('file.png', '', 0); - $this->assertEquals('image/png', $result); - $result=dol_mimetype('file.png', '', 1); - $this->assertEquals('png', $result); - $result=dol_mimetype('file.png', '', 2); - $this->assertEquals('image.png', $result); - $result=dol_mimetype('file.png', '', 3); - $this->assertEquals('', $result); - // file.odt - $result=dol_mimetype('file.odt', '', 0); - $this->assertEquals('application/vnd.oasis.opendocument.text', $result); - $result=dol_mimetype('file.odt', '', 1); - $this->assertEquals('vnd.oasis.opendocument.text', $result); - $result=dol_mimetype('file.odt', '', 2); - $this->assertEquals('ooffice.png', $result); - $result=dol_mimetype('file.odt', '', 3); - $this->assertEquals('', $result); - // file.php - $result=dol_mimetype('file.php', '', 0); - $this->assertEquals('text/plain', $result); - $result=dol_mimetype('file.php', '', 1); - $this->assertEquals('plain', $result); - $result=dol_mimetype('file.php', '', 2); - $this->assertEquals('php.png', $result); - $result=dol_mimetype('file.php', '', 3); - $this->assertEquals('php', $result); - // file.php.noexe - $result=dol_mimetype('file.php.noexe', '', 0); - $this->assertEquals('text/plain', $result); - } + // file.png + $result=dol_mimetype('file.png', '', 0); + $this->assertEquals('image/png', $result); + $result=dol_mimetype('file.png', '', 1); + $this->assertEquals('png', $result); + $result=dol_mimetype('file.png', '', 2); + $this->assertEquals('image.png', $result); + $result=dol_mimetype('file.png', '', 3); + $this->assertEquals('', $result); + // file.odt + $result=dol_mimetype('file.odt', '', 0); + $this->assertEquals('application/vnd.oasis.opendocument.text', $result); + $result=dol_mimetype('file.odt', '', 1); + $this->assertEquals('vnd.oasis.opendocument.text', $result); + $result=dol_mimetype('file.odt', '', 2); + $this->assertEquals('ooffice.png', $result); + $result=dol_mimetype('file.odt', '', 3); + $this->assertEquals('', $result); + // file.php + $result=dol_mimetype('file.php', '', 0); + $this->assertEquals('text/plain', $result); + $result=dol_mimetype('file.php', '', 1); + $this->assertEquals('plain', $result); + $result=dol_mimetype('file.php', '', 2); + $this->assertEquals('php.png', $result); + $result=dol_mimetype('file.php', '', 3); + $this->assertEquals('php', $result); + // file.php.noexe + $result=dol_mimetype('file.php.noexe', '', 0); + $this->assertEquals('text/plain', $result); + } - /** - * testDolDeleteDir - * - * @return void - */ - public function testDolDeleteDir() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolDeleteDir + * + * @return void + */ + public function testDolDeleteDir() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $dirout=$conf->admin->dir_temp.'/test'; - $dirout2=$conf->admin->dir_temp.'/test2'; + $dirout=$conf->admin->dir_temp.'/test'; + $dirout2=$conf->admin->dir_temp.'/test2'; - $count=0; - $result=dol_delete_dir_recursive($dirout, $count); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result); + $count=0; + $result=dol_delete_dir_recursive($dirout, $count); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result); - $count=0; - $countdeleted=0; - $result=dol_delete_dir_recursive($dirout, $count, 1, 0, $countdeleted); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result); - $this->assertGreaterThanOrEqual(0, $countdeleted); + $count=0; + $countdeleted=0; + $result=dol_delete_dir_recursive($dirout, $count, 1, 0, $countdeleted); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result); + $this->assertGreaterThanOrEqual(0, $countdeleted); - dol_mkdir($dirout2); - $count=0; - $countdeleted=0; - $result=dol_delete_dir_recursive($dirout2, $count, 1, 0, $countdeleted); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); - $this->assertGreaterThanOrEqual(1, $countdeleted); - } + dol_mkdir($dirout2); + $count=0; + $countdeleted=0; + $result=dol_delete_dir_recursive($dirout2, $count, 1, 0, $countdeleted); // If it has no permission to delete, it will fails as if dir does not exists, so we can't test it + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); + $this->assertGreaterThanOrEqual(1, $countdeleted); + } - /** - * testDolCopyMoveDelete - * - * @return void - */ - public function testDolCopyMoveDelete() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolCopyMoveDelete + * + * @return void + */ + public function testDolCopyMoveDelete() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $file=dirname(__FILE__).'/Example_import_company_1.csv'; + $file=dirname(__FILE__).'/Example_import_company_1.csv'; - $result=dol_copy($file, '/adir/that/does/not/exists/file.csv'); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan(0, $result, 'copy dir that does not exists'); // We should have error + $result=dol_copy($file, '/adir/that/does/not/exists/file.csv'); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan(0, $result, 'copy dir that does not exists'); // We should have error - $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv)'); // Should be 1 + $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv)'); // Should be 1 - // Again to test with overwriting=0 - $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 0); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result, 'copy destination already exists, no overwrite'); // Should be 0 + // Again to test with overwriting=0 + $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 0); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0, $result, 'copy destination already exists, no overwrite'); // Should be 0 - // Again to test with overwriting=1 - $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result, 'copy destination already exists, overwrite'); // Should be 1 + // Again to test with overwriting=1 + $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result, 'copy destination already exists, overwrite'); // Should be 1 - // To test a move that should work - $result=dol_move($conf->admin->dir_temp.'/file.csv', $conf->admin->dir_temp.'/file2.csv', 0, 1); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'move with default mask'); + // To test a move that should work + $result=dol_move($conf->admin->dir_temp.'/file.csv', $conf->admin->dir_temp.'/file2.csv', 0, 1); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'move with default mask'); - // To test a move that should work with forced mask - $result=dol_move($conf->admin->dir_temp.'/file2.csv', $conf->admin->dir_temp.'/file3.csv', '0754', 1); // file should be rwxr-wr-- - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'move with forced mask'); + // To test a move that should work with forced mask + $result=dol_move($conf->admin->dir_temp.'/file2.csv', $conf->admin->dir_temp.'/file3.csv', '0754', 1); // file should be rwxr-wr-- + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'move with forced mask'); - // To test a delete that should success - $result=dol_delete_file($conf->admin->dir_temp.'/file3.csv'); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'delete file'); + // To test a delete that should success + $result=dol_delete_file($conf->admin->dir_temp.'/file3.csv'); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'delete file'); - // Again to test there is error when deleting a non existing file with option disableglob - $result=dol_delete_file($conf->admin->dir_temp.'/file3.csv', 1, 1); - print __METHOD__." result=".$result."\n"; - $this->assertFalse($result, 'delete file that does not exists with disableglo must return ko'); + // Again to test there is error when deleting a non existing file with option disableglob + $result=dol_delete_file($conf->admin->dir_temp.'/file3.csv', 1, 1); + print __METHOD__." result=".$result."\n"; + $this->assertFalse($result, 'delete file that does not exists with disableglo must return ko'); - // Again to test there is no error when deleting a non existing file without option disableglob - $result=dol_delete_file($conf->admin->dir_temp.'/file3csv', 0, 1); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'delete file that does not exists without disabling glob must return ok'); + // Again to test there is no error when deleting a non existing file without option disableglob + $result=dol_delete_file($conf->admin->dir_temp.'/file3csv', 0, 1); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'delete file that does not exists without disabling glob must return ok'); - // Test copy with special char / delete with blob - $result=dol_copy($file, $conf->admin->dir_temp.'/file with [x] and é.csv', 0, 1); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result, 'copy file with special chars, overwrite'); // Should be 1 + // Test copy with special char / delete with blob + $result=dol_copy($file, $conf->admin->dir_temp.'/file with [x] and é.csv', 0, 1); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result, 'copy file with special chars, overwrite'); // Should be 1 - // Try to delete using a glob criteria - $result=dol_delete_file($conf->admin->dir_temp.'/file with [x]*é.csv'); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'delete file using glob'); - } + // Try to delete using a glob criteria + $result=dol_delete_file($conf->admin->dir_temp.'/file with [x]*é.csv'); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'delete file using glob'); + } - /** - * testDolCompressUnCompress - * - * @return void - */ - public function testDolCompressUnCompress() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolCompressUnCompress + * + * @return void + */ + public function testDolCompressUnCompress() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $format='zip'; - $filein=dirname(__FILE__).'/Example_import_company_1.csv'; - $fileout=$conf->admin->dir_temp.'/test.'.$format; - $dirout=$conf->admin->dir_temp.'/test'; + $format='zip'; + $filein=dirname(__FILE__).'/Example_import_company_1.csv'; + $fileout=$conf->admin->dir_temp.'/test.'.$format; + $dirout=$conf->admin->dir_temp.'/test'; - dol_delete_file($fileout); - $count=0; - dol_delete_dir_recursive($dirout, $count, 1); + dol_delete_file($fileout); + $count=0; + dol_delete_dir_recursive($dirout, $count, 1); - $errorstring = ''; + $errorstring = ''; - dol_mkdir($conf->admin->dir_temp); - $conf->global->MAIN_ENABLE_LOG_TO_HTML=1; $conf->syslog->enabled=1; $_REQUEST['logtohtml']=1; - $conf->logbuffer=array(); + dol_mkdir($conf->admin->dir_temp); + $conf->global->MAIN_ENABLE_LOG_TO_HTML=1; $conf->syslog->enabled=1; $_REQUEST['logtohtml']=1; + $conf->logbuffer=array(); - $result=dol_compress_file($filein, $fileout, $format, $errorstring); - print __METHOD__." result=".$result."\n"; - print join(', ', $conf->logbuffer); - $this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_file on ".$filein." into ".$fileout." : ".$errorstring); + $result=dol_compress_file($filein, $fileout, $format, $errorstring); + print __METHOD__." result=".$result."\n"; + print join(', ', $conf->logbuffer); + $this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_file on ".$filein." into ".$fileout." : ".$errorstring); - $result=dol_uncompress($fileout, $dirout); - print __METHOD__." result=".join(',', $result)."\n"; - $this->assertEquals(0, count($result), "Pb with dol_uncompress_file of file ".$fileout); + $result=dol_uncompress($fileout, $dirout); + print __METHOD__." result=".join(',', $result)."\n"; + $this->assertEquals(0, count($result), "Pb with dol_uncompress_file of file ".$fileout); - $excludefiles = '/(\.back|\.old|\.log|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i'; - if (preg_match($excludefiles, 'a/temp/b')) { echo '----- Regex OK -----'."\n"; } - $result=dol_compress_dir($dirout, $conf->admin->dir_temp.'/testdir.zip', 'zip', $excludefiles); - print __METHOD__." result=".$result."\n"; - print join(', ', $conf->logbuffer); - $this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_dir of ".$dirout." into ".$conf->admin->dir_temp.'/testdir.zip'); - } + $excludefiles = '/(\.back|\.old|\.log|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i'; + if (preg_match($excludefiles, 'a/temp/b')) { echo '----- Regex OK -----'."\n"; } + $result=dol_compress_dir($dirout, $conf->admin->dir_temp.'/testdir.zip', 'zip', $excludefiles); + print __METHOD__." result=".$result."\n"; + print join(', ', $conf->logbuffer); + $this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_dir of ".$dirout." into ".$conf->admin->dir_temp.'/testdir.zip'); + } - /** - * testDolDirList - * - * @return void - * - * @depends testDolCompressUnCompress - * The depends says test is run only if previous is ok - */ - public function testDolDirList() - { - global $conf,$user,$langs,$db; + /** + * testDolDirList + * + * @return void + * + * @depends testDolCompressUnCompress + * The depends says test is run only if previous is ok + */ + public function testDolDirList() + { + global $conf,$user,$langs,$db; - // Scan dir to guaruante we on't have library jquery twice (we accept exception of duplicte into ckeditor because all dir is removed for debian package, so there is no duplicate). - $founddirs=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.js', array('ckeditor')); - print __METHOD__." count(founddirs)=".count($founddirs)."\n"; - $this->assertEquals(1, count($founddirs)); - } + // Scan dir to guaruante we on't have library jquery twice (we accept exception of duplicte into ckeditor because all dir is removed for debian package, so there is no duplicate). + $founddirs=dol_dir_list(DOL_DOCUMENT_ROOT.'/includes/', 'files', 1, '^jquery\.js', array('ckeditor')); + print __METHOD__." count(founddirs)=".count($founddirs)."\n"; + $this->assertEquals(1, count($founddirs)); + } - /** - * testDolCheckSecureAccessDocument - * - * @return void - */ - public function testDolCheckSecureAccessDocument() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolCheckSecureAccessDocument + * + * @return void + */ + public function testDolCheckSecureAccessDocument() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - //$dummyuser=new User($db); - //$result=restrictedArea($dummyuser,'societe'); + //$dummyuser=new User($db); + //$result=restrictedArea($dummyuser,'societe'); - // We save user properties - $savpermlire = $user->rights->facture->lire; - $savpermcreer = $user->rights->facture->creer; + // We save user properties + $savpermlire = $user->rights->facture->lire; + $savpermcreer = $user->rights->facture->creer; // Check access to SPECIMEN - $user->rights->facture->lire = 0; - $user->rights->facture->creer = 0; - $filename='SPECIMEN.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); - $this->assertEquals(1, $result['accessallowed']); + $user->rights->facture->lire = 0; + $user->rights->facture->creer = 0; + $filename='SPECIMEN.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); + $this->assertEquals(1, $result['accessallowed']); - // Check read permission - $user->rights->facture->lire = 1; - $user->rights->facture->creer = 1; - $filename='FA010101/FA010101.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); - $this->assertEquals(1, $result['accessallowed']); + // Check read permission + $user->rights->facture->lire = 1; + $user->rights->facture->creer = 1; + $filename='FA010101/FA010101.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); + $this->assertEquals(1, $result['accessallowed']); - $user->rights->facture->lire = 0; - $user->rights->facture->creer = 0; - $filename='FA010101/FA010101.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); - $this->assertEquals(0, $result['accessallowed']); + $user->rights->facture->lire = 0; + $user->rights->facture->creer = 0; + $filename='FA010101/FA010101.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'read'); + $this->assertEquals(0, $result['accessallowed']); - // Check write permission - $user->rights->facture->lire = 0; - $user->rights->facture->creer = 0; - $filename='FA010101/FA010101.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); - $this->assertEquals(0, $result['accessallowed']); + // Check write permission + $user->rights->facture->lire = 0; + $user->rights->facture->creer = 0; + $filename='FA010101/FA010101.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); + $this->assertEquals(0, $result['accessallowed']); - $user->rights->facture->lire = 1; - $user->rights->facture->creer = 1; - $filename='FA010101/FA010101.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); - $this->assertEquals(1, $result['accessallowed']); + $user->rights->facture->lire = 1; + $user->rights->facture->creer = 1; + $filename='FA010101/FA010101.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); + $this->assertEquals(1, $result['accessallowed']); - $user->rights->facture->lire = 1; - $user->rights->facture->creer = 0; - $filename='FA010101/FA010101.pdf'; // Filename relative to module part - $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); - $this->assertEquals(0, $result['accessallowed']); + $user->rights->facture->lire = 1; + $user->rights->facture->creer = 0; + $filename='FA010101/FA010101.pdf'; // Filename relative to module part + $result=dol_check_secure_access_document('facture', $filename, 0, '', '', 'write'); + $this->assertEquals(0, $result['accessallowed']); - // We restore user properties - $user->rights->facture->lire = $savpermlire; - $user->rights->facture->creer = $savpermcreer; - } + // We restore user properties + $user->rights->facture->lire = $savpermlire; + $user->rights->facture->creer = $savpermcreer; + } } diff --git a/test/phpunit/FormAdminTest.php b/test/phpunit/FormAdminTest.php index a434841930c..79019e1e7ed 100644 --- a/test/phpunit/FormAdminTest.php +++ b/test/phpunit/FormAdminTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/class/html.formadmin.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,75 +74,75 @@ class FormAdminTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testSelectPaperFormat - * - * @return int - */ - public function testSelectPaperFormat() - { - global $conf,$user,$langs,$db; + /** + * testSelectPaperFormat + * + * @return int + */ + public function testSelectPaperFormat() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new FormAdmin($this->savdb); - $result=$localobject->select_paper_format('', 'paperformat_id', 'A4'); + $result=$localobject->select_paper_format('', 'paperformat_id', 'A4'); - $this->assertEquals($result, '<select class="flat" id="paperformat_id" name="paperformat_id"><option value="EUA4">Format A4 - 210x297 mm</option></select>'); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertEquals($result, '<select class="flat" id="paperformat_id" name="paperformat_id"><option value="EUA4">Format A4 - 210x297 mm</option></select>'); + print __METHOD__." result=".$result."\n"; + return $result; + } } diff --git a/test/phpunit/FormTest.php b/test/phpunit/FormTest.php index 76e7c4e69a8..3345c7ddd1e 100644 --- a/test/phpunit/FormTest.php +++ b/test/phpunit/FormTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/class/html.form.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,46 +74,46 @@ class FormTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests @@ -122,18 +121,18 @@ class FormTest extends PHPUnit\Framework\TestCase * @return void */ protected function tearDown() - { - print __METHOD__."\n"; - } + { + print __METHOD__."\n"; + } - /** - * testSelectProduitsList - * - * @return int - */ - public function testSelectProduitsList() - { - global $conf,$user,$langs,$db; + /** + * testSelectProduitsList + * + * @return int + */ + public function testSelectProduitsList() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -142,16 +141,16 @@ class FormTest extends PHPUnit\Framework\TestCase $localobject=new Form($this->savdb); $result=$localobject->select_produits_list('', 'productid', '', 5, 0, '', 1, 2, 1); - $this->assertEquals(count($result), 5); - print __METHOD__." count result=".count($result)."\n"; + $this->assertEquals(count($result), 5); + print __METHOD__." count result=".count($result)."\n"; - $conf->global->ENTREPOT_EXTRA_STATUS = 1; + $conf->global->ENTREPOT_EXTRA_STATUS = 1; - // Exclude stock in warehouseinternal - $result=$localobject->select_produits_list('', 'productid', '', 5, 0, '', 1, 2, 1, 0, '1', 0, '', 0, 'warehouseclosed,warehouseopen'); - $this->assertEquals(count($result), 5); - print __METHOD__." count result=".count($result)."\n"; + // Exclude stock in warehouseinternal + $result=$localobject->select_produits_list('', 'productid', '', 5, 0, '', 1, 2, 1, 0, '1', 0, '', 0, 'warehouseclosed,warehouseopen'); + $this->assertEquals(count($result), 5); + print __METHOD__." count result=".count($result)."\n"; - return $result; - } + return $result; + } } diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index be050b83b4f..db131fee67c 100644 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -29,16 +29,36 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/functions2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** @@ -50,216 +70,216 @@ if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page i */ class Functions2LibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CoreTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CoreTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - //$db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + //$db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testJsUnEscape - * - * @return void - */ - public function testJsUnEscape() - { - $result=jsUnEscape('%u03BD%u03B5%u03BF'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('νεο', $result); - } + /** + * testJsUnEscape + * + * @return void + */ + public function testJsUnEscape() + { + $result=jsUnEscape('%u03BD%u03B5%u03BF'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('νεο', $result); + } - /** - * testIsValidMailDomain - * - * @return void - */ - public function testIsValidMailDomain() - { - $mail = 'bidon@unvalid.unvalid'; - $result = isValidMailDomain($mail); - $this->assertEquals(0, $result, 'Email isValidMailDomain('.$mail.') should return 0 (not valid) but returned '.$result); + /** + * testIsValidMailDomain + * + * @return void + */ + public function testIsValidMailDomain() + { + $mail = 'bidon@unvalid.unvalid'; + $result = isValidMailDomain($mail); + $this->assertEquals(0, $result, 'Email isValidMailDomain('.$mail.') should return 0 (not valid) but returned '.$result); - $mail = 'bidon@dolibarr.org'; - $result = isValidMailDomain($mail); - $this->assertEquals(1, $result, 'Email isValidMailDomain('.$mail.') should return 1 (valid) but returned '.$result); - } + $mail = 'bidon@dolibarr.org'; + $result = isValidMailDomain($mail); + $this->assertEquals(1, $result, 'Email isValidMailDomain('.$mail.') should return 1 (valid) but returned '.$result); + } - /** - * testIsValidURL - * - * @return void - */ - public function testIsValidUrl() - { - //Simple check - $result = isValidUrl('http://google.com'); - $this->assertEquals(1, $result); + /** + * testIsValidURL + * + * @return void + */ + public function testIsValidUrl() + { + //Simple check + $result = isValidUrl('http://google.com'); + $this->assertEquals(1, $result); - $result = isValidUrl('goo=gle'); // This is good, it might be an alias of hostname - $this->assertEquals(1, $result); + $result = isValidUrl('goo=gle'); // This is good, it might be an alias of hostname + $this->assertEquals(1, $result); - //With scheme check - $result = isValidUrl('http://www.google.com', 1); - $this->assertEquals(1, $result); + //With scheme check + $result = isValidUrl('http://www.google.com', 1); + $this->assertEquals(1, $result); - $result = isValidUrl('ftp://www.google.com', 1); - $this->assertEquals(0, $result); + $result = isValidUrl('ftp://www.google.com', 1); + $this->assertEquals(0, $result); - //With password check invalid. This test should be ko but currently it is not - //$result = isValidUrl('http://user:password@http://www.google.com', 1, 1); - //$this->assertEquals(0, $result); + //With password check invalid. This test should be ko but currently it is not + //$result = isValidUrl('http://user:password@http://www.google.com', 1, 1); + //$this->assertEquals(0, $result); - //With password check valid - $result = isValidUrl('http://user:password@www.google.com', 1, 1); - $this->assertEquals(1, $result); + //With password check valid + $result = isValidUrl('http://user:password@www.google.com', 1, 1); + $this->assertEquals(1, $result); - $result = isValidUrl('http://www.google.com', 1, 1); - $this->assertEquals(0, $result); + $result = isValidUrl('http://www.google.com', 1, 1); + $this->assertEquals(0, $result); - //With port check - $result = isValidUrl('http://google.com:8080', 0, 0, 1); - $this->assertEquals(1, $result); + //With port check + $result = isValidUrl('http://google.com:8080', 0, 0, 1); + $this->assertEquals(1, $result); - $result = isValidUrl('http://google.com', 0, 0, 1); - $this->assertEquals(0, $result); + $result = isValidUrl('http://google.com', 0, 0, 1); + $this->assertEquals(0, $result); - //With path check - $result = isValidUrl('http://google.com/search', 0, 0, 0, 1); - $this->assertEquals(1, $result); + //With path check + $result = isValidUrl('http://google.com/search', 0, 0, 0, 1); + $this->assertEquals(1, $result); - $result = isValidUrl('http://google.com', 0, 0, 0, 0); - $this->assertEquals(1, $result); + $result = isValidUrl('http://google.com', 0, 0, 0, 0); + $this->assertEquals(1, $result); - //With query check - $result = isValidUrl('http://google.com/search?test=test', 0, 0, 0, 0, 1); - $this->assertEquals(1, $result); + //With query check + $result = isValidUrl('http://google.com/search?test=test', 0, 0, 0, 0, 1); + $this->assertEquals(1, $result); - //With query check - $result = isValidUrl('http://google.com?test=test', 0, 0, 0, 0, 1); - $this->assertEquals(1, $result); + //With query check + $result = isValidUrl('http://google.com?test=test', 0, 0, 0, 0, 1); + $this->assertEquals(1, $result); - $result = isValidUrl('http://google.com', 0, 0, 0, 0, 1); - $this->assertEquals(0, $result); + $result = isValidUrl('http://google.com', 0, 0, 0, 0, 1); + $this->assertEquals(0, $result); - //With anchor check - $result = isValidUrl('http://google.com/search#done', 0, 0, 0, 0, 0, 1); - $this->assertEquals(1, $result); + //With anchor check + $result = isValidUrl('http://google.com/search#done', 0, 0, 0, 0, 0, 1); + $this->assertEquals(1, $result); - $result = isValidUrl('http://google.com/search', 0, 0, 0, 0, 0, 1); - $this->assertEquals(0, $result); - } + $result = isValidUrl('http://google.com/search', 0, 0, 0, 0, 0, 1); + $this->assertEquals(0, $result); + } - /** - * testIsIP - * - * @return void - */ - public function testIsIP() - { - // Not valid - $ip='a299.299.299.299'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(0, $result, $ip); + /** + * testIsIP + * + * @return void + */ + public function testIsIP() + { + // Not valid + $ip='a299.299.299.299'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(0, $result, $ip); - // Reserved IP range (not checked by is_ip function) - $ip='169.254.0.0'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - //$this->assertEquals(2,$result,$ip); // Assertion disabled because returned value differs between PHP patch version + // Reserved IP range (not checked by is_ip function) + $ip='169.254.0.0'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + //$this->assertEquals(2,$result,$ip); // Assertion disabled because returned value differs between PHP patch version - $ip='1.2.3.4'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(1, $result, $ip); + $ip='1.2.3.4'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(1, $result, $ip); - // Private IP ranges - $ip='10.0.0.0'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(2, $result, $ip); + // Private IP ranges + $ip='10.0.0.0'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(2, $result, $ip); - $ip='172.16.0.0'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(2, $result, $ip); + $ip='172.16.0.0'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(2, $result, $ip); - $ip='192.168.0.0'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(2, $result, $ip); - } + $ip='192.168.0.0'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(2, $result, $ip); + } } diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 8dc903642e0..e43453b26ec 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -30,16 +30,36 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** * Class for PHPUnit tests @@ -50,1445 +70,1455 @@ if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page i */ class FunctionsLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; - - /** - * Constructor - * We save global variables into local variables - * - * @return CoreTest - */ - 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"; - } - - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - - if (! function_exists('mb_substr')) { print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(); } - - print __METHOD__."\n"; - } - - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - //$db->rollback(); - - print __METHOD__."\n"; - } - - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - print __METHOD__."\n"; - } - - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } - - /** - * testIsValidEmail - * - * @return void - */ - public function testIsValidEmail() - { - // Nb of line is same than entry text - - $input="bidon@bademail"; - $result=isValidEmail($input); - print __METHOD__." result=".$result."\n"; - $this->assertFalse($result, 'Check isValidEmail '.$input); - - $input="test@yahoo.com"; - $result=isValidEmail($input); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'Check isValidEmail '.$input); - - $input="The name of sender <test@yahoo.com>"; - $result=isValidEmail($input); - print __METHOD__." result=".$result."\n"; - $this->assertFalse($result, 'Check isValidEmail '.$input); - - $input="1234.abcdefg@domainame.com.br"; - $result=isValidEmail($input); - print __METHOD__." result=".$result."\n"; - $this->assertTrue($result, 'Check isValidEmail '.$input); - } - - /** - * testIsValidMXRecord - * - * @return void - */ - public function testIsValidMXRecord() - { - // Nb of line is same than entry text - - $input="yahoo.com"; - $result=isValidMXRecord($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result); - - $input="yhaoo.com"; - $result=isValidMXRecord($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result); - - $input="dolibarr.fr"; - $result=isValidMXRecord($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result); - } - - /** - * testDolGetFirstLineOfText - * - * @return void - */ - public function testDolGetFirstLineOfText() - { - // Nb of line is same than entry text - - $input="aaaa"; - $result=dolGetFirstLineOfText($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa", $result); - - $input="aaaa\nbbbbbbbbbbbb\n"; - $result=dolGetFirstLineOfText($input, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa\nbbbbbbbbbbbb", $result); - - $input="aaaa<br>bbbbbbbbbbbb<br>"; - $result=dolGetFirstLineOfText($input, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb", $result); - - // Nb of line is lower - - $input="aaaa\nbbbbbbbbbbbb\ncccccc\n"; - $result=dolGetFirstLineOfText($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa...", $result); - - $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; - $result=dolGetFirstLineOfText($input); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa...", $result); - - $input="aaaa\nbbbbbbbbbbbb\ncccccc\n"; - $result=dolGetFirstLineOfText($input, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa\nbbbbbbbbbbbb...", $result); - - $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; - $result=dolGetFirstLineOfText($input, 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb...", $result); - - // Nb of line is higher - - $input="aaaa<br>bbbbbbbbbbbb<br>cccccc"; - $result=dolGetFirstLineOfText($input, 100); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 a'); - - $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; - $result=dolGetFirstLineOfText($input, 100); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 b'); - - $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>\n"; - $result=dolGetFirstLineOfText($input, 100); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 c'); - } - - - /** - * testDolBuildPath - * - * @return void - */ - public function testDolBuildPath() - { - /*$tmp=dol_buildpath('/google/oauth2callback.php', 0); - var_dump($tmp); - */ - - /*$tmp=dol_buildpath('/google/oauth2callback.php', 1); - var_dump($tmp); - */ - - $result=dol_buildpath('/google/oauth2callback.php', 2); - print __METHOD__." result=".$result."\n"; - $this->assertStringStartsWith('http', $result); - - $result=dol_buildpath('/google/oauth2callback.php', 3); - print __METHOD__." result=".$result."\n"; - $this->assertStringStartsWith('http', $result); - } - - - /** - * testGetBrowserInfo - * - * @return void - */ - public function testGetBrowserInfo() - { - // MSIE 5.0 - $user_agent ='Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; KITV4 Wanadoo; KITV5 Wanadoo)'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('ie', $tmp['browsername']); - $this->assertEquals('5.0', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - // Firefox 0.9.1 - $user_agent ='Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firefox/0.9.1'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('firefox', $tmp['browsername']); - $this->assertEquals('0.9.1', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - $user_agent ='Mozilla/3.0 (Windows 98; U) Opera 6.03 [en]'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('opera', $tmp['browsername']); - $this->assertEquals('6.03', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - $user_agent ='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('chrome', $tmp['browsername']); - $this->assertEquals('19.0.1042.0', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - $user_agent ='chrome (Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11)'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('chrome', $tmp['browsername']); - $this->assertEquals('17.0.963.56', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - $user_agent ='Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('safari', $tmp['browsername']); - $this->assertEquals('533.21.1', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - //Internet Explorer 11 - $user_agent = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('ie', $tmp['browsername']); - $this->assertEquals('11.0', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - //Internet Explorer 11 bis - $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP06; rv:11.0) like Gecko'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('ie', $tmp['browsername']); - $this->assertEquals('11.0', $tmp['browserversion']); - $this->assertEmpty($tmp['phone']); - $this->assertFalse($tmp['tablet']); - $this->assertEquals('classic', $tmp['layout']); - - //iPad - $user_agent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25'; - $tmp=getBrowserInfo($user_agent); - $this->assertEquals('safari', $tmp['browsername']); - $this->assertEquals('8536.25', $tmp['browserversion']); - $this->assertEquals('ios', $tmp['browseros']); - $this->assertEquals('tablet', $tmp['layout']); - $this->assertEquals('iphone', $tmp['phone']); - } - - - /** - * testGetLanguageCodeFromCountryCode - * - * @return void - */ - public function testGetLanguageCodeFromCountryCode() - { - global $mysoc; - - $language = getLanguageCodeFromCountryCode('US'); - $this->assertEquals('en_US', $language, 'US'); - - $language = getLanguageCodeFromCountryCode('ES'); - $this->assertEquals('es_ES', $language, 'ES'); - - $language = getLanguageCodeFromCountryCode('CL'); - $this->assertEquals('es_CL', $language, 'CL'); - - $language = getLanguageCodeFromCountryCode('CA'); - $this->assertEquals('en_CA', $language, 'CA'); - - $language = getLanguageCodeFromCountryCode('MQ'); - $this->assertEquals('fr_CA', $language); - - $language = getLanguageCodeFromCountryCode('FR'); - $this->assertEquals('fr_FR', $language); - - $language = getLanguageCodeFromCountryCode('BE'); - $this->assertEquals('fr_BE', $language); - - $mysoc->country_code = 'FR'; - $language = getLanguageCodeFromCountryCode('CH'); - $this->assertEquals('fr_CH', $language); - - $mysoc->country_code = 'DE'; - $language = getLanguageCodeFromCountryCode('CH'); - $this->assertEquals('de_CH', $language); - - $language = getLanguageCodeFromCountryCode('DE'); - $this->assertEquals('de_DE', $language); - - $language = getLanguageCodeFromCountryCode('SA'); - $this->assertEquals('ar_SA', $language); - - $language = getLanguageCodeFromCountryCode('SE'); - $this->assertEquals('sv_SE', $language); - - $language = getLanguageCodeFromCountryCode('DK'); - $this->assertEquals('da_DK', $language); - } - - /** - * testDolTextIsHtml - * - * @return void - */ - public function testDolTextIsHtml() - { - // True - $input='<html>xxx</html>'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with html tag'); - $input='<body>xxx</body>'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with body tag'); - $input='xxx <b>yyy</b> zzz'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with b tag'); - $input='xxx <u>yyy</u> zzz'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with u tag'); - $input='text with <div>some div</div>'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with div tag'); - $input='text with HTML &nbsp; entities'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities tag'); - $input='xxx<br>'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities br'); - $input='xxx<br >'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities br'); - $input='xxx<br style="eee">'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities br and attributes'); - $input='xxx<br style="eee" >'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities br and attributes bis'); - $input='<h2>abc</h2>'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with entities h2'); - $input='<img id="abc" src="https://xxx.com/aaa/image.png" />'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with img tag'); - $input='<a class="azerty" href="https://xxx.com/aaa/image.png" />'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with a tag'); - $input='This is a text with&nbsp;html spaces'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with a &nbsp;'); - $input='This is a text with accent &eacute;'; - $after=dol_textishtml($input); - $this->assertTrue($after, 'Test with a &eacute;'); - - // False - $input='xxx < br>'; - $after=dol_textishtml($input); - $this->assertFalse($after); - $input='xxx <email@email.com>'; // <em> is html, <em... is not - $after=dol_textishtml($input); - $this->assertFalse($after); - $input='xxx <brstyle="ee">'; - $after=dol_textishtml($input); - $this->assertFalse($after); - $input='This is a text with html comments <!-- comment -->'; // we suppose this is not enough to be html content - $after=dol_textishtml($input); - $this->assertFalse($after); - } - - - /** - * testDolHtmlCleanLastBr - * - * @return boolean - */ - public function testDolHtmlCleanLastBr() - { - $input="A string\n"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string", $after); - - $input="A string first\nA string second\n"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string first\nA string second", $after); - - $input="A string\n\n\n"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string", $after); - - $input="A string<br>"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string", $after); - - $input="A string first<br>\nA string second<br>"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string first<br>\nA string second", $after); - - $input="A string\n<br type=\"_moz\" />\n"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string", $after); - - $input="A string\n<br><br />\n\n"; - $after=dol_htmlcleanlastbr($input); - $this->assertEquals("A string", $after); - - return true; - } - - /** - * testDolConcat - * - * @return boolean - */ - public function testDolConcat() - { - $text1="A string 1"; $text2="A string 2"; // text 1 and 2 are text, concat need only \n - $after=dol_concatdesc($text1, $text2); - $this->assertEquals("A string 1\nA string 2", $after); - - $text1="A<br>string 1"; $text2="A string 2"; // text 1 is html, concat need <br>\n - $after=dol_concatdesc($text1, $text2); - $this->assertEquals("A<br>string 1<br>\nA string 2", $after); - - $text1="A string 1"; $text2="A <b>string</b> 2"; // text 2 is html, concat need <br>\n - $after=dol_concatdesc($text1, $text2); - $this->assertEquals("A string 1<br>\nA <b>string</b> 2", $after); - - return true; - } - - - /** - * testDolStringNohtmltag - * - * @return boolean - */ - public function testDolStringNohtmltag() - { - $text="A\nstring\n\nand more\n"; - $after=dol_string_nohtmltag($text, 0); - $this->assertEquals("A\nstring\n\nand more", $after, "test1a"); - - $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; - $after=dol_string_nohtmltag($text, 0); - $this->assertEquals("A string\n\n\n\n\nwith html tag", $after, 'test2a 2 br and 3 \n give 5 \n'); - - $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; - $after=dol_string_nohtmltag($text, 1); - $this->assertEquals("A string with html tag", $after, 'test2b 2 br and 3 \n give 1 space'); - - $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; - $after=dol_string_nohtmltag($text, 2); - $this->assertEquals("A string\n\nwith html tag", $after, 'test2c 2 br and 3 \n give 2 \n'); - - $text="A <b>string<b><br>\r\n<br>\r\n\r\nwith html tag<br>\n"; - $after=dol_string_nohtmltag($text, 2); - $this->assertEquals("A string\n\nwith html tag", $after, 'test2c 2 br and 3 \r\n give 2 \n'); - - $text="A string<br>Another string"; - $after=dol_string_nohtmltag($text, 0); - $this->assertEquals("A string\nAnother string", $after, "test4"); - - $text="A string<br>Another string"; - $after=dol_string_nohtmltag($text, 1); - $this->assertEquals("A string Another string", $after, "test5"); - - $text='<a href="/myurl" title="<u>Afficher projet</u>">ABC</a>'; - $after=dol_string_nohtmltag($text, 1); - $this->assertEquals("ABC", $after, "test6"); - - $text='<a href="/myurl" title="&lt;u&gt;Afficher projet&lt;/u&gt;">DEF</a>'; - $after=dol_string_nohtmltag($text, 1); - $this->assertEquals("DEF", $after, "test7"); - - $text='<a href="/myurl" title="<u>A title</u>">HIJ</a>'; - $after=dol_string_nohtmltag($text, 0); - $this->assertEquals("HIJ", $after, "test8"); - - $text="A <b>string<b>\n\nwith html tag and '<' chars<br>\n"; - $after=dol_string_nohtmltag($text, 0); - $this->assertEquals("A string\n\nwith html tag and '<' chars", $after, "test9"); - - $text="A <b>string<b>\n\nwith tag with < chars<br>\n"; - $after=dol_string_nohtmltag($text, 1); - $this->assertEquals("A string with tag with < chars", $after, "test10"); - - return true; - } - - - - /** - * testDolHtmlEntitiesBr - * - * @return boolean - */ - public function testDolHtmlEntitiesBr() - { - // Text not already HTML - - $input="A string\nwith a é, &, < and >."; - $after=dol_htmlentitiesbr($input, 0); // Add <br> before \n - $this->assertEquals("A string<br>\nwith a &eacute;, &amp;, &lt; and &gt;.", $after); - - $input="A string\nwith a é, &, < and >."; - $after=dol_htmlentitiesbr($input, 1); // Replace \n with <br> - $this->assertEquals("A string<br>with a &eacute;, &amp;, &lt; and &gt;.", $after); - - $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned - $after=dol_htmlentitiesbr($input, 0); // Add <br> before \n - $this->assertEquals("A string<br>\nwith a &eacute;, &amp;, &lt; and &gt;.", $after); - - $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned - $after=dol_htmlentitiesbr($input, 1); // Replace \n with <br> - $this->assertEquals("A string<br>with a &eacute;, &amp;, &lt; and &gt;.", $after); - - // Text already HTML, so &,<,> should not be converted - - $input="A string<br>\nwith a é, &, < and >."; - $after=dol_htmlentitiesbr($input); - $this->assertEquals("A string<br>\nwith a &eacute;, &, < and >.", $after); - - $input="<li>\nA string with a é, &, < and >.</li>\nAnother string"; - $after=dol_htmlentitiesbr($input); - $this->assertEquals("<li>\nA string with a &eacute;, &, < and >.</li>\nAnother string", $after); - - $input="A string<br>\nwith a é, &, < and >.<br>"; // With some <br> at end that should be cleaned - $after=dol_htmlentitiesbr($input); - $this->assertEquals("A string<br>\nwith a &eacute;, &, < and >.", $after); - - $input="<li>\nA string with a é, &, < and >.</li>\nAnother string<br>"; // With some <br> at end that should be cleaned - $after=dol_htmlentitiesbr($input); - $this->assertEquals("<li>\nA string with a &eacute;, &, < and >.</li>\nAnother string", $after); - - // TODO Add test with param $removelasteolbr = 0 - - return true; - } - - - /** - * testDolNbOfLinesBis - * - * @return boolean - */ - public function testDolNbOfLinesBis() - { - // This is not a html string so nb of lines depends on \n - $input="A string\nwith a é, &, < and > and bold tag.\nThird line"; - $after=dol_nboflines_bis($input, 0); - $this->assertEquals($after, 3); - - // This is a html string so nb of lines depends on <br> - $input="A string\nwith a é, &, < and > and <b>bold</b> tag.\nThird line"; - $after=dol_nboflines_bis($input, 0); - $this->assertEquals($after, 1); - - // This is a html string so nb of lines depends on <br> - $input="A string<br>with a é, &, < and > and <b>bold</b> tag.<br>Third line"; - $after=dol_nboflines_bis($input, 0); - $this->assertEquals($after, 3); - - return true; - } - - - /** - * testDolUnaccent - * - * @return boolean - */ - public function testDolUnaccent() - { - // Text not already HTML - - $input="A string\nwith a à ä é è ë ï ü ö ÿ, &, < and >."; - $after=dol_string_unaccent($input); - $this->assertEquals("A string\nwith a a a e e e i u o y, &, < and >.", $after); - } - - - /** - * testDolUtf8Check - * - * @return void - */ - public function testDolUtf8Check() - { - // True - $result=utf8_check('azerty'); - $this->assertTrue($result); - - $file=dirname(__FILE__).'/textutf8.txt'; - $filecontent=file_get_contents($file); - $result=utf8_check($filecontent); - $this->assertTrue($result); - - $file=dirname(__FILE__).'/textiso.txt'; - $filecontent=file_get_contents($file); - $result=utf8_check($filecontent); - $this->assertFalse($result); - } - - /** - * testDolAsciiCheck - * - * @return void - */ - public function testDolAsciiCheck() - { - // True - $result=ascii_check('azerty'); - $this->assertTrue($result); - - $result=ascii_check('é'); - $this->assertFalse($result); - - $file=dirname(__FILE__).'/textutf8.txt'; - $filecontent=file_get_contents($file); - $result=ascii_check($filecontent); - $this->assertFalse($result); - } - - /** - * testDolTrunc - * - * @return boolean - */ - public function testDolTrunc() - { - // Default trunc (will add ... if truncation truncation or keep last char if only one char) - $input="éeéeéeàa"; - $after=dol_trunc($input, 3); - $this->assertEquals("éeé...", $after, 'Test A1'); - $after=dol_trunc($input, 2); - $this->assertEquals("ée...", $after, 'Test A2'); - $after=dol_trunc($input, 1); - $this->assertEquals("é...", $after, 'Test A3'); - $input="éeéeé"; - $after=dol_trunc($input, 3); - $this->assertEquals("éeéeé", $after, 'Test B1'); - $after=dol_trunc($input, 2); - $this->assertEquals("éeéeé", $after, 'Test B2'); - $after=dol_trunc($input, 1); - $this->assertEquals("é...", $after, 'Test B3'); - $input="éeée"; - $after=dol_trunc($input, 3); - $this->assertEquals("éeée", $after, 'Test C1'); - $after=dol_trunc($input, 2); - $this->assertEquals("éeée", $after, 'Test C2'); - $after=dol_trunc($input, 1); - $this->assertEquals("éeée", $after, 'Test C3'); - $input="éeé"; - $after=dol_trunc($input, 3); - $this->assertEquals("éeé", $after, 'Test C'); - $after=dol_trunc($input, 2); - $this->assertEquals("éeé", $after, 'Test D'); - $after=dol_trunc($input, 1); - $this->assertEquals("éeé", $after, 'Test E'); - // Trunc with no ... - $input="éeéeéeàa"; - $after=dol_trunc($input, 3, 'right', 'UTF-8', 1); - $this->assertEquals("éeé", $after, 'Test F'); - $after=dol_trunc($input, 2, 'right', 'UTF-8', 1); - $this->assertEquals("ée", $after, 'Test G'); - $input="éeé"; - $after=dol_trunc($input, 3, 'right', 'UTF-8', 1); - $this->assertEquals("éeé", $after, 'Test H'); - $after=dol_trunc($input, 2, 'right', 'UTF-8', 1); - $this->assertEquals("ée", $after, 'Test I'); - $after=dol_trunc($input, 1, 'right', 'UTF-8', 1); - $this->assertEquals("é", $after, 'Test J'); - $input="éeéeéeàa"; - $after=dol_trunc($input, 4, 'middle'); - $this->assertEquals("ée...àa", $after, 'Test K'); - - return true; - } - - /** - * testDolMkTime - * - * @return void - */ - public function testDolMkTime() - { - global $conf; - - $savtz=date_default_timezone_get(); - - // Some test for UTC TZ - date_default_timezone_set('UTC'); - - // Check bad hours - $result=dol_mktime(25, 0, 0, 1, 1, 1970, 1, 1); // Error (25 hours) - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); - $result=dol_mktime(2, 61, 0, 1, 1, 1970, 1, 1); // Error (61 minutes) - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); - $result=dol_mktime(2, 1, 61, 1, 1, 1970, 1, 1); // Error (61 seconds) - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); - $result=dol_mktime(2, 1, 1, 1, 32, 1970, 1, 1); // Error (day 32) - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); - $result=dol_mktime(2, 1, 1, 13, 1, 1970, 1, 1); // Error (month 13) - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); - - $result=dol_mktime(2, 1, 1, 1, 1, 1970, 1); // 1970-01-01 02:01:01 in GMT area -> 7261 - print __METHOD__." result=".$result."\n"; - $this->assertEquals(7261, $result); - - $result=dol_mktime(2, 0, 0, 1, 1, 1970, 0); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT - print __METHOD__." result=".$result."\n"; - $tz=getServerTimeZoneInt('winter'); // +1 in Europe/Paris at this time (this time is winter) - $this->assertEquals(7200-($tz*3600), $result); // 7200 if we are at greenwich winter, 7200-($tz*3600) at local winter - - // Some test for local TZ Europe/Paris - date_default_timezone_set('Europe/Paris'); - - // Check that tz for paris in winter is used - $result=dol_mktime(2, 0, 0, 1, 1, 1970, 'server'); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT - print __METHOD__." result=".$result."\n"; - $this->assertEquals(3600, $result); // 7200 if we are at greenwich winter, 3600 at Europe/Paris - - // Check that daylight saving time is used - $result=dol_mktime(2, 0, 0, 6, 1, 2014, 0); // 2014-06-01 02:00:00 = 1401588000-3600(location)-3600(daylight) in local area Europe/Paris = 1401588000 GMT - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1401588000-3600-3600, $result); // 1401588000 are at greenwich summer, 1401588000-3600(location)-3600(daylight) at Europe/Paris summer - - date_default_timezone_set($savtz); - } - - - /** - * testDolEscapeJs - * - * @return void - */ - public function testDolEscapeJs() - { - $input="x&<b>#</b>,\"'"; // " will be converted into ' - $result=dol_escape_js($input); - $this->assertEquals("x&<b>#</b>,\'\'", $result, "Test mode=0"); - - $result=dol_escape_js($input, 1); - $this->assertEquals("x&<b>#</b>,\"\'", $result, "Test mode=1"); - - $result=dol_escape_js($input, 2); - $this->assertEquals("x&<b>#</b>,\\\"'", $result, "Test mode=2"); - } - - - /** - * testDolEscapeHtmlTag - * - * @return void - */ - public function testDolEscapeHtmlTag() - { - $input='x&<b>#</b>,"'; // & and " are converted into html entities, <b> are removed - $result=dol_escape_htmltag($input); - $this->assertEquals('x&amp;#,&quot;', $result); - - $input='x&<b>#</b>,"'; // & and " are converted into html entities, <b> are not removed - $result=dol_escape_htmltag($input, 1); - $this->assertEquals('x&amp;&lt;b&gt;#&lt;/b&gt;,&quot;', $result); - } - - - /** - * testDolFormatAddress - * - * @return void - */ - public function testDolFormatAddress() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $object=new Societe($db); - $object->initAsSpecimen(); - - $object->country_code='FR'; - $address=dol_format_address($object); - $this->assertEquals("21 jump street\n99999 MyTown", $address); - - $object->country_code='GB'; - $address=dol_format_address($object); - $this->assertEquals("21 jump street\nMyTown, MyState\n99999", $address); - - $object->country_code='US'; - $address=dol_format_address($object); - $this->assertEquals("21 jump street\nMyTown, MyState, 99999", $address); - - $object->country_code='AU'; - $address=dol_format_address($object); - $this->assertEquals("21 jump street\nMyTown, MyState, 99999", $address); - } - - - /** - * testDolFormatAddress - * - * @return void - */ - public function testDolPrintPhone() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $object=new Societe($db); - $object->initAsSpecimen(); - - $object->country_code='FR'; - $phone=dol_print_phone('1234567890', $object->country_code); - $this->assertEquals('<span style="margin-right: 10px;">12&nbsp;34&nbsp;56&nbsp;78&nbsp;90</span>', $phone, 'Phone for FR 1'); - - $object->country_code='FR'; - $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ''); - $this->assertEquals('<span style="margin-right: 10px;">1234567890</span>', $phone, 'Phone for FR 2'); - - $object->country_code='FR'; - $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); - $this->assertEquals('<span style="margin-right: 10px;">12 34 56 78 90</span>', $phone, 'Phone for FR 3'); - - $object->country_code='CA'; - $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); - $this->assertEquals('<span style="margin-right: 10px;">(123) 456-7890</span>', $phone, 'Phone for CA 1'); - } - - - /** - * testImgPicto - * - * @return void - */ - public function testImgPicto() - { - $s=img_picto('title', 'user'); - print __METHOD__." s=".$s."\n"; - $this->assertContains('fa-user', $s, 'testImgPicto1'); - - $s=img_picto('title', 'img.png', 'style="float: right"', 0); - print __METHOD__." s=".$s."\n"; - $this->assertContains('theme', $s, 'testImgPicto2'); - $this->assertContains('style="float: right"', $s, 'testImgPicto2'); - - $s=img_picto('title', '/fullpath/img.png', '', 1); - print __METHOD__." s=".$s."\n"; - $this->assertEquals('<img src="/fullpath/img.png" alt="" title="title" class="inline-block">', $s, 'testImgPicto3'); - - $s=img_picto('title', '/fullpath/img.png', '', true); - print __METHOD__." s=".$s."\n"; - $this->assertEquals('<img src="/fullpath/img.png" alt="" title="title" class="inline-block">', $s, 'testImgPicto4'); - - $s=img_picto('title', 'delete', '', 0, 1); - print __METHOD__." s=".$s."\n"; - $this->assertEquals(DOL_URL_ROOT.'/theme/eldy/img/delete.png', $s, 'testImgPicto5'); - } - - /** - * testDolNow - * - * @return void - */ - public function testDolNow() - { - $now=dol_now('gmt'); - $nowtzserver=dol_now('tzserver'); - print __METHOD__." getServerTimeZoneInt=".(getServerTimeZoneInt('now')*3600)."\n"; - $this->assertEquals(getServerTimeZoneInt('now')*3600, ($nowtzserver-$now)); - } - - /** - * testVerifCond - * - * @return void - */ - public function testVerifCond() - { - $verifcond=verifCond('1==1'); - $this->assertTrue($verifcond, 'Test a true comparison'); - - $verifcond=verifCond('1==2'); - $this->assertFalse($verifcond, 'Test a false comparison'); - - $verifcond=verifCond('$conf->facture->enabled'); - $this->assertTrue($verifcond, 'Test that conf property of a module report true when enabled'); - - $verifcond=verifCond('$conf->moduledummy->enabled'); - $this->assertFalse($verifcond, 'Test that conf property of a module report false when disabled'); - - $verifcond=verifCond(''); - $this->assertTrue($verifcond); - } - - /** - * testGetDefaultTva - * - * @return void - */ - public function testGetDefaultTva() - { - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; - - // Sellers - $companyfrnovat=new Societe($db); - $companyfrnovat->country_code='FR'; - $companyfrnovat->tva_assuj=0; - - $companyfr=new Societe($db); - $companyfr->country_code='FR'; - $companyfr->tva_assuj=1; - $companyfr->tva_intra='FR9999'; - - // Buyers - $companymc=new Societe($db); - $companymc->country_code='MC'; - $companymc->tva_assuj=1; - $companyfr->tva_intra='MC9999'; - - $companyit=new Societe($db); - $companyit->country_code='IT'; - $companyit->tva_assuj=1; - $companyit->tva_intra='IT99999'; - - $companyde=new Societe($db); - $companyde->country_code='DE'; - $companyde->tva_assuj=1; - $companyde->tva_intra='DE99999'; - - $notcompanyde=new Societe($db); - $notcompanyde->country_code='DE'; - $notcompanyde->tva_assuj=0; - $notcompanyde->tva_intra=''; - $notcompanyde->typent_code='TE_PRIVATE'; - - $companyus=new Societe($db); - $companyus->country_code='US'; - $companyus->tva_assuj=1; - $companyus->tva_intra=''; - - - // Test RULE 0 (FR-DE) - // Not tested - - // Test RULE 1 - $vat=get_default_tva($companyfrnovat, $companymc, 0); - $this->assertEquals(0, $vat, 'RULE 1'); - - // Test RULE 2 (FR-FR) - $vat=get_default_tva($companyfr, $companyfr, 0); - $this->assertEquals(20, $vat, 'RULE 2'); - - // Test RULE 2 (FR-MC) - $vat=get_default_tva($companyfr, $companymc, 0); - $this->assertEquals(20, $vat, 'RULE 2'); - - // Test RULE 3 (FR-DE company) - $vat=get_default_tva($companyfr, $companyit, 0); - $this->assertEquals(0, $vat, 'RULE 3'); - - // Test RULE 4 (FR-DE not a company) - $vat=get_default_tva($companyfr, $notcompanyde, 0); - $this->assertEquals(20, $vat, 'RULE 4'); - - // Test RULE 5 (FR-US) - $vat=get_default_tva($companyfr, $companyus, 0); - $this->assertEquals(0, $vat, 'RULE 5'); - - - // We do same tests but with option SERVICE_ARE_ECOMMERCE_200238EC on. - $conf->global->SERVICE_ARE_ECOMMERCE_200238EC = 1; - - - // Test RULE 1 (FR-US) - $vat=get_default_tva($companyfr, $companyus, 0); - $this->assertEquals(0, $vat, 'RULE 1 ECOMMERCE_200238EC'); - - // Test RULE 2 (FR-FR) - $vat=get_default_tva($companyfr, $companyfr, 0); - $this->assertEquals(20, $vat, 'RULE 2 ECOMMERCE_200238EC'); - - // Test RULE 3 (FR-DE company) - $vat=get_default_tva($companyfr, $companyde, 0); - $this->assertEquals(0, $vat, 'RULE 3 ECOMMERCE_200238EC'); - - // Test RULE 4 (FR-DE not a company) - $vat=get_default_tva($companyfr, $notcompanyde, 0); - $this->assertEquals(19, $vat, 'RULE 4 ECOMMERCE_200238EC'); - - // Test RULE 5 (FR-US) - $vat=get_default_tva($companyfr, $companyus, 0); - $this->assertEquals(0, $vat, 'RULE 5 ECOMMERCE_200238EC'); - } - - /** - * testGetDefaultTva - * - * @return void - */ - public function testGetDefaultLocalTax() - { - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; - - $companyfrnovat=new Societe($db); - $companyfrnovat->country_code='FR'; - $companyfrnovat->tva_assuj=0; - $companyfrnovat->localtax1_assuj=0; - $companyfrnovat->localtax2_assuj=0; - - $companyes=new Societe($db); - $companyes->country_code='ES'; - $companyes->tva_assuj=1; - $companyes->localtax1_assuj=1; - $companyes->localtax2_assuj=1; - - $companymc=new Societe($db); - $companymc->country_code='MC'; - $companymc->tva_assuj=1; - $companymc->localtax1_assuj=0; - $companymc->localtax2_assuj=0; - - $companyit=new Societe($db); - $companyit->country_code='IT'; - $companyit->tva_assuj=1; - $companyit->tva_intra='IT99999'; - $companyit->localtax1_assuj=0; - $companyit->localtax2_assuj=0; - - $notcompanyit=new Societe($db); - $notcompanyit->country_code='IT'; - $notcompanyit->tva_assuj=1; - $notcompanyit->tva_intra=''; - $notcompanyit->typent_code='TE_PRIVATE'; - $notcompanyit->localtax1_assuj=0; - $notcompanyit->localtax2_assuj=0; - - $companyus=new Societe($db); - $companyus->country_code='US'; - $companyus->tva_assuj=1; - $companyus->tva_intra=''; - $companyus->localtax1_assuj=0; - $companyus->localtax2_assuj=0; - - // Test RULE FR-MC - $vat1=get_default_localtax($companyfrnovat, $companymc, 1, 0); - $vat2=get_default_localtax($companyfrnovat, $companymc, 2, 0); - $this->assertEquals(0, $vat1); - $this->assertEquals(0, $vat2); - - // Test RULE ES-ES - $vat1=get_default_localtax($companyes, $companyes, 1, 0); - $vat2=get_default_localtax($companyes, $companyes, 2, 0); - $this->assertEquals($vat1, 5.2); - $this->assertStringStartsWith((string) $vat2, '-19:-15:-9'); // Can be -19 (old version) or '-19:-15:-9' (new setup) - - // Test RULE ES-IT - $vat1=get_default_localtax($companyes, $companyit, 1, 0); - $vat2=get_default_localtax($companyes, $companyit, 2, 0); - $this->assertEquals(0, $vat1); - $this->assertEquals(0, $vat2); - - // Test RULE ES-IT - $vat1=get_default_localtax($companyes, $notcompanyit, 1, 0); - $vat2=get_default_localtax($companyes, $notcompanyit, 2, 0); - $this->assertEquals(0, $vat1); - $this->assertEquals(0, $vat2); - - // Test RULE FR-IT - // Not tested - - // Test RULE ES-US - $vat1=get_default_localtax($companyes, $companyus, 1, 0); - $vat2=get_default_localtax($companyes, $companyus, 2, 0); - $this->assertEquals(0, $vat1); - $this->assertEquals(0, $vat2); - } - - - /** - * testDolExplodeIntoArray - * - * @return void - */ - public function testDolExplodeIntoArray() - { - $stringtoexplode='AA=B/B.CC=.EE=FF.HH=GG;.'; - $tmp=dolExplodeIntoArray($stringtoexplode, '.', '='); - - print __METHOD__." tmp=".json_encode($tmp)."\n"; - $this->assertEquals('{"AA":"B\/B","CC":"","EE":"FF","HH":"GG;"}', json_encode($tmp)); - } - - /** - * dol_nl2br - * - * @return void - */ - public function testDolNl2Br() - { - - //String to encode - $string = "a\na"; - - $this->assertEquals(dol_nl2br($string), "a<br>\na"); - - //With $forxml parameter - $this->assertEquals(dol_nl2br($string, 0, 1), "a<br />\na"); - - //Replacing \n by br - $this->assertEquals(dol_nl2br($string, 1), "a<br>a"); - - //With $forxml parameter - $this->assertEquals(dol_nl2br($string, 1, 1), "a<br />a"); - } - - /** - * testDolPrice2Num - * - * @return boolean - */ - public function testDolPrice2Num() - { - global $langs, $conf; - - $oldlangs = $langs; - - $newlangs = new Translate('', $conf); - $newlangs->setDefaultLang('en_US'); - $newlangs->load("main"); - $langs = $newlangs; - - $this->assertEquals(150, price2num('(SELECT/**/CASE/**/WHEN/**/(0<1)/**/THEN/**/SLEEP(5)/**/ELSE/**/SLEEP(0)/**/END)')); - - $this->assertEquals(1000, price2num('1 000.0')); - $this->assertEquals(1000, price2num('1 000', 'MT')); - $this->assertEquals(1000, price2num('1 000', 'MU')); - - $this->assertEquals(1000.123456, price2num('1 000.123456')); - - // Round down - $this->assertEquals(1000.12, price2num('1 000.123452', 'MT')); - $this->assertEquals(1000.12345, price2num('1 000.123452', 'MU'), "Test MU"); - - // Round up - $this->assertEquals(1000.13, price2num('1 000.125456', 'MT')); - $this->assertEquals(1000.12546, price2num('1 000.125456', 'MU'), "Test MU"); - - $this->assertEquals(1, price2num('1.000'), 'Test 1.000 give 1 with english language'); - - // Text can't be converted - $this->assertEquals('12.4$', price2num('12.4$')); - $this->assertEquals('12.4$', price2num('12r.4$')); - - // For spanish language - $newlangs2 = new Translate('', $conf); - $newlangs2->setDefaultLang('es_ES'); - $newlangs2->load("main"); - $langs = $newlangs2; - - // Test with 3 chars after . or , - // If a . is used and there is 3 digits after, it is a thousand separator - $this->assertEquals(1234, price2num('1.234', '', 2), 'Test 1.234 give 1234 with spanish language if user input'); - $this->assertEquals(1.234, price2num('1,234', '', 2), 'Test 1,234 give 1234 with spanish language if user input'); - $this->assertEquals(1234, price2num('1 234', '', 2), 'Test 1 234 give 1234 with spanish language if user input'); - $this->assertEquals(-1.234, price2num('-1.234'), 'Test 1.234 give 1.234 with spanish language'); - $this->assertEquals(-1.234, price2num('-1,234'), 'Test 1,234 give 1234 with spanish language'); - $this->assertEquals(-1234, price2num('-1 234'), 'Test 1 234 give 1234 with spanish language'); - $this->assertEquals(21500123, price2num('21.500.123'), 'Test 21.500.123 give 21500123 with spanish language'); - $this->assertEquals(21500123, price2num('21500.123', 0, 2), 'Test 21500.123 give 21500123 with spanish language if user input'); - $this->assertEquals(21500.123, price2num('21500.123'), 'Test 21500.123 give 21500123 with spanish language'); - $this->assertEquals(21500.123, price2num('21500,123'), 'Test 21500,123 give 21500.123 with spanish language'); - // Test with 2 digits - $this->assertEquals(21500.12, price2num('21500.12'), 'Test 21500.12 give 21500.12 with spanish language'); - $this->assertEquals(21500.12, price2num('21500,12'), 'Test 21500,12 give 21500.12 with spanish language'); - // Test with 3 digits - $this->assertEquals(12123, price2num('12.123', '', 2), 'Test 12.123 give 12123 with spanish language if user input'); - $this->assertEquals(12.123, price2num('12,123', '', 2), 'Test 12,123 give 12.123 with spanish language if user input'); - $this->assertEquals(12.123, price2num('12.123'), 'Test 12.123 give 12.123 with spanish language'); - $this->assertEquals(12.123, price2num('12,123'), 'Test 12,123 give 12.123 with spanish language'); - - // For french language - $newlangs3 = new Translate('', $conf); - $newlangs3->setDefaultLang('fr_FR'); - $newlangs3->load("main"); - $langs = $newlangs3; - - $this->assertEquals(1, price2num('1.000', '', 2), 'Test 1.000 give 1 with french language if user input'); - $this->assertEquals(1, price2num('1.000'), 'Test 1.000 give 1 with french language'); - $this->assertEquals(1000, price2num('1 000'), 'Test 1.000 give 1 with french language'); - $this->assertEquals(1.234, price2num('1.234', '', 2), 'Test 1.234 give 1.234 with french language if user input'); - $this->assertEquals(1.234, price2num('1.234'), 'Test 1.234 give 1.234 with french language'); - $this->assertEquals(1.234, price2num('1,234', '', 2), 'Test 1,234 give 1.234 with french language if user input'); - $this->assertEquals(1.234, price2num('1,234'), 'Test 1,234 give 1.234 with french language'); - $this->assertEquals(21500000, price2num('21500 000'), 'Test 21500 000 give 21500000 with french language'); - $this->assertEquals(21500000, price2num('21 500 000'), 'Test 21 500 000 give 21500000 with french language'); - $this->assertEquals(21500, price2num('21500.00'), 'Test 21500.00 give 21500 with french language'); - $this->assertEquals(21500, price2num('21500,00'), 'Test 21500,00 give 21500 with french language'); - - $langs = $oldlangs; - - return true; - } - - /** - * testDolGetDate - * - * @return boolean - */ - public function testDolGetDate() - { - global $conf; - - $conf->global->MAIN_START_WEEK = 0; - - $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday - $this->assertEquals(5, $tmp['wday']); - - $conf->global->MAIN_START_WEEK = 1; - - $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday - $this->assertEquals(4, $tmp['wday']); - - $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday - $this->assertEquals(5, $tmp['wday']); - - $tmp=dol_getdate(1, false, "Europe/Paris"); // 1/1/1970 and 1 second = thirday - $this->assertEquals(1970, $tmp['year']); - $this->assertEquals(1, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(4, $tmp['wday']); - $this->assertEquals(0, $tmp['yday']); - $this->assertEquals(1, $tmp['hours']); // We are winter, so we are GMT+1 even during summer - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - $tmp=dol_getdate(15638401, false, "Europe/Paris"); // 1/7/1970 and 1 second = wednesday - $this->assertEquals(1970, $tmp['year']); - $this->assertEquals(7, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(3, $tmp['wday']); - $this->assertEquals(181, $tmp['yday']); - $this->assertEquals(1, $tmp['hours']); // There is no daylight in 1970, so we are GMT+1 even during summer - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - $tmp=dol_getdate(1593561601, false, "Europe/Paris"); // 1/7/2020 and 1 second = wednesday - $this->assertEquals(2020, $tmp['year']); - $this->assertEquals(7, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(3, $tmp['wday']); - $this->assertEquals(182, $tmp['yday']); // 182 and not 181, due to the 29th february - $this->assertEquals(2, $tmp['hours']); // There is a daylight, so we are GMT+2 - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - $conf->global->MAIN_USE_OLD_FUNCTIONS_FOR_GETDATE = 1; - - $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday - $this->assertEquals(1970, $tmp['year']); - $this->assertEquals(1, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(4, $tmp['wday']); - $this->assertEquals(0, $tmp['yday']); - // We must disable this because on CI, timezone is may be UTC or something else - //$this->assertEquals(1, $tmp['hours']); // We are winter, so we are GMT+1 even during summer - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - $tmp=dol_getdate(15638401); // 1/7/1970 and 1 second = wednesday - $this->assertEquals(1970, $tmp['year']); - $this->assertEquals(7, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(3, $tmp['wday']); - $this->assertEquals(181, $tmp['yday']); - // We must disable this because on CI, timezone is may be UTC or something else - //$this->assertEquals(1, $tmp['hours']); // There is no daylight in 1970, so we are GMT+1 even during summer - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - $tmp=dol_getdate(1593561601); // 1/7/2020 and 1 second = wednesday - $this->assertEquals(2020, $tmp['year']); - $this->assertEquals(7, $tmp['mon']); - $this->assertEquals(1, $tmp['mday']); - $this->assertEquals(3, $tmp['wday']); - $this->assertEquals(182, $tmp['yday']); // 182 and not 181, due to the 29th february - // We must disable this because on CI, timezone is may be UTC or something else - //$this->assertEquals(2, $tmp['hours']); // There is a daylight, so we are GMT+2 - $this->assertEquals(0, $tmp['minutes']); - $this->assertEquals(1, $tmp['seconds']); - - return true; - } - - - /** - * testMakeSubstitutions - * - * @return boolean - */ - public function testMakeSubstitutions() - { - global $conf, $langs; - $langs->load("main"); - - $substit=array("AAA"=>'Not used', "BBB"=>'Not used', "CCC"=>"C replaced"); - $chaine='This is a string with __[MAIN_THEME]__ and __(DIRECTION)__ and __CCC__'; - $newstring = make_substitutions($chaine, $substit); - $this->assertEquals($newstring, 'This is a string with eldy and ltr and __C replaced__'); - - return true; - } - - /** - * testDolStringIsGoodIso - * - * @return boolean - */ - public function testDolStringIsGoodIso() - { - global $conf, $langs; - - $chaine='This is an ISO string'; - $result = dol_string_is_good_iso($chaine); - $this->assertEquals($result, 1); - - $chaine='This is a not ISO string '.chr(0); - $result = dol_string_is_good_iso($chaine); - $this->assertEquals($result, 0); - - return true; - } - - - /** - * testGetUserRemoteIP - * - * @return boolean - */ - public function testGetUserRemoteIP() - { - global $conf, $langs; - - $_SERVER['HTTP_X_FORWARDED_FOR']='1.2.3.4'; - $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; - $result = getUserRemoteIP(); - $this->assertEquals($result, '1.2.3.4'); - - $_SERVER['HTTP_X_FORWARDED_FOR']='1.2.3.4<corrupted>'; - $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; - $result = getUserRemoteIP(); - $this->assertEquals($result, '5.6.7.8'); - - $_SERVER['HTTP_X_FORWARDED_FOR']='[1:2:3:4]'; - $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; - $result = getUserRemoteIP(); - $this->assertEquals($result, '[1:2:3:4]'); - - return true; - } + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return CoreTest + */ + 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"; + } + + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + if (! function_exists('mb_substr')) { + print "\n".__METHOD__." function mb_substr must be enabled.\n"; die(1); + } + + if ($conf->global->MAIN_MAX_DECIMALS_UNIT != 5) { + print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 5 for this test.\n"; die(1); + } + + if ($conf->global->MAIN_MAX_DECIMALS_TOT != 2) { + print "\n".__METHOD__." bad setup for number of digits for unit amount. Must be 2 for this test.\n"; die(1); + } + + print __METHOD__."\n"; + } + + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + //$db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testIsValidEmail + * + * @return void + */ + public function testIsValidEmail() + { + // Nb of line is same than entry text + + $input="bidon@bademail"; + $result=isValidEmail($input); + print __METHOD__." result=".$result."\n"; + $this->assertFalse($result, 'Check isValidEmail '.$input); + + $input="test@yahoo.com"; + $result=isValidEmail($input); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'Check isValidEmail '.$input); + + $input="The name of sender <test@yahoo.com>"; + $result=isValidEmail($input); + print __METHOD__." result=".$result."\n"; + $this->assertFalse($result, 'Check isValidEmail '.$input); + + $input="1234.abcdefg@domainame.com.br"; + $result=isValidEmail($input); + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result, 'Check isValidEmail '.$input); + } + + /** + * testIsValidMXRecord + * + * @return void + */ + public function testIsValidMXRecord() + { + // Nb of line is same than entry text + + $input="yahoo.com"; + $result=isValidMXRecord($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1, $result); + + $input="yhaoo.com"; + $result=isValidMXRecord($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0, $result); + + $input="dolibarr.fr"; + $result=isValidMXRecord($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0, $result); + } + + /** + * testDolGetFirstLineOfText + * + * @return void + */ + public function testDolGetFirstLineOfText() + { + // Nb of line is same than entry text + + $input="aaaa"; + $result=dolGetFirstLineOfText($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa", $result); + + $input="aaaa\nbbbbbbbbbbbb\n"; + $result=dolGetFirstLineOfText($input, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa\nbbbbbbbbbbbb", $result); + + $input="aaaa<br>bbbbbbbbbbbb<br>"; + $result=dolGetFirstLineOfText($input, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb", $result); + + // Nb of line is lower + + $input="aaaa\nbbbbbbbbbbbb\ncccccc\n"; + $result=dolGetFirstLineOfText($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa...", $result); + + $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; + $result=dolGetFirstLineOfText($input); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa...", $result); + + $input="aaaa\nbbbbbbbbbbbb\ncccccc\n"; + $result=dolGetFirstLineOfText($input, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa\nbbbbbbbbbbbb...", $result); + + $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; + $result=dolGetFirstLineOfText($input, 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb...", $result); + + // Nb of line is higher + + $input="aaaa<br>bbbbbbbbbbbb<br>cccccc"; + $result=dolGetFirstLineOfText($input, 100); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 a'); + + $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>"; + $result=dolGetFirstLineOfText($input, 100); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 b'); + + $input="aaaa<br>bbbbbbbbbbbb<br>cccccc<br>\n"; + $result=dolGetFirstLineOfText($input, 100); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("aaaa<br>\nbbbbbbbbbbbb<br>\ncccccc", $result, 'dolGetFirstLineOfText with nb 100 c'); + } + + + /** + * testDolBuildPath + * + * @return void + */ + public function testDolBuildPath() + { + /*$tmp=dol_buildpath('/google/oauth2callback.php', 0); + var_dump($tmp); + */ + + /*$tmp=dol_buildpath('/google/oauth2callback.php', 1); + var_dump($tmp); + */ + + $result=dol_buildpath('/google/oauth2callback.php', 2); + print __METHOD__." result=".$result."\n"; + $this->assertStringStartsWith('http', $result); + + $result=dol_buildpath('/google/oauth2callback.php', 3); + print __METHOD__." result=".$result."\n"; + $this->assertStringStartsWith('http', $result); + } + + + /** + * testGetBrowserInfo + * + * @return void + */ + public function testGetBrowserInfo() + { + // MSIE 5.0 + $user_agent ='Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; KITV4 Wanadoo; KITV5 Wanadoo)'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('ie', $tmp['browsername']); + $this->assertEquals('5.0', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + // Firefox 0.9.1 + $user_agent ='Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firefox/0.9.1'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('firefox', $tmp['browsername']); + $this->assertEquals('0.9.1', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + $user_agent ='Mozilla/3.0 (Windows 98; U) Opera 6.03 [en]'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('opera', $tmp['browsername']); + $this->assertEquals('6.03', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + $user_agent ='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('chrome', $tmp['browsername']); + $this->assertEquals('19.0.1042.0', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + $user_agent ='chrome (Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11)'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('chrome', $tmp['browsername']); + $this->assertEquals('17.0.963.56', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + $user_agent ='Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('safari', $tmp['browsername']); + $this->assertEquals('533.21.1', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + //Internet Explorer 11 + $user_agent = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('ie', $tmp['browsername']); + $this->assertEquals('11.0', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + //Internet Explorer 11 bis + $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; NP06; rv:11.0) like Gecko'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('ie', $tmp['browsername']); + $this->assertEquals('11.0', $tmp['browserversion']); + $this->assertEmpty($tmp['phone']); + $this->assertFalse($tmp['tablet']); + $this->assertEquals('classic', $tmp['layout']); + + //iPad + $user_agent = 'Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25'; + $tmp=getBrowserInfo($user_agent); + $this->assertEquals('safari', $tmp['browsername']); + $this->assertEquals('8536.25', $tmp['browserversion']); + $this->assertEquals('ios', $tmp['browseros']); + $this->assertEquals('tablet', $tmp['layout']); + $this->assertEquals('iphone', $tmp['phone']); + } + + + /** + * testGetLanguageCodeFromCountryCode + * + * @return void + */ + public function testGetLanguageCodeFromCountryCode() + { + global $mysoc; + + $language = getLanguageCodeFromCountryCode('US'); + $this->assertEquals('en_US', $language, 'US'); + + $language = getLanguageCodeFromCountryCode('ES'); + $this->assertEquals('es_ES', $language, 'ES'); + + $language = getLanguageCodeFromCountryCode('CL'); + $this->assertEquals('es_CL', $language, 'CL'); + + $language = getLanguageCodeFromCountryCode('CA'); + $this->assertEquals('en_CA', $language, 'CA'); + + $language = getLanguageCodeFromCountryCode('MQ'); + $this->assertEquals('fr_CA', $language); + + $language = getLanguageCodeFromCountryCode('FR'); + $this->assertEquals('fr_FR', $language); + + $language = getLanguageCodeFromCountryCode('BE'); + $this->assertEquals('fr_BE', $language); + + $mysoc->country_code = 'FR'; + $language = getLanguageCodeFromCountryCode('CH'); + $this->assertEquals('fr_CH', $language); + + $mysoc->country_code = 'DE'; + $language = getLanguageCodeFromCountryCode('CH'); + $this->assertEquals('de_CH', $language); + + $language = getLanguageCodeFromCountryCode('DE'); + $this->assertEquals('de_DE', $language); + + $language = getLanguageCodeFromCountryCode('SA'); + $this->assertEquals('ar_SA', $language); + + $language = getLanguageCodeFromCountryCode('SE'); + $this->assertEquals('sv_SE', $language); + + $language = getLanguageCodeFromCountryCode('DK'); + $this->assertEquals('da_DK', $language); + } + + /** + * testDolTextIsHtml + * + * @return void + */ + public function testDolTextIsHtml() + { + // True + $input='<html>xxx</html>'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with html tag'); + $input='<body>xxx</body>'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with body tag'); + $input='xxx <b>yyy</b> zzz'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with b tag'); + $input='xxx <u>yyy</u> zzz'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with u tag'); + $input='text with <div>some div</div>'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with div tag'); + $input='text with HTML &nbsp; entities'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities tag'); + $input='xxx<br>'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities br'); + $input='xxx<br >'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities br'); + $input='xxx<br style="eee">'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities br and attributes'); + $input='xxx<br style="eee" >'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities br and attributes bis'); + $input='<h2>abc</h2>'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with entities h2'); + $input='<img id="abc" src="https://xxx.com/aaa/image.png" />'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with img tag'); + $input='<a class="azerty" href="https://xxx.com/aaa/image.png" />'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with a tag'); + $input='This is a text with&nbsp;html spaces'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with a &nbsp;'); + $input='This is a text with accent &eacute;'; + $after=dol_textishtml($input); + $this->assertTrue($after, 'Test with a &eacute;'); + + // False + $input='xxx < br>'; + $after=dol_textishtml($input); + $this->assertFalse($after); + $input='xxx <email@email.com>'; // <em> is html, <em... is not + $after=dol_textishtml($input); + $this->assertFalse($after); + $input='xxx <brstyle="ee">'; + $after=dol_textishtml($input); + $this->assertFalse($after); + $input='This is a text with html comments <!-- comment -->'; // we suppose this is not enough to be html content + $after=dol_textishtml($input); + $this->assertFalse($after); + } + + + /** + * testDolHtmlCleanLastBr + * + * @return boolean + */ + public function testDolHtmlCleanLastBr() + { + $input="A string\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string", $after); + + $input="A string first\nA string second\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string first\nA string second", $after); + + $input="A string\n\n\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string", $after); + + $input="A string<br>"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string", $after); + + $input="A string first<br>\nA string second<br>"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string first<br>\nA string second", $after); + + $input="A string\n<br type=\"_moz\" />\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string", $after); + + $input="A string\n<br><br />\n\n"; + $after=dol_htmlcleanlastbr($input); + $this->assertEquals("A string", $after); + + return true; + } + + /** + * testDolConcat + * + * @return boolean + */ + public function testDolConcat() + { + $text1="A string 1"; $text2="A string 2"; // text 1 and 2 are text, concat need only \n + $after=dol_concatdesc($text1, $text2); + $this->assertEquals("A string 1\nA string 2", $after); + + $text1="A<br>string 1"; $text2="A string 2"; // text 1 is html, concat need <br>\n + $after=dol_concatdesc($text1, $text2); + $this->assertEquals("A<br>string 1<br>\nA string 2", $after); + + $text1="A string 1"; $text2="A <b>string</b> 2"; // text 2 is html, concat need <br>\n + $after=dol_concatdesc($text1, $text2); + $this->assertEquals("A string 1<br>\nA <b>string</b> 2", $after); + + return true; + } + + + /** + * testDolStringNohtmltag + * + * @return boolean + */ + public function testDolStringNohtmltag() + { + $text="A\nstring\n\nand more\n"; + $after=dol_string_nohtmltag($text, 0); + $this->assertEquals("A\nstring\n\nand more", $after, "test1a"); + + $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; + $after=dol_string_nohtmltag($text, 0); + $this->assertEquals("A string\n\n\n\n\nwith html tag", $after, 'test2a 2 br and 3 \n give 5 \n'); + + $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; + $after=dol_string_nohtmltag($text, 1); + $this->assertEquals("A string with html tag", $after, 'test2b 2 br and 3 \n give 1 space'); + + $text="A <b>string<b><br>\n<br>\n\nwith html tag<br>\n"; + $after=dol_string_nohtmltag($text, 2); + $this->assertEquals("A string\n\nwith html tag", $after, 'test2c 2 br and 3 \n give 2 \n'); + + $text="A <b>string<b><br>\r\n<br>\r\n\r\nwith html tag<br>\n"; + $after=dol_string_nohtmltag($text, 2); + $this->assertEquals("A string\n\nwith html tag", $after, 'test2c 2 br and 3 \r\n give 2 \n'); + + $text="A string<br>Another string"; + $after=dol_string_nohtmltag($text, 0); + $this->assertEquals("A string\nAnother string", $after, "test4"); + + $text="A string<br>Another string"; + $after=dol_string_nohtmltag($text, 1); + $this->assertEquals("A string Another string", $after, "test5"); + + $text='<a href="/myurl" title="<u>Afficher projet</u>">ABC</a>'; + $after=dol_string_nohtmltag($text, 1); + $this->assertEquals("ABC", $after, "test6"); + + $text='<a href="/myurl" title="&lt;u&gt;Afficher projet&lt;/u&gt;">DEF</a>'; + $after=dol_string_nohtmltag($text, 1); + $this->assertEquals("DEF", $after, "test7"); + + $text='<a href="/myurl" title="<u>A title</u>">HIJ</a>'; + $after=dol_string_nohtmltag($text, 0); + $this->assertEquals("HIJ", $after, "test8"); + + $text="A <b>string<b>\n\nwith html tag and '<' chars<br>\n"; + $after=dol_string_nohtmltag($text, 0); + $this->assertEquals("A string\n\nwith html tag and '<' chars", $after, "test9"); + + $text="A <b>string<b>\n\nwith tag with < chars<br>\n"; + $after=dol_string_nohtmltag($text, 1); + $this->assertEquals("A string with tag with < chars", $after, "test10"); + + return true; + } + + + + /** + * testDolHtmlEntitiesBr + * + * @return boolean + */ + public function testDolHtmlEntitiesBr() + { + // Text not already HTML + + $input="A string\nwith a é, &, < and >."; + $after=dol_htmlentitiesbr($input, 0); // Add <br> before \n + $this->assertEquals("A string<br>\nwith a &eacute;, &amp;, &lt; and &gt;.", $after); + + $input="A string\nwith a é, &, < and >."; + $after=dol_htmlentitiesbr($input, 1); // Replace \n with <br> + $this->assertEquals("A string<br>with a &eacute;, &amp;, &lt; and &gt;.", $after); + + $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned + $after=dol_htmlentitiesbr($input, 0); // Add <br> before \n + $this->assertEquals("A string<br>\nwith a &eacute;, &amp;, &lt; and &gt;.", $after); + + $input="A string\nwith a é, &, < and >.\n\n"; // With some \n at end that should be cleaned + $after=dol_htmlentitiesbr($input, 1); // Replace \n with <br> + $this->assertEquals("A string<br>with a &eacute;, &amp;, &lt; and &gt;.", $after); + + // Text already HTML, so &,<,> should not be converted + + $input="A string<br>\nwith a é, &, < and >."; + $after=dol_htmlentitiesbr($input); + $this->assertEquals("A string<br>\nwith a &eacute;, &, < and >.", $after); + + $input="<li>\nA string with a é, &, < and >.</li>\nAnother string"; + $after=dol_htmlentitiesbr($input); + $this->assertEquals("<li>\nA string with a &eacute;, &, < and >.</li>\nAnother string", $after); + + $input="A string<br>\nwith a é, &, < and >.<br>"; // With some <br> at end that should be cleaned + $after=dol_htmlentitiesbr($input); + $this->assertEquals("A string<br>\nwith a &eacute;, &, < and >.", $after); + + $input="<li>\nA string with a é, &, < and >.</li>\nAnother string<br>"; // With some <br> at end that should be cleaned + $after=dol_htmlentitiesbr($input); + $this->assertEquals("<li>\nA string with a &eacute;, &, < and >.</li>\nAnother string", $after); + + // TODO Add test with param $removelasteolbr = 0 + + return true; + } + + + /** + * testDolNbOfLinesBis + * + * @return boolean + */ + public function testDolNbOfLinesBis() + { + // This is not a html string so nb of lines depends on \n + $input="A string\nwith a é, &, < and > and bold tag.\nThird line"; + $after=dol_nboflines_bis($input, 0); + $this->assertEquals($after, 3); + + // This is a html string so nb of lines depends on <br> + $input="A string\nwith a é, &, < and > and <b>bold</b> tag.\nThird line"; + $after=dol_nboflines_bis($input, 0); + $this->assertEquals($after, 1); + + // This is a html string so nb of lines depends on <br> + $input="A string<br>with a é, &, < and > and <b>bold</b> tag.<br>Third line"; + $after=dol_nboflines_bis($input, 0); + $this->assertEquals($after, 3); + + return true; + } + + + /** + * testDolUnaccent + * + * @return boolean + */ + public function testDolUnaccent() + { + // Text not already HTML + + $input="A string\nwith a à ä é è ë ï ü ö ÿ, &, < and >."; + $after=dol_string_unaccent($input); + $this->assertEquals("A string\nwith a a a e e e i u o y, &, < and >.", $after); + } + + + /** + * testDolUtf8Check + * + * @return void + */ + public function testDolUtf8Check() + { + // True + $result=utf8_check('azerty'); + $this->assertTrue($result); + + $file=dirname(__FILE__).'/textutf8.txt'; + $filecontent=file_get_contents($file); + $result=utf8_check($filecontent); + $this->assertTrue($result); + + $file=dirname(__FILE__).'/textiso.txt'; + $filecontent=file_get_contents($file); + $result=utf8_check($filecontent); + $this->assertFalse($result); + } + + /** + * testDolAsciiCheck + * + * @return void + */ + public function testDolAsciiCheck() + { + // True + $result=ascii_check('azerty'); + $this->assertTrue($result); + + $result=ascii_check('é'); + $this->assertFalse($result); + + $file=dirname(__FILE__).'/textutf8.txt'; + $filecontent=file_get_contents($file); + $result=ascii_check($filecontent); + $this->assertFalse($result); + } + + /** + * testDolTrunc + * + * @return boolean + */ + public function testDolTrunc() + { + // Default trunc (will add … if truncation truncation or keep last char if only one char) + $input="éeéeéeàa"; + $after=dol_trunc($input, 3); + $this->assertEquals("éeé…", $after, 'Test A1'); + $after=dol_trunc($input, 2); + $this->assertEquals("ée…", $after, 'Test A2'); + $after=dol_trunc($input, 1); + $this->assertEquals("é…", $after, 'Test A3'); + $input="éeée"; + $after=dol_trunc($input, 3); + $this->assertEquals("éeée", $after, 'Test B1'); + $after=dol_trunc($input, 2); + $this->assertEquals("ée…", $after, 'Test B2'); + $after=dol_trunc($input, 1); + $this->assertEquals("é…", $after, 'Test B3'); + $input="éeée"; + $after=dol_trunc($input, 3); + $this->assertEquals("éeée", $after, 'Test C1'); + $after=dol_trunc($input, 2); + $this->assertEquals("ée…", $after, 'Test C2'); + $after=dol_trunc($input, 1); + $this->assertEquals("é…", $after, 'Test C3'); + $input="éeé"; + $after=dol_trunc($input, 3); + $this->assertEquals("éeé", $after, 'Test C'); + $after=dol_trunc($input, 2); + $this->assertEquals("éeé", $after, 'Test D'); + $after=dol_trunc($input, 1); + $this->assertEquals("é…", $after, 'Test E'); + // Trunc with no … + $input="éeéeéeàa"; + $after=dol_trunc($input, 3, 'right', 'UTF-8', 1); + $this->assertEquals("éeé", $after, 'Test F'); + $after=dol_trunc($input, 2, 'right', 'UTF-8', 1); + $this->assertEquals("ée", $after, 'Test G'); + $input="éeé"; + $after=dol_trunc($input, 3, 'right', 'UTF-8', 1); + $this->assertEquals("éeé", $after, 'Test H'); + $after=dol_trunc($input, 2, 'right', 'UTF-8', 1); + $this->assertEquals("ée", $after, 'Test I'); + $after=dol_trunc($input, 1, 'right', 'UTF-8', 1); + $this->assertEquals("é", $after, 'Test J'); + $input="éeéeéeàa"; + $after=dol_trunc($input, 4, 'middle'); + $this->assertEquals("ée…àa", $after, 'Test K'); + + return true; + } + + /** + * testDolMkTime + * + * @return void + */ + public function testDolMkTime() + { + global $conf; + + $savtz=date_default_timezone_get(); + + // Some test for UTC TZ + date_default_timezone_set('UTC'); + + // Check bad hours + $result=dol_mktime(25, 0, 0, 1, 1, 1970, 1, 1); // Error (25 hours) + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); + $result=dol_mktime(2, 61, 0, 1, 1, 1970, 1, 1); // Error (61 minutes) + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); + $result=dol_mktime(2, 1, 61, 1, 1, 1970, 1, 1); // Error (61 seconds) + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); + $result=dol_mktime(2, 1, 1, 1, 32, 1970, 1, 1); // Error (day 32) + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); + $result=dol_mktime(2, 1, 1, 13, 1, 1970, 1, 1); // Error (month 13) + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); + + $result=dol_mktime(2, 1, 1, 1, 1, 1970, 1); // 1970-01-01 02:01:01 in GMT area -> 7261 + print __METHOD__." result=".$result."\n"; + $this->assertEquals(7261, $result); + + $result=dol_mktime(2, 0, 0, 1, 1, 1970, 0); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT + print __METHOD__." result=".$result."\n"; + $tz=getServerTimeZoneInt('winter'); // +1 in Europe/Paris at this time (this time is winter) + $this->assertEquals(7200-($tz*3600), $result); // 7200 if we are at greenwich winter, 7200-($tz*3600) at local winter + + // Some test for local TZ Europe/Paris + date_default_timezone_set('Europe/Paris'); + + // Check that tz for paris in winter is used + $result=dol_mktime(2, 0, 0, 1, 1, 1970, 'server'); // 1970-01-01 02:00:00 = 7200 in local area Europe/Paris = 3600 GMT + print __METHOD__." result=".$result."\n"; + $this->assertEquals(3600, $result); // 7200 if we are at greenwich winter, 3600 at Europe/Paris + + // Check that daylight saving time is used + $result=dol_mktime(2, 0, 0, 6, 1, 2014, 0); // 2014-06-01 02:00:00 = 1401588000-3600(location)-3600(daylight) in local area Europe/Paris = 1401588000 GMT + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1401588000-3600-3600, $result); // 1401588000 are at greenwich summer, 1401588000-3600(location)-3600(daylight) at Europe/Paris summer + + date_default_timezone_set($savtz); + } + + + /** + * testDolEscapeJs + * + * @return void + */ + public function testDolEscapeJs() + { + $input="x&<b>#</b>,\"'"; // " will be converted into ' + $result=dol_escape_js($input); + $this->assertEquals("x&<b>#</b>,\'\'", $result, "Test mode=0"); + + $result=dol_escape_js($input, 1); + $this->assertEquals("x&<b>#</b>,\"\'", $result, "Test mode=1"); + + $result=dol_escape_js($input, 2); + $this->assertEquals("x&<b>#</b>,\\\"'", $result, "Test mode=2"); + } + + + /** + * testDolEscapeHtmlTag + * + * @return void + */ + public function testDolEscapeHtmlTag() + { + $input='x&<b>#</b>,"'; // & and " are converted into html entities, <b> are removed + $result=dol_escape_htmltag($input); + $this->assertEquals('x&amp;#,&quot;', $result); + + $input='x&<b>#</b>,"'; // & and " are converted into html entities, <b> are not removed + $result=dol_escape_htmltag($input, 1); + $this->assertEquals('x&amp;&lt;b&gt;#&lt;/b&gt;,&quot;', $result); + } + + + /** + * testDolFormatAddress + * + * @return void + */ + public function testDolFormatAddress() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $object=new Societe($db); + $object->initAsSpecimen(); + + $object->country_code='FR'; + $address=dol_format_address($object); + $this->assertEquals("21 jump street\n99999 MyTown", $address); + + $object->country_code='GB'; + $address=dol_format_address($object); + $this->assertEquals("21 jump street\nMyTown, MyState\n99999", $address); + + $object->country_code='US'; + $address=dol_format_address($object); + $this->assertEquals("21 jump street\nMyTown, MyState, 99999", $address); + + $object->country_code='AU'; + $address=dol_format_address($object); + $this->assertEquals("21 jump street\nMyTown, MyState, 99999", $address); + } + + + /** + * testDolFormatAddress + * + * @return void + */ + public function testDolPrintPhone() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $object=new Societe($db); + $object->initAsSpecimen(); + + $object->country_code='FR'; + $phone=dol_print_phone('1234567890', $object->country_code); + $this->assertEquals('<span style="margin-right: 10px;">12&nbsp;34&nbsp;56&nbsp;78&nbsp;90</span>', $phone, 'Phone for FR 1'); + + $object->country_code='FR'; + $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ''); + $this->assertEquals('<span style="margin-right: 10px;">1234567890</span>', $phone, 'Phone for FR 2'); + + $object->country_code='FR'; + $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); + $this->assertEquals('<span style="margin-right: 10px;">12 34 56 78 90</span>', $phone, 'Phone for FR 3'); + + $object->country_code='CA'; + $phone=dol_print_phone('1234567890', $object->country_code, 0, 0, 0, ' '); + $this->assertEquals('<span style="margin-right: 10px;">(123) 456-7890</span>', $phone, 'Phone for CA 1'); + } + + + /** + * testImgPicto + * + * @return void + */ + public function testImgPicto() + { + $s=img_picto('title', 'user'); + print __METHOD__." s=".$s."\n"; + $this->assertContains('fa-user', $s, 'testImgPicto1'); + + $s=img_picto('title', 'img.png', 'style="float: right"', 0); + print __METHOD__." s=".$s."\n"; + $this->assertContains('theme', $s, 'testImgPicto2'); + $this->assertContains('style="float: right"', $s, 'testImgPicto2'); + + $s=img_picto('title', '/fullpath/img.png', '', 1); + print __METHOD__." s=".$s."\n"; + $this->assertEquals('<img src="/fullpath/img.png" alt="" title="title" class="inline-block">', $s, 'testImgPicto3'); + + $s=img_picto('title', '/fullpath/img.png', '', true); + print __METHOD__." s=".$s."\n"; + $this->assertEquals('<img src="/fullpath/img.png" alt="" title="title" class="inline-block">', $s, 'testImgPicto4'); + + $s=img_picto('title', 'delete', '', 0, 1); + print __METHOD__." s=".$s."\n"; + $this->assertEquals(DOL_URL_ROOT.'/theme/eldy/img/delete.png', $s, 'testImgPicto5'); + } + + /** + * testDolNow + * + * @return void + */ + public function testDolNow() + { + $now=dol_now('gmt'); + $nowtzserver=dol_now('tzserver'); + print __METHOD__." getServerTimeZoneInt=".(getServerTimeZoneInt('now')*3600)."\n"; + $this->assertEquals(getServerTimeZoneInt('now')*3600, ($nowtzserver-$now)); + } + + /** + * testVerifCond + * + * @return void + */ + public function testVerifCond() + { + $verifcond=verifCond('1==1'); + $this->assertTrue($verifcond, 'Test a true comparison'); + + $verifcond=verifCond('1==2'); + $this->assertFalse($verifcond, 'Test a false comparison'); + + $verifcond=verifCond('$conf->facture->enabled'); + $this->assertTrue($verifcond, 'Test that conf property of a module report true when enabled'); + + $verifcond=verifCond('$conf->moduledummy->enabled'); + $this->assertFalse($verifcond, 'Test that conf property of a module report false when disabled'); + + $verifcond=verifCond(''); + $this->assertTrue($verifcond); + } + + /** + * testGetDefaultTva + * + * @return void + */ + public function testGetDefaultTva() + { + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + // Sellers + $companyfrnovat=new Societe($db); + $companyfrnovat->country_code='FR'; + $companyfrnovat->tva_assuj=0; + + $companyfr=new Societe($db); + $companyfr->country_code='FR'; + $companyfr->tva_assuj=1; + $companyfr->tva_intra='FR9999'; + + // Buyers + $companymc=new Societe($db); + $companymc->country_code='MC'; + $companymc->tva_assuj=1; + $companyfr->tva_intra='MC9999'; + + $companyit=new Societe($db); + $companyit->country_code='IT'; + $companyit->tva_assuj=1; + $companyit->tva_intra='IT99999'; + + $companyde=new Societe($db); + $companyde->country_code='DE'; + $companyde->tva_assuj=1; + $companyde->tva_intra='DE99999'; + + $notcompanyde=new Societe($db); + $notcompanyde->country_code='DE'; + $notcompanyde->tva_assuj=0; + $notcompanyde->tva_intra=''; + $notcompanyde->typent_code='TE_PRIVATE'; + + $companyus=new Societe($db); + $companyus->country_code='US'; + $companyus->tva_assuj=1; + $companyus->tva_intra=''; + + + // Test RULE 0 (FR-DE) + // Not tested + + // Test RULE 1 + $vat=get_default_tva($companyfrnovat, $companymc, 0); + $this->assertEquals(0, $vat, 'RULE 1'); + + // Test RULE 2 (FR-FR) + $vat=get_default_tva($companyfr, $companyfr, 0); + $this->assertEquals(20, $vat, 'RULE 2'); + + // Test RULE 2 (FR-MC) + $vat=get_default_tva($companyfr, $companymc, 0); + $this->assertEquals(20, $vat, 'RULE 2'); + + // Test RULE 3 (FR-DE company) + $vat=get_default_tva($companyfr, $companyit, 0); + $this->assertEquals(0, $vat, 'RULE 3'); + + // Test RULE 4 (FR-DE not a company) + $vat=get_default_tva($companyfr, $notcompanyde, 0); + $this->assertEquals(20, $vat, 'RULE 4'); + + // Test RULE 5 (FR-US) + $vat=get_default_tva($companyfr, $companyus, 0); + $this->assertEquals(0, $vat, 'RULE 5'); + + + // We do same tests but with option SERVICE_ARE_ECOMMERCE_200238EC on. + $conf->global->SERVICE_ARE_ECOMMERCE_200238EC = 1; + + + // Test RULE 1 (FR-US) + $vat=get_default_tva($companyfr, $companyus, 0); + $this->assertEquals(0, $vat, 'RULE 1 ECOMMERCE_200238EC'); + + // Test RULE 2 (FR-FR) + $vat=get_default_tva($companyfr, $companyfr, 0); + $this->assertEquals(20, $vat, 'RULE 2 ECOMMERCE_200238EC'); + + // Test RULE 3 (FR-DE company) + $vat=get_default_tva($companyfr, $companyde, 0); + $this->assertEquals(0, $vat, 'RULE 3 ECOMMERCE_200238EC'); + + // Test RULE 4 (FR-DE not a company) + $vat=get_default_tva($companyfr, $notcompanyde, 0); + $this->assertEquals(19, $vat, 'RULE 4 ECOMMERCE_200238EC'); + + // Test RULE 5 (FR-US) + $vat=get_default_tva($companyfr, $companyus, 0); + $this->assertEquals(0, $vat, 'RULE 5 ECOMMERCE_200238EC'); + } + + /** + * testGetDefaultTva + * + * @return void + */ + public function testGetDefaultLocalTax() + { + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + $companyfrnovat=new Societe($db); + $companyfrnovat->country_code='FR'; + $companyfrnovat->tva_assuj=0; + $companyfrnovat->localtax1_assuj=0; + $companyfrnovat->localtax2_assuj=0; + + $companyes=new Societe($db); + $companyes->country_code='ES'; + $companyes->tva_assuj=1; + $companyes->localtax1_assuj=1; + $companyes->localtax2_assuj=1; + + $companymc=new Societe($db); + $companymc->country_code='MC'; + $companymc->tva_assuj=1; + $companymc->localtax1_assuj=0; + $companymc->localtax2_assuj=0; + + $companyit=new Societe($db); + $companyit->country_code='IT'; + $companyit->tva_assuj=1; + $companyit->tva_intra='IT99999'; + $companyit->localtax1_assuj=0; + $companyit->localtax2_assuj=0; + + $notcompanyit=new Societe($db); + $notcompanyit->country_code='IT'; + $notcompanyit->tva_assuj=1; + $notcompanyit->tva_intra=''; + $notcompanyit->typent_code='TE_PRIVATE'; + $notcompanyit->localtax1_assuj=0; + $notcompanyit->localtax2_assuj=0; + + $companyus=new Societe($db); + $companyus->country_code='US'; + $companyus->tva_assuj=1; + $companyus->tva_intra=''; + $companyus->localtax1_assuj=0; + $companyus->localtax2_assuj=0; + + // Test RULE FR-MC + $vat1=get_default_localtax($companyfrnovat, $companymc, 1, 0); + $vat2=get_default_localtax($companyfrnovat, $companymc, 2, 0); + $this->assertEquals(0, $vat1); + $this->assertEquals(0, $vat2); + + // Test RULE ES-ES + $vat1=get_default_localtax($companyes, $companyes, 1, 0); + $vat2=get_default_localtax($companyes, $companyes, 2, 0); + $this->assertEquals($vat1, 5.2); + $this->assertStringStartsWith((string) $vat2, '-19:-15:-9'); // Can be -19 (old version) or '-19:-15:-9' (new setup) + + // Test RULE ES-IT + $vat1=get_default_localtax($companyes, $companyit, 1, 0); + $vat2=get_default_localtax($companyes, $companyit, 2, 0); + $this->assertEquals(0, $vat1); + $this->assertEquals(0, $vat2); + + // Test RULE ES-IT + $vat1=get_default_localtax($companyes, $notcompanyit, 1, 0); + $vat2=get_default_localtax($companyes, $notcompanyit, 2, 0); + $this->assertEquals(0, $vat1); + $this->assertEquals(0, $vat2); + + // Test RULE FR-IT + // Not tested + + // Test RULE ES-US + $vat1=get_default_localtax($companyes, $companyus, 1, 0); + $vat2=get_default_localtax($companyes, $companyus, 2, 0); + $this->assertEquals(0, $vat1); + $this->assertEquals(0, $vat2); + } + + + /** + * testDolExplodeIntoArray + * + * @return void + */ + public function testDolExplodeIntoArray() + { + $stringtoexplode='AA=B/B.CC=.EE=FF.HH=GG;.'; + $tmp=dolExplodeIntoArray($stringtoexplode, '.', '='); + + print __METHOD__." tmp=".json_encode($tmp)."\n"; + $this->assertEquals('{"AA":"B\/B","CC":"","EE":"FF","HH":"GG;"}', json_encode($tmp)); + } + + /** + * dol_nl2br + * + * @return void + */ + public function testDolNl2Br() + { + + //String to encode + $string = "a\na"; + + $this->assertEquals(dol_nl2br($string), "a<br>\na"); + + //With $forxml parameter + $this->assertEquals(dol_nl2br($string, 0, 1), "a<br />\na"); + + //Replacing \n by br + $this->assertEquals(dol_nl2br($string, 1), "a<br>a"); + + //With $forxml parameter + $this->assertEquals(dol_nl2br($string, 1, 1), "a<br />a"); + } + + /** + * testDolPrice2Num + * + * @return boolean + */ + public function testDolPrice2Num() + { + global $langs, $conf; + + $oldlangs = $langs; + + $newlangs = new Translate('', $conf); + $newlangs->setDefaultLang('en_US'); + $newlangs->load("main"); + $langs = $newlangs; + + $this->assertEquals(150, price2num('(SELECT/**/CASE/**/WHEN/**/(0<1)/**/THEN/**/SLEEP(5)/**/ELSE/**/SLEEP(0)/**/END)')); + + $this->assertEquals(1000, price2num('1 000.0')); + $this->assertEquals(1000, price2num('1 000', 'MT')); + $this->assertEquals(1000, price2num('1 000', 'MU')); + + $this->assertEquals(1000.123456, price2num('1 000.123456')); + + // Round down + $this->assertEquals(1000.12, price2num('1 000.123452', 'MT'), 'Error in round down with MT'); + $this->assertEquals(1000.12345, price2num('1 000.123452', 'MU'), "Test MU"); + + // Round up + $this->assertEquals(1000.13, price2num('1 000.125456', 'MT')); + $this->assertEquals(1000.12546, price2num('1 000.125456', 'MU'), "Test MU"); + + $this->assertEquals(1, price2num('1.000'), 'Test 1.000 give 1 with english language'); + + // Text can't be converted + $this->assertEquals('12.4$', price2num('12.4$')); + $this->assertEquals('12.4$', price2num('12r.4$')); + + // For spanish language + $newlangs2 = new Translate('', $conf); + $newlangs2->setDefaultLang('es_ES'); + $newlangs2->load("main"); + $langs = $newlangs2; + + // Test with 3 chars after . or , + // If a . is used and there is 3 digits after, it is a thousand separator + $this->assertEquals(1234, price2num('1.234', '', 2), 'Test 1.234 give 1234 with spanish language if user input'); + $this->assertEquals(1.234, price2num('1,234', '', 2), 'Test 1,234 give 1234 with spanish language if user input'); + $this->assertEquals(1234, price2num('1 234', '', 2), 'Test 1 234 give 1234 with spanish language if user input'); + $this->assertEquals(-1.234, price2num('-1.234'), 'Test 1.234 give 1.234 with spanish language'); + $this->assertEquals(-1.234, price2num('-1,234'), 'Test 1,234 give 1234 with spanish language'); + $this->assertEquals(-1234, price2num('-1 234'), 'Test 1 234 give 1234 with spanish language'); + $this->assertEquals(21500123, price2num('21.500.123'), 'Test 21.500.123 give 21500123 with spanish language'); + $this->assertEquals(21500123, price2num('21500.123', 0, 2), 'Test 21500.123 give 21500123 with spanish language if user input'); + $this->assertEquals(21500.123, price2num('21500.123'), 'Test 21500.123 give 21500123 with spanish language'); + $this->assertEquals(21500.123, price2num('21500,123'), 'Test 21500,123 give 21500.123 with spanish language'); + // Test with 2 digits + $this->assertEquals(21500.12, price2num('21500.12'), 'Test 21500.12 give 21500.12 with spanish language'); + $this->assertEquals(21500.12, price2num('21500,12'), 'Test 21500,12 give 21500.12 with spanish language'); + // Test with 3 digits + $this->assertEquals(12123, price2num('12.123', '', 2), 'Test 12.123 give 12123 with spanish language if user input'); + $this->assertEquals(12.123, price2num('12,123', '', 2), 'Test 12,123 give 12.123 with spanish language if user input'); + $this->assertEquals(12.123, price2num('12.123'), 'Test 12.123 give 12.123 with spanish language'); + $this->assertEquals(12.123, price2num('12,123'), 'Test 12,123 give 12.123 with spanish language'); + + // For french language + $newlangs3 = new Translate('', $conf); + $newlangs3->setDefaultLang('fr_FR'); + $newlangs3->load("main"); + $langs = $newlangs3; + + $this->assertEquals(1, price2num('1.000', '', 2), 'Test 1.000 give 1 with french language if user input'); + $this->assertEquals(1, price2num('1.000'), 'Test 1.000 give 1 with french language'); + $this->assertEquals(1000, price2num('1 000'), 'Test 1.000 give 1 with french language'); + $this->assertEquals(1.234, price2num('1.234', '', 2), 'Test 1.234 give 1.234 with french language if user input'); + $this->assertEquals(1.234, price2num('1.234'), 'Test 1.234 give 1.234 with french language'); + $this->assertEquals(1.234, price2num('1,234', '', 2), 'Test 1,234 give 1.234 with french language if user input'); + $this->assertEquals(1.234, price2num('1,234'), 'Test 1,234 give 1.234 with french language'); + $this->assertEquals(21500000, price2num('21500 000'), 'Test 21500 000 give 21500000 with french language'); + $this->assertEquals(21500000, price2num('21 500 000'), 'Test 21 500 000 give 21500000 with french language'); + $this->assertEquals(21500, price2num('21500.00'), 'Test 21500.00 give 21500 with french language'); + $this->assertEquals(21500, price2num('21500,00'), 'Test 21500,00 give 21500 with french language'); + + $langs = $oldlangs; + + return true; + } + + /** + * testDolGetDate + * + * @return boolean + */ + public function testDolGetDate() + { + global $conf; + + $conf->global->MAIN_START_WEEK = 0; + + $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday + $this->assertEquals(5, $tmp['wday']); + + $conf->global->MAIN_START_WEEK = 1; + + $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday + $this->assertEquals(4, $tmp['wday']); + + $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday + $this->assertEquals(5, $tmp['wday']); + + $tmp=dol_getdate(1, false, "Europe/Paris"); // 1/1/1970 and 1 second = thirday + $this->assertEquals(1970, $tmp['year']); + $this->assertEquals(1, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(4, $tmp['wday']); + $this->assertEquals(0, $tmp['yday']); + $this->assertEquals(1, $tmp['hours']); // We are winter, so we are GMT+1 even during summer + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + $tmp=dol_getdate(15638401, false, "Europe/Paris"); // 1/7/1970 and 1 second = wednesday + $this->assertEquals(1970, $tmp['year']); + $this->assertEquals(7, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(3, $tmp['wday']); + $this->assertEquals(181, $tmp['yday']); + $this->assertEquals(1, $tmp['hours']); // There is no daylight in 1970, so we are GMT+1 even during summer + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + $tmp=dol_getdate(1593561601, false, "Europe/Paris"); // 1/7/2020 and 1 second = wednesday + $this->assertEquals(2020, $tmp['year']); + $this->assertEquals(7, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(3, $tmp['wday']); + $this->assertEquals(182, $tmp['yday']); // 182 and not 181, due to the 29th february + $this->assertEquals(2, $tmp['hours']); // There is a daylight, so we are GMT+2 + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + $conf->global->MAIN_USE_OLD_FUNCTIONS_FOR_GETDATE = 1; + + $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday + $this->assertEquals(1970, $tmp['year']); + $this->assertEquals(1, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(4, $tmp['wday']); + $this->assertEquals(0, $tmp['yday']); + // We must disable this because on CI, timezone is may be UTC or something else + //$this->assertEquals(1, $tmp['hours']); // We are winter, so we are GMT+1 even during summer + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + $tmp=dol_getdate(15638401); // 1/7/1970 and 1 second = wednesday + $this->assertEquals(1970, $tmp['year']); + $this->assertEquals(7, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(3, $tmp['wday']); + $this->assertEquals(181, $tmp['yday']); + // We must disable this because on CI, timezone is may be UTC or something else + //$this->assertEquals(1, $tmp['hours']); // There is no daylight in 1970, so we are GMT+1 even during summer + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + $tmp=dol_getdate(1593561601); // 1/7/2020 and 1 second = wednesday + $this->assertEquals(2020, $tmp['year']); + $this->assertEquals(7, $tmp['mon']); + $this->assertEquals(1, $tmp['mday']); + $this->assertEquals(3, $tmp['wday']); + $this->assertEquals(182, $tmp['yday']); // 182 and not 181, due to the 29th february + // We must disable this because on CI, timezone is may be UTC or something else + //$this->assertEquals(2, $tmp['hours']); // There is a daylight, so we are GMT+2 + $this->assertEquals(0, $tmp['minutes']); + $this->assertEquals(1, $tmp['seconds']); + + return true; + } + + + /** + * testMakeSubstitutions + * + * @return boolean + */ + public function testMakeSubstitutions() + { + global $conf, $langs; + $langs->load("main"); + + $substit=array("AAA"=>'Not used', "BBB"=>'Not used', "CCC"=>"C replaced"); + $chaine='This is a string with __[MAIN_THEME]__ and __(DIRECTION)__ and __CCC__'; + $newstring = make_substitutions($chaine, $substit); + $this->assertEquals($newstring, 'This is a string with eldy and ltr and __C replaced__'); + + return true; + } + + /** + * testDolStringIsGoodIso + * + * @return boolean + */ + public function testDolStringIsGoodIso() + { + global $conf, $langs; + + $chaine='This is an ISO string'; + $result = dol_string_is_good_iso($chaine); + $this->assertEquals($result, 1); + + $chaine='This is a not ISO string '.chr(0); + $result = dol_string_is_good_iso($chaine); + $this->assertEquals($result, 0); + + return true; + } + + + /** + * testGetUserRemoteIP + * + * @return boolean + */ + public function testGetUserRemoteIP() + { + global $conf, $langs; + + $_SERVER['HTTP_X_FORWARDED_FOR']='1.2.3.4'; + $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; + $result = getUserRemoteIP(); + $this->assertEquals($result, '1.2.3.4'); + + $_SERVER['HTTP_X_FORWARDED_FOR']='1.2.3.4<corrupted>'; + $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; + $result = getUserRemoteIP(); + $this->assertEquals($result, '5.6.7.8'); + + $_SERVER['HTTP_X_FORWARDED_FOR']='[1:2:3:4]'; + $_SERVER['HTTP_CLIENT_IP']='5.6.7.8'; + $result = getUserRemoteIP(); + $this->assertEquals($result, '[1:2:3:4]'); + + return true; + } } diff --git a/test/phpunit/GetUrlLibTest.php b/test/phpunit/GetUrlLibTest.php index 268122c8d48..97878ef9589 100644 --- a/test/phpunit/GetUrlLibTest.php +++ b/test/phpunit/GetUrlLibTest.php @@ -30,11 +30,10 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -48,202 +47,202 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class GetUrlLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return FilesLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return FilesLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testGetRootURLFromURL - * - * @return int - */ - public function testGetRootURLFromURL() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testGetRootURLFromURL + * + * @return int + */ + public function testGetRootURLFromURL() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=getRootURLFromURL('http://www.dolimed.com/screenshots/afile'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('http://www.dolimed.com', $result, 'Test 1'); + $result=getRootURLFromURL('http://www.dolimed.com/screenshots/afile'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('http://www.dolimed.com', $result, 'Test 1'); - $result=getRootURLFromURL('https://www.dolimed.com/screenshots/afile'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('https://www.dolimed.com', $result, 'Test 2'); + $result=getRootURLFromURL('https://www.dolimed.com/screenshots/afile'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('https://www.dolimed.com', $result, 'Test 2'); - $result=getRootURLFromURL('http://www.dolimed.com/screenshots'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('http://www.dolimed.com', $result); + $result=getRootURLFromURL('http://www.dolimed.com/screenshots'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('http://www.dolimed.com', $result); - $result=getRootURLFromURL('https://www.dolimed.com/screenshots'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('https://www.dolimed.com', $result); + $result=getRootURLFromURL('https://www.dolimed.com/screenshots'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('https://www.dolimed.com', $result); - $result=getRootURLFromURL('http://www.dolimed.com/'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('http://www.dolimed.com', $result); + $result=getRootURLFromURL('http://www.dolimed.com/'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('http://www.dolimed.com', $result); - $result=getRootURLFromURL('https://www.dolimed.com/'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('https://www.dolimed.com', $result); + $result=getRootURLFromURL('https://www.dolimed.com/'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('https://www.dolimed.com', $result); - $result=getRootURLFromURL('http://www.dolimed.com'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('http://www.dolimed.com', $result); + $result=getRootURLFromURL('http://www.dolimed.com'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('http://www.dolimed.com', $result); - $result=getRootURLFromURL('https://www.dolimed.com'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('https://www.dolimed.com', $result); + $result=getRootURLFromURL('https://www.dolimed.com'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('https://www.dolimed.com', $result); - return 1; - } + return 1; + } - /** - * testGetDomainFromURL - * - * @return int - */ - public function testGetDomainFromURL() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testGetDomainFromURL + * + * @return int + */ + public function testGetDomainFromURL() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=getDomainFromURL('http://localhost'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('localhost', $result, 'Test 0a'); + $result=getDomainFromURL('http://localhost'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('localhost', $result, 'Test 0a'); - $result=getDomainFromURL('http://localhost', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('localhost', $result, 'Test 0b'); + $result=getDomainFromURL('http://localhost', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('localhost', $result, 'Test 0b'); - $result=getDomainFromURL('https://dolimed.com'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed', $result, 'Test 1'); + $result=getDomainFromURL('https://dolimed.com'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed', $result, 'Test 1'); - $result=getDomainFromURL('http://www.dolimed.com/screenshots/afile'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed', $result, 'Test 2'); + $result=getDomainFromURL('http://www.dolimed.com/screenshots/afile'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed', $result, 'Test 2'); - $result=getDomainFromURL('http://www.with.dolimed.com/screenshots/afile'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed', $result, 'Test 3'); + $result=getDomainFromURL('http://www.with.dolimed.com/screenshots/afile'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed', $result, 'Test 3'); - $result=getDomainFromURL('https://dolimed.com', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed.com', $result, 'Test 4'); + $result=getDomainFromURL('https://dolimed.com', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed.com', $result, 'Test 4'); - $result=getDomainFromURL('http://www.dolimed.com/screenshots/afile', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed.com', $result, 'Test 5'); + $result=getDomainFromURL('http://www.dolimed.com/screenshots/afile', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed.com', $result, 'Test 5'); - $result=getDomainFromURL('http://www.with.dolimed.com/screenshots/afile', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('dolimed.com', $result, 'Test 6'); + $result=getDomainFromURL('http://www.with.dolimed.com/screenshots/afile', 1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('dolimed.com', $result, 'Test 6'); - return 1; - } + return 1; + } - /** - * testRemoveHtmlComment - * - * @return int - */ - public function testRemoveHtmlComment() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testRemoveHtmlComment + * + * @return int + */ + public function testRemoveHtmlComment() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=removeHtmlComment('abc<!--[if lt IE 8]>aaaa<![endif]-->def'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('abcdef', $result, 'Test 1'); + $result=removeHtmlComment('abc<!--[if lt IE 8]>aaaa<![endif]-->def'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abcdef', $result, 'Test 1'); - $result=removeHtmlComment('abc<!--[if lt IE 8]>aa-->bb<!--aa<![endif]-->def'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('abcbbdef', $result, 'Test 1'); + $result=removeHtmlComment('abc<!--[if lt IE 8]>aa-->bb<!--aa<![endif]-->def'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abcbbdef', $result, 'Test 1'); - return 1; - } + return 1; + } } diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index e7ad436b586..bba5d68c41e 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -30,11 +30,10 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/holiday/class/holiday.class.php'; $langs->load("dict"); -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -49,324 +48,324 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class HolidayTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return HolidayTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return HolidayTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testHolidayCreate - * - * @return int - */ - public function testHolidayCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testHolidayCreate + * + * @return int + */ + public function testHolidayCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Holiday($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new Holiday($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testHolidayFetch - * - * @param int $id Id of Holiday - * @return int - * @depends testHolidayCreate - * The depends says test is run only if previous is ok - */ - public function testHolidayFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testHolidayFetch + * + * @param int $id Id of Holiday + * @return int + * @depends testHolidayCreate + * The depends says test is run only if previous is ok + */ + public function testHolidayFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Holiday($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Holiday($this->savdb); + $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testHolidayUpdate - * - * @param Holiday $localobject Holiday - * @return int - * - * @depends testHolidayFetch - * The depends says test is run only if previous is ok - */ - public function testHolidayUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testHolidayUpdate + * + * @param Holiday $localobject Holiday + * @return int + * + * @depends testHolidayFetch + * The depends says test is run only if previous is ok + */ + public function testHolidayUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->oldcopy = clone $localobject; + $localobject->oldcopy = clone $localobject; - $localobject->note_private='New private note after update'; - $localobject->note_public='New public note after update'; - $localobject->lastname='New name'; - $localobject->firstname='New firstname'; - $localobject->address='New address'; - $localobject->zip='New zip'; - $localobject->town='New town'; - $localobject->country_id=2; - //$localobject->status=0; - $localobject->phone_pro='New tel pro'; - $localobject->phone_perso='New tel perso'; - $localobject->phone_mobile='New tel mobile'; - $localobject->fax='New fax'; - $localobject->email='newemail@newemail.com'; - $localobject->jabberid='New im id'; - $localobject->default_lang='es_ES'; + $localobject->note_private='New private note after update'; + $localobject->note_public='New public note after update'; + $localobject->lastname='New name'; + $localobject->firstname='New firstname'; + $localobject->address='New address'; + $localobject->zip='New zip'; + $localobject->town='New town'; + $localobject->country_id=2; + //$localobject->status=0; + $localobject->phone_pro='New tel pro'; + $localobject->phone_perso='New tel perso'; + $localobject->phone_mobile='New tel mobile'; + $localobject->fax='New fax'; + $localobject->email='newemail@newemail.com'; + $localobject->jabberid='New im id'; + $localobject->default_lang='es_ES'; - $result=$localobject->update($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Holiday::update error'); + $result=$localobject->update($localobject->id, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Holiday::update error'); - $result=$localobject->update_note($localobject->note_private, '_private'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Holiday::update_note (private) error'); + $result=$localobject->update_note($localobject->note_private, '_private'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Holiday::update_note (private) error'); - $result=$localobject->update_note($localobject->note_public, '_public'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Holiday::update_note (public) error'); + $result=$localobject->update_note($localobject->note_public, '_public'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Holiday::update_note (public) error'); - $newobject=new Holiday($this->savdb); - $result=$newobject->fetch($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0, 'Holiday::fetch error'); + $newobject=new Holiday($this->savdb); + $result=$newobject->fetch($localobject->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0, 'Holiday::fetch error'); - print __METHOD__." old=".$localobject->note." new=".$newobject->note."\n"; - $this->assertEquals($localobject->note, $newobject->note, 'Holiday::update_note error compare note'); - //print __METHOD__." old=".$localobject->note_public." new=".$newobject->note_public."\n"; - //$this->assertEquals($localobject->note_public, $newobject->note_public); + print __METHOD__." old=".$localobject->note." new=".$newobject->note."\n"; + $this->assertEquals($localobject->note, $newobject->note, 'Holiday::update_note error compare note'); + //print __METHOD__." old=".$localobject->note_public." new=".$newobject->note_public."\n"; + //$this->assertEquals($localobject->note_public, $newobject->note_public); - return $localobject; - } + return $localobject; + } - /** - * testHolidayOther - * - * @param Holiday $localobject Holiday - * @return void - * - * @depends testHolidayUpdate - * The depends says test is run only if previous is ok - */ - public function testHolidayOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testHolidayOther + * + * @param Holiday $localobject Holiday + * @return void + * + * @depends testHolidayUpdate + * The depends says test is run only if previous is ok + */ + public function testHolidayOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result = $localobject->fetchUsers(true, true, ''); - $this->assertNotEquals($result, -1); + $result = $localobject->fetchUsers(true, true, ''); + $this->assertNotEquals($result, -1); - $result = $localobject->fetchUsers(true, false, ''); - $this->assertNotEquals($result, -1); + $result = $localobject->fetchUsers(true, false, ''); + $this->assertNotEquals($result, -1); - $result = $localobject->fetchUsers(false, true, ''); - $this->assertNotEquals($result, -1); + $result = $localobject->fetchUsers(false, true, ''); + $this->assertNotEquals($result, -1); - $result = $localobject->fetchUsers(false, false, ''); - $this->assertNotEquals($result, -1); + $result = $localobject->fetchUsers(false, false, ''); + $this->assertNotEquals($result, -1); - return $localobject->id; - } + return $localobject->id; + } - /** - * testHolidayDelete - * - * @param int $id Id of Holiday - * @return void - * - * @depends testHolidayOther - * The depends says test is run only if previous is ok - */ - public function testHolidayDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testHolidayDelete + * + * @param int $id Id of Holiday + * @return void + * + * @depends testHolidayOther + * The depends says test is run only if previous is ok + */ + public function testHolidayDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Holiday($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Holiday($this->savdb); + $result=$localobject->fetch($id); - $result=$localobject->delete(0); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->delete(0); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testVerifDateHolidayCP - * - * @return void - */ - public function testVerifDateHolidayCP() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testVerifDateHolidayCP + * + * @return void + */ + public function testVerifDateHolidayCP() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - // Create a leave request the 1st morning only - $localobjecta=new Holiday($this->savdb); - $localobjecta->initAsSpecimen(); - $localobjecta->date_debut = dol_mktime(0, 0, 0, 1, 1, 2020); - $localobjecta->date_fin = dol_mktime(0, 0, 0, 1, 1, 2020); - $localobjecta->halfday = 1; - $result=$localobjecta->create($user); + // Create a leave request the 1st morning only + $localobjecta=new Holiday($this->savdb); + $localobjecta->initAsSpecimen(); + $localobjecta->date_debut = dol_mktime(0, 0, 0, 1, 1, 2020); + $localobjecta->date_fin = dol_mktime(0, 0, 0, 1, 1, 2020); + $localobjecta->halfday = 1; + $result=$localobjecta->create($user); - // Create a leave request the 2 afternoon only - $localobjectb=new Holiday($this->savdb); - $localobjectb->initAsSpecimen(); - $localobjectb->date_debut = dol_mktime(0, 0, 0, 1, 2, 2020); - $localobjectb->date_fin = dol_mktime(0, 0, 0, 1, 2, 2020); - $localobjectb->halfday = -1; - $result=$localobjectb->create($user); + // Create a leave request the 2 afternoon only + $localobjectb=new Holiday($this->savdb); + $localobjectb->initAsSpecimen(); + $localobjectb->date_debut = dol_mktime(0, 0, 0, 1, 2, 2020); + $localobjectb->date_fin = dol_mktime(0, 0, 0, 1, 2, 2020); + $localobjectb->halfday = -1; + $result=$localobjectb->create($user); - $date_debut = dol_mktime(0, 0, 0, 1, 1, 2020); - $date_fin = dol_mktime(0, 0, 0, 1, 2, 2020); + $date_debut = dol_mktime(0, 0, 0, 1, 1, 2020); + $date_fin = dol_mktime(0, 0, 0, 1, 2, 2020); - $localobjectc=new Holiday($this->savdb); + $localobjectc=new Holiday($this->savdb); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, 0); - $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 0); - $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, 0); - $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, 0); + $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 0); + $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, 0); + $this->assertFalse($result, 'result should be false, there is overlapping, full day is not available.'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, 1); - $this->assertFalse($result, 'result should be false, there is overlapping, morning of first day is not available.'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 1); - $this->assertFalse($result, 'result should be false, there is overlapping, morning of first day is not available.'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, 1); - $this->assertTrue($result, 'result should be true, there is no overlapping'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, 1); + $this->assertFalse($result, 'result should be false, there is overlapping, morning of first day is not available.'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 1); + $this->assertFalse($result, 'result should be false, there is overlapping, morning of first day is not available.'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, 1); + $this->assertTrue($result, 'result should be true, there is no overlapping'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, -1); - $this->assertTrue($result, 'result should be true, there is no overlapping'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, -1); - $this->assertFalse($result, 'result should be false, there is overlapping, afternoon of second day is not available'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, -1); - $this->assertFalse($result, 'result should be false, there is overlapping, afternoon of second day is not available'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_debut, -1); + $this->assertTrue($result, 'result should be true, there is no overlapping'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, -1); + $this->assertFalse($result, 'result should be false, there is overlapping, afternoon of second day is not available'); + $result=$localobjectc->verifDateHolidayCP($user->id, $date_fin, $date_fin, -1); + $this->assertFalse($result, 'result should be false, there is overlapping, afternoon of second day is not available'); - $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 2); // start afternoon and end morning - $this->assertTrue($result, 'result should be true, there is no overlapping'); - } + $result=$localobjectc->verifDateHolidayCP($user->id, $date_debut, $date_fin, 2); // start afternoon and end morning + $this->assertTrue($result, 'result should be true, there is no overlapping'); + } - /** - * testUpdateBalance - * - * @return void - */ - public function testUpdateBalance() - { - $localobjecta=new Holiday($this->savdb); + /** + * testUpdateBalance + * + * @return void + */ + public function testUpdateBalance() + { + $localobjecta=new Holiday($this->savdb); - $localobjecta->updateConfCP('lastUpdate', '20100101120000'); - $result = $localobjecta->updateBalance(); - $this->assertEquals($result, 1); - } + $localobjecta->updateConfCP('lastUpdate', '20100101120000'); + $result = $localobjecta->updateBalance(); + $this->assertEquals($result, 1); + } } diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php index 3bfb676f3be..4835a8afd76 100644 --- a/test/phpunit/ImagesLibTest.php +++ b/test/phpunit/ImagesLibTest.php @@ -30,8 +30,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/images.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -76,81 +75,97 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testDolCountNbOfLine - * - * @return int - */ - public function testgetImageSize() - { + /** + * testDolCountNbOfLine + * + * @return int + */ + public function testgetImageSize() + { $file=dirname(__FILE__).'/img250x50.jpg'; $tmp=dol_getImageSize($file); - print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; $this->assertEquals($tmp['width'], 250); $this->assertEquals($tmp['height'], 50); $file=dirname(__FILE__).'/img250x20.png'; $tmp=dol_getImageSize($file); - print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; $this->assertEquals($tmp['width'], 250); $this->assertEquals($tmp['height'], 20); /*$file=dirname(__FILE__).'/filenotfound.png'; $tmp=dol_getImageSize($file); - print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; + print __METHOD__." result=".$tmp['width'].'/'.$tmp['height']."\n"; $this->assertEquals($tmp['width'],250); $this->assertEquals($tmp['height'],20);*/ return 1; - } + } + + /** + * testDolImageResizeOrCrop + * + * @return int + */ + public function testDolImageResizeOrCrop() + { + global $conf; + + $file=dirname(__FILE__).'/img250x20.png'; + $filetarget=$conf->admin->dir_temp.'/img250x20.jpg'; + $result = dol_imageResizeOrCrop($file, 0, 0, 0, 0, 0, $filetarget); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($filetarget, $result, 'Failed to convert into '.$filetarget); + } } diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index 32970f6fe1c..ed285608690 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -28,16 +28,36 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** @@ -77,75 +97,75 @@ class ImportTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; //$db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testImportSample1 - * - * @return boolean - */ - public function testImportSample1() - { - $file=dirname(__FILE__).'/Example_import_company_1.csv'; + /** + * testImportSample1 + * + * @return boolean + */ + public function testImportSample1() + { + $file=dirname(__FILE__).'/Example_import_company_1.csv'; - // TODO - // Run import on file and check the record with field "auto" are filled - // according to option - $this->assertEquals(0, 0); + // TODO + // Run import on file and check the record with field "auto" are filled + // according to option + $this->assertEquals(0, 0); - // TODO Export and compare the file exported with the $file imported. + // TODO Export and compare the file exported with the $file imported. return true; - } + } } diff --git a/test/phpunit/InventoryTest.php b/test/phpunit/InventoryTest.php new file mode 100644 index 00000000000..ad2b19aebd3 --- /dev/null +++ b/test/phpunit/InventoryTest.php @@ -0,0 +1,382 @@ +<?php +/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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/>. + * or see https://www.gnu.org/ + */ + +/** + * \file test/phpunit/InventoryTest.php + * \ingroup test + * \brief PHPUnit test + * \remarks To run this script as CLI: phpunit filename.php + */ + +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/product/inventory/class/inventory.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; + + +/** + * Class for PHPUnit tests + * + * @backupGlobals disabled + * @backupStaticAttributes enabled + * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. + */ +class InventoryTest extends PHPUnit\Framework\TestCase +{ + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return InventoryTest + */ + 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"; + } + + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; + } + + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; + } + + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + print __METHOD__."\n"; + } + + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } + + /** + * testInventoryCreate + * + * @return int + */ + public function testInventoryCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Inventory($db); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } + + /** + * testInventoryFetch + * + * @param int $id Id invoice + * @return int + * + * @depends testInventoryCreate + * The depends says test is run only if previous is ok + */ + public function testInventoryFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Inventory($this->savdb); + $result=$localobject->fetch($id); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } + + /** + * testInventoryUpdate + * + * @param Inventory $localobject Invoice + * @return int + * + * @depends testInventoryFetch + * The depends says test is run only if previous is ok + */ + public function testInventoryUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject->status = 9; + $localobject->title = 'test'; + $result=$localobject->update($user, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } + + + /** + * testInventoryValidate + * + * @param Inventory $localobject Invoice + * @return void + * + * @depends testInventoryUpdate + * The depends says test is run only if previous is ok + */ + public function testInventoryValidate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->validate($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + + $this->assertLessThan($result, 0); + $this->assertEquals($localobject->status, '1'); + return $localobject; + } + + /** + * testInventorySetDraft + * + * @param Inventory $localobject Invoice + * @return void + * + * @depends testInventoryValidate + * The depends says test is run only if previous is ok + */ + public function testInventorySetDraft($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setDraft($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + + $this->assertLessThan($result, 0); + $this->assertEquals($localobject->status, '0'); + return $localobject; + } + + /** + * testInventorySetRecorded + * + * @param Inventory $localobject Invoice + * @return void + * + * @depends testInventorySetDraft + * The depends says test is run only if previous is ok + */ + public function testInventorySetRecorded($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setRecorded($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + + $this->assertLessThan($result, 0); + $this->assertEquals($localobject->status, '2'); + return $localobject; + } + + /** + * testInventorySetCanceled + * + * @param Inventory $localobject Invoice + * @return void + * + * @depends testInventorySetRecorded + * The depends says test is run only if previous is ok + */ + public function testInventorySetCanceled($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setCanceled($user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + + $this->assertLessThan($result, 0); + $this->assertEquals($localobject->status, '9'); + return $localobject; + } + + /** + * testInventoryOther + * + * @param Inventory $localobject Invoice + * @return int + * @depends testInventorySetRecorded + * The depends says test is run only if previous is ok + */ + public function testInventoryOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); + return $localobject->id; + } + + /** + * testInventoryDelete + * + * @param int $id Id of invoice + * @return int + * @depends testInventoryOther + * The depends says test is run only if previous is ok + */ + public function testInventoryDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Inventory($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + + return $result; + } + + /** + * Compare all public properties values of 2 objects + * + * @param Object $oA Object operand 1 + * @param Object $oB Object operand 2 + * @param boolean $ignoretype False will not report diff if type of value differs + * @param array $fieldstoignorearray Array of fields to ignore in diff + * @return array Array with differences + */ + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) + { + $retAr=array(); + + if (get_class($oA) !== get_class($oB)) { + $retAr[]="Supplied objects are not of same class."; + } else { + $oVarsA=get_object_vars($oA); + $oVarsB=get_object_vars($oB); + $aKeys=array_keys($oVarsA); + foreach ($aKeys as $sKey) { + if (in_array($sKey, $fieldstoignorearray)) { + continue; + } + if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + } + } + return $retAr; + } +} diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index 7d2678b0ec7..ddb62a90204 100644 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -28,16 +28,36 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} /** @@ -49,133 +69,133 @@ if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page i */ class JsonLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CoreTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CoreTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - //$db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + //$db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testJsonEncode - * - * @return void - */ - public function testJsonEncode() - { - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + /** + * testJsonEncode + * + * @return void + */ + public function testJsonEncode() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; - // Do a test with an array starting with 0 - $arraytotest=array(0=>array('key'=>1,'value'=>'PRODREF','label'=>'Product ref with é and special chars \\ \' "')); - $arrayencodedexpected='[{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}]'; + // Do a test with an array starting with 0 + $arraytotest=array(0=>array('key'=>1,'value'=>'PRODREF','label'=>'Product ref with é and special chars \\ \' "')); + $arrayencodedexpected='[{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}]'; - $encoded=json_encode($arraytotest); - $this->assertEquals($arrayencodedexpected, $encoded); - $decoded=json_decode($encoded, true); - $this->assertEquals($arraytotest, $decoded, 'test for json_xxx'); + $encoded=json_encode($arraytotest); + $this->assertEquals($arrayencodedexpected, $encoded); + $decoded=json_decode($encoded, true); + $this->assertEquals($arraytotest, $decoded, 'test for json_xxx'); - $encoded=dol_json_encode($arraytotest); - $this->assertEquals($arrayencodedexpected, $encoded); - $decoded=dol_json_decode($encoded, true); - $this->assertEquals($arraytotest, $decoded, 'test for dol_json_xxx'); + $encoded=dol_json_encode($arraytotest); + $this->assertEquals($arrayencodedexpected, $encoded); + $decoded=dol_json_decode($encoded, true); + $this->assertEquals($arraytotest, $decoded, 'test for dol_json_xxx'); - // Same test but array start with 2 instead of 0 - $arraytotest=array(2=>array('key'=>1,'value'=>'PRODREF','label'=>'Product ref with é and special chars \\ \' "')); - $arrayencodedexpected='{"2":{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}}'; + // Same test but array start with 2 instead of 0 + $arraytotest=array(2=>array('key'=>1,'value'=>'PRODREF','label'=>'Product ref with é and special chars \\ \' "')); + $arrayencodedexpected='{"2":{"key":1,"value":"PRODREF","label":"Product ref with \u00e9 and special chars \\\\ \' \""}}'; - $encoded=json_encode($arraytotest); - $this->assertEquals($arrayencodedexpected, $encoded); - $decoded=json_decode($encoded, true); - $this->assertEquals($arraytotest, $decoded, 'test for json_xxx'); + $encoded=json_encode($arraytotest); + $this->assertEquals($arrayencodedexpected, $encoded); + $decoded=json_decode($encoded, true); + $this->assertEquals($arraytotest, $decoded, 'test for json_xxx'); - $encoded=dol_json_encode($arraytotest); - $this->assertEquals($arrayencodedexpected, $encoded); - $decoded=dol_json_decode($encoded, true); - $this->assertEquals($arraytotest, $decoded, 'test for dol_json_xxx'); + $encoded=dol_json_encode($arraytotest); + $this->assertEquals($arrayencodedexpected, $encoded); + $decoded=dol_json_decode($encoded, true); + $this->assertEquals($arraytotest, $decoded, 'test for dol_json_xxx'); - // Test with object - $now=gmmktime(12, 0, 0, 1, 1, 1970); - $objecttotest=new stdClass(); - $objecttotest->property1='abc'; - $objecttotest->property2=1234; - $objecttotest->property3=$now; - $encoded=dol_json_encode($objecttotest); - $this->assertEquals('{"property1":"abc","property2":1234,"property3":43200}', $encoded); - } + // Test with object + $now=gmmktime(12, 0, 0, 1, 1, 1970); + $objecttotest=new stdClass(); + $objecttotest->property1='abc'; + $objecttotest->property2=1234; + $objecttotest->property3=$now; + $encoded=dol_json_encode($objecttotest); + $this->assertEquals('{"property1":"abc","property2":1234,"property3":43200}', $encoded); + } } diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 1c1f8ed0e8a..ad76667d560 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -30,22 +30,41 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -87,81 +106,82 @@ class LangTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testLang - * - * @return string - */ - public function testLang() - { - global $conf,$user,$langs,$db; + /** + * testLang + * + * @return string + */ + public function testLang() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; $filesarray = scandir(DOL_DOCUMENT_ROOT.'/langs'); - foreach ($filesarray as $key => $code) - { - if (! preg_match('/^[a-z]+_[A-Z]+$/', $code)) continue; + foreach ($filesarray as $key => $code) { + if (! preg_match('/^[a-z]+_[A-Z]+$/', $code)) { + continue; + } print 'Check language file for lang code='.$code."\n"; $tmplangs=new Translate('', $conf); - $langcode=$code; - $tmplangs->setDefaultLang($langcode); + $langcode=$code; + $tmplangs->setDefaultLang($langcode); $tmplangs->load("main"); $result=$tmplangs->transnoentitiesnoconv("SeparatorDecimal"); @@ -201,29 +221,29 @@ class LangTest extends PHPUnit\Framework\TestCase } } - return; - } + return; + } - /** - * testTrans - * - * @return string - */ - public function testTrans() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testTrans + * + * @return string + */ + public function testTrans() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $tmplangs=new Translate('', $conf); - $langcode='en_US'; - $tmplangs->setDefaultLang($langcode); - $tmplangs->load("main"); + $tmplangs=new Translate('', $conf); + $langcode='en_US'; + $tmplangs->setDefaultLang($langcode); + $tmplangs->load("main"); - $result = $tmplangs->trans("FilterOnInto", "<input autofocus onfocus='alert(1337)' <--!"); - print __METHOD__." result trans FilterOnInto = ".$result."\n"; - $this->assertEquals($result, "Search criteria '<b>&lt;input autofocus onfocus='alert(1337)' &lt;--!</b>' into fields ", 'Result of lang->trans must have original translation string with its original HTML tag, but inserted values must be fully encoded.'); - } + $result = $tmplangs->trans("FilterOnInto", "<input autofocus onfocus='alert(1337)' <--!"); + print __METHOD__." result trans FilterOnInto = ".$result."\n"; + $this->assertEquals($result, "Search criteria '<b>&lt;input autofocus onfocus='alert(1337)' &lt;--!</b>' into fields ", 'Result of lang->trans must have original translation string with its original HTML tag, but inserted values must be fully encoded.'); + } } diff --git a/test/phpunit/LesscTest.php b/test/phpunit/LesscTest.php index a4ce302c540..691d413d020 100644 --- a/test/phpunit/LesscTest.php +++ b/test/phpunit/LesscTest.php @@ -30,22 +30,41 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -87,92 +106,92 @@ class LesscTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testLess - * - * @return string - */ - public function testLessc() - { - global $conf,$user,$langs,$db; + /** + * testLess + * + * @return string + */ + public function testLessc() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - include_once DOL_DOCUMENT_ROOT.'/core/class/lessc.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/lessc.class.php'; - $lesscobj = new Lessc(); + $lesscobj = new Lessc(); - $cssfile = " + $cssfile = " a { font-size: 10px; } b .test { font-size: 10px; } "; - try { - $contentforlessc = ".bodywebsite {\n".$cssfile."\n}\n"; - //print '<pre>'.$contentforlessc.'</pre>'; - $result = $lesscobj->compile($contentforlessc); - //var_dump($contentforlessc); exit; - } catch (exception $e) { - //echo "failed to compile lessc"; - dol_syslog("Failed to compile the CSS with lessc: ".$e->getMessage(), LOG_WARNING); - } + try { + $contentforlessc = ".bodywebsite {\n".$cssfile."\n}\n"; + //print '<pre>'.$contentforlessc.'</pre>'; + $result = $lesscobj->compile($contentforlessc); + //var_dump($contentforlessc); exit; + } catch (exception $e) { + //echo "failed to compile lessc"; + dol_syslog("Failed to compile the CSS with lessc: ".$e->getMessage(), LOG_WARNING); + } - $cssexpected = " + $cssexpected = " .bodywebsite a { font-size: 10px; } @@ -184,6 +203,6 @@ class LesscTest extends PHPUnit\Framework\TestCase print __METHOD__." SeparatorDecimal=".$result."\n"; $this->assertEquals(trim($result), trim($cssexpected)); - return; - } + return; + } } diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 253e779ac03..3dba569c4e9 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/loan/class/loan.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,39 +74,39 @@ class LoanTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -115,111 +114,111 @@ class LoanTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; //print $db->getVersion()."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } - - /** - * testLoanCreate - * - * @return void - */ - public function testLoanCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject=new Loan($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); - - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } - - /** - * testLoanFetch - * - * @param int $id Id of object - * @return void - * - * @depends testLoanCreate - * The depends says test is run only if previous is ok - */ - public function testLoanFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject=new Loan($this->savdb); - $result=$localobject->fetch($id); - - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + protected function tearDown() + { + print __METHOD__."\n"; + } /** - * testLoanOther - * - * @param Loan $localobject Loan - * @return int - * - * @depends testLoanFetch - * The depends says test is run only if previous is ok - */ - public function testLoanOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $result=$localobject->set_paid($user); - - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject->id; - } - - /** - * testLoanDelete - * - * @param int $id Id of loan - * @return void - * - * @depends testLoanCreate - * The depends says test is run only if previous is ok - */ - public function testLoanDelete($id) - { - global $conf,$user,$langs,$db; + * testLoanCreate + * + * @return void + */ + public function testLoanCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Loan($this->savdb); - $result=$localobject->fetch($id); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); + + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } + + /** + * testLoanFetch + * + * @param int $id Id of object + * @return void + * + * @depends testLoanCreate + * The depends says test is run only if previous is ok + */ + public function testLoanFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Loan($this->savdb); + $result=$localobject->fetch($id); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } + + /** + * testLoanOther + * + * @param Loan $localobject Loan + * @return int + * + * @depends testLoanFetch + * The depends says test is run only if previous is ok + */ + public function testLoanOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setPaid($user); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject->id; + } + + /** + * testLoanDelete + * + * @param int $id Id of loan + * @return void + * + * @depends testLoanCreate + * The depends says test is run only if previous is ok + */ + public function testLoanDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Loan($this->savdb); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index e451262546d..1c7553eb76f 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/margin/lib/margins.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,65 +73,65 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testGetMarginInfos - * - * @return void - */ - public function testGetMarginInfos() - { - global $conf,$user,$langs,$db; + /** + * testGetMarginInfos + * + * @return void + */ + public function testGetMarginInfos() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -156,5 +155,5 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase $this->assertEquals(1/9*100, $result[2]); return 0; - } + } } diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 32652200c2c..79e3013ae11 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -28,8 +28,7 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,64 +73,64 @@ class ModulesTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testModulesInit - * - * @return int - */ - public function testModulesInit() - { - global $conf,$user,$langs,$db; + /** + * testModulesInit + * + * @return int + */ + public function testModulesInit() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -144,22 +143,20 @@ class ModulesTest extends PHPUnit\Framework\TestCase 'Mailing','MailmanSpip','Margin','ModuleBuilder','MultiCurrency', 'Notification','Oauth','OpenSurvey','Paybox','Paypal','Prelevement','Printing','Product','ProductBatch','Projet','Propale','ReceiptPrinter','Resource', 'Salaries','Service','SocialNetworks','Societe','Stock','Stripe','SupplierProposal','Syslog','TakePos','Tax','Ticket','User','Variants','WebServices','WebServicesClient','Website','Workflow'); - foreach ($modulelist as $modlabel) - { - require_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php'; - $class='mod'.$modlabel; - $mod=new $class($db); - $result=$mod->remove(); - $result=$mod->init(); - $this->assertLessThan($result, 0, $modlabel); - print __METHOD__." test remove/init for module ".$modlabel.", result=".$result."\n"; + foreach ($modulelist as $modlabel) { + require_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php'; + $class='mod'.$modlabel; + $mod=new $class($db); + $result=$mod->remove(); + $result=$mod->init(); + $this->assertLessThan($result, 0, $modlabel); + print __METHOD__." test remove/init for module ".$modlabel.", result=".$result."\n"; - if (in_array($modlabel, array('Ldap', 'MailmanSpip'))) - { - $result=$mod->remove(); - } + if (in_array($modlabel, array('Ldap', 'MailmanSpip'))) { + $result=$mod->remove(); + } } - return 0; - } + return 0; + } } diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index 1f27b4c71de..b68a8c90d0a 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -31,8 +31,7 @@ require_once dirname(__FILE__).'/../../htdocs/product/stock/class/mouvementstock require_once dirname(__FILE__).'/../../htdocs/product/stock/class/entrepot.class.php'; require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -77,66 +76,68 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - if (empty($conf->productbatch->enabled)) { print "\n".__METHOD__." module Lot/Serial must be enabled.\n"; die(); } + if (empty($conf->productbatch->enabled)) { + print "\n".__METHOD__." module Lot/Serial must be enabled.\n"; die(); + } print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testMouvementCreate - * - * @return MouvementStock - */ - public function testMouvementCreate() - { - global $conf,$user,$langs,$db; + /** + * testMouvementCreate + * + * @return MouvementStock + */ + public function testMouvementCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -201,76 +202,76 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals(-3, $result, 'Test to check we can t create a movement for a lot with a different eatby date'); - // Do a list of movement into warehouse 1 + // Do a list of movement into warehouse 1 - // Create an input movement (type = 3) of price 9.9 -> should update PMP to 9.9 + // Create an input movement (type = 3) of price 9.9 -> should update PMP to 9.9 $result=$localobject->reception($user, $product1id, $warehouse1id, 10, 9.9, 'Movement for unit test 1', '', '', '', '', 0, 'Inventory Code Test'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result, 'Return code of 0 was expected for the reception test 1'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Return code of 0 was expected for the reception test 1'); - // Create an input movement (type = 3) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->reception($user, $product1id, $warehouse1id, 10, 9.7, 'Movement for unit test 2', '', '', '', '', 0, 'Inventory Code Test'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an input movement (type = 3) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->reception($user, $product1id, $warehouse1id, 10, 9.7, 'Movement for unit test 2', '', '', '', '', 0, 'Inventory Code Test'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 2) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->livraison($user, $product1id, $warehouse1id, 5, 999, 'Movement for unit test 3', '', '', '', '', 0, 'Inventory Code Test'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 2) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->livraison($user, $product1id, $warehouse1id, 5, 999, 'Movement for unit test 3', '', '', '', '', 0, 'Inventory Code Test'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->_create($user, $product1id, $warehouse1id, 1, 0, 0, 'Input from transfer', 'Transfert X'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->_create($user, $product1id, $warehouse1id, 1, 0, 0, 'Input from transfer', 'Transfert X'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->_create($user, $product1id, $warehouse1id, -2, 1, 0, 'Output from transfer', 'Transfert Y'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->_create($user, $product1id, $warehouse1id, -2, 1, 0, 'Output from transfer', 'Transfert Y'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Do same but into warehouse 2 + // Do same but into warehouse 2 - // Create an input movement (type = 3) of price 9.9 -> should update PMP to 9.9 - $result=$localobject->reception($user, $product1id, $warehouse2id, 10, 9.9, 'Movement for unit test 1 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an input movement (type = 3) of price 9.9 -> should update PMP to 9.9 + $result=$localobject->reception($user, $product1id, $warehouse2id, 10, 9.9, 'Movement for unit test 1 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an input movement (type = 3) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->reception($user, $product1id, $warehouse2id, 10, 9.7, 'Movement for unit test 2 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an input movement (type = 3) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->reception($user, $product1id, $warehouse2id, 10, 9.7, 'Movement for unit test 2 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 2) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->livraison($user, $product1id, $warehouse2id, 5, 999, 'Movement for unit test 3 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 2) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->livraison($user, $product1id, $warehouse2id, 5, 999, 'Movement for unit test 3 wh 2', '', '', '', '', 0, 'Inventory Code Test 2'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->_create($user, $product1id, $warehouse2id, 1, 0, 0, 'Input from transfer wh 2', 'Transfert X 2'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->_create($user, $product1id, $warehouse2id, 1, 0, 0, 'Input from transfer wh 2', 'Transfert X 2'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 - $result=$localobject->_create($user, $product1id, $warehouse2id, -2, 1, 0, 'Output from transfer wh 2', 'Transfert Y 2'); - print __METHOD__." result=".$result."\n"; - $this->assertGreaterThan(0, $result); + // Create an output movement (type = 1) of price 9.7 -> should update PMP to 9.9/9.7 = 9.8 + $result=$localobject->_create($user, $product1id, $warehouse2id, -2, 1, 0, 'Output from transfer wh 2', 'Transfert Y 2'); + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); - return $localobject; - } + return $localobject; + } - /** - * testMouvementCheck - * - * @param MouvementStock $localobject Movement object we created - * @return MouvementStock - * - * @depends testMouvementCreate - * The depends says test is run only if previous is ok - */ - public function testMouvementCheck($localobject) - { - global $conf,$user,$langs,$db; + /** + * testMouvementCheck + * + * @param MouvementStock $localobject Movement object we created + * @return MouvementStock + * + * @depends testMouvementCreate + * The depends says test is run only if previous is ok + */ + public function testMouvementCheck($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -284,12 +285,12 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase $producttotest = new Product($db); $producttotest->fetch($productid); - print __METHOD__." producttotest->stock_reel=".$producttotest->stock_reel."\n"; - $this->assertEquals($producttotest->stock_reel, 28); // 28 is result of stock movement defined into testMouvementCreate + print __METHOD__." producttotest->stock_reel=".$producttotest->stock_reel."\n"; + $this->assertEquals($producttotest->stock_reel, 28); // 28 is result of stock movement defined into testMouvementCreate - print __METHOD__." producttotest->pmp=".$producttotest->pmp."\n"; - $this->assertEquals($producttotest->pmp, 9.8); + print __METHOD__." producttotest->pmp=".$producttotest->pmp."\n"; + $this->assertEquals($producttotest->pmp, 9.8); - return $localobject; - } + return $localobject; + } } diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 089a2c2f4cf..a34d3b28d1c 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -28,8 +28,7 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,66 +73,66 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testFactureMercure - * - * @return int - */ - public function testFactureMercure() - { - global $conf,$user,$langs,$db,$mysoc; + /** + * testFactureMercure + * + * @return int + */ + public function testFactureMercure() + { + global $conf,$user,$langs,$db,$mysoc; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -237,13 +236,13 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase $result2=$localobject2->create($user, 1); $result3=$localobject2->validate($user, $result); print __METHOD__." result=".$result."\n"; - $this->assertEquals('192101-0001', $result); // counter must be reseted to 1 - $result=$localobject2->is_erasable(); - print __METHOD__." is_erasable=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); // Can be deleted - $result=$localobject->is_erasable(); - print __METHOD__." is_erasable=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); // Case 1 can be deleted (because there was a reset for case 2) + $this->assertEquals('192101-0001', $result); // counter must be reseted to 1 + $result=$localobject2->is_erasable(); + print __METHOD__." is_erasable=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); // Can be deleted + $result=$localobject->is_erasable(); + print __METHOD__." is_erasable=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); // Case 1 can be deleted (because there was a reset for case 2) // Same but we add month before year and use a year on 2 digits $conf->global->FACTURE_MERCURE_MASK_CREDIT='[mm}{yy}-{0000@1}'; @@ -268,319 +267,319 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase $result2=$localobject2->create($user, 1); $result3=$localobject2->validate($user, $result); print __METHOD__." result=".$result."\n"; - $this->assertEquals('0125-0002', $result, 'Test for {mm}{yy}-{0000@1} 2st invoice'); // counter must be now 2 - $result=$localobject2->is_erasable(); - print __METHOD__." is_erasable=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); // Can be deleted - $result=$localobject->is_erasable(); - print __METHOD__." is_erasable=".$result."\n"; - $this->assertLessThanOrEqual(0, $result); // Case 1 can not be deleted (because there is an invoice 2) + $this->assertEquals('0125-0002', $result, 'Test for {mm}{yy}-{0000@1} 2st invoice'); // counter must be now 2 + $result=$localobject2->is_erasable(); + print __METHOD__." is_erasable=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); // Can be deleted + $result=$localobject->is_erasable(); + print __METHOD__." is_erasable=".$result."\n"; + $this->assertLessThanOrEqual(0, $result); // Case 1 can not be deleted (because there is an invoice 2) $localobject3=new Facture($this->savdb); $localobject3->initAsSpecimen(); $localobject3->date=dol_mktime(12, 0, 0, 1, 1, 1926); // we use following year for third invoice (and there is a reset required) $numbering=new mod_facture_mercure(); $result=$numbering->getNextValue($mysoc, $localobject3); print __METHOD__." result=".$result."\n"; - $this->assertEquals('0126-0001', $result, 'Test for {mm}{yy}-{0000@1} 3rd invoice'); // counter must be now 1 + $this->assertEquals('0126-0001', $result, 'Test for {mm}{yy}-{0000@1} 3rd invoice'); // counter must be now 1 - // Try an offset when an invoice already exists - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; - $result=$numbering->getNextValue($mysoc, $localobject2); + // Try an offset when an invoice already exists + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; + $result=$numbering->getNextValue($mysoc, $localobject2); // Now we try with a different fiscal month (forced by mask) - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@6}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@6}'; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@6}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@6}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1930); // we use year 1930 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject, 'last'); - print __METHOD__." result for last=".$result."\n"; - $this->assertEquals('', $result); // no existing ref into reset range - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('193001-0001', $result); // counter must start to 1 - $result=$numbering->getNextValue($mysoc, $localobject, 'last'); - print __METHOD__." result for last=".$result."\n"; - $this->assertEquals('193001-0001', $result); // last ref into reset range should be same than last created + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1930); // we use year 1930 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject, 'last'); + print __METHOD__." result for last=".$result."\n"; + $this->assertEquals('', $result); // no existing ref into reset range + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('193001-0001', $result); // counter must start to 1 + $result=$numbering->getNextValue($mysoc, $localobject, 'last'); + print __METHOD__." result for last=".$result."\n"; + $this->assertEquals('193001-0001', $result); // last ref into reset range should be same than last created - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1930); // we use same year but fiscal month after - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject, 'last'); - print __METHOD__." result for last=".$result."\n"; - $this->assertEquals('', $result); // last ref into reset range should be '' - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('193012-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1930); // we use same year but fiscal month after + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject, 'last'); + print __METHOD__." result for last=".$result."\n"; + $this->assertEquals('', $result); // last ref into reset range should be '' + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('193012-0001', $result); // counter must be reset to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1931); // we use same fiscal year but different year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('193101-0002', $result); // counter must be 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1931); // we use same fiscal year but different year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('193101-0002', $result); // counter must be 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1931); // we use different fiscal year but same year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('193112-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1931); // we use different fiscal year but same year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('193112-0001', $result); // counter must be reset to 1 - // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) - $conf->global->SOCIETE_FISCAL_MONTH_START=6; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@0}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@0}'; + // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) + $conf->global->SOCIETE_FISCAL_MONTH_START=6; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@0}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@0}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1940); // we use year 1940 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('194001-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1940); // we use year 1940 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('194001-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1940); // we use same year but fiscal month after - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('194012-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1940); // we use same year but fiscal month after + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('194012-0001', $result); // counter must be reset to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1941); // we use same fiscal year but different year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('194101-0002', $result); // counter must be 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1941); // we use same fiscal year but different year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('194101-0002', $result); // counter must be 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1941); // we use different discal year but same year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('194112-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1941); // we use different discal year but same year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('194112-0001', $result); // counter must be reset to 1 - // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want year of element - $conf->global->SOCIETE_FISCAL_MONTH_START=6; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@=}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@=}'; + // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want year of element + $conf->global->SOCIETE_FISCAL_MONTH_START=6; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@=}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@=}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1950); // we use year 1950 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('195001-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1950); // we use year 1950 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('195001-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1950); // we use same year but fiscal month after - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('195012-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1950); // we use same year but fiscal month after + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('195012-0001', $result); // counter must be reset to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1951); // we use same fiscal year but different year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('195101-0002', $result); // counter must be 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1951); // we use same fiscal year but different year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('195101-0002', $result); // counter must be 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1951); // we use different discal year but same year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('195112-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1951); // we use different discal year but same year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('195112-0001', $result); // counter must be reset to 1 - // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want start year - $conf->global->SOCIETE_FISCAL_MONTH_START=6; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@-}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@-}'; + // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want start year + $conf->global->SOCIETE_FISCAL_MONTH_START=6; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@-}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@-}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1960); // we use year 1960 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('195901-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1960); // we use year 1960 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('195901-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1960); // we use same year but fiscal month after - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('196012-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1960); // we use same year but fiscal month after + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('196012-0001', $result); // counter must be reset to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1961); // we use same fiscal year but different year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('196001-0002', $result); // counter must be 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1961); // we use same fiscal year but different year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('196001-0002', $result); // counter must be 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1961); // we use different discal year but same year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('196112-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1961); // we use different discal year but same year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('196112-0001', $result); // counter must be reset to 1 - // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want end year - $conf->global->SOCIETE_FISCAL_MONTH_START=6; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@+}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@+}'; + // Now we try with a different fiscal month (defined by SOCIETE_FISCAL_MONTH_START) and we always want end year + $conf->global->SOCIETE_FISCAL_MONTH_START=6; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@+}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@+}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1970); // we use year 1970 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('197001-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1970); // we use year 1970 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('197001-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1970); // we use same year but fiscal month after - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('197112-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1970); // we use same year but fiscal month after + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('197112-0001', $result); // counter must be reset to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1971); // we use same fiscal year but different year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('197101-0002', $result); // counter must be 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1971); // we use same fiscal year but different year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('197101-0002', $result); // counter must be 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1971); // we use different fiscal year but same year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('197212-0001', $result); // counter must be reset to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 12, 1, 1971); // we use different fiscal year but same year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('197212-0001', $result); // counter must be reset to 1 - // Now we try with a reset every month (@99) - $conf->global->SOCIETE_FISCAL_MONTH_START=6; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@99}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@99}'; + // Now we try with a reset every month (@99) + $conf->global->SOCIETE_FISCAL_MONTH_START=6; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@99}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000@99}'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('198001-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('198001-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('198001-0002', $result); // counter must start to 2 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('198001-0002', $result); // counter must start to 2 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 2, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('198002-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 2, 1, 1980); // we use year 1980 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('198002-0001', $result); // counter must start to 1 - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1981); // we use year 1981 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($mysoc, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('198101-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1981); // we use year 1981 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($mysoc, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('198101-0001', $result); // counter must start to 1 - // Test with {t} tag - $conf->global->SOCIETE_FISCAL_MONTH_START=1; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{t}{yyyy}{mm}-{0000}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{t}{yyyy}{mm}-{0000}'; + // Test with {t} tag + $conf->global->SOCIETE_FISCAL_MONTH_START=1; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{t}{yyyy}{mm}-{0000}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{t}{yyyy}{mm}-{0000}'; - $tmpthirdparty=new Societe($this->savdb); - $tmpthirdparty->initAsSpecimen(); - $tmpthirdparty->typent_code = 'TE_ABC'; + $tmpthirdparty=new Societe($this->savdb); + $tmpthirdparty->initAsSpecimen(); + $tmpthirdparty->typent_code = 'TE_ABC'; - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1982); // we use year 1982 to be sure to not have existing invoice for this year - $numbering=new mod_facture_mercure(); - $result=$numbering->getNextValue($tmpthirdparty, $localobject); - $result2=$localobject->create($user, 1); - $result3=$localobject->validate($user, $result); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('A198201-0001', $result); // counter must start to 1 + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen(); + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1982); // we use year 1982 to be sure to not have existing invoice for this year + $numbering=new mod_facture_mercure(); + $result=$numbering->getNextValue($tmpthirdparty, $localobject); + $result2=$localobject->create($user, 1); + $result3=$localobject->validate($user, $result); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('A198201-0001', $result); // counter must start to 1 - return $result; - } + return $result; + } } diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 7a2e31cbdad..3177e5555ed 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -30,8 +30,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; require_once dirname(__FILE__).'/../../htdocs/paypal/lib/paypal.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,69 +74,71 @@ class PaypalTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (empty($conf->paypal->enabled)) { print __METHOD__." Module Paypal must be enabled.\n"; die(); } + if (empty($conf->paypal->enabled)) { + print __METHOD__." Module Paypal must be enabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testPaypalOk - * - * @return void - */ - public function testPaypalOk() - { - global $conf,$user,$langs,$db; + /** + * testPaypalOk + * + * @return void + */ + public function testPaypalOk() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -148,9 +149,9 @@ class PaypalTest extends PHPUnit\Framework\TestCase $result=getURLContent($urltotest, 'GET', '', 1, array(), array('http', 'https'), 2); - print __METHOD__." result=".$result['http_code']."\n"; - $this->assertEquals(200, $result['http_code']); + print __METHOD__." result=".$result['http_code']."\n"; + $this->assertEquals(200, $result['http_code']); - return $result; - } + return $result; + } } diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index c323c2bb6f8..4c07f970c24 100644 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -32,8 +32,7 @@ require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/pdf.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/doc.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -77,65 +76,65 @@ class PdfDocTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testPdfDocGetLineDesc - * - * @return void - */ - public function testPdfDocGetLineDesc() - { - global $conf,$user,$langs,$db; + /** + * testPdfDocGetLineDesc + * + * @return void + */ + public function testPdfDocGetLineDesc() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -144,7 +143,9 @@ class PdfDocTest extends PHPUnit\Framework\TestCase $localproduct=new Product($this->savdb); $localproduct->fetch(0, 'PIDRESS'); $product_id=$localproduct->id; - if ($product_id <= 0) { print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); } + if ($product_id <= 0) { + print "\n".__METHOD__." A product with ref PIDRESS must exists into database"; die(); + } $localobject=new Facture($this->savdb); $localobject->initAsSpecimen(); @@ -154,29 +155,29 @@ class PdfDocTest extends PHPUnit\Framework\TestCase $localobject->lines[0]->label='Label 1'; $localobject->lines[0]->desc="This is a description with a é accent\n(Country of origin: France)"; - $result=pdf_getlinedesc($localobject, 0, $langs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "PIDRESS - Label 1<br>This is a description with a &eacute; accent<br>(Country of origin: France)"); + $result=pdf_getlinedesc($localobject, 0, $langs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "PIDRESS - Label 1<br>This is a description with a &eacute; accent<br>(Country of origin: France)"); - $result=doc_getlinedesc($localobject->lines[0], $langs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "PIDRESS - Label 1\nThis is a description with a é accent\n(Country of origin: France)"); - } + $result=doc_getlinedesc($localobject->lines[0], $langs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "PIDRESS - Label 1\nThis is a description with a é accent\n(Country of origin: France)"); + } - /** - * testPdfGetHeightForLogo - * - * @return void - */ - public function testPdfGetHeightForLogo() - { - $file=dirname(__FILE__).'/img250x50.jpg'; - $result=pdf_getHeightForLogo($file); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 20); - $file=dirname(__FILE__).'/img250x20.png'; - $result=pdf_getHeightForLogo($file); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 10.4); - } + /** + * testPdfGetHeightForLogo + * + * @return void + */ + public function testPdfGetHeightForLogo() + { + $file=dirname(__FILE__).'/img250x50.jpg'; + $result=pdf_getHeightForLogo($file); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 20); + $file=dirname(__FILE__).'/img250x20.png'; + $result=pdf_getHeightForLogo($file); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 10.4); + } } diff --git a/test/phpunit/PgsqlTest.php b/test/phpunit/PgsqlTest.php index 5a09e7fc55a..044d4576067 100644 --- a/test/phpunit/PgsqlTest.php +++ b/test/phpunit/PgsqlTest.php @@ -30,8 +30,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/db/pgsql.class.php'; $langs->load("dict"); -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -76,114 +75,114 @@ class PgsqlTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testConvertSQLFromMysql - * - * @return int - */ - public function testConvertSQLFromMysql() - { - global $conf,$user,$langs,$db; + /** + * testConvertSQLFromMysql + * + * @return int + */ + public function testConvertSQLFromMysql() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - $sql="ALTER TABLE llx_table RENAME TO llx_table_new;"; - $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "ALTER TABLE llx_table RENAME TO llx_table_new;"); + $sql="ALTER TABLE llx_table RENAME TO llx_table_new;"; + $result=DoliDBPgsql::convertSQLFromMysql($sql); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "ALTER TABLE llx_table RENAME TO llx_table_new;"); - $sql="ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;"; - $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0';"); + $sql="ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;"; + $result=DoliDBPgsql::convertSQLFromMysql($sql); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0';"); - $sql="ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);"; - $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "-- ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); replaced by --\nALTER TABLE llx_table RENAME COLUMN oldname TO newname"); + $sql="ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);"; + $result=DoliDBPgsql::convertSQLFromMysql($sql); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "-- ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); replaced by --\nALTER TABLE llx_table RENAME COLUMN oldname TO newname"); - $sql="ALTER TABLE llx_table DROP COLUMN oldname;"; - $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, $sql); + $sql="ALTER TABLE llx_table DROP COLUMN oldname;"; + $result=DoliDBPgsql::convertSQLFromMysql($sql); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, $sql); - $sql="ALTER TABLE llx_table MODIFY name varchar(60);"; - $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "-- ALTER TABLE llx_table MODIFY name varchar(60); replaced by --\nALTER TABLE llx_table ALTER COLUMN name TYPE varchar(60);"); + $sql="ALTER TABLE llx_table MODIFY name varchar(60);"; + $result=DoliDBPgsql::convertSQLFromMysql($sql); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "-- ALTER TABLE llx_table MODIFY name varchar(60); replaced by --\nALTER TABLE llx_table ALTER COLUMN name TYPE varchar(60);"); - // Create a constraint + // Create a constraint $sql='ALTER TABLE llx_tablechild ADD CONSTRAINT fk_tablechild_fk_fieldparent FOREIGN KEY (fk_fieldparent) REFERENCES llx_tableparent (rowid)'; $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, $sql.' DEFERRABLE INITIALLY IMMEDIATE;'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, $sql.' DEFERRABLE INITIALLY IMMEDIATE;'); - // Test GROUP_CONCAT (without SEPARATOR) + // Test GROUP_CONCAT (without SEPARATOR) $sql="SELECT a.b, GROUP_CONCAT(a.c) FROM table GROUP BY a.b"; $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (without SEPARATOR)'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (without SEPARATOR)'); - // Test GROUP_CONCAT (with SEPARATOR) + // Test GROUP_CONCAT (with SEPARATOR) $sql="SELECT a.b, GROUP_CONCAT(a.c SEPARATOR ',') FROM table GROUP BY a.b"; $result=DoliDBPgsql::convertSQLFromMysql($sql); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (with SEPARATOR)'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (with SEPARATOR)'); - return $result; - } + return $result; + } } diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index 0c47ec4f275..1845bf05149 100755 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -31,18 +31,16 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/price.lib.php'; require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; -if (! empty($conf->global->MAIN_ROUNDING_RULE_TOT)) -{ - print "Parameter MAIN_ROUNDING_RULE_TOT must be set to 0 or not set.\n"; - exit(1); +if (! empty($conf->global->MAIN_ROUNDING_RULE_TOT)) { + print "Parameter MAIN_ROUNDING_RULE_TOT must be set to 0 or not set.\n"; + exit(1); } /** @@ -54,311 +52,311 @@ if (! empty($conf->global->MAIN_ROUNDING_RULE_TOT)) */ class PricesTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return CoreTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return CoreTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - //$db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - //$db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + //$db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * Test function calcul_price_total - * - * @return boolean - * @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage - */ - public function testCalculPriceTotal() - { - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + /** + * Test function calcul_price_total + * + * @return boolean + * @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage + */ + public function testCalculPriceTotal() + { + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; - global $mysoc; - $mysoc=new Societe($db); + global $mysoc; + $mysoc=new Societe($db); - // To force status that say module multicompany is on - //$conf->multicurrency=new stdClass(); - //$conf->multicurrency->enabled = 0; + // To force status that say module multicompany is on + //$conf->multicurrency=new stdClass(); + //$conf->multicurrency->enabled = 0; - /* - * Country France - */ + /* + * Country France + */ - // qty=1, unit_price=1.24, discount_line=0, vat_rate=10, price_base_type='HT' (method we provide value) - $mysoc->country_code='FR'; - $mysoc->country_id=1; - $result1=calcul_price_total(1, 1.24, 0, 10, 0, 0, 0, 'HT', 0, 0); - print __METHOD__." result1=".join(', ', $result1)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(1.24, 0.12, 1.36, 1.24, 0.124, 1.364, 1.24, 0.12, 1.36, 0, 0, 0, 0, 0, 0, 0, 1.24, 0.12, 1.36, 1.24, 0.124, 1.364, 1.24, 0.12, 1.36, 0, 0), $result1, 'Test1 FR'); + // qty=1, unit_price=1.24, discount_line=0, vat_rate=10, price_base_type='HT' (method we provide value) + $mysoc->country_code='FR'; + $mysoc->country_id=1; + $result1=calcul_price_total(1, 1.24, 0, 10, 0, 0, 0, 'HT', 0, 0); + print __METHOD__." result1=".join(', ', $result1)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(1.24, 0.12, 1.36, 1.24, 0.124, 1.364, 1.24, 0.12, 1.36, 0, 0, 0, 0, 0, 0, 0, 1.24, 0.12, 1.36, 1.24, 0.124, 1.364, 1.24, 0.12, 1.36, 0, 0), $result1, 'Test1 FR'); - // qty=1, unit_price=1.24, discount_line=0, vat_rate=10, price_base_type='HT', multicurrency_tx=1.09205 (method we provide value) - $mysoc->country_code='FR'; - $mysoc->country_id=1; - $result1=calcul_price_total(2, 8.56, 0, 10, 0, 0, 0, 'HT', 0, 0, '', '', 100, 1.09205); - print __METHOD__." result1=".join(', ', $result1)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(17.12, 1.71, 18.83, 8.56, 0.856, 9.416, 17.12, 1.71, 18.83, 0, 0, 0, 0, 0, 0, 0, 18.7, 1.87, 20.57, 9.34795, 0.93479, 10.28274, 18.7, 1.87, 20.57, 0, 0), $result1, 'Test1b FR'); + // qty=1, unit_price=1.24, discount_line=0, vat_rate=10, price_base_type='HT', multicurrency_tx=1.09205 (method we provide value) + $mysoc->country_code='FR'; + $mysoc->country_id=1; + $result1=calcul_price_total(2, 8.56, 0, 10, 0, 0, 0, 'HT', 0, 0, '', '', 100, 1.09205); + print __METHOD__." result1=".join(', ', $result1)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(17.12, 1.71, 18.83, 8.56, 0.856, 9.416, 17.12, 1.71, 18.83, 0, 0, 0, 0, 0, 0, 0, 18.7, 1.87, 20.57, 9.34795, 0.93479, 10.28274, 18.7, 1.87, 20.57, 0, 0), $result1, 'Test1b FR'); - // qty=2, unit_price=0, discount_line=0, vat_rate=10, price_base_type='HT', multicurrency_tx=1.09205 (method we provide value), pu_ht_devise=100 - $mysoc->country_code='FR'; - $mysoc->country_id=1; - $result1=calcul_price_total(2, 0, 0, 10, 0, 0, 0, 'HT', 0, 0, '', '', 100, 1.09205, 20); - print __METHOD__." result1=".join(', ', $result1)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(36.63, 3.66, 40.29, 18.31418, 1.83142, 20.1456, 36.63, 3.66, 40.29, 0, 0, 0, 0, 0, 0, 0, 40, 4, 44, 20, 2, 22, 40, 4, 44, 0, 0), $result1, 'Test1c FR'); + // qty=2, unit_price=0, discount_line=0, vat_rate=10, price_base_type='HT', multicurrency_tx=1.09205 (method we provide value), pu_ht_devise=100 + $mysoc->country_code='FR'; + $mysoc->country_id=1; + $result1=calcul_price_total(2, 0, 0, 10, 0, 0, 0, 'HT', 0, 0, '', '', 100, 1.09205, 20); + print __METHOD__." result1=".join(', ', $result1)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(36.63, 3.66, 40.29, 18.31418, 1.83142, 20.1456, 36.63, 3.66, 40.29, 0, 0, 0, 0, 0, 0, 0, 40, 4, 44, 20, 2, 22, 40, 4, 44, 0, 0), $result1, 'Test1c FR'); - /* - * Country Spain - */ + /* + * Country Spain + */ - // 10 * 10 HT - 0% discount with 10% vat, seller not using localtax1, not localtax2 (method we provide value) - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=0; - $result2=calcul_price_total(10, 10, 0, 10, 0, 0, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2 - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test1 ES'); + // 10 * 10 HT - 0% discount with 10% vat, seller not using localtax1, not localtax2 (method we provide value) + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=0; + $result2=calcul_price_total(10, 10, 0, 10, 0, 0, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2 + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test1 ES'); - // 10 * 10 HT - 0% discount with 10% vat, seller not using localtax1, not localtax2 (other method autodetect) - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=0; - $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2 - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test2 ES'); + // 10 * 10 HT - 0% discount with 10% vat, seller not using localtax1, not localtax2 (other method autodetect) + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=0; + $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2 + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test2 ES'); - // -------------------------------------------------------- + // -------------------------------------------------------- - // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (method we provide value) - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=1; - $mysoc->localtax2_assuj=0; - $result2=calcul_price_total(10, 10, 0, 10, 1.4, 0, 0, 'HT', 0, 0); - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0, 0.14, 0, 0, 1.4, 0, 100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0), $result2, 'Test3 ES'); + // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (method we provide value) + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=1; + $mysoc->localtax2_assuj=0; + $result2=calcul_price_total(10, 10, 0, 10, 1.4, 0, 0, 'HT', 0, 0); + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0, 0.14, 0, 0, 1.4, 0, 100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0), $result2, 'Test3 ES'); - // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (other method autodetect) - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=1; - $mysoc->localtax2_assuj=0; - $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0, 0.14, 0, 0, 1.4, 0, 100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0), $result2, 'Test4 ES'); + // 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (other method autodetect) + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=1; + $mysoc->localtax2_assuj=0; + $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0, 0.14, 0, 0, 1.4, 0, 100, 10, 111.4, 10, 1, 11.14, 100, 10, 111.4, 1.4, 0), $result2, 'Test4 ES'); - // -------------------------------------------------------- + // -------------------------------------------------------- - // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 19% localtax2 type 5 (method we provide value), we provide a service and not a product - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=1; - $result2=calcul_price_total(10, 10, 0, 10, 0, -19, 0, 'HT', 0, 1); - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19, 0, -1.90, 0, 0, -19, 100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19), $result2, 'Test5 ES for service'); + // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 19% localtax2 type 5 (method we provide value), we provide a service and not a product + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=1; + $result2=calcul_price_total(10, 10, 0, 10, 0, -19, 0, 'HT', 0, 1); + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19, 0, -1.90, 0, 0, -19, 100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19), $result2, 'Test5 ES for service'); - // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 21% localtax2 type 5 (other method autodetect), we provide a service and not a product - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=1; - $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test6 ES for product'); + // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 21% localtax2 type 5 (other method autodetect), we provide a service and not a product + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=1; + $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 0); + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0, 0, 0, 0, 0, 0, 100, 10, 110, 10, 1, 11, 100, 10, 110, 0, 0), $result2, 'Test6 ES for product'); - // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 21% localtax2 type 5 (other method autodetect), we provide a product and not a service - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=1; - $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 1); - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19, 0, -1.90, 0, 0, -19, 100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19), $result2, 'Test6 ES for service'); + // 10 * 10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 21% localtax2 type 5 (other method autodetect), we provide a product and not a service + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=1; + $result2=calcul_price_total(10, 10, 0, 10, -1, -1, 0, 'HT', 0, 1); + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19, 0, -1.90, 0, 0, -19, 100, 10, 91, 10, 1, 9.1, 100, 10, 91, 0, -19), $result2, 'Test6 ES for service'); - // -------------------------------------------------------- + // -------------------------------------------------------- - // Credit Note: 10 * -10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 19% localtax2 type 5 (method we provide value), we provide a product and not a service - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=1; - $result2=calcul_price_total(10, -10, 0, 10, 0, 19, 0, 'HT', 0, 0); - print __METHOD__." result2=".join(', ', $result2)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(-100, -10, -110, -10, -1, -11, -100, -10, -110, 0, 0, 0, 0, 0, 0, 0, -100, -10, -110, -10, -1, -11, -100, -10, -110, 0, 0), $result2, 'Test7 ES for product'); + // Credit Note: 10 * -10 HT - 0% discount with 10% vat and 0% localtax1 type 3, 19% localtax2 type 5 (method we provide value), we provide a product and not a service + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=1; + $result2=calcul_price_total(10, -10, 0, 10, 0, 19, 0, 'HT', 0, 0); + print __METHOD__." result2=".join(', ', $result2)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(-100, -10, -110, -10, -1, -11, -100, -10, -110, 0, 0, 0, 0, 0, 0, 0, -100, -10, -110, -10, -1, -11, -100, -10, -110, 0, 0), $result2, 'Test7 ES for product'); - // Credit Note: 10 * -10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (other method autodetect), we provide a service and not a product - $mysoc->country_code='ES'; - $mysoc->country_id=4; - $mysoc->localtax1_assuj=0; - $mysoc->localtax2_assuj=1; - $result2=calcul_price_total(10, -10, 0, 10, -1, -1, 0, 'HT', 0, 1); - print __METHOD__." result2=".join(', ', $result2)."\n"; - $this->assertEquals(array(-100, -10, -91, -10, -1, -9.1, -100, -10, -91, 0, 19, 0, 1.90, 0, 0, 19, -100, -10, -91, -10, -1, -9.1, -100, -10, -91, 0, 19), $result2, 'Test8 ES for service'); + // Credit Note: 10 * -10 HT - 0% discount with 10% vat and 1.4% localtax1 type 3, 0% localtax2 type 5 (other method autodetect), we provide a service and not a product + $mysoc->country_code='ES'; + $mysoc->country_id=4; + $mysoc->localtax1_assuj=0; + $mysoc->localtax2_assuj=1; + $result2=calcul_price_total(10, -10, 0, 10, -1, -1, 0, 'HT', 0, 1); + print __METHOD__." result2=".join(', ', $result2)."\n"; + $this->assertEquals(array(-100, -10, -91, -10, -1, -9.1, -100, -10, -91, 0, 19, 0, 1.90, 0, 0, 19, -100, -10, -91, -10, -1, -9.1, -100, -10, -91, 0, 19), $result2, 'Test8 ES for service'); - /* - * Country Côte d'Ivoire - */ + /* + * Country Côte d'Ivoire + */ - // 10 * 10 HT - 0% discount with 18% vat, seller using localtax1 type 2, not localtax2 (method we provide value) - $mysoc->country_code='CI'; - $mysoc->country_id=21; - $mysoc->localtax1_assuj=1; - $mysoc->localtax2_assuj=0; - //$localtaxes=getLocalTaxesFromRate(18, 0, null, $mysoc); - //var_dump($locataxes); - $result3=calcul_price_total(10, 10, 0, 18, 7.5, 0, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 18% vat and 7.5% localtax1, 0% localtax2 - print __METHOD__." result3=".join(', ', $result3)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0, 0.885, 0, 0, 8.85, 0, 100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0), $result3, 'Test9 CI'); + // 10 * 10 HT - 0% discount with 18% vat, seller using localtax1 type 2, not localtax2 (method we provide value) + $mysoc->country_code='CI'; + $mysoc->country_id=21; + $mysoc->localtax1_assuj=1; + $mysoc->localtax2_assuj=0; + //$localtaxes=getLocalTaxesFromRate(18, 0, null, $mysoc); + //var_dump($locataxes); + $result3=calcul_price_total(10, 10, 0, 18, 7.5, 0, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 18% vat and 7.5% localtax1, 0% localtax2 + print __METHOD__." result3=".join(', ', $result3)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0, 0.885, 0, 0, 8.85, 0, 100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0), $result3, 'Test9 CI'); - // 10 * 10 HT - 0% discount with 18% vat, seller using localtax1 type 2, not localtax2 (other method autodetect) - $mysoc->country_code='CI'; - $mysoc->country_id=21; - $mysoc->localtax1_assuj=1; - $mysoc->localtax2_assuj=0; - $result3=calcul_price_total(10, 10, 0, 18, -1, -1, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 18% vat and 7.5% localtax1, 0% localtax2 - print __METHOD__." result3=".join(', ', $result3)."\n"; - // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) - $this->assertEquals(array(100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0, 0.885, 0, 0, 8.85, 0, 100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0), $result3, 'Test10 CI'); + // 10 * 10 HT - 0% discount with 18% vat, seller using localtax1 type 2, not localtax2 (other method autodetect) + $mysoc->country_code='CI'; + $mysoc->country_id=21; + $mysoc->localtax1_assuj=1; + $mysoc->localtax2_assuj=0; + $result3=calcul_price_total(10, 10, 0, 18, -1, -1, 0, 'HT', 0, 0); // 10 * 10 HT - 0% discount with 18% vat and 7.5% localtax1, 0% localtax2 + print __METHOD__." result3=".join(', ', $result3)."\n"; + // result[0,1,2,3,4,5,6,7,8] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount) + $this->assertEquals(array(100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0, 0.885, 0, 0, 8.85, 0, 100, 18, 126.85, 10, 1.8, 12.685, 100, 18, 126.85, 8.85, 0), $result3, 'Test10 CI'); - return true; - } + return true; + } - /** - * Test function addline and update_price - * - * @return boolean - * @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage - */ - public function testUpdatePrice() - { - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + /** + * Test function addline and update_price + * + * @return boolean + * @see http://wiki.dolibarr.org/index.php/Draft:VAT_calculation_and_rounding#Standard_usage + */ + public function testUpdatePrice() + { + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; - $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; + $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND=0; - // Two lines of 1.24 give 2.48 HT and 2.72 TTC with standard vat rounding mode - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen('nolines'); - $invoiceid=$localobject->create($user); + // Two lines of 1.24 give 2.48 HT and 2.72 TTC with standard vat rounding mode + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen('nolines'); + $invoiceid=$localobject->create($user); - $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); - $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); + $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); + $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); - $newlocalobject=new Facture($this->savdb); - $newlocalobject->fetch($invoiceid); + $newlocalobject=new Facture($this->savdb); + $newlocalobject->fetch($invoiceid); - $this->assertEquals(2.48, $newlocalobject->total_ht, "testUpdatePrice test1"); - $this->assertEquals(0.24, $newlocalobject->total_tva, "testUpdatePrice test2"); - $this->assertEquals(2.72, $newlocalobject->total_ttc, "testUpdatePrice test3"); + $this->assertEquals(2.48, $newlocalobject->total_ht, "testUpdatePrice test1"); + $this->assertEquals(0.24, $newlocalobject->total_tva, "testUpdatePrice test2"); + $this->assertEquals(2.72, $newlocalobject->total_ttc, "testUpdatePrice test3"); - // Two lines of 1.24 give 2.48 HT and 2.73 TTC with global vat rounding mode - $localobject=new Facture($this->savdb); - $localobject->initAsSpecimen('nolines'); - $invoiceid=$localobject->create($user); + // Two lines of 1.24 give 2.48 HT and 2.73 TTC with global vat rounding mode + $localobject=new Facture($this->savdb); + $localobject->initAsSpecimen('nolines'); + $invoiceid=$localobject->create($user); - $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); - $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); + $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); + $localobject->addline('Desc', 1.24, 1, 10, 0, 0, 0, 0, '', '', 0, 0, 0, 'HT'); - $newlocalobject=new Facture($this->savdb); - $newlocalobject->fetch($invoiceid); + $newlocalobject=new Facture($this->savdb); + $newlocalobject->fetch($invoiceid); - $this->assertEquals(2.48, $newlocalobject->total_ht, "testUpdatePrice test4"); - //$this->assertEquals(0.25,$newlocalobject->total_tva); - //$this->assertEquals(2.73,$newlocalobject->total_ttc); - } + $this->assertEquals(2.48, $newlocalobject->total_ht, "testUpdatePrice test4"); + //$this->assertEquals(0.25,$newlocalobject->total_tva); + //$this->assertEquals(2.73,$newlocalobject->total_ttc); + } } diff --git a/test/phpunit/ProductTest.php b/test/phpunit/ProductTest.php index e574d3e1d20..a7267251ed0 100644 --- a/test/phpunit/ProductTest.php +++ b/test/phpunit/ProductTest.php @@ -29,11 +29,10 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -47,208 +46,210 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class ProductTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return ProductTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return ProductTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (empty($conf->produit->enabled)) { print __METHOD__." Module Product must be enabled.\n"; die(); } + if (empty($conf->produit->enabled)) { + print __METHOD__." Module Product must be enabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testProductCreate - * - * @return void - */ - public function testProductCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testProductCreate + * + * @return void + */ + public function testProductCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Product($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new Product($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - print __METHOD__." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0, "Creation of product"); + print __METHOD__." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0, "Creation of product"); - return $result; - } + return $result; + } - /** - * testProductFetch - * - * @param int $id Id product - * @return Product - * - * @depends testProductCreate - * The depends says test is run only if previous is ok - */ - public function testProductFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testProductFetch + * + * @param int $id Id product + * @return Product + * + * @depends testProductCreate + * The depends says test is run only if previous is ok + */ + public function testProductFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Product($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject=new Product($this->savdb); + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testProductUpdate - * - * @param Product $localobject Product - * @return void - * - * @depends testProductFetch - * The depends says test is run only if previous is ok - */ - public function testProductUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testProductUpdate + * + * @param Product $localobject Product + * @return void + * + * @depends testProductFetch + * The depends says test is run only if previous is ok + */ + public function testProductUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->note_public = 'New public note after update'; - $localobject->note_private = 'New private note after update'; - $result=$localobject->update($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject->note_public = 'New public note after update'; + $localobject->note_private = 'New private note after update'; + $result=$localobject->update($localobject->id, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testProductOther - * - * @param Product $localobject Product - * @return void - * - * @depends testProductUpdate - * The depends says test is run only if previous is ok - */ - public function testProductOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testProductOther + * + * @param Product $localobject Product + * @return void + * + * @depends testProductUpdate + * The depends says test is run only if previous is ok + */ + public function testProductOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $this->assertEquals(0, 0); + $this->assertEquals(0, 0); - return $localobject->id; - } + return $localobject->id; + } - /** - * testProductDelete - * - * @param int $id Id of product - * @return void - * - * @depends testProductOther - * The depends says test is run only if previous is ok - */ - public function testProductDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testProductDelete + * + * @param int $id Id of product + * @return void + * + * @depends testProductOther + * The depends says test is run only if previous is ok + */ + public function testProductDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Product($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Product($this->savdb); + $result=$localobject->fetch($id); - $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->delete($user); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } } diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 8a7e0540b9a..d9f76f26635 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -30,8 +30,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/projet/class/project.class.php'; require_once dirname(__FILE__).'/../../htdocs/projet/class/task.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,40 +74,40 @@ class ProjectTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -116,135 +115,135 @@ class ProjectTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; //print $db->getVersion()."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } - - /** - * testProjectCreate - * - * @return void - */ - public function testProjectCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject=new Project($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); - - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } - - /** - * testProjectFetch - * - * @param int $id Id of object - * @return void - * - * @depends testProjectCreate - * The depends says test is run only if previous is ok - */ - public function testProjectFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject=new Project($this->savdb); - $result=$localobject->fetch($id); - - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } - - /** - * testProjectValid - * - * @param Project $localobject Project - * @return Project - * - * @depends testProjectFetch - * The depends says test is run only if previous is ok - */ - public function testProjectValid($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $result=$localobject->setValid($user); - - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + protected function tearDown() + { + print __METHOD__."\n"; + } /** - * testProjectClose - * - * @param Project $localobject Project - * @return int - * - * @depends testProjectValid - * The depends says test is run only if previous is ok - */ - public function testProjectOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $result=$localobject->setClose($user); - - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject->id; - } - - /** - * testProjectDelete - * - * @param int $id Id of project - * @return void - * - * @depends testProjectClose - * The depends says test is run only if previous is ok - */ - public function testProjectDelete($id) - { - global $conf,$user,$langs,$db; + * testProjectCreate + * + * @return void + */ + public function testProjectCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Project($this->savdb); - $result=$localobject->fetch($id); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); + + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } + + /** + * testProjectFetch + * + * @param int $id Id of object + * @return void + * + * @depends testProjectCreate + * The depends says test is run only if previous is ok + */ + public function testProjectFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Project($this->savdb); + $result=$localobject->fetch($id); + + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } + + /** + * testProjectValid + * + * @param Project $localobject Project + * @return Project + * + * @depends testProjectFetch + * The depends says test is run only if previous is ok + */ + public function testProjectValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setValid($user); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } + + /** + * testProjectClose + * + * @param Project $localobject Project + * @return int + * + * @depends testProjectValid + * The depends says test is run only if previous is ok + */ + public function testProjectOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setClose($user); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject->id; + } + + /** + * testProjectDelete + * + * @param int $id Id of project + * @return void + * + * @depends testProjectClose + * The depends says test is run only if previous is ok + */ + public function testProjectDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $localobject=new Project($this->savdb); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index ea678e8df34..235cc81e10c 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/comm/propal/class/propal.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -74,40 +73,40 @@ class PropalTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -115,190 +114,190 @@ class PropalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; //print $db->getVersion()."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testPropalCreate - * - * @return void - */ - public function testPropalCreate() - { - global $conf,$user,$langs,$db; + /** + * testPropalCreate + * + * @return void + */ + public function testPropalCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Propal($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testPropalFetch - * - * @param int $id Id of object - * @return Propal - * - * @depends testPropalCreate - * The depends says test is run only if previous is ok - */ - public function testPropalFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testPropalFetch + * + * @param int $id Id of object + * @return Propal + * + * @depends testPropalCreate + * The depends says test is run only if previous is ok + */ + public function testPropalFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Propal($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testPropalUpdate - * - * @param Propal $localobject Proposal - * @return Propal - * - * @depends testPropalFetch - * The depends says test is run only if previous is ok - */ - public function testPropalUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject->note_private = 'New note private after update'; - $result = $localobject->update($user); - - $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - return $localobject; - } - - /** - * testPropalAddLine - * - * @param Propal $localobject Proposal - * @return Propal - * - * @depends testPropalUpdate - * The depends says test is run only if previous is ok - */ - public function testPropalAddLine($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $localobject->fetch_thirdparty(); - $result=$localobject->addline('Added line', 10, 2, 19.6); - - $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - return $localobject; - } - - /** - * testPropalValid - * - * @param Propal $localobject Proposal - * @return Propal - * - * @depends testPropalAddLine - * The depends says test is run only if previous is ok - */ - public function testPropalValid($localobject) - { - global $conf,$user,$langs,$db; + /** + * testPropalUpdate + * + * @param Propal $localobject Proposal + * @return Propal + * + * @depends testPropalFetch + * The depends says test is run only if previous is ok + */ + public function testPropalUpdate($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; - $result=$localobject->valid($user); + $localobject->note_private = 'New note private after update'; + $result = $localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject; + } - /** - * testPropalOther - * - * @param Propal $localobject Proposal - * @return int - * - * @depends testPropalValid - * The depends says test is run only if previous is ok - */ - public function testPropalOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testPropalAddLine + * + * @param Propal $localobject Proposal + * @return Propal + * + * @depends testPropalUpdate + * The depends says test is run only if previous is ok + */ + public function testPropalAddLine($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + $localobject->fetch_thirdparty(); + $result=$localobject->addline('Added line', 10, 2, 19.6); - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject; + } - return $localobject->id; - } + /** + * testPropalValid + * + * @param Propal $localobject Proposal + * @return Propal + * + * @depends testPropalAddLine + * The depends says test is run only if previous is ok + */ + public function testPropalValid($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /** - * testPropalDelete - * - * @param int $id Id of proposal - * @return void - * - * @depends testPropalOther - * The depends says test is run only if previous is ok - */ - public function testPropalDelete($id) - { - global $conf,$user,$langs,$db; + $result=$localobject->valid($user); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } + + /** + * testPropalOther + * + * @param Propal $localobject Proposal + * @return int + * + * @depends testPropalValid + * The depends says test is run only if previous is ok + */ + public function testPropalOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ + + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); + + return $localobject->id; + } + + /** + * testPropalDelete + * + * @param int $id Id of proposal + * @return void + * + * @depends testPropalOther + * The depends says test is run only if previous is ok + */ + public function testPropalDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new Propal($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/RestAPIDocumentTest.php b/test/phpunit/RestAPIDocumentTest.php index e38f1fbae12..c71ef7bcf63 100644 --- a/test/phpunit/RestAPIDocumentTest.php +++ b/test/phpunit/RestAPIDocumentTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/files.lib.php'; if (empty($user->id)) { - echo "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + echo "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS = 1; $conf->global->MAIN_UMASK = '0666'; @@ -47,204 +47,204 @@ $conf->global->MAIN_UMASK = '0666'; */ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; - protected $api_url; - protected $api_key; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + protected $api_url; + protected $api_key; - /** - * Constructor - * We save global variables into local variables. - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables. + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf = $conf; - $this->savuser = $user; - $this->savlangs = $langs; - $this->savdb = $db; + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf = $conf; + $this->savuser = $user; + $this->savlangs = $langs; + $this->savdb = $db; - echo __METHOD__.' db->type='.$db->type.' user->id='.$user->id; - //print " - db ".$db->db; - echo "\n"; - } + echo __METHOD__.' db->type='.$db->type.' user->id='.$user->id; + //print " - db ".$db->db; + echo "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - echo __METHOD__."\n"; - } + echo __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - echo __METHOD__."\n"; - } + echo __METHOD__."\n"; + } - /** - * Init phpunit tests. - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf = $this->savconf; - $user = $this->savuser; - $langs = $this->savlangs; - $db = $this->savdb; + /** + * Init phpunit tests. + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf = $this->savconf; + $user = $this->savuser; + $langs = $this->savlangs; + $db = $this->savdb; - $this->api_url = DOL_MAIN_URL_ROOT.'/api/index.php'; + $this->api_url = DOL_MAIN_URL_ROOT.'/api/index.php'; - $login = 'admin'; - $password = 'admin'; - $url = $this->api_url.'/login?login='.$login.'&password='.$password; - // Call the API login method to save api_key for this test class - $result = getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); - echo __METHOD__.' result = '.var_export($result, true)."\n"; - echo __METHOD__.' curl_error_no: '.$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object = json_decode($result['content'], true); - $this->assertNotNull($object, 'Parsing of json result must no be null'); - $this->assertEquals('200', $object['success']['code']); + $login = 'admin'; + $password = 'admin'; + $url = $this->api_url.'/login?login='.$login.'&password='.$password; + // Call the API login method to save api_key for this test class + $result = getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); + echo __METHOD__.' result = '.var_export($result, true)."\n"; + echo __METHOD__.' curl_error_no: '.$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object = json_decode($result['content'], true); + $this->assertNotNull($object, 'Parsing of json result must no be null'); + $this->assertEquals('200', $object['success']['code']); - $this->api_key = $object['success']['token']; - echo __METHOD__." api_key: $this->api_key \n"; + $this->api_key = $object['success']['token']; + echo __METHOD__." api_key: $this->api_key \n"; - echo __METHOD__."\n"; - } + echo __METHOD__."\n"; + } - /** - * End phpunit tests. - * @return void - */ - protected function tearDown() - { - echo __METHOD__."\n"; - } + /** + * End phpunit tests. + * @return void + */ + protected function tearDown() + { + echo __METHOD__."\n"; + } - /** - * testPushDocument. - * - * @return int - */ - public function testPushDocument() - { - global $conf,$user,$langs,$db; + /** + * testPushDocument. + * + * @return int + */ + public function testPushDocument() + { + global $conf,$user,$langs,$db; - $url = $this->api_url.'/documents/upload?api_key='.$this->api_key; + $url = $this->api_url.'/documents/upload?api_key='.$this->api_key; - echo __METHOD__.' Request POST url='.$url."\n"; + echo __METHOD__.' Request POST url='.$url."\n"; - // Send to non existent directory + // Send to non existent directory - dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit1'); + dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit1'); - //$data = '{ "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "mysubdir1/mysubdir2", "filecontent": "content text", "fileencoding": "" }'; - $data = array( - 'filename'=>"mynewfile.txt", - 'modulepart'=>"medias", - 'subdir'=>"tmpphpunit/tmpphpunit1", - 'filecontent'=>"content text", - 'fileencoding'=>"", - 'overwriteifexists'=>0, - 'createdirifnotexists'=>0 - ); + //$data = '{ "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "mysubdir1/mysubdir2", "filecontent": "content text", "fileencoding": "" }'; + $data = array( + 'filename'=>"mynewfile.txt", + 'modulepart'=>"medias", + 'subdir'=>"tmpphpunit/tmpphpunit1", + 'filecontent'=>"content text", + 'fileencoding'=>"", + 'overwriteifexists'=>0, + 'createdirifnotexists'=>0 + ); - $param = ''; - foreach ($data as $key => $val) { - $param .= '&'.$key.'='.urlencode($val); - } + $param = ''; + foreach ($data as $key => $val) { + $param .= '&'.$key.'='.urlencode($val); + } - $result = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); - echo __METHOD__.' Result for sending document: '.var_export($result, true)."\n"; - echo __METHOD__.' curl_error_no: '.$result['curl_error_no']."\n"; - $object = json_decode($result['content'], true); - $this->assertNotNull($object, 'Parsing of json result must not be null'); - $this->assertEquals('401', $result['http_code'], 'Return code is not 401'); - $this->assertEquals('401', empty($object['error']['code']) ? '' : $object['error']['code'], 'Error code is not 401'); + $result = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); + echo __METHOD__.' Result for sending document: '.var_export($result, true)."\n"; + echo __METHOD__.' curl_error_no: '.$result['curl_error_no']."\n"; + $object = json_decode($result['content'], true); + $this->assertNotNull($object, 'Parsing of json result must not be null'); + $this->assertEquals('401', $result['http_code'], 'Return code is not 401'); + $this->assertEquals('401', empty($object['error']['code']) ? '' : $object['error']['code'], 'Error code is not 401'); - // Send to existent directory + // Send to existent directory - dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit2'); - dol_mkdir(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit2'); + dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit2'); + dol_mkdir(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit2'); - $data = array( - 'filename'=>"mynewfile.txt", - 'modulepart'=>"medias", - 'ref'=>"", - 'subdir'=>"tmpphpunit/tmpphpunit2", - 'filecontent'=>"content text", - 'fileencoding'=>"", - 'overwriteifexists'=>0, - 'createdirifnotexists'=>0 - ); + $data = array( + 'filename'=>"mynewfile.txt", + 'modulepart'=>"medias", + 'ref'=>"", + 'subdir'=>"tmpphpunit/tmpphpunit2", + 'filecontent'=>"content text", + 'fileencoding'=>"", + 'overwriteifexists'=>0, + 'createdirifnotexists'=>0 + ); - $param = ''; - foreach ($data as $key => $val) { - $param .= '&'.$key.'='.urlencode($val); - } + $param = ''; + foreach ($data as $key => $val) { + $param .= '&'.$key.'='.urlencode($val); + } - $result2 = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); - echo __METHOD__.' Result for sending document: '.var_export($result2, true)."\n"; - echo __METHOD__.' curl_error_no: '.$result2['curl_error_no']."\n"; - $object2 = json_decode($result2['content'], true); - //$this->assertNotNull($object2, 'Parsing of json result must not be null'); - $this->assertEquals('200', $result2['http_code'], 'Return code must be 200'); - $this->assertEquals($result2['curl_error_no'], ''); - $this->assertEquals($object2, 'mynewfile.txt', 'Must contains basename of file'); + $result2 = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); + echo __METHOD__.' Result for sending document: '.var_export($result2, true)."\n"; + echo __METHOD__.' curl_error_no: '.$result2['curl_error_no']."\n"; + $object2 = json_decode($result2['content'], true); + //$this->assertNotNull($object2, 'Parsing of json result must not be null'); + $this->assertEquals('200', $result2['http_code'], 'Return code must be 200'); + $this->assertEquals($result2['curl_error_no'], ''); + $this->assertEquals($object2, 'mynewfile.txt', 'Must contains basename of file'); - dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit3'); + dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit/tmpphpunit3'); - $data = array( - 'filename'=>"mynewfile.txt", - 'modulepart'=>"medias", - 'ref'=>"", - 'subdir'=>"tmpphpunit/tmpphpunit3", - 'filecontent'=>"content text", - 'fileencoding'=>"", - 'overwriteifexists'=>0, - 'createdirifnotexists'=>1 - ); + $data = array( + 'filename'=>"mynewfile.txt", + 'modulepart'=>"medias", + 'ref'=>"", + 'subdir'=>"tmpphpunit/tmpphpunit3", + 'filecontent'=>"content text", + 'fileencoding'=>"", + 'overwriteifexists'=>0, + 'createdirifnotexists'=>1 + ); - $param = ''; - foreach ($data as $key => $val) { - $param .= '&'.$key.'='.urlencode($val); - } + $param = ''; + foreach ($data as $key => $val) { + $param .= '&'.$key.'='.urlencode($val); + } - $result3 = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); - echo __METHOD__.' Result for sending document: '.var_export($result3, true)."\n"; - echo __METHOD__.' curl_error_no: '.$result3['curl_error_no']."\n"; - $object3 = json_decode($result3['content'], true); - //$this->assertNotNull($object2, 'Parsing of json result must not be null'); - $this->assertEquals('200', $result3['http_code'], 'Return code must be 200'); - $this->assertEquals($result3['curl_error_no'], ''); - $this->assertEquals($object3, 'mynewfile.txt', 'Must contains basename of file'); + $result3 = getURLContent($url, 'POST', $param, 1, array(), array('http', 'https'), 2); + echo __METHOD__.' Result for sending document: '.var_export($result3, true)."\n"; + echo __METHOD__.' curl_error_no: '.$result3['curl_error_no']."\n"; + $object3 = json_decode($result3['content'], true); + //$this->assertNotNull($object2, 'Parsing of json result must not be null'); + $this->assertEquals('200', $result3['http_code'], 'Return code must be 200'); + $this->assertEquals($result3['curl_error_no'], ''); + $this->assertEquals($object3, 'mynewfile.txt', 'Must contains basename of file'); - dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit'); - } + dol_delete_dir_recursive(DOL_DATA_ROOT.'/medias/tmpphpunit'); + } } diff --git a/test/phpunit/RestAPIUserTest.php b/test/phpunit/RestAPIUserTest.php index 6222f7fcaf7..a534c5f5910 100644 --- a/test/phpunit/RestAPIUserTest.php +++ b/test/phpunit/RestAPIUserTest.php @@ -32,9 +32,9 @@ require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; $conf->global->MAIN_UMASK='0666'; @@ -49,193 +49,195 @@ $conf->global->MAIN_UMASK='0666'; */ class RestAPIUserTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; - protected $api_url; - protected $api_key; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + protected $api_url; + protected $api_key; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; - if (empty($conf->api->enabled)) { print __METHOD__." module api must be enabled.\n"; die(); } + if (empty($conf->api->enabled)) { + print __METHOD__." module api must be enabled.\n"; die(); + } - print __METHOD__." db->type=".$db->type." user->id=".$user->id; - //print " - db ".$db->db; - print "\n"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $this->api_url=DOL_MAIN_URL_ROOT.'/api/index.php'; + $this->api_url=DOL_MAIN_URL_ROOT.'/api/index.php'; - $login='admin'; - $password='admin'; - $url=$this->api_url.'/login?login='.$login.'&password='.$password; - // Call the API login method to save api_key for this test class - $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); - print __METHOD__." result = ".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must not be null"); - $this->assertEquals('200', $object['success']['code']); + $login='admin'; + $password='admin'; + $url=$this->api_url.'/login?login='.$login.'&password='.$password; + // Call the API login method to save api_key for this test class + $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); + print __METHOD__." result = ".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object=json_decode($result['content'], true); + $this->assertNotNull($object, "Parsing of json result must not be null"); + $this->assertEquals('200', $object['success']['code']); - $this->api_key = $object['success']['token']; - print __METHOD__." api_key: $this->api_key \n"; + $this->api_key = $object['success']['token']; + print __METHOD__." api_key: $this->api_key \n"; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testRestGetUser - * - * @return int - */ - public function testRestGetUser() - { - global $conf,$user,$langs,$db; + /** + * testRestGetUser + * + * @return int + */ + public function testRestGetUser() + { + global $conf,$user,$langs,$db; - $url = $this->api_url.'/users/123456789?api_key='.$this->api_key; - //$addheaders=array('Content-Type: application/json'); + $url = $this->api_url.'/users/123456789?api_key='.$this->api_key; + //$addheaders=array('Content-Type: application/json'); - print __METHOD__." Request GET url=".$url."\n"; - $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); - //print __METHOD__." result for get on unexisting user: ".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must not be null"); - $this->assertEquals(404, $object['error']['code'], 'Error code is not 404'); + print __METHOD__." Request GET url=".$url."\n"; + $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); + //print __METHOD__." result for get on unexisting user: ".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object=json_decode($result['content'], true); + $this->assertNotNull($object, "Parsing of json result must not be null"); + $this->assertEquals(404, $object['error']['code'], 'Error code is not 404'); - $url = $this->api_url.'/users/1?api_key='.$this->api_key; + $url = $this->api_url.'/users/1?api_key='.$this->api_key; - print __METHOD__." Request GET url=".$url."\n"; - $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); - print __METHOD__." result for get on an existing user: ".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must not be null"); - $this->assertEquals(1, $object['statut']); - } + print __METHOD__." Request GET url=".$url."\n"; + $result=getURLContent($url, 'GET', '', 1, array(), array('http', 'https'), 2); + print __METHOD__." result for get on an existing user: ".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object=json_decode($result['content'], true); + $this->assertNotNull($object, "Parsing of json result must not be null"); + $this->assertEquals(1, $object['statut']); + } - /** - * testRestCreateUser - * - * @return void - */ - public function testRestCreateUser() - { - // attemp to create without mandatory fields : - $url = $this->api_url.'/users?api_key='.$this->api_key; - $addheaders=array('Content-Type: application/json'); + /** + * testRestCreateUser + * + * @return void + */ + public function testRestCreateUser() + { + // attemp to create without mandatory fields : + $url = $this->api_url.'/users?api_key='.$this->api_key; + $addheaders=array('Content-Type: application/json'); - $bodyobj = array( - "lastname"=>"testRestUser", - "password"=>"testRestPassword", - "email"=>"test@restuser.com" - ); - $body = json_encode($bodyobj); + $bodyobj = array( + "lastname"=>"testRestUser", + "password"=>"testRestPassword", + "email"=>"test@restuser.com" + ); + $body = json_encode($bodyobj); - print __METHOD__." Request POST url=".$url."\n"; - $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); - //print __METHOD__." Result for creating incomplete user".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must no be null"); - $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); + print __METHOD__." Request POST url=".$url."\n"; + $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); + //print __METHOD__." Result for creating incomplete user".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object=json_decode($result['content'], true); + $this->assertNotNull($object, "Parsing of json result must no be null"); + $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); - // create regular user - unset($result); - $bodyobj = array( - "login"=>"testRestLogin".mt_rand(), - "lastname"=>"testRestUser", - "password"=>"testRestPassword", - "email"=>"test@restuser.com" - ); - $body = json_encode($bodyobj); - print __METHOD__." Request POST url=".$url."\n"; - $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); - print __METHOD__." rclsesult code for creating user ".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $resid=json_decode($result['content'], true); - $this->assertNotNull($resid, "Parsing of json result must no be null"); - $this->assertGreaterThan(0, $resid, $object['error']['code'].' '.$object['error']['message']); + // create regular user + unset($result); + $bodyobj = array( + "login"=>"testRestLogin".mt_rand(), + "lastname"=>"testRestUser", + "password"=>"testRestPassword", + "email"=>"test@restuser.com" + ); + $body = json_encode($bodyobj); + print __METHOD__." Request POST url=".$url."\n"; + $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); + print __METHOD__." rclsesult code for creating user ".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $resid=json_decode($result['content'], true); + $this->assertNotNull($resid, "Parsing of json result must no be null"); + $this->assertGreaterThan(0, $resid, $object['error']['code'].' '.$object['error']['message']); - // attempt to create duplicated user - print __METHOD__." Request POST url=".$url."\n"; - $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); - //print __METHOD__." Result for creating duplicate user".var_export($result, true)."\n"; - print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; - $this->assertEquals($result['curl_error_no'], ''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must no be null"); - $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); - } + // attempt to create duplicated user + print __METHOD__." Request POST url=".$url."\n"; + $result=getURLContent($url, 'POST', $body, 1, $addheaders, array('http', 'https'), 2); + //print __METHOD__." Result for creating duplicate user".var_export($result, true)."\n"; + print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; + $this->assertEquals($result['curl_error_no'], ''); + $object=json_decode($result['content'], true); + $this->assertNotNull($object, "Parsing of json result must no be null"); + $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); + } } diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 82d1ee28e39..fa0a4a9d72b 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -30,22 +30,41 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (! defined('NOREQUIREUSER')) { + define('NOREQUIREUSER', '1'); +} +if (! defined('NOREQUIREDB')) { + define('NOREQUIREDB', '1'); +} +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOREQUIRETRAN')) { + define('NOREQUIRETRAN', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -86,66 +105,66 @@ class ScriptsTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testBank - * - * @return string - */ - public function testBank() - { - global $conf,$user,$langs,$db; + /** + * testBank + * + * @return string + */ + public function testBank() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -164,18 +183,18 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $this->assertEquals($result, 'Failed to find bank account with ref BANKDUMMY.'); $this->assertEquals($returnvar, 255); - return $result; - } + return $result; + } - /** - * testCompany - * - * @depends testBank - * @return string - */ - public function testCompany() - { - global $conf,$user,$langs,$db; + /** + * testCompany + * + * @depends testBank + * @return string + */ + public function testCompany() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -193,88 +212,88 @@ class ScriptsTest extends PHPUnit\Framework\TestCase */ $this->assertEquals(0, 0); - return ''; - } + return ''; + } - /** - * testContracts - * - * @depends testCompany - * @return string - */ - public function testContracts() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testContracts + * + * @depends testCompany + * @return string + */ + public function testContracts() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $returnvar = 0; - $output = array(); + $returnvar = 0; + $output = array(); - $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test thirdparties'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_expire_services_to_customers.php thirdparties'); + $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test thirdparties'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_expire_services_to_customers.php thirdparties'); - $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test contacts -30'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_expire_services_to_customers.php contacts'); + $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test contacts -30'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_expire_services_to_customers.php contacts'); - $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_representatives.php test -30'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_expire_services_to_representatives.php'); + $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_representatives.php test -30'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_expire_services_to_representatives.php'); - return $result; - } + return $result; + } - /** - * testInvoices - * - * @depends testContracts - * @return string - */ - public function testInvoices() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testInvoices + * + * @depends testContracts + * @return string + */ + public function testInvoices() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $returnvar = 0; - $output = array(); + $returnvar = 0; + $output = array(); - $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test thirdparties'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php thirdparties'); + $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test thirdparties'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php thirdparties'); - $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test contacts -30'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php contacts'); + $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test contacts -30'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php contacts'); - $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_representatives.php test thirdparties'; - $result=exec($script, $output, $returnvar); - print __METHOD__." result=".$result."\n"; - print __METHOD__." output=".join("\n", $output)."\n"; - print __METHOD__." returnvar=".$returnvar."\n"; - $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php thirdparties'); + $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_representatives.php test thirdparties'; + $result=exec($script, $output, $returnvar); + print __METHOD__." result=".$result."\n"; + print __METHOD__." output=".join("\n", $output)."\n"; + print __METHOD__." returnvar=".$returnvar."\n"; + $this->assertEquals($returnvar, 0, 'email_unpaid_invoices_to_customers.php thirdparties'); - return $result; - } + return $result; + } } diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index bca1aace56a..5c5274c0437 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -27,25 +27,40 @@ global $conf,$user,$langs,$db; //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver //require_once 'PHPUnit/Autoload.php'; -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no menu to show -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (! defined("NOSESSION")) define("NOSESSION", '1'); +if (! defined('NOREQUIRESOC')) { + define('NOREQUIRESOC', '1'); +} +if (! defined('NOCSRFCHECK')) { + define('NOCSRFCHECK', '1'); +} +if (! defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', '1'); +} +if (! defined('NOREQUIREMENU')) { + define('NOREQUIREMENU', '1'); // If there is no menu to show +} +if (! defined('NOREQUIREHTML')) { + define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +} +if (! defined('NOREQUIREAJAX')) { + define('NOREQUIREAJAX', '1'); +} +if (! defined("NOLOGIN")) { + define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +} +if (! defined("NOSESSION")) { + define("NOSESSION", '1'); +} require_once dirname(__FILE__).'/../../htdocs/main.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php'; -if (empty($user->id)) -{ - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); +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; @@ -86,145 +101,155 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testSetLang - * - * @return string - */ - public function testSetLang() - { - global $conf; - $conf=$this->savconf; + /** + * testSetLang + * + * @return string + */ + public function testSetLang() + { + global $conf; + $conf=$this->savconf; - $tmplangs = new Translate('', $conf); + $tmplangs = new Translate('', $conf); - $_SERVER['HTTP_ACCEPT_LANGUAGE'] = "' malicious text with quote"; - $tmplangs->setDefaultLang('auto'); - print __METHOD__.' $tmplangs->defaultlang='.$tmplangs->defaultlang."\n"; - $this->assertEquals($tmplangs->defaultlang, 'malicioustextwithquote_MALICIOUSTEXTWITHQUOTE'); - } + $_SERVER['HTTP_ACCEPT_LANGUAGE'] = "' malicious text with quote"; + $tmplangs->setDefaultLang('auto'); + print __METHOD__.' $tmplangs->defaultlang='.$tmplangs->defaultlang."\n"; + $this->assertEquals($tmplangs->defaultlang, 'malicioustextwithquote_MALICIOUSTEXTWITHQUOTE'); + } - /** - * testSqlAndScriptInjectWithPHPUnit - * - * @return void - */ - public function testSqlAndScriptInjectWithPHPUnit() - { - // Run tests - // More on https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + /** + * testSqlAndScriptInjectWithPHPUnit + * + * @return void + */ + public function testSqlAndScriptInjectWithPHPUnit() + { + // Run tests + // More on https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // Should be OK - $expectedresult=0; + // Should be OK + $expectedresult=0; - $_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php?mainmenu=home&leftmenu=setup&username=weservices'; - $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2); - $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject expected 0a'); + /* + $test = ''; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual(0, $result, 'Error on testSqlAndScriptInject kkk'); + */ - $test = 'This is a < inside string with < and > also and tag like <a> before the >'; - $result=testSqlAndScriptInject($test, 0); - $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject expected 0b'); + $_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php'; + $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for PHP_SELF that should be ok'); - // Should detect XSS - $expectedresult=1; + $test = 'This is a < inside string with < and > also and tag like <a> before the >'; + $result=testSqlAndScriptInject($test, 0); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject expected 0b'); - $_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php?mainmenu=home&leftmenu=setup&username=weservices;badaction'; - $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject 1b'); + // Should detect XSS + $expectedresult=1; - $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa'); + $_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php/<svg>'; + $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject for PHP_SELF that should detect XSS'); - $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; - $result=testSqlAndScriptInject($test, 2); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa2'); + $test = 'javascript&colon&#x3B;alert(1)'; + $result=testSqlAndScriptInject($test, 0); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject expected 1a'); - $test='<IMG SRC=# onmouseover="alert(1)">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa3'); - $test='<IMG SRC onmouseover="alert(1)">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa4'); - $test='<IMG onmouseover="alert(1)">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa5'); - $test='<IMG SRC=/ onerror="alert(1)">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa6'); - $test='<IMG SRC=" &#14; javascript:alert(1);">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa7'); + $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa'); - $test='<IMG SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject bbb'); + $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; + $result=testSqlAndScriptInject($test, 2); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa2'); - $test='<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc'); + $test='<IMG SRC=# onmouseover="alert(1)">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa3'); + $test='<IMG SRC onmouseover="alert(1)">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa4'); + $test='<IMG onmouseover="alert(1)">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa5'); + $test='<IMG SRC=/ onerror="alert(1)">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa6'); + $test='<IMG SRC=" &#14; javascript:alert(1);">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa7'); - $test='<IMG SRC="javascript:alert(\'XSS\');">'; - $result=testSqlAndScriptInject($test, 1); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ddd'); + $test='<IMG SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject bbb'); - $test='<IMG """><SCRIPT>alert("XSS")</SCRIPT>">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); + $test='<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc'); - $test='<!-- Google analytics --> + $test='<IMG SRC="javascript:alert(\'XSS\');">'; + $result=testSqlAndScriptInject($test, 1); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ddd'); + + $test='<IMG """><SCRIPT>alert("XSS")</SCRIPT>">'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); + + $test='<!-- Google analytics --> <script> (function(i,s,o,g,r,a,m){i[\'GoogleAnalyticsObject\']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), @@ -235,304 +260,375 @@ class SecurityTest extends PHPUnit\Framework\TestCase ga(\'send\', \'pageview\'); </script>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); - $test="<IMG SRC=\"jav\tascript:alert('XSS');\">"; // Is locked by some browser like chrome because the default directive no-referrer-when-downgrade is sent when requesting the SRC and then refused because of browser protection on img src load without referrer. - $test="<IMG SRC=\"jav&#x0D;ascript:alert('XSS');\">"; // Same + $test="<IMG SRC=\"jav\tascript:alert('XSS');\">"; // Is locked by some browser like chrome because the default directive no-referrer-when-downgrade is sent when requesting the SRC and then refused because of browser protection on img src load without referrer. + $test="<IMG SRC=\"jav&#x0D;ascript:alert('XSS');\">"; // Same - $test='<SCRIPT/XSS SRC="http://xss.rocks/xss.js"></SCRIPT>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff1'); - $test='<SCRIPT/SRC="http://xss.rocks/xss.js"></SCRIPT>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff2'); + $test='<SCRIPT/XSS SRC="http://xss.rocks/xss.js"></SCRIPT>'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff1'); + $test='<SCRIPT/SRC="http://xss.rocks/xss.js"></SCRIPT>'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff2'); - // This case seems to be filtered by browsers now. - $test='<BODY onload!#$%&()*~+-_.,:;?@[/|\]^`=alert(1)>'; - //$result=testSqlAndScriptInject($test, 0); - //$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ggg'); + // This case seems to be filtered by browsers now. + $test='<BODY onload!#$%&()*~+-_.,:;?@[/|\]^`=alert(1)>'; + //$result=testSqlAndScriptInject($test, 0); + //$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ggg'); - $test='<iframe src=http://xss.rocks/scriptlet.html <'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject hhh'); + $test='<iframe src=http://xss.rocks/scriptlet.html <'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject hhh'); - $test='Set.constructor`alert\x281\x29```'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject iii'); + $test='Set.constructor`alert\x281\x29```'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject iii'); - $test="on<!-- ab\nc -->error=alert(1)"; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject jjj'); + $test="on<!-- ab\nc -->error=alert(1)"; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject jjj'); - $test="<img src=x one<a>rror=alert(document.location)"; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject kkk'); - } + $test="<img src=x one<a>rror=alert(document.location)"; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject kkk'); + } - /** - * testGETPOST - * - * @return string - */ - public function testGETPOST() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testGETPOST + * + * @return string + */ + public function testGETPOST() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $_COOKIE["id"]=111; - $_GET["param1"]="222"; - $_POST["param1"]="333"; - $_GET["param2"]='a/b#e(pr)qq-rr\cc'; - $_GET["param3"]='"&#110;a/b#e(pr)qq-rr\cc'; // Same than param2 + " and &#110; - $_GET["param4"]='../dir'; - $_GET["param5"]="a_1-b"; - $_POST["param6"]="&quot;&gt;<svg o&#110;load='console.log(&quot;123&quot;)'&gt;"; - $_GET["param7"]='"c:\this is a path~1\aaa&#110;" abc<bad>def</bad>'; - $_POST["param8a"]="Hacker<svg o&#110;load='console.log(&quot;123&quot;)'"; // html tag is not closed so it is not detected as html tag but is still harmfull - $_POST['param8b']='<img src=x onerror=alert(document.location) t='; // this is html obfuscated by non closing tag - $_POST['param8c']='< with space after is ok'; - $_POST['param8d']='<abc123 is html to clean'; - $_POST['param8e']='<123abc is not html to clean'; - $_POST["param9"]='is_object($object) ? ($object->id < 10 ? round($object->id / 2, 2) : (2 * $user->id) * (int) substr($mysoc->zip, 1, 2)) : \'objnotdefined\''; - $_POST["param10"]='is_object($object) ? ($object->id < 10 ? round($object->id / 2, 2) : (2 * $user->id) * (int) substr($mysoc->zip, 1, 2)) : \'<abc>objnotdefined\''; - $_POST["param11"]=' Name <email@email.com> '; + $_COOKIE["id"]=111; + $_GET["param1"]="222"; + $_POST["param1"]="333"; + $_GET["param2"]='a/b#e(pr)qq-rr\cc'; + $_GET["param3"]='"&#110;a/b#e(pr)qq-rr\cc'; // Same than param2 + " and &#110; + $_GET["param4"]='../dir'; + $_GET["param5"]="a_1-b"; + $_POST["param6"]="&quot;&gt;<svg o&#110;load='console.log(&quot;123&quot;)'&gt;"; + $_POST["param6b"]='<<<../>../>../svg><<<../>../>../animate =alert(1)>abc'; + $_GET["param7"]='"c:\this is a path~1\aaa&#110;" abc<bad>def</bad>'; + $_POST["param8a"]="Hacker<svg o&#110;load='console.log(&quot;123&quot;)'"; // html tag is not closed so it is not detected as html tag but is still harmfull + $_POST['param8b']='<img src=x onerror=alert(document.location) t='; // this is html obfuscated by non closing tag + $_POST['param8c']='< with space after is ok'; + $_POST['param8d']='<abc123 is html to clean'; + $_POST['param8e']='<123abc is not html to clean'; + $_POST['param8f']='abc<<svg <><<animate onbegin=alert(document.domain) a'; + $_POST["param9"]='is_object($object) ? ($object->id < 10 ? round($object->id / 2, 2) : (2 * $user->id) * (int) substr($mysoc->zip, 1, 2)) : \'objnotdefined\''; + $_POST["param10"]='is_object($object) ? ($object->id < 10 ? round($object->id / 2, 2) : (2 * $user->id) * (int) substr($mysoc->zip, 1, 2)) : \'<abc>objnotdefined\''; + $_POST["param11"]=' Name <email@email.com> '; $_POST["param12"]='<!DOCTYPE html><html>aaa</html>'; + //$_POST["param13"]='javascript%26colon%26%23x3B%3Balert(1)'; + //$_POST["param14"]='javascripT&javascript#x3a alert(1)'; - $result=GETPOST('id', 'int'); // Must return nothing - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, ''); + $result=GETPOST('id', 'int'); // Must return nothing + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, ''); - $result=GETPOST("param1", 'int'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 222, 'Test on param1 with no 3rd param'); + $result=GETPOST("param1", 'int'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 222, 'Test on param1 with no 3rd param'); - $result=GETPOST("param1", 'int', 2); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 333, 'Test on param1 with 3rd param = 2'); + $result=GETPOST("param1", 'int', 2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 333, 'Test on param1 with 3rd param = 2'); - // Test alpha - $result=GETPOST("param2", 'alpha'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, $_GET["param2"], 'Test on param2'); + // Test alpha - $result=GETPOST("param3", 'alpha'); // Must return string sanitized from char " - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'na/b#e(pr)qq-rr\cc', 'Test on param3'); + $result=GETPOST("param2", 'alpha'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, $_GET["param2"], 'Test on param2'); - $result=GETPOST("param4", 'alpha'); // Must return string sanitized from ../ - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 'dir'); + $result=GETPOST("param3", 'alpha'); // Must return string sanitized from char " + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'na/b#e(pr)qq-rr\cc', 'Test on param3'); - // Test aZ09 - $result=GETPOST("param1", 'aZ09'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, $_GET["param1"]); + $result=GETPOST("param4", 'alpha'); // Must return string sanitized from ../ + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, 'dir'); - $result=GETPOST("param2", 'aZ09'); // Must return '' as string contains car not in aZ09 definition - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, ''); + // Test aZ09 - $result=GETPOST("param3", 'aZ09'); // Must return '' as string contains car not in aZ09 definition - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, ''); + $result=GETPOST("param1", 'aZ09'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, $_GET["param1"]); - $result=GETPOST("param4", 'aZ09'); // Must return '' as string contains car not in aZ09 definition - print __METHOD__." result=".$result."\n"; - $this->assertEquals('', $result); + $result=GETPOST("param2", 'aZ09'); // Must return '' as string contains car not in aZ09 definition + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, ''); - $result=GETPOST("param5", 'aZ09'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_GET["param5"], $result); + $result=GETPOST("param3", 'aZ09'); // Must return '' as string contains car not in aZ09 definition + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, ''); - $result=GETPOST("param6", 'alpha'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('>', $result); + $result=GETPOST("param4", 'aZ09'); // Must return '' as string contains car not in aZ09 definition + print __METHOD__." result=".$result."\n"; + $this->assertEquals('', $result); - $result=GETPOST("param6", 'nohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('">', $result); + $result=GETPOST("param5", 'aZ09'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_GET["param5"], $result); - // With restricthtml we must remove html open/close tag and content but not htmlentities like &#110; - $result=GETPOST("param7", 'restricthtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('"c:\this is a path~1\aaa&#110;" abcdef', $result); + $result=GETPOST("param6", 'alpha'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('>', $result); - // With alphanohtml, we must convert the html entities like &#110; and disable all entities - $result=GETPOST("param8a", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("Hackersvg onload='console.log(123)'", $result); + $result=GETPOST("param6", 'nohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('">', $result); - $result=GETPOST("param8b", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('img src=x onerror=alert(document.location) t=', $result, 'Test a string with non closing html tag with alphanohtml'); + $result=GETPOST("param6b"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc', $result); - $result=GETPOST("param8c", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST['param8c'], $result, 'Test a string with non closing html tag with alphanohtml'); + // With restricthtml we must remove html open/close tag and content but not htmlentities like &#110; - $result=GETPOST("param8d", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('abc123 is html to clean', $result, 'Test a string with non closing html tag with alphanohtml'); + $result=GETPOST("param7", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('"c:\this is a path~1\aaa&#110;" abcdef', $result); - $result=GETPOST("param8e", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST['param8e'], $result, 'Test a string with non closing html tag with alphanohtml'); + // With alphanohtml, we must convert the html entities like &#110; and disable all entities + $result=GETPOST("param8a", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("Hackersvg onload='console.log(123)'", $result); - $result=GETPOST("param9", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST["param9"], $result); + $result=GETPOST("param8b", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('img src=x onerror=alert(document.location) t=', $result, 'Test a string with non closing html tag with alphanohtml'); - $result=GETPOST("param10", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST["param9"], $result, 'We should get param9 after processing param10'); + $result=GETPOST("param8c", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST['param8c'], $result, 'Test a string with non closing html tag with alphanohtml'); - $result=GETPOST("param11", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("Name", $result, 'Test an email string with alphanohtml'); + $result=GETPOST("param8d", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc123 is html to clean', $result, 'Test a string with non closing html tag with alphanohtml'); - $result=GETPOST("param11", 'alphawithlgt'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(trim($_POST["param11"]), $result, 'Test an email string with alphawithlgt'); + $result=GETPOST("param8e", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST['param8e'], $result, 'Test a string with non closing html tag with alphanohtml'); - $result=GETPOST("param12", 'restricthtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(trim($_POST["param12"]), $result, 'Test a string with DOCTYPE and restricthtml'); + $result=GETPOST("param8f", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abcsvg animate onbegin=alert(document.domain) a', $result, 'Test a string with html tag open with several <'); - return $result; - } + $result=GETPOST("param9", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST["param9"], $result); - /** - * testCheckLoginPassEntity - * - * @return void - */ - public function testCheckLoginPassEntity() - { - $login=checkLoginPassEntity('loginbidon', 'passwordbidon', 1, array('dolibarr')); - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, ''); + $result=GETPOST("param10", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST["param9"], $result, 'We should get param9 after processing param10'); - $login=checkLoginPassEntity('admin', 'passwordbidon', 1, array('dolibarr')); - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, ''); + $result=GETPOST("param11", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("Name", $result, 'Test an email string with alphanohtml'); - $login=checkLoginPassEntity('admin', 'admin', 1, array('dolibarr')); // Should works because admin/admin exists - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, 'admin', 'The test to check if pass of user "admin" is "admin" has failed'); + $result=GETPOST("param11", 'alphawithlgt'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param11"]), $result, 'Test an email string with alphawithlgt'); - $login=checkLoginPassEntity('admin', 'admin', 1, array('http','dolibarr')); // Should work because of second authetntication method - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, 'admin'); + $result=GETPOST("param12", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param12"]), $result, 'Test a string with DOCTYPE and restricthtml'); - $login=checkLoginPassEntity('admin', 'admin', 1, array('forceuser')); - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, ''); // Expected '' because should failed because login 'auto' does not exists - } + /*$result=GETPOST("param13", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param13"]), $result, 'Test a string and alphanohtml'); - /** - * testEncodeDecode - * - * @return number - */ - public function testEncodeDecode() - { - $stringtotest="This is a string to test encode/decode. This is a string to test encode/decode. This is a string to test encode/decode."; + $result=GETPOST("param14", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param14"]), $result, 'Test a string and alphanohtml'); + */ - $encodedstring=dol_encode($stringtotest); - $decodedstring=dol_decode($encodedstring); - print __METHOD__." encodedstring=".$encodedstring." ".base64_encode($stringtotest)."\n"; - $this->assertEquals($stringtotest, $decodedstring, 'Use dol_encode/decode with no parameter'); + // Special test for GETPOST of backtopage or backtolist parameter - $encodedstring=dol_encode($stringtotest, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); - $decodedstring=dol_decode($encodedstring, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); - print __METHOD__." encodedstring=".$encodedstring." ".base64_encode($stringtotest)."\n"; - $this->assertEquals($stringtotest, $decodedstring, 'Use dol_encode/decode with a key parameter'); + $_POST["backtopage"]='//www.google.com'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('www.google.com', $result, 'Test for backtopage param'); - return 0; - } + $_POST["backtopage"]='https:https://www.google.com'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('www.google.com', $result, 'Test for backtopage param'); - /** - * testDolStringOnlyTheseHtmlTags - * - * @return number - */ - public function testDolHTMLEntityDecode() - { - $stringtotest = 'a &colon; b &quot; c &#039; d &apos; e &eacute;'; - $decodedstring = dol_html_entity_decode($stringtotest, ENT_QUOTES); - $this->assertEquals('a &colon; b " c \' d &apos; e é', $decodedstring, 'Function did not sanitize correclty'); + $_POST["backtolist"]='::HTTPS://www.google.com'; + $result=GETPOST("backtolist"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('www.google.com', $result, 'Test for backtopage param'); - $stringtotest = 'a &colon; b &quot; c &#039; d &apos; e &eacute;'; - $decodedstring = dol_html_entity_decode($stringtotest, ENT_QUOTES|ENT_HTML5); - $this->assertEquals('a : b " c \' d \' e é', $decodedstring, 'Function did not sanitize correclty'); + $_POST["backtopage"]='http:www.google.com'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('httpwww.google.com', $result, 'Test for backtopage param'); - return 0; - } + $_POST["backtopage"]='/mydir/mypage.php?aa=a%10a'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('/mydir/mypage.php?aa=a%10a', $result, 'Test for backtopage param'); - /** - * testDolStringOnlyTheseHtmlTags - * - * @return number - */ - public function testDolStringOnlyTheseHtmlTags() - { - $stringtotest = '<a href="javascript:aaa">bbbڴ'; - $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); - $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 1'); + $_POST["backtopage"]='javascripT&javascript#javascriptxjavascript3a alert(1)'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('x3a alert(1)', $result, 'Test for backtopage param'); - $stringtotest = '<a href="java'.chr(0).'script:aaa">bbbڴ'; - $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); - $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 2'); + return $result; + } - $stringtotest = '<a href="javascript&colon;aaa">bbbڴ'; - $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); - $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 3'); + /** + * testCheckLoginPassEntity + * + * @return void + */ + public function testCheckLoginPassEntity() + { + $login=checkLoginPassEntity('loginbidon', 'passwordbidon', 1, array('dolibarr')); + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, ''); - return 0; - } + $login=checkLoginPassEntity('admin', 'passwordbidon', 1, array('dolibarr')); + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, ''); - /** - * testGetRandomPassword - * - * @return number - */ - public function testGetRandomPassword() - { - global $conf; + $login=checkLoginPassEntity('admin', 'admin', 1, array('dolibarr')); // Should works because admin/admin exists + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, 'admin', 'The test to check if pass of user "admin" is "admin" has failed'); - $genpass1=getRandomPassword(true); // Should be a string return by dol_hash (if no option set, will be md5) - print __METHOD__." genpass1=".$genpass1."\n"; - $this->assertEquals(strlen($genpass1), 32); + $login=checkLoginPassEntity('admin', 'admin', 1, array('http','dolibarr')); // Should work because of second authetntication method + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, 'admin'); - $genpass1=getRandomPassword(true, array('I')); // Should be a string return by dol_hash (if no option set, will be md5) - print __METHOD__." genpass1=".$genpass1."\n"; - $this->assertEquals(strlen($genpass1), 32); + $login=checkLoginPassEntity('admin', 'admin', 1, array('forceuser')); + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, ''); // Expected '' because should failed because login 'auto' does not exists + } - $conf->global->USER_PASSWORD_GENERATED='None'; - $genpass2=getRandomPassword(false); // Should return an empty string - print __METHOD__." genpass2=".$genpass2."\n"; - $this->assertEquals($genpass2, ''); + /** + * testEncodeDecode + * + * @return number + */ + public function testEncodeDecode() + { + $stringtotest="This is a string to test encode/decode. This is a string to test encode/decode. This is a string to test encode/decode."; - $conf->global->USER_PASSWORD_GENERATED='Standard'; - $genpass3=getRandomPassword(false); // Should return a password of 10 chars - print __METHOD__." genpass3=".$genpass3."\n"; - $this->assertEquals(strlen($genpass3), 10); + $encodedstring=dol_encode($stringtotest); + $decodedstring=dol_decode($encodedstring); + print __METHOD__." encodedstring=".$encodedstring." ".base64_encode($stringtotest)."\n"; + $this->assertEquals($stringtotest, $decodedstring, 'Use dol_encode/decode with no parameter'); - return 0; - } + $encodedstring=dol_encode($stringtotest, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); + $decodedstring=dol_decode($encodedstring, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); + print __METHOD__." encodedstring=".$encodedstring." ".base64_encode($stringtotest)."\n"; + $this->assertEquals($stringtotest, $decodedstring, 'Use dol_encode/decode with a key parameter'); - /** - * testRestrictedArea - * - * @return void - */ - public function testRestrictedArea() - { - global $conf,$user,$langs,$db; + return 0; + } + + /** + * testDolStringOnlyTheseHtmlTags + * + * @return number + */ + public function testDolHTMLEntityDecode() + { + $stringtotest = 'a &colon; b &quot; c &#039; d &apos; e &eacute;'; + $decodedstring = dol_html_entity_decode($stringtotest, ENT_QUOTES); + $this->assertEquals('a &colon; b " c \' d &apos; e é', $decodedstring, 'Function did not sanitize correclty'); + + $stringtotest = 'a &colon; b &quot; c &#039; d &apos; e &eacute;'; + $decodedstring = dol_html_entity_decode($stringtotest, ENT_QUOTES|ENT_HTML5); + $this->assertEquals('a : b " c \' d \' e é', $decodedstring, 'Function did not sanitize correclty'); + + return 0; + } + + /** + * testDolStringOnlyTheseHtmlTags + * + * @return number + */ + public function testDolStringOnlyTheseHtmlTags() + { + $stringtotest = '<a href="javascript:aaa">bbbڴ'; + $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); + $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 1'); + + $stringtotest = '<a href="java'.chr(0).'script:aaa">bbbڴ'; + $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); + $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 2'); + + $stringtotest = '<a href="javascript&colon;aaa">bbbڴ'; + $decodedstring = dol_string_onlythesehtmltags($stringtotest, 1, 1, 1); + $this->assertEquals('<a href="aaa">bbbڴ', $decodedstring, 'Function did not sanitize correclty with test 3'); + + return 0; + } + + /** + * testDolStringOnlyTheseHtmlAttributes + * + * @return number + */ + public function testDolStringOnlyTheseHtmlAttributes() + { + $stringtotest = '<div onload="ee"><a href="123"><span class="abc">abc</span></a></div>'; + $decodedstring = dol_string_onlythesehtmlattributes($stringtotest); + $decodedstring = preg_replace("/\n$/", "", $decodedstring); + $this->assertEquals('<div><a href="123"><span class="abc">abc</span></a></div>', $decodedstring, 'Function did not sanitize correclty with test 1'); + + return 0; + } + + /** + * testGetRandomPassword + * + * @return number + */ + public function testGetRandomPassword() + { + global $conf; + + $genpass1=getRandomPassword(true); // Should be a string return by dol_hash (if no option set, will be md5) + print __METHOD__." genpass1=".$genpass1."\n"; + $this->assertEquals(strlen($genpass1), 32); + + $genpass1=getRandomPassword(true, array('I')); // Should be a string return by dol_hash (if no option set, will be md5) + print __METHOD__." genpass1=".$genpass1."\n"; + $this->assertEquals(strlen($genpass1), 32); + + $conf->global->USER_PASSWORD_GENERATED='None'; + $genpass2=getRandomPassword(false); // Should return an empty string + print __METHOD__." genpass2=".$genpass2."\n"; + $this->assertEquals($genpass2, ''); + + $conf->global->USER_PASSWORD_GENERATED='Standard'; + $genpass3=getRandomPassword(false); // Should return a password of 12 chars + print __METHOD__." genpass3=".$genpass3."\n"; + $this->assertEquals(strlen($genpass3), 12); + + return 0; + } + + /** + * testRestrictedArea + * + * @return void + */ + public function testRestrictedArea() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -543,83 +639,109 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=restrictedArea($user, 'societe'); $this->assertEquals(1, $result); - } + } - /** - * testGetRandomPassword - * - * @return number - */ - public function testGetURLContent() - { - global $conf; - include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; + /** + * testGetRandomPassword + * + * @return number + */ + public function testGetURLContent() + { + global $conf; + include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - $url = 'ftp://mydomain.com'; - $tmp = getURLContent($url); - print __METHOD__." url=".$url."\n"; - $this->assertGreaterThan(0, strpos($tmp['curl_error_msg'], 'not supported')); // Test error if return does not contains 'not supported' + $url = 'ftp://mydomain.com'; + $tmp = getURLContent($url); + print __METHOD__." url=".$url."\n"; + $this->assertGreaterThan(0, strpos($tmp['curl_error_msg'], 'not supported')); // Test error if return does not contains 'not supported' - $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page - $tmp = getURLContent($url, 'GET', '', 0); // We do NOT follow - print __METHOD__." url=".$url."\n"; - $this->assertEquals(301, $tmp['http_code'], 'GET url 301 without following -> 301'); + $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page + $tmp = getURLContent($url, 'GET', '', 0); // We do NOT follow + print __METHOD__." url=".$url."\n"; + $this->assertEquals(301, $tmp['http_code'], 'GET url 301 without following -> 301'); - $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page - $tmp = getURLContent($url); // We DO follow - print __METHOD__." url=".$url."\n"; - $this->assertEquals(200, $tmp['http_code'], 'GET url 301 with following -> 200'); // Test error if return does not contains 'not supported' + $url = 'https://www.dolibarr.fr'; // This is a redirect 301 page + $tmp = getURLContent($url); // We DO follow + print __METHOD__." url=".$url."\n"; + $this->assertEquals(200, $tmp['http_code'], 'GET url 301 with following -> 200'); // Test error if return does not contains 'not supported' - $url = 'http://localhost'; - $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL - print __METHOD__." url=".$url."\n"; - $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that resolves to a local URL'); // Test we receive an error because localtest.me is not an external URL + $url = 'http://localhost'; + $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL + print __METHOD__." url=".$url."\n"; + $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that resolves to a local URL'); // Test we receive an error because localtest.me is not an external URL - $url = 'http://127.0.0.1'; - $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL - print __METHOD__." url=".$url."\n"; - $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL + $url = 'http://127.0.0.1'; + $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL + print __METHOD__." url=".$url."\n"; + $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL - $url = 'https://169.254.0.1'; - $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL - print __METHOD__." url=".$url."\n"; - $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL + $url = 'https://169.254.0.1'; + $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL + print __METHOD__." url=".$url."\n"; + $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL - $url = 'http://[::1]'; - $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL - print __METHOD__." url=".$url."\n"; - $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL + $url = 'http://[::1]'; + $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL + print __METHOD__." url=".$url."\n"; + $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that is a local URL'); // Test we receive an error because localtest.me is not an external URL - /*$url = 'localtest.me'; - $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL - print __METHOD__." url=".$url."\n"; - $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that resolves to a local URL'); // Test we receive an error because localtest.me is not an external URL - */ + /*$url = 'localtest.me'; + $tmp = getURLContent($url, 'GET', '', 0, array(), array('http', 'https'), 0); // Only external URL + print __METHOD__." url=".$url."\n"; + $this->assertEquals(400, $tmp['http_code'], 'GET url to '.$url.' that resolves to a local URL'); // Test we receive an error because localtest.me is not an external URL + */ - return 0; - } + return 0; + } - /** - * testDolSanitizeFileName - * - * @return void - */ - public function testDolSanitizeFileName() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testDolSanitizeUrl + * + * @return void + */ + public function testDolSanitizeUrl() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - //$dummyuser=new User($db); - //$result=restrictedArea($dummyuser,'societe'); + $test = 'javascripT&javascript#x3a alert(1)'; + $result=dol_sanitizeUrl($test); + $this->assertEquals('x3a alert(1)', $result, 'Test on dol_sanitizeUrl A'); - $result=dol_sanitizeFileName('bad file | evilaction'); - $this->assertEquals('bad file _ evilaction', $result); + $test = 'javajavascriptscript&cjavascriptolon;alert(1)'; + $result=dol_sanitizeUrl($test); + $this->assertEquals('alert(1)', $result, 'Test on dol_sanitizeUrl B'); - $result=dol_sanitizeFileName('bad file --evilparam'); - $this->assertEquals('bad file _evilparam', $result); - } + $test = '/javas:cript/google.com'; + $result=dol_sanitizeUrl($test); + $this->assertEquals('google.com', $result, 'Test on dol_sanitizeUrl C'); + } + + /** + * testDolSanitizeFileName + * + * @return void + */ + public function testDolSanitizeFileName() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + //$dummyuser=new User($db); + //$result=restrictedArea($dummyuser,'societe'); + + $result=dol_sanitizeFileName('bad file | evilaction'); + $this->assertEquals('bad file _ evilaction', $result); + + $result=dol_sanitizeFileName('bad file --evilparam'); + $this->assertEquals('bad file _evilparam', $result); + } } diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 0ca6cc8792b..177458fb621 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -31,9 +31,9 @@ require_once dirname(__FILE__).'/../../htdocs/societe/class/societe.class.php'; $langs->load("dict"); if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -47,179 +47,187 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class SocieteTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return SocieteTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return SocieteTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if ($conf->global->SOCIETE_CODECLIENT_ADDON != 'mod_codeclient_monkey') { print "\n".__METHOD__." third party ref checker must be setup to 'mod_codeclient_monkey' not to '".$conf->global->SOCIETE_CODECLIENT_ADDON."'.\n"; die(); } + if ($conf->global->SOCIETE_CODECLIENT_ADDON != 'mod_codeclient_monkey') { + print "\n".__METHOD__." third party ref checker must be setup to 'mod_codeclient_monkey' not to '".$conf->global->SOCIETE_CODECLIENT_ADDON."'.\n"; die(); + } - if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) { print "\n".__METHOD__." constant MAIN_DISABLEPROFIDRULES must be empty (if a module set it, disable module).\n"; die(); } + if (! empty($conf->global->MAIN_DISABLEPROFIDRULES)) { + print "\n".__METHOD__." constant MAIN_DISABLEPROFIDRULES must be empty (if a module set it, disable module).\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + if ($langs->defaultlang != 'en_US') { + print "\n".__METHOD__." default language of company must be set to autodetect.\n"; die(); + } - print __METHOD__."\n"; - } + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + print __METHOD__."\n"; + } - print __METHOD__."\n"; - } + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + print __METHOD__."\n"; + } - print __METHOD__."\n"; - } + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * testSocieteCreate - * - * @return int - */ - public function testSocieteCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - $localobject=new Societe($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + /** + * testSocieteCreate + * + * @return int + */ + public function testSocieteCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__." result=".$result."\n"; - $this->assertLessThanOrEqual($result, 0); + $localobject=new Societe($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertLessThanOrEqual($result, 0); - /** - * testSocieteFetch - * - * @param int $id Company id - * @return Societe $localobject Company - * - * @depends testSocieteCreate - * The depends says test is run only if previous is ok - */ - public function testSocieteFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + return $result; + } - $localobject=new Societe($this->savdb); - $result=$localobject->fetch($id); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + /** + * testSocieteFetch + * + * @param int $id Company id + * @return Societe $localobject Company + * + * @depends testSocieteCreate + * The depends says test is run only if previous is ok + */ + public function testSocieteFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->verify(); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertEquals($result, 0); + $localobject=new Societe($this->savdb); + $result=$localobject->fetch($id); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $localobject; - } + $result=$localobject->verify(); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertEquals($result, 0); - /** - * testSocieteUpdate - * - * @param Societe $localobject Company - * @return Societe $localobject Company - * - * @depends testSocieteFetch - * The depends says test is run only if previous is ok - */ - public function testSocieteUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + return $localobject; + } - $localobject->note_private='New private note after update'; - $localobject->note_public='New public note after update'; - $localobject->name='New name'; - $localobject->address='New address'; - $localobject->zip='New zip'; - $localobject->town='New town'; - $localobject->country_id=2; - $localobject->status=0; - $localobject->phone='New tel'; - $localobject->fax='New fax'; - $localobject->email='newemail@newemail.com'; - $localobject->url='New url'; - $localobject->idprof1='new idprof1'; - $localobject->idprof2='new idprof2'; - $localobject->idprof3='new idprof3'; - $localobject->idprof4='new idprof4'; + /** + * testSocieteUpdate + * + * @param Societe $localobject Company + * @return Societe $localobject Company + * + * @depends testSocieteFetch + * The depends says test is run only if previous is ok + */ + public function testSocieteUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->update($localobject->id, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $localobject->note_private='New private note after update'; + $localobject->note_public='New public note after update'; + $localobject->name='New name'; + $localobject->address='New address'; + $localobject->zip='New zip'; + $localobject->town='New town'; + $localobject->country_id=2; + $localobject->status=0; + $localobject->phone='New tel'; + $localobject->fax='New fax'; + $localobject->email='newemail@newemail.com'; + $localobject->url='New url'; + $localobject->idprof1='new idprof1'; + $localobject->idprof2='new idprof2'; + $localobject->idprof3='new idprof3'; + $localobject->idprof4='new idprof4'; + + $result=$localobject->update($localobject->id, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); $result=$localobject->update_note($localobject->note_private, '_private'); print __METHOD__." id=".$localobject->id." result=".$result."\n"; @@ -229,221 +237,236 @@ class SocieteTest extends PHPUnit\Framework\TestCase print __METHOD__." id=".$localobject->id." result=".$result."\n"; $this->assertLessThan($result, 0, 'Holiday::update_note (public) error'); - $newobject=new Societe($this->savdb); - $result=$newobject->fetch($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $newobject=new Societe($this->savdb); + $result=$newobject->fetch($localobject->id); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $this->assertEquals($localobject->note_private, $newobject->note_private); - //$this->assertEquals($localobject->note_public, $newobject->note_public); - $this->assertEquals($localobject->name, $newobject->name); - $this->assertEquals($localobject->address, $newobject->address); - $this->assertEquals($localobject->zip, $newobject->zip); - $this->assertEquals($localobject->town, $newobject->town); - $this->assertEquals($localobject->country_id, $newobject->country_id); - $this->assertEquals('BE', $newobject->country_code); - $this->assertEquals($localobject->status, $newobject->status); - $this->assertEquals($localobject->phone, $newobject->phone); - $this->assertEquals($localobject->fax, $newobject->fax); - $this->assertEquals($localobject->email, $newobject->email); - $this->assertEquals($localobject->url, $newobject->url); - $this->assertEquals($localobject->idprof1, $newobject->idprof1); - $this->assertEquals($localobject->idprof2, $newobject->idprof2); - $this->assertEquals($localobject->idprof3, $newobject->idprof3); - $this->assertEquals($localobject->idprof4, $newobject->idprof4); + $this->assertEquals($localobject->note_private, $newobject->note_private); + //$this->assertEquals($localobject->note_public, $newobject->note_public); + $this->assertEquals($localobject->name, $newobject->name); + $this->assertEquals($localobject->address, $newobject->address); + $this->assertEquals($localobject->zip, $newobject->zip); + $this->assertEquals($localobject->town, $newobject->town); + $this->assertEquals($localobject->country_id, $newobject->country_id); + $this->assertEquals('BE', $newobject->country_code); + $this->assertEquals($localobject->status, $newobject->status); + $this->assertEquals($localobject->phone, $newobject->phone); + $this->assertEquals($localobject->fax, $newobject->fax); + $this->assertEquals($localobject->email, $newobject->email); + $this->assertEquals($localobject->url, $newobject->url); + $this->assertEquals($localobject->idprof1, $newobject->idprof1); + $this->assertEquals($localobject->idprof2, $newobject->idprof2); + $this->assertEquals($localobject->idprof3, $newobject->idprof3); + $this->assertEquals($localobject->idprof4, $newobject->idprof4); - return $localobject; - } + return $localobject; + } - /** - * testIdProfCheck - * - * @param Societe $localobject Company - * @return Societe $localobject Company - * - * @depends testSocieteUpdate - * The depends says test is run only if previous is ok - */ - public function testIdProfCheck($localobject) - { - // OK FR - $localobject->country_code='FR'; - $localobject->idprof1=493861496; - $localobject->idprof2=49386149600021; - $result=$localobject->id_prof_check(1, $localobject); // Must be > 0 - print __METHOD__." OK FR idprof1 result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); - $result=$localobject->id_prof_check(2, $localobject); // Must be > 0 - print __METHOD__." OK FR idprof2 result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); + /** + * testIdProfCheck + * + * @param Societe $localobject Company + * @return Societe $localobject Company + * + * @depends testSocieteUpdate + * The depends says test is run only if previous is ok + */ + public function testIdProfCheck($localobject) + { + // OK FR + $localobject->country_code='FR'; + $localobject->idprof1=493861496; + $localobject->idprof2=49386149600021; + $result=$localobject->id_prof_check(1, $localobject); // Must be > 0 + print __METHOD__." OK FR idprof1 result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); + $result=$localobject->id_prof_check(2, $localobject); // Must be > 0 + print __METHOD__." OK FR idprof2 result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); - // KO FR - $localobject->country_code='FR'; - $localobject->idprof1='id1ko'; - $localobject->idprof2='id2ko'; - $result=$localobject->id_prof_check(1, $localobject); // Must be <= 0 - print __METHOD__." KO FR idprof1 result=".$result."\n"; - $this->assertLessThan(1, $result); - $result=$localobject->id_prof_check(2, $localobject); // Must be <= 0 - print __METHOD__." KO FR idprof2 result=".$result."\n"; - $this->assertLessThan(1, $result); + // KO FR + $localobject->country_code='FR'; + $localobject->idprof1='id1ko'; + $localobject->idprof2='id2ko'; + $result=$localobject->id_prof_check(1, $localobject); // Must be <= 0 + print __METHOD__." KO FR idprof1 result=".$result."\n"; + $this->assertLessThan(1, $result); + $result=$localobject->id_prof_check(2, $localobject); // Must be <= 0 + print __METHOD__." KO FR idprof2 result=".$result."\n"; + $this->assertLessThan(1, $result); - // KO ES - $localobject->country_code='ES'; - $localobject->idprof1='id1ko'; - $result=$localobject->id_prof_check(1, $localobject); // Must be <= 0 - print __METHOD__." KO ES idprof1 result=".$result."\n"; - $this->assertLessThan(1, $result); + // KO ES + $localobject->country_code='ES'; + $localobject->idprof1='id1ko'; + $result=$localobject->id_prof_check(1, $localobject); // Must be <= 0 + print __METHOD__." KO ES idprof1 result=".$result."\n"; + $this->assertLessThan(1, $result); - // OK AR - $localobject->country_code='AR'; - $localobject->idprof1='id1ko'; - $localobject->idprof2='id2ko'; - $result=$localobject->id_prof_check(1, $localobject); // Must be > 0 - print __METHOD__." OK AR idprof1 result=".$result."\n"; - $this->assertGreaterThanOrEqual(0, $result); - $result=$localobject->id_prof_check(2, $localobject); // Must be > 0 - print __METHOD__." OK AR idprof2 result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result); + // OK AR + $localobject->country_code='AR'; + $localobject->idprof1='id1ko'; + $localobject->idprof2='id2ko'; + $result=$localobject->id_prof_check(1, $localobject); // Must be > 0 + print __METHOD__." OK AR idprof1 result=".$result."\n"; + $this->assertGreaterThanOrEqual(0, $result); + $result=$localobject->id_prof_check(2, $localobject); // Must be > 0 + print __METHOD__." OK AR idprof2 result=".$result."\n"; + $this->assertGreaterThanOrEqual(1, $result); - return $localobject; - } + return $localobject; + } - /** - * testSocieteOther - * - * @param Societe $localobject Company - * @return int $id Id of company - * - * @depends testIdProfCheck - * The depends says test is run only if previous is ok - */ - public function testSocieteOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSocieteOther + * + * @param Societe $localobject Company + * @return int $id Id of company + * + * @depends testIdProfCheck + * The depends says test is run only if previous is ok + */ + public function testSocieteOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->set_as_client(); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->set_as_client(); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $result=$localobject->set_price_level(1, $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->setPriceLevel(1, $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $result=$localobject->set_remise_client(10, 'Gift', $user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->set_remise_client(10, 'Gift', $user); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - $result=$localobject->getNomUrl(1); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertNotEquals($result, ''); + $result=$localobject->getNomUrl(1); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertNotEquals($result, ''); - $result=$localobject->isInEEC(); - print __METHOD__." id=".$localobject->id." country_code=".$localobject->country_code." result=".$result."\n"; - $this->assertTrue(true, $result); + $localobject->country_code = 'FR'; - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $result=$localobject->isInEEC(); + print __METHOD__." id=".$localobject->id." country_code=".$localobject->country_code." result=".$result."\n"; + $this->assertTrue($result); - return $localobject->id; - } + $localobject->country_code = 'US'; + + $result=$localobject->isInEEC(); + print __METHOD__." id=".$localobject->id." country_code=".$localobject->country_code." result=".$result."\n"; + $this->assertFalse($result); + + /*$localobject->country_code = 'GB'; + + $result=$localobject->isInEEC(); + print __METHOD__." id=".$localobject->id." country_code=".$localobject->country_code." result=".$result."\n"; + $this->assertTrue($result); + */ + + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); + + return $localobject->id; + } - /** - * testSocieteDelete - * - * @param int $id Id of company - * @return int - * - * @depends testSocieteOther - * The depends says test is run only if previous is ok - */ - public function testSocieteDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSocieteDelete + * + * @param int $id Id of company + * @return int + * + * @depends testSocieteOther + * The depends says test is run only if previous is ok + */ + public function testSocieteDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Societe($this->savdb); - $result=$localobject->fetch($id); + $localobject=new Societe($this->savdb); + $result=$localobject->fetch($id); - $result=$localobject->delete($id, $user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $result=$localobject->delete($id, $user); + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); - return $result; - } + return $result; + } - /** - * testSocieteGetFullAddress - * - * @return int $id Id of company - */ - public function testSocieteGetFullAddress() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSocieteGetFullAddress + * + * @return int $id Id of company + */ + public function testSocieteGetFullAddress() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobjectadd=new Societe($db); - $localobjectadd->initAsSpecimen(); + $localobjectadd=new Societe($db); + $localobjectadd->initAsSpecimen(); - // France - unset($localobjectadd->country_code); - $localobjectadd->country_id=1; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nFrance", $result); + // France + unset($localobjectadd->country_code); + $localobjectadd->country_id=1; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nFrance", $result); - // Belgium - unset($localobjectadd->country_code); - $localobjectadd->country_id=2; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nBelgium", $result); + // Belgium + unset($localobjectadd->country_code); + $localobjectadd->country_id=2; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nBelgium", $result); - // Switzerland - unset($localobjectadd->country_code); - $localobjectadd->country_id=6; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew zip New town\nSwitzerland", $result); + // Switzerland + unset($localobjectadd->country_code); + $localobjectadd->country_id=6; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew zip New town\nSwitzerland", $result); - // USA - unset($localobjectadd->country_code); - $localobjectadd->country_id=11; - $localobjectadd->name='New name'; - $localobjectadd->address='New address'; - $localobjectadd->zip='New zip'; - $localobjectadd->town='New town'; - $localobjectadd->state='New state'; - $result=$localobjectadd->getFullAddress(1); - print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; - $this->assertContains("New address\nNew town, New state, New zip\nUnited States", $result); + // USA + unset($localobjectadd->country_code); + $localobjectadd->country_id=11; + $localobjectadd->name='New name'; + $localobjectadd->address='New address'; + $localobjectadd->zip='New zip'; + $localobjectadd->town='New town'; + $localobjectadd->state='New state'; + $result=$localobjectadd->getFullAddress(1); + print __METHOD__." id=".$localobjectadd->id." result=".$result."\n"; + $this->assertContains("New address\nNew town, New state, New zip\nUnited States", $result); - return $localobjectadd->id; - } + return $localobjectadd->id; + } } diff --git a/test/phpunit/StripeTest.php b/test/phpunit/StripeTest.php index 72d4722b34e..9425cc47aa0 100644 --- a/test/phpunit/StripeTest.php +++ b/test/phpunit/StripeTest.php @@ -30,8 +30,7 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/geturl.lib.php'; require_once dirname(__FILE__).'/../../htdocs/stripe/lib/stripe.lib.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -75,69 +74,71 @@ class StripeTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (empty($conf->stripe->enabled)) { print __METHOD__." Module Stripe must be enabled.\n"; die(); } + if (empty($conf->stripe->enabled)) { + print __METHOD__." Module Stripe must be enabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testStripeOk - * - * @return void - */ - public function testStripeOk() - { - global $conf,$user,$langs,$db; + /** + * testStripeOk + * + * @return void + */ + public function testStripeOk() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -148,9 +149,9 @@ class StripeTest extends PHPUnit\Framework\TestCase $result=getURLContent($urltotest, 'GET', '', 1, array(), array('http', 'https'), 2); - print __METHOD__." result=".$result['http_code']."\n"; - $this->assertEquals(200, $result['http_code']); + print __METHOD__." result=".$result['http_code']."\n"; + $this->assertEquals(200, $result['http_code']); - return $result; - } + return $result; + } } diff --git a/test/phpunit/SupplierProposalTest.php b/test/phpunit/SupplierProposalTest.php index 27414ecab0a..bc9263f410c 100644 --- a/test/phpunit/SupplierProposalTest.php +++ b/test/phpunit/SupplierProposalTest.php @@ -29,8 +29,7 @@ global $conf,$user,$langs,$db; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/supplier_proposal/class/supplier_proposal.class.php'; -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for user nb 1 (that should be admin)\n"; $user->fetch(1); @@ -63,7 +62,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase */ public function __construct() { - parent::__construct(); + parent::__construct(); //$this->sharedFixture global $conf,$user,$langs,$db; @@ -78,41 +77,43 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - if (empty($conf->global->MAIN_MODULE_SUPPLIERPROPOSAL)) { print "\n".__METHOD__." module Supplier proposal must be enabled.\n"; die(); } + if (empty($conf->global->MAIN_MODULE_SUPPLIERPROPOSAL)) { + print "\n".__METHOD__." module Supplier proposal must be enabled.\n"; die(); + } - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -124,102 +125,102 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase // Set permission not set by default sql sample $user->addrights(0, 'supplier_proposal'); $user->getrights('supplier_proposal', 1); - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testSupplierProposalCreate - * - * @return void - */ - public function testSupplierProposalCreate() - { - global $conf,$user,$langs,$db; + /** + * testSupplierProposalCreate + * + * @return void + */ + public function testSupplierProposalCreate() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new SupplierProposal($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testSupplierProposalFetch - * - * @param int $id Id of object - * @return void - * - * @depends testSupplierProposalCreate - * The depends says test is run only if previous is ok - */ - public function testSupplierProposalFetch($id) - { - global $conf,$user,$langs,$db; + /** + * testSupplierProposalFetch + * + * @param int $id Id of object + * @return void + * + * @depends testSupplierProposalCreate + * The depends says test is run only if previous is ok + */ + public function testSupplierProposalFetch($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new SupplierProposal($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testSupplierProposalAddLine - * - * @param int $localobject Proposal - * @return void - * - * @depends testSupplierProposalFetch - * The depends says test is run only if previous is ok - */ - public function testSupplierProposalAddLine($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSupplierProposalAddLine + * + * @param SupplierProposal $localobject Proposal + * @return void + * + * @depends testSupplierProposalFetch + * The depends says test is run only if previous is ok + */ + public function testSupplierProposalAddLine($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->fetch_thirdparty(); - $result=$localobject->addline('Added line', 10, 2, 19.6); + $localobject->fetch_thirdparty(); + $result=$localobject->addline('Added line', 10, 2, 19.6); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + return $localobject; + } - /** - * testSupplierProposalValid - * - * @param SupplierProposal $localobject Proposal - * @return SupplierProposal - * - * @depends testSupplierProposalAddLine - * The depends says test is run only if previous is ok - */ - public function testSupplierProposalValid($localobject) - { - global $conf,$user,$langs,$db; + /** + * testSupplierProposalValid + * + * @param SupplierProposal $localobject Proposal + * @return SupplierProposal + * + * @depends testSupplierProposalAddLine + * The depends says test is run only if previous is ok + */ + public function testSupplierProposalValid($localobject) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -234,63 +235,63 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase $result=$localobject->valid($user); $this->assertLessThan($result, 0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testSupplierProposalOther - * - * @param SupplierProposal $localobject Proposal - * @return int - * - * @depends testSupplierProposalValid - * The depends says test is run only if previous is ok - */ - public function testSupplierProposalOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testSupplierProposalOther + * + * @param SupplierProposal $localobject Proposal + * @return int + * + * @depends testSupplierProposalValid + * The depends says test is run only if previous is ok + */ + public function testSupplierProposalOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testSupplierProposalDelete - * - * @param int $id Id of proposal - * @return void - * - * @depends testSupplierProposalOther - * The depends says test is run only if previous is ok - */ - public function testSupplierProposalDelete($id) - { - global $conf,$user,$langs,$db; + /** + * testSupplierProposalDelete + * + * @param int $id Id of proposal + * @return void + * + * @depends testSupplierProposalOther + * The depends says test is run only if previous is ok + */ + public function testSupplierProposalDelete($id) + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; $localobject=new SupplierProposal($this->savdb); - $result=$localobject->fetch($id); + $result=$localobject->fetch($id); $result=$localobject->delete($user); print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/TicketTest.php b/test/phpunit/TicketTest.php index c13bdcfb959..60aea4b8098 100644 --- a/test/phpunit/TicketTest.php +++ b/test/phpunit/TicketTest.php @@ -75,10 +75,10 @@ class TicketTest extends PHPUnit\Framework\TestCase } /** - * setUpBeforeClass - * - * @return void - */ + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,11 +87,11 @@ class TicketTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - /** - * tearDownAfterClass - * - * @return void - */ + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; @@ -306,7 +306,7 @@ class TicketTest extends PHPUnit\Framework\TestCase $user_id_to_assign = 1; $result=$localobject->assignUser($user, $user_id_to_assign); - ; + ; print __METHOD__." id=".$localobject->id." result=".$result."\n"; $this->assertGreaterThan(0, $result); diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index 3ec92449f08..46eb3917001 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/user/class/usergroup.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,246 +46,246 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class UserGroupTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return UserGroupTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return UserGroupTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testUserGroupCreate - * - * @return void - */ - public function testUserGroupCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupCreate + * + * @return void + */ + public function testUserGroupCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new UserGroup($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new UserGroup($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testUserGroupFetch - * - * @param int $id Id of group - * @return void - * @depends testUserGroupCreate - * The depends says test is run only if previous is ok - */ - public function testUserGroupFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupFetch + * + * @param int $id Id of group + * @return void + * @depends testUserGroupCreate + * The depends says test is run only if previous is ok + */ + public function testUserGroupFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new UserGroup($this->savdb); - $result=$localobject->fetch($id); + $localobject=new UserGroup($this->savdb); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testUserGroupUpdate - * - * @param Object $localobject Group - * @return void - * @depends testUserGroupFetch - * The depends says test is run only if previous is ok - */ - public function testUserGroupUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupUpdate + * + * @param UserGroup $localobject Group + * @return void + * @depends testUserGroupFetch + * The depends says test is run only if previous is ok + */ + public function testUserGroupUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject->note='New note after update'; - $result=$localobject->update($user); + $localobject->note='New note after update'; + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testUserGroupAddRight - * - * @param Object $localobject Object to show - * @return void - * @depends testUserGroupUpdate - * The depends says test is run only if previous is ok - */ - public function testUserGroupAddRight($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupAddRight + * + * @param UserGroup $localobject Object to show + * @return void + * @depends testUserGroupUpdate + * The depends says test is run only if previous is ok + */ + public function testUserGroupAddRight($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->addrights(1, 'bookmarks'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->addrights(1, 'bookmarks'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testUserGroupDelRight - * - * @param Object $localobject Object - * @return void - * @depends testUserGroupAddRight - * The depends says test is run only if previous is ok - */ - public function testUserGroupDelRight($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupDelRight + * + * @param UserGroup $localobject Object + * @return void + * @depends testUserGroupAddRight + * The depends says test is run only if previous is ok + */ + public function testUserGroupDelRight($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->delrights(1, 'bookmarks'); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->delrights(1, 'bookmarks'); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $localobject; - } + $this->assertLessThan($result, 0); + return $localobject; + } - /** - * testUserGroupOther - * - * @param Object $localobject Object - * @return void - * @depends testUserGroupDelRight - * The depends says test is run only if previous is ok - */ - public function testUserGroupOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupOther + * + * @param UserGroup $localobject Object + * @return void + * @depends testUserGroupDelRight + * The depends says test is run only if previous is ok + */ + public function testUserGroupOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result = $localobject->generateDocument('templatenamethadoesnotexist', $langs); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(-1, $result, 'Calling generateDocument with a not existing template should return 0'); + $result = $localobject->generateDocument('templatenamethadoesnotexist', $langs); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(-1, $result, 'Calling generateDocument with a not existing template should return 0'); - return $localobject->id; - } + return $localobject->id; + } - /** - * testUserGroupDelete - * - * @param int $id Id of object - * @return void - * @depends testUserGroupOther - * The depends says test is run only if previous is ok - */ - public function testUserGroupDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserGroupDelete + * + * @param int $id Id of object + * @return void + * @depends testUserGroupOther + * The depends says test is run only if previous is ok + */ + public function testUserGroupDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new UserGroup($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new UserGroup($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } } diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index a8486451c47..ca889fdbc96 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/user/class/user.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,309 +46,313 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class UserTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return UserTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return UserTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - if (! empty($conf->global->MAIN_MODULE_LDAP)) { print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); } + if (! empty($conf->global->MAIN_MODULE_LDAP)) { + print "\n".__METHOD__." module LDAP must be disabled.\n"; die(); + } - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testUserCreate - * - * @return void - */ - public function testUserCreate() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserCreate + * + * @return void + */ + public function testUserCreate() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new User($this->savdb); - $localobject->initAsSpecimen(); - $result=$localobject->create($user); + $localobject=new User($this->savdb); + $localobject->initAsSpecimen(); + $result=$localobject->create($user); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + $this->assertLessThan($result, 0); + print __METHOD__." result=".$result."\n"; + return $result; + } - /** - * testUserFetch - * - * @param int $id Id of user - * @return void - * @depends testUserCreate - * The depends says test is run only if previous is ok - */ - public function testUserFetch($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserFetch + * + * @param int $id Id of user + * @return void + * @depends testUserCreate + * The depends says test is run only if previous is ok + */ + public function testUserFetch($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new User($this->savdb); - $result=$localobject->fetch($id); + $localobject=new User($this->savdb); + $result=$localobject->fetch($id); - $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; - return $localobject; - } + $this->assertLessThan($result, 0); + print __METHOD__." id=".$id." result=".$result."\n"; + return $localobject; + } - /** - * testUserUpdate - * - * @param Object $localobject User - * @return void - * @depends testUserFetch - * The depends says test is run only if previous is ok - */ - public function testUserUpdate($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserUpdate + * + * @param User $localobject User + * @return void + * @depends testUserFetch + * The depends says test is run only if previous is ok + */ + public function testUserUpdate($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $this->changeProperties($localobject); - $result=$localobject->update($user); + $this->changeProperties($localobject); + $result=$localobject->update($user); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); - // Test everything are still same than specimen - $newlocalobject=new User($this->savdb); - $newlocalobject->initAsSpecimen(); - $this->changeProperties($newlocalobject); - $this->assertEquals($this->objCompare($localobject, $newlocalobject, true, array('id','socid','societe_id','specimen','note','ref','pass','pass_indatabase','pass_indatabase_crypted','pass_temp','datec','datem','datelastlogin','datepreviouslogin','trackid')), array()); // Actual, Expected + // Test everything are still same than specimen + $newlocalobject=new User($this->savdb); + $newlocalobject->initAsSpecimen(); + $this->changeProperties($newlocalobject); + $this->assertEquals($this->objCompare($localobject, $newlocalobject, true, array('id','socid','societe_id','specimen','note','ref','pass','pass_indatabase','pass_indatabase_crypted','pass_temp','datec','datem','datelastlogin','datepreviouslogin','trackid')), array()); // Actual, Expected - return $localobject; - } + return $localobject; + } - /** - * testUserDisable - * - * @param Object $localobject User - * @return void - * @depends testUserUpdate - * The depends says test is run only if previous is ok - */ - public function testUserDisable($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserDisable + * + * @param User $localobject User + * @return void + * @depends testUserUpdate + * The depends says test is run only if previous is ok + */ + public function testUserDisable($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); + $this->assertLessThan($result, 0); - return $localobject; - } + return $localobject; + } - /** - * testUserOther - * - * @param Object $localobject User - * @return void - * @depends testUserDisable - * The depends says test is run only if previous is ok - */ - public function testUserOther($localobject) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserOther + * + * @param User $localobject User + * @return void + * @depends testUserDisable + * The depends says test is run only if previous is ok + */ + public function testUserOther($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /*$result=$localobject->setstatus(0); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; - $this->assertLessThan($result, 0); - */ + /*$result=$localobject->setstatus(0); + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + */ - $localobject->info($localobject->id); - print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; - $this->assertNotEquals($localobject->date_creation, ''); + $localobject->info($localobject->id); + print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; + $this->assertNotEquals($localobject->date_creation, ''); - return $localobject->id; - } + return $localobject->id; + } - /** - * testUserDelete - * - * @param Object $id User - * @return void - * @depends testUserOther - * The depends says test is run only if previous is ok - */ - public function testUserDelete($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserDelete + * + * @param int $id User id + * @return void + * @depends testUserOther + * The depends says test is run only if previous is ok + */ + public function testUserDelete($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new User($this->savdb); - $result=$localobject->fetch($id); - $result=$localobject->delete($user); + $localobject=new User($this->savdb); + $result=$localobject->fetch($id); + $result=$localobject->delete($user); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } - /** - * testUserAddPermission - * - * @param Object $id User - * @return void - * @depends testUserDelete - * The depends says test is run only if previous is ok - */ - public function testUserAddPermission($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testUserAddPermission + * + * @param int $id User id + * @return void + * @depends testUserDelete + * The depends says test is run only if previous is ok + */ + public function testUserAddPermission($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new User($this->savdb); - $result=$localobject->fetch(1); // Other tests use the user id 1 - $result=$localobject->addrights(0, 'supplier_proposal'); + $localobject=new User($this->savdb); + $result=$localobject->fetch(1); // Other tests use the user id 1 + $result=$localobject->addrights(0, 'supplier_proposal'); - print __METHOD__." id=".$id." result=".$result."\n"; - $this->assertLessThan($result, 0); - return $result; - } + print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $result; + } - /** - * Edit an object to test updates - * - * @param mixed $localobject Object User - * @return void - */ - public function changeProperties(&$localobject) - { - $localobject->note_private='New note after update'; - } + /** + * Edit an object to test updates + * + * @param Object $localobject Object User + * @return void + */ + public function changeProperties(&$localobject) + { + $localobject->note_private='New note after update'; + } - /** - * Compare all public properties values of 2 objects - * - * @param Object $oA Object operand 1 - * @param Object $oB Object operand 2 - * @param boolean $ignoretype False will not report diff if type of value differs - * @param array $fieldstoignorearray Array of fields to ignore in diff - * @return array Array with differences - */ - public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) - { - $retAr=array(); + /** + * Compare all public properties values of 2 objects + * + * @param Object $oA Object operand 1 + * @param Object $oB Object operand 2 + * @param boolean $ignoretype False will not report diff if type of value differs + * @param array $fieldstoignorearray Array of fields to ignore in diff + * @return array Array with differences + */ + public function objCompare($oA, $oB, $ignoretype = true, $fieldstoignorearray = array('id')) + { + $retAr=array(); - if (get_class($oA) !== get_class($oB)) { - $retAr[]="Supplied objects are not of same class."; - } else { - $oVarsA=get_object_vars($oA); - $oVarsB=get_object_vars($oB); - $aKeys=array_keys($oVarsA); - foreach ($aKeys as $sKey) { - if (in_array($sKey, $fieldstoignorearray)) continue; - if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { - $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); - } - } - } - return $retAr; - } + if (get_class($oA) !== get_class($oB)) { + $retAr[]="Supplied objects are not of same class."; + } else { + $oVarsA=get_object_vars($oA); + $oVarsB=get_object_vars($oB); + $aKeys=array_keys($oVarsA); + foreach ($aKeys as $sKey) { + if (in_array($sKey, $fieldstoignorearray)) { + continue; + } + if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) { + $retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]); + } + } + } + return $retAr; + } } diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index dd5ba68ca8f..91ba85a7656 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/class/utils.class.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,114 +46,114 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class UtilsTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return UserTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return UserTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testExecuteCLI - * - * @return void - */ - public function testExecuteCLI() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testExecuteCLI + * + * @return void + */ + public function testExecuteCLI() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $localobject=new Utils($this->savdb); - $result = $localobject->executeCLI('ls', $conf->admin->dir_temp.'/out.tmp', 1); + $localobject=new Utils($this->savdb); + $result = $localobject->executeCLI('ls', $conf->admin->dir_temp.'/out.tmp', 1); print var_export($result, true); - $this->assertEquals($result['result'], 0); - $this->assertEquals($result['error'], ''); - //$this->assertEquals(preg_match('/phpunit/', $result['output']), 1); + $this->assertEquals($result['result'], 0); + $this->assertEquals($result['error'], ''); + //$this->assertEquals(preg_match('/phpunit/', $result['output']), 1); - $localobject=new Utils($this->savdb); - $result = $localobject->executeCLI('ls', $conf->admin->dir_temp.'/out.tmp', 2); + $localobject=new Utils($this->savdb); + $result = $localobject->executeCLI('ls', $conf->admin->dir_temp.'/out.tmp', 2); print var_export($result, true); - $this->assertEquals($result['result'], 0); - $this->assertEquals($result['error'], ''); - //$this->assertEquals(preg_match('/phpunit/', $result['output']), 1); + $this->assertEquals($result['result'], 0); + $this->assertEquals($result['error'], ''); + //$this->assertEquals(preg_match('/phpunit/', $result['output']), 1); - print __METHOD__." result=".$result['result']."\n"; - return $result; - } + print __METHOD__." result=".$result['result']."\n"; + return $result; + } } diff --git a/test/phpunit/WebservicesInvoicesTest.php b/test/phpunit/WebservicesInvoicesTest.php index 6bedda43fa4..f6f499357a4 100644 --- a/test/phpunit/WebservicesInvoicesTest.php +++ b/test/phpunit/WebservicesInvoicesTest.php @@ -31,8 +31,7 @@ require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php'; require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP -if (empty($user->id)) -{ +if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; $user->fetch(1); $user->getrights(); @@ -85,8 +84,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php'; print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; $this->soapclient = new nusoap_client($WS_DOL_URL); - if ($this->soapclient) - { + if ($this->soapclient) { $this->soapclient->soap_defencoding='UTF-8'; $this->soapclient->decodeUTF8(false); } @@ -96,16 +94,16 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase print "\n"; } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + global $conf,$user,$langs,$db; - $now = dol_now(); + $now = dol_now(); // create a third_party, needed to create an invoice // @@ -134,8 +132,7 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase $societe->particulier=0; $societe->create($user); - if (empty($societe->id)) - { + if (empty($societe->id)) { // Create failed, may be the thirdparty already exists, we fetch it $societe->fetch(0, 'name'); } @@ -146,66 +143,66 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; $db->rollback(); print __METHOD__."\n"; - } + } /** * Init phpunit tests * * @return void */ - protected function setUp() - { - global $conf,$user,$langs,$db; + protected function setUp() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; $db=$this->savdb; print __METHOD__."\n"; - } + } /** * End phpunit tests * * @return void */ - protected function tearDown() - { - print __METHOD__."\n"; - } + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSInvoicesCreateInvoice - * - * @return int invoice created - */ - public function testWSInvoicesCreateInvoice() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSInvoicesCreateInvoice + * + * @return int invoice created + */ + public function testWSInvoicesCreateInvoice() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_METHOD = 'createInvoice'; + $WS_METHOD = 'createInvoice'; - $body = array ( - "id" => null, + $body = array ( + "id" => null, "ref" => null, "ref_ext" => "ref-phpunit-2", "thirdparty_id" => self::$socid, @@ -246,120 +243,117 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase "product_desc" => "" )) ); - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>$this->pass, - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>$this->pass, + 'entity'=>''); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'invoice'=>$body); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) - { - //var_dump($soapclient); - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'invoice'=>$body); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } - print __METHOD__." result=".$result['result']['result_code']." ".$result['result']['result_label']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals('ref-phpunit-2', $result['ref_ext']); + print __METHOD__." result=".$result['result']['result_code']." ".$result['result']['result_label']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals('ref-phpunit-2', $result['ref_ext']); - return $result; - } + return $result; + } - /** - * testWSInvoicesGetInvoiceByRefExt - * - * Retrieve an invoice using ref_ext - * @depends testWSInvoicesCreateInvoice - * - * @param array $result Invoice created by create method - * @return array Invoice - */ - public function testWSInvoicesGetInvoiceByRefExt($result) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSInvoicesGetInvoiceByRefExt + * + * Retrieve an invoice using ref_ext + * @depends testWSInvoicesCreateInvoice + * + * @param array $result Invoice created by create method + * @return array Invoice + */ + public function testWSInvoicesGetInvoiceByRefExt($result) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_METHOD = 'getInvoice'; + $WS_METHOD = 'getInvoice'; - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>$this->pass, - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>$this->pass, + 'entity'=>''); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication, 'id'=>null, 'ref'=>null, 'ref_ext'=>'ref-phpunit-2'); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) - { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) - { - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } - print __METHOD__." result=".$result['result']['result_code']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals('ref-phpunit-2', $result['invoice']['ref_ext']); + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication, 'id'=>null, 'ref'=>null, 'ref_ext'=>'ref-phpunit-2'); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } + print __METHOD__." result=".$result['result']['result_code']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals('ref-phpunit-2', $result['invoice']['ref_ext']); - return $result; - } + return $result; + } - /** - * testWSInvoicesUpdateInvoiceByRefExt - * - * Update an invoice using ref_ext - * @depends testWSInvoicesCreateInvoice - * - * @param array $result invoice created by create method - * @return array Invoice - */ - public function testWSInvoicesUpdateInvoiceByRefExt($result) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSInvoicesUpdateInvoiceByRefExt + * + * Update an invoice using ref_ext + * @depends testWSInvoicesCreateInvoice + * + * @param array $result invoice created by create method + * @return array Invoice + */ + public function testWSInvoicesUpdateInvoiceByRefExt($result) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_METHOD = 'updateInvoice'; + $WS_METHOD = 'updateInvoice'; - // update status to 2 - $body = array ( - "id" => null, + // update status to 2 + $body = array ( + "id" => null, "ref" => null, "ref_ext" => "ref-phpunit-2", "thirdparty_id" => self::$socid, @@ -401,39 +395,37 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase "product_desc" => "" )) ); - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>$this->pass, - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>$this->pass, + 'entity'=>''); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'invoice'=>$body); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) - { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) - { - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'invoice'=>$body); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } - print __METHOD__." result=".$result['result']['result_code'].$result['result']['result_label']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals('ref-phpunit-2', $result['ref_ext']); + print __METHOD__." result=".$result['result']['result_code'].$result['result']['result_label']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals('ref-phpunit-2', $result['ref_ext']); - return $result; - } + return $result; + } } diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index fb649a52e44..9ffa00226e0 100644 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -32,9 +32,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -50,142 +50,142 @@ $conf->global->MAIN_UMASK='0666'; */ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSOrderGetOrder - * - * @return int - */ - public function testWSOrderGetOrder() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSOrderGetOrder + * + * @return int + */ + public function testWSOrderGetOrder() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_order.php'; - $WS_METHOD = 'getOrder'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_order.php'; + $WS_METHOD = 'getOrder'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $parameters = array('authentication'=>$authentication,'id'=>1); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $parameters = array('authentication'=>$authentication,'id'=>1); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('OK', $result['result']['result_code']); - return $result; - } + return $result; + } } diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index 69449320537..0e788a195a7 100644 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -32,9 +32,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -50,171 +50,171 @@ $conf->global->MAIN_UMASK='0666'; */ class WebservicesOtherTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSOtherGetVersions - * - * @return int - */ - public function testWSOtherGetVersions() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSOtherGetVersions + * + * @return int + */ + public function testWSOtherGetVersions() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; - $WS_METHOD = 'getVersions'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; + $WS_METHOD = 'getVersions'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! empty($result['faultstring'])) { - print $result['faultstring']."\n"; - $result=0; - } - if (! $result) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! empty($result['faultstring'])) { + print $result['faultstring']."\n"; + $result=0; + } + if (! $result) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('OK', $result['result']['result_code']); - // Test method that does not exists - $WS_METHOD='methodthatdoesnotexists'; - $result=''; - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test method that does not exists + $WS_METHOD='methodthatdoesnotexists'; + $result=''; + $parameters = array('authentication'=>$authentication); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals("SOAP-ENV:Client: Operation 'methodthatdoesnotexists' is not defined in the WSDL for this service", $soapclient->error_str); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals("SOAP-ENV:Client: Operation 'methodthatdoesnotexists' is not defined in the WSDL for this service", $soapclient->error_str); - return $result; - } + return $result; + } } diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index b78650cc480..a31d147b9d7 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -34,16 +34,15 @@ require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; $conf->global->MAIN_UMASK='0666'; -if (empty($conf->service->enabled)) -{ +if (empty($conf->service->enabled)) { print "Error: Module service must be enabled.\n"; exit(1); } @@ -57,283 +56,283 @@ if (empty($conf->service->enabled)) */ class WebservicesProductsTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSProductsCreateProductOrService - * - * @return int - */ - public function testWSProductsCreateProductOrService() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSProductsCreateProductOrService + * + * @return int + */ + public function testWSProductsCreateProductOrService() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $datestring=dol_print_date(dol_now(), 'dayhourlog'); + $datestring=dol_print_date(dol_now(), 'dayhourlog'); - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; - $WS_METHOD = 'createProductOrService'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; + $WS_METHOD = 'createProductOrService'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $result=''; - $parameters = array( - 'authentication'=>$authentication,'product'=>array( - 'ref'=>'NewProductFromWS'.$datestring, - 'label'=>'New Product From WS '.$datestring, - 'type'=>1, - 'description'=>'This is a new product created from WS PHPUnit test case', - 'barcode'=>'123456789012', - 'barcode_type'=>2, - 'price_net'=>10, - 'status_tosell'=>1, - 'status_tobuy'=>1 - ) - ); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } - print var_export($result, true); - print __METHOD__." count(result)=".(is_array($result) ? count($result) : '')."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + // Test URL + $result=''; + $parameters = array( + 'authentication'=>$authentication,'product'=>array( + 'ref'=>'NewProductFromWS'.$datestring, + 'label'=>'New Product From WS '.$datestring, + 'type'=>1, + 'description'=>'This is a new product created from WS PHPUnit test case', + 'barcode'=>'123456789012', + 'barcode_type'=>2, + 'price_net'=>10, + 'status_tosell'=>1, + 'status_tobuy'=>1 + ) + ); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } + print var_export($result, true); + print __METHOD__." count(result)=".(is_array($result) ? count($result) : '')."\n"; + $this->assertEquals('OK', $result['result']['result_code']); - return $result['id']; - } + return $result['id']; + } - /** - * testWSProductsGetProductOrService - * - * @param int $id Id of product or service - * @return int Id of product or service - * - * @depends testWSProductsCreateProductOrService - */ - public function testWSProductsGetProductOrService($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSProductsGetProductOrService + * + * @param int $id Id of product or service + * @return int Id of product or service + * + * @depends testWSProductsCreateProductOrService + */ + public function testWSProductsGetProductOrService($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; - $WS_METHOD = 'getProductOrService'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; + $WS_METHOD = 'getProductOrService'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'id'=>$id,'ref'=>''); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'id'=>$id,'ref'=>''); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('OK', $result['result']['result_code']); - return $id; - } + return $id; + } - /** - * testWSProductsDeleteProductOrService - * - * @param int $id Id of product or service - * @return int 0 - * - * @depends testWSProductsGetProductOrService - */ - public function testWSProductsDeleteProductOrService($id) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSProductsDeleteProductOrService + * + * @param int $id Id of product or service + * @return int 0 + * + * @depends testWSProductsGetProductOrService + */ + public function testWSProductsDeleteProductOrService($id) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; - $WS_METHOD = 'deleteProductOrService'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_productorservice.php'; + $WS_METHOD = 'deleteProductOrService'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'listofid'=>$id); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'listofid'=>$id); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring']) || $result['result']['result_code'] != 'OK') { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('OK', $result['result']['result_code']); - return 0; - } + return 0; + } } diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php index cf56066ba6a..fe9b15cee50 100644 --- a/test/phpunit/WebservicesThirdpartyTest.php +++ b/test/phpunit/WebservicesThirdpartyTest.php @@ -32,9 +32,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -50,361 +50,361 @@ $conf->global->MAIN_UMASK='0666'; */ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; - protected $soapclient; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + protected $soapclient; - private $ns='http://www.dolibarr.org/ns/'; + private $ns='http://www.dolibarr.org/ns/'; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php'; - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $this->soapclient = new nusoap_client($WS_DOL_URL); - if ($this->soapclient) { - $this->soapclient->soap_defencoding='UTF-8'; - $this->soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; + $this->soapclient = new nusoap_client($WS_DOL_URL); + if ($this->soapclient) { + $this->soapclient->soap_defencoding='UTF-8'; + $this->soapclient->decodeUTF8(false); + } - print __METHOD__." db->type=".$db->type." user->id=".$user->id; - //print " - db ".$db->db; - print "\n"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSThirdpartycreateThirdParty - * - * @return array thirdparty created - */ - public function testWSThirdpartycreateThirdParty() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSThirdpartycreateThirdParty + * + * @return array thirdparty created + */ + public function testWSThirdpartycreateThirdParty() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_METHOD = 'createThirdParty'; + $WS_METHOD = 'createThirdParty'; - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>''); - $body = array ( - "id" => null, - "ref" => "name", - "ref_ext" => "12", - "fk_user_author" => null, - "status" => null, - "client" => 1, - "supplier" => 0, - "customer_code" => "CU0901-5678", - "supplier_code" => "SU0901-5678", - "customer_code_accountancy" => "", - "supplier_code_accountancy" => "", - "date_creation" => "", // dateTime - "date_modification" => "", // dateTime - "note_private" => "", - "note_public" => "", - "address" => "", - "zip" => "", - "town" => "", - "province_id" => "", - "country_id" => "", - "country_code" => "", - "country" => "", - "phone" => "", - "fax" => "", - "email" => "", - "url" => "", - "profid1" => "", - "profid2" => "", - "profid3" => "", - "profid4" => "", - "profid5" => "", - "profid6" => "", - "capital" => "", - "vat_used" => "", - "vat_number" => "" - ); + $body = array ( + "id" => null, + "ref" => "name", + "ref_ext" => "12", + "fk_user_author" => null, + "status" => null, + "client" => 1, + "supplier" => 0, + "customer_code" => "CU0901-5678", + "supplier_code" => "SU0901-5678", + "customer_code_accountancy" => "", + "supplier_code_accountancy" => "", + "date_creation" => "", // dateTime + "date_modification" => "", // dateTime + "note_private" => "", + "note_public" => "", + "address" => "", + "zip" => "", + "town" => "", + "province_id" => "", + "country_id" => "", + "country_code" => "", + "country" => "", + "phone" => "", + "fax" => "", + "email" => "", + "url" => "", + "profid1" => "", + "profid2" => "", + "profid3" => "", + "profid4" => "", + "profid5" => "", + "profid6" => "", + "capital" => "", + "vat_used" => "", + "vat_number" => "" + ); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication, 'thirdparty'=>$body); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication, 'thirdparty'=>$body); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } - print __METHOD__." result=".$result['result']['result_code']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals('name', $result['ref']); + print __METHOD__." result=".$result['result']['result_code']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals('name', $result['ref']); - return $result; - } + return $result; + } - /** - * testWSThirdpartygetThirdPartyById - * - * Use id to retrieve thirdparty - * @depends testWSThirdpartycreateThirdParty - * - * @param array $result thirdparty created by create method - * @return array thirpdarty updated - */ - public function testWSThirdpartygetThirdPartyById($result) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - $id = $result['id']; - - $WS_METHOD = 'getThirdParty'; - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - $result=''; - $parameters = array('authentication'=>$authentication, 'id'=>$id); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } - - print __METHOD__." result=".$result['result']['result_code']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals($id, $result['thirdparty']['id']); - $this->assertEquals('name', $result['thirdparty']['ref']); - $this->assertEquals('12', $result['thirdparty']['ref_ext']); - $this->assertEquals('0', $result['thirdparty']['status']); - $this->assertEquals('1', $result['thirdparty']['client']); - $this->assertEquals('0', $result['thirdparty']['supplier']); - - - return $result; - } - - /** - * testWSThirdpartygetThirdPartyByRefExt - * - * Use ref_ext to retrieve thirdparty - * + /** + * testWSThirdpartygetThirdPartyById + * + * Use id to retrieve thirdparty * @depends testWSThirdpartycreateThirdParty * - * @param array $result thirdparty created by create method - * @return array thirdparty - */ - public function testWSThirdpartygetThirdPartyByRefExt($result) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - $id = $result['id']; + * @param array $result thirdparty created by create method + * @return array thirpdarty updated + */ + public function testWSThirdpartygetThirdPartyById($result) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + $id = $result['id']; - $WS_METHOD = 'getThirdParty'; + $WS_METHOD = 'getThirdParty'; - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>''); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication, 'id'=>'', 'ref'=>'', 'ref_ext'=>'12'); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - print $this->soapclient->response; - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } + $result=''; + $parameters = array('authentication'=>$authentication, 'id'=>$id); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } - print __METHOD__." result=".$result['result']['result_code']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); - $this->assertEquals($id, $result['thirdparty']['id']); - $this->assertEquals('name', $result['thirdparty']['ref']); - $this->assertEquals('12', $result['thirdparty']['ref_ext']); - $this->assertEquals('0', $result['thirdparty']['status']); - $this->assertEquals('1', $result['thirdparty']['client']); - $this->assertEquals('0', $result['thirdparty']['supplier']); + print __METHOD__." result=".$result['result']['result_code']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals($id, $result['thirdparty']['id']); + $this->assertEquals('name', $result['thirdparty']['ref']); + $this->assertEquals('12', $result['thirdparty']['ref_ext']); + $this->assertEquals('0', $result['thirdparty']['status']); + $this->assertEquals('1', $result['thirdparty']['client']); + $this->assertEquals('0', $result['thirdparty']['supplier']); - return $result; - } + return $result; + } - /** - * testWSThirdpartydeleteThirdParty - * - * @depends testWSThirdpartycreateThirdParty - * - * @param array $result thirdparty created by create method - * @return array thirdparty - */ - public function testWSThirdpartydeleteThirdPartyById($result) - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - $id = $result['id']; + /** + * testWSThirdpartygetThirdPartyByRefExt + * + * Use ref_ext to retrieve thirdparty + * + * @depends testWSThirdpartycreateThirdParty + * + * @param array $result thirdparty created by create method + * @return array thirdparty + */ + public function testWSThirdpartygetThirdPartyByRefExt($result) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + $id = $result['id']; - $WS_METHOD = 'deleteThirdParty'; + $WS_METHOD = 'getThirdParty'; - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>''); - $result=''; - $parameters = array('authentication'=>$authentication, 'id'=>$id, 'ref'=>'', 'ref_ext'=>''); - print __METHOD__." call method ".$WS_METHOD."\n"; - try { - $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - print $this->soapclient->error_str; - print "\n<br>\n"; - print $this->soapclient->request; - print "\n<br>\n"; - print $this->soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication, 'id'=>'', 'ref'=>'', 'ref_ext'=>'12'); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + print $this->soapclient->response; + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } - print __METHOD__." result=".$result['result']['result_code']."\n"; - $this->assertEquals('OK', $result['result']['result_code']); + print __METHOD__." result=".$result['result']['result_code']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + $this->assertEquals($id, $result['thirdparty']['id']); + $this->assertEquals('name', $result['thirdparty']['ref']); + $this->assertEquals('12', $result['thirdparty']['ref_ext']); + $this->assertEquals('0', $result['thirdparty']['status']); + $this->assertEquals('1', $result['thirdparty']['client']); + $this->assertEquals('0', $result['thirdparty']['supplier']); - return $result; - } + + return $result; + } + + /** + * testWSThirdpartydeleteThirdParty + * + * @depends testWSThirdpartycreateThirdParty + * + * @param array $result thirdparty created by create method + * @return array thirdparty + */ + public function testWSThirdpartydeleteThirdPartyById($result) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + $id = $result['id']; + + $WS_METHOD = 'deleteThirdParty'; + + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>''); + + $result=''; + $parameters = array('authentication'=>$authentication, 'id'=>$id, 'ref'=>'', 'ref_ext'=>''); + print __METHOD__." call method ".$WS_METHOD."\n"; + try { + $result = $this->soapclient->call($WS_METHOD, $parameters, $this->ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + print $this->soapclient->error_str; + print "\n<br>\n"; + print $this->soapclient->request; + print "\n<br>\n"; + print $this->soapclient->response; + print "\n"; + } + + print __METHOD__." result=".$result['result']['result_code']."\n"; + $this->assertEquals('OK', $result['result']['result_code']); + + return $result; + } } diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index a683c99eac3..e3072844580 100644 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -32,9 +32,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; // Include SOAP if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -50,172 +50,172 @@ $conf->global->MAIN_UMASK='0666'; */ class WebservicesUserTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return DateLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return DateLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testWSUserGetUser - * - * @return int - */ - public function testWSUserGetUser() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testWSUserGetUser + * + * @return int + */ + public function testWSUserGetUser() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_user.php'; - $WS_METHOD = 'getUser'; - $ns='http://www.dolibarr.org/ns/'; + $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_user.php'; + $WS_METHOD = 'getUser'; + $ns='http://www.dolibarr.org/ns/'; - // Set the WebService URL - print __METHOD__." Create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } + // Set the WebService URL + print __METHOD__." Create nusoap_client for URL=".$WS_DOL_URL."\n"; + $soapclient = new nusoap_client($WS_DOL_URL); + if ($soapclient) { + $soapclient->soap_defencoding='UTF-8'; + $soapclient->decodeUTF8(false); + } - //$soapclient->setDebugLevel(5); + //$soapclient->setDebugLevel(5); - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>'' - ); + // Call the WebService method and store its result in $result. + $authentication=array( + 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, + 'sourceapplication'=>'DEMO', + 'login'=>'admin', + 'password'=>'admin', + 'entity'=>'' + ); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'admin'); - print __METHOD__." Call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! empty($result['faultstring'])) { - print $result['faultstring']."\n"; - $result=0; - } - if (! $result) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'admin'); + print __METHOD__." Call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! empty($result['faultstring'])) { + print $result['faultstring']."\n"; + $result=0; + } + if (! $result) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('OK', empty($result['result']['result_code'])?'':$result['result']['result_code'], 'Test on ref admin'); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('OK', empty($result['result']['result_code'])?'':$result['result']['result_code'], 'Test on ref admin'); - // Test URL - $result=''; - $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'refthatdoesnotexists'); - print __METHOD__."Call method ".$WS_METHOD."\n"; - try { - $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); - } catch (SoapFault $exception) { - echo $exception; - $result=0; - } - if (! $result || ! empty($result['faultstring'])) { - //var_dump($soapclient); - print $soapclient->error_str; - print "\n<br>\n"; - print $soapclient->request; - print "\n<br>\n"; - print $soapclient->response; - print "\n"; - } + // Test URL + $result=''; + $parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'refthatdoesnotexists'); + print __METHOD__."Call method ".$WS_METHOD."\n"; + try { + $result = $soapclient->call($WS_METHOD, $parameters, $ns, ''); + } catch (SoapFault $exception) { + echo $exception; + $result=0; + } + if (! $result || ! empty($result['faultstring'])) { + //var_dump($soapclient); + print $soapclient->error_str; + print "\n<br>\n"; + print $soapclient->request; + print "\n<br>\n"; + print $soapclient->response; + print "\n"; + } - print __METHOD__." count(result)=".count($result)."\n"; - $this->assertEquals('NOT_FOUND', $result['result']['result_code'], 'Test on ref that does not exists'); + print __METHOD__." count(result)=".count($result)."\n"; + $this->assertEquals('NOT_FOUND', $result['result']['result_code'], 'Test on ref that does not exists'); - return $result; - } + return $result; + } } diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index 9fb1975a1fd..9c81c25c46e 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -30,9 +30,9 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/core/lib/xcal.lib.php'; if (empty($user->id)) { - print "Load permissions for admin user nb 1\n"; - $user->fetch(1); - $user->getrights(); + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); } $conf->global->MAIN_DISABLE_ALL_MAILS=1; @@ -46,105 +46,105 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class XCalLibTest extends PHPUnit\Framework\TestCase { - protected $savconf; - protected $savuser; - protected $savlangs; - protected $savdb; + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; - /** - * Constructor - * We save global variables into local variables - * - * @return FilesLibTest - */ - public function __construct() - { - parent::__construct(); + /** + * Constructor + * We save global variables into local variables + * + * @return FilesLibTest + */ + public function __construct() + { + parent::__construct(); - //$this->sharedFixture - global $conf,$user,$langs,$db; - $this->savconf=$conf; - $this->savuser=$user; - $this->savlangs=$langs; - $this->savdb=$db; + //$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"; - } + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } - /** - * setUpBeforeClass - * - * @return void - */ - public static function setUpBeforeClass() - { - global $conf,$user,$langs,$db; - $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + /** + * setUpBeforeClass + * + * @return void + */ + public static function setUpBeforeClass() + { + 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"; - } + print __METHOD__."\n"; + } - /** - * tearDownAfterClass - * - * @return void - */ - public static function tearDownAfterClass() - { - global $conf,$user,$langs,$db; - $db->rollback(); + /** + * tearDownAfterClass + * + * @return void + */ + public static function tearDownAfterClass() + { + global $conf,$user,$langs,$db; + $db->rollback(); - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } - /** - * Init phpunit tests - * - * @return void - */ - protected function setUp() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * Init phpunit tests + * + * @return void + */ + protected function setUp() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - print __METHOD__."\n"; - } - /** - * End phpunit tests - * - * @return void - */ - protected function tearDown() - { - print __METHOD__."\n"; - } + print __METHOD__."\n"; + } + /** + * End phpunit tests + * + * @return void + */ + protected function tearDown() + { + print __METHOD__."\n"; + } - /** - * testQuotedPrintEncodeDecode - * - * @return void - */ - public function testQuotedPrintEncodeDecode() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; + /** + * testQuotedPrintEncodeDecode + * + * @return void + */ + public function testQuotedPrintEncodeDecode() + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - $stringtoencode='ABCD=1234;'; - $result=quotedPrintEncode($stringtoencode); - print __METHOD__." result=".$result."\n"; - $this->assertEquals('ABCD=3D1234;', $result); + $stringtoencode='ABCD=1234;'; + $result=quotedPrintEncode($stringtoencode); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('ABCD=3D1234;', $result); - $resultback=quotedPrintDecode($result); - print __METHOD__." result=".$resultback."\n"; - $this->assertEquals($stringtoencode, $resultback); - } + $resultback=quotedPrintDecode($result); + print __METHOD__." result=".$resultback."\n"; + $this->assertEquals($stringtoencode, $resultback); + } } diff --git a/test/phpunit/functional/InstallTest.php b/test/phpunit/functional/InstallTest.php index 7474b66555c..394a8c626b7 100644 --- a/test/phpunit/functional/InstallTest.php +++ b/test/phpunit/functional/InstallTest.php @@ -42,11 +42,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase ) ); - /** - * setUpBeforeClass - * - * @return void - */ + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { // Make sure we backup and remove the configuration file to force new install. @@ -59,22 +59,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase self::shareSession(true); } - /** - * dropTestDatabase - * - * @return void - */ + /** + * dropTestDatabase + * + * @return void + */ protected static function dropTestDatabase() { $mysqli = new mysqli(self::$db_host, self::$db_admin_user, self::$db_admin_pass); $mysqli->query("DROP DATABASE " . self::$db_name); } - /** - * tearDownAfterClass - * - * @return void - */ + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { // Remove the generated configuration and restore the backed up file. @@ -85,11 +85,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase self::dropTestDatabase(); } - /** - * setUp - * - * @return void - */ + /** + * setUp + * + * @return void + */ public function setUp() { // Populating the database can take quite long. @@ -97,32 +97,32 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->setBrowserUrl(self::$url); } - /** - * testInstallRedirect - * - * @return void - */ + /** + * testInstallRedirect + * + * @return void + */ public function testInstallRedirect() { $this->url('/'); $this->assertContains('/install/index.php', $this->url()); } - /** - * testInstallPageTitle - * - * @return void - */ + /** + * testInstallPageTitle + * + * @return void + */ public function testInstallPageTitle() { $this->assertContains('Dolibarr', $this->title()); } - /** - * testInstallProcess - * - * @return void - */ + /** + * testInstallProcess + * + * @return void + */ public function testInstallProcess() { // FIXME: the button itself should have an ID @@ -130,11 +130,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->assertContains('/install/check.php', $this->url()); } - /** - * testCheckPage - * - * @return void - */ + /** + * testCheckPage + * + * @return void + */ public function testCheckPage() { $unavailable_choices = $this->byId('navail_choices'); @@ -149,11 +149,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->assertContains('/install/fileconf.php', $this->url()); } - /** - * testForm - * - * @return void - */ + /** + * testForm + * + * @return void + */ public function testForm() { $this->assertFalse($this->byClassName('hideroot')->displayed()); @@ -198,22 +198,22 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->byId('db_pass_root')->value(''); } - /** - * testFormSubmit - * - * @return void - */ + /** + * testFormSubmit + * + * @return void + */ public function testFormSubmit() { $this->byName('forminstall')->submit(); $this->assertContains('/install/step1.php', $this->url()); } - /** - * testStep1 - * - * @return void - */ + /** + * testStep1 + * + * @return void + */ public function testStep1() { $this->assertFalse($this->byId('pleasewait')->displayed()); @@ -225,11 +225,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->assertContains('/install/step2.php', $this->url()); } - /** - * testStep2 - * - * @return void - */ + /** + * testStep2 + * + * @return void + */ public function testStep2() { $this->byName('forminstall')->submit(); @@ -238,11 +238,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase // There is no step 3 - /** - * testStep4 - * - * @return void - */ + /** + * testStep4 + * + * @return void + */ public function testStep4() { // FIXME: should have an ID @@ -256,11 +256,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->assertContains('/install/step5.php', $this->url()); } - /** - * testStep5 - * - * @return void - */ + /** + * testStep5 + * + * @return void + */ public function testStep5() { // FIXME: this button should have an ID @@ -268,11 +268,11 @@ class InstallTest extends PHPUnit_Extensions_Selenium2TestCase $this->assertContains('/admin/index.php', $this->url()); } - /** - * testFirstLogin - * - * @return void - */ + /** + * testFirstLogin + * + * @return void + */ public function testFirstLogin() { $this->assertEquals('login', $this->byTag('form')->attribute('id')); diff --git a/test/phpunit/functional/TakePosFunctionalTest.php b/test/phpunit/functional/TakePosFunctionalTest.php index 597a893c67b..5b9d03dcfef 100644 --- a/test/phpunit/functional/TakePosFunctionalTest.php +++ b/test/phpunit/functional/TakePosFunctionalTest.php @@ -44,16 +44,19 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase // TODO: move to a global configuration file? /** @var string Base URL of the webserver under test */ protected static $base_url = 'http://dev.zenfusion.fr'; + /** * @var string Dolibarr admin username * @see authenticate */ protected static $dol_admin_user = 'admin'; + /** * @var string Dolibarr admin password * @see authenticate */ protected static $dol_admin_pass = 'admin'; + /** @var int Dolibarr module ID */ private static $module_id = 500000; // TODO: autodetect? @@ -67,14 +70,14 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase ), // Geckodriver does not keep the session at the moment?! // XPath selectors also don't seem to work - //array( - // 'browser' => 'Mozilla Firefox on Linux', - // 'browserName' => 'firefox', - // 'sessionStrategy' => 'shared', - // 'desiredCapabilities' => array( - // 'marionette' => true - // ) - //) + //array( + // 'browser' => 'Mozilla Firefox on Linux', + // 'browserName' => 'firefox', + // 'sessionStrategy' => 'shared', + // 'desiredCapabilities' => array( + // 'marionette' => true + // ) + //) ); /**